@gem-sdk/components 2.0.0-dev.274 → 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.
- package/dist/cjs/article/components/ArticleReadMore.js +2 -4
- package/dist/cjs/banner/components/HeroBannerItem.liquid.js +5 -5
- package/dist/cjs/builder.js +17 -21
- 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/cart/components/ShopPayButton/ShopPayButton.js +70 -0
- package/dist/cjs/cart/components/ShopPayButton/ShopPayButton.liquid.js +71 -0
- package/dist/cjs/cart/components/ShopPayButton/common/classes.js +18 -0
- package/dist/cjs/cart/components/ShopPayButton/common/helpers.js +31 -0
- package/dist/cjs/cart/components/ShopPayButton/common/styles.js +12 -0
- package/dist/cjs/cart/components/ShopPayButton/hooks/useShopPayButton.js +70 -0
- package/dist/cjs/cart/next.js +1 -1
- 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 +4 -4
- package/dist/cjs/form/components/submit-button/SubmitButton.js +0 -4
- package/dist/cjs/header/components/kind/basic/index.js +1 -1
- package/dist/cjs/header/components/kind/modern/index.js +1 -1
- package/dist/cjs/index.js +41 -43
- package/dist/cjs/index.liquid.js +10 -12
- package/dist/cjs/product/components/DynamicCheckout/DynamicCheckout.js +25 -0
- package/dist/cjs/product/components/DynamicCheckout/DynamicCheckout.liquid.js +23 -0
- package/dist/cjs/product/components/DynamicCheckout/common/classes.js +32 -0
- package/dist/cjs/product/components/DynamicCheckout/common/styles.js +181 -0
- package/dist/cjs/product/components/DynamicCheckout/components/Button.liquid.js +58 -0
- package/dist/cjs/product/components/DynamicCheckout.js +2 -5
- package/dist/cjs/product/components/FileUpload/components/common/index.js +2 -2
- 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/common/const.js +9 -0
- package/dist/cjs/product/components/ProductDescription/common/getClasses.js +30 -0
- package/dist/cjs/product/components/ProductDescription/common/getStyle.js +81 -0
- package/dist/cjs/product/components/ProductDescription/hooks/useGpDescription.js +90 -0
- package/dist/cjs/product/components/ProductDescription/index.js +115 -0
- package/dist/cjs/product/components/ProductDescription/index.liquid.js +85 -0
- package/dist/cjs/product/components/ProductViewMore.js +2 -5
- package/dist/cjs/product/components/ProductViewMore.liquid.js +2 -2
- package/dist/cjs/product/next.js +1 -1
- package/dist/cjs/setting.js +3 -3
- 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 +5 -5
- package/dist/esm/builder.js +4 -8
- 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/cart/components/ShopPayButton/ShopPayButton.js +66 -0
- package/dist/esm/cart/components/ShopPayButton/ShopPayButton.liquid.js +67 -0
- package/dist/esm/cart/components/ShopPayButton/common/classes.js +15 -0
- package/dist/esm/cart/components/ShopPayButton/common/helpers.js +27 -0
- package/dist/esm/cart/components/ShopPayButton/common/styles.js +10 -0
- package/dist/esm/cart/components/ShopPayButton/hooks/useShopPayButton.js +68 -0
- package/dist/esm/cart/next.js +1 -1
- 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 +4 -4
- package/dist/esm/form/components/submit-button/SubmitButton.js +0 -4
- package/dist/esm/header/components/kind/basic/index.js +1 -1
- package/dist/esm/header/components/kind/modern/index.js +1 -1
- package/dist/esm/index.js +4 -5
- package/dist/esm/index.liquid.js +4 -5
- package/dist/esm/product/components/DynamicCheckout/DynamicCheckout.js +21 -0
- package/dist/esm/product/components/DynamicCheckout/DynamicCheckout.liquid.js +19 -0
- package/dist/esm/product/components/DynamicCheckout/common/classes.js +30 -0
- package/dist/esm/product/components/DynamicCheckout/common/styles.js +179 -0
- package/dist/esm/product/components/DynamicCheckout/components/Button.liquid.js +54 -0
- package/dist/esm/product/components/DynamicCheckout.js +1 -4
- package/dist/esm/product/components/FileUpload/components/common/index.js +2 -2
- 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/common/const.js +6 -0
- package/dist/esm/product/components/ProductDescription/common/getClasses.js +27 -0
- package/dist/esm/product/components/ProductDescription/common/getStyle.js +77 -0
- package/dist/esm/product/components/ProductDescription/hooks/useGpDescription.js +88 -0
- package/dist/esm/product/components/ProductDescription/index.js +111 -0
- package/dist/esm/product/components/ProductDescription/index.liquid.js +81 -0
- package/dist/esm/product/components/ProductViewMore.js +1 -4
- package/dist/esm/product/components/ProductViewMore.liquid.js +1 -1
- package/dist/esm/product/next.js +1 -1
- package/dist/esm/setting.js +3 -3
- 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 +200 -360
- 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/cjs/cart/components/ShopPayButton/ShopPayButtonCommon.js +0 -20
- package/dist/cjs/cart/components/ShopPayButton/index.js +0 -113
- package/dist/cjs/cart/components/ShopPayButton/index.liquid.js +0 -51
- package/dist/cjs/product/components/DynamicCheckout.liquid.js +0 -250
- package/dist/cjs/product/components/ProductDescription/const.js +0 -5
- package/dist/cjs/product/components/ProductDescription.js +0 -172
- package/dist/cjs/product/components/ProductDescription.liquid.js +0 -120
- 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/esm/cart/components/ShopPayButton/ShopPayButtonCommon.js +0 -17
- package/dist/esm/cart/components/ShopPayButton/index.js +0 -109
- package/dist/esm/cart/components/ShopPayButton/index.liquid.js +0 -47
- package/dist/esm/product/components/DynamicCheckout.liquid.js +0 -246
- package/dist/esm/product/components/ProductDescription/const.js +0 -3
- package/dist/esm/product/components/ProductDescription.js +0 -168
- package/dist/esm/product/components/ProductDescription.liquid.js +0 -116
- /package/dist/cjs/button/components/{v2/ButtonLoadingIndicator.js → ButtonLoadingIndicator.js} +0 -0
- /package/dist/cjs/product/components/ProductDescription/{common.js → common/getMaxHeight.js} +0 -0
- /package/dist/esm/button/components/{v2/ButtonLoadingIndicator.js → ButtonLoadingIndicator.js} +0 -0
- /package/dist/esm/product/components/ProductDescription/{common.js → common/getMaxHeight.js} +0 -0
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
const SettingUIV2 = [
|
|
2
|
+
{
|
|
3
|
+
label: {
|
|
4
|
+
en: 'Popup Name'
|
|
5
|
+
},
|
|
6
|
+
controls: [
|
|
7
|
+
{
|
|
8
|
+
label: {
|
|
9
|
+
en: 'Name'
|
|
10
|
+
},
|
|
11
|
+
setting: {
|
|
12
|
+
id: 'name'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
label: {
|
|
19
|
+
en: 'Button close'
|
|
20
|
+
},
|
|
21
|
+
controls: [
|
|
22
|
+
{
|
|
23
|
+
label: {
|
|
24
|
+
en: 'Button size'
|
|
25
|
+
},
|
|
26
|
+
setting: {
|
|
27
|
+
id: 'btnSize'
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
label: {
|
|
32
|
+
en: 'Background'
|
|
33
|
+
},
|
|
34
|
+
setting: {
|
|
35
|
+
id: 'btnBg'
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
moreSettings: {
|
|
40
|
+
controls: [
|
|
41
|
+
{
|
|
42
|
+
setting: {
|
|
43
|
+
id: 'closeButtonPosition'
|
|
44
|
+
},
|
|
45
|
+
label: {
|
|
46
|
+
en: 'Position'
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
label: {
|
|
51
|
+
en: 'Color'
|
|
52
|
+
},
|
|
53
|
+
setting: {
|
|
54
|
+
id: 'btnColor'
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: {
|
|
59
|
+
en: 'Corner'
|
|
60
|
+
},
|
|
61
|
+
setting: {
|
|
62
|
+
id: 'btnRounded'
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
controls: [
|
|
70
|
+
{
|
|
71
|
+
label: {
|
|
72
|
+
en: 'Overlay'
|
|
73
|
+
},
|
|
74
|
+
setting: {
|
|
75
|
+
id: 'isOverlay'
|
|
76
|
+
},
|
|
77
|
+
options: {
|
|
78
|
+
labelVariant: 'primary',
|
|
79
|
+
toggleStyle: 'switch'
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
conditionDisplay: `isOverlay === true`,
|
|
84
|
+
label: {
|
|
85
|
+
en: 'Color'
|
|
86
|
+
},
|
|
87
|
+
setting: {
|
|
88
|
+
id: 'overlayColor'
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
conditionDisplay: `isOverlay === true`,
|
|
93
|
+
label: {
|
|
94
|
+
en: 'Click to close'
|
|
95
|
+
},
|
|
96
|
+
setting: {
|
|
97
|
+
id: 'closeOnClickOutside'
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
conditionDisplay: `isOverlay === true`,
|
|
102
|
+
label: {
|
|
103
|
+
en: 'Opacity'
|
|
104
|
+
},
|
|
105
|
+
setting: {
|
|
106
|
+
id: 'overlayOpacity'
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
label: {
|
|
113
|
+
en: 'Size'
|
|
114
|
+
},
|
|
115
|
+
controls: [
|
|
116
|
+
{
|
|
117
|
+
label: {
|
|
118
|
+
en: 'Full screen'
|
|
119
|
+
},
|
|
120
|
+
setting: {
|
|
121
|
+
id: 'fullScreen'
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
conditionDisplay: `!fullScreen`,
|
|
126
|
+
label: {
|
|
127
|
+
en: 'Width'
|
|
128
|
+
},
|
|
129
|
+
setting: {
|
|
130
|
+
id: 'width'
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
conditionDisplay: `!fullScreen`,
|
|
135
|
+
label: {
|
|
136
|
+
en: 'Height'
|
|
137
|
+
},
|
|
138
|
+
setting: {
|
|
139
|
+
id: 'height'
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
label: {
|
|
146
|
+
en: 'Background'
|
|
147
|
+
},
|
|
148
|
+
controls: [
|
|
149
|
+
{
|
|
150
|
+
setting: {
|
|
151
|
+
id: 'background'
|
|
152
|
+
},
|
|
153
|
+
layout: 'vertical'
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
label: {
|
|
159
|
+
en: 'Position'
|
|
160
|
+
},
|
|
161
|
+
controls: [
|
|
162
|
+
{
|
|
163
|
+
label: {
|
|
164
|
+
en: 'Choose'
|
|
165
|
+
},
|
|
166
|
+
type: 'combo',
|
|
167
|
+
iconPrefix: 'gp-position',
|
|
168
|
+
iconName: 'polaris-edit',
|
|
169
|
+
isHideClear: true,
|
|
170
|
+
getValueFromSettingID: 'position',
|
|
171
|
+
controls: [
|
|
172
|
+
{
|
|
173
|
+
label: {
|
|
174
|
+
en: 'Choose'
|
|
175
|
+
},
|
|
176
|
+
setting: {
|
|
177
|
+
id: 'position'
|
|
178
|
+
},
|
|
179
|
+
options: {
|
|
180
|
+
labelAlign: 'top'
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
conditionDisplay: `!fullScreen`
|
|
185
|
+
}
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
label: {
|
|
190
|
+
en: 'Display'
|
|
191
|
+
},
|
|
192
|
+
controls: [
|
|
193
|
+
{
|
|
194
|
+
label: {
|
|
195
|
+
en: 'Show when'
|
|
196
|
+
},
|
|
197
|
+
setting: {
|
|
198
|
+
id: 'trigger'
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
conditionDisplay: `trigger === 'show-after-time'`,
|
|
203
|
+
label: {
|
|
204
|
+
en: 'Time'
|
|
205
|
+
},
|
|
206
|
+
setting: {
|
|
207
|
+
id: 'triggerTime'
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
conditionDisplay: `trigger === 'show-after-scroll'`,
|
|
212
|
+
label: {
|
|
213
|
+
en: 'Scroll'
|
|
214
|
+
},
|
|
215
|
+
setting: {
|
|
216
|
+
id: 'triggerPercentage'
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
conditionDisplay: `trigger === 'show-when-about-exit'`,
|
|
221
|
+
label: {
|
|
222
|
+
en: 'On mobile'
|
|
223
|
+
},
|
|
224
|
+
setting: {
|
|
225
|
+
id: 'mobileTrigger'
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
conditionDisplay: `trigger === 'show-when-about-exit' && mobileTrigger === 'timer'`,
|
|
230
|
+
label: {
|
|
231
|
+
en: 'After load'
|
|
232
|
+
},
|
|
233
|
+
setting: {
|
|
234
|
+
id: 'mobileTriggerTime'
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
]
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
label: {
|
|
241
|
+
en: 'Effect'
|
|
242
|
+
},
|
|
243
|
+
controls: [
|
|
244
|
+
{
|
|
245
|
+
setting: {
|
|
246
|
+
id: 'effectType'
|
|
247
|
+
},
|
|
248
|
+
label: {
|
|
249
|
+
en: 'Entrance effect'
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
];
|
|
255
|
+
|
|
256
|
+
export { SettingUIV2 };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { RenderIf, isLocalEnv, baseAssetURL } from '@gem-sdk/core';
|
|
2
|
-
import { getDynamicSourceLocales, getSettingPreloadData } from '../../helpers.js';
|
|
3
2
|
import '@gem-sdk/system';
|
|
3
|
+
import { getDynamicSourceLocales, getSettingPreloadData } from '../../helpers.js';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import 'react';
|
|
6
|
+
import 'next/link';
|
|
6
7
|
import '../../product/components/ProductVariants/variants/index.js';
|
|
7
8
|
import Text from '../../text/components/Text.liquid.js';
|
|
8
9
|
import '../../product/components/ProductBadge/constants.js';
|
|
@@ -10,13 +11,12 @@ import '../../product/components/constants/product-bundle.js';
|
|
|
10
11
|
import '../../product/components/ProductBadge/types.js';
|
|
11
12
|
import '../../product/components/ProductBadge/utils/shape.js';
|
|
12
13
|
import '../../accordion/setting/configs/settings.js';
|
|
13
|
-
import 'next/head';
|
|
14
|
-
import 'next/link';
|
|
15
14
|
import '@gem-sdk/keen-slider/react';
|
|
15
|
+
import 'next/head';
|
|
16
16
|
import 'next/image';
|
|
17
17
|
import 'react-youtube';
|
|
18
18
|
import '../../image/components/AdaptiveImage.js';
|
|
19
|
-
import '../../cart/components/ShopPayButton/
|
|
19
|
+
import '../../cart/components/ShopPayButton/ShopPayButton.js';
|
|
20
20
|
import '../../countdown-timer/setting/configs/settings.js';
|
|
21
21
|
import '../../header/components/Header.js';
|
|
22
22
|
import '../../header/components/kind/basic/index.js';
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
3
|
-
import '@gem-sdk/core';
|
|
4
|
-
import 'next/head';
|
|
5
|
-
import 'react';
|
|
6
|
-
import 'next/link';
|
|
7
3
|
import Button from '../../../button/components/Button.js';
|
|
8
4
|
import { composeSetting } from './common/composeSetting.js';
|
|
9
5
|
import { createStyle } from '@gem-sdk/system';
|
|
@@ -9,7 +9,7 @@ import 'next/head';
|
|
|
9
9
|
import 'next/image';
|
|
10
10
|
import 'react-youtube';
|
|
11
11
|
import Image from '../../../../image/components/Image.js';
|
|
12
|
-
import '../../../../cart/components/ShopPayButton/
|
|
12
|
+
import '../../../../cart/components/ShopPayButton/ShopPayButton.js';
|
|
13
13
|
import CheckoutNow from '../../../../cart/components/CheckoutNow.js';
|
|
14
14
|
|
|
15
15
|
const MobileMenu = dynamic(()=>import('./MobileMenu.js'));
|
|
@@ -9,7 +9,7 @@ import 'next/image';
|
|
|
9
9
|
import 'react-youtube';
|
|
10
10
|
import 'next/link';
|
|
11
11
|
import '../../../../image/components/AdaptiveImage.js';
|
|
12
|
-
import '../../../../cart/components/ShopPayButton/
|
|
12
|
+
import '../../../../cart/components/ShopPayButton/ShopPayButton.js';
|
|
13
13
|
|
|
14
14
|
const ModernHeader = (props)=>{
|
|
15
15
|
return /*#__PURE__*/ jsxs("div", {
|
package/dist/esm/index.js
CHANGED
|
@@ -3,9 +3,8 @@ export { default as Accordion } from './accordion/components/Accordion.js';
|
|
|
3
3
|
export { default as AccordionItem } from './accordion/components/AccordionItem.js';
|
|
4
4
|
export { default as Breadcrumb } from './breadcrumb/components/Breadcrumb.js';
|
|
5
5
|
export { default as breadcrumbSetting } from './breadcrumb/setting/index.js';
|
|
6
|
+
export { default as Button } from './button/components/Button.js';
|
|
6
7
|
export { default as buttonSetting } from './button/setting/index.js';
|
|
7
|
-
export { default as Button } from './button/components/v2/ButtonV2.js';
|
|
8
|
-
export { default as ButtonV1 } from './button/components/Button.js';
|
|
9
8
|
export { default as couponSetting } from './coupon/setting/index.js';
|
|
10
9
|
export { default as Coupon } from './coupon/components/Coupon.js';
|
|
11
10
|
export { default as carouselSetting } from './carousel/setting/index.js';
|
|
@@ -25,7 +24,7 @@ export { default as CartDiscount } from './cart/components/CartDiscount.js';
|
|
|
25
24
|
export { default as CartOrderNote } from './cart/components/CartOrderNote.js';
|
|
26
25
|
export { default as CartLineAttribute } from './cart/components/CartLineAttribute.js';
|
|
27
26
|
export { default as CouponList } from './cart/components/CouponList.js';
|
|
28
|
-
export { default as ShopPayButton } from './cart/components/ShopPayButton/
|
|
27
|
+
export { default as ShopPayButton } from './cart/components/ShopPayButton/ShopPayButton.js';
|
|
29
28
|
export { default as CheckoutNow } from './cart/components/CheckoutNow.js';
|
|
30
29
|
export { default as collectionSetting } from './collection/setting/index.js';
|
|
31
30
|
export { default as CollectionTitle } from './collection/components/CollectionTitle.js';
|
|
@@ -68,7 +67,7 @@ export { default as productSetting } from './product/setting/index.js';
|
|
|
68
67
|
export { default as Product } from './product/components/Product.js';
|
|
69
68
|
export { default as ProductTitle } from './product/components/ProductTitle/index.js';
|
|
70
69
|
export { default as ProductQuantity } from './product/components/ProductQuantity.js';
|
|
71
|
-
export { default as ProductDescription } from './product/components/ProductDescription.js';
|
|
70
|
+
export { default as ProductDescription } from './product/components/ProductDescription/index.js';
|
|
72
71
|
export { default as ProductPrice } from './product/components/ProductPrice.js';
|
|
73
72
|
export { default as ProductButton } from './product/components/ProductButton.js';
|
|
74
73
|
export { default as ProductVariants } from './product/components/ProductVariants/index.js';
|
|
@@ -78,7 +77,7 @@ export { default as ProductPropertyInput } from './product/components/ProductPro
|
|
|
78
77
|
export { default as ProductQuickView } from './product/components/ProductQuickView/index.js';
|
|
79
78
|
export { default as ProductTag } from './product/components/ProductTag.js';
|
|
80
79
|
export { default as ProductList } from './product/components/ProductList.js';
|
|
81
|
-
export { default as DynamicCheckout } from './product/components/DynamicCheckout.js';
|
|
80
|
+
export { default as DynamicCheckout } from './product/components/DynamicCheckout/DynamicCheckout.js';
|
|
82
81
|
export { default as ProductBundleDiscount } from './product/components/ProductBundleDiscount.js';
|
|
83
82
|
export { default as ProductBundleDiscountItem } from './product/components/ProductBundleDiscountItem.js';
|
|
84
83
|
export { default as ProductVendor } from './product/components/Vendor.js';
|
package/dist/esm/index.liquid.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { default as
|
|
3
|
-
export { default as Button } from './button/components/v2/ButtonV2.liquid.js';
|
|
2
|
+
export { default as Button } from './button/components/Button.liquid.js';
|
|
4
3
|
export { default as Coupon } from './coupon/components/Coupon.liquid.js';
|
|
5
4
|
export { default as Col } from './grid/col/Col.liquid.js';
|
|
6
5
|
export { default as Row } from './grid/row/Row.liquid.js';
|
|
@@ -12,7 +11,7 @@ export { default as Product } from './product/components/Product.liquid.js';
|
|
|
12
11
|
export { default as ProductTitle } from './product/components/ProductTitle/index.liquid.js';
|
|
13
12
|
export { ProductPrice } from './product/components/ProductPrice.liquid.js';
|
|
14
13
|
export { default as ProductButton } from './product/components/ProductButton.liquid.js';
|
|
15
|
-
export { default as ProductDescription } from './product/components/ProductDescription.liquid.js';
|
|
14
|
+
export { default as ProductDescription } from './product/components/ProductDescription/index.liquid.js';
|
|
16
15
|
export { default as ProductImages } from './product/components/ProductImages.liquid.js';
|
|
17
16
|
export { default as ProductImagesV2 } from './product/components/ProductImagesV2/liquid/ProductImages.liquid.js';
|
|
18
17
|
export { default as ProductQuantity } from './product/components/ProductQuantity.liquid.js';
|
|
@@ -20,7 +19,7 @@ export { default as ProductVariants } from './product/components/ProductVariants
|
|
|
20
19
|
export { default as ProductTag } from './product/components/ProductTag.liquid.js';
|
|
21
20
|
export { default as ProductProperties } from './product/components/ProductProperties.liquid.js';
|
|
22
21
|
export { default as ProductList } from './product/components/ProductList.liquid.js';
|
|
23
|
-
export { default as DynamicCheckout } from './product/components/DynamicCheckout.liquid.js';
|
|
22
|
+
export { default as DynamicCheckout } from './product/components/DynamicCheckout/DynamicCheckout.liquid.js';
|
|
24
23
|
export { default as ProductVendor } from './product/components/Vendor.liquid.js';
|
|
25
24
|
export { default as ProductBundleDiscount } from './product/components/ProductBundleDiscount.liquid.js';
|
|
26
25
|
export { default as ProductBundleDiscountItem } from './product/components/ProductBundleDiscountItem.liquid.js';
|
|
@@ -47,7 +46,7 @@ export { default as TabItem } from './tab/components/TabItem.liquid.js';
|
|
|
47
46
|
export { default as HeroBanner } from './banner/components/HeroBanner.liquid.js';
|
|
48
47
|
export { default as CSSCode } from './code/components/CSSCode.liquid.js';
|
|
49
48
|
export { default as StockCounter } from './stock-counter/components/StockCounter.liquid.js';
|
|
50
|
-
export { default as ShopPayButton } from './cart/components/ShopPayButton/
|
|
49
|
+
export { default as ShopPayButton } from './cart/components/ShopPayButton/ShopPayButton.liquid.js';
|
|
51
50
|
export { default as Newsletter } from './form/components/newsletter/Newsletter.liquid.js';
|
|
52
51
|
export { default as ContactForm } from './form/components/contact/Contact.liquid.js';
|
|
53
52
|
export { default as FormEmail } from './form/components/form-email/FormEmail.liquid.js';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import Button from '../../../button/components/Button.js';
|
|
4
|
+
|
|
5
|
+
const DynamicCheckout = ({ builderProps, builderAttrs, style, styles, advanced, setting })=>{
|
|
6
|
+
const { ...buttonStyles } = styles ?? {};
|
|
7
|
+
const label = setting?.label || 'Buy it now';
|
|
8
|
+
return /*#__PURE__*/ jsx(Button, {
|
|
9
|
+
builderProps: builderProps,
|
|
10
|
+
builderAttrs: builderAttrs,
|
|
11
|
+
advanced: advanced,
|
|
12
|
+
setting: {
|
|
13
|
+
label: label,
|
|
14
|
+
htmlType: 'button'
|
|
15
|
+
},
|
|
16
|
+
style: style,
|
|
17
|
+
styles: buttonStyles
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { DynamicCheckout as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Button from './components/Button.liquid.js';
|
|
2
|
+
|
|
3
|
+
const DynamicCheckout = ({ builderProps, styles, advanced, setting, pageContext })=>{
|
|
4
|
+
const { ...buttonStyles } = styles ?? {};
|
|
5
|
+
const label = setting?.label || 'Buy it now';
|
|
6
|
+
return Button({
|
|
7
|
+
builderProps,
|
|
8
|
+
className: '',
|
|
9
|
+
advanced,
|
|
10
|
+
setting: {
|
|
11
|
+
label: label,
|
|
12
|
+
htmlType: 'button'
|
|
13
|
+
},
|
|
14
|
+
styles: buttonStyles,
|
|
15
|
+
pageContext
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { DynamicCheckout as default };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { getGlobalColorStateClassDynamicBtn, genTypoClass, genSizeClass } from '@gem-sdk/core';
|
|
2
|
+
|
|
3
|
+
const getBaseClasses = (uid)=>({
|
|
4
|
+
'gp-block': true,
|
|
5
|
+
[`wrap__button--unbranded__${uid}`]: true,
|
|
6
|
+
[String.raw`[&_.shopify-payment-button\_\_button--unbranded]:gp-min-h-fit`]: true,
|
|
7
|
+
[String.raw`disabled:[&_.shopify-payment-button\_\_button--unbranded]:gp-pointer-events-none`]: true
|
|
8
|
+
});
|
|
9
|
+
const getTypographyClass = (typoType)=>{
|
|
10
|
+
if (!typoType) return {};
|
|
11
|
+
return {
|
|
12
|
+
[String.raw`[&_.shopify-payment-button\_\_button--unbranded]:!${genTypoClass(typoType)}`]: true
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
const getSpacingClass = (spacingType)=>{
|
|
16
|
+
if (!spacingType) return {};
|
|
17
|
+
return {
|
|
18
|
+
[String.raw`[&_.shopify-payment-button\_\_button--unbranded]:!${genSizeClass(spacingType)}`]: true
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
const getButtonClasses = ({ uid = '', styles })=>{
|
|
22
|
+
return {
|
|
23
|
+
...getBaseClasses(uid),
|
|
24
|
+
...getTypographyClass(styles?.typo?.type),
|
|
25
|
+
...getSpacingClass(styles?.btnSpacing?.type),
|
|
26
|
+
[getGlobalColorStateClassDynamicBtn('text', styles?.textColor)]: true
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { getButtonClasses };
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { getWidthHeightGlobalSize, getPaddingGlobalSize, composeShadowCss, composeCornerCss, composeTypographyV2Css, composeTextHoverColorCss, composeBorderCss, composeBackgroundImageCss, composeBackgroundCss } from '@gem-sdk/core';
|
|
2
|
+
|
|
3
|
+
const composeSize = (width, height, important = true)=>{
|
|
4
|
+
return `
|
|
5
|
+
${width ? `width: ${width}${important ? '!important;' : ''};` : ''}
|
|
6
|
+
${height ? `height: ${height}${important ? '!important;' : ''};` : ''}
|
|
7
|
+
`;
|
|
8
|
+
};
|
|
9
|
+
const composeSpacing = (device, padding)=>{
|
|
10
|
+
const suffix = device && device !== 'desktop' ? `-${device}` : '';
|
|
11
|
+
const spacingDevice = {
|
|
12
|
+
top: padding[`--pt${suffix}`],
|
|
13
|
+
bottom: padding[`--pb${suffix}`],
|
|
14
|
+
left: padding[`--pl${suffix}`],
|
|
15
|
+
right: padding[`--pr${suffix}`]
|
|
16
|
+
};
|
|
17
|
+
return `
|
|
18
|
+
padding-top: ${spacingDevice.top ? `${spacingDevice.top} !important;` : ''};
|
|
19
|
+
padding-bottom: ${spacingDevice.bottom ? `${spacingDevice.bottom} !important;` : ''};
|
|
20
|
+
padding-left: ${spacingDevice.left ? `${spacingDevice.left} !important;` : ''};
|
|
21
|
+
padding-right: ${spacingDevice.right ? `${spacingDevice.right} !important;` : ''};
|
|
22
|
+
`;
|
|
23
|
+
};
|
|
24
|
+
const composeFontSize = (fontSize)=>{
|
|
25
|
+
return fontSize ? `font-size: ${fontSize} !important;` : '';
|
|
26
|
+
};
|
|
27
|
+
const composeLineHeight = (lineHeight)=>{
|
|
28
|
+
return lineHeight ? `line-height: ${lineHeight} !important;` : '';
|
|
29
|
+
};
|
|
30
|
+
const composeTextAlign = (align)=>{
|
|
31
|
+
return `${align ? `text-align: ${align} !important;` : ''}`;
|
|
32
|
+
};
|
|
33
|
+
const getDeviceStyles = ({ uid, device, styles, composeGlobalSize })=>{
|
|
34
|
+
return `
|
|
35
|
+
.wrap__button--unbranded__${uid} {
|
|
36
|
+
${composeTextAlign(styles?.align?.[device])}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.wrap__button--unbranded__${uid} .shopify-payment-button {
|
|
40
|
+
${composeSize(composeGlobalSize.width[device], composeGlobalSize.height[device], device !== 'desktop')}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.wrap__button--unbranded__${uid} .shopify-payment-button .shopify-payment-button__button--unbranded {
|
|
44
|
+
width: 100%;
|
|
45
|
+
${device !== 'desktop' ? `
|
|
46
|
+
${composeLineHeight(styles?.typo?.custom?.lineHeight?.[device])}
|
|
47
|
+
${composeFontSize(styles?.typo?.custom?.fontSize?.[device])}
|
|
48
|
+
` : ''}
|
|
49
|
+
${composeSpacing(device, composeGlobalSize.padding)}
|
|
50
|
+
${composeSize(composeGlobalSize.width[device] ?? 'auto', composeGlobalSize.height[device] ?? 'auto', false)}
|
|
51
|
+
${composeShadowCss({
|
|
52
|
+
boxShadowValue: styles?.boxShadowBtnV2?.[device]?.normal,
|
|
53
|
+
hasBoxShadow: styles?.boxShadowBtnV2?.[device]?.normal?.type !== 'none'
|
|
54
|
+
})}
|
|
55
|
+
${composeCornerCss(styles?.roundedBtnV2?.[device]?.normal, true)}
|
|
56
|
+
${device === 'desktop' ? composeTypographyV2Css(styles?.typo, true) : ''}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.wrap__button--unbranded__${uid} .shopify-payment-button .shopify-payment-button__button--unbranded:hover {
|
|
60
|
+
${composeShadowCss({
|
|
61
|
+
boxShadowValue: styles?.boxShadowBtnV2?.[device]?.hover,
|
|
62
|
+
hasBoxShadow: styles?.boxShadowBtnV2?.[device]?.hover?.type !== 'none',
|
|
63
|
+
important: true
|
|
64
|
+
})}
|
|
65
|
+
${composeTextHoverColorCss(device, styles?.textColorHover, true)}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.wrap__button--unbranded__${uid} .shopify-payment-button .shopify-payment-button__button--unbranded::before {
|
|
69
|
+
${composeBorderCss(styles?.borderBtnV2?.[device]?.normal)}
|
|
70
|
+
${composeCornerCss(styles?.roundedBtnV2?.[device]?.normal)}
|
|
71
|
+
${composeBackgroundImageCss(styles?.backgroundImage, {
|
|
72
|
+
device,
|
|
73
|
+
state: 'normal'
|
|
74
|
+
})}
|
|
75
|
+
${composeBackgroundCss(styles?.backgroundColorV2?.[device]?.normal)}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.wrap__button--unbranded__${uid} .shopify-payment-button .shopify-payment-button__button--unbranded:hover::before {
|
|
79
|
+
${composeBorderCss(styles?.borderBtnV2?.[device]?.hover)}
|
|
80
|
+
${composeCornerCss(styles?.roundedBtnV2?.[device]?.hover)}
|
|
81
|
+
${composeBackgroundCss(styles?.backgroundColorV2?.[device]?.hover)}
|
|
82
|
+
}
|
|
83
|
+
`;
|
|
84
|
+
};
|
|
85
|
+
const getButtonStyles = ({ styles, uid })=>{
|
|
86
|
+
const composeGlobalSize = {
|
|
87
|
+
width: getWidthHeightGlobalSize('width', styles?.globalSize),
|
|
88
|
+
height: getWidthHeightGlobalSize('height', styles?.globalSize),
|
|
89
|
+
padding: getPaddingGlobalSize(styles?.globalSize)
|
|
90
|
+
};
|
|
91
|
+
const baseStyles = `
|
|
92
|
+
.wrap__button--unbranded__${uid} .shopify-payment-button {
|
|
93
|
+
display: inline-block;
|
|
94
|
+
min-height: unset !important;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.wrap__button--unbranded__${uid} .shopify-payment-button div {
|
|
98
|
+
width: 100%;
|
|
99
|
+
margin-top: 0px !important;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.wrap__button--unbranded__${uid} .shopify-payment-button .shopify-payment-button__more-options {
|
|
103
|
+
display: none;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.wrap__button--unbranded__${uid} .shopify-payment-button .shopify-payment-button__button--unbranded {
|
|
107
|
+
max-width: 100%;
|
|
108
|
+
min-width: unset;
|
|
109
|
+
min-height: unset !important;
|
|
110
|
+
background-color: unset !important;
|
|
111
|
+
position: relative;
|
|
112
|
+
border: none !important;
|
|
113
|
+
margin: 0;
|
|
114
|
+
z-index: 0;
|
|
115
|
+
border-radius: unset;
|
|
116
|
+
width: 100%;
|
|
117
|
+
display: inline-flex;
|
|
118
|
+
justify-content: center;
|
|
119
|
+
align-items: center;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.wrap__button--unbranded__${uid} .shopify-payment-button .shopify-payment-button__button--unbranded::before {
|
|
123
|
+
content: "";
|
|
124
|
+
height: 100%;
|
|
125
|
+
width: 100%;
|
|
126
|
+
position: absolute;
|
|
127
|
+
top: 0;
|
|
128
|
+
left: 0;
|
|
129
|
+
pointer-events: none;
|
|
130
|
+
z-index: -1;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.wrap__button--unbranded__${uid} .shopify-payment-button .shopify-payment-button__button--unbranded::after {
|
|
134
|
+
border-radius: 0;
|
|
135
|
+
box-shadow: none;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.wrap__button--unbranded__${uid} .shopify-payment-button .shopify-payment-button__button--unbranded::after:hover {
|
|
139
|
+
border-radius: 0;
|
|
140
|
+
box-shadow: none;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.wrap__button--unbranded__${uid} .shopify-payment-button > div {
|
|
144
|
+
max-width: 100%;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.wrap__button--unbranded__${uid} .shopify-payment-button > div > div {
|
|
148
|
+
max-width: 100%;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
${getDeviceStyles({
|
|
152
|
+
device: 'desktop',
|
|
153
|
+
uid,
|
|
154
|
+
styles,
|
|
155
|
+
composeGlobalSize
|
|
156
|
+
})}
|
|
157
|
+
|
|
158
|
+
@media only screen and (max-width: 1024px) and (min-width: 768px) {
|
|
159
|
+
${getDeviceStyles({
|
|
160
|
+
device: 'tablet',
|
|
161
|
+
uid,
|
|
162
|
+
styles,
|
|
163
|
+
composeGlobalSize
|
|
164
|
+
})}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@media only screen and (max-width: 767px) {
|
|
168
|
+
${getDeviceStyles({
|
|
169
|
+
device: 'mobile',
|
|
170
|
+
uid,
|
|
171
|
+
styles,
|
|
172
|
+
composeGlobalSize
|
|
173
|
+
})}
|
|
174
|
+
}
|
|
175
|
+
`;
|
|
176
|
+
return baseStyles;
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
export { getButtonStyles };
|