@citygross/components 0.7.121 → 0.7.122
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.
|
@@ -10,7 +10,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
11
11
|
|
|
12
12
|
var ZipCodeInput = function (_a) {
|
|
13
|
-
var setZipCode = _a.setZipCode, verified = _a.verified, setVerified = _a.setVerified, backgroundColor = _a.backgroundColor, verifiedBackground = _a.verifiedBackground;
|
|
13
|
+
var setZipCode = _a.setZipCode, verified = _a.verified, setVerified = _a.setVerified, backgroundColor = _a.backgroundColor, verifiedBackground = _a.verifiedBackground, autoFocus = _a.autoFocus;
|
|
14
14
|
var inputRefs = React.useRef([]);
|
|
15
15
|
var createZipCode = function () {
|
|
16
16
|
var zipCode = 0;
|
|
@@ -62,7 +62,7 @@ var ZipCodeInput = function (_a) {
|
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
return (React__default["default"].createElement(ZipCodeInput_styles.InputWrapper, null, Array.from(Array(5).keys()).map(function (index) { return (React__default["default"].createElement("div", { key: index },
|
|
65
|
-
React__default["default"].createElement(ZipCodeInput_styles.ZipCodeInputBox, { type: "number", onInput: function (e) { return (e.currentTarget.value = e.currentTarget.value.slice(0, 1)); }, onKeyUp: function (e) { return handleInput(index, e); }, verified: verified, backgroundColor: backgroundColor, verifiedBackground: verifiedBackground, marginLeft: index === 3, ref: function (ref) { return (inputRefs.current[index] = ref); } }))); })));
|
|
65
|
+
React__default["default"].createElement(ZipCodeInput_styles.ZipCodeInputBox, { type: "number", onInput: function (e) { return (e.currentTarget.value = e.currentTarget.value.slice(0, 1)); }, onKeyUp: function (e) { return handleInput(index, e); }, verified: verified, backgroundColor: backgroundColor, verifiedBackground: verifiedBackground, marginLeft: index === 3, ref: function (ref) { return (inputRefs.current[index] = ref); }, autoFocus: index === 0 && autoFocus }))); })));
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
exports.ZipCodeInput = ZipCodeInput;
|
|
@@ -2,7 +2,7 @@ import React, { useRef } from 'react';
|
|
|
2
2
|
import { InputWrapper, ZipCodeInputBox } from './ZipCodeInput.styles.js';
|
|
3
3
|
|
|
4
4
|
var ZipCodeInput = function (_a) {
|
|
5
|
-
var setZipCode = _a.setZipCode, verified = _a.verified, setVerified = _a.setVerified, backgroundColor = _a.backgroundColor, verifiedBackground = _a.verifiedBackground;
|
|
5
|
+
var setZipCode = _a.setZipCode, verified = _a.verified, setVerified = _a.setVerified, backgroundColor = _a.backgroundColor, verifiedBackground = _a.verifiedBackground, autoFocus = _a.autoFocus;
|
|
6
6
|
var inputRefs = useRef([]);
|
|
7
7
|
var createZipCode = function () {
|
|
8
8
|
var zipCode = 0;
|
|
@@ -54,7 +54,7 @@ var ZipCodeInput = function (_a) {
|
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
return (React.createElement(InputWrapper, null, Array.from(Array(5).keys()).map(function (index) { return (React.createElement("div", { key: index },
|
|
57
|
-
React.createElement(ZipCodeInputBox, { type: "number", onInput: function (e) { return (e.currentTarget.value = e.currentTarget.value.slice(0, 1)); }, onKeyUp: function (e) { return handleInput(index, e); }, verified: verified, backgroundColor: backgroundColor, verifiedBackground: verifiedBackground, marginLeft: index === 3, ref: function (ref) { return (inputRefs.current[index] = ref); } }))); })));
|
|
57
|
+
React.createElement(ZipCodeInputBox, { type: "number", onInput: function (e) { return (e.currentTarget.value = e.currentTarget.value.slice(0, 1)); }, onKeyUp: function (e) { return handleInput(index, e); }, verified: verified, backgroundColor: backgroundColor, verifiedBackground: verifiedBackground, marginLeft: index === 3, ref: function (ref) { return (inputRefs.current[index] = ref); }, autoFocus: index === 0 && autoFocus }))); })));
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
export { ZipCodeInput };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.122",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./build/cjs/components/src/index.js",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"moment": "^2.29.1",
|
|
72
72
|
"react-loading-skeleton": "^2.2.0"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "90657a042c67ffb5c191214e013f5c5a8488551d"
|
|
75
75
|
}
|