@salutejs/plasma-new-hope 0.231.0-canary.1647.12467637991.0 → 0.231.0-canary.1657.12468366213.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. package/cjs/components/Autocomplete/Autocomplete.css +4 -4
  2. package/cjs/components/Combobox/ComboboxNew/Combobox.css +4 -4
  3. package/cjs/components/Combobox/ComboboxOld/Combobox.css +4 -4
  4. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +4 -4
  5. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +4 -4
  6. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +4 -4
  7. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +4 -4
  8. package/cjs/components/DatePicker/RangeDate/RangeDate.css +4 -4
  9. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +4 -4
  10. package/cjs/components/DatePicker/SingleDate/SingleDate.css +4 -4
  11. package/cjs/components/Dropdown/Dropdown.css +4 -4
  12. package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.css +4 -4
  13. package/cjs/components/Flow/Flow.css +1 -0
  14. package/cjs/components/Flow/Flow.js +58 -0
  15. package/cjs/components/Flow/Flow.js.map +1 -0
  16. package/cjs/components/Flow/Flow.styles.js +9 -0
  17. package/cjs/components/Flow/Flow.styles.js.map +1 -0
  18. package/cjs/components/Flow/Flow.styles_1xdoipm.css +1 -0
  19. package/cjs/components/Pagination/Pagination.css +4 -4
  20. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +4 -4
  21. package/cjs/components/Popover/Popover.css +4 -4
  22. package/cjs/components/Popover/Popover.js +5 -9
  23. package/cjs/components/Popover/Popover.js.map +1 -1
  24. package/cjs/components/Popover/Popover.styles.js +7 -7
  25. package/cjs/components/Popover/Popover.styles.js.map +1 -1
  26. package/cjs/components/Popover/{Popover.styles_gh4xvw.css → Popover.styles_mzmbre.css} +2 -2
  27. package/cjs/components/Popover/Popover.tokens.js +1 -2
  28. package/cjs/components/Popover/Popover.tokens.js.map +1 -1
  29. package/cjs/components/Portal/Portal.js +1 -1
  30. package/cjs/components/Portal/Portal.js.map +1 -1
  31. package/cjs/components/Range/Range.css +4 -4
  32. package/cjs/components/Select/Select.css +4 -4
  33. package/cjs/components/Select/ui/Target/Target.css +4 -4
  34. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +4 -4
  35. package/cjs/components/Slider/Slider.css +4 -4
  36. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +4 -4
  37. package/cjs/components/TextArea/ui/Hint/Hint.css +4 -4
  38. package/cjs/components/TextField/ui/Hint/Hint.css +4 -4
  39. package/cjs/index.css +6 -4
  40. package/cjs/index.js +3 -0
  41. package/cjs/index.js.map +1 -1
  42. package/emotion/cjs/components/ElasticGrid/ElasticGrid.js +5 -0
  43. package/emotion/cjs/components/ElasticGrid/index.js +5 -0
  44. package/emotion/cjs/components/Flow/Flow.js +66 -0
  45. package/emotion/cjs/components/Flow/Flow.styles.js +17 -0
  46. package/emotion/cjs/components/Flow/Flow.types.js +5 -0
  47. package/emotion/cjs/components/Flow/index.js +18 -0
  48. package/emotion/cjs/components/Popover/Popover.js +6 -10
  49. package/emotion/cjs/components/Popover/Popover.styles.js +16 -8
  50. package/emotion/cjs/components/Popover/Popover.template-doc.mdx +43 -128
  51. package/emotion/cjs/components/Popover/Popover.tokens.js +1 -2
  52. package/emotion/cjs/components/Portal/Portal.js +1 -1
  53. package/emotion/cjs/examples/plasma_b2c/components/Flow/Flow.config.js +10 -0
  54. package/emotion/cjs/examples/plasma_b2c/components/Flow/Flow.js +11 -0
  55. package/emotion/cjs/examples/plasma_b2c/components/Flow/Flow.stories.tsx +114 -0
  56. package/emotion/cjs/index.js +11 -0
  57. package/emotion/es/components/ElasticGrid/ElasticGrid.js +1 -0
  58. package/emotion/es/components/ElasticGrid/index.js +1 -0
  59. package/emotion/es/components/Flow/Flow.js +57 -0
  60. package/emotion/es/components/Flow/Flow.styles.js +11 -0
  61. package/emotion/es/components/Flow/Flow.types.js +1 -0
  62. package/emotion/es/components/Flow/index.js +1 -0
  63. package/emotion/es/components/Popover/Popover.js +7 -11
  64. package/emotion/es/components/Popover/Popover.styles.js +16 -8
  65. package/emotion/es/components/Popover/Popover.template-doc.mdx +43 -128
  66. package/emotion/es/components/Popover/Popover.tokens.js +1 -2
  67. package/emotion/es/components/Portal/Portal.js +1 -1
  68. package/emotion/es/examples/plasma_b2c/components/Flow/Flow.config.js +4 -0
  69. package/emotion/es/examples/plasma_b2c/components/Flow/Flow.js +5 -0
  70. package/emotion/es/examples/plasma_b2c/components/Flow/Flow.stories.tsx +114 -0
  71. package/emotion/es/index.js +1 -0
  72. package/es/components/Autocomplete/Autocomplete.css +4 -4
  73. package/es/components/Combobox/ComboboxNew/Combobox.css +4 -4
  74. package/es/components/Combobox/ComboboxOld/Combobox.css +4 -4
  75. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +4 -4
  76. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +4 -4
  77. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +4 -4
  78. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +4 -4
  79. package/es/components/DatePicker/RangeDate/RangeDate.css +4 -4
  80. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +4 -4
  81. package/es/components/DatePicker/SingleDate/SingleDate.css +4 -4
  82. package/es/components/Dropdown/Dropdown.css +4 -4
  83. package/es/components/Dropdown/ui/DropdownOld/DropdownOld.css +4 -4
  84. package/es/components/Flow/Flow.css +1 -0
  85. package/es/components/Flow/Flow.js +53 -0
  86. package/es/components/Flow/Flow.js.map +1 -0
  87. package/es/components/Flow/Flow.styles.js +5 -0
  88. package/es/components/Flow/Flow.styles.js.map +1 -0
  89. package/es/components/Flow/Flow.styles_1xdoipm.css +1 -0
  90. package/es/components/Pagination/Pagination.css +4 -4
  91. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +4 -4
  92. package/es/components/Popover/Popover.css +4 -4
  93. package/es/components/Popover/Popover.js +7 -11
  94. package/es/components/Popover/Popover.js.map +1 -1
  95. package/es/components/Popover/Popover.styles.js +7 -7
  96. package/es/components/Popover/Popover.styles.js.map +1 -1
  97. package/es/components/Popover/{Popover.styles_gh4xvw.css → Popover.styles_mzmbre.css} +2 -2
  98. package/es/components/Popover/Popover.tokens.js +1 -2
  99. package/es/components/Popover/Popover.tokens.js.map +1 -1
  100. package/es/components/Portal/Portal.js +1 -1
  101. package/es/components/Portal/Portal.js.map +1 -1
  102. package/es/components/Range/Range.css +4 -4
  103. package/es/components/Select/Select.css +4 -4
  104. package/es/components/Select/ui/Target/Target.css +4 -4
  105. package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +4 -4
  106. package/es/components/Slider/Slider.css +4 -4
  107. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +4 -4
  108. package/es/components/TextArea/ui/Hint/Hint.css +4 -4
  109. package/es/components/TextField/ui/Hint/Hint.css +4 -4
  110. package/es/index.css +6 -4
  111. package/es/index.js +1 -0
  112. package/es/index.js.map +1 -1
  113. package/package.json +2 -2
  114. package/styled-components/cjs/components/ElasticGrid/ElasticGrid.js +5 -0
  115. package/styled-components/cjs/components/ElasticGrid/index.js +5 -0
  116. package/styled-components/cjs/components/Flow/Flow.js +66 -0
  117. package/styled-components/cjs/components/Flow/Flow.styles.js +8 -0
  118. package/styled-components/cjs/components/Flow/Flow.types.js +5 -0
  119. package/styled-components/cjs/components/Flow/index.js +18 -0
  120. package/styled-components/cjs/components/Popover/Popover.js +6 -10
  121. package/styled-components/cjs/components/Popover/Popover.styles.js +4 -4
  122. package/styled-components/cjs/components/Popover/Popover.template-doc.mdx +43 -128
  123. package/styled-components/cjs/components/Popover/Popover.tokens.js +1 -2
  124. package/styled-components/cjs/components/Portal/Portal.js +1 -1
  125. package/styled-components/cjs/examples/plasma_b2c/components/Flow/Flow.config.js +10 -0
  126. package/styled-components/cjs/examples/plasma_b2c/components/Flow/Flow.js +11 -0
  127. package/styled-components/cjs/examples/plasma_b2c/components/Flow/Flow.stories.tsx +114 -0
  128. package/styled-components/cjs/index.js +11 -0
  129. package/styled-components/es/components/ElasticGrid/ElasticGrid.js +1 -0
  130. package/styled-components/es/components/ElasticGrid/index.js +1 -0
  131. package/styled-components/es/components/Flow/Flow.js +57 -0
  132. package/styled-components/es/components/Flow/Flow.styles.js +2 -0
  133. package/styled-components/es/components/Flow/Flow.types.js +1 -0
  134. package/styled-components/es/components/Flow/index.js +1 -0
  135. package/styled-components/es/components/Popover/Popover.js +7 -11
  136. package/styled-components/es/components/Popover/Popover.styles.js +4 -4
  137. package/styled-components/es/components/Popover/Popover.template-doc.mdx +43 -128
  138. package/styled-components/es/components/Popover/Popover.tokens.js +1 -2
  139. package/styled-components/es/components/Portal/Portal.js +1 -1
  140. package/styled-components/es/examples/plasma_b2c/components/Flow/Flow.config.js +4 -0
  141. package/styled-components/es/examples/plasma_b2c/components/Flow/Flow.js +5 -0
  142. package/styled-components/es/examples/plasma_b2c/components/Flow/Flow.stories.tsx +114 -0
  143. package/styled-components/es/index.js +1 -0
  144. package/types/components/ElasticGrid/ElasticGrid.d.ts +2 -0
  145. package/types/components/ElasticGrid/ElasticGrid.d.ts.map +1 -0
  146. package/types/components/ElasticGrid/index.d.ts +2 -0
  147. package/types/components/ElasticGrid/index.d.ts.map +1 -0
  148. package/types/components/Flow/Flow.d.ts +13 -0
  149. package/types/components/Flow/Flow.d.ts.map +1 -0
  150. package/types/components/Flow/Flow.styles.d.ts +2 -0
  151. package/types/components/Flow/Flow.styles.d.ts.map +1 -0
  152. package/types/components/Flow/Flow.types.d.ts +35 -0
  153. package/types/components/Flow/Flow.types.d.ts.map +1 -0
  154. package/types/components/Flow/index.d.ts +2 -0
  155. package/types/components/Flow/index.d.ts.map +1 -0
  156. package/types/components/Popover/Popover.d.ts.map +1 -1
  157. package/types/components/Popover/Popover.styles.d.ts +1 -1
  158. package/types/components/Popover/Popover.styles.d.ts.map +1 -1
  159. package/types/components/Popover/Popover.tokens.d.ts +0 -1
  160. package/types/components/Popover/Popover.tokens.d.ts.map +1 -1
  161. package/types/components/Popover/Popover.types.d.ts +4 -4
  162. package/types/components/Popover/Popover.types.d.ts.map +1 -1
  163. package/types/components/Portal/Portal.types.d.ts +1 -1
  164. package/types/components/Portal/Portal.types.d.ts.map +1 -1
  165. package/types/examples/plasma_b2c/components/Flow/Flow.config.d.ts +5 -0
  166. package/types/examples/plasma_b2c/components/Flow/Flow.config.d.ts.map +1 -0
  167. package/types/examples/plasma_b2c/components/Flow/Flow.d.ts +3 -0
  168. package/types/examples/plasma_b2c/components/Flow/Flow.d.ts.map +1 -0
  169. package/types/index.d.ts +1 -0
  170. package/types/index.d.ts.map +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salutejs/plasma-new-hope",
