@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.
Files changed (182) hide show
  1. package/dist/cjs/components/Accordion.js +3 -2
  2. package/dist/cjs/components/Choice.js +1 -1
  3. package/dist/cjs/components/InputPassword.js +6 -6
  4. package/dist/cjs/components/Radio.js +85 -8
  5. package/dist/cjs/components/Switch.js +12 -8
  6. package/dist/cjs/components/Tile.js +3 -3
  7. package/dist/cjs/constants/componentProps/textColor.js +1 -1
  8. package/dist/cjs/constants/componentProps/textColorHover.js +1 -1
  9. package/dist/components/Accordion.js +3 -2
  10. package/dist/components/Choice.js +1 -1
  11. package/dist/components/InputPassword.js +6 -6
  12. package/dist/components/Radio.js +86 -5
  13. package/dist/components/Switch.js +12 -4
  14. package/dist/components/Tile.js +3 -3
  15. package/dist/constants/componentProps/textColor.js +1 -1
  16. package/dist/constants/componentProps/textColorHover.js +1 -1
  17. package/dist/css/components/Accordion/Accordion.css +1 -0
  18. package/dist/css/components/DatePicker/DatePicker.css +12 -12
  19. package/dist/css/components/Icon/Icon.css +4 -2
  20. package/dist/css/mixins/mixin_elevation.css +0 -2
  21. package/dist/css/mixins/mixin_typography.css +104 -84
  22. package/dist/css/mixins/mixin_utils.css +1 -1
  23. package/dist/css/styles/border-color/border-color.css +4 -2
  24. package/dist/css/styles/text-gradient/text-gradient.css +9 -4
  25. package/dist/css/tokens/colors.css +105 -0
  26. package/dist/css/tokens/elevation.css +10 -0
  27. package/dist/css/tokens/settings.css +31 -0
  28. package/dist/css/tokens/typography.css +127 -0
  29. package/dist/stories/Accordion.mdx +11 -0
  30. package/dist/stories/Accordion.stories.js +49 -32
  31. package/dist/stories/AccordionItem.mdx +15 -0
  32. package/dist/stories/AccordionItem.stories.js +69 -69
  33. package/dist/stories/AlignContent.mdx +85 -0
  34. package/dist/stories/AlignItems.mdx +74 -0
  35. package/dist/stories/AlignItems.stories.js +88 -0
  36. package/dist/stories/AlignSelf.mdx +85 -0
  37. package/dist/stories/AlignSelf.stories.js +101 -0
  38. package/dist/stories/Appearance.mdx +24 -9
  39. package/dist/stories/Appearance.stories.js +77 -23
  40. package/dist/stories/Avatar.mdx +23 -0
  41. package/dist/stories/Avatar.stories.js +69 -64
  42. package/dist/stories/Badge.mdx +20 -0
  43. package/dist/stories/Badge.stories.js +43 -44
  44. package/dist/stories/Button.mdx +48 -0
  45. package/dist/stories/Button.stories.js +26 -186
  46. package/dist/stories/Cell.mdx +23 -0
  47. package/dist/stories/Cell.stories.js +119 -119
  48. package/dist/stories/Checkbox.mdx +24 -0
  49. package/dist/stories/Checkbox.stories.js +42 -34
  50. package/dist/stories/Chips.mdx +31 -0
  51. package/dist/stories/Chips.stories.js +22 -67
  52. package/dist/stories/Choice.mdx +11 -0
  53. package/dist/stories/Choice.stories.js +59 -61
  54. package/dist/stories/Code.mdx +11 -0
  55. package/dist/stories/Code.stories.js +37 -40
  56. package/dist/stories/Columns.mdx +51 -0
  57. package/dist/stories/Columns.stories.js +80 -0
  58. package/dist/stories/DatePicker.mdx +31 -0
  59. package/dist/stories/DatePicker.stories.js +58 -59
  60. package/dist/stories/Dev.mdx +9 -0
  61. package/dist/stories/DevMode.mdx +8 -0
  62. package/dist/stories/Direction.mdx +84 -0
  63. package/dist/stories/Direction.stories.js +93 -0
  64. package/dist/stories/Divider.mdx +35 -0
  65. package/dist/stories/Divider.stories.js +28 -29
  66. package/dist/stories/Dot.mdx +19 -0
  67. package/dist/stories/Dot.stories.js +38 -39
  68. package/dist/stories/Drawer.mdx +11 -0
  69. package/dist/stories/Drawer.stories.js +75 -0
  70. package/dist/stories/Dropdown.mdx +12 -0
  71. package/dist/stories/Dropdown.stories.js +30 -29
  72. package/dist/stories/DropdownItem.mdx +19 -0
  73. package/dist/stories/DropdownItem.stories.js +76 -78
  74. package/dist/stories/Flex.stories.js +47 -0
  75. package/dist/stories/FlexAlignContent.stories.js +102 -0
  76. package/dist/stories/FlexAlignItems.stories.js +91 -0
  77. package/dist/stories/FlexAlignSelf.stories.js +97 -0
  78. package/dist/stories/FlexDirection.stories.js +112 -0
  79. package/dist/stories/FlexGrow.stories.js +69 -0
  80. package/dist/stories/FlexJustifyContent.stories.js +98 -0
  81. package/dist/stories/FlexOrder.stories.js +76 -0
  82. package/dist/stories/FlexWrap.stories.js +89 -0
  83. package/dist/stories/Grid.stories.js +202 -0
  84. package/dist/stories/Group.mdx +9 -0
  85. package/dist/stories/{Tab.group.stories.js → Group.stories.js} +60 -56
  86. package/dist/stories/Grow.mdx +40 -0
  87. package/dist/stories/Icon.mdx +15 -0
  88. package/dist/stories/Icon.stories.js +84 -82
  89. package/dist/stories/Image.mdx +15 -0
  90. package/dist/stories/Image.stories.js +134 -0
  91. package/dist/stories/Input.mdx +31 -0
  92. package/dist/stories/Input.stories.js +26 -26
  93. package/dist/stories/InputPassword.mdx +15 -0
  94. package/dist/stories/InputPassword.stories.js +32 -34
  95. package/dist/stories/JustifyContent.mdx +89 -0
  96. package/dist/stories/JustifyContent.stories.js +96 -0
  97. package/dist/stories/Label.mdx +31 -0
  98. package/dist/stories/Label.stories.js +63 -53
  99. package/dist/stories/Loader.mdx +31 -0
  100. package/dist/stories/Loader.stories.js +26 -28
  101. package/dist/stories/Logo.mdx +19 -0
  102. package/dist/stories/Logo.stories.js +28 -28
  103. package/dist/stories/MenuItem.mdx +15 -0
  104. package/dist/stories/MenuItem.stories.js +156 -91
  105. package/dist/stories/Message.mdx +12 -0
  106. package/dist/stories/Message.stories.js +34 -0
  107. package/dist/stories/ModalConfirm.stories.js +48 -47
  108. package/dist/stories/ModalDefault.stories.js +21 -20
  109. package/dist/stories/Notification.mdx +23 -0
  110. package/dist/stories/Notification.stories.js +24 -47
  111. package/dist/stories/Order.mdx +52 -0
  112. package/dist/stories/Overview.mdx +1 -2
  113. package/dist/stories/Pagination.mdx +11 -0
  114. package/dist/stories/Pagination.stories.js +24 -27
  115. package/dist/stories/Playground.mdx +1 -2
  116. package/dist/stories/Radio.mdx +29 -0
  117. package/dist/stories/Radio.stories.js +32 -33
  118. package/dist/stories/Response.mdx +18 -0
  119. package/dist/stories/Response.stories.js +66 -0
  120. package/dist/stories/SearchInput.mdx +19 -0
  121. package/dist/stories/{Search-input.stories.js → SearchInput.stories.js} +79 -62
  122. package/dist/stories/Segmented.mdx +11 -0
  123. package/dist/stories/Segmented.stories.js +49 -50
  124. package/dist/stories/Select.stories.js +155 -155
  125. package/dist/stories/Size.mdx +35 -0
  126. package/dist/stories/Size.stories.js +101 -0
  127. package/dist/stories/Skeleton.mdx +9 -0
  128. package/dist/stories/State.mdx +19 -0
  129. package/dist/stories/State.stories.js +70 -0
  130. package/dist/stories/Switch.mdx +23 -0
  131. package/dist/stories/Switch.stories.js +23 -23
  132. package/dist/stories/Text.mdx +35 -0
  133. package/dist/stories/Text.stories.js +172 -0
  134. package/dist/stories/Textarea.mdx +15 -0
  135. package/dist/stories/Textarea.stories.js +27 -27
  136. package/dist/stories/Tile.mdx +19 -0
  137. package/dist/stories/Tile.stories.js +111 -96
  138. package/dist/stories/Title.mdx +31 -0
  139. package/dist/stories/Title.stories.js +168 -0
  140. package/dist/stories/Tooltip.mdx +19 -0
  141. package/dist/stories/Tooltip.stories.js +164 -0
  142. package/dist/stories/WithTooltip.mdx +9 -0
  143. package/dist/stories/Wrap.mdx +52 -0
  144. package/dist/stories/Wrap.stories.js +74 -0
  145. package/dist/types/components/Accordion/Accordion.interface.d.ts +4 -0
  146. package/dist/types/components/Choice/Choice.interface.d.ts +0 -2
  147. package/dist/types/components/InputPassword/InputPassword.interface.d.ts +10 -8
  148. package/dist/types/components/Tile/Tile.d.ts +1 -1
  149. package/dist/types/components/Tile/Tile.interface.d.ts +3 -1
  150. package/dist/types/config/forms/datepicker.d.ts +18 -0
  151. package/dist/types/config/forms/index.d.ts +4 -0
  152. package/dist/types/config/forms/input.d.ts +14 -0
  153. package/dist/types/config/forms/select.d.ts +50 -0
  154. package/package.json +36 -42
  155. package/dist/Radio-BQo97TZL.js +0 -89
  156. package/dist/Radio-oMf0vN7T.js +0 -86
  157. package/dist/Switch-B5yVEqxz.js +0 -14
  158. package/dist/Switch-DEXsrPCo.js +0 -12
  159. package/dist/cjs/components/FormField.js +0 -122
  160. package/dist/components/FormField.js +0 -116
  161. package/dist/css/mixins/mixin.css +0 -78
  162. package/dist/stories/FormFieldCheckbox.stories.js +0 -77
  163. package/dist/stories/FormFieldChoice.stories.js +0 -75
  164. package/dist/stories/FormFieldDatepicker.stories.js +0 -51
  165. package/dist/stories/FormFieldFileInput.stories.js +0 -58
  166. package/dist/stories/FormFieldInput.stories.js +0 -66
  167. package/dist/stories/FormFieldInputPassword.stories.js +0 -66
  168. package/dist/stories/FormFieldMultiBadgeSelect.stories.js +0 -132
  169. package/dist/stories/FormFieldMultiSelect.stories.js +0 -127
  170. package/dist/stories/FormFieldSelect.stories.js +0 -99
  171. package/dist/stories/FormFieldSelectGroup.stories.js +0 -84
  172. package/dist/stories/NotFound.stories.js +0 -93
  173. package/dist/stories/Tab.appearance.stories.js +0 -260
  174. package/dist/stories/Tab.size.stories.js +0 -259
  175. package/dist/stories/Tab.state.stories.js +0 -227
  176. package/dist/types/components/FormField/ChoiceField.d.ts +0 -8
  177. package/dist/types/components/FormField/FormField.d.ts +0 -9
  178. package/dist/types/components/FormField/FormFiled.interface.d.ts +0 -77
  179. package/dist/types/components/FormField/PasswordField.d.ts +0 -9
  180. package/dist/types/components/FormField/SelectField.d.ts +0 -9
  181. package/dist/types/components/FormField/SwitchField.d.ts +0 -8
  182. package/dist/types/components/FormField/index.d.ts +0 -6
