intelicoreact 1.1.31 → 1.1.32
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/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +4 -2
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +20 -5
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.scss +19 -9
- package/dist/Atomic/FormElements/Label/Label.js +3 -1
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +0 -1
- package/dist/Atomic/UI/Hint/Hint.js +5 -4
- package/dist/Molecular/FormElement/FormElement.js +4 -2
- package/package.json +1 -1
|
@@ -25,7 +25,7 @@ var _Input = _interopRequireDefault(require("../Input/Input"));
|
|
|
25
25
|
|
|
26
26
|
require("./FormattedRawSSN.scss");
|
|
27
27
|
|
|
28
|
-
var _excluded = ["value", "onChange", "maskChar", "testId"];
|
|
28
|
+
var _excluded = ["value", "onChange", "maskChar", "testId", "isHiddenDefault"];
|
|
29
29
|
|
|
30
30
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
31
|
|
|
@@ -39,6 +39,8 @@ var FormattedRawSSN = function FormattedRawSSN(_ref) {
|
|
|
39
39
|
_ref$maskChar = _ref.maskChar,
|
|
40
40
|
maskChar = _ref$maskChar === void 0 ? '*' : _ref$maskChar,
|
|
41
41
|
testId = _ref.testId,
|
|
42
|
+
_ref$isHiddenDefault = _ref.isHiddenDefault,
|
|
43
|
+
isHiddenDefault = _ref$isHiddenDefault === void 0 ? true : _ref$isHiddenDefault,
|
|
42
44
|
args = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
43
45
|
|
|
44
46
|
var _useState = (0, _react.useState)(value !== null && value !== void 0 ? value : ''),
|
|
@@ -46,7 +48,7 @@ var FormattedRawSSN = function FormattedRawSSN(_ref) {
|
|
|
46
48
|
SSN = _useState2[0],
|
|
47
49
|
setSSN = _useState2[1];
|
|
48
50
|
|
|
49
|
-
var _useState3 = (0, _react.useState)(
|
|
51
|
+
var _useState3 = (0, _react.useState)(isHiddenDefault),
|
|
50
52
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
51
53
|
isHidden = _useState4[0],
|
|
52
54
|
setIsHidden = _useState4[1];
|
|
@@ -33,7 +33,7 @@ var _Spinner = _interopRequireDefault(require("../../Layout/Spinner/Spinner"));
|
|
|
33
33
|
|
|
34
34
|
require("./InputWithAction.scss");
|
|
35
35
|
|
|
36
|
-
var _excluded = ["className", "inputClassName", "isHideAction", "actionLabel", "doAction", "actionContent", "actionProps", "isNoChangeAfterAction", "isWithCopy", "copyLabel", "copy", "disabled", "isInputZoneDisabled", "isInputDisabled", "isLodaing", "onChange", "value"];
|
|
36
|
+
var _excluded = ["className", "inputClassName", "isHideAction", "actionLabel", "doAction", "actionContent", "actionProps", "isNoChangeAfterAction", "isWithCopy", "copyLabel", "copy", "copyIcon", "isNoCopyIcon", "isCopyIconRight", "copyButtonVariant", "disabled", "isInputZoneDisabled", "isInputDisabled", "isLodaing", "onChange", "value", "testId"];
|
|
37
37
|
|
|
38
38
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
39
39
|
|
|
@@ -60,12 +60,18 @@ var InputWithAction = /*#__PURE__*/_react.default.forwardRef(function (props, re
|
|
|
60
60
|
_props$copyLabel = props.copyLabel,
|
|
61
61
|
copyLabel = _props$copyLabel === void 0 ? 'Copy' : _props$copyLabel,
|
|
62
62
|
_copy = props.copy,
|
|
63
|
+
copyIcon = props.copyIcon,
|
|
64
|
+
isNoCopyIcon = props.isNoCopyIcon,
|
|
65
|
+
isCopyIconRight = props.isCopyIconRight,
|
|
66
|
+
_props$copyButtonVari = props.copyButtonVariant,
|
|
67
|
+
copyButtonVariant = _props$copyButtonVari === void 0 ? 'dark-outline' : _props$copyButtonVari,
|
|
63
68
|
disabled = props.disabled,
|
|
64
69
|
isInputZoneDisabled = props.isInputZoneDisabled,
|
|
65
70
|
isInputDisabled = props.isInputDisabled,
|
|
66
71
|
isLodaing = props.isLodaing,
|
|
67
72
|
onChange = props.onChange,
|
|
68
73
|
value = props.value,
|
|
74
|
+
testId = props.testId,
|
|
69
75
|
inputProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
70
76
|
|
|
71
77
|
var _useState = (0, _react.useState)(false),
|
|
@@ -117,23 +123,32 @@ var InputWithAction = /*#__PURE__*/_react.default.forwardRef(function (props, re
|
|
|
117
123
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
118
124
|
className: (0, _classnames.default)("".concat(RC, "__input-zone"), (_cn2 = {}, (0, _defineProperty2.default)(_cn2, "".concat(RC, "__input-zone_disabled"), isInputZoneDisabled), (0, _defineProperty2.default)(_cn2, "".concat(RC, "__input-zone_input-disabled"), isInputDisabled), _cn2))
|
|
119
125
|
}, /*#__PURE__*/_react.default.createElement(_Input.default, (0, _extends2.default)({}, inputProps, {
|
|
126
|
+
testId: "".concat(testId, "-input"),
|
|
120
127
|
ref: ref,
|
|
121
128
|
value: value,
|
|
122
129
|
disabled: isInputDisabled,
|
|
123
130
|
onChange: onChange,
|
|
124
131
|
className: (0, _classnames.default)("".concat(RC, "__input"), inputClassName)
|
|
125
132
|
})), !isHideAction && actionContent, !isHideAction && !actionContent && /*#__PURE__*/_react.default.createElement("div", {
|
|
126
|
-
className: (0, _classnames.default)("".concat(RC, "__action-container"))
|
|
133
|
+
className: (0, _classnames.default)("".concat(RC, "__action-container"))
|
|
134
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
135
|
+
className: (0, _classnames.default)("".concat(RC, "__action-label")),
|
|
127
136
|
onClick: function onClick() {
|
|
128
137
|
return handle.doAction();
|
|
129
|
-
}
|
|
130
|
-
|
|
138
|
+
},
|
|
139
|
+
testId: "".concat(testId, "-action-label")
|
|
140
|
+
}, actionLabel)), isLocalLoading && /*#__PURE__*/_react.default.createElement(_Spinner.default, {
|
|
131
141
|
size: "small"
|
|
132
142
|
})), isWithCopy && /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
143
|
+
testId: "".concat(testId, "-copy-button"),
|
|
133
144
|
className: "".concat(RC, "__coppy-button"),
|
|
134
145
|
onClick: function onClick() {
|
|
135
146
|
return handle.copy();
|
|
136
|
-
}
|
|
147
|
+
},
|
|
148
|
+
icon: copyIcon,
|
|
149
|
+
noIcon: isNoCopyIcon,
|
|
150
|
+
isIconRight: isCopyIconRight,
|
|
151
|
+
variant: copyButtonVariant
|
|
137
152
|
}, copyLabel));
|
|
138
153
|
});
|
|
139
154
|
|
|
@@ -32,15 +32,25 @@
|
|
|
32
32
|
|
|
33
33
|
background-color: transparent;
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&__action-label {
|
|
39
|
+
background-color: transparent;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
user-select: none;
|
|
42
|
+
|
|
43
|
+
font-family: 'Roboto';
|
|
44
|
+
font-style: normal;
|
|
45
|
+
font-weight: 400;
|
|
46
|
+
font-size: 13px;
|
|
47
|
+
line-height: 20px;
|
|
48
|
+
color: #6B81DD;
|
|
40
49
|
}
|
|
41
50
|
|
|
42
51
|
&__coppy-button {
|
|
43
|
-
|
|
52
|
+
width: 63px;
|
|
53
|
+
margin-left: 4px;
|
|
44
54
|
user-select: none
|
|
45
55
|
}
|
|
46
56
|
|
|
@@ -56,7 +66,7 @@
|
|
|
56
66
|
background-color: #F7F8FA;
|
|
57
67
|
}
|
|
58
68
|
}
|
|
59
|
-
|
|
69
|
+
|
|
60
70
|
&__input-zone_disabled {
|
|
61
71
|
opacity: 0.5;
|
|
62
72
|
pointer-events: none;
|
|
@@ -92,8 +102,8 @@
|
|
|
92
102
|
}
|
|
93
103
|
|
|
94
104
|
.lds-ring_small {
|
|
95
|
-
width: 20px
|
|
96
|
-
height: 20px
|
|
105
|
+
width: 20px !important;;
|
|
106
|
+
height: 20px !important;;
|
|
97
107
|
|
|
98
108
|
& div {
|
|
99
109
|
border-width: 3px !important;
|
|
@@ -22,6 +22,7 @@ var Label = function Label(_ref) {
|
|
|
22
22
|
hint = _ref.hint,
|
|
23
23
|
isRequired = _ref.isRequired,
|
|
24
24
|
isLabelBolt = _ref.isLabelBolt,
|
|
25
|
+
onClickHintCallback = _ref.onClickHintCallback,
|
|
25
26
|
_ref$error = _ref.error,
|
|
26
27
|
error = _ref$error === void 0 ? null : _ref$error;
|
|
27
28
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -34,7 +35,8 @@ var Label = function Label(_ref) {
|
|
|
34
35
|
}, "*"), hint && /*#__PURE__*/_react.default.createElement(_Hint.default, {
|
|
35
36
|
hint: hint.text,
|
|
36
37
|
side: hint.hintSide,
|
|
37
|
-
className: "label-hint"
|
|
38
|
+
className: "label-hint",
|
|
39
|
+
onClickCallback: onClickHintCallback
|
|
38
40
|
}));
|
|
39
41
|
};
|
|
40
42
|
|
|
@@ -40,7 +40,6 @@ var SwitcherRange = function SwitcherRange(_ref) {
|
|
|
40
40
|
withZero = _ref.withZero,
|
|
41
41
|
isPrice = _ref.isPrice,
|
|
42
42
|
inputsType = _ref.inputsType;
|
|
43
|
-
console.log(validateErrors, 'switcher range validate error');
|
|
44
43
|
|
|
45
44
|
var _useState = (0, _react.useState)(''),
|
|
46
45
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -13,14 +13,14 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
13
13
|
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
15
|
|
|
16
|
+
var _reactDom = require("react-dom");
|
|
17
|
+
|
|
16
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
19
|
|
|
18
20
|
var _reactFeather = require("react-feather");
|
|
19
21
|
|
|
20
22
|
require("./Hint.scss");
|
|
21
23
|
|
|
22
|
-
var _reactDom = require("react-dom");
|
|
23
|
-
|
|
24
24
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
25
|
|
|
26
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -40,6 +40,7 @@ var Hint = function Hint(_ref) {
|
|
|
40
40
|
variant = _ref$variant === void 0 ? 'filled' : _ref$variant,
|
|
41
41
|
_ref$handleOpenType = _ref.handleOpenType,
|
|
42
42
|
handleOpenType = _ref$handleOpenType === void 0 ? 'click' : _ref$handleOpenType,
|
|
43
|
+
onClickCallback = _ref.onClickCallback,
|
|
43
44
|
key = _ref.key,
|
|
44
45
|
id = _ref.id;
|
|
45
46
|
var hintId = (_ref2 = key !== null && key !== void 0 ? key : id) !== null && _ref2 !== void 0 ? _ref2 : time;
|
|
@@ -50,7 +51,7 @@ var Hint = function Hint(_ref) {
|
|
|
50
51
|
setIsOpen = _useState2[1];
|
|
51
52
|
|
|
52
53
|
var hintRef = (0, _react.useRef)(null);
|
|
53
|
-
var
|
|
54
|
+
var isCallbackExist = typeof onClickCallback === 'function';
|
|
54
55
|
|
|
55
56
|
var handleClickOutside = function handleClickOutside(event) {
|
|
56
57
|
if (!getHintContainer().contains(event === null || event === void 0 ? void 0 : event.target)) {
|
|
@@ -127,7 +128,7 @@ var Hint = function Hint(_ref) {
|
|
|
127
128
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
128
129
|
"data-testid": 'test-hint',
|
|
129
130
|
onClick: function onClick() {
|
|
130
|
-
return handleOpenType === 'click' && setIsOpen(!isOpen);
|
|
131
|
+
return handleOpenType === 'click' && (isCallbackExist ? onClickCallback() : setIsOpen(!isOpen));
|
|
131
132
|
},
|
|
132
133
|
onMouseEnter: function onMouseEnter() {
|
|
133
134
|
return handleOpenType === 'hover' && setIsOpen(!isOpen);
|
|
@@ -32,7 +32,8 @@ var FormElement = function FormElement(_ref) {
|
|
|
32
32
|
hint = _ref.hint,
|
|
33
33
|
isLabelBolt = _ref.isLabelBolt,
|
|
34
34
|
isNoLabel = _ref.isNoLabel,
|
|
35
|
-
alert = _ref.alert
|
|
35
|
+
alert = _ref.alert,
|
|
36
|
+
onClickHintCallback = _ref.onClickHintCallback;
|
|
36
37
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
37
38
|
className: (0, _classnames.default)(className, RC)
|
|
38
39
|
}, label && !isNoLabel && /*#__PURE__*/_react.default.createElement(_Label.default, {
|
|
@@ -40,7 +41,8 @@ var FormElement = function FormElement(_ref) {
|
|
|
40
41
|
label: label,
|
|
41
42
|
hint: hint,
|
|
42
43
|
isRequired: required,
|
|
43
|
-
isLabelBolt: isLabelBolt
|
|
44
|
+
isLabelBolt: isLabelBolt,
|
|
45
|
+
onClickHintCallback: onClickHintCallback
|
|
44
46
|
}), children, error && /*#__PURE__*/_react.default.createElement("span", {
|
|
45
47
|
className: (0, _classnames.default)("".concat(RC, "__error"), (0, _defineProperty2.default)({}, "".concat(RC, "__error--with-alert"), alert))
|
|
46
48
|
}, error), alert && /*#__PURE__*/_react.default.createElement(_Alert.default, (0, _extends2.default)({
|