@gem-sdk/components 2.0.0-staging.123 → 2.0.0-staging.125

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.
@@ -431,7 +431,7 @@ const Dialog = ({ setting, children, builderProps, builderAttrs, style })=>{
431
431
  })
432
432
  },
433
433
  "aria-label": "Dialog body",
434
- className: core.cls('gp-h-full gp-w-full gp-overflow-y-auto gp-overflow-x-hidden !gp-max-h-screen'),
434
+ className: common.bodyDialogClass,
435
435
  children: core.isEmptyChildren(children) ? /*#__PURE__*/ jsxRuntime.jsx(ChildrenDroppable.default, {}) : core.filterToolbarPreview(children)
436
436
  }),
437
437
  core.filterToolbarPreview(children, true)
@@ -185,7 +185,7 @@ const Dialog = ({ setting, children, builderProps, style, advanced })=>{
185
185
  })
186
186
  }}"
187
187
  aria-label="Dialog body"
188
- class="${core.cls('gp-h-full gp-w-full gp-overflow-y-auto gp-overflow-x-hidden !gp-max-h-screen')}">
188
+ class="${common.bodyDialogClass}">
189
189
  <div>
190
190
  ${children ?? ''}
191
191
  </div>
@@ -44,7 +44,9 @@ const removeHeightPercentForContent = (heightStyle)=>({
44
44
  const inheritStyleBody = {
45
45
  'border-radius': 'inherit'
46
46
  };
47
+ const bodyDialogClass = 'gp-h-full gp-w-full gp-overflow-y-auto gp-overflow-x-hidden !gp-max-h-screen';
47
48
 
49
+ exports.bodyDialogClass = bodyDialogClass;
48
50
  exports.getPropertyByDevice = getPropertyByDevice;
49
51
  exports.heightStyle = heightStyle;
50
52
  exports.inheritStyleBody = inheritStyleBody;
@@ -256,7 +256,8 @@ const CompareImage = (props)=>{
256
256
  height="${tempImage?.height}"
257
257
  style="${{
258
258
  position: 'static',
259
- opacity: 0
259
+ opacity: 0,
260
+ ...core.makeStyleResponsive('aspect', aspectRatio)
260
261
  }}"
261
262
  />
262
263
  ${NextImage_liquid.default({
@@ -2,7 +2,7 @@
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import { useModalStore, useEditorMode, useInteraction, globalEvent, makeWidth, cls, makeStyle, getGlobalColorResponsiveStyle, makeStyleResponsive, composeRadius, getStyleBackgroundByDevice, isEmptyChildren, filterToolbarPreview } from '@gem-sdk/core';
4
4
  import { useMemo, useRef, useState, useCallback, useEffect } from 'react';
5
- import { isShowModal, isMobile, heightStyle, removeHeightPercentForContent, inheritStyleBody } from '../helpers/common.js';
5
+ import { isShowModal, isMobile, heightStyle, removeHeightPercentForContent, inheritStyleBody, bodyDialogClass } from '../helpers/common.js';
6
6
  import { useScrollPercentage } from '../hooks/use-scroll-percentage.js';
7
7
  import ChildrenDroppable from '../../grid/components/ChildrenDroppable.js';
8
8
  import { ELEMENT_Z_INDEX } from '../../common/const.js';
@@ -427,7 +427,7 @@ const Dialog = ({ setting, children, builderProps, builderAttrs, style })=>{
427
427
  })
428
428
  },
429
429
  "aria-label": "Dialog body",
430
- className: cls('gp-h-full gp-w-full gp-overflow-y-auto gp-overflow-x-hidden !gp-max-h-screen'),
430
+ className: bodyDialogClass,
431
431
  children: isEmptyChildren(children) ? /*#__PURE__*/ jsx(ChildrenDroppable, {}) : filterToolbarPreview(children)
432
432
  }),
433
433
  filterToolbarPreview(children, true)
@@ -1,6 +1,6 @@
1
1
  import { makeWidth, template, cls, RenderIf, makeStyle, getGlobalColorResponsiveStyle, makeStyleResponsive, composeRadius, getStyleBackgroundByDevice, isLocalEnv, baseAssetURL } from '@gem-sdk/core';
2
2
  import { isTransparentColor } from '../../helpers.js';
3
- import { heightStyle, removeHeightPercentForContent, inheritStyleBody } from '../helpers/common.js';
3
+ import { heightStyle, removeHeightPercentForContent, inheritStyleBody, bodyDialogClass } from '../helpers/common.js';
4
4
  import 'react/jsx-runtime';
5
5
  import 'react';
6
6
  import { ELEMENT_Z_INDEX } from '../../common/const.js';
@@ -181,7 +181,7 @@ const Dialog = ({ setting, children, builderProps, style, advanced })=>{
181
181
  })
182
182
  }}"
183
183
  aria-label="Dialog body"
184
- class="${cls('gp-h-full gp-w-full gp-overflow-y-auto gp-overflow-x-hidden !gp-max-h-screen')}">
184
+ class="${bodyDialogClass}">
185
185
  <div>
186
186
  ${children ?? ''}
187
187
  </div>
@@ -42,5 +42,6 @@ const removeHeightPercentForContent = (heightStyle)=>({
42
42
  const inheritStyleBody = {
43
43
  'border-radius': 'inherit'
44
44
  };
45
+ const bodyDialogClass = 'gp-h-full gp-w-full gp-overflow-y-auto gp-overflow-x-hidden !gp-max-h-screen';
45
46
 
46
- export { getPropertyByDevice, heightStyle, inheritStyleBody, isMobile, isShowModal, removeHeightPercentForContent };
47
+ export { bodyDialogClass, getPropertyByDevice, heightStyle, inheritStyleBody, isMobile, isShowModal, removeHeightPercentForContent };
@@ -252,7 +252,8 @@ const CompareImage = (props)=>{
252
252
  height="${tempImage?.height}"
253
253
  style="${{
254
254
  position: 'static',
255
- opacity: 0
255
+ opacity: 0,
256
+ ...makeStyleResponsive('aspect', aspectRatio)
256
257
  }}"
257
258
  />
258
259
  ${NextImage({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-staging.123",
3
+ "version": "2.0.0-staging.125",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",