@salutejs/plasma-new-hope 0.175.3-canary.1510.11568588886.0 → 0.175.3-canary.1515.11569861732.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. package/cjs/components/Pagination/Pagination.css +12 -12
  2. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +12 -12
  3. package/cjs/components/Popup/Popup.js +2 -2
  4. package/cjs/components/Popup/Popup.js.map +1 -1
  5. package/cjs/components/Popup/PopupContext.js +1 -1
  6. package/cjs/components/Popup/PopupContext.js.map +1 -1
  7. package/cjs/components/Portal/Portal.js +4 -0
  8. package/cjs/components/Portal/Portal.js.map +1 -1
  9. package/cjs/components/Select/Select.css +12 -12
  10. package/cjs/components/Select/Select.tokens.js +1 -2
  11. package/cjs/components/Select/Select.tokens.js.map +1 -1
  12. package/cjs/components/Select/ui/Inner/Inner.css +12 -12
  13. package/cjs/components/Select/ui/Inner/ui/Item/Item.css +12 -12
  14. package/cjs/components/Select/ui/Target/Target.css +12 -12
  15. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +12 -12
  16. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
  17. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  18. package/cjs/components/Select/ui/Target/ui/Textfield/{Textfield.styles_1damf5p.css → Textfield.styles_11yj58s.css} +1 -1
  19. package/cjs/index.css +12 -12
  20. package/emotion/cjs/components/Popup/Popup.js +1 -1
  21. package/emotion/cjs/components/Popup/PopupContext.js +1 -1
  22. package/emotion/cjs/components/Portal/Portal.js +4 -0
  23. package/emotion/cjs/components/Select/Select.tokens.js +1 -2
  24. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +21 -12
  25. package/emotion/es/components/Popup/Popup.js +1 -1
  26. package/emotion/es/components/Popup/PopupContext.js +1 -1
  27. package/emotion/es/components/Portal/Portal.js +4 -0
  28. package/emotion/es/components/Select/Select.tokens.js +1 -2
  29. package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +21 -12
  30. package/es/components/Pagination/Pagination.css +12 -12
  31. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +12 -12
  32. package/es/components/Popup/Popup.js +2 -2
  33. package/es/components/Popup/Popup.js.map +1 -1
  34. package/es/components/Popup/PopupContext.js +1 -1
  35. package/es/components/Popup/PopupContext.js.map +1 -1
  36. package/es/components/Portal/Portal.js +4 -0
  37. package/es/components/Portal/Portal.js.map +1 -1
  38. package/es/components/Select/Select.css +12 -12
  39. package/es/components/Select/Select.tokens.js +1 -2
  40. package/es/components/Select/Select.tokens.js.map +1 -1
  41. package/es/components/Select/ui/Inner/Inner.css +12 -12
  42. package/es/components/Select/ui/Inner/ui/Item/Item.css +12 -12
  43. package/es/components/Select/ui/Target/Target.css +12 -12
  44. package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +12 -12
  45. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
  46. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  47. package/es/components/Select/ui/Target/ui/Textfield/{Textfield.styles_1damf5p.css → Textfield.styles_11yj58s.css} +1 -1
  48. package/es/index.css +12 -12
  49. package/package.json +2 -2
  50. package/styled-components/cjs/components/Popup/Popup.js +1 -1
  51. package/styled-components/cjs/components/Popup/PopupContext.js +1 -1
  52. package/styled-components/cjs/components/Portal/Portal.js +4 -0
  53. package/styled-components/cjs/components/Select/Select.tokens.js +1 -2
  54. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
  55. package/styled-components/es/components/Popup/Popup.js +1 -1
  56. package/styled-components/es/components/Popup/PopupContext.js +1 -1
  57. package/styled-components/es/components/Portal/Portal.js +4 -0
  58. package/styled-components/es/components/Select/Select.tokens.js +1 -2
  59. package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
  60. package/types/components/Popup/PopupContext.d.ts.map +1 -1
  61. package/types/components/Portal/Portal.d.ts.map +1 -1
  62. package/types/components/Select/Select.tokens.d.ts +0 -1
  63. package/types/components/Select/Select.tokens.d.ts.map +1 -1
  64. package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts.map +1 -1
@@ -130,7 +130,7 @@ export var popupRoot = function popupRoot(Root) {
130
130
  animationInfo: animationInfo,
131
131
  setVisible: setVisible
132
132
  }, children));
133
- if (typeof frame !== 'string' && frame && frame.current) {
133
+ if (typeof frame !== 'string' && frame && frame.current && canUseDOM) {
134
134
  return /*#__PURE__*/React.createElement(Portal, {
135
135
  container: frame.current
136
136
  }, rootNode);
@@ -82,7 +82,7 @@ export var PopupProvider = function PopupProvider(_ref) {
82
82
  };
83
83
  return /*#__PURE__*/React.createElement(PopupContext.Provider, {
84
84
  value: context
85
- }, children, /*#__PURE__*/React.createElement(Portal, {
85
+ }, children, canUseDOM && /*#__PURE__*/React.createElement(Portal, {
86
86
  container: document.body
87
87
  }, /*#__PURE__*/React.createElement(StyledPortal, {
88
88
  id: rootId
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import ReactDOM from 'react-dom';
3
+ import { canUseDOM } from '../../utils';
3
4
  /**
4
5
  * Вспомогательный компонент. Используется в Popup, Popover.
5
6
  * Представляет собой ReactDOM.createPortal() в форме компонента.
@@ -9,6 +10,9 @@ export var Portal = function Portal(_ref) {
9
10
  container = _ref.container,
10
11
  _ref$disabled = _ref.disabled,
11
12
  disabled = _ref$disabled === void 0 ? false : _ref$disabled;
13
+ if (!canUseDOM) {
14
+ return null;
15
+ }
12
16
  var portalContainer = typeof container === 'function' ? container() : container;
13
17
  return /*#__PURE__*/React.createElement(React.Fragment, null, disabled && children, !disabled && /*#__PURE__*/ReactDOM.createPortal(children, portalContainer));
14
18
  };
@@ -93,8 +93,7 @@ export var tokens = {
93
93
  spinnerSize: '--plasma-select-spinner-size',
94
94
  spinnerSizeTight: '--plasma-select-spinner-size-tight',
95
95
  disclosureIconColor: '--plasma-select-disclosure-icon-color',
96
- disclosureIconColorHover: '--plasma-select-disclosure-icon-color-hover',
97
- contentLeftColor: '--plasma-select-content-left-color'
96
+ disclosureIconColorHover: '--plasma-select-disclosure-icon-color-hover'
98
97
  };
99
98
  export var constants = {
100
99
  focusColor: '--surface-accent',