@salutejs/plasma-sb-utils 0.226.1-next-sbcom.0 → 0.227.0-dev.0

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 (140) hide show
  1. package/lib/components/Combobox/Combobox.d.ts +408 -0
  2. package/lib/components/Combobox/Combobox.js +94 -0
  3. package/lib/components/Combobox/Combobox.js.map +1 -0
  4. package/lib/components/Combobox/fixtures.d.ts +42 -0
  5. package/lib/components/Combobox/fixtures.js +364 -0
  6. package/lib/components/Combobox/fixtures.js.map +1 -0
  7. package/lib/components/Combobox/index.d.ts +1 -0
  8. package/lib/components/Combobox/index.js +2 -0
  9. package/lib/components/Combobox/index.js.map +1 -0
  10. package/lib/components/Combobox/meta.d.ts +357 -0
  11. package/lib/components/Combobox/meta.js +149 -0
  12. package/lib/components/Combobox/meta.js.map +1 -0
  13. package/lib/components/Combobox/stories.d.ts +4 -0
  14. package/lib/components/Combobox/stories.js +109 -0
  15. package/lib/components/Combobox/stories.js.map +1 -0
  16. package/lib/components/DatePicker/DatePicker.d.ts +1 -0
  17. package/lib/components/DatePicker/DatePicker.js +4 -4
  18. package/lib/components/DatePicker/DatePicker.js.map +1 -1
  19. package/lib/components/DatePicker/stories.d.ts +4 -2
  20. package/lib/components/DatePicker/stories.js +18 -5
  21. package/lib/components/DatePicker/stories.js.map +1 -1
  22. package/lib/components/DateTimePicker/DateTimePicker.d.ts +24 -0
  23. package/lib/components/DateTimePicker/DateTimePicker.js +2 -2
  24. package/lib/components/DateTimePicker/DateTimePicker.js.map +1 -1
  25. package/lib/components/DateTimePicker/fixtures.d.ts +1 -0
  26. package/lib/components/DateTimePicker/fixtures.js +1 -0
  27. package/lib/components/DateTimePicker/fixtures.js.map +1 -1
  28. package/lib/components/DateTimePicker/meta.d.ts +23 -0
  29. package/lib/components/DateTimePicker/meta.js +13 -3
  30. package/lib/components/DateTimePicker/meta.js.map +1 -1
  31. package/lib/components/DateTimePicker/stories.d.ts +1 -1
  32. package/lib/components/DateTimePicker/stories.js +8 -3
  33. package/lib/components/DateTimePicker/stories.js.map +1 -1
  34. package/lib/components/Dropzone/Dropzone.d.ts +122 -0
  35. package/lib/components/Dropzone/Dropzone.js +40 -0
  36. package/lib/components/Dropzone/Dropzone.js.map +1 -0
  37. package/lib/components/Dropzone/fixtures.d.ts +1 -0
  38. package/lib/components/Dropzone/fixtures.js +2 -0
  39. package/lib/components/Dropzone/fixtures.js.map +1 -0
  40. package/lib/components/Dropzone/index.d.ts +1 -0
  41. package/lib/components/Dropzone/index.js +2 -0
  42. package/lib/components/Dropzone/index.js.map +1 -0
  43. package/lib/components/Dropzone/meta.d.ts +117 -0
  44. package/lib/components/Dropzone/meta.js +81 -0
  45. package/lib/components/Dropzone/meta.js.map +1 -0
  46. package/lib/components/Dropzone/stories.d.ts +1 -0
  47. package/lib/components/Dropzone/stories.js +36 -0
  48. package/lib/components/Dropzone/stories.js.map +1 -0
  49. package/lib/components/InformationWrapper/InformationWrapper.d.ts +270 -0
  50. package/lib/components/InformationWrapper/InformationWrapper.js +40 -0
  51. package/lib/components/InformationWrapper/InformationWrapper.js.map +1 -0
  52. package/lib/components/InformationWrapper/fixtures.d.ts +6 -0
  53. package/lib/components/InformationWrapper/fixtures.js +21 -0
  54. package/lib/components/InformationWrapper/fixtures.js.map +1 -0
  55. package/lib/components/InformationWrapper/index.d.ts +1 -0
  56. package/lib/components/InformationWrapper/index.js +2 -0
  57. package/lib/components/InformationWrapper/index.js.map +1 -0
  58. package/lib/components/InformationWrapper/meta.d.ts +265 -0
  59. package/lib/components/InformationWrapper/meta.js +118 -0
  60. package/lib/components/InformationWrapper/meta.js.map +1 -0
  61. package/lib/components/InformationWrapper/stories.d.ts +1 -0
  62. package/lib/components/InformationWrapper/stories.js +42 -0
  63. package/lib/components/InformationWrapper/stories.js.map +1 -0
  64. package/lib/components/NumberInput/fixtures.js +1 -1
  65. package/lib/components/NumberInput/fixtures.js.map +1 -1
  66. package/lib/components/Popover/Popover.d.ts +195 -0
  67. package/lib/components/Popover/Popover.js +50 -0
  68. package/lib/components/Popover/Popover.js.map +1 -0
  69. package/lib/components/Popover/fixtures.d.ts +5 -0
  70. package/lib/components/Popover/fixtures.js +29 -0
  71. package/lib/components/Popover/fixtures.js.map +1 -0
  72. package/lib/components/Popover/index.d.ts +1 -0
  73. package/lib/components/Popover/index.js +2 -0
  74. package/lib/components/Popover/index.js.map +1 -0
  75. package/lib/components/Popover/meta.d.ts +110 -0
  76. package/lib/components/Popover/meta.js +78 -0
  77. package/lib/components/Popover/meta.js.map +1 -0
  78. package/lib/components/Popover/stories.d.ts +80 -0
  79. package/lib/components/Popover/stories.js +125 -0
  80. package/lib/components/Popover/stories.js.map +1 -0
  81. package/lib/components/Progress/Progress.d.ts +159 -0
  82. package/lib/components/Progress/Progress.js +38 -0
  83. package/lib/components/Progress/Progress.js.map +1 -0
  84. package/lib/components/Progress/fixtures.d.ts +5 -0
  85. package/lib/components/Progress/fixtures.js +6 -0
  86. package/lib/components/Progress/fixtures.js.map +1 -0
  87. package/lib/components/Progress/index.d.ts +1 -0
  88. package/lib/components/Progress/index.js +2 -0
  89. package/lib/components/Progress/index.js.map +1 -0
  90. package/lib/components/Progress/meta.d.ts +154 -0
  91. package/lib/components/Progress/meta.js +87 -0
  92. package/lib/components/Progress/meta.js.map +1 -0
  93. package/lib/components/Progress/stories.d.ts +2 -0
  94. package/lib/components/Progress/stories.js +59 -0
  95. package/lib/components/Progress/stories.js.map +1 -0
  96. package/lib/components/Range/Range.d.ts +1 -0
  97. package/lib/components/Range/Range.js +2 -2
  98. package/lib/components/Range/Range.js.map +1 -1
  99. package/lib/components/Range/stories.d.ts +1 -1
  100. package/lib/components/Range/stories.js +11 -2
  101. package/lib/components/Range/stories.js.map +1 -1
  102. package/lib/components/Select/Select.d.ts +1 -0
  103. package/lib/components/Select/Select.js +4 -4
  104. package/lib/components/Select/Select.js.map +1 -1
  105. package/lib/components/Select/stories.d.ts +5 -3
  106. package/lib/components/Select/stories.js +10 -7
  107. package/lib/components/Select/stories.js.map +1 -1
  108. package/lib/components/Skeleton/Skeleton.d.ts +28 -1
  109. package/lib/components/Skeleton/stories.d.ts +28 -1
  110. package/lib/components/Skeleton/stories.js +34 -1
  111. package/lib/components/Skeleton/stories.js.map +1 -1
  112. package/lib/components/TextArea/TextArea.d.ts +154 -19
  113. package/lib/components/TextArea/meta.d.ts +154 -19
  114. package/lib/components/TextArea/meta.js +92 -141
  115. package/lib/components/TextArea/meta.js.map +1 -1
  116. package/lib/components/TextArea/stories.js +8 -9
  117. package/lib/components/TextArea/stories.js.map +1 -1
  118. package/lib/components/TextFieldSlider/TextFieldSlider.d.ts +9 -0
  119. package/lib/components/TextFieldSlider/meta.d.ts +9 -0
  120. package/lib/components/TextFieldSlider/meta.js +4 -1
  121. package/lib/components/TextFieldSlider/meta.js.map +1 -1
  122. package/lib/components/TextFieldSlider/stories.d.ts +1 -1
  123. package/lib/components/TextFieldSlider/stories.js +13 -4
  124. package/lib/components/TextFieldSlider/stories.js.map +1 -1
  125. package/lib/components/TimePicker/TimePicker.d.ts +24 -0
  126. package/lib/components/TimePicker/TimePicker.js +2 -2
  127. package/lib/components/TimePicker/TimePicker.js.map +1 -1
  128. package/lib/components/TimePicker/fixtures.d.ts +1 -0
  129. package/lib/components/TimePicker/fixtures.js +1 -0
  130. package/lib/components/TimePicker/fixtures.js.map +1 -1
  131. package/lib/components/TimePicker/meta.d.ts +23 -0
  132. package/lib/components/TimePicker/meta.js +13 -3
  133. package/lib/components/TimePicker/meta.js.map +1 -1
  134. package/lib/components/TimePicker/stories.d.ts +1 -1
  135. package/lib/components/TimePicker/stories.js +11 -3
  136. package/lib/components/TimePicker/stories.js.map +1 -1
  137. package/lib/components/index.d.ts +5 -0
  138. package/lib/components/index.js +5 -0
  139. package/lib/components/index.js.map +1 -1
  140. package/package.json +4 -4
