@shoper/phoenix_design_system 1.6.6-1 → 1.6.7

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.
@@ -88,25 +88,6 @@ exports.HModal = HModal_1 = class HModal extends phoenix_light_lit_element.Phoen
88
88
  await (modalToClose === null || modalToClose === void 0 ? void 0 : modalToClose.close());
89
89
  }
90
90
  };
91
- this.open = async () => {
92
- return new Promise((resolve) => {
93
- var _a;
94
- this[modal_constants.MODAL_OPENED_PROP] = true;
95
- (_a = this._contentRef.value) === null || _a === void 0 ? void 0 : _a.classList.add(`modal_visible`, `modal_show-${this.transition}-start`);
96
- window.requestAnimationFrame(() => {
97
- setTimeout(() => {
98
- var _a;
99
- (_a = this._contentRef.value) === null || _a === void 0 ? void 0 : _a.classList.add(`modal_show-${this.transition}-end`);
100
- }, 0);
101
- const transitionDuration = parseFloat(getComputedStyle(this._contentRef.value || this).transitionDuration) * 1000;
102
- setTimeout(() => {
103
- var _a;
104
- (_a = this._contentRef.value) === null || _a === void 0 ? void 0 : _a.classList.remove(`modal_show-${this.transition}-start`, `modal_show-${this.transition}-end`);
105
- resolve();
106
- }, transitionDuration);
107
- });
108
- });
109
- };
110
91
  this.close = async () => {
111
92
  return new Promise((resolve) => {
112
93
  const transitionDuration = parseFloat(getComputedStyle(this._contentRef.value || this).transitionDuration) * 1000;
@@ -161,6 +142,25 @@ exports.HModal = HModal_1 = class HModal extends phoenix_light_lit_element.Phoen
161
142
  this._propsChangeStrategies[modal_constants.MODAL_OPENED_PROP][String(this[modal_constants.MODAL_OPENED_PROP])]();
162
143
  }
163
144
  }
145
+ async open() {
146
+ return new Promise((resolve) => {
147
+ var _a;
148
+ this[modal_constants.MODAL_OPENED_PROP] = true;
149
+ (_a = this._contentRef.value) === null || _a === void 0 ? void 0 : _a.classList.add(`modal_visible`, `modal_show-${this.transition}-start`);
150
+ window.requestAnimationFrame(() => {
151
+ setTimeout(() => {
152
+ var _a;
153
+ (_a = this._contentRef.value) === null || _a === void 0 ? void 0 : _a.classList.add(`modal_show-${this.transition}-end`);
154
+ }, 0);
155
+ const transitionDuration = parseFloat(getComputedStyle(this._contentRef.value || this).transitionDuration) * 1000;
156
+ setTimeout(() => {
157
+ var _a;
158
+ (_a = this._contentRef.value) === null || _a === void 0 ? void 0 : _a.classList.remove(`modal_show-${this.transition}-start`, `modal_show-${this.transition}-end`);
159
+ resolve();
160
+ }, transitionDuration);
161
+ });
162
+ });
163
+ }
164
164
  _dispatchModalOpenedEvent() {
165
165
  const openModalEvent = new CustomEvent(modal_constants.MODAL_EVENTS.opened, {
166
166
  bubbles: true
@@ -24,7 +24,7 @@ export declare class HModal extends PhoenixLightLitElement {
24
24
  private _keepFocusWithinModal;
25
25
  private _handleCloseFromCloseComponent;
26
26
  private _bindCloseOnEsc;
27
- open: () => Promise<void>;
27
+ open(): Promise<void>;
28
28
  private _dispatchModalOpenedEvent;
29
29
  close: () => Promise<void>;
30
30
  private _dispatchModalClosedEvent;
@@ -84,25 +84,6 @@ let HModal = HModal_1 = class HModal extends PhoenixLightLitElement {
84
84
  await (modalToClose === null || modalToClose === void 0 ? void 0 : modalToClose.close());
85
85
  }
86
86
  };
87
- this.open = async () => {
88
- return new Promise((resolve) => {
89
- var _a;
90
- this[MODAL_OPENED_PROP] = true;
91
- (_a = this._contentRef.value) === null || _a === void 0 ? void 0 : _a.classList.add(`modal_visible`, `modal_show-${this.transition}-start`);
92
- window.requestAnimationFrame(() => {
93
- setTimeout(() => {
94
- var _a;
95
- (_a = this._contentRef.value) === null || _a === void 0 ? void 0 : _a.classList.add(`modal_show-${this.transition}-end`);
96
- }, 0);
97
- const transitionDuration = parseFloat(getComputedStyle(this._contentRef.value || this).transitionDuration) * 1000;
98
- setTimeout(() => {
99
- var _a;
100
- (_a = this._contentRef.value) === null || _a === void 0 ? void 0 : _a.classList.remove(`modal_show-${this.transition}-start`, `modal_show-${this.transition}-end`);
101
- resolve();
102
- }, transitionDuration);
103
- });
104
- });
105
- };
106
87
  this.close = async () => {
107
88
  return new Promise((resolve) => {
108
89
  const transitionDuration = parseFloat(getComputedStyle(this._contentRef.value || this).transitionDuration) * 1000;
@@ -157,6 +138,25 @@ let HModal = HModal_1 = class HModal extends PhoenixLightLitElement {
157
138
  this._propsChangeStrategies[MODAL_OPENED_PROP][String(this[MODAL_OPENED_PROP])]();
158
139
  }
159
140
  }
141
+ async open() {
142
+ return new Promise((resolve) => {
143
+ var _a;
144
+ this[MODAL_OPENED_PROP] = true;
145
+ (_a = this._contentRef.value) === null || _a === void 0 ? void 0 : _a.classList.add(`modal_visible`, `modal_show-${this.transition}-start`);
146
+ window.requestAnimationFrame(() => {
147
+ setTimeout(() => {
148
+ var _a;
149
+ (_a = this._contentRef.value) === null || _a === void 0 ? void 0 : _a.classList.add(`modal_show-${this.transition}-end`);
150
+ }, 0);
151
+ const transitionDuration = parseFloat(getComputedStyle(this._contentRef.value || this).transitionDuration) * 1000;
152
+ setTimeout(() => {
153
+ var _a;
154
+ (_a = this._contentRef.value) === null || _a === void 0 ? void 0 : _a.classList.remove(`modal_show-${this.transition}-start`, `modal_show-${this.transition}-end`);
155
+ resolve();
156
+ }, transitionDuration);
157
+ });
158
+ });
159
+ }
160
160
  _dispatchModalOpenedEvent() {
161
161
  const openModalEvent = new CustomEvent(MODAL_EVENTS.opened, {
162
162
  bubbles: true
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.6.6-1",
5
+ "version": "1.6.7",
6
6
  "description": "phoenix design system",
7
7
  "author": "zefirek",
8
8
  "license": "MIT",