@gem-sdk/components 2.0.0-staging.117 → 2.0.0-staging.119

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.
@@ -87,6 +87,7 @@ const Button = ({ className, onClick, builderProps, builderAttrs, setting = {},
87
87
  },
88
88
  children: [
89
89
  /*#__PURE__*/ jsxRuntime.jsx("style", {
90
+ type: "text/css",
90
91
  dangerouslySetInnerHTML: {
91
92
  __html: innerBorderCss
92
93
  }
@@ -56,11 +56,13 @@ const Row = ({ className, children, setting, builderAttrs, builderProps, styles,
56
56
  'left',
57
57
  'bottom',
58
58
  'right',
59
- 'z'
59
+ 'z',
60
+ 'ml',
61
+ 'mr'
60
62
  ], style);
61
63
  const getStyles = ()=>{
62
64
  let result = {
63
- ...isSection ? restStyle : style,
65
+ ...restStyle,
64
66
  ...core.makeStyleResponsive('cg', verticalGutter),
65
67
  ...layout ? core.composeGridLayout(layout) : core.makeStyleResponsive('gtc', responsive),
66
68
  ...core.makeStyleResponsive('w', styleObject.content)
@@ -118,7 +120,7 @@ const Row = ({ className, children, setting, builderAttrs, builderProps, styles,
118
120
  ref: ref,
119
121
  style: getStyles(),
120
122
  className: core.cls(className, builderProps?.uid, 'gp-mb-0 gp-grid gp-mx-auto gp-max-w-full gp-gap-y-0 gp-transition-colors gp-duration-200 gp-ease-in-out ', {
121
- 'gp-content-visibility-hidden': mode !== 'edit' && isSection && lazy && !inView
123
+ 'gp-content-visibility-hidden': mode !== 'edit' && lazy && !inView
122
124
  }),
123
125
  children: inView || mode !== 'edit' ? /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
124
126
  children: core.isEmptyChildren(children) ? /*#__PURE__*/ jsxRuntime.jsx(ChildrenDroppable.default, {}) : React.Children.map(children, (el)=>{
@@ -157,16 +159,15 @@ const Row = ({ className, children, setting, builderAttrs, builderProps, styles,
157
159
  })
158
160
  ]
159
161
  }),
160
- isSection ? /*#__PURE__*/ jsxRuntime.jsx(Element, {
161
- className: "gp-mx-auto gp-max-w-full [&_*]:gp-max-w-full",
162
+ /*#__PURE__*/ jsxRuntime.jsx(Element, {
163
+ className: "gp-max-w-full [&_*]:gp-max-w-full",
162
164
  style: {
163
165
  ...wrapStyle,
164
- ...core.makeStyleResponsive('w', styleObject.wrapper),
165
166
  ...core.makeStyleResponsive('pl', styleObject.padding),
166
167
  ...core.makeStyleResponsive('pr', styleObject.padding)
167
168
  },
168
169
  children: element
169
- }) : element
170
+ })
170
171
  ]
171
172
  });
172
173
  };
@@ -16,7 +16,9 @@ const Row = ({ className, children, setting, builderAttrs, builderProps, styles,
16
16
  'left',
17
17
  'bottom',
18
18
  'right',
19
- 'z'
19
+ 'z',
20
+ 'ml',
21
+ 'mr'
20
22
  ], style);
21
23
  const element = core.template`
22
24
  <div
@@ -26,7 +28,7 @@ const Row = ({ className, children, setting, builderAttrs, builderProps, styles,
26
28
  'data-id': builderProps?.uidInteraction ?? builderProps?.uid
27
29
  }}
28
30
  style="${{
29
- ...isSection ? restStyle : style,
31
+ ...restStyle,
30
32
  ...core.makeStyleResponsive('cg', verticalGutter),
31
33
  ...core.makeStyleResponsive('pc', horizontalAlign),
32
34
  ...layout ? core.composeGridLayout(layout) : core.makeStyleResponsive('gtc', responsive),
@@ -53,21 +55,21 @@ const Row = ({ className, children, setting, builderAttrs, builderProps, styles,
53
55
  }))}
54
56
  </div>
55
57
  `;
58
+ const elementTag = isSection ? 'section' : 'div';
56
59
  return core.template`
57
60
  ${core.RenderIf(!!styles?.preloadBgImage, `${core.RenderIf(!!background?.desktop?.image?.src, `<link rel="preload" href="${background?.desktop?.image?.src}" as="image" />`)}${core.RenderIf(!!background?.tablet?.image?.src, `<link rel="preload" href="${background?.tablet?.image?.src}" as="image" />`)}${core.RenderIf(!!background?.mobile?.image?.src, `<link rel="preload" href="${background?.mobile?.image?.src}" as="image" />`)}`)}
58
- ${isSection ? core.template`
59
- <section
60
- class="gp-mx-auto gp-max-w-full ${helpers.getSettingPreloadData('gps-lazy')}"
61
- style="${{
61
+ ${core.template`
62
+ <${elementTag}
63
+ class="gp-max-w-full ${isSection ? helpers.getSettingPreloadData('gps-lazy') : ''}"
64
+ style="${{
62
65
  ...wrapStyle,
63
- ...core.makeStyleResponsive('w', styleObject.wrapper),
64
66
  ...core.makeStyleResponsive('pl', styleObject.padding),
65
67
  ...core.makeStyleResponsive('pr', styleObject.padding)
66
68
  }}"
67
- >
68
- ${element}
69
- </section>
70
- ` : element}
69
+ >
70
+ ${element}
71
+ </${elementTag}>
72
+ `}
71
73
  `;
72
74
  };
73
75
 
@@ -83,6 +83,7 @@ const Button = ({ className, onClick, builderProps, builderAttrs, setting = {},
83
83
  },
84
84
  children: [
85
85
  /*#__PURE__*/ jsx("style", {
86
+ type: "text/css",
86
87
  dangerouslySetInnerHTML: {
87
88
  __html: innerBorderCss
88
89
  }
@@ -52,11 +52,13 @@ const Row = ({ className, children, setting, builderAttrs, builderProps, styles,
52
52
  'left',
53
53
  'bottom',
54
54
  'right',
55
- 'z'
55
+ 'z',
56
+ 'ml',
57
+ 'mr'
56
58
  ], style);
57
59
  const getStyles = ()=>{
58
60
  let result = {
59
- ...isSection ? restStyle : style,
61
+ ...restStyle,
60
62
  ...makeStyleResponsive('cg', verticalGutter),
61
63
  ...layout ? composeGridLayout(layout) : makeStyleResponsive('gtc', responsive),
62
64
  ...makeStyleResponsive('w', styleObject.content)
@@ -114,7 +116,7 @@ const Row = ({ className, children, setting, builderAttrs, builderProps, styles,
114
116
  ref: ref,
115
117
  style: getStyles(),
116
118
  className: cls(className, builderProps?.uid, 'gp-mb-0 gp-grid gp-mx-auto gp-max-w-full gp-gap-y-0 gp-transition-colors gp-duration-200 gp-ease-in-out ', {
117
- 'gp-content-visibility-hidden': mode !== 'edit' && isSection && lazy && !inView
119
+ 'gp-content-visibility-hidden': mode !== 'edit' && lazy && !inView
118
120
  }),
119
121
  children: inView || mode !== 'edit' ? /*#__PURE__*/ jsx(Fragment, {
120
122
  children: isEmptyChildren(children) ? /*#__PURE__*/ jsx(ChildrenDroppable, {}) : Children.map(children, (el)=>{
@@ -153,16 +155,15 @@ const Row = ({ className, children, setting, builderAttrs, builderProps, styles,
153
155
  })
154
156
  ]
155
157
  }),
156
- isSection ? /*#__PURE__*/ jsx(Element, {
157
- className: "gp-mx-auto gp-max-w-full [&_*]:gp-max-w-full",
158
+ /*#__PURE__*/ jsx(Element, {
159
+ className: "gp-max-w-full [&_*]:gp-max-w-full",
158
160
  style: {
159
161
  ...wrapStyle,
160
- ...makeStyleResponsive('w', styleObject.wrapper),
161
162
  ...makeStyleResponsive('pl', styleObject.padding),
162
163
  ...makeStyleResponsive('pr', styleObject.padding)
163
164
  },
164
165
  children: element
165
- }) : element
166
+ })
166
167
  ]
167
168
  });
168
169
  };
@@ -12,7 +12,9 @@ const Row = ({ className, children, setting, builderAttrs, builderProps, styles,
12
12
  'left',
13
13
  'bottom',
14
14
  'right',
15
- 'z'
15
+ 'z',
16
+ 'ml',
17
+ 'mr'
16
18
  ], style);
17
19
  const element = template`
18
20
  <div
@@ -22,7 +24,7 @@ const Row = ({ className, children, setting, builderAttrs, builderProps, styles,
22
24
  'data-id': builderProps?.uidInteraction ?? builderProps?.uid
23
25
  }}
24
26
  style="${{
25
- ...isSection ? restStyle : style,
27
+ ...restStyle,
26
28
  ...makeStyleResponsive('cg', verticalGutter),
27
29
  ...makeStyleResponsive('pc', horizontalAlign),
28
30
  ...layout ? composeGridLayout(layout) : makeStyleResponsive('gtc', responsive),
@@ -49,21 +51,21 @@ const Row = ({ className, children, setting, builderAttrs, builderProps, styles,
49
51
  }))}
50
52
  </div>
51
53
  `;
54
+ const elementTag = isSection ? 'section' : 'div';
52
55
  return template`
53
56
  ${RenderIf(!!styles?.preloadBgImage, `${RenderIf(!!background?.desktop?.image?.src, `<link rel="preload" href="${background?.desktop?.image?.src}" as="image" />`)}${RenderIf(!!background?.tablet?.image?.src, `<link rel="preload" href="${background?.tablet?.image?.src}" as="image" />`)}${RenderIf(!!background?.mobile?.image?.src, `<link rel="preload" href="${background?.mobile?.image?.src}" as="image" />`)}`)}
54
- ${isSection ? template`
55
- <section
56
- class="gp-mx-auto gp-max-w-full ${getSettingPreloadData('gps-lazy')}"
57
- style="${{
57
+ ${template`
58
+ <${elementTag}
59
+ class="gp-max-w-full ${isSection ? getSettingPreloadData('gps-lazy') : ''}"
60
+ style="${{
58
61
  ...wrapStyle,
59
- ...makeStyleResponsive('w', styleObject.wrapper),
60
62
  ...makeStyleResponsive('pl', styleObject.padding),
61
63
  ...makeStyleResponsive('pr', styleObject.padding)
62
64
  }}"
63
- >
64
- ${element}
65
- </section>
66
- ` : element}
65
+ >
66
+ ${element}
67
+ </${elementTag}>
68
+ `}
67
69
  `;
68
70
  };
69
71
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-staging.117",
3
+ "version": "2.0.0-staging.119",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",