@gem-sdk/components 2.0.0-dev.293 → 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.
Files changed (236) hide show
  1. package/dist/cjs/accordion/components/common/index.js +2 -2
  2. package/dist/cjs/article/components/ArticleAuthor.js +1 -1
  3. package/dist/cjs/article/components/ArticleTitle.js +3 -1
  4. package/dist/cjs/article/components/ArticleTitle.liquid.js +5 -2
  5. package/dist/cjs/article/setting/ArticleList.js +0 -30
  6. package/dist/cjs/article/setting/configs/ArticleAuthor/presets.js +0 -9
  7. package/dist/cjs/article/setting/configs/ArticleAuthor/settings.js +9 -5
  8. package/dist/cjs/article/setting/configs/ArticleAuthor/uiV2.js +16 -0
  9. package/dist/cjs/article/setting/configs/ArticleCategory/presets.js +0 -9
  10. package/dist/cjs/article/setting/configs/ArticleCategory/settings.js +9 -5
  11. package/dist/cjs/article/setting/configs/ArticleDate/presets.js +0 -9
  12. package/dist/cjs/article/setting/configs/ArticleDate/settings.js +9 -5
  13. package/dist/cjs/article/setting/configs/ArticleImage/settings.js +22 -1
  14. package/dist/cjs/article/setting/configs/ArticleTitle/settings.js +36 -7
  15. package/dist/cjs/article/setting/configs/ArticleTitle/uiV2.js +47 -2
  16. package/dist/cjs/builder.js +6 -2
  17. package/dist/cjs/button/components/Button.js +1 -1
  18. package/dist/cjs/button/components/Button.liquid.js +1 -1
  19. package/dist/cjs/button/components/ButtonIcon.liquid.js +3 -1
  20. package/dist/cjs/button/components/ButtonLabel.liquid.js +3 -1
  21. package/dist/cjs/button/components/common/attributes.js +2 -2
  22. package/dist/cjs/button/components/common/classes.js +2 -1
  23. package/dist/cjs/button/components/common/styles.js +9 -11
  24. package/dist/cjs/button/setting/configs/settings.js +7 -8
  25. package/dist/cjs/button/setting/configs/uiV2.js +4 -50
  26. package/dist/cjs/dialog/components/Dialog.js +109 -394
  27. package/dist/cjs/dialog/components/Dialog.liquid.js +129 -153
  28. package/dist/cjs/dialog/components/common/common.js +130 -0
  29. package/dist/cjs/dialog/components/common/getAttr.js +27 -0
  30. package/dist/cjs/dialog/components/common/getClasses.js +88 -0
  31. package/dist/cjs/dialog/components/common/getStyle.js +107 -0
  32. package/dist/cjs/dialog/components/hooks/useDialog.js +233 -0
  33. package/dist/cjs/dialog/setting/configs/settings.js +1 -1
  34. package/dist/cjs/dialog/setting/configs/uiV2.js +35 -25
  35. package/dist/cjs/form/components/form-checkbox/FormCheckbox.js +0 -4
  36. package/dist/cjs/form/components/textinput/TextInput.js +58 -0
  37. package/dist/cjs/form/components/textinput/TextInput.liquid.js +60 -0
  38. package/dist/cjs/form/components/textinput/common/composeClasses.js +33 -0
  39. package/dist/cjs/form/components/textinput/common/composeStyles.js +70 -0
  40. package/dist/cjs/form/next.js +5 -1
  41. package/dist/cjs/form/setting/index.js +3 -1
  42. package/dist/cjs/form/setting/newsletter/configs/settings.js +4 -2
  43. package/dist/cjs/form/setting/newsletter/configs/uiV2.js +2 -0
  44. package/dist/cjs/form/setting/text-input/TextInput.js +53 -0
  45. package/dist/cjs/form/setting/text-input/configs/settings.js +307 -0
  46. package/dist/cjs/form/setting/text-input/configs/uiV1.js +106 -0
  47. package/dist/cjs/form/setting/text-input/configs/uiV2.js +303 -0
  48. package/dist/cjs/grid/row/setting/configs/settings.js +6 -3
  49. package/dist/cjs/helpers.js +8 -0
  50. package/dist/cjs/icon-list/common/attrs.js +10 -0
  51. package/dist/cjs/icon-list/common/classes.js +9 -0
  52. package/dist/cjs/icon-list/common/styles.js +29 -0
  53. package/dist/cjs/icon-list/components/IconList.js +19 -30
  54. package/dist/cjs/icon-list/components/IconList.liquid.js +21 -24
  55. package/dist/cjs/icon-list/components/IconListItem.js +13 -7
  56. package/dist/cjs/icon-list/components/IconListItem.liquid.js +13 -7
  57. package/dist/cjs/icon-list-hoz/components/IconListHoz.js +37 -25
  58. package/dist/cjs/icon-list-hoz/components/IconListHoz.liquid.js +31 -25
  59. package/dist/cjs/icon-list-hoz/components/IconListHozItem.js +12 -6
  60. package/dist/cjs/icon-list-hoz/components/IconListIHozItem.liquid.js +26 -0
  61. package/dist/cjs/icon-list-hoz/components/common/getAttr.js +9 -0
  62. package/dist/cjs/icon-list-hoz/components/common/getClasses.js +24 -0
  63. package/dist/cjs/icon-list-hoz/components/common/getStyle.js +30 -0
  64. package/dist/cjs/image/components/AdaptiveImage.js +1 -1
  65. package/dist/cjs/image/components/AdaptiveImage.liquid.js +4 -4
  66. package/dist/cjs/image/components/Image.js +1 -5
  67. package/dist/cjs/image/components/common/styles.js +2 -2
  68. package/dist/cjs/image/components/helpers/getNextImageLiquidAttrs.js +6 -24
  69. package/dist/cjs/image/components/helpers/getNextImageReactAttrs.js +3 -3
  70. package/dist/cjs/index.js +6 -1
  71. package/dist/cjs/index.liquid.js +7 -3
  72. package/dist/cjs/line/common/classes.js +66 -0
  73. package/dist/cjs/line/common/index.js +16 -0
  74. package/dist/cjs/line/common/styles.js +120 -0
  75. package/dist/cjs/line/components/Divider.js +26 -0
  76. package/dist/cjs/line/components/Divider.liquid.js +22 -0
  77. package/dist/cjs/line/components/Line.js +98 -0
  78. package/dist/cjs/line/components/Line.liquid.js +86 -0
  79. package/dist/cjs/line/next.js +1 -1
  80. package/dist/cjs/post-purchase/line/setting/configs/uiV2.js +1 -1
  81. package/dist/cjs/post-purchase/link/setting/configs/settings.js +2 -1
  82. package/dist/cjs/post-purchase/link/setting/configs/uiV2.js +1 -1
  83. package/dist/cjs/post-purchase/product/settings/product-variants/configs/uiV2.js +1 -1
  84. package/dist/cjs/product/components/FileUpload/components/config/setting.js +24 -26
  85. package/dist/cjs/product/components/FileUpload/components/config/uiV2.js +12 -179
  86. package/dist/cjs/product/components/ProductList.js +1 -1
  87. package/dist/cjs/product/components/ProductVariants/index.js +2 -2
  88. package/dist/cjs/product/components/ProductVariants/index.liquid.js +2 -2
  89. package/dist/cjs/product/components/ProductVariants/variants/Dropdown.js +8 -3
  90. package/dist/cjs/product/components/ProductVariants/variants/Dropdown.liquid.js +7 -2
  91. package/dist/cjs/product/setting/ProductVariants.js +8 -1374
  92. package/dist/cjs/product/setting/product/configs/uiV2.js +2 -2
  93. package/dist/cjs/product/setting/product-list/configs/uiV2.js +0 -3
  94. package/dist/cjs/product/setting/product-variant/configs/presets.js +168 -0
  95. package/dist/cjs/product/setting/product-variant/configs/settings.js +732 -0
  96. package/dist/cjs/product/setting/product-variant/configs/uiV1.js +509 -0
  97. package/dist/cjs/product/setting/product-variant/configs/uiV2.js +347 -0
  98. package/dist/cjs/third-party/components/EcoboostifyShoppableReelUgc.js +33 -0
  99. package/dist/cjs/third-party/components/EcoboostifyShoppableReelUgc.liquid.js +12 -0
  100. package/dist/cjs/third-party/components/RechargeSubscriptions.liquid.js +1 -1
  101. package/dist/cjs/third-party/configs/EcoboostifyShoppableReelUgc.js +12 -0
  102. package/dist/cjs/third-party/next.js +5 -0
  103. package/dist/cjs/third-party/setting/EcoboostifyShoppableReelUgc.js +142 -0
  104. package/dist/cjs/third-party/setting/RechargeSubscriptions.js +5 -2
  105. package/dist/cjs/third-party/setting/index.js +3 -1
  106. package/dist/esm/accordion/components/common/index.js +2 -2
  107. package/dist/esm/article/components/ArticleAuthor.js +1 -1
  108. package/dist/esm/article/components/ArticleTitle.js +3 -1
  109. package/dist/esm/article/components/ArticleTitle.liquid.js +5 -2
  110. package/dist/esm/article/setting/ArticleList.js +0 -30
  111. package/dist/esm/article/setting/configs/ArticleAuthor/presets.js +0 -9
  112. package/dist/esm/article/setting/configs/ArticleAuthor/settings.js +9 -5
  113. package/dist/esm/article/setting/configs/ArticleAuthor/uiV2.js +16 -0
  114. package/dist/esm/article/setting/configs/ArticleCategory/presets.js +0 -9
  115. package/dist/esm/article/setting/configs/ArticleCategory/settings.js +9 -5
  116. package/dist/esm/article/setting/configs/ArticleDate/presets.js +0 -9
  117. package/dist/esm/article/setting/configs/ArticleDate/settings.js +9 -5
  118. package/dist/esm/article/setting/configs/ArticleImage/settings.js +22 -1
  119. package/dist/esm/article/setting/configs/ArticleTitle/settings.js +36 -7
  120. package/dist/esm/article/setting/configs/ArticleTitle/uiV2.js +47 -2
  121. package/dist/esm/builder.js +6 -2
  122. package/dist/esm/button/components/Button.js +1 -1
  123. package/dist/esm/button/components/Button.liquid.js +1 -1
  124. package/dist/esm/button/components/ButtonIcon.liquid.js +3 -1
  125. package/dist/esm/button/components/ButtonLabel.liquid.js +3 -1
  126. package/dist/esm/button/components/common/attributes.js +2 -2
  127. package/dist/esm/button/components/common/classes.js +3 -2
  128. package/dist/esm/button/components/common/styles.js +10 -12
  129. package/dist/esm/button/setting/configs/settings.js +7 -8
  130. package/dist/esm/button/setting/configs/uiV2.js +4 -50
  131. package/dist/esm/dialog/components/Dialog.js +110 -395
  132. package/dist/esm/dialog/components/Dialog.liquid.js +130 -154
  133. package/dist/esm/dialog/components/common/common.js +117 -0
  134. package/dist/esm/dialog/components/common/getAttr.js +22 -0
  135. package/dist/esm/dialog/components/common/getClasses.js +79 -0
  136. package/dist/esm/dialog/components/common/getStyle.js +98 -0
  137. package/dist/esm/dialog/components/hooks/useDialog.js +231 -0
  138. package/dist/esm/dialog/setting/configs/settings.js +1 -1
  139. package/dist/esm/dialog/setting/configs/uiV2.js +35 -25
  140. package/dist/esm/form/components/form-checkbox/FormCheckbox.js +0 -4
  141. package/dist/esm/form/components/textinput/TextInput.js +54 -0
  142. package/dist/esm/form/components/textinput/TextInput.liquid.js +56 -0
  143. package/dist/esm/form/components/textinput/common/composeClasses.js +29 -0
  144. package/dist/esm/form/components/textinput/common/composeStyles.js +67 -0
  145. package/dist/esm/form/next.js +5 -1
  146. package/dist/esm/form/setting/index.js +3 -1
  147. package/dist/esm/form/setting/newsletter/configs/settings.js +4 -2
  148. package/dist/esm/form/setting/newsletter/configs/uiV2.js +2 -0
  149. package/dist/esm/form/setting/text-input/TextInput.js +49 -0
  150. package/dist/esm/form/setting/text-input/configs/settings.js +305 -0
  151. package/dist/esm/form/setting/text-input/configs/uiV1.js +104 -0
  152. package/dist/esm/form/setting/text-input/configs/uiV2.js +301 -0
  153. package/dist/esm/grid/row/setting/configs/settings.js +6 -3
  154. package/dist/esm/helpers.js +8 -1
  155. package/dist/esm/icon-list/common/attrs.js +8 -0
  156. package/dist/esm/icon-list/common/classes.js +6 -0
  157. package/dist/esm/icon-list/common/styles.js +25 -0
  158. package/dist/esm/icon-list/components/IconList.js +21 -32
  159. package/dist/esm/icon-list/components/IconList.liquid.js +21 -24
  160. package/dist/esm/icon-list/components/IconListItem.js +13 -7
  161. package/dist/esm/icon-list/components/IconListItem.liquid.js +14 -8
  162. package/dist/esm/icon-list-hoz/components/IconListHoz.js +38 -26
  163. package/dist/esm/icon-list-hoz/components/IconListHoz.liquid.js +32 -26
  164. package/dist/esm/icon-list-hoz/components/IconListHozItem.js +12 -6
  165. package/dist/esm/icon-list-hoz/components/IconListIHozItem.liquid.js +22 -0
  166. package/dist/esm/icon-list-hoz/components/common/getAttr.js +7 -0
  167. package/dist/esm/icon-list-hoz/components/common/getClasses.js +21 -0
  168. package/dist/esm/icon-list-hoz/components/common/getStyle.js +27 -0
  169. package/dist/esm/image/components/AdaptiveImage.js +2 -2
  170. package/dist/esm/image/components/AdaptiveImage.liquid.js +4 -4
  171. package/dist/esm/image/components/Image.js +2 -6
  172. package/dist/esm/image/components/common/styles.js +2 -2
  173. package/dist/esm/image/components/helpers/getNextImageLiquidAttrs.js +6 -24
  174. package/dist/esm/image/components/helpers/getNextImageReactAttrs.js +3 -3
  175. package/dist/esm/index.js +4 -2
  176. package/dist/esm/index.liquid.js +4 -2
  177. package/dist/esm/line/common/classes.js +59 -0
  178. package/dist/esm/line/common/index.js +14 -0
  179. package/dist/esm/line/common/styles.js +114 -0
  180. package/dist/esm/line/components/Divider.js +22 -0
  181. package/dist/esm/line/components/Divider.liquid.js +18 -0
  182. package/dist/esm/line/components/Line.js +94 -0
  183. package/dist/esm/line/components/Line.liquid.js +82 -0
  184. package/dist/esm/line/next.js +1 -1
  185. package/dist/esm/post-purchase/line/setting/configs/uiV2.js +1 -1
  186. package/dist/esm/post-purchase/link/setting/configs/settings.js +2 -1
  187. package/dist/esm/post-purchase/link/setting/configs/uiV2.js +1 -1
  188. package/dist/esm/post-purchase/product/settings/product-variants/configs/uiV2.js +1 -1
  189. package/dist/esm/product/components/FileUpload/components/config/setting.js +24 -26
  190. package/dist/esm/product/components/FileUpload/components/config/uiV2.js +12 -179
  191. package/dist/esm/product/components/ProductList.js +1 -1
  192. package/dist/esm/product/components/ProductVariants/index.js +2 -2
  193. package/dist/esm/product/components/ProductVariants/index.liquid.js +2 -2
  194. package/dist/esm/product/components/ProductVariants/variants/Dropdown.js +8 -3
  195. package/dist/esm/product/components/ProductVariants/variants/Dropdown.liquid.js +7 -2
  196. package/dist/esm/product/setting/ProductVariants.js +8 -1374
  197. package/dist/esm/product/setting/product/configs/uiV2.js +2 -2
  198. package/dist/esm/product/setting/product-list/configs/uiV2.js +0 -3
  199. package/dist/esm/product/setting/product-variant/configs/presets.js +166 -0
  200. package/dist/esm/product/setting/product-variant/configs/settings.js +730 -0
  201. package/dist/esm/product/setting/product-variant/configs/uiV1.js +507 -0
  202. package/dist/esm/product/setting/product-variant/configs/uiV2.js +345 -0
  203. package/dist/esm/third-party/components/EcoboostifyShoppableReelUgc.js +29 -0
  204. package/dist/esm/third-party/components/EcoboostifyShoppableReelUgc.liquid.js +8 -0
  205. package/dist/esm/third-party/components/RechargeSubscriptions.liquid.js +1 -1
  206. package/dist/esm/third-party/configs/EcoboostifyShoppableReelUgc.js +8 -0
  207. package/dist/esm/third-party/next.js +5 -0
  208. package/dist/esm/third-party/setting/EcoboostifyShoppableReelUgc.js +138 -0
  209. package/dist/esm/third-party/setting/RechargeSubscriptions.js +5 -2
  210. package/dist/esm/third-party/setting/index.js +3 -1
  211. package/dist/types/index.d.ts +184 -166
  212. package/package.json +2 -2
  213. package/dist/cjs/dialog/helpers/common.js +0 -55
  214. package/dist/cjs/icon-list-hoz/components/IconListItemHoz.liquid.js +0 -23
  215. package/dist/cjs/line/Divider.js +0 -35
  216. package/dist/cjs/line/Divider.liquid.js +0 -35
  217. package/dist/cjs/line/Line.js +0 -167
  218. package/dist/cjs/line/Line.liquid.js +0 -163
  219. package/dist/esm/dialog/helpers/common.js +0 -47
  220. package/dist/esm/icon-list-hoz/components/IconListItemHoz.liquid.js +0 -19
  221. package/dist/esm/line/Divider.js +0 -31
  222. package/dist/esm/line/Divider.liquid.js +0 -31
  223. package/dist/esm/line/Line.js +0 -163
  224. package/dist/esm/line/Line.liquid.js +0 -159
  225. /package/dist/cjs/dialog/{hooks/use-scroll-percentage.js → components/hooks/useScrollPercentage.js} +0 -0
  226. /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/color.js +0 -0
  227. /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/dropdown.js +0 -0
  228. /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/image-shopify.js +0 -0
  229. /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/image.js +0 -0
  230. /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/rectangle-list.js +0 -0
  231. /package/dist/esm/dialog/{hooks/use-scroll-percentage.js → components/hooks/useScrollPercentage.js} +0 -0
  232. /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/color.js +0 -0
  233. /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/dropdown.js +0 -0
  234. /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/image-shopify.js +0 -0
  235. /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/image.js +0 -0
  236. /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/rectangle-list.js +0 -0
