zz-shopify-components 0.25.1-beta.5 → 0.25.1-beta.7

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.
@@ -1,47 +1,67 @@
1
1
  {% schema %}
2
- {
3
- "name": "Compare Tab Item",
4
- "settings": [
5
- {
6
- "type": "text",
7
- "id": "title",
8
- "label": "Tab标题"
9
- },
10
- {
11
- "type": "image_picker",
12
- "id": "image",
13
- "label": "图片"
14
- },
15
- ],
16
- "presets": [
17
- {
18
- "name": "Compare Tab Item",
19
- "settings": {
20
- }
21
- }
22
- ]
23
- }
2
+ {
3
+ "name": "Compare Tab Item",
4
+ "settings": [
5
+ {
6
+ "type": "text",
7
+ "id": "title",
8
+ "label": "Tab标题"
9
+ },
10
+ {
11
+ "type": "image_picker",
12
+ "id": "image",
13
+ "label": "图片"
14
+ },
15
+ {
16
+ "type": "checkbox",
17
+ "id": "default",
18
+ "label": "默认选中",
19
+ "default": false
20
+ }
21
+ ],
22
+ "presets": [
23
+ {
24
+ "name": "Compare Tab Item",
25
+ "settings": {}
26
+ }
27
+ ]
28
+ }
24
29
  {% endschema %}
25
30
  <style>
26
- #shopify-block-{{ block.id }} {
27
- display: contents;
31
+ #shopify-block-{{ block.id }} {
32
+ display: contents;
33
+ }
34
+ #shopify-block-{{ block.id }} .tw-daisy-tab {
35
+ padding: 12px 28px;
36
+ font-size: 14px;
37
+ line-height: 1.25;
38
+ background: #F5F5F6;
39
+ --tab-padding: 1.25rem;
40
+ }
41
+
42
+ #shopify-block-{{ block.id }} input.tw-daisy-tab:checked {
43
+ border-color: #000;
28
44
  }
29
- #shopify-block-{{ block.id }} .tw-daisy-tab {
30
- padding: 12px 28px;
31
- font-size: 14px;
32
- line-height: 1.25;
33
- background: #F5F5F6;
34
- --tab-padding: 1.25rem;
35
- }
36
45
  </style>
37
46
 
38
47
  <input
39
- type="radio"
40
- name="my_tabs_1"
41
- role="tab"
42
- class="tw-daisy-tab"
43
- aria-label="{{ block.settings.title }}"
44
- checked="checked" />
45
- <div role="tabpanel" class="tw-daisy-tab-content tw-w-full tw-top-[100px] tw-absolute">
46
- <img src="{{ block.settings.image | image_url }}" alt="{{ block.settings.title }}" class=" tw-w-[100%]" />
47
- </div>
48
+ type='radio'
49
+ name='my_tabs_1'
50
+ role='tab'
51
+ class='tw-daisy-tab'
52
+ aria-label='{{ block.settings.title }}'
53
+ {% if block.settings.default %}
54
+ checked='checked'
55
+ {% endif %}
56
+ >
57
+
58
+ <div
59
+ role='tabpanel'
60
+ class='tw-daisy-tab-content tw-absolute tw-bottom-0 tw-top-[46px] tw-w-full tw-overflow-y-auto '
61
+ >
62
+ <img
63
+ src='{{ block.settings.image | image_url: width: 2000 }}'
64
+ alt='{{ block.settings.title }}'
65
+ class=' tw-w-full '
66
+ >
67
+ </div>
@@ -1,39 +1,49 @@
1
1
  {% schema %}
