@sellout/ui 0.0.397 → 0.0.399
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.d.ts +37 -37
- package/build/components/AddressSearchDropdown.d.ts +31 -31
- package/build/components/Button.d.ts +51 -51
- package/build/components/CodeInput.d.ts +22 -22
- package/build/components/Counter.d.ts +9 -9
- package/build/components/Dropdown.d.ts +40 -40
- package/build/components/Flex.d.ts +14 -14
- package/build/components/FormattedInput.d.ts +34 -34
- package/build/components/FormattedfullInput.d.ts +32 -32
- package/build/components/Icon.d.ts +219 -219
- package/build/components/Icons.d.ts +190 -190
- package/build/components/Input.d.ts +65 -77
- package/build/components/InputOld.d.ts +23 -23
- package/build/components/Label.d.ts +16 -16
- package/build/components/Loader.d.ts +14 -14
- package/build/components/MaxLength.d.ts +8 -8
- package/build/components/Motion.d.ts +30 -30
- package/build/components/PhoneNumberInput.d.ts +36 -36
- package/build/components/Product.d.ts +35 -35
- package/build/components/SearchDropdown.d.ts +41 -41
- package/build/components/SvgIcons.d.ts +15 -15
- package/build/components/SvgRendrer.d.ts +5 -5
- package/build/components/TextButton.d.ts +21 -21
- package/build/components/Tip.d.ts +7 -7
- package/build/components/UserImage.d.ts +13 -13
- package/build/components/UserInfo.d.ts +18 -24
- package/build/components/ValidationError.d.ts +7 -7
- package/build/index.d.ts +29 -29
- package/build/node_modules/tslib/tslib.es6.js +97 -0
- package/build/node_modules/tslib/tslib.es6.js.map +1 -0
- package/build/src/Colors.js +42 -0
- package/build/src/Colors.js.map +1 -0
- package/build/{components → src/components}/AddressSearchDropdown.js +101 -99
- package/build/src/components/AddressSearchDropdown.js.map +1 -0
- package/build/src/components/Button.js +264 -0
- package/build/src/components/Button.js.map +1 -0
- package/build/src/components/CodeInput.js +98 -0
- package/build/src/components/CodeInput.js.map +1 -0
- package/build/src/components/Counter.js +27 -0
- package/build/src/components/Counter.js.map +1 -0
- package/build/src/components/Dropdown.js +53 -0
- package/build/src/components/Dropdown.js.map +1 -0
- package/build/src/components/Flex.js +13 -0
- package/build/src/components/Flex.js.map +1 -0
- package/build/src/components/FormattedInput.js +81 -0
- package/build/src/components/FormattedInput.js.map +1 -0
- package/build/{components → src/components}/FormattedfullInput.js +66 -70
- package/build/src/components/FormattedfullInput.js.map +1 -0
- package/build/src/components/Icon.js +38 -0
- package/build/src/components/Icon.js.map +1 -0
- package/build/src/components/Icons.js +200 -0
- package/build/src/components/Icons.js.map +1 -0
- package/build/src/components/Input.js +182 -0
- package/build/src/components/Input.js.map +1 -0
- package/build/src/components/Label.js +23 -0
- package/build/src/components/Label.js.map +1 -0
- package/build/src/components/Loader.js +37 -0
- package/build/src/components/Loader.js.map +1 -0
- package/build/src/components/MaxLength.js +20 -0
- package/build/src/components/MaxLength.js.map +1 -0
- package/build/src/components/Motion.js +40 -0
- package/build/src/components/Motion.js.map +1 -0
- package/build/src/components/PhoneNumberInput.js +50 -0
- package/build/src/components/PhoneNumberInput.js.map +1 -0
- package/build/src/components/Product.js +125 -0
- package/build/src/components/Product.js.map +1 -0
- package/build/{components → src/components}/SearchDropdown.js +60 -59
- package/build/src/components/SearchDropdown.js.map +1 -0
- package/build/{components → src/components}/SvgIcons.js +35 -35
- package/build/src/components/SvgIcons.js.map +1 -0
- package/build/{components → src/components}/SvgRendrer.js +14 -14
- package/build/src/components/SvgRendrer.js.map +1 -0
- package/build/src/components/TextButton.js +48 -0
- package/build/src/components/TextButton.js.map +1 -0
- package/build/src/components/Tip.js +19 -0
- package/build/src/components/Tip.js.map +1 -0
- package/build/src/components/UserImage.js +37 -0
- package/build/src/components/UserImage.js.map +1 -0
- package/build/src/components/UserInfo.js +40 -0
- package/build/src/components/UserInfo.js.map +1 -0
- package/build/src/components/ValidationError.js +27 -0
- package/build/src/components/ValidationError.js.map +1 -0
- package/build/src/index.js +33 -0
- package/build/src/utils/ErrorUtil.js +19 -0
- package/build/src/utils/ErrorUtil.js.map +1 -0
- package/build/src/utils/MediaQuery.js +66 -0
- package/build/src/utils/MediaQuery.js.map +1 -0
- package/build/src/utils/Validation.js +50 -0
- package/build/src/utils/Validation.js.map +1 -0
- package/build/src/utils/makeEventHandler.js +12 -0
- package/build/src/utils/makeEventHandler.js.map +1 -0
- package/build/utils/ErrorUtil.d.ts +1 -1
- package/build/utils/MediaQuery.d.ts +18 -18
- package/build/utils/Validation.d.ts +6 -6
- package/build/utils/makeEventHandler.d.ts +1 -1
- package/package.json +8 -6
- package/build/Colors.js.map +0 -1
- package/build/_virtual/_tslib.js.map +0 -1
- package/build/components/AddressSearchDropdown.js.map +0 -1
- package/build/components/Button.js.map +0 -1
- package/build/components/CodeInput.js.map +0 -1
- package/build/components/Counter.js.map +0 -1
- package/build/components/Dropdown.js.map +0 -1
- package/build/components/Flex.js.map +0 -1
- package/build/components/FormattedInput.js.map +0 -1
- package/build/components/FormattedfullInput.js.map +0 -1
- package/build/components/Icon.js.map +0 -1
- package/build/components/Icons.js.map +0 -1
- package/build/components/Input.js.map +0 -1
- package/build/components/Label.js.map +0 -1
- package/build/components/Loader.js.map +0 -1
- package/build/components/MaxLength.js.map +0 -1
- package/build/components/Motion.js.map +0 -1
- package/build/components/PhoneNumberInput.js.map +0 -1
- package/build/components/Product.js.map +0 -1
- package/build/components/SearchDropdown.js.map +0 -1
- package/build/components/SvgIcons.js.map +0 -1
- package/build/components/SvgRendrer.js.map +0 -1
- package/build/components/TextButton.js.map +0 -1
- package/build/components/Tip.js.map +0 -1
- package/build/components/UserImage.js.map +0 -1
- package/build/components/UserInfo.js.map +0 -1
- package/build/components/ValidationError.js.map +0 -1
- package/build/utils/ErrorUtil.js.map +0 -1
- package/build/utils/MediaQuery.js.map +0 -1
- package/build/utils/Validation.js.map +0 -1
- package/build/utils/makeEventHandler.js.map +0 -1
- /package/build/{index.js.map → src/index.js.map} +0 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { __makeTemplateObject, __assign } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import React, { useState, Fragment } from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import * as Polished from 'polished';
|
|
5
|
+
import { Colors } from '../Colors.js';
|
|
6
|
+
import Icon, { Icons } from './Icon.js';
|
|
7
|
+
import Loader, { LoaderSizes } from './Loader.js';
|
|
8
|
+
import Label from './Label.js';
|
|
9
|
+
import Flex from './Flex.js';
|
|
10
|
+
import MaxLength from './MaxLength.js';
|
|
11
|
+
import ValidationError from './ValidationError.js';
|
|
12
|
+
import { media } from '../utils/MediaQuery.js';
|
|
13
|
+
import SvgRenderer from './SvgRendrer.js';
|
|
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 ", ";\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);
|
|
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;
|
|
180
|
+
|
|
181
|
+
export { InputSizes, InputStyled, Input$1 as default };
|
|
182
|
+
//# sourceMappingURL=Input.js.map
|
|
@@ -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,CAAA,GAAA,mBAAqC,CAAA;AACvC,CAAC,EAJW,UAAU,KAAV,UAAU,GAIrB,EAAA,CAAA,CAAA,CAAA;AAOD,IAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAgB,gBAAA,KAAA,gBAAA,GAAA,oBAAA,CAAA,CAAA,aAAA,EAAA,eAAA,EAAA,KAAA,CAAA,EA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AAC,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;;;;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { __makeTemplateObject } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { Colors } from '../Colors.js';
|
|
5
|
+
import Tip from './Tip.js';
|
|
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
|
+
};
|
|
20
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
21
|
+
|
|
22
|
+
export { Label as default };
|
|
23
|
+
//# sourceMappingURL=Label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.js","sources":["../../../src/components/Label.tsx"],"sour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AAA,KAAA,CAAA,EAAA,CAAA,aAChB,EAAY,KACtB,CADU,CAAA,CAAA,EAAA,MAAM,CAAC,KAAK,CACtB,CAAC;AAgBI,IAAA,KAAK,GAAyB,UAAC,EAYpC,EAAA;AAXC,IAAA,IAAA,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,GAAG,GAAA,EAAA,CAAA,GAAA,EACH,UAAU,gBAAA,EACV,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,YAAY,GAAA,EAAA,CAAA,YAAA,EACZ,cAAkB,EAAlB,MAAM,GAAG,EAAA,KAAA,KAAA,CAAA,GAAA,SAAS,KAAA,EAClB,aAAa,GAAA,EAAA,CAAA,aAAA,EACb,MAAM,GAAA,EAAA,CAAA,MAAA,CAAA;IAEN,QACE,KAAC,CAAA,aAAA,CAAA,SAAS,EAAC,EAAA,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAA;QACvC,KAAC,CAAA,aAAA,CAAA,IAAI,EACH,EAAA,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAAA;YAE3B,IAAI;YACJ,OAAO,IAAI,oBAAC,OAAO,EAAA,IAAA;;AAAQ,gBAAA,OAAO,CAAW,CACzC;QACN,GAAG,IAAI,KAAC,CAAA,aAAA,CAAA,GAAG,EAAC,EAAA,GAAG,EAAE,GAAG,EAAA,CAAI,CACf,EACZ;AACJ,EAAE;;;;;"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { __makeTemplateObject } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { Colors } from '../Colors.js';
|
|
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 "".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
|
+
var templateObject_1;
|
|
35
|
+
|
|
36
|
+
export { LoaderSizes, Loader as default };
|
|
37
|
+
//# sourceMappingURL=Loader.js.map
|
|
@@ -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,YA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AU,EAAA;YACvB,KAAW,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA,CAAA;YACX,KAAW,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA,CAAA;YACX,KAAW,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA,CAAA,CACP,CACO,EACf;AACJ,CAAC;;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { __makeTemplateObject } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import React 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 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
|
+
var templateObject_1;
|
|
18
|
+
|
|
19
|
+
export { MaxLength as default };
|
|
20
|
+
//# sourceMappingURL=MaxLength.js.map
|
|
@@ -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;;;;;"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { __rest, __assign } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { motion } from 'framer-motion';
|
|
4
|
+
|
|
5
|
+
var ErrorPop = function (_a) {
|
|
6
|
+
_a.duration; var children = _a.children, props = __rest(_a, ["duration", "children"]);
|
|
7
|
+
return (React.createElement(motion.div, __assign({}, props, { initial: { right: -100 }, animate: { right: 15 }, transition: {
|
|
8
|
+
// duration: duration as any,
|
|
9
|
+
type: "spring",
|
|
10
|
+
stiffness: 400,
|
|
11
|
+
damping: 20,
|
|
12
|
+
} }), children));
|
|
13
|
+
};
|
|
14
|
+
var Pop = function (_a) {
|
|
15
|
+
_a.duration; var children = _a.children, props = __rest(_a, ["duration", "children"]);
|
|
16
|
+
return (React.createElement(motion.div, __assign({}, props, { initial: { scale: 0.8 }, animate: { scale: 1 }, transition: {
|
|
17
|
+
// duration,
|
|
18
|
+
type: "spring",
|
|
19
|
+
stiffness: 260,
|
|
20
|
+
damping: 20,
|
|
21
|
+
} }), children));
|
|
22
|
+
};
|
|
23
|
+
var CardPop = function (_a) {
|
|
24
|
+
var _b = _a.duration, duration = _b === void 0 ? 0.2 : _b, children = _a.children, props = __rest(_a, ["duration", "children"]);
|
|
25
|
+
return (React.createElement(motion.div, __assign({}, props, { initial: { scale: 0.9, opacity: 0 }, animate: { scale: 1, opacity: 1 }, transition: {
|
|
26
|
+
duration: duration,
|
|
27
|
+
// type: 'spring',
|
|
28
|
+
stiffness: 260,
|
|
29
|
+
damping: 20,
|
|
30
|
+
} }), children));
|
|
31
|
+
};
|
|
32
|
+
var FadeIn = function (_a) {
|
|
33
|
+
var _b = _a.duration, duration = _b === void 0 ? 0.2 : _b, children = _a.children, props = __rest(_a, ["duration", "children"]);
|
|
34
|
+
return (React.createElement(motion.div, __assign({}, props, { initial: { opacity: 0 }, animate: { opacity: 1 }, transition: {
|
|
35
|
+
duration: duration,
|
|
36
|
+
} }), children));
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export { CardPop, ErrorPop, FadeIn, Pop };
|
|
40
|
+
//# sourceMappingURL=Motion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Motion.js","sources":["../../../src/components/Motion.tsx"],"sourcesContent":[null],"names":[],"mappings":";;;;AAWO,IAAM,QAAQ,GAA4B,UAAC,EAIjD,EAAA;AAHC,IAAc,EAAA,CAAA,QAAA,CAAA,KACd,QAAQ,GAAA,EAAA,CAAA,QAAA,CAAA,CACL,KAAK,GAAA,MAAA,CAAA,EAAA,EAHwC,wBAIjD,EADS;IAER,QACE,KAAC,CAAA,aAAA,CAAA,MAAM,CAAC,GAAG,EACL,QAAA,CAAA,EAAA,EAAA,KA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EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EACjC,UAAU,EAAE;AACV,YAAA,QAAQ,EAAA,QAAA;;AAER,YAAA,SAAS,EAAE,GAAG;AACd,YAAA,OAAO,EAAE,EAAE;SACZ,EAEA,CAAA,EAAA,QAAQ,CACE,EACb;AACJ,EAAE;AAUK,IAAM,MAAM,GAA0B,UAAC,EAI7C,EAAA;AAHC,IAAA,IAAA,EAAc,GAAA,EAAA,CAAA,QAAA,EAAd,QAAQ,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,GAAG,GAAA,EAAA,EACd,QAAQ,GAAA,EAAA,CAAA,QAAA,EACL,KAAK,GAAA,MAAA,CAAA,EAAA,EAHoC,wBAI7C,CADS,CAAA;IAER,QACE,KAAC,CAAA,aAAA,CAAA,MAAM,CAAC,GAAG,eACL,KAAK,EAAA,EACT,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,EACvB,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,EACvB,UAAU,EAAE;AACV,YAAA,QAAQ,EAAA,QAAA;SACT,EAEA,CAAA,EAAA,QAAQ,CACE,EACb;AACJ;;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { __makeTemplateObject } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import PhoneInput from 'react-phone-input-2';
|
|
5
|
+
import 'react-phone-input-2/lib/semantic-ui.css';
|
|
6
|
+
import { Colors } from '../Colors.js';
|
|
7
|
+
import ValidationError from './ValidationError.js';
|
|
8
|
+
import { useMobileMedia } from '../utils/MediaQuery.js';
|
|
9
|
+
import Label from './Label.js';
|
|
10
|
+
|
|
11
|
+
var PhoneNumberInputSizes;
|
|
12
|
+
(function (PhoneNumberInputSizes) {
|
|
13
|
+
PhoneNumberInputSizes["Large"] = "Large";
|
|
14
|
+
PhoneNumberInputSizes["Regular"] = "Regular";
|
|
15
|
+
})(PhoneNumberInputSizes || (PhoneNumberInputSizes = {}));
|
|
16
|
+
var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin: ", ";\n"], ["\n margin: ", ";\n"])), function (props) { return props.margin; });
|
|
17
|
+
// overwrite the preset style imports
|
|
18
|
+
var InnerContainer = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n .react-tel-input {\n font-family: \"neue-haas-grotesk-display\", sans-serif;\n font-size: ", ";\n position: relative;\n width: 100%;\n :disabled {\n cursor: not-allowed;\n background-color: ", ";\n }\n\n .form-control {\n font-family: \"neue-haas-grotesk-display\", sans-serif;\n border-color:", ";\n text-indent: 15px;\n transition: all 0.2s;\n color: ", ";\n font-weight: 500;\n position: relative;\n font-size: ", ";\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n margin-left: 50px;\n padding-left: 0;\n background: ", ";\n border: 1px solid ", ";\n border-radius: 0px 10px 10px 0px;\n height: ", ";\n width: calc(100% - 50px);\n z-index: 1;\n outline: none;\n &:hover {\n border: 1px solid ", ";\n }\n &.invalid-number {\n border: 1px solid ", ";\n background-color: ", ";\n border-left-color: ", ";\n &:focus {\n border: 1px solid ", ";\n border-left-color: ", ";\n background-color: ", ";\n }\n }\n &.open {\n border-color: ", ";\n border-radius: 0px 10px 0 0;\n /* border-bottom: none; */\n box-shadow: none;\n }\n ::placeholder {\n color: ", ";\n }\n &:focus {\n border: 1px solid ", ";\n }\n }\n\n .flag-dropdown {\n outline: none;\n position: absolute;\n width: 100%;\n top: 0;\n bottom: 0;\n padding: 0;\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 10px;\n border-color:", ";\n\n &.open {\n background: ", ";\n border-radius: 10px 10px 0 0;\n .selected-flag {\n background: ", ";\n border-radius: 10px 0 0 0;\n }\n }\n &:hover, &:focus {\n cursor: pointer;\n .selected-flag {\n background-color:", ";;\n }\n }\n }\n\n input[disabled] {\n &+.flag-dropdown {\n &:hover {\n cursor: default;\n .selected-flag {\n background-color: transparent;\n }\n }\n }\n }\n\n .selected-flag {\n transition: all 0.2s;\n background: ", ";\n position: relative;\n width: 50px;\n height: 100%;\n padding: 0 0 0 10px;\n border-radius: 10px 0 0 10px;\n .flag {\n position: absolute;\n top: 50%;\n margin-top: -5px;\n }\n .arrow {\n position: relative;\n top: 50%;\n margin-top: -2px;\n left: 25px;\n width: 0;\n height: 0;\n border-left: 3px solid transparent;\n border-right: 3px solid transparent;\n border-top: 4px solid #555;\n &.up {\n border-top: none;\n border-bottom: 4px solid #555;\n }\n }\n &.open {\n z-index: 2;\n }\n }\n\n .country-list {\n z-index: 2;\n border-radius: 0 0 10px 10px;\n border: 1px solid ", ";\n border-top: none;\n list-style: none;\n position: absolute;\n padding: 0;\n margin: 0px 0 10px -1px;\n box-shadow: unset;\n background-color: ", ";\n width: calc(100% + 2px);\n max-height: ", ";\n overflow-y: scroll;\n .flag {\n display: inline-block;\n }\n .divider {\n padding-bottom: 5px;\n margin-bottom: 5px;\n border-bottom: 1px solid #ccc;\n }\n .country {\n padding: 7px 9px;\n .dial-code {\n color: #6b6b6b;\n }\n &:hover {\n background-color: ", ";\n }\n &.highlight {\n background-color: ", ";\n }\n }\n .flag {\n margin-right: 7px;\n margin-top: 2px;\n }\n .country-name {\n margin-right: 6px;\n color:", ";\n }\n .search {\n position: sticky;\n top: 0;\n background-color: ", ";\n padding: 5px 0 6px 10px;\n }\n .search-emoji {\n display: none;\n font-size: ", ";\n }\n .search-box {\n border: 1px solid #cacaca;\n border-radius: 3px;\n font-size: ", ";\n line-height: 15px;\n padding: 3px 8px 5px;\n outline: none;\n }\n .no-entries-message {\n padding: 7px 10px 11px;\n opacity: .7;\n }\n &::-webkit-scrollbar { width: 12px; }\n &::-webkit-scrollbar-track { background-color: #e6e6e6; }\n &::-webkit-scrollbar-thumb { background-color: #c5c5c4; border-radius: 5px; }\n }\n\n .invalid-number-message {\n position: absolute;\n z-index: 1;\n font-size: ", ";\n left: 46px;\n top: -8px;\n background: #fff;\n padding: 0 2px;\n color: #de0000;\n }\n }\n"], ["\n .react-tel-input {\n font-family: \"neue-haas-grotesk-display\", sans-serif;\n font-size: ", ";\n position: relative;\n width: 100%;\n :disabled {\n cursor: not-allowed;\n background-color: ", ";\n }\n\n .form-control {\n font-family: \"neue-haas-grotesk-display\", sans-serif;\n border-color:", ";\n text-indent: 15px;\n transition: all 0.2s;\n color: ", ";\n font-weight: 500;\n position: relative;\n font-size: ", ";\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n margin-left: 50px;\n padding-left: 0;\n background: ", ";\n border: 1px solid ", ";\n border-radius: 0px 10px 10px 0px;\n height: ", ";\n width: calc(100% - 50px);\n z-index: 1;\n outline: none;\n &:hover {\n border: 1px solid ", ";\n }\n &.invalid-number {\n border: 1px solid ", ";\n background-color: ", ";\n border-left-color: ", ";\n &:focus {\n border: 1px solid ", ";\n border-left-color: ", ";\n background-color: ", ";\n }\n }\n &.open {\n border-color: ", ";\n border-radius: 0px 10px 0 0;\n /* border-bottom: none; */\n box-shadow: none;\n }\n ::placeholder {\n color: ", ";\n }\n &:focus {\n border: 1px solid ", ";\n }\n }\n\n .flag-dropdown {\n outline: none;\n position: absolute;\n width: 100%;\n top: 0;\n bottom: 0;\n padding: 0;\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 10px;\n border-color:", ";\n\n &.open {\n background: ", ";\n border-radius: 10px 10px 0 0;\n .selected-flag {\n background: ", ";\n border-radius: 10px 0 0 0;\n }\n }\n &:hover, &:focus {\n cursor: pointer;\n .selected-flag {\n background-color:", ";;\n }\n }\n }\n\n input[disabled] {\n &+.flag-dropdown {\n &:hover {\n cursor: default;\n .selected-flag {\n background-color: transparent;\n }\n }\n }\n }\n\n .selected-flag {\n transition: all 0.2s;\n background: ", ";\n position: relative;\n width: 50px;\n height: 100%;\n padding: 0 0 0 10px;\n border-radius: 10px 0 0 10px;\n .flag {\n position: absolute;\n top: 50%;\n margin-top: -5px;\n }\n .arrow {\n position: relative;\n top: 50%;\n margin-top: -2px;\n left: 25px;\n width: 0;\n height: 0;\n border-left: 3px solid transparent;\n border-right: 3px solid transparent;\n border-top: 4px solid #555;\n &.up {\n border-top: none;\n border-bottom: 4px solid #555;\n }\n }\n &.open {\n z-index: 2;\n }\n }\n\n .country-list {\n z-index: 2;\n border-radius: 0 0 10px 10px;\n border: 1px solid ", ";\n border-top: none;\n list-style: none;\n position: absolute;\n padding: 0;\n margin: 0px 0 10px -1px;\n box-shadow: unset;\n background-color: ", ";\n width: calc(100% + 2px);\n max-height: ", ";\n overflow-y: scroll;\n .flag {\n display: inline-block;\n }\n .divider {\n padding-bottom: 5px;\n margin-bottom: 5px;\n border-bottom: 1px solid #ccc;\n }\n .country {\n padding: 7px 9px;\n .dial-code {\n color: #6b6b6b;\n }\n &:hover {\n background-color: ", ";\n }\n &.highlight {\n background-color: ", ";\n }\n }\n .flag {\n margin-right: 7px;\n margin-top: 2px;\n }\n .country-name {\n margin-right: 6px;\n color:", ";\n }\n .search {\n position: sticky;\n top: 0;\n background-color: ", ";\n padding: 5px 0 6px 10px;\n }\n .search-emoji {\n display: none;\n font-size: ", ";\n }\n .search-box {\n border: 1px solid #cacaca;\n border-radius: 3px;\n font-size: ", ";\n line-height: 15px;\n padding: 3px 8px 5px;\n outline: none;\n }\n .no-entries-message {\n padding: 7px 10px 11px;\n opacity: .7;\n }\n &::-webkit-scrollbar { width: 12px; }\n &::-webkit-scrollbar-track { background-color: #e6e6e6; }\n &::-webkit-scrollbar-thumb { background-color: #c5c5c4; border-radius: 5px; }\n }\n\n .invalid-number-message {\n position: absolute;\n z-index: 1;\n font-size: ", ";\n left: 46px;\n top: -8px;\n background: #fff;\n padding: 0 2px;\n color: #de0000;\n }\n }\n"])), function (props) { return (props.isMobile ? "1.6rem" : "1.4rem"); }, function (props) {
|
|
19
|
+
return props.disabled ? "".concat(Colors.Grey6, " !important") : null;
|
|
20
|
+
}, function (props) { return props.validationError && props.validationDarkThemeBorderColor ? "".concat(Colors.ErrorRed, " !important") : ""; }, function (props) { return props.typeTextColor || Colors.Grey1; }, function (props) { return (props.isMobile ? "1.6rem" : "1.4rem"); }, function (props) { return props.bgColor || Colors.White; }, Colors.Grey5, function (props) {
|
|
21
|
+
return props.phoneNumberInputSize === PhoneNumberInputSizes.Regular
|
|
22
|
+
? "38px"
|
|
23
|
+
: "48px";
|
|
24
|
+
}, Colors.Grey5, Colors.Grey5, Colors.White, Colors.Grey5, Colors.Grey4, Colors.Grey5, Colors.White, Colors.Grey5, Colors.Grey4, Colors.Grey4, Colors.Grey6, Colors.Grey5, function (props) { return props.validationError && props.validationDarkThemeBorderColor ? Colors.ErrorRed : ""; }, Colors.Grey6, Colors.Grey6, function (props) {
|
|
25
|
+
return props.selectedflaghover || Colors.White;
|
|
26
|
+
}, function (props) { return props.selectedflagbg || Colors.White; }, Colors.Grey5, function (props) { return props.countryList || Colors.White; }, function (props) { return (props.isMobile ? "180px" : "200px"); }, function (props) { return props.searchColor || "#f1f1f1"; }, function (props) { return props.highlightColor || "#fff"; }, function (props) { return props.countryName || "#6b6b6b"; }, function (props) { return props.searchColor || Colors.Green; }, function (props) { return (props.isMobile ? "1.6rem" : "1.4rem"); }, function (props) { return (props.isMobile ? "1.6rem" : "1.4rem"); }, function (props) { return (props.isMobile ? "1.6rem" : "1.4rem"); });
|
|
27
|
+
var PhoneNumberInput = function (_a) {
|
|
28
|
+
var value = _a.value, onChange = _a.onChange, onEnter = _a.onEnter, validationError = _a.validationError, phoneNumberInputSize = _a.phoneNumberInputSize, subLabel = _a.subLabel, tip = _a.tip, label = _a.label, margin = _a.margin, autoFocus = _a.autoFocus, _b = _a.disabled, disabled = _b === void 0 ? false : _b, bgColor = _a.bgColor, labeltextColor = _a.labeltextColor, typedTextColor = _a.typedTextColor, selectedflagbg = _a.selectedflagbg, countryList = _a.countryList, countryName = _a.countryName, highlightColor = _a.highlightColor, selectedflaghover = _a.selectedflaghover, searchColor = _a.searchColor, fontWeight = _a.fontWeight, fontFamily = _a.fontFamily, fontSize = _a.fontSize, letterSpacing = _a.letterSpacing, validationDarkThemeBorderColor = _a.validationDarkThemeBorderColor;
|
|
29
|
+
return (React.createElement(Container, { margin: margin },
|
|
30
|
+
label && (React.createElement(Label, { text: label, subText: subLabel, tip: tip, labelColor: labeltextColor, fontFamily: fontFamily, fontWeight: fontWeight, fontSize: fontSize, letterSpacing: letterSpacing })),
|
|
31
|
+
React.createElement(InnerContainer, { isMobile: useMobileMedia(), phoneNumberInputSize: phoneNumberInputSize, disabled: disabled, bgColor: bgColor, selectedflagbg: selectedflagbg, selectedflaghover: selectedflaghover, labelTextColor: labeltextColor, typeTextColor: typedTextColor, countryList: countryList, countryName: countryName, highlightColor: highlightColor, searchColor: searchColor, validationError: validationError, validationDarkThemeBorderColor: validationDarkThemeBorderColor },
|
|
32
|
+
React.createElement(PhoneInput, { country: "us", disabled: disabled, placeholder: "Enter your mobile phone number", preferredCountries: ["us", "ca"], value: value, onKeyDown: function (e) {
|
|
33
|
+
// quick fix for current issue -> https://github.com/bl00mber/react-phone-input-2/issues/222
|
|
34
|
+
if ((e.which === 8 || e.which === 46) && value.length <= 1) {
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
}
|
|
37
|
+
else if (e.which === 13 && onEnter) {
|
|
38
|
+
onEnter();
|
|
39
|
+
}
|
|
40
|
+
}, onChange: function (value) {
|
|
41
|
+
onChange(value);
|
|
42
|
+
}, countryCodeEditable: false, inputProps: {
|
|
43
|
+
autoFocus: autoFocus,
|
|
44
|
+
} }),
|
|
45
|
+
validationError && (React.createElement(ValidationError, { validationError: validationError })))));
|
|
46
|
+
};
|
|
47
|
+
var templateObject_1, templateObject_2;
|
|
48
|
+
|
|
49
|
+
export { PhoneNumberInputSizes, PhoneNumberInput as default };
|
|
50
|
+
//# sourceMappingURL=PhoneNumberInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PhoneNumberInput.js","sources":["../../../src/components/PhoneNumberInput.tsx"],"sourcesContent":[null],"names":[],"mapp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pC,wBAAA,OAAO,EAAE,CAAC;AACX,qBAAA;AACH,iBAAC,EACD,QAAQ,EAAE,UAAC,KAAK,EAAA;oBACd,QAAQ,CAAC,KAAK,CAAC,CAAC;AAClB,iBAAC,EACD,mBAAmB,EAAE,KAAK,EAC1B,UAAU,EAAE;AACV,oBAAA,SAAS,EAAA,SAAA;iBACV,EACD,CAAA;AACD,YAAA,eAAe,KACd,KAAC,CAAA,aAAA,CAAA,eAAe,EAAC,EAAA,eAAe,EAAE,eAAe,EAAI,CAAA,CACtD,CACc,CACP,EACZ;AACJ,EAAE;;;;;"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { __makeTemplateObject } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import React, { useState, Fragment } from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import * as Polished from 'polished';
|
|
5
|
+
import PaymentUtil from '@sellout/models/.dist/utils/PaymentUtil';
|
|
6
|
+
import AnimateHeight from 'react-animate-height';
|
|
7
|
+
import { Colors } from '../Colors.js';
|
|
8
|
+
import Counter from './Counter.js';
|
|
9
|
+
import * as PriceUtil from '@sellout/utils/.dist/price';
|
|
10
|
+
import * as Time from '@sellout/utils/.dist/time';
|
|
11
|
+
|
|
12
|
+
var TicketsEnum;
|
|
13
|
+
(function (TicketsEnum) {
|
|
14
|
+
TicketsEnum["Tickets"] = "Tickets";
|
|
15
|
+
TicketsEnum["AddOns"] = "AddOns";
|
|
16
|
+
})(TicketsEnum || (TicketsEnum = {}));
|
|
17
|
+
var FeeAppliedToEnum;
|
|
18
|
+
(function (FeeAppliedToEnum) {
|
|
19
|
+
FeeAppliedToEnum["Order"] = "Order";
|
|
20
|
+
FeeAppliedToEnum["Ticket"] = "Ticket";
|
|
21
|
+
FeeAppliedToEnum["Upgrade"] = "Upgrade";
|
|
22
|
+
FeeAppliedToEnum["AddOns"] = "Add-Ons";
|
|
23
|
+
})(FeeAppliedToEnum || (FeeAppliedToEnum = {}));
|
|
24
|
+
var AdvanceOptionsEnum;
|
|
25
|
+
(function (AdvanceOptionsEnum) {
|
|
26
|
+
AdvanceOptionsEnum["ShowLess"] = "Show Less";
|
|
27
|
+
AdvanceOptionsEnum["ShowMore"] = "Show More";
|
|
28
|
+
AdvanceOptionsEnum["HideFees"] = "Hide Fees";
|
|
29
|
+
AdvanceOptionsEnum["ShowFees"] = "Show Fees";
|
|
30
|
+
})(AdvanceOptionsEnum || (AdvanceOptionsEnum = {}));
|
|
31
|
+
var Row = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n"], ["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n"])), function (props) { return props.justify; });
|
|
32
|
+
var Column = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n"], ["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n"])));
|
|
33
|
+
var LeftWrapper = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
34
|
+
var Container = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n background-color: ", ";\n margin: 0 24px;\n padding: 24px 0;\n border-bottom: 1px solid ", ";\n display: flex;\n flex-direction: column;\n gap: 10px;\n"], ["\n background-color: ", ";\n margin: 0 24px;\n padding: 24px 0;\n border-bottom: 1px solid ", ";\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])), Colors.SurfaceTertiary, Colors.SecondaryStroke);
|
|
35
|
+
var Title = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font-size: 16px;\n color: ", ";\n font-weight: 500;\n font-family: \"Inter\";\n line-height: 20px;\n"], ["\n font-size: 16px;\n color: ", ";\n font-weight: 500;\n font-family: \"Inter\";\n line-height: 20px;\n"])), Colors.HeadingSecondary);
|
|
36
|
+
var Price = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n font-size: 16px;\n color: ", ";\n font-weight: 500;\n margin: 5px 0;\n line-height: 90%;\n"], ["\n font-size: 16px;\n color: ", ";\n font-weight: 500;\n margin: 5px 0;\n line-height: 90%;\n"])), Colors.HeadingSecondary);
|
|
37
|
+
var Subtitle = styled.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n font-size: 1.2rem;\n font-weight: 500;\n line-height: 160%;\n color: ", ";\n font-family: \"inter\";\n"], ["\n font-size: 1.2rem;\n font-weight: 500;\n line-height: 160%;\n color: ", ";\n font-family: \"inter\";\n"])), Colors.White);
|
|
38
|
+
var Description = styled.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n color: ", ";\n font-size: 14px;\n font-weight: 400;\n line-height: 21px;\n font-family: \"Inter\";\n letter-spacing: -0.08px;\n word-break: break-word;\n overflow-wrap: break-word;\n max-width: 88%;\n"], ["\n color: ", ";\n font-size: 14px;\n font-weight: 400;\n line-height: 21px;\n font-family: \"Inter\";\n letter-spacing: -0.08px;\n word-break: break-word;\n overflow-wrap: break-word;\n max-width: 88%;\n"])), Colors.SupportTertiary);
|
|
39
|
+
var Tickets = styled.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n font-size: 1.2rem;\n font-weight: 500;\n line-height: 160%;\n color: ", ";\n font-family: \"inter\";\n"], ["\n font-size: 1.2rem;\n font-weight: 500;\n line-height: 160%;\n color: ", ";\n font-family: \"inter\";\n"])), Colors.SupportTertiary);
|
|
40
|
+
var Tag = styled.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n font-size: 16px;\n color: ", ";\n font-weight: 500;\n margin-bottom: 5px;\n line-height: 90%;\n"], ["\n font-size: 16px;\n color: ", ";\n font-weight: 500;\n margin-bottom: 5px;\n line-height: 90%;\n"])), Colors.HeadingPrimary);
|
|
41
|
+
var Value = styled.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n font-size: 28px;\n min-width: 20px;\n color: ", ";\n line-height: 90%;\n font-weight: 500;\n"], ["\n font-size: 28px;\n min-width: 20px;\n color: ", ";\n line-height: 90%;\n font-weight: 500;\n"])), Colors.HeadingPrimary);
|
|
42
|
+
var Ellipsis = styled.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n display: -webkit-box;\n -webkit-line-clamp: ", ";\n -webkit-box-orient: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n"], ["\n display: -webkit-box;\n -webkit-line-clamp: ", ";\n -webkit-box-orient: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n"])), function (props) { return (props.active ? 3 : null); }, function (props) { return (props.active ? "vertical" : null); });
|
|
43
|
+
var ShowMore = styled.div(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n font-size: 14px;\n font-weight: 500;\n line-height: 160%;\n color: ", ";\n transition: all 0.2s;\n font-family: \"Inter\";\n"], ["\n font-size: 14px;\n font-weight: 500;\n line-height: 160%;\n color: ", ";\n transition: all 0.2s;\n font-family: \"Inter\";\n"])), Colors.InteractiveBGPrimary);
|
|
44
|
+
var ShowMoreInner = styled.span(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n &:hover {\n cursor: pointer;\n color: ", ";\n }\n\n &:active {\n color: ", ";\n }\n"], ["\n &:hover {\n cursor: pointer;\n color: ", ";\n }\n\n &:active {\n color: ", ";\n }\n"])), Polished.lighten(0.025, Colors.Orange), Polished.darken(0.025, Colors.Orange));
|
|
45
|
+
var RightWrapperCol = styled.div(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n justify-content: space-between;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n justify-content: space-between;\n"])));
|
|
46
|
+
var HideShowContent = styled.div(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n font-size: 12px;\n color: #fff;\n letter-spacing: 0.5px;\n margin-top: 10px;\n cursor: pointer;\n border-bottom: 1px solid #fff;\n opacity: 0.7;\n white-space: nowrap;\n"], ["\n font-size: 12px;\n color: #fff;\n letter-spacing: 0.5px;\n margin-top: 10px;\n cursor: pointer;\n border-bottom: 1px solid #fff;\n opacity: 0.7;\n white-space: nowrap;\n"])));
|
|
47
|
+
var FeeList = styled.div(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: 4px;\n"], ["\n display: flex;\n flex-direction: column;\n gap: 4px;\n"])));
|
|
48
|
+
var FeeItem = styled.div(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n color: ", ";\n font-size: 14px;\n"], ["\n display: flex;\n justify-content: space-between;\n color: ", ";\n font-size: 14px;\n"])), Colors.White);
|
|
49
|
+
var Label = styled.span(templateObject_19 || (templateObject_19 = __makeTemplateObject([""], [""])));
|
|
50
|
+
var Amount = styled.span(templateObject_20 || (templateObject_20 = __makeTemplateObject([""], [""])));
|
|
51
|
+
var DateTextWrapper = styled.span(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n margin: 7px 0px;\n"], ["\n margin: 7px 0px;\n"])));
|
|
52
|
+
var DateText = styled.span(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n font-size: 15px;\n font-weight: 500;\n color: ", ";\n margin-bottom: 5px;\n padding-right: 5px;\n"], ["\n font-size: 15px;\n font-weight: 500;\n color: ", ";\n margin-bottom: 5px;\n padding-right: 5px;\n"])), Colors.HeadingSecondary);
|
|
53
|
+
function Product(_a) {
|
|
54
|
+
var _b = _a.title, title = _b === void 0 ? "" : _b, _c = _a.price, price = _c === void 0 ? 0 : _c, _d = _a.subtitle, subtitle = _d === void 0 ? "" : _d, _e = _a.description, description = _e === void 0 ? "" : _e, _f = _a.isRSVP, isRSVP = _f === void 0 ? false : _f, isTicketScreen = _a.isTicketScreen,
|
|
55
|
+
// Counter Props
|
|
56
|
+
value = _a.value, minValue = _a.minValue, maxValue = _a.maxValue, onIncrement = _a.onIncrement, onDecrement = _a.onDecrement, eventDays = _a.eventDays, isMultiDaysEvent = _a.isMultiDaysEvent, timeZone = _a.timeZone, _g = _a.remainingQty, remainingQty = _g === void 0 ? 0 : _g, isTicketType = _a.isTicketType, isFees = _a.isFees, isUpgradeType = _a.isUpgradeType;
|
|
57
|
+
var _h = useState(false), showMore = _h[0], setShowMore = _h[1];
|
|
58
|
+
var _j = useState(true), showEllipsis = _j[0], setShowEllipsis = _j[1];
|
|
59
|
+
var _k = useState(false), showFees = _k[0], setShowFees = _k[1];
|
|
60
|
+
var descModified = description;
|
|
61
|
+
if (descModified.length > 210 && !showMore) {
|
|
62
|
+
descModified = descModified.substring(0, 210) + "...";
|
|
63
|
+
}
|
|
64
|
+
var toggle = function () {
|
|
65
|
+
setShowEllipsis(!showEllipsis);
|
|
66
|
+
setShowMore(!showMore);
|
|
67
|
+
};
|
|
68
|
+
var toggleFees = function () {
|
|
69
|
+
setShowFees(!showFees);
|
|
70
|
+
};
|
|
71
|
+
var ticketsAddOns = isTicketScreen === TicketsEnum.Tickets
|
|
72
|
+
? FeeAppliedToEnum.Ticket
|
|
73
|
+
: FeeAppliedToEnum.AddOns;
|
|
74
|
+
var applicableFees = isFees
|
|
75
|
+
? PaymentUtil.getApplicableFees({
|
|
76
|
+
price: price,
|
|
77
|
+
fees: isFees,
|
|
78
|
+
isTicketType: isTicketType,
|
|
79
|
+
isUpgradeType: isUpgradeType,
|
|
80
|
+
})
|
|
81
|
+
: [];
|
|
82
|
+
return (React.createElement(Container, null,
|
|
83
|
+
React.createElement(Column, null,
|
|
84
|
+
React.createElement(LeftWrapper, null,
|
|
85
|
+
React.createElement(Title, null, title),
|
|
86
|
+
isMultiDaysEvent && (React.createElement(DateTextWrapper, null, eventDays &&
|
|
87
|
+
eventDays.length > 0 &&
|
|
88
|
+
(eventDays === null || eventDays === void 0 ? void 0 : eventDays.map(function (day, i) {
|
|
89
|
+
return (React.createElement(DateText, { key: i },
|
|
90
|
+
Time.format(day, "MMM Do", timeZone),
|
|
91
|
+
eventDays.length !== i + 1 && ","));
|
|
92
|
+
})))),
|
|
93
|
+
(function () {
|
|
94
|
+
if (!description)
|
|
95
|
+
return;
|
|
96
|
+
return (React.createElement(Fragment, null,
|
|
97
|
+
React.createElement(AnimateHeight, { height: "auto" },
|
|
98
|
+
React.createElement(Ellipsis, { active: showEllipsis },
|
|
99
|
+
React.createElement(Description, null, description))),
|
|
100
|
+
descModified.length > 115 ? (React.createElement(ShowMore, null,
|
|
101
|
+
React.createElement(ShowMoreInner, { onClick: function () { return toggle(); } }, showMore
|
|
102
|
+
? AdvanceOptionsEnum.ShowLess
|
|
103
|
+
: AdvanceOptionsEnum.ShowMore))) : ("")));
|
|
104
|
+
})()),
|
|
105
|
+
React.createElement(RightWrapperCol, null,
|
|
106
|
+
isRSVP ? (PriceUtil.output(price, true) === "0.00" || 0 ? (React.createElement(Price, null, "RSVP")) : (React.createElement(Price, null, "$".concat(PriceUtil.output(price, true)) + " (Ticket value)"))) : (React.createElement(Price, null, "$".concat(PriceUtil.output(price, true)))),
|
|
107
|
+
(applicableFees === null || applicableFees === void 0 ? void 0 : applicableFees.length) > 0 && (React.createElement(HideShowContent, { onClick: function () { return toggleFees(); } }, showFees
|
|
108
|
+
? AdvanceOptionsEnum.HideFees
|
|
109
|
+
: AdvanceOptionsEnum.ShowFees)))),
|
|
110
|
+
showFees && (applicableFees === null || applicableFees === void 0 ? void 0 : applicableFees.length) > 0 && (React.createElement(FeeList, null, applicableFees === null || applicableFees === void 0 ? void 0 : applicableFees.map(function (fee, idx) { return (React.createElement(FeeItem, { key: idx },
|
|
111
|
+
React.createElement(Label, null, fee.label),
|
|
112
|
+
React.createElement(Amount, null,
|
|
113
|
+
"$",
|
|
114
|
+
fee.amount.toFixed(2)))); }))),
|
|
115
|
+
React.createElement(Column, null,
|
|
116
|
+
React.createElement(Value, null,
|
|
117
|
+
value,
|
|
118
|
+
React.createElement(Tickets, null, ticketsAddOns)),
|
|
119
|
+
remainingQty > 0 ? (React.createElement(Counter, { value: value, minValue: minValue, maxValue: maxValue, onIncrement: onIncrement, onDecrement: onDecrement })) : (React.createElement(Tag, null, " Sold out"))),
|
|
120
|
+
React.createElement(Row, null, subtitle && React.createElement(Subtitle, null, subtitle))));
|
|
121
|
+
}
|
|
122
|
+
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, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22;
|
|
123
|
+
|
|
124
|
+
export { AdvanceOptionsEnum, FeeAppliedToEnum, TicketsEnum, Product as default };
|
|
125
|
+
//# sourceMappingURL=Product.js.map
|