@@ -7,10 +7,37 @@ var jsxRuntime = require('react/jsx-runtime');
7
7
  var core = require('@gem-sdk/core');
8
8
  var React = require('react');
9
9
  var Head = require('next/head');
10
+ var system = require('@gem-sdk/system');
11
+ var getAttr = require('./common/getAttr.js');
12
+ var getStyle = require('./common/getStyle.js');
13
+ var getClasses = require('./common/getClasses.js');
10
14
 
11
- const IconListHoz = ({ builderAttrs, style, styles, setting, children, builderProps })=>{
15
+ const IconListHoz = (props)=>{
16
+ const { builderAttrs, style, setting, children, styles, advanced, builderProps } = props;
12
17
  const { preload } = setting || {};
13
- const { background, horizontalSpacing, align, verticalAlign } = styles || {};
18
+ const { background } = styles || {};
19
+ const attrs = system.createAttr({
20
+ ...getAttr.getAttr({
21
+ uid: builderProps?.uid || ''
22
+ })
23
+ });
24
+ const wrapperDialogStyle = system.createStyle({
25
+ ...getStyle.getWrapperStyle(style, background)
26
+ });
27
+ const containClasses = system.createClass({
28
+ ...getClasses.getContainClasses(advanced?.cssClass)
29
+ });
30
+ const containStyle = system.createStyle({
31
+ ...getStyle.getContainStyle(styles)
32
+ });
33
+ const renderChildren = ()=>React.Children.map(core.filterToolbarPreview(children), (child)=>{
34
+ if (/*#__PURE__*/ React.isValidElement(child)) {
35
+ return /*#__PURE__*/ jsxRuntime.jsx(child.type, {
36
+ ...child.props
37
+ });
38
+ }
39
+ return null;
40
+ });
14
41
  return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
15
42
  children: [
16
43
  !!preload && /*#__PURE__*/ jsxRuntime.jsxs(Head, {
@@ -33,37 +60,22 @@ const IconListHoz = ({ builderAttrs, style, styles, setting, children, builderPr
33
60
  ]
34
61
  }),
35
62
  /*#__PURE__*/ jsxRuntime.jsx("div", {
63
+ ...attrs,
36
64
  ...builderAttrs,
37
65
  "data-id": builderProps?.uid,
38
- style: {
39
- ...style,
40
- ...core.getStyleBackgroundByDevice(background)
41
- },
42
- children: core.isEmptyChildren(children) ? /*#__PURE__*/ jsxRuntime.jsx("div", {
66
+ style: wrapperDialogStyle,
67
+ children: system.If(core.isEmptyChildren(children), /*#__PURE__*/ jsxRuntime.jsx("div", {
43
68
  children: "Icons not found"
44
- }) : /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
69
+ }), /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
45
70
  children: [
46
71
  /*#__PURE__*/ jsxRuntime.jsx("div", {
47
- className: core.cls('gp-flex gp-flex-wrap'),
48
- style: {
49
- ...core.makeStyle({
50
- cg: horizontalSpacing
51
- }),
52
- ...core.makeStyleResponsive('jc', align),
53
- ...core.makeStyleResponsive('ai', verticalAlign)
54
- },
55
- children: React.Children.map(core.filterToolbarPreview(children), (child)=>{
56
- if (/*#__PURE__*/ React.isValidElement(child)) {
57
- return /*#__PURE__*/ jsxRuntime.jsx(child.type, {
58
- ...child.props
59
- });
60
- }
61
- return null;
62
- })
72
+ className: containClasses,
73
+ style: containStyle,
74
+ children: renderChildren()
63
75
  }),
64
76
  core.filterToolbarPreview(children, true)
65
77
  ]
66
- })
78
+ }))
67
79
  })
