@shoper/phoenix_design_system 1.17.16-0 → 1.17.16-2

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.
Files changed (23) hide show
  1. package/build/cjs/packages/phoenix/src/components/dropdown/dropdown_content.js +12 -1
  2. package/build/cjs/packages/phoenix/src/components/dropdown/dropdown_content.js.map +1 -1
  3. package/build/cjs/packages/phoenix/src/components/dropdown/dropdown_toggler.js +1 -1
  4. package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.js +1 -1
  5. package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js +1 -1
  6. package/build/cjs/packages/phoenix/src/components/sheet/sheet.js +3 -1
  7. package/build/cjs/packages/phoenix/src/components/sheet/sheet.js.map +1 -1
  8. package/build/cjs/packages/phoenix/src/components/toggle/toggle_button.js +1 -14
  9. package/build/cjs/packages/phoenix/src/components/toggle/toggle_button.js.map +1 -1
  10. package/build/esm/packages/phoenix/src/components/dropdown/dropdown_content.d.ts +1 -0
  11. package/build/esm/packages/phoenix/src/components/dropdown/dropdown_content.js +12 -1
  12. package/build/esm/packages/phoenix/src/components/dropdown/dropdown_content.js.map +1 -1
  13. package/build/esm/packages/phoenix/src/components/dropdown/dropdown_toggler.js +1 -1
  14. package/build/esm/packages/phoenix/src/components/form/search/search_types.d.ts +1 -0
  15. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.js +1 -1
  16. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js +1 -1
  17. package/build/esm/packages/phoenix/src/components/sheet/sheet.js +3 -1
  18. package/build/esm/packages/phoenix/src/components/sheet/sheet.js.map +1 -1
  19. package/build/esm/packages/phoenix/src/components/toggle/toggle_button.d.ts +0 -1
  20. package/build/esm/packages/phoenix/src/components/toggle/toggle_button.js +1 -14
  21. package/build/esm/packages/phoenix/src/components/toggle/toggle_button.js.map +1 -1
  22. package/build/esm/packages/phoenix/src/index.d.ts +1 -0
  23. package/package.json +1 -1
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
6
6
  var decorators = require('lit/decorators');
7
+ var utilities = require('@dreamcommerce/utilities');
7
8
  var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
8
9
  var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
9
10
  var dropdown_constants = require('./dropdown_constants.js');
@@ -12,12 +13,22 @@ exports.HDropdownContent = class HDropdownContent extends phoenix_light_lit_elem
12
13
  constructor() {
13
14
  super();
14
15
  this.name = '';
16
+ this._setupRole = () => {
17
+ const $focusableElements = utilities.UiDomUtils.getFocusableElements(this);
18
+ const role = $focusableElements.length < 2 ? 'dialog' : 'menu';
19
+ this.setAttribute('role', role);
20
+ if (role === 'menu') {
21
+ Array.from(this.children).forEach((element) => {
22
+ element.setAttribute('role', 'menuitem');
23
+ });
24
+ }
25
+ };
15
26
  this.slot = this.hasAttribute('slot') ? this.slot : 'content';
16
27
  }
17
28
  connectedCallback() {
18
29
  super.connectedCallback();
19
30
  this.classList.add(dropdown_constants.DROPDOWN_CSS_CLASSES.content);
20
- this.setAttribute('role', 'dialog');
31
+ this._setupRole();
21
32
  }
22
33
  };
23
34
  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;"}
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;"}
@@ -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 = 'dialog';
18
+ this.ariaHasPopup = 'menu';
19
19
  this.ariaControls = '';
20
20
  this.role = 'button';
21
21
  this._setupTogglerAria = () => {
@@ -37,7 +37,7 @@ exports.HSearchProducerContent = class HSearchProducerContent extends phoenix_li
37
37
  : ''}"
38
38
  data-search-item-id="${this.searchId}${this.initialItemIds.producers + index}"
39
39
  aria-label=${this.producerAriaLabel ? `${this.producerAriaLabel} ${producer.name}` : undefined}
40
- tabindex="0"
40
+ tabindex=${this.closest('.search_mobile-opened, [display-mode="dropdown"]') ? '0' : undefined}
41
41
  role="option"
42
42
  >
43
43
  <a
@@ -50,7 +50,7 @@ exports.HSearchProductContent = class HSearchProductContent extends phoenix_ligh
50
50
  : ''}"
51
51
  data-search-item-id="${this.searchId}${this.initialItemIds.products + index}"
52
52
  aria-label=${this.productAriaLabel ? `${this.productAriaLabel} ${product.name}` : undefined}
53
- tabindex="0"
53
+ tabindex=${this.closest('.search_mobile-opened, [display-mode="dropdown"]') ? '0' : undefined}
54
54
  role="option"
55
55
  >
56
56
  <a
@@ -199,7 +199,9 @@ exports.HSheet = HSheet_1 = class HSheet extends phoenix_light_lit_element.Phoen
199
199
  });
200
200
  }