@@ -0,0 +1,357 @@
1
+ type CreateMetaProps = {
2
+ component: any;
3
+ componentConfig: any;
4
+ title?: string;
5
+ defaultArgs?: {};
6
+ additionalArgTypes?: {};
7
+ disablePropsList?: string[];
8
+ };
9
+ export declare const createMeta: ({ component, componentConfig, title, defaultArgs, additionalArgTypes, disablePropsList, }: CreateMetaProps) => {
10
+ title: string;
11
+ decorators: import("@storybook/react").Decorator[];
12
+ component: any;
13
+ args: {
14
+ label: string;
15
+ labelPlacement: string;
16
+ placeholder: string;
17
+ helperText: string;
18
+ size: string;
19
+ view: string;
20
+ enableContentLeft: boolean;
21
+ isTargetAmount: boolean;
22
+ targetAmount: undefined;
23
+ variant: string;
24
+ alwaysOpened: boolean;
25
+ disabled: boolean;
26
+ readOnly: boolean;
27
+ optional: boolean;
28
+ required: boolean;
29
+ requiredPlacement: string;
30
+ hasRequiredIndicator: boolean;
31
+ hasHint: boolean;
32
+ hintText: string;
33
+ hintTrigger: string;
34
+ hintView: string;
35
+ hintSize: string;
36
+ hintTargetPlacement: string;
37
+ hintPlacement: string;
38
+ hintWidth: string;
39
+ hintHasArrow: boolean;
40
+ emptyStateDescription: string;
41
+ mode: string;
42
+ treeView: boolean;
43
+ arrowPlacement: string;
44
+ singleLine: boolean;
45
+ closeAfterSelect: boolean;
46
+ chipClickArea: string;
47
+ };
48
+ argTypes: {
49
+ size: {
50
+ options: any;
51
+ control: {
52
+ type: string;
53
+ };
54
+ table: {
55
+ category: string;
56
+ };
57
+ };
58
+ view: {
59
+ options: any;
60
+ control: {
61
+ type: string;
62
+ };
63
+ table: {
64
+ category: string;
65
+ };
66
+ };
67
+ labelPlacement: {
68
+ options: string[];
69
+ control: {
70
+ type: string;
71
+ };
72
+ table: {
73
+ category: string;
74
+ };
75
+ };
76
+ variant: {
77
+ options: string[];
78
+ control: {
79
+ type: string;
80
+ };
81
+ table: {
82
+ category: string;
83
+ };
84
+ };
85
+ listWidth: {
86
+ control: {
87
+ type: string;
88
+ };
89
+ table: {
90
+ category: string;
91
+ };
92
+ };
93
+ listMaxHeight: {
94
+ control: {
95
+ type: string;
96
+ };
97
+ table: {
98
+ category: string;
99
+ };
100
+ };
101
+ disabled: {
102
+ control: {
103
+ type: string;
104
+ };
105
+ if: {
106
+ arg: string;
107
+ truthy: boolean;
108
+ };
109
+ table: {
110
+ category: string;
111
+ };
112
+ };
113
+ readOnly: {
114
+ control: {
115
+ type: string;
116
+ };
117
+ if: {
118
+ arg: string;
119
+ truthy: boolean;
120
+ };
121
+ table: {
122
+ category: string;
123
+ };
124
+ };
125
+ targetAmount: {
126
+ control: {
127
+ type: string;
128
+ };
129
+ if: {
130
+ arg: string;
131
+ truthy: boolean;
132
+ };
133
+ table: {
134
+ category: string;
135
+ };
136
+ };
137
+ requiredPlacement: {
138
+ options: string[];
139
+ control: {
140
+ type: string;
141
+ };
142
+ table: {
143
+ category: string;
144
+ };
145
+ };
146
+ required: {
147
+ control: {
148
+ type: string;
149
+ };
150
+ if: {
151
+ arg: string;
152
+ truthy: boolean;
153
+ };
154
+ table: {
155
+ category: string;
156
+ };
157
+ };
158
+ hasRequiredIndicator: {
159
+ control: {
160
+ type: string;
161
+ };
162
+ if: {
163
+ arg: string;
164
+ truthy: boolean;
165
+ };
166
+ table: {
167
+ category: string;
168
+ };
169
+ };
170
+ optional: {
171
+ control: {
172
+ type: string;
173
+ };
174
+ if: {
175
+ arg: string;
176
+ truthy: boolean;
177
+ };
178
+ table: {
179
+ category: string;
180
+ };
181
+ };
182
+ hintText: {
183
+ control: {
184
+ type: string;
185
+ };
186
+ if: {
187
+ arg: string;
188
+ truthy: boolean;
189
+ };
190
+ table: {
191
+ category: string;
192
+ };
193
+ };
194
+ hintView: {
195
+ options: string[];
196
+ control: {
197
+ type: string;
198
+ };
199
+ if: {
200
+ arg: string;
201
+ truthy: boolean;
202
+ };
203
+ table: {
204
+ category: string;
205
+ };
206
+ };
207
+ hintSize: {
208
+ options: string[];
209
+ control: {
210
+ type: string;
211
+ };
212
+ if: {
213
+ arg: string;
214
+ truthy: boolean;
215
+ };
216
+ table: {
217
+ category: string;
218
+ };
219
+ };
220
+ hintTargetPlacement: {
221
+ options: string[];
222
+ control: {
223
+ type: string;
224
+ };
225
+ if: {
226
+ arg: string;
227
+ truthy: boolean;
228
+ };
229
+ table: {
230
+ category: string;
231
+ };
232
+ };
233
+ hintTrigger: {
234
+ options: string[];
235
+ control: {
236
+ type: string;
237
+ };
238
+ if: {
239
+ arg: string;
240
+ truthy: boolean;
241
+ };
242
+ table: {
243
+ category: string;
244
+ };
245
+ };
246
+ hintPlacement: {
247
+ options: string[];
248
+ control: {
249
+ type: string;
250
+ };
251
+ if: {
252
+ arg: string;
253
+ truthy: boolean;
254
+ };
255
+ mappers: string[];
256
+ table: {
257
+ category: string;
258
+ };
259
+ };
260
+ hintHasArrow: {
261
+ control: {
262
+ type: string;
263
+ };
264
+ if: {
265
+ arg: string;
266
+ truthy: boolean;
267
+ };
268
+ table: {
269
+ category: string;
270
+ };
271
+ };
272
+ hintWidth: {
273
+ control: {
274
+ type: string;
275
+ };
276
+ if: {
277
+ arg: string;
278
+ truthy: boolean;
279
+ };
280
+ table: {
281
+ category: string;
282
+ };
283
+ };
284
+ emptyStateDescription: {
285
+ control: {
286
+ type: string;
287
+ };
288
+ table: {
289
+ category: string;
290
+ };
291
+ };
292
+ mode: {
293
+ options: string[];
294
+ control: {
295
+ type: string;
296
+ };
297
+ table: {
298
+ category: string;
299
+ };
300
+ };
301
+ treeView: {
302
+ control: {
303
+ type: string;
304
+ };
305
+ table: {
306
+ category: string;
307
+ };
308
+ };
309
+ arrowPlacement: {
310
+ options: string[];
311
+ control: {
312
+ type: string;
313
+ };
314
+ if: {
315
+ arg: string;
316
+ truthy: boolean;
317
+ };
318
+ table: {
319
+ category: string;
320
+ };
321
+ };
322
+ singleLine: {
323
+ control: {
324
+ type: string;
325
+ };
326
+ table: {
327
+ category: string;
328
+ };
329
+ };
330
+ closeAfterSelect: {
331
+ control: {
332
+ type: string;
333
+ };
334
+ table: {
335
+ category: string;
336
+ };
337
+ };
338
+ alwaysOpened: {
339
+ control: {
340
+ type: string;
341
+ };
342
+ table: {
343
+ category: string;
344
+ };
345
+ };
346
+ chipClickArea: {
347
+ options: string[];
348
+ control: {
349
+ type: string;
350
+ };
351
+ table: {
352
+ category: string;
353
+ };
354
+ };
355
+ };
356
+ };
357
+ export {};
@@ -0,0 +1,149 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
13
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
14
+ if (ar || !(i in from)) {
15
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
16
+ ar[i] = from[i];
17
+ }
18
+ }
19
+ return to.concat(ar || Array.prototype.slice.call(from));
20
+ };
21
+ import { disableProps, InSpacingDecorator } from '../../index';
22
+ import { arrowPlacement, chipClickArea, hintSizes, hintTargetPlacements, hintTriggers, hintViews, labelPlacement, mode, placements, variant, } from './fixtures';
23
+ export var createMeta = function (_a) {
24
+ var component = _a.component, componentConfig = _a.componentConfig, _b = _a.title, title = _b === void 0 ? 'Data Entry/Combobox' : _b, _c = _a.defaultArgs, defaultArgs = _c === void 0 ? {} : _c, _d = _a.additionalArgTypes, additionalArgTypes = _d === void 0 ? {} : _d, _e = _a.disablePropsList, disablePropsList = _e === void 0 ? [] : _e;
25
+ return {
26
+ title: title,
27
+ decorators: [InSpacingDecorator],
28
+ component: component,
29
+ args: __assign({ label: 'Label', labelPlacement: 'outer', placeholder: 'Placeholder', helperText: 'Helper text', size: 'm', view: 'default', enableContentLeft: false, isTargetAmount: false, targetAmount: undefined, variant: 'normal', alwaysOpened: false, disabled: false, readOnly: false, optional: false, required: false, requiredPlacement: 'right', hasRequiredIndicator: false, hasHint: false, hintText: 'Текст подсказки', hintTrigger: 'hover', hintView: 'default', hintSize: 'm', hintTargetPlacement: 'outer', hintPlacement: 'auto', hintWidth: '10rem', hintHasArrow: true, emptyStateDescription: '', mode: 'default', treeView: false, arrowPlacement: 'left', singleLine: true, closeAfterSelect: false, chipClickArea: 'full' }, defaultArgs),
30
+ argTypes: __assign(__assign({ size: {
31
+ options: componentConfig.sizes,
32
+ control: { type: 'select' },
33
+ table: { category: 'variation' },
34
+ }, view: {
35
+ options: componentConfig.views,
36
+ control: { type: 'select' },
37
+ table: { category: 'variation' },
38
+ }, labelPlacement: {
39
+ options: labelPlacement,
40
+ control: { type: 'select' },
41
+ table: { category: 'layout' },
42
+ }, variant: {
43
+ options: variant,
44
+ control: { type: 'select' },
45
+ table: { category: 'variation' },
46
+ }, listWidth: {
47
+ control: { type: 'text' },
48
+ table: { category: 'dropdown' },
49
+ }, listMaxHeight: {
50
+ control: { type: 'text' },
51
+ table: { category: 'dropdown' },
52
+ }, disabled: {
53
+ control: { type: 'boolean' },
54
+ if: { arg: 'alwaysOpened', truthy: false },
55
+ table: { category: 'variation' },
56
+ }, readOnly: {
57
+ control: { type: 'boolean' },
58
+ if: { arg: 'alwaysOpened', truthy: false },
59
+ table: { category: 'variation' },
60
+ }, targetAmount: {
61
+ control: { type: 'number' },
62
+ if: { arg: 'isTargetAmount', truthy: true },
63
+ table: { category: 'layout' },
64
+ }, requiredPlacement: {
65
+ options: ['left', 'right'],
66
+ control: { type: 'select' },
67
+ table: { category: 'form-related' },
68
+ }, required: {
69
+ control: { type: 'boolean' },
70
+ if: { arg: 'optional', truthy: false },
71
+ table: { category: 'form-related' },
72
+ }, hasRequiredIndicator: {
73
+ control: { type: 'boolean' },
74
+ if: { arg: 'required', truthy: true },
75
+ table: { category: 'form-related' },
76
+ }, optional: {
77
+ control: { type: 'boolean' },
78
+ if: { arg: 'required', truthy: false },
79
+ table: { category: 'form-related' },
80
+ }, hintText: {
81
+ control: { type: 'text' },
82
+ if: { arg: 'hasHint', truthy: true },
83
+ table: { category: 'hint' },
84
+ }, hintView: {
85
+ options: hintViews,
86
+ control: { type: 'select' },
87
+ if: { arg: 'hasHint', truthy: true },
88
+ table: { category: 'hint' },
89
+ }, hintSize: {
90
+ options: hintSizes,
91
+ control: { type: 'select' },
92
+ if: { arg: 'hasHint', truthy: true },
93
+ table: { category: 'hint' },
94
+ }, hintTargetPlacement: {
95
+ options: hintTargetPlacements,
96
+ control: { type: 'inline-radio' },
97
+ if: { arg: 'hasHint', truthy: true },
98
+ table: { category: 'hint' },
99
+ }, hintTrigger: {
100
+ options: hintTriggers,
101
+ control: { type: 'inline-radio' },
102
+ if: { arg: 'hasHint', truthy: true },
103
+ table: { category: 'hint' },
104
+ }, hintPlacement: {
105
+ options: placements,
106
+ control: { type: 'select' },
107
+ if: { arg: 'hasHint', truthy: true },
108
+ mappers: placements,
109
+ table: { category: 'hint' },
110
+ }, hintHasArrow: {
111
+ control: { type: 'boolean' },
112
+ if: { arg: 'hasHint', truthy: true },
113
+ table: { category: 'hint' },
114
+ }, hintWidth: {
115
+ control: { type: 'text' },
116
+ if: { arg: 'hasHint', truthy: true },
117
+ table: { category: 'hint' },
118
+ }, emptyStateDescription: {
119
+ control: { type: 'text' },
120
+ table: { category: 'dropdown' },
121
+ }, mode: {
122
+ options: mode,
123
+ control: { type: 'select' },
124
+ table: { category: 'dropdown' },
125
+ }, treeView: {
126
+ control: { type: 'boolean' },
127
+ table: { category: 'dropdown' },
128
+ }, arrowPlacement: {
129
+ options: arrowPlacement,
130
+ control: { type: 'select' },
131
+ if: { arg: 'treeView', truthy: true },
132
+ table: { category: 'dropdown' },
133
+ }, singleLine: {
134
+ control: { type: 'boolean' },
135
+ table: { category: 'layout' },
136
+ }, closeAfterSelect: {
137
+ control: { type: 'boolean' },
138
+ table: { category: 'dropdown' },
139
+ }, alwaysOpened: {
140
+ control: { type: 'boolean' },
141
+ table: { category: 'dropdown' },
142
+ }, chipClickArea: {
143
+ options: chipClickArea,
144
+ control: { type: 'select' },
145
+ table: { category: 'chip' },
146
+ } }, additionalArgTypes), disableProps(__spreadArray([], disablePropsList, true))),
147
+ };
148
+ };
149
+ //# sourceMappingURL=meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/components/Combobox/meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAE/D,OAAO,EACH,cAAc,EACd,aAAa,EACb,SAAS,EACT,oBAAoB,EACpB,YAAY,EACZ,SAAS,EACT,cAAc,EACd,IAAI,EACJ,UAAU,EACV,OAAO,GACV,MAAM,YAAY,CAAC;AAWpB,MAAM,CAAC,IAAM,UAAU,GAAG,UAAC,EAOT;QANd,SAAS,eAAA,EACT,eAAe,qBAAA,EACf,aAA6B,EAA7B,KAAK,mBAAG,qBAAqB,KAAA,EAC7B,mBAAgB,EAAhB,WAAW,mBAAG,EAAE,KAAA,EAChB,0BAAuB,EAAvB,kBAAkB,mBAAG,EAAE,KAAA,EACvB,wBAAqB,EAArB,gBAAgB,mBAAG,EAAE,KAAA;IAErB,OAAO;QACH,KAAK,OAAA;QACL,UAAU,EAAE,CAAC,kBAAkB,CAAC;QAChC,SAAS,WAAA;QACT,IAAI,aACA,KAAK,EAAE,OAAO,EACd,cAAc,EAAE,OAAO,EACvB,WAAW,EAAE,aAAa,EAC1B,UAAU,EAAE,aAAa,EACzB,IAAI,EAAE,GAAG,EACT,IAAI,EAAE,SAAS,EACf,iBAAiB,EAAE,KAAK,EACxB,cAAc,EAAE,KAAK,EACrB,YAAY,EAAE,SAAS,EACvB,OAAO,EAAE,QAAQ,EACjB,YAAY,EAAE,KAAK,EACnB,QAAQ,EAAE,KAAK,EACf,QAAQ,EAAE,KAAK,EACf,QAAQ,EAAE,KAAK,EACf,QAAQ,EAAE,KAAK,EACf,iBAAiB,EAAE,OAAO,EAC1B,oBAAoB,EAAE,K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E,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE;gBACrC,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE;aAClC,EACD,UAAU,EAAE;gBACR,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;gBAC5B,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE;aAChC,EACD,gBAAgB,EAAE;gBACd,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;gBAC5B,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE;aAClC,EACD,YAAY,EAAE;gBACV,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;gBAC5B,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE;aAClC,EACD,aAAa,EAAE;gBACX,OAAO,EAAE,aAAa;gBACtB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBAC3B,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE;aAC9B,IACE,kBAAkB,GAClB,YAAY,mBAAK,gBAAgB,QAAE,CACzC;KACJ,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const createSingleStory: (Combobox: any) => ({ enableContentLeft, ...rest }: any) => JSX.Element;
2
+ export declare const createMultipleStory: (Combobox: any) => ({ enableContentLeft, ...rest }: any) => JSX.Element;
3
+ export declare const createSelectAllStory: (Combobox: any) => ({ selectAllLabel, selectAllSticky }: any) => JSX.Element;
4
+ export declare const createAddItemStory: (Combobox: any) => ({ helperText, emptyStateDescription }: any) => JSX.Element;
@@ -0,0 +1,109 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
24
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
25
+ if (ar || !(i in from)) {
26
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
27
+ ar[i] = from[i];
28
+ }
29
+ }
30
+ return to.concat(ar || Array.prototype.slice.call(from));
31
+ };
32
+ import React, { useState } from 'react';
33
+ import { IconDone } from '@salutejs/plasma-icons';
34
+ import { flatItems, items, shortListItems } from './fixtures';
35
+ var getIconSize = function (size) {
36
+ return size === 'xs' ? 'xs' : 's';
37
+ };
38
+ export var createSingleStory = function (Combobox) {
39
+ return function (_a) {
40
+ var enableContentLeft = _a.enableContentLeft, rest = __rest(_a, ["enableContentLeft"]);
41
+ var _b = useState(''), value = _b[0], setValue = _b[1];
42
+ return (React.createElement("div", { style: { width: '400px' } },
43
+ React.createElement(Combobox, __assign({}, rest, { items: items, value: value, onChange: setValue, contentLeft: enableContentLeft ? React.createElement(IconDone, { size: getIconSize(rest.size) }) : undefined }))));
44
+ };
45
+ };
46
+ export var createMultipleStory = function (Combobox) {
47
+ return function (_a) {
48
+ var enableContentLeft = _a.enableContentLeft, rest = __rest(_a, ["enableContentLeft"]);
49
+ var _b = useState([]), value = _b[0], setValue = _b[1];
50
+ return (React.createElement("div", { style: { width: '400px' } },
51
+ React.createElement(Combobox, __assign({}, rest, { multiple: true, items: items, value: value, onChange: setValue, contentLeft: enableContentLeft ? React.createElement(IconDone, { size: getIconSize(rest.size) }) : undefined }))));
52
+ };
53
+ };
54
+ export var createSelectAllStory = function (Combobox) {
55
+ return function (_a) {
56
+ var selectAllLabel = _a.selectAllLabel, selectAllSticky = _a.selectAllSticky;
57
+ var _b = useState([]), value = _b[0], setValue = _b[1];
58
+ var _c = useState(false), checked = _c[0], setChecked = _c[1];
59
+ var _d = useState(false), indeterminate = _d[0], setIndeterminate = _d[1];
60
+ var handleClick = function () {
61
+ if (checked && !indeterminate) {
62
+ setValue([]);
63
+ }
64
+ else {
65
+ setValue(flatItems.map(function (item) { return item.value; }));
66
+ }
67
+ };
68
+ React.useEffect(function () {
69
+ if (value.length === 0) {
70
+ setChecked(false);
71
+ setIndeterminate(false);
72
+ }
73
+ else if (value.length === flatItems.length) {
74
+ setChecked(true);
75
+ setIndeterminate(false);
76
+ }
77
+ else {
78
+ setChecked(true);
79
+ setIndeterminate(true);
80
+ }
81
+ }, [value]);
82
+ return (React.createElement("div", { style: { width: '400px' } },
83
+ React.createElement(Combobox, { placeholder: "Placeholder", multiple: true, items: flatItems, value: value, onChange: setValue, listMaxHeight: "300px", selectAllOptions: {
84
+ sticky: selectAllSticky || false,
85
+ label: selectAllLabel,
86
+ checked: checked,
87
+ indeterminate: indeterminate,
88
+ onClick: handleClick,
89
+ } })));
90
+ };
91
+ };
92
+ export var createAddItemStory = function (Combobox) {
93
+ return function (_a) {
94
+ var helperText = _a.helperText, emptyStateDescription = _a.emptyStateDescription;
95
+ var _b = useState(shortListItems), currentItems = _b[0], setItems = _b[1];
96
+ var _c = useState([]), value = _c[0], setValue = _c[1];
97
+ var _d = useState(''), textValue = _d[0], setTextValue = _d[1];
98
+ var handleKeyDown = function (event) {
99
+ if (event.key === 'Enter') {
100
+ setItems(__spreadArray(__spreadArray([], currentItems, true), [{ value: textValue, label: textValue }], false));
101
+ setValue(__spreadArray(__spreadArray([], value, true), [textValue], false));
102
+ setTextValue('');
103
+ }
104
+ };
105
+ return (React.createElement("div", { style: { width: '400px' } },
106
+ React.createElement(Combobox, { multiple: true, label: "Label", placeholder: "Placeholder", items: currentItems, value: value, onChange: setValue, onChangeValue: setTextValue, onKeyDown: handleKeyDown, helperText: helperText, emptyStateDescription: emptyStateDescription })));
107
+ };
108
+ };
109
+ //# sourceMappingURL=stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stories.js","sourceRoot":"","sources":["../../../src/components/Combobox/stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE9D,IAAM,WAAW,GAAG,UAAC,IAAa;IAC9B,OAAO,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;AACtC,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,iBAAiB,GAAG,UAAC,QAAa;IAC3C,OAAO,UAAC,EAAmC;QAAjC,IAAA,iBAAiB,uBAAA,EAAK,IAAI,cAA5B,qBAA8B,CAAF;QAC1B,IAAA,KAAoB,QAAQ,CAAC,EAAE,CAAC,EAA/B,KAAK,QAAA,EAAE,QAAQ,QAAgB,CAAC;QAEvC,OAAO,CACH,6BAAK,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;YAC1B,oBAAC,QAAQ,eACD,IAAI,IACR,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,iBAAiB,CAAC,CAAC,CAAC,oBAAC,QAAQ,IAAC,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,GAAI,CAAC,CAAC,CAAC,SAAS,IACzF,CACA,CACT,CAAC;IACN,CAAC,CAAC;AACN,CAAC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AA9C,KAAK,QAAA,EAAE,QAAQ,QAA+B,CAAC;QAChD,IAAA,KAA4B,QAAQ,CAAC,EAAE,CAAC,EAAvC,SAAS,QAAA,EAAE,YAAY,QAAgB,CAAC;QAE/C,IAAM,aAAa,GAAG,UAAC,KAA4C;YAC/D,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,EAAE,CAAC;gBACxB,QAAQ,iCAAK,YAAY,UAAE,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,UAAE,CAAC;gBACpE,QAAQ,iCAAK,KAAK,UAAE,SAAS,UAAE,CAAC;gBAChC,YAAY,CAAC,EAAE,CAAC,CAAC;YACrB,CAAC;QACL,CAAC,CAAC;QAEF,OAAO,CACH,6BAAK,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;YAC1B,oBAAC,QAAQ,IACL,QAAQ,QACR,KAAK,EAAC,OAAO,EACb,WAAW,EAAC,aAAa,EACzB,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,YAAY,EAC3B,SAAS,EAAE,aAAa,EACxB,UAAU,EAAE,UAAU,EACtB,qBAAqB,EAAE,qBAAqB,GAC9C,CACA,CACT,CAAC;IACN,CAAC,CAAC;AACN,CAAC,CAAC"}
@@ -6,6 +6,7 @@ type CreateDatePickerStoriesProps = {
6
6
  defaultArgs?: {};
7
7
  additionalArgTypes?: {};
8
8
  additionalComponents?: {};
9
+ customIcon?: (size: string, type?: 'left' | 'right', disabled?: boolean, readOnly?: boolean) => JSX.Element;
9
10
  };