3
- "version": "0.231.0-canary.1647.12467637991.0",
3
+ "version": "0.231.0-canary.1657.12468366213.0",
4
4
  "description": "Salute Design System blueprint",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./es/index.js",
@@ -145,5 +145,5 @@
145
145
  "sideEffects": [
146
146
  "*.css"
147
147
  ],
148
- "gitHead": "fc203c7c3b4fd9b49d427593fd8d378a7341d587"
148
+ "gitHead": "244fb959385dd346ba763e3e2f8fabd0d80e8f64"
149
149
  }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.flowRoot = exports.flowConfig = void 0;
8
+ var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
9
+ var _classnames = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("classnames"));
10
+ var _Flow = /*#__PURE__*/require("./Flow.styles");
11
+ var _excluded = ["children", "className", "style", "orientation", "arrangement", "alignment", "mainAxisGap", "crossAxisGap", "minColWidth", "itemsPerLine"];
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
+ 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); }
14
+ 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 && {}.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; }
15
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
17
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
20
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
21
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
22
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
23
+ var flowRoot = exports.flowRoot = function flowRoot(Root) {
24
+ return /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
25
+ var children = _ref.children,
26
+ className = _ref.className,
27
+ style = _ref.style,
28
+ _ref$orientation = _ref.orientation,
29
+ orientation = _ref$orientation === void 0 ? 'horizontal' : _ref$orientation,
30
+ arrangement = _ref.arrangement,
31
+ alignment = _ref.alignment,
32
+ _ref$mainAxisGap = _ref.mainAxisGap,
33
+ mainAxisGap = _ref$mainAxisGap === void 0 ? '0' : _ref$mainAxisGap,
34
+ _ref$crossAxisGap = _ref.crossAxisGap,
35
+ crossAxisGap = _ref$crossAxisGap === void 0 ? '0' : _ref$crossAxisGap,
36
+ _ref$minColWidth = _ref.minColWidth,
37
+ minColWidth = _ref$minColWidth === void 0 ? 'auto' : _ref$minColWidth,
38
+ itemsPerLine = _ref.itemsPerLine,
39
+ rest = _objectWithoutProperties(_ref, _excluded);
40
+ var hasMinWidth = Boolean(minColWidth && minColWidth !== 'auto');
41
+ var needGrid = Boolean(Number(itemsPerLine) > 0 || hasMinWidth);
42
+ return /*#__PURE__*/_react["default"].createElement(Root, _extends({
43
+ ref: ref,
44
+ className: (0, _classnames["default"])(className, {
45
+ vertical: orientation === 'vertical',
46
+ grid: needGrid,
47
+ elastic: hasMinWidth
48
+ }),
49
+ style: _objectSpread(_objectSpread({}, style), {}, {
50
+ '--plasma-private-gap': "".concat(mainAxisGap, " ").concat(crossAxisGap),
51
+ '--plasma-private-items': String(itemsPerLine),
52
+ '--plasma-private-min-width': String(minColWidth)
53
+ }),
54
+ "data-arrangement": arrangement,
55
+ "data-alignment": alignment
56
+ }, rest), children);
57
+ });
58
+ };
59
+ var flowConfig = exports.flowConfig = {
60
+ name: 'Flow',
61
+ tag: 'div',
62
+ layout: flowRoot,
63
+ base: _Flow.base,
64
+ defaults: {},
65
+ variations: {}
66
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.base = void 0;
7
+ var _styledComponents = /*#__PURE__*/require("styled-components");
8
+ var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["display:flex;flex-direction:row;flex-wrap:wrap;gap:var(--plasma-private-gap);border-radius:0.5rem;&.vertical{flex-direction:column;}&.grid{display:grid;grid-template-columns:repeat(var(--plasma-private-items),auto);grid-auto-flow:row;&.elastic{grid-template-columns:repeat(auto-fill,minmax(var(--plasma-private-min-width),auto));grid-auto-flow:row;}&:not(.vertical){&[data-arrangement='start']{justify-items:start;}&[data-arrangement='center']{justify-items:center;}&[data-arrangement='end']{justify-items:end;}&[data-arrangement='spaceBetween']{justify-content:space-between;}&[data-arrangement='spaceAround']{justify-content:space-around;}&[data-alignment='start']{align-items:start;}&[data-alignment='center']{align-items:center;}&[data-alignment='end']{align-items:end;}}&.vertical{grid-template-columns:auto;grid-template-rows:repeat(var(--plasma-private-items),auto);grid-auto-flow:column;&[data-arrangement='start']{align-items:start;}&[data-arrangement='center']{align-items:center;}&[data-arrangement='end']{align-items:end;}&[data-arrangement='spaceBetween']{align-content:space-between;align-items:normal;}&[data-arrangement='spaceAround']{align-content:space-around;align-items:normal;}&[data-alignment='start']{justify-items:start;}&[data-alignment='center']{justify-items:center;}&[data-alignment='end']{justify-items:end;}}}&:not(&.grid){&[data-arrangement='start']{justify-content:start;}&[data-arrangement='center']{justify-content:center;}&[data-arrangement='end']{justify-content:end;}&[data-arrangement='spaceBetween']{justify-content:space-between;}&[data-arrangement='spaceAround']{justify-content:space-around;}&[data-alignment='start']{align-items:start;}&[data-alignment='center']{align-items:center;}&[data-alignment='end']{align-items:end;}}"]);
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "flowConfig", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _Flow.flowConfig;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "flowRoot", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _Flow.flowRoot;
16
+ }
17
+ });
18
+ var _Flow = /*#__PURE__*/require("./Flow");
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
@@ -22,7 +23,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
22
23
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
23
24
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
24
25
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
25
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
26
26
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
27
27
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
28
28
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -82,7 +82,6 @@ var popoverRoot = exports.popoverRoot = function popoverRoot(Root) {
82
82
  var _useState3 = (0, _react.useState)(false),
83
83
  _useState4 = _slicedToArray(_useState3, 2),
84
84
  forceRender = _useState4[1];
85
- var portalContainer = _typeof(target) === 'object' && target !== null && 'current' in target && target.current || undefined;
86
85
  var isAutoArray = Array.isArray(placement);
87
86
  var isAuto = isAutoArray || placement.startsWith('auto');
88
87
  var initialStyles = {
@@ -182,7 +181,7 @@ var popoverRoot = exports.popoverRoot = function popoverRoot(Root) {
182
181
  if (typeof frame !== 'string' && frame && frame.current) {
183
182
  portal = frame.current;
184
183
  }
185
- if (!usePortal && /*#__PURE__*/(0, _react.isValidElement)(target)) {
184
+ if (!usePortal) {
186
185
  portal = rootRef.current;
187
186
  }
188
187
  if (!portal) {
@@ -216,11 +215,8 @@ var popoverRoot = exports.popoverRoot = function popoverRoot(Root) {
216
215
  */
217
216
  Promise.resolve().then(forceUpdate);
218
217
  }, [innerIsOpen, children, forceUpdate]);
219
- return /*#__PURE__*/_react["default"].createElement(_Portal.Portal, {
220
- container: portalContainer,
221
- disabled: /*#__PURE__*/(0, _react.isValidElement)(target)
222
- }, /*#__PURE__*/_react["default"].createElement(_Popover.StyledWrapper, {
223
- className: (0, _utils.cx)(_Popover2.classes.wrapper, ! /*#__PURE__*/(0, _react.isValidElement)(target) && _Popover2.classes.targetAsRef),
218
+ return /*#__PURE__*/_react["default"].createElement(_Popover.StyledWrapper, {
219
+ className: _Popover2.classes.wrapper,
224
220
  onMouseEnter: onMouseEnter,
225
221
  onMouseLeave: onMouseLeave
226
222
  }, /*#__PURE__*/_react["default"].createElement(_Popover.StyledRoot, {
@@ -229,7 +225,7 @@ var popoverRoot = exports.popoverRoot = function popoverRoot(Root) {
229
225
  onFocus: onFocus,
230
226
  onBlur: onBlur,
231
227
  className: (0, _utils.cx)(className, _Popover2.classes.target)
232
- }, /*#__PURE__*/(0, _react.isValidElement)(target) && target), children && portalRef.current && /*#__PURE__*/_react["default"].createElement(_Portal.Portal, {
228
+ }, target), children && portalRef.current && /*#__PURE__*/_react["default"].createElement(_Portal.Portal, {
233
229
  container: portalRef.current
234
230
  }, /*#__PURE__*/_react["default"].createElement(Root, _extends({
235
231
  view: view,
@@ -245,7 +241,7 @@ var popoverRoot = exports.popoverRoot = function popoverRoot(Root) {
245
241
  className: _Popover2.classes.arrow,
246
242
  ref: setArrowElement,
247
243
  style: styles.arrow
248
- }, attributes.arrow)), children)))));
244
+ }, attributes.arrow)), children))));
249
245
  });
