@gem-sdk/pages 1.23.0-staging.29 → 1.23.0-staging.31
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.
|
@@ -110,18 +110,19 @@ const Toolbar = ()=>{
|
|
|
110
110
|
const $parentOverflow = findOverflowParent($component, $toolbar);
|
|
111
111
|
if ($parentOverflow) {
|
|
112
112
|
const rect = $component.getBoundingClientRect();
|
|
113
|
-
if (rect?.height
|
|
114
|
-
$toolbar.setAttribute(`data-toolbar-${state}-inside`, 'true');
|
|
115
|
-
} else {
|
|
113
|
+
if (rect?.height <= 60) {
|
|
116
114
|
$toolbar.setAttribute(`data-toolbar-${state}-revert`, 'true');
|
|
115
|
+
} else {
|
|
116
|
+
$toolbar.setAttribute(`data-toolbar-${state}-inside`, 'true');
|
|
117
117
|
}
|
|
118
118
|
} else {
|
|
119
119
|
const rect = $toolbar.getBoundingClientRect();
|
|
120
|
+
const rectComponent = $component.getBoundingClientRect();
|
|
120
121
|
if (rect.top < TOOLBAR_ACTIVE_HEIGHT + 1) {
|
|
121
|
-
if (
|
|
122
|
-
$toolbar.setAttribute(`data-toolbar-${state}-inside`, 'true');
|
|
123
|
-
} else {
|
|
122
|
+
if (rectComponent?.height <= 60) {
|
|
124
123
|
$toolbar.setAttribute(`data-toolbar-${state}-revert`, 'true');
|
|
124
|
+
} else {
|
|
125
|
+
$toolbar.setAttribute(`data-toolbar-${state}-inside`, 'true');
|
|
125
126
|
}
|
|
126
127
|
}
|
|
127
128
|
}
|
|
@@ -260,6 +261,7 @@ const Toolbar = ()=>{
|
|
|
260
261
|
'data-toolbar-hover',
|
|
261
262
|
'data-outline-hover-focus',
|
|
262
263
|
'data-toolbar-hover-revert',
|
|
264
|
+
'data-toolbar-hover-inside',
|
|
263
265
|
'data-outline-hover',
|
|
264
266
|
'data-toolbar-add-hover'
|
|
265
267
|
];
|
|
@@ -280,6 +282,7 @@ const Toolbar = ()=>{
|
|
|
280
282
|
'data-outline-active',
|
|
281
283
|
'data-toolbar-add-active',
|
|
282
284
|
'data-toolbar-active-revert',
|
|
285
|
+
'data-toolbar-active-inside',
|
|
283
286
|
'data-spacing-margin-bottom-active',
|
|
284
287
|
'data-toolbar-force-hover',
|
|
285
288
|
'data-outline-force-hover'
|
|
@@ -106,18 +106,19 @@ const Toolbar = ()=>{
|
|
|
106
106
|
const $parentOverflow = findOverflowParent($component, $toolbar);
|
|
107
107
|
if ($parentOverflow) {
|
|
108
108
|
const rect = $component.getBoundingClientRect();
|
|
109
|
-
if (rect?.height
|
|
110
|
-
$toolbar.setAttribute(`data-toolbar-${state}-inside`, 'true');
|
|
111
|
-
} else {
|
|
109
|
+
if (rect?.height <= 60) {
|
|
112
110
|
$toolbar.setAttribute(`data-toolbar-${state}-revert`, 'true');
|
|
111
|
+
} else {
|
|
112
|
+
$toolbar.setAttribute(`data-toolbar-${state}-inside`, 'true');
|
|
113
113
|
}
|
|
114
114
|
} else {
|
|
115
115
|
const rect = $toolbar.getBoundingClientRect();
|
|
116
|
+
const rectComponent = $component.getBoundingClientRect();
|
|
116
117
|
if (rect.top < TOOLBAR_ACTIVE_HEIGHT + 1) {
|
|
117
|
-
if (
|
|
118
|
-
$toolbar.setAttribute(`data-toolbar-${state}-inside`, 'true');
|
|
119
|
-
} else {
|
|
118
|
+
if (rectComponent?.height <= 60) {
|
|
120
119
|
$toolbar.setAttribute(`data-toolbar-${state}-revert`, 'true');
|
|
120
|
+
} else {
|
|
121
|
+
$toolbar.setAttribute(`data-toolbar-${state}-inside`, 'true');
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
124
|
}
|
|
@@ -256,6 +257,7 @@ const Toolbar = ()=>{
|
|
|
256
257
|
'data-toolbar-hover',
|
|
257
258
|
'data-outline-hover-focus',
|
|
258
259
|
'data-toolbar-hover-revert',
|
|
260
|
+
'data-toolbar-hover-inside',
|
|
259
261
|
'data-outline-hover',
|
|
260
262
|
'data-toolbar-add-hover'
|
|
261
263
|
];
|
|
@@ -276,6 +278,7 @@ const Toolbar = ()=>{
|
|
|
276
278
|
'data-outline-active',
|
|
277
279
|
'data-toolbar-add-active',
|
|
278
280
|
'data-toolbar-active-revert',
|
|
281
|
+
'data-toolbar-active-inside',
|
|
279
282
|
'data-spacing-margin-bottom-active',
|
|
280
283
|
'data-toolbar-force-hover',
|
|
281
284
|
'data-outline-force-hover'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/pages",
|
|
3
|
-
"version": "1.23.0-staging.
|
|
3
|
+
"version": "1.23.0-staging.31",
|
|
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.
|
|
28
|
+
"@gem-sdk/core": "1.23.0-staging.30",
|
|
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"
|