@gem-sdk/components 2.0.0-dev.376 → 2.0.0-dev.377

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.
@@ -155,7 +155,7 @@ const CollectionPaginatorSettings = [
155
155
  },
156
156
  {
157
157
  id: 'numberOfProducts',
158
- type: 'input:number',
158
+ type: 'input:stepper',
159
159
  default: 0
160
160
  }
161
161
  ]
@@ -88,10 +88,11 @@ const getBodyContentStyle = (setting, style)=>{
88
88
  ...common.getInnerStyle(style),
89
89
  ...common.removeHeightPercentForContent(common.heightStyle(fullScreen, height)),
90
90
  'border-radius': 'inherit',
91
- ...core.getStyleBackgroundByDevice(background, {
92
- ignoreBackgroundImage: true,
93
- ignoreBackgroundImageProperties: true,
94
- ignoreBgAttachment: true
91
+ ...core.getStyleBackgroundByDevice(background),
92
+ ...core.getGradientBgrStyleByDevice(background, {
93
+ desktop: true,
94
+ tablet: true,
95
+ mobile: true
95
96
  })
96
97
  };
97
98
  return filterTruthyStyles(composeStyles);
@@ -186,7 +186,7 @@ const DialogSettings = [
186
186
  },
187
187
  {
188
188
  id: 'btnSize',
189
- type: 'input:number',
189
+ type: 'input:stepper',
190
190
  default: 32
191
191
  },
192
192
  {
@@ -76,6 +76,9 @@ const SettingUIV2 = [
76
76
  }
77
77
  },
78
78
  {
79
+ label: {
80
+ en: 'Overlay'
81
+ },
79
82
  controls: [
80
83
  {
81
84
  label: {
@@ -133,6 +136,30 @@ const SettingUIV2 = [
133
136
  setting: {
134
137
  id: 'height'
135
138
  }
139
+ },
140
+ {
141
+ label: {
142
+ en: 'Padding'
143
+ },
144
+ controlConfig: {
145
+ id: 'padding',
146
+ type: 'padding-v2',
147
+ linkWithSetting: {
148
+ name: 'spacing-setting',
149
+ field: 'padding'
150
+ },
151
+ compoDefaultValue: {
152
+ desktop: {
153
+ default: {
154
+ type: 'medium',
155
+ top: '32px',
156
+ bottom: '32px',
157
+ left: '32px',
158
+ right: '32px'
159
+ }
160
+ }
161
+ }
162
+ }
136
163
  }
137
164
  ]
138
165
  },
@@ -149,6 +176,84 @@ const SettingUIV2 = [
149
176
  }
150
177
  ]
151
178
  },
179
+ {
180
+ label: {
181
+ en: 'Shape'
182
+ },
183
+ controls: [
184
+ {
185
+ label: {
186
+ en: 'Border'
187
+ },
188
+ setting: {
189
+ id: 'border',
190
+ state: 'normal'
191
+ }
192
+ },
193
+ {
194
+ label: {
195
+ en: 'Corner'
196
+ },
197
+ setting: {
198
+ id: 'rounded',
199
+ state: 'normal'
200
+ }
201
+ },
202
+ {
203
+ label: {
204
+ en: 'Shadow'
205
+ },
206
+ setting: {
207
+ id: 'boxShadow',
208
+ state: 'normal'
209
+ },
210
+ options: {
211
+ updateFields: [
212
+ {
213
+ field: 'enable',
214
+ settingId: 'advanced.hasBoxShadow',
215
+ state: 'normal'
216
+ }
217
+ ]
218
+ },
219
+ controlChangeTrigger: {
220
+ settings: [
221
+ {
222
+ condition: `boxShadow.normal.enable === true`,
223
+ source: [
224
+ 'boxShadow',
225
+ 'hasBoxShadow'
226
+ ],
227
+ action: {
228
+ controlId: 'hasBoxShadow',
229
+ groupType: 'advanced',
230
+ controlType: 'advanced',
231
+ state: 'normal',
232
+ newValue: true
233
+ }
234
+ },
235
+ {
236
+ condition: `boxShadow.normal.enable === false`,
237
+ source: [
238
+ 'boxShadow',
239
+ 'hasBoxShadow'
240
+ ],
241
+ action: {
242
+ controlId: 'hasBoxShadow',
243
+ groupType: 'advanced',
244
+ controlType: 'advanced',
245
+ state: 'normal',
246
+ newValue: false
247
+ }
248
+ }
249
+ ],
250
+ options: {
251
+ noRecordHistory: true
252
+ }
253
+ }
254
+ }
255
+ ]
256
+ },
152
257
  {
153
258
  label: {
154
259
  en: 'Position'
@@ -194,7 +299,7 @@ const SettingUIV2 = [
194
299
  }
195
300
  },
196
301
  {
197
- conditionDisplay: `trigger === 'show-after-time'`,
302
+ conditionDisplay: `trigger === 'show-after-time' || trigger === 'show-on-page-load'`,
198
303
  label: {
199
304
  en: 'Time'
200
305
  },
@@ -133,7 +133,7 @@ const MarqueeSettings = [
133
133
  {
134
134
  id: 'iconSeparatorSize',
135
135
  label: 'iconSeparatorSize',
136
- type: 'input:number',
136
+ type: 'input:stepper',
137
137
  devices: {
138
138
  desktop: {
139
139
  default: 24
@@ -126,7 +126,7 @@ const SettingV2 = [
126
126
  },
127
127
  {
128
128
  id: 'ftItemPerSlide',
129
- type: 'input:number',
129
+ type: 'input:stepper',
130
130
  min: 1,
131
131
  hide: true,
132
132
  default: 1
@@ -356,14 +356,14 @@ const SettingV2 = [
356
356
  },
357
357
  {
358
358
  id: 'ilItemPerSlide',
359
- type: 'input:number',
359
+ type: 'input:stepper',
360
360
  min: 1,
361
361
  hide: true,
362
362
  default: 5
363
363
  },
364
364
  {
365
365
  id: 'ilNumberPerRow',
366
- type: 'input:number',
366
+ type: 'input:stepper',
367
367
  label: 'Item per row',
368
368
  hide: true,
369
369
  default: 5
@@ -181,7 +181,7 @@ const ProductListSettings = [
181
181
  {
182
182
  id: 'dotSize',
183
183
  label: 'Dots size',
184
- type: 'input:number',
184
+ type: 'input:stepper',
185
185
  min: 1,
186
186
  devices: {
187
187
  desktop: {
@@ -269,7 +269,7 @@ const ProductListSettings = [
269
269
  {
270
270
  id: 'speed',
271
271
  label: 'Speed(s)',
272
- type: 'input:number',
272
+ type: 'input:stepper',
273
273
  min: 0,
274
274
  max: 60,
275
275
  default: 2,
@@ -66,7 +66,7 @@ const StockCounterSettingsV2 = [
66
66
  },
67
67
  {
68
68
  id: 'remaining',
69
- type: 'input:number',
69
+ type: 'input:stepper',
70
70
  default: 16
71
71
  },
72
72
  {
@@ -153,7 +153,7 @@ const CollectionPaginatorSettings = [
153
153
  },
154
154
  {
155
155
  id: 'numberOfProducts',
156
- type: 'input:number',
156
+ type: 'input:stepper',
157
157
  default: 0
158
158
  }
159
159
  ]
@@ -1,4 +1,4 @@
1
- import { makeStyle, getGlobalColorResponsiveStyle, makeStyleResponsive, makeWidth, composeRadius, getStyleBackgroundByDevice } from '@gem-sdk/core';
1
+ import { makeStyle, getGlobalColorResponsiveStyle, makeStyleResponsive, makeWidth, composeRadius, getStyleBackgroundByDevice, getGradientBgrStyleByDevice } from '@gem-sdk/core';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
4
4
  import { ELEMENT_Z_INDEX } from '../../../common/const.js';
@@ -86,10 +86,11 @@ const getBodyContentStyle = (setting, style)=>{
86
86
  ...getInnerStyle(style),
87
87
  ...removeHeightPercentForContent(heightStyle(fullScreen, height)),
88
88
  'border-radius': 'inherit',
89
- ...getStyleBackgroundByDevice(background, {
90
- ignoreBackgroundImage: true,
91
- ignoreBackgroundImageProperties: true,
92
- ignoreBgAttachment: true
89
+ ...getStyleBackgroundByDevice(background),
90
+ ...getGradientBgrStyleByDevice(background, {
91
+ desktop: true,
92
+ tablet: true,
93
+ mobile: true
93
94
  })
94
95
  };
95
96
  return filterTruthyStyles(composeStyles);
@@ -184,7 +184,7 @@ const DialogSettings = [
184
184
  },
185
185
  {
186
186
  id: 'btnSize',
187
- type: 'input:number',
187
+ type: 'input:stepper',
188
188
  default: 32
189
189
  },
190
190
  {
@@ -74,6 +74,9 @@ const SettingUIV2 = [
74
74
  }
75
75
  },
76
76
  {
77
+ label: {
78
+ en: 'Overlay'
79
+ },
77
80
  controls: [
78
81
  {
79
82
  label: {
@@ -131,6 +134,30 @@ const SettingUIV2 = [
131
134
  setting: {
132
135
  id: 'height'
133
136
  }
137
+ },
138
+ {
139
+ label: {
140
+ en: 'Padding'
141
+ },
142
+ controlConfig: {
143
+ id: 'padding',
144
+ type: 'padding-v2',
145
+ linkWithSetting: {
146
+ name: 'spacing-setting',
147
+ field: 'padding'
148
+ },
149
+ compoDefaultValue: {
150
+ desktop: {
151
+ default: {
152
+ type: 'medium',
153
+ top: '32px',
154
+ bottom: '32px',
155
+ left: '32px',
156
+ right: '32px'
157
+ }
158
+ }
159
+ }
160
+ }
134
161
  }
135
162
  ]
136
163
  },
@@ -147,6 +174,84 @@ const SettingUIV2 = [
147
174
  }
148
175
  ]
149
176
  },
177
+ {
178
+ label: {
179
+ en: 'Shape'
180
+ },
181
+ controls: [
182
+ {
183
+ label: {
184
+ en: 'Border'
185
+ },
186
+ setting: {
187
+ id: 'border',
188
+ state: 'normal'
189
+ }
190
+ },
191
+ {
192
+ label: {
193
+ en: 'Corner'
194
+ },
195
+ setting: {
196
+ id: 'rounded',
197
+ state: 'normal'
198
+ }
199
+ },
200
+ {
201
+ label: {
202
+ en: 'Shadow'
203
+ },
204
+ setting: {
205
+ id: 'boxShadow',
206
+ state: 'normal'
207
+ },
208
+ options: {
209
+ updateFields: [
210
+ {
211
+ field: 'enable',
212
+ settingId: 'advanced.hasBoxShadow',
213
+ state: 'normal'
214
+ }
215
+ ]
216
+ },
217
+ controlChangeTrigger: {
218
+ settings: [
219
+ {
220
+ condition: `boxShadow.normal.enable === true`,
221
+ source: [
222
+ 'boxShadow',
223
+ 'hasBoxShadow'
224
+ ],
225
+ action: {
226
+ controlId: 'hasBoxShadow',
227
+ groupType: 'advanced',
228
+ controlType: 'advanced',
229
+ state: 'normal',
230
+ newValue: true
231
+ }
232
+ },
233
+ {
234
+ condition: `boxShadow.normal.enable === false`,
235
+ source: [
236
+ 'boxShadow',
237
+ 'hasBoxShadow'
238
+ ],
239
+ action: {
240
+ controlId: 'hasBoxShadow',
241
+ groupType: 'advanced',
242
+ controlType: 'advanced',
243
+ state: 'normal',
244
+ newValue: false
245
+ }
246
+ }
247
+ ],
248
+ options: {
249
+ noRecordHistory: true
250
+ }
251
+ }
252
+ }
253
+ ]
254
+ },
150
255
  {
151
256
  label: {
152
257
  en: 'Position'
@@ -192,7 +297,7 @@ const SettingUIV2 = [
192
297
  }
193
298
  },
194
299
  {
195
- conditionDisplay: `trigger === 'show-after-time'`,
300
+ conditionDisplay: `trigger === 'show-after-time' || trigger === 'show-on-page-load'`,
196
301
  label: {
197
302
  en: 'Time'
198
303
  },
@@ -131,7 +131,7 @@ const MarqueeSettings = [
131
131
  {
132
132
  id: 'iconSeparatorSize',
133
133
  label: 'iconSeparatorSize',
134
- type: 'input:number',
134
+ type: 'input:stepper',
135
135
  devices: {
136
136
  desktop: {
137
137
  default: 24
@@ -124,7 +124,7 @@ const SettingV2 = [
124
124
  },
125
125
  {
126
126
  id: 'ftItemPerSlide',
127
- type: 'input:number',
127
+ type: 'input:stepper',
128
128
  min: 1,
129
129
  hide: true,
130
130
  default: 1
@@ -354,14 +354,14 @@ const SettingV2 = [
354
354
  },
355
355
  {
356
356
  id: 'ilItemPerSlide',
357
- type: 'input:number',
357
+ type: 'input:stepper',
358
358
  min: 1,
359
359
  hide: true,
360
360
  default: 5
361
361
  },
362
362
  {
363
363
  id: 'ilNumberPerRow',
364
- type: 'input:number',
364
+ type: 'input:stepper',
365
365
  label: 'Item per row',
366
366
  hide: true,
367
367
  default: 5
@@ -179,7 +179,7 @@ const ProductListSettings = [
179
179
  {
180
180
  id: 'dotSize',
181
181
  label: 'Dots size',
182
- type: 'input:number',
182
+ type: 'input:stepper',
183
183
  min: 1,
184
184
  devices: {
185
185
  desktop: {
@@ -267,7 +267,7 @@ const ProductListSettings = [
267
267
  {
268
268
  id: 'speed',
269
269
  label: 'Speed(s)',
270
- type: 'input:number',
270
+ type: 'input:stepper',
271
271
  min: 0,
272
272
  max: 60,
273
273
  default: 2,
@@ -64,7 +64,7 @@ const StockCounterSettingsV2 = [
64
64
  },
65
65
  {
66
66
  id: 'remaining',
67
- type: 'input:number',
67
+ type: 'input:stepper',
68
68
  default: 16
69
69
  },
70
70
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.376",
3
+ "version": "2.0.0-dev.377",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",