@itcase/ui 1.2.19 → 1.2.21
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/cjs/components/Accordion.js +3 -2
- package/dist/cjs/components/Choice.js +1 -1
- package/dist/cjs/components/InputPassword.js +6 -6
- package/dist/cjs/components/Radio.js +85 -8
- 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/components/Accordion.js +3 -2
- package/dist/components/Choice.js +1 -1
- package/dist/components/InputPassword.js +6 -6
- package/dist/components/Radio.js +86 -5
- 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/DatePicker/DatePicker.css +12 -12
- package/dist/css/components/Icon/Icon.css +4 -2
- package/dist/css/mixins/mixin_elevation.css +0 -2
- package/dist/css/mixins/mixin_typography.css +104 -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/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/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 +24 -9
- package/dist/stories/Appearance.stories.js +77 -23
- 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/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/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 +1 -2
- package/dist/stories/Pagination.mdx +11 -0
- package/dist/stories/Pagination.stories.js +24 -27
- package/dist/stories/Playground.mdx +1 -2
- 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 +111 -96
- 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 +0 -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/package.json +36 -42
- 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 -78
- 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,31 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Button, buttonConfig } from '
|
|
3
|
-
import buttonAppearance from '
|
|
4
|
-
import {
|
|
5
|
-
import notificationAppearance from '
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
alignDirectionProps,
|
|
9
|
-
alignProps,
|
|
10
|
-
textSizeProps,
|
|
11
|
-
titleSizeProps,
|
|
12
|
-
widthProps,
|
|
13
|
-
} from '@itcase/ui/constants'
|
|
1
|
+
import { textSizeProps, titleSizeProps } from '../../../constants'
|
|
2
|
+
import { Button, buttonConfig } from '../../Button'
|
|
3
|
+
import buttonAppearance from '../../Button/appearance.json'
|
|
4
|
+
import { Icon } from '../../Icon'
|
|
5
|
+
import notificationAppearance from '../appearance.json'
|
|
6
|
+
import { NotificationItem, notificationItemConfig } from '../NotificationItem'
|
|
14
7
|
|
|
15
8
|
buttonConfig.setAppearance(buttonAppearance)
|
|
16
9
|
notificationItemConfig.setAppearance(notificationAppearance)
|
|
17
10
|
|
|
18
|
-
import { icon16 } from 'src/icons'
|
|
19
|
-
|
|
20
11
|
export default {
|
|
21
|
-
title: 'Atoms / NotificationItem',
|
|
22
|
-
component: NotificationItem,
|
|
23
12
|
argTypes: {
|
|
24
13
|
advancedProps: { control: 'boolean' },
|
|
25
|
-
className: {
|
|
26
|
-
if: { arg: 'advancedProps' },
|
|
27
|
-
},
|
|
28
14
|
appearance: {
|
|
15
|
+
control: 'inline-radio',
|
|
29
16
|
options: [
|
|
30
17
|
null,
|
|
31
18
|
'accent',
|
|
@@ -35,36 +22,40 @@ export default {
|
|
|
35
22
|
'surfaceSecondary',
|
|
36
23
|
'surfaceTertiary',
|
|
37
24
|
],
|
|
38
|
-
|
|
25
|
+
},
|
|
26
|
+
className: {
|
|
27
|
+
if: { arg: 'advancedProps' },
|
|
39
28
|
},
|
|
40
29
|
set: {
|
|
41
|
-
options: [null, 'top', 'float', 'form', 'toast'],
|
|
42
30
|
control: 'inline-radio',
|
|
31
|
+
options: [null, 'top', 'float', 'form', 'toast'],
|
|
43
32
|
},
|
|
44
33
|
status: {
|
|
45
|
-
options: [null, 'success', 'error', 'warning'],
|
|
46
34
|
control: 'inline-radio',
|
|
35
|
+
options: [null, 'success', 'error', 'warning'],
|
|
47
36
|
},
|
|
48
37
|
textSize: {
|
|
49
|
-
options: textSizeProps,
|
|
50
38
|
control: 'inline-radio',
|
|
39
|
+
options: textSizeProps,
|
|
51
40
|
},
|
|
52
41
|
titleTextSize: {
|
|
53
|
-
options: titleSizeProps,
|
|
54
42
|
control: 'inline-radio',
|
|
43
|
+
options: titleSizeProps,
|
|
55
44
|
},
|
|
56
45
|
type: {
|
|
57
46
|
if: { arg: 'advancedProps' },
|
|
58
47
|
},
|
|
59
48
|
},
|
|
49
|
+
component: NotificationItem,
|
|
50
|
+
title: 'Molecules / Notification',
|
|
60
51
|
}
|
|
61
52
|
|
|
62
53
|
export const Default = {
|
|
63
54
|
args: {
|
|
64
55
|
set: 'top',
|
|
65
|
-
title: 'Heading',
|
|
66
|
-
text: 'Text',
|
|
67
56
|
status: 'success',
|
|
57
|
+
text: 'Text',
|
|
58
|
+
title: 'Heading',
|
|
68
59
|
},
|
|
69
60
|
}
|
|
70
61
|
|
|
@@ -79,16 +70,9 @@ export const Top = {
|
|
|
79
70
|
export const Float = {
|
|
80
71
|
args: {
|
|
81
72
|
...Default.args,
|
|
73
|
+
closeButton: <Icon iconFill="surfaceItemSecondary" imageSrc="assets/16/Remove.svg" size="16" />,
|
|
82
74
|
set: 'float',
|
|
83
75
|
status: 'warning',
|
|
84
|
-
closeButton: (
|
|
85
|
-
<Icon
|
|
86
|
-
iconFill="surfaceItemSecondary"
|
|
87
|
-
size="16"
|
|
88
|
-
SvgImage={icon16.Remove}
|
|
89
|
-
// TODO: onClick={}
|
|
90
|
-
/>
|
|
91
|
-
),
|
|
92
76
|
},
|
|
93
77
|
}
|
|
94
78
|
|
|
@@ -104,25 +88,18 @@ export const Form = {
|
|
|
104
88
|
export const Toast = {
|
|
105
89
|
args: {
|
|
106
90
|
...Default.args,
|
|
107
|
-
set: 'toast',
|
|
108
|
-
status: null,
|
|
109
91
|
after: (
|
|
110
92
|
<Button
|
|
93
|
+
width="fill"
|
|
94
|
+
labelTextSize="m"
|
|
111
95
|
appearance="accent"
|
|
112
96
|
label="Обновить приложение"
|
|
113
|
-
labelTextSize="m"
|
|
114
97
|
shape="rounded"
|
|
115
98
|
size="l"
|
|
116
|
-
width="fill"
|
|
117
|
-
/>
|
|
118
|
-
),
|
|
119
|
-
closeButton: (
|
|
120
|
-
<Icon
|
|
121
|
-
iconFill="surfaceItemSecondary"
|
|
122
|
-
size="16"
|
|
123
|
-
SvgImage={icon16.Remove}
|
|
124
|
-
// TODO: onClick={}
|
|
125
99
|
/>
|
|
126
100
|
),
|
|
101
|
+
closeButton: <Icon iconFill="surfaceItemPrimary" imageSrc="assets/16/Remove.svg" size="16" />,
|
|
102
|
+
set: 'toast',
|
|
103
|
+
status: null,
|
|
127
104
|
},
|
|
128
105
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
import * as OrderStories from './FlexOrder.stories.js'
|
|
4
|
+
|
|
5
|
+
<Meta title="Layout / Flex / Order" />
|
|
6
|
+
|
|
7
|
+
# Order
|
|
8
|
+
|
|
9
|
+
Свойство `order` определяет порядок вывода флексов внутри флекс-контейнера. Элементы располагаются согласно значениям свойства order от меньшего к большему.
|
|
10
|
+
При равных значениях order элементы выводятся в том порядке, в каком они появляются в исходном коде.
|
|
11
|
+
|
|
12
|
+
```js
|
|
13
|
+
<FlexItem order="...">...</FlexItem>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Значения
|
|
17
|
+
|
|
18
|
+
- `-1` — Элемент выведется первым
|
|
19
|
+
- `0` — Значение по умолчанию. Элемент будет располагаться в том порядке, в каком появляется в исходном коде
|
|
20
|
+
- `1` — Элемент выведется последним
|
|
21
|
+
|
|
22
|
+
# Примеры использования
|
|
23
|
+
|
|
24
|
+
### Значение -1
|
|
25
|
+
|
|
26
|
+
Элемент выведется первым
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
<FlexItem order="-1">...</FlexItem>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
<Canvas of={OrderStories.First} />
|
|
33
|
+
|
|
34
|
+
### Значение 0
|
|
35
|
+
|
|
36
|
+
Значение по умолчанию. Элемент будет располагаться в том порядке, в каком появляется в исходном коде
|
|
37
|
+
|
|
38
|
+
```js
|
|
39
|
+
<FlexItem order="0">...</FlexItem>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
<Canvas of={OrderStories.Regular} />
|
|
43
|
+
|
|
44
|
+
### Значение 1
|
|
45
|
+
|
|
46
|
+
Элемент выведется последним
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
<FlexItem order="1">...</FlexItem>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
<Canvas of={OrderStories.Last} />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/blocks'
|
|
2
2
|
|
|
3
|
-
import * as TooltipStories from '
|
|
3
|
+
import * as TooltipStories from './Tooltip.stories.js'
|
|
4
4
|
|
|
5
5
|
<Meta title="Atoms / Tooltip / Overview" />
|
|
6
6
|
|
|
@@ -9,4 +9,3 @@ import * as TooltipStories from '../Appearance.stories.js'
|
|
|
9
9
|
`Tooltip` - это небольшой фрагмент контекстной информации, который появляется, когда пользователи наводят курсор мыши на элемент пользовательского интерфейса.
|
|
10
10
|
|
|
11
11
|
<Story of={TooltipStories.surfacePrimary} />
|
|
12
|
-
./stories/Appearance.stories.js
|
|
@@ -1,65 +1,62 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Icon } from '
|
|
3
|
-
|
|
4
|
-
import { flexJustifyContentProps } from '@itcase/ui/constants'
|
|
5
|
-
|
|
6
|
-
import { icon14 } from 'src/icons'
|
|
1
|
+
import { flexJustifyContentProps } from '../../../constants'
|
|
2
|
+
import { Icon } from '../../Icon'
|
|
3
|
+
import { Pagination } from '../../Pagination'
|
|
7
4
|
|
|
8
5
|
export default {
|
|
9
|
-
title: 'Atoms / Pagination ',
|
|
10
|
-
component: Pagination,
|
|
11
6
|
argTypes: {
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
justifyContent: {
|
|
8
|
+
control: 'inline-radio',
|
|
14
9
|
if: { arg: 'advancedProps' },
|
|
10
|
+
options: flexJustifyContentProps,
|
|
15
11
|
},
|
|
16
|
-
|
|
12
|
+
advancedProps: { control: 'boolean' },
|
|
13
|
+
allItemsCount: {
|
|
14
|
+
control: { max: 50, min: 1, step: 1, type: 'number' },
|
|
15
|
+
},
|
|
16
|
+
className: {
|
|
17
17
|
if: { arg: 'advancedProps' },
|
|
18
18
|
},
|
|
19
19
|
marginPagesDisplayed: {
|
|
20
|
-
control: {
|
|
21
|
-
},
|
|
22
|
-
pageRangeDisplayed: {
|
|
23
|
-
control: { type: 'number', min: 1, max: 10, step: 1 },
|
|
20
|
+
control: { max: 10, min: 1, step: 1, type: 'number' },
|
|
24
21
|
},
|
|
25
|
-
|
|
22
|
+
pageNumber: {
|
|
26
23
|
if: { arg: 'advancedProps' },
|
|
27
|
-
options: flexJustifyContentProps,
|
|
28
|
-
control: 'inline-radio',
|
|
29
24
|
},
|
|
30
|
-
|
|
31
|
-
control: {
|
|
25
|
+
pageRangeDisplayed: {
|
|
26
|
+
control: { max: 10, min: 1, step: 1, type: 'number' },
|
|
32
27
|
},
|
|
33
28
|
perPageCount: {
|
|
34
|
-
control: {
|
|
29
|
+
control: { max: 50, min: 1, step: 1, type: 'number' },
|
|
35
30
|
},
|
|
36
31
|
},
|
|
32
|
+
component: Pagination,
|
|
33
|
+
title: 'Atoms / Pagination ',
|
|
37
34
|
}
|
|
38
35
|
|
|
39
36
|
export const Default = {
|
|
40
37
|
args: {
|
|
41
38
|
allItemsCount: 50,
|
|
42
|
-
perPageCount: 5,
|
|
43
39
|
marginPagesDisplayed: 3,
|
|
44
|
-
|
|
45
|
-
previousLabel: (
|
|
40
|
+
nextLabel: (
|
|
46
41
|
<Icon
|
|
47
42
|
fillHover="surfaceSecondaryHover"
|
|
48
43
|
fillSize="32"
|
|
49
44
|
iconFill="surfaceItemPrimary"
|
|
45
|
+
imageSrc="assets/14/ChevronRight.svg"
|
|
50
46
|
shape="circular"
|
|
51
47
|
size="14"
|
|
52
|
-
SvgImage={icon14.ChevronLeft}
|
|
53
48
|
/>
|
|
54
49
|
),
|
|
55
|
-
|
|
50
|
+
pageRangeDisplayed: 7,
|
|
51
|
+
perPageCount: 5,
|
|
52
|
+
previousLabel: (
|
|
56
53
|
<Icon
|
|
57
54
|
fillHover="surfaceSecondaryHover"
|
|
58
55
|
fillSize="32"
|
|
59
56
|
iconFill="surfaceItemPrimary"
|
|
57
|
+
imageSrc="assets/14/ChevronLeft.svg"
|
|
60
58
|
shape="circular"
|
|
61
59
|
size="14"
|
|
62
|
-
SvgImage={icon14.ChevronRight}
|
|
63
60
|
/>
|
|
64
61
|
),
|
|
65
62
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Canvas, Controls, Meta } from '@storybook/blocks'
|
|
2
2
|
|
|
3
|
-
import * as TooltipStories from '
|
|
3
|
+
import * as TooltipStories from './Tooltip.stories.js'
|
|
4
4
|
|
|
5
5
|
<Meta title="Atoms / Tooltip / Playground" />
|
|
6
6
|
|
|
@@ -8,4 +8,3 @@ import * as TooltipStories from '../Appearance.stories.js'
|
|
|
8
8
|
|
|
9
9
|
<Canvas sourceState="shown" of={TooltipStories.surfacePrimary} />
|
|
10
10
|
<Controls of={TooltipStories.surfacePrimary} />
|
|
11
|
-
./stories/Appearance.stories.js
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
import * as RadioStories from './Radio.stories.js'
|
|
4
|
+
|
|
5
|
+
<Meta of={RadioStories} />
|
|
6
|
+
|
|
7
|
+
# Radio
|
|
8
|
+
|
|
9
|
+
## Active
|
|
10
|
+
|
|
11
|
+
<Canvas sourceState="shown" of={RadioStories.Active} />
|
|
12
|
+
|
|
13
|
+
## Disabled
|
|
14
|
+
|
|
15
|
+
<Canvas sourceState="shown" of={RadioStories.Disabled} />
|
|
16
|
+
|
|
17
|
+
## Checked
|
|
18
|
+
|
|
19
|
+
<Canvas sourceState="shown" of={RadioStories.Checked} />
|
|
20
|
+
|
|
21
|
+
## CheckedDisabled
|
|
22
|
+
|
|
23
|
+
<Canvas sourceState="shown" of={RadioStories.CheckedDisabled} />
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
Active
|
|
27
|
+
Disabled
|
|
28
|
+
Checked
|
|
29
|
+
CheckedDisabled
|
|
@@ -1,74 +1,73 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import { shapeProps, textColorProps, textSizeProps } from '@itcase/ui/constants'
|
|
1
|
+
import { shapeProps, textColorProps, textSizeProps } from '../../../constants'
|
|
2
|
+
import { Radio, radioConfig } from '../Radio'
|
|
3
|
+
import radioState from '../state.json'
|
|
5
4
|
|
|
6
5
|
radioConfig.setState(radioState)
|
|
7
6
|
|
|
8
7
|
export default {
|
|
9
|
-
title: 'Atoms / Radio',
|
|
10
|
-
component: Radio,
|
|
11
8
|
argTypes: {
|
|
12
9
|
advancedProps: { control: 'boolean' },
|
|
10
|
+
checked: {
|
|
11
|
+
control: 'boolean',
|
|
12
|
+
},
|
|
13
13
|
className: {
|
|
14
14
|
if: { arg: 'advancedProps' },
|
|
15
15
|
},
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
descTextColor: {
|
|
17
|
+
control: 'select',
|
|
18
|
+
options: textColorProps,
|
|
18
19
|
},
|
|
19
|
-
|
|
20
|
-
options: shapeProps,
|
|
20
|
+
descTextSize: {
|
|
21
21
|
control: 'inline-radio',
|
|
22
|
-
},
|
|
23
|
-
labelTextSize: {
|
|
24
22
|
options: textSizeProps,
|
|
25
|
-
|
|
23
|
+
},
|
|
24
|
+
disabled: {
|
|
25
|
+
control: 'boolean',
|
|
26
26
|
},
|
|
27
27
|
labelTextColor: {
|
|
28
|
-
options: textColorProps,
|
|
29
28
|
control: 'select',
|
|
29
|
+
options: textColorProps,
|
|
30
30
|
},
|
|
31
|
-
|
|
32
|
-
options: textSizeProps,
|
|
31
|
+
labelTextSize: {
|
|
33
32
|
control: 'inline-radio',
|
|
33
|
+
options: textSizeProps,
|
|
34
34
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
checked: {
|
|
40
|
-
control: 'boolean',
|
|
35
|
+
shape: {
|
|
36
|
+
control: 'inline-radio',
|
|
37
|
+
options: shapeProps,
|
|
41
38
|
},
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
tag: {
|
|
40
|
+
if: { arg: 'advancedProps' },
|
|
44
41
|
},
|
|
45
42
|
},
|
|
43
|
+
component: Radio,
|
|
44
|
+
title: 'Atoms / Radio',
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
export const Default = {
|
|
49
48
|
args: {
|
|
50
|
-
label: 'Radio',
|
|
51
|
-
labelTextSize: 'm',
|
|
52
|
-
labelTextColor: 'surfaceTextPrimary',
|
|
53
49
|
desc: 'Description',
|
|
54
|
-
descTextSize: 'xxs',
|
|
55
50
|
descTextColor: 'surfaceTextTertiary',
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
descTextSize: 'xxs',
|
|
52
|
+
label: 'Radio',
|
|
53
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
54
|
+
labelTextSize: 'm',
|
|
58
55
|
|
|
59
56
|
stateBorderColor: 'surfaceBorderQuaternary',
|
|
57
|
+
|
|
60
58
|
stateBorderColorChecked: 'surfaceBorderQuaternary',
|
|
61
59
|
stateBorderColorDisabled: 'surfaceBorderQuaternary',
|
|
62
60
|
stateBorderColorDisabledChecked: 'surfaceBorderQuaternary',
|
|
63
|
-
|
|
64
61
|
stateBorderWidth: 1,
|
|
65
62
|
|
|
63
|
+
stateCheckmarkFill: 'surfaceItemAccent',
|
|
64
|
+
|
|
65
|
+
stateCheckmarkFillDisabled: 'surfaceItemDisabled',
|
|
66
66
|
stateFill: 'surfacePrimary',
|
|
67
67
|
stateFillChecked: 'surfacePrimary',
|
|
68
68
|
stateFillDisabled: 'surfaceDisabled',
|
|
69
69
|
stateFillDisabledChecked: 'surfaceDisabled',
|
|
70
|
-
|
|
71
|
-
stateCheckmarkFillDisabled: 'surfaceItemDisabled',
|
|
70
|
+
stateShape: 'circular',
|
|
72
71
|
},
|
|
73
72
|
}
|
|
74
73
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
import * as ResponseStories from './Response.stories.js'
|
|
4
|
+
|
|
5
|
+
<Meta of={ResponseStories} />
|
|
6
|
+
|
|
7
|
+
# Response Set: Default
|
|
8
|
+
## Success
|
|
9
|
+
<Canvas sourceState="shown" of={ResponseStories.Success} />
|
|
10
|
+
|
|
11
|
+
## Warning
|
|
12
|
+
<Canvas sourceState="shown" of={ResponseStories.Warning} />
|
|
13
|
+
|
|
14
|
+
## Error
|
|
15
|
+
<Canvas sourceState="shown" of={ResponseStories.Error} />
|
|
16
|
+
|
|
17
|
+
## Fail
|
|
18
|
+
<Canvas sourceState="shown" of={ResponseStories.Fail} />
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Response } from '../Response'
|
|
2
|
+
import { argTypes } from './args'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
argTypes: {
|
|
6
|
+
...argTypes,
|
|
7
|
+
},
|
|
8
|
+
component: Response,
|
|
9
|
+
title: 'Molecules / Response / Set: Default',
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const Default = {
|
|
13
|
+
args: {
|
|
14
|
+
message: 'Text',
|
|
15
|
+
primaryButtonLabel: 'Primary Button',
|
|
16
|
+
secondaryButtonLabel: 'Secondary Button',
|
|
17
|
+
title: 'Heading',
|
|
18
|
+
},
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const WithoutProps = {
|
|
22
|
+
args: {
|
|
23
|
+
...Default.args,
|
|
24
|
+
},
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const Dev = {
|
|
28
|
+
args: {
|
|
29
|
+
...Default.args,
|
|
30
|
+
padding: 24,
|
|
31
|
+
appearance: 'dev',
|
|
32
|
+
imageSrc: 'assets/search.svg',
|
|
33
|
+
},
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const Success = {
|
|
37
|
+
args: {
|
|
38
|
+
...Default.args,
|
|
39
|
+
imageSrc: 'assets/response/success.svg',
|
|
40
|
+
state: 'success',
|
|
41
|
+
},
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export const Warning = {
|
|
45
|
+
args: {
|
|
46
|
+
...Default.args,
|
|
47
|
+
imageSrc: 'assets/response/warning.svg',
|
|
48
|
+
state: 'warning',
|
|
49
|
+
},
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export const Error = {
|
|
53
|
+
args: {
|
|
54
|
+
...Default.args,
|
|
55
|
+
imageSrc: 'assets/response/error.svg',
|
|
56
|
+
state: 'error',
|
|
57
|
+
},
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export const Fail = {
|
|
61
|
+
args: {
|
|
62
|
+
...Default.args,
|
|
63
|
+
imageSrc: 'assets/response/fail.svg',
|
|
64
|
+
state: 'fail',
|
|
65
|
+
},
|
|
66
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
import * as SearchInputStories from './SearchInput.stories.js'
|
|
4
|
+
|
|
5
|
+
<Meta of={SearchInputStories} />
|
|
6
|
+
|
|
7
|
+
# SearchInput
|
|
8
|
+
|
|
9
|
+
## С иконкой для очистки поля ClearIcon
|
|
10
|
+
|
|
11
|
+
<Canvas of={SearchInputStories.ClearIcon} />
|
|
12
|
+
|
|
13
|
+
## С иконкой до текста BeforeIcon
|
|
14
|
+
|
|
15
|
+
<Canvas of={SearchInputStories.BeforeIcon} />
|
|
16
|
+
|
|
17
|
+
## С иконкой после текста AfterIcon
|
|
18
|
+
|
|
19
|
+
<Canvas of={SearchInputStories.AfterIcon} />
|