@sellout/ui 0.0.399 → 0.0.400
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/build/Colors.js +38 -38
- package/build/Colors.js.map +1 -0
- package/build/{src/components → components}/AddressSearchDropdown.js +1 -1
- package/build/components/AddressSearchDropdown.js.map +1 -0
- package/build/components/Button.js +252 -267
- package/build/components/Button.js.map +1 -0
- package/build/components/CodeInput.js +90 -91
- package/build/components/CodeInput.js.map +1 -0
- package/build/components/Counter.js +17 -18
- package/build/components/Counter.js.map +1 -0
- package/build/components/Dropdown.js +41 -44
- package/build/components/Dropdown.js.map +1 -0
- package/build/components/Flex.js +6 -6
- package/build/components/Flex.js.map +1 -0
- package/build/components/FormattedInput.js +66 -70
- package/build/components/FormattedInput.js.map +1 -0
- package/build/{src/components → components}/FormattedfullInput.js +1 -1
- package/build/components/FormattedfullInput.js.map +1 -0
- package/build/components/Icon.js +28 -29
- package/build/components/Icon.js.map +1 -0
- package/build/components/Icons.js +189 -189
- package/build/components/Icons.js.map +1 -0
- package/build/components/Input.d.ts +13 -1
- package/build/components/Input.js +165 -176
- package/build/components/Input.js.map +1 -0
- package/build/components/Label.js +14 -14
- package/build/components/Label.js.map +1 -0
- package/build/components/Loader.js +29 -29
- package/build/components/Loader.js.map +1 -0
- package/build/components/MaxLength.js +12 -12
- package/build/components/MaxLength.js.map +1 -0
- package/build/components/Motion.js +33 -33
- package/build/components/Motion.js.map +1 -0
- package/build/components/PhoneNumberInput.js +37 -40
- package/build/components/PhoneNumberInput.js.map +1 -0
- package/build/components/Product.js +111 -110
- package/build/components/Product.js.map +1 -0
- package/build/{src/components → components}/SearchDropdown.js +1 -1
- package/build/components/SearchDropdown.js.map +1 -0
- package/build/{src/components → components}/SvgIcons.js +1 -1
- package/build/components/SvgIcons.js.map +1 -0
- package/build/{src/components → components}/SvgRendrer.js +1 -1
- package/build/components/SvgRendrer.js.map +1 -0
- package/build/components/TextButton.js +39 -40
- package/build/components/TextButton.js.map +1 -0
- package/build/components/Tip.js +10 -10
- package/build/components/Tip.js.map +1 -0
- package/build/components/UserImage.js +28 -29
- package/build/components/UserImage.js.map +1 -0
- package/build/components/UserInfo.d.ts +10 -4
- package/build/components/UserInfo.js +31 -31
- package/build/components/UserInfo.js.map +1 -0
- package/build/components/ValidationError.js +17 -17
- package/build/components/ValidationError.js.map +1 -0
- package/build/utils/ErrorUtil.js +15 -15
- package/build/utils/ErrorUtil.js.map +1 -0
- package/build/utils/MediaQuery.js +59 -59
- package/build/utils/MediaQuery.js.map +1 -0
- package/build/utils/Validation.js +44 -44
- package/build/utils/Validation.js.map +1 -0
- package/build/utils/makeEventHandler.js +8 -8
- package/build/utils/makeEventHandler.js.map +1 -0
- package/package.json +4 -6
- package/build/src/Colors.js +0 -42
- package/build/src/Colors.js.map +0 -1
- package/build/src/components/AddressSearchDropdown.js.map +0 -1
- package/build/src/components/Button.js +0 -264
- package/build/src/components/Button.js.map +0 -1
- package/build/src/components/CodeInput.js +0 -98
- package/build/src/components/CodeInput.js.map +0 -1
- package/build/src/components/Counter.js +0 -27
- package/build/src/components/Counter.js.map +0 -1
- package/build/src/components/Dropdown.js +0 -53
- package/build/src/components/Dropdown.js.map +0 -1
- package/build/src/components/Flex.js +0 -13
- package/build/src/components/Flex.js.map +0 -1
- package/build/src/components/FormattedInput.js +0 -81
- package/build/src/components/FormattedInput.js.map +0 -1
- package/build/src/components/FormattedfullInput.js.map +0 -1
- package/build/src/components/Icon.js +0 -38
- package/build/src/components/Icon.js.map +0 -1
- package/build/src/components/Icons.js +0 -200
- package/build/src/components/Icons.js.map +0 -1
- package/build/src/components/Input.js +0 -182
- package/build/src/components/Input.js.map +0 -1
- package/build/src/components/Label.js +0 -23
- package/build/src/components/Label.js.map +0 -1
- package/build/src/components/Loader.js +0 -37
- package/build/src/components/Loader.js.map +0 -1
- package/build/src/components/MaxLength.js +0 -20
- package/build/src/components/MaxLength.js.map +0 -1
- package/build/src/components/Motion.js +0 -40
- package/build/src/components/Motion.js.map +0 -1
- package/build/src/components/PhoneNumberInput.js +0 -50
- package/build/src/components/PhoneNumberInput.js.map +0 -1
- package/build/src/components/Product.js +0 -125
- package/build/src/components/Product.js.map +0 -1
- package/build/src/components/SearchDropdown.js.map +0 -1
- package/build/src/components/SvgIcons.js.map +0 -1
- package/build/src/components/SvgRendrer.js.map +0 -1
- package/build/src/components/TextButton.js +0 -48
- package/build/src/components/TextButton.js.map +0 -1
- package/build/src/components/Tip.js +0 -19
- package/build/src/components/Tip.js.map +0 -1
- package/build/src/components/UserImage.js +0 -37
- package/build/src/components/UserImage.js.map +0 -1
- package/build/src/components/UserInfo.js +0 -40
- package/build/src/components/UserInfo.js.map +0 -1
- package/build/src/components/ValidationError.js +0 -27
- package/build/src/components/ValidationError.js.map +0 -1
- package/build/src/index.js +0 -33
- package/build/src/utils/ErrorUtil.js +0 -19
- package/build/src/utils/ErrorUtil.js.map +0 -1
- package/build/src/utils/MediaQuery.js +0 -66
- package/build/src/utils/MediaQuery.js.map +0 -1
- package/build/src/utils/Validation.js +0 -50
- package/build/src/utils/Validation.js.map +0 -1
- package/build/src/utils/makeEventHandler.js +0 -12
- package/build/src/utils/makeEventHandler.js.map +0 -1
- /package/build/{src/index.js.map → index.js.map} +0 -0
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
import Joi from '@hapi/joi';
|
|
2
2
|
|
|
3
|
-
// Email Validation
|
|
4
|
-
var email = Joi.string()
|
|
5
|
-
.required()
|
|
6
|
-
.email({ tlds: { allow: false } })
|
|
7
|
-
.error(function () {
|
|
8
|
-
return new Error("Please enter a valid email.");
|
|
9
|
-
});
|
|
10
|
-
// Password Validation
|
|
11
|
-
// could force users to be more secure ->
|
|
12
|
-
// https://stackoverflow.com/questions/19605150/regex-for-password-must-contain-at-least-eight-characters-at-least-one-number-a
|
|
13
|
-
var password = Joi.string()
|
|
14
|
-
.required()
|
|
15
|
-
.min(8)
|
|
16
|
-
.max(30)
|
|
17
|
-
.error(function (errors) {
|
|
18
|
-
return errors.map(function (error) {
|
|
19
|
-
console.log(error);
|
|
20
|
-
switch (error.code) {
|
|
21
|
-
case "string.min":
|
|
22
|
-
return new Error("Password must be greater than 8 Characters.");
|
|
23
|
-
case "string.max":
|
|
24
|
-
return new Error("Password must be fewer than 30 characters.");
|
|
25
|
-
case "string.empty":
|
|
26
|
-
return new Error("Please enter a password.");
|
|
27
|
-
default:
|
|
28
|
-
return new Error("Password validation error.");
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
// full name validation - only checks for first and last name via single space character
|
|
33
|
-
// all characters are valid, gotta support X Æ A-12 now
|
|
34
|
-
// should maybe fix, idk, it accepts stuff like Mike\tPollard
|
|
35
|
-
var fullName = Joi.string()
|
|
36
|
-
.required()
|
|
37
|
-
.pattern(new RegExp("^[^\\s]+(\\s[^\\s]+)+$"))
|
|
38
|
-
.error(function () {
|
|
39
|
-
return new Error("Please enter your first and last name");
|
|
40
|
-
});
|
|
41
|
-
// Phone number validation, need to test internationally
|
|
42
|
-
var phoneNumber = Joi.string()
|
|
43
|
-
.required()
|
|
44
|
-
.pattern(new RegExp("^(\\+\\d{1,2}\\s?)?1?\\-?\\.?\\s?\\(?\\d{3}\\)?[\\s.-]?\\d{3}[\\s.-]?\\d{5}$"))
|
|
45
|
-
.error(function () {
|
|
46
|
-
return new Error("Please enter a valid phone number.");
|
|
3
|
+
// Email Validation
|
|
4
|
+
var email = Joi.string()
|
|
5
|
+
.required()
|
|
6
|
+
.email({ tlds: { allow: false } })
|
|
7
|
+
.error(function () {
|
|
8
|
+
return new Error("Please enter a valid email.");
|
|
9
|
+
});
|
|
10
|
+
// Password Validation
|
|
11
|
+
// could force users to be more secure ->
|
|
12
|
+
// https://stackoverflow.com/questions/19605150/regex-for-password-must-contain-at-least-eight-characters-at-least-one-number-a
|
|
13
|
+
var password = Joi.string()
|
|
14
|
+
.required()
|
|
15
|
+
.min(8)
|
|
16
|
+
.max(30)
|
|
17
|
+
.error(function (errors) {
|
|
18
|
+
return errors.map(function (error) {
|
|
19
|
+
console.log(error);
|
|
20
|
+
switch (error.code) {
|
|
21
|
+
case "string.min":
|
|
22
|
+
return new Error("Password must be greater than 8 Characters.");
|
|
23
|
+
case "string.max":
|
|
24
|
+
return new Error("Password must be fewer than 30 characters.");
|
|
25
|
+
case "string.empty":
|
|
26
|
+
return new Error("Please enter a password.");
|
|
27
|
+
default:
|
|
28
|
+
return new Error("Password validation error.");
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
// full name validation - only checks for first and last name via single space character
|
|
33
|
+
// all characters are valid, gotta support X Æ A-12 now
|
|
34
|
+
// should maybe fix, idk, it accepts stuff like Mike\tPollard
|
|
35
|
+
var fullName = Joi.string()
|
|
36
|
+
.required()
|
|
37
|
+
.pattern(new RegExp("^[^\\s]+(\\s[^\\s]+)+$"))
|
|
38
|
+
.error(function () {
|
|
39
|
+
return new Error("Please enter your first and last name");
|
|
40
|
+
});
|
|
41
|
+
// Phone number validation, need to test internationally
|
|
42
|
+
var phoneNumber = Joi.string()
|
|
43
|
+
.required()
|
|
44
|
+
.pattern(new RegExp("^(\\+\\d{1,2}\\s?)?1?\\-?\\.?\\s?\\(?\\d{3}\\)?[\\s.-]?\\d{3}[\\s.-]?\\d{5}$"))
|
|
45
|
+
.error(function () {
|
|
46
|
+
return new Error("Please enter a valid phone number.");
|
|
47
47
|
});
|
|
48
48
|
|
|
49
49
|
export { email, fullName, password, phoneNumber };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Validation.js","sources":["../../src/utils/Validation.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA;AACa,IAAA,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE;AAC9B,KAAA,QAAQ,EAAE;KACV,KAAK,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC;AACjC,KAAA,KAAK,CAAC,YAAA;AAC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AC,CAAC;AACzD,CAAC;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
function makeEventHandler(executeOnEvent) {
|
|
2
|
-
if (executeOnEvent === void 0) { executeOnEvent = function () { }; }
|
|
3
|
-
return function (eventHandler) {
|
|
4
|
-
return function (event) {
|
|
5
|
-
executeOnEvent();
|
|
6
|
-
eventHandler(event.currentTarget.value);
|
|
7
|
-
};
|
|
8
|
-
};
|
|
1
|
+
function makeEventHandler(executeOnEvent) {
|
|
2
|
+
if (executeOnEvent === void 0) { executeOnEvent = function () { }; }
|
|
3
|
+
return function (eventHandler) {
|
|
4
|
+
return function (event) {
|
|
5
|
+
executeOnEvent();
|
|
6
|
+
eventHandler(event.currentTarget.value);
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export { makeEventHandler as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"makeEventHandler.js","sources":["../../src/utils/makeEventHandler.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAwB,SAAA,gBAAgB,CAAC,cAAmC,EAAA;IAAnC,IAAA,cAAA,KAAA,KAAA,CAAA,EAAA,EAAA,gCAAmC,CAAA,EAAA;AAC1E,IAAA,OAAO,UAAU,YAAsB,EAAA;AACrC,QAAA,OAAO,UAAS,KAAwC,EAAA;AACtD,YAAA,cAAc,EAAE,CAAC;AACjB,YAAA,YAAY,CAAC,KAAK,CAAC,aAAa,CAAC,KAAe,CAAC,CAAC;AACpD,SAAC,CAAC;AACJ,KAAC,CAAA;AACH;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sellout/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.400",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"module": "build/index.es.js",
|
|
6
6
|
"files": [
|
|
@@ -29,17 +29,15 @@
|
|
|
29
29
|
"@types/jest": "^24.0.24",
|
|
30
30
|
"@types/react": "^16.14.56",
|
|
31
31
|
"@types/react-dom": "^16.9.24",
|
|
32
|
-
"awesome-typescript-loader": "^5.2.1",
|
|
33
32
|
"babel-loader": "^8.3.0",
|
|
34
33
|
"fs-extra": "^9.1.0",
|
|
35
34
|
"jest": "^24.9.0",
|
|
36
|
-
"rollup": "^2.
|
|
35
|
+
"rollup": "^2.18.1",
|
|
37
36
|
"rollup-plugin-commonjs": "^10.1.0",
|
|
38
37
|
"rollup-plugin-multi-input": "^1.3.1",
|
|
39
38
|
"rollup-plugin-node-resolve": "^5.2.0",
|
|
40
39
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
41
40
|
"rollup-plugin-svg": "^2.0.0",
|
|
42
|
-
"rollup-plugin-typescript2": "^0.27.3",
|
|
43
41
|
"standard": "^14.3.4",
|
|
44
42
|
"ts-jest": "^24.3.0",
|
|
45
43
|
"tslib": "^2.8.1",
|
|
@@ -55,7 +53,7 @@
|
|
|
55
53
|
"@fortawesome/pro-solid-svg-icons": "^5.15.4",
|
|
56
54
|
"@fortawesome/react-fontawesome": "^0.1.19",
|
|
57
55
|
"@hapi/joi": "^17.1.1",
|
|
58
|
-
"@sellout/utils": "^0.0.
|
|
56
|
+
"@sellout/utils": "^0.0.400",
|
|
59
57
|
"csvtojson": "^2.0.10",
|
|
60
58
|
"framer-motion": "^2.9.5",
|
|
61
59
|
"polished": "^3.7.2",
|
|
@@ -64,7 +62,7 @@
|
|
|
64
62
|
"rollup-plugin-url": "^3.0.1",
|
|
65
63
|
"use-places-autocomplete": "^1.11.0"
|
|
66
64
|
},
|
|
67
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "2e04319927149072bf73cc16e949a2c39c7da484",
|
|
68
66
|
"peerDependencies": {
|
|
69
67
|
"react": "16.14.0",
|
|
70
68
|
"react-dom": "16.14.0",
|
package/build/src/Colors.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
var Colors;
|
|
2
|
-
(function (Colors) {
|
|
3
|
-
Colors["White"] = "#FFFFFF";
|
|
4
|
-
Colors["Black"] = "#000000";
|
|
5
|
-
Colors["Black2"] = "#141414";
|
|
6
|
-
Colors["Yellow"] = "#FFBA49";
|
|
7
|
-
// Green = "#419D78",
|
|
8
|
-
Colors["Green"] = "#42BB83";
|
|
9
|
-
Colors["OffWhite"] = "#FCFCFC";
|
|
10
|
-
Colors["LightBlue"] = "#39159C";
|
|
11
|
-
Colors["Secondary"] = "#1E1E1E";
|
|
12
|
-
Colors["Blue"] = "#2D0E84";
|
|
13
|
-
Colors["DarkBlue"] = "#1D0858";
|
|
14
|
-
Colors["Red"] = "#E63946";
|
|
15
|
-
Colors["Orange"] = "#FF700F";
|
|
16
|
-
Colors["FadedOrange"] = "#FFF1E7";
|
|
17
|
-
Colors["LightOrange"] = "#FFBE93";
|
|
18
|
-
Colors["DarkOrange"] = "#D65600";
|
|
19
|
-
Colors["Grey1"] = "#333333";
|
|
20
|
-
Colors["Grey2"] = "#4F4F4F";
|
|
21
|
-
Colors["Grey3"] = "#828282";
|
|
22
|
-
Colors["Grey4"] = "#BDBDBD";
|
|
23
|
-
Colors["Grey5"] = "#E0E0E0";
|
|
24
|
-
Colors["Grey6"] = "#F2F2F2";
|
|
25
|
-
Colors["Grey7"] = "#F8F8F8";
|
|
26
|
-
Colors["Grey8"] = "#424242";
|
|
27
|
-
Colors["Purple"] = "#040436";
|
|
28
|
-
Colors["SecondarySurface"] = "#1E1E1E";
|
|
29
|
-
Colors["SecondaryStroke"] = "#424242";
|
|
30
|
-
Colors["SurfaceTertiary"] = "#141414";
|
|
31
|
-
Colors["HeadingSecondary"] = "#FCFCFC";
|
|
32
|
-
Colors["SupportTertiary"] = "#A3A3A3";
|
|
33
|
-
Colors["HeadingPrimary"] = "#EF602E";
|
|
34
|
-
Colors["InteractiveBGSecondary"] = "#292929";
|
|
35
|
-
Colors["InteractiveBGPrimary"] = "#EA4513";
|
|
36
|
-
Colors["TagBGTertiary"] = "#0C0C0C";
|
|
37
|
-
Colors["TextSupportSecondary"] = "#D6D6D6";
|
|
38
|
-
Colors["ErrorRed"] = "#F31B43";
|
|
39
|
-
})(Colors || (Colors = {}));
|
|
40
|
-
|
|
41
|
-
export { Colors };
|
|
42
|
-
//# sourceMappingURL=Colors.js.map
|
package/build/src/Colors.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Colors.js","sources":["../../src/Colors.ts"],"sourcesContent":[null],"names":[],"mappings":"IAAY,OAsCX;AAtCD,CAAA,UAAY,MAAM,EAAA;AAChB,IAAA,MAAA,CAAA,OAAA,CAAA,GAAA,SAAiB,CAAA;AACjB,IAAA,MAAA,CAAA,OAAA,CAAA,GAAA,SAAiB,CAAA;AACjB,IAAA,MAAA,CAAA,QAAA,CAAA,GAAA,SAAiB,CAAA;AACjB,IAAA,MAAA,CAAA,QAAA,CAAA,GAAA,SAAkB,CAAA;;AAElB,IAAA,MAAA,CAAA,OAAA,CAAA,GAAA,SAAiB,CAAA;AACjB,IAAA,MAAA,CAAA,UAAA,CAAA,GAAA,SAAoB,CAAA;AACpB,IAAA,MAAA,CAAA,WAAA,CAAA,GAAA,SAAqB,CAAA;AACrB,IAAA,MAAA,CAAA,WAAA,CAAA,GAAA,SAAoB,CAAA;AACpB,IAAA,MAAA,CAAA,MAAA,CAAA,GAAA,SAAgB,CAAA;AAChB,IAAA,MAAA,CAAA,UAAA,CAAA,GAAA,SAAoB,CAAA;AACpB,IAAA,MAAA,CAAA,KAAA,CAAA,GAAA,SAAe,CAAA;AACf,IAAA,MAAA,CAAA,QAAA,CAAA,GAAA,SAAkB,CAAA;AAClB,IAAA,MAAA,CAAA,aAAA,CAAA,GAAA,SAAuB,CAAA;AACvB,IAAA,MAAA,CAAA,aAAA,CAAA,GAAA,SAAuB,CAAA;AACvB,IAAA,MAAA,CAAA,YAAA,CAAA,GAAA,SAAsB,CAAA;AACtB,IAAA,MAAA,CAAA,OAAA,CAAA,GAAA,SAAiB,CA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ACR,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,EACd,CAAA,CACQ,EACZ;AACJ,CAAC;;;;;"}
|
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
import { __makeTemplateObject } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
|
-
import React, { Fragment } from 'react';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
import * as Polished from 'polished';
|
|
5
|
-
import { Colors } from '../Colors.js';
|
|
6
|
-
import Icon from './Icon.js';
|
|
7
|
-
import Loader, { LoaderSizes } from './Loader.js';
|
|
8
|
-
import SvgRenderer from './SvgRendrer.js';
|
|
9
|
-
|
|
10
|
-
var ButtonTypes;
|
|
11
|
-
(function (ButtonTypes) {
|
|
12
|
-
ButtonTypes["Next"] = "Next";
|
|
13
|
-
ButtonTypes["Regular"] = "Regular";
|
|
14
|
-
ButtonTypes["Thin"] = "Thin";
|
|
15
|
-
ButtonTypes["Normal"] = "Normal";
|
|
16
|
-
ButtonTypes["CustomInputHeight"] = "CustomInputHeight";
|
|
17
|
-
})(ButtonTypes || (ButtonTypes = {}));
|
|
18
|
-
var ButtonStates;
|
|
19
|
-
(function (ButtonStates) {
|
|
20
|
-
ButtonStates["Active"] = "Active";
|
|
21
|
-
ButtonStates["Warning"] = "Warning";
|
|
22
|
-
ButtonStates["Disabled"] = "Disabled";
|
|
23
|
-
})(ButtonStates || (ButtonStates = {}));
|
|
24
|
-
var ButtonIconPosition;
|
|
25
|
-
(function (ButtonIconPosition) {
|
|
26
|
-
ButtonIconPosition["Left"] = "Left";
|
|
27
|
-
ButtonIconPosition["Right"] = "Right";
|
|
28
|
-
})(ButtonIconPosition || (ButtonIconPosition = {}));
|
|
29
|
-
var StyledButton = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n height: ", ";\n width: ", ";\n margin-bottom: ", ";\n display: flex;\n flex-direction: row;\n align-items: center;\n overflow: hidden;\n justify-content: ", ";\n white-space: nowrap;\n box-sizing: border-box;\n text-align: center;\n border-radius: 10px;\n transition: all 0.2s;\n margin: ", ";\n padding: ", ";\n background-color: ", ";\n border: ", ";\n\n &:hover {\n cursor: ", ";\n background-color: ", ";\n }\n\n &:active {\n cursor: ", ";\n background-color: ", ";\n }\n"], ["\n position: relative;\n height: ", ";\n width: ", ";\n margin-bottom: ", ";\n display: flex;\n flex-direction: row;\n align-items: center;\n overflow: hidden;\n justify-content: ", ";\n white-space: nowrap;\n box-sizing: border-box;\n text-align: center;\n border-radius: 10px;\n transition: all 0.2s;\n margin: ", ";\n padding: ", ";\n background-color: ", ";\n border: ", ";\n\n &:hover {\n cursor: ", ";\n background-color: ", ";\n }\n\n &:active {\n cursor: ", ";\n background-color: ", ";\n }\n"])), function (props) {
|
|
30
|
-
if (props.CustomInputHeight) {
|
|
31
|
-
return "55px";
|
|
32
|
-
}
|
|
33
|
-
if (props.type === ButtonTypes.Next) {
|
|
34
|
-
return "48px";
|
|
35
|
-
}
|
|
36
|
-
if (props.type === ButtonTypes.CustomInputHeight) {
|
|
37
|
-
return "55px";
|
|
38
|
-
}
|
|
39
|
-
if (props.type === ButtonTypes.Regular) {
|
|
40
|
-
return "40px";
|
|
41
|
-
}
|
|
42
|
-
if (props.type === ButtonTypes.Normal) {
|
|
43
|
-
return "50px";
|
|
44
|
-
}
|
|
45
|
-
if (props.type === ButtonTypes.Thin) {
|
|
46
|
-
if (props.state === ButtonStates.Warning) {
|
|
47
|
-
return "30px";
|
|
48
|
-
}
|
|
49
|
-
return "30px";
|
|
50
|
-
}
|
|
51
|
-
return null;
|
|
52
|
-
}, function (props) {
|
|
53
|
-
if (props.type === ButtonTypes.Next) {
|
|
54
|
-
return "100%";
|
|
55
|
-
}
|
|
56
|
-
if (props.type === ButtonTypes.Regular) {
|
|
57
|
-
return "fit-content";
|
|
58
|
-
}
|
|
59
|
-
if (props.type === ButtonTypes.Thin) {
|
|
60
|
-
return "fit-content";
|
|
61
|
-
}
|
|
62
|
-
if (props.type === ButtonTypes.Normal) {
|
|
63
|
-
return "50px";
|
|
64
|
-
}
|
|
65
|
-
return null;
|
|
66
|
-
}, function (props) {
|
|
67
|
-
return props.marginBottam ? "".concat(props.marginBottam, " !important") : "0px !important";
|
|
68
|
-
}, function (props) { return props.contentAlign || "center"; }, function (props) { return (Boolean(props.margin) ? props.margin : "0px"); }, function (props) {
|
|
69
|
-
if (props.type === ButtonTypes.Next && props.paddingAround) {
|
|
70
|
-
return props.paddingAround;
|
|
71
|
-
}
|
|
72
|
-
if (props.type === ButtonTypes.Next) {
|
|
73
|
-
return "0px";
|
|
74
|
-
}
|
|
75
|
-
if (props.type === ButtonTypes.Regular) {
|
|
76
|
-
return "0 25px";
|
|
77
|
-
}
|
|
78
|
-
if (props.type === ButtonTypes.Thin) {
|
|
79
|
-
return "0 15px";
|
|
80
|
-
}
|
|
81
|
-
if (props.type === ButtonTypes.Normal) {
|
|
82
|
-
return "0 25px";
|
|
83
|
-
}
|
|
84
|
-
return null;
|
|
85
|
-
}, function (props) {
|
|
86
|
-
if (props.state === ButtonStates.Disabled && props.disabledbuttonTheme) {
|
|
87
|
-
return Colors.InteractiveBGSecondary;
|
|
88
|
-
}
|
|
89
|
-
if (props.state === ButtonStates.Disabled) {
|
|
90
|
-
return Colors.Grey6;
|
|
91
|
-
}
|
|
92
|
-
if (props.state === ButtonStates.Warning) {
|
|
93
|
-
return Colors.White;
|
|
94
|
-
}
|
|
95
|
-
return props.bgColor || Colors.Orange;
|
|
96
|
-
}, function (props) {
|
|
97
|
-
if (props.state === ButtonStates.Warning) {
|
|
98
|
-
return "1px solid ".concat(Colors.Grey5);
|
|
99
|
-
}
|
|
100
|
-
return null;
|
|
101
|
-
}, function (props) {
|
|
102
|
-
if (props.state === ButtonStates.Disabled) {
|
|
103
|
-
return null;
|
|
104
|
-
}
|
|
105
|
-
return props.onClick ? "pointer" : null;
|
|
106
|
-
}, function (props) {
|
|
107
|
-
if (props.state === ButtonStates.Disabled && props.disabledbuttonTheme) {
|
|
108
|
-
return Colors.Grey1;
|
|
109
|
-
}
|
|
110
|
-
if (props.state === ButtonStates.Disabled) {
|
|
111
|
-
return Colors.Grey6;
|
|
112
|
-
}
|
|
113
|
-
if (props.state === ButtonStates.Warning) {
|
|
114
|
-
return Colors.White;
|
|
115
|
-
}
|
|
116
|
-
return Polished.lighten(0.025, props.bgColor || Colors.Orange);
|
|
117
|
-
}, function (props) {
|
|
118
|
-
if (props.state === ButtonStates.Disabled) {
|
|
119
|
-
return null;
|
|
120
|
-
}
|
|
121
|
-
return props.onClick ? "pointer" : null;
|
|
122
|
-
}, function (props) {
|
|
123
|
-
if (props.state === ButtonStates.Disabled) {
|
|
124
|
-
return Colors.Grey6;
|
|
125
|
-
}
|
|
126
|
-
if (props.state === ButtonStates.Warning) {
|
|
127
|
-
return Colors.White;
|
|
128
|
-
}
|
|
129
|
-
return Polished.darken(0.025, props.bgColor || Colors.Orange);
|
|
130
|
-
});
|
|
131
|
-
var Text = styled.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n line-height:", ";\n font-family: ", ";\n letter-spacing: ", ";\n font-size: ", ";\n font-weight: ", ";\n text-transform: ", ";\n margin: ", ";\n color: ", ";\n top: ", ";\n white-space: ", ";\n"], ["\n position: relative;\n line-height:", ";\n font-family: ", ";\n letter-spacing: ", ";\n font-size: ", ";\n font-weight: ", ";\n text-transform: ", ";\n margin: ", ";\n color: ", ";\n top: ", ";\n white-space: ", ";\n"])), function (props) { return props.lineHeight; }, function (props) { return props.fontFamily; }, function (props) { return props.letterSpacing; }, function (props) {
|
|
132
|
-
if (props.type === ButtonTypes.Next && props.fontSize) {
|
|
133
|
-
return props.fontSize;
|
|
134
|
-
}
|
|
135
|
-
if (props.type === ButtonTypes.Regular && props.fontSize) {
|
|
136
|
-
return props.fontSize;
|
|
137
|
-
}
|
|
138
|
-
if (props.type === ButtonTypes.Next) {
|
|
139
|
-
return "1.4rem";
|
|
140
|
-
}
|
|
141
|
-
if (props.type === ButtonTypes.Regular) {
|
|
142
|
-
return "1.4rem";
|
|
143
|
-
}
|
|
144
|
-
if (props.type === ButtonTypes.Regular) {
|
|
145
|
-
return "1.2rem";
|
|
146
|
-
}
|
|
147
|
-
if (props.type === ButtonTypes.Thin) {
|
|
148
|
-
return "1.2rem";
|
|
149
|
-
}
|
|
150
|
-
if (props.type === ButtonTypes.Normal) {
|
|
151
|
-
return "2.5rem";
|
|
152
|
-
}
|
|
153
|
-
return null;
|
|
154
|
-
}, function (props) {
|
|
155
|
-
if (props.type === ButtonTypes.Next && props.fontWeight) {
|
|
156
|
-
return props.fontWeight;
|
|
157
|
-
}
|
|
158
|
-
if (props.type === ButtonTypes.Regular && props.fontWeight) {
|
|
159
|
-
return props.fontWeight;
|
|
160
|
-
}
|
|
161
|
-
if (props.type === ButtonTypes.Next) {
|
|
162
|
-
return "600";
|
|
163
|
-
// return "700";
|
|
164
|
-
}
|
|
165
|
-
if (props.type === ButtonTypes.Regular) {
|
|
166
|
-
return "600";
|
|
167
|
-
// return "700";
|
|
168
|
-
}
|
|
169
|
-
if (props.type === ButtonTypes.Thin) {
|
|
170
|
-
return "600";
|
|
171
|
-
}
|
|
172
|
-
if (props.type === ButtonTypes.Normal) {
|
|
173
|
-
return "500";
|
|
174
|
-
}
|
|
175
|
-
return null;
|
|
176
|
-
}, function (props) { return props.textTransform || "uppercase"; }, function (props) {
|
|
177
|
-
if (props.type === ButtonTypes.Next && props.marginOnButtonText) {
|
|
178
|
-
return "0 10px 0 0";
|
|
179
|
-
}
|
|
180
|
-
if (props.type === ButtonTypes.Next) {
|
|
181
|
-
return "0 10px";
|
|
182
|
-
}
|
|
183
|
-
if (props.type === ButtonTypes.Regular) {
|
|
184
|
-
if (props.iconPosition === ButtonIconPosition.Left) {
|
|
185
|
-
return "0 0 0 10px";
|
|
186
|
-
}
|
|
187
|
-
if (props.iconPosition === ButtonIconPosition.Right) {
|
|
188
|
-
return "0 10px 0 0";
|
|
189
|
-
}
|
|
190
|
-
return "0";
|
|
191
|
-
}
|
|
192
|
-
if (props.type === ButtonTypes.Normal) {
|
|
193
|
-
if (props.iconPosition === ButtonIconPosition.Left) {
|
|
194
|
-
return "0 0 0 10px";
|
|
195
|
-
}
|
|
196
|
-
if (props.iconPosition === ButtonIconPosition.Right) {
|
|
197
|
-
return "0 10px 0 0";
|
|
198
|
-
}
|
|
199
|
-
return "0";
|
|
200
|
-
}
|
|
201
|
-
if (props.type === ButtonTypes.Thin) {
|
|
202
|
-
if (props.iconPosition === ButtonIconPosition.Left) {
|
|
203
|
-
return "0 0 0 7px";
|
|
204
|
-
}
|
|
205
|
-
if (props.iconPosition === ButtonIconPosition.Right) {
|
|
206
|
-
return "0 7px 0 0";
|
|
207
|
-
}
|
|
208
|
-
return "0";
|
|
209
|
-
}
|
|
210
|
-
return null;
|
|
211
|
-
}, function (props) {
|
|
212
|
-
if (props.state === ButtonStates.Disabled && props.disabledbuttonTheme) {
|
|
213
|
-
return Colors.Grey3;
|
|
214
|
-
}
|
|
215
|
-
if (props.state)
|
|
216
|
-
if (props.state === ButtonStates.Disabled) {
|
|
217
|
-
return Colors.Grey5;
|
|
218
|
-
}
|
|
219
|
-
if (props.state === ButtonStates.Warning) {
|
|
220
|
-
return Colors.Grey3;
|
|
221
|
-
}
|
|
222
|
-
return props.textColor || Colors.White;
|
|
223
|
-
}, function (props) {
|
|
224
|
-
if (props.type === ButtonTypes.Thin) {
|
|
225
|
-
if (props.icon) {
|
|
226
|
-
return "-1px";
|
|
227
|
-
}
|
|
228
|
-
return "0";
|
|
229
|
-
}
|
|
230
|
-
return null;
|
|
231
|
-
}, function (props) { return props.innerTextWhiteSpace; });
|
|
232
|
-
function Button(_a) {
|
|
233
|
-
var _b = _a.type, type = _b === void 0 ? ButtonTypes.Next : _b, _c = _a.state, state = _c === void 0 ? ButtonStates.Active : _c, bgColor = _a.bgColor, textColor = _a.textColor, text = _a.text, _d = _a.onClick, onClick = _d === void 0 ? function () { } : _d, icon = _a.icon, iconPosition = _a.iconPosition, _e = _a.iconSize, iconSize = _e === void 0 ? 14 : _e,
|
|
234
|
-
// label,
|
|
235
|
-
// tip,
|
|
236
|
-
// subLabel,
|
|
237
|
-
margin = _a.margin, marginBottam = _a.marginBottam, _f = _a.loading, loading = _f === void 0 ? false : _f, paddingAround = _a.paddingAround, contentAlign = _a.contentAlign, textTransform = _a.textTransform, fontSize = _a.fontSize, fontWeight = _a.fontWeight, fontFamily = _a.fontFamily, letterSpacing = _a.letterSpacing, disabledbuttonTheme = _a.disabledbuttonTheme, CustomInputHeight = _a.CustomInputHeight, lineHeight = _a.lineHeight, svgIconName = _a.svgIconName, svgHeight = _a.svgHeight, svgWidth = _a.svgWidth, marginOnButtonText = _a.marginOnButtonText, innerTextWhiteSpace = _a.innerTextWhiteSpace;
|
|
238
|
-
var iconColor = state === ButtonStates.Disabled ? Colors.Grey3 : Colors.White;
|
|
239
|
-
if (icon && !iconPosition)
|
|
240
|
-
iconPosition = ButtonIconPosition.Left;
|
|
241
|
-
var iconEl = (React.createElement(Icon, { icon: icon, color: iconColor, size: iconSize, top: iconSize < 14 ? "-1px" : undefined }));
|
|
242
|
-
var click = loading || state === ButtonStates.Disabled ? null : function () { return onClick(); };
|
|
243
|
-
return (React.createElement(React.Fragment, null,
|
|
244
|
-
React.createElement(StyledButton, { type: type, state: state, onClick: click, margin: margin, bgColor: bgColor, marginBottam: marginBottam, paddingAround: paddingAround, contentAlign: contentAlign, disabledbuttonTheme: disabledbuttonTheme, CustomInputHeight: CustomInputHeight }, (function () {
|
|
245
|
-
return (React.createElement(Fragment, null, (function () {
|
|
246
|
-
if (loading) {
|
|
247
|
-
return (React.createElement(Fragment, null,
|
|
248
|
-
React.createElement(Loader, { size: LoaderSizes.VerySmall, color: iconColor })));
|
|
249
|
-
}
|
|
250
|
-
return (React.createElement(Fragment, null,
|
|
251
|
-
icon && iconPosition === ButtonIconPosition.Left && iconEl,
|
|
252
|
-
text && (React.createElement(Text, { type: type, state: state, icon: Boolean(icon), iconPosition: iconPosition, textColor: textColor, textTransform: textTransform, fontSize: fontSize, fontWeight: fontWeight, fontFamily: fontFamily, letterSpacing: letterSpacing, disabledbuttonTheme: disabledbuttonTheme, lineHeight: lineHeight, marginOnButtonText: marginOnButtonText, innerTextWhiteSpace: innerTextWhiteSpace }, text)),
|
|
253
|
-
icon &&
|
|
254
|
-
iconPosition === ButtonIconPosition.Right &&
|
|
255
|
-
iconEl,
|
|
256
|
-
svgIconName &&
|
|
257
|
-
React.createElement(SvgRenderer, { iconName: svgIconName, width: svgWidth, height: svgHeight, style: { margin: '2px 0px' } })));
|
|
258
|
-
})()));
|
|
259
|
-
})())));
|
|
260
|
-
}
|
|
261
|
-
var templateObject_1, templateObject_2;
|
|
262
|
-
|
|
263
|
-
export { ButtonIconPosition, ButtonStates, ButtonTypes, Button as default };
|
|
264
|
-
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../src/components/Button.tsx"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;IAQY,YAMX;AAND,CAAA,UAAY,WAAW,EAAA;AACrB,IAAA,WAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACb,IAAA,WAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB,IAAA,WAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACb,IAAA,WAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,WAAA,CAAA,mBAAA,CAAA,GAAA,mBAAqC,CAAA;AACvC,CAAC,EANW,WAAW,KAAX,WAAW,GAMtB,EAAA,CAAA,CAAA,CAAA;IAEW,aAIX;AAJD,CAAA,UAAY,YAAY,EAAA;AACtB,IAAA,YAAA,CAAA,QAAA,CAAA,GAAA,QA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K,EAAE,KAAK,EACZ,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,EACnB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,EAC5B,mBAAmB,EAAE,mBAAmB,EACxC,UAAU,EAAE,UAAU,EACtB,kBAAkB,EAAE,kBAAkB,EACtC,mBAAmB,EAAE,mBAAmB,EAEvC,EAAA,IAAI,CACA,CACR;oBACA,IAAI;wBACH,YAAY,KAAK,kBAAkB,CAAC,KAAK;wBACzC,MAAM;oBACL,WAAW;wBACX,KAAC,CAAA,aAAA,CAAA,WAAW,EACX,EAAA,QAAQ,EAAE,WAAW,EACrB,KAAK,EAAE,QAAQ,EACf,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAC,EAAA,CAC3B,CAEK,EACX;AACJ,aAAC,GAAG,CACK,EACX;AACJ,SAAC,GAAG,CACS,CACd,EACH;AACJ,CAAC;;;;;"}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { __makeTemplateObject, __spreadArray } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
|
-
import React, { useState, useEffect } from 'react';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
import { Colors } from '../Colors.js';
|
|
5
|
-
|
|
6
|
-
var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin: ", ";\n padding-left: ", ";\n"], ["\n margin: ", ";\n padding-left: ", ";\n"])), function (props) { return props.margin; }, function (props) { return props.paddingLeft; });
|
|
7
|
-
var Input = styled.input(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border: ", ";\n height: ", ";\n width: ", ";\n background-color: ", ";\n transition: all 0.1s;\n margin-right:", "; \n outline: 0px;\n font-size: ", ";\n text-align: center;\n border-radius: ", ";\n -moz-appearance: textfield;\n padding: 0px;\n box-shadow: none;\n font-weight:", "; \n font-family:", ";\n color: ", ";\n -moz-appearance: textfield;\n\n &:focus {\n border: ", ";\n }\n &::-webkit-inner-spin-button,\n ::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n"], ["\n border: ", ";\n height: ", ";\n width: ", ";\n background-color: ", ";\n transition: all 0.1s;\n margin-right:", "; \n outline: 0px;\n font-size: ", ";\n text-align: center;\n border-radius: ", ";\n -moz-appearance: textfield;\n padding: 0px;\n box-shadow: none;\n font-weight:", "; \n font-family:", ";\n color: ", ";\n -moz-appearance: textfield;\n\n &:focus {\n border: ", ";\n }\n &::-webkit-inner-spin-button,\n ::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n"])), function (props) {
|
|
8
|
-
return props.height ? "".concat(props.border) : "2px solid ".concat(Colors.Grey5);
|
|
9
|
-
}, function (props) { return props.height || "70px"; }, function (props) { return props.width || "55px"; }, function (props) { return props.bgColor || "white"; }, function (props) { return props.marginRight || "10px"; }, function (props) { return props.fontSize || "24px"; }, function (props) { return props.borderRadius || "10px"; }, function (props) { return props.fontWeight; }, function (props) { return props.fontFamily; }, function (props) { return props.color; }, function (props) { return props.borderHover || "2px solid ".concat(Colors.Grey1); });
|
|
10
|
-
var CodeInput = function (_a) {
|
|
11
|
-
var onChange = _a.onChange, onComplete = _a.onComplete, _b = _a.length, length = _b === void 0 ? 4 : _b, _c = _a.resetCode, resetCode = _c === void 0 ? false : _c, color = _a.color, placeholder = _a.placeholder, height = _a.height, width = _a.width, border = _a.border, bgColor = _a.bgColor, borderRadius = _a.borderRadius, borderHover = _a.borderHover, fontSize = _a.fontSize, marginRight = _a.marginRight, fontWeight = _a.fontWeight, fontFamily = _a.fontFamily, paddingLeft = _a.paddingLeft;
|
|
12
|
-
var _d = useState(new Array(length).fill("")), value = _d[0], setValue = _d[1];
|
|
13
|
-
useEffect(function () {
|
|
14
|
-
if (resetCode) {
|
|
15
|
-
setValue(new Array(length).fill(""));
|
|
16
|
-
}
|
|
17
|
-
}, [resetCode]);
|
|
18
|
-
var inputs = [];
|
|
19
|
-
var change = function (valueAt, index) {
|
|
20
|
-
var currentValue = __spreadArray([], value, true);
|
|
21
|
-
if (valueAt.length > 1) {
|
|
22
|
-
valueAt = valueAt.substring(1);
|
|
23
|
-
}
|
|
24
|
-
// Single Character Press
|
|
25
|
-
if (valueAt.length === 1) {
|
|
26
|
-
currentValue[index] = valueAt;
|
|
27
|
-
setValue(currentValue);
|
|
28
|
-
if (inputs[index + 1]) {
|
|
29
|
-
inputs[index + 1].focus();
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
else if (valueAt.length === length) {
|
|
33
|
-
//code pasted
|
|
34
|
-
setValue(valueAt.split(""));
|
|
35
|
-
onComplete(valueAt);
|
|
36
|
-
if (inputs[index + 1]) {
|
|
37
|
-
inputs[index + 1].focus();
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
else if (valueAt.length > 0 && valueAt.length < length) {
|
|
41
|
-
// More than 1 character, less than the total number required
|
|
42
|
-
change(valueAt.charAt(valueAt.length - 1), index);
|
|
43
|
-
}
|
|
44
|
-
if (index + 1 === length) {
|
|
45
|
-
onComplete(currentValue.join(""));
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
useEffect(function () {
|
|
49
|
-
onChange && onChange(value);
|
|
50
|
-
}, [value]);
|
|
51
|
-
var renderInput = function (index) {
|
|
52
|
-
var curValue = value[index];
|
|
53
|
-
return (React.createElement(Input, { key: index, autoFocus: index === 0, value: curValue, type: "number", pattern: "\\d*", ref: function (ref) { return (inputs[index] = ref); }, onChange: function (event) {
|
|
54
|
-
onChange();
|
|
55
|
-
change(event.target.value, index);
|
|
56
|
-
}, color: color, placeholder: placeholder, height: height, width: width, border: border, bgColor: bgColor, borderRadius: borderRadius, borderHover: borderHover, fontSize: fontSize, marginRight: marginRight, fontWeight: fontWeight, fontFamily: fontFamily, onKeyDown: function (event) {
|
|
57
|
-
if (event.keyCode === 8 || event.keyCode === 46) {
|
|
58
|
-
// handle backspace or delete
|
|
59
|
-
event.preventDefault();
|
|
60
|
-
var currentValue = __spreadArray([], value, true);
|
|
61
|
-
currentValue[index] = "";
|
|
62
|
-
setValue(currentValue);
|
|
63
|
-
if (index !== 0) {
|
|
64
|
-
inputs[index - 1].focus();
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
else if (event.keyCode === 37) {
|
|
68
|
-
// navigate left with left arrow key
|
|
69
|
-
event.preventDefault();
|
|
70
|
-
if (index !== 0) {
|
|
71
|
-
inputs[index - 1].focus();
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
else if (event.keyCode === 39) {
|
|
75
|
-
// navigate right with right arrow key
|
|
76
|
-
event.preventDefault();
|
|
77
|
-
if (index !== value.length - 1) {
|
|
78
|
-
inputs[index + 1].focus();
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
else if (
|
|
82
|
-
// prohibit weird behavior when up, down, +, or - are pressed
|
|
83
|
-
event.keyCode === 38 ||
|
|
84
|
-
event.keyCode === 40 ||
|
|
85
|
-
event.keyCode === 107 ||
|
|
86
|
-
event.keyCode === 109) {
|
|
87
|
-
event.preventDefault();
|
|
88
|
-
}
|
|
89
|
-
} }));
|
|
90
|
-
};
|
|
91
|
-
return (React.createElement(Container, { paddingLeft: paddingLeft }, value.map(function (_, index) {
|
|
92
|
-
return renderInput(index);
|
|
93
|
-
})));
|
|
94
|
-
};
|
|
95
|
-
var templateObject_1, templateObject_2;
|
|
96
|
-
|
|
97
|
-
export { CodeInput as default };
|
|
98
|
-
//# sourceMappingURL=CodeInput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CodeInput.js","sources":["../../../src/components/CodeInput.tsx"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAQA,IAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAgB,gBAAA,KAAA,gBAAA,GAAA,oBAA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