intelicoreact 0.1.64 → 0.1.67

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.
@@ -962,7 +962,9 @@ function InputMask() {
962
962
  ++valueCharIndex;
963
963
  });
964
964
  }
965
- }, [isMaskRendered, value, isInitValue]); // Focus Observer
965
+ }, [isMaskRendered,
966
+ /*value,*/
967
+ isInitValue]); // Focus Observer
966
968
 
967
969
  (0, _react.useEffect)(function () {
968
970
  if (!isFocused) {
@@ -979,8 +981,8 @@ function InputMask() {
979
981
  (0, _react.useEffect)(function () {
980
982
  if (!isMaskRendered) return false;
981
983
  setError(false);
982
- clearErrorMessage();
983
- console.log('getClearInnerValueAsString', getClearInnerValueAsString());
984
+ clearErrorMessage(); //console.log('getClearInnerValueAsString', getClearInnerValueAsString())
985
+
984
986
  onChangeProp(getClearInnerValueAsString(), getInnerValueAsString({
985
987
  replaceSpace: true
986
988
  }));
@@ -70,6 +70,7 @@
70
70
  }
71
71
 
72
72
  &__item {
73
+ position: relative;
73
74
  padding: 10px 10px 14px 10px;
74
75
  cursor: pointer;
75
76
  font-size: 13px;
@@ -77,19 +78,38 @@
77
78
  border-bottom: 1px solid #cfcfcf;
78
79
  user-select: none;
79
80
  margin-bottom: -1px;
80
- border-bottom: 2px solid transparent;
81
- opacity: 65%;
82
81
  text-decoration: none !important;
82
+ display: flex;
83
+ align-items: center;
84
+ justify-content: center;
85
+ transition: all 0.2s ease-out;
86
+
87
+ &::after {
88
+ content: "";
89
+ width: 0;
90
+ height: 2px;
91
+ position: absolute;
92
+ bottom: 0;
93
+ background-color: #6b81dd;
94
+ transition: all 0.2s ease-out;
95
+ }
96
+
83
97
  &:hover {
84
- border-bottom: 2px solid rgba(107, 129, 221, 0.65);
85
- opacity: 100%;
98
+ &::after {
99
+ width: 50%;
100
+ opacity: 0.6;
101
+ }
86
102
  }
87
103
 
88
104
  &.active {
89
- border-bottom: 2px solid #6b81dd;
90
105
  font-weight: 500;
91
106
  cursor: default;
92
107
  opacity: 100%;
108
+
109
+ &::after {
110
+ width: 100%;
111
+ opacity: 1;
112
+ }
93
113
  }
94
114
  }
95
115
 
@@ -80,11 +80,11 @@ var formatToCutOffDotAtTheEnd = function formatToCutOffDotAtTheEnd(inputValue) {
80
80
 
81
81
  exports.formatToCutOffDotAtTheEnd = formatToCutOffDotAtTheEnd;
82
82
 
83
- var formatNumberValueToMask = function formatNumberValueToMask() {
84
- var inputValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
85
- var settings = arguments.length > 1 ? arguments[1] : undefined;
83
+ var formatNumberValueToMask = function formatNumberValueToMask(inputValue, settings) {
84
+ var _inputValue$toString;
85
+
86
+ var safelyInputValue = typeof inputValue !== 'string' ? (inputValue === null || inputValue === void 0 ? void 0 : (_inputValue$toString = inputValue.toString) === null || _inputValue$toString === void 0 ? void 0 : _inputValue$toString.call(inputValue)) || '' : inputValue; // default valueSymbol === 'n', default mask === 'nnn-nnn-nnnn'
86
87
 
87
- // default valueSymbol === 'n', default mask === 'nnn-nnn-nnnn'
88
88
  var _ref = settings || {},
89
89
  _ref$mask = _ref.mask,
90
90
  mask = _ref$mask === void 0 ? 'XXX-XXX-XXXX' : _ref$mask,
@@ -98,7 +98,7 @@ var formatNumberValueToMask = function formatNumberValueToMask() {
98
98
  acc.newValue.push(item === valueSymbol && acc.value.length ? acc.value.shift() : item);
99
99
  return acc;
100
100
  }, {
101
- value: inputValue.split('').filter(function (sym) {
101
+ value: safelyInputValue.split('').filter(function (sym) {
102
102
  return /[0-9]/g.test(sym);
103
103
  }),
104
104
  newValue: [],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "0.1.64",
4
- "description": "fix UserBox crush",
3
+ "version": "0.1.67",
4
+ "description": "fix input mask cycling",
5
5
  "main": "dist/index.js",
6
6
  "files": [
7
7
  "dist/*",
@@ -11,18 +11,19 @@
11
11
  ],
12
12
  "scripts": {
13
13
  "test": "echo \"Error: no test specified\" && exit 1",
14
- "build": "babel src --out-dir dist --copy-files --no-copy-ignored"
14
+ "build": "node ../../IntelicoKitVersioningBot/main.js && babel src --out-dir dist --copy-files --no-copy-ignored",
15
+ "release": "babel src --out-dir dist --copy-files --no-copy-ignored && npm publish && node ../../IntelicoKitVersioningBot/main.js"
15
16
  },
16
17
  "author": "Andrey Isakov",
17
18
  "license": "ISC",
18
19
  "dependencies": {
20
+ "anme": "^1.0.1",
21
+ "classnames": "^2.3.1",
19
22
  "moment": "^2.29.1",
20
23
  "moment-timezone": "^0.5.34",
21
24
  "react": "^17.0.2",
22
25
  "react-feather": "^2.0.9",
23
- "react-input-mask": "^2.0.4",
24
- "classnames": "^2.3.1",
25
- "anme": "^1.0.1"
26
+ "react-input-mask": "^2.0.4"
26
27
  },
27
28
  "devDependencies": {
28
29
  "@babel/cli": "^7.15.7",
@@ -1,43 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _react = _interopRequireDefault(require("react"));
11
-
12
- var _classnames = _interopRequireDefault(require("classnames"));
13
-
14
- var _Label = _interopRequireDefault(require("../Label/Label"));
15
-
16
- require("./FormElement.scss");
17
-
18
- var RC = 'form-element';
19
-
20
- var FormElement = function FormElement(_ref) {
21
- var label = _ref.label,
22
- required = _ref.required,
23
- children = _ref.children,
24
- error = _ref.error,
25
- className = _ref.className,
26
- hint = _ref.hint,
27
- isLabelBolt = _ref.isLabelBolt,
28
- isNoLabel = _ref.isNoLabel;
29
- return /*#__PURE__*/_react.default.createElement("div", {
30
- className: (0, _classnames.default)(className, RC)
31
- }, label && !isNoLabel && /*#__PURE__*/_react.default.createElement(_Label.default, {
32
- className: "".concat(RC, "__label"),
33
- label: label,
34
- hint: hint,
35
- isRequired: required,
36
- isLabelBolt: isLabelBolt
37
- }), children, error && /*#__PURE__*/_react.default.createElement("span", {
38
- className: "".concat(RC, "__error")
39
- }, error));
40
- };
41
-
42
- var _default = FormElement;
43
- exports.default = _default;
@@ -1,12 +0,0 @@
1
- .form-element {
2
- position: relative;
3
- }
4
-
5
- .form-element__error {
6
- margin-top: 2px;
7
- margin-left: 1px;
8
- position: absolute;
9
- display: block;
10
- font-size: 10px;
11
- color: #f06d8d;
12
- }