68
80
  ]
69
81
  });
@@ -4,38 +4,44 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var core = require('@gem-sdk/core');
6
6
  var helpers = require('../../helpers.js');
7
+ var system = require('@gem-sdk/system');
8
+ var getAttr = require('./common/getAttr.js');
9
+ var getStyle = require('./common/getStyle.js');
10
+ var getClasses = require('./common/getClasses.js');
7
11
 
8
- const IconListHoz = ({ builderAttrs, style, setting, children, styles, advanced, builderProps })=>{
12
+ const IconListHoz = (props)=>{
13
+ const { builderAttrs, style, setting, children, styles, advanced, builderProps } = props;
9
14
  const { preload } = setting || {};
10
- const { background, horizontalSpacing, align, verticalAlign } = styles || {};
15
+ const { background } = styles || {};
16
+ const attrs = system.createAttr({
17
+ ...getAttr.getAttr({
18
+ uid: builderProps?.uid || ''
19
+ })
20
+ });
21
+ const wrapperDialogStyle = system.createStyle({
22
+ ...getStyle.getWrapperStyle(style, background)
23
+ });
24
+ const containClasses = system.createClass({
25
+ ...getClasses.getContainClasses(advanced?.cssClass)
26
+ });
27
+ const containStyle = system.createStyle({
28
+ ...getStyle.getContainStyle(styles)
29
+ });
30
+ const renderChildren = ()=>children;
11
31
  return core.template`
12
32
  ${core.RenderIf(!!preload, `${core.RenderIf(!!background?.desktop?.image?.src, `<link rel="preload" href="${background?.desktop?.image?.src}" as="image" />`)}
13
33
  ${core.RenderIf(!!background?.tablet?.image?.src, `<link rel="preload" href="${background?.tablet?.image?.src}" as="image" />`)}
14
34
  ${core.RenderIf(!!background?.mobile?.image?.src, `<link rel="preload" href="${background?.mobile?.image?.src}" as="image" />`)}`)}
15
- <div
16
- data-id="${builderProps?.uid}"
17
- ${{
35
+ <div ${{
36
+ ...attrs
37
+ }} ${{
18
38
  ...builderAttrs
19
- }}
20
- data-id="${builderProps?.uid}"
21
- style="${{
22
- ...style,
23
- ...core.getStyleBackgroundByDevice(background, {
24
- liquid: true
25
- })
26
- }}">
27
-
28
- ${core.isEmptyChildren(children) ? `<div>${helpers.getStaticLocale('IconListHoz', 'icons_not_found')}</div>` : core.template`<div
29
- class="${core.cls('gp-flex gp-flex-wrap', advanced?.cssClass)}"
30
- style="${{
31
- ...core.makeStyle({
32
- cg: horizontalSpacing
33
- }),
34
- ...core.makeStyleResponsive('jc', align),
35
- ...core.makeStyleResponsive('ai', verticalAlign)
36
- }}">
37
- ${children}
38
- </div>`}
39
+ }} style="${wrapperDialogStyle}">
40
+ ${system.If(core.isEmptyChildren(children), `<div>${helpers.getStaticLocale('IconListHoz', 'icons_not_found')}</div>`, `<>
41
+ <div class="${containClasses}" style="${containStyle}">
42
+ ${renderChildren()}
43
+ </div>
44
+ </>`)}
39
45
  </div>
40
46
  `;
