@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
@@ -1,3 +1,7 @@
1
+ import { DialogSettings } from './configs/settings.js';
2
+ import { SettingUIV1 } from './configs/uiV1.js';
3
+ import { SettingUIV2 } from './configs/uiV2.js';
4
+
1
5
  const config = {
2
6
  tag: 'Dialog',
3
7
  label: 'Popup',
@@ -5,586 +9,9 @@ const config = {
5
9
  <path fill-rule="evenodd" clip-rule="evenodd" d="M9.33855 2C7.16052 2 5.39488 3.76561 5.39488 5.94361V22.6611C5.39488 24.8391 7.16052 26.6047 9.33855 26.6047H26.0563C28.2344 26.6047 30 24.8391 30 22.6611V5.94361C30 3.76562 28.2344 2 26.0563 2H9.33855ZM7.36672 5.94361C7.36672 4.85461 8.24954 3.97181 9.33855 3.97181H26.0563C27.1453 3.97181 28.0282 4.85461 28.0282 5.94361V22.6611C28.0282 23.7501 27.1453 24.6329 26.0563 24.6329H9.33855C8.24954 24.6329 7.36672 23.7501 7.36672 22.6611V5.94361ZM14.8586 18.7057C14.6808 18.7945 14.4833 18.8365 14.2848 18.8275C14.0863 18.8186 13.8933 18.7591 13.7243 18.6546C13.5552 18.5502 13.4157 18.4043 13.3188 18.2307C13.222 18.0572 13.1711 17.8618 13.171 17.6631V10.9411C13.1711 10.7424 13.222 10.547 13.3188 10.3735C13.4157 10.2 13.5552 10.0541 13.7243 9.94962C13.8933 9.84517 14.0863 9.78566 14.2848 9.77672C14.4833 9.76778 14.6808 9.80971 14.8586 9.89853L21.5807 13.2595C21.7741 13.3565 21.9368 13.5054 22.0505 13.6895C22.1641 13.8736 22.2243 14.0857 22.2243 14.3021C22.2243 14.5185 22.1641 14.7306 22.0505 14.9148C21.9368 15.0989 21.7741 15.2477 21.5807 15.3447L14.8586 18.7057ZM2.98592 9.92188C3.53043 9.92188 3.97184 10.3633 3.97184 10.9078V27.6213C3.97184 27.6933 4.00246 27.7827 4.09987 27.8693C4.19908 27.9575 4.35638 28.0282 4.55284 28.0282H23.3559C23.9004 28.0282 24.3418 28.4696 24.3418 29.0141C24.3418 29.5586 23.9004 30 23.3559 30H4.55284C3.25532 30 2 29.041 2 27.6213V10.9078C2 10.3633 2.44141 9.92188 2.98592 9.92188Z" fill="white"/>
6
10
  </svg>
7
11
  `,
8
- settings: [
9
- {
10
- id: 'setting',
11
- controls: [
12
- {
13
- id: 'closeButtonPosition',
14
- type: 'segment',
15
- options: [
16
- {
17
- label: 'Inside',
18
- value: 'inside'
19
- },
20
- {
21
- label: 'Outside',
22
- value: 'outside'
23
- }
24
- ],
25
- default: 'inside'
26
- },
27
- {
28
- id: 'position',
29
- type: 'position:square',
30
- default: 'center'
31
- },
32
- {
33
- id: 'effectType',
34
- type: 'select',
35
- options: [
36
- {
37
- label: 'Fade',
38
- value: 'fade'
39
- },
40
- {
41
- label: 'Zoom',
42
- value: 'zoom'
43
- },
44
- {
45
- label: 'Zoom out',
46
- value: 'zoom-out'
47
- },
48
- {
49
- label: 'Horizontal move',
50
- value: 'horizontal'
51
- },
52
- {
53
- label: 'Vertical move',
54
- value: 'vertical'
55
- },
56
- {
57
- label: '3d Unfold',
58
- value: 'unfold'
59
- },
60
- {
61
- label: 'None',
62
- value: 'none'
63
- }
64
- ],
65
- default: 'fade'
66
- },
67
- {
68
- id: 'closeOnClickOutside',
69
- type: 'toggle',
70
- default: true
71
- },
72
- {
73
- id: 'name',
74
- type: 'input',
75
- placeholder: 'E.g. New popup',
76
- emptyOnClear: true
77
- },
78
- {
79
- id: 'width',
80
- type: 'input:unit',
81
- placeholder: 'Auto',
82
- units: [
83
- 'px',
84
- '%'
85
- ],
86
- devices: {
87
- desktop: {
88
- default: '600px'
89
- },
90
- mobile: {
91
- default: '100%'
92
- }
93
- }
94
- },
95
- {
96
- id: 'height',
97
- type: 'input:unit',
98
- placeholder: 'Auto',
99
- units: [
100
- 'px',
101
- '%'
102
- ],
103
- devices: {
104
- desktop: {
105
- default: undefined
106
- }
107
- }
108
- },
109
- {
110
- id: 'fullScreen',
111
- type: 'toggle',
112
- devices: {
113
- desktop: {
114
- default: false
115
- }
116
- }
117
- },
118
- {
119
- id: 'isOverlay',
120
- type: 'toggle',
121
- default: true
122
- },
123
- {
124
- id: 'overlayColor',
125
- type: 'colorpicker',
126
- default: '#121212'
127
- },
128
- {
129
- id: 'overlayOpacity',
130
- type: 'range',
131
- min: 0,
132
- step: 1,
133
- max: 100,
134
- default: 70,
135
- units: [
136
- '%'
137
- ],
138
- useOnlyUnitInit: true
139
- },
140
- {
141
- id: 'triggerTime',
142
- type: 'range',
143
- min: 0,
144
- default: 10,
145
- max: 100,
146
- units: [
147
- 's'
148
- ],
149
- useOnlyUnitInit: true
150
- },
151
- {
152
- id: 'triggerPercentage',
153
- type: 'range',
154
- units: [
155
- '%'
156
- ],
157
- min: 0,
158
- max: 100,
159
- default: 10,
160
- useOnlyUnitInit: true
161
- },
162
- {
163
- id: 'frequency',
164
- type: 'range',
165
- min: 1,
166
- max: 30,
167
- default: 3,
168
- units: [
169
- 'days'
170
- ],
171
- useOnlyUnitInit: true
172
- },
173
- {
174
- id: 'frequencyMode',
175
- type: 'select',
176
- options: [
177
- {
178
- label: 'Once per user',
179
- value: 'once'
180
- },
181
- {
182
- label: 'Each visit time',
183
- value: 'every'
184
- },
185
- {
186
- label: 'After a time',
187
- value: 'after-period-time'
188
- }
189
- ],
190
- default: 'once'
191
- },
192
- {
193
- id: 'btnSize',
194
- type: 'input:number',
195
- default: 32
196
- },
197
- {
198
- id: 'iconSize',
199
- type: 'input:unit',
200
- units: [
201
- 'px'
202
- ],
203
- default: '12px'
204
- },
205
- {
206
- id: 'btnBg',
207
- type: 'colorpicker',
208
- default: '#ffffff'
209
- },
210
- {
211
- id: 'btnColor',
212
- type: 'colorpicker',
213
- default: 'line-3'
214
- },
215
- {
216
- id: 'trigger',
217
- type: 'select',
218
- options: [
219
- {
220
- label: 'None',
221
- value: 'none'
222
- },
223
- {
224
- label: 'After loaded',
225
- value: 'show-on-page-load'
226
- },
227
- {
228
- label: 'After a time',
229
- value: 'show-after-time'
230
- },
231
- {
232
- label: 'Scroll partially',
233
- value: 'show-after-scroll'
234
- },
235
- {
236
- label: 'About to exit',
237
- value: 'show-when-about-exit'
238
- }
239
- ],
240
- default: 'none'
241
- },
242
- {
243
- id: 'mobileTrigger',
244
- type: 'select',
245
- options: [
246
- {
247
- label: 'None',
248
- value: 'none'
249
- },
250
- {
251
- label: 'Timer',
252
- value: 'timer'
253
- }
254
- ],
255
- default: 'none'
256
- },
257
- {
258
- id: 'mobileTriggerTime',
259
- type: 'range',
260
- min: 0,
261
- default: 10,
262
- max: 100,
263
- units: [
264
- 's'
265
- ],
266
- useOnlyUnitInit: true
267
- },
268
- {
269
- id: 'btnRounded',
270
- type: 'radius-preset',
271
- default: {
272
- radiusType: 'none'
273
- }
274
- },
275
- {
276
- id: 'background',
277
- type: 'background',
278
- ignoreReRender: true,
279
- allowBackgroundImageAndVideo: false,
280
- devices: {
281
- desktop: {
282
- default: {
283
- type: 'color',
284
- color: '#FFFFFF',
285
- image: {
286
- src: '',
287
- width: 0,
288
- height: 0
289
- },
290
- size: 'cover',
291
- position: {
292
- x: 50,
293
- y: 50
294
- },
295
- repeat: 'no-repeat',
296
- attachment: 'scroll'
297
- }
298
- }
299
- }
300
- }
301
- ]
302
- }
303
- ],
304
- ui: [
305
- {
306
- type: 'group',
307
- label: {
308
- en: 'Display'
309
- },
310
- controls: [
311
- {
312
- type: 'control',
313
- label: {
314
- en: 'Name'
315
- },
316
- setting: {
317
- id: 'name'
318
- }
319
- },
320
- {
321
- type: 'control',
322
- label: {
323
- en: 'Show when'
324
- },
325
- setting: {
326
- id: 'trigger'
327
- }
328
- },
329
- {
330
- type: 'control',
331
- condition: `trigger === 'show-after-time'`,
332
- label: {
333
- en: 'Time'
334
- },
335
- setting: {
336
- id: 'triggerTime'
337
- }
338
- },
339
- {
340
- type: 'control',
341
- condition: `trigger === 'show-after-scroll'`,
342
- label: {
343
- en: 'Scroll'
344
- },
345
- setting: {
346
- id: 'triggerPercentage'
347
- }
348
- },
349
- {
350
- type: 'control',
351
- condition: `trigger === 'show-when-about-exit'`,
352
- label: {
353
- en: 'On mobile'
354
- },
355
- setting: {
356
- id: 'mobileTrigger'
357
- }
358
- },
359
- {
360
- type: 'control',
361
- condition: `trigger === 'show-when-about-exit' && mobileTrigger === 'timer'`,
362
- label: {
363
- en: 'After load'
364
- },
365
- setting: {
366
- id: 'mobileTriggerTime'
367
- }
368
- }
369
- ]
370
- },
371
- {
372
- type: 'group',
373
- label: {
374
- en: 'Show frequency'
375
- },
376
- controls: [
377
- {
378
- type: 'control',
379
- label: {
380
- en: 'Show mode'
381
- },
382
- setting: {
383
- id: 'frequencyMode'
384
- }
385
- },
386
- {
387
- type: 'control',
388
- condition: `frequencyMode === 'after-period-time'`,
389
- label: {
390
- en: 'Display time'
391
- },
392
- setting: {
393
- id: 'frequency'
394
- }
395
- }
396
- ]
397
- },
398
- {
399
- type: 'group',
400
- label: {
401
- en: 'Button close popup'
402
- },
403
- controls: [
404
- {
405
- type: 'control',
406
- setting: {
407
- id: 'closeButtonPosition'
408
- },
409
- label: {
410
- en: 'Position'
411
- }
412
- },
413
- {
414
- type: 'control',
415
- label: {
416
- en: 'Background'
417
- },
418
- setting: {
419
- id: 'btnBg'
420
- }
421
- },
422
- {
423
- type: 'control',
424
- label: {
425
- en: 'Color'
426
- },
427
- setting: {
428
- id: 'btnColor'
429
- }
430
- },
431
- {
432
- type: 'control',
433
- label: {
434
- en: 'Corner'
435
- },
436
- setting: {
437
- id: 'btnRounded'
438
- }
439
- },
440
- {
441
- type: 'control',
442
- label: {
443
- en: 'Button size'
444
- },
445
- setting: {
446
- id: 'btnSize'
447
- }
448
- },
449
- {
450
- type: 'control',
451
- label: {
452
- en: 'Icon size'
453
- },
454
- setting: {
455
- id: 'iconSize'
456
- }
457
- }
458
- ]
459
- },
460
- {
461
- type: 'group',
462
- label: {
463
- en: 'Size'
464
- },
465
- controls: [
466
- {
467
- type: 'control',
468
- label: {
469
- en: 'Full screen'
470
- },
471
- setting: {
472
- id: 'fullScreen'
473
- }
474
- },
475
- {
476
- type: 'control',
477
- condition: `!fullScreen`,
478
- label: {
479
- en: 'Width'
480
- },
481
- setting: {
482
- id: 'width'
483
- }
484
- },
485
- {
486
- type: 'control',
487
- condition: `!fullScreen`,
488
- label: {
489
- en: 'Height'
490
- },
491
- setting: {
492
- id: 'height'
493
- }
494
- }
495
- ]
496
- },
497
- {
498
- type: 'control',
499
- label: {
500
- en: 'Background'
501
- },
502
- options: {
503
- label: 'large',
504
- styleLabel: {
505
- marginBottom: '4px'
506
- }
507
- },
508
- setting: {
509
- id: 'background'
510
- },
511
- layout: 'vertical'
512
- },
513
- {
514
- type: 'group',
515
- controls: [
516
- {
517
- type: 'control',
518
- label: {
519
- en: 'Overlay'
520
- },
521
- options: {
522
- label: 'large'
523
- },
524
- setting: {
525
- id: 'isOverlay'
526
- }
527
- },
528
- {
529
- type: 'control',
530
- condition: `isOverlay === true`,
531
- label: {
532
- en: 'Color'
533
- },
534
- setting: {
535
- id: 'overlayColor'
536
- }
537
- },
538
- {
539
- type: 'control',
540
- condition: `isOverlay === true`,
541
- label: {
542
- en: 'Opacity'
543
- },
544
- setting: {
545
- id: 'overlayOpacity'
546
- }
547
- },
548
- {
549
- type: 'control',
550
- condition: `isOverlay === true`,
551
- label: {
552
- en: 'Click overlay to close popup'
553
- },
554
- setting: {
555
- id: 'closeOnClickOutside'
556
- },
557
- options: {
558
- styleControl: {
559
- width: 'auto'
560
- }
561
- }
562
- }
563
- ]
564
- },
565
- {
566
- type: 'control',
567
- setting: {
568
- id: 'position'
569
- },
570
- options: {
571
- labelPosition: 'start'
572
- },
573
- label: {
574
- en: 'Position'
575
- },
576
- condition: `!fullScreen`
577
- },
578
- {
579
- type: 'control',
580
- setting: {
581
- id: 'effectType'
582
- },
583
- label: {
584
- en: 'Effect'
585
- }
586
- }
587
- ],
12
+ settings: DialogSettings,
13
+ ui: SettingUIV1,
14
+ uiV2: SettingUIV2,
588
15
  presets: [
589
16
  {
590
17
  id: 'popup',