@stokr/components-library 2.3.65-beta.21 → 2.3.65-beta.23
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/2FA/main-flow.js +3 -0
- package/dist/components/Footer/FooterLayout.js +13 -4
- package/dist/components/Footer/FooterMenu.js +19 -3
- package/dist/components/Footer/FooterMenu.styles.js +14 -2
- package/dist/components/Modal/SideModal.js +44 -2
- package/dist/components/Payment/PaymentDetailsCard.js +1 -1
- package/dist/utils/formatCurrencyValue.js +4 -2
- package/package.json +1 -1
|
@@ -80,6 +80,9 @@ const Main2FAFlow = _ref => {
|
|
|
80
80
|
} catch (error) {
|
|
81
81
|
if (error.code === 'auth/requires-recent-login' || error.code === 'auth/unsupported-first-factor') {
|
|
82
82
|
setisLoginRequired(true);
|
|
83
|
+
if (isFlowopen.enable2fa && !isFlowopen.requiresRecentLogin) {
|
|
84
|
+
onRequiresRecentLoginErrorHandler();
|
|
85
|
+
}
|
|
83
86
|
}
|
|
84
87
|
}
|
|
85
88
|
};
|
|
@@ -10,7 +10,7 @@ var _FooterMenu = _interopRequireDefault(require("./FooterMenu"));
|
|
|
10
10
|
var _Newsletter = _interopRequireDefault(require("../Newsletter/Newsletter"));
|
|
11
11
|
var _Footer = _interopRequireDefault(require("./Footer"));
|
|
12
12
|
var _globalVariables = require("../../constants/globalVariables");
|
|
13
|
-
const _excluded = ["withNewsLetter", "withFooterMenu", "color", "jobOpeningsNumber", "lemonWayLogo", "dropdownCollapsed"];
|
|
13
|
+
const _excluded = ["withNewsLetter", "withFooterMenu", "color", "jobOpeningsNumber", "lemonWayLogo", "dropdownCollapsed", "footnotes", "footnotesTitle"];
|
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
15
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
16
16
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
@@ -22,13 +22,17 @@ function FooterLayout(_ref) {
|
|
|
22
22
|
color = 'red',
|
|
23
23
|
jobOpeningsNumber = 0,
|
|
24
24
|
lemonWayLogo,
|
|
25
|
-
dropdownCollapsed
|
|
25
|
+
dropdownCollapsed,
|
|
26
|
+
footnotes,
|
|
27
|
+
footnotesTitle
|
|
26
28
|
} = _ref,
|
|
27
29
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
28
30
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, withFooterMenu && /*#__PURE__*/_react.default.createElement(_FooterMenu.default, {
|
|
29
31
|
groups: footerGroups,
|
|
30
32
|
jobOpeningsNumber: jobOpeningsNumber,
|
|
31
|
-
dropdownCollapsed: dropdownCollapsed
|
|
33
|
+
dropdownCollapsed: dropdownCollapsed,
|
|
34
|
+
footnotes: footnotes,
|
|
35
|
+
footnotesTitle: footnotesTitle
|
|
32
36
|
}), withNewsLetter && /*#__PURE__*/_react.default.createElement(_Newsletter.default, null), /*#__PURE__*/_react.default.createElement(_Footer.default, _extends({
|
|
33
37
|
color: color,
|
|
34
38
|
lemonwayLogo: lemonWayLogo
|
|
@@ -40,7 +44,12 @@ FooterLayout.propTypes = {
|
|
|
40
44
|
color: _propTypes.default.oneOf(['primary', 'red']),
|
|
41
45
|
jobOpeningsNumber: _propTypes.default.number,
|
|
42
46
|
lemonwayLogo: _propTypes.default.string,
|
|
43
|
-
dropdownCollapsed: _propTypes.default.bool
|
|
47
|
+
dropdownCollapsed: _propTypes.default.bool,
|
|
48
|
+
footnotesTitle: _propTypes.default.string,
|
|
49
|
+
footnotes: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
50
|
+
number: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
51
|
+
description: _propTypes.default.string
|
|
52
|
+
}))
|
|
44
53
|
};
|
|
45
54
|
var _default = exports.default = FooterLayout;
|
|
46
55
|
const footerGroups = exports.footerGroups = [{
|
|
@@ -78,9 +78,12 @@ const FooterMenu = _ref2 => {
|
|
|
78
78
|
let {
|
|
79
79
|
groups,
|
|
80
80
|
jobOpeningsNumber = 0,
|
|
81
|
-
dropdownCollapsed
|
|
81
|
+
dropdownCollapsed,
|
|
82
|
+
footnotes,
|
|
83
|
+
footnotesTitle = 'Disclosures'
|
|
82
84
|
} = _ref2;
|
|
83
85
|
const isMobile = (0, _customHooks.useMobileView)(_rwd.sizes.MLarge);
|
|
86
|
+
const hasFootnotes = Array.isArray(footnotes) && footnotes.length > 0;
|
|
84
87
|
|
|
85
88
|
// "New to STOKR" needs to be open by default
|
|
86
89
|
const [activeGroups, setactiveGroups] = _react.default.useState(() => {
|
|
@@ -137,10 +140,23 @@ const FooterMenu = _ref2 => {
|
|
|
137
140
|
style: {
|
|
138
141
|
marginLeft: '4px'
|
|
139
142
|
}
|
|
140
|
-
}, jobOpeningsNumber))))))))))
|
|
143
|
+
}, jobOpeningsNumber))))))))), hasFootnotes && /*#__PURE__*/_react.default.createElement(_FooterMenu.Footnotes, null, /*#__PURE__*/_react.default.createElement(_FooterMenu.FootnotesText, null, footnotesTitle), footnotes.map((note, index) => {
|
|
144
|
+
var _note$number;
|
|
145
|
+
return /*#__PURE__*/_react.default.createElement(_FooterMenu.FootnotesItem, {
|
|
146
|
+
key: "".concat(note.number || index, "-").concat(note.description || 'note')
|
|
147
|
+
}, /*#__PURE__*/_react.default.createElement(_FooterMenu.FootnotesText, {
|
|
148
|
+
isNumber: true
|
|
149
|
+
}, (_note$number = note.number) !== null && _note$number !== void 0 ? _note$number : index + 1), /*#__PURE__*/_react.default.createElement(_FooterMenu.FootnotesText, null, note.description));
|
|
150
|
+
})));
|
|
141
151
|
};
|
|
142
152
|
FooterMenu.propTypes = {
|
|
143
153
|
groups: _propTypes.default.arrayOf(Object).isRequired,
|
|
144
|
-
jobOpeningsNumber: _propTypes.default.number
|
|
154
|
+
jobOpeningsNumber: _propTypes.default.number,
|
|
155
|
+
dropdownCollapsed: _propTypes.default.bool,
|
|
156
|
+
footnotesTitle: _propTypes.default.string,
|
|
157
|
+
footnotes: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
158
|
+
number: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
159
|
+
description: _propTypes.default.string
|
|
160
|
+
}))
|
|
145
161
|
};
|
|
146
162
|
var _default = exports.default = FooterMenu;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TitleContainer = exports.Title = exports.SocialLink = exports.Link = exports.Items = exports.Item = exports.HiringTotalNumber = exports.Groups = exports.Group = exports.Container = exports.ArrowDown = void 0;
|
|
6
|
+
exports.TitleContainer = exports.Title = exports.SocialLink = exports.Link = exports.Items = exports.Item = exports.HiringTotalNumber = exports.Groups = exports.Group = exports.FootnotesText = exports.FootnotesItem = exports.Footnotes = exports.Container = exports.ArrowDown = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
8
|
var _colors = _interopRequireDefault(require("../../styles/colors"));
|
|
9
9
|
var _rwd = _interopRequireDefault(require("../../styles/rwd"));
|
|
@@ -54,4 +54,16 @@ const ArrowDown = exports.ArrowDown = _styledComponents.default.i.attrs({
|
|
|
54
54
|
}).withConfig({
|
|
55
55
|
displayName: "FooterMenustyles__ArrowDown",
|
|
56
56
|
componentId: "sc-40ddqf-10"
|
|
57
|
-
})(["&&&{top:50%;right:0;transition:0.3s transform;transform:rotate(0);text-align:center;font-size:16px;line-height:16px;height:16px;margin-top:-8px;", "}", ""], props => props.isOpened && "\n transform: rotate(180deg);\n ", props => !props.displayAlways && "\n @media screen and (min-width: 992px) {\n display: none;\n }\n ");
|
|
57
|
+
})(["&&&{top:50%;right:0;transition:0.3s transform;transform:rotate(0);text-align:center;font-size:16px;line-height:16px;height:16px;margin-top:-8px;", "}", ""], props => props.isOpened && "\n transform: rotate(180deg);\n ", props => !props.displayAlways && "\n @media screen and (min-width: 992px) {\n display: none;\n }\n ");
|
|
58
|
+
const Footnotes = exports.Footnotes = _styledComponents.default.div.withConfig({
|
|
59
|
+
displayName: "FooterMenustyles__Footnotes",
|
|
60
|
+
componentId: "sc-40ddqf-11"
|
|
61
|
+
})(["padding:0px 48px 40px;display:flex;flex-direction:column;gap:6px;@media screen and (min-width:992px){padding:0px 65px 48px;}"]);
|
|
62
|
+
const FootnotesText = exports.FootnotesText = _styledComponents.default.div.withConfig({
|
|
63
|
+
displayName: "FooterMenustyles__FootnotesText",
|
|
64
|
+
componentId: "sc-40ddqf-12"
|
|
65
|
+
})(["font-family:'Open Sans';font-weight:300;font-size:11px;line-height:16px;letter-spacing:0.4px;color:", ";", ""], _theme.default.cBlack, props => props.isNumber && "\n font-size: 9px;\n\n ");
|
|
66
|
+
const FootnotesItem = exports.FootnotesItem = _styledComponents.default.div.withConfig({
|
|
67
|
+
displayName: "FooterMenustyles__FootnotesItem",
|
|
68
|
+
componentId: "sc-40ddqf-13"
|
|
69
|
+
})(["display:flex;gap:6px;"]);
|
|
@@ -30,15 +30,57 @@ const SideModal = _ref => {
|
|
|
30
30
|
(0, _react.useEffect)(() => {
|
|
31
31
|
// Disable scroll on background when modal is open
|
|
32
32
|
if (isOpen) {
|
|
33
|
+
// Calculate scrollbar width before hiding it
|
|
34
|
+
const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
|
|
35
|
+
|
|
36
|
+
// Store current scroll position
|
|
37
|
+
const scrollY = window.scrollY;
|
|
38
|
+
|
|
39
|
+
// Apply styles to prevent layout shift
|
|
40
|
+
document.body.style.position = 'fixed';
|
|
41
|
+
document.body.style.top = "-".concat(scrollY, "px");
|
|
42
|
+
document.body.style.left = '0';
|
|
43
|
+
document.body.style.right = '0';
|
|
33
44
|
document.body.style.overflow = 'hidden';
|
|
45
|
+
document.body.style.paddingRight = "".concat(scrollbarWidth, "px");
|
|
46
|
+
|
|
47
|
+
// Set CSS variable for fixed elements (like headers)
|
|
48
|
+
document.documentElement.style.setProperty('--scrollbar-compensation', "".concat(scrollbarWidth, "px"));
|
|
49
|
+
|
|
50
|
+
// Store scroll position for restoration
|
|
51
|
+
document.body.dataset.scrollY = scrollY;
|
|
52
|
+
|
|
34
53
|
// Small delay to trigger animation
|
|
35
54
|
setTimeout(() => setIsVisible(true), 10);
|
|
36
55
|
} else {
|
|
37
|
-
|
|
56
|
+
// Restore scroll position
|
|
57
|
+
const scrollY = document.body.dataset.scrollY || '0';
|
|
58
|
+
|
|
59
|
+
// Reset all body styles
|
|
60
|
+
document.body.style.position = '';
|
|
61
|
+
document.body.style.top = '';
|
|
62
|
+
document.body.style.left = '';
|
|
63
|
+
document.body.style.right = '';
|
|
64
|
+
document.body.style.overflow = '';
|
|
65
|
+
document.body.style.paddingRight = '';
|
|
66
|
+
|
|
67
|
+
// Reset CSS variable
|
|
68
|
+
document.documentElement.style.setProperty('--scrollbar-compensation', '0px');
|
|
69
|
+
|
|
70
|
+
// Restore scroll position
|
|
71
|
+
window.scrollTo(0, parseInt(scrollY));
|
|
38
72
|
setIsVisible(false);
|
|
39
73
|
}
|
|
40
74
|
return () => {
|
|
41
|
-
document.body.
|
|
75
|
+
const scrollY = document.body.dataset.scrollY || '0';
|
|
76
|
+
document.body.style.position = '';
|
|
77
|
+
document.body.style.top = '';
|
|
78
|
+
document.body.style.left = '';
|
|
79
|
+
document.body.style.right = '';
|
|
80
|
+
document.body.style.overflow = '';
|
|
81
|
+
document.body.style.paddingRight = '';
|
|
82
|
+
document.documentElement.style.setProperty('--scrollbar-compensation', '0px');
|
|
83
|
+
window.scrollTo(0, parseInt(scrollY));
|
|
42
84
|
};
|
|
43
85
|
}, [isOpen]);
|
|
44
86
|
|
|
@@ -159,7 +159,7 @@ const PaymentDetailsCard = _ref2 => {
|
|
|
159
159
|
}
|
|
160
160
|
return /*#__PURE__*/_react.default.createElement(CurrencyLogo, {
|
|
161
161
|
color: logoColor
|
|
162
|
-
}, currency ? currency.charAt(0).toUpperCase() : '
|
|
162
|
+
}, currency ? currency.charAt(0).toUpperCase() : '');
|
|
163
163
|
};
|
|
164
164
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(AmountSection, null, /*#__PURE__*/_react.default.createElement(AmountLabel, null, label), /*#__PURE__*/_react.default.createElement(AmountDisplay, null, renderCurrencyLogo(), /*#__PURE__*/_react.default.createElement(AmountValue, null, displayAmount))), showSeparators && /*#__PURE__*/_react.default.createElement(Separator, null));
|
|
165
165
|
};
|
|
@@ -35,7 +35,8 @@ const formatCurrencyValue = function (currency, value) {
|
|
|
35
35
|
bmn2: ['BMN2', 4],
|
|
36
36
|
'btc-fb': ['BTC', 8],
|
|
37
37
|
'usdc-fb': ['USDC', 2],
|
|
38
|
-
'usdq-fb': ['USDQ', 2]
|
|
38
|
+
'usdq-fb': ['USDQ', 2],
|
|
39
|
+
"xaut": ["XAUt", 6]
|
|
39
40
|
}[currency] || [currency, tokenDecimals];
|
|
40
41
|
const formattedValue = parseFloat(Math.abs(value)).toFixed(decimals);
|
|
41
42
|
return valueFirst ? "".concat(formattedValue, " ").concat(symbol) : "".concat(symbol, " ").concat(formattedValue);
|
|
@@ -57,7 +58,8 @@ const getCurrencySymbol = currencySelected => ({
|
|
|
57
58
|
bmn2: 'BMN2',
|
|
58
59
|
'btc-fb': 'BTC',
|
|
59
60
|
'usdc-fb': 'USDC',
|
|
60
|
-
'usdq-fb': 'USDQ'
|
|
61
|
+
'usdq-fb': 'USDQ',
|
|
62
|
+
'xaut': 'XAUt'
|
|
61
63
|
})[currencySelected] || currencySelected;
|
|
62
64
|
exports.getCurrencySymbol = getCurrencySymbol;
|
|
63
65
|
const getProjectCurrencySign = tokenCurrency => {
|