@shoper/phoenix_design_system 1.15.11-15 → 1.15.11-16
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.
|
@@ -42,7 +42,7 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
42
42
|
this.searchDisabled = false;
|
|
43
43
|
this.type = select_constants.SELECT_TYPES.select;
|
|
44
44
|
this.noDeselect = false;
|
|
45
|
-
this.
|
|
45
|
+
this.assistiveTitleId = '';
|
|
46
46
|
this._selectOptionsId = v4['default']();
|
|
47
47
|
this._searchValue = '';
|
|
48
48
|
this._$options = new Map();
|
|
@@ -254,7 +254,7 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
254
254
|
if (!this.searchDisabled) {
|
|
255
255
|
this.classList.add(select_constants.SELECT_CSS_CLASSES.selectWithSearch);
|
|
256
256
|
}
|
|
257
|
-
this.$searchLabel = document.querySelector(`[id="${this.
|
|
257
|
+
this.$searchLabel = document.querySelector(`[id="${this.assistiveTitleId}"]`);
|
|
258
258
|
(_a = this.$searchLabel) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-hidden', 'true');
|
|
259
259
|
this._selectController = this.multiple ? new multi_select_controller.MultiSelectController({ host: this }) : new select_controller.SelectController({ host: this });
|
|
260
260
|
this._selectContext.provide(select_constants.SELECT_CONTEXTS.selectedOptions$, this._selectController.selectedOptions$);
|
|
@@ -405,7 +405,7 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
405
405
|
|
|
406
406
|
<h-options
|
|
407
407
|
class="${select_constants.SELECT_CSS_CLASSES.selectOptions} ${this._searchNoResult() ? select_constants.SELECT_CSS_CLASSES.selectOptionsEmpty : ''}"
|
|
408
|
-
aria-labelledby="${this.
|
|
408
|
+
aria-labelledby="${this.assistiveTitleId}"
|
|
409
409
|
id="${this._selectOptionsId}"
|
|
410
410
|
${ref_js.ref(this._$optionsList)}
|
|
411
411
|
@optionClicked=${this._handleOptionClicked}
|
|
@@ -498,9 +498,9 @@ tslib_es6.__decorate([
|
|
|
498
498
|
tslib_es6.__metadata("design:type", Boolean)
|
|
499
499
|
], exports.HSelect.prototype, "noDeselect", void 0);
|
|
500
500
|
tslib_es6.__decorate([
|
|
501
|
-
decorators_js.property({ type: String, attribute: 'assistive-title' }),
|
|
501
|
+
decorators_js.property({ type: String, attribute: 'assistive-title-id' }),
|
|
502
502
|
tslib_es6.__metadata("design:type", String)
|
|
503
|
-
], exports.HSelect.prototype, "
|
|
503
|
+
], exports.HSelect.prototype, "assistiveTitleId", void 0);
|
|
504
504
|
tslib_es6.__decorate([
|
|
505
505
|
decorators.state(),
|
|
506
506
|
tslib_es6.__metadata("design:type", String)
|
|
@@ -22,7 +22,7 @@ export declare class HSelect extends PhoenixLightLitElement {
|
|
|
22
22
|
required: boolean;
|
|
23
23
|
optionsList?: TSelectOption[];
|
|
24
24
|
noDeselect: boolean;
|
|
25
|
-
|
|
25
|
+
assistiveTitleId: string;
|
|
26
26
|
private _selectOptionsId;
|
|
27
27
|
get selectedIndex(): number;
|
|
28
28
|
set selectedIndex(index: number);
|
|
@@ -38,7 +38,7 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
|
|
|
38
38
|
this.searchDisabled = false;
|
|
39
39
|
this.type = SELECT_TYPES.select;
|
|
40
40
|
this.noDeselect = false;
|
|
41
|
-
this.
|
|
41
|
+
this.assistiveTitleId = '';
|
|
42
42
|
this._selectOptionsId = v4();
|
|
43
43
|
this._searchValue = '';
|
|
44
44
|
this._$options = new Map();
|
|
@@ -250,7 +250,7 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
|
|
|
250
250
|
if (!this.searchDisabled) {
|
|
251
251
|
this.classList.add(SELECT_CSS_CLASSES.selectWithSearch);
|
|
252
252
|
}
|
|
253
|
-
this.$searchLabel = document.querySelector(`[id="${this.
|
|
253
|
+
this.$searchLabel = document.querySelector(`[id="${this.assistiveTitleId}"]`);
|
|
254
254
|
(_a = this.$searchLabel) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-hidden', 'true');
|
|
255
255
|
this._selectController = this.multiple ? new MultiSelectController({ host: this }) : new SelectController({ host: this });
|
|
256
256
|
this._selectContext.provide(SELECT_CONTEXTS.selectedOptions$, this._selectController.selectedOptions$);
|
|
@@ -401,7 +401,7 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
|
|
|
401
401
|
|
|
402
402
|
<h-options
|
|
403
403
|
class="${SELECT_CSS_CLASSES.selectOptions} ${this._searchNoResult() ? SELECT_CSS_CLASSES.selectOptionsEmpty : ''}"
|
|
404
|
-
aria-labelledby="${this.
|
|
404
|
+
aria-labelledby="${this.assistiveTitleId}"
|
|
405
405
|
id="${this._selectOptionsId}"
|
|
406
406
|
${ref(this._$optionsList)}
|
|
407
407
|
@optionClicked=${this._handleOptionClicked}
|
|
@@ -494,9 +494,9 @@ __decorate([
|
|
|
494
494
|
__metadata("design:type", Boolean)
|
|
495
495
|
], HSelect.prototype, "noDeselect", void 0);
|
|
496
496
|
__decorate([
|
|
497
|
-
property({ type: String, attribute: 'assistive-title' }),
|
|
497
|
+
property({ type: String, attribute: 'assistive-title-id' }),
|
|
498
498
|
__metadata("design:type", String)
|
|
499
|
-
], HSelect.prototype, "
|
|
499
|
+
], HSelect.prototype, "assistiveTitleId", void 0);
|
|
500
500
|
__decorate([
|
|
501
501
|
state(),
|
|
502
502
|
__metadata("design:type", String)
|
package/package.json
CHANGED