@salutejs/plasma-new-hope 0.68.0-canary.1148.8464595999.0 → 0.68.0-canary.1148.8482525044.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. package/cjs/components/Cell/Cell.js +15 -12
  2. package/cjs/components/Cell/Cell.js.map +1 -1
  3. package/cjs/components/Cell/CellTextbox/CellTextbox.js +21 -0
  4. package/cjs/components/Cell/CellTextbox/CellTextbox.js.map +1 -0
  5. package/cjs/components/Cell/{Textbox/Textbox.styles.js → CellTextbox/CellTextbox.styles.js} +4 -4
  6. package/cjs/components/Cell/CellTextbox/CellTextbox.styles.js.map +1 -0
  7. package/cjs/components/Cell/{Textbox/ui/TextLabel.js → CellTextbox/ui/CellTextLabel.js} +4 -4
  8. package/cjs/components/Cell/CellTextbox/ui/CellTextLabel.js.map +1 -0
  9. package/cjs/components/Cell/{Textbox/ui/TextSubtitle.js → CellTextbox/ui/CellTextSubtitle.js} +4 -4
  10. package/cjs/components/Cell/CellTextbox/ui/CellTextSubtitle.js.map +1 -0
  11. package/cjs/components/Cell/{Textbox/ui/TextTitle.js → CellTextbox/ui/CellTextTitle.js} +4 -4
  12. package/cjs/components/Cell/CellTextbox/ui/CellTextTitle.js.map +1 -0
  13. package/cjs/components/Dropdown/Dropdown.js +2 -1
  14. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  15. package/cjs/components/Popover/Popover.js +46 -31
  16. package/cjs/components/Popover/Popover.js.map +1 -1
  17. package/cjs/index.js +8 -8
  18. package/es/components/Cell/Cell.js +15 -12
  19. package/es/components/Cell/Cell.js.map +1 -1
  20. package/es/components/Cell/CellTextbox/CellTextbox.js +17 -0
  21. package/es/components/Cell/CellTextbox/CellTextbox.js.map +1 -0
  22. package/es/components/Cell/CellTextbox/CellTextbox.styles.js +9 -0
  23. package/es/components/Cell/CellTextbox/CellTextbox.styles.js.map +1 -0
  24. package/es/components/Cell/{Textbox/ui/TextLabel.js → CellTextbox/ui/CellTextLabel.js} +4 -4
  25. package/es/components/Cell/CellTextbox/ui/CellTextLabel.js.map +1 -0
  26. package/es/components/Cell/{Textbox/ui/TextSubtitle.js → CellTextbox/ui/CellTextSubtitle.js} +4 -4
  27. package/es/components/Cell/CellTextbox/ui/CellTextSubtitle.js.map +1 -0
  28. package/es/components/Cell/{Textbox/ui/TextTitle.js → CellTextbox/ui/CellTextTitle.js} +4 -4
  29. package/es/components/Cell/CellTextbox/ui/CellTextTitle.js.map +1 -0
  30. package/es/components/Dropdown/Dropdown.js +2 -1
  31. package/es/components/Dropdown/Dropdown.js.map +1 -1
  32. package/es/components/Popover/Popover.js +46 -31
  33. package/es/components/Popover/Popover.js.map +1 -1
  34. package/es/index.js +4 -4
  35. package/package.json +4 -4
  36. package/styled-components/cjs/components/Cell/Cell.js +15 -12
  37. package/styled-components/cjs/components/Cell/CellTextbox/CellTextbox.js +20 -0
  38. package/styled-components/cjs/components/Cell/{Textbox/Textbox.styles.js → CellTextbox/CellTextbox.styles.js} +3 -3
  39. package/styled-components/cjs/components/Cell/{Textbox/ui/TextLabel.js → CellTextbox/ui/CellTextLabel.js} +3 -3
  40. package/styled-components/cjs/components/Cell/{Textbox/ui/TextSubtitle.js → CellTextbox/ui/CellTextSubtitle.js} +3 -3
  41. package/styled-components/cjs/components/Cell/{Textbox/ui/TextTitle.js → CellTextbox/ui/CellTextTitle.js} +3 -3
  42. package/styled-components/cjs/components/Cell/index.js +12 -12
  43. package/styled-components/cjs/components/Dropdown/Dropdown.js +2 -1
  44. package/styled-components/cjs/components/Popover/Popover.js +46 -31
  45. package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.config.js +0 -5
  46. package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.js +8 -8
  47. package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.stories.tsx +12 -15
  48. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +1 -1
  49. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +1 -1
  50. package/styled-components/cjs/examples/plasma_b2c/components/Popover/Popover.stories.tsx +7 -0
  51. package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.config.js +0 -5
  52. package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.js +9 -9
  53. package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.stories.tsx +11 -14
  54. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +1 -1
  55. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +1 -1
  56. package/styled-components/es/components/Cell/Cell.js +15 -12
  57. package/styled-components/es/components/Cell/CellTextbox/CellTextbox.js +13 -0
  58. package/styled-components/es/components/Cell/{Textbox/Textbox.styles.js → CellTextbox/CellTextbox.styles.js} +2 -2
  59. package/styled-components/es/components/Cell/{Textbox/ui/TextLabel.js → CellTextbox/ui/CellTextLabel.js} +2 -2
  60. package/styled-components/es/components/Cell/{Textbox/ui/TextSubtitle.js → CellTextbox/ui/CellTextSubtitle.js} +2 -2
  61. package/styled-components/es/components/Cell/{Textbox/ui/TextTitle.js → CellTextbox/ui/CellTextTitle.js} +2 -2
  62. package/styled-components/es/components/Cell/index.js +4 -4
  63. package/styled-components/es/components/Dropdown/Dropdown.js +2 -1
  64. package/styled-components/es/components/Popover/Popover.js +46 -31
  65. package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.config.js +0 -5
  66. package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.js +2 -2
  67. package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.stories.tsx +12 -15
  68. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +1 -1
  69. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +1 -1
  70. package/styled-components/es/examples/plasma_b2c/components/Popover/Popover.stories.tsx +7 -0
  71. package/styled-components/es/examples/plasma_web/components/Cell/Cell.config.js +0 -5
  72. package/styled-components/es/examples/plasma_web/components/Cell/Cell.js +2 -2
  73. package/styled-components/es/examples/plasma_web/components/Cell/Cell.stories.tsx +11 -14
  74. package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +1 -1
  75. package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +1 -1
  76. package/types/components/Cell/Cell.d.ts +0 -1
  77. package/types/components/Cell/Cell.d.ts.map +1 -1
  78. package/types/components/Cell/Cell.types.d.ts +9 -8
  79. package/types/components/Cell/Cell.types.d.ts.map +1 -1
  80. package/types/components/Cell/CellTextbox/CellTextbox.d.ts +4 -0
  81. package/types/components/Cell/CellTextbox/CellTextbox.d.ts.map +1 -0
  82. package/types/components/Cell/CellTextbox/CellTextbox.styles.d.ts +2 -0
  83. package/types/components/Cell/CellTextbox/CellTextbox.styles.d.ts.map +1 -0
  84. package/types/components/Cell/CellTextbox/CellTextbox.types.d.ts +43 -0
  85. package/types/components/Cell/CellTextbox/CellTextbox.types.d.ts.map +1 -0
  86. package/types/components/Cell/CellTextbox/ui/CellTextLabel.d.ts +5 -0
  87. package/types/components/Cell/CellTextbox/ui/CellTextLabel.d.ts.map +1 -0
  88. package/types/components/Cell/CellTextbox/ui/CellTextSubtitle.d.ts +5 -0
  89. package/types/components/Cell/CellTextbox/ui/CellTextSubtitle.d.ts.map +1 -0
  90. package/types/components/Cell/CellTextbox/ui/CellTextTitle.d.ts +5 -0
  91. package/types/components/Cell/CellTextbox/ui/CellTextTitle.d.ts.map +1 -0
  92. package/types/components/Cell/index.d.ts +5 -5
  93. package/types/components/Cell/index.d.ts.map +1 -1
  94. package/types/components/Combobox/Combobox.styles.d.ts +8 -2
  95. package/types/components/Combobox/Combobox.styles.d.ts.map +1 -1
  96. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  97. package/types/components/Dropdown/Dropdown.styles.d.ts +7 -1
  98. package/types/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
  99. package/types/components/Popover/Popover.d.ts +2 -2
  100. package/types/components/Popover/Popover.d.ts.map +1 -1
  101. package/types/components/Popover/Popover.types.d.ts +19 -14
  102. package/types/components/Popover/Popover.types.d.ts.map +1 -1
  103. package/types/components/Select/Select.styles.d.ts +8 -2
  104. package/types/components/Select/Select.styles.d.ts.map +1 -1
  105. package/types/examples/plasma_b2c/components/Cell/Cell.config.d.ts +0 -5
  106. package/types/examples/plasma_b2c/components/Cell/Cell.config.d.ts.map +1 -1
  107. package/types/examples/plasma_b2c/components/Cell/Cell.d.ts +10 -8
  108. package/types/examples/plasma_b2c/components/Cell/Cell.d.ts.map +1 -1
  109. package/types/examples/plasma_b2c/components/Popover/Popover.d.ts +7 -1
  110. package/types/examples/plasma_b2c/components/Popover/Popover.d.ts.map +1 -1
  111. package/types/examples/plasma_web/components/Cell/Cell.config.d.ts +0 -5
  112. package/types/examples/plasma_web/components/Cell/Cell.config.d.ts.map +1 -1
  113. package/types/examples/plasma_web/components/Cell/Cell.d.ts +10 -8
  114. package/types/examples/plasma_web/components/Cell/Cell.d.ts.map +1 -1
  115. package/types/examples/plasma_web/components/Popover/Popover.d.ts +7 -1
  116. package/types/examples/plasma_web/components/Popover/Popover.d.ts.map +1 -1
  117. package/types/examples/sds_engineer/components/Popover/Popover.d.ts +7 -1
  118. package/types/examples/sds_engineer/components/Popover/Popover.d.ts.map +1 -1
  119. package/cjs/components/Cell/Textbox/Textbox.js +0 -20
  120. package/cjs/components/Cell/Textbox/Textbox.js.map +0 -1
  121. package/cjs/components/Cell/Textbox/Textbox.styles.js.map +0 -1
  122. package/cjs/components/Cell/Textbox/ui/TextLabel.js.map +0 -1
  123. package/cjs/components/Cell/Textbox/ui/TextSubtitle.js.map +0 -1
  124. package/cjs/components/Cell/Textbox/ui/TextTitle.js.map +0 -1
  125. package/es/components/Cell/Textbox/Textbox.js +0 -16
  126. package/es/components/Cell/Textbox/Textbox.js.map +0 -1
  127. package/es/components/Cell/Textbox/Textbox.styles.js +0 -9
  128. package/es/components/Cell/Textbox/Textbox.styles.js.map +0 -1
  129. package/es/components/Cell/Textbox/ui/TextLabel.js.map +0 -1
  130. package/es/components/Cell/Textbox/ui/TextSubtitle.js.map +0 -1
  131. package/es/components/Cell/Textbox/ui/TextTitle.js.map +0 -1
  132. package/styled-components/cjs/components/Cell/Textbox/Textbox.js +0 -19
  133. package/styled-components/es/components/Cell/Textbox/Textbox.js +0 -12
  134. package/types/components/Cell/Textbox/Textbox.d.ts +0 -4
  135. package/types/components/Cell/Textbox/Textbox.d.ts.map +0 -1
  136. package/types/components/Cell/Textbox/Textbox.styles.d.ts +0 -2
  137. package/types/components/Cell/Textbox/Textbox.styles.d.ts.map +0 -1
  138. package/types/components/Cell/Textbox/Textbox.types.d.ts +0 -33
  139. package/types/components/Cell/Textbox/Textbox.types.d.ts.map +0 -1
  140. package/types/components/Cell/Textbox/ui/TextLabel.d.ts +0 -5
  141. package/types/components/Cell/Textbox/ui/TextLabel.d.ts.map +0 -1
  142. package/types/components/Cell/Textbox/ui/TextSubtitle.d.ts +0 -5
  143. package/types/components/Cell/Textbox/ui/TextSubtitle.d.ts.map +0 -1
  144. package/types/components/Cell/Textbox/ui/TextTitle.d.ts +0 -5
  145. package/types/components/Cell/Textbox/ui/TextTitle.d.ts.map +0 -1
  146. /package/styled-components/cjs/components/Cell/{Textbox/Textbox.types.js → CellTextbox/CellTextbox.types.js} +0 -0
  147. /package/styled-components/es/components/Cell/{Textbox/Textbox.types.js → CellTextbox/CellTextbox.types.js} +0 -0
