@gem-sdk/components 2.0.0-dev.275 → 2.0.0-dev.278
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/article/components/ArticleReadMore.js +2 -4
- package/dist/cjs/banner/components/HeroBannerItem.liquid.js +4 -4
- package/dist/cjs/builder.js +4 -8
- package/dist/cjs/button/components/Button.js +111 -184
- package/dist/cjs/button/components/Button.liquid.js +108 -171
- package/dist/cjs/button/components/ButtonIcon.js +17 -0
- package/dist/cjs/button/components/ButtonIcon.liquid.js +16 -0
- package/dist/cjs/button/components/ButtonLabel.js +18 -0
- package/dist/cjs/button/components/ButtonLabel.liquid.js +15 -0
- package/dist/cjs/button/components/ButtonLoadingIndicator.liquid.js +12 -0
- package/dist/cjs/button/components/common/attributes.js +15 -0
- package/dist/cjs/button/components/common/classes.js +55 -0
- package/dist/cjs/button/components/common/constants.js +26 -0
- package/dist/cjs/button/components/common/data.js +76 -0
- package/dist/cjs/button/components/common/helpers.js +131 -0
- package/dist/cjs/button/components/common/styles.js +157 -0
- package/dist/cjs/button/next.js +2 -6
- package/dist/cjs/button/setting/configs/settings.js +5 -1
- package/dist/cjs/cart/components/CheckoutNow.js +0 -2
- package/dist/cjs/coupon/components/Coupon.js +1 -3
- package/dist/cjs/dialog/setting/Dialog.js +7 -580
- package/dist/cjs/dialog/setting/configs/settings.js +325 -0
- package/dist/cjs/dialog/setting/configs/uiV1.js +288 -0
- package/dist/cjs/dialog/setting/configs/uiV2.js +258 -0
- package/dist/cjs/estimate-delivery/components/EstimateDate.liquid.js +3 -3
- package/dist/cjs/form/components/submit-button/SubmitButton.js +0 -4
- package/dist/cjs/index.js +2 -4
- package/dist/cjs/index.liquid.js +1 -3
- package/dist/cjs/post-purchase/callout-banner/components/CalloutText.js +1 -2
- package/dist/cjs/post-purchase/callout-banner/components/common/getClasses.js +2 -5
- package/dist/cjs/post-purchase/callout-banner/components/common/getStyles.js +4 -2
- package/dist/cjs/post-purchase/callout-banner/setting/config/callout-text/setting.js +11 -1
- package/dist/cjs/post-purchase/product/hooks/product-image/useListCarousel.js +1 -1
- package/dist/cjs/post-purchase/product/hooks/product-image/useProductImagePostPurchase.js +4 -1
- package/dist/cjs/post-purchase/product/settings/product-image/setting-v2.js +15 -2
- package/dist/cjs/post-purchase/product/settings/product-image/uiV2.js +3 -1
- package/dist/cjs/post-purchase/utils/constants.js +1 -1
- package/dist/cjs/product/components/DynamicCheckout/DynamicCheckout.js +2 -5
- package/dist/cjs/product/components/DynamicCheckout.js +2 -5
- package/dist/cjs/product/components/FileUpload/components/common/index.js +1 -1
- package/dist/cjs/product/components/ProductButton.js +2 -3
- package/dist/cjs/product/components/ProductButton.liquid.js +3 -3
- package/dist/cjs/product/components/ProductDescription/index.liquid.js +1 -2
- package/dist/cjs/product/components/ProductViewMore.js +2 -5
- package/dist/cjs/product/components/ProductViewMore.liquid.js +2 -2
- package/dist/cjs/setting.js +2 -2
- package/dist/cjs/text/components/common/getClasses.js +1 -1
- package/dist/cjs/third-party/components/PushOwl.js +0 -5
- package/dist/esm/article/components/ArticleReadMore.js +1 -3
- package/dist/esm/banner/components/HeroBannerItem.liquid.js +4 -4
- package/dist/esm/builder.js +1 -5
- package/dist/esm/button/components/Button.js +113 -186
- package/dist/esm/button/components/Button.liquid.js +109 -172
- package/dist/esm/button/components/ButtonIcon.js +13 -0
- package/dist/esm/button/components/ButtonIcon.liquid.js +12 -0
- package/dist/esm/button/components/ButtonLabel.js +14 -0
- package/dist/esm/button/components/ButtonLabel.liquid.js +11 -0
- package/dist/esm/button/components/ButtonLoadingIndicator.liquid.js +8 -0
- package/dist/esm/button/components/common/attributes.js +13 -0
- package/dist/esm/button/components/common/classes.js +49 -0
- package/dist/esm/button/components/common/constants.js +24 -0
- package/dist/esm/button/components/common/data.js +74 -0
- package/dist/esm/button/components/common/helpers.js +118 -0
- package/dist/esm/button/components/common/styles.js +148 -0
- package/dist/esm/button/next.js +2 -6
- package/dist/esm/button/setting/configs/settings.js +5 -1
- package/dist/esm/cart/components/CheckoutNow.js +0 -2
- package/dist/esm/coupon/components/Coupon.js +1 -3
- package/dist/esm/dialog/setting/Dialog.js +7 -580
- package/dist/esm/dialog/setting/configs/settings.js +323 -0
- package/dist/esm/dialog/setting/configs/uiV1.js +286 -0
- package/dist/esm/dialog/setting/configs/uiV2.js +256 -0
- package/dist/esm/estimate-delivery/components/EstimateDate.liquid.js +3 -3
- package/dist/esm/form/components/submit-button/SubmitButton.js +0 -4
- package/dist/esm/index.js +1 -2
- package/dist/esm/index.liquid.js +1 -2
- package/dist/esm/post-purchase/callout-banner/components/CalloutText.js +1 -2
- package/dist/esm/post-purchase/callout-banner/components/common/getClasses.js +2 -5
- package/dist/esm/post-purchase/callout-banner/components/common/getStyles.js +4 -2
- package/dist/esm/post-purchase/callout-banner/setting/config/callout-text/setting.js +11 -1
- package/dist/esm/post-purchase/product/hooks/product-image/useListCarousel.js +1 -1
- package/dist/esm/post-purchase/product/hooks/product-image/useProductImagePostPurchase.js +4 -1
- package/dist/esm/post-purchase/product/settings/product-image/setting-v2.js +15 -2
- package/dist/esm/post-purchase/product/settings/product-image/uiV2.js +3 -1
- package/dist/esm/post-purchase/utils/constants.js +1 -1
- package/dist/esm/product/components/DynamicCheckout/DynamicCheckout.js +1 -4
- package/dist/esm/product/components/DynamicCheckout.js +1 -4
- package/dist/esm/product/components/FileUpload/components/common/index.js +1 -1
- package/dist/esm/product/components/ProductButton.js +1 -2
- package/dist/esm/product/components/ProductButton.liquid.js +1 -1
- package/dist/esm/product/components/ProductDescription/index.liquid.js +3 -4
- package/dist/esm/product/components/ProductViewMore.js +1 -4
- package/dist/esm/product/components/ProductViewMore.liquid.js +1 -1
- package/dist/esm/setting.js +2 -2
- package/dist/esm/text/components/common/getClasses.js +1 -1
- package/dist/esm/third-party/components/PushOwl.js +0 -5
- package/dist/types/index.d.ts +175 -267
- package/package.json +2 -2
- package/dist/cjs/button/components/v2/ButtonIcon.js +0 -18
- package/dist/cjs/button/components/v2/ButtonLabel.js +0 -25
- package/dist/cjs/button/components/v2/ButtonV2.js +0 -140
- package/dist/cjs/button/components/v2/ButtonV2.liquid.js +0 -181
- package/dist/cjs/button/hooks/useButtonCustomCss.js +0 -88
- package/dist/cjs/button/hooks/useButtonStyles.js +0 -93
- package/dist/esm/button/components/v2/ButtonIcon.js +0 -14
- package/dist/esm/button/components/v2/ButtonLabel.js +0 -21
- package/dist/esm/button/components/v2/ButtonV2.js +0 -136
- package/dist/esm/button/components/v2/ButtonV2.liquid.js +0 -177
- package/dist/esm/button/hooks/useButtonCustomCss.js +0 -84
- package/dist/esm/button/hooks/useButtonStyles.js +0 -91
- /package/dist/cjs/button/components/{v2/ButtonLoadingIndicator.js → ButtonLoadingIndicator.js} +0 -0
- /package/dist/esm/button/components/{v2/ButtonLoadingIndicator.js → ButtonLoadingIndicator.js} +0 -0
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const SettingUIV2 = [
|
|
4
|
+
{
|
|
5
|
+
label: {
|
|
6
|
+
en: 'Popup Name'
|
|
7
|
+
},
|
|
8
|
+
controls: [
|
|
9
|
+
{
|
|
10
|
+
label: {
|
|
11
|
+
en: 'Name'
|
|
12
|
+
},
|
|
13
|
+
setting: {
|
|
14
|
+
id: 'name'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
label: {
|
|
21
|
+
en: 'Button close'
|
|
22
|
+
},
|
|
23
|
+
controls: [
|
|
24
|
+
{
|
|
25
|
+
label: {
|
|
26
|
+
en: 'Button size'
|
|
27
|
+
},
|
|
28
|
+
setting: {
|
|
29
|
+
id: 'btnSize'
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: {
|
|
34
|
+
en: 'Background'
|
|
35
|
+
},
|
|
36
|
+
setting: {
|
|
37
|
+
id: 'btnBg'
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
moreSettings: {
|
|
42
|
+
controls: [
|
|
43
|
+
{
|
|
44
|
+
setting: {
|
|
45
|
+
id: 'closeButtonPosition'
|
|
46
|
+
},
|
|
47
|
+
label: {
|
|
48
|
+
en: 'Position'
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
label: {
|
|
53
|
+
en: 'Color'
|
|
54
|
+
},
|
|
55
|
+
setting: {
|
|
56
|
+
id: 'btnColor'
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: {
|
|
61
|
+
en: 'Corner'
|
|
62
|
+
},
|
|
63
|
+
setting: {
|
|
64
|
+
id: 'btnRounded'
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
controls: [
|
|
72
|
+
{
|
|
73
|
+
label: {
|
|
74
|
+
en: 'Overlay'
|
|
75
|
+
},
|
|
76
|
+
setting: {
|
|
77
|
+
id: 'isOverlay'
|
|
78
|
+
},
|
|
79
|
+
options: {
|
|
80
|
+
labelVariant: 'primary',
|
|
81
|
+
toggleStyle: 'switch'
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
conditionDisplay: `isOverlay === true`,
|
|
86
|
+
label: {
|
|
87
|
+
en: 'Color'
|
|
88
|
+
},
|
|
89
|
+
setting: {
|
|
90
|
+
id: 'overlayColor'
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
conditionDisplay: `isOverlay === true`,
|
|
95
|
+
label: {
|
|
96
|
+
en: 'Click to close'
|
|
97
|
+
},
|
|
98
|
+
setting: {
|
|
99
|
+
id: 'closeOnClickOutside'
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
conditionDisplay: `isOverlay === true`,
|
|
104
|
+
label: {
|
|
105
|
+
en: 'Opacity'
|
|
106
|
+
},
|
|
107
|
+
setting: {
|
|
108
|
+
id: 'overlayOpacity'
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
label: {
|
|
115
|
+
en: 'Size'
|
|
116
|
+
},
|
|
117
|
+
controls: [
|
|
118
|
+
{
|
|
119
|
+
label: {
|
|
120
|
+
en: 'Full screen'
|
|
121
|
+
},
|
|
122
|
+
setting: {
|
|
123
|
+
id: 'fullScreen'
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
conditionDisplay: `!fullScreen`,
|
|
128
|
+
label: {
|
|
129
|
+
en: 'Width'
|
|
130
|
+
},
|
|
131
|
+
setting: {
|
|
132
|
+
id: 'width'
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
conditionDisplay: `!fullScreen`,
|
|
137
|
+
label: {
|
|
138
|
+
en: 'Height'
|
|
139
|
+
},
|
|
140
|
+
setting: {
|
|
141
|
+
id: 'height'
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
label: {
|
|
148
|
+
en: 'Background'
|
|
149
|
+
},
|
|
150
|
+
controls: [
|
|
151
|
+
{
|
|
152
|
+
setting: {
|
|
153
|
+
id: 'background'
|
|
154
|
+
},
|
|
155
|
+
layout: 'vertical'
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
label: {
|
|
161
|
+
en: 'Position'
|
|
162
|
+
},
|
|
163
|
+
controls: [
|
|
164
|
+
{
|
|
165
|
+
label: {
|
|
166
|
+
en: 'Choose'
|
|
167
|
+
},
|
|
168
|
+
type: 'combo',
|
|
169
|
+
iconPrefix: 'gp-position',
|
|
170
|
+
iconName: 'polaris-edit',
|
|
171
|
+
isHideClear: true,
|
|
172
|
+
getValueFromSettingID: 'position',
|
|
173
|
+
controls: [
|
|
174
|
+
{
|
|
175
|
+
label: {
|
|
176
|
+
en: 'Choose'
|
|
177
|
+
},
|
|
178
|
+
setting: {
|
|
179
|
+
id: 'position'
|
|
180
|
+
},
|
|
181
|
+
options: {
|
|
182
|
+
labelAlign: 'top'
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
],
|
|
186
|
+
conditionDisplay: `!fullScreen`
|
|
187
|
+
}
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
label: {
|
|
192
|
+
en: 'Display'
|
|
193
|
+
},
|
|
194
|
+
controls: [
|
|
195
|
+
{
|
|
196
|
+
label: {
|
|
197
|
+
en: 'Show when'
|
|
198
|
+
},
|
|
199
|
+
setting: {
|
|
200
|
+
id: 'trigger'
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
conditionDisplay: `trigger === 'show-after-time'`,
|
|
205
|
+
label: {
|
|
206
|
+
en: 'Time'
|
|
207
|
+
},
|
|
208
|
+
setting: {
|
|
209
|
+
id: 'triggerTime'
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
conditionDisplay: `trigger === 'show-after-scroll'`,
|
|
214
|
+
label: {
|
|
215
|
+
en: 'Scroll'
|
|
216
|
+
},
|
|
217
|
+
setting: {
|
|
218
|
+
id: 'triggerPercentage'
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
conditionDisplay: `trigger === 'show-when-about-exit'`,
|
|
223
|
+
label: {
|
|
224
|
+
en: 'On mobile'
|
|
225
|
+
},
|
|
226
|
+
setting: {
|
|
227
|
+
id: 'mobileTrigger'
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
conditionDisplay: `trigger === 'show-when-about-exit' && mobileTrigger === 'timer'`,
|
|
232
|
+
label: {
|
|
233
|
+
en: 'After load'
|
|
234
|
+
},
|
|
235
|
+
setting: {
|
|
236
|
+
id: 'mobileTriggerTime'
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
]
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
label: {
|
|
243
|
+
en: 'Effect'
|
|
244
|
+
},
|
|
245
|
+
controls: [
|
|
246
|
+
{
|
|
247
|
+
setting: {
|
|
248
|
+
id: 'effectType'
|
|
249
|
+
},
|
|
250
|
+
label: {
|
|
251
|
+
en: 'Entrance effect'
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
]
|
|
255
|
+
}
|
|
256
|
+
];
|
|
257
|
+
|
|
258
|
+
exports.SettingUIV2 = SettingUIV2;
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var core = require('@gem-sdk/core');
|
|
6
|
-
var helpers = require('../../helpers.js');
|
|
7
6
|
require('@gem-sdk/system');
|
|
7
|
+
var helpers = require('../../helpers.js');
|
|
8
8
|
require('react/jsx-runtime');
|
|
9
9
|
require('react');
|
|
10
|
+
require('next/link');
|
|
10
11
|
require('../../product/components/ProductVariants/variants/index.js');
|
|
11
12
|
var Text_liquid = require('../../text/components/Text.liquid.js');
|
|
12
13
|
require('../../product/components/ProductBadge/constants.js');
|
|
@@ -14,9 +15,8 @@ require('../../product/components/constants/product-bundle.js');
|
|
|
14
15
|
require('../../product/components/ProductBadge/types.js');
|
|
15
16
|
require('../../product/components/ProductBadge/utils/shape.js');
|
|
16
17
|
require('../../accordion/setting/configs/settings.js');
|
|
17
|
-
require('next/head');
|
|
18
|
-
require('next/link');
|
|
19
18
|
require('@gem-sdk/keen-slider/react');
|
|
19
|
+
require('next/head');
|
|
20
20
|
require('next/image');
|
|
21
21
|
require('react-youtube');
|
|
22
22
|
require('../../image/components/AdaptiveImage.js');
|
|
@@ -4,10 +4,6 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
require('@gem-sdk/core');
|
|
8
|
-
require('next/head');
|
|
9
|
-
require('react');
|
|
10
|
-
require('next/link');
|
|
11
7
|
var Button = require('../../../button/components/Button.js');
|
|
12
8
|
var composeSetting = require('./common/composeSetting.js');
|
|
13
9
|
var system = require('@gem-sdk/system');
|
package/dist/cjs/index.js
CHANGED
|
@@ -5,9 +5,8 @@ var Accordion = require('./accordion/components/Accordion.js');
|
|
|
5
5
|
var AccordionItem = require('./accordion/components/AccordionItem.js');
|
|
6
6
|
var Breadcrumb = require('./breadcrumb/components/Breadcrumb.js');
|
|
7
7
|
var index$1 = require('./breadcrumb/setting/index.js');
|
|
8
|
-
var index$2 = require('./button/setting/index.js');
|
|
9
|
-
var ButtonV2 = require('./button/components/v2/ButtonV2.js');
|
|
10
8
|
var Button = require('./button/components/Button.js');
|
|
9
|
+
var index$2 = require('./button/setting/index.js');
|
|
11
10
|
var index$3 = require('./coupon/setting/index.js');
|
|
12
11
|
var Coupon = require('./coupon/components/Coupon.js');
|
|
13
12
|
var index$4 = require('./carousel/setting/index.js');
|
|
@@ -326,9 +325,8 @@ exports.Accordion = Accordion.default;
|
|
|
326
325
|
exports.AccordionItem = AccordionItem.default;
|
|
327
326
|
exports.Breadcrumb = Breadcrumb.default;
|
|
328
327
|
exports.breadcrumbSetting = index$1.default;
|
|
328
|
+
exports.Button = Button.default;
|
|
329
329
|
exports.buttonSetting = index$2.default;
|
|
330
|
-
exports.Button = ButtonV2.default;
|
|
331
|
-
exports.ButtonV1 = Button.default;
|
|
332
330
|
exports.couponSetting = index$3.default;
|
|
333
331
|
exports.Coupon = Coupon.default;
|
|
334
332
|
exports.carouselSetting = index$4.default;
|
package/dist/cjs/index.liquid.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var Button_liquid = require('./button/components/Button.liquid.js');
|
|
5
|
-
var ButtonV2_liquid = require('./button/components/v2/ButtonV2.liquid.js');
|
|
6
5
|
var Coupon_liquid = require('./coupon/components/Coupon.liquid.js');
|
|
7
6
|
var Col_liquid = require('./grid/col/Col.liquid.js');
|
|
8
7
|
var Row_liquid = require('./grid/row/Row.liquid.js');
|
|
@@ -198,8 +197,7 @@ var Marquee_liquid = require('./marquee/components/Marquee.liquid.js');
|
|
|
198
197
|
|
|
199
198
|
|
|
200
199
|
|
|
201
|
-
exports.
|
|
202
|
-
exports.Button = ButtonV2_liquid.default;
|
|
200
|
+
exports.Button = Button_liquid.default;
|
|
203
201
|
exports.Coupon = Coupon_liquid.default;
|
|
204
202
|
exports.Col = Col_liquid.default;
|
|
205
203
|
exports.Row = Row_liquid.default;
|
|
@@ -15,7 +15,6 @@ const CalloutText = ({ setting = {}, styles = {}, style, builderAttrs, builderPr
|
|
|
15
15
|
const { message } = setting;
|
|
16
16
|
const wrapperClasses = system.createClass({
|
|
17
17
|
...getClasses.getCalloutTextWrapperClasses({
|
|
18
|
-
align,
|
|
19
18
|
builderProps
|
|
20
19
|
})
|
|
21
20
|
});
|
|
@@ -25,7 +24,7 @@ const CalloutText = ({ setting = {}, styles = {}, style, builderAttrs, builderPr
|
|
|
25
24
|
const textStyles = {
|
|
26
25
|
...getStyles.getTextStyles(styles)
|
|
27
26
|
};
|
|
28
|
-
const wrapperStyles = system.createStyle(getStyles.getCalloutTextStyle(style));
|
|
27
|
+
const wrapperStyles = system.createStyle(getStyles.getCalloutTextStyle(style, align));
|
|
29
28
|
const wrapperAttrs = system.createAttr({
|
|
30
29
|
...builderAttrs
|
|
31
30
|
});
|
|
@@ -2,14 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
var core = require('@gem-sdk/core');
|
|
4
4
|
|
|
5
|
-
const getCalloutTextWrapperClasses = ({
|
|
5
|
+
const getCalloutTextWrapperClasses = ({ builderProps })=>{
|
|
6
6
|
let classList = 'gp-flex gp-w-full';
|
|
7
7
|
if (builderProps?.uid) classList += `${builderProps?.uid}`;
|
|
8
8
|
return {
|
|
9
|
-
...core.composeClasses(classList)
|
|
10
|
-
'gp-justify-start': align === 'left',
|
|
11
|
-
'gp-justify-end': align === 'right',
|
|
12
|
-
'gp-justify-center': align === 'center'
|
|
9
|
+
...core.composeClasses(classList)
|
|
13
10
|
};
|
|
14
11
|
};
|
|
15
12
|
const getCalloutBoxWrapperClasses = (styles)=>{
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var core = require('@gem-sdk/core');
|
|
3
4
|
var helpers = require('../../../../helpers.js');
|
|
4
5
|
|
|
5
|
-
const getCalloutTextStyle = (style)=>{
|
|
6
|
+
const getCalloutTextStyle = (style, align)=>{
|
|
6
7
|
return helpers.filterTruthyStyles({
|
|
7
|
-
...style
|
|
8
|
+
...style,
|
|
9
|
+
...core.makeStyleResponsive('jc', align)
|
|
8
10
|
});
|
|
9
11
|
};
|
|
10
12
|
const getTextStyles = (styles)=>{
|
|
@@ -164,7 +164,17 @@ const CalloutTextSettings = [
|
|
|
164
164
|
iconName: 'gp-align-right'
|
|
165
165
|
}
|
|
166
166
|
],
|
|
167
|
-
|
|
167
|
+
devices: {
|
|
168
|
+
desktop: {
|
|
169
|
+
default: 'left'
|
|
170
|
+
},
|
|
171
|
+
tablet: {
|
|
172
|
+
default: 'left'
|
|
173
|
+
},
|
|
174
|
+
mobile: {
|
|
175
|
+
default: 'left'
|
|
176
|
+
}
|
|
177
|
+
}
|
|
168
178
|
}
|
|
169
179
|
]
|
|
170
180
|
}
|
|
@@ -41,7 +41,10 @@ const useProductImagePostPurchase = (props)=>{
|
|
|
41
41
|
ratioLayoutRight
|
|
42
42
|
]);
|
|
43
43
|
const isImageListCarousel = React.useMemo(()=>{
|
|
44
|
-
return
|
|
44
|
+
return ![
|
|
45
|
+
'two-col',
|
|
46
|
+
'one-col'
|
|
47
|
+
].includes(layoutType) && ([
|
|
45
48
|
'left',
|
|
46
49
|
'right'
|
|
47
50
|
].includes(layoutType) || displayType === 'slider');
|
|
@@ -202,13 +202,26 @@ const SettingV2 = [
|
|
|
202
202
|
},
|
|
203
203
|
{
|
|
204
204
|
id: 'ftWidth',
|
|
205
|
-
type: 'input
|
|
205
|
+
type: 'dropdown:input',
|
|
206
206
|
label: 'Width',
|
|
207
|
-
min: 0,
|
|
208
207
|
units: [
|
|
209
208
|
'px',
|
|
210
209
|
'%'
|
|
211
210
|
],
|
|
211
|
+
hideUnit: false,
|
|
212
|
+
inputType: 'number',
|
|
213
|
+
displayOptions: [
|
|
214
|
+
{
|
|
215
|
+
label: 'Full',
|
|
216
|
+
value: '100%',
|
|
217
|
+
showValue: true
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
label: 'Default',
|
|
221
|
+
value: '1200px',
|
|
222
|
+
showValue: true
|
|
223
|
+
}
|
|
224
|
+
],
|
|
212
225
|
devices: {
|
|
213
226
|
desktop: {
|
|
214
227
|
default: '100%'
|
|
@@ -224,7 +224,9 @@ const SettingUIV2 = [
|
|
|
224
224
|
id: 'align'
|
|
225
225
|
},
|
|
226
226
|
options: {
|
|
227
|
-
labelVariant: 'primary'
|
|
227
|
+
labelVariant: 'primary',
|
|
228
|
+
fullWidth: true,
|
|
229
|
+
disableMessage: `Horizontal alignment is disabled when the width is set to 100% or greater`
|
|
228
230
|
},
|
|
229
231
|
conditionEnable: '!(parseInt(ftWidth) >= 100 && ftWidth?.includes("%"))'
|
|
230
232
|
}
|
|
@@ -4,15 +4,12 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
var
|
|
8
|
-
require('@gem-sdk/core');
|
|
9
|
-
require('next/link');
|
|
10
|
-
require('react');
|
|
7
|
+
var Button = require('../../../button/components/Button.js');
|
|
11
8
|
|
|
12
9
|
const DynamicCheckout = ({ builderProps, builderAttrs, style, styles, advanced, setting })=>{
|
|
13
10
|
const { ...buttonStyles } = styles ?? {};
|
|
14
11
|
const label = setting?.label || 'Buy it now';
|
|
15
|
-
return /*#__PURE__*/ jsxRuntime.jsx(
|
|
12
|
+
return /*#__PURE__*/ jsxRuntime.jsx(Button.default, {
|
|
16
13
|
builderProps: builderProps,
|
|
17
14
|
builderAttrs: builderAttrs,
|
|
18
15
|
advanced: advanced,
|
|
@@ -4,16 +4,13 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
var
|
|
8
|
-
require('@gem-sdk/core');
|
|
9
|
-
require('next/link');
|
|
10
|
-
require('react');
|
|
7
|
+
var Button = require('../../button/components/Button.js');
|
|
11
8
|
|
|
12
9
|
const DynamicCheckout = ({ builderProps, builderAttrs, style, styles, advanced, setting })=>{
|
|
13
10
|
const { ...buttonStyles } = styles ?? {};
|
|
14
11
|
const label = setting?.label || 'Buy it now';
|
|
15
12
|
return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
16
|
-
children: /*#__PURE__*/ jsxRuntime.jsx(
|
|
13
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(Button.default, {
|
|
17
14
|
builderProps: builderProps,
|
|
18
15
|
builderAttrs: builderAttrs,
|
|
19
16
|
className: "shopify-payment-button__button",
|
|
@@ -6,10 +6,10 @@ require('react');
|
|
|
6
6
|
require('@gem-sdk/core');
|
|
7
7
|
require('@gem-sdk/system');
|
|
8
8
|
var helpers = require('../../../../../helpers.js');
|
|
9
|
-
require('next/head');
|
|
10
9
|
require('next/link');
|
|
11
10
|
require('@gem-sdk/keen-slider/react');
|
|
12
11
|
require('../../../ProductVariants/variants/index.js');
|
|
12
|
+
require('next/head');
|
|
13
13
|
require('next/image');
|
|
14
14
|
require('react-youtube');
|
|
15
15
|
require('../../../../../image/components/AdaptiveImage.js');
|
|
@@ -6,8 +6,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var core = require('@gem-sdk/core');
|
|
8
8
|
var React = require('react');
|
|
9
|
-
var
|
|
10
|
-
require('next/link');
|
|
9
|
+
var Button = require('../../button/components/Button.js');
|
|
11
10
|
var useNotification = require('../../notification/hooks/use-notification.js');
|
|
12
11
|
require('../../notification/components/Notice.js');
|
|
13
12
|
var Text = require('../../text/components/Text.js');
|
|
@@ -477,7 +476,7 @@ const ProductButton = ({ setting, builderProps, builderAttrs, style, styles, adv
|
|
|
477
476
|
]);
|
|
478
477
|
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
479
478
|
children: [
|
|
480
|
-
/*#__PURE__*/ jsxRuntime.jsxs(
|
|
479
|
+
/*#__PURE__*/ jsxRuntime.jsxs(Button.default, {
|
|
481
480
|
className: core.cls({
|
|
482
481
|
'gp-cursor-default gp-opacity-30': isDisable
|
|
483
482
|
}),
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var core = require('@gem-sdk/core');
|
|
6
|
+
var Button_liquid = require('../../button/components/Button.liquid.js');
|
|
6
7
|
var helpers = require('../../helpers.js');
|
|
7
|
-
var ButtonV2_liquid = require('../../button/components/v2/ButtonV2.liquid.js');
|
|
8
8
|
var ProductPrice_liquid = require('./ProductPrice.liquid.js');
|
|
9
9
|
|
|
10
10
|
const NODE_PRICE_EMPTY = null;
|
|
@@ -304,7 +304,7 @@ const ProductButton = ({ setting, builderProps, builderAttrs, style, styles, adv
|
|
|
304
304
|
gp-href="${urlData.href}"
|
|
305
305
|
data-variant-selection-required-message="${pageContext?.isPreviewing ? variantSelectionRequiredMessage : `{{${variantSelectionRequiredMessage}}}`}"
|
|
306
306
|
>
|
|
307
|
-
${
|
|
307
|
+
${Button_liquid.default({
|
|
308
308
|
className: 'gp-button-atc tcustomizer-submit-button',
|
|
309
309
|
wrapClassName: `{% unless variant.available %} !gp-hidden {% endunless %}`,
|
|
310
310
|
advanced: advanced,
|
|
@@ -338,7 +338,7 @@ const ProductButton = ({ setting, builderProps, builderAttrs, style, styles, adv
|
|
|
338
338
|
pageContext,
|
|
339
339
|
nodePrice: composeNodePrice()
|
|
340
340
|
})}
|
|
341
|
-
${
|
|
341
|
+
${Button_liquid.default({
|
|
342
342
|
className: 'gp-button-sold-out btn-disabled gp-opacity-30 gp-cursor-default',
|
|
343
343
|
wrapClassName: `{% if variant.available %} !gp-hidden {% endif %}`,
|
|
344
344
|
advanced: advanced,
|
|
@@ -45,7 +45,7 @@ const ProductDescription = (props)=>{
|
|
|
45
45
|
const textAttr = system.createAttr({
|
|
46
46
|
'data-gp-text': ''
|
|
47
47
|
});
|
|
48
|
-
const {
|
|
48
|
+
const { textDescriptionCss } = getStyle.getStaticCss();
|
|
49
49
|
const noDescriptionHtml = 'product.description == blank';
|
|
50
50
|
const renderScript = ()=>{
|
|
51
51
|
const jsURL = core.isLocalEnv ? `{{ 'gp-product-description-v2.js' | asset_url }}` : `${core.baseAssetURL}/assets-v2/gp-product-description-v2.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;
|
|
@@ -67,7 +67,6 @@ const ProductDescription = (props)=>{
|
|
|
67
67
|
class="${gpDescriptionClasses}"
|
|
68
68
|
gp-data='${core.dataStringify(stateData).replaceAll("'", ''')}'>
|
|
69
69
|
<style>${textDescriptionCss}</style>
|
|
70
|
-
${system.If(!core.isSafari(), `<style>${gpDescriptionCss}</style>`, ' ')}
|
|
71
70
|
${system.LiquidUnless('product', `<p>Product not found</p>`, core.template`<${Tag} ${textAttr} class="${textClasses}" style="${textStyle}">
|
|
72
71
|
{{product.description}}
|
|
73
72
|
</${Tag}>
|
|
@@ -4,16 +4,13 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
var
|
|
8
|
-
require('@gem-sdk/core');
|
|
9
|
-
require('next/link');
|
|
10
|
-
require('react');
|
|
7
|
+
var Button = require('../../button/components/Button.js');
|
|
11
8
|
|
|
12
9
|
const ProductViewMore = ({ setting, builderProps, builderAttrs, style, styles, advanced, children })=>{
|
|
13
10
|
const { ...buttonStyles } = styles ?? {};
|
|
14
11
|
const { label, iconSvg, iconAlign, iconVisible, shouldClearSpace } = setting ?? {};
|
|
15
12
|
return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
16
|
-
children: /*#__PURE__*/ jsxRuntime.jsx(
|
|
13
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(Button.default, {
|
|
17
14
|
builderProps: builderProps,
|
|
18
15
|
builderAttrs: builderAttrs,
|
|
19
16
|
advanced: advanced,
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var core = require('@gem-sdk/core');
|
|
6
|
+
var Button_liquid = require('../../button/components/Button.liquid.js');
|
|
6
7
|
var helpers = require('../../helpers.js');
|
|
7
|
-
var ButtonV2_liquid = require('../../button/components/v2/ButtonV2.liquid.js');
|
|
8
8
|
|
|
9
9
|
const ProductViewMore = ({ setting, builderProps, builderAttrs, style, styles, advanced, pageContext })=>{
|
|
10
10
|
const { ...buttonStyles } = styles ?? {};
|
|
11
11
|
const { label, iconSvg, iconAlign, iconVisible, translate } = setting ?? {};
|
|
12
12
|
return core.template`
|
|
13
13
|
<gp-product-view-more>
|
|
14
|
-
${
|
|
14
|
+
${Button_liquid.default({
|
|
15
15
|
className: 'btn-view-more',
|
|
16
16
|
builderProps: builderProps,
|
|
17
17
|
builderAttrs: builderAttrs,
|
package/dist/cjs/setting.js
CHANGED
|
@@ -9,16 +9,16 @@ require('@gem-sdk/core');
|
|
|
9
9
|
var index$m = require('./text/setting/index.js');
|
|
10
10
|
require('@gem-sdk/system');
|
|
11
11
|
var index$1 = require('./breadcrumb/setting/index.js');
|
|
12
|
-
var index$2 = require('./button/setting/index.js');
|
|
13
|
-
require('next/head');
|
|
14
12
|
var index$f = require('./link/setting/index.js');
|
|
15
13
|
require('next/link');
|
|
14
|
+
var index$2 = require('./button/setting/index.js');
|
|
16
15
|
var index$3 = require('./coupon/setting/index.js');
|
|
17
16
|
var index$4 = require('./carousel/setting/index.js');
|
|
18
17
|
require('@gem-sdk/keen-slider/react');
|
|
19
18
|
require('./product/components/ProductVariants/variants/index.js');
|
|
20
19
|
var index$5 = require('./cart/setting/index.js');
|
|
21
20
|
var index$8 = require('./grid/setting/index.js');
|
|
21
|
+
require('next/head');
|
|
22
22
|
require('next/image');
|
|
23
23
|
require('react-youtube');
|
|
24
24
|
var index$c = require('./image/setting/index.js');
|
|
@@ -28,7 +28,7 @@ const getTextClasses = ({ styles, setting, className, mode })=>{
|
|
|
28
28
|
const { text, options } = setting ?? {};
|
|
29
29
|
let classList = '';
|
|
30
30
|
if (!text) {
|
|
31
|
-
classList += `gp-relative empty:gp-pl-[2px] after:gp-content-['Your_custom_text_goes_here'] after:gp-absolute after:gp-select-none after:gp-top-0 after:gp-left-[2px] after:gp-w-full after:gp-truncate after:gp-text-black after:gp-opacity-20`;
|
|
31
|
+
classList += `gp-relative empty:gp-pl-[2px] after:gp-content-['Your_custom_text_goes_here'] after:gp-absolute after:gp-select-none after:gp-top-0 after:gp-left-[2px] after:gp-w-full after:gp-truncate after:gp-text-black after:gp-opacity-20 `;
|
|
32
32
|
}
|
|
33
33
|
if (styles?.underlineLink) {
|
|
34
34
|
classList += `${styles.underlineLink.hover ? 'hover:gp-underline' : ''} ${styles.underlineLink.normal ? 'gp-underline' : ''}`;
|