zz-shopify-components 0.0.21 → 0.0.22

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 (73) hide show
  1. package/CHANGELOG.md +21 -21
  2. package/README.md +56 -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/blocks/zz-accessories-item.liquid +188 -188
  18. package/blocks/zz-accessories-swiper.liquid +223 -223
  19. package/blocks/zz-button.liquid +216 -216
  20. package/blocks/zz-content-description-html.liquid +201 -201
  21. package/blocks/zz-content-description.liquid +209 -209
  22. package/blocks/zz-flex-layout-bg-block.liquid +524 -524
  23. package/blocks/zz-flex-layout-block.liquid +548 -548
  24. package/blocks/zz-flex-layout-widget.liquid +321 -321
  25. package/blocks/zz-full-screen-swiper.liquid +447 -447
  26. package/blocks/zz-icon.liquid +46 -46
  27. package/blocks/zz-mail.liquid +135 -135
  28. package/blocks/zz-mb-swiper-pc-flex.liquid +273 -273
  29. package/blocks/zz-price-tag-mini.liquid +100 -106
  30. package/blocks/zz-price-tag.liquid +41 -41
  31. package/blocks/zz-ratio-image.liquid +181 -181
  32. package/blocks/zz-ratio-video.liquid +115 -115
  33. package/blocks/zz-responsive-width-image.liquid +222 -222
  34. package/blocks/zz-responsive-width-video.liquid +166 -166
  35. package/blocks/zz-scroll-animate-bg-text.liquid +268 -268
  36. package/blocks/zz-scroll-cover.liquid +67 -67
  37. package/blocks/zz-tag.liquid +50 -50
  38. package/blocks/zz-text.liquid +227 -227
  39. package/blocks/zz-title.liquid +287 -287
  40. package/blocks/zz-video-button.liquid +84 -84
  41. package/blocks/zz-video-swiper-perview-item.liquid +221 -221
  42. package/blocks/zz-video-swiper-perview.liquid +585 -585
  43. package/component.config.json +7 -7
  44. package/package.json +1 -1
  45. package/scripts/postinstall-v1.js +39 -39
  46. package/scripts/postinstall-v2.js +47 -47
  47. package/scripts/postinstall-v3.js +51 -51
  48. package/scripts/publish-npm.js +43 -43
  49. package/sections/zz-flex-layout-section.liquid +269 -269
  50. package/sections/zz-navigation-tab-v3.liquid +407 -407
  51. package/sections/zz-navigation-tab.liquid +411 -411
  52. package/sections/zz-shopping-card-list.liquid +399 -399
  53. package/sections/zz-video-collapse-swiper.liquid +522 -522
  54. package/sections/zz-video-tab-swiper.liquid +748 -748
  55. package/snippets/zz-button.liquid +70 -70
  56. package/snippets/zz-content-h3.liquid +15 -15
  57. package/snippets/zz-content-text.liquid +56 -56
  58. package/snippets/zz-h2.liquid +31 -31
  59. package/snippets/zz-h3.liquid +31 -31
  60. package/snippets/zz-h4.liquid +30 -30
  61. package/snippets/zz-h5.liquid +39 -39
  62. package/snippets/zz-h6.liquid +39 -39
  63. package/snippets/zz-icon-next.liquid +17 -17
  64. package/snippets/zz-icon-prev.liquid +17 -17
  65. package/snippets/zz-icon.liquid +74 -74
  66. package/snippets/zz-img.liquid +44 -44
  67. package/snippets/zz-prev-next-btn.liquid +62 -62
  68. package/snippets/zz-price-tag.liquid +22 -22
  69. package/snippets/zz-spoke.liquid +142 -142
  70. package/snippets/zz-tag.liquid +22 -22
  71. package/snippets/zz-video-button.liquid +54 -54
  72. package/snippets/zz-video-md.liquid +117 -117
  73. package/snippets/zz-video.liquid +117 -117
