@ringcentral/juno 1.12.4-beta.5841-601f173e → 1.12.4-beta.5882-b67a215e

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.
Files changed (61) hide show
  1. package/components/Buttons/SplitButton/SplitButton.js +2 -1
  2. package/components/Downshift/Downshift.d.ts +3 -1
  3. package/components/Downshift/Downshift.js +1 -2
  4. package/components/Downshift/SuggestionList/SuggestionList.js +7 -5
  5. package/components/Downshift/SuggestionList/utils/useSuggestionList.d.ts +20 -7
  6. package/components/Downshift/SuggestionList/utils/useSuggestionList.js +88 -70
  7. package/components/Downshift/utils/DownshiftUtils.d.ts +2 -0
  8. package/components/Downshift/utils/DownshiftUtils.js +6 -0
  9. package/components/Downshift/utils/SelectItem.d.ts +3 -1
  10. package/components/Downshift/utils/index.d.ts +2 -0
  11. package/components/Downshift/utils/index.js +2 -0
  12. package/components/Downshift/utils/useDownshift.d.ts +13 -272
  13. package/components/Downshift/utils/useDownshift.js +132 -429
  14. package/components/Downshift/utils/useDownshiftGroup.js +4 -2
  15. package/components/Downshift/utils/useDownshiftTag.d.ts +554 -0
  16. package/components/Downshift/utils/useDownshiftTag.js +229 -0
  17. package/components/PortalHost/PortalManager/types.d.ts +1 -1
  18. package/es6/components/Buttons/SplitButton/SplitButton.js +3 -2
  19. package/es6/components/Downshift/Downshift.js +1 -2
  20. package/es6/components/Downshift/SuggestionList/SuggestionList.js +7 -5
  21. package/es6/components/Downshift/SuggestionList/utils/useSuggestionList.js +90 -72
  22. package/es6/components/Downshift/utils/DownshiftUtils.js +5 -0
  23. package/es6/components/Downshift/utils/index.js +2 -0
  24. package/es6/components/Downshift/utils/useDownshift.js +135 -432
  25. package/es6/components/Downshift/utils/useDownshiftGroup.js +4 -2
  26. package/es6/components/Downshift/utils/useDownshiftTag.js +227 -0
  27. package/es6/foundation/hooks/index.js +1 -0
  28. package/es6/foundation/hooks/useEver/index.js +1 -0
  29. package/es6/foundation/hooks/useEver/useEver.js +30 -0
  30. package/es6/foundation/hooks/useRefState/useRefState.js +6 -1
  31. package/es6/foundation/theme/assets/zIndex.json +1 -2
  32. package/foundation/hooks/index.d.ts +1 -0
  33. package/foundation/hooks/index.js +1 -0
  34. package/foundation/hooks/useEver/index.d.ts +1 -0
  35. package/{components/Toast/styles → foundation/hooks/useEver}/index.js +1 -1
  36. package/foundation/hooks/useEver/useEver.d.ts +13 -0
  37. package/foundation/hooks/useEver/useEver.js +32 -0
  38. package/foundation/hooks/useRefState/useRefState.js +6 -1
  39. package/foundation/theme/ThemeProvider.d.ts +5 -3
  40. package/foundation/theme/assets/zIndex.json +1 -2
  41. package/package.json +1 -1
  42. package/components/Toast/Toast.d.ts +0 -30
  43. package/components/Toast/Toast.js +0 -49
  44. package/components/Toast/ToastContainer.d.ts +0 -12
  45. package/components/Toast/ToastContainer.js +0 -17
  46. package/components/Toast/index.d.ts +0 -3
  47. package/components/Toast/index.js +0 -7
  48. package/components/Toast/styles/ToastStyle.d.ts +0 -4
  49. package/components/Toast/styles/ToastStyle.js +0 -12
  50. package/components/Toast/styles/index.d.ts +0 -1
  51. package/components/Toast/utils/ToastUtils.d.ts +0 -1
  52. package/components/Toast/utils/ToastUtils.js +0 -3
  53. package/components/Toast/utils/index.d.ts +0 -1
  54. package/components/Toast/utils/index.js +0 -4
  55. package/es6/components/Toast/Toast.js +0 -47
  56. package/es6/components/Toast/ToastContainer.js +0 -15
  57. package/es6/components/Toast/index.js +0 -3
  58. package/es6/components/Toast/styles/ToastStyle.js +0 -10
  59. package/es6/components/Toast/styles/index.js +0 -1
  60. package/es6/components/Toast/utils/ToastUtils.js +0 -1
  61. package/es6/components/Toast/utils/index.js +0 -1
