zz-shopify-components 0.22.1-beta.1 → 0.22.1-beta.2

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.
@@ -208,8 +208,7 @@
208
208
 
209
209
  // Reflect open state if attribute present at mount
210
210
  if (this.hasAttribute('open')) {
211
- // Defer to ensure upgraded before open
212
- queueMicrotask(() => this.show());
211
+ queueMicrotask(() => this._openInternal(false));
213
212
  }
214
213
 
215
214
  // Auto hide empty header/footer
@@ -343,11 +342,11 @@
343
342
  modal_type: this.getAttribute('data-modal-type') || 'default',
344
343
  time_open: this._getTimeOpen()
345
344
  });
346
-
347
- this._lastTriggerSource = null;
348
- this._lastCloseMethod = null;
349
- this._openTimestamp = null;
350
345
  }
346
+
347
+ this._lastTriggerSource = null;
348
+ this._lastCloseMethod = null;
349
+ this._openTimestamp = null;
351
350
  }
352
351
 
353
352
  _onKeydown(e) {
@@ -381,7 +380,8 @@
381
380
 
382
381
  _onNativeClose() {
383
382
  // Ensure attribute sync and cleanup
384
- this._closeInternal(true);
383
+ const shouldEmit = this.hasAttribute('open');
384
+ this._closeInternal(shouldEmit);
385
385
  }
386
386
 
387
387
  _onMouseDown(e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zz-shopify-components",
3
- "version": "0.22.1-beta.1",
3
+ "version": "0.22.1-beta.2",
4
4
  "description": "Reusable Shopify components for theme projects",
5
5
  "keywords": [
6
6
  "shopify",