@@ -1,84 +1,84 @@
1
-
2
- {% schema %}
3
- {
4
- "name": "Video Button",
5
- "settings": [
6
- {
7
- "type": "text",
8
- "id": "text",
9
- "label": "按钮文字",
10
- "default": "按钮"
11
- },
12
- {
13
- "type": "video",
14
- "id": "video_pc",
15
- "label": "视频"
16
- },
17
- {
18
- "type": "image_picker",
19
- "id": "poster_pc",
20
- "label": "视频 封面"
21
- },
22
- {
23
- "type": "select",
24
- "id": "color",
25
- "label": "按钮颜色",
26
- "options": [
27
- {
28
- "value": "black",
29
- "label": "black"
30
- },
31
- {
32
- "value": "white",
33
- "label": "white"
34
- },
35
- {
36
- "value": "orange",
37
- "label": "orange"
38
- }
39
- ],
40
- "default": "white",
41
- },
42
- {
43
- "type": "select",
44
- "id": "size",
45
- "label": "按钮大小",
46
- "options": [
47
- {
48
- "value": "large",
49
- "label": "large"
50
- },
51
- {
52
- "value": "medium",
53
- "label": "medium"
54
- },
55
- {
56
- "value": "small",
57
- "label": "small"
58
- }
59
- ],
60
- "default": "medium"
61
- }
62
- ],
63
- "presets": [
64
- {
65
- "name": "Video Button"
66
- },
67
- {
68
- "name": "视频按钮",
69
- "settings": {
70
- "text": "watch video",
71
- }
72
- }
73
- ]
74
- }
75
- {% endschema %}
76
-
77
- {% render 'zz-video-button',
78
- video: block.settings.video_pc,
79
- poster: block.settings.poster_pc,
80
- color: block.settings.color,
81
- text: block.settings.text,
82
- size: block.settings.size
83
- %}
84
-
1
+
2
+ {% schema %}
3
+ {
4
+ "name": "Video Button",
5
+ "settings": [
6
+ {
7
+ "type": "text",
8
+ "id": "text",
9
+ "label": "按钮文字",
10
+ "default": "按钮"
11
+ },
12
+ {
13
+ "type": "video",
14
+ "id": "video_pc",
15
+ "label": "视频"
16
+ },
17
+ {
18
+ "type": "image_picker",
19
+ "id": "poster_pc",
20
+ "label": "视频 封面"
21
+ },
22
+ {
23
+ "type": "select",
24
+ "id": "color",
25
+ "label": "按钮颜色",
26
+ "options": [
27
+ {
28
+ "value": "black",
29
+ "label": "black"
30
+ },
31
+ {
32
+ "value": "white",
33
+ "label": "white"
34
+ },
35
+ {
36
+ "value": "orange",
37
+ "label": "orange"
38
+ }
39
+ ],
40
+ "default": "white",
41
+ },
42
+ {
43
+ "type": "select",
44
+ "id": "size",
45
+ "label": "按钮大小",
46
+ "options": [
47
+ {
48
+ "value": "large",
49
+ "label": "large"
50
+ },
51
+ {
52
+ "value": "medium",
53
+ "label": "medium"
54
+ },
55
+ {
56
+ "value": "small",
57
+ "label": "small"
58
+ }
59
+ ],
60
+ "default": "medium"
61
+ }
62
+ ],
63
+ "presets": [
64
+ {
65
+ "name": "Video Button"
66
+ },
67
+ {
68
+ "name": "视频按钮",
69
+ "settings": {
70
+ "text": "watch video",
71
+ }
72
+ }
73
+ ]
74
+ }
75
+ {% endschema %}
76
+
77
+ {% render 'zz-video-button',
78
+ video: block.settings.video_pc,
79
+ poster: block.settings.poster_pc,
80
+ color: block.settings.color,
81
+ text: block.settings.text,
82
+ size: block.settings.size
83
+ %}
84
+
@@ -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 %}