@stokr/components-library 2.3.65-beta.18 → 2.3.65-beta.19

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.
@@ -23,7 +23,7 @@ const StyledSubMenu = exports.StyledSubMenu = _styledComponents.default.div.with
23
23
  const StyledHeader = exports.StyledHeader = _styledComponents.default.header.withConfig({
24
24
  displayName: "Headerstyles__StyledHeader",
25
25
  componentId: "sc-hifrdy-1"
26
- })(["z-index:1000;position:relative;color:", ";border-bottom:1px solid rgb(237,237,237);", ""], _colors.default.black, _rwd.default.MLarge(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: ", "px;\n background-color: ", ";\n box-shadow: inset 0 -1px 0 0 ", ";\n\n ", "\n "])), _spacing.default.headerHeight, _colors.default.white, _colors.default.lightGrey, props => props.noFixedPosition && "\n position:initial;\n "));
26
+ })(["z-index:1000;position:relative;color:", ";border-bottom:1px solid rgb(237,237,237);", ""], _colors.default.black, _rwd.default.MLarge(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: ", "px;\n background-color: ", ";\n box-shadow: inset 0 -1px 0 0 ", ";\n\n /* Compensate for scrollbar when modal is open */\n padding-right: var(--scrollbar-compensation, 0px);\n\n ", "\n "])), _spacing.default.headerHeight, _colors.default.white, _colors.default.lightGrey, props => props.noFixedPosition && "\n position:initial;\n "));
27
27
  const HeaderInner = exports.HeaderInner = _styledComponents.default.div.withConfig({
28
28
  displayName: "Headerstyles__HeaderInner",
29
29
  componentId: "sc-hifrdy-2"
@@ -85,16 +85,39 @@ const Modal = _ref => {
85
85
  } = _ref;
86
86
  (0, _react.useEffect)(() => {
87
87
  if (isOpen) {
88
- // Calculate scrollbar width before hiding it
88
+ // Store current scroll position and body width BEFORE any changes
89
+ const scrollY = window.scrollY;
90
+ const bodyWidth = document.body.offsetWidth;
91
+
92
+ // Calculate scrollbar width
89
93
  const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
90
94
 
91
- // Add padding to compensate for removed scrollbar (prevents layout shift)
92
- document.body.style.paddingRight = "".concat(scrollbarWidth, "px");
95
+ // Set CSS variable for fixed elements (like header) to compensate
96
+ document.documentElement.style.setProperty('--scrollbar-compensation', "".concat(scrollbarWidth, "px"));
97
+
98
+ // Lock the body width to prevent any recalculation
99
+ document.body.style.width = "".concat(bodyWidth, "px");
100
+ document.body.style.position = 'fixed';
101
+ document.body.style.top = "-".concat(scrollY, "px");
102
+ document.body.style.left = '0';
93
103
  document.body.style.overflow = 'hidden';
94
104
  }
95
105
  return () => {
96
- document.body.style.paddingRight = '';
97
- document.body.style.overflow = '';
106
+ if (isOpen) {
107
+ // Get scroll position from body's top offset
108
+ const scrollY = Math.abs(parseInt(document.body.style.top || '0', 10));
109
+
110
+ // Reset all styles
111
+ document.documentElement.style.setProperty('--scrollbar-compensation', '0px');
112
+ document.body.style.width = '';
113
+ document.body.style.position = '';
114
+ document.body.style.top = '';
115
+ document.body.style.left = '';
116
+ document.body.style.overflow = '';
117
+
118
+ // Restore scroll position
119
+ window.scrollTo(0, scrollY);
120
+ }
98
121
  };
99
122
  }, [isOpen]);
100
123
  return /*#__PURE__*/_react.default.createElement(_reactPortal.Portal, {
@@ -18,7 +18,7 @@ const AnimationContainer = exports.AnimationContainer = _styledComponents.defaul
18
18
  const Title = exports.Title = _styledComponents.default.h2.withConfig({
19
19
  displayName: "SuccessModalstyles__Title",
20
20
  componentId: "sc-8cspgo-2"
21
- })(["margin:0 0 16px 0;font-size:22px;font-weight:800;color:", ";text-transform:uppercase;letter-spacing:0.8px;line-height:28px;flex-shrink:0;"], _colors.default.black);
21
+ })(["margin:0 0 16px 0;font-size:22px;font-weight:800;color:", ";text-transform:uppercase;letter-spacing:0.8px;line-height:28px;flex-shrink:0;font-family:'Open Sans';"], _colors.default.black);
22
22
  const Subtitle = exports.Subtitle = _styledComponents.default.p.withConfig({
23
23
  displayName: "SuccessModalstyles__Subtitle",
24
24
  componentId: "sc-8cspgo-3"
@@ -32,6 +32,7 @@ const formatCurrencyValue = function (currency, value) {
32
32
  'bitcoin-private': ['EUR', 2],
33
33
  'lbtc-private': ['BTC', 8],
34
34
  bmn1: ['BMN1', 2],
35
+ bmn2: ['BMN2', 4],
35
36
  'btc-fb': ['BTC', 8],
36
37
  'usdc-fb': ['USDC', 2],
37
38
  'usdq-fb': ['USDQ', 2]
@@ -53,6 +54,7 @@ const getCurrencySymbol = currencySelected => ({
53
54
  'lbtc-bfx': 'LBTC',
54
55
  'btc-bfx': 'BTC',
55
56
  bmn1: 'BMN1',
57
+ bmn2: 'BMN2',
56
58
  'btc-fb': 'BTC',
57
59
  'usdc-fb': 'USDC',
58
60
  'usdq-fb': 'USDQ'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokr/components-library",
3
- "version": "2.3.65-beta.18",
3
+ "version": "2.3.65-beta.19",
4
4
  "description": "STOKR - Components Library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",