@salutejs/plasma-sb-utils 0.229.0-next-sbcom.0 → 0.229.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 (86) hide show
  1. package/lib/components/Combobox/Combobox.d.ts +11 -0
  2. package/lib/components/Combobox/Combobox.js.map +1 -1
  3. package/lib/components/Combobox/meta.d.ts +10 -0
  4. package/lib/components/Combobox/meta.js +6 -2
  5. package/lib/components/Combobox/meta.js.map +1 -1
  6. package/lib/components/DateTimePicker/meta.js +2 -2
  7. package/lib/components/DateTimePicker/meta.js.map +1 -1
  8. package/lib/components/DateTimePicker/stories.js +8 -1
  9. package/lib/components/DateTimePicker/stories.js.map +1 -1
  10. package/lib/components/EmbeddedButton/EmbeddedButton.d.ts +89 -0
  11. package/lib/components/EmbeddedButton/EmbeddedButton.js +40 -0
  12. package/lib/components/EmbeddedButton/EmbeddedButton.js.map +1 -0
  13. package/lib/components/EmbeddedButton/fixtures.d.ts +1 -0
  14. package/lib/components/EmbeddedButton/fixtures.js +12 -0
  15. package/lib/components/EmbeddedButton/fixtures.js.map +1 -0
  16. package/lib/components/EmbeddedButton/index.d.ts +1 -0
  17. package/lib/components/EmbeddedButton/index.js +2 -0
  18. package/lib/components/EmbeddedButton/index.js.map +1 -0
  19. package/lib/components/EmbeddedButton/meta.d.ts +84 -0
  20. package/lib/components/EmbeddedButton/meta.js +65 -0
  21. package/lib/components/EmbeddedButton/meta.js.map +1 -0
  22. package/lib/components/EmbeddedButton/stories.d.ts +1 -0
  23. package/lib/components/EmbeddedButton/stories.js +43 -0
  24. package/lib/components/EmbeddedButton/stories.js.map +1 -0
  25. package/lib/components/Note/Note.d.ts +22 -0
  26. package/lib/components/Note/Note.js +2 -2
  27. package/lib/components/Note/Note.js.map +1 -1
  28. package/lib/components/Note/fixtures.d.ts +1 -0
  29. package/lib/components/Note/fixtures.js +1 -0
  30. package/lib/components/Note/fixtures.js.map +1 -1
  31. package/lib/components/Note/meta.d.ts +19 -0
  32. package/lib/components/Note/meta.js +9 -2
  33. package/lib/components/Note/meta.js.map +1 -1
  34. package/lib/components/Note/stories.d.ts +1 -1
  35. package/lib/components/Note/stories.js +4 -3
  36. package/lib/components/Note/stories.js.map +1 -1
  37. package/lib/components/Pagination/Pagination.d.ts +26 -0
  38. package/lib/components/Pagination/meta.d.ts +26 -0
  39. package/lib/components/Pagination/meta.js +9 -1
  40. package/lib/components/Pagination/meta.js.map +1 -1
  41. package/lib/components/Select/Select.d.ts +1 -0
  42. package/lib/components/Select/Select.js.map +1 -1
  43. package/lib/components/Slider/Slider.d.ts +38 -0
  44. package/lib/components/Slider/fixtures.d.ts +2 -0
  45. package/lib/components/Slider/fixtures.js +2 -0
  46. package/lib/components/Slider/fixtures.js.map +1 -1
  47. package/lib/components/Slider/meta.d.ts +38 -0
  48. package/lib/components/Slider/meta.js +32 -4
  49. package/lib/components/Slider/meta.js.map +1 -1
  50. package/lib/components/Slider/stories.d.ts +1 -1
  51. package/lib/components/Slider/stories.js +6 -2
  52. package/lib/components/Slider/stories.js.map +1 -1
  53. package/lib/components/Steps/Steps.d.ts +186 -0
  54. package/lib/components/Steps/Steps.js +41 -0
  55. package/lib/components/Steps/Steps.js.map +1 -0
  56. package/lib/components/Steps/fixtures.d.ts +6 -0
  57. package/lib/components/Steps/fixtures.js +7 -0
  58. package/lib/components/Steps/fixtures.js.map +1 -0
  59. package/lib/components/Steps/index.d.ts +1 -0
  60. package/lib/components/Steps/index.js +2 -0
  61. package/lib/components/Steps/index.js.map +1 -0
  62. package/lib/components/Steps/meta.d.ts +178 -0
  63. package/lib/components/Steps/meta.js +95 -0
  64. package/lib/components/Steps/meta.js.map +1 -0
  65. package/lib/components/Steps/stories.d.ts +1 -0
  66. package/lib/components/Steps/stories.js +96 -0
  67. package/lib/components/Steps/stories.js.map +1 -0
  68. package/lib/components/TextArea/meta.js +0 -2
  69. package/lib/components/TextArea/meta.js.map +1 -1
  70. package/lib/components/TextField/TextField.d.ts +0 -7
  71. package/lib/components/TextField/TextField.js +0 -1
  72. package/lib/components/TextField/TextField.js.map +1 -1
  73. package/lib/components/TextField/meta.d.ts +0 -6
  74. package/lib/components/TextField/meta.js +1 -3
  75. package/lib/components/TextField/meta.js.map +1 -1
  76. package/lib/components/TimePicker/TimePicker.d.ts +18 -0
  77. package/lib/components/TimePicker/meta.d.ts +18 -0
  78. package/lib/components/TimePicker/meta.js +7 -1
  79. package/lib/components/TimePicker/meta.js.map +1 -1
  80. package/lib/components/TimePicker/stories.d.ts +1 -1
  81. package/lib/components/TimePicker/stories.js +2 -2
  82. package/lib/components/TimePicker/stories.js.map +1 -1
  83. package/lib/components/index.d.ts +2 -0
  84. package/lib/components/index.js +2 -0
  85. package/lib/components/index.js.map +1 -1
  86. package/package.json +4 -4
