zz-shopify-components 0.25.1-beta.8 → 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.
@@ -80,7 +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, 100vh);
83
+ max-height: var(--zz-modal-max-height, 85vh);
84
84
  }
85
85
  }
86
86
 
@@ -195,6 +195,11 @@
195
195
  this._closeBtn = shadow.querySelector('[data-zz-modal-close]');
196
196
  this._slotHeader = shadow.querySelector('slot[name="header"]');
197
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);
198
203
  }
199
204
 
200
205
  connectedCallback() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zz-shopify-components",
3
- "version": "0.25.1-beta.8",
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>