@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.
Files changed (96) hide show
  1. package/Accordion.js +342 -352
  2. package/AddInterest.js +3109 -3068
  3. package/AddProductInterest.js +999 -7572
  4. package/BrandSelector.js +854 -861
  5. package/Checkbox.js +240 -250
  6. package/CheckboxButton.js +229 -236
  7. package/CommunicationPreferenceOptionsRenderer.js +560 -568
  8. package/CommunicationPreferenceSection.js +651 -659
  9. package/CommunicationPreferences.js +2394 -2402
  10. package/ConditionSelector.js +852 -859
  11. package/CountryCodeSelect.js +79 -6650
  12. package/CurrencyInputFormatter.js +86 -96
  13. package/CurrencySelect.js +219 -227
  14. package/DropdownSelector.js +212 -6821
  15. package/GALink.js +43 -51
  16. package/GenderSelector.js +355 -362
  17. package/GraphQLDropdownSelector.js +5308 -11832
  18. package/GraphQLMultiSelector.js +593 -601
  19. package/IconHeader.js +118 -126
  20. package/IconWrapper.js +17 -25
  21. package/InterestCatSelector.js +424 -389
  22. package/InterestItem.js +462 -469
  23. package/Interests.js +4719 -11243
  24. package/InterestsSubheading.js +33 -41
  25. package/InvertedTextButton.js +167 -175
  26. package/LuxityAppSideNav.js +181 -189
  27. package/LuxityDesktopHeader.js +1355 -1363
  28. package/LuxityFooter.js +2228 -2236
  29. package/LuxityGraphQLDropdownSelector.js +5395 -11919
  30. package/LuxityGraphQLMultiselector.js +778 -785
  31. package/LuxityMobileHeader.js +1786 -1794
  32. package/LuxityPageReady.js +199 -209
  33. package/LuxityProductInterestItem.js +359 -367
  34. package/LuxitySideNav.js +665 -673
  35. package/MaterialSelector.js +5430 -11954
  36. package/ModelSelector.js +5430 -11954
  37. package/NotificationDropDown.js +459 -7030
  38. package/Notify.js +20 -32
  39. package/OutlinePrimaryButton.js +134 -142
  40. package/PriceRangeSelector.js +1264 -1265
  41. package/PrimaryButton.js +129 -137
  42. package/RadioButtons.js +308 -318
  43. package/RangeSlider.js +1033 -1039
  44. package/RareStepFooter.js +257 -264
  45. package/RareStepHeader.js +801 -808
  46. package/ReactSelectWrapper.js +33 -6604
  47. package/SecondaryButton.js +144 -152
  48. package/ShoeSizeRangeSelector.js +1147 -1153
  49. package/ShoeSizeSelector.js +1146 -1154
  50. package/SimpleErrorBoundary.js +130 -138
  51. package/StyleSelector.js +854 -861
  52. package/TestComponent.js +15 -0
  53. package/TextButton.js +135 -143
  54. package/Tooltip.js +176 -184
  55. package/Tracking.js +15 -25
  56. package/WrapperButton.js +50 -58
  57. package/build/CountryCodeSelect/index.js +18 -0
  58. package/build/ReactSelectWrapper/index.js +34 -0
  59. package/build/bundle.css +1 -1
  60. package/build/bundle.js +10634 -17192
  61. package/build/constants.js +32 -43
  62. package/package.json +2 -2
  63. package/postcss.config.js +6 -0
  64. package/svg/Accessories.js +34 -42
  65. package/svg/Account.js +30 -38
  66. package/svg/Add.js +31 -39
  67. package/svg/ArrowRight.js +28 -36
  68. package/svg/Bags.js +40 -48
  69. package/svg/BurgerMenu.js +24 -32
  70. package/svg/Calendar.js +98 -106
  71. package/svg/CalendarCircled.js +100 -108
  72. package/svg/CheckCircled.js +32 -40
  73. package/svg/Close.js +29 -37
  74. package/svg/Clothing.js +36 -44
  75. package/svg/Dot.js +32 -40
  76. package/svg/Edit.js +27 -35
  77. package/svg/Eye.js +28 -36
  78. package/svg/FileAttach.js +28 -36
  79. package/svg/FileAttachCircled.js +30 -38
  80. package/svg/Jewellery.js +56 -0
  81. package/svg/LightBulb.js +58 -66
  82. package/svg/Logo.js +132 -140
  83. package/svg/LuxityMenu.js +28 -36
  84. package/svg/Minus.js +29 -37
  85. package/svg/MobileAvatar.js +28 -36
  86. package/svg/MyOrder.js +36 -44
  87. package/svg/MyPayment.js +36 -44
  88. package/svg/MyProfile.js +44 -52
  89. package/svg/MySale.js +31 -39
  90. package/svg/Notification.js +30 -38
  91. package/svg/PointerDown.js +28 -36
  92. package/svg/Search.js +27 -35
  93. package/svg/Shoes.js +37 -45
  94. package/svg/SvgWrapper.js +13 -21
  95. package/svg/Trash.js +32 -40
  96. package/svg/Watches.js +47 -55
