@salutejs/plasma-sb-utils 0.212.0-canary.2390.20364773479.0 → 0.212.0-canary.2397.20370453452.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/Range/Range.d.ts +210 -0
- package/lib/components/Range/Range.js +40 -0
- package/lib/components/Range/Range.js.map +1 -0
- package/lib/components/Range/fixtures.d.ts +8 -0
- package/lib/components/Range/fixtures.js +23 -0
- package/lib/components/Range/fixtures.js.map +1 -0
- package/lib/components/Range/index.d.ts +1 -0
- package/lib/components/Range/index.js +2 -0
- package/lib/components/Range/index.js.map +1 -0
- package/lib/components/Range/meta.d.ts +203 -0
- package/lib/components/Range/meta.js +150 -0
- package/lib/components/Range/meta.js.map +1 -0
- package/lib/components/Range/stories.d.ts +1 -0
- package/lib/components/Range/stories.js +68 -0
- package/lib/components/Range/stories.js.map +1 -0
- package/lib/components/TextField/meta.js +1 -1
- package/lib/components/TextField/meta.js.map +1 -1
- package/lib/components/index.d.ts +1 -1
- package/lib/components/index.js +1 -1
- package/package.json +3 -3
- package/lib/components/Table/Table.d.ts +0 -104
- package/lib/components/Table/Table.js +0 -82
- package/lib/components/Table/Table.js.map +0 -1
- package/lib/components/Table/index.d.ts +0 -1
- package/lib/components/Table/index.js +0 -2
- package/lib/components/Table/index.js.map +0 -1
- package/lib/components/Table/meta.d.ts +0 -49
- package/lib/components/Table/meta.js +0 -51
- package/lib/components/Table/meta.js.map +0 -1
- package/lib/components/Table/mock.d.ts +0 -20
- package/lib/components/Table/mock.js +0 -253
- package/lib/components/Table/mock.js.map +0 -1
- package/lib/components/Table/stories.d.ts +0 -5
- package/lib/components/Table/stories.js +0 -318
- package/lib/components/Table/stories.js.map +0 -1
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
type CreateStoriesProps = {
|
|
2
|
+
component: any;
|
|
3
|
+
componentConfig: any;
|
|
4
|
+
iconButton: any;
|
|
5
|
+
title?: string;
|
|
6
|
+
disablePropsList?: string[];
|
|
7
|
+
defaultArgs?: {};
|
|
8
|
+
additionalArgTypes?: {};
|
|
9
|
+
additionalComponents?: {};
|
|
10
|
+
};
|
|
11
|
+
export declare const getRangeStories: (config: CreateStoriesProps) => {
|
|
12
|
+
meta: {
|
|
13
|
+
title: string;
|
|
14
|
+
decorators: import("@storybook/react").Decorator[];
|
|
15
|
+
component: any;
|
|
16
|
+
args: {
|
|
17
|
+
appearance: string;
|
|
18
|
+
hasClearDivider: boolean;
|
|
19
|
+
size: string;
|
|
20
|
+
view: string;
|
|
21
|
+
label: string;
|
|
22
|
+
leftHelper: string;
|
|
23
|
+
titleCaption: string;
|
|
24
|
+
firstPlaceholder: string;
|
|
25
|
+
secondPlaceholder: string;
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
readOnly: boolean;
|
|
28
|
+
firstTextfieldTextBefore: string;
|
|
29
|
+
secondTextfieldTextBefore: string;
|
|
30
|
+
enableContentLeft: boolean;
|
|
31
|
+
enableContentRight: boolean;
|
|
32
|
+
dividerVariant: string;
|
|
33
|
+
enableFirstTextfieldContentLeft: boolean;
|
|
34
|
+
enableFirstTextfieldContentRight: boolean;
|
|
35
|
+
enableSecondTextfieldContentLeft: boolean;
|
|
36
|
+
enableSecondTextfieldContentRight: boolean;
|
|
37
|
+
firstValueSuccess: boolean;
|
|
38
|
+
secondValueSuccess: boolean;
|
|
39
|
+
firstValueError: boolean;
|
|
40
|
+
secondValueError: boolean;
|
|
41
|
+
required: boolean;
|
|
42
|
+
hasRequiredIndicator: boolean;
|
|
43
|
+
requiredIndicatorPlacement: string;
|
|
44
|
+
hasHint: boolean;
|
|
45
|
+
hintText: string;
|
|
46
|
+
hintTrigger: string;
|
|
47
|
+
hintView: string;
|
|
48
|
+
hintSize: string;
|
|
49
|
+
hintTargetPlacement: string;
|
|
50
|
+
hintPlacement: string;
|
|
51
|
+
hintWidth: string;
|
|
52
|
+
hintHasArrow: boolean;
|
|
53
|
+
};
|
|
54
|
+
argTypes: {
|
|
55
|
+
appearance: {
|
|
56
|
+
options: string[];
|
|
57
|
+
control: {
|
|
58
|
+
type: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
view: {
|
|
62
|
+
options: any;
|
|
63
|
+
control: {
|
|
64
|
+
type: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
size: {
|
|
68
|
+
options: any;
|
|
69
|
+
control: {
|
|
70
|
+
type: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
dividerVariant: {
|
|
74
|
+
options: string[];
|
|
75
|
+
control: {
|
|
76
|
+
type: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
hasClearDivider: {
|
|
80
|
+
control: {
|
|
81
|
+
type: string;
|
|
82
|
+
};
|
|
83
|
+
if: {
|
|
84
|
+
arg: string;
|
|
85
|
+
eq: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
requiredIndicatorPlacement: {
|
|
89
|
+
options: string[];
|
|
90
|
+
control: {
|
|
91
|
+
type: string;
|
|
92
|
+
};
|
|
93
|
+
if: {
|
|
94
|
+
arg: string;
|
|
95
|
+
truthy: boolean;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
required: {
|
|
99
|
+
control: {
|
|
100
|
+
type: string;
|
|
101
|
+
};
|
|
102
|
+
if: {
|
|
103
|
+
arg: string;
|
|
104
|
+
truthy: boolean;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
hasRequiredIndicator: {
|
|
108
|
+
control: {
|
|
109
|
+
type: string;
|
|
110
|
+
};
|
|
111
|
+
if: {
|
|
112
|
+
arg: string;
|
|
113
|
+
truthy: boolean;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
titleCaption: {
|
|
117
|
+
control: {
|
|
118
|
+
type: string;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
leftHelper: {
|
|
122
|
+
control: {
|
|
123
|
+
type: string;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
hintText: {
|
|
127
|
+
control: {
|
|
128
|
+
type: string;
|
|
129
|
+
};
|
|
130
|
+
if: {
|
|
131
|
+
arg: string;
|
|
132
|
+
truthy: boolean;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
hintView: {
|
|
136
|
+
options: string[];
|
|
137
|
+
control: {
|
|
138
|
+
type: string;
|
|
139
|
+
};
|
|
140
|
+
if: {
|
|
141
|
+
arg: string;
|
|
142
|
+
truthy: boolean;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
hintSize: {
|
|
146
|
+
options: string[];
|
|
147
|
+
control: {
|
|
148
|
+
type: string;
|
|
149
|
+
};
|
|
150
|
+
if: {
|
|
151
|
+
arg: string;
|
|
152
|
+
truthy: boolean;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
hintTargetPlacement: {
|
|
156
|
+
options: string[];
|
|
157
|
+
control: {
|
|
158
|
+
type: string;
|
|
159
|
+
};
|
|
160
|
+
if: {
|
|
161
|
+
arg: string;
|
|
162
|
+
truthy: boolean;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
hintTrigger: {
|
|
166
|
+
options: string[];
|
|
167
|
+
control: {
|
|
168
|
+
type: string;
|
|
169
|
+
};
|
|
170
|
+
if: {
|
|
171
|
+
arg: string;
|
|
172
|
+
truthy: boolean;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
hintPlacement: {
|
|
176
|
+
options: string[];
|
|
177
|
+
control: {
|
|
178
|
+
type: string;
|
|
179
|
+
};
|
|
180
|
+
if: {
|
|
181
|
+
arg: string;
|
|
182
|
+
truthy: boolean;
|
|
183
|
+
};
|
|
184
|
+
mappers: string[];
|
|
185
|
+
};
|
|
186
|
+
hintHasArrow: {
|
|
187
|
+
control: {
|
|
188
|
+
type: string;
|
|
189
|
+
};
|
|
190
|
+
if: {
|
|
191
|
+
arg: string;
|
|
192
|
+
truthy: boolean;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
hintWidth: {
|
|
196
|
+
control: {
|
|
197
|
+
type: string;
|
|
198
|
+
};
|
|
199
|
+
if: {
|
|
200
|
+
arg: string;
|
|
201
|
+
truthy: boolean;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
Default: {
|
|
207
|
+
render: (args: any) => JSX.Element;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
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 getRangeStories = function (config) {
|
|
28
|
+
var component = config.component, componentConfig = config.componentConfig, iconButton = config.iconButton, rest = __rest(config, ["component", "componentConfig", "iconButton"]);
|
|
29
|
+
var rangeConfig = getConfigVariations(componentConfig);
|
|
30
|
+
var meta = createMeta(__assign({ component: component, componentConfig: rangeConfig }, rest));
|
|
31
|
+
var DefaultStoryComponent = createDefaultStory(component, iconButton);
|
|
32
|
+
var Default = {
|
|
33
|
+
render: function (args) { return React.createElement(DefaultStoryComponent, __assign({}, args)); },
|
|
34
|
+
};
|
|
35
|
+
return {
|
|
36
|
+
meta: meta,
|
|
37
|
+
Default: Default,
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=Range.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Range.js","sourceRoot":"","sources":["../../../src/components/Range/Range.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;AAa/C,MAAM,CAAC,IAAM,eAAe,GAAG,UAAC,MAA0B;IAC9C,IAAA,SAAS,GAA2C,MAAM,UAAjD,EAAE,eAAe,GAA0B,MAAM,gBAAhC,EAAE,UAAU,GAAc,MAAM,WAApB,EAAK,IAAI,UAAK,MAAM,EAA5D,8CAAmD,CAAF,CAAY;IAEnE,IAAM,WAAW,GAAG,mBAAmB,CAAC,eAAe,CAAC,CAAC;IAEzD,IAAM,IAAI,GAAG,UAAU,YACnB,SAAS,WAAA,EACT,eAAe,EAAE,WAAW,IACzB,IAAI,EACT,CAAC;IAEH,IAAM,qBAAqB,GAAG,kBAAkB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAExE,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,8 @@
|
|
|
1
|
+
export declare const appearances: string[];
|
|
2
|
+
export declare const dividers: string[];
|
|
3
|
+
export declare const requiredPlacements: string[];
|
|
4
|
+
export declare const hintViews: string[];
|
|
5
|
+
export declare const hintSizes: string[];
|
|
6
|
+
export declare const hintTriggers: string[];
|
|
7
|
+
export declare const hintTargetPlacements: string[];
|
|
8
|
+
export declare const placements: string[];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export var appearances = ['default', 'clear'];
|
|
2
|
+
export var dividers = ['none', 'dash', 'icon'];
|
|
3
|
+
export var requiredPlacements = ['left', 'right'];
|
|
4
|
+
export var hintViews = ['default'];
|
|
5
|
+
export var hintSizes = ['m', 's'];
|
|
6
|
+
export var hintTriggers = ['hover', 'click'];
|
|
7
|
+
export var hintTargetPlacements = ['outer', 'inner'];
|
|
8
|
+
export var placements = [
|
|
9
|
+
'top',
|
|
10
|
+
'top-start',
|
|
11
|
+
'top-end',
|
|
12
|
+
'bottom',
|
|
13
|
+
'bottom-start',
|
|
14
|
+
'bottom-end',
|
|
15
|
+
'left',
|
|
16
|
+
'left-start',
|
|
17
|
+
'left-end',
|
|
18
|
+
'right',
|
|
19
|
+
'right-start',
|
|
20
|
+
'right-end',
|
|
21
|
+
'auto',
|
|
22
|
+
];
|
|
23
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../../src/components/Range/fixtures.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,WAAW,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAChD,MAAM,CAAC,IAAM,QAAQ,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACjD,MAAM,CAAC,IAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACpD,MAAM,CAAC,IAAM,SAAS,GAAG,CAAC,SAAS,CAAC,CAAC;AACrC,MAAM,CAAC,IAAM,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AACpC,MAAM,CAAC,IAAM,YAAY,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC/C,MAAM,CAAC,IAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACvD,MAAM,CAAC,IAAM,UAAU,GAAG;IACtB,KAAK;IACL,WAAW;IACX,SAAS;IAET,QAAQ;IACR,cAAc;IACd,YAAY;IAEZ,MAAM;IACN,YAAY;IACZ,UAAU;IAEV,OAAO;IACP,aAAa;IACb,WAAW;IAEX,MAAM;CACT,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Range';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Range/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,203 @@
|
|
|
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
|
+
appearance: string;
|
|
15
|
+
hasClearDivider: boolean;
|
|
16
|
+
size: string;
|
|
17
|
+
view: string;
|
|
18
|
+
label: string;
|
|
19
|
+
leftHelper: string;
|
|
20
|
+
titleCaption: string;
|
|
21
|
+
firstPlaceholder: string;
|
|
22
|
+
secondPlaceholder: string;
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
readOnly: boolean;
|
|
25
|
+
firstTextfieldTextBefore: string;
|
|
26
|
+
secondTextfieldTextBefore: string;
|
|
27
|
+
enableContentLeft: boolean;
|
|
28
|
+
enableContentRight: boolean;
|
|
29
|
+
dividerVariant: string;
|
|
30
|
+
enableFirstTextfieldContentLeft: boolean;
|
|
31
|
+
enableFirstTextfieldContentRight: boolean;
|
|
32
|
+
enableSecondTextfieldContentLeft: boolean;
|
|
33
|
+
enableSecondTextfieldContentRight: boolean;
|
|
34
|
+
firstValueSuccess: boolean;
|
|
35
|
+
secondValueSuccess: boolean;
|
|
36
|
+
firstValueError: boolean;
|
|
37
|
+
secondValueError: boolean;
|
|
38
|
+
required: boolean;
|
|
39
|
+
hasRequiredIndicator: boolean;
|
|
40
|
+
requiredIndicatorPlacement: string;
|
|
41
|
+
hasHint: boolean;
|
|
42
|
+
hintText: string;
|
|
43
|
+
hintTrigger: string;
|
|
44
|
+
hintView: string;
|
|
45
|
+
hintSize: string;
|
|
46
|
+
hintTargetPlacement: string;
|
|
47
|
+
hintPlacement: string;
|
|
48
|
+
hintWidth: string;
|
|
49
|
+
hintHasArrow: boolean;
|
|
50
|
+
};
|
|
51
|
+
argTypes: {
|
|
52
|
+
appearance: {
|
|
53
|
+
options: string[];
|
|
54
|
+
control: {
|
|
55
|
+
type: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
view: {
|
|
59
|
+
options: any;
|
|
60
|
+
control: {
|
|
61
|
+
type: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
size: {
|
|
65
|
+
options: any;
|
|
66
|
+
control: {
|
|
67
|
+
type: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
dividerVariant: {
|
|
71
|
+
options: string[];
|
|
72
|
+
control: {
|
|
73
|
+
type: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
hasClearDivider: {
|
|
77
|
+
control: {
|
|
78
|
+
type: string;
|
|
79
|
+
};
|
|
80
|
+
if: {
|
|
81
|
+
arg: string;
|
|
82
|
+
eq: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
requiredIndicatorPlacement: {
|
|
86
|
+
options: string[];
|
|
87
|
+
control: {
|
|
88
|
+
type: string;
|
|
89
|
+
};
|
|
90
|
+
if: {
|
|
91
|
+
arg: string;
|
|
92
|
+
truthy: boolean;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
required: {
|
|
96
|
+
control: {
|
|
97
|
+
type: string;
|
|
98
|
+
};
|
|
99
|
+
if: {
|
|
100
|
+
arg: string;
|
|
101
|
+
truthy: boolean;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
hasRequiredIndicator: {
|
|
105
|
+
control: {
|
|
106
|
+
type: string;
|
|
107
|
+
};
|
|
108
|
+
if: {
|
|
109
|
+
arg: string;
|
|
110
|
+
truthy: boolean;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
titleCaption: {
|
|
114
|
+
control: {
|
|
115
|
+
type: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
leftHelper: {
|
|
119
|
+
control: {
|
|
120
|
+
type: string;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
hintText: {
|
|
124
|
+
control: {
|
|
125
|
+
type: string;
|
|
126
|
+
};
|
|
127
|
+
if: {
|
|
128
|
+
arg: string;
|
|
129
|
+
truthy: boolean;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
hintView: {
|
|
133
|
+
options: string[];
|
|
134
|
+
control: {
|
|
135
|
+
type: string;
|
|
136
|
+
};
|
|
137
|
+
if: {
|
|
138
|
+
arg: string;
|
|
139
|
+
truthy: boolean;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
hintSize: {
|
|
143
|
+
options: string[];
|
|
144
|
+
control: {
|
|
145
|
+
type: string;
|
|
146
|
+
};
|
|
147
|
+
if: {
|
|
148
|
+
arg: string;
|
|
149
|
+
truthy: boolean;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
hintTargetPlacement: {
|
|
153
|
+
options: string[];
|
|
154
|
+
control: {
|
|
155
|
+
type: string;
|
|
156
|
+
};
|
|
157
|
+
if: {
|
|
158
|
+
arg: string;
|
|
159
|
+
truthy: boolean;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
hintTrigger: {
|
|
163
|
+
options: string[];
|
|
164
|
+
control: {
|
|
165
|
+
type: string;
|
|
166
|
+
};
|
|
167
|
+
if: {
|
|
168
|
+
arg: string;
|
|
169
|
+
truthy: boolean;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
hintPlacement: {
|
|
173
|
+
options: string[];
|
|
174
|
+
control: {
|
|
175
|
+
type: string;
|
|
176
|
+
};
|
|
177
|
+
if: {
|
|
178
|
+
arg: string;
|
|
179
|
+
truthy: boolean;
|
|
180
|
+
};
|
|
181
|
+
mappers: string[];
|
|
182
|
+
};
|
|
183
|
+
hintHasArrow: {
|
|
184
|
+
control: {
|
|
185
|
+
type: string;
|
|
186
|
+
};
|
|
187
|
+
if: {
|
|
188
|
+
arg: string;
|
|
189
|
+
truthy: boolean;
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
hintWidth: {
|
|
193
|
+
control: {
|
|
194
|
+
type: string;
|
|
195
|
+
};
|
|
196
|
+
if: {
|
|
197
|
+
arg: string;
|
|
198
|
+
truthy: boolean;
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
export {};
|
|
@@ -0,0 +1,150 @@
|
|
|
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 { appearances, dividers, hintSizes, hintTargetPlacements, hintTriggers, hintViews, placements, requiredPlacements, } 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/Range' : _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({ appearance: 'default', hasClearDivider: false, size: 'm', view: 'default', label: 'Лейбл', leftHelper: 'Подсказка к полю', titleCaption: 'Подпись к полю', firstPlaceholder: 'Заполните поле 1', secondPlaceholder: 'Заполните поле 2', disabled: false, readOnly: false, firstTextfieldTextBefore: 'С', secondTextfieldTextBefore: 'ПО', enableContentLeft: true, enableContentRight: true, dividerVariant: 'dash', enableFirstTextfieldContentLeft: false, enableFirstTextfieldContentRight: false, enableSecondTextfieldContentLeft: false, enableSecondTextfieldContentRight: false, firstValueSuccess: false, secondValueSuccess: false, firstValueError: false, secondValueError: false, required: false, hasRequiredIndicator: false, requiredIndicatorPlacement: 'right', hasHint: true, hintText: 'Текст подсказки', hintTrigger: 'hover', hintView: 'default', hintSize: 'm', hintTargetPlacement: 'outer', hintPlacement: 'auto', hintWidth: '10rem', hintHasArrow: true }, defaultArgs),
|
|
30
|
+
argTypes: __assign(__assign({ appearance: {
|
|
31
|
+
options: appearances,
|
|
32
|
+
control: {
|
|
33
|
+
type: 'select',
|
|
34
|
+
},
|
|
35
|
+
}, view: {
|
|
36
|
+
options: componentConfig.views,
|
|
37
|
+
control: { type: 'select' },
|
|
38
|
+
}, size: {
|
|
39
|
+
options: componentConfig.sizes,
|
|
40
|
+
control: { type: 'select' },
|
|
41
|
+
}, dividerVariant: {
|
|
42
|
+
options: dividers,
|
|
43
|
+
control: {
|
|
44
|
+
type: 'select',
|
|
45
|
+
},
|
|
46
|
+
}, hasClearDivider: {
|
|
47
|
+
control: {
|
|
48
|
+
type: 'boolean',
|
|
49
|
+
},
|
|
50
|
+
if: {
|
|
51
|
+
arg: 'appearance',
|
|
52
|
+
eq: 'clear',
|
|
53
|
+
},
|
|
54
|
+
}, requiredIndicatorPlacement: {
|
|
55
|
+
options: requiredPlacements,
|
|
56
|
+
control: {
|
|
57
|
+
type: 'select',
|
|
58
|
+
},
|
|
59
|
+
if: {
|
|
60
|
+
arg: 'optional',
|
|
61
|
+
truthy: false,
|
|
62
|
+
},
|
|
63
|
+
}, required: {
|
|
64
|
+
control: {
|
|
65
|
+
type: 'boolean',
|
|
66
|
+
},
|
|
67
|
+
if: {
|
|
68
|
+
arg: 'optional',
|
|
69
|
+
truthy: false,
|
|
70
|
+
},
|
|
71
|
+
}, hasRequiredIndicator: {
|
|
72
|
+
control: {
|
|
73
|
+
type: 'boolean',
|
|
74
|
+
},
|
|
75
|
+
if: {
|
|
76
|
+
arg: 'required',
|
|
77
|
+
truthy: true,
|
|
78
|
+
},
|
|
79
|
+
}, titleCaption: {
|
|
80
|
+
control: { type: 'text' },
|
|
81
|
+
}, leftHelper: {
|
|
82
|
+
control: { type: 'text' },
|
|
83
|
+
}, hintText: {
|
|
84
|
+
control: { type: 'text' },
|
|
85
|
+
if: {
|
|
86
|
+
arg: 'hasHint',
|
|
87
|
+
truthy: true,
|
|
88
|
+
},
|
|
89
|
+
}, hintView: {
|
|
90
|
+
options: hintViews,
|
|
91
|
+
control: {
|
|
92
|
+
type: 'select',
|
|
93
|
+
},
|
|
94
|
+
if: {
|
|
95
|
+
arg: 'hasHint',
|
|
96
|
+
truthy: true,
|
|
97
|
+
},
|
|
98
|
+
}, hintSize: {
|
|
99
|
+
options: hintSizes,
|
|
100
|
+
control: {
|
|
101
|
+
type: 'select',
|
|
102
|
+
},
|
|
103
|
+
if: {
|
|
104
|
+
arg: 'hasHint',
|
|
105
|
+
truthy: true,
|
|
106
|
+
},
|
|
107
|
+
}, hintTargetPlacement: {
|
|
108
|
+
options: hintTargetPlacements,
|
|
109
|
+
control: {
|
|
110
|
+
type: 'inline-radio',
|
|
111
|
+
},
|
|
112
|
+
if: {
|
|
113
|
+
arg: 'hasHint',
|
|
114
|
+
truthy: true,
|
|
115
|
+
},
|
|
116
|
+
}, hintTrigger: {
|
|
117
|
+
options: hintTriggers,
|
|
118
|
+
control: {
|
|
119
|
+
type: 'inline-radio',
|
|
120
|
+
},
|
|
121
|
+
if: {
|
|
122
|
+
arg: 'hasHint',
|
|
123
|
+
truthy: true,
|
|
124
|
+
},
|
|
125
|
+
}, hintPlacement: {
|
|
126
|
+
options: placements,
|
|
127
|
+
control: {
|
|
128
|
+
type: 'select',
|
|
129
|
+
},
|
|
130
|
+
if: {
|
|
131
|
+
arg: 'hasHint',
|
|
132
|
+
truthy: true,
|
|
133
|
+
},
|
|
134
|
+
mappers: placements,
|
|
135
|
+
}, hintHasArrow: {
|
|
136
|
+
control: { type: 'boolean' },
|
|
137
|
+
if: {
|
|
138
|
+
arg: 'hasHint',
|
|
139
|
+
truthy: true,
|
|
140
|
+
},
|
|
141
|
+
}, hintWidth: {
|
|
142
|
+
control: { type: 'text' },
|
|
143
|
+
if: {
|
|
144
|
+
arg: 'hasHint',
|
|
145
|
+
truthy: true,
|
|
146
|
+
},
|
|
147
|
+
} }, additionalArgTypes), disableProps(__spreadArray(['view'], disablePropsList, true))),
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
//# sourceMappingURL=meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/components/Range/meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAE/D,OAAO,EACH,WAAW,EACX,QAAQ,EACR,SAAS,EACT,oBAAoB,EACpB,YAAY,EACZ,SAAS,EACT,UAAU,EACV,kBAAkB,GACrB,MAAM,YAAY,CAAC;AAWpB,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,IAAI,aACA,UAAU,EAAE,SAAS,EACrB,eAAe,EAAE,KAAK,EACtB,IAAI,EAAE,GAAG,EACT,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,OAAO,EACd,UAAU,EAAE,kBAAkB,EAC9B,YAAY,EAAE,gBAAgB,EAC9B,gBAAgB,EAAE,kBAAkB,EACpC,iBAAiB,EAAE,kBAAkB,EACrC,QAAQ,EAAE,KAAK,EACf,QAAQ,EAAE,KAAK,EACf,wBAAwB,EAAE,GAAG,EAC7B,y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,MAAM,EAAE,IAAI;iBACf;aACJ,EACD,WAAW,EAAE;gBACT,OAAO,EAAE,YAAY;gBACrB,OAAO,EAAE;oBACL,IAAI,EAAE,cAAc;iBACvB;gBACD,EAAE,EAAE;oBACA,GAAG,EAAE,SAAS;oBACd,MAAM,EAAE,IAAI;iBACf;aACJ,EACD,aAAa,EAAE;gBACX,OAAO,EAAE,UAAU;gBACnB,OAAO,EAAE;oBACL,IAAI,EAAE,QAAQ;iBACjB;gBACD,EAAE,EAAE;oBACA,GAAG,EAAE,SAAS;oBACd,MAAM,EAAE,IAAI;iBACf;gBACD,OAAO,EAAE,UAAU;aACtB,EACD,YAAY,EAAE;gBACV,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;gBAC5B,EAAE,EAAE;oBACA,GAAG,EAAE,SAAS;oBACd,MAAM,EAAE,IAAI;iBACf;aACJ,EACD,SAAS,EAAE;gBACP,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;gBACzB,EAAE,EAAE;oBACA,GAAG,EAAE,SAAS;oBACd,MAAM,EAAE,IAAI;iBACf;aACJ,IACE,kBAAkB,GAClB,YAAY,gBAAE,MAAM,GAAK,gBAAgB,QAAE,CACjD;KACJ,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const createDefaultStory: (Range: any, IconButton: any) => ({ dividerVariant, enableContentLeft, enableContentRight, firstTextfieldTextBefore, secondTextfieldTextBefore, enableFirstTextfieldContentLeft, enableSecondTextfieldContentLeft, enableFirstTextfieldContentRight, enableSecondTextfieldContentRight, size, hasRequiredIndicator, ...rest }: any) => JSX.Element;
|