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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. package/cjs/index.css +0 -2
  2. package/cjs/index.js +0 -3
  3. package/cjs/index.js.map +1 -1
  4. package/emotion/cjs/index.js +0 -11
  5. package/emotion/es/index.js +0 -1
  6. package/es/index.css +0 -2
  7. package/es/index.js +0 -1
  8. package/es/index.js.map +1 -1
  9. package/package.json +4 -4
  10. package/styled-components/cjs/index.js +0 -11
  11. package/styled-components/es/index.js +0 -1
  12. package/types/index.d.ts +0 -1
  13. package/types/index.d.ts.map +1 -1
  14. package/cjs/components/Flow/Flow.css +0 -1
  15. package/cjs/components/Flow/Flow.js +0 -58
  16. package/cjs/components/Flow/Flow.js.map +0 -1
  17. package/cjs/components/Flow/Flow.styles.js +0 -9
  18. package/cjs/components/Flow/Flow.styles.js.map +0 -1
  19. package/cjs/components/Flow/Flow.styles_1xdoipm.css +0 -1
  20. package/emotion/cjs/components/ElasticGrid/ElasticGrid.js +0 -5
  21. package/emotion/cjs/components/ElasticGrid/index.js +0 -5
  22. package/emotion/cjs/components/Flow/Flow.js +0 -66
  23. package/emotion/cjs/components/Flow/Flow.styles.js +0 -17
  24. package/emotion/cjs/components/Flow/Flow.types.js +0 -5
  25. package/emotion/cjs/components/Flow/index.js +0 -18
  26. package/emotion/cjs/examples/plasma_b2c/components/Flow/Flow.config.js +0 -10
  27. package/emotion/cjs/examples/plasma_b2c/components/Flow/Flow.js +0 -11
  28. package/emotion/cjs/examples/plasma_b2c/components/Flow/Flow.stories.tsx +0 -114
  29. package/emotion/es/components/ElasticGrid/ElasticGrid.js +0 -1
  30. package/emotion/es/components/ElasticGrid/index.js +0 -1
  31. package/emotion/es/components/Flow/Flow.js +0 -57
  32. package/emotion/es/components/Flow/Flow.styles.js +0 -11
  33. package/emotion/es/components/Flow/Flow.types.js +0 -1
  34. package/emotion/es/components/Flow/index.js +0 -1
  35. package/emotion/es/examples/plasma_b2c/components/Flow/Flow.config.js +0 -4
  36. package/emotion/es/examples/plasma_b2c/components/Flow/Flow.js +0 -5
  37. package/emotion/es/examples/plasma_b2c/components/Flow/Flow.stories.tsx +0 -114
  38. package/es/components/Flow/Flow.css +0 -1
  39. package/es/components/Flow/Flow.js +0 -53
  40. package/es/components/Flow/Flow.js.map +0 -1
  41. package/es/components/Flow/Flow.styles.js +0 -5
  42. package/es/components/Flow/Flow.styles.js.map +0 -1
  43. package/es/components/Flow/Flow.styles_1xdoipm.css +0 -1
  44. package/styled-components/cjs/components/ElasticGrid/ElasticGrid.js +0 -5
  45. package/styled-components/cjs/components/ElasticGrid/index.js +0 -5
  46. package/styled-components/cjs/components/Flow/Flow.js +0 -66
  47. package/styled-components/cjs/components/Flow/Flow.styles.js +0 -8
  48. package/styled-components/cjs/components/Flow/Flow.types.js +0 -5
  49. package/styled-components/cjs/components/Flow/index.js +0 -18
  50. package/styled-components/cjs/examples/plasma_b2c/components/Flow/Flow.config.js +0 -10
  51. package/styled-components/cjs/examples/plasma_b2c/components/Flow/Flow.js +0 -11
  52. package/styled-components/cjs/examples/plasma_b2c/components/Flow/Flow.stories.tsx +0 -114
  53. package/styled-components/es/components/ElasticGrid/ElasticGrid.js +0 -1
  54. package/styled-components/es/components/ElasticGrid/index.js +0 -1
  55. package/styled-components/es/components/Flow/Flow.js +0 -57
  56. package/styled-components/es/components/Flow/Flow.styles.js +0 -2
  57. package/styled-components/es/components/Flow/Flow.types.js +0 -1
  58. package/styled-components/es/components/Flow/index.js +0 -1
  59. package/styled-components/es/examples/plasma_b2c/components/Flow/Flow.config.js +0 -4
  60. package/styled-components/es/examples/plasma_b2c/components/Flow/Flow.js +0 -5
  61. package/styled-components/es/examples/plasma_b2c/components/Flow/Flow.stories.tsx +0 -114
  62. package/types/components/ElasticGrid/ElasticGrid.d.ts +0 -2
  63. package/types/components/ElasticGrid/ElasticGrid.d.ts.map +0 -1
  64. package/types/components/ElasticGrid/index.d.ts +0 -2
  65. package/types/components/ElasticGrid/index.d.ts.map +0 -1
  66. package/types/components/Flow/Flow.d.ts +0 -13
  67. package/types/components/Flow/Flow.d.ts.map +0 -1
  68. package/types/components/Flow/Flow.styles.d.ts +0 -2
  69. package/types/components/Flow/Flow.styles.d.ts.map +0 -1
  70. package/types/components/Flow/Flow.types.d.ts +0 -35
  71. package/types/components/Flow/Flow.types.d.ts.map +0 -1
  72. package/types/components/Flow/index.d.ts +0 -2
  73. package/types/components/Flow/index.d.ts.map +0 -1
  74. package/types/examples/plasma_b2c/components/Flow/Flow.config.d.ts +0 -5
  75. package/types/examples/plasma_b2c/components/Flow/Flow.config.d.ts.map +0 -1
  76. package/types/examples/plasma_b2c/components/Flow/Flow.d.ts +0 -3
  77. package/types/examples/plasma_b2c/components/Flow/Flow.d.ts.map +0 -1
