@shoper/phoenix_design_system 1.18.23-13 → 1.18.23-15

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 (76) hide show
  1. package/build/cjs/packages/phoenix/src/components/dropdown/dropdown.js +3 -51
  2. package/build/cjs/packages/phoenix/src/components/dropdown/dropdown.js.map +1 -1
  3. package/build/cjs/packages/phoenix/src/components/form/search/search.js +8 -55
  4. package/build/cjs/packages/phoenix/src/components/form/search/search.js.map +1 -1
  5. package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/input/search_input.js +22 -51
  6. package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/input/search_input.js.map +1 -1
  7. package/build/cjs/packages/phoenix/src/components/form/select/select.js +5 -10
  8. package/build/cjs/packages/phoenix/src/components/form/select/select.js.map +1 -1
  9. package/build/cjs/packages/phoenix/src/components/modal/modal.js +11 -39
  10. package/build/cjs/packages/phoenix/src/components/modal/modal.js.map +1 -1
  11. package/build/cjs/packages/phoenix/src/components/sheet/sheet.js +10 -33
  12. package/build/cjs/packages/phoenix/src/components/sheet/sheet.js.map +1 -1
  13. package/build/esm/packages/phoenix/src/components/dropdown/dropdown.d.ts +0 -6
  14. package/build/esm/packages/phoenix/src/components/dropdown/dropdown.js +3 -51
  15. package/build/esm/packages/phoenix/src/components/dropdown/dropdown.js.map +1 -1
  16. package/build/esm/packages/phoenix/src/components/form/search/search.d.ts +0 -6
  17. package/build/esm/packages/phoenix/src/components/form/search/search.js +8 -55
  18. package/build/esm/packages/phoenix/src/components/form/search/search.js.map +1 -1
  19. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/input/search_input.d.ts +0 -1
  20. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/input/search_input.js +22 -51
  21. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/input/search_input.js.map +1 -1
  22. package/build/esm/packages/phoenix/src/components/form/select/select.d.ts +0 -1
  23. package/build/esm/packages/phoenix/src/components/form/select/select.js +5 -10
  24. package/build/esm/packages/phoenix/src/components/form/select/select.js.map +1 -1
  25. package/build/esm/packages/phoenix/src/components/modal/modal.d.ts +0 -2
  26. package/build/esm/packages/phoenix/src/components/modal/modal.js +11 -39
  27. package/build/esm/packages/phoenix/src/components/modal/modal.js.map +1 -1
  28. package/build/esm/packages/phoenix/src/components/sheet/sheet.d.ts +0 -2
  29. package/build/esm/packages/phoenix/src/components/sheet/sheet.js +10 -33
  30. package/build/esm/packages/phoenix/src/components/sheet/sheet.js.map +1 -1
  31. package/package.json +1 -1
  32. package/build/cjs/packages/phoenix/src/controllers/focus_trap_controller/focus_trap_controller.js +0 -47
  33. package/build/cjs/packages/phoenix/src/controllers/focus_trap_controller/focus_trap_controller.js.map +0 -1
  34. package/build/cjs/packages/phoenix/src/controllers/focus_trap_controller/strategies/base_focus_trap_strategy.js +0 -66
  35. package/build/cjs/packages/phoenix/src/controllers/focus_trap_controller/strategies/base_focus_trap_strategy.js.map +0 -1
  36. package/build/cjs/packages/phoenix/src/controllers/focus_trap_controller/strategies/cyclic_focus_trap_strategy/cyclic_focus_trap_strategy.js +0 -14
  37. package/build/cjs/packages/phoenix/src/controllers/focus_trap_controller/strategies/cyclic_focus_trap_strategy/cyclic_focus_trap_strategy.js.map +0 -1
  38. package/build/cjs/packages/phoenix/src/controllers/focus_trap_controller/strategies/focus_trap_strategy_constants.js +0 -12
  39. package/build/cjs/packages/phoenix/src/controllers/focus_trap_controller/strategies/focus_trap_strategy_constants.js.map +0 -1
  40. package/build/cjs/packages/phoenix/src/controllers/focus_trap_controller/strategies/sentinel_focus_trap_strategy/sentinel_focus_trap_strategy.js +0 -29
  41. package/build/cjs/packages/phoenix/src/controllers/focus_trap_controller/strategies/sentinel_focus_trap_strategy/sentinel_focus_trap_strategy.js.map +0 -1
  42. package/build/cjs/packages/phoenix/src/controllers/focus_trap_controller/strategies/toggler_focus_trap_strategy/toggler_focus_trap_strategy.js +0 -60
  43. package/build/cjs/packages/phoenix/src/controllers/focus_trap_controller/strategies/toggler_focus_trap_strategy/toggler_focus_trap_strategy.js.map +0 -1
  44. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/focus_trap_controller.d.ts +0 -13
  45. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/focus_trap_controller.js +0 -43
  46. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/focus_trap_controller.js.map +0 -1
  47. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/focus_trap_controller_types.d.ts +0 -14
  48. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/focus_trap_controller_types.js +0 -5
  49. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/focus_trap_controller_types.js.map +0 -1
  50. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/base_focus_trap_strategy.d.ts +0 -14
  51. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/base_focus_trap_strategy.js +0 -62
  52. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/base_focus_trap_strategy.js.map +0 -1
  53. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/base_focus_trap_strategy_types.d.ts +0 -8
  54. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/base_focus_trap_strategy_types.js +0 -2
  55. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/base_focus_trap_strategy_types.js.map +0 -1
  56. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/cyclic_focus_trap_strategy/cyclic_focus_trap_strategy.d.ts +0 -6
  57. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/cyclic_focus_trap_strategy/cyclic_focus_trap_strategy.js +0 -10
  58. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/cyclic_focus_trap_strategy/cyclic_focus_trap_strategy.js.map +0 -1
  59. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/cyclic_focus_trap_strategy/cyclic_focus_trap_strategy_types.d.ts +0 -3
  60. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/cyclic_focus_trap_strategy/cyclic_focus_trap_strategy_types.js +0 -2
  61. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/cyclic_focus_trap_strategy/cyclic_focus_trap_strategy_types.js.map +0 -1
  62. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/focus_trap_strategy_constants.d.ts +0 -5
  63. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/focus_trap_strategy_constants.js +0 -8
  64. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/focus_trap_strategy_constants.js.map +0 -1
  65. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/sentinel_focus_trap_strategy/sentinel_focus_trap_strategy.d.ts +0 -7
  66. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/sentinel_focus_trap_strategy/sentinel_focus_trap_strategy.js +0 -25
  67. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/sentinel_focus_trap_strategy/sentinel_focus_trap_strategy.js.map +0 -1
  68. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/sentinel_focus_trap_strategy/sentinel_focus_trap_strategy_types.d.ts +0 -4
  69. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/sentinel_focus_trap_strategy/sentinel_focus_trap_strategy_types.js +0 -2
  70. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/sentinel_focus_trap_strategy/sentinel_focus_trap_strategy_types.js.map +0 -1
  71. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/toggler_focus_trap_strategy/toggler_focus_trap_strategy.d.ts +0 -11
  72. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/toggler_focus_trap_strategy/toggler_focus_trap_strategy.js +0 -56
  73. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/toggler_focus_trap_strategy/toggler_focus_trap_strategy.js.map +0 -1
  74. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/toggler_focus_trap_strategy/toggler_focus_trap_strategy_types.d.ts +0 -4
  75. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/toggler_focus_trap_strategy/toggler_focus_trap_strategy_types.js +0 -2
  76. package/build/esm/packages/phoenix/src/controllers/focus_trap_controller/strategies/toggler_focus_trap_strategy/toggler_focus_trap_strategy_types.js.map +0 -1
