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