10
11
  export declare const getDatePickerStories: (config: CreateDatePickerStoriesProps) => {
11
12
  meta: {
@@ -25,10 +25,10 @@ import { getConfigVariations } from '../../helpers';
25
25
  import { createMeta, createRangeMeta } from './meta';
26
26
  import { createDefaultStory, createRangeStory } from './stories';
27
27
  export var getDatePickerStories = function (config) {
28
- var component = config.component, componentConfig = config.componentConfig, rest = __rest(config, ["component", "componentConfig"]);
28
+ var component = config.component, componentConfig = config.componentConfig, customIcon = config.customIcon, rest = __rest(config, ["component", "componentConfig", "customIcon"]);
29
29
  var datePickerConfig = getConfigVariations(componentConfig);
30
30
  var meta = createMeta(__assign({ component: component, componentConfig: datePickerConfig }, rest));
31
- var DefaultStoryComponent = createDefaultStory(component);
31
+ var DefaultStoryComponent = createDefaultStory(component, customIcon);
32
32
  var Default = {
33
33
  render: function (args) { return React.createElement(DefaultStoryComponent, __assign({}, args)); },
34
34
  };
@@ -38,10 +38,10 @@ export var getDatePickerStories = function (config) {
38
38
  };
39
39
  };
40
40
  export var getDatePickerRangeStories = function (config) {
41
- var component = config.component, componentConfig = config.componentConfig, rest = __rest(config, ["component", "componentConfig"]);
41
+ var component = config.component, componentConfig = config.componentConfig, customIcon = config.customIcon, rest = __rest(config, ["component", "componentConfig", "customIcon"]);
42
42
  var datePickerRangeConfig = getConfigVariations(componentConfig);
43
43
  var meta = createRangeMeta(__assign({ component: component, componentConfig: datePickerRangeConfig }, rest));
44
- var RangeStoryComponent = createRangeStory(component);
44
+ var RangeStoryComponent = createRangeStory(component, customIcon);
45
45
  var Range = {
46
46
  render: function (args) { return React.createElement(RangeStoryComponent, __assign({}, args)); },
47
47
  };