201
201
  _dispatchSheetOpenedEvent() {
202
- this.emitCustomEvent(sheet_constants.SHEET_EVENTS.opened);
202
+ this.emitCustomEvent(sheet_constants.SHEET_EVENTS.opened, {
203
+ detail: this
204
+ });
203
205
  this._backdropController.show();
204
206
  this._addInertToBodyChildrenElements();
205
207
  }
@@ -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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -19,20 +19,9 @@ exports.HToggleBtn = class HToggleBtn extends phoenix_light_lit_element.PhoenixL
19
19
  this._visibility = {
20
20
  collapse: (isOpened) => {
21
21
  isOpened ? this._visibilityController.show() : this._visibilityController.hide();
22
- this._handleFocusOppositeToggleButtonIfLostFocus();
23
22
  },
24
23
  expand: (isOpened) => {
25
24
  isOpened ? this._visibilityController.hide() : this._visibilityController.show();
26
- this._handleFocusOppositeToggleButtonIfLostFocus();
27
- }
28
- };
29
- this._handleFocusOppositeToggleButtonIfLostFocus = () => {
30
- var _a;
31
- const shouldFocus = this === document.activeElement;
32
- const oppositeAction = this.action === toggle_constants.TOGGLE_ACTIONS.collapse ? toggle_constants.TOGGLE_ACTIONS.expand : toggle_constants.TOGGLE_ACTIONS.collapse;
33
- if (shouldFocus) {
34
- const $oppositeToggleBtn = (_a = this.parentElement) === null || _a === void 0 ? void 0 : _a.querySelector(`[action="${oppositeAction}"]`);
35
- $oppositeToggleBtn === null || $oppositeToggleBtn === void 0 ? void 0 : $oppositeToggleBtn.focus();
36
25
  }
37
26
  };
38
27
  this._dispatchToggleEvent = () => {
@@ -49,12 +38,10 @@ exports.HToggleBtn = class HToggleBtn extends phoenix_light_lit_element.PhoenixL
49
38
  this._visibility[this.action](isOpened);
50
39
  });
51
40
  this._opened$.subscribe(this._openedObserver);
52
- this.setAttribute('aria-expanded', this.action === toggle_constants.TOGGLE_ACTIONS.collapse ? 'true' : 'false');
53
41
  this.addEventListener('click', this._dispatchToggleEvent);
54
42
  }
55
43
  disconnectedCallback() {
56
- super.disconnectedCallback();
57
- this._openedObserver && this._opened$.unsubscribe(this._openedObserver);
44
+ this._opened$.unsubscribe(this._openedObserver);
58
45
  }
59
46
  };
60
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;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;"}
@@ -3,4 +3,5 @@ export declare class HDropdownContent extends PhoenixLightLitElement {
3
3
  name: string;
4
4
  constructor();
5
5
  connectedCallback(): void;
6
+ private _setupRole;
6
7
  }
@@ -1,5 +1,6 @@
1
1
  import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
2
2
  import { property } from 'lit/decorators';
3
+ import { UiDomUtils } from '@dreamcommerce/utilities';
3
4
  import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
4
5
  import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
5
6
  import { DROPDOWN_CSS_CLASSES } from './dropdown_constants.js';
@@ -8,12 +9,22 @@ let HDropdownContent = class HDropdownContent extends PhoenixLightLitElement {
8
9
  constructor() {
9
10
  super();
10
11
  this.name = '';
12
+ this._setupRole = () => {
13
+ const $focusableElements = UiDomUtils.getFocusableElements(this);
14
+ const role = $focusableElements.length < 2 ? 'dialog' : 'menu';
15
+ this.setAttribute('role', role);
16
+ if (role === 'menu') {
17
+ Array.from(this.children).forEach((element) => {
18
+ element.setAttribute('role', 'menuitem');
19
+ });
20
+ }
21
+ };
11
22
  this.slot = this.hasAttribute('slot') ? this.slot : 'content';
12
23
  }
13
24
  connectedCallback() {
14
25
  super.connectedCallback();
15
26
  this.classList.add(DROPDOWN_CSS_CLASSES.content);
16
- this.setAttribute('role', 'dialog');
27
+ this._setupRole();
17
28
  }
18
29
  };
