zz-shopify-components 0.0.27 → 0.0.28-beta.2

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 (83) hide show
  1. package/CHANGELOG.md +21 -21
  2. package/README.md +70 -56
  3. package/assets/ScrollTrigger.min.js +11 -11
  4. package/assets/gsap.min.js +11 -11
  5. package/assets/jquery.js +2 -2
  6. package/assets/lazy-video.js +2 -2
  7. package/assets/lazyload.min.js +1 -1
  8. package/assets/lozad.js +10 -10
  9. package/assets/site-jump.js +52 -52
  10. package/assets/site-jumpV2.js +35 -35
  11. package/assets/swiper-bundle.min.css +12 -12
  12. package/assets/swiper-bundle.min.js +13 -13
  13. package/assets/swiper.css +330 -330
  14. package/assets/zz-components.css +322 -322
  15. package/assets/zz-components.js +166 -166
  16. package/assets/zz-fade-in-content.js +169 -169
  17. package/assets/zz-http-request.js +73 -73
  18. package/assets/zz-world-video-comments-dialog.js +240 -240
  19. package/assets/zz-world-video-dialog.js +190 -190
  20. package/assets/zz-world-video-list.js +317 -317
  21. package/assets/zz-world-video.js +270 -270
  22. package/blocks/zz-accessories-item.liquid +188 -188
  23. package/blocks/zz-accessories-swiper.liquid +223 -223
  24. package/blocks/zz-button.liquid +216 -216
  25. package/blocks/zz-content-description-html.liquid +201 -201
  26. package/blocks/zz-content-description.liquid +209 -209
  27. package/blocks/zz-flex-layout-bg-block.liquid +524 -524
  28. package/blocks/zz-flex-layout-block.liquid +549 -549
  29. package/blocks/zz-flex-layout-widget.liquid +321 -321
  30. package/blocks/zz-full-screen-swiper.liquid +443 -443
  31. package/blocks/zz-icon.liquid +46 -46
  32. package/blocks/zz-mail.liquid +135 -135
  33. package/blocks/zz-mb-swiper-pc-flex.liquid +273 -273
  34. package/blocks/zz-price-tag-mini.liquid +106 -106
  35. package/blocks/zz-price-tag.liquid +41 -41
  36. package/blocks/zz-ratio-image.liquid +181 -181
  37. package/blocks/zz-ratio-video.liquid +115 -115
  38. package/blocks/zz-responsive-width-image.liquid +222 -222
  39. package/blocks/zz-responsive-width-video.liquid +166 -166
  40. package/blocks/zz-scroll-animate-bg-text.liquid +268 -268
  41. package/blocks/zz-scroll-cover.liquid +67 -67
  42. package/blocks/zz-tag.liquid +50 -50
  43. package/blocks/zz-text.liquid +227 -227
  44. package/blocks/zz-title.liquid +287 -287
  45. package/blocks/zz-video-button.liquid +84 -84
  46. package/blocks/zz-video-img-item.liquid +203 -203
  47. package/blocks/zz-video-img-list.liquid +166 -166
  48. package/blocks/zz-video-swiper-perview-item.liquid +221 -221
  49. package/blocks/zz-video-swiper-perview.liquid +585 -585
  50. package/blocks/zz-world-video.liquid +639 -639
  51. package/component.config.json +7 -7
  52. package/package.json +1 -1
  53. package/scripts/postinstall-v1.js +39 -39
  54. package/scripts/postinstall-v2.js +47 -47
  55. package/scripts/postinstall-v3.js +51 -51
  56. package/scripts/publish-npm.js +43 -43
  57. package/sections/zz-flex-layout-section.liquid +269 -269
  58. package/sections/zz-navigation-tab-v3.liquid +409 -409
  59. package/sections/zz-navigation-tab.liquid +411 -411
  60. package/sections/zz-shopping-card-list.liquid +399 -399
  61. package/sections/zz-video-collapse-swiper.liquid +522 -522
  62. package/sections/zz-video-tab-swiper.liquid +748 -748
  63. package/snippets/zz-button.liquid +70 -70
  64. package/snippets/zz-content-h3.liquid +15 -15
  65. package/snippets/zz-content-text.liquid +56 -56
  66. package/snippets/zz-h2.liquid +31 -31
  67. package/snippets/zz-h3.liquid +31 -31
  68. package/snippets/zz-h4.liquid +30 -30
  69. package/snippets/zz-h5.liquid +39 -39
  70. package/snippets/zz-h6.liquid +39 -39
  71. package/snippets/zz-icon-next.liquid +17 -17
  72. package/snippets/zz-icon-prev.liquid +17 -17
  73. package/snippets/zz-icon.liquid +74 -74
  74. package/snippets/zz-img-md.liquid +44 -44
  75. package/snippets/zz-img.liquid +44 -44
  76. package/snippets/zz-prev-next-blur-icon.liquid +36 -36
  77. package/snippets/zz-prev-next-btn.liquid +62 -62
  78. package/snippets/zz-price-tag.liquid +22 -22
  79. package/snippets/zz-spoke.liquid +142 -142
  80. package/snippets/zz-tag.liquid +22 -22
  81. package/snippets/zz-video-button.liquid +54 -54
  82. package/snippets/zz-video-md.liquid +117 -117
  83. package/snippets/zz-video.liquid +117 -117
