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

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,221 +1,221 @@
1
- <style>
2
- @media screen and (max-width: 1023px) {
3
- #shopify-block-{{block.id}} {
4
- width: calc(100% - 40px);
5
- box-sizing: border-box;
6
- }
7
- #shopify-block-{{block.id}} .image-video-box {
8
- border-radius: 10px;
9
- }
10
- }
11
- @media screen and (min-width: 1024px) {
12
- #shopify-block-{{block.id}} {
13
- width: 83.3594vw;
14
- {% comment %} height: 46.875vw; {% endcomment %}
15
- }
16
- #shopify-block-{{block.id}} .image-video-box {
17
- border-radius: 16px;
18
- }
19
-
20
- }
21
- @media screen and (min-width: 1280px) {
22
- #shopify-block-{{block.id}} {
23
- width: 1067px;
24
- {% comment %} height: 600px; {% endcomment %}
25
- }
26
-
27
- }
28
- #shopify-block-{{block.id}} .media-box {
29
- {% if block.settings.has_link %}
30
- cursor: pointer;
31
- {% endif %}
32
- }
33
-
34
-
35
- #shopify-block-{{block.id}}.swiper-slide-active .active-box-content {
36
- display: block !important;
37
- }
38
- </style>
39
-
40
- {% assign media_class = 'zz-link-' | append: block.id %}
41
-
42
- <div class='media-box banner-item {{ media_class }}'>
43
- {% if block.settings.video_pc != blank %}
44
- {% if block.settings.video_url_pc != blank %}
45
- {% assign pc_video = block.settings.video_url_pc %}
46
- {% else %}
47
- {% assign pc_video = block.settings.video_pc %}
48
- {% endif %}
49
- {% render 'zz-video',
50
- pc_video: pc_video,
51
- pc_poster: block.settings.poster_pc,
52
- mb_video: block.settings.video_mb,
53
- mb_poster: block.settings.poster_mb,
54
- lazy: true,
55
- class: 'image-video-box tw-w-full tw-h-auto ',
56
- autoplay: false,
57
- muted: true
58
- %}
59
- {% else %}
60
- {%
61
- render 'zz-img',
62
- pc_image: block.settings.poster_pc,
63
- mb_image: block.settings.poster_mb,
64
- image_alt: block.settings.heading | escape,
65
- class_name: 'image-video-box',
66
- %}
67
- {% endif %}
68
- </div>
69
-
70
- <div class='slide-box {% if block.settings.has_title_and_content %} tw-pt-[20px] tw-h-[140px] lg:tw-pt-[48px] lg:tw-h-[178px] {% else %} tw-h-[25px] {% endif %} tw-box-border max-lg:tw-px-[15px] lg:tw-px-[10vw]'>
71
- <div class='active-box-content tw-hidden'>
72
- {% render 'zz-h5',
73
- title: block.settings.heading,
74
- title_color: block.settings.title_color,
75
- class_name: 'tw-text-center'
76
- %}
77
- <div class='tw-mt-[8px] lg:tw-mt-[16px]'>
78
- {% render 'zz-content-text',
79
- text: block.settings.row_content,
80
- mb_text: block.settings.row_content,
81
- pc_font_size: 16,
82
- mobile_font_size: 12,
83
- text_color: block.settings.content_color,
84
- class_name: 'tw-text-center'
85
- %}
86
- </div>
87
- </div>
88
- </div>
89
-
90
- {% schema %}
91
- {
92
- "name": "Video Swiper Preview Item",
93
- "class": "zz-video-swiper-preview-item",
94
- "settings": [
95
- {
96
- "type": "text",
97
- "id": "video_url_pc",
98
- "label": "Video url PC",
99
- "info": "使用cdn视频时,填写视频url。防止大屏幕视频模糊"
100
- },
101
- {
102
- "type": "video",
103
- "id": "video_pc",
104
- "label": "Video"
105
- },
106
- {
107
- "type": "image_picker",
108
- "id": "poster_pc",
109
- "label": "Poster"
110
- },
111
- {
112
- "type": "video",
113
- "id": "video_mb",
114
- "label": "Video(Mobile)"
115
- },
116
- {
117
- "type": "image_picker",
118
- "id": "poster_mb",
119
- "label": "Poster(Mobile)"
120
- },
121
- {
122
- "type": "checkbox",
123
- "id": "has_title_and_content",
124
- "label": "是否有标题与内容",
125
- "default": true
126
- },
127
- {
128
- "type": "text",
129
- "id": "heading",
130
- "label": "标题",
131
- "visible_if": "{{ block.settings.has_title_and_content == true }}"
132
- },
133
- {
134
- "type": "color",
135
- "id": "title_color",
136
- "default": "#000000",
137
- "label": "标题颜色",
138
- "visible_if": "{{ block.settings.has_title_and_content == true }}"
139
- },
140
- {
141
- "type": "richtext",
142
- "id": "row_content",
143
- "label": "description",
144
- "visible_if": "{{ block.settings.has_title_and_content == true }}"
145
- },
146
- {
147
- "type": "color",
148
- "id": "content_color",
149
- "default": "#B2B2B2",
150
- "label": "内容颜色",
151
- "visible_if": "{{ block.settings.has_title_and_content == true }}"
152
- },
153
- {
154
- "type": "checkbox",
155
- "id": "has_link",
156
- "label": "是否有链接",
157
- "default": false
158
- },
159
- {
160
- "type": "select",
161
- "id": "function_type",
162
- "label": "功能类型",
163
- "options": [
164
- {
165
- "value": "link",
166
- "label": "链接"
167
- },
168
- {
169
- "value": "link_map",
170
- "label": "多国家映射"
171
- }
172
- ],
173
- "default": "link",
174
- "visible_if": "{{ block.settings.has_link == true }}"
175
- },
176
- {
177
- "type": "url",
178
- "id": "url",
179
- "label": "链接",
180
- "visible_if": "{{ block.settings.function_type == 'link' and block.settings.has_link == true }}"
181
- },
182
- {
183
- "type": "textarea",
184
- "id": "links",
185
- "label": "Sites Link Map",
186
- "info": "国家对应链接的表,国家即是国家选择器上显示的字段,国家和路由之间用冒号隔开( 冒号后要加空格)。国家之间换行,“default”为其他未写的默认的链接 EG: Canada: https://hoverair.com/ default: https://hoverair.com/ ",
187
- "visible_if": "{{ block.settings.function_type == 'link_map' and block.settings.has_link == true }}"
188
- }
189
- ],
190
- "presets": [
191
- {
192
- "name": "Video Swiper Preview Item"
193
- },
194
- {
195
- "name": "可预览轮播图-Item"
196
- }
197
- ]
198
- }
199
- {% endschema %}
200
-
201
- {% if block.settings.has_link %}
202
- <script>
203
- document.addEventListener('DOMContentLoaded', (event) => {
204
- const btn = document.getElementsByClassName('{{ media_class }}')
205
- if(btn && btn[0]) {
206
- {% if block.settings.function_type == 'link_map' %}
207
- if(window.bindSiteJump) {
208
- bindSiteJump(btn[0], {{ block.settings.links | json }})
209
- }
210
- {% else %}
211
- // 监听点击事件
212
- btn[0].addEventListener('click', (event) => {
213
- event.preventDefault();
214
- window.location.href = '{{ block.settings.url }}';
215
- })
216
- {% endif %}
217
- }
218
-
219
- })
220
- </script>
221
- {% endif %}
1
+ <style>
2
+ @media screen and (max-width: 1023px) {
3
+ #shopify-block-{{block.id}} {
4
+ width: calc(100% - 40px);
5
+ box-sizing: border-box;
6
+ }
7
+ #shopify-block-{{block.id}} .image-video-box {
8
+ border-radius: 10px;
9
+ }
10
+ }
11
+ @media screen and (min-width: 1024px) {
12
+ #shopify-block-{{block.id}} {
13
+ width: 83.3594vw;
14
+ {% comment %} height: 46.875vw; {% endcomment %}
15
+ }
16
+ #shopify-block-{{block.id}} .image-video-box {
17
+ border-radius: 16px;
18
+ }
19
+
20
+ }
21
+ @media screen and (min-width: 1280px) {
22
+ #shopify-block-{{block.id}} {
23
+ width: 1067px;
24
+ {% comment %} height: 600px; {% endcomment %}
25
+ }
26
+
27
+ }
28
+ #shopify-block-{{block.id}} .media-box {
29
+ {% if block.settings.has_link %}
30
+ cursor: pointer;
31
+ {% endif %}
32
+ }
33
+
34
+
35
+ #shopify-block-{{block.id}}.swiper-slide-active .active-box-content {
36
+ display: block !important;
37
+ }
38
+ </style>
39
+
40
+ {% assign media_class = 'zz-link-' | append: block.id %}
41
+
42
+ <div class='media-box banner-item {{ media_class }}'>
43
+ {% if block.settings.video_pc != blank %}
44
+ {% if block.settings.video_url_pc != blank %}
45
+ {% assign pc_video = block.settings.video_url_pc %}
46
+ {% else %}
47
+ {% assign pc_video = block.settings.video_pc %}
48
+ {% endif %}
49
+ {% render 'zz-video',
50
+ pc_video: pc_video,
51
+ pc_poster: block.settings.poster_pc,
52
+ mb_video: block.settings.video_mb,
53
+ mb_poster: block.settings.poster_mb,
54
+ lazy: true,
55
+ class: 'image-video-box tw-w-full tw-h-auto ',
56
+ autoplay: false,
57
+ muted: true
58
+ %}
59
+ {% else %}
60
+ {%
61
+ render 'zz-img',
62
+ pc_image: block.settings.poster_pc,
63
+ mb_image: block.settings.poster_mb,
64
+ image_alt: block.settings.heading | escape,
65
+ class_name: 'image-video-box',
66
+ %}
67
+ {% endif %}
68
+ </div>
69
+
70
+ <div class='slide-box {% if block.settings.has_title_and_content %} tw-pt-[20px] tw-h-[140px] lg:tw-pt-[48px] lg:tw-h-[178px] {% else %} tw-h-[25px] {% endif %} tw-box-border max-lg:tw-px-[15px] lg:tw-px-[10vw]'>
71
+ <div class='active-box-content tw-hidden'>
72
+ {% render 'zz-h5',
73
+ title: block.settings.heading,
74
+ title_color: block.settings.title_color,
75
+ class_name: 'tw-text-center'
76
+ %}
77
+ <div class='tw-mt-[8px] lg:tw-mt-[16px]'>
78
+ {% render 'zz-content-text',
79
+ text: block.settings.row_content,
80
+ mb_text: block.settings.row_content,
81
+ pc_font_size: 16,
82
+ mobile_font_size: 12,
83
+ text_color: block.settings.content_color,
84
+ class_name: 'tw-text-center'
85
+ %}
86
+ </div>
87
+ </div>
88
+ </div>
89
+
90
+ {% schema %}
91
+ {
92
+ "name": "Video Swiper Preview Item",
93
+ "class": "zz-video-swiper-preview-item",
94
+ "settings": [
95
+ {
96
+ "type": "text",
97
+ "id": "video_url_pc",
98
+ "label": "Video url PC",
99
+ "info": "使用cdn视频时,填写视频url。防止大屏幕视频模糊"
100
+ },
101
+ {
102
+ "type": "video",
103
+ "id": "video_pc",
104
+ "label": "Video"
105
+ },
106
+ {
107
+ "type": "image_picker",
108
+ "id": "poster_pc",
109
+ "label": "Poster"
110
+ },
111
+ {
112
+ "type": "video",
113
+ "id": "video_mb",
114
+ "label": "Video(Mobile)"
115
+ },
116
+ {
117
+ "type": "image_picker",
118
+ "id": "poster_mb",
119
+ "label": "Poster(Mobile)"
120
+ },
121
+ {
122
+ "type": "checkbox",
123
+ "id": "has_title_and_content",
124
+ "label": "是否有标题与内容",
125
+ "default": true
126
+ },
127
+ {
128
+ "type": "text",
129
+ "id": "heading",
130
+ "label": "标题",
131
+ "visible_if": "{{ block.settings.has_title_and_content == true }}"
132
+ },
133
+ {
134
+ "type": "color",
135
+ "id": "title_color",
136
+ "default": "#000000",
137
+ "label": "标题颜色",
138
+ "visible_if": "{{ block.settings.has_title_and_content == true }}"
139
+ },
140
+ {
141
+ "type": "richtext",
142
+ "id": "row_content",
143
+ "label": "description",
144
+ "visible_if": "{{ block.settings.has_title_and_content == true }}"
145
+ },
146
+ {
147
+ "type": "color",
148
+ "id": "content_color",
149
+ "default": "#B2B2B2",
150
+ "label": "内容颜色",
151
+ "visible_if": "{{ block.settings.has_title_and_content == true }}"
152
+ },
153
+ {
154
+ "type": "checkbox",
155
+ "id": "has_link",
156
+ "label": "是否有链接",
157
+ "default": false
158
+ },
159
+ {
160
+ "type": "select",
161
+ "id": "function_type",
162
+ "label": "功能类型",
163
+ "options": [
164
+ {
165
+ "value": "link",
166
+ "label": "链接"
167
+ },
168
+ {
169
+ "value": "link_map",
170
+ "label": "多国家映射"
171
+ }
172
+ ],
173
+ "default": "link",
174
+ "visible_if": "{{ block.settings.has_link == true }}"
175
+ },
176
+ {
177
+ "type": "url",
178
+ "id": "url",
179
+ "label": "链接",
180
+ "visible_if": "{{ block.settings.function_type == 'link' and block.settings.has_link == true }}"
181
+ },
182
+ {
183
+ "type": "textarea",
184
+ "id": "links",
185
+ "label": "Sites Link Map",
186
+ "info": "国家对应链接的表,国家即是国家选择器上显示的字段,国家和路由之间用冒号隔开( 冒号后要加空格)。国家之间换行,“default”为其他未写的默认的链接 EG: Canada: https://hoverair.com/ default: https://hoverair.com/ ",
187
+ "visible_if": "{{ block.settings.function_type == 'link_map' and block.settings.has_link == true }}"
188
+ }
189
+ ],
190
+ "presets": [
191
+ {
192
+ "name": "Video Swiper Preview Item"
193
+ },
194
+ {
195
+ "name": "可预览轮播图-Item"
196
+ }
197
+ ]
198
+ }
199
+ {% endschema %}
200
+
201
+ {% if block.settings.has_link %}
202
+ <script>
203
+ document.addEventListener('DOMContentLoaded', (event) => {
204
+ const btn = document.getElementsByClassName('{{ media_class }}')
205
+ if(btn && btn[0]) {
206
+ {% if block.settings.function_type == 'link_map' %}
207
+ if(window.bindSiteJump) {
208
+ bindSiteJump(btn[0], {{ block.settings.links | json }})
209
+ }
210
+ {% else %}
211
+ // 监听点击事件
212
+ btn[0].addEventListener('click', (event) => {
213
+ event.preventDefault();
214
+ window.location.href = '{{ block.settings.url }}';
215
+ })
216
+ {% endif %}
217
+ }
218
+
219
+ })
220
+ </script>
221
+ {% endif %}