@@ -3,14 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.TextSubtitle = void 0;
6
+ exports.CellTextboxSubtitle = void 0;
7
7
  var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
8
8
  var _styledComponents = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("styled-components"));
9
9
  var _Cell = /*#__PURE__*/require("../../Cell.tokens");
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
11
  var StyledTextSubtitle = /*#__PURE__*/_styledComponents["default"].div.withConfig({
12
- componentId: "plasma-new-hope__sc-jj01ut-0"
12
+ componentId: "plasma-new-hope__sc-ulqa2a-0"
13
13
  })(["color:var(", ");font-size:var(", ");font-weight:var(", ");font-family:var(", ");font-style:var(", ");line-height:var(", ");letter-spacing:var(", ");"], _Cell.tokens.cellSubtitleColor, _Cell.tokens.cellSubtitleFontSize, _Cell.tokens.cellSubtitleFontWeight, _Cell.tokens.cellSubtitleFontFamily, _Cell.tokens.cellSubtitleFontStyle, _Cell.tokens.cellSubtitleLineHeight, _Cell.tokens.cellSubtitleLetterSpacing);
14
- var TextSubtitle = exports.TextSubtitle = function TextSubtitle(props) {
14
+ var CellTextboxSubtitle = exports.CellTextboxSubtitle = function CellTextboxSubtitle(props) {
15
15
  return /*#__PURE__*/_react["default"].createElement(StyledTextSubtitle, null, props.children);
16
16
  };
@@ -3,14 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.TextTitle = void 0;
6
+ exports.CellTextboxTitle = void 0;
7
7
  var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
8
8
  var _styledComponents = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("styled-components"));
