@gem-sdk/components 2.0.0-dev.419 → 2.0.0-dev.421

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.
@@ -28,9 +28,6 @@ const Dialog = (props)=>{
28
28
  const wrapperDialogStyle = system.createStyle({
29
29
  ...getStyle.getWrapperStyle(display)
30
30
  });
31
- const wrapperClasses = system.createClass({
32
- ...getClasses.getWrapperClasses()
33
- });
34
31
  const containClasses = system.createClass({
35
32
  ...getClasses.getContainClasses(advanced?.cssClass)
36
33
  });
@@ -95,7 +92,6 @@ const Dialog = (props)=>{
95
92
  });
96
93
  return /*#__PURE__*/ jsxRuntime.jsx("div", {
97
94
  ...attrs,
98
- className: wrapperClasses,
99
95
  style: wrapperDialogStyle,
100
96
  children: (open || mode !== 'edit') && /*#__PURE__*/ jsxRuntime.jsx("dialog", {
101
97
  ref: ref,
@@ -7,6 +7,7 @@ var system = require('@gem-sdk/system');
7
7
  var getAttr = require('./common/getAttr.js');
8
8
  var getStyle = require('./common/getStyle.js');
9
9
  var getClasses = require('./common/getClasses.js');
10
+ var helpers = require('../../helpers.js');
10
11
 
11
12
  const Dialog = (props)=>{
12
13
  const { setting, children, builderProps, style, advanced, builderAttrs } = props;
@@ -36,9 +37,6 @@ const Dialog = (props)=>{
36
37
  const wrapperDialogStyle = system.createStyle({
37
38
  ...getStyle.getWrapperStyle(display)
38
39
  });
39
- const wrapperClasses = system.createClass({
40
- ...getClasses.getWrapperClasses()
41
- });
42
40
  const containClasses = system.createClass({
43
41
  ...getClasses.getContainClasses(advanced?.cssClass)
44
42
  });
@@ -109,7 +107,7 @@ const Dialog = (props)=>{
109
107
  ${{
110
108
  ...attrs
111
109
  }}
112
- class="${wrapperClasses}"
110
+ class="${helpers.getSettingPreloadData('gps-lazy')}"
113
111
  style="${wrapperDialogStyle}"
114
112
  data-gp-setting='${JSON.stringify(stateData)}'>
115
113
  <dialog
@@ -121,16 +119,16 @@ const Dialog = (props)=>{
121
119
  style="${containStyle}"
122
120
  >
123
121
  <div aria-label="Backdrop" class="${backdropClasses}" style="${backdropStyle}">
124
- ${system.If(!!overlayColor, core.template`
125
- <div
126
- ${{
122
+ ${system.If(!!overlayColor, core.template`
123
+ <div
124
+ ${{
127
125
  ...overlayAttrs
128
126
  }}
129
- class="${overlayClasses}"
130
- style="${overlayStyle}"
131
- aria-hidden=true
132
- ></div>
133
- `)}
127
+ class="${overlayClasses}"
128
+ style="${overlayStyle}"
129
+ aria-hidden=true
130
+ ></div>
131
+ `)}
134
132
  <span class="${headContentClasses}"></span>
135
133
  <div
136
134
  role="dialog"
@@ -8,12 +8,6 @@ function composeClasses(classList) {
8
8
  return acc;
9
9
  }, {});
10
10
  }
11
- const getWrapperClasses = ()=>{
12
- const classList = 'gps-lazy';
13
- return {
14
- ...composeClasses(classList)
15
- };
16
- };
17
11
  const getContainClasses = (advancedCssClass)=>{
18
12
  let classList = 'gp-dialog gp-bg-transparent';
19
13
  if (advancedCssClass) classList += ` ${advancedCssClass}`;
@@ -85,4 +79,3 @@ exports.getContainClasses = getContainClasses;
85
79
  exports.getDialogContentClasses = getDialogContentClasses;
86
80
  exports.getHeadContentClasses = getHeadContentClasses;
87
81
  exports.getOverlayClasses = getOverlayClasses;
88
- exports.getWrapperClasses = getWrapperClasses;
@@ -9,7 +9,7 @@ var composeStyles = require('./common/composeStyles.js');
9
9
  var composeClasses = require('./common/composeClasses.js');
10
10
 
11
11
  const FormEmail = ({ builderProps, builderAttrs, setting, advanced, children, styles })=>{
12
- const { placeholder, required, defaultEmail, hideOnClient, title, showTitle } = setting ?? {};
12
+ const { placeholder, required, title, showTitle } = setting ?? {};
13
13
  const name = 'contact[email]';
14
14
  const containerStyles = system.createStyle(composeStyles.composeContainerStyles(setting, advanced));
15
15
  const innerStyles = system.createStyle(composeStyles.composeInnerStyles(setting, advanced, styles));
@@ -38,10 +38,7 @@ const FormEmail = ({ builderProps, builderAttrs, setting, advanced, children, st
38
38
  placeholder: placeholder,
39
39
  name: name,
40
40
  required: required,
41
- autoComplete: "email",
42
- ...hideOnClient && {
43
- value: defaultEmail
44
- }
41
+ autoComplete: "email"
45
42
  }),
46
43
  children
47
44
  ]
@@ -29,7 +29,7 @@ const composeContainerStyles = (setting, advanced)=>{
29
29
  const composeInnerStyles = (setting, advanced, styles)=>{
30
30
  const { border, rounded, hasBoxShadow, boxShadow } = advanced ?? {};
31
31
  const { wrapperBorder, borderRadius, globalSize, boxShadowEmailHover, boxShadowEmailActive, roundedEmailHover, textColorActive, roundedEmailActive, textColorHover, borderEmailHover, borderEmailActive, backgroundColorV2Active, backgroundColorV2Hover } = styles ?? {};
32
- const { typography, size, width, background } = setting ?? {};
32
+ const { typography, size, background } = setting ?? {};
33
33
  const inputStyle = core.composeAdvanceStyle({
34
34
  border,
35
35
  rounded,
@@ -37,7 +37,6 @@ const composeInnerStyles = (setting, advanced, styles)=>{
37
37
  boxShadow
38
38
  });
39
39
  const appendTypoStyle = core.composeTypographyStyle(setting?.typo, typography);
40
- const inputWidth = core.makeStyleResponsive('w', core.makeWidth(width));
41
40
  const composeGlobalSize = core.makeGlobalSize(globalSize);
42
41
  return composeStyles({
43
42
  ...composeGlobalSize?.width?.['--w'] ? composeGlobalSize.width : {
@@ -51,7 +50,6 @@ const composeInnerStyles = (setting, advanced, styles)=>{
51
50
  ...!size?.type ? core.composeSize(size?.custom) : {},
52
51
  ...core.getBorderStyle(wrapperBorder),
53
52
  ...core.getBorderRadiusStyle(borderRadius),
54
- ...inputWidth,
55
53
  ...inputStyle,
56
54
  ...core.getStyleShadow({
57
55
  value: boxShadow,
@@ -43,19 +43,16 @@ const FormEmailSettings = [
43
43
  },
44
44
  {
45
45
  id: 'typo',
46
+ label: 'Text styles',
46
47
  type: 'typography-v2',
47
- label: 'typography',
48
48
  default: {
49
49
  type: 'paragraph-1'
50
50
  },
51
51
  hiddenSetting: {
52
52
  color: true,
53
53
  textAlign: true,
54
- textShadow: true,
55
- fontWeight: true,
56
- transform: true
54
+ textShadow: true
57
55
  },
58
- disableCollapse: true,
59
56
  ignoreReRender: true
60
57
  },
61
58
  {
@@ -121,6 +118,39 @@ const FormEmailSettings = [
121
118
  }
122
119
  }
123
120
  }
121
+ },
122
+ {
123
+ id: 'align',
124
+ label: 'Alignment',
125
+ type: 'option:value',
126
+ options: [
127
+ {
128
+ label: 'Left',
129
+ value: 'left',
130
+ type: 'align',
131
+ tooltip: 'Align left',
132
+ iconName: 'gp-align-left'
133
+ },
134
+ {
135
+ label: 'Center',
136
+ value: 'center',
137
+ type: 'align',
138
+ tooltip: 'Align center',
139
+ iconName: 'gp-align-center'
140
+ },
141
+ {
142
+ label: 'Right',
143
+ value: 'right',
144
+ type: 'align',
145
+ tooltip: 'Align right',
146
+ iconName: 'gp-align-right'
147
+ }
148
+ ],
149
+ devices: {
150
+ desktop: {
151
+ default: 'left'
152
+ }
153
+ }
124
154
  }
125
155
  ]
126
156
  },
@@ -137,10 +167,10 @@ const FormEmailSettings = [
137
167
  height: 'Auto',
138
168
  padding: {
139
169
  type: 'medium',
140
- top: '4px',
141
- bottom: '4px',
142
- left: '16px',
143
- right: '16px'
170
+ top: '12px',
171
+ bottom: '12px',
172
+ left: '12px',
173
+ right: '12px'
144
174
  }
145
175
  }
146
176
  }
@@ -71,27 +71,24 @@ const SettingUIV2 = [
71
71
  },
72
72
  layout: 'horizontal'
73
73
  },
74
- {
75
- label: {
76
- en: 'Height'
77
- },
78
- controlConfig: {
79
- id: 'height',
80
- type: 'dropdown:input',
81
- label: 'Height',
82
- inputType: 'number',
83
- units: [
84
- 'px',
85
- '%'
86
- ],
87
- hideUnit: false,
88
- linkWithSetting: {
89
- name: 'globalSize',
90
- field: 'height'
91
- }
92
- },
93
- layout: 'horizontal'
94
- },
74
+ // {
75
+ // label: {
76
+ // en: 'Height',
77
+ // },
78
+ // controlConfig: {
79
+ // id: 'height',
80
+ // type: 'dropdown:input',
81
+ // label: 'Height',
82
+ // inputType: 'number',
83
+ // units: ['px', '%'],
84
+ // hideUnit: false,
85
+ // linkWithSetting: {
86
+ // name: 'globalSize',
87
+ // field: 'height',
88
+ // },
89
+ // },
90
+ // layout: 'horizontal',
91
+ // },
95
92
  {
96
93
  label: {
97
94
  en: 'Padding'
@@ -341,6 +338,24 @@ const SettingUIV2 = [
341
338
  conditionDisplay: 'hideOnClient === true'
342
339
  }
343
340
  ]
341
+ },
342
+ {
343
+ controls: [
344
+ {
345
+ label: {
346
+ en: 'Align'
347
+ },
348
+ conditionEnable: '!(parseInt(globalSize.width) >= 100 && globalSize.width?.includes("%"))',
349
+ setting: {
350
+ id: 'align'
351
+ },
352
+ options: {
353
+ labelVariant: 'primary',
354
+ fullWidth: true,
355
+ disableMessage: `Align is not supported when width is 100%`
356
+ }
357
+ }
358
+ ]
344
359
  }
345
360
  ];
346
361
 
@@ -84,27 +84,24 @@ const SettingUIV2 = [
84
84
  },
85
85
  layout: 'horizontal'
86
86
  },
87
- {
88
- label: {
89
- en: 'Height'
90
- },
91
- controlConfig: {
92
- id: 'height',
93
- type: 'dropdown:input',
94
- label: 'Height',
95
- inputType: 'number',
96
- units: [
97
- 'px',
98
- '%'
99
- ],
100
- hideUnit: false,
101
- linkWithSetting: {
102
- name: 'globalSize',
103
- field: 'height'
104
- }
105
- },
106
- layout: 'horizontal'
107
- },
87
+ // {
88
+ // label: {
89
+ // en: 'Height',
90
+ // },
91
+ // controlConfig: {
92
+ // id: 'height',
93
+ // type: 'dropdown:input',
94
+ // label: 'Height',
95
+ // inputType: 'number',
96
+ // units: ['px', '%'],
97
+ // hideUnit: false,
98
+ // linkWithSetting: {
99
+ // name: 'globalSize',
100
+ // field: 'height',
101
+ // },
102
+ // },
103
+ // layout: 'horizontal',
104
+ // },
108
105
  {
109
106
  label: {
110
107
  en: 'Padding'
@@ -160,7 +157,7 @@ const SettingUIV2 = [
160
157
  label: {
161
158
  en: 'Align'
162
159
  },
163
- conditionEnable: '!(parseInt(width) >= 100 && width?.includes("%"))',
160
+ conditionEnable: '!(parseInt(globalSize.width) >= 100 && globalSize.width?.includes("%"))',
164
161
  setting: {
165
162
  id: 'align'
166
163
  },
@@ -6,7 +6,7 @@ import { useDialog } from './hooks/useDialog.js';
6
6
  import { createAttr, createStyle, createClass, If } from '@gem-sdk/system';
7
7
  import { getAttr, getAttrContainer, getAttrOverlay, getAttrClose } from './common/getAttr.js';
8
8
  import { getWrapperStyle, getContainStyle, getBackdropStyle, getOverlayStyle, getDialogContentStyle, getButtonContentStyle, getSvgContentStyle, getBodyContentStyle } from './common/getStyle.js';
9
- import { getWrapperClasses, getContainClasses, getBackdropClasses, getOverlayClasses, getDialogContentClasses, getHeadContentClasses, getButtonContentClasses, getBodyContentClasses } from './common/getClasses.js';
9
+ import { getContainClasses, getBackdropClasses, getOverlayClasses, getDialogContentClasses, getHeadContentClasses, getButtonContentClasses, getBodyContentClasses } from './common/getClasses.js';
10
10
 
11
11
  const Dialog = (props)=>{
12
12
  const { setting, children, builderProps, style, advanced, builderAttrs } = props;
@@ -24,9 +24,6 @@ const Dialog = (props)=>{
24
24
  const wrapperDialogStyle = createStyle({
25
25
  ...getWrapperStyle(display)
26
26
  });
27
- const wrapperClasses = createClass({
28
- ...getWrapperClasses()
29
- });
30
27
  const containClasses = createClass({
31
28
  ...getContainClasses(advanced?.cssClass)
32
29
  });
@@ -91,7 +88,6 @@ const Dialog = (props)=>{
91
88
  });
92
89
  return /*#__PURE__*/ jsx("div", {
93
90
  ...attrs,
94
- className: wrapperClasses,
95
91
  style: wrapperDialogStyle,
96
92
  children: (open || mode !== 'edit') && /*#__PURE__*/ jsx("dialog", {
97
93
  ref: ref,
@@ -2,7 +2,8 @@ import { template, RenderIf, isLocalEnv, baseAssetURL } from '@gem-sdk/core';
2
2
  import { createStateOrContext, createAttr, createStyle, createClass, If } from '@gem-sdk/system';
3
3
  import { getAttr, getAttrContainer, getAttrOverlay, getAttrClose } from './common/getAttr.js';
4
4
  import { getWrapperStyle, getContainStyle, getBackdropStyle, getOverlayStyle, getDialogContentStyle, getButtonContentStyle, getSvgContentStyle, getBodyContentStyle } from './common/getStyle.js';
5
- import { getWrapperClasses, getContainClasses, getBackdropClasses, getOverlayClasses, getDialogContentClasses, getHeadContentClasses, getButtonContentClasses, getBodyContentClasses } from './common/getClasses.js';
5
+ import { getContainClasses, getBackdropClasses, getOverlayClasses, getDialogContentClasses, getHeadContentClasses, getButtonContentClasses, getBodyContentClasses } from './common/getClasses.js';
6
+ import { getSettingPreloadData } from '../../helpers.js';
6
7
 
7
8
  const Dialog = (props)=>{
8
9
  const { setting, children, builderProps, style, advanced, builderAttrs } = props;
@@ -32,9 +33,6 @@ const Dialog = (props)=>{
32
33
  const wrapperDialogStyle = createStyle({
33
34
  ...getWrapperStyle(display)
34
35
  });
35
- const wrapperClasses = createClass({
36
- ...getWrapperClasses()
37
- });
38
36
  const containClasses = createClass({
39
37
  ...getContainClasses(advanced?.cssClass)
40
38
  });
@@ -105,7 +103,7 @@ const Dialog = (props)=>{
105
103
  ${{
106
104
  ...attrs
107
105
  }}
108
- class="${wrapperClasses}"
106
+ class="${getSettingPreloadData('gps-lazy')}"
109
107
  style="${wrapperDialogStyle}"
110
108
  data-gp-setting='${JSON.stringify(stateData)}'>
111
109
  <dialog
@@ -117,16 +115,16 @@ const Dialog = (props)=>{
117
115
  style="${containStyle}"
118
116
  >
119
117
  <div aria-label="Backdrop" class="${backdropClasses}" style="${backdropStyle}">
120
- ${If(!!overlayColor, template`
121
- <div
122
- ${{
118
+ ${If(!!overlayColor, template`
119
+ <div
120
+ ${{
123
121
  ...overlayAttrs
124
122
  }}
125
- class="${overlayClasses}"
126
- style="${overlayStyle}"
127
- aria-hidden=true
128
- ></div>
129
- `)}
123
+ class="${overlayClasses}"
124
+ style="${overlayStyle}"
125
+ aria-hidden=true
126
+ ></div>
127
+ `)}
130
128
  <span class="${headContentClasses}"></span>
131
129
  <div
132
130
  role="dialog"
@@ -6,12 +6,6 @@ function composeClasses(classList) {
6
6
  return acc;
7
7
  }, {});
8
8
  }
9
- const getWrapperClasses = ()=>{
10
- const classList = 'gps-lazy';
11
- return {
12
- ...composeClasses(classList)
13
- };
14
- };
15
9
  const getContainClasses = (advancedCssClass)=>{
16
10
  let classList = 'gp-dialog gp-bg-transparent';
17
11
  if (advancedCssClass) classList += ` ${advancedCssClass}`;
@@ -76,4 +70,4 @@ const getBodyContentClasses = ()=>{
76
70
  };
77
71
  };
78
72
 
79
- export { getBackdropClasses, getBodyContentClasses, getButtonContentClasses, getContainClasses, getDialogContentClasses, getHeadContentClasses, getOverlayClasses, getWrapperClasses };
73
+ export { getBackdropClasses, getBodyContentClasses, getButtonContentClasses, getContainClasses, getDialogContentClasses, getHeadContentClasses, getOverlayClasses };
@@ -5,7 +5,7 @@ import { composeContainerStyles, composeInnerStyles } from './common/composeStyl
5
5
  import { composeContainerClasses, composeInnerClasses, getClassTitle } from './common/composeClasses.js';
6
6
 
7
7
  const FormEmail = ({ builderProps, builderAttrs, setting, advanced, children, styles })=>{
8
- const { placeholder, required, defaultEmail, hideOnClient, title, showTitle } = setting ?? {};
8
+ const { placeholder, required, title, showTitle } = setting ?? {};
9
9
  const name = 'contact[email]';
10
10
  const containerStyles = createStyle(composeContainerStyles(setting, advanced));
11
11
  const innerStyles = createStyle(composeInnerStyles(setting, advanced, styles));
@@ -34,10 +34,7 @@ const FormEmail = ({ builderProps, builderAttrs, setting, advanced, children, st
34
34
  placeholder: placeholder,
35
35
  name: name,
36
36
  required: required,
37
- autoComplete: "email",
38
- ...hideOnClient && {
39
- value: defaultEmail
40
- }
37
+ autoComplete: "email"
41
38
  }),
42
39
  children
43
40
  ]
@@ -1,5 +1,5 @@
1
1
  import { filterTruthy } from '../../../helpers/common.js';
2
- import { composeAdvanceStyle, makeStyleResponsive, composeTypographyStyle, makeWidth, makeGlobalSize, composeSize, getBorderStyle, getBorderRadiusStyle, getStyleShadow, getStyleBackgroundByDevice, getGradientBgrStyleByDevice, getSingleColorVariable, getCustomRadius } from '@gem-sdk/core';
2
+ import { composeAdvanceStyle, makeStyleResponsive, composeTypographyStyle, makeGlobalSize, composeSize, getBorderStyle, getBorderRadiusStyle, getStyleShadow, getStyleBackgroundByDevice, getGradientBgrStyleByDevice, getSingleColorVariable, getCustomRadius } from '@gem-sdk/core';
3
3
 
4
4
  const composeStyles = (styles)=>filterTruthy(styles);
5
5
  const composeContainerStyles = (setting, advanced)=>{
@@ -27,7 +27,7 @@ const composeContainerStyles = (setting, advanced)=>{
27
27
  const composeInnerStyles = (setting, advanced, styles)=>{
28
28
  const { border, rounded, hasBoxShadow, boxShadow } = advanced ?? {};
29
29
  const { wrapperBorder, borderRadius, globalSize, boxShadowEmailHover, boxShadowEmailActive, roundedEmailHover, textColorActive, roundedEmailActive, textColorHover, borderEmailHover, borderEmailActive, backgroundColorV2Active, backgroundColorV2Hover } = styles ?? {};
30
- const { typography, size, width, background } = setting ?? {};
30
+ const { typography, size, background } = setting ?? {};
31
31
  const inputStyle = composeAdvanceStyle({
32
32
  border,
33
33
  rounded,
@@ -35,7 +35,6 @@ const composeInnerStyles = (setting, advanced, styles)=>{
35
35
  boxShadow
36
36
  });
37
37
  const appendTypoStyle = composeTypographyStyle(setting?.typo, typography);
38
- const inputWidth = makeStyleResponsive('w', makeWidth(width));
39
38
  const composeGlobalSize = makeGlobalSize(globalSize);
40
39
  return composeStyles({
41
40
  ...composeGlobalSize?.width?.['--w'] ? composeGlobalSize.width : {
@@ -49,7 +48,6 @@ const composeInnerStyles = (setting, advanced, styles)=>{
49
48
  ...!size?.type ? composeSize(size?.custom) : {},
50
49
  ...getBorderStyle(wrapperBorder),
51
50
  ...getBorderRadiusStyle(borderRadius),
52
- ...inputWidth,
53
51
  ...inputStyle,
54
52
  ...getStyleShadow({
55
53
  value: boxShadow,
@@ -39,19 +39,16 @@ const FormEmailSettings = [
39
39
  },
40
40
  {
41
41
  id: 'typo',
42
+ label: 'Text styles',
42
43
  type: 'typography-v2',
43
- label: 'typography',
44
44
  default: {
45
45
  type: 'paragraph-1'
46
46
  },
47
47
  hiddenSetting: {
48
48
  color: true,
49
49
  textAlign: true,
50
- textShadow: true,
51
- fontWeight: true,
52
- transform: true
50
+ textShadow: true
53
51
  },
54
- disableCollapse: true,
55
52
  ignoreReRender: true
56
53
  },
57
54
  {
@@ -117,6 +114,39 @@ const FormEmailSettings = [
117
114
  }
118
115
  }
119
116
  }
117
+ },
118
+ {
119
+ id: 'align',
120
+ label: 'Alignment',
121
+ type: 'option:value',
122
+ options: [
123
+ {
124
+ label: 'Left',
125
+ value: 'left',
126
+ type: 'align',
127
+ tooltip: 'Align left',
128
+ iconName: 'gp-align-left'
129
+ },
130
+ {
131
+ label: 'Center',
132
+ value: 'center',
133
+ type: 'align',
134
+ tooltip: 'Align center',
135
+ iconName: 'gp-align-center'
136
+ },
137
+ {
138
+ label: 'Right',
139
+ value: 'right',
140
+ type: 'align',
141
+ tooltip: 'Align right',
142
+ iconName: 'gp-align-right'
143
+ }
144
+ ],
145
+ devices: {
146
+ desktop: {
147
+ default: 'left'
148
+ }
149
+ }
120
150
  }
121
151
  ]
122
152
  },
@@ -133,10 +163,10 @@ const FormEmailSettings = [
133
163
  height: 'Auto',
134
164
  padding: {
135
165
  type: 'medium',
136
- top: '4px',
137
- bottom: '4px',
138
- left: '16px',
139
- right: '16px'
166
+ top: '12px',
167
+ bottom: '12px',
168
+ left: '12px',
169
+ right: '12px'
140
170
  }
141
171
  }
142
172
  }
@@ -69,27 +69,24 @@ const SettingUIV2 = [
69
69
  },
70
70
  layout: 'horizontal'
71
71
  },
72
- {
73
- label: {
74
- en: 'Height'
75
- },
76
- controlConfig: {
77
- id: 'height',
78
- type: 'dropdown:input',
79
- label: 'Height',
80
- inputType: 'number',
81
- units: [
82
- 'px',
83
- '%'
84
- ],
85
- hideUnit: false,
86
- linkWithSetting: {
87
- name: 'globalSize',
88
- field: 'height'
89
- }
90
- },
91
- layout: 'horizontal'
92
- },
72
+ // {
73
+ // label: {
74
+ // en: 'Height',
75
+ // },
76
+ // controlConfig: {
77
+ // id: 'height',
78
+ // type: 'dropdown:input',
79
+ // label: 'Height',
80
+ // inputType: 'number',
81
+ // units: ['px', '%'],
82
+ // hideUnit: false,
83
+ // linkWithSetting: {
84
+ // name: 'globalSize',
85
+ // field: 'height',
86
+ // },
87
+ // },
88
+ // layout: 'horizontal',
89
+ // },
93
90
  {
94
91
  label: {
95
92
  en: 'Padding'
@@ -339,6 +336,24 @@ const SettingUIV2 = [
339
336
  conditionDisplay: 'hideOnClient === true'
340
337
  }
341
338
  ]
339
+ },
340
+ {
341
+ controls: [
342
+ {
343
+ label: {
344
+ en: 'Align'
345
+ },
346
+ conditionEnable: '!(parseInt(globalSize.width) >= 100 && globalSize.width?.includes("%"))',
347
+ setting: {
348
+ id: 'align'
349
+ },
350
+ options: {
351
+ labelVariant: 'primary',
352
+ fullWidth: true,
353
+ disableMessage: `Align is not supported when width is 100%`
354
+ }
355
+ }
356
+ ]
342
357
  }
343
358
  ];
344
359
 
@@ -82,27 +82,24 @@ const SettingUIV2 = [
82
82
  },
83
83
  layout: 'horizontal'
84
84
  },
85
- {
86
- label: {
87
- en: 'Height'
88
- },
89
- controlConfig: {
90
- id: 'height',
91
- type: 'dropdown:input',
92
- label: 'Height',
93
- inputType: 'number',
94
- units: [
95
- 'px',
96
- '%'
97
- ],
98
- hideUnit: false,
99
- linkWithSetting: {
100
- name: 'globalSize',
101
- field: 'height'
102
- }
103
- },
104
- layout: 'horizontal'
105
- },
85
+ // {
86
+ // label: {
87
+ // en: 'Height',
88
+ // },
89
+ // controlConfig: {
90
+ // id: 'height',
91
+ // type: 'dropdown:input',
92
+ // label: 'Height',
93
+ // inputType: 'number',
94
+ // units: ['px', '%'],
95
+ // hideUnit: false,
96
+ // linkWithSetting: {
97
+ // name: 'globalSize',
98
+ // field: 'height',
99
+ // },
100
+ // },
101
+ // layout: 'horizontal',
102
+ // },
106
103
  {
107
104
  label: {
108
105
  en: 'Padding'
@@ -158,7 +155,7 @@ const SettingUIV2 = [
158
155
  label: {
159
156
  en: 'Align'
160
157
  },
161
- conditionEnable: '!(parseInt(width) >= 100 && width?.includes("%"))',
158
+ conditionEnable: '!(parseInt(globalSize.width) >= 100 && globalSize.width?.includes("%"))',
162
159
  setting: {
163
160
  id: 'align'
164
161
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.419",
3
+ "version": "2.0.0-dev.421",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",