@salutejs/plasma-new-hope 0.237.1-dev.0 → 0.238.0-canary.1657.12529257851.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/Flow/Flow.css +2 -0
- package/cjs/components/Flow/Flow.js +84 -0
- package/cjs/components/Flow/Flow.js.map +1 -0
- package/cjs/components/Flow/Flow.styles.js +17 -0
- package/cjs/components/Flow/Flow.styles.js.map +1 -0
- package/cjs/components/Flow/Flow.styles_q8k0on.css +2 -0
- package/cjs/index.css +3 -0
- package/cjs/index.js +3 -0
- package/cjs/index.js.map +1 -1
- package/emotion/cjs/components/Flow/Flow.js +92 -0
- package/emotion/cjs/components/Flow/Flow.styles.js +31 -0
- package/emotion/cjs/components/Flow/Flow.template-doc.mdx +127 -0
- package/emotion/cjs/components/Flow/Flow.types.js +5 -0
- package/emotion/cjs/components/Flow/index.js +18 -0
- package/emotion/cjs/examples/plasma_b2c/components/Flow/Flow.config.js +10 -0
- package/emotion/cjs/examples/plasma_b2c/components/Flow/Flow.js +11 -0
- package/emotion/cjs/examples/plasma_b2c/components/Flow/Flow.stories.tsx +135 -0
- package/emotion/cjs/examples/plasma_web/components/Flow/Flow.config.js +10 -0
- package/emotion/cjs/examples/plasma_web/components/Flow/Flow.js +11 -0
- package/emotion/cjs/examples/plasma_web/components/Flow/Flow.stories.tsx +135 -0
- package/emotion/cjs/index.js +11 -0
- package/emotion/es/components/Flow/Flow.js +83 -0
- package/emotion/es/components/Flow/Flow.styles.js +24 -0
- package/emotion/es/components/Flow/Flow.template-doc.mdx +127 -0
- package/emotion/es/components/Flow/Flow.types.js +1 -0
- package/emotion/es/components/Flow/index.js +1 -0
- package/emotion/es/examples/plasma_b2c/components/Flow/Flow.config.js +4 -0
- package/emotion/es/examples/plasma_b2c/components/Flow/Flow.js +5 -0
- package/emotion/es/examples/plasma_b2c/components/Flow/Flow.stories.tsx +135 -0
- package/emotion/es/examples/plasma_web/components/Flow/Flow.config.js +4 -0
- package/emotion/es/examples/plasma_web/components/Flow/Flow.js +5 -0
- package/emotion/es/examples/plasma_web/components/Flow/Flow.stories.tsx +135 -0
- package/emotion/es/index.js +2 -0
- package/es/components/Flow/Flow.css +2 -0
- package/es/components/Flow/Flow.js +79 -0
- package/es/components/Flow/Flow.js.map +1 -0
- package/es/components/Flow/Flow.styles.js +12 -0
- package/es/components/Flow/Flow.styles.js.map +1 -0
- package/es/components/Flow/Flow.styles_q8k0on.css +2 -0
- package/es/index.css +3 -0
- package/es/index.js +1 -0
- package/es/index.js.map +1 -1
- package/package.json +4 -2
- package/styled-components/cjs/components/Flow/Flow.js +92 -0
- package/styled-components/cjs/components/Flow/Flow.styles.js +16 -0
- package/styled-components/cjs/components/Flow/Flow.template-doc.mdx +127 -0
- package/styled-components/cjs/components/Flow/Flow.types.js +5 -0
- package/styled-components/cjs/components/Flow/index.js +18 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Flow/Flow.config.js +10 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Flow/Flow.js +11 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Flow/Flow.stories.tsx +135 -0
- package/styled-components/cjs/examples/plasma_web/components/Flow/Flow.config.js +10 -0
- package/styled-components/cjs/examples/plasma_web/components/Flow/Flow.js +11 -0
- package/styled-components/cjs/examples/plasma_web/components/Flow/Flow.stories.tsx +135 -0
- package/styled-components/cjs/index.js +11 -0
- package/styled-components/es/components/Flow/Flow.js +83 -0
- package/styled-components/es/components/Flow/Flow.styles.js +8 -0
- package/styled-components/es/components/Flow/Flow.template-doc.mdx +127 -0
- package/styled-components/es/components/Flow/Flow.types.js +1 -0
- package/styled-components/es/components/Flow/index.js +1 -0
- package/styled-components/es/examples/plasma_b2c/components/Flow/Flow.config.js +4 -0
- package/styled-components/es/examples/plasma_b2c/components/Flow/Flow.js +5 -0
- package/styled-components/es/examples/plasma_b2c/components/Flow/Flow.stories.tsx +135 -0
- package/styled-components/es/examples/plasma_web/components/Flow/Flow.config.js +4 -0
- package/styled-components/es/examples/plasma_web/components/Flow/Flow.js +5 -0
- package/styled-components/es/examples/plasma_web/components/Flow/Flow.stories.tsx +135 -0
- package/styled-components/es/index.js +2 -0
- package/types/components/Flow/Flow.d.ts +33 -0
- package/types/components/Flow/Flow.d.ts.map +1 -0
- package/types/components/Flow/Flow.styles.d.ts +4 -0
- package/types/components/Flow/Flow.styles.d.ts.map +1 -0
- package/types/components/Flow/Flow.types.d.ts +34 -0
- package/types/components/Flow/Flow.types.d.ts.map +1 -0
- package/types/components/Flow/index.d.ts +3 -0
- package/types/components/Flow/index.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/Flow/Flow.config.d.ts +5 -0
- package/types/examples/plasma_b2c/components/Flow/Flow.config.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/Flow/Flow.d.ts +5 -0
- package/types/examples/plasma_b2c/components/Flow/Flow.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Flow/Flow.config.d.ts +5 -0
- package/types/examples/plasma_web/components/Flow/Flow.config.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Flow/Flow.d.ts +5 -0
- package/types/examples/plasma_web/components/Flow/Flow.d.ts.map +1 -0
- package/types/index.d.ts +2 -0
- package/types/index.d.ts.map +1 -1
@@ -0,0 +1,127 @@
|
|
1
|
+
---
|
2
|
+
id: flow
|
3
|
+
title: Flow
|
4
|
+
---
|
5
|
+
|
6
|
+
import { PropsTable, Description } from '@site/src/components';
|
7
|
+
|
8
|
+
# Flow
|
9
|
+
Универсальный контейнер для упорядоченного размещения вложенных компонентов (например, медиафайлы, карточки или блоки текста).
|
10
|
+
|
11
|
+
|
12
|
+
## Flow
|
13
|
+
<Description name="Flow" />
|
14
|
+
<PropsTable name="Flow" exclude={['css', 'focused', 'minColWidth']} />
|
15
|
+
|
16
|
+
## Использование
|
17
|
+
По умолчанию компонент `Flow` отображается на основе `display: flex; flex-wrap: wrap`,
|
18
|
+
при указании `itemsPerLine` компонент переходит на `display: flex; flex-wrap: nowrap` с превентивным разбиением на колонки/столбцы.
|
19
|
+
|
20
|
+
|
21
|
+
## Примеры
|
22
|
+
|
23
|
+
### Горизонтальное отображение с переполнением
|
24
|
+
|
25
|
+
```tsx live
|
26
|
+
import React from 'react';
|
27
|
+
import { Flow } from '@salutejs/{{ package }}';
|
28
|
+
|
29
|
+
export function App() {
|
30
|
+
const numbers = ['one', 'two', 'three', 'four', 'five', 'six'];
|
31
|
+
|
32
|
+
const style = (index) => ({
|
33
|
+
display: 'flex',
|
34
|
+
alignItems: 'center',
|
35
|
+
justifyContent: 'center',
|
36
|
+
width: `${2 + numbers[index].length}ch`,
|
37
|
+
height: '25px',
|
38
|
+
backgroundColor: '#999',
|
39
|
+
borderRadius: '10px',
|
40
|
+
});
|
41
|
+
|
42
|
+
return (
|
43
|
+
<div>
|
44
|
+
<Flow mainAxisGap="0.5ch" crossAxisGap="1ch" style={{ width: '15ch' }} >
|
45
|
+
{Array(6)
|
46
|
+
.fill(0)
|
47
|
+
.map((_, i) => (<div key={i} style={style(i)}>{numbers[i]}</div>))}
|
48
|
+
</Flow>
|
49
|
+
</div>
|
50
|
+
);
|
51
|
+
}
|
52
|
+
```
|
53
|
+
|
54
|
+
### Вертикальное отображение с переполнением
|
55
|
+
|
56
|
+
```tsx live
|
57
|
+
import React from 'react';
|
58
|
+
import { Flow } from '@salutejs/{{ package }}';
|
59
|
+
|
60
|
+
export function App() {
|
61
|
+
const numbers = ['one', 'two', 'three', 'four', 'five', 'six'];
|
62
|
+
|
63
|
+
const style = (index) => ({
|
64
|
+
display: 'flex',
|
65
|
+
alignItems: 'center',
|
66
|
+
justifyContent: 'center',
|
67
|
+
width: `${2 + numbers[index].length}ch`,
|
68
|
+
height: '25px',
|
69
|
+
backgroundColor: '#999',
|
70
|
+
borderRadius: '10px',
|
71
|
+
});
|
72
|
+
|
73
|
+
return (
|
74
|
+
<div>
|
75
|
+
<Flow
|
76
|
+
alignment="center"
|
77
|
+
orientation="vertical"
|
78
|
+
mainAxisGap="0.5ch"
|
79
|
+
crossAxisGap="1ch"
|
80
|
+
style={{ height: '90px' }}
|
81
|
+
>
|
82
|
+
{Array(6)
|
83
|
+
.fill(0)
|
84
|
+
.map((_, i) => (<div key={i} style={style(i)}>{numbers[i]}</div>))}
|
85
|
+
</Flow>
|
86
|
+
</div>
|
87
|
+
);
|
88
|
+
}
|
89
|
+
```
|
90
|
+
|
91
|
+
### Отображение с разбиением на строки
|
92
|
+
С ограничением количества элементов в строке.
|
93
|
+
|
94
|
+
```tsx live
|
95
|
+
import React from 'react';
|
96
|
+
import { Flow } from '@salutejs/{{ package }}';
|
97
|
+
|
98
|
+
export function App() {
|
99
|
+
const numbers = ['one', 'two', 'three', 'four', 'five', 'six'];
|
100
|
+
|
101
|
+
const style = (index) => ({
|
102
|
+
display: 'flex',
|
103
|
+
alignItems: 'center',
|
104
|
+
justifyContent: 'center',
|
105
|
+
width: `${2 + numbers[index].length}ch`,
|
106
|
+
height: '25px',
|
107
|
+
backgroundColor: '#999',
|
108
|
+
borderRadius: '10px',
|
109
|
+
});
|
110
|
+
|
111
|
+
return (
|
112
|
+
<div>
|
113
|
+
<Flow
|
114
|
+
arrangement="end"
|
115
|
+
itemsPerLine={2}
|
116
|
+
mainAxisGap="0.5ch"
|
117
|
+
crossAxisGap="1ch"
|
118
|
+
>
|
119
|
+
{Array(6)
|
120
|
+
.fill(0)
|
121
|
+
.map((_, i) => (<div key={i} style={style(i)}>{numbers[i]}</div>))}
|
122
|
+
</Flow>
|
123
|
+
</div>
|
124
|
+
);
|
125
|
+
}
|
126
|
+
```
|
127
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { flowRoot, flowConfig } from './Flow';
|
@@ -0,0 +1,5 @@
|
|
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);
|
@@ -0,0 +1,135 @@
|
|
1
|
+
import React, { ComponentProps } from 'react';
|
2
|
+
import type { StoryObj, Meta } from '@storybook/react';
|
3
|
+
import styled from 'styled-components';
|
4
|
+
import { disableProps } from '@salutejs/plasma-sb-utils';
|
5
|
+
|
6
|
+
import { WithTheme } from '../../../_helpers';
|
7
|
+
|
8
|
+
import { Flow } from './Flow';
|
9
|
+
|
10
|
+
const orientations = ['vertical', 'horizontal'];
|
11
|
+
const arrangements = ['start', 'center', 'end', 'spaceBetween', 'spaceAround'];
|
12
|
+
const alignments = ['start', 'center', 'end'];
|
13
|
+
|
14
|
+
const widths = [100, 32, 171, 74, 179, 55];
|
15
|
+
const heights = [10, 50, 45, 33, 14, 55];
|
16
|
+
|
17
|
+
const FlowCustom = styled(Flow)`
|
18
|
+
background: var(--surface-transparent-primary);
|
19
|
+
border-radius: 0.5rem;
|
20
|
+
`;
|
21
|
+
|
22
|
+
const Item = styled.div`
|
23
|
+
padding: 0.5rem 1rem;
|
24
|
+
border-radius: 0.5rem;
|
25
|
+
background: #aab1e9;
|
26
|
+
display: flex;
|
27
|
+
align-items: center;
|
28
|
+
justify-content: center;
|
29
|
+
`;
|
30
|
+
|
31
|
+
const meta: Meta<typeof Flow> = {
|
32
|
+
title: 'b2c/Layout/Flow',
|
33
|
+
component: Flow,
|
34
|
+
decorators: [WithTheme],
|
35
|
+
argTypes: {
|
36
|
+
itemsCount: {
|
37
|
+
control: {
|
38
|
+
type: 'number',
|
39
|
+
},
|
40
|
+
},
|
41
|
+
containerWidth: {
|
42
|
+
control: {
|
43
|
+
type: 'text',
|
44
|
+
},
|
45
|
+
},
|
46
|
+
containerHeight: {
|
47
|
+
control: {
|
48
|
+
type: 'text',
|
49
|
+
},
|
50
|
+
},
|
51
|
+
orientation: {
|
52
|
+
options: orientations,
|
53
|
+
control: {
|
54
|
+
type: 'select',
|
55
|
+
},
|
56
|
+
},
|
57
|
+
arrangement: {
|
58
|
+
options: arrangements,
|
59
|
+
control: {
|
60
|
+
type: 'select',
|
61
|
+
},
|
62
|
+
},
|
63
|
+
alignment: {
|
64
|
+
options: alignments,
|
65
|
+
control: {
|
66
|
+
type: 'select',
|
67
|
+
},
|
68
|
+
},
|
69
|
+
mainAxisGap: {
|
70
|
+
control: {
|
71
|
+
type: 'text',
|
72
|
+
},
|
73
|
+
},
|
74
|
+
crossAxisGap: {
|
75
|
+
control: {
|
76
|
+
type: 'text',
|
77
|
+
},
|
78
|
+
},
|
79
|
+
itemsPerLine: {
|
80
|
+
control: {
|
81
|
+
type: 'text',
|
82
|
+
},
|
83
|
+
},
|
84
|
+
minColWidth: {
|
85
|
+
control: {
|
86
|
+
type: 'text',
|
87
|
+
},
|
88
|
+
},
|
89
|
+
...disableProps(['minColWidth']),
|
90
|
+
},
|
91
|
+
};
|
92
|
+
|
93
|
+
export default meta;
|
94
|
+
|
95
|
+
type Story = StoryObj<typeof Flow>;
|
96
|
+
|
97
|
+
export const Default: Story = {
|
98
|
+
args: {
|
99
|
+
containerWidth: '450px',
|
100
|
+
containerHeight: '200px',
|
101
|
+
orientation: 'horizontal',
|
102
|
+
arrangement: 'start',
|
103
|
+
alignment: 'start',
|
104
|
+
mainAxisGap: '10',
|
105
|
+
crossAxisGap: '10',
|
106
|
+
itemsPerLine: '',
|
107
|
+
itemsCount: 6,
|
108
|
+
},
|
109
|
+
render: ({ itemsCount, containerWidth, containerHeight, ...args }: ComponentProps<typeof Flow>) => {
|
110
|
+
const hasLines = Boolean(args.itemsPerLine);
|
111
|
+
|
112
|
+
return (
|
113
|
+
<FlowCustom {...args} style={{ width: containerWidth, height: containerHeight }}>
|
114
|
+
{new Array(itemsCount).fill(null).map((width, index) => (
|
115
|
+
<Item
|
116
|
+
key={index}
|
117
|
+
style={
|
118
|
+
hasLines
|
119
|
+
? {
|
120
|
+
minWidth: widths[index % widths.length],
|
121
|
+
minHeight: heights[index % heights.length],
|
122
|
+
}
|
123
|
+
: {
|
124
|
+
width: widths[index % widths.length],
|
125
|
+
height: heights[index % heights.length],
|
126
|
+
}
|
127
|
+
}
|
128
|
+
>
|
129
|
+
{index + 1}
|
130
|
+
</Item>
|
131
|
+
))}
|
132
|
+
</FlowCustom>
|
133
|
+
);
|
134
|
+
},
|
135
|
+
};
|
@@ -0,0 +1,5 @@
|
|
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);
|
@@ -0,0 +1,135 @@
|
|
1
|
+
import React, { ComponentProps } from 'react';
|
2
|
+
import type { StoryObj, Meta } from '@storybook/react';
|
3
|
+
import styled from 'styled-components';
|
4
|
+
import { disableProps } from '@salutejs/plasma-sb-utils';
|
5
|
+
|
6
|
+
import { WithTheme } from '../../../_helpers';
|
7
|
+
|
8
|
+
import { Flow } from './Flow';
|
9
|
+
|
10
|
+
const orientations = ['vertical', 'horizontal'];
|
11
|
+
const arrangements = ['start', 'center', 'end', 'spaceBetween', 'spaceAround'];
|
12
|
+
const alignments = ['start', 'center', 'end'];
|
13
|
+
|
14
|
+
const widths = [100, 32, 171, 74, 179, 55];
|
15
|
+
const heights = [10, 50, 45, 33, 14, 55];
|
16
|
+
|
17
|
+
const FlowCustom = styled(Flow)`
|
18
|
+
background: var(--surface-transparent-primary);
|
19
|
+
border-radius: 0.5rem;
|
20
|
+
`;
|
21
|
+
|
22
|
+
const Item = styled.div`
|
23
|
+
padding: 0.5rem 1rem;
|
24
|
+
border-radius: 0.5rem;
|
25
|
+
background: #aab1e9;
|
26
|
+
display: flex;
|
27
|
+
align-items: center;
|
28
|
+
justify-content: center;
|
29
|
+
`;
|
30
|
+
|
31
|
+
const meta: Meta<typeof Flow> = {
|
32
|
+
title: 'web/Layout/Flow',
|
33
|
+
component: Flow,
|
34
|
+
decorators: [WithTheme],
|
35
|
+
argTypes: {
|
36
|
+
itemsCount: {
|
37
|
+
control: {
|
38
|
+
type: 'number',
|
39
|
+
},
|
40
|
+
},
|
41
|
+
containerWidth: {
|
42
|
+
control: {
|
43
|
+
type: 'text',
|
44
|
+
},
|
45
|
+
},
|
46
|
+
containerHeight: {
|
47
|
+
control: {
|
48
|
+
type: 'text',
|
49
|
+
},
|
50
|
+
},
|
51
|
+
orientation: {
|
52
|
+
options: orientations,
|
53
|
+
control: {
|
54
|
+
type: 'select',
|
55
|
+
},
|
56
|
+
},
|
57
|
+
arrangement: {
|
58
|
+
options: arrangements,
|
59
|
+
control: {
|
60
|
+
type: 'select',
|
61
|
+
},
|
62
|
+
},
|
63
|
+
alignment: {
|
64
|
+
options: alignments,
|
65
|
+
control: {
|
66
|
+
type: 'select',
|
67
|
+
},
|
68
|
+
},
|
69
|
+
mainAxisGap: {
|
70
|
+
control: {
|
71
|
+
type: 'text',
|
72
|
+
},
|
73
|
+
},
|
74
|
+
crossAxisGap: {
|
75
|
+
control: {
|
76
|
+
type: 'text',
|
77
|
+
},
|
78
|
+
},
|
79
|
+
itemsPerLine: {
|
80
|
+
control: {
|
81
|
+
type: 'text',
|
82
|
+
},
|
83
|
+
},
|
84
|
+
minColWidth: {
|
85
|
+
control: {
|
86
|
+
type: 'text',
|
87
|
+
},
|
88
|
+
},
|
89
|
+
...disableProps(['minColWidth']),
|
90
|
+
},
|
91
|
+
};
|
92
|
+
|
93
|
+
export default meta;
|
94
|
+
|
95
|
+
type Story = StoryObj<typeof Flow>;
|
96
|
+
|
97
|
+
export const Default: Story = {
|
98
|
+
args: {
|
99
|
+
containerWidth: '450px',
|
100
|
+
containerHeight: '200px',
|
101
|
+
orientation: 'horizontal',
|
102
|
+
arrangement: 'start',
|
103
|
+
alignment: 'start',
|
104
|
+
mainAxisGap: '10',
|
105
|
+
crossAxisGap: '10',
|
106
|
+
itemsPerLine: '',
|
107
|
+
itemsCount: 6,
|
108
|
+
},
|
109
|
+
render: ({ itemsCount, containerWidth, containerHeight, ...args }: ComponentProps<typeof Flow>) => {
|
110
|
+
const hasLines = Boolean(args.itemsPerLine);
|
111
|
+
|
112
|
+
return (
|
113
|
+
<FlowCustom {...args} style={{ width: containerWidth, height: containerHeight }}>
|
114
|
+
{new Array(itemsCount).fill(null).map((width, index) => (
|
115
|
+
<Item
|
116
|
+
key={index}
|
117
|
+
style={
|
118
|
+
hasLines
|
119
|
+
? {
|
120
|
+
minWidth: widths[index % widths.length],
|
121
|
+
minHeight: heights[index % heights.length],
|
122
|
+
}
|
123
|
+
: {
|
124
|
+
width: widths[index % widths.length],
|
125
|
+
height: heights[index % heights.length],
|
126
|
+
}
|
127
|
+
}
|
128
|
+
>
|
129
|
+
{index + 1}
|
130
|
+
</Item>
|
131
|
+
))}
|
132
|
+
</FlowCustom>
|
133
|
+
);
|
134
|
+
},
|
135
|
+
};
|
@@ -12,6 +12,7 @@ export * from './components/Breadcrumbs';
|
|
12
12
|
export * from './components/Chip';
|
13
13
|
export * from './components/ChipGroup';
|
14
14
|
export * from './components/Cell';
|
15
|
+
export * from './components/Flow';
|
15
16
|
export * from './components/Link';
|
16
17
|
export * from './components/Spinner';
|
17
18
|
export * from './components/Checkbox';
|
@@ -44,6 +45,7 @@ export * from './components/SSRProvider';
|
|
44
45
|
export * from './components/Combobox';
|
45
46
|
export * from './components/Indicator';
|
46
47
|
export * from './components/ButtonBase';
|
48
|
+
export * from './components/Flow';
|
47
49
|
export * from './components/Grid';
|
48
50
|
export * from './components/Progress';
|
49
51
|
export * from './components/Select';
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { RootProps } from '../../engines';
|
3
|
+
import { FlowProps } from './Flow.types';
|
4
|
+
declare type TempFlowTypes = FlowProps & {
|
5
|
+
/**
|
6
|
+
* Минимальный размер колонки для эластичной сетки с динамическим количеством растянутых столбцов
|
7
|
+
* через `repeat(auto-fill, minmax(${minColWidth}, auto))`
|
8
|
+
*/
|
9
|
+
minColWidth?: string;
|
10
|
+
};
|
11
|
+
export declare const flowRoot: (Root: RootProps<HTMLDivElement, TempFlowTypes>) => React.ForwardRefExoticComponent<FlowProps & {
|
12
|
+
/**
|
13
|
+
* Минимальный размер колонки для эластичной сетки с динамическим количеством растянутых столбцов
|
14
|
+
* через `repeat(auto-fill, minmax(${minColWidth}, auto))`
|
15
|
+
*/
|
16
|
+
minColWidth?: string | undefined;
|
17
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
18
|
+
export declare const flowConfig: {
|
19
|
+
name: string;
|
20
|
+
tag: string;
|
21
|
+
layout: (Root: RootProps<HTMLDivElement, TempFlowTypes>) => React.ForwardRefExoticComponent<FlowProps & {
|
22
|
+
/**
|
23
|
+
* Минимальный размер колонки для эластичной сетки с динамическим количеством растянутых столбцов
|
24
|
+
* через `repeat(auto-fill, minmax(${minColWidth}, auto))`
|
25
|
+
*/
|
26
|
+
minColWidth?: string | undefined;
|
27
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
28
|
+
base: import("@linaria/core").LinariaClassName;
|
29
|
+
defaults: {};
|
30
|
+
variations: {};
|
31
|
+
};
|
32
|
+
export {};
|
33
|
+
//# sourceMappingURL=Flow.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Flow.d.ts","sourceRoot":"","sources":["../../../src/components/Flow/Flow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAIzD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,aAAK,aAAa,GAAG,SAAS,GAAG;IAC7B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,QAAQ,SAAU,UAAU,cAAc,EAAE,aAAa,CAAC;IAPnE;;;OAGG;;wCAiGF,CAAC;AAEN,eAAO,MAAM,UAAU;;;mBA/FQ,UAAU,cAAc,EAAE,aAAa,CAAC;QAPnE;;;WAGG;;;;;;CA0GN,CAAC"}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
export declare const base: import("@linaria/core").LinariaClassName;
|
3
|
+
export declare const Line: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
4
|
+
//# sourceMappingURL=Flow.styles.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Flow.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Flow/Flow.styles.ts"],"names":[],"mappings":";AAGA,eAAO,MAAM,IAAI,0CA6IhB,CAAC;AAEF,eAAO,MAAM,IAAI,qKAyChB,CAAC"}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
2
|
+
export interface FlowProps {
|
3
|
+
children: ReactNode;
|
4
|
+
className?: string;
|
5
|
+
style?: CSSProperties;
|
6
|
+
/**
|
7
|
+
* Ориентация элементов
|
8
|
+
* @default `horizontal`
|
9
|
+
*/
|
10
|
+
orientation?: 'horizontal' | 'vertical';
|
11
|
+
/**
|
12
|
+
* Расположение элементов относительно выбранной ориентации
|
13
|
+
*/
|
14
|
+
arrangement?: 'start' | 'center' | 'end' | 'spaceBetween' | 'spaceAround';
|
15
|
+
/**
|
16
|
+
* Выравнивание элементов внутри строк по вертикали при горизонтальной ориентации,
|
17
|
+
* или внутри столбцов по горизонтали при вертикальной
|
18
|
+
*/
|
19
|
+
alignment?: 'start' | 'center' | 'end';
|
20
|
+
/**
|
21
|
+
* Фиксированный отступ между элементами по главной оси
|
22
|
+
*/
|
23
|
+
mainAxisGap?: number | string;
|
24
|
+
/**
|
25
|
+
* Фиксированный отступ между элементами по второстепенной оси
|
26
|
+
*/
|
27
|
+
crossAxisGap?: number | string;
|
28
|
+
/**
|
29
|
+
* Количество элементов по главной оси в отображении grid, при itemsPerLine > 0,
|
30
|
+
* иначе используется flex и flex-wrap
|
31
|
+
*/
|
32
|
+
itemsPerLine?: number;
|
33
|
+
}
|
34
|
+
//# sourceMappingURL=Flow.types.d.ts.map
|
@@ -0,0 +1 @@
|
|
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;;;OAGG;IACH,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,GAAG,MAAM,CAAC;IAC9B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB"}
|
@@ -0,0 +1 @@
|
|
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;AAC9C,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
@@ -0,0 +1 @@
|
|
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"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
export declare const Flow: import("react").FunctionComponent<import("../../../../engines/types").PropsType<{}> & import("../../../../components/Flow").FlowProps & {
|
3
|
+
minColWidth?: string | undefined;
|
4
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
5
|
+
//# sourceMappingURL=Flow.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Flow.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Flow/Flow.ts"],"names":[],"mappings":";AAOA,eAAO,MAAM,IAAI;;kDAA0B,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Flow.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Flow/Flow.config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;CAGlB,CAAC"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
export declare const Flow: import("react").FunctionComponent<import("../../../../engines/types").PropsType<{}> & import("../../../../components/Flow").FlowProps & {
|
3
|
+
minColWidth?: string | undefined;
|
4
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
5
|
+
//# sourceMappingURL=Flow.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Flow.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Flow/Flow.ts"],"names":[],"mappings":";AAOA,eAAO,MAAM,IAAI;;kDAA0B,CAAC"}
|
package/types/index.d.ts
CHANGED
@@ -10,6 +10,7 @@ export * from './components/Breadcrumbs';
|
|
10
10
|
export * from './components/Chip';
|
11
11
|
export * from './components/ChipGroup';
|
12
12
|
export * from './components/Cell';
|
13
|
+
export * from './components/Flow';
|
13
14
|
export * from './components/Link';
|
14
15
|
export * from './components/Spinner';
|
15
16
|
export * from './components/Checkbox';
|
@@ -42,6 +43,7 @@ export * from './components/SSRProvider';
|
|
42
43
|
export * from './components/Combobox';
|
43
44
|
export * from './components/Indicator';
|
44
45
|
export * from './components/ButtonBase';
|
46
|
+
export * from './components/Flow';
|
45
47
|
export * from './components/Grid';
|
46
48
|
export * from './components/Progress';
|
47
49
|
export * from './components/Select';
|
package/types/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,c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