@@ -1,166 +1,166 @@
1
- {% assign block_size = block.blocks.size %}
2
-
3
-
4
-
5
- <style>
6
- #shopify-block-{{block.id}} {
7
- background: {{ block.settings.bg_color }};
8
- width: 100%;
9
-
10
- box-sizing: border-box;
11
- overflow: hidden;
12
- position: relative;
13
- }
14
- #shopify-block-{{block.id}} .zz-video-img-list-swiper {
15
- width: 100%;
16
- box-sizing: border-box;
17
- overflow: hidden;
18
- height: fit-content;
19
- position: relative;
20
- letter-spacing: 0;
21
- }
22
-
23
-
24
- #shopify-block-{{block.id}} .swiper-button-next:after,
25
- #shopify-block-{{block.id}} .swiper-button-prev:after {
26
- display: none;
27
- }
28
-
29
- @media screen and (max-width: 750px) {
30
- #shopify-block-{{block.id}} .swiper-button-next,
31
- #shopify-block-{{block.id}} .swiper-button-prev {
32
- display: none;
33
- }
34
- }
35
- @media screen and (min-width: 750px) {
36
-
37
-
38
- #shopify-block-{{block.id}} .swiper-button-next,
39
- #shopify-block-{{block.id}} .swiper-button-prev {
40
- width: 48px;
41
- height: 48px;
42
- }
43
- #shopify-block-{{block.id}} .swiper-button-prev {
44
- left: 20px;
45
- top: 50%;
46
- right: unset;
47
- transform:translateY(-50%);
48
- }
49
- #shopify-block-{{block.id}} .swiper-button-next {
50
- right: 20px;
51
- left: unset;
52
- top: 50%;
53
- transform:translateY(-50%);
54
- }
55
- #shopify-block-{{block.id}} .swiper-button-next.swiper-button-disabled, #shopify-block-{{block.id}} .swiper-button-prev.swiper-button-disabled {
56
- display: none;
57
- }
58
-
59
- }
60
-
61
- </style>
62
-
63
-
64
-
65
- <div
66
- class='zz-video-img-list-swiper zz-video-img-list-swiper-{{ block.id }}'
67
- >
68
- <div class='zz-swiper-wrapper swiper-wrapper'>
69
- {% content_for 'blocks' %}
70
- </div>
71
-
72
- <!-- If we need navigation buttons -->
73
- <div class='swiper-button-prev {% if block_size <= 3 %} tw-hidden {% endif %} max-md:tw-hidden'>
74
-
75
- {% render 'zz-prev-next-blur-icon', type: 'prev', color_type: block.settings.prev_next_type %}
76
- </div>
77
- <div class='swiper-button-next {% if block_size <= 3 %} tw-hidden {% endif %} max-md:tw-hidden'>
78
- {% render 'zz-prev-next-blur-icon', type: 'next', color_type: block.settings.prev_next_type %}
79
- </div>
80
-
81
- </div>
82
-
83
- <script>
84
-
85
- document.addEventListener('DOMContentLoaded', function () {
86
- const videoNum = {{ block_size }};
87
- const block = document.getElementById(
88
- 'shopify-block-{{block.id}}'
89
- );
90
- let isDesktop = window.innerWidth > 750;
91
- const swiperWrapper = block.querySelector('.zz-swiper-wrapper');
92
- // 获取当前 swiper-wrapper 下面 所有 第一层 div
93
- const swiperSlides = swiperWrapper.querySelectorAll(':scope > div');
94
- // 给每个 swiper-slide 添加 class swiper-slide
95
- swiperSlides.forEach(slide => {
96
- slide.classList.add('swiper-slide');
97
- });
98
-
99
- const prevIcon = block.querySelector('.swiper-button-prev');
100
- const nextIcon = block.querySelector('.swiper-button-next');
101
-
102
- let progressTimer = null;
103
- const swiperClassName = '.zz-video-img-list-swiper-{{ block.id }}';
104
- const videoImgListSwiper = new Swiper(swiperClassName, {
105
- slidesPerView: "auto",
106
- initialSlide: isDesktop ? 1 : 0,
107
- centeredSlides: true,
108
- spaceBetween: isDesktop ? 24 : 8,
109
- navigation: {
110
- nextEl: '.swiper-button-next',
111
- prevEl: '.swiper-button-prev',
112
- },
113
- effect: 'slide',
114
- freeMode: isDesktop ? false : true,
115
- on: {
116
- slideChangeTransitionEnd: function (e) {
117
- console.log('slideChangeTransitionEnd', e.activeIndex);
118
- {% comment %} if (e.activeIndex < 1) {
119
- videoImgListSwiper.slideTo(videoNum - 1, 0);
120
- } else if(e.activeIndex > videoNum - 1) {
121
- videoImgListSwiper.slideTo(0, 0);
122
- } else {
123
-
124
- } {% endcomment %}
125
-
126
- },
127
- }
128
- });
129
- });
130
- </script>
131
-
132
- {% schema %}
133
- {
134
- "name": "Full Screen Swiper",
135
- "class": "zz-video-img-list-swiper-block",
136
- "settings": [
137
- {
138
- "type": "color",
139
- "id": "bg_color",
140
- "default": "#000000",
141
- "label": "背景色"
142
- },
143
-
144
- {
145
- "type": "select",
146
- "id": "prev_next_type",
147
- "label": "prev next 颜色",
148
- "options": [
149
- { "value": "dark", "label": "黑色" },
150
- { "value": "light", "label": "白色" },
151
- ],
152
- "default": "light"
153
- },
154
- ],
155
- "blocks": [
156
- {
157
- "type": "zz-video-img-item",
158
- }
159
- ],
160
- "presets": [
161
- {
162
- "name": "ZZ Video Img List",
163
- },
164
- ]
165
- }
166
- {% endschema %}
1
+ {% assign block_size = block.blocks.size %}
2
+
3
+
4
+
5
+ <style>
6
+ #shopify-block-{{block.id}} {
7
+ background: {{ block.settings.bg_color }};
8
+ width: 100%;
9
+
10
+ box-sizing: border-box;
11
+ overflow: hidden;
12
+ position: relative;
13
+ }
14
+ #shopify-block-{{block.id}} .zz-video-img-list-swiper {
15
+ width: 100%;
16
+ box-sizing: border-box;
17
+ overflow: hidden;
18
+ height: fit-content;
19
+ position: relative;
20
+ letter-spacing: 0;
21
+ }
22
+
23
+
24
+ #shopify-block-{{block.id}} .swiper-button-next:after,
25
+ #shopify-block-{{block.id}} .swiper-button-prev:after {
26
+ display: none;
27
+ }
28
+
29
+ @media screen and (max-width: 750px) {
30
+ #shopify-block-{{block.id}} .swiper-button-next,
31
+ #shopify-block-{{block.id}} .swiper-button-prev {
32
+ display: none;
33
+ }
34
+ }
35
+ @media screen and (min-width: 750px) {
36
+
37
+
38
+ #shopify-block-{{block.id}} .swiper-button-next,
39
+ #shopify-block-{{block.id}} .swiper-button-prev {
40
+ width: 48px;
41
+ height: 48px;
42
+ }
43
+ #shopify-block-{{block.id}} .swiper-button-prev {
44
+ left: 20px;
45
+ top: 50%;
46
+ right: unset;
47
+ transform:translateY(-50%);
48
+ }
49
+ #shopify-block-{{block.id}} .swiper-button-next {
50
+ right: 20px;
51
+ left: unset;
52
+ top: 50%;
53
+ transform:translateY(-50%);
54
+ }
55
+ #shopify-block-{{block.id}} .swiper-button-next.swiper-button-disabled, #shopify-block-{{block.id}} .swiper-button-prev.swiper-button-disabled {
56
+ display: none;
57
+ }
58
+
59
+ }
60
+
61
+ </style>
62
+
63
+
64
+
65
+ <div
66
+ class='zz-video-img-list-swiper zz-video-img-list-swiper-{{ block.id }}'
67
+ >
68
+ <div class='zz-swiper-wrapper swiper-wrapper'>
69
+ {% content_for 'blocks' %}
70
+ </div>
71
+
72
+ <!-- If we need navigation buttons -->
73
+ <div class='swiper-button-prev {% if block_size <= 3 %} tw-hidden {% endif %} max-md:tw-hidden'>
74
+
75
+ {% render 'zz-prev-next-blur-icon', type: 'prev', color_type: block.settings.prev_next_type %}
76
+ </div>
77
+ <div class='swiper-button-next {% if block_size <= 3 %} tw-hidden {% endif %} max-md:tw-hidden'>
78
+ {% render 'zz-prev-next-blur-icon', type: 'next', color_type: block.settings.prev_next_type %}
79
+ </div>
80
+
81
+ </div>
82
+
83
+ <script>
84
+
85
+ document.addEventListener('DOMContentLoaded', function () {
86
+ const videoNum = {{ block_size }};
87
+ const block = document.getElementById(
88
+ 'shopify-block-{{block.id}}'
89
+ );
90
+ let isDesktop = window.innerWidth > 750;
91
+ const swiperWrapper = block.querySelector('.zz-swiper-wrapper');
92
+ // 获取当前 swiper-wrapper 下面 所有 第一层 div
93
+ const swiperSlides = swiperWrapper.querySelectorAll(':scope > div');
94
+ // 给每个 swiper-slide 添加 class swiper-slide
95
+ swiperSlides.forEach(slide => {
96
+ slide.classList.add('swiper-slide');
97
+ });
98
+
99
+ const prevIcon = block.querySelector('.swiper-button-prev');
100
+ const nextIcon = block.querySelector('.swiper-button-next');
101
+
102
+ let progressTimer = null;
103
+ const swiperClassName = '.zz-video-img-list-swiper-{{ block.id }}';
104
+ const videoImgListSwiper = new Swiper(swiperClassName, {
105
+ slidesPerView: "auto",
106
+ initialSlide: isDesktop ? 1 : 0,
107
+ centeredSlides: true,
108
+ spaceBetween: isDesktop ? 24 : 8,
109
+ navigation: {
110
+ nextEl: '.swiper-button-next',
111
+ prevEl: '.swiper-button-prev',
112
+ },
113
+ effect: 'slide',
114
+ freeMode: isDesktop ? false : true,
115
+ on: {
116
+ slideChangeTransitionEnd: function (e) {
117
+ console.log('slideChangeTransitionEnd', e.activeIndex);
118
+ {% comment %} if (e.activeIndex < 1) {
119
+ videoImgListSwiper.slideTo(videoNum - 1, 0);
120
+ } else if(e.activeIndex > videoNum - 1) {
121
+ videoImgListSwiper.slideTo(0, 0);
122
+ } else {
123
+
124
+ } {% endcomment %}
125
+
126
+ },
127
+ }
128
+ });
129
+ });
130
+ </script>
131
+
132
+ {% schema %}
133
+ {
134
+ "name": "Full Screen Swiper",
135
+ "class": "zz-video-img-list-swiper-block",
136
+ "settings": [
137
+ {
138
+ "type": "color",
139
+ "id": "bg_color",
140
+ "default": "#000000",
141
+ "label": "背景色"
142
+ },
143
+
144
+ {
145
+ "type": "select",
146
+ "id": "prev_next_type",
147
+ "label": "prev next 颜色",
148
+ "options": [
149
+ { "value": "dark", "label": "黑色" },
150
+ { "value": "light", "label": "白色" },
151
+ ],
152
+ "default": "light"
153
+ },
154
+ ],
155
+ "blocks": [
156
+ {
157
+ "type": "zz-video-img-item",
158
+ }
159
+ ],
160
+ "presets": [
161
+ {
162
+ "name": "ZZ Video Img List",
163
+ },
164
+ ]
165
+ }
166
+ {% endschema %}