@gem-sdk/pages 1.23.0-staging.186 → 1.23.0-staging.196

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.
@@ -54,6 +54,15 @@ const Toolbar = ()=>{
54
54
  $toolbar.setAttribute(`data-toolbar-${state}-overflow`, 'true');
55
55
  }
56
56
  }
57
+ // fix Popup overflow right position
58
+ const popupEl = $component?.closest('[aria-label="Dialog body"]');
59
+ if (popupEl) {
60
+ const rectPopupEl = popupEl.getBoundingClientRect();
61
+ const popupElRightPosition = rectPopupEl.left + rectPopupEl.width - 20;
62
+ if (rectComponent.left + rect.width > popupElRightPosition) {
63
+ $toolbar.setAttribute(`data-toolbar-${state}-overflow`, 'true');
64
+ }
65
+ }
57
66
  };
58
67
  const setHoverComponent = react.useCallback(({ $component, componentUid, focus, isThemeSection, isParent })=>{
59
68
  if (!$component && !componentUid) return;
@@ -50,6 +50,15 @@ const Toolbar = ()=>{
50
50
  $toolbar.setAttribute(`data-toolbar-${state}-overflow`, 'true');
51
51
  }
52
52
  }
53
+ // fix Popup overflow right position
54
+ const popupEl = $component?.closest('[aria-label="Dialog body"]');
55
+ if (popupEl) {
56
+ const rectPopupEl = popupEl.getBoundingClientRect();
57
+ const popupElRightPosition = rectPopupEl.left + rectPopupEl.width - 20;
58
+ if (rectComponent.left + rect.width > popupElRightPosition) {
59
+ $toolbar.setAttribute(`data-toolbar-${state}-overflow`, 'true');
60
+ }
61
+ }
53
62
  };
54
63
  const setHoverComponent = useCallback(({ $component, componentUid, focus, isThemeSection, isParent })=>{
55
64
  if (!$component && !componentUid) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/pages",
3
- "version": "1.23.0-staging.186",
3
+ "version": "1.23.0-staging.196",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -25,7 +25,7 @@
25
25
  "next-seo": "^6.0.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@gem-sdk/core": "1.23.0-staging.173",
28
+ "@gem-sdk/core": "1.23.0-staging.195",
29
29
  "@gem-sdk/plugin-cookie-bar": "1.23.0-staging.26",
30
30
  "@gem-sdk/plugin-quick-view": "1.23.0-staging.26",
31
31
  "@gem-sdk/plugin-sticky-add-to-cart": "1.23.0-staging.26"