@stokr/components-library 2.3.6-beta.3 → 2.3.6-beta.5
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/dist/components/Button/Button-stoDetails.js +230 -0
- package/dist/components/FAQ/FAQ.js +14 -3
- package/dist/components/FAQ/FAQ.styles.js +22 -3
- package/dist/components/Grid/Grid.styles.js +25 -5
- package/dist/components/ROI/ROIParkingo.js +356 -0
- package/dist/components/ROI/ROIPixelmatic.js +356 -0
- package/dist/components/StokrLoader/StokrLoader.js +9 -3
- package/dist/components/logo/Logo.js +89 -0
- package/dist/components/logo/index.js +27 -0
- package/dist/index.js +22 -0
- package/dist/styles/colors.js +2 -1
- package/dist/styles/theme.js +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.Button = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
10
|
+
var _ui = require("components/ui");
|
|
11
|
+
var sc = _interopRequireWildcard(require("constants/style"));
|
|
12
|
+
var _utils = require("utils");
|
|
13
|
+
var _excluded = ["children", "text", "onClick", "size", "isShare"];
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
18
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
20
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
21
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
22
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
23
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
24
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
25
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
26
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
27
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
28
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
29
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
30
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
31
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
32
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
33
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /* */
|
|
34
|
+
var buttonTextLoadingCss = (0, _styledComponents.css)(["visibility:hidden;"]);
|
|
35
|
+
var buttonTextHelper = function buttonTextHelper(_ref) {
|
|
36
|
+
var loading = _ref.loading;
|
|
37
|
+
return loading && buttonTextLoadingCss;
|
|
38
|
+
};
|
|
39
|
+
var ButtonText = _styledComponents.default.span.withConfig({
|
|
40
|
+
displayName: "Button-stoDetails__ButtonText",
|
|
41
|
+
componentId: "sc-1pstwqz-0"
|
|
42
|
+
})(["line-height:", ";margin:0 auto;", ";svg,path{fill:", ";&:hover{fill:", ";}}"], function (_ref2) {
|
|
43
|
+
var isShare = _ref2.isShare;
|
|
44
|
+
return isShare ? '0px' : '1em';
|
|
45
|
+
}, buttonTextHelper, function (_ref3) {
|
|
46
|
+
var isShare = _ref3.isShare;
|
|
47
|
+
return isShare && '#cacaca';
|
|
48
|
+
}, function (_ref4) {
|
|
49
|
+
var isShare = _ref4.isShare;
|
|
50
|
+
return isShare && sc.RED_BASE_HEX;
|
|
51
|
+
});
|
|
52
|
+
var StyledLoading = _styledComponents.default.div.withConfig({
|
|
53
|
+
displayName: "Button-stoDetails__StyledLoading",
|
|
54
|
+
componentId: "sc-1pstwqz-1"
|
|
55
|
+
})(["position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);"]);
|
|
56
|
+
|
|
57
|
+
// const ButtonComponent = ({ as, ...rest }) =>
|
|
58
|
+
// React.createElement(as, { ...rest })
|
|
59
|
+
|
|
60
|
+
var ButtonComponent = _styledComponents.default.button.withConfig({
|
|
61
|
+
displayName: "Button-stoDetails__ButtonComponent",
|
|
62
|
+
componentId: "sc-1pstwqz-2"
|
|
63
|
+
})([""]);
|
|
64
|
+
var ButtonClass = /*#__PURE__*/function (_PureComponent) {
|
|
65
|
+
_inherits(ButtonClass, _PureComponent);
|
|
66
|
+
var _super = _createSuper(ButtonClass);
|
|
67
|
+
function ButtonClass() {
|
|
68
|
+
var _this;
|
|
69
|
+
_classCallCheck(this, ButtonClass);
|
|
70
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
71
|
+
args[_key] = arguments[_key];
|
|
72
|
+
}
|
|
73
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
74
|
+
_defineProperty(_assertThisInitialized(_this), "handleClick", function (e) {
|
|
75
|
+
var _this$props = _this.props,
|
|
76
|
+
disabled = _this$props.disabled,
|
|
77
|
+
onClick = _this$props.onClick;
|
|
78
|
+
return !disabled && onClick && onClick(e);
|
|
79
|
+
});
|
|
80
|
+
return _this;
|
|
81
|
+
}
|
|
82
|
+
_createClass(ButtonClass, [{
|
|
83
|
+
key: "render",
|
|
84
|
+
value: function render() {
|
|
85
|
+
var _this$props2 = this.props,
|
|
86
|
+
children = _this$props2.children,
|
|
87
|
+
text = _this$props2.text,
|
|
88
|
+
onClick = _this$props2.onClick,
|
|
89
|
+
size = _this$props2.size,
|
|
90
|
+
isShare = _this$props2.isShare,
|
|
91
|
+
rest = _objectWithoutProperties(_this$props2, _excluded);
|
|
92
|
+
var loading = this.props.loading;
|
|
93
|
+
return /*#__PURE__*/_react.default.createElement(ButtonComponent, _extends({}, rest, {
|
|
94
|
+
onClick: this.handleClick
|
|
95
|
+
}), /*#__PURE__*/_react.default.createElement(ButtonText, {
|
|
96
|
+
isShare: isShare,
|
|
97
|
+
loading: loading
|
|
98
|
+
}, children || text), loading && /*#__PURE__*/_react.default.createElement(StyledLoading, null, /*#__PURE__*/_react.default.createElement(_ui.Loading, {
|
|
99
|
+
size: size === 'xl' && 40
|
|
100
|
+
})));
|
|
101
|
+
}
|
|
102
|
+
}]);
|
|
103
|
+
return ButtonClass;
|
|
104
|
+
}(_react.PureComponent);
|
|
105
|
+
_defineProperty(ButtonClass, "propTypes", {
|
|
106
|
+
children: _propTypes.default.node,
|
|
107
|
+
as: _propTypes.default.node,
|
|
108
|
+
transparent: _propTypes.default.bool,
|
|
109
|
+
noborder: _propTypes.default.bool,
|
|
110
|
+
icononly: _propTypes.default.bool,
|
|
111
|
+
inverted: _propTypes.default.bool,
|
|
112
|
+
isShare: _propTypes.default.bool,
|
|
113
|
+
inactive: _propTypes.default.bool
|
|
114
|
+
});
|
|
115
|
+
_defineProperty(ButtonClass, "defaultProps", {
|
|
116
|
+
as: 'button',
|
|
117
|
+
transparent: false
|
|
118
|
+
});
|
|
119
|
+
var baseButtonCss = (0, _styledComponents.css)(["transition:all 0.3s;display:inline-flex;align-items:center;justify-content:center;position:relative;border-radius:25px;font-size:11px;font-weight:bold;letter-spacing:2px;text-transform:uppercase;outline:none;cursor:pointer;white-space:nowrap;border:0;&:hover,&:active{opacity:1;}"]);
|
|
120
|
+
var blockButtonCss = (0, _styledComponents.css)([""]);
|
|
121
|
+
var importantButtonCss = (0, _styledComponents.css)([""]);
|
|
122
|
+
var beautyButtonCss = (0, _styledComponents.css)(["&&,&&:hover{width:auto !important;height:40px !important;padding-left:", "px;padding-right:", "px;box-shadow:0 6px 15px 2px #00000027,0px -5px 30px 2px rgba(255,255,255,0.2);background-color:", ";color:", ";margin:5px;z-index:100;transition:all 0.4s ease-out;", "{padding-left:", "px;padding-right:", "px;}}"], sc.BASE_MARGIN * 4, sc.BASE_MARGIN * 4, sc.WHITE_HEX, sc.BASE_COLOR_HEX, _utils.breakpoint.below('mobile'), sc.BASE_MARGIN * 2, sc.BASE_MARGIN * 2);
|
|
123
|
+
var disabledBeautyButtonCss = (0, _styledComponents.css)(["&&,&&:hover{padding-left:", "px;padding-right:", "px;background-color:", ";color:#4a90e2;margin:5px;z-index:100;border:none;cursor:not-allowed;transition:all 0.4s ease-out;&&:before{content:'';position:absolute;height:calc(100% + 10px);width:calc(100% + 10px);left:-5px;top:-5px;z-index:-2;border-radius:25px;border:1px solid #4a90e2;}", "{padding-left:", "px;padding-right:", "px;}}"], sc.BASE_MARGIN * 4, sc.BASE_MARGIN * 4, sc.BLUE_BASE_HEX, _utils.breakpoint.below('mobile'), sc.BASE_MARGIN * 2, sc.BASE_MARGIN * 2);
|
|
124
|
+
var disabledButtonCss = (0, _styledComponents.css)(["&&&&{background:transparent;color:#e1e1e1;border:1px solid #e1e1e1;cursor:not-allowed;}"]);
|
|
125
|
+
var transparentButtonCss = (0, _styledComponents.css)(["&&&&{background:transparent;border:1px solid ", ";color:", ";&:hover{background:", ";color:#fff;}}"], sc.BLUE_BASE_HEX, sc.BLUE_BASE_HEX, sc.BLUE_BASE_HEX);
|
|
126
|
+
var textOnlyButtonCss = (0, _styledComponents.css)(["&&&&{background:transparent;border:none;color:", ";}"], sc.BASE_COLOR_HEX);
|
|
127
|
+
var invertedButtonCss = (0, _styledComponents.css)([""]);
|
|
128
|
+
var xlSize = (0, _styledComponents.css)(["height:40px;padding-left:", "px;padding-right:", "px;width:100%;font-size:11px;"], sc.BASE_MARGIN * 2, sc.BASE_MARGIN * 2);
|
|
129
|
+
var mdSize = (0, _styledComponents.css)(["height:40px;padding-left:", "px;padding-right:", "px;width:192px;font-size:11px;"], sc.BASE_MARGIN * 2, sc.BASE_MARGIN * 2);
|
|
130
|
+
var smSize = (0, _styledComponents.css)(["height:32px;width:32px;"]);
|
|
131
|
+
var noborderCss = (0, _styledComponents.css)(["&&&&{border:0;}"]);
|
|
132
|
+
var inactiveCss = (0, _styledComponents.css)(["opacity:0.3;cursor:initial;&:hover{opacity:0.3;}"]);
|
|
133
|
+
var isHeroCss = (0, _styledComponents.css)(["width:222px;"]);
|
|
134
|
+
var isLoginMobileCss = (0, _styledComponents.css)(["margin-bottom:20px;width:163.94px;"]);
|
|
135
|
+
var isInvisibleCss = (0, _styledComponents.css)(["opacity:0;cursor:unset;&:hover{opacity:0;}"]);
|
|
136
|
+
var activeTransparentCss = (0, _styledComponents.css)(["background:", ";color:white;"], sc.RED_BASE_HEX);
|
|
137
|
+
var activeHelper = function activeHelper(_ref5) {
|
|
138
|
+
var active = _ref5.active;
|
|
139
|
+
return active && activeTransparentCss;
|
|
140
|
+
};
|
|
141
|
+
var buttonColor = function buttonColor(_ref6) {
|
|
142
|
+
var color = _ref6.color,
|
|
143
|
+
inverted = _ref6.inverted;
|
|
144
|
+
switch (color) {
|
|
145
|
+
case 'transparent':
|
|
146
|
+
return (0, _styledComponents.css)(["background:transparent;border:1px solid ", ";", ";&:hover{", ";}", ";"], sc.GRAY_BASE_HEX, activeHelper, activeTransparentCss, inverted && (0, _styledComponents.css)(["border:1px solid ", ";"], sc.WHITE_HEX));
|
|
147
|
+
case 'white':
|
|
148
|
+
return (0, _styledComponents.css)(["background:white;color:", ";"], sc.BLUE_BASE_HEX);
|
|
149
|
+
case 'blue':
|
|
150
|
+
default:
|
|
151
|
+
return (0, _styledComponents.css)(["background:", ";color:white;&:hover{background:", ";}"], sc.BLUE_BASE_HEX, sc.BLUE_BASE_RELEASED_HEX);
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
var nobordersButtonHelper = function nobordersButtonHelper(_ref7) {
|
|
155
|
+
var noborder = _ref7.noborder;
|
|
156
|
+
return noborder && noborderCss;
|
|
157
|
+
};
|
|
158
|
+
var buttonSize = function buttonSize(_ref8) {
|
|
159
|
+
var size = _ref8.size,
|
|
160
|
+
icononly = _ref8.icononly;
|
|
161
|
+
switch (size) {
|
|
162
|
+
case 'xl':
|
|
163
|
+
return xlSize;
|
|
164
|
+
case 'sm':
|
|
165
|
+
return smSize;
|
|
166
|
+
case 'md':
|
|
167
|
+
return mdSize;
|
|
168
|
+
default:
|
|
169
|
+
return (0, _styledComponents.css)(["height:40px;padding-left:", "px;padding-right:", "px;", ";"], sc.BASE_MARGIN * 2, sc.BASE_MARGIN * 2, icononly && (0, _styledComponents.css)(["margin:0 auto;width:40px;line-height:0;text-align:center;padding:0;"]));
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
var buttonBlock = function buttonBlock(_ref9) {
|
|
173
|
+
var block = _ref9.block;
|
|
174
|
+
return block && blockButtonCss;
|
|
175
|
+
};
|
|
176
|
+
var importantButton = function importantButton(_ref10) {
|
|
177
|
+
var important = _ref10.important;
|
|
178
|
+
return important && importantButtonCss;
|
|
179
|
+
};
|
|
180
|
+
var beautyButton = function beautyButton(_ref11) {
|
|
181
|
+
var beauty = _ref11.beauty;
|
|
182
|
+
return beauty && beautyButtonCss;
|
|
183
|
+
};
|
|
184
|
+
var disabledBeautyButton = function disabledBeautyButton(_ref12) {
|
|
185
|
+
var disabledBeauty = _ref12.disabledBeauty;
|
|
186
|
+
return disabledBeauty && disabledBeautyButtonCss;
|
|
187
|
+
};
|
|
188
|
+
var disabledButton = function disabledButton(_ref13) {
|
|
189
|
+
var disabled = _ref13.disabled;
|
|
190
|
+
return disabled && disabledButtonCss;
|
|
191
|
+
};
|
|
192
|
+
var transparentButton = function transparentButton(_ref14) {
|
|
193
|
+
var transparent = _ref14.transparent;
|
|
194
|
+
return transparent && transparentButtonCss;
|
|
195
|
+
};
|
|
196
|
+
var textOnlyButton = function textOnlyButton(_ref15) {
|
|
197
|
+
var textOnly = _ref15.textOnly;
|
|
198
|
+
return textOnly && textOnlyButtonCss;
|
|
199
|
+
};
|
|
200
|
+
var invertedButton = function invertedButton(_ref16) {
|
|
201
|
+
var inverted = _ref16.inverted;
|
|
202
|
+
return inverted && invertedButtonCss;
|
|
203
|
+
};
|
|
204
|
+
var inativeButton = function inativeButton(_ref17) {
|
|
205
|
+
var inactive = _ref17.inactive;
|
|
206
|
+
return inactive && inactiveCss;
|
|
207
|
+
};
|
|
208
|
+
var isHeroButton = function isHeroButton(_ref18) {
|
|
209
|
+
var isHero = _ref18.isHero;
|
|
210
|
+
return isHero && isHeroCss;
|
|
211
|
+
};
|
|
212
|
+
var isLoginMobileButton = function isLoginMobileButton(_ref19) {
|
|
213
|
+
var isLoginMobile = _ref19.isLoginMobile;
|
|
214
|
+
return isLoginMobile && isLoginMobileCss;
|
|
215
|
+
};
|
|
216
|
+
var isInvisibleButton = function isInvisibleButton(_ref20) {
|
|
217
|
+
var isInvisible = _ref20.isInvisible;
|
|
218
|
+
return isInvisible && isInvisibleCss;
|
|
219
|
+
};
|
|
220
|
+
var Button = (0, _styledComponents.default)(ButtonClass).withConfig({
|
|
221
|
+
displayName: "Button-stoDetails__Button",
|
|
222
|
+
componentId: "sc-1pstwqz-3"
|
|
223
|
+
})(["", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", ""], baseButtonCss, buttonColor, buttonSize, buttonBlock, importantButton, disabledButton, transparentButton, textOnlyButton, invertedButton, nobordersButtonHelper, inativeButton, isHeroButton, isLoginMobileButton, isInvisibleButton, beautyButton, disabledBeautyButton, function (_ref21) {
|
|
224
|
+
var fillRed = _ref21.fillRed;
|
|
225
|
+
return fillRed && (0, _styledComponents.css)(["svg{fill:", ";}&:hover{svg{fill:", ";}}"], sc.RED_BASE_HEX, sc.WHITE_HEX);
|
|
226
|
+
});
|
|
227
|
+
exports.Button = Button;
|
|
228
|
+
Button.propTypes = {};
|
|
229
|
+
var _default = Button;
|
|
230
|
+
exports.default = _default;
|
|
@@ -22,7 +22,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
22
22
|
var FAQ = function FAQ(props) {
|
|
23
23
|
var items = props.items,
|
|
24
24
|
noScroll = props.noScroll,
|
|
25
|
-
scrollRef = props.scrollRef
|
|
25
|
+
scrollRef = props.scrollRef,
|
|
26
|
+
modalViewMore = props.modalViewMore,
|
|
27
|
+
withTextStyling = props.withTextStyling;
|
|
26
28
|
var _useState = (0, _react.useState)(null),
|
|
27
29
|
_useState2 = _slicedToArray(_useState, 2),
|
|
28
30
|
activeIndex = _useState2[0],
|
|
@@ -47,6 +49,12 @@ var FAQ = function FAQ(props) {
|
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
51
|
};
|
|
52
|
+
var textStyling = {
|
|
53
|
+
paddingLeft: '28px',
|
|
54
|
+
fontSize: '12px',
|
|
55
|
+
fontWeight: '300',
|
|
56
|
+
lineHeight: '16px'
|
|
57
|
+
};
|
|
50
58
|
return /*#__PURE__*/_react.default.createElement(_FAQ.FaqItems, null, items.map(function (item, index) {
|
|
51
59
|
return /*#__PURE__*/_react.default.createElement(_FAQ.FaqItem, {
|
|
52
60
|
key: item.title
|
|
@@ -54,10 +62,13 @@ var FAQ = function FAQ(props) {
|
|
|
54
62
|
isActive: activeIndex === index,
|
|
55
63
|
onClick: function onClick(e) {
|
|
56
64
|
return onTitleClick(e, index);
|
|
57
|
-
}
|
|
65
|
+
},
|
|
66
|
+
modalViewMore: modalViewMore
|
|
58
67
|
}, item.title, /*#__PURE__*/_react.default.createElement(_FAQ.FaqDropdownIcon, null)), /*#__PURE__*/_react.default.createElement(_FAQ.FaqContent, {
|
|
59
68
|
isOpened: activeIndex === index
|
|
60
|
-
}, !Array.isArray(item.content) ? /*#__PURE__*/_react.default.createElement(_FAQ.FaqText, null, item.content) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement(_Text.default,
|
|
69
|
+
}, !Array.isArray(item.content) ? /*#__PURE__*/_react.default.createElement(_FAQ.FaqText, null, item.content) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
70
|
+
style: withTextStyling ? textStyling : {}
|
|
71
|
+
}, /*#__PURE__*/_react.default.createElement("ul", null, item.content.map(function (answer) {
|
|
61
72
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
62
73
|
key: answer
|
|
63
74
|
}, answer);
|
|
@@ -16,15 +16,32 @@ exports.FaqItems = FaqItems;
|
|
|
16
16
|
var FaqItem = _styledComponents.default.div.withConfig({
|
|
17
17
|
displayName: "FAQstyles__FaqItem",
|
|
18
18
|
componentId: "sc-dtvahh-1"
|
|
19
|
-
})(["& + &{margin-top:30px;}"])
|
|
19
|
+
})(["& + &{margin-top:30px;}", " ", ""], function (props) {
|
|
20
|
+
return props.center && "\n text-align:center;\n ";
|
|
21
|
+
}, function (props) {
|
|
22
|
+
return props.customContainerStyle;
|
|
23
|
+
});
|
|
20
24
|
exports.FaqItem = FaqItem;
|
|
21
25
|
var FaqTitle = _styledComponents.default.button.withConfig({
|
|
22
26
|
displayName: "FAQstyles__FaqTitle",
|
|
23
27
|
componentId: "sc-dtvahh-2"
|
|
24
|
-
})(["display:block;width:100%;position:relative;font-family:'Open Sans';font-weight:600;font-size:16px;line-height:24px;letter-spacing:0.4px;color:", ";padding:0;margin:0;outline:0;border:none;padding-right:30px;text-align:left;transition:color 0.2s;&:hover{color:inherit;}", ""], function (props) {
|
|
28
|
+
})(["display:block;width:100%;position:relative;font-family:'Open Sans';font-weight:600;font-size:16px;line-height:24px;letter-spacing:0.4px;color:", ";padding:0;margin:0;outline:0;border:none;padding-right:30px;text-align:left;transition:color 0.2s;background:none;&:hover{color:inherit;}", " ", " ", " ", " ", " ", ""], function (props) {
|
|
25
29
|
return _theme.default.cBlack;
|
|
30
|
+
}, function (props) {
|
|
31
|
+
return props.uppercase && "\n text-transform:uppercase;\n font-weight:700;\n letter-spacing: 0.6px;\n ";
|
|
32
|
+
}, function (_ref) {
|
|
33
|
+
var white = _ref.white;
|
|
34
|
+
return white && "\n color:white;\n ";
|
|
35
|
+
}, function (_ref2) {
|
|
36
|
+
var center = _ref2.center;
|
|
37
|
+
return center && "\n text-align:center;\n ";
|
|
38
|
+
}, function (_ref3) {
|
|
39
|
+
var hideIcon = _ref3.hideIcon;
|
|
40
|
+
return hideIcon && "\n padding-right:0;\n ";
|
|
26
41
|
}, function (props) {
|
|
27
42
|
return props.isActive && "\n ".concat(FaqDropdownIcon, " {\n transform: rotate(180deg);\n }\n ");
|
|
43
|
+
}, function (props) {
|
|
44
|
+
return props.modalViewMore && "\n font-size: 12px;\n font-weight: 300;\n line-height: 16px;\n padding-left: 28px;\n cursor: pointer;\n text-decoration: underline;\n\n &:hover {\n color: initial;\n }\n ";
|
|
28
45
|
});
|
|
29
46
|
exports.FaqTitle = FaqTitle;
|
|
30
47
|
var FaqDropdownIcon = _styledComponents.default.i.attrs({
|
|
@@ -44,5 +61,7 @@ exports.FaqContent = FaqContent;
|
|
|
44
61
|
var FaqText = _styledComponents.default.div.withConfig({
|
|
45
62
|
displayName: "FAQstyles__FaqText",
|
|
46
63
|
componentId: "sc-dtvahh-5"
|
|
47
|
-
})(["padding:0;padding-top:30px;padding-bottom:10px;font-weight:300;font-size:16px;line-height:24px;letter-spacing:0.4px;"])
|
|
64
|
+
})(["padding:0;padding-top:30px;padding-bottom:10px;font-weight:300;font-size:16px;line-height:24px;letter-spacing:0.4px;", ""], function (props) {
|
|
65
|
+
return props.largeSpacing && "\n padding-bottom: 30px;\n\n ";
|
|
66
|
+
});
|
|
48
67
|
exports.FaqText = FaqText;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.Wrapper = exports.Row = exports.PageWrapper = exports.FlexContainer = exports.Column = void 0;
|
|
6
|
+
exports.Wrapper = exports.Row = exports.PageWrapper = exports.FlexGrid = exports.FlexContainer = exports.Column = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
8
|
var _grid = _interopRequireDefault(require("../../styles/grid"));
|
|
9
9
|
var _rwd = _interopRequireDefault(require("../../styles/rwd"));
|
|
@@ -22,7 +22,7 @@ exports.Wrapper = Wrapper;
|
|
|
22
22
|
var Row = _styledComponents.default.div.withConfig({
|
|
23
23
|
displayName: "Gridstyles__Row",
|
|
24
24
|
componentId: "sc-1jreazl-1"
|
|
25
|
-
})(["display:flex;flex-wrap:wrap;text-align:left;", " ", " ", " ", " ", " ", " ", ""], function (props) {
|
|
25
|
+
})(["display:flex;flex-wrap:wrap;text-align:left;", " ", " ", " ", " ", " ", " ", " ", " height:", ";"], function (props) {
|
|
26
26
|
return props.center && "\n justify-content: center;\n ";
|
|
27
27
|
}, function (props) {
|
|
28
28
|
return props.right && "\n justify-content: right;\n ";
|
|
@@ -34,23 +34,36 @@ var Row = _styledComponents.default.div.withConfig({
|
|
|
34
34
|
return props.dashboard && "\n margin: -16px;\n ";
|
|
35
35
|
}, function (props) {
|
|
36
36
|
return props.nowrap && "\n flex-wrap: nowrap;\n ";
|
|
37
|
+
}, function (props) {
|
|
38
|
+
return props.fullWidth && "\n width: 100%;\n ";
|
|
37
39
|
}, _rwd.default.MLarge(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n "])), function (props) {
|
|
38
40
|
return props.main && "\n z-index: 0;\n min-height: calc(100vh - ".concat(_spacing.default.footerHeight, "px);\n padding-top: ").concat(_spacing.default.headerHeight, "px;\n ");
|
|
39
|
-
})
|
|
41
|
+
}), function (_ref) {
|
|
42
|
+
var isConfirmModal = _ref.isConfirmModal;
|
|
43
|
+
return isConfirmModal && '400px';
|
|
44
|
+
}); // ID has padding-top as 85px instead of headerHeight (which is set to 96px)
|
|
40
45
|
exports.Row = Row;
|
|
41
46
|
var Column = _styledComponents.default.div.withConfig({
|
|
42
47
|
displayName: "Gridstyles__Column",
|
|
43
48
|
componentId: "sc-1jreazl-2"
|
|
44
|
-
})(["display:flex;flex-direction:column;width:100%;", " ", " ", " ", " ", " ", ""], function (props) {
|
|
49
|
+
})(["display:flex;flex-direction:column;width:100%;", " ", " ", " ", " ", " ", " ", " ", " ", " ", ""], function (props) {
|
|
50
|
+
return props.halfWidth && "\n width: 50%;\n\n @media screen and (max-width: 500px) {\n width: 100%;\n }\n\n ";
|
|
51
|
+
}, function (props) {
|
|
52
|
+
return props.textAlignHopper && "\n > div:last-child {\n text-align:right;\n }\n\n @media screen and (max-width: 767px) {\n > div:last-child {\n text-align:left;\n }\n }\n\n @media screen and (max-width: 500px) {\n > div > div {\n justify-content: left;\n margin-top: 1rem;\n }\n }\n\n ";
|
|
53
|
+
}, function (props) {
|
|
45
54
|
return props.center && "\n justify-content: center;\n ";
|
|
46
55
|
}, function (props) {
|
|
47
56
|
return props.alignCenter && "\n align-items: center;\n ";
|
|
57
|
+
}, function (props) {
|
|
58
|
+
return props.alignRight && "\n text-align: right;\n align-items: center;\n ";
|
|
48
59
|
}, function (props) {
|
|
49
60
|
return props.spaceBetween && "\n justify-content: space-between;\n ";
|
|
50
61
|
}, function (props) {
|
|
51
62
|
return props.flexEnd && "\n justify-content: flex-end;\n ";
|
|
52
63
|
}, function (props) {
|
|
53
64
|
return props.mainRelative && "\n padding: 18px 0 28px;\n ";
|
|
65
|
+
}, function (props) {
|
|
66
|
+
return props.isConfirmModal && "\n justify-content: center;\n overflow: hidden;\n\n @media screen and (max-width: 767px) {\n height: 100vh;\n }\n ";
|
|
54
67
|
}, _rwd.default.Medium(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n\n ", "\n\n ", "\n\n ", "\n "])), function (props) {
|
|
55
68
|
return props.part && "\n width: ".concat((0, _grid.default)(props.part, props.full), ";\n ");
|
|
56
69
|
}, function (props) {
|
|
@@ -72,4 +85,11 @@ var FlexContainer = _styledComponents.default.div.withConfig({
|
|
|
72
85
|
})(["display:flex;", ""], function (props) {
|
|
73
86
|
return props.itemsCenter && "align-items:center;";
|
|
74
87
|
});
|
|
75
|
-
exports.FlexContainer = FlexContainer;
|
|
88
|
+
exports.FlexContainer = FlexContainer;
|
|
89
|
+
var FlexGrid = _styledComponents.default.div.withConfig({
|
|
90
|
+
displayName: "Gridstyles__FlexGrid",
|
|
91
|
+
componentId: "sc-1jreazl-5"
|
|
92
|
+
})(["display:flex;flex-wrap:wrap;", ""], function (props) {
|
|
93
|
+
return props.borderBottom && "\n border-bottom: 1px solid #e1e1e1;\n ";
|
|
94
|
+
});
|
|
95
|
+
exports.FlexGrid = FlexGrid;
|