@gem-sdk/components 2.0.0-dev.663 → 2.0.0-dev.665

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.
@@ -0,0 +1,26 @@
1
+ 'use strict';
2
+
3
+ const HeaderPreset = [
4
+ {
5
+ id: 'instant-header',
6
+ name: {
7
+ en: 'Header'
8
+ },
9
+ icon: {
10
+ desktop: `
11
+ <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
12
+ <path d="M5.875 17.7183H8.625V26.3325H5.875V17.7183Z" fill="#D6D6D6"/>
13
+ <path d="M31.375 17.7183H34.125V26.3325H31.375V17.7183Z" fill="#D6D6D6"/>
14
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M5.25 6.71826V14.9683H34.75V6.71826H5.25ZM3.75 3.96826C3.05964 3.96826 2.5 4.52791 2.5 5.21826V16.4683C2.5 17.1586 3.05964 17.7183 3.75 17.7183H36.25C36.9404 17.7183 37.5 17.1586 37.5 16.4683V5.21826C37.5 4.52791 36.9404 3.96826 36.25 3.96826H3.75Z" fill="#D6D6D6"/>
15
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M31.3754 29.0825H8.625V33.2821H31.3754V29.0825ZM5.875 26.3325V34.7821C5.875 35.4724 6.43464 36.0321 7.125 36.0321H32.8754C33.5658 36.0321 34.1254 35.4724 34.1254 34.7821V26.3325H5.875Z" fill="#D6D6D6"/>
16
+ </svg>`
17
+ },
18
+ components: [
19
+ {
20
+ tag: 'Header'
21
+ }
22
+ ]
23
+ }
24
+ ];
25
+
26
+ exports.HeaderPreset = HeaderPreset;
@@ -0,0 +1,428 @@
1
+ 'use strict';
2
+
3
+ const HeaderSettings = [
4
+ {
5
+ id: 'setting',
6
+ controls: [
7
+ {
8
+ id: 'breakpoint',
9
+ label: 'Breakpoint',
10
+ type: 'select',
11
+ hideOnMode: {
12
+ mobileOnly: true
13
+ },
14
+ options: [
15
+ {
16
+ label: 'From desktop and smaller',
17
+ subTitle: 'Display menu icon for desktop, tablet and mobile',
18
+ value: 'desktop'
19
+ },
20
+ {
21
+ label: 'From tablet and smaller',
22
+ subTitle: 'Display menu icon for tablet and mobile',
23
+ value: 'tablet'
24
+ },
25
+ {
26
+ label: 'Only mobile',
27
+ subTitle: 'Display menu icon for only mobile',
28
+ value: 'mobile'
29
+ }
30
+ ],
31
+ default: 'mobile'
32
+ },
33
+ {
34
+ id: 'menu',
35
+ label: 'Menu',
36
+ type: 'menu',
37
+ default: {
38
+ ROOT: {
39
+ id: 'ROOT',
40
+ title: 'Root',
41
+ childrens: [
42
+ '1',
43
+ '2',
44
+ '3'
45
+ ]
46
+ },
47
+ '1': {
48
+ id: '1',
49
+ title: 'Menu 1',
50
+ link: '',
51
+ childrens: [
52
+ '13',
53
+ '14'
54
+ ]
55
+ },
56
+ '2': {
57
+ id: '2',
58
+ title: 'Menu 2',
59
+ link: '',
60
+ childrens: [
61
+ '6',
62
+ '7',
63
+ '8'
64
+ ]
65
+ },
66
+ '6': {
67
+ id: '6',
68
+ title: 'Sub Menu 2.1',
69
+ childrens: []
70
+ },
71
+ '7': {
72
+ id: '7',
73
+ title: 'Sub Menu 2.2',
74
+ childrens: [
75
+ '10',
76
+ '11'
77
+ ]
78
+ },
79
+ '8': {
80
+ id: '8',
81
+ title: 'Sub Menu 2.3',
82
+ childrens: [
83
+ '12'
84
+ ]
85
+ },
86
+ '9': {
87
+ id: '9',
88
+ title: 'Sub Menu 2.4',
89
+ childrens: []
90
+ },
91
+ '10': {
92
+ id: '10',
93
+ title: 'Sub Menu 2.2.1',
94
+ childrens: []
95
+ },
96
+ '11': {
97
+ id: '11',
98
+ title: 'Sub Menu 2.2.2',
99
+ childrens: []
100
+ },
101
+ '12': {
102
+ id: '12',
103
+ title: 'Sub Menu 2.3.1',
104
+ childrens: []
105
+ },
106
+ '3': {
107
+ id: '3',
108
+ title: 'Menu 3',
109
+ link: '',
110
+ childrens: []
111
+ },
112
+ '13': {
113
+ id: '13',
114
+ title: 'Sub Menu 1.1',
115
+ link: '',
116
+ childrens: []
117
+ },
118
+ '14': {
119
+ id: '14',
120
+ title: 'Sub Menu 1.2',
121
+ link: '',
122
+ childrens: []
123
+ }
124
+ }
125
+ },
126
+ {
127
+ type: 'group',
128
+ label: 'Logo',
129
+ id: 'logo-group',
130
+ controls: [
131
+ {
132
+ id: 'logo',
133
+ label: 'Logo',
134
+ type: 'image-select',
135
+ devices: {
136
+ desktop: {
137
+ default: {
138
+ src: 'https://ucarecdn.com/465c7cbb-f087-4d1d-8f08-f6665179f02f/-/format/auto/-/quality/lighter/placeholder-1.png',
139
+ width: 800,
140
+ height: 533
141
+ }
142
+ }
143
+ }
144
+ },
145
+ {
146
+ id: 'logoAspectRatio',
147
+ type: 'select',
148
+ label: 'Aspect Ratio',
149
+ options: [
150
+ {
151
+ label: 'Auto',
152
+ value: 'auto'
153
+ },
154
+ {
155
+ label: '1:1',
156
+ value: '1'
157
+ },
158
+ {
159
+ label: '3:2',
160
+ value: '3/2'
161
+ },
162
+ {
163
+ label: '4:3',
164
+ value: '4/3'
165
+ },
166
+ {
167
+ label: '16:9',
168
+ value: '16/9'
169
+ },
170
+ {
171
+ label: '21:9',
172
+ value: '21/9'
173
+ },
174
+ {
175
+ label: '2:3',
176
+ value: '2/3'
177
+ },
178
+ {
179
+ label: '3:4',
180
+ value: '3/4'
181
+ },
182
+ {
183
+ label: '9:16',
184
+ value: '9/16'
185
+ },
186
+ {
187
+ label: 'Custom',
188
+ value: 'custom'
189
+ }
190
+ ],
191
+ devices: {
192
+ desktop: {
193
+ default: 'auto'
194
+ }
195
+ }
196
+ },
197
+ {
198
+ id: 'customAspectRadio',
199
+ type: 'ratio',
200
+ min: 1,
201
+ devices: {
202
+ desktop: {
203
+ default: {
204
+ width: '1',
205
+ height: '1'
206
+ }
207
+ }
208
+ },
209
+ hide: true
210
+ },
211
+ {
212
+ id: 'layout',
213
+ type: 'select',
214
+ label: 'Object Fit',
215
+ options: [
216
+ {
217
+ label: 'Fill',
218
+ value: 'fill'
219
+ },
220
+ {
221
+ label: 'Cover',
222
+ value: 'cover'
223
+ },
224
+ {
225
+ label: 'Contain',
226
+ value: 'contain'
227
+ },
228
+ {
229
+ label: 'None',
230
+ value: 'none'
231
+ },
232
+ {
233
+ label: 'Scale down',
234
+ value: 'scale-down'
235
+ }
236
+ ],
237
+ devices: {
238
+ desktop: {
239
+ default: 'contain'
240
+ }
241
+ }
242
+ },
243
+ {
244
+ id: 'logoWidth',
245
+ label: 'Width',
246
+ type: 'input:unit',
247
+ units: [
248
+ 'px',
249
+ '%'
250
+ ],
251
+ devices: {
252
+ desktop: {
253
+ default: '80px'
254
+ }
255
+ }
256
+ }
257
+ ]
258
+ },
259
+ {
260
+ id: 'arrow',
261
+ label: 'Arrow Icon',
262
+ type: 'icon',
263
+ default: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.57576 6.77583C4.81007 6.54152 5.18997 6.54152 5.42429 6.77583L8.20002 9.55157L10.9758 6.77583C11.2101 6.54152 11.59 6.54152 11.8243 6.77583C12.0586 7.01015 12.0586 7.39005 11.8243 7.62436L8.62429 10.8244C8.38997 11.0587 8.01007 11.0587 7.77576 10.8244L4.57576 7.62436C4.34145 7.39005 4.34145 7.01015 4.57576 6.77583Z" fill="#F9F9F9"/></svg>`
264
+ },
265
+ // {
266
+ // id: 'buyNow',
267
+ // type: 'toggle',
268
+ // label: 'Buy Now',
269
+ // default: false,
270
+ // },
271
+ // {
272
+ // id: 'buy-now-group-setting',
273
+ // type: 'group',
274
+ // label: 'Buy Now Button',
275
+ // controls: [
276
+ // {
277
+ // id: 'openMode',
278
+ // type: 'segment',
279
+ // label: 'Open Mode',
280
+ // options: [
281
+ // {
282
+ // label: 'Popup',
283
+ // value: 'popup',
284
+ // },
285
+ // {
286
+ // label: 'New Page',
287
+ // value: 'page',
288
+ // },
289
+ // ],
290
+ // default: 'page',
291
+ // },
292
+ // ],
293
+ // },
294
+ {
295
+ id: 'cart-setting',
296
+ type: 'group',
297
+ label: 'Cart Setting',
298
+ controls: [
299
+ {
300
+ id: 'cartIcon',
301
+ label: 'Cart Icon',
302
+ type: 'icon',
303
+ default: `<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"></path></svg>`
304
+ }
305
+ ]
306
+ }
307
+ ]
308
+ },
309
+ {
310
+ id: 'style',
311
+ controls: [
312
+ {
313
+ id: 'height',
314
+ label: 'Height',
315
+ type: 'input:unit',
316
+ units: [
317
+ 'px'
318
+ ],
319
+ devices: {
320
+ desktop: {
321
+ default: '60px'
322
+ }
323
+ }
324
+ },
325
+ {
326
+ id: 'typography',
327
+ label: 'Typography',
328
+ type: 'typography',
329
+ default: {
330
+ type: 'paragraph-1'
331
+ }
332
+ },
333
+ {
334
+ id: 'typo',
335
+ label: 'Text styles',
336
+ type: 'typography-v2',
337
+ default: {
338
+ type: 'paragraph-1'
339
+ },
340
+ hiddenSetting: {
341
+ },
342
+ ignoreReRender: true
343
+ },
344
+ {
345
+ id: 'background-group',
346
+ label: 'Background',
347
+ type: 'group',
348
+ controls: [
349
+ {
350
+ id: 'headerBg',
351
+ type: 'color-picker-v2',
352
+ label: 'Header',
353
+ devices: {
354
+ desktop: {
355
+ default: '#FFFFFF'
356
+ }
357
+ }
358
+ },
359
+ {
360
+ id: 'menuBg',
361
+ type: 'color-picker-v2',
362
+ label: 'Menu',
363
+ info: 'Dropdown and collapse menu background color',
364
+ compoDefaultValue: {
365
+ desktop: {
366
+ default: '#FFFFFF'
367
+ }
368
+ },
369
+ devices: {
370
+ desktop: {
371
+ default: '#FFFFFF'
372
+ }
373
+ }
374
+ }
375
+ ]
376
+ },
377
+ {
378
+ id: 'color-state',
379
+ type: 'behavior-state',
380
+ controls: [
381
+ {
382
+ id: 'textColor',
383
+ label: 'Text Color',
384
+ type: 'color-picker-v2',
385
+ state: {
386
+ normal: true,
387
+ hover: true
388
+ },
389
+ default: {
390
+ normal: 'text-1'
391
+ }
392
+ },
393
+ {
394
+ id: 'menuTextColor',
395
+ label: 'Menu Text Color',
396
+ type: 'color-picker-v2',
397
+ state: {
398
+ normal: true,
399
+ hover: true
400
+ },
401
+ compoDefaultValue: {
402
+ normal: 'text-1',
403
+ hover: 'text-2'
404
+ },
405
+ default: {
406
+ normal: '#111111',
407
+ hover: 'text-2'
408
+ }
409
+ },
410
+ {
411
+ id: 'cartIconColor',
412
+ type: 'color-picker-v2',
413
+ label: 'Cart Icon Color',
414
+ state: {
415
+ normal: true,
416
+ hover: true
417
+ },
418
+ default: {
419
+ normal: 'text-1'
420
+ }
421
+ }
422
+ ]
423
+ }
424
+ ]
425
+ }
426
+ ];
427
+
428
+ exports.HeaderSettings = HeaderSettings;
@@ -0,0 +1,245 @@
1
+ 'use strict';
2
+
3
+ const SettingUIV1 = [
4
+ {
5
+ type: 'control',
6
+ label: {
7
+ en: 'Breakpoint'
8
+ },
9
+ setting: {
10
+ id: 'breakpoint'
11
+ }
12
+ },
13
+ {
14
+ type: 'control',
15
+ label: {
16
+ en: 'Menu'
17
+ },
18
+ setting: {
19
+ id: 'menu'
20
+ }
21
+ },
22
+ {
23
+ type: 'group',
24
+ label: {
25
+ en: 'Logo'
26
+ },
27
+ controls: [
28
+ {
29
+ type: 'control',
30
+ label: {
31
+ en: 'Logo'
32
+ },
33
+ layout: 'vertical',
34
+ setting: {
35
+ id: 'logo'
36
+ }
37
+ },
38
+ {
39
+ type: 'control',
40
+ label: {
41
+ en: 'Aspect Ratio'
42
+ },
43
+ setting: {
44
+ id: 'logoAspectRatio'
45
+ }
46
+ },
47
+ {
48
+ type: 'control',
49
+ condition: 'logoAspectRatio == "custom"',
50
+ setting: {
51
+ id: 'customAspectRadio'
52
+ }
53
+ },
54
+ {
55
+ type: 'control',
56
+ label: {
57
+ en: 'Object Fit'
58
+ },
59
+ setting: {
60
+ id: 'layout'
61
+ }
62
+ },
63
+ {
64
+ type: 'control',
65
+ label: {
66
+ en: 'Width'
67
+ },
68
+ setting: {
69
+ id: 'logoWidth'
70
+ }
71
+ }
72
+ ]
73
+ },
74
+ {
75
+ type: 'group',
76
+ label: {
77
+ en: 'Arrow Icon'
78
+ },
79
+ controls: [
80
+ {
81
+ type: 'control',
82
+ setting: {
83
+ id: 'arrow'
84
+ },
85
+ layout: 'vertical'
86
+ }
87
+ ]
88
+ },
89
+ {
90
+ type: 'group',
91
+ label: {
92
+ en: 'Cart Setting'
93
+ },
94
+ controls: [
95
+ {
96
+ type: 'control',
97
+ setting: {
98
+ id: 'cartIcon'
99
+ },
100
+ layout: 'vertical'
101
+ }
102
+ ]
103
+ },
104
+ {
105
+ label: {
106
+ en: 'Height'
107
+ },
108
+ type: 'control',
109
+ setting: {
110
+ id: 'height'
111
+ }
112
+ },
113
+ {
114
+ type: 'group',
115
+ label: {
116
+ en: 'Text'
117
+ },
118
+ controls: [
119
+ {
120
+ type: 'control',
121
+ layout: 'vertical',
122
+ setting: {
123
+ id: 'typo'
124
+ }
125
+ }
126
+ ]
127
+ },
128
+ {
129
+ type: 'group',
130
+ label: {
131
+ en: 'Background'
132
+ },
133
+ controls: [
134
+ {
135
+ type: 'control',
136
+ label: {
137
+ en: 'Header'
138
+ },
139
+ setting: {
140
+ id: 'headerBg'
141
+ }
142
+ },
143
+ {
144
+ type: 'control',
145
+ label: {
146
+ en: 'Menu'
147
+ },
148
+ setting: {
149
+ id: 'menuBg'
150
+ }
151
+ }
152
+ ]
153
+ },
154
+ {
155
+ type: 'group',
156
+ label: {
157
+ en: 'Interaction states'
158
+ },
159
+ controls: [
160
+ {
161
+ type: 'tab',
162
+ controls: [
163
+ {
164
+ type: 'group',
165
+ label: {
166
+ en: 'Normal'
167
+ },
168
+ controls: [
169
+ {
170
+ type: 'control',
171
+ label: {
172
+ en: 'Text Color'
173
+ },
174
+ setting: {
175
+ id: 'textColor',
176
+ state: 'normal'
177
+ }
178
+ },
179
+ {
180
+ type: 'control',
181
+ label: {
182
+ en: 'Menu Text Color'
183
+ },
184
+ setting: {
185
+ id: 'menuTextColor',
186
+ state: 'normal'
187
+ }
188
+ },
189
+ {
190
+ type: 'control',
191
+ label: {
192
+ en: 'Cart Icon Color'
193
+ },
194
+ setting: {
195
+ id: 'cartIconColor',
196
+ state: 'normal'
197
+ }
198
+ }
199
+ ]
200
+ },
201
+ {
202
+ type: 'group',
203
+ label: {
204
+ en: 'Hover'
205
+ },
206
+ controls: [
207
+ {
208
+ type: 'control',
209
+ label: {
210
+ en: 'Text Color'
211
+ },
212
+ setting: {
213
+ id: 'textColor',
214
+ state: 'hover'
215
+ }
216
+ },
217
+ {
218
+ type: 'control',
219
+ label: {
220
+ en: 'Menu Text Color'
221
+ },
222
+ setting: {
223
+ id: 'menuTextColor',
224
+ state: 'hover'
225
+ }
226
+ },
227
+ {
228
+ type: 'control',
229
+ label: {
230
+ en: 'Cart Icon Color'
231
+ },
232
+ setting: {
233
+ id: 'cartIconColor',
234
+ state: 'hover'
235
+ }
236
+ }
237
+ ]
238
+ }
239
+ ]
240
+ }
241
+ ]
242
+ }
243
+ ];
244
+
245
+ exports.SettingUIV1 = SettingUIV1;