@shoper/phoenix_design_system 1.11.10-0 → 1.11.10-10

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 (53) hide show
  1. package/build/cjs/packages/phoenix/src/components/form/file_picker/file_picker.js +0 -1
  2. package/build/cjs/packages/phoenix/src/components/form/file_picker/file_picker.js.map +1 -1
  3. package/build/cjs/packages/phoenix/src/components/form/search/search.js +247 -66
  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/search_constants.js +1 -1
  6. package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/buttons/search_clear.js +5 -0
  7. package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/buttons/search_clear.js.map +1 -1
  8. package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/history/search_history.js +26 -7
  9. package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/history/search_history.js.map +1 -1
  10. package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/input/search_input.js +20 -10
  11. package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/input/search_input.js.map +1 -1
  12. package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.js +15 -4
  13. package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.js.map +1 -1
  14. package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js +15 -4
  15. package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js.map +1 -1
  16. package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_results.js +22 -3
  17. package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_results.js.map +1 -1
  18. package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_suggestion_content.js +17 -4
  19. package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_suggestion_content.js.map +1 -1
  20. package/build/cjs/packages/phoenix/src/components/form/select/select.js +1 -1
  21. package/build/cjs/packages/phoenix/src/index.js +6 -6
  22. package/build/esm/packages/phoenix/src/components/form/file_picker/file_picker.js +0 -1
  23. package/build/esm/packages/phoenix/src/components/form/file_picker/file_picker.js.map +1 -1
  24. package/build/esm/packages/phoenix/src/components/form/search/search.d.ts +22 -2
  25. package/build/esm/packages/phoenix/src/components/form/search/search.js +248 -67
  26. package/build/esm/packages/phoenix/src/components/form/search/search.js.map +1 -1
  27. package/build/esm/packages/phoenix/src/components/form/search/search_constants.d.ts +1 -1
  28. package/build/esm/packages/phoenix/src/components/form/search/search_constants.js +1 -1
  29. package/build/esm/packages/phoenix/src/components/form/search/search_types.d.ts +10 -0
  30. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/buttons/search_clear.d.ts +2 -1
  31. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/buttons/search_clear.js +5 -0
  32. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/buttons/search_clear.js.map +1 -1
  33. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/history/search_history.d.ts +2 -1
  34. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/history/search_history.js +26 -7
  35. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/history/search_history.js.map +1 -1
  36. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/input/search_input.d.ts +2 -1
  37. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/input/search_input.js +21 -11
  38. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/input/search_input.js.map +1 -1
  39. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.d.ts +3 -1
  40. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.js +15 -4
  41. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.js.map +1 -1
  42. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.d.ts +3 -1
  43. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js +15 -4
  44. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js.map +1 -1
  45. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_results.d.ts +4 -1
  46. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_results.js +22 -3
  47. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_results.js.map +1 -1
  48. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_suggestion_content.d.ts +3 -1
  49. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_suggestion_content.js +17 -4
  50. package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_suggestion_content.js.map +1 -1
  51. package/build/esm/packages/phoenix/src/components/form/select/select.js +1 -1
  52. package/build/esm/packages/phoenix/src/index.js +2 -2
  53. package/package.json +1 -1
@@ -1,21 +1,28 @@
1
1
  import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
2
2
  import { html } from 'lit';
3
3
  import { property, state } from 'lit/decorators';
4
+ import { UiDomUtils } from '@dreamcommerce/utilities';
4
5
  import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
5
6
  import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
6
7
  import { ICONS_SIZES } from '../../icon/icon_constants.js';
7
8
  import { Observer } from '../../../core/classes/observer/observer.js';
8
9
  import { ContextConsumerController } from '../../../core/context/context_consumer_controller.js';
9
10
  import { BehaviorSubject } from '../../../core/classes/behavior_subject/behavior_subject.js';
11
+ import { createRef, ref } from 'lit-html/directives/ref.js';
10
12
  import { ContextProviderController } from '../../../core/context/context_provider_controller.js';
11
13
  import { BREAKPOINTS } from '../../../global_constants.js';
14
+ import v4 from '../../../../../../external/uuid/dist/esm-browser/v4.js';
12
15
  import { when as n } from '../../../../../../external/lit/external/lit-html/directives/when.js';
13
- import { DEFAULT_VIEW, SEARCH_CLASS_NAMES, SCROLL_DIRECTIONS, SEARCH_CONFIGURATION, SEARCH_COMPONENT_NAMES, SEARCH_CONTEXT_NAMES, SEARCH_CUSTOM_EVENT_NAMES } from './search_constants.js';
16
+ import { DEFAULT_VIEW, SEARCH_CLASS_NAMES, SEARCH_CONFIGURATION, SEARCH_COMPONENT_NAMES, SEARCH_CONTEXT_NAMES, SEARCH_CUSTOM_EVENT_NAMES } from './search_constants.js';
14
17
 