250
246
  };
251
247
  var popoverConfig = exports.popoverConfig = {
@@ -8,12 +8,12 @@ var _styledComponents = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/requir
8
8
  var _utils = /*#__PURE__*/require("../Popup/utils");
9
9
  var _Popover = /*#__PURE__*/require("./Popover.tokens");
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
- var StyledRoot = exports.StyledRoot = /*#__PURE__*/_styledComponents["default"].div.withConfig({
12
- componentId: "plasma-new-hope__sc-tnpyex-0"
13
- })(["display:inline-flex;box-sizing:border-box;position:relative;"]);
14
11
  var StyledWrapper = exports.StyledWrapper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
12
+ componentId: "plasma-new-hope__sc-tnpyex-0"
13
+ })(["display:inline-block;"]);
14
+ var StyledRoot = exports.StyledRoot = /*#__PURE__*/_styledComponents["default"].div.withConfig({
15
15
  componentId: "plasma-new-hope__sc-tnpyex-1"
16
- })(["display:inline-block;&.", "{position:absolute;top:0;left:0;width:100%;height:100%;", "{width:100%;height:100%;display:block;}}"], _Popover.classes.targetAsRef, StyledRoot);
16
+ })(["display:inline-flex;box-sizing:border-box;position:relative;"]);
17
17
  var StyledArrow = exports.StyledArrow = /*#__PURE__*/_styledComponents["default"].div.withConfig({
18
18
  componentId: "plasma-new-hope__sc-tnpyex-2"
19
19
  })(["width:var(", ");height:var(", ");&::before{position:absolute;width:var(", ");height:var(", ");mask-image:var(", ");background:var(", ");content:'';transform:rotate(0deg);}"], /*#__PURE__*/String(_Popover.tokens.arrowMaskWidth), /*#__PURE__*/String(_Popover.tokens.arrowMaskHeight), /*#__PURE__*/String(_Popover.tokens.arrowMaskWidth), /*#__PURE__*/String(_Popover.tokens.arrowMaskHeight), /*#__PURE__*/String(_Popover.tokens.arrowMaskImage), /*#__PURE__*/String(_Popover.tokens.arrowBackground));