2
- {
3
- "name": "Bundle Compare",
4
- "class": "zz-bundle-compare",
5
- "settings": [
6
- {
7
- "type": "image_picker",
8
- "id": "pc_image",
9
- "label": "PC端图片"
10
- },
11
- ],
12
- "blocks": [
13
- {
14
- "type": "zz-bundle-compare-item",
15
- }
16
- ],
17
- "presets": [
18
- {
19
- "name": "Bundle Compare",
20
- "settings": {
21
- }
22
- }
23
- ]
24
- }
2
+ {
3
+ "name": "Bundle Compare",
4
+ "class": "zz-bundle-compare",
5
+ "settings": [
6
+ {
7
+ "type": "image_picker",
8
+ "id": "pc_image",
9
+ "label": "PC端图片"
10
+ }
11
+ ],
12
+ "blocks": [
13
+ {
14
+ "type": "zz-bundle-compare-item"
15
+ }
16
+ ],
17
+ "presets": [
18
+ {
19
+ "name": "Bundle Compare",
20
+ "settings": {}
21
+ }
22
+ ]
23
+ }
25
24
  {% endschema %}
26
25
 
27
- <div class=" tw-relative tw-h-[85vh]">
28
- <div role="tablist" class="tw-daisy-tabs tw-w-full tw-daisy-tabs-bordered tw-overflow-x-auto">
29
- {% content_for 'blocks' %}
26
+ <!-- PC端 -->
27
+ <div class=' max-lg:tw-hidden'>
28
+ {{
29
+ block.settings.pc_image
30
+ | image_url: width: 4000
31
+ | image_tag: sizes: '100vw', widths: '4000, 5000', alt: 'Bundle Compare'
32
+ }}
30
33
  </div>
31
- </div>
32
-
33
34
 
35
+ <!-- 移动端 -->
36
+ <div class=' tw-w-full tw-overflow-hidden tw-h-[62vh] tw-relative lg:tw-hidden'>
37
+ <div
38
+ role='tablist'
39
+ class='tw-daisy-tabs tw-w-full tw-overflow-x-auto tw-daisy-tabs-bordered'
40
+ >
41
+ {% content_for 'blocks' %}
42
+ </div>
43
+ </div>
34
44
 
35
45
  <style>
36
- .tw-daisy-tabs-bordered .tw-daisy-tab {
46
+ #shopify-block-{{ block.id }} .tw-daisy-tabs-bordered .tw-daisy-tab {
37
47
  border-color: var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));
38
48
  --tw-border-opacity: 0.2;
39
49
  border-style: solid;
@@ -48,6 +58,4 @@
48
58
  #shopify-block-{{ block.id }} .tw-daisy-tabs.tw-overflow-x-auto::-webkit-scrollbar {
49
59
  display: none; /* Chrome、Safari */
50
60
  }
51
-
52
-
53
- </style>
61
+ </style>
@@ -217,6 +217,12 @@
217
217
  </style>
218
218
 
219
219
  <div
220
+ {% if block.settings.module_id != blank %}
221
+ data-track-zz-block="{{ block.settings.module_id }}"
222
+ {% endif %}
223
+ {% if block.settings.is_exposure != false %}
224
+ data-track-zz-exposure="true"
225
+ {% endif %}
220
226
  class='zz-video-swiper-preview zz-video-swiper-preview-{{ block.id }}'
221
227
  >
222
228
  <div class='swiper-wrapper'>
@@ -552,7 +558,24 @@
552
558
  { "value": "bottom", "label": "底部" },
553
559
  ],
554
560
  "default": "bottom",
555
- }
561
+ },
562
+ {
563
+ "type": "header",
564
+ "content": "统计相关"
565
+ },
566
+ {
567
+ "type": "text",
568
+ "id": "module_id",
569
+ "label": "唯一业务id",
570
+ "info": "需要唯一不要与其他模块重复,用户定位、埋点统计、代码隐藏控制等"
571
+ },
572
+ {
573
+ "type": "checkbox",
574
+ "id": "is_exposure",
575
+ "label": "是否曝光统计",
576
+ "default": false,
577
+ "info": "勾选后会对Block模块进行曝光统计埋点, 必须填写唯一业务id"
578
+ },
556
579
  ],
557
580
  "blocks": [
558
581
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zz-shopify-components",
3
- "version": "0.25.1-beta.5",
3
+ "version": "0.25.1-beta.7",
4
4
  "description": "Reusable Shopify components for theme projects",
5
5
  "keywords": [
6
6
  "shopify",