zz-shopify-components 0.10.0 → 0.12.0

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.
@@ -107,15 +107,25 @@
107
107
  all: unset;
108
108
  cursor: pointer;
109
109
  position: absolute;
110
- top: 8px;
111
- right: 8px;
110
+ top: 20px;
111
+ right: 20px;
112
112
  width: 32px;
113
113
  height: 32px;
114
114
  border-radius: 9999px;
115
115
  display: grid;
116
116
  place-items: center;
117
117
  }
118
- .close-btn:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }
118
+ .close-btn-white {
119
+ color: white;
120
+ background-color: rgba(0,0,0,0.08);
121
+ backdrop-filter: blur(10px);
122
+ }
123
+ .close-btn-black {
124
+ color: white;
125
+ background-color: #333333;
126
+ /* backdrop-filter: blur(10px); */
127
+ }
128
+ .close-btn:focus-visible { outline: none; }
119
129
  `;
120
130
 
121
131
  const TEMPLATE = document.createElement('template');
@@ -151,6 +161,11 @@
151
161
  style.textContent = STYLE_TEXT;
152
162
  shadow.appendChild(style);
153
163
  shadow.appendChild(TEMPLATE.content.cloneNode(true));
164
+ const closeBtnColor = this.getAttribute('close-btn-color');
165
+ if (closeBtnColor) {
166
+ const closeBtn = shadow.querySelector('.close-btn');
167
+ closeBtn.classList.add(closeBtnColor);
168
+ }
154
169
 
155
170
  this._dialog = shadow.querySelector('dialog');
156
171
  this._panel = shadow.querySelector('.panel-inner');
@@ -465,8 +465,9 @@
465
465
  #shopify-block-{{ block.id }} .flex-layout-image {
466
466
  height: {{ block.settings.pc_fixed_height }}px;
467
467
  }
468
- #shopify-block-{{ block.id }} .flex-layout-image {
468
+ #shopify-block-{{ block.id }} .flex-layout-video {
469
469
  height: {{ block.settings.pc_fixed_height }}px;
470
+ object-fit: cover;
470
471
  }
471
472
  {% endif %}
472
473
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zz-shopify-components",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "description": "Reusable Shopify components for theme projects",
5
5
  "keywords": [
6
6
  "shopify",
@@ -99,7 +99,7 @@
99
99
  {% if show_header_edu %}
100
100
  <div class=' tw-max-w-[1660px] lg:tw-px-[20px] tw-w-full tw-mx-auto tw-h-full tw-flex tw-items-center tw-justify-left'>
101
101
  <span class='tw-cursor-default'
102
- ><a href='{{ shop.metafields.custom.edu_home_page.value.url }}'>
102
+ ><a href='{{ shop.metafields.custom.edu_collection_page.value.url }}'>
103
103
  {{- section.settings.edu_header_text -}}
104
104
  </a></span
105
105
  >
@@ -15,7 +15,7 @@
15
15
  }
16
16
  </style>
17
17
 
18
- <zz-modal {% 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 %}>
18
+ <zz-modal 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 %}>
19
19
  {% if section.settings.show_header %}
20
20
  <div slot="header" class="tw-text-[24px] tw-font-semibold">{{ section.settings.header_text }}</div>
21
21
  {% endif %}
@@ -49,6 +49,16 @@
49
49
  "id": "modal_id",
50
50
  "label": "弹窗id (必填)",
51
51
  "default": "demo-modal"
52
+ },
53
+ {
54
+ "type": "select",
55
+ "id": "close_btn_color",
56
+ "label": "关闭按钮颜色",
57
+ "default": "white",
58
+ "options": [
59
+ { "value": "white", "label": "白色" },
60
+ { "value": "black", "label": "黑色" }
61
+ ],
52
62
  },
53
63
  {
54
64
  "type": "checkbox",