@@ -4,136 +4,51 @@ title: Popover
4
4
  ---
5
5
 
6
6
  import { PropsTable, Description } from '@site/src/components';
7
- import Tabs from '@theme/Tabs';
8
- import TabItem from '@theme/TabItem';
9
7
 
10
8
  # Popover
11
9
  <Description name="Popover" />
12
10
  <PropsTable name="Popover" />
13
11
 
14
- :::info
15
- `target` может быть как ReactNode, так и RefObject:
16
- :::
17
-
18
- <Tabs>
19
- <TabItem value="reactNode" label="React Node" default>
20
- ```tsx live
21
- import React from 'react';
22
- import styled from "styled-components";
23
- import { surfaceSolidTertiary } from "@salutejs/{{ vertical }}/tokens";
24
- import { Popover, Button } from '@salutejs/{{ package }}';
25
-
26
- export function App() {
27
- const [isOpen, setIsOpen] = React.useState(false);
28
-
29
- const StyledContent = styled.div`
30
- background: ${surfaceSolidTertiary};
31
- padding: 1rem;
32
-
33
- display: flex;
34
- flex-direction: column;
35
- align-items: center;
36
- `;
37
-
38
- return (
39
- <section style=\{{width: '20rem', height: '15rem'}}>
40
- <Popover
41
- opened={isOpen}
42
- onToggle={(is) => setIsOpen(is)}
43
- role="presentation"
44
- id="popover"
45
- target={<Button>Target</Button>}
46
- offset={[0, 6]}
47
- placement='bottom'
48
- trigger='click'
49
- hasArrow
50
- closeOnOverlayClick
51
- closeOnEsc
52
- isFocusTrapped
53
- >
54
- <StyledContent>
55
- <>Content</>
56
- <Button onClick={() => setIsOpen(false)}>close</Button>
57
- </StyledContent>
58
- </Popover>
59
- </section>
60
- );
61
- }
62
- ```
63
- </TabItem>
64
- <TabItem value="refObject" label="RefObject">
65
- ```tsx live
66
- import React, { useRef, useState } from 'react';
67
- import styled from "styled-components";
68
- import { surfaceSolidTertiary } from "@salutejs/{{ vertical }}/tokens";
69
- import { Popover, Button } from '@salutejs/{{ package }}';
70
-
71
- export function App() {
72
- const [isOpen, setIsOpen] = useState(false);
73
-
74
- const targetRef = useRef<HTMLButtonElement | null>(null);
75
- const targetRef2 = useRef<HTMLButtonElement | null>(null);
76
- const targetRef3 = useRef<HTMLButtonElement | null>(null);
77
-
78
- const refs = [targetRef, targetRef2, targetRef3];
79
-
80
- const [currRefIndex, setCurrentRefIndex] = useState(0);
81
- const [currentRef, setCurrentRef] = useState(targetRef);
82
-
83
- const changeRef = () => {
84
- let ind = currRefIndex + 1;
85
-
86
- if (ind > refs.length - 1) {
87
- setCurrentRefIndex(0);
88
- ind = 0;
89
- }
90
-
91
- setCurrentRefIndex(ind);
92
- setCurrentRef(refs[ind]);
93
- };
94
-
95
- const StyledContent = styled.div`
96
- background: ${surfaceSolidTertiary};
97
- padding: 1rem;
98
-
99
- display: flex;
100
- flex-direction: column;
101
- align-items: center;
102
- `;
103
-
104
- return (
105
- <>
106
- <Button ref={targetRef}>Target 0</Button>
107
- <Button style=\{{ margin: '0 5rem' }} onClick={changeRef}>
108
- Change targetAsRef to Target {currRefIndex + 1 > refs.length - 1 ? 0 : currRefIndex + 1}
109
- </Button>
110
- <Button ref={targetRef2}>Target 1</Button>
111
- <Popover
112
- opened={isOpen}
113
- onToggle={(is) => setIsOpen(is)}
114
- role="presentation"
115
- id="popover"
116
- target={currentRef}
117
- offset={[0, 6]}
118
- placement='bottom'
119
- trigger='click'
120
- hasArrow
121
- closeOnOverlayClick
122
- closeOnEsc
123
- isFocusTrapped
124
- >
125
- <StyledContent>
126
- <>Content</>
127
- <Button onClick={() => setIsOpen(false)}>Close</Button>
128
- </StyledContent>
129
- </Popover>
130
-
131
- <div style=\{{ padding: '5rem' }}>Current Target: {currRefIndex}</div>
132
- <Button ref={targetRef3}>Target 2</Button>
133
- </>
134
- );
135
- }
136
- ```
137
- </TabItem>
138
- </Tabs>
139
-
12
+ ```tsx live
13
+ import React from 'react';
14
+ import styled from "styled-components";
15
+ import { surfaceSolidTertiary } from "@salutejs/{{ vertical }}/tokens";
16
+ import { Popover, Button } from '@salutejs/{{ package }}';
17
+
18
+ export function App() {
19
+ const [isOpen, setIsOpen] = React.useState(false);
20
+
21
+ const StyledContent = styled.div`
22
+ background: ${surfaceSolidTertiary};
23
+ padding: 1rem;
24
+
25
+ display: flex;
26
+ flex-direction: column;
27
+ align-items: center;
28
+ `;
29
+
30
+ return (
31
+ <section style=\{{width: '20rem', height: '15rem'}}>
32
+ <Popover
33
+ opened={isOpen}
34
+ onToggle={(is) => setIsOpen(is)}
35
+ role="presentation"
36
+ id="popover"
37
+ target={<Button>Target</Button>}
38
+ offset={[0, 6]}
39
+ hasArrow
40
+ placement='bottom'
41
+ trigger='click'
42
+ closeOnOverlayClick
43
+ closeOnEsc
44
+ isFocusTrapped
45
+ >
46
+ <StyledContent>
47
+ <>Content</>
48
+ <Button onClick={() => setIsOpen(false)}>close</Button>
49
+ </StyledContent>
50
+ </Popover>
51
+ </section>
52
+ );
53
+ }
54
+ ```
@@ -8,8 +8,7 @@ var classes = exports.classes = {
8
8
  wrapper: 'popover-wrapper',
9
9
  root: 'popover-root',
10
10
  target: 'popover-target',
11
- arrow: 'popover-arrow',
12
- targetAsRef: 'popover-target-as-ref'
11
+ arrow: 'popover-arrow'
13
12
  };
