@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,233 +1,233 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Button } from '@itcase/ui/components/Button'
|
|
3
|
-
import { Loader } from '@itcase/ui/components/Loader'
|
|
4
|
-
|
|
1
|
+
import { defaultSelectProps } from '../../../config/forms'
|
|
5
2
|
import {
|
|
6
|
-
borderColorProps,
|
|
7
3
|
borderColorHoverProps,
|
|
8
|
-
|
|
4
|
+
borderColorProps,
|
|
9
5
|
fillHoverProps,
|
|
6
|
+
fillProps,
|
|
7
|
+
sizeProps,
|
|
10
8
|
textColorProps,
|
|
11
9
|
textSizeProps,
|
|
12
|
-
|
|
13
|
-
} from '
|
|
10
|
+
} from '../../../constants'
|
|
11
|
+
import { Button } from '../../Button'
|
|
12
|
+
import { Loader } from '../../Loader'
|
|
13
|
+
import { Select } from '../index'
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
// import { Select } from '../Select'
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
// import { icon16 } from 'src/icons'
|
|
18
18
|
|
|
19
19
|
export default {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
|
|
20
|
+
args: {
|
|
21
|
+
...defaultSelectProps,
|
|
22
|
+
isClearable: true,
|
|
23
|
+
isMulti: false,
|
|
24
|
+
isSearchable: false,
|
|
25
|
+
dropdownIconFill: 'surfaceItemPrimary',
|
|
26
|
+
hideSelectedOptions: false,
|
|
27
|
+
menuItemSize: 'l',
|
|
28
|
+
noOptionsText: (
|
|
29
|
+
<Loader
|
|
30
|
+
width="fill"
|
|
31
|
+
height="fill"
|
|
32
|
+
fill="surfacePrimary"
|
|
33
|
+
position="absolute"
|
|
34
|
+
left="0px"
|
|
35
|
+
right="0px"
|
|
36
|
+
zIndex="1"
|
|
37
|
+
itemFill="surfaceItemAccent"
|
|
38
|
+
set="simple"
|
|
39
|
+
/>
|
|
40
|
+
),
|
|
41
|
+
optionFill: 'surfacePrimary',
|
|
42
|
+
optionFillHover: 'surfacePrimaryHover',
|
|
43
|
+
options: [
|
|
44
|
+
{ label: 'Завершены', value: 'completed' },
|
|
45
|
+
{ label: 'Идут торги', value: 'active' },
|
|
46
|
+
{ label: 'Остановлены', value: 'stopped' },
|
|
47
|
+
{ label: 'Отменены', value: 'canceled' },
|
|
48
|
+
{ label: 'Планируемые', value: 'planned' },
|
|
49
|
+
{ label: 'Продолжены', value: 'continued' },
|
|
50
|
+
],
|
|
51
|
+
optionTextColor: 'surfaceTextPrimary',
|
|
52
|
+
optionTextSize: 'l',
|
|
53
|
+
showDivider: false,
|
|
48
54
|
},
|
|
49
55
|
argTypes: {
|
|
50
|
-
advancedProps: { control: 'boolean' },
|
|
51
|
-
className: {
|
|
52
|
-
if: { arg: 'advancedProps' },
|
|
53
|
-
},
|
|
54
|
-
inputBefore: {
|
|
55
|
-
if: { arg: 'advancedProps' },
|
|
56
|
-
},
|
|
57
|
-
inputAfter: {
|
|
58
|
-
if: { arg: 'advancedProps' },
|
|
59
|
-
},
|
|
60
|
-
closeMenuOnSelect: {
|
|
61
|
-
control: 'boolean',
|
|
62
|
-
},
|
|
63
56
|
elevation: {
|
|
64
|
-
options: [1, 2, 4, 6, 8, 12, 16, 24],
|
|
65
57
|
control: 'inline-radio',
|
|
58
|
+
options: [1, 2, 4, 6, 8, 12, 16, 24],
|
|
66
59
|
},
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
control: 'select',
|
|
60
|
+
isClearable: {
|
|
61
|
+
control: 'boolean',
|
|
70
62
|
},
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
control: 'select',
|
|
63
|
+
isMulti: {
|
|
64
|
+
control: 'boolean',
|
|
74
65
|
},
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
66
|
+
isSearchable: {
|
|
67
|
+
control: 'boolean',
|
|
68
|
+
},
|
|
69
|
+
advancedProps: { control: 'boolean' },
|
|
70
|
+
className: {
|
|
71
|
+
if: { arg: 'advancedProps' },
|
|
78
72
|
},
|
|
79
73
|
clearIcon: {
|
|
80
74
|
if: { arg: 'isClearable', eq: true },
|
|
81
75
|
},
|
|
82
76
|
clearIconFill: {
|
|
77
|
+
control: 'select',
|
|
83
78
|
if: { arg: 'isClearable', eq: true },
|
|
84
79
|
options: fillProps,
|
|
85
|
-
control: 'select',
|
|
86
80
|
},
|
|
87
|
-
|
|
81
|
+
closeMenuOnSelect: {
|
|
88
82
|
control: 'boolean',
|
|
89
83
|
},
|
|
90
|
-
|
|
91
|
-
if: { arg: '
|
|
92
|
-
|
|
84
|
+
dividerDirection: {
|
|
85
|
+
if: { arg: 'advancedProps' },
|
|
86
|
+
},
|
|
87
|
+
dividerFill: {
|
|
93
88
|
control: 'select',
|
|
89
|
+
options: fillProps,
|
|
94
90
|
},
|
|
95
|
-
|
|
96
|
-
if: { arg: 'hideValueContainer', neq: true },
|
|
97
|
-
options: textSizeProps,
|
|
91
|
+
dividerSize: {
|
|
98
92
|
control: 'inline-radio',
|
|
93
|
+
options: sizeProps,
|
|
99
94
|
},
|
|
100
|
-
|
|
101
|
-
if: { arg: 'hideValueContainer', neq: true },
|
|
102
|
-
options: textColorProps,
|
|
95
|
+
dropdownIconFill: {
|
|
103
96
|
control: 'select',
|
|
97
|
+
options: fillProps,
|
|
98
|
+
},
|
|
99
|
+
hideSelectedOptions: {
|
|
100
|
+
control: 'boolean',
|
|
101
|
+
},
|
|
102
|
+
hideValueContainer: {
|
|
103
|
+
control: 'boolean',
|
|
104
|
+
},
|
|
105
|
+
inputAfter: {
|
|
106
|
+
if: { arg: 'advancedProps' },
|
|
107
|
+
},
|
|
108
|
+
inputBefore: {
|
|
109
|
+
if: { arg: 'advancedProps' },
|
|
104
110
|
},
|
|
105
111
|
inputBorderColor: {
|
|
112
|
+
control: 'select',
|
|
106
113
|
if: { arg: 'hideValueContainer', neq: true },
|
|
107
114
|
options: borderColorProps,
|
|
108
|
-
control: 'select',
|
|
109
115
|
},
|
|
110
116
|
inputBorderColorHover: {
|
|
117
|
+
control: 'select',
|
|
111
118
|
if: { arg: 'hideValueContainer', neq: true },
|
|
112
119
|
options: borderColorHoverProps,
|
|
113
|
-
control: 'select',
|
|
114
120
|
},
|
|
115
|
-
|
|
116
|
-
options: fillProps,
|
|
121
|
+
inputFill: {
|
|
117
122
|
control: 'select',
|
|
118
|
-
},
|
|
119
|
-
placeholder: {
|
|
120
123
|
if: { arg: 'hideValueContainer', neq: true },
|
|
124
|
+
options: fillProps,
|
|
121
125
|
},
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
options: textSizeProps,
|
|
125
|
-
control: 'inline-radio',
|
|
126
|
-
},
|
|
127
|
-
placeholderTextColor: {
|
|
126
|
+
inputTextColor: {
|
|
127
|
+
control: 'select',
|
|
128
128
|
if: { arg: 'hideValueContainer', neq: true },
|
|
129
129
|
options: textColorProps,
|
|
130
|
-
control: 'select',
|
|
131
130
|
},
|
|
132
|
-
|
|
133
|
-
options: textSizeProps,
|
|
131
|
+
inputTextSize: {
|
|
134
132
|
control: 'inline-radio',
|
|
133
|
+
if: { arg: 'hideValueContainer', neq: true },
|
|
134
|
+
options: textSizeProps,
|
|
135
135
|
},
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
menuItemSize: {
|
|
137
|
+
control: 'inline-radio',
|
|
138
|
+
options: ['xs', 's', 'm', 'l', 'xl', 'xxl'],
|
|
139
139
|
},
|
|
140
140
|
multipleItemFill: {
|
|
141
|
+
control: 'select',
|
|
141
142
|
if: { arg: 'hideValueContainer', neq: true },
|
|
142
143
|
options: fillProps,
|
|
143
|
-
control: 'select',
|
|
144
144
|
},
|
|
145
145
|
multipleItemFillHover: {
|
|
146
|
+
control: 'select',
|
|
146
147
|
if: { arg: 'hideValueContainer', neq: true },
|
|
147
148
|
options: fillHoverProps,
|
|
148
|
-
control: 'select',
|
|
149
149
|
},
|
|
150
|
-
|
|
150
|
+
multipleItemIcon: {
|
|
151
151
|
if: { arg: 'hideValueContainer', neq: true },
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
},
|
|
153
|
+
multipleItemIconFill: {
|
|
154
|
+
control: 'select',
|
|
155
|
+
if: { arg: 'hideValueContainer', neq: true },
|
|
156
|
+
options: fillProps,
|
|
154
157
|
},
|
|
155
158
|
multipleItemTextColor: {
|
|
159
|
+
control: 'select',
|
|
156
160
|
if: { arg: 'hideValueContainer', neq: true },
|
|
157
161
|
options: textColorProps,
|
|
158
|
-
control: 'select',
|
|
159
162
|
},
|
|
160
|
-
|
|
163
|
+
multipleItemTextSize: {
|
|
164
|
+
control: 'inline-radio',
|
|
161
165
|
if: { arg: 'hideValueContainer', neq: true },
|
|
166
|
+
options: textSizeProps,
|
|
162
167
|
},
|
|
163
|
-
|
|
164
|
-
if: { arg: 'hideValueContainer', neq: true },
|
|
165
|
-
options: fillProps,
|
|
168
|
+
noOptionsTextColor: {
|
|
166
169
|
control: 'select',
|
|
170
|
+
options: textColorProps,
|
|
167
171
|
},
|
|
168
|
-
|
|
169
|
-
control: '
|
|
170
|
-
|
|
171
|
-
isSearchable: {
|
|
172
|
-
control: 'boolean',
|
|
172
|
+
noOptionsTextSize: {
|
|
173
|
+
control: 'inline-radio',
|
|
174
|
+
options: textSizeProps,
|
|
173
175
|
},
|
|
174
|
-
|
|
175
|
-
control: '
|
|
176
|
+
optionFill: {
|
|
177
|
+
control: 'select',
|
|
178
|
+
options: fillProps,
|
|
176
179
|
},
|
|
177
|
-
|
|
178
|
-
control: '
|
|
180
|
+
optionTextColor: {
|
|
181
|
+
control: 'select',
|
|
182
|
+
options: textColorProps,
|
|
179
183
|
},
|
|
180
|
-
|
|
181
|
-
options: ['xs', 's', 'm', 'l', 'xl', 'xxl'],
|
|
184
|
+
optionTextSize: {
|
|
182
185
|
control: 'inline-radio',
|
|
186
|
+
options: textSizeProps,
|
|
183
187
|
},
|
|
184
|
-
|
|
185
|
-
if: { arg: '
|
|
188
|
+
placeholder: {
|
|
189
|
+
if: { arg: 'hideValueContainer', neq: true },
|
|
186
190
|
},
|
|
187
|
-
|
|
188
|
-
options: fillProps,
|
|
191
|
+
placeholderTextColor: {
|
|
189
192
|
control: 'select',
|
|
193
|
+
if: { arg: 'hideValueContainer', neq: true },
|
|
194
|
+
options: textColorProps,
|
|
190
195
|
},
|
|
191
|
-
|
|
192
|
-
options: sizeProps,
|
|
196
|
+
placeholderTextSize: {
|
|
193
197
|
control: 'inline-radio',
|
|
198
|
+
if: { arg: 'hideValueContainer', neq: true },
|
|
199
|
+
options: textSizeProps,
|
|
194
200
|
},
|
|
195
201
|
},
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
dropdownIconFill: 'surfaceItemPrimary',
|
|
224
|
-
menuItemSize: 'l',
|
|
225
|
-
hideSelectedOptions: false,
|
|
226
|
-
isClearable: true,
|
|
227
|
-
isMulti: false,
|
|
228
|
-
isSearchable: false,
|
|
229
|
-
showDivider: false,
|
|
202
|
+
component: Select,
|
|
203
|
+
parameters: {
|
|
204
|
+
controls: {
|
|
205
|
+
exclude: [
|
|
206
|
+
'optionShape',
|
|
207
|
+
'inputCaretColor',
|
|
208
|
+
'inputShape',
|
|
209
|
+
'animationOpen',
|
|
210
|
+
'animationClose',
|
|
211
|
+
'optionFillHover',
|
|
212
|
+
'headingFill',
|
|
213
|
+
'headingTextColor',
|
|
214
|
+
'headingTextSize',
|
|
215
|
+
'headingTextWeight',
|
|
216
|
+
'filterOption',
|
|
217
|
+
'initialValue',
|
|
218
|
+
'set',
|
|
219
|
+
'onChange',
|
|
220
|
+
'openMenuOnClick',
|
|
221
|
+
],
|
|
222
|
+
},
|
|
223
|
+
docs: {
|
|
224
|
+
story: {
|
|
225
|
+
iframeHeight: 800,
|
|
226
|
+
inline: false,
|
|
227
|
+
},
|
|
228
|
+
},
|
|
230
229
|
},
|
|
230
|
+
title: 'Atoms / Select',
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
export const Default = {
|
|
@@ -253,18 +253,18 @@ export const NoInput = {
|
|
|
253
253
|
...Default.args,
|
|
254
254
|
isClearable: false,
|
|
255
255
|
isMulti: true,
|
|
256
|
+
// dropdownIcon: icon16.Filter,
|
|
256
257
|
hideValueContainer: true,
|
|
257
|
-
dropdownIcon: icon16.Filter,
|
|
258
258
|
menuAfter: (
|
|
259
259
|
<Button
|
|
260
|
+
width="fill"
|
|
261
|
+
labelTextSize="m"
|
|
260
262
|
appearance="surfaceSecondary"
|
|
261
263
|
label="Очистить"
|
|
262
|
-
labelTextSize="m"
|
|
263
264
|
size="l"
|
|
264
|
-
width="fill"
|
|
265
265
|
/>
|
|
266
266
|
),
|
|
267
|
-
size: 'none',
|
|
268
267
|
showDivider: true,
|
|
268
|
+
size: 'none',
|
|
269
269
|
},
|
|
270
270
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
import * as SizeStories from './Size.stories.js'
|
|
4
|
+
|
|
5
|
+
<Meta title="Atoms / Tab / Size" />
|
|
6
|
+
|
|
7
|
+
# Size
|
|
8
|
+
|
|
9
|
+
## XXS
|
|
10
|
+
|
|
11
|
+
<Canvas sourceState="shown" of={SizeStories.SizeXXS} />
|
|
12
|
+
|
|
13
|
+
## XS
|
|
14
|
+
|
|
15
|
+
<Canvas sourceState="shown" of={SizeStories.SizeXS} />
|
|
16
|
+
|
|
17
|
+
## S
|
|
18
|
+
|
|
19
|
+
<Canvas sourceState="shown" of={SizeStories.SizeS} />
|
|
20
|
+
|
|
21
|
+
## M
|
|
22
|
+
|
|
23
|
+
<Canvas sourceState="shown" of={SizeStories.SizeM} />
|
|
24
|
+
|
|
25
|
+
## L
|
|
26
|
+
|
|
27
|
+
<Canvas sourceState="shown" of={SizeStories.SizeL} />
|
|
28
|
+
|
|
29
|
+
## XL
|
|
30
|
+
|
|
31
|
+
<Canvas sourceState="shown" of={SizeStories.SizeXL} />
|
|
32
|
+
|
|
33
|
+
## XXL
|
|
34
|
+
|
|
35
|
+
<Canvas sourceState="shown" of={SizeStories.SizeXXL} />
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { badgeConfig } from '../../Badge'
|
|
2
|
+
import badgeAppearance from '../../Badge/appearance.json'
|
|
3
|
+
import tabAppearance from '../appearance.json'
|
|
4
|
+
import { Tab, tabConfig } from '../Tab'
|
|
5
|
+
import { argTypes } from './args'
|
|
6
|
+
|
|
7
|
+
badgeConfig.setAppearance(badgeAppearance)
|
|
8
|
+
|
|
9
|
+
tabConfig.setAppearance(tabAppearance)
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
argTypes: {
|
|
13
|
+
...argTypes,
|
|
14
|
+
},
|
|
15
|
+
component: Tab,
|
|
16
|
+
parameters: {
|
|
17
|
+
controls: {
|
|
18
|
+
exclude: [
|
|
19
|
+
'fillDesktop',
|
|
20
|
+
'fillMobile',
|
|
21
|
+
'fillTablet',
|
|
22
|
+
'linkFillDesktop',
|
|
23
|
+
'linkFillMobile',
|
|
24
|
+
'linkFillTablet',
|
|
25
|
+
'shapeDesktop',
|
|
26
|
+
'shapeMobile',
|
|
27
|
+
'shapeTablet',
|
|
28
|
+
'sizeDesktop',
|
|
29
|
+
'sizeMobile',
|
|
30
|
+
'sizeTablet',
|
|
31
|
+
'typeDesktop',
|
|
32
|
+
'typeMobile',
|
|
33
|
+
'typeTablet',
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
title: 'Atoms / Tab / Size',
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const Default = {
|
|
41
|
+
args: {
|
|
42
|
+
appearance: 'primary',
|
|
43
|
+
badge: true,
|
|
44
|
+
badgeAppearance: 'accent',
|
|
45
|
+
badgeSize: 'xs',
|
|
46
|
+
badgeTextSize: 'xs',
|
|
47
|
+
badgeValue: '3',
|
|
48
|
+
label: 'Label',
|
|
49
|
+
labelTextSize: 'm',
|
|
50
|
+
size: 'm',
|
|
51
|
+
},
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export const SizeXXS = {
|
|
55
|
+
args: {
|
|
56
|
+
...Default.args,
|
|
57
|
+
size: 'xxs',
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const SizeXS = {
|
|
62
|
+
args: {
|
|
63
|
+
...Default.args,
|
|
64
|
+
size: 'xs',
|
|
65
|
+
},
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export const SizeS = {
|
|
69
|
+
args: {
|
|
70
|
+
...Default.args,
|
|
71
|
+
size: 's',
|
|
72
|
+
},
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export const SizeM = {
|
|
76
|
+
args: {
|
|
77
|
+
...Default.args,
|
|
78
|
+
size: 'm',
|
|
79
|
+
},
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export const SizeL = {
|
|
83
|
+
args: {
|
|
84
|
+
...Default.args,
|
|
85
|
+
size: 'l',
|
|
86
|
+
},
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export const SizeXL = {
|
|
90
|
+
args: {
|
|
91
|
+
...Default.args,
|
|
92
|
+
size: 'xl',
|
|
93
|
+
},
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export const SizeXXL = {
|
|
97
|
+
args: {
|
|
98
|
+
...Default.args,
|
|
99
|
+
size: 'xxl',
|
|
100
|
+
},
|
|
101
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
import * as StateStories from './State.stories.js'
|
|
4
|
+
|
|
5
|
+
<Meta title="Atoms / Tab / State" />
|
|
6
|
+
|
|
7
|
+
# State
|
|
8
|
+
|
|
9
|
+
## Normal
|
|
10
|
+
|
|
11
|
+
<Canvas sourceState="shown" of={StateStories.Normal} />
|
|
12
|
+
|
|
13
|
+
## Active
|
|
14
|
+
|
|
15
|
+
<Canvas sourceState="shown" of={StateStories.Active} />
|
|
16
|
+
|
|
17
|
+
## Disabled
|
|
18
|
+
|
|
19
|
+
<Canvas sourceState="shown" of={StateStories.Disabled} />
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
|
|
2
|
+
import { badgeConfig } from '../../Badge'
|
|
3
|
+
import badgeAppearance from '../../Badge/appearance.json'
|
|
4
|
+
import tabAppearance from '../appearance.json'
|
|
5
|
+
import { Tab, tabConfig } from '../Tab'
|
|
6
|
+
import { argTypes } from './args'
|
|
7
|
+
|
|
8
|
+
badgeConfig.setAppearance(badgeAppearance)
|
|
9
|
+
|
|
10
|
+
tabConfig.setAppearance(tabAppearance)
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
args: {
|
|
14
|
+
badge: true,
|
|
15
|
+
badgeAppearance: 'accent',
|
|
16
|
+
badgeSize: 'xs',
|
|
17
|
+
badgeTextSize: 'xs',
|
|
18
|
+
badgeValue: '3',
|
|
19
|
+
label: 'Label',
|
|
20
|
+
labelTextSize: 'm',
|
|
21
|
+
size: 'normal',
|
|
22
|
+
},
|
|
23
|
+
argTypes: {
|
|
24
|
+
...argTypes,
|
|
25
|
+
},
|
|
26
|
+
component: Tab,
|
|
27
|
+
parameters: {
|
|
28
|
+
controls: {
|
|
29
|
+
exclude: [
|
|
30
|
+
'fillDesktop',
|
|
31
|
+
'fillMobile',
|
|
32
|
+
'fillTablet',
|
|
33
|
+
'linkFillDesktop',
|
|
34
|
+
'linkFillMobile',
|
|
35
|
+
'linkFillTablet',
|
|
36
|
+
'shapeDesktop',
|
|
37
|
+
'shapeMobile',
|
|
38
|
+
'shapeTablet',
|
|
39
|
+
'sizeDesktop',
|
|
40
|
+
'sizeMobile',
|
|
41
|
+
'sizeTablet',
|
|
42
|
+
'typeDesktop',
|
|
43
|
+
'typeMobile',
|
|
44
|
+
'typeTablet',
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
title: 'Atoms / Tab / State',
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export const Normal = {
|
|
52
|
+
args: {
|
|
53
|
+
appearance: 'any',
|
|
54
|
+
},
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export const Active = {
|
|
58
|
+
args: {
|
|
59
|
+
isActive: true,
|
|
60
|
+
appearance: 'surfacePrimary',
|
|
61
|
+
},
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export const Disabled = {
|
|
65
|
+
args: {
|
|
66
|
+
isDisabled: true,
|
|
67
|
+
appearance: 'surfacePrimary',
|
|
68
|
+
badgeAppearance: 'disabled',
|
|
69
|
+
},
|
|
70
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
import * as SwitchStories from './Switch.stories.js'
|
|
4
|
+
|
|
5
|
+
<Meta of={SwitchStories} />
|
|
6
|
+
|
|
7
|
+
# Switch
|
|
8
|
+
|
|
9
|
+
## Active
|
|
10
|
+
|
|
11
|
+
<Canvas sourceState="shown" of={SwitchStories.Active} />
|
|
12
|
+
|
|
13
|
+
## ActiveChecked
|
|
14
|
+
|
|
15
|
+
<Canvas sourceState="shown" of={SwitchStories.ActiveChecked} />
|
|
16
|
+
|
|
17
|
+
## Disabled
|
|
18
|
+
|
|
19
|
+
<Canvas sourceState="shown" of={SwitchStories.Disabled} />
|
|
20
|
+
|
|
21
|
+
## DisabledChecked
|
|
22
|
+
|
|
23
|
+
<Canvas sourceState="shown" of={SwitchStories.DisabledChecked} />
|