@itcase/ui 1.2.18 → 1.2.20
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/dist/{Group-BDuYmoBK.js → Group-B2oTJg0t.js} +1 -1
- package/dist/{Group-12uup5mu.js → Group-CVUfaHaS.js} +1 -1
- package/dist/cjs/components/Accordion.js +3 -2
- package/dist/cjs/components/Choice.js +11 -3
- package/dist/cjs/components/CookiesWarning.js +1 -1
- package/dist/cjs/components/Group.js +1 -1
- package/dist/cjs/components/InputPassword.js +6 -6
- package/dist/cjs/components/Panel.js +1 -1
- package/dist/cjs/components/Radio.js +85 -8
- package/dist/cjs/components/Response.js +1 -1
- package/dist/cjs/components/Select.js +1 -1
- package/dist/cjs/components/Switch.js +12 -8
- package/dist/cjs/components/Tile.js +3 -3
- package/dist/cjs/constants/componentProps/textColor.js +1 -1
- package/dist/cjs/constants/componentProps/textColorHover.js +1 -1
- package/dist/cjs/hooks/useViewportFix.js +43 -0
- package/dist/components/Accordion.js +3 -2
- package/dist/components/Choice.js +11 -3
- package/dist/components/CookiesWarning.js +1 -1
- package/dist/components/Group.js +1 -1
- package/dist/components/InputPassword.js +6 -6
- package/dist/components/Panel.js +1 -1
- package/dist/components/Radio.js +86 -5
- package/dist/components/Response.js +1 -1
- package/dist/components/Select.js +1 -1
- package/dist/components/Switch.js +12 -4
- package/dist/components/Tile.js +3 -3
- package/dist/constants/componentProps/textColor.js +1 -1
- package/dist/constants/componentProps/textColorHover.js +1 -1
- package/dist/css/components/Accordion/Accordion.css +1 -0
- package/dist/css/components/Choice/Choice.css +14 -0
- package/dist/css/components/DatePicker/DatePicker.css +12 -12
- package/dist/css/components/Icon/Icon.css +14 -8
- package/dist/css/components/Select/Select.css +1 -1
- package/dist/css/components/Select/css/__input-container/select__input-container.css +1 -1
- package/dist/css/mixins/mixin_animation.css +1 -1
- package/dist/css/mixins/mixin_elevation.css +0 -2
- package/dist/css/mixins/mixin_typography.css +105 -84
- package/dist/css/mixins/mixin_utils.css +1 -1
- package/dist/css/styles/border-color/border-color.css +4 -2
- package/dist/css/styles/text-gradient/text-gradient.css +9 -4
- package/dist/css/styles/width/width.css +1 -1
- package/dist/css/tokens/colors.css +105 -0
- package/dist/css/tokens/elevation.css +10 -0
- package/dist/css/tokens/settings.css +31 -0
- package/dist/css/tokens/typography.css +127 -0
- package/dist/hooks/useViewportFix.js +41 -0
- package/dist/stories/Accordion.mdx +11 -0
- package/dist/stories/Accordion.stories.js +49 -32
- package/dist/stories/AccordionItem.mdx +15 -0
- package/dist/stories/AccordionItem.stories.js +69 -69
- package/dist/stories/AlignContent.mdx +85 -0
- package/dist/stories/AlignItems.mdx +74 -0
- package/dist/stories/AlignItems.stories.js +88 -0
- package/dist/stories/AlignSelf.mdx +85 -0
- package/dist/stories/AlignSelf.stories.js +101 -0
- package/dist/stories/Appearance.mdx +35 -0
- package/dist/stories/Appearance.stories.js +101 -0
- package/dist/stories/Avatar.mdx +23 -0
- package/dist/stories/Avatar.stories.js +69 -64
- package/dist/stories/Badge.mdx +20 -0
- package/dist/stories/Badge.stories.js +43 -44
- package/dist/stories/Button.mdx +48 -0
- package/dist/stories/Button.stories.js +26 -186
- package/dist/stories/Cell.mdx +23 -0
- package/dist/stories/Cell.stories.js +119 -119
- package/dist/stories/Checkbox.mdx +24 -0
- package/dist/stories/Checkbox.stories.js +42 -34
- package/dist/stories/Chips.mdx +31 -0
- package/dist/stories/Chips.stories.js +22 -67
- package/dist/stories/Choice.mdx +11 -0
- package/dist/stories/Choice.stories.js +59 -61
- package/dist/stories/Code.mdx +11 -0
- package/dist/stories/Code.stories.js +37 -40
- package/dist/stories/Columns.mdx +51 -0
- package/dist/stories/Columns.stories.js +80 -0
- package/dist/stories/Configure.mdx +364 -0
- package/dist/stories/DatePicker.mdx +31 -0
- package/dist/stories/DatePicker.stories.js +58 -59
- package/dist/stories/Dev.mdx +9 -0
- package/dist/stories/DevMode.mdx +8 -0
- package/dist/stories/Direction.mdx +84 -0
- package/dist/stories/Direction.stories.js +93 -0
- package/dist/stories/Divider.mdx +35 -0
- package/dist/stories/Divider.stories.js +28 -29
- package/dist/stories/Dot.mdx +19 -0
- package/dist/stories/Dot.stories.js +38 -39
- package/dist/stories/Drawer.mdx +11 -0
- package/dist/stories/Drawer.stories.js +75 -0
- package/dist/stories/Dropdown.mdx +12 -0
- package/dist/stories/Dropdown.stories.js +30 -29
- package/dist/stories/DropdownItem.mdx +19 -0
- package/dist/stories/DropdownItem.stories.js +76 -78
- package/dist/stories/Flex.stories.js +47 -0
- package/dist/stories/FlexAlignContent.stories.js +102 -0
- package/dist/stories/FlexAlignItems.stories.js +91 -0
- package/dist/stories/FlexAlignSelf.stories.js +97 -0
- package/dist/stories/FlexDirection.stories.js +112 -0
- package/dist/stories/FlexGrow.stories.js +69 -0
- package/dist/stories/FlexJustifyContent.stories.js +98 -0
- package/dist/stories/FlexOrder.stories.js +76 -0
- package/dist/stories/FlexWrap.stories.js +89 -0
- package/dist/stories/Grid.stories.js +202 -0
- package/dist/stories/Group.mdx +9 -0
- package/dist/stories/{Tab.group.stories.js → Group.stories.js} +60 -56
- package/dist/stories/Grow.mdx +40 -0
- package/dist/stories/Header.stories.js +29 -0
- package/dist/stories/Icon.mdx +15 -0
- package/dist/stories/Icon.stories.js +84 -82
- package/dist/stories/Image.mdx +15 -0
- package/dist/stories/Image.stories.js +134 -0
- package/dist/stories/Input.mdx +31 -0
- package/dist/stories/Input.stories.js +26 -26
- package/dist/stories/InputPassword.mdx +15 -0
- package/dist/stories/InputPassword.stories.js +32 -34
- package/dist/stories/JustifyContent.mdx +89 -0
- package/dist/stories/JustifyContent.stories.js +96 -0
- package/dist/stories/Label.mdx +31 -0
- package/dist/stories/Label.stories.js +63 -53
- package/dist/stories/Loader.mdx +31 -0
- package/dist/stories/Loader.stories.js +26 -28
- package/dist/stories/Logo.mdx +19 -0
- package/dist/stories/Logo.stories.js +28 -28
- package/dist/stories/MenuItem.mdx +15 -0
- package/dist/stories/MenuItem.stories.js +156 -91
- package/dist/stories/Message.mdx +12 -0
- package/dist/stories/Message.stories.js +34 -0
- package/dist/stories/ModalConfirm.stories.js +48 -47
- package/dist/stories/ModalDefault.stories.js +21 -20
- package/dist/stories/Notification.mdx +23 -0
- package/dist/stories/Notification.stories.js +24 -47
- package/dist/stories/Order.mdx +52 -0
- package/dist/stories/Overview.mdx +11 -0
- package/dist/stories/Page.stories.js +28 -0
- package/dist/stories/Pagination.mdx +11 -0
- package/dist/stories/Pagination.stories.js +24 -27
- package/dist/stories/Playground.mdx +10 -0
- package/dist/stories/Radio.mdx +29 -0
- package/dist/stories/Radio.stories.js +32 -33
- package/dist/stories/Response.mdx +18 -0
- package/dist/stories/Response.stories.js +66 -0
- package/dist/stories/SearchInput.mdx +19 -0
- package/dist/stories/{Search-input.stories.js → SearchInput.stories.js} +79 -62
- package/dist/stories/Segmented.mdx +11 -0
- package/dist/stories/Segmented.stories.js +49 -50
- package/dist/stories/Select.stories.js +155 -155
- package/dist/stories/Size.mdx +35 -0
- package/dist/stories/Size.stories.js +101 -0
- package/dist/stories/Skeleton.mdx +9 -0
- package/dist/stories/State.mdx +19 -0
- package/dist/stories/State.stories.js +70 -0
- package/dist/stories/Switch.mdx +23 -0
- package/dist/stories/Switch.stories.js +23 -23
- package/dist/stories/Text.mdx +35 -0
- package/dist/stories/Text.stories.js +172 -0
- package/dist/stories/Textarea.mdx +15 -0
- package/dist/stories/Textarea.stories.js +27 -27
- package/dist/stories/Tile.mdx +19 -0
- package/dist/stories/Tile.stories.js +112 -97
- package/dist/stories/Title.mdx +31 -0
- package/dist/stories/Title.stories.js +168 -0
- package/dist/stories/Tooltip.mdx +19 -0
- package/dist/stories/Tooltip.stories.js +164 -0
- package/dist/stories/WithTooltip.mdx +9 -0
- package/dist/stories/Wrap.mdx +52 -0
- package/dist/stories/Wrap.stories.js +74 -0
- package/dist/types/components/Accordion/Accordion.interface.d.ts +4 -0
- package/dist/types/components/Choice/Choice.interface.d.ts +2 -2
- package/dist/types/components/InputPassword/InputPassword.interface.d.ts +10 -8
- package/dist/types/components/Tile/Tile.d.ts +1 -1
- package/dist/types/components/Tile/Tile.interface.d.ts +3 -1
- package/dist/types/config/forms/datepicker.d.ts +18 -0
- package/dist/types/config/forms/index.d.ts +4 -0
- package/dist/types/config/forms/input.d.ts +14 -0
- package/dist/types/config/forms/select.d.ts +50 -0
- package/dist/types/hooks/useViewportFix.d.ts +2 -0
- package/dist/types/types/componentProps/flexWrap.d.ts +1 -1
- package/dist/types/types/componentProps/wrap.d.ts +1 -1
- package/package.json +38 -22
- package/dist/Radio-BQo97TZL.js +0 -89
- package/dist/Radio-oMf0vN7T.js +0 -86
- package/dist/Switch-B5yVEqxz.js +0 -14
- package/dist/Switch-DEXsrPCo.js +0 -12
- package/dist/cjs/components/FormField.js +0 -122
- package/dist/components/FormField.js +0 -116
- package/dist/css/mixins/mixin.css +0 -73
- package/dist/stories/FormFieldCheckbox.stories.js +0 -77
- package/dist/stories/FormFieldChoice.stories.js +0 -75
- package/dist/stories/FormFieldDatepicker.stories.js +0 -51
- package/dist/stories/FormFieldFileInput.stories.js +0 -58
- package/dist/stories/FormFieldInput.stories.js +0 -66
- package/dist/stories/FormFieldInputPassword.stories.js +0 -66
- package/dist/stories/FormFieldMultiBadgeSelect.stories.js +0 -132
- package/dist/stories/FormFieldMultiSelect.stories.js +0 -127
- package/dist/stories/FormFieldSelect.stories.js +0 -99
- package/dist/stories/FormFieldSelectGroup.stories.js +0 -84
- package/dist/stories/NotFound.stories.js +0 -93
- package/dist/stories/Tab.appearance.stories.js +0 -260
- package/dist/stories/Tab.size.stories.js +0 -259
- package/dist/stories/Tab.state.stories.js +0 -227
- package/dist/types/components/FormField/ChoiceField.d.ts +0 -8
- package/dist/types/components/FormField/FormField.d.ts +0 -9
- package/dist/types/components/FormField/FormFiled.interface.d.ts +0 -77
- package/dist/types/components/FormField/PasswordField.d.ts +0 -9
- package/dist/types/components/FormField/SelectField.d.ts +0 -9
- package/dist/types/components/FormField/SwitchField.d.ts +0 -8
- package/dist/types/components/FormField/index.d.ts +0 -6
|
@@ -1,79 +1,78 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useState } from 'react'
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { DatePickerInput } from '@itcase/ui/components/DatePicker'
|
|
3
|
+
import { defaultDatepickerProps, defaultInputProps } from '../../../config/forms'
|
|
5
4
|
import {
|
|
6
5
|
fillProps,
|
|
7
6
|
iconSizeProps,
|
|
8
7
|
textColorHoverProps,
|
|
9
8
|
textColorProps,
|
|
10
9
|
textSizeProps,
|
|
11
|
-
} from '
|
|
12
|
-
|
|
13
|
-
import { defaultDatepickerProps, defaultInputProps } from 'src/config/forms'
|
|
10
|
+
} from '../../../constants'
|
|
14
11
|
import { icon16 } from '../../../icons'
|
|
12
|
+
import { Button } from '../../Button'
|
|
13
|
+
import { DatePickerInput } from '../DatePicker'
|
|
15
14
|
|
|
16
15
|
export default {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
args: {
|
|
17
|
+
clearLabel: '',
|
|
18
|
+
clearLabelTextColor: 'surfaceTextPrimary',
|
|
19
|
+
clearLabelTextColorHover: 'surfaceTextPrimaryHover',
|
|
20
|
+
clearLabelTextSize: 'm',
|
|
21
|
+
datePickerProps: {
|
|
22
|
+
...defaultDatepickerProps,
|
|
23
|
+
isClearable: true,
|
|
24
|
+
isStartDefaultNull: true,
|
|
25
|
+
readOnly: false,
|
|
26
|
+
onKeyDown: (e) => {
|
|
27
|
+
e.preventDefault()
|
|
27
28
|
},
|
|
28
29
|
},
|
|
30
|
+
inputProps: defaultInputProps,
|
|
29
31
|
},
|
|
30
32
|
argTypes: {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
clearIconItemFill: {
|
|
34
|
+
control: 'select',
|
|
35
|
+
if: { arg: 'clearIconSrc', neq: null },
|
|
36
|
+
options: fillProps,
|
|
34
37
|
},
|
|
35
38
|
clearIconSize: {
|
|
36
|
-
options: iconSizeProps,
|
|
37
39
|
control: 'inline-radio',
|
|
38
40
|
if: { arg: 'clearIconSrc', neq: null },
|
|
41
|
+
options: iconSizeProps,
|
|
39
42
|
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if: { arg: 'clearIconSrc', neq: null },
|
|
44
|
-
},
|
|
45
|
-
clearLabelTextSize: {
|
|
46
|
-
options: textSizeProps,
|
|
47
|
-
control: 'select',
|
|
48
|
-
if: { arg: 'clearLabel', neq: '' },
|
|
43
|
+
clearIconSrc: {
|
|
44
|
+
control: 'inline-radio',
|
|
45
|
+
options: [null, 'assets/16/Clear.svg'],
|
|
49
46
|
},
|
|
50
47
|
clearLabelTextColor: {
|
|
51
|
-
options: textColorProps,
|
|
52
48
|
control: 'select',
|
|
53
49
|
if: { arg: 'clearLabel', neq: '' },
|
|
50
|
+
options: textColorProps,
|
|
54
51
|
},
|
|
55
52
|
clearLabelTextColorHover: {
|
|
53
|
+
control: 'select',
|
|
54
|
+
if: { arg: 'clearLabel', neq: '' },
|
|
56
55
|
options: textColorHoverProps,
|
|
56
|
+
},
|
|
57
|
+
clearLabelTextSize: {
|
|
57
58
|
control: 'select',
|
|
58
59
|
if: { arg: 'clearLabel', neq: '' },
|
|
60
|
+
options: textSizeProps,
|
|
59
61
|
},
|
|
60
62
|
},
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
isClearable: true,
|
|
71
|
-
readOnly: false,
|
|
72
|
-
onKeyDown: (e) => {
|
|
73
|
-
e.preventDefault()
|
|
63
|
+
component: (props) => {
|
|
64
|
+
const [value, setValue] = useState(undefined)
|
|
65
|
+
return <DatePickerInput {...props} value={value} onChange={setValue} />
|
|
66
|
+
},
|
|
67
|
+
parameters: {
|
|
68
|
+
docs: {
|
|
69
|
+
story: {
|
|
70
|
+
iframeHeight: 900,
|
|
71
|
+
inline: false,
|
|
74
72
|
},
|
|
75
73
|
},
|
|
76
74
|
},
|
|
75
|
+
title: 'Molecules / DatePicker',
|
|
77
76
|
}
|
|
78
77
|
|
|
79
78
|
export const Default = {
|
|
@@ -89,13 +88,13 @@ export const Date = {
|
|
|
89
88
|
export const ClearIcon = {
|
|
90
89
|
args: {
|
|
91
90
|
clearIcon: icon16.Clear,
|
|
92
|
-
clearIconSize: 16,
|
|
93
91
|
clearIconItemFill: 'surfaceItemTertiary',
|
|
94
92
|
clearIconItemFillHover: 'surfaceItemPrimary',
|
|
93
|
+
clearIconSize: 16,
|
|
95
94
|
datePickerProps: {
|
|
96
95
|
...defaultDatepickerProps,
|
|
97
|
-
isStartDefaultNull: true,
|
|
98
96
|
isClearable: true,
|
|
97
|
+
isStartDefaultNull: true,
|
|
99
98
|
readOnly: false,
|
|
100
99
|
onKeyDown: (e) => {
|
|
101
100
|
e.preventDefault()
|
|
@@ -107,13 +106,13 @@ export const ClearIcon = {
|
|
|
107
106
|
export const ClearLabel = {
|
|
108
107
|
args: {
|
|
109
108
|
clearLabel: 'Clear',
|
|
110
|
-
clearLabelTextSize: 'm',
|
|
111
109
|
clearLabelTextColor: 'surfaceTextPrimary',
|
|
112
110
|
clearLabelTextColorHover: 'surfaceTextAccent',
|
|
111
|
+
clearLabelTextSize: 'm',
|
|
113
112
|
datePickerProps: {
|
|
114
113
|
...defaultDatepickerProps,
|
|
115
|
-
isStartDefaultNull: true,
|
|
116
114
|
isClearable: true,
|
|
115
|
+
isStartDefaultNull: true,
|
|
117
116
|
readOnly: false,
|
|
118
117
|
onKeyDown: (e) => {
|
|
119
118
|
e.preventDefault()
|
|
@@ -127,10 +126,10 @@ export const DateTime = {
|
|
|
127
126
|
datePickerProps: {
|
|
128
127
|
...defaultDatepickerProps,
|
|
129
128
|
dateFormat: 'dd-MM-yyyy hh:mm',
|
|
129
|
+
showTimeSelect: true,
|
|
130
|
+
timeCaption: 'Время',
|
|
130
131
|
timeFormat: 'p',
|
|
131
132
|
timeIntervals: 15,
|
|
132
|
-
timeCaption: 'Время',
|
|
133
|
-
showTimeSelect: true,
|
|
134
133
|
},
|
|
135
134
|
},
|
|
136
135
|
}
|
|
@@ -139,8 +138,8 @@ export const DateMultiple = {
|
|
|
139
138
|
args: {
|
|
140
139
|
datePickerProps: {
|
|
141
140
|
...defaultDatepickerProps,
|
|
142
|
-
placeholderText: 'Start – End (m/d/yyyy)',
|
|
143
141
|
monthsShown: 2,
|
|
142
|
+
placeholderText: 'Start – End (m/d/yyyy)',
|
|
144
143
|
selectsRange: true,
|
|
145
144
|
},
|
|
146
145
|
},
|
|
@@ -150,23 +149,23 @@ export const DateButton = {
|
|
|
150
149
|
args: {
|
|
151
150
|
datePickerProps: {
|
|
152
151
|
...defaultDatepickerProps,
|
|
153
|
-
dateFormat: 'dd-MM-yyyy hh:mm',
|
|
154
|
-
timeFormat: 'p',
|
|
155
|
-
timeIntervals: 15,
|
|
156
|
-
timeCaption: 'Время',
|
|
157
|
-
showTimeSelect: true,
|
|
158
|
-
showTimeInput: true,
|
|
159
|
-
timeInputLabel: null,
|
|
160
152
|
customTimeInput: (
|
|
161
153
|
<Button
|
|
154
|
+
width="fill"
|
|
155
|
+
labelTextSize="l"
|
|
162
156
|
appearance="accent"
|
|
163
157
|
label="OK"
|
|
164
|
-
labelTextSize="l"
|
|
165
158
|
shape="rounded"
|
|
166
159
|
size="xl"
|
|
167
|
-
width="fill"
|
|
168
160
|
/>
|
|
169
161
|
),
|
|
162
|
+
dateFormat: 'dd-MM-yyyy hh:mm',
|
|
163
|
+
showTimeInput: true,
|
|
164
|
+
showTimeSelect: true,
|
|
165
|
+
timeCaption: 'Время',
|
|
166
|
+
timeFormat: 'p',
|
|
167
|
+
timeInputLabel: null,
|
|
168
|
+
timeIntervals: 15,
|
|
170
169
|
},
|
|
171
170
|
},
|
|
172
171
|
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
import * as DirectionStories from './Direction.stories.js'
|
|
4
|
+
|
|
5
|
+
<Meta title="Layout / Group / Direction" />
|
|
6
|
+
|
|
7
|
+
# Direction
|
|
8
|
+
|
|
9
|
+
Свойство `direction` указывает, как элементы располагаются в-контейнере по главной оси и направлению (обычном или обратном).
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
<Group direction="...">...</Group>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Значения
|
|
16
|
+
|
|
17
|
+
- `row` — Элементы будут располагаться в строку (горизонтально)
|
|
18
|
+
- `rowReverse` — Элементы будут располагаться в строку (горизонтально) но наборот
|
|
19
|
+
- `column` — Элементы будут располагаться в строку (вертикально)
|
|
20
|
+
- `columnReverse` — Элементы будут располагаться в строку (вертикально) но наборот
|
|
21
|
+
- `horizontal` — Направление в котором элементы будут располагаться в строку (горизонтально)
|
|
22
|
+
- `vertical` — Направление в котором элементы будут располагаться в строку (вертикально)
|
|
23
|
+
|
|
24
|
+
# Примеры использования
|
|
25
|
+
|
|
26
|
+
### row
|
|
27
|
+
|
|
28
|
+
Элементы будут располагаться в строку (горизонтально)
|
|
29
|
+
|
|
30
|
+
```js
|
|
31
|
+
<Group direction="row">...</Group>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
<Canvas of={DirectionStories.Row} />
|
|
35
|
+
|
|
36
|
+
### rowReverse
|
|
37
|
+
|
|
38
|
+
Элементы будут располагаться в строку (горизонтально) но набороот
|
|
39
|
+
|
|
40
|
+
```js
|
|
41
|
+
<Group direction="rowReverse">...</Group>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
<Canvas of={DirectionStories.RowReverse} />
|
|
45
|
+
|
|
46
|
+
### column
|
|
47
|
+
|
|
48
|
+
Элементы будут располагаться в строку (вертикально)
|
|
49
|
+
|
|
50
|
+
```js
|
|
51
|
+
<Group direction="column">...</Group>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
<Canvas of={DirectionStories.Column} />
|
|
55
|
+
|
|
56
|
+
### columnReverse
|
|
57
|
+
|
|
58
|
+
Элементы будут располагаться в строку (вертикально) но наборот
|
|
59
|
+
|
|
60
|
+
```js
|
|
61
|
+
<Group direction="columnReverse">...</Group>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
<Canvas of={DirectionStories.ColumnReverse} />
|
|
65
|
+
|
|
66
|
+
### horizontal
|
|
67
|
+
|
|
68
|
+
Направление в котором элементы будут располагаться в строку (горизонтально)
|
|
69
|
+
|
|
70
|
+
```js
|
|
71
|
+
<Group direction="horizontal">...</Group>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
<Canvas of={DirectionStories.Horizontal} />
|
|
75
|
+
|
|
76
|
+
### vertical
|
|
77
|
+
|
|
78
|
+
Направление в котором элементы будут располагаться в строку (вертикально)
|
|
79
|
+
|
|
80
|
+
```js
|
|
81
|
+
<Group direction="vertical">...</Group>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
<Canvas of={DirectionStories.Vertical} />
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Group } from '../../Group'
|
|
2
|
+
import { Text } from '../../Text'
|
|
3
|
+
import { argTypes } from './args'
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
argTypes: {
|
|
7
|
+
...argTypes,
|
|
8
|
+
},
|
|
9
|
+
component: Group,
|
|
10
|
+
render: ({ ...args }) => (
|
|
11
|
+
<Group
|
|
12
|
+
width={args.width}
|
|
13
|
+
height={args.height}
|
|
14
|
+
fill={args.fill}
|
|
15
|
+
padding={args.padding}
|
|
16
|
+
borderColor={args.borderColor}
|
|
17
|
+
direction={args.direction}
|
|
18
|
+
>
|
|
19
|
+
<Group width="60" height="60" fill="accentPrimary" padding="20" textAlign="center">
|
|
20
|
+
<Text size="xl" textColor="accentTextPrimary">
|
|
21
|
+
1
|
|
22
|
+
</Text>
|
|
23
|
+
</Group>
|
|
24
|
+
<Group width="60" height="60" fill="primaryPrimary" padding="20" textAlign="center">
|
|
25
|
+
<Text size="xl" textColor="primaryTextPrimary">
|
|
26
|
+
2
|
|
27
|
+
</Text>
|
|
28
|
+
</Group>
|
|
29
|
+
<Group width="60" height="60" fill="secondaryPrimary" padding="20" textAlign="center">
|
|
30
|
+
<Text size="xl" textColor="secondaryTextPrimary">
|
|
31
|
+
3
|
|
32
|
+
</Text>
|
|
33
|
+
</Group>
|
|
34
|
+
<Group width="60" height="60" fill="infoPrimary" padding="20" textAlign="center">
|
|
35
|
+
<Text size="xl" textColor="infoTextPrimary">
|
|
36
|
+
4
|
|
37
|
+
</Text>
|
|
38
|
+
</Group>
|
|
39
|
+
</Group>
|
|
40
|
+
),
|
|
41
|
+
title: 'Layout / Group / Variants / Direction',
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const Default = {
|
|
45
|
+
args: {
|
|
46
|
+
width: '500',
|
|
47
|
+
padding: '20',
|
|
48
|
+
borderColor: 'surfaceBorderPrimary',
|
|
49
|
+
fill: 'surfacePrimary',
|
|
50
|
+
},
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const Row = {
|
|
54
|
+
args: {
|
|
55
|
+
...Default.args,
|
|
56
|
+
direction: 'row',
|
|
57
|
+
},
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export const RowReverse = {
|
|
61
|
+
args: {
|
|
62
|
+
...Default.args,
|
|
63
|
+
direction: 'row-reverse',
|
|
64
|
+
},
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export const Column = {
|
|
68
|
+
args: {
|
|
69
|
+
...Default.args,
|
|
70
|
+
direction: 'column',
|
|
71
|
+
},
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export const ColumnReverse = {
|
|
75
|
+
args: {
|
|
76
|
+
...Default.args,
|
|
77
|
+
direction: 'column-reverse',
|
|
78
|
+
},
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export const Horizontal = {
|
|
82
|
+
args: {
|
|
83
|
+
...Default.args,
|
|
84
|
+
direction: 'horizontal',
|
|
85
|
+
},
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export const Vertical = {
|
|
89
|
+
args: {
|
|
90
|
+
...Default.args,
|
|
91
|
+
direction: 'vertical',
|
|
92
|
+
},
|
|
93
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
import * as DividerStories from './Divider.stories.js'
|
|
4
|
+
|
|
5
|
+
<Meta of={DividerStories} />
|
|
6
|
+
|
|
7
|
+
# Divider
|
|
8
|
+
|
|
9
|
+
## SurfacePrimary
|
|
10
|
+
|
|
11
|
+
<Canvas sourceState="shown" of={DividerStories.SurfacePrimary} />
|
|
12
|
+
|
|
13
|
+
## SurfaceSecondary
|
|
14
|
+
|
|
15
|
+
<Canvas sourceState="shown" of={DividerStories.SurfaceSecondary} />
|
|
16
|
+
|
|
17
|
+
## SurfaceTertiary
|
|
18
|
+
|
|
19
|
+
<Canvas sourceState="shown" of={DividerStories.SurfaceTertiary} />
|
|
20
|
+
|
|
21
|
+
## SurfaceQuaternary
|
|
22
|
+
|
|
23
|
+
<Canvas sourceState="shown" of={DividerStories.SurfaceQuaternary} />
|
|
24
|
+
|
|
25
|
+
## AccentPrimary
|
|
26
|
+
|
|
27
|
+
<Canvas sourceState="shown" of={DividerStories.AccentPrimary} />
|
|
28
|
+
|
|
29
|
+
## PrimaryPrimary
|
|
30
|
+
|
|
31
|
+
<Canvas sourceState="shown" of={DividerStories.PrimaryPrimary} />
|
|
32
|
+
|
|
33
|
+
## SecondaryPrimary
|
|
34
|
+
|
|
35
|
+
<Canvas sourceState="shown" of={DividerStories.SecondaryPrimary} />
|
|
@@ -1,9 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { fillHoverProps } from '@itcase/ui/constants'
|
|
1
|
+
import { fillHoverProps } from '../../../constants'
|
|
2
|
+
import { Divider } from '../Divider'
|
|
4
3
|
|
|
5
4
|
export default {
|
|
6
|
-
|
|
5
|
+
argTypes: {
|
|
6
|
+
children: {
|
|
7
|
+
if: { arg: 'advancedProps' },
|
|
8
|
+
},
|
|
9
|
+
advancedProps: { control: 'boolean' },
|
|
10
|
+
className: {
|
|
11
|
+
if: { arg: 'advancedProps' },
|
|
12
|
+
},
|
|
13
|
+
fill: {
|
|
14
|
+
control: 'inline-radio',
|
|
15
|
+
options: [
|
|
16
|
+
'surfacePrimary',
|
|
17
|
+
'surfaceSecondary',
|
|
18
|
+
'surfaceTertiary',
|
|
19
|
+
'surfaceQuaternary',
|
|
20
|
+
'accentPrimary',
|
|
21
|
+
'primaryPrimary',
|
|
22
|
+
'secondaryPrimary',
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
fillHover: {
|
|
26
|
+
control: 'select',
|
|
27
|
+
options: fillHoverProps,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
7
30
|
component: Divider,
|
|
8
31
|
parameters: {
|
|
9
32
|
controls: {
|
|
@@ -25,31 +48,7 @@ export default {
|
|
|
25
48
|
],
|
|
26
49
|
},
|
|
27
50
|
},
|
|
28
|
-
|
|
29
|
-
advancedProps: { control: 'boolean' },
|
|
30
|
-
className: {
|
|
31
|
-
if: { arg: 'advancedProps' },
|
|
32
|
-
},
|
|
33
|
-
children: {
|
|
34
|
-
if: { arg: 'advancedProps' },
|
|
35
|
-
},
|
|
36
|
-
fill: {
|
|
37
|
-
options: [
|
|
38
|
-
'surfacePrimary',
|
|
39
|
-
'surfaceSecondary',
|
|
40
|
-
'surfaceTertiary',
|
|
41
|
-
'surfaceQuaternary',
|
|
42
|
-
'accentPrimary',
|
|
43
|
-
'primaryPrimary',
|
|
44
|
-
'secondaryPrimary',
|
|
45
|
-
],
|
|
46
|
-
control: 'inline-radio',
|
|
47
|
-
},
|
|
48
|
-
fillHover: {
|
|
49
|
-
options: fillHoverProps,
|
|
50
|
-
control: 'select',
|
|
51
|
-
},
|
|
52
|
-
},
|
|
51
|
+
title: 'Atoms / Divider',
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
export const Horizontal = {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
import * as DotStories from './Dot.stories.js'
|
|
4
|
+
|
|
5
|
+
<Meta of={DotStories} />
|
|
6
|
+
|
|
7
|
+
# Dot
|
|
8
|
+
|
|
9
|
+
## Accent
|
|
10
|
+
|
|
11
|
+
<Canvas sourceState="shown" of={DotStories.Accent} />
|
|
12
|
+
|
|
13
|
+
## Primary
|
|
14
|
+
|
|
15
|
+
<Canvas sourceState="shown" of={DotStories.Primary} />
|
|
16
|
+
|
|
17
|
+
## Secondary
|
|
18
|
+
|
|
19
|
+
<Canvas sourceState="shown" of={DotStories.Secondary} />
|
|
@@ -1,86 +1,85 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
borderColorProps,
|
|
4
|
-
borderTypeProps,
|
|
5
|
-
borderWidthProps,
|
|
6
|
-
borderColorHoverProps,
|
|
7
|
-
textColorProps,
|
|
8
|
-
fillProps,
|
|
9
|
-
sizeProps,
|
|
10
|
-
shapeProps,
|
|
11
|
-
} from '@itcase/ui/constants'
|
|
1
|
+
import { borderColorProps, borderTypeProps, fillProps, shapeProps } from '../../../constants'
|
|
2
|
+
import { Dot } from '../Dot'
|
|
12
3
|
|
|
13
4
|
export default {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
parameters: {
|
|
17
|
-
controls: {
|
|
18
|
-
exclude: [
|
|
19
|
-
'borderDesktop',
|
|
20
|
-
'borderMobile',
|
|
21
|
-
'borderTablet',
|
|
22
|
-
'borderTypeDesktop',
|
|
23
|
-
'borderTypeMobile',
|
|
24
|
-
'borderTypeTablet',
|
|
25
|
-
'fillDesktop',
|
|
26
|
-
'fillMobile',
|
|
27
|
-
'fillTablet',
|
|
28
|
-
'shapeDesktop',
|
|
29
|
-
'shapeMobile',
|
|
30
|
-
'shapeTablet',
|
|
31
|
-
],
|
|
32
|
-
},
|
|
5
|
+
args: {
|
|
6
|
+
shape: 'circular',
|
|
33
7
|
},
|
|
34
8
|
argTypes: {
|
|
35
|
-
advancedProps: { control: 'boolean' },
|
|
36
|
-
className: {
|
|
37
|
-
if: { arg: 'advancedProps' },
|
|
38
|
-
},
|
|
39
9
|
children: {
|
|
40
10
|
if: { arg: 'advancedProps' },
|
|
41
11
|
},
|
|
12
|
+
advancedProps: { control: 'boolean' },
|
|
42
13
|
border: {
|
|
43
|
-
options: borderColorProps,
|
|
44
14
|
control: 'select',
|
|
15
|
+
options: borderColorProps,
|
|
45
16
|
},
|
|
46
17
|
borderType: {
|
|
47
|
-
options: borderTypeProps,
|
|
48
18
|
control: 'inline-radio',
|
|
19
|
+
options: borderTypeProps,
|
|
20
|
+
},
|
|
21
|
+
className: {
|
|
22
|
+
if: { arg: 'advancedProps' },
|
|
49
23
|
},
|
|
50
24
|
fill: {
|
|
51
|
-
options: fillProps,
|
|
52
25
|
control: 'select',
|
|
26
|
+
options: fillProps,
|
|
53
27
|
},
|
|
54
28
|
shape: {
|
|
29
|
+
control: 'inline-radio',
|
|
55
30
|
options: shapeProps,
|
|
31
|
+
},
|
|
32
|
+
size: {
|
|
56
33
|
control: 'inline-radio',
|
|
34
|
+
options: ['s', 'm', 'l'],
|
|
57
35
|
},
|
|
58
36
|
},
|
|
59
|
-
|
|
60
|
-
|
|
37
|
+
component: Dot,
|
|
38
|
+
parameters: {
|
|
39
|
+
controls: {
|
|
40
|
+
exclude: [
|
|
41
|
+
'borderDesktop',
|
|
42
|
+
'borderMobile',
|
|
43
|
+
'borderTablet',
|
|
44
|
+
'borderTypeDesktop',
|
|
45
|
+
'borderTypeMobile',
|
|
46
|
+
'borderTypeTablet',
|
|
47
|
+
'fillDesktop',
|
|
48
|
+
'fillMobile',
|
|
49
|
+
'fillTablet',
|
|
50
|
+
'shapeDesktop',
|
|
51
|
+
'shapeMobile',
|
|
52
|
+
'shapeTablet',
|
|
53
|
+
],
|
|
54
|
+
},
|
|
61
55
|
},
|
|
56
|
+
title: 'Atoms / Dot',
|
|
62
57
|
}
|
|
63
58
|
|
|
64
59
|
export const Default = {
|
|
65
60
|
args: {
|
|
66
61
|
fill: 'accentPrimary',
|
|
62
|
+
size: 'm',
|
|
67
63
|
},
|
|
68
64
|
}
|
|
69
65
|
|
|
70
66
|
export const Accent = {
|
|
71
67
|
args: {
|
|
68
|
+
...Default.args,
|
|
72
69
|
fill: 'accentPrimary',
|
|
73
70
|
},
|
|
74
71
|
}
|
|
75
72
|
|
|
76
73
|
export const Primary = {
|
|
77
74
|
args: {
|
|
75
|
+
...Default.args,
|
|
78
76
|
fill: 'primaryPrimary',
|
|
79
77
|
},
|
|
80
78
|
}
|
|
81
79
|
|
|
82
80
|
export const Secondary = {
|
|
83
81
|
args: {
|
|
82
|
+
...Default.args,
|
|
84
83
|
fill: 'secondaryPrimary',
|
|
85
84
|
},
|
|
86
85
|
}
|