@@ -1,12 +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 utils_1 = require("../utils");
6
- exports.ToastStyle = function () {
7
- return foundation_1.css(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n &:last-of-type {\n margin-bottom: 0;\n }\n\n margin-bottom: ", ";\n\n ", "\n position: static;\n transform: none;\n "], ["\n &:last-of-type {\n margin-bottom: 0;\n }\n\n margin-bottom: ", ";\n\n ", /** clean snackbar style about anchorOrigin */ "\n position: static;\n transform: none;\n "])), foundation_1.spacing(3), '' /** clean snackbar style about anchorOrigin */);
8
- };
9
- exports.ToastContainerStyle = function () {
10
- return foundation_1.css(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n #", " {\n padding-left: ", ";\n padding-right: ", ";\n\n position: fixed;\n top: ", ";\n left: 0;\n right: 0;\n\n z-index: ", ";\n box-sizing: border-box;\n pointer-events: none;\n }\n "], ["\n #", " {\n padding-left: ", ";\n padding-right: ", ";\n\n position: fixed;\n top: ", ";\n left: 0;\n right: 0;\n\n z-index: ", ";\n box-sizing: border-box;\n pointer-events: none;\n }\n "])), utils_1.RC_TOAST_CONTAINER_ID, foundation_1.spacing(4), foundation_1.spacing(4), foundation_1.spacing(22), foundation_1.zIndex('toast'));
11
- };
12
- var templateObject_1, templateObject_2;
@@ -1 +0,0 @@
1
- export * from './ToastStyle';
@@ -1 +0,0 @@
1
- export declare const RC_TOAST_CONTAINER_ID = "RC_TOAST_CONTAINER";
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RC_TOAST_CONTAINER_ID = 'RC_TOAST_CONTAINER';
@@ -1 +0,0 @@
1
- export * from './ToastUtils';
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./ToastUtils"), exports);
@@ -1,47 +0,0 @@
1
- import { __assign, __makeTemplateObject, __read, __rest, __spread } from "tslib";
2
- import React, { forwardRef } from 'react';
3
- import { styled } from '../../foundation';
4
- import { Close as CloseIcon } from '../../icon';
5
- import { RcPortal } from '../Portal';
6
- import { RcSnackbar, RcSnackbarAction } from '../Snackbar';
7
- import { ToastStyle } from './styles';
8
- import { RC_TOAST_CONTAINER_ID } from './utils';
9
- var _RcToast = forwardRef(function (_a, ref) {
10
- var children = _a.children, _b = _a.container, containerProp = _b === void 0 ? RC_TOAST_CONTAINER_ID : _b, getWindow = _a.getWindow, onClose = _a.onClose, _c = _a.ContentProps, ContentPropsInput = _c === void 0 ? {} : _c, _d = _a.dismissButton, dismissButton = _d === void 0 ? false : _d, _e = _a.autoHideDuration, autoHideDuration = _e === void 0 ? 3000 : _e, rest = __rest(_a, ["children", "container", "getWindow", "onClose", "ContentProps", "dismissButton", "autoHideDuration"]);
11
- var container = (function () {
12
- var _a;
13
- // mean containerProp is id
14
- if (typeof containerProp === 'string') {
15
- var targetWindow = (_a = getWindow === null || getWindow === void 0 ? void 0 : getWindow()) !== null && _a !== void 0 ? _a : window;
16
- return targetWindow.document.getElementById(containerProp);
17
- }
18
- return containerProp;
19
- })();
20
- var action = (function () {
21
- var originActions = React.Children.toArray(ContentPropsInput.action);
22
- if (dismissButton) {
23
- var closeAction = (React.createElement(RcSnackbarAction, { key: "dismiss-action", variant: "icon", "aria-label": "Dismiss", symbol: CloseIcon, onClick: function (e) { return handleClose(e, 'dismissButton'); } }));
24
- return __spread(originActions, [closeAction]);
25
- }
26
- return originActions.length === 0 ? null : originActions;
27
- })();
28
- var messageAlign = (function () {
29
- if (action === null || action === void 0 ? void 0 : action.length) {
30
- return 'left';
31
- }
32
- return 'center';
33
- })();
34
- var ContentProps = __assign(__assign({}, ContentPropsInput), { action: action,
35
- messageAlign: messageAlign });
36
- var handleClose = function (e, reason) {
37
- if (reason === 'clickaway')
38
- return;
39
- onClose(e, reason);
40
- };
41
- return (React.createElement(RcPortal, { container: container },
42
- React.createElement(RcSnackbar, __assign({}, rest, { autoHideDuration: autoHideDuration, onClose: handleClose, ref: ref, ContentProps: ContentProps }), children)));
43
- });
44
- var RcToast = styled(_RcToast)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), ToastStyle);
45
- RcToast.displayName = 'RcToast';
46
- export { RcToast };
47
- var templateObject_1;
@@ -1,15 +0,0 @@
1
- import { __assign, __makeTemplateObject, __rest } from "tslib";
2
- import React, { forwardRef } from 'react';
3
- import { styled } from '../../foundation';
4
- import { RcPortal } from '../Portal';
5
- import { ToastContainerStyle } from './styles';
6
- import { RC_TOAST_CONTAINER_ID } from './utils';
7
- var _RcToastContainer = forwardRef(function (props, ref) {
8
- var _a = props.container, container = _a === void 0 ? document.body : _a, _b = props.id, id = _b === void 0 ? RC_TOAST_CONTAINER_ID : _b, rest = __rest(props, ["container", "id"]);
9
- return (React.createElement(RcPortal, { container: container },
10
- React.createElement("div", __assign({}, rest, { id: id, ref: ref }))));
11
- });
12
- var RcToastContainer = styled(_RcToastContainer)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), ToastContainerStyle);
13
- RcToastContainer.displayName = 'RcToastContainer';
14
- export { RcToastContainer };
15
- var templateObject_1;
@@ -1,3 +0,0 @@
1
- export * from './Toast';
2
- export * from './ToastContainer';
3
- export { ToastContainerStyle } from './styles';
@@ -1,10 +0,0 @@
1
- import { __makeTemplateObject } from "tslib";
2
- import { css, spacing, zIndex } from '../../../foundation';
3
- import { RC_TOAST_CONTAINER_ID } from '../utils';
4
- export var ToastStyle = function () {
5
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n &:last-of-type {\n margin-bottom: 0;\n }\n\n margin-bottom: ", ";\n\n ", "\n position: static;\n transform: none;\n "], ["\n &:last-of-type {\n margin-bottom: 0;\n }\n\n margin-bottom: ", ";\n\n ", /** clean snackbar style about anchorOrigin */ "\n position: static;\n transform: none;\n "])), spacing(3), '' /** clean snackbar style about anchorOrigin */);
6
- };
7
- export var ToastContainerStyle = function () {
8
- return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n #", " {\n padding-left: ", ";\n padding-right: ", ";\n\n position: fixed;\n top: ", ";\n left: 0;\n right: 0;\n\n z-index: ", ";\n box-sizing: border-box;\n pointer-events: none;\n }\n "], ["\n #", " {\n padding-left: ", ";\n padding-right: ", ";\n\n position: fixed;\n top: ", ";\n left: 0;\n right: 0;\n\n z-index: ", ";\n box-sizing: border-box;\n pointer-events: none;\n }\n "])), RC_TOAST_CONTAINER_ID, spacing(4), spacing(4), spacing(22), zIndex('toast'));
9
- };
10
- var templateObject_1, templateObject_2;
@@ -1 +0,0 @@
1
- export * from './ToastStyle';
@@ -1 +0,0 @@
1
- export var RC_TOAST_CONTAINER_ID = 'RC_TOAST_CONTAINER';
@@ -1 +0,0 @@
1
- export * from './ToastUtils';