@gem-sdk/components 2.0.0-dev.458 → 2.0.0-dev.460
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/breadcrumb/components/Breadcrumb.js +1 -0
- package/dist/cjs/breadcrumb/components/Breadcrumb.liquid.js +1 -0
- package/dist/cjs/breadcrumb/setting/configs/settings.js +29 -2
- package/dist/cjs/breadcrumb/setting/configs/uiV2.js +230 -114
- package/dist/cjs/coupon/setting/config/settings.js +0 -11
- package/dist/cjs/product/setting/product/configs/settings.js +1 -1
- package/dist/cjs/sticky/components/Sticky.js +0 -2
- package/dist/cjs/sticky/components/Sticky.liquid.js +1 -2
- package/dist/esm/breadcrumb/components/Breadcrumb.js +2 -1
- package/dist/esm/breadcrumb/components/Breadcrumb.liquid.js +2 -1
- package/dist/esm/breadcrumb/setting/configs/settings.js +29 -2
- package/dist/esm/breadcrumb/setting/configs/uiV2.js +230 -114
- package/dist/esm/coupon/setting/config/settings.js +0 -11
- package/dist/esm/product/setting/product/configs/settings.js +1 -1
- package/dist/esm/sticky/components/Sticky.js +2 -4
- package/dist/esm/sticky/components/Sticky.liquid.js +1 -2
- package/dist/types/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -55,6 +55,7 @@ const Breadcrumb = ({ className, setting = {}, style: style$1, styles = {}, buil
|
|
|
55
55
|
...attr.getNavAttr()
|
|
56
56
|
});
|
|
57
57
|
const navStyles = system.createStyle({
|
|
58
|
+
...core.makeGlobalSize(setting?.globalSize).padding,
|
|
58
59
|
...style.getSpacingStyles(setting?.spacing),
|
|
59
60
|
...core.makeStyleResponsive('jc', align)
|
|
60
61
|
});
|
|
@@ -49,6 +49,7 @@ const Breadcrumb = ({ setting = {}, builderAttrs, style: style$1, styles = {}, c
|
|
|
49
49
|
...attr.getNavAttr()
|
|
50
50
|
});
|
|
51
51
|
const navStyles = system.createStyle({
|
|
52
|
+
...core.makeGlobalSize(setting?.globalSize).padding,
|
|
52
53
|
...style.getSpacingStyles(spacing),
|
|
53
54
|
...core.makeStyleResponsive('jc', align)
|
|
54
55
|
});
|
|
@@ -4,6 +4,31 @@ const BreadcrumbSettings = [
|
|
|
4
4
|
{
|
|
5
5
|
id: 'setting',
|
|
6
6
|
controls: [
|
|
7
|
+
{
|
|
8
|
+
id: 'globalSize',
|
|
9
|
+
type: 'size-setting',
|
|
10
|
+
devices: {
|
|
11
|
+
desktop: {
|
|
12
|
+
default: {
|
|
13
|
+
width: 'Auto',
|
|
14
|
+
height: 'Auto',
|
|
15
|
+
padding: {
|
|
16
|
+
type: 'custom',
|
|
17
|
+
top: '4px',
|
|
18
|
+
bottom: '4px',
|
|
19
|
+
left: '16px',
|
|
20
|
+
right: '16px'
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
hiddenSettings: [
|
|
26
|
+
'shape',
|
|
27
|
+
'gap',
|
|
28
|
+
'width',
|
|
29
|
+
'height'
|
|
30
|
+
]
|
|
31
|
+
},
|
|
7
32
|
{
|
|
8
33
|
id: 'hideCurrentPage',
|
|
9
34
|
type: 'toggle',
|
|
@@ -37,10 +62,12 @@ const BreadcrumbSettings = [
|
|
|
37
62
|
{
|
|
38
63
|
id: 'spacing',
|
|
39
64
|
label: 'Spacing',
|
|
40
|
-
type: 'input:
|
|
65
|
+
type: 'input:slider',
|
|
41
66
|
units: [
|
|
42
67
|
'px'
|
|
43
68
|
],
|
|
69
|
+
step: 1,
|
|
70
|
+
max: 40,
|
|
44
71
|
devices: {
|
|
45
72
|
desktop: {
|
|
46
73
|
default: '4px'
|
|
@@ -180,7 +207,7 @@ const BreadcrumbSettings = [
|
|
|
180
207
|
id: 'color',
|
|
181
208
|
type: 'color-picker-v2',
|
|
182
209
|
label: 'Color',
|
|
183
|
-
default: '
|
|
210
|
+
default: 'text-1'
|
|
184
211
|
}
|
|
185
212
|
]
|
|
186
213
|
},
|
|
@@ -2,205 +2,321 @@
|
|
|
2
2
|
|
|
3
3
|
const SettingUIV2 = [
|
|
4
4
|
{
|
|
5
|
+
label: {
|
|
6
|
+
en: 'Separator Icon'
|
|
7
|
+
},
|
|
5
8
|
controls: [
|
|
6
9
|
{
|
|
7
10
|
label: {
|
|
8
|
-
en: '
|
|
11
|
+
en: 'Icon'
|
|
9
12
|
},
|
|
10
13
|
setting: {
|
|
11
|
-
id: '
|
|
14
|
+
id: 'iconSvg'
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
label: {
|
|
19
|
+
en: 'Color'
|
|
12
20
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
21
|
+
setting: {
|
|
22
|
+
id: 'color'
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
label: {
|
|
27
|
+
en: 'Size'
|
|
28
|
+
},
|
|
29
|
+
setting: {
|
|
30
|
+
id: 'iconWidth'
|
|
16
31
|
}
|
|
17
32
|
}
|
|
18
33
|
]
|
|
19
34
|
},
|
|
20
35
|
{
|
|
21
36
|
label: {
|
|
22
|
-
en: '
|
|
37
|
+
en: 'Text style'
|
|
23
38
|
},
|
|
24
39
|
controls: [
|
|
25
40
|
{
|
|
26
|
-
|
|
27
|
-
|
|
41
|
+
setting: {
|
|
42
|
+
id: 'typo'
|
|
28
43
|
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
id: 'typo'
|
|
44
|
+
layout: 'vertical',
|
|
45
|
+
options: {
|
|
46
|
+
updateFields: [
|
|
47
|
+
{
|
|
48
|
+
field: 'attrs.color',
|
|
49
|
+
settingId: 'labelColor',
|
|
50
|
+
state: 'normal'
|
|
37
51
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
{
|
|
53
|
+
field: 'custom.fontWeight',
|
|
54
|
+
settingId: 'fontWeight',
|
|
55
|
+
state: 'normal'
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
controlChangeTrigger: {
|
|
60
|
+
settings: [
|
|
61
|
+
{
|
|
62
|
+
action: {
|
|
63
|
+
controlId: 'labelColor',
|
|
64
|
+
valueFromField: 'attrs.color',
|
|
65
|
+
groupType: 'setting',
|
|
66
|
+
controlType: 'setting',
|
|
67
|
+
removeDevice: true,
|
|
68
|
+
state: 'normal'
|
|
69
|
+
}
|
|
52
70
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
removeDevice: true,
|
|
62
|
-
state: 'normal'
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
action: {
|
|
67
|
-
controlId: 'fontWeight',
|
|
68
|
-
valueFromField: 'custom.fontWeight',
|
|
69
|
-
groupType: 'setting',
|
|
70
|
-
controlType: 'setting',
|
|
71
|
-
removeDevice: true,
|
|
72
|
-
state: 'normal'
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
],
|
|
76
|
-
options: {
|
|
77
|
-
noRecordHistory: true
|
|
71
|
+
{
|
|
72
|
+
action: {
|
|
73
|
+
controlId: 'fontWeight',
|
|
74
|
+
valueFromField: 'custom.fontWeight',
|
|
75
|
+
groupType: 'setting',
|
|
76
|
+
controlType: 'setting',
|
|
77
|
+
removeDevice: true,
|
|
78
|
+
state: 'normal'
|
|
78
79
|
}
|
|
79
80
|
}
|
|
81
|
+
],
|
|
82
|
+
options: {
|
|
83
|
+
noRecordHistory: true
|
|
80
84
|
}
|
|
81
|
-
|
|
82
|
-
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
label: {
|
|
91
|
+
en: 'Item spacing'
|
|
92
|
+
},
|
|
93
|
+
controls: [
|
|
83
94
|
{
|
|
84
95
|
label: {
|
|
85
|
-
en: '
|
|
96
|
+
en: 'Gap'
|
|
86
97
|
},
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
98
|
+
setting: {
|
|
99
|
+
id: 'spacing'
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
label: {
|
|
106
|
+
en: 'Size'
|
|
107
|
+
},
|
|
108
|
+
controls: [
|
|
109
|
+
{
|
|
110
|
+
label: {
|
|
111
|
+
en: 'Padding'
|
|
93
112
|
},
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
id: 'labelColor',
|
|
101
|
-
state: 'hover'
|
|
102
|
-
}
|
|
113
|
+
controlConfig: {
|
|
114
|
+
id: 'padding',
|
|
115
|
+
type: 'padding-v2',
|
|
116
|
+
linkWithSetting: {
|
|
117
|
+
name: 'globalSize',
|
|
118
|
+
field: 'padding'
|
|
103
119
|
},
|
|
104
|
-
{
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
120
|
+
compoDefaultValue: {
|
|
121
|
+
desktop: {
|
|
122
|
+
default: {
|
|
123
|
+
type: 'custom',
|
|
124
|
+
top: '4px',
|
|
125
|
+
bottom: '4px',
|
|
126
|
+
left: '16px',
|
|
127
|
+
right: '16px'
|
|
128
|
+
}
|
|
111
129
|
}
|
|
112
130
|
}
|
|
113
|
-
|
|
131
|
+
}
|
|
114
132
|
}
|
|
115
133
|
]
|
|
116
134
|
},
|
|
117
135
|
{
|
|
118
136
|
label: {
|
|
119
|
-
en: '
|
|
137
|
+
en: 'Background'
|
|
120
138
|
},
|
|
121
139
|
controls: [
|
|
122
140
|
{
|
|
123
141
|
label: {
|
|
124
|
-
en: '
|
|
142
|
+
en: 'Color'
|
|
125
143
|
},
|
|
126
|
-
|
|
127
|
-
id: '
|
|
144
|
+
controlConfig: {
|
|
145
|
+
id: 'background-color',
|
|
146
|
+
type: 'color-picker-v2',
|
|
147
|
+
linkWithSetting: {
|
|
148
|
+
name: 'background',
|
|
149
|
+
field: 'color'
|
|
150
|
+
},
|
|
151
|
+
compoDefaultValue: {
|
|
152
|
+
desktop: {
|
|
153
|
+
default: '#ffffff'
|
|
154
|
+
}
|
|
155
|
+
}
|
|
128
156
|
}
|
|
129
157
|
}
|
|
130
158
|
]
|
|
131
159
|
},
|
|
132
160
|
{
|
|
133
161
|
label: {
|
|
134
|
-
en: '
|
|
162
|
+
en: 'Shape'
|
|
135
163
|
},
|
|
136
164
|
controls: [
|
|
137
165
|
{
|
|
138
166
|
label: {
|
|
139
|
-
en: '
|
|
167
|
+
en: 'Border'
|
|
140
168
|
},
|
|
141
169
|
setting: {
|
|
142
|
-
id: '
|
|
170
|
+
id: 'border',
|
|
171
|
+
state: 'normal'
|
|
143
172
|
}
|
|
144
173
|
},
|
|
145
174
|
{
|
|
146
175
|
label: {
|
|
147
|
-
en: '
|
|
176
|
+
en: 'Corner'
|
|
148
177
|
},
|
|
149
178
|
setting: {
|
|
150
|
-
id: '
|
|
179
|
+
id: 'rounded',
|
|
180
|
+
state: 'normal'
|
|
151
181
|
}
|
|
152
182
|
},
|
|
153
183
|
{
|
|
154
184
|
label: {
|
|
155
|
-
en: '
|
|
185
|
+
en: 'Shadow'
|
|
156
186
|
},
|
|
157
187
|
setting: {
|
|
158
|
-
id: '
|
|
188
|
+
id: 'boxShadow',
|
|
189
|
+
state: 'normal'
|
|
190
|
+
},
|
|
191
|
+
options: {
|
|
192
|
+
updateFields: [
|
|
193
|
+
{
|
|
194
|
+
field: 'enable',
|
|
195
|
+
settingId: 'hasBoxShadow',
|
|
196
|
+
state: 'normal'
|
|
197
|
+
}
|
|
198
|
+
]
|
|
199
|
+
},
|
|
200
|
+
controlChangeTrigger: {
|
|
201
|
+
settings: [
|
|
202
|
+
{
|
|
203
|
+
condition: `boxShadow.normal.enable === true`,
|
|
204
|
+
source: [
|
|
205
|
+
'boxShadow',
|
|
206
|
+
'hasBoxShadow'
|
|
207
|
+
],
|
|
208
|
+
action: {
|
|
209
|
+
controlId: 'hasBoxShadow',
|
|
210
|
+
groupType: 'advanced',
|
|
211
|
+
controlType: 'advanced',
|
|
212
|
+
state: 'normal',
|
|
213
|
+
newValue: true
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
condition: `boxShadow.normal.enable === false`,
|
|
218
|
+
source: [
|
|
219
|
+
'boxShadow',
|
|
220
|
+
'hasBoxShadow'
|
|
221
|
+
],
|
|
222
|
+
action: {
|
|
223
|
+
controlId: 'hasBoxShadow',
|
|
224
|
+
groupType: 'advanced',
|
|
225
|
+
controlType: 'advanced',
|
|
226
|
+
state: 'normal',
|
|
227
|
+
newValue: false
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
options: {
|
|
232
|
+
noRecordHistory: true
|
|
233
|
+
}
|
|
159
234
|
}
|
|
160
235
|
}
|
|
161
236
|
]
|
|
162
237
|
},
|
|
163
238
|
{
|
|
164
239
|
label: {
|
|
165
|
-
en: '
|
|
240
|
+
en: 'Effect'
|
|
166
241
|
},
|
|
167
242
|
controls: [
|
|
168
243
|
{
|
|
169
244
|
label: {
|
|
170
|
-
en: '
|
|
245
|
+
en: 'Hover'
|
|
171
246
|
},
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
247
|
+
type: 'combo',
|
|
248
|
+
iconName: 'polaris-check-hover',
|
|
249
|
+
fixedValue: 'Enabled',
|
|
250
|
+
isHideClear: true,
|
|
251
|
+
popoverLabel: {
|
|
252
|
+
en: 'Hover'
|
|
253
|
+
},
|
|
254
|
+
controls: [
|
|
255
|
+
{
|
|
256
|
+
label: {
|
|
257
|
+
en: 'Text color'
|
|
258
|
+
},
|
|
259
|
+
setting: {
|
|
260
|
+
id: 'labelColor',
|
|
261
|
+
state: 'hover'
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
label: {
|
|
266
|
+
en: 'Font weight'
|
|
267
|
+
},
|
|
268
|
+
setting: {
|
|
269
|
+
id: 'fontWeight',
|
|
270
|
+
state: 'hover'
|
|
271
|
+
}
|
|
178
272
|
}
|
|
179
|
-
|
|
273
|
+
]
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
label: {
|
|
277
|
+
en: 'Active'
|
|
278
|
+
},
|
|
279
|
+
type: 'combo',
|
|
280
|
+
iconName: 'polaris-status-active',
|
|
281
|
+
fixedValue: 'Enabled',
|
|
282
|
+
isHideClear: true,
|
|
283
|
+
popoverLabel: {
|
|
284
|
+
en: 'Active'
|
|
285
|
+
},
|
|
286
|
+
controls: [
|
|
287
|
+
{
|
|
288
|
+
label: {
|
|
289
|
+
en: 'Text color'
|
|
290
|
+
},
|
|
291
|
+
setting: {
|
|
292
|
+
id: 'labelColor',
|
|
293
|
+
state: 'active'
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
label: {
|
|
298
|
+
en: 'Font weight'
|
|
299
|
+
},
|
|
300
|
+
setting: {
|
|
301
|
+
id: 'fontWeight',
|
|
302
|
+
state: 'active'
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
]
|
|
180
306
|
}
|
|
181
307
|
]
|
|
182
308
|
},
|
|
183
309
|
{
|
|
184
310
|
label: {
|
|
185
|
-
en: '
|
|
311
|
+
en: 'Display option'
|
|
186
312
|
},
|
|
187
313
|
controls: [
|
|
188
314
|
{
|
|
189
315
|
label: {
|
|
190
|
-
en: '
|
|
316
|
+
en: 'Current page'
|
|
191
317
|
},
|
|
192
318
|
setting: {
|
|
193
|
-
id: '
|
|
194
|
-
state: 'active'
|
|
195
|
-
}
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
label: {
|
|
199
|
-
en: 'Font weight'
|
|
200
|
-
},
|
|
201
|
-
setting: {
|
|
202
|
-
id: 'fontWeight',
|
|
203
|
-
state: 'active'
|
|
319
|
+
id: 'hideCurrentPage'
|
|
204
320
|
}
|
|
205
321
|
}
|
|
206
322
|
]
|
|
@@ -687,17 +687,6 @@ const CouponPresets = [
|
|
|
687
687
|
}
|
|
688
688
|
}
|
|
689
689
|
},
|
|
690
|
-
rounded: {
|
|
691
|
-
desktop: {
|
|
692
|
-
normal: {
|
|
693
|
-
btrr: '0px',
|
|
694
|
-
bblr: '0px',
|
|
695
|
-
bbrr: '0px',
|
|
696
|
-
btlr: '0px',
|
|
697
|
-
radiusType: 'custom'
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
},
|
|
701
690
|
hasBoxShadow: {
|
|
702
691
|
desktop: {
|
|
703
692
|
normal: false
|
|
@@ -14,7 +14,6 @@ var system = require('@gem-sdk/system');
|
|
|
14
14
|
var styles = require('./common/styles.js');
|
|
15
15
|
|
|
16
16
|
const Sticky = ({ children, builderAttrs, setting, style, builderProps })=>{
|
|
17
|
-
const mode = core.useEditorMode();
|
|
18
17
|
const { background, preloadBgImage } = setting ?? {};
|
|
19
18
|
const { w, positionStyle, displayStyle, getCSSAlign } = useSticky.default(setting);
|
|
20
19
|
const computedContainerStyles = system.createStyle({
|
|
@@ -22,7 +21,6 @@ const Sticky = ({ children, builderAttrs, setting, style, builderProps })=>{
|
|
|
22
21
|
...w,
|
|
23
22
|
...displayStyle,
|
|
24
23
|
...styles.getStylePadding(style),
|
|
25
|
-
...mode !== 'edit' && setting?.isScrollToTop ? styles.displayConditionStyle(setting?.display, setting?.position) : {},
|
|
26
24
|
...positionStyle,
|
|
27
25
|
...getCSSAlign,
|
|
28
26
|
zIndex: _const.ELEMENT_Z_INDEX.STICKY
|
|
@@ -19,8 +19,7 @@ const Sticky = ({ children, builderAttrs, setting, style, builderProps, advanced
|
|
|
19
19
|
const createDataState = system.createStateOrContext({
|
|
20
20
|
uid: builderProps?.uid,
|
|
21
21
|
setting: {
|
|
22
|
-
display
|
|
23
|
-
isScrollToTop
|
|
22
|
+
display
|
|
24
23
|
},
|
|
25
24
|
advanced: {
|
|
26
25
|
d: advancedDisplay
|
|
@@ -7,7 +7,7 @@ import { createAttr, createStyle, createClass } from '@gem-sdk/system';
|
|
|
7
7
|
import { getAttr, getNavAttr } from './common/attr.js';
|
|
8
8
|
import { getBreadcrumbStyles, getSpacingStyles } from './common/style.js';
|
|
9
9
|
import { getBreadcrumbClasses, getNavClasses } from './common/classes.js';
|
|
10
|
-
import { makeStyleResponsive } from '@gem-sdk/core';
|
|
10
|
+
import { makeGlobalSize, makeStyleResponsive } from '@gem-sdk/core';
|
|
11
11
|
|
|
12
12
|
const Breadcrumb = ({ className, setting = {}, style, styles = {}, builderAttrs, builderProps })=>{
|
|
13
13
|
const { background, align } = setting || {};
|
|
@@ -51,6 +51,7 @@ const Breadcrumb = ({ className, setting = {}, style, styles = {}, builderAttrs,
|
|
|
51
51
|
...getNavAttr()
|
|
52
52
|
});
|
|
53
53
|
const navStyles = createStyle({
|
|
54
|
+
...makeGlobalSize(setting?.globalSize).padding,
|
|
54
55
|
...getSpacingStyles(setting?.spacing),
|
|
55
56
|
...makeStyleResponsive('jc', align)
|
|
56
57
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { makeStyleResponsive, template } from '@gem-sdk/core';
|
|
1
|
+
import { makeGlobalSize, makeStyleResponsive, template } from '@gem-sdk/core';
|
|
2
2
|
import { createAttr, createClass, createStyle, Liquid, LiquidUnless } from '@gem-sdk/system';
|
|
3
3
|
import { BreadcrumbItem } from './BreadcrumbItem.liquid.js';
|
|
4
4
|
import { getAttr, getNavAttr } from './common/attr.js';
|
|
@@ -45,6 +45,7 @@ const Breadcrumb = ({ setting = {}, builderAttrs, style, styles = {}, className,
|
|
|
45
45
|
...getNavAttr()
|
|
46
46
|
});
|
|
47
47
|
const navStyles = createStyle({
|
|
48
|
+
...makeGlobalSize(setting?.globalSize).padding,
|
|
48
49
|
...getSpacingStyles(spacing),
|
|
49
50
|
...makeStyleResponsive('jc', align)
|
|
50
51
|
});
|
|
@@ -2,6 +2,31 @@ const BreadcrumbSettings = [
|
|
|
2
2
|
{
|
|
3
3
|
id: 'setting',
|
|
4
4
|
controls: [
|
|
5
|
+
{
|
|
6
|
+
id: 'globalSize',
|
|
7
|
+
type: 'size-setting',
|
|
8
|
+
devices: {
|
|
9
|
+
desktop: {
|
|
10
|
+
default: {
|
|
11
|
+
width: 'Auto',
|
|
12
|
+
height: 'Auto',
|
|
13
|
+
padding: {
|
|
14
|
+
type: 'custom',
|
|
15
|
+
top: '4px',
|
|
16
|
+
bottom: '4px',
|
|
17
|
+
left: '16px',
|
|
18
|
+
right: '16px'
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
hiddenSettings: [
|
|
24
|
+
'shape',
|
|
25
|
+
'gap',
|
|
26
|
+
'width',
|
|
27
|
+
'height'
|
|
28
|
+
]
|
|
29
|
+
},
|
|
5
30
|
{
|
|
6
31
|
id: 'hideCurrentPage',
|
|
7
32
|
type: 'toggle',
|
|
@@ -35,10 +60,12 @@ const BreadcrumbSettings = [
|
|
|
35
60
|
{
|
|
36
61
|
id: 'spacing',
|
|
37
62
|
label: 'Spacing',
|
|
38
|
-
type: 'input:
|
|
63
|
+
type: 'input:slider',
|
|
39
64
|
units: [
|
|
40
65
|
'px'
|
|
41
66
|
],
|
|
67
|
+
step: 1,
|
|
68
|
+
max: 40,
|
|
42
69
|
devices: {
|
|
43
70
|
desktop: {
|
|
44
71
|
default: '4px'
|
|
@@ -178,7 +205,7 @@ const BreadcrumbSettings = [
|
|
|
178
205
|
id: 'color',
|
|
179
206
|
type: 'color-picker-v2',
|
|
180
207
|
label: 'Color',
|
|
181
|
-
default: '
|
|
208
|
+
default: 'text-1'
|
|
182
209
|
}
|
|
183
210
|
]
|
|
184
211
|
},
|
|
@@ -1,204 +1,320 @@
|
|
|
1
1
|
const SettingUIV2 = [
|
|
2
2
|
{
|
|
3
|
+
label: {
|
|
4
|
+
en: 'Separator Icon'
|
|
5
|
+
},
|
|
3
6
|
controls: [
|
|
4
7
|
{
|
|
5
8
|
label: {
|
|
6
|
-
en: '
|
|
9
|
+
en: 'Icon'
|
|
7
10
|
},
|
|
8
11
|
setting: {
|
|
9
|
-
id: '
|
|
12
|
+
id: 'iconSvg'
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
label: {
|
|
17
|
+
en: 'Color'
|
|
10
18
|
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
19
|
+
setting: {
|
|
20
|
+
id: 'color'
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
label: {
|
|
25
|
+
en: 'Size'
|
|
26
|
+
},
|
|
27
|
+
setting: {
|
|
28
|
+
id: 'iconWidth'
|
|
14
29
|
}
|
|
15
30
|
}
|
|
16
31
|
]
|
|
17
32
|
},
|
|
18
33
|
{
|
|
19
34
|
label: {
|
|
20
|
-
en: '
|
|
35
|
+
en: 'Text style'
|
|
21
36
|
},
|
|
22
37
|
controls: [
|
|
23
38
|
{
|
|
24
|
-
|
|
25
|
-
|
|
39
|
+
setting: {
|
|
40
|
+
id: 'typo'
|
|
26
41
|
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
id: 'typo'
|
|
42
|
+
layout: 'vertical',
|
|
43
|
+
options: {
|
|
44
|
+
updateFields: [
|
|
45
|
+
{
|
|
46
|
+
field: 'attrs.color',
|
|
47
|
+
settingId: 'labelColor',
|
|
48
|
+
state: 'normal'
|
|
35
49
|
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
{
|
|
51
|
+
field: 'custom.fontWeight',
|
|
52
|
+
settingId: 'fontWeight',
|
|
53
|
+
state: 'normal'
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
controlChangeTrigger: {
|
|
58
|
+
settings: [
|
|
59
|
+
{
|
|
60
|
+
action: {
|
|
61
|
+
controlId: 'labelColor',
|
|
62
|
+
valueFromField: 'attrs.color',
|
|
63
|
+
groupType: 'setting',
|
|
64
|
+
controlType: 'setting',
|
|
65
|
+
removeDevice: true,
|
|
66
|
+
state: 'normal'
|
|
67
|
+
}
|
|
50
68
|
},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
removeDevice: true,
|
|
60
|
-
state: 'normal'
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
action: {
|
|
65
|
-
controlId: 'fontWeight',
|
|
66
|
-
valueFromField: 'custom.fontWeight',
|
|
67
|
-
groupType: 'setting',
|
|
68
|
-
controlType: 'setting',
|
|
69
|
-
removeDevice: true,
|
|
70
|
-
state: 'normal'
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
],
|
|
74
|
-
options: {
|
|
75
|
-
noRecordHistory: true
|
|
69
|
+
{
|
|
70
|
+
action: {
|
|
71
|
+
controlId: 'fontWeight',
|
|
72
|
+
valueFromField: 'custom.fontWeight',
|
|
73
|
+
groupType: 'setting',
|
|
74
|
+
controlType: 'setting',
|
|
75
|
+
removeDevice: true,
|
|
76
|
+
state: 'normal'
|
|
76
77
|
}
|
|
77
78
|
}
|
|
79
|
+
],
|
|
80
|
+
options: {
|
|
81
|
+
noRecordHistory: true
|
|
78
82
|
}
|
|
79
|
-
|
|
80
|
-
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
label: {
|
|
89
|
+
en: 'Item spacing'
|
|
90
|
+
},
|
|
91
|
+
controls: [
|
|
81
92
|
{
|
|
82
93
|
label: {
|
|
83
|
-
en: '
|
|
94
|
+
en: 'Gap'
|
|
84
95
|
},
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
96
|
+
setting: {
|
|
97
|
+
id: 'spacing'
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
label: {
|
|
104
|
+
en: 'Size'
|
|
105
|
+
},
|
|
106
|
+
controls: [
|
|
107
|
+
{
|
|
108
|
+
label: {
|
|
109
|
+
en: 'Padding'
|
|
91
110
|
},
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
id: 'labelColor',
|
|
99
|
-
state: 'hover'
|
|
100
|
-
}
|
|
111
|
+
controlConfig: {
|
|
112
|
+
id: 'padding',
|
|
113
|
+
type: 'padding-v2',
|
|
114
|
+
linkWithSetting: {
|
|
115
|
+
name: 'globalSize',
|
|
116
|
+
field: 'padding'
|
|
101
117
|
},
|
|
102
|
-
{
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
118
|
+
compoDefaultValue: {
|
|
119
|
+
desktop: {
|
|
120
|
+
default: {
|
|
121
|
+
type: 'custom',
|
|
122
|
+
top: '4px',
|
|
123
|
+
bottom: '4px',
|
|
124
|
+
left: '16px',
|
|
125
|
+
right: '16px'
|
|
126
|
+
}
|
|
109
127
|
}
|
|
110
128
|
}
|
|
111
|
-
|
|
129
|
+
}
|
|
112
130
|
}
|
|
113
131
|
]
|
|
114
132
|
},
|
|
115
133
|
{
|
|
116
134
|
label: {
|
|
117
|
-
en: '
|
|
135
|
+
en: 'Background'
|
|
118
136
|
},
|
|
119
137
|
controls: [
|
|
120
138
|
{
|
|
121
139
|
label: {
|
|
122
|
-
en: '
|
|
140
|
+
en: 'Color'
|
|
123
141
|
},
|
|
124
|
-
|
|
125
|
-
id: '
|
|
142
|
+
controlConfig: {
|
|
143
|
+
id: 'background-color',
|
|
144
|
+
type: 'color-picker-v2',
|
|
145
|
+
linkWithSetting: {
|
|
146
|
+
name: 'background',
|
|
147
|
+
field: 'color'
|
|
148
|
+
},
|
|
149
|
+
compoDefaultValue: {
|
|
150
|
+
desktop: {
|
|
151
|
+
default: '#ffffff'
|
|
152
|
+
}
|
|
153
|
+
}
|
|
126
154
|
}
|
|
127
155
|
}
|
|
128
156
|
]
|
|
129
157
|
},
|
|
130
158
|
{
|
|
131
159
|
label: {
|
|
132
|
-
en: '
|
|
160
|
+
en: 'Shape'
|
|
133
161
|
},
|
|
134
162
|
controls: [
|
|
135
163
|
{
|
|
136
164
|
label: {
|
|
137
|
-
en: '
|
|
165
|
+
en: 'Border'
|
|
138
166
|
},
|
|
139
167
|
setting: {
|
|
140
|
-
id: '
|
|
168
|
+
id: 'border',
|
|
169
|
+
state: 'normal'
|
|
141
170
|
}
|
|
142
171
|
},
|
|
143
172
|
{
|
|
144
173
|
label: {
|
|
145
|
-
en: '
|
|
174
|
+
en: 'Corner'
|
|
146
175
|
},
|
|
147
176
|
setting: {
|
|
148
|
-
id: '
|
|
177
|
+
id: 'rounded',
|
|
178
|
+
state: 'normal'
|
|
149
179
|
}
|
|
150
180
|
},
|
|
151
181
|
{
|
|
152
182
|
label: {
|
|
153
|
-
en: '
|
|
183
|
+
en: 'Shadow'
|
|
154
184
|
},
|
|
155
185
|
setting: {
|
|
156
|
-
id: '
|
|
186
|
+
id: 'boxShadow',
|
|
187
|
+
state: 'normal'
|
|
188
|
+
},
|
|
189
|
+
options: {
|
|
190
|
+
updateFields: [
|
|
191
|
+
{
|
|
192
|
+
field: 'enable',
|
|
193
|
+
settingId: 'hasBoxShadow',
|
|
194
|
+
state: 'normal'
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
controlChangeTrigger: {
|
|
199
|
+
settings: [
|
|
200
|
+
{
|
|
201
|
+
condition: `boxShadow.normal.enable === true`,
|
|
202
|
+
source: [
|
|
203
|
+
'boxShadow',
|
|
204
|
+
'hasBoxShadow'
|
|
205
|
+
],
|
|
206
|
+
action: {
|
|
207
|
+
controlId: 'hasBoxShadow',
|
|
208
|
+
groupType: 'advanced',
|
|
209
|
+
controlType: 'advanced',
|
|
210
|
+
state: 'normal',
|
|
211
|
+
newValue: true
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
condition: `boxShadow.normal.enable === false`,
|
|
216
|
+
source: [
|
|
217
|
+
'boxShadow',
|
|
218
|
+
'hasBoxShadow'
|
|
219
|
+
],
|
|
220
|
+
action: {
|
|
221
|
+
controlId: 'hasBoxShadow',
|
|
222
|
+
groupType: 'advanced',
|
|
223
|
+
controlType: 'advanced',
|
|
224
|
+
state: 'normal',
|
|
225
|
+
newValue: false
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
],
|
|
229
|
+
options: {
|
|
230
|
+
noRecordHistory: true
|
|
231
|
+
}
|
|
157
232
|
}
|
|
158
233
|
}
|
|
159
234
|
]
|
|
160
235
|
},
|
|
161
236
|
{
|
|
162
237
|
label: {
|
|
163
|
-
en: '
|
|
238
|
+
en: 'Effect'
|
|
164
239
|
},
|
|
165
240
|
controls: [
|
|
166
241
|
{
|
|
167
242
|
label: {
|
|
168
|
-
en: '
|
|
243
|
+
en: 'Hover'
|
|
169
244
|
},
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
245
|
+
type: 'combo',
|
|
246
|
+
iconName: 'polaris-check-hover',
|
|
247
|
+
fixedValue: 'Enabled',
|
|
248
|
+
isHideClear: true,
|
|
249
|
+
popoverLabel: {
|
|
250
|
+
en: 'Hover'
|
|
251
|
+
},
|
|
252
|
+
controls: [
|
|
253
|
+
{
|
|
254
|
+
label: {
|
|
255
|
+
en: 'Text color'
|
|
256
|
+
},
|
|
257
|
+
setting: {
|
|
258
|
+
id: 'labelColor',
|
|
259
|
+
state: 'hover'
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
label: {
|
|
264
|
+
en: 'Font weight'
|
|
265
|
+
},
|
|
266
|
+
setting: {
|
|
267
|
+
id: 'fontWeight',
|
|
268
|
+
state: 'hover'
|
|
269
|
+
}
|
|
176
270
|
}
|
|
177
|
-
|
|
271
|
+
]
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
label: {
|
|
275
|
+
en: 'Active'
|
|
276
|
+
},
|
|
277
|
+
type: 'combo',
|
|
278
|
+
iconName: 'polaris-status-active',
|
|
279
|
+
fixedValue: 'Enabled',
|
|
280
|
+
isHideClear: true,
|
|
281
|
+
popoverLabel: {
|
|
282
|
+
en: 'Active'
|
|
283
|
+
},
|
|
284
|
+
controls: [
|
|
285
|
+
{
|
|
286
|
+
label: {
|
|
287
|
+
en: 'Text color'
|
|
288
|
+
},
|
|
289
|
+
setting: {
|
|
290
|
+
id: 'labelColor',
|
|
291
|
+
state: 'active'
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
label: {
|
|
296
|
+
en: 'Font weight'
|
|
297
|
+
},
|
|
298
|
+
setting: {
|
|
299
|
+
id: 'fontWeight',
|
|
300
|
+
state: 'active'
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
]
|
|
178
304
|
}
|
|
179
305
|
]
|
|
180
306
|
},
|
|
181
307
|
{
|
|
182
308
|
label: {
|
|
183
|
-
en: '
|
|
309
|
+
en: 'Display option'
|
|
184
310
|
},
|
|
185
311
|
controls: [
|
|
186
312
|
{
|
|
187
313
|
label: {
|
|
188
|
-
en: '
|
|
314
|
+
en: 'Current page'
|
|
189
315
|
},
|
|
190
316
|
setting: {
|
|
191
|
-
id: '
|
|
192
|
-
state: 'active'
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
label: {
|
|
197
|
-
en: 'Font weight'
|
|
198
|
-
},
|
|
199
|
-
setting: {
|
|
200
|
-
id: 'fontWeight',
|
|
201
|
-
state: 'active'
|
|
317
|
+
id: 'hideCurrentPage'
|
|
202
318
|
}
|
|
203
319
|
}
|
|
204
320
|
]
|
|
@@ -685,17 +685,6 @@ const CouponPresets = [
|
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
687
|
},
|
|
688
|
-
rounded: {
|
|
689
|
-
desktop: {
|
|
690
|
-
normal: {
|
|
691
|
-
btrr: '0px',
|
|
692
|
-
bblr: '0px',
|
|
693
|
-
bbrr: '0px',
|
|
694
|
-
btlr: '0px',
|
|
695
|
-
radiusType: 'custom'
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
},
|
|
699
688
|
hasBoxShadow: {
|
|
700
689
|
desktop: {
|
|
701
690
|
normal: false
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import {
|
|
3
|
+
import { cls, getStyleBackgroundByDevice, isEmptyChildren } from '@gem-sdk/core';
|
|
4
4
|
import Head from 'next/head';
|
|
5
5
|
import ChildrenDroppable from '../../grid/components/ChildrenDroppable.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import { ELEMENT_Z_INDEX } from '../../common/const.js';
|
|
8
8
|
import useSticky from './hooks/useSticky.js';
|
|
9
9
|
import { createStyle } from '@gem-sdk/system';
|
|
10
|
-
import { getStylePadding,
|
|
10
|
+
import { getStylePadding, filterStyles } from './common/styles.js';
|
|
11
11
|
|
|
12
12
|
const Sticky = ({ children, builderAttrs, setting, style, builderProps })=>{
|
|
13
|
-
const mode = useEditorMode();
|
|
14
13
|
const { background, preloadBgImage } = setting ?? {};
|
|
15
14
|
const { w, positionStyle, displayStyle, getCSSAlign } = useSticky(setting);
|
|
16
15
|
const computedContainerStyles = createStyle({
|
|
@@ -18,7 +17,6 @@ const Sticky = ({ children, builderAttrs, setting, style, builderProps })=>{
|
|
|
18
17
|
...w,
|
|
19
18
|
...displayStyle,
|
|
20
19
|
...getStylePadding(style),
|
|
21
|
-
...mode !== 'edit' && setting?.isScrollToTop ? displayConditionStyle(setting?.display, setting?.position) : {},
|
|
22
20
|
...positionStyle,
|
|
23
21
|
...getCSSAlign,
|
|
24
22
|
zIndex: ELEMENT_Z_INDEX.STICKY
|
package/dist/types/index.d.ts
CHANGED
|
@@ -765,6 +765,7 @@ type BreadcrumbProps = BaseProps<{
|
|
|
765
765
|
background?: ObjectDevices$1<Background>;
|
|
766
766
|
spacing?: ObjectDevices$1<string>;
|
|
767
767
|
color?: ColorValueType$1;
|
|
768
|
+
globalSize?: ObjectDevices$1<SizeSettingGlobal>;
|
|
768
769
|
}> & BasePropsWrap<{
|
|
769
770
|
iconSvg?: string;
|
|
770
771
|
}, {
|
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.460",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"update-img-src-3rd": "node ./scripts/update-img-src-3rd.js"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@gem-sdk/core": "2.0.0-dev.
|
|
26
|
+
"@gem-sdk/core": "2.0.0-dev.460",
|
|
27
27
|
"@gem-sdk/styles": "2.0.0-dev.381",
|
|
28
28
|
"@gem-sdk/system": "2.0.0-dev.451",
|
|
29
29
|
"@types/react-transition-group": "^4.4.5"
|