@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,4 +1,4 @@
|
|
|
1
|
-
import { __makeTemplateObject, __assign } from '../
|
|
1
|
+
import { __makeTemplateObject, __assign } from '../node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import React, { useState, Fragment } from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import * as Polished from 'polished';
|
|
@@ -12,181 +12,170 @@ import ValidationError from './ValidationError.js';
|
|
|
12
12
|
import { media } from '../utils/MediaQuery.js';
|
|
13
13
|
import SvgRenderer from './SvgRendrer.js';
|
|
14
14
|
|
|
15
|
-
var InputSizes;
|
|
16
|
-
(function (InputSizes) {
|
|
17
|
-
InputSizes["Large"] = "Large";
|
|
18
|
-
InputSizes["Regular"] = "Regular";
|
|
19
|
-
InputSizes["CustomInputHeight"] = "CustomInputHeight";
|
|
20
|
-
})(InputSizes || (InputSizes = {}));
|
|
21
|
-
var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n margin: ", ";\n"], ["\n width: ", ";\n margin: ", ";\n"])), function (props) { return props.width; }, function (props) { return props.margin; });
|
|
22
|
-
var IncrementButton = styled.button(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: 22px;\n padding: 5px 14px;\n cursor: pointer;\n border: none;\n background-color: #f0f0f0;\n"], ["\n font-size: 22px;\n padding: 5px 14px;\n cursor: pointer;\n border: none;\n background-color: #f0f0f0;\n"])));
|
|
23
|
-
var Form = styled.form(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: ", ";\n display: flex;\n flex-direction: row;\n position: relative;\n border-radius: 10px;\n transition: all 0.2s;\n border: 1px solid\n ", ";\n\n border-color: ", ";\n overflow: hidden;\n background-color: ", ";\n\n > * {\n background-color: ", ";\n }\n"], ["\n width: ", ";\n display: flex;\n flex-direction: row;\n position: relative;\n border-radius: 10px;\n transition: all 0.2s;\n border: 1px solid\n ",
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}, function (props) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
var
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
React.createElement(
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
if (Boolean(value) && onClear) {
|
|
180
|
-
return (React.createElement(Fragment, null,
|
|
181
|
-
React.createElement(Spacer, { incrementButton: true }),
|
|
182
|
-
React.createElement(RightContainer, { onClick: function () { return onClear(); }, size: size },
|
|
183
|
-
React.createElement(Icon, __assign({ icon: (iconProps === null || iconProps === void 0 ? void 0 : iconProps.icon) ? iconProps.icon : Icons.CancelCircle, color: Colors.Grey4, hoverColor: Colors.Grey3, size: iconSize }, iconProps)))));
|
|
184
|
-
}
|
|
185
|
-
return React.createElement(Spacer, { incrementButton: true });
|
|
186
|
-
})()),
|
|
187
|
-
validationError && React.createElement(ValidationError, { validationError: validationError, disableValidationErrorBox: disableValidationErrorBox })));
|
|
188
|
-
}
|
|
189
|
-
var Input$1 = React.forwardRef(Input);
|
|
15
|
+
var InputSizes;
|
|
16
|
+
(function (InputSizes) {
|
|
17
|
+
InputSizes["Large"] = "Large";
|
|
18
|
+
InputSizes["Regular"] = "Regular";
|
|
19
|
+
InputSizes["CustomInputHeight"] = "CustomInputHeight";
|
|
20
|
+
})(InputSizes || (InputSizes = {}));
|
|
21
|
+
var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n margin: ", ";\n"], ["\n width: ", ";\n margin: ", ";\n"])), function (props) { return props.width; }, function (props) { return props.margin; });
|
|
22
|
+
var IncrementButton = styled.button(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: 22px;\n padding: 5px 14px;\n cursor: pointer;\n border: none;\n background-color: #f0f0f0;\n"], ["\n font-size: 22px;\n padding: 5px 14px;\n cursor: pointer;\n border: none;\n background-color: #f0f0f0;\n"])));
|
|
23
|
+
var Form = styled.form(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: ", ";\n display: flex;\n flex-direction: row;\n position: relative;\n border-radius: 10px;\n transition: all 0.2s;\n border: 1px solid\n ", ";\n\n border-color: ", ";\n overflow: hidden;\n background-color: ", ";\n\n > * {\n background-color: ", ";\n }\n"], ["\n width: ", ";\n display: flex;\n flex-direction: row;\n position: relative;\n border-radius: 10px;\n transition: all 0.2s;\n border: 1px solid\n ", ";\n\n border-color: ", ";\n overflow: hidden;\n background-color: ", ";\n\n > * {\n background-color: ", ";\n }\n"])), function (props) { return props.width; }, function (props) {
|
|
24
|
+
if (props.onFocusedColor && props.focused)
|
|
25
|
+
return Colors.HeadingSecondary;
|
|
26
|
+
if (props.focused)
|
|
27
|
+
return Colors.Grey4;
|
|
28
|
+
if (props.hovered)
|
|
29
|
+
return Polished.darken(0.05, Colors.Grey5);
|
|
30
|
+
return !props.focused && props.onFocusedColor ? Colors.SecondaryStroke : Colors.Grey5;
|
|
31
|
+
}, function (props) { return (props.validationError && props.validationDarkThemeBorderColor ? Colors.ErrorRed : ""); }, function (props) {
|
|
32
|
+
return props.disabled ? "".concat(Colors.Grey6, " !important") : null;
|
|
33
|
+
}, function (props) {
|
|
34
|
+
return props.disabled && props.disableDarkThemeBg ? "".concat(Colors.InteractiveBGSecondary, " !important") : (props.disabled ? "".concat(Colors.Grey6, " !important") : null);
|
|
35
|
+
});
|
|
36
|
+
var Button = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ", ";\n height: ", ";\n width: ", ";\n border-radius: 0 10px 10px 0;\n top: -1px;\n right: ", ";\n transition: all 0.2s;\n\n &:hover {\n cursor: ", ";\n }\n\n &:active {\n cursor: ", ";\n }\n"], ["\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ", ";\n height: ", ";\n width: ", ";\n border-radius: 0 10px 10px 0;\n top: -1px;\n right: ", ";\n transition: all 0.2s;\n\n &:hover {\n cursor: ", ";\n }\n\n &:active {\n cursor: ", ";\n }\n"])), Colors.White, function (props) {
|
|
37
|
+
if (props.size === InputSizes.Large)
|
|
38
|
+
return "50px";
|
|
39
|
+
if (props.size === InputSizes.Regular)
|
|
40
|
+
return "40px";
|
|
41
|
+
return null;
|
|
42
|
+
}, function (props) {
|
|
43
|
+
if (props.size === InputSizes.Large)
|
|
44
|
+
return "50px";
|
|
45
|
+
if (props.size === InputSizes.Regular)
|
|
46
|
+
return "40px";
|
|
47
|
+
return null;
|
|
48
|
+
}, function (props) { return (props.codeApply ? "0px" : "-1px"); }, function (props) { return (props.onClick ? "pointer" : null); }, function (props) { return (props.onClick ? "pointer" : null); });
|
|
49
|
+
var IconContainer = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 18px;\n"], ["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 18px;\n"])));
|
|
50
|
+
var TextContainer = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n color: ", ";\n font-size: 1.7rem;\n text-decoration: underline;\n font-weight: 500;\n"], ["\n color: ", ";\n font-size: 1.7rem;\n text-decoration: underline;\n font-weight: 500;\n"])), function (props) { return (props.canSubmit ? Colors.Orange : Colors.Orange); });
|
|
51
|
+
var SvgLeftContainer = styled.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n padding-left: 16px;\n top: 0px;\n left: 0px;\n background-color: ", ";\n"], ["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n padding-left: 16px;\n top: 0px;\n left: 0px;\n background-color: ", ";\n"])), Colors.SurfaceTertiary);
|
|
52
|
+
var LeftContainer = styled.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: 16px;\n top: 0px;\n left: 0px;\n background-color: ", ";\n"], ["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: 16px;\n top: 0px;\n left: 0px;\n background-color: ", ";\n"])), Colors.White);
|
|
53
|
+
var RightContainer = styled.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n height: ", ";\n width: ", ";\n top: -1px;\n right: -1px;\n\n &:hover {\n cursor: ", ";\n }\n"], ["\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n height: ", ";\n width: ", ";\n top: -1px;\n right: -1px;\n\n &:hover {\n cursor: ", ";\n }\n"])), function (props) {
|
|
54
|
+
if (props.size === InputSizes.Large)
|
|
55
|
+
return "50px";
|
|
56
|
+
if (props.size === InputSizes.Regular)
|
|
57
|
+
return "40px";
|
|
58
|
+
return null;
|
|
59
|
+
}, function (props) {
|
|
60
|
+
if (props.size === InputSizes.Large)
|
|
61
|
+
return "50px";
|
|
62
|
+
if (props.size === InputSizes.Regular)
|
|
63
|
+
return "40px";
|
|
64
|
+
return null;
|
|
65
|
+
}, function (props) { return (props.onClick ? "pointer" : null); });
|
|
66
|
+
var Spacer = styled.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n width: ", ";\n background-color: ", ";\n"], ["\n width: ", ";\n background-color: ", ";\n"])), function (props) { return (props.incrementButton ? "0px" : "50px"); }, Colors.White);
|
|
67
|
+
var InputStyled = styled.input(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n outline: none;\n border: 0px;\n /* border-radius: 10px; */\n height: ", ";\n width: 100%;\n font-family: \"neue-haas-grotesk-display\", sans-serif;\n font-weight: 500;\n padding: 0px;\n padding-left: ", ";\n transition: all 0.2s;\n padding: ", ";\n\n ::placeholder {\n color: ", ";\n }\n\n ", ";\n\n ", ";\n"], ["\n background-color: ", ";\n color: ", ";\n outline: none;\n border: 0px;\n /* border-radius: 10px; */\n height: ", ";\n width: 100%;\n font-family: \"neue-haas-grotesk-display\", sans-serif;\n font-weight: 500;\n padding: 0px;\n padding-left: ", ";\n transition: all 0.2s;\n padding: ", ";\n\n ::placeholder {\n color: ", ";\n }\n\n ", ";\n\n ", ";\n"])), function (props) { return props.backgroundColor || Colors.White; }, function (props) {
|
|
68
|
+
return props.textColor || (props.disabled ? Colors.Grey4 : Colors.Grey1);
|
|
69
|
+
}, function (props) {
|
|
70
|
+
if (props.inputSize === InputSizes.Large)
|
|
71
|
+
return "48px";
|
|
72
|
+
if (props.inputSize === InputSizes.Regular)
|
|
73
|
+
return "38px";
|
|
74
|
+
if (props.inputSize === InputSizes.CustomInputHeight)
|
|
75
|
+
return "56px";
|
|
76
|
+
return null;
|
|
77
|
+
}, function (props) { return (props.hasIcon ? "8px" : "16px"); }, function (props) { return props.padding; }, function (props) { return props.placeholderColor || Colors.Grey4; }, media.mobile(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n font-size: 1.6rem;\n "], ["\n font-size: 1.6rem;\n "]))), media.desktop(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n font-size: ", "\n"], ["\n font-size: ", "\n"])), function (props) { return props.mediaDesktopFontSize || "1.4rem"; }));
|
|
78
|
+
function Input(_a, inputRef) {
|
|
79
|
+
var autoFocus = _a.autoFocus, placeholder = _a.placeholder, value = _a.value, defaultValue = _a.defaultValue, icon = _a.icon, iconColor = _a.iconColor, _b = _a.size, size = _b === void 0 ? InputSizes.Regular : _b, _c = _a.type, type = _c === void 0 ? "text" : _c, onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave, onChange = _a.onChange, onFocus = _a.onFocus, onBlur = _a.onBlur, onSubmit = _a.onSubmit, onClear = _a.onClear, _d = _a.canSubmit, canSubmit = _d === void 0 ? true : _d, loading = _a.loading, margin = _a.margin, padding = _a.padding, width = _a.width, onEnter = _a.onEnter, label = _a.label, subLabel = _a.subLabel, tip = _a.tip, maxLength = _a.maxLength, iconConditionalColor = _a.iconConditionalColor, validationError = _a.validationError, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.incrementButton, incrementButton = _f === void 0 ? false : _f, handleIncrement = _a.handleIncrement, handleDecrement = _a.handleDecrement, codeApply = _a.codeApply, discountCode = _a.discountCode, bgColor = _a.bgColor, labelColor = _a.labelColor, fontSize = _a.fontSize, fontFamily = _a.fontFamily, fontWeight = _a.fontWeight, marginBottam = _a.marginBottam, placeholderTextColor = _a.placeholderTextColor, iconProps = _a.iconProps, letterSpacing = _a.letterSpacing, onFocusedColor = _a.onFocusedColor, svgIconName = _a.svgIconName, svgWidth = _a.svgWidth, svgHeight = _a.svgHeight, disableDarkThemeBg = _a.disableDarkThemeBg, validationDarkThemeBorderColor = _a.validationDarkThemeBorderColor, mediaDesktopFontSize = _a.mediaDesktopFontSize, maxLengthDisabled = _a.maxLengthDisabled, disableValidationErrorBox = _a.disableValidationErrorBox;
|
|
80
|
+
var _g = useState(false), hovered = _g[0], setHovered = _g[1];
|
|
81
|
+
var _h = useState(false), focused = _h[0], setFocused = _h[1];
|
|
82
|
+
var submit = function (event) {
|
|
83
|
+
event.preventDefault();
|
|
84
|
+
if (onSubmit && !loading) {
|
|
85
|
+
onSubmit();
|
|
86
|
+
}
|
|
87
|
+
else if (onEnter && !loading) {
|
|
88
|
+
onEnter();
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
var iconSize = (function () {
|
|
92
|
+
if (size === InputSizes.Large)
|
|
93
|
+
return 16;
|
|
94
|
+
if (size === InputSizes.Regular)
|
|
95
|
+
return 14;
|
|
96
|
+
return 14;
|
|
97
|
+
})();
|
|
98
|
+
var submitIconSize = (function () {
|
|
99
|
+
if (size === InputSizes.Large)
|
|
100
|
+
return 18;
|
|
101
|
+
if (size === InputSizes.Regular)
|
|
102
|
+
return 16;
|
|
103
|
+
return 16;
|
|
104
|
+
})();
|
|
105
|
+
return (React.createElement(Container, { width: width, margin: margin },
|
|
106
|
+
React.createElement(Flex, { justify: "space-between" },
|
|
107
|
+
label && (React.createElement(Label, { text: label, subText: subLabel, labelColor: labelColor, fontSize: fontSize, fontWeight: fontWeight, fontFamily: fontFamily, marginBottam: marginBottam, letterSpacing: letterSpacing, tip: tip })),
|
|
108
|
+
maxLength && (React.createElement(MaxLength, { value: value, maxLength: maxLength, maxLengthDisabled: maxLengthDisabled }))),
|
|
109
|
+
React.createElement(Form, { hovered: hovered, focused: focused, onSubmit: function (event) { return submit(event); }, width: width, disabled: disabled, noValidate // disables default html5 validation
|
|
110
|
+
: true, validationError: validationError, onFocusedColor: onFocusedColor, disableDarkThemeBg: disableDarkThemeBg, validationDarkThemeBorderColor: validationDarkThemeBorderColor },
|
|
111
|
+
icon && (React.createElement(LeftContainer, { size: size },
|
|
112
|
+
React.createElement(IconContainer, null,
|
|
113
|
+
React.createElement(Icon, { icon: icon, size: iconSize, color: (function () {
|
|
114
|
+
if (iconColor)
|
|
115
|
+
return iconColor;
|
|
116
|
+
return value
|
|
117
|
+
? iconConditionalColor || Colors.Grey1
|
|
118
|
+
: focused
|
|
119
|
+
? Colors.Grey3
|
|
120
|
+
: Colors.Grey4;
|
|
121
|
+
})() })))),
|
|
122
|
+
svgIconName && (React.createElement(SvgLeftContainer, null,
|
|
123
|
+
React.createElement(SvgRenderer, { iconName: svgIconName, width: svgWidth, height: svgHeight, style: { margin: '2px 0px' } }))),
|
|
124
|
+
incrementButton && (React.createElement(IncrementButton, { onClick: handleDecrement }, "-")),
|
|
125
|
+
React.createElement(InputStyled, { ref: inputRef, disabled: disabled, autoFocus: autoFocus, placeholder: placeholder, value: value, defaultValue: defaultValue, type: type, onChange: function (e) {
|
|
126
|
+
if (maxLength && e.currentTarget.value.length > maxLength) ;
|
|
127
|
+
else {
|
|
128
|
+
onChange(e);
|
|
129
|
+
}
|
|
130
|
+
}, onFocus: function (event) {
|
|
131
|
+
setFocused(true);
|
|
132
|
+
if (onFocus)
|
|
133
|
+
onFocus(event);
|
|
134
|
+
}, onBlur: function (event) {
|
|
135
|
+
setFocused(false);
|
|
136
|
+
if (onFocus)
|
|
137
|
+
onBlur(event);
|
|
138
|
+
}, onMouseEnter: function (event) {
|
|
139
|
+
setHovered(true);
|
|
140
|
+
if (onMouseEnter)
|
|
141
|
+
onMouseEnter(event);
|
|
142
|
+
}, onMouseLeave: function (event) {
|
|
143
|
+
setHovered(false);
|
|
144
|
+
if (onMouseLeave)
|
|
145
|
+
onMouseLeave(event);
|
|
146
|
+
}, padding: padding, inputSize: size, hasIcon: Boolean(icon), backgroundColor: bgColor, textColor: labelColor, placeholderColor: placeholderTextColor, mediaDesktopFontSize: mediaDesktopFontSize }),
|
|
147
|
+
incrementButton && (React.createElement(IncrementButton, { onClick: handleIncrement }, "+")),
|
|
148
|
+
(function () {
|
|
149
|
+
if (onSubmit) {
|
|
150
|
+
return (React.createElement(Fragment, null,
|
|
151
|
+
React.createElement(Spacer, { incrementButton: true }),
|
|
152
|
+
React.createElement(Button, { canSubmit: canSubmit, onClick: function (event) { return submit(event); }, size: size, codeApply: codeApply }, (function () {
|
|
153
|
+
if (loading) {
|
|
154
|
+
return (React.createElement(Loader, { size: LoaderSizes.VerySmall, color: Colors.Orange }));
|
|
155
|
+
}
|
|
156
|
+
var iconstyles = iconProps ? iconProps : {};
|
|
157
|
+
return (React.createElement(React.Fragment, null,
|
|
158
|
+
!codeApply && (React.createElement(Icon, __assign({ icon: Icons.RightArrowRegular, color: canSubmit ? Colors.Orange : Colors.Grey5, hoverColor: "gray", size: submitIconSize }, iconstyles))),
|
|
159
|
+
codeApply && (React.createElement(TextContainer, { canSubmit: canSubmit }, discountCode ? (React.createElement(Icon, { icon: Icons.Cancel, color: Colors.HeadingSecondary, size: "18", marginRight: "8px", padding: "0px 10px", backgroundColor: Colors.SurfaceTertiary, borderRadius: "8px", width: "29px", height: "40px", top: "4px", display: "flex", alignItems: "center", justifyContent: "center" })) : (React.createElement(Icon, { icon: Icons.RightArrowRegular, color: Colors.HeadingSecondary, size: "18", marginRight: "8px", padding: "0px 10px", backgroundColor: validationError ? Colors.ErrorRed : Colors.InteractiveBGPrimary, borderRadius: "8px", width: "29px", height: "40px", top: "4px", display: "flex", alignItems: "center", justifyContent: "center" }))))));
|
|
160
|
+
})())));
|
|
161
|
+
}
|
|
162
|
+
if (loading) {
|
|
163
|
+
return (React.createElement(Fragment, null,
|
|
164
|
+
React.createElement(Spacer, { incrementButton: true }),
|
|
165
|
+
React.createElement(RightContainer, { size: size },
|
|
166
|
+
React.createElement(Loader, { size: LoaderSizes.SuperSmall, color: Colors.Orange }))));
|
|
167
|
+
}
|
|
168
|
+
if (Boolean(value) && onClear) {
|
|
169
|
+
return (React.createElement(Fragment, null,
|
|
170
|
+
React.createElement(Spacer, { incrementButton: true }),
|
|
171
|
+
React.createElement(RightContainer, { onClick: function () { return onClear(); }, size: size },
|
|
172
|
+
React.createElement(Icon, __assign({ icon: (iconProps === null || iconProps === void 0 ? void 0 : iconProps.icon) ? iconProps.icon : Icons.CancelCircle, color: Colors.Grey4, hoverColor: Colors.Grey3, size: iconSize }, iconProps)))));
|
|
173
|
+
}
|
|
174
|
+
return React.createElement(Spacer, { incrementButton: true });
|
|
175
|
+
})()),
|
|
176
|
+
validationError && React.createElement(ValidationError, { validationError: validationError, disableValidationErrorBox: disableValidationErrorBox })));
|
|
177
|
+
}
|
|
178
|
+
var Input$1 = React.forwardRef(Input);
|
|
190
179
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13;
|
|
191
180
|
|
|
192
181
|
export { InputSizes, InputStyled, Input$1 as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.js","sources":["../../src/components/Input.tsx"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;IAaY,WAIX;AAJD,CAAA,UAAY,UAAU,EAAA;AACpB,IAAA,UAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACf,IAAA,UAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB,IAAA,UAAA,CAAA,mBAAA,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,MAAM,EAAC,EAAA,IAAI,EAAE,WAAW,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,GAAI,CAC/C,CACR,EACX;AACH,iBAAA;AAED,gBAAA,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,OAAO,EAAE;oBAC7B,QACE,oBAAC,QAAQ,EAAA,IAAA;wBACP,KAAC,CAAA,aAAA,CAAA,MAAM,EAAC,EAAA,eAAe,EAAG,IAAA,EAAA,CAAA;AAC1B,wBAAA,KAAA,CAAA,aAAA,CAAC,cAAc,EAAA,EAAC,OAAO,EAAE,YAAM,EAAA,OAAA,OAAO,EAAE,CAAT,EAAS,EAAE,IAAI,EAAE,IAAI,EAAA;4BAClD,KAAC,CAAA,aAAA,CAAA,IAAI,aACH,IAAI,EAAE,CAAA,SAAS,KAAA,IAAA,IAAT,SAAS,KAAT,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,SAAS,CAAE,IAAI,IAAG,SAAS,CAAC,IAAI,GAAG,KAAK,CAAC,YAAY,EAC3D,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,UAAU,EAAE,MAAM,CAAC,KAAK,EACxB,IAAI,EAAE,QAAQ,EAAA,EACV,SAAS,CACb,CAAA,CACa,CACR,EACX;AACH,iBAAA;AAED,gBAAA,OAAO,KAAC,CAAA,aAAA,CAAA,MAAM,EAAC,EAAA,eAAe,SAAG,CAAC;aACnC,GAAG,CACC;AACN,QAAA,eAAe,IAAI,KAAA,CAAA,aAAA,CAAC,eAAe,EAAA,EAAC,eAAe,EAAE,eAAe,EAAE,yBAAyB,EAAE,yBAAyB,EAAI,CAAA,CACrH,EACZ;AACJ,CAAC;AAED,cAAe,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;;;;;"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { __makeTemplateObject } from '../
|
|
1
|
+
import { __makeTemplateObject } from '../node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { Colors } from '../Colors.js';
|
|
5
5
|
import Tip from './Tip.js';
|
|
6
6
|
|
|
7
|
-
var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n align-items: center;\n margin: ", ";\n height: ", ";\n"], ["\n display: flex;\n flex-direction: row;\n align-items: center;\n margin: ", ";\n height: ", ";\n"])), function (props) { return props.margin; }, function (props) { return props.height || "15px"; });
|
|
8
|
-
var Text = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: ", ";\n font-weight: ", ";\n color: ", ";\n //margin-right: 7px;\n font-family: ", ";\n margin-bottom: ", ";\n letter-spacing: ", ";\n"], ["\n font-size: ", ";\n font-weight: ", ";\n color: ", ";\n //margin-right: 7px;\n font-family: ", ";\n margin-bottom: ", ";\n letter-spacing: ", ";\n"])), function (props) { return props.fontSize || "1.2rem"; }, function (props) { return props.fontWeight || "600"; }, function (props) { return props.color || Colors.Grey1; }, function (props) { return props.fontFamily; }, function (props) { return props.marginBottam; }, function (props) { return props.letterSpacing; });
|
|
9
|
-
var SubText = styled.span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), Colors.Grey3);
|
|
10
|
-
var Label = function (_a) {
|
|
11
|
-
var text = _a.text, subText = _a.subText, tip = _a.tip, labelColor = _a.labelColor, fontSize = _a.fontSize, fontWeight = _a.fontWeight, fontFamily = _a.fontFamily, marginBottam = _a.marginBottam, _b = _a.margin, margin = _b === void 0 ? "0 0 8px" : _b, letterSpacing = _a.letterSpacing, height = _a.height;
|
|
12
|
-
return (React.createElement(Container, { margin: margin, height: height },
|
|
13
|
-
React.createElement(Text, { color: labelColor, fontSize: fontSize, fontWeight: fontWeight, fontFamily: fontFamily, marginBottam: marginBottam, letterSpacing: letterSpacing },
|
|
14
|
-
text,
|
|
15
|
-
subText && React.createElement(SubText, null,
|
|
16
|
-
"\u00A0",
|
|
17
|
-
subText)),
|
|
18
|
-
tip && React.createElement(Tip, { tip: tip })));
|
|
19
|
-
};
|
|
7
|
+
var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n align-items: center;\n margin: ", ";\n height: ", ";\n"], ["\n display: flex;\n flex-direction: row;\n align-items: center;\n margin: ", ";\n height: ", ";\n"])), function (props) { return props.margin; }, function (props) { return props.height || "15px"; });
|
|
8
|
+
var Text = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: ", ";\n font-weight: ", ";\n color: ", ";\n //margin-right: 7px;\n font-family: ", ";\n margin-bottom: ", ";\n letter-spacing: ", ";\n"], ["\n font-size: ", ";\n font-weight: ", ";\n color: ", ";\n //margin-right: 7px;\n font-family: ", ";\n margin-bottom: ", ";\n letter-spacing: ", ";\n"])), function (props) { return props.fontSize || "1.2rem"; }, function (props) { return props.fontWeight || "600"; }, function (props) { return props.color || Colors.Grey1; }, function (props) { return props.fontFamily; }, function (props) { return props.marginBottam; }, function (props) { return props.letterSpacing; });
|
|
9
|
+
var SubText = styled.span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), Colors.Grey3);
|
|
10
|
+
var Label = function (_a) {
|
|
11
|
+
var text = _a.text, subText = _a.subText, tip = _a.tip, labelColor = _a.labelColor, fontSize = _a.fontSize, fontWeight = _a.fontWeight, fontFamily = _a.fontFamily, marginBottam = _a.marginBottam, _b = _a.margin, margin = _b === void 0 ? "0 0 8px" : _b, letterSpacing = _a.letterSpacing, height = _a.height;
|
|
12
|
+
return (React.createElement(Container, { margin: margin, height: height },
|
|
13
|
+
React.createElement(Text, { color: labelColor, fontSize: fontSize, fontWeight: fontWeight, fontFamily: fontFamily, marginBottam: marginBottam, letterSpacing: letterSpacing },
|
|
14
|
+
text,
|
|
15
|
+
subText && React.createElement(SubText, null,
|
|
16
|
+
"\u00A0",
|
|
17
|
+
subText)),
|
|
18
|
+
tip && React.createElement(Tip, { tip: tip })));
|
|
19
|
+
};
|
|
20
20
|
var templateObject_1, templateObject_2, templateObject_3;
|
|
21
21
|
|
|
22
22
|
export { Label as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.js","sources":["../../src/components/Label.tsx"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAiBA,IAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAgB,gBAAA,KAAA,gBAAA,GAAA,oBAAA,CAAA,CAAA,gFAAA,EAAA,eAAA,EAAA,KAAA,CAAA,EAAA,CAAA,gFAIhC,EAAuB,eACvB,EAAiC,KAC5C,CAAA,CAAA,CAAA,EAFW,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,MAAM,CAAZ,EAAY,EACvB,UAAC,KAAK,EAAK,EAAA,OAAA,KAAK,CAAC,MAAM,IAAI,MAAM,CAAtB,EAAsB,CAC5C,CAAC;AAEF,IAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAA,gBAAA,KAAA,gBAAA,GAAA,oBAAA,CAAA,CAAA,iBAAA,EAAA,oBAAA,EAAA,cAAA,EAAA,4CAAA,EAAA,sBAAA,EAAA,uBAAA,EAAA,KAAA,CAAA,EAAA,CAAW,iBACnB,EAAqC,oBACnC,EAAoC,cAC1C,EAAsC,4CAEhC,EAA2B,sBACzB,EAA6B,uBAC5B,EAA8B,KACjD,CAPc,CAAA,CAAA,EAAA,UAAC,KAAK,EAAA,EAAK,OAAA,KAAK,CAAC,QAAQ,IAAI,QAAQ,GAAA,EACnC,UAAC,KAAK,EAAA,EAAK,OAAA,KAAK,CAAC,UAAU,IAAI,KAAK,GAAA,EAC1C,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,GAAA,EAEhC,UAAC,KAAK,EAAA,EAAK,OAAA,KAAK,CAAC,UAAU,CAAhB,EAAgB,EACzB,UAAC,KAAK,EAAK,EAAA,OAAA,KAAK,C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GAAG,EAAA,CAAI,CACf,EACZ;AACJ,EAAE;;;;;"}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { __makeTemplateObject } from '../
|
|
1
|
+
import { __makeTemplateObject } from '../node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { Colors } from '../Colors.js';
|
|
5
5
|
|
|
6
|
-
var _a;
|
|
7
|
-
var LoaderSizes;
|
|
8
|
-
(function (LoaderSizes) {
|
|
9
|
-
LoaderSizes["FuckingTiny"] = "FuckingTiny";
|
|
10
|
-
LoaderSizes["SuperSmall"] = "SuperSmall";
|
|
11
|
-
LoaderSizes["VerySmall"] = "VerySmall";
|
|
12
|
-
LoaderSizes["Small"] = "Small";
|
|
13
|
-
LoaderSizes["Medium"] = "Medium";
|
|
14
|
-
LoaderSizes["Large"] = "Large";
|
|
15
|
-
})(LoaderSizes || (LoaderSizes = {}));
|
|
16
|
-
var LoaderSizesMap = (_a = {},
|
|
17
|
-
_a[LoaderSizes.FuckingTiny] = 14,
|
|
18
|
-
_a[LoaderSizes.SuperSmall] = 20,
|
|
19
|
-
_a[LoaderSizes.VerySmall] = 24,
|
|
20
|
-
_a[LoaderSizes.Small] = 30,
|
|
21
|
-
_a[LoaderSizes.Medium] = 40,
|
|
22
|
-
_a[LoaderSizes.Large] = 60,
|
|
23
|
-
_a);
|
|
24
|
-
var scale = function (size, scale) { return size * scale
|
|
25
|
-
var StyledLoader = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n top: 1.5px;\n\n .lds-ring {\n display: inline-block;\n position: relative;\n width: ", ";\n height: ", ";\n }\n .lds-ring div {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: ", ";\n height: ", ";\n margin: ", ";\n border: ", " solid ", ";\n border-radius: 50%;\n animation: lds-ring 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: ", " transparent transparent transparent;\n }\n .lds-ring div:nth-child(1) {\n animation-delay: -0.3s;\n }\n .lds-ring div:nth-child(2) {\n animation-delay: -0.2s;\n }\n .lds-ring div:nth-child(3) {\n animation-delay: -0.1s;\n }\n @keyframes lds-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"], ["\n position: relative;\n top: 1.5px;\n\n .lds-ring {\n display: inline-block;\n position: relative;\n width: ", ";\n height: ", ";\n }\n .lds-ring div {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: ", ";\n height: ", ";\n margin: ", ";\n border: ", " solid ", ";\n border-radius: 50%;\n animation: lds-ring 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: ", " transparent transparent transparent;\n }\n .lds-ring div:nth-child(1) {\n animation-delay: -0.3s;\n }\n .lds-ring div:nth-child(2) {\n animation-delay: -0.2s;\n }\n .lds-ring div:nth-child(3) {\n animation-delay: -0.1s;\n }\n @keyframes lds-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"])), function (props) { return scale(props.size, 1); }, function (props) { return scale(props.size, 1); }, function (props) { return scale(props.size, .8); }, function (props) { return scale(props.size, .8); }, function (props) { return scale(props.size, .1); }, function (props) { return scale(props.size, 0.066); }, function (props) { return props.color; }, function (props) { return props.color; });
|
|
26
|
-
function Loader(_a) {
|
|
27
|
-
var _b = _a.size, size = _b === void 0 ? LoaderSizes.Medium : _b, _c = _a.color, color = _c === void 0 ? Colors.White : _c;
|
|
28
|
-
return (React.createElement(StyledLoader, { size: LoaderSizesMap[size], color: color },
|
|
29
|
-
React.createElement("div", { className: "lds-ring" },
|
|
30
|
-
React.createElement("div", null),
|
|
31
|
-
React.createElement("div", null),
|
|
32
|
-
React.createElement("div", null))));
|
|
33
|
-
}
|
|
6
|
+
var _a;
|
|
7
|
+
var LoaderSizes;
|
|
8
|
+
(function (LoaderSizes) {
|
|
9
|
+
LoaderSizes["FuckingTiny"] = "FuckingTiny";
|
|
10
|
+
LoaderSizes["SuperSmall"] = "SuperSmall";
|
|
11
|
+
LoaderSizes["VerySmall"] = "VerySmall";
|
|
12
|
+
LoaderSizes["Small"] = "Small";
|
|
13
|
+
LoaderSizes["Medium"] = "Medium";
|
|
14
|
+
LoaderSizes["Large"] = "Large";
|
|
15
|
+
})(LoaderSizes || (LoaderSizes = {}));
|
|
16
|
+
var LoaderSizesMap = (_a = {},
|
|
17
|
+
_a[LoaderSizes.FuckingTiny] = 14,
|
|
18
|
+
_a[LoaderSizes.SuperSmall] = 20,
|
|
19
|
+
_a[LoaderSizes.VerySmall] = 24,
|
|
20
|
+
_a[LoaderSizes.Small] = 30,
|
|
21
|
+
_a[LoaderSizes.Medium] = 40,
|
|
22
|
+
_a[LoaderSizes.Large] = 60,
|
|
23
|
+
_a);
|
|
24
|
+
var scale = function (size, scale) { return "".concat(size * scale, "px"); };
|
|
25
|
+
var StyledLoader = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n top: 1.5px;\n\n .lds-ring {\n display: inline-block;\n position: relative;\n width: ", ";\n height: ", ";\n }\n .lds-ring div {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: ", ";\n height: ", ";\n margin: ", ";\n border: ", " solid ", ";\n border-radius: 50%;\n animation: lds-ring 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: ", " transparent transparent transparent;\n }\n .lds-ring div:nth-child(1) {\n animation-delay: -0.3s;\n }\n .lds-ring div:nth-child(2) {\n animation-delay: -0.2s;\n }\n .lds-ring div:nth-child(3) {\n animation-delay: -0.1s;\n }\n @keyframes lds-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"], ["\n position: relative;\n top: 1.5px;\n\n .lds-ring {\n display: inline-block;\n position: relative;\n width: ", ";\n height: ", ";\n }\n .lds-ring div {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: ", ";\n height: ", ";\n margin: ", ";\n border: ", " solid ", ";\n border-radius: 50%;\n animation: lds-ring 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: ", " transparent transparent transparent;\n }\n .lds-ring div:nth-child(1) {\n animation-delay: -0.3s;\n }\n .lds-ring div:nth-child(2) {\n animation-delay: -0.2s;\n }\n .lds-ring div:nth-child(3) {\n animation-delay: -0.1s;\n }\n @keyframes lds-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"])), function (props) { return scale(props.size, 1); }, function (props) { return scale(props.size, 1); }, function (props) { return scale(props.size, .8); }, function (props) { return scale(props.size, .8); }, function (props) { return scale(props.size, .1); }, function (props) { return scale(props.size, 0.066); }, function (props) { return props.color; }, function (props) { return props.color; });
|
|
26
|
+
function Loader(_a) {
|
|
27
|
+
var _b = _a.size, size = _b === void 0 ? LoaderSizes.Medium : _b, _c = _a.color, color = _c === void 0 ? Colors.White : _c;
|
|
28
|
+
return (React.createElement(StyledLoader, { size: LoaderSizesMap[size], color: color },
|
|
29
|
+
React.createElement("div", { className: "lds-ring" },
|
|
30
|
+
React.createElement("div", null),
|
|
31
|
+
React.createElement("div", null),
|
|
32
|
+
React.createElement("div", null))));
|
|
33
|
+
}
|
|
34
34
|
var templateObject_1;
|
|
35
35
|
|
|
36
36
|
export { LoaderSizes, Loader as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Loader.js","sources":["../../src/components/Loader.tsx"],"sourcesContent":[null],"names":[],"mappings":";;;;;;IAIY,YAOX;AAPD,CAAA,UAAY,WAAW,EAAA;AACrB,IAAA,WAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;AAC3B,IAAA,WAAA,CAAA,YAAA,CAAA,GAAA,YAAyB,CAAA;AACzB,IAAA,WAAA,CAAA,WAAA,CAAA,GAAA,WAAuB,CAAA;AACvB,IAAA,WAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACf,IAAA,WAAA,CAAA,QAAA,CAAA,GAAA,Q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ACf;AACJ,CAAC;;;;;"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { __makeTemplateObject } from '../
|
|
1
|
+
import { __makeTemplateObject } from '../node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { Colors } from '../Colors.js';
|
|
5
5
|
|
|
6
|
-
var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n font-size: 1.2rem;\n font-weight: 500;\n color: ", ";\n margin-bottom: 10px;\n"], ["\n display: flex;\n align-items: center;\n font-size: 1.2rem;\n font-weight: 500;\n color: ", ";\n margin-bottom: 10px;\n"])), function (props) { return (props.isMax ? Colors.Red : Colors.Grey3); });
|
|
7
|
-
var MaxLength = function (_a) {
|
|
8
|
-
var value = _a.value, maxLength = _a.maxLength, maxLengthDisabled = _a.maxLengthDisabled;
|
|
9
|
-
if (maxLengthDisabled) {
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
12
|
-
return (React.createElement(Container, { isMax: (value === null || value === void 0 ? void 0 : value.length) === maxLength }, value === null || value === void 0 ? void 0 :
|
|
13
|
-
value.length,
|
|
14
|
-
"/",
|
|
15
|
-
maxLength));
|
|
16
|
-
};
|
|
6
|
+
var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n font-size: 1.2rem;\n font-weight: 500;\n color: ", ";\n margin-bottom: 10px;\n"], ["\n display: flex;\n align-items: center;\n font-size: 1.2rem;\n font-weight: 500;\n color: ", ";\n margin-bottom: 10px;\n"])), function (props) { return (props.isMax ? Colors.Red : Colors.Grey3); });
|
|
7
|
+
var MaxLength = function (_a) {
|
|
8
|
+
var value = _a.value, maxLength = _a.maxLength, maxLengthDisabled = _a.maxLengthDisabled;
|
|
9
|
+
if (maxLengthDisabled) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
return (React.createElement(Container, { isMax: (value === null || value === void 0 ? void 0 : value.length) === maxLength }, value === null || value === void 0 ? void 0 :
|
|
13
|
+
value.length,
|
|
14
|
+
"/",
|
|
15
|
+
maxLength));
|
|
16
|
+
};
|
|
17
17
|
var templateObject_1;
|
|
18
18
|
|
|
19
19
|
export { MaxLength as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MaxLength.js","sources":["../../src/components/MaxLength.tsx"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAQA,IAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAgB,gBAAA,KAAA,gBAAA,GAAA,oBAAA,CAAA,CAAA,kGAAA,EAAA,6BAAA,CAAA,EAAA,CAAA,kGAKjC,EAAoD,6BAE9D,KAFU,UAAC,KAAK,EAAK,EAAA,QAAC,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,KAAK,EAAxC,EAAyC,CAE9D,CAAC;AAQI,IAAA,SAAS,GAA6B,UAAC,EAAuC,EAAA;AAArC,IAAA,IAAA,KAAK,WAAA,EAAE,SAAS,GAAA,EAAA,CAAA,SAAA,EAAE,iBAAiB,GAAA,EAAA,CAAA,iBAAA,CAAA;AAChF,IAAA,IAAI,iBAAiB,EAAE;AACrB,QAAA,OAAO,IAAI,CAAC;AACb,KAAA;AACD,IAAA,QACE,KAAC,CAAA,aAAA,CAAA,SAAS,IAAC,KAAK,EAAE,CAAA,KAAK,KAAA,IAAA,IAAL,KAAK,KAAL,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,KAAK,CAAE,MAAM,MAAK,SAAS,EAC1C,EAAA,KAAK,aAAL,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA;AAAL,QAAA,KAAK,CAAE,MAAM;;QAAG,SAAS,CAChB,EACZ;AACJ,EAAE;;;;;"}
|