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

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.
@@ -69,7 +69,7 @@
69
69
  border-radius: var(--zz-modal-radius, 12px);
70
70
  box-shadow: var(--zz-modal-shadow, 0 20px 60px rgba(0,0,0,0.2));
71
71
  width: var(--zz-modal-width, min(720px, 92vw));
72
- max-height: var(--zz-modal-max-height, 90vh);
72
+ max-height: var(--zz-modal-max-height, 100vh);
73
73
  display: flex;
74
74
  flex-direction: column;
75
75
  overflow: hidden;
@@ -80,6 +80,7 @@
80
80
  .panel-inner {
81
81
  transform-origin: center center;
82
82
  transform: translateY(8px) scale(0.98);
83
+ max-height: var(--zz-modal-max-height, 85vh);
83
84
  }
84
85
  }
85
86
 
@@ -194,6 +195,11 @@
194
195
  this._closeBtn = shadow.querySelector('[data-zz-modal-close]');
195
196
  this._slotHeader = shadow.querySelector('slot[name="header"]');
196
197
  this._slotFooter = shadow.querySelector('slot[name="footer"]');
198
+ this._closeIconPath = shadow.querySelector('.close-btn svg path');
199
+
200
+ if (!this._closeIconPath) return;
201
+ const color = this.getAttribute('close-icon-color') || 'currentColor';
202
+ this._closeIconPath.setAttribute('stroke', color);
197
203
  }
198
204
 
199
205
  connectedCallback() {
@@ -36,11 +36,15 @@
36
36
  font-size: 14px;
37
37
  line-height: 1.25;
38
38
  background: #F5F5F6;
39
+ font-weight: 700;
40
+ white-space: nowrap;
41
+ color: #00000080;
39
42
  --tab-padding: 1.25rem;
40
43
  }
41
44
 
42
45
  #shopify-block-{{ block.id }} input.tw-daisy-tab:checked {
43
46
  border-color: #000;
47
+ color: #000;
44
48
  }
45
49
  </style>
46
50
 
@@ -33,7 +33,7 @@
33
33
  </div>
34
34
 
35
35
  <!-- 移动端 -->
36
- <div class=' tw-w-full tw-overflow-hidden tw-h-[62vh] tw-relative lg:tw-hidden'>
36
+ <div class=' tw-w-full tw-overflow-hidden tw-h-[77vh] tw-relative lg:tw-hidden'>
37
37
  <div
38
38
  role='tablist'
39
39
  class='tw-daisy-tabs tw-w-full tw-overflow-x-auto tw-daisy-tabs-bordered'
@@ -43,6 +43,7 @@
43
43
  </div>
44
44
 
45
45
  <style>
46
+
46
47
  #shopify-block-{{ block.id }} .tw-daisy-tabs-bordered .tw-daisy-tab {
47
48
  border-color: var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));
48
49
  --tw-border-opacity: 0.2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zz-shopify-components",
3
- "version": "0.25.1-beta.7",
3
+ "version": "0.25.1-beta.9",
4
4
  "description": "Reusable Shopify components for theme projects",
5
5
  "keywords": [
6
6
  "shopify",
@@ -22,6 +22,7 @@
22
22
  {% if section.settings.is_exposure != false %}
23
23
  data-track-zz-exposure="true"
24
24
  {% endif %}
25
+ close-icon-color="{{ section.settings.close_icon_color }}"
25
26
  close-btn-color="close-btn-{{ section.settings.close_btn_color }}" {% if section.settings.sheet_on_mobile %} sheet-on-mobile {% endif %} {% if section.settings.no_backdrop_close %} no-backdrop-close {% endif %} id="{{ section.settings.modal_id }}"{% unless section.settings.show_header %} no-header{% endunless %}{% unless section.settings.show_footer %} no-footer{% endunless %}>
26
27
  {% if section.settings.show_header %}
27
28
  <div slot="header" class="tw-text-[24px] tw-font-semibold">{{ section.settings.header_text }}</div>
@@ -74,6 +75,11 @@
74
75
  { "value": "white", "label": "白色" },
75
76
  { "value": "black", "label": "黑色" }
76
77
  ],
78
+ },
79
+ {
80
+ "type": "color",
81
+ "id": "close_icon_color",
82
+ "label": "叉叉颜色",
77
83
  },
78
84
  {
79
85
  "type": "checkbox",
@@ -119,6 +119,7 @@
119
119
  {% endunless %}
120
120
  {% endfor %}
121
121
  </div>
122
+ {% if section.settings.btn_text != blank %}
122
123
  <div class="tw-flex-shrink-0 tw-relative">
123
124
  <div class="cover-box tw-absolute tw-top-0 tw-left-[-50px] tw-w-[50px] tw-h-full">&nbsp;</div>
124
125
  {% render 'zz-button',
@@ -131,7 +132,7 @@
131
132
 
132
133
  %}
133
134
  </div>
134
-
135
+ {% endif %}
135
136
 
136
137
  </div>
137
138
  </div>