@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,193 +1,258 @@
|
|
|
1
|
-
import { MenuItem, menuItemConfig } from '@itcase/ui/components/MenuItem'
|
|
2
|
-
import menuItemAppearance from 'src/components/MenuItem/appearance.json'
|
|
3
|
-
|
|
4
1
|
import {
|
|
5
2
|
fillProps,
|
|
6
|
-
sizeProps,
|
|
7
3
|
shapeProps,
|
|
8
|
-
|
|
9
|
-
textWeightProps,
|
|
10
|
-
textColorProps,
|
|
4
|
+
sizeProps,
|
|
11
5
|
textColorActiveProps,
|
|
12
|
-
textSizeProps,
|
|
13
6
|
textColorHoverProps,
|
|
7
|
+
textColorProps,
|
|
14
8
|
textGradientProps,
|
|
9
|
+
textSizeProps,
|
|
15
10
|
textStyleProps,
|
|
11
|
+
textWeightProps,
|
|
12
|
+
textWrapProps,
|
|
16
13
|
underlineProps,
|
|
17
|
-
} from '
|
|
14
|
+
} from '../../../constants'
|
|
15
|
+
import menuItemAppearance from '../appearance.json'
|
|
16
|
+
import { MenuItem, menuItemConfig } from '../MenuItem'
|
|
18
17
|
|
|
19
18
|
menuItemConfig.setAppearance(menuItemAppearance)
|
|
20
19
|
|
|
21
20
|
export default {
|
|
22
|
-
title: 'Atoms / Menu Item',
|
|
23
|
-
component: MenuItem,
|
|
24
|
-
parameters: {
|
|
25
|
-
controls: {
|
|
26
|
-
exclude: [
|
|
27
|
-
'fillDesktop',
|
|
28
|
-
'fillMobile',
|
|
29
|
-
'fillTablet',
|
|
30
|
-
'linkFillDesktop',
|
|
31
|
-
'linkFillMobile',
|
|
32
|
-
'linkFillTablet',
|
|
33
|
-
'shapeDesktop',
|
|
34
|
-
'shapeMobile',
|
|
35
|
-
'shapeTablet',
|
|
36
|
-
'sizeDesktop',
|
|
37
|
-
'sizeMobile',
|
|
38
|
-
'sizeTablet',
|
|
39
|
-
'typeDesktop',
|
|
40
|
-
'typeMobile',
|
|
41
|
-
'typeTablet',
|
|
42
|
-
],
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
21
|
argTypes: {
|
|
46
|
-
advancedProps: { control: 'boolean' },
|
|
47
|
-
after: {
|
|
48
|
-
if: { arg: 'advancedProps' },
|
|
49
|
-
},
|
|
50
|
-
before: {
|
|
51
|
-
if: { arg: 'advancedProps' },
|
|
52
|
-
},
|
|
53
22
|
children: {
|
|
54
23
|
if: { arg: 'advancedProps' },
|
|
55
24
|
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
href: {
|
|
60
|
-
if: { arg: 'advancedProps' },
|
|
61
|
-
},
|
|
62
|
-
link: {
|
|
63
|
-
if: { arg: 'advancedProps' },
|
|
64
|
-
},
|
|
65
|
-
LinkComponent: {
|
|
66
|
-
if: { arg: 'advancedProps' },
|
|
67
|
-
},
|
|
68
|
-
rel: {
|
|
25
|
+
advancedProps: { control: 'boolean' },
|
|
26
|
+
after: {
|
|
69
27
|
if: { arg: 'advancedProps' },
|
|
70
28
|
},
|
|
71
|
-
|
|
72
|
-
|
|
29
|
+
appearance: {
|
|
30
|
+
control: 'inline-radio',
|
|
31
|
+
options: [null, 'any'],
|
|
73
32
|
},
|
|
74
|
-
|
|
33
|
+
before: {
|
|
75
34
|
if: { arg: 'advancedProps' },
|
|
76
35
|
},
|
|
77
|
-
|
|
36
|
+
className: {
|
|
78
37
|
if: { arg: 'advancedProps' },
|
|
79
38
|
},
|
|
80
|
-
appearance: {
|
|
81
|
-
options: [null, 'any'],
|
|
82
|
-
control: 'inline-radio',
|
|
83
|
-
},
|
|
84
39
|
descTextColor: {
|
|
85
|
-
options: textColorProps,
|
|
86
40
|
control: 'select',
|
|
41
|
+
options: textColorProps,
|
|
87
42
|
},
|
|
88
43
|
descTextColorHover: {
|
|
89
|
-
options: textColorHoverProps,
|
|
90
44
|
control: 'select',
|
|
45
|
+
options: textColorHoverProps,
|
|
91
46
|
},
|
|
92
47
|
descTextGradient: {
|
|
48
|
+
control: 'inline-radio',
|
|
93
49
|
if: { arg: 'advancedProps' },
|
|
94
50
|
options: textGradientProps,
|
|
95
|
-
control: 'inline-radio',
|
|
96
51
|
},
|
|
97
52
|
descTextSize: {
|
|
98
|
-
options: textSizeProps,
|
|
99
53
|
control: 'inline-radio',
|
|
54
|
+
options: textSizeProps,
|
|
100
55
|
},
|
|
101
56
|
descTextStyle: {
|
|
57
|
+
control: 'inline-radio',
|
|
102
58
|
if: { arg: 'advancedProps' },
|
|
103
59
|
options: textStyleProps,
|
|
104
|
-
control: 'inline-radio',
|
|
105
60
|
},
|
|
106
61
|
descTextWeight: {
|
|
107
|
-
options: textWeightProps,
|
|
108
62
|
control: 'inline-radio',
|
|
63
|
+
options: textWeightProps,
|
|
109
64
|
},
|
|
110
65
|
descTextWrap: {
|
|
66
|
+
control: 'inline-radio',
|
|
111
67
|
if: { arg: 'advancedProps' },
|
|
112
68
|
options: textWrapProps,
|
|
113
|
-
control: 'inline-radio',
|
|
114
69
|
},
|
|
115
70
|
fill: {
|
|
116
|
-
options: fillProps,
|
|
117
71
|
control: 'select',
|
|
72
|
+
options: fillProps,
|
|
73
|
+
},
|
|
74
|
+
href: {
|
|
75
|
+
if: { arg: 'advancedProps' },
|
|
76
|
+
},
|
|
77
|
+
link: {
|
|
78
|
+
if: { arg: 'advancedProps' },
|
|
79
|
+
},
|
|
80
|
+
LinkComponent: {
|
|
81
|
+
if: { arg: 'advancedProps' },
|
|
118
82
|
},
|
|
119
83
|
linkFill: {
|
|
84
|
+
control: 'select',
|
|
120
85
|
if: { arg: 'advancedProps' },
|
|
121
86
|
options: fillProps,
|
|
122
|
-
|
|
87
|
+
},
|
|
88
|
+
rel: {
|
|
89
|
+
if: { arg: 'advancedProps' },
|
|
123
90
|
},
|
|
124
91
|
shape: {
|
|
125
|
-
options: shapeProps,
|
|
126
92
|
control: 'inline-radio',
|
|
93
|
+
options: shapeProps,
|
|
127
94
|
},
|
|
128
95
|
size: {
|
|
129
|
-
options: sizeProps,
|
|
130
96
|
control: 'inline-radio',
|
|
97
|
+
options: sizeProps,
|
|
131
98
|
},
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
control: 'select',
|
|
99
|
+
target: {
|
|
100
|
+
if: { arg: 'advancedProps' },
|
|
135
101
|
},
|
|
136
|
-
|
|
137
|
-
options: textColorHoverProps,
|
|
102
|
+
textColor: {
|
|
138
103
|
control: 'select',
|
|
104
|
+
options: textColorProps,
|
|
139
105
|
},
|
|
140
106
|
textColorActive: {
|
|
141
|
-
options: textColorActiveProps,
|
|
142
107
|
control: 'select',
|
|
108
|
+
options: textColorActiveProps,
|
|
143
109
|
},
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
110
|
+
textColorHover: {
|
|
111
|
+
control: 'select',
|
|
112
|
+
options: textColorHoverProps,
|
|
147
113
|
},
|
|
148
114
|
textGradient: {
|
|
115
|
+
control: 'inline-radio',
|
|
149
116
|
if: { arg: 'advancedProps' },
|
|
150
117
|
options: textGradientProps,
|
|
118
|
+
},
|
|
119
|
+
textSize: {
|
|
151
120
|
control: 'inline-radio',
|
|
121
|
+
options: textSizeProps,
|
|
152
122
|
},
|
|
153
123
|
textStyle: {
|
|
124
|
+
control: 'inline-radio',
|
|
154
125
|
if: { arg: 'advancedProps' },
|
|
155
126
|
options: textStyleProps,
|
|
156
|
-
control: 'inline-radio',
|
|
157
127
|
},
|
|
158
128
|
textWeight: {
|
|
159
|
-
options: textWeightProps,
|
|
160
129
|
control: 'inline-radio',
|
|
130
|
+
options: textWeightProps,
|
|
161
131
|
},
|
|
162
132
|
textWrap: {
|
|
133
|
+
control: 'inline-radio',
|
|
163
134
|
if: { arg: 'advancedProps' },
|
|
164
135
|
options: textWrapProps,
|
|
165
|
-
control: 'inline-radio',
|
|
166
136
|
},
|
|
167
137
|
type: {
|
|
168
138
|
if: { arg: 'advancedProps' },
|
|
169
139
|
},
|
|
170
140
|
underline: {
|
|
141
|
+
control: 'inline-radio',
|
|
171
142
|
if: { arg: 'advancedProps' },
|
|
172
143
|
options: underlineProps,
|
|
173
|
-
|
|
144
|
+
},
|
|
145
|
+
onClick: {
|
|
146
|
+
if: { arg: 'advancedProps' },
|
|
147
|
+
},
|
|
148
|
+
onMouseEnter: {
|
|
149
|
+
if: { arg: 'advancedProps' },
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
component: MenuItem,
|
|
153
|
+
parameters: {
|
|
154
|
+
controls: {
|
|
155
|
+
exclude: [
|
|
156
|
+
'fillDesktop',
|
|
157
|
+
'fillMobile',
|
|
158
|
+
'fillTablet',
|
|
159
|
+
'linkFillDesktop',
|
|
160
|
+
'linkFillMobile',
|
|
161
|
+
'linkFillTablet',
|
|
162
|
+
'shapeDesktop',
|
|
163
|
+
'shapeMobile',
|
|
164
|
+
'shapeTablet',
|
|
165
|
+
'sizeDesktop',
|
|
166
|
+
'sizeMobile',
|
|
167
|
+
'sizeTablet',
|
|
168
|
+
'typeDesktop',
|
|
169
|
+
'typeMobile',
|
|
170
|
+
'typeTablet',
|
|
171
|
+
],
|
|
174
172
|
},
|
|
175
173
|
},
|
|
174
|
+
title: 'Atoms / MenuItem',
|
|
176
175
|
}
|
|
177
176
|
|
|
178
177
|
export const Default = {
|
|
179
178
|
args: {
|
|
179
|
+
cursor: 'pointer',
|
|
180
|
+
isActive: true,
|
|
181
|
+
isHover: true,
|
|
180
182
|
appearance: 'any',
|
|
181
|
-
size: 'm',
|
|
182
|
-
label: 'Menu Item',
|
|
183
|
-
textSize: 'l',
|
|
184
|
-
textColor: 'surfaceTextPrimary',
|
|
185
|
-
textWeight: 400,
|
|
186
183
|
desc: 'desc',
|
|
187
|
-
descTextSize: 's',
|
|
188
184
|
descTextColor: 'surfaceTextPrimary',
|
|
185
|
+
descTextSize: 's',
|
|
189
186
|
descTextWeight: 400,
|
|
190
|
-
|
|
187
|
+
label: 'Menu Item',
|
|
188
|
+
size: 'm',
|
|
189
|
+
textColor: 'surfaceTextPrimary',
|
|
190
|
+
textSize: 'l',
|
|
191
|
+
textWeight: 400,
|
|
192
|
+
},
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export const SizeXXL = {
|
|
196
|
+
args: {
|
|
197
|
+
...Default.args,
|
|
198
|
+
size: 'xxl',
|
|
199
|
+
},
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export const SizeXL = {
|
|
203
|
+
args: {
|
|
204
|
+
...Default.args,
|
|
205
|
+
size: 'xl',
|
|
206
|
+
},
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export const SizeL = {
|
|
210
|
+
args: {
|
|
211
|
+
...Default.args,
|
|
212
|
+
size: 'l',
|
|
213
|
+
},
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export const SizeM = {
|
|
217
|
+
args: {
|
|
218
|
+
...Default.args,
|
|
219
|
+
size: 'm',
|
|
220
|
+
},
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export const SizeS = {
|
|
224
|
+
args: {
|
|
225
|
+
...Default.args,
|
|
226
|
+
size: 's',
|
|
227
|
+
},
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export const SizeXS = {
|
|
231
|
+
args: {
|
|
232
|
+
...Default.args,
|
|
233
|
+
size: 'xs',
|
|
234
|
+
},
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export const SizeXXS = {
|
|
238
|
+
args: {
|
|
239
|
+
...Default.args,
|
|
240
|
+
size: 'xxs',
|
|
241
|
+
},
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export const Active = {
|
|
245
|
+
args: {
|
|
246
|
+
...Default.args,
|
|
191
247
|
isActive: true,
|
|
248
|
+
size: 'm',
|
|
249
|
+
},
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export const SetSubitem = {
|
|
253
|
+
args: {
|
|
254
|
+
...Default.args,
|
|
255
|
+
set: 'subitem',
|
|
256
|
+
size: 'm',
|
|
192
257
|
},
|
|
193
258
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
import * as MessageStories from './Message.stories.js'
|
|
4
|
+
|
|
5
|
+
<Meta title="Molecules / Response / Message" />
|
|
6
|
+
|
|
7
|
+
# Response Set: Message
|
|
8
|
+
## Success
|
|
9
|
+
<Canvas sourceState="shown" of={MessageStories.Success} />
|
|
10
|
+
|
|
11
|
+
## Error
|
|
12
|
+
<Canvas sourceState="shown" of={MessageStories.Error} />
|
|
@@ -0,0 +1,34 @@
|
|
|
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: Message',
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const Default = {
|
|
13
|
+
args: {
|
|
14
|
+
message: 'Ничего не найдено',
|
|
15
|
+
messageTextSize: 'l',
|
|
16
|
+
set: 'message',
|
|
17
|
+
},
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const Success = {
|
|
21
|
+
args: {
|
|
22
|
+
...Default.args,
|
|
23
|
+
imageSrc: 'assets/img/search.svg',
|
|
24
|
+
state: 'success',
|
|
25
|
+
},
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const Error = {
|
|
29
|
+
args: {
|
|
30
|
+
...Default.args,
|
|
31
|
+
imageSrc: 'assets/img/search.svg',
|
|
32
|
+
state: 'error',
|
|
33
|
+
},
|
|
34
|
+
}
|
|
@@ -1,61 +1,62 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
buttonConfig.setAppearance(buttonAppearance)
|
|
1
|
+
import { Button, buttonConfig } from '../../Button'
|
|
2
|
+
import buttonAppearance from '../../Button/appearance.json'
|
|
3
|
+
import { Group } from '../../Group'
|
|
4
|
+
import { Title } from '../../Title'
|
|
5
|
+
import { Modal } from '../Modal'
|
|
7
6
|
|
|
8
7
|
import { icon24 } from 'src/icons'
|
|
9
8
|
|
|
9
|
+
buttonConfig.setAppearance(buttonAppearance)
|
|
10
|
+
|
|
10
11
|
export default {
|
|
11
|
-
title: 'Components / Modal / Confirm',
|
|
12
12
|
component: Modal,
|
|
13
|
+
title: 'Molecules / Modal / Confirm',
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
export const Default = {
|
|
16
17
|
args: {
|
|
18
|
+
children: (
|
|
19
|
+
<Group direction="vertical" gap="24">
|
|
20
|
+
<Title size="h3" textColor="surfaceTextPrimary">
|
|
21
|
+
Подтверждение действия
|
|
22
|
+
</Title>
|
|
23
|
+
<Group width="fill" direction="vertical" gap="16">
|
|
24
|
+
<Button
|
|
25
|
+
width="fill"
|
|
26
|
+
labelTextSize="l"
|
|
27
|
+
appearance="accent"
|
|
28
|
+
label="Подтвердить"
|
|
29
|
+
shape="rounded"
|
|
30
|
+
size="xxl"
|
|
31
|
+
/>
|
|
32
|
+
<Button
|
|
33
|
+
width="fill"
|
|
34
|
+
labelTextSize="l"
|
|
35
|
+
appearance="surfaceSecondary"
|
|
36
|
+
label="Отмена"
|
|
37
|
+
shape="rounded"
|
|
38
|
+
size="xxl"
|
|
39
|
+
/>
|
|
40
|
+
</Group>
|
|
41
|
+
</Group>
|
|
42
|
+
),
|
|
43
|
+
padding: 32,
|
|
44
|
+
elevation: 8,
|
|
17
45
|
isOpen: true,
|
|
18
|
-
isOverlay: true,
|
|
19
46
|
isOutsideClose: true,
|
|
47
|
+
isOverlay: true,
|
|
48
|
+
closeButton: (
|
|
49
|
+
<Button
|
|
50
|
+
position="absolute"
|
|
51
|
+
top="32"
|
|
52
|
+
right="32"
|
|
53
|
+
appearance="surfaceSecondary"
|
|
54
|
+
iconFill="surfaceItemPrimary"
|
|
55
|
+
iconSrc="assets/16/Remove.svg"
|
|
56
|
+
shape="circular"
|
|
57
|
+
size="m"
|
|
58
|
+
/>
|
|
59
|
+
),
|
|
20
60
|
shape: 'rounded',
|
|
21
|
-
elevation: 8,
|
|
22
|
-
padding: 32,
|
|
23
|
-
// closeButton: (
|
|
24
|
-
// <Button
|
|
25
|
-
// appearance="surfaceSecondary"
|
|
26
|
-
// icon={icon24.Close}
|
|
27
|
-
// iconFill="surfaceItemPrimary"
|
|
28
|
-
// shape="circular"
|
|
29
|
-
// size="m"
|
|
30
|
-
// position="absolute"
|
|
31
|
-
// right="32"
|
|
32
|
-
// top="32"
|
|
33
|
-
// />
|
|
34
|
-
// ),
|
|
35
|
-
// children: (
|
|
36
|
-
// <Group direction="vertical" gap="24">
|
|
37
|
-
// <Title size="h3" textColor="surfaceTextPrimary">
|
|
38
|
-
// Подтверждение действия
|
|
39
|
-
// </Title>
|
|
40
|
-
// <Group width="fill" direction="vertical" gap="16">
|
|
41
|
-
// <Button
|
|
42
|
-
// appearance="accent"
|
|
43
|
-
// shape="rounded"
|
|
44
|
-
// label="Подтвердить"
|
|
45
|
-
// labelTextSize="l"
|
|
46
|
-
// size="xxl"
|
|
47
|
-
// width="fill"
|
|
48
|
-
// />
|
|
49
|
-
// <Button
|
|
50
|
-
// appearance="surfaceSecondary"
|
|
51
|
-
// label="Отмена"
|
|
52
|
-
// labelTextSize="l"
|
|
53
|
-
// shape="rounded"
|
|
54
|
-
// size="xxl"
|
|
55
|
-
// width="fill"
|
|
56
|
-
// />
|
|
57
|
-
// </Group>
|
|
58
|
-
// </Group>
|
|
59
|
-
// ),
|
|
60
61
|
},
|
|
61
62
|
}
|
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
buttonConfig.setAppearance(buttonAppearance)
|
|
1
|
+
import { Button, buttonConfig } from '../../Button'
|
|
2
|
+
import buttonAppearance from '../../Button/appearance.json'
|
|
3
|
+
import { Modal } from '../Modal'
|
|
5
4
|
|
|
6
5
|
import { icon24 } from 'src/icons'
|
|
7
6
|
|
|
7
|
+
buttonConfig.setAppearance(buttonAppearance)
|
|
8
|
+
|
|
8
9
|
export default {
|
|
9
|
-
title: 'Components / Modal / Default',
|
|
10
10
|
component: Modal,
|
|
11
|
+
title: 'Molecules / Modal / Default',
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
export const Default = {
|
|
14
15
|
args: {
|
|
16
|
+
padding: 32,
|
|
17
|
+
elevation: 8,
|
|
15
18
|
isOpen: true,
|
|
16
|
-
isOverlay: true,
|
|
17
19
|
isOutsideClose: true,
|
|
20
|
+
isOverlay: true,
|
|
21
|
+
closeButton: (
|
|
22
|
+
<Button
|
|
23
|
+
position="absolute"
|
|
24
|
+
top="32"
|
|
25
|
+
right="32"
|
|
26
|
+
appearance="surfaceSecondary"
|
|
27
|
+
iconFill="surfaceItemPrimary"
|
|
28
|
+
iconSrc="assets/16/Remove.svg"
|
|
29
|
+
shape="circular"
|
|
30
|
+
size="m"
|
|
31
|
+
/>
|
|
32
|
+
),
|
|
18
33
|
shape: 'rounded',
|
|
19
|
-
elevation: 8,
|
|
20
|
-
padding: 32,
|
|
21
|
-
// closeButton: (
|
|
22
|
-
// <Button
|
|
23
|
-
// appearance="surfaceSecondary"
|
|
24
|
-
// icon={icon24.Close}
|
|
25
|
-
// iconFill="surfaceItemPrimary"
|
|
26
|
-
// shape="circular"
|
|
27
|
-
// size="m"
|
|
28
|
-
// position="absolute"
|
|
29
|
-
// right="32"
|
|
30
|
-
// top="32"
|
|
31
|
-
// />
|
|
32
|
-
// ),
|
|
33
34
|
},
|
|
34
35
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
import * as NotificationStories from './Notification.stories.js'
|
|
4
|
+
|
|
5
|
+
<Meta of={NotificationStories} />
|
|
6
|
+
|
|
7
|
+
# Notification
|
|
8
|
+
|
|
9
|
+
## Top
|
|
10
|
+
|
|
11
|
+
<Canvas sourceState="shown" of={NotificationStories.Top} />
|
|
12
|
+
|
|
13
|
+
## Float
|
|
14
|
+
|
|
15
|
+
<Canvas sourceState="shown" of={NotificationStories.Float} />
|
|
16
|
+
|
|
17
|
+
## Form
|
|
18
|
+
|
|
19
|
+
<Canvas sourceState="shown" of={NotificationStories.Form} />
|
|
20
|
+
|
|
21
|
+
## Toast
|
|
22
|
+
|
|
23
|
+
<Canvas sourceState="shown" of={NotificationStories.Toast} />
|