9
9
  var _Cell = /*#__PURE__*/require("../../Cell.tokens");
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
11
  var StyledTextTitle = /*#__PURE__*/_styledComponents["default"].div.withConfig({
12
- componentId: "plasma-new-hope__sc-1mxjeba-0"
12
+ componentId: "plasma-new-hope__sc-o4ebas-0"
13
13
  })(["color:var(", ");font-size:var(", ");font-weight:var(", ");font-family:var(", ");font-style:var(", ");line-height:var(", ");letter-spacing:var(", ");"], _Cell.tokens.cellTitleColor, _Cell.tokens.cellTitleFontSize, _Cell.tokens.cellTitleFontWeight, _Cell.tokens.cellTitleFontFamily, _Cell.tokens.cellTitleFontStyle, _Cell.tokens.cellTitleLineHeight, _Cell.tokens.cellTitleLetterSpacing);
14
- var TextTitle = exports.TextTitle = function TextTitle(props) {
14
+ var CellTextboxTitle = exports.CellTextboxTitle = function CellTextboxTitle(props) {
15
15
  return /*#__PURE__*/_react["default"].createElement(StyledTextTitle, null, props.children);
16
16
  };
@@ -3,28 +3,28 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- Object.defineProperty(exports, "TextLabel", {
6
+ Object.defineProperty(exports, "CellTextbox", {
7
7
  enumerable: true,
8
8
  get: function get() {
9
- return _TextLabel.TextLabel;
9
+ return _CellTextbox.CellTextbox;
10
10
  }
11
11
  });
12
- Object.defineProperty(exports, "TextSubtitle", {
12
+ Object.defineProperty(exports, "CellTextboxLabel", {
13
13
  enumerable: true,
14
14
  get: function get() {
15
- return _TextSubtitle.TextSubtitle;
15
+ return _CellTextLabel.CellTextboxLabel;
16
16
  }
17
17
  });
18
- Object.defineProperty(exports, "TextTitle", {
18
+ Object.defineProperty(exports, "CellTextboxSubtitle", {
19
19
  enumerable: true,
20
20
  get: function get() {
21
- return _TextTitle.TextTitle;
21
+ return _CellTextSubtitle.CellTextboxSubtitle;
22
22
  }
23
23
  });
24
- Object.defineProperty(exports, "Textbox", {
24
+ Object.defineProperty(exports, "CellTextboxTitle", {
25
25
  enumerable: true,
26
26
  get: function get() {
27
- return _Textbox.Textbox;
27
+ return _CellTextTitle.CellTextboxTitle;
28
28
  }
29
29
  });
30
30
  Object.defineProperty(exports, "cellClasses", {
@@ -51,9 +51,9 @@ Object.defineProperty(exports, "cellTokens", {
51
51
  return _Cell2.tokens;
52
52
  }
53
53
  });
54
- var _TextLabel = /*#__PURE__*/require("./Textbox/ui/TextLabel");
55
- var _TextTitle = /*#__PURE__*/require("./Textbox/ui/TextTitle");
56
- var _TextSubtitle = /*#__PURE__*/require("./Textbox/ui/TextSubtitle");
54
+ var _CellTextLabel = /*#__PURE__*/require("./CellTextbox/ui/CellTextLabel");
55
+ var _CellTextTitle = /*#__PURE__*/require("./CellTextbox/ui/CellTextTitle");
56
+ var _CellTextSubtitle = /*#__PURE__*/require("./CellTextbox/ui/CellTextSubtitle");
57
57
  var _Cell = /*#__PURE__*/require("./Cell");
58
58
  var _Cell2 = /*#__PURE__*/require("./Cell.tokens");
59
- var _Textbox = /*#__PURE__*/require("./Textbox/Textbox");
59
+ var _CellTextbox = /*#__PURE__*/require("./CellTextbox/CellTextbox");
@@ -71,6 +71,7 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
71
71
  placement: (0, _utils.getPlacements)(placement),
72
72
  trigger: trigger,
73
73
  closeOnOverlayClick: closeOnOverlayClick,
74
+ closeOnBeyondTargetHover: false,
74
75
  closeOnEsc: closeOnEsc,
75
76
  isFocusTrapped: isFocusTrapped,
76
77
  frame: frame
@@ -95,7 +96,7 @@ var dropdownConfig = exports.dropdownConfig = {
95
96
  }
96
97
  },
97
98
  defaults: {
98
- view: 'primary',
99
+ view: 'default',
99
100
  size: 'm'
100
101
  }
101
102
  };
@@ -13,7 +13,7 @@ var _utils = /*#__PURE__*/require("../../utils");
13
13
  var _base = /*#__PURE__*/require("./variations/_view/base");
14
14
  var _Popover = /*#__PURE__*/require("./Popover.styles");
15
15
  var _Popover2 = /*#__PURE__*/require("./Popover.tokens");
16
- var _excluded = ["target", "children", "isOpen", "trigger", "hasArrow", "frame", "className", "placement", "offset", "zIndex", "isFocusTrapped", "closeOnOverlayClick", "closeOnEsc", "preventOverflow", "usePortal", "view", "onToggle"];
16
+ var _excluded = ["target", "children", "isOpen", "trigger", "hasArrow", "frame", "className", "placement", "offset", "zIndex", "isFocusTrapped", "closeOnEsc", "preventOverflow", "usePortal", "view", "onToggle"];
17
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
18
18
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
19
19
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
@@ -39,33 +39,41 @@ var POPOVER_PORTAL_ID = exports.POPOVER_PORTAL_ID = 'plasma-popover-root';
39
39
  * и вызова по клику либо ховеру.
40
40
  */
41
41
  var popoverRoot = exports.popoverRoot = function popoverRoot(Root) {
42
- return /*#__PURE__*/(0, _react.forwardRef)(function (_ref, outerRootRef) {
43
- var target = _ref.target,
44
- children = _ref.children,
45
- isOpen = _ref.isOpen,
46
- trigger = _ref.trigger,
47
- hasArrow = _ref.hasArrow,
48
- _ref$frame = _ref.frame,
49
- frame = _ref$frame === void 0 ? 'document' : _ref$frame,
50
- className = _ref.className,
51
- _ref$placement = _ref.placement,
52
- placement = _ref$placement === void 0 ? 'auto' : _ref$placement,
53
- _ref$offset = _ref.offset,
54
- offset = _ref$offset === void 0 ? [0, 0] : _ref$offset,
55
- zIndex = _ref.zIndex,
56
- _ref$isFocusTrapped = _ref.isFocusTrapped,
57
- isFocusTrapped = _ref$isFocusTrapped === void 0 ? true : _ref$isFocusTrapped,
58
- _ref$closeOnOverlayCl = _ref.closeOnOverlayClick,
59
- closeOnOverlayClick = _ref$closeOnOverlayCl === void 0 ? true : _ref$closeOnOverlayCl,
60
- _ref$closeOnEsc = _ref.closeOnEsc,
61
- closeOnEsc = _ref$closeOnEsc === void 0 ? true : _ref$closeOnEsc,
62
- _ref$preventOverflow = _ref.preventOverflow,
63
- preventOverflow = _ref$preventOverflow === void 0 ? true : _ref$preventOverflow,
64
- _ref$usePortal = _ref.usePortal,
65
- usePortal = _ref$usePortal === void 0 ? false : _ref$usePortal,
66
- view = _ref.view,
67
- onToggle = _ref.onToggle,
68
- rest = _objectWithoutProperties(_ref, _excluded);
42
+ return /*#__PURE__*/(0, _react.forwardRef)(function (props, outerRootRef) {
43
+ var _placement$;
44
+ var target = props.target,
45
+ children = props.children,
46
+ isOpen = props.isOpen,
47
+ _props$trigger = props.trigger,
48
+ trigger = _props$trigger === void 0 ? 'click' : _props$trigger,
49
+ hasArrow = props.hasArrow,
50
+ _props$frame = props.frame,
51
+ frame = _props$frame === void 0 ? 'document' : _props$frame,
52
+ className = props.className,
53
+ _props$placement = props.placement,
54
+ placement = _props$placement === void 0 ? 'auto' : _props$placement,
55
+ _props$offset = props.offset,
56
+ offset = _props$offset === void 0 ? [0, 0] : _props$offset,
57
+ zIndex = props.zIndex,
58
+ _props$isFocusTrapped = props.isFocusTrapped,
59
+ isFocusTrapped = _props$isFocusTrapped === void 0 ? true : _props$isFocusTrapped,
60
+ _props$closeOnEsc = props.closeOnEsc,
61
+ closeOnEsc = _props$closeOnEsc === void 0 ? true : _props$closeOnEsc,
62
+ _props$preventOverflo = props.preventOverflow,
63
+ preventOverflow = _props$preventOverflo === void 0 ? true : _props$preventOverflo,
64
+ _props$usePortal = props.usePortal,
65
+ usePortal = _props$usePortal === void 0 ? false : _props$usePortal,
66
+ view = props.view,
67
+ onToggle = props.onToggle,
68
+ rest = _objectWithoutProperties(props, _excluded);
69
+ var closeOnOverlayClick = true;
70
+ var closeOnBeyondTargetHover = true;
71
+ if (props.trigger === 'click' && props.closeOnOverlayClick === false) {
72
+ closeOnOverlayClick = false;
73
+ }
74
+ if (props.trigger === 'hover' && props.closeOnBeyondTargetHover === false) {
75
+ closeOnBeyondTargetHover = false;
76
+ }
69
77
  var rootRef = (0, _react.useRef)(null);
70
78
  var popoverRef = (0, _react.useRef)(null);
71
79
  var handleRef = (0, _plasmaCore.useForkRef)(rootRef, outerRootRef);
@@ -86,7 +94,9 @@ var popoverRoot = exports.popoverRoot = function popoverRoot(Root) {
86
94
  opacity: isOpen ? 1 : 0
87
95
  };
88
96
  var _usePopper = (0, _reactPopper.usePopper)(rootRef.current, popoverRef.current, {
89
- placement: isAutoArray ? 'auto' : placement,
97
+ // TODO: #1121
98
+ // eslint-disable-next-line no-nested-ternary
99
+ placement: isAutoArray ? (_placement$ = placement[0]) !== null && _placement$ !== void 0 && _placement$.endsWith('start') ? 'auto-start' : 'auto' : placement,
90
100
  modifiers: [{
91
101
  name: 'preventOverflow',
92
102
  options: {
@@ -222,10 +232,15 @@ var popoverRoot = exports.popoverRoot = function popoverRoot(Root) {
222
232
  }, target), children && portalRef.current && /*#__PURE__*/_reactDom["default"].createPortal( /*#__PURE__*/_react["default"].createElement(Root, _extends({
223
233
  view: view,
224
234
  className: className
225
- }, rest), /*#__PURE__*/_react["default"].createElement(_Popover.StyledPopover, _extends({}, attributes.popper, {
235
+ }, rest, {
236
+ onMouseEnter: closeOnBeyondTargetHover ? undefined : onMouseEnter,
237
+ onMouseLeave: closeOnBeyondTargetHover ? undefined : onMouseEnter
238
+ }), /*#__PURE__*/_react["default"].createElement(_Popover.StyledPopover, _extends({}, attributes.popper, {
226
239
  className: _Popover2.classes.root,
227
240
  ref: popoverForkRef,
228
- style: _objectSpread(_objectSpread({}, styles.popper), initialStyles),
241
+ style: _objectSpread(_objectSpread(_objectSpread({}, styles.popper), {
242
+ display: isOpen ? 'block' : 'none'
243
+ }), initialStyles),
229
244
  zIndex: zIndex
230
245
  }), hasArrow && /*#__PURE__*/_react["default"].createElement(_Popover.StyledArrow, _extends({
231
246
  className: _Popover2.classes.arrow,
@@ -7,11 +7,6 @@ exports.config = void 0;
7
7
  var _styledComponents = /*#__PURE__*/require("styled-components");
8
8
  var _Cell = /*#__PURE__*/require("../../../../components/Cell");
9
9
  var config = exports.config = {
10
- defaults: {
11
- view: 'default',
12
- size: 'm',
13
- stretching: 'filled'
14
- },
15
10
  variations: {
16
11
  view: {
17
12
  "default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-primary);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-secondary);", ":transparent;"], _Cell.cellTokens.cellColor, _Cell.cellTokens.cellLabelColor, _Cell.cellTokens.cellTitleColor, _Cell.cellTokens.cellSubtitleColor, _Cell.cellTokens.cellBackgroundColor)
@@ -4,28 +4,28 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.Cell = void 0;
7
- Object.defineProperty(exports, "TextLabel", {
7
+ Object.defineProperty(exports, "CellTextbox", {
8
8
  enumerable: true,
9
9
  get: function get() {
10
- return _Cell.TextLabel;
10
+ return _Cell.CellTextbox;
11
11
  }
12
12
  });
13
- Object.defineProperty(exports, "TextSubtitle", {
13
+ Object.defineProperty(exports, "CellTextboxLabel", {
14
14
  enumerable: true,
15
15
  get: function get() {
16
- return _Cell.TextSubtitle;
16
+ return _Cell.CellTextboxLabel;
17
17
  }
18
18
  });
19
- Object.defineProperty(exports, "TextTitle", {
19
+ Object.defineProperty(exports, "CellTextboxSubtitle", {
20
20
  enumerable: true,
21
21
  get: function get() {
22
- return _Cell.TextTitle;
22
+ return _Cell.CellTextboxSubtitle;
23
23
  }
24
24
  });
25
- Object.defineProperty(exports, "Textbox", {
25
+ Object.defineProperty(exports, "CellTextboxTitle", {
26
26
  enumerable: true,
27
27
  get: function get() {
28
- return _Cell.Textbox;
28
+ return _Cell.CellTextboxTitle;
29
29
  }
30
30
  });
31
31
  var _Cell = /*#__PURE__*/require("../../../../components/Cell");
@@ -7,7 +7,7 @@ import { WithTheme } from '../../../_helpers';
7
7
  import { Avatar } from '../Avatar/Avatar';
8
8
  import { IconChevronLeft } from '../../../../components/_Icon';
9
9
 
10
- import { Cell, Textbox, TextTitle } from './Cell';
10
+ import { Cell, CellTextbox, CellTextboxTitle } from './Cell';
11
11
 
12
12
  type StoryProps = ComponentProps<typeof Cell> & {
13
13
  itemsCount?: number;
@@ -48,13 +48,13 @@ const meta: Meta<typeof Cell> = {
48
48
  type: 'select',
49
49
  },
50
50
  },
51
- alignLeft: {
51
+ alignContentLeft: {
52
52
  options: alignLeft,
53
53
  control: {
54
54
  type: 'select',
55
55
  },
56
56
  },
57
- alignRight: {
57
+ alignContentRight: {
58
58
  options: alignRight,
59
59
  control: {
60
60
  type: 'select',
@@ -76,8 +76,8 @@ export const Default: Story = {
76
76
  stretching: 'filled',
77
77
  enableLeftContent: false,
78
78
  enableRightContent: false,
79
- alignLeft: 'center',
80
- alignRight: 'center',
79
+ alignContentLeft: 'center',
80
+ alignContentRight: 'center',
81
81
  title: 'Title',
82
82
  subtitle: 'Subtitle',
83
83
  label: 'Label',
@@ -90,12 +90,7 @@ export const Default: Story = {
90
90
  <Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
91
91
  )
92
92
  }
93
- alignLeft={args.alignLeft}
94
93
  contentRight={!args.enableRightContent && <ChevronRight color="inherit" size="xs" />}
95
- alignRight={args.alignRight}
96
- title={args.title}
97
- subtitle={args.subtitle}
98
- label={args.label}
99
94
  {...args}
100
95
  />
101
96
  );
@@ -115,16 +110,18 @@ export const WithContentTextboxCustom: Story = {
115
110
  `;
116
111
  return (
117
112
  <Cell
113
+ view="default"
114
+ size={args.size}
115
+ stretching={args.stretching}
118
116
  contentLeft={
119
117
  <Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
120
118
  }
121
- contentRight={<ChevronRight color="inherit" size="xs" />}
122
- {...args}
119
+ contentRight={!args.enableRightContent && <ChevronRight color="inherit" size="xs" />}
123
120
  >
124
- <Textbox>
125
- <TextTitle>Title</TextTitle>
121
+ <CellTextboxTitle>
122
+ <CellTextbox>Title</CellTextbox>
126
123
  <MyStyledText>My styled Text</MyStyledText>
127
- </Textbox>
124
+ </CellTextboxTitle>
128
125
  </Cell>
129
126
  );
130
127
  },
@@ -51,7 +51,7 @@ const meta: Meta<StoryDropdownProps> = {
51
51
  closeOnEsc: true,
52
52
  isFocusTrapped: true,
53
53
  skidding: 0,
54
- distance: 6,
54
+ distance: 0,
55
55
  },
56
56
  };
57
57
 
@@ -51,7 +51,7 @@ const meta: Meta<StoryDropdownProps> = {
51
51
  closeOnEsc: true,
52
52
  isFocusTrapped: true,
53
53
  skidding: 0,
54
- distance: 6,
54
+ distance: 0,
55
55
  },
56
56
  };
57
57
 
@@ -33,6 +33,12 @@ const meta: Meta<typeof Popover> = {
33
33
  },
34
34
  table: { defaultValue: { summary: true } },
35
35
  },
36
+ closeOnBeyondTargetHover: {
37
+ control: {
38
+ type: 'boolean',
39
+ },
40
+ table: { defaultValue: { summary: true } },
41
+ },
36
42
  closeOnEsc: {
37
43
  control: {
38
44
  type: 'boolean',
@@ -62,6 +68,7 @@ const meta: Meta<typeof Popover> = {
62
68
  placement: 'bottom',
63
69
  trigger: 'click',
64
70
  closeOnOverlayClick: true,
71
+ closeOnBeyondTargetHover: true,
65
72
  closeOnEsc: true,
66
73
  isFocusTrapped: true,
67
74
  skidding: 0,
@@ -7,11 +7,6 @@ exports.config = void 0;
7
7
  var _styledComponents = /*#__PURE__*/require("styled-components");
8
8
  var _Cell = /*#__PURE__*/require("../../../../components/Cell");
9
9
  var config = exports.config = {
10
- defaults: {
11
- view: 'default',
12
- size: 'm',
13
- stretching: 'filled'
14
- },
15
10
  variations: {
16
11
  view: {
17
12
  "default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-primary);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-secondary);", ":transparent;"], _Cell.cellTokens.cellColor, _Cell.cellTokens.cellLabelColor, _Cell.cellTokens.cellTitleColor, _Cell.cellTokens.cellSubtitleColor, _Cell.cellTokens.cellBackgroundColor)
@@ -4,32 +4,32 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.Cell = void 0;
7
- Object.defineProperty(exports, "TextLabel", {
7
+ Object.defineProperty(exports, "CellTextbox", {
8
8
  enumerable: true,
9
9
  get: function get() {
10
- return _Cell.TextLabel;
10
+ return _Cell.CellTextbox;
11
11
  }
12
12
  });
13
- Object.defineProperty(exports, "TextSubtitle", {
13
+ Object.defineProperty(exports, "CellTextboxLabel", {
14
14
  enumerable: true,
15
15
  get: function get() {
16
- return _Cell.TextSubtitle;
16
+ return _Cell.CellTextboxLabel;
17
17
  }
18
18
  });
19
- Object.defineProperty(exports, "TextTitle", {
19
+ Object.defineProperty(exports, "CellTextboxSubtitle", {
20
20
  enumerable: true,
21
21
  get: function get() {
22
- return _Cell.TextTitle;
22
+ return _Cell.CellTextboxSubtitle;
23
23
  }
24
24
  });
25
- Object.defineProperty(exports, "Textbox", {
25
+ Object.defineProperty(exports, "CellTextboxTitle", {
26
26
  enumerable: true,
27
27
  get: function get() {
28
- return _Cell.Textbox;
28
+ return _Cell.CellTextboxTitle;
29
29
  }
30
30
  });
31
- var _Cell = /*#__PURE__*/require("../../../../components/Cell");
32
31
  var _engines = /*#__PURE__*/require("../../../../engines");
32
+ var _Cell = /*#__PURE__*/require("../../../../components/Cell");
33
33
  var _Cell2 = /*#__PURE__*/require("./Cell.config");
34
34
  var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_Cell.cellConfig, _Cell2.config);
35
35
  var Cell = exports.Cell = /*#__PURE__*/(0, _engines.component)(mergedConfig);
@@ -7,7 +7,7 @@ import { WithTheme } from '../../../_helpers';
7
7
  import { Avatar } from '../Avatar/Avatar';
8
8
  import { IconChevronLeft } from '../../../../components/_Icon';
9
9
 
10
- import { Cell, Textbox, TextTitle } from './Cell';
10
+ import { Cell, CellTextbox, CellTextboxTitle } from './Cell';
11
11
 
12
12
  type StoryProps = ComponentProps<typeof Cell> & {
13
13
  itemsCount?: number;
@@ -48,13 +48,13 @@ const meta: Meta<typeof Cell> = {
48
48
  type: 'select',
49
49
  },
50
50
  },
51
- alignLeft: {
51
+ alignContentLeft: {
52
52
  options: alignLeft,
53
53
  control: {
54
54
  type: 'select',
55
55
  },
56
56
  },
57
- alignRight: {
57
+ alignContentRight: {
58
58
  options: alignRight,
59
59
  control: {
60
60
  type: 'select',
@@ -76,8 +76,8 @@ export const Default: Story = {
76
76
  stretching: 'filled',
77
77
  enableLeftContent: false,
78
78
  enableRightContent: false,
79
- alignLeft: 'center',
80
- alignRight: 'center',
79
+ alignContentLeft: 'center',
80
+ alignContentRight: 'center',
81
81
  title: 'Title',
82
82
  subtitle: 'Subtitle',
83
83
  label: 'Label',
@@ -90,12 +90,7 @@ export const Default: Story = {
90
90
  <Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
91
91
  )
92
92
  }
93
- alignLeft={args.alignLeft}
94
93
  contentRight={!args.enableRightContent && <ChevronRight color="inherit" size="xs" />}
95
- alignRight={args.alignRight}
96
- title={args.title}
97
- subtitle={args.subtitle}
98
- label={args.label}
99
94
  {...args}
100
95
  />
101
96
  );
@@ -115,16 +110,18 @@ export const WithContentTextboxCustom: Story = {
115
110
  `;
116
111
  return (
117
112
  <Cell
113
+ view="default"
114
+ size={args.size}
115
+ stretching={args.stretching}
118
116
  contentLeft={
119
117
  <Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
120
118
  }
121
119
  contentRight={<ChevronRight color="inherit" size="xs" />}
122
- {...args}
123
120
  >
124
- <Textbox>
125
- <TextTitle>Title</TextTitle>
121
+ <CellTextbox>
122
+ <CellTextboxTitle>Title</CellTextboxTitle>
126
123
  <MyStyledText>My styled Text</MyStyledText>
127
- </Textbox>
124
+ </CellTextbox>
128
125
  </Cell>
129
126
  );
130
127
  },
@@ -51,7 +51,7 @@ const meta: Meta<StoryDropdownProps> = {
51
51
  closeOnEsc: true,
52
52
  isFocusTrapped: true,
53
53
  skidding: 0,
54
- distance: 6,
54
+ distance: 0,
55
55
  },
56
56
  };
57
57
 
@@ -51,7 +51,7 @@ const meta: Meta<StoryDropdownProps> = {
51
51
  closeOnEsc: true,
52
52
  isFocusTrapped: true,
53
53
  skidding: 0,
54
- distance: 6,
54
+ distance: 0,
55
55
  },
56
56
  };
57
57
 
@@ -4,22 +4,25 @@ import { base, CellLeft, CellRight, CellContentWrapper, CellContent } from './Ce
4
4
  import { classes } from './Cell.tokens';
5
5
  import { base as viewCSS } from './variations/_view/base';
6
6
  import { base as sizeCSS } from './variations/_size/base';
7
- import { Textbox } from './Textbox/Textbox';
7
+ import { CellTextbox } from './CellTextbox/CellTextbox';
8
8
  export var cellRoot = function cellRoot(Root) {
9
9
  return /*#__PURE__*/forwardRef(function (_ref, outerRootRef) {
10
10
  var size = _ref.size,
11
11
  view = _ref.view,
12
12
  contentLeft = _ref.contentLeft,
13
13
  contentRight = _ref.contentRight,
14
- _ref$alignLeft = _ref.alignLeft,
15
- alignLeft = _ref$alignLeft === void 0 ? 'center' : _ref$alignLeft,
16
- _ref$alignRight = _ref.alignRight,
17
- alignRight = _ref$alignRight === void 0 ? 'center' : _ref$alignRight,
14
+ _ref$alignContentLeft = _ref.alignContentLeft,
15
+ alignContentLeft = _ref$alignContentLeft === void 0 ? 'center' : _ref$alignContentLeft,
16
+ _ref$alignContentRigh = _ref.alignContentRight,
17
+ alignContentRight = _ref$alignContentRigh === void 0 ? 'center' : _ref$alignContentRigh,
18
18
  children = _ref.children,
19
19
  title = _ref.title,
20
20
  subtitle = _ref.subtitle,
21
21
  label = _ref.label,
22
- stretching = _ref.stretching;
22
+ description = _ref.description,
23
+ content = _ref.content,
24
+ _ref$stretching = _ref.stretching,
25
+ stretching = _ref$stretching === void 0 ? 'filled' : _ref$stretching;
23
26
  var stretchingClass = classes["".concat(stretching, "Stretching")];
24
27
  return /*#__PURE__*/React.createElement(Root, {
25
28
  ref: outerRootRef,
@@ -27,13 +30,14 @@ export var cellRoot = function cellRoot(Root) {
27
30
  view: view,
28
31
  className: cx(stretchingClass, classes.cellRoot)
29
32
  }, contentLeft && /*#__PURE__*/React.createElement(CellLeft, {
30
- align: alignLeft
31
- }, contentLeft), /*#__PURE__*/React.createElement(CellContentWrapper, null, /*#__PURE__*/React.createElement(CellContent, null, title || subtitle || label ? /*#__PURE__*/React.createElement(Textbox, {
33
+ align: alignContentLeft
34
+ }, contentLeft), /*#__PURE__*/React.createElement(CellContentWrapper, null, /*#__PURE__*/React.createElement(CellContent, null, title || description || subtitle || label ? /*#__PURE__*/React.createElement(CellTextbox, {
32
35
  label: label,
36
+ description: description,
33
37
  title: title,
34
38
  subtitle: subtitle
35
- }) : children && children), contentRight && /*#__PURE__*/React.createElement(CellRight, {
36
- align: alignRight
39
+ }) : children || content), contentRight && /*#__PURE__*/React.createElement(CellRight, {
40
+ align: alignContentRight
37
41
  }, contentRight)));
38
42
  });
39
43
  };
@@ -52,7 +56,6 @@ export var cellConfig = {
52
56
  },
53
57
  defaults: {
54
58
  view: 'default',
55
- size: 'm',
56
- stretching: 'filled'
59
+ size: 'm'
57
60
  }
58
61
  };
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { CellTextboxStyled } from './CellTextbox.styles';
3
+ import { CellTextboxLabel } from './ui/CellTextLabel';
4
+ import { CellTextboxTitle } from './ui/CellTextTitle';
5
+ import { CellTextboxSubtitle } from './ui/CellTextSubtitle';
6
+ export var CellTextbox = function CellTextbox(_ref) {
7
+ var label = _ref.label,
8
+ title = _ref.title,
9
+ subtitle = _ref.subtitle,
10
+ description = _ref.description,
11
+ children = _ref.children;
12
+ return /*#__PURE__*/React.createElement(CellTextboxStyled, null, label || title || description || subtitle ? /*#__PURE__*/React.createElement(React.Fragment, null, label && /*#__PURE__*/React.createElement(CellTextboxLabel, null, label), (title || description) && /*#__PURE__*/React.createElement(CellTextboxTitle, null, title || description), subtitle && /*#__PURE__*/React.createElement(CellTextboxSubtitle, null, subtitle)) : children);
13
+ };
@@ -1,5 +1,5 @@
1
1
  import styled from 'styled-components';
2
2
  import { tokens } from '../Cell.tokens';
3
- export var TextboxStyled = /*#__PURE__*/styled.div.withConfig({
4
- componentId: "plasma-new-hope__sc-t2ald4-0"
3
+ export var CellTextboxStyled = /*#__PURE__*/styled.div.withConfig({
4
+ componentId: "plasma-new-hope__sc-1ts73cj-0"
5
5
  })(["display:flex;flex-direction:column;gap:var(", ");"], tokens.cellTextboxGap);
@@ -2,8 +2,8 @@ import React from 'react';
2
2
  import styled from 'styled-components';
3
3
  import { tokens } from '../../Cell.tokens';
4
4
  var StyledTextLabel = /*#__PURE__*/styled.div.withConfig({
5
- componentId: "plasma-new-hope__sc-6e2num-0"
5
+ componentId: "plasma-new-hope__sc-1syy9dx-0"
6
6
  })(["color:var(", ");font-size:var(", ");font-weight:var(", ");font-family:var(", ");font-style:var(", ");line-height:var(", ");letter-spacing:var(", ");"], tokens.cellLabelColor, tokens.cellLabelFontSize, tokens.cellLabelFontWeight, tokens.cellLabelFontFamily, tokens.cellLabelFontStyle, tokens.cellLabelLineHeight, tokens.cellLabelLetterSpacing);
7
- export var TextLabel = function TextLabel(props) {
7
+ export var CellTextboxLabel = function CellTextboxLabel(props) {
8
8
  return /*#__PURE__*/React.createElement(StyledTextLabel, null, props.children);
9
9
  };
@@ -2,8 +2,8 @@ import React from 'react';
2
2
  import styled from 'styled-components';
3
3
  import { tokens } from '../../Cell.tokens';
4
4
  var StyledTextSubtitle = /*#__PURE__*/styled.div.withConfig({
5
- componentId: "plasma-new-hope__sc-jj01ut-0"
5
+ componentId: "plasma-new-hope__sc-ulqa2a-0"
6
6
  })(["color:var(", ");font-size:var(", ");font-weight:var(", ");font-family:var(", ");font-style:var(", ");line-height:var(", ");letter-spacing:var(", ");"], tokens.cellSubtitleColor, tokens.cellSubtitleFontSize, tokens.cellSubtitleFontWeight, tokens.cellSubtitleFontFamily, tokens.cellSubtitleFontStyle, tokens.cellSubtitleLineHeight, tokens.cellSubtitleLetterSpacing);
7
- export var TextSubtitle = function TextSubtitle(props) {
7
+ export var CellTextboxSubtitle = function CellTextboxSubtitle(props) {
8
8
  return /*#__PURE__*/React.createElement(StyledTextSubtitle, null, props.children);
9
9
  };