@gem-sdk/components 2.0.0-dev.391 → 2.0.0-dev.393
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.
- package/dist/cjs/form/components/form-email/FormEmail.js +29 -20
- package/dist/cjs/form/components/form-email/FormEmail.liquid.js +7 -5
- package/dist/cjs/form/components/form-email/common/composeClasses.js +11 -2
- package/dist/cjs/form/components/form-email/common/composeStyles.js +62 -2
- package/dist/cjs/form/components/newsletter/Newsletter.liquid.js +1 -0
- package/dist/cjs/form/components/newsletter/common/composeAttrs.js +1 -2
- package/dist/cjs/form/setting/contact/ContactInitConfig.js +3 -1
- package/dist/cjs/form/setting/form-email/configs/settings.js +190 -28
- package/dist/cjs/form/setting/form-email/configs/uiV2.js +262 -18
- package/dist/cjs/form/setting/text-input/configs/settings.js +6 -3
- package/dist/cjs/form/setting/text-input/configs/uiV2.js +2 -2
- package/dist/cjs/product/setting/product-badge/configs/settings.js +6 -0
- package/dist/cjs/product/setting/product-badge/configs/uiV2.js +14 -19
- package/dist/cjs/product/setting/product-vendor/configs/settings.js +12 -0
- package/dist/cjs/product/setting/product-vendor/configs/uiV2.js +1 -1
- package/dist/cjs/sticky/components/Sticky.js +4 -4
- package/dist/cjs/sticky/components/hooks/useSticky.js +19 -9
- package/dist/esm/form/components/form-email/FormEmail.js +32 -23
- package/dist/esm/form/components/form-email/FormEmail.liquid.js +8 -6
- package/dist/esm/form/components/form-email/common/composeClasses.js +11 -3
- package/dist/esm/form/components/form-email/common/composeStyles.js +63 -4
- package/dist/esm/form/components/newsletter/Newsletter.liquid.js +1 -0
- package/dist/esm/form/components/newsletter/common/composeAttrs.js +1 -2
- package/dist/esm/form/setting/contact/ContactInitConfig.js +3 -1
- package/dist/esm/form/setting/form-email/configs/settings.js +190 -28
- package/dist/esm/form/setting/form-email/configs/uiV2.js +262 -18
- package/dist/esm/form/setting/text-input/configs/settings.js +6 -3
- package/dist/esm/form/setting/text-input/configs/uiV2.js +2 -2
- package/dist/esm/product/setting/product-badge/configs/settings.js +6 -0
- package/dist/esm/product/setting/product-badge/configs/uiV2.js +14 -19
- package/dist/esm/product/setting/product-vendor/configs/settings.js +12 -0
- package/dist/esm/product/setting/product-vendor/configs/uiV2.js +1 -1
- package/dist/esm/sticky/components/Sticky.js +4 -4
- package/dist/esm/sticky/components/hooks/useSticky.js +20 -10
- package/dist/types/index.d.ts +26 -4
- package/package.json +2 -2
|
@@ -14,10 +14,20 @@ const SettingUIV2 = [
|
|
|
14
14
|
isHideClear: true,
|
|
15
15
|
controls: [
|
|
16
16
|
{
|
|
17
|
-
|
|
17
|
+
label: {
|
|
18
|
+
en: 'Content'
|
|
19
|
+
},
|
|
18
20
|
setting: {
|
|
19
21
|
id: 'placeholder'
|
|
20
22
|
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
setting: {
|
|
26
|
+
id: 'placeholderColor'
|
|
27
|
+
},
|
|
28
|
+
label: {
|
|
29
|
+
en: 'Color'
|
|
30
|
+
}
|
|
21
31
|
}
|
|
22
32
|
]
|
|
23
33
|
},
|
|
@@ -38,65 +48,299 @@ const SettingUIV2 = [
|
|
|
38
48
|
label: {
|
|
39
49
|
en: 'Width'
|
|
40
50
|
},
|
|
51
|
+
controlConfig: {
|
|
52
|
+
id: 'width',
|
|
53
|
+
type: 'dropdown:input',
|
|
54
|
+
label: 'Width',
|
|
55
|
+
inputType: 'number',
|
|
56
|
+
units: [
|
|
57
|
+
'px',
|
|
58
|
+
'%'
|
|
59
|
+
],
|
|
60
|
+
hideUnit: false,
|
|
61
|
+
linkWithSetting: {
|
|
62
|
+
name: 'globalSize',
|
|
63
|
+
field: 'width'
|
|
64
|
+
},
|
|
65
|
+
displayOptions: [
|
|
66
|
+
{
|
|
67
|
+
label: 'Default',
|
|
68
|
+
value: '1200px',
|
|
69
|
+
showValue: true
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
label: 'Full',
|
|
73
|
+
value: '100%',
|
|
74
|
+
showValue: true
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
layout: 'horizontal'
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
label: {
|
|
82
|
+
en: 'Height'
|
|
83
|
+
},
|
|
84
|
+
controlConfig: {
|
|
85
|
+
id: 'height',
|
|
86
|
+
type: 'dropdown:input',
|
|
87
|
+
label: 'Height',
|
|
88
|
+
inputType: 'number',
|
|
89
|
+
units: [
|
|
90
|
+
'px',
|
|
91
|
+
'%'
|
|
92
|
+
],
|
|
93
|
+
hideUnit: false,
|
|
94
|
+
linkWithSetting: {
|
|
95
|
+
name: 'globalSize',
|
|
96
|
+
field: 'height'
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
layout: 'horizontal'
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
label: {
|
|
103
|
+
en: 'Padding'
|
|
104
|
+
},
|
|
105
|
+
controlConfig: {
|
|
106
|
+
id: 'padding',
|
|
107
|
+
type: 'padding-v2',
|
|
108
|
+
linkWithSetting: {
|
|
109
|
+
name: 'globalSize',
|
|
110
|
+
field: 'padding'
|
|
111
|
+
},
|
|
112
|
+
compoDefaultValue: {
|
|
113
|
+
desktop: {
|
|
114
|
+
default: {
|
|
115
|
+
type: 'medium',
|
|
116
|
+
top: '12px',
|
|
117
|
+
bottom: '12px',
|
|
118
|
+
left: '24px',
|
|
119
|
+
right: '24px'
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
label: {
|
|
129
|
+
en: 'Background'
|
|
130
|
+
},
|
|
131
|
+
controls: [
|
|
132
|
+
{
|
|
41
133
|
setting: {
|
|
42
|
-
id: '
|
|
134
|
+
id: 'background'
|
|
135
|
+
},
|
|
136
|
+
layout: 'vertical'
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
label: {
|
|
142
|
+
en: 'Shape'
|
|
143
|
+
},
|
|
144
|
+
controls: [
|
|
145
|
+
{
|
|
146
|
+
label: {
|
|
147
|
+
en: 'Border'
|
|
148
|
+
},
|
|
149
|
+
controlConfig: {
|
|
150
|
+
id: 'border',
|
|
151
|
+
type: 'border-v2',
|
|
152
|
+
linkWithSetting: {
|
|
153
|
+
name: 'wrapperBorder'
|
|
154
|
+
}
|
|
43
155
|
}
|
|
44
156
|
},
|
|
45
157
|
{
|
|
46
158
|
label: {
|
|
47
|
-
en: '
|
|
159
|
+
en: 'Corner'
|
|
48
160
|
},
|
|
49
161
|
setting: {
|
|
50
|
-
id: '
|
|
162
|
+
id: 'rounded',
|
|
163
|
+
state: 'normal'
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
label: {
|
|
168
|
+
en: 'Shadow'
|
|
169
|
+
},
|
|
170
|
+
setting: {
|
|
171
|
+
id: 'boxShadow',
|
|
172
|
+
state: 'normal'
|
|
173
|
+
},
|
|
174
|
+
options: {
|
|
175
|
+
updateFields: [
|
|
176
|
+
{
|
|
177
|
+
field: 'enable',
|
|
178
|
+
settingId: 'hasBoxShadow',
|
|
179
|
+
state: 'normal'
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
controlChangeTrigger: {
|
|
184
|
+
settings: [
|
|
185
|
+
{
|
|
186
|
+
condition: `boxShadow.normal.enable === true`,
|
|
187
|
+
source: [
|
|
188
|
+
'boxShadow',
|
|
189
|
+
'hasBoxShadow'
|
|
190
|
+
],
|
|
191
|
+
action: {
|
|
192
|
+
controlId: 'hasBoxShadow',
|
|
193
|
+
groupType: 'advanced',
|
|
194
|
+
controlType: 'advanced',
|
|
195
|
+
state: 'normal',
|
|
196
|
+
newValue: true
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
condition: `boxShadow.normal.enable === false`,
|
|
201
|
+
source: [
|
|
202
|
+
'boxShadow',
|
|
203
|
+
'hasBoxShadow'
|
|
204
|
+
],
|
|
205
|
+
action: {
|
|
206
|
+
controlId: 'hasBoxShadow',
|
|
207
|
+
groupType: 'advanced',
|
|
208
|
+
controlType: 'advanced',
|
|
209
|
+
state: 'normal',
|
|
210
|
+
newValue: false
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
],
|
|
214
|
+
options: {
|
|
215
|
+
noRecordHistory: true
|
|
216
|
+
}
|
|
51
217
|
}
|
|
52
218
|
}
|
|
53
219
|
]
|
|
54
220
|
},
|
|
55
221
|
{
|
|
56
222
|
label: {
|
|
57
|
-
en: '
|
|
223
|
+
en: 'Hover effect'
|
|
58
224
|
},
|
|
59
225
|
controls: [
|
|
60
226
|
{
|
|
61
227
|
label: {
|
|
62
|
-
en: '
|
|
228
|
+
en: 'Text color'
|
|
63
229
|
},
|
|
64
230
|
setting: {
|
|
65
|
-
id: '
|
|
231
|
+
id: 'textColorHover',
|
|
232
|
+
state: 'hover'
|
|
66
233
|
}
|
|
67
234
|
},
|
|
68
235
|
{
|
|
69
236
|
label: {
|
|
70
|
-
en: '
|
|
237
|
+
en: 'Background'
|
|
71
238
|
},
|
|
72
239
|
setting: {
|
|
73
|
-
id: '
|
|
240
|
+
id: 'backgroundColorV2Hover',
|
|
241
|
+
state: 'hover'
|
|
74
242
|
}
|
|
75
243
|
},
|
|
76
244
|
{
|
|
77
245
|
label: {
|
|
78
|
-
en: '
|
|
246
|
+
en: 'Border'
|
|
79
247
|
},
|
|
80
248
|
setting: {
|
|
81
|
-
id: '
|
|
249
|
+
id: 'borderEmailHover',
|
|
250
|
+
state: 'hover'
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
label: {
|
|
255
|
+
en: 'Corner'
|
|
256
|
+
},
|
|
257
|
+
setting: {
|
|
258
|
+
id: 'roundedEmailHover',
|
|
259
|
+
state: 'hover'
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
label: {
|
|
264
|
+
en: 'Shadow'
|
|
265
|
+
},
|
|
266
|
+
setting: {
|
|
267
|
+
id: 'boxShadowEmailHover',
|
|
268
|
+
state: 'hover'
|
|
82
269
|
}
|
|
83
270
|
}
|
|
84
271
|
]
|
|
85
272
|
},
|
|
86
273
|
{
|
|
274
|
+
label: {
|
|
275
|
+
en: 'Active state'
|
|
276
|
+
},
|
|
87
277
|
controls: [
|
|
88
278
|
{
|
|
89
279
|
label: {
|
|
90
|
-
en: '
|
|
280
|
+
en: 'Text color'
|
|
281
|
+
},
|
|
282
|
+
setting: {
|
|
283
|
+
id: 'textColorActive',
|
|
284
|
+
state: 'active'
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
label: {
|
|
289
|
+
en: 'Background'
|
|
91
290
|
},
|
|
92
|
-
conditionEnable: '!(parseInt(width) >= 100 && width?.includes("%"))',
|
|
93
291
|
setting: {
|
|
94
|
-
id: '
|
|
292
|
+
id: 'backgroundColorV2Active',
|
|
293
|
+
state: 'active'
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
label: {
|
|
298
|
+
en: 'Border'
|
|
95
299
|
},
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
300
|
+
setting: {
|
|
301
|
+
id: 'borderEmailActive',
|
|
302
|
+
state: 'active'
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
label: {
|
|
307
|
+
en: 'Corner'
|
|
308
|
+
},
|
|
309
|
+
setting: {
|
|
310
|
+
id: 'roundedEmailActive',
|
|
311
|
+
state: 'active'
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
label: {
|
|
316
|
+
en: 'Shadow'
|
|
317
|
+
},
|
|
318
|
+
setting: {
|
|
319
|
+
id: 'boxShadowEmailActive',
|
|
320
|
+
state: 'active'
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
]
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
label: {
|
|
327
|
+
en: 'Configuration'
|
|
328
|
+
},
|
|
329
|
+
controls: [
|
|
330
|
+
{
|
|
331
|
+
label: {
|
|
332
|
+
en: 'Required'
|
|
333
|
+
},
|
|
334
|
+
setting: {
|
|
335
|
+
id: 'required'
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
label: {
|
|
340
|
+
en: 'Hide on client'
|
|
341
|
+
},
|
|
342
|
+
setting: {
|
|
343
|
+
id: 'hideOnClient'
|
|
100
344
|
}
|
|
101
345
|
}
|
|
102
346
|
]
|
|
@@ -82,7 +82,10 @@ const TextInputSettings = [
|
|
|
82
82
|
label: 'Text styles',
|
|
83
83
|
type: 'typography-v2',
|
|
84
84
|
default: {
|
|
85
|
-
type: 'paragraph-1'
|
|
85
|
+
type: 'paragraph-1',
|
|
86
|
+
attrs: {
|
|
87
|
+
color: 'text-2'
|
|
88
|
+
}
|
|
86
89
|
},
|
|
87
90
|
hiddenSetting: {
|
|
88
91
|
textAlign: true,
|
|
@@ -199,8 +202,8 @@ const TextInputSettings = [
|
|
|
199
202
|
type: 'medium',
|
|
200
203
|
top: '12px',
|
|
201
204
|
bottom: '12px',
|
|
202
|
-
left: '
|
|
203
|
-
right: '
|
|
205
|
+
left: '12px',
|
|
206
|
+
right: '12px'
|
|
204
207
|
}
|
|
205
208
|
}
|
|
206
209
|
}
|
|
@@ -127,6 +127,12 @@ const ProductBadgeSettings = [
|
|
|
127
127
|
}
|
|
128
128
|
]
|
|
129
129
|
},
|
|
130
|
+
{
|
|
131
|
+
id: 'contentBanner',
|
|
132
|
+
type: 'banner',
|
|
133
|
+
message: `{inventory_quantity} Only work with product enable “Track inventory”`,
|
|
134
|
+
closable: true
|
|
135
|
+
},
|
|
130
136
|
{
|
|
131
137
|
id: 'contentType',
|
|
132
138
|
label: 'Shape',
|
|
@@ -93,6 +93,16 @@ const SettingUIV2 = [
|
|
|
93
93
|
setting: {
|
|
94
94
|
id: 'displayContent'
|
|
95
95
|
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
label: {
|
|
99
|
+
en: ''
|
|
100
|
+
},
|
|
101
|
+
layout: 'vertical',
|
|
102
|
+
setting: {
|
|
103
|
+
id: 'contentBanner'
|
|
104
|
+
},
|
|
105
|
+
conditionDisplay: 'displayContent.includes("{inventory_quantity}")'
|
|
96
106
|
}
|
|
97
107
|
]
|
|
98
108
|
},
|
|
@@ -347,26 +357,10 @@ const SettingUIV2 = [
|
|
|
347
357
|
},
|
|
348
358
|
controls: [
|
|
349
359
|
{
|
|
350
|
-
id: 'badge-position',
|
|
351
|
-
type: 'combo',
|
|
352
|
-
iconName: 'polaris-plus',
|
|
353
|
-
isHideClear: true,
|
|
354
|
-
fixedValue: 'Edit',
|
|
355
|
-
popoverLabel: {
|
|
356
|
-
en: 'Position'
|
|
357
|
-
},
|
|
358
|
-
label: {
|
|
359
|
-
en: 'Choose'
|
|
360
|
-
},
|
|
361
360
|
layout: 'vertical',
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
setting: {
|
|
366
|
-
id: 'position'
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
]
|
|
361
|
+
setting: {
|
|
362
|
+
id: 'position'
|
|
363
|
+
}
|
|
370
364
|
}
|
|
371
365
|
],
|
|
372
366
|
conditionDisplay: 'positionWithImage === "inside"'
|
|
@@ -389,6 +383,7 @@ const SettingUIV2 = [
|
|
|
389
383
|
en: 'Align'
|
|
390
384
|
},
|
|
391
385
|
conditionEnable: '!(parseInt(textSizeV2) >= 100 && textSizeV2?.includes("%"))',
|
|
386
|
+
conditionDisplay: 'positionWithImage === "outside"',
|
|
392
387
|
setting: {
|
|
393
388
|
id: 'align'
|
|
394
389
|
},
|
|
@@ -99,6 +99,18 @@ const ProductVendorSettings = [
|
|
|
99
99
|
},
|
|
100
100
|
ignoreReRender: true,
|
|
101
101
|
hiddenSetting: {
|
|
102
|
+
},
|
|
103
|
+
compoDefaultValue: {
|
|
104
|
+
custom: {
|
|
105
|
+
textShadow: {
|
|
106
|
+
angle: 145,
|
|
107
|
+
distance: '2px',
|
|
108
|
+
blur: '20px',
|
|
109
|
+
color: 'rgba(18, 18, 18, 0.2)',
|
|
110
|
+
type: 'custom',
|
|
111
|
+
enable: true
|
|
112
|
+
}
|
|
113
|
+
}
|
|
102
114
|
}
|
|
103
115
|
},
|
|
104
116
|
{
|
|
@@ -105,7 +105,7 @@ const SettingUIV2 = [
|
|
|
105
105
|
toggleStyle: 'switch'
|
|
106
106
|
},
|
|
107
107
|
help: {
|
|
108
|
-
content: `Click to open a collection page with all products from the same vendor.`
|
|
108
|
+
content: `Click to open a collection page with<br> all products from the same vendor.`
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
111
|
{
|
|
@@ -16,9 +16,9 @@ const Sticky = ({ children, builderAttrs, setting, style, builderProps })=>{
|
|
|
16
16
|
...style,
|
|
17
17
|
...w,
|
|
18
18
|
...getStyleBackgroundByDevice(background),
|
|
19
|
-
...displayStyle
|
|
20
|
-
...positionStyle
|
|
21
|
-
...getCSSAlign
|
|
19
|
+
...displayStyle,
|
|
20
|
+
...positionStyle,
|
|
21
|
+
...getCSSAlign,
|
|
22
22
|
zIndex: ELEMENT_Z_INDEX.STICKY
|
|
23
23
|
});
|
|
24
24
|
const computedMinimizeClasses = createClass(composeClasses('sticky-minimize gp-fixed gp-flex gp-h-[32px] gp-w-[76px] gp-cursor-pointer gp-items-center gp-gap-[4px] gp-border gp-border-[#D8E1FF] gp-bg-white hover:gp-bg-[#D8E1FF]'));
|
|
@@ -29,7 +29,7 @@ const Sticky = ({ children, builderAttrs, setting, style, builderProps })=>{
|
|
|
29
29
|
"data-id": builderProps?.uid,
|
|
30
30
|
...builderAttrs,
|
|
31
31
|
style: {
|
|
32
|
-
...displayStyle
|
|
32
|
+
...displayStyle,
|
|
33
33
|
zIndex: ELEMENT_Z_INDEX.STICKY
|
|
34
34
|
},
|
|
35
35
|
children: [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { makeStyleResponsive, usePageStore, useCurrentDevice } from '@gem-sdk/core';
|
|
2
2
|
import { createStyleObject } from '../../../grid/row/commons/helpers.js';
|
|
3
|
-
import { useMemo
|
|
3
|
+
import { useMemo } from 'react';
|
|
4
4
|
|
|
5
5
|
const minimizeSvg = ` <svg
|
|
6
6
|
className="gp-ml-[7px]"
|
|
@@ -66,13 +66,17 @@ const useSticky = (setting)=>{
|
|
|
66
66
|
[`--t${device}`]: position == 'top' ? 'unset' : 'translateX(-50%)'
|
|
67
67
|
};
|
|
68
68
|
};
|
|
69
|
-
const getCSSAlign = ()=>{
|
|
69
|
+
const getCSSAlign = useMemo(()=>{
|
|
70
70
|
return {
|
|
71
71
|
...getCSSAlignByDevice(position?.desktop, ''),
|
|
72
72
|
...getCSSAlignByDevice(position?.tablet ?? position?.desktop, '-tablet'),
|
|
73
73
|
...getCSSAlignByDevice(position?.mobile ?? position?.desktop, '-mobile')
|
|
74
74
|
};
|
|
75
|
-
}
|
|
75
|
+
}, [
|
|
76
|
+
position?.desktop,
|
|
77
|
+
position?.mobile,
|
|
78
|
+
position?.tablet
|
|
79
|
+
]);
|
|
76
80
|
const gap = useMemo(()=>{
|
|
77
81
|
if (sidebarMode && position?.[currentDevice] === 'top') {
|
|
78
82
|
return '40px';
|
|
@@ -83,26 +87,32 @@ const useSticky = (setting)=>{
|
|
|
83
87
|
sidebarMode,
|
|
84
88
|
position
|
|
85
89
|
]);
|
|
86
|
-
const displayStyle =
|
|
90
|
+
const displayStyle = useMemo(()=>{
|
|
87
91
|
return {
|
|
88
92
|
[`--top`]: gap ?? 'auto',
|
|
89
93
|
[`--top-tablet`]: gap ?? 'auto',
|
|
90
94
|
[`--top-mobile`]: gap ?? 'auto',
|
|
91
|
-
[`--${position?.desktop}`]: gap ??
|
|
92
|
-
[`--${position?.tablet ?? position?.desktop}-tablet`]: gap ??
|
|
93
|
-
[`--${position?.mobile ?? position?.desktop}-mobile`]: gap ??
|
|
95
|
+
[`--${position?.desktop}`]: gap ?? '0px',
|
|
96
|
+
[`--${position?.tablet ?? position?.desktop}-tablet`]: gap ?? '0px',
|
|
97
|
+
[`--${position?.mobile ?? position?.desktop}-mobile`]: gap ?? '0px'
|
|
94
98
|
};
|
|
95
99
|
}, [
|
|
96
100
|
gap,
|
|
97
|
-
position
|
|
101
|
+
position?.desktop,
|
|
102
|
+
position?.mobile,
|
|
103
|
+
position?.tablet
|
|
98
104
|
]);
|
|
99
|
-
const positionStyle = ()=>{
|
|
105
|
+
const positionStyle = useMemo(()=>{
|
|
100
106
|
return {
|
|
101
107
|
[`--pos`]: getCSSPosition(position?.desktop),
|
|
102
108
|
[`--pos-tablet`]: getCSSPosition(position?.tablet ?? position?.desktop),
|
|
103
109
|
[`--pos-mobile`]: getCSSPosition(position?.mobile ?? position?.desktop)
|
|
104
110
|
};
|
|
105
|
-
}
|
|
111
|
+
}, [
|
|
112
|
+
position?.desktop,
|
|
113
|
+
position?.mobile,
|
|
114
|
+
position?.tablet
|
|
115
|
+
]);
|
|
106
116
|
return {
|
|
107
117
|
w,
|
|
108
118
|
displayStyle,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1545,8 +1545,29 @@ type FormEmailSetting = {
|
|
|
1545
1545
|
fullWidth?: ObjectDevices$1<boolean>;
|
|
1546
1546
|
width?: ObjectDevices$1<string | number | undefined>;
|
|
1547
1547
|
align?: ObjectDevices$1<AlignProp>;
|
|
1548
|
+
wrapperBorder?: Border;
|
|
1549
|
+
background?: ObjectDevices$1<BackgroundMedia>;
|
|
1550
|
+
placeholderColor?: ColorValueType$1;
|
|
1551
|
+
title?: string;
|
|
1552
|
+
showTitle?: boolean;
|
|
1548
1553
|
};
|
|
1549
|
-
type
|
|
1554
|
+
type FormEmailStyle = {
|
|
1555
|
+
globalSize?: ObjectDevices$1<SizeSettingGlobal>;
|
|
1556
|
+
horizontalSpacing?: ObjectDevices$1<Property.Padding>;
|
|
1557
|
+
borderRadius?: CornerRadius;
|
|
1558
|
+
wrapperBorder?: Border;
|
|
1559
|
+
borderEmailHover?: StateProp<Border>;
|
|
1560
|
+
textColorHover?: StateProp<ColorValueType$1>;
|
|
1561
|
+
backgroundColorV2Hover?: StateProp<ColorValueType$1>;
|
|
1562
|
+
roundedEmailHover?: StateProp<CornerRadius>;
|
|
1563
|
+
boxShadowEmailHover?: StateProp<ShadowProps$1>;
|
|
1564
|
+
borderEmailActive?: StateProp<Border>;
|
|
1565
|
+
textColorActive?: StateProp<ColorValueType$1>;
|
|
1566
|
+
backgroundColorV2Active?: StateProp<ColorValueType$1>;
|
|
1567
|
+
roundedEmailActive?: StateProp<CornerRadius>;
|
|
1568
|
+
boxShadowEmailActive?: StateProp<ShadowProps$1>;
|
|
1569
|
+
};
|
|
1570
|
+
type FormEmailProps = BasePropsWrap<FormEmailSetting, FormEmailStyle, Advanced> & {
|
|
1550
1571
|
children: React.ReactNode;
|
|
1551
1572
|
};
|
|
1552
1573
|
type NewsLetterSetting = {
|
|
@@ -1653,7 +1674,7 @@ declare const Newsletter$1: ({ children, setting, styles }: NewsletterProps) =>
|
|
|
1653
1674
|
|
|
1654
1675
|
declare const ContactForm$1: ({ children, styles, setting }: NewsletterProps) => React.JSX.Element;
|
|
1655
1676
|
|
|
1656
|
-
declare const FormEmail$1: ({ builderProps, builderAttrs, setting, advanced, children }: FormEmailProps) => React.JSX.Element;
|
|
1677
|
+
declare const FormEmail$1: ({ builderProps, builderAttrs, setting, advanced, children, styles, }: FormEmailProps) => React.JSX.Element;
|
|
1657
1678
|
|
|
1658
1679
|
declare const SubmitButton$1: ({ setting, builderProps, builderAttrs, style, styles, advanced, children, }: SubmitButtonProps) => React.JSX.Element;
|
|
1659
1680
|
|
|
@@ -3783,6 +3804,7 @@ type ProductBadgeProps = BasePropsWrap<{
|
|
|
3783
3804
|
alt?: string;
|
|
3784
3805
|
src?: string;
|
|
3785
3806
|
};
|
|
3807
|
+
contentBanner?: string;
|
|
3786
3808
|
}, {
|
|
3787
3809
|
typo?: TypographySettingV2;
|
|
3788
3810
|
position?: ObjectDevices$1<PositionType>;
|
|
@@ -6044,7 +6066,7 @@ declare const Newsletter: ({ builderProps, setting, children, style, formType, a
|
|
|
6044
6066
|
|
|
6045
6067
|
declare const ContactForm: ({ builderProps, setting, children, style, advanced, pageContext, styles, }: NewsletterProps) => string;
|
|
6046
6068
|
|
|
6047
|
-
declare const FormEmail: ({ builderProps, builderAttrs, setting, advanced, pageContext, }: _gem_sdk_core.BaseProps<FormEmailSetting,
|
|
6069
|
+
declare const FormEmail: ({ builderProps, builderAttrs, setting, advanced, pageContext, styles, }: _gem_sdk_core.BaseProps<FormEmailSetting, FormEmailStyle, any> & {
|
|
6048
6070
|
builderAttrs?: Record<string, any> | undefined;
|
|
6049
6071
|
style?: React.CSSProperties | undefined;
|
|
6050
6072
|
} & {
|
|
@@ -7220,7 +7242,7 @@ declare const _default$1: {
|
|
|
7220
7242
|
EstimateDate: React.FC<EstimateDateProps>;
|
|
7221
7243
|
Newsletter: ({ children, setting, styles }: NewsletterProps) => React.JSX.Element;
|
|
7222
7244
|
ContactForm: ({ children, styles, setting }: NewsletterProps) => React.JSX.Element;
|
|
7223
|
-
FormEmail: ({ builderProps, builderAttrs, setting, advanced, children }: FormEmailProps) => React.JSX.Element;
|
|
7245
|
+
FormEmail: ({ builderProps, builderAttrs, setting, advanced, children, styles, }: FormEmailProps) => React.JSX.Element;
|
|
7224
7246
|
SubmitButton: ({ setting, builderProps, builderAttrs, style, styles, advanced, children, }: SubmitButtonProps) => React.JSX.Element;
|
|
7225
7247
|
TextField: React.FC<TextFieldProps>;
|
|
7226
7248
|
TextInput: React.FC<TextInputProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.393",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"relationship": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/get-control-relationship.js && node ./scripts/get-element-relationship.js"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@gem-sdk/core": "2.0.0-dev.
|
|
25
|
+
"@gem-sdk/core": "2.0.0-dev.393",
|
|
26
26
|
"@gem-sdk/styles": "2.0.0-dev.381",
|
|
27
27
|
"@gem-sdk/system": "2.0.0-dev.371",
|
|
28
28
|
"@types/react-transition-group": "^4.4.5"
|