@ringcentral/spring-ui 1.11.2 → 1.12.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/AccordionHeader.js +4 -2
- package/Animation.js +10 -9
- package/Autocomplete.js +5 -2
- package/BlockHeader.js +3 -1
- package/DatePicker.js +5 -3
- package/Dialer.js +36 -21
- package/Dialog.js +4 -3
- package/Dropdown.js +7 -4
- package/EmptyState.js +3 -1
- package/FormField.js +2 -0
- package/ListItemText.js +1 -0
- package/MenuHeader.js +1 -0
- package/MenuItem.js +2 -0
- package/MenuItemText.js +1 -0
- package/MenuList.js +2 -0
- package/Option.js +3 -1
- package/PickerTextField.js +2 -0
- package/Popper.js +28 -25
- package/Rating.js +2 -2
- package/Select.js +3 -0
- package/SingleFilter.js +2 -0
- package/Slider.js +3 -2
- package/SortableVirtualizedList.js +10 -10
- package/SplitButton.js +3 -0
- package/Squircle.js +2 -2
- package/StepContent.js +1 -1
- package/SubMenu.js +2 -0
- package/TableCell.js +1 -1
- package/TablePagination.js +2 -0
- package/Tabs.js +9 -5
- package/TextField.js +2 -0
- package/Textarea.js +2 -0
- package/TimePicker.js +3 -1
- package/TrayMenu.js +2 -0
- package/VirtualizedList.js +3 -2
- package/chunks/Alert.js +2 -2
- package/chunks/Badge.js +1 -1
- package/chunks/Drawer.js +3 -2
- package/chunks/MenuItemText.js +1 -0
- package/chunks/MenuList.js +2 -1
- package/chunks/Modal.js +2 -3
- package/chunks/Popover.js +13 -5
- package/chunks/Select.js +26 -21
- package/chunks/SlideIn.js +2 -1
- package/chunks/Squircle.js +2 -2
- package/chunks/VirtualizedMenu.js +3 -5
- package/chunks/composeEventHandlers.js +10 -0
- package/chunks/getSlideIn.js +2 -2
- package/chunks/useFocusTrapStack.js +3 -1
- package/chunks/useHelperTextId.js +4 -2
- package/chunks/useMenuItemSelect.js +34 -25
- package/index.css +205 -172
- package/index.js +3 -1
- package/internal/utils/index.d.ts +1 -0
- package/internal/utils/setRef.d.ts +1 -0
- package/package.json +8 -8
- package/src/Alert/Alert.type.d.ts +2 -1
- package/src/Animation/components/Fade/Fade.d.ts +4 -2
- package/src/Animation/components/Grow/Grow.d.ts +4 -2
- package/src/Animation/components/ShowHideEye/ShowHideEye.d.ts +1 -1
- package/src/Animation/components/SlideIn/SlideIn.d.ts +4 -2
- package/src/Animation/components/SlideIn/getSlideIn.d.ts +1 -1
- package/src/Autocomplete/SuggestionList/SuggestionList.d.ts +1 -1
- package/src/Autocomplete/useAutocomplete.d.ts +18 -18
- package/src/Autocomplete/useAutocompleteTag.d.ts +18 -18
- package/src/Badge/Badge.d.ts +2 -1
- package/src/DatePicker/utils/DatePickerAriaLabelUtils.d.ts +2 -1
- package/src/Dialer/DialDelete/DialDelete.d.ts +2 -2
- package/src/Dialer/DialPad/DialPad.d.ts +2 -2
- package/src/Dialer/Dialer.d.ts +4 -2
- package/src/Dropdown/Dropdown.type.d.ts +2 -2
- package/src/InlineEditable/InlineEditable.type.d.ts +2 -1
- package/src/ListNavigation/useListNavigation.d.ts +3 -3
- package/src/MenuActions/MenuActions.d.ts +2 -2
- package/src/MenuItem/useMenuItem.d.ts +1 -1
- package/src/MenuItem/useVirtualizedMenuItem.d.ts +1 -1
- package/src/MenuList/MenuList.type.d.ts +1 -1
- package/src/NestedMenuContext/MenuOverlayGroupContext.d.ts +2 -2
- package/src/Popper/Popper.type.d.ts +10 -7
- package/src/Rating/utils.d.ts +3 -2
- package/src/Select/Select.type.d.ts +1 -1
- package/src/Slider/Slider.d.ts +2 -2
- package/src/Slider/SliderThumb.d.ts +2 -1
- package/src/Squircle/Squircle.d.ts +1 -1
- package/src/StatusIndicator/StatusIndicator.d.ts +2 -1
- package/src/SubMenu/PopperMenu.type.d.ts +4 -1
|
@@ -3,6 +3,11 @@ import { PropsWithRoot } from '@ringcentral/spring-base';
|
|
|
3
3
|
import { CSSProperties, ReactNode, Ref, RefObject } from 'react';
|
|
4
4
|
import { PortalProps } from '../Portal';
|
|
5
5
|
export type PopperPlacementType = Placement;
|
|
6
|
+
export type PopperChildrenRenderProps = {
|
|
7
|
+
placement: PopperPlacementType;
|
|
8
|
+
arrowRef: RefObject<HTMLDivElement>;
|
|
9
|
+
arrowStyle: CSSProperties;
|
|
10
|
+
};
|
|
6
11
|
export type PopperProps = PropsWithRoot<{
|
|
7
12
|
ref?: Ref<HTMLDivElement>;
|
|
8
13
|
anchorEl?: ReferenceType | null | (() => ReferenceType | null);
|
|
@@ -14,18 +19,16 @@ export type PopperProps = PropsWithRoot<{
|
|
|
14
19
|
actions?: Ref<PopperActions>;
|
|
15
20
|
autoUpdate?: AutoUpdateOptions | boolean;
|
|
16
21
|
matchAnchorWidth?: boolean;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
arrowRef: RefObject<HTMLDivElement>;
|
|
20
|
-
arrowStyle: CSSProperties;
|
|
21
|
-
}) => ReactNode);
|
|
22
|
+
tether?: boolean;
|
|
23
|
+
children?: ReactNode | ((props: PopperChildrenRenderProps) => ReactNode);
|
|
22
24
|
} & Omit<UseFloatingOptions, 'middleware' | 'strategy'> & Omit<PortalProps, 'children'>, 'div'>;
|
|
23
|
-
export type AutoUpdateOptions = {
|
|
25
|
+
export type AutoUpdateOptions = Partial<{
|
|
24
26
|
ancestorScroll: boolean;
|
|
25
27
|
ancestorResize: boolean;
|
|
26
28
|
elementResize: boolean;
|
|
29
|
+
layoutShift: boolean;
|
|
27
30
|
animationFrame: boolean;
|
|
28
|
-
}
|
|
31
|
+
}>;
|
|
29
32
|
export type PopperActions = {
|
|
30
33
|
update: () => void;
|
|
31
34
|
};
|
package/src/Rating/utils.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
1
2
|
export declare function roundValueToPrecision<T extends number | null = number>(value: T, precision: number): number | T;
|
|
2
|
-
export declare const defaultIcon:
|
|
3
|
-
export declare const defaultEmptyIcon:
|
|
3
|
+
export declare const defaultIcon: ReactElement;
|
|
4
|
+
export declare const defaultEmptyIcon: ReactElement;
|
|
4
5
|
export declare function defaultLabelText(value: number | null): string;
|
|
@@ -11,7 +11,7 @@ export type SelectProps<T = unknown> = StandardProps<{
|
|
|
11
11
|
selectMode?: SelectMode;
|
|
12
12
|
defaultValue?: T;
|
|
13
13
|
value?: T;
|
|
14
|
-
onChange?: (e: React.ChangeEvent<HTMLInputElement>,
|
|
14
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>, input?: HTMLInputElement | null) => void;
|
|
15
15
|
placeholder?: ReactNode;
|
|
16
16
|
renderValue?: (value: T) => ReactNode;
|
|
17
17
|
displayEmpty?: boolean;
|
package/src/Slider/Slider.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ForwardedRef, PropsWithoutRef } from 'react';
|
|
1
|
+
import { ForwardedRef, PropsWithoutRef, type ReactElement } from 'react';
|
|
2
2
|
import { SliderProps } from './Slider.type';
|
|
3
3
|
import sliderStyle from './styles/Slider.css';
|
|
4
|
-
declare const InnerSlider: <V extends number | number[] = number>(inProps: PropsWithoutRef<SliderProps<V>>, ref: ForwardedRef<HTMLSpanElement>) =>
|
|
4
|
+
declare const InnerSlider: <V extends number | number[] = number>(inProps: PropsWithoutRef<SliderProps<V>>, ref: ForwardedRef<HTMLSpanElement>) => ReactElement;
|
|
5
5
|
declare const Slider: (<V extends number | number[] = number>(props: PropsWithoutRef<SliderProps<V>> & {
|
|
6
6
|
ref?: ForwardedRef<HTMLSpanElement>;
|
|
7
7
|
}) => ReturnType<typeof InnerSlider>) & {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
1
2
|
import { Transition } from 'framer-motion';
|
|
2
3
|
import { UseSliderReturnValue } from '@mui/base';
|
|
3
4
|
import { SliderProps } from './Slider.type';
|
|
@@ -9,7 +10,7 @@ type SliderThumbProps = Pick<SliderProps, 'classes' | 'valueLabelDisplay' | 'val
|
|
|
9
10
|
dragging: boolean;
|
|
10
11
|
};
|
|
11
12
|
declare const SliderThumb: {
|
|
12
|
-
(props: SliderThumbProps):
|
|
13
|
+
(props: SliderThumbProps): ReactElement;
|
|
13
14
|
displayName: string;
|
|
14
15
|
};
|
|
15
16
|
export { SliderThumb };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
1
2
|
import { StatusIndicatorProps } from './StatusIndicator.type';
|
|
2
3
|
import statusIndicatorStyle from './styles/StatusIndicator.css';
|
|
3
4
|
export declare const StatusIndicator: {
|
|
4
|
-
(inProps: StatusIndicatorProps):
|
|
5
|
+
(inProps: StatusIndicatorProps): ReactElement;
|
|
5
6
|
displayName: string;
|
|
6
7
|
};
|
|
7
8
|
export { statusIndicatorStyle };
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { StandardProps } from '@ringcentral/spring-base';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
2
3
|
import { Popper } from '../Popper';
|
|
3
4
|
import { PopperMenuClassesKey } from './PopperMenu.classes';
|
|
4
|
-
export type PopperMenuProps = StandardProps<{
|
|
5
|
+
export type PopperMenuProps = StandardProps<{
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
}, PopperMenuClassesKey, typeof Popper>;
|