@spw-ds/spw-stencil-library 1.17.2 → 1.17.3-alpha.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/cem.json +167 -0
- package/dist/cjs/index-D3lyhQSW.js +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/spw-alert.cjs.entry.js +55 -0
- package/dist/cjs/spw-date-picker.cjs.entry.js +5 -2
- package/dist/cjs/spw-field-label_8.cjs.entry.js +8 -13
- package/dist/cjs/spw-header-lang.cjs.entry.js +14 -5
- package/dist/cjs/spw-header-navigation-item.cjs.entry.js +127 -2
- package/dist/cjs/spw-header-persona.cjs.entry.js +16 -7
- package/dist/cjs/spw-search-field.cjs.entry.js +1 -1
- package/dist/cjs/spw-stencil-library.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/spw-alert/spw-alert.css +446 -0
- package/dist/collection/components/spw-alert/spw-alert.js +202 -0
- package/dist/collection/components/spw-date-picker/spw-date-picker.js +5 -2
- package/dist/collection/components/spw-group/spw-group.js +8 -13
- package/dist/collection/components/spw-header/spw-header-lang/spw-header-lang.js +14 -5
- package/dist/collection/components/spw-header/spw-header-navigation-item/spw-header-navigation-item.css +8 -8
- package/dist/collection/components/spw-header/spw-header-navigation-item/spw-header-navigation-item.js +128 -2
- package/dist/collection/components/spw-header/spw-header-persona/spw-header-persona.css +9 -5
- package/dist/collection/components/spw-header/spw-header-persona/spw-header-persona.js +15 -6
- package/dist/collection/components/spw-search-field/spw-search-field.css +3 -1
- package/dist/components/spw-alert.d.ts +11 -0
- package/dist/components/spw-alert.js +1 -0
- package/dist/components/spw-date-picker.js +1 -1
- package/dist/components/spw-group.js +1 -1
- package/dist/components/spw-header-lang.js +1 -1
- package/dist/components/spw-header-navigation-item.js +1 -1
- package/dist/components/spw-header-persona.js +1 -1
- package/dist/components/spw-search-field.js +1 -1
- package/dist/components_json.json +223 -2
- package/dist/components_vscode.json +25 -0
- package/dist/esm/index-DkNryMko.js +4 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/spw-alert.entry.js +53 -0
- package/dist/esm/spw-date-picker.entry.js +5 -2
- package/dist/esm/spw-field-label_8.entry.js +8 -13
- package/dist/esm/spw-header-lang.entry.js +14 -5
- package/dist/esm/spw-header-navigation-item.entry.js +127 -2
- package/dist/esm/spw-header-persona.entry.js +16 -7
- package/dist/esm/spw-search-field.entry.js +1 -1
- package/dist/esm/spw-stencil-library.js +1 -1
- package/dist/spw-stencil-library/p-00c70684.entry.js +1 -0
- package/dist/spw-stencil-library/p-0bf3f71f.entry.js +1 -0
- package/dist/spw-stencil-library/{p-6cfcab87.entry.js → p-1fdace00.entry.js} +1 -1
- package/dist/spw-stencil-library/p-550df37a.entry.js +1 -0
- package/dist/spw-stencil-library/p-7807d0c0.entry.js +1 -0
- package/dist/spw-stencil-library/p-7ab7181d.entry.js +1 -0
- package/dist/spw-stencil-library/{p-d38ec8b1.entry.js → p-d1917f78.entry.js} +1 -1
- package/dist/spw-stencil-library/spw-stencil-library.esm.js +1 -1
- package/dist/stats.json +639 -55
- package/dist/types/components/spw-alert/spw-alert.d.ts +31 -0
- package/dist/types/components/spw-group/spw-group.d.ts +2 -0
- package/dist/types/components/spw-header/spw-header-lang/spw-header-lang.d.ts +1 -0
- package/dist/types/components/spw-header/spw-header-navigation-item/spw-header-navigation-item.d.ts +14 -0
- package/dist/types/components/spw-header/spw-header-persona/spw-header-persona.d.ts +1 -0
- package/dist/types/components.d.ts +84 -0
- package/hydrate/index.js +241 -31
- package/hydrate/index.mjs +241 -31
- package/package.json +1 -1
- package/dist/spw-stencil-library/p-0043c2f4.entry.js +0 -1
- package/dist/spw-stencil-library/p-7e2bf8ad.entry.js +0 -1
- package/dist/spw-stencil-library/p-8a8faafd.entry.js +0 -1
- package/dist/spw-stencil-library/p-feca6945.entry.js +0 -1
package/hydrate/index.js
CHANGED
|
@@ -5500,6 +5500,73 @@ class SpwAccordionTitle {
|
|
|
5500
5500
|
}; }
|
|
5501
5501
|
}
|
|
5502
5502
|
|
|
5503
|
+
const spwAlertCss = () => `html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main);letter-spacing:-0.18px}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 360px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1200px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block;--spw-alert-font-size:14px;--spw-alert-background-color:var(--spw-ds-primary)}.spw-alert{width:100%;padding-top:24px;padding-bottom:24px;background:var(--spw-alert-background-color);color:var(--spw-ds-white);font-size:var(--spw-alert-font-size)}.spw-alert__container{display:flex;flex-direction:column;width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 360px){.spw-alert__container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-alert__container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-alert__container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1200px){.spw-alert__container{max-width:var(--spw-ds-container-xl)}}.spw-alert__title-container{display:flex;align-items:center;gap:16px;flex-wrap:nowrap;flex-direction:row;justify-content:space-between}.spw-alert__title{font-size:16px;flex:1;display:block}.spw-alert__text{color:var(--spw-ds-white);margin-top:12px;line-height:1.4}.spw-alert__text--hidden{display:none;margin-top:0}.spw-alert spw-link{font-size:14px;--spw-link-color:var(--spw-ds-white);--spw-link-hover-color:var(--spw-ds-white);--spw-link-active-color:var(--spw-ds-white);--spw-link-padding:8px}.spw-alert spw-link:focus-visible{outline:3px solid white;outline-offset:0;box-shadow:0 0 0 6px black}@media (max-width: 1023px){.spw-alert spw-link .spw-alert__close-text{display:none}}`;
|
|
5504
|
+
|
|
5505
|
+
class SpwAlert {
|
|
5506
|
+
constructor(hostRef) {
|
|
5507
|
+
registerInstance(this, hostRef);
|
|
5508
|
+
this.spwDismiss = createEvent(this, "spwDismiss", 7);
|
|
5509
|
+
/** Si l'alerte est masquable */
|
|
5510
|
+
this.isDismissable = true;
|
|
5511
|
+
/** Texte du bouton pour masquer l'alerte */
|
|
5512
|
+
this.dismissableText = 'Masquer';
|
|
5513
|
+
/** Titre de l'alerte */
|
|
5514
|
+
this.alertTitle = 'Notification';
|
|
5515
|
+
this.isVisible = true;
|
|
5516
|
+
this.hasSlotContent = false;
|
|
5517
|
+
this.handleKeyDown = (ev) => {
|
|
5518
|
+
if (ev.key === 'Enter') {
|
|
5519
|
+
ev.preventDefault();
|
|
5520
|
+
this.handleDismiss();
|
|
5521
|
+
}
|
|
5522
|
+
};
|
|
5523
|
+
this.handleDismiss = () => {
|
|
5524
|
+
this.spwDismiss.emit({ alertId: this.alertId });
|
|
5525
|
+
this.isVisible = false;
|
|
5526
|
+
};
|
|
5527
|
+
this.handleSlotChange = () => {
|
|
5528
|
+
if (this.slotElement) {
|
|
5529
|
+
const assignedNodes = this.slotElement.assignedNodes({ flatten: true });
|
|
5530
|
+
this.hasSlotContent = assignedNodes.some(node => { var _a; return node.nodeType === Node.ELEMENT_NODE || (node.nodeType === Node.TEXT_NODE && ((_a = node.textContent) === null || _a === void 0 ? void 0 : _a.trim()) !== ''); });
|
|
5531
|
+
}
|
|
5532
|
+
};
|
|
5533
|
+
}
|
|
5534
|
+
/**
|
|
5535
|
+
* Affiche l'alerte
|
|
5536
|
+
*/
|
|
5537
|
+
async showAlert() {
|
|
5538
|
+
this.isVisible = true;
|
|
5539
|
+
}
|
|
5540
|
+
/**
|
|
5541
|
+
* Masque l'alerte
|
|
5542
|
+
*/
|
|
5543
|
+
async hideAlert() {
|
|
5544
|
+
this.isVisible = false;
|
|
5545
|
+
}
|
|
5546
|
+
render() {
|
|
5547
|
+
return this.isVisible ? (hAsync(Host, null, hAsync("div", { class: "spw-alert", role: "alert", "aria-live": "polite", "aria-label": this.alertTitle }, hAsync("div", { class: "spw-alert__container" }, hAsync("div", { class: "spw-alert__title-container" }, hAsync("strong", { class: "spw-alert__title" }, this.alertTitle), this.isDismissable && (hAsync("spw-link", { tabindex: "0", icon: "fa-close", class: "spw-alert__close", "aria-label": this.dismissableText, onClick: this.handleDismiss, onKeyDown: this.handleKeyDown }, hAsync("span", { class: "spw-alert__close-text" }, this.dismissableText)))), hAsync("div", { class: { 'spw-alert__text': true, 'spw-alert__text--hidden': !this.hasSlotContent } }, hAsync("slot", { ref: el => (this.slotElement = el), onSlotchange: this.handleSlotChange })))))) : null;
|
|
5548
|
+
}
|
|
5549
|
+
get el() { return getElement(this); }
|
|
5550
|
+
static get style() { return spwAlertCss(); }
|
|
5551
|
+
static get cmpMeta() { return {
|
|
5552
|
+
"$flags$": 265,
|
|
5553
|
+
"$tagName$": "spw-alert",
|
|
5554
|
+
"$members$": {
|
|
5555
|
+
"alertId": [1, "alert-id"],
|
|
5556
|
+
"isDismissable": [4, "is-dismissable"],
|
|
5557
|
+
"dismissableText": [1, "dismissable-text"],
|
|
5558
|
+
"alertTitle": [1, "alert-title"],
|
|
5559
|
+
"isVisible": [32],
|
|
5560
|
+
"hasSlotContent": [32],
|
|
5561
|
+
"showAlert": [64],
|
|
5562
|
+
"hideAlert": [64]
|
|
5563
|
+
},
|
|
5564
|
+
"$listeners$": undefined,
|
|
5565
|
+
"$lazyBundleId$": "-",
|
|
5566
|
+
"$attrsToReflect$": []
|
|
5567
|
+
}; }
|
|
5568
|
+
}
|
|
5569
|
+
|
|
5503
5570
|
const spwAvatarCss = () => `html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main);letter-spacing:-0.18px}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 360px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1200px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:inline-flex;align-items:center;justify-content:center;position:relative;background-color:var(--spw-color-themes-grey-grey-200);background-size:cover;background-position:center;background-repeat:no-repeat}:host(.spw-avatar--rounded){border-radius:50%}:host(.spw-avatar--squared){border-radius:4px}:host(.spw-avatar--small){width:32px;height:32px;font-size:12px}:host(.spw-avatar--medium){width:45px;height:45px;font-size:14px}:host(.spw-avatar--large){width:60px;height:60px;font-size:18px}.spw-avatar__initials{color:var(--spw-colors-support-grey-grey-900);font-weight:600;text-transform:uppercase;line-height:1;user-select:none}.spw-avatar__bubble{position:absolute;top:-4px;right:-4px;display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 4px;font-size:10px;font-weight:600;line-height:1;border:2px solid white;border-radius:9999px;background-color:var(--spw-ds-primary);color:white}:host(.spw-avatar--small) .spw-avatar__bubble{min-width:16px;height:16px;font-size:9px;top:-3px;right:-3px}:host(.spw-avatar--large) .spw-avatar__bubble{min-width:20px;height:20px;font-size:11px;top:-5px;right:-5px}:host(.spw-avatar--clickable){cursor:pointer;transition:background-color 0.1s ease-in}:host(.spw-avatar--clickable):hover{background-color:var(--spw-color-themes-grey-grey-300)}:host(.spw-avatar--clickable):active{background-color:var(--spw-color-themes-grey-grey-400)}`;
|
|
5504
5571
|
|
|
5505
5572
|
class SpwAvatar {
|
|
@@ -8158,7 +8225,10 @@ class SpwDatePicker {
|
|
|
8158
8225
|
const disabledDays = this.disabledDays;
|
|
8159
8226
|
if (disabledDays.includes(date.getDay()))
|
|
8160
8227
|
return true;
|
|
8161
|
-
const
|
|
8228
|
+
const year = date.getFullYear();
|
|
8229
|
+
const month = `${date.getMonth() + 1}`.padStart(2, '0');
|
|
8230
|
+
const day = `${date.getDate()}`.padStart(2, '0');
|
|
8231
|
+
const dateStr = `${year}-${month}-${day}`;
|
|
8162
8232
|
const disabledDates = this.disabledDates;
|
|
8163
8233
|
return disabledDates.includes(dateStr);
|
|
8164
8234
|
},
|
|
@@ -8324,7 +8394,7 @@ class SpwDatePicker {
|
|
|
8324
8394
|
'spw-date-picker--is-clear': this.isClearIconVisible,
|
|
8325
8395
|
};
|
|
8326
8396
|
const errorMessage = this.error || this.internalError;
|
|
8327
|
-
return (hAsync(Host, { key: '
|
|
8397
|
+
return (hAsync(Host, { key: '4818fb48fa99134c860fe3293ace2b162f143df6' }, hAsync("div", { key: '2fb7d4b769e5ff1789dc40e53694e23ca947343a', class: containerClass }, this.label && (hAsync("spw-field-label", { key: 'c984be1c9c8b7630019edb3078ee1f77334b8bc6', label: this.label, required: this.required, tooltipTitle: this.tooltipTitle, tooltipText: this.tooltipText, tooltipMaxWidth: this.tooltipMaxWidth, tooltipDirection: this.tooltipDirection, tooltipCursor: this.tooltipCursor })), this.assistiveText && (hAsync("spw-field-message", { key: 'e5308400ce270a89e06c5c47117d03ee652a4d86', class: "spw-date-picker__field-message", variant: "hint", showIcon: false }, this.assistiveText)), hAsync("div", { key: '35cfbc344a26d8283eb4ace08377d16651187960', class: "spw-date-picker__input-container" }, hAsync("input", { key: 'f3ea1407cff3e43c6aa15e9480f66a9325b1136a', ref: el => (this.inputElement = el), id: this.uniqueId, type: "text", class: inputClass, value: this.internalValue, placeholder: this.placeholder, disabled: this.disabled, required: this.required, onFocus: this.handleInputFocus, onInput: this.handleInputChange, onKeyDown: this.handleKeyDown, "aria-label": this.accAriaLabel || this.label || this.name, "aria-describedby": this.assistiveText || errorMessage ? `${this.uniqueId}-help ${this.uniqueId}-error` : undefined, "aria-invalid": this.hasError }), hAsync("div", { key: '501bf33de48ef38ab6f7e8d63b2ac00a34fefdc6', class: "spw-date-picker__icons" }, this.isClearIconVisible && (hAsync("span", { key: '06ecd72a6dd552aa8353790b3dbb606b0f57ac93', class: "spw-date-picker__clear", onClick: this.handleClear }, hAsync("spw-icon", { key: '6537617b36f45e1d0c351f2b2f1859d23ddd4508', class: "spw-date-picker__icon spw-date-picker__icon--clear", icon: "fa-xmark" }))), hAsync("span", { key: '9f9a60c823d08bea01784882452d7f172e4d442c', class: "spw-date-picker__calendar-trigger", onMouseDown: this.handleCalendarIconMouseDown, onClick: this.handleCalendarIconClick }, hAsync("spw-icon", { key: 'dcbbde1aa7b09c2c5b75d8d5b94a020c930b037e', icon: "fa-calendar", variant: "fa-regular", class: "spw-date-picker__icon spw-date-picker__icon--calendar" })))), this.renderMessages())));
|
|
8328
8398
|
}
|
|
8329
8399
|
static get formAssociated() { return true; }
|
|
8330
8400
|
get el() { return getElement(this); }
|
|
@@ -9953,20 +10023,14 @@ class SpwGroup {
|
|
|
9953
10023
|
}
|
|
9954
10024
|
});
|
|
9955
10025
|
}
|
|
10026
|
+
get hostUserClasses() {
|
|
10027
|
+
return Array.from(this.el.classList)
|
|
10028
|
+
.filter(className => className !== 'hydrated' && !className.startsWith('spw-group'))
|
|
10029
|
+
.reduce((classes, className) => (Object.assign(Object.assign({}, classes), { [className]: true })), {});
|
|
10030
|
+
}
|
|
9956
10031
|
get groupClasses() {
|
|
9957
|
-
return {
|
|
9958
|
-
'spw-group': true,
|
|
9959
|
-
'spw-group--horizontal': this.orientation === 'horizontal',
|
|
9960
|
-
'spw-group--vertical': this.orientation === 'vertical',
|
|
9961
|
-
'spw-group--reversed': this.isReversed,
|
|
9962
|
-
'spw-group--disabled': this.disabled,
|
|
9963
|
-
'spw-group--is-error': !!(this.error && this.isCheckboxOrRadio),
|
|
9964
|
-
'spw-group--is-full-width': this.isFullWidth,
|
|
9965
|
-
[`spw-group--${this.type}`]: true,
|
|
9966
|
-
[`spw-group--align-${this.alignment}`]: true,
|
|
9967
|
-
};
|
|
10032
|
+
return Object.assign(Object.assign({}, this.hostUserClasses), { 'spw-group': true, 'spw-group--horizontal': this.orientation === 'horizontal', 'spw-group--vertical': this.orientation === 'vertical', 'spw-group--reversed': this.isReversed, 'spw-group--disabled': this.disabled, 'spw-group--is-error': !!(this.error && this.isCheckboxOrRadio), 'spw-group--is-full-width': this.isFullWidth, [`spw-group--${this.type}`]: true, [`spw-group--align-${this.alignment}`]: true });
|
|
9968
10033
|
}
|
|
9969
|
-
// isExpandable (details slot) uniquement sur le dernier message affiché
|
|
9970
10034
|
renderMessages() {
|
|
9971
10035
|
if (!this.isCheckboxOrRadio)
|
|
9972
10036
|
return;
|
|
@@ -9985,8 +10049,9 @@ class SpwGroup {
|
|
|
9985
10049
|
});
|
|
9986
10050
|
}
|
|
9987
10051
|
render() {
|
|
9988
|
-
return (hAsync(Host, { key: '
|
|
10052
|
+
return (hAsync(Host, { key: '8e723c566d057f2065d8413b39b18a5ea6e6cb10' }, hAsync("div", { key: '116cc3248305bc69493158fed70416fbd17d4f00', class: this.groupClasses }, this.label && (hAsync("spw-field-label", { key: '73f4eddaf6a03ae568683b689a065d7850f02f7e', class: "spw-group__field-label", label: this.label, name: this.name, required: this.required, tooltipTitle: this.tooltipTitle, tooltipText: this.tooltipText, tooltipMaxWidth: this.tooltipMaxWidth, tooltipDirection: this.tooltipDirection, tooltipCursor: this.tooltipCursor })), this.isCheckboxOrRadio && this.assistiveText && (hAsync("spw-field-message", { key: '65019f86b9a9ab9fce90939e22819c231b47357e', class: "spw-group__field-message", variant: "hint", showIcon: false }, this.assistiveText)), hAsync("div", { key: '5bbc7d3caf73910db8c94ec5aa2d4a239ec6f00e', class: "spw-group__container", style: { flexWrap: this.flexWrap } }, hAsync("slot", { key: 'd5694afab8878b5f4e0cd7f97a603c7b331592a2', ref: el => (this.slotEl = el) })), this.renderMessages())));
|
|
9989
10053
|
}
|
|
10054
|
+
get el() { return getElement(this); }
|
|
9990
10055
|
static get watchers() { return {
|
|
9991
10056
|
"error": [{
|
|
9992
10057
|
"handleSlotChange": 0
|
|
@@ -10177,15 +10242,13 @@ class SpwHeaderLang {
|
|
|
10177
10242
|
this.activeLang = '';
|
|
10178
10243
|
this.options = [];
|
|
10179
10244
|
this.handleButtonKeyDown = (event) => {
|
|
10180
|
-
var _a;
|
|
10181
10245
|
if (event.key === ' ' || event.key === 'Enter') {
|
|
10182
10246
|
event.preventDefault();
|
|
10183
|
-
|
|
10247
|
+
this.openSelect();
|
|
10184
10248
|
}
|
|
10185
10249
|
};
|
|
10186
10250
|
this.handleButtonClick = () => {
|
|
10187
|
-
|
|
10188
|
-
(_a = this.selectEl) === null || _a === void 0 ? void 0 : _a.click();
|
|
10251
|
+
this.openSelect();
|
|
10189
10252
|
};
|
|
10190
10253
|
this.handleOptionClick = (option) => {
|
|
10191
10254
|
this.setActiveLangAndRedirect(option);
|
|
@@ -10221,8 +10284,19 @@ class SpwHeaderLang {
|
|
|
10221
10284
|
window.location.href = link;
|
|
10222
10285
|
}
|
|
10223
10286
|
}
|
|
10287
|
+
openSelect() {
|
|
10288
|
+
if (!this.selectEl) {
|
|
10289
|
+
return;
|
|
10290
|
+
}
|
|
10291
|
+
if (typeof this.selectEl.showPicker === 'function') {
|
|
10292
|
+
this.selectEl.showPicker();
|
|
10293
|
+
}
|
|
10294
|
+
else {
|
|
10295
|
+
this.selectEl.click();
|
|
10296
|
+
}
|
|
10297
|
+
}
|
|
10224
10298
|
render() {
|
|
10225
|
-
return (hAsync(Host, { key: '
|
|
10299
|
+
return (hAsync(Host, { key: '813de586237af395bdf05ae734618b6b61d176f9' }, hAsync("div", { key: 'd40f0c056143cddd6b6246ef9e31759a29b8051e', class: "spw-header-lang" }, hAsync("spw-button", { key: '9325ee9bac02011a3964022bd8084735b4f989e4', variant: "tertiary", surface: "light", icon: "fa-chevron-down", class: "spw-header-lang__active-lang", onKeyDown: this.handleButtonKeyDown, onClick: this.handleButtonClick }, this.activeLang), hAsync("select", { key: '0d1b35a3a2767b7150cf8892b2b5f13e7722c880', "aria-label": this.accAriaLabel || 'Lang', class: "spw-header-lang__select", onChange: e => this.handleChange(e), ref: el => (this.selectEl = el), tabIndex: -1 }), hAsync("ul", { key: '4c4450370618798e7cebff0cd8cac158f95bb029', class: "spw-header-lang__options" }, this.options.map(option => {
|
|
10226
10300
|
var _a;
|
|
10227
10301
|
const label = ((_a = option.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || '';
|
|
10228
10302
|
const value = option.getAttribute('value') || '';
|
|
@@ -10484,7 +10558,7 @@ class SpwHeaderNavigationDropdown {
|
|
|
10484
10558
|
}; }
|
|
10485
10559
|
}
|
|
10486
10560
|
|
|
10487
|
-
const spwHeaderNavigationItemCss = () => `html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main);letter-spacing:-0.18px}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 360px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1200px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block;width:100%}@media (min-width: 1024px){:host{display:contents;width:auto}}.spw-header-navigation-item{color:var(--spw-colors-support-grey-grey-900);font-size:16px;font-weight:700;background:white}@media (max-width: 1023px){.spw-header-navigation-item ::slotted(a:hover){color:var(--spw-ds-primary) !important}}:host([data-level="1"]) .spw-header-navigation-item ::slotted(a){position:relative;padding:24px 16px !important;font-size:20px}:host([data-level="1"]) .spw-header-navigation-item ::slotted(a):before{content:"";position:absolute;top:0;left:16px;width:calc(100% - 32px);height:1px;background:var(--spw-colors-support-grey-grey-300)}@media (min-width: 1024px){:host([data-level="1"]) .spw-header-navigation-item ::slotted(a){padding:20px 16px !important;font-size:16px;border-bottom:0}:host([data-level="1"]) .spw-header-navigation-item ::slotted(a):before{content:"";position:absolute;top:auto;bottom:0;left:16px;width:calc(100% - 32px);height:0;background:var(--spw-ds-primary)}}@media (min-width: 1024px){:host([data-level="1"]) .spw-header-navigation-item:hover ::slotted(spw-header-navigation-dropdown),:host([data-level="1"]) .spw-header-navigation-item:focus-within ::slotted(spw-header-navigation-dropdown){pointer-events:auto;opacity:1;top:100%;margin-left:16px !important;transition:opacity 0.1s ease-in}:host([data-level="1"]) .spw-header-navigation-item:hover ::slotted(a),:host([data-level="1"]) .spw-header-navigation-item:focus-within ::slotted(a){color:var(--spw-ds-primary) !important}:host([data-level="1"]) .spw-header-navigation-item:hover ::slotted(a):before,:host([data-level="1"]) .spw-header-navigation-item:focus-within ::slotted(a):before{width:calc(100% - 32px);height:3px}}:host([data-level="1"]) .spw-header-navigation-item--has-subnav ::slotted(a):after{font-family:var(--spw-ds-font-icons-solid);content:"\\f054";font-size:18px}@media (min-width: 1024px){:host([data-level="1"]) .spw-header-navigation-item--has-subnav ::slotted(a):after{content:"\\f078";font-size:14px}}:host([data-level="1"]) .spw-header-navigation-item--is-subnav-visible ::slotted(spw-header-navigation-dropdown){z-index:10}:host([data-level="1"]) .spw-header-navigation-item--is-subnav-visible ::slotted(a):after{content:"\\f054"}@media (min-width: 1024px){:host([data-level="1"]) .spw-header-navigation-item--is-subnav-visible ::slotted(a):after{content:"\\f078"}}@media (min-width: 1024px){:host([data-level="2"]) .spw-header-navigation-item{position:relative}}:host([data-level="2"]) .spw-header-navigation-item ::slotted(a){padding:12px 16px !important;font-weight:400;font-size:18px}@media (min-width: 1024px){:host([data-level="2"]) .spw-header-navigation-item ::slotted(a){padding:20px !important;font-weight:700;font-size:16px}}@media (min-width: 1024px){:host([data-level="2"]) .spw-header-navigation-item:hover ::slotted(spw-header-navigation-dropdown),:host([data-level="2"]) .spw-header-navigation-item:focus-within ::slotted(spw-header-navigation-dropdown){pointer-events:auto;opacity:1;left:100%;top:0;transition:opacity 0.1s ease-in;z-index:38}:host([data-level="2"]) .spw-header-navigation-item:hover ::slotted(a),:host([data-level="2"]) .spw-header-navigation-item:focus-within ::slotted(a){color:var(--spw-ds-primary) !important;background:var(--spw-colors-support-grey-grey-100)}:host([data-level="2"]) .spw-header-navigation-item:hover ::slotted(a):before,:host([data-level="2"]) .spw-header-navigation-item:focus-within ::slotted(a):before{display:none}}:host([data-level="2"]) .spw-header-navigation-item--has-subnav ::slotted(a):after{font-family:var(--spw-ds-font-icons-solid);content:"\\f054";font-weight:700}:host([data-level="2"]) .spw-header-navigation-item--is-subnav-visible ::slotted(spw-header-navigation-dropdown){z-index:11}:host([data-level="2"]) .spw-header-navigation-item--is-subnav-visible ::slotted(a):after{content:"\\f054"}:host([data-level="3"]) .spw-header-navigation-item ::slotted(a){padding:12px 16px !important;font-weight:400;font-size:16px}@media (min-width: 1024px){:host([data-level="3"]) .spw-header-navigation-item ::slotted(a){padding:20px !important;font-weight:700;font-size:16px}}@media (min-width: 1024px){:host([data-level="3"]) .spw-header-navigation-item ::slotted(a:hover){color:var(--spw-ds-primary) !important}}:host([data-level="3"]) .spw-header-navigation-item--is-subnav-visible ::slotted(spw-header-navigation-dropdown){z-index:12}.spw-header-navigation-item ::slotted(a){display:inline-flex;position:relative;color:var(--spw-colors-support-grey-grey-900) !important;text-decoration:none;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:16px 0 !important}@media (min-width: 1024px){.spw-header-navigation-item ::slotted(a){padding:16px !important}}@media (min-width: 1024px){.spw-header-navigation-item ::slotted(a):before{content:"";transition:height 0.2s ease-in;bottom:0;left:16px;height:5px;width:0;position:absolute;background:var(--spw-ds-primary)}}.spw-header-navigation-item--is-active ::slotted(a){color:var(--spw-ds-primary) !important}.spw-header-navigation-item ::slotted(a:focus-visible){outline:3px solid white;outline-offset:-3px;box-shadow:0 0 0 3px black}.spw-header-navigation-item ::slotted(a:active){color:var(--spw-ds-primary) !important}.spw-header-navigation-item ::slotted(a:hover){text-decoration:none !important}.spw-header-navigation-item ::slotted(spw-header-navigation-dropdown){display:none;opacity:0}@media (min-width: 1024px){.spw-header-navigation-item ::slotted(spw-header-navigation-dropdown){display:block;pointer-events:none;opacity:0;position:absolute;width:320px;box-shadow:var(--spw-effect-elevation-8)}}@media (max-width: 1023px){.spw-header-navigation-item--is-subnav-visible ::slotted(spw-header-navigation-dropdown){display:block;opacity:1;position:absolute;background:white;width:100%;margin-top:0 !important;padding-top:132px !important;top:0;left:0;min-height:100%;overflow-y:auto}}.spw-header-navigation-item__top{position:absolute;display:flex;justify-content:space-between;flex-direction:column;top:0;left:16px;height:118px;z-index:9999999;width:calc(100% - 32px);padding:24px 0;background:white;border-bottom:1px solid var(--spw-colors-support-grey-grey-300)}.spw-header-navigation-item__top-back{gap:8px;display:flex;justify-content:left;align-items:center;font-weight:700;font-size:14px;text-decoration:none;color:var(--spw-colors-support-grey-grey-900)}.spw-header-navigation-item__top-back span{text-decoration:underline}.spw-header-navigation-item__top-back spw-icon{font-size:18px}.spw-header-navigation-item__top-title a{font-size:20px;font-weight:700;text-decoration:underline;color:var(--spw-colors-support-grey-grey-900);display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host([data-level-visible="1"]) .spw-header-navigation-item__top--1{display:flex}@media (min-width: 1024px){:host([data-level-visible="1"]) .spw-header-navigation-item__top--1{display:none}}:host([data-level-visible="2"]) .spw-header-navigation-item__top--1{display:none}:host([data-level-visible="3"]) .spw-header-navigation-item__top--1{display:none}:host([data-level-visible="1"]) .spw-header-navigation-item__top--2{display:none}:host([data-level-visible="2"]) .spw-header-navigation-item__top--2{display:flex}@media (min-width: 1024px){:host([data-level-visible="2"]) .spw-header-navigation-item__top--2{display:none}}:host([data-level-visible="3"]) .spw-header-navigation-item__top--2{display:none}:host([data-level-visible="1"]) .spw-header-navigation-item__top--3{display:none}:host([data-level-visible="2"]) .spw-header-navigation-item__top--3{display:none}:host([data-level-visible="3"]) .spw-header-navigation-item__top--3{display:flex}@media (min-width: 1024px){:host([data-level-visible="3"]) .spw-header-navigation-item__top--3{display:none}}@media (min-width: 1024px){.spw-header-navigation-item__top{display:none}}.spw-header-navigation-item--is-megamenu{position:static}@media (min-width: 1024px){.spw-header-navigation-item--is-megamenu ::slotted(a){position:static}}@media (min-width: 1024px){:host([data-level="1"]) .spw-header-navigation-item--is-megamenu ::slotted(spw-header-navigation-dropdown){width:100vw;left:50%;transform:translateX(-50%);top:100%;display:flex;box-shadow:none;background:white;border-top:1px solid var(--spw-colors-support-grey-grey-300);border-bottom:1px solid var(--spw-colors-support-grey-grey-300)}}@media (min-width: 1024px){:host([data-level="1"]) .spw-header-navigation-item--is-megamenu:hover ::slotted(spw-header-navigation-dropdown),:host([data-level="1"]) .spw-header-navigation-item--is-megamenu:focus-within ::slotted(spw-header-navigation-dropdown){margin-left:0 !important;pointer-events:auto}}@media (min-width: 1024px){:host([data-level="2"]) .spw-header-navigation-item--is-megamenu{width:20%;padding:16px !important}}@media (min-width: 1024px){:host([data-level="2"]) .spw-header-navigation-item--is-megamenu ::slotted(a){padding:0 !important}:host([data-level="2"]) .spw-header-navigation-item--is-megamenu ::slotted(a):after{display:none}}@media (min-width: 1024px){:host([data-level="2"]) .spw-header-navigation-item--is-megamenu ::slotted(spw-header-navigation-dropdown){position:relative;width:100%;opacity:1;left:0;top:0;padding:8px 0 !important;background:none;box-shadow:none;transition:opacity 0.1s ease-in;z-index:38}}@media (min-width: 1024px){:host([data-level="2"]) .spw-header-navigation-item--is-megamenu:hover ::slotted(spw-header-navigation-dropdown),:host([data-level="2"]) .spw-header-navigation-item--is-megamenu:focus-within ::slotted(spw-header-navigation-dropdown){position:relative;left:0}}@media (min-width: 1024px){:host([data-level="3"]) .spw-header-navigation-item--is-megamenu ::slotted(spw-header-navigation-dropdown){position:relative;width:100%;opacity:1;pointer-events:auto}}@media (min-width: 1024px){:host([data-level="3"]) .spw-header-navigation-item--is-megamenu ::slotted(a){padding:6px 16px !important;font-size:14px;font-weight:normal;border-left:1px solid var(--spw-colors-support-grey-grey-300) !important}}@media (min-width: 1024px){:host([data-level="3"]) .spw-header-navigation-item--is-megamenu ::slotted(a:hover){text-decoration:underline !important}}@media (min-width: 1024px){:host([data-level="3"]) .spw-header-navigation-item--is-megamenu ::slotted(a:active){color:var(--spw-ds-active) !important}}`;
|
|
10561
|
+
const spwHeaderNavigationItemCss = () => `html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main);letter-spacing:-0.18px}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 360px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1200px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block;width:100%}@media (min-width: 1024px){:host{display:contents;width:auto}}.spw-header-navigation-item{color:var(--spw-colors-support-grey-grey-900);font-size:16px;font-weight:700;background:white}@media (max-width: 1023px){.spw-header-navigation-item ::slotted(a:hover){color:var(--spw-ds-primary) !important}}:host([data-level="1"]) .spw-header-navigation-item ::slotted(a){position:relative;padding:24px 16px !important;font-size:20px}:host([data-level="1"]) .spw-header-navigation-item ::slotted(a):before{content:"";position:absolute;top:0;left:16px;width:calc(100% - 32px);height:1px;background:var(--spw-colors-support-grey-grey-300)}@media (min-width: 1024px){:host([data-level="1"]) .spw-header-navigation-item ::slotted(a){padding:20px 16px !important;font-size:16px;border-bottom:0}:host([data-level="1"]) .spw-header-navigation-item ::slotted(a):before{content:"";position:absolute;top:auto;bottom:0;left:16px;width:calc(100% - 32px);height:0;background:var(--spw-ds-primary)}}@media (min-width: 1024px){:host([data-level="1"]) .spw-header-navigation-item:hover ::slotted(spw-header-navigation-dropdown),:host([data-level="1"]) .spw-header-navigation-item.spw-header-navigation-item--is-desktop-open ::slotted(spw-header-navigation-dropdown){pointer-events:auto;opacity:1;top:100%;margin-left:16px !important;transition:opacity 0.1s ease-in}:host([data-level="1"]) .spw-header-navigation-item:hover ::slotted(a),:host([data-level="1"]) .spw-header-navigation-item.spw-header-navigation-item--is-desktop-open ::slotted(a){color:var(--spw-ds-primary) !important}:host([data-level="1"]) .spw-header-navigation-item:hover ::slotted(a):before,:host([data-level="1"]) .spw-header-navigation-item.spw-header-navigation-item--is-desktop-open ::slotted(a):before{width:calc(100% - 32px);height:3px}}:host([data-level="1"]) .spw-header-navigation-item--has-subnav ::slotted(a):after{font-family:var(--spw-ds-font-icons-solid);content:"\\f054";font-size:18px}@media (min-width: 1024px){:host([data-level="1"]) .spw-header-navigation-item--has-subnav ::slotted(a):after{content:"\\f078";font-size:14px}}:host([data-level="1"]) .spw-header-navigation-item--is-subnav-visible ::slotted(spw-header-navigation-dropdown){z-index:10}:host([data-level="1"]) .spw-header-navigation-item--is-subnav-visible ::slotted(a):after{content:"\\f054"}@media (min-width: 1024px){:host([data-level="1"]) .spw-header-navigation-item--is-subnav-visible ::slotted(a):after{content:"\\f078"}}@media (min-width: 1024px){:host([data-level="2"]) .spw-header-navigation-item{position:relative}}:host([data-level="2"]) .spw-header-navigation-item ::slotted(a){padding:12px 16px !important;font-weight:400;font-size:18px}@media (min-width: 1024px){:host([data-level="2"]) .spw-header-navigation-item ::slotted(a){padding:20px !important;font-weight:700;font-size:16px}}@media (min-width: 1024px){:host([data-level="2"]) .spw-header-navigation-item:hover ::slotted(spw-header-navigation-dropdown),:host([data-level="2"]) .spw-header-navigation-item.spw-header-navigation-item--is-desktop-open ::slotted(spw-header-navigation-dropdown){pointer-events:auto;opacity:1;left:100%;top:0;transition:opacity 0.1s ease-in;z-index:38}:host([data-level="2"]) .spw-header-navigation-item:hover ::slotted(a),:host([data-level="2"]) .spw-header-navigation-item.spw-header-navigation-item--is-desktop-open ::slotted(a){color:var(--spw-ds-primary) !important;background:var(--spw-colors-support-grey-grey-100)}:host([data-level="2"]) .spw-header-navigation-item:hover ::slotted(a):before,:host([data-level="2"]) .spw-header-navigation-item.spw-header-navigation-item--is-desktop-open ::slotted(a):before{display:none}}:host([data-level="2"]) .spw-header-navigation-item--has-subnav ::slotted(a):after{font-family:var(--spw-ds-font-icons-solid);content:"\\f054";font-weight:700}:host([data-level="2"]) .spw-header-navigation-item--is-subnav-visible ::slotted(spw-header-navigation-dropdown){z-index:11}:host([data-level="2"]) .spw-header-navigation-item--is-subnav-visible ::slotted(a):after{content:"\\f054"}:host([data-level="3"]) .spw-header-navigation-item ::slotted(a){padding:12px 16px !important;font-weight:400;font-size:16px}@media (min-width: 1024px){:host([data-level="3"]) .spw-header-navigation-item ::slotted(a){padding:20px !important;font-weight:700;font-size:16px}}@media (min-width: 1024px){:host([data-level="3"]) .spw-header-navigation-item ::slotted(a:hover){color:var(--spw-ds-primary) !important}}:host([data-level="3"]) .spw-header-navigation-item--is-subnav-visible ::slotted(spw-header-navigation-dropdown){z-index:12}.spw-header-navigation-item ::slotted(a){display:inline-flex;position:relative;color:var(--spw-colors-support-grey-grey-900) !important;text-decoration:none;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:16px 0 !important}@media (min-width: 1024px){.spw-header-navigation-item ::slotted(a){padding:16px !important}}@media (min-width: 1024px){.spw-header-navigation-item ::slotted(a):before{content:"";transition:height 0.2s ease-in;bottom:0;left:16px;height:5px;width:0;position:absolute;background:var(--spw-ds-primary)}}.spw-header-navigation-item--is-active ::slotted(a){color:var(--spw-ds-primary) !important}.spw-header-navigation-item ::slotted(a:focus-visible){outline:3px solid white;outline-offset:-3px;box-shadow:0 0 0 3px black}.spw-header-navigation-item ::slotted(a:active){color:var(--spw-ds-primary) !important}.spw-header-navigation-item ::slotted(a:hover){text-decoration:none !important}.spw-header-navigation-item ::slotted(spw-header-navigation-dropdown){display:none;opacity:0}@media (min-width: 1024px){.spw-header-navigation-item ::slotted(spw-header-navigation-dropdown){display:block;pointer-events:none;opacity:0;position:absolute;width:320px;box-shadow:var(--spw-effect-elevation-8)}}@media (max-width: 1023px){.spw-header-navigation-item--is-subnav-visible ::slotted(spw-header-navigation-dropdown){display:block;opacity:1;position:absolute;background:white;width:100%;margin-top:0 !important;padding-top:132px !important;top:0;left:0;min-height:100%;overflow-y:auto}}.spw-header-navigation-item__top{position:absolute;display:flex;justify-content:space-between;flex-direction:column;top:0;left:16px;height:118px;z-index:9999999;width:calc(100% - 32px);padding:24px 0;background:white;border-bottom:1px solid var(--spw-colors-support-grey-grey-300)}.spw-header-navigation-item__top-back{gap:8px;display:flex;justify-content:left;align-items:center;font-weight:700;font-size:14px;text-decoration:none;color:var(--spw-colors-support-grey-grey-900)}.spw-header-navigation-item__top-back span{text-decoration:underline}.spw-header-navigation-item__top-back spw-icon{font-size:18px}.spw-header-navigation-item__top-title a{font-size:20px;font-weight:700;text-decoration:underline;color:var(--spw-colors-support-grey-grey-900);display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host([data-level-visible="1"]) .spw-header-navigation-item__top--1{display:flex}@media (min-width: 1024px){:host([data-level-visible="1"]) .spw-header-navigation-item__top--1{display:none}}:host([data-level-visible="2"]) .spw-header-navigation-item__top--1{display:none}:host([data-level-visible="3"]) .spw-header-navigation-item__top--1{display:none}:host([data-level-visible="1"]) .spw-header-navigation-item__top--2{display:none}:host([data-level-visible="2"]) .spw-header-navigation-item__top--2{display:flex}@media (min-width: 1024px){:host([data-level-visible="2"]) .spw-header-navigation-item__top--2{display:none}}:host([data-level-visible="3"]) .spw-header-navigation-item__top--2{display:none}:host([data-level-visible="1"]) .spw-header-navigation-item__top--3{display:none}:host([data-level-visible="2"]) .spw-header-navigation-item__top--3{display:none}:host([data-level-visible="3"]) .spw-header-navigation-item__top--3{display:flex}@media (min-width: 1024px){:host([data-level-visible="3"]) .spw-header-navigation-item__top--3{display:none}}@media (min-width: 1024px){.spw-header-navigation-item__top{display:none}}.spw-header-navigation-item--is-megamenu{position:static}@media (min-width: 1024px){.spw-header-navigation-item--is-megamenu ::slotted(a){position:static}}@media (min-width: 1024px){:host([data-level="1"]) .spw-header-navigation-item--is-megamenu ::slotted(spw-header-navigation-dropdown){width:100vw;left:50%;transform:translateX(-50%);top:100%;display:flex;box-shadow:none;background:white;border-top:1px solid var(--spw-colors-support-grey-grey-300);border-bottom:1px solid var(--spw-colors-support-grey-grey-300)}}@media (min-width: 1024px){:host([data-level="1"]) .spw-header-navigation-item--is-megamenu:hover ::slotted(spw-header-navigation-dropdown),:host([data-level="1"]) .spw-header-navigation-item--is-megamenu.spw-header-navigation-item--is-desktop-open ::slotted(spw-header-navigation-dropdown){margin-left:0 !important;pointer-events:auto}}@media (min-width: 1024px){:host([data-level="2"]) .spw-header-navigation-item--is-megamenu{width:20%;padding:16px !important}}@media (min-width: 1024px){:host([data-level="2"]) .spw-header-navigation-item--is-megamenu ::slotted(a){padding:0 !important}:host([data-level="2"]) .spw-header-navigation-item--is-megamenu ::slotted(a):after{display:none}}@media (min-width: 1024px){:host([data-level="2"]) .spw-header-navigation-item--is-megamenu ::slotted(spw-header-navigation-dropdown){position:relative;width:100%;opacity:1;left:0;top:0;padding:8px 0 !important;background:none;box-shadow:none;transition:opacity 0.1s ease-in;z-index:38}}@media (min-width: 1024px){:host([data-level="2"]) .spw-header-navigation-item--is-megamenu:hover ::slotted(spw-header-navigation-dropdown),:host([data-level="2"]) .spw-header-navigation-item--is-megamenu.spw-header-navigation-item--is-desktop-open ::slotted(spw-header-navigation-dropdown){position:relative;left:0}}@media (min-width: 1024px){:host([data-level="3"]) .spw-header-navigation-item--is-megamenu ::slotted(spw-header-navigation-dropdown){position:relative;width:100%;opacity:1;pointer-events:auto}}@media (min-width: 1024px){:host([data-level="3"]) .spw-header-navigation-item--is-megamenu ::slotted(a){padding:6px 16px !important;font-size:14px;font-weight:normal;border-left:1px solid var(--spw-colors-support-grey-grey-300) !important}}@media (min-width: 1024px){:host([data-level="3"]) .spw-header-navigation-item--is-megamenu ::slotted(a:hover){text-decoration:underline !important}}@media (min-width: 1024px){:host([data-level="3"]) .spw-header-navigation-item--is-megamenu ::slotted(a:active){color:var(--spw-ds-active) !important}}`;
|
|
10488
10562
|
|
|
10489
10563
|
class SpwHeaderNavigationItem {
|
|
10490
10564
|
constructor(hostRef) {
|
|
@@ -10500,6 +10574,45 @@ class SpwHeaderNavigationItem {
|
|
|
10500
10574
|
this.isSubnavVisible = false;
|
|
10501
10575
|
this.lastClickedLevel1Item = null;
|
|
10502
10576
|
this.isMobile = window.innerWidth < 1024;
|
|
10577
|
+
this.isDesktopOpen = false;
|
|
10578
|
+
this.handleDesktopKeyDown = (event) => {
|
|
10579
|
+
if (this.isMobile || !this.hasSubnav || this.isInsideMegamenu())
|
|
10580
|
+
return;
|
|
10581
|
+
const ownLink = this.getOwnLink();
|
|
10582
|
+
if (event.key === 'Enter' && !this.isDesktopOpen && event.target === ownLink) {
|
|
10583
|
+
event.preventDefault();
|
|
10584
|
+
this.openDesktop();
|
|
10585
|
+
}
|
|
10586
|
+
else if (event.key === 'Escape' && this.isDesktopOpen) {
|
|
10587
|
+
const target = event.target;
|
|
10588
|
+
const isOwnLinkOrDirectChildLink = target === ownLink || this.getManagedLinks().includes(target);
|
|
10589
|
+
if (isOwnLinkOrDirectChildLink) {
|
|
10590
|
+
event.preventDefault();
|
|
10591
|
+
event.stopPropagation();
|
|
10592
|
+
this.closeDesktop(true);
|
|
10593
|
+
}
|
|
10594
|
+
}
|
|
10595
|
+
};
|
|
10596
|
+
this.handleFocusOut = (event) => {
|
|
10597
|
+
if (this.isMobile || !this.hasSubnav || this.isInsideMegamenu())
|
|
10598
|
+
return;
|
|
10599
|
+
const relatedTarget = event.relatedTarget;
|
|
10600
|
+
if (!relatedTarget || !this.el.contains(relatedTarget)) {
|
|
10601
|
+
this.closeDesktop(false);
|
|
10602
|
+
}
|
|
10603
|
+
};
|
|
10604
|
+
this.handleMouseEnter = () => {
|
|
10605
|
+
if (this.isMobile || !this.hasSubnav || this.isInsideMegamenu())
|
|
10606
|
+
return;
|
|
10607
|
+
this.openDesktop();
|
|
10608
|
+
};
|
|
10609
|
+
this.handleMouseLeave = () => {
|
|
10610
|
+
if (this.isMobile || !this.hasSubnav || this.isInsideMegamenu())
|
|
10611
|
+
return;
|
|
10612
|
+
if (this.el.matches(':focus-within'))
|
|
10613
|
+
return;
|
|
10614
|
+
this.closeDesktop(false);
|
|
10615
|
+
};
|
|
10503
10616
|
}
|
|
10504
10617
|
componentWillLoad() {
|
|
10505
10618
|
this.internalIsActive = this.isActive;
|
|
@@ -10525,6 +10638,87 @@ class SpwHeaderNavigationItem {
|
|
|
10525
10638
|
this.hasSubnav = hasSubnav;
|
|
10526
10639
|
}
|
|
10527
10640
|
}
|
|
10641
|
+
this.syncFocusability();
|
|
10642
|
+
}
|
|
10643
|
+
isMegamenu() {
|
|
10644
|
+
return this.variant === 'megamenu' && this.level === 1;
|
|
10645
|
+
}
|
|
10646
|
+
isInsideMegamenu() {
|
|
10647
|
+
if (this.level === 1)
|
|
10648
|
+
return false;
|
|
10649
|
+
let parent = this.el.parentElement;
|
|
10650
|
+
while (parent) {
|
|
10651
|
+
if (parent.tagName === 'SPW-HEADER-NAVIGATION-ITEM' && parent.getAttribute('data-level') === '1') {
|
|
10652
|
+
return parent.getAttribute('variant') === 'megamenu';
|
|
10653
|
+
}
|
|
10654
|
+
parent = parent.parentElement;
|
|
10655
|
+
}
|
|
10656
|
+
return false;
|
|
10657
|
+
}
|
|
10658
|
+
getOwnLink() {
|
|
10659
|
+
return this.el.querySelector(':scope > a');
|
|
10660
|
+
}
|
|
10661
|
+
getViewMoreLink(dropdown) {
|
|
10662
|
+
var _a;
|
|
10663
|
+
const shadowRoot = dropdown.shadowRoot;
|
|
10664
|
+
return (_a = shadowRoot === null || shadowRoot === void 0 ? void 0 : shadowRoot.querySelector('spw-link')) !== null && _a !== void 0 ? _a : null;
|
|
10665
|
+
}
|
|
10666
|
+
getManagedLinks() {
|
|
10667
|
+
if (!this.el.querySelector('spw-header-navigation-dropdown'))
|
|
10668
|
+
return [];
|
|
10669
|
+
if (this.isMegamenu()) {
|
|
10670
|
+
const links = Array.from(this.el.querySelectorAll('spw-header-navigation-dropdown a'));
|
|
10671
|
+
const dropdowns = Array.from(this.el.querySelectorAll('spw-header-navigation-dropdown'));
|
|
10672
|
+
dropdowns.forEach(dropdown => {
|
|
10673
|
+
const viewMore = this.getViewMoreLink(dropdown);
|
|
10674
|
+
if (viewMore)
|
|
10675
|
+
links.push(viewMore);
|
|
10676
|
+
});
|
|
10677
|
+
return links;
|
|
10678
|
+
}
|
|
10679
|
+
const dropdown = this.el.querySelector(':scope > spw-header-navigation-dropdown');
|
|
10680
|
+
if (!dropdown)
|
|
10681
|
+
return [];
|
|
10682
|
+
const links = [];
|
|
10683
|
+
Array.from(dropdown.children).forEach(child => {
|
|
10684
|
+
if (child.tagName === 'SPW-HEADER-NAVIGATION-ITEM') {
|
|
10685
|
+
const link = child.querySelector(':scope > a');
|
|
10686
|
+
if (link)
|
|
10687
|
+
links.push(link);
|
|
10688
|
+
}
|
|
10689
|
+
});
|
|
10690
|
+
const viewMore = this.getViewMoreLink(dropdown);
|
|
10691
|
+
if (viewMore)
|
|
10692
|
+
links.push(viewMore);
|
|
10693
|
+
return links;
|
|
10694
|
+
}
|
|
10695
|
+
syncFocusability() {
|
|
10696
|
+
if (this.isMobile)
|
|
10697
|
+
return;
|
|
10698
|
+
this.getManagedLinks().forEach(link => {
|
|
10699
|
+
if (this.isDesktopOpen) {
|
|
10700
|
+
link.removeAttribute('tabindex');
|
|
10701
|
+
}
|
|
10702
|
+
else {
|
|
10703
|
+
link.setAttribute('tabindex', '-1');
|
|
10704
|
+
}
|
|
10705
|
+
});
|
|
10706
|
+
}
|
|
10707
|
+
openDesktop() {
|
|
10708
|
+
if (this.isMobile || !this.el.querySelector('spw-header-navigation-dropdown'))
|
|
10709
|
+
return;
|
|
10710
|
+
this.isDesktopOpen = true;
|
|
10711
|
+
this.syncFocusability();
|
|
10712
|
+
}
|
|
10713
|
+
closeDesktop(refocusOwnLink) {
|
|
10714
|
+
var _a;
|
|
10715
|
+
if (!this.isDesktopOpen)
|
|
10716
|
+
return;
|
|
10717
|
+
this.isDesktopOpen = false;
|
|
10718
|
+
this.syncFocusability();
|
|
10719
|
+
if (refocusOwnLink) {
|
|
10720
|
+
(_a = this.getOwnLink()) === null || _a === void 0 ? void 0 : _a.focus();
|
|
10721
|
+
}
|
|
10528
10722
|
}
|
|
10529
10723
|
calculateLevel() {
|
|
10530
10724
|
let level = 1;
|
|
@@ -10640,6 +10834,10 @@ class SpwHeaderNavigationItem {
|
|
|
10640
10834
|
});
|
|
10641
10835
|
mutationObserver.observe(slot, { childList: true, subtree: true });
|
|
10642
10836
|
}
|
|
10837
|
+
this.el.addEventListener('focusout', this.handleFocusOut);
|
|
10838
|
+
}
|
|
10839
|
+
disconnectedCallback() {
|
|
10840
|
+
this.el.removeEventListener('focusout', this.handleFocusOut);
|
|
10643
10841
|
}
|
|
10644
10842
|
render() {
|
|
10645
10843
|
const pageTitle = this.getPageTitle();
|
|
@@ -10650,8 +10848,9 @@ class SpwHeaderNavigationItem {
|
|
|
10650
10848
|
'spw-header-navigation-item--is-active': this.internalIsActive,
|
|
10651
10849
|
'spw-header-navigation-item--is-subnav-visible': this.isSubnavVisible,
|
|
10652
10850
|
'spw-header-navigation-item--is-megamenu': this.variant === 'megamenu',
|
|
10851
|
+
'spw-header-navigation-item--is-desktop-open': this.isDesktopOpen,
|
|
10653
10852
|
};
|
|
10654
|
-
return (hAsync(Host, { key: '
|
|
10853
|
+
return (hAsync(Host, { key: '7a47eaa623fbb4ffaaf0f710a92e245c95aa53c6', "data-level": this.level }, hAsync("div", { key: 'bd8106c8ba69ccc15742d16868c15bd7caedd0a2', class: elementClass, onKeyDown: this.handleDesktopKeyDown, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, hAsync("div", { key: 'ae7bda0d0ed78280a0a0ae9f21441605c45a56b9', class: "spw-header-navigation-item__content", onClick: event => this.toggleSubnavVisibility(event) }, this.isSubnavVisible && (hAsync("div", { key: '0b6fa3115a8ade17c361d46c1ef3e745984c9865', class: `spw-header-navigation-item__top spw-header-navigation-item__top--${this.level}` }, hAsync("div", { key: '70b76cae3997545f4836d5e9e3fb9ad2e09287dc', class: "spw-header-navigation-item__top-back", onClick: event => this.handleBackClick(event) }, hAsync("spw-icon", { key: '2ebe9be3d4ae84d13221cfbd4abaa6470ebb32bf', icon: "fa-chevron-left" }), " ", hAsync("span", { key: 'f69f17bf47233a7983d6fac66127936f51ada7df' }, this.level === 1 ? '' : this.level === 2 ? 'Menu principal' : storedTitle)), hAsync("div", { key: '4064a6ebdb694ecf10900efba3efcb178dabb2bf', class: "spw-header-navigation-item__top-title" }, hAsync("a", { key: '633ebe15619f8b1749c2c35525e1f51c0ff676fc', href: (pageTitle === null || pageTitle === void 0 ? void 0 : pageTitle.link) || '#', target: (pageTitle === null || pageTitle === void 0 ? void 0 : pageTitle.target) || '_self' }, (pageTitle === null || pageTitle === void 0 ? void 0 : pageTitle.title) || '')))), hAsync("slot", { key: '302c088b314bd52cd98979af67dce472cdc98a86' })))));
|
|
10655
10854
|
}
|
|
10656
10855
|
get el() { return getElement(this); }
|
|
10657
10856
|
static get style() { return spwHeaderNavigationItemCss(); }
|
|
@@ -10666,7 +10865,8 @@ class SpwHeaderNavigationItem {
|
|
|
10666
10865
|
"level": [32],
|
|
10667
10866
|
"isSubnavVisible": [32],
|
|
10668
10867
|
"lastClickedLevel1Item": [32],
|
|
10669
|
-
"isMobile": [32]
|
|
10868
|
+
"isMobile": [32],
|
|
10869
|
+
"isDesktopOpen": [32]
|
|
10670
10870
|
},
|
|
10671
10871
|
"$listeners$": undefined,
|
|
10672
10872
|
"$lazyBundleId$": "-",
|
|
@@ -10674,7 +10874,7 @@ class SpwHeaderNavigationItem {
|
|
|
10674
10874
|
}; }
|
|
10675
10875
|
}
|
|
10676
10876
|
|
|
10677
|
-
const spwHeaderPersonaCss = () => `html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main);letter-spacing:-0.18px}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 360px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1200px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block}.spw-header-persona{position:relative}@media (max-width: 1023px){.spw-header-persona{border-bottom:1px solid var(--spw-colors-support-grey-grey-300);padding-top:16px;padding-bottom:16px}}@media (min-width: 1024px){.spw-header-persona{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding-left:24px;margin-left:24px;margin-right:12px;border-left:1px solid var(--spw-colors-support-grey-grey-300)}}.spw-header-persona__label{font-size:14px;display:block;color:var(--spw-colors-support-grey-grey-700)}@media (max-width: 1023px){.spw-header-persona__label{display:none}}.spw-header-persona__active-persona{position:relative;display:flex;gap:6px;justify-content:space-between;cursor:pointer;font-weight:bold;text-decoration:none;color:var(--spw-colors-support-grey-grey-900)}@media (min-width: 1024px){.spw-header-persona__active-persona{transition:all ease 0.15s;border-radius:var(--spw-ds-border-radius-full);background:var(--spw-colors-support-grey-grey-100);padding:8px 12px;font-size:14px}}@media (min-width: 1024px){.spw-header-persona__active-persona:has(~.spw-header-persona__select:hover),.spw-header-persona__active-persona:hover{background:var(--spw-colors-support-grey-grey-300)}}.spw-header-
|
|
10877
|
+
const spwHeaderPersonaCss = () => `html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main);letter-spacing:-0.18px}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 360px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1200px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block}.spw-header-persona{position:relative}@media (max-width: 1023px){.spw-header-persona{border-bottom:1px solid var(--spw-colors-support-grey-grey-300);padding-top:16px;padding-bottom:16px}}@media (min-width: 1024px){.spw-header-persona{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding-left:24px;margin-left:24px;margin-right:12px;border-left:1px solid var(--spw-colors-support-grey-grey-300)}}.spw-header-persona:focus-visible{outline:none}.spw-header-persona:focus-visible .spw-header-persona__active-persona{outline:3px solid white;outline-offset:-1px;box-shadow:0 0 0 5px black;border-radius:var(--spw-ds-border-radius-full)}.spw-header-persona__label{font-size:14px;display:block;color:var(--spw-colors-support-grey-grey-700)}@media (max-width: 1023px){.spw-header-persona__label{display:none}}.spw-header-persona__active-persona{position:relative;display:flex;gap:6px;justify-content:space-between;cursor:pointer;font-weight:bold;text-decoration:none;color:var(--spw-colors-support-grey-grey-900)}@media (min-width: 1024px){.spw-header-persona__active-persona{transition:all ease 0.15s;border-radius:var(--spw-ds-border-radius-full);background:var(--spw-colors-support-grey-grey-100);padding:8px 12px;font-size:14px}}@media (min-width: 1024px){.spw-header-persona__active-persona:has(~.spw-header-persona__select:hover),.spw-header-persona__active-persona:hover{background:var(--spw-colors-support-grey-grey-300)}}.spw-header-persona__trigger{display:block}.spw-header-persona--opened .spw-header-persona__trigger{transform:rotate(180deg)}.spw-header-persona__select{display:block;position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer;z-index:2}.spw-header-persona__dropdown{display:none;overflow:hidden}.spw-header-persona--opened .spw-header-persona__dropdown{display:block}@media (min-width: 1024px){.spw-header-persona--opened .spw-header-persona__dropdown{position:absolute;width:max-content;z-index:99999;background:white;border-radius:4px;box-shadow:var(--spw-effect-elevation-8)}}`;
|
|
10678
10878
|
|
|
10679
10879
|
class SpwHeaderPersona {
|
|
10680
10880
|
constructor(hostRef) {
|
|
@@ -10684,14 +10884,12 @@ class SpwHeaderPersona {
|
|
|
10684
10884
|
this.activePersona = '';
|
|
10685
10885
|
this.options = [];
|
|
10686
10886
|
this.handleButtonClick = () => {
|
|
10687
|
-
|
|
10688
|
-
(_a = this.selectEl) === null || _a === void 0 ? void 0 : _a.click();
|
|
10887
|
+
this.openSelect();
|
|
10689
10888
|
};
|
|
10690
10889
|
this.handleButtonKeyDown = (event) => {
|
|
10691
|
-
var _a;
|
|
10692
10890
|
if (event.key === ' ' || event.key === 'Enter') {
|
|
10693
10891
|
event.preventDefault();
|
|
10694
|
-
|
|
10892
|
+
this.openSelect();
|
|
10695
10893
|
}
|
|
10696
10894
|
};
|
|
10697
10895
|
}
|
|
@@ -10719,12 +10917,23 @@ class SpwHeaderPersona {
|
|
|
10719
10917
|
const selectedOption = select.selectedOptions[0];
|
|
10720
10918
|
this.activePersona = ((_a = selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || '';
|
|
10721
10919
|
const link = selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.getAttribute('data-link');
|
|
10722
|
-
if (link) {
|
|
10920
|
+
if (link && link !== '#') {
|
|
10723
10921
|
window.location.href = link;
|
|
10724
10922
|
}
|
|
10725
10923
|
}
|
|
10924
|
+
openSelect() {
|
|
10925
|
+
if (!this.selectEl) {
|
|
10926
|
+
return;
|
|
10927
|
+
}
|
|
10928
|
+
if (typeof this.selectEl.showPicker === 'function') {
|
|
10929
|
+
this.selectEl.showPicker();
|
|
10930
|
+
}
|
|
10931
|
+
else {
|
|
10932
|
+
this.selectEl.click();
|
|
10933
|
+
}
|
|
10934
|
+
}
|
|
10726
10935
|
render() {
|
|
10727
|
-
return (hAsync(Host, { key: '
|
|
10936
|
+
return (hAsync(Host, { key: '3f57dc62f05ccb31f1a35efa9ca41cbaeb1fa630' }, hAsync("div", { key: '25d89e8a209421a1d77105cb853cc9aefaeb8913', class: "spw-header-persona", onClick: this.handleButtonClick, onKeyDown: this.handleButtonKeyDown, tabIndex: 0 }, hAsync("span", { key: 'e365f8db45bb738ef92b7ff6c865dcdc683cd970', class: "spw-header-persona__label" }, this.personaLabel), hAsync("div", { key: '6fb0485e32554b1b09c40bdcc552b1ed549c25c9', class: "spw-header-persona__active-persona" }, this.activePersona, " ", hAsync("spw-icon", { key: '42b2730c44b36346fb0ee9e15590785db7208553', icon: "fa-chevron-down" })), hAsync("select", { key: 'd9634f9542ffc050893f33fb30c177c58f560f91', "aria-label": this.accAriaLabel || this.personaLabel, class: "spw-header-persona__select", ref: el => (this.selectEl = el), onChange: e => this.handleChange(e), tabIndex: -1 }))));
|
|
10728
10937
|
}
|
|
10729
10938
|
get el() { return getElement(this); }
|
|
10730
10939
|
static get style() { return spwHeaderPersonaCss(); }
|
|
@@ -18252,7 +18461,7 @@ class SpwScrolltop {
|
|
|
18252
18461
|
}; }
|
|
18253
18462
|
}
|
|
18254
18463
|
|
|
18255
|
-
const spwSearchFieldCss = () => `html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main);letter-spacing:-0.18px}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 360px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1200px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block}.spw-search-field{position:relative}.spw-search-field--large spw-text-field{--spw-input-height:54px;--spw-input-padding:16px 24px;--spw-input-radius:60px;--spw-input-border:transparent;--spw-input-icon-search-color:var(--spw-ds-primary)}.spw-search-field.spw-search-field--large.spw-search-field--is-open spw-text-field{--spw-input-radius:24px 24px 0 0}.spw-search-field--has-submit-button spw-text-field{--spw-input-padding-right:56px}.spw-search-field__container{position:relative}.spw-search-field__category{font-style:italic}.spw-search-field__submit{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:30px;height:30px;border:none;border-radius:50%;background:transparent;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 0.2s ease;z-index:10}.spw-search-field__submit:focus,.spw-search-field__submit:focus-visible{outline:1px solid white;outline-offset:0;box-shadow:0 0 0 3px black}.spw-search-field--large .spw-search-field__submit{width:46px;height:46px;right:16px}.spw-search-field__options{position:absolute;width:100%;background-color:#fff;border:1px solid var(--spw-color-themes-grey-grey-800);border-radius:0 0 4px 4px;max-height:
|
|
18464
|
+
const spwSearchFieldCss = () => `html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main);letter-spacing:-0.18px}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 360px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1200px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block;--spw-search-field-options-max-height:200px}.spw-search-field{position:relative}.spw-search-field--large spw-text-field{--spw-input-height:54px;--spw-input-padding:16px 24px;--spw-input-radius:60px;--spw-input-border:transparent;--spw-input-icon-search-color:var(--spw-ds-primary)}.spw-search-field.spw-search-field--large.spw-search-field--is-open spw-text-field{--spw-input-radius:24px 24px 0 0}.spw-search-field--has-submit-button spw-text-field{--spw-input-padding-right:56px}.spw-search-field__container{position:relative}.spw-search-field__category{font-style:italic}.spw-search-field__submit{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:30px;height:30px;border:none;border-radius:50%;background:transparent;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 0.2s ease;z-index:10}.spw-search-field__submit:focus,.spw-search-field__submit:focus-visible{outline:1px solid white;outline-offset:0;box-shadow:0 0 0 3px black}.spw-search-field--large .spw-search-field__submit{width:46px;height:46px;right:16px}.spw-search-field__options{position:absolute;width:100%;background-color:#fff;border:1px solid var(--spw-color-themes-grey-grey-800);border-radius:0 0 4px 4px;max-height:var(--spw-search-field-options-max-height);overflow-y:auto}.spw-search-field__options::-webkit-scrollbar{width:14px;height:14px}.spw-search-field__options::-webkit-scrollbar-thumb{background:var(--spw-color-themes-grey-grey-400);border-radius:20px;border:4px solid var(--spw-ds-white)}.spw-search-field__options::-webkit-scrollbar-track{background:var(--spw-ds-white)}.spw-search-field__options{scrollbar-face-color:var(--spw-color-themes-grey-grey-400);scrollbar-track-color:var(--spw-ds-white)}.spw-search-field__options{z-index:44;margin-top:-2px;transition:transform 0.3s ease, opacity 0.3s ease}.spw-search-field--is-rounded .spw-search-field__options{border-radius:0 0 24px 24px;border:none}.spw-search-field--is-rounded .spw-search-field__options ul{padding:12px}.spw-search-field__options--down{top:100%;transform:translateY(0)}.spw-search-field__options--up{top:100%;transform:translateY(0)}.spw-search-field__option{padding:12px;color:var(--spw-color-themes-grey-grey-900);text-align:left;border-bottom:1px solid var(--spw-color-themes-grey-grey-900);cursor:pointer;transition:background-color 0.2s ease}.spw-search-field--is-rounded .spw-search-field__option{border-radius:12px;padding:12px;border-bottom:none}.spw-search-field__option:hover{background-color:var(--spw-color-themes-grey-grey-200)}.spw-search-field__option:last-child{border-bottom:none}.spw-search-field__option--focused{background-color:var(--spw-color-themes-grey-grey-300)}.spw-search-field__option--selected{font-weight:700}.spw-search-field__loading,.spw-search-field__no-results{padding:12px;cursor:not-allowed;text-align:left;color:var(--spw-color-themes-grey-grey-600)}.spw-search-field--is-rounded .spw-search-field__loading,.spw-search-field--is-rounded .spw-search-field__no-results{padding:24px}.spw-search-field__view-all{position:sticky;bottom:0;cursor:pointer;font-weight:700}.spw-search-field--is-rounded .spw-search-field__view-all{border-radius:12px;border-top:none}.spw-search-field__view-all a{color:black;background:white;border-top:1px solid var(--spw-color-themes-grey-grey-900)}.spw-search-field--is-rounded .spw-search-field__view-all a{color:var(--spw-ds-primary);padding:12px 24px 24px 24px;border-top:none}.spw-search-field__view-all a{text-decoration:underline;display:block;width:100%;padding:12px;display:inline-flex;justify-content:space-between}.spw-search-field__view-all a:hover{text-decoration:none}`;
|
|
18256
18465
|
|
|
18257
18466
|
// TODO
|
|
18258
18467
|
// - max-height customisable
|
|
@@ -23773,6 +23982,7 @@ registerComponents([
|
|
|
23773
23982
|
SpwAccordionContent,
|
|
23774
23983
|
SpwAccordionItem,
|
|
23775
23984
|
SpwAccordionTitle,
|
|
23985
|
+
SpwAlert,
|
|
23776
23986
|
SpwAvatar,
|
|
23777
23987
|
SpwBlockContent,
|
|
23778
23988
|
SpwBox,
|