@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,h as e,H as t,a as i,c as o}from"./p-DkNryMko.js";const r=class{constructor(e){s(this,e),this.label="",this.required=!1,this.tooltipDirection="top",this.tooltipCursor="help",this.handleClick=()=>{const s=this.el.getRootNode().getElementById(this.name);s&&s.focus()}}get hasTooltip(){return!(!this.tooltipText&&!this.tooltipTitle)}render(){return e(t,{key:"8d347fa7b9d89a01e16cc69aa7c5f218cf575339"},e("label",{key:"e8124e0989da660f7ecba4fc64cec748e311f582",class:"spw-field-label",htmlFor:this.name,onClick:this.handleClick},e("span",{key:"3097e911d698cf3140b101838c3753c07fd61ca0",class:"spw-field-label__text"},this.label),this.hasTooltip&&e("spw-tooltip",{key:"6c97be79b366a378b76833f31299cac7f48e738a",tooltipTitle:this.tooltipTitle,tooltipText:this.tooltipText,maxWidth:this.tooltipMaxWidth,direction:this.tooltipDirection,cursor:this.tooltipCursor},e("spw-icon",{key:"4fc7efc2c75a0afd095ae80662234cfff4080a0f",variant:"fa-regular",icon:"fa-circle-info",class:"spw-field-label__icon"})),this.required&&e("span",{key:"064a8eef9c8af4bdee8a996f2339d1edcde6bf74",class:"spw-field-label__required"},"*")))}get el(){return i(this)}};r.style="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-field-label{color:var(--spw-color-themes-grey-grey-800);display:flex;align-items:center;gap:4px;font-weight:600;margin-bottom:8px}.spw-field-label__text{display:inline-block}.spw-field-label__required{color:var(--spw-ds-primary)}.spw-field-label__icon{color:var(--spw-color-themes-grey-grey-600);font-size:16px;flex-shrink:0}";const p=class{constructor(e){s(this,e),this.showIcon=!0,this.isExpandable=!1,this.expandLabel="Plus d'informations",this.collapseLabel="Moins d'informations",this.isExpanded=!1,this.toggleExpanded=s=>{s.preventDefault(),this.isExpanded=!this.isExpanded}}get variantIcon(){switch(this.variant){case"error":return"fa-warning";case"hint":return"fa-exclamation-circle";case"success":return"fa-check-circle";case"warning":return"fa-triangle-exclamation";default:return""}}get elementClass(){return{"spw-field-message":!0,[`spw-field-message--${this.variant}`]:!0}}render(){const{isExpandable:s,isExpanded:i,expandLabel:o,collapseLabel:r}=this;return e(t,{key:"7d117899e43b8e063ce7ff61adca3aeb6d0a3023"},e("div",{key:"9b27aaa6b687b0e14ba9daf865f52bfdefe42a94",class:this.elementClass},this.showIcon&&e("div",{key:"eef472e3b5436fd5ce1a26bc9ff633933aee578c",class:"spw-field-message__icon"},e("spw-icon",{key:"f4b0ad7b7cf0da0492e4e57ef005104d54bf4517",icon:this.variantIcon})),e("span",{key:"11542f59ae8353f0864f24041d5fc2a5c189f02e",class:"spw-field-message__text"},e("slot",{key:"cdaa8f65365f5f99fa90ee75dbed721700985ba2"}),s&&e("div",{key:"a8a1f3ff651ec9d9bcf7dfa96afc9a24b8e4c953",class:"spw-field-message__expandable"},e("div",{key:"c3ce7335212c4494e02ebbbb59520dddf22b4dd5",class:{"spw-field-message__details":!0,"spw-field-message__details--hidden":!i}},e("slot",{key:"5ecffa3cc234780d27d67c2e299cb8ae769bf395",name:"details"})),e("spw-link",{key:"3b9a5202aff545ed06aa9c72bd71ee957cd95cb4",href:"#",icon:i?"fa-chevron-up":"fa-chevron-down",onClick:this.toggleExpanded},i?r:o)))))}};p.style="html.sc-spw-field-message{line-height:1.3;-webkit-text-size-adjust:100%}h1.sc-spw-field-message,h2.sc-spw-field-message,h3.sc-spw-field-message,h4.sc-spw-field-message,h5.sc-spw-field-message,h6.sc-spw-field-message,p.sc-spw-field-message,ul.sc-spw-field-message,li.sc-spw-field-message{padding:0;margin:0}ul.sc-spw-field-message{list-style:none}.sc-spw-field-message-h{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}.sc-spw-field-message-h *.sc-spw-field-message,.sc-spw-field-message-h *.sc-spw-field-message::before,.sc-spw-field-message-h *.sc-spw-field-message::after{box-sizing:inherit;font-family:var(--spw-ds-font-main);letter-spacing:-0.18px}body.sc-spw-field-message{margin:0}hr.sc-spw-field-message{box-sizing:content-box;height:0;overflow:visible}pre.sc-spw-field-message{font-family:monospace, monospace;font-size:1em}a.sc-spw-field-message{background-color:transparent}abbr[title].sc-spw-field-message{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b.sc-spw-field-message,strong.sc-spw-field-message{font-weight:bolder}code.sc-spw-field-message,kbd.sc-spw-field-message,samp.sc-spw-field-message{font-family:monospace, monospace;font-size:1em}small.sc-spw-field-message{font-size:80%}sub.sc-spw-field-message,sup.sc-spw-field-message{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub.sc-spw-field-message{bottom:-0.25em}sup.sc-spw-field-message{top:-0.5em}img.sc-spw-field-message{border-style:none}button.sc-spw-field-message,input.sc-spw-field-message,optgroup.sc-spw-field-message,select.sc-spw-field-message,textarea.sc-spw-field-message{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button.sc-spw-field-message,input.sc-spw-field-message{overflow:visible}button.sc-spw-field-message,select.sc-spw-field-message{text-transform:none}button.sc-spw-field-message,[type=button].sc-spw-field-message,[type=reset].sc-spw-field-message,[type=submit].sc-spw-field-message{-webkit-appearance:button}button.sc-spw-field-message::-moz-focus-inner,[type=button].sc-spw-field-message::-moz-focus-inner,[type=reset].sc-spw-field-message::-moz-focus-inner,[type=submit].sc-spw-field-message::-moz-focus-inner{border-style:none;padding:0}button.sc-spw-field-message:-moz-focusring,[type=button].sc-spw-field-message:-moz-focusring,[type=reset].sc-spw-field-message:-moz-focusring,[type=submit].sc-spw-field-message:-moz-focusring{outline:1px dotted ButtonText}fieldset.sc-spw-field-message{padding:0.35em 0.75em 0.625em}legend.sc-spw-field-message{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress.sc-spw-field-message{vertical-align:baseline}textarea.sc-spw-field-message{overflow:auto}[type=checkbox].sc-spw-field-message,[type=radio].sc-spw-field-message{box-sizing:border-box;padding:0}[type=number].sc-spw-field-message::-webkit-inner-spin-button,[type=number].sc-spw-field-message::-webkit-outer-spin-button{height:auto}[type=search].sc-spw-field-message{-webkit-appearance:textfield;outline-offset:-2px}[type=search].sc-spw-field-message::-webkit-search-decoration{-webkit-appearance:none}.sc-spw-field-message::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details.sc-spw-field-message{display:block}summary.sc-spw-field-message{display:list-item}template.sc-spw-field-message{display:none}[hidden].sc-spw-field-message{display:none}.sc-spw-field-message:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container.sc-spw-field-message{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 360px){.spw-ds-container.sc-spw-field-message{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container.sc-spw-field-message{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container.sc-spw-field-message{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1200px){.spw-ds-container.sc-spw-field-message{max-width:var(--spw-ds-container-xl)}}.sc-spw-field-message-h{display:block}.spw-field-message.sc-spw-field-message{display:block;margin-top:8px;display:flex;gap:8px}.spw-field-message--error.sc-spw-field-message{color:var(--spw-color-states-error-error-300)}.spw-field-message--hint.sc-spw-field-message{color:var(--spw-colors-support-grey-grey-800)}.spw-field-message--success.sc-spw-field-message{color:var(--spw-color-states-success-success-500)}.spw-field-message--warning.sc-spw-field-message{color:var(--spw-color-themes-orange-orange-500)}.spw-field-message__icon.sc-spw-field-message{position:relative;top:1px}.spw-field-message__text.sc-spw-field-message{flex:1;font-size:14px;line-height:1.5}.spw-field-message__expandable.sc-spw-field-message{margin-top:6px}.spw-field-message__expandable.sc-spw-field-message spw-link.sc-spw-field-message{user-select:none;--spw-link-text-decoration:none;--spw-link-color:var(--spw-colors-support-grey-grey-800)}.spw-field-message__expandable.sc-spw-field-message spw-link.sc-spw-field-message:hover{--spw-link-text-decoration:underline}.spw-field-message__details.sc-spw-field-message{margin:6px 0;padding:16px;border:1px solid var(--spw-colors-support-grey-grey-300);background:var(--spw-colors-support-grey-grey-50);border-radius:4px;color:var(--spw-colors-support-grey-grey-800)}.spw-field-message__details--hidden.sc-spw-field-message{display:none}";const n=class{constructor(e){s(this,e),this.type="buttons",this.orientation="horizontal",this.alignment="left",this.disabled=!1,this.label="",this.isReversed=!1,this.isFullWidth=!1,this.flexWrap="nowrap",this.error="",this.hint="",this.success="",this.warning="",this.isExpandable=!1,this.tooltipDirection="top",this.tooltipCursor="help"}get isCheckboxOrRadio(){return"checkboxes"===this.type||"radios"===this.type}componentDidLoad(){this.handleSlotChange()}handleSlotChange(){var s,e;(null!==(e=null===(s=this.slotEl)||void 0===s?void 0:s.assignedElements())&&void 0!==e?e:[]).forEach((s=>{this.isCheckboxOrRadio&&this.error?s.setAttribute("error",""):s.removeAttribute("error")}))}get hostUserClasses(){return Array.from(this.el.classList).filter((s=>"hydrated"!==s&&!s.startsWith("spw-group"))).reduce(((s,e)=>Object.assign(Object.assign({},s),{[e]:!0})),{})}get groupClasses(){return Object.assign(Object.assign({},this.hostUserClasses),{"spw-group":!0,"spw-group--horizontal":"horizontal"===this.orientation,"spw-group--vertical":"vertical"===this.orientation,"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}`]:!0,[`spw-group--align-${this.alignment}`]:!0})}renderMessages(){if(!this.isCheckboxOrRadio)return;const s=[];return this.error&&s.push({variant:"error",text:this.error}),this.hint&&s.push({variant:"hint",text:this.hint}),this.success&&s.push({variant:"success",text:this.success}),this.warning&&s.push({variant:"warning",text:this.warning}),s.map(((t,i)=>{const o=i===s.length-1;return e("spw-field-message",{variant:t.variant,isExpandable:o&&this.isExpandable,expandLabel:this.expandLabel,collapseLabel:this.collapseLabel},t.text,o&&e("slot",{name:"details",slot:"details"}))}))}render(){return e(t,{key:"8e723c566d057f2065d8413b39b18a5ea6e6cb10"},e("div",{key:"116cc3248305bc69493158fed70416fbd17d4f00",class:this.groupClasses},this.label&&e("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&&e("spw-field-message",{key:"65019f86b9a9ab9fce90939e22819c231b47357e",class:"spw-group__field-message",variant:"hint",showIcon:!1},this.assistiveText),e("div",{key:"5bbc7d3caf73910db8c94ec5aa2d4a239ec6f00e",class:"spw-group__container",style:{flexWrap:this.flexWrap}},e("slot",{key:"d5694afab8878b5f4e0cd7f97a603c7b331592a2",ref:s=>this.slotEl=s})),this.renderMessages()))}get el(){return i(this)}static get watchers(){return{error:[{handleSlotChange:0}]}}};n.style="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%}.spw-group spw-button:not[is-fullwidth-mobile=false]{display:block;width:100%}@media (min-width: 768px){.spw-group spw-button:not[is-fullwidth-mobile=false]{display:initial;width:auto}}.spw-group__field-label{margin-bottom:12px}.spw-group__field-message{margin-bottom:8px;margin-top:-8px}.spw-group__container{display:flex;width:fit-content}.spw-group--is-full-width .spw-group__container{width:100% !important}@media (min-width: 768px){.spw-group--buttons.spw-group--align-center .spw-group__container{justify-content:center;align-items:center}}@media (min-width: 768px){.spw-group__container{align-items:center}}.spw-group--buttons .spw-group__container{gap:12px;width:100%}@media (min-width: 768px){.spw-group--buttons .spw-group__container{width:fit-content}}.spw-group--links .spw-group__container,.spw-group--checkboxes .spw-group__container,.spw-group--radios .spw-group__container{gap:16px}.spw-group--checkboxes.spw-group--horizontal .spw-group__container,.spw-group--radios.spw-group--horizontal .spw-group__container{gap:16px}@media (min-width: 768px){.spw-group--checkboxes.spw-group--horizontal .spw-group__container,.spw-group--radios.spw-group--horizontal .spw-group__container{gap:24px}}.spw-group--buttons.spw-group--align-right.spw-group--horizontal .spw-group__container{flex-direction:column}@media (min-width: 768px){.spw-group--buttons.spw-group--align-right.spw-group--horizontal .spw-group__container{flex-direction:row-reverse}}.spw-group--buttons.spw-group--align-left.spw-group--horizontal.spw-group--reversed .spw-group__container{flex-direction:column-reverse}@media (min-width: 768px){.spw-group--buttons.spw-group--align-left.spw-group--horizontal.spw-group--reversed .spw-group__container{flex-direction:row}}.spw-group--align-left .spw-group__container{margin-right:auto}.spw-group--align-center .spw-group__container{margin-left:auto;margin-right:auto}.spw-group--align-right .spw-group__container{margin-left:auto}.spw-group--vertical .spw-group__container{flex-direction:column;align-items:flex-start}.spw-group--align-center .spw-group--vertical .spw-group__container{align-items:center}.spw-group--align-right .spw-group--vertical .spw-group__container{align-items:flex-end}.spw-group--horizontal .spw-group__container{flex-direction:column}@media (min-width: 768px){.spw-group--horizontal .spw-group__container{flex-direction:row}}.spw-group--disabled{opacity:0.5;pointer-events:none}";const a=class{constructor(e){s(this,e),this.variant="fa-solid"}render(){return e("i",{key:"0abdbe9b49b86e4522ba15ec9c7708d7eaa5fab8",class:`spw-icon ${this.variant} ${this.icon}`})}static get assetsDirs(){return["assets"]}};a.style="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{line-height:1}.spw-icon.fa-solid,.spw-icon.fa-solid:before{font-family:var(--spw-ds-font-icons-solid)}.spw-icon.fa-brands,.spw-icon.fa-brands:before{font-family:var(--spw-ds-font-icons-brands)}.spw-icon.fa-regular,.spw-icon.fa-regular:before{font-weight:400;font-family:var(--spw-ds-font-icons-solid)}.spw-icon.fa-light,.spw-icon.fa-light:before{font-weight:300;font-family:var(--spw-ds-font-icons-solid)}.spw-icon{font-size:inherit}";const d=class{constructor(e){s(this,e),this.spwClick=o(this,"spwClick",7),this.target="_self",this.iconPosition="right",this.disabled=!1,this.surface="light",this.onClick=s=>{this.disabled?s.preventDefault():this.spwClick.emit(s)}}get elementClass(){return{"spw-link":!0,"spw-link--has-icon-right":this.icon&&"right"===this.iconPosition,"spw-link--has-icon-left":this.icon&&"left"===this.iconPosition,[`spw-link--surface-${this.surface}`]:!0,"spw-link--has-icon":!!this.icon}}render(){const{href:s,rel:t,download:i,target:o,icon:r,iconPosition:p,accAriaLabel:n,disabled:a}=this,d={"aria-label":n,"aria-disabled":a?"true":null},l=r?e("spw-icon",{class:`spw-icon--${p}`,icon:r}):null;return e("a",Object.assign({key:"231cf39a96b4dc4951eb86e67b9fd1483cf83822",href:a?void 0:s,rel:t,download:i,target:o,class:this.elementClass,onClick:this.onClick},d),"left"===p&&l,e("div",{key:"fe8f7585e1161009faa76b97482367100a9e95a3",class:"spw-link__inner"},e("slot",{key:"68a04e2b82e4c2a61b09cfcb2db139d42cfe5d5e"})),"right"===p&&l)}get el(){return i(this)}};d.style='@charset "UTF-8";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{--spw-link-display:inline;--spw-link-wrap:wrap;--spw-link-white-space:normal;--spw-link-color:var(--spw-ds-primary);--spw-link-hover-color:var(--spw-ds-variant);--spw-link-active-color:var(--spw-ds-active);--spw-link-font-weight:700;--spw-link-text-decoration:underline;--spw-link-padding:6px}.spw-link{display:var(--spw-link-display);text-decoration:none;text-wrap:var(--spw-link-wrap);white-space:var(--spw-link-white-space);cursor:pointer;color:var(--spw-link-color);border-radius:4px;font-weight:var(--spw-link-font-weight)}.spw-link--surface-dark{color:var(--spw-ds-white)}.spw-link__inner{display:inline;overflow-wrap:break-word;text-decoration:var(--spw-link-text-decoration);text-underline-offset:2px}.spw-link:focus-visible{outline-offset:2px;outline:3px solid black}.spw-link:hover{color:var(--spw-link-hover-color)}.spw-link:hover .spw-link__inner{text-decoration-thickness:2px}.spw-link:active{color:var(--spw-link-active-color)}.spw-link:active .spw-link__inner{text-decoration-thickness:2px}.spw-link[aria-disabled=true]{pointer-events:none;color:var(--spw-color-themes-grey-grey-600);cursor:not-allowed}.spw-link--surface-dark:hover{color:var(--spw-ds-white)}.spw-link--surface-dark:active{color:var(--spw-ds-white)}.spw-link--surface-dark[aria-disabled=true]{color:var(--spw-ds-white);opacity:0.5}.spw-link--has-icon-right spw-icon{margin-left:var(--spw-link-padding);margin-right:4px}.spw-link--has-icon-left spw-icon{margin-left:4px;margin-right:var(--spw-link-padding)}';const l=class{constructor(e){s(this,e),this.surface="dark",this.direction="horizontal",this.thickness=1,this.width="100%",this.height="100%"}get elementClass(){return{"spw-separator":!0,[`spw-separator--${this.surface}`]:!0,[`spw-separator--${this.direction}`]:!0,[`spw-separator--thickness-${this.thickness}`]:!0}}get style(){return{width:"horizontal"===this.direction?`${this.width}px`:`${this.thickness}px`,height:"vertical"===this.direction?`${this.height}px`:`${this.thickness}px`}}render(){return e("div",{key:"c89c022f4c74cbe8ab873786af0ec6632a2bfc42",class:this.elementClass,style:this.style})}};l.style="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-separator{display:block;border-width:1px}.spw-separator--horizontal{border-bottom-style:solid;width:auto;height:0}.spw-separator--vertical{border-right-style:solid;width:0;height:auto}.spw-separator--dark{border-color:var(--spw-colors-support-grey-grey-300)}.spw-separator--light{border-color:var(--spw-ds-white)}.spw-separator--thickness-1{border-width:1px}.spw-separator--thickness-2{border-width:2px}";const w={rouge:()=>":root{--spw-ds-white:var(--spw-color-shades-base-white);--spw-ds-focus:var(--spw-color-themes-blue-blue-400);--spw-ds-font-icons-solid:'Font Awesome 7 Pro';--spw-ds-font-icons-brands:'Font Awesome 7 Brands';--spw-ds-font-icons-regular:'Font Awesome 7 Pro';--spw-ds-font-main:'Nunito Sans', sans-serif;--spw-ds-spacing-none:0;--spw-ds-spacing-4xs:1px;--spw-ds-spacing-3xs:2px;--spw-ds-spacing-2xs:4px;--spw-ds-spacing-xs:6px;--spw-ds-spacing-sm:8px;--spw-ds-spacing-md:12px;--spw-ds-spacing-lg:16px;--spw-ds-spacing-xl:20px;--spw-ds-spacing-2xl:24px;--spw-ds-spacing-3xl:32px;--spw-ds-spacing-4xl:48px;--spw-ds-spacing-5xl:64px;--spw-ds-spacing-6xl:80px;--spw-ds-border-radius-none:0;--spw-ds-border-radius-2xs:2px;--spw-ds-border-radius-xs:4px;--spw-ds-border-radius-sm:6px;--spw-ds-border-radius-md:8px;--spw-ds-border-radius-lg:12px;--spw-ds-border-radius-xl:16px;--spw-ds-border-radius-2xl:20px;--spw-ds-border-radius-3xl:24px;--spw-ds-border-radius-4xl:32px;--spw-ds-border-radius-5xl:48px;--spw-ds-border-radius-full:999px}:root{--spw-ds-primary:var(--spw-color-themes-red-red-500);--spw-ds-variant:var(--spw-color-themes-red-red-700);--spw-ds-active:var(--spw-color-themes-red-red-800);--spw-ds-cta-outlined-bg-hover:var(--spw-color-themes-red-red-50);--spw-ds-cta-outlined-stroke-hover:var(--spw-color-themes-red-red-700);--spw-ds-cta-outlined-bg-active:var(--spw-color-themes-red-red-100);--spw-ds-cta-outlined-stroke-active:var(--spw-color-themes-red-red-800);--spw-ds-alt-purple:#552046;--spw-ds-alt-blue:#202f55;--spw-ds-alt-petrol:#1b4146}",bleu:()=>":root{--spw-ds-white:var(--spw-color-shades-base-white);--spw-ds-focus:var(--spw-color-themes-blue-blue-400);--spw-ds-font-icons-solid:'Font Awesome 7 Pro';--spw-ds-font-icons-brands:'Font Awesome 7 Brands';--spw-ds-font-icons-regular:'Font Awesome 7 Pro';--spw-ds-font-main:'Nunito Sans', sans-serif;--spw-ds-spacing-none:0;--spw-ds-spacing-4xs:1px;--spw-ds-spacing-3xs:2px;--spw-ds-spacing-2xs:4px;--spw-ds-spacing-xs:6px;--spw-ds-spacing-sm:8px;--spw-ds-spacing-md:12px;--spw-ds-spacing-lg:16px;--spw-ds-spacing-xl:20px;--spw-ds-spacing-2xl:24px;--spw-ds-spacing-3xl:32px;--spw-ds-spacing-4xl:48px;--spw-ds-spacing-5xl:64px;--spw-ds-spacing-6xl:80px;--spw-ds-border-radius-none:0;--spw-ds-border-radius-2xs:2px;--spw-ds-border-radius-xs:4px;--spw-ds-border-radius-sm:6px;--spw-ds-border-radius-md:8px;--spw-ds-border-radius-lg:12px;--spw-ds-border-radius-xl:16px;--spw-ds-border-radius-2xl:20px;--spw-ds-border-radius-3xl:24px;--spw-ds-border-radius-4xl:32px;--spw-ds-border-radius-5xl:48px;--spw-ds-border-radius-full:999px}:root{--spw-ds-primary:var(--spw-color-themes-blue-blue-500);--spw-ds-variant:var(--spw-color-themes-blue-blue-700);--spw-ds-active:var(--spw-color-themes-blue-blue-800);--spw-ds-cta-outlined-bg-hover:var(--spw-color-themes-blue-blue-50);--spw-ds-cta-outlined-stroke-hover:var(--spw-color-themes-blue-blue-700);--spw-ds-cta-outlined-bg-active:var(--spw-color-themes-blue-blue-100);--spw-ds-cta-outlined-stroke-active:var(--spw-color-themes-blue-blue-800)}",bleuClair:()=>":root{--spw-ds-white:var(--spw-color-shades-base-white);--spw-ds-focus:var(--spw-color-themes-blue-blue-400);--spw-ds-font-icons-solid:'Font Awesome 7 Pro';--spw-ds-font-icons-brands:'Font Awesome 7 Brands';--spw-ds-font-icons-regular:'Font Awesome 7 Pro';--spw-ds-font-main:'Nunito Sans', sans-serif;--spw-ds-spacing-none:0;--spw-ds-spacing-4xs:1px;--spw-ds-spacing-3xs:2px;--spw-ds-spacing-2xs:4px;--spw-ds-spacing-xs:6px;--spw-ds-spacing-sm:8px;--spw-ds-spacing-md:12px;--spw-ds-spacing-lg:16px;--spw-ds-spacing-xl:20px;--spw-ds-spacing-2xl:24px;--spw-ds-spacing-3xl:32px;--spw-ds-spacing-4xl:48px;--spw-ds-spacing-5xl:64px;--spw-ds-spacing-6xl:80px;--spw-ds-border-radius-none:0;--spw-ds-border-radius-2xs:2px;--spw-ds-border-radius-xs:4px;--spw-ds-border-radius-sm:6px;--spw-ds-border-radius-md:8px;--spw-ds-border-radius-lg:12px;--spw-ds-border-radius-xl:16px;--spw-ds-border-radius-2xl:20px;--spw-ds-border-radius-3xl:24px;--spw-ds-border-radius-4xl:32px;--spw-ds-border-radius-5xl:48px;--spw-ds-border-radius-full:999px}:root{--spw-ds-primary:var(--spw-color-themes-light-blue-light-blue-600);--spw-ds-variant:var(--spw-color-themes-light-blue-light-blue-800);--spw-ds-active:var(--spw-color-themes-light-blue-light-blue-900);--spw-ds-cta-outlined-bg-hover:var(--spw-color-themes-light-blue-light-blue-50);--spw-ds-cta-outlined-stroke-hover:var(--spw-color-themes-light-blue-light-blue-700);--spw-ds-cta-outlined-bg-active:var(--spw-color-themes-light-blue-light-blue-100);--spw-ds-cta-outlined-stroke-active:var(--spw-color-themes-light-blue-light-blue-800)}",vert:()=>":root{--spw-ds-white:var(--spw-color-shades-base-white);--spw-ds-focus:var(--spw-color-themes-blue-blue-400);--spw-ds-font-icons-solid:'Font Awesome 7 Pro';--spw-ds-font-icons-brands:'Font Awesome 7 Brands';--spw-ds-font-icons-regular:'Font Awesome 7 Pro';--spw-ds-font-main:'Nunito Sans', sans-serif;--spw-ds-spacing-none:0;--spw-ds-spacing-4xs:1px;--spw-ds-spacing-3xs:2px;--spw-ds-spacing-2xs:4px;--spw-ds-spacing-xs:6px;--spw-ds-spacing-sm:8px;--spw-ds-spacing-md:12px;--spw-ds-spacing-lg:16px;--spw-ds-spacing-xl:20px;--spw-ds-spacing-2xl:24px;--spw-ds-spacing-3xl:32px;--spw-ds-spacing-4xl:48px;--spw-ds-spacing-5xl:64px;--spw-ds-spacing-6xl:80px;--spw-ds-border-radius-none:0;--spw-ds-border-radius-2xs:2px;--spw-ds-border-radius-xs:4px;--spw-ds-border-radius-sm:6px;--spw-ds-border-radius-md:8px;--spw-ds-border-radius-lg:12px;--spw-ds-border-radius-xl:16px;--spw-ds-border-radius-2xl:20px;--spw-ds-border-radius-3xl:24px;--spw-ds-border-radius-4xl:32px;--spw-ds-border-radius-5xl:48px;--spw-ds-border-radius-full:999px}:root{--spw-ds-primary:var(--spw-color-themes-green-green-700);--spw-ds-variant:var(--spw-color-themes-green-green-800);--spw-ds-active:var(--spw-color-themes-green-green-900);--spw-ds-cta-outlined-bg-hover:var(--spw-color-themes-green-green-50);--spw-ds-cta-outlined-stroke-hover:var(--spw-color-themes-green-green-700);--spw-ds-cta-outlined-bg-active:var(--spw-color-themes-green-green-100);--spw-ds-cta-outlined-stroke-active:var(--spw-color-themes-green-green-800)}",vertLeger:()=>":root{--spw-ds-white:var(--spw-color-shades-base-white);--spw-ds-focus:var(--spw-color-themes-blue-blue-400);--spw-ds-font-icons-solid:'Font Awesome 7 Pro';--spw-ds-font-icons-brands:'Font Awesome 7 Brands';--spw-ds-font-icons-regular:'Font Awesome 7 Pro';--spw-ds-font-main:'Nunito Sans', sans-serif;--spw-ds-spacing-none:0;--spw-ds-spacing-4xs:1px;--spw-ds-spacing-3xs:2px;--spw-ds-spacing-2xs:4px;--spw-ds-spacing-xs:6px;--spw-ds-spacing-sm:8px;--spw-ds-spacing-md:12px;--spw-ds-spacing-lg:16px;--spw-ds-spacing-xl:20px;--spw-ds-spacing-2xl:24px;--spw-ds-spacing-3xl:32px;--spw-ds-spacing-4xl:48px;--spw-ds-spacing-5xl:64px;--spw-ds-spacing-6xl:80px;--spw-ds-border-radius-none:0;--spw-ds-border-radius-2xs:2px;--spw-ds-border-radius-xs:4px;--spw-ds-border-radius-sm:6px;--spw-ds-border-radius-md:8px;--spw-ds-border-radius-lg:12px;--spw-ds-border-radius-xl:16px;--spw-ds-border-radius-2xl:20px;--spw-ds-border-radius-3xl:24px;--spw-ds-border-radius-4xl:32px;--spw-ds-border-radius-5xl:48px;--spw-ds-border-radius-full:999px}:root{--spw-ds-primary:var(--spw-color-themes-light-green-light-green-700);--spw-ds-variant:var(--spw-color-themes-light-green-light-green-800);--spw-ds-active:var(--spw-color-themes-light-green-light-green-900);--spw-ds-cta-outlined-bg-hover:var(--spw-color-themes-light-green-light-green-50);--spw-ds-cta-outlined-stroke-hover:var(--spw-color-themes-light-green-light-green-700);--spw-ds-cta-outlined-bg-active:var(--spw-color-themes-light-green-light-green-100);--spw-ds-cta-outlined-stroke-active:var(--spw-color-themes-light-green-light-green-800)}",orange:()=>":root{--spw-ds-white:var(--spw-color-shades-base-white);--spw-ds-focus:var(--spw-color-themes-blue-blue-400);--spw-ds-font-icons-solid:'Font Awesome 7 Pro';--spw-ds-font-icons-brands:'Font Awesome 7 Brands';--spw-ds-font-icons-regular:'Font Awesome 7 Pro';--spw-ds-font-main:'Nunito Sans', sans-serif;--spw-ds-spacing-none:0;--spw-ds-spacing-4xs:1px;--spw-ds-spacing-3xs:2px;--spw-ds-spacing-2xs:4px;--spw-ds-spacing-xs:6px;--spw-ds-spacing-sm:8px;--spw-ds-spacing-md:12px;--spw-ds-spacing-lg:16px;--spw-ds-spacing-xl:20px;--spw-ds-spacing-2xl:24px;--spw-ds-spacing-3xl:32px;--spw-ds-spacing-4xl:48px;--spw-ds-spacing-5xl:64px;--spw-ds-spacing-6xl:80px;--spw-ds-border-radius-none:0;--spw-ds-border-radius-2xs:2px;--spw-ds-border-radius-xs:4px;--spw-ds-border-radius-sm:6px;--spw-ds-border-radius-md:8px;--spw-ds-border-radius-lg:12px;--spw-ds-border-radius-xl:16px;--spw-ds-border-radius-2xl:20px;--spw-ds-border-radius-3xl:24px;--spw-ds-border-radius-4xl:32px;--spw-ds-border-radius-5xl:48px;--spw-ds-border-radius-full:999px}:root{--spw-ds-primary:var(--spw-color-themes-orange-orange-700);--spw-ds-variant:var(--spw-color-themes-orange-orange-800);--spw-ds-active:var(--spw-color-themes-orange-orange-900);--spw-ds-cta-outlined-bg-hover:var(--spw-color-themes-orange-orange-50);--spw-ds-cta-outlined-stroke-hover:var(--spw-color-themes-orange-orange-700);--spw-ds-cta-outlined-bg-active:var(--spw-color-themes-orange-orange-100);--spw-ds-cta-outlined-stroke-active:var(--spw-color-themes-orange-orange-800)}",turquoise:()=>":root{--spw-ds-white:var(--spw-color-shades-base-white);--spw-ds-focus:var(--spw-color-themes-blue-blue-400);--spw-ds-font-icons-solid:'Font Awesome 7 Pro';--spw-ds-font-icons-brands:'Font Awesome 7 Brands';--spw-ds-font-icons-regular:'Font Awesome 7 Pro';--spw-ds-font-main:'Nunito Sans', sans-serif;--spw-ds-spacing-none:0;--spw-ds-spacing-4xs:1px;--spw-ds-spacing-3xs:2px;--spw-ds-spacing-2xs:4px;--spw-ds-spacing-xs:6px;--spw-ds-spacing-sm:8px;--spw-ds-spacing-md:12px;--spw-ds-spacing-lg:16px;--spw-ds-spacing-xl:20px;--spw-ds-spacing-2xl:24px;--spw-ds-spacing-3xl:32px;--spw-ds-spacing-4xl:48px;--spw-ds-spacing-5xl:64px;--spw-ds-spacing-6xl:80px;--spw-ds-border-radius-none:0;--spw-ds-border-radius-2xs:2px;--spw-ds-border-radius-xs:4px;--spw-ds-border-radius-sm:6px;--spw-ds-border-radius-md:8px;--spw-ds-border-radius-lg:12px;--spw-ds-border-radius-xl:16px;--spw-ds-border-radius-2xl:20px;--spw-ds-border-radius-3xl:24px;--spw-ds-border-radius-4xl:32px;--spw-ds-border-radius-5xl:48px;--spw-ds-border-radius-full:999px}:root{--spw-ds-primary:var(--spw-color-themes-teal-teal-700);--spw-ds-variant:var(--spw-color-themes-teal-teal-800);--spw-ds-active:var(--spw-color-themes-teal-teal-900);--spw-ds-cta-outlined-bg-hover:var(--spw-color-themes-teal-teal-50);--spw-ds-cta-outlined-stroke-hover:var(--spw-color-themes-teal-teal-700);--spw-ds-cta-outlined-bg-active:var(--spw-color-themes-teal-teal-100);--spw-ds-cta-outlined-stroke-active:var(--spw-color-themes-teal-teal-800)}",indigo:()=>":root{--spw-ds-white:var(--spw-color-shades-base-white);--spw-ds-focus:var(--spw-color-themes-blue-blue-400);--spw-ds-font-icons-solid:'Font Awesome 7 Pro';--spw-ds-font-icons-brands:'Font Awesome 7 Brands';--spw-ds-font-icons-regular:'Font Awesome 7 Pro';--spw-ds-font-main:'Nunito Sans', sans-serif;--spw-ds-spacing-none:0;--spw-ds-spacing-4xs:1px;--spw-ds-spacing-3xs:2px;--spw-ds-spacing-2xs:4px;--spw-ds-spacing-xs:6px;--spw-ds-spacing-sm:8px;--spw-ds-spacing-md:12px;--spw-ds-spacing-lg:16px;--spw-ds-spacing-xl:20px;--spw-ds-spacing-2xl:24px;--spw-ds-spacing-3xl:32px;--spw-ds-spacing-4xl:48px;--spw-ds-spacing-5xl:64px;--spw-ds-spacing-6xl:80px;--spw-ds-border-radius-none:0;--spw-ds-border-radius-2xs:2px;--spw-ds-border-radius-xs:4px;--spw-ds-border-radius-sm:6px;--spw-ds-border-radius-md:8px;--spw-ds-border-radius-lg:12px;--spw-ds-border-radius-xl:16px;--spw-ds-border-radius-2xl:20px;--spw-ds-border-radius-3xl:24px;--spw-ds-border-radius-4xl:32px;--spw-ds-border-radius-5xl:48px;--spw-ds-border-radius-full:999px}:root{--spw-ds-primary:var(--spw-color-themes-indigo-indigo-700);--spw-ds-variant:var(--spw-color-themes-indigo-indigo-800);--spw-ds-active:var(--spw-color-themes-indigo-indigo-900);--spw-ds-cta-outlined-bg-hover:var(--spw-color-themes-indigo-indigo-50);--spw-ds-cta-outlined-stroke-hover:var(--spw-color-themes-indigo-indigo-700);--spw-ds-cta-outlined-bg-active:var(--spw-color-themes-indigo-indigo-100);--spw-ds-cta-outlined-stroke-active:var(--spw-color-themes-indigo-indigo-800)}",mauve:()=>":root{--spw-ds-white:var(--spw-color-shades-base-white);--spw-ds-focus:var(--spw-color-themes-blue-blue-400);--spw-ds-font-icons-solid:'Font Awesome 7 Pro';--spw-ds-font-icons-brands:'Font Awesome 7 Brands';--spw-ds-font-icons-regular:'Font Awesome 7 Pro';--spw-ds-font-main:'Nunito Sans', sans-serif;--spw-ds-spacing-none:0;--spw-ds-spacing-4xs:1px;--spw-ds-spacing-3xs:2px;--spw-ds-spacing-2xs:4px;--spw-ds-spacing-xs:6px;--spw-ds-spacing-sm:8px;--spw-ds-spacing-md:12px;--spw-ds-spacing-lg:16px;--spw-ds-spacing-xl:20px;--spw-ds-spacing-2xl:24px;--spw-ds-spacing-3xl:32px;--spw-ds-spacing-4xl:48px;--spw-ds-spacing-5xl:64px;--spw-ds-spacing-6xl:80px;--spw-ds-border-radius-none:0;--spw-ds-border-radius-2xs:2px;--spw-ds-border-radius-xs:4px;--spw-ds-border-radius-sm:6px;--spw-ds-border-radius-md:8px;--spw-ds-border-radius-lg:12px;--spw-ds-border-radius-xl:16px;--spw-ds-border-radius-2xl:20px;--spw-ds-border-radius-3xl:24px;--spw-ds-border-radius-4xl:32px;--spw-ds-border-radius-5xl:48px;--spw-ds-border-radius-full:999px}:root{--spw-ds-primary:var(--spw-color-themes-purple-purple-500);--spw-ds-variant:var(--spw-color-themes-purple-purple-800);--spw-ds-active:var(--spw-color-themes-purple-purple-900);--spw-ds-cta-outlined-bg-hover:var(--spw-color-themes-purple-purple-50);--spw-ds-cta-outlined-stroke-hover:var(--spw-color-themes-purple-purple-700);--spw-ds-cta-outlined-bg-active:var(--spw-color-themes-purple-purple-100);--spw-ds-cta-outlined-stroke-active:var(--spw-color-themes-purple-purple-800)}",gris:()=>":root{--spw-ds-white:var(--spw-color-shades-base-white);--spw-ds-focus:var(--spw-color-themes-blue-blue-400);--spw-ds-font-icons-solid:'Font Awesome 7 Pro';--spw-ds-font-icons-brands:'Font Awesome 7 Brands';--spw-ds-font-icons-regular:'Font Awesome 7 Pro';--spw-ds-font-main:'Nunito Sans', sans-serif;--spw-ds-spacing-none:0;--spw-ds-spacing-4xs:1px;--spw-ds-spacing-3xs:2px;--spw-ds-spacing-2xs:4px;--spw-ds-spacing-xs:6px;--spw-ds-spacing-sm:8px;--spw-ds-spacing-md:12px;--spw-ds-spacing-lg:16px;--spw-ds-spacing-xl:20px;--spw-ds-spacing-2xl:24px;--spw-ds-spacing-3xl:32px;--spw-ds-spacing-4xl:48px;--spw-ds-spacing-5xl:64px;--spw-ds-spacing-6xl:80px;--spw-ds-border-radius-none:0;--spw-ds-border-radius-2xs:2px;--spw-ds-border-radius-xs:4px;--spw-ds-border-radius-sm:6px;--spw-ds-border-radius-md:8px;--spw-ds-border-radius-lg:12px;--spw-ds-border-radius-xl:16px;--spw-ds-border-radius-2xl:20px;--spw-ds-border-radius-3xl:24px;--spw-ds-border-radius-4xl:32px;--spw-ds-border-radius-5xl:48px;--spw-ds-border-radius-full:999px}:root{--spw-ds-primary:var(--spw-color-themes-grey-grey-500);--spw-ds-variant:var(--spw-color-themes-grey-grey-800);--spw-ds-active:var(--spw-color-themes-grey-grey-900);--spw-ds-cta-outlined-bg-hover:var(--spw-color-themes-grey-grey-50);--spw-ds-cta-outlined-stroke-hover:var(--spw-color-themes-grey-grey-700);--spw-ds-cta-outlined-bg-active:var(--spw-color-themes-grey-grey-100);--spw-ds-cta-outlined-stroke-active:var(--spw-color-themes-grey-grey-800)}"},c=class{constructor(e){s(this,e),this.theme="rouge"}componentWillLoad(){this.applyTheme(this.theme)}componentWillUpdate(){this.applyTheme(this.theme)}applyTheme(s){const e="theme-styles";let t=document.getElementById(e);t||(t=document.createElement("style"),t.id=e,document.head.appendChild(t));const i=w[s];t.innerHTML="function"==typeof i?i():i,document.documentElement.setAttribute("data-theme",s)}render(){return e("main",{key:"ad2ddcefb69b42f0b396da71e8c73441cdb1cdfa",class:`spw-theme-${this.theme}`},e("slot",{key:"f897d41f798f68cf9eb13b161c85b9b0265f0f39"}))}get el(){return i(this)}},g=class{constructor(e){s(this,e),this.tooltipTitle="",this.tooltipText="",this.direction="top",this.cursor="help",this.visible=!0,this.isVisible=!1,this.showTooltip=()=>{this.visible&&(this.isVisible=!0,this.createTooltip(),requestAnimationFrame((()=>{this.positionTooltip()})),window.addEventListener("scroll",this.handleScrollOrResize,!0),window.addEventListener("resize",this.handleScrollOrResize))},this.hideTooltip=()=>{this.isVisible=!1,this.removeTooltipFromDOM(),window.removeEventListener("scroll",this.handleScrollOrResize,!0),window.removeEventListener("resize",this.handleScrollOrResize)}}connectedCallback(){this.handleScrollOrResize=this.handleScrollOrResize.bind(this)}disconnectedCallback(){window.removeEventListener("scroll",this.handleScrollOrResize,!0),window.removeEventListener("resize",this.handleScrollOrResize),this.removeTooltipFromDOM()}updateTooltipVisibility(){this.tooltipEl&&(this.tooltipEl.style.display=this.visible?"flex":"none")}componentWillRender(){this.updateTooltipVisibility()}componentDidUpdate(){this.updateTooltipVisibility()}handleScrollOrResize(){this.isVisible&&this.positionTooltip()}createTooltip(){if(!this.tooltipEl){if(this.tooltipEl=document.createElement("div"),this.tooltipEl.className=`spw-tooltip-fixed spw-tooltip-fixed--${this.direction}`,this.tooltipEl.setAttribute("role","tooltip"),this.tooltipTitle){const s=document.createElement("strong");s.className="spw-tooltip__title",s.textContent=this.tooltipTitle,this.tooltipEl.appendChild(s)}if(this.tooltipText){const s=document.createElement("div");s.textContent=this.tooltipText,this.tooltipEl.appendChild(s)}document.body.appendChild(this.tooltipEl)}}removeTooltipFromDOM(){this.tooltipEl&&this.tooltipEl.parentNode&&this.tooltipEl.parentNode.removeChild(this.tooltipEl),this.tooltipEl=null}positionTooltip(){var s;if(!this.tooltipEl)return;const e=null===(s=this.host.shadowRoot)||void 0===s?void 0:s.querySelector(".spw-tooltip__target");if(!e)return;const t=e.getBoundingClientRect(),i=this.tooltipEl;i.style.visibility="hidden",i.style.display="flex",i.style.position="fixed",i.style.top="0px",i.style.left="0px",i.style.maxWidth=this.maxWidth+"px"||"100%";const o=i.getBoundingClientRect();let r=0,p=0;switch(this.direction){case"top":r=t.top-o.height-8,p=t.left+(t.width-o.width)/2;break;case"bottom":r=t.bottom+8,p=t.left+(t.width-o.width)/2;break;case"left":r=t.top+(t.height-o.height)/2,p=t.left-o.width-8;break;default:r=t.top+(t.height-o.height)/2,p=t.right+8}i.style.top=`${r}px`,i.style.left=`${p}px`,i.style.zIndex="9999",i.style.visibility="visible"}get classes(){return{"spw-tooltip__target":!0,[`spw-tooltip__target--${this.cursor}`]:!0}}render(){return e("div",{key:"ea0de57189d5698db4302c830465b4200d58f89f",class:this.classes,onMouseEnter:this.showTooltip,onMouseLeave:this.hideTooltip},e("slot",{key:"536d5e150e10ac2fa42840aec72395f68ad4beba"}))}get host(){return i(this)}};g.style="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-block}.spw-tooltip__target--pointer{cursor:pointer}.spw-tooltip__target--default{cursor:default}.spw-tooltip__target--help{cursor:help}.spw-tooltip__target--disabled{cursor:not-allowed}:host(.spw-tooltip--has-ellipsis) .spw-tooltip__target{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";export{r as spw_field_label,p as spw_field_message,n as spw_group,a as spw_icon,d as spw_link,l as spw_separator,c as spw_theme_provider,g as spw_tooltip}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as t,H as o,a as s}from"./p-DkNryMko.js";const i=class{constructor(t){e(this,t),this.personaLabel="Je suis :",this.activePersona="",this.options=[],this.handleButtonClick=()=>{this.openSelect()},this.handleButtonKeyDown=e=>{" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),this.openSelect())}}componentWillLoad(){this.setInitialPersona()}componentDidLoad(){this.moveOptionsToSelect()}setInitialPersona(){var e;const t=this.el.querySelector("option[selected]");this.activePersona=(null===(e=null==t?void 0:t.textContent)||void 0===e?void 0:e.trim())||""}moveOptionsToSelect(){const e=Array.from(this.el.querySelectorAll("option"));this.options=e,e.forEach((e=>{this.selectEl.appendChild(e)}))}handleChange(e){var t;const o=e.target.selectedOptions[0];this.activePersona=(null===(t=null==o?void 0:o.textContent)||void 0===t?void 0:t.trim())||"";const s=null==o?void 0:o.getAttribute("data-link");s&&"#"!==s&&(window.location.href=s)}openSelect(){this.selectEl&&("function"==typeof this.selectEl.showPicker?this.selectEl.showPicker():this.selectEl.click())}render(){return t(o,{key:"3f57dc62f05ccb31f1a35efa9ca41cbaeb1fa630"},t("div",{key:"25d89e8a209421a1d77105cb853cc9aefaeb8913",class:"spw-header-persona",onClick:this.handleButtonClick,onKeyDown:this.handleButtonKeyDown,tabIndex:0},t("span",{key:"e365f8db45bb738ef92b7ff6c865dcdc683cd970",class:"spw-header-persona__label"},this.personaLabel),t("div",{key:"6fb0485e32554b1b09c40bdcc552b1ed549c25c9",class:"spw-header-persona__active-persona"},this.activePersona," ",t("spw-icon",{key:"42b2730c44b36346fb0ee9e15590785db7208553",icon:"fa-chevron-down"})),t("select",{key:"d9634f9542ffc050893f33fb30c177c58f560f91","aria-label":this.accAriaLabel||this.personaLabel,class:"spw-header-persona__select",ref:e=>this.selectEl=e,onChange:e=>this.handleChange(e),tabIndex:-1})))}get el(){return s(this)}};i.style="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)}}";export{i as spw_header_persona}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as s,a as i}from"./p-DkNryMko.js";const o=class{constructor(s){t(this,s),this.valueChanged=e(this,"valueChanged",7),this.optionSelected=e(this,"optionSelected",7),this.value="",this.placeholder="Recherche...",this.size="medium",this.label="",this.required=!1,this.viewAllResults="Voir plus de résultats",this.viewAllResultsSubmit=!1,this.hasMoreResults=!0,this.noResults="Pas de résultats.",this.loadingText="Recherche en cours...",this.hasSubmitButton=!1,this.minCharacters=3,this.isLoading=!1,this.showDropdown=!0,this.tooltipDirection="top",this.tooltipCursor="help",this.filteredItems=[],this.parsedItems=[],this.searchText="",this.isOpen=!1,this.focusedItemIndex=null,this.dropdownDirection="down",this.showViewAll=!0,this.isSelectingItem=!1,this.handleClickOutside=t=>{if(this.isOpen){const e=t.composedPath()[0];this.hostElement.contains(e)||(this.isOpen=!1)}},this.handleValueChanged=t=>{const e=String(t.detail);this.isSelectingItem||(this.searchText=e,this.value=e,this.updateHiddenInput(),this.filterTimeout&&clearTimeout(this.filterTimeout),!this.searchText||this.searchText.length<this.minCharacters?this.isOpen=!1:(!this.isOpen&&this.showDropdown&&(this.isOpen=!0,this.determineDropdownDirection()),this.filterTimeout=setTimeout((()=>{this.filterItems()}),300)),this.valueChanged.emit(this.value))},this.handleSubmit=t=>{null==t||t.preventDefault();const e=this.el.closest("form");e&&e.requestSubmit()}}componentWillLoad(){this.parseItems(this.items),this.defaultValue=this.value,this.initializeFromValue(this.value),this.showViewAll=this.hasMoreResults}handleHasMoreResultsChange(t){this.showViewAll=t}componentDidLoad(){document.addEventListener("click",this.handleClickOutside),this.createHiddenInput()}createHiddenInput(){this.name&&(this.hiddenInput=document.createElement("input"),this.hiddenInput.type="hidden",this.hiddenInput.name=this.name,this.hiddenInput.value=this.value||"",this.el.appendChild(this.hiddenInput))}updateHiddenInput(){this.hiddenInput&&(this.hiddenInput.value=this.value||"")}initializeFromValue(t){if(!t)return void(this.searchText="");const e=this.parsedItems.find((e=>String(e.value)===t));this.searchText=e?e.label:t}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),this.filterTimeout&&clearTimeout(this.filterTimeout)}async resetInput(){this.value=this.defaultValue||"",this.initializeFromValue(this.value),this.updateHiddenInput(),this.isOpen=!1,this.focusedItemIndex=null,this.valueChanged.emit(this.value)}async setValue(t){this.value=t,this.initializeFromValue(t),this.filterItems(),this.valueChanged.emit(this.value)}async getValue(){return this.value}async showViewAllResults(){this.showViewAll=!0}async hideViewAllResults(){this.showViewAll=!1}handleValueChange(t){this.initializeFromValue(null!=t?t:""),this.filterItems()}parseItems(t){if(!t)return this.parsedItems=[],void(this.filteredItems=[]);if(Array.isArray(t))this.parsedItems=t;else try{this.parsedItems=JSON.parse(t)}catch(e){console.error("Invalid JSON format for items:",t),this.parsedItems=[]}this.filteredItems=[...this.parsedItems]}filterItems(){if(!this.parsedItems.length)return void(this.filteredItems=[]);const t=this.normalizeString(this.searchText).split(/\s+/).filter(Boolean);this.filteredItems=this.parsedItems.filter(t.length?e=>{var s,i;if(e.disabled)return!1;const o=this.normalizeString(`${e.label} ${null!==(s=e.searchableText)&&void 0!==s?s:""} ${null!==(i=e.category)&&void 0!==i?i:""}`);return t.every((t=>o.includes(t)))}:t=>!t.disabled)}normalizeString(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}selectItem(t){var e;this.isSelectingItem=!0,this.searchText=t.label,this.value=String(null!==(e=t.value)&&void 0!==e?e:t.label),this.isOpen=!1,this.focusedItemIndex=null,this.updateHiddenInput(),this.filterItems(),this.optionSelected.emit(t),this.valueChanged.emit(this.value),setTimeout((()=>{this.isSelectingItem=!1}),200),t.url&&(window.location.href=t.url)}determineDropdownDirection(){const t=this.hostElement.getBoundingClientRect(),e=window.innerHeight;this.dropdownDirection=t.bottom+200>e&&t.top>200?"up":"down"}handleKeyDown(t){switch(t.key){case"ArrowDown":t.preventDefault(),this.isOpen&&(this.focusedItemIndex=null===this.focusedItemIndex?0:(this.focusedItemIndex+1)%this.filteredItems.length);break;case"ArrowUp":t.preventDefault(),this.isOpen&&(this.focusedItemIndex=null===this.focusedItemIndex?this.filteredItems.length-1:(this.focusedItemIndex-1+this.filteredItems.length)%this.filteredItems.length);break;case"Enter":this.isOpen&&null!==this.focusedItemIndex?(t.preventDefault(),this.selectItem(this.filteredItems[this.focusedItemIndex])):this.hasSubmitButton&&(t.preventDefault(),this.handleSubmit(t));break;case"Escape":this.isOpen=!1}}highlightMatch(t){var e;const i=this.normalizeString(this.searchText).split(/\s+/).filter(Boolean);if(!i.length)return t;const o=Array.from(t).map((t=>this.normalizeString(t))),r=o.join(""),a=[];o.forEach(((t,e)=>{for(let s=0;s<t.length;s++)a.push(e)}));const n=[];for(const s of i){if(!s)continue;let i=0;for(;i<=r.length-s.length;){const o=r.indexOf(s,i);if(-1===o)break;const h=(null!==(e=a[o+s.length-1])&&void 0!==e?e:t.length-1)+1;n.push([a[o],h]),i=o+s.length}}if(!n.length)return t;n.sort(((t,e)=>t[0]-e[0]));const h=[n[0]];for(let t=1;t<n.length;t++){const e=h[h.length-1];n[t][0]<=e[1]?e[1]=Math.max(e[1],n[t][1]):h.push(n[t])}const l=[];let d=0;for(const[e,i]of h)e>d&&l.push(t.slice(d,e)),l.push(s("strong",null,t.slice(e,i))),d=i;return d<t.length&&l.push(t.slice(d)),s("span",null,l)}get elementClass(){return{"spw-search-field":!0,"spw-search-field--is-rounded":this.isRounded,"spw-search-field--has-submit-button":this.hasSubmitButton,"spw-search-field--is-open":this.isOpen,[`spw-search-field--${this.size}`]:!0}}render(){return s("div",{key:"060401db34655bb5b3bec93f5b818e6aa7b47102",ref:t=>this.hostElement=t,class:this.elementClass},this.label&&s("spw-field-label",{key:"a1800f04b056f0f79d3974c52a8c6d017ae4655a",label:this.label,name:this.name,required:this.required,tooltipTitle:this.tooltipTitle,tooltipText:this.tooltipText,tooltipMaxWidth:this.tooltipMaxWidth,tooltipDirection:this.tooltipDirection,tooltipCursor:this.tooltipCursor,onClick:()=>{var t;return null===(t=this.textFieldElement)||void 0===t?void 0:t.setFocus()}}),s("div",{key:"d9e2825baf141cb17c840a00a4affd92a23ae0f5",class:"spw-search-field__container"},s("spw-text-field",{key:"c8065e8f6f40a36ffa7787c1f885a2f668f4de4c",ref:t=>this.textFieldElement=t,placeholder:this.placeholder,name:this.name,size:this.size,"is-search":!0,"is-clear":!0,required:this.required,disabled:this.disabled,assistiveText:this.assistiveText,value:this.searchText,onValueChanged:this.handleValueChanged,onKeyDown:t=>this.handleKeyDown(t)}),this.hasSubmitButton&&s("button",{key:"44758a902c4dd685990e9fb91761b2f7cee021f4",type:"button",class:"spw-search-field__submit",onClick:this.handleSubmit,"aria-label":"Rechercher"})),this.showDropdown&&this.isOpen&&!!this.items&&s("div",{key:"1bda0dd7c9d5f8d7a42f58eb94682a6c8365ac1d",class:`spw-search-field__options spw-search-field__options--${this.dropdownDirection}`},!!this.filteredItems.length&&s("ul",{key:"65d7585bbebc194c70b04abdb0c37fb8f158c3f6"},this.filteredItems.map(((t,e)=>s("li",{class:{"spw-search-field__option":!0,"spw-search-field__option--focused":e===this.focusedItemIndex},onClick:()=>this.selectItem(t)},this.highlightMatch(t.label)," ",t.category&&s("span",{class:"spw-search-field__category"}," - ",t.category))))),this.isLoading&&s("p",{key:"6487b6e9d9bb2c69038c600d9fc6cb3fbe4e5239",class:"spw-search-field__loading"},s("spw-loading",{key:"0be7c015388bc6ea462021e2bed47edf2ffd1a40",text:this.loadingText})),!this.isLoading&&!this.filteredItems.length&&s("p",{key:"1c39bb50878da6904512663d95333cade5cb3f46",class:"spw-search-field__no-results"},this.noResults),!!this.filteredItems.length&&this.viewAllResults&&this.showViewAll&&s("p",{key:"0cba9739d0e6e208f8bc40b2719ade5d71d864b3",class:"spw-search-field__view-all"},s("a",{key:"61886707d6e20501fc5d90ee2b1053b9a17b8571",href:this.viewAllResultsLink,onClick:this.viewAllResultsSubmit?this.handleSubmit:void 0},this.viewAllResults," ",s("spw-icon",{key:"a3f3bd3d26c593511c045f5976a18e055205c494",icon:"fa-arrow-right"})))))}get el(){return i(this)}static get watchers(){return{hasMoreResults:[{handleHasMoreResultsChange:0}],value:[{handleValueChange:0}],items:[{parseItems:0}]}}};o.style="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:200px;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}";export{o as spw_search_field}
|
|
1
|
+
import{r as t,c as e,h as s,a as i}from"./p-DkNryMko.js";const o=class{constructor(s){t(this,s),this.valueChanged=e(this,"valueChanged",7),this.optionSelected=e(this,"optionSelected",7),this.value="",this.placeholder="Recherche...",this.size="medium",this.label="",this.required=!1,this.viewAllResults="Voir plus de résultats",this.viewAllResultsSubmit=!1,this.hasMoreResults=!0,this.noResults="Pas de résultats.",this.loadingText="Recherche en cours...",this.hasSubmitButton=!1,this.minCharacters=3,this.isLoading=!1,this.showDropdown=!0,this.tooltipDirection="top",this.tooltipCursor="help",this.filteredItems=[],this.parsedItems=[],this.searchText="",this.isOpen=!1,this.focusedItemIndex=null,this.dropdownDirection="down",this.showViewAll=!0,this.isSelectingItem=!1,this.handleClickOutside=t=>{if(this.isOpen){const e=t.composedPath()[0];this.hostElement.contains(e)||(this.isOpen=!1)}},this.handleValueChanged=t=>{const e=String(t.detail);this.isSelectingItem||(this.searchText=e,this.value=e,this.updateHiddenInput(),this.filterTimeout&&clearTimeout(this.filterTimeout),!this.searchText||this.searchText.length<this.minCharacters?this.isOpen=!1:(!this.isOpen&&this.showDropdown&&(this.isOpen=!0,this.determineDropdownDirection()),this.filterTimeout=setTimeout((()=>{this.filterItems()}),300)),this.valueChanged.emit(this.value))},this.handleSubmit=t=>{null==t||t.preventDefault();const e=this.el.closest("form");e&&e.requestSubmit()}}componentWillLoad(){this.parseItems(this.items),this.defaultValue=this.value,this.initializeFromValue(this.value),this.showViewAll=this.hasMoreResults}handleHasMoreResultsChange(t){this.showViewAll=t}componentDidLoad(){document.addEventListener("click",this.handleClickOutside),this.createHiddenInput()}createHiddenInput(){this.name&&(this.hiddenInput=document.createElement("input"),this.hiddenInput.type="hidden",this.hiddenInput.name=this.name,this.hiddenInput.value=this.value||"",this.el.appendChild(this.hiddenInput))}updateHiddenInput(){this.hiddenInput&&(this.hiddenInput.value=this.value||"")}initializeFromValue(t){if(!t)return void(this.searchText="");const e=this.parsedItems.find((e=>String(e.value)===t));this.searchText=e?e.label:t}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),this.filterTimeout&&clearTimeout(this.filterTimeout)}async resetInput(){this.value=this.defaultValue||"",this.initializeFromValue(this.value),this.updateHiddenInput(),this.isOpen=!1,this.focusedItemIndex=null,this.valueChanged.emit(this.value)}async setValue(t){this.value=t,this.initializeFromValue(t),this.filterItems(),this.valueChanged.emit(this.value)}async getValue(){return this.value}async showViewAllResults(){this.showViewAll=!0}async hideViewAllResults(){this.showViewAll=!1}handleValueChange(t){this.initializeFromValue(null!=t?t:""),this.filterItems()}parseItems(t){if(!t)return this.parsedItems=[],void(this.filteredItems=[]);if(Array.isArray(t))this.parsedItems=t;else try{this.parsedItems=JSON.parse(t)}catch(e){console.error("Invalid JSON format for items:",t),this.parsedItems=[]}this.filteredItems=[...this.parsedItems]}filterItems(){if(!this.parsedItems.length)return void(this.filteredItems=[]);const t=this.normalizeString(this.searchText).split(/\s+/).filter(Boolean);this.filteredItems=this.parsedItems.filter(t.length?e=>{var s,i;if(e.disabled)return!1;const o=this.normalizeString(`${e.label} ${null!==(s=e.searchableText)&&void 0!==s?s:""} ${null!==(i=e.category)&&void 0!==i?i:""}`);return t.every((t=>o.includes(t)))}:t=>!t.disabled)}normalizeString(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}selectItem(t){var e;this.isSelectingItem=!0,this.searchText=t.label,this.value=String(null!==(e=t.value)&&void 0!==e?e:t.label),this.isOpen=!1,this.focusedItemIndex=null,this.updateHiddenInput(),this.filterItems(),this.optionSelected.emit(t),this.valueChanged.emit(this.value),setTimeout((()=>{this.isSelectingItem=!1}),200),t.url&&(window.location.href=t.url)}determineDropdownDirection(){const t=this.hostElement.getBoundingClientRect(),e=window.innerHeight;this.dropdownDirection=t.bottom+200>e&&t.top>200?"up":"down"}handleKeyDown(t){switch(t.key){case"ArrowDown":t.preventDefault(),this.isOpen&&(this.focusedItemIndex=null===this.focusedItemIndex?0:(this.focusedItemIndex+1)%this.filteredItems.length);break;case"ArrowUp":t.preventDefault(),this.isOpen&&(this.focusedItemIndex=null===this.focusedItemIndex?this.filteredItems.length-1:(this.focusedItemIndex-1+this.filteredItems.length)%this.filteredItems.length);break;case"Enter":this.isOpen&&null!==this.focusedItemIndex?(t.preventDefault(),this.selectItem(this.filteredItems[this.focusedItemIndex])):this.hasSubmitButton&&(t.preventDefault(),this.handleSubmit(t));break;case"Escape":this.isOpen=!1}}highlightMatch(t){var e;const i=this.normalizeString(this.searchText).split(/\s+/).filter(Boolean);if(!i.length)return t;const o=Array.from(t).map((t=>this.normalizeString(t))),r=o.join(""),a=[];o.forEach(((t,e)=>{for(let s=0;s<t.length;s++)a.push(e)}));const n=[];for(const s of i){if(!s)continue;let i=0;for(;i<=r.length-s.length;){const o=r.indexOf(s,i);if(-1===o)break;const h=(null!==(e=a[o+s.length-1])&&void 0!==e?e:t.length-1)+1;n.push([a[o],h]),i=o+s.length}}if(!n.length)return t;n.sort(((t,e)=>t[0]-e[0]));const h=[n[0]];for(let t=1;t<n.length;t++){const e=h[h.length-1];n[t][0]<=e[1]?e[1]=Math.max(e[1],n[t][1]):h.push(n[t])}const l=[];let d=0;for(const[e,i]of h)e>d&&l.push(t.slice(d,e)),l.push(s("strong",null,t.slice(e,i))),d=i;return d<t.length&&l.push(t.slice(d)),s("span",null,l)}get elementClass(){return{"spw-search-field":!0,"spw-search-field--is-rounded":this.isRounded,"spw-search-field--has-submit-button":this.hasSubmitButton,"spw-search-field--is-open":this.isOpen,[`spw-search-field--${this.size}`]:!0}}render(){return s("div",{key:"060401db34655bb5b3bec93f5b818e6aa7b47102",ref:t=>this.hostElement=t,class:this.elementClass},this.label&&s("spw-field-label",{key:"a1800f04b056f0f79d3974c52a8c6d017ae4655a",label:this.label,name:this.name,required:this.required,tooltipTitle:this.tooltipTitle,tooltipText:this.tooltipText,tooltipMaxWidth:this.tooltipMaxWidth,tooltipDirection:this.tooltipDirection,tooltipCursor:this.tooltipCursor,onClick:()=>{var t;return null===(t=this.textFieldElement)||void 0===t?void 0:t.setFocus()}}),s("div",{key:"d9e2825baf141cb17c840a00a4affd92a23ae0f5",class:"spw-search-field__container"},s("spw-text-field",{key:"c8065e8f6f40a36ffa7787c1f885a2f668f4de4c",ref:t=>this.textFieldElement=t,placeholder:this.placeholder,name:this.name,size:this.size,"is-search":!0,"is-clear":!0,required:this.required,disabled:this.disabled,assistiveText:this.assistiveText,value:this.searchText,onValueChanged:this.handleValueChanged,onKeyDown:t=>this.handleKeyDown(t)}),this.hasSubmitButton&&s("button",{key:"44758a902c4dd685990e9fb91761b2f7cee021f4",type:"button",class:"spw-search-field__submit",onClick:this.handleSubmit,"aria-label":"Rechercher"})),this.showDropdown&&this.isOpen&&!!this.items&&s("div",{key:"1bda0dd7c9d5f8d7a42f58eb94682a6c8365ac1d",class:`spw-search-field__options spw-search-field__options--${this.dropdownDirection}`},!!this.filteredItems.length&&s("ul",{key:"65d7585bbebc194c70b04abdb0c37fb8f158c3f6"},this.filteredItems.map(((t,e)=>s("li",{class:{"spw-search-field__option":!0,"spw-search-field__option--focused":e===this.focusedItemIndex},onClick:()=>this.selectItem(t)},this.highlightMatch(t.label)," ",t.category&&s("span",{class:"spw-search-field__category"}," - ",t.category))))),this.isLoading&&s("p",{key:"6487b6e9d9bb2c69038c600d9fc6cb3fbe4e5239",class:"spw-search-field__loading"},s("spw-loading",{key:"0be7c015388bc6ea462021e2bed47edf2ffd1a40",text:this.loadingText})),!this.isLoading&&!this.filteredItems.length&&s("p",{key:"1c39bb50878da6904512663d95333cade5cb3f46",class:"spw-search-field__no-results"},this.noResults),!!this.filteredItems.length&&this.viewAllResults&&this.showViewAll&&s("p",{key:"0cba9739d0e6e208f8bc40b2719ade5d71d864b3",class:"spw-search-field__view-all"},s("a",{key:"61886707d6e20501fc5d90ee2b1053b9a17b8571",href:this.viewAllResultsLink,onClick:this.viewAllResultsSubmit?this.handleSubmit:void 0},this.viewAllResults," ",s("spw-icon",{key:"a3f3bd3d26c593511c045f5976a18e055205c494",icon:"fa-arrow-right"})))))}get el(){return i(this)}static get watchers(){return{hasMoreResults:[{handleHasMoreResultsChange:0}],value:[{handleValueChange:0}],items:[{parseItems:0}]}}};o.style="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}";export{o as spw_search_field}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as i,H as a,a as o}from"./p-DkNryMko.js";const n=class{constructor(i){t(this,i),this.spwHeaderNavigationNavigate=e(this,"spwHeaderNavigationNavigate",7),this.isActive=!1,this.variant="default",this.internalIsActive=!1,this.hasSubnav=!1,this.level=1,this.isSubnavVisible=!1,this.lastClickedLevel1Item=null,this.isMobile=window.innerWidth<1024,this.isDesktopOpen=!1,this.handleDesktopKeyDown=t=>{if(this.isMobile||!this.hasSubnav||this.isInsideMegamenu())return;const e=this.getOwnLink();if("Enter"!==t.key||this.isDesktopOpen||t.target!==e){if("Escape"===t.key&&this.isDesktopOpen){const i=t.target;(i===e||this.getManagedLinks().includes(i))&&(t.preventDefault(),t.stopPropagation(),this.closeDesktop(!0))}}else t.preventDefault(),this.openDesktop()},this.handleFocusOut=t=>{if(this.isMobile||!this.hasSubnav||this.isInsideMegamenu())return;const e=t.relatedTarget;e&&this.el.contains(e)||this.closeDesktop(!1)},this.handleMouseEnter=()=>{this.isMobile||!this.hasSubnav||this.isInsideMegamenu()||this.openDesktop()},this.handleMouseLeave=()=>{this.isMobile||!this.hasSubnav||this.isInsideMegamenu()||this.el.matches(":focus-within")||this.closeDesktop(!1)}}componentWillLoad(){this.internalIsActive=this.isActive,this.checkForSubnav(),this.calculateLevel(),this.updateLevelClass()}componentWillUpdate(){this.isActive!==this.internalIsActive&&(this.internalIsActive=this.isActive),this.updateLevelClass()}componentDidUpdate(){this.propagateMegamenuClass()}checkForSubnav(){const t=this.el.shadowRoot.querySelector("slot");if(t){const e=t.assignedElements({flatten:!0}).some((t=>"SPW-HEADER-NAVIGATION-DROPDOWN"===t.tagName));e!==this.hasSubnav&&(this.hasSubnav=e)}this.syncFocusability()}isMegamenu(){return"megamenu"===this.variant&&1===this.level}isInsideMegamenu(){if(1===this.level)return!1;let t=this.el.parentElement;for(;t;){if("SPW-HEADER-NAVIGATION-ITEM"===t.tagName&&"1"===t.getAttribute("data-level"))return"megamenu"===t.getAttribute("variant");t=t.parentElement}return!1}getOwnLink(){return this.el.querySelector(":scope > a")}getViewMoreLink(t){var e;const i=t.shadowRoot;return null!==(e=null==i?void 0:i.querySelector("spw-link"))&&void 0!==e?e:null}getManagedLinks(){if(!this.el.querySelector("spw-header-navigation-dropdown"))return[];if(this.isMegamenu()){const t=Array.from(this.el.querySelectorAll("spw-header-navigation-dropdown a"));return Array.from(this.el.querySelectorAll("spw-header-navigation-dropdown")).forEach((e=>{const i=this.getViewMoreLink(e);i&&t.push(i)})),t}const t=this.el.querySelector(":scope > spw-header-navigation-dropdown");if(!t)return[];const e=[];Array.from(t.children).forEach((t=>{if("SPW-HEADER-NAVIGATION-ITEM"===t.tagName){const i=t.querySelector(":scope > a");i&&e.push(i)}}));const i=this.getViewMoreLink(t);return i&&e.push(i),e}syncFocusability(){this.isMobile||this.getManagedLinks().forEach((t=>{this.isDesktopOpen?t.removeAttribute("tabindex"):t.setAttribute("tabindex","-1")}))}openDesktop(){!this.isMobile&&this.el.querySelector("spw-header-navigation-dropdown")&&(this.isDesktopOpen=!0,this.syncFocusability())}closeDesktop(t){var e;this.isDesktopOpen&&(this.isDesktopOpen=!1,this.syncFocusability(),t&&(null===(e=this.getOwnLink())||void 0===e||e.focus()))}calculateLevel(){let t=1,e=this.el.parentElement;for(;e&&"SPW-HEADER-NAVIGATION"!==e.tagName;)"SPW-HEADER-NAVIGATION-DROPDOWN"===e.tagName&&t++,e=e.parentElement;this.level=t}updateLevelClass(){const t=document.documentElement;Array.from(t.classList).forEach((e=>{e.startsWith("spw-ds-nav-level-")&&t.classList.remove(e)})),t.classList.add(`spw-ds-nav-level-${this.level}`),this.spwHeaderNavigationNavigate.emit({level:this.level,element:this.el})}toggleSubnavVisibility(t){this.isMobile&&(t.stopPropagation(),this.hasSubnav&&!this.isSubnavVisible)&&(window.matchMedia("(max-width: 1024px)").matches&&t.preventDefault(),1===this.level&&(this.lastClickedLevel1Item=this.el.innerText,document.documentElement.setAttribute("data-ds-nav-level1",this.lastClickedLevel1Item)),this.isSubnavVisible=!this.isSubnavVisible,this.isSubnavVisible&&(this.level++,this.updateLevelClass()))}getStoredLevel1Item(){return document.documentElement.getAttribute("data-ds-nav-level1")||""}handleBackClick(t){t.stopPropagation(),this.isSubnavVisible=!1,this.level>1&&(this.level--,this.updateLevelClass()),this.internalIsActive=!1,1!==this.level||this.isSubnavVisible||(this.lastClickedLevel1Item=null,document.documentElement.removeAttribute("data-ds-nav-level1"))}getPageTitle(){const t=this.el.shadowRoot.querySelector("slot");if(t){const e=t.assignedElements({flatten:!0});if(e.length>0){const t=e[0];return{title:t.innerText||"",link:t.href||null,target:t.target||null}}}return null}propagateMegamenuClass(){if("megamenu"===this.variant&&1===this.level){const t=this.el.shadowRoot.querySelector("slot");t&&t.assignedElements({flatten:!0}).forEach((t=>{if("SPW-HEADER-NAVIGATION-DROPDOWN"===t.tagName){const e=t.shadowRoot;if(e){const t=e.querySelector(".spw-header-navigation-dropdown");t&&t.classList.add("spw-header-navigation-dropdown--is-megamenu")}t.querySelectorAll("spw-header-navigation-item").forEach((t=>{const e=t.shadowRoot;if(e){const t=e.querySelector(".spw-header-navigation-item");t&&t.classList.add("spw-header-navigation-item--is-megamenu")}}))}}))}}async componentDidLoad(){setTimeout((()=>{this.checkForSubnav(),this.propagateMegamenuClass()}),0);const t=this.el.shadowRoot.querySelector("slot");t&&new MutationObserver((()=>{this.checkForSubnav(),this.propagateMegamenuClass()})).observe(t,{childList:!0,subtree:!0}),this.el.addEventListener("focusout",this.handleFocusOut)}disconnectedCallback(){this.el.removeEventListener("focusout",this.handleFocusOut)}render(){const t=this.getPageTitle(),e=this.getStoredLevel1Item();return i(a,{key:"7a47eaa623fbb4ffaaf0f710a92e245c95aa53c6","data-level":this.level},i("div",{key:"bd8106c8ba69ccc15742d16868c15bd7caedd0a2",class:{"spw-header-navigation-item":!0,"spw-header-navigation-item--has-subnav":this.hasSubnav,"spw-header-navigation-item--is-active":this.internalIsActive,"spw-header-navigation-item--is-subnav-visible":this.isSubnavVisible,"spw-header-navigation-item--is-megamenu":"megamenu"===this.variant,"spw-header-navigation-item--is-desktop-open":this.isDesktopOpen},onKeyDown:this.handleDesktopKeyDown,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},i("div",{key:"ae7bda0d0ed78280a0a0ae9f21441605c45a56b9",class:"spw-header-navigation-item__content",onClick:t=>this.toggleSubnavVisibility(t)},this.isSubnavVisible&&i("div",{key:"0b6fa3115a8ade17c361d46c1ef3e745984c9865",class:`spw-header-navigation-item__top spw-header-navigation-item__top--${this.level}`},i("div",{key:"70b76cae3997545f4836d5e9e3fb9ad2e09287dc",class:"spw-header-navigation-item__top-back",onClick:t=>this.handleBackClick(t)},i("spw-icon",{key:"2ebe9be3d4ae84d13221cfbd4abaa6470ebb32bf",icon:"fa-chevron-left"})," ",i("span",{key:"f69f17bf47233a7983d6fac66127936f51ada7df"},1===this.level?"":2===this.level?"Menu principal":e)),i("div",{key:"4064a6ebdb694ecf10900efba3efcb178dabb2bf",class:"spw-header-navigation-item__top-title"},i("a",{key:"633ebe15619f8b1749c2c35525e1f51c0ff676fc",href:(null==t?void 0:t.link)||"#",target:(null==t?void 0:t.target)||"_self"},(null==t?void 0:t.title)||""))),i("slot",{key:"302c088b314bd52cd98979af67dce472cdc98a86"}))))}get el(){return o(this)}};n.style='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}}';export{n as spw_header_navigation_item}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as i,H as n,a as o}from"./p-DkNryMko.js";const a=class{constructor(i){e(this,i),this.langChange=t(this,"langChange",7),this.activeLang="",this.options=[],this.handleButtonKeyDown=e=>{" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),this.openSelect())},this.handleButtonClick=()=>{this.openSelect()},this.handleOptionClick=e=>{this.setActiveLangAndRedirect(e)}}componentDidLoad(){this.moveOptionsToSelect()}moveOptionsToSelect(){var e;const t=Array.from(this.el.querySelectorAll("option"));this.options=t;const i=t.find((e=>e.hasAttribute("selected")||e.selected));t.forEach((e=>{this.selectEl.appendChild(e)})),i&&(this.activeLang=(null===(e=i.textContent)||void 0===e?void 0:e.trim())||"")}handleChange(e){this.setActiveLangAndRedirect(e.target.selectedOptions[0])}setActiveLangAndRedirect(e){var t;this.activeLang=(null===(t=null==e?void 0:e.textContent)||void 0===t?void 0:t.trim())||"";const i=(null==e?void 0:e.getAttribute("value"))||"";this.langChange.emit(i);const n=null==e?void 0:e.getAttribute("data-link");n&&"#"!==n&&(window.location.href=n)}openSelect(){this.selectEl&&("function"==typeof this.selectEl.showPicker?this.selectEl.showPicker():this.selectEl.click())}render(){return i(n,{key:"813de586237af395bdf05ae734618b6b61d176f9"},i("div",{key:"d40f0c056143cddd6b6246ef9e31759a29b8051e",class:"spw-header-lang"},i("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),i("select",{key:"0d1b35a3a2767b7150cf8892b2b5f13e7722c880","aria-label":this.accAriaLabel||"Lang",class:"spw-header-lang__select",onChange:e=>this.handleChange(e),ref:e=>this.selectEl=e,tabIndex:-1}),i("ul",{key:"4c4450370618798e7cebff0cd8cac158f95bb029",class:"spw-header-lang__options"},this.options.map((e=>{var t;const n=(null===(t=e.textContent)||void 0===t?void 0:t.trim())||"",o=e.getAttribute("value")||"";return i("li",{class:{"spw-header-lang__option":!0,"spw-header-lang__option--selected":n===this.activeLang},"data-value":o,onClick:()=>this.handleOptionClick(e)},n)})))))}get el(){return o(this)}};a.style="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-lang{position:relative}@media (max-width: 1023px){.spw-header-lang{margin-bottom:0}}@media (min-width: 1024px){.spw-header-lang:hover .spw-header-lang__dropdown{display:block}}.spw-header-lang spw-button{--spw-button-text-decoration-tertiary:none}.spw-header-lang__select{display:none}@media (min-width: 1024px){.spw-header-lang__select{display:block;position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer;z-index:2}}.spw-header-lang__active-lang{display:none}@media (min-width: 1024px){.spw-header-lang__active-lang{display:block}}.spw-header-lang__options{display:flex;gap:24px;text-transform:uppercase}@media (min-width: 1024px){.spw-header-lang__options{display:none}}.spw-header-lang__option{padding:16px 0;font-weight:bold;text-decoration:underline}.spw-header-lang__option--selected{color:var(--spw-ds-primary);text-decoration:none}@media (min-width: 1024px){.spw-header-lang__option{padding:24px 0}}.spw-header-lang__dropdown{display:flex}@media (min-width: 1024px){.spw-header-lang__dropdown{display:none;z-index:99999;position:absolute;overflow:hidden;top:100%;width:max-content;right:0;background:white;border-radius:4px;box-shadow:var(--spw-effect-elevation-8)}}";export{a as spw_header_lang}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as i,H as s,a as n}from"./p-DkNryMko.js";const o=class{constructor(i){t(this,i),this.spwDismiss=e(this,"spwDismiss",7),this.isDismissable=!0,this.dismissableText="Masquer",this.alertTitle="Notification",this.isVisible=!0,this.hasSlotContent=!1,this.handleKeyDown=t=>{"Enter"===t.key&&(t.preventDefault(),this.handleDismiss())},this.handleDismiss=()=>{this.spwDismiss.emit({alertId:this.alertId}),this.isVisible=!1},this.handleSlotChange=()=>{if(this.slotElement){const t=this.slotElement.assignedNodes({flatten:!0});this.hasSlotContent=t.some((t=>{var e;return t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&""!==(null===(e=t.textContent)||void 0===e?void 0:e.trim())}))}}}async showAlert(){this.isVisible=!0}async hideAlert(){this.isVisible=!1}render(){return this.isVisible?i(s,null,i("div",{class:"spw-alert",role:"alert","aria-live":"polite","aria-label":this.alertTitle},i("div",{class:"spw-alert__container"},i("div",{class:"spw-alert__title-container"},i("strong",{class:"spw-alert__title"},this.alertTitle),this.isDismissable&&i("spw-link",{tabindex:"0",icon:"fa-close",class:"spw-alert__close","aria-label":this.dismissableText,onClick:this.handleDismiss,onKeyDown:this.handleKeyDown},i("span",{class:"spw-alert__close-text"},this.dismissableText))),i("div",{class:{"spw-alert__text":!0,"spw-alert__text--hidden":!this.hasSlotContent}},i("slot",{ref:t=>this.slotElement=t,onSlotchange:this.handleSlotChange}))))):null}get el(){return n(this)}};o.style="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}}";export{o as spw_alert}
|