@itcase/ui 1.1.4 → 1.1.6
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/dist/components/DadataHintField.js +6 -3
- package/dist/components/DatePicker.js +4981 -125
- package/dist/components/Flex.js +18 -17
- package/dist/components/Grid.js +5 -1
- package/dist/components/Group.js +54 -54
- package/dist/components/Image.js +0 -8
- package/dist/components/Input.js +18 -18
- package/dist/components/MenuItem.js +1 -1
- package/dist/components/Radio.js +120 -12
- package/dist/components/Response.js +3 -3
- package/dist/components/ScrollOnDrag.js +18 -1
- package/dist/components/Segmented.js +1 -1
- package/dist/components/Select.js +43 -42
- package/dist/components/Swiper.js +45 -40
- package/dist/css/components/DatePicker/DatePicker.css +11 -10
- package/dist/css/components/Grid/Grid.css +9 -17
- package/dist/css/components/Input/Input.css +8 -0
- package/dist/css/components/MenuItem/MenuItem.css +5 -5
- package/dist/css/components/Modal/Modal.css +1 -0
- package/dist/css/components/ScrollOnDrag/ScrollOnDrag.css +11 -1
- package/dist/css/components/Select/Select.css +1 -1
- package/dist/css/components/Select/css/__single-value/select__single-value.css +1 -1
- package/dist/css/components/Swiper/Swiper.css +2 -2
- package/dist/css/components/Title/Title.css +9 -70
- package/dist/hooks/styleAttributes.js +3 -3
- package/package.json +21 -21
- package/dist/_commonjsHelpers-CFO10eej.js +0 -7
package/dist/components/Flex.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var PropTypes = require('prop-types');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
|
-
var
|
|
6
|
+
var alignDirection = require('../constants/componentProps/alignDirection.js');
|
|
7
7
|
var fill = require('../constants/componentProps/fill.js');
|
|
8
8
|
var flexAlign = require('../constants/componentProps/flexAlign.js');
|
|
9
9
|
var flexJustifyContent = require('../constants/componentProps/flexJustifyContent.js');
|
|
@@ -13,6 +13,7 @@ var width = require('../constants/componentProps/width.js');
|
|
|
13
13
|
var position = require('../constants/componentProps/position.js');
|
|
14
14
|
var useStyles = require('../hooks/useStyles.js');
|
|
15
15
|
var useDeviceTargetClass = require('../hooks/useDeviceTargetClass.js');
|
|
16
|
+
var direction = require('../constants/componentProps/direction.js');
|
|
16
17
|
var horizontalResizeMode = require('../constants/componentProps/horizontalResizeMode.js');
|
|
17
18
|
require('lodash/camelCase');
|
|
18
19
|
require('lodash/maxBy');
|
|
@@ -102,20 +103,20 @@ function Flex(props) {
|
|
|
102
103
|
}
|
|
103
104
|
Flex.propTypes = {
|
|
104
105
|
id: PropTypes__default.default.string,
|
|
105
|
-
alignContent: PropTypes__default.default.oneOf(
|
|
106
|
-
alignContentDesktop: PropTypes__default.default.oneOf(
|
|
107
|
-
alignContentMobile: PropTypes__default.default.oneOf(
|
|
108
|
-
alignContentTablet: PropTypes__default.default.oneOf(
|
|
106
|
+
alignContent: PropTypes__default.default.oneOf(flexJustifyContent.default),
|
|
107
|
+
alignContentDesktop: PropTypes__default.default.oneOf(flexJustifyContent.default),
|
|
108
|
+
alignContentMobile: PropTypes__default.default.oneOf(flexJustifyContent.default),
|
|
109
|
+
alignContentTablet: PropTypes__default.default.oneOf(flexJustifyContent.default),
|
|
109
110
|
alignItems: PropTypes__default.default.oneOf(flexAlign.default),
|
|
110
111
|
alignItemsDesktop: PropTypes__default.default.oneOf(flexAlign.default),
|
|
111
112
|
alignItemsMobile: PropTypes__default.default.oneOf(flexAlign.default),
|
|
112
113
|
alignItemsTablet: PropTypes__default.default.oneOf(flexAlign.default),
|
|
113
114
|
children: PropTypes__default.default.any,
|
|
114
115
|
className: PropTypes__default.default.string,
|
|
115
|
-
direction: PropTypes__default.default.oneOf(
|
|
116
|
-
directionDesktop: PropTypes__default.default.oneOf(
|
|
117
|
-
directionMobile: PropTypes__default.default.oneOf(
|
|
118
|
-
directionTablet: PropTypes__default.default.oneOf(
|
|
116
|
+
direction: PropTypes__default.default.oneOf(alignDirection.default),
|
|
117
|
+
directionDesktop: PropTypes__default.default.oneOf(alignDirection.default),
|
|
118
|
+
directionMobile: PropTypes__default.default.oneOf(alignDirection.default),
|
|
119
|
+
directionTablet: PropTypes__default.default.oneOf(alignDirection.default),
|
|
119
120
|
fill: PropTypes__default.default.oneOf(fill.default),
|
|
120
121
|
fillDesktop: PropTypes__default.default.oneOf(fill.default),
|
|
121
122
|
fillMobile: PropTypes__default.default.oneOf(fill.default),
|
|
@@ -183,7 +184,7 @@ Flex.__docgenInfo = {
|
|
|
183
184
|
"type": {
|
|
184
185
|
"name": "enum",
|
|
185
186
|
"computed": true,
|
|
186
|
-
"value": "
|
|
187
|
+
"value": "flexJustifyContentProps"
|
|
187
188
|
},
|
|
188
189
|
"required": false
|
|
189
190
|
},
|
|
@@ -192,7 +193,7 @@ Flex.__docgenInfo = {
|
|
|
192
193
|
"type": {
|
|
193
194
|
"name": "enum",
|
|
194
195
|
"computed": true,
|
|
195
|
-
"value": "
|
|
196
|
+
"value": "flexJustifyContentProps"
|
|
196
197
|
},
|
|
197
198
|
"required": false
|
|
198
199
|
},
|
|
@@ -201,7 +202,7 @@ Flex.__docgenInfo = {
|
|
|
201
202
|
"type": {
|
|
202
203
|
"name": "enum",
|
|
203
204
|
"computed": true,
|
|
204
|
-
"value": "
|
|
205
|
+
"value": "flexJustifyContentProps"
|
|
205
206
|
},
|
|
206
207
|
"required": false
|
|
207
208
|
},
|
|
@@ -210,7 +211,7 @@ Flex.__docgenInfo = {
|
|
|
210
211
|
"type": {
|
|
211
212
|
"name": "enum",
|
|
212
213
|
"computed": true,
|
|
213
|
-
"value": "
|
|
214
|
+
"value": "flexJustifyContentProps"
|
|
214
215
|
},
|
|
215
216
|
"required": false
|
|
216
217
|
},
|
|
@@ -269,7 +270,7 @@ Flex.__docgenInfo = {
|
|
|
269
270
|
"type": {
|
|
270
271
|
"name": "enum",
|
|
271
272
|
"computed": true,
|
|
272
|
-
"value": "
|
|
273
|
+
"value": "alignDirectionProps"
|
|
273
274
|
},
|
|
274
275
|
"required": false
|
|
275
276
|
},
|
|
@@ -278,7 +279,7 @@ Flex.__docgenInfo = {
|
|
|
278
279
|
"type": {
|
|
279
280
|
"name": "enum",
|
|
280
281
|
"computed": true,
|
|
281
|
-
"value": "
|
|
282
|
+
"value": "alignDirectionProps"
|
|
282
283
|
},
|
|
283
284
|
"required": false
|
|
284
285
|
},
|
|
@@ -287,7 +288,7 @@ Flex.__docgenInfo = {
|
|
|
287
288
|
"type": {
|
|
288
289
|
"name": "enum",
|
|
289
290
|
"computed": true,
|
|
290
|
-
"value": "
|
|
291
|
+
"value": "alignDirectionProps"
|
|
291
292
|
},
|
|
292
293
|
"required": false
|
|
293
294
|
},
|
|
@@ -296,7 +297,7 @@ Flex.__docgenInfo = {
|
|
|
296
297
|
"type": {
|
|
297
298
|
"name": "enum",
|
|
298
299
|
"computed": true,
|
|
299
|
-
"value": "
|
|
300
|
+
"value": "alignDirectionProps"
|
|
300
301
|
},
|
|
301
302
|
"required": false
|
|
302
303
|
},
|
package/dist/components/Grid.js
CHANGED
|
@@ -80,6 +80,10 @@ function Grid(props) {
|
|
|
80
80
|
prefix: 'fill_',
|
|
81
81
|
propsKey: 'fill'
|
|
82
82
|
});
|
|
83
|
+
const borderColorClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
84
|
+
prefix: 'border-color_',
|
|
85
|
+
propsKey: 'borderColor'
|
|
86
|
+
});
|
|
83
87
|
useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
84
88
|
prefix: 'fill_',
|
|
85
89
|
propsKey: 'fillWrapper'
|
|
@@ -102,7 +106,7 @@ function Grid(props) {
|
|
|
102
106
|
gridWrapperInner: gridWrapperInnerStyles
|
|
103
107
|
} = useStyles.useStyles(props);
|
|
104
108
|
return /*#__PURE__*/React__default.default.createElement(Tag, {
|
|
105
|
-
className: clsx__default.default(className, 'grid', useGridSystem && `grid_state_system`, horizontalScroll && `grid_scroll_horizontal`, type && `grid_type_${type}`, columnsClass, rowsClass, rowGapClass, columnGapClass, alignContentClass, alignItemsClass, justifyContentClass, justifyItemsClass, fillClass, horizontalResizing && `grid_horizontal-resizing_${horizontalResizing}`, verticalResizing && `grid_vertical-resizing_${verticalResizing}`),
|
|
109
|
+
className: clsx__default.default(className, 'grid', useGridSystem && `grid_state_system`, horizontalScroll && `grid_scroll_horizontal`, type && `grid_type_${type}`, columnsClass, rowsClass, rowGapClass, columnGapClass, alignContentClass, alignItemsClass, borderColorClass, justifyContentClass, justifyItemsClass, fillClass, horizontalResizing && `grid_horizontal-resizing_${horizontalResizing}`, verticalResizing && `grid_vertical-resizing_${verticalResizing}`),
|
|
106
110
|
"data-tour": dataTour,
|
|
107
111
|
id: id,
|
|
108
112
|
style: gridStyles,
|
package/dist/components/Group.js
CHANGED
|
@@ -135,23 +135,23 @@ function Group(props) {
|
|
|
135
135
|
}, children) : children);
|
|
136
136
|
}
|
|
137
137
|
Group.propTypes = {
|
|
138
|
-
id: PropTypes__default.default.string,
|
|
139
138
|
children: PropTypes__default.default.any,
|
|
140
139
|
className: PropTypes__default.default.string,
|
|
140
|
+
columns: PropTypes__default.default.number,
|
|
141
|
+
contentAlign: PropTypes__default.default.oneOf([null, 'center']),
|
|
141
142
|
direction: PropTypes__default.default.oneOf(direction.default),
|
|
142
143
|
fill: PropTypes__default.default.oneOf(fill.default),
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
horizontalScroll: PropTypes__default.default.bool,
|
|
145
|
+
htmlFor: PropTypes__default.default.oneOfType([PropTypes__default.default.string, PropTypes__default.default.number]),
|
|
146
|
+
id: PropTypes__default.default.string,
|
|
147
|
+
set: PropTypes__default.default.string,
|
|
147
148
|
shape: PropTypes__default.default.oneOf(shape.default),
|
|
148
149
|
spaceBetweenItems: PropTypes__default.default.string,
|
|
150
|
+
stacking: PropTypes__default.default.oneOf(stacking.default),
|
|
151
|
+
tag: PropTypes__default.default.string,
|
|
149
152
|
width: PropTypes__default.default.oneOf(width.default),
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
horizontalScroll: PropTypes__default.default.bool,
|
|
153
|
-
onClick: PropTypes__default.default.func,
|
|
154
|
-
htmlFor: PropTypes__default.default.oneOfType([PropTypes__default.default.string, PropTypes__default.default.number])
|
|
153
|
+
wrap: PropTypes__default.default.oneOf(wrap.default),
|
|
154
|
+
onClick: PropTypes__default.default.func
|
|
155
155
|
};
|
|
156
156
|
Group.defaultProps = {
|
|
157
157
|
tag: 'div'
|
|
@@ -172,24 +172,38 @@ Group.__docgenInfo = {
|
|
|
172
172
|
},
|
|
173
173
|
"required": false
|
|
174
174
|
},
|
|
175
|
-
"
|
|
175
|
+
"children": {
|
|
176
|
+
"description": "",
|
|
177
|
+
"type": {
|
|
178
|
+
"name": "any"
|
|
179
|
+
},
|
|
180
|
+
"required": false
|
|
181
|
+
},
|
|
182
|
+
"className": {
|
|
176
183
|
"description": "",
|
|
177
184
|
"type": {
|
|
178
185
|
"name": "string"
|
|
179
186
|
},
|
|
180
187
|
"required": false
|
|
181
188
|
},
|
|
182
|
-
"
|
|
189
|
+
"columns": {
|
|
183
190
|
"description": "",
|
|
184
191
|
"type": {
|
|
185
|
-
"name": "
|
|
192
|
+
"name": "number"
|
|
186
193
|
},
|
|
187
194
|
"required": false
|
|
188
195
|
},
|
|
189
|
-
"
|
|
196
|
+
"contentAlign": {
|
|
190
197
|
"description": "",
|
|
191
198
|
"type": {
|
|
192
|
-
"name": "
|
|
199
|
+
"name": "enum",
|
|
200
|
+
"value": [{
|
|
201
|
+
"value": "null",
|
|
202
|
+
"computed": false
|
|
203
|
+
}, {
|
|
204
|
+
"value": "'center'",
|
|
205
|
+
"computed": false
|
|
206
|
+
}]
|
|
193
207
|
},
|
|
194
208
|
"required": false
|
|
195
209
|
},
|
|
@@ -211,35 +225,36 @@ Group.__docgenInfo = {
|
|
|
211
225
|
},
|
|
212
226
|
"required": false
|
|
213
227
|
},
|
|
214
|
-
"
|
|
228
|
+
"horizontalScroll": {
|
|
215
229
|
"description": "",
|
|
216
230
|
"type": {
|
|
217
|
-
"name": "
|
|
231
|
+
"name": "bool"
|
|
232
|
+
},
|
|
233
|
+
"required": false
|
|
234
|
+
},
|
|
235
|
+
"htmlFor": {
|
|
236
|
+
"description": "",
|
|
237
|
+
"type": {
|
|
238
|
+
"name": "union",
|
|
218
239
|
"value": [{
|
|
219
|
-
"
|
|
220
|
-
"computed": false
|
|
240
|
+
"name": "string"
|
|
221
241
|
}, {
|
|
222
|
-
"
|
|
223
|
-
"computed": false
|
|
242
|
+
"name": "number"
|
|
224
243
|
}]
|
|
225
244
|
},
|
|
226
245
|
"required": false
|
|
227
246
|
},
|
|
228
|
-
"
|
|
247
|
+
"id": {
|
|
229
248
|
"description": "",
|
|
230
249
|
"type": {
|
|
231
|
-
"name": "
|
|
232
|
-
"computed": true,
|
|
233
|
-
"value": "stackingProps"
|
|
250
|
+
"name": "string"
|
|
234
251
|
},
|
|
235
252
|
"required": false
|
|
236
253
|
},
|
|
237
|
-
"
|
|
254
|
+
"set": {
|
|
238
255
|
"description": "",
|
|
239
256
|
"type": {
|
|
240
|
-
"name": "
|
|
241
|
-
"computed": true,
|
|
242
|
-
"value": "wrapProps"
|
|
257
|
+
"name": "string"
|
|
243
258
|
},
|
|
244
259
|
"required": false
|
|
245
260
|
},
|
|
@@ -259,33 +274,30 @@ Group.__docgenInfo = {
|
|
|
259
274
|
},
|
|
260
275
|
"required": false
|
|
261
276
|
},
|
|
262
|
-
"
|
|
277
|
+
"stacking": {
|
|
263
278
|
"description": "",
|
|
264
279
|
"type": {
|
|
265
280
|
"name": "enum",
|
|
266
281
|
"computed": true,
|
|
267
|
-
"value": "
|
|
268
|
-
},
|
|
269
|
-
"required": false
|
|
270
|
-
},
|
|
271
|
-
"columns": {
|
|
272
|
-
"description": "",
|
|
273
|
-
"type": {
|
|
274
|
-
"name": "number"
|
|
282
|
+
"value": "stackingProps"
|
|
275
283
|
},
|
|
276
284
|
"required": false
|
|
277
285
|
},
|
|
278
|
-
"
|
|
286
|
+
"width": {
|
|
279
287
|
"description": "",
|
|
280
288
|
"type": {
|
|
281
|
-
"name": "
|
|
289
|
+
"name": "enum",
|
|
290
|
+
"computed": true,
|
|
291
|
+
"value": "widthProps"
|
|
282
292
|
},
|
|
283
293
|
"required": false
|
|
284
294
|
},
|
|
285
|
-
"
|
|
295
|
+
"wrap": {
|
|
286
296
|
"description": "",
|
|
287
297
|
"type": {
|
|
288
|
-
"name": "
|
|
298
|
+
"name": "enum",
|
|
299
|
+
"computed": true,
|
|
300
|
+
"value": "wrapProps"
|
|
289
301
|
},
|
|
290
302
|
"required": false
|
|
291
303
|
},
|
|
@@ -295,18 +307,6 @@ Group.__docgenInfo = {
|
|
|
295
307
|
"name": "func"
|
|
296
308
|
},
|
|
297
309
|
"required": false
|
|
298
|
-
},
|
|
299
|
-
"htmlFor": {
|
|
300
|
-
"description": "",
|
|
301
|
-
"type": {
|
|
302
|
-
"name": "union",
|
|
303
|
-
"value": [{
|
|
304
|
-
"name": "string"
|
|
305
|
-
}, {
|
|
306
|
-
"name": "number"
|
|
307
|
-
}]
|
|
308
|
-
},
|
|
309
|
-
"required": false
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
312
|
};
|
package/dist/components/Image.js
CHANGED
|
@@ -139,7 +139,6 @@ Image.propTypes = {
|
|
|
139
139
|
shapeDesktop: PropTypes__default.default.oneOf(shape.default),
|
|
140
140
|
shapeMobile: PropTypes__default.default.oneOf(shape.default),
|
|
141
141
|
shapeTablet: PropTypes__default.default.oneOf(shape.default),
|
|
142
|
-
size: PropTypes__default.default.string,
|
|
143
142
|
src: PropTypes__default.default.string,
|
|
144
143
|
style: PropTypes__default.default.object,
|
|
145
144
|
title: PropTypes__default.default.string,
|
|
@@ -348,13 +347,6 @@ Image.__docgenInfo = {
|
|
|
348
347
|
},
|
|
349
348
|
"required": false
|
|
350
349
|
},
|
|
351
|
-
"size": {
|
|
352
|
-
"description": "",
|
|
353
|
-
"type": {
|
|
354
|
-
"name": "string"
|
|
355
|
-
},
|
|
356
|
-
"required": false
|
|
357
|
-
},
|
|
358
350
|
"src": {
|
|
359
351
|
"description": "",
|
|
360
352
|
"type": {
|
package/dist/components/Input.js
CHANGED
|
@@ -110,13 +110,13 @@ const Input = /*#__PURE__*/React__default.default.forwardRef(function Input(prop
|
|
|
110
110
|
});
|
|
111
111
|
return /*#__PURE__*/React__default.default.createElement("input", {
|
|
112
112
|
className: clsx__default.default(className, 'input', type === 'number' && 'input_type_number', (textSizeClass || textColorClass || weightClass) && 'text', caretClass, !isDisabled ? fillClass : fillDisabledClass, shapeClass || inputConfig.appearance[appearance] && `input_shape_${inputConfig.appearance[appearance].shape}`.replace(/([A-Z])/g, '-$1').toLowerCase(), textSizeClass || inputConfig.appearance[appearance] && `text_size_${inputConfig.appearance[appearance].textSize}`.replace(/([A-Z])/g, '-$1').toLowerCase(), weightClass, widthClass, !isDisabled ? borderWidthClass : borderWidthDisabledClass, sizeClass || inputConfig.appearance[appearance] && `input_size_${inputConfig.appearance[appearance].size}`.replace(/([A-Z])/g, '-$1').toLowerCase(), borderColorClass || inputConfig.appearance[appearance]?.borderColor && `border-color_${inputConfig.appearance[appearance].borderColor}`.replace(/([A-Z])/g, '-$1').toLowerCase(), placeholderTextColorClass || inputConfig.appearance[appearance]?.placeholderTextColor && `placeholder-text-color_${inputConfig.appearance[appearance].placeholderTextColor}`.replace(/([A-Z])/g, '-$1').toLowerCase(), textColorClass || inputConfig.appearance[appearance]?.textColor && `text-color_${inputConfig.appearance[appearance].textColor}`.replace(/([A-Z])/g, '-$1').toLowerCase(), !isDisabled ? borderColorClass || inputConfig.state[state]?.borderColor && `border-color_${inputConfig.state[state].borderColor}`.replace(/([A-Z])/g, '-$1').toLowerCase() : borderColorDisabledClass || inputConfig.state[state]?.borderColor && `border-color_disabled_${inputConfig.state[state].borderColor}`.replace(/([A-Z])/g, '-$1').toLowerCase(), !isDisabled ? placeholderTextColorClass || inputConfig.state[state]?.placeholderTextColor && `placeholder-text-color_${inputConfig.state[state].placeholderTextColor}`.replace(/([A-Z])/g, '-$1').toLowerCase() : placeholderTextColorDisabledClass || inputConfig.state[state]?.placeholderTextColor && `placeholder-text-color_${inputConfig.state[state].placeholderTextColor}`.replace(/([A-Z])/g, '-$1').toLowerCase(), !isDisabled ? textColorClass || inputConfig.state[state]?.textColor && `text-color_${inputConfig.state[state].textColor}`.replace(/([A-Z])/g, '-$1').toLowerCase() : textColorDisabledClass || inputConfig.state[state]?.textColor && `text-color_${inputConfig.state[state].textColor}`.replace(/([A-Z])/g, '-$1').toLowerCase()),
|
|
113
|
-
|
|
113
|
+
"data-test-id": dataTestId || (name ? `${name}Input` : 'input'),
|
|
114
|
+
disabled: isDisabled,
|
|
114
115
|
id: id,
|
|
115
116
|
index: index,
|
|
116
|
-
ref: ref,
|
|
117
|
-
disabled: isDisabled,
|
|
118
117
|
placeholder: placeholder,
|
|
119
|
-
|
|
118
|
+
ref: ref,
|
|
119
|
+
type: type,
|
|
120
120
|
value: value,
|
|
121
121
|
onBlur: onBlur,
|
|
122
122
|
onChange: onChange,
|
|
@@ -125,16 +125,16 @@ const Input = /*#__PURE__*/React__default.default.forwardRef(function Input(prop
|
|
|
125
125
|
});
|
|
126
126
|
});
|
|
127
127
|
Input.propTypes = {
|
|
128
|
-
|
|
128
|
+
checked: PropTypes__default.default.bool,
|
|
129
129
|
className: PropTypes__default.default.string,
|
|
130
|
+
id: PropTypes__default.default.string,
|
|
131
|
+
isDisabled: PropTypes__default.default.bool,
|
|
130
132
|
placeholder: PropTypes__default.default.string,
|
|
133
|
+
type: PropTypes__default.default.string,
|
|
131
134
|
value: PropTypes__default.default.string,
|
|
132
|
-
checked: PropTypes__default.default.bool,
|
|
133
|
-
isDisabled: PropTypes__default.default.bool,
|
|
134
135
|
onBlur: PropTypes__default.default.func,
|
|
135
136
|
onChange: PropTypes__default.default.func,
|
|
136
|
-
onKeyDown: PropTypes__default.default.func
|
|
137
|
-
type: PropTypes__default.default.string
|
|
137
|
+
onKeyDown: PropTypes__default.default.func
|
|
138
138
|
};
|
|
139
139
|
Input.defaultProps = {
|
|
140
140
|
size: 'm',
|
|
@@ -163,10 +163,10 @@ Input.__docgenInfo = {
|
|
|
163
163
|
},
|
|
164
164
|
"required": false
|
|
165
165
|
},
|
|
166
|
-
"
|
|
166
|
+
"checked": {
|
|
167
167
|
"description": "",
|
|
168
168
|
"type": {
|
|
169
|
-
"name": "
|
|
169
|
+
"name": "bool"
|
|
170
170
|
},
|
|
171
171
|
"required": false
|
|
172
172
|
},
|
|
@@ -177,31 +177,31 @@ Input.__docgenInfo = {
|
|
|
177
177
|
},
|
|
178
178
|
"required": false
|
|
179
179
|
},
|
|
180
|
-
"
|
|
180
|
+
"id": {
|
|
181
181
|
"description": "",
|
|
182
182
|
"type": {
|
|
183
183
|
"name": "string"
|
|
184
184
|
},
|
|
185
185
|
"required": false
|
|
186
186
|
},
|
|
187
|
-
"
|
|
187
|
+
"isDisabled": {
|
|
188
188
|
"description": "",
|
|
189
189
|
"type": {
|
|
190
|
-
"name": "
|
|
190
|
+
"name": "bool"
|
|
191
191
|
},
|
|
192
192
|
"required": false
|
|
193
193
|
},
|
|
194
|
-
"
|
|
194
|
+
"placeholder": {
|
|
195
195
|
"description": "",
|
|
196
196
|
"type": {
|
|
197
|
-
"name": "
|
|
197
|
+
"name": "string"
|
|
198
198
|
},
|
|
199
199
|
"required": false
|
|
200
200
|
},
|
|
201
|
-
"
|
|
201
|
+
"value": {
|
|
202
202
|
"description": "",
|
|
203
203
|
"type": {
|
|
204
|
-
"name": "
|
|
204
|
+
"name": "string"
|
|
205
205
|
},
|
|
206
206
|
"required": false
|
|
207
207
|
},
|
|
@@ -151,7 +151,7 @@ function MenuItem(props) {
|
|
|
151
151
|
size: textSize,
|
|
152
152
|
textColor: textColor || appearance && menuItemConfig.appearance[appearance].textColor.replace(/([A-Z])/g, '-$1').toLowerCase(),
|
|
153
153
|
textColorActive: isActive && (textColorActive || appearance && menuItemConfig.appearance[appearance].textColorActive.replace(/([A-Z])/g, '-$1').toLowerCase()),
|
|
154
|
-
textColorHover: textColorHover || appearance && menuItemConfig.appearance[appearance].
|
|
154
|
+
textColorHover: textColorHover || appearance && menuItemConfig.appearance[appearance].textColorHover.replace(/([A-Z])/g, '-$1').toLowerCase(),
|
|
155
155
|
textGradient: textGradient,
|
|
156
156
|
textStyle: textStyle,
|
|
157
157
|
textWeight: textWeight,
|
package/dist/components/Radio.js
CHANGED
|
@@ -41,21 +41,20 @@ const radioConfig = {
|
|
|
41
41
|
function Radio(props) {
|
|
42
42
|
const {
|
|
43
43
|
appearance,
|
|
44
|
-
state,
|
|
45
|
-
id,
|
|
46
|
-
className,
|
|
47
44
|
checked,
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
className,
|
|
46
|
+
desc,
|
|
47
|
+
descTextColor,
|
|
50
48
|
descTextSize,
|
|
51
49
|
descTextWidth,
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
disabled,
|
|
51
|
+
id,
|
|
54
52
|
label,
|
|
53
|
+
labelTextColor,
|
|
55
54
|
labelTextSize,
|
|
56
55
|
labelTextWidth,
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
tag: Tag,
|
|
57
|
+
onChange
|
|
59
58
|
} = props;
|
|
60
59
|
const fillClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
61
60
|
prefix: 'fill_',
|
|
@@ -98,8 +97,8 @@ function Radio(props) {
|
|
|
98
97
|
propsKey: checked ? 'stateBorderColorDisabledChecked' : 'stateBorderColorDisabled'
|
|
99
98
|
});
|
|
100
99
|
return /*#__PURE__*/React__default.default.createElement(Tag, {
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
className: clsx__default.default(className, 'radio', fillClass, shapeClass),
|
|
101
|
+
htmlFor: id
|
|
103
102
|
}, /*#__PURE__*/React__default.default.createElement("div", {
|
|
104
103
|
className: clsx__default.default('radio__item', stateCheckmarkFillClass || radioConfig.appearance[appearance] && `radio_checkmark_fill_${radioConfig.appearance[appearance].stateCheckmarkFill}`.replace(/([A-Z])/g, '-$1').toLowerCase())
|
|
105
104
|
}, /*#__PURE__*/React__default.default.createElement("input", {
|
|
@@ -126,7 +125,21 @@ function Radio(props) {
|
|
|
126
125
|
}, desc));
|
|
127
126
|
}
|
|
128
127
|
Radio.propTypes = {
|
|
129
|
-
|
|
128
|
+
appearance: PropTypes__default.default.string,
|
|
129
|
+
checked: PropTypes__default.default.bool,
|
|
130
|
+
className: PropTypes__default.default.string,
|
|
131
|
+
desc: PropTypes__default.default.string,
|
|
132
|
+
descTextColor: PropTypes__default.default.string,
|
|
133
|
+
descTextSize: PropTypes__default.default.string,
|
|
134
|
+
descTextWidth: PropTypes__default.default.string,
|
|
135
|
+
disabled: PropTypes__default.default.bool,
|
|
136
|
+
id: PropTypes__default.default.string,
|
|
137
|
+
label: PropTypes__default.default.string,
|
|
138
|
+
labelTextColor: PropTypes__default.default.string,
|
|
139
|
+
labelTextSize: PropTypes__default.default.string,
|
|
140
|
+
labelTextWidth: PropTypes__default.default.string,
|
|
141
|
+
tag: PropTypes__default.default.string,
|
|
142
|
+
onChange: PropTypes__default.default.func
|
|
130
143
|
};
|
|
131
144
|
Radio.defaultProps = {
|
|
132
145
|
shape: 'circular',
|
|
@@ -149,6 +162,24 @@ Radio.__docgenInfo = {
|
|
|
149
162
|
"value": "'label'",
|
|
150
163
|
"computed": false
|
|
151
164
|
},
|
|
165
|
+
"description": "",
|
|
166
|
+
"type": {
|
|
167
|
+
"name": "string"
|
|
168
|
+
},
|
|
169
|
+
"required": false
|
|
170
|
+
},
|
|
171
|
+
"appearance": {
|
|
172
|
+
"description": "",
|
|
173
|
+
"type": {
|
|
174
|
+
"name": "string"
|
|
175
|
+
},
|
|
176
|
+
"required": false
|
|
177
|
+
},
|
|
178
|
+
"checked": {
|
|
179
|
+
"description": "",
|
|
180
|
+
"type": {
|
|
181
|
+
"name": "bool"
|
|
182
|
+
},
|
|
152
183
|
"required": false
|
|
153
184
|
},
|
|
154
185
|
"className": {
|
|
@@ -157,6 +188,83 @@ Radio.__docgenInfo = {
|
|
|
157
188
|
"name": "string"
|
|
158
189
|
},
|
|
159
190
|
"required": false
|
|
191
|
+
},
|
|
192
|
+
"desc": {
|
|
193
|
+
"description": "",
|
|
194
|
+
"type": {
|
|
195
|
+
"name": "string"
|
|
196
|
+
},
|
|
197
|
+
"required": false
|
|
198
|
+
},
|
|
199
|
+
"descTextColor": {
|
|
200
|
+
"description": "",
|
|
201
|
+
"type": {
|
|
202
|
+
"name": "string"
|
|
203
|
+
},
|
|
204
|
+
"required": false
|
|
205
|
+
},
|
|
206
|
+
"descTextSize": {
|
|
207
|
+
"description": "",
|
|
208
|
+
"type": {
|
|
209
|
+
"name": "string"
|
|
210
|
+
},
|
|
211
|
+
"required": false
|
|
212
|
+
},
|
|
213
|
+
"descTextWidth": {
|
|
214
|
+
"description": "",
|
|
215
|
+
"type": {
|
|
216
|
+
"name": "string"
|
|
217
|
+
},
|
|
218
|
+
"required": false
|
|
219
|
+
},
|
|
220
|
+
"disabled": {
|
|
221
|
+
"description": "",
|
|
222
|
+
"type": {
|
|
223
|
+
"name": "bool"
|
|
224
|
+
},
|
|
225
|
+
"required": false
|
|
226
|
+
},
|
|
227
|
+
"id": {
|
|
228
|
+
"description": "",
|
|
229
|
+
"type": {
|
|
230
|
+
"name": "string"
|
|
231
|
+
},
|
|
232
|
+
"required": false
|
|
233
|
+
},
|
|
234
|
+
"label": {
|
|
235
|
+
"description": "",
|
|
236
|
+
"type": {
|
|
237
|
+
"name": "string"
|
|
238
|
+
},
|
|
239
|
+
"required": false
|
|
240
|
+
},
|
|
241
|
+
"labelTextColor": {
|
|
242
|
+
"description": "",
|
|
243
|
+
"type": {
|
|
244
|
+
"name": "string"
|
|
245
|
+
},
|
|
246
|
+
"required": false
|
|
247
|
+
},
|
|
248
|
+
"labelTextSize": {
|
|
249
|
+
"description": "",
|
|
250
|
+
"type": {
|
|
251
|
+
"name": "string"
|
|
252
|
+
},
|
|
253
|
+
"required": false
|
|
254
|
+
},
|
|
255
|
+
"labelTextWidth": {
|
|
256
|
+
"description": "",
|
|
257
|
+
"type": {
|
|
258
|
+
"name": "string"
|
|
259
|
+
},
|
|
260
|
+
"required": false
|
|
261
|
+
},
|
|
262
|
+
"onChange": {
|
|
263
|
+
"description": "",
|
|
264
|
+
"type": {
|
|
265
|
+
"name": "func"
|
|
266
|
+
},
|
|
267
|
+
"required": false
|
|
160
268
|
}
|
|
161
269
|
}
|
|
162
270
|
};
|
|
@@ -162,7 +162,7 @@ function Response(props) {
|
|
|
162
162
|
className: "response__message",
|
|
163
163
|
size: messageTextSize || responseConfig.appearance[appearance]?.messageTextSize || 'xxl',
|
|
164
164
|
textColor: messageTextColor || responseConfig.appearance[appearance]?.messageTextColor
|
|
165
|
-
}, message)), (primaryButtonLabel ||
|
|
165
|
+
}, message)), (primaryButtonLabel || primaryButton || secondaryButtonLabel || secondaryButton || responseConfig.appearance[appearance]) && /*#__PURE__*/React__default.default.createElement(index.Group, {
|
|
166
166
|
className: "response__button",
|
|
167
167
|
width: "fill"
|
|
168
168
|
}, primaryButtonLabel || responseConfig.appearance[appearance].primaryButtonLabel ? /*#__PURE__*/React__default.default.createElement(index$3.Button, {
|
|
@@ -172,7 +172,7 @@ function Response(props) {
|
|
|
172
172
|
className: "response__button-item",
|
|
173
173
|
fill: primaryButtonFill,
|
|
174
174
|
fillHover: primaryButtonFillHover,
|
|
175
|
-
label: primaryButtonLabel || responseConfig.appearance[appearance]
|
|
175
|
+
label: primaryButtonLabel || responseConfig.appearance[appearance]?.primaryButtonLabel,
|
|
176
176
|
labelTextColor: primaryButtonLabelTextColor,
|
|
177
177
|
labelTextSize: primaryButtonLabelTextSize || responseConfig.appearance[appearance]?.primaryButtonLabelTextSize,
|
|
178
178
|
shape: primaryButtonShape || responseConfig.appearance[appearance]?.primaryButtonShape,
|
|
@@ -186,7 +186,7 @@ function Response(props) {
|
|
|
186
186
|
className: "response__button-item",
|
|
187
187
|
fill: secondaryButtonFill,
|
|
188
188
|
fillHover: secondaryButtonFillHover,
|
|
189
|
-
label: secondaryButtonLabel || responseConfig.appearance[appearance]
|
|
189
|
+
label: secondaryButtonLabel || responseConfig.appearance[appearance]?.secondaryButtonLabel,
|
|
190
190
|
labelTextColor: secondaryButtonLabelTextColor,
|
|
191
191
|
labelTextSize: secondaryButtonLabelTextSize || responseConfig.appearance[appearance]?.secondaryButtonLabelTextSize,
|
|
192
192
|
shape: secondaryButtonShape || responseConfig.appearance[appearance]?.secondaryButtonShape,
|