41
47
  };
@@ -4,9 +4,11 @@
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
- var core = require('@gem-sdk/core');
8
7
  var React = require('react');
9
8
  var ChildrenDroppable = require('../../grid/components/ChildrenDroppable.js');
9
+ var core = require('@gem-sdk/core');
10
+ var system = require('@gem-sdk/system');
11
+ var getClasses = require('./common/getClasses.js');
10
12
 
11
13
  const IconListHozItem = ({ children, builderAttrs })=>{
12
14
  if (core.isEmptyChildren(children)) {
@@ -14,17 +16,21 @@ const IconListHozItem = ({ children, builderAttrs })=>{
14
16
  className: "gp-min-w-[50px]"
15
17
  });
16
18
  }
17
- return /*#__PURE__*/ jsxRuntime.jsx("div", {
18
- ...builderAttrs,
19
- className: "gp-flex gp-w-full gp-flex-col gp-items-center",
20
- children: React.Children.map(children, (child)=>{
19
+ const itemClasses = system.createClass({
20
+ ...getClasses.getItemClasses()
21
+ });
22
+ const renderChildren = ()=>React.Children.map(children, (child)=>{
21
23
  if (/*#__PURE__*/ React.isValidElement(child)) {
22
24
  return /*#__PURE__*/ jsxRuntime.jsx(child.type, {
23
25
  ...child.props
24
26
  });
25
27
  }
26
28
  return null;
27
- })
29
+ });
30
+ return /*#__PURE__*/ jsxRuntime.jsx("div", {
31
+ ...builderAttrs,
32
+ className: itemClasses,
33
+ children: renderChildren()
28
34
  });
29
35
  };
30
36
 
@@ -0,0 +1,26 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var core = require('@gem-sdk/core');
6
+ var system = require('@gem-sdk/system');
7
+ var getClasses = require('./common/getClasses.js');
8
+
9
+ const IconListIHozItemLiquid = ({ children, builderAttrs })=>{
10
+ if (core.isEmptyChildren(children)) {
11
+ return '';
12
+ }
13
+ const itemClasses = system.createClass({
14
+ ...getClasses.getItemClasses()
15
+ });
16
+ const renderChildren = ()=>children;
17
+ return core.template`
18
+ <div ${{
19
+ ...builderAttrs
20
+ }} class="${itemClasses}">
21
+ ${renderChildren()}
22
+ </div>
23
+ `;
24
+ };
25
+
26
+ exports.default = IconListIHozItemLiquid;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ const getAttr = ({ uid })=>{
4
+ return {
5
+ 'data-id': uid
6
+ };
7
+ };
8
+
9
+ exports.getAttr = getAttr;
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ function composeClasses(classList) {
4
+ return classList.split(' ').reduce((acc, item)=>{
5
+ acc[item] = true;
6
+ return acc;
7
+ }, {});
8
+ }
9
+ const getContainClasses = (advancedCssClass)=>{
10
+ let classList = 'gp-flex gp-flex-wrap';
11
+ if (advancedCssClass) classList += ` ${advancedCssClass}`;
12
+ return {
13
+ ...composeClasses(classList)
14
+ };
15
+ };
16
+ const getItemClasses = ()=>{
17
+ const classList = 'gp-flex gp-w-full gp-flex-col gp-items-center';
18
+ return {
19
+ ...composeClasses(classList)
20
+ };
21
+ };
22
+
23
+ exports.getContainClasses = getContainClasses;
24
+ exports.getItemClasses = getItemClasses;
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+ var core = require('@gem-sdk/core');
4
+
5
+ function filterTruthyStyles(styles) {
6
+ return Object.fromEntries(Object.entries(styles || {}).filter(([, value])=>!!value));
7
+ }
8
+ const getWrapperStyle = (style, background)=>{
9
+ const composeStyles = {
10
+ ...style,
11
+ ...core.getStyleBackgroundByDevice(background, {
12
+ liquid: true
13
+ })
14
+ };
15
+ return filterTruthyStyles(composeStyles);
16
+ };
17
+ const getContainStyle = (styles)=>{
18
+ const { horizontalSpacing, align, verticalAlign } = styles || {};
19
+ const composeStyles = {
20
+ ...core.makeStyle({
21
+ cg: horizontalSpacing
22
+ }),
23
+ ...core.makeStyleResponsive('jc', align),
24
+ ...core.makeStyleResponsive('ai', verticalAlign)
25
+ };
26
+ return filterTruthyStyles(composeStyles);
27
+ };
28
+
29
+ exports.getContainStyle = getContainStyle;
30
+ exports.getWrapperStyle = getWrapperStyle;
@@ -19,7 +19,7 @@ const AdaptiveImage = (props)=>{
19
19
  srcDesktop,
20
20
  enableLazyLoadImage: enableLazyloadImage
21
21
  }));