@@ -1,233 +1,233 @@
1
- import { Select } from '@itcase/ui/components/Select'
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
- fillProps,
4
+ borderColorProps,
9
5
  fillHoverProps,
6
+ fillProps,
7
+ sizeProps,
10
8
  textColorProps,
11
9
  textSizeProps,
12
- sizeProps,
13
- } from '@itcase/ui/constants'
10
+ } from '../../../constants'
11
+ import { Button } from '../../Button'
12
+ import { Loader } from '../../Loader'
13
+ import { Select } from '../index'
14
14
 
15
- import { defaultSelectProps } from 'src/config/forms'
15
+ // import { Select } from '../Select'
16
16
 
17
- import { icon14, icon16 } from 'src/icons'
17
+ // import { icon16 } from 'src/icons'
18
18
 
19
19
  export default {
20
- title: 'Atoms / Select',
21
- component: Select,
22
- parameters: {
23
- controls: {
24
- exclude: [
25
- 'optionShape',
26
- 'inputCaretColor',
27
- 'inputShape',
28
- 'animationOpen',
29
- 'animationClose',
30
- 'optionFillHover',
31
- 'headingFill',
32
- 'headingTextColor',
33
- 'headingTextSize',
34
- 'headingTextWeight',
35
- 'filterOption',
36
- 'initialValue',
37
- 'set',
38
- 'onChange',
39
- 'openMenuOnClick',
40
- ],
41
- },
42
- docs: {
43
- story: {
44
- inline: false,
45
- iframeHeight: 800,
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
- optionFill: {
68
- options: fillProps,
69
- control: 'select',
60
+ isClearable: {
61
+ control: 'boolean',
70
62
  },
71
- optionTextColor: {
72
- options: textColorProps,
73
- control: 'select',
63
+ isMulti: {
64
+ control: 'boolean',
74
65
  },
75
- optionTextSize: {
76
- options: textSizeProps,
77
- control: 'inline-radio',
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
- isClearable: {
81
+ closeMenuOnSelect: {
88
82
  control: 'boolean',
89
83
  },
90
- inputFill: {
91
- if: { arg: 'hideValueContainer', neq: true },
92
- options: fillProps,
84
+ dividerDirection: {
85
+ if: { arg: 'advancedProps' },
86
+ },
87
+ dividerFill: {
93
88
  control: 'select',
89
+ options: fillProps,
94
90
  },
95
- inputTextSize: {
96
- if: { arg: 'hideValueContainer', neq: true },
97
- options: textSizeProps,
91
+ dividerSize: {
98
92
  control: 'inline-radio',
93
+ options: sizeProps,
99
94
  },
100
- inputTextColor: {
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
- dropdownIconFill: {
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
- placeholderTextSize: {
123
- if: { arg: 'hideValueContainer', neq: true },
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
- noOptionsTextSize: {
133
- options: textSizeProps,
131
+ inputTextSize: {
134
132
  control: 'inline-radio',
133
+ if: { arg: 'hideValueContainer', neq: true },
134
+ options: textSizeProps,
135
135
  },
136
- noOptionsTextColor: {
137
- options: textColorProps,
138
- control: 'select',
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
- multipleItemTextSize: {
150
+ multipleItemIcon: {
151
151
  if: { arg: 'hideValueContainer', neq: true },
152
- options: textSizeProps,
153
- control: 'inline-radio',
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
- multipleItemIcon: {
163
+ multipleItemTextSize: {
164
+ control: 'inline-radio',
161
165
  if: { arg: 'hideValueContainer', neq: true },
166
+ options: textSizeProps,
162
167
  },
163
- multipleItemIconFill: {
164
- if: { arg: 'hideValueContainer', neq: true },
165
- options: fillProps,
168
+ noOptionsTextColor: {
166
169
  control: 'select',
170
+ options: textColorProps,
167
171
  },
168
- isMulti: {
169
- control: 'boolean',
170
- },
171
- isSearchable: {
172
- control: 'boolean',
172
+ noOptionsTextSize: {
173
+ control: 'inline-radio',
174
+ options: textSizeProps,
173
175
  },
174
- hideSelectedOptions: {
175
- control: 'boolean',
176
+ optionFill: {
177
+ control: 'select',
178
+ options: fillProps,
176
179
  },
177
- hideValueContainer: {
178
- control: 'boolean',
180
+ optionTextColor: {
181
+ control: 'select',
182
+ options: textColorProps,
179
183
  },
180
- menuItemSize: {
181
- options: ['xs', 's', 'm', 'l', 'xl', 'xxl'],
184
+ optionTextSize: {
182
185
  control: 'inline-radio',
186
+ options: textSizeProps,
183
187
  },
184
- dividerDirection: {
185
- if: { arg: 'advancedProps' },
188
+ placeholder: {
189
+ if: { arg: 'hideValueContainer', neq: true },
186
190
  },
187
- dividerFill: {
188
- options: fillProps,
191
+ placeholderTextColor: {
189
192
  control: 'select',
193
+ if: { arg: 'hideValueContainer', neq: true },
194
+ options: textColorProps,
190
195
  },
191
- dividerSize: {
192
- options: sizeProps,
196
+ placeholderTextSize: {
193
197
  control: 'inline-radio',
198
+ if: { arg: 'hideValueContainer', neq: true },
199
+ options: textSizeProps,
194
200
  },
195
201
  },
196
- args: {
197
- ...defaultSelectProps,
198
- noOptionsText: (
199
- <Loader
200
- fill="surfacePrimary"
201
- height="fill"
202
- itemFill="surfaceItemAccent"
203
- left="0px"
204
- position="absolute"
205
- right="0px"
206
- set="simple"
207
- width="fill"
208
- zIndex="1"
209
- />
210
- ),
211
- optionFill: 'surfacePrimary',
212
- optionFillHover: 'surfacePrimaryHover',
213
- optionTextColor: 'surfaceTextPrimary',
214
- optionTextSize: 'l',
215
- options: [
216
- { label: 'Завершены', value: 'completed' },
217
- { label: 'Идут торги', value: 'active' },
218
- { label: 'Остановлены', value: 'stopped' },
219
- { label: 'Отменены', value: 'canceled' },
220
- { label: 'Планируемые', value: 'planned' },
221
- { label: 'Продолжены', value: 'continued' },
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,9 @@
1
+ import { Canvas, Meta } from '@storybook/blocks'
2
+
3
+ import * as TitleStories from './Title.stories.js'
4
+
5
+ <Meta title="Atoms / Title / Skeleton Mode" />
6
+
7
+ # Skeleton
8
+
9
+ <Canvas sourceState="shown" of={TitleStories.SkeletonMode} />
@@ -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} />