@gem-sdk/components 2.0.0-dev.693 → 2.0.0-dev.695

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 (176) hide show
  1. package/dist/cjs/builder.js +6 -12
  2. package/dist/cjs/index.js +32 -34
  3. package/dist/cjs/index.liquid.js +10 -16
  4. package/dist/cjs/next.js +1 -3
  5. package/dist/cjs/product/components/ProductImagesV2/common/common.js +2 -1
  6. package/dist/cjs/product/index.js +4 -6
  7. package/dist/cjs/product/next.js +0 -4
  8. package/dist/cjs/setting.js +76 -78
  9. package/dist/esm/builder.js +0 -6
  10. package/dist/esm/index.js +0 -1
  11. package/dist/esm/index.liquid.js +0 -3
  12. package/dist/esm/next.js +1 -3
  13. package/dist/esm/product/components/ProductImagesV2/common/common.js +2 -1
  14. package/dist/esm/product/index.js +24 -26
  15. package/dist/esm/product/next.js +0 -4
  16. package/dist/esm/setting.js +0 -2
  17. package/dist/types/index.d.ts +116 -551
  18. package/package.json +4 -4
  19. package/dist/cjs/product/components/ProductImagesV3/common/common.js +0 -360
  20. package/dist/cjs/product/components/ProductImagesV3/common/getAttr.js +0 -192
  21. package/dist/cjs/product/components/ProductImagesV3/common/getBorderActiveCss.js +0 -26
  22. package/dist/cjs/product/components/ProductImagesV3/common/getClasses.js +0 -94
  23. package/dist/cjs/product/components/ProductImagesV3/common/getStyle.js +0 -303
  24. package/dist/cjs/product/components/ProductImagesV3/common/hoverAction.js +0 -95
  25. package/dist/cjs/product/components/ProductImagesV3/common/productFeaturedImage.js +0 -59
  26. package/dist/cjs/product/components/ProductImagesV3/common/productGallery.js +0 -266
  27. package/dist/cjs/product/components/ProductImagesV3/components/child/MediaIcon.js +0 -63
  28. package/dist/cjs/product/components/ProductImagesV3/components/child/ProductFeatureVideo.js +0 -36
  29. package/dist/cjs/product/components/ProductImagesV3/components/child/ProductFeaturedImageCarousel.js +0 -109
  30. package/dist/cjs/product/components/ProductImagesV3/components/child/ProductFeaturedImageOnly.js +0 -139
  31. package/dist/cjs/product/components/ProductImagesV3/components/child/ProductGalleryGrid.js +0 -100
  32. package/dist/cjs/product/components/ProductImagesV3/components/feature-gallery/FeatureImageWithGallery.js +0 -77
  33. package/dist/cjs/product/components/ProductImagesV3/components/feature-gallery/FeatureImageWithGallery.liquid.js +0 -300
  34. package/dist/cjs/product/components/ProductImagesV3/components/feature-only/OnlyFeatureImage.js +0 -44
  35. package/dist/cjs/product/components/ProductImagesV3/components/gallery-carousel/GalleryCarousel.js +0 -83
  36. package/dist/cjs/product/components/ProductImagesV3/components/gallery-carousel/GalleryCarousel.liquid.js +0 -182
  37. package/dist/cjs/product/components/ProductImagesV3/components/gallery-grid/GalleryGrid.js +0 -30
  38. package/dist/cjs/product/components/ProductImagesV3/components/gallery-grid/GalleryGrid.liquid.js +0 -239
  39. package/dist/cjs/product/components/ProductImagesV3/components/lightbox/ButtonOpenLightBox.js +0 -28
  40. package/dist/cjs/product/components/ProductImagesV3/components/lightbox/ProductImagesLightBox.js +0 -144
  41. package/dist/cjs/product/components/ProductImagesV3/composables/getProductImagesAttr.js +0 -14
  42. package/dist/cjs/product/components/ProductImagesV3/composables/getProductImagesClassName.js +0 -54
  43. package/dist/cjs/product/components/ProductImagesV3/composables/getProductImagesStyles.js +0 -53
  44. package/dist/cjs/product/components/ProductImagesV3/hooks/useFeatureImageWithGallery.js +0 -55
  45. package/dist/cjs/product/components/ProductImagesV3/hooks/useFilterImagesByVariant.js +0 -41
  46. package/dist/cjs/product/components/ProductImagesV3/hooks/useGalleryCarousel.js +0 -134
  47. package/dist/cjs/product/components/ProductImagesV3/hooks/useProductFeaturedImageCarousel.js +0 -203
  48. package/dist/cjs/product/components/ProductImagesV3/hooks/useProductGalleryGrid.js +0 -87
  49. package/dist/cjs/product/components/ProductImagesV3/index.js +0 -291
  50. package/dist/cjs/product/components/ProductImagesV3/index.liquid.js +0 -153
  51. package/dist/cjs/product/setting/product-image-v3/ProductFeatureImage.js +0 -252
  52. package/dist/cjs/product/setting/product-image-v3/ProductGalleryImage.js +0 -251
  53. package/dist/cjs/product/setting/product-image-v3/ProductImages.js +0 -74
  54. package/dist/cjs/product/setting/product-image-v3/configs/setting-v2/ProductFeatureImage.js +0 -388
  55. package/dist/cjs/product/setting/product-image-v3/configs/setting-v2/ProductGalleryImage.js +0 -519
  56. package/dist/cjs/product/setting/product-image-v3/configs/setting-v2/index.js +0 -337
  57. package/dist/cjs/product/setting/product-image-v3/configs/ui/FeatureNavigation.js +0 -118
  58. package/dist/cjs/product/setting/product-image-v3/configs/ui/ImageListNavigation.js +0 -119
  59. package/dist/cjs/product/setting/product-image-v3/configs/uiV1.js +0 -237
  60. package/dist/cjs/product/setting/product-image-v3/configs/uiV2.js +0 -491
  61. package/dist/cjs/swiper-carousel/arrow/Arrow.js +0 -52
  62. package/dist/cjs/swiper-carousel/arrow/Arrow.liquid.js +0 -46
  63. package/dist/cjs/swiper-carousel/arrow/common/common.js +0 -119
  64. package/dist/cjs/swiper-carousel/arrow/common/getClass.js +0 -50
  65. package/dist/cjs/swiper-carousel/arrow/common/getStyle.js +0 -84
  66. package/dist/cjs/swiper-carousel/carousel-item/SwiperItem.js +0 -34
  67. package/dist/cjs/swiper-carousel/carousel-item/SwiperItem.liquid.js +0 -38
  68. package/dist/cjs/swiper-carousel/carousel-item/common/getClass.js +0 -29
  69. package/dist/cjs/swiper-carousel/carousel-item/common/getStyle.js +0 -79
  70. package/dist/cjs/swiper-carousel/carousel-item/hook/useCarouseItem.js +0 -22
  71. package/dist/cjs/swiper-carousel/components/common/carousel.js +0 -98
  72. package/dist/cjs/swiper-carousel/components/const/index.js +0 -5
  73. package/dist/cjs/swiper-carousel/components/hooks/useTrackPreviewPause.js +0 -34
  74. package/dist/cjs/swiper-carousel/components/plugins/AnimationPlugin.js +0 -42
  75. package/dist/cjs/swiper-carousel/components/plugins/AutoPlayPlugin.js +0 -105
  76. package/dist/cjs/swiper-carousel/components/plugins/FixSliderMoveBackwards.js +0 -15
  77. package/dist/cjs/swiper-carousel/components/plugins/MutationPlugin.js +0 -45
  78. package/dist/cjs/swiper-carousel/dots/Dots.js +0 -51
  79. package/dist/cjs/swiper-carousel/dots/Dots.liquid.js +0 -26
  80. package/dist/cjs/swiper-carousel/dots/common/common.js +0 -28
  81. package/dist/cjs/swiper-carousel/dots/common/getClass.js +0 -40
  82. package/dist/cjs/swiper-carousel/dots/common/getStyle.js +0 -33
  83. package/dist/cjs/swiper-carousel/dots/hook/useDotsSetting.js +0 -21
  84. package/dist/cjs/swiper-carousel/index.js +0 -17
  85. package/dist/cjs/swiper-carousel/next.js +0 -22
  86. package/dist/cjs/swiper-carousel/root/Swiper.js +0 -128
  87. package/dist/cjs/swiper-carousel/root/Swiper.liquid.js +0 -104
  88. package/dist/cjs/swiper-carousel/root/common/getAttr.js +0 -25
  89. package/dist/cjs/swiper-carousel/root/common/getClass.js +0 -135
  90. package/dist/cjs/swiper-carousel/root/common/getData.js +0 -56
  91. package/dist/cjs/swiper-carousel/root/common/getStyle.js +0 -66
  92. package/dist/cjs/swiper-carousel/root/hook/useCarousel.js +0 -482
  93. package/dist/cjs/swiper-carousel/setting/Swiper.js +0 -42
  94. package/dist/cjs/swiper-carousel/setting/SwiperItem.js +0 -40
  95. package/dist/cjs/swiper-carousel/setting/configs/presets.js +0 -87
  96. package/dist/cjs/swiper-carousel/setting/configs/settingV2.js +0 -822
  97. package/dist/cjs/swiper-carousel/setting/configs/uiV2.js +0 -718
  98. package/dist/esm/product/components/ProductImagesV3/common/common.js +0 -344
  99. package/dist/esm/product/components/ProductImagesV3/common/getAttr.js +0 -189
  100. package/dist/esm/product/components/ProductImagesV3/common/getBorderActiveCss.js +0 -24
  101. package/dist/esm/product/components/ProductImagesV3/common/getClasses.js +0 -83
  102. package/dist/esm/product/components/ProductImagesV3/common/getStyle.js +0 -292
  103. package/dist/esm/product/components/ProductImagesV3/common/hoverAction.js +0 -92
  104. package/dist/esm/product/components/ProductImagesV3/common/productFeaturedImage.js +0 -53
  105. package/dist/esm/product/components/ProductImagesV3/common/productGallery.js +0 -251
  106. package/dist/esm/product/components/ProductImagesV3/components/child/MediaIcon.js +0 -59
  107. package/dist/esm/product/components/ProductImagesV3/components/child/ProductFeatureVideo.js +0 -32
  108. package/dist/esm/product/components/ProductImagesV3/components/child/ProductFeaturedImageCarousel.js +0 -105
  109. package/dist/esm/product/components/ProductImagesV3/components/child/ProductFeaturedImageOnly.js +0 -135
  110. package/dist/esm/product/components/ProductImagesV3/components/child/ProductGalleryGrid.js +0 -96
  111. package/dist/esm/product/components/ProductImagesV3/components/feature-gallery/FeatureImageWithGallery.js +0 -73
  112. package/dist/esm/product/components/ProductImagesV3/components/feature-gallery/FeatureImageWithGallery.liquid.js +0 -296
  113. package/dist/esm/product/components/ProductImagesV3/components/feature-only/OnlyFeatureImage.js +0 -40
  114. package/dist/esm/product/components/ProductImagesV3/components/gallery-carousel/GalleryCarousel.js +0 -79
  115. package/dist/esm/product/components/ProductImagesV3/components/gallery-carousel/GalleryCarousel.liquid.js +0 -178
  116. package/dist/esm/product/components/ProductImagesV3/components/gallery-grid/GalleryGrid.js +0 -26
  117. package/dist/esm/product/components/ProductImagesV3/components/gallery-grid/GalleryGrid.liquid.js +0 -235
  118. package/dist/esm/product/components/ProductImagesV3/components/lightbox/ButtonOpenLightBox.js +0 -24
  119. package/dist/esm/product/components/ProductImagesV3/components/lightbox/ProductImagesLightBox.js +0 -140
  120. package/dist/esm/product/components/ProductImagesV3/composables/getProductImagesAttr.js +0 -12
  121. package/dist/esm/product/components/ProductImagesV3/composables/getProductImagesClassName.js +0 -52
  122. package/dist/esm/product/components/ProductImagesV3/composables/getProductImagesStyles.js +0 -51
  123. package/dist/esm/product/components/ProductImagesV3/hooks/useFeatureImageWithGallery.js +0 -53
  124. package/dist/esm/product/components/ProductImagesV3/hooks/useFilterImagesByVariant.js +0 -39
  125. package/dist/esm/product/components/ProductImagesV3/hooks/useGalleryCarousel.js +0 -132
  126. package/dist/esm/product/components/ProductImagesV3/hooks/useProductFeaturedImageCarousel.js +0 -201
  127. package/dist/esm/product/components/ProductImagesV3/hooks/useProductGalleryGrid.js +0 -85
  128. package/dist/esm/product/components/ProductImagesV3/index.js +0 -287
  129. package/dist/esm/product/components/ProductImagesV3/index.liquid.js +0 -149
  130. package/dist/esm/product/setting/product-image-v3/ProductFeatureImage.js +0 -248
  131. package/dist/esm/product/setting/product-image-v3/ProductGalleryImage.js +0 -248
  132. package/dist/esm/product/setting/product-image-v3/ProductImages.js +0 -70
  133. package/dist/esm/product/setting/product-image-v3/configs/setting-v2/ProductFeatureImage.js +0 -384
  134. package/dist/esm/product/setting/product-image-v3/configs/setting-v2/ProductGalleryImage.js +0 -516
  135. package/dist/esm/product/setting/product-image-v3/configs/setting-v2/index.js +0 -335
  136. package/dist/esm/product/setting/product-image-v3/configs/ui/FeatureNavigation.js +0 -116
  137. package/dist/esm/product/setting/product-image-v3/configs/ui/ImageListNavigation.js +0 -117
  138. package/dist/esm/product/setting/product-image-v3/configs/uiV1.js +0 -235
  139. package/dist/esm/product/setting/product-image-v3/configs/uiV2.js +0 -489
  140. package/dist/esm/swiper-carousel/arrow/Arrow.js +0 -48
  141. package/dist/esm/swiper-carousel/arrow/Arrow.liquid.js +0 -42
  142. package/dist/esm/swiper-carousel/arrow/common/common.js +0 -111
  143. package/dist/esm/swiper-carousel/arrow/common/getClass.js +0 -48
  144. package/dist/esm/swiper-carousel/arrow/common/getStyle.js +0 -82
  145. package/dist/esm/swiper-carousel/carousel-item/SwiperItem.js +0 -30
  146. package/dist/esm/swiper-carousel/carousel-item/SwiperItem.liquid.js +0 -34
  147. package/dist/esm/swiper-carousel/carousel-item/common/getClass.js +0 -27
  148. package/dist/esm/swiper-carousel/carousel-item/common/getStyle.js +0 -77
  149. package/dist/esm/swiper-carousel/carousel-item/hook/useCarouseItem.js +0 -20
  150. package/dist/esm/swiper-carousel/components/common/carousel.js +0 -93
  151. package/dist/esm/swiper-carousel/components/const/index.js +0 -3
  152. package/dist/esm/swiper-carousel/components/hooks/useTrackPreviewPause.js +0 -30
  153. package/dist/esm/swiper-carousel/components/plugins/AnimationPlugin.js +0 -35
  154. package/dist/esm/swiper-carousel/components/plugins/AutoPlayPlugin.js +0 -103
  155. package/dist/esm/swiper-carousel/components/plugins/FixSliderMoveBackwards.js +0 -13
  156. package/dist/esm/swiper-carousel/components/plugins/MutationPlugin.js +0 -43
  157. package/dist/esm/swiper-carousel/dots/Dots.js +0 -47
  158. package/dist/esm/swiper-carousel/dots/Dots.liquid.js +0 -22
  159. package/dist/esm/swiper-carousel/dots/common/common.js +0 -26
  160. package/dist/esm/swiper-carousel/dots/common/getClass.js +0 -38
  161. package/dist/esm/swiper-carousel/dots/common/getStyle.js +0 -31
  162. package/dist/esm/swiper-carousel/dots/hook/useDotsSetting.js +0 -19
  163. package/dist/esm/swiper-carousel/index.js +0 -15
  164. package/dist/esm/swiper-carousel/next.js +0 -18
  165. package/dist/esm/swiper-carousel/root/Swiper.js +0 -124
  166. package/dist/esm/swiper-carousel/root/Swiper.liquid.js +0 -100
  167. package/dist/esm/swiper-carousel/root/common/getAttr.js +0 -23
  168. package/dist/esm/swiper-carousel/root/common/getClass.js +0 -133
  169. package/dist/esm/swiper-carousel/root/common/getData.js +0 -54
  170. package/dist/esm/swiper-carousel/root/common/getStyle.js +0 -64
  171. package/dist/esm/swiper-carousel/root/hook/useCarousel.js +0 -480
  172. package/dist/esm/swiper-carousel/setting/Swiper.js +0 -38
  173. package/dist/esm/swiper-carousel/setting/SwiperItem.js +0 -36
  174. package/dist/esm/swiper-carousel/setting/configs/presets.js +0 -85
  175. package/dist/esm/swiper-carousel/setting/configs/settingV2.js +0 -818
  176. package/dist/esm/swiper-carousel/setting/configs/uiV2.js +0 -713