19
30
  __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;"}
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;"}
@@ -11,7 +11,7 @@ let HDropdownToggler = class HDropdownToggler extends PhoenixLightLitElement {
11
11
  constructor() {
12
12
  super();
13
13
  this.name = '';
14
- this.ariaHasPopup = 'dialog';
14
+ this.ariaHasPopup = 'menu';
15
15
  this.ariaControls = '';
16
16
  this.role = 'button';
17
17
  this._setupTogglerAria = () => {
@@ -92,3 +92,4 @@ export declare type TSearchFocusInEventDetail = {
92
92
  searchPhrase: string;
93
93
  relatedTarget: EventTarget | null;
94
94
  };
95
+ export declare type TSearchDisplayMode = 'dropdown' | 'popup' | 'sidebar';
@@ -33,7 +33,7 @@ let HSearchProducerContent = class HSearchProducerContent extends PhoenixLightLi
33
33
  : ''}"
34
34
  data-search-item-id="${this.searchId}${this.initialItemIds.producers + index}"
35
35
  aria-label=${this.producerAriaLabel ? `${this.producerAriaLabel} ${producer.name}` : undefined}
36
- tabindex="0"
36
+ tabindex=${this.closest('.search_mobile-opened, [display-mode="dropdown"]') ? '0' : undefined}
37
37
  role="option"
38
38
  >
39
39
  <a
@@ -46,7 +46,7 @@ let HSearchProductContent = class HSearchProductContent extends PhoenixLightLitE
46
46
  : ''}"
47
47
  data-search-item-id="${this.searchId}${this.initialItemIds.products + index}"
48
48
  aria-label=${this.productAriaLabel ? `${this.productAriaLabel} ${product.name}` : undefined}
49
- tabindex="0"
49
+ tabindex=${this.closest('.search_mobile-opened, [display-mode="dropdown"]') ? '0' : undefined}
50
50
  role="option"
51
51
  >
52
52
  <a
@@ -195,7 +195,9 @@ let HSheet = HSheet_1 = class HSheet extends PhoenixLightLitElement {
195
195
  });
196
196
  }
197
197
  _dispatchSheetOpenedEvent() {
198
- this.emitCustomEvent(SHEET_EVENTS.opened);
198
+ this.emitCustomEvent(SHEET_EVENTS.opened, {
199
+ detail: this
200
+ });
199
201
  this._backdropController.show();
200
202
  this._addInertToBodyChildrenElements();
201
203
  }
@@ -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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -8,7 +8,6 @@ export declare class HToggleBtn extends PhoenixLightLitElement {
8
8
  action: "collapse";
9
9
  private _visibility;
10
10
  constructor();
11
- private _handleFocusOppositeToggleButtonIfLostFocus;
12
11
  connectedCallback(): Promise<void>;
13
12
  disconnectedCallback(): void;
14
13
  private _dispatchToggleEvent;
@@ -15,20 +15,9 @@ let HToggleBtn = class HToggleBtn extends PhoenixLightLitElement {
15
15
  this._visibility = {
16
16
  collapse: (isOpened) => {
17
17
  isOpened ? this._visibilityController.show() : this._visibilityController.hide();
18
- this._handleFocusOppositeToggleButtonIfLostFocus();
19
18
  },
20
19
  expand: (isOpened) => {
21
20
  isOpened ? this._visibilityController.hide() : this._visibilityController.show();
22
- this._handleFocusOppositeToggleButtonIfLostFocus();
23
- }
24
- };
25
- this._handleFocusOppositeToggleButtonIfLostFocus = () => {
26
- var _a;
27
- const shouldFocus = this === document.activeElement;
28
- const oppositeAction = this.action === TOGGLE_ACTIONS.collapse ? TOGGLE_ACTIONS.expand : TOGGLE_ACTIONS.collapse;
29
- if (shouldFocus) {
30
- const $oppositeToggleBtn = (_a = this.parentElement) === null || _a === void 0 ? void 0 : _a.querySelector(`[action="${oppositeAction}"]`);
31
- $oppositeToggleBtn === null || $oppositeToggleBtn === void 0 ? void 0 : $oppositeToggleBtn.focus();
32
21
  }
33
22
  };
34
23
  this._dispatchToggleEvent = () => {
@@ -45,12 +34,10 @@ let HToggleBtn = class HToggleBtn extends PhoenixLightLitElement {
45
34
  this._visibility[this.action](isOpened);
46
35
  });
47
36
  this._opened$.subscribe(this._openedObserver);
48
- this.setAttribute('aria-expanded', this.action === TOGGLE_ACTIONS.collapse ? 'true' : 'false');
49
37
  this.addEventListener('click', this._dispatchToggleEvent);
50
38
  }
51
39
  disconnectedCallback() {
52
- super.disconnectedCallback();
53
- this._openedObserver && this._opened$.unsubscribe(this._openedObserver);
40
+ this._opened$.unsubscribe(this._openedObserver);
54
41
  }
55
42
  };
56
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;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;"}
@@ -133,6 +133,7 @@ export { HSearchHistoryLoadMore } from './components/form/search/subcomponents/h
133
133
  export { HSearchSuggestionContent } from './components/form/search/subcomponents/results/search_suggestion_content';
134
134
  export { HSearchProductContent } from './components/form/search/subcomponents/results/search_product_content';
135
135
  export { HSearchProducerContent } from './components/form/search/subcomponents/results/search_producer_content';
136
+ export type { TSearchDisplayMode } from './components/form/search/search_types';
136
137
  export * from './components/form/search/search_constants';
137
138
  export { HToggle } from './components/toggle/toggle';
138
139
  export { HToggleBtn } from './components/toggle/toggle_button';
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.16-0",
5
+ "version": "1.17.16-2",
6
6
  "description": "phoenix design system",
7
7
  "author": "zefirek",
8
8
  "license": "MIT",