@itcase/ui 1.1.1 → 1.1.3
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/Button.js +8 -3
- package/dist/components/Cell.js +32 -14
- package/dist/components/DatePicker.js +2 -1
- package/dist/components/FormField.js +3 -3
- package/dist/components/Grid.js +2 -2
- package/dist/components/Icon.js +125 -16
- package/dist/components/Input.js +1 -8
- package/dist/components/InputMask.js +233 -0
- package/dist/components/InputPassword.js +6 -6
- package/dist/components/Label.js +4 -4
- package/dist/components/Modal.js +27 -27
- package/dist/components/{Fader.js → Overlay.js} +43 -43
- package/dist/components/Response.js +10 -9
- package/dist/components/ScrollOnDrag.js +290 -0
- package/dist/components/Search.js +19 -3
- package/dist/components/Tab.js +8 -8
- package/dist/components/Text.js +4 -4
- package/dist/constants/componentProps/borderWidth.js +3 -1
- package/dist/constants/componentProps/emojiSize.js +3 -1
- package/dist/constants/componentProps/iconFillSize.js +3 -1
- package/dist/constants/componentProps/iconSize.js +3 -1
- package/dist/constants/componentProps/sizePX.js +3 -1
- package/dist/css/components/DatePicker/DatePicker.css +12 -5
- package/dist/css/components/Group/Group.css +0 -8
- package/dist/css/components/InputMask/Input.css +77 -0
- package/dist/css/components/Label/Label.css +0 -19
- package/dist/css/components/Loader/Loader.css +1 -1
- package/dist/css/components/Modal/Modal.css +3 -3
- package/dist/css/components/{Fader/Fader.css → Overlay/Overlay.css} +10 -10
- package/dist/css/components/Response/Response.css +8 -0
- package/dist/css/components/ScrollOnDrag/ScrollOnDrag.css +6 -0
- package/dist/css/styles/align/align_vertical-reverse.css +6 -6
- package/dist/css/styles/align/align_vertical.css +8 -8
- package/dist/css/styles/border-color/border-color.css +1 -1
- package/dist/css/styles/border-color/border-color_focus.css +2 -2
- package/dist/css/styles/border-color/border-color_hover.css +1 -1
- package/dist/css/styles/caret-color/caret-color.css +1 -1
- package/dist/css/styles/fill/fill.css +2 -2
- package/dist/css/styles/fill/fill_active.css +2 -2
- package/dist/css/styles/fill/fill_active_hover.css +2 -2
- package/dist/css/styles/fill/fill_disabled.css +2 -2
- package/dist/css/styles/fill/fill_hover.css +2 -2
- package/dist/stories/ModalConfirm.stories.js +1 -1
- package/dist/stories/ModalDefault.stories.js +1 -1
- package/dist/stories/NotFound.stories.js +3 -4
- package/package.json +1 -1
- package/dist/components/Empty.js +0 -229
- package/dist/css/components/Empty/Empty.css +0 -21
- package/dist/stories/Empty.stories.js +0 -115
|
@@ -140,7 +140,7 @@ const Button = /*#__PURE__*/React__default.default.forwardRef(function Button(pr
|
|
|
140
140
|
} = useStyles.useStyles(props);
|
|
141
141
|
return /*#__PURE__*/React__default.default.createElement(index.LinkWrapper, {
|
|
142
142
|
className: clsx__default.default(className, 'button', type && `button_type_${type}`, borderWidthClass || buttonConfig.appearance[appearance] && `border-width_${buttonConfig.appearance[appearance].borderWidth}`.replace(/([A-Z])/g, '-$1').toLowerCase(), borderColorClass || buttonConfig.appearance[appearance] && `border-color_${buttonConfig.appearance[appearance].borderColor}`.replace(/([A-Z])/g, '-$1').toLowerCase(), borderTypeClass || buttonConfig.appearance[appearance] && `border-type_${buttonConfig.appearance[appearance].borderType}`.replace(/([A-Z])/g, '-$1').toLowerCase(), fillClass || buttonConfig.appearance[appearance] && `fill_${buttonConfig.appearance[appearance].fill}`.replace(/([A-Z])/g, '-$1').toLowerCase(), fillHoverClass || buttonConfig.appearance[appearance] && `fill_hover_${buttonConfig.appearance[appearance].fillHover}`.replace(/([A-Z])/g, '-$1').toLowerCase(), shapeClass, sizeClass, widthClass, elevationClass, onClick && 'cursor_type_pointer', isDisabled && 'cursor_type_default', Badge && 'button_type_badge', loading && 'button_state_loading', !label && (iconBefore || iconBeforeSrc || iconAfter || iconAfterSrc || icon || iconSrc) && 'button_type_icon', label && (after || before || icon || iconAfter || iconAfterSrc || iconBefore || iconBeforeSrc || iconSrc) && `button_type_with-icon button_type_with-icon_${size}`),
|
|
143
|
-
"data-
|
|
143
|
+
"data-test-id": `${dataTestId}Button`,
|
|
144
144
|
"data-tour": dataTour,
|
|
145
145
|
DefaultComponent: "button",
|
|
146
146
|
disabled: isDisabled,
|
|
@@ -209,7 +209,7 @@ Button.propTypes = {
|
|
|
209
209
|
iconSize: PropTypes__default.default.string,
|
|
210
210
|
iconStroke: PropTypes__default.default.string,
|
|
211
211
|
isDisabled: PropTypes__default.default.bool,
|
|
212
|
-
label: PropTypes__default.default.string,
|
|
212
|
+
label: PropTypes__default.default.oneOfType([PropTypes__default.default.string, PropTypes__default.default.number]),
|
|
213
213
|
labelTextColor: PropTypes__default.default.string,
|
|
214
214
|
labelTextColorHover: PropTypes__default.default.string,
|
|
215
215
|
labelTextSize: PropTypes__default.default.string,
|
|
@@ -435,7 +435,12 @@ Button.__docgenInfo = {
|
|
|
435
435
|
"label": {
|
|
436
436
|
"description": "",
|
|
437
437
|
"type": {
|
|
438
|
-
"name": "
|
|
438
|
+
"name": "union",
|
|
439
|
+
"value": [{
|
|
440
|
+
"name": "string"
|
|
441
|
+
}, {
|
|
442
|
+
"name": "number"
|
|
443
|
+
}]
|
|
439
444
|
},
|
|
440
445
|
"required": false
|
|
441
446
|
},
|
package/dist/components/Cell.js
CHANGED
|
@@ -6,12 +6,15 @@ var clsx = require('clsx');
|
|
|
6
6
|
var index$1 = require('./Icon.js');
|
|
7
7
|
var index = require('./Text.js');
|
|
8
8
|
var index$2 = require('./Label.js');
|
|
9
|
-
var
|
|
9
|
+
var titleSize = require('../constants/componentProps/titleSize.js');
|
|
10
|
+
var textSize = require('../constants/componentProps/textSize.js');
|
|
11
|
+
var textColor = require('../constants/componentProps/textColor.js');
|
|
12
|
+
var textAlign = require('../constants/componentProps/textAlign.js');
|
|
10
13
|
var useDeviceTargetClass = require('../hooks/useDeviceTargetClass.js');
|
|
11
14
|
require('react-inlinesvg');
|
|
12
15
|
require('./Link.js');
|
|
13
16
|
require('../constants/componentProps/fill.js');
|
|
14
|
-
require('../constants/componentProps/
|
|
17
|
+
require('../constants/componentProps/size.js');
|
|
15
18
|
require('../constants/componentProps/textGradient.js');
|
|
16
19
|
require('../constants/componentProps/textStyle.js');
|
|
17
20
|
require('../constants/componentProps/textWeight.js');
|
|
@@ -32,10 +35,7 @@ require('../constants/componentProps/shape.js');
|
|
|
32
35
|
require('../constants/componentProps/strokeColor.js');
|
|
33
36
|
require('./Tooltip.js');
|
|
34
37
|
require('./Title.js');
|
|
35
|
-
require('../constants/componentProps/textAlign.js');
|
|
36
|
-
require('../constants/componentProps/titleSize.js');
|
|
37
38
|
require('../constants/componentProps/wrap.js');
|
|
38
|
-
require('../constants/componentProps/textSize.js');
|
|
39
39
|
require('../constants/componentProps/textColorActive.js');
|
|
40
40
|
require('../constants/componentProps/textColorHover.js');
|
|
41
41
|
require('lodash/castArray');
|
|
@@ -75,13 +75,16 @@ function Cell(props) {
|
|
|
75
75
|
mode,
|
|
76
76
|
size,
|
|
77
77
|
value,
|
|
78
|
+
valueTextAlign,
|
|
78
79
|
valueTextSize,
|
|
79
80
|
valueTextColor,
|
|
80
81
|
valueTextWeight,
|
|
81
82
|
title,
|
|
82
83
|
titleTextSize,
|
|
83
84
|
titleTextColor,
|
|
85
|
+
titleTextTruncate,
|
|
84
86
|
titleTextWeight,
|
|
87
|
+
titleTextWrap,
|
|
85
88
|
showTitleLabel,
|
|
86
89
|
titleLabelAppearance,
|
|
87
90
|
titleLabel,
|
|
@@ -94,7 +97,6 @@ function Cell(props) {
|
|
|
94
97
|
valueLabelTextSize,
|
|
95
98
|
valueLabelShape,
|
|
96
99
|
valueLabelSize,
|
|
97
|
-
titleTextWrap,
|
|
98
100
|
valueTextWrap,
|
|
99
101
|
zeroPadding,
|
|
100
102
|
zeroGap,
|
|
@@ -165,6 +167,7 @@ function Cell(props) {
|
|
|
165
167
|
size: titleTextSize,
|
|
166
168
|
tag: titleTag,
|
|
167
169
|
textColor: titleTextColor,
|
|
170
|
+
textTruncate: titleTextTruncate,
|
|
168
171
|
textWeight: titleTextWeight,
|
|
169
172
|
textWrap: titleTextWrap
|
|
170
173
|
}, title), (titleIcon || titleIconSrc) && /*#__PURE__*/React__default.default.createElement(index$1.Icon, {
|
|
@@ -189,6 +192,7 @@ function Cell(props) {
|
|
|
189
192
|
className: "cell__value",
|
|
190
193
|
size: valueTextSize,
|
|
191
194
|
tag: valueTag,
|
|
195
|
+
textAlign: valueTextAlign,
|
|
192
196
|
textColor: valueTextColor,
|
|
193
197
|
textWeight: valueTextWeight,
|
|
194
198
|
textWrap: valueTextWrap
|
|
@@ -223,14 +227,15 @@ Cell.propTypes = {
|
|
|
223
227
|
titleIcon: PropTypes__default.default.any,
|
|
224
228
|
titleIconFill: PropTypes__default.default.string,
|
|
225
229
|
titleIconStroke: PropTypes__default.default.string,
|
|
226
|
-
titleTextColor: PropTypes__default.default.
|
|
227
|
-
titleTextSize: PropTypes__default.default.oneOf(
|
|
230
|
+
titleTextColor: PropTypes__default.default.oneOf(textColor.default),
|
|
231
|
+
titleTextSize: PropTypes__default.default.oneOf(titleSize.default),
|
|
228
232
|
value: PropTypes__default.default.oneOfType([PropTypes__default.default.element, PropTypes__default.default.string]),
|
|
229
233
|
valueIcon: PropTypes__default.default.any,
|
|
230
234
|
valueIconFill: PropTypes__default.default.string,
|
|
231
235
|
valueIconStroke: PropTypes__default.default.string,
|
|
232
|
-
|
|
233
|
-
|
|
236
|
+
valueTextAlign: PropTypes__default.default.oneOf(textAlign.default),
|
|
237
|
+
valueTextColor: PropTypes__default.default.oneOf(textColor.default),
|
|
238
|
+
valueTextSize: PropTypes__default.default.oneOf(textSize.default),
|
|
234
239
|
onClick: PropTypes__default.default.func,
|
|
235
240
|
onMouseEnter: PropTypes__default.default.func
|
|
236
241
|
};
|
|
@@ -327,7 +332,9 @@ Cell.__docgenInfo = {
|
|
|
327
332
|
"titleTextColor": {
|
|
328
333
|
"description": "",
|
|
329
334
|
"type": {
|
|
330
|
-
"name": "
|
|
335
|
+
"name": "enum",
|
|
336
|
+
"computed": true,
|
|
337
|
+
"value": "textColorProps"
|
|
331
338
|
},
|
|
332
339
|
"required": false
|
|
333
340
|
},
|
|
@@ -336,7 +343,7 @@ Cell.__docgenInfo = {
|
|
|
336
343
|
"type": {
|
|
337
344
|
"name": "enum",
|
|
338
345
|
"computed": true,
|
|
339
|
-
"value": "
|
|
346
|
+
"value": "titleSizeProps"
|
|
340
347
|
},
|
|
341
348
|
"required": false
|
|
342
349
|
},
|
|
@@ -373,10 +380,21 @@ Cell.__docgenInfo = {
|
|
|
373
380
|
},
|
|
374
381
|
"required": false
|
|
375
382
|
},
|
|
383
|
+
"valueTextAlign": {
|
|
384
|
+
"description": "",
|
|
385
|
+
"type": {
|
|
386
|
+
"name": "enum",
|
|
387
|
+
"computed": true,
|
|
388
|
+
"value": "textAlignProps"
|
|
389
|
+
},
|
|
390
|
+
"required": false
|
|
391
|
+
},
|
|
376
392
|
"valueTextColor": {
|
|
377
393
|
"description": "",
|
|
378
394
|
"type": {
|
|
379
|
-
"name": "
|
|
395
|
+
"name": "enum",
|
|
396
|
+
"computed": true,
|
|
397
|
+
"value": "textColorProps"
|
|
380
398
|
},
|
|
381
399
|
"required": false
|
|
382
400
|
},
|
|
@@ -385,7 +403,7 @@ Cell.__docgenInfo = {
|
|
|
385
403
|
"type": {
|
|
386
404
|
"name": "enum",
|
|
387
405
|
"computed": true,
|
|
388
|
-
"value": "
|
|
406
|
+
"value": "textSizeProps"
|
|
389
407
|
},
|
|
390
408
|
"required": false
|
|
391
409
|
},
|
|
@@ -9183,13 +9183,14 @@ function DatePickerClearButton(props, ref) {
|
|
|
9183
9183
|
} = props;
|
|
9184
9184
|
const onClick = React.useCallback(event => {
|
|
9185
9185
|
datepickerRef?.current?.onClearClick(event);
|
|
9186
|
+
datepickerRef?.current?.handleFocus(event);
|
|
9186
9187
|
}, []);
|
|
9187
9188
|
return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, clearLabel && /*#__PURE__*/React__namespace.default.createElement(index$3.Label, {
|
|
9188
9189
|
className: clsx__default.default('react-datepicker__clear-label', onClick && 'cursor_type_pointer'),
|
|
9189
9190
|
label: clearLabel,
|
|
9190
|
-
labelTextSize: clearLabelTextSize,
|
|
9191
9191
|
labelTextColor: clearLabelTextColor,
|
|
9192
9192
|
labelTextColorHover: clearLabelTextColorHover,
|
|
9193
|
+
labelTextSize: clearLabelTextSize,
|
|
9193
9194
|
onClick: onClick
|
|
9194
9195
|
}), (clearIcon || clearIconSrc) && /*#__PURE__*/React__namespace.default.createElement(index$4.Icon, {
|
|
9195
9196
|
className: clsx__default.default('react-datepicker__clear-icon', onClick && 'cursor_type_pointer'),
|
|
@@ -115,7 +115,7 @@ function FormField(props) {
|
|
|
115
115
|
} = useStyles.useStyles(props);
|
|
116
116
|
return /*#__PURE__*/React__default.default.createElement("div", {
|
|
117
117
|
className: clsx__default.default(className, 'form-field', set && `form-field_set_${set}`, sizeClass, fillClass, shapeClass, directionClass),
|
|
118
|
-
"data-
|
|
118
|
+
"data-test-id": dataTestId,
|
|
119
119
|
style: formFieldStyles
|
|
120
120
|
}, label && /*#__PURE__*/React__default.default.createElement("label", {
|
|
121
121
|
htmlFor: id,
|
|
@@ -140,10 +140,10 @@ function FormField(props) {
|
|
|
140
140
|
size: clearIconSize
|
|
141
141
|
}), afterItem), /*#__PURE__*/React__default.default.createElement(index$2.Divider, {
|
|
142
142
|
className: "form-field__item-divider",
|
|
143
|
-
width: dividerWidth,
|
|
144
143
|
direction: dividerDirection,
|
|
144
|
+
fill: dividerFill,
|
|
145
145
|
size: dividerSize,
|
|
146
|
-
|
|
146
|
+
width: dividerWidth
|
|
147
147
|
})), message && /*#__PURE__*/React__default.default.createElement("div", {
|
|
148
148
|
className: "form-field__message"
|
|
149
149
|
}, /*#__PURE__*/React__default.default.createElement(index.Text, {
|
package/dist/components/Grid.js
CHANGED
|
@@ -36,7 +36,7 @@ function Grid(props) {
|
|
|
36
36
|
children,
|
|
37
37
|
className,
|
|
38
38
|
horizontalResizing,
|
|
39
|
-
|
|
39
|
+
horizontalScroll,
|
|
40
40
|
onClick,
|
|
41
41
|
type,
|
|
42
42
|
useGridSystem,
|
|
@@ -102,7 +102,7 @@ function Grid(props) {
|
|
|
102
102
|
gridWrapperInner: gridWrapperInnerStyles
|
|
103
103
|
} = useStyles.useStyles(props);
|
|
104
104
|
return /*#__PURE__*/React__default.default.createElement(Tag, {
|
|
105
|
-
className: clsx__default.default(className, 'grid', useGridSystem && `grid_state_system`,
|
|
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}`),
|
|
106
106
|
"data-tour": dataTour,
|
|
107
107
|
id: id,
|
|
108
108
|
style: gridStyles,
|
package/dist/components/Icon.js
CHANGED
|
@@ -54,26 +54,26 @@ const iconConfig = {
|
|
|
54
54
|
const Icon = /*#__PURE__*/React__default.default.forwardRef(function Icon(props, ref) {
|
|
55
55
|
const [isTooltipVisible, setIsTooltipVisible] = React.useState(false);
|
|
56
56
|
const {
|
|
57
|
-
before,
|
|
58
|
-
after,
|
|
59
57
|
Badge,
|
|
60
58
|
SvgImage,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
dataTour,
|
|
59
|
+
after,
|
|
60
|
+
before,
|
|
64
61
|
className,
|
|
62
|
+
dataTour,
|
|
63
|
+
height,
|
|
65
64
|
href,
|
|
65
|
+
id,
|
|
66
|
+
imageSrc,
|
|
66
67
|
link,
|
|
67
|
-
linkTarget,
|
|
68
68
|
linkRel,
|
|
69
|
-
|
|
70
|
-
height,
|
|
69
|
+
linkTarget,
|
|
71
70
|
showTooltip,
|
|
71
|
+
tooltipAppearance,
|
|
72
72
|
tooltipText,
|
|
73
73
|
tooltipTextSize,
|
|
74
74
|
tooltipTitle,
|
|
75
75
|
tooltipTitleSize,
|
|
76
|
-
|
|
76
|
+
width,
|
|
77
77
|
onClick
|
|
78
78
|
} = props;
|
|
79
79
|
const svgSizes = React.useMemo(() => {
|
|
@@ -85,7 +85,7 @@ const Icon = /*#__PURE__*/React__default.default.forwardRef(function Icon(props,
|
|
|
85
85
|
sizes.height = height;
|
|
86
86
|
}
|
|
87
87
|
return sizes;
|
|
88
|
-
}, []);
|
|
88
|
+
}, [height, width]);
|
|
89
89
|
const cursorClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
90
90
|
prefix: 'cursor_',
|
|
91
91
|
propsKey: 'cursor'
|
|
@@ -177,7 +177,7 @@ const Icon = /*#__PURE__*/React__default.default.forwardRef(function Icon(props,
|
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
179
|
return null;
|
|
180
|
-
}, [SvgImage, imageSrc]);
|
|
180
|
+
}, [SvgImage, svgSizes, imageSrc]);
|
|
181
181
|
return /*#__PURE__*/React__default.default.createElement("div", {
|
|
182
182
|
className: clsx__default.default(className, 'icon', fillClass, fillHoverClass, fillSizeClass, fillDisabledClass, iconFillClass, iconFillHoverClass, iconFillDisabledClass, shapeClass, iconStrokeClass, iconStrokeHoverClass, iconStrokeDisabledClass, borderColorClass, borderColorHoverClass, borderWidthClass, borderTypeClass, cursorClass, Badge && 'icon_type_with-badge', (link || href || onClick) && 'cursor_type_pointer'),
|
|
183
183
|
"data-tour": dataTour,
|
|
@@ -194,8 +194,8 @@ const Icon = /*#__PURE__*/React__default.default.forwardRef(function Icon(props,
|
|
|
194
194
|
rel: linkRel,
|
|
195
195
|
target: linkTarget
|
|
196
196
|
}, before, ImageComponent, after, Badge, isTooltipVisible && showTooltip && /*#__PURE__*/React__default.default.createElement(index$1.Tooltip, {
|
|
197
|
-
className: clsx__default.default(className, 'icon__tooltip', alignmentClass),
|
|
198
197
|
appearance: tooltipAppearance,
|
|
198
|
+
className: clsx__default.default(className, 'icon__tooltip', alignmentClass),
|
|
199
199
|
text: tooltipText,
|
|
200
200
|
textSize: tooltipTextSize,
|
|
201
201
|
title: tooltipTitle,
|
|
@@ -203,13 +203,18 @@ const Icon = /*#__PURE__*/React__default.default.forwardRef(function Icon(props,
|
|
|
203
203
|
})));
|
|
204
204
|
});
|
|
205
205
|
Icon.propTypes = {
|
|
206
|
+
after: PropTypes__default.default.any,
|
|
207
|
+
// "bool" type is valid for condition constructions, e.g. "Boolean(some) && <Badge>"
|
|
208
|
+
Badge: PropTypes__default.default.oneOfType([PropTypes__default.default.element, PropTypes__default.default.bool]),
|
|
209
|
+
before: PropTypes__default.default.any,
|
|
206
210
|
borderColor: PropTypes__default.default.oneOf(borderColor.default),
|
|
207
211
|
borderType: PropTypes__default.default.oneOf(borderType.default),
|
|
208
212
|
className: PropTypes__default.default.string,
|
|
213
|
+
dataTour: PropTypes__default.default.string,
|
|
209
214
|
fill: PropTypes__default.default.oneOf(fill.default),
|
|
210
215
|
fillDesktop: PropTypes__default.default.oneOf(fill.default),
|
|
211
216
|
fillMobile: PropTypes__default.default.oneOf(fill.default),
|
|
212
|
-
fillSize: PropTypes__default.default.string,
|
|
217
|
+
fillSize: PropTypes__default.default.oneOfType([PropTypes__default.default.string, PropTypes__default.default.number]),
|
|
213
218
|
fillSizeDesktop: PropTypes__default.default.string,
|
|
214
219
|
fillSizeMobile: PropTypes__default.default.string,
|
|
215
220
|
fillSizeTablet: PropTypes__default.default.string,
|
|
@@ -220,6 +225,7 @@ Icon.propTypes = {
|
|
|
220
225
|
iconStrokeDesktop: PropTypes__default.default.oneOf(strokeColor.default),
|
|
221
226
|
iconStrokeMobile: PropTypes__default.default.oneOf(strokeColor.default),
|
|
222
227
|
iconStrokeTablet: PropTypes__default.default.oneOf(strokeColor.default),
|
|
228
|
+
id: PropTypes__default.default.string,
|
|
223
229
|
imageSrc: PropTypes__default.default.string,
|
|
224
230
|
link: PropTypes__default.default.string,
|
|
225
231
|
LinkComponent: PropTypes__default.default.any,
|
|
@@ -229,11 +235,17 @@ Icon.propTypes = {
|
|
|
229
235
|
shapeDesktop: PropTypes__default.default.oneOf(shape.default),
|
|
230
236
|
shapeMobile: PropTypes__default.default.oneOf(shape.default),
|
|
231
237
|
shapeTablet: PropTypes__default.default.oneOf(shape.default),
|
|
238
|
+
showTooltip: PropTypes__default.default.bool,
|
|
232
239
|
size: PropTypes__default.default.oneOf(iconSize.default),
|
|
233
240
|
sizeDesktop: PropTypes__default.default.oneOf(iconSize.default),
|
|
234
241
|
sizeMobile: PropTypes__default.default.oneOf(iconSize.default),
|
|
235
242
|
sizeTablet: PropTypes__default.default.oneOf(iconSize.default),
|
|
236
|
-
SvgImage: PropTypes__default.default.oneOfType([PropTypes__default.default.
|
|
243
|
+
SvgImage: PropTypes__default.default.oneOfType([PropTypes__default.default.elementType, PropTypes__default.default.func, PropTypes__default.default.object]),
|
|
244
|
+
tooltipAppearance: PropTypes__default.default.string,
|
|
245
|
+
tooltipText: PropTypes__default.default.string,
|
|
246
|
+
tooltipTextSize: PropTypes__default.default.oneOfType([PropTypes__default.default.string, PropTypes__default.default.number]),
|
|
247
|
+
tooltipTitle: PropTypes__default.default.string,
|
|
248
|
+
tooltipTitleSize: PropTypes__default.default.oneOfType([PropTypes__default.default.string, PropTypes__default.default.number]),
|
|
237
249
|
width: PropTypes__default.default.string,
|
|
238
250
|
onClick: PropTypes__default.default.func
|
|
239
251
|
};
|
|
@@ -259,6 +271,32 @@ Icon.__docgenInfo = {
|
|
|
259
271
|
},
|
|
260
272
|
"required": false
|
|
261
273
|
},
|
|
274
|
+
"after": {
|
|
275
|
+
"description": "",
|
|
276
|
+
"type": {
|
|
277
|
+
"name": "any"
|
|
278
|
+
},
|
|
279
|
+
"required": false
|
|
280
|
+
},
|
|
281
|
+
"Badge": {
|
|
282
|
+
"description": "",
|
|
283
|
+
"type": {
|
|
284
|
+
"name": "union",
|
|
285
|
+
"value": [{
|
|
286
|
+
"name": "element"
|
|
287
|
+
}, {
|
|
288
|
+
"name": "bool"
|
|
289
|
+
}]
|
|
290
|
+
},
|
|
291
|
+
"required": false
|
|
292
|
+
},
|
|
293
|
+
"before": {
|
|
294
|
+
"description": "",
|
|
295
|
+
"type": {
|
|
296
|
+
"name": "any"
|
|
297
|
+
},
|
|
298
|
+
"required": false
|
|
299
|
+
},
|
|
262
300
|
"borderColor": {
|
|
263
301
|
"description": "",
|
|
264
302
|
"type": {
|
|
@@ -284,6 +322,13 @@ Icon.__docgenInfo = {
|
|
|
284
322
|
},
|
|
285
323
|
"required": false
|
|
286
324
|
},
|
|
325
|
+
"dataTour": {
|
|
326
|
+
"description": "",
|
|
327
|
+
"type": {
|
|
328
|
+
"name": "string"
|
|
329
|
+
},
|
|
330
|
+
"required": false
|
|
331
|
+
},
|
|
287
332
|
"fill": {
|
|
288
333
|
"description": "",
|
|
289
334
|
"type": {
|
|
@@ -314,7 +359,12 @@ Icon.__docgenInfo = {
|
|
|
314
359
|
"fillSize": {
|
|
315
360
|
"description": "",
|
|
316
361
|
"type": {
|
|
317
|
-
"name": "
|
|
362
|
+
"name": "union",
|
|
363
|
+
"value": [{
|
|
364
|
+
"name": "string"
|
|
365
|
+
}, {
|
|
366
|
+
"name": "number"
|
|
367
|
+
}]
|
|
318
368
|
},
|
|
319
369
|
"required": false
|
|
320
370
|
},
|
|
@@ -398,6 +448,13 @@ Icon.__docgenInfo = {
|
|
|
398
448
|
},
|
|
399
449
|
"required": false
|
|
400
450
|
},
|
|
451
|
+
"id": {
|
|
452
|
+
"description": "",
|
|
453
|
+
"type": {
|
|
454
|
+
"name": "string"
|
|
455
|
+
},
|
|
456
|
+
"required": false
|
|
457
|
+
},
|
|
401
458
|
"imageSrc": {
|
|
402
459
|
"description": "",
|
|
403
460
|
"type": {
|
|
@@ -462,6 +519,13 @@ Icon.__docgenInfo = {
|
|
|
462
519
|
},
|
|
463
520
|
"required": false
|
|
464
521
|
},
|
|
522
|
+
"showTooltip": {
|
|
523
|
+
"description": "",
|
|
524
|
+
"type": {
|
|
525
|
+
"name": "bool"
|
|
526
|
+
},
|
|
527
|
+
"required": false
|
|
528
|
+
},
|
|
465
529
|
"size": {
|
|
466
530
|
"description": "",
|
|
467
531
|
"type": {
|
|
@@ -503,7 +567,7 @@ Icon.__docgenInfo = {
|
|
|
503
567
|
"type": {
|
|
504
568
|
"name": "union",
|
|
505
569
|
"value": [{
|
|
506
|
-
"name": "
|
|
570
|
+
"name": "elementType"
|
|
507
571
|
}, {
|
|
508
572
|
"name": "func"
|
|
509
573
|
}, {
|
|
@@ -512,6 +576,51 @@ Icon.__docgenInfo = {
|
|
|
512
576
|
},
|
|
513
577
|
"required": false
|
|
514
578
|
},
|
|
579
|
+
"tooltipAppearance": {
|
|
580
|
+
"description": "",
|
|
581
|
+
"type": {
|
|
582
|
+
"name": "string"
|
|
583
|
+
},
|
|
584
|
+
"required": false
|
|
585
|
+
},
|
|
586
|
+
"tooltipText": {
|
|
587
|
+
"description": "",
|
|
588
|
+
"type": {
|
|
589
|
+
"name": "string"
|
|
590
|
+
},
|
|
591
|
+
"required": false
|
|
592
|
+
},
|
|
593
|
+
"tooltipTextSize": {
|
|
594
|
+
"description": "",
|
|
595
|
+
"type": {
|
|
596
|
+
"name": "union",
|
|
597
|
+
"value": [{
|
|
598
|
+
"name": "string"
|
|
599
|
+
}, {
|
|
600
|
+
"name": "number"
|
|
601
|
+
}]
|
|
602
|
+
},
|
|
603
|
+
"required": false
|
|
604
|
+
},
|
|
605
|
+
"tooltipTitle": {
|
|
606
|
+
"description": "",
|
|
607
|
+
"type": {
|
|
608
|
+
"name": "string"
|
|
609
|
+
},
|
|
610
|
+
"required": false
|
|
611
|
+
},
|
|
612
|
+
"tooltipTitleSize": {
|
|
613
|
+
"description": "",
|
|
614
|
+
"type": {
|
|
615
|
+
"name": "union",
|
|
616
|
+
"value": [{
|
|
617
|
+
"name": "string"
|
|
618
|
+
}, {
|
|
619
|
+
"name": "number"
|
|
620
|
+
}]
|
|
621
|
+
},
|
|
622
|
+
"required": false
|
|
623
|
+
},
|
|
515
624
|
"width": {
|
|
516
625
|
"description": "",
|
|
517
626
|
"type": {
|
package/dist/components/Input.js
CHANGED
|
@@ -108,13 +108,6 @@ const Input = /*#__PURE__*/React__default.default.forwardRef(function Input(prop
|
|
|
108
108
|
prefix: 'width_',
|
|
109
109
|
propsKey: 'width'
|
|
110
110
|
});
|
|
111
|
-
|
|
112
|
-
// const disabledClasses = {
|
|
113
|
-
// 'borderColorClass': 'borderColorDisabledClass',
|
|
114
|
-
// 'placeholderTextColorClass': 'placeholderTextColorDisabledClass',
|
|
115
|
-
// 'textColorClass': 'textColorDisabledClass'
|
|
116
|
-
// }
|
|
117
|
-
|
|
118
111
|
return /*#__PURE__*/React__default.default.createElement("input", {
|
|
119
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()),
|
|
120
113
|
type: type,
|
|
@@ -123,7 +116,7 @@ const Input = /*#__PURE__*/React__default.default.forwardRef(function Input(prop
|
|
|
123
116
|
ref: ref,
|
|
124
117
|
disabled: isDisabled,
|
|
125
118
|
placeholder: placeholder,
|
|
126
|
-
"data-
|
|
119
|
+
"data-test-id": dataTestId || (name ? `${name}Input` : 'input'),
|
|
127
120
|
value: value,
|
|
128
121
|
onBlur: onBlur,
|
|
129
122
|
onChange: onChange,
|