@ringcentral/juno 2.12.4 → 2.14.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/Dialog/styles/DialogStyle.js +9 -3
- package/components/Dialog/utils/DialogUtils.js +8 -1
- package/components/Forms/Select/Select.js +2 -2
- package/es6/components/Dialog/styles/DialogStyle.js +10 -4
- package/es6/components/Dialog/utils/DialogUtils.js +8 -1
- package/es6/components/Forms/Select/Select.js +2 -2
- package/package.json +1 -1
|
@@ -4,7 +4,13 @@ var tslib_1 = require("tslib");
|
|
|
4
4
|
var foundation_1 = require("../../../foundation");
|
|
5
5
|
var utils_1 = require("../utils");
|
|
6
6
|
exports.DialogStyle = function (props) {
|
|
7
|
-
var size = props.size;
|
|
8
|
-
return foundation_1.css(
|
|
7
|
+
var size = props.size, theme = props.theme, fullScreen = props.fullScreen;
|
|
8
|
+
return foundation_1.css(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n .", " {\n max-width: ", ";\n }\n\n ", "\n "], ["\n .", " {\n max-width: ", ";\n }\n\n "
|
|
9
|
+
// make sure `fullScreen` can work correctly when `maxWidth` is `xs`
|
|
10
|
+
,
|
|
11
|
+
"\n "])), utils_1.RcDialogClasses.paper, utils_1.RcDialogMaxWidths[size],
|
|
12
|
+
// make sure `fullScreen` can work correctly when `maxWidth` is `xs`
|
|
13
|
+
!fullScreen && foundation_1.css(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n .", " {\n max-width: ", ";\n\n &.", " {\n ", " {\n max-width: calc(100% - 64px);\n }\n }\n }\n "], ["\n .", " {\n max-width: ", ";\n\n &.", " {\n ",
|
|
14
|
+
" {\n max-width: calc(100% - 64px);\n }\n }\n }\n "])), utils_1.RcDialogClasses.paperWidthXs, foundation_1.px(Math.max(theme.breakpoints.values.xs, 400)), utils_1.RcDialogClasses.paperScrollBody, theme.breakpoints.down(Math.max(theme.breakpoints.values.xs, 400) + 32 * 2)));
|
|
9
15
|
};
|
|
10
|
-
var templateObject_1;
|
|
16
|
+
var templateObject_1, templateObject_2;
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var foundation_1 = require("../../../foundation");
|
|
4
|
-
exports.RcDialogClasses = foundation_1.RcClasses([
|
|
4
|
+
exports.RcDialogClasses = foundation_1.RcClasses([
|
|
5
|
+
'paper',
|
|
6
|
+
'root',
|
|
7
|
+
'paperFullScreen',
|
|
8
|
+
'paperWidthXs',
|
|
9
|
+
'paperScrollBody',
|
|
10
|
+
'paperFullScreen',
|
|
11
|
+
], 'RcDialog');
|
|
5
12
|
exports.RcDialogMaxWidths = {
|
|
6
13
|
xsmall: '272px',
|
|
7
14
|
small: null,
|
|
@@ -16,7 +16,7 @@ var _RcSelect = react_1.forwardRef(function (inProps, ref) {
|
|
|
16
16
|
var props = foundation_1.useThemeProps({ props: inProps, name: 'RcSelect' });
|
|
17
17
|
var children = props.children, onChange = props.onChange, defaultValue = props.defaultValue, SelectInputPropsProp = props.SelectInputProps, MenuProps = props.MenuProps, textVariant = props.textVariant, placeholder = props.placeholder, renderValue = props.renderValue, displayEmpty = props.displayEmpty, variant = props.variant, size = props.size, value = props.value, virtualize = props.virtualize,
|
|
18
18
|
// * below is should pick into TextField props
|
|
19
|
-
focused = props.focused, gutterBottom = props.gutterBottom, helperText = props.helperText, color = props.color, label = props.label, id = props.id, className = props.className, validate = props.validate, InputProps = props.InputProps, required = props.required, fullWidth = props.fullWidth, disabled = props.disabled, error = props.error, rest = tslib_1.__rest(props, ["children", "onChange", "defaultValue", "SelectInputProps", "MenuProps", "textVariant", "placeholder", "renderValue", "displayEmpty", "variant", "size", "value", "virtualize", "focused", "gutterBottom", "helperText", "color", "label", "id", "className", "validate", "InputProps", "required", "fullWidth", "disabled", "error"]);
|
|
19
|
+
focused = props.focused, gutterBottom = props.gutterBottom, helperText = props.helperText, color = props.color, label = props.label, id = props.id, className = props.className, title = props.title, validate = props.validate, InputProps = props.InputProps, required = props.required, fullWidth = props.fullWidth, disabled = props.disabled, error = props.error, rest = tslib_1.__rest(props, ["children", "onChange", "defaultValue", "SelectInputProps", "MenuProps", "textVariant", "placeholder", "renderValue", "displayEmpty", "variant", "size", "value", "virtualize", "focused", "gutterBottom", "helperText", "color", "label", "id", "className", "title", "validate", "InputProps", "required", "fullWidth", "disabled", "error"]);
|
|
20
20
|
var hasDefaultValue = foundation_1.hasValue(defaultValue);
|
|
21
21
|
var nonValue = (!foundation_1.hasValue(value) && !hasDefaultValue) ||
|
|
22
22
|
// * if that can't displayEmpty, and that value === '', same as no value
|
|
@@ -70,7 +70,7 @@ var _RcSelect = react_1.forwardRef(function (inProps, ref) {
|
|
|
70
70
|
}, [InputProps, placeholder, nonValue, applyClasses, variant]);
|
|
71
71
|
var valueIsNumber = typeof value === 'number';
|
|
72
72
|
var currValue = valueIsNumber ? value : value || '';
|
|
73
|
-
return (react_1.default.createElement(utils_1.RcSelectTextField, { ref: ref, id: id, className: className,
|
|
73
|
+
return (react_1.default.createElement(utils_1.RcSelectTextField, { ref: ref, id: id, className: className, title: title,
|
|
74
74
|
// for when that is select type that type will be select onChange, just any for ignore that
|
|
75
75
|
onChange: onChange, color: color, select: true, focused: focused, gutterBottom: gutterBottom, helperText: helperText, label: label,
|
|
76
76
|
// when that has defaultValue, and that value always to be undefined
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { __makeTemplateObject } from "tslib";
|
|
2
|
-
import { css } from '../../../foundation';
|
|
2
|
+
import { css, px } from '../../../foundation';
|
|
3
3
|
import { RcDialogClasses, RcDialogMaxWidths } from '../utils';
|
|
4
4
|
export var DialogStyle = function (props) {
|
|
5
|
-
var size = props.size;
|
|
6
|
-
return css(
|
|
5
|
+
var size = props.size, theme = props.theme, fullScreen = props.fullScreen;
|
|
6
|
+
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n .", " {\n max-width: ", ";\n }\n\n ", "\n "], ["\n .", " {\n max-width: ", ";\n }\n\n "
|
|
7
|
+
// make sure `fullScreen` can work correctly when `maxWidth` is `xs`
|
|
8
|
+
,
|
|
9
|
+
"\n "])), RcDialogClasses.paper, RcDialogMaxWidths[size],
|
|
10
|
+
// make sure `fullScreen` can work correctly when `maxWidth` is `xs`
|
|
11
|
+
!fullScreen && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .", " {\n max-width: ", ";\n\n &.", " {\n ", " {\n max-width: calc(100% - 64px);\n }\n }\n }\n "], ["\n .", " {\n max-width: ", ";\n\n &.", " {\n ",
|
|
12
|
+
" {\n max-width: calc(100% - 64px);\n }\n }\n }\n "])), RcDialogClasses.paperWidthXs, px(Math.max(theme.breakpoints.values.xs, 400)), RcDialogClasses.paperScrollBody, theme.breakpoints.down(Math.max(theme.breakpoints.values.xs, 400) + 32 * 2)));
|
|
7
13
|
};
|
|
8
|
-
var templateObject_1;
|
|
14
|
+
var templateObject_1, templateObject_2;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { RcClasses } from '../../../foundation';
|
|
2
|
-
export var RcDialogClasses = RcClasses([
|
|
2
|
+
export var RcDialogClasses = RcClasses([
|
|
3
|
+
'paper',
|
|
4
|
+
'root',
|
|
5
|
+
'paperFullScreen',
|
|
6
|
+
'paperWidthXs',
|
|
7
|
+
'paperScrollBody',
|
|
8
|
+
'paperFullScreen',
|
|
9
|
+
], 'RcDialog');
|
|
3
10
|
export var RcDialogMaxWidths = {
|
|
4
11
|
xsmall: '272px',
|
|
5
12
|
small: null,
|
|
@@ -14,7 +14,7 @@ var _RcSelect = forwardRef(function (inProps, ref) {
|
|
|
14
14
|
var props = useThemeProps({ props: inProps, name: 'RcSelect' });
|
|
15
15
|
var children = props.children, onChange = props.onChange, defaultValue = props.defaultValue, SelectInputPropsProp = props.SelectInputProps, MenuProps = props.MenuProps, textVariant = props.textVariant, placeholder = props.placeholder, renderValue = props.renderValue, displayEmpty = props.displayEmpty, variant = props.variant, size = props.size, value = props.value, virtualize = props.virtualize,
|
|
16
16
|
// * below is should pick into TextField props
|
|
17
|
-
focused = props.focused, gutterBottom = props.gutterBottom, helperText = props.helperText, color = props.color, label = props.label, id = props.id, className = props.className, validate = props.validate, InputProps = props.InputProps, required = props.required, fullWidth = props.fullWidth, disabled = props.disabled, error = props.error, rest = __rest(props, ["children", "onChange", "defaultValue", "SelectInputProps", "MenuProps", "textVariant", "placeholder", "renderValue", "displayEmpty", "variant", "size", "value", "virtualize", "focused", "gutterBottom", "helperText", "color", "label", "id", "className", "validate", "InputProps", "required", "fullWidth", "disabled", "error"]);
|
|
17
|
+
focused = props.focused, gutterBottom = props.gutterBottom, helperText = props.helperText, color = props.color, label = props.label, id = props.id, className = props.className, title = props.title, validate = props.validate, InputProps = props.InputProps, required = props.required, fullWidth = props.fullWidth, disabled = props.disabled, error = props.error, rest = __rest(props, ["children", "onChange", "defaultValue", "SelectInputProps", "MenuProps", "textVariant", "placeholder", "renderValue", "displayEmpty", "variant", "size", "value", "virtualize", "focused", "gutterBottom", "helperText", "color", "label", "id", "className", "title", "validate", "InputProps", "required", "fullWidth", "disabled", "error"]);
|
|
18
18
|
var hasDefaultValue = hasValue(defaultValue);
|
|
19
19
|
var nonValue = (!hasValue(value) && !hasDefaultValue) ||
|
|
20
20
|
// * if that can't displayEmpty, and that value === '', same as no value
|
|
@@ -68,7 +68,7 @@ var _RcSelect = forwardRef(function (inProps, ref) {
|
|
|
68
68
|
}, [InputProps, placeholder, nonValue, applyClasses, variant]);
|
|
69
69
|
var valueIsNumber = typeof value === 'number';
|
|
70
70
|
var currValue = valueIsNumber ? value : value || '';
|
|
71
|
-
return (React.createElement(RcSelectTextField, { ref: ref, id: id, className: className,
|
|
71
|
+
return (React.createElement(RcSelectTextField, { ref: ref, id: id, className: className, title: title,
|
|
72
72
|
// for when that is select type that type will be select onChange, just any for ignore that
|
|
73
73
|
onChange: onChange, color: color, select: true, focused: focused, gutterBottom: gutterBottom, helperText: helperText, label: label,
|
|
74
74
|
// when that has defaultValue, and that value always to be undefined
|