22
- const pictureStyle = system.createStyle({
22
+ const pictureStyle = system.createStyleReact({
23
23
  ...styles.getAdaptivePictureStyles()
24
24
  });
25
25
  const adaptiveImageStyles = system.createStyle({
@@ -39,13 +39,13 @@ const AdaptiveImage = (props)=>{
39
39
  })
40
40
  });
41
41
  const renderSource = ()=>{
42
- return `
43
- ${srcMobile ? `<source media="(max-width: 767px)" srcset="${enableLazyLoadImage ? constants.IMAGE_PLACEHOLDER : srcMobile}" />` : ``}
44
- ${srcTablet ? `<source media="(max-width: 1024px)" srcset="${enableLazyLoadImage ? constants.IMAGE_PLACEHOLDER : srcTablet}" />` : ``}
42
+ return core.template`
43
+ ${srcMobile ? `<source media="(max-width: 767px)" data-srcSet="${srcMobile}" srcset="${enableLazyLoadImage ? constants.IMAGE_PLACEHOLDER : srcMobile}" />` : ``}
44
+ ${srcTablet ? `<source media="(max-width: 1024px)" data-srcSet="${srcTablet}" srcset="${enableLazyLoadImage ? constants.IMAGE_PLACEHOLDER : srcTablet}" />` : ``}
45
45
  `;
46
46
  };
47
47
  const renderImage = ()=>{
48
- return `
48
+ return core.template`
49
49
  <img
50
50
  ${{
51
51
  ...restProps
@@ -22,11 +22,7 @@ const Image = ({ style, styles: styles$1, setting, children, advanced, className
22
22
  setting: imageLink,
23
23
  enableImageLink
24
24
  });
25
- console.log('image', {
26
- setting,
27
- styles: styles$1
28
- });
29
- const wrapperStyles = system.createStyle(styles.getWrapperStyles(styles$1));
25
+ const wrapperStyles = system.createStyleReact(styles.getWrapperStyles(styles$1));
30
26
  const noDataImageStyles = system.createStyle(styles.getNoDataImageStyles(styles$1));
31
27
  const imageStyles = system.createStyle(styles.getImageStyles(styles$1, builderProps));
32
28
  const containerStyles = system.createStyle(styles.getContainerStyles(style, styles$1));
@@ -11,7 +11,7 @@ const getContainerStyles = (style, styles)=>{
11
11
  };
12
12
  const getWrapperStyles = (styles)=>{
13
13
  return {
14
- borderRadius: 'inherit',
14
+ 'border-radius': 'inherit',
15
15
  overflow: 'hidden',
16
16
  ...core.makeStyleResponsive('jc', styles?.align)
17
17
  };
@@ -62,7 +62,7 @@ const getAdaptiveImageStyles = ({ layout, aspectRatio, borderRadius })=>{
62
62
  };
63
63
  const getAdaptivePictureStyles = ()=>{
64
64
  return {
65
- borderRadius: 'inherit'
65
+ 'border-radius': 'inherit'
66
66
  };
67
67
  };
68
68
  const getNoDataImageStyles = (styles)=>{
@@ -8,6 +8,7 @@ const getNextImageLiquidAttrs = (props)=>{
8
8
  const { srcset, setting, storage, baseSrc, priority, customAttrs, width = 2237, height = 1678, isNotLazyload, backupFileKey, backupFilePath, srcIsLiquidCode, enableLazyLoadImage, alt = constants.NEXT_IMAGE_CONFIG.DEFAULT_ALT, src = constants.NEXT_IMAGE_CONFIG.DEFAULT_SRC, sizes = constants.NEXT_IMAGE_CONFIG.DEFAULT_SIZES } = props;
9
9
  const hasLazyLoad = !isNotLazyload && enableLazyLoadImage && !priority;
10
10
  const getLoadingAttrs = ()=>{
11
+ const { qualityPercent, qualityType } = setting ?? {};
11
12
  const newBackupFileKey = backupFileKey ? getSrcSet.getNewBackupFileKey(backupFileKey ?? '', src) : '';
12
13
  const srcImage = srcIsLiquidCode ? baseSrc : getSrcSet.getImageSrc({
13
14
  src,
@@ -37,43 +38,24 @@ const getNextImageLiquidAttrs = (props)=>{
37
38
  srcset: srcset || ''
38
39
  };
39
40
  return {
41
+ 'data-sizes': 'auto',
42
+ 'quality-type': JSON.stringify(qualityType) || '{}',
43
+ 'quality-percent': JSON.stringify(qualityPercent) || '{}',
40
44
  ...hasLazyLoad ? lazyLoadAttrs : priorityLoadAttrs
41
45
  };
42
46
  };
43
47
  const getBaseAttrs = ()=>{
44
- const { qualityPercent, qualityType } = setting ?? {};
45
48
  return {
46
49
  alt,
47
50
  width,
48
51
  height,
49
- draggable: 'false',
50
- 'data-sizes': 'auto',
51
- 'quality-type': JSON.stringify(qualityType) || '{}',
52
- 'quality-percent': JSON.stringify(qualityPercent) || '{}'
52
+ draggable: 'false'
53
53
  };
54
54
  };
55
- const getFilteredAttrs = ()=>{
56
- const ignoreAttrs = [
57
- 'src',
58
- 'srcset',
59
- 'width',
60
- 'height',
61
- 'alt',
62
- 'base-src'
63
- ];
64
- const filteredAttrs = {};
65
- Object.entries(props).forEach(([key, value])=>{
66
- if (!ignoreAttrs.includes(key) && (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean')) {
67
- filteredAttrs[key] = value;
68
- }
69
- });
70
- return filteredAttrs;
71
- };
72
55
  return system.createAttr({
73
56
  ...customAttrs,
74
57
  ...getBaseAttrs(),
75
- ...getLoadingAttrs(),
76
- ...getFilteredAttrs()
58
+ ...getLoadingAttrs()
77
59
  });
78
60
  };
79
61
 
@@ -4,7 +4,7 @@ var system = require('@gem-sdk/system');
4
4
  var constants = require('../common/constants.js');
5
5
 
6
6
  const getNextImageReactAttrs = (props)=>{
7
- const { width = constants.NEXT_IMAGE_CONFIG.DEFAULT_WIDTH_PROPS, height = constants.NEXT_IMAGE_CONFIG.DEFAULT_HEIGHT_PROPS, priority, isNotLazyload, enableLazyLoadImage, base64 = constants.IMAGE_PLACEHOLDER, alt = constants.NEXT_IMAGE_CONFIG.DEFAULT_ALT, src = constants.NEXT_IMAGE_CONFIG.DEFAULT_SRC } = props;
7
+ const { width = constants.NEXT_IMAGE_CONFIG.DEFAULT_WIDTH_PROPS, height = constants.NEXT_IMAGE_CONFIG.DEFAULT_HEIGHT_PROPS, quality, priority, isNotLazyload, enableLazyLoadImage, base64 = constants.IMAGE_PLACEHOLDER, alt = constants.NEXT_IMAGE_CONFIG.DEFAULT_ALT, src = constants.NEXT_IMAGE_CONFIG.DEFAULT_SRC } = props;
8
8
  const hasLazyLoad = !isNotLazyload && enableLazyLoadImage && !priority;
9
9
  const getLoadingAttrs = ()=>{
10
10
  const lazyLoadAttrs = {
@@ -26,12 +26,12 @@ const getNextImageReactAttrs = (props)=>{
26
26
  src,
27
27
  alt,
28
28
  width,
29
- height
29
+ height,
30
+ quality
30
31
  });
31
32
  const baseAttrs = getBaseAttrs();
32
33
  const loadingAttrs = system.createAttr(getLoadingAttrs());
33
34
  return {
34
- ...props,
35
35
  ...baseAttrs,
36
36
  ...loadingAttrs
37
37
  };
package/dist/cjs/index.js CHANGED
@@ -56,7 +56,7 @@ var Image = require('./image/components/Image.js');
56
56
  var index$f = require('./input/setting/index.js');
57
57
  var Input = require('./input/Input.js');
58
58
  var index$g = require('./line/setting/index.js');
59
- var Line = require('./line/Line.js');
59
+ var Line = require('./line/components/Line.js');
60
60
  var index$h = require('./link/setting/index.js');
61
61
  var Link = require('./link/components/Link.js');
62
62
  var index$i = require('./modal/setting/index.js');
@@ -217,6 +217,7 @@ var GloColorSwatchvariantImage = require('./third-party/components/GloColorSwatc
217
217
  var BfSizeChartSizeGuide = require('./third-party/components/BfSizeChartSizeGuide.js');
218
218
  var AlsoBoughtCbb = require('./third-party/components/AlsoBoughtCbb.js');
219
219
  var HextomFreeShippingBar = require('./third-party/components/HextomFreeShippingBar.js');
220
+ var EcoboostifyShoppableReelUgc = require('./third-party/components/EcoboostifyShoppableReelUgc.js');
220
221
  var index$z = require('./third-party-instant/setting/index.js');
221
222
  var InstantJudgemeReviews = require('./third-party-instant/components/InstantJudgemeReviews.js');
222
223
  var InstantLooxReviews = require('./third-party-instant/components/InstantLooxReviews.js');
@@ -245,6 +246,7 @@ var TextField = require('./form/components/textfield/TextField.js');
245
246
  var TextArea = require('./form/components/textarea/TextArea.js');
246
247
  var FormDropdown = require('./form/components/form-dropdown/FormDropdown.js');
247
248
  var FormCheckbox = require('./form/components/form-checkbox/FormCheckbox.js');
249
+ var TextInput = require('./form/components/textinput/TextInput.js');
248
250
  var index$H = require('./image-detection/setting/index.js');
249
251
  var ImageDetection = require('./image-detection/ImageDetection.js');
250
252
  var index$I = require('./image-comparison/setting/index.js');
@@ -536,6 +538,7 @@ exports.GloColorSwatchvariantImage = GloColorSwatchvariantImage.default;
536
538
  exports.BfSizeChartSizeGuide = BfSizeChartSizeGuide.default;
537
539
  exports.AlsoBoughtCbb = AlsoBoughtCbb.default;
538
540
  exports.HextomFreeShippingBar = HextomFreeShippingBar.default;
541
+ exports.EcoboostifyShoppableReelUgc = EcoboostifyShoppableReelUgc.default;
539
542
  exports.thirdPartyInstantSetting = index$z.default;
540
543
  exports.InstantJudgemeReviews = InstantJudgemeReviews.default;
541
544
  exports.InstantLooxReviews = InstantLooxReviews.default;
@@ -564,6 +567,7 @@ exports.TextField = TextField.default;
564
567
  exports.FormTextarea = TextArea.default;
565
568
  exports.FormDropdown = FormDropdown.default;
566
569
  exports.FormCheckbox = FormCheckbox.default;
570
+ exports.TextInput = TextInput.default;
567
571
  exports.imageDetectionSetting = index$H.default;
568
572
  exports.ImageDetection = ImageDetection.default;
569
573
  exports.imageComparisonSetting = index$I.default;
@@ -637,6 +641,7 @@ exports.getLinkData = helpers.getLinkData;
637
641
  exports.getSettingPreloadData = helpers.getSettingPreloadData;
638
642
  exports.getStaticLocale = helpers.getStaticLocale;
639
643
  exports.isHexTransparent = helpers.isHexTransparent;
644
+ exports.isMobile = helpers.isMobile;
640
645
  exports.isTransparentColor = helpers.isTransparentColor;
641
646
  exports.isTransparentRGBA = helpers.isTransparentRGBA;
642
647
  exports.replaceLinkData = helpers.replaceLinkData;
@@ -32,9 +32,9 @@ var UploadFile_liquid = require('./product/components/FileUpload/components/Uplo
32
32
  var Heading_liquid = require('./heading/Heading.liquid.js');
33
33
  var CarouselItem_liquid = require('./carousel/components/CarouselItem.liquid.js');
34
34
  var Carousel_liquid = require('./carousel/components/Carousel.liquid.js');
35
- var Line_liquid = require('./line/Line.liquid.js');
35
+ var Line_liquid = require('./line/components/Line.liquid.js');
36
36
  var IconListHoz_liquid = require('./icon-list-hoz/components/IconListHoz.liquid.js');
37
- var IconListItemHoz_liquid = require('./icon-list-hoz/components/IconListItemHoz.liquid.js');
37
+ var IconListIHozItem_liquid = require('./icon-list-hoz/components/IconListIHozItem.liquid.js');
38
38
  var IconListItem_liquid = require('./icon-list/components/IconListItem.liquid.js');
39
39
  var IconList_liquid = require('./icon-list/components/IconList.liquid.js');
40
40
  var Countdown_liquid = require('./countdown-timer/components/Countdown.liquid.js');
@@ -57,6 +57,7 @@ var TextField_liquid = require('./form/components/textfield/TextField.liquid.js'
57
57
  var TextArea_liquid = require('./form/components/textarea/TextArea.liquid.js');
58
58
  var FormDropdown_liquid = require('./form/components/form-dropdown/FormDropdown.liquid.js');
59
59
  var FormCheckbox_liquid = require('./form/components/form-checkbox/FormCheckbox.liquid.js');
60
+ var TextInput_liquid = require('./form/components/textinput/TextInput.liquid.js');
60
61
  var CollectionToolbar_liquid = require('./collection/components/CollectionToolbar.liquid.js');
61
62
  var CollectionTitle_liquid = require('./collection/components/CollectionTitle.liquid.js');
62
63
  var CollectionDescription_liquid = require('./collection/components/CollectionDescription.liquid.js');
@@ -172,6 +173,7 @@ var GloColorSwatchvariantImage_liquid = require('./third-party/components/GloCol
172
173
  var BfSizeChartSizeGuide_liquid = require('./third-party/components/BfSizeChartSizeGuide.liquid.js');
173
174
  var AlsoBoughtCbb_liquid = require('./third-party/components/AlsoBoughtCbb.liquid.js');
174
175
  var HextomFreeShippingBar_liquid = require('./third-party/components/HextomFreeShippingBar.liquid.js');
176
+ var EcoboostifyShoppableReelUgc_liquid = require('./third-party/components/EcoboostifyShoppableReelUgc.liquid.js');
175
177
  var TrustshopProductReviews_liquid = require('./third-party/components/TrustshopProductReviews.liquid.js');
176
178
  var StellarDeliveryDatePickup_liquid = require('./third-party/components/StellarDeliveryDatePickup.liquid.js');
177
179
  var ImageComparison_liquid = require('./image-comparison/components/ImageComparison.liquid.js');
@@ -230,7 +232,7 @@ exports.CarouselItem = CarouselItem_liquid.default;
230
232
  exports.Carousel = Carousel_liquid.default;
231
233
  exports.Line = Line_liquid.default;
232
234
  exports.IconListHoz = IconListHoz_liquid.default;
233
- exports.IconListItemHoz = IconListItemHoz_liquid.default;
235
+ exports.IconListHozItem = IconListIHozItem_liquid.default;
234
236
  exports.IconListItem = IconListItem_liquid.default;
235
237
  exports.IconList = IconList_liquid.default;
236
238
  exports.Countdown = Countdown_liquid.default;
@@ -253,6 +255,7 @@ exports.TextField = TextField_liquid.default;
253
255
  exports.FormTextarea = TextArea_liquid.default;
254
256
  exports.FormDropdown = FormDropdown_liquid.default;
255
257
  exports.FormCheckbox = FormCheckbox_liquid.default;
258
+ exports.TextInput = TextInput_liquid.default;
256
259
  exports.CollectionToolbar = CollectionToolbar_liquid.default;
257
260
  exports.CollectionTitle = CollectionTitle_liquid.default;
258
261
  exports.CollectionDescription = CollectionDescription_liquid.default;
@@ -368,6 +371,7 @@ exports.GloColorSwatchvariantImage = GloColorSwatchvariantImage_liquid.default;
368
371
  exports.BfSizeChartSizeGuide = BfSizeChartSizeGuide_liquid.default;
369
372
  exports.AlsoBoughtCbb = AlsoBoughtCbb_liquid.default;
370
373
  exports.HextomFreeShippingBar = HextomFreeShippingBar_liquid.default;
374
+ exports.EcoboostifyShoppableReelUgc = EcoboostifyShoppableReelUgc_liquid.default;
371
375
  exports.TrustshopProductReviews = TrustshopProductReviews_liquid.default;
372
376
  exports.StellarDeliveryDatePickup = StellarDeliveryDatePickup_liquid.default;
373
377
  exports.ImageComparison = ImageComparison_liquid.default;
@@ -0,0 +1,66 @@
1
+ 'use strict';
2
+
3
+ var core = require('@gem-sdk/core');
4
+
5
+ const getClassContainerLine = ({ className, styles, advanced })=>{
6
+ const { align } = styles ?? {};
7
+ return composeClasses(core.cls('gp-flex', {
8
+ 'gp-justify-start': align?.desktop === 'left',
9
+ 'gp-justify-center': align?.desktop === 'center',
10
+ 'gp-justify-end': align?.desktop === 'right',
11
+ 'tablet:gp-justify-start': align?.tablet === 'left',
12
+ 'tablet:gp-justify-center': align?.tablet === 'center',
13
+ 'tablet:gp-justify-end': align?.tablet === 'right',
14
+ 'mobile:gp-justify-start': align?.mobile === 'left',
15
+ 'mobile:gp-justify-center': align?.mobile === 'center',
16
+ 'mobile:gp-justify-end': align?.mobile === 'right'
17
+ }, className, advanced?.cssClass));
18
+ };
19
+ const getClassWrapNotIcon = ({ className, setting })=>{
20
+ const { enableIconText } = setting ?? {};
21
+ return composeClasses(core.cls({
22
+ 'gp-hidden': enableIconText?.desktop,
23
+ 'gp-block': !enableIconText?.desktop,
24
+ 'tablet:gp-hidden': enableIconText?.tablet,
25
+ 'tablet:gp-block': !enableIconText?.tablet,
26
+ 'mobile:gp-hidden': enableIconText?.mobile,
27
+ 'mobile:gp-block': !enableIconText?.mobile
28
+ }, className));
29
+ };
30
+ const getClassWrapIcon = ({ className, setting })=>{
31
+ const { enableIconText } = setting ?? {};
32
+ return composeClasses(core.cls('gp-items-center', {
33
+ 'gp-hidden': !enableIconText?.desktop,
34
+ 'gp-flex': enableIconText?.desktop,
35
+ 'tablet:gp-hidden': !enableIconText?.tablet,
36
+ 'tablet:gp-flex': enableIconText?.tablet,
37
+ 'mobile:gp-hidden': !enableIconText?.mobile,
38
+ 'mobile:gp-flex': enableIconText?.mobile
39
+ }, className));
40
+ };
41
+ const getClassIcon = ()=>{
42
+ return composeClasses(core.cls('gp-inline-flex gp-flex-none gp-items-center gp-justify-center'));
43
+ };
44
+ const getClassText = ({ styles })=>{
45
+ const appendTypoClass = core.composeTypographyClassName(styles?.typo, styles?.typography);
46
+ return composeClasses(core.cls('gp-inline-flex gp-flex-none gp-items-center gp-justify-center', appendTypoClass));
47
+ };
48
+ const getClassContainerDivider = ({ className, fixedSide, config })=>{
49
+ return composeClasses(core.cls({
50
+ 'gp-hidden': config?.position === fixedSide,
51
+ 'gp-flex': config?.position !== fixedSide
52
+ }, className));
53
+ };
54
+ function composeClasses(classList) {
55
+ return classList.split(' ').reduce((acc, item)=>{
56
+ acc[item] = true;
57
+ return acc;
58
+ }, {});
59
+ }
60
+
61
+ exports.getClassContainerDivider = getClassContainerDivider;
62
+ exports.getClassContainerLine = getClassContainerLine;
63
+ exports.getClassIcon = getClassIcon;
64
+ exports.getClassText = getClassText;
65
+ exports.getClassWrapIcon = getClassWrapIcon;
66
+ exports.getClassWrapNotIcon = getClassWrapNotIcon;
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ const getConfigLine = ({ styles, setting })=>{
4
+ const { fullWidth, width, color, thickness, lineStyle } = styles ?? {};
5
+ const { position } = setting ?? {};
6
+ return {
7
+ fullWidth,
8
+ width,
9
+ position,
10
+ color,
11
+ lineStyle,
12
+ thickness
13
+ };
14
+ };
15
+
16
+ exports.getConfigLine = getConfigLine;