@@ -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,2 +0,0 @@
1
- import { css } from 'styled-components';
2
- export var base = /*#__PURE__*/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;}}"]);
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export { flowRoot, flowConfig } from './Flow';
@@ -1,4 +0,0 @@
1
- export var config = {
2
- defaults: {},
3
- variations: {}
4
- };
@@ -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
- };
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ElasticGrid.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ElasticGrid.d.ts","sourceRoot":"","sources":["../../../src/components/ElasticGrid/ElasticGrid.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ElasticGrid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC"}
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import { RootProps } from '../../engines';
3
- import { FlowProps } from './Flow.types';
4
- export declare const flowRoot: (Root: RootProps<HTMLDivElement, FlowProps>) => React.ForwardRefExoticComponent<FlowProps & React.RefAttributes<HTMLDivElement>>;
5
- export declare const flowConfig: {
6
- name: string;
7
- tag: string;
8
- layout: (Root: RootProps<HTMLDivElement, FlowProps>) => React.ForwardRefExoticComponent<FlowProps & React.RefAttributes<HTMLDivElement>>;
9
- base: import("@linaria/core").LinariaClassName;
10
- defaults: {};
11
- variations: {};
12
- };
13
- //# sourceMappingURL=Flow.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Flow.d.ts","sourceRoot":"","sources":["../../../src/components/Flow/Flow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAGzD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,QAAQ,SAAU,UAAU,cAAc,EAAE,SAAS,CAAC,qFAiD9D,CAAC;AAEN,eAAO,MAAM,UAAU;;;mBAnDQ,UAAU,cAAc,EAAE,SAAS,CAAC;;;;CA0DlE,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const base: import("@linaria/core").LinariaClassName;
2
- //# sourceMappingURL=Flow.styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Flow.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Flow/Flow.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,0CAoIhB,CAAC"}
@@ -1,35 +0,0 @@
1
- import { CSSProperties, ReactNode } from 'react';
2
- export interface FlowProps {
3
- children: ReactNode;
4
- className?: string;
5
- style?: CSSProperties;
6
- orientation?: 'horizontal' | 'vertical';
7
- /**
8
- * Расположение элементов относительно выбранной ориентации
9
- */
10
- arrangement?: 'start' | 'center' | 'end' | 'spaceBetween' | 'spaceAround';
11
- /**
12
- * Выравнивание элементов внутри строк по вертикали при горизонтальной ориентации,
13
- * или внутри столбцов по горизонтали при вертикальной
14
- */
15
- alignment?: 'start' | 'center' | 'end';
16
- /**
17
- * Фиксированный отступ между элементами по главной оси
18
- */
19
- mainAxisGap?: string;
20
- /**
21
- * Фиксированный отступ между элементами по второстепенной оси
22
- */
23
- crossAxisGap?: string;
24
- /**
25
- * Количество элементов по главной оси в отображении grid, при itemsPerLine > 0,
26
- * иначе используется flex и flex-wrap
27
- */
28
- itemsPerLine?: number;
29
- /**
30
- * Минимальный размер колонки для эластичной сетки с динамическим количеством растянутых столбцов
31
- * `grid-template-columns: repeat(auto-fill, minmax(${minColWidth}, auto))`
32
- */
33
- minColWidth?: string;
34
- }
35
- //# sourceMappingURL=Flow.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Flow.types.d.ts","sourceRoot":"","sources":["../../../src/components/Flow/Flow.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjD,MAAM,WAAW,SAAS;IACtB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,cAAc,GAAG,aAAa,CAAC;IAC1E;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACvC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB"}
@@ -1,2 +0,0 @@
1
- export { flowRoot, flowConfig } from './Flow';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Flow/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC"}
@@ -1,5 +0,0 @@
1
- export declare const config: {
2
- defaults: {};
3
- variations: {};
4
- };
5
- //# sourceMappingURL=Flow.config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Flow.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Flow/Flow.config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;CAGlB,CAAC"}
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const Flow: import("react").FunctionComponent<import("../../../../engines/types").PropsType<{}> & import("../../../../components/Flow/Flow.types").FlowProps & import("react").RefAttributes<HTMLDivElement>>;
3
- //# sourceMappingURL=Flow.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Flow.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Flow/Flow.ts"],"names":[],"mappings":";AAOA,eAAO,MAAM,IAAI,mMAA0B,CAAC"}