14
13
  var tokens = exports.tokens = {
15
14
  arrowMaskWidth: '--plasma-popover-arrow-mask-width',
@@ -21,5 +21,5 @@ var Portal = exports.Portal = function Portal(_ref) {
21
21
  return null;
22
22
  }
23
23
  var portalContainer = typeof container === 'function' ? container() : container;
24
- return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, (disabled || !portalContainer) && children, !disabled && portalContainer && /*#__PURE__*/_reactDom["default"].createPortal(children, portalContainer));
24
+ return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, disabled && children, !disabled && /*#__PURE__*/_reactDom["default"].createPortal(children, portalContainer));
25
25
  };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.config = void 0;
7
+ var config = exports.config = {
8
+ defaults: {},
9
+ variations: {}
10
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Flow = void 0;
7
+ var _Flow = /*#__PURE__*/require("../../../../components/Flow");
8
+ var _engines = /*#__PURE__*/require("../../../../engines");
9
+ var _Flow2 = /*#__PURE__*/require("./Flow.config");
10
+ var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_Flow.flowConfig, _Flow2.config);
11
+ var Flow = exports.Flow = /*#__PURE__*/(0, _engines.component)(mergedConfig);
@@ -0,0 +1,114 @@
1
+ import React, { ComponentProps } from 'react';
2
+ import type { StoryObj, Meta } from '@storybook/react';
3
+ import styled from 'styled-components';
4
+
5
+ import { WithTheme } from '../../../_helpers';
6
+
7
+ import { Flow } from './Flow';
8
+
9
+ const orientations = ['vertical', 'horizontal'];
10
+ const arrangements = ['start', 'center', 'end', 'spaceBetween', 'spaceAround'];
11
+ const alignments = ['start', 'center', 'end'];
12
+
13
+ const widths = [100, 32, 171, 74, 179, 55];
14
+ const heights = [10, 50, 45, 33, 14, 55];
15
+
16
+ const Item = styled.div`
17
+ padding: 0.5rem 1rem;
18
+ border-radius: 0.5rem;
19
+ background: #aab1e9;
20
+ display: flex;
21
+ align-items: center;
22
+ justify-content: center;
23
+ `;
24
+
25
+ const meta: Meta<typeof Flow> = {
26
+ title: 'b2c/Data Display/Flow',
27
+ component: Flow,
28
+ decorators: [WithTheme],
29
+ argTypes: {
30
+ itemsCount: {
31
+ control: {
32
+ type: 'number',
33
+ },
34
+ },
35
+ height: {
36
+ control: {
37
+ type: 'text',
38
+ },
39
+ if: { arg: 'orientation', eq: 'vertical' },
40
+ },
41
+ orientation: {
42
+ options: orientations,
43
+ control: {
44
+ type: 'select',
45
+ },
46
+ },
47
+ arrangement: {
48
+ options: arrangements,
49
+ control: {
50
+ type: 'select',
51
+ },
52
+ },
53
+ alignment: {
54
+ options: alignments,
55
+ control: {
56
+ type: 'select',
57
+ },
58
+ },
59
+ mainAxisGap: {
60
+ control: {
61
+ type: 'text',
62
+ },
63
+ },
64
+ crossAxisGap: {
65
+ control: {
66
+ type: 'text',
67
+ },
68
+ },
69
+ itemsPerLine: {
70
+ control: {
71
+ type: 'number',
72
+ },
73
+ },
74
+ minColWidth: {
75
+ control: {
76
+ type: 'text',
77
+ },
78
+ },
79
+ },
80
+ };
81
+
82
+ export default meta;
83
+
84
+ type Story = StoryObj<typeof Flow>;
85
+
86
+ export const Default: Story = {
87
+ args: {
88
+ height: '13rem',
89
+ orientation: 'horizontal',
90
+ arrangement: 'start',
91
+ alignment: 'start',
92
+ mainAxisGap: '0',
93
+ crossAxisGap: '0',
94
+ minColWidth: 'auto',
95
+ itemsCount: 6,
96
+ },
97
+ render: ({ itemsCount, height, ...args }: ComponentProps<typeof Flow>) => {
98
+ return (
99
+ <Flow {...args} style={{ maxWidth: '28rem', height: height || 'auto' }}>
100
+ {new Array(itemsCount).fill(null).map((width, index) => (
101
+ <Item
102
+ key={index}
103
+ style={{
104
+ minWidth: widths[index % widths.length],
105
+ minHeight: heights[index % heights.length],
106
+ }}
107
+ >
108
+ {index + 1}
109
+ </Item>
110
+ ))}
111
+ </Flow>
112
+ );
113
+ },
114
+ };
@@ -135,6 +135,17 @@ Object.keys(_Cell).forEach(function (key) {
135
135
  }
136
136
  });