@@ -0,0 +1,186 @@
1
+ type CreateStepsStoriesProps = {
2
+ component: any;
3
+ componentConfig: {
4
+ stepsConfig: any;
5
+ stepItemConfig: any;
6
+ };
7
+ title?: string;
8
+ disablePropsList?: string[];
9
+ defaultArgs?: {};
10
+ additionalArgTypes?: {};
11
+ };
12
+ export declare const getStepsStories: (config: CreateStepsStoriesProps) => {
13
+ meta: {
14
+ title: string;
15
+ decorators: import("@storybook/react").Decorator[];
16
+ component: any;
17
+ parameters: {
18
+ controls: {
19
+ disableSaveFromUI: boolean;
20
+ };
21
+ };
22
+ args: {
23
+ view: string;
24
+ itemView: string;
25
+ size: string;
26
+ maxWidth: string;
27
+ quantity: number;
28
+ title: string;
29
+ content: string;
30
+ contentAlign: string;
31
+ indicatorType: string;
32
+ orientation: string;
33
+ hasLine: boolean;
34
+ hasContent: string;
35
+ disabled: boolean;
36
+ loading: boolean;
37
+ simple: boolean;
38
+ applyCustomCompletedItemView: boolean;
39
+ };
40
+ argTypes: {
41
+ view: {
42
+ options: any;
43
+ control: {
44
+ type: string;
45
+ };
46
+ table: {
47
+ category: string;
48
+ };
49
+ };
50
+ itemView: {
51
+ options: string[];
52
+ control: {
53
+ type: string;
54
+ };
55
+ table: {
56
+ category: string;
57
+ };
58
+ };
59
+ applyCustomCompletedItemView: {
60
+ control: {
61
+ type: string;
62
+ };
63
+ table: {
64
+ category: string;
65
+ };
66
+ };
67
+ size: {
68
+ options: any;
69
+ control: {
70
+ type: string;
71
+ };
72
+ table: {
73
+ category: string;
74
+ };
75
+ };
76
+ disabled: {
77
+ control: {
78
+ type: string;
79
+ };
80
+ table: {
81
+ category: string;
82
+ };
83
+ };
84
+ loading: {
85
+ control: {
86
+ type: string;
87
+ };
88
+ table: {
89
+ category: string;
90
+ };
91
+ };
92
+ orientation: {
93
+ options: string[];
94
+ control: {
95
+ type: string;
96
+ };
97
+ table: {
98
+ category: string;
99
+ };
100
+ };
101
+ contentAlign: {
102
+ options: string[];
103
+ control: {
104
+ type: string;
105
+ };
106
+ if: {
107
+ arg: string;
108
+ eq: string;
109
+ };
110
+ table: {
111
+ category: string;
112
+ };
113
+ };
114
+ hasLine: {
115
+ control: {
116
+ type: string;
117
+ };
118
+ table: {
119
+ category: string;
120
+ };
121
+ };
122
+ maxWidth: {
123
+ control: {
124
+ type: string;
125
+ };
126
+ table: {
127
+ category: string;
128
+ };
129
+ };
130
+ quantity: {
131
+ control: {
132
+ type: string;
133
+ };
134
+ table: {
135
+ category: string;
136
+ };
137
+ };
138
+ title: {
139
+ control: {
140
+ type: string;
141
+ };
142
+ table: {
143
+ category: string;
144
+ };
145
+ };
146
+ content: {
147
+ control: {
148
+ type: string;
149
+ };
150
+ table: {
151
+ category: string;
152
+ };
153
+ };
154
+ indicatorType: {
155
+ options: string[];
156
+ control: {
157
+ type: string;
158
+ };
159
+ table: {
160
+ category: string;
161
+ };
162
+ };
163
+ hasContent: {
164
+ options: string[];
165
+ control: {
166
+ type: string;
167
+ };
168
+ table: {
169
+ category: string;
170
+ };
171
+ };
172
+ simple: {
173
+ control: {
174
+ type: string;
175
+ };
176
+ table: {
177
+ category: string;
178
+ };
179
+ };
180
+ };
181
+ };
182
+ Default: {
183
+ render: (args: any) => JSX.Element;
184
+ };
185
+ };
186
+ export {};
@@ -0,0 +1,41 @@
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 } from './stories';
27
+ export var getStepsStories = function (config) {
28
+ var component = config.component, componentConfig = config.componentConfig, rest = __rest(config, ["component", "componentConfig"]);
29
+ var stepsConfig = getConfigVariations(componentConfig.stepsConfig);
30
+ var stepItemConfig = getConfigVariations(componentConfig.stepItemConfig);
31
+ var meta = createMeta(__assign({ component: component, componentConfig: stepsConfig }, rest));
32
+ var DefaultStoryComponent = createDefaultStory(component, stepItemConfig.views);
33
+ var Default = {
34
+ render: function (args) { return React.createElement(DefaultStoryComponent, __assign({}, args)); },
35
+ };
36
+ return {
37
+ meta: meta,
38
+ Default: Default,
39
+ };
40
+ };
41
+ //# sourceMappingURL=Steps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Steps.js","sourceRoot":"","sources":["../../../src/components/Steps/Steps.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,MAAM,WAAW,CAAC;AAW/C,MAAM,CAAC,IAAM,eAAe,GAAG,UAAC,MAA+B;IACnD,IAAA,SAAS,GAA+B,MAAM,UAArC,EAAE,eAAe,GAAc,MAAM,gBAApB,EAAK,IAAI,UAAK,MAAM,EAAhD,gCAAuC,CAAF,CAAY;IAEvD,IAAM,WAAW,GAAG,mBAAmB,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;IACrE,IAAM,cAAc,GAAG,mBAAmB,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;IAE3E,IAAM,IAAI,GAAG,UAAU,YACnB,SAAS,WAAA,EACT,eAAe,EAAE,WAAW,IACzB,IAAI,EACT,CAAC;IAEH,IAAM,qBAAqB,GAAG,kBAAkB,CAAC,SAAS,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;IAElF,IAAM,OAAO,GAAG;QACZ,MAAM,EAAE,UAAC,IAAS,IAAK,OAAA,oBAAC,qBAAqB,eAAK,IAAI,EAAI,EAAnC,CAAmC;KAC7D,CAAC;IAEF,OAAO;QACH,IAAI,MAAA;QACJ,OAAO,SAAA;KACV,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const itemViews: string[];
2
+ export declare const completedItemViews: string[];
3
+ export declare const orientations: string[];
4
+ export declare const contentAligns: string[];
5
+ export declare const indicatorTypes: string[];
6
+ export declare const hasContentOptions: string[];
@@ -0,0 +1,7 @@
1
+ export var itemViews = ['default', 'negative', 'warning', 'positive'];
2
+ export var completedItemViews = ['default', 'negative', 'warning', 'positive'];
3
+ export var orientations = ['horizontal', 'vertical'];
4
+ export var contentAligns = ['left', 'center'];
5
+ export var indicatorTypes = ['numbered', 'bullet', 'icon'];
6
+ export var hasContentOptions = ['all', 'active', 'none'];
7
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../../src/components/Steps/fixtures.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,SAAS,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AACxE,MAAM,CAAC,IAAM,kBAAkB,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AACjF,MAAM,CAAC,IAAM,YAAY,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;AACvD,MAAM,CAAC,IAAM,aAAa,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAChD,MAAM,CAAC,IAAM,cAAc,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC7D,MAAM,CAAC,IAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './Steps';
@@ -0,0 +1,2 @@
1
+ export * from './Steps';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Steps/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
@@ -0,0 +1,178 @@
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
+ parameters: {
14
+ controls: {
15
+ disableSaveFromUI: boolean;
16
+ };
17
+ };
18
+ args: {
19
+ view: string;
20
+ itemView: string;
21
+ size: string;
22
+ maxWidth: string;
23
+ quantity: number;
24
+ title: string;
25
+ content: string;
26
+ contentAlign: string;
27
+ indicatorType: string;
28
+ orientation: string;
29
+ hasLine: boolean;
30
+ hasContent: string;
31
+ disabled: boolean;
32
+ loading: boolean;
33
+ simple: boolean;
34
+ applyCustomCompletedItemView: boolean;
35
+ };
36
+ argTypes: {
37
+ view: {
38
+ options: any;
39
+ control: {
40
+ type: string;
41
+ };
42
+ table: {
43
+ category: string;
44
+ };
45
+ };
46
+ itemView: {
47
+ options: string[];
48
+ control: {
49
+ type: string;
50
+ };
51
+ table: {
52
+ category: string;
53
+ };
54
+ };
55
+ applyCustomCompletedItemView: {
56
+ control: {
57
+ type: string;
58
+ };
59
+ table: {
60
+ category: string;
61
+ };
62
+ };
63
+ size: {
64
+ options: any;
65
+ control: {
66
+ type: string;
67
+ };
68
+ table: {
69
+ category: string;
70
+ };
71
+ };
72
+ disabled: {
73
+ control: {
74
+ type: string;
75
+ };
76
+ table: {
77
+ category: string;
78
+ };
79
+ };
80
+ loading: {
81
+ control: {
82
+ type: string;
83
+ };
84
+ table: {
85
+ category: string;
86
+ };
87
+ };
88
+ orientation: {
89
+ options: string[];
90
+ control: {
91
+ type: string;
92
+ };
93
+ table: {
94
+ category: string;
95
+ };
96
+ };
97
+ contentAlign: {
98
+ options: string[];
99
+ control: {
100
+ type: string;
101
+ };
102
+ if: {
103
+ arg: string;
104
+ eq: string;
105
+ };
106
+ table: {
107
+ category: string;
108
+ };
109
+ };
110
+ hasLine: {
111
+ control: {
112
+ type: string;
113
+ };
114
+ table: {
115
+ category: string;
116
+ };
117
+ };
118
+ maxWidth: {
119
+ control: {
120
+ type: string;
121
+ };
122
+ table: {
123
+ category: string;
124
+ };
125
+ };
126
+ quantity: {
127
+ control: {
128
+ type: string;
129
+ };
130
+ table: {
131
+ category: string;
132
+ };
133
+ };
134
+ title: {
135
+ control: {
136
+ type: string;
137
+ };
138
+ table: {
139
+ category: string;
140
+ };
141
+ };
142
+ content: {
143
+ control: {
144
+ type: string;
145
+ };
146
+ table: {
147
+ category: string;
148
+ };
149
+ };
150
+ indicatorType: {
151
+ options: string[];
152
+ control: {
153
+ type: string;
154
+ };
155
+ table: {
156
+ category: string;
157
+ };
158
+ };
159
+ hasContent: {
160
+ options: string[];
161
+ control: {
162
+ type: string;
163
+ };
164
+ table: {
165
+ category: string;
166
+ };
167
+ };
168
+ simple: {
169
+ control: {
170
+ type: string;
171
+ };
172
+ table: {
173
+ category: string;
174
+ };
175
+ };
176
+ };
177
+ };
178
+ export {};
@@ -0,0 +1,95 @@
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 { itemViews, orientations, contentAligns, indicatorTypes, hasContentOptions } from './fixtures';
23
+ var commonDisabledArgs = ['items', 'onChange', 'hasLoader'];
24
+ export var createMeta = function (_a) {
25
+ var component = _a.component, componentConfig = _a.componentConfig, _b = _a.title, title = _b === void 0 ? 'Navigation/Steps' : _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;
26
+ return {
27
+ title: title,
28
+ decorators: [InSpacingDecorator],
29
+ component: component,
30
+ parameters: {
31
+ controls: {
32
+ disableSaveFromUI: true,
33
+ },
34
+ },
35
+ args: __assign({ view: 'default', itemView: 'default', size: 'm', maxWidth: '100%', quantity: 6, title: 'Title', content: 'Content', contentAlign: 'left', indicatorType: 'numbered', orientation: 'horizontal', hasLine: true, hasContent: 'all', disabled: false, loading: false, simple: false, applyCustomCompletedItemView: false }, defaultArgs),
36
+ argTypes: __assign(__assign({ view: {
37
+ options: componentConfig.views,
38
+ control: { type: 'select' },
39
+ table: { category: 'variation' },
40
+ }, itemView: {
41
+ options: itemViews,
42
+ control: { type: 'select' },
43
+ table: { category: 'variation' },
44
+ }, applyCustomCompletedItemView: {
45
+ control: { type: 'boolean' },
46
+ table: { category: 'variation' },
47
+ }, size: {
48
+ options: componentConfig.sizes,
49
+ control: { type: 'select' },
50
+ table: { category: 'variation' },
51
+ }, disabled: {
52
+ control: { type: 'boolean' },
53
+ table: { category: 'variation' },
54
+ }, loading: {
55
+ control: { type: 'boolean' },
56
+ table: { category: 'variation' },
57
+ }, orientation: {
58
+ options: orientations,
59
+ control: { type: 'select' },
60
+ table: { category: 'layout' },
61
+ }, contentAlign: {
62
+ options: contentAligns,
63
+ control: { type: 'select' },
64
+ if: { arg: 'orientation', eq: 'horizontal' },
65
+ table: { category: 'layout' },
66
+ }, hasLine: {
67
+ control: { type: 'boolean' },
68
+ table: { category: 'layout' },
69
+ }, maxWidth: {
70
+ control: { type: 'text' },
71
+ table: { category: 'layout' },
72
+ }, quantity: {
73
+ control: { type: 'number' },
74
+ table: { category: 'content' },
75
+ }, title: {
76
+ control: { type: 'text' },
77
+ table: { category: 'content' },
78
+ }, content: {
79
+ control: { type: 'text' },
80
+ table: { category: 'content' },
81
+ }, indicatorType: {
82
+ options: indicatorTypes,
83
+ control: { type: 'select' },
84
+ table: { category: 'content' },
85
+ }, hasContent: {
86
+ options: hasContentOptions,
87
+ control: { type: 'select' },
88
+ table: { category: 'content' },
89
+ }, simple: {
90
+ control: { type: 'boolean' },
91
+ table: { category: 'content' },
92
+ } }, additionalArgTypes), disableProps(__spreadArray(__spreadArray([], commonDisabledArgs, true), disablePropsList, true))),
93
+ };
94
+ };
95
+ //# sourceMappingURL=meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/components/Steps/meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAWvG,IAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;AAE9D,MAAM,CAAC,IAAM,UAAU,GAAG,UAAC,EAOT;QANd,SAAS,eAAA,EACT,eAAe,qBAAA,EACf,aAA0B,EAA1B,KAAK,mBAAG,kBAAkB,KAAA,EAC1B,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,UAAU,EAAE;YACR,QAAQ,EAAE;gBACN,iBAAiB,EAAE,IAAI;aAC1B;SACJ;QACD,IAAI,aACA,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,SAAS,EACnB,IAAI,EAAE,GAAG,EACT,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,CAAC,EACX,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,SAAS,EAClB,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,UAAU,EACzB,WAAW,EAAE,YAAY,EACzB,OAAO,EAAE,IAAI,EACb,UAAU,EAAE,KAAK,EACjB,QAAQ,EAAE,KAAK,EACf,OAAO,EAAE,KAAK,E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+ export declare const createDefaultStory: (Steps: any, stepItemViews: any) => ({ applyCustomCompletedItemView, maxWidth, title, content, size, indicatorType, quantity, hasContent, loading, disabled, simple, ...rest }: any) => JSX.Element;
@@ -0,0 +1,96 @@
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, useEffect } from 'react';
33
+ import { IconMic } from '@salutejs/plasma-icons';
34
+ var renderIndicator = function (_a) {
35
+ var status = _a.status, size = _a.size;
36
+ var iconSize;
37
+ if (size === 'xs' || size === 's') {
38
+ iconSize = 'xs';
39
+ }
40
+ else if (status === 'active') {
41
+ iconSize = 's';
42
+ }
43
+ else {
44
+ iconSize = 'xs';
45
+ }
46
+ return React.createElement(IconMic, { color: "inherit", size: iconSize });
47
+ };
48
+ export var createDefaultStory = function (Steps, stepItemViews) {
49
+ return function (_a) {
50
+ var applyCustomCompletedItemView = _a.applyCustomCompletedItemView, maxWidth = _a.maxWidth, title = _a.title, content = _a.content, size = _a.size, indicatorType = _a.indicatorType, quantity = _a.quantity, hasContent = _a.hasContent, loading = _a.loading, disabled = _a.disabled, simple = _a.simple, rest = __rest(_a, ["applyCustomCompletedItemView", "maxWidth", "title", "content", "size", "indicatorType", "quantity", "hasContent", "loading", "disabled", "simple"]);
51
+ var innerTitle = title || 'Title';
52
+ var _b = useState([]), items = _b[0], setItems = _b[1];
53
+ useEffect(function () {
54
+ var newItems = new Array(quantity).fill(null).map(function (_, index) {
55
+ var indicator = index + 1;
56
+ var status = index === 0 ? 'active' : 'inactive';
57
+ var completedItemView = applyCustomCompletedItemView && (index < stepItemViews.length ? stepItemViews[index] : 'default');
58
+ var viewTitle = applyCustomCompletedItemView ? "".concat(completedItemView, " view") : innerTitle;
59
+ if (simple) {
60
+ return { indicator: indicator, status: status, completedItemView: completedItemView };
61
+ }
62
+ return { title: viewTitle, content: content, indicator: indicator, status: status, completedItemView: completedItemView };
63
+ });
64
+ setItems(newItems);
65
+ }, [loading, applyCustomCompletedItemView, quantity, simple]);
66
+ useEffect(function () {
67
+ setItems(function (curItems) {
68
+ return curItems.map(function (item, index) {
69
+ if (indicatorType === 'numbered') {
70
+ return __assign(__assign({}, item), { indicator: index + 1 });
71
+ }
72
+ if (indicatorType === 'bullet') {
73
+ return __assign(__assign({}, item), { indicator: undefined });
74
+ }
75
+ if (indicatorType === 'icon') {
76
+ return __assign(__assign({}, item), { indicator: renderIndicator });
77
+ }
78
+ return item;
79
+ });
80
+ });
81
+ }, [indicatorType, content, simple]);
82
+ useEffect(function () {
83
+ setItems(function (curItems) { return curItems.map(function (item) { return (__assign(__assign({}, item), { disabled: disabled })); }); });
84
+ }, [disabled]);
85
+ var onChange = function (_item, index, prevIndex) {
86
+ if (prevIndex !== undefined) {
87
+ items[prevIndex].status = 'completed';
88
+ }
89
+ items[index].status = 'active';
90
+ setItems(__spreadArray([], items, true));
91
+ };
92
+ return (React.createElement("div", { style: { maxWidth: maxWidth, height: '600px' } },
93
+ React.createElement(Steps, __assign({ size: size, items: items, onChange: onChange, hasLoader: loading, hasContent: hasContent }, rest))));
94
+ };
95
+ };
96
+ //# sourceMappingURL=stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stories.js","sourceRoot":"","sources":["../../../src/components/Steps/stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,IAAM,eAAe,GAAG,UAAC,EAAkD;QAAhD,MAAM,YAAA,EAAE,IAAI,UAAA;IACnC,IAAI,QAAoB,CAAC;IACzB,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;QAChC,QAAQ,GAAG,IAAI,CAAC;IACpB,CAAC;SAAM,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC7B,QAAQ,GAAG,GAAG,CAAC;IACnB,CAAC;SAAM,CAAC;QACJ,QAAQ,GAAG,IAAI,CAAC;IACpB,CAAC;IAED,OAAO,oBAAC,OAAO,IAAC,KAAK,EAAC,SAAS,EAAC,IAAI,EAAE,QAAQ,GAAI,CAAC;AACvD,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,kBAAkB,GAAG,UAAC,KAAU,EAAE,aAAkB;IAC7D,OAAO,UAAC,EAaF;QAZF,IAAA,4BAA4B,kCAAA,EAC5B,QAAQ,cAAA,EACR,KAAK,WAAA,EACL,OAAO,aAAA,EACP,IAAI,UAAA,EACJ,aAAa,mBAAA,EACb,QAAQ,cAAA,EACR,UAAU,gBAAA,EACV,OAAO,aAAA,EACP,QAAQ,cAAA,EACR,MAAM,YAAA,EACH,IAAI,cAZH,oJAaP,CADU;QAEP,IAAM,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A,CACT,CAAC;IACN,CAAC,CAAC;AACN,CAAC,CAAC"}
@@ -165,7 +165,6 @@ export var createMeta = function (_a) {
165
165
  'helperBlock',
166
166
  'helperText',
167
167
  '$isFocused',
168
- 'focused',
169
168
  'contentRight',
170
169
  'autoComplete',
171
170
  'autoFocus',
@@ -183,7 +182,6 @@ export var createMeta = function (_a) {
183
182
  'onFocus',
184
183
  'onBlur',
185
184
  'leftHelperPlacement',
186
- 'rightHelperPlacement',
187
185
  'status',
188
186
  'hintTargetIcon',
189
187
  'hintOffset',