@shoper/phoenix_design_system 1.16.1-6 → 1.17.0-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.
- package/build/cjs/packages/phoenix/src/components/dropdown/dropdown_toggler.js +1 -1
- package/build/cjs/packages/phoenix/src/components/slider/slider.js +50 -0
- package/build/cjs/packages/phoenix/src/components/slider/slider.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/slider/slider_constants.js +11 -0
- package/build/cjs/packages/phoenix/src/components/slider/slider_constants.js.map +1 -0
- package/build/cjs/packages/phoenix/src/components/toggle/toggle_button.js +7 -14
- package/build/cjs/packages/phoenix/src/components/toggle/toggle_button.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown_toggler.js +1 -1
- package/build/esm/packages/phoenix/src/components/slider/slider.d.ts +9 -0
- package/build/esm/packages/phoenix/src/components/slider/slider.js +51 -1
- package/build/esm/packages/phoenix/src/components/slider/slider.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/slider/slider_constants.d.ts +4 -0
- package/build/esm/packages/phoenix/src/components/slider/slider_constants.js +7 -0
- package/build/esm/packages/phoenix/src/components/slider/slider_constants.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/slider/slider_types.d.ts +3 -0
- package/build/esm/packages/phoenix/src/components/slider/slider_types.js +2 -0
- package/build/esm/packages/phoenix/src/components/slider/slider_types.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/toggle/toggle_button.d.ts +0 -1
- package/build/esm/packages/phoenix/src/components/toggle/toggle_button.js +7 -14
- package/build/esm/packages/phoenix/src/components/toggle/toggle_button.js.map +1 -1
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@ exports.HDropdownToggler = class HDropdownToggler extends phoenix_light_lit_elem
|
|
|
15
15
|
constructor() {
|
|
16
16
|
super();
|
|
17
17
|
this.name = '';
|
|
18
|
-
this.ariaHasPopup = '
|
|
18
|
+
this.ariaHasPopup = 'menu';
|
|
19
19
|
this.ariaControls = '';
|
|
20
20
|
this.role = 'button';
|
|
21
21
|
this._setupTogglerAria = () => {
|
|
@@ -8,6 +8,7 @@ var utilities = require('@dreamcommerce/utilities');
|
|
|
8
8
|
var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
9
9
|
var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
|
|
10
10
|
var splide_esm = require('../../../../../external/@splidejs/splide/dist/js/splide.esm.js');
|
|
11
|
+
var slider_constants = require('./slider_constants.js');
|
|
11
12
|
|
|
12
13
|
exports.HSlider = class HSlider extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
13
14
|
constructor() {
|
|
@@ -21,6 +22,26 @@ exports.HSlider = class HSlider extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
21
22
|
focus: 'center'
|
|
22
23
|
};
|
|
23
24
|
this._slider = null;
|
|
25
|
+
this._$focusableElements = [];
|
|
26
|
+
this._showFocusableNodes = (slideComponent) => {
|
|
27
|
+
this._handleFocusableNodes(slideComponent, slider_constants.SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS.show);
|
|
28
|
+
};
|
|
29
|
+
this._hideFocusableNodes = (slideComponent) => {
|
|
30
|
+
this._handleFocusableNodes(slideComponent, slider_constants.SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS.hide);
|
|
31
|
+
};
|
|
32
|
+
this._handleFocusableNodes = ({ slide }, action) => {
|
|
33
|
+
const $focusableSlideChildren = this._$focusableElements.filter(($focusableElement) => slide.contains($focusableElement));
|
|
34
|
+
if ($focusableSlideChildren.length === 0)
|
|
35
|
+
return;
|
|
36
|
+
const updateFocusability = action === slider_constants.SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS.show ? this._showFocusableElement : this._hideFocusableElement;
|
|
37
|
+
$focusableSlideChildren.forEach(($element) => (updateFocusability($element)));
|
|
38
|
+
};
|
|
39
|
+
this._initializeFocusableElement = ($element) => {
|
|
40
|
+
!this._$focusableElements.includes($element) && this._$focusableElements.push($element);
|
|
41
|
+
if ($element.closest('[aria-hidden="true"]')) {
|
|
42
|
+
this._hideFocusableElement($element);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
24
45
|
}
|
|
25
46
|
get sliderSettings() {
|
|
26
47
|
return this._settings;
|
|
@@ -40,10 +61,39 @@ exports.HSlider = class HSlider extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
40
61
|
if (this._settings.mountOnConnectedCallback) {
|
|
41
62
|
this._slider.mount();
|
|
42
63
|
}
|
|
64
|
+
this._slider.on('visible', this._showFocusableNodes);
|
|
65
|
+
this._slider.on('hidden', this._hideFocusableNodes);
|
|
66
|
+
const mutationObserver = new MutationObserver(this._scanMutationsForNewFocusableElements);
|
|
67
|
+
mutationObserver.observe(this, { childList: true, subtree: true, attributes: true });
|
|
68
|
+
}
|
|
69
|
+
_showFocusableElement($element) {
|
|
70
|
+
$element.setAttribute('tabindex', '0');
|
|
71
|
+
$element.removeAttribute('aria-hidden');
|
|
72
|
+
}
|
|
73
|
+
_hideFocusableElement($element) {
|
|
74
|
+
$element.setAttribute('tabindex', '-1');
|
|
75
|
+
$element.setAttribute('aria-hidden', 'true');
|
|
76
|
+
}
|
|
77
|
+
_scanMutationsForNewFocusableElements(mutationList) {
|
|
78
|
+
for (const mutation of mutationList) {
|
|
79
|
+
if (mutation.type !== "childList")
|
|
80
|
+
continue;
|
|
81
|
+
const $target = mutation.target;
|
|
82
|
+
const isFocusable = utilities.UiDomUtils.isFocusable($target);
|
|
83
|
+
const $focusableChildren = [...$target.querySelectorAll(utilities.UiDomUtils.getFocusableSelector())];
|
|
84
|
+
isFocusable && this._initializeFocusableElement($target);
|
|
85
|
+
$focusableChildren.forEach(($child) => this._initializeFocusableElement($child));
|
|
86
|
+
}
|
|
43
87
|
}
|
|
44
88
|
getSlider() {
|
|
45
89
|
return this._slider;
|
|
46
90
|
}
|
|
91
|
+
disconnectedCallback() {
|
|
92
|
+
var _a, _b;
|
|
93
|
+
super.disconnectedCallback();
|
|
94
|
+
(_a = this._slider) === null || _a === void 0 ? void 0 : _a.off('visible');
|
|
95
|
+
(_b = this._slider) === null || _b === void 0 ? void 0 : _b.off('hidden');
|
|
96
|
+
}
|
|
47
97
|
};
|
|
48
98
|
tslib_es6.__decorate([
|
|
49
99
|
decorators.property({ reflect: true }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA,yBAAyB,gEAAoE;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA,yBAAyB,gEAAoE;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS = {
|
|
6
|
+
show: 'show',
|
|
7
|
+
hide: 'hide'
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
exports.SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS = SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS;
|
|
11
|
+
//# sourceMappingURL=slider_constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -16,22 +16,17 @@ exports.HToggleBtn = class HToggleBtn extends phoenix_light_lit_element.PhoenixL
|
|
|
16
16
|
constructor() {
|
|
17
17
|
super();
|
|
18
18
|
this.action = toggle_constants.TOGGLE_ACTIONS.collapse;
|
|
19
|
-
this.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
$collapseToggleBtn === null || $collapseToggleBtn === void 0 ? void 0 : $collapseToggleBtn.focus();
|
|
19
|
+
this._visibility = {
|
|
20
|
+
collapse: (isOpened) => {
|
|
21
|
+
isOpened ? this._visibilityController.show() : this._visibilityController.hide();
|
|
22
|
+
},
|
|
23
|
+
expand: (isOpened) => {
|
|
24
|
+
isOpened ? this._visibilityController.hide() : this._visibilityController.show();
|
|
26
25
|
}
|
|
27
26
|
};
|
|
28
27
|
this._dispatchToggleEvent = () => {
|
|
29
28
|
this.emitCustomEvent(toggle_constants.TOGGLE_BUTTON_EVENTS.toggle);
|
|
30
29
|
};
|
|
31
|
-
this._visibility = {
|
|
32
|
-
collapse: this._handleVisibilityChange,
|
|
33
|
-
expand: this._handleVisibilityChange
|
|
34
|
-
};
|
|
35
30
|
this._btnController = new btn_controller.BtnController(this, this._dispatchToggleEvent);
|
|
36
31
|
this._visibilityController = new visibility_controller.VisibilityController(this);
|
|
37
32
|
}
|
|
@@ -43,12 +38,10 @@ exports.HToggleBtn = class HToggleBtn extends phoenix_light_lit_element.PhoenixL
|
|
|
43
38
|
this._visibility[this.action](isOpened);
|
|
44
39
|
});
|
|
45
40
|
this._opened$.subscribe(this._openedObserver);
|
|
46
|
-
this.setAttribute('aria-expanded', this.action === toggle_constants.TOGGLE_ACTIONS.collapse ? 'true' : 'false');
|
|
47
41
|
this.addEventListener('click', this._dispatchToggleEvent);
|
|
48
42
|
}
|
|
49
43
|
disconnectedCallback() {
|
|
50
|
-
|
|
51
|
-
this._openedObserver && this._opened$.unsubscribe(this._openedObserver);
|
|
44
|
+
this._opened$.unsubscribe(this._openedObserver);
|
|
52
45
|
}
|
|
53
46
|
};
|
|
54
47
|
tslib_es6.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -11,7 +11,7 @@ let HDropdownToggler = class HDropdownToggler extends PhoenixLightLitElement {
|
|
|
11
11
|
constructor() {
|
|
12
12
|
super();
|
|
13
13
|
this.name = '';
|
|
14
|
-
this.ariaHasPopup = '
|
|
14
|
+
this.ariaHasPopup = 'menu';
|
|
15
15
|
this.ariaControls = '';
|
|
16
16
|
this.role = 'button';
|
|
17
17
|
this._setupTogglerAria = () => {
|
|
@@ -7,6 +7,15 @@ export declare class HSlider extends PhoenixLightLitElement {
|
|
|
7
7
|
set sliderSettings(newSettingsObject: ISliderOptions);
|
|
8
8
|
private _settings;
|
|
9
9
|
private _slider;
|
|
10
|
+
private _$focusableElements;
|
|
10
11
|
connectedCallback(): void;
|
|
12
|
+
private _showFocusableNodes;
|
|
13
|
+
private _hideFocusableNodes;
|
|
14
|
+
private _handleFocusableNodes;
|
|
15
|
+
private _showFocusableElement;
|
|
16
|
+
private _hideFocusableElement;
|
|
17
|
+
private _scanMutationsForNewFocusableElements;
|
|
18
|
+
private _initializeFocusableElement;
|
|
11
19
|
getSlider(): ISlider | null;
|
|
20
|
+
disconnectedCallback(): void;
|
|
12
21
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { property } from 'lit/decorators';
|
|
3
|
-
import { JsonUtils } from '@dreamcommerce/utilities';
|
|
3
|
+
import { JsonUtils, UiDomUtils } from '@dreamcommerce/utilities';
|
|
4
4
|
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
5
5
|
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
6
6
|
import { Splide } from '../../../../../external/@splidejs/splide/dist/js/splide.esm.js';
|
|
7
|
+
import { SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS } from './slider_constants.js';
|
|
7
8
|
|
|
8
9
|
let HSlider = class HSlider extends PhoenixLightLitElement {
|
|
9
10
|
constructor() {
|
|
@@ -17,6 +18,26 @@ let HSlider = class HSlider extends PhoenixLightLitElement {
|
|
|
17
18
|
focus: 'center'
|
|
18
19
|
};
|
|
19
20
|
this._slider = null;
|
|
21
|
+
this._$focusableElements = [];
|
|
22
|
+
this._showFocusableNodes = (slideComponent) => {
|
|
23
|
+
this._handleFocusableNodes(slideComponent, SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS.show);
|
|
24
|
+
};
|
|
25
|
+
this._hideFocusableNodes = (slideComponent) => {
|
|
26
|
+
this._handleFocusableNodes(slideComponent, SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS.hide);
|
|
27
|
+
};
|
|
28
|
+
this._handleFocusableNodes = ({ slide }, action) => {
|
|
29
|
+
const $focusableSlideChildren = this._$focusableElements.filter(($focusableElement) => slide.contains($focusableElement));
|
|
30
|
+
if ($focusableSlideChildren.length === 0)
|
|
31
|
+
return;
|
|
32
|
+
const updateFocusability = action === SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS.show ? this._showFocusableElement : this._hideFocusableElement;
|
|
33
|
+
$focusableSlideChildren.forEach(($element) => (updateFocusability($element)));
|
|
34
|
+
};
|
|
35
|
+
this._initializeFocusableElement = ($element) => {
|
|
36
|
+
!this._$focusableElements.includes($element) && this._$focusableElements.push($element);
|
|
37
|
+
if ($element.closest('[aria-hidden="true"]')) {
|
|
38
|
+
this._hideFocusableElement($element);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
20
41
|
}
|
|
21
42
|
get sliderSettings() {
|
|
22
43
|
return this._settings;
|
|
@@ -36,10 +57,39 @@ let HSlider = class HSlider extends PhoenixLightLitElement {
|
|
|
36
57
|
if (this._settings.mountOnConnectedCallback) {
|
|
37
58
|
this._slider.mount();
|
|
38
59
|
}
|
|
60
|
+
this._slider.on('visible', this._showFocusableNodes);
|
|
61
|
+
this._slider.on('hidden', this._hideFocusableNodes);
|
|
62
|
+
const mutationObserver = new MutationObserver(this._scanMutationsForNewFocusableElements);
|
|
63
|
+
mutationObserver.observe(this, { childList: true, subtree: true, attributes: true });
|
|
64
|
+
}
|
|
65
|
+
_showFocusableElement($element) {
|
|
66
|
+
$element.setAttribute('tabindex', '0');
|
|
67
|
+
$element.removeAttribute('aria-hidden');
|
|
68
|
+
}
|
|
69
|
+
_hideFocusableElement($element) {
|
|
70
|
+
$element.setAttribute('tabindex', '-1');
|
|
71
|
+
$element.setAttribute('aria-hidden', 'true');
|
|
72
|
+
}
|
|
73
|
+
_scanMutationsForNewFocusableElements(mutationList) {
|
|
74
|
+
for (const mutation of mutationList) {
|
|
75
|
+
if (mutation.type !== "childList")
|
|
76
|
+
continue;
|
|
77
|
+
const $target = mutation.target;
|
|
78
|
+
const isFocusable = UiDomUtils.isFocusable($target);
|
|
79
|
+
const $focusableChildren = [...$target.querySelectorAll(UiDomUtils.getFocusableSelector())];
|
|
80
|
+
isFocusable && this._initializeFocusableElement($target);
|
|
81
|
+
$focusableChildren.forEach(($child) => this._initializeFocusableElement($child));
|
|
82
|
+
}
|
|
39
83
|
}
|
|
40
84
|
getSlider() {
|
|
41
85
|
return this._slider;
|
|
42
86
|
}
|
|
87
|
+
disconnectedCallback() {
|
|
88
|
+
var _a, _b;
|
|
89
|
+
super.disconnectedCallback();
|
|
90
|
+
(_a = this._slider) === null || _a === void 0 ? void 0 : _a.off('visible');
|
|
91
|
+
(_b = this._slider) === null || _b === void 0 ? void 0 : _b.off('hidden');
|
|
92
|
+
}
|
|
43
93
|
};
|
|
44
94
|
__decorate([
|
|
45
95
|
property({ reflect: true }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA,uBAAuB,gEAAoE;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA,uBAAuB,gEAAoE;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Options, Splide } from '@splidejs/splide';
|
|
2
|
+
import { SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS } from './slider_constants';
|
|
3
|
+
import { Any } from 'ts-toolbelt';
|
|
2
4
|
export interface ISlider extends Splide {
|
|
3
5
|
}
|
|
4
6
|
export interface ISliderOptions extends Options {
|
|
5
7
|
mountOnConnectedCallback: boolean;
|
|
6
8
|
}
|
|
9
|
+
export declare type THandleNodesOption = typeof SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS[Any.Keys<typeof SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS>];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider_types.js","sourceRoot":"","sources":["../../../../../../../src/components/slider/slider_types.ts"],"names":[],"mappings":"AAAA,OAAgC,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"slider_types.js","sourceRoot":"","sources":["../../../../../../../src/components/slider/slider_types.ts"],"names":[],"mappings":"AAAA,OAAgC,kBAAkB,CAAC;AACnD,OAAsD,oBAAoB,CAAC;AAC3E,OAAoB,aAAa,CAAC"}
|
|
@@ -8,7 +8,6 @@ export declare class HToggleBtn extends PhoenixLightLitElement {
|
|
|
8
8
|
action: "collapse";
|
|
9
9
|
private _visibility;
|
|
10
10
|
constructor();
|
|
11
|
-
private _handleVisibilityChange;
|
|
12
11
|
connectedCallback(): Promise<void>;
|
|
13
12
|
disconnectedCallback(): void;
|
|
14
13
|
private _dispatchToggleEvent;
|
|
@@ -12,22 +12,17 @@ let HToggleBtn = class HToggleBtn extends PhoenixLightLitElement {
|
|
|
12
12
|
constructor() {
|
|
13
13
|
super();
|
|
14
14
|
this.action = TOGGLE_ACTIONS.collapse;
|
|
15
|
-
this.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
$collapseToggleBtn === null || $collapseToggleBtn === void 0 ? void 0 : $collapseToggleBtn.focus();
|
|
15
|
+
this._visibility = {
|
|
16
|
+
collapse: (isOpened) => {
|
|
17
|
+
isOpened ? this._visibilityController.show() : this._visibilityController.hide();
|
|
18
|
+
},
|
|
19
|
+
expand: (isOpened) => {
|
|
20
|
+
isOpened ? this._visibilityController.hide() : this._visibilityController.show();
|
|
22
21
|
}
|
|
23
22
|
};
|
|
24
23
|
this._dispatchToggleEvent = () => {
|
|
25
24
|
this.emitCustomEvent(TOGGLE_BUTTON_EVENTS.toggle);
|
|
26
25
|
};
|
|
27
|
-
this._visibility = {
|
|
28
|
-
collapse: this._handleVisibilityChange,
|
|
29
|
-
expand: this._handleVisibilityChange
|
|
30
|
-
};
|
|
31
26
|
this._btnController = new BtnController(this, this._dispatchToggleEvent);
|
|
32
27
|
this._visibilityController = new VisibilityController(this);
|
|
33
28
|
}
|
|
@@ -39,12 +34,10 @@ let HToggleBtn = class HToggleBtn extends PhoenixLightLitElement {
|
|
|
39
34
|
this._visibility[this.action](isOpened);
|
|
40
35
|
});
|
|
41
36
|
this._opened$.subscribe(this._openedObserver);
|
|
42
|
-
this.setAttribute('aria-expanded', this.action === TOGGLE_ACTIONS.collapse ? 'true' : 'false');
|
|
43
37
|
this.addEventListener('click', this._dispatchToggleEvent);
|
|
44
38
|
}
|
|
45
39
|
disconnectedCallback() {
|
|
46
|
-
|
|
47
|
-
this._openedObserver && this._opened$.unsubscribe(this._openedObserver);
|
|
40
|
+
this._opened$.unsubscribe(this._openedObserver);
|
|
48
41
|
}
|
|
49
42
|
};
|
|
50
43
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|