package/RadioButtons.js CHANGED
@@ -1,350 +1,340 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('styled-components')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'react', 'styled-components'], factory) :
4
- (global = global || self, factory(global.RadioButtons = {}, global.React, global.styled));
5
- }(this, (function (exports, 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 ownKeys(object, enumerableOnly) {
11
- var keys = Object.keys(object);
12
-
13
- if (Object.getOwnPropertySymbols) {
14
- var symbols = Object.getOwnPropertySymbols(object);
15
- enumerableOnly && (symbols = symbols.filter(function (sym) {
16
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
17
- })), keys.push.apply(keys, symbols);
18
- }
1
+ import React, { forwardRef, useState, useEffect, Fragment } from 'react';
2
+ import styled, { ThemeProvider } from 'styled-components';
3
+
4
+ function ownKeys(object, enumerableOnly) {
5
+ var keys = Object.keys(object);
19
6
 
20
- return keys;
7
+ if (Object.getOwnPropertySymbols) {
8
+ var symbols = Object.getOwnPropertySymbols(object);
9
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
10
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
11
+ })), keys.push.apply(keys, symbols);
21
12
  }
22
13
 
23
- function _objectSpread2(target) {
24
- for (var i = 1; i < arguments.length; i++) {
25
- var source = null != arguments[i] ? arguments[i] : {};
26
- i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
27
- _defineProperty(target, key, source[key]);
28
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
29
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
30
- });
31
- }
14
+ return keys;
15
+ }
32
16
 
33
- return target;
17
+ function _objectSpread2(target) {
18
+ for (var i = 1; i < arguments.length; i++) {
19
+ var source = null != arguments[i] ? arguments[i] : {};
20
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
21
+ _defineProperty(target, key, source[key]);
22
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
23
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
24
+ });
34
25
  }
35
26
 
36
- function _defineProperty(obj, key, value) {
37
- if (key in obj) {
38
- Object.defineProperty(obj, key, {
39
- value: value,
40
- enumerable: true,
41
- configurable: true,
42
- writable: true
43
- });
44
- } else {
45
- obj[key] = value;
46
- }
27
+ return target;
28
+ }
47
29
 
