@sapudex/web-components 0.226.1 → 0.227.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Breadcrumbs.js +3 -2
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/Button.d.ts +7 -0
- package/dist/Button.js +3 -0
- package/dist/Button.js.map +1 -1
- package/dist/ListItem.d.ts +3 -2
- package/dist/ListItem.js +2 -2
- package/dist/ListItem.js.map +1 -1
- package/dist/MastheadItem.js +1 -1
- package/dist/MastheadItem.js.map +1 -1
- package/dist/MastheadShell.d.ts +4 -1
- package/dist/MastheadShell.js +21 -5
- package/dist/MastheadShell.js.map +1 -1
- package/dist/Pagination.d.ts +18 -2
- package/dist/Pagination.js +35 -11
- package/dist/Pagination.js.map +1 -1
- package/dist/PhoneNumberField.d.ts +5 -5
- package/dist/PhoneNumberField.js +1 -1
- package/dist/PhoneNumberField.js.map +1 -1
- package/dist/Search.js +1 -2
- package/dist/Search.js.map +1 -1
- package/dist/SearchableListBase.d.ts +9 -0
- package/dist/SearchableListBase.js +10 -2
- package/dist/SearchableListBase.js.map +1 -1
- package/dist/SecondaryNavigation.d.ts +4 -1
- package/dist/SecondaryNavigation.js +37 -10
- package/dist/SecondaryNavigation.js.map +1 -1
- package/dist/SecondaryNavigationItem.d.ts +10 -0
- package/dist/SecondaryNavigationItem.js +19 -0
- package/dist/SecondaryNavigationItem.js.map +1 -1
- package/dist/SecondaryNavigationItemBase.d.ts +1 -0
- package/dist/SecondaryNavigationItemBase.js +3 -0
- package/dist/SecondaryNavigationItemBase.js.map +1 -1
- package/dist/SecondaryNavigationSubItem.d.ts +0 -1
- package/dist/SecondaryNavigationSubItem.js +0 -3
- package/dist/SecondaryNavigationSubItem.js.map +1 -1
- package/dist/Wizard.d.ts +20 -0
- package/dist/Wizard.js +21 -6
- package/dist/Wizard.js.map +1 -1
- package/dist/assets/{bundle.esm-a49b6527.js → bundle.esm-8018708a.js} +182 -182
- package/dist/css/themes/Breadcrumbs.css +1 -1
- package/dist/css/themes/Button.css +1 -1
- package/dist/css/themes/ListItem.css +1 -1
- package/dist/css/themes/MastheadCountrySelector.css +1 -1
- package/dist/css/themes/MastheadItem.css +1 -1
- package/dist/css/themes/MastheadShell.css +1 -1
- package/dist/css/themes/Modal.css +1 -1
- package/dist/css/themes/Pagination.css +1 -1
- package/dist/css/themes/RatingIndicator.css +1 -1
- package/dist/css/themes/Search.css +1 -1
- package/dist/css/themes/Slider.css +1 -1
- package/dist/custom-elements-internal.json +202 -66
- package/dist/custom-elements.json +181 -64
- package/dist/data/CountryListISO3166.d.ts +13 -4
- package/dist/data/CountryListISO3166.js +8 -0
- package/dist/data/CountryListISO3166.js.map +1 -1
- package/dist/generated/templates/BreadcrumbsTemplate.lit.js +1 -1
- package/dist/generated/templates/BreadcrumbsTemplate.lit.js.map +1 -1
- package/dist/generated/templates/PaginationTemplate.lit.js +3 -3
- package/dist/generated/templates/PaginationTemplate.lit.js.map +1 -1
- package/dist/generated/templates/PhoneNumberFieldTemplate.lit.js +2 -2
- package/dist/generated/templates/PhoneNumberFieldTemplate.lit.js.map +1 -1
- package/dist/generated/templates/SearchTemplate.lit.js +3 -3
- package/dist/generated/templates/SearchTemplate.lit.js.map +1 -1
- package/dist/generated/templates/SecondaryNavigationItemTemplate.lit.js +2 -2
- package/dist/generated/templates/SecondaryNavigationItemTemplate.lit.js.map +1 -1
- package/dist/generated/templates/SecondaryNavigationTemplate.lit.js +1 -1
- package/dist/generated/templates/SecondaryNavigationTemplate.lit.js.map +1 -1
- package/dist/generated/templates/WizardTemplate.lit.js +5 -3
- package/dist/generated/templates/WizardTemplate.lit.js.map +1 -1
- package/dist/generated/themes/Breadcrumbs.css.js +1 -1
- package/dist/generated/themes/Breadcrumbs.css.js.map +1 -1
- package/dist/generated/themes/Button.css.js +1 -1
- package/dist/generated/themes/Button.css.js.map +1 -1
- package/dist/generated/themes/ListItem.css.js +1 -1
- package/dist/generated/themes/ListItem.css.js.map +1 -1
- package/dist/generated/themes/MastheadCountrySelector.css.js +1 -1
- package/dist/generated/themes/MastheadCountrySelector.css.js.map +1 -1
- package/dist/generated/themes/MastheadItem.css.js +1 -1
- package/dist/generated/themes/MastheadItem.css.js.map +1 -1
- package/dist/generated/themes/MastheadShell.css.js +1 -1
- package/dist/generated/themes/MastheadShell.css.js.map +1 -1
- package/dist/generated/themes/Modal.css.js +1 -1
- package/dist/generated/themes/Modal.css.js.map +1 -1
- package/dist/generated/themes/Pagination.css.js +1 -1
- package/dist/generated/themes/Pagination.css.js.map +1 -1
- package/dist/generated/themes/RatingIndicator.css.js +1 -1
- package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
- package/dist/generated/themes/Search.css.js +1 -1
- package/dist/generated/themes/Search.css.js.map +1 -1
- package/dist/generated/themes/Slider.css.js +1 -1
- package/dist/generated/themes/Slider.css.js.map +1 -1
- package/dist/vscode.html-custom-data.json +25 -0
- package/dist/web-types.json +41 -1
- package/package.json +1 -1
- package/src/Breadcrumbs.hbs +10 -12
- package/src/Breadcrumbs.ts +3 -2
- package/src/Button.ts +9 -0
- package/src/ListItem.ts +4 -4
- package/src/MastheadItem.ts +1 -1
- package/src/MastheadShell.ts +25 -5
- package/src/Pagination.hbs +11 -5
- package/src/Pagination.ts +51 -8
- package/src/PhoneNumberField.hbs +1 -1
- package/src/PhoneNumberField.ts +8 -3
- package/src/Search.hbs +3 -2
- package/src/Search.ts +1 -2
- package/src/SearchableListBase.ts +18 -2
- package/src/SecondaryNavigation.hbs +1 -0
- package/src/SecondaryNavigation.ts +41 -12
- package/src/SecondaryNavigationItem.hbs +2 -1
- package/src/SecondaryNavigationItem.ts +31 -0
- package/src/SecondaryNavigationItemBase.ts +3 -0
- package/src/SecondaryNavigationSubItem.ts +0 -3
- package/src/Wizard.hbs +9 -1
- package/src/Wizard.ts +39 -7
- package/src/data/CountryListISO3166.ts +10 -2
- package/src/generated/templates/BreadcrumbsTemplate.lit.ts +1 -1
- package/src/generated/templates/PaginationTemplate.lit.ts +3 -3
- package/src/generated/templates/PhoneNumberFieldTemplate.lit.ts +1 -1
- package/src/generated/templates/SearchTemplate.lit.ts +3 -3
- package/src/generated/templates/SecondaryNavigationItemTemplate.lit.ts +2 -2
- package/src/generated/templates/SecondaryNavigationTemplate.lit.ts +1 -1
- package/src/generated/templates/WizardTemplate.lit.ts +5 -3
- package/src/generated/themes/Breadcrumbs.css.ts +1 -1
- package/src/generated/themes/Button.css.ts +1 -1
- package/src/generated/themes/ListItem.css.ts +1 -1
- package/src/generated/themes/MastheadCountrySelector.css.ts +1 -1
- package/src/generated/themes/MastheadItem.css.ts +1 -1
- package/src/generated/themes/MastheadShell.css.ts +1 -1
- package/src/generated/themes/Modal.css.ts +1 -1
- package/src/generated/themes/Pagination.css.ts +1 -1
- package/src/generated/themes/RatingIndicator.css.ts +1 -1
- package/src/generated/themes/Search.css.ts +1 -1
- package/src/generated/themes/Slider.css.ts +1 -1
- package/src/themes/Breadcrumbs.css +3 -0
- package/src/themes/Button.css +84 -29
- package/src/themes/ListItem.css +5 -1
- package/src/themes/MastheadCountrySelector.css +8 -5
- package/src/themes/MastheadItem.css +12 -4
- package/src/themes/MastheadShell.css +5 -2
- package/src/themes/Modal.css +6 -1
- package/src/themes/Pagination.css +19 -0
- package/src/themes/Search.css +8 -1
package/src/PhoneNumberField.hbs
CHANGED
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
<img
|
|
69
69
|
class="udex-phone-number-field__flag"
|
|
70
70
|
aria-label="{{selectedCountryName}}"
|
|
71
|
-
style="{{selectedFlagBackgroundPosition}}">
|
|
71
|
+
style="background-position-x: {{selectedFlagBackgroundPosition.x}}; background-position-y: {{selectedFlagBackgroundPosition.y}}">
|
|
72
72
|
</div>
|
|
73
73
|
</udex-button>
|
|
74
74
|
{{/unless}}
|
package/src/PhoneNumberField.ts
CHANGED
|
@@ -42,6 +42,11 @@ export enum FieldState {
|
|
|
42
42
|
Error = "Error",
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
export type BackgroundPosition = {
|
|
46
|
+
x?: string,
|
|
47
|
+
y?: string,
|
|
48
|
+
};
|
|
49
|
+
|
|
45
50
|
const initialPlaceholder: string = "+X XXX-XXX-XXXX";
|
|
46
51
|
/**
|
|
47
52
|
* Maximum number of possible digits based on international standard https://en.wikipedia.org/wiki/E.164
|
|
@@ -287,7 +292,7 @@ class UDExPhoneNumberField extends UI5Element {
|
|
|
287
292
|
* @private
|
|
288
293
|
*/
|
|
289
294
|
@property({ type: Boolean })
|
|
290
|
-
|
|
295
|
+
_isTouched!: boolean;
|
|
291
296
|
|
|
292
297
|
static i18nBundle: I18nBundle;
|
|
293
298
|
_dropdown!: UDExDropdown;
|
|
@@ -571,7 +576,7 @@ class UDExPhoneNumberField extends UI5Element {
|
|
|
571
576
|
|| this.updatedCountriesList[0]?.countryName;
|
|
572
577
|
}
|
|
573
578
|
|
|
574
|
-
get selectedFlagBackgroundPosition() {
|
|
579
|
+
get selectedFlagBackgroundPosition(): BackgroundPosition {
|
|
575
580
|
if (!this.countryIso) {
|
|
576
581
|
return {};
|
|
577
582
|
}
|
|
@@ -582,7 +587,7 @@ class UDExPhoneNumberField extends UI5Element {
|
|
|
582
587
|
return {};
|
|
583
588
|
}
|
|
584
589
|
|
|
585
|
-
return {
|
|
590
|
+
return { x: selectedCountry?.flagX, y: selectedCountry?.flagY };
|
|
586
591
|
}
|
|
587
592
|
|
|
588
593
|
get ariaInvalid() {
|
package/src/Search.hbs
CHANGED
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
@click="{{handleInputClick}}"
|
|
74
74
|
/>
|
|
75
75
|
{{/if}}
|
|
76
|
-
{{#if
|
|
77
|
-
<span
|
|
76
|
+
{{#if open}}
|
|
77
|
+
<span aria-live="polite" aria-atomic="true" id="search-description" class="hidden" aria-hidden="true">{{suggestionsDescription}}</span>
|
|
78
78
|
{{/if}}
|
|
79
79
|
<div class="udex-search__icons">
|
|
80
80
|
{{#if isShowHomeResetButton}}
|
|
@@ -121,6 +121,7 @@
|
|
|
121
121
|
class="udex-search__icon"
|
|
122
122
|
aria-hidden="true"
|
|
123
123
|
accessible-name="{{accInfo.accessibleNameSearchIcon}}"
|
|
124
|
+
show-tooltip
|
|
124
125
|
name="search">
|
|
125
126
|
</ui5-icon>
|
|
126
127
|
{{/if}}
|
package/src/Search.ts
CHANGED
|
@@ -697,7 +697,6 @@ class UDExSearch extends UI5Element {
|
|
|
697
697
|
|
|
698
698
|
getTextWithSuggestion(text: string): string {
|
|
699
699
|
const escapedValue = this.escapeRegExp(this.value);
|
|
700
|
-
console.warn(escapedValue);
|
|
701
700
|
const search = new RegExp(escapedValue, "i");
|
|
702
701
|
return text.replace(search, "<b>$&</b>");
|
|
703
702
|
}
|
|
@@ -1278,7 +1277,7 @@ class UDExSearch extends UI5Element {
|
|
|
1278
1277
|
}
|
|
1279
1278
|
|
|
1280
1279
|
get suggestionsDescription(): string {
|
|
1281
|
-
return this.
|
|
1280
|
+
return !this.showNoResultMessage ? `${this.suggestedList.length} ${this._suggestionLabel}, ${this.recommendedList.length} ${this._recommendLabel}` : `${this.noResultMessage}`;
|
|
1282
1281
|
}
|
|
1283
1282
|
|
|
1284
1283
|
get tooltipInfo() {
|
|
@@ -83,6 +83,15 @@ import { NO_MATCHES_FOUND } from "./generated/i18n/i18n-defaults.js";
|
|
|
83
83
|
})
|
|
84
84
|
|
|
85
85
|
class UDExSearchableListBase extends UI5Element {
|
|
86
|
+
/**
|
|
87
|
+
* Defines if the search input is visible.
|
|
88
|
+
*
|
|
89
|
+
* @default false
|
|
90
|
+
* @public
|
|
91
|
+
*/
|
|
92
|
+
@property({ type: Boolean })
|
|
93
|
+
showSearchInput!: boolean;
|
|
94
|
+
|
|
86
95
|
/**
|
|
87
96
|
* Defines if the component would display a loading indicator.
|
|
88
97
|
*
|
|
@@ -496,8 +505,15 @@ class UDExSearchableListBase extends UI5Element {
|
|
|
496
505
|
}
|
|
497
506
|
|
|
498
507
|
get showSearch(): boolean {
|
|
499
|
-
|
|
500
|
-
|
|
508
|
+
return this.showSearchInput || (this.isSearchActive && !this.modeRadioGroup);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
get isSearchActive(): boolean {
|
|
512
|
+
return this.nonGroupItems.length > SHOW_SEARCH_AFTER_COUNT;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
get nonGroupItems(): Array<UDExListItemBase> {
|
|
516
|
+
return this.getSlottedItems(this.items).filter(item => !item.isGroup);
|
|
501
517
|
}
|
|
502
518
|
|
|
503
519
|
get roleForGroupList(): string {
|
|
@@ -151,7 +151,8 @@ class UDExSecondaryNavigation extends UI5Element {
|
|
|
151
151
|
_mobileBtnExpanded = false;
|
|
152
152
|
|
|
153
153
|
_navItems!: Array<NavItem>;
|
|
154
|
-
_showMoreButton
|
|
154
|
+
_showMoreButton!: boolean;
|
|
155
|
+
_shouldFocusFirstItem: boolean = true;
|
|
155
156
|
_rootHolder!: HTMLElement | null | undefined;
|
|
156
157
|
_clickedNavItem!: UDExSecondaryNavigationItem;
|
|
157
158
|
_boundReflowItems: () => void;
|
|
@@ -164,7 +165,6 @@ class UDExSecondaryNavigation extends UI5Element {
|
|
|
164
165
|
|
|
165
166
|
constructor() {
|
|
166
167
|
super();
|
|
167
|
-
this._showMoreButton = true;
|
|
168
168
|
this._boundReflowItems = this._handleResize.bind(this);
|
|
169
169
|
}
|
|
170
170
|
|
|
@@ -180,13 +180,6 @@ class UDExSecondaryNavigation extends UI5Element {
|
|
|
180
180
|
ResizeHandler.deregister(this, this._boundReflowItems);
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
_handleResize() {
|
|
184
|
-
this.reflowItems();
|
|
185
|
-
if (this._clickedNavItem && this.isDesktopScreen) {
|
|
186
|
-
this._clickedNavItem.closeDropdown();
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
183
|
onInvalidation(changeInfo: ChangeInfo): void {
|
|
191
184
|
if (changeInfo.name === "navItems") {
|
|
192
185
|
this.reflowItems();
|
|
@@ -195,6 +188,12 @@ class UDExSecondaryNavigation extends UI5Element {
|
|
|
195
188
|
|
|
196
189
|
onAfterRendering(): void {
|
|
197
190
|
this._rootHolder = this.rootHolder;
|
|
191
|
+
if (!this._overflowItems.length) {
|
|
192
|
+
this._showMoreButton = true;
|
|
193
|
+
}
|
|
194
|
+
if (this._shouldFocusFirstItem && this.isDesktopScreen) {
|
|
195
|
+
this.domNavItems[0]._tabIndex = "0";
|
|
196
|
+
}
|
|
198
197
|
this.handleOutsideClick();
|
|
199
198
|
}
|
|
200
199
|
|
|
@@ -202,6 +201,16 @@ class UDExSecondaryNavigation extends UI5Element {
|
|
|
202
201
|
this._requestRender = !this._requestRender;
|
|
203
202
|
}
|
|
204
203
|
|
|
204
|
+
_handleResize() {
|
|
205
|
+
this.reflowItems();
|
|
206
|
+
if (this.isDesktopScreen) {
|
|
207
|
+
this.resetTabIndex();
|
|
208
|
+
}
|
|
209
|
+
if (this._clickedNavItem && this.isDesktopScreen) {
|
|
210
|
+
this._clickedNavItem.closeDropdown();
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
205
214
|
reflowItems(): void {
|
|
206
215
|
const availableWidth = this.rootHolder.offsetWidth - (this.heading?.offsetWidth || 0) - (this.optionalButtons?.offsetWidth || 0);
|
|
207
216
|
const moreButtonWidth = this.getMoreButtonWidth();
|
|
@@ -252,9 +261,12 @@ class UDExSecondaryNavigation extends UI5Element {
|
|
|
252
261
|
const item = e.target as UDExSecondaryNavigationItem;
|
|
253
262
|
const currentSelectedIndex = this.getCurrentIndex(item);
|
|
254
263
|
const previousSelectIndex = currentSelectedIndex - 1;
|
|
264
|
+
const previousItem = this.domNavItems[previousSelectIndex];
|
|
255
265
|
if (currentSelectedIndex > 0) {
|
|
256
266
|
e.preventDefault();
|
|
257
|
-
this.domNavItems[
|
|
267
|
+
this.domNavItems[currentSelectedIndex]._tabIndex = "-1";
|
|
268
|
+
previousItem._tabIndex = "0";
|
|
269
|
+
previousItem?.focus();
|
|
258
270
|
}
|
|
259
271
|
}
|
|
260
272
|
|
|
@@ -263,9 +275,12 @@ class UDExSecondaryNavigation extends UI5Element {
|
|
|
263
275
|
const currentSelectedIndex = this.getCurrentIndex(item);
|
|
264
276
|
const lastItemIndex = this.domNavItems.length - 1;
|
|
265
277
|
const nextSelectIndex = currentSelectedIndex + 1;
|
|
278
|
+
const nextItem = this.domNavItems[nextSelectIndex];
|
|
266
279
|
if (nextSelectIndex < lastItemIndex) {
|
|
267
280
|
e.preventDefault();
|
|
268
|
-
this.domNavItems[
|
|
281
|
+
this.domNavItems[currentSelectedIndex]._tabIndex = "-1";
|
|
282
|
+
nextItem._tabIndex = "0";
|
|
283
|
+
nextItem.focus();
|
|
269
284
|
}
|
|
270
285
|
}
|
|
271
286
|
|
|
@@ -314,6 +329,8 @@ class UDExSecondaryNavigation extends UI5Element {
|
|
|
314
329
|
}
|
|
315
330
|
|
|
316
331
|
this._clickedNavItem = clickedItem;
|
|
332
|
+
this._shouldFocusFirstItem = false;
|
|
333
|
+
this.setTabIndexById(_id);
|
|
317
334
|
this.closePrevDropdown(_id);
|
|
318
335
|
|
|
319
336
|
if (!subItems.length) {
|
|
@@ -410,7 +427,7 @@ class UDExSecondaryNavigation extends UI5Element {
|
|
|
410
427
|
|
|
411
428
|
closePrevDropdown(clickedItemId: string): void {
|
|
412
429
|
this.domNavItems.forEach(item => {
|
|
413
|
-
if (
|
|
430
|
+
if (item.isOpen && item._id !== clickedItemId) {
|
|
414
431
|
item.closeDropdown();
|
|
415
432
|
}
|
|
416
433
|
});
|
|
@@ -420,6 +437,18 @@ class UDExSecondaryNavigation extends UI5Element {
|
|
|
420
437
|
return string ? JSON.parse(string) as T[] : [];
|
|
421
438
|
}
|
|
422
439
|
|
|
440
|
+
resetTabIndex(): void {
|
|
441
|
+
this.domNavItems.forEach((item, index) => {
|
|
442
|
+
item._tabIndex = index === 0 ? "0" : "-1";
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
setTabIndexById(id: string): void {
|
|
447
|
+
this.domNavItems.forEach(item => {
|
|
448
|
+
item._tabIndex = id === item._id ? "0" : "-1";
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
|
|
423
452
|
get domNavItems(): Array<UDExSecondaryNavigationItem> {
|
|
424
453
|
const items = this.shadowRoot?.querySelectorAll<UDExSecondaryNavigationItem>("[udex-secondary-navigation-item]");
|
|
425
454
|
return items ? Array.from(items) : [];
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
?active="{{isActive}}"
|
|
6
6
|
href="{{path}}"
|
|
7
7
|
target="{{target}}"
|
|
8
|
+
tabindex="{{_tabIndex}}"
|
|
8
9
|
aria-current="{{ariaCurrent}}"
|
|
9
10
|
@keydown="{{handleItemLinkKeyDown}}"
|
|
10
11
|
@click="{{fireNavItemClickEvent}}">
|
|
@@ -14,8 +15,8 @@
|
|
|
14
15
|
<button
|
|
15
16
|
class="udex-secondary-navigation__item"
|
|
16
17
|
role="{{itemRole}}"
|
|
17
|
-
tabindex="0"
|
|
18
18
|
?active="{{isActive}}"
|
|
19
|
+
tabindex="{{menuOpenerTabIndex}}"
|
|
19
20
|
aria-haspopup="{{hasNestedItems}}"
|
|
20
21
|
aria-expanded="{{isOpen}}"
|
|
21
22
|
aria-label="{{ariaLabel}}"
|
|
@@ -150,9 +150,20 @@ class UDExSecondaryNavigationItem extends UDExSecondaryNavigationItemBase {
|
|
|
150
150
|
@property({ type: Object })
|
|
151
151
|
_processedItems: Array<NavItem> = [];
|
|
152
152
|
|
|
153
|
+
/**
|
|
154
|
+
* Defines if item is mobile menu opener.
|
|
155
|
+
*
|
|
156
|
+
* @private
|
|
157
|
+
* @default false
|
|
158
|
+
*/
|
|
159
|
+
@property({ type: Boolean })
|
|
160
|
+
_isMobileMenuOpener!: boolean;
|
|
161
|
+
|
|
153
162
|
_dropdownHistory: Array<Array<NavItem>> = [];
|
|
154
163
|
_shouldFocusFirstSubItem!: boolean;
|
|
155
164
|
_subTitle!: string | undefined;
|
|
165
|
+
_shouldResetTabIndex!: boolean;
|
|
166
|
+
_shouldSetTabIndex!: boolean;
|
|
156
167
|
|
|
157
168
|
onAfterRendering(): void {
|
|
158
169
|
if (this.isLastItem && this.isOpen && !this._isMobileView) {
|
|
@@ -167,6 +178,16 @@ class UDExSecondaryNavigationItem extends UDExSecondaryNavigationItemBase {
|
|
|
167
178
|
if (this._isMobileView && this.isOpen) {
|
|
168
179
|
this.setDropdownHeight();
|
|
169
180
|
}
|
|
181
|
+
|
|
182
|
+
if (this._shouldSetTabIndex) {
|
|
183
|
+
this._tabIndex = "0";
|
|
184
|
+
this._shouldSetTabIndex = false;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
if (this._shouldResetTabIndex) {
|
|
188
|
+
this._tabIndex = "-1";
|
|
189
|
+
this._shouldResetTabIndex = false;
|
|
190
|
+
}
|
|
170
191
|
}
|
|
171
192
|
|
|
172
193
|
onBeforeRendering() : void {
|
|
@@ -195,6 +216,7 @@ class UDExSecondaryNavigationItem extends UDExSecondaryNavigationItemBase {
|
|
|
195
216
|
if (this.hasNestedItems) {
|
|
196
217
|
this.setDropdownItems();
|
|
197
218
|
this.isOpen = !this.isOpen;
|
|
219
|
+
this._shouldResetTabIndex = true;
|
|
198
220
|
this.onShouldFocusFirstSubItem();
|
|
199
221
|
}
|
|
200
222
|
|
|
@@ -203,6 +225,7 @@ class UDExSecondaryNavigationItem extends UDExSecondaryNavigationItemBase {
|
|
|
203
225
|
|
|
204
226
|
closeDropdown(): void {
|
|
205
227
|
this.isOpen = false;
|
|
228
|
+
this._shouldSetTabIndex = true;
|
|
206
229
|
}
|
|
207
230
|
|
|
208
231
|
handleItemLinkKeyDown(e: KeyboardEvent): void {
|
|
@@ -418,6 +441,14 @@ class UDExSecondaryNavigationItem extends UDExSecondaryNavigationItemBase {
|
|
|
418
441
|
return this.shadowRoot!.querySelector<HTMLElement>(".udex-secondary-navigation__dropdown")!;
|
|
419
442
|
}
|
|
420
443
|
|
|
444
|
+
get menuOpenerTabIndex(): string {
|
|
445
|
+
if (this._isMobileMenuOpener) {
|
|
446
|
+
return "0";
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
return this._tabIndex;
|
|
450
|
+
}
|
|
451
|
+
|
|
421
452
|
get isLastItem(): boolean {
|
|
422
453
|
return this._navItemsLength === this.index;
|
|
423
454
|
}
|
|
@@ -94,6 +94,9 @@ class UDExSecondaryNavigationItemBase extends UI5Element {
|
|
|
94
94
|
@property({ type: Boolean })
|
|
95
95
|
_isMobileView!: boolean;
|
|
96
96
|
|
|
97
|
+
@property({ type: String, defaultValue: "-1" })
|
|
98
|
+
_tabIndex!: string;
|
|
99
|
+
|
|
97
100
|
_handleResizeBound: ResizeObserverCallback;
|
|
98
101
|
|
|
99
102
|
constructor() {
|
|
@@ -79,9 +79,6 @@ class UDExSecondaryNavigationSubItem extends UDExSecondaryNavigationItemBase {
|
|
|
79
79
|
@property({ type: Object, multiple: true })
|
|
80
80
|
nestedItems!: Array<NavItem>;
|
|
81
81
|
|
|
82
|
-
@property({ type: String, defaultValue: "-1" })
|
|
83
|
-
_tabIndex!: string;
|
|
84
|
-
|
|
85
82
|
static i18nBundle: any;
|
|
86
83
|
|
|
87
84
|
static async onDefine(): Promise<void> {
|
package/src/Wizard.hbs
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
<div
|
|
2
2
|
class="{{classes.root}}"
|
|
3
|
-
aria-label="{{
|
|
3
|
+
aria-label="{{effectiveAccessibleName}}"
|
|
4
4
|
role="region"
|
|
5
5
|
?indeterminate="{{indeterminate}}"
|
|
6
6
|
part="ui5-wiz-root"
|
|
7
7
|
>
|
|
8
|
+
<div role="alert" class="ui5-hidden-text">
|
|
9
|
+
{{#if _currentStepTitle}}
|
|
10
|
+
<div>{{_currentStepTitle}}</div>
|
|
11
|
+
{{/if}}
|
|
12
|
+
{{#if _currentStepSubTitle}}
|
|
13
|
+
<div>{{_currentStepSubTitle}}</div>
|
|
14
|
+
{{/if}}
|
|
15
|
+
</div>
|
|
8
16
|
<nav class="ui5-wiz-nav" part="navigator" aria-label="{{navAriaLabelText}}" tabindex="-1">
|
|
9
17
|
<div class="ui5-wiz-nav-list" role="list" aria-label="{{listAriaLabelText}}" aria-describedby="wiz-nav-descr" aria-controls="{{_id}}-wiz-content">
|
|
10
18
|
{{#each _stepsInHeader}}
|
package/src/Wizard.ts
CHANGED
|
@@ -70,6 +70,30 @@ class UDExWizard extends Wizard {
|
|
|
70
70
|
@property({ type: Boolean })
|
|
71
71
|
indeterminate!: boolean;
|
|
72
72
|
|
|
73
|
+
/**
|
|
74
|
+
* Defines aria-label of the wizard, read by screen readers with the first step.
|
|
75
|
+
*
|
|
76
|
+
* @public
|
|
77
|
+
*/
|
|
78
|
+
@property({ type: String })
|
|
79
|
+
accessibleName!: string;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Defines the title of the current step.
|
|
83
|
+
*
|
|
84
|
+
* @private
|
|
85
|
+
*/
|
|
86
|
+
@property({ type: String })
|
|
87
|
+
_currentStepTitle!: string;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Defines the subtitle of the current step.
|
|
91
|
+
*
|
|
92
|
+
* @private
|
|
93
|
+
*/
|
|
94
|
+
@property({ type: String })
|
|
95
|
+
_currentStepSubTitle!: string;
|
|
96
|
+
|
|
73
97
|
constructor() {
|
|
74
98
|
super();
|
|
75
99
|
}
|
|
@@ -109,6 +133,7 @@ class UDExWizard extends Wizard {
|
|
|
109
133
|
previousStep: selectedStep,
|
|
110
134
|
changeWithClick,
|
|
111
135
|
});
|
|
136
|
+
|
|
112
137
|
this.selectedStepIndex = stepToSelectIndex;
|
|
113
138
|
}
|
|
114
139
|
};
|
|
@@ -133,13 +158,9 @@ class UDExWizard extends Wizard {
|
|
|
133
158
|
return this.steps.map((step, idx) => {
|
|
134
159
|
const pos = idx + 1;
|
|
135
160
|
const hideSeparator = idx === stepsCount - 1 && !this.indeterminate;
|
|
136
|
-
const
|
|
137
|
-
?
|
|
138
|
-
: this.
|
|
139
|
-
const ariaLabel = (
|
|
140
|
-
step.titleText
|
|
141
|
-
? `${pos} ${step.titleText} ${stepStateText}`
|
|
142
|
-
: `${this.navStepDefaultHeading} ${pos} ${stepStateText}`
|
|
161
|
+
const ariaLabel = (`${idx === 0 ? this.effectiveAccessibleName : ""} ${step.titleText
|
|
162
|
+
? `${pos} ${step.titleText}`
|
|
163
|
+
: `${this.navStepDefaultHeading} ${pos}`}`
|
|
143
164
|
).trim();
|
|
144
165
|
const isAfterCurrent = idx > selectedStepIndex;
|
|
145
166
|
accInfo = {
|
|
@@ -172,6 +193,17 @@ class UDExWizard extends Wizard {
|
|
|
172
193
|
};
|
|
173
194
|
}
|
|
174
195
|
|
|
196
|
+
onAfterRendering(): void {
|
|
197
|
+
this.attachStepsResizeObserver();
|
|
198
|
+
this.previouslySelectedStepIndex = this.selectedStepIndex;
|
|
199
|
+
this._currentStepTitle = this._steps[this.selectedStepIndex].titleText;
|
|
200
|
+
this._currentStepSubTitle = this._steps[this.selectedStepIndex].subtitleText;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
get effectiveAccessibleName(): string {
|
|
204
|
+
return this.accessibleName || this.ariaLabelText;
|
|
205
|
+
}
|
|
206
|
+
|
|
175
207
|
get slottedSteps(): UDExWizardStep[] {
|
|
176
208
|
return this.getSlottedNodes("steps");
|
|
177
209
|
}
|
|
@@ -5,8 +5,8 @@ export type Country = {
|
|
|
5
5
|
countryName: string,
|
|
6
6
|
localName?: string,
|
|
7
7
|
phonePrefix: string;
|
|
8
|
-
flagX
|
|
9
|
-
flagY
|
|
8
|
+
flagX?: string;
|
|
9
|
+
flagY?: string;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export const CountryListDB = [
|
|
@@ -40,6 +40,14 @@ export const CountryListDB = [
|
|
|
40
40
|
"flagX": "-1800px",
|
|
41
41
|
"flagY": "0px",
|
|
42
42
|
},
|
|
43
|
+
{
|
|
44
|
+
"locKey": "COUNTRY_AQ",
|
|
45
|
+
"iso": "AQ",
|
|
46
|
+
"phoneFmt": " XX XXXX",
|
|
47
|
+
"countryName": "Antarctica",
|
|
48
|
+
"localName": "Antarctica",
|
|
49
|
+
"phonePrefix": "+672",
|
|
50
|
+
},
|
|
43
51
|
{
|
|
44
52
|
"locKey": "COUNTRY_AS",
|
|
45
53
|
"iso": "AS",
|
|
@@ -4,7 +4,7 @@ import type UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
|
4
4
|
import type Breadcrumbs from "../../Breadcrumbs.js";
|
|
5
5
|
import type { ClassMapValue } from "@ui5/webcomponents-base/dist/types.js";
|
|
6
6
|
|
|
7
|
-
function block0 (this: Breadcrumbs, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<nav class="udex-breadcrumbs ui5-breadcrumbs-root" aria-label="${ifDefined(this._accessibleNameText)}"><ol @focusin="${this._onfocusin}"><li class="
|
|
7
|
+
function block0 (this: Breadcrumbs, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<nav class="udex-breadcrumbs ui5-breadcrumbs-root" aria-label="${ifDefined(this._accessibleNameText)}"><ol @focusin="${this._onfocusin}"><li class="ui5-breadcrumbs-dropdown-arrow-link-wrapper"><${scopeTag("udex-link", tags, suffix)} @ui5-click="${ifDefined(this._toggleDropdown)}" class="udex-breadcrumbs__trigger ${ifDefined(this._triggerClass)}" accessible-role="button" aria-label="${ifDefined(this._dropdownArrowAccessibleNameText)}" icon="slim-arrow-down" icon-placement="Start" aria-haspopup="true"></${scopeTag("udex-link", tags, suffix)}></li>${ repeat(this._linksData, (item, index) => (item as typeof item & {_id?: any})._id || index, (item, index: number) => block1.call(this, context, tags, suffix, item, index)) }</ol></nav>` : html`<nav class="udex-breadcrumbs ui5-breadcrumbs-root" aria-label="${ifDefined(this._accessibleNameText)}"><ol @focusin="${this._onfocusin}"><li class="ui5-breadcrumbs-dropdown-arrow-link-wrapper"><udex-link @ui5-click="${ifDefined(this._toggleDropdown)}" class="udex-breadcrumbs__trigger ${ifDefined(this._triggerClass)}" accessible-role="button" aria-label="${ifDefined(this._dropdownArrowAccessibleNameText)}" icon="slim-arrow-down" icon-placement="Start" aria-haspopup="true"></udex-link></li>${ repeat(this._linksData, (item, index) => (item as typeof item & {_id?: any})._id || index, (item, index: number) => block1.call(this, context, tags, suffix, item, index)) }</ol></nav>`;}
|
|
8
8
|
function block1 (this: Breadcrumbs, context: UI5Element, tags: string[], suffix: string | undefined, item: any, index: number) { return html`<li class="udex-breadcrumbs__link-wrapper ui5-breadcrumbs-link-wrapper" id="${ifDefined(item._id)}-link-wrapper">${ !item._isCurrentPageItem ? block2.call(this, context, tags, suffix, item, index) : undefined }</li>`;}
|
|
9
9
|
function block2 (this: Breadcrumbs, context: UI5Element, tags: string[], suffix: string | undefined, item: any, index: number) { return suffix ? html`<span class="udex-breadcrumbs__separator" aria-hidden="true"></span><${scopeTag("udex-link", tags, suffix)} @ui5-click="${ifDefined(this._onLinkPress)}" class="udex-breadcrumbs__item" href="${ifDefined(item.href)}" target="${ifDefined(item.target)}" id="${ifDefined(item._id)}-link" accessible-name="${ifDefined(item._accessibleNameText)}" data-ui5-stable="${ifDefined(item.stableDomRef)}">${ifDefined(item.innerText)}</${scopeTag("udex-link", tags, suffix)}>` : html`<span class="udex-breadcrumbs__separator" aria-hidden="true"></span><udex-link @ui5-click="${ifDefined(this._onLinkPress)}" class="udex-breadcrumbs__item" href="${ifDefined(item.href)}" target="${ifDefined(item.target)}" id="${ifDefined(item._id)}-link" accessible-name="${ifDefined(item._accessibleNameText)}" data-ui5-stable="${ifDefined(item.stableDomRef)}">${ifDefined(item.innerText)}</udex-link>`;}
|
|
10
10
|
|
|
@@ -5,12 +5,12 @@ import type UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
|
5
5
|
import type { ClassMapValue } from "@ui5/webcomponents-base/dist/types.js";
|
|
6
6
|
|
|
7
7
|
function block0 (this: Pagination, context: UI5Element, tags: string[], suffix: string | undefined) { return html`${ this.pages ? block1.call(this, context, tags, suffix) : undefined } `;}
|
|
8
|
-
function block1 (this: Pagination, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<nav class="${ifDefined(this.paginationClass)}" role="navigation" aria-label="${ifDefined(this.paginationAccessibleName)}"><ul class="udex-pagination__list">${ this.absoluteNavigation ? block2.call(this, context, tags, suffix) : undefined }<li class="udex-pagination__item--prev udex-pagination__item"><${scopeTag("udex-button", tags, suffix)} ?disabled="${this.
|
|
9
|
-
function block2 (this: Pagination, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<li class="udex-pagination__item--first udex-pagination__item"><${scopeTag("udex-button", tags, suffix)} ?disabled="${this.
|
|
8
|
+
function block1 (this: Pagination, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<nav class="${ifDefined(this.paginationClass)}" role="navigation" aria-label="${ifDefined(this.paginationAccessibleName)}"><ul class="udex-pagination__list">${ this.absoluteNavigation ? block2.call(this, context, tags, suffix) : undefined }<li class="udex-pagination__item--prev udex-pagination__item"><${scopeTag("udex-button", tags, suffix)} aria-disabled="${ifDefined(this.effectivePrevButtonDisabled)}" ?_aria-disabled="${ifDefined(this._prevButtonPseudoDisabled)}" accessible-name="${ifDefined(this.previousPageAccessibleName)}" tooltip="${ifDefined(this.previousBtnTooltip)}" size="Large" icon="navigation-left-arrow" design="Tertiary" @click="${this.setPrevPage}" @focusout="${this.handlePrevFocusOut}"></${scopeTag("udex-button", tags, suffix)}></li>${ this.typeFull ? block3.call(this, context, tags, suffix) : undefined }${ this.typeShort ? block5.call(this, context, tags, suffix) : undefined }<li class="udex-pagination__item--next udex-pagination__item"><${scopeTag("udex-button", tags, suffix)} aria-disabled="${ifDefined(this.effectiveNextButtonDisabled)}" ?_aria-disabled="${ifDefined(this._nextButtonPseudoDisabled)}" tooltip="${ifDefined(this.nextBtnTooltip)}" accessible-name="${ifDefined(this.nextPageAccessibleName)}" size="Large" icon="navigation-right-arrow" design="Tertiary" @click="${this.setNextPage}" @focusout="${this.handleNextFocusOut}"></${scopeTag("udex-button", tags, suffix)}></li>${ this.absoluteNavigation ? block6.call(this, context, tags, suffix) : undefined }</ul></nav>` : html`<nav class="${ifDefined(this.paginationClass)}" role="navigation" aria-label="${ifDefined(this.paginationAccessibleName)}"><ul class="udex-pagination__list">${ this.absoluteNavigation ? block2.call(this, context, tags, suffix) : undefined }<li class="udex-pagination__item--prev udex-pagination__item"><udex-button aria-disabled="${ifDefined(this.effectivePrevButtonDisabled)}" ?_aria-disabled="${ifDefined(this._prevButtonPseudoDisabled)}" accessible-name="${ifDefined(this.previousPageAccessibleName)}" tooltip="${ifDefined(this.previousBtnTooltip)}" size="Large" icon="navigation-left-arrow" design="Tertiary" @click="${this.setPrevPage}" @focusout="${this.handlePrevFocusOut}"></udex-button></li>${ this.typeFull ? block3.call(this, context, tags, suffix) : undefined }${ this.typeShort ? block5.call(this, context, tags, suffix) : undefined }<li class="udex-pagination__item--next udex-pagination__item"><udex-button aria-disabled="${ifDefined(this.effectiveNextButtonDisabled)}" ?_aria-disabled="${ifDefined(this._nextButtonPseudoDisabled)}" tooltip="${ifDefined(this.nextBtnTooltip)}" accessible-name="${ifDefined(this.nextPageAccessibleName)}" size="Large" icon="navigation-right-arrow" design="Tertiary" @click="${this.setNextPage}" @focusout="${this.handleNextFocusOut}"></udex-button></li>${ this.absoluteNavigation ? block6.call(this, context, tags, suffix) : undefined }</ul></nav>`;}
|
|
9
|
+
function block2 (this: Pagination, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<li class="udex-pagination__item--first udex-pagination__item"><${scopeTag("udex-button", tags, suffix)} aria-disabled="${ifDefined(this.effectivePrevButtonDisabled)}" ?_aria-disabled="${ifDefined(this._prevButtonPseudoDisabled)}" accessible-name="${ifDefined(this.firstPageAccessibleName)}" size="Large" icon="close-command-field" design="Tertiary" @click="${this.setFirstPage}"></${scopeTag("udex-button", tags, suffix)}></li>` : html`<li class="udex-pagination__item--first udex-pagination__item"><udex-button aria-disabled="${ifDefined(this.effectivePrevButtonDisabled)}" ?_aria-disabled="${ifDefined(this._prevButtonPseudoDisabled)}" accessible-name="${ifDefined(this.firstPageAccessibleName)}" size="Large" icon="close-command-field" design="Tertiary" @click="${this.setFirstPage}"></udex-button></li>`;}
|
|
10
10
|
function block3 (this: Pagination, context: UI5Element, tags: string[], suffix: string | undefined) { return html`${ repeat(this.pagination, (item, index) => (item as typeof item & {_id?: any})._id || index, (item, index: number) => block4.call(this, context, tags, suffix, item, index)) }`;}
|
|
11
11
|
function block4 (this: Pagination, context: UI5Element, tags: string[], suffix: string | undefined, item: any, index: number) { return html`<li class="udex-pagination__item"><a class="udex-pagination__page" href="#" aria-label="${ifDefined(item.accessibleName)}" @click="${this.onPageClick}" ?active="${item.active}" aria-current="${ifDefined(item.ariaCurrent)}" index="${ifDefined(item.index)}"><span class="udex-pagination__page--value">${ifDefined(item.value)}</span></a></li>`;}
|
|
12
12
|
function block5 (this: Pagination, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<li class="udex-pagination__item udex-pagination__item--short" tabindex="-1" aria-label="${ifDefined(this.paginationShortAccessibleName)}"><span class="udex-pagination__item--short-value">${ifDefined(this.shortTextStart)}</span><span class="udex-pagination__item--short-separator">${ifDefined(this.shortTextSeparator)}</span><span class="udex-pagination__item--short-value">${ifDefined(this.shortTextEnd)}</span></li>`;}
|
|
13
|
-
function block6 (this: Pagination, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<li class="udex-pagination__item--last udex-pagination__item"><${scopeTag("udex-button", tags, suffix)} ?disabled="${this.
|
|
13
|
+
function block6 (this: Pagination, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<li class="udex-pagination__item--last udex-pagination__item"><${scopeTag("udex-button", tags, suffix)} aria-disabled="${ifDefined(this.effectiveNextButtonDisabled)}" ?_aria-disabled="${ifDefined(this._nextButtonPseudoDisabled)}" accessible-name="${ifDefined(this.lastPageAccessibleName)}" size="Large" icon="open-command-field" design="Tertiary" @click="${this.setLastPage}"></${scopeTag("udex-button", tags, suffix)}></li>` : html`<li class="udex-pagination__item--last udex-pagination__item"><udex-button aria-disabled="${ifDefined(this.effectiveNextButtonDisabled)}" ?_aria-disabled="${ifDefined(this._nextButtonPseudoDisabled)}" accessible-name="${ifDefined(this.lastPageAccessibleName)}" size="Large" icon="open-command-field" design="Tertiary" @click="${this.setLastPage}"></udex-button></li>`;}
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
export default block0;
|
|
@@ -9,7 +9,7 @@ function block1 (this: PhoneNumberField, context: UI5Element, tags: string[], su
|
|
|
9
9
|
function block2 (this: PhoneNumberField, context: UI5Element, tags: string[], suffix: string | undefined) { return html` * `;}
|
|
10
10
|
function block3 (this: PhoneNumberField, context: UI5Element, tags: string[], suffix: string | undefined, item: any, index: number) { return suffix ? html`<${scopeTag("udex-list-item", tags, suffix)} id="${ifDefined(item.iso)}" ?selected="${item.selected}"><div class="udex-phone-number-field__dropdown-list-item"><div class="udex-phone-number-field__flag" style="background-position-x: ${ifDefined(item.flagX)}; background-position-y: ${ifDefined(item.flagY)}"></div><span class="udex-phone-number-field__country-name">${ifDefined(item.countryName)}${ item.localName ? block4.call(this, context, tags, suffix, item, index) : undefined }${ifDefined(item.phonePrefix)}</span></div></${scopeTag("udex-list-item", tags, suffix)}>` : html`<udex-list-item id="${ifDefined(item.iso)}" ?selected="${item.selected}"><div class="udex-phone-number-field__dropdown-list-item"><div class="udex-phone-number-field__flag" style="background-position-x: ${ifDefined(item.flagX)}; background-position-y: ${ifDefined(item.flagY)}"></div><span class="udex-phone-number-field__country-name">${ifDefined(item.countryName)}${ item.localName ? block4.call(this, context, tags, suffix, item, index) : undefined }${ifDefined(item.phonePrefix)}</span></div></udex-list-item>`;}
|
|
11
11
|
function block4 (this: PhoneNumberField, context: UI5Element, tags: string[], suffix: string | undefined, item: any, index: number) { return html` (${ifDefined(item.localName)}) `;}
|
|
12
|
-
function block5 (this: PhoneNumberField, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("udex-button", tags, suffix)} class="udex-phone-number-field__open-button" size="Large" icon="${ifDefined(this.buttonIcon)}" design="Tertiary" icon-end ?disabled="${this.isButtonDisabled}" aria-haspopup="true" accessible-name-ref="${ifDefined(this._id)}-countrySelectorAriaLabel ${ifDefined(this.ariaDescribedById)}" aria-label="${ifDefined(this.countrySelectorAriaLabel)}" aria-expanded="${ifDefined(this._dropdownExpanded)}" aria-controls="${ifDefined(this._id)}_dropdown-menu" role="combobox" @click="${this.onClick}"><div class="udex-phone-number-field__open-button-text">${ifDefined(this.selectedCountryName)}${ifDefined(this.selectedPhonePrefix)}</div><div class="udex-phone-number-field__button-content"><img class="udex-phone-number-field__flag" aria-label="${ifDefined(this.selectedCountryName)}" style="${
|
|
12
|
+
function block5 (this: PhoneNumberField, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("udex-button", tags, suffix)} class="udex-phone-number-field__open-button" size="Large" icon="${ifDefined(this.buttonIcon)}" design="Tertiary" icon-end ?disabled="${this.isButtonDisabled}" aria-haspopup="true" accessible-name-ref="${ifDefined(this._id)}-countrySelectorAriaLabel ${ifDefined(this.ariaDescribedById)}" aria-label="${ifDefined(this.countrySelectorAriaLabel)}" aria-expanded="${ifDefined(this._dropdownExpanded)}" aria-controls="${ifDefined(this._id)}_dropdown-menu" role="combobox" @click="${this.onClick}"><div class="udex-phone-number-field__open-button-text">${ifDefined(this.selectedCountryName)}${ifDefined(this.selectedPhonePrefix)}</div><div class="udex-phone-number-field__button-content"><img class="udex-phone-number-field__flag" aria-label="${ifDefined(this.selectedCountryName)}" style="background-position-x: ${ifDefined(this.selectedFlagBackgroundPosition.x)}; background-position-y: ${ifDefined(this.selectedFlagBackgroundPosition.y)}"></div></${scopeTag("udex-button", tags, suffix)}>` : html`<udex-button class="udex-phone-number-field__open-button" size="Large" icon="${ifDefined(this.buttonIcon)}" design="Tertiary" icon-end ?disabled="${this.isButtonDisabled}" aria-haspopup="true" accessible-name-ref="${ifDefined(this._id)}-countrySelectorAriaLabel ${ifDefined(this.ariaDescribedById)}" aria-label="${ifDefined(this.countrySelectorAriaLabel)}" aria-expanded="${ifDefined(this._dropdownExpanded)}" aria-controls="${ifDefined(this._id)}_dropdown-menu" role="combobox" @click="${this.onClick}"><div class="udex-phone-number-field__open-button-text">${ifDefined(this.selectedCountryName)}${ifDefined(this.selectedPhonePrefix)}</div><div class="udex-phone-number-field__button-content"><img class="udex-phone-number-field__flag" aria-label="${ifDefined(this.selectedCountryName)}" style="background-position-x: ${ifDefined(this.selectedFlagBackgroundPosition.x)}; background-position-y: ${ifDefined(this.selectedFlagBackgroundPosition.y)}"></div></udex-button>`;}
|
|
13
13
|
function block6 (this: PhoneNumberField, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("udex-status-message", tags, suffix)} ?disabled="${this.disabled}" supporting-text="${ifDefined(this.supportingText)}" value-state="${ifDefined(this.fieldState)}"></${scopeTag("udex-status-message", tags, suffix)}>` : html`<udex-status-message ?disabled="${this.disabled}" supporting-text="${ifDefined(this.supportingText)}" value-state="${ifDefined(this.fieldState)}"></udex-status-message>`;}
|
|
14
14
|
function block7 (this: PhoneNumberField, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<span id="${ifDefined(this._id)}-supportingTextDesc" class="hidden-text">${ifDefined(this.supportingText)}</span>`;}
|
|
15
15
|
function block8 (this: PhoneNumberField, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<span id="${ifDefined(this._id)}-valueStateDesc" class="hidden-text">${ifDefined(this.valueStateText)}</span>`;}
|
|
@@ -4,16 +4,16 @@ import type UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
|
4
4
|
import type Search from "../../Search.js";
|
|
5
5
|
import type { ClassMapValue } from "@ui5/webcomponents-base/dist/types.js";
|
|
6
6
|
|
|
7
|
-
function block0 (this: Search, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<div class="udex-search__root ${ifDefined(this.searchClasses)}">${ this.isShowSearchHomePrefix ? block1.call(this, context, tags, suffix) : undefined }<form role="search" class="udex-search__container ${ifDefined(this.focusClasses)}${ifDefined(this.isNotEmptyClass)}">${ this.labelAnimationDisabled ? block2.call(this, context, tags, suffix) : block3.call(this, context, tags, suffix) }${ this.
|
|
7
|
+
function block0 (this: Search, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<div class="udex-search__root ${ifDefined(this.searchClasses)}">${ this.isShowSearchHomePrefix ? block1.call(this, context, tags, suffix) : undefined }<form role="search" class="udex-search__container ${ifDefined(this.focusClasses)}${ifDefined(this.isNotEmptyClass)}">${ this.labelAnimationDisabled ? block2.call(this, context, tags, suffix) : block3.call(this, context, tags, suffix) }${ this.open ? block5.call(this, context, tags, suffix) : undefined }<div class="udex-search__icons">${ this.isShowHomeResetButton ? block6.call(this, context, tags, suffix) : undefined }${ this.isShowResetButton ? block7.call(this, context, tags, suffix) : undefined }${ this.isVoiceButton ? block8.call(this, context, tags, suffix) : undefined }${ this.showNonInteractiveButton ? block9.call(this, context, tags, suffix) : undefined }${ this.showSubmitHomeButton ? block10.call(this, context, tags, suffix) : undefined }${ this.showSubmitStandardButton ? block11.call(this, context, tags, suffix) : undefined }</div></form></div>`;}
|
|
8
8
|
function block1 (this: Search, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<div class="udex-search__prefix ${ifDefined(this.prefixWrapperClasses)}"><button type="button" role="combobox" aria-expanded="${ifDefined(this._prefixDropdownExpanded)}" aria-label="${ifDefined(this.labelPrefix)}" aria-haspopup="true" aria-controls="udex-search-prefix" class="udex-search__prefix-button" @click="${this.handleDropdownClick}"><span class="udex-search__prefix-label">${ifDefined(this.labelPrefix)}</span><${scopeTag("ui5-icon", tags, suffix)} class="udex-search__prefix-icon" name="slim-arrow-down"></${scopeTag("ui5-icon", tags, suffix)}></button><${scopeTag("ui5-popover", tags, suffix)} id="udex-search-prefix" class="${ifDefined(this.prefixPopoverClasses)}" hide-arrow placement-type="Bottom" horizontal-align="Left" style="${styleMap(this.prefixPopoverStyles)}" @after-close="${this.handleAfterClosePrefixPopover}"><slot></slot></${scopeTag("ui5-popover", tags, suffix)}></div>` : html`<div class="udex-search__prefix ${ifDefined(this.prefixWrapperClasses)}"><button type="button" role="combobox" aria-expanded="${ifDefined(this._prefixDropdownExpanded)}" aria-label="${ifDefined(this.labelPrefix)}" aria-haspopup="true" aria-controls="udex-search-prefix" class="udex-search__prefix-button" @click="${this.handleDropdownClick}"><span class="udex-search__prefix-label">${ifDefined(this.labelPrefix)}</span><ui5-icon class="udex-search__prefix-icon" name="slim-arrow-down"></ui5-icon></button><ui5-popover id="udex-search-prefix" class="${ifDefined(this.prefixPopoverClasses)}" hide-arrow placement-type="Bottom" horizontal-align="Left" style="${styleMap(this.prefixPopoverStyles)}" @after-close="${this.handleAfterClosePrefixPopover}"><slot></slot></ui5-popover></div>`;}
|
|
9
9
|
function block2 (this: Search, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<input role="searchbox" id="search-input" type="search" name="search" class="udex-search__field" autocomplete="off" aria-autocomplete="list" aria-haspopup="${ifDefined(this.getAriaHasPopup)}" aria-label="${ifDefined(this.accInfo.ariaLabel)}" aria-describedby="search-description" placeholder="${ifDefined(this.effectivePlaceholder)}" .value="${ifDefined(this.value)}" @input="${this.handleSearchChange}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @focusout="${this.handleFocusout}" @blur="${this.handleBlur}" @click="${this.handleInputClick}" />`;}
|
|
10
10
|
function block3 (this: Search, context: UI5Element, tags: string[], suffix: string | undefined) { return html`${ this.label ? block4.call(this, context, tags, suffix) : undefined }<input role="searchbox" id="search-input" type="search" name="search" class="udex-search__field" autocomplete="off" aria-autocomplete="list" aria-label="${ifDefined(this.accInfo.ariaLabel)}" aria-describedby="search-description" aria-haspopup="${ifDefined(this.getAriaHasPopup)}" .value="${ifDefined(this.value)}" @input="${this.handleSearchChange}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @focusout="${this.handleFocusout}" @blur="${this.handleBlur}" @click="${this.handleInputClick}" />`;}
|
|
11
11
|
function block4 (this: Search, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<label for="search-input" class="${ifDefined(this.labelClasses)}">${ifDefined(this.label)}</label>`;}
|
|
12
|
-
function block5 (this: Search, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<span
|
|
12
|
+
function block5 (this: Search, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<span aria-live="polite" aria-atomic="true" id="search-description" class="hidden" aria-hidden="true">${ifDefined(this.suggestionsDescription)}</span>`;}
|
|
13
13
|
function block6 (this: Search, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("ui5-button", tags, suffix)} id="reset-button" class="udex-search__button udex-search__reset-button" design="Default" tooltip="${ifDefined(this.tooltipInfo.tooltipResetButton)}" @click="${this.onReset}" @keydown="${this.handleKeyDownReset}"><${scopeTag("ui5-icon", tags, suffix)} class="udex-search__button-icon" accessible-name="${ifDefined(this.accInfo.accessibleNameResetIcon)}" accessible-role="presentation" name="decline"></${scopeTag("ui5-icon", tags, suffix)}></${scopeTag("ui5-button", tags, suffix)}>` : html`<ui5-button id="reset-button" class="udex-search__button udex-search__reset-button" design="Default" tooltip="${ifDefined(this.tooltipInfo.tooltipResetButton)}" @click="${this.onReset}" @keydown="${this.handleKeyDownReset}"><ui5-icon class="udex-search__button-icon" accessible-name="${ifDefined(this.accInfo.accessibleNameResetIcon)}" accessible-role="presentation" name="decline"></ui5-icon></ui5-button>`;}
|
|
14
14
|
function block7 (this: Search, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("udex-control-button", tags, suffix)} id="reset-button" class="udex-search__reset-button" design="Default" tooltip="${ifDefined(this.tooltipInfo.tooltipResetButton)}" icon="decline" size="Large" accessible-name="${ifDefined(this.accInfo.accessibleNameResetIcon)}" @click="${this.onReset}" @keydown="${this.handleKeyDownReset}"></${scopeTag("udex-control-button", tags, suffix)}>` : html`<udex-control-button id="reset-button" class="udex-search__reset-button" design="Default" tooltip="${ifDefined(this.tooltipInfo.tooltipResetButton)}" icon="decline" size="Large" accessible-name="${ifDefined(this.accInfo.accessibleNameResetIcon)}" @click="${this.onReset}" @keydown="${this.handleKeyDownReset}"></udex-control-button>`;}
|
|
15
15
|
function block8 (this: Search, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("ui5-button", tags, suffix)} id="voice-button" class="udex-search__button udex-search__voice-button ${ifDefined(this.voiceActiveClass)}" design="Default" icon="microphone" tooltip="${ifDefined(this.tooltipInfo.tooltipVoiceButton)}" @click="${this.onVoice}"></${scopeTag("ui5-button", tags, suffix)}>` : html`<ui5-button id="voice-button" class="udex-search__button udex-search__voice-button ${ifDefined(this.voiceActiveClass)}" design="Default" icon="microphone" tooltip="${ifDefined(this.tooltipInfo.tooltipVoiceButton)}" @click="${this.onVoice}"></ui5-button>`;}
|
|
16
|
-
function block9 (this: Search, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("ui5-icon", tags, suffix)} class="udex-search__icon" aria-hidden="true" accessible-name="${ifDefined(this.accInfo.accessibleNameSearchIcon)}" name="search"></${scopeTag("ui5-icon", tags, suffix)}>` : html`<ui5-icon class="udex-search__icon" aria-hidden="true" accessible-name="${ifDefined(this.accInfo.accessibleNameSearchIcon)}" name="search"></ui5-icon>`;}
|
|
16
|
+
function block9 (this: Search, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("ui5-icon", tags, suffix)} class="udex-search__icon" aria-hidden="true" accessible-name="${ifDefined(this.accInfo.accessibleNameSearchIcon)}" show-tooltip name="search"></${scopeTag("ui5-icon", tags, suffix)}>` : html`<ui5-icon class="udex-search__icon" aria-hidden="true" accessible-name="${ifDefined(this.accInfo.accessibleNameSearchIcon)}" show-tooltip name="search"></ui5-icon>`;}
|
|
17
17
|
function block10 (this: Search, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("ui5-button", tags, suffix)} id="submit-button" class="udex-search__button udex-search__submit-button ${ifDefined(this.searchButtonActiveClass)}" design="Default" icon="search" tooltip="${ifDefined(this.tooltipInfo.tooltipSubmitButton)}" @click="${this.onSubmit}"></${scopeTag("ui5-button", tags, suffix)}>` : html`<ui5-button id="submit-button" class="udex-search__button udex-search__submit-button ${ifDefined(this.searchButtonActiveClass)}" design="Default" icon="search" tooltip="${ifDefined(this.tooltipInfo.tooltipSubmitButton)}" @click="${this.onSubmit}"></ui5-button>`;}
|
|
18
18
|
function block11 (this: Search, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("udex-control-button", tags, suffix)} id="submit-button" class="udex-search__submit-button" size="Large" design="Default" icon="search" tooltip="${ifDefined(this.tooltipInfo.tooltipSubmitButton)}" @click="${this.onSubmit}"></${scopeTag("udex-control-button", tags, suffix)}>` : html`<udex-control-button id="submit-button" class="udex-search__submit-button" size="Large" design="Default" icon="search" tooltip="${ifDefined(this.tooltipInfo.tooltipSubmitButton)}" @click="${this.onSubmit}"></udex-control-button>`;}
|
|
19
19
|
|
|
@@ -5,8 +5,8 @@ import type UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
|
5
5
|
import type { ClassMapValue } from "@ui5/webcomponents-base/dist/types.js";
|
|
6
6
|
|
|
7
7
|
function block0 (this: SecondaryNavigationItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`${ this.isLink ? block1.call(this, context, tags, suffix) : block2.call(this, context, tags, suffix) } `;}
|
|
8
|
-
function block1 (this: SecondaryNavigationItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<a class="udex-secondary-navigation__item" role="${ifDefined(this.menuItemRole)}" ?active="${this.isActive}" href="${ifDefined(this.path)}" target="${ifDefined(this.target)}" aria-current="${ifDefined(this.ariaCurrent)}" @keydown="${this.handleItemLinkKeyDown}" @click="${this.fireNavItemClickEvent}">${ifDefined(this.itemLabel)}</a>`;}
|
|
9
|
-
function block2 (this: SecondaryNavigationItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<button class="udex-secondary-navigation__item" role="${ifDefined(this.itemRole)}"
|
|
8
|
+
function block1 (this: SecondaryNavigationItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<a class="udex-secondary-navigation__item" role="${ifDefined(this.menuItemRole)}" ?active="${this.isActive}" href="${ifDefined(this.path)}" target="${ifDefined(this.target)}" tabindex="${ifDefined(this._tabIndex)}" aria-current="${ifDefined(this.ariaCurrent)}" @keydown="${this.handleItemLinkKeyDown}" @click="${this.fireNavItemClickEvent}">${ifDefined(this.itemLabel)}</a>`;}
|
|
9
|
+
function block2 (this: SecondaryNavigationItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<button class="udex-secondary-navigation__item" role="${ifDefined(this.itemRole)}" ?active="${this.isActive}" tabindex="${ifDefined(this.menuOpenerTabIndex)}" aria-haspopup="${ifDefined(this.hasNestedItems)}" aria-expanded="${ifDefined(this.isOpen)}" aria-label="${ifDefined(this.ariaLabel)}" @keydown="${this.handleItemEnterOrSpaceKeys}" @click="${this.openDropdown}"><span class="udex-secondary-navigation__item-text-wrap">${ifDefined(this.itemLabel)}${ this._subTitle ? block3.call(this, context, tags, suffix) : undefined }${ this.hasNestedItems ? block4.call(this, context, tags, suffix) : undefined }</span></button>${ this.isOpen ? block5.call(this, context, tags, suffix) : undefined }`;}
|
|
10
10
|
function block3 (this: SecondaryNavigationItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<span class="udex-secondary-navigation__item-sub-title">${ifDefined(this._subTitle)}</span>`;}
|
|
11
11
|
function block4 (this: SecondaryNavigationItem, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("ui5-icon", tags, suffix)} class="udex-secondary-navigation__item-icon" name="slim-arrow-down"></${scopeTag("ui5-icon", tags, suffix)}>` : html`<ui5-icon class="udex-secondary-navigation__item-icon" name="slim-arrow-down"></ui5-icon>`;}
|
|
12
12
|
function block5 (this: SecondaryNavigationItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<div class="udex-secondary-navigation__dropdown"><ul role="menu" class="udex-secondary-navigation__dropdown-list" @keydown="${this.handleSubItemKeyDown}">${ repeat(this._processedItems, (item, index) => (item as typeof item & {_id?: any})._id || index, (item, index: number) => block6.call(this, context, tags, suffix, item, index)) }</ul><div @keydown="${this.handleButtonsEscKey}"><slot></slot></div></div>`;}
|