@ringcentral/juno 2.29.0 → 2.30.1
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/Forms/TextField/styles/TextFieldStyle.js +3 -3
- package/components/Presence/Presence.js +2 -9
- package/es6/components/Forms/TextField/styles/TextFieldStyle.js +4 -4
- package/es6/components/Presence/Presence.js +3 -10
- package/package.json +1 -1
- package/components/Presence/styles/StyledCircle.d.ts +0 -8
- package/components/Presence/styles/StyledCircle.js +0 -20
- package/es6/components/Presence/styles/StyledCircle.js +0 -18
|
@@ -23,9 +23,9 @@ exports.TextFieldStyle = function (props) {
|
|
|
23
23
|
var labelRootColor = foundation_1.getParsePaletteColor(colorProp, idleColor);
|
|
24
24
|
var underlineColor = foundation_1.getParsePaletteColor(colorProp, foundation_1.palette2('neutral', 'f02'));
|
|
25
25
|
var underlineFocusColor = foundation_1.getParsePaletteColor(colorProp, foundation_1.palette2('neutral', 'f06'));
|
|
26
|
-
return foundation_1.css(templateObject_5 || (templateObject_5 = tslib_1.__makeTemplateObject(["\n ", ";\n\n width: ", ";\n\n ", ";\n\n .", " {\n ", ";\n color: ", ";\n transform: scale(1);\n }\n\n .", " {\n color: ", ";\n }\n\n .", " {\n color: ", ";\n\n ", " {\n display: none;\n }\n }\n\n ", ";\n\n .", " {\n ", ";\n text-align: ", ";\n\n ::placeholder {\n color: ", ";\n opacity: 1;\n }\n\n ", ";\n }\n\n .", " {\n &:before {\n border-bottom-color: ", ";\n }\n\n ", " {\n &:hover:not(.", ") {\n &:before {\n border-bottom-color: ", ";\n }\n }\n }\n\n &:after {\n border-bottom-color: ", ";\n }\n }\n\n .", " {\n &:after {\n border-bottom-color: ", ";\n }\n }\n\n .", " {\n color: ", ";\n // * safari need that in disabled input\n -webkit-text-fill-color: ", ";\n ::placeholder {\n color: ", ";\n }\n &:before {\n border-bottom-style: solid;\n border-bottom-color: ", ";\n }\n &:after {\n border-bottom-style: none;\n }\n }\n\n .", " {\n ", ";\n color: ", ";\n }\n\n .", ",\n .", " {\n color: ", ";\n }\n\n .", ",\n .", " {\n color: ", ";\n }\n\n /* clears the 'X' from Internet Explorer */\n input[type='search']::-ms-clear,\n input[type='search']::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n\n /* clears the 'X' from Chrome */\n input[type='search']::-webkit-search-decoration,\n input[type='search']::-webkit-search-cancel-button,\n input[type='search']::-webkit-search-results-button,\n input[type='search']::-webkit-search-results-decoration {\n display: none;\n }\n\n ", "\n "], ["\n ", ";\n\n width: ", ";\n\n ",
|
|
27
|
-
";\n\n .", " {\n ", ";\n color: ", ";\n transform: scale(1);\n }\n\n .", " {\n color: ", ";\n }\n\n .", " {\n color: ", ";\n\n ", " {\n display: none;\n }\n }\n\n ", ";\n\n .", " {\n ", ";\n text-align: ", ";\n\n ::placeholder {\n color: ", ";\n opacity: 1;\n }\n\n ",
|
|
28
|
-
";\n }\n\n .", " {\n &:before {\n border-bottom-color: ", ";\n }\n\n ", " {\n &:hover:not(.", ") {\n &:before {\n border-bottom-color: ", ";\n }\n }\n }\n\n &:after {\n border-bottom-color: ", ";\n }\n }\n\n .", " {\n &:after {\n border-bottom-color: ", ";\n }\n }\n\n .", " {\n color: ", ";\n // * safari need that in disabled input\n -webkit-text-fill-color: ", ";\n ::placeholder {\n color: ", ";\n }\n &:before {\n border-bottom-style: solid;\n border-bottom-color: ", ";\n }\n &:after {\n border-bottom-style: none;\n }\n }\n\n .", " {\n ", ";\n color: ", ";\n }\n\n .", ",\n .", " {\n color: ", ";\n }\n\n .", ",\n .", " {\n color: ", ";\n }\n\n /* clears the 'X' from Internet Explorer */\n input[type='search']::-ms-clear,\n input[type='search']::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n\n /* clears the 'X' from Chrome */\n input[type='search']::-webkit-search-decoration,\n input[type='search']::-webkit-search-cancel-button,\n input[type='search']::-webkit-search-results-button,\n input[type='search']::-webkit-search-results-decoration {\n display: none;\n }\n\n ", "\n "])), utils_2.belowIconButtonSpacing(foundation_1.spacing(3)), !fullWidth && exports.RcDefaultTextFieldWidth, gutterBottom && foundation_1.css(templateObject_3 || (templateObject_3 = tslib_1.__makeTemplateObject(["\n &.", " {\n margin: 0 0 ", " 0;\n }\n "], ["\n &.", " {\n margin: 0 0 ", " 0;\n }\n "])), utils_2.RcTextFieldClasses.root, foundation_1.spacing(4)), utils_2.RcTextFieldInputLabelClasses.root, foundation_1.typography('caption2'), labelRootColor, utils_2.RcTextFieldInputLabelClasses.focused, color, utils_2.RcTextFieldInputClasses.root, exports.textColor, ClearIconButton_1.ClearIconButton, showClean && exports.clearBtnInactiveStyle, utils_2.RcTextFieldInputClasses.input, foundation_1.typography(variant === 'borderLess' ? textVariant : 'subheading1'), align, exports.placeholderColor, clearBtn &&
|
|
26
|
+
return foundation_1.css(templateObject_5 || (templateObject_5 = tslib_1.__makeTemplateObject(["\n ", ";\n\n width: ", ";\n\n ", ";\n\n .", " {\n ", ";\n color: ", ";\n transform: scale(1);\n }\n\n .", " {\n color: ", ";\n }\n\n .", " {\n color: ", ";\n\n ", " {\n display: none;\n }\n }\n\n ", ";\n\n .", " {\n ", ";\n text-align: ", ";\n\n ::placeholder {\n color: ", ";\n opacity: 1;\n }\n\n &:placeholder-shown {\n ", "\n }\n\n ", ";\n }\n\n .", " {\n &:before {\n border-bottom-color: ", ";\n }\n\n ", " {\n &:hover:not(.", ") {\n &:before {\n border-bottom-color: ", ";\n }\n }\n }\n\n &:after {\n border-bottom-color: ", ";\n }\n }\n\n .", " {\n &:after {\n border-bottom-color: ", ";\n }\n }\n\n .", " {\n color: ", ";\n // * safari need that in disabled input\n -webkit-text-fill-color: ", ";\n ::placeholder {\n color: ", ";\n }\n &:before {\n border-bottom-style: solid;\n border-bottom-color: ", ";\n }\n &:after {\n border-bottom-style: none;\n }\n }\n\n .", " {\n ", ";\n color: ", ";\n }\n\n .", ",\n .", " {\n color: ", ";\n }\n\n .", ",\n .", " {\n color: ", ";\n }\n\n /* clears the 'X' from Internet Explorer */\n input[type='search']::-ms-clear,\n input[type='search']::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n\n /* clears the 'X' from Chrome */\n input[type='search']::-webkit-search-decoration,\n input[type='search']::-webkit-search-cancel-button,\n input[type='search']::-webkit-search-results-button,\n input[type='search']::-webkit-search-results-decoration {\n display: none;\n }\n\n ", "\n "], ["\n ", ";\n\n width: ", ";\n\n ",
|
|
27
|
+
";\n\n .", " {\n ", ";\n color: ", ";\n transform: scale(1);\n }\n\n .", " {\n color: ", ";\n }\n\n .", " {\n color: ", ";\n\n ", " {\n display: none;\n }\n }\n\n ", ";\n\n .", " {\n ", ";\n text-align: ", ";\n\n ::placeholder {\n color: ", ";\n opacity: 1;\n }\n\n &:placeholder-shown {\n ", "\n }\n\n ",
|
|
28
|
+
";\n }\n\n .", " {\n &:before {\n border-bottom-color: ", ";\n }\n\n ", " {\n &:hover:not(.", ") {\n &:before {\n border-bottom-color: ", ";\n }\n }\n }\n\n &:after {\n border-bottom-color: ", ";\n }\n }\n\n .", " {\n &:after {\n border-bottom-color: ", ";\n }\n }\n\n .", " {\n color: ", ";\n // * safari need that in disabled input\n -webkit-text-fill-color: ", ";\n ::placeholder {\n color: ", ";\n }\n &:before {\n border-bottom-style: solid;\n border-bottom-color: ", ";\n }\n &:after {\n border-bottom-style: none;\n }\n }\n\n .", " {\n ", ";\n color: ", ";\n }\n\n .", ",\n .", " {\n color: ", ";\n }\n\n .", ",\n .", " {\n color: ", ";\n }\n\n /* clears the 'X' from Internet Explorer */\n input[type='search']::-ms-clear,\n input[type='search']::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n\n /* clears the 'X' from Chrome */\n input[type='search']::-webkit-search-decoration,\n input[type='search']::-webkit-search-cancel-button,\n input[type='search']::-webkit-search-results-button,\n input[type='search']::-webkit-search-results-decoration {\n display: none;\n }\n\n ", "\n "])), utils_2.belowIconButtonSpacing(foundation_1.spacing(3)), !fullWidth && exports.RcDefaultTextFieldWidth, gutterBottom && foundation_1.css(templateObject_3 || (templateObject_3 = tslib_1.__makeTemplateObject(["\n &.", " {\n margin: 0 0 ", " 0;\n }\n "], ["\n &.", " {\n margin: 0 0 ", " 0;\n }\n "])), utils_2.RcTextFieldClasses.root, foundation_1.spacing(4)), utils_2.RcTextFieldInputLabelClasses.root, foundation_1.typography('caption2'), labelRootColor, utils_2.RcTextFieldInputLabelClasses.focused, color, utils_2.RcTextFieldInputClasses.root, exports.textColor, ClearIconButton_1.ClearIconButton, showClean && exports.clearBtnInactiveStyle, utils_2.RcTextFieldInputClasses.input, foundation_1.typography(variant === 'borderLess' ? textVariant : 'subheading1'), align, exports.placeholderColor, foundation_1.ellipsis, clearBtn &&
|
|
29
29
|
align &&
|
|
30
30
|
align !== 'left' && foundation_1.css(templateObject_4 || (templateObject_4 = tslib_1.__makeTemplateObject(["\n width: calc(100% - ", ");\n "], ["\n width: calc(100% - ", ");\n "])), foundation_1.px(utils_1.RcIconButtonSizes[size])), utils_2.RcTextFieldInputClasses.underline, underlineColor, foundation_1.nonTouchHoverMedia, utils_2.RcTextFieldInputClasses.disabled, underlineFocusColor, color, utils_2.RcTextFieldInputClasses.error, errorColor, utils_2.RcTextFieldInputClasses.disabled, exports.disabledColor, exports.disabledColor, exports.disabledColor, exports.disabledColor, utils_2.RcTextFieldFormHelperTextClasses.root, foundation_1.typography('caption1'), idleColor, utils_2.RcTextFieldFormHelperTextClasses.error, utils_2.RcTextFieldInputLabelClasses.error, errorTextColor, utils_2.RcTextFieldFormHelperTextClasses.disabled, utils_2.RcTextFieldInputLabelClasses.disabled, exports.disabledColor, variant === 'outline' && OutlineTextFieldStyle_1.OutlineTextFieldStyle);
|
|
31
31
|
};
|
|
@@ -7,21 +7,15 @@ var Icon_1 = require("../Icon");
|
|
|
7
7
|
var assets_1 = require("./assets");
|
|
8
8
|
var styles_1 = require("./styles");
|
|
9
9
|
var juno_icon_1 = require("@ringcentral/juno-icon");
|
|
10
|
-
var utils_1 = require("./utils");
|
|
11
|
-
var StyledCircle_1 = require("./styles/StyledCircle");
|
|
12
10
|
var _RcPresence = react_1.forwardRef(function (inProps, ref) {
|
|
13
11
|
var props = foundation_1.useThemeProps({ props: inProps, name: 'RcPresence' });
|
|
14
|
-
var type = props.type
|
|
12
|
+
var type = props.type;
|
|
15
13
|
var symbol = (function () {
|
|
16
14
|
switch (type) {
|
|
17
15
|
case 'DND':
|
|
18
16
|
return juno_icon_1.PresenceDnd;
|
|
19
17
|
case 'available':
|
|
20
18
|
return juno_icon_1.PresenceAvailable;
|
|
21
|
-
case 'offline':
|
|
22
|
-
case 'unavailable':
|
|
23
|
-
case 'notReady':
|
|
24
|
-
return juno_icon_1.PresenceOffline;
|
|
25
19
|
case 'attended':
|
|
26
20
|
return assets_1.Attended;
|
|
27
21
|
case 'unAttended':
|
|
@@ -30,9 +24,8 @@ var _RcPresence = react_1.forwardRef(function (inProps, ref) {
|
|
|
30
24
|
return null;
|
|
31
25
|
}
|
|
32
26
|
})();
|
|
33
|
-
var showUnAvailable = utils_1.UnAvailableIconType[type];
|
|
34
27
|
var symbolElm = symbol ? (react_1.default.createElement(Icon_1.RcIcon, { symbol: symbol, color: "neutral.f01", size: "inherit" })) : null;
|
|
35
|
-
return (react_1.default.createElement(styles_1.StyledPresence, tslib_1.__assign({ ref: ref }, props),
|
|
28
|
+
return (react_1.default.createElement(styles_1.StyledPresence, tslib_1.__assign({ ref: ref }, props), symbolElm));
|
|
36
29
|
});
|
|
37
30
|
/** @release */
|
|
38
31
|
var RcPresence = foundation_1.styled(_RcPresence)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject([""], [""])));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __makeTemplateObject } from "tslib";
|
|
2
|
-
import { css, getParsePaletteColor, isFilled, nonTouchHoverMedia, palette2, px, spacing, typography, } from '../../../../foundation';
|
|
2
|
+
import { css, getParsePaletteColor, isFilled, nonTouchHoverMedia, palette2, px, ellipsis, spacing, typography, } from '../../../../foundation';
|
|
3
3
|
import { RcIconButtonSizes } from '../../../Buttons/IconButton/utils';
|
|
4
4
|
import { belowIconButtonSpacing, RcTextFieldClasses, RcTextFieldFormHelperTextClasses, RcTextFieldInputClasses, RcTextFieldInputLabelClasses, } from '../utils';
|
|
5
5
|
import { ClearIconButton } from './ClearIconButton';
|
|
@@ -21,9 +21,9 @@ export var TextFieldStyle = function (props) {
|
|
|
21
21
|
var labelRootColor = getParsePaletteColor(colorProp, idleColor);
|
|
22
22
|
var underlineColor = getParsePaletteColor(colorProp, palette2('neutral', 'f02'));
|
|
23
23
|
var underlineFocusColor = getParsePaletteColor(colorProp, palette2('neutral', 'f06'));
|
|
24
|
-
return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", ";\n\n width: ", ";\n\n ", ";\n\n .", " {\n ", ";\n color: ", ";\n transform: scale(1);\n }\n\n .", " {\n color: ", ";\n }\n\n .", " {\n color: ", ";\n\n ", " {\n display: none;\n }\n }\n\n ", ";\n\n .", " {\n ", ";\n text-align: ", ";\n\n ::placeholder {\n color: ", ";\n opacity: 1;\n }\n\n ", ";\n }\n\n .", " {\n &:before {\n border-bottom-color: ", ";\n }\n\n ", " {\n &:hover:not(.", ") {\n &:before {\n border-bottom-color: ", ";\n }\n }\n }\n\n &:after {\n border-bottom-color: ", ";\n }\n }\n\n .", " {\n &:after {\n border-bottom-color: ", ";\n }\n }\n\n .", " {\n color: ", ";\n // * safari need that in disabled input\n -webkit-text-fill-color: ", ";\n ::placeholder {\n color: ", ";\n }\n &:before {\n border-bottom-style: solid;\n border-bottom-color: ", ";\n }\n &:after {\n border-bottom-style: none;\n }\n }\n\n .", " {\n ", ";\n color: ", ";\n }\n\n .", ",\n .", " {\n color: ", ";\n }\n\n .", ",\n .", " {\n color: ", ";\n }\n\n /* clears the 'X' from Internet Explorer */\n input[type='search']::-ms-clear,\n input[type='search']::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n\n /* clears the 'X' from Chrome */\n input[type='search']::-webkit-search-decoration,\n input[type='search']::-webkit-search-cancel-button,\n input[type='search']::-webkit-search-results-button,\n input[type='search']::-webkit-search-results-decoration {\n display: none;\n }\n\n ", "\n "], ["\n ", ";\n\n width: ", ";\n\n ",
|
|
25
|
-
";\n\n .", " {\n ", ";\n color: ", ";\n transform: scale(1);\n }\n\n .", " {\n color: ", ";\n }\n\n .", " {\n color: ", ";\n\n ", " {\n display: none;\n }\n }\n\n ", ";\n\n .", " {\n ", ";\n text-align: ", ";\n\n ::placeholder {\n color: ", ";\n opacity: 1;\n }\n\n ",
|
|
26
|
-
";\n }\n\n .", " {\n &:before {\n border-bottom-color: ", ";\n }\n\n ", " {\n &:hover:not(.", ") {\n &:before {\n border-bottom-color: ", ";\n }\n }\n }\n\n &:after {\n border-bottom-color: ", ";\n }\n }\n\n .", " {\n &:after {\n border-bottom-color: ", ";\n }\n }\n\n .", " {\n color: ", ";\n // * safari need that in disabled input\n -webkit-text-fill-color: ", ";\n ::placeholder {\n color: ", ";\n }\n &:before {\n border-bottom-style: solid;\n border-bottom-color: ", ";\n }\n &:after {\n border-bottom-style: none;\n }\n }\n\n .", " {\n ", ";\n color: ", ";\n }\n\n .", ",\n .", " {\n color: ", ";\n }\n\n .", ",\n .", " {\n color: ", ";\n }\n\n /* clears the 'X' from Internet Explorer */\n input[type='search']::-ms-clear,\n input[type='search']::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n\n /* clears the 'X' from Chrome */\n input[type='search']::-webkit-search-decoration,\n input[type='search']::-webkit-search-cancel-button,\n input[type='search']::-webkit-search-results-button,\n input[type='search']::-webkit-search-results-decoration {\n display: none;\n }\n\n ", "\n "])), belowIconButtonSpacing(spacing(3)), !fullWidth && RcDefaultTextFieldWidth, gutterBottom && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n &.", " {\n margin: 0 0 ", " 0;\n }\n "], ["\n &.", " {\n margin: 0 0 ", " 0;\n }\n "])), RcTextFieldClasses.root, spacing(4)), RcTextFieldInputLabelClasses.root, typography('caption2'), labelRootColor, RcTextFieldInputLabelClasses.focused, color, RcTextFieldInputClasses.root, textColor, ClearIconButton, showClean && clearBtnInactiveStyle, RcTextFieldInputClasses.input, typography(variant === 'borderLess' ? textVariant : 'subheading1'), align, placeholderColor, clearBtn &&
|
|
24
|
+
return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", ";\n\n width: ", ";\n\n ", ";\n\n .", " {\n ", ";\n color: ", ";\n transform: scale(1);\n }\n\n .", " {\n color: ", ";\n }\n\n .", " {\n color: ", ";\n\n ", " {\n display: none;\n }\n }\n\n ", ";\n\n .", " {\n ", ";\n text-align: ", ";\n\n ::placeholder {\n color: ", ";\n opacity: 1;\n }\n\n &:placeholder-shown {\n ", "\n }\n\n ", ";\n }\n\n .", " {\n &:before {\n border-bottom-color: ", ";\n }\n\n ", " {\n &:hover:not(.", ") {\n &:before {\n border-bottom-color: ", ";\n }\n }\n }\n\n &:after {\n border-bottom-color: ", ";\n }\n }\n\n .", " {\n &:after {\n border-bottom-color: ", ";\n }\n }\n\n .", " {\n color: ", ";\n // * safari need that in disabled input\n -webkit-text-fill-color: ", ";\n ::placeholder {\n color: ", ";\n }\n &:before {\n border-bottom-style: solid;\n border-bottom-color: ", ";\n }\n &:after {\n border-bottom-style: none;\n }\n }\n\n .", " {\n ", ";\n color: ", ";\n }\n\n .", ",\n .", " {\n color: ", ";\n }\n\n .", ",\n .", " {\n color: ", ";\n }\n\n /* clears the 'X' from Internet Explorer */\n input[type='search']::-ms-clear,\n input[type='search']::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n\n /* clears the 'X' from Chrome */\n input[type='search']::-webkit-search-decoration,\n input[type='search']::-webkit-search-cancel-button,\n input[type='search']::-webkit-search-results-button,\n input[type='search']::-webkit-search-results-decoration {\n display: none;\n }\n\n ", "\n "], ["\n ", ";\n\n width: ", ";\n\n ",
|
|
25
|
+
";\n\n .", " {\n ", ";\n color: ", ";\n transform: scale(1);\n }\n\n .", " {\n color: ", ";\n }\n\n .", " {\n color: ", ";\n\n ", " {\n display: none;\n }\n }\n\n ", ";\n\n .", " {\n ", ";\n text-align: ", ";\n\n ::placeholder {\n color: ", ";\n opacity: 1;\n }\n\n &:placeholder-shown {\n ", "\n }\n\n ",
|
|
26
|
+
";\n }\n\n .", " {\n &:before {\n border-bottom-color: ", ";\n }\n\n ", " {\n &:hover:not(.", ") {\n &:before {\n border-bottom-color: ", ";\n }\n }\n }\n\n &:after {\n border-bottom-color: ", ";\n }\n }\n\n .", " {\n &:after {\n border-bottom-color: ", ";\n }\n }\n\n .", " {\n color: ", ";\n // * safari need that in disabled input\n -webkit-text-fill-color: ", ";\n ::placeholder {\n color: ", ";\n }\n &:before {\n border-bottom-style: solid;\n border-bottom-color: ", ";\n }\n &:after {\n border-bottom-style: none;\n }\n }\n\n .", " {\n ", ";\n color: ", ";\n }\n\n .", ",\n .", " {\n color: ", ";\n }\n\n .", ",\n .", " {\n color: ", ";\n }\n\n /* clears the 'X' from Internet Explorer */\n input[type='search']::-ms-clear,\n input[type='search']::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n\n /* clears the 'X' from Chrome */\n input[type='search']::-webkit-search-decoration,\n input[type='search']::-webkit-search-cancel-button,\n input[type='search']::-webkit-search-results-button,\n input[type='search']::-webkit-search-results-decoration {\n display: none;\n }\n\n ", "\n "])), belowIconButtonSpacing(spacing(3)), !fullWidth && RcDefaultTextFieldWidth, gutterBottom && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n &.", " {\n margin: 0 0 ", " 0;\n }\n "], ["\n &.", " {\n margin: 0 0 ", " 0;\n }\n "])), RcTextFieldClasses.root, spacing(4)), RcTextFieldInputLabelClasses.root, typography('caption2'), labelRootColor, RcTextFieldInputLabelClasses.focused, color, RcTextFieldInputClasses.root, textColor, ClearIconButton, showClean && clearBtnInactiveStyle, RcTextFieldInputClasses.input, typography(variant === 'borderLess' ? textVariant : 'subheading1'), align, placeholderColor, ellipsis, clearBtn &&
|
|
27
27
|
align &&
|
|
28
28
|
align !== 'left' && css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n width: calc(100% - ", ");\n "], ["\n width: calc(100% - ", ");\n "])), px(RcIconButtonSizes[size])), RcTextFieldInputClasses.underline, underlineColor, nonTouchHoverMedia, RcTextFieldInputClasses.disabled, underlineFocusColor, color, RcTextFieldInputClasses.error, errorColor, RcTextFieldInputClasses.disabled, disabledColor, disabledColor, disabledColor, disabledColor, RcTextFieldFormHelperTextClasses.root, typography('caption1'), idleColor, RcTextFieldFormHelperTextClasses.error, RcTextFieldInputLabelClasses.error, errorTextColor, RcTextFieldFormHelperTextClasses.disabled, RcTextFieldInputLabelClasses.disabled, disabledColor, variant === 'outline' && OutlineTextFieldStyle);
|
|
29
29
|
};
|
|
@@ -4,22 +4,16 @@ import { styled, useThemeProps, } from '../../foundation';
|
|
|
4
4
|
import { RcIcon } from '../Icon';
|
|
5
5
|
import { Attended, Unattended } from './assets';
|
|
6
6
|
import { StyledPresence } from './styles';
|
|
7
|
-
import { PresenceAvailable, PresenceDnd
|
|
8
|
-
import { UnAvailableIconType } from './utils';
|
|
9
|
-
import { CircleDiv } from './styles/StyledCircle';
|
|
7
|
+
import { PresenceAvailable, PresenceDnd } from '@ringcentral/juno-icon';
|
|
10
8
|
var _RcPresence = forwardRef(function (inProps, ref) {
|
|
11
9
|
var props = useThemeProps({ props: inProps, name: 'RcPresence' });
|
|
12
|
-
var type = props.type
|
|
10
|
+
var type = props.type;
|
|
13
11
|
var symbol = (function () {
|
|
14
12
|
switch (type) {
|
|
15
13
|
case 'DND':
|
|
16
14
|
return PresenceDnd;
|
|
17
15
|
case 'available':
|
|
18
16
|
return PresenceAvailable;
|
|
19
|
-
case 'offline':
|
|
20
|
-
case 'unavailable':
|
|
21
|
-
case 'notReady':
|
|
22
|
-
return PresenceOffline;
|
|
23
17
|
case 'attended':
|
|
24
18
|
return Attended;
|
|
25
19
|
case 'unAttended':
|
|
@@ -28,9 +22,8 @@ var _RcPresence = forwardRef(function (inProps, ref) {
|
|
|
28
22
|
return null;
|
|
29
23
|
}
|
|
30
24
|
})();
|
|
31
|
-
var showUnAvailable = UnAvailableIconType[type];
|
|
32
25
|
var symbolElm = symbol ? (React.createElement(RcIcon, { symbol: symbol, color: "neutral.f01", size: "inherit" })) : null;
|
|
33
|
-
return (React.createElement(StyledPresence, __assign({ ref: ref }, props),
|
|
26
|
+
return (React.createElement(StyledPresence, __assign({ ref: ref }, props), symbolElm));
|
|
34
27
|
});
|
|
35
28
|
/** @release */
|
|
36
29
|
var RcPresence = styled(_RcPresence)(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
/// <reference types="styled-jsx" />
|
|
3
|
-
import { RcPresenceSize } from '../Presence';
|
|
4
|
-
declare type StyledCircleParams = {
|
|
5
|
-
size: RcPresenceSize;
|
|
6
|
-
};
|
|
7
|
-
export declare const CircleDiv: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & StyledCircleParams, import("../../../foundation").RcTheme, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & StyledCircleParams>;
|
|
8
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var tslib_1 = require("tslib");
|
|
4
|
-
var foundation_1 = require("../../../foundation");
|
|
5
|
-
var InnerSizes = {
|
|
6
|
-
xxsmall: 6,
|
|
7
|
-
xsmall: 6,
|
|
8
|
-
small: 8,
|
|
9
|
-
medium: 8,
|
|
10
|
-
large: 12,
|
|
11
|
-
xlarge: 16,
|
|
12
|
-
};
|
|
13
|
-
exports.CircleDiv = foundation_1.styled.div(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n height: ", "px;\n width: ", "px;\n background: ", ";\n border-radius: 50%;\n justify-content: center;\n"], ["\n height: ", "px;\n width: ", "px;\n background: ", ";\n border-radius: 50%;\n justify-content: center;\n"])), function (_a) {
|
|
14
|
-
var size = _a.size;
|
|
15
|
-
return InnerSizes[size];
|
|
16
|
-
}, function (_a) {
|
|
17
|
-
var size = _a.size;
|
|
18
|
-
return InnerSizes[size];
|
|
19
|
-
}, foundation_1.palette2('neutral', 'f01'));
|
|
20
|
-
var templateObject_1;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { __makeTemplateObject } from "tslib";
|
|
2
|
-
import { palette2, styled } from '../../../foundation';
|
|
3
|
-
var InnerSizes = {
|
|
4
|
-
xxsmall: 6,
|
|
5
|
-
xsmall: 6,
|
|
6
|
-
small: 8,
|
|
7
|
-
medium: 8,
|
|
8
|
-
large: 12,
|
|
9
|
-
xlarge: 16,
|
|
10
|
-
};
|
|
11
|
-
export var CircleDiv = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: ", "px;\n width: ", "px;\n background: ", ";\n border-radius: 50%;\n justify-content: center;\n"], ["\n height: ", "px;\n width: ", "px;\n background: ", ";\n border-radius: 50%;\n justify-content: center;\n"])), function (_a) {
|
|
12
|
-
var size = _a.size;
|
|
13
|
-
return InnerSizes[size];
|
|
14
|
-
}, function (_a) {
|
|
15
|
-
var size = _a.size;
|
|
16
|
-
return InnerSizes[size];
|
|
17
|
-
}, palette2('neutral', 'f01'));
|
|
18
|
-
var templateObject_1;
|