@salutejs/plasma-sb-utils 0.235.0-next-sbcom.0 → 0.236.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.
- package/lib/components/Chip/Chip.d.ts +9 -0
- package/lib/components/Chip/fixtures.d.ts +1 -0
- package/lib/components/Chip/fixtures.js +10 -0
- package/lib/components/Chip/fixtures.js.map +1 -1
- package/lib/components/Chip/meta.d.ts +9 -0
- package/lib/components/Chip/meta.js +5 -1
- package/lib/components/Chip/meta.js.map +1 -1
- package/lib/components/Chip/stories.js +2 -0
- package/lib/components/Chip/stories.js.map +1 -1
- package/lib/components/Combobox/Combobox.d.ts +1 -0
- package/lib/components/Combobox/Combobox.js +3 -3
- package/lib/components/Combobox/Combobox.js.map +1 -1
- package/lib/components/Combobox/stories.d.ts +4 -2
- package/lib/components/Combobox/stories.js +4 -4
- package/lib/components/Combobox/stories.js.map +1 -1
- package/lib/components/Segment/stories.js +14 -13
- package/lib/components/Segment/stories.js.map +1 -1
- package/lib/components/Slider/Slider.d.ts +28 -0
- package/lib/components/Slider/fixtures.d.ts +2 -0
- package/lib/components/Slider/fixtures.js +2 -0
- package/lib/components/Slider/fixtures.js.map +1 -1
- package/lib/components/Slider/meta.d.ts +28 -0
- package/lib/components/Slider/meta.js +16 -2
- package/lib/components/Slider/meta.js.map +1 -1
- package/lib/components/Slider/stories.d.ts +1 -1
- package/lib/components/Slider/stories.js +20 -2
- package/lib/components/Slider/stories.js.map +1 -1
- package/lib/components/Tabs/Tabs.d.ts +431 -0
- package/lib/components/Tabs/Tabs.js +86 -0
- package/lib/components/Tabs/Tabs.js.map +1 -0
- package/lib/components/Tabs/fixtures.d.ts +13 -0
- package/lib/components/Tabs/fixtures.js +32 -0
- package/lib/components/Tabs/fixtures.js.map +1 -0
- package/lib/components/Tabs/index.d.ts +1 -0
- package/lib/components/Tabs/index.js +2 -0
- package/lib/components/Tabs/index.js.map +1 -0
- package/lib/components/Tabs/meta.d.ts +187 -0
- package/lib/components/Tabs/meta.js +103 -0
- package/lib/components/Tabs/meta.js.map +1 -0
- package/lib/components/Tabs/stories.d.ts +14 -0
- package/lib/components/Tabs/stories.js +107 -0
- package/lib/components/Tabs/stories.js.map +1 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +1 -0
- package/lib/components/index.js.map +1 -1
- package/package.json +17 -6
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
type CreateTabsStoriesProps = {
|
|
2
|
+
component: any;
|
|
3
|
+
tabItemComponent: any;
|
|
4
|
+
iconTabItemComponent?: any;
|
|
5
|
+
dropdownComponent: any;
|
|
6
|
+
counterComponent?: any;
|
|
7
|
+
componentConfig: {
|
|
8
|
+
horizontal: any;
|
|
9
|
+
vertical: any;
|
|
10
|
+
};
|
|
11
|
+
title?: string;
|
|
12
|
+
disablePropsList?: string[];
|
|
13
|
+
defaultArgs?: {};
|
|
14
|
+
additionalArgTypes?: {};
|
|
15
|
+
};
|
|
16
|
+
export declare const getTabsStories: (config: CreateTabsStoriesProps) => {
|
|
17
|
+
meta: {
|
|
18
|
+
title: string;
|
|
19
|
+
decorators: import("@storybook/react").Decorator[];
|
|
20
|
+
component: any;
|
|
21
|
+
args: {
|
|
22
|
+
size: string;
|
|
23
|
+
orientation: string;
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
hasDivider: boolean;
|
|
26
|
+
hasAction: boolean;
|
|
27
|
+
helperText: string;
|
|
28
|
+
itemQuantity: number;
|
|
29
|
+
stretch: boolean;
|
|
30
|
+
width: string;
|
|
31
|
+
height: string;
|
|
32
|
+
maxItemWidth: string;
|
|
33
|
+
dividerAlign: string;
|
|
34
|
+
};
|
|
35
|
+
argTypes: {
|
|
36
|
+
orientation: {
|
|
37
|
+
options: string[];
|
|
38
|
+
control: {
|
|
39
|
+
type: string;
|
|
40
|
+
};
|
|
41
|
+
table: {
|
|
42
|
+
category: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
size: {
|
|
46
|
+
options: string[];
|
|
47
|
+
control: {
|
|
48
|
+
type: string;
|
|
49
|
+
};
|
|
50
|
+
table: {
|
|
51
|
+
category: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
disabled: {
|
|
55
|
+
control: {
|
|
56
|
+
type: string;
|
|
57
|
+
};
|
|
58
|
+
table: {
|
|
59
|
+
category: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
hasDivider: {
|
|
63
|
+
control: {
|
|
64
|
+
type: string;
|
|
65
|
+
};
|
|
66
|
+
table: {
|
|
67
|
+
category: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
hasAction: {
|
|
71
|
+
control: {
|
|
72
|
+
type: string;
|
|
73
|
+
};
|
|
74
|
+
table: {
|
|
75
|
+
category: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
helperText: {
|
|
79
|
+
control: {
|
|
80
|
+
type: string;
|
|
81
|
+
};
|
|
82
|
+
table: {
|
|
83
|
+
category: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
itemQuantity: {
|
|
87
|
+
control: {
|
|
88
|
+
type: string;
|
|
89
|
+
};
|
|
90
|
+
table: {
|
|
91
|
+
category: string;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
stretch: {
|
|
95
|
+
control: {
|
|
96
|
+
type: string;
|
|
97
|
+
};
|
|
98
|
+
if: {
|
|
99
|
+
arg: string;
|
|
100
|
+
eq: string;
|
|
101
|
+
};
|
|
102
|
+
table: {
|
|
103
|
+
category: string;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
maxItemWidth: {
|
|
107
|
+
control: {
|
|
108
|
+
type: string;
|
|
109
|
+
};
|
|
110
|
+
if: {
|
|
111
|
+
arg: string;
|
|
112
|
+
truthy: boolean;
|
|
113
|
+
};
|
|
114
|
+
table: {
|
|
115
|
+
category: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
clip: {
|
|
119
|
+
options: string[];
|
|
120
|
+
control: {
|
|
121
|
+
type: string;
|
|
122
|
+
};
|
|
123
|
+
if: {
|
|
124
|
+
arg: string;
|
|
125
|
+
truthy: boolean;
|
|
126
|
+
};
|
|
127
|
+
table: {
|
|
128
|
+
category: string;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
width: {
|
|
132
|
+
control: {
|
|
133
|
+
type: string;
|
|
134
|
+
};
|
|
135
|
+
if: {
|
|
136
|
+
arg: string;
|
|
137
|
+
eq: string;
|
|
138
|
+
};
|
|
139
|
+
table: {
|
|
140
|
+
category: string;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
height: {
|
|
144
|
+
control: {
|
|
145
|
+
type: string;
|
|
146
|
+
};
|
|
147
|
+
if: {
|
|
148
|
+
arg: string;
|
|
149
|
+
eq: string;
|
|
150
|
+
};
|
|
151
|
+
table: {
|
|
152
|
+
category: string;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
contentLeft: {
|
|
156
|
+
options: string[];
|
|
157
|
+
control: {
|
|
158
|
+
type: string;
|
|
159
|
+
};
|
|
160
|
+
table: {
|
|
161
|
+
category: string;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
contentRight: {
|
|
165
|
+
options: string[];
|
|
166
|
+
control: {
|
|
167
|
+
type: string;
|
|
168
|
+
};
|
|
169
|
+
if: {
|
|
170
|
+
arg: string;
|
|
171
|
+
eq: string;
|
|
172
|
+
};
|
|
173
|
+
table: {
|
|
174
|
+
category: string;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
dividerAlign: {
|
|
178
|
+
options: string[];
|
|
179
|
+
control: {
|
|
180
|
+
type: string;
|
|
181
|
+
};
|
|
182
|
+
if: {
|
|
183
|
+
arg: string;
|
|
184
|
+
eq: string;
|
|
185
|
+
};
|
|
186
|
+
table: {
|
|
187
|
+
category: string;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
Default: {
|
|
193
|
+
render: (args: any) => JSX.Element;
|
|
194
|
+
};
|
|
195
|
+
HeaderTabs?: undefined;
|
|
196
|
+
} | {
|
|
197
|
+
meta: {
|
|
198
|
+
title: string;
|
|
199
|
+
decorators: import("@storybook/react").Decorator[];
|
|
200
|
+
component: any;
|
|
201
|
+
args: {
|
|
202
|
+
size: string;
|
|
203
|
+
orientation: string;
|
|
204
|
+
disabled: boolean;
|
|
205
|
+
hasDivider: boolean;
|
|
206
|
+
hasAction: boolean;
|
|
207
|
+
helperText: string;
|
|
208
|
+
itemQuantity: number;
|
|
209
|
+
stretch: boolean;
|
|
210
|
+
width: string;
|
|
211
|
+
height: string;
|
|
212
|
+
maxItemWidth: string;
|
|
213
|
+
dividerAlign: string;
|
|
214
|
+
};
|
|
215
|
+
argTypes: {
|
|
216
|
+
orientation: {
|
|
217
|
+
options: string[];
|
|
218
|
+
control: {
|
|
219
|
+
type: string;
|
|
220
|
+
};
|
|
221
|
+
table: {
|
|
222
|
+
category: string;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
size: {
|
|
226
|
+
options: string[];
|
|
227
|
+
control: {
|
|
228
|
+
type: string;
|
|
229
|
+
};
|
|
230
|
+
table: {
|
|
231
|
+
category: string;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
disabled: {
|
|
235
|
+
control: {
|
|
236
|
+
type: string;
|
|
237
|
+
};
|
|
238
|
+
table: {
|
|
239
|
+
category: string;
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
hasDivider: {
|
|
243
|
+
control: {
|
|
244
|
+
type: string;
|
|
245
|
+
};
|
|
246
|
+
table: {
|
|
247
|
+
category: string;
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
hasAction: {
|
|
251
|
+
control: {
|
|
252
|
+
type: string;
|
|
253
|
+
};
|
|
254
|
+
table: {
|
|
255
|
+
category: string;
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
helperText: {
|
|
259
|
+
control: {
|
|
260
|
+
type: string;
|
|
261
|
+
};
|
|
262
|
+
table: {
|
|
263
|
+
category: string;
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
itemQuantity: {
|
|
267
|
+
control: {
|
|
268
|
+
type: string;
|
|
269
|
+
};
|
|
270
|
+
table: {
|
|
271
|
+
category: string;
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
stretch: {
|
|
275
|
+
control: {
|
|
276
|
+
type: string;
|
|
277
|
+
};
|
|
278
|
+
if: {
|
|
279
|
+
arg: string;
|
|
280
|
+
eq: string;
|
|
281
|
+
};
|
|
282
|
+
table: {
|
|
283
|
+
category: string;
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
maxItemWidth: {
|
|
287
|
+
control: {
|
|
288
|
+
type: string;
|
|
289
|
+
};
|
|
290
|
+
if: {
|
|
291
|
+
arg: string;
|
|
292
|
+
truthy: boolean;
|
|
293
|
+
};
|
|
294
|
+
table: {
|
|
295
|
+
category: string;
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
clip: {
|
|
299
|
+
options: string[];
|
|
300
|
+
control: {
|
|
301
|
+
type: string;
|
|
302
|
+
};
|
|
303
|
+
if: {
|
|
304
|
+
arg: string;
|
|
305
|
+
truthy: boolean;
|
|
306
|
+
};
|
|
307
|
+
table: {
|
|
308
|
+
category: string;
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
width: {
|
|
312
|
+
control: {
|
|
313
|
+
type: string;
|
|
314
|
+
};
|
|
315
|
+
if: {
|
|
316
|
+
arg: string;
|
|
317
|
+
eq: string;
|
|
318
|
+
};
|
|
319
|
+
table: {
|
|
320
|
+
category: string;
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
height: {
|
|
324
|
+
control: {
|
|
325
|
+
type: string;
|
|
326
|
+
};
|
|
327
|
+
if: {
|
|
328
|
+
arg: string;
|
|
329
|
+
eq: string;
|
|
330
|
+
};
|
|
331
|
+
table: {
|
|
332
|
+
category: string;
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
contentLeft: {
|
|
336
|
+
options: string[];
|
|
337
|
+
control: {
|
|
338
|
+
type: string;
|
|
339
|
+
};
|
|
340
|
+
table: {
|
|
341
|
+
category: string;
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
contentRight: {
|
|
345
|
+
options: string[];
|
|
346
|
+
control: {
|
|
347
|
+
type: string;
|
|
348
|
+
};
|
|
349
|
+
if: {
|
|
350
|
+
arg: string;
|
|
351
|
+
eq: string;
|
|
352
|
+
};
|
|
353
|
+
table: {
|
|
354
|
+
category: string;
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
dividerAlign: {
|
|
358
|
+
options: string[];
|
|
359
|
+
control: {
|
|
360
|
+
type: string;
|
|
361
|
+
};
|
|
362
|
+
if: {
|
|
363
|
+
arg: string;
|
|
364
|
+
eq: string;
|
|
365
|
+
};
|
|
366
|
+
table: {
|
|
367
|
+
category: string;
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
Default: {
|
|
373
|
+
render: (args: any) => JSX.Element;
|
|
374
|
+
};
|
|
375
|
+
HeaderTabs: {
|
|
376
|
+
args: {
|
|
377
|
+
size: string;
|
|
378
|
+
disabled: boolean;
|
|
379
|
+
hasAction: boolean;
|
|
380
|
+
helperText: string;
|
|
381
|
+
itemQuantity: number;
|
|
382
|
+
width: string;
|
|
383
|
+
maxItemWidth: string;
|
|
384
|
+
};
|
|
385
|
+
argTypes: {
|
|
386
|
+
clip: {
|
|
387
|
+
options: string[];
|
|
388
|
+
control: {
|
|
389
|
+
type: string;
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
width: {
|
|
393
|
+
control: {
|
|
394
|
+
type: string;
|
|
395
|
+
};
|
|
396
|
+
if: {
|
|
397
|
+
arg: string;
|
|
398
|
+
eq: string;
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
stretch: {
|
|
402
|
+
table: {
|
|
403
|
+
disable: boolean;
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
contentLeft: {
|
|
407
|
+
table: {
|
|
408
|
+
disable: boolean;
|
|
409
|
+
};
|
|
410
|
+
};
|
|
411
|
+
contentRight: {
|
|
412
|
+
table: {
|
|
413
|
+
disable: boolean;
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
hasDivider: {
|
|
417
|
+
table: {
|
|
418
|
+
disable: boolean;
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
size: {
|
|
422
|
+
options: string[];
|
|
423
|
+
control: {
|
|
424
|
+
type: string;
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
render: (args: any) => JSX.Element;
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
export {};
|
|
@@ -0,0 +1,86 @@
|
|
|
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
|
+
import React from 'react';
|
|
24
|
+
import { getConfigVariations } from '../../helpers';
|
|
25
|
+
import { createMeta } from './meta';
|
|
26
|
+
import { createDefaultStory, createHeaderStory } from './stories';
|
|
27
|
+
import { headerClips, splitSizes } from './fixtures';
|
|
28
|
+
export var getTabsStories = function (config) {
|
|
29
|
+
var component = config.component, tabItemComponent = config.tabItemComponent, iconTabItemComponent = config.iconTabItemComponent, dropdownComponent = config.dropdownComponent, counterComponent = config.counterComponent, componentConfig = config.componentConfig, rest = __rest(config, ["component", "tabItemComponent", "iconTabItemComponent", "dropdownComponent", "counterComponent", "componentConfig"]);
|
|
30
|
+
var meta = createMeta(__assign({ component: component, componentConfig: componentConfig }, rest));
|
|
31
|
+
var DefaultStoryComponent = createDefaultStory({
|
|
32
|
+
Tabs: component,
|
|
33
|
+
TabItem: tabItemComponent,
|
|
34
|
+
IconTabItem: iconTabItemComponent,
|
|
35
|
+
Dropdown: dropdownComponent,
|
|
36
|
+
CounterComponent: counterComponent,
|
|
37
|
+
});
|
|
38
|
+
var Default = {
|
|
39
|
+
render: function (args) { return React.createElement(DefaultStoryComponent, __assign({}, args)); },
|
|
40
|
+
};
|
|
41
|
+
var headerSizes = splitSizes(getConfigVariations(componentConfig.horizontal).sizes).headerSizes;
|
|
42
|
+
if (headerSizes.length === 0) {
|
|
43
|
+
return { meta: meta, Default: Default };
|
|
44
|
+
}
|
|
45
|
+
var HeaderStoryComponent = createHeaderStory({ Tabs: component, TabItem: tabItemComponent });
|
|
46
|
+
var HeaderTabs = {
|
|
47
|
+
args: {
|
|
48
|
+
size: headerSizes.includes('h5') ? 'h5' : headerSizes[0],
|
|
49
|
+
disabled: false,
|
|
50
|
+
hasAction: false,
|
|
51
|
+
helperText: '',
|
|
52
|
+
itemQuantity: 4,
|
|
53
|
+
width: '12rem',
|
|
54
|
+
maxItemWidth: '',
|
|
55
|
+
},
|
|
56
|
+
argTypes: {
|
|
57
|
+
clip: {
|
|
58
|
+
options: headerClips,
|
|
59
|
+
control: { type: 'select' },
|
|
60
|
+
},
|
|
61
|
+
width: {
|
|
62
|
+
control: { type: 'text' },
|
|
63
|
+
if: { arg: 'clip', eq: 'scroll' },
|
|
64
|
+
},
|
|
65
|
+
stretch: {
|
|
66
|
+
table: { disable: true },
|
|
67
|
+
},
|
|
68
|
+
contentLeft: {
|
|
69
|
+
table: { disable: true },
|
|
70
|
+
},
|
|
71
|
+
contentRight: {
|
|
72
|
+
table: { disable: true },
|
|
73
|
+
},
|
|
74
|
+
hasDivider: {
|
|
75
|
+
table: { disable: true },
|
|
76
|
+
},
|
|
77
|
+
size: {
|
|
78
|
+
options: headerSizes,
|
|
79
|
+
control: { type: 'select' },
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
render: function (args) { return React.createElement(HeaderStoryComponent, __assign({}, args)); },
|
|
83
|
+
};
|
|
84
|
+
return { meta: meta, Default: Default, HeaderTabs: HeaderTabs };
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=Tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAerD,MAAM,CAAC,IAAM,cAAc,GAAG,UAAC,MAA8B;IAErD,IAAA,SAAS,GAOT,MAAM,UAPG,EACT,gBAAgB,GAMhB,MAAM,iBANU,EAChB,oBAAoB,GAKpB,MAAM,qBALc,EACpB,iBAAiB,G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E;gBACF,OAAO,EAAE,WAAW;gBACpB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aAC9B;YACD,KAAK,EAAE;gBACH,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;gBACzB,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE;aACpC;YACD,OAAO,EAAE;gBACL,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;aAC3B;YACD,WAAW,EAAE;gBACT,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;aAC3B;YACD,YAAY,EAAE;gBACV,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;aAC3B;YACD,UAAU,EAAE;gBACR,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;aAC3B;YACD,IAAI,EAAE;gBACF,OAAO,EAAE,WAAW;gBACpB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aAC9B;SACJ;QACD,MAAM,EAAE,UAAC,IAAS,IAAK,OAAA,oBAAC,oBAAoB,eAAK,IAAI,EAAI,EAAlC,CAAkC;KAC5D,CAAC;IAEF,OAAO,EAAE,IAAI,MAAA,EAAE,OAAO,SAAA,EAAE,UAAU,YAAA,EAAE,CAAC;AACzC,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
export declare const orientations: string[];
|
|
3
|
+
export declare const clips: string[];
|
|
4
|
+
export declare const headerClips: string[];
|
|
5
|
+
export declare const contentLeftOptions: string[];
|
|
6
|
+
export declare const contentRightOptions: string[];
|
|
7
|
+
export declare const dividerAligns: string[];
|
|
8
|
+
export declare const labels: string[];
|
|
9
|
+
export declare const splitSizes: (sizes: string[]) => {
|
|
10
|
+
regularSizes: string[];
|
|
11
|
+
headerSizes: string[];
|
|
12
|
+
};
|
|
13
|
+
export declare const getIconSizeStyle: (size: string) => CSSProperties;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export var orientations = ['horizontal', 'vertical'];
|
|
2
|
+
export var clips = ['none', 'scroll', 'showAll'];
|
|
3
|
+
export var headerClips = ['none', 'scroll'];
|
|
4
|
+
export var contentLeftOptions = ['none', 'icon'];
|
|
5
|
+
export var contentRightOptions = ['none', 'counter', 'icon'];
|
|
6
|
+
export var dividerAligns = ['left', 'right'];
|
|
7
|
+
export var labels = ['Label', 'Middle label', 'Disabled', 'Very long label'];
|
|
8
|
+
var isHeaderSize = function (size) { return /^h[1-6]$/.test(size); };
|
|
9
|
+
export var splitSizes = function (sizes) { return ({
|
|
10
|
+
regularSizes: sizes.filter(function (size) { return !isHeaderSize(size); }),
|
|
11
|
+
headerSizes: sizes.filter(isHeaderSize),
|
|
12
|
+
}); };
|
|
13
|
+
export var getIconSizeStyle = function (size) {
|
|
14
|
+
var sizeCustomValue = function () {
|
|
15
|
+
switch (size) {
|
|
16
|
+
case 'h1':
|
|
17
|
+
return '3.5rem';
|
|
18
|
+
case 'h2':
|
|
19
|
+
return '2.25rem';
|
|
20
|
+
case 'h3':
|
|
21
|
+
return '1.875rem';
|
|
22
|
+
case 'h4':
|
|
23
|
+
return '1.625rem';
|
|
24
|
+
case 'xs':
|
|
25
|
+
return '1rem';
|
|
26
|
+
default:
|
|
27
|
+
return '1.5rem';
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
return { '--icon-size': sizeCustomValue() };
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../../src/components/Tabs/fixtures.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,IAAM,YAAY,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;AACvD,MAAM,CAAC,IAAM,KAAK,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AACnD,MAAM,CAAC,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