137
137
  });
138
+ var _Flow = /*#__PURE__*/require("./components/Flow");
139
+ Object.keys(_Flow).forEach(function (key) {
140
+ if (key === "default" || key === "__esModule") return;
141
+ if (key in exports && exports[key] === _Flow[key]) return;
142
+ Object.defineProperty(exports, key, {
143
+ enumerable: true,
144
+ get: function get() {
145
+ return _Flow[key];
146
+ }
147
+ });
148
+ });
138
149
  var _Link = /*#__PURE__*/require("./components/Link");
139
150
  Object.keys(_Link).forEach(function (key) {
140
151
  if (key === "default" || key === "__esModule") return;
@@ -0,0 +1,57 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["children", "className", "style", "orientation", "arrangement", "alignment", "mainAxisGap", "crossAxisGap", "minColWidth", "itemsPerLine"];
3
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
8
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
+ import React, { forwardRef } from 'react';
12
+ import cls from 'classnames';
13
+ import { base } from './Flow.styles';
14
+ export var flowRoot = function flowRoot(Root) {
15
+ return /*#__PURE__*/forwardRef(function (_ref, ref) {
16
+ var children = _ref.children,
17
+ className = _ref.className,
18
+ style = _ref.style,
19
+ _ref$orientation = _ref.orientation,
20
+ orientation = _ref$orientation === void 0 ? 'horizontal' : _ref$orientation,
21
+ arrangement = _ref.arrangement,
22
+ alignment = _ref.alignment,
23
+ _ref$mainAxisGap = _ref.mainAxisGap,
24
+ mainAxisGap = _ref$mainAxisGap === void 0 ? '0' : _ref$mainAxisGap,
25
+ _ref$crossAxisGap = _ref.crossAxisGap,
26
+ crossAxisGap = _ref$crossAxisGap === void 0 ? '0' : _ref$crossAxisGap,
27
+ _ref$minColWidth = _ref.minColWidth,
28
+ minColWidth = _ref$minColWidth === void 0 ? 'auto' : _ref$minColWidth,
29
+ itemsPerLine = _ref.itemsPerLine,
30
+ rest = _objectWithoutProperties(_ref, _excluded);
31
+ var hasMinWidth = Boolean(minColWidth && minColWidth !== 'auto');
32
+ var needGrid = Boolean(Number(itemsPerLine) > 0 || hasMinWidth);
33
+ return /*#__PURE__*/React.createElement(Root, _extends({
34
+ ref: ref,
35
+ className: cls(className, {
36
+ vertical: orientation === 'vertical',
37
+ grid: needGrid,
38
+ elastic: hasMinWidth
39
+ }),
40
+ style: _objectSpread(_objectSpread({}, style), {}, {
41
+ '--plasma-private-gap': "".concat(mainAxisGap, " ").concat(crossAxisGap),
42
+ '--plasma-private-items': String(itemsPerLine),
43
+ '--plasma-private-min-width': String(minColWidth)
44
+ }),
45
+ "data-arrangement": arrangement,
46
+ "data-alignment": alignment
47
+ }, rest), children);
48
+ });
49
+ };
50
+ export var flowConfig = {
51
+ name: 'Flow',
52
+ tag: 'div',
53
+ layout: flowRoot,
54
+ base: base,
55
+ defaults: {},
56
+ variations: {}
57
+ };