@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
package/Tooltip.js
CHANGED
|
@@ -1,189 +1,197 @@
|
|
|
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.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
|
+
}
|
|
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 =
|
|
95
|
-
|
|
96
|
-
var theme = {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
var themed = (function (Component) {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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);
|
|
97
|
+
});
|
|
98
|
+
|
|
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
|
+
});
|
|
157
164
|
});
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
var
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
165
|
+
|
|
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
|
+
};
|
|
192
|
+
|
|
193
|
+
var index = themed(Tooltip);
|
|
194
|
+
|
|
195
|
+
return index;
|
|
196
|
+
|
|
197
|
+
})));
|
package/Tracking.js
CHANGED
|
@@ -1,17 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
4
|
+
(global = global || self, factory(global.Tracking = {}));
|
|
5
|
+
}(this, (function (exports) { 'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
value: value
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
};
|
|
7
|
+
var Event = function Event(instance, track) {
|
|
8
|
+
var category = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
9
|
+
var action = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
|
|
10
|
+
var label = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';
|
|
11
|
+
var value = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : '';
|
|
16
12
|
|
|
17
|
-
|
|
13
|
+
if (track) {
|
|
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
|
+
})));
|
package/WrapperButton.js
CHANGED
|
@@ -1,68 +1,76 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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.WrapperButton = factory(global.React, global.styled));
|
|
5
|
+
}(this, (function (React, styled) { 'use strict';
|
|
6
|
+
|
|
7
|
+
React = React && Object.prototype.hasOwnProperty.call(React, 'default') ? React['default'] : React;
|
|
8
|
+
var styled__default = 'default' in styled ? styled['default'] : styled;
|
|
9
|
+
|
|
10
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
11
|
+
if (source == null) return {};
|
|
12
|
+
var target = {};
|
|
13
|
+
var sourceKeys = Object.keys(source);
|
|
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
|
+
}
|
|
15
21
|
|
|
16
|
-
|
|
17
|
-
}
|
|
22
|
+
return target;
|
|
23
|
+
}
|
|
18
24
|
|
|
19
|
-
function _objectWithoutProperties(source, excluded) {
|
|
20
|
-
|
|
25
|
+
function _objectWithoutProperties(source, excluded) {
|
|
26
|
+
if (source == null) return {};
|
|
21
27
|
|
|
22
|
-
|
|
28
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
23
29
|
|
|
24
|
-
|
|
30
|
+
var key, i;
|
|
25
31
|
|
|
26
|
-
|
|
27
|
-
|
|
32
|
+
if (Object.getOwnPropertySymbols) {
|
|
33
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
28
34
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
36
|
+
key = sourceSymbolKeys[i];
|
|
37
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
38
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
39
|
+
target[key] = source[key];
|
|
40
|
+
}
|
|
34
41
|
}
|
|
42
|
+
|
|
43
|
+
return target;
|
|
35
44
|
}
|
|
36
45
|
|
|
37
|
-
|
|
38
|
-
|
|
46
|
+
function _taggedTemplateLiteral(strings, raw) {
|
|
47
|
+
if (!raw) {
|
|
48
|
+
raw = strings.slice(0);
|
|
49
|
+
}
|
|
39
50
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
51
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
52
|
+
raw: {
|
|
53
|
+
value: Object.freeze(raw)
|
|
54
|
+
}
|
|
55
|
+
}));
|
|
43
56
|
}
|
|
44
57
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
}));
|
|
50
|
-
}
|
|
58
|
+
var _templateObject, _templateObject2;
|
|
59
|
+
var disabledButtonStyle = styled.css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: not-allowed;\n opacity: 0.4;\n"])));
|
|
60
|
+
var baseButtonStyle = styled.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"])));
|
|
51
61
|
|
|
52
|
-
var
|
|
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"])));
|
|
62
|
+
var _excluded = ["children"];
|
|
55
63
|
|
|
56
|
-
var
|
|
64
|
+
var _templateObject$1;
|
|
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);
|
|
57
66
|
|
|
58
|
-
var
|
|
59
|
-
var
|
|
67
|
+
var WrapperButton = function WrapperButton(_ref) {
|
|
68
|
+
var children = _ref.children,
|
|
69
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
60
70
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
71
|
+
return /*#__PURE__*/React.createElement(Button, restProps, children);
|
|
72
|
+
};
|
|
64
73
|
|
|
65
|
-
return
|
|
66
|
-
};
|
|
74
|
+
return WrapperButton;
|
|
67
75
|
|
|
68
|
-
|
|
76
|
+
})));
|