@shoper/phoenix_design_system 1.17.10-7 → 1.17.10-8

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.
@@ -293,12 +293,12 @@ exports.HSearch = class HSearch extends phoenix_light_lit_element.PhoenixLightLi
293
293
  }
294
294
  };
295
295
  this._updateShouldRenderAsPopup = () => {
296
- if (window.innerWidth > global_constants.BREAKPOINTS.sm && this.popup) {
297
- this._shouldRenderAsPopup = true;
298
- }
299
- else {
296
+ if (window.innerWidth < global_constants.BREAKPOINTS.sm) {
300
297
  this._shouldRenderAsPopup = false;
301
298
  }
299
+ else if (this.popup) {
300
+ this._shouldRenderAsPopup = true;
301
+ }
302
302
  };
303
303
  this._preventSubmitOnSearchClear = (ev) => {
304
304
  const $searchClear = this.querySelector(search_constants.SEARCH_COMPONENT_NAMES.clearButton);
@@ -324,7 +324,7 @@ exports.HSearch = class HSearch extends phoenix_light_lit_element.PhoenixLightLi
324
324
  }
325
325
  async connectedCallback() {
326
326
  super.connectedCallback();
327
- if (window.innerWidth > global_constants.BREAKPOINTS.sm && this.popup) {
327
+ if (window.innerWidth >= global_constants.BREAKPOINTS.sm && this.popup) {
328
328
  this._shouldRenderAsPopup = this.popup;
329
329
  }
330
330
  this._setupContext();
@@ -289,12 +289,12 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
289
289
  }
290
290
  };
291
291
  this._updateShouldRenderAsPopup = () => {
292
- if (window.innerWidth > BREAKPOINTS.sm && this.popup) {
293
- this._shouldRenderAsPopup = true;
294
- }
295
- else {
292
+ if (window.innerWidth < BREAKPOINTS.sm) {
296
293
  this._shouldRenderAsPopup = false;
297
294
  }
295
+ else if (this.popup) {
296
+ this._shouldRenderAsPopup = true;
297
+ }
298
298
  };
299
299
  this._preventSubmitOnSearchClear = (ev) => {
300
300
  const $searchClear = this.querySelector(SEARCH_COMPONENT_NAMES.clearButton);
@@ -320,7 +320,7 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
320
320
  }
321
321
  async connectedCallback() {
322
322
  super.connectedCallback();
323
- if (window.innerWidth > BREAKPOINTS.sm && this.popup) {
323
+ if (window.innerWidth >= BREAKPOINTS.sm && this.popup) {
324
324
  this._shouldRenderAsPopup = this.popup;
325
325
  }
326
326
  this._setupContext();
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@shoper/phoenix_design_system",
3
3
  "packageManager": "yarn@3.2.0",
4
4
  "sideEffects": false,
5
- "version": "1.17.10-7",
5
+ "version": "1.17.10-8",
6
6
  "description": "phoenix design system",
7
7
  "author": "zefirek",
8
8
  "license": "MIT",