@@ -30,7 +30,6 @@ import { SelectTogglerKeyboardController } from './controllers/select_toggler_ke
30
30
 
31
31
  let HSelect = class HSelect extends PhoenixLightLitElement {
32
32
  constructor() {
33
- var _a;
34
33
  super();
35
34
  this.multiple = false;
36
35
  this.opened = false;
@@ -41,7 +40,6 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
41
40
  this.assistiveTitleId = '';
42
41
  this.isDevSelectPlaceholderFlagEnabled = false;
43
42
  this.isReactiveSelectionFlagEnabled = false;
44
- this.isSearchFocusTrapFixEnabled = false;
45
43
  this.translations = {};
46
44
  this._selectOptionsId = v4();
47
45
  this._searchValue = '';
@@ -182,8 +180,6 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
182
180
  };
183
181
  const $options = Array.from(this.querySelectorAll(SELECT_RELATED_COMPONENTS_NAMES.option));
184
182
  $options.forEach(($option) => $option.setAttribute('slot', SELECT_SLOT_NAMES.content));
185
- const $placeholderEl = this.querySelector(`[slot="${SELECT_INPUT_PLACEHOLDER_SLOT_NAME}"]`);
186
- this.$placeholder = $placeholderEl && ((_a = $placeholderEl.textContent) === null || _a === void 0 ? void 0 : _a.trim()) ? $placeholderEl : 'Select';
187
183
  if (this.multiple)
188
184
  this.type = SELECT_TYPES.multiple;
189
185
  }
@@ -264,7 +260,7 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
264
260
  $searchInput ? $searchInput.focus() : $optionToFocus === null || $optionToFocus === void 0 ? void 0 : $optionToFocus.focus();
