@ringcentral/juno 2.21.2 → 2.22.1-hotfix.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/components/Buttons/Button/Button.d.ts +12 -3
- package/components/Buttons/Button/Button.js +19 -11
- package/components/Buttons/Button/styles/StyledButton.js +11 -5
- package/components/Buttons/ButtonGroup/ButtonGroup.js +3 -3
- package/components/Buttons/IconButton/IconButton.d.ts +13 -4
- package/components/Buttons/IconButton/IconButton.js +20 -14
- package/components/Buttons/IconButton/styles/StyledIconButton.js +19 -7
- package/components/Buttons/IconButton/utils/IconButtonUtils.d.ts +1 -1
- package/components/Buttons/IconButton/utils/IconButtonUtils.js +8 -7
- package/components/Buttons/SplitButton/SplitButton.js +5 -5
- package/components/Buttons/SplitButton/styles/StyledSplitButton.js +3 -3
- package/components/Buttons/SplitButton/utils/SplitButtonUtils.js +8 -1
- package/components/Dialer/DialPad/DialPad.d.ts +2 -2
- package/components/Downshift/styles/DownshiftStyle.d.ts +2 -2
- package/components/Forms/Picker/DatePicker/styles/StyledDatePickerHeader.d.ts +2 -2
- package/components/Forms/Picker/DatePicker/styles/StyledYear.d.ts +1 -1
- package/components/Forms/Picker/TimePicker/styles/StyledSelectionItem.d.ts +1 -1
- package/components/Forms/Picker/TimePicker/styles/StyledTimeIconButton.d.ts +1 -1
- package/components/Forms/Picker/styles/PickerBaseIconButton.d.ts +1 -1
- package/components/Forms/Switch/Switch.js +13 -2
- package/components/Forms/Switch/styles/SwitchStyle.js +1 -1
- package/components/Forms/Switch/utils/SwitchUtils.js +1 -9
- package/components/Forms/TextField/styles/ClearIconButton.d.ts +2 -2
- package/components/List/ListItem/ListItem.d.ts +9 -3
- package/components/List/ListItem/ListItem.js +14 -10
- package/components/List/ListItem/styles/ListItemStyle.d.ts +2 -1
- package/components/List/ListItem/styles/ListItemStyle.js +16 -6
- package/components/Menu/MenuItem/MenuItem.d.ts +23 -5
- package/components/Menu/MenuItem/MenuItem.js +12 -8
- package/components/Menu/MenuItem/styles/MenuItemStyle.js +2 -2
- package/components/Menu/MenuOption/styles/StyledMenuOption.d.ts +1 -1
- package/components/Menu/SubMenu/SubMenu.d.ts +1 -1
- package/components/TablePagination/styles/TablePaginationStyle.d.ts +6 -4
- package/components/Text/Text.d.ts +1 -1
- package/es6/components/Buttons/Button/Button.js +19 -11
- package/es6/components/Buttons/Button/styles/StyledButton.js +12 -6
- package/es6/components/Buttons/ButtonGroup/ButtonGroup.js +4 -4
- package/es6/components/Buttons/IconButton/IconButton.js +20 -14
- package/es6/components/Buttons/IconButton/styles/StyledIconButton.js +20 -8
- package/es6/components/Buttons/IconButton/utils/IconButtonUtils.js +8 -7
- package/es6/components/Buttons/SplitButton/SplitButton.js +6 -6
- package/es6/components/Buttons/SplitButton/styles/StyledSplitButton.js +3 -3
- package/es6/components/Buttons/SplitButton/utils/SplitButtonUtils.js +8 -1
- package/es6/components/Forms/Switch/Switch.js +15 -4
- package/es6/components/Forms/Switch/styles/SwitchStyle.js +2 -2
- package/es6/components/Forms/Switch/utils/SwitchUtils.js +1 -9
- package/es6/components/List/ListItem/ListItem.js +14 -10
- package/es6/components/List/ListItem/styles/ListItemStyle.js +17 -7
- package/es6/components/Menu/MenuItem/MenuItem.js +12 -8
- package/es6/components/Menu/MenuItem/styles/MenuItemStyle.js +2 -2
- package/es6/foundation/styles/focusRing.js +11 -0
- package/es6/foundation/styles/index.js +1 -0
- package/es6/foundation/typings/BaseFocusVariant.js +0 -0
- package/foundation/styles/focusRing.d.ts +2 -0
- package/foundation/styles/focusRing.js +13 -0
- package/foundation/styles/index.d.ts +1 -0
- package/foundation/styles/index.js +1 -0
- package/foundation/typings/BaseFocusVariant.d.ts +7 -0
- package/foundation/typings/BaseFocusVariant.js +2 -0
- package/foundation/typings/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -14,10 +14,9 @@ import { RcMenuListContext } from '../MenuList/MenuListContext';
|
|
|
14
14
|
import { RcSubMenuContext } from '../SubMenu/SubMenuContext';
|
|
15
15
|
import { MenuItemStyle, StyledCheckIcon } from './styles';
|
|
16
16
|
import { RcMenuItemClasses, RcMenuItemRippleClasses } from './utils';
|
|
17
|
-
var _RcMenuItem = forwardRef(function (
|
|
17
|
+
var _RcMenuItem = forwardRef(function (props, ref) {
|
|
18
18
|
var _a;
|
|
19
|
-
var props =
|
|
20
|
-
var classesProp = props.classes, children = props.children, color = props.color, button = props.button, className = props.className, onMouseEnter = props.onMouseEnter, onClick = props.onClick, onFocus = props.onFocus, highlighted = props.highlighted, size = props.size, type = props.type, checked = props.checked, icon = props.icon, symbol = props.symbol, avatar = props.avatar, secondaryAction = props.secondaryAction, idRef = props.idRef, isSubMenuItem = props.isSubMenuItem, TouchRipplePropsProp = props.TouchRippleProps, title = props.title, focused = props.focused, rest = __rest(props, ["classes", "children", "color", "button", "className", "onMouseEnter", "onClick", "onFocus", "highlighted", "size", "type", "checked", "icon", "symbol", "avatar", "secondaryAction", "idRef", "isSubMenuItem", "TouchRippleProps", "title", "focused"]);
|
|
19
|
+
var classesProp = props.classes, children = props.children, color = props.color, button = props.button, className = props.className, onMouseEnter = props.onMouseEnter, onClick = props.onClick, onFocus = props.onFocus, highlighted = props.highlighted, size = props.size, type = props.type, checked = props.checked, icon = props.icon, symbol = props.symbol, avatar = props.avatar, secondaryAction = props.secondaryAction, idRef = props.idRef, isSubMenuItem = props.isSubMenuItem, TouchRipplePropsProp = props.TouchRippleProps, title = props.title, focused = props.focused, focusVariant = props.focusVariant, rest = __rest(props, ["classes", "children", "color", "button", "className", "onMouseEnter", "onClick", "onFocus", "highlighted", "size", "type", "checked", "icon", "symbol", "avatar", "secondaryAction", "idRef", "isSubMenuItem", "TouchRippleProps", "title", "focused", "focusVariant"]);
|
|
21
20
|
var isCheckedType = type === 'checked';
|
|
22
21
|
var menuItemId = useId('menu-item', true);
|
|
23
22
|
var menuContext = useContext(RcMenuContext);
|
|
@@ -105,11 +104,16 @@ var _RcMenuItem = forwardRef(function (inProps, ref) {
|
|
|
105
104
|
children,
|
|
106
105
|
itemSubAction));
|
|
107
106
|
});
|
|
108
|
-
var RcMenuItem = styled(withTooltip(_RcMenuItem))(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
107
|
+
var RcMenuItem = styled(withTooltip(_RcMenuItem)).attrs(function (inProps) {
|
|
108
|
+
var _a = useThemeProps({ props: inProps, name: 'RcMenuItem' }),
|
|
109
|
+
// @ts-ignore
|
|
110
|
+
theme = _a.theme,
|
|
111
|
+
// Omit className, prevent duplicate className
|
|
112
|
+
className = _a.className, _b = _a.size, size = _b === void 0 ? 'medium' : _b, _c = _a.button, button = _c === void 0 ? true : _c, _d = _a.focusVariant, focusVariant = _d === void 0 ? 'highlight' : _d, rest = __rest(_a, ["theme", "className", "size", "button", "focusVariant"]);
|
|
113
|
+
return __assign({ size: size,
|
|
114
|
+
button: button,
|
|
115
|
+
focusVariant: focusVariant }, rest);
|
|
116
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), MenuItemStyle);
|
|
113
117
|
RcMenuItem.displayName = 'RcMenuItem';
|
|
114
118
|
export { RcMenuItem };
|
|
115
119
|
var templateObject_1;
|
|
@@ -5,11 +5,11 @@ import { sharedListItemStyle } from '../../../List/ListItem/styles';
|
|
|
5
5
|
import { RcMenuItemClasses, RcMenuItemLeftAndRightPaddings, RcMenuItemRippleClasses, RcMenuItemTopAndBottomPaddings, } from '../utils';
|
|
6
6
|
export var StyledCheckIcon = styled(RcIcon)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 22px;\n"], ["\n height: 22px;\n"])));
|
|
7
7
|
export var MenuItemStyle = function (props) {
|
|
8
|
-
var size = props.size, _a = props.color, color = _a === void 0 ? 'action.grayLight' : _a;
|
|
8
|
+
var size = props.size, _a = props.color, color = _a === void 0 ? 'action.grayLight' : _a, focusVariant = props.focusVariant;
|
|
9
9
|
var topAndBottomPadding = RcMenuItemTopAndBottomPaddings[size];
|
|
10
10
|
var leftAndRightPadding = RcMenuItemLeftAndRightPaddings[size];
|
|
11
11
|
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n outline: none;\n box-sizing: border-box;\n height: auto;\n min-height: 32px;\n min-width: 112px;\n padding-top: ", ";\n padding-bottom: ", ";\n\n ", ";\n\n .", " {\n padding-left: ", ";\n padding-right: ", ";\n }\n\n &.", " {\n padding-top: ", ";\n padding-bottom: ", ";\n min-height: auto;\n line-height: 22px;\n font-weight: 700;\n }\n "], ["\n outline: none;\n box-sizing: border-box;\n height: auto;\n min-height: 32px;\n min-width: 112px;\n padding-top: ", ";\n padding-bottom: ", ";\n\n ",
|
|
12
|
-
";\n\n .", " {\n padding-left: ", ";\n padding-right: ", ";\n }\n\n &.", " {\n padding-top: ", ";\n padding-bottom: ", ";\n min-height: auto;\n line-height: 22px;\n font-weight: 700;\n }\n "])), topAndBottomPadding, topAndBottomPadding, sharedListItemStyle(__assign(__assign({}, props), { color: color,
|
|
12
|
+
";\n\n .", " {\n padding-left: ", ";\n padding-right: ", ";\n }\n\n &.", " {\n padding-top: ", ";\n padding-bottom: ", ";\n min-height: auto;\n line-height: 22px;\n font-weight: 700;\n }\n "])), topAndBottomPadding, topAndBottomPadding, sharedListItemStyle(__assign(__assign({}, props), { focusVariant: focusVariant, color: color,
|
|
13
13
|
// in menuItem always be can hover
|
|
14
14
|
canHover: true, mainClasses: RcMenuItemClasses, rippleClasses: RcMenuItemRippleClasses })), RcMenuItemClasses.gutters, leftAndRightPadding, leftAndRightPadding, RcMenuItemClasses.dense, spacing(1), spacing(1));
|
|
15
15
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { __makeTemplateObject } from "tslib";
|
|
2
|
+
import { css } from '../styled-components';
|
|
3
|
+
import { palette2 } from './newPalette';
|
|
4
|
+
var focusRingOffsetMap = {
|
|
5
|
+
normal: '2px',
|
|
6
|
+
inset: '-2px',
|
|
7
|
+
};
|
|
8
|
+
export var focusRing = function (variant) {
|
|
9
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n outline-color: ", ";\n outline-width: 2px;\n outline-style: solid;\n outline-offset: ", ";\n "], ["\n outline-color: ", ";\n outline-width: 2px;\n outline-style: solid;\n outline-offset: ", ";\n "])), palette2('interactive', 'b02'), focusRingOffsetMap[variant]);
|
|
10
|
+
};
|
|
11
|
+
var templateObject_1;
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var styled_components_1 = require("../styled-components");
|
|
5
|
+
var newPalette_1 = require("./newPalette");
|
|
6
|
+
var focusRingOffsetMap = {
|
|
7
|
+
normal: '2px',
|
|
8
|
+
inset: '-2px',
|
|
9
|
+
};
|
|
10
|
+
exports.focusRing = function (variant) {
|
|
11
|
+
return styled_components_1.css(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n outline-color: ", ";\n outline-width: 2px;\n outline-style: solid;\n outline-offset: ", ";\n "], ["\n outline-color: ", ";\n outline-width: 2px;\n outline-style: solid;\n outline-offset: ", ";\n "])), newPalette_1.palette2('interactive', 'b02'), focusRingOffsetMap[variant]);
|
|
12
|
+
};
|
|
13
|
+
var templateObject_1;
|
|
@@ -7,6 +7,7 @@ tslib_1.__exportStar(require("./ellipsis"), exports);
|
|
|
7
7
|
tslib_1.__exportStar(require("./fakeBorder"), exports);
|
|
8
8
|
tslib_1.__exportStar(require("./flexCenter"), exports);
|
|
9
9
|
tslib_1.__exportStar(require("./flexWidth"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./focusRing"), exports);
|
|
10
11
|
tslib_1.__exportStar(require("./focusVisible"), exports);
|
|
11
12
|
tslib_1.__exportStar(require("./lineClamp"), exports);
|
|
12
13
|
tslib_1.__exportStar(require("./newPalette"), exports);
|