@@ -1,135 +0,0 @@
1
- 'use strict';
2
-
3
- var core = require('@gem-sdk/core');
4
- var system = require('@gem-sdk/system');
5
- var getData = require('./getData.js');
6
-
7
- const getClass = (props)=>{
8
- const DEVICES = [
9
- 'mobile',
10
- 'tablet',
11
- 'desktop'
12
- ];
13
- const { setting, builderProps, wrapperClass, rootClass, advanced, fullHeight, slidesClass } = props;
14
- const { sliderSelector } = getData.getData(props);
15
- const getDisplayOfWrapper = ()=>{
16
- let result = {};
17
- DEVICES.forEach((device)=>{
18
- const devicePrefix = device === 'desktop' ? '' : `${device}:`;
19
- result = {
20
- ...result,
21
- [`${devicePrefix}gp-flex`]: setting?.vertical?.[device],
22
- [`${devicePrefix}gp-block`]: !setting?.vertical?.[device]
23
- };
24
- });
25
- return result;
26
- };
27
- const getWrapperInnerHeight = ()=>{
28
- let result = {};
29
- DEVICES.forEach((device)=>{
30
- const devicePrefix = device === 'desktop' ? '' : `${device}:`;
31
- result = {
32
- ...result,
33
- [`${devicePrefix}gp-h-full`]: setting?.vertical?.[device],
34
- [`${devicePrefix}gp-flex-1`]: setting?.vertical?.[device]
35
- };
36
- });
37
- return result;
38
- };
39
- const makeFlexColClass = ()=>{
40
- let result = {};
41
- DEVICES.forEach((device)=>{
42
- const devicePrefix = device === 'desktop' ? '' : `${device}:`;
43
- result = {
44
- ...result,
45
- [`${devicePrefix}!gp-flex-col`]: setting?.vertical?.[device],
46
- [`${devicePrefix}!gp-flex-row`]: !setting?.vertical?.[device]
47
- };
48
- });
49
- return result;
50
- };
51
- const makeVerticalWrapClass = ()=>{
52
- let result = {};
53
- DEVICES.forEach((device)=>{
54
- const devicePrefix = device === 'desktop' ? '' : `${device}:`;
55
- if (setting?.vertical?.[device]) {
56
- result = {
57
- ...result,
58
- [`${devicePrefix}!gp-flex-wrap`]: setting?.vertical?.[device]
59
- };
60
- } else {
61
- result = {
62
- ...result,
63
- [`${devicePrefix}!gp-flex-nowrap`]: !setting?.vertical?.[device]
64
- };
65
- }
66
- });
67
- return result;
68
- };
69
- const makeVerticalMinHeightClass = ()=>{
70
- let result = {};
71
- DEVICES.forEach((device)=>{
72
- const devicePrefix = device === 'desktop' ? '' : `${device}:`;
73
- if (setting?.vertical?.[device]) {
74
- result = {
75
- ...result,
76
- [`${devicePrefix}!gp-min-h-0`]: setting?.vertical?.[device]
77
- };
78
- } else {
79
- result = {
80
- ...result,
81
- [`${devicePrefix}!gp-min-h-full`]: !setting?.vertical?.[device]
82
- };
83
- }
84
- });
85
- return result;
86
- };
87
- const wrapperClassRender = system.createClass({
88
- ...builderProps?.uid && {
89
- [builderProps.uid]: true
90
- },
91
- ...wrapperClass && {
92
- [wrapperClass]: true
93
- },
94
- 'gp-relative gp-my-0 tablet:gp-px-0 gp-max-w-full mobile:gp-px-0 gp-carousel-wrapper': true,
95
- '!gp-flex': core.getResponsiveValueByScreen(setting?.vertical, 'desktop'),
96
- 'tablet:!gp-flex': core.getResponsiveValueByScreen(setting?.vertical, 'tablet'),
97
- 'mobile:!gp-flex': core.getResponsiveValueByScreen(setting?.vertical, 'mobile'),
98
- ...getDisplayOfWrapper()
99
- });
100
- const wrapperInnerClass = system.createClass({
101
- 'gp-relative gp-overflow-hidden gp-flex gp-items-center gp-justify-between': true,
102
- '!gp-h-full': fullHeight,
103
- ...getWrapperInnerHeight(),
104
- ...makeFlexColClass()
105
- });
106
- const rootClassRender = system.createClass({
107
- 'gp-group/carousel gp-w-full gp-flex': true,
108
- '!gp-flex-col': core.getResponsiveValueByScreen(setting?.vertical, 'desktop'),
109
- 'tablet:!flex-col': core.getResponsiveValueByScreen(setting?.vertical, 'tablet'),
110
- 'mobile:!flex-col': core.getResponsiveValueByScreen(setting?.vertical, 'mobile'),
111
- ...rootClass && {
112
- [rootClass]: true
113
- },
114
- ...advanced?.cssClass && {
115
- [advanced.cssClass]: true
116
- }
117
- });
118
- const sliderClass = system.createClass({
119
- 'gp-swiper-wrapper gp-flex gp-h-full gp-select-none': true,
120
- [sliderSelector]: true,
121
- ...slidesClass && {
122
- [slidesClass]: true
123
- },
124
- ...makeVerticalWrapClass(),
125
- ...makeVerticalMinHeightClass()
126
- });
127
- return {
128
- rootClassRender,
129
- wrapperClassRender,
130
- wrapperInnerClass,
131
- sliderClass
132
- };
133
- };
134
-
135
- exports.getClass = getClass;
@@ -1,56 +0,0 @@
1
- 'use strict';
2
-
3
- var core = require('@gem-sdk/core');
4
- var system = require('@gem-sdk/system');
5
-
6
- const getData = (props)=>{
7
- const DEVICES = [
8
- 'mobile',
9
- 'tablet',
10
- 'desktop'
11
- ];
12
- const { setting, rootId, builderProps, styles, moveToIdx, isHiddenArrowWhenDisabled } = props;
13
- const uniqueComponentId = rootId ?? builderProps?.uid;
14
- const sliderSelector = `gp-carousel-slider-${builderProps?.uid}`;
15
- const { enableAction = {
16
- desktop: true
17
- }, navigationStyle, navigationEnable = {
18
- desktop: true
19
- } } = setting ?? {};
20
- const getLoopSetting = ()=>{
21
- let result = setting?.loop;
22
- DEVICES.forEach((device)=>{
23
- result = {
24
- ...result,
25
- [device]: core.getResponsiveValueByScreen(enableAction) ? result?.[device] : false
26
- };
27
- });
28
- return result;
29
- };
30
- const getArrowType = ()=>{
31
- let result = navigationStyle;
32
- DEVICES.forEach((device)=>{
33
- result = {
34
- ...result,
35
- [device]: core.getResponsiveValueByScreen(navigationEnable, device) ? result?.[device] : 'none'
36
- };
37
- });
38
- return result;
39
- };
40
- const stateData = system.createStateOrContext({
41
- id: uniqueComponentId,
42
- moveToIdx,
43
- isHiddenArrowWhenDisabled,
44
- setting,
45
- styles
46
- });
47
- return {
48
- loopConfig: getLoopSetting(),
49
- stateData: JSON.stringify(stateData).replaceAll("'", '''),
50
- uniqueComponentId,
51
- arrowShowConfig: getArrowType(),
52
- sliderSelector
53
- };
54
- };
55
-
56
- exports.getData = getData;
@@ -1,66 +0,0 @@
1
- 'use strict';
2
-
3
- var core = require('@gem-sdk/core');
4
- var system = require('@gem-sdk/system');
5
-
6
- const getStyle = (props)=>{
7
- const DEVICES = [
8
- 'mobile',
9
- 'tablet',
10
- 'desktop'
11
- ];
12
- const { styles, setting, style, rootStyles } = props;
13
- const { arrowGapToEachSide = '16' } = setting ?? {};
14
- const styleHeight = core.makeStyleResponsive('h', core.getHeightByShapeGlobalSize(styles?.sizeSetting));
15
- const styleWidth = core.makeStyleWithDefault('w', core.getWidthByShapeGlobalSize(styles?.sizeSetting, true), {
16
- desktop: '--g-ct-w',
17
- tablet: '--g-ct-w',
18
- mobile: '--g-ct-w'
19
- });
20
- const makeSpacing = ()=>{
21
- let result = {};
22
- DEVICES.forEach((device)=>{
23
- const isVertical = core.getResponsiveValueByScreen(setting?.vertical, device);
24
- const spacing = core.getResponsiveValueByScreen(styles?.spacing, device);
25
- const key = isVertical ? `--rg${device !== 'desktop' ? `-${device}` : ''}` : `--cg${device !== 'desktop' ? `-${device}` : ''}`;
26
- result = {
27
- ...result,
28
- [key]: `${spacing ?? 0}px`
29
- };
30
- });
31
- return result;
32
- };
33
- const wrapperStyleRender = system.createStyle({
34
- ...style,
35
- ...styleHeight,
36
- ...styleWidth,
37
- ...core.getBgByDevice({
38
- backgroundColor: styles?.backgroundColor,
39
- backgroundImage: styles?.backgroundImage
40
- })
41
- });
42
- const wrapperInnerStyle = system.createStyle({
43
- ...core.makeContainerWidthOrHeight({
44
- vertical: setting?.vertical,
45
- dotStyle: setting?.dotStyle
46
- }),
47
- gap: arrowGapToEachSide + 'px'
48
- });
49
- const rootStyleRender = system.createStyle({
50
- ...core.makeStyleResponsive('jc', styles?.align),
51
- ...rootStyles
52
- });
53
- const sliderStyle = system.createStyle({
54
- ...styleWidth,
55
- ...styleHeight,
56
- ...makeSpacing()
57
- });
58
- return {
59
- rootStyleRender,
60
- wrapperStyleRender,
61
- wrapperInnerStyle,
62
- sliderStyle
63
- };
64
- };
65
-
66
- exports.getStyle = getStyle;