48
- return obj;
30
+ function _defineProperty(obj, key, value) {
31
+ if (key in obj) {
32
+ Object.defineProperty(obj, key, {
33
+ value: value,
34
+ enumerable: true,
35
+ configurable: true,
36
+ writable: true
37
+ });
38
+ } else {
39
+ obj[key] = value;
49
40
  }
50
41
 
51
- function _extends() {
52
- _extends = Object.assign ? Object.assign.bind() : function (target) {
53
- for (var i = 1; i < arguments.length; i++) {
54
- var source = arguments[i];
42
+ return obj;
43
+ }
55
44
 
56
- for (var key in source) {
57
- if (Object.prototype.hasOwnProperty.call(source, key)) {
58
- target[key] = source[key];
59
- }
45
+ function _extends() {
46
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
47
+ for (var i = 1; i < arguments.length; i++) {
48
+ var source = arguments[i];
49
+
50
+ for (var key in source) {
51
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
52
+ target[key] = source[key];
60
53
  }
61
54
  }
55
+ }
56
+
57
+ return target;
58
+ };
59
+ return _extends.apply(this, arguments);
60
+ }
62
61
 
63
- return target;
64
- };
65
- return _extends.apply(this, arguments);
62
+ function _taggedTemplateLiteral(strings, raw) {
63
+ if (!raw) {
64
+ raw = strings.slice(0);
66
65
  }
67
66
 
68
- function _taggedTemplateLiteral(strings, raw) {
69
- if (!raw) {
70
- raw = strings.slice(0);
67
+ return Object.freeze(Object.defineProperties(strings, {
68
+ raw: {
69
+ value: Object.freeze(raw)
71
70
  }
71
+ }));
72
+ }
72
73
 
73
- return Object.freeze(Object.defineProperties(strings, {
74
- raw: {
75
- value: Object.freeze(raw)
76
- }
77
- }));
78
- }
74
+ function _slicedToArray(arr, i) {
75
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
76
+ }
79
77
 
80
- function _slicedToArray(arr, i) {
81
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
82
- }
78
+ function _arrayWithHoles(arr) {
79
+ if (Array.isArray(arr)) return arr;
80
+ }
83
81
 
84
- function _arrayWithHoles(arr) {
85
- if (Array.isArray(arr)) return arr;
86
- }
82
+ function _iterableToArrayLimit(arr, i) {
83
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
87
84
 
88
- function _iterableToArrayLimit(arr, i) {
89
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
85
+ if (_i == null) return;
86
+ var _arr = [];
87
+ var _n = true;
88
+ var _d = false;
90
89
 
91
- if (_i == null) return;
92
- var _arr = [];
93
- var _n = true;
94
- var _d = false;
90
+ var _s, _e;
95
91
 
96
- var _s, _e;
92
+ try {
93
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
94
+ _arr.push(_s.value);
97
95
 
96
+ if (i && _arr.length === i) break;
97
+ }
98
+ } catch (err) {
99
+ _d = true;
100
+ _e = err;
101
+ } finally {
98
102
  try {
99
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
100
- _arr.push(_s.value);
101
-
102
- if (i && _arr.length === i) break;
103
- }
104
- } catch (err) {
105
- _d = true;
106
- _e = err;
103
+ if (!_n && _i["return"] != null) _i["return"]();
107
104
  } finally {
108
- try {
109
- if (!_n && _i["return"] != null) _i["return"]();
110
- } finally {
111
- if (_d) throw _e;
112
- }
105
+ if (_d) throw _e;
113
106
  }
114
-
115
- return _arr;
116
- }
117
-
118
- function _unsupportedIterableToArray(o, minLen) {
119
- if (!o) return;
120
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
121
- var n = Object.prototype.toString.call(o).slice(8, -1);
122
- if (n === "Object" && o.constructor) n = o.constructor.name;
123
- if (n === "Map" || n === "Set") return Array.from(o);
124
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
125
107
  }
126
108
 
127
- function _arrayLikeToArray(arr, len) {
128
- if (len == null || len > arr.length) len = arr.length;
129
-
130
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
131
-
132
- return arr2;
133
- }
134
-
135
- function _nonIterableRest() {
136
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
137
- }
138
-
139
- var _templateObject;
140
- var RadioButtonsContainer = styled__default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
141
-
142
- var _templateObject$1;
143
- var ButtonListWrapper = styled__default.div(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n display: flex;\n flex-grow: 1;\n flex-wrap: ", ";\n"])), function (_ref) {
144
- var noWrap = _ref.noWrap;
145
- return noWrap ? 'nowrap' : 'wrap';
146
- });
147
-
148
- var _templateObject$2;
149
- var Title = styled__default.div(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n font-weight: bold;\n color: ", ";\n flex-basis: 40%;\n"])), function (props) {
150
- return props.theme.colors.base;
151
- });
152
-
153
- var _templateObject$3;
154
- var RadioButtonLabel = styled__default.label(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteral(["\n display: flex;\n margin-bottom: ", ";\n margin-right: ", ";\n"])), function (props) {
155
- return props.theme.marginPaddings[0];
156
- }, function (props) {
157
- return props.theme.marginPaddings[0];
158
- });
159
-
160
- var _templateObject$4;
161
- var RadioButtonCircle = styled__default.div(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n height: 20px;\n width: 20px;\n border-radius: 50%;\n margin-right: 5px;\n border: 1px solid ", ";\n display: flex;\n"])), function (props) {
162
- return props.theme.colors.base;
163
- });
164
-
165
- var _templateObject$5;
166
- var RadioButtonCircleInner = styled__default.div(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteral(["\n height: 8px;\n width: 8px;\n border-radius: 50%;\n margin: auto;\n"])));
167
-
168
- var _templateObject$6;
169
- var RadioButtonInput = styled__default.input(_templateObject$6 || (_templateObject$6 = _taggedTemplateLiteral(["\n display: none;\n :checked ~ ", " {\n ", " {\n background-color: ", ";\n }\n }\n"])), RadioButtonCircle, RadioButtonCircleInner, function (props) {
170
- return props.theme.colors.base;
171
- });
172
-
173
- var _templateObject$7;
174
- var RadioButtonText = styled__default.div(_templateObject$7 || (_templateObject$7 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
175
-
176
- var RadioButtonsFormWrapper = function RadioButtonsFormWrapper(_ref) {
177
- var name = _ref.name,
178
- _ref$title = _ref.title,
179
- title = _ref$title === void 0 ? '' : _ref$title,
180
- controlRef = _ref.controlRef,
181
- _ref$options = _ref.options,
182
- options = _ref$options === void 0 ? [] : _ref$options,
183
- _ref$errors = _ref.errors,
184
- errors = _ref$errors === void 0 ? {} : _ref$errors;
185
- var optsWithControlRef = options.map(function (option) {
186
- return _objectSpread2(_objectSpread2({}, option), {}, {
187
- actionCallback: function actionCallback() {
188
- return controlRef(name, option.value);
189
- }
190
- });
191
- });
192
- return /*#__PURE__*/React__default.createElement(RadioButtons$1, {
193
- name: name,
194
- title: title,
195
- options: optsWithControlRef,
196
- errors: errors,
197
- noWrap: true
109
+ return _arr;
110
+ }
111
+
112
+ function _unsupportedIterableToArray(o, minLen) {
113
+ if (!o) return;
114
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
115
+ var n = Object.prototype.toString.call(o).slice(8, -1);
116
+ if (n === "Object" && o.constructor) n = o.constructor.name;
117
+ if (n === "Map" || n === "Set") return Array.from(o);
118
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
119
+ }
120
+
121
+ function _arrayLikeToArray(arr, len) {
122
+ if (len == null || len > arr.length) len = arr.length;
123
+
124
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
125
+
126
+ return arr2;
127
+ }
128
+
129
+ function _nonIterableRest() {
130
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
131
+ }
132
+
133
+ var _templateObject;
134
+ var RadioButtonsContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
135
+
136
+ var _templateObject$1;
137
+ var ButtonListWrapper = styled.div(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n display: flex;\n flex-grow: 1;\n flex-wrap: ", ";\n"])), function (_ref) {
138
+ var noWrap = _ref.noWrap;
139
+ return noWrap ? 'nowrap' : 'wrap';
140
+ });
141
+
142
+ var _templateObject$2;
143
+ var Title = styled.div(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n font-weight: bold;\n color: ", ";\n flex-basis: 40%;\n"])), function (props) {
144
+ return props.theme.colors.base;
145
+ });
146
+
147
+ var _templateObject$3;
148
+ var RadioButtonLabel = styled.label(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteral(["\n display: flex;\n margin-bottom: ", ";\n margin-right: ", ";\n"])), function (props) {
149
+ return props.theme.marginPaddings[0];
150
+ }, function (props) {
151
+ return props.theme.marginPaddings[0];
152
+ });
153
+
154
+ var _templateObject$4;
155
+ var RadioButtonCircle = styled.div(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n height: 20px;\n width: 20px;\n border-radius: 50%;\n margin-right: 5px;\n border: 1px solid ", ";\n display: flex;\n"])), function (props) {
156
+ return props.theme.colors.base;
157
+ });
158
+
159
+ var _templateObject$5;
160
+ var RadioButtonCircleInner = styled.div(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteral(["\n height: 8px;\n width: 8px;\n border-radius: 50%;\n margin: auto;\n"])));
161
+
162
+ var _templateObject$6;
163
+ var RadioButtonInput = styled.input(_templateObject$6 || (_templateObject$6 = _taggedTemplateLiteral(["\n display: none;\n :checked ~ ", " {\n ", " {\n background-color: ", ";\n }\n }\n"])), RadioButtonCircle, RadioButtonCircleInner, function (props) {
164
+ return props.theme.colors.base;
165
+ });
166
+
167
+ var _templateObject$7;
168
+ var RadioButtonText = styled.div(_templateObject$7 || (_templateObject$7 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
169
+
170
+ var RadioButtonsFormWrapper = function RadioButtonsFormWrapper(_ref) {
171
+ var name = _ref.name,
172
+ _ref$title = _ref.title,
173
+ title = _ref$title === void 0 ? '' : _ref$title,
174
+ controlRef = _ref.controlRef,
175
+ _ref$options = _ref.options,
176
+ options = _ref$options === void 0 ? [] : _ref$options,
177
+ _ref$errors = _ref.errors,
178
+ errors = _ref$errors === void 0 ? {} : _ref$errors;
179
+ var optsWithControlRef = options.map(function (option) {
180
+ return _objectSpread2(_objectSpread2({}, option), {}, {
181
+ actionCallback: function actionCallback() {
182
+ return controlRef(name, option.value);
183
+ }
198
184
  });
199
- };
200
-
201
- var _templateObject$8;
202
- var inputMarginRight = '0.2em';
203
- var CheckboxLabel = styled__default.label(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteral(["\n cursor: pointer;\n position: relative;\n display: flex;\n align-items: center;\n\n span {\n :before {\n content: '\\2713';\n position: absolute;\n display: none;\n color: white;\n left: 0.4em;\n top: 0.1em;\n font-size: ", ";\n text-align: center;\n }\n }\n\n input {\n font-size: ", ";\n background-color: ", ";\n appearance: none;\n outline: none;\n height: 1em;\n width: 1em;\n margin-right: ", ";\n border: 1px solid ", ";\n border-radius: ", ";\n transition-duration: 0.3s;\n cursor: pointer;\n\n &:checked {\n background-color: ", ";\n }\n\n &:checked + span:before {\n display: block;\n }\n }\n"], ["\n cursor: pointer;\n position: relative;\n display: flex;\n align-items: center;\n\n span {\n :before {\n content: '\\\\2713';\n position: absolute;\n display: none;\n color: white;\n left: 0.4em;\n top: 0.1em;\n font-size: ", ";\n text-align: center;\n }\n }\n\n input {\n font-size: ", ";\n background-color: ", ";\n appearance: none;\n outline: none;\n height: 1em;\n width: 1em;\n margin-right: ", ";\n border: 1px solid ", ";\n border-radius: ", ";\n transition-duration: 0.3s;\n cursor: pointer;\n\n &:checked {\n background-color: ", ";\n }\n\n &:checked + span:before {\n display: block;\n }\n }\n"])), function (props) {
204
- var _props$theme;
205
-
206
- return (_props$theme = props.theme) !== null && _props$theme !== void 0 && _props$theme.fontSizes.length ? props.theme.fontSizes[4] : '1em';
207
- }, function (props) {
208
- return props.theme.fontSizes[4];
209
- }, function (props) {
210
- return props.theme.colors.ntrlMin;
211
- }, inputMarginRight, function (props) {
212
- return props.theme.colors.primary;
213
- }, function (props) {
214
- return props.theme.borderRadius;
215
- }, function (props) {
216
- return props.theme.colors.primary;
217
185
  });
218
- var ErrorMessage = styled__default.div({
219
- color: function color(props) {
220
- return props.theme.colors.primary;
221
- }
186
+ return /*#__PURE__*/React.createElement(RadioButtons$1, {
187
+ name: name,
188
+ title: title,
189
+ options: optsWithControlRef,
190
+ errors: errors,
191
+ noWrap: true
222
192
  });
223
-
224
- var theme = {
225
- breakpoints: ['40em', '52em', '64em'],
226
- space: ['0px', '4px', '8px', '16px', '32px', '64px', '128px', '256px', '512px'],
227
- fontSizes: ['12px', '14px', '16px', '20px', '24px', '32px', '48px', '64px', '72px'],
228
- marginPaddings: ['0.5rem', '1rem', '1.5rem', '2rem', '2.5rem', '3rem', '3.5rem', '4rem', '4.5rem', '5rem', '5.5rem', '6rem'],
229
- letterSpacings: ['-0.5px', '0px', '+0.5px'],
230
- radii: ['0px', '2px', '4px', '8px'],
231
- borderRadius: '6px',
232
- colors: {
233
- primary: '#000',
234
- base: '#4e4949',
235
- baseLt: '#817c7c',
236
- borderColor: '#d8d8d8',
237
- ntrlMin: '#fff',
238
- ntrlMinTen: '#e6e6e6',
239
- gray: '#efefef',
240
- darkerGray: '#454141'
241
- },
242
- rareStepColors: {
243
- primary: '#202b58',
244
- secondary: '#ef5c2d',
245
- ntrlMin: '#ffffff',
246
- ntrl40: '#f4f4f4',
247
- ntrl50: '#808080',
248
- ntrl60: '#e8e8e8',
249
- ntrl70: '#252525',
250
- ntrlMax: '#000000'
251
- },
252
- rareStepFontWeights: {
253
- normal: 400,
254
- medium: 500,
255
- semiBold: 600,
256
- bold: 700
257
- },
258
- rareStepFontSize: {
259
- h1: '36px',
260
- h2: '30px',
261
- h3: '24px',
262
- h4: '20px',
263
- h5: '16px',
264
- h6: '14px',
265
- footerTitle: '16px'
266
- },
267
- rareStepPageSizes: {
268
- mobile: '500px',
269
- tablet: '768px',
270
- desktop: '992px',
271
- screenl: '1280px',
272
- screenxl: '1680px',
273
- screenxxl: '1920px',
274
- container: '1600px'
275
- }
276
- };
277
-
278
- var themed = (function (Component) {
279
- return /*#__PURE__*/React.forwardRef(function (props, ref) {
280
- return /*#__PURE__*/React__default.createElement(styled.ThemeProvider, {
281
- theme: theme
282
- }, /*#__PURE__*/React__default.createElement(Component, _extends({}, props, {
283
- ref: ref
284
- })));
285
- });
193
+ };
194
+
195
+ var _templateObject$8;
196
+ var inputMarginRight = '0.2em';
197
+ var CheckboxLabel = styled.label(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteral(["\n cursor: pointer;\n position: relative;\n display: flex;\n align-items: center;\n\n span {\n :before {\n content: '\\2713';\n position: absolute;\n display: none;\n color: white;\n left: 0.4em;\n top: 0.1em;\n font-size: ", ";\n text-align: center;\n }\n }\n\n input {\n font-size: ", ";\n background-color: ", ";\n appearance: none;\n outline: none;\n height: 1em;\n width: 1em;\n margin-right: ", ";\n border: 1px solid ", ";\n border-radius: ", ";\n transition-duration: 0.3s;\n cursor: pointer;\n\n &:checked {\n background-color: ", ";\n }\n\n &:checked + span:before {\n display: block;\n }\n }\n"], ["\n cursor: pointer;\n position: relative;\n display: flex;\n align-items: center;\n\n span {\n :before {\n content: '\\\\2713';\n position: absolute;\n display: none;\n color: white;\n left: 0.4em;\n top: 0.1em;\n font-size: ", ";\n text-align: center;\n }\n }\n\n input {\n font-size: ", ";\n background-color: ", ";\n appearance: none;\n outline: none;\n height: 1em;\n width: 1em;\n margin-right: ", ";\n border: 1px solid ", ";\n border-radius: ", ";\n transition-duration: 0.3s;\n cursor: pointer;\n\n &:checked {\n background-color: ", ";\n }\n\n &:checked + span:before {\n display: block;\n }\n }\n"])), function (props) {
198
+ var _props$theme;
199
+
200
+ return (_props$theme = props.theme) !== null && _props$theme !== void 0 && _props$theme.fontSizes.length ? props.theme.fontSizes[4] : '1em';
201
+ }, function (props) {
202
+ return props.theme.fontSizes[4];
203
+ }, function (props) {
204
+ return props.theme.colors.ntrlMin;
205
+ }, inputMarginRight, function (props) {
206
+ return props.theme.colors.primary;
207
+ }, function (props) {
208
+ return props.theme.borderRadius;
209
+ }, function (props) {
210
+ return props.theme.colors.primary;
211
+ });
212
+ var ErrorMessage = styled.div({
213
+ color: function color(props) {
214
+ return props.theme.colors.primary;
215
+ }
216
+ });
217
+
218
+ var theme = {
219
+ breakpoints: ['40em', '52em', '64em'],
220
+ space: ['0px', '4px', '8px', '16px', '32px', '64px', '128px', '256px', '512px'],
221
+ fontSizes: ['12px', '14px', '16px', '20px', '24px', '32px', '48px', '64px', '72px'],
222
+ marginPaddings: ['0.5rem', '1rem', '1.5rem', '2rem', '2.5rem', '3rem', '3.5rem', '4rem', '4.5rem', '5rem', '5.5rem', '6rem'],
223
+ letterSpacings: ['-0.5px', '0px', '+0.5px'],
224
+ radii: ['0px', '2px', '4px', '8px'],
225
+ borderRadius: '6px',
226
+ colors: {
227
+ primary: '#000',
228
+ base: '#4e4949',
229
+ baseLt: '#817c7c',
230
+ borderColor: '#d8d8d8',
231
+ ntrlMin: '#fff',
232
+ ntrlMinTen: '#e6e6e6',
233
+ gray: '#efefef',
234
+ darkerGray: '#454141'
235
+ },
236
+ rareStepColors: {
237
+ primary: '#202b58',
238
+ secondary: '#ef5c2d',
239
+ ntrlMin: '#ffffff',
240
+ ntrl40: '#f4f4f4',
241
+ ntrl50: '#808080',
242
+ ntrl60: '#e8e8e8',
243
+ ntrl70: '#252525',
244
+ ntrlMax: '#000000'
245
+ },
246
+ rareStepFontWeights: {
247
+ normal: 400,
248
+ medium: 500,
249
+ semiBold: 600,
250
+ bold: 700
251
+ },
252
+ rareStepFontSize: {
253
+ h1: '36px',
254
+ h2: '30px',
255
+ h3: '24px',
256
+ h4: '20px',
257
+ h5: '16px',
258
+ h6: '14px',
259
+ footerTitle: '16px'
260
+ },
261
+ rareStepPageSizes: {
262
+ mobile: '500px',
263
+ tablet: '768px',
264
+ desktop: '992px',
265
+ screenl: '1280px',
266
+ screenxl: '1680px',
267
+ screenxxl: '1920px',
268
+ container: '1600px'
269
+ }
270
+ };
271
+
272
+ var themed = (function (Component) {
273
+ return /*#__PURE__*/forwardRef(function (props, ref) {
274
+ return /*#__PURE__*/React.createElement(ThemeProvider, {
275
+ theme: theme
276
+ }, /*#__PURE__*/React.createElement(Component, _extends({}, props, {
277
+ ref: ref
278
+ })));
286
279
  });
287
-
288
- var FormWrapper = RadioButtonsFormWrapper;
289
-
290
- /**
291
- * RadioButtons component can show multiple radios, a title and an error message
292
- */
293
- var RadioButtons = function RadioButtons(_ref) {
294
- var options = _ref.options,
295
- name = _ref.name,
296
- noWrap = _ref.noWrap,
297
- title = _ref.title,
298
- errors = _ref.errors;
299
-
300
- var _useState = React.useState(errors[name]),
301
- _useState2 = _slicedToArray(_useState, 2),
302
- errMsg = _useState2[0],
303
- setErrMsg = _useState2[1];
304
-
305
- React.useEffect(function () {
306
- setErrMsg(errors[name]);
307
- }, [errors, name]);
308
- return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(RadioButtonsContainer, null, /*#__PURE__*/React__default.createElement(Title, null, title), /*#__PURE__*/React__default.createElement(ButtonListWrapper, {
309
- noWrap: noWrap
310
- }, options.map(function (_ref2, index) {
311
- var _ref2$actionCallback = _ref2.actionCallback,
312
- actionCallback = _ref2$actionCallback === void 0 ? function () {
313
- return null;
314
- } : _ref2$actionCallback,
315
- _ref2$value = _ref2.value,
316
- value = _ref2$value === void 0 ? '' : _ref2$value,
317
- _ref2$innerText = _ref2.innerText,
318
- innerText = _ref2$innerText === void 0 ? '' : _ref2$innerText,
319
- _ref2$checked = _ref2.checked,
320
- checked = _ref2$checked === void 0 ? false : _ref2$checked;
321
- return /*#__PURE__*/React__default.createElement(RadioButtonLabel, {
322
- key: "".concat(name, "-").concat(index),
323
- htmlFor: "".concat(name, "_").concat(index)
324
- }, /*#__PURE__*/React__default.createElement(RadioButtonInput, {
325
- id: "".concat(name, "_").concat(index),
326
- type: "radio",
327
- name: name,
328
- defaultChecked: checked,
329
- onChange: function onChange() {
330
- setErrMsg('');
331
- actionCallback(name, value);
332
- },
333
- value: value
334
- }), /*#__PURE__*/React__default.createElement(RadioButtonCircle, null, /*#__PURE__*/React__default.createElement(RadioButtonCircleInner, null)), /*#__PURE__*/React__default.createElement(RadioButtonText, null, innerText));
335
- }))), errMsg && /*#__PURE__*/React__default.createElement(ErrorMessage, null, errMsg));
336
- };
337
-
338
- RadioButtons.defaultProps = {
339
- noWrap: false,
340
- title: '',
341
- errors: {}
342
- };
343
- var RadioButtons$1 = themed(RadioButtons);
344
-
345
- exports.FormWrapper = FormWrapper;
346
- exports.default = RadioButtons$1;
347
-
348
- Object.defineProperty(exports, '__esModule', { value: true });
349
-
350
- })));
280
+ });
281
+
282
+ var FormWrapper = RadioButtonsFormWrapper;
283
+
284
+ /**
285
+ * RadioButtons component can show multiple radios, a title and an error message
286
+ */
287
+ var RadioButtons = function RadioButtons(_ref) {
288
+ var options = _ref.options,
289
+ name = _ref.name,
290
+ noWrap = _ref.noWrap,
291
+ title = _ref.title,
292
+ errors = _ref.errors;
293
+
294
+ var _useState = useState(errors[name]),
295
+ _useState2 = _slicedToArray(_useState, 2),
296
+ errMsg = _useState2[0],
297
+ setErrMsg = _useState2[1];
298
+
299
+ useEffect(function () {
300
+ setErrMsg(errors[name]);
301
+ }, [errors, name]);
302
+ return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(RadioButtonsContainer, null, /*#__PURE__*/React.createElement(Title, null, title), /*#__PURE__*/React.createElement(ButtonListWrapper, {
303
+ noWrap: noWrap
304
+ }, options.map(function (_ref2, index) {
305
+ var _ref2$actionCallback = _ref2.actionCallback,
306
+ actionCallback = _ref2$actionCallback === void 0 ? function () {
307
+ return null;
308
+ } : _ref2$actionCallback,
309
+ _ref2$value = _ref2.value,
310
+ value = _ref2$value === void 0 ? '' : _ref2$value,
311
+ _ref2$innerText = _ref2.innerText,
312
+ innerText = _ref2$innerText === void 0 ? '' : _ref2$innerText,
313
+ _ref2$checked = _ref2.checked,
314
+ checked = _ref2$checked === void 0 ? false : _ref2$checked;
315
+ return /*#__PURE__*/React.createElement(RadioButtonLabel, {
316
+ key: "".concat(name, "-").concat(index),
317
+ htmlFor: "".concat(name, "_").concat(index)
318
+ }, /*#__PURE__*/React.createElement(RadioButtonInput, {
319
+ id: "".concat(name, "_").concat(index),
320
+ type: "radio",
321
+ name: name,
322
+ defaultChecked: checked,
323
+ onChange: function onChange() {
324
+ setErrMsg('');
325
+ actionCallback(name, value);
326
+ },
327
+ value: value
328
+ }), /*#__PURE__*/React.createElement(RadioButtonCircle, null, /*#__PURE__*/React.createElement(RadioButtonCircleInner, null)), /*#__PURE__*/React.createElement(RadioButtonText, null, innerText));
329
+ }))), errMsg && /*#__PURE__*/React.createElement(ErrorMessage, null, errMsg));
330
+ };
331
+
332
+ RadioButtons.defaultProps = {
333
+ noWrap: false,
334
+ title: '',
335
+ errors: {}
336
+ };
337
+ var RadioButtons$1 = themed(RadioButtons);
338
+
339
+ export default RadioButtons$1;
340
+ export { FormWrapper };