@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
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.278",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"relationship": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/get-control-relationship.js && node ./scripts/get-element-relationship.js"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@gem-sdk/core": "2.0.0-dev.
|
|
25
|
+
"@gem-sdk/core": "2.0.0-dev.276",
|
|
26
26
|
"@gem-sdk/styles": "2.0.0-dev.263",
|
|
27
27
|
"@gem-sdk/system": "2.0.0-dev.263",
|
|
28
28
|
"@types/react-transition-group": "^4.4.5"
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
|
|
7
|
-
const ButtonIcon = ({ iconSvg, shouldClearSpace, label, style })=>{
|
|
8
|
-
return /*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
9
|
-
className: `
|
|
10
|
-
gp-button-icon gp-transition-colors gp-duration-300 gp-z-1 gp-inline-flex gp-shrink-0 gp-items-center gp-justify-center group-data-[state=loading]:gp-invisible [&>svg]:!gp-h-[var(--height-desktop)] [&>svg]:!gp-w-auto tablet:[&>svg]:!gp-h-[var(--height-tablet)] mobile:[&>svg]:!gp-h-[var(--height-mobile)] ${shouldClearSpace && !label ? '!gp-m-0' : ''}`,
|
|
11
|
-
style: style,
|
|
12
|
-
dangerouslySetInnerHTML: {
|
|
13
|
-
__html: iconSvg
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
exports.default = ButtonIcon;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
require('react');
|
|
7
|
-
var core = require('@gem-sdk/core');
|
|
8
|
-
|
|
9
|
-
const ButtonLabel = ({ label, styles, options, nodePrice, appendTypoClass })=>{
|
|
10
|
-
const mode = core.useEditorMode();
|
|
11
|
-
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
12
|
-
"data-gp-text": true,
|
|
13
|
-
className: core.cls(`gp-relative gp-flex gp-h-full gp-items-center gp-overflow-hidden gp-break-words group-data-[state=loading]:gp-invisible [&_p]:gp-whitespace-pre-line`, styles?.typo?.attrs?.italic ? '[&:not(:has(p))]:gp-pr-[0.2em] [&_p]:[&:has(p)]:gp-pr-[0.2em]' : '', mode === 'edit' && !options?.isCannotEditing ? 'gp-text button-text' : '', !nodePrice ? appendTypoClass : {}),
|
|
14
|
-
style: {
|
|
15
|
-
...core.makeStyle({
|
|
16
|
-
tt: styles?.transform
|
|
17
|
-
})
|
|
18
|
-
},
|
|
19
|
-
dangerouslySetInnerHTML: {
|
|
20
|
-
__html: styles?.typo?.attrs?.transform === 'capitalize' ? label?.toString().toLocaleLowerCase() : label
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
exports.default = ButtonLabel;
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
-
|
|
6
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
var core = require('@gem-sdk/core');
|
|
8
|
-
var Head = require('next/head');
|
|
9
|
-
var Link = require('../../../link/components/Link.js');
|
|
10
|
-
var useButtonCustomCss = require('../../hooks/useButtonCustomCss.js');
|
|
11
|
-
var useButtonStyles = require('../../hooks/useButtonStyles.js');
|
|
12
|
-
var ButtonIcon = require('./ButtonIcon.js');
|
|
13
|
-
var ButtonLabel = require('./ButtonLabel.js');
|
|
14
|
-
var ButtonLoadingIndicator = require('./ButtonLoadingIndicator.js');
|
|
15
|
-
|
|
16
|
-
const Button = (buttonProps)=>{
|
|
17
|
-
const { className, onClick, builderProps, builderAttrs, setting = {}, styles, style, children, nodePrice } = buttonProps;
|
|
18
|
-
const { align, backgroundImage, textColor } = styles ?? {};
|
|
19
|
-
const { iconSvg, btnLink, htmlType, disabled, loading, iconAlign, iconVisible, options, shouldClearSpace } = setting;
|
|
20
|
-
const label = core.convertHTML(setting?.label);
|
|
21
|
-
const Wrap = btnLink?.link !== undefined && btnLink.link !== '' ? Link.default : 'button';
|
|
22
|
-
const props = btnLink?.link !== undefined && btnLink.link !== '' ? {
|
|
23
|
-
setting: {
|
|
24
|
-
href: btnLink?.link,
|
|
25
|
-
target: btnLink?.target,
|
|
26
|
-
noFollow: btnLink?.noFollow
|
|
27
|
-
}
|
|
28
|
-
} : {
|
|
29
|
-
type: htmlType
|
|
30
|
-
};
|
|
31
|
-
const mode = core.useEditorMode();
|
|
32
|
-
const customCss = useButtonCustomCss.useButtonCustomCss({
|
|
33
|
-
styles,
|
|
34
|
-
builderProps
|
|
35
|
-
});
|
|
36
|
-
const { getButtonStyles, getButtonIconStyles, appendTypoClass, appendTypoStyle, isTextOverflow } = useButtonStyles.useButtonStyles(buttonProps);
|
|
37
|
-
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
38
|
-
children: [
|
|
39
|
-
!!styles?.preloadBgImage && /*#__PURE__*/ jsxRuntime.jsxs(Head, {
|
|
40
|
-
children: [
|
|
41
|
-
!!backgroundImage?.desktop?.normal?.image?.src && /*#__PURE__*/ jsxRuntime.jsx("link", {
|
|
42
|
-
rel: "preload",
|
|
43
|
-
href: backgroundImage.desktop.normal.image.src,
|
|
44
|
-
as: "image"
|
|
45
|
-
}),
|
|
46
|
-
!!backgroundImage?.tablet?.normal?.image?.src && /*#__PURE__*/ jsxRuntime.jsx("link", {
|
|
47
|
-
rel: "preload",
|
|
48
|
-
href: backgroundImage?.tablet?.normal?.image?.src,
|
|
49
|
-
as: "image"
|
|
50
|
-
}),
|
|
51
|
-
!!backgroundImage?.mobile?.normal?.image?.src && /*#__PURE__*/ jsxRuntime.jsx("link", {
|
|
52
|
-
rel: "preload",
|
|
53
|
-
href: backgroundImage?.mobile?.normal?.image?.src,
|
|
54
|
-
as: "image"
|
|
55
|
-
}),
|
|
56
|
-
!!backgroundImage?.desktop?.hover?.image?.src && /*#__PURE__*/ jsxRuntime.jsx("link", {
|
|
57
|
-
rel: "preload",
|
|
58
|
-
href: backgroundImage.desktop.hover.image.src,
|
|
59
|
-
as: "image"
|
|
60
|
-
}),
|
|
61
|
-
!!backgroundImage?.tablet?.hover?.image?.src && /*#__PURE__*/ jsxRuntime.jsx("link", {
|
|
62
|
-
rel: "preload",
|
|
63
|
-
href: backgroundImage?.tablet?.hover?.image?.src,
|
|
64
|
-
as: "image"
|
|
65
|
-
}),
|
|
66
|
-
!!backgroundImage?.mobile?.hover?.image?.src && /*#__PURE__*/ jsxRuntime.jsx("link", {
|
|
67
|
-
rel: "preload",
|
|
68
|
-
href: backgroundImage?.mobile?.hover?.image?.src,
|
|
69
|
-
as: "image"
|
|
70
|
-
})
|
|
71
|
-
]
|
|
72
|
-
}),
|
|
73
|
-
/*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
74
|
-
...builderAttrs,
|
|
75
|
-
style: {
|
|
76
|
-
...style,
|
|
77
|
-
...core.makeStyleResponsive('ta', align)
|
|
78
|
-
},
|
|
79
|
-
children: [
|
|
80
|
-
/*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
81
|
-
children: customCss
|
|
82
|
-
}),
|
|
83
|
-
/*#__PURE__*/ jsxRuntime.jsxs(Wrap, {
|
|
84
|
-
...props,
|
|
85
|
-
"data-id": builderProps?.uid,
|
|
86
|
-
"aria-label": setting?.label,
|
|
87
|
-
onClick: (e)=>{
|
|
88
|
-
onClick?.(e);
|
|
89
|
-
if (btnLink?.link?.startsWith('#') && mode !== 'edit') {
|
|
90
|
-
core.globalEvent.dispatch('onOpenDialog', {
|
|
91
|
-
popupUId: btnLink.link
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
"data-state": loading ? 'loading' : 'idle',
|
|
96
|
-
className: core.cls(builderProps?.uid, 'gp-button-base gp-group gp-relative gp-inline-flex gp-max-w-full gp-items-center gp-justify-center gp-no-underline gp-transition-colors gp-duration-300 disabled:gp-btn-disabled disabled:gp-opacity-30', {
|
|
97
|
-
'gp-animate-bounce': styles?.animation?.normal === 'bounce',
|
|
98
|
-
'hover:gp-animate-bounce': styles?.animation?.hover === 'bounce',
|
|
99
|
-
'gp-scale-[1.1]': styles?.animation?.normal === 'grow',
|
|
100
|
-
'hover:gp-scale-[1.1]': styles?.animation?.hover === 'grow',
|
|
101
|
-
'gp-max-w-full': isTextOverflow,
|
|
102
|
-
'gp-text-center': !!btnLink?.link
|
|
103
|
-
}, className, core.getGlobalColorStateClass('text', textColor), !nodePrice ? appendTypoClass : {}),
|
|
104
|
-
style: getButtonStyles(),
|
|
105
|
-
disabled: disabled,
|
|
106
|
-
children: [
|
|
107
|
-
loading ? /*#__PURE__*/ jsxRuntime.jsx(ButtonLoadingIndicator.default, {}) : '',
|
|
108
|
-
/*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
109
|
-
className: core.cls({
|
|
110
|
-
'gp-flex-row-reverse': iconAlign === 'right'
|
|
111
|
-
}, 'gp-inline-flex'),
|
|
112
|
-
children: [
|
|
113
|
-
!!iconSvg && iconVisible && /*#__PURE__*/ jsxRuntime.jsx(ButtonIcon.default, {
|
|
114
|
-
iconSvg: iconSvg,
|
|
115
|
-
shouldClearSpace: shouldClearSpace,
|
|
116
|
-
label: label,
|
|
117
|
-
style: getButtonIconStyles()
|
|
118
|
-
}),
|
|
119
|
-
(!!label || !shouldClearSpace) && /*#__PURE__*/ jsxRuntime.jsx(ButtonLabel.default, {
|
|
120
|
-
label: label,
|
|
121
|
-
shouldClearSpace: shouldClearSpace,
|
|
122
|
-
appendTypoClass: appendTypoClass,
|
|
123
|
-
appendTypoStyle: appendTypoStyle,
|
|
124
|
-
styles: styles,
|
|
125
|
-
mode: mode,
|
|
126
|
-
options: options
|
|
127
|
-
})
|
|
128
|
-
]
|
|
129
|
-
}),
|
|
130
|
-
nodePrice && nodePrice
|
|
131
|
-
]
|
|
132
|
-
}),
|
|
133
|
-
children
|
|
134
|
-
]
|
|
135
|
-
})
|
|
136
|
-
]
|
|
137
|
-
});
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
exports.default = Button;
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var core = require('@gem-sdk/core');
|
|
6
|
-
var helpers = require('../../../helpers.js');
|
|
7
|
-
var useButtonCustomCss = require('../../hooks/useButtonCustomCss.js');
|
|
8
|
-
|
|
9
|
-
const Button = ({ className, builderProps, customAttrs, pageContext, setting = {}, styles = {}, style, wrapClassName = '', advanced, nodePrice, dataId, isForceValue = false })=>{
|
|
10
|
-
const { align, size, backgroundImage, backgroundColorV2, textColor, textColorHover, roundedBtnV2, iconSpacing, globalSize } = styles;
|
|
11
|
-
const { label, iconSvg, btnLink, htmlType, disabled, loading, iconAlign, iconVisible, translate, disabledLoading = true } = setting;
|
|
12
|
-
const [wrapStyle, restStyle] = core.splitStyle([
|
|
13
|
-
'pos',
|
|
14
|
-
'top',
|
|
15
|
-
'left',
|
|
16
|
-
'bottom',
|
|
17
|
-
'right',
|
|
18
|
-
'z'
|
|
19
|
-
], style);
|
|
20
|
-
const { Wrap, urlData, shouldRenderLink } = helpers.getInsertLinkData('button', btnLink, htmlType);
|
|
21
|
-
const spacingDefault = {
|
|
22
|
-
desktop: '8px'
|
|
23
|
-
};
|
|
24
|
-
const iconSpacingStyle = iconAlign === 'left' ? core.makeStyleResponsive('mr', iconSpacing || spacingDefault) : core.makeStyleResponsive('ml', iconSpacing || spacingDefault);
|
|
25
|
-
// fix disabled still display hover color
|
|
26
|
-
if (disabled) {
|
|
27
|
-
delete backgroundColorV2?.desktop?.hover;
|
|
28
|
-
delete backgroundColorV2?.tablet?.hover;
|
|
29
|
-
delete backgroundColorV2?.mobile?.hover;
|
|
30
|
-
delete backgroundColorV2?.desktop?.focus;
|
|
31
|
-
delete backgroundColorV2?.tablet?.focus;
|
|
32
|
-
delete backgroundColorV2?.mobile?.focus;
|
|
33
|
-
}
|
|
34
|
-
const composeGlobalSize = core.makeGlobalSize(globalSize);
|
|
35
|
-
const appendTypoClass = core.composeTypographyClassName(styles?.typo, styles?.typography);
|
|
36
|
-
const appendTypoStyle = {
|
|
37
|
-
...core.makeStyleResponsiveState('c', textColorHover),
|
|
38
|
-
...core.composeTypographyStyle(styles?.typo, styles?.typography),
|
|
39
|
-
...core.getStyleShadow({
|
|
40
|
-
value: styles?.typo?.custom?.textShadow,
|
|
41
|
-
styleAppliedFor: 'text-shadow',
|
|
42
|
-
isEnableShadow: styles?.typo?.custom?.textShadow?.type !== 'none'
|
|
43
|
-
})
|
|
44
|
-
};
|
|
45
|
-
const customCss = useButtonCustomCss.useButtonCustomCss({
|
|
46
|
-
styles,
|
|
47
|
-
builderProps
|
|
48
|
-
});
|
|
49
|
-
const labelValDisplay = isForceValue ? label : helpers.getDynamicSourceLocales({
|
|
50
|
-
val: label,
|
|
51
|
-
uid: builderProps?.uidTranslate ?? builderProps?.uid,
|
|
52
|
-
settingId: translate ?? 'label',
|
|
53
|
-
pageContext,
|
|
54
|
-
isCapitalize: styles?.typo?.attrs?.transform === 'capitalize',
|
|
55
|
-
translate
|
|
56
|
-
});
|
|
57
|
-
const isScrollToElement = ()=>{
|
|
58
|
-
return btnLink?.link?.startsWith('#') && btnLink?.target === '_self';
|
|
59
|
-
};
|
|
60
|
-
const WrapLink = isScrollToElement() ? 'button' : Wrap;
|
|
61
|
-
return core.template`
|
|
62
|
-
${core.RenderIf(!!styles?.preloadBgImage, `${core.RenderIf(!!backgroundImage?.desktop?.normal?.image?.src, `<link rel="preload" href="${backgroundImage?.desktop?.normal?.image?.src}" as="image" />`)}${core.RenderIf(!!backgroundImage?.desktop?.hover?.image?.src, `<link rel="preload" href="${backgroundImage?.desktop?.hover?.image?.src}" as="image" />`)}${core.RenderIf(!!backgroundImage?.tablet?.normal?.image?.src, `<link rel="preload" href="${backgroundImage?.tablet?.normal?.image?.src}" as="image" />`)}${core.RenderIf(!!backgroundImage?.tablet?.hover?.image?.src, `<link rel="preload" href="${backgroundImage?.tablet?.hover?.image?.src}" as="image" />`)}${core.RenderIf(!!backgroundImage?.mobile?.normal?.image?.src, `<link rel="preload" href="${backgroundImage?.mobile?.normal?.image?.src}" as="image" />`)}${core.RenderIf(!!backgroundImage?.mobile?.hover?.image?.src, `<link rel="preload" href="${backgroundImage?.mobile?.hover?.image?.src}" as="image" />`)}`)}
|
|
63
|
-
<gp-button
|
|
64
|
-
gp-data='${core.dataStringify({
|
|
65
|
-
btnLink: setting?.btnLink
|
|
66
|
-
})}'
|
|
67
|
-
style="${{
|
|
68
|
-
...wrapStyle
|
|
69
|
-
}}"
|
|
70
|
-
>
|
|
71
|
-
<div
|
|
72
|
-
style="${{
|
|
73
|
-
...restStyle,
|
|
74
|
-
...core.makeStyleResponsive('ta', align)
|
|
75
|
-
}}"
|
|
76
|
-
class="${core.cls(wrapClassName, className?.includes('gp-button-atc') ? '' : advanced?.cssClass)}"
|
|
77
|
-
>
|
|
78
|
-
<style>${customCss}</style>
|
|
79
|
-
${core.RenderIf(isScrollToElement(), `<a class="gp-trigger-button-link gp-hidden" href=${urlData.href} target=${urlData.target} ></a>`)}
|
|
80
|
-
<${WrapLink}
|
|
81
|
-
${{
|
|
82
|
-
...urlData,
|
|
83
|
-
'data-id': builderProps?.uidInteraction ?? (dataId || builderProps?.uid),
|
|
84
|
-
'aria-label': setting?.label?.toString().replaceAll("'", ''').replaceAll('"', "'"),
|
|
85
|
-
...disabled && typeof disabled === 'boolean' || disabled ? {
|
|
86
|
-
disabled: 'disabled'
|
|
87
|
-
} : {}
|
|
88
|
-
}}
|
|
89
|
-
${{
|
|
90
|
-
...customAttrs
|
|
91
|
-
}}
|
|
92
|
-
data-state="${loading ? 'loading' : 'idle'}"
|
|
93
|
-
class="${core.cls(builderProps?.uid, 'gp-button-base gp-rounded-none gp-max-w-full gp-relative gp-group gp-inline-flex gp-items-center gp-justify-center gp-no-underline gp-transition-colors gp-duration-300 disabled:gp-btn-disabled disabled:gp-opacity-30 disabled:gp-pointer-events-none', core.getGlobalColorStateClass('text', textColor), {
|
|
94
|
-
'gp-animate-bounce': styles?.animation?.normal === 'bounce',
|
|
95
|
-
'hover:gp-animate-bounce': styles?.animation?.hover === 'bounce',
|
|
96
|
-
'gp-scale-[1.1]': styles?.animation?.normal === 'grow',
|
|
97
|
-
'hover:gp-scale-[1.1]': styles?.animation?.hover === 'grow',
|
|
98
|
-
'gp-text-center': shouldRenderLink
|
|
99
|
-
}, className, className?.includes('gp-button-atc') && advanced ? advanced?.cssClass : '', !nodePrice ? appendTypoClass : {})}"
|
|
100
|
-
style="${{
|
|
101
|
-
...core.getStyleBackgroundImageByDevice(backgroundImage),
|
|
102
|
-
...core.getGlobalColorStateResponsiveStyle('bg', backgroundColorV2),
|
|
103
|
-
...core.composeRadius(roundedBtnV2),
|
|
104
|
-
...core.getStyleShadowState(styles?.boxShadowBtnV2?.desktop, 'box-shadow', {
|
|
105
|
-
normal: styles?.boxShadowBtnV2?.desktop?.normal?.type !== 'none',
|
|
106
|
-
hover: styles?.boxShadowBtnV2?.desktop?.hover?.type !== 'none'
|
|
107
|
-
}),
|
|
108
|
-
...core.getStyleShadowState(styles?.boxShadowBtnV2?.tablet, 'box-shadow', {
|
|
109
|
-
normal: styles?.boxShadowBtnV2?.tablet?.normal?.type !== 'none',
|
|
110
|
-
hover: styles?.boxShadowBtnV2?.tablet?.hover?.type !== 'none'
|
|
111
|
-
}, 'tablet'),
|
|
112
|
-
...core.getStyleShadowState(styles?.boxShadowBtnV2?.mobile, 'box-shadow', {
|
|
113
|
-
normal: styles?.boxShadowBtnV2?.mobile?.normal?.type !== 'none',
|
|
114
|
-
hover: styles?.boxShadowBtnV2?.mobile?.hover?.type !== 'none'
|
|
115
|
-
}, 'mobile'),
|
|
116
|
-
...!styles?.btnSpacing?.type ? core.composeSize(styles?.btnSpacing?.custom) : {},
|
|
117
|
-
...composeGlobalSize.width,
|
|
118
|
-
...composeGlobalSize.height,
|
|
119
|
-
...composeGlobalSize.padding,
|
|
120
|
-
...core.getGlobalColorStateStyle('c', textColor),
|
|
121
|
-
'--size': appendTypoStyle['--size'],
|
|
122
|
-
'--size-tablet': appendTypoStyle['--size-tablet'],
|
|
123
|
-
'--size-mobile': appendTypoStyle['--size-mobile'],
|
|
124
|
-
...!nodePrice ? appendTypoStyle : {}
|
|
125
|
-
}}"
|
|
126
|
-
>
|
|
127
|
-
${!disabledLoading ? ` <svg
|
|
128
|
-
class="gp-invisible gp-absolute gp-h-5 gp-w-5 group-data-[state=loading]:gp-animate-spin group-data-[state=loading]:gp-visible"
|
|
129
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
130
|
-
fill="none"
|
|
131
|
-
viewBox="0 0 24 24"
|
|
132
|
-
>
|
|
133
|
-
<circle
|
|
134
|
-
class="gp-opacity-25"
|
|
135
|
-
cx="12"
|
|
136
|
-
cy="12"
|
|
137
|
-
r="10"
|
|
138
|
-
stroke="currentColor"
|
|
139
|
-
stroke-width="4"
|
|
140
|
-
></circle>
|
|
141
|
-
<path
|
|
142
|
-
class="gp-opacity-75"
|
|
143
|
-
fill="currentColor"
|
|
144
|
-
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
145
|
-
></path>
|
|
146
|
-
</svg>` : ''}
|
|
147
|
-
<div
|
|
148
|
-
class="${core.cls('gp-inline-flex', {
|
|
149
|
-
'gp-flex-row-reverse': iconAlign === 'right'
|
|
150
|
-
})}">
|
|
151
|
-
${core.RenderIf(!!iconSvg && iconVisible, core.template`<span
|
|
152
|
-
class="${`gp-inline-flex gp-button-icon gp-transition-colors gp-duration-300 gp-shrink-0 gp-items-center gp-justify-center group-data-[state=loading]:gp-invisible gp-z-1 [&>svg]:!gp-h-[var(--height-desktop)] [&>svg]:!gp-w-auto tablet:[&>svg]:!gp-h-[var(--height-tablet)] mobile:[&>svg]:!gp-h-[var(--height-mobile)]`}"
|
|
153
|
-
style="${{
|
|
154
|
-
...label ? iconSpacingStyle : {},
|
|
155
|
-
'--height-desktop': `${size?.desktop}`,
|
|
156
|
-
'--height-tablet': `${size?.desktop ?? size?.tablet}`,
|
|
157
|
-
'--height-mobile': `${size?.mobile ?? size?.tablet ?? size?.desktop}`
|
|
158
|
-
}}"
|
|
159
|
-
>${iconSvg}</span>`)}
|
|
160
|
-
<span
|
|
161
|
-
data-gp-text
|
|
162
|
-
class="${`gp-content-product-button gp-button-text-only gp-break-words group-data-[state=loading]:gp-invisible [&_p]:gp-whitespace-pre-line gp-z-1 gp-h-full gp-flex gp-items-center gp-overflow-hidden ${appendTypoClass}
|
|
163
|
-
${styles?.typo?.attrs?.italic ? '[&:not(:has(p))]:gp-pr-[0.2em] [&_p]:[&:has(p)]:gp-pr-[0.2em]' : ''}`}"
|
|
164
|
-
style="${{
|
|
165
|
-
'--size': appendTypoStyle['--size'],
|
|
166
|
-
'--size-tablet': appendTypoStyle['--size-tablet'],
|
|
167
|
-
'--size-mobile': appendTypoStyle['--size-mobile']
|
|
168
|
-
}}"
|
|
169
|
-
>
|
|
170
|
-
${labelValDisplay}
|
|
171
|
-
</span>
|
|
172
|
-
</div>
|
|
173
|
-
${nodePrice ? nodePrice : ''}
|
|
174
|
-
</${WrapLink}>
|
|
175
|
-
</div>
|
|
176
|
-
${core.RenderIf(core.isLocalEnv, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-button.js' | asset_url }}" defer="defer"></script>`, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="${core.baseAssetURL}/assets-v2/gp-button.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
177
|
-
</gp-button>
|
|
178
|
-
`;
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
exports.default = Button;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var core = require('@gem-sdk/core');
|
|
4
|
-
|
|
5
|
-
const MEDIA_QUERIES = {
|
|
6
|
-
TABLET: '@media only screen and (max-width: 1024px) and (min-width: 768px)',
|
|
7
|
-
MOBILE: '@media only screen and (max-width: 767px)'
|
|
8
|
-
};
|
|
9
|
-
const generateBorderCornerStyles = ({ uid, device, borderBtn, roundedBtn })=>{
|
|
10
|
-
const normalStyles = `
|
|
11
|
-
.${uid}.gp-button-base::before {
|
|
12
|
-
content: "";
|
|
13
|
-
height: 100%;
|
|
14
|
-
width: 100%;
|
|
15
|
-
position: absolute;
|
|
16
|
-
pointer-events: none;
|
|
17
|
-
${core.composeBorderCss(borderBtn?.[device]?.normal)}
|
|
18
|
-
${core.composeCornerCss(roundedBtn?.[device]?.normal)}
|
|
19
|
-
}
|
|
20
|
-
`;
|
|
21
|
-
const hoverStyles = `
|
|
22
|
-
.${uid}:hover::before {
|
|
23
|
-
${core.composeBorderCss(borderBtn?.[device]?.hover)}
|
|
24
|
-
${core.composeCornerCss(roundedBtn?.[device]?.hover)}
|
|
25
|
-
}
|
|
26
|
-
`;
|
|
27
|
-
return {
|
|
28
|
-
normalStyles,
|
|
29
|
-
hoverStyles
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
const generateColorStyles = (uid, textColor)=>`
|
|
33
|
-
.${uid}:hover .gp-button-price,
|
|
34
|
-
.${uid}:hover .gp-product-dot-price {
|
|
35
|
-
color: ${core.getSingleColorVariable(textColor?.hover)};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.${uid} .gp-button-price,
|
|
39
|
-
.${uid} .gp-product-dot-price {
|
|
40
|
-
color: ${core.getSingleColorVariable(textColor?.normal)};
|
|
41
|
-
}
|
|
42
|
-
`;
|
|
43
|
-
const useButtonCustomCss = ({ styles, builderProps })=>{
|
|
44
|
-
if (!builderProps?.uid) return '';
|
|
45
|
-
const { borderBtnV2, roundedBtnV2, textColor } = styles ?? {};
|
|
46
|
-
const uid = builderProps.uid;
|
|
47
|
-
const borderCornerStyles = {
|
|
48
|
-
desktop: generateBorderCornerStyles({
|
|
49
|
-
uid,
|
|
50
|
-
device: 'desktop',
|
|
51
|
-
borderBtn: borderBtnV2,
|
|
52
|
-
roundedBtn: roundedBtnV2
|
|
53
|
-
}),
|
|
54
|
-
tablet: generateBorderCornerStyles({
|
|
55
|
-
uid,
|
|
56
|
-
device: 'tablet',
|
|
57
|
-
borderBtn: borderBtnV2,
|
|
58
|
-
roundedBtn: roundedBtnV2
|
|
59
|
-
}),
|
|
60
|
-
mobile: generateBorderCornerStyles({
|
|
61
|
-
uid,
|
|
62
|
-
device: 'mobile',
|
|
63
|
-
borderBtn: borderBtnV2,
|
|
64
|
-
roundedBtn: roundedBtnV2
|
|
65
|
-
})
|
|
66
|
-
};
|
|
67
|
-
const colorStyles = generateColorStyles(uid, textColor);
|
|
68
|
-
return `
|
|
69
|
-
${borderCornerStyles.desktop.normalStyles}
|
|
70
|
-
${borderCornerStyles.desktop.hoverStyles}
|
|
71
|
-
|
|
72
|
-
${MEDIA_QUERIES.TABLET} {
|
|
73
|
-
${borderCornerStyles.tablet.normalStyles}
|
|
74
|
-
${borderCornerStyles.tablet.hoverStyles}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
${MEDIA_QUERIES.MOBILE} {
|
|
78
|
-
${borderCornerStyles.mobile.normalStyles}
|
|
79
|
-
${borderCornerStyles.mobile.hoverStyles}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
${colorStyles}
|
|
83
|
-
`.trim();
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
exports.generateBorderCornerStyles = generateBorderCornerStyles;
|
|
87
|
-
exports.generateColorStyles = generateColorStyles;
|
|
88
|
-
exports.useButtonCustomCss = useButtonCustomCss;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var core = require('@gem-sdk/core');
|
|
4
|
-
var React = require('react');
|
|
5
|
-
|
|
6
|
-
const useButtonStyles = (props)=>{
|
|
7
|
-
const { styles, nodePrice, setting = {} } = props;
|
|
8
|
-
const { size, backgroundImage, backgroundColorV2, textColor, roundedBtnV2, iconSpacing, globalSize, textColorHover } = styles ?? {};
|
|
9
|
-
const { iconAlign, disabled } = setting;
|
|
10
|
-
const isTextOverflow = styles?.textOverFlow || false;
|
|
11
|
-
const composeGlobalSize = core.makeGlobalSize(globalSize);
|
|
12
|
-
const appendTypoClass = core.composeTypographyClassName(styles?.typo, styles?.typography);
|
|
13
|
-
const appendTypoStyle = {
|
|
14
|
-
...core.makeStyleResponsiveState('c', textColorHover),
|
|
15
|
-
...core.composeTypographyStyle(styles?.typo, styles?.typography)
|
|
16
|
-
};
|
|
17
|
-
if (disabled) {
|
|
18
|
-
delete backgroundColorV2?.desktop?.hover;
|
|
19
|
-
delete backgroundColorV2?.tablet?.hover;
|
|
20
|
-
delete backgroundColorV2?.mobile?.hover;
|
|
21
|
-
delete backgroundColorV2?.desktop?.focus;
|
|
22
|
-
delete backgroundColorV2?.tablet?.focus;
|
|
23
|
-
delete backgroundColorV2?.mobile?.focus;
|
|
24
|
-
}
|
|
25
|
-
const iconSpacingStyle = React.useMemo(()=>{
|
|
26
|
-
const spacing = iconSpacing || {
|
|
27
|
-
desktop: '8px'
|
|
28
|
-
};
|
|
29
|
-
return iconAlign === 'left' ? core.makeStyleResponsive('mr', spacing) : core.makeStyleResponsive('ml', spacing);
|
|
30
|
-
}, [
|
|
31
|
-
iconAlign,
|
|
32
|
-
iconSpacing
|
|
33
|
-
]);
|
|
34
|
-
const isEnableShadowStateForDevice = (deviceStyles)=>({
|
|
35
|
-
normal: deviceStyles?.normal?.type !== 'none',
|
|
36
|
-
hover: deviceStyles?.hover?.type !== 'none'
|
|
37
|
-
});
|
|
38
|
-
const getShadowStyles = ()=>{
|
|
39
|
-
const { boxShadowBtnV2 } = styles || {};
|
|
40
|
-
return {
|
|
41
|
-
// Desktop shadows
|
|
42
|
-
...core.getStyleShadowState(boxShadowBtnV2?.desktop, 'box-shadow', isEnableShadowStateForDevice(boxShadowBtnV2?.desktop)),
|
|
43
|
-
// Tablet shadows
|
|
44
|
-
...core.getStyleShadowState(boxShadowBtnV2?.tablet, 'box-shadow', isEnableShadowStateForDevice(boxShadowBtnV2?.tablet), 'tablet'),
|
|
45
|
-
// Mobile shadows
|
|
46
|
-
...core.getStyleShadowState(boxShadowBtnV2?.mobile, 'box-shadow', isEnableShadowStateForDevice(boxShadowBtnV2?.mobile), 'mobile')
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
const getGlobalSize = ()=>({
|
|
50
|
-
...composeGlobalSize.width,
|
|
51
|
-
...composeGlobalSize.height,
|
|
52
|
-
...composeGlobalSize.padding
|
|
53
|
-
});
|
|
54
|
-
const getTypoStyles = ()=>({
|
|
55
|
-
'--size': appendTypoStyle['--size'],
|
|
56
|
-
'--size-tablet': appendTypoStyle['--size-tablet'],
|
|
57
|
-
'--size-mobile': appendTypoStyle['--size-mobile'],
|
|
58
|
-
...!nodePrice && appendTypoStyle,
|
|
59
|
-
...core.getStyleShadow({
|
|
60
|
-
value: styles?.typo?.custom?.textShadow,
|
|
61
|
-
styleAppliedFor: 'text-shadow',
|
|
62
|
-
isEnableShadow: styles?.typo?.custom?.textShadow?.type !== 'none'
|
|
63
|
-
})
|
|
64
|
-
});
|
|
65
|
-
const getBackgroundStyles = ()=>({
|
|
66
|
-
...core.getStyleBackgroundImageByDevice(backgroundImage),
|
|
67
|
-
...core.getGlobalColorStateResponsiveStyle('bg', backgroundColorV2)
|
|
68
|
-
});
|
|
69
|
-
const getRadiusStyles = ()=>core.composeRadius(roundedBtnV2);
|
|
70
|
-
const getButtonStyles = ()=>({
|
|
71
|
-
...getBackgroundStyles(),
|
|
72
|
-
...getRadiusStyles(),
|
|
73
|
-
...getShadowStyles(),
|
|
74
|
-
...getGlobalSize(),
|
|
75
|
-
...core.getGlobalColorStateStyle('c', textColor),
|
|
76
|
-
...getTypoStyles()
|
|
77
|
-
});
|
|
78
|
-
const getButtonIconStyles = ()=>({
|
|
79
|
-
...iconSpacingStyle,
|
|
80
|
-
'--height-desktop': `${size?.desktop}`,
|
|
81
|
-
'--height-tablet': `${size?.desktop || size?.tablet}`,
|
|
82
|
-
'--height-mobile': `${size?.mobile || size?.tablet || size?.desktop}`
|
|
83
|
-
});
|
|
84
|
-
return {
|
|
85
|
-
getButtonStyles,
|
|
86
|
-
getButtonIconStyles,
|
|
87
|
-
appendTypoClass,
|
|
88
|
-
appendTypoStyle,
|
|
89
|
-
isTextOverflow
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
exports.useButtonStyles = useButtonStyles;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
const ButtonIcon = ({ iconSvg, shouldClearSpace, label, style })=>{
|
|
4
|
-
return /*#__PURE__*/ jsx("span", {
|
|
5
|
-
className: `
|
|
6
|
-
gp-button-icon gp-transition-colors gp-duration-300 gp-z-1 gp-inline-flex gp-shrink-0 gp-items-center gp-justify-center group-data-[state=loading]:gp-invisible [&>svg]:!gp-h-[var(--height-desktop)] [&>svg]:!gp-w-auto tablet:[&>svg]:!gp-h-[var(--height-tablet)] mobile:[&>svg]:!gp-h-[var(--height-mobile)] ${shouldClearSpace && !label ? '!gp-m-0' : ''}`,
|
|
7
|
-
style: style,
|
|
8
|
-
dangerouslySetInnerHTML: {
|
|
9
|
-
__html: iconSvg
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export { ButtonIcon as default };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import 'react';
|
|
3
|
-
import { useEditorMode, cls, makeStyle } from '@gem-sdk/core';
|
|
4
|
-
|
|
5
|
-
const ButtonLabel = ({ label, styles, options, nodePrice, appendTypoClass })=>{
|
|
6
|
-
const mode = useEditorMode();
|
|
7
|
-
return /*#__PURE__*/ jsx("div", {
|
|
8
|
-
"data-gp-text": true,
|
|
9
|
-
className: cls(`gp-relative gp-flex gp-h-full gp-items-center gp-overflow-hidden gp-break-words group-data-[state=loading]:gp-invisible [&_p]:gp-whitespace-pre-line`, styles?.typo?.attrs?.italic ? '[&:not(:has(p))]:gp-pr-[0.2em] [&_p]:[&:has(p)]:gp-pr-[0.2em]' : '', mode === 'edit' && !options?.isCannotEditing ? 'gp-text button-text' : '', !nodePrice ? appendTypoClass : {}),
|
|
10
|
-
style: {
|
|
11
|
-
...makeStyle({
|
|
12
|
-
tt: styles?.transform
|
|
13
|
-
})
|
|
14
|
-
},
|
|
15
|
-
dangerouslySetInnerHTML: {
|
|
16
|
-
__html: styles?.typo?.attrs?.transform === 'capitalize' ? label?.toString().toLocaleLowerCase() : label
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export { ButtonLabel as default };
|