15
18
  let HSearch = class HSearch extends PhoenixLightLitElement {
16
19
  constructor() {
17
20
  super(...arguments);
18
21
  this.view = DEFAULT_VIEW;
22
+ this._id = v4();
23
+ this._searchContentContainerId = v4();
24
+ this._searchResultsRef = createRef();
25
+ this._searchHistoryRef = createRef();
19
26
  this._shouldShowHistory = false;
20
27
  this._shouldShowResults = false;
21
28
  this._shouldShowMessage = false;
@@ -25,25 +32,36 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
25
32
  this._historyContext = new BehaviorSubject({
26
33
  showLoadMore: false
27
34
  });
28
- this._activeItemId = -1;
35
+ this._activeItemId = `${this._id}-1`;
29
36
  this._translations = {};
37
+ this._containerRole = 'grid';
30
38
  this._bindKeys = (ev) => {
31
- var _a;
32
- const searchItemsCount = this._getSearchItemsCount();
33
39
  switch (ev.key) {
34
40
  case 'ArrowDown':
35
41
  ev.preventDefault();
36
- this._activeItemId = this._activeItemId === searchItemsCount - 1 ? 0 : this._activeItemId + 1;
37
- this._scroll(SCROLL_DIRECTIONS.down);
42
+ this._handleForwardListFocus();
38
43
  break;
39
44
  case 'ArrowUp':
40
45
  ev.preventDefault();
41
- this._activeItemId = this._activeItemId === 0 || this._activeItemId === -1 ? searchItemsCount - 1 : this._activeItemId - 1;
42
- this._scroll(SCROLL_DIRECTIONS.up);
46
+ this._handleBackwardListFocus();
47
+ break;
48
+ case 'ArrowLeft':
49
+ ev.preventDefault();
50
+ if (this._containerRole === 'grid')
51
+ this._handleBackwardGridFocus();
52
+ if (this._containerRole === 'listbox')
53
+ this._handleMoveToInputFieldOnArrowLeft();
54
+ break;
55
+ case 'ArrowRight':
56
+ ev.preventDefault();
57
+ if (this._containerRole === 'grid')
58
+ this._handleForwardGridFocus();
59
+ if (this._containerRole === 'listbox')
60
+ this._handleMoveToInputFieldOnArrowRight();
43
61
  break;
44
62
  case 'Enter':
45
63
  ev.preventDefault();
46
- if (this._activeItemId === -1)
64
+ if (this._activeItemId === `${this._id}-1` || !this._shouldShowResults)
47
65
  return;
48
66
  this._handleChooseSearchItem();
49
67
  break;
@@ -52,28 +70,138 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
52
70
  this._inputField.blur();
53
71
  this._resetSearchView();
54
72
  break;
73
+ case 'End':
74
+ ev.preventDefault();
75
+ this._handleFocusOnInputWithMarkerEnd();
76
+ break;
77
+ case 'Home':
78
+ ev.preventDefault();
79
+ this._handleFocusOnInputWithMarkerStart();
80
+ break;
55
81
  case 'Tab':
56
- const isFocusedOnSearchInput = !!((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.matches('input[type="search"]'));
82
+ const isFocusedOnSearchInput = document.activeElement === this._inputField;
83
+ if (ev.shiftKey && !isFocusedOnSearchInput) {
84
+ this._focusOnPreviousElementBeforeSearchInput(ev);
85
+ return;
86
+ }
57
87
  if (!isFocusedOnSearchInput) {
58
88
  const searchBar = this.querySelector(`.${SEARCH_CLASS_NAMES.searchBar}`);
59
89
  searchBar === null || searchBar === void 0 ? void 0 : searchBar.classList.remove(SEARCH_CLASS_NAMES.outline);
60
90
  this._resetSearchView();
61
91
  document.removeEventListener('keyup', this._bindKeys);
92
+ this._focusOnNextElementAfterSearchInput(ev);
62
93
  }
63
94
  break;
64
95
  }
65
96
  };
66
- this._getSearchItemsCount = () => {
67
- if (this._shouldShowHistory)
68
- return this._historyLimitedContent.length;
69
- let searchItemsCount = this._searchResults.products.length +
70
- this._searchResults.categories.length +
71
- this._searchResults.suggestions.length +
72
- this._searchResults.producers.length;
73
- if (this._searchResults.products.length && this._searchResults.suggestions.length) {
74
- searchItemsCount += 1;
97
+ this._focusOnPreviousElementBeforeSearchInput = async (ev) => {
98
+ ev.preventDefault();
99
+ const searchBar = this.querySelector(`.${SEARCH_CLASS_NAMES.searchBar}`);
100
+ searchBar === null || searchBar === void 0 ? void 0 : searchBar.classList.remove(SEARCH_CLASS_NAMES.outline);
101
+ this._resetSearchView();
102
+ document.removeEventListener('keyup', this._bindKeys);
103
+ UiDomUtils.getPreviousFocusableElement(this._inputField).focus();
104
+ };
105
+ this._focusOnNextElementAfterSearchInput = async (ev) => {
106
+ ev.preventDefault();
107
+ UiDomUtils.getNextFocusableElement(this._inputField).focus();
108
+ };
109
+ this._preventScrollingOnSearchContentBrowsing = (ev) => {
110
+ var _a;
111
+ const hasArrowBeenPressed = ev.key === "ArrowUp" || ev.key === "ArrowDown";
112
+ const hasSearchContainerParent = !!((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.closest('.search__container'));
113
+ if (hasArrowBeenPressed && hasSearchContainerParent) {
114
+ ev.preventDefault();
75
115
  }
76
- return searchItemsCount;
116
+ };
117
+ this._handleForwardListFocus = () => {
118
+ var _a, _b;
119
+ const $searchItemsContainer = this._searchHistoryRef.value || this._searchResultsRef.value;
120
+ if (!$searchItemsContainer)
121
+ return;
122
+ const isActiveElementAGridSearchItem = (_b = (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.getAttribute('data-search-item-id')) === null || _b === void 0 ? void 0 : _b.includes('grid');
123
+ const $listSearchItems = UiDomUtils.getFocusableElements($searchItemsContainer).filter(($el) => {
124
+ const searchItemId = $el.getAttribute('data-search-item-id');
125
+ const isListSearchItem = !!searchItemId && !searchItemId.includes('grid');
126
+ const isGridSearchItem = !!searchItemId && searchItemId.includes('grid');
127
+ return isActiveElementAGridSearchItem ? isGridSearchItem : isListSearchItem;
128
+ });
129
+ this._handleForwardFocus($listSearchItems);
130
+ };
131
+ this._handleForwardGridFocus = () => {
132
+ const $searchItemsContainer = this._searchHistoryRef.value || this._searchResultsRef.value;
133
+ if (!$searchItemsContainer)
134
+ return;
135
+ const $gridSearchItems = UiDomUtils.getFocusableElements($searchItemsContainer).filter(($el) => {
136
+ return !!$el.getAttribute('data-search-item-id');
137
+ });
138
+ this._handleForwardFocus($gridSearchItems);
139
+ };
140
+ this._handleForwardFocus = ($searchItems) => {
141
+ var _a;
142
+ const $activeElement = document.activeElement;
143
+ const indexOfCurrentElement = $searchItems.indexOf($activeElement);
144
+ const indexOfNextElement = indexOfCurrentElement === $searchItems.length - 1 ? 0 : indexOfCurrentElement + 1;
145
+ const $nextSearchItemElement = $searchItems[indexOfNextElement];
146
+ $nextSearchItemElement.focus();
147
+ this._setActiveItemId((_a = $nextSearchItemElement.getAttribute('data-search-item-id')) !== null && _a !== void 0 ? _a : `${this._id}-1`);
148
+ };
149
+ this._handleMoveToInputFieldOnArrowLeft = () => {
150
+ this._inputField.focus();
151
+ const currentPosition = this._inputField.selectionStart || 0;
152
+ const newPosition = Math.max(currentPosition - 1, 0);
153
+ this._inputField.setSelectionRange(newPosition, newPosition);
154
+ };
155
+ this._handleMoveToInputFieldOnArrowRight = () => {
156
+ this._inputField.focus();
157
+ const currentPosition = this._inputField.selectionStart || 0;
158
+ const newPosition = Math.max(currentPosition - 1, 0);
159
+ this._inputField.setSelectionRange(newPosition, newPosition);
160
+ };
161
+ this._handleBackwardListFocus = () => {
162
+ var _a, _b;
163
+ const $searchItemsContainer = this._searchHistoryRef.value || this._searchResultsRef.value;
164
+ if (!$searchItemsContainer)
165
+ return;
166
+ const isActiveElementAGridSearchItem = (_b = (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.getAttribute('data-search-item-id')) === null || _b === void 0 ? void 0 : _b.includes('grid');
167
+ const $listSearchItems = UiDomUtils.getFocusableElements($searchItemsContainer).filter(($el) => {
168
+ const searchItemId = $el.getAttribute('data-search-item-id');
169
+ const isListSearchItem = !!searchItemId && !searchItemId.includes('grid');
170
+ const isGridSearchItem = !!searchItemId && searchItemId.includes('grid');
171
+ return isActiveElementAGridSearchItem ? isGridSearchItem : isListSearchItem;
172
+ });
173
+ this._handleBackwardFocus($listSearchItems);
174
+ };
175
+ this._handleBackwardGridFocus = () => {
176
+ const $searchItemsContainer = this._searchHistoryRef.value || this._searchResultsRef.value;
177
+ if (!$searchItemsContainer)
178
+ return;
179
+ const $gridSearchItems = UiDomUtils.getFocusableElements($searchItemsContainer).filter(($el) => {
180
+ return !!$el.getAttribute('data-search-item-id');
181
+ });
182
+ this._handleBackwardFocus($gridSearchItems);
183
+ };
184
+ this._handleBackwardFocus = ($searchItems) => {
185
+ var _a;
186
+ const $activeElement = document.activeElement;
187
+ const indexOfCurrentElement = $searchItems.indexOf($activeElement);
188
+ const indexOfPreviousElement = indexOfCurrentElement === 0 ? $searchItems.length - 1 : indexOfCurrentElement - 1;
189
+ const $previousSearchItemElement = $searchItems[indexOfPreviousElement];
190
+ $previousSearchItemElement.focus();
191
+ this._setActiveItemId((_a = $previousSearchItemElement.getAttribute('data-search-item-id')) !== null && _a !== void 0 ? _a : `${this._id}-1`);
192
+ };
193
+ this._setActiveItemId = (newActiveItemId) => {
194
+ this._activeItemId = newActiveItemId;
195
+ this._inputField.setAttribute('aria-activedescendant', this._activeItemId);
196
+ };
197
+ this._handleFocusOnInputWithMarkerEnd = () => {
198
+ this._inputField.focus();
199
+ const endPosition = this._inputField.value.length;
200
+ this._inputField.setSelectionRange(endPosition, endPosition);
201
+ };
202
+ this._handleFocusOnInputWithMarkerStart = () => {
203
+ this._inputField.focus();
204
+ this._inputField.setSelectionRange(0, 0);
77
205
  };
78
206
  this._hideSuggesterOnClickOutside = (ev) => {
79
207
  const outsideClick = typeof ev.composedPath === 'function' && !ev.composedPath().includes(this);
@@ -95,10 +223,21 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
95
223
  try {
96
224
  this._searchContextConsumer = new ContextConsumerController(this);
97
225
  this._searchContext$ = await this._searchContextConsumer.consumeAsync(this.moduleInstanceId);
226
+ const ariaTranslations = {
227
+ historyGuideAriaLabel: this.settings.historyGuideAriaLabel,
228
+ suggesterGuideAriaLabel: this.settings.suggesterGuideAriaLabel,
229
+ historyItemAriaLabel: this.settings.historyItemAriaLabel,
230
+ suggesterItemAriaLabel: this.settings.suggesterItemAriaLabel,
231
+ suggesterProductItemAriaLabel: this.settings.suggesterProductItemAriaLabel,
232
+ suggesterProducerItemAriaLabel: this.settings.suggesterProducerItemAriaLabel
233
+ };
98
234
  this._searchContextObserver = new Observer((searchData) => {
99
235
  this._searchResults = searchData.results;
100
236
  this._searchHistory = searchData.history;
101
- this._translations = searchData.translations;
237
+ this._translations = {
238
+ ...searchData.translations,
239
+ ...ariaTranslations
240
+ };
102
241
  this._searchPhrase = searchData.searchPhrase;
103
242
  this._historyContext.notify({ showLoadMore: this._searchHistory.length > SEARCH_CONFIGURATION.historyContentLimit });
104
243
  this._historyLimitedContent = this._searchHistory.slice(0, SEARCH_CONFIGURATION.historyContentLimit);
@@ -149,6 +288,7 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
149
288
  const shouldShowMessage = ev.detail.searchPhrase !== '';
150
289
  this._updateSearchView(ev.detail.searchPhrase, shouldShowMessage, false);
151
290
  document.addEventListener('keyup', this._bindKeys);
291
+ document.addEventListener('keydown', this._preventScrollingOnSearchContentBrowsing);
152
292
  });
153
293
  this.addEventListener(SEARCH_CUSTOM_EVENT_NAMES.keyup, (ev) => {
154
294
  const shouldShowMessage = ev.detail.searchPhrase !== '';
@@ -159,7 +299,7 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
159
299
  this._updateSearchView('', false);
160
300
  });
161
301
  this.addEventListener(SEARCH_CUSTOM_EVENT_NAMES.submit, () => {
162
- if (this._activeItemId !== -1)
302
+ if (this._activeItemId !== `${this._id}-1`)
163
303
  return;
164
304
  if (this._inputField.value === '') {
165
305
  this._updateSearchView(this._inputField.value, true);
@@ -186,7 +326,8 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
186
326
  }
187
327
  _updateSearchView(searchPhrase, shouldShowMessage, shouldUpdateSearchPhrase = true) {
188
328
  this._shouldShowMessage = shouldShowMessage;
189
- this._activeItemId = -1;
329
+ this._setActiveItemId(`${this._id}-1`);
330
+ this._inputField.setAttribute('aria-activedescendant', this._activeItemId);
190
331
  this._displaySuggester(searchPhrase);
191
332
  if (!shouldUpdateSearchPhrase)
192
333
  return;
@@ -204,36 +345,56 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
204
345
  }
205
346
  }
206
347
  _displayHistorySuggestions() {
207
- this._shouldShowHistory = true;
208
- this._shouldShowResults = false;
348
+ this._handleToggleHistoryAndResults({
349
+ shouldShowHistory: true,
350
+ shouldShowResults: false
351
+ });
209
352
  }
210
353
  _hideHistorySuggestionsAndResults() {
211
- this._shouldShowHistory = false;
212
- this._shouldShowResults = false;
354
+ this._handleToggleHistoryAndResults({
355
+ shouldShowHistory: false,
356
+ shouldShowResults: false
357
+ });
213
358
  }
214
359
  _displayResults() {
215
- this._shouldShowHistory = false;
216
- this._shouldShowResults = true;
360
+ this._handleToggleHistoryAndResults({
361
+ shouldShowHistory: false,
362
+ shouldShowResults: true
363
+ });
217
364
  }
218
- _scroll(direction) {
219
- const searchContainer = this.querySelector(`.${SEARCH_CLASS_NAMES.container}`);
220
- const maxScrollTop = searchContainer.scrollHeight - searchContainer.clientHeight;
221
- const activeItem = this.querySelector(`[data-search-item-id="${this._activeItemId}"]`);
222
- const activeItemHeight = (activeItem === null || activeItem === void 0 ? void 0 : activeItem.getBoundingClientRect().height) || 0;
223
- let top;
224
- if (direction === SCROLL_DIRECTIONS.up) {
225
- top = searchContainer.scrollTop == 0 ? 0 : searchContainer.scrollTop + 30 - activeItemHeight;
365
+ _handleToggleHistoryAndResults({ shouldShowHistory, shouldShowResults }) {
366
+ this._shouldShowHistory = shouldShowHistory;
367
+ this._shouldShowResults = shouldShowResults;
368
+ this._toggleSearchInputAttributes(shouldShowHistory, shouldShowResults);
369
+ this._toggleSearchContainerAttributes(shouldShowHistory, shouldShowResults);
370
+ }
371
+ _toggleSearchInputAttributes(shouldShowHistory, shouldShowResults) {
372
+ var _a;
373
+ const $input = (_a = this._searchInput) === null || _a === void 0 ? void 0 : _a.input;
374
+ if (!$input)
375
+ return;
376
+ if (!shouldShowHistory && !shouldShowResults) {
377
+ $input.removeAttribute('aria-label');
378
+ $input.setAttribute('aria-activedescendant', '');
379
+ return;
226
380
  }
227
- else {
228
- top = searchContainer.scrollTop == maxScrollTop ? maxScrollTop : activeItemHeight + searchContainer.scrollTop - 30;
381
+ $input.setAttribute('aria-expanded', 'true');
382
+ if (shouldShowHistory) {
383
+ $input.setAttribute('aria-label', this.settings.historyGuideAriaLabel);
384
+ $input.setAttribute('aria-haspopup', 'grid');
229
385
  }
230
- if (this._activeItemId === this._getSearchItemsCount() - 1) {
231
- top = maxScrollTop;
386
+ if (shouldShowResults) {
387
+ $input.setAttribute('aria-label', this.settings.suggesterGuideAriaLabel);
388
+ this._inputField.removeAttribute('aria-haspopup');
232
389
  }
233
- if (this._activeItemId === 0) {
234
- top = 0;
390
+ }
391
+ _toggleSearchContainerAttributes(shouldShowHistory, shouldShowResults) {
392
+ if (shouldShowHistory) {
393
+ this._containerRole = 'grid';
394
+ }
395
+ if (shouldShowResults) {
396
+ this._containerRole = 'listbox';
235
397
  }
236
- searchContainer === null || searchContainer === void 0 ? void 0 : searchContainer.scrollTo({ top, behavior: 'smooth' });
237
398
  }
238
399
  _handleChooseSearchItem() {
239
400
  const activeSearchItem = this.querySelector(`[data-search-item-id="${this._activeItemId}"]`);
@@ -244,7 +405,7 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
244
405
  }
245
406
  _resetSearchView() {
246
407
  this._shouldShowMessage = false;
247
- this._activeItemId = -1;
408
+ this._setActiveItemId(`${this._id}-1`);
248
409
  const searchBar = this.querySelector(`.${SEARCH_CLASS_NAMES.searchBar}`);
249
410
  searchBar === null || searchBar === void 0 ? void 0 : searchBar.classList.remove(SEARCH_CLASS_NAMES.outline);
250
411
  this._hideHistorySuggestionsAndResults();
@@ -283,31 +444,47 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
283
444
  <div class="labeled-icon__signature">${this._translations.search}</div>
284
445
  </div>
285
446
 
286
- ${n(this._isSuggesterLayerVisible(), () => html `<div class="${SEARCH_CLASS_NAMES.container}">
287
- ${n(this._shouldShowMessage, () => html `<h-search-message
288
- .history="${this._historyLimitedContent}"
289
- .results="${this._searchResults}"
290
- .translations="${this._translations}"
291
- search-phrase="${this._searchPhrase}"
292
- module-instance-id="${this.moduleInstanceId}"
293
- ></h-search-message>`)}
294
- ${n(this._shouldShowHistory, () => html `<h-search-history
447
+ ${n(this._isSuggesterLayerVisible(), () => html `
448
+ <div
449
+ class="${SEARCH_CLASS_NAMES.container}"
450
+ id="${this._searchContentContainerId}"
451
+ role="${this._containerRole}"
452
+ >
453
+ ${n(this._shouldShowMessage, () => html `<h-search-message
295
454
  .history="${this._historyLimitedContent}"
296
- .translations="${this._translations}"
297
- active-item-id="${this._activeItemId}"
298
- module-instance-id="${this.moduleInstanceId}"
299
- ></h-search-history>`)}
300
- ${n(this._shouldShowResults, () => html `<h-search-results
301
455
  .results="${this._searchResults}"
302
- search-phrase="${this._searchPhrase}"
303
- .settings="${this.settings}"
304
- locale="${this.locale}"
305
- view="${this.view}"
306
456
  .translations="${this._translations}"
307
- active-item-id="${this._activeItemId}"
457
+ search-phrase="${this._searchPhrase}"
308
458
  module-instance-id="${this.moduleInstanceId}"
309
- ></h-search-results>`)}
310
- </div>`)}
459
+ ></h-search-message>`)}
460
+ ${n(this._shouldShowHistory, () => html `<h-search-history
461
+ ${ref(this._searchHistoryRef)}
462
+ .history="${this._historyLimitedContent}"
463
+ .translations="${this._translations}"
464
+ active-item-id="${this._activeItemId}"
465
+ search-id="${this._id}"
466
+ module-instance-id="${this.moduleInstanceId}"
467
+ ></h-search-history>`)}
468
+ ${n(this._shouldShowResults, () => html `<h-search-results
469
+ ${ref(this._searchResultsRef)}
470
+ .results="${this._searchResults}"
471
+ search-phrase="${this._searchPhrase}"
472
+ .settings="${this.settings}"
473
+ locale="${this.locale}"
474
+ view="${this.view}"
475
+ .translations="${this._translations}"
476
+ active-item-id="${this._activeItemId}"
477
+ search-id="${this._id}"
478
+ module-instance-id="${this.moduleInstanceId}"
479
+ ></h-search-results>`)}
480
+ </div>
481
+ `, () => html `
482
+ <div
483
+ class="${SEARCH_CLASS_NAMES.container}"
484
+ id="${this._searchContentContainerId}"
485
+ role="${this._containerRole}"
486
+ hidden
487
+ ></div>`)}
311
488
  `;
312
489
  }
313
490
  };
@@ -361,12 +538,16 @@ __decorate([
361
538
  ], HSearch.prototype, "_historyContext", void 0);
362
539
  __decorate([
363
540
  state(),
364
- __metadata("design:type", Number)
541
+ __metadata("design:type", String)
365
542
  ], HSearch.prototype, "_activeItemId", void 0);
366
543
  __decorate([
367
544
  state(),
368
545
  __metadata("design:type", Object)
369
546
  ], HSearch.prototype, "_translations", void 0);
547
+ __decorate([
548
+ state(),
549
+ __metadata("design:type", String)
550
+ ], HSearch.prototype, "_containerRole", void 0);
370
551
  HSearch = __decorate([
371
552
  phoenixCustomElement(SEARCH_COMPONENT_NAMES.search)
372
553
  ], HSearch);
@@ -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,0BAA0B,qEAA6E;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,wDAA4D;AAC3E,0BAA0B,qEAA6E;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -24,7 +24,7 @@ export declare const SEARCH_CUSTOM_EVENT_NAMES: {
24
24
  readonly clear: "clearSearchPhrase";
25
25
  readonly submit: "submitSearchPhrase";
26
26
  readonly close: "close";
27
- readonly search: "search";
27
+ readonly search: "performSearch";
28
28
  readonly updateSearchPhrase: "updateSearchPhrase";
29
29
  readonly focusin: "searchFocusIn";
30
30
  readonly keyup: "searchKeyUp";
@@ -23,7 +23,7 @@ const SEARCH_CUSTOM_EVENT_NAMES = {
23
23
  clear: 'clearSearchPhrase',
24
24
  submit: 'submitSearchPhrase',
25
25
  close: 'close',
26
- search: 'search',
26
+ search: 'performSearch',
27
27
  updateSearchPhrase: 'updateSearchPhrase',
28
28
  focusin: 'searchFocusIn',
29
29
  keyup: 'searchKeyUp'
@@ -68,6 +68,12 @@ export declare type TSearchSettings = {
68
68
  showProductRate: boolean;
69
69
  showProductAvailability: boolean;
70
70
  showProductPrice: boolean;
71
+ historyGuideAriaLabel: string;
72
+ suggesterGuideAriaLabel: string;
73
+ historyItemAriaLabel: string;
74
+ suggesterItemAriaLabel: string;
75
+ suggesterProductItemAriaLabel: string;
76
+ suggesterProducerItemAriaLabel: string;
71
77
  };
72
78
  export declare type TScrollDirection = TEnumLiteralsOf<typeof SCROLL_DIRECTIONS>;
73
79
  export declare type TSuggestionType = TEnumLiteralsOf<typeof SUGGESTIONS_TYPE>;
@@ -77,3 +83,7 @@ export declare type TSuggestion = {
77
83
  categoryName?: string;
78
84
  url?: string;
79
85
  };
86
+ export declare type THandleToggleHistoryAndResults = {
87
+ shouldShowHistory: boolean;
88
+ shouldShowResults: boolean;
89
+ };
@@ -1,4 +1,4 @@
1
- import { TemplateResult } from 'lit';
1
+ import { PropertyValues, TemplateResult } from 'lit';
2
2
  import { PhoenixLightLitElement } from "../../../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
3
3
  export declare class HSearchClear extends PhoenixLightLitElement {
4
4
  private _btnController;
@@ -10,6 +10,7 @@ export declare class HSearchClear extends PhoenixLightLitElement {
10
10
  private _searchContextObserver;
11
11
  constructor();
12
12
  connectedCallback(): void;
13
+ protected updated(_changedProperties: PropertyValues): void;
13
14
  private _dispatchClearEvent;
14
15
  private _searchContextSetup;
15
16
  protected render(): TemplateResult;
@@ -28,6 +28,11 @@ let HSearchClear = class HSearchClear extends PhoenixLightLitElement {
28
28
  this._searchContextSetup();
29
29
  this.addEventListener('click', this._dispatchClearEvent);
30
30
  }
31
+ updated(_changedProperties) {
32
+ super.updated(_changedProperties);
33
+ const newTabIndex = this._shouldShow ? '0' : '-1';
34
+ this.setAttribute('tabindex', newTabIndex);
35
+ }
31
36
  async _searchContextSetup() {
32
37
  try {
33
38
  this._searchContextConsumer = new ContextConsumerController(this);
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,qDAAyD;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,2EAAmF;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,qDAAyD;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,2EAAmF;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -9,7 +9,8 @@ export declare class HSearchHistory extends PhoenixLightLitElement {
9
9
  private _historyContextObserver;
10
10
  buttonRef: Ref<HSearchHistoryLoadMore>;
11
11
  history: TSearchHistoryItem[];
12
- activeItemId: number;
12
+ activeItemId: string;
13
+ searchId: string;
13
14
  translations: Record<string, string>;
14
15
  moduleInstanceId: string;
15
16
  connectedCallback(): Promise<void>;
@@ -41,22 +41,33 @@ let HSearchHistory = class HSearchHistory extends PhoenixLightLitElement {
41
41
  return n((_a = this.history) === null || _a === void 0 ? void 0 : _a.length, () => html `<h3 class="${SEARCH_CLASS_NAMES.headline}">${this.translations.searchHistory}</h3>
42
42
 
43
43
  <ul>
44
- ${c(this.history, (historyElement, index) => html ` <li
45
- class="${SEARCH_CLASS_NAMES.item} ${index === this.activeItemId ? SEARCH_CLASS_NAMES.itemActive : ''}"
44
+ ${c(this.history, (historyElement, index) => html `
45
+ <li
46
+ class="
47
+ ${SEARCH_CLASS_NAMES.item}
48
+ ${`${this.searchId}${index}` === this.activeItemId ? SEARCH_CLASS_NAMES.itemActive : ''}
49
+ "
50
+ role="row"
46
51
  >
47
52
  <h-search-history-select
48
53
  item-label="${historyElement.label}"
49
54
  class="${SEARCH_CLASS_NAMES.historySelect}"
50
55
  data-suggested-value="${historyElement.label}"
51
- data-search-item-id="${index}"
56
+ data-search-item-id="${this.searchId}${index}"
52
57
  module-instance-id="${this.moduleInstanceId}"
58
+ aria-label=${this.translations.historyAriaLabel ? `${this.translations.historyAriaLabel} ${historyElement.label}` : undefined}
59
+ role="gridcell"
53
60
  >
54
61
  <h-icon icon-name="icon-clock"></h-icon>
55
62
 
56
63
  <span class="${SEARCH_CLASS_NAMES.historyItemValue}">${historyElement.label}</span>
57
64
  </h-search-history-select>
58
65
 
59
- <h-search-history-remove item-id="${historyElement.id}">
66
+ <h-search-history-remove
67
+ data-search-item-id="${this.searchId}${index}-grid"
68
+ item-id="${historyElement.id}"
69
+ role="gridcell"
70
+ >
60
71
  <h-icon
61
72
  icon-name="icon-x"
62
73
  clickable=${true}
@@ -67,7 +78,11 @@ let HSearchHistory = class HSearchHistory extends PhoenixLightLitElement {
67
78
  </li>`)}
68
79
  </ul>
69
80
 
70
- <h-search-history-load-more class="${SEARCH_CLASS_NAMES.historyLoadMore}" ${ref(this.buttonRef)}>
81
+ <h-search-history-load-more
82
+ class="${SEARCH_CLASS_NAMES.historyLoadMore}"
83
+ data-search-item-id="${this.searchId}-loadmore"
84
+ ${ref(this.buttonRef)}
85
+ >
71
86
  ${this.translations.loadMore}
72
87
  </h-search-history-load-more>`);
73
88
  }
@@ -77,9 +92,13 @@ __decorate([
77
92
  __metadata("design:type", Array)
78
93
  ], HSearchHistory.prototype, "history", void 0);
79
94
  __decorate([
80
- property({ type: Number, attribute: 'active-item-id' }),
81
- __metadata("design:type", Number)
95
+ property({ type: String, attribute: 'active-item-id' }),
96
+ __metadata("design:type", String)
82
97
  ], HSearchHistory.prototype, "activeItemId", void 0);
98
+ __decorate([
99
+ property({ type: String, attribute: 'search-id' }),
100
+ __metadata("design:type", String)
101
+ ], HSearchHistory.prototype, "searchId", void 0);
83
102
  __decorate([
84
103
  property({ type: Object }),
85
104
  __metadata("design:type", Object)
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,qDAAyD;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,2EAAmF;AAC7G;AACA,4BAA4B,6EAAqF;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,qDAAyD;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,2EAAmF;AAC7G;AACA,4BAA4B,6EAAqF;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,10 +1,11 @@
1
1
  import { PhoenixLightLitElement } from "../../../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
2
2
  export declare class HSearchInput extends PhoenixLightLitElement {
3
- private _input;
3
+ input: HTMLInputElement | null;
4
4
  moduleInstanceId: string;
5
5
  private _isSearchPhraseCleared;
6
6
  connectedCallback(): void;
7
7
  private _setupInitialValue;
8
8
  private _deserializeInputPhrase;
9
9
  private _setupListeners;
10
+ private _setupAttributes;
10
11
  }