@bonlineza/luxity-lib 2.39.6 → 2.39.7
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/Accordion.js +352 -342
- package/AddInterest.js +3141 -3135
- package/AddProductInterest.js +7584 -1011
- package/BrandSelector.js +861 -854
- package/Checkbox.js +250 -240
- package/CheckboxButton.js +236 -229
- package/CommunicationPreferenceOptionsRenderer.js +568 -560
- package/CommunicationPreferenceSection.js +659 -651
- package/CommunicationPreferences.js +2402 -2394
- package/ConditionSelector.js +859 -852
- package/CountryCodeSelect.js +6650 -79
- package/CurrencyInputFormatter.js +96 -86
- package/CurrencySelect.js +227 -219
- package/DropdownSelector.js +6820 -211
- package/GALink.js +51 -43
- package/GenderSelector.js +362 -355
- package/GraphQLDropdownSelector.js +11878 -5308
- package/GraphQLMultiSelector.js +601 -593
- package/IconHeader.js +126 -118
- package/IconWrapper.js +25 -17
- package/InterestCatSelector.js +432 -424
- package/InterestItem.js +470 -462
- package/Interests.js +11286 -4716
- package/InterestsSubheading.js +41 -33
- package/InvertedTextButton.js +175 -167
- package/LuxityAppSideNav.js +189 -181
- package/LuxityDesktopHeader.js +1363 -1355
- package/LuxityFooter.js +2236 -2228
- package/LuxityGraphQLDropdownSelector.js +11963 -5393
- package/LuxityGraphQLMultiselector.js +785 -778
- package/LuxityMobileHeader.js +1794 -1786
- package/LuxityPageReady.js +209 -199
- package/LuxityProductInterestItem.js +367 -359
- package/LuxitySideNav.js +673 -665
- package/MaterialSelector.js +11993 -5423
- package/ModelSelector.js +11993 -5423
- package/NotificationDropDown.js +7029 -459
- package/Notify.js +32 -20
- package/OutlinePrimaryButton.js +142 -134
- package/PriceRangeSelector.js +1270 -1264
- package/PrimaryButton.js +137 -129
- package/RadioButtons.js +318 -308
- package/RangeSlider.js +1039 -1033
- package/RareStepFooter.js +264 -257
- package/RareStepHeader.js +808 -801
- package/ReactSelectWrapper.js +6604 -33
- package/SecondaryButton.js +152 -144
- package/ShoeSizeRangeSelector.js +1153 -1147
- package/ShoeSizeSelector.js +1154 -1146
- package/SimpleErrorBoundary.js +138 -130
- package/StyleSelector.js +861 -854
- package/TextButton.js +143 -135
- package/Tooltip.js +184 -176
- package/Tracking.js +25 -15
- package/WrapperButton.js +58 -50
- package/build/bundle.css +1 -1
- package/build/bundle.js +17236 -10632
- package/build/constants.js +45 -32
- package/package.json +2 -2
- package/svg/Accessories.js +42 -34
- package/svg/Account.js +38 -30
- package/svg/Add.js +39 -31
- package/svg/ArrowRight.js +36 -28
- package/svg/Bags.js +48 -40
- package/svg/BurgerMenu.js +32 -24
- package/svg/Calendar.js +106 -98
- package/svg/CalendarCircled.js +108 -100
- package/svg/CheckCircled.js +40 -32
- package/svg/Close.js +37 -29
- package/svg/Clothing.js +44 -36
- package/svg/Dot.js +40 -32
- package/svg/Edit.js +35 -27
- package/svg/Eye.js +36 -28
- package/svg/FileAttach.js +36 -28
- package/svg/FileAttachCircled.js +38 -30
- package/svg/Jewellery.js +57 -49
- package/svg/LightBulb.js +66 -58
- package/svg/Logo.js +140 -132
- package/svg/LuxityMenu.js +36 -28
- package/svg/Minus.js +37 -29
- package/svg/MobileAvatar.js +36 -28
- package/svg/MyOrder.js +44 -36
- package/svg/MyPayment.js +44 -36
- package/svg/MyProfile.js +52 -44
- package/svg/MySale.js +39 -31
- package/svg/Notification.js +38 -30
- package/svg/PointerDown.js +36 -28
- package/svg/Search.js +35 -27
- package/svg/Shoes.js +45 -37
- package/svg/SvgWrapper.js +21 -13
- package/svg/Trash.js +40 -32
- package/svg/Watches.js +55 -47
|
@@ -1,104 +1,114 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
|
|
4
|
+
(global = global || self, factory(global.CurrencyInputFormatter = {}, global.React));
|
|
5
|
+
}(this, (function (exports, React) { 'use strict';
|
|
6
|
+
|
|
7
|
+
React = React && Object.prototype.hasOwnProperty.call(React, 'default') ? React['default'] : React;
|
|
8
|
+
|
|
9
|
+
function _extends() {
|
|
10
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
11
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
12
|
+
var source = arguments[i];
|
|
13
|
+
|
|
14
|
+
for (var key in source) {
|
|
15
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
16
|
+
target[key] = source[key];
|
|
17
|
+
}
|
|
11
18
|
}
|
|
12
19
|
}
|
|
20
|
+
|
|
21
|
+
return target;
|
|
22
|
+
};
|
|
23
|
+
return _extends.apply(this, arguments);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
27
|
+
if (source == null) return {};
|
|
28
|
+
var target = {};
|
|
29
|
+
var sourceKeys = Object.keys(source);
|
|
30
|
+
var key, i;
|
|
31
|
+
|
|
32
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
33
|
+
key = sourceKeys[i];
|
|
34
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
35
|
+
target[key] = source[key];
|
|
13
36
|
}
|
|
14
37
|
|
|
15
38
|
return target;
|
|
16
|
-
};
|
|
17
|
-
return _extends.apply(this, arguments);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
21
|
-
if (source == null) return {};
|
|
22
|
-
var target = {};
|
|
23
|
-
var sourceKeys = Object.keys(source);
|
|
24
|
-
var key, i;
|
|
25
|
-
|
|
26
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
27
|
-
key = sourceKeys[i];
|
|
28
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
29
|
-
target[key] = source[key];
|
|
30
39
|
}
|
|
31
40
|
|
|
32
|
-
|
|
33
|
-
}
|
|
41
|
+
function _objectWithoutProperties(source, excluded) {
|
|
42
|
+
if (source == null) return {};
|
|
34
43
|
|
|
35
|
-
|
|
36
|
-
if (source == null) return {};
|
|
44
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
37
45
|
|
|
38
|
-
|
|
46
|
+
var key, i;
|
|
39
47
|
|
|
40
|
-
|
|
48
|
+
if (Object.getOwnPropertySymbols) {
|
|
49
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
41
50
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
49
|
-
target[key] = source[key];
|
|
51
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
52
|
+
key = sourceSymbolKeys[i];
|
|
53
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
54
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
55
|
+
target[key] = source[key];
|
|
56
|
+
}
|
|
50
57
|
}
|
|
58
|
+
|
|
59
|
+
return target;
|
|
51
60
|
}
|
|
52
61
|
|
|
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
|
-
|
|
62
|
+
var _excluded = ["value", "onChange", "prefix", "allowNegativeValue", "groupSeparator", "decimalSeparator"];
|
|
63
|
+
var unMask = function unMask() {
|
|
64
|
+
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
65
|
+
return value.replace(/\D/g, '');
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Currency Input which formats the value to a specific format
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
var CurrencyInputFormatter = function CurrencyInputFormatter(_ref) {
|
|
72
|
+
var value = _ref.value,
|
|
73
|
+
onChange = _ref.onChange,
|
|
74
|
+
prefix = _ref.prefix,
|
|
75
|
+
allowNegativeValue = _ref.allowNegativeValue,
|
|
76
|
+
groupSeparator = _ref.groupSeparator,
|
|
77
|
+
decimalSeparator = _ref.decimalSeparator,
|
|
78
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
79
|
+
|
|
80
|
+
var handleValueChange = function handleValueChange(event) {
|
|
81
|
+
var inputValue = event.target.value;
|
|
82
|
+
var unmaskedValue = unMask(inputValue);
|
|
83
|
+
onChange(unmaskedValue);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
var formatCurrency = function formatCurrency(originalValue) {
|
|
87
|
+
var numericValue = Number(originalValue);
|
|
88
|
+
var formattedValue = numericValue.toLocaleString('en-US');
|
|
89
|
+
return prefix + formattedValue;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
var formattedValue = formatCurrency(value);
|
|
93
|
+
return /*#__PURE__*/React.createElement("input", _extends({}, rest, {
|
|
94
|
+
type: "text",
|
|
95
|
+
value: formattedValue,
|
|
96
|
+
onChange: handleValueChange
|
|
97
|
+
}));
|
|
78
98
|
};
|
|
79
99
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
100
|
+
CurrencyInputFormatter.defaultProps = {
|
|
101
|
+
value: '',
|
|
102
|
+
prefix: 'R',
|
|
103
|
+
groupSeparator: ',',
|
|
104
|
+
decimalSeparator: '.',
|
|
105
|
+
allowNegativeValue: false,
|
|
106
|
+
onChange: function onChange() {}
|
|
84
107
|
};
|
|
85
108
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
CurrencyInputFormatter.defaultProps = {
|
|
95
|
-
value: '',
|
|
96
|
-
prefix: 'R',
|
|
97
|
-
groupSeparator: ',',
|
|
98
|
-
decimalSeparator: '.',
|
|
99
|
-
allowNegativeValue: false,
|
|
100
|
-
onChange: function onChange() {}
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
export default CurrencyInputFormatter;
|
|
104
|
-
export { unMask };
|
|
109
|
+
exports.default = CurrencyInputFormatter;
|
|
110
|
+
exports.unMask = unMask;
|
|
111
|
+
|
|
112
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
113
|
+
|
|
114
|
+
})));
|
package/CurrencySelect.js
CHANGED
|
@@ -1,236 +1,244 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react'), require('styled-components')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['react', 'styled-components'], factory) :
|
|
4
|
+
(global = global || self, global.CurrencySelect = factory(global.React, global.styled));
|
|
5
|
+
}(this, (function (React, styled) { 'use strict';
|
|
6
|
+
|
|
7
|
+
var React__default = 'default' in React ? React['default'] : React;
|
|
8
|
+
var styled__default = 'default' in styled ? styled['default'] : styled;
|
|
9
|
+
|
|
10
|
+
function _extends() {
|
|
11
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
12
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
13
|
+
var source = arguments[i];
|
|
14
|
+
|
|
15
|
+
for (var key in source) {
|
|
16
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
17
|
+
target[key] = source[key];
|
|
18
|
+
}
|
|
12
19
|
}
|
|
13
20
|
}
|
|
21
|
+
|
|
22
|
+
return target;
|
|
23
|
+
};
|
|
24
|
+
return _extends.apply(this, arguments);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function _taggedTemplateLiteral(strings, raw) {
|
|
28
|
+
if (!raw) {
|
|
29
|
+
raw = strings.slice(0);
|
|
14
30
|
}
|
|
15
31
|
|
|
16
|
-
return
|
|
32
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
33
|
+
raw: {
|
|
34
|
+
value: Object.freeze(raw)
|
|
35
|
+
}
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
40
|
+
/* position relative is required for the Body element to be positioned correctly */
|
|
41
|
+
|
|
42
|
+
var relativeInlineStyle = styled.css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n"])));
|
|
43
|
+
var topMiddleBodyStyle = styled.css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 1;\n bottom: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n"])));
|
|
44
|
+
var getTopMiddleArrowAfterStyle = function getTopMiddleArrowAfterStyle(props) {
|
|
45
|
+
return styled.css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n /*Bottom Arrow*/\n top: 100%; /* At the bottom of the tooltip */\n left: calc(50% - ", ");\n border-width: ", ";\n border-style: solid;\n border-color: ", " transparent transparent transparent;\n"])), props.$apexWidth, props.$apexWidth, props.theme.colors.base);
|
|
46
|
+
};
|
|
47
|
+
var getBottomMiddleBodyStyle = function getBottomMiddleBodyStyle(props) {
|
|
48
|
+
return styled.css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n top: 100%;\n left: calc(50% - ", " / 2);\n"])), props.$bodyWidth);
|
|
49
|
+
};
|
|
50
|
+
var getBottomMiddleArrowAfterStyle = function getBottomMiddleArrowAfterStyle(props) {
|
|
51
|
+
return styled.css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n /*Top Arrow*/\n bottom: 100%; /* At the top of the tooltip */\n top: initial;\n left: 50%;\n border-style: solid;\n border-color: transparent transparent ", " transparent;\n"])), props.theme.colors.base);
|
|
17
52
|
};
|
|
18
|
-
return _extends.apply(this, arguments);
|
|
19
|
-
}
|
|
20
53
|
|
|
21
|
-
|
|
22
|
-
if (!raw) {
|
|
23
|
-
raw = strings.slice(0);
|
|
24
|
-
}
|
|
54
|
+
var _templateObject$1;
|
|
25
55
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
56
|
+
var getBodyStyle = function getBodyStyle() {
|
|
57
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
58
|
+
var _props$$toolTipPositi = props.$toolTipPosition,
|
|
59
|
+
$toolTipPosition = _props$$toolTipPositi === void 0 ? '' : _props$$toolTipPositi;
|
|
60
|
+
|
|
61
|
+
switch ($toolTipPosition) {
|
|
62
|
+
case 'top':
|
|
63
|
+
return topMiddleBodyStyle;
|
|
64
|
+
|
|
65
|
+
case 'bottom':
|
|
66
|
+
return getBottomMiddleBodyStyle(props);
|
|
67
|
+
|
|
68
|
+
default:
|
|
69
|
+
return null;
|
|
29
70
|
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
34
|
-
/* position relative is required for the Body element to be positioned correctly */
|
|
35
|
-
|
|
36
|
-
var relativeInlineStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n"])));
|
|
37
|
-
var topMiddleBodyStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 1;\n bottom: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n"])));
|
|
38
|
-
var getTopMiddleArrowAfterStyle = function getTopMiddleArrowAfterStyle(props) {
|
|
39
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n /*Bottom Arrow*/\n top: 100%; /* At the bottom of the tooltip */\n left: calc(50% - ", ");\n border-width: ", ";\n border-style: solid;\n border-color: ", " transparent transparent transparent;\n"])), props.$apexWidth, props.$apexWidth, props.theme.colors.base);
|
|
40
|
-
};
|
|
41
|
-
var getBottomMiddleBodyStyle = function getBottomMiddleBodyStyle(props) {
|
|
42
|
-
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n top: 100%;\n left: calc(50% - ", " / 2);\n"])), props.$bodyWidth);
|
|
43
|
-
};
|
|
44
|
-
var getBottomMiddleArrowAfterStyle = function getBottomMiddleArrowAfterStyle(props) {
|
|
45
|
-
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n /*Top Arrow*/\n bottom: 100%; /* At the top of the tooltip */\n top: initial;\n left: 50%;\n border-style: solid;\n border-color: transparent transparent ", " transparent;\n"])), props.theme.colors.base);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
var _templateObject$1;
|
|
49
|
-
|
|
50
|
-
var getBodyStyle = function getBodyStyle() {
|
|
51
|
-
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
52
|
-
var _props$$toolTipPositi = props.$toolTipPosition,
|
|
53
|
-
$toolTipPosition = _props$$toolTipPositi === void 0 ? '' : _props$$toolTipPositi;
|
|
54
|
-
|
|
55
|
-
switch ($toolTipPosition) {
|
|
56
|
-
case 'top':
|
|
57
|
-
return topMiddleBodyStyle;
|
|
58
|
-
|
|
59
|
-
case 'bottom':
|
|
60
|
-
return getBottomMiddleBodyStyle(props);
|
|
61
|
-
|
|
62
|
-
default:
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
};
|
|
71
|
+
};
|
|
66
72
|
|
|
67
|
-
var getAfterStyling = function getAfterStyling() {
|
|
68
|
-
|
|
69
|
-
|
|
73
|
+
var getAfterStyling = function getAfterStyling() {
|
|
74
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
75
|
+
var $toolTipPosition = props.$toolTipPosition;
|
|
70
76
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
77
|
+
switch ($toolTipPosition) {
|
|
78
|
+
case 'top':
|
|
79
|
+
return getTopMiddleArrowAfterStyle(props);
|
|
74
80
|
|
|
75
|
-
|
|
76
|
-
|
|
81
|
+
case 'bottom':
|
|
82
|
+
return getBottomMiddleArrowAfterStyle(props);
|
|
77
83
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
var Body =
|
|
84
|
-
|
|
85
|
-
}, function (props) {
|
|
86
|
-
|
|
87
|
-
}, function (props) {
|
|
88
|
-
|
|
89
|
-
}, function (props) {
|
|
90
|
-
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
var _templateObject$2;
|
|
94
|
-
var Container = styled.div(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n ", ";\n cursor: pointer;\n &:hover ", " {\n opacity: 1;\n visibility: visible;\n }\n"])), relativeInlineStyle, Body);
|
|
95
|
-
|
|
96
|
-
var theme = {
|
|
97
|
-
breakpoints: ['40em', '52em', '64em'],
|
|
98
|
-
space: ['0px', '4px', '8px', '16px', '32px', '64px', '128px', '256px', '512px'],
|
|
99
|
-
fontSizes: ['12px', '14px', '16px', '20px', '24px', '32px', '48px', '64px', '72px'],
|
|
100
|
-
marginPaddings: ['0.5rem', '1rem', '1.5rem', '2rem', '2.5rem', '3rem', '3.5rem', '4rem', '4.5rem', '5rem', '5.5rem', '6rem'],
|
|
101
|
-
letterSpacings: ['-0.5px', '0px', '+0.5px'],
|
|
102
|
-
radii: ['0px', '2px', '4px', '8px'],
|
|
103
|
-
borderRadius: '6px',
|
|
104
|
-
colors: {
|
|
105
|
-
primary: '#000',
|
|
106
|
-
base: '#4e4949',
|
|
107
|
-
baseLt: '#817c7c',
|
|
108
|
-
borderColor: '#d8d8d8',
|
|
109
|
-
ntrlMin: '#fff',
|
|
110
|
-
ntrlMinTen: '#e6e6e6',
|
|
111
|
-
gray: '#efefef',
|
|
112
|
-
darkerGray: '#454141'
|
|
113
|
-
},
|
|
114
|
-
rareStepColors: {
|
|
115
|
-
primary: '#202b58',
|
|
116
|
-
secondary: '#ef5c2d',
|
|
117
|
-
ntrlMin: '#ffffff',
|
|
118
|
-
ntrl40: '#f4f4f4',
|
|
119
|
-
ntrl50: '#808080',
|
|
120
|
-
ntrl60: '#e8e8e8',
|
|
121
|
-
ntrl70: '#252525',
|
|
122
|
-
ntrlMax: '#000000'
|
|
123
|
-
},
|
|
124
|
-
rareStepFontWeights: {
|
|
125
|
-
normal: 400,
|
|
126
|
-
medium: 500,
|
|
127
|
-
semiBold: 600,
|
|
128
|
-
bold: 700
|
|
129
|
-
},
|
|
130
|
-
rareStepFontSize: {
|
|
131
|
-
h1: '36px',
|
|
132
|
-
h2: '30px',
|
|
133
|
-
h3: '24px',
|
|
134
|
-
h4: '20px',
|
|
135
|
-
h5: '16px',
|
|
136
|
-
h6: '14px',
|
|
137
|
-
footerTitle: '16px'
|
|
138
|
-
},
|
|
139
|
-
rareStepPageSizes: {
|
|
140
|
-
mobile: '500px',
|
|
141
|
-
tablet: '768px',
|
|
142
|
-
desktop: '992px',
|
|
143
|
-
screenl: '1280px',
|
|
144
|
-
screenxl: '1680px',
|
|
145
|
-
screenxxl: '1920px',
|
|
146
|
-
container: '1600px'
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
var themed = (function (Component) {
|
|
151
|
-
return /*#__PURE__*/forwardRef(function (props, ref) {
|
|
152
|
-
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
153
|
-
theme: theme
|
|
154
|
-
}, /*#__PURE__*/React.createElement(Component, _extends({}, props, {
|
|
155
|
-
ref: ref
|
|
156
|
-
})));
|
|
84
|
+
default:
|
|
85
|
+
return '';
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
var Body = styled__default.span(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n ", ";\n visibility: hidden;\n opacity: 0;\n width: ", ";\n transition: visibility 0.3s linear, opacity 0.3s linear;\n background-color: ", ";\n color: white;\n text-align: center;\n border-radius: 5px;\n ", "\n &::after {\n content: ' ';\n position: absolute;\n ", "\n }\n"])), relativeInlineStyle, function (props) {
|
|
90
|
+
return props.$bodyWidth;
|
|
91
|
+
}, function (props) {
|
|
92
|
+
return props.theme.colors.base || 'black';
|
|
93
|
+
}, function (props) {
|
|
94
|
+
return getBodyStyle(props);
|
|
95
|
+
}, function (props) {
|
|
96
|
+
return getAfterStyling(props);
|
|
157
97
|
});
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
/* eslint-disable react/require-default-props */
|
|
161
|
-
|
|
162
|
-
var Tooltip = function Tooltip(_ref) {
|
|
163
|
-
var _ref$children = _ref.children,
|
|
164
|
-
children = _ref$children === void 0 ? null : _ref$children,
|
|
165
|
-
_ref$toolTipText = _ref.toolTipText,
|
|
166
|
-
toolTipText = _ref$toolTipText === void 0 ? '' : _ref$toolTipText,
|
|
167
|
-
_ref$toolTipPosition = _ref.toolTipPosition,
|
|
168
|
-
toolTipPosition = _ref$toolTipPosition === void 0 ? 'top' : _ref$toolTipPosition,
|
|
169
|
-
_ref$bodyWidth = _ref.bodyWidth,
|
|
170
|
-
bodyWidth = _ref$bodyWidth === void 0 ? '8em' : _ref$bodyWidth,
|
|
171
|
-
_ref$apexWidth = _ref.apexWidth,
|
|
172
|
-
apexWidth = _ref$apexWidth === void 0 ? '5px' : _ref$apexWidth,
|
|
173
|
-
_ref$containerClassNa = _ref.containerClassName,
|
|
174
|
-
containerClassName = _ref$containerClassNa === void 0 ? '' : _ref$containerClassNa,
|
|
175
|
-
_ref$bodyClassName = _ref.bodyClassName,
|
|
176
|
-
bodyClassName = _ref$bodyClassName === void 0 ? '' : _ref$bodyClassName;
|
|
177
|
-
return /*#__PURE__*/React.createElement(Container, {
|
|
178
|
-
className: containerClassName
|
|
179
|
-
}, children, /*#__PURE__*/React.createElement(Body, {
|
|
180
|
-
$toolTipPosition: toolTipPosition,
|
|
181
|
-
$bodyWidth: bodyWidth,
|
|
182
|
-
$apexWidth: apexWidth,
|
|
183
|
-
className: bodyClassName
|
|
184
|
-
}, toolTipText));
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
var Tooltip$1 = themed(Tooltip);
|
|
188
|
-
|
|
189
|
-
var CurrencySelect = function CurrencySelect(_ref) {
|
|
190
|
-
var currency = _ref.currency,
|
|
191
|
-
currencyOptions = _ref.currencyOptions,
|
|
192
|
-
onCurrencyChange = _ref.onCurrencyChange,
|
|
193
|
-
_ref$isCurrencySelect = _ref.isCurrencySelectionDisabled,
|
|
194
|
-
isCurrencySelectionDisabled = _ref$isCurrencySelect === void 0 ? false : _ref$isCurrencySelect,
|
|
195
|
-
_ref$tooltipContent = _ref.tooltipContent,
|
|
196
|
-
tooltipContent = _ref$tooltipContent === void 0 ? '' : _ref$tooltipContent;
|
|
197
|
-
|
|
198
|
-
if (!currencyOptions || currencyOptions.length === 0) {
|
|
199
|
-
return null;
|
|
200
|
-
}
|
|
201
98
|
|
|
202
|
-
var
|
|
203
|
-
|
|
99
|
+
var _templateObject$2;
|
|
100
|
+
var Container = styled__default.div(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n ", ";\n cursor: pointer;\n &:hover ", " {\n opacity: 1;\n visibility: visible;\n }\n"])), relativeInlineStyle, Body);
|
|
101
|
+
|
|
102
|
+
var theme = {
|
|
103
|
+
breakpoints: ['40em', '52em', '64em'],
|
|
104
|
+
space: ['0px', '4px', '8px', '16px', '32px', '64px', '128px', '256px', '512px'],
|
|
105
|
+
fontSizes: ['12px', '14px', '16px', '20px', '24px', '32px', '48px', '64px', '72px'],
|
|
106
|
+
marginPaddings: ['0.5rem', '1rem', '1.5rem', '2rem', '2.5rem', '3rem', '3.5rem', '4rem', '4.5rem', '5rem', '5.5rem', '6rem'],
|
|
107
|
+
letterSpacings: ['-0.5px', '0px', '+0.5px'],
|
|
108
|
+
radii: ['0px', '2px', '4px', '8px'],
|
|
109
|
+
borderRadius: '6px',
|
|
110
|
+
colors: {
|
|
111
|
+
primary: '#000',
|
|
112
|
+
base: '#4e4949',
|
|
113
|
+
baseLt: '#817c7c',
|
|
114
|
+
borderColor: '#d8d8d8',
|
|
115
|
+
ntrlMin: '#fff',
|
|
116
|
+
ntrlMinTen: '#e6e6e6',
|
|
117
|
+
gray: '#efefef',
|
|
118
|
+
darkerGray: '#454141'
|
|
119
|
+
},
|
|
120
|
+
rareStepColors: {
|
|
121
|
+
primary: '#202b58',
|
|
122
|
+
secondary: '#ef5c2d',
|
|
123
|
+
ntrlMin: '#ffffff',
|
|
124
|
+
ntrl40: '#f4f4f4',
|
|
125
|
+
ntrl50: '#808080',
|
|
126
|
+
ntrl60: '#e8e8e8',
|
|
127
|
+
ntrl70: '#252525',
|
|
128
|
+
ntrlMax: '#000000'
|
|
129
|
+
},
|
|
130
|
+
rareStepFontWeights: {
|
|
131
|
+
normal: 400,
|
|
132
|
+
medium: 500,
|
|
133
|
+
semiBold: 600,
|
|
134
|
+
bold: 700
|
|
135
|
+
},
|
|
136
|
+
rareStepFontSize: {
|
|
137
|
+
h1: '36px',
|
|
138
|
+
h2: '30px',
|
|
139
|
+
h3: '24px',
|
|
140
|
+
h4: '20px',
|
|
141
|
+
h5: '16px',
|
|
142
|
+
h6: '14px',
|
|
143
|
+
footerTitle: '16px'
|
|
144
|
+
},
|
|
145
|
+
rareStepPageSizes: {
|
|
146
|
+
mobile: '500px',
|
|
147
|
+
tablet: '768px',
|
|
148
|
+
desktop: '992px',
|
|
149
|
+
screenl: '1280px',
|
|
150
|
+
screenxl: '1680px',
|
|
151
|
+
screenxxl: '1920px',
|
|
152
|
+
container: '1600px'
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
var themed = (function (Component) {
|
|
157
|
+
return /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
158
|
+
return /*#__PURE__*/React__default.createElement(styled.ThemeProvider, {
|
|
159
|
+
theme: theme
|
|
160
|
+
}, /*#__PURE__*/React__default.createElement(Component, _extends({}, props, {
|
|
161
|
+
ref: ref
|
|
162
|
+
})));
|
|
163
|
+
});
|
|
204
164
|
});
|
|
205
165
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
166
|
+
/* eslint-disable react/require-default-props */
|
|
167
|
+
|
|
168
|
+
var Tooltip = function Tooltip(_ref) {
|
|
169
|
+
var _ref$children = _ref.children,
|
|
170
|
+
children = _ref$children === void 0 ? null : _ref$children,
|
|
171
|
+
_ref$toolTipText = _ref.toolTipText,
|
|
172
|
+
toolTipText = _ref$toolTipText === void 0 ? '' : _ref$toolTipText,
|
|
173
|
+
_ref$toolTipPosition = _ref.toolTipPosition,
|
|
174
|
+
toolTipPosition = _ref$toolTipPosition === void 0 ? 'top' : _ref$toolTipPosition,
|
|
175
|
+
_ref$bodyWidth = _ref.bodyWidth,
|
|
176
|
+
bodyWidth = _ref$bodyWidth === void 0 ? '8em' : _ref$bodyWidth,
|
|
177
|
+
_ref$apexWidth = _ref.apexWidth,
|
|
178
|
+
apexWidth = _ref$apexWidth === void 0 ? '5px' : _ref$apexWidth,
|
|
179
|
+
_ref$containerClassNa = _ref.containerClassName,
|
|
180
|
+
containerClassName = _ref$containerClassNa === void 0 ? '' : _ref$containerClassNa,
|
|
181
|
+
_ref$bodyClassName = _ref.bodyClassName,
|
|
182
|
+
bodyClassName = _ref$bodyClassName === void 0 ? '' : _ref$bodyClassName;
|
|
183
|
+
return /*#__PURE__*/React__default.createElement(Container, {
|
|
184
|
+
className: containerClassName
|
|
185
|
+
}, children, /*#__PURE__*/React__default.createElement(Body, {
|
|
186
|
+
$toolTipPosition: toolTipPosition,
|
|
187
|
+
$bodyWidth: bodyWidth,
|
|
188
|
+
$apexWidth: apexWidth,
|
|
189
|
+
className: bodyClassName
|
|
190
|
+
}, toolTipText));
|
|
191
|
+
};
|
|
209
192
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
193
|
+
var Tooltip$1 = themed(Tooltip);
|
|
194
|
+
|
|
195
|
+
var CurrencySelect = function CurrencySelect(_ref) {
|
|
196
|
+
var currency = _ref.currency,
|
|
197
|
+
currencyOptions = _ref.currencyOptions,
|
|
198
|
+
onCurrencyChange = _ref.onCurrencyChange,
|
|
199
|
+
_ref$isCurrencySelect = _ref.isCurrencySelectionDisabled,
|
|
200
|
+
isCurrencySelectionDisabled = _ref$isCurrencySelect === void 0 ? false : _ref$isCurrencySelect,
|
|
201
|
+
_ref$tooltipContent = _ref.tooltipContent,
|
|
202
|
+
tooltipContent = _ref$tooltipContent === void 0 ? '' : _ref$tooltipContent;
|
|
203
|
+
|
|
204
|
+
if (!currencyOptions || currencyOptions.length === 0) {
|
|
205
|
+
return null;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
var selectedOption = currencyOptions.find(function (opt) {
|
|
209
|
+
return opt.value === currency;
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
if (!selectedOption) {
|
|
213
|
+
return null;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
return /*#__PURE__*/React__default.createElement(Tooltip$1, {
|
|
217
|
+
toolTipText: isCurrencySelectionDisabled ? tooltipContent : '',
|
|
218
|
+
toolTipPosition: "bottom",
|
|
219
|
+
bodyWidth: "160px"
|
|
220
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
221
|
+
className: "currency-select-container ".concat(isCurrencySelectionDisabled ? 'disabled' : '')
|
|
222
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
223
|
+
className: "currency-flag"
|
|
224
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
225
|
+
src: selectedOption.flagSrc,
|
|
226
|
+
alt: "".concat(currency, " flag")
|
|
227
|
+
})), /*#__PURE__*/React__default.createElement("select", {
|
|
228
|
+
value: currency,
|
|
229
|
+
onChange: function onChange(e) {
|
|
230
|
+
return onCurrencyChange(e.target.value);
|
|
231
|
+
},
|
|
232
|
+
className: "currency-select",
|
|
233
|
+
disabled: isCurrencySelectionDisabled
|
|
234
|
+
}, currencyOptions.map(function (option) {
|
|
235
|
+
return /*#__PURE__*/React__default.createElement("option", {
|
|
236
|
+
key: option.value,
|
|
237
|
+
value: option.value
|
|
238
|
+
}, option.value, " (", option.symbol, ")");
|
|
239
|
+
}))));
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
return CurrencySelect;
|
|
243
|
+
|
|
244
|
+
})));
|