@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.293",
3
+ "version": "2.0.0-dev.303",
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.292",
25
+ "@gem-sdk/core": "2.0.0-dev.300",
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,55 +0,0 @@
1
- 'use strict';
2
-
3
- var core = require('@gem-sdk/core');
4
-
5
- const isShowModal = (startDate, numberOfDay = 0)=>{
6
- const start = startDate ? new Date(Number(startDate)) : new Date();
7
- const c = Date.now() - start.getTime();
8
- // Diff by day
9
- const diff = Math.abs(c / 24 / 60 / 60 / 1000);
10
- return diff >= numberOfDay;
11
- };
12
- const isMobile = (userAgent)=>{
13
- if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(userAgent)) {
14
- return true;
15
- } else {
16
- return false;
17
- }
18
- };
19
- const getPropertyByDevice = (property, device)=>{
20
- if (device === 'tablet') return property?.tablet ?? property?.desktop;
21
- if (device === 'mobile') return property?.mobile ?? property?.tablet ?? property?.desktop;
22
- return property?.desktop;
23
- };
24
- const heightStyle = (fullScreen, height)=>({
25
- ...fullScreen?.desktop ? core.makeStyle({
26
- h: '100%'
27
- }) : !height?.desktop ? core.makeStyle({
28
- minh: '300px'
29
- }) : core.makeStyle({
30
- h: height.desktop
31
- }),
32
- '--h-tablet': getPropertyByDevice(fullScreen, 'tablet') ? '100%' : getPropertyByDevice(height, 'tablet') ?? '300px',
33
- '--h-mobile': getPropertyByDevice(fullScreen, 'mobile') ? '100%' : getPropertyByDevice(height, 'mobile') ?? '300px',
34
- '--maxh': getPropertyByDevice(fullScreen, 'desktop') ? '100%' : '',
35
- '--maxh-tablet': getPropertyByDevice(fullScreen, 'tablet') ? '100%' : '',
36
- '--maxh-mobile': getPropertyByDevice(fullScreen, 'mobile') ? '100%' : ''
37
- });
38
- const removeHeightPercentForContent = (heightStyle)=>({
39
- ...heightStyle,
40
- '--h': heightStyle['--h']?.includes('%') ? '100%' : heightStyle['--h'],
41
- '--h-tablet': heightStyle['--h-tablet']?.includes('%') ? '100%' : heightStyle['--h-tablet'],
42
- '--h-mobile': heightStyle['--h-mobile']?.includes('%') ? '100%' : heightStyle['--h-mobile']
43
- });
44
- const inheritStyleBody = {
45
- 'border-radius': 'inherit'
46
- };
47
- const bodyDialogClass = 'gp-h-full gp-w-full gp-overflow-y-auto gp-overflow-x-hidden !gp-max-h-screen';
48
-
49
- exports.bodyDialogClass = bodyDialogClass;
50
- exports.getPropertyByDevice = getPropertyByDevice;
51
- exports.heightStyle = heightStyle;
52
- exports.inheritStyleBody = inheritStyleBody;
53
- exports.isMobile = isMobile;
54
- exports.isShowModal = isShowModal;
55
- exports.removeHeightPercentForContent = removeHeightPercentForContent;
@@ -1,23 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var core = require('@gem-sdk/core');
6
-
7
- const IconListItemHozLiquid = ({ children, builderAttrs })=>{
8
- if (core.isEmptyChildren(children)) {
9
- return '';
10
- }
11
- return core.template`
12
- <div
13
- ${{
14
- ...builderAttrs
15
- }}
16
- class="gp-flex gp-w-full gp-flex-col gp-items-center"
17
- >
18
- ${children}
19
- </div>
20
- `;
21
- };
22
-
23
- exports.default = IconListItemHozLiquid;
@@ -1,35 +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
-
9
- const Divider = ({ className, fixedSide, config })=>{
10
- const wWidthFull = core.makeStyleResponsive('w', core.makeWidth(config.width));
11
- const thicknessToUnit = ()=>{
12
- return {
13
- desktop: config.thickness?.desktop ? `${config.thickness.desktop}px` : '1px',
14
- tablet: config.thickness?.desktop ? `${config.thickness.tablet}px` : '1px',
15
- mobile: config.thickness?.desktop ? `${config.thickness.mobile}px` : '1px'
16
- };
17
- };
18
- return /*#__PURE__*/ jsxRuntime.jsx("div", {
19
- className: core.cls({
20
- 'gp-hidden': config?.position === fixedSide,
21
- 'gp-flex': config?.position !== fixedSide
22
- }, className),
23
- style: {
24
- ...core.makeStyle({
25
- bc: core.getSingleColorVariable(config?.color)
26
- }),
27
- ...core.makeStyleResponsive('bs', config?.lineStyle),
28
- ...core.makeStyleResponsive('bbw', thicknessToUnit()),
29
- ...core.makeStyleResponsive('minw', config?.width),
30
- ...wWidthFull
31
- }
32
- });
33
- };
34
-
35
- exports.default = Divider;
@@ -1,35 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var core = require('@gem-sdk/core');
6
-
7
- const Divider = ({ className, fixedSide, config })=>{
8
- const wWidthFull = core.makeStyleResponsive('w', core.makeWidth(config.width));
9
- const thicknessToUnit = ()=>{
10
- return {
11
- desktop: config.thickness?.desktop ? `${config.thickness.desktop}px` : '1px',
12
- tablet: config.thickness?.desktop ? `${config.thickness.tablet}px` : '1px',
13
- mobile: config.thickness?.desktop ? `${config.thickness.mobile}px` : '1px'
14
- };
15
- };
16
- return core.template`
17
- <div
18
- class="${core.cls({
19
- 'gp-hidden': config?.position === fixedSide,
20
- 'gp-flex': config?.position !== fixedSide
21
- }, className)}"
22
- style="${{
23
- ...wWidthFull,
24
- ...core.makeStyle({
25
- bc: core.getSingleColorVariable(config?.color)
26
- }),
27
- ...core.makeStyleResponsive('bs', config?.lineStyle),
28
- ...core.makeStyleResponsive('bbw', thicknessToUnit()),
29
- ...core.makeStyleResponsive('minw', config?.width)
30
- }}"
31
- ></div>
32
- `;
33
- };
34
-
35
- exports.default = Divider;
@@ -1,167 +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 Divider = require('./Divider.js');
9
-
10
- const getTransformAngle = (transform, customTransform)=>{
11
- switch(transform){
12
- case 'horizontal':
13
- return 0;
14
- case 'vertical':
15
- return 90;
16
- case 'custom':
17
- return customTransform || 0;
18
- default:
19
- return 0;
20
- }
21
- };
22
- const Line = ({ className, setting, styles, builderProps })=>{
23
- const { lineStyle, color, thickness, fullWidth, width, align, textColor, iconSize, iconColor, iconRotate, transform, customTransform, iconSpacing, textSpacing } = styles ?? {};
24
- const { enableIconText, text, iconSvg, position } = setting ?? {};
25
- const wWidthFull = core.makeStyleResponsive('w', core.makeWidth(width));
26
- const thicknessToUnit = ()=>{
27
- return {
28
- desktop: thickness?.desktop ? `${thickness.desktop}px` : '1px',
29
- tablet: thickness?.desktop ? `${thickness.tablet}px` : '1px',
30
- mobile: thickness?.desktop ? `${thickness.mobile}px` : '1px'
31
- };
32
- };
33
- const getStyleSpacing = (spacing)=>{
34
- switch(position){
35
- case 'left':
36
- return core.makeStyle({
37
- mr: spacing
38
- });
39
- case 'right':
40
- return core.makeStyle({
41
- ml: spacing
42
- });
43
- default:
44
- return core.makeStyle({
45
- mr: spacing,
46
- ml: spacing
47
- });
48
- }
49
- };
50
- const getConfigLine = ()=>({
51
- fullWidth,
52
- width,
53
- position,
54
- color,
55
- lineStyle,
56
- thickness
57
- });
58
- const appendTypoClass = core.composeTypographyClassName(styles?.typo, styles?.typography);
59
- const appendTypoStyle = core.composeTypographyStyle(styles?.typo, styles?.typography);
60
- return /*#__PURE__*/ jsxRuntime.jsxs("div", {
61
- "data-id": builderProps?.uid,
62
- className: core.cls('gp-flex', {
63
- 'gp-justify-start': align?.desktop === 'left',
64
- 'gp-justify-center': align?.desktop === 'center',
65
- 'gp-justify-end': align?.desktop === 'right',
66
- 'tablet:gp-justify-start': align?.tablet === 'left',
67
- 'tablet:gp-justify-center': align?.tablet === 'center',
68
- 'tablet:gp-justify-end': align?.tablet === 'right',
69
- 'mobile:gp-justify-start': align?.mobile === 'left',
70
- 'mobile:gp-justify-center': align?.mobile === 'center',
71
- 'mobile:gp-justify-end': align?.mobile === 'right'
72
- }, className),
73
- children: [
74
- /*#__PURE__*/ jsxRuntime.jsx("div", {
75
- style: {
76
- ...core.makeStyleResponsive('bs', lineStyle),
77
- ...core.makeStyleResponsive('bbw', thicknessToUnit()),
78
- ...core.makeStyle({
79
- t: `gp-rotate(${getTransformAngle(transform, customTransform)}deg)`
80
- }),
81
- ...core.makeStyle({
82
- bc: core.getSingleColorVariable(color)
83
- }),
84
- ...wWidthFull
85
- },
86
- className: core.cls({
87
- 'gp-hidden': enableIconText?.desktop,
88
- 'gp-block': !enableIconText?.desktop,
89
- 'tablet:gp-hidden': enableIconText?.tablet,
90
- 'tablet:gp-block': !enableIconText?.tablet,
91
- 'mobile:gp-hidden': enableIconText?.mobile,
92
- 'mobile:gp-block': !enableIconText?.mobile
93
- }, className)
94
- }),
95
- /*#__PURE__*/ jsxRuntime.jsxs("div", {
96
- className: core.cls('gp-items-center', {
97
- 'gp-hidden': !enableIconText?.desktop,
98
- 'gp-flex': enableIconText?.desktop,
99
- 'tablet:gp-hidden': !enableIconText?.tablet,
100
- 'tablet:gp-flex': enableIconText?.tablet,
101
- 'mobile:gp-hidden': !enableIconText?.mobile,
102
- 'mobile:gp-flex': enableIconText?.mobile
103
- }, className),
104
- style: {
105
- ...core.makeStyle({
106
- bc: core.getSingleColorVariable(color)
107
- }),
108
- ...core.makeStyle({
109
- t: `gp-rotate(${getTransformAngle(transform, customTransform)}deg)`
110
- }),
111
- ...wWidthFull
112
- },
113
- children: [
114
- /*#__PURE__*/ jsxRuntime.jsx(Divider.default, {
115
- config: getConfigLine(),
116
- fixedSide: "left",
117
- className: className
118
- }),
119
- /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
120
- children: [
121
- !!iconSvg && /*#__PURE__*/ jsxRuntime.jsx("span", {
122
- className: core.cls('gp-inline-flex gp-flex-none gp-items-center gp-justify-center'),
123
- style: {
124
- ...getStyleSpacing(iconSpacing),
125
- ...core.makeStyleResponsive('w', iconSize),
126
- ...core.makeStyleResponsive('h', iconSize),
127
- ...core.makeStyle({
128
- t: `gp-rotate(${iconRotate})`
129
- }),
130
- ...core.makeStyle({
131
- c: core.getSingleColorVariable(iconColor)
132
- })
133
- },
134
- dangerouslySetInnerHTML: {
135
- __html: iconSvg
136
- }
137
- }),
138
- !!text && /*#__PURE__*/ jsxRuntime.jsx("span", {
139
- className: core.cls('gp-inline-flex gp-flex-none gp-items-center gp-justify-center', appendTypoClass),
140
- style: {
141
- ...core.makeStyle({
142
- tt: styles?.transform
143
- }),
144
- ...appendTypoStyle,
145
- ...core.makeStyle({
146
- c: core.getSingleColorVariable(textColor)
147
- }),
148
- ...getStyleSpacing(textSpacing)
149
- },
150
- dangerouslySetInnerHTML: {
151
- __html: text
152
- }
153
- })
154
- ]
155
- }),
156
- /*#__PURE__*/ jsxRuntime.jsx(Divider.default, {
157
- config: getConfigLine(),
158
- fixedSide: "right",
159
- className: className
160
- })
161
- ]
162
- })
163
- ]
164
- });
165
- };
166
-
167
- exports.default = Line;
@@ -1,163 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var core = require('@gem-sdk/core');
6
- var Divider_liquid = require('./Divider.liquid.js');
7
-
8
- const getTransformAngle = (transform, customTransform)=>{
9
- switch(transform){
10
- case 'horizontal':
11
- return 0;
12
- case 'vertical':
13
- return 90;
14
- case 'custom':
15
- return customTransform || 0;
16
- default:
17
- return 0;
18
- }
19
- };
20
- const Line = ({ className, setting, styles, advanced, builderProps })=>{
21
- const { lineStyle, color, thickness, fullWidth, width, align, textColor, iconSize, iconColor, iconRotate, transform, customTransform, iconSpacing, textSpacing } = styles ?? {};
22
- const { enableIconText, text, iconSvg, position } = setting ?? {};
23
- const thicknessToUnit = ()=>{
24
- return {
25
- desktop: thickness?.desktop ? `${thickness.desktop}px` : '1px',
26
- tablet: thickness?.desktop ? `${thickness.tablet}px` : '1px',
27
- mobile: thickness?.desktop ? `${thickness.mobile}px` : '1px'
28
- };
29
- };
30
- const getStyleSpacing = (spacing)=>{
31
- switch(position){
32
- case 'left':
33
- return core.makeStyle({
34
- mr: spacing
35
- });
36
- case 'right':
37
- return core.makeStyle({
38
- ml: spacing
39
- });
40
- default:
41
- return core.makeStyle({
42
- mr: spacing,
43
- ml: spacing
44
- });
45
- }
46
- };
47
- const getConfigLine = ()=>({
48
- fullWidth,
49
- width,
50
- position,
51
- color,
52
- lineStyle,
53
- thickness
54
- });
55
- const appendTypoClass = core.composeTypographyClassName(styles?.typo, styles?.typography);
56
- const appendTypoStyle = core.composeTypographyStyle(styles?.typo, styles?.typography);
57
- const wWidthFull = core.makeStyleResponsive('w', core.makeWidth(width, fullWidth));
58
- return core.template`
59
- <div
60
- data-id="${builderProps?.uid}"
61
- class="${core.cls('gp-flex', {
62
- 'gp-justify-start': align?.desktop === 'left',
63
- 'gp-justify-center': align?.desktop === 'center',
64
- 'gp-justify-end': align?.desktop === 'right',
65
- 'tablet:gp-justify-start': align?.tablet === 'left',
66
- 'tablet:gp-justify-center': align?.tablet === 'center',
67
- 'tablet:gp-justify-end': align?.tablet === 'right',
68
- 'mobile:gp-justify-start': align?.mobile === 'left',
69
- 'mobile:gp-justify-center': align?.mobile === 'center',
70
- 'mobile:gp-justify-end': align?.mobile === 'right'
71
- }, className, advanced?.cssClass)}"
72
- >
73
- <div
74
- style="${{
75
- ...wWidthFull,
76
- ...core.makeStyleResponsive('bs', lineStyle),
77
- ...core.makeStyleResponsive('bbw', thicknessToUnit()),
78
- ...core.makeStyle({
79
- t: `gp-rotate(${getTransformAngle(transform, customTransform)}deg)`
80
- }),
81
- ...core.makeStyle({
82
- bc: core.getSingleColorVariable(color)
83
- })
84
- }}"
85
- class="${core.cls({
86
- 'gp-hidden': enableIconText?.desktop,
87
- 'gp-block': !enableIconText?.desktop,
88
- 'tablet:gp-hidden': enableIconText?.tablet,
89
- 'tablet:gp-block': !enableIconText?.tablet,
90
- 'mobile:gp-hidden': enableIconText?.mobile,
91
- 'mobile:gp-block': !enableIconText?.mobile
92
- }, className)}"
93
- ></div>
94
- <div
95
- class="${core.cls('gp-items-center', {
96
- 'gp-hidden': !enableIconText?.desktop,
97
- 'gp-flex': enableIconText?.desktop,
98
- 'tablet:gp-hidden': !enableIconText?.tablet,
99
- 'tablet:gp-flex': enableIconText?.tablet,
100
- 'mobile:gp-hidden': !enableIconText?.mobile,
101
- 'mobile:gp-flex': enableIconText?.mobile
102
- }, className)}"
103
- style="${{
104
- ...wWidthFull,
105
- ...core.makeStyle({
106
- bc: core.getSingleColorVariable(color)
107
- }),
108
- ...core.makeStyle({
109
- t: `gp-rotate(${getTransformAngle(transform, customTransform)}deg)`
110
- })
111
- }}"
112
- >
113
- ${Divider_liquid.default({
114
- config: getConfigLine(),
115
- fixedSide: 'left',
116
- className
117
- })}
118
- ${core.RenderIf(!!iconSvg, core.template`
119
- <span
120
- class="${core.cls('gp-inline-flex gp-items-center gp-justify-center gp-flex-none')}"
121
- style="${{
122
- ...getStyleSpacing(iconSpacing),
123
- ...core.makeStyleResponsive('w', iconSize),
124
- ...core.makeStyleResponsive('h', iconSize),
125
- ...core.makeStyle({
126
- t: `gp-rotate(${iconRotate})`
127
- }),
128
- ...core.makeStyle({
129
- c: core.getSingleColorVariable(iconColor)
130
- })
131
- }}"
132
- >
133
- ${iconSvg}
134
- </span>
135
- `)}
136
- ${core.RenderIf(!!text, core.template`
137
- <span
138
- class="${core.cls('gp-inline-flex gp-items-center gp-justify-center gp-flex-none', appendTypoClass)}"
139
- style="${{
140
- ...core.makeStyle({
141
- tt: styles?.transform
142
- }),
143
- ...appendTypoStyle,
144
- ...core.makeStyle({
145
- c: core.getSingleColorVariable(textColor)
146
- }),
147
- ...getStyleSpacing(textSpacing)
148
- }}"
149
- >
150
- ${text}
151
- </span>
152
- `)}
153
- ${Divider_liquid.default({
154
- config: getConfigLine(),
155
- fixedSide: 'right',
156
- className
157
- })}
158
- </div>
159
- </div>
160
- `;
161
- };
162
-
163
- exports.default = Line;
@@ -1,47 +0,0 @@
1
- import { makeStyle } from '@gem-sdk/core';
2
-
3
- const isShowModal = (startDate, numberOfDay = 0)=>{
4
- const start = startDate ? new Date(Number(startDate)) : new Date();
5
- const c = Date.now() - start.getTime();
6
- // Diff by day
7
- const diff = Math.abs(c / 24 / 60 / 60 / 1000);
8
- return diff >= numberOfDay;
9
- };
10
- const isMobile = (userAgent)=>{
11
- if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(userAgent)) {
12
- return true;
13
- } else {
14
- return false;
15
- }
16
- };
17
- const getPropertyByDevice = (property, device)=>{
18
- if (device === 'tablet') return property?.tablet ?? property?.desktop;
19
- if (device === 'mobile') return property?.mobile ?? property?.tablet ?? property?.desktop;
20
- return property?.desktop;
21
- };
22
- const heightStyle = (fullScreen, height)=>({
23
- ...fullScreen?.desktop ? makeStyle({
24
- h: '100%'
25
- }) : !height?.desktop ? makeStyle({
26
- minh: '300px'
27
- }) : makeStyle({
28
- h: height.desktop
29
- }),
30
- '--h-tablet': getPropertyByDevice(fullScreen, 'tablet') ? '100%' : getPropertyByDevice(height, 'tablet') ?? '300px',
31
- '--h-mobile': getPropertyByDevice(fullScreen, 'mobile') ? '100%' : getPropertyByDevice(height, 'mobile') ?? '300px',
32
- '--maxh': getPropertyByDevice(fullScreen, 'desktop') ? '100%' : '',
33
- '--maxh-tablet': getPropertyByDevice(fullScreen, 'tablet') ? '100%' : '',
34
- '--maxh-mobile': getPropertyByDevice(fullScreen, 'mobile') ? '100%' : ''
35
- });
36
- const removeHeightPercentForContent = (heightStyle)=>({
37
- ...heightStyle,
38
- '--h': heightStyle['--h']?.includes('%') ? '100%' : heightStyle['--h'],
39
- '--h-tablet': heightStyle['--h-tablet']?.includes('%') ? '100%' : heightStyle['--h-tablet'],
40
- '--h-mobile': heightStyle['--h-mobile']?.includes('%') ? '100%' : heightStyle['--h-mobile']
41
- });
42
- const inheritStyleBody = {
43
- 'border-radius': 'inherit'
44
- };
45
- const bodyDialogClass = 'gp-h-full gp-w-full gp-overflow-y-auto gp-overflow-x-hidden !gp-max-h-screen';
46
-
47
- export { bodyDialogClass, getPropertyByDevice, heightStyle, inheritStyleBody, isMobile, isShowModal, removeHeightPercentForContent };
@@ -1,19 +0,0 @@
1
- import { isEmptyChildren, template } from '@gem-sdk/core';
2
-
3
- const IconListItemHozLiquid = ({ children, builderAttrs })=>{
4
- if (isEmptyChildren(children)) {
5
- return '';
6
- }
7
- return template`
8
- <div
9
- ${{
10
- ...builderAttrs
11
- }}
12
- class="gp-flex gp-w-full gp-flex-col gp-items-center"
13
- >
14
- ${children}
15
- </div>
16
- `;
17
- };
18
-
19
- export { IconListItemHozLiquid as default };
@@ -1,31 +0,0 @@
1
- 'use client';
2
- import { jsx } from 'react/jsx-runtime';
3
- import { makeStyleResponsive, makeWidth, cls, makeStyle, getSingleColorVariable } from '@gem-sdk/core';
4
-
5
- const Divider = ({ className, fixedSide, config })=>{
6
- const wWidthFull = makeStyleResponsive('w', makeWidth(config.width));
7
- const thicknessToUnit = ()=>{
8
- return {
9
- desktop: config.thickness?.desktop ? `${config.thickness.desktop}px` : '1px',
10
- tablet: config.thickness?.desktop ? `${config.thickness.tablet}px` : '1px',
11
- mobile: config.thickness?.desktop ? `${config.thickness.mobile}px` : '1px'
12
- };
13
- };
14
- return /*#__PURE__*/ jsx("div", {
15
- className: cls({
16
- 'gp-hidden': config?.position === fixedSide,
17
- 'gp-flex': config?.position !== fixedSide
18
- }, className),
19
- style: {
20
- ...makeStyle({
21
- bc: getSingleColorVariable(config?.color)
22
- }),
23
- ...makeStyleResponsive('bs', config?.lineStyle),
24
- ...makeStyleResponsive('bbw', thicknessToUnit()),
25
- ...makeStyleResponsive('minw', config?.width),
26
- ...wWidthFull
27
- }
28
- });
29
- };
30
-
31
- export { Divider as default };
@@ -1,31 +0,0 @@
1
- import { makeStyleResponsive, makeWidth, template, cls, makeStyle, getSingleColorVariable } from '@gem-sdk/core';
2
-
3
- const Divider = ({ className, fixedSide, config })=>{
4
- const wWidthFull = makeStyleResponsive('w', makeWidth(config.width));
5
- const thicknessToUnit = ()=>{
6
- return {
7
- desktop: config.thickness?.desktop ? `${config.thickness.desktop}px` : '1px',
8
- tablet: config.thickness?.desktop ? `${config.thickness.tablet}px` : '1px',
9
- mobile: config.thickness?.desktop ? `${config.thickness.mobile}px` : '1px'
10
- };
11
- };
12
- return template`
13
- <div
14
- class="${cls({
15
- 'gp-hidden': config?.position === fixedSide,
16
- 'gp-flex': config?.position !== fixedSide
17
- }, className)}"
18
- style="${{
19
- ...wWidthFull,
20
- ...makeStyle({
21
- bc: getSingleColorVariable(config?.color)
22
- }),
23
- ...makeStyleResponsive('bs', config?.lineStyle),
24
- ...makeStyleResponsive('bbw', thicknessToUnit()),
25
- ...makeStyleResponsive('minw', config?.width)
26
- }}"
27
- ></div>
28
- `;
29
- };
30
-
31
- export { Divider as default };