@salutejs/plasma-new-hope 0.231.0-canary.1657.12468366213.0 → 0.231.0-dev.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Autocomplete/Autocomplete.css +4 -4
- package/cjs/components/Combobox/ComboboxNew/Combobox.css +4 -4
- package/cjs/components/Combobox/ComboboxOld/Combobox.css +4 -4
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +4 -4
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +4 -4
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +4 -4
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +4 -4
- package/cjs/components/DatePicker/RangeDate/RangeDate.css +4 -4
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +4 -4
- package/cjs/components/DatePicker/SingleDate/SingleDate.css +4 -4
- package/cjs/components/Dropdown/Dropdown.css +4 -4
- package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.css +4 -4
- package/cjs/components/Pagination/Pagination.css +4 -4
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +4 -4
- package/cjs/components/Popover/Popover.css +4 -4
- package/cjs/components/Popover/Popover.js +9 -5
- package/cjs/components/Popover/Popover.js.map +1 -1
- package/cjs/components/Popover/Popover.styles.js +7 -7
- package/cjs/components/Popover/Popover.styles.js.map +1 -1
- package/cjs/components/Popover/{Popover.styles_mzmbre.css → Popover.styles_gh4xvw.css} +2 -2
- package/cjs/components/Popover/Popover.tokens.js +2 -1
- package/cjs/components/Popover/Popover.tokens.js.map +1 -1
- package/cjs/components/Portal/Portal.js +1 -1
- package/cjs/components/Portal/Portal.js.map +1 -1
- package/cjs/components/Range/Range.css +4 -4
- package/cjs/components/Select/Select.css +4 -4
- package/cjs/components/Select/ui/Target/Target.css +4 -4
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +4 -4
- package/cjs/components/Slider/Slider.css +4 -4
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +4 -4
- package/cjs/components/TextArea/ui/Hint/Hint.css +4 -4
- package/cjs/components/TextField/ui/Hint/Hint.css +4 -4
- package/cjs/index.css +4 -6
- package/cjs/index.js +0 -3
- package/cjs/index.js.map +1 -1
- package/emotion/cjs/components/Popover/Popover.js +10 -6
- package/emotion/cjs/components/Popover/Popover.styles.js +8 -16
- package/emotion/cjs/components/Popover/Popover.template-doc.mdx +128 -43
- package/emotion/cjs/components/Popover/Popover.tokens.js +2 -1
- package/emotion/cjs/components/Portal/Portal.js +1 -1
- package/emotion/cjs/index.js +0 -11
- package/emotion/es/components/Popover/Popover.js +11 -7
- package/emotion/es/components/Popover/Popover.styles.js +8 -16
- package/emotion/es/components/Popover/Popover.template-doc.mdx +128 -43
- package/emotion/es/components/Popover/Popover.tokens.js +2 -1
- package/emotion/es/components/Portal/Portal.js +1 -1
- package/emotion/es/index.js +0 -1
- package/es/components/Autocomplete/Autocomplete.css +4 -4
- package/es/components/Combobox/ComboboxNew/Combobox.css +4 -4
- package/es/components/Combobox/ComboboxOld/Combobox.css +4 -4
- package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +4 -4
- package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +4 -4
- package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +4 -4
- package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +4 -4
- package/es/components/DatePicker/RangeDate/RangeDate.css +4 -4
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +4 -4
- package/es/components/DatePicker/SingleDate/SingleDate.css +4 -4
- package/es/components/Dropdown/Dropdown.css +4 -4
- package/es/components/Dropdown/ui/DropdownOld/DropdownOld.css +4 -4
- package/es/components/Pagination/Pagination.css +4 -4
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +4 -4
- package/es/components/Popover/Popover.css +4 -4
- package/es/components/Popover/Popover.js +11 -7
- package/es/components/Popover/Popover.js.map +1 -1
- package/es/components/Popover/Popover.styles.js +7 -7
- package/es/components/Popover/Popover.styles.js.map +1 -1
- package/es/components/Popover/{Popover.styles_mzmbre.css → Popover.styles_gh4xvw.css} +2 -2
- package/es/components/Popover/Popover.tokens.js +2 -1
- package/es/components/Popover/Popover.tokens.js.map +1 -1
- package/es/components/Portal/Portal.js +1 -1
- package/es/components/Portal/Portal.js.map +1 -1
- package/es/components/Range/Range.css +4 -4
- package/es/components/Select/Select.css +4 -4
- package/es/components/Select/ui/Target/Target.css +4 -4
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +4 -4
- package/es/components/Slider/Slider.css +4 -4
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +4 -4
- package/es/components/TextArea/ui/Hint/Hint.css +4 -4
- package/es/components/TextField/ui/Hint/Hint.css +4 -4
- package/es/index.css +4 -6
- package/es/index.js +0 -1
- package/es/index.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Popover/Popover.js +10 -6
- package/styled-components/cjs/components/Popover/Popover.styles.js +4 -4
- package/styled-components/cjs/components/Popover/Popover.template-doc.mdx +128 -43
- package/styled-components/cjs/components/Popover/Popover.tokens.js +2 -1
- package/styled-components/cjs/components/Portal/Portal.js +1 -1
- package/styled-components/cjs/index.js +0 -11
- package/styled-components/es/components/Popover/Popover.js +11 -7
- package/styled-components/es/components/Popover/Popover.styles.js +4 -4
- package/styled-components/es/components/Popover/Popover.template-doc.mdx +128 -43
- package/styled-components/es/components/Popover/Popover.tokens.js +2 -1
- package/styled-components/es/components/Portal/Portal.js +1 -1
- package/styled-components/es/index.js +0 -1
- package/types/components/Popover/Popover.d.ts.map +1 -1
- package/types/components/Popover/Popover.styles.d.ts +1 -1
- package/types/components/Popover/Popover.styles.d.ts.map +1 -1
- package/types/components/Popover/Popover.tokens.d.ts +1 -0
- package/types/components/Popover/Popover.tokens.d.ts.map +1 -1
- package/types/components/Popover/Popover.types.d.ts +4 -4
- package/types/components/Popover/Popover.types.d.ts.map +1 -1
- package/types/components/Portal/Portal.types.d.ts +1 -1
- package/types/components/Portal/Portal.types.d.ts.map +1 -1
- package/types/index.d.ts +0 -1
- package/types/index.d.ts.map +1 -1
- package/cjs/components/Flow/Flow.css +0 -1
- package/cjs/components/Flow/Flow.js +0 -58
- package/cjs/components/Flow/Flow.js.map +0 -1
- package/cjs/components/Flow/Flow.styles.js +0 -9
- package/cjs/components/Flow/Flow.styles.js.map +0 -1
- package/cjs/components/Flow/Flow.styles_1xdoipm.css +0 -1
- package/emotion/cjs/components/ElasticGrid/ElasticGrid.js +0 -5
- package/emotion/cjs/components/ElasticGrid/index.js +0 -5
- package/emotion/cjs/components/Flow/Flow.js +0 -66
- package/emotion/cjs/components/Flow/Flow.styles.js +0 -17
- package/emotion/cjs/components/Flow/Flow.types.js +0 -5
- package/emotion/cjs/components/Flow/index.js +0 -18
- package/emotion/cjs/examples/plasma_b2c/components/Flow/Flow.config.js +0 -10
- package/emotion/cjs/examples/plasma_b2c/components/Flow/Flow.js +0 -11
- package/emotion/cjs/examples/plasma_b2c/components/Flow/Flow.stories.tsx +0 -114
- package/emotion/es/components/ElasticGrid/ElasticGrid.js +0 -1
- package/emotion/es/components/ElasticGrid/index.js +0 -1
- package/emotion/es/components/Flow/Flow.js +0 -57
- package/emotion/es/components/Flow/Flow.styles.js +0 -11
- package/emotion/es/components/Flow/Flow.types.js +0 -1
- package/emotion/es/components/Flow/index.js +0 -1
- package/emotion/es/examples/plasma_b2c/components/Flow/Flow.config.js +0 -4
- package/emotion/es/examples/plasma_b2c/components/Flow/Flow.js +0 -5
- package/emotion/es/examples/plasma_b2c/components/Flow/Flow.stories.tsx +0 -114
- package/es/components/Flow/Flow.css +0 -1
- package/es/components/Flow/Flow.js +0 -53
- package/es/components/Flow/Flow.js.map +0 -1
- package/es/components/Flow/Flow.styles.js +0 -5
- package/es/components/Flow/Flow.styles.js.map +0 -1
- package/es/components/Flow/Flow.styles_1xdoipm.css +0 -1
- package/styled-components/cjs/components/ElasticGrid/ElasticGrid.js +0 -5
- package/styled-components/cjs/components/ElasticGrid/index.js +0 -5
- package/styled-components/cjs/components/Flow/Flow.js +0 -66
- package/styled-components/cjs/components/Flow/Flow.styles.js +0 -8
- package/styled-components/cjs/components/Flow/Flow.types.js +0 -5
- package/styled-components/cjs/components/Flow/index.js +0 -18
- package/styled-components/cjs/examples/plasma_b2c/components/Flow/Flow.config.js +0 -10
- package/styled-components/cjs/examples/plasma_b2c/components/Flow/Flow.js +0 -11
- package/styled-components/cjs/examples/plasma_b2c/components/Flow/Flow.stories.tsx +0 -114
- package/styled-components/es/components/ElasticGrid/ElasticGrid.js +0 -1
- package/styled-components/es/components/ElasticGrid/index.js +0 -1
- package/styled-components/es/components/Flow/Flow.js +0 -57
- package/styled-components/es/components/Flow/Flow.styles.js +0 -2
- package/styled-components/es/components/Flow/Flow.types.js +0 -1
- package/styled-components/es/components/Flow/index.js +0 -1
- package/styled-components/es/examples/plasma_b2c/components/Flow/Flow.config.js +0 -4
- package/styled-components/es/examples/plasma_b2c/components/Flow/Flow.js +0 -5
- package/styled-components/es/examples/plasma_b2c/components/Flow/Flow.stories.tsx +0 -114
- package/types/components/ElasticGrid/ElasticGrid.d.ts +0 -2
- package/types/components/ElasticGrid/ElasticGrid.d.ts.map +0 -1
- package/types/components/ElasticGrid/index.d.ts +0 -2
- package/types/components/ElasticGrid/index.d.ts.map +0 -1
- package/types/components/Flow/Flow.d.ts +0 -13
- package/types/components/Flow/Flow.d.ts.map +0 -1
- package/types/components/Flow/Flow.styles.d.ts +0 -2
- package/types/components/Flow/Flow.styles.d.ts.map +0 -1
- package/types/components/Flow/Flow.types.d.ts +0 -35
- package/types/components/Flow/Flow.types.d.ts.map +0 -1
- package/types/components/Flow/index.d.ts +0 -2
- package/types/components/Flow/index.d.ts.map +0 -1
- package/types/examples/plasma_b2c/components/Flow/Flow.config.d.ts +0 -5
- package/types/examples/plasma_b2c/components/Flow/Flow.config.d.ts.map +0 -1
- package/types/examples/plasma_b2c/components/Flow/Flow.d.ts +0 -3
- package/types/examples/plasma_b2c/components/Flow/Flow.d.ts.map +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
.Flow_styles_1xdoipm_b1iyfec1__ec36d063{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--plasma-private-gap);border-radius:0.5rem;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_vertical__ec36d063{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063{display:grid;grid-template-columns:repeat(var(--plasma-private-items),auto);grid-auto-flow:row;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063.Flow_styles_1xdoipm_elastic__ec36d063{grid-template-columns:repeat(auto-fill,minmax(var(--plasma-private-min-width),auto));grid-auto-flow:row;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063:not(.Flow_styles_1xdoipm_vertical__ec36d063)[data-arrangement='start']{justify-items:start;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063:not(.Flow_styles_1xdoipm_vertical__ec36d063)[data-arrangement='center']{justify-items:center;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063:not(.Flow_styles_1xdoipm_vertical__ec36d063)[data-arrangement='end']{justify-items:end;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063:not(.Flow_styles_1xdoipm_vertical__ec36d063)[data-arrangement='spaceBetween']{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063:not(.Flow_styles_1xdoipm_vertical__ec36d063)[data-arrangement='spaceAround']{-webkit-box-pack:space-around;-webkit-justify-content:space-around;-ms-flex-pack:space-around;justify-content:space-around;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063:not(.Flow_styles_1xdoipm_vertical__ec36d063)[data-alignment='start']{-webkit-align-items:start;-webkit-box-align:start;-ms-flex-align:start;align-items:start;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063:not(.Flow_styles_1xdoipm_vertical__ec36d063)[data-alignment='center']{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063:not(.Flow_styles_1xdoipm_vertical__ec36d063)[data-alignment='end']{-webkit-align-items:end;-webkit-box-align:end;-ms-flex-align:end;align-items:end;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063.Flow_styles_1xdoipm_vertical__ec36d063{grid-template-columns:auto;grid-template-rows:repeat(var(--plasma-private-items),auto);grid-auto-flow:column;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063.Flow_styles_1xdoipm_vertical__ec36d063[data-arrangement='start']{-webkit-align-items:start;-webkit-box-align:start;-ms-flex-align:start;align-items:start;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063.Flow_styles_1xdoipm_vertical__ec36d063[data-arrangement='center']{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063.Flow_styles_1xdoipm_vertical__ec36d063[data-arrangement='end']{-webkit-align-items:end;-webkit-box-align:end;-ms-flex-align:end;align-items:end;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063.Flow_styles_1xdoipm_vertical__ec36d063[data-arrangement='spaceBetween']{-webkit-align-content:space-between;-ms-flex-line-pack:space-between;align-content:space-between;-webkit-align-items:normal;-webkit-box-align:normal;-ms-flex-align:normal;align-items:normal;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063.Flow_styles_1xdoipm_vertical__ec36d063[data-arrangement='spaceAround']{-webkit-align-content:space-around;-ms-flex-line-pack:space-around;align-content:space-around;-webkit-align-items:normal;-webkit-box-align:normal;-ms-flex-align:normal;align-items:normal;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063.Flow_styles_1xdoipm_vertical__ec36d063[data-alignment='start']{justify-items:start;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063.Flow_styles_1xdoipm_vertical__ec36d063[data-alignment='center']{justify-items:center;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063.Flow_styles_1xdoipm_vertical__ec36d063[data-alignment='end']{justify-items:end;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063:not(.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063)[data-arrangement='start']{-webkit-box-pack:start;-webkit-justify-content:start;-ms-flex-pack:start;justify-content:start;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063:not(.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063)[data-arrangement='center']{-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063:not(.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063)[data-arrangement='end']{-webkit-box-pack:end;-webkit-justify-content:end;-ms-flex-pack:end;justify-content:end;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063:not(.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063)[data-arrangement='spaceBetween']{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063:not(.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063)[data-arrangement='spaceAround']{-webkit-box-pack:space-around;-webkit-justify-content:space-around;-ms-flex-pack:space-around;justify-content:space-around;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063:not(.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063)[data-alignment='start']{-webkit-align-items:start;-webkit-box-align:start;-ms-flex-align:start;align-items:start;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063:not(.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063)[data-alignment='center']{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.Flow_styles_1xdoipm_b1iyfec1__ec36d063:not(.Flow_styles_1xdoipm_b1iyfec1__ec36d063.Flow_styles_1xdoipm_grid__ec36d063)[data-alignment='end']{-webkit-align-items:end;-webkit-box-align:end;-ms-flex-align:end;align-items:end;}
|
@@ -1,58 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
-
|
5
|
-
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
6
|
-
var React = require('react');
|
7
|
-
var cls = require('classnames');
|
8
|
-
var Flow_styles = require('./Flow.styles.js');
|
9
|
-
|
10
|
-
var _excluded = ["children", "className", "style", "orientation", "arrangement", "alignment", "mainAxisGap", "crossAxisGap", "minColWidth", "itemsPerLine"];
|
11
|
-
var flowRoot = function flowRoot(Root) {
|
12
|
-
return /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
13
|
-
var children = _ref.children,
|
14
|
-
className = _ref.className,
|
15
|
-
style = _ref.style,
|
16
|
-
_ref$orientation = _ref.orientation,
|
17
|
-
orientation = _ref$orientation === void 0 ? 'horizontal' : _ref$orientation,
|
18
|
-
arrangement = _ref.arrangement,
|
19
|
-
alignment = _ref.alignment,
|
20
|
-
_ref$mainAxisGap = _ref.mainAxisGap,
|
21
|
-
mainAxisGap = _ref$mainAxisGap === void 0 ? '0' : _ref$mainAxisGap,
|
22
|
-
_ref$crossAxisGap = _ref.crossAxisGap,
|
23
|
-
crossAxisGap = _ref$crossAxisGap === void 0 ? '0' : _ref$crossAxisGap,
|
24
|
-
_ref$minColWidth = _ref.minColWidth,
|
25
|
-
minColWidth = _ref$minColWidth === void 0 ? 'auto' : _ref$minColWidth,
|
26
|
-
itemsPerLine = _ref.itemsPerLine,
|
27
|
-
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
28
|
-
var hasMinWidth = Boolean(minColWidth && minColWidth !== 'auto');
|
29
|
-
var needGrid = Boolean(Number(itemsPerLine) > 0 || hasMinWidth);
|
30
|
-
return /*#__PURE__*/React.createElement(Root, _rollupPluginBabelHelpers.extends({
|
31
|
-
ref: ref,
|
32
|
-
className: cls(className, {
|
33
|
-
vertical: orientation === 'vertical',
|
34
|
-
grid: needGrid,
|
35
|
-
elastic: hasMinWidth
|
36
|
-
}),
|
37
|
-
style: _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, style), {}, {
|
38
|
-
'--plasma-private-gap': "".concat(mainAxisGap, " ").concat(crossAxisGap),
|
39
|
-
'--plasma-private-items': String(itemsPerLine),
|
40
|
-
'--plasma-private-min-width': String(minColWidth)
|
41
|
-
}),
|
42
|
-
"data-arrangement": arrangement,
|
43
|
-
"data-alignment": alignment
|
44
|
-
}, rest), children);
|
45
|
-
});
|
46
|
-
};
|
47
|
-
var flowConfig = {
|
48
|
-
name: 'Flow',
|
49
|
-
tag: 'div',
|
50
|
-
layout: flowRoot,
|
51
|
-
base: Flow_styles.base,
|
52
|
-
defaults: {},
|
53
|
-
variations: {}
|
54
|
-
};
|
55
|
-
|
56
|
-
exports.flowConfig = flowConfig;
|
57
|
-
exports.flowRoot = flowRoot;
|
58
|
-
//# sourceMappingURL=Flow.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Flow.js","sources":["../../../src/components/Flow/Flow.tsx"],"sourcesContent":["import React, { CSSProperties, forwardRef } from 'react';\nimport cls from 'classnames';\n\nimport { RootProps } from '../../engines';\n\nimport { base } from './Flow.styles';\nimport { FlowProps } from './Flow.types';\n\nexport const flowRoot = (Root: RootProps<HTMLDivElement, FlowProps>) =>\n forwardRef<HTMLDivElement, FlowProps>(\n (\n {\n children,\n className,\n style,\n orientation = 'horizontal',\n arrangement,\n alignment,\n mainAxisGap = '0',\n crossAxisGap = '0',\n minColWidth = 'auto',\n itemsPerLine,\n ...rest\n },\n ref,\n ) => {\n const hasMinWidth = Boolean(minColWidth && minColWidth !== 'auto');\n const needGrid = Boolean(Number(itemsPerLine) > 0 || hasMinWidth);\n\n return (\n <Root\n ref={ref}\n className={cls(className, {\n vertical: orientation === 'vertical',\n grid: needGrid,\n elastic: hasMinWidth,\n })}\n style={\n {\n ...style,\n '--plasma-private-gap': `${mainAxisGap} ${crossAxisGap}`,\n '--plasma-private-items': String(itemsPerLine),\n '--plasma-private-min-width': String(minColWidth),\n } as CSSProperties & {\n '--plasma-private-gap': string;\n '--plasma-private-items': string;\n '--plasma-private-min-width': string;\n }\n }\n data-arrangement={arrangement}\n data-alignment={alignment}\n {...rest}\n >\n {children}\n </Root>\n );\n },\n );\n\nexport const flowConfig = {\n name: 'Flow',\n tag: 'div',\n layout: flowRoot,\n base,\n defaults: {},\n variations: {},\n};\n"],"names":["flowRoot","Root","forwardRef","_ref","ref","children","className","style","_ref$orientation","orientation","arrangement","alignment","_ref$mainAxisGap","mainAxisGap","_ref$crossAxisGap","crossAxisGap","_ref$minColWidth","minColWidth","itemsPerLine","rest","_objectWithoutProperties","_excluded","hasMinWidth","Boolean","needGrid","Number","React","createElement","_extends","cls","vertical","grid","elastic","_objectSpread","concat","String","flowConfig","name","tag","layout","base","defaults","variations"],"mappings":";;;;;;;;;;IAQaA,QAAQ,GAAG,SAAXA,QAAQA,CAAIC,IAA0C,EAAA;AAAA,EAAA,oBAC/DC,gBAAU,CACN,UAAAC,IAAA,EAcIC,GAAG,EACF;AAAA,IAAA,IAbGC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;MACRC,SAAS,GAAAH,IAAA,CAATG,SAAS;MACTC,KAAK,GAAAJ,IAAA,CAALI,KAAK;MAAAC,gBAAA,GAAAL,IAAA,CACLM,WAAW;AAAXA,MAAAA,WAAW,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,YAAY,GAAAA,gBAAA;MAC1BE,WAAW,GAAAP,IAAA,CAAXO,WAAW;MACXC,SAAS,GAAAR,IAAA,CAATQ,SAAS;MAAAC,gBAAA,GAAAT,IAAA,CACTU,WAAW;AAAXA,MAAAA,WAAW,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,GAAG,GAAAA,gBAAA;MAAAE,iBAAA,GAAAX,IAAA,CACjBY,YAAY;AAAZA,MAAAA,YAAY,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,GAAG,GAAAA,iBAAA;MAAAE,gBAAA,GAAAb,IAAA,CAClBc,WAAW;AAAXA,MAAAA,WAAW,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,gBAAA;MACpBE,YAAY,GAAAf,IAAA,CAAZe,YAAY;AACTC,MAAAA,IAAI,GAAAC,iDAAA,CAAAjB,IAAA,EAAAkB,SAAA,CAAA,CAAA;IAIX,IAAMC,WAAW,GAAGC,OAAO,CAACN,WAAW,IAAIA,WAAW,KAAK,MAAM,CAAC,CAAA;AAClE,IAAA,IAAMO,QAAQ,GAAGD,OAAO,CAACE,MAAM,CAACP,YAAY,CAAC,GAAG,CAAC,IAAII,WAAW,CAAC,CAAA;AAEjE,IAAA,oBACII,KAAA,CAAAC,aAAA,CAAC1B,IAAI,EAAA2B,iCAAA,CAAA;AACDxB,MAAAA,GAAG,EAAEA,GAAI;AACTE,MAAAA,SAAS,EAAEuB,GAAG,CAACvB,SAAS,EAAE;QACtBwB,QAAQ,EAAErB,WAAW,KAAK,UAAU;AACpCsB,QAAAA,IAAI,EAAEP,QAAQ;AACdQ,QAAAA,OAAO,EAAEV,WAAAA;AACb,OAAC,CAAE;AACHf,MAAAA,KAAK,EAAA0B,uCAAA,CAAAA,uCAAA,KAEM1B,KAAK,CAAA,EAAA,EAAA,EAAA;QACR,sBAAsB,EAAA,EAAA,CAAA2B,MAAA,CAAKrB,WAAW,OAAAqB,MAAA,CAAInB,YAAY,CAAE;AACxD,QAAA,wBAAwB,EAAEoB,MAAM,CAACjB,YAAY,CAAC;QAC9C,4BAA4B,EAAEiB,MAAM,CAAClB,WAAW,CAAA;OAMvD,CAAA;AACD,MAAA,kBAAA,EAAkBP,WAAY;MAC9B,gBAAgBC,EAAAA,SAAAA;KACZQ,EAAAA,IAAI,CAEPd,EAAAA,QACC,CAAC,CAAA;AAEf,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAM+B,UAAU,GAAG;AACtBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEvC,QAAQ;AAChBwC,EAAAA,IAAI,EAAJA,gBAAI;EACJC,QAAQ,EAAE,EAAE;AACZC,EAAAA,UAAU,EAAE,EAAC;AACjB;;;;;"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Flow.styles.js","sources":["../../../src/components/Flow/Flow.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css`\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n\n gap: var(--plasma-private-gap);\n\n border-radius: 0.5rem;\n\n &.vertical {\n flex-direction: column;\n }\n\n &.grid {\n display: grid;\n\n grid-template-columns: repeat(var(--plasma-private-items), auto);\n grid-auto-flow: row;\n\n &.elastic {\n grid-template-columns: repeat(auto-fill, minmax(var(--plasma-private-min-width), auto));\n grid-auto-flow: row;\n }\n\n &:not(.vertical) {\n &[data-arrangement='start'] {\n justify-items: start;\n }\n\n &[data-arrangement='center'] {\n justify-items: center;\n }\n\n &[data-arrangement='end'] {\n justify-items: end;\n }\n\n &[data-arrangement='spaceBetween'] {\n justify-content: space-between;\n }\n\n &[data-arrangement='spaceAround'] {\n justify-content: space-around;\n }\n\n &[data-alignment='start'] {\n align-items: start;\n }\n\n &[data-alignment='center'] {\n align-items: center;\n }\n\n &[data-alignment='end'] {\n align-items: end;\n }\n }\n\n &.vertical {\n grid-template-columns: auto;\n grid-template-rows: repeat(var(--plasma-private-items), auto);\n grid-auto-flow: column;\n\n &[data-arrangement='start'] {\n align-items: start;\n }\n\n &[data-arrangement='center'] {\n align-items: center;\n }\n\n &[data-arrangement='end'] {\n align-items: end;\n }\n\n &[data-arrangement='spaceBetween'] {\n align-content: space-between;\n align-items: normal;\n }\n\n &[data-arrangement='spaceAround'] {\n align-content: space-around;\n align-items: normal;\n }\n\n &[data-alignment='start'] {\n justify-items: start;\n }\n\n &[data-alignment='center'] {\n justify-items: center;\n }\n\n &[data-alignment='end'] {\n justify-items: end;\n }\n }\n }\n\n &:not(&.grid) {\n &[data-arrangement='start'] {\n justify-content: start;\n }\n\n &[data-arrangement='center'] {\n justify-content: center;\n }\n\n &[data-arrangement='end'] {\n justify-content: end;\n }\n\n &[data-arrangement='spaceBetween'] {\n justify-content: space-between;\n }\n\n &[data-arrangement='spaceAround'] {\n justify-content: space-around;\n }\n\n &[data-alignment='start'] {\n align-items: start;\n }\n\n &[data-alignment='center'] {\n align-items: center;\n }\n\n &[data-alignment='end'] {\n align-items: end;\n }\n }\n`;\n"],"names":["base"],"mappings":";;;;AAEO,IAAMA,IAAI,GAoIhB;;;;"}
|
@@ -1 +0,0 @@
|
|
1
|
-
.b1iyfec1{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--plasma-private-gap);border-radius:0.5rem;}.b1iyfec1.vertical{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.b1iyfec1.grid{display:grid;grid-template-columns:repeat(var(--plasma-private-items),auto);grid-auto-flow:row;}.b1iyfec1.grid.elastic{grid-template-columns:repeat(auto-fill,minmax(var(--plasma-private-min-width),auto));grid-auto-flow:row;}.b1iyfec1.grid:not(.vertical)[data-arrangement='start']{justify-items:start;}.b1iyfec1.grid:not(.vertical)[data-arrangement='center']{justify-items:center;}.b1iyfec1.grid:not(.vertical)[data-arrangement='end']{justify-items:end;}.b1iyfec1.grid:not(.vertical)[data-arrangement='spaceBetween']{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}.b1iyfec1.grid:not(.vertical)[data-arrangement='spaceAround']{-webkit-box-pack:space-around;-webkit-justify-content:space-around;-ms-flex-pack:space-around;justify-content:space-around;}.b1iyfec1.grid:not(.vertical)[data-alignment='start']{-webkit-align-items:start;-webkit-box-align:start;-ms-flex-align:start;align-items:start;}.b1iyfec1.grid:not(.vertical)[data-alignment='center']{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.b1iyfec1.grid:not(.vertical)[data-alignment='end']{-webkit-align-items:end;-webkit-box-align:end;-ms-flex-align:end;align-items:end;}.b1iyfec1.grid.vertical{grid-template-columns:auto;grid-template-rows:repeat(var(--plasma-private-items),auto);grid-auto-flow:column;}.b1iyfec1.grid.vertical[data-arrangement='start']{-webkit-align-items:start;-webkit-box-align:start;-ms-flex-align:start;align-items:start;}.b1iyfec1.grid.vertical[data-arrangement='center']{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.b1iyfec1.grid.vertical[data-arrangement='end']{-webkit-align-items:end;-webkit-box-align:end;-ms-flex-align:end;align-items:end;}.b1iyfec1.grid.vertical[data-arrangement='spaceBetween']{-webkit-align-content:space-between;-ms-flex-line-pack:space-between;align-content:space-between;-webkit-align-items:normal;-webkit-box-align:normal;-ms-flex-align:normal;align-items:normal;}.b1iyfec1.grid.vertical[data-arrangement='spaceAround']{-webkit-align-content:space-around;-ms-flex-line-pack:space-around;align-content:space-around;-webkit-align-items:normal;-webkit-box-align:normal;-ms-flex-align:normal;align-items:normal;}.b1iyfec1.grid.vertical[data-alignment='start']{justify-items:start;}.b1iyfec1.grid.vertical[data-alignment='center']{justify-items:center;}.b1iyfec1.grid.vertical[data-alignment='end']{justify-items:end;}.b1iyfec1:not(.b1iyfec1.grid)[data-arrangement='start']{-webkit-box-pack:start;-webkit-justify-content:start;-ms-flex-pack:start;justify-content:start;}.b1iyfec1:not(.b1iyfec1.grid)[data-arrangement='center']{-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}.b1iyfec1:not(.b1iyfec1.grid)[data-arrangement='end']{-webkit-box-pack:end;-webkit-justify-content:end;-ms-flex-pack:end;justify-content:end;}.b1iyfec1:not(.b1iyfec1.grid)[data-arrangement='spaceBetween']{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}.b1iyfec1:not(.b1iyfec1.grid)[data-arrangement='spaceAround']{-webkit-box-pack:space-around;-webkit-justify-content:space-around;-ms-flex-pack:space-around;justify-content:space-around;}.b1iyfec1:not(.b1iyfec1.grid)[data-alignment='start']{-webkit-align-items:start;-webkit-box-align:start;-ms-flex-align:start;align-items:start;}.b1iyfec1:not(.b1iyfec1.grid)[data-alignment='center']{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.b1iyfec1:not(.b1iyfec1.grid)[data-alignment='end']{-webkit-align-items:end;-webkit-box-align:end;-ms-flex-align:end;align-items:end;}
|
@@ -1,66 +0,0 @@
|
|
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
|
-
};
|
@@ -1,17 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.base = void 0;
|
7
|
-
var _react = /*#__PURE__*/require("@emotion/react");
|
8
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
9
|
-
var base = exports.base = process.env.NODE_ENV === "production" ? {
|
10
|
-
name: "96mzja-plasma-new-hope__base",
|
11
|
-
styles: "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;}};label:plasma-new-hope__base;"
|
12
|
-
} : {
|
13
|
-
name: "96mzja-plasma-new-hope__base",
|
14
|
-
styles: "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;}};label:plasma-new-hope__base;",
|
15
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvRmxvdy9GbG93LnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFdUIiLCJmaWxlIjoiLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9GbG93L0Zsb3cuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5leHBvcnQgY29uc3QgYmFzZSA9IGNzc2BcbiAgICBkaXNwbGF5OiBmbGV4O1xuICAgIGZsZXgtZGlyZWN0aW9uOiByb3c7XG4gICAgZmxleC13cmFwOiB3cmFwO1xuXG4gICAgZ2FwOiB2YXIoLS1wbGFzbWEtcHJpdmF0ZS1nYXApO1xuXG4gICAgYm9yZGVyLXJhZGl1czogMC41cmVtO1xuXG4gICAgJi52ZXJ0aWNhbCB7XG4gICAgICAgIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XG4gICAgfVxuXG4gICAgJi5ncmlkIHtcbiAgICAgICAgZGlzcGxheTogZ3JpZDtcblxuICAgICAgICBncmlkLXRlbXBsYXRlLWNvbHVtbnM6IHJlcGVhdCh2YXIoLS1wbGFzbWEtcHJpdmF0ZS1pdGVtcyksIGF1dG8pO1xuICAgICAgICBncmlkLWF1dG8tZmxvdzogcm93O1xuXG4gICAgICAgICYuZWxhc3RpYyB7XG4gICAgICAgICAgICBncmlkLXRlbXBsYXRlLWNvbHVtbnM6IHJlcGVhdChhdXRvLWZpbGwsIG1pbm1heCh2YXIoLS1wbGFzbWEtcHJpdmF0ZS1taW4td2lkdGgpLCBhdXRvKSk7XG4gICAgICAgICAgICBncmlkLWF1dG8tZmxvdzogcm93O1xuICAgICAgICB9XG5cbiAgICAgICAgJjpub3QoLnZlcnRpY2FsKSB7XG4gICAgICAgICAgICAmW2RhdGEtYXJyYW5nZW1lbnQ9J3N0YXJ0J10ge1xuICAgICAgICAgICAgICAgIGp1c3RpZnktaXRlbXM6IHN0YXJ0O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmW2RhdGEtYXJyYW5nZW1lbnQ9J2NlbnRlciddIHtcbiAgICAgICAgICAgICAgICBqdXN0aWZ5LWl0ZW1zOiBjZW50ZXI7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICZbZGF0YS1hcnJhbmdlbWVudD0nZW5kJ10ge1xuICAgICAgICAgICAgICAgIGp1c3RpZnktaXRlbXM6IGVuZDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgJltkYXRhLWFycmFuZ2VtZW50PSdzcGFjZUJldHdlZW4nXSB7XG4gICAgICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmW2RhdGEtYXJyYW5nZW1lbnQ9J3NwYWNlQXJvdW5kJ10ge1xuICAgICAgICAgICAgICAgIGp1c3RpZnktY29udGVudDogc3BhY2UtYXJvdW5kO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmW2RhdGEtYWxpZ25tZW50PSdzdGFydCddIHtcbiAgICAgICAgICAgICAgICBhbGlnbi1pdGVtczogc3RhcnQ7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICZbZGF0YS1hbGlnbm1lbnQ9J2NlbnRlciddIHtcbiAgICAgICAgICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmW2RhdGEtYWxpZ25tZW50PSdlbmQnXSB7XG4gICAgICAgICAgICAgICAgYWxpZ24taXRlbXM6IGVuZDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgICYudmVydGljYWwge1xuICAgICAgICAgICAgZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiBhdXRvO1xuICAgICAgICAgICAgZ3JpZC10ZW1wbGF0ZS1yb3dzOiByZXBlYXQodmFyKC0tcGxhc21hLXByaXZhdGUtaXRlbXMpLCBhdXRvKTtcbiAgICAgICAgICAgIGdyaWQtYXV0by1mbG93OiBjb2x1bW47XG5cbiAgICAgICAgICAgICZbZGF0YS1hcnJhbmdlbWVudD0nc3RhcnQnXSB7XG4gICAgICAgICAgICAgICAgYWxpZ24taXRlbXM6IHN0YXJ0O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmW2RhdGEtYXJyYW5nZW1lbnQ9J2NlbnRlciddIHtcbiAgICAgICAgICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmW2RhdGEtYXJyYW5nZW1lbnQ9J2VuZCddIHtcbiAgICAgICAgICAgICAgICBhbGlnbi1pdGVtczogZW5kO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmW2RhdGEtYXJyYW5nZW1lbnQ9J3NwYWNlQmV0d2VlbiddIHtcbiAgICAgICAgICAgICAgICBhbGlnbi1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuICAgICAgICAgICAgICAgIGFsaWduLWl0ZW1zOiBub3JtYWw7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICZbZGF0YS1hcnJhbmdlbWVudD0nc3BhY2VBcm91bmQnXSB7XG4gICAgICAgICAgICAgICAgYWxpZ24tY29udGVudDogc3BhY2UtYXJvdW5kO1xuICAgICAgICAgICAgICAgIGFsaWduLWl0ZW1zOiBub3JtYWw7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICZbZGF0YS1hbGlnbm1lbnQ9J3N0YXJ0J10ge1xuICAgICAgICAgICAgICAgIGp1c3RpZnktaXRlbXM6IHN0YXJ0O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmW2RhdGEtYWxpZ25tZW50PSdjZW50ZXInXSB7XG4gICAgICAgICAgICAgICAganVzdGlmeS1pdGVtczogY2VudGVyO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmW2RhdGEtYWxpZ25tZW50PSdlbmQnXSB7XG4gICAgICAgICAgICAgICAganVzdGlmeS1pdGVtczogZW5kO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgJjpub3QoJi5ncmlkKSB7XG4gICAgICAgICZbZGF0YS1hcnJhbmdlbWVudD0nc3RhcnQnXSB7XG4gICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IHN0YXJ0O1xuICAgICAgICB9XG5cbiAgICAgICAgJltkYXRhLWFycmFuZ2VtZW50PSdjZW50ZXInXSB7XG4gICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbiAgICAgICAgfVxuXG4gICAgICAgICZbZGF0YS1hcnJhbmdlbWVudD0nZW5kJ10ge1xuICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBlbmQ7XG4gICAgICAgIH1cblxuICAgICAgICAmW2RhdGEtYXJyYW5nZW1lbnQ9J3NwYWNlQmV0d2VlbiddIHtcbiAgICAgICAgICAgIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjtcbiAgICAgICAgfVxuXG4gICAgICAgICZbZGF0YS1hcnJhbmdlbWVudD0nc3BhY2VBcm91bmQnXSB7XG4gICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWFyb3VuZDtcbiAgICAgICAgfVxuXG4gICAgICAgICZbZGF0YS1hbGlnbm1lbnQ9J3N0YXJ0J10ge1xuICAgICAgICAgICAgYWxpZ24taXRlbXM6IHN0YXJ0O1xuICAgICAgICB9XG5cbiAgICAgICAgJltkYXRhLWFsaWdubWVudD0nY2VudGVyJ10ge1xuICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICAgICAgfVxuXG4gICAgICAgICZbZGF0YS1hbGlnbm1lbnQ9J2VuZCddIHtcbiAgICAgICAgICAgIGFsaWduLWl0ZW1zOiBlbmQ7XG4gICAgICAgIH1cbiAgICB9XG5gO1xuIl19 */",
|
16
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
17
|
-
};
|
@@ -1,18 +0,0 @@
|
|
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,11 +0,0 @@
|
|
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);
|
@@ -1,114 +0,0 @@
|
|
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
|
-
};
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,57 +0,0 @@
|
|
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
|
-
};
|
@@ -1,11 +0,0 @@
|
|
1
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
2
|
-
import { css } from '@emotion/react';
|
3
|
-
export var base = process.env.NODE_ENV === "production" ? {
|
4
|
-
name: "96mzja-plasma-new-hope__base",
|
5
|
-
styles: "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;}};label:plasma-new-hope__base;"
|
6
|
-
} : {
|
7
|
-
name: "96mzja-plasma-new-hope__base",
|
8
|
-
styles: "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;}};label:plasma-new-hope__base;",
|
9
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvRmxvdy9GbG93LnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFdUIiLCJmaWxlIjoiLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9GbG93L0Zsb3cuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5leHBvcnQgY29uc3QgYmFzZSA9IGNzc2BcbiAgICBkaXNwbGF5OiBmbGV4O1xuICAgIGZsZXgtZGlyZWN0aW9uOiByb3c7XG4gICAgZmxleC13cmFwOiB3cmFwO1xuXG4gICAgZ2FwOiB2YXIoLS1wbGFzbWEtcHJpdmF0ZS1nYXApO1xuXG4gICAgYm9yZGVyLXJhZGl1czogMC41cmVtO1xuXG4gICAgJi52ZXJ0aWNhbCB7XG4gICAgICAgIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XG4gICAgfVxuXG4gICAgJi5ncmlkIHtcbiAgICAgICAgZGlzcGxheTogZ3JpZDtcblxuICAgICAgICBncmlkLXRlbXBsYXRlLWNvbHVtbnM6IHJlcGVhdCh2YXIoLS1wbGFzbWEtcHJpdmF0ZS1pdGVtcyksIGF1dG8pO1xuICAgICAgICBncmlkLWF1dG8tZmxvdzogcm93O1xuXG4gICAgICAgICYuZWxhc3RpYyB7XG4gICAgICAgICAgICBncmlkLXRlbXBsYXRlLWNvbHVtbnM6IHJlcGVhdChhdXRvLWZpbGwsIG1pbm1heCh2YXIoLS1wbGFzbWEtcHJpdmF0ZS1taW4td2lkdGgpLCBhdXRvKSk7XG4gICAgICAgICAgICBncmlkLWF1dG8tZmxvdzogcm93O1xuICAgICAgICB9XG5cbiAgICAgICAgJjpub3QoLnZlcnRpY2FsKSB7XG4gICAgICAgICAgICAmW2RhdGEtYXJyYW5nZW1lbnQ9J3N0YXJ0J10ge1xuICAgICAgICAgICAgICAgIGp1c3RpZnktaXRlbXM6IHN0YXJ0O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmW2RhdGEtYXJyYW5nZW1lbnQ9J2NlbnRlciddIHtcbiAgICAgICAgICAgICAgICBqdXN0aWZ5LWl0ZW1zOiBjZW50ZXI7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICZbZGF0YS1hcnJhbmdlbWVudD0nZW5kJ10ge1xuICAgICAgICAgICAgICAgIGp1c3RpZnktaXRlbXM6IGVuZDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgJltkYXRhLWFycmFuZ2VtZW50PSdzcGFjZUJldHdlZW4nXSB7XG4gICAgICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmW2RhdGEtYXJyYW5nZW1lbnQ9J3NwYWNlQXJvdW5kJ10ge1xuICAgICAgICAgICAgICAgIGp1c3RpZnktY29udGVudDogc3BhY2UtYXJvdW5kO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmW2RhdGEtYWxpZ25tZW50PSdzdGFydCddIHtcbiAgICAgICAgICAgICAgICBhbGlnbi1pdGVtczogc3RhcnQ7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICZbZGF0YS1hbGlnbm1lbnQ9J2NlbnRlciddIHtcbiAgICAgICAgICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmW2RhdGEtYWxpZ25tZW50PSdlbmQnXSB7XG4gICAgICAgICAgICAgICAgYWxpZ24taXRlbXM6IGVuZDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgICYudmVydGljYWwge1xuICAgICAgICAgICAgZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiBhdXRvO1xuICAgICAgICAgICAgZ3JpZC10ZW1wbGF0ZS1yb3dzOiByZXBlYXQodmFyKC0tcGxhc21hLXByaXZhdGUtaXRlbXMpLCBhdXRvKTtcbiAgICAgICAgICAgIGdyaWQtYXV0by1mbG93OiBjb2x1bW47XG5cbiAgICAgICAgICAgICZbZGF0YS1hcnJhbmdlbWVudD0nc3RhcnQnXSB7XG4gICAgICAgICAgICAgICAgYWxpZ24taXRlbXM6IHN0YXJ0O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmW2RhdGEtYXJyYW5nZW1lbnQ9J2NlbnRlciddIHtcbiAgICAgICAgICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmW2RhdGEtYXJyYW5nZW1lbnQ9J2VuZCddIHtcbiAgICAgICAgICAgICAgICBhbGlnbi1pdGVtczogZW5kO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmW2RhdGEtYXJyYW5nZW1lbnQ9J3NwYWNlQmV0d2VlbiddIHtcbiAgICAgICAgICAgICAgICBhbGlnbi1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuICAgICAgICAgICAgICAgIGFsaWduLWl0ZW1zOiBub3JtYWw7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICZbZGF0YS1hcnJhbmdlbWVudD0nc3BhY2VBcm91bmQnXSB7XG4gICAgICAgICAgICAgICAgYWxpZ24tY29udGVudDogc3BhY2UtYXJvdW5kO1xuICAgICAgICAgICAgICAgIGFsaWduLWl0ZW1zOiBub3JtYWw7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICZbZGF0YS1hbGlnbm1lbnQ9J3N0YXJ0J10ge1xuICAgICAgICAgICAgICAgIGp1c3RpZnktaXRlbXM6IHN0YXJ0O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmW2RhdGEtYWxpZ25tZW50PSdjZW50ZXInXSB7XG4gICAgICAgICAgICAgICAganVzdGlmeS1pdGVtczogY2VudGVyO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmW2RhdGEtYWxpZ25tZW50PSdlbmQnXSB7XG4gICAgICAgICAgICAgICAganVzdGlmeS1pdGVtczogZW5kO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgJjpub3QoJi5ncmlkKSB7XG4gICAgICAgICZbZGF0YS1hcnJhbmdlbWVudD0nc3RhcnQnXSB7XG4gICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IHN0YXJ0O1xuICAgICAgICB9XG5cbiAgICAgICAgJltkYXRhLWFycmFuZ2VtZW50PSdjZW50ZXInXSB7XG4gICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbiAgICAgICAgfVxuXG4gICAgICAgICZbZGF0YS1hcnJhbmdlbWVudD0nZW5kJ10ge1xuICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBlbmQ7XG4gICAgICAgIH1cblxuICAgICAgICAmW2RhdGEtYXJyYW5nZW1lbnQ9J3NwYWNlQmV0d2VlbiddIHtcbiAgICAgICAgICAgIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjtcbiAgICAgICAgfVxuXG4gICAgICAgICZbZGF0YS1hcnJhbmdlbWVudD0nc3BhY2VBcm91bmQnXSB7XG4gICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWFyb3VuZDtcbiAgICAgICAgfVxuXG4gICAgICAgICZbZGF0YS1hbGlnbm1lbnQ9J3N0YXJ0J10ge1xuICAgICAgICAgICAgYWxpZ24taXRlbXM6IHN0YXJ0O1xuICAgICAgICB9XG5cbiAgICAgICAgJltkYXRhLWFsaWdubWVudD0nY2VudGVyJ10ge1xuICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICAgICAgfVxuXG4gICAgICAgICZbZGF0YS1hbGlnbm1lbnQ9J2VuZCddIHtcbiAgICAgICAgICAgIGFsaWduLWl0ZW1zOiBlbmQ7XG4gICAgICAgIH1cbiAgICB9XG5gO1xuIl19 */",
|
10
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
11
|
-
};
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1 +0,0 @@
|
|
1
|
-
export { flowRoot, flowConfig } from './Flow';
|
@@ -1,5 +0,0 @@
|
|
1
|
-
import { flowConfig } from '../../../../components/Flow';
|
2
|
-
import { component, mergeConfig } from '../../../../engines';
|
3
|
-
import { config } from './Flow.config';
|
4
|
-
var mergedConfig = /*#__PURE__*/mergeConfig(flowConfig, config);
|
5
|
-
export var Flow = /*#__PURE__*/component(mergedConfig);
|
@@ -1,114 +0,0 @@
|
|
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
|
-
};
|