@ringcentral/spring-ui 1.9.0 → 1.9.2
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/Avatar.js +12 -3
- package/Button.js +1 -1
- package/CircularProgressIndicator.js +2 -2
- package/LinearProgressIndicator.js +6 -5
- package/Link.js +2 -2
- package/Radio.js +6 -3
- package/Switch.js +2 -2
- package/Tooltip.js +1 -1
- package/chunks/Button.js +1 -1
- package/chunks/CircularProgressIndicator.js +4 -30
- package/chunks/IconButtonLabel.js +2 -3
- package/chunks/Modal.js +4 -8
- package/chunks/Popover.js +1 -1
- package/chunks/Tooltip.js +1 -1
- package/index.css +106 -61
- package/package.json +5 -4
- package/src/Checkbox/Checkbox.classes.d.ts +1 -1
- package/src/Checkbox/Checkbox.d.ts +2 -2
- package/src/Checkbox/Checkbox.type.d.ts +4 -4
- package/src/CircularProgressIndicator/CircularProgressIndicator.type.d.ts +2 -2
- package/src/Dropdown/Dropdown.type.d.ts +4 -4
- package/src/FormField/FormField.type.d.ts +2 -2
- package/src/LinearProgressIndicator/LinearProgressIndicator.type.d.ts +2 -2
- package/src/Popper/Popper.d.ts +1 -1
- package/src/Radio/Radio.d.ts +2 -2
- package/src/Radio/Radio.type.d.ts +4 -4
- package/src/SubMenu/PopperMenu.d.ts +1 -1
- package/src/Switch/Switch.d.ts +2 -2
- package/src/Switch/Switch.type.d.ts +4 -4
- package/src/Tooltip/TooltipView.classes.d.ts +1 -1
package/Avatar.js
CHANGED
|
@@ -32,7 +32,7 @@ const StatusIndicatorSizeMap = {
|
|
|
32
32
|
};
|
|
33
33
|
const Avatar = forwardRef((inProps, ref) => {
|
|
34
34
|
const props = useThemeProps({ props: inProps, name: 'Avatar' });
|
|
35
|
-
const { component, classes, className, children: childrenProp, imgProps, alt, src, srcSet, size: sizeProp, color = 'default', variant = 'circle', clickable: clickableProp, symbol, avatarShapeRef, showStatusIndicator, IndicatorProps, rootProps, disabled, ...rest } = props;
|
|
35
|
+
const { component, classes, className, children: childrenProp, imgProps, alt, src, srcSet, size: sizeProp, color = 'default', variant = 'circle', clickable: clickableProp, symbol, avatarShapeRef, showStatusIndicator, IndicatorProps, rootProps, disabled, onClick, ...rest } = props;
|
|
36
36
|
let children = null;
|
|
37
37
|
const loaded = useImgLoaded({
|
|
38
38
|
...imgProps,
|
|
@@ -73,7 +73,7 @@ const Avatar = forwardRef((inProps, ref) => {
|
|
|
73
73
|
}
|
|
74
74
|
const { focusVisible, focusVisibleRef, focusVisibleHandlers } = useFocusVisible(props);
|
|
75
75
|
const avatarRef = useForkRef(avatarShapeRef, focusVisibleRef);
|
|
76
|
-
const clickable = clickableProp !== false &&
|
|
76
|
+
const clickable = clickableProp !== false && onClick ? true : clickableProp ?? false;
|
|
77
77
|
const interactive = clickable && !disabled;
|
|
78
78
|
const supportsStatusIndicator = size !== 'xxsmall' && size !== 'xsmall';
|
|
79
79
|
let AvatarShape = component ?? 'div';
|
|
@@ -106,13 +106,22 @@ const Avatar = forwardRef((inProps, ref) => {
|
|
|
106
106
|
tabIndex: -1,
|
|
107
107
|
}
|
|
108
108
|
: {};
|
|
109
|
+
const rootClickHandler = onClick;
|
|
110
|
+
const handleClick = (event) => {
|
|
111
|
+
if (disabled) {
|
|
112
|
+
event.preventDefault();
|
|
113
|
+
event.stopPropagation();
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
rootClickHandler?.(event);
|
|
117
|
+
};
|
|
109
118
|
return (jsx(Overlap, { position: {
|
|
110
119
|
bottom: '-1px',
|
|
111
120
|
right: '-1px',
|
|
112
121
|
}, floater: supportsStatusIndicator && showStatusIndicator ? (jsx(StatusIndicator, { size: StatusIndicatorSizeMap[size], ...IndicatorProps })) : undefined, className: clsx(className, groupClassName), classes: {
|
|
113
122
|
root: cls('root', size, { disabled }),
|
|
114
123
|
floater: cls('indicator', interactive && 'clickable-indicator'),
|
|
115
|
-
}, ...rootProps, ref: ref, children: jsxs(AvatarShape, { className: cls('shape', variant, color, { clickable }, interactive && 'clickable-shape', interactive && `clickable-${variant}`), ...focusVisibleHandlers, ...shapeProps, ...ariaProps, ...nonInteractiveShapeProps, ...rest, ref: avatarRef, children: [jsx("div", { className: cls('content', `${variant}-content`, `${size}-content`, `${variant}-${color}`), children: children }), variant === 'circle' && (jsx("div", { className: cls('hover-tint', interactive && 'clickable-hover-tint', interactive && `clickable-hover-tint-${color}-${variant}`) })), variant === 'squircle' && interactive && (jsx(Squircle, { interactive: false, className: cls('hover-tint', interactive && 'clickable-hover-tint', interactive && `clickable-hover-tint-${color}-${variant}`) }))] }) }));
|
|
124
|
+
}, ...rootProps, ref: ref, children: jsxs(AvatarShape, { className: cls('shape', variant, color, { clickable }, interactive && 'clickable-shape', interactive && `clickable-${variant}`), ...focusVisibleHandlers, ...shapeProps, ...ariaProps, ...nonInteractiveShapeProps, ...rest, onClick: onClick ? handleClick : undefined, ref: avatarRef, children: [jsx("div", { className: cls('content', `${variant}-content`, `${size}-content`, `${variant}-${color}`), children: children }), variant === 'circle' && (jsx("div", { className: cls('hover-tint', interactive && 'clickable-hover-tint', interactive && `clickable-hover-tint-${color}-${variant}`) })), variant === 'squircle' && interactive && (jsx(Squircle, { interactive: false, className: cls('hover-tint', interactive && 'clickable-hover-tint', interactive && `clickable-hover-tint-${color}-${variant}`) }))] }) }));
|
|
116
125
|
});
|
|
117
126
|
Avatar.displayName = 'SuiAvatar';
|
|
118
127
|
|
package/Button.js
CHANGED
|
@@ -6,9 +6,9 @@ import '@mui/base';
|
|
|
6
6
|
import '@ringcentral/spring-base';
|
|
7
7
|
import '@ringcentral/spring-theme';
|
|
8
8
|
import './chunks/CircularProgressIndicator.js';
|
|
9
|
-
import 'framer-motion';
|
|
10
9
|
import './chunks/Icon.js';
|
|
11
10
|
import './chunks/Tooltip.js';
|
|
11
|
+
import 'framer-motion';
|
|
12
12
|
import './chunks/usePrefersReducedMotion.js';
|
|
13
13
|
import './chunks/getFade.js';
|
|
14
14
|
import './Popper.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export { C as CircularProgressIndicator } from './chunks/CircularProgressIndicator.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
|
-
import '
|
|
4
|
+
import 'clsx';
|
|
5
5
|
import '@ringcentral/spring-base';
|
|
6
6
|
import '@ringcentral/spring-theme';
|
|
7
7
|
|
|
8
|
-
var CircularProgressIndicator = {"sui-circular-progress-indicator-root":"sui-circular-progress-indicator-root","sui-circular-progress-indicator-xlarge":"sui-circular-progress-indicator-xlarge","sui-circular-progress-indicator-large":"sui-circular-progress-indicator-large","sui-circular-progress-indicator-medium":"sui-circular-progress-indicator-medium","sui-circular-progress-indicator-small":"sui-circular-progress-indicator-small","sui-circular-progress-indicator-xsmall":"sui-circular-progress-indicator-xsmall","sui-circular-progress-indicator-indeterminate":"sui-circular-progress-indicator-indeterminate","sui-circular-progress-indicator-indeterminate-outer-circle":"sui-circular-progress-indicator-indeterminate-outer-circle","sui-circular-progress-indicator-indeterminate-inner-circle":"sui-circular-progress-indicator-indeterminate-inner-circle","sui-circular-progress-indicator-indeterminate-xlarge":"sui-circular-progress-indicator-indeterminate-xlarge","sui-circular-progress-indicator-indeterminate-large":"sui-circular-progress-indicator-indeterminate-large","sui-circular-progress-indicator-indeterminate-medium":"sui-circular-progress-indicator-indeterminate-medium","sui-circular-progress-indicator-indeterminate-small":"sui-circular-progress-indicator-indeterminate-small","sui-circular-progress-indicator-indeterminate-xsmall":"sui-circular-progress-indicator-indeterminate-xsmall","sui-circular-progress-indicator-indeterminate-primary":"sui-circular-progress-indicator-indeterminate-primary","sui-circular-progress-indicator-indeterminate-neutral":"sui-circular-progress-indicator-indeterminate-neutral","sui-circular-progress-indicator-indeterminate-danger":"sui-circular-progress-indicator-indeterminate-danger","sui-circular-progress-indicator-indeterminate-warning":"sui-circular-progress-indicator-indeterminate-warning","sui-circular-progress-indicator-indeterminate-success":"sui-circular-progress-indicator-indeterminate-success","sui-circular-progress-indicator-determinate-progress-circle":"sui-circular-progress-indicator-determinate-progress-circle","sui-circular-progress-indicator-determinate-primary":"sui-circular-progress-indicator-determinate-primary","sui-circular-progress-indicator-determinate-neutral":"sui-circular-progress-indicator-determinate-neutral","sui-circular-progress-indicator-determinate-danger":"sui-circular-progress-indicator-determinate-danger","sui-circular-progress-indicator-determinate-warning":"sui-circular-progress-indicator-determinate-warning","sui-circular-progress-indicator-determinate-success":"sui-circular-progress-indicator-determinate-success"};
|
|
8
|
+
var CircularProgressIndicator = {"sui-circular-progress-indicator-root":"sui-circular-progress-indicator-root","sui-circular-progress-indicator-xlarge":"sui-circular-progress-indicator-xlarge","sui-circular-progress-indicator-large":"sui-circular-progress-indicator-large","sui-circular-progress-indicator-medium":"sui-circular-progress-indicator-medium","sui-circular-progress-indicator-small":"sui-circular-progress-indicator-small","sui-circular-progress-indicator-xsmall":"sui-circular-progress-indicator-xsmall","sui-circular-progress-indicator-indeterminate":"sui-circular-progress-indicator-indeterminate","sui-circular-progress-indicator-indeterminate-outer-circle":"sui-circular-progress-indicator-indeterminate-outer-circle","sui-circular-progress-indicator-rotate":"sui-circular-progress-indicator-rotate","sui-circular-progress-indicator-indeterminate-inner-circle":"sui-circular-progress-indicator-indeterminate-inner-circle","sui-circular-progress-indicator-pulse":"sui-circular-progress-indicator-pulse","sui-circular-progress-indicator-indeterminate-xlarge":"sui-circular-progress-indicator-indeterminate-xlarge","sui-circular-progress-indicator-indeterminate-large":"sui-circular-progress-indicator-indeterminate-large","sui-circular-progress-indicator-indeterminate-medium":"sui-circular-progress-indicator-indeterminate-medium","sui-circular-progress-indicator-indeterminate-small":"sui-circular-progress-indicator-indeterminate-small","sui-circular-progress-indicator-indeterminate-xsmall":"sui-circular-progress-indicator-indeterminate-xsmall","sui-circular-progress-indicator-indeterminate-primary":"sui-circular-progress-indicator-indeterminate-primary","sui-circular-progress-indicator-indeterminate-neutral":"sui-circular-progress-indicator-indeterminate-neutral","sui-circular-progress-indicator-indeterminate-danger":"sui-circular-progress-indicator-indeterminate-danger","sui-circular-progress-indicator-indeterminate-warning":"sui-circular-progress-indicator-indeterminate-warning","sui-circular-progress-indicator-indeterminate-success":"sui-circular-progress-indicator-indeterminate-success","sui-circular-progress-indicator-determinate-progress-circle":"sui-circular-progress-indicator-determinate-progress-circle","sui-circular-progress-indicator-determinate-primary":"sui-circular-progress-indicator-determinate-primary","sui-circular-progress-indicator-determinate-neutral":"sui-circular-progress-indicator-determinate-neutral","sui-circular-progress-indicator-determinate-danger":"sui-circular-progress-indicator-determinate-danger","sui-circular-progress-indicator-determinate-warning":"sui-circular-progress-indicator-determinate-warning","sui-circular-progress-indicator-determinate-success":"sui-circular-progress-indicator-determinate-success"};
|
|
9
9
|
|
|
10
10
|
export { CircularProgressIndicator as circularProgressIndicatorStyle };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
3
4
|
import { useClasses, useId } from '@ringcentral/spring-base';
|
|
4
5
|
import { useThemeProps } from '@ringcentral/spring-theme';
|
|
5
6
|
|
|
@@ -14,13 +15,14 @@ const LinearProgressIndicator = forwardRef((inProps, ref) => {
|
|
|
14
15
|
const cls = useClasses('linear-progress-indicator', classes, className);
|
|
15
16
|
const labelId = useId();
|
|
16
17
|
const progressBarProps = progressBarPropsProp || {};
|
|
18
|
+
const progressBarLabelledBy = progressBarProps['aria-labelledby'];
|
|
17
19
|
if (max === undefined || value === undefined)
|
|
18
20
|
return null;
|
|
19
|
-
const labelledBy = progressBarProps['aria-labelledby'] || labelId;
|
|
20
21
|
progressBarProps['aria-valuenow'] = value;
|
|
21
22
|
let labelNode = label;
|
|
22
23
|
if (typeof props.label === 'string') {
|
|
23
|
-
labelNode = (jsx("span", { id:
|
|
24
|
+
labelNode = (jsx("span", { id: progressBarLabelledBy || labelId, className: cls('label', `${variant}-label`), children: props.label }));
|
|
25
|
+
progressBarProps['aria-labelledby'] = progressBarLabelledBy || labelId;
|
|
24
26
|
}
|
|
25
27
|
let detailsNode = details;
|
|
26
28
|
if (typeof details === 'string') {
|
|
@@ -30,12 +32,11 @@ const LinearProgressIndicator = forwardRef((inProps, ref) => {
|
|
|
30
32
|
progressBarProps['aria-valuemin'] = min;
|
|
31
33
|
if (max !== 100)
|
|
32
34
|
progressBarProps['aria-valuemax'] = max;
|
|
33
|
-
if (labelNode)
|
|
34
|
-
progressBarProps['aria-labelledby'] = labelledBy;
|
|
35
35
|
const percentage = Math.round((100 / max) * value);
|
|
36
|
+
const { className: progressBarClassName, ...restProgressBarProps } = progressBarProps;
|
|
36
37
|
return (jsxs("span", { className: cls('root', variant, {
|
|
37
38
|
slim,
|
|
38
|
-
}), ...rest, ref: ref, children: [labelNode, jsx("span", { className: cls('track', `${variant}-track`, slim && `${variant}-track-slim`), role: "progressbar", ...
|
|
39
|
+
}), ...rest, ref: ref, children: [labelNode, jsx("span", { className: clsx(cls('track', `${variant}-track`, slim && `${variant}-track-slim`), progressBarClassName), role: "progressbar", ...restProgressBarProps, children: jsx("span", { className: cls('bar', `${variant}-bar`), style: {
|
|
39
40
|
width: `${percentage}%`,
|
|
40
41
|
} }) }), (!!detailsNode || showPercentage) && (jsxs("span", { className: cls('details-container', `${variant}-details-container`), children: [detailsNode, showPercentage && (jsxs("span", { className: cls('details-label', `${variant}-details-label`), children: [percentage, "%"] }))] }))] }));
|
|
41
42
|
});
|
package/Link.js
CHANGED
|
@@ -7,9 +7,9 @@ var Link$1 = {"sui-link-root":"sui-link-root","sui-focus-visible":"sui-focus-vis
|
|
|
7
7
|
|
|
8
8
|
const Link = forwardRef((inProps, ref) => {
|
|
9
9
|
const props = useThemeProps({ props: inProps, name: 'Link' });
|
|
10
|
-
const { classes, component: Component = 'a', className, underline = 'hover', children, variant = 'primary', ...rest } = props;
|
|
10
|
+
const { classes, component: Component = 'a', className, underline = 'hover', children, variant = 'primary', onBlur, onFocus, onFocusVisible, ...rest } = props;
|
|
11
11
|
const cls = useClasses('link', classes, className);
|
|
12
|
-
const { focusVisible, focusVisibleRef, focusVisibleHandlers } = useFocusVisible(
|
|
12
|
+
const { focusVisible, focusVisibleRef, focusVisibleHandlers } = useFocusVisible({ onFocusVisible, onFocus, onBlur });
|
|
13
13
|
const linkRef = useForkRef(ref, focusVisibleRef);
|
|
14
14
|
return (jsx(Component, { className: cls('root', variant, underline, { focusVisible }), ...rest, ...focusVisibleHandlers, ref: linkRef, children: children }));
|
|
15
15
|
});
|
package/Radio.js
CHANGED
|
@@ -10,14 +10,17 @@ var Radio$1 = {"sui-radio-root":"sui-radio-root","sui-focus-visible":"sui-focus-
|
|
|
10
10
|
|
|
11
11
|
const Radio = forwardRef((inProps, ref) => {
|
|
12
12
|
const props = useThemeProps({ props: inProps, name: 'Radio' });
|
|
13
|
-
const { name = '', classes, inputRef, rootProps, inputProps, className: rootClass, ...rest } = props;
|
|
13
|
+
const { name = '', classes, inputRef, rootProps, inputProps, disabled: disabledProp, className: rootClass, ...rest } = props;
|
|
14
14
|
const cls = useClasses('radio', classes, rootClass);
|
|
15
15
|
const { disabled, id, value } = useFormLabel({
|
|
16
16
|
value: rest.value,
|
|
17
17
|
id: inputProps?.id,
|
|
18
|
-
disabled:
|
|
18
|
+
disabled: disabledProp,
|
|
19
|
+
});
|
|
20
|
+
const { focusVisible, getInputProps, checked } = useSwitch({
|
|
21
|
+
...rest,
|
|
22
|
+
disabled,
|
|
19
23
|
});
|
|
20
|
-
const { focusVisible, getInputProps, checked } = useSwitch(rest);
|
|
21
24
|
const { onChange, ...inputRest } = getInputProps({
|
|
22
25
|
role: undefined,
|
|
23
26
|
...inputProps,
|
package/Switch.js
CHANGED
|
@@ -9,7 +9,7 @@ var Switch$1 = {"sui-switch-root":"sui-switch-root","sui-focus-visible":"sui-foc
|
|
|
9
9
|
|
|
10
10
|
const Switch = forwardRef((inProps, ref) => {
|
|
11
11
|
const props = useThemeProps({ props: inProps, name: 'Switch' });
|
|
12
|
-
const { classes, className, inputRef: inputRefProp, inputProps: inputPropsProp, checked: checkedProp, defaultChecked, disabled: disabledProp, autoFocus = false, onBlur, onChange, onFocus, onFocusVisible, required, ...rest } = props;
|
|
12
|
+
const { classes, className, inputRef: inputRefProp, inputProps: inputPropsProp, rootProps, checked: checkedProp, defaultChecked, disabled: disabledProp, autoFocus = false, onBlur, onChange, onFocus, onFocusVisible, required, ...rest } = props;
|
|
13
13
|
const cls = useClasses('switch', classes, className);
|
|
14
14
|
const { disabled, id } = useFormLabel({
|
|
15
15
|
disabled: disabledProp,
|
|
@@ -33,7 +33,7 @@ const Switch = forwardRef((inProps, ref) => {
|
|
|
33
33
|
inputRef.current?.focus();
|
|
34
34
|
}
|
|
35
35
|
}, []);
|
|
36
|
-
return (jsxs("span", { className: cls('root', { focusVisible }),
|
|
36
|
+
return (jsxs("span", { ...rootProps, ...rest, className: cls('root', { focusVisible }), ref: ref, children: [jsx("input", { ...inputProps, id: id, className: cls('input', { checked }), ref: forkRef }), jsx("span", { className: cls('track') }), jsx("span", { className: cls('dot') })] }));
|
|
37
37
|
});
|
|
38
38
|
Switch.displayName = 'SuiSwitch';
|
|
39
39
|
|
package/Tooltip.js
CHANGED
|
@@ -18,6 +18,6 @@ import './chunks/useFocusTrapStack.js';
|
|
|
18
18
|
import './chunks/Backdrop.js';
|
|
19
19
|
import './chunks/PopperPaper.js';
|
|
20
20
|
|
|
21
|
-
var TooltipView = {"sui-tooltip-view-root":"sui-tooltip-view-root","sui-tooltip-view-disable-interactions":"sui-tooltip-view-disable-interactions","sui-tooltip-trigger-wrapper":"sui-tooltip-trigger-wrapper","sui-tooltip-view-paper":"sui-tooltip-view-paper","sui-tooltip-view-paper-content":"sui-tooltip-view-paper-content","sui-tooltip-view-paper-content-medium":"sui-tooltip-view-paper-content-medium","sui-tooltip-view-icon":"sui-tooltip-view-icon","sui-tooltip-view-content":"sui-tooltip-view-content","sui-tooltip-view-
|
|
21
|
+
var TooltipView = {"sui-tooltip-view-root":"sui-tooltip-view-root","sui-tooltip-view-disable-interactions":"sui-tooltip-view-disable-interactions","sui-tooltip-trigger-wrapper":"sui-tooltip-trigger-wrapper","sui-tooltip-view-paper":"sui-tooltip-view-paper","sui-tooltip-view-paper-content":"sui-tooltip-view-paper-content","sui-tooltip-view-paper-content-medium":"sui-tooltip-view-paper-content-medium","sui-tooltip-view-icon":"sui-tooltip-view-icon","sui-tooltip-view-content":"sui-tooltip-view-content","sui-tooltip-view-neutral":"sui-tooltip-view-neutral","sui-tooltip-view-success":"sui-tooltip-view-success","sui-tooltip-view-danger":"sui-tooltip-view-danger","sui-tooltip-view-inverted":"sui-tooltip-view-inverted","sui-tooltip-view-force-hide":"sui-tooltip-view-force-hide"};
|
|
22
22
|
|
|
23
23
|
export { TooltipView as tooltipViewStyle };
|
package/chunks/Button.js
CHANGED
|
@@ -81,7 +81,7 @@ const Button = withTooltip(forwardRef((inProps, ref) => {
|
|
|
81
81
|
disabled: disabledProp,
|
|
82
82
|
focusVisible,
|
|
83
83
|
loading,
|
|
84
|
-
}), title: title, ...rest, ...getRootProps(),
|
|
84
|
+
}), title: title, ...rest, ...getRootProps(), children: [startSlot, isTextContent ? (jsx("span", { className: cls('content'), children: children })) : (children), endSlot] }));
|
|
85
85
|
}));
|
|
86
86
|
Button.displayName = 'SuiButton';
|
|
87
87
|
|
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
-
import
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
import { useClasses } from '@ringcentral/spring-base';
|
|
5
5
|
import { useThemeProps } from '@ringcentral/spring-theme';
|
|
6
6
|
|
|
7
|
-
const indeterminateTransition = {
|
|
8
|
-
type: 'tween',
|
|
9
|
-
duration: 1,
|
|
10
|
-
ease: 'easeInOut',
|
|
11
|
-
};
|
|
12
|
-
const radialGradientScaleMultiplier = {
|
|
13
|
-
xlarge: [2.7, 3],
|
|
14
|
-
large: [3, 3.5],
|
|
15
|
-
medium: [2.7, 3],
|
|
16
|
-
small: [3.5, 3],
|
|
17
|
-
xsmall: [3.5, 3],
|
|
18
|
-
};
|
|
19
7
|
const CircularProgressIndicator = forwardRef((inProps, ref) => {
|
|
20
8
|
const props = useThemeProps({
|
|
21
9
|
props: inProps,
|
|
@@ -26,22 +14,7 @@ const CircularProgressIndicator = forwardRef((inProps, ref) => {
|
|
|
26
14
|
const progressBarProps = progressBarPropsProp || {};
|
|
27
15
|
let content = null;
|
|
28
16
|
if (variant === 'indeterminate') {
|
|
29
|
-
|
|
30
|
-
content = (jsx(MotionConfig, { reducedMotion: "never", children: jsx(motion.span, { className: cls('outer-circle', `${variant}-outer-circle`), animate: {
|
|
31
|
-
rotate: 360,
|
|
32
|
-
transition: {
|
|
33
|
-
repeat: Infinity,
|
|
34
|
-
...indeterminateTransition,
|
|
35
|
-
},
|
|
36
|
-
}, children: jsx(motion.span, { className: cls('inner-circle', `${variant}-inner-circle`), animate: {
|
|
37
|
-
scale: [scale, scale * scaleMultiplier, scale],
|
|
38
|
-
opacity: [0.5, 1, 0.5],
|
|
39
|
-
transition: {
|
|
40
|
-
repeat: Infinity,
|
|
41
|
-
repeatType: 'loop',
|
|
42
|
-
...indeterminateTransition,
|
|
43
|
-
},
|
|
44
|
-
} }) }) }));
|
|
17
|
+
content = (jsx("span", { className: cls('outer-circle', `${variant}-outer-circle`), children: jsx("span", { className: cls('inner-circle', `${variant}-inner-circle`) }) }));
|
|
45
18
|
}
|
|
46
19
|
else if (variant === 'determinate') {
|
|
47
20
|
if (value === undefined) {
|
|
@@ -55,7 +28,8 @@ const CircularProgressIndicator = forwardRef((inProps, ref) => {
|
|
|
55
28
|
const offset = circumference - (value / 100) * circumference;
|
|
56
29
|
content = (jsx("svg", { width: '100%', height: '100%', viewBox: "0 0 56 56", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsx("circle", { className: cls('progress-circle', `${variant}-progress-circle`), cx: "28", cy: "28", r: radius, fill: "none", strokeWidth: 18, strokeDasharray: circumference, strokeDashoffset: offset, transform: "rotate(-90 28 28)" }) }));
|
|
57
30
|
}
|
|
58
|
-
|
|
31
|
+
const { className: progressBarClassName, ...restProgressBarProps } = progressBarProps;
|
|
32
|
+
return (jsx("span", { className: clsx(cls('root', variant, size, color, `${variant}-${size}`, `${variant}-${color}`), progressBarClassName), ...rest, ...restProgressBarProps, role: "progressbar", ref: ref, children: content }));
|
|
59
33
|
});
|
|
60
34
|
CircularProgressIndicator.displayName = 'SuiProgressIndicator';
|
|
61
35
|
|
|
@@ -33,7 +33,7 @@ const IconButton = withTooltip(forwardRef((inProps, ref) => {
|
|
|
33
33
|
...props,
|
|
34
34
|
rootRef: ref,
|
|
35
35
|
});
|
|
36
|
-
const rootProps = {
|
|
36
|
+
const rootProps = getRootProps({
|
|
37
37
|
className: cls('root', size, variant, color, shape, `${size}-${shape}`, `${size}-${variant}`, `${variant}-${color}`, `${variant}-${shape}`, ...(!background
|
|
38
38
|
? [
|
|
39
39
|
'hide-background',
|
|
@@ -45,9 +45,8 @@ const IconButton = withTooltip(forwardRef((inProps, ref) => {
|
|
|
45
45
|
focusVisible,
|
|
46
46
|
}),
|
|
47
47
|
'aria-label': label,
|
|
48
|
-
...getRootProps(),
|
|
49
48
|
...rest,
|
|
50
|
-
};
|
|
49
|
+
});
|
|
51
50
|
const content = (jsxs(Fragment, { children: [children || (jsx(Icon, { symbol: symbol, size: iconSize ?? IconSizeMap[size] })), sizeSupportsLabel(size) && label && (jsx("span", { className: cls('label', `${size}-label`, shape === 'squircle' && `${shape}-label`, `${size}-${shape}-label`), children: label }))] }));
|
|
52
51
|
if (shape === 'squircle') {
|
|
53
52
|
return (jsx(Squircle, { ...rootProps, component: component, interactive: !disabled, focusVisible: focusVisible, children: content }));
|
package/chunks/Modal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { createContext, useContext, forwardRef, useState,
|
|
2
|
+
import { createContext, useContext, forwardRef, useState, useEffect } from 'react';
|
|
3
3
|
import { useAriaHideOutside, useForkRef, useClasses, useEventCallback, useBodyScrollLock, useWindowContext } from '@ringcentral/spring-base';
|
|
4
4
|
import { useThemeProps, useTheme } from '@ringcentral/spring-theme';
|
|
5
5
|
import { FocusTrap, Portal } from '@mui/base';
|
|
@@ -47,16 +47,12 @@ const Modal = forwardRef((inProps, ref) => {
|
|
|
47
47
|
const props = useThemeProps({ props: inProps, name: 'Modal' });
|
|
48
48
|
const { children, open, container: containerProp, disablePortal, onExitComplete, disableBackdropAnimation, motionProps, disableScrollLock = false, ...rest } = props;
|
|
49
49
|
const [shouldRender, setShouldRender] = useState(open);
|
|
50
|
-
const
|
|
51
|
-
const handleRef = useForkRef(
|
|
50
|
+
const [modalElement, setModalElement] = useState(null);
|
|
51
|
+
const handleRef = useForkRef(setModalElement, ref);
|
|
52
52
|
const prefersReducedMotion = usePrefersReducedMotion();
|
|
53
53
|
const { isEnabled } = useFocusTrapStack({ open });
|
|
54
|
-
useBodyScrollLock(open,
|
|
54
|
+
useBodyScrollLock(open, modalElement, {
|
|
55
55
|
disabled: disableScrollLock,
|
|
56
|
-
reserveScrollBarGap: true,
|
|
57
|
-
allowTouchMove: (el) => {
|
|
58
|
-
return modalRef.current?.contains(el) ?? false;
|
|
59
|
-
},
|
|
60
56
|
});
|
|
61
57
|
useEffect(() => {
|
|
62
58
|
if (open) {
|
package/chunks/Popover.js
CHANGED
|
@@ -18,7 +18,7 @@ const Popover = forwardRef((inProps, ref) => {
|
|
|
18
18
|
const paperContentRef = useRef(null);
|
|
19
19
|
const handlePaperContentRef = useForkRef(popperPaperPropsProp?.contentRef, paperContentRef);
|
|
20
20
|
const prefersReducedMotion = usePrefersReducedMotion();
|
|
21
|
-
return (jsx(Modal, {
|
|
21
|
+
return (jsx(Modal, { ...rest, className: cls('root', 'popper'), ref: ref, motionProps: null, hideBackdrop: true, children: jsx(Popper, { arrowHeight: variant === 'standard' ? 0 : 10, arrowPadding: 12, offset: variant === 'standard' ? 2 : 4, ...combineProps({
|
|
22
22
|
middlewares: [
|
|
23
23
|
size({
|
|
24
24
|
padding: PopperProps?.padding,
|
package/chunks/Tooltip.js
CHANGED
|
@@ -196,7 +196,7 @@ const TooltipView = forwardRef((props, ref) => {
|
|
|
196
196
|
arrowStyle,
|
|
197
197
|
classes: {
|
|
198
198
|
root: cls('paper', color),
|
|
199
|
-
content: cls('paper-content', size),
|
|
199
|
+
content: cls('paper-content', `paper-content-${size}`),
|
|
200
200
|
},
|
|
201
201
|
}, popperPaperPropsProp), children: [icon && jsx(Icon, { symbol: icon, size: "small", className: cls('icon') }), jsx("div", { className: cls('content', `content-${size}`), children: children })] })) }));
|
|
202
202
|
});
|
package/index.css
CHANGED
|
@@ -692,21 +692,6 @@
|
|
|
692
692
|
overflow-wrap: break-word;
|
|
693
693
|
}
|
|
694
694
|
|
|
695
|
-
.sui-tooltip-view-content-medium {
|
|
696
|
-
|
|
697
|
-
font-size: var(--sui-typography-descriptor-font-size);
|
|
698
|
-
|
|
699
|
-
font-weight: var(--sui-typography-descriptor-font-weight);
|
|
700
|
-
|
|
701
|
-
line-height: var(--sui-typography-descriptor-line-height);
|
|
702
|
-
|
|
703
|
-
text-decoration: var(--sui-typography-descriptor-text-decoration);
|
|
704
|
-
|
|
705
|
-
text-transform: var(--sui-typography-descriptor-text-transform);
|
|
706
|
-
|
|
707
|
-
font-family: var(--sui-font-family);
|
|
708
|
-
}
|
|
709
|
-
|
|
710
695
|
.sui-tooltip-view-neutral {
|
|
711
696
|
|
|
712
697
|
--tw-border-opacity: 1;
|
|
@@ -767,43 +752,71 @@
|
|
|
767
752
|
display: none;
|
|
768
753
|
}
|
|
769
754
|
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
flex-direction: column;
|
|
775
|
-
|
|
776
|
-
align-items: center;
|
|
755
|
+
@keyframes sui-circular-progress-indicator-rotate {
|
|
756
|
+
from {
|
|
757
|
+
transform: rotate(0deg);
|
|
758
|
+
}
|
|
777
759
|
|
|
778
|
-
|
|
760
|
+
to {
|
|
761
|
+
transform: rotate(360deg);
|
|
762
|
+
}
|
|
763
|
+
}
|
|
779
764
|
|
|
780
|
-
|
|
765
|
+
@keyframes sui-circular-progress-indicator-pulse {
|
|
766
|
+
0% {
|
|
767
|
+
transform: scale(var(--sui-circular-progress-indicator-pulse-start-scale));
|
|
768
|
+
opacity: 0.5;
|
|
769
|
+
}
|
|
781
770
|
|
|
782
|
-
|
|
771
|
+
50% {
|
|
772
|
+
transform: scale(var(--sui-circular-progress-indicator-pulse-end-scale));
|
|
773
|
+
opacity: 1;
|
|
774
|
+
}
|
|
783
775
|
|
|
784
|
-
|
|
776
|
+
100% {
|
|
777
|
+
transform: scale(var(--sui-circular-progress-indicator-pulse-start-scale));
|
|
778
|
+
opacity: 0.5;
|
|
779
|
+
}
|
|
780
|
+
}
|
|
785
781
|
|
|
786
|
-
|
|
782
|
+
.sui-circular-progress-indicator-root {
|
|
783
|
+
display: flex;
|
|
784
|
+
flex-direction: column;
|
|
785
|
+
align-items: center;
|
|
786
|
+
justify-content: center;
|
|
787
|
+
overflow: hidden;
|
|
788
|
+
will-change: transform;
|
|
789
|
+
border-radius: var(--sui-border-radius-full);
|
|
790
|
+
--sui-focus-ring-border-radius: var(--sui-border-radius-full);
|
|
787
791
|
|
|
788
792
|
width: var(--sui-circular-progress-indicator-size);
|
|
789
793
|
height: var(--sui-circular-progress-indicator-size);
|
|
790
794
|
}
|
|
791
|
-
|
|
795
|
+
|
|
796
|
+
.sui-circular-progress-indicator-xlarge {
|
|
792
797
|
--sui-circular-progress-indicator-size: var(--sui-spacing-14);
|
|
793
798
|
}
|
|
794
|
-
|
|
799
|
+
|
|
800
|
+
.sui-circular-progress-indicator-large {
|
|
795
801
|
--sui-circular-progress-indicator-size: var(--sui-spacing-10);
|
|
796
802
|
}
|
|
797
|
-
|
|
803
|
+
|
|
804
|
+
.sui-circular-progress-indicator-medium {
|
|
798
805
|
--sui-circular-progress-indicator-size: var(--sui-spacing-6);
|
|
799
806
|
}
|
|
800
|
-
|
|
807
|
+
|
|
808
|
+
.sui-circular-progress-indicator-small {
|
|
801
809
|
--sui-circular-progress-indicator-size: var(--sui-spacing-4);
|
|
802
810
|
}
|
|
803
|
-
|
|
811
|
+
|
|
812
|
+
.sui-circular-progress-indicator-xsmall {
|
|
804
813
|
--sui-circular-progress-indicator-size: var(--sui-spacing-3);
|
|
805
814
|
}
|
|
806
|
-
|
|
815
|
+
|
|
816
|
+
.sui-circular-progress-indicator-indeterminate {
|
|
817
|
+
--sui-circular-progress-indicator-animation-duration: 1s;
|
|
818
|
+
--sui-circular-progress-indicator-animation-easing: ease-in-out;
|
|
819
|
+
|
|
807
820
|
background-color: var(--sui-circular-progress-indicator-track-bg);
|
|
808
821
|
|
|
809
822
|
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
@@ -814,24 +827,25 @@
|
|
|
814
827
|
var(--sui-circular-progress-indicator-gradient-stop)
|
|
815
828
|
);
|
|
816
829
|
}
|
|
817
|
-
.sui-circular-progress-indicator-indeterminate-outer-circle {
|
|
818
|
-
|
|
819
|
-
display: block;
|
|
820
|
-
|
|
821
|
-
border-radius: var(--sui-border-radius-full);
|
|
822
830
|
|
|
823
|
-
|
|
831
|
+
.sui-circular-progress-indicator-indeterminate-outer-circle {
|
|
832
|
+
display: block;
|
|
833
|
+
border-radius: var(--sui-border-radius-full);
|
|
834
|
+
--sui-focus-ring-border-radius: var(--sui-border-radius-full);
|
|
824
835
|
|
|
825
836
|
width: calc(var(--sui-circular-progress-indicator-size) / 4);
|
|
826
837
|
height: calc(var(--sui-circular-progress-indicator-size) + 4px);
|
|
838
|
+
animation: sui-circular-progress-indicator-rotate
|
|
839
|
+
var(--sui-circular-progress-indicator-animation-duration)
|
|
840
|
+
var(--sui-circular-progress-indicator-animation-easing) infinite;
|
|
841
|
+
transform-origin: center center;
|
|
842
|
+
will-change: transform;
|
|
827
843
|
}
|
|
828
|
-
.sui-circular-progress-indicator-indeterminate-inner-circle {
|
|
829
|
-
|
|
830
|
-
display: block;
|
|
831
|
-
|
|
832
|
-
border-radius: var(--sui-border-radius-full);
|
|
833
844
|
|
|
834
|
-
|
|
845
|
+
.sui-circular-progress-indicator-indeterminate-inner-circle {
|
|
846
|
+
display: block;
|
|
847
|
+
border-radius: var(--sui-border-radius-full);
|
|
848
|
+
--sui-focus-ring-border-radius: var(--sui-border-radius-full);
|
|
835
849
|
|
|
836
850
|
width: calc(var(--sui-circular-progress-indicator-size) / 4);
|
|
837
851
|
height: calc(var(--sui-circular-progress-indicator-size) / 4);
|
|
@@ -841,9 +855,17 @@
|
|
|
841
855
|
var(--sui-circular-progress-indicator-gradient-end-color)
|
|
842
856
|
);
|
|
843
857
|
clip-path: inset(0 50% 0 0);
|
|
858
|
+
animation: sui-circular-progress-indicator-pulse
|
|
859
|
+
var(--sui-circular-progress-indicator-animation-duration)
|
|
860
|
+
var(--sui-circular-progress-indicator-animation-easing) infinite;
|
|
861
|
+
transform-origin: center center;
|
|
862
|
+
will-change: transform, opacity;
|
|
844
863
|
}
|
|
845
|
-
|
|
864
|
+
|
|
865
|
+
.sui-circular-progress-indicator-indeterminate-xlarge {
|
|
846
866
|
--sui-circular-progress-indicator-gradient-size: 4px;
|
|
867
|
+
--sui-circular-progress-indicator-pulse-start-scale: 2.7;
|
|
868
|
+
--sui-circular-progress-indicator-pulse-end-scale: 8.1;
|
|
847
869
|
--sui-circular-progress-indicator-gradient-start: calc(
|
|
848
870
|
var(--sui-circular-progress-indicator-size) / 3
|
|
849
871
|
);
|
|
@@ -851,8 +873,11 @@
|
|
|
851
873
|
var(--sui-circular-progress-indicator-size) / 2.92
|
|
852
874
|
);
|
|
853
875
|
}
|
|
854
|
-
|
|
876
|
+
|
|
877
|
+
.sui-circular-progress-indicator-indeterminate-large {
|
|
855
878
|
--sui-circular-progress-indicator-gradient-size: 3px;
|
|
879
|
+
--sui-circular-progress-indicator-pulse-start-scale: 3;
|
|
880
|
+
--sui-circular-progress-indicator-pulse-end-scale: 10.5;
|
|
856
881
|
--sui-circular-progress-indicator-gradient-start: calc(
|
|
857
882
|
var(--sui-circular-progress-indicator-size) / 3
|
|
858
883
|
);
|
|
@@ -860,8 +885,11 @@
|
|
|
860
885
|
var(--sui-circular-progress-indicator-size) / 2.82
|
|
861
886
|
);
|
|
862
887
|
}
|
|
863
|
-
|
|
888
|
+
|
|
889
|
+
.sui-circular-progress-indicator-indeterminate-medium {
|
|
864
890
|
--sui-circular-progress-indicator-gradient-size: 2px;
|
|
891
|
+
--sui-circular-progress-indicator-pulse-start-scale: 2.7;
|
|
892
|
+
--sui-circular-progress-indicator-pulse-end-scale: 8.1;
|
|
865
893
|
--sui-circular-progress-indicator-gradient-start: calc(
|
|
866
894
|
var(--sui-circular-progress-indicator-size) / 3
|
|
867
895
|
);
|
|
@@ -869,8 +897,11 @@
|
|
|
869
897
|
var(--sui-circular-progress-indicator-size) / 2.72
|
|
870
898
|
);
|
|
871
899
|
}
|
|
872
|
-
|
|
900
|
+
|
|
901
|
+
.sui-circular-progress-indicator-indeterminate-small {
|
|
873
902
|
--sui-circular-progress-indicator-gradient-size: 1px;
|
|
903
|
+
--sui-circular-progress-indicator-pulse-start-scale: 3.5;
|
|
904
|
+
--sui-circular-progress-indicator-pulse-end-scale: 10.5;
|
|
874
905
|
--sui-circular-progress-indicator-gradient-start: calc(
|
|
875
906
|
var(--sui-circular-progress-indicator-size) / 3
|
|
876
907
|
);
|
|
@@ -878,8 +909,11 @@
|
|
|
878
909
|
var(--sui-circular-progress-indicator-size) / 2.72
|
|
879
910
|
);
|
|
880
911
|
}
|
|
881
|
-
|
|
912
|
+
|
|
913
|
+
.sui-circular-progress-indicator-indeterminate-xsmall {
|
|
882
914
|
--sui-circular-progress-indicator-gradient-size: 1px;
|
|
915
|
+
--sui-circular-progress-indicator-pulse-start-scale: 3.5;
|
|
916
|
+
--sui-circular-progress-indicator-pulse-end-scale: 10.5;
|
|
883
917
|
--sui-circular-progress-indicator-gradient-start: calc(
|
|
884
918
|
var(--sui-circular-progress-indicator-size) / 3
|
|
885
919
|
);
|
|
@@ -887,7 +921,8 @@
|
|
|
887
921
|
var(--sui-circular-progress-indicator-size) / 2.72
|
|
888
922
|
);
|
|
889
923
|
}
|
|
890
|
-
|
|
924
|
+
|
|
925
|
+
.sui-circular-progress-indicator-indeterminate-primary {
|
|
891
926
|
--sui-circular-progress-indicator-gradient-start-color: var(
|
|
892
927
|
--sui-colors-primary-f
|
|
893
928
|
);
|
|
@@ -896,7 +931,8 @@
|
|
|
896
931
|
);
|
|
897
932
|
--sui-circular-progress-indicator-track-bg: var(--sui-colors-neutral-b4);
|
|
898
933
|
}
|
|
899
|
-
|
|
934
|
+
|
|
935
|
+
.sui-circular-progress-indicator-indeterminate-neutral {
|
|
900
936
|
--sui-circular-progress-indicator-gradient-start-color: var(
|
|
901
937
|
--sui-colors-neutral-static-w0
|
|
902
938
|
);
|
|
@@ -907,7 +943,8 @@
|
|
|
907
943
|
--sui-colors-neutral-b4-t50
|
|
908
944
|
);
|
|
909
945
|
}
|
|
910
|
-
|
|
946
|
+
|
|
947
|
+
.sui-circular-progress-indicator-indeterminate-danger {
|
|
911
948
|
--sui-circular-progress-indicator-gradient-start-color: var(
|
|
912
949
|
--sui-colors-danger-f
|
|
913
950
|
);
|
|
@@ -916,7 +953,8 @@
|
|
|
916
953
|
);
|
|
917
954
|
--sui-circular-progress-indicator-track-bg: var(--sui-colors-neutral-b4);
|
|
918
955
|
}
|
|
919
|
-
|
|
956
|
+
|
|
957
|
+
.sui-circular-progress-indicator-indeterminate-warning {
|
|
920
958
|
--sui-circular-progress-indicator-gradient-start-color: var(
|
|
921
959
|
--sui-colors-warning-f
|
|
922
960
|
);
|
|
@@ -925,7 +963,8 @@
|
|
|
925
963
|
);
|
|
926
964
|
--sui-circular-progress-indicator-track-bg: var(--sui-colors-neutral-b4);
|
|
927
965
|
}
|
|
928
|
-
|
|
966
|
+
|
|
967
|
+
.sui-circular-progress-indicator-indeterminate-success {
|
|
929
968
|
--sui-circular-progress-indicator-gradient-start-color: var(
|
|
930
969
|
--sui-colors-success-f
|
|
931
970
|
);
|
|
@@ -934,22 +973,28 @@
|
|
|
934
973
|
);
|
|
935
974
|
--sui-circular-progress-indicator-track-bg: var(--sui-colors-neutral-b4);
|
|
936
975
|
}
|
|
937
|
-
|
|
976
|
+
|
|
977
|
+
.sui-circular-progress-indicator-determinate-progress-circle {
|
|
938
978
|
stroke: var(--sui-circular-progress-indicator-bg);
|
|
939
979
|
}
|
|
940
|
-
|
|
980
|
+
|
|
981
|
+
.sui-circular-progress-indicator-determinate-primary {
|
|
941
982
|
--sui-circular-progress-indicator-bg: var(--sui-colors-primary-f);
|
|
942
983
|
}
|
|
943
|
-
|
|
984
|
+
|
|
985
|
+
.sui-circular-progress-indicator-determinate-neutral {
|
|
944
986
|
--sui-circular-progress-indicator-bg: var(--sui-colors-neutral-w0);
|
|
945
987
|
}
|
|
946
|
-
|
|
988
|
+
|
|
989
|
+
.sui-circular-progress-indicator-determinate-danger {
|
|
947
990
|
--sui-circular-progress-indicator-bg: var(--sui-colors-danger-f);
|
|
948
991
|
}
|
|
949
|
-
|
|
992
|
+
|
|
993
|
+
.sui-circular-progress-indicator-determinate-warning {
|
|
950
994
|
--sui-circular-progress-indicator-bg: var(--sui-colors-warning-f);
|
|
951
995
|
}
|
|
952
|
-
|
|
996
|
+
|
|
997
|
+
.sui-circular-progress-indicator-determinate-success {
|
|
953
998
|
--sui-circular-progress-indicator-bg: var(--sui-colors-success-f);
|
|
954
999
|
}
|
|
955
1000
|
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ringcentral/spring-ui",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.2",
|
|
4
4
|
"author": "RingCentral",
|
|
5
5
|
"description": "A comprehensive React component library built with Tailwind CSS, featuring production-ready components",
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"module": "./index.js",
|
|
8
8
|
"types": "./index.d.ts",
|
|
9
|
+
"style": "./index.css",
|
|
9
10
|
"dependencies": {
|
|
10
11
|
"@date-io/dayjs": "^3.0.0",
|
|
11
12
|
"@dnd-kit/core": "^6.1.0",
|
|
@@ -14,9 +15,9 @@
|
|
|
14
15
|
"@floating-ui/react-dom": "2.1.1",
|
|
15
16
|
"@juggle/resize-observer": "3.4.0",
|
|
16
17
|
"@mui/base": "5.0.0-beta.40",
|
|
17
|
-
"@ringcentral/spring-base": "^1.9.
|
|
18
|
-
"@ringcentral/spring-icon": "^1.9.
|
|
19
|
-
"@ringcentral/spring-theme": "^1.9.
|
|
18
|
+
"@ringcentral/spring-base": "^1.9.2",
|
|
19
|
+
"@ringcentral/spring-icon": "^1.9.2",
|
|
20
|
+
"@ringcentral/spring-theme": "^1.9.2",
|
|
20
21
|
"@types/lodash": "^4.14.182",
|
|
21
22
|
"@use-gesture/react": "10.3.1",
|
|
22
23
|
"clsx": "^1.2.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CamelCase } from 'type-fest';
|
|
2
2
|
import { CheckboxShape } from './Checkbox.type';
|
|
3
|
-
export declare type BaseCheckboxClassesKey = 'root' | 'inner' | CheckboxShape | 'input' | `inner-${CheckboxShape}
|
|
3
|
+
export declare type BaseCheckboxClassesKey = 'root' | 'inner' | CheckboxShape | 'input' | `inner-${CheckboxShape}` | 'indeterminate';
|
|
4
4
|
export declare type CheckboxClassesKey = CamelCase<BaseCheckboxClassesKey>;
|
|
5
5
|
export declare type CheckboxClasses = {
|
|
6
6
|
name: 'checkbox';
|
|
@@ -4,8 +4,8 @@ declare const Checkbox: import("react").ForwardRefExoticComponent<import("@ringc
|
|
|
4
4
|
indeterminate?: boolean | undefined;
|
|
5
5
|
autoFocus?: boolean | undefined;
|
|
6
6
|
inputRef?: import("react").Ref<HTMLInputElement> | undefined;
|
|
7
|
-
rootProps?:
|
|
8
|
-
inputProps?:
|
|
7
|
+
rootProps?: import("@ringcentral/spring-base").SlotProps<"div", never, import("@ringcentral/spring-base").HTMLDataAttribute> | undefined;
|
|
8
|
+
inputProps?: import("@ringcentral/spring-base").SlotProps<"input", "type" | "ref", import("@ringcentral/spring-base").HTMLDataAttribute> | undefined;
|
|
9
9
|
shape?: import("./Checkbox.type").CheckboxShape | undefined;
|
|
10
10
|
} & Omit<import("@mui/base").UseSwitchParameters, "readonly"> & {
|
|
11
11
|
className?: string | undefined;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ref } from 'react';
|
|
2
2
|
import { UseSwitchParameters } from '@mui/base';
|
|
3
|
-
import { StandardProps } from '@ringcentral/spring-base';
|
|
3
|
+
import { SlotProps, StandardProps } from '@ringcentral/spring-base';
|
|
4
4
|
import { CheckboxClassesKey } from './Checkbox.classes';
|
|
5
5
|
export declare type CheckboxShape = 'rectangular' | 'squircle';
|
|
6
6
|
export declare type CheckboxProps = StandardProps<{
|
|
7
7
|
indeterminate?: boolean;
|
|
8
8
|
autoFocus?: boolean;
|
|
9
9
|
inputRef?: Ref<HTMLInputElement>;
|
|
10
|
-
rootProps?:
|
|
11
|
-
inputProps?:
|
|
10
|
+
rootProps?: SlotProps<'div'>;
|
|
11
|
+
inputProps?: SlotProps<'input', 'type' | 'ref'>;
|
|
12
12
|
shape?: CheckboxShape;
|
|
13
13
|
} & Omit<UseSwitchParameters, 'readonly'>, CheckboxClassesKey>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { HTMLDataAttribute, StandardProps } from '@ringcentral/spring-base';
|
|
1
2
|
import { ComponentProps } from 'react';
|
|
2
|
-
import { StandardProps } from '@ringcentral/spring-base';
|
|
3
3
|
import { CircularProgressIndicatorClassesKey } from './CircularProgressIndicator.classes';
|
|
4
4
|
export declare type CircularProgressIndicatorVariant = 'indeterminate' | 'determinate';
|
|
5
5
|
export declare type CircularProgressIndicatorSize = 'xlarge' | 'large' | 'medium' | 'small' | 'xsmall';
|
|
@@ -9,5 +9,5 @@ export declare type CircularProgressIndicatorProps = StandardProps<{
|
|
|
9
9
|
size?: CircularProgressIndicatorSize;
|
|
10
10
|
color?: CircularProgressIndicatorColor;
|
|
11
11
|
value?: number;
|
|
12
|
-
progressBarProps?: Omit<ComponentProps<'span'>, 'ref' | 'role'
|
|
12
|
+
progressBarProps?: Omit<ComponentProps<'span'>, 'ref' | 'role'> & HTMLDataAttribute;
|
|
13
13
|
}, CircularProgressIndicatorClassesKey, 'span'>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HTMLDataAttribute, StandardProps, UseFocusVisibleOptions } from '@ringcentral/spring-base';
|
|
2
|
-
import {
|
|
1
|
+
import { HTMLDataAttribute, SlotProps, StandardProps, UseFocusVisibleOptions } from '@ringcentral/spring-base';
|
|
2
|
+
import { ReactElement, ReactNode, Ref } from 'react';
|
|
3
3
|
import { VirtualizedMenuProps } from '../VirtualizedMenu';
|
|
4
4
|
import { MenuProps } from '../Menu';
|
|
5
5
|
import { DropdownClassesKey } from './Dropdown.classes';
|
|
@@ -8,8 +8,8 @@ export declare type DropdownProps<T = string, D = unknown> = StandardProps<{
|
|
|
8
8
|
value?: T | null;
|
|
9
9
|
onChange?: (value: T | null) => void;
|
|
10
10
|
placeholder?: ReactNode;
|
|
11
|
-
rootProps?:
|
|
12
|
-
buttonProps?:
|
|
11
|
+
rootProps?: SlotProps<'div', 'ref'>;
|
|
12
|
+
buttonProps?: SlotProps<'button'> & Pick<UseFocusVisibleOptions, 'onFocusVisible'>;
|
|
13
13
|
MenuProps?: (Omit<VirtualizedMenuProps, 'open' | 'anchorEl' | 'onClose' | 'initialFocus' | 'data' | 'children'> | Omit<MenuProps, 'open' | 'anchorEl' | 'onClose' | 'children'>) & HTMLDataAttribute;
|
|
14
14
|
ref?: Ref<HTMLDivElement>;
|
|
15
15
|
buttonRef?: Ref<HTMLButtonElement>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, DetailedHTMLProps, LabelHTMLAttributes, Ref } from 'react';
|
|
2
|
-
import { HTMLDataAttribute, StandardProps } from '@ringcentral/spring-base';
|
|
2
|
+
import { HTMLDataAttribute, SlotProps, StandardProps } from '@ringcentral/spring-base';
|
|
3
3
|
import { FormFieldClassesKey } from './FormField.classes';
|
|
4
4
|
export declare type FormFieldVariant = 'standard' | 'outlined' | 'quiet' | 'contained';
|
|
5
5
|
export declare type FormFieldSize = 'xlarge' | 'large' | 'medium';
|
|
@@ -10,7 +10,7 @@ export declare type FormFieldProps = StandardProps<{
|
|
|
10
10
|
focused?: boolean;
|
|
11
11
|
size?: FormFieldSize;
|
|
12
12
|
contentRef?: Ref<HTMLDivElement>;
|
|
13
|
-
contentProps?:
|
|
13
|
+
contentProps?: SlotProps<'div'>;
|
|
14
14
|
FormHelperTextProps?: ComponentProps<'div'> & HTMLDataAttribute;
|
|
15
15
|
variant?: FormFieldVariant;
|
|
16
16
|
htmlFor?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StandardProps } from '@ringcentral/spring-base';
|
|
1
|
+
import { HTMLDataAttribute, StandardProps } from '@ringcentral/spring-base';
|
|
2
2
|
import { ComponentProps, ReactNode } from 'react';
|
|
3
3
|
import { LinearProgressIndicatorClassesKey } from './LinearProgressIndicator.classes';
|
|
4
4
|
export declare type LinearProgressIndicatorVariant = 'determinate';
|
|
@@ -11,5 +11,5 @@ export declare type LinearProgressIndicatorProps = StandardProps<{
|
|
|
11
11
|
value: number;
|
|
12
12
|
min?: number;
|
|
13
13
|
max: number;
|
|
14
|
-
progressBarProps?: Omit<ComponentProps<'span'>, 'ref' | 'role'
|
|
14
|
+
progressBarProps?: Omit<ComponentProps<'span'>, 'ref' | 'role'> & HTMLDataAttribute;
|
|
15
15
|
}, LinearProgressIndicatorClassesKey, 'span'>;
|
package/src/Popper/Popper.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { PopperProps } from './Popper.type';
|
|
3
|
-
declare const Popper: import("react").ForwardRefExoticComponent<Pick<PopperProps, "children" | "onKeyDown" | "onKeyUp" | "onMouseDown" | "onClick" | "aria-hidden" | "dir" | "slot" | "style" | "title" | "aria-live" | "aria-atomic" | "role" | "className" | "accessKey" | "draggable" | "hidden" | "lang" | "translate" | "id" | "prefix" | "contentEditable" | "inputMode" | "tabIndex" | "key" | "defaultChecked" | "defaultValue" | "placeholder" | "container" | "transform" | "padding" | "onFocus" | "onBlur" | "onMouseEnter" | "onMouseLeave" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | `data-${string}` | "placement" | "open" | "offset" | "disablePortal" | "
|
|
3
|
+
declare const Popper: import("react").ForwardRefExoticComponent<Pick<PopperProps, "children" | "onKeyDown" | "onKeyUp" | "onMouseDown" | "onClick" | "aria-hidden" | "dir" | "slot" | "style" | "title" | "aria-live" | "aria-atomic" | "role" | "className" | "accessKey" | "draggable" | "hidden" | "lang" | "translate" | "id" | "prefix" | "contentEditable" | "inputMode" | "tabIndex" | "key" | "defaultChecked" | "defaultValue" | "placeholder" | "container" | "transform" | "padding" | "onFocus" | "onBlur" | "onMouseEnter" | "onMouseLeave" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "platform" | `data-${string}` | "placement" | "open" | "offset" | "disablePortal" | "whileElementsMounted" | "elements" | "anchorEl" | "middlewares" | "arrowHeight" | "arrowPadding" | "actions" | "autoUpdate" | "matchAnchorWidth"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
4
|
export { Popper };
|
package/src/Radio/Radio.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ export declare const Radio: import("react").ForwardRefExoticComponent<import("@r
|
|
|
4
4
|
value?: string | undefined;
|
|
5
5
|
name?: string | undefined;
|
|
6
6
|
inputRef?: import("react").Ref<HTMLInputElement> | undefined;
|
|
7
|
-
rootProps?:
|
|
8
|
-
inputProps?:
|
|
7
|
+
rootProps?: import("@ringcentral/spring-base").SlotProps<"div", never, import("@ringcentral/spring-base").HTMLDataAttribute> | undefined;
|
|
8
|
+
inputProps?: import("@ringcentral/spring-base").SlotProps<"input", "type" | "ref", import("@ringcentral/spring-base").HTMLDataAttribute> | undefined;
|
|
9
9
|
} & Omit<import("@mui/base").UseSwitchParameters, "readonly"> & {
|
|
10
10
|
className?: string | undefined;
|
|
11
11
|
} & import("@ringcentral/spring-base").HTMLDataAttribute & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ref } from 'react';
|
|
2
2
|
import { UseSwitchParameters } from '@mui/base';
|
|
3
|
-
import {
|
|
3
|
+
import { SlotProps, StandardProps } from '@ringcentral/spring-base';
|
|
4
4
|
import { RadioClassesKey } from './Radio.classes';
|
|
5
5
|
export declare type RadioProps = StandardProps<{
|
|
6
6
|
value?: string;
|
|
7
7
|
name?: string;
|
|
8
8
|
inputRef?: Ref<HTMLInputElement>;
|
|
9
|
-
rootProps?:
|
|
10
|
-
inputProps?:
|
|
9
|
+
rootProps?: SlotProps<'div'>;
|
|
10
|
+
inputProps?: SlotProps<'input', 'type' | 'ref'>;
|
|
11
11
|
} & Omit<UseSwitchParameters, 'readonly'>, RadioClassesKey>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { PopperMenuProps } from './PopperMenu.type';
|
|
3
3
|
import popperMenuStyle from './styles/PopperMenu.css';
|
|
4
|
-
declare const PopperMenu: import("react").ForwardRefExoticComponent<Pick<PopperMenuProps, "children" | "onKeyDown" | "onKeyUp" | "onMouseDown" | "onClick" | "aria-hidden" | "dir" | "slot" | "style" | "title" | "aria-live" | "aria-atomic" | "role" | "classes" | "className" | "accessKey" | "draggable" | "hidden" | "lang" | "translate" | "id" | "prefix" | "contentEditable" | "inputMode" | "tabIndex" | "key" | "defaultChecked" | "defaultValue" | "placeholder" | "container" | "transform" | "padding" | "onFocus" | "onBlur" | "onMouseEnter" | "onMouseLeave" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | `data-${string}` | "placement" | "open" | "offset" | "disablePortal" | "
|
|
4
|
+
declare const PopperMenu: import("react").ForwardRefExoticComponent<Pick<PopperMenuProps, "children" | "onKeyDown" | "onKeyUp" | "onMouseDown" | "onClick" | "aria-hidden" | "dir" | "slot" | "style" | "title" | "aria-live" | "aria-atomic" | "role" | "classes" | "className" | "accessKey" | "draggable" | "hidden" | "lang" | "translate" | "id" | "prefix" | "contentEditable" | "inputMode" | "tabIndex" | "key" | "defaultChecked" | "defaultValue" | "placeholder" | "container" | "transform" | "padding" | "onFocus" | "onBlur" | "onMouseEnter" | "onMouseLeave" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "platform" | `data-${string}` | "placement" | "open" | "offset" | "disablePortal" | "whileElementsMounted" | "elements" | "anchorEl" | "middlewares" | "arrowHeight" | "arrowPadding" | "actions" | "autoUpdate" | "matchAnchorWidth"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export { PopperMenu, popperMenuStyle };
|
package/src/Switch/Switch.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import switchStyle from './styles/Switch.css';
|
|
|
3
3
|
declare const Switch: import("react").ForwardRefExoticComponent<import("@ringcentral/spring-base").ClassesProp<import("./Switch.classes").SwitchClassesKey> & {
|
|
4
4
|
autoFocus?: boolean | undefined;
|
|
5
5
|
inputRef?: import("react").Ref<HTMLInputElement> | undefined;
|
|
6
|
-
inputProps?:
|
|
7
|
-
rootProps?: import("
|
|
6
|
+
inputProps?: import("@ringcentral/spring-base").SlotProps<"input", "ref", import("@ringcentral/spring-base").HTMLDataAttribute> | undefined;
|
|
7
|
+
rootProps?: import("@ringcentral/spring-base").SlotProps<"span", "ref", import("@ringcentral/spring-base").HTMLDataAttribute> | undefined;
|
|
8
8
|
} & Omit<import("@mui/base").UseSwitchParameters, "readOnly"> & {
|
|
9
9
|
className?: string | undefined;
|
|
10
10
|
} & import("@ringcentral/spring-base").HTMLDataAttribute & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { UseSwitchParameters } from '@mui/base';
|
|
2
|
-
import { StandardProps } from '@ringcentral/spring-base';
|
|
3
|
-
import {
|
|
2
|
+
import { SlotProps, StandardProps } from '@ringcentral/spring-base';
|
|
3
|
+
import { Ref } from 'react';
|
|
4
4
|
import { SwitchClassesKey } from './Switch.classes';
|
|
5
5
|
export declare type SwitchProps = StandardProps<{
|
|
6
6
|
autoFocus?: boolean;
|
|
7
7
|
inputRef?: Ref<HTMLInputElement>;
|
|
8
|
-
inputProps?:
|
|
9
|
-
rootProps?:
|
|
8
|
+
inputProps?: SlotProps<'input', 'ref'>;
|
|
9
|
+
rootProps?: SlotProps<'span', 'ref'>;
|
|
10
10
|
} & Omit<UseSwitchParameters, 'readOnly'>, SwitchClassesKey>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CamelCase } from 'type-fest';
|
|
2
2
|
import type { TooltipSize } from './TooltipView.type';
|
|
3
|
-
export declare type BaseTooltipViewClassesKey = 'root' | 'paper' | 'paper-content' | 'icon' | TooltipSize | 'content' | `content-${TooltipSize}` | 'neutral' | 'success' | 'danger' | 'force-hide' | 'inverted' | 'disable-interactions';
|
|
3
|
+
export declare type BaseTooltipViewClassesKey = 'root' | 'paper' | 'paper-content' | `paper-content-${TooltipSize}` | 'icon' | TooltipSize | 'content' | `content-${TooltipSize}` | 'neutral' | 'success' | 'danger' | 'force-hide' | 'inverted' | 'disable-interactions';
|
|
4
4
|
export declare type TooltipViewClassesKey = CamelCase<BaseTooltipViewClassesKey>;
|
|
5
5
|
export declare type TooltipViewClasses = {
|
|
6
6
|
name: 'tooltip-view';
|