@gem-sdk/components 2.0.0-dev.294 → 2.0.0-dev.303
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/accordion/components/common/index.js +2 -2
- package/dist/cjs/article/components/ArticleAuthor.js +1 -1
- package/dist/cjs/article/components/ArticleTitle.js +3 -1
- package/dist/cjs/article/components/ArticleTitle.liquid.js +5 -2
- package/dist/cjs/article/setting/ArticleList.js +0 -30
- package/dist/cjs/article/setting/configs/ArticleAuthor/presets.js +0 -9
- package/dist/cjs/article/setting/configs/ArticleAuthor/settings.js +9 -5
- package/dist/cjs/article/setting/configs/ArticleAuthor/uiV2.js +16 -0
- package/dist/cjs/article/setting/configs/ArticleCategory/presets.js +0 -9
- package/dist/cjs/article/setting/configs/ArticleCategory/settings.js +9 -5
- package/dist/cjs/article/setting/configs/ArticleDate/presets.js +0 -9
- package/dist/cjs/article/setting/configs/ArticleDate/settings.js +9 -5
- package/dist/cjs/article/setting/configs/ArticleImage/settings.js +22 -1
- package/dist/cjs/article/setting/configs/ArticleTitle/settings.js +36 -7
- package/dist/cjs/article/setting/configs/ArticleTitle/uiV2.js +47 -2
- package/dist/cjs/builder.js +6 -2
- package/dist/cjs/button/components/Button.js +1 -1
- package/dist/cjs/button/components/Button.liquid.js +1 -1
- package/dist/cjs/button/components/ButtonIcon.liquid.js +3 -1
- package/dist/cjs/button/components/ButtonLabel.liquid.js +3 -1
- package/dist/cjs/button/components/common/attributes.js +2 -2
- package/dist/cjs/button/components/common/classes.js +2 -1
- package/dist/cjs/button/components/common/styles.js +9 -11
- package/dist/cjs/button/setting/configs/settings.js +7 -8
- package/dist/cjs/button/setting/configs/uiV2.js +4 -50
- package/dist/cjs/dialog/components/Dialog.js +109 -394
- package/dist/cjs/dialog/components/Dialog.liquid.js +129 -153
- package/dist/cjs/dialog/components/common/common.js +130 -0
- package/dist/cjs/dialog/components/common/getAttr.js +27 -0
- package/dist/cjs/dialog/components/common/getClasses.js +88 -0
- package/dist/cjs/dialog/components/common/getStyle.js +107 -0
- package/dist/cjs/dialog/components/hooks/useDialog.js +233 -0
- package/dist/cjs/dialog/setting/configs/settings.js +1 -1
- package/dist/cjs/dialog/setting/configs/uiV2.js +35 -25
- package/dist/cjs/form/components/form-checkbox/FormCheckbox.js +0 -4
- package/dist/cjs/form/components/textinput/TextInput.js +58 -0
- package/dist/cjs/form/components/textinput/TextInput.liquid.js +60 -0
- package/dist/cjs/form/components/textinput/common/composeClasses.js +33 -0
- package/dist/cjs/form/components/textinput/common/composeStyles.js +70 -0
- package/dist/cjs/form/next.js +5 -1
- package/dist/cjs/form/setting/index.js +3 -1
- package/dist/cjs/form/setting/newsletter/configs/settings.js +4 -2
- package/dist/cjs/form/setting/newsletter/configs/uiV2.js +2 -0
- package/dist/cjs/form/setting/text-input/TextInput.js +53 -0
- package/dist/cjs/form/setting/text-input/configs/settings.js +307 -0
- package/dist/cjs/form/setting/text-input/configs/uiV1.js +106 -0
- package/dist/cjs/form/setting/text-input/configs/uiV2.js +303 -0
- package/dist/cjs/grid/row/setting/configs/settings.js +6 -3
- package/dist/cjs/helpers.js +8 -0
- package/dist/cjs/icon-list/common/attrs.js +10 -0
- package/dist/cjs/icon-list/common/classes.js +9 -0
- package/dist/cjs/icon-list/common/styles.js +29 -0
- package/dist/cjs/icon-list/components/IconList.js +19 -30
- package/dist/cjs/icon-list/components/IconList.liquid.js +21 -24
- package/dist/cjs/icon-list/components/IconListItem.js +13 -7
- package/dist/cjs/icon-list/components/IconListItem.liquid.js +13 -7
- package/dist/cjs/icon-list-hoz/components/IconListHoz.js +37 -25
- package/dist/cjs/icon-list-hoz/components/IconListHoz.liquid.js +31 -25
- package/dist/cjs/icon-list-hoz/components/IconListHozItem.js +12 -6
- package/dist/cjs/icon-list-hoz/components/IconListIHozItem.liquid.js +26 -0
- package/dist/cjs/icon-list-hoz/components/common/getAttr.js +9 -0
- package/dist/cjs/icon-list-hoz/components/common/getClasses.js +24 -0
- package/dist/cjs/icon-list-hoz/components/common/getStyle.js +30 -0
- package/dist/cjs/index.js +6 -1
- package/dist/cjs/index.liquid.js +7 -3
- package/dist/cjs/line/common/classes.js +66 -0
- package/dist/cjs/line/common/index.js +16 -0
- package/dist/cjs/line/common/styles.js +120 -0
- package/dist/cjs/line/components/Divider.js +26 -0
- package/dist/cjs/line/components/Divider.liquid.js +22 -0
- package/dist/cjs/line/components/Line.js +98 -0
- package/dist/cjs/line/components/Line.liquid.js +86 -0
- package/dist/cjs/line/next.js +1 -1
- package/dist/cjs/post-purchase/line/setting/configs/uiV2.js +1 -1
- package/dist/cjs/post-purchase/link/setting/configs/settings.js +2 -1
- package/dist/cjs/post-purchase/link/setting/configs/uiV2.js +1 -1
- package/dist/cjs/post-purchase/product/settings/product-variants/configs/uiV2.js +1 -1
- package/dist/cjs/product/components/FileUpload/components/config/setting.js +24 -26
- package/dist/cjs/product/components/FileUpload/components/config/uiV2.js +12 -179
- package/dist/cjs/product/components/ProductList.js +1 -1
- package/dist/cjs/product/components/ProductVariants/index.js +2 -2
- package/dist/cjs/product/components/ProductVariants/index.liquid.js +2 -2
- package/dist/cjs/product/components/ProductVariants/variants/Dropdown.js +8 -3
- package/dist/cjs/product/components/ProductVariants/variants/Dropdown.liquid.js +7 -2
- package/dist/cjs/product/setting/ProductVariants.js +8 -1374
- package/dist/cjs/product/setting/product-list/configs/uiV2.js +0 -3
- package/dist/cjs/product/setting/product-variant/configs/presets.js +168 -0
- package/dist/cjs/product/setting/product-variant/configs/settings.js +732 -0
- package/dist/cjs/product/setting/product-variant/configs/uiV1.js +509 -0
- package/dist/cjs/product/setting/product-variant/configs/uiV2.js +347 -0
- package/dist/cjs/third-party/components/EcoboostifyShoppableReelUgc.js +33 -0
- package/dist/cjs/third-party/components/EcoboostifyShoppableReelUgc.liquid.js +12 -0
- package/dist/cjs/third-party/configs/EcoboostifyShoppableReelUgc.js +12 -0
- package/dist/cjs/third-party/next.js +5 -0
- package/dist/cjs/third-party/setting/EcoboostifyShoppableReelUgc.js +142 -0
- package/dist/cjs/third-party/setting/index.js +3 -1
- package/dist/esm/accordion/components/common/index.js +2 -2
- package/dist/esm/article/components/ArticleAuthor.js +1 -1
- package/dist/esm/article/components/ArticleTitle.js +3 -1
- package/dist/esm/article/components/ArticleTitle.liquid.js +5 -2
- package/dist/esm/article/setting/ArticleList.js +0 -30
- package/dist/esm/article/setting/configs/ArticleAuthor/presets.js +0 -9
- package/dist/esm/article/setting/configs/ArticleAuthor/settings.js +9 -5
- package/dist/esm/article/setting/configs/ArticleAuthor/uiV2.js +16 -0
- package/dist/esm/article/setting/configs/ArticleCategory/presets.js +0 -9
- package/dist/esm/article/setting/configs/ArticleCategory/settings.js +9 -5
- package/dist/esm/article/setting/configs/ArticleDate/presets.js +0 -9
- package/dist/esm/article/setting/configs/ArticleDate/settings.js +9 -5
- package/dist/esm/article/setting/configs/ArticleImage/settings.js +22 -1
- package/dist/esm/article/setting/configs/ArticleTitle/settings.js +36 -7
- package/dist/esm/article/setting/configs/ArticleTitle/uiV2.js +47 -2
- package/dist/esm/builder.js +6 -2
- package/dist/esm/button/components/Button.js +1 -1
- package/dist/esm/button/components/Button.liquid.js +1 -1
- package/dist/esm/button/components/ButtonIcon.liquid.js +3 -1
- package/dist/esm/button/components/ButtonLabel.liquid.js +3 -1
- package/dist/esm/button/components/common/attributes.js +2 -2
- package/dist/esm/button/components/common/classes.js +3 -2
- package/dist/esm/button/components/common/styles.js +10 -12
- package/dist/esm/button/setting/configs/settings.js +7 -8
- package/dist/esm/button/setting/configs/uiV2.js +4 -50
- package/dist/esm/dialog/components/Dialog.js +110 -395
- package/dist/esm/dialog/components/Dialog.liquid.js +130 -154
- package/dist/esm/dialog/components/common/common.js +117 -0
- package/dist/esm/dialog/components/common/getAttr.js +22 -0
- package/dist/esm/dialog/components/common/getClasses.js +79 -0
- package/dist/esm/dialog/components/common/getStyle.js +98 -0
- package/dist/esm/dialog/components/hooks/useDialog.js +231 -0
- package/dist/esm/dialog/setting/configs/settings.js +1 -1
- package/dist/esm/dialog/setting/configs/uiV2.js +35 -25
- package/dist/esm/form/components/form-checkbox/FormCheckbox.js +0 -4
- package/dist/esm/form/components/textinput/TextInput.js +54 -0
- package/dist/esm/form/components/textinput/TextInput.liquid.js +56 -0
- package/dist/esm/form/components/textinput/common/composeClasses.js +29 -0
- package/dist/esm/form/components/textinput/common/composeStyles.js +67 -0
- package/dist/esm/form/next.js +5 -1
- package/dist/esm/form/setting/index.js +3 -1
- package/dist/esm/form/setting/newsletter/configs/settings.js +4 -2
- package/dist/esm/form/setting/newsletter/configs/uiV2.js +2 -0
- package/dist/esm/form/setting/text-input/TextInput.js +49 -0
- package/dist/esm/form/setting/text-input/configs/settings.js +305 -0
- package/dist/esm/form/setting/text-input/configs/uiV1.js +104 -0
- package/dist/esm/form/setting/text-input/configs/uiV2.js +301 -0
- package/dist/esm/grid/row/setting/configs/settings.js +6 -3
- package/dist/esm/helpers.js +8 -1
- package/dist/esm/icon-list/common/attrs.js +8 -0
- package/dist/esm/icon-list/common/classes.js +6 -0
- package/dist/esm/icon-list/common/styles.js +25 -0
- package/dist/esm/icon-list/components/IconList.js +21 -32
- package/dist/esm/icon-list/components/IconList.liquid.js +21 -24
- package/dist/esm/icon-list/components/IconListItem.js +13 -7
- package/dist/esm/icon-list/components/IconListItem.liquid.js +14 -8
- package/dist/esm/icon-list-hoz/components/IconListHoz.js +38 -26
- package/dist/esm/icon-list-hoz/components/IconListHoz.liquid.js +32 -26
- package/dist/esm/icon-list-hoz/components/IconListHozItem.js +12 -6
- package/dist/esm/icon-list-hoz/components/IconListIHozItem.liquid.js +22 -0
- package/dist/esm/icon-list-hoz/components/common/getAttr.js +7 -0
- package/dist/esm/icon-list-hoz/components/common/getClasses.js +21 -0
- package/dist/esm/icon-list-hoz/components/common/getStyle.js +27 -0
- package/dist/esm/index.js +4 -2
- package/dist/esm/index.liquid.js +4 -2
- package/dist/esm/line/common/classes.js +59 -0
- package/dist/esm/line/common/index.js +14 -0
- package/dist/esm/line/common/styles.js +114 -0
- package/dist/esm/line/components/Divider.js +22 -0
- package/dist/esm/line/components/Divider.liquid.js +18 -0
- package/dist/esm/line/components/Line.js +94 -0
- package/dist/esm/line/components/Line.liquid.js +82 -0
- package/dist/esm/line/next.js +1 -1
- package/dist/esm/post-purchase/line/setting/configs/uiV2.js +1 -1
- package/dist/esm/post-purchase/link/setting/configs/settings.js +2 -1
- package/dist/esm/post-purchase/link/setting/configs/uiV2.js +1 -1
- package/dist/esm/post-purchase/product/settings/product-variants/configs/uiV2.js +1 -1
- package/dist/esm/product/components/FileUpload/components/config/setting.js +24 -26
- package/dist/esm/product/components/FileUpload/components/config/uiV2.js +12 -179
- package/dist/esm/product/components/ProductList.js +1 -1
- package/dist/esm/product/components/ProductVariants/index.js +2 -2
- package/dist/esm/product/components/ProductVariants/index.liquid.js +2 -2
- package/dist/esm/product/components/ProductVariants/variants/Dropdown.js +8 -3
- package/dist/esm/product/components/ProductVariants/variants/Dropdown.liquid.js +7 -2
- package/dist/esm/product/setting/ProductVariants.js +8 -1374
- package/dist/esm/product/setting/product-list/configs/uiV2.js +0 -3
- package/dist/esm/product/setting/product-variant/configs/presets.js +166 -0
- package/dist/esm/product/setting/product-variant/configs/settings.js +730 -0
- package/dist/esm/product/setting/product-variant/configs/uiV1.js +507 -0
- package/dist/esm/product/setting/product-variant/configs/uiV2.js +345 -0
- package/dist/esm/third-party/components/EcoboostifyShoppableReelUgc.js +29 -0
- package/dist/esm/third-party/components/EcoboostifyShoppableReelUgc.liquid.js +8 -0
- package/dist/esm/third-party/configs/EcoboostifyShoppableReelUgc.js +8 -0
- package/dist/esm/third-party/next.js +5 -0
- package/dist/esm/third-party/setting/EcoboostifyShoppableReelUgc.js +138 -0
- package/dist/esm/third-party/setting/index.js +3 -1
- package/dist/types/index.d.ts +184 -166
- package/package.json +2 -2
- package/dist/cjs/dialog/helpers/common.js +0 -55
- package/dist/cjs/icon-list-hoz/components/IconListItemHoz.liquid.js +0 -23
- package/dist/cjs/line/Divider.js +0 -35
- package/dist/cjs/line/Divider.liquid.js +0 -35
- package/dist/cjs/line/Line.js +0 -167
- package/dist/cjs/line/Line.liquid.js +0 -163
- package/dist/esm/dialog/helpers/common.js +0 -47
- package/dist/esm/icon-list-hoz/components/IconListItemHoz.liquid.js +0 -19
- package/dist/esm/line/Divider.js +0 -31
- package/dist/esm/line/Divider.liquid.js +0 -31
- package/dist/esm/line/Line.js +0 -163
- package/dist/esm/line/Line.liquid.js +0 -159
- /package/dist/cjs/dialog/{hooks/use-scroll-percentage.js → components/hooks/useScrollPercentage.js} +0 -0
- /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/color.js +0 -0
- /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/dropdown.js +0 -0
- /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/image-shopify.js +0 -0
- /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/image.js +0 -0
- /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/rectangle-list.js +0 -0
- /package/dist/esm/dialog/{hooks/use-scroll-percentage.js → components/hooks/useScrollPercentage.js} +0 -0
- /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/color.js +0 -0
- /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/dropdown.js +0 -0
- /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/image-shopify.js +0 -0
- /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/image.js +0 -0
- /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/rectangle-list.js +0 -0
package/dist/esm/line/Line.js
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
|
-
import { makeStyleResponsive, makeWidth, composeTypographyClassName, composeTypographyStyle, cls, makeStyle, getSingleColorVariable } from '@gem-sdk/core';
|
|
4
|
-
import Divider from './Divider.js';
|
|
5
|
-
|
|
6
|
-
const getTransformAngle = (transform, customTransform)=>{
|
|
7
|
-
switch(transform){
|
|
8
|
-
case 'horizontal':
|
|
9
|
-
return 0;
|
|
10
|
-
case 'vertical':
|
|
11
|
-
return 90;
|
|
12
|
-
case 'custom':
|
|
13
|
-
return customTransform || 0;
|
|
14
|
-
default:
|
|
15
|
-
return 0;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
const Line = ({ className, setting, styles, builderProps })=>{
|
|
19
|
-
const { lineStyle, color, thickness, fullWidth, width, align, textColor, iconSize, iconColor, iconRotate, transform, customTransform, iconSpacing, textSpacing } = styles ?? {};
|
|
20
|
-
const { enableIconText, text, iconSvg, position } = setting ?? {};
|
|
21
|
-
const wWidthFull = makeStyleResponsive('w', makeWidth(width));
|
|
22
|
-
const thicknessToUnit = ()=>{
|
|
23
|
-
return {
|
|
24
|
-
desktop: thickness?.desktop ? `${thickness.desktop}px` : '1px',
|
|
25
|
-
tablet: thickness?.desktop ? `${thickness.tablet}px` : '1px',
|
|
26
|
-
mobile: thickness?.desktop ? `${thickness.mobile}px` : '1px'
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
const getStyleSpacing = (spacing)=>{
|
|
30
|
-
switch(position){
|
|
31
|
-
case 'left':
|
|
32
|
-
return makeStyle({
|
|
33
|
-
mr: spacing
|
|
34
|
-
});
|
|
35
|
-
case 'right':
|
|
36
|
-
return makeStyle({
|
|
37
|
-
ml: spacing
|
|
38
|
-
});
|
|
39
|
-
default:
|
|
40
|
-
return makeStyle({
|
|
41
|
-
mr: spacing,
|
|
42
|
-
ml: spacing
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
const getConfigLine = ()=>({
|
|
47
|
-
fullWidth,
|
|
48
|
-
width,
|
|
49
|
-
position,
|
|
50
|
-
color,
|
|
51
|
-
lineStyle,
|
|
52
|
-
thickness
|
|
53
|
-
});
|
|
54
|
-
const appendTypoClass = composeTypographyClassName(styles?.typo, styles?.typography);
|
|
55
|
-
const appendTypoStyle = composeTypographyStyle(styles?.typo, styles?.typography);
|
|
56
|
-
return /*#__PURE__*/ jsxs("div", {
|
|
57
|
-
"data-id": builderProps?.uid,
|
|
58
|
-
className: cls('gp-flex', {
|
|
59
|
-
'gp-justify-start': align?.desktop === 'left',
|
|
60
|
-
'gp-justify-center': align?.desktop === 'center',
|
|
61
|
-
'gp-justify-end': align?.desktop === 'right',
|
|
62
|
-
'tablet:gp-justify-start': align?.tablet === 'left',
|
|
63
|
-
'tablet:gp-justify-center': align?.tablet === 'center',
|
|
64
|
-
'tablet:gp-justify-end': align?.tablet === 'right',
|
|
65
|
-
'mobile:gp-justify-start': align?.mobile === 'left',
|
|
66
|
-
'mobile:gp-justify-center': align?.mobile === 'center',
|
|
67
|
-
'mobile:gp-justify-end': align?.mobile === 'right'
|
|
68
|
-
}, className),
|
|
69
|
-
children: [
|
|
70
|
-
/*#__PURE__*/ jsx("div", {
|
|
71
|
-
style: {
|
|
72
|
-
...makeStyleResponsive('bs', lineStyle),
|
|
73
|
-
...makeStyleResponsive('bbw', thicknessToUnit()),
|
|
74
|
-
...makeStyle({
|
|
75
|
-
t: `gp-rotate(${getTransformAngle(transform, customTransform)}deg)`
|
|
76
|
-
}),
|
|
77
|
-
...makeStyle({
|
|
78
|
-
bc: getSingleColorVariable(color)
|
|
79
|
-
}),
|
|
80
|
-
...wWidthFull
|
|
81
|
-
},
|
|
82
|
-
className: cls({
|
|
83
|
-
'gp-hidden': enableIconText?.desktop,
|
|
84
|
-
'gp-block': !enableIconText?.desktop,
|
|
85
|
-
'tablet:gp-hidden': enableIconText?.tablet,
|
|
86
|
-
'tablet:gp-block': !enableIconText?.tablet,
|
|
87
|
-
'mobile:gp-hidden': enableIconText?.mobile,
|
|
88
|
-
'mobile:gp-block': !enableIconText?.mobile
|
|
89
|
-
}, className)
|
|
90
|
-
}),
|
|
91
|
-
/*#__PURE__*/ jsxs("div", {
|
|
92
|
-
className: cls('gp-items-center', {
|
|
93
|
-
'gp-hidden': !enableIconText?.desktop,
|
|
94
|
-
'gp-flex': enableIconText?.desktop,
|
|
95
|
-
'tablet:gp-hidden': !enableIconText?.tablet,
|
|
96
|
-
'tablet:gp-flex': enableIconText?.tablet,
|
|
97
|
-
'mobile:gp-hidden': !enableIconText?.mobile,
|
|
98
|
-
'mobile:gp-flex': enableIconText?.mobile
|
|
99
|
-
}, className),
|
|
100
|
-
style: {
|
|
101
|
-
...makeStyle({
|
|
102
|
-
bc: getSingleColorVariable(color)
|
|
103
|
-
}),
|
|
104
|
-
...makeStyle({
|
|
105
|
-
t: `gp-rotate(${getTransformAngle(transform, customTransform)}deg)`
|
|
106
|
-
}),
|
|
107
|
-
...wWidthFull
|
|
108
|
-
},
|
|
109
|
-
children: [
|
|
110
|
-
/*#__PURE__*/ jsx(Divider, {
|
|
111
|
-
config: getConfigLine(),
|
|
112
|
-
fixedSide: "left",
|
|
113
|
-
className: className
|
|
114
|
-
}),
|
|
115
|
-
/*#__PURE__*/ jsxs(Fragment, {
|
|
116
|
-
children: [
|
|
117
|
-
!!iconSvg && /*#__PURE__*/ jsx("span", {
|
|
118
|
-
className: cls('gp-inline-flex gp-flex-none gp-items-center gp-justify-center'),
|
|
119
|
-
style: {
|
|
120
|
-
...getStyleSpacing(iconSpacing),
|
|
121
|
-
...makeStyleResponsive('w', iconSize),
|
|
122
|
-
...makeStyleResponsive('h', iconSize),
|
|
123
|
-
...makeStyle({
|
|
124
|
-
t: `gp-rotate(${iconRotate})`
|
|
125
|
-
}),
|
|
126
|
-
...makeStyle({
|
|
127
|
-
c: getSingleColorVariable(iconColor)
|
|
128
|
-
})
|
|
129
|
-
},
|
|
130
|
-
dangerouslySetInnerHTML: {
|
|
131
|
-
__html: iconSvg
|
|
132
|
-
}
|
|
133
|
-
}),
|
|
134
|
-
!!text && /*#__PURE__*/ jsx("span", {
|
|
135
|
-
className: cls('gp-inline-flex gp-flex-none gp-items-center gp-justify-center', appendTypoClass),
|
|
136
|
-
style: {
|
|
137
|
-
...makeStyle({
|
|
138
|
-
tt: styles?.transform
|
|
139
|
-
}),
|
|
140
|
-
...appendTypoStyle,
|
|
141
|
-
...makeStyle({
|
|
142
|
-
c: getSingleColorVariable(textColor)
|
|
143
|
-
}),
|
|
144
|
-
...getStyleSpacing(textSpacing)
|
|
145
|
-
},
|
|
146
|
-
dangerouslySetInnerHTML: {
|
|
147
|
-
__html: text
|
|
148
|
-
}
|
|
149
|
-
})
|
|
150
|
-
]
|
|
151
|
-
}),
|
|
152
|
-
/*#__PURE__*/ jsx(Divider, {
|
|
153
|
-
config: getConfigLine(),
|
|
154
|
-
fixedSide: "right",
|
|
155
|
-
className: className
|
|
156
|
-
})
|
|
157
|
-
]
|
|
158
|
-
})
|
|
159
|
-
]
|
|
160
|
-
});
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
export { Line as default };
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { composeTypographyClassName, composeTypographyStyle, makeStyleResponsive, makeWidth, template, cls, makeStyle, getSingleColorVariable, RenderIf } from '@gem-sdk/core';
|
|
2
|
-
import Divider from './Divider.liquid.js';
|
|
3
|
-
|
|
4
|
-
const getTransformAngle = (transform, customTransform)=>{
|
|
5
|
-
switch(transform){
|
|
6
|
-
case 'horizontal':
|
|
7
|
-
return 0;
|
|
8
|
-
case 'vertical':
|
|
9
|
-
return 90;
|
|
10
|
-
case 'custom':
|
|
11
|
-
return customTransform || 0;
|
|
12
|
-
default:
|
|
13
|
-
return 0;
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
const Line = ({ className, setting, styles, advanced, builderProps })=>{
|
|
17
|
-
const { lineStyle, color, thickness, fullWidth, width, align, textColor, iconSize, iconColor, iconRotate, transform, customTransform, iconSpacing, textSpacing } = styles ?? {};
|
|
18
|
-
const { enableIconText, text, iconSvg, position } = setting ?? {};
|
|
19
|
-
const thicknessToUnit = ()=>{
|
|
20
|
-
return {
|
|
21
|
-
desktop: thickness?.desktop ? `${thickness.desktop}px` : '1px',
|
|
22
|
-
tablet: thickness?.desktop ? `${thickness.tablet}px` : '1px',
|
|
23
|
-
mobile: thickness?.desktop ? `${thickness.mobile}px` : '1px'
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
const getStyleSpacing = (spacing)=>{
|
|
27
|
-
switch(position){
|
|
28
|
-
case 'left':
|
|
29
|
-
return makeStyle({
|
|
30
|
-
mr: spacing
|
|
31
|
-
});
|
|
32
|
-
case 'right':
|
|
33
|
-
return makeStyle({
|
|
34
|
-
ml: spacing
|
|
35
|
-
});
|
|
36
|
-
default:
|
|
37
|
-
return makeStyle({
|
|
38
|
-
mr: spacing,
|
|
39
|
-
ml: spacing
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
const getConfigLine = ()=>({
|
|
44
|
-
fullWidth,
|
|
45
|
-
width,
|
|
46
|
-
position,
|
|
47
|
-
color,
|
|
48
|
-
lineStyle,
|
|
49
|
-
thickness
|
|
50
|
-
});
|
|
51
|
-
const appendTypoClass = composeTypographyClassName(styles?.typo, styles?.typography);
|
|
52
|
-
const appendTypoStyle = composeTypographyStyle(styles?.typo, styles?.typography);
|
|
53
|
-
const wWidthFull = makeStyleResponsive('w', makeWidth(width, fullWidth));
|
|
54
|
-
return template`
|
|
55
|
-
<div
|
|
56
|
-
data-id="${builderProps?.uid}"
|
|
57
|
-
class="${cls('gp-flex', {
|
|
58
|
-
'gp-justify-start': align?.desktop === 'left',
|
|
59
|
-
'gp-justify-center': align?.desktop === 'center',
|
|
60
|
-
'gp-justify-end': align?.desktop === 'right',
|
|
61
|
-
'tablet:gp-justify-start': align?.tablet === 'left',
|
|
62
|
-
'tablet:gp-justify-center': align?.tablet === 'center',
|
|
63
|
-
'tablet:gp-justify-end': align?.tablet === 'right',
|
|
64
|
-
'mobile:gp-justify-start': align?.mobile === 'left',
|
|
65
|
-
'mobile:gp-justify-center': align?.mobile === 'center',
|
|
66
|
-
'mobile:gp-justify-end': align?.mobile === 'right'
|
|
67
|
-
}, className, advanced?.cssClass)}"
|
|
68
|
-
>
|
|
69
|
-
<div
|
|
70
|
-
style="${{
|
|
71
|
-
...wWidthFull,
|
|
72
|
-
...makeStyleResponsive('bs', lineStyle),
|
|
73
|
-
...makeStyleResponsive('bbw', thicknessToUnit()),
|
|
74
|
-
...makeStyle({
|
|
75
|
-
t: `gp-rotate(${getTransformAngle(transform, customTransform)}deg)`
|
|
76
|
-
}),
|
|
77
|
-
...makeStyle({
|
|
78
|
-
bc: getSingleColorVariable(color)
|
|
79
|
-
})
|
|
80
|
-
}}"
|
|
81
|
-
class="${cls({
|
|
82
|
-
'gp-hidden': enableIconText?.desktop,
|
|
83
|
-
'gp-block': !enableIconText?.desktop,
|
|
84
|
-
'tablet:gp-hidden': enableIconText?.tablet,
|
|
85
|
-
'tablet:gp-block': !enableIconText?.tablet,
|
|
86
|
-
'mobile:gp-hidden': enableIconText?.mobile,
|
|
87
|
-
'mobile:gp-block': !enableIconText?.mobile
|
|
88
|
-
}, className)}"
|
|
89
|
-
></div>
|
|
90
|
-
<div
|
|
91
|
-
class="${cls('gp-items-center', {
|
|
92
|
-
'gp-hidden': !enableIconText?.desktop,
|
|
93
|
-
'gp-flex': enableIconText?.desktop,
|
|
94
|
-
'tablet:gp-hidden': !enableIconText?.tablet,
|
|
95
|
-
'tablet:gp-flex': enableIconText?.tablet,
|
|
96
|
-
'mobile:gp-hidden': !enableIconText?.mobile,
|
|
97
|
-
'mobile:gp-flex': enableIconText?.mobile
|
|
98
|
-
}, className)}"
|
|
99
|
-
style="${{
|
|
100
|
-
...wWidthFull,
|
|
101
|
-
...makeStyle({
|
|
102
|
-
bc: getSingleColorVariable(color)
|
|
103
|
-
}),
|
|
104
|
-
...makeStyle({
|
|
105
|
-
t: `gp-rotate(${getTransformAngle(transform, customTransform)}deg)`
|
|
106
|
-
})
|
|
107
|
-
}}"
|
|
108
|
-
>
|
|
109
|
-
${Divider({
|
|
110
|
-
config: getConfigLine(),
|
|
111
|
-
fixedSide: 'left',
|
|
112
|
-
className
|
|
113
|
-
})}
|
|
114
|
-
${RenderIf(!!iconSvg, template`
|
|
115
|
-
<span
|
|
116
|
-
class="${cls('gp-inline-flex gp-items-center gp-justify-center gp-flex-none')}"
|
|
117
|
-
style="${{
|
|
118
|
-
...getStyleSpacing(iconSpacing),
|
|
119
|
-
...makeStyleResponsive('w', iconSize),
|
|
120
|
-
...makeStyleResponsive('h', iconSize),
|
|
121
|
-
...makeStyle({
|
|
122
|
-
t: `gp-rotate(${iconRotate})`
|
|
123
|
-
}),
|
|
124
|
-
...makeStyle({
|
|
125
|
-
c: getSingleColorVariable(iconColor)
|
|
126
|
-
})
|
|
127
|
-
}}"
|
|
128
|
-
>
|
|
129
|
-
${iconSvg}
|
|
130
|
-
</span>
|
|
131
|
-
`)}
|
|
132
|
-
${RenderIf(!!text, template`
|
|
133
|
-
<span
|
|
134
|
-
class="${cls('gp-inline-flex gp-items-center gp-justify-center gp-flex-none', appendTypoClass)}"
|
|
135
|
-
style="${{
|
|
136
|
-
...makeStyle({
|
|
137
|
-
tt: styles?.transform
|
|
138
|
-
}),
|
|
139
|
-
...appendTypoStyle,
|
|
140
|
-
...makeStyle({
|
|
141
|
-
c: getSingleColorVariable(textColor)
|
|
142
|
-
}),
|
|
143
|
-
...getStyleSpacing(textSpacing)
|
|
144
|
-
}}"
|
|
145
|
-
>
|
|
146
|
-
${text}
|
|
147
|
-
</span>
|
|
148
|
-
`)}
|
|
149
|
-
${Divider({
|
|
150
|
-
config: getConfigLine(),
|
|
151
|
-
fixedSide: 'right',
|
|
152
|
-
className
|
|
153
|
-
})}
|
|
154
|
-
</div>
|
|
155
|
-
</div>
|
|
156
|
-
`;
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
export { Line as default };
|
/package/dist/cjs/dialog/{hooks/use-scroll-percentage.js → components/hooks/useScrollPercentage.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/esm/dialog/{hooks/use-scroll-percentage.js → components/hooks/useScrollPercentage.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|