@sapudex/web-components 2.25.1 → 2.26.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/cypress/fixtures/profile-menu.ts +2 -1
- package/cypress/specs/MastheadProfileMenu.cy.tsx +21 -6
- package/dist/List.d.ts +9 -0
- package/dist/List.js +33 -2
- package/dist/List.js.map +1 -1
- package/dist/MastheadCountrySelector.d.ts +11 -0
- package/dist/MastheadCountrySelector.js +71 -14
- package/dist/MastheadCountrySelector.js.map +1 -1
- package/dist/MastheadItem.d.ts +1 -0
- package/dist/MastheadItem.js +9 -1
- package/dist/MastheadItem.js.map +1 -1
- package/dist/MastheadMenu.d.ts +11 -0
- package/dist/MastheadMenu.js +43 -13
- package/dist/MastheadMenu.js.map +1 -1
- package/dist/MastheadProfileMenu.d.ts +33 -3
- package/dist/MastheadProfileMenu.js +93 -5
- package/dist/MastheadProfileMenu.js.map +1 -1
- package/dist/Pagination.d.ts +2 -0
- package/dist/Pagination.js +31 -6
- package/dist/Pagination.js.map +1 -1
- package/dist/PaginationTemplate.js +6 -5
- package/dist/PaginationTemplate.js.map +1 -1
- package/dist/Tooltip.js +3 -5
- package/dist/Tooltip.js.map +1 -1
- package/dist/TooltipTemplate.d.ts +2 -0
- package/dist/TooltipTemplate.js +7 -0
- package/dist/TooltipTemplate.js.map +1 -0
- package/dist/assets/{InputSuggestions-CTFZ6hH-.js → InputSuggestions-CG5owMFQ.js} +1 -1
- package/dist/assets/{ListItemStandardExpandableTextTemplate-wXdCijez.js → ListItemStandardExpandableTextTemplate-DpVr7qdn.js} +1 -1
- package/dist/assets/{bundle.esm-BXCZ9BP3.js → bundle.esm-CTkLMr6f.js} +185 -185
- package/dist/css/themes/MastheadCountrySelector.css +1 -1
- package/dist/css/themes/MastheadItem.css +1 -1
- package/dist/css/themes/MastheadMenu.css +1 -1
- package/dist/css/themes/MastheadMenuItem.css +1 -1
- package/dist/css/themes/MastheadProfileMenu.css +1 -1
- package/dist/css/themes/Quote.css +1 -1
- package/dist/css/themes/RatingIndicator.css +1 -1
- package/dist/css/themes/Slider.css +1 -1
- package/dist/custom-elements-internal.json +163 -155
- package/dist/custom-elements.json +144 -140
- package/dist/generated/templates/MastheadCountrySelectorTemplate.lit.js +1 -1
- package/dist/generated/templates/MastheadCountrySelectorTemplate.lit.js.map +1 -1
- package/dist/generated/templates/MastheadProfileMenuTemplate.lit.js +7 -5
- package/dist/generated/templates/MastheadProfileMenuTemplate.lit.js.map +1 -1
- package/dist/generated/themes/MastheadCountrySelector.css.d.ts +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.d.ts +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/MastheadMenu.css.d.ts +1 -1
- package/dist/generated/themes/MastheadMenu.css.js +1 -1
- package/dist/generated/themes/MastheadMenu.css.js.map +1 -1
- package/dist/generated/themes/MastheadMenuItem.css.d.ts +1 -1
- package/dist/generated/themes/MastheadMenuItem.css.js +1 -1
- package/dist/generated/themes/MastheadMenuItem.css.js.map +1 -1
- package/dist/generated/themes/MastheadProfileMenu.css.d.ts +1 -1
- package/dist/generated/themes/MastheadProfileMenu.css.js +1 -1
- package/dist/generated/themes/MastheadProfileMenu.css.js.map +1 -1
- package/dist/generated/themes/Quote.css.d.ts +1 -1
- package/dist/generated/themes/Quote.css.js +1 -1
- package/dist/generated/themes/Quote.css.js.map +1 -1
- package/dist/generated/themes/RatingIndicator.css.d.ts +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/Slider.css.d.ts +1 -1
- package/dist/generated/themes/Slider.css.js +1 -1
- package/dist/generated/themes/Slider.css.js.map +1 -1
- package/dist/types/List.d.ts +6 -0
- package/dist/types/List.js +7 -0
- package/dist/types/List.js.map +1 -1
- package/dist/vscode.html-custom-data.json +1 -1
- package/dist/web-types.json +4 -6
- package/package.json +1 -1
- package/src/List.ts +41 -2
- package/src/MastheadCountrySelector.hbs +20 -16
- package/src/MastheadCountrySelector.ts +83 -16
- package/src/MastheadItem.ts +10 -1
- package/src/MastheadMenu.ts +56 -13
- package/src/MastheadProfileMenu.hbs +43 -26
- package/src/MastheadProfileMenu.ts +124 -7
- package/src/Pagination.ts +32 -6
- package/src/PaginationTemplate.tsx +19 -16
- package/src/Tooltip.ts +7 -6
- package/src/TooltipTemplate.tsx +29 -0
- package/src/generated/templates/MastheadCountrySelectorTemplate.lit.ts +1 -1
- package/src/generated/templates/MastheadProfileMenuTemplate.lit.ts +7 -5
- package/src/generated/themes/MastheadCountrySelector.css.ts +1 -1
- package/src/generated/themes/MastheadItem.css.ts +1 -1
- package/src/generated/themes/MastheadMenu.css.ts +1 -1
- package/src/generated/themes/MastheadMenuItem.css.ts +1 -1
- package/src/generated/themes/MastheadProfileMenu.css.ts +1 -1
- package/src/generated/themes/Quote.css.ts +1 -1
- package/src/generated/themes/RatingIndicator.css.ts +1 -1
- package/src/generated/themes/Slider.css.ts +1 -1
- package/src/themes/MastheadCountrySelector.css +70 -10
- package/src/themes/MastheadItem.css +0 -1
- package/src/themes/MastheadMenu.css +1 -2
- package/src/themes/MastheadMenuItem.css +1 -0
- package/src/themes/MastheadProfileMenu.css +113 -17
- package/src/themes/Quote.css +1 -1
- package/src/types/List.ts +7 -0
- package/cypress/downloads/downloads.html +0 -0
- package/dist/generated/templates/TooltipTemplate.lit.d.ts +0 -3
- package/dist/generated/templates/TooltipTemplate.lit.js +0 -8
- package/dist/generated/templates/TooltipTemplate.lit.js.map +0 -1
- package/src/Tooltip.hbs +0 -22
- package/src/generated/templates/TooltipTemplate.lit.ts +0 -12
|
@@ -5,6 +5,7 @@ import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
|
5
5
|
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
|
6
6
|
import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
|
|
7
7
|
import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
|
|
8
|
+
import { isDesktop } from "@ui5/webcomponents-base/dist/Device.js";
|
|
8
9
|
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
9
10
|
import {
|
|
10
11
|
LOGOUT, SWITCH_ACCOUNT, BACK, OTHER_IDENTITIES, ADD_OR_REMOVE_ACCOUNT,
|
|
@@ -13,6 +14,7 @@ import { isEscape } from "@ui5/webcomponents-base/Keys.js";
|
|
|
13
14
|
import UDExMastheadMenu from "./MastheadMenu.js";
|
|
14
15
|
import UDExButton from "./Button.js";
|
|
15
16
|
import UDExList from "./List.js";
|
|
17
|
+
import UDExLink from "./Link.js";
|
|
16
18
|
import UDExListItem from "./ListItem.js";
|
|
17
19
|
import UDExMastheadMenuItem from "./MastheadMenuItem.js";
|
|
18
20
|
import MastheadProfileMenuTemplate from "./generated/templates/MastheadProfileMenuTemplate.lit.js";
|
|
@@ -37,6 +39,7 @@ export interface UserData {
|
|
|
37
39
|
email?: string,
|
|
38
40
|
avatarUrl?: string,
|
|
39
41
|
avatarInitials?: string
|
|
42
|
+
fallbackIcon?: string,
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
export interface UserIdentity {
|
|
@@ -96,6 +99,7 @@ type UDExMastheadProfileMenuAddOrRemoveClickEventDetail = {
|
|
|
96
99
|
UDExListItem,
|
|
97
100
|
UDExButton,
|
|
98
101
|
UDExList,
|
|
102
|
+
UDExLink,
|
|
99
103
|
],
|
|
100
104
|
})
|
|
101
105
|
|
|
@@ -198,13 +202,29 @@ class UDExMastheadProfileMenu extends UI5Element {
|
|
|
198
202
|
_openIdentities: boolean = false;
|
|
199
203
|
|
|
200
204
|
/**
|
|
201
|
-
*
|
|
205
|
+
* Defines the request render state
|
|
206
|
+
*
|
|
207
|
+
* @private
|
|
208
|
+
*/
|
|
209
|
+
@property({ type: Boolean, noAttribute: true })
|
|
210
|
+
_requestRender = false;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Slot for message strip.
|
|
202
214
|
*
|
|
203
215
|
* @public
|
|
204
216
|
*/
|
|
205
217
|
@slot({ type: Node, "default": false })
|
|
206
218
|
message!: Array<Node>;
|
|
207
219
|
|
|
220
|
+
/**
|
|
221
|
+
* Slot for logout button.
|
|
222
|
+
*
|
|
223
|
+
* @public
|
|
224
|
+
*/
|
|
225
|
+
@slot({ type: HTMLElement })
|
|
226
|
+
logoutButton!: Array<Node>;
|
|
227
|
+
|
|
208
228
|
@i18n("@sapudex/web-components")
|
|
209
229
|
static i18nBundle: I18nBundle;
|
|
210
230
|
|
|
@@ -212,6 +232,8 @@ class UDExMastheadProfileMenu extends UI5Element {
|
|
|
212
232
|
_handleResizeBound: ResizeObserverCallback;
|
|
213
233
|
_shouldFocusBackBtn!: boolean;
|
|
214
234
|
_shouldFocusSwitchBtn!: boolean;
|
|
235
|
+
_identitiesListClassName = "udex-masthead-profile-menu__identities-list";
|
|
236
|
+
_profileMenuLinksClassName = "udex-masthead-profile-menu__links";
|
|
215
237
|
|
|
216
238
|
constructor() {
|
|
217
239
|
super();
|
|
@@ -223,10 +245,14 @@ class UDExMastheadProfileMenu extends UI5Element {
|
|
|
223
245
|
this.updateFocusState(this._shouldFocusBackBtn, this.focusBackBtn.bind(this));
|
|
224
246
|
this.updateFocusState(this._shouldFocusSwitchBtn, this.focusSwitchBtn.bind(this));
|
|
225
247
|
this.setMenuItemsMobileMode();
|
|
248
|
+
this.checkScrollableElements();
|
|
226
249
|
}
|
|
227
250
|
|
|
228
251
|
onEnterDOM(): void {
|
|
229
252
|
ResizeHandler.register(this, this._handleResizeBound);
|
|
253
|
+
if (isDesktop()) {
|
|
254
|
+
this.setAttribute("desktop", "");
|
|
255
|
+
}
|
|
230
256
|
}
|
|
231
257
|
|
|
232
258
|
onExitDOM(): void {
|
|
@@ -239,6 +265,8 @@ class UDExMastheadProfileMenu extends UI5Element {
|
|
|
239
265
|
if (this.profileMenuLinks) {
|
|
240
266
|
this.profileMenuLinks._isMobileMode = this.isMobile;
|
|
241
267
|
}
|
|
268
|
+
|
|
269
|
+
this.checkScrollableElements();
|
|
242
270
|
}
|
|
243
271
|
|
|
244
272
|
handleSwitcherClick(): void {
|
|
@@ -247,8 +275,8 @@ class UDExMastheadProfileMenu extends UI5Element {
|
|
|
247
275
|
this._shouldFocusSwitchBtn = !this._openIdentities;
|
|
248
276
|
}
|
|
249
277
|
|
|
250
|
-
|
|
251
|
-
this.
|
|
278
|
+
handleUserLogoutClick(e: PointerEvent): void {
|
|
279
|
+
this.fireLogoutClick(e);
|
|
252
280
|
if (this._isMobileMode) {
|
|
253
281
|
this.closeMenu();
|
|
254
282
|
}
|
|
@@ -318,15 +346,18 @@ class UDExMastheadProfileMenu extends UI5Element {
|
|
|
318
346
|
}
|
|
319
347
|
}
|
|
320
348
|
|
|
321
|
-
|
|
349
|
+
fireLogoutClick(e: PointerEvent): void {
|
|
322
350
|
const item = e.target as UDExMastheadMenuItem;
|
|
323
|
-
|
|
324
|
-
this.fireDecoratorEvent("logout", {
|
|
351
|
+
const executeEvent = this.fireDecoratorEvent("logout", {
|
|
325
352
|
item,
|
|
326
|
-
sourceNode: item.shadowRoot?.querySelector("
|
|
353
|
+
sourceNode: item.shadowRoot?.querySelector("a") as HTMLElement,
|
|
327
354
|
originalEvent: e,
|
|
328
355
|
analyticsName: AnalyticsName.Header,
|
|
329
356
|
});
|
|
357
|
+
|
|
358
|
+
if (!executeEvent) {
|
|
359
|
+
e.preventDefault();
|
|
360
|
+
}
|
|
330
361
|
}
|
|
331
362
|
|
|
332
363
|
fireMenuItemClick(e: CustomEvent): void {
|
|
@@ -340,6 +371,84 @@ class UDExMastheadProfileMenu extends UI5Element {
|
|
|
340
371
|
});
|
|
341
372
|
}
|
|
342
373
|
|
|
374
|
+
checkScrollableElements(): void {
|
|
375
|
+
if (this._openIdentities) {
|
|
376
|
+
this.checkScrollableElement(this.identitiesHTMLElement, this._identitiesListClassName);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
if (this.isMobile) {
|
|
380
|
+
this.checkScrollableElement(this.profileMenuHTMLElement, this._profileMenuLinksClassName);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
checkScrollableElement(element: HTMLElement, className: string): void {
|
|
385
|
+
if (element) {
|
|
386
|
+
requestAnimationFrame(() => {
|
|
387
|
+
if (this.isScrollableElement(element)) {
|
|
388
|
+
element.classList.add(`${className}_scrollable`);
|
|
389
|
+
}
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
scrollToTopProfileMenu(): void {
|
|
395
|
+
setTimeout(() => {
|
|
396
|
+
this.profileMenuHTMLElement.scrollTop = 0;
|
|
397
|
+
}, 0);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
isScrollableElement(element: HTMLElement): boolean {
|
|
401
|
+
return element.scrollHeight > element.clientHeight;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
handleProfileMenuShadowVisible(): void {
|
|
405
|
+
this.toggleScrollableClass(
|
|
406
|
+
this.profileMenuHTMLElement,
|
|
407
|
+
this._profileMenuLinksClassName,
|
|
408
|
+
this.scrollBottomProfileMenu,
|
|
409
|
+
);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
handleIdentitiesListShadowVisible(): void {
|
|
413
|
+
this.toggleScrollableClass(
|
|
414
|
+
this.identitiesHTMLElement,
|
|
415
|
+
this._identitiesListClassName,
|
|
416
|
+
this.scrollBottomIdentitiesList,
|
|
417
|
+
);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
toggleScrollableClass(el: HTMLElement, className: string, scrollBottom: number): void {
|
|
421
|
+
if (scrollBottom === 0) {
|
|
422
|
+
el.classList.remove(`${className}_scrollable`);
|
|
423
|
+
} else {
|
|
424
|
+
el.classList.add(`${className}_scrollable`);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
get scrollBottomIdentitiesList(): number {
|
|
429
|
+
return this.calculateScrollBottom(this.identitiesHTMLElement);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
get scrollBottomProfileMenu(): number {
|
|
433
|
+
return this.calculateScrollBottom(this.profileMenuHTMLElement);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
calculateScrollBottom(element: HTMLElement): number {
|
|
437
|
+
return element.scrollHeight - element.scrollTop - element.clientHeight;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
get profileMenuHTMLElement(): HTMLElement {
|
|
441
|
+
return this.getElementByClassName(this._profileMenuLinksClassName);
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
get identitiesHTMLElement(): HTMLElement {
|
|
445
|
+
return this.getElementByClassName(this._identitiesListClassName);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
getElementByClassName(className: string): HTMLElement {
|
|
449
|
+
return this.shadowRoot?.querySelector<HTMLElement>(`.${className}`) as HTMLElement;
|
|
450
|
+
}
|
|
451
|
+
|
|
343
452
|
closeMenu():void {
|
|
344
453
|
this._mastheadShell.closeMobileMenu();
|
|
345
454
|
this._mastheadShell.mobileBtn?.focus();
|
|
@@ -381,6 +490,10 @@ class UDExMastheadProfileMenu extends UI5Element {
|
|
|
381
490
|
return !!this.message.length;
|
|
382
491
|
}
|
|
383
492
|
|
|
493
|
+
get hasLogoutButton(): boolean {
|
|
494
|
+
return !!this.logoutButton.length;
|
|
495
|
+
}
|
|
496
|
+
|
|
384
497
|
get logoutLink(): boolean {
|
|
385
498
|
return !!this.logoutUrl?.length;
|
|
386
499
|
}
|
|
@@ -425,6 +538,10 @@ class UDExMastheadProfileMenu extends UI5Element {
|
|
|
425
538
|
get isMobile(): boolean {
|
|
426
539
|
return this.isAtMostBreakpointSizeM || this.mastheadShell?.isMobileMenuMode;
|
|
427
540
|
}
|
|
541
|
+
|
|
542
|
+
get hasActionButton(): boolean {
|
|
543
|
+
return this.logoutLink || this.hasLogoutButton;
|
|
544
|
+
}
|
|
428
545
|
}
|
|
429
546
|
|
|
430
547
|
UDExMastheadProfileMenu.define();
|
package/src/Pagination.ts
CHANGED
|
@@ -237,7 +237,7 @@ class UDExPagination extends UI5Element {
|
|
|
237
237
|
const effectiveDisabledText = this._prevButtonPseudoDisabled ? `${translate(UDExPagination, DISABLED)}` : "";
|
|
238
238
|
return `${translate(UDExPagination, PREVIOUS_PAGE)} ${effectiveDisabledText}`;
|
|
239
239
|
}
|
|
240
|
-
return `${translate(UDExPagination, PREVIOUS_PAGE)}. ${this.activatePageAccessibleText} ${this.currentPageIndex}`;
|
|
240
|
+
return `${this.typeShort && this.nextButtonDisabled ? this.paginationShortAccessibleName : ""} ${translate(UDExPagination, PREVIOUS_PAGE)}. ${this.activatePageAccessibleText} ${this.currentPageIndex}`;
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
get previousBtnTooltip(): string {
|
|
@@ -249,7 +249,7 @@ class UDExPagination extends UI5Element {
|
|
|
249
249
|
const effectiveDisabledText = this._nextButtonPseudoDisabled ? `${translate(UDExPagination, DISABLED)}` : "";
|
|
250
250
|
return `${translate(UDExPagination, NEXT_PAGE)} ${effectiveDisabledText}`;
|
|
251
251
|
}
|
|
252
|
-
return `${translate(UDExPagination, NEXT_PAGE)}. ${this.activatePageAccessibleText} ${this.currentPageIndex + 2}`;
|
|
252
|
+
return `${this.typeShort && this.prevButtonDisabled ? this.paginationShortAccessibleName : ""} ${translate(UDExPagination, NEXT_PAGE)}. ${this.activatePageAccessibleText} ${this.currentPageIndex + 2}`;
|
|
253
253
|
}
|
|
254
254
|
|
|
255
255
|
get nextBtnTooltip(): string {
|
|
@@ -304,9 +304,17 @@ class UDExPagination extends UI5Element {
|
|
|
304
304
|
}
|
|
305
305
|
|
|
306
306
|
this.currentPageIndex = currentPage + 1;
|
|
307
|
+
const isLastPage = this.currentPageIndex === (this.pages - 1);
|
|
307
308
|
this._pageFocusedManually = false;
|
|
309
|
+
this._nextButtonPseudoDisabled = isLastPage;
|
|
308
310
|
|
|
309
|
-
|
|
311
|
+
if (isLastPage) {
|
|
312
|
+
if (this.typeShort) {
|
|
313
|
+
this.focusActiveArrow();
|
|
314
|
+
} else {
|
|
315
|
+
this.focusActivePage();
|
|
316
|
+
}
|
|
317
|
+
}
|
|
310
318
|
|
|
311
319
|
this.emitChangeEvent();
|
|
312
320
|
}
|
|
@@ -333,10 +341,19 @@ class UDExPagination extends UI5Element {
|
|
|
333
341
|
if (this.pages && currentPage <= 0) {
|
|
334
342
|
return;
|
|
335
343
|
}
|
|
344
|
+
|
|
336
345
|
this.currentPageIndex -= 1;
|
|
346
|
+
const isFirstPage = this.currentPageIndex === 0;
|
|
337
347
|
this._pageFocusedManually = false;
|
|
348
|
+
this._prevButtonPseudoDisabled = isFirstPage;
|
|
338
349
|
|
|
339
|
-
|
|
350
|
+
if (isFirstPage) {
|
|
351
|
+
if (this.typeShort) {
|
|
352
|
+
this.focusActiveArrow();
|
|
353
|
+
} else {
|
|
354
|
+
this.focusActivePage();
|
|
355
|
+
}
|
|
356
|
+
}
|
|
340
357
|
|
|
341
358
|
this.emitChangeEvent();
|
|
342
359
|
}
|
|
@@ -423,10 +440,19 @@ class UDExPagination extends UI5Element {
|
|
|
423
440
|
this.fireDecoratorEvent("change", { currentPage: this.currentPageIndex + 1 });
|
|
424
441
|
}
|
|
425
442
|
|
|
443
|
+
focusActivePage() {
|
|
444
|
+
const activePageItem = this.shadowRoot?.querySelector<HTMLElement>(`.udex-pagination__page[data-index="${this.currentPageIndex}"]`);
|
|
445
|
+
activePageItem?.focus();
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
focusActiveArrow() {
|
|
449
|
+
const activeArrow = this.shadowRoot?.querySelector(`.udex-pagination__arrow--${this.currentPageIndex === 0 ? "next" : "prev"}`);
|
|
450
|
+
activeArrow?.shadowRoot?.querySelector<HTMLElement>("button")?.focus();
|
|
451
|
+
}
|
|
452
|
+
|
|
426
453
|
onAfterRendering() {
|
|
427
454
|
if (this._pageFocusedManually) {
|
|
428
|
-
|
|
429
|
-
activePageItem?.focus();
|
|
455
|
+
this.focusActivePage();
|
|
430
456
|
}
|
|
431
457
|
|
|
432
458
|
if (this.type === UDExPaginationType.full) {
|
|
@@ -10,13 +10,15 @@ export default function PaginationTemplate(this: UDExPagination) {
|
|
|
10
10
|
// This can maybe be cleaned up nicer as we can't simply
|
|
11
11
|
// return empty("return;") as the renderer expects an element
|
|
12
12
|
if (!this.pages) { return (<></>); }
|
|
13
|
+
const rootClass = "udex-pagination";
|
|
13
14
|
|
|
14
15
|
return (
|
|
15
16
|
<nav class={this.paginationClass} role="navigation" aria-label={this.paginationAccessibleName}>
|
|
16
|
-
<ul class=
|
|
17
|
-
<li class=
|
|
17
|
+
<ul class={`${rootClass}__list`}>
|
|
18
|
+
<li class={`${rootClass}__item ${rootClass}__item--prev`}>
|
|
18
19
|
<UDExButton
|
|
19
|
-
|
|
20
|
+
class={`${rootClass}__arrow ${rootClass}__arrow--prev`}
|
|
21
|
+
disabled={this.effectivePrevButtonDisabled}
|
|
20
22
|
{...(this._prevButtonPseudoDisabled ? { "_aria-disabled": "" } : {})}
|
|
21
23
|
accessible-name={this.previousPageAccessibleName}
|
|
22
24
|
tooltip={this.previousBtnTooltip}
|
|
@@ -28,12 +30,13 @@ export default function PaginationTemplate(this: UDExPagination) {
|
|
|
28
30
|
></UDExButton>
|
|
29
31
|
</li>
|
|
30
32
|
|
|
31
|
-
{ this.typeFull ? renderFullPagination.call(this) : "" }
|
|
32
|
-
{ this.typeShort ? renderShortPagination.call(this) : "" }
|
|
33
|
+
{ this.typeFull ? renderFullPagination.call(this, rootClass) : "" }
|
|
34
|
+
{ this.typeShort ? renderShortPagination.call(this, rootClass) : "" }
|
|
33
35
|
|
|
34
|
-
<li class=
|
|
36
|
+
<li class={`${rootClass}__item ${rootClass}__item--next`}>
|
|
35
37
|
<UDExButton
|
|
36
|
-
|
|
38
|
+
class={`${rootClass}__arrow ${rootClass}__arrow--next`}
|
|
39
|
+
disabled={this.effectiveNextButtonDisabled}
|
|
37
40
|
{...(this._nextButtonPseudoDisabled ? { "_aria-disabled": "" } : {})}
|
|
38
41
|
accessible-name={this.nextPageAccessibleName}
|
|
39
42
|
tooltip={this.nextBtnTooltip}
|
|
@@ -49,12 +52,12 @@ export default function PaginationTemplate(this: UDExPagination) {
|
|
|
49
52
|
);
|
|
50
53
|
}
|
|
51
54
|
|
|
52
|
-
function renderFullPagination(this: UDExPagination) {
|
|
55
|
+
function renderFullPagination(this: UDExPagination, rootClass: string) {
|
|
53
56
|
return this.pagination.map((page, i) => {
|
|
54
57
|
return (
|
|
55
|
-
<li key={i} class=
|
|
58
|
+
<li key={i} class={`${rootClass}__item`}>
|
|
56
59
|
<a
|
|
57
|
-
class=
|
|
60
|
+
class={`${rootClass}__page`}
|
|
58
61
|
href="#"
|
|
59
62
|
aria-label={page.accessibleName}
|
|
60
63
|
onClick={this.onPageClick}
|
|
@@ -62,19 +65,19 @@ function renderFullPagination(this: UDExPagination) {
|
|
|
62
65
|
aria-current={page.ariaCurrent as AriaCurrent}
|
|
63
66
|
data-index={page.index}
|
|
64
67
|
>
|
|
65
|
-
<span class=
|
|
68
|
+
<span class={`${rootClass}__page--value`}>{page.value}</span>
|
|
66
69
|
</a>
|
|
67
70
|
</li>
|
|
68
71
|
);
|
|
69
72
|
});
|
|
70
73
|
}
|
|
71
74
|
|
|
72
|
-
function renderShortPagination(this: UDExPagination) {
|
|
75
|
+
function renderShortPagination(this: UDExPagination, rootClass: string) {
|
|
73
76
|
return (
|
|
74
|
-
<li class=
|
|
75
|
-
<span class=
|
|
76
|
-
<span class=
|
|
77
|
-
<span class=
|
|
77
|
+
<li class={`${rootClass}__item ${rootClass}__item--short`} tab-index="-1" aria-label={this.paginationShortAccessibleName}>
|
|
78
|
+
<span class={`${rootClass}__item--short-value`}>{this.shortTextStart}</span>
|
|
79
|
+
<span class={`${rootClass}__item--short-separator`}>{this.shortTextSeparator}</span>
|
|
80
|
+
<span class={`${rootClass}__item--short-value`}>{this.shortTextEnd}</span>
|
|
78
81
|
</li>
|
|
79
82
|
);
|
|
80
83
|
}
|
package/src/Tooltip.ts
CHANGED
|
@@ -3,14 +3,13 @@ import customElement from "@ui5/webcomponents-base/dist/decorators/customElement
|
|
|
3
3
|
import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
4
4
|
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
5
5
|
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
|
6
|
-
import
|
|
7
|
-
import Popover from "@ui5/webcomponents/dist/Popover.js";
|
|
6
|
+
import jsxRenderer from "@ui5/webcomponents-base/renderer/JsxRenderer.js";
|
|
8
7
|
import PopupAccessibleRole from "@ui5/webcomponents/dist/types/PopupAccessibleRole.js";
|
|
9
8
|
import type { PopupBeforeCloseEventDetail } from "@ui5/webcomponents/dist/Popup.js";
|
|
10
9
|
import { HorizontalAlign, Placement, VerticalAlign } from "./types/Dropdown.js";
|
|
11
10
|
|
|
12
11
|
// Template
|
|
13
|
-
import TooltipTemplate from "./
|
|
12
|
+
import TooltipTemplate from "./TooltipTemplate.js";
|
|
14
13
|
|
|
15
14
|
// Styles
|
|
16
15
|
import TooltipCss from "./generated/themes/Tooltip.css.js";
|
|
@@ -35,11 +34,11 @@ import TooltipCss from "./generated/themes/Tooltip.css.js";
|
|
|
35
34
|
*/
|
|
36
35
|
@customElement({
|
|
37
36
|
tag: "udex-tooltip",
|
|
38
|
-
renderer:
|
|
37
|
+
renderer: jsxRenderer,
|
|
39
38
|
styles: TooltipCss,
|
|
40
39
|
template: TooltipTemplate,
|
|
41
|
-
dependencies: [Popover],
|
|
42
40
|
})
|
|
41
|
+
|
|
43
42
|
/**
|
|
44
43
|
* Fired before the component is opened. This event can be cancelled, which will prevent the popup from opening.
|
|
45
44
|
* @public
|
|
@@ -68,6 +67,7 @@ import TooltipCss from "./generated/themes/Tooltip.css.js";
|
|
|
68
67
|
* @public
|
|
69
68
|
*/
|
|
70
69
|
@event("close")
|
|
70
|
+
|
|
71
71
|
class UDExTooltip extends UI5Element {
|
|
72
72
|
eventDetails!: {
|
|
73
73
|
"before-open": void
|
|
@@ -109,6 +109,7 @@ class UDExTooltip extends UI5Element {
|
|
|
109
109
|
*/
|
|
110
110
|
@property()
|
|
111
111
|
placement: `${Placement}` = Placement.End;
|
|
112
|
+
|
|
112
113
|
/**
|
|
113
114
|
* Determines the horizontal alignment of the component.
|
|
114
115
|
* @default "Center"
|
|
@@ -185,7 +186,7 @@ class UDExTooltip extends UI5Element {
|
|
|
185
186
|
this._onClose = this.syncClose.bind(this);
|
|
186
187
|
}
|
|
187
188
|
|
|
188
|
-
syncClose() {
|
|
189
|
+
syncClose(): void {
|
|
189
190
|
this.open = false;
|
|
190
191
|
}
|
|
191
192
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type Tooltip from "./Tooltip.js";
|
|
2
|
+
import UI5Popover from "@ui5/webcomponents/dist/Popover.js";
|
|
3
|
+
|
|
4
|
+
export default function TooltipTemplate(this: Tooltip) {
|
|
5
|
+
const rootClass = "udex-tooltip";
|
|
6
|
+
|
|
7
|
+
return (
|
|
8
|
+
<UI5Popover
|
|
9
|
+
class={`${rootClass}__pane`}
|
|
10
|
+
opener={this.opener}
|
|
11
|
+
open={this.open}
|
|
12
|
+
hideArrow={this.hideArrow}
|
|
13
|
+
placement={this.placement}
|
|
14
|
+
horizontalAlign={this.horizontalAlign}
|
|
15
|
+
verticalAlign={this.verticalAlign}
|
|
16
|
+
accessibleName={this.accessibleName}
|
|
17
|
+
accessibleNameRef={this.accessibleNameRef}
|
|
18
|
+
accessibleRole={this.accessibleRole}
|
|
19
|
+
preventInitialFocus={this.preventInitialFocus}
|
|
20
|
+
preventFocusRestore={this.preventFocusRestore}
|
|
21
|
+
onui5-open={this.handleOpen}
|
|
22
|
+
onui5-close={this.handleClose}
|
|
23
|
+
onui5-before-close={this.handleBeforeClose}
|
|
24
|
+
onui5-before-open={this.handleBeforeOpen}>
|
|
25
|
+
{this.title && <div class={`${rootClass}-title`}>{this.title}</div>}
|
|
26
|
+
<slot></slot>
|
|
27
|
+
</UI5Popover>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -6,7 +6,7 @@ import type MastheadCountrySelector from "../../MastheadCountrySelector.js";
|
|
|
6
6
|
import type { ClassMapValue } from "@ui5/webcomponents-base/dist/types.js";
|
|
7
7
|
|
|
8
8
|
function block0 (this: MastheadCountrySelector, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<div class="udex-masthead-country-selector" @keydown="${this.handleKeyDown}">${ this._isActiveRegionOpen ? block1.call(this, context, tags, suffix) : block4.call(this, context, tags, suffix) }</div>`;}
|
|
9
|
-
function block1 (this: MastheadCountrySelector, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<span class="udex-masthead-country-selector__title">${ifDefined(this.countryTitle)}</span>${ !this.isSingleMode ? block2.call(this, context, tags, suffix) : undefined }<${scopeTag("udex-search", tags, suffix)} class="udex-masthead-country-selector__search" @ui5-handle-value-search="${ifDefined(this.handleSearch)}" @ui5-handle-value-reset="${ifDefined(this.handleSearchReset)}" @ui5-submit-search-value="${ifDefined(this.handleSearch)}" language-voice="${ifDefined(this.languageVoice)}" label="${ifDefined(this.searchLabel)}" mode="${ifDefined(this.homeSearchMode)}" ?show-voice-button="${this.showSearchVoiceButton}" non-interactive-submit-button show-submit-button></${scopeTag("udex-search", tags, suffix)}><span aria-live="polite" aria-atomic="true" class="hidden">${ifDefined(this._accSearchResultInfo)}</span><ul class="udex-masthead-country-selector__list udex-masthead-country-selector__list_countries" role="menu">${ repeat(this._activeCountries, (item, index) => (item as typeof item & {_id?: any})._id || index, (item, index: number) => block3.call(this, context, tags, suffix, item, index)) }</ul>` : html`<span class="udex-masthead-country-selector__title">${ifDefined(this.countryTitle)}</span>${ !this.isSingleMode ? block2.call(this, context, tags, suffix) : undefined }<udex-search class="udex-masthead-country-selector__search" @ui5-handle-value-search="${ifDefined(this.handleSearch)}" @ui5-handle-value-reset="${ifDefined(this.handleSearchReset)}" @ui5-submit-search-value="${ifDefined(this.handleSearch)}" language-voice="${ifDefined(this.languageVoice)}" label="${ifDefined(this.searchLabel)}" mode="${ifDefined(this.homeSearchMode)}" ?show-voice-button="${this.showSearchVoiceButton}" non-interactive-submit-button show-submit-button></udex-search><span aria-live="polite" aria-atomic="true" class="hidden">${ifDefined(this._accSearchResultInfo)}</span><ul class="udex-masthead-country-selector__list udex-masthead-country-selector__list_countries" role="menu">${ repeat(this._activeCountries, (item, index) => (item as typeof item & {_id?: any})._id || index, (item, index: number) => block3.call(this, context, tags, suffix, item, index)) }</ul>`;}
|
|
9
|
+
function block1 (this: MastheadCountrySelector, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<span class="udex-masthead-country-selector__title">${ifDefined(this.countryTitle)}</span>${ !this.isSingleMode ? block2.call(this, context, tags, suffix) : undefined }<${scopeTag("udex-search", tags, suffix)} class="udex-masthead-country-selector__search" @ui5-handle-value-search="${ifDefined(this.handleSearch)}" @ui5-handle-value-reset="${ifDefined(this.handleSearchReset)}" @ui5-submit-search-value="${ifDefined(this.handleSearch)}" language-voice="${ifDefined(this.languageVoice)}" label="${ifDefined(this.searchLabel)}" mode="${ifDefined(this.homeSearchMode)}" ?show-voice-button="${this.showSearchVoiceButton}" non-interactive-submit-button show-submit-button></${scopeTag("udex-search", tags, suffix)}><span aria-live="polite" aria-atomic="true" class="hidden">${ifDefined(this._accSearchResultInfo)}</span><div class="udex-masthead-country-selector__list-container"><div class="udex-masthead-country-selector__list-wrap" @scroll=${this.handleCountryListShadowVisible}><ul class="udex-masthead-country-selector__list udex-masthead-country-selector__list_countries" role="menu">${ repeat(this._activeCountries, (item, index) => (item as typeof item & {_id?: any})._id || index, (item, index: number) => block3.call(this, context, tags, suffix, item, index)) }</ul></div></div>` : html`<span class="udex-masthead-country-selector__title">${ifDefined(this.countryTitle)}</span>${ !this.isSingleMode ? block2.call(this, context, tags, suffix) : undefined }<udex-search class="udex-masthead-country-selector__search" @ui5-handle-value-search="${ifDefined(this.handleSearch)}" @ui5-handle-value-reset="${ifDefined(this.handleSearchReset)}" @ui5-submit-search-value="${ifDefined(this.handleSearch)}" language-voice="${ifDefined(this.languageVoice)}" label="${ifDefined(this.searchLabel)}" mode="${ifDefined(this.homeSearchMode)}" ?show-voice-button="${this.showSearchVoiceButton}" non-interactive-submit-button show-submit-button></udex-search><span aria-live="polite" aria-atomic="true" class="hidden">${ifDefined(this._accSearchResultInfo)}</span><div class="udex-masthead-country-selector__list-container"><div class="udex-masthead-country-selector__list-wrap" @scroll=${this.handleCountryListShadowVisible}><ul class="udex-masthead-country-selector__list udex-masthead-country-selector__list_countries" role="menu">${ repeat(this._activeCountries, (item, index) => (item as typeof item & {_id?: any})._id || index, (item, index: number) => block3.call(this, context, tags, suffix, item, index)) }</ul></div></div>`;}
|
|
10
10
|
function block2 (this: MastheadCountrySelector, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("udex-masthead-menu-item", tags, suffix)} class="udex-masthead-country-selector__region-back-item" @click="${this.backToRegions}" label="${ifDefined(this._activeRegion?.title)}" type="Button" part="menu-item" is-back icon-start></${scopeTag("udex-masthead-menu-item", tags, suffix)}>` : html`<udex-masthead-menu-item class="udex-masthead-country-selector__region-back-item" @click="${this.backToRegions}" label="${ifDefined(this._activeRegion?.title)}" type="Button" part="menu-item" is-back icon-start></udex-masthead-menu-item>`;}
|
|
11
11
|
function block3 (this: MastheadCountrySelector, context: UI5Element, tags: string[], suffix: string | undefined, item: any, index: number) { return suffix ? html`<li role="none"><${scopeTag("udex-masthead-menu-item", tags, suffix)} class="udex-masthead-country-selector__item udex-masthead-country-selector__item_countries" @click="${this.handleCountryClick}" _country-code="${ifDefined(item.countryCode)}" url="${ifDefined(item.url)}" label="${ifDefined(item.displayTitle)}" index="${index}" part="menu-item" is-nav-item></${scopeTag("udex-masthead-menu-item", tags, suffix)}></li>` : html`<li role="none"><udex-masthead-menu-item class="udex-masthead-country-selector__item udex-masthead-country-selector__item_countries" @click="${this.handleCountryClick}" _country-code="${ifDefined(item.countryCode)}" url="${ifDefined(item.url)}" label="${ifDefined(item.displayTitle)}" index="${index}" part="menu-item" is-nav-item></udex-masthead-menu-item></li>`;}
|
|
12
12
|
function block4 (this: MastheadCountrySelector, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<span class="udex-masthead-country-selector__title">${ifDefined(this.regionTitle)}</span><ul class="udex-masthead-country-selector__list" role="menu">${ repeat(this.regionsData, (item, index) => (item as typeof item & {_id?: any})._id || index, (item, index: number) => block5.call(this, context, tags, suffix, item, index)) }</ul>`;}
|
|
@@ -6,15 +6,17 @@ import type MastheadProfileMenu from "../../MastheadProfileMenu.js";
|
|
|
6
6
|
import type { ClassMapValue } from "@ui5/webcomponents-base/dist/types.js";
|
|
7
7
|
|
|
8
8
|
function block0 (this: MastheadProfileMenu, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<div @keydown="${this.handleKeydown}" class="${ifDefined(this.rootClass)}">${ this._openIdentities ? block1.call(this, context, tags, suffix) : block4.call(this, context, tags, suffix) }</div> `;}
|
|
9
|
-
function block1 (this: MastheadProfileMenu, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<div class="udex-masthead-profile-menu__header-wrap back-btn"><${scopeTag("udex-masthead-menu-item", tags, suffix)} class="udex-masthead-profile-menu__btn-back" @click="${this.handleSwitcherClick}" label="${ifDefined(this.btnBackText)}" type="Button" icon-start></${scopeTag("udex-masthead-menu-item", tags, suffix)}><span class="udex-masthead-profile-menu__switcher-title">${ifDefined(this.switcherAccountText)}</span></div><
|
|
10
|
-
function block2 (this: MastheadProfileMenu, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("udex-list", tags, suffix)} class="udex-masthead-profile-menu__identities-list" mode="SingleSelect" accessible-name="${ifDefined(this.listTitleText)}" controlled>${ repeat(this.identitiesList, (item, index) => (item as typeof item & {_id?: any})._id || index, (item, index: number) => block3.call(this, context, tags, suffix, item, index)) }</${scopeTag("udex-list", tags, suffix)}>` : html`<udex-list class="udex-masthead-profile-menu__identities-list" mode="SingleSelect" accessible-name="${ifDefined(this.listTitleText)}" controlled>${ repeat(this.identitiesList, (item, index) => (item as typeof item & {_id?: any})._id || index, (item, index: number) => block3.call(this, context, tags, suffix, item, index)) }</udex-list>`;}
|
|
9
|
+
function block1 (this: MastheadProfileMenu, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<div class="udex-masthead-profile-menu__header-wrap back-btn"><${scopeTag("udex-masthead-menu-item", tags, suffix)} class="udex-masthead-profile-menu__btn-back" @click="${this.handleSwitcherClick}" label="${ifDefined(this.btnBackText)}" type="Button" icon-start></${scopeTag("udex-masthead-menu-item", tags, suffix)}><span class="udex-masthead-profile-menu__switcher-title">${ifDefined(this.switcherAccountText)}</span></div><span class="udex-masthead-profile-menu__identities-list-title">${ifDefined(this.listTitleText)}</span><div class="udex-masthead-profile-menu__identities-list-wrap">${ this.identitiesList.length ? block2.call(this, context, tags, suffix) : undefined }</div><${scopeTag("udex-button", tags, suffix)} @click="${this.fireEventAddOrRemoveAccountClick}" class="udex-masthead-profile-menu__add-remove-btn" design="Primary" end-icon="action" size="Large">${ifDefined(this.addOrRemoveAccountText)}</${scopeTag("udex-button", tags, suffix)}>` : html`<div class="udex-masthead-profile-menu__header-wrap back-btn"><udex-masthead-menu-item class="udex-masthead-profile-menu__btn-back" @click="${this.handleSwitcherClick}" label="${ifDefined(this.btnBackText)}" type="Button" icon-start></udex-masthead-menu-item><span class="udex-masthead-profile-menu__switcher-title">${ifDefined(this.switcherAccountText)}</span></div><span class="udex-masthead-profile-menu__identities-list-title">${ifDefined(this.listTitleText)}</span><div class="udex-masthead-profile-menu__identities-list-wrap">${ this.identitiesList.length ? block2.call(this, context, tags, suffix) : undefined }</div><udex-button @click="${this.fireEventAddOrRemoveAccountClick}" class="udex-masthead-profile-menu__add-remove-btn" design="Primary" end-icon="action" size="Large">${ifDefined(this.addOrRemoveAccountText)}</udex-button>`;}
|
|
10
|
+
function block2 (this: MastheadProfileMenu, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("udex-list", tags, suffix)} class="udex-masthead-profile-menu__identities-list" mode="SingleSelect" accessible-name="${ifDefined(this.listTitleText)}" @scroll="${this.handleIdentitiesListShadowVisible}" _scroll-into-view="Center" controlled>${ repeat(this.identitiesList, (item, index) => (item as typeof item & {_id?: any})._id || index, (item, index: number) => block3.call(this, context, tags, suffix, item, index)) }</${scopeTag("udex-list", tags, suffix)}>` : html`<udex-list class="udex-masthead-profile-menu__identities-list" mode="SingleSelect" accessible-name="${ifDefined(this.listTitleText)}" @scroll="${this.handleIdentitiesListShadowVisible}" _scroll-into-view="Center" controlled>${ repeat(this.identitiesList, (item, index) => (item as typeof item & {_id?: any})._id || index, (item, index: number) => block3.call(this, context, tags, suffix, item, index)) }</udex-list>`;}
|
|
11
11
|
function block3 (this: MastheadProfileMenu, context: UI5Element, tags: string[], suffix: string | undefined, item: any, index: number) { return suffix ? html`<${scopeTag("udex-list-item", tags, suffix)} id="${ifDefined(item.idsUser)}" class="udex-masthead-profile-menu__identities-list-item" @ui5-item-press="${ifDefined(this.fireEventIdentityItemClick)}" supporting-text="${ifDefined(item.supportingText)}" image-badge-state="${ifDefined(item.statusBadge)}" image="${ifDefined(item.avatarUrl)}" image-alt="${ifDefined(item.name)}">${ifDefined(item.email)}</${scopeTag("udex-list-item", tags, suffix)}>` : html`<udex-list-item id="${ifDefined(item.idsUser)}" class="udex-masthead-profile-menu__identities-list-item" @ui5-item-press="${ifDefined(this.fireEventIdentityItemClick)}" supporting-text="${ifDefined(item.supportingText)}" image-badge-state="${ifDefined(item.statusBadge)}" image="${ifDefined(item.avatarUrl)}" image-alt="${ifDefined(item.name)}">${ifDefined(item.email)}</udex-list-item>`;}
|
|
12
|
-
function block4 (this: MastheadProfileMenu, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<div class="udex-masthead-profile-menu__header">${ this.userData ? block5.call(this, context, tags, suffix) : undefined }</div>${ this.messageAvailable ? block8.call(this, context, tags, suffix) : undefined }<div class="udex-masthead-profile-menu__links"><${scopeTag("udex-masthead-menu", tags, suffix)} exportparts="badge, menu-item" part="menu" sub-items='${ifDefined(this.linksList)}' @ui5-menu-item-click="${ifDefined(this.handleProfileMenuItemClick)}"></${scopeTag("udex-masthead-menu", tags, suffix)}>${ this.
|
|
13
|
-
function block5 (this: MastheadProfileMenu, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("udex-avatar", tags, suffix)} aria-hidden="true" size="L" initials="${ifDefined(this.userData.avatarInitials)}">${ this.userData.avatarUrl ? block6.call(this, context, tags, suffix) : undefined }</${scopeTag("udex-avatar", tags, suffix)}><div><p class="udex-profile-menu__account-name">${ifDefined(this.userData.name)}</p><p class="udex-profile-menu__account-email">${ifDefined(this.userData.email)}</p>${ this.hasIdentities ? block7.call(this, context, tags, suffix) : undefined }</div>` : html`<udex-avatar aria-hidden="true" size="L" initials="${ifDefined(this.userData.avatarInitials)}">${ this.userData.avatarUrl ? block6.call(this, context, tags, suffix) : undefined }</udex-avatar><div><p class="udex-profile-menu__account-name">${ifDefined(this.userData.name)}</p><p class="udex-profile-menu__account-email">${ifDefined(this.userData.email)}</p>${ this.hasIdentities ? block7.call(this, context, tags, suffix) : undefined }</div>`;}
|
|
12
|
+
function block4 (this: MastheadProfileMenu, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<div class="udex-masthead-profile-menu__header">${ this.userData ? block5.call(this, context, tags, suffix) : undefined }</div>${ this.messageAvailable ? block8.call(this, context, tags, suffix) : undefined }<div class="udex-masthead-profile-menu__content"><div class="udex-masthead-profile-menu__links" @scroll="${this.handleProfileMenuShadowVisible}"><${scopeTag("udex-masthead-menu", tags, suffix)} exportparts="badge, menu-item" part="menu" sub-items='${ifDefined(this.linksList)}' @ui5-menu-item-click="${ifDefined(this.handleProfileMenuItemClick)}" _scroll-into-view="Center"></${scopeTag("udex-masthead-menu", tags, suffix)}></div></div>${ this.hasActionButton ? block9.call(this, context, tags, suffix) : undefined }` : html`<div class="udex-masthead-profile-menu__header">${ this.userData ? block5.call(this, context, tags, suffix) : undefined }</div>${ this.messageAvailable ? block8.call(this, context, tags, suffix) : undefined }<div class="udex-masthead-profile-menu__content"><div class="udex-masthead-profile-menu__links" @scroll="${this.handleProfileMenuShadowVisible}"><udex-masthead-menu exportparts="badge, menu-item" part="menu" sub-items='${ifDefined(this.linksList)}' @ui5-menu-item-click="${ifDefined(this.handleProfileMenuItemClick)}" _scroll-into-view="Center"></udex-masthead-menu></div></div>${ this.hasActionButton ? block9.call(this, context, tags, suffix) : undefined }`;}
|
|
13
|
+
function block5 (this: MastheadProfileMenu, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("udex-avatar", tags, suffix)} aria-hidden="true" size="L" initials="${ifDefined(this.userData.avatarInitials)}" fallback-icon="${ifDefined(this.userData.fallbackIcon)}">${ this.userData.avatarUrl ? block6.call(this, context, tags, suffix) : undefined }</${scopeTag("udex-avatar", tags, suffix)}><div><p class="udex-profile-menu__account-name">${ifDefined(this.userData.name)}</p><p class="udex-profile-menu__account-email">${ifDefined(this.userData.email)}</p>${ this.hasIdentities ? block7.call(this, context, tags, suffix) : undefined }</div>` : html`<udex-avatar aria-hidden="true" size="L" initials="${ifDefined(this.userData.avatarInitials)}" fallback-icon="${ifDefined(this.userData.fallbackIcon)}">${ this.userData.avatarUrl ? block6.call(this, context, tags, suffix) : undefined }</udex-avatar><div><p class="udex-profile-menu__account-name">${ifDefined(this.userData.name)}</p><p class="udex-profile-menu__account-email">${ifDefined(this.userData.email)}</p>${ this.hasIdentities ? block7.call(this, context, tags, suffix) : undefined }</div>`;}
|
|
14
14
|
function block6 (this: MastheadProfileMenu, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<img src="${ifDefined(this.userData.avatarUrl)}" alt="avatar"/>`;}
|
|
15
15
|
function block7 (this: MastheadProfileMenu, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("udex-button", tags, suffix)} @click="${this.handleSwitcherClick}" class="udex-masthead-profile-menu__btn-switcher" size="Large" end-icon="slim-arrow-right" design="Invisible">${ifDefined(this.switcherAccountText)}</${scopeTag("udex-button", tags, suffix)}>` : html`<udex-button @click="${this.handleSwitcherClick}" class="udex-masthead-profile-menu__btn-switcher" size="Large" end-icon="slim-arrow-right" design="Invisible">${ifDefined(this.switcherAccountText)}</udex-button>`;}
|
|
16
16
|
function block8 (this: MastheadProfileMenu, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<div class="udex-masthead-profile-menu__message"><slot name="message"></slot></div>`;}
|
|
17
|
-
function block9 (this: MastheadProfileMenu, context: UI5Element, tags: string[], suffix: string | undefined) { return
|
|
17
|
+
function block9 (this: MastheadProfileMenu, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<div class="udex-masthead-profile-menu__actions">${ this.hasLogoutButton ? block10.call(this, context, tags, suffix) : block11.call(this, context, tags, suffix) }</div>`;}
|
|
18
|
+
function block10 (this: MastheadProfileMenu, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<div class="udex-masthead-profile-menu__btn"><slot name="logoutButton"></slot></div>`;}
|
|
19
|
+
function block11 (this: MastheadProfileMenu, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("udex-link", tags, suffix)} @click="${this.handleUserLogoutClick}" end-icon="action" design="Default" accessible-role="Link" href="${ifDefined(this.logoutUrl)}">${ifDefined(this.logoutText)}</${scopeTag("udex-link", tags, suffix)}>` : html`<udex-link @click="${this.handleUserLogoutClick}" end-icon="action" design="Default" accessible-role="Link" href="${ifDefined(this.logoutUrl)}">${ifDefined(this.logoutText)}</udex-link>`;}
|
|
18
20
|
|
|
19
21
|
function template(this: MastheadProfileMenu) { return block0.call(this, this, (this.constructor as typeof UI5Element).tagsToScope, getCustomElementsScopingSuffix()); }
|
|
20
22
|
export default template;
|
|
@@ -5,5 +5,5 @@ import defaultTheme from "./sap_horizon/parameters-bundle.css.js";
|
|
|
5
5
|
|
|
6
6
|
registerThemePropertiesLoader("@" + "ui5" + "/" + "webcomponents-theming", "sap_horizon", async () => defaultThemeBase);
|
|
7
7
|
registerThemePropertiesLoader("@" + "s" + "a" + "p" + "u" + "d" + "e" + "x" + "/" + "w" + "e" + "b" + "-" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s", "sap_horizon", async () => defaultTheme);
|
|
8
|
-
export default `:host{--udex-masthead-country-selector-background: var(--udexColorNeutralWhite, #fff);--udex-masthead-country-selector-padding-xl: var(--udexSpacer32) 52px 52px;--udex-masthead-country-selector-padding-l: var(--udexSpacer24);--udex-masthead-country-selector-padding-m: var(--udexSpacer24) var(--udexSpacer48);--udex-masthead-country-selector-padding-xs: var(--udexSpacer24);--udex-masthead-country-selector-desktop-max-height: 375px}:host([_is-mobile-mode]) .udex-masthead-country-selector__item_countries{--udex-masthead-menu-item-padding-desktop: var(--udexSpacer16) var(--udexSpacer12) var(--udexSpacer16) var(--udexSpacer8);border-bottom:1px solid var(--udex-masthead-menu-item-border-color);max-height:initial;overflow:initial}:host([_is-mobile-mode]) .udex-masthead-country-selector{padding:var(--udex-masthead-country-selector-padding-l);min-height:100%;box-sizing:border-box}.udex-masthead-country-selector{padding:var(--udex-masthead-country-selector-padding-xl);background:var(--udex-masthead-country-selector-background)}.udex-masthead-country-selector__title{font-family:var(--sapFontFamily);font-weight:var(--udexTypographyFontWeightMedium);font-size:var(--udexTypographyBodyXSFontSize);line-height:var(--udexTypographyHeadingLineHeight);color:var(--sapTitleColor);padding:var(--udexSpacer16) 0;display:block;text-align:center}.udex-masthead-country-selector__list{list-style:none;margin:0;padding:0}.udex-masthead-country-selector__search{margin:var(--udexSpacer2) 0 var(--udexSpacer16)}.udex-masthead-country-selector__region-back-item::part(menu-item-button){font-weight:var(--udexTypographyFontWeightMedium, 500);justify-content:space-between}.udex-masthead-country-selector__region-back-item::part(left){margin-inline-end:var(--udexSpacer4);margin-inline-start:0}.udex-masthead-country-selector__region-back-item::part(menu-item-button):after{content:""}.udex-masthead-country-selector__region-back-item,.udex-masthead-country-selector__item{--udex-masthead-menu-item-padding-desktop: var(--udexSpacer16) var(--udexSpacer12) var(--udexSpacer16) var(--udexSpacer8)}.udex-masthead-country-selector__item_countries{--udex-masthead-menu-item-padding-desktop: var(--udexSpacer8) var(--udexSpacer12) var(--udexSpacer8)}.udex-masthead-country-selector__item::part(menu-item-link){width:100%}.udex-masthead-country-
|
|
8
|
+
export default `:host{--udex-masthead-country-selector-background: var(--udexColorNeutralWhite, #fff);--udex-masthead-country-selector-padding-xl: var(--udexSpacer32) 52px 52px;--udex-masthead-country-selector-padding-l: var(--udexSpacer24);--udex-masthead-country-selector-padding-m: var(--udexSpacer24) var(--udexSpacer48);--udex-masthead-country-selector-padding-xs: var(--udexSpacer24);--udex-masthead-country-selector-desktop-max-height: 375px}:host([_is-mobile-mode]) .udex-masthead-country-selector__item_countries{--udex-masthead-menu-item-padding-desktop: var(--udexSpacer16) var(--udexSpacer12) var(--udexSpacer16) var(--udexSpacer8);border-bottom:1px solid var(--udex-masthead-menu-item-border-color);max-height:initial;overflow:initial}:host([_is-mobile-mode]) .udex-masthead-country-selector{padding:var(--udex-masthead-country-selector-padding-l);min-height:100%;box-sizing:border-box}.udex-masthead-country-selector{padding:var(--udex-masthead-country-selector-padding-xl);background:var(--udex-masthead-country-selector-background)}.udex-masthead-country-selector__title{font-family:var(--sapFontFamily);font-weight:var(--udexTypographyFontWeightMedium);font-size:var(--udexTypographyBodyXSFontSize);line-height:var(--udexTypographyHeadingLineHeight);color:var(--sapTitleColor);padding:var(--udexSpacer16) 0;display:block;text-align:center}.udex-masthead-country-selector__list{list-style:none;margin:0;padding:0}.udex-masthead-country-selector__search{margin:var(--udexSpacer2) 0 var(--udexSpacer16)}.udex-masthead-country-selector__region-back-item::part(menu-item-button){font-weight:var(--udexTypographyFontWeightMedium, 500);justify-content:space-between}.udex-masthead-country-selector__region-back-item::part(left){margin-inline-end:var(--udexSpacer4);margin-inline-start:0}.udex-masthead-country-selector__region-back-item::part(menu-item-button):after{content:""}.udex-masthead-country-selector__region-back-item,.udex-masthead-country-selector__item{--udex-masthead-menu-item-padding-desktop: var(--udexSpacer16) var(--udexSpacer12) var(--udexSpacer16) var(--udexSpacer8)}.udex-masthead-country-selector__item_countries{--udex-masthead-menu-item-padding-desktop: var(--udexSpacer8) var(--udexSpacer12) var(--udexSpacer8)}.udex-masthead-country-selector__item::part(menu-item-link){width:100%}.udex-masthead-country-selector__list-wrap{max-height:var(--udex-masthead-country-selector-desktop-max-height);overflow:auto}:host([_is-mobile-mode]) .udex-masthead-country-selector__list-wrap{max-height:initial}.hidden{position:absolute;width:0;height:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0;padding:0}:host([_is-mobile-mode]) .udex-masthead-country-selector__list-container{height:100%;min-height:150px;overflow:auto}:host([_is-mobile-mode]) .udex-masthead-country-selector__list-wrap{height:100%;overflow:auto;max-height:initial}:host([_is-mobile-mode]) .udex-masthead-country-selector{padding:var(--udex-masthead-country-selector-padding-l);height:100%;overflow:auto;box-sizing:border-box;display:flex;flex-direction:column}.udex-masthead-country-selector__list-container{position:relative}:host(:dir(rtl)) .udex-masthead-country-selector__list-wrap_scrollable:before{left:0;right:0}.udex-masthead-country-selector__list-wrap_scrollable:before{content:"";position:absolute;left:0;right:0;bottom:0;height:40px;z-index:1;background:linear-gradient(180deg,rgba(255,255,255,0) 0%,#FFFFFF 100%)}:host([desktop]) .udex-masthead-country-selector__list-wrap_scrollable:before{right:15px}:host([desktop]:dir(rtl)) .udex-masthead-country-selector__list-wrap_scrollable:before{left:15px;right:0}@media (max-width: 1279px){.udex-masthead-country-selector__list-wrap{height:100%;overflow:auto;max-height:initial}.udex-masthead-country-selector{padding:var(--udex-masthead-country-selector-padding-l);height:100%;overflow:auto;box-sizing:border-box;display:flex;flex-direction:column}.udex-masthead-country-selector__item_countries{--udex-masthead-menu-item-padding-desktop: var(--udexSpacer16) var(--udexSpacer12) var(--udexSpacer16) var(--udexSpacer8);border-bottom:1px solid var(--udex-masthead-menu-item-border-color)}.udex-masthead-country-selector__list-container{height:100%;min-height:150px;overflow:auto}}@media (max-width: 979px){.udex-masthead-country-selector{padding:var(--udex-masthead-country-selector-padding-m)}}@media (max-width: 639px){.udex-masthead-country-selector{padding:var(--udex-masthead-country-selector-padding-xs)}}
|
|
9
9
|
`
|
|
@@ -5,5 +5,5 @@ import defaultTheme from "./sap_horizon/parameters-bundle.css.js";
|
|
|
5
5
|
|
|
6
6
|
registerThemePropertiesLoader("@" + "ui5" + "/" + "webcomponents-theming", "sap_horizon", async () => defaultThemeBase);
|
|
7
7
|
registerThemePropertiesLoader("@" + "s" + "a" + "p" + "u" + "d" + "e" + "x" + "/" + "w" + "e" + "b" + "-" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s", "sap_horizon", async () => defaultTheme);
|
|
8
|
-
export default `:host{--udex-masthead-item-background: none;--udex-masthead-item-border: none;--udex-masthead-item-padding: 1.35rem 0;--udex-masthead-item-font-size: var(--udexTypographyNavigationRegularMFontSize, 14px);--udex-masthead-item-line-height: var(--udexTypographyEyebrowLineHeight, 1.1);--udex-masthead-item-color: var(--udexColorGrey9, #223548);--udex-masthead-item-font-family: var(--sapFontFamily);--udex-masthead-item-color-hover: var(--udexColorBlue8, #0057D2);--udex-masthead-item-color-active: var(--udexColorBlue9, #0040B0);--udex-masthead-item-border-color: var(--udexColorBlue8, #0057D2);--udex-masthead-item-country-border-color-hover: var(--udexColorBlue8, #0057D2);--udex-masthead-item-border-radius: var(--udexRadiusXXS) var(--udexRadiusXXS) 0 0;--udex-masthead-item-border-width: .188rem;--udex-masthead-item-align-content: center;--udex-masthead-item-justify-content: center;--udex-masthead-item-display: inline-flex;--udex-masthead-item-icon-size: 1.125rem;--udex-masthead-item-icon-container-size: 2rem;--udex-masthead-item-outline-border-color: var(--udexColorBlue10, #002A86);--udex-masthead-item-dropdown-box-shadow: var(--sapContent_Shadow2, 0 10px 30px 0 #22364940);--udex-masthead-item-dropdown-position-left: -55px;--udex-masthead-item-dropdown-position-right: -55px;--udex-masthead-item-dropdown-mobile-min-width: 360px;--udex-masthead-item-dropdown-select-box-min-width: 397px;--udex-masthead-item-dropdown-position: absolute;--udex-masthead-item-dropdown-mobile-height: var(--udex-masthead-shell-mobile-menu-height, 100%);--udex-masthead-item-dropdown-box-shadow-mobile: none;--udex-masthead-item-dropdown-zindex: 100;--udex-masthead-item-button-icon-size: 32px;--udex-masthead-item-arrow-icon-size: 16px;--udex-masthead-item-arrow-margin-inline-start: var(--udexSpacer4);display:var(--udex-masthead-item-display);align-items:var(--udex-masthead-item-align-content);justify-content:var(--udex-masthead-item-justify-content);position:relative;font-family:var(--udex-masthead-item-font-family);font-size:var(--udex-masthead-item-font-size);line-height:var(--udex-masthead-item-line-height)}.udex-masthead-item__dropdown{position:absolute;top:100%;left:var(--udex-masthead-item-dropdown-position-left);z-index:var(--udex-masthead-item-dropdown-zindex);box-shadow:var(--udex-masthead-item-dropdown-box-shadow)}.udex-masthead-item__button--support+.udex-masthead-item__dropdown,.udex-masthead-item__button--country-selector+.udex-masthead-item__dropdown,.udex-masthead-item__button--profile+.udex-masthead-item__dropdown{top:46px;left:auto;right:0}.udex-masthead-item__button--country-selector+.udex-masthead-item__dropdown,.udex-masthead-item__button--profile+.udex-masthead-item__dropdown{min-width:var(--udex-masthead-item-dropdown-mobile-min-width)}.udex-masthead-item__button--country-selector+.udex-masthead-item__dropdown{min-width:var(--udex-masthead-item-dropdown-select-box-min-width)}.udex-masthead-item__image-wrap{position:relative;display:flex}:host([desktop]) .udex-masthead-item__button--country-selector:hover .udex-masthead-item__image-wrap:after{content:"";position:absolute;inset:0;border:1px solid var(--udex-masthead-item-country-border-color-hover);border-radius:50%;box-sizing:border-box}.udex-masthead-item__button--explore+.udex-masthead-item__dropdown{top:60px;inset-inline-start:0;box-sizing:border-box;inline-size:100%}:host([slot="exploreSAP"]){position:inherit}.udex-masthead-item__dropdown-holder{position:relative}.udex-masthead-item{font-size:inherit;line-height:inherit;font-family:inherit;color:var(--udex-masthead-item-color);background:var(--udex-masthead-item-background);border:var(--udex-masthead-item-border);padding:var(--udex-masthead-item-padding);cursor:pointer;text-decoration:none;white-space:nowrap;position:relative}.udex-masthead-item__button--icon{display:flex;align-items:center;justify-content:center;width:var(--udex-masthead-item-button-icon-size);height:var(--udex-masthead-item-button-icon-size)}.udex-masthead-item.udex-masthead-item__button--profile,.udex-masthead-item.udex-masthead-item__button--icon{padding:0}.udex-masthead-item:focus{outline:none}.udex-masthead-item__text{display:flex;align-items:center}:host([desktop]) .udex-masthead-item:focus .udex-masthead-item__text,:host([desktop]) .udex-masthead-item:focus .udex-masthead-item__image,:host([desktop]) .udex-masthead-item:focus .udex-masthead-item__icon,.udex-masthead-item:focus-visible .udex-masthead-item__image,.udex-masthead-item:focus-visible .udex-masthead-item__text,.udex-masthead-item:focus-visible .udex-masthead-item__icon{outline:var(--udexRadiusXXS) solid var(--udex-masthead-item-outline-border-color);outline-offset:2px;border-radius:var(--udexRadiusXXS)}:host([desktop]) .udex-masthead-item:focus .udex-masthead-item__image,:host([desktop]) .udex-masthead-item:focus .udex-masthead-item__icon,.udex-masthead-item:focus .udex-masthead-item__image,.udex-masthead-item:focus .udex-masthead-item__icon{outline-offset:6px}.udex-masthead-item.udex-masthead-item__button--profile:focus .udex-masthead-item__text{border-radius:50%}.udex-masthead-item__dropdown-icon{width:var(--udex-masthead-item-arrow-icon-size);height:var(--udex-masthead-item-arrow-icon-size);margin-inline-start:var(--udex-masthead-item-arrow-margin-inline-start)}:host(:hover) .udex-masthead-item,:host(:hover) .udex-masthead-item__image,:host(:hover) .udex-masthead-item__icon,:host(:hover) .udex-masthead-item__dropdown-icon{color:var(--udex-masthead-item-color-hover)}:host(:active) .udex-masthead-item,:host([selected]) .udex-masthead-item,:host(:active) .udex-masthead-item-icon,:host([selected]) .udex-masthead-item-icon,:host(:active) .udex-masthead-item__dropdown-icon,:host([selected]) .udex-masthead-item__dropdown-icon{color:var(--udex-masthead-item-color-active)}:host(:active) .udex-masthead-item__dropdown-icon,:host([selected]) .udex-masthead-item__dropdown-icon{transform:rotate(180deg)}:host(:active):not([hide-active-border]) .udex-masthead-item:after,:host([selected]:not([hide-active-border])) .udex-masthead-item:after{content:"";position:absolute;bottom:0;left:0;right:0;height:var(--udex-masthead-item-border-width);background-color:var(--udex-masthead-item-border-color);border-radius:var(--udex-masthead-item-border-radius)}:host(:active) .udex-masthead-item.udex-masthead-item__button--icon:after,:host([selected]) .udex-masthead-item.udex-masthead-item__button--icon:after,:host(:active) .udex-masthead-item.udex-masthead-item__button--profile:after,:host([selected]) .udex-masthead-item.udex-masthead-item__button--profile:after{bottom:-14px;left:0;right:0}:host([selected]) .udex-masthead-item__image,:host(:active) .udex-masthead-item__image,:host([selected]) .udex-masthead-item__icon,:host(:active) .udex-masthead-item__icon{color:var(--udex-masthead-item-color-active)}.udex-masthead-item__image,.udex-masthead-item__icon{width:var(--udex-masthead-item-icon-size);height:var(--udex-masthead-item-icon-size);color:var(--udex-masthead-item-color)}.udex-masthead-item__avatar-container{display:flex;align-items:center;justify-content:center;width:auto;height:auto}:host(:dir(rtl)) .udex-masthead-item__dropdown{right:var(--udex-masthead-item-dropdown-position-right);left:auto}:host(:dir(rtl)) .udex-masthead-item__button--support+.udex-masthead-item__dropdown,:host(:dir(rtl)) .udex-masthead-item__button--country-selector+.udex-masthead-item__dropdown,:host(:dir(rtl)) .udex-masthead-item__button--explore+.udex-masthead-item__dropdown,:host(:dir(rtl)) .udex-masthead-item__button--profile+.udex-masthead-item__dropdown{left:0;right:auto}:host([slot="exploreSAP"]) ::slotted([slot="dropdown"]){--udex-masthead-menu-padding-desktop: 32px var(--udexSpacer72);--udex-masthead-menu-column-width: auto;--udex-masthead-menu-grid-template-columns: repeat(4, calc(25% - var(--udex-masthead-menu-column_gap)*3/4))}:host([slot="countrySelector"]) ::slotted([slot="dropdown"]),:host([slot="profile"]) ::slotted([slot="dropdown"]){width:100%;display:flex;flex-direction:column}:host([slot="countrySelector"][_is-mobile-mode]) ::slotted([slot="dropdown"]),:host([slot="profile"][_is-mobile-mode]) ::slotted([slot="dropdown"]){display:initial}:host([_is-mobile-mode]) .udex-masthead-item__button--country-selector+.udex-masthead-item__dropdown,:host([part="menu-open-btn"]) .udex-masthead-item__button--country-selector+.udex-masthead-item__dropdown{min-width:var(--udex-masthead-item-dropdown-mobile-min-width)}:host([_is-mobile-mode]) .udex-masthead-item__dropdown,:host([part="menu-open-btn"]) .udex-masthead-item__dropdown{position:var(--udex-masthead-item-dropdown-position);height:var(--udex-masthead-item-dropdown-mobile-height);width:var(--udex-masthead-item-dropdown-mobile-min-width);top:60px;right:0;left:auto}:host([_is-mobile-mode]) .udex-masthead-item__dropdown-holder,:host([part="menu-open-btn"]) .udex-masthead-item__dropdown-holder{height:100%;box-shadow:none}:host([_is-mobile-mode]) .udex-masthead-item__dropdown:after,:host([part="menu-open-btn"]) .udex-masthead-item__dropdown:after{box-shadow:var(--udex-masthead-shell-dropdown-shadow);pointer-events:none;content:"";position:absolute;inset:-60px 0 0}:host([_is-mobile-mode]),:host([part="menu-open-btn"]){position:initial}.udex-masthead-hidden-text{display:none}@media (max-width: 1279px){:host{position:initial}:host([slot="countrySelector"]) ::slotted([slot="dropdown"]),:host([slot="profile"]) ::slotted([slot="dropdown"]){display:initial}.udex-masthead-item__button--country-selector+.udex-masthead-item__dropdown{min-width:var(--udex-masthead-item-dropdown-mobile-min-width)}.udex-masthead-item__button--support+.udex-masthead-item__dropdown,.udex-masthead-item__button--country-selector+.udex-masthead-item__dropdown,.udex-masthead-item__button--profile+.udex-masthead-item__dropdown,.udex-masthead-item__dropdown{top:60px}:host(:dir(rtl)) .udex-masthead-item__dropdown{left:0;right:auto}.udex-masthead-item__dropdown{position:var(--udex-masthead-item-dropdown-position);height:var(--udex-masthead-item-dropdown-mobile-height);width:var(--udex-masthead-item-dropdown-mobile-min-width);box-shadow:var(--udex-masthead-item-dropdown-box-shadow-mobile);top:60px}.udex-masthead-item__dropdown-holder{height:100%;overflow:auto}.udex-masthead-item__dropdown:after{box-shadow:var(--udex-masthead-shell-dropdown-shadow);pointer-events:none;content:"";position:absolute;inset:-60px 0 0}}@media (max-width: 979px){:host([_is-mobile-mode]) .udex-masthead-item__dropdown,:host([part="menu-open-btn"]) .udex-masthead-item__dropdown,.udex-masthead-item__dropdown{width:100%}}
|
|
8
|
+
export default `:host{--udex-masthead-item-background: none;--udex-masthead-item-border: none;--udex-masthead-item-padding: 1.35rem 0;--udex-masthead-item-font-size: var(--udexTypographyNavigationRegularMFontSize, 14px);--udex-masthead-item-line-height: var(--udexTypographyEyebrowLineHeight, 1.1);--udex-masthead-item-color: var(--udexColorGrey9, #223548);--udex-masthead-item-font-family: var(--sapFontFamily);--udex-masthead-item-color-hover: var(--udexColorBlue8, #0057D2);--udex-masthead-item-color-active: var(--udexColorBlue9, #0040B0);--udex-masthead-item-border-color: var(--udexColorBlue8, #0057D2);--udex-masthead-item-country-border-color-hover: var(--udexColorBlue8, #0057D2);--udex-masthead-item-border-radius: var(--udexRadiusXXS) var(--udexRadiusXXS) 0 0;--udex-masthead-item-border-width: .188rem;--udex-masthead-item-align-content: center;--udex-masthead-item-justify-content: center;--udex-masthead-item-display: inline-flex;--udex-masthead-item-icon-size: 1.125rem;--udex-masthead-item-icon-container-size: 2rem;--udex-masthead-item-outline-border-color: var(--udexColorBlue10, #002A86);--udex-masthead-item-dropdown-box-shadow: var(--sapContent_Shadow2, 0 10px 30px 0 #22364940);--udex-masthead-item-dropdown-position-left: -55px;--udex-masthead-item-dropdown-position-right: -55px;--udex-masthead-item-dropdown-mobile-min-width: 360px;--udex-masthead-item-dropdown-select-box-min-width: 397px;--udex-masthead-item-dropdown-position: absolute;--udex-masthead-item-dropdown-mobile-height: var(--udex-masthead-shell-mobile-menu-height, 100%);--udex-masthead-item-dropdown-box-shadow-mobile: none;--udex-masthead-item-dropdown-zindex: 100;--udex-masthead-item-button-icon-size: 32px;--udex-masthead-item-arrow-icon-size: 16px;--udex-masthead-item-arrow-margin-inline-start: var(--udexSpacer4);display:var(--udex-masthead-item-display);align-items:var(--udex-masthead-item-align-content);justify-content:var(--udex-masthead-item-justify-content);position:relative;font-family:var(--udex-masthead-item-font-family);font-size:var(--udex-masthead-item-font-size);line-height:var(--udex-masthead-item-line-height)}.udex-masthead-item__dropdown{position:absolute;top:100%;left:var(--udex-masthead-item-dropdown-position-left);z-index:var(--udex-masthead-item-dropdown-zindex);box-shadow:var(--udex-masthead-item-dropdown-box-shadow)}.udex-masthead-item__button--support+.udex-masthead-item__dropdown,.udex-masthead-item__button--country-selector+.udex-masthead-item__dropdown,.udex-masthead-item__button--profile+.udex-masthead-item__dropdown{top:46px;left:auto;right:0}.udex-masthead-item__button--country-selector+.udex-masthead-item__dropdown,.udex-masthead-item__button--profile+.udex-masthead-item__dropdown{min-width:var(--udex-masthead-item-dropdown-mobile-min-width)}.udex-masthead-item__button--country-selector+.udex-masthead-item__dropdown{min-width:var(--udex-masthead-item-dropdown-select-box-min-width)}.udex-masthead-item__image-wrap{position:relative;display:flex}:host([desktop]) .udex-masthead-item__button--country-selector:hover .udex-masthead-item__image-wrap:after{content:"";position:absolute;inset:0;border:1px solid var(--udex-masthead-item-country-border-color-hover);border-radius:50%;box-sizing:border-box}.udex-masthead-item__button--explore+.udex-masthead-item__dropdown{top:60px;inset-inline-start:0;box-sizing:border-box;inline-size:100%}:host([slot="exploreSAP"]){position:inherit}.udex-masthead-item__dropdown-holder{position:relative}.udex-masthead-item{font-size:inherit;line-height:inherit;font-family:inherit;color:var(--udex-masthead-item-color);background:var(--udex-masthead-item-background);border:var(--udex-masthead-item-border);padding:var(--udex-masthead-item-padding);cursor:pointer;text-decoration:none;white-space:nowrap;position:relative}.udex-masthead-item__button--icon{display:flex;align-items:center;justify-content:center;width:var(--udex-masthead-item-button-icon-size);height:var(--udex-masthead-item-button-icon-size)}.udex-masthead-item.udex-masthead-item__button--profile,.udex-masthead-item.udex-masthead-item__button--icon{padding:0}.udex-masthead-item:focus{outline:none}.udex-masthead-item__text{display:flex;align-items:center}:host([desktop]) .udex-masthead-item:focus .udex-masthead-item__text,:host([desktop]) .udex-masthead-item:focus .udex-masthead-item__image,:host([desktop]) .udex-masthead-item:focus .udex-masthead-item__icon,.udex-masthead-item:focus-visible .udex-masthead-item__image,.udex-masthead-item:focus-visible .udex-masthead-item__text,.udex-masthead-item:focus-visible .udex-masthead-item__icon{outline:var(--udexRadiusXXS) solid var(--udex-masthead-item-outline-border-color);outline-offset:2px;border-radius:var(--udexRadiusXXS)}:host([desktop]) .udex-masthead-item:focus .udex-masthead-item__image,:host([desktop]) .udex-masthead-item:focus .udex-masthead-item__icon,.udex-masthead-item:focus .udex-masthead-item__image,.udex-masthead-item:focus .udex-masthead-item__icon{outline-offset:6px}.udex-masthead-item.udex-masthead-item__button--profile:focus .udex-masthead-item__text{border-radius:50%}.udex-masthead-item__dropdown-icon{width:var(--udex-masthead-item-arrow-icon-size);height:var(--udex-masthead-item-arrow-icon-size);margin-inline-start:var(--udex-masthead-item-arrow-margin-inline-start)}:host(:hover) .udex-masthead-item,:host(:hover) .udex-masthead-item__image,:host(:hover) .udex-masthead-item__icon,:host(:hover) .udex-masthead-item__dropdown-icon{color:var(--udex-masthead-item-color-hover)}:host(:active) .udex-masthead-item,:host([selected]) .udex-masthead-item,:host(:active) .udex-masthead-item-icon,:host([selected]) .udex-masthead-item-icon,:host(:active) .udex-masthead-item__dropdown-icon,:host([selected]) .udex-masthead-item__dropdown-icon{color:var(--udex-masthead-item-color-active)}:host(:active) .udex-masthead-item__dropdown-icon,:host([selected]) .udex-masthead-item__dropdown-icon{transform:rotate(180deg)}:host(:active):not([hide-active-border]) .udex-masthead-item:after,:host([selected]:not([hide-active-border])) .udex-masthead-item:after{content:"";position:absolute;bottom:0;left:0;right:0;height:var(--udex-masthead-item-border-width);background-color:var(--udex-masthead-item-border-color);border-radius:var(--udex-masthead-item-border-radius)}:host(:active) .udex-masthead-item.udex-masthead-item__button--icon:after,:host([selected]) .udex-masthead-item.udex-masthead-item__button--icon:after,:host(:active) .udex-masthead-item.udex-masthead-item__button--profile:after,:host([selected]) .udex-masthead-item.udex-masthead-item__button--profile:after{bottom:-14px;left:0;right:0}:host([selected]) .udex-masthead-item__image,:host(:active) .udex-masthead-item__image,:host([selected]) .udex-masthead-item__icon,:host(:active) .udex-masthead-item__icon{color:var(--udex-masthead-item-color-active)}.udex-masthead-item__image,.udex-masthead-item__icon{width:var(--udex-masthead-item-icon-size);height:var(--udex-masthead-item-icon-size);color:var(--udex-masthead-item-color)}.udex-masthead-item__avatar-container{display:flex;align-items:center;justify-content:center;width:auto;height:auto}:host(:dir(rtl)) .udex-masthead-item__dropdown{right:var(--udex-masthead-item-dropdown-position-right);left:auto}:host(:dir(rtl)) .udex-masthead-item__button--support+.udex-masthead-item__dropdown,:host(:dir(rtl)) .udex-masthead-item__button--country-selector+.udex-masthead-item__dropdown,:host(:dir(rtl)) .udex-masthead-item__button--explore+.udex-masthead-item__dropdown,:host(:dir(rtl)) .udex-masthead-item__button--profile+.udex-masthead-item__dropdown{left:0;right:auto}:host([slot="exploreSAP"]) ::slotted([slot="dropdown"]){--udex-masthead-menu-padding-desktop: 32px var(--udexSpacer72);--udex-masthead-menu-column-width: auto;--udex-masthead-menu-grid-template-columns: repeat(4, calc(25% - var(--udex-masthead-menu-column_gap)*3/4))}:host([slot="countrySelector"]) ::slotted([slot="dropdown"]),:host([slot="profile"]) ::slotted([slot="dropdown"]){width:100%;display:flex;flex-direction:column}:host([slot="countrySelector"][_is-mobile-mode]) ::slotted([slot="dropdown"]),:host([slot="profile"][_is-mobile-mode]) ::slotted([slot="dropdown"]){display:initial}:host([_is-mobile-mode]) .udex-masthead-item__button--country-selector+.udex-masthead-item__dropdown,:host([part="menu-open-btn"]) .udex-masthead-item__button--country-selector+.udex-masthead-item__dropdown{min-width:var(--udex-masthead-item-dropdown-mobile-min-width)}:host([_is-mobile-mode]) .udex-masthead-item__dropdown,:host([part="menu-open-btn"]) .udex-masthead-item__dropdown{position:var(--udex-masthead-item-dropdown-position);height:var(--udex-masthead-item-dropdown-mobile-height);width:var(--udex-masthead-item-dropdown-mobile-min-width);top:60px;right:0;left:auto}:host([_is-mobile-mode]) .udex-masthead-item__dropdown-holder,:host([part="menu-open-btn"]) .udex-masthead-item__dropdown-holder{height:100%;box-shadow:none}:host([_is-mobile-mode]) .udex-masthead-item__dropdown:after,:host([part="menu-open-btn"]) .udex-masthead-item__dropdown:after{box-shadow:var(--udex-masthead-shell-dropdown-shadow);pointer-events:none;content:"";position:absolute;inset:-60px 0 0}:host([_is-mobile-mode]),:host([part="menu-open-btn"]){position:initial}.udex-masthead-hidden-text{display:none}@media (max-width: 1279px){:host{position:initial}:host([slot="countrySelector"]) ::slotted([slot="dropdown"]),:host([slot="profile"]) ::slotted([slot="dropdown"]){display:initial}.udex-masthead-item__button--country-selector+.udex-masthead-item__dropdown{min-width:var(--udex-masthead-item-dropdown-mobile-min-width)}.udex-masthead-item__button--support+.udex-masthead-item__dropdown,.udex-masthead-item__button--country-selector+.udex-masthead-item__dropdown,.udex-masthead-item__button--profile+.udex-masthead-item__dropdown,.udex-masthead-item__dropdown{top:60px}:host(:dir(rtl)) .udex-masthead-item__dropdown{left:0;right:auto}.udex-masthead-item__dropdown{position:var(--udex-masthead-item-dropdown-position);height:var(--udex-masthead-item-dropdown-mobile-height);width:var(--udex-masthead-item-dropdown-mobile-min-width);box-shadow:var(--udex-masthead-item-dropdown-box-shadow-mobile);top:60px}.udex-masthead-item__dropdown-holder{height:100%}.udex-masthead-item__dropdown:after{box-shadow:var(--udex-masthead-shell-dropdown-shadow);pointer-events:none;content:"";position:absolute;inset:-60px 0 0}}@media (max-width: 979px){:host([_is-mobile-mode]) .udex-masthead-item__dropdown,:host([part="menu-open-btn"]) .udex-masthead-item__dropdown,.udex-masthead-item__dropdown{width:100%}}
|
|
9
9
|
`
|