265
261
  }
266
262
  connectedCallback() {
267
- var _a;
263
+ var _a, _b;
268
264
  super.connectedCallback();
269
265
  this.classList.add(SELECT_CSS_CLASSES.select);
270
266
  if (!this.searchDisabled) {
@@ -279,6 +275,10 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
279
275
  this._selectController.options$.subscribe(this._optionsObserver);
280
276
  this._selectedOptionsAriaObserver = new Observer((selectedOptions) => this._updateLabelAria(selectedOptions));
281
277
  this._selectController.selectedOptions$.subscribe(this._selectedOptionsAriaObserver);
278
+ const $placeholderEl = this.querySelector(`[slot="${SELECT_INPUT_PLACEHOLDER_SLOT_NAME}"]`);
279
+ if ($placeholderEl && ((_b = $placeholderEl.textContent) === null || _b === void 0 ? void 0 : _b.trim())) {
280
+ this.$placeholder = $placeholderEl;
281
+ }
282
282
  this._updateOptions();
283
283
  if (this.isDevSelectPlaceholderFlagEnabled) {
284
284
  this._addPlaceholderOptionIfNeeded();
@@ -487,7 +487,6 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
487
487
  content-width="full"
488
488
  prevent-focus-trap
489
489
  no-autofocus
490
- ?is-search-focus-trap-fix-enabled=${this.isSearchFocusTrapFixEnabled}
491
490
  >
492
491
  <h-dropdown-toggler
493
492
  ${ref(this.$dropdownToggler)}
@@ -639,10 +638,6 @@ __decorate([
639
638
  property({ type: Boolean, attribute: 'is-reactive-selection-flag-enabled' }),
640
639
  __metadata("design:type", Boolean)
641
640
  ], HSelect.prototype, "isReactiveSelectionFlagEnabled", void 0);
642
- __decorate([
643
- property({ type: Boolean, attribute: 'is-search-focus-trap-fix-enabled' }),
644
- __metadata("design:type", Boolean)
645
- ], HSelect.prototype, "isSearchFocusTrapFixEnabled", void 0);
646
641
  __decorate([
647
642
  property({
648
643
  converter: {
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wDAA4D;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wDAA4D;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -7,7 +7,6 @@ export declare class HModal extends PhoenixLightLitElement {
7
7
  transition: string;
8
8
  modalLabel: string;
9
9
  noAutofocus: boolean;
10
- isSearchFocusTrapFixEnabled: boolean;
11
10
  _firstFocusableElement: HTMLElement | undefined;
12
11
  _focusableElements: HTMLElement[] | null;
13
12
  _lastFocusableElement: HTMLElement | undefined;
@@ -18,7 +17,6 @@ export declare class HModal extends PhoenixLightLitElement {
18
17
  private _propsChangeStrategies;
19
18
  private static openModals;
20
19
  private _backdropController;
21
- private _focusTrapController;
22
20
  private static _appendModalsPortal;
23
21
  static isSomeModalOpen(): boolean;
24
22
  constructor();
@@ -9,8 +9,6 @@ import { createRef, ref } from 'lit-html/directives/ref.js';
9
9
  import { PORTAL_TARGET_COMPONENT_NAME, PORTAL_TARGET_NAME_PROP } from '../portal/portal_constants.js';
10
10
  import { BACKDROP_EVENTS } from '../backdrop/backdrop_constants.js';
11
11
  import { BackdropController } from '../backdrop/controller/backdrop_controller.js';
12
- import { FOCUS_TRAP_STRATEGY_TYPES } from '../../controllers/focus_trap_controller/strategies/focus_trap_strategy_constants.js';
13
- import { FocusTrapController } from '../../controllers/focus_trap_controller/focus_trap_controller.js';
14
12
  import { MODAL_OPENED_PROP, FOCUSABLE_ELEMENTS_WITHIN_MODAL, MODALS_PORTAL_NAME, MODAL_EVENTS } from './modal_constants.js';
15
13
  import { HModalClose } from './modal_close.js';
16
14
 
@@ -23,7 +21,6 @@ let HModal = HModal_1 = class HModal extends PhoenixLightLitElement {
23
21
  this.transition = 'scale';
24
22
  this.modalLabel = '';
25
23
  this.noAutofocus = false;
26
- this.isSearchFocusTrapFixEnabled = false;
27
24
  this._firstFocusableElement = undefined;
28
25
  this._focusableElements = null;
29
26
  this._lastFocusableElement = undefined;
@@ -39,35 +36,22 @@ let HModal = HModal_1 = class HModal extends PhoenixLightLitElement {
39
36
  document.addEventListener('keydown', this._bindCloseOnEsc);
40
37
  document.addEventListener(BACKDROP_EVENTS.clicked, this.close);
41
38
  this._dispatchModalOpenedEvent();
42
- this._focusTrapController.activate();
43
- if (this.isSearchFocusTrapFixEnabled) {
44
- this._focusTrapController.activate();
45
- }
46
- else {
47
- if (!this.noAutofocus) {
48
- setTimeout(() => {
49
- var _a;
50
- (_a = this._firstFocusableElement) === null || _a === void 0 ? void 0 : _a.focus();
51
- window.scrollTo(0, scrollY);
52
- }, 0);
53
- }
39
+ if (!this.noAutofocus) {
40
+ setTimeout(() => {
41
+ var _a;
42
+ (_a = this._firstFocusableElement) === null || _a === void 0 ? void 0 : _a.focus();
43
+ window.scrollTo(0, scrollY);
44
+ }, 0);
54
45
  }
55
46
  },
56
47
  false: () => {
57
48
  HModal_1.openModals = HModal_1.openModals.filter((modal) => modal !== this);
58
49
  document.removeEventListener('keydown', this._bindCloseOnEsc);
59
50
  document.removeEventListener(BACKDROP_EVENTS.clicked, this.close);
60
- if (this.isSearchFocusTrapFixEnabled)
61
- this._focusTrapController.deactivate();
62
51
  }
63
52
  }
64
53
  };
65
54
  this._backdropController = new BackdropController();
66
- this._focusTrapController = new FocusTrapController(this, {
67
- mode: FOCUS_TRAP_STRATEGY_TYPES.sentinel,
68
- getContainer: () => this._contentRef.value,
69
- noAutofocus: this.noAutofocus
70
- });
71
55
  this._keepFocusWithinModal = (ev) => {
72
56
  var _a;
73
57
  const isTabPressed = ev.code === 'Tab';
@@ -161,8 +145,7 @@ let HModal = HModal_1 = class HModal extends PhoenixLightLitElement {
161
145
  connectedCallback() {
162
146
  super.connectedCallback();
163
147
  HModal_1._appendModalsPortal();
164
- if (!this.isSearchFocusTrapFixEnabled)
165
- document.addEventListener('keyup', this._keepFocusWithinModal);
148
+ document.addEventListener('keyup', this._keepFocusWithinModal);
166
149
  document.addEventListener(MODAL_EVENTS.close, this._handleCloseFromCloseComponent);
167
150
  }
168
151
  disconnectedCallback() {
@@ -171,23 +154,17 @@ let HModal = HModal_1 = class HModal extends PhoenixLightLitElement {
171
154
  this.close();
172
155
  document.removeEventListener(MODAL_EVENTS.close, this._handleCloseFromCloseComponent);
173
156
  document.removeEventListener('keydown', this._bindCloseOnEsc);
174
- if (!this.isSearchFocusTrapFixEnabled)
175
- document.removeEventListener('keyup', this._keepFocusWithinModal);
157
+ document.removeEventListener('keyup', this._keepFocusWithinModal);
176
158
  }
177
159
  firstUpdated(props) {
178
160
  super.firstUpdated(props);
179
- if (!this.isSearchFocusTrapFixEnabled) {
180
- this._firstFocusableElement = this._focusSentinelStart.value;
181
- this._lastFocusableElement = this._focusSentinelEnd.value;
182
- }
161
+ this._firstFocusableElement = this._focusSentinelStart.value;
162
+ this._lastFocusableElement = this._focusSentinelEnd.value;
183
163
  }
184
164
  updated(changedProps) {
185
165
  if (changedProps.has(MODAL_OPENED_PROP)) {
186
166
  this._propsChangeStrategies[MODAL_OPENED_PROP][String(this[MODAL_OPENED_PROP])]();
187
167
  }
188
- if (this.isSearchFocusTrapFixEnabled && changedProps.has('noAutofocus')) {
189
- this._focusTrapController.strategy.noAutofocus = this.noAutofocus;
190
- }
191
168
  }
192
169
  _setFocusToFirstFocusableElementInModalOrCloseBtn() {
193
170
  if (this.noAutofocus)
@@ -216,8 +193,7 @@ let HModal = HModal_1 = class HModal extends PhoenixLightLitElement {
216
193
  setTimeout(() => {
217
194
  var _a;
218
195
  (_a = this._contentRef.value) === null || _a === void 0 ? void 0 : _a.classList.remove(`modal_show-${this.transition}-start`, `modal_show-${this.transition}-end`);
219
- if (!this.isSearchFocusTrapFixEnabled)
220
- this._setFocusToFirstFocusableElementInModalOrCloseBtn();
196
+ this._setFocusToFirstFocusableElementInModalOrCloseBtn();
221
197
  resolve();
222
198
  }, transitionDuration);
223
199
  });
@@ -276,10 +252,6 @@ __decorate([
276
252
  property({ type: Boolean, attribute: 'no-autofocus' }),
277
253
  __metadata("design:type", Object)
278
254
  ], HModal.prototype, "noAutofocus", void 0);
279
- __decorate([
280
- property({ type: Boolean, attribute: 'is-search-focus-trap-fix-enabled' }),
281
- __metadata("design:type", Boolean)
282
- ], HModal.prototype, "isSearchFocusTrapFixEnabled", void 0);
283
255
  __decorate([
284
256
  state(),
285
257
  __metadata("design:type", Object)
@@ -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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -6,7 +6,6 @@ export declare class HSheet extends PhoenixLightLitElement {
6
6
  class: string;
7
7
  transition: string;
8
8
  sheetLabel: string;
9
- isSearchFocusTrapFixEnabled: boolean;
10
9
  _firstFocusableElement: HTMLElement | undefined;
11
10
  _focusableElements: HTMLElement[] | null;
12
11
  _lastFocusableElement: HTMLElement | undefined;
@@ -17,7 +16,6 @@ export declare class HSheet extends PhoenixLightLitElement {
17
16
  private _propsChangeStrategies;
18
17
  private static openSheets;
19
18
  private _backdropController;
20
- private _focusTrapController;
21
19
  private static _appendSheetPortal;
22
20
  static isSomeSheetOpen(): boolean;
23
21
  constructor();
@@ -9,8 +9,6 @@ import { createRef, ref } from 'lit-html/directives/ref.js';
9
9
  import { PORTAL_TARGET_COMPONENT_NAME, PORTAL_TARGET_NAME_PROP } from '../portal/portal_constants.js';
10
10
  import { BACKDROP_EVENTS } from '../backdrop/backdrop_constants.js';
11
11
  import { BackdropController } from '../backdrop/controller/backdrop_controller.js';
12
- import { FOCUS_TRAP_STRATEGY_TYPES } from '../../controllers/focus_trap_controller/strategies/focus_trap_strategy_constants.js';
13
- import { FocusTrapController } from '../../controllers/focus_trap_controller/focus_trap_controller.js';
14
12
  import { SHEET_OPENED_PROP, FOCUSABLE_ELEMENTS_WITHIN_SHEET, SHEETS_PORTAL_NAME, SHEET_EVENTS } from './sheet_constants.js';
15
13
  import { HSheetClose } from './sheet_close.js';
16
14
 
@@ -22,7 +20,6 @@ let HSheet = HSheet_1 = class HSheet extends PhoenixLightLitElement {
22
20
  this.class = '';
23
21
  this.transition = 'scale';
24
22
  this.sheetLabel = '';
25
- this.isSearchFocusTrapFixEnabled = false;
26
23
  this._firstFocusableElement = undefined;
27
24
  this._focusableElements = null;
28
25
  this._lastFocusableElement = undefined;
@@ -38,31 +35,20 @@ let HSheet = HSheet_1 = class HSheet extends PhoenixLightLitElement {
38
35
  document.addEventListener('keydown', this._bindCloseOnEsc);
39
36
  document.addEventListener(BACKDROP_EVENTS.clicked, this.close);
40
37
  this._dispatchSheetOpenedEvent();
41
- if (this.isSearchFocusTrapFixEnabled) {
42
- this._focusTrapController.activate();
43
- }
44
- else {
45
- setTimeout(() => {
46
- var _a;
47
- (_a = this._firstFocusableElement) === null || _a === void 0 ? void 0 : _a.focus();
48
- window.scrollTo(0, scrollY);
49
- }, 0);
50
- }
38
+ setTimeout(() => {
39
+ var _a;
40
+ (_a = this._firstFocusableElement) === null || _a === void 0 ? void 0 : _a.focus();
41
+ window.scrollTo(0, scrollY);
42
+ }, 0);
51
43
  },
52
44
  false: () => {
53
45
  HSheet_1.openSheets = HSheet_1.openSheets.filter((sheet) => sheet !== this);
54
46
  document.removeEventListener('keydown', this._bindCloseOnEsc);
55
47
  document.removeEventListener(BACKDROP_EVENTS.clicked, this.close);
56
- if (this.isSearchFocusTrapFixEnabled)
57
- this._focusTrapController.deactivate();
58
48
  }
59
49
  }
60
50
  };
61
51
  this._backdropController = new BackdropController();
62
- this._focusTrapController = new FocusTrapController(this, {
63
- mode: FOCUS_TRAP_STRATEGY_TYPES.sentinel,
64
- getContainer: () => this._contentRef.value
65
- });
66
52
  this._keepFocusWithinSheet = (ev) => {
67
53
  var _a;
68
54
  const isTabPressed = ev.code === 'Tab';
@@ -156,8 +142,7 @@ let HSheet = HSheet_1 = class HSheet extends PhoenixLightLitElement {
156
142
  connectedCallback() {
157
143
  super.connectedCallback();
158
144
  HSheet_1._appendSheetPortal();
159
- if (!this.isSearchFocusTrapFixEnabled)
160
- document.addEventListener('keyup', this._keepFocusWithinSheet);
145
+ document.addEventListener('keyup', this._keepFocusWithinSheet);
161
146
  document.addEventListener(SHEET_EVENTS.close, this._handleCloseFromCloseComponent);
162
147
  }
163
148
  disconnectedCallback() {
@@ -166,15 +151,12 @@ let HSheet = HSheet_1 = class HSheet extends PhoenixLightLitElement {
166
151
  this.close();
167
152
  document.removeEventListener(SHEET_EVENTS.close, this._handleCloseFromCloseComponent);
168
153
  document.removeEventListener('keydown', this._bindCloseOnEsc);
169
- if (!this.isSearchFocusTrapFixEnabled)
170
- document.removeEventListener('keyup', this._keepFocusWithinSheet);
154
+ document.removeEventListener('keyup', this._keepFocusWithinSheet);
171
155
  }
172
156
  firstUpdated(props) {
173
157
  super.firstUpdated(props);
174
- if (!this.isSearchFocusTrapFixEnabled) {
175
- this._firstFocusableElement = this._focusSentinelStart.value;
176
- this._lastFocusableElement = this._focusSentinelEnd.value;
177
- }
158
+ this._firstFocusableElement = this._focusSentinelStart.value;
159
+ this._lastFocusableElement = this._focusSentinelEnd.value;
178
160
  }
179
161
  updated(changedProps) {
180
162
  if (changedProps.has(SHEET_OPENED_PROP)) {
@@ -206,8 +188,7 @@ let HSheet = HSheet_1 = class HSheet extends PhoenixLightLitElement {
206
188
  setTimeout(() => {
207
189
  var _a;
208
190
  (_a = this._contentRef.value) === null || _a === void 0 ? void 0 : _a.classList.remove(`sheet_show-${this.transition}-start`, `sheet_show-${this.transition}-end`);
209
- if (!this.isSearchFocusTrapFixEnabled)
210
- this._setFocusToFirstFocusableElementInSheetOrCloseBtn();
191
+ this._setFocusToFirstFocusableElementInSheetOrCloseBtn();
211
192
  resolve();
212
193
  }, transitionDuration);
213
194
  });
@@ -260,10 +241,6 @@ __decorate([
260
241
  property({ type: String, attribute: 'sheet-label' }),
261
242
  __metadata("design:type", Object)
262
243
  ], HSheet.prototype, "sheetLabel", void 0);
263
- __decorate([
264
- property({ type: Boolean, attribute: 'is-search-focus-trap-fix-enabled' }),
265
- __metadata("design:type", Boolean)
266
- ], HSheet.prototype, "isSearchFocusTrapFixEnabled", void 0);
267
244
  __decorate([
268
245
  state(),
269
246
  __metadata("design:type", Object)
@@ -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;AACA;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;"}
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.18.23-13",
5
+ "version": "1.18.23-15",
6
6
  "description": "phoenix design system",
7
7
  "author": "zefirek",
8
8
  "license": "MIT",
@@ -1,47 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
6
- require('lit');
7
- var sentinel_focus_trap_strategy = require('./strategies/sentinel_focus_trap_strategy/sentinel_focus_trap_strategy.js');
8
- var cyclic_focus_trap_strategy = require('./strategies/cyclic_focus_trap_strategy/cyclic_focus_trap_strategy.js');
9
- var toggler_focus_trap_strategy = require('./strategies/toggler_focus_trap_strategy/toggler_focus_trap_strategy.js');
10
- var focus_trap_strategy_constants = require('./strategies/focus_trap_strategy_constants.js');
11
-
12
- var _a, _FocusTrapController_strategy, _FocusTrapController_createStrategy;
13
- class FocusTrapController {
14
- constructor(host, props) {
15
- _FocusTrapController_strategy.set(this, void 0);
16
- tslib_es6.__classPrivateFieldSet(this, _FocusTrapController_strategy, tslib_es6.__classPrivateFieldGet(FocusTrapController, _a, "m", _FocusTrapController_createStrategy).call(FocusTrapController, props), "f");
17
- host.addController(this);
18
- }
19
- get strategy() {
20
- return tslib_es6.__classPrivateFieldGet(this, _FocusTrapController_strategy, "f");
21
- }
22
- hostConnected() {
23
- tslib_es6.__classPrivateFieldGet(this, _FocusTrapController_strategy, "f").attach();
24
- }
25
- hostDisconnected() {
26
- tslib_es6.__classPrivateFieldGet(this, _FocusTrapController_strategy, "f").detach();
27
- }
28
- activate() {
29
- tslib_es6.__classPrivateFieldGet(this, _FocusTrapController_strategy, "f").activate();
30
- }
31
- deactivate() {
32
- tslib_es6.__classPrivateFieldGet(this, _FocusTrapController_strategy, "f").deactivate();
33
- }
34
- getFocusableElements(container) {
35
- return tslib_es6.__classPrivateFieldGet(this, _FocusTrapController_strategy, "f").getFocusableElements(container);
36
- }
37
- }
38
- _a = FocusTrapController, _FocusTrapController_strategy = new WeakMap(), _FocusTrapController_createStrategy = function _FocusTrapController_createStrategy(props) {
39
- switch (props.mode) {
40
- case focus_trap_strategy_constants.FOCUS_TRAP_STRATEGY_TYPES.sentinel: return new sentinel_focus_trap_strategy.SentinelFocusTrapStrategy(props);
41
- case focus_trap_strategy_constants.FOCUS_TRAP_STRATEGY_TYPES.cyclic: return new cyclic_focus_trap_strategy.CyclicFocusTrapStrategy(props);
42
- case focus_trap_strategy_constants.FOCUS_TRAP_STRATEGY_TYPES.toggler: return new toggler_focus_trap_strategy.TogglerFocusTrapStrategy(props);
43
- }
44
- };
45
-
46
- exports.FocusTrapController = FocusTrapController;
47
- //# sourceMappingURL=focus_trap_controller.js.map
@@ -1 +0,0 @@
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;"}
@@ -1,66 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var utilities = require('@dreamcommerce/utilities');
6
-
7
- class BaseFocusTrapStrategy {
8
- constructor(getContainer) {
9
- this.getContainer = getContainer;
10
- this.active = false;
11
- this.noAutofocus = false;
12
- this._handleKeyDown = (ev) => {
13
- if (!this.active || ev.code !== 'Tab')
14
- return;
15
- const container = this.getContainer();
16
- if (!container)
17
- return;
18
- const focusableElements = this.getFocusableElements(container);
19
- if (focusableElements.length === 0)
20
- return;
21
- const $target = ev.target;
22
- if (ev.shiftKey) {
23
- if ($target === focusableElements[0]) {
24
- ev.preventDefault();
25
- focusableElements[focusableElements.length - 1].focus();
26
- }
27
- }
28
- else {
29
- if ($target === focusableElements[focusableElements.length - 1]) {
30
- ev.preventDefault();
31
- focusableElements[0].focus();
32
- }
33
- }
34
- };
35
- }
36
- attach() {
37
- document.addEventListener('keydown', this._handleKeyDown);
38
- }
39
- detach() {
40
- document.removeEventListener('keydown', this._handleKeyDown);
41
- }
42
- activate() {
43
- this.active = true;
44
- }
45
- deactivate() {
46
- this.active = false;
47
- }
48
- getFocusableElements(container) {
49
- return utilities.UiDomUtils.getFocusableElements(container).filter(($el) => this._isElementTrulyFocusable($el));
50
- }
51
- _isElementTrulyFocusable($el) {
52
- const style = window.getComputedStyle($el);
53
- if (style.display === 'none' || style.visibility === 'hidden') {
54
- return false;
55
- }
56
- if ($el.nodeName === 'H-PORTAL')
57
- return true;
58
- const $parent = $el.parentElement;
59
- if (!$parent)
60
- return true;
61
- return this._isElementTrulyFocusable($parent);
62
- }
63
- }
64
-
65
- exports.BaseFocusTrapStrategy = BaseFocusTrapStrategy;
66
- //# sourceMappingURL=base_focus_trap_strategy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,14 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var base_focus_trap_strategy = require('../base_focus_trap_strategy.js');
6
-
7
- class CyclicFocusTrapStrategy extends base_focus_trap_strategy.BaseFocusTrapStrategy {
8
- constructor({ getContainer }) {
9
- super(getContainer);
10
- }
11
- }
12
-
13
- exports.CyclicFocusTrapStrategy = CyclicFocusTrapStrategy;
14
- //# sourceMappingURL=cyclic_focus_trap_strategy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -1,12 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const FOCUS_TRAP_STRATEGY_TYPES = {
6
- cyclic: 'cyclic',
7
- toggler: 'toggler',
8
- sentinel: 'sentinel',
9
- };
10
-
11
- exports.FOCUS_TRAP_STRATEGY_TYPES = FOCUS_TRAP_STRATEGY_TYPES;
12
- //# sourceMappingURL=focus_trap_strategy_constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -1,29 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var base_focus_trap_strategy = require('../base_focus_trap_strategy.js');
6
-
7
- class SentinelFocusTrapStrategy extends base_focus_trap_strategy.BaseFocusTrapStrategy {
8
- constructor({ getContainer, noAutofocus = false }) {
9
- super(getContainer);
10
- this.noAutofocus = noAutofocus;
11
- }
12
- activate() {
13
- this.active = true;
14
- if (!this.noAutofocus) {
15
- requestAnimationFrame(() => {
16
- const container = this.getContainer();
17
- if (!container)
18
- return;
19
- const focusableElements = this.getFocusableElements(container);
20
- const shouldSkipStartSentinel = focusableElements.length > 1;
21
- const $firstFocusableContentElement = shouldSkipStartSentinel ? focusableElements[1] : focusableElements[0];
22
- $firstFocusableContentElement === null || $firstFocusableContentElement === void 0 ? void 0 : $firstFocusableContentElement.focus();
23
- });
24
- }
25
- }
26
- }
27
-
28
- exports.SentinelFocusTrapStrategy = SentinelFocusTrapStrategy;
29
- //# sourceMappingURL=sentinel_focus_trap_strategy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;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,60 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var tslib_es6 = require('../../../../../../../external/tslib/tslib.es6.js');
6
- var base_focus_trap_strategy = require('../base_focus_trap_strategy.js');
7
-
8
- var _TogglerFocusTrapStrategy_getToggler;
9
- class TogglerFocusTrapStrategy extends base_focus_trap_strategy.BaseFocusTrapStrategy {
10
- constructor({ getContainer, getToggler }) {
11
- super(getContainer);
12
- _TogglerFocusTrapStrategy_getToggler.set(this, void 0);
13
- this._handleKeyDown = (ev) => {
14
- var _a;
15
- if (!this.active || ev.code !== 'Tab')
16
- return;
17
- const container = this.getContainer();
18
- const toggler = (_a = tslib_es6.__classPrivateFieldGet(this, _TogglerFocusTrapStrategy_getToggler, "f")) === null || _a === void 0 ? void 0 : _a.call(this);
19
- if (!container || !toggler)
20
- return;
21
- const $target = ev.target;
22
- const focusableElements = this.getFocusableElements(container);
23
- if (ev.shiftKey) {
24
- if (toggler.contains($target))
25
- return this._focusLastContentElement(ev, focusableElements);
26
- if ($target === focusableElements[0])
27
- return this._returnToToggler(ev, toggler);
28
- }
29
- else {
30
- if (toggler.contains($target))
31
- return this._focusFirstContentElement(ev, focusableElements);
32
- if ($target === focusableElements[focusableElements.length - 1])
33
- return this._returnToToggler(ev, toggler);
34
- }
35
- };
36
- tslib_es6.__classPrivateFieldSet(this, _TogglerFocusTrapStrategy_getToggler, getToggler, "f");
37
- }
38
- _focusLastContentElement(ev, focusableElements) {
39
- const last = focusableElements[focusableElements.length - 1];
40
- if (!last)
41
- return;
42
- ev.preventDefault();
43
- last.focus();
44
- }
45
- _focusFirstContentElement(ev, focusableElements) {
46
- const first = focusableElements[0];
47
- if (!first)
48
- return;
49
- ev.preventDefault();
50
- first.focus();
51
- }
52
- _returnToToggler(ev, toggler) {
53
- ev.preventDefault();
54
- toggler.focus();
55
- }
56
- }
57
- _TogglerFocusTrapStrategy_getToggler = new WeakMap();
58
-
59
- exports.TogglerFocusTrapStrategy = TogglerFocusTrapStrategy;
60
- //# sourceMappingURL=toggler_focus_trap_strategy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,kDAAsD;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,13 +0,0 @@
1
- import { ReactiveController, ReactiveControllerHost } from 'lit';
2
- import type { TFocusTrapProps } from './focus_trap_controller_types';
3
- import { IBaseFocusTrapStrategy } from './strategies/base_focus_trap_strategy_types';
4
- export declare class FocusTrapController implements ReactiveController {
5
- #private;
6
- constructor(host: ReactiveControllerHost, props: TFocusTrapProps);
7
- get strategy(): IBaseFocusTrapStrategy;
8
- hostConnected(): void;
9
- hostDisconnected(): void;
10
- activate(): void;
11
- deactivate(): void;
12
- getFocusableElements(container: HTMLElement): HTMLElement[];
13
- }