@gem-sdk/components 2.0.0-dev.275 → 2.0.0-dev.277

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.
Files changed (94) hide show
  1. package/dist/cjs/article/components/ArticleReadMore.js +2 -4
  2. package/dist/cjs/banner/components/HeroBannerItem.liquid.js +4 -4
  3. package/dist/cjs/builder.js +4 -8
  4. package/dist/cjs/button/components/Button.js +111 -184
  5. package/dist/cjs/button/components/Button.liquid.js +108 -171
  6. package/dist/cjs/button/components/ButtonIcon.js +17 -0
  7. package/dist/cjs/button/components/ButtonIcon.liquid.js +16 -0
  8. package/dist/cjs/button/components/ButtonLabel.js +18 -0
  9. package/dist/cjs/button/components/ButtonLabel.liquid.js +15 -0
  10. package/dist/cjs/button/components/ButtonLoadingIndicator.liquid.js +12 -0
  11. package/dist/cjs/button/components/common/attributes.js +15 -0
  12. package/dist/cjs/button/components/common/classes.js +55 -0
  13. package/dist/cjs/button/components/common/constants.js +26 -0
  14. package/dist/cjs/button/components/common/data.js +76 -0
  15. package/dist/cjs/button/components/common/helpers.js +131 -0
  16. package/dist/cjs/button/components/common/styles.js +157 -0
  17. package/dist/cjs/button/next.js +2 -6
  18. package/dist/cjs/button/setting/configs/settings.js +5 -1
  19. package/dist/cjs/cart/components/CheckoutNow.js +0 -2
  20. package/dist/cjs/coupon/components/Coupon.js +1 -3
  21. package/dist/cjs/dialog/setting/Dialog.js +7 -580
  22. package/dist/cjs/dialog/setting/configs/settings.js +325 -0
  23. package/dist/cjs/dialog/setting/configs/uiV1.js +288 -0
  24. package/dist/cjs/dialog/setting/configs/uiV2.js +258 -0
  25. package/dist/cjs/estimate-delivery/components/EstimateDate.liquid.js +3 -3
  26. package/dist/cjs/form/components/submit-button/SubmitButton.js +0 -4
  27. package/dist/cjs/index.js +2 -4
  28. package/dist/cjs/index.liquid.js +1 -3
  29. package/dist/cjs/product/components/DynamicCheckout/DynamicCheckout.js +2 -5
  30. package/dist/cjs/product/components/DynamicCheckout.js +2 -5
  31. package/dist/cjs/product/components/FileUpload/components/common/index.js +1 -1
  32. package/dist/cjs/product/components/ProductButton.js +2 -3
  33. package/dist/cjs/product/components/ProductButton.liquid.js +3 -3
  34. package/dist/cjs/product/components/ProductDescription/index.liquid.js +1 -2
  35. package/dist/cjs/product/components/ProductViewMore.js +2 -5
  36. package/dist/cjs/product/components/ProductViewMore.liquid.js +2 -2
  37. package/dist/cjs/setting.js +2 -2
  38. package/dist/cjs/text/components/common/getClasses.js +1 -1
  39. package/dist/cjs/third-party/components/PushOwl.js +0 -5
  40. package/dist/esm/article/components/ArticleReadMore.js +1 -3
  41. package/dist/esm/banner/components/HeroBannerItem.liquid.js +4 -4
  42. package/dist/esm/builder.js +1 -5
  43. package/dist/esm/button/components/Button.js +113 -186
  44. package/dist/esm/button/components/Button.liquid.js +109 -172
  45. package/dist/esm/button/components/ButtonIcon.js +13 -0
  46. package/dist/esm/button/components/ButtonIcon.liquid.js +12 -0
  47. package/dist/esm/button/components/ButtonLabel.js +14 -0
  48. package/dist/esm/button/components/ButtonLabel.liquid.js +11 -0
  49. package/dist/esm/button/components/ButtonLoadingIndicator.liquid.js +8 -0
  50. package/dist/esm/button/components/common/attributes.js +13 -0
  51. package/dist/esm/button/components/common/classes.js +49 -0
  52. package/dist/esm/button/components/common/constants.js +24 -0
  53. package/dist/esm/button/components/common/data.js +74 -0
  54. package/dist/esm/button/components/common/helpers.js +118 -0
  55. package/dist/esm/button/components/common/styles.js +148 -0
  56. package/dist/esm/button/next.js +2 -6
  57. package/dist/esm/button/setting/configs/settings.js +5 -1
  58. package/dist/esm/cart/components/CheckoutNow.js +0 -2
  59. package/dist/esm/coupon/components/Coupon.js +1 -3
  60. package/dist/esm/dialog/setting/Dialog.js +7 -580
  61. package/dist/esm/dialog/setting/configs/settings.js +323 -0
  62. package/dist/esm/dialog/setting/configs/uiV1.js +286 -0
  63. package/dist/esm/dialog/setting/configs/uiV2.js +256 -0
  64. package/dist/esm/estimate-delivery/components/EstimateDate.liquid.js +3 -3
  65. package/dist/esm/form/components/submit-button/SubmitButton.js +0 -4
  66. package/dist/esm/index.js +1 -2
  67. package/dist/esm/index.liquid.js +1 -2
  68. package/dist/esm/product/components/DynamicCheckout/DynamicCheckout.js +1 -4
  69. package/dist/esm/product/components/DynamicCheckout.js +1 -4
  70. package/dist/esm/product/components/FileUpload/components/common/index.js +1 -1
  71. package/dist/esm/product/components/ProductButton.js +1 -2
  72. package/dist/esm/product/components/ProductButton.liquid.js +1 -1
  73. package/dist/esm/product/components/ProductDescription/index.liquid.js +3 -4
  74. package/dist/esm/product/components/ProductViewMore.js +1 -4
  75. package/dist/esm/product/components/ProductViewMore.liquid.js +1 -1
  76. package/dist/esm/setting.js +2 -2
  77. package/dist/esm/text/components/common/getClasses.js +1 -1
  78. package/dist/esm/third-party/components/PushOwl.js +0 -5
  79. package/dist/types/index.d.ts +174 -266
  80. package/package.json +2 -2
  81. package/dist/cjs/button/components/v2/ButtonIcon.js +0 -18
  82. package/dist/cjs/button/components/v2/ButtonLabel.js +0 -25
  83. package/dist/cjs/button/components/v2/ButtonV2.js +0 -140
  84. package/dist/cjs/button/components/v2/ButtonV2.liquid.js +0 -181
  85. package/dist/cjs/button/hooks/useButtonCustomCss.js +0 -88
  86. package/dist/cjs/button/hooks/useButtonStyles.js +0 -93
  87. package/dist/esm/button/components/v2/ButtonIcon.js +0 -14
  88. package/dist/esm/button/components/v2/ButtonLabel.js +0 -21
  89. package/dist/esm/button/components/v2/ButtonV2.js +0 -136
  90. package/dist/esm/button/components/v2/ButtonV2.liquid.js +0 -177
  91. package/dist/esm/button/hooks/useButtonCustomCss.js +0 -84
  92. package/dist/esm/button/hooks/useButtonStyles.js +0 -91
  93. /package/dist/cjs/button/components/{v2/ButtonLoadingIndicator.js → ButtonLoadingIndicator.js} +0 -0
  94. /package/dist/esm/button/components/{v2/ButtonLoadingIndicator.js → ButtonLoadingIndicator.js} +0 -0
@@ -0,0 +1,325 @@
1
+ 'use strict';
2
+
3
+ const DialogSettings = [
4
+ {
5
+ id: 'setting',
6
+ controls: [
7
+ {
8
+ id: 'closeButtonPosition',
9
+ type: 'segment',
10
+ options: [
11
+ {
12
+ label: 'Inside',
13
+ value: 'inside'
14
+ },
15
+ {
16
+ label: 'Outside',
17
+ value: 'outside'
18
+ }
19
+ ],
20
+ default: 'inside'
21
+ },
22
+ {
23
+ id: 'position',
24
+ type: 'position:square',
25
+ default: 'center'
26
+ },
27
+ {
28
+ id: 'effectType',
29
+ type: 'select',
30
+ options: [
31
+ {
32
+ label: 'Fade',
33
+ value: 'fade'
34
+ },
35
+ {
36
+ label: 'Zoom',
37
+ value: 'zoom'
38
+ },
39
+ {
40
+ label: 'Zoom out',
41
+ value: 'zoom-out'
42
+ },
43
+ {
44
+ label: 'Horizontal move',
45
+ value: 'horizontal'
46
+ },
47
+ {
48
+ label: 'Vertical move',
49
+ value: 'vertical'
50
+ },
51
+ {
52
+ label: '3d Unfold',
53
+ value: 'unfold'
54
+ },
55
+ {
56
+ label: 'None',
57
+ value: 'none'
58
+ }
59
+ ],
60
+ default: 'fade'
61
+ },
62
+ {
63
+ id: 'closeOnClickOutside',
64
+ type: 'toggle',
65
+ default: true
66
+ },
67
+ {
68
+ id: 'name',
69
+ type: 'input',
70
+ placeholder: 'E.g. New popup',
71
+ clearButton: false
72
+ },
73
+ {
74
+ id: 'width',
75
+ type: 'input:unit',
76
+ placeholder: 'Auto',
77
+ units: [
78
+ 'px',
79
+ '%'
80
+ ],
81
+ devices: {
82
+ desktop: {
83
+ default: '600px'
84
+ },
85
+ mobile: {
86
+ default: '100%'
87
+ }
88
+ }
89
+ },
90
+ {
91
+ id: 'height',
92
+ type: 'input:unit',
93
+ placeholder: 'Auto',
94
+ units: [
95
+ 'px',
96
+ '%'
97
+ ],
98
+ devices: {
99
+ desktop: {
100
+ default: undefined
101
+ }
102
+ }
103
+ },
104
+ {
105
+ id: 'fullScreen',
106
+ type: 'toggle',
107
+ devices: {
108
+ desktop: {
109
+ default: false
110
+ }
111
+ }
112
+ },
113
+ {
114
+ id: 'isOverlay',
115
+ type: 'toggle',
116
+ default: true
117
+ },
118
+ {
119
+ id: 'overlayColor',
120
+ type: 'color-picker-v2',
121
+ default: '#121212'
122
+ },
123
+ {
124
+ id: 'overlayOpacity',
125
+ type: 'input:slider',
126
+ min: 0,
127
+ step: 1,
128
+ max: 100,
129
+ default: 70,
130
+ units: [
131
+ '%'
132
+ ],
133
+ useOnlyUnitInit: true
134
+ },
135
+ {
136
+ id: 'triggerTime',
137
+ type: 'input:slider',
138
+ min: 0,
139
+ default: 10,
140
+ max: 100,
141
+ units: [
142
+ 's'
143
+ ],
144
+ useOnlyUnitInit: true
145
+ },
146
+ {
147
+ id: 'triggerPercentage',
148
+ type: 'input:slider',
149
+ units: [
150
+ '%'
151
+ ],
152
+ min: 0,
153
+ max: 100,
154
+ default: 10,
155
+ useOnlyUnitInit: true
156
+ },
157
+ {
158
+ id: 'frequency',
159
+ type: 'input:slider',
160
+ min: 1,
161
+ max: 30,
162
+ default: 3,
163
+ units: [
164
+ 'days'
165
+ ],
166
+ useOnlyUnitInit: true
167
+ },
168
+ {
169
+ id: 'frequencyMode',
170
+ type: 'select',
171
+ options: [
172
+ {
173
+ label: 'Once per user',
174
+ value: 'once'
175
+ },
176
+ {
177
+ label: 'Each visit time',
178
+ value: 'every'
179
+ },
180
+ {
181
+ label: 'After a time',
182
+ value: 'after-period-time'
183
+ }
184
+ ],
185
+ default: 'once'
186
+ },
187
+ {
188
+ id: 'btnSize',
189
+ type: 'input:number',
190
+ default: 32
191
+ },
192
+ {
193
+ id: 'iconSize',
194
+ type: 'input:unit',
195
+ units: [
196
+ 'px'
197
+ ],
198
+ default: '12px'
199
+ },
200
+ {
201
+ id: 'btnBg',
202
+ type: 'color-picker-v2',
203
+ default: '#ffffff'
204
+ },
205
+ {
206
+ id: 'btnColor',
207
+ type: 'color-picker-v2',
208
+ default: 'line-3'
209
+ },
210
+ {
211
+ id: 'trigger',
212
+ type: 'select',
213
+ options: [
214
+ {
215
+ label: 'None',
216
+ value: 'none'
217
+ },
218
+ {
219
+ label: 'After loaded',
220
+ value: 'show-on-page-load'
221
+ },
222
+ {
223
+ label: 'After a time',
224
+ value: 'show-after-time'
225
+ },
226
+ {
227
+ label: 'Scroll partially',
228
+ value: 'show-after-scroll'
229
+ },
230
+ {
231
+ label: 'About to exit',
232
+ value: 'show-when-about-exit'
233
+ }
234
+ ],
235
+ default: 'none'
236
+ },
237
+ {
238
+ id: 'mobileTrigger',
239
+ type: 'select',
240
+ options: [
241
+ {
242
+ label: 'None',
243
+ value: 'none'
244
+ },
245
+ {
246
+ label: 'Timer',
247
+ value: 'timer'
248
+ }
249
+ ],
250
+ default: 'none'
251
+ },
252
+ {
253
+ id: 'mobileTriggerTime',
254
+ type: 'input:slider',
255
+ min: 0,
256
+ default: 10,
257
+ max: 100,
258
+ units: [
259
+ 's'
260
+ ],
261
+ useOnlyUnitInit: true
262
+ },
263
+ {
264
+ id: 'btnRounded',
265
+ type: 'radius-preset',
266
+ default: {
267
+ radiusType: 'none'
268
+ }
269
+ },
270
+ {
271
+ id: 'background',
272
+ type: 'background-media',
273
+ ignoreReRender: true,
274
+ allowBackgroundImageAndVideo: false,
275
+ devices: {
276
+ desktop: {
277
+ default: {
278
+ type: 'color',
279
+ color: '#FFFFFF',
280
+ image: {
281
+ src: '',
282
+ width: 0,
283
+ height: 0
284
+ },
285
+ size: 'cover',
286
+ position: {
287
+ x: 50,
288
+ y: 50
289
+ },
290
+ repeat: 'no-repeat',
291
+ attachment: 'scroll'
292
+ }
293
+ }
294
+ },
295
+ compoDefaultValue: {
296
+ desktop: {
297
+ default: {
298
+ type: 'color',
299
+ color: '#CCCCCC',
300
+ image: {
301
+ src: 'https://ucarecdn.com/5e27d43d-eb1e-4e71-b7e1-4158f3071bb6/-/format/auto/',
302
+ width: 1200,
303
+ height: 480
304
+ },
305
+ size: 'cover',
306
+ position: {
307
+ x: 50,
308
+ y: 50
309
+ },
310
+ repeat: 'no-repeat',
311
+ attachment: 'scroll',
312
+ preload: false,
313
+ video: 'https://youtu.be/KOxfzBp72uk',
314
+ videoHtml5: 'https://media.w3.org/2010/05/sintel/trailer.mp4',
315
+ videoType: 'youtube',
316
+ loop: false
317
+ }
318
+ }
319
+ }
320
+ }
321
+ ]
322
+ }
323
+ ];
324
+
325
+ exports.DialogSettings = DialogSettings;
@@ -0,0 +1,288 @@
1
+ 'use strict';
2
+
3
+ const SettingUIV1 = [
4
+ {
5
+ type: 'group',
6
+ label: {
7
+ en: 'Display'
8
+ },
9
+ controls: [
10
+ {
11
+ type: 'control',
12
+ label: {
13
+ en: 'Name'
14
+ },
15
+ setting: {
16
+ id: 'name'
17
+ }
18
+ },
19
+ {
20
+ type: 'control',
21
+ label: {
22
+ en: 'Show when'
23
+ },
24
+ setting: {
25
+ id: 'trigger'
26
+ }
27
+ },
28
+ {
29
+ type: 'control',
30
+ condition: `trigger === 'show-after-time'`,
31
+ label: {
32
+ en: 'Time'
33
+ },
34
+ setting: {
35
+ id: 'triggerTime'
36
+ }
37
+ },
38
+ {
39
+ type: 'control',
40
+ condition: `trigger === 'show-after-scroll'`,
41
+ label: {
42
+ en: 'Scroll'
43
+ },
44
+ setting: {
45
+ id: 'triggerPercentage'
46
+ }
47
+ },
48
+ {
49
+ type: 'control',
50
+ condition: `trigger === 'show-when-about-exit'`,
51
+ label: {
52
+ en: 'On mobile'
53
+ },
54
+ setting: {
55
+ id: 'mobileTrigger'
56
+ }
57
+ },
58
+ {
59
+ type: 'control',
60
+ condition: `trigger === 'show-when-about-exit' && mobileTrigger === 'timer'`,
61
+ label: {
62
+ en: 'After load'
63
+ },
64
+ setting: {
65
+ id: 'mobileTriggerTime'
66
+ }
67
+ }
68
+ ]
69
+ },
70
+ {
71
+ type: 'group',
72
+ label: {
73
+ en: 'Show frequency'
74
+ },
75
+ controls: [
76
+ {
77
+ type: 'control',
78
+ label: {
79
+ en: 'Show mode'
80
+ },
81
+ setting: {
82
+ id: 'frequencyMode'
83
+ }
84
+ },
85
+ {
86
+ type: 'control',
87
+ condition: `frequencyMode === 'after-period-time'`,
88
+ label: {
89
+ en: 'Display time'
90
+ },
91
+ setting: {
92
+ id: 'frequency'
93
+ }
94
+ }
95
+ ]
96
+ },
97
+ {
98
+ type: 'group',
99
+ label: {
100
+ en: 'Button close popup'
101
+ },
102
+ controls: [
103
+ {
104
+ type: 'control',
105
+ setting: {
106
+ id: 'closeButtonPosition'
107
+ },
108
+ label: {
109
+ en: 'Position'
110
+ }
111
+ },
112
+ {
113
+ type: 'control',
114
+ label: {
115
+ en: 'Background'
116
+ },
117
+ setting: {
118
+ id: 'btnBg'
119
+ }
120
+ },
121
+ {
122
+ type: 'control',
123
+ label: {
124
+ en: 'Color'
125
+ },
126
+ setting: {
127
+ id: 'btnColor'
128
+ }
129
+ },
130
+ {
131
+ type: 'control',
132
+ label: {
133
+ en: 'Corner'
134
+ },
135
+ setting: {
136
+ id: 'btnRounded'
137
+ }
138
+ },
139
+ {
140
+ type: 'control',
141
+ label: {
142
+ en: 'Button size'
143
+ },
144
+ setting: {
145
+ id: 'btnSize'
146
+ }
147
+ },
148
+ {
149
+ type: 'control',
150
+ label: {
151
+ en: 'Icon size'
152
+ },
153
+ setting: {
154
+ id: 'iconSize'
155
+ }
156
+ }
157
+ ]
158
+ },
159
+ {
160
+ type: 'group',
161
+ label: {
162
+ en: 'Size'
163
+ },
164
+ controls: [
165
+ {
166
+ type: 'control',
167
+ label: {
168
+ en: 'Full screen'
169
+ },
170
+ setting: {
171
+ id: 'fullScreen'
172
+ }
173
+ },
174
+ {
175
+ type: 'control',
176
+ condition: `!fullScreen`,
177
+ label: {
178
+ en: 'Width'
179
+ },
180
+ setting: {
181
+ id: 'width'
182
+ }
183
+ },
184
+ {
185
+ type: 'control',
186
+ condition: `!fullScreen`,
187
+ label: {
188
+ en: 'Height'
189
+ },
190
+ setting: {
191
+ id: 'height'
192
+ }
193
+ }
194
+ ]
195
+ },
196
+ {
197
+ type: 'control',
198
+ label: {
199
+ en: 'Background'
200
+ },
201
+ options: {
202
+ label: 'large',
203
+ styleLabel: {
204
+ marginBottom: '4px'
205
+ }
206
+ },
207
+ setting: {
208
+ id: 'background'
209
+ },
210
+ layout: 'vertical'
211
+ },
212
+ {
213
+ type: 'group',
214
+ controls: [
215
+ {
216
+ type: 'control',
217
+ label: {
218
+ en: 'Overlay'
219
+ },
220
+ options: {
221
+ label: 'large'
222
+ },
223
+ setting: {
224
+ id: 'isOverlay'
225
+ }
226
+ },
227
+ {
228
+ type: 'control',
229
+ condition: `isOverlay === true`,
230
+ label: {
231
+ en: 'Color'
232
+ },
233
+ setting: {
234
+ id: 'overlayColor'
235
+ }
236
+ },
237
+ {
238
+ type: 'control',
239
+ condition: `isOverlay === true`,
240
+ label: {
241
+ en: 'Opacity'
242
+ },
243
+ setting: {
244
+ id: 'overlayOpacity'
245
+ }
246
+ },
247
+ {
248
+ type: 'control',
249
+ condition: `isOverlay === true`,
250
+ label: {
251
+ en: 'Click overlay to close popup'
252
+ },
253
+ setting: {
254
+ id: 'closeOnClickOutside'
255
+ },
256
+ options: {
257
+ styleControl: {
258
+ width: 'auto'
259
+ }
260
+ }
261
+ }
262
+ ]
263
+ },
264
+ {
265
+ type: 'control',
266
+ setting: {
267
+ id: 'position'
268
+ },
269
+ options: {
270
+ labelPosition: 'start'
271
+ },
272
+ label: {
273
+ en: 'Position'
274
+ },
275
+ condition: `!fullScreen`
276
+ },
277
+ {
278
+ type: 'control',
279
+ setting: {
280
+ id: 'effectType'
281
+ },
282
+ label: {
283
+ en: 'Effect'
284
+ }
285
+ }
286
+ ];
287
+
288
+ exports.SettingUIV1 = SettingUIV1;