@bonlineza/luxity-lib 2.39.4 → 2.39.6
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 +342 -352
- package/AddInterest.js +3109 -3068
- package/AddProductInterest.js +999 -7572
- package/BrandSelector.js +854 -861
- package/Checkbox.js +240 -250
- package/CheckboxButton.js +229 -236
- package/CommunicationPreferenceOptionsRenderer.js +560 -568
- package/CommunicationPreferenceSection.js +651 -659
- package/CommunicationPreferences.js +2394 -2402
- package/ConditionSelector.js +852 -859
- package/CountryCodeSelect.js +79 -6650
- package/CurrencyInputFormatter.js +86 -96
- package/CurrencySelect.js +219 -227
- package/DropdownSelector.js +212 -6821
- package/GALink.js +43 -51
- package/GenderSelector.js +355 -362
- package/GraphQLDropdownSelector.js +5308 -11832
- package/GraphQLMultiSelector.js +593 -601
- package/IconHeader.js +118 -126
- package/IconWrapper.js +17 -25
- package/InterestCatSelector.js +424 -389
- package/InterestItem.js +462 -469
- package/Interests.js +4719 -11243
- package/InterestsSubheading.js +33 -41
- package/InvertedTextButton.js +167 -175
- package/LuxityAppSideNav.js +181 -189
- package/LuxityDesktopHeader.js +1355 -1363
- package/LuxityFooter.js +2228 -2236
- package/LuxityGraphQLDropdownSelector.js +5395 -11919
- package/LuxityGraphQLMultiselector.js +778 -785
- package/LuxityMobileHeader.js +1786 -1794
- package/LuxityPageReady.js +199 -209
- package/LuxityProductInterestItem.js +359 -367
- package/LuxitySideNav.js +665 -673
- package/MaterialSelector.js +5430 -11954
- package/ModelSelector.js +5430 -11954
- package/NotificationDropDown.js +459 -7030
- package/Notify.js +20 -32
- package/OutlinePrimaryButton.js +134 -142
- package/PriceRangeSelector.js +1264 -1265
- package/PrimaryButton.js +129 -137
- package/RadioButtons.js +308 -318
- package/RangeSlider.js +1033 -1039
- package/RareStepFooter.js +257 -264
- package/RareStepHeader.js +801 -808
- package/ReactSelectWrapper.js +33 -6604
- package/SecondaryButton.js +144 -152
- package/ShoeSizeRangeSelector.js +1147 -1153
- package/ShoeSizeSelector.js +1146 -1154
- package/SimpleErrorBoundary.js +130 -138
- package/StyleSelector.js +854 -861
- package/TestComponent.js +15 -0
- package/TextButton.js +135 -143
- package/Tooltip.js +176 -184
- package/Tracking.js +15 -25
- package/WrapperButton.js +50 -58
- package/build/CountryCodeSelect/index.js +18 -0
- package/build/ReactSelectWrapper/index.js +34 -0
- package/build/bundle.css +1 -1
- package/build/bundle.js +10634 -17192
- package/build/constants.js +32 -43
- package/package.json +2 -2
- package/postcss.config.js +6 -0
- package/svg/Accessories.js +34 -42
- package/svg/Account.js +30 -38
- package/svg/Add.js +31 -39
- package/svg/ArrowRight.js +28 -36
- package/svg/Bags.js +40 -48
- package/svg/BurgerMenu.js +24 -32
- package/svg/Calendar.js +98 -106
- package/svg/CalendarCircled.js +100 -108
- package/svg/CheckCircled.js +32 -40
- package/svg/Close.js +29 -37
- package/svg/Clothing.js +36 -44
- package/svg/Dot.js +32 -40
- package/svg/Edit.js +27 -35
- package/svg/Eye.js +28 -36
- package/svg/FileAttach.js +28 -36
- package/svg/FileAttachCircled.js +30 -38
- package/svg/Jewellery.js +56 -0
- package/svg/LightBulb.js +58 -66
- package/svg/Logo.js +132 -140
- package/svg/LuxityMenu.js +28 -36
- package/svg/Minus.js +29 -37
- package/svg/MobileAvatar.js +28 -36
- package/svg/MyOrder.js +36 -44
- package/svg/MyPayment.js +36 -44
- package/svg/MyProfile.js +44 -52
- package/svg/MySale.js +31 -39
- package/svg/Notification.js +30 -38
- package/svg/PointerDown.js +28 -36
- package/svg/Search.js +27 -35
- package/svg/Shoes.js +37 -45
- package/svg/SvgWrapper.js +13 -21
- package/svg/Trash.js +32 -40
- package/svg/Watches.js +47 -55
package/Tooltip.js
CHANGED
|
@@ -1,197 +1,189 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['react', 'styled-components'], factory) :
|
|
4
|
-
(global = global || self, global.Tooltip = 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
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return target;
|
|
23
|
-
};
|
|
24
|
-
return _extends.apply(this, arguments);
|
|
25
|
-
}
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import styled, { css, ThemeProvider } from 'styled-components';
|
|
26
3
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
4
|
+
function _extends() {
|
|
5
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
6
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
7
|
+
var source = arguments[i];
|
|
31
8
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
9
|
+
for (var key in source) {
|
|
10
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
11
|
+
target[key] = source[key];
|
|
12
|
+
}
|
|
35
13
|
}
|
|
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);
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
var _templateObject$1;
|
|
55
|
-
|
|
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;
|
|
70
14
|
}
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
var getAfterStyling = function getAfterStyling() {
|
|
74
|
-
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
75
|
-
var $toolTipPosition = props.$toolTipPosition;
|
|
76
|
-
|
|
77
|
-
switch ($toolTipPosition) {
|
|
78
|
-
case 'top':
|
|
79
|
-
return getTopMiddleArrowAfterStyle(props);
|
|
80
15
|
|
|
81
|
-
|
|
82
|
-
return getBottomMiddleArrowAfterStyle(props);
|
|
83
|
-
|
|
84
|
-
default:
|
|
85
|
-
return '';
|
|
86
|
-
}
|
|
16
|
+
return target;
|
|
87
17
|
};
|
|
18
|
+
return _extends.apply(this, arguments);
|
|
19
|
+
}
|
|
88
20
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}, function (props) {
|
|
94
|
-
return getBodyStyle(props);
|
|
95
|
-
}, function (props) {
|
|
96
|
-
return getAfterStyling(props);
|
|
97
|
-
});
|
|
21
|
+
function _taggedTemplateLiteral(strings, raw) {
|
|
22
|
+
if (!raw) {
|
|
23
|
+
raw = strings.slice(0);
|
|
24
|
+
}
|
|
98
25
|
|
|
99
|
-
|
|
100
|
-
|
|
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'
|
|
26
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
27
|
+
raw: {
|
|
28
|
+
value: Object.freeze(raw)
|
|
153
29
|
}
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
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
|
+
};
|
|
165
66
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
var
|
|
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
|
-
};
|
|
67
|
+
var getAfterStyling = function getAfterStyling() {
|
|
68
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
69
|
+
var $toolTipPosition = props.$toolTipPosition;
|
|
192
70
|
|
|
193
|
-
|
|
71
|
+
switch ($toolTipPosition) {
|
|
72
|
+
case 'top':
|
|
73
|
+
return getTopMiddleArrowAfterStyle(props);
|
|
194
74
|
|
|
195
|
-
|
|
75
|
+
case 'bottom':
|
|
76
|
+
return getBottomMiddleArrowAfterStyle(props);
|
|
196
77
|
|
|
197
|
-
|
|
78
|
+
default:
|
|
79
|
+
return '';
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
var Body = styled.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) {
|
|
84
|
+
return props.$bodyWidth;
|
|
85
|
+
}, function (props) {
|
|
86
|
+
return props.theme.colors.base || 'black';
|
|
87
|
+
}, function (props) {
|
|
88
|
+
return getBodyStyle(props);
|
|
89
|
+
}, function (props) {
|
|
90
|
+
return getAfterStyling(props);
|
|
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
|
+
})));
|
|
157
|
+
});
|
|
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 index = themed(Tooltip);
|
|
188
|
+
|
|
189
|
+
export default index;
|
package/Tracking.js
CHANGED
|
@@ -1,27 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var Event = function Event(instance, track) {
|
|
2
|
+
var category = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
3
|
+
var action = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
|
|
4
|
+
var label = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';
|
|
5
|
+
var value = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : '';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
if (track) {
|
|
8
|
+
instance.event({
|
|
9
|
+
category: category,
|
|
10
|
+
action: action,
|
|
11
|
+
label: label,
|
|
12
|
+
value: value
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
};
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
instance.event({
|
|
15
|
-
category: category,
|
|
16
|
-
action: action,
|
|
17
|
-
label: label,
|
|
18
|
-
value: value
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
exports.Event = Event;
|
|
24
|
-
|
|
25
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
26
|
-
|
|
27
|
-
})));
|
|
17
|
+
export { Event };
|
package/WrapperButton.js
CHANGED
|
@@ -1,76 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var key, i;
|
|
15
|
-
|
|
16
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
17
|
-
key = sourceKeys[i];
|
|
18
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
19
|
-
target[key] = source[key];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return target;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
5
|
+
if (source == null) return {};
|
|
6
|
+
var target = {};
|
|
7
|
+
var sourceKeys = Object.keys(source);
|
|
8
|
+
var key, i;
|
|
9
|
+
|
|
10
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
11
|
+
key = sourceKeys[i];
|
|
12
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
13
|
+
target[key] = source[key];
|
|
23
14
|
}
|
|
24
15
|
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
return target;
|
|
17
|
+
}
|
|
27
18
|
|
|
28
|
-
|
|
19
|
+
function _objectWithoutProperties(source, excluded) {
|
|
20
|
+
if (source == null) return {};
|
|
29
21
|
|
|
30
|
-
|
|
22
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
31
23
|
|
|
32
|
-
|
|
33
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
24
|
+
var key, i;
|
|
34
25
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
38
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
39
|
-
target[key] = source[key];
|
|
40
|
-
}
|
|
41
|
-
}
|
|
26
|
+
if (Object.getOwnPropertySymbols) {
|
|
27
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
42
28
|
|
|
43
|
-
|
|
29
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
30
|
+
key = sourceSymbolKeys[i];
|
|
31
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
32
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
33
|
+
target[key] = source[key];
|
|
34
|
+
}
|
|
44
35
|
}
|
|
45
36
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
raw = strings.slice(0);
|
|
49
|
-
}
|
|
37
|
+
return target;
|
|
38
|
+
}
|
|
50
39
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
}));
|
|
40
|
+
function _taggedTemplateLiteral(strings, raw) {
|
|
41
|
+
if (!raw) {
|
|
42
|
+
raw = strings.slice(0);
|
|
56
43
|
}
|
|
57
44
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
45
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
46
|
+
raw: {
|
|
47
|
+
value: Object.freeze(raw)
|
|
48
|
+
}
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
61
51
|
|
|
62
|
-
|
|
52
|
+
var _templateObject, _templateObject2;
|
|
53
|
+
var disabledButtonStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: not-allowed;\n opacity: 0.4;\n"])));
|
|
54
|
+
var baseButtonStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 1rem 2rem;\n cursor: pointer;\n letter-spacing: 1.3px;\n border-style: none;\n text-transform: uppercase;\n font-size: 12px;\n color: #fff;\n transition: 0.2s ease-in-out;\n outline: none;\n"])));
|
|
63
55
|
|
|
64
|
-
|
|
65
|
-
var Button = styled__default.button(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n outline: none;\n cursor: pointer;\n background-color: transparent;\n border: none;\n &:disabled {\n ", ";\n }\n"])), disabledButtonStyle);
|
|
56
|
+
var _excluded = ["children"];
|
|
66
57
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
58
|
+
var _templateObject$1;
|
|
59
|
+
var Button = styled.button(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n outline: none;\n cursor: pointer;\n background-color: transparent;\n border: none;\n &:disabled {\n ", ";\n }\n"])), disabledButtonStyle);
|
|
70
60
|
|
|
71
|
-
|
|
72
|
-
|
|
61
|
+
var WrapperButton = function WrapperButton(_ref) {
|
|
62
|
+
var children = _ref.children,
|
|
63
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
73
64
|
|
|
74
|
-
return
|
|
65
|
+
return /*#__PURE__*/React.createElement(Button, restProps, children);
|
|
66
|
+
};
|
|
75
67
|
|
|
76
|
-
|
|
68
|
+
export default WrapperButton;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var ReactSelectWrapper_1 = __importDefault(require("../ReactSelectWrapper"));
|
|
8
|
+
var responseTransform = function (countryData) {
|
|
9
|
+
return countryData.map(function (item) { return ({
|
|
10
|
+
label: "".concat(item.code, " (+").concat(item.dial_code, ")"),
|
|
11
|
+
value: item.code,
|
|
12
|
+
}); });
|
|
13
|
+
};
|
|
14
|
+
var CountryCodeSelect = function (_a) {
|
|
15
|
+
var _b = _a.countryData, countryData = _b === void 0 ? [] : _b, className = _a.className, classNamePrefix = _a.classNamePrefix, _c = _a.defaultCountryCode, defaultCountryCode = _c === void 0 ? 'ZA' : _c, _d = _a.onChange, onChange = _d === void 0 ? function () { return null; } : _d, _e = _a.isSearchable, isSearchable = _e === void 0 ? true : _e, _f = _a.name, name = _f === void 0 ? 'country_code' : _f, _g = _a.renderNoData, renderNoData = _g === void 0 ? function () { return 'Loading...'; } : _g;
|
|
16
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, countryData && countryData.length ? (react_1.default.createElement(ReactSelectWrapper_1.default, { name: name, className: className, classNamePrefix: classNamePrefix, options: responseTransform(countryData), defaultValue: responseTransform(countryData.filter(function (item) { return item.code === defaultCountryCode; })), onChange: onChange, isSearchable: isSearchable })) : (renderNoData())));
|
|
17
|
+
};
|
|
18
|
+
exports.default = CountryCodeSelect;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
var react_1 = __importDefault(require("react"));
|
|
29
|
+
var react_select_1 = __importDefault(require("react-select"));
|
|
30
|
+
var ReactSelectWrapper = function (_a) {
|
|
31
|
+
var _b = _a.isMulti, isMulti = _b === void 0 ? false : _b, _c = _a.isSearchable, isSearchable = _c === void 0 ? false : _c, _d = _a.components, components = _d === void 0 ? { IndicatorSeparator: function () { return null; } } : _d, _e = _a.options, options = _e === void 0 ? [] : _e, _f = _a.className, className = _f === void 0 ? 'dropdown-select-container' : _f, _g = _a.classNamePrefix, classNamePrefix = _g === void 0 ? 'dropdown-select' : _g, _h = _a.onChange, onChange = _h === void 0 ? function () { return null; } : _h, name = _a.name, _j = _a.noOptionsMessage, noOptionsMessage = _j === void 0 ? function () { return 'No Options'; } : _j, rest = __rest(_a, ["isMulti", "isSearchable", "components", "options", "className", "classNamePrefix", "onChange", "name", "noOptionsMessage"]);
|
|
32
|
+
return (react_1.default.createElement(react_select_1.default, __assign({ isMulti: isMulti, isSearchable: isSearchable, components: components, options: options, className: className, classNamePrefix: classNamePrefix, onChange: onChange, name: name, noOptionsMessage: noOptionsMessage }, rest)));
|
|
33
|
+
};
|
|
34
|
+
exports.default = ReactSelectWrapper;
|