@shoper/phoenix_design_system 1.3.11 → 1.3.13
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.
- package/build/cjs/packages/phoenix/src/components/form/select/select.js +1 -1
- package/build/cjs/packages/phoenix/src/components/scroll_to/scroll_to.js +3 -3
- package/build/esm/packages/phoenix/src/components/form/select/select.js +1 -1
- package/build/esm/packages/phoenix/src/components/scroll_to/scroll_to.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/scroll_to/scroll_to.js +3 -3
- package/package.json +1 -1
|
@@ -262,7 +262,7 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
262
262
|
${ref_js.ref(this._$dropdown)}
|
|
263
263
|
@dropdown.showed=${() => (this.opened = true)}
|
|
264
264
|
@dropdown.hidden=${this._handleDropdownHidden}
|
|
265
|
-
name="${this.controlName}
|
|
265
|
+
name="${this.controlName}"
|
|
266
266
|
offset=${this.offset}
|
|
267
267
|
content-width="full"
|
|
268
268
|
>
|
|
@@ -12,13 +12,13 @@ exports.HScrollTo = class HScrollTo extends phoenix_light_lit_element.PhoenixLig
|
|
|
12
12
|
constructor() {
|
|
13
13
|
super();
|
|
14
14
|
this.to = '';
|
|
15
|
-
this.
|
|
15
|
+
this.behavior = 'smooth';
|
|
16
16
|
this.scrollToElement = () => {
|
|
17
17
|
const $scrollTo = document.querySelector(`[data-scroll="${this.to}"]`);
|
|
18
18
|
if ($scrollTo) {
|
|
19
19
|
const elTopPosition = $scrollTo.getBoundingClientRect().top;
|
|
20
20
|
requestAnimationFrame(() => {
|
|
21
|
-
window.scrollTo({ top: elTopPosition + window.scrollY, behavior: this.
|
|
21
|
+
window.scrollTo({ top: elTopPosition + window.scrollY, behavior: this.behavior });
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
};
|
|
@@ -36,7 +36,7 @@ tslib_es6.__decorate([
|
|
|
36
36
|
tslib_es6.__decorate([
|
|
37
37
|
decorators.property({ type: String }),
|
|
38
38
|
tslib_es6.__metadata("design:type", String)
|
|
39
|
-
], exports.HScrollTo.prototype, "
|
|
39
|
+
], exports.HScrollTo.prototype, "behavior", void 0);
|
|
40
40
|
exports.HScrollTo = tslib_es6.__decorate([
|
|
41
41
|
phoenix_custom_element.phoenixCustomElement('h-scroll-to'),
|
|
42
42
|
tslib_es6.__metadata("design:paramtypes", [])
|
|
@@ -258,7 +258,7 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
|
|
|
258
258
|
${ref(this._$dropdown)}
|
|
259
259
|
@dropdown.showed=${() => (this.opened = true)}
|
|
260
260
|
@dropdown.hidden=${this._handleDropdownHidden}
|
|
261
|
-
name="${this.controlName}
|
|
261
|
+
name="${this.controlName}"
|
|
262
262
|
offset=${this.offset}
|
|
263
263
|
content-width="full"
|
|
264
264
|
>
|
|
@@ -2,7 +2,7 @@ import { IHScrollTo } from './scroll_to_types';
|
|
|
2
2
|
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
3
3
|
export declare class HScrollTo extends PhoenixLightLitElement implements IHScrollTo {
|
|
4
4
|
to: string;
|
|
5
|
-
|
|
5
|
+
behavior: ScrollBehavior;
|
|
6
6
|
private _btnController;
|
|
7
7
|
constructor();
|
|
8
8
|
connectedCallback(): void;
|
|
@@ -8,13 +8,13 @@ let HScrollTo = class HScrollTo extends PhoenixLightLitElement {
|
|
|
8
8
|
constructor() {
|
|
9
9
|
super();
|
|
10
10
|
this.to = '';
|
|
11
|
-
this.
|
|
11
|
+
this.behavior = 'smooth';
|
|
12
12
|
this.scrollToElement = () => {
|
|
13
13
|
const $scrollTo = document.querySelector(`[data-scroll="${this.to}"]`);
|
|
14
14
|
if ($scrollTo) {
|
|
15
15
|
const elTopPosition = $scrollTo.getBoundingClientRect().top;
|
|
16
16
|
requestAnimationFrame(() => {
|
|
17
|
-
window.scrollTo({ top: elTopPosition + window.scrollY, behavior: this.
|
|
17
|
+
window.scrollTo({ top: elTopPosition + window.scrollY, behavior: this.behavior });
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
};
|
|
@@ -32,7 +32,7 @@ __decorate([
|
|
|
32
32
|
__decorate([
|
|
33
33
|
property({ type: String }),
|
|
34
34
|
__metadata("design:type", String)
|
|
35
|
-
], HScrollTo.prototype, "
|
|
35
|
+
], HScrollTo.prototype, "behavior", void 0);
|
|
36
36
|
HScrollTo = __decorate([
|
|
37
37
|
phoenixCustomElement('h-scroll-to'),
|
|
38
38
|
__metadata("design:paramtypes", [])
|