@govtechsg/sgds-web-component 3.27.0-rc.0 → 3.27.0-rc.1
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/components/DataTable/data-table.js +1 -1
- package/components/DataTable/index.umd.min.js +289 -274
- package/components/DataTable/index.umd.min.js.map +1 -1
- package/components/DataTable/sgds-data-table-cell.d.ts +4 -4
- package/components/DataTable/sgds-data-table-cell.js +4 -4
- package/components/DataTable/sgds-data-table-cell.js.map +1 -1
- package/components/DataTable/sgds-data-table-head.d.ts +5 -5
- package/components/DataTable/sgds-data-table-head.js +7 -7
- package/components/DataTable/sgds-data-table-head.js.map +1 -1
- package/components/DataTable/sgds-data-table-row.js +8 -8
- package/components/DataTable/sgds-data-table-row.js.map +1 -1
- package/components/DataTable/sgds-data-table.d.ts +6 -4
- package/components/DataTable/sgds-data-table.js +53 -20
- package/components/DataTable/sgds-data-table.js.map +1 -1
- package/components/Textarea/index.umd.min.js +1 -1
- package/components/Textarea/index.umd.min.js.map +1 -1
- package/components/Textarea/textarea.js +1 -1
- package/components/index.umd.min.js +252 -247
- package/components/index.umd.min.js.map +1 -1
- package/css/fouc.css +2 -2
- package/custom-elements.json +2661 -2722
- package/index.umd.min.js +84 -79
- package/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/react/components/DataTable/data-table.cjs.js +1 -1
- package/react/components/DataTable/data-table.js +1 -1
- package/react/components/DataTable/sgds-data-table-cell.cjs.js +4 -4
- package/react/components/DataTable/sgds-data-table-cell.cjs.js.map +1 -1
- package/react/components/DataTable/sgds-data-table-cell.js +4 -4
- package/react/components/DataTable/sgds-data-table-cell.js.map +1 -1
- package/react/components/DataTable/sgds-data-table-head.cjs.js +7 -7
- package/react/components/DataTable/sgds-data-table-head.cjs.js.map +1 -1
- package/react/components/DataTable/sgds-data-table-head.js +7 -7
- package/react/components/DataTable/sgds-data-table-head.js.map +1 -1
- package/react/components/DataTable/sgds-data-table-row.cjs.js +8 -8
- package/react/components/DataTable/sgds-data-table-row.cjs.js.map +1 -1
- package/react/components/DataTable/sgds-data-table-row.js +8 -8
- package/react/components/DataTable/sgds-data-table-row.js.map +1 -1
- package/react/components/DataTable/sgds-data-table.cjs.js +53 -20
- package/react/components/DataTable/sgds-data-table.cjs.js.map +1 -1
- package/react/components/DataTable/sgds-data-table.js +53 -20
- package/react/components/DataTable/sgds-data-table.js.map +1 -1
- package/react/components/Textarea/textarea.cjs.js +1 -1
- package/react/components/Textarea/textarea.js +1 -1
- package/react/index.cjs.js +18 -18
- package/react/index.d.ts +2 -2
- package/react/index.js +2 -2
- package/types/react.d.ts +107 -115
package/index.umd.min.js
CHANGED
|
@@ -10,7 +10,7 @@ const t=globalThis,s=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
10
10
|
* Copyright 2017 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const $=globalThis,S=e=>{$.emitLitDebugLogEvents&&$.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let M,Z=0;$.litIssuedWarnings??=new Set,M=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",$.litIssuedWarnings.has(t)||$.litIssuedWarnings.has(e)||(console.warn(t),$.litIssuedWarnings.add(t))},queueMicrotask(()=>{M("dev-mode","Lit is in dev mode. Not recommended for production!")});const z=$.ShadyDOM?.inUse&&!0===$.ShadyDOM?.noPatch?$.ShadyDOM.wrap:e=>e,V=$.trustedTypes,P=V?V.createPolicy("lit-html",{createHTML:e=>e}):void 0,A=e=>e,L=(e,t,s)=>A,I=e=>{if(ne!==L)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");ne=e},D=()=>{ne=L},E=(e,t,s)=>ne(e,t,s),B="$lit$",H=`lit$${Math.random().toFixed(9).slice(2)}$`,O="?"+H,T=`<${O}>`,R=document,F=()=>R.createComment(""),N=e=>null===e||"object"!=typeof e&&"function"!=typeof e,j=Array.isArray,U=e=>j(e)||"function"==typeof e?.[Symbol.iterator],q="[ \t\n\f\r]",Y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,K=/-->/g,W=/>/g,G=new RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),J=/'/g,X=/"/g,Q=/^(?:script|style|textarea|title)$/i,ee=(te=1,(e,...t)=>(e.some(e=>void 0===e)&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),t.some(e=>e?._$litStatic$)&&M("","Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\nPlease use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions"),{_$litType$:te,strings:e,values:t}));var te;const se=Symbol.for("lit-noChange"),ie=Symbol.for("lit-nothing"),ae=new WeakMap,oe=R.createTreeWalker(R,129);let ne=L;function re(e,t){if(!j(e)||!e.hasOwnProperty("raw")){let e="invalid template strings array";throw e="\n Internal Error: expected template strings to be an array\n with a 'raw' field. Faking a template strings array by\n calling html or svg like an ordinary function is effectively\n the same as calling unsafeHtml and can lead to major security\n issues, e.g. opening your code up to XSS attacks.\n If you're using the html or svg tagged template functions normally\n and still seeing this error, please file a bug at\n https://github.com/lit/lit/issues/new?template=bug_report.md\n and include information about your build tooling, if any.\n ".trim().replace(/\n */g,"\n"),new Error(e)}return void 0!==P?P.createHTML(t):t}const le=(e,t)=>{const s=e.length-1,i=[];let a,o=2===t?"<svg>":3===t?"<math>":"",n=Y;for(let t=0;t<s;t++){const s=e[t];let r,l,d=-1,c=0;for(;c<s.length&&(n.lastIndex=c,l=n.exec(s),null!==l);)if(c=n.lastIndex,n===Y){if("!--"===l[1])n=K;else if(void 0!==l[1])n=W;else if(void 0!==l[2])Q.test(l[2])&&(a=new RegExp(`</${l[2]}`,"g")),n=G;else if(void 0!==l[3])throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else n===G?">"===l[0]?(n=a??Y,d=-1):void 0===l[1]?d=-2:(d=n.lastIndex-l[2].length,r=l[1],n=void 0===l[3]?G:'"'===l[3]?X:J):n===X||n===J?n=G:n===K||n===W?n=Y:(n=G,a=void 0);console.assert(-1===d||n===G||n===J||n===X,"unexpected parse state B");const h=n===G&&e[t+1].startsWith("/>")?" ":"";o+=n===Y?s+T:d>=0?(i.push(r),s.slice(0,d)+B+s.slice(d)+H+h):s+H+(-2===d?t:h)}return[re(e,o+(e[s]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]};class de{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let a=0,o=0;const n=e.length-1,r=this.parts,[l,d]=le(e,t);if(this.el=de.createElement(l,s),oe.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=oe.nextNode())&&r.length<n;){if(1===i.nodeType){{const e=i.localName;if(/^(?:textarea|template)$/i.test(e)&&i.innerHTML.includes(H)){const t=`Expressions are not supported inside \`${e}\` elements. See https://lit.dev/msg/expression-in-${e} for more information.`;if("template"===e)throw new Error(t);M("",t)}}if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(B)){const t=d[o++],s=i.getAttribute(e).split(H),n=/([.?@])?(.*)/.exec(t);r.push({type:1,index:a,name:n[2],strings:s,ctor:"."===n[1]?ue:"?"===n[1]?ve:"@"===n[1]?me:ge}),i.removeAttribute(e)}else e.startsWith(H)&&(r.push({type:6,index:a}),i.removeAttribute(e));if(Q.test(i.tagName)){const e=i.textContent.split(H),t=e.length-1;if(t>0){i.textContent=V?V.emptyScript:"";for(let s=0;s<t;s++)i.append(e[s],F()),oe.nextNode(),r.push({type:2,index:++a});i.append(e[t],F())}}}else if(8===i.nodeType){if(i.data===O)r.push({type:2,index:a});else{let e=-1;for(;-1!==(e=i.data.indexOf(H,e+1));)r.push({type:7,index:a}),e+=H.length-1}}a++}if(d.length!==o)throw new Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+e.join("${...}")+"`");S&&S({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const s=R.createElement("template");return s.innerHTML=e,s}}function ce(e,t,s=e,i){if(t===se)return t;let a=void 0!==i?s.__directives?.[i]:s.__directive;const o=N(t)?void 0:t._$litDirective$;return a?.constructor!==o&&(a?._$notifyDirectiveConnectionChanged?.(!1),void 0===o?a=void 0:(a=new o(e),a._$initialize(e,s,i)),void 0!==i?(s.__directives??=[])[i]=a:s.__directive=a),void 0!==a&&(t=ce(e,a._$resolve(e,t.values),a,i)),t}class he{constructor(e,t){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=e,this._$parent=t}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(e){const{el:{content:t},parts:s}=this._$template,i=(e?.creationScope??R).importNode(t,!0);oe.currentNode=i;let a=oe.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let t;2===r.type?t=new pe(a,a.nextSibling,this,e):1===r.type?t=new r.ctor(a,r.name,r.strings,this,e):6===r.type&&(t=new fe(a,this,e)),this._$parts.push(t),r=s[++n]}o!==r?.index&&(a=oe.nextNode(),o++)}return oe.currentNode=R,i}_update(e){let t=0;for(const s of this._$parts)void 0!==s&&(S&&S({kind:"set part",part:s,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==s.strings?(s._$setValue(e,s,t),t+=s.strings.length-2):s._$setValue(e[t])),t++}}class pe{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,s,i){this.type=2,this._$committedValue=ie,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=s,this.options=i,this.__isConnected=i?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=z(this._$startNode).parentNode;const t=this._$parent;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(e,t=this){if(null===this.parentNode)throw new Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(e=ce(this,e,t),N(e))e===ie||null==e||""===e?(this._$committedValue!==ie&&(S&&S({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=ie):e!==this._$committedValue&&e!==se&&this._commitText(e);else if(void 0!==e._$litType$)this._commitTemplateResult(e);else if(void 0!==e.nodeType){if(this.options?.host===e)return this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),void console.warn("Attempted to render the template host",e,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");this._commitNode(e)}else U(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return z(z(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),ne!==L){const e=this._$startNode.parentNode?.nodeName;if("STYLE"===e||"SCRIPT"===e){let t="Forbidden";throw t="STYLE"===e?"Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.":"Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.",new Error(t)}}S&&S({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==ie&&N(this._$committedValue)){const t=z(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=E(t,"data","property")),e=this._textSanitizer(e),S&&S({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=R.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=E(t,"data","property")),e=this._textSanitizer(e),S&&S({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){const{values:t,_$litType$:s}=e,i="number"==typeof s?this._$getTemplate(e):(void 0===s.el&&(s.el=de.createElement(re(s.h,s.h[0]),this.options)),s);if(this._$committedValue?._$template===i)S&&S({kind:"template updating",template:i,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{const e=new he(i,this),s=e._clone(this.options);S&&S({kind:"template instantiated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:s,values:t}),e._update(t),S&&S({kind:"template instantiated and updated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:s,values:t}),this._commitNode(s),this._$committedValue=e}}_$getTemplate(e){let t=ae.get(e.strings);return void 0===t&&ae.set(e.strings,t=new de(e)),t}_commitIterable(e){j(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let s,i=0;for(const a of e)i===t.length?t.push(s=new pe(this._insert(F()),this._insert(F()),this,this.options)):s=t[i],s._$setValue(a),i++;i<t.length&&(this._$clear(s&&z(s._$endNode).nextSibling,i),t.length=i)}_$clear(e=z(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e!==this._$endNode;){const t=z(e).nextSibling;z(e).remove(),e=t}}setConnected(e){if(void 0!==this._$parent)throw new Error("part.setConnected() may only be called on a RootPart returned from render().");this.__isConnected=e,this._$notifyConnectionChanged?.(e)}}class ge{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,s,i,a){this.type=1,this._$committedValue=ie,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=i,this.options=a,s.length>2||""!==s[0]||""!==s[1]?(this._$committedValue=new Array(s.length-1).fill(new String),this.strings=s):this._$committedValue=ie,this._sanitizer=void 0}_$setValue(e,t=this,s,i){const a=this.strings;let o=!1;if(void 0===a)e=ce(this,e,t,0),o=!N(e)||e!==this._$committedValue&&e!==se,o&&(this._$committedValue=e);else{const i=e;let n,r;for(e=a[0],n=0;n<a.length-1;n++)r=ce(this,i[s+n],t,n),r===se&&(r=this._$committedValue[n]),o||=!N(r)||r!==this._$committedValue[n],r===ie?e=ie:e!==ie&&(e+=(r??"")+a[n+1]),this._$committedValue[n]=r}o&&!i&&this._commitValue(e)}_commitValue(e){e===ie?z(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=ne(this.element,this.name,"attribute")),e=this._sanitizer(e??""),S&&S({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),z(this.element).setAttribute(this.name,e??""))}}class ue extends ge{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=ne(this.element,this.name,"property")),e=this._sanitizer(e),S&&S({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===ie?void 0:e}}class ve extends ge{constructor(){super(...arguments),this.type=4}_commitValue(e){S&&S({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===ie),options:this.options}),z(this.element).toggleAttribute(this.name,!!e&&e!==ie)}}class me extends ge{constructor(e,t,s,i,a){if(super(e,t,s,i,a),this.type=5,void 0!==this.strings)throw new Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,t=this){if((e=ce(this,e,t,0)??ie)===se)return;const s=this._$committedValue,i=e===ie&&s!==ie||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,a=e!==ie&&(s===ie||i);S&&S({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:i,addListener:a,oldListener:s}),i&&this.element.removeEventListener(this.name,this,s),a&&this.element.addEventListener(this.name,this,e),this._$committedValue=e}handleEvent(e){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,e):this._$committedValue.handleEvent(e)}}class fe{constructor(e,t,s){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=s}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){S&&S({kind:"commit to element binding",element:this.element,value:e,options:this.options}),ce(this,e)}}const be={_boundAttributeSuffix:B,_marker:H,_markerMatch:O,_HTML_RESULT:1,_getTemplateHtml:le,_TemplateInstance:he,_isIterable:U,_resolveDirective:ce,_ChildPart:pe,_AttributePart:ge,_BooleanAttributePart:ve,_EventPart:me,_PropertyPart:ue,_ElementPart:fe},we=$.litHtmlPolyfillSupportDevMode;we?.(de,pe),($.litHtmlVersions??=[]).push("3.3.2"),$.litHtmlVersions.length>1&&queueMicrotask(()=>{M("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const ye=(e,t,s)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const i=Z++,a=s?.renderBefore??t;let o=a._$litPart$;if(S&&S({kind:"begin render",id:i,value:e,container:t,options:s,part:o}),void 0===o){const e=s?.renderBefore??null;a._$litPart$=o=new pe(t.insertBefore(F(),e),e,void 0,s??{})}return o._$setValue(e),S&&S({kind:"end render",id:i,value:e,container:t,options:s,part:o}),o};ye.setSanitizer=I,ye.createSanitizer=E,ye._testOnlyClearSanitizerFactoryDoNotCallOrElse=D;
|
|
13
|
+
const $=globalThis,S=e=>{$.emitLitDebugLogEvents&&$.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let M,Z=0;$.litIssuedWarnings??=new Set,M=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",$.litIssuedWarnings.has(t)||$.litIssuedWarnings.has(e)||(console.warn(t),$.litIssuedWarnings.add(t))},queueMicrotask(()=>{M("dev-mode","Lit is in dev mode. Not recommended for production!")});const z=$.ShadyDOM?.inUse&&!0===$.ShadyDOM?.noPatch?$.ShadyDOM.wrap:e=>e,V=$.trustedTypes,P=V?V.createPolicy("lit-html",{createHTML:e=>e}):void 0,A=e=>e,L=(e,t,s)=>A,D=e=>{if(ne!==L)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");ne=e},I=()=>{ne=L},E=(e,t,s)=>ne(e,t,s),B="$lit$",H=`lit$${Math.random().toFixed(9).slice(2)}$`,O="?"+H,T=`<${O}>`,R=document,F=()=>R.createComment(""),N=e=>null===e||"object"!=typeof e&&"function"!=typeof e,j=Array.isArray,U=e=>j(e)||"function"==typeof e?.[Symbol.iterator],q="[ \t\n\f\r]",Y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,K=/-->/g,W=/>/g,G=new RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),J=/'/g,X=/"/g,Q=/^(?:script|style|textarea|title)$/i,ee=(te=1,(e,...t)=>(e.some(e=>void 0===e)&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),t.some(e=>e?._$litStatic$)&&M("","Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\nPlease use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions"),{_$litType$:te,strings:e,values:t}));var te;const se=Symbol.for("lit-noChange"),ie=Symbol.for("lit-nothing"),ae=new WeakMap,oe=R.createTreeWalker(R,129);let ne=L;function re(e,t){if(!j(e)||!e.hasOwnProperty("raw")){let e="invalid template strings array";throw e="\n Internal Error: expected template strings to be an array\n with a 'raw' field. Faking a template strings array by\n calling html or svg like an ordinary function is effectively\n the same as calling unsafeHtml and can lead to major security\n issues, e.g. opening your code up to XSS attacks.\n If you're using the html or svg tagged template functions normally\n and still seeing this error, please file a bug at\n https://github.com/lit/lit/issues/new?template=bug_report.md\n and include information about your build tooling, if any.\n ".trim().replace(/\n */g,"\n"),new Error(e)}return void 0!==P?P.createHTML(t):t}const le=(e,t)=>{const s=e.length-1,i=[];let a,o=2===t?"<svg>":3===t?"<math>":"",n=Y;for(let t=0;t<s;t++){const s=e[t];let r,l,d=-1,c=0;for(;c<s.length&&(n.lastIndex=c,l=n.exec(s),null!==l);)if(c=n.lastIndex,n===Y){if("!--"===l[1])n=K;else if(void 0!==l[1])n=W;else if(void 0!==l[2])Q.test(l[2])&&(a=new RegExp(`</${l[2]}`,"g")),n=G;else if(void 0!==l[3])throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else n===G?">"===l[0]?(n=a??Y,d=-1):void 0===l[1]?d=-2:(d=n.lastIndex-l[2].length,r=l[1],n=void 0===l[3]?G:'"'===l[3]?X:J):n===X||n===J?n=G:n===K||n===W?n=Y:(n=G,a=void 0);console.assert(-1===d||n===G||n===J||n===X,"unexpected parse state B");const h=n===G&&e[t+1].startsWith("/>")?" ":"";o+=n===Y?s+T:d>=0?(i.push(r),s.slice(0,d)+B+s.slice(d)+H+h):s+H+(-2===d?t:h)}return[re(e,o+(e[s]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]};class de{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let a=0,o=0;const n=e.length-1,r=this.parts,[l,d]=le(e,t);if(this.el=de.createElement(l,s),oe.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=oe.nextNode())&&r.length<n;){if(1===i.nodeType){{const e=i.localName;if(/^(?:textarea|template)$/i.test(e)&&i.innerHTML.includes(H)){const t=`Expressions are not supported inside \`${e}\` elements. See https://lit.dev/msg/expression-in-${e} for more information.`;if("template"===e)throw new Error(t);M("",t)}}if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(B)){const t=d[o++],s=i.getAttribute(e).split(H),n=/([.?@])?(.*)/.exec(t);r.push({type:1,index:a,name:n[2],strings:s,ctor:"."===n[1]?ue:"?"===n[1]?ve:"@"===n[1]?me:ge}),i.removeAttribute(e)}else e.startsWith(H)&&(r.push({type:6,index:a}),i.removeAttribute(e));if(Q.test(i.tagName)){const e=i.textContent.split(H),t=e.length-1;if(t>0){i.textContent=V?V.emptyScript:"";for(let s=0;s<t;s++)i.append(e[s],F()),oe.nextNode(),r.push({type:2,index:++a});i.append(e[t],F())}}}else if(8===i.nodeType){if(i.data===O)r.push({type:2,index:a});else{let e=-1;for(;-1!==(e=i.data.indexOf(H,e+1));)r.push({type:7,index:a}),e+=H.length-1}}a++}if(d.length!==o)throw new Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+e.join("${...}")+"`");S&&S({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const s=R.createElement("template");return s.innerHTML=e,s}}function ce(e,t,s=e,i){if(t===se)return t;let a=void 0!==i?s.__directives?.[i]:s.__directive;const o=N(t)?void 0:t._$litDirective$;return a?.constructor!==o&&(a?._$notifyDirectiveConnectionChanged?.(!1),void 0===o?a=void 0:(a=new o(e),a._$initialize(e,s,i)),void 0!==i?(s.__directives??=[])[i]=a:s.__directive=a),void 0!==a&&(t=ce(e,a._$resolve(e,t.values),a,i)),t}class he{constructor(e,t){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=e,this._$parent=t}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(e){const{el:{content:t},parts:s}=this._$template,i=(e?.creationScope??R).importNode(t,!0);oe.currentNode=i;let a=oe.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let t;2===r.type?t=new pe(a,a.nextSibling,this,e):1===r.type?t=new r.ctor(a,r.name,r.strings,this,e):6===r.type&&(t=new fe(a,this,e)),this._$parts.push(t),r=s[++n]}o!==r?.index&&(a=oe.nextNode(),o++)}return oe.currentNode=R,i}_update(e){let t=0;for(const s of this._$parts)void 0!==s&&(S&&S({kind:"set part",part:s,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==s.strings?(s._$setValue(e,s,t),t+=s.strings.length-2):s._$setValue(e[t])),t++}}class pe{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,s,i){this.type=2,this._$committedValue=ie,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=s,this.options=i,this.__isConnected=i?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=z(this._$startNode).parentNode;const t=this._$parent;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(e,t=this){if(null===this.parentNode)throw new Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(e=ce(this,e,t),N(e))e===ie||null==e||""===e?(this._$committedValue!==ie&&(S&&S({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=ie):e!==this._$committedValue&&e!==se&&this._commitText(e);else if(void 0!==e._$litType$)this._commitTemplateResult(e);else if(void 0!==e.nodeType){if(this.options?.host===e)return this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),void console.warn("Attempted to render the template host",e,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");this._commitNode(e)}else U(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return z(z(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),ne!==L){const e=this._$startNode.parentNode?.nodeName;if("STYLE"===e||"SCRIPT"===e){let t="Forbidden";throw t="STYLE"===e?"Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.":"Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.",new Error(t)}}S&&S({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==ie&&N(this._$committedValue)){const t=z(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=E(t,"data","property")),e=this._textSanitizer(e),S&&S({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=R.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=E(t,"data","property")),e=this._textSanitizer(e),S&&S({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){const{values:t,_$litType$:s}=e,i="number"==typeof s?this._$getTemplate(e):(void 0===s.el&&(s.el=de.createElement(re(s.h,s.h[0]),this.options)),s);if(this._$committedValue?._$template===i)S&&S({kind:"template updating",template:i,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{const e=new he(i,this),s=e._clone(this.options);S&&S({kind:"template instantiated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:s,values:t}),e._update(t),S&&S({kind:"template instantiated and updated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:s,values:t}),this._commitNode(s),this._$committedValue=e}}_$getTemplate(e){let t=ae.get(e.strings);return void 0===t&&ae.set(e.strings,t=new de(e)),t}_commitIterable(e){j(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let s,i=0;for(const a of e)i===t.length?t.push(s=new pe(this._insert(F()),this._insert(F()),this,this.options)):s=t[i],s._$setValue(a),i++;i<t.length&&(this._$clear(s&&z(s._$endNode).nextSibling,i),t.length=i)}_$clear(e=z(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e!==this._$endNode;){const t=z(e).nextSibling;z(e).remove(),e=t}}setConnected(e){if(void 0!==this._$parent)throw new Error("part.setConnected() may only be called on a RootPart returned from render().");this.__isConnected=e,this._$notifyConnectionChanged?.(e)}}class ge{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,s,i,a){this.type=1,this._$committedValue=ie,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=i,this.options=a,s.length>2||""!==s[0]||""!==s[1]?(this._$committedValue=new Array(s.length-1).fill(new String),this.strings=s):this._$committedValue=ie,this._sanitizer=void 0}_$setValue(e,t=this,s,i){const a=this.strings;let o=!1;if(void 0===a)e=ce(this,e,t,0),o=!N(e)||e!==this._$committedValue&&e!==se,o&&(this._$committedValue=e);else{const i=e;let n,r;for(e=a[0],n=0;n<a.length-1;n++)r=ce(this,i[s+n],t,n),r===se&&(r=this._$committedValue[n]),o||=!N(r)||r!==this._$committedValue[n],r===ie?e=ie:e!==ie&&(e+=(r??"")+a[n+1]),this._$committedValue[n]=r}o&&!i&&this._commitValue(e)}_commitValue(e){e===ie?z(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=ne(this.element,this.name,"attribute")),e=this._sanitizer(e??""),S&&S({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),z(this.element).setAttribute(this.name,e??""))}}class ue extends ge{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=ne(this.element,this.name,"property")),e=this._sanitizer(e),S&&S({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===ie?void 0:e}}class ve extends ge{constructor(){super(...arguments),this.type=4}_commitValue(e){S&&S({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===ie),options:this.options}),z(this.element).toggleAttribute(this.name,!!e&&e!==ie)}}class me extends ge{constructor(e,t,s,i,a){if(super(e,t,s,i,a),this.type=5,void 0!==this.strings)throw new Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,t=this){if((e=ce(this,e,t,0)??ie)===se)return;const s=this._$committedValue,i=e===ie&&s!==ie||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,a=e!==ie&&(s===ie||i);S&&S({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:i,addListener:a,oldListener:s}),i&&this.element.removeEventListener(this.name,this,s),a&&this.element.addEventListener(this.name,this,e),this._$committedValue=e}handleEvent(e){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,e):this._$committedValue.handleEvent(e)}}class fe{constructor(e,t,s){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=s}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){S&&S({kind:"commit to element binding",element:this.element,value:e,options:this.options}),ce(this,e)}}const be={_boundAttributeSuffix:B,_marker:H,_markerMatch:O,_HTML_RESULT:1,_getTemplateHtml:le,_TemplateInstance:he,_isIterable:U,_resolveDirective:ce,_ChildPart:pe,_AttributePart:ge,_BooleanAttributePart:ve,_EventPart:me,_PropertyPart:ue,_ElementPart:fe},we=$.litHtmlPolyfillSupportDevMode;we?.(de,pe),($.litHtmlVersions??=[]).push("3.3.2"),$.litHtmlVersions.length>1&&queueMicrotask(()=>{M("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const ye=(e,t,s)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const i=Z++,a=s?.renderBefore??t;let o=a._$litPart$;if(S&&S({kind:"begin render",id:i,value:e,container:t,options:s,part:o}),void 0===o){const e=s?.renderBefore??null;a._$litPart$=o=new pe(t.insertBefore(F(),e),e,void 0,s??{})}return o._$setValue(e),S&&S({kind:"end render",id:i,value:e,container:t,options:s,part:o}),o};ye.setSanitizer=D,ye.createSanitizer=E,ye._testOnlyClearSanitizerFactoryDoNotCallOrElse=I;
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
16
16
|
* Copyright 2017 Google LLC
|
|
@@ -42,12 +42,12 @@ let Se;$e?.({LitElement:ke}),(xe.litElementVersions??=[]).push("4.2.2"),xe.litEl
|
|
|
42
42
|
* @license
|
|
43
43
|
* Copyright 2017 Google LLC
|
|
44
44
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
45
|
-
*/function
|
|
45
|
+
*/function De(e){return(t,s)=>Pe(t,s,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(e)??null}})}
|
|
46
46
|
/**
|
|
47
47
|
* @license
|
|
48
48
|
* Copyright 2021 Google LLC
|
|
49
49
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
50
|
-
*/function
|
|
50
|
+
*/function Ie(e){return(t,s)=>{const{slot:i,selector:a}=e??{},o="slot"+(i?`[name=${i}]`:":not([name])");return Pe(t,s,{get(){const t=this.renderRoot?.querySelector(o),s=t?.assignedElements(e)??[];return void 0===a?s:s.filter(e=>e.matches(a))}})}}
|
|
51
51
|
/**
|
|
52
52
|
* @license
|
|
53
53
|
* Copyright 2017 Google LLC
|
|
@@ -56,7 +56,7 @@ let Se;$e?.({LitElement:ke}),(xe.litElementVersions??=[]).push("4.2.2"),xe.litEl
|
|
|
56
56
|
<div class="accordion">
|
|
57
57
|
<slot @slotchange=${this._handleSlotChange} @click=${this._onToggle} @keydown=${this._onKeyboardToggle}></slot>
|
|
58
58
|
</div>
|
|
59
|
-
`}}Re.styles=[...He.styles,Oe],e([ze({type:Boolean,reflect:!0})],Re.prototype,"allowMultiple",void 0),e([ze({type:String,reflect:!0})],Re.prototype,"variant",void 0),e([ze({type:String,reflect:!0})],Re.prototype,"density",void 0),e([
|
|
59
|
+
`}}Re.styles=[...He.styles,Oe],e([ze({type:Boolean,reflect:!0})],Re.prototype,"allowMultiple",void 0),e([ze({type:String,reflect:!0})],Re.prototype,"variant",void 0),e([ze({type:String,reflect:!0})],Re.prototype,"density",void 0),e([Ie()],Re.prototype,"defaultNodes",void 0);
|
|
60
60
|
/**
|
|
61
61
|
* @license
|
|
62
62
|
* Copyright 2017 Google LLC
|
|
@@ -111,7 +111,7 @@ const ct=Symbol.for(""),ht=e=>{if(e?.r===ct)return e?._$litStatic$},pt=(e,...t)=
|
|
|
111
111
|
<button class="btn-close" aria-label="Close button" ?disabled=${this.disabled} @click=${this._handleClick}>
|
|
112
112
|
<sgds-icon name="cross" size="sm"></sgds-icon>
|
|
113
113
|
</button>
|
|
114
|
-
`}}ft.styles=[...He.styles,mt],e([ze({type:String,reflect:!0})],ft.prototype,"size",void 0),e([ze({type:String,reflect:!0})],ft.prototype,"tone",void 0),e([ze({type:Boolean,reflect:!0})],ft.prototype,"disabled",void 0);const bt={announcement:()=>Promise.resolve().then(function(){return qr}),archive:()=>Promise.resolve().then(function(){return Kr}),"arrow-bar-down":()=>Promise.resolve().then(function(){return Gr}),"arrow-bar-left":()=>Promise.resolve().then(function(){return Xr}),"arrow-bar-right":()=>Promise.resolve().then(function(){return el}),"arrow-bar-up":()=>Promise.resolve().then(function(){return sl}),"arrow-circle-down":()=>Promise.resolve().then(function(){return al}),"arrow-circle-left":()=>Promise.resolve().then(function(){return nl}),"arrow-circle-right":()=>Promise.resolve().then(function(){return ll}),"arrow-circle-up":()=>Promise.resolve().then(function(){return cl}),"arrow-clockwise":()=>Promise.resolve().then(function(){return pl}),"arrow-down":()=>Promise.resolve().then(function(){return ul}),"arrow-left":()=>Promise.resolve().then(function(){return ml}),"arrow-repeat":()=>Promise.resolve().then(function(){return bl}),"arrow-right":()=>Promise.resolve().then(function(){return yl}),"arrow-square-down":()=>Promise.resolve().then(function(){return _l}),"arrow-square-left":()=>Promise.resolve().then(function(){return Cl}),"arrow-square-right":()=>Promise.resolve().then(function(){return Sl}),"arrow-square-up":()=>Promise.resolve().then(function(){return Zl}),"arrow-up":()=>Promise.resolve().then(function(){return Vl}),"bank-fill":()=>Promise.resolve().then(function(){return Al}),"bell-slash":()=>Promise.resolve().then(function(){return Il}),bell:()=>Promise.resolve().then(function(){return El}),"bi-funnel":()=>Promise.resolve().then(function(){return Hl}),"bookmark-fill":()=>Promise.resolve().then(function(){return Tl}),bookmark:()=>Promise.resolve().then(function(){return Fl}),"box-arrow-up-right":()=>Promise.resolve().then(function(){return jl}),"box-seam":()=>Promise.resolve().then(function(){return ql}),building:()=>Promise.resolve().then(function(){return Kl}),bus:()=>Promise.resolve().then(function(){return Gl}),calculator:()=>Promise.resolve().then(function(){return Xl}),"calendar-check":()=>Promise.resolve().then(function(){return ed}),"calendar-heart":()=>Promise.resolve().then(function(){return sd}),"calendar-x":()=>Promise.resolve().then(function(){return ad}),calendar:()=>Promise.resolve().then(function(){return nd}),camera:()=>Promise.resolve().then(function(){return ld}),car:()=>Promise.resolve().then(function(){return cd}),"chat-dots":()=>Promise.resolve().then(function(){return pd}),"chat-left-text":()=>Promise.resolve().then(function(){return ud}),chat:()=>Promise.resolve().then(function(){return md}),"check-circle-fill":()=>Promise.resolve().then(function(){return bd}),"check-circle":()=>Promise.resolve().then(function(){return yd}),check:()=>Promise.resolve().then(function(){return _d}),"chevron-down":()=>Promise.resolve().then(function(){return Cd}),"chevron-left":()=>Promise.resolve().then(function(){return Sd}),"chevron-right":()=>Promise.resolve().then(function(){return Zd}),"chevron-selector-vertical":()=>Promise.resolve().then(function(){return Vd}),"chevron-up":()=>Promise.resolve().then(function(){return Ad}),clock:()=>Promise.resolve().then(function(){return Id}),"cloud-check":()=>Promise.resolve().then(function(){return Ed}),"cloud-download":()=>Promise.resolve().then(function(){return Hd}),"cloud-upload":()=>Promise.resolve().then(function(){return Td}),cloud:()=>Promise.resolve().then(function(){return Fd}),"code-square":()=>Promise.resolve().then(function(){return jd}),"coins-hand":()=>Promise.resolve().then(function(){return qd}),compass:()=>Promise.resolve().then(function(){return Kd}),copy:()=>Promise.resolve().then(function(){return Gd}),"cpu-chip-ai":()=>Promise.resolve().then(function(){return Xd}),cross:()=>Promise.resolve().then(function(){return ec}),"cursor-fill":()=>Promise.resolve().then(function(){return sc}),cursor:()=>Promise.resolve().then(function(){return ac}),"dash-circle":()=>Promise.resolve().then(function(){return nc}),"dash-square":()=>Promise.resolve().then(function(){return lc}),dash:()=>Promise.resolve().then(function(){return cc}),database:()=>Promise.resolve().then(function(){return pc}),dataflow:()=>Promise.resolve().then(function(){return uc}),download:()=>Promise.resolve().then(function(){return mc}),edit:()=>Promise.resolve().then(function(){return bc}),"exclamation-circle-fill":()=>Promise.resolve().then(function(){return yc}),"exclamation-circle":()=>Promise.resolve().then(function(){return _c}),"exclamation-triangle-fill":()=>Promise.resolve().then(function(){return Cc}),"exclamation-triangle":()=>Promise.resolve().then(function(){return Sc}),exclamation:()=>Promise.resolve().then(function(){return Zc}),"eye-fill":()=>Promise.resolve().then(function(){return Vc}),"eye-slash-fill":()=>Promise.resolve().then(function(){return Ac}),"eye-slash":()=>Promise.resolve().then(function(){return Ic}),eye:()=>Promise.resolve().then(function(){return Ec}),"face-smile-fill":()=>Promise.resolve().then(function(){return Hc}),"face-smile":()=>Promise.resolve().then(function(){return Tc}),facebook:()=>Promise.resolve().then(function(){return Fc}),"file-earmark-text":()=>Promise.resolve().then(function(){return jc}),"file-pdf":()=>Promise.resolve().then(function(){return qc}),"file-plus":()=>Promise.resolve().then(function(){return Kc}),"file-text":()=>Promise.resolve().then(function(){return Gc}),file:()=>Promise.resolve().then(function(){return Xc}),files:()=>Promise.resolve().then(function(){return eh}),fingerprint:()=>Promise.resolve().then(function(){return sh}),flash:()=>Promise.resolve().then(function(){return ah}),"folder-check":()=>Promise.resolve().then(function(){return nh}),"folder-minus":()=>Promise.resolve().then(function(){return lh}),"folder-plus":()=>Promise.resolve().then(function(){return ch}),folder:()=>Promise.resolve().then(function(){return ph}),gear:()=>Promise.resolve().then(function(){return uh}),"geo-alt":()=>Promise.resolve().then(function(){return mh}),"geo-fill":()=>Promise.resolve().then(function(){return bh}),geo:()=>Promise.resolve().then(function(){return yh}),"globe-alt":()=>Promise.resolve().then(function(){return _h}),globe:()=>Promise.resolve().then(function(){return Ch}),google:()=>Promise.resolve().then(function(){return Sh}),"grid-alt":()=>Promise.resolve().then(function(){return Zh}),"grid-fill":()=>Promise.resolve().then(function(){return Vh}),"hand-thumbs-down":()=>Promise.resolve().then(function(){return Ah}),"hand-thumbs-up":()=>Promise.resolve().then(function(){return Ih}),"hard-drive":()=>Promise.resolve().then(function(){return Eh}),heart:()=>Promise.resolve().then(function(){return Hh}),"house-door":()=>Promise.resolve().then(function(){return Th}),house:()=>Promise.resolve().then(function(){return Fh}),image:()=>Promise.resolve().then(function(){return jh}),"in-box":()=>Promise.resolve().then(function(){return qh}),"info-circle-fill":()=>Promise.resolve().then(function(){return Kh}),"info-circle":()=>Promise.resolve().then(function(){return Gh}),instagram:()=>Promise.resolve().then(function(){return Xh}),key:()=>Promise.resolve().then(function(){return ep}),"laptop-gear":()=>Promise.resolve().then(function(){return sp}),laptop:()=>Promise.resolve().then(function(){return ap}),layers:()=>Promise.resolve().then(function(){return np}),"layout-text-window-reverse":()=>Promise.resolve().then(function(){return lp}),"layout-text-window":()=>Promise.resolve().then(function(){return cp}),layout:()=>Promise.resolve().then(function(){return pp}),"life-buoy":()=>Promise.resolve().then(function(){return up}),lightbulb:()=>Promise.resolve().then(function(){return mp}),link:()=>Promise.resolve().then(function(){return bp}),linkedin:()=>Promise.resolve().then(function(){return yp}),list:()=>Promise.resolve().then(function(){return _p}),"lock-fill":()=>Promise.resolve().then(function(){return Cp}),lock:()=>Promise.resolve().then(function(){return Sp}),login:()=>Promise.resolve().then(function(){return Zp}),logout:()=>Promise.resolve().then(function(){return Vp}),luggage:()=>Promise.resolve().then(function(){return Ap}),"mail-open":()=>Promise.resolve().then(function(){return Ip}),mail:()=>Promise.resolve().then(function(){return Ep}),map:()=>Promise.resolve().then(function(){return Hp}),meetup:()=>Promise.resolve().then(function(){return Tp}),menu:()=>Promise.resolve().then(function(){return Fp}),microphone:()=>Promise.resolve().then(function(){return jp}),monitor:()=>Promise.resolve().then(function(){return qp}),moon:()=>Promise.resolve().then(function(){return Kp}),move:()=>Promise.resolve().then(function(){return Gp}),paperclip:()=>Promise.resolve().then(function(){return Xp}),passcode:()=>Promise.resolve().then(function(){return eg}),passport:()=>Promise.resolve().then(function(){return sg}),pause:()=>Promise.resolve().then(function(){return ag}),pencil:()=>Promise.resolve().then(function(){return ng}),"pending-circle":()=>Promise.resolve().then(function(){return lg}),"person-dash":()=>Promise.resolve().then(function(){return cg}),"person-plus":()=>Promise.resolve().then(function(){return pg}),"person-x":()=>Promise.resolve().then(function(){return ug}),person:()=>Promise.resolve().then(function(){return mg}),phone:()=>Promise.resolve().then(function(){return bg}),"pin-map-fill":()=>Promise.resolve().then(function(){return yg}),pin:()=>Promise.resolve().then(function(){return _g}),placeholder:()=>Promise.resolve().then(function(){return Cg}),plane:()=>Promise.resolve().then(function(){return Sg}),play:()=>Promise.resolve().then(function(){return Zg}),"plus-circle":()=>Promise.resolve().then(function(){return Vg}),"plus-square":()=>Promise.resolve().then(function(){return Ag}),plus:()=>Promise.resolve().then(function(){return Ig}),printer:()=>Promise.resolve().then(function(){return Eg}),"question-circle":()=>Promise.resolve().then(function(){return Hg}),rocket:()=>Promise.resolve().then(function(){return Tg}),save:()=>Promise.resolve().then(function(){return Fg}),search:()=>Promise.resolve().then(function(){return jg}),send:()=>Promise.resolve().then(function(){return qg}),"sg-crest":()=>Promise.resolve().then(function(){return Kg}),share:()=>Promise.resolve().then(function(){return Gg}),"shield-tick":()=>Promise.resolve().then(function(){return Xg}),"sidebar-collapse":()=>Promise.resolve().then(function(){return eu}),"sidebar-expand":()=>Promise.resolve().then(function(){return su}),"slash-circle":()=>Promise.resolve().then(function(){return au}),"slash-divider":()=>Promise.resolve().then(function(){return nu}),sliders:()=>Promise.resolve().then(function(){return lu}),"sort-ascending":()=>Promise.resolve().then(function(){return cu}),"sort-descending":()=>Promise.resolve().then(function(){return pu}),speedometer:()=>Promise.resolve().then(function(){return uu}),"star-ai":()=>Promise.resolve().then(function(){return mu}),"star-fill":()=>Promise.resolve().then(function(){return bu}),star:()=>Promise.resolve().then(function(){return yu}),stoplights:()=>Promise.resolve().then(function(){return _u}),sun:()=>Promise.resolve().then(function(){return Cu}),"switch-horizontal":()=>Promise.resolve().then(function(){return Su}),"switch-vertical":()=>Promise.resolve().then(function(){return Zu}),tablet:()=>Promise.resolve().then(function(){return Vu}),telegram:()=>Promise.resolve().then(function(){return Au}),telephone:()=>Promise.resolve().then(function(){return Iu}),"three-dots-vertical":()=>Promise.resolve().then(function(){return Eu}),"three-dots":()=>Promise.resolve().then(function(){return Hu}),ticket:()=>Promise.resolve().then(function(){return Tu}),"toggle-off":()=>Promise.resolve().then(function(){return Fu}),"toggle-on":()=>Promise.resolve().then(function(){return ju}),train:()=>Promise.resolve().then(function(){return qu}),translate:()=>Promise.resolve().then(function(){return Ku}),trash:()=>Promise.resolve().then(function(){return Gu}),"trend-down":()=>Promise.resolve().then(function(){return Xu}),"trend-up":()=>Promise.resolve().then(function(){return ev}),truck:()=>Promise.resolve().then(function(){return sv}),"twitter-x":()=>Promise.resolve().then(function(){return av}),unlock:()=>Promise.resolve().then(function(){return nv}),upload:()=>Promise.resolve().then(function(){return lv}),"user-check":()=>Promise.resolve().then(function(){return cv}),"user-circle":()=>Promise.resolve().then(function(){return pv}),"user-pause":()=>Promise.resolve().then(function(){return uv}),"user-square":()=>Promise.resolve().then(function(){return mv}),users:()=>Promise.resolve().then(function(){return bv}),"video-recorder":()=>Promise.resolve().then(function(){return yv}),"volume-max":()=>Promise.resolve().then(function(){return _v}),"volume-x":()=>Promise.resolve().then(function(){return Cv}),"window-dash":()=>Promise.resolve().then(function(){return Sv}),"window-desktop":()=>Promise.resolve().then(function(){return Zv}),"window-dock":()=>Promise.resolve().then(function(){return Vv}),"window-fullscreen":()=>Promise.resolve().then(function(){return Av}),"window-plus":()=>Promise.resolve().then(function(){return Iv}),"window-sidebar":()=>Promise.resolve().then(function(){return Ev}),"window-split":()=>Promise.resolve().then(function(){return Hv}),"window-stack":()=>Promise.resolve().then(function(){return Tv}),"window-x":()=>Promise.resolve().then(function(){return Fv}),window:()=>Promise.resolve().then(function(){return jv}),"xcircle-fill":()=>Promise.resolve().then(function(){return qv}),xcircle:()=>Promise.resolve().then(function(){return Kv}),youtube:()=>Promise.resolve().then(function(){return Gv}),"zoom-in":()=>Promise.resolve().then(function(){return Xv}),"zoom-out":()=>Promise.resolve().then(function(){return em})};var wt=n`:host{color:inherit;display:inline-flex;vertical-align:bottom}:host(.icon-left){margin-right:.25rem}:host(.icon-right){margin-left:.25rem}:host([size=xs]) svg{height:var(--sgds-icon-size-xs);width:var(--sgds-icon-size-xs)}:host([size=sm]) svg{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}:host([size=md]) svg{height:var(--sgds-icon-size-md);width:var(--sgds-icon-size-md)}:host([size=xl]) svg{height:var(--sgds-icon-size-xl);width:var(--sgds-icon-size-xl)}:host([size="2-xl"]) svg{height:var(--sgds-icon-size-2-xl);width:var(--sgds-icon-size-2-xl)}:host([size="3-xl"]) svg{height:var(--sgds-icon-size-3-xl);width:var(--sgds-icon-size-3-xl)}svg{display:inline-block;height:var(--sgds-icon-size-lg);width:var(--sgds-icon-size-lg)}`;const yt=new Map;class xt extends He{constructor(){super(...arguments),this.size="lg"}willUpdate(e){e.has("name")&&this._loadIcon(this.name)}async _loadIcon(e){if(!e)return void(this._icon=void 0);if(yt.has(e))return void(this._icon=yt.get(e));const t=bt[e];if(!t)return console.warn(`Icon not found: ${e}`),void(this._icon=void 0);try{const s=await t();yt.set(e,s.default),this._icon=s.default}catch(t){console.warn(`Failed to load icon: ${e}`),this._icon=void 0}}updated(){var e;const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("svg");t&&(this.ariaLabel?(t.removeAttribute("aria-hidden"),t.setAttribute("aria-label",this.ariaLabel)):(t.removeAttribute("aria-label"),t.setAttribute("aria-hidden","true")))}render(){var e;return null!==(e=this._icon)&&void 0!==e?e:ie}}xt.styles=[...He.styles,wt],e([ze({type:String,reflect:!0})],xt.prototype,"name",void 0),e([ze({type:String,reflect:!0})],xt.prototype,"size",void 0),e([ze({type:String})],xt.prototype,"ariaLabel",void 0),e([Ve()],xt.prototype,"_icon",void 0);var _t=n`:host([variant=success]) .alert{background-color:var(--sgds-success-surface-default)}:host([variant=warning]) .alert{--sgds-alert-color:var(--sgds-color-fixed-dark);background-color:var(--sgds-warning-surface-default)}:host([variant=danger]) .alert{background-color:var(--sgds-danger-surface-default)}:host([variant=neutral]) .alert{background-color:var(--sgds-neutral-surface-emphasis)}:host([variant=success][outlined]) .alert{background-color:var(--sgds-success-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-success-border-color-muted)}:host([variant=warning][outlined]) .alert{background-color:var(--sgds-warning-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-warning-border-color-muted)}:host([variant=danger][outlined]) .alert{background-color:var(--sgds-danger-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-danger-border-color-muted)}:host([variant=neutral][outlined]) .alert{background-color:var(--sgds-neutral-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-neutral-border-color-muted)}:host([outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-primary-color-fixed-dark)}:host([variant=success][outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-success-color-fixed-dark)}:host([variant=warning][outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-warning-color-fixed-light)}:host([variant=danger][outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-danger-color-fixed-dark)}:host([variant=neutral][outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-color-fixed-dark)}.alert{--sgds-alert-color:var(--sgds-color-fixed-light);background-color:var(--sgds-primary-surface-default);border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-border-radius-md);color:var(--sgds-alert-color);display:flex;flex-direction:row;gap:var(--sgds-gap-sm);padding:var(--sgds-padding-lg);position:relative}.alert.outlined{--sgds-alert-color:var(--sgds-color-fixed-dark);background-color:var(--sgds-primary-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-primary-border-color-muted)}.alert-content{align-items:flex-start;display:flex;flex:1 0 0;flex-direction:column;gap:var(--sgds-gap-md);padding-right:var(--sgds-padding-2-xl)}.alert-content__upper{display:flex;flex-direction:column;gap:var(--sgds-gap-2-xs)}.alert-title{font-size:var(--sgds-font-size-subtitle-sm);font-style:normal;font-weight:var(--sgds-font-weight-semibold);line-height:var(--sgds-line-height-2-xs)}.alert-content__description{display:inline;font-size:var(--sgds-font-size-label-sm);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-2-xs)}.alert-content__description::slotted(*){font-size:var(--sgds-font-size-label-sm);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-2-xs)}.alert-content__description::slotted(a),.alert-content__description::slotted(a:hover){color:inherit!important}.alert-content__description::slotted(a:focus-visible){outline:var(--sgds-outline-focus)!important;outline-offset:var(--sgds-outline-offset-focus)!important}.alert sgds-close-button{position:absolute;right:14px;top:14px}`;class kt extends He{constructor(){super(...arguments),this.show=!1,this.dismissible=!1,this.variant="info",this.outlined=!1,this.title=""}close(){this.show=!1}_handleShowChange(){this.show?this.emit("sgds-show"):this.emit("sgds-hide")}render(){return this.dismissible&&this.show||!this.dismissible?ut`
|
|
114
|
+
`}}ft.styles=[...He.styles,mt],e([ze({type:String,reflect:!0})],ft.prototype,"size",void 0),e([ze({type:String,reflect:!0})],ft.prototype,"tone",void 0),e([ze({type:Boolean,reflect:!0})],ft.prototype,"disabled",void 0);const bt={announcement:()=>Promise.resolve().then(function(){return qr}),archive:()=>Promise.resolve().then(function(){return Kr}),"arrow-bar-down":()=>Promise.resolve().then(function(){return Gr}),"arrow-bar-left":()=>Promise.resolve().then(function(){return Xr}),"arrow-bar-right":()=>Promise.resolve().then(function(){return el}),"arrow-bar-up":()=>Promise.resolve().then(function(){return sl}),"arrow-circle-down":()=>Promise.resolve().then(function(){return al}),"arrow-circle-left":()=>Promise.resolve().then(function(){return nl}),"arrow-circle-right":()=>Promise.resolve().then(function(){return ll}),"arrow-circle-up":()=>Promise.resolve().then(function(){return cl}),"arrow-clockwise":()=>Promise.resolve().then(function(){return pl}),"arrow-down":()=>Promise.resolve().then(function(){return ul}),"arrow-left":()=>Promise.resolve().then(function(){return ml}),"arrow-repeat":()=>Promise.resolve().then(function(){return bl}),"arrow-right":()=>Promise.resolve().then(function(){return yl}),"arrow-square-down":()=>Promise.resolve().then(function(){return _l}),"arrow-square-left":()=>Promise.resolve().then(function(){return Cl}),"arrow-square-right":()=>Promise.resolve().then(function(){return Sl}),"arrow-square-up":()=>Promise.resolve().then(function(){return Zl}),"arrow-up":()=>Promise.resolve().then(function(){return Vl}),"bank-fill":()=>Promise.resolve().then(function(){return Al}),"bell-slash":()=>Promise.resolve().then(function(){return Dl}),bell:()=>Promise.resolve().then(function(){return El}),"bi-funnel":()=>Promise.resolve().then(function(){return Hl}),"bookmark-fill":()=>Promise.resolve().then(function(){return Tl}),bookmark:()=>Promise.resolve().then(function(){return Fl}),"box-arrow-up-right":()=>Promise.resolve().then(function(){return jl}),"box-seam":()=>Promise.resolve().then(function(){return ql}),building:()=>Promise.resolve().then(function(){return Kl}),bus:()=>Promise.resolve().then(function(){return Gl}),calculator:()=>Promise.resolve().then(function(){return Xl}),"calendar-check":()=>Promise.resolve().then(function(){return ed}),"calendar-heart":()=>Promise.resolve().then(function(){return sd}),"calendar-x":()=>Promise.resolve().then(function(){return ad}),calendar:()=>Promise.resolve().then(function(){return nd}),camera:()=>Promise.resolve().then(function(){return ld}),car:()=>Promise.resolve().then(function(){return cd}),"chat-dots":()=>Promise.resolve().then(function(){return pd}),"chat-left-text":()=>Promise.resolve().then(function(){return ud}),chat:()=>Promise.resolve().then(function(){return md}),"check-circle-fill":()=>Promise.resolve().then(function(){return bd}),"check-circle":()=>Promise.resolve().then(function(){return yd}),check:()=>Promise.resolve().then(function(){return _d}),"chevron-down":()=>Promise.resolve().then(function(){return Cd}),"chevron-left":()=>Promise.resolve().then(function(){return Sd}),"chevron-right":()=>Promise.resolve().then(function(){return Zd}),"chevron-selector-vertical":()=>Promise.resolve().then(function(){return Vd}),"chevron-up":()=>Promise.resolve().then(function(){return Ad}),clock:()=>Promise.resolve().then(function(){return Dd}),"cloud-check":()=>Promise.resolve().then(function(){return Ed}),"cloud-download":()=>Promise.resolve().then(function(){return Hd}),"cloud-upload":()=>Promise.resolve().then(function(){return Td}),cloud:()=>Promise.resolve().then(function(){return Fd}),"code-square":()=>Promise.resolve().then(function(){return jd}),"coins-hand":()=>Promise.resolve().then(function(){return qd}),compass:()=>Promise.resolve().then(function(){return Kd}),copy:()=>Promise.resolve().then(function(){return Gd}),"cpu-chip-ai":()=>Promise.resolve().then(function(){return Xd}),cross:()=>Promise.resolve().then(function(){return ec}),"cursor-fill":()=>Promise.resolve().then(function(){return sc}),cursor:()=>Promise.resolve().then(function(){return ac}),"dash-circle":()=>Promise.resolve().then(function(){return nc}),"dash-square":()=>Promise.resolve().then(function(){return lc}),dash:()=>Promise.resolve().then(function(){return cc}),database:()=>Promise.resolve().then(function(){return pc}),dataflow:()=>Promise.resolve().then(function(){return uc}),download:()=>Promise.resolve().then(function(){return mc}),edit:()=>Promise.resolve().then(function(){return bc}),"exclamation-circle-fill":()=>Promise.resolve().then(function(){return yc}),"exclamation-circle":()=>Promise.resolve().then(function(){return _c}),"exclamation-triangle-fill":()=>Promise.resolve().then(function(){return Cc}),"exclamation-triangle":()=>Promise.resolve().then(function(){return Sc}),exclamation:()=>Promise.resolve().then(function(){return Zc}),"eye-fill":()=>Promise.resolve().then(function(){return Vc}),"eye-slash-fill":()=>Promise.resolve().then(function(){return Ac}),"eye-slash":()=>Promise.resolve().then(function(){return Dc}),eye:()=>Promise.resolve().then(function(){return Ec}),"face-smile-fill":()=>Promise.resolve().then(function(){return Hc}),"face-smile":()=>Promise.resolve().then(function(){return Tc}),facebook:()=>Promise.resolve().then(function(){return Fc}),"file-earmark-text":()=>Promise.resolve().then(function(){return jc}),"file-pdf":()=>Promise.resolve().then(function(){return qc}),"file-plus":()=>Promise.resolve().then(function(){return Kc}),"file-text":()=>Promise.resolve().then(function(){return Gc}),file:()=>Promise.resolve().then(function(){return Xc}),files:()=>Promise.resolve().then(function(){return eh}),fingerprint:()=>Promise.resolve().then(function(){return sh}),flash:()=>Promise.resolve().then(function(){return ah}),"folder-check":()=>Promise.resolve().then(function(){return nh}),"folder-minus":()=>Promise.resolve().then(function(){return lh}),"folder-plus":()=>Promise.resolve().then(function(){return ch}),folder:()=>Promise.resolve().then(function(){return ph}),gear:()=>Promise.resolve().then(function(){return uh}),"geo-alt":()=>Promise.resolve().then(function(){return mh}),"geo-fill":()=>Promise.resolve().then(function(){return bh}),geo:()=>Promise.resolve().then(function(){return yh}),"globe-alt":()=>Promise.resolve().then(function(){return _h}),globe:()=>Promise.resolve().then(function(){return Ch}),google:()=>Promise.resolve().then(function(){return Sh}),"grid-alt":()=>Promise.resolve().then(function(){return Zh}),"grid-fill":()=>Promise.resolve().then(function(){return Vh}),"hand-thumbs-down":()=>Promise.resolve().then(function(){return Ah}),"hand-thumbs-up":()=>Promise.resolve().then(function(){return Dh}),"hard-drive":()=>Promise.resolve().then(function(){return Eh}),heart:()=>Promise.resolve().then(function(){return Hh}),"house-door":()=>Promise.resolve().then(function(){return Th}),house:()=>Promise.resolve().then(function(){return Fh}),image:()=>Promise.resolve().then(function(){return jh}),"in-box":()=>Promise.resolve().then(function(){return qh}),"info-circle-fill":()=>Promise.resolve().then(function(){return Kh}),"info-circle":()=>Promise.resolve().then(function(){return Gh}),instagram:()=>Promise.resolve().then(function(){return Xh}),key:()=>Promise.resolve().then(function(){return ep}),"laptop-gear":()=>Promise.resolve().then(function(){return sp}),laptop:()=>Promise.resolve().then(function(){return ap}),layers:()=>Promise.resolve().then(function(){return np}),"layout-text-window-reverse":()=>Promise.resolve().then(function(){return lp}),"layout-text-window":()=>Promise.resolve().then(function(){return cp}),layout:()=>Promise.resolve().then(function(){return pp}),"life-buoy":()=>Promise.resolve().then(function(){return up}),lightbulb:()=>Promise.resolve().then(function(){return mp}),link:()=>Promise.resolve().then(function(){return bp}),linkedin:()=>Promise.resolve().then(function(){return yp}),list:()=>Promise.resolve().then(function(){return _p}),"lock-fill":()=>Promise.resolve().then(function(){return Cp}),lock:()=>Promise.resolve().then(function(){return Sp}),login:()=>Promise.resolve().then(function(){return Zp}),logout:()=>Promise.resolve().then(function(){return Vp}),luggage:()=>Promise.resolve().then(function(){return Ap}),"mail-open":()=>Promise.resolve().then(function(){return Dp}),mail:()=>Promise.resolve().then(function(){return Ep}),map:()=>Promise.resolve().then(function(){return Hp}),meetup:()=>Promise.resolve().then(function(){return Tp}),menu:()=>Promise.resolve().then(function(){return Fp}),microphone:()=>Promise.resolve().then(function(){return jp}),monitor:()=>Promise.resolve().then(function(){return qp}),moon:()=>Promise.resolve().then(function(){return Kp}),move:()=>Promise.resolve().then(function(){return Gp}),paperclip:()=>Promise.resolve().then(function(){return Xp}),passcode:()=>Promise.resolve().then(function(){return eg}),passport:()=>Promise.resolve().then(function(){return sg}),pause:()=>Promise.resolve().then(function(){return ag}),pencil:()=>Promise.resolve().then(function(){return ng}),"pending-circle":()=>Promise.resolve().then(function(){return lg}),"person-dash":()=>Promise.resolve().then(function(){return cg}),"person-plus":()=>Promise.resolve().then(function(){return pg}),"person-x":()=>Promise.resolve().then(function(){return ug}),person:()=>Promise.resolve().then(function(){return mg}),phone:()=>Promise.resolve().then(function(){return bg}),"pin-map-fill":()=>Promise.resolve().then(function(){return yg}),pin:()=>Promise.resolve().then(function(){return _g}),placeholder:()=>Promise.resolve().then(function(){return Cg}),plane:()=>Promise.resolve().then(function(){return Sg}),play:()=>Promise.resolve().then(function(){return Zg}),"plus-circle":()=>Promise.resolve().then(function(){return Vg}),"plus-square":()=>Promise.resolve().then(function(){return Ag}),plus:()=>Promise.resolve().then(function(){return Dg}),printer:()=>Promise.resolve().then(function(){return Eg}),"question-circle":()=>Promise.resolve().then(function(){return Hg}),rocket:()=>Promise.resolve().then(function(){return Tg}),save:()=>Promise.resolve().then(function(){return Fg}),search:()=>Promise.resolve().then(function(){return jg}),send:()=>Promise.resolve().then(function(){return qg}),"sg-crest":()=>Promise.resolve().then(function(){return Kg}),share:()=>Promise.resolve().then(function(){return Gg}),"shield-tick":()=>Promise.resolve().then(function(){return Xg}),"sidebar-collapse":()=>Promise.resolve().then(function(){return eu}),"sidebar-expand":()=>Promise.resolve().then(function(){return su}),"slash-circle":()=>Promise.resolve().then(function(){return au}),"slash-divider":()=>Promise.resolve().then(function(){return nu}),sliders:()=>Promise.resolve().then(function(){return lu}),"sort-ascending":()=>Promise.resolve().then(function(){return cu}),"sort-descending":()=>Promise.resolve().then(function(){return pu}),speedometer:()=>Promise.resolve().then(function(){return uu}),"star-ai":()=>Promise.resolve().then(function(){return mu}),"star-fill":()=>Promise.resolve().then(function(){return bu}),star:()=>Promise.resolve().then(function(){return yu}),stoplights:()=>Promise.resolve().then(function(){return _u}),sun:()=>Promise.resolve().then(function(){return Cu}),"switch-horizontal":()=>Promise.resolve().then(function(){return Su}),"switch-vertical":()=>Promise.resolve().then(function(){return Zu}),tablet:()=>Promise.resolve().then(function(){return Vu}),telegram:()=>Promise.resolve().then(function(){return Au}),telephone:()=>Promise.resolve().then(function(){return Du}),"three-dots-vertical":()=>Promise.resolve().then(function(){return Eu}),"three-dots":()=>Promise.resolve().then(function(){return Hu}),ticket:()=>Promise.resolve().then(function(){return Tu}),"toggle-off":()=>Promise.resolve().then(function(){return Fu}),"toggle-on":()=>Promise.resolve().then(function(){return ju}),train:()=>Promise.resolve().then(function(){return qu}),translate:()=>Promise.resolve().then(function(){return Ku}),trash:()=>Promise.resolve().then(function(){return Gu}),"trend-down":()=>Promise.resolve().then(function(){return Xu}),"trend-up":()=>Promise.resolve().then(function(){return ev}),truck:()=>Promise.resolve().then(function(){return sv}),"twitter-x":()=>Promise.resolve().then(function(){return av}),unlock:()=>Promise.resolve().then(function(){return nv}),upload:()=>Promise.resolve().then(function(){return lv}),"user-check":()=>Promise.resolve().then(function(){return cv}),"user-circle":()=>Promise.resolve().then(function(){return pv}),"user-pause":()=>Promise.resolve().then(function(){return uv}),"user-square":()=>Promise.resolve().then(function(){return mv}),users:()=>Promise.resolve().then(function(){return bv}),"video-recorder":()=>Promise.resolve().then(function(){return yv}),"volume-max":()=>Promise.resolve().then(function(){return _v}),"volume-x":()=>Promise.resolve().then(function(){return Cv}),"window-dash":()=>Promise.resolve().then(function(){return Sv}),"window-desktop":()=>Promise.resolve().then(function(){return Zv}),"window-dock":()=>Promise.resolve().then(function(){return Vv}),"window-fullscreen":()=>Promise.resolve().then(function(){return Av}),"window-plus":()=>Promise.resolve().then(function(){return Dv}),"window-sidebar":()=>Promise.resolve().then(function(){return Ev}),"window-split":()=>Promise.resolve().then(function(){return Hv}),"window-stack":()=>Promise.resolve().then(function(){return Tv}),"window-x":()=>Promise.resolve().then(function(){return Fv}),window:()=>Promise.resolve().then(function(){return jv}),"xcircle-fill":()=>Promise.resolve().then(function(){return qv}),xcircle:()=>Promise.resolve().then(function(){return Kv}),youtube:()=>Promise.resolve().then(function(){return Gv}),"zoom-in":()=>Promise.resolve().then(function(){return Xv}),"zoom-out":()=>Promise.resolve().then(function(){return em})};var wt=n`:host{color:inherit;display:inline-flex;vertical-align:bottom}:host(.icon-left){margin-right:.25rem}:host(.icon-right){margin-left:.25rem}:host([size=xs]) svg{height:var(--sgds-icon-size-xs);width:var(--sgds-icon-size-xs)}:host([size=sm]) svg{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}:host([size=md]) svg{height:var(--sgds-icon-size-md);width:var(--sgds-icon-size-md)}:host([size=xl]) svg{height:var(--sgds-icon-size-xl);width:var(--sgds-icon-size-xl)}:host([size="2-xl"]) svg{height:var(--sgds-icon-size-2-xl);width:var(--sgds-icon-size-2-xl)}:host([size="3-xl"]) svg{height:var(--sgds-icon-size-3-xl);width:var(--sgds-icon-size-3-xl)}svg{display:inline-block;height:var(--sgds-icon-size-lg);width:var(--sgds-icon-size-lg)}`;const yt=new Map;class xt extends He{constructor(){super(...arguments),this.size="lg"}willUpdate(e){e.has("name")&&this._loadIcon(this.name)}async _loadIcon(e){if(!e)return void(this._icon=void 0);if(yt.has(e))return void(this._icon=yt.get(e));const t=bt[e];if(!t)return console.warn(`Icon not found: ${e}`),void(this._icon=void 0);try{const s=await t();yt.set(e,s.default),this._icon=s.default}catch(t){console.warn(`Failed to load icon: ${e}`),this._icon=void 0}}updated(){var e;const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("svg");t&&(this.ariaLabel?(t.removeAttribute("aria-hidden"),t.setAttribute("aria-label",this.ariaLabel)):(t.removeAttribute("aria-label"),t.setAttribute("aria-hidden","true")))}render(){var e;return null!==(e=this._icon)&&void 0!==e?e:ie}}xt.styles=[...He.styles,wt],e([ze({type:String,reflect:!0})],xt.prototype,"name",void 0),e([ze({type:String,reflect:!0})],xt.prototype,"size",void 0),e([ze({type:String})],xt.prototype,"ariaLabel",void 0),e([Ve()],xt.prototype,"_icon",void 0);var _t=n`:host([variant=success]) .alert{background-color:var(--sgds-success-surface-default)}:host([variant=warning]) .alert{--sgds-alert-color:var(--sgds-color-fixed-dark);background-color:var(--sgds-warning-surface-default)}:host([variant=danger]) .alert{background-color:var(--sgds-danger-surface-default)}:host([variant=neutral]) .alert{background-color:var(--sgds-neutral-surface-emphasis)}:host([variant=success][outlined]) .alert{background-color:var(--sgds-success-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-success-border-color-muted)}:host([variant=warning][outlined]) .alert{background-color:var(--sgds-warning-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-warning-border-color-muted)}:host([variant=danger][outlined]) .alert{background-color:var(--sgds-danger-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-danger-border-color-muted)}:host([variant=neutral][outlined]) .alert{background-color:var(--sgds-neutral-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-neutral-border-color-muted)}:host([outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-primary-color-fixed-dark)}:host([variant=success][outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-success-color-fixed-dark)}:host([variant=warning][outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-warning-color-fixed-light)}:host([variant=danger][outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-danger-color-fixed-dark)}:host([variant=neutral][outlined]) .alert-icon__outlined::slotted(*){color:var(--sgds-color-fixed-dark)}.alert{--sgds-alert-color:var(--sgds-color-fixed-light);background-color:var(--sgds-primary-surface-default);border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-border-radius-md);color:var(--sgds-alert-color);display:flex;flex-direction:row;gap:var(--sgds-gap-sm);padding:var(--sgds-padding-lg);position:relative}.alert.outlined{--sgds-alert-color:var(--sgds-color-fixed-dark);background-color:var(--sgds-primary-surface-muted);border:var(--sgds-border-width-1) solid var(--sgds-primary-border-color-muted)}.alert-content{align-items:flex-start;display:flex;flex:1 0 0;flex-direction:column;gap:var(--sgds-gap-md);padding-right:var(--sgds-padding-2-xl)}.alert-content__upper{display:flex;flex-direction:column;gap:var(--sgds-gap-2-xs)}.alert-title{font-size:var(--sgds-font-size-subtitle-sm);font-style:normal;font-weight:var(--sgds-font-weight-semibold);line-height:var(--sgds-line-height-2-xs)}.alert-content__description{display:inline;font-size:var(--sgds-font-size-label-sm);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-2-xs)}.alert-content__description::slotted(*){font-size:var(--sgds-font-size-label-sm);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-2-xs)}.alert-content__description::slotted(a),.alert-content__description::slotted(a:hover){color:inherit!important}.alert-content__description::slotted(a:focus-visible){outline:var(--sgds-outline-focus)!important;outline-offset:var(--sgds-outline-offset-focus)!important}.alert sgds-close-button{position:absolute;right:14px;top:14px}`;class kt extends He{constructor(){super(...arguments),this.show=!1,this.dismissible=!1,this.variant="info",this.outlined=!1,this.title=""}close(){this.show=!1}_handleShowChange(){this.show?this.emit("sgds-show"):this.emit("sgds-hide")}render(){return this.dismissible&&this.show||!this.dismissible?ut`
|
|
115
115
|
<div
|
|
116
116
|
class="${Ke({alert:!0,show:this.show,"alert-dismissible":this.dismissible,outlined:this.outlined})}"
|
|
117
117
|
role="alert"
|
|
@@ -138,17 +138,17 @@ const ct=Symbol.for(""),ht=e=>{if(e?.r===ct)return e?._$litStatic$},pt=(e,...t)=
|
|
|
138
138
|
* @license
|
|
139
139
|
* Copyright 2020 Google LLC
|
|
140
140
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
141
|
-
*/;const{_ChildPart:Zt}=be,zt=window.ShadyDOM?.inUse&&!0===window.ShadyDOM?.noPatch?window.ShadyDOM.wrap:e=>e,Vt=e=>void 0===e.strings,Pt=()=>document.createComment(""),At=(e,t,s)=>{const i=zt(e._$startNode).parentNode,a=void 0===t?e._$endNode:t._$startNode;if(void 0===s){const t=zt(i).insertBefore(Pt(),a),o=zt(i).insertBefore(Pt(),a);s=new Zt(t,o,e,e.options)}else{const t=zt(s._$endNode).nextSibling,o=s._$parent,n=o!==e;if(n){let t;s._$reparentDisconnectables?.(e),s._$parent=e,void 0!==s._$notifyConnectionChanged&&(t=e._$isConnected)!==o._$isConnected&&s._$notifyConnectionChanged(t)}if(t!==a||n){let e=s._$startNode;for(;e!==t;){const t=zt(e).nextSibling;zt(i).insertBefore(e,a),e=t}}}return s},Lt=(e,t,s=e)=>(e._$setValue(t,s),e),
|
|
141
|
+
*/;const{_ChildPart:Zt}=be,zt=window.ShadyDOM?.inUse&&!0===window.ShadyDOM?.noPatch?window.ShadyDOM.wrap:e=>e,Vt=e=>void 0===e.strings,Pt=()=>document.createComment(""),At=(e,t,s)=>{const i=zt(e._$startNode).parentNode,a=void 0===t?e._$endNode:t._$startNode;if(void 0===s){const t=zt(i).insertBefore(Pt(),a),o=zt(i).insertBefore(Pt(),a);s=new Zt(t,o,e,e.options)}else{const t=zt(s._$endNode).nextSibling,o=s._$parent,n=o!==e;if(n){let t;s._$reparentDisconnectables?.(e),s._$parent=e,void 0!==s._$notifyConnectionChanged&&(t=e._$isConnected)!==o._$isConnected&&s._$notifyConnectionChanged(t)}if(t!==a||n){let e=s._$startNode;for(;e!==t;){const t=zt(e).nextSibling;zt(i).insertBefore(e,a),e=t}}}return s},Lt=(e,t,s=e)=>(e._$setValue(t,s),e),Dt={},It=(e,t=Dt)=>e._$committedValue=t,Et=e=>{e._$clear(),e._$startNode.remove()},Bt=(e,t)=>{const s=e._$disconnectableChildren;if(void 0===s)return!1;for(const e of s)e._$notifyDirectiveConnectionChanged?.(t,!1),Bt(e,t);return!0},Ht=e=>{let t,s;do{if(void 0===(t=e._$parent))break;s=t._$disconnectableChildren,s.delete(e),e=t}while(0===s?.size)},Ot=e=>{for(let t;t=e._$parent;e=t){let s=t._$disconnectableChildren;if(void 0===s)t._$disconnectableChildren=s=new Set;else if(s.has(e))break;s.add(e),Ft(t)}};function Tt(e){void 0!==this._$disconnectableChildren?(Ht(this),this._$parent=e,Ot(this)):this._$parent=e}function Rt(e,t=!1,s=0){const i=this._$committedValue,a=this._$disconnectableChildren;if(void 0!==a&&0!==a.size)if(t)if(Array.isArray(i))for(let e=s;e<i.length;e++)Bt(i[e],!1),Ht(i[e]);else null!=i&&(Bt(i,!1),Ht(i));else Bt(this,e)}const Ft=e=>{e.type==Ne&&(e._$notifyConnectionChanged??=Rt,e._$reparentDisconnectables??=Tt)};class Nt extends Ye{constructor(){super(...arguments),this._$disconnectableChildren=void 0}_$initialize(e,t,s){super._$initialize(e,t,s),Ot(this),this.isConnected=e._$isConnected}_$notifyDirectiveConnectionChanged(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(Bt(this,e),Ht(this))}setValue(e){if(Vt(this.__part))this.__part._$setValue(e,this);else{if(void 0===this.__attributeIndex)throw new Error("Expected this.__attributeIndex to be a number");const t=[...this.__part._$committedValue];t[this.__attributeIndex]=e,this.__part._$setValue(t,this,0)}}disconnected(){}reconnected(){}}
|
|
142
142
|
/**
|
|
143
143
|
* @license
|
|
144
144
|
* Copyright 2020 Google LLC
|
|
145
145
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
146
|
-
*/const jt=()=>new Ut;class Ut{}const qt=new WeakMap;const Yt=qe(class extends Nt{render(e){return ie}update(e,[t]){const s=t!==this._ref;return s&&void 0!==this._ref&&this._updateRefValue(void 0),(s||this._lastElementForRef!==this._element)&&(this._ref=t,this._context=e.options?.host,this._updateRefValue(this._element=e.element)),ie}_updateRefValue(e){if(this.isConnected||(e=void 0),"function"==typeof this._ref){const t=this._context??globalThis;let s=qt.get(t);void 0===s&&(s=new WeakMap,qt.set(t,s)),void 0!==s.get(this._ref)&&this._ref.call(this._context,void 0),s.set(this._ref,e),void 0!==e&&this._ref.call(this._context,e)}else this._ref.value=e}get _lastElementForRef(){return"function"==typeof this._ref?qt.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),Kt=["top","right","bottom","left"],Wt=Math.min,Gt=Math.max,Jt=Math.round,Xt=Math.floor,Qt=e=>({x:e,y:e}),es={left:"right",right:"left",bottom:"top",top:"bottom"},ts={start:"end",end:"start"};function ss(e,t,s){return Gt(e,Wt(t,s))}function is(e,t){return"function"==typeof e?e(t):e}function as(e){return e.split("-")[0]}function os(e){return e.split("-")[1]}function ns(e){return"x"===e?"y":"x"}function rs(e){return"y"===e?"height":"width"}const ls=new Set(["top","bottom"]);function ds(e){return ls.has(as(e))?"y":"x"}function cs(e){return ns(ds(e))}function hs(e,t,s){void 0===s&&(s=!1);const i=os(e),a=cs(e),o=rs(a);let n="x"===a?i===(s?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[o]>t.floating[o]&&(n=bs(n)),[n,bs(n)]}function ps(e){return e.replace(/start|end/g,e=>ts[e])}const gs=["left","right"],us=["right","left"],vs=["top","bottom"],ms=["bottom","top"];function fs(e,t,s,i){const a=os(e);let o=function(e,t,s){switch(e){case"top":case"bottom":return s?t?us:gs:t?gs:us;case"left":case"right":return t?vs:ms;default:return[]}}(as(e),"start"===s,i);return a&&(o=o.map(e=>e+"-"+a),t&&(o=o.concat(o.map(ps)))),o}function bs(e){return e.replace(/left|right|bottom|top/g,e=>es[e])}function ws(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function ys(e){const{x:t,y:s,width:i,height:a}=e;return{width:i,height:a,top:s,left:t,right:t+i,bottom:s+a,x:t,y:s}}function xs(e,t,s){let{reference:i,floating:a}=e;const o=ds(t),n=cs(t),r=rs(n),l=as(t),d="y"===o,c=i.x+i.width/2-a.width/2,h=i.y+i.height/2-a.height/2,p=i[r]/2-a[r]/2;let g;switch(l){case"top":g={x:c,y:i.y-a.height};break;case"bottom":g={x:c,y:i.y+i.height};break;case"right":g={x:i.x+i.width,y:h};break;case"left":g={x:i.x-a.width,y:h};break;default:g={x:i.x,y:i.y}}switch(os(t)){case"start":g[n]-=p*(s&&d?-1:1);break;case"end":g[n]+=p*(s&&d?-1:1)}return g}async function _s(e,t){var s;void 0===t&&(t={});const{x:i,y:a,platform:o,rects:n,elements:r,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:p=!1,padding:g=0}=is(t,e),u=ws(g),v=r[p?"floating"===h?"reference":"floating":h],m=ys(await o.getClippingRect({element:null==(s=await(null==o.isElement?void 0:o.isElement(v)))||s?v:v.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(r.floating)),boundary:d,rootBoundary:c,strategy:l})),f="floating"===h?{x:i,y:a,width:n.floating.width,height:n.floating.height}:n.reference,b=await(null==o.getOffsetParent?void 0:o.getOffsetParent(r.floating)),w=await(null==o.isElement?void 0:o.isElement(b))&&await(null==o.getScale?void 0:o.getScale(b))||{x:1,y:1},y=ys(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:f,offsetParent:b,strategy:l}):f);return{top:(m.top-y.top+u.top)/w.y,bottom:(y.bottom-m.bottom+u.bottom)/w.y,left:(m.left-y.left+u.left)/w.x,right:(y.right-m.right+u.right)/w.x}}function ks(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Cs(e){return Kt.some(t=>e[t]>=0)}const $s=new Set(["left","top"]);function Ss(){return"undefined"!=typeof window}function Ms(e){return Vs(e)?(e.nodeName||"").toLowerCase():"#document"}function Zs(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function zs(e){var t;return null==(t=(Vs(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Vs(e){return!!Ss()&&(e instanceof Node||e instanceof Zs(e).Node)}function Ps(e){return!!Ss()&&(e instanceof Element||e instanceof Zs(e).Element)}function As(e){return!!Ss()&&(e instanceof HTMLElement||e instanceof Zs(e).HTMLElement)}function Ls(e){return!(!Ss()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Zs(e).ShadowRoot)}const Is=new Set(["inline","contents"]);function Ds(e){const{overflow:t,overflowX:s,overflowY:i,display:a}=Ys(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+s)&&!Is.has(a)}const Es=new Set(["table","td","th"]);function Bs(e){return Es.has(Ms(e))}const Hs=[":popover-open",":modal"];function Os(e){return Hs.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const Ts=["transform","translate","scale","rotate","perspective"],Rs=["transform","translate","scale","rotate","perspective","filter"],Fs=["paint","layout","strict","content"];function Ns(e){const t=js(),s=Ps(e)?Ys(e):e;return Ts.some(e=>!!s[e]&&"none"!==s[e])||!!s.containerType&&"normal"!==s.containerType||!t&&!!s.backdropFilter&&"none"!==s.backdropFilter||!t&&!!s.filter&&"none"!==s.filter||Rs.some(e=>(s.willChange||"").includes(e))||Fs.some(e=>(s.contain||"").includes(e))}function js(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Us=new Set(["html","body","#document"]);function qs(e){return Us.has(Ms(e))}function Ys(e){return Zs(e).getComputedStyle(e)}function Ks(e){return Ps(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ws(e){if("html"===Ms(e))return e;const t=e.assignedSlot||e.parentNode||Ls(e)&&e.host||zs(e);return Ls(t)?t.host:t}function Gs(e){const t=Ws(e);return qs(t)?e.ownerDocument?e.ownerDocument.body:e.body:As(t)&&Ds(t)?t:Gs(t)}function Js(e,t,s){var i;void 0===t&&(t=[]),void 0===s&&(s=!0);const a=Gs(e),o=a===(null==(i=e.ownerDocument)?void 0:i.body),n=Zs(a);if(o){const e=Xs(n);return t.concat(n,n.visualViewport||[],Ds(a)?a:[],e&&s?Js(e):[])}return t.concat(a,Js(a,[],s))}function Xs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Qs(e){const t=Ys(e);let s=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const a=As(e),o=a?e.offsetWidth:s,n=a?e.offsetHeight:i,r=Jt(s)!==o||Jt(i)!==n;return r&&(s=o,i=n),{width:s,height:i,$:r}}function ei(e){return Ps(e)?e:e.contextElement}function ti(e){const t=ei(e);if(!As(t))return Qt(1);const s=t.getBoundingClientRect(),{width:i,height:a,$:o}=Qs(t);let n=(o?Jt(s.width):s.width)/i,r=(o?Jt(s.height):s.height)/a;return n&&Number.isFinite(n)||(n=1),r&&Number.isFinite(r)||(r=1),{x:n,y:r}}const si=Qt(0);function ii(e){const t=Zs(e);return js()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:si}function ai(e,t,s,i){void 0===t&&(t=!1),void 0===s&&(s=!1);const a=e.getBoundingClientRect(),o=ei(e);let n=Qt(1);t&&(i?Ps(i)&&(n=ti(i)):n=ti(e));const r=function(e,t,s){return void 0===t&&(t=!1),!(!s||t&&s!==Zs(e))&&t}(o,s,i)?ii(o):Qt(0);let l=(a.left+r.x)/n.x,d=(a.top+r.y)/n.y,c=a.width/n.x,h=a.height/n.y;if(o){const e=Zs(o),t=i&&Ps(i)?Zs(i):i;let s=e,a=Xs(s);for(;a&&i&&t!==s;){const e=ti(a),t=a.getBoundingClientRect(),i=Ys(a),o=t.left+(a.clientLeft+parseFloat(i.paddingLeft))*e.x,n=t.top+(a.clientTop+parseFloat(i.paddingTop))*e.y;l*=e.x,d*=e.y,c*=e.x,h*=e.y,l+=o,d+=n,s=Zs(a),a=Xs(s)}}return ys({width:c,height:h,x:l,y:d})}function oi(e,t){const s=Ks(e).scrollLeft;return t?t.left+s:ai(zs(e)).left+s}function ni(e,t){const s=e.getBoundingClientRect();return{x:s.left+t.scrollLeft-oi(e,s),y:s.top+t.scrollTop}}const ri=new Set(["absolute","fixed"]);function li(e,t,s){let i;if("viewport"===t)i=function(e,t){const s=Zs(e),i=zs(e),a=s.visualViewport;let o=i.clientWidth,n=i.clientHeight,r=0,l=0;if(a){o=a.width,n=a.height;const e=js();(!e||e&&"fixed"===t)&&(r=a.offsetLeft,l=a.offsetTop)}const d=oi(i);if(d<=0){const e=i.ownerDocument,t=e.body,s=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(s.marginLeft)+parseFloat(s.marginRight)||0,n=Math.abs(i.clientWidth-t.clientWidth-a);n<=25&&(o-=n)}else d<=25&&(o+=d);return{width:o,height:n,x:r,y:l}}(e,s);else if("document"===t)i=function(e){const t=zs(e),s=Ks(e),i=e.ownerDocument.body,a=Gt(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=Gt(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let n=-s.scrollLeft+oi(e);const r=-s.scrollTop;return"rtl"===Ys(i).direction&&(n+=Gt(t.clientWidth,i.clientWidth)-a),{width:a,height:o,x:n,y:r}}(zs(e));else if(Ps(t))i=function(e,t){const s=ai(e,!0,"fixed"===t),i=s.top+e.clientTop,a=s.left+e.clientLeft,o=As(e)?ti(e):Qt(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:i*o.y}}(t,s);else{const s=ii(e);i={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ys(i)}function di(e,t){const s=Ws(e);return!(s===t||!Ps(s)||qs(s))&&("fixed"===Ys(s).position||di(s,t))}function ci(e,t,s){const i=As(t),a=zs(t),o="fixed"===s,n=ai(e,!0,o,t);let r={scrollLeft:0,scrollTop:0};const l=Qt(0);function d(){l.x=oi(a)}if(i||!i&&!o)if(("body"!==Ms(t)||Ds(a))&&(r=Ks(t)),i){const e=ai(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&d();o&&!i&&a&&d();const c=!a||i||o?Qt(0):ni(a,r);return{x:n.left+r.scrollLeft-l.x-c.x,y:n.top+r.scrollTop-l.y-c.y,width:n.width,height:n.height}}function hi(e){return"static"===Ys(e).position}function pi(e,t){if(!As(e)||"fixed"===Ys(e).position)return null;if(t)return t(e);let s=e.offsetParent;return zs(e)===s&&(s=s.ownerDocument.body),s}function gi(e,t){const s=Zs(e);if(Os(e))return s;if(!As(e)){let t=Ws(e);for(;t&&!qs(t);){if(Ps(t)&&!hi(t))return t;t=Ws(t)}return s}let i=pi(e,t);for(;i&&Bs(i)&&hi(i);)i=pi(i,t);return i&&qs(i)&&hi(i)&&!Ns(i)?s:i||function(e){let t=Ws(e);for(;As(t)&&!qs(t);){if(Ns(t))return t;if(Os(t))return null;t=Ws(t)}return null}(e)||s}const ui={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:s,offsetParent:i,strategy:a}=e;const o="fixed"===a,n=zs(i),r=!!t&&Os(t.floating);if(i===n||r&&o)return s;let l={scrollLeft:0,scrollTop:0},d=Qt(1);const c=Qt(0),h=As(i);if((h||!h&&!o)&&(("body"!==Ms(i)||Ds(n))&&(l=Ks(i)),As(i))){const e=ai(i);d=ti(i),c.x=e.x+i.clientLeft,c.y=e.y+i.clientTop}const p=!n||h||o?Qt(0):ni(n,l);return{width:s.width*d.x,height:s.height*d.y,x:s.x*d.x-l.scrollLeft*d.x+c.x+p.x,y:s.y*d.y-l.scrollTop*d.y+c.y+p.y}},getDocumentElement:zs,getClippingRect:function(e){let{element:t,boundary:s,rootBoundary:i,strategy:a}=e;const o=[..."clippingAncestors"===s?Os(t)?[]:function(e,t){const s=t.get(e);if(s)return s;let i=Js(e,[],!1).filter(e=>Ps(e)&&"body"!==Ms(e)),a=null;const o="fixed"===Ys(e).position;let n=o?Ws(e):e;for(;Ps(n)&&!qs(n);){const t=Ys(n),s=Ns(n);s||"fixed"!==t.position||(a=null),(o?!s&&!a:!s&&"static"===t.position&&a&&ri.has(a.position)||Ds(n)&&!s&&di(e,n))?i=i.filter(e=>e!==n):a=t,n=Ws(n)}return t.set(e,i),i}(t,this._c):[].concat(s),i],n=o[0],r=o.reduce((e,s)=>{const i=li(t,s,a);return e.top=Gt(i.top,e.top),e.right=Wt(i.right,e.right),e.bottom=Wt(i.bottom,e.bottom),e.left=Gt(i.left,e.left),e},li(t,n,a));return{width:r.right-r.left,height:r.bottom-r.top,x:r.left,y:r.top}},getOffsetParent:gi,getElementRects:async function(e){const t=this.getOffsetParent||gi,s=this.getDimensions,i=await s(e.floating);return{reference:ci(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:s}=Qs(e);return{width:t,height:s}},getScale:ti,isElement:Ps,isRTL:function(e){return"rtl"===Ys(e).direction}};function vi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mi(e,t,s,i){void 0===i&&(i={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:n="function"==typeof ResizeObserver,layoutShift:r="function"==typeof IntersectionObserver,animationFrame:l=!1}=i,d=ei(e),c=a||o?[...d?Js(d):[],...Js(t)]:[];c.forEach(e=>{a&&e.addEventListener("scroll",s,{passive:!0}),o&&e.addEventListener("resize",s)});const h=d&&r?function(e,t){let s,i=null;const a=zs(e);function o(){var e;clearTimeout(s),null==(e=i)||e.disconnect(),i=null}return function n(r,l){void 0===r&&(r=!1),void 0===l&&(l=1),o();const d=e.getBoundingClientRect(),{left:c,top:h,width:p,height:g}=d;if(r||t(),!p||!g)return;const u={rootMargin:-Xt(h)+"px "+-Xt(a.clientWidth-(c+p))+"px "+-Xt(a.clientHeight-(h+g))+"px "+-Xt(c)+"px",threshold:Gt(0,Wt(1,l))||1};let v=!0;function m(t){const i=t[0].intersectionRatio;if(i!==l){if(!v)return n();i?n(!1,i):s=setTimeout(()=>{n(!1,1e-7)},1e3)}1!==i||vi(d,e.getBoundingClientRect())||n(),v=!1}try{i=new IntersectionObserver(m,{...u,root:a.ownerDocument})}catch(e){i=new IntersectionObserver(m,u)}i.observe(e)}(!0),o}(d,s):null;let p,g=-1,u=null;n&&(u=new ResizeObserver(e=>{let[i]=e;i&&i.target===d&&u&&(u.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=u)||e.observe(t)})),s()}),d&&!l&&u.observe(d),u.observe(t));let v=l?ai(e):null;return l&&function t(){const i=ai(e);v&&!vi(v,i)&&s();v=i,p=requestAnimationFrame(t)}(),s(),()=>{var e;c.forEach(e=>{a&&e.removeEventListener("scroll",s),o&&e.removeEventListener("resize",s)}),null==h||h(),null==(e=u)||e.disconnect(),u=null,l&&cancelAnimationFrame(p)}}const fi=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var s,i;const{x:a,y:o,placement:n,middlewareData:r}=t,l=await async function(e,t){const{placement:s,platform:i,elements:a}=e,o=await(null==i.isRTL?void 0:i.isRTL(a.floating)),n=as(s),r=os(s),l="y"===ds(s),d=$s.has(n)?-1:1,c=o&&l?-1:1,h=is(t,e);let{mainAxis:p,crossAxis:g,alignmentAxis:u}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return r&&"number"==typeof u&&(g="end"===r?-1*u:u),l?{x:g*c,y:p*d}:{x:p*d,y:g*c}}(t,e);return n===(null==(s=r.offset)?void 0:s.placement)&&null!=(i=r.arrow)&&i.alignmentOffset?{}:{x:a+l.x,y:o+l.y,data:{...l,placement:n}}}}},bi=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:s,y:i,placement:a}=t,{mainAxis:o=!0,crossAxis:n=!1,limiter:r={fn:e=>{let{x:t,y:s}=e;return{x:t,y:s}}},...l}=is(e,t),d={x:s,y:i},c=await _s(t,l),h=ds(as(a)),p=ns(h);let g=d[p],u=d[h];if(o){const e="y"===p?"bottom":"right";g=ss(g+c["y"===p?"top":"left"],g,g-c[e])}if(n){const e="y"===h?"bottom":"right";u=ss(u+c["y"===h?"top":"left"],u,u-c[e])}const v=r.fn({...t,[p]:g,[h]:u});return{...v,data:{x:v.x-s,y:v.y-i,enabled:{[p]:o,[h]:n}}}}}},wi=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var s,i;const{placement:a,middlewareData:o,rects:n,initialPlacement:r,platform:l,elements:d}=t,{mainAxis:c=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:u="none",flipAlignment:v=!0,...m}=is(e,t);if(null!=(s=o.arrow)&&s.alignmentOffset)return{};const f=as(a),b=ds(r),w=as(r)===r,y=await(null==l.isRTL?void 0:l.isRTL(d.floating)),x=p||(w||!v?[bs(r)]:function(e){const t=bs(e);return[ps(e),t,ps(t)]}(r)),_="none"!==u;!p&&_&&x.push(...fs(r,v,u,y));const k=[r,...x],C=await _s(t,m),$=[];let S=(null==(i=o.flip)?void 0:i.overflows)||[];if(c&&$.push(C[f]),h){const e=hs(a,n,y);$.push(C[e[0]],C[e[1]])}if(S=[...S,{placement:a,overflows:$}],!$.every(e=>e<=0)){var M,Z;const e=((null==(M=o.flip)?void 0:M.index)||0)+1,t=k[e];if(t){if(!("alignment"===h&&b!==ds(t))||S.every(e=>ds(e.placement)!==b||e.overflows[0]>0))return{data:{index:e,overflows:S},reset:{placement:t}}}let s=null==(Z=S.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:Z.placement;if(!s)switch(g){case"bestFit":{var z;const e=null==(z=S.filter(e=>{if(_){const t=ds(e.placement);return t===b||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:z[0];e&&(s=e);break}case"initialPlacement":s=r}if(a!==s)return{reset:{placement:s}}}return{}}}},yi=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var s,i;const{placement:a,rects:o,platform:n,elements:r}=t,{apply:l=()=>{},...d}=is(e,t),c=await _s(t,d),h=as(a),p=os(a),g="y"===ds(a),{width:u,height:v}=o.floating;let m,f;"top"===h||"bottom"===h?(m=h,f=p===(await(null==n.isRTL?void 0:n.isRTL(r.floating))?"start":"end")?"left":"right"):(f=h,m="end"===p?"top":"bottom");const b=v-c.top-c.bottom,w=u-c.left-c.right,y=Wt(v-c[m],b),x=Wt(u-c[f],w),_=!t.middlewareData.shift;let k=y,C=x;if(null!=(s=t.middlewareData.shift)&&s.enabled.x&&(C=w),null!=(i=t.middlewareData.shift)&&i.enabled.y&&(k=b),_&&!p){const e=Gt(c.left,0),t=Gt(c.right,0),s=Gt(c.top,0),i=Gt(c.bottom,0);g?C=u-2*(0!==e||0!==t?e+t:Gt(c.left,c.right)):k=v-2*(0!==s||0!==i?s+i:Gt(c.top,c.bottom))}await l({...t,availableWidth:C,availableHeight:k});const $=await n.getDimensions(r.floating);return u!==$.width||v!==$.height?{reset:{rects:!0}}:{}}}},xi=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:s}=t,{strategy:i="referenceHidden",...a}=is(e,t);switch(i){case"referenceHidden":{const e=ks(await _s(t,{...a,elementContext:"reference"}),s.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Cs(e)}}}case"escaped":{const e=ks(await _s(t,{...a,altBoundary:!0}),s.floating);return{data:{escapedOffsets:e,escaped:Cs(e)}}}default:return{}}}}},_i=(e,t,s)=>{const i=new Map,a={platform:ui,...s},o={...a.platform,_c:i};return(async(e,t,s)=>{const{placement:i="bottom",strategy:a="absolute",middleware:o=[],platform:n}=s,r=o.filter(Boolean),l=await(null==n.isRTL?void 0:n.isRTL(t));let d=await n.getElementRects({reference:e,floating:t,strategy:a}),{x:c,y:h}=xs(d,i,l),p=i,g={},u=0;for(let s=0;s<r.length;s++){const{name:o,fn:v}=r[s],{x:m,y:f,data:b,reset:w}=await v({x:c,y:h,initialPlacement:i,placement:p,strategy:a,middlewareData:g,rects:d,platform:n,elements:{reference:e,floating:t}});c=null!=m?m:c,h=null!=f?f:h,g={...g,[o]:{...g[o],...b}},w&&u<=50&&(u++,"object"==typeof w&&(w.placement&&(p=w.placement),w.rects&&(d=!0===w.rects?await n.getElementRects({reference:e,floating:t,strategy:a}):w.rects),({x:c,y:h}=xs(d,p,l))),s=-1)}return{x:c,y:h,placement:p,strategy:a,middlewareData:g}})(e,t,{...a,platform:o})};var ki=n`:host{display:contents}.tooltip-placeholder{display:inline-block;max-width:100%}.tooltip{word-wrap:break-word;background-color:var(--sgds-surface-fixed-dark);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 2px 0 rgba(0,0,0,.12),0 8px 16px 0 rgba(0,0,0,.14);color:var(--sgds-color-fixed-light);display:block;font-size:var(--sgds-font-size-label-sm);line-break:auto;max-width:var(--sgds-dimension-320);padding:var(--sgds-padding-xs) var(--sgds-padding-sm);text-align:left;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;z-index:var(--sgds-z-index-overlay)}div{max-width:fit-content}`;class Ci extends He{constructor(){super(...arguments),this._myTooltip=jt(),this._tooltipBubble=jt(),this.content="",this.placement="top",this.trigger="hover focus",this.open=!1,this._handleClickOutOfElement=e=>{this.open&&(e.composedPath().includes(this)||this.hide())}}connectedCallback(){super.connectedCallback(),this.trigger.includes("click")&&document.addEventListener("click",this._handleClickOutOfElement)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this._tooltipTargetElements.forEach(e=>{e.setAttribute("data-sgds-tooltip",this.content),this.trigger.includes("hover")&&(e.addEventListener("mouseenter",()=>this.show()),e.addEventListener("mouseleave",()=>this.hide())),this.trigger.includes("focus")&&(e.addEventListener("focus",()=>this.show()),e.addEventListener("blur",()=>this.hide())),"click"===this.trigger&&e.addEventListener("click",()=>this.toggle())})}_handleSlotChange(){this._tooltipTargetElements.forEach(e=>e.setAttribute("data-sgds-tooltip",this.content))}async updateFloatingPosition(){if(!this._myTooltip.value||!this._tooltipBubble.value)return;const{x:e,y:t,placement:s,strategy:i,middlewareData:a}=await _i(this._tooltipTargetElements[0],this._tooltipBubble.value,{strategy:"fixed",placement:this.placement,middleware:[fi(8),wi(),bi(),xi()]});this._tooltipBubble.value.setAttribute("data-placement",s),Object.assign(this._tooltipBubble.value.style,{position:i,left:`${e}px`,top:`${t}px`});const{referenceHidden:o,escaped:n}=a.hide||{};this._tooltipBubble.value.style.visibility=o||n?"hidden":"visible"}async show(){this.open||(this.open=!0,this.emit("sgds-show"),await this.updateComplete,await this.updateFloatingPosition(),this._myTooltip.value&&this._tooltipBubble.value&&(this._cleanupAutoUpdate=mi(this._tooltipTargetElements[0],this._tooltipBubble.value,()=>this.updateFloatingPosition())),this.emit("sgds-after-show"))}hide(){this.open&&(this.emit("sgds-hide"),this.open=!1,this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0),setTimeout(()=>this.emit("sgds-after-hide"),0))}toggle(){this.open?this.hide():this.show()}render(){return ee`
|
|
146
|
+
*/const jt=()=>new Ut;class Ut{}const qt=new WeakMap;const Yt=qe(class extends Nt{render(e){return ie}update(e,[t]){const s=t!==this._ref;return s&&void 0!==this._ref&&this._updateRefValue(void 0),(s||this._lastElementForRef!==this._element)&&(this._ref=t,this._context=e.options?.host,this._updateRefValue(this._element=e.element)),ie}_updateRefValue(e){if(this.isConnected||(e=void 0),"function"==typeof this._ref){const t=this._context??globalThis;let s=qt.get(t);void 0===s&&(s=new WeakMap,qt.set(t,s)),void 0!==s.get(this._ref)&&this._ref.call(this._context,void 0),s.set(this._ref,e),void 0!==e&&this._ref.call(this._context,e)}else this._ref.value=e}get _lastElementForRef(){return"function"==typeof this._ref?qt.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),Kt=["top","right","bottom","left"],Wt=Math.min,Gt=Math.max,Jt=Math.round,Xt=Math.floor,Qt=e=>({x:e,y:e}),es={left:"right",right:"left",bottom:"top",top:"bottom"},ts={start:"end",end:"start"};function ss(e,t,s){return Gt(e,Wt(t,s))}function is(e,t){return"function"==typeof e?e(t):e}function as(e){return e.split("-")[0]}function os(e){return e.split("-")[1]}function ns(e){return"x"===e?"y":"x"}function rs(e){return"y"===e?"height":"width"}const ls=new Set(["top","bottom"]);function ds(e){return ls.has(as(e))?"y":"x"}function cs(e){return ns(ds(e))}function hs(e,t,s){void 0===s&&(s=!1);const i=os(e),a=cs(e),o=rs(a);let n="x"===a?i===(s?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[o]>t.floating[o]&&(n=bs(n)),[n,bs(n)]}function ps(e){return e.replace(/start|end/g,e=>ts[e])}const gs=["left","right"],us=["right","left"],vs=["top","bottom"],ms=["bottom","top"];function fs(e,t,s,i){const a=os(e);let o=function(e,t,s){switch(e){case"top":case"bottom":return s?t?us:gs:t?gs:us;case"left":case"right":return t?vs:ms;default:return[]}}(as(e),"start"===s,i);return a&&(o=o.map(e=>e+"-"+a),t&&(o=o.concat(o.map(ps)))),o}function bs(e){return e.replace(/left|right|bottom|top/g,e=>es[e])}function ws(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function ys(e){const{x:t,y:s,width:i,height:a}=e;return{width:i,height:a,top:s,left:t,right:t+i,bottom:s+a,x:t,y:s}}function xs(e,t,s){let{reference:i,floating:a}=e;const o=ds(t),n=cs(t),r=rs(n),l=as(t),d="y"===o,c=i.x+i.width/2-a.width/2,h=i.y+i.height/2-a.height/2,p=i[r]/2-a[r]/2;let g;switch(l){case"top":g={x:c,y:i.y-a.height};break;case"bottom":g={x:c,y:i.y+i.height};break;case"right":g={x:i.x+i.width,y:h};break;case"left":g={x:i.x-a.width,y:h};break;default:g={x:i.x,y:i.y}}switch(os(t)){case"start":g[n]-=p*(s&&d?-1:1);break;case"end":g[n]+=p*(s&&d?-1:1)}return g}async function _s(e,t){var s;void 0===t&&(t={});const{x:i,y:a,platform:o,rects:n,elements:r,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:p=!1,padding:g=0}=is(t,e),u=ws(g),v=r[p?"floating"===h?"reference":"floating":h],m=ys(await o.getClippingRect({element:null==(s=await(null==o.isElement?void 0:o.isElement(v)))||s?v:v.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(r.floating)),boundary:d,rootBoundary:c,strategy:l})),f="floating"===h?{x:i,y:a,width:n.floating.width,height:n.floating.height}:n.reference,b=await(null==o.getOffsetParent?void 0:o.getOffsetParent(r.floating)),w=await(null==o.isElement?void 0:o.isElement(b))&&await(null==o.getScale?void 0:o.getScale(b))||{x:1,y:1},y=ys(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:f,offsetParent:b,strategy:l}):f);return{top:(m.top-y.top+u.top)/w.y,bottom:(y.bottom-m.bottom+u.bottom)/w.y,left:(m.left-y.left+u.left)/w.x,right:(y.right-m.right+u.right)/w.x}}function ks(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Cs(e){return Kt.some(t=>e[t]>=0)}const $s=new Set(["left","top"]);function Ss(){return"undefined"!=typeof window}function Ms(e){return Vs(e)?(e.nodeName||"").toLowerCase():"#document"}function Zs(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function zs(e){var t;return null==(t=(Vs(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Vs(e){return!!Ss()&&(e instanceof Node||e instanceof Zs(e).Node)}function Ps(e){return!!Ss()&&(e instanceof Element||e instanceof Zs(e).Element)}function As(e){return!!Ss()&&(e instanceof HTMLElement||e instanceof Zs(e).HTMLElement)}function Ls(e){return!(!Ss()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Zs(e).ShadowRoot)}const Ds=new Set(["inline","contents"]);function Is(e){const{overflow:t,overflowX:s,overflowY:i,display:a}=Ys(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+s)&&!Ds.has(a)}const Es=new Set(["table","td","th"]);function Bs(e){return Es.has(Ms(e))}const Hs=[":popover-open",":modal"];function Os(e){return Hs.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const Ts=["transform","translate","scale","rotate","perspective"],Rs=["transform","translate","scale","rotate","perspective","filter"],Fs=["paint","layout","strict","content"];function Ns(e){const t=js(),s=Ps(e)?Ys(e):e;return Ts.some(e=>!!s[e]&&"none"!==s[e])||!!s.containerType&&"normal"!==s.containerType||!t&&!!s.backdropFilter&&"none"!==s.backdropFilter||!t&&!!s.filter&&"none"!==s.filter||Rs.some(e=>(s.willChange||"").includes(e))||Fs.some(e=>(s.contain||"").includes(e))}function js(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Us=new Set(["html","body","#document"]);function qs(e){return Us.has(Ms(e))}function Ys(e){return Zs(e).getComputedStyle(e)}function Ks(e){return Ps(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ws(e){if("html"===Ms(e))return e;const t=e.assignedSlot||e.parentNode||Ls(e)&&e.host||zs(e);return Ls(t)?t.host:t}function Gs(e){const t=Ws(e);return qs(t)?e.ownerDocument?e.ownerDocument.body:e.body:As(t)&&Is(t)?t:Gs(t)}function Js(e,t,s){var i;void 0===t&&(t=[]),void 0===s&&(s=!0);const a=Gs(e),o=a===(null==(i=e.ownerDocument)?void 0:i.body),n=Zs(a);if(o){const e=Xs(n);return t.concat(n,n.visualViewport||[],Is(a)?a:[],e&&s?Js(e):[])}return t.concat(a,Js(a,[],s))}function Xs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Qs(e){const t=Ys(e);let s=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const a=As(e),o=a?e.offsetWidth:s,n=a?e.offsetHeight:i,r=Jt(s)!==o||Jt(i)!==n;return r&&(s=o,i=n),{width:s,height:i,$:r}}function ei(e){return Ps(e)?e:e.contextElement}function ti(e){const t=ei(e);if(!As(t))return Qt(1);const s=t.getBoundingClientRect(),{width:i,height:a,$:o}=Qs(t);let n=(o?Jt(s.width):s.width)/i,r=(o?Jt(s.height):s.height)/a;return n&&Number.isFinite(n)||(n=1),r&&Number.isFinite(r)||(r=1),{x:n,y:r}}const si=Qt(0);function ii(e){const t=Zs(e);return js()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:si}function ai(e,t,s,i){void 0===t&&(t=!1),void 0===s&&(s=!1);const a=e.getBoundingClientRect(),o=ei(e);let n=Qt(1);t&&(i?Ps(i)&&(n=ti(i)):n=ti(e));const r=function(e,t,s){return void 0===t&&(t=!1),!(!s||t&&s!==Zs(e))&&t}(o,s,i)?ii(o):Qt(0);let l=(a.left+r.x)/n.x,d=(a.top+r.y)/n.y,c=a.width/n.x,h=a.height/n.y;if(o){const e=Zs(o),t=i&&Ps(i)?Zs(i):i;let s=e,a=Xs(s);for(;a&&i&&t!==s;){const e=ti(a),t=a.getBoundingClientRect(),i=Ys(a),o=t.left+(a.clientLeft+parseFloat(i.paddingLeft))*e.x,n=t.top+(a.clientTop+parseFloat(i.paddingTop))*e.y;l*=e.x,d*=e.y,c*=e.x,h*=e.y,l+=o,d+=n,s=Zs(a),a=Xs(s)}}return ys({width:c,height:h,x:l,y:d})}function oi(e,t){const s=Ks(e).scrollLeft;return t?t.left+s:ai(zs(e)).left+s}function ni(e,t){const s=e.getBoundingClientRect();return{x:s.left+t.scrollLeft-oi(e,s),y:s.top+t.scrollTop}}const ri=new Set(["absolute","fixed"]);function li(e,t,s){let i;if("viewport"===t)i=function(e,t){const s=Zs(e),i=zs(e),a=s.visualViewport;let o=i.clientWidth,n=i.clientHeight,r=0,l=0;if(a){o=a.width,n=a.height;const e=js();(!e||e&&"fixed"===t)&&(r=a.offsetLeft,l=a.offsetTop)}const d=oi(i);if(d<=0){const e=i.ownerDocument,t=e.body,s=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(s.marginLeft)+parseFloat(s.marginRight)||0,n=Math.abs(i.clientWidth-t.clientWidth-a);n<=25&&(o-=n)}else d<=25&&(o+=d);return{width:o,height:n,x:r,y:l}}(e,s);else if("document"===t)i=function(e){const t=zs(e),s=Ks(e),i=e.ownerDocument.body,a=Gt(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=Gt(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let n=-s.scrollLeft+oi(e);const r=-s.scrollTop;return"rtl"===Ys(i).direction&&(n+=Gt(t.clientWidth,i.clientWidth)-a),{width:a,height:o,x:n,y:r}}(zs(e));else if(Ps(t))i=function(e,t){const s=ai(e,!0,"fixed"===t),i=s.top+e.clientTop,a=s.left+e.clientLeft,o=As(e)?ti(e):Qt(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:i*o.y}}(t,s);else{const s=ii(e);i={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ys(i)}function di(e,t){const s=Ws(e);return!(s===t||!Ps(s)||qs(s))&&("fixed"===Ys(s).position||di(s,t))}function ci(e,t,s){const i=As(t),a=zs(t),o="fixed"===s,n=ai(e,!0,o,t);let r={scrollLeft:0,scrollTop:0};const l=Qt(0);function d(){l.x=oi(a)}if(i||!i&&!o)if(("body"!==Ms(t)||Is(a))&&(r=Ks(t)),i){const e=ai(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&d();o&&!i&&a&&d();const c=!a||i||o?Qt(0):ni(a,r);return{x:n.left+r.scrollLeft-l.x-c.x,y:n.top+r.scrollTop-l.y-c.y,width:n.width,height:n.height}}function hi(e){return"static"===Ys(e).position}function pi(e,t){if(!As(e)||"fixed"===Ys(e).position)return null;if(t)return t(e);let s=e.offsetParent;return zs(e)===s&&(s=s.ownerDocument.body),s}function gi(e,t){const s=Zs(e);if(Os(e))return s;if(!As(e)){let t=Ws(e);for(;t&&!qs(t);){if(Ps(t)&&!hi(t))return t;t=Ws(t)}return s}let i=pi(e,t);for(;i&&Bs(i)&&hi(i);)i=pi(i,t);return i&&qs(i)&&hi(i)&&!Ns(i)?s:i||function(e){let t=Ws(e);for(;As(t)&&!qs(t);){if(Ns(t))return t;if(Os(t))return null;t=Ws(t)}return null}(e)||s}const ui={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:s,offsetParent:i,strategy:a}=e;const o="fixed"===a,n=zs(i),r=!!t&&Os(t.floating);if(i===n||r&&o)return s;let l={scrollLeft:0,scrollTop:0},d=Qt(1);const c=Qt(0),h=As(i);if((h||!h&&!o)&&(("body"!==Ms(i)||Is(n))&&(l=Ks(i)),As(i))){const e=ai(i);d=ti(i),c.x=e.x+i.clientLeft,c.y=e.y+i.clientTop}const p=!n||h||o?Qt(0):ni(n,l);return{width:s.width*d.x,height:s.height*d.y,x:s.x*d.x-l.scrollLeft*d.x+c.x+p.x,y:s.y*d.y-l.scrollTop*d.y+c.y+p.y}},getDocumentElement:zs,getClippingRect:function(e){let{element:t,boundary:s,rootBoundary:i,strategy:a}=e;const o=[..."clippingAncestors"===s?Os(t)?[]:function(e,t){const s=t.get(e);if(s)return s;let i=Js(e,[],!1).filter(e=>Ps(e)&&"body"!==Ms(e)),a=null;const o="fixed"===Ys(e).position;let n=o?Ws(e):e;for(;Ps(n)&&!qs(n);){const t=Ys(n),s=Ns(n);s||"fixed"!==t.position||(a=null),(o?!s&&!a:!s&&"static"===t.position&&a&&ri.has(a.position)||Is(n)&&!s&&di(e,n))?i=i.filter(e=>e!==n):a=t,n=Ws(n)}return t.set(e,i),i}(t,this._c):[].concat(s),i],n=o[0],r=o.reduce((e,s)=>{const i=li(t,s,a);return e.top=Gt(i.top,e.top),e.right=Wt(i.right,e.right),e.bottom=Wt(i.bottom,e.bottom),e.left=Gt(i.left,e.left),e},li(t,n,a));return{width:r.right-r.left,height:r.bottom-r.top,x:r.left,y:r.top}},getOffsetParent:gi,getElementRects:async function(e){const t=this.getOffsetParent||gi,s=this.getDimensions,i=await s(e.floating);return{reference:ci(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:s}=Qs(e);return{width:t,height:s}},getScale:ti,isElement:Ps,isRTL:function(e){return"rtl"===Ys(e).direction}};function vi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mi(e,t,s,i){void 0===i&&(i={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:n="function"==typeof ResizeObserver,layoutShift:r="function"==typeof IntersectionObserver,animationFrame:l=!1}=i,d=ei(e),c=a||o?[...d?Js(d):[],...Js(t)]:[];c.forEach(e=>{a&&e.addEventListener("scroll",s,{passive:!0}),o&&e.addEventListener("resize",s)});const h=d&&r?function(e,t){let s,i=null;const a=zs(e);function o(){var e;clearTimeout(s),null==(e=i)||e.disconnect(),i=null}return function n(r,l){void 0===r&&(r=!1),void 0===l&&(l=1),o();const d=e.getBoundingClientRect(),{left:c,top:h,width:p,height:g}=d;if(r||t(),!p||!g)return;const u={rootMargin:-Xt(h)+"px "+-Xt(a.clientWidth-(c+p))+"px "+-Xt(a.clientHeight-(h+g))+"px "+-Xt(c)+"px",threshold:Gt(0,Wt(1,l))||1};let v=!0;function m(t){const i=t[0].intersectionRatio;if(i!==l){if(!v)return n();i?n(!1,i):s=setTimeout(()=>{n(!1,1e-7)},1e3)}1!==i||vi(d,e.getBoundingClientRect())||n(),v=!1}try{i=new IntersectionObserver(m,{...u,root:a.ownerDocument})}catch(e){i=new IntersectionObserver(m,u)}i.observe(e)}(!0),o}(d,s):null;let p,g=-1,u=null;n&&(u=new ResizeObserver(e=>{let[i]=e;i&&i.target===d&&u&&(u.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=u)||e.observe(t)})),s()}),d&&!l&&u.observe(d),u.observe(t));let v=l?ai(e):null;return l&&function t(){const i=ai(e);v&&!vi(v,i)&&s();v=i,p=requestAnimationFrame(t)}(),s(),()=>{var e;c.forEach(e=>{a&&e.removeEventListener("scroll",s),o&&e.removeEventListener("resize",s)}),null==h||h(),null==(e=u)||e.disconnect(),u=null,l&&cancelAnimationFrame(p)}}const fi=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var s,i;const{x:a,y:o,placement:n,middlewareData:r}=t,l=await async function(e,t){const{placement:s,platform:i,elements:a}=e,o=await(null==i.isRTL?void 0:i.isRTL(a.floating)),n=as(s),r=os(s),l="y"===ds(s),d=$s.has(n)?-1:1,c=o&&l?-1:1,h=is(t,e);let{mainAxis:p,crossAxis:g,alignmentAxis:u}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return r&&"number"==typeof u&&(g="end"===r?-1*u:u),l?{x:g*c,y:p*d}:{x:p*d,y:g*c}}(t,e);return n===(null==(s=r.offset)?void 0:s.placement)&&null!=(i=r.arrow)&&i.alignmentOffset?{}:{x:a+l.x,y:o+l.y,data:{...l,placement:n}}}}},bi=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:s,y:i,placement:a}=t,{mainAxis:o=!0,crossAxis:n=!1,limiter:r={fn:e=>{let{x:t,y:s}=e;return{x:t,y:s}}},...l}=is(e,t),d={x:s,y:i},c=await _s(t,l),h=ds(as(a)),p=ns(h);let g=d[p],u=d[h];if(o){const e="y"===p?"bottom":"right";g=ss(g+c["y"===p?"top":"left"],g,g-c[e])}if(n){const e="y"===h?"bottom":"right";u=ss(u+c["y"===h?"top":"left"],u,u-c[e])}const v=r.fn({...t,[p]:g,[h]:u});return{...v,data:{x:v.x-s,y:v.y-i,enabled:{[p]:o,[h]:n}}}}}},wi=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var s,i;const{placement:a,middlewareData:o,rects:n,initialPlacement:r,platform:l,elements:d}=t,{mainAxis:c=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:u="none",flipAlignment:v=!0,...m}=is(e,t);if(null!=(s=o.arrow)&&s.alignmentOffset)return{};const f=as(a),b=ds(r),w=as(r)===r,y=await(null==l.isRTL?void 0:l.isRTL(d.floating)),x=p||(w||!v?[bs(r)]:function(e){const t=bs(e);return[ps(e),t,ps(t)]}(r)),_="none"!==u;!p&&_&&x.push(...fs(r,v,u,y));const k=[r,...x],C=await _s(t,m),$=[];let S=(null==(i=o.flip)?void 0:i.overflows)||[];if(c&&$.push(C[f]),h){const e=hs(a,n,y);$.push(C[e[0]],C[e[1]])}if(S=[...S,{placement:a,overflows:$}],!$.every(e=>e<=0)){var M,Z;const e=((null==(M=o.flip)?void 0:M.index)||0)+1,t=k[e];if(t){if(!("alignment"===h&&b!==ds(t))||S.every(e=>ds(e.placement)!==b||e.overflows[0]>0))return{data:{index:e,overflows:S},reset:{placement:t}}}let s=null==(Z=S.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:Z.placement;if(!s)switch(g){case"bestFit":{var z;const e=null==(z=S.filter(e=>{if(_){const t=ds(e.placement);return t===b||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:z[0];e&&(s=e);break}case"initialPlacement":s=r}if(a!==s)return{reset:{placement:s}}}return{}}}},yi=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var s,i;const{placement:a,rects:o,platform:n,elements:r}=t,{apply:l=()=>{},...d}=is(e,t),c=await _s(t,d),h=as(a),p=os(a),g="y"===ds(a),{width:u,height:v}=o.floating;let m,f;"top"===h||"bottom"===h?(m=h,f=p===(await(null==n.isRTL?void 0:n.isRTL(r.floating))?"start":"end")?"left":"right"):(f=h,m="end"===p?"top":"bottom");const b=v-c.top-c.bottom,w=u-c.left-c.right,y=Wt(v-c[m],b),x=Wt(u-c[f],w),_=!t.middlewareData.shift;let k=y,C=x;if(null!=(s=t.middlewareData.shift)&&s.enabled.x&&(C=w),null!=(i=t.middlewareData.shift)&&i.enabled.y&&(k=b),_&&!p){const e=Gt(c.left,0),t=Gt(c.right,0),s=Gt(c.top,0),i=Gt(c.bottom,0);g?C=u-2*(0!==e||0!==t?e+t:Gt(c.left,c.right)):k=v-2*(0!==s||0!==i?s+i:Gt(c.top,c.bottom))}await l({...t,availableWidth:C,availableHeight:k});const $=await n.getDimensions(r.floating);return u!==$.width||v!==$.height?{reset:{rects:!0}}:{}}}},xi=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:s}=t,{strategy:i="referenceHidden",...a}=is(e,t);switch(i){case"referenceHidden":{const e=ks(await _s(t,{...a,elementContext:"reference"}),s.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Cs(e)}}}case"escaped":{const e=ks(await _s(t,{...a,altBoundary:!0}),s.floating);return{data:{escapedOffsets:e,escaped:Cs(e)}}}default:return{}}}}},_i=(e,t,s)=>{const i=new Map,a={platform:ui,...s},o={...a.platform,_c:i};return(async(e,t,s)=>{const{placement:i="bottom",strategy:a="absolute",middleware:o=[],platform:n}=s,r=o.filter(Boolean),l=await(null==n.isRTL?void 0:n.isRTL(t));let d=await n.getElementRects({reference:e,floating:t,strategy:a}),{x:c,y:h}=xs(d,i,l),p=i,g={},u=0;for(let s=0;s<r.length;s++){const{name:o,fn:v}=r[s],{x:m,y:f,data:b,reset:w}=await v({x:c,y:h,initialPlacement:i,placement:p,strategy:a,middlewareData:g,rects:d,platform:n,elements:{reference:e,floating:t}});c=null!=m?m:c,h=null!=f?f:h,g={...g,[o]:{...g[o],...b}},w&&u<=50&&(u++,"object"==typeof w&&(w.placement&&(p=w.placement),w.rects&&(d=!0===w.rects?await n.getElementRects({reference:e,floating:t,strategy:a}):w.rects),({x:c,y:h}=xs(d,p,l))),s=-1)}return{x:c,y:h,placement:p,strategy:a,middlewareData:g}})(e,t,{...a,platform:o})};var ki=n`:host{display:contents}.tooltip-placeholder{display:inline-block;max-width:100%}.tooltip{word-wrap:break-word;background-color:var(--sgds-surface-fixed-dark);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 2px 0 rgba(0,0,0,.12),0 8px 16px 0 rgba(0,0,0,.14);color:var(--sgds-color-fixed-light);display:block;font-size:var(--sgds-font-size-label-sm);line-break:auto;max-width:var(--sgds-dimension-320);padding:var(--sgds-padding-xs) var(--sgds-padding-sm);text-align:left;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;z-index:var(--sgds-z-index-overlay)}div{max-width:fit-content}`;class Ci extends He{constructor(){super(...arguments),this._myTooltip=jt(),this._tooltipBubble=jt(),this.content="",this.placement="top",this.trigger="hover focus",this.open=!1,this._handleClickOutOfElement=e=>{this.open&&(e.composedPath().includes(this)||this.hide())}}connectedCallback(){super.connectedCallback(),this.trigger.includes("click")&&document.addEventListener("click",this._handleClickOutOfElement)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this._tooltipTargetElements.forEach(e=>{e.setAttribute("data-sgds-tooltip",this.content),this.trigger.includes("hover")&&(e.addEventListener("mouseenter",()=>this.show()),e.addEventListener("mouseleave",()=>this.hide())),this.trigger.includes("focus")&&(e.addEventListener("focus",()=>this.show()),e.addEventListener("blur",()=>this.hide())),"click"===this.trigger&&e.addEventListener("click",()=>this.toggle())})}_handleSlotChange(){this._tooltipTargetElements.forEach(e=>e.setAttribute("data-sgds-tooltip",this.content))}async updateFloatingPosition(){if(!this._myTooltip.value||!this._tooltipBubble.value)return;const{x:e,y:t,placement:s,strategy:i,middlewareData:a}=await _i(this._tooltipTargetElements[0],this._tooltipBubble.value,{strategy:"fixed",placement:this.placement,middleware:[fi(8),wi(),bi(),xi()]});this._tooltipBubble.value.setAttribute("data-placement",s),Object.assign(this._tooltipBubble.value.style,{position:i,left:`${e}px`,top:`${t}px`});const{referenceHidden:o,escaped:n}=a.hide||{};this._tooltipBubble.value.style.visibility=o||n?"hidden":"visible"}async show(){this.open||(this.open=!0,this.emit("sgds-show"),await this.updateComplete,await this.updateFloatingPosition(),this._myTooltip.value&&this._tooltipBubble.value&&(this._cleanupAutoUpdate=mi(this._tooltipTargetElements[0],this._tooltipBubble.value,()=>this.updateFloatingPosition())),this.emit("sgds-after-show"))}hide(){this.open&&(this.emit("sgds-hide"),this.open=!1,this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0),setTimeout(()=>this.emit("sgds-after-hide"),0))}toggle(){this.open?this.hide():this.show()}render(){return ee`
|
|
147
147
|
<div ${Yt(this._myTooltip)} class="tooltip-placeholder">
|
|
148
148
|
<slot @slotchange=${()=>this._handleSlotChange()}></slot>
|
|
149
149
|
${this.open?ee`<div ${Yt(this._tooltipBubble)} class="tooltip" role="tooltip">${this.content}</div>`:null}
|
|
150
150
|
</div>
|
|
151
|
-
`}}Ci.styles=[...He.styles,ki],e([ze({type:String})],Ci.prototype,"content",void 0),e([ze({type:String})],Ci.prototype,"placement",void 0),e([ze({type:String})],Ci.prototype,"trigger",void 0),e([Ve()],Ci.prototype,"open",void 0),e([
|
|
151
|
+
`}}Ci.styles=[...He.styles,ki],e([ze({type:String})],Ci.prototype,"content",void 0),e([ze({type:String})],Ci.prototype,"placement",void 0),e([ze({type:String})],Ci.prototype,"trigger",void 0),e([Ve()],Ci.prototype,"open",void 0),e([Ie()],Ci.prototype,"_tooltipTargetElements",void 0);class $i{constructor(e,...t){this.slotNames=[],(this.host=e).addController(this),this.slotNames=t,this.handleSlotChange=this.handleSlotChange.bind(this)}hasDefaultSlot(){return[...this.host.childNodes].some(e=>{var t;if(e.nodeType===e.TEXT_NODE&&""!==(null===(t=e.textContent)||void 0===t?void 0:t.trim()))return!0;if(e.nodeType===e.ELEMENT_NODE){const t=e;if("sl-visually-hidden"===t.tagName.toLowerCase())return!1;if(!t.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(e){return null!==this.host.querySelector(`:scope > [slot="${e}"]`)}test(e){return"[default]"===e?this.hasDefaultSlot():this.hasNamedSlot(e)}hostConnected(){var e;null===(e=this.host.shadowRoot)||void 0===e||e.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){var e;null===(e=this.host.shadowRoot)||void 0===e||e.removeEventListener("slotchange",this.handleSlotChange)}handleSlotChange(e){const t=e.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()}}class Si extends He{constructor(){super(...arguments),this.show=!1,this.variant="primary",this.outlined=!1,this.dismissible=!1,this.fullWidth=!1,this.truncated=!1,this.text=""}close(){this.show=!1}_handleShowChange(){if(this.show){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return void(this.show=!1);this.emit("sgds-after-show")}else{if(this.emit("sgds-hide",{cancelable:!0}).defaultPrevented)return void(this.show=!0);this.emit("sgds-after-hide")}}_handleTruncation(){var e;const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".badge-label");t&&(this.truncated=t.scrollWidth>t.clientWidth)}_handleLabelSlotChange(e){this.text=function(e){if(!e)return"";const t=e.assignedNodes({flatten:!0});let s="";return[...t].forEach(e=>{e.nodeType===Node.TEXT_NODE&&(s+=e.textContent.trim())}),s}(e.target)}_renderBadge(){const e=this.outlined||"warning"===this.variant||"white"===this.variant;return ee`<div
|
|
152
152
|
class="
|
|
153
153
|
${Ke({"badge-dismissible":this.dismissible,badge:!0,outlined:this.outlined,"full-width":this.fullWidth})}"
|
|
154
154
|
aria-hidden=${this.show?"false":"true"}
|
|
@@ -176,7 +176,7 @@ const ct=Symbol.for(""),ht=e=>{if(e?.r===ct)return e?._$litStatic$},pt=(e,...t)=
|
|
|
176
176
|
<slot id="default" @click=${this.handleSelectSlot}></slot>
|
|
177
177
|
</div>
|
|
178
178
|
</div>
|
|
179
|
-
`}}Li.styles=[...Vi.styles,Ai,Pi],e([ze({type:Boolean,reflect:!0,state:!1})],Li.prototype,"noFlip",void 0),e([ze({type:Boolean,reflect:!0,state:!1})],Li.prototype,"menuAlignRight",void 0),e([ze({type:String,reflect:!0,state:!1})],Li.prototype,"drop",void 0),e([ze({type:String,reflect:!0,state:!1})],Li.prototype,"close",void 0),e([
|
|
179
|
+
`}}Li.styles=[...Vi.styles,Ai,Pi],e([ze({type:Boolean,reflect:!0,state:!1})],Li.prototype,"noFlip",void 0),e([ze({type:Boolean,reflect:!0,state:!1})],Li.prototype,"menuAlignRight",void 0),e([ze({type:String,reflect:!0,state:!1})],Li.prototype,"drop",void 0),e([ze({type:String,reflect:!0,state:!1})],Li.prototype,"close",void 0),e([Ie({slot:"toggler",flatten:!0})],Li.prototype,"_toggler",void 0),e([ot("menuIsOpen")],Li.prototype,"_handleMenuIsOpenChange",null),e([ot("disabled",{waitUntilFirstUpdate:!0})],Li.prototype,"_handleDisabled",null);var Di=n`:host([disabled]){cursor:not-allowed}.dropdown-item{align-items:center;background-color:var(--sgds-bg-transparent);clear:both;color:var(--sgds-color-default);cursor:pointer;display:flex;font-size:var(--sgds-font-size-label-sm);gap:var(--sgds-gap-sm);padding:var(--sgds-padding-sm) var(--sgds-padding-lg);text-align:inherit}.dropdown-item:hover{background-color:var(--sgds-bg-translucent-subtle)}.dropdown-item:focus,.dropdown-item:focus-visible{background-color:var(--sgds-bg-translucent-subtle)}.dropdown-item:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.dropdown-item.active{background-color:var(--sgds-bg-translucent-subtle);color:var(--sgds-primary-color-default);text-decoration:none}.dropdown-item.disabled,.dropdown-item:disabled{opacity:var(--sgds-opacity-40);pointer-events:none}.dropdown-item.readonly{cursor:default}.dropdown-item.readonly:focus,.dropdown-item.readonly:focus-visible,.dropdown-item.readonly:hover{background-color:var(--sgds-bg-transparent);outline:none}::slotted(*){color:inherit!important;display:flex;gap:var(--sgds-gap-sm);text-decoration:none!important}::slotted(a),::slotted(sgds-checkbox){flex:1;margin:calc(var(--sgds-padding-sm)*-1) calc(var(--sgds-padding-lg)*-1);padding:var(--sgds-padding-sm) var(--sgds-padding-lg)}.dropdown-item.mainnav-dropdown-link{padding:var(--sgds-padding-none)}.dropdown-item.mainnav-dropdown-link ::slotted(*){box-sizing:border-box;margin:auto;max-width:var(--sgds-mainnav-max-width,1440px);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x)}@media screen and (min-width:1024px){.dropdown-item.mainnav-dropdown-link ::slotted(*){padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}}`;class Ii extends He{constructor(){super(...arguments),this.active=!1,this.disabled=!1,this.readonly=!1,this.ariaLabel=""}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",e=>{"Enter"===e.key&&this.anchor.length>0&&this.anchor[0].click()}),this.setAttribute("role","menuitem"),this.setAttribute("aria-disabled",`${this.disabled}`)}render(){return ee`
|
|
180
180
|
<div
|
|
181
181
|
class="dropdown-item ${Ke({disabled:this.disabled,active:this.active,readonly:this.readonly})}"
|
|
182
182
|
tabindex=${this.disabled||this.readonly?"-1":"0"}
|
|
@@ -184,14 +184,14 @@ const ct=Symbol.for(""),ht=e=>{if(e?.r===ct)return e?._$litStatic$},pt=(e,...t)=
|
|
|
184
184
|
>
|
|
185
185
|
<slot></slot>
|
|
186
186
|
</div>
|
|
187
|
-
`}}
|
|
187
|
+
`}}Ii.styles=[Ai,Di],Ii.dependencies={"sgds-icon":xt},e([Ie({flatten:!0})],Ii.prototype,"anchor",void 0),e([ze({type:Boolean})],Ii.prototype,"active",void 0),e([ze({type:Boolean,reflect:!0})],Ii.prototype,"disabled",void 0),e([ze({type:Boolean,reflect:!0})],Ii.prototype,"readonly",void 0),e([ze({type:String})],Ii.prototype,"ariaLabel",void 0);class Ei extends He{constructor(){super(...arguments),this.size="md"}render(){return ee`
|
|
188
188
|
<sgds-dropdown>
|
|
189
189
|
<button slot="toggler" class="overflow-btn" aria-label="More options">
|
|
190
190
|
<sgds-icon name="three-dots" size=${this.size}></sgds-icon>
|
|
191
191
|
</button>
|
|
192
192
|
<slot></slot>
|
|
193
193
|
</sgds-dropdown>
|
|
194
|
-
`}}Ei.styles=[...He.styles,Mi],Ei.dependencies={"sgds-dropdown":Li,"sgds-dropdown-item":
|
|
194
|
+
`}}Ei.styles=[...He.styles,Mi],Ei.dependencies={"sgds-dropdown":Li,"sgds-dropdown-item":Ii,"sgds-icon":xt},e([ze({type:String,reflect:!0})],Ei.prototype,"size",void 0);var Bi=n`.breadcrumb{display:flex;gap:var(--sgds-gap-xs)}.breadcrumb sgds-breadcrumb-item:first-child,.breadcrumb slot::slotted(sgds-breadcrumb-item:first-child){flex:0 0 auto}`;class Hi extends He{constructor(){super(...arguments),this.ariaLabel="breadcrumb"}_replaceExcessItemsWithDropdown(e){const t=document.createElement("sgds-breadcrumb-item"),s=document.createElement("sgds-overflow-menu");s.setAttribute("aria-haspopup","menu"),s.setAttribute("size","sm");const i=e.filter((t,i)=>{if(i>0&&i<e.length-2){const e=t.querySelector("a").cloneNode(!0),i=document.createElement("sgds-dropdown-item");return i.appendChild(e),void s.appendChild(i)}return t});t.classList.add("overflow-menu"),t.appendChild(s),i.splice(1,0,t),this.defaultSlot.replaceWith(...i)}_handleSlotChange(e){const t=e.target.assignedElements({flatten:!0}).filter(e=>"sgds-breadcrumb-item"===e.tagName.toLowerCase());t.forEach((e,s)=>{s===t.length-1?(e.setAttribute("aria-current","page"),e.active=!0):e.removeAttribute("aria-current")}),t.length>=5&&this._replaceExcessItemsWithDropdown(t)}render(){return ut`
|
|
195
195
|
<div aria-label=${We(this.ariaLabel)}>
|
|
196
196
|
<div class="breadcrumb">
|
|
197
197
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
@@ -259,13 +259,13 @@ const ct=Symbol.for(""),ht=e=>{if(e?.r===ct)return e?._$litStatic$},pt=(e,...t)=
|
|
|
259
259
|
</slot>
|
|
260
260
|
</div>
|
|
261
261
|
</${e}>
|
|
262
|
-
`}}sa.styles=[...ea.styles,ta],e([
|
|
262
|
+
`}}sa.styles=[...ea.styles,ta],e([Ie({slot:"footer"})],sa.prototype,"footerNode",void 0),e([Ie({slot:"link"})],sa.prototype,"linkNode",void 0),e([ze({type:String,reflect:!0})],sa.prototype,"imagePosition",void 0),e([ze({type:String,reflect:!0})],sa.prototype,"imageAdjustment",void 0),e([ze({type:Boolean})],sa.prototype,"hasImageSlot",void 0),e([ze({type:Boolean})],sa.prototype,"hasIconSlot",void 0),e([ze({type:Boolean})],sa.prototype,"hasUpperSlot",void 0),e([ze({type:Boolean,reflect:!0})],sa.prototype,"noPadding",void 0),lt("sgds-card",sa);const ia=qe(
|
|
263
263
|
/**
|
|
264
264
|
* @license
|
|
265
265
|
* Copyright 2020 Google LLC
|
|
266
266
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
267
267
|
*/
|
|
268
|
-
class extends Ye{constructor(e){if(super(e),e.type!==je&&e.type!==Fe&&e.type!==Ue)throw new Error("The `live` directive is not allowed on child or event bindings");if(!Vt(e))throw new Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===se||t===ie)return t;const s=e.element,i=e.name;if(e.type===je){if(t===s[i])return se}else if(e.type===Ue){if(!!t===s.hasAttribute(i))return se}else if(e.type===Fe&&s.getAttribute(i)===String(t))return se;return
|
|
268
|
+
class extends Ye{constructor(e){if(super(e),e.type!==je&&e.type!==Fe&&e.type!==Ue)throw new Error("The `live` directive is not allowed on child or event bindings");if(!Vt(e))throw new Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===se||t===ie)return t;const s=e.element,i=e.name;if(e.type===je){if(t===s[i])return se}else if(e.type===Ue){if(!!t===s.hasAttribute(i))return se}else if(e.type===Fe&&s.getAttribute(i)===String(t))return se;return It(e),t}});var aa=n`.invalid-feedback-container{display:flex;gap:var(--sgds-form-gap-sm)}.invalid-feedback,.invalid-feedback-container{color:var(--sgds-form-danger-color-default);line-height:var(--sgds-line-height-20)}.invalid-feedback{font-size:var(--sgds-font-size-label-sm);font-weight:var(--sgds-font-weight-regular)}.valid-icon{color:var(--sgds-form-success-color-default)}`,oa=n`.form-text{color:var(--sgds-form-color-subtle);font-size:var(--sgds-font-size-label-sm);line-height:var(--sgds-line-height-2-xs)}.form-text.disabled{opacity:var(--sgds-opacity-40)}`,na=n`.form-control-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.m-width-160{min-width:var(--sgds-dimension-160)}.m-width-256{min-width:var(--sgds-dimension-256)}.form-label{color:var(--sgds-form-color-default);font-size:var(--sgds-font-size-label-md);font-weight:var(--sgds-font-weight-semibold)}.form-control-group{align-items:center;background-color:var(--sgds-form-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);border-radius:var(--input-border-radius,var(--sgds-form-border-radius-md));display:flex;gap:var(--sgds-form-gap-xl);height:var(--sgds-dimension-48);justify-content:center;overflow:hidden;padding:0 var(--sgds-form-padding-x);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;width:-webkit-fill-available;width:-moz-available}.form-control{appearance:none;background-clip:padding-box;background:none;border:none;color:var(--sgds-form-color-default);display:block;flex-grow:1;font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-label-md);line-height:var(--sgds-line-height-xs);min-width:0;outline:none;padding:0;width:100%}.form-clearable{color:var(--sgds-color-subtle);cursor:pointer}.form-control-group:not(.disabled):not(.is-invalid):not(.readonly):not(:focus-within):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-group:not(.disabled):not(.is-invalid):focus-within{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-container.disabled{opacity:var(--sgds-opacity-40)}.form-control-group.disabled{background-color:var(--sgds-form-surface-muted);cursor:not-allowed}.form-control-group.readonly{background-color:var(--sgds-form-surface-raised)}.form-control-group.is-invalid:not(.disabled){border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-control-group:not(.disabled).is-invalid:focus-within{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;const ra=(e="value")=>(t,s)=>{const i=t.constructor,a=i.prototype.attributeChangedCallback;i.prototype.attributeChangedCallback=function(t,o,n){var r;const l=i.getPropertyOptions(e);if(t===("string"==typeof l.attribute?l.attribute:e).toLowerCase()){const t=l.converter||x,i=("function"==typeof t?t:null!==(r=null==t?void 0:t.fromAttribute)&&void 0!==r?r:x.fromAttribute)(n,l.type);this[e]!==i&&(this[s]=i)}a.call(this,t,o,n)}};class la{constructor(e,t){(this.host=e).addController(this),this._internals=e._internals||this.host.attachInternals(),this.options=Object.assign({setInvalid:(e,t)=>{e.invalid=t},value:e=>e.value,input:e=>e.input},t)}hostConnected(){this.host.addEventListener("invalid",e=>this.handleInvalid(e))}hostDisconnected(){this.host.removeEventListener("invalid",e=>this.handleInvalid(e))}handleInvalid(e){e.preventDefault(),this.options.setInvalid(this.host,!0)}handleInput(e){const t=e.target;this.options.setInvalid(this.host,!1),this.validateInput(t)}handleChange(e){const t=e.target;this.validateInput(t),this.options.setInvalid(this.host,!this.checkValidity())}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}updateInvalidState(){this.options.setInvalid(this.host,!this.checkValidity())}resetValidity(){return this._internals.setValidity({})}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}setValidity(e,t,s){return this._internals.setValidity(e,t,s)}setFormValue(){const e=this.options.value(this.host);this._internals.setFormValue(e)}validateInput(e){if(this.options.input(this.host).disabled)return this._internals.setValidity({});const t=e.validity;if(t.valid)this._internals.setValidity({});else for(const s in t)t[s]&&(this.validationError=s.toString(),this._internals.setValidity({[this.validationError]:!0},e.validationMessage,e))}}const da=t=>{class s extends t{constructor(...e){super(...e),this._isTouched=!1,this._internals=this.attachInternals()}connectedCallback(){var e;super.connectedCallback(),null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new la(this))}async firstUpdated(e){super.firstUpdated(e),this.input=this.shadowRoot.querySelector("input")||await this.sgdsInput||this.shadowRoot.querySelector("textarea")||await this.sgdsDatepickerInput,this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this._mixinValidate(this.input)}formResetCallback(){this._mixinResetFormControl?this._mixinResetFormControl():(this.value=this.defaultValue,this._mixinResetValidity(this.input)),this._mixinSetFormValue()}_mixinHandleChange(e){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleChange(e)}_mixinHandleInputChange(e){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleInput(e)}_mixinResetValidity(e){this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this._isTouched&&(this._isTouched=!1),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.validateInput(e)}_mixinValidate(e){this._mixinShouldSkipSgdsValidation()||this.inputValidationController.validateInput(e)}_mixinSetFormValue(){const e=this.value;this._internals.setFormValue(e)}_mixinCheckValidity(){return!!this._mixinShouldSkipSgdsValidation()||this.inputValidationController.checkValidity()}_mixinReportValidity(){return!!this._mixinShouldSkipSgdsValidation()||this.inputValidationController.reportValidity()}_mixinGetValidity(){return this._internals.validity}_mixinGetValidationMessage(){return this._internals.validationMessage}_mixinSetValidity(e,t,s){if(!this._mixinShouldSkipSgdsValidation())return this.inputValidationController.setValidity(e,t,s)}_mixinShouldSkipSgdsValidation(){const e=this.closest("form");return(null==e?void 0:e.noValidate)||this.noValidate}}return s.formAssociated=!0,e([De("sgds-input")],s.prototype,"sgdsInput",void 0),e([De("sgds-datepicker-input")],s.prototype,"sgdsDatepickerInput",void 0),s};var ca=n`.empty-menu,.loading-menu{padding:var(--sgds-padding-sm) var(--sgds-padding-lg,20px);pointer-events:none}.loading-menu{align-items:center;display:flex;gap:var(--sgds-gap-xs)}`;class ha extends(da(Vi)){setInvalid(e){this.invalid=e,e?this.emit("sgds-invalid"):this.emit("sgds-valid")}constructor(){super(),this.label="",this.hintText="",this.autofocus=!1,this.disabled=!1,this.required=!1,this.loading=!1,this.value="",this.displayValue="",this.defaultValue="",this.hasFeedback=!1,this.invalidFeedback="",this.invalid=!1,this.autocomplete="on",this.menuList=[],this.selectedItems=[],this.filteredList=[],this._isTouched=!1,this._controlId=Zi("input"),this._labelId=Zi("label"),this.floatingOpts={middleware:[yi({apply({rects:e,elements:t}){t.floating.style.width=`${e.reference.width}px`}})]}}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",async e=>{var t;if(this._mixinShouldSkipSgdsValidation())return;const s=this.constructor.childName,i=(null===(t=e.relatedTarget)||void 0===t?void 0:t.tagName.toLowerCase())===s;this.invalid=!i&&!this._mixinReportValidity()})}reportValidity(){return this._mixinReportValidity()}setValidity(e,t,s){return this._mixinSetValidity(e,t,s)}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_renderFeedback(){return this.invalid&&this.hasFeedback?ee` <div class="invalid-feedback-container">
|
|
269
269
|
<slot name="invalidIcon">
|
|
270
270
|
<sgds-icon name="exclamation-circle-fill" size="md"></sgds-icon>
|
|
271
271
|
</slot>
|
|
@@ -279,7 +279,7 @@ class extends Ye{constructor(e){if(super(e),e.type!==je&&e.type!==Fe&&e.type!==U
|
|
|
279
279
|
class=${Ke({"form-label":!0,required:this.required})}
|
|
280
280
|
>${this.label}</label
|
|
281
281
|
>
|
|
282
|
-
`;return this.label&&e}_handleClick(){if(this.readonly)return null;this.menuIsOpen?this.hideMenu():this.showMenu()}async _getMenuListFromOptions(e){const t=e.map(async e=>(await e.updateComplete,e)),s=await Promise.all(t);return null==s?void 0:s.map(e=>{var t;return{label:e.innerText,value:e.getAttribute("value"),disabled:null!==(t=e.disabled)&&void 0!==t?t:void 0}})}_renderEmptyMenu(){return ee` <div class="empty-menu">No options</div> `}_renderLoadingMenu(){return ee`<div class="loading-menu"><sgds-spinner size="xs" tone="brand"></sgds-spinner>Loading...</div>`}}ha.styles=[...Vi.styles,Pi,oa,aa,na,ca],e([ze({reflect:!0})],ha.prototype,"label",void 0),e([ze({reflect:!0})],ha.prototype,"hintText",void 0),e([ze({reflect:!0})],ha.prototype,"name",void 0),e([ze({type:String,reflect:!0})],ha.prototype,"placeholder",void 0),e([ze({type:Boolean,reflect:!0})],ha.prototype,"autofocus",void 0),e([ze({type:Boolean,reflect:!0})],ha.prototype,"disabled",void 0),e([ze({type:Boolean,reflect:!0})],ha.prototype,"required",void 0),e([ze({type:Boolean,reflect:!0})],ha.prototype,"loading",void 0),e([ze({type:String,reflect:!0})],ha.prototype,"value",void 0),e([Ve()],ha.prototype,"displayValue",void 0),e([ra()],ha.prototype,"defaultValue",void 0),e([ze({type:Boolean,reflect:!0})],ha.prototype,"hasFeedback",void 0),e([ze({type:String,reflect:!0})],ha.prototype,"invalidFeedback",void 0),e([ze({type:Boolean,reflect:!0})],ha.prototype,"invalid",void 0),e([ze({type:String,reflect:!0})],ha.prototype,"autocomplete",void 0),e([ze({type:Array})],ha.prototype,"menuList",void 0),e([Ve()],ha.prototype,"selectedItems",void 0),e([Ve()],ha.prototype,"filteredList",void 0),e([
|
|
282
|
+
`;return this.label&&e}_handleClick(){if(this.readonly)return null;this.menuIsOpen?this.hideMenu():this.showMenu()}async _getMenuListFromOptions(e){const t=e.map(async e=>(await e.updateComplete,e)),s=await Promise.all(t);return null==s?void 0:s.map(e=>{var t;return{label:e.innerText,value:e.getAttribute("value"),disabled:null!==(t=e.disabled)&&void 0!==t?t:void 0}})}_renderEmptyMenu(){return ee` <div class="empty-menu">No options</div> `}_renderLoadingMenu(){return ee`<div class="loading-menu"><sgds-spinner size="xs" tone="brand"></sgds-spinner>Loading...</div>`}}ha.styles=[...Vi.styles,Pi,oa,aa,na,ca],e([ze({reflect:!0})],ha.prototype,"label",void 0),e([ze({reflect:!0})],ha.prototype,"hintText",void 0),e([ze({reflect:!0})],ha.prototype,"name",void 0),e([ze({type:String,reflect:!0})],ha.prototype,"placeholder",void 0),e([ze({type:Boolean,reflect:!0})],ha.prototype,"autofocus",void 0),e([ze({type:Boolean,reflect:!0})],ha.prototype,"disabled",void 0),e([ze({type:Boolean,reflect:!0})],ha.prototype,"required",void 0),e([ze({type:Boolean,reflect:!0})],ha.prototype,"loading",void 0),e([ze({type:String,reflect:!0})],ha.prototype,"value",void 0),e([Ve()],ha.prototype,"displayValue",void 0),e([ra()],ha.prototype,"defaultValue",void 0),e([ze({type:Boolean,reflect:!0})],ha.prototype,"hasFeedback",void 0),e([ze({type:String,reflect:!0})],ha.prototype,"invalidFeedback",void 0),e([ze({type:Boolean,reflect:!0})],ha.prototype,"invalid",void 0),e([ze({type:String,reflect:!0})],ha.prototype,"autocomplete",void 0),e([ze({type:Array})],ha.prototype,"menuList",void 0),e([Ve()],ha.prototype,"selectedItems",void 0),e([Ve()],ha.prototype,"filteredList",void 0),e([De("input.form-control")],ha.prototype,"_input",void 0);var pa=n`:host{display:block;position:relative}.dropdown{display:flex;height:100%}.dropdown-menu{box-sizing:border-box;max-height:10rem;overflow-x:hidden;overflow-y:auto}.visually-hidden{clip:rect(0,0,0,0)!important;border:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}.combobox .form-control-group{height:unset;min-height:var(--sgds-dimension-48)}.combobox-input-container{align-items:center;display:flex;flex-wrap:wrap;gap:var(--sgds-gap-xs);padding:calc(var(--sgds-form-padding-y) - var(--sgds-form-border-width-default)) 0;width:calc(100% - var(--sgds-icon-size-md, 1.25rem))}.combobox-input-container .form-control{flex:1 1 0;min-width:10ch}slot[id=default].d-none,slot[id=default].d-none::slotted(*){display:none}.form-clearable:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`,ga=n`:host([active]) .dropdown-item{background-color:var(--sgds-bg-translucent-subtle)}.dropdown-item{background-color:var(--sgds-bg-transparent);clear:both;color:var(--sgds-form-color-default);cursor:pointer;font-size:var(--sgds-font-size-label-md);height:100%;overflow-wrap:anywhere;padding:var(--sgds-padding-sm) var(--sgds-padding-md);text-align:inherit;white-space:normal}.dropdown-item.disabled{opacity:var(--sgds-opacity-40);pointer-events:none}.dropdown-item .normal-item-content{align-items:center;display:flex;justify-content:space-between}:host([active]) .dropdown-item .normal-item-content{color:var(--sgds-form-primary-color-default)}.dropdown-item:hover{background:var(--sgds-bg-translucent-subtle)}.dropdown-item:focus-visible{background:var(--sgds-bg-translucent-subtle);outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}`;class ua extends He{constructor(){super(...arguments),this.active=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menuitem"),this.setAttribute("aria-disabled",`${this.disabled}`),this._updateAriaLabel()}_updateAriaLabel(){var e;const t=null===(e=this.textContent)||void 0===e?void 0:e.trim();t&&this.setAttribute("aria-label",t)}render(){const e={disabled:this.disabled,active:this.active};return ee`
|
|
283
283
|
<div class="dropdown-item ${Ke(e)}" tabindex=${this.disabled?"-1":"0"}>
|
|
284
284
|
${this._renderItemContent()}
|
|
285
285
|
</div>
|
|
@@ -331,7 +331,7 @@ class extends Ye{constructor(e){if(super(e),e.type!==je&&e.type!==Fe&&e.type!==U
|
|
|
331
331
|
* Copyright 2017 Google LLC
|
|
332
332
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
333
333
|
*/
|
|
334
|
-
const _a=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};const ka=qe(class extends Ye{constructor(e){if(super(e),e.type!==Ne)throw new Error("repeat() can only be used in text expressions")}_getValuesAndKeys(e,t,s){let i;void 0===s?s=t:void 0!==t&&(i=t);const a=[],o=[];let n=0;for(const t of e)a[n]=i?i(t,n):n,o[n]=s(t,n),n++;return{values:o,keys:a}}render(e,t,s){return this._getValuesAndKeys(e,t,s).values}update(e,[t,s,i]){const a=e._$committedValue;const{values:o,keys:n}=this._getValuesAndKeys(t,s,i);if(!Array.isArray(a))return this._itemKeys=n,o;const r=this._itemKeys??=[],l=[];let d,c,h=0,p=a.length-1,g=0,u=o.length-1;for(;h<=p&&g<=u;)if(null===a[h])h++;else if(null===a[p])p--;else if(r[h]===n[g])l[g]=Lt(a[h],o[g]),h++,g++;else if(r[p]===n[u])l[u]=Lt(a[p],o[u]),p--,u--;else if(r[h]===n[u])l[u]=Lt(a[h],o[u]),At(e,l[u+1],a[h]),h++,u--;else if(r[p]===n[g])l[g]=Lt(a[p],o[g]),At(e,a[h],a[p]),p--,g++;else if(void 0===d&&(d=_a(n,g,u),c=_a(r,h,p)),d.has(r[h]))if(d.has(r[p])){const t=c.get(n[g]),s=void 0!==t?a[t]:null;if(null===s){const t=At(e,a[h]);Lt(t,o[g]),l[g]=t}else l[g]=Lt(s,o[g]),At(e,a[h],s),a[t]=null;g++}else Et(a[p]),p--;else Et(a[h]),h++;for(;g<=u;){const t=At(e,l[u+1]);Lt(t,o[g]),l[g++]=t}for(;h<=p;){const e=a[h++];null!==e&&Et(e)}return this._itemKeys=n,
|
|
334
|
+
const _a=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};const ka=qe(class extends Ye{constructor(e){if(super(e),e.type!==Ne)throw new Error("repeat() can only be used in text expressions")}_getValuesAndKeys(e,t,s){let i;void 0===s?s=t:void 0!==t&&(i=t);const a=[],o=[];let n=0;for(const t of e)a[n]=i?i(t,n):n,o[n]=s(t,n),n++;return{values:o,keys:a}}render(e,t,s){return this._getValuesAndKeys(e,t,s).values}update(e,[t,s,i]){const a=e._$committedValue;const{values:o,keys:n}=this._getValuesAndKeys(t,s,i);if(!Array.isArray(a))return this._itemKeys=n,o;const r=this._itemKeys??=[],l=[];let d,c,h=0,p=a.length-1,g=0,u=o.length-1;for(;h<=p&&g<=u;)if(null===a[h])h++;else if(null===a[p])p--;else if(r[h]===n[g])l[g]=Lt(a[h],o[g]),h++,g++;else if(r[p]===n[u])l[u]=Lt(a[p],o[u]),p--,u--;else if(r[h]===n[u])l[u]=Lt(a[h],o[u]),At(e,l[u+1],a[h]),h++,u--;else if(r[p]===n[g])l[g]=Lt(a[p],o[g]),At(e,a[h],a[p]),p--,g++;else if(void 0===d&&(d=_a(n,g,u),c=_a(r,h,p)),d.has(r[h]))if(d.has(r[p])){const t=c.get(n[g]),s=void 0!==t?a[t]:null;if(null===s){const t=At(e,a[h]);Lt(t,o[g]),l[g]=t}else l[g]=Lt(s,o[g]),At(e,a[h],s),a[t]=null;g++}else Et(a[p]),p--;else Et(a[h]),h++;for(;g<=u;){const t=At(e,l[u+1]);Lt(t,o[g]),l[g++]=t}for(;h<=p;){const e=a[h++];null!==e&&Et(e)}return this._itemKeys=n,It(e,l),se}});var Ca=n`:host{--sgds-spinner-bg:var(--sgds-primary-surface-default);display:inline-flex}:host([variant=neutral]){--sgds-spinner-bg:var(--sgds-neutral-surface-default)}:host([tone=neutral]){--sgds-spinner-bg:var(--sgds-surface-inverse)}:host([tone=inverse]){--sgds-spinner-bg:var(--sgds-surface-default)}:host([tone=fixed-light]){--sgds-spinner-bg:var(--sgds-surface-fixed-light)}:host([tone=fixed-dark]){--sgds-spinner-bg:var(--sgds-surface-fixed-dark)}.spinner-wrapper{align-items:center;display:flex;flex-direction:column;gap:var(--sgds-gap-2-xs)}.spinner-wrapper.horizontal{flex-direction:row}.spinner{--border-thickness:4px;animation:spinner .75s linear infinite;border:var(--border-thickness) solid var(--sgds-bg-translucent);border-radius:50%;border-right:var(--border-thickness) solid var(--sgds-spinner-bg);color:var(--sgds-spinner-color);display:inline-flex;height:var(--sgds-dimension-32);width:var(--sgds-dimension-32)}.spinner-xs{--border-thickness:2px;height:var(--sgds-dimension-16);width:var(--sgds-dimension-16)}.spinner-sm{--border-thickness:3px;height:var(--sgds-dimension-24);width:var(--sgds-dimension-24)}.spinner-lg{--border-thickness:6px;height:var(--sgds-dimension-48);width:var(--sgds-dimension-48)}.spinner-xl{--border-thickness:8px;height:var(--sgds-dimension-64);width:var(--sgds-dimension-64)}.spinner-label{color:var(--sgds-neutral-color-default);font-size:var(--sgds-font-size-label-sm)}
|
|
335
335
|
|
|
336
336
|
|
|
337
337
|
/*! CSS Used keyframes */@keyframes spinner{to{transform:rotate(1turn)}}.sr-only{clip:rect(0,0,0,0);border:0;height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}`;class $a extends He{constructor(){super(...arguments),this.variant="primary",this.tone="brand",this.size="md",this.orientation="vertical"}render(){return ut`
|
|
@@ -440,7 +440,7 @@ const _a=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
440
440
|
aria-hidden="true"
|
|
441
441
|
.autocomplete=${this.autocomplete}
|
|
442
442
|
/>`:ie}
|
|
443
|
-
`}}Sa.styles=[...ha.styles,na,pa],Sa.childName="sgds-combo-box-option",Sa.dependencies={[Sa.childName]:xa,"sgds-icon":xt,"sgds-badge":Si,"sgds-spinner":$a},e([ze({type:Boolean,reflect:!0})],Sa.prototype,"multiSelect",void 0),e([ze({type:Boolean,reflect:!0})],Sa.prototype,"badgeFullWidth",void 0),e([ze({type:Boolean,reflect:!0})],Sa.prototype,"clearable",void 0),e([ze({type:Boolean,reflect:!0})],Sa.prototype,"noValidate",void 0),e([ze({type:Boolean,reflect:!0})],Sa.prototype,"async",void 0),e([ze({type:Boolean,reflect:!0})],Sa.prototype,"emptyMenuAsync",void 0),e([ze({type:Number,reflect:!0})],Sa.prototype,"scrollBottomOffset",void 0),e([ze()],Sa.prototype,"filterFunction",void 0),e([
|
|
443
|
+
`}}Sa.styles=[...ha.styles,na,pa],Sa.childName="sgds-combo-box-option",Sa.dependencies={[Sa.childName]:xa,"sgds-icon":xt,"sgds-badge":Si,"sgds-spinner":$a},e([ze({type:Boolean,reflect:!0})],Sa.prototype,"multiSelect",void 0),e([ze({type:Boolean,reflect:!0})],Sa.prototype,"badgeFullWidth",void 0),e([ze({type:Boolean,reflect:!0})],Sa.prototype,"clearable",void 0),e([ze({type:Boolean,reflect:!0})],Sa.prototype,"noValidate",void 0),e([ze({type:Boolean,reflect:!0})],Sa.prototype,"async",void 0),e([ze({type:Boolean,reflect:!0})],Sa.prototype,"emptyMenuAsync",void 0),e([ze({type:Number,reflect:!0})],Sa.prototype,"scrollBottomOffset",void 0),e([ze()],Sa.prototype,"filterFunction",void 0),e([De("input#multi-select-input-tracker")],Sa.prototype,"_multiSelectInput",void 0),e([Ie({flatten:!0,selector:"sgds-combo-box-option"})],Sa.prototype,"options",void 0),e([Ve()],Sa.prototype,"optionList",void 0),e([Ve()],Sa.prototype,"emptyMenuAfterFiltering",void 0),e([Ve()],Sa.prototype,"isFocused",void 0),e([Ve()],Sa.prototype,"isScrollEnd",void 0),e([ot("value",{waitUntilFirstUpdate:!0})],Sa.prototype,"_handleValueChange",null),e([ot("optionList",{waitUntilFirstUpdate:!0})],Sa.prototype,"_handleOptionListChange",null),e([ot("menuList",{waitUntilFirstUpdate:!0})],Sa.prototype,"_handleMenuListChange",null),lt("sgds-combo-box",Sa),lt("sgds-combo-box-option",xa);var Ma=n`:host{--sgds-checkbox-group-gap:var(--sgds-spacer-2)}fieldset{border:0;gap:var(--sgds-form-gap-md);margin:0;min-width:0;padding:0}.label-hint-container,fieldset{display:flex;flex-direction:column}.label-hint-container{gap:var(--sgds-form-gap-sm)}.label-hint-container .form-label{color:var(--sgds-form-color-default);font-size:var(--sgds-font-size-label-md);font-weight:var(--sgds-font-weight-semibold)}.checkbox-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md);padding:var(--sgds-form-padding-inline-sm) 0}.checkbox-group-validation-input{display:none}:host([disabled]) .label-hint-container{cursor:not-allowed;opacity:var(--sgds-opacity-40)}`;class Za extends(da(fa)){constructor(){super(...arguments),this.label="",this.invalidFeedback="Please tick at least one box if you want to proceed",this.hasFeedback=!1,this.hintText="",this.required=!1,this.noValidate=!1,this.value="",this._isTouched=!1,this.defaultValue="",this._blurredCheckboxes=new Set}connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-check",e=>{const{value:t}=e.detail;!this.value.includes(t)&&this._addValue(t)}),this.addEventListener("sgds-uncheck",e=>{const{value:t}=e.detail;this._removeValue(t)}),this.addEventListener("sgds-blur",e=>{const t=e.target;this._blurredCheckboxes.add(t),Array.from(this._blurredCheckboxes).length===this._checkboxes.length&&(this._isTouched=!0,this._blurredCheckboxes.clear())})}firstUpdated(e){super.firstUpdated(e),this.value&&this._updateInputValue(),this.invalid&&this._updateInvalid()}_renderHintText(){const e=ee` <div class="form-text" id="${this._controlId}Help">${this.hintText}</div> `;return this.hintText&&e}_addValue(e){const t=this.value?this.value.split(";"):[];t.push(e),this.value=t.join(";"),this._updateInputValue(),this.emit("sgds-change",{detail:{value:this.value}})}_removeValue(e){const t=(this.value?this.value.split(";"):[]).filter(t=>t!==e);this.value=t.join(";"),this._updateInputValue(),this.emit("sgds-change",{detail:{value:this.value}})}_sanitizeSlot(){this._checkboxes.forEach(e=>{e.checked=e.defaultChecked=this.value.includes(e.value),e.hasFeedback=this.hasFeedback?"style":null,e.required&&(console.error("Checkboxes in a group cannot have required or hasFeedback prop set to true"),e.remove())}),this._disabledChildCheckboxes()}_disabledChildCheckboxes(){if(this.disabled){this._checkboxes.forEach(e=>e.disabled=this.disabled)}}_handleValueChange(){this._checkboxes.forEach(e=>{e.checked=this.value.includes(e.value)}),this._updateInputValue(),this._updateInvalid()}_handleIsTouched(){this._mixinShouldSkipSgdsValidation()||this._isTouched&&(this.invalid=!this.input.checkValidity(),this._updateInvalid())}_updateInvalid(){this._checkboxes.forEach(e=>e.invalid=this.invalid)}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_mixinResetFormControl(){this.value=this.input.value=this.defaultValue,this._updateInputValue("reset"),this._mixinResetValidity(this.input)}async _updateInputValue(e="change"){this.input.value=this.value,this.input.dispatchEvent(new InputEvent(e))}render(){return ee`
|
|
444
444
|
<fieldset>
|
|
445
445
|
<div class="label-hint-container">
|
|
446
446
|
<label class="form-label">${this.label}</label>
|
|
@@ -469,7 +469,7 @@ const _a=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
469
469
|
</div>
|
|
470
470
|
`:ie}
|
|
471
471
|
</fieldset>
|
|
472
|
-
`}}function za(e,t){const s=e.getDate(),i=e.getMonth()+1,a=e.getFullYear(),o=s<10?"0"+s:String(s),n=i<10?"0"+i:String(i),r=String(a);switch(t){case"dd/MM/yyyy":default:return`${o}/${n}/${r}`;case"MM/dd/yyyy":return`${n}/${o}/${r}`;case"yyyy/MM/dd":return`${r}/${n}/${o}`;case"PPPP":{const t=new Intl.DateTimeFormat("en-US",{weekday:"long"}).format(e),s=new Intl.DateTimeFormat("en-US",{month:"long"}).format(e),i=function(e){if(e>=11&&e<=13)return e+"th";switch(e%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd";default:return e+"th"}}(e.getDate());return`${t}, ${s} ${i}, ${e.getFullYear()}`}}}function Va(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function Pa(e,t){return e.getTime()>t.getTime()}function Aa(e,t){return e.getTime()<t.getTime()}function La(e,t){return e.getTime()===t.getTime()}function Ia(e){return e.getDate()===Va(e)}function Da(e){return e instanceof Date&&!isNaN(e.getTime())}function Ea(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function Ba(e,t){const s=e.split("/");let i,a,o;switch(t){case"dd/MM/yyyy":i=parseInt(s[0],10),a=parseInt(s[1],10)-1,o=parseInt(s[2],10);break;case"MM/dd/yyyy":a=parseInt(s[0],10)-1,i=parseInt(s[1],10),o=parseInt(s[2],10);break;case"yyyy/MM/dd":o=parseInt(s[0],10),a=parseInt(s[1],10)-1,i=parseInt(s[2],10);break;default:return new Date(NaN)}if(isNaN(i)||isNaN(a)||isNaN(o))return new Date(NaN);const n=new Date(o,a,i,12,0,0,0);return n.getFullYear()!==o||n.getMonth()!==a||n.getDate()!==i?new Date(NaN):n}Za.styles=[...fa.styles,Ma],Za.dependencies={"sgds-icon":xt},e([ze({reflect:!0})],Za.prototype,"label",void 0),e([ze({type:String,reflect:!0})],Za.prototype,"invalidFeedback",void 0),e([ze({type:Boolean,reflect:!0})],Za.prototype,"hasFeedback",void 0),e([ze({reflect:!0})],Za.prototype,"hintText",void 0),e([ze({type:Boolean,reflect:!0})],Za.prototype,"required",void 0),e([ze({type:Boolean,reflect:!0})],Za.prototype,"noValidate",void 0),e([ze({reflect:!0})],Za.prototype,"value",void 0),e([Ve()],Za.prototype,"_isTouched",void 0),e([ra()],Za.prototype,"defaultValue",void 0),e([Ve()],Za.prototype,"_blurredCheckboxes",void 0),e([De()],Za.prototype,"_checkboxes",void 0),e([ot("value",{waitUntilFirstUpdate:!0})],Za.prototype,"_handleValueChange",null),e([ot("_isTouched",{waitUntilFirstUpdate:!0})],Za.prototype,"_handleIsTouched",null),e([ot("invalid",{waitUntilFirstUpdate:!0})],Za.prototype,"_updateInvalid",null),lt("sgds-checkbox",ya),lt("sgds-checkbox-group",Za),lt("sgds-close-button",ft);const Ha={"DD/MM/YYYY":{imPattern:"`dd{/}`mm{/}`yyyy",imRangePattern:"`dd{/}`mm{/}`yyyy - `DD{/}`MM{/}`YYYY",fnsPattern:"dd/MM/yyyy"},"MM/DD/YYYY":{imPattern:"`mm{/}`dd{/}`yyyy",imRangePattern:"`mm{/}`dd{/}`yyyy - `MM{/}`DD{/}`YYYY",fnsPattern:"MM/dd/yyyy"},"YYYY/MM/DD":{imPattern:"`yyyy{/}`mm{/}`dd",imRangePattern:"`yyyy{/}`mm{/}`dd - `YYYY{/}`MM{/}`DD",fnsPattern:"yyyy/MM/dd"}},Oa=e=>{const t=e.getMonth(),s=e.getFullYear(),i=e.getDate(),a=new Date(s,t+1),o=Va(a);return Ia(e)&&o<i?Ea(a):new Date(s,t+1,i)},Ta=e=>{const t=e.getMonth(),s=e.getFullYear(),i=e.getDate(),a=new Date(s,t-1),o=Va(a);return Ia(e)&&o<i?Ea(a):new Date(s,t-1,i)},Ra=e=>{const t=new Date(e);return t.setHours(12),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t};var Fa=n`.datepicker-body{color:var(--sgds-form-color-default);display:flex;justify-content:center}table{border-collapse:collapse;text-align:center}.monthpicker,.yearpicker{display:grid;grid-template-columns:repeat(3,6rem);grid-template-rows:repeat(4,2.5rem)}.monthpicker [role=row],.yearpicker [role=row]{display:contents}button.month,button.year{background-color:transparent;border:0;border-radius:var(--sgds-form-border-radius-sm);font-size:var(--sgds-font-size-label-sm);line-height:var(--sgds-line-height-2-xs);padding:0;position:relative}button.month.active:not(.selected-ends),button.year.active:not(.selected-ends),td[data-day].active:not(.selected-ends){background-color:var(--sgds-primary-surface-translucent);border-radius:0;cursor:pointer}button.month:hover:not(.active),button.year:hover:not(.active),td[data-day]:hover:not(.disabled):not(.selected-ends):not(.active){background-color:var(--sgds-bg-translucent-subtle);cursor:pointer}button.month:focus:not(.active),button.year:focus:not(.active),td[data-day]:focus:not(.disabled):not(.selected-ends):not(.active){background-color:var(--sgds-bg-translucent-subtle)}button.month:focus-visible,button.year:focus-visible,td[data-day]:focus-visible{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}button.month.active:not(.selected-ends):focus,button.year.active:not(.selected-ends):focus,td[data-day].active:not(.selected-ends):focus{border-radius:var(--sgds-form-border-radius-sm)}button.year.active{background-color:var(--sgds-primary-surface-translucent);cursor:pointer}td,th{border-radius:var(--sgds-form-border-radius-sm);font-size:var(--sgds-font-size-label-sm);height:var(--sgds-form-height-lg);line-height:var(--sgds-line-height-2-xs);padding:0;position:relative;width:var(--sgds-form-width-md)}th{font-weight:var(--sgds-font-weight-semibold)}td[data-day]{cursor:pointer}button.month.active.selected-ends,button.year.active.selected-ends,td[data-day].active.selected-ends{background-color:var(--sgds-form-primary-surface-default);color:var(--sgds-form-color-fixed-light)}button.month.active.selected-ends:focus,button.month.active.selected-ends:hover,button.year.active.selected-ends:focus,button.year.active.selected-ends:hover,td[data-day].active.selected-ends:focus,td[data-day].active.selected-ends:hover{background-color:var(--sgds-form-primary-surface-emphasis)}td[data-day].disabled{cursor:not-allowed;opacity:var(--sgds-opacity-40)}.today{align-items:center;display:flex;flex-direction:column;justify-content:center}.today:after{background-color:var(--sgds-form-primary-surface-default);bottom:6px;content:".";line-height:4px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' fill='none'%3E%3Ccircle cx='2' cy='2' r='2' fill='%235A42C0'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' fill='none'%3E%3Ccircle cx='2' cy='2' r='2' fill='%235A42C0'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;position:absolute;width:4px}.today.active.selected-ends:after{background-color:var(--sgds-form-color-inverse)}`;const Na=new Date,ja={ArrowUp:{days:-7,months:-3,years:-3},ArrowDown:{days:7,months:3,years:3},ArrowRight:{days:1,months:1,years:1},ArrowLeft:{days:-1,months:-1,years:-1}};class Ua extends He{constructor(){super(...arguments),this.selectedDate=[],this.mode="single"}focusOnCalendar(e){e.blur(),this._focusOnCalendarCell()}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._handleKeyPress),this.addEventListener("blur",e=>e.stopPropagation())}updated(){3===this.focusedTabIndex&&this._focusOnCalendarCell()}_updateFocusedDate(){this.focusedDate=Ra(this.displayDate),this.focusedDate.getFullYear()<1900&&this.focusedDate.setFullYear(1900)}_setFocusedDate(e){const t=this.focusedDate.getDate(),s=this.focusedDate.getMonth(),i=this.focusedDate.getFullYear();switch(this.view){case"days":{const a=Ra(new Date(i,s,t+e));(Pa(a,new Date(0,0,1,12))||La(a,new Date(0,0,1,12)))&&(this.focusedDate=a);break}case"months":{const a=Ra(new Date(i,s+e,t));(Pa(a,new Date(0,0,1,12))||La(a,new Date(0,0,1,12)))&&(this.focusedDate=a);break}case"years":{const a=Ra(new Date(i+e,s,t));a.getFullYear()>=1900&&(this.focusedDate=a);break}}}_handleEnterDateKeyboard(e){const t=e.composedPath()[0];if(!t.classList.contains("disabled"))switch(this.view){case"days":this._onClickDay(e);break;case"months":{const{month:e}=t.dataset;this._onClickMonth(parseInt(e));break}case"years":{const{year:e}=t.dataset;this._onClickYear(parseInt(e))}}}_handleKeyPress(e){if("Enter"===e.key)return e.preventDefault(),void this._handleEnterDateKeyboard(e);if("Tab"===e.key){const e=this._getFocusedTarget();return void(3!==this.focusedTabIndex&&e.blur())}if(e.key.includes("Arrow")){e.preventDefault(),this._blurCalendarCell();const t=ja[e.key][this.view];this._setFocusedDate(t),this._focusOnCalendarCell()}}_generateIncrementDates(){const e=Ra(this.selectedDate[0]);if(this.selectedDate.length<2)return[e];const t=Ra(this.selectedDate[1]),s=[];if(e.getTime()<t.getTime())for(let i=e;i<=t;i.setDate(i.getDate()+1))s.push(new Date(i));else for(let i=t;i<=e;i.setDate(i.getDate()+1))s.push(new Date(i));return s}_onClickDay(e){const{day:t,date:s}=e.composedPath()[0].dataset,i=new Date(this.displayDate);if(i.setDate(parseInt(t)),"click"===e.type&&(this.focusedDate=Ra(new Date(s))),"single"===this.mode)this.selectedDate=[i],this.emit("sgds-selectdates",{detail:this.selectedDate});else if("range"===this.mode){const e=[...this.selectedDate];0!==e.length&&2!==e.length||(e.length=0),e.push(i),this.selectedDate=e,this.emit("sgds-selectdates",{detail:this.selectedDate})}const a=this.minDate?Ra(new Date(this.minDate)):null,o=this.maxDate?Ra(new Date(this.maxDate)):null,n=Ra(i);(a&&n<a||o&&n>o)&&(e.stopPropagation(),e.preventDefault())}_onClickMonth(e,t=this.focusedDate.getFullYear()){const s=new Date(this.displayDate);this.view="days",s.setMonth(e),s.setFullYear(t),this.displayDate=s,this.emit("sgds-view",{detail:this.view}),this.emit("sgds-selectmonth",{detail:this.displayDate})}_onClickYear(e){const t=new Date(this.displayDate);t.setFullYear(e),this.displayDate=t,this.view="months",this.emit("sgds-view",{detail:this.view}),this.emit("sgds-selectyear",{detail:this.displayDate})}_getFocusedTarget(){const e={days:`td[data-date="${this.focusedDate.toISOString()}"]`,months:`button[data-month="${this.focusedDate.getMonth()}"][data-year="${this.focusedDate.getFullYear()}"]`,years:`button[data-year="${this.focusedDate.getFullYear()}"]`}[this.view];return this.shadowRoot.querySelector(`${e}`)}_blurCalendarCell(){const e=this._getFocusedTarget();e.setAttribute("tabindex","-1"),e.blur()}_focusOnCalendarCell(){const e=this._getFocusedTarget();e?(e.setAttribute("tabindex","0"),e.focus(),this.emit("sgds-update-focus",{detail:this.focusedDate})):this.emit("sgds-change-calendar",{detail:this.focusedDate})}_generateDays(){const e=this.selectedDate.map(e=>Ra(e)),t=this._generateIncrementDates(),s=this.minDate?Ra(new Date(this.minDate)):null,i=this.maxDate?Ra(new Date(this.maxDate)):null,a=this.displayDate.getFullYear(),o=this.displayDate.getMonth(),n=new Date(a,o,1).getDay();let r=Ua.daysInMonth[o];1===o&&(a%4==0&&a%100!=0||a%400==0)&&(r=29);const l=[];let d=1;for(let c=0;c<9;c++){const h=[];for(let l=0;l<=6;l++)if(d<=r&&(c>0||l>=n)){const n=new Date(a,o,d,12,0,0,0),r=n.toISOString(),c=s&&Date.parse(r)<Date.parse(s.toISOString()),p=i&&Date.parse(r)>Date.parse(i.toISOString()),g=c||p?void 0:this._onClickDay,u=Na.getMonth()===this.displayDate.getMonth(),v=Na.getFullYear()===this.displayDate.getFullYear(),m=Na.getDate()===d,f=e.length>0&&t.some(e=>Date.parse(r)===Date.parse(e.toISOString())),b=e.length>0&&t[0].toISOString()===r,w=e.length>1&&t[t.length-1].toISOString()===r,y=""+(m&&u&&v?"Today's date, ":"")+za(n,"PPPP");h.push(ee`<td
|
|
472
|
+
`}}function za(e,t){const s=e.getDate(),i=e.getMonth()+1,a=e.getFullYear(),o=s<10?"0"+s:String(s),n=i<10?"0"+i:String(i),r=String(a);switch(t){case"dd/MM/yyyy":default:return`${o}/${n}/${r}`;case"MM/dd/yyyy":return`${n}/${o}/${r}`;case"yyyy/MM/dd":return`${r}/${n}/${o}`;case"PPPP":{const t=new Intl.DateTimeFormat("en-US",{weekday:"long"}).format(e),s=new Intl.DateTimeFormat("en-US",{month:"long"}).format(e),i=function(e){if(e>=11&&e<=13)return e+"th";switch(e%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd";default:return e+"th"}}(e.getDate());return`${t}, ${s} ${i}, ${e.getFullYear()}`}}}function Va(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function Pa(e,t){return e.getTime()>t.getTime()}function Aa(e,t){return e.getTime()<t.getTime()}function La(e,t){return e.getTime()===t.getTime()}function Da(e){return e.getDate()===Va(e)}function Ia(e){return e instanceof Date&&!isNaN(e.getTime())}function Ea(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function Ba(e,t){const s=e.split("/");let i,a,o;switch(t){case"dd/MM/yyyy":i=parseInt(s[0],10),a=parseInt(s[1],10)-1,o=parseInt(s[2],10);break;case"MM/dd/yyyy":a=parseInt(s[0],10)-1,i=parseInt(s[1],10),o=parseInt(s[2],10);break;case"yyyy/MM/dd":o=parseInt(s[0],10),a=parseInt(s[1],10)-1,i=parseInt(s[2],10);break;default:return new Date(NaN)}if(isNaN(i)||isNaN(a)||isNaN(o))return new Date(NaN);const n=new Date(o,a,i,12,0,0,0);return n.getFullYear()!==o||n.getMonth()!==a||n.getDate()!==i?new Date(NaN):n}Za.styles=[...fa.styles,Ma],Za.dependencies={"sgds-icon":xt},e([ze({reflect:!0})],Za.prototype,"label",void 0),e([ze({type:String,reflect:!0})],Za.prototype,"invalidFeedback",void 0),e([ze({type:Boolean,reflect:!0})],Za.prototype,"hasFeedback",void 0),e([ze({reflect:!0})],Za.prototype,"hintText",void 0),e([ze({type:Boolean,reflect:!0})],Za.prototype,"required",void 0),e([ze({type:Boolean,reflect:!0})],Za.prototype,"noValidate",void 0),e([ze({reflect:!0})],Za.prototype,"value",void 0),e([Ve()],Za.prototype,"_isTouched",void 0),e([ra()],Za.prototype,"defaultValue",void 0),e([Ve()],Za.prototype,"_blurredCheckboxes",void 0),e([Ie()],Za.prototype,"_checkboxes",void 0),e([ot("value",{waitUntilFirstUpdate:!0})],Za.prototype,"_handleValueChange",null),e([ot("_isTouched",{waitUntilFirstUpdate:!0})],Za.prototype,"_handleIsTouched",null),e([ot("invalid",{waitUntilFirstUpdate:!0})],Za.prototype,"_updateInvalid",null),lt("sgds-checkbox",ya),lt("sgds-checkbox-group",Za),lt("sgds-close-button",ft);const Ha={"DD/MM/YYYY":{imPattern:"`dd{/}`mm{/}`yyyy",imRangePattern:"`dd{/}`mm{/}`yyyy - `DD{/}`MM{/}`YYYY",fnsPattern:"dd/MM/yyyy"},"MM/DD/YYYY":{imPattern:"`mm{/}`dd{/}`yyyy",imRangePattern:"`mm{/}`dd{/}`yyyy - `MM{/}`DD{/}`YYYY",fnsPattern:"MM/dd/yyyy"},"YYYY/MM/DD":{imPattern:"`yyyy{/}`mm{/}`dd",imRangePattern:"`yyyy{/}`mm{/}`dd - `YYYY{/}`MM{/}`DD",fnsPattern:"yyyy/MM/dd"}},Oa=e=>{const t=e.getMonth(),s=e.getFullYear(),i=e.getDate(),a=new Date(s,t+1),o=Va(a);return Da(e)&&o<i?Ea(a):new Date(s,t+1,i)},Ta=e=>{const t=e.getMonth(),s=e.getFullYear(),i=e.getDate(),a=new Date(s,t-1),o=Va(a);return Da(e)&&o<i?Ea(a):new Date(s,t-1,i)},Ra=e=>{const t=new Date(e);return t.setHours(12),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t};var Fa=n`.datepicker-body{color:var(--sgds-form-color-default);display:flex;justify-content:center}table{border-collapse:collapse;text-align:center}.monthpicker,.yearpicker{display:grid;grid-template-columns:repeat(3,6rem);grid-template-rows:repeat(4,2.5rem)}.monthpicker [role=row],.yearpicker [role=row]{display:contents}button.month,button.year{background-color:transparent;border:0;border-radius:var(--sgds-form-border-radius-sm);font-size:var(--sgds-font-size-label-sm);line-height:var(--sgds-line-height-2-xs);padding:0;position:relative}button.month.active:not(.selected-ends),button.year.active:not(.selected-ends),td[data-day].active:not(.selected-ends){background-color:var(--sgds-primary-surface-translucent);border-radius:0;cursor:pointer}button.month:hover:not(.active),button.year:hover:not(.active),td[data-day]:hover:not(.disabled):not(.selected-ends):not(.active){background-color:var(--sgds-bg-translucent-subtle);cursor:pointer}button.month:focus:not(.active),button.year:focus:not(.active),td[data-day]:focus:not(.disabled):not(.selected-ends):not(.active){background-color:var(--sgds-bg-translucent-subtle)}button.month:focus-visible,button.year:focus-visible,td[data-day]:focus-visible{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}button.month.active:not(.selected-ends):focus,button.year.active:not(.selected-ends):focus,td[data-day].active:not(.selected-ends):focus{border-radius:var(--sgds-form-border-radius-sm)}button.year.active{background-color:var(--sgds-primary-surface-translucent);cursor:pointer}td,th{border-radius:var(--sgds-form-border-radius-sm);font-size:var(--sgds-font-size-label-sm);height:var(--sgds-form-height-lg);line-height:var(--sgds-line-height-2-xs);padding:0;position:relative;width:var(--sgds-form-width-md)}th{font-weight:var(--sgds-font-weight-semibold)}td[data-day]{cursor:pointer}button.month.active.selected-ends,button.year.active.selected-ends,td[data-day].active.selected-ends{background-color:var(--sgds-form-primary-surface-default);color:var(--sgds-form-color-fixed-light)}button.month.active.selected-ends:focus,button.month.active.selected-ends:hover,button.year.active.selected-ends:focus,button.year.active.selected-ends:hover,td[data-day].active.selected-ends:focus,td[data-day].active.selected-ends:hover{background-color:var(--sgds-form-primary-surface-emphasis)}td[data-day].disabled{cursor:not-allowed;opacity:var(--sgds-opacity-40)}.today{align-items:center;display:flex;flex-direction:column;justify-content:center}.today:after{background-color:var(--sgds-form-primary-surface-default);bottom:6px;content:".";line-height:4px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' fill='none'%3E%3Ccircle cx='2' cy='2' r='2' fill='%235A42C0'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' fill='none'%3E%3Ccircle cx='2' cy='2' r='2' fill='%235A42C0'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;position:absolute;width:4px}.today.active.selected-ends:after{background-color:var(--sgds-form-color-inverse)}`;const Na=new Date,ja={ArrowUp:{days:-7,months:-3,years:-3},ArrowDown:{days:7,months:3,years:3},ArrowRight:{days:1,months:1,years:1},ArrowLeft:{days:-1,months:-1,years:-1}};class Ua extends He{constructor(){super(...arguments),this.selectedDate=[],this.mode="single"}focusOnCalendar(e){e.blur(),this._focusOnCalendarCell()}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._handleKeyPress),this.addEventListener("blur",e=>e.stopPropagation())}updated(){3===this.focusedTabIndex&&this._focusOnCalendarCell()}_updateFocusedDate(){this.focusedDate=Ra(this.displayDate),this.focusedDate.getFullYear()<1900&&this.focusedDate.setFullYear(1900)}_setFocusedDate(e){const t=this.focusedDate.getDate(),s=this.focusedDate.getMonth(),i=this.focusedDate.getFullYear();switch(this.view){case"days":{const a=Ra(new Date(i,s,t+e));(Pa(a,new Date(0,0,1,12))||La(a,new Date(0,0,1,12)))&&(this.focusedDate=a);break}case"months":{const a=Ra(new Date(i,s+e,t));(Pa(a,new Date(0,0,1,12))||La(a,new Date(0,0,1,12)))&&(this.focusedDate=a);break}case"years":{const a=Ra(new Date(i+e,s,t));a.getFullYear()>=1900&&(this.focusedDate=a);break}}}_handleEnterDateKeyboard(e){const t=e.composedPath()[0];if(!t.classList.contains("disabled"))switch(this.view){case"days":this._onClickDay(e);break;case"months":{const{month:e}=t.dataset;this._onClickMonth(parseInt(e));break}case"years":{const{year:e}=t.dataset;this._onClickYear(parseInt(e))}}}_handleKeyPress(e){if("Enter"===e.key)return e.preventDefault(),void this._handleEnterDateKeyboard(e);if("Tab"===e.key){const e=this._getFocusedTarget();return void(3!==this.focusedTabIndex&&e.blur())}if(e.key.includes("Arrow")){e.preventDefault(),this._blurCalendarCell();const t=ja[e.key][this.view];this._setFocusedDate(t),this._focusOnCalendarCell()}}_generateIncrementDates(){const e=Ra(this.selectedDate[0]);if(this.selectedDate.length<2)return[e];const t=Ra(this.selectedDate[1]),s=[];if(e.getTime()<t.getTime())for(let i=e;i<=t;i.setDate(i.getDate()+1))s.push(new Date(i));else for(let i=t;i<=e;i.setDate(i.getDate()+1))s.push(new Date(i));return s}_onClickDay(e){const{day:t,date:s}=e.composedPath()[0].dataset,i=new Date(this.displayDate);if(i.setDate(parseInt(t)),"click"===e.type&&(this.focusedDate=Ra(new Date(s))),"single"===this.mode)this.selectedDate=[i],this.emit("sgds-selectdates",{detail:this.selectedDate});else if("range"===this.mode){const e=[...this.selectedDate];0!==e.length&&2!==e.length||(e.length=0),e.push(i),this.selectedDate=e,this.emit("sgds-selectdates",{detail:this.selectedDate})}const a=this.minDate?Ra(new Date(this.minDate)):null,o=this.maxDate?Ra(new Date(this.maxDate)):null,n=Ra(i);(a&&n<a||o&&n>o)&&(e.stopPropagation(),e.preventDefault())}_onClickMonth(e,t=this.focusedDate.getFullYear()){const s=new Date(this.displayDate);this.view="days",s.setMonth(e),s.setFullYear(t),this.displayDate=s,this.emit("sgds-view",{detail:this.view}),this.emit("sgds-selectmonth",{detail:this.displayDate})}_onClickYear(e){const t=new Date(this.displayDate);t.setFullYear(e),this.displayDate=t,this.view="months",this.emit("sgds-view",{detail:this.view}),this.emit("sgds-selectyear",{detail:this.displayDate})}_getFocusedTarget(){const e={days:`td[data-date="${this.focusedDate.toISOString()}"]`,months:`button[data-month="${this.focusedDate.getMonth()}"][data-year="${this.focusedDate.getFullYear()}"]`,years:`button[data-year="${this.focusedDate.getFullYear()}"]`}[this.view];return this.shadowRoot.querySelector(`${e}`)}_blurCalendarCell(){const e=this._getFocusedTarget();e.setAttribute("tabindex","-1"),e.blur()}_focusOnCalendarCell(){const e=this._getFocusedTarget();e?(e.setAttribute("tabindex","0"),e.focus(),this.emit("sgds-update-focus",{detail:this.focusedDate})):this.emit("sgds-change-calendar",{detail:this.focusedDate})}_generateDays(){const e=this.selectedDate.map(e=>Ra(e)),t=this._generateIncrementDates(),s=this.minDate?Ra(new Date(this.minDate)):null,i=this.maxDate?Ra(new Date(this.maxDate)):null,a=this.displayDate.getFullYear(),o=this.displayDate.getMonth(),n=new Date(a,o,1).getDay();let r=Ua.daysInMonth[o];1===o&&(a%4==0&&a%100!=0||a%400==0)&&(r=29);const l=[];let d=1;for(let c=0;c<9;c++){const h=[];for(let l=0;l<=6;l++)if(d<=r&&(c>0||l>=n)){const n=new Date(a,o,d,12,0,0,0),r=n.toISOString(),c=s&&Date.parse(r)<Date.parse(s.toISOString()),p=i&&Date.parse(r)>Date.parse(i.toISOString()),g=c||p?void 0:this._onClickDay,u=Na.getMonth()===this.displayDate.getMonth(),v=Na.getFullYear()===this.displayDate.getFullYear(),m=Na.getDate()===d,f=e.length>0&&t.some(e=>Date.parse(r)===Date.parse(e.toISOString())),b=e.length>0&&t[0].toISOString()===r,w=e.length>1&&t[t.length-1].toISOString()===r,y=""+(m&&u&&v?"Today's date, ":"")+za(n,"PPPP");h.push(ee`<td
|
|
473
473
|
key=${l}
|
|
474
474
|
data-date=${r}
|
|
475
475
|
data-day=${d}
|
|
@@ -663,7 +663,7 @@ const _a=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
663
663
|
</div>
|
|
664
664
|
${this._renderFeedback()}
|
|
665
665
|
</div>
|
|
666
|
-
`}}Qa.styles=[...fa.styles,na,ma,Xa],Qa.dependencies={"sgds-spinner":$a,"sgds-icon":xt},e([ze({reflect:!0})],Qa.prototype,"type",void 0),e([ze({type:String})],Qa.prototype,"prefix",void 0),e([ze({type:String})],Qa.prototype,"suffix",void 0),e([ze({type:Number,reflect:!0})],Qa.prototype,"minlength",void 0),e([ze({type:Number,reflect:!0})],Qa.prototype,"maxlength",void 0),e([ze()],Qa.prototype,"min",void 0),e([ze()],Qa.prototype,"max",void 0),e([ze({type:String,reflect:!0})],Qa.prototype,"placeholder",void 0),e([ze({type:String})],Qa.prototype,"pattern",void 0),e([ze({type:Boolean,reflect:!0})],Qa.prototype,"autofocus",void 0),e([ze({type:Boolean,reflect:!0})],Qa.prototype,"readonly",void 0),e([ze({type:String,reflect:!0})],Qa.prototype,"autocomplete",void 0),e([ze()],Qa.prototype,"step",void 0),e([ze({type:String,reflect:!0})],Qa.prototype,"hasFeedback",void 0),e([ze({type:String,reflect:!0})],Qa.prototype,"invalidFeedback",void 0),e([ra()],Qa.prototype,"defaultValue",void 0),e([ze({type:Boolean,reflect:!0})],Qa.prototype,"valid",void 0),e([ze({type:Boolean,reflect:!0})],Qa.prototype,"loading",void 0),e([ze({type:Boolean,reflect:!0})],Qa.prototype,"required",void 0),e([ze({type:Boolean,reflect:!0})],Qa.prototype,"noValidate",void 0),e([ze({reflect:!0})],Qa.prototype,"value",void 0),e([Ve()],Qa.prototype,"_isTouched",void 0),e([Ve()],Qa.prototype,"_showPassword",void 0),e([ot("_isTouched",{waitUntilFirstUpdate:!0})],Qa.prototype,"_handleIsTouched",null),e([ot("disabled",{waitUntilFirstUpdate:!0})],Qa.prototype,"_handleDisabledChange",null);var eo=n`.datepicker-input-container{display:flex;flex-direction:row;width:-webkit-fill-available;width:-moz-available}.datepicker-input-container .form-control-group{border-right:0}.calendar-btn{all:unset}`;class to extends Qa{constructor(){super(),this.dateFormat="DD/MM/YYYY",this.mode="single",this._validateInput=async()=>{const e=this.mask.value.split(" - ").filter(e=>e!==this.dateFormat),t=e.map(e=>Ra(Ba(e,Ha[this.dateFormat].fnsPattern))),s=t.filter(e=>!
|
|
666
|
+
`}}Qa.styles=[...fa.styles,na,ma,Xa],Qa.dependencies={"sgds-spinner":$a,"sgds-icon":xt},e([ze({reflect:!0})],Qa.prototype,"type",void 0),e([ze({type:String})],Qa.prototype,"prefix",void 0),e([ze({type:String})],Qa.prototype,"suffix",void 0),e([ze({type:Number,reflect:!0})],Qa.prototype,"minlength",void 0),e([ze({type:Number,reflect:!0})],Qa.prototype,"maxlength",void 0),e([ze()],Qa.prototype,"min",void 0),e([ze()],Qa.prototype,"max",void 0),e([ze({type:String,reflect:!0})],Qa.prototype,"placeholder",void 0),e([ze({type:String})],Qa.prototype,"pattern",void 0),e([ze({type:Boolean,reflect:!0})],Qa.prototype,"autofocus",void 0),e([ze({type:Boolean,reflect:!0})],Qa.prototype,"readonly",void 0),e([ze({type:String,reflect:!0})],Qa.prototype,"autocomplete",void 0),e([ze()],Qa.prototype,"step",void 0),e([ze({type:String,reflect:!0})],Qa.prototype,"hasFeedback",void 0),e([ze({type:String,reflect:!0})],Qa.prototype,"invalidFeedback",void 0),e([ra()],Qa.prototype,"defaultValue",void 0),e([ze({type:Boolean,reflect:!0})],Qa.prototype,"valid",void 0),e([ze({type:Boolean,reflect:!0})],Qa.prototype,"loading",void 0),e([ze({type:Boolean,reflect:!0})],Qa.prototype,"required",void 0),e([ze({type:Boolean,reflect:!0})],Qa.prototype,"noValidate",void 0),e([ze({reflect:!0})],Qa.prototype,"value",void 0),e([Ve()],Qa.prototype,"_isTouched",void 0),e([Ve()],Qa.prototype,"_showPassword",void 0),e([ot("_isTouched",{waitUntilFirstUpdate:!0})],Qa.prototype,"_handleIsTouched",null),e([ot("disabled",{waitUntilFirstUpdate:!0})],Qa.prototype,"_handleDisabledChange",null);var eo=n`.datepicker-input-container{display:flex;flex-direction:row;width:-webkit-fill-available;width:-moz-available}.datepicker-input-container .form-control-group{border-right:0}.calendar-btn{all:unset}`;class to extends Qa{constructor(){super(),this.dateFormat="DD/MM/YYYY",this.mode="single",this._validateInput=async()=>{const e=this.mask.value.split(" - ").filter(e=>e!==this.dateFormat),t=e.map(e=>Ra(Ba(e,Ha[this.dateFormat].fnsPattern))),s=t.filter(e=>!Ia(e)||Aa(e,new Date(0,0,1))||Aa(e,Ra(new Date(this.minDate)))||Pa(e,Ra(new Date(this.maxDate))));return s.length>0||"range"===this.mode&&1===t.length?(this.setInvalid(!0),this.emit("i-sgds-invalid-input")):0===s.length&&t.length>0?(this.setInvalid(!1),this.emit("i-sgds-selectdates-input",{detail:t})):0===t.length&&0===s.length?(this.setInvalid(!1),this.emit("i-sgds-empty-input")):void 0},this.type="text"}_handleBlur(){const e=this.mask.value.split(" - ").filter(e=>e!==this.dateFormat),t=e.map(e=>Ra(Ba(e,Ha[this.dateFormat].fnsPattern))),s=t.filter(e=>!Ia(e)||Aa(e,new Date(0,0,1))||Aa(e,Ra(new Date(this.minDate)))||Pa(e,Ra(new Date(this.maxDate))));this.mask.masked.isComplete&&s.length>0&&t.length>0&&(this.value="",this.mask.value="",this.setInvalid(!1)),this.emit("sgds-blur")}async _handleChange(e){this.value=this.input.value,this.emit("sgds-change"),super._mixinHandleChange(e),await this._validateInput()}async firstUpdated(e){super.firstUpdated(e),this._applyInputMask(this.dateFormat)}async _applyInputMask(e){const t=await this.shadowInput,s="single"===this.mode?Ha[e].imPattern:Ha[e].imRangePattern;this.mask=new Ja(t,{pattern:s}),this.mask.on("accept",()=>{this.value=this.mask.masked.value,this.emit("i-sgds-mask-input-change",{detail:this.value})}),this.mask.on("complete",this._validateInput)}updateMaskValue(){var e;null===(e=this.mask)||void 0===e||e.updateValue()}destroyInputMask(){var e;null===(e=this.mask)||void 0===e||e.destroy()}async applyInputMask(){return await this._applyInputMask(this.dateFormat)}async focus(){return(await this.shadowInput).focus()}render(){return ee`
|
|
667
667
|
<div
|
|
668
668
|
class="form-control-container ${Ke({disabled:this.disabled})}"
|
|
669
669
|
>
|
|
@@ -674,7 +674,7 @@ const _a=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
674
674
|
</div>
|
|
675
675
|
${this._renderFeedback()}
|
|
676
676
|
</div>
|
|
677
|
-
`}}to.styles=[...Qa.styles,eo],e([ze({type:String})],to.prototype,"minDate",void 0),e([ze({type:String})],to.prototype,"maxDate",void 0),e([ze({type:String,reflect:!0})],to.prototype,"mode",void 0),e([
|
|
677
|
+
`}}to.styles=[...Qa.styles,eo],e([ze({type:String})],to.prototype,"minDate",void 0),e([ze({type:String})],to.prototype,"maxDate",void 0),e([ze({type:String,reflect:!0})],to.prototype,"mode",void 0),e([De("input")],to.prototype,"shadowInput",void 0);var so=n`:host{--datepicker-theme-color:var(--sgds-primary);--datepicker-hover-bg:var(--sgds-primary-100);--datepicker-bg:#fff;--datepicker-close-btn-bg:var(--datepicker-theme-color);--datepicker-close-btn-hover-bg:var(--sgds-primary-700);--datepicker-close-btn-color:#fff;--datepicker-selected-date-bg:var(--sgds-primary);--datepicker-selected-date-color:#fff}:host([menuisopen]:not([disabled]):not([readonly])) .dropdown-menu{background-color:var(--sgds-form-surface-default);display:flex;flex-direction:column;gap:var(--sgds-form-gap-sm);overflow:unset;padding:var(--sgds-form-padding-y) var(--sgds-form-padding-x);width:var(--sgds-dimension-320)}.dropdown{display:flex;height:100%}sgds-datepicker-input{--input-border-radius:var(--sgds-form-border-radius-md) 0 0 var(--sgds-form-border-radius-md);flex:1;margin-right:0}sgds-icon-button{--btn-border-radius:0 var(--sgds-form-border-radius-md) var(--sgds-form-border-radius-md) 0}.m-width-160{min-width:var(--sgds-dimension-160)}`;class io extends(da(zi)){constructor(){super(),this.required=!1,this.disabled=!1,this.noValidate=!1,this.value="",this.initialValue=[],this.dateFormat="DD/MM/YYYY",this.minDate="",this.maxDate="",this.mode="single",this.hasFeedback=!1,this.label="",this.hintText="",this.noFlip=!1,this.drop="down",this.defaultValue="",this.invalid=!1,this.view="days",this.selectedDateRange=[],this.focusedTabIndex=3,this.initialDisplayDate=new Date,this._makeInputValueString=(e,t,s)=>{if(!e&&!t)return this.value;const i=e=>za(e,Ha[s].fnsPattern);switch(this.mode){case"single":e&&(this.value=i(e));break;case"range":e&&t&&(this.value=`${i(e)} - ${i(t)}`),e&&!t&&(this.value=`${i(e)} - ${this.dateFormat}`)}return this.value},this._dialogAriaLabels={days:"Choose date",months:"Choose month",years:"Choose year"},this.floatingOpts={placement:"bottom-end"}}isValueEmpty(){return""===this.value||"DD/MM/YYYY"===this.value||"DD/MM/YYYY - DD/MM/YYYY"===this.value}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}setInvalid(e){this.invalid=e,this.datepickerInput&&this.datepickerInput.setInvalid(e)}setValidity(e,t,s){return this._mixinSetValidity(e,t,s)}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}async connectedCallback(){if(super.connectedCallback(),this.addEventListener("sgds-view",this._handleViewChanged),this.addEventListener("sgds-change-calendar",this._handleDateChanged),this.addEventListener("sgds-update-focus",this._handleFocusDateChanged),this.addEventListener("sgds-selectmonth",this._handleSelectMonth),this.addEventListener("sgds-selectyear",this._handleSelectYear),this.addEventListener("sgds-selectdates",this._handleSelectDatesAndClose),this.addEventListener("i-sgds-selectdates-input",this._handleSelectDatesInput),this.addEventListener("i-sgds-empty-input",this._handleEmptyInput),this.addEventListener("keydown",this._handleTab),this.addEventListener("sgds-hide",this._handleCloseMenu),this.addEventListener("sgds-show",this._handleOpenMenu),this.addEventListener("blur",this._mixinCheckValidity),this.initialValue=this.value?this.value.split(" - ").map(e=>e.trim()):this.initialValue,this.initialDisplayDate=this.displayDate||new Date,this.initialValue&&this.initialValue.length>0){const e=new RegExp(this._getDateFormatRegex()),t=this.initialValue.filter(t=>!e.test(t));if(t.length>0)return console.error("Invalid date format in initialValue:",t);{const e=this.initialValue.map(e=>Ra(Ba(e,Ha[this.dateFormat].fnsPattern)));this._handleSelectDates(e)}}else this.displayDate=this.initialDisplayDate;(await this.datepickerInputAsync).setInvalid(this.invalid)}async firstUpdated(e){if(super.firstUpdated(e),this.menuIsOpen){const e=await this.datepickerInputAsync;await this.updateFloatingPosition();(await this.calendar).focusOnCalendar(e)}}_getDateFormatRegex(){return this.dateFormat.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace("MM","\\d{2}").replace("DD","\\d{2}").replace("YYYY","\\d{4}").replace("/","\\/")}_handleTab(e){if(!this.menuIsOpen)return;const t=Array(4);e.shiftKey&&"Tab"===e.key?(e.preventDefault(),this.focusedTabIndex=(this.focusedTabIndex-1+t.length)%t.length):"Tab"===e.key&&(e.preventDefault(),this.focusedTabIndex=(this.focusedTabIndex+1+t.length)%t.length)}_handleValueChange(){this.emit("sgds-change-date")}async _handleCloseMenu(){if(0===this.selectedDateRange.length)this.displayDate=this.initialDisplayDate;else{const e=this.selectedDateRange.length;this.displayDate=this.selectedDateRange[e-1];(await this.calendar)._updateFocusedDate()}await this.updateComplete;(await this.datepickerInputAsync).focus()}async _handleOpenMenu(){const e=await this.calendar,t=await this.datepickerInputAsync;e.focusOnCalendar(t)}_handleSelectDatesInput(e){this._handleSelectDates(e.detail)}async _handleSelectDates(e){e.sort((e,t)=>e.getTime()-t.getTime()),this.displayDate=e[0],this.focusedDate=e[0],this.selectedDateRange=e;const t=this._makeInputValueString(this.selectedDateRange[0],this.selectedDateRange[1],this.dateFormat);this.value=t;(await this.datepickerInputAsync).updateMaskValue(),this._manageInternalsValid()}async _handleSelectDatesAndClose(e){await this._handleSelectDates(e.detail),("range"===this.mode&&2===this.selectedDateRange.length||"single"===this.mode&&1===this.selectedDateRange.length)&&this.hideMenu()}_handleViewChanged(e){this.view=e.detail}_handleDateChanged(e){this.displayDate=e.detail}_handleFocusDateChanged(e){this.focusedDate=e.detail}_handleSelectMonth(e){this.displayDate=e.detail}_handleSelectYear(e){this.displayDate=e.detail}async _handleInvalidInput(){this.selectedDateRange=[],this.displayDate=this.initialDisplayDate,this._mixinShouldSkipSgdsValidation()||(this.invalid=!0,this._manageInternalsBadInput())}async _handleEmptyInput(){this.required&&this._manageEmptyInput()}async _resetDatepicker(e=""){this.displayDate=this.initialDisplayDate,this.selectedDateRange=[],this.value=e,this.view="days";const t=await this.datepickerInputAsync;t.setInvalid(this.invalid),t.destroyInputMask(),await t.applyInputMask(),this._mixinResetValidity(t),this.isValueEmpty()&&this._handleEmptyInput()}_manageInternalsBadInput(){this._mixinSetValidity({badInput:!0},"Invalid date input",this.datepickerInput)}_manageEmptyInput(){this._mixinSetValidity({valueMissing:!0},"Please fill in this field",this.datepickerInput)}_manageInternalsValid(){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||(this._mixinSetValidity({}),this.invalid=this.datepickerInput.invalid=!1)}async _mixinResetFormControl(){this._resetDatepicker(this.defaultValue)}async _handleInputMaskChange(e){this.value=e.detail,this.isValueEmpty()&&this._resetDatepicker()}render(){return ee`
|
|
678
678
|
<div class="datepicker-container m-width-160">
|
|
679
679
|
<sgds-datepicker-input
|
|
680
680
|
.value=${ia(this.value)}
|
|
@@ -738,7 +738,7 @@ const _a=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
738
738
|
></sgds-datepicker-calendar>
|
|
739
739
|
</div>
|
|
740
740
|
</div>
|
|
741
|
-
`}}io.styles=[...zi.styles,Pi,so],io.dependencies={"sgds-datepicker-input":to,"sgds-datepicker-calendar":Ua,"sgds-datepicker-header":Wa,"sgds-button":Yi,"sgds-icon-button":Ya},e([ze({type:Boolean,reflect:!0})],io.prototype,"required",void 0),e([ze({reflect:!0})],io.prototype,"name",void 0),e([ze({type:Boolean,reflect:!0})],io.prototype,"disabled",void 0),e([ze({type:Boolean,reflect:!0})],io.prototype,"noValidate",void 0),e([ze({type:String,reflect:!0})],io.prototype,"value",void 0),e([ze({type:Array,reflect:!0})],io.prototype,"initialValue",void 0),e([ze({type:String})],io.prototype,"minDate",void 0),e([ze({type:String})],io.prototype,"maxDate",void 0),e([ze({type:String,reflect:!0})],io.prototype,"mode",void 0),e([ze({type:String,reflect:!0})],io.prototype,"invalidFeedback",void 0),e([ze({type:Boolean,reflect:!0})],io.prototype,"hasFeedback",void 0),e([ze({reflect:!0})],io.prototype,"label",void 0),e([ze({reflect:!0})],io.prototype,"hintText",void 0),e([ze({type:Boolean,reflect:!0,state:!1})],io.prototype,"noFlip",void 0),e([ze({type:String,reflect:!0,state:!1})],io.prototype,"drop",void 0),e([ze({attribute:!1})],io.prototype,"displayDate",void 0),e([ra()],io.prototype,"defaultValue",void 0),e([ze({type:Boolean,reflect:!0})],io.prototype,"invalid",void 0),e([Ve()],io.prototype,"view",void 0),e([Ve()],io.prototype,"selectedDateRange",void 0),e([Ve()],io.prototype,"focusedDate",void 0),e([Ve()],io.prototype,"focusedTabIndex",void 0),e([
|
|
741
|
+
`}}io.styles=[...zi.styles,Pi,so],io.dependencies={"sgds-datepicker-input":to,"sgds-datepicker-calendar":Ua,"sgds-datepicker-header":Wa,"sgds-button":Yi,"sgds-icon-button":Ya},e([ze({type:Boolean,reflect:!0})],io.prototype,"required",void 0),e([ze({reflect:!0})],io.prototype,"name",void 0),e([ze({type:Boolean,reflect:!0})],io.prototype,"disabled",void 0),e([ze({type:Boolean,reflect:!0})],io.prototype,"noValidate",void 0),e([ze({type:String,reflect:!0})],io.prototype,"value",void 0),e([ze({type:Array,reflect:!0})],io.prototype,"initialValue",void 0),e([ze({type:String})],io.prototype,"minDate",void 0),e([ze({type:String})],io.prototype,"maxDate",void 0),e([ze({type:String,reflect:!0})],io.prototype,"mode",void 0),e([ze({type:String,reflect:!0})],io.prototype,"invalidFeedback",void 0),e([ze({type:Boolean,reflect:!0})],io.prototype,"hasFeedback",void 0),e([ze({reflect:!0})],io.prototype,"label",void 0),e([ze({reflect:!0})],io.prototype,"hintText",void 0),e([ze({type:Boolean,reflect:!0,state:!1})],io.prototype,"noFlip",void 0),e([ze({type:String,reflect:!0,state:!1})],io.prototype,"drop",void 0),e([ze({attribute:!1})],io.prototype,"displayDate",void 0),e([ra()],io.prototype,"defaultValue",void 0),e([ze({type:Boolean,reflect:!0})],io.prototype,"invalid",void 0),e([Ve()],io.prototype,"view",void 0),e([Ve()],io.prototype,"selectedDateRange",void 0),e([Ve()],io.prototype,"focusedDate",void 0),e([Ve()],io.prototype,"focusedTabIndex",void 0),e([De("sgds-datepicker-calendar")],io.prototype,"calendar",void 0),e([De("sgds-datepicker-input")],io.prototype,"datepickerInputAsync",void 0),e([Le("sgds-datepicker-input")],io.prototype,"datepickerInput",void 0),e([ot("value",{waitUntilFirstUpdate:!0})],io.prototype,"_handleValueChange",null),lt("sgds-datepicker",io);var ao=n`:host([bordered]) .container{border:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);border-radius:var(--sgds-border-radius-md)}.container{display:flex;flex-direction:column}slot[name=title]::slotted(*){color:var(--sgds-heading-color-default);font-size:var(--sgds-font-size-heading-sm);font-weight:var(--sgds-font-weight-semibold);letter-spacing:var(--sgds-letter-spacing-tight);line-height:var(--sgds-line-height-sm)}slot[name=description]::slotted(*){color:var(--sgds-color-subtle);font-size:var(--sgds-font-size-label-md);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-xs)}.header{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}.has-header{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);padding:var(--sgds-padding-lg) var(--sgds-padding-xl)}`;class oo extends He{constructor(){super(...arguments),this.bordered=!1,this.stacked=!1,this.hasTitleSlot=!1,this.hasDescriptionSlot=!1,this.hasSlotController=new $i(this,"title","description")}connectedCallback(){super.connectedCallback(),this.setAttribute("role","list"),this.updateComplete.then(()=>{this._updateDescriptionLists()})}_updateDescriptionLists(){this._descriptionLists&&this._descriptionLists.forEach((e,t)=>{this.stacked?e.setAttribute("stacked",""):e.removeAttribute("stacked"),this.bordered?e.setAttribute("bordered",""):e.removeAttribute("bordered"),t===this._descriptionLists.length-1&&e.setAttribute("isLastChild","")})}updated(e){e.has("stacked")&&this._updateDescriptionLists(),e.has("bordered")&&this._updateDescriptionLists(),this.hasTitleSlot||(this.hasTitleSlot=this.hasSlotController.test("title")),this.hasDescriptionSlot||(this.hasDescriptionSlot=this.hasSlotController.test("description"))}render(){return ee`
|
|
742
742
|
<div class="container">
|
|
743
743
|
<div
|
|
744
744
|
class="${Ke({header:!0,"has-header":this.hasTitleSlot||this.hasDescriptionSlot})}"
|
|
@@ -750,7 +750,7 @@ const _a=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
750
750
|
<slot></slot>
|
|
751
751
|
</div>
|
|
752
752
|
</div>
|
|
753
|
-
`}}oo.styles=[...He.styles,ao],e([ze({type:Boolean,reflect:!0})],oo.prototype,"bordered",void 0),e([ze({type:Boolean,reflect:!0})],oo.prototype,"stacked",void 0),e([ze({type:Boolean})],oo.prototype,"hasTitleSlot",void 0),e([ze({type:Boolean})],oo.prototype,"hasDescriptionSlot",void 0),e([
|
|
753
|
+
`}}oo.styles=[...He.styles,ao],e([ze({type:Boolean,reflect:!0})],oo.prototype,"bordered",void 0),e([ze({type:Boolean,reflect:!0})],oo.prototype,"stacked",void 0),e([ze({type:Boolean})],oo.prototype,"hasTitleSlot",void 0),e([ze({type:Boolean})],oo.prototype,"hasDescriptionSlot",void 0),e([Ie({flatten:!0})],oo.prototype,"_descriptionLists",void 0);var no=n`:host([bordered][islastchild]) .container:last-child{border-bottom:none}.container{align-items:flex-start;border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);display:flex;flex-direction:column;gap:var(--sgds-gap-2-xs);justify-content:flex-start;padding:var(--sgds-padding-lg) var(--sgds-padding-xl)}.data-container,.label-container{flex:1}.label-container{max-width:var(--sgds-dimension-280)}.label{color:var(--sgds-color-default);font-weight:var(--sgds-font-weight-semibold)}.data,.label{font-size:var(--sgds-font-size-label-md)}.data{color:var(--sgds-color-subtle);font-weight:var(--sgds-font-weight-regular);margin:0}@media (min-width:512px){:host(:not([stacked])) .container{flex-direction:row;gap:var(--sgds-gap-2-xl)}}`;let ro=0;class lo extends He{constructor(){super(...arguments),this.attrId=++ro,this.componentId=`sgds-description-list-${this.attrId}`,this.stacked=!1,this.bordered=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","listitem")}render(){return ee`
|
|
754
754
|
<div class="container">
|
|
755
755
|
<div class="label-container">
|
|
756
756
|
<span class="label">
|
|
@@ -797,7 +797,7 @@ const _a=(e,t,s)=>{const i=new Map;for(let a=t;a<=s;a++)i.set(e[a],a);return i};
|
|
|
797
797
|
</div>
|
|
798
798
|
</div>
|
|
799
799
|
</div>
|
|
800
|
-
`}}mo.styles=[...He.styles,vo],mo.dependencies={"sgds-close-button":ft},e([Le(".drawer")],mo.prototype,"drawer",void 0),e([Le(".drawer-panel")],mo.prototype,"panel",void 0),e([Le(".drawer-overlay")],mo.prototype,"overlay",void 0),e([ze({type:Boolean,reflect:!0})],mo.prototype,"open",void 0),e([ze({type:String,reflect:!0})],mo.prototype,"size",void 0),e([ze({type:String,reflect:!0})],mo.prototype,"placement",void 0),e([ze({type:String})],mo.prototype,"ariaLabel",void 0),e([ze({type:Boolean,reflect:!0})],mo.prototype,"contained",void 0),e([ot("open",{waitUntilFirstUpdate:!0})],mo.prototype,"handleOpenChange",null),e([ot("contained",{waitUntilFirstUpdate:!0})],mo.prototype,"handleNoModalChange",null),it("drawer.showTop",{keyframes:[{opacity:0,translate:"0 -100%"},{opacity:1,translate:"0 0"}],options:{duration:250,easing:"ease"}}),it("drawer.hideTop",{keyframes:[{opacity:1,translate:"0 0"},{opacity:0,translate:"0 -100%"}],options:{duration:250,easing:"ease"}}),it("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}}),it("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:250,easing:"ease"}}),it("drawer.showBottom",{keyframes:[{opacity:0,translate:"0 100%"},{opacity:1,translate:"0 0"}],options:{duration:250,easing:"ease"}}),it("drawer.hideBottom",{keyframes:[{opacity:1,translate:"0 0"},{opacity:0,translate:"0 100%"}],options:{duration:250,easing:"ease"}}),it("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}}),it("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:250,easing:"ease"}}),it("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:250}}),it("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),it("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}}),lt("sgds-drawer",mo),lt("sgds-dropdown",Li),lt("sgds-dropdown-item",
|
|
800
|
+
`}}mo.styles=[...He.styles,vo],mo.dependencies={"sgds-close-button":ft},e([Le(".drawer")],mo.prototype,"drawer",void 0),e([Le(".drawer-panel")],mo.prototype,"panel",void 0),e([Le(".drawer-overlay")],mo.prototype,"overlay",void 0),e([ze({type:Boolean,reflect:!0})],mo.prototype,"open",void 0),e([ze({type:String,reflect:!0})],mo.prototype,"size",void 0),e([ze({type:String,reflect:!0})],mo.prototype,"placement",void 0),e([ze({type:String})],mo.prototype,"ariaLabel",void 0),e([ze({type:Boolean,reflect:!0})],mo.prototype,"contained",void 0),e([ot("open",{waitUntilFirstUpdate:!0})],mo.prototype,"handleOpenChange",null),e([ot("contained",{waitUntilFirstUpdate:!0})],mo.prototype,"handleNoModalChange",null),it("drawer.showTop",{keyframes:[{opacity:0,translate:"0 -100%"},{opacity:1,translate:"0 0"}],options:{duration:250,easing:"ease"}}),it("drawer.hideTop",{keyframes:[{opacity:1,translate:"0 0"},{opacity:0,translate:"0 -100%"}],options:{duration:250,easing:"ease"}}),it("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}}),it("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:250,easing:"ease"}}),it("drawer.showBottom",{keyframes:[{opacity:0,translate:"0 100%"},{opacity:1,translate:"0 0"}],options:{duration:250,easing:"ease"}}),it("drawer.hideBottom",{keyframes:[{opacity:1,translate:"0 0"},{opacity:0,translate:"0 100%"}],options:{duration:250,easing:"ease"}}),it("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}}),it("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:250,easing:"ease"}}),it("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:250}}),it("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),it("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}}),lt("sgds-drawer",mo),lt("sgds-dropdown",Li),lt("sgds-dropdown-item",Ii);var fo=n`.file-upload-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.file-upload-list{display:flex;flex-direction:column;gap:var(--sgds-form-gap-xl);list-style-type:none;margin-top:0}.file-upload-list.has-files{margin-top:var(--sgds-margin-xl)}.filesize{color:var(--sgds-form-color-subtle)}@keyframes fileUploadEnter{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes fileUploadExit{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-8px)}}.file-upload-list-item-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md);max-height:500px;overflow:hidden;transition:max-height var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard),opacity var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard)}.file-upload-list-item-container.file-upload-exit{max-height:0;opacity:0}.file-upload-list-item{align-items:center;animation:fileUploadEnter var(--sgds-motion-duration-standard) var(--sgds-motion-easing-enter);background-color:var(--sgds-form-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-muted);border-radius:var(--sgds-form-border-radius-md);display:flex;gap:var(--sgds-form-gap-lg);padding:var(--sgds-form-padding-y) calc(var(--sgds-form-padding-x) + var(--sgds-padding-2-xl)) var(--sgds-form-padding-y) var(--sgds-form-padding-x);position:relative;transition:transform var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard)}.file-upload-list-item.file-upload-error{border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.file-upload-list-item.file-upload-exit{animation:fileUploadExit var(--sgds-motion-duration-standard) var(--sgds-motion-easing-exit)}.file-upload-list-item span:not(:first-of-type){cursor:pointer}.file-upload-item-error{align-items:flex-start;display:flex;gap:var(--sgds-form-gap-lg)}.file-upload-item-error sgds-icon{color:var(--sgds-color-muted);flex-shrink:0;margin-top:2px}.file-upload-item-error-message{color:var(--sgds-form-danger-color-default);font-size:var(--sgds-font-size-label-sm,);line-height:var(--sgds-line-height-2-xs)}ul{margin:0;padding:0}input{display:none}sgds-button{cursor:pointer;width:fit-content}sgds-close-button{position:absolute;right:8px;top:8px}sgds-icon.valid{color:var(--sgds-form-success-color-default)}sgds-icon.invalid{color:var(--sgds-color-muted)}.drag-drop-zone{align-items:center;background-color:var(--sgds-surface-raised);border:var(--sgds-border-width-1) dashed var(--sgds-border-color-default);border-radius:var(--sgds-border-radius-md);display:flex;flex-direction:column;gap:var(--sgds-gap-md);justify-content:center;padding:var(--sgds-padding-2-xl)}.drag-drop-text{font-size:var(--sgds-font-size-label-sm);line-height:var(--sgds-line-height-2-xs)}.drag-drop-zone:focus,.drag-drop-zone:focus-visible{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}:host([disabled]) .file-upload-container>:not(sgds-button):not(.invalid-feedback-container){opacity:var(--sgds-opacity-50)}:host([disabled]){cursor:not-allowed;pointer-events:none}:host([disabled]) .drag-drop-zone:focus,:host([disabled]) .drag-drop-zone:focus-visible{outline:none}:host([invalid]:not([disabled])) .drag-drop-zone{border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}:host([invalid]:not([disabled])) .drag-drop-zone:focus,:host([invalid]:not([disabled])) .drag-drop-zone:focus-visible{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}:host(:not([disabled]):not([invalid])) .drag-drop-zone:hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}`;class bo extends(da(fa)){constructor(){super(...arguments),this.multiple=!1,this.accept="",this.hasFeedback=!1,this.required=!1,this.variant="default",this.ariaLabel="Choose files",this.noValidate=!1,this.selectedFiles=[],this.exitingFile=null,this.fileMetadata=new Map,this._isTouched=!1,this._isProgrammaticChange=!1,this.inputRef=jt(),this._dragZoneRef=jt(),this._dragCounter=0,this._isDialogOpen=!1}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}get files(){return this.selectedFiles}setFileUploadState(e,t,s){const i=this.selectedFiles[e];i&&(this.fileMetadata.set(i,{uploading:"loading"===t,error:s}),this.requestUpdate())}_setFileList(e,t=0,s){if(this.emit("sgds-change",{detail:e}),this.emit("sgds-files-selected",{detail:e}),e.length>t){const s=Array.from(e).slice(t),i=new DataTransfer;s.forEach(e=>i.items.add(e)),this.emit("sgds-add-files",{detail:i.files})}else if(e.length===t&&t>0&&!s){const t=new DataTransfer;Array.from(e).forEach(e=>t.items.add(e)),this.emit("sgds-add-files",{detail:t.files})}e.length<t&&s&&this.emit("sgds-remove-file",{detail:{file:s,files:e}})}_handleClick(e){if(e.preventDefault(),!this.disabled){this._isDialogOpen=!0;const e=this.inputRef.value;null==e||e.click()}}_handleCancel(){this._isDialogOpen=!1,this._isTouched=!0,this._mixinShouldSkipSgdsValidation()||this.setInvalid(!this._mixinCheckValidity())}_handleChange(e){this._isDialogOpen=!1;const t=e.target,s=t.files,i=this.selectedFiles.length,a=0===s.length&&!this._isProgrammaticChange,o=s.length>0&&!this._isProgrammaticChange,n=o&&this.multiple&&this.selectedFiles.length>0;a&&this.selectedFiles.length>0?this._restoreNativeInput(t):n?this._appendFiles(t,s):s.length>0&&(this.selectedFiles=Array.from(s)),o&&this._setFileList(t.files,i),a&&!this._isTouched||super._mixinHandleChange(e)}_restoreNativeInput(e){const t=new DataTransfer;this.selectedFiles.forEach(e=>t.items.add(e)),e.files=t.files}_appendFiles(e,t){const s=[...this.selectedFiles,...Array.from(t)];this.selectedFiles=s;const i=new DataTransfer;s.forEach(e=>i.items.add(e)),e.files=i.files}_removeFileHandler(e){const t=this.selectedFiles[e];this.exitingFile=t,this.requestUpdate(),setTimeout(()=>{const s=this.inputRef.value;if(!s)return;const i=this.selectedFiles.length,a=new DataTransfer;this.selectedFiles.forEach((t,s)=>{e!==s&&a.items.add(t)}),this._isProgrammaticChange=!0,s.files=a.files,this._setFileList(a.files,i,t),this.selectedFiles=Array.from(a.files),this.exitingFile=null,this.requestUpdate(),s.dispatchEvent(new Event("change",{bubbles:!0})),this._isProgrammaticChange=!1},300)}_clearAllFiles(){const e=this.inputRef.value,t=this.selectedFiles.length,s=new DataTransfer;e&&(e.files=s.files),this._setFileList(s.files,t),this.selectedFiles=Array.from(s.files)}_mixinResetFormControl(){this._clearAllFiles(),this._mixinResetValidity(this.input)}_handleDisabledChange(){this.setInvalid(!1)}_handleBlur(){const e=this.emit("sgds-blur",{cancelable:!0});this._mixinShouldSkipSgdsValidation()||e.defaultPrevented||this._isDialogOpen||(this.setInvalid(!this._mixinCheckValidity()),this._isTouched=!0)}_handleIsTouched(){this._mixinShouldSkipSgdsValidation()||this._isTouched&&this.setInvalid(!this._mixinCheckValidity())}_renderLabel(){const e=ee` <label id=${this._labelId} class="form-label"> ${this.label} </label> `;return this.label&&e}_renderHintText(){const e=ee` <div id="${this._controlId}Help" class="form-text">${this.hintText}</div> `;return this.hintText&&e}_renderFeedback(){return ee`
|
|
801
801
|
<div class="invalid-feedback-container">
|
|
802
802
|
<sgds-icon name="exclamation-circle-fill" size="md"></sgds-icon>
|
|
803
803
|
<div id="${this._controlId}-invalid" class="invalid-feedback">
|
|
@@ -979,7 +979,7 @@ class Mo{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
979
979
|
* @license
|
|
980
980
|
* Copyright 2022 Google LLC
|
|
981
981
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
982
|
-
*/function Ao({context:e,subscribe:t}){return(s,i)=>{"object"==typeof i?i.addInitializer(function(){new Mo(this,{context:e,callback:e=>{s.set.call(this,e)},subscribe:t})}):s.constructor.addInitializer(s=>{new Mo(s,{context:e,callback:e=>{s[i]=e},subscribe:t})})}}const Lo=1024,
|
|
982
|
+
*/function Ao({context:e,subscribe:t}){return(s,i)=>{"object"==typeof i?i.addInitializer(function(){new Mo(this,{context:e,callback:e=>{s.set.call(this,e)},subscribe:t})}):s.constructor.addInitializer(s=>{new Mo(s,{context:e,callback:e=>{s[i]=e},subscribe:t})})}}const Lo=1024,Do=768,Io={sm:512,md:Do,lg:Lo,xl:1280,xxl:1440,never:1/0,always:-1};class Eo extends He{constructor(){super(...arguments),this.expanded=!1,this.expanding=!1,this.brandHref="",this.collapseId=Zi("nav","collapse"),this.expand="lg",this.breakpointReached=!1,this._hasProfileComponent=!1,this._handleClickOutsideBound=e=>this._handleClickOutOfElement(e,this.body),this._handleResizeBound=()=>this._handleResize(),this._handleMobileNavBound=this._handleMobileNav.bind(this)}connectedCallback(){super.connectedCallback(),this._handleResize(),window.addEventListener("click",this._handleClickOutsideBound),window.addEventListener("resize",this._handleResizeBound)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("click",this._handleClickOutsideBound),window.removeEventListener("resize",this._handleResizeBound)}firstUpdated(e){super.firstUpdated(e),this.breakpointReached&&this.body&&(this.expanded=!1,this.body.hidden=!0,this._handleMobileNav(),this._onBreakpointReached(!0))}_handleClickOutOfElement(e,t){e.composedPath().includes(t)||this.header&&e.composedPath().includes(this.header)||this.hide()}_handleSummaryClick(){this.expanded?this.hide():(document.body.style.overflow="hidden",this.show())}_handleResize(){const e=window.innerWidth<Io[this.expand];e!==this.breakpointReached?this.requestUpdate():(this.body&&(this.body.hidden=!0),this.expanding=!1),e?(this._handleMobileNav(),this._isBreakpointReached()||(this._onBreakpointReached(!0),window.addEventListener("scrollend",this._handleMobileNavBound))):(this._handleDesktopNav(),this._onBreakpointReached(!1),window.removeEventListener("scrollend",this._handleMobileNavBound))}async _handleMobileNav(){if(!this.nav)return;this.nav.appendChild(this.body),await customElements.whenDefined("sgds-masthead");const{bottom:e}=this.nav.getBoundingClientRect(),t=parseFloat(getComputedStyle(this.body).paddingTop)+parseFloat(getComputedStyle(this.body).paddingBottom);this.navScroll.style.maxHeight=`calc(100dvh - ${e}px - ${t}px)`}_handleDesktopNav(){var e;null===(e=this.navbar)||void 0===e||e.insertBefore(this.body,this.navbarEnd)}async _animateToShow(){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return this.expanding=!1,void(this.expanded=!1);await Qe(this.body),this.body.hidden=!1;const{keyframes:e,options:t}=st(this,"nav.show");await Ge(this.body,Xe(e,this.body.scrollHeight),t),this.body.style.height="auto",this._onMenuShown(),this.emit("sgds-after-show")}_onMenuShown(){}async _animateToHide(){if(this.emit("sgds-hide",{cancelable:!0}).defaultPrevented)return this.expanding=!1,void(this.expanded=!0);await Qe(this.body);const{keyframes:e,options:t}=st(this,"nav.hide");await Ge(this.body,Xe(e,this.body.scrollHeight),t),this.body.hidden=!0,this.body.style.height="auto",this.emit("sgds-after-hide")}async handleOpenChange(){var e;this.expanding?(await this._animateToShow(),this.expanded=!0):(null===(e=this.header)||void 0===e||e.focus(),await this._animateToHide(),this.expanded=!1)}async show(){if(!this.expanded)return this.expanding=!0,at(this,"sgds-after-show")}async hide(){if(this.expanded)return this.expanding=!1,document.body.style.removeProperty("overflow"),at(this,"sgds-after-hide")}_expandClass(){switch(this.expand){case"always":return"navbar-expand";case"never":break;default:return`navbar-expand-${this.expand}`}}_renderToggler(e){return ee`<sgds-icon-button
|
|
983
983
|
name=${this.expanded?"cross":"menu"}
|
|
984
984
|
variant="ghost"
|
|
985
985
|
size="sm"
|
|
@@ -1013,7 +1013,7 @@ class Mo{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
1013
1013
|
</div>
|
|
1014
1014
|
</div>
|
|
1015
1015
|
</nav>
|
|
1016
|
-
`}}To.styles=[...Eo.styles,Oo],e([Po({context:Bo}),Ve()],To.prototype,"_breakpointReached",void 0),e([Po({context:Ho}),Ve()],To.prototype,"_expanded",void 0),e([ze({type:Boolean})],To.prototype,"hasNonCollapsibleSlot",void 0),e([ze({type:Boolean,reflect:!0})],To.prototype,"fluid",void 0),e([
|
|
1016
|
+
`}}To.styles=[...Eo.styles,Oo],e([Po({context:Bo}),Ve()],To.prototype,"_breakpointReached",void 0),e([Po({context:Ho}),Ve()],To.prototype,"_expanded",void 0),e([ze({type:Boolean})],To.prototype,"hasNonCollapsibleSlot",void 0),e([ze({type:Boolean,reflect:!0})],To.prototype,"fluid",void 0),e([Ie()],To.prototype,"defaultNodes",void 0),e([Ie({slot:"end"})],To.prototype,"endNodes",void 0);var Ro=n`:host([expand=always]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}@media (min-width:512px){:host([expand=sm]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:768px){:host([expand=md]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1024px){:host(:not([expand])) .nav-link,:host([expand=lg]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1280px){:host([expand=xl]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1440px){:host([expand=xxl]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}.nav-link{align-items:center;box-sizing:border-box;color:var(--sgds-color-default);cursor:pointer;display:flex;font-size:var(--sgds-font-size-label-sm);gap:var(--sgds-gap-xs);line-height:var(--sgds-line-height-2-xs,20px);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);text-decoration:none}:host([tone=brand][expand=always]) .nav-link,:host([tone^=gradient][expand=always]) .nav-link{color:var(--sgds-color-fixed-light)}@media screen and (min-width:512px){:host([tone=brand][expand=sm]) .nav-link,:host([tone^=gradient][expand=sm]) .nav-link{color:var(--sgds-color-fixed-light)}}@media screen and (min-width:768px){:host([tone=brand][expand=md]) .nav-link,:host([tone^=gradient][expand=md]) .nav-link{color:var(--sgds-color-fixed-light)}}@media screen and (min-width:1024px){:host([tone=brand][expand=lg]) .nav-link,:host([tone^=gradient][expand=lg]) .nav-link{color:var(--sgds-color-fixed-light)}}@media screen and (min-width:1280px){:host([tone=brand][expand=xl]) .nav-link,:host([tone^=gradient][expand=xl]) .nav-link{color:var(--sgds-color-fixed-light)}}@media screen and (min-width:1440px){:host([tone=brand][expand=xxl]) .nav-link,:host([tone^=gradient][expand=xxl]) .nav-link{color:var(--sgds-color-fixed-light)}}.nav-link.show,.nav-link:not(.disabled).active{border-color:var(--sgds-primary-border-color-default);color:var(--sgds-primary-color-default)}.nav-link:not(.disabled):hover{color:var(--sgds-primary-color-default)}.nav-link:not(.disabled):focus-visible{color:var(--sgds-primary-color-default);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.nav-link.disabled{cursor:not-allowed;opacity:var(--sgds-opacity-40)}.dropdown-items{background-color:var(--sgds-surface-default);height:100%;left:100%;overflow-y:auto;padding:var(--sgds-padding-md) 0;position:absolute;top:0;width:100%}.dropdown-items a{align-items:center;color:var(--sgds-color-default);cursor:pointer;display:flex;font-size:var(--sgds-font-size-label-sm);gap:var(--sgds-gap-xs);line-height:var(--sgds-line-height-2-xs,20px);margin:auto;max-width:var(--sgds-mainnav-max-width,1440px);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);text-decoration:none}.dropdown-items a:hover{color:var(--sgds-primary-color-default)}.dropdown-items a:focus-visible{color:var(--sgds-primary-color-default);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus);outline-offset:-5px}:host([tone=brand][expand=always]) slot[name=toggler]::slotted(*),:host([tone^=gradient][expand=always]) slot[name=toggler]::slotted(*){color:var(--sgds-color-fixed-light)}@media screen and (min-width:512px){:host([tone=brand][expand=sm]) slot[name=toggler]::slotted(*),:host([tone^=gradient][expand=sm]) slot[name=toggler]::slotted(*){color:var(--sgds-color-fixed-light)}}@media screen and (min-width:768px){:host([tone=brand][expand=md]) slot[name=toggler]::slotted(*),:host([tone^=gradient][expand=md]) slot[name=toggler]::slotted(*){color:var(--sgds-color-fixed-light)}}@media screen and (min-width:1024px){:host([tone=brand][expand=lg]) slot[name=toggler]::slotted(*),:host([tone^=gradient][expand=lg]) slot[name=toggler]::slotted(*){color:var(--sgds-color-fixed-light)}}@media screen and (min-width:1280px){:host([tone=brand][expand=xl]) slot[name=toggler]::slotted(*),:host([tone^=gradient][expand=xl]) slot[name=toggler]::slotted(*){color:var(--sgds-color-fixed-light)}}@media screen and (min-width:1440px){:host([tone=brand][expand=xxl]) slot[name=toggler]::slotted(*),:host([tone^=gradient][expand=xxl]) slot[name=toggler]::slotted(*){color:var(--sgds-color-fixed-light)}}slot[name=toggler]::slotted(*){flex:1}sgds-dropdown{display:block;height:100%}@media screen and (min-width:1024px){.dropdown-items a,.nav-link{padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}}`;const Fo="Enter";class No extends He{constructor(){super(...arguments),this._breakpointReached=!0,this.togglerId=Zi("dropdown","button"),this.active=!1,this.disabled=!1}get defaultSlotItems(){return[...this.defaultNodes||[]].filter(e=>void 0!==e.tagName)}updated(){this._breakpointReached&&(this._copyTextToMenu(),this._resetDropdownMenu(),this._hideDropdownMenuItems())}_handleSlotChange(e){e.target.assignedElements({flatten:!0}).forEach(e=>{var t;e.addEventListener("keydown",this._handleKeyboardMenuItemsEvent.bind(this));const s=e.shadowRoot.querySelector(".dropdown-item");s.classList.add("mainnav-dropdown-link");const i=(null===(t=e.shadowRoot)||void 0===t?void 0:t.querySelector("a"))||e.querySelector("a");i.tabIndex=-1,s.classList.contains("disabled")?(i.setAttribute("href","javascript:void(0)"),i.setAttribute("tabindex","-1")):i.addEventListener("click",e=>{e.target.closest("sgds-mainnav").hide()})})}_handleDesktopSlotChange(e){e.target.assignedElements({flatten:!0}).forEach(e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.classList.remove("mainnav-dropdown-link");e.shadowRoot.querySelector(".dropdown-item slot").assignedElements({flatten:!0}).forEach(e=>{t.classList.contains("disabled")&&(e.setAttribute("href","javascript:void(0)"),e.setAttribute("tabindex","-1"))})})}_handleKeyboardMenuItemsEvent(e){if(!this._breakpointReached)return;const t=this.defaultSlotItems.filter(e=>!e.hasAttribute("disabled")),s=[this.menuHeaderButton,...t],i=s.length;if(0===i)return;const a=s[0],o=s[i-1].shadowRoot.querySelector(".dropdown-item");let n=document.activeElement;if(n===this&&(n=this.shadowRoot.activeElement),"Tab"===e.key)if(e.shiftKey)n===a&&(e.preventDefault(),setTimeout(()=>{o.focus()},0));else{const t=n.shadowRoot?n.shadowRoot.querySelector(".dropdown-item"):null;t&&t===o&&(e.preventDefault(),a.focus())}}_copyTextToMenu(){this.menuHeaderText.innerHTML=this.togglerNodes[0].innerHTML}_hideDropdownMenuItems(){this.dropdownItems.style.display="none",this.dropdownItems.setAttribute("aria-hidden","true")}_resetDropdownMenu(){const e=this._getNavbarBody();return e?new Promise(t=>{const s=i=>{"transform"===i.propertyName&&(e.removeEventListener("transitionend",s),t())};getComputedStyle(e).transitionProperty.includes("transform")?(e.addEventListener("transitionend",s),e.style.removeProperty("transform")):(e.style.removeProperty("transform"),t())}):Promise.resolve()}_handleKeyboardOpen(e){this.disabled||e.key!==Fo&&" "!==e.key||(e.preventDefault(),this._openMenu())}_getNavbarBody(){const e=document.querySelector("sgds-mainnav");if(!(null==e?void 0:e.shadowRoot))return void console.warn("sgds-mainnav or its shadowRoot not found");const t=e.shadowRoot.querySelector(".navbar-body");if(t)return t;console.warn(".navbar-body not found in sgds-mainnav")}_openMenu(){this._getNavbarBody().style.transform="translateX(-100%)",this.dropdownItems.style.removeProperty("display"),this.dropdownItems.setAttribute("aria-hidden","false"),setTimeout(()=>{this.menuHeaderButton.focus()},50)}_handleHeaderKeyboardEvent(e){switch(e.key){case"Tab":this._handleKeyboardMenuItemsEvent(e);break;case Fo:case" ":e.preventDefault(),this._closeMenu()}}async _closeMenu(){await this._resetDropdownMenu(),this._hideDropdownMenuItems(),this.navLink.focus()}render(){const e=ee`
|
|
1017
1017
|
<a
|
|
1018
1018
|
class="${Ke({"nav-link":!0,active:this.active,disabled:this.disabled})}"
|
|
1019
1019
|
aria-disabled=${this.disabled?"true":"false"}
|
|
@@ -1050,7 +1050,7 @@ class Mo{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
1050
1050
|
<sgds-icon name="chevron-down" size="md"></sgds-icon>
|
|
1051
1051
|
</a>
|
|
1052
1052
|
<slot @slotchange=${this._handleDesktopSlotChange}></slot>
|
|
1053
|
-
</sgds-dropdown>`;return this._breakpointReached?e:t}}No.styles=[...He.styles,Ai,Pi,Ro],No.dependencies={"sgds-dropdown":Li,"sgds-dropdown-item":Di,"sgds-icon":xt},e([Ao({context:Bo,subscribe:!0}),Ve()],No.prototype,"_breakpointReached",void 0),e([Ao({context:Ho,subscribe:!0}),Ve()],No.prototype,"expanded",void 0),e([Le(".nav-link")],No.prototype,"navLink",void 0),e([Le(".dropdown-items")],No.prototype,"dropdownItems",void 0),e([Le(".dropdown-items a")],No.prototype,"menuHeaderButton",void 0),e([Le(".dropdown-items span")],No.prototype,"menuHeaderText",void 0),e([ze({type:Boolean})],No.prototype,"active",void 0),e([ze({type:Boolean,reflect:!0})],No.prototype,"disabled",void 0),e([ze({type:String})],No.prototype,"ariaLabel",void 0),e([De({slot:"toggler"})],No.prototype,"togglerNodes",void 0),e([De()],No.prototype,"defaultNodes",void 0);var jo=n`:host([expand=always]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}@media screen and (min-width:512px){:host([expand=sm]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=sm]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:768px){:host([expand=md]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=md]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1024px){:host([expand=lg]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=lg]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1280px){:host([expand=xl]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=xl]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1440px){:host([expand=xxl]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=xxl]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (max-width:511px){:host(:not([disabled])[active][expand=sm]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:767px){:host(:not([disabled])[active][expand=md]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1023px){:host(:not([disabled])[active][expand=lg]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1279px){:host(:not([disabled])[active][expand=xl]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1439px){:host(:not([disabled])[active][expand=xxl]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}::slotted(*){--sgds-link-color-default:var(--sgds-color-default);--sgds-link-color-emphasis:var(--sgds-color-default);align-items:center;box-sizing:border-box;color:var(--sgds-color-default)!important;cursor:pointer;display:flex;font-size:var(--sgds-font-size-label-sm);height:auto!important;line-height:var(--sgds-line-height-2-xs,20px);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);text-decoration:none!important}:host([tone=brand][expand=always]) ::slotted(*),:host([tone^=gradient][expand=always]) ::slotted(*){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}:host([tone=brand][expand=always]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=always]:not([disabled])[active]) ::slotted(*){border-color:var(--sgds-color-fixed-light)}@media screen and (min-width:512px){:host([tone=brand][expand=sm]) ::slotted(*),:host([tone^=gradient][expand=sm]) ::slotted(*){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}:host([tone=brand][expand=sm]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=sm]:not([disabled])[active]) ::slotted(*){border-color:var(--sgds-color-fixed-light)}}@media screen and (min-width:768px){:host([tone=brand][expand=md]) ::slotted(*),:host([tone^=gradient][expand=md]) ::slotted(*){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}:host([tone=brand][expand=md]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=md]:not([disabled])[active]) ::slotted(*){border-color:var(--sgds-color-fixed-light)}}@media screen and (min-width:1024px){:host([tone=brand][expand=lg]) ::slotted(*),:host([tone^=gradient][expand=lg]) ::slotted(*){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}:host([tone=brand][expand=lg]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=lg]:not([disabled])[active]) ::slotted(*){border-color:var(--sgds-color-fixed-light)}}@media screen and (min-width:1280px){:host([tone=brand][expand=xl]) ::slotted(*),:host([tone^=gradient][expand=xl]) ::slotted(*){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}:host([tone=brand][expand=xl]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=xl]:not([disabled])[active]) ::slotted(*){border-color:var(--sgds-color-fixed-light)}}@media screen and (min-width:1440px){:host([tone=brand][expand=xxl]) ::slotted(*),:host([tone^=gradient][expand=xxl]) ::slotted(*){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}:host([tone=brand][expand=xxl]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=xxl]:not([disabled])[active]) ::slotted(*){border-color:var(--sgds-color-fixed-light)}}@media screen and (min-width:1024px){::slotted(*){padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}}:host(:not([disabled])[active]) ::slotted(*){--sgds-link-color-default:var(--sgds-primary-color-default);--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-primary-color-default)!important}:host(:not([disabled]):not([active])) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-color-default)!important}:host(:not([disabled])[active]) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-primary-color-default)!important}:host([tone=brand][expand=always]:not([disabled])[active]) ::slotted(*),:host([tone=brand][expand=always]:not([disabled])[active]) ::slotted(a:hover),:host([tone^=gradient][expand=always]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=always]:not([disabled])[active]) ::slotted(a:hover){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}@media screen and (min-width:512px){:host([tone=brand][expand=sm]:not([disabled])[active]) ::slotted(*),:host([tone=brand][expand=sm]:not([disabled])[active]) ::slotted(a:hover),:host([tone^=gradient][expand=sm]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=sm]:not([disabled])[active]) ::slotted(a:hover){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}}@media screen and (min-width:768px){:host([tone=brand][expand=md]:not([disabled])[active]) ::slotted(*),:host([tone=brand][expand=md]:not([disabled])[active]) ::slotted(a:hover),:host([tone^=gradient][expand=md]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=md]:not([disabled])[active]) ::slotted(a:hover){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}}@media screen and (min-width:1024px){:host([tone=brand][expand=lg]:not([disabled])[active]) ::slotted(*),:host([tone=brand][expand=lg]:not([disabled])[active]) ::slotted(a:hover),:host([tone^=gradient][expand=lg]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=lg]:not([disabled])[active]) ::slotted(a:hover){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}}@media screen and (min-width:1280px){:host([tone=brand][expand=xl]:not([disabled])[active]) ::slotted(*),:host([tone=brand][expand=xl]:not([disabled])[active]) ::slotted(a:hover),:host([tone^=gradient][expand=xl]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=xl]:not([disabled])[active]) ::slotted(a:hover){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}}@media screen and (min-width:1440px){:host([tone=brand][expand=xxl]:not([disabled])[active]) ::slotted(*),:host([tone=brand][expand=xxl]:not([disabled])[active]) ::slotted(a:hover),:host([tone^=gradient][expand=xxl]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=xxl]:not([disabled])[active]) ::slotted(a:hover){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}}:host([disabled]) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-color-default)!important}:host(:not([disabled]):not([active])) ::slotted(a:active){color:var(--sgds-color-default)!important}:host(:not([disabled])[active]) ::slotted(a:active){color:var(--sgds-primary-color-default)!important}::slotted(a:focus-visible){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-primary-color-default)!important;outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([disabled]) ::slotted(*){cursor:not-allowed;opacity:var(--sgds-opacity-40)}`;class Uo extends He{constructor(){super(...arguments),this.active=!1,this.disabled=!1}_handleDisabled(){this.setAttribute("aria-disabled",`${this.disabled}`)}_handleSlotChange(e){const t=e.target,s=t.assignedElements({flatten:!0}).filter(e=>"a"===e.tagName.toLowerCase()||"sgds-link"===e.tagName.toLowerCase());if(s.length>1)console.error("More than one anchor tag is added to sgds-mainnav-item");else{if(0===s.length){t.assignedNodes({flatten:!0}).forEach(e=>{if(e.nodeType===Node.TEXT_NODE){const t=document.createElement("a");t.textContent=e.textContent,e.parentNode.replaceChild(t,e)}})}if(1===s.length){const e=s[0];if(this.active&&e.setAttribute("aria-current","true"),this.disabled)return e.setAttribute("href","javascript:void(0)"),void e.setAttribute("tabindex","-1");e.addEventListener("click",e=>{e.target.closest("sgds-mainnav").hide()})}}}render(){return ee`<slot @slotchange=${this._handleSlotChange}></slot>`}}Uo.styles=[...He.styles,jo],e([ze({type:Boolean,reflect:!0})],Uo.prototype,"active",void 0),e([ze({type:Boolean,reflect:!0})],Uo.prototype,"disabled",void 0),e([ot("disabled")],Uo.prototype,"_handleDisabled",null);var qo=n`:host([expand=always]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}@media (min-width:512px){:host([expand=sm]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:768px){:host([expand=md]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1024px){:host(:not([expand])) .nav-link,:host([expand=lg]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1280px){:host([expand=xl]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1440px){:host([expand=xxl]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}button.nav-link{appearance:none;background:none;border:none;font-family:inherit}.nav-link{align-items:center;box-sizing:border-box;color:var(--sgds-color-default);cursor:pointer;display:flex;font-size:var(--sgds-font-size-label-sm);gap:var(--sgds-gap-xs);line-height:var(--sgds-line-height-2-xs,20px);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);text-decoration:none}.nav-link:not(.disabled):hover{color:var(--sgds-primary-color-default)}.nav-link:not(.disabled):focus-visible{color:var(--sgds-primary-color-default);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.nav-link.disabled{cursor:not-allowed;opacity:var(--sgds-opacity-40)}.nav-link.read-only,.profile-avatar-mobile.read-only{cursor:default;pointer-events:none}:host([tone=brand][expand=always]) .nav-link,:host([tone^=gradient][expand=always]) .nav-link{color:var(--sgds-color-fixed-light)}@media screen and (min-width:512px){:host([tone=brand][expand=sm]) .nav-link,:host([tone^=gradient][expand=sm]) .nav-link{color:var(--sgds-color-fixed-light)}}@media screen and (min-width:768px){:host([tone=brand][expand=md]) .nav-link,:host([tone^=gradient][expand=md]) .nav-link{color:var(--sgds-color-fixed-light)}}@media screen and (min-width:1024px){:host([tone=brand][expand=lg]) .nav-link,:host([tone^=gradient][expand=lg]) .nav-link{color:var(--sgds-color-fixed-light)}}@media screen and (min-width:1280px){:host([tone=brand][expand=xl]) .nav-link,:host([tone^=gradient][expand=xl]) .nav-link{color:var(--sgds-color-fixed-light)}}@media screen and (min-width:1440px){:host([tone=brand][expand=xxl]) .nav-link,:host([tone^=gradient][expand=xxl]) .nav-link{color:var(--sgds-color-fixed-light)}}.profile-text{display:flex;flex:1;flex-direction:column;gap:var(--sgds-gap-text-2-xs,2px);text-align:left}.profile-label{font-weight:var(--sgds-font-weight-semibold)}.profile-label,.profile-secondary-text{font-size:var(--sgds-font-size-body-xs);line-height:var(--sgds-line-height-3-xs,16px)}sgds-dropdown{display:block;height:100%}.profile-avatar-mobile{align-items:center;background:none;border:none;border-radius:var(--sgds-border-radius-full);color:inherit;cursor:pointer;display:flex;font:inherit;height:100%;margin:0;padding:0}.profile-avatar-mobile:focus-visible{outline:none}.profile-avatar-mobile:focus-visible ::slotted(*){border-radius:var(--sgds-border-radius-full);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.profile-mobile-panel{animation:profile-panel-show .2s ease-in-out;background-color:var(--sgds-surface-default);border-top:var(--sgds-border-width-1) solid var(--sgds-border-color-translucent);box-shadow:0 2px 4px 0 hsla(0,0%,5%,.08);left:0;padding:var(--sgds-padding-md) 0;position:absolute;top:100%;width:100%;z-index:var(--sgds-z-index-floating)}.profile-mobile-panel[hidden]{display:none}@keyframes profile-panel-show{0%{max-height:0;opacity:0}to{max-height:100dvh;opacity:1}}.profile-mobile-items{display:flex;flex-direction:column;height:100dvh;margin:auto;max-width:var(--sgds-mainnav-max-width,1440px);overflow-y:auto;width:100%}@media screen and (min-width:1024px){.nav-link{padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}}`;class Yo extends He{constructor(){super(...arguments),this._breakpointReached=!0,this._mobileMenuOpen=!1,this._hasDropdownItems=!1,this.label="",this.secondaryText="",this.disabled=!1,this.ariaLabel="",this.close="default",this.togglerId=Zi("profile","button"),this._handleMobileToggle=()=>{this._mobileMenuOpen=!this._mobileMenuOpen},this._handleClickOutside=e=>{this._mobileMenuOpen&&"inside"!==this.close&&(e.composedPath().includes(this)||(this._mobileMenuOpen=!1))},this._handleSlotChange=()=>{this._hasDropdownItems=this._defaultSlotElements.length>0},this._handleKeydown=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._handleMobileToggle())}}connectedCallback(){super.connectedCallback(),window.addEventListener("click",this._handleClickOutside)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("click",this._handleClickOutside)}render(){return this._breakpointReached?this._hasDropdownItems?ee`
|
|
1053
|
+
</sgds-dropdown>`;return this._breakpointReached?e:t}}No.styles=[...He.styles,Ai,Pi,Ro],No.dependencies={"sgds-dropdown":Li,"sgds-dropdown-item":Ii,"sgds-icon":xt},e([Ao({context:Bo,subscribe:!0}),Ve()],No.prototype,"_breakpointReached",void 0),e([Ao({context:Ho,subscribe:!0}),Ve()],No.prototype,"expanded",void 0),e([Le(".nav-link")],No.prototype,"navLink",void 0),e([Le(".dropdown-items")],No.prototype,"dropdownItems",void 0),e([Le(".dropdown-items a")],No.prototype,"menuHeaderButton",void 0),e([Le(".dropdown-items span")],No.prototype,"menuHeaderText",void 0),e([ze({type:Boolean})],No.prototype,"active",void 0),e([ze({type:Boolean,reflect:!0})],No.prototype,"disabled",void 0),e([ze({type:String})],No.prototype,"ariaLabel",void 0),e([Ie({slot:"toggler"})],No.prototype,"togglerNodes",void 0),e([Ie()],No.prototype,"defaultNodes",void 0);var jo=n`:host([expand=always]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}@media screen and (min-width:512px){:host([expand=sm]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=sm]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:768px){:host([expand=md]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=md]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1024px){:host([expand=lg]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=lg]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1280px){:host([expand=xl]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=xl]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1440px){:host([expand=xxl]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=xxl]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (max-width:511px){:host(:not([disabled])[active][expand=sm]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:767px){:host(:not([disabled])[active][expand=md]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1023px){:host(:not([disabled])[active][expand=lg]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1279px){:host(:not([disabled])[active][expand=xl]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1439px){:host(:not([disabled])[active][expand=xxl]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}::slotted(*){--sgds-link-color-default:var(--sgds-color-default);--sgds-link-color-emphasis:var(--sgds-color-default);align-items:center;box-sizing:border-box;color:var(--sgds-color-default)!important;cursor:pointer;display:flex;font-size:var(--sgds-font-size-label-sm);height:auto!important;line-height:var(--sgds-line-height-2-xs,20px);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);text-decoration:none!important}:host([tone=brand][expand=always]) ::slotted(*),:host([tone^=gradient][expand=always]) ::slotted(*){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}:host([tone=brand][expand=always]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=always]:not([disabled])[active]) ::slotted(*){border-color:var(--sgds-color-fixed-light)}@media screen and (min-width:512px){:host([tone=brand][expand=sm]) ::slotted(*),:host([tone^=gradient][expand=sm]) ::slotted(*){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}:host([tone=brand][expand=sm]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=sm]:not([disabled])[active]) ::slotted(*){border-color:var(--sgds-color-fixed-light)}}@media screen and (min-width:768px){:host([tone=brand][expand=md]) ::slotted(*),:host([tone^=gradient][expand=md]) ::slotted(*){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}:host([tone=brand][expand=md]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=md]:not([disabled])[active]) ::slotted(*){border-color:var(--sgds-color-fixed-light)}}@media screen and (min-width:1024px){:host([tone=brand][expand=lg]) ::slotted(*),:host([tone^=gradient][expand=lg]) ::slotted(*){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}:host([tone=brand][expand=lg]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=lg]:not([disabled])[active]) ::slotted(*){border-color:var(--sgds-color-fixed-light)}}@media screen and (min-width:1280px){:host([tone=brand][expand=xl]) ::slotted(*),:host([tone^=gradient][expand=xl]) ::slotted(*){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}:host([tone=brand][expand=xl]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=xl]:not([disabled])[active]) ::slotted(*){border-color:var(--sgds-color-fixed-light)}}@media screen and (min-width:1440px){:host([tone=brand][expand=xxl]) ::slotted(*),:host([tone^=gradient][expand=xxl]) ::slotted(*){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}:host([tone=brand][expand=xxl]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=xxl]:not([disabled])[active]) ::slotted(*){border-color:var(--sgds-color-fixed-light)}}@media screen and (min-width:1024px){::slotted(*){padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}}:host(:not([disabled])[active]) ::slotted(*){--sgds-link-color-default:var(--sgds-primary-color-default);--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-primary-color-default)!important}:host(:not([disabled]):not([active])) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-color-default)!important}:host(:not([disabled])[active]) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-primary-color-default)!important}:host([tone=brand][expand=always]:not([disabled])[active]) ::slotted(*),:host([tone=brand][expand=always]:not([disabled])[active]) ::slotted(a:hover),:host([tone^=gradient][expand=always]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=always]:not([disabled])[active]) ::slotted(a:hover){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}@media screen and (min-width:512px){:host([tone=brand][expand=sm]:not([disabled])[active]) ::slotted(*),:host([tone=brand][expand=sm]:not([disabled])[active]) ::slotted(a:hover),:host([tone^=gradient][expand=sm]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=sm]:not([disabled])[active]) ::slotted(a:hover){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}}@media screen and (min-width:768px){:host([tone=brand][expand=md]:not([disabled])[active]) ::slotted(*),:host([tone=brand][expand=md]:not([disabled])[active]) ::slotted(a:hover),:host([tone^=gradient][expand=md]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=md]:not([disabled])[active]) ::slotted(a:hover){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}}@media screen and (min-width:1024px){:host([tone=brand][expand=lg]:not([disabled])[active]) ::slotted(*),:host([tone=brand][expand=lg]:not([disabled])[active]) ::slotted(a:hover),:host([tone^=gradient][expand=lg]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=lg]:not([disabled])[active]) ::slotted(a:hover){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}}@media screen and (min-width:1280px){:host([tone=brand][expand=xl]:not([disabled])[active]) ::slotted(*),:host([tone=brand][expand=xl]:not([disabled])[active]) ::slotted(a:hover),:host([tone^=gradient][expand=xl]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=xl]:not([disabled])[active]) ::slotted(a:hover){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}}@media screen and (min-width:1440px){:host([tone=brand][expand=xxl]:not([disabled])[active]) ::slotted(*),:host([tone=brand][expand=xxl]:not([disabled])[active]) ::slotted(a:hover),:host([tone^=gradient][expand=xxl]:not([disabled])[active]) ::slotted(*),:host([tone^=gradient][expand=xxl]:not([disabled])[active]) ::slotted(a:hover){--sgds-link-color-default:var(--sgds-color-fixed-light);--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-color-fixed-light)!important}}:host([disabled]) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-color-default)!important}:host(:not([disabled]):not([active])) ::slotted(a:active){color:var(--sgds-color-default)!important}:host(:not([disabled])[active]) ::slotted(a:active){color:var(--sgds-primary-color-default)!important}::slotted(a:focus-visible){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-primary-color-default)!important;outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([disabled]) ::slotted(*){cursor:not-allowed;opacity:var(--sgds-opacity-40)}`;class Uo extends He{constructor(){super(...arguments),this.active=!1,this.disabled=!1}_handleDisabled(){this.setAttribute("aria-disabled",`${this.disabled}`)}_handleSlotChange(e){const t=e.target,s=t.assignedElements({flatten:!0}).filter(e=>"a"===e.tagName.toLowerCase()||"sgds-link"===e.tagName.toLowerCase());if(s.length>1)console.error("More than one anchor tag is added to sgds-mainnav-item");else{if(0===s.length){t.assignedNodes({flatten:!0}).forEach(e=>{if(e.nodeType===Node.TEXT_NODE){const t=document.createElement("a");t.textContent=e.textContent,e.parentNode.replaceChild(t,e)}})}if(1===s.length){const e=s[0];if(this.active&&e.setAttribute("aria-current","true"),this.disabled)return e.setAttribute("href","javascript:void(0)"),void e.setAttribute("tabindex","-1");e.addEventListener("click",e=>{e.target.closest("sgds-mainnav").hide()})}}}render(){return ee`<slot @slotchange=${this._handleSlotChange}></slot>`}}Uo.styles=[...He.styles,jo],e([ze({type:Boolean,reflect:!0})],Uo.prototype,"active",void 0),e([ze({type:Boolean,reflect:!0})],Uo.prototype,"disabled",void 0),e([ot("disabled")],Uo.prototype,"_handleDisabled",null);var qo=n`:host([expand=always]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}@media (min-width:512px){:host([expand=sm]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:768px){:host([expand=md]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1024px){:host(:not([expand])) .nav-link,:host([expand=lg]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1280px){:host([expand=xl]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1440px){:host([expand=xxl]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}button.nav-link{appearance:none;background:none;border:none;font-family:inherit}.nav-link{align-items:center;box-sizing:border-box;color:var(--sgds-color-default);cursor:pointer;display:flex;font-size:var(--sgds-font-size-label-sm);gap:var(--sgds-gap-xs);line-height:var(--sgds-line-height-2-xs,20px);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);text-decoration:none}.nav-link:not(.disabled):hover{color:var(--sgds-primary-color-default)}.nav-link:not(.disabled):focus-visible{color:var(--sgds-primary-color-default);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.nav-link.disabled{cursor:not-allowed;opacity:var(--sgds-opacity-40)}.nav-link.read-only,.profile-avatar-mobile.read-only{cursor:default;pointer-events:none}:host([tone=brand][expand=always]) .nav-link,:host([tone^=gradient][expand=always]) .nav-link{color:var(--sgds-color-fixed-light)}@media screen and (min-width:512px){:host([tone=brand][expand=sm]) .nav-link,:host([tone^=gradient][expand=sm]) .nav-link{color:var(--sgds-color-fixed-light)}}@media screen and (min-width:768px){:host([tone=brand][expand=md]) .nav-link,:host([tone^=gradient][expand=md]) .nav-link{color:var(--sgds-color-fixed-light)}}@media screen and (min-width:1024px){:host([tone=brand][expand=lg]) .nav-link,:host([tone^=gradient][expand=lg]) .nav-link{color:var(--sgds-color-fixed-light)}}@media screen and (min-width:1280px){:host([tone=brand][expand=xl]) .nav-link,:host([tone^=gradient][expand=xl]) .nav-link{color:var(--sgds-color-fixed-light)}}@media screen and (min-width:1440px){:host([tone=brand][expand=xxl]) .nav-link,:host([tone^=gradient][expand=xxl]) .nav-link{color:var(--sgds-color-fixed-light)}}.profile-text{display:flex;flex:1;flex-direction:column;gap:var(--sgds-gap-text-2-xs,2px);text-align:left}.profile-label{font-weight:var(--sgds-font-weight-semibold)}.profile-label,.profile-secondary-text{font-size:var(--sgds-font-size-body-xs);line-height:var(--sgds-line-height-3-xs,16px)}sgds-dropdown{display:block;height:100%}.profile-avatar-mobile{align-items:center;background:none;border:none;border-radius:var(--sgds-border-radius-full);color:inherit;cursor:pointer;display:flex;font:inherit;height:100%;margin:0;padding:0}.profile-avatar-mobile:focus-visible{outline:none}.profile-avatar-mobile:focus-visible ::slotted(*){border-radius:var(--sgds-border-radius-full);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.profile-mobile-panel{animation:profile-panel-show .2s ease-in-out;background-color:var(--sgds-surface-default);border-top:var(--sgds-border-width-1) solid var(--sgds-border-color-translucent);box-shadow:0 2px 4px 0 hsla(0,0%,5%,.08);left:0;padding:var(--sgds-padding-md) 0;position:absolute;top:100%;width:100%;z-index:var(--sgds-z-index-floating)}.profile-mobile-panel[hidden]{display:none}@keyframes profile-panel-show{0%{max-height:0;opacity:0}to{max-height:100dvh;opacity:1}}.profile-mobile-items{display:flex;flex-direction:column;height:100dvh;margin:auto;max-width:var(--sgds-mainnav-max-width,1440px);overflow-y:auto;width:100%}@media screen and (min-width:1024px){.nav-link{padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}}`;class Yo extends He{constructor(){super(...arguments),this._breakpointReached=!0,this._mobileMenuOpen=!1,this._hasDropdownItems=!1,this.label="",this.secondaryText="",this.disabled=!1,this.ariaLabel="",this.close="default",this.togglerId=Zi("profile","button"),this._handleMobileToggle=()=>{this._mobileMenuOpen=!this._mobileMenuOpen},this._handleClickOutside=e=>{this._mobileMenuOpen&&"inside"!==this.close&&(e.composedPath().includes(this)||(this._mobileMenuOpen=!1))},this._handleSlotChange=()=>{this._hasDropdownItems=this._defaultSlotElements.length>0},this._handleKeydown=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._handleMobileToggle())}}connectedCallback(){super.connectedCallback(),window.addEventListener("click",this._handleClickOutside)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("click",this._handleClickOutside)}render(){return this._breakpointReached?this._hasDropdownItems?ee`
|
|
1054
1054
|
<button
|
|
1055
1055
|
class="profile-avatar-mobile"
|
|
1056
1056
|
aria-label=${this.ariaLabel||"Toggle navigation"}
|
|
@@ -1101,7 +1101,7 @@ class Mo{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
1101
1101
|
</div>`:ie}
|
|
1102
1102
|
</div>
|
|
1103
1103
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
1104
|
-
`}}Yo.styles=[...He.styles,qo],Yo.dependencies={"sgds-dropdown":Li,"sgds-icon":xt},e([Ve()],Yo.prototype,"_breakpointReached",void 0),e([Ve()],Yo.prototype,"_mobileMenuOpen",void 0),e([Ve()],Yo.prototype,"_hasDropdownItems",void 0),e([
|
|
1104
|
+
`}}Yo.styles=[...He.styles,qo],Yo.dependencies={"sgds-dropdown":Li,"sgds-icon":xt},e([Ve()],Yo.prototype,"_breakpointReached",void 0),e([Ve()],Yo.prototype,"_mobileMenuOpen",void 0),e([Ve()],Yo.prototype,"_hasDropdownItems",void 0),e([Ie({flatten:!0})],Yo.prototype,"_defaultSlotElements",void 0),e([ze({type:String,reflect:!0})],Yo.prototype,"label",void 0),e([ze({type:String,reflect:!0})],Yo.prototype,"secondaryText",void 0),e([ze({type:Boolean})],Yo.prototype,"disabled",void 0),e([ze({type:String})],Yo.prototype,"ariaLabel",void 0),e([ze({type:String})],Yo.prototype,"close",void 0);class Ko extends Yo{constructor(){super(...arguments),this._breakpointReached=!0}}e([Ao({context:Bo,subscribe:!0}),Ve()],Ko.prototype,"_breakpointReached",void 0),lt("sgds-mainnav",To),lt("sgds-mainnav-dropdown",No),lt("sgds-mainnav-item",Uo),lt("sgds-mainnav-profile",Ko);var Wo=n`b{font-weight:bolder}[role=button]{cursor:pointer}a{color:#0049dc;text-decoration:none!important}a[target=_blank]:after{height:var(--sgds-icon-size-sm,1rem)!important;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6.516 2.933h.017a.4.4 0 1 1 0 .8c-.566 0-.967 0-1.28.026-.31.025-.498.073-.646.149a1.6 1.6 0 0 0-.7.699c-.075.148-.123.336-.148.645-.025.314-.026.714-.026 1.281v2.933c0 .567 0 .968.026 1.282.026.308.073.497.149.645a1.6 1.6 0 0 0 .699.699c.148.075.337.123.645.149.314.025.715.025 1.281.025h2.934c.566 0 .967 0 1.28-.025.31-.026.498-.073.646-.149a1.6 1.6 0 0 0 .7-.7c.075-.147.123-.336.148-.644.025-.314.026-.715.026-1.282a.4.4 0 0 1 .8 0v.018c0 .545 0 .979-.029 1.329-.03.358-.09.663-.233.943a2.4 2.4 0 0 1-1.049 1.049c-.28.142-.585.204-.943.233-.35.028-.784.028-1.329.028H6.516c-.545 0-.979 0-1.329-.028-.358-.03-.664-.09-.943-.233a2.4 2.4 0 0 1-1.05-1.049c-.142-.28-.203-.585-.232-.943-.029-.35-.029-.784-.029-1.33V6.517c0-.546 0-.98.029-1.33.03-.357.09-.663.233-.942a2.4 2.4 0 0 1 1.049-1.05c.28-.142.585-.203.943-.232.35-.029.784-.029 1.329-.029Zm1.75.4c0-.22.18-.4.4-.4h4c.222 0 .4.18.4.4v4a.4.4 0 0 1-.8 0V4.3L8.284 8.283a.4.4 0 0 1-.566-.566l3.984-3.984H8.667a.4.4 0 0 1-.4-.4Z' fill='%230269D0'/%3E%3C/svg%3E")!important;mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6.516 2.933h.017a.4.4 0 1 1 0 .8c-.566 0-.967 0-1.28.026-.31.025-.498.073-.646.149a1.6 1.6 0 0 0-.7.699c-.075.148-.123.336-.148.645-.025.314-.026.714-.026 1.281v2.933c0 .567 0 .968.026 1.282.026.308.073.497.149.645a1.6 1.6 0 0 0 .699.699c.148.075.337.123.645.149.314.025.715.025 1.281.025h2.934c.566 0 .967 0 1.28-.025.31-.026.498-.073.646-.149a1.6 1.6 0 0 0 .7-.7c.075-.147.123-.336.148-.644.025-.314.026-.715.026-1.282a.4.4 0 0 1 .8 0v.018c0 .545 0 .979-.029 1.329-.03.358-.09.663-.233.943a2.4 2.4 0 0 1-1.049 1.049c-.28.142-.585.204-.943.233-.35.028-.784.028-1.329.028H6.516c-.545 0-.979 0-1.329-.028-.358-.03-.664-.09-.943-.233a2.4 2.4 0 0 1-1.05-1.049c-.142-.28-.203-.585-.232-.943-.029-.35-.029-.784-.029-1.33V6.517c0-.546 0-.98.029-1.33.03-.357.09-.663.233-.942a2.4 2.4 0 0 1 1.049-1.05c.28-.142.585-.203.943-.232.35-.029.784-.029 1.329-.029Zm1.75.4c0-.22.18-.4.4-.4h4c.222 0 .4.18.4.4v4a.4.4 0 0 1-.8 0V4.3L8.284 8.283a.4.4 0 0 1-.566-.566l3.984-3.984H8.667a.4.4 0 0 1-.4-.4Z' fill='%230269D0'/%3E%3C/svg%3E")!important;width:var(--sgds-icon-size-sm,1rem)!important}a:hover{color:#0022b9}.sgds-masthead{color-scheme:var(--sgds-color-scheme,only light);font-family:Inter,system-ui,sans-serif;font-size:.875rem;line-height:1.25rem}.banner{background-color:light-dark(#f7f7f7,#1a1a1a)}.container{margin-left:auto;margin-right:auto;max-width:var(--sgds-mainnav-max-width,1440px);padding:.25rem var(--sgds-mainnav-mobile-padding-x,1.25rem);width:100%}:host([fluid]) .container{max-width:none}.sg-crest{flex-shrink:0;height:20px;width:20px}.sg-crest path{fill:#db0000}.masthead-layout{display:flex;gap:.25rem}.masthead-text-layout{align-items:center;display:flex;flex-wrap:wrap;gap:0 .75rem}.sgds-masthead-identify-icon{align-self:center;display:block;height:20px;transform:rotate(180deg);transition:transform .3s ease-in-out 0s;user-select:none;width:20px}.sgds-masthead-identify-icon.show{transform:rotate(0deg)}.sgds-masthead-button{align-items:center;color:light-dark(#0269d0,#60aaf4);cursor:pointer;display:flex;gap:4px}.sgds-masthead-button:hover{color:light-dark(#0151a0,#96c7f7)}.panel{background-color:light-dark(#f7f7f7,#1a1a1a)}.sgds-masthead .sgds-masthead-content{display:grid;grid-template-rows:0fr;opacity:0;overflow:hidden;padding-bottom:0;padding-top:0;transition:grid-template-rows .3s cubic-bezier(.25,0,.25,1),opacity .3s cubic-bezier(.25,0,.25,1),padding .3s cubic-bezier(.25,0,.25,1)}.sgds-masthead .sgds-masthead-content.show{grid-template-rows:1fr;opacity:1;padding-bottom:1rem;padding-top:1rem}.sgds-masthead .sgds-masthead-content>.content-grid{min-height:0}.content-grid{display:grid;gap:1rem;grid-template-columns:1fr}.icon{margin-top:-.1em}.wrapper{display:flex;gap:.5rem}.content{display:flex;flex-direction:column;gap:.25rem}.content .title{font-weight:600}.content article{color:light-dark(#525252,#a5a5a5)}.banner-icon,.banner-icon-inline{height:20px;width:20px}.banner-icon path,.banner-icon-inline path{fill:light-dark(#1a1a1a,#f3f3f3)}a.trusted-websites-link{color:light-dark(#0269d0,#60aaf4);text-decoration:underline;width:fit-content}a.trusted-websites-link:hover{color:light-dark(#0151a0,#96c7f7)}.sgds-masthead-button:focus-visible,a.trusted-websites-link:focus-visible{outline:4px solid #60aaf4}@media screen and (min-width:768px){.content-grid{gap:1.5rem;grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}}@media screen and (min-width:1024px){.container{padding:.25rem var(--sgds-mainnav-padding-x,2rem)}}`,Go=n`svg{vertical-align:middle}`;class Jo extends He{constructor(){super(...arguments),this.fluid=!1,this.toggleVisibility=!1}_handleKeydown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._toggleVisibility())}_toggleVisibility(){this.toggleVisibility=!this.toggleVisibility}render(){return ee`
|
|
1105
1105
|
<div id="sgds-masthead" class="sgds-masthead">
|
|
1106
1106
|
<div class="banner">
|
|
1107
1107
|
<div class="container">
|
|
@@ -1253,7 +1253,7 @@ class Mo{constructor(e,t,s,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
1253
1253
|
</div>
|
|
1254
1254
|
</div>
|
|
1255
1255
|
</div>
|
|
1256
|
-
`}}function Xo(e){const t=e.tagName.toLowerCase();return"-1"!==e.getAttribute("tabindex")&&(!e.hasAttribute("disabled")&&((!e.hasAttribute("aria-disabled")||"false"===e.getAttribute("aria-disabled"))&&(!("input"===t&&"radio"===e.getAttribute("type")&&!e.hasAttribute("checked"))&&(null!==e.offsetParent&&("hidden"!==window.getComputedStyle(e).visibility&&(!("audio"!==t&&"video"!==t||!e.hasAttribute("controls"))||(!!e.hasAttribute("tabindex")||(!(!e.hasAttribute("contenteditable")||"false"===e.getAttribute("contenteditable"))||["button","input","select","textarea","a","audio","video","summary"].includes(t)))))))))}Jo.styles=[...He.styles,Go,$t,Wo],e([ze({type:Boolean,reflect:!0})],Jo.prototype,"fluid",void 0),e([Ve()],Jo.prototype,"toggleVisibility",void 0),lt("sgds-masthead",Jo);let Qo=[];class en{constructor(e){this.tabDirection="forward",this.element=e,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){Qo.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){Qo=Qo.filter(e=>e!==this.element),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return Qo[Qo.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){const{start:e,end:t}=function(e){var t,s;const i=[];return function e(t){t instanceof HTMLElement&&(i.push(t),null!==t.shadowRoot&&"open"===t.shadowRoot.mode&&e(t.shadowRoot)),[...t.children].forEach(t=>e(t))}(e),{start:null!==(t=i.find(e=>Xo(e)))&&void 0!==t?t:null,end:null!==(s=i.reverse().find(e=>Xo(e)))&&void 0!==s?s:null}}(this.element),s="forward"===this.tabDirection?e:t;"function"==typeof(null==s?void 0:s.focus)&&s.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(e){"Tab"===e.key&&e.shiftKey&&(this.tabDirection="backward",requestAnimationFrame(()=>this.checkFocus()))}handleKeyUp(){this.tabDirection="forward"}}var tn=n`:host(:not([size=fullscreen])) .modal-panel{background-color:var(--sgds-surface-default);max-width:var(--sgds-dimension-640);padding:var(--sgds-padding-xl)}:host([size=sm]) .modal-panel{max-width:var(--sgds-dimension-480)}:host([size=md]) .modal-panel{max-width:var(--sgds-dimension-640)}:host([size=lg]) .modal-panel{max-width:var(--sgds-dimension-800)}:host([size=xl]) .modal-panel{max-width:var(--sgds-dimension-1280)}:host([size=fullscreen]) .modal-overlay{background-color:var(--sgds-surface-default)}:host([size=fullscreen]) .modal-panel{margin:var(--sgds-margin-xl) var(--sgds-margin-lg)}.modal{align-items:start;bottom:0;display:flex;font-family:var(--sgds-body-font-family);justify-content:center;left:0;position:fixed;right:0;top:0;z-index:var(--sgds-z-index-modal)}.modal-panel{border-radius:var(--sgds-border-radius-md);display:flex;flex-direction:column;gap:var(--sgds-gap-2-xl);margin:auto;max-height:calc(100% - var(--sgds-margin-xl) - var(--sgds-margin-xl));width:100%;z-index:2}.modal-panel:focus{outline:none}.modal-content{display:flex;flex:1 1 auto;flex-direction:column;gap:var(--sgds-gap-2-xl);min-height:0;position:relative}.modal-header__close{position:absolute;right:calc(var(--sgds-padding-md)*-1);top:calc(var(--sgds-padding-md)*-1)}@media screen and (min-width:512px){:host([size=fullscreen]) .modal-panel{margin:var(--sgds-margin-xl)}}@media screen and (min-width:768px){:host([size=fullscreen]) .modal-panel{margin:var(--sgds-margin-2-xl);max-height:calc(100% - var(--sgds-margin-2-xl) - var(--sgds-margin-2-xl))}}@media screen and (min-width:1024px){:host([size=fullscreen]) .modal-panel{margin:var(--sgds-margin-4-xl) var(--sgds-margin-lg);max-height:calc(100% - var(--sgds-margin-4-xl) - var(--sgds-margin-4-xl));max-width:var(--sgds-dimension-888)}}@media screen and (min-width:1280px){:host([size=fullscreen]) .modal-panel{max-width:var(--sgds-dimension-1168)}}@media screen and (min-width:1440px){:host([size=fullscreen]) .modal-panel{max-width:var(--sgds-dimension-1312)}}.modal.show .modal-panel{opacity:1;transform:none}.modal-header{display:flex;flex:0 0 auto;flex-direction:row;justify-content:space-between;max-width:var(--sgds-dimension-872)}.modal-header__title-description{display:flex;flex-direction:column;gap:var(--sgds-gap-sm)}:host([size=fullscreen]) .modal-header__title-description{gap:var(--sgds-gap-md)}slot[name=title]::slotted(*){align-items:center;display:flex;flex:1 1 auto;font-size:var(--sgds-font-size-heading-sm)!important;gap:1rem;line-height:var(--sgds-line-height-lg)!important;margin:var(--sgds-margin-none)!important}slot[name=description]::slotted(*){color:var(--sgds-color-subtle);line-height:var(--sgds-line-height-xs);margin:var(--sgds-margin-none)!important}.modal-body{-webkit-overflow-scrolling:touch;flex:1 1 auto;overflow:auto}.modal-body slot::slotted(*){--sgds-paragraph-spacing-xl:var(--sgds-margin-none)}.modal-footer{display:flex;flex:0 0 auto;flex-wrap:wrap;gap:var(--sgds-gap-md);justify-content:flex-end;padding-top:var(--sgds-padding-md)}.modal:not(.has-footer) .modal-footer{display:none}.modal-overlay{background-color:var(--sgds-bg-overlay);bottom:0;left:0;position:fixed;right:0;top:0}[hidden]{display:none}`;class sn extends He{constructor(){super(...arguments),this.hasSlotController=new $i(this,"footer"),this.open=!1,this.noAnimation=!1,this.size="md",this.hasFooterSlot=!1,this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new en(this),this._resizeHandler=this._debounce(this._onWindowResize.bind(this),200)}disconnectedCallback(){super.disconnectedCallback(),this._removeResizeListener(),uo(this)}firstUpdated(e){super.firstUpdated(e),this._onWindowResize(),this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),go(this))}updated(){this.hasFooterSlot||(this.hasFooterSlot=this.hasSlotController.test("footer"))}_debounce(e,t){let s;return(...i)=>{clearTimeout(s),s=window.setTimeout(()=>e(...i),t)}}_onWindowResize(){const e=this.panel.getBoundingClientRect().width,t=this.querySelectorAll("sgds-button[slot='footer']");this.panel&&(t.length<=1||(e<512||"fullscreen"===this.size&&e<
|
|
1256
|
+
`}}function Xo(e){const t=e.tagName.toLowerCase();return"-1"!==e.getAttribute("tabindex")&&(!e.hasAttribute("disabled")&&((!e.hasAttribute("aria-disabled")||"false"===e.getAttribute("aria-disabled"))&&(!("input"===t&&"radio"===e.getAttribute("type")&&!e.hasAttribute("checked"))&&(null!==e.offsetParent&&("hidden"!==window.getComputedStyle(e).visibility&&(!("audio"!==t&&"video"!==t||!e.hasAttribute("controls"))||(!!e.hasAttribute("tabindex")||(!(!e.hasAttribute("contenteditable")||"false"===e.getAttribute("contenteditable"))||["button","input","select","textarea","a","audio","video","summary"].includes(t)))))))))}Jo.styles=[...He.styles,Go,$t,Wo],e([ze({type:Boolean,reflect:!0})],Jo.prototype,"fluid",void 0),e([Ve()],Jo.prototype,"toggleVisibility",void 0),lt("sgds-masthead",Jo);let Qo=[];class en{constructor(e){this.tabDirection="forward",this.element=e,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){Qo.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){Qo=Qo.filter(e=>e!==this.element),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return Qo[Qo.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){const{start:e,end:t}=function(e){var t,s;const i=[];return function e(t){t instanceof HTMLElement&&(i.push(t),null!==t.shadowRoot&&"open"===t.shadowRoot.mode&&e(t.shadowRoot)),[...t.children].forEach(t=>e(t))}(e),{start:null!==(t=i.find(e=>Xo(e)))&&void 0!==t?t:null,end:null!==(s=i.reverse().find(e=>Xo(e)))&&void 0!==s?s:null}}(this.element),s="forward"===this.tabDirection?e:t;"function"==typeof(null==s?void 0:s.focus)&&s.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(e){"Tab"===e.key&&e.shiftKey&&(this.tabDirection="backward",requestAnimationFrame(()=>this.checkFocus()))}handleKeyUp(){this.tabDirection="forward"}}var tn=n`:host(:not([size=fullscreen])) .modal-panel{background-color:var(--sgds-surface-default);max-width:var(--sgds-dimension-640);padding:var(--sgds-padding-xl)}:host([size=sm]) .modal-panel{max-width:var(--sgds-dimension-480)}:host([size=md]) .modal-panel{max-width:var(--sgds-dimension-640)}:host([size=lg]) .modal-panel{max-width:var(--sgds-dimension-800)}:host([size=xl]) .modal-panel{max-width:var(--sgds-dimension-1280)}:host([size=fullscreen]) .modal-overlay{background-color:var(--sgds-surface-default)}:host([size=fullscreen]) .modal-panel{margin:var(--sgds-margin-xl) var(--sgds-margin-lg)}.modal{align-items:start;bottom:0;display:flex;font-family:var(--sgds-body-font-family);justify-content:center;left:0;position:fixed;right:0;top:0;z-index:var(--sgds-z-index-modal)}.modal-panel{border-radius:var(--sgds-border-radius-md);display:flex;flex-direction:column;gap:var(--sgds-gap-2-xl);margin:auto;max-height:calc(100% - var(--sgds-margin-xl) - var(--sgds-margin-xl));width:100%;z-index:2}.modal-panel:focus{outline:none}.modal-content{display:flex;flex:1 1 auto;flex-direction:column;gap:var(--sgds-gap-2-xl);min-height:0;position:relative}.modal-header__close{position:absolute;right:calc(var(--sgds-padding-md)*-1);top:calc(var(--sgds-padding-md)*-1)}@media screen and (min-width:512px){:host([size=fullscreen]) .modal-panel{margin:var(--sgds-margin-xl)}}@media screen and (min-width:768px){:host([size=fullscreen]) .modal-panel{margin:var(--sgds-margin-2-xl);max-height:calc(100% - var(--sgds-margin-2-xl) - var(--sgds-margin-2-xl))}}@media screen and (min-width:1024px){:host([size=fullscreen]) .modal-panel{margin:var(--sgds-margin-4-xl) var(--sgds-margin-lg);max-height:calc(100% - var(--sgds-margin-4-xl) - var(--sgds-margin-4-xl));max-width:var(--sgds-dimension-888)}}@media screen and (min-width:1280px){:host([size=fullscreen]) .modal-panel{max-width:var(--sgds-dimension-1168)}}@media screen and (min-width:1440px){:host([size=fullscreen]) .modal-panel{max-width:var(--sgds-dimension-1312)}}.modal.show .modal-panel{opacity:1;transform:none}.modal-header{display:flex;flex:0 0 auto;flex-direction:row;justify-content:space-between;max-width:var(--sgds-dimension-872)}.modal-header__title-description{display:flex;flex-direction:column;gap:var(--sgds-gap-sm)}:host([size=fullscreen]) .modal-header__title-description{gap:var(--sgds-gap-md)}slot[name=title]::slotted(*){align-items:center;display:flex;flex:1 1 auto;font-size:var(--sgds-font-size-heading-sm)!important;gap:1rem;line-height:var(--sgds-line-height-lg)!important;margin:var(--sgds-margin-none)!important}slot[name=description]::slotted(*){color:var(--sgds-color-subtle);line-height:var(--sgds-line-height-xs);margin:var(--sgds-margin-none)!important}.modal-body{-webkit-overflow-scrolling:touch;flex:1 1 auto;overflow:auto}.modal-body slot::slotted(*){--sgds-paragraph-spacing-xl:var(--sgds-margin-none)}.modal-footer{display:flex;flex:0 0 auto;flex-wrap:wrap;gap:var(--sgds-gap-md);justify-content:flex-end;padding-top:var(--sgds-padding-md)}.modal:not(.has-footer) .modal-footer{display:none}.modal-overlay{background-color:var(--sgds-bg-overlay);bottom:0;left:0;position:fixed;right:0;top:0}[hidden]{display:none}`;class sn extends He{constructor(){super(...arguments),this.hasSlotController=new $i(this,"footer"),this.open=!1,this.noAnimation=!1,this.size="md",this.hasFooterSlot=!1,this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new en(this),this._resizeHandler=this._debounce(this._onWindowResize.bind(this),200)}disconnectedCallback(){super.disconnectedCallback(),this._removeResizeListener(),uo(this)}firstUpdated(e){super.firstUpdated(e),this._onWindowResize(),this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),go(this))}updated(){this.hasFooterSlot||(this.hasFooterSlot=this.hasSlotController.test("footer"))}_debounce(e,t){let s;return(...i)=>{clearTimeout(s),s=window.setTimeout(()=>e(...i),t)}}_onWindowResize(){const e=this.panel.getBoundingClientRect().width,t=this.querySelectorAll("sgds-button[slot='footer']");this.panel&&(t.length<=1||(e<512||"fullscreen"===this.size&&e<Do?t.forEach(e=>{e.fullWidth=!0}):t.forEach(e=>{e.fullWidth=!1})))}_addResizeListener(){window.addEventListener("resize",this._resizeHandler)}_removeResizeListener(){window.removeEventListener("resize",this._resizeHandler)}async show(){if(!this.open)return this.open=!0,at(this,"sgds-after-show")}async hide(){if(this.open)return this.open=!1,at(this,"sgds-after-hide")}requestClose(e){if(this.emit("sgds-close",{cancelable:!0,detail:{source:e}}).defaultPrevented){const e=st(this,"modal.denyClose");return void Ge(this.panel,e.keyframes)}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleDocumentKeyDown(e){this.open&&"Escape"===e.key&&(e.stopPropagation(),this.requestClose("keyboard"))}_overlayClickHandler(){"fullscreen"!==this.size&&this.requestClose("overlay")}async handleOpenChange(){if(this.open){this.emit("sgds-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),go(this),await Promise.all([Qe(this.dialog),Qe(this.overlay)]),this.dialog.hidden=!1;const e=st(this,"modal.show"),t=st(this,"modal.overlay.show");!this.noAnimation&&await Promise.all([Ge(this.panel,e.keyframes,e.options),Ge(this.overlay,t.keyframes,t.options)]),this.emit("sgds-after-show"),this.heading.focus(),this._addResizeListener()}else{this.emit("sgds-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([Qe(this.dialog),Qe(this.overlay)]);const e=st(this,"modal.hide"),t=st(this,"modal.overlay.hide");!this.noAnimation&&await Promise.all([Ge(this.overlay,t.keyframes,t.options).then(()=>{this.overlay.hidden=!0}),Ge(this.panel,e.keyframes,e.options).then(()=>{this.panel.hidden=!0})]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,uo(this);const s=this.originalTrigger;"function"==typeof(null==s?void 0:s.focus)&&setTimeout(()=>s.focus()),this.emit("sgds-after-hide"),this._removeResizeListener()}}render(){return ee`
|
|
1257
1257
|
<div
|
|
1258
1258
|
class=${Ke({modal:!0,show:this.open,"has-footer":this.hasFooterSlot})}
|
|
1259
1259
|
>
|
|
@@ -1472,7 +1472,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
1472
1472
|
<div id="${this._controlId}-announcer" aria-live="assertive" class="visually-hidden">${this.value}</div>
|
|
1473
1473
|
${this._renderFeedback()}
|
|
1474
1474
|
</div>
|
|
1475
|
-
`}}pn.styles=[...fa.styles,ma,Go,na,hn],pn.dependencies={"sgds-input":Qa,"sgds-icon-button":Ya},e([Le("sgds-icon-button[ariaLabel^='increase by']")],pn.prototype,"plusBtn",void 0),e([Le("sgds-icon-button[ariaLabel^='decrease by']")],pn.prototype,"minusBtn",void 0),e([ze({type:Number,reflect:!0})],pn.prototype,"value",void 0),e([ze({type:Number})],pn.prototype,"step",void 0),e([ze({type:Number})],pn.prototype,"min",void 0),e([ze({type:Number})],pn.prototype,"max",void 0),e([ze({type:String,reflect:!0})],pn.prototype,"hasFeedback",void 0),e([ze({type:String,reflect:!0})],pn.prototype,"invalidFeedback",void 0),e([ze({type:Boolean,reflect:!0})],pn.prototype,"noValidate",void 0),e([ze({type:Boolean,reflect:!0})],pn.prototype,"readonly",void 0),e([ra()],pn.prototype,"defaultValue",void 0),e([
|
|
1475
|
+
`}}pn.styles=[...fa.styles,ma,Go,na,hn],pn.dependencies={"sgds-input":Qa,"sgds-icon-button":Ya},e([Le("sgds-icon-button[ariaLabel^='increase by']")],pn.prototype,"plusBtn",void 0),e([Le("sgds-icon-button[ariaLabel^='decrease by']")],pn.prototype,"minusBtn",void 0),e([ze({type:Number,reflect:!0})],pn.prototype,"value",void 0),e([ze({type:Number})],pn.prototype,"step",void 0),e([ze({type:Number})],pn.prototype,"min",void 0),e([ze({type:Number})],pn.prototype,"max",void 0),e([ze({type:String,reflect:!0})],pn.prototype,"hasFeedback",void 0),e([ze({type:String,reflect:!0})],pn.prototype,"invalidFeedback",void 0),e([ze({type:Boolean,reflect:!0})],pn.prototype,"noValidate",void 0),e([ze({type:Boolean,reflect:!0})],pn.prototype,"readonly",void 0),e([ra()],pn.prototype,"defaultValue",void 0),e([De("sgds-input")],pn.prototype,"_sgdsInput",void 0),lt("sgds-quantity-toggle",pn);var gn=n`:host{outline:0}.form-check-input[type=radio]{border-radius:50%}.form-check-input[checked]{--sgds-radio-bg-image:url('data:image/svg+xml;charset=utf-8,<svg width="8" height="8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 4a4 4 0 1 1 8 0 4 4 0 0 1-8 0Z" fill="%23fff"/></svg>')}.form-check-input[checked].is-invalid{background-color:var(--sgds-form-danger-surface-default)}`;class un extends He{constructor(){super(...arguments),this.checked=!1,this.disabled=!1,this.invalid=!1,this.autofocus=!1,this.radioId=Zi("radio")}connectedCallback(){super.connectedCallback(),this.setInitialAttributes(),this.addEventListeners()}handleCheckedChange(){var e;this.checked&&this.autofocus&&(null===(e=this.input)||void 0===e||e.focus()),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleBlur(){this.emit("sgds-blur")}handleClick(){this.disabled||(this.checked=!0)}handleFocus(){this.emit("sgds-focus")}addEventListeners(){this.addEventListener("blur",()=>this.handleBlur()),this.addEventListener("click",()=>this.handleClick()),this.addEventListener("focus",()=>this.handleFocus())}setInitialAttributes(){this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return ee`
|
|
1476
1476
|
<div class="form-check">
|
|
1477
1477
|
<input
|
|
1478
1478
|
class=${Ke({"form-check-input":!0,"is-invalid":this.invalid})}
|
|
@@ -1533,13 +1533,13 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
1533
1533
|
</div>
|
|
1534
1534
|
`:ie}
|
|
1535
1535
|
</fieldset>
|
|
1536
|
-
`}}mn.styles=[...fa.styles,vn],e([Le("slot:not([name])")],mn.prototype,"defaultSlot",void 0),e([Ve()],mn.prototype,"defaultValue",void 0),e([ze({reflect:!0})],mn.prototype,"value",void 0),e([ze({type:String,reflect:!0})],mn.prototype,"invalidFeedback",void 0),e([ze({type:Boolean,reflect:!0})],mn.prototype,"hasFeedback",void 0),e([ze({type:Boolean,reflect:!0})],mn.prototype,"required",void 0),e([ze({type:Boolean,reflect:!0})],mn.prototype,"noValidate",void 0),e([ze({type:Boolean,reflect:!0})],mn.prototype,"autofocus",void 0),e([ot("value",{waitUntilFirstUpdate:!0})],mn.prototype,"_handleValueChange",null),e([ot("invalid",{waitUntilFirstUpdate:!0})],mn.prototype,"_handleInvalidChange",null),e([Ve()],mn.prototype,"_isTouched",void 0),e([
|
|
1536
|
+
`}}mn.styles=[...fa.styles,vn],e([Le("slot:not([name])")],mn.prototype,"defaultSlot",void 0),e([Ve()],mn.prototype,"defaultValue",void 0),e([ze({reflect:!0})],mn.prototype,"value",void 0),e([ze({type:String,reflect:!0})],mn.prototype,"invalidFeedback",void 0),e([ze({type:Boolean,reflect:!0})],mn.prototype,"hasFeedback",void 0),e([ze({type:Boolean,reflect:!0})],mn.prototype,"required",void 0),e([ze({type:Boolean,reflect:!0})],mn.prototype,"noValidate",void 0),e([ze({type:Boolean,reflect:!0})],mn.prototype,"autofocus",void 0),e([ot("value",{waitUntilFirstUpdate:!0})],mn.prototype,"_handleValueChange",null),e([ot("invalid",{waitUntilFirstUpdate:!0})],mn.prototype,"_handleInvalidChange",null),e([Ve()],mn.prototype,"_isTouched",void 0),e([Ie()],mn.prototype,"_radios",void 0),e([ot("_isTouched",{waitUntilFirstUpdate:!0})],mn.prototype,"_handleIsTouched",null),e([ot("disabled",{waitUntilFirstUpdate:!0})],mn.prototype,"_handleDisabledChange",null),lt("sgds-radio",un),lt("sgds-radio-group",mn);var fn=n`:host{--sidenav-sticky-top:0rem}.sticky{height:calc(100vh - var(--sidenav-sticky-top));overflow-y:visible;position:sticky;top:var(--sidenav-sticky-top)}`;class bn extends He{constructor(){super(...arguments),this.sticky=!1}get items(){return[...this.defaultNodes||[]].filter(e=>void 0!==e.tagName)}async onToggle(e){const t="SGDS-SIDENAV-LINK"===e.target.tagName;if(e.defaultPrevented||t)return;this.items}render(){return ee`
|
|
1537
1537
|
<nav class=${Ke({sticky:this.sticky})}>
|
|
1538
1538
|
<div>
|
|
1539
1539
|
<slot @click=${this.onToggle}></slot>
|
|
1540
1540
|
</div>
|
|
1541
1541
|
</nav>
|
|
1542
|
-
`}}bn.styles=[...He.styles,fn],e([ze({type:Boolean,attribute:!0})],bn.prototype,"sticky",void 0),e([
|
|
1542
|
+
`}}bn.styles=[...He.styles,fn],e([ze({type:Boolean,attribute:!0})],bn.prototype,"sticky",void 0),e([Ie()],bn.prototype,"defaultNodes",void 0);var wn=n`:host([class^=second-level]) .sidenav-btn{font-weight:var(--sgds-font-weight-regular);padding-left:var(--sgds-padding-3-xl)}button{all:unset}.sidenav-btn{background:0;border:0;border-radius:var(--sgds-border-radius-md);display:flex;font-size:var(--sgds-font-size-label-md);font-weight:var(--sgds-font-weight-semibold);gap:var(--sgds-gap-xs);line-height:var(--sgds-line-height-xs);padding:var(--sgds-padding-sm) var(--sgds-padding-sm) var(--sgds-padding-sm) calc(var(--sgds-padding-sm) + var(--sgds-padding-2-xs));text-align:initial;width:100%;.caret-icon,slot[name=caret-icon]::slotted(*){margin-bottom:auto;margin-left:auto;transform:rotate(180deg);transition:all .3s ease-in-out}}.sidenav-btn:hover:not(.disabled){background-color:var(--sgds-bg-translucent-subtle)}.sidenav-btn.active{color:var(--sgds-color-default)}.sidenav-btn.disabled{opacity:var(--sgds-opacity-40);pointer-events:none}.sidenav-btn:not(.active){.caret-icon,slot[name=caret-icon]::slotted(*){transform:rotate(0deg)}}.sidenav-btn:focus-visible:not(.disabled){background-color:var(--sgds-bg-translucent-subtle)}.sidenav-btn:focus-visible:not(.disabled){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.no-menu-default::slotted(a){background:0;border:0;border-radius:var(--sgds-border-radius-md);color:inherit!important;display:flex;font-size:var(--sgds-font-size-label-md);font-weight:var(--sgds-font-weight-semibold)!important;gap:var(--sgds-gap-xs);line-height:var(--sgds-line-height-xs)!important;padding:var(--sgds-padding-sm) var(--sgds-padding-sm) var(--sgds-padding-sm) calc(var(--sgds-padding-sm) + var(--sgds-padding-2-xs));text-decoration:none!important}.no-menu-default::slotted(a:focus-visible){background-color:var(--sgds-bg-translucent-subtle)}.no-menu-default::slotted(a:focus-visible){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([class^=first-level][active]) .no-menu-default::slotted(a){background-color:var(--sgds-primary-surface-translucent);color:var(--sgds-primary-color-emphasis)!important}:host([class^=first-level][disabled]) .no-menu-default::slotted(a){opacity:var(--sgds-opacity-40);pointer-events:none}`;class yn extends He{constructor(){super(...arguments),this.active=!1,this.disabled=!1,this.isLink=!1,this._collapseId=Zi("sidenav","collapse"),this._buttonId=Zi("sidenav","button"),this._levelId=Zi("sidenav","this"),this._firstLevelId="first-level-"+this._levelId,this._secondLevelId="second-level-"+this._levelId,this._thirdLevelId="third-level-"+this._levelId,this.index="-1"}_onToggle(){this.emit("sgds-toggle",{detail:{index:this.index}})}async show(){if(!this.isLink&&!this.active)return this.active=!0,at(this,"sgds-after-show")}async hide(){if(!this.isLink&&this.active)return this.active=!1,at(this,"sgds-after-hide")}connectedCallback(){super.connectedCallback(),this.classList.add(this._firstLevelId)}firstUpdated(e){super.firstUpdated(e),this.isLink||(this.body.hidden=!this.active,this.body.style.height=this.active?"auto":"0"),this._handleOpenMenu()}_handleOpenMenu(){this.active||(this.active=this._items.some(e=>e.active))}_handleSummaryClick(){this.active?this.hide():this.show(),this._onToggle(),this.header.focus()}_handleSummaryKeyDown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.active?this.hide():this.show()),"ArrowUp"!==e.key&&"ArrowLeft"!==e.key||(e.preventDefault(),this.hide()),"ArrowDown"!==e.key&&"ArrowRight"!==e.key||(e.preventDefault(),this.show())}async _handleOpenChange(){if(!this.isLink)if(this.active){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return void(this.active=!1);await Qe(this.body),this.body.hidden=!1;const{keyframes:e,options:t}=st(this,"sidenav.show");await Ge(this.body,Xe(e,this.body.scrollHeight),t),this.body.style.height="auto",this.emit("sgds-after-show")}else{if(this.emit("sgds-hide",{cancelable:!0}).defaultPrevented)return void(this.active=!0);await Qe(this.body);const{keyframes:e,options:t}=st(this,"sidenav.hide");await Ge(this.body,Xe(e,this.body.scrollHeight),t),this.body.hidden=!0,this.body.style.height="auto",this.emit("sgds-after-hide")}}_handleSlotChange(e){const t=e.target.assignedElements({flatten:!0}).filter(e=>"a"===e.tagName.toLowerCase());if(t.length>1)return console.error("More than one anchor tag is added to sgds-sidenav-item");if(1===t.length){const e=t[0];return this.disabled&&e.setAttribute("tabindex","-1"),this.active&&e.setAttribute("aria-current","true"),this.isLink=!0}e.target.assignedElements({flatten:!0}).filter(e=>"sgds-sidenav-item"===e.tagName.toLowerCase()).forEach(e=>{const t=Array.from(e.classList).filter(e=>e.startsWith("first-level"))[0];e.classList.replace(t,this._secondLevelId)}),Array.from(this.classList).some(e=>e.startsWith("second-level"))&&this._items.forEach(e=>e.classList.add(this._thirdLevelId)),this._handleOpenMenu()}render(){const e=ee`
|
|
1543
1543
|
<button
|
|
1544
1544
|
@click=${this._handleSummaryClick}
|
|
1545
1545
|
@keydown=${this._handleSummaryKeyDown}
|
|
@@ -1565,7 +1565,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
1565
1565
|
</div>
|
|
1566
1566
|
`,t=ee` <slot @slotchange=${this._handleSlotChange} class="no-menu-default"></slot> `;return ee`
|
|
1567
1567
|
<div class="sidenav-item" aria-haspopup="${!this.isLink}">${this.isLink?t:e}</div>
|
|
1568
|
-
`}}yn.styles=[...He.styles,wn],yn.dependencies={"sgds-icon":xt},e([Le(".sidenav-body")],yn.prototype,"body",void 0),e([Le(".sidenav-btn")],yn.prototype,"header",void 0),e([ze({type:Boolean,reflect:!0})],yn.prototype,"active",void 0),e([ze({type:Boolean,reflect:!0})],yn.prototype,"disabled",void 0),e([ze({type:String})],yn.prototype,"ariaLabel",void 0),e([Ve()],yn.prototype,"isLink",void 0),e([ot("active",{waitUntilFirstUpdate:!0})],yn.prototype,"_handleOpenChange",null),e([
|
|
1568
|
+
`}}yn.styles=[...He.styles,wn],yn.dependencies={"sgds-icon":xt},e([Le(".sidenav-body")],yn.prototype,"body",void 0),e([Le(".sidenav-btn")],yn.prototype,"header",void 0),e([ze({type:Boolean,reflect:!0})],yn.prototype,"active",void 0),e([ze({type:Boolean,reflect:!0})],yn.prototype,"disabled",void 0),e([ze({type:String})],yn.prototype,"ariaLabel",void 0),e([Ve()],yn.prototype,"isLink",void 0),e([ot("active",{waitUntilFirstUpdate:!0})],yn.prototype,"_handleOpenChange",null),e([Ie()],yn.prototype,"_items",void 0),it("sidenav.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:200,easing:"ease-in-out"}}),it("sidenav.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:200,easing:"ease-in-out"}});var xn=n`:host([class^=third-level]) ::slotted(a){padding-left:calc(var(--sgds-padding-xl) + var(--sgds-padding-3-xl))}::slotted(a){--sgds-link-color-default:var(--sgds-color-default);border-radius:var(--sgds-border-radius-md);color:var(--sgds-color-default,var(--sgds-link-color-default));display:block;padding:var(--sgds-padding-sm) var(--sgds-padding-sm) var(--sgds-padding-sm) var(--sgds-padding-3-xl);text-decoration:none!important}:host([active]) ::slotted(a){--sgds-link-color-default:var(--sgds-primary-color-emphasis);background-color:var(--sgds-primary-surface-translucent);color:var(--sgds-primary-color-emphasis,var(--sgds-link-color-default))}:host(:not([disabled]):not([active])) ::slotted(a:hover){background-color:var(--sgds-bg-translucent-subtle)}::slotted(a:focus),::slotted(a:focus-visible),::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-color-default,var(--sgds-link-color-emphasis))}:host([active]) ::slotted(a:focus),:host([active]) ::slotted(a:focus-visible),:host([active]) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-primary-color-emphasis);color:var(--sgds-primary-color-emphasis,var(--sgds-link-color-emphasis))}:host([disabled]) ::slotted(a){opacity:var(--sgds-opacity-40);pointer-events:none}:host([disabled]) ::slotted(a:focus-visible){outline:0}::slotted(a:focus-visible){background-color:var(--sgds-bg-translucent-subtle)}::slotted(a:focus-visible){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([active]) ::slotted(a:focus-visible){background-color:var(--sgds-primary-bg-translucent)}`;class _n extends He{constructor(){super(...arguments),this.active=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-disabled",`${this.disabled}`)}_handleDisabled(){this.setAttribute("aria-disabled",`${this.disabled}`),this._anchor[0].setAttribute("aria-disabled",`${this.disabled}`),this.disabled||this._anchor[0].removeAttribute("tabindex")}_handleSlotChange(){this._anchor[0].setAttribute("aria-disabled",`${this.disabled}`),this.disabled&&(this._anchor[0].setAttribute("tabindex","-1"),this._anchor[0].removeAttribute("href"),this._anchor[0].setAttribute("role","link"))}render(){return ee` <slot @slotchange=${this._handleSlotChange}></slot> `}}_n.styles=[...He.styles,xn],e([ze({type:Boolean,reflect:!0})],_n.prototype,"active",void 0),e([ze({type:Boolean,reflect:!0})],_n.prototype,"disabled",void 0),e([Ie({flatten:!0})],_n.prototype,"_anchor",void 0),e([ot("disabled",{waitUntilFirstUpdate:!0})],_n.prototype,"_handleDisabled",null),lt("sgds-sidenav",bn),lt("sgds-sidenav-item",yn),lt("sgds-sidenav-link",_n);var kn=n`.skeleton{--bg:var(--sgds-bg-translucent-subtle);background-color:var(--bg);border-radius:var(--sgds-border-radius-sm);display:flex;flex-direction:column;gap:var(--sgds-gap-xs);max-width:100%}.skeleton.skeleton-paragraph{background-color:transparent}.skeleton.skeleton-paragraph.auto-size-rows>div[class*=skeleton-row]{background-color:var(--sgds-bg-translucent);border-radius:var(--sgds-border-radius-sm);height:-webkit-fill-available}.sheen{--sheen-color:var(--sgds-bg-translucent);animation:sheen 8s ease-in-out infinite;background:linear-gradient(270deg,var(--bg) 0,var(--sheen-color) 33.33%,var(--sheen-color) 66.67%,var(--bg) 100%);background-size:400% 100%}@keyframes sheen{0%{background-position:200% 0}to{background-position:-200% 0}}`;class Cn extends He{constructor(){super(...arguments),this.width="",this.height="",this.borderRadius="",this.sheen=!1}render(){const e={width:this.width||void 0,height:this.height||void 0,borderRadius:this.borderRadius||void 0};return ee`
|
|
1569
1569
|
<div
|
|
1570
1570
|
class=${Ke({skeleton:!0,"skeleton-paragraph":this.rows>0,"auto-size-rows":this.rows>0,sheen:this.sheen&&!this.rows})}
|
|
1571
1571
|
style=${Object.entries(e).filter(([e,t])=>t).map(([e,t])=>`${e.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${t}`).join("; ")}
|
|
@@ -1599,7 +1599,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
1599
1599
|
</div>
|
|
1600
1600
|
`)}
|
|
1601
1601
|
</div>
|
|
1602
|
-
`}}Sn.styles=[...He.styles,$n],Sn.dependencies={"sgds-icon":xt},e([ze({type:Array})],Sn.prototype,"steps",void 0),e([ze({type:Number,reflect:!0})],Sn.prototype,"activeStep",void 0),e([ze({type:String,reflect:!0})],Sn.prototype,"orientation",void 0),e([ze({type:Boolean,reflect:!0})],Sn.prototype,"clickable",void 0),e([ze({type:Boolean,reflect:!0})],Sn.prototype,"linear",void 0),e([ra("activeStep")],Sn.prototype,"defaultActiveStep",void 0),e([
|
|
1602
|
+
`}}Sn.styles=[...He.styles,$n],Sn.dependencies={"sgds-icon":xt},e([ze({type:Array})],Sn.prototype,"steps",void 0),e([ze({type:Number,reflect:!0})],Sn.prototype,"activeStep",void 0),e([ze({type:String,reflect:!0})],Sn.prototype,"orientation",void 0),e([ze({type:Boolean,reflect:!0})],Sn.prototype,"clickable",void 0),e([ze({type:Boolean,reflect:!0})],Sn.prototype,"linear",void 0),e([ra("activeStep")],Sn.prototype,"defaultActiveStep",void 0),e([Ie()],Sn.prototype,"_slotNodes",void 0),e([ze({type:Boolean})],Sn.prototype,"hasDefaultSlot",void 0),e([ot("activeStep",{waitUntilFirstUpdate:!0})],Sn.prototype,"_handleActiveStepChange",null),e([ot("clickable",{waitUntilFirstUpdate:!0})],Sn.prototype,"_handleClickableChange",null),e([ot("orientation",{waitUntilFirstUpdate:!0})],Sn.prototype,"_handleOrientationChange",null);var Mn=n`:host{display:contents}.stepper-item-container{flex-basis:1em;flex-grow:1;flex-shrink:1;position:relative;width:fit-content}.stepper-item,.stepper-item-container{align-items:center;display:flex;flex-direction:column}.stepper-item{gap:var(--sgds-gap-sm)}.stepper-item.vertical{align-items:flex-start;flex-direction:row;margin-bottom:var(--sgds-padding-xl)}.stepper-item.clickable:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.stepper-item:not(.first):not(.vertical):before{background:var(--sgds-border-color-translucent);content:" ";height:var(--sgds-dimension-2);left:calc(-50% + 16px);position:absolute;top:15px;width:calc(100% - var(--sgds-dimension-32))}:host(:not(.last)) .stepper-item-container .stepper-item.vertical:after{background:var(--sgds-bg-translucent);content:" ";height:calc(100% - var(--sgds-dimension-32));left:15px;position:absolute;top:32px;width:var(--sgds-dimension-2)}.stepper-item-container .stepper-item.active:not(.first):before,.stepper-item-container .stepper-item.completed:not(.first):before,:host(:not(.last)) .stepper-item-container .stepper-item.completed:after{background:var(--sgds-primary-border-color-default)}.stepper-item.clickable{cursor:pointer}.stepper-marker{align-items:center;background:var(--sgds-bg-translucent);border:var(--sgds-border-width-2) solid var(--sgds-border-color-transparent);border-radius:50%;color:var(--sgds-color-default);display:flex;flex-shrink:0;height:var(--sgds-dimension-32);justify-content:center;width:var(--sgds-dimension-32);z-index:1}.stepper-detail{display:flex;flex-direction:column;gap:var(--sgds-gap-2-xs);max-width:var(--sgds-dimension-128);text-align:center}.stepper-item.vertical .stepper-detail{max-width:unset;padding:var(--sgds-padding-2-xs) 0 0;text-align:left}.stepper-item:not(.active):not(.completed) .stepper-label{color:var(--sgds-color-subtle)}.stepper-item.clickable:focus .stepper-marker,.stepper-item.clickable:focus-visible .stepper-marker,.stepper-item.clickable:hover .stepper-marker{background-color:var(--sgds-primary-surface-emphasis);border-color:var(--sgds-border-color-transparent);color:var(--sgds-color-fixed-light)}.stepper-item.clickable:focus .stepper-label,.stepper-item.clickable:focus-visible .stepper-label,.stepper-item.clickable:hover .stepper-label{color:var(--sgds-primary-color-emphasis)}.stepper-item.clickable .stepper-label{color:var(--sgds-primary-color-default)}.stepper-item.completed .stepper-marker{background-color:var(--sgds-bg-transparent);border:var(--sgds-border-width-2) solid var(--sgds-primary-border-color-default);color:var(--sgds-primary-color-default)}.stepper-item.active .stepper-marker{background-color:var(--sgds-primary-surface-default);color:var(--sgds-color-fixed-light)}.stepper-slot{color:var(--sgds-color-subtle);display:flex;flex-direction:column;font-size:var(--sgds-font-size-label-sm);font-weight:var(--sgds-font-weight-regular);gap:var(--sgds-gap-xs);letter-spacing:var(--sgds-letter-spacing-normal);line-height:var(--sgds-line-height-2-xs)}.stepper-item.disabled{opacity:var(--sgds-opacity-40)}`;class Zn extends He{constructor(){super(...arguments),this.stepHeader="",this.clickable=!1,this.active=!1,this.disabled=!1,this.completed=!1,this.stepIndex=0,this.orientation="horizontal",this.isFirstOfType=!1}render(){const e=!this.disabled&&this.clickable;return ee`
|
|
1603
1603
|
<div class="stepper-item-container">
|
|
1604
1604
|
<div
|
|
1605
1605
|
class="stepper-item ${Ke({first:this.isFirstOfType,active:this.active,completed:this.completed,clickable:this.clickable,vertical:"vertical"===this.orientation,disabled:this.disabled})}"
|
|
@@ -1645,7 +1645,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
1645
1645
|
<slot></slot>
|
|
1646
1646
|
</label>
|
|
1647
1647
|
</div>
|
|
1648
|
-
`}}Vn.styles=[...He.styles,va,zn],e([ze({reflect:!0,type:String})],Vn.prototype,"size",void 0),e([ze({reflect:!0,type:Boolean})],Vn.prototype,"icon",void 0),e([ze({type:Boolean,reflect:!0})],Vn.prototype,"checked",void 0),e([ze({type:Boolean,reflect:!0})],Vn.prototype,"disabled",void 0),e([ze({type:Boolean})],Vn.prototype,"hasDefaultSlot",void 0),e([ze({type:Boolean})],Vn.prototype,"hasLeftLabelSlot",void 0),e([ra("checked")],Vn.prototype,"defaultChecked",void 0),e([Le('input[type="checkbox"]')],Vn.prototype,"input",void 0),e([ot("disabled",{waitUntilFirstUpdate:!0})],Vn.prototype,"_handleDisabledChange",null),lt("sgds-switch",Vn);var Pn=n`.banner-wrapper{display:block;width:100%}.banner,.banner-wrapper{background-color:var(--sgds-surface-fixed-dark)}.banner{align-items:center;color:var(--sgds-color-fixed-light);display:flex;flex-direction:row;gap:var(--sgds-gap-xl);min-height:var(--sgds-dimension-64);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);position:relative}.content{flex:1;overflow:hidden;width:100%}::slotted(sgds-system-banner-item){display:none;flex:0 0 100%;opacity:0}::slotted(sgds-system-banner-item[active]){display:block;opacity:1}.pagination{align-items:center;bottom:12px;display:flex;font-size:var(--sgds-font-size-label-xs);font-weight:var(--sgds-font-weight-regular,400);gap:var(--sgds-gap-2-xs);letter-spacing:var(--sgds-letter-spacing-normal,0);line-height:var(--sgds-line-height-3-xs);position:absolute;right:20px}.d-none{display:none}sgds-close-button{position:absolute;right:20px;top:10px}@media (min-width:1024px){.pagination,sgds-close-button{position:static}.banner{margin:auto;max-width:var(--sgds-mainnav-max-width,1440px);padding-left:var(--sgds-mainnav-padding-x);padding-right:var(--sgds-mainnav-padding-x)}:host([fluid]) .banner{max-width:none}}`;const An="no-clamp-action-context",Ln="system-banner-children-count-context";class
|
|
1648
|
+
`}}Vn.styles=[...He.styles,va,zn],e([ze({reflect:!0,type:String})],Vn.prototype,"size",void 0),e([ze({reflect:!0,type:Boolean})],Vn.prototype,"icon",void 0),e([ze({type:Boolean,reflect:!0})],Vn.prototype,"checked",void 0),e([ze({type:Boolean,reflect:!0})],Vn.prototype,"disabled",void 0),e([ze({type:Boolean})],Vn.prototype,"hasDefaultSlot",void 0),e([ze({type:Boolean})],Vn.prototype,"hasLeftLabelSlot",void 0),e([ra("checked")],Vn.prototype,"defaultChecked",void 0),e([Le('input[type="checkbox"]')],Vn.prototype,"input",void 0),e([ot("disabled",{waitUntilFirstUpdate:!0})],Vn.prototype,"_handleDisabledChange",null),lt("sgds-switch",Vn);var Pn=n`.banner-wrapper{display:block;width:100%}.banner,.banner-wrapper{background-color:var(--sgds-surface-fixed-dark)}.banner{align-items:center;color:var(--sgds-color-fixed-light);display:flex;flex-direction:row;gap:var(--sgds-gap-xl);min-height:var(--sgds-dimension-64);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);position:relative}.content{flex:1;overflow:hidden;width:100%}::slotted(sgds-system-banner-item){display:none;flex:0 0 100%;opacity:0}::slotted(sgds-system-banner-item[active]){display:block;opacity:1}.pagination{align-items:center;bottom:12px;display:flex;font-size:var(--sgds-font-size-label-xs);font-weight:var(--sgds-font-weight-regular,400);gap:var(--sgds-gap-2-xs);letter-spacing:var(--sgds-letter-spacing-normal,0);line-height:var(--sgds-line-height-3-xs);position:absolute;right:20px}.d-none{display:none}sgds-close-button{position:absolute;right:20px;top:10px}@media (min-width:1024px){.pagination,sgds-close-button{position:static}.banner{margin:auto;max-width:var(--sgds-mainnav-max-width,1440px);padding-left:var(--sgds-mainnav-padding-x);padding-right:var(--sgds-mainnav-padding-x)}:host([fluid]) .banner{max-width:none}}`;const An="no-clamp-action-context",Ln="system-banner-children-count-context";class Dn extends He{constructor(){super(...arguments),this.show=!1,this.dismissible=!1,this.noClampAction=!1,this.fluid=!1,this._intervalId=null,this._intervalTime=5e3,this._currentIndex=0}close(){this.show=!1}firstUpdated(e){super.firstUpdated(e),this.childCount=this.bannerItem.length,this.show?(this.childCount>1&&this._startAutoCycle(),this.addEventListener("mouseenter",this._pauseAutoCycle.bind(this)),this.addEventListener("mouseleave",this._resumeAutoCycle.bind(this)),this.addEventListener("focus",this._pauseAutoCycle.bind(this)),this.addEventListener("blur",this._resumeAutoCycle.bind(this))):this.banner.classList.add("d-none"),this._updateActiveItem(),this.childCount>5&&console.warn("It is not recommended to have more than 5 <sgds-system-banner-item> elements.")}disconnectedCallback(){super.disconnectedCallback(),this._stopAutoCycle()}async _handleShowChange(){this.show?(this.childCount>1&&this._startAutoCycle(),this.emit("sgds-show"),this.banner.classList.remove("d-none")):(this._stopAutoCycle(),this.emit("sgds-hide"),this.banner.classList.add("d-none"))}_updateActiveItem(){this.bannerItem.forEach((e,t)=>{t===this._currentIndex?e.setAttribute("active",""):e.removeAttribute("active")})}_next(){const e=this.bannerItem;this._currentIndex=(this._currentIndex+1)%e.length,this._updateActiveItem(),this._animateItem(e[this._currentIndex],"next"),this._resetAutoCycle()}_prev(){const e=this.bannerItem;this._currentIndex=(this._currentIndex-1+e.length)%e.length,this._updateActiveItem(),this._animateItem(e[this._currentIndex],"prev"),this._resetAutoCycle()}async _animateItem(e,t){e.getAnimations().forEach(e=>e.cancel());const s=st(this,`banner.item.${t}`);await Ge(e,s.keyframes,s.options)}_startAutoCycle(){this._stopAutoCycle(),this._intervalId=setInterval(()=>this._next(),this._intervalTime)}_stopAutoCycle(){this._intervalId&&(clearInterval(this._intervalId),this._intervalId=null)}_resetAutoCycle(){this._stopAutoCycle(),this._startAutoCycle()}_pauseAutoCycle(){this._stopAutoCycle()}_resumeAutoCycle(){this.show&&this.childCount>1&&this._startAutoCycle()}render(){return ee`
|
|
1649
1649
|
<div class="banner-wrapper">
|
|
1650
1650
|
<div
|
|
1651
1651
|
class="${Ke({banner:!0})}"
|
|
@@ -1681,7 +1681,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
1681
1681
|
`:ie}
|
|
1682
1682
|
</div>
|
|
1683
1683
|
</div>
|
|
1684
|
-
`}}
|
|
1684
|
+
`}}Dn.styles=[...He.styles,Pn],Dn.dependencies={"sgds-close-button":ft,"sgds-icon":xt,"sgds-icon-button":Ya},e([ze({type:Boolean,reflect:!0})],Dn.prototype,"show",void 0),e([ze({type:Boolean,reflect:!0})],Dn.prototype,"dismissible",void 0),e([Po({context:An}),ze({type:Boolean})],Dn.prototype,"noClampAction",void 0),e([ze({type:Boolean,reflect:!0})],Dn.prototype,"fluid",void 0),e([Ie({flatten:!0})],Dn.prototype,"bannerItem",void 0),e([Le(".banner")],Dn.prototype,"banner",void 0),e([Po({context:Ln}),Ve()],Dn.prototype,"childCount",void 0),e([Ve()],Dn.prototype,"_intervalId",void 0),e([Ve()],Dn.prototype,"_currentIndex",void 0),e([ot("show",{waitUntilFirstUpdate:!0})],Dn.prototype,"_handleShowChange",null),it("banner.item.next",{keyframes:[{opacity:0,transform:"translateY(-100%)"},{opacity:1,transform:"translateY(0)"}],options:{duration:500,easing:"cubic-bezier(0.45,0.05,0.55,0.95)"}}),it("banner.item.prev",{keyframes:[{opacity:0,transform:"translateY(100%)"},{opacity:1,transform:"translateY(0)"}],options:{duration:500,easing:"cubic-bezier(0.45,0.05,0.55,0.95)"}});var In=n`:host{display:block;font-size:var(--sgds-font-size-label-sm);font-style:normal;font-weight:var(--sgds-font-weight-regular,400);letter-spacing:var(--sgds-letter-spacing-normal,0);line-height:var(--sgds-line-height-2-xs);width:inherit}::slotted(:not(sgds-icon)){color:var(--sgds-color-fixed-light)!important;font-size:var(--sgds-font-size-label-sm)!important;line-height:var(--sgds-line-height-2-xs)!important}.banner-item{color:var(--sgds-color-fixed-light);display:flex;gap:var(--sgds-gap-sm);padding:var(--sgds-padding-2-xs) 0}.message{line-clamp:5;-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;max-height:calc(var(--sgds-line-height-2-xs)*5);overflow:hidden;word-break:break-word}.message.truncated:after{background-color:var(--sgds-surface-fixed-dark);bottom:0;content:"";height:var(--sgds-line-height-2-xs);position:absolute;right:0;text-align:right;width:10ch}.clamped-container{display:inline-block;margin-right:var(--sgds-margin-2-xl);max-width:var(--sgds-dimension-872);position:relative}.show-more{bottom:0;position:absolute;right:0;white-space:nowrap}.show-more__link{cursor:pointer;text-decoration:underline}.action{align-items:center;display:flex;gap:var(--sgds-gap-2-xs,4px);margin-top:6px;min-height:var(--sgds-line-height-20);white-space:nowrap}slot[name=action]::slotted(a){color:var(--sgds-color-fixed-light)!important;font-size:var(--sgds-font-size-label-sm)!important;text-decoration:none!important}.banner-item__message_and__action{display:flex;flex:1 0 0;flex-direction:column;gap:var(--sgds-gap-xs)}@media (min-width:1024px){.banner-item__message_and__action{align-items:center;flex-direction:row;gap:var(--sgds-gap-sm)}.action{margin-left:auto;margin-top:0}.message{line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;max-height:calc(var(--sgds-line-height-2-xs)*2)}::slotted(sgds-icon){align-self:center}}`;class En extends He{constructor(){super(...arguments),this.hasActionSlot=!1,this.noClampAction=!1,this.clamped=!1,this.siblingsCount=0,this.hasSlotController=new $i(this,"action","icon","badge")}async firstUpdated(e){super.firstUpdated(e),await this.updateComplete,this._clampCheck(),this._resizeObserver=new ResizeObserver(()=>this._clampCheck()),this._resizeObserver.observe(this.shadowRoot.querySelector(".message"))}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver&&this._resizeObserver.disconnect()}updated(){this.hasActionSlot||(this.hasActionSlot=this.hasSlotController.test("action")),this.hasSlotController.test("icon")&&this.hasSlotController.test("badge")&&console.error("Both icon and badge slot are used in the same banner item. This is not recommended as it may cause layout issues.")}_clampCheck(){const e=this.shadowRoot.querySelector(".message");requestAnimationFrame(()=>{this.clamped=e.scrollHeight>e.clientHeight})}_handleShowMoreClick(){this.emit("sgds-show-more")}render(){return ee`
|
|
1685
1685
|
<div class="banner-item">
|
|
1686
1686
|
<slot name="icon"></slot>
|
|
1687
1687
|
<div class="banner-item__message_and__action">
|
|
@@ -1701,7 +1701,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
1701
1701
|
`:ie}
|
|
1702
1702
|
</div>
|
|
1703
1703
|
</div>
|
|
1704
|
-
`}}En.styles=[...He.styles,
|
|
1704
|
+
`}}En.styles=[...He.styles,In],e([ze({type:Boolean})],En.prototype,"hasActionSlot",void 0),e([Ao({context:An,subscribe:!0}),ze({type:Boolean})],En.prototype,"noClampAction",void 0),e([Ve()],En.prototype,"clamped",void 0),e([Ao({context:Ln,subscribe:!0}),Ve()],En.prototype,"siblingsCount",void 0),customElements.define("sgds-system-banner",Dn),customElements.define("sgds-system-banner-item",En);var Bn=n`:host([density=compact]) .tab{font-size:var(--sgds-font-size-label-sm);padding:var(--sgds-spacer-3) var(--sgds-spacer-5)}:host(:not([active])) .tab{cursor:pointer}:host([variant=solid]) .tab{background-color:var(--sgds-bg-translucent-subtle);border-radius:var(--sgds-border-radius-md)}:host([variant=solid][active]) .tab{background-color:var(--sgds-primary-surface-default);color:var(--sgds-color-fixed-light)}:host([variant=solid]:not([active]):not([disabled])) .tab:focus,:host([variant=solid]:not([active]):not([disabled])) .tab:focus-visible{background-color:var(--sgds-bg-translucent)}:host([variant=solid]:not([active]):not([disabled])) .tab:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([variant=solid]:not([active]):not([disabled])) .tab:hover{background-color:var(--sgds-bg-translucent)}:host([disabled]) .tab{cursor:not-allowed;opacity:var(--sgds-opacity-40)}:host([variant=underlined][active]) .tab{color:var(--sgds-primary-color-default)}:host([variant=underlined]:not([active]):not([disabled])) .tab:focus,:host([variant=underlined]:not([active]):not([disabled])) .tab:focus-visible{background-color:var(--sgds-bg-translucent-subtle);outline:0}:host([variant=underlined]:not([active]):not([disabled])) .tab:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([variant=underlined]:not([active]):not([disabled])) .tab:hover{background-color:var(--sgds-bg-translucent-subtle)}:host([fullWidth][orientation=horizontal]) .tab{justify-content:center}.tab{align-items:center;color:var(--sgds-color-default);display:flex;gap:var(--sgds-spacer-3);padding:var(--sgds-spacer-4) var(--sgds-spacer-5);position:relative}.tab:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`;let Hn=0;class On extends He{constructor(){super(...arguments),this.attrId=++Hn,this.componentId=`sgds-tab-${this.attrId}`,this.panel="",this.active=!1,this.disabled=!1,this.ariaLabel=""}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tab")}focus(e){var t,s;null===(s=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".tab"))||void 0===s||s.focus(e)}blur(){this.tab.blur()}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.disabled&&(this.active=!1)}render(){return ee`
|
|
1705
1705
|
<div
|
|
1706
1706
|
data-testid="inner-tab"
|
|
1707
1707
|
tabindex=${this.disabled?"-1":"0"}
|
|
@@ -1722,7 +1722,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
1722
1722
|
<slot class="tab-group__body" @slotchange=${this._syncTabsAndPanels}></slot>
|
|
1723
1723
|
</div>
|
|
1724
1724
|
</div>
|
|
1725
|
-
`}}Rn.styles=[...He.styles,Tn],e([Le(".tab-group")],Rn.prototype,"_tabGroup",void 0),e([Le(".tab-group__body")],Rn.prototype,"_body",void 0),e([Le(".tab-group__nav")],Rn.prototype,"_nav",void 0),e([Le(".tab-group__indicator")],Rn.prototype,"_indicator",void 0),e([ze({type:String,reflect:!0})],Rn.prototype,"variant",void 0),e([ze({type:String,reflect:!0})],Rn.prototype,"orientation",void 0),e([ze({type:String,reflect:!0})],Rn.prototype,"density",void 0),e([ze({type:Boolean,reflect:!0})],Rn.prototype,"fullWidth",void 0),e([
|
|
1725
|
+
`}}Rn.styles=[...He.styles,Tn],e([Le(".tab-group")],Rn.prototype,"_tabGroup",void 0),e([Le(".tab-group__body")],Rn.prototype,"_body",void 0),e([Le(".tab-group__nav")],Rn.prototype,"_nav",void 0),e([Le(".tab-group__indicator")],Rn.prototype,"_indicator",void 0),e([ze({type:String,reflect:!0})],Rn.prototype,"variant",void 0),e([ze({type:String,reflect:!0})],Rn.prototype,"orientation",void 0),e([ze({type:String,reflect:!0})],Rn.prototype,"density",void 0),e([ze({type:Boolean,reflect:!0})],Rn.prototype,"fullWidth",void 0),e([Ie({slot:"nav",flatten:!0})],Rn.prototype,"_navSlot",void 0);var Fn=n`:host(:not([active])){display:none}.tab-panel{display:block}.tab-panel:not(.tab-panel--active){display:none}`;let Nn=0;class jn extends He{constructor(){super(...arguments),this.attrId=++Nn,this.componentId=`sgds-tab-panel-${this.attrId}`,this.name="",this.active=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tabpanel")}_handleActiveChange(){this.setAttribute("aria-hidden",this.active?"false":"true"),this.inert=!this.active}render(){return ee`
|
|
1726
1726
|
<slot
|
|
1727
1727
|
class=${Ke({"tab-panel":!0,"tab-panel--active":this.active})}
|
|
1728
1728
|
></slot>
|
|
@@ -1777,7 +1777,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
1777
1777
|
class=${Ke({"table-head":!0,"header-background":this._headerBackground})}
|
|
1778
1778
|
>
|
|
1779
1779
|
<slot></slot>
|
|
1780
|
-
</div>`}}Wn.styles=[...He.styles,Kn],e([Ao({context:qn,subscribe:!0}),Ve()],Wn.prototype,"_headerBackground",void 0),e([ot("_headerBackground")],Wn.prototype,"_handleHeaderBackground",null);var Gn=n`:host{display:table-row;width:100%}`;class Jn extends He{connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}render(){return ee`<slot class="table-row"></slot>`}}Jn.styles=[...He.styles,Gn];var Xn=n`:host{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);display:table-cell;vertical-align:middle}.table-cell{align-items:center;display:flex;min-height:var(--sgds-dimension-56);padding:var(--sgds-padding-sm) var(--sgds-padding-md)}`;class Qn extends He{connectedCallback(){super.connectedCallback(),this.setAttribute("role","cell")}render(){return ee`<div class="table-cell"><slot></slot></div>`}}Qn.styles=[...He.styles,Xn],lt("sgds-table",Yn),lt("sgds-table-head",Wn),lt("sgds-table-row",Jn),lt("sgds-table-cell",Qn);var er=n`textarea{font-family:inherit;font-size:inherit;line-height:inherit;margin:0;resize:vertical}textarea.form-control-group{min-height:var(--sgds-dimension-136);overflow:auto;padding:var(--sgds-form-padding-y) var(--sgds-form-padding-x)}.textarea-resize-none{resize:none}.textarea-resize-vertical{resize:vertical}.textarea-resize-auto{height:auto;overflow-y:hidden;resize:none}.textarea-info-container{display:flex;justify-content:space-between}.word-count{margin-left:auto}`;class tr extends(da(fa)){constructor(){super(...arguments),this.value="",this.spellcheck=!1,this.rows=4,this.placeholder="Placeholder",this.invalidFeedback="",this.autofocus=!1,this.readonly=!1,this.resize="vertical",this.defaultValue="",this.hasFeedback=!1,this.required=!1,this.noValidate=!1,this.hintText="",this._isTouched=!1}focus(e){this.textarea.focus(e)}blur(){this.textarea.blur()}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}select(){this.textarea.select()}_handleInvalid(e){e.preventDefault(),this.invalid=!0}_handleChange(e){this.value=this.input.value,this.emit("sgds-change"),super._mixinHandleChange(e)}_handleInputChange(e){this.value=this.input.value,this.emit("sgds-input"),super._mixinHandleInputChange(e)}_handleFocus(){this.emit("sgds-focus")}_handleBlur(){const e=this.emit("sgds-blur",{cancelable:!0});this._mixinShouldSkipSgdsValidation()||e.defaultPrevented||(this.setInvalid(!this._mixinCheckValidity()),this._isTouched=!0)}_handleRowsChange(){this._setTextareaHeight()}_setTextareaHeight(){"auto"===this.resize?(this.textarea.style.height="auto",this.textarea.style.height=`${this.textarea.scrollHeight}px`):this.textarea.style.height=void 0}_handleIsTouched(){this._mixinShouldSkipSgdsValidation()||this._isTouched&&this.setInvalid(!this._mixinCheckValidity())}_handleDisabledChange(){this.setInvalid(!1)}_handleValueChange(){this.updateComplete.then(()=>this._setTextareaHeight())}_renderHintText(){const e=ut` <div id="${this._controlId}Help" class="form-text">${this.hintText}</div> `;return this.hintText&&e}_wordCount(){return ut`
|
|
1780
|
+
</div>`}}Wn.styles=[...He.styles,Kn],e([Ao({context:qn,subscribe:!0}),Ve()],Wn.prototype,"_headerBackground",void 0),e([ot("_headerBackground")],Wn.prototype,"_handleHeaderBackground",null);var Gn=n`:host{display:table-row;width:100%}`;class Jn extends He{connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}render(){return ee`<slot class="table-row"></slot>`}}Jn.styles=[...He.styles,Gn];var Xn=n`:host{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);display:table-cell;vertical-align:middle}.table-cell{align-items:center;display:flex;min-height:var(--sgds-dimension-56);padding:var(--sgds-padding-sm) var(--sgds-padding-md)}`;class Qn extends He{connectedCallback(){super.connectedCallback(),this.setAttribute("role","cell")}render(){return ee`<div class="table-cell"><slot></slot></div>`}}Qn.styles=[...He.styles,Xn],lt("sgds-table",Yn),lt("sgds-table-head",Wn),lt("sgds-table-row",Jn),lt("sgds-table-cell",Qn);var er=n`textarea{font-family:inherit;font-size:inherit;line-height:inherit;margin:0;resize:vertical}textarea.form-control-group{height:auto;min-height:var(--sgds-dimension-136);overflow:auto;padding:var(--sgds-form-padding-y) var(--sgds-form-padding-x)}.textarea-resize-none{resize:none}.textarea-resize-vertical{resize:vertical}.textarea-resize-auto{height:auto;overflow-y:hidden;resize:none}.textarea-info-container{display:flex;justify-content:space-between}.word-count{margin-left:auto}`;class tr extends(da(fa)){constructor(){super(...arguments),this.value="",this.spellcheck=!1,this.rows=4,this.placeholder="Placeholder",this.invalidFeedback="",this.autofocus=!1,this.readonly=!1,this.resize="vertical",this.defaultValue="",this.hasFeedback=!1,this.required=!1,this.noValidate=!1,this.hintText="",this._isTouched=!1}focus(e){this.textarea.focus(e)}blur(){this.textarea.blur()}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}select(){this.textarea.select()}_handleInvalid(e){e.preventDefault(),this.invalid=!0}_handleChange(e){this.value=this.input.value,this.emit("sgds-change"),super._mixinHandleChange(e)}_handleInputChange(e){this.value=this.input.value,this.emit("sgds-input"),super._mixinHandleInputChange(e)}_handleFocus(){this.emit("sgds-focus")}_handleBlur(){const e=this.emit("sgds-blur",{cancelable:!0});this._mixinShouldSkipSgdsValidation()||e.defaultPrevented||(this.setInvalid(!this._mixinCheckValidity()),this._isTouched=!0)}_handleRowsChange(){this._setTextareaHeight()}_setTextareaHeight(){"auto"===this.resize?(this.textarea.style.height="auto",this.textarea.style.height=`${this.textarea.scrollHeight}px`):this.textarea.style.height=void 0}_handleIsTouched(){this._mixinShouldSkipSgdsValidation()||this._isTouched&&this.setInvalid(!this._mixinCheckValidity())}_handleDisabledChange(){this.setInvalid(!1)}_handleValueChange(){this.updateComplete.then(()=>this._setTextareaHeight())}_renderHintText(){const e=ut` <div id="${this._controlId}Help" class="form-text">${this.hintText}</div> `;return this.hintText&&e}_wordCount(){return ut`
|
|
1781
1781
|
<div
|
|
1782
1782
|
class="form-text word-count ${Ke({"invalid-feedback":this.invalid&&this.hasFeedback})}"
|
|
1783
1783
|
>
|
|
@@ -1856,7 +1856,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
1856
1856
|
<ul class="contents">
|
|
1857
1857
|
<slot name="contents"></slot>
|
|
1858
1858
|
</ul>
|
|
1859
|
-
</div> `}}rr.styles=[...He.styles,nr],lt("sgds-table-of-contents",rr);var lr=n`:host{display:block;position:relative;z-index:var(--sgds-z-index-sticky)}nav{background-color:var(--sgds-surface-raised);border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);position:relative;width:100%}.subnav{flex-direction:column;flex-wrap:nowrap}.header-container,.subnav{align-items:flex-start;display:flex}.header-container{gap:var(--sgds-gap-md);padding:var(--sgds-padding-md) var(--sgds-padding-lg);width:100%}slot[name=header]::slotted(*){--sgds-margin-xs:var(--sgds-margin-none);flex:1 1 auto;margin-bottom:var(--sgds-margin-xs,--sgds-margin-none);padding-top:var(--sgds-padding-none)}.subnav-toggler{cursor:pointer;transition:transform .2s ease-in-out}.subnav-toggler:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.subnav:not(.collapsed) .subnav-toggler{transform:rotate(-180deg)}.subnav-nav-group{display:flex;flex:1 1 0}.subnav-nav,.subnav-nav-group{align-items:flex-start;flex-direction:column;width:100%}.subnav-nav{display:none;overflow-y:auto;transition:transform .2s ease-in-out}.subnav-nav ::slotted(*){width:100%}.subnav-actions{bottom:0;display:flex;flex-direction:column;gap:var(--sgds-gap-md);padding:var(--sgds-padding-md) var(--sgds-padding-lg);position:sticky;width:100%}.no-actions{display:none}slot[name=actions]::slotted(*){width:100%}@media screen and (max-width:1023px){.subnav.sgds-container{max-width:inherit}}@media screen and (min-width:512px){.subnav-actions{flex-direction:row}}@media screen and (min-width:768px){nav{border-bottom:var(--sgds-border-width-0)}.subnav{flex-direction:row}.subnav.collapsed{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}.header-container{padding:var(--sgds-padding-lg) var(--sgds-padding-2-xl)}.subnav-nav{background-color:var(--sgds-surface-raised);border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);left:0;position:absolute;top:100%}.subnav-actions{align-items:center;flex-direction:row;padding:var(--sgds-padding-sm) var(--sgds-padding-2-xl) var(--sgds-padding-sm) var(--sgds-padding-none);position:inherit}}@media screen and (min-width:1024px){nav{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);position:inherit}.subnav{flex-wrap:wrap;gap:var(--sgds-gap-xl);row-gap:var(--sgds-gap-none)}.subnav.collapsed{border-bottom:var(--sgds-border-width-0)}.header-container{flex:1;padding:var(--sgds-padding-none);width:auto}slot[name=header]::slotted(*){padding-top:var(--sgds-padding-lg);white-space:nowrap}.subnav-nav-group{align-items:center;flex:inherit;flex-direction:row;flex-wrap:wrap;gap:var(--sgds-gap-xl);justify-content:space-between;row-gap:var(--sgds-gap-none);width:auto}.subnav-nav{align-items:center;background-color:inherit;border-bottom:var(--sgds-border-width-0);display:flex;flex-direction:row;flex-wrap:wrap;gap:var(--sgds-gap-lg);overflow-y:inherit;position:inherit;row-gap:0;transition:none;width:auto}.subnav-nav ::slotted(*){width:inherit}.subnav-toggler{display:none}.subnav-actions{padding:var(--sgds-padding-sm) var(--sgds-padding-none);width:auto}slot[name=actions]::slotted(*){width:inherit}}`;const dr=["Enter"," "];class cr extends He{constructor(){super(...arguments),this.hasActionsSlot=!1,this.isCollapsed=!1,this.isMenuOpen=!1,this.hasSlotController=new $i(this,"actions"),this._handleResize=async()=>{this.isCollapsed=window.innerWidth<Lo,await this.updateComplete,this.isCollapsed||(this.isMenuOpen=!1),this._updateMobileLayout()},this._updateMobileLayout=()=>{if(this.nav&&this.headerContainer&&this.mobileActions&&this.mobileNav)if(this.isCollapsed){const{top:e}=this.nav.getBoundingClientRect(),t=this.headerContainer.clientHeight,s=this.mobileActions.clientHeight,i=window.innerWidth>=
|
|
1859
|
+
</div> `}}rr.styles=[...He.styles,nr],lt("sgds-table-of-contents",rr);var lr=n`:host{display:block;position:relative;z-index:var(--sgds-z-index-sticky)}nav{background-color:var(--sgds-surface-raised);border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);position:relative;width:100%}.subnav{flex-direction:column;flex-wrap:nowrap}.header-container,.subnav{align-items:flex-start;display:flex}.header-container{gap:var(--sgds-gap-md);padding:var(--sgds-padding-md) var(--sgds-padding-lg);width:100%}slot[name=header]::slotted(*){--sgds-margin-xs:var(--sgds-margin-none);flex:1 1 auto;margin-bottom:var(--sgds-margin-xs,--sgds-margin-none);padding-top:var(--sgds-padding-none)}.subnav-toggler{cursor:pointer;transition:transform .2s ease-in-out}.subnav-toggler:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.subnav:not(.collapsed) .subnav-toggler{transform:rotate(-180deg)}.subnav-nav-group{display:flex;flex:1 1 0}.subnav-nav,.subnav-nav-group{align-items:flex-start;flex-direction:column;width:100%}.subnav-nav{display:none;overflow-y:auto;transition:transform .2s ease-in-out}.subnav-nav ::slotted(*){width:100%}.subnav-actions{bottom:0;display:flex;flex-direction:column;gap:var(--sgds-gap-md);padding:var(--sgds-padding-md) var(--sgds-padding-lg);position:sticky;width:100%}.no-actions{display:none}slot[name=actions]::slotted(*){width:100%}@media screen and (max-width:1023px){.subnav.sgds-container{max-width:inherit}}@media screen and (min-width:512px){.subnav-actions{flex-direction:row}}@media screen and (min-width:768px){nav{border-bottom:var(--sgds-border-width-0)}.subnav{flex-direction:row}.subnav.collapsed{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}.header-container{padding:var(--sgds-padding-lg) var(--sgds-padding-2-xl)}.subnav-nav{background-color:var(--sgds-surface-raised);border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);left:0;position:absolute;top:100%}.subnav-actions{align-items:center;flex-direction:row;padding:var(--sgds-padding-sm) var(--sgds-padding-2-xl) var(--sgds-padding-sm) var(--sgds-padding-none);position:inherit}}@media screen and (min-width:1024px){nav{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);position:inherit}.subnav{flex-wrap:wrap;gap:var(--sgds-gap-xl);row-gap:var(--sgds-gap-none)}.subnav.collapsed{border-bottom:var(--sgds-border-width-0)}.header-container{flex:1;padding:var(--sgds-padding-none);width:auto}slot[name=header]::slotted(*){padding-top:var(--sgds-padding-lg);white-space:nowrap}.subnav-nav-group{align-items:center;flex:inherit;flex-direction:row;flex-wrap:wrap;gap:var(--sgds-gap-xl);justify-content:space-between;row-gap:var(--sgds-gap-none);width:auto}.subnav-nav{align-items:center;background-color:inherit;border-bottom:var(--sgds-border-width-0);display:flex;flex-direction:row;flex-wrap:wrap;gap:var(--sgds-gap-lg);overflow-y:inherit;position:inherit;row-gap:0;transition:none;width:auto}.subnav-nav ::slotted(*){width:inherit}.subnav-toggler{display:none}.subnav-actions{padding:var(--sgds-padding-sm) var(--sgds-padding-none);width:auto}slot[name=actions]::slotted(*){width:inherit}}`;const dr=["Enter"," "];class cr extends He{constructor(){super(...arguments),this.hasActionsSlot=!1,this.isCollapsed=!1,this.isMenuOpen=!1,this.hasSlotController=new $i(this,"actions"),this._handleResize=async()=>{this.isCollapsed=window.innerWidth<Lo,await this.updateComplete,this.isCollapsed||(this.isMenuOpen=!1),this._updateMobileLayout()},this._updateMobileLayout=()=>{if(this.nav&&this.headerContainer&&this.mobileActions&&this.mobileNav)if(this.isCollapsed){const{top:e}=this.nav.getBoundingClientRect(),t=this.headerContainer.clientHeight,s=this.mobileActions.clientHeight,i=window.innerWidth>=Do&&window.innerWidth<Lo?e+t:e+t+s;this.mobileNav.style.maxHeight=`calc(100dvh - ${i}px)`,this.style.minHeight=`${this.nav.clientHeight}px`,this.nav.style.position="absolute"}else this.mobileNav.style.maxHeight="none",this.style.minHeight="auto",this.nav.style.position="relative"},this._toggleMenu=()=>{var e;this.isMenuOpen?this.hide():(this._lockBodyScroll(),this.show()),null===(e=this.toggler)||void 0===e||e.focus()}}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this._handleResize),window.addEventListener("click",e=>this._handleClickOutOfElement(e,this.navGroup))}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._handleResize),window.removeEventListener("click",e=>this._handleClickOutOfElement(e,this.navGroup))}firstUpdated(e){super.firstUpdated(e),this._handleResize()}updated(){this.hasActionsSlot||(this.hasActionsSlot=this.hasSlotController.test("actions"))}_handleClickOutOfElement(e,t){e.composedPath().includes(t)||e.composedPath().includes(this.toggler)||this.hide()}async _onKeyboardToggle(e){dr.includes(e.key)&&(e.preventDefault(),this._toggleMenu())}async show(){if(!this.isMenuOpen)return this.isMenuOpen=!0,at(this,"sgds-after-show")}async hide(){if(this.isMenuOpen)return this.isMenuOpen=!1,this._unlockBodyScroll(),at(this,"sgds-after-hide")}_lockBodyScroll(){if("undefined"==typeof window)return;const e=window.scrollY;document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%"}_unlockBodyScroll(){if("undefined"==typeof window)return;const e=-1*parseInt(document.body.style.top||"0");document.body.style.position="",document.body.style.top="",document.body.style.width="",window.scrollTo(0,e)}async _animateToShow(){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return void(this.isMenuOpen=!1);await Qe(this.mobileNav),this.isCollapsed&&(this.mobileNav.style.display="flex");const{keyframes:e,options:t}=st(this,"subnav.show");await Ge(this.mobileNav,Xe(e,this.mobileNav.scrollHeight),t),this.emit("sgds-after-show")}async _animateToHide(){if(this.emit("sgds-hide",{cancelable:!0}).defaultPrevented)return void(this.isMenuOpen=!0);await Qe(this.mobileNav);const{keyframes:e,options:t}=st(this,"subnav.hide");await Ge(this.mobileNav,Xe(e,this.mobileNav.scrollHeight),t),this.isCollapsed&&(this.mobileNav.style.display="none"),this.emit("sgds-after-hide")}async handleOpenChange(){this.isMenuOpen?this._animateToShow():this._animateToHide()}async handleCollapsedChange(){await this.updateComplete,this.mobileNav.style.display=this.isCollapsed?"none":"flex"}render(){return ee`
|
|
1860
1860
|
<nav aria-label="Sub navigation">
|
|
1861
1861
|
<div
|
|
1862
1862
|
class=${Ke({"sgds-container":!0,subnav:!0,collapsed:!this.isMenuOpen})}
|
|
@@ -1947,7 +1947,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
1947
1947
|
${this.loading?this._renderLoadingMenu():ie}
|
|
1948
1948
|
</div>
|
|
1949
1949
|
</div>
|
|
1950
|
-
`}}vr.styles=[...ha.styles,na,gr],vr.childName="sgds-select-option",vr.dependencies={"sgds-icon":xt,"sgds-spinner":$a,[vr.childName]:ur},e([ze({type:Boolean,reflect:!0})],vr.prototype,"noValidate",void 0),e([
|
|
1950
|
+
`}}vr.styles=[...ha.styles,na,gr],vr.childName="sgds-select-option",vr.dependencies={"sgds-icon":xt,"sgds-spinner":$a,[vr.childName]:ur},e([ze({type:Boolean,reflect:!0})],vr.prototype,"noValidate",void 0),e([Ie({flatten:!0,selector:"sgds-select-option"})],vr.prototype,"options",void 0),e([ot("value",{waitUntilFirstUpdate:!0})],vr.prototype,"_handleValueChange",null),lt("sgds-select",vr),lt("sgds-select-option",ur);var mr=n`:host([noPadding]) .card{background-color:inherit;border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent)}:host([orientation=vertical][noPadding]) .card-body{padding:var(--sgds-padding-xl) var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-none)}:host([orientation=vertical][imagePosition=after][noPadding]) .card-body{padding:var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-xl) var(--sgds-padding-none)}:host([orientation=horizontal][noPadding]) .card-body{padding:var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-xl)}:host([orientation=horizontal][imagePosition=after][noPadding]) .card-body{padding:var(--sgds-padding-none) var(--sgds-padding-xl) var(--sgds-padding-none) var(--sgds-padding-none)}:host([tinted]:not([noPadding])) .card-tinted-bg{background-color:var(--sgds-bg-translucent-subtle);opacity:var(--sgds-opacity-50)}:host([orientation][noPadding]) .card-media{padding:var(--sgds-padding-none)}slot[name=image-badge]::slotted(*){left:20px;position:absolute;top:20px}slot[name=image-action]::slotted(*){position:absolute;right:20px;top:20px}`;class fr extends ea{constructor(){super(...arguments),this.noPadding=!1,this.imagePosition="before",this.imageAdjustment="default"}get linkSlotItems(){if(!this.linkNode||0===this.linkNode.length)return null;const e=this.linkNode[0];return e.querySelector("a")||e}get footerSlotItems(){if(!this.footerNode||0===this.footerNode.length)return null;const e=this.footerNode[0];return e.querySelector("a")||e}firstUpdated(e){var t,s;if(super.firstUpdated(e),0===this._imageNode.length){const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".card-image"),i=null===(s=this.shadowRoot)||void 0===s?void 0:s.querySelector(".card-body");e&&(e.style.display="none"),i&&this.noPadding&&(i.style.padding="0px")}if(this.stretchedLink){const e=this.footerSlotItems,t=this.linkSlotItems;this._forwardAnchorAttributes((null==e?void 0:e.href)?e:t)}}handleImgSlotChange(e){if(e.target.assignedNodes({flatten:!0}).length>1)return console.error("Multiple elements passed into SgdsCard's image slot")}render(){const e=this.stretchedLink?pt`a`:pt`div`,t=!this.stretchedLink||this.disabled?-1:0;return ut`
|
|
1951
1951
|
<${e}
|
|
1952
1952
|
class="card ${Ke({disabled:this.disabled})}"
|
|
1953
1953
|
tabindex=${t}
|
|
@@ -1974,7 +1974,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
1974
1974
|
</slot>
|
|
1975
1975
|
</div>
|
|
1976
1976
|
</${e}>
|
|
1977
|
-
`}}fr.styles=[...ea.styles,mr],e([Ee({slot:"image",flatten:!0})],fr.prototype,"_imageNode",void 0),e([
|
|
1977
|
+
`}}fr.styles=[...ea.styles,mr],e([Ee({slot:"image",flatten:!0})],fr.prototype,"_imageNode",void 0),e([Ie({slot:"footer"})],fr.prototype,"footerNode",void 0),e([Ie({slot:"link"})],fr.prototype,"linkNode",void 0),e([ze({type:Boolean,reflect:!0})],fr.prototype,"noPadding",void 0),e([ze({type:String,reflect:!0})],fr.prototype,"imagePosition",void 0),e([ze({type:String,reflect:!0})],fr.prototype,"imageAdjustment",void 0),lt("sgds-image-card",fr);var br=n`:host([noPadding]) .card{background-color:inherit;border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent)}:host([orientation=vertical][noPadding]) .card-body{padding:var(--sgds-padding-xl) var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-none)}:host([orientation=vertical][imagePosition=after][noPadding]) .card-body{padding:var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-xl) var(--sgds-padding-none)}:host([orientation=horizontal][noPadding]) .card-body{padding:var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-none) var(--sgds-padding-xl)}:host([orientation=horizontal][imagePosition=after][noPadding]) .card-body{padding:var(--sgds-padding-none) var(--sgds-padding-xl) var(--sgds-padding-none) var(--sgds-padding-none)}:host([tinted]:not([noPadding])) .card-tinted-bg{background-color:var(--sgds-bg-translucent-subtle);opacity:var(--sgds-opacity-50)}:host([orientation][noPadding]) .card-media{padding:var(--sgds-padding-none)}slot[name=thumbnail]::slotted(*){height:var(--sgds-dimension-64)!important;max-width:var(--sgds-dimension-128)!important;min-width:var(--sgds-dimension-64)!important;object-fit:contain;object-position:left;width:100%}`;class wr extends ea{constructor(){super(...arguments),this.noPadding=!1}_getAnchorFromSlot(e){if(!e||0===e.length)return null;const t=e[0];return t.querySelector("a")||t}_handleThumbnailSlotChange(e){var t,s;if(0===e.target.assignedElements({flatten:!0}).length&&("vertical"===this.orientation&&0===this._upperNode.length||"horizontal"===this.orientation)){const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".card-media");e&&(e.style.display="none");const i=null===(s=this.shadowRoot)||void 0===s?void 0:s.querySelector(".card-body");i&&this.noPadding&&(i.style.padding="0px")}}_handleFooterSlotChange(e){const t=e.target.assignedElements({flatten:!0}),s=this._getAnchorFromSlot(t);this.stretchedLink&&this._forwardAnchorAttributes(s)}_handleLinkSlotChange(e){this.warnLinkSlotMisused(e);const t=e.target.assignedElements({flatten:!0}),s=this._getAnchorFromSlot(t);this.stretchedLink&&this._forwardAnchorAttributes(s)}render(){const e=this.stretchedLink?pt`a`:pt`div`,t=!this.stretchedLink||this.disabled?-1:0;return ut`
|
|
1978
1978
|
<${e}
|
|
1979
1979
|
class="card ${Ke({disabled:this.disabled})}"
|
|
1980
1980
|
tabindex=${t}
|
|
@@ -2026,7 +2026,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
2026
2026
|
</slot>
|
|
2027
2027
|
</div>
|
|
2028
2028
|
</${e}>
|
|
2029
|
-
`}}xr.styles=[...ea.styles,yr],e([Ee({slot:"icon",flatten:!0})],xr.prototype,"_iconNode",void 0),e([Ee({slot:"upper",flatten:!0})],xr.prototype,"_upperNode",void 0),e([
|
|
2029
|
+
`}}xr.styles=[...ea.styles,yr],e([Ee({slot:"icon",flatten:!0})],xr.prototype,"_iconNode",void 0),e([Ee({slot:"upper",flatten:!0})],xr.prototype,"_upperNode",void 0),e([Ie({slot:"footer"})],xr.prototype,"footerNode",void 0),e([Ie({slot:"link"})],xr.prototype,"linkNode",void 0),e([ze({type:Boolean,reflect:!0})],xr.prototype,"noPadding",void 0),lt("sgds-icon-card",xr);var _r=n`.sidebar{display:flex;flex-direction:column;height:100%;position:relative;transition:width var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard);width:var(--sgds-dimension-288);z-index:var(--sgds-z-index-sticky)}.sidebar:not(.overlay).sidebar--collapsed{width:var(--sgds-dimension-72)}.overlay{left:0;position:absolute;top:0}.overlay.sidebar--collapsed{width:var(--sgds-dimension-0)}.sidebar-top{align-items:center;display:flex;gap:var(--sgds-gap-md);justify-content:space-between;padding:0 var(--sgds-padding-xs)}:not(.overlay).sidebar--collapsed .sidebar-brand-name{display:none}:not(.overlay).sidebar--collapsed .sidebar-top{justify-content:center}.sidebar-main{background-color:var(--sgds-surface-default);border-right:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);height:100%;overflow-x:hidden;overflow-y:auto;padding:var(--sgds-padding-lg) 0;position:relative;z-index:1}.overlay .sidebar-main{left:0;transition:left var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard)}.overlay.sidebar--collapsed .sidebar-main{left:calc(var(--sgds-dimension-288)*-1)}.sidebar-wrapper{display:flex;flex-direction:column;height:100%;justify-content:space-between}.sidebar-content{display:flex;flex:1;flex-direction:column;gap:var(--sgds-gap-md);margin-top:var(--sgds-margin-lg);overflow-y:auto}slot[name=lower]::slotted(*){margin-top:var(--sgds-margin-lg)}.sidebar-nested-overlay{background-color:var(--sgds-surface-raised);overflow-y:auto;padding:var(--sgds-padding-md) var(--sgds-padding-xs);transition:all var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard);transition-property:opacity left;width:var(--sgds-dimension-288);z-index:0}.sidebar--overlay,.sidebar-nested-overlay{bottom:0;left:0;opacity:0;pointer-events:none;position:absolute;top:0}.sidebar--overlay{background-color:var(--sgds-bg-overlay);content:"";transition:all var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard);width:100vw}.sidebar--overlay.show{opacity:1;pointer-events:unset}.sidebar-nested-overlay.show{border-right:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);left:var(--sgds-dimension-288);opacity:1;pointer-events:auto}:not(.overlay).sidebar--collapsed .sidebar-nested-overlay.show{left:var(--sgds-dimension-72)}.sidebar-nested-overlay sgds-icon-button{display:none}.sidebar::-webkit-scrollbar{width:var(--sgds-dimension-2)}.sidebar::-webkit-scrollbar-track{background:transparent}.sidebar::-webkit-scrollbar-thumb{background:var(--sgds-border-color-muted);border-radius:var(--sgds-border-radius-xs)}.sidebar::-webkit-scrollbar-thumb:hover{background:var(--sgds-color-subtle)}@media screen and (max-width:767px){.sidebar-nested-overlay sgds-icon-button{display:block}.sidebar,.sidebar-nested-overlay{width:var(--sgds-dimension-256)}.sidebar-nested-overlay,.sidebar-nested-overlay.show{left:var(--sgds-dimension-256)}}@media screen and (max-width:511px){.sidebar--overlay{display:none}.sidebar{position:absolute;width:100dvw}.sidebar-nested-overlay{left:-100dvw;width:100dvw;z-index:2}.sidebar-nested-overlay.show,:not(.overlay).sidebar--collapsed .sidebar-nested-overlay.show{left:0}.overlay.sidebar--collapsed .sidebar-main{left:calc(100dvw*-1)}}`;const kr="sidebar-active-group",Cr="sidebar-active",$r="sidebar-collapsed",Sr="sidebar-drawer-items",Mr="sidebar-drawer-open",Zr="sidebar-drawer-overlay";var zr=n`.sidebar-item{border-radius:var(--sgds-border-radius-md);cursor:pointer;padding:var(--sgds-padding-xs);transition:background-color .15s ease-in-out,color .15s ease-in-out}.sidebar-item.active,.sidebar-item:focus-visible,.sidebar-item:hover{background-color:var(--sgds-bg-translucent-subtle)}.sidebar-item:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.sidebar-item-label-wrapper,.sidebar-item-label-wrapper>div{align-items:center;display:flex;gap:var(--sgds-gap-xs)}.sidebar-item-label-wrapper{justify-content:space-between;padding:var(--sgds-padding-3-xs) var(--sgds-padding-2-xs)}.sidebar-item-label{-webkit-line-clamp:2;-webkit-box-orient:vertical;line-clamp:2;display:-webkit-box;font-size:var(--sgds-font-size-label-sm);line-height:var(--sgds-line-height-2-xs);max-height:calc(var(--sgds-line-height-20, 20px)*2);overflow:hidden}.sidebar-item-label.offset{color:var(--sgds-color-subtle);margin-left:var(--sgds-margin-2-xl)}.sidebar-item-leaf.active .sidebar-item-label.offset,.sidebar-item-leaf:focus-visible .sidebar-item-label.offset,.sidebar-item-leaf:hover .sidebar-item-label.offset{color:var(--sgds-color-default)}.sidebar-item-leaf.active,.sidebar-item-leaf:focus-visible,.sidebar-item-leaf:hover{background-color:var(--sgds-bg-translucent-subtle)}.sidebar-item-label-wrapper .sidebar-item.active{background-color:var(--sgds-surface-raised);color:var(--sgds-primary-color-default)}.sidebar-item-label-wrapper .sidebar-item-indicator{align-items:center;display:flex;gap:var(--sgds-gap-2-xs)}.sidebar-item--collapsed{margin:auto;width:var(--sgds-dimension-40)}.sidebar-item--collapsed .sidebar-item-indicator,.sidebar-item--collapsed .sidebar-item-label{display:none}.sidebar-item--collapsed .sidebar-item-label-wrapper{justify-content:center}.sidebar-submenu{overflow:hidden}.sidebar-submenu>div{margin-top:-100%;opacity:0;pointer-events:none;transition:all var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard)}.sidebar-submenu.show>div{margin-top:0;opacity:1;pointer-events:auto}.sidebar-submenu--collapsed{display:none}`;class Vr extends He{constructor(){super(...arguments),this.title="",this.name="",this._sidebarCollapsed=!1,this._sidebarActiveItem=null,this._sidebarActiveGroup=null,this._drawerItems=null,this._showDrawer=!1,this._isOverlay=!1,this._childLevel=1,this._selected=!1,this._hidden=!1,this._childElements=[],this._childActive=!1}connectedCallback(){super.connectedCallback(),this._getChildLevel(),this.addEventListener("keydown",this._handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleKeyDown)}firstUpdated(e){super.firstUpdated(e),this._getChildLevel()}updated(){var e;if(2===this._childLevel)this._hidden=!this.closest(".sidebar-nested-overlay");else if(this._childLevel>=3){const t=!!this.closest(".sidebar-nested-overlay"),s=this.parentElement,i=null!==(e=null==s?void 0:s.showMenu)&&void 0!==e&&e;this._hidden=!t||!i}}_handleSlotChange(){this._childElements=this._defaultNodes}_handleClick(){this.emit("i-sgds-click",{detail:{element:this,level:this._childLevel}})}_handleKeyDown(e){var t,s;const i=e.target;switch(e.key){case" ":case"Enter":return e.preventDefault(),e.stopPropagation(),void(e.target===this&&this._handleClick());case"ArrowLeft":if(e.preventDefault(),e.stopPropagation(),this._sidebarActiveGroup===this)this._showDrawer&&this._handleClick();else{if(i._childLevel>=2&&(null===(t=this._sidebarActiveGroup)||void 0===t?void 0:t.shadowRoot)){const e=this._sidebarActiveGroup.shadowRoot.querySelector("[tabindex]");null==e||e.focus()}}return;case"ArrowRight":if(e.preventDefault(),e.stopPropagation(),this._sidebarActiveGroup===this){if(null===(s=this._drawerItems)||void 0===s?void 0:s.length)if(this._showDrawer){const e=this._drawerItems[0];if(null==e?void 0:e.shadowRoot){const t=e.shadowRoot.querySelector("[tabindex]");null==t||t.focus()}}else this._handleClick()}else 1===this._childLevel&&this._childElements.length>0&&this._handleClick();return}}_getChildLevel(){let e=this.parentElement,t=1;for(;"sgds-sidebar-group"===(null==e?void 0:e.tagName.toLowerCase());)t+=1,e=e.parentElement;const s=null==e?void 0:e.classList.contains("sidebar-nested-overlay");this._childLevel=s?t+1:t}}Vr.styles=zi.styles,e([ze({type:String,reflect:!0})],Vr.prototype,"title",void 0),e([ze({type:String,reflect:!0})],Vr.prototype,"name",void 0),e([Ao({context:$r,subscribe:!0}),Ve()],Vr.prototype,"_sidebarCollapsed",void 0),e([Ao({context:Cr,subscribe:!0}),Ve()],Vr.prototype,"_sidebarActiveItem",void 0),e([Ao({context:kr,subscribe:!0}),Ve()],Vr.prototype,"_sidebarActiveGroup",void 0),e([Ao({context:Sr,subscribe:!0}),Ve()],Vr.prototype,"_drawerItems",void 0),e([Ao({context:Mr,subscribe:!0}),Ve()],Vr.prototype,"_showDrawer",void 0),e([Ao({context:Zr,subscribe:!0}),Ve()],Vr.prototype,"_isOverlay",void 0),e([Ve()],Vr.prototype,"_childLevel",void 0),e([Ve()],Vr.prototype,"_selected",void 0),e([Ve()],Vr.prototype,"_hidden",void 0),e([Ve()],Vr.prototype,"_childElements",void 0),e([Ve()],Vr.prototype,"_childActive",void 0),e([Ie({flatten:!0})],Vr.prototype,"_defaultNodes",void 0);class Pr extends Vr{constructor(){super(...arguments),this._showMenu=!1}get showMenu(){return this._showMenu}_handleActiveItemContext(){this._childLevel>1&&this._sidebarActiveItem&&this.contains(this._sidebarActiveItem)&&(this._showMenu=!0)}_handleClick(){1!==this._childLevel?(this._showMenu=!this._showMenu,this._childElements.forEach(e=>{e._hidden=!this._showMenu})):super._handleClick()}_getIcon(){return 1===this._childLevel?"chevron-right":this._showMenu?"chevron-down":"chevron-up"}_handleSlotChange(){super._handleSlotChange(),this._childElements.forEach(e=>{e._hidden=!this._showMenu})}render(){return ee`
|
|
2030
2030
|
<div
|
|
2031
2031
|
role="button"
|
|
2032
2032
|
class=${Ke({"sidebar-item":!0,"sidebar-item--collapsed":!this._isOverlay&&this._sidebarCollapsed&&1===this._childLevel,active:this._selected})}
|
|
@@ -2055,7 +2055,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
2055
2055
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
2056
2056
|
</div>
|
|
2057
2057
|
</div>
|
|
2058
|
-
`}}Pr.styles=[...He.styles,zr],Pr.dependencies={"sgds-icon":xt},e([Ve()],Pr.prototype,"_showMenu",void 0),e([ot("_sidebarActiveItem")],Pr.prototype,"_handleActiveItemContext",null);class Ar extends He{constructor(){super(...arguments),this.collapsed=!1,this.active="",this.scrim=!1,this.variant="collapsible",this.ariaLabel="Sidebar navigation",this._sidebarActiveGroup=null,this._sidebarCollapsed=!1,this._sidebarActiveItem=null,this._drawerItems=[],this._showDrawer=!1,this._isOverlay=!1,this._isNarrowViewport=!1,this._boundHandleResize=this._handleResize.bind(this),this._boundHandleItemClick=this._handleItemClick.bind(this),this._handleClickOutOfElement=e=>{if((e.composedPath().find(e=>{var t;return null===(t=null==e?void 0:e.classList)||void 0===t?void 0:t.contains("sidebar--overlay")})||!e.composedPath().includes(this))&&(this._showDrawer=!1,this._isOverlay)){e.target.getAttribute("data-sidebar-toggler")||(this.collapsed=!0)}}}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this._handleActive()}),null===window||void 0===window||window.addEventListener("resize",this._boundHandleResize),this._handleResize(),this.addEventListener("i-sgds-click",this._boundHandleItemClick)}disconnectedCallback(){super.disconnectedCallback(),null===document||void 0===document||document.removeEventListener("click",this._handleClickOutOfElement),null===window||void 0===window||window.removeEventListener("resize",this._boundHandleResize),this.removeEventListener("i-sgds-click",this._boundHandleItemClick)}firstUpdated(){null===document||void 0===document||document.addEventListener("click",this._handleClickOutOfElement),this._updateOverlayState()}updated(){this._handleActive()}_handleCollapsed(){"persistent"!==this.variant&&(this._sidebarCollapsed=this.collapsed)}_handleActiveItem(e){if(!this._sidebarActiveItem)return;this._getAllItems().forEach(e=>e._selected=!1),this._drawerItems.forEach(e=>e._selected=!1),e&&(e._selected=!1);const t=this._sidebarActiveItem._childLevel;if(this._sidebarActiveItem._selected=!0,1===t)this._sidebarActiveItem._childElements.length>0?this._setNodesToDrawer(this._sidebarActiveItem):this._revertNodesToParent();else{let e=this._sidebarActiveItem.parentElement;for(;e instanceof Pr&&e._childLevel>=1;)1===e._childLevel&&(e.classList.contains("sidebar-nested-overlay")||this._setNodesToDrawer(e)),e._selected=!0,e=e.parentElement;this._sidebarActiveGroup&&(this._sidebarActiveGroup._selected=!0)}}_handleActive(){this.active?this._sidebarActiveItem=this._getActiveChild():this._sidebarActiveItem=null}_getActiveChild(){var e;const t=e=>{var s;for(const i of e){if(i.name===this.active)return i;if(null===(s=i._childElements)||void 0===s?void 0:s.length){const e=t(i._childElements);if(e)return e}}return null};return null!==(e=t(this._defaultNodes))&&void 0!==e?e:t(this._drawerItems)}_handleResize(){const e=window.innerWidth<1280;e!==this._isNarrowViewport&&(this._isNarrowViewport=e,this.collapsed=this._isNarrowViewport),this._updateOverlayState()}_updateOverlayState(){"overlay"===this.variant?this._isOverlay=!0:"collapsible"===this.variant?this._isOverlay=window.innerWidth<
|
|
2058
|
+
`}}Pr.styles=[...He.styles,zr],Pr.dependencies={"sgds-icon":xt},e([Ve()],Pr.prototype,"_showMenu",void 0),e([ot("_sidebarActiveItem")],Pr.prototype,"_handleActiveItemContext",null);class Ar extends He{constructor(){super(...arguments),this.collapsed=!1,this.active="",this.scrim=!1,this.variant="collapsible",this.ariaLabel="Sidebar navigation",this._sidebarActiveGroup=null,this._sidebarCollapsed=!1,this._sidebarActiveItem=null,this._drawerItems=[],this._showDrawer=!1,this._isOverlay=!1,this._isNarrowViewport=!1,this._boundHandleResize=this._handleResize.bind(this),this._boundHandleItemClick=this._handleItemClick.bind(this),this._handleClickOutOfElement=e=>{if((e.composedPath().find(e=>{var t;return null===(t=null==e?void 0:e.classList)||void 0===t?void 0:t.contains("sidebar--overlay")})||!e.composedPath().includes(this))&&(this._showDrawer=!1,this._isOverlay)){e.target.getAttribute("data-sidebar-toggler")||(this.collapsed=!0)}}}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this._handleActive()}),null===window||void 0===window||window.addEventListener("resize",this._boundHandleResize),this._handleResize(),this.addEventListener("i-sgds-click",this._boundHandleItemClick)}disconnectedCallback(){super.disconnectedCallback(),null===document||void 0===document||document.removeEventListener("click",this._handleClickOutOfElement),null===window||void 0===window||window.removeEventListener("resize",this._boundHandleResize),this.removeEventListener("i-sgds-click",this._boundHandleItemClick)}firstUpdated(){null===document||void 0===document||document.addEventListener("click",this._handleClickOutOfElement),this._updateOverlayState()}updated(){this._handleActive()}_handleCollapsed(){"persistent"!==this.variant&&(this._sidebarCollapsed=this.collapsed)}_handleActiveItem(e){if(!this._sidebarActiveItem)return;this._getAllItems().forEach(e=>e._selected=!1),this._drawerItems.forEach(e=>e._selected=!1),e&&(e._selected=!1);const t=this._sidebarActiveItem._childLevel;if(this._sidebarActiveItem._selected=!0,1===t)this._sidebarActiveItem._childElements.length>0?this._setNodesToDrawer(this._sidebarActiveItem):this._revertNodesToParent();else{let e=this._sidebarActiveItem.parentElement;for(;e instanceof Pr&&e._childLevel>=1;)1===e._childLevel&&(e.classList.contains("sidebar-nested-overlay")||this._setNodesToDrawer(e)),e._selected=!0,e=e.parentElement;this._sidebarActiveGroup&&(this._sidebarActiveGroup._selected=!0)}}_handleActive(){this.active?this._sidebarActiveItem=this._getActiveChild():this._sidebarActiveItem=null}_getActiveChild(){var e;const t=e=>{var s;for(const i of e){if(i.name===this.active)return i;if(null===(s=i._childElements)||void 0===s?void 0:s.length){const e=t(i._childElements);if(e)return e}}return null};return null!==(e=t(this._defaultNodes))&&void 0!==e?e:t(this._drawerItems)}_handleResize(){const e=window.innerWidth<1280;e!==this._isNarrowViewport&&(this._isNarrowViewport=e,this.collapsed=this._isNarrowViewport),this._updateOverlayState()}_updateOverlayState(){"overlay"===this.variant?this._isOverlay=!0:"collapsible"===this.variant?this._isOverlay=window.innerWidth<Do:this._isOverlay=!1}_setNodesToDrawer(e){e&&(this._sidebarActiveGroup&&e!==this._sidebarActiveGroup&&this._revertNodesToParent(),this._sidebarActiveGroup=e,this._drawerItems=[...this._sidebarActiveGroup._childElements])}_revertNodesToParent(){this._sidebarActiveGroup&&(this._drawerItems.forEach(e=>{var t;null===(t=this._sidebarActiveGroup)||void 0===t||t.append(e)}),this._drawerItems=[]),this._sidebarActiveGroup=null}_getAllItems(){var e;const t=e=>{var s;const i=[];for(const a of e)i.push(a),(null===(s=a._childElements)||void 0===s?void 0:s.length)&&i.push(...t(a._childElements));return i};return t(null!==(e=this._defaultNodes)&&void 0!==e?e:[])}_handleItemClick(e){const t=e.detail.element;if(t===this._sidebarActiveGroup)this._showDrawer=!this._showDrawer;else{if(this.active!==t.name){const e=this._getAllItems();this.active=t.name,e.forEach(e=>e._selected=!1)}if(t._childElements.length>0)this._showDrawer=!0;else{this._showDrawer=!1;const e=t.querySelector(":scope > a");e&&e.click()}this.emit("sgds-select",{detail:{activeItem:t.name}})}}toggleCollapsed(){"persistent"!==this.variant&&(this.collapsed=!this.collapsed)}render(){return ee`
|
|
2059
2059
|
<nav
|
|
2060
2060
|
class=${Ke({sidebar:!0,"sidebar--collapsed":this._sidebarCollapsed,overlay:this._isOverlay})}
|
|
2061
2061
|
aria-label=${this.ariaLabel}
|
|
@@ -2103,7 +2103,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
2103
2103
|
${this._drawerItems}
|
|
2104
2104
|
</div>
|
|
2105
2105
|
</nav>
|
|
2106
|
-
`}}Ar.styles=[...He.styles,_r],Ar.dependencies={"sgds-icon-button":Ya},e([ze({type:Boolean,reflect:!0})],Ar.prototype,"collapsed",void 0),e([ze({type:String,reflect:!0})],Ar.prototype,"active",void 0),e([ze({type:Boolean,reflect:!0})],Ar.prototype,"scrim",void 0),e([ze({type:String,reflect:!0})],Ar.prototype,"variant",void 0),e([ze({type:String})],Ar.prototype,"ariaLabel",void 0),e([Po({context:kr}),Ve()],Ar.prototype,"_sidebarActiveGroup",void 0),e([Po({context:$r}),Ve()],Ar.prototype,"_sidebarCollapsed",void 0),e([Po({context:Cr}),Ve()],Ar.prototype,"_sidebarActiveItem",void 0),e([Po({context:Sr}),Ve()],Ar.prototype,"_drawerItems",void 0),e([Po({context:Mr}),Ve()],Ar.prototype,"_showDrawer",void 0),e([Po({context:Zr}),Ve()],Ar.prototype,"_isOverlay",void 0),e([
|
|
2106
|
+
`}}Ar.styles=[...He.styles,_r],Ar.dependencies={"sgds-icon-button":Ya},e([ze({type:Boolean,reflect:!0})],Ar.prototype,"collapsed",void 0),e([ze({type:String,reflect:!0})],Ar.prototype,"active",void 0),e([ze({type:Boolean,reflect:!0})],Ar.prototype,"scrim",void 0),e([ze({type:String,reflect:!0})],Ar.prototype,"variant",void 0),e([ze({type:String})],Ar.prototype,"ariaLabel",void 0),e([Po({context:kr}),Ve()],Ar.prototype,"_sidebarActiveGroup",void 0),e([Po({context:$r}),Ve()],Ar.prototype,"_sidebarCollapsed",void 0),e([Po({context:Cr}),Ve()],Ar.prototype,"_sidebarActiveItem",void 0),e([Po({context:Sr}),Ve()],Ar.prototype,"_drawerItems",void 0),e([Po({context:Mr}),Ve()],Ar.prototype,"_showDrawer",void 0),e([Po({context:Zr}),Ve()],Ar.prototype,"_isOverlay",void 0),e([Ie()],Ar.prototype,"_defaultNodes",void 0),e([Ve()],Ar.prototype,"_isNarrowViewport",void 0),e([ot("collapsed")],Ar.prototype,"_handleCollapsed",null),e([ot("_sidebarActiveItem")],Ar.prototype,"_handleActiveItem",null),e([ot("active")],Ar.prototype,"_handleActive",null);class Lr extends Vr{render(){return ee`
|
|
2107
2107
|
<div
|
|
2108
2108
|
class=${Ke({"sidebar-item":!0,"sidebar-item--collapsed":!this._isOverlay&&this._sidebarCollapsed&&1===this._childLevel,"sidebar-item-leaf":this._childLevel>2,active:this._selected})}
|
|
2109
2109
|
@click=${()=>this._handleClick()}
|
|
@@ -2128,7 +2128,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
2128
2128
|
</span>`:ie}
|
|
2129
2129
|
</div>
|
|
2130
2130
|
</div>
|
|
2131
|
-
`}}Lr.styles=[...He.styles,zr];var
|
|
2131
|
+
`}}Lr.styles=[...He.styles,zr];var Dr=n`.sidebar-section{display:flex;flex-direction:column}.sidebar-section-label{align-items:center;border-radius:var(--sgds-border-radius-md);color:var(--sgds-label-color-subtle);cursor:pointer;display:flex;font-size:var(--sgds-font-size-label-xs);gap:var(--sgds-gap-2-xs);line-height:var(--sgds-line-height-2-xs);padding:var(--sgds-padding-xs) var(--sgds-padding-sm)}.sidebar-section-label--collapsible{cursor:pointer}.sidebar-section-label--collapsible:focus-visible,.sidebar-section-label--collapsible:hover{color:var(--sgds-label-color-default)}.sidebar-section-label--collapsible:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.sidebar-section--collapsed .sidebar-section-label{height:0;margin:0;opacity:0;overflow:hidden;padding:0;pointer-events:none;width:0}.sidebar-section-content{overflow:hidden;padding:0 var(--sgds-padding-xs)}.sidebar-section-content>div{margin-top:0;pointer-events:auto;transition:all var(--sgds-motion-duration-slow) var(--sgds-motion-easing-standard)}.sidebar-section-content.sidebar-section-content--collapsed>div{margin-top:-100%;pointer-events:none}.sidebar-section--collapsed .sidebar-section-content--collapsed>div{margin-top:0}.sidebar-section-separator{margin-bottom:var(--sgds-margin-md)}`;class Ir extends Vr{constructor(){super(...arguments),this.title="",this.collapsed=!1,this.collapsible=!1,this.separator=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","group"),this._childLevel=-1}updated(){super.updated(),this.title?this.setAttribute("aria-label",this.title):this.removeAttribute("aria-label")}_handleClick(){this.collapsible&&(this.collapsed=!this.collapsed,this._childElements.forEach(e=>{e._hidden=this.collapsed}))}_handleSlotChange(){super._handleSlotChange(),this._childElements.forEach(e=>{e._hidden=this.collapsed})}render(){return ee`
|
|
2132
2132
|
<div
|
|
2133
2133
|
class=${Ke({"sidebar-section":!0,"sidebar-section--collapsed":!this._isOverlay&&this._sidebarCollapsed})}
|
|
2134
2134
|
>
|
|
@@ -2154,19 +2154,19 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
2154
2154
|
|
|
2155
2155
|
${this.separator?ee`<sgds-divider></sgds-divider>`:ie}
|
|
2156
2156
|
</div>
|
|
2157
|
-
`}}
|
|
2157
|
+
`}}Ir.styles=[...He.styles,Dr],Ir.dependencies={"sgds-icon":xt,"sgds-divider":ho},e([ze({type:String,reflect:!0})],Ir.prototype,"title",void 0),e([ze({type:Boolean,reflect:!0})],Ir.prototype,"collapsed",void 0),e([ze({type:Boolean,reflect:!0})],Ir.prototype,"collapsible",void 0),e([ze({type:Boolean,reflect:!0})],Ir.prototype,"separator",void 0),customElements.define("sgds-sidebar",Ar),customElements.define("sgds-sidebar-item",Lr),customElements.define("sgds-sidebar-section",Ir),customElements.define("sgds-sidebar-group",Pr);var Er=n`:host{display:contents}:host([layout=fixed]) .table{table-layout:fixed}.table{border-collapse:collapse;display:table;table-layout:auto;width:100%}.data-table{border:var(--sgds-border-width-1) solid;border-color:var(--sgds-border-color-muted);border-radius:var(--sgds-border-radius-md);display:flex;flex-direction:column;min-height:var(--sgds-dimension-56)}.table-container{overflow-x:auto}.footer{align-items:center;display:flex;justify-content:space-between;padding:var(--sgds-padding-sm) var(--sgds-padding-lg)}.loading{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);display:block;padding:var(--sgds-padding-sm) var(--sgds-padding-md)}.loading-grid{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}.loading-grid-row{display:grid;gap:var(--sgds-gap-sm);grid-template-columns:repeat(var(--sgds-data-table-loading-columns,1),minmax(0,1fr))}.no-data{align-items:center;color:var(--sgds-text-color-subtle);display:flex;justify-content:center;min-height:var(--sgds-dimension-128);padding:var(--sgds-padding-sm) var(--sgds-padding-md)}.active:not(.sort-icon),tr:hover:not([data-header-row]){background-color:var(--sgds-bg-translucent-subtle);transition:background-color .15s ease}td,th{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);vertical-align:middle}.data-table-cell,.data-table-head{align-items:center;display:flex;min-height:var(--sgds-dimension-56);padding:var(--sgds-padding-sm) var(--sgds-padding-md)}.data-table-head{font-weight:var(--sgds-font-weight-semibold);gap:var(--sgds-gap-2-xs)}.sort,.sort-button{align-items:center;display:inline-flex}.sort-button{background-color:var(--sgds-bg-transparent);border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-form-border-radius-md);color:var(--sgds-color-subtle);cursor:pointer;height:var(--sgds-dimension-24);justify-content:center;padding:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;width:var(--sgds-dimension-24)}.sort-button:hover{background-color:var(--sgds-bg-translucent-subtle);color:var(--sgds-color-default)}.sort-button:focus,.sort-button:focus-visible{background-color:var(--sgds-bg-translucent-subtle);border-color:transparent;outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.sort-button:disabled{background-color:var(--sgds-bg-transparent);color:var(--sgds-color-muted);cursor:not-allowed}.sort-button.active{background-color:var(--sgds-primary-surface-translucent);color:var(--sgds-primary-color-default)}.sort-icon{display:inline-flex}.data-table-cell.align-right,.data-table-head.align-right{justify-content:flex-end;text-align:right}.control-cell{width:var(--sgds-dimension-56)}:host(.checkbox-cell) .data-table-cell,:host(.checkbox-cell) .data-table-head{padding:var(--sgds-padding-sm) var(--sgds-padding-md)}:host(.expand-cell) .data-table-cell{cursor:pointer;padding:var(--sgds-padding-md)}.expandable-td{border:0;padding:0}.expandable-content{background-color:var(--sgds-surface-raised);border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);padding:var(--sgds-padding-2-xl);padding-left:var(--sgds-padding-4-xl)}.hidden{display:none}`;class Br extends He{render(){return ee`<slot></slot>`}}Br.styles=[...He.styles,n`
|
|
2158
2158
|
:host {
|
|
2159
2159
|
display: contents;
|
|
2160
2160
|
}
|
|
2161
|
-
`],e([ze({type:Number
|
|
2161
|
+
`],e([ze({type:Number})],Br.prototype,"colSpan",void 0),e([ze({type:Number})],Br.prototype,"rowSpan",void 0);class Hr extends He{constructor(){super(...arguments),this.textAlign="left",this.sorting=!1,this.sortKey=""}handleSortClick(){if(!this.sorting)return;const e="ascending"===this.sortDirection?"descending":"descending"===this.sortDirection?"none":"ascending";this.sortDirection=e,this.emit("i-sgds-sort",{detail:{key:this.sortKey,direction:e},bubbles:!0,composed:!0})}render(){return ee`<slot></slot>`}}Hr.styles=[...He.styles,n`
|
|
2162
2162
|
:host {
|
|
2163
2163
|
display: contents;
|
|
2164
2164
|
}
|
|
2165
|
-
`],e([ze({type:String,reflect:!0})],Hr.prototype,"width",void 0),e([ze({type:Number
|
|
2165
|
+
`],e([ze({type:String,reflect:!0})],Hr.prototype,"width",void 0),e([ze({type:Number})],Hr.prototype,"colSpan",void 0),e([ze({type:Number})],Hr.prototype,"rowSpan",void 0),e([ze({type:String,reflect:!0})],Hr.prototype,"textAlign",void 0),e([ze({type:String,reflect:!0})],Hr.prototype,"sortDirection",void 0),e([ze({type:Boolean,reflect:!0})],Hr.prototype,"sorting",void 0),e([ze({type:String,reflect:!0})],Hr.prototype,"sortKey",void 0);class Or extends He{constructor(){super(...arguments),this.rowData={},this.expand=!1,this.open=!1,this.checked=!1,this.showCheckbox=!1,this.showExpandPlaceholder=!1,this.columnAlignments=[],this.hasDataRows=!1,this._isHeaderRow=!1,this._cellSlotNames=new WeakMap}get checkbox(){var e;return null!==(e=this._checkboxEl)&&void 0!==e?e:null}connectedCallback(){super.connectedCallback(),this._lightDomObserver=new MutationObserver(()=>this._handleLightDomChange()),this._lightDomObserver.observe(this,{childList:!0}),this._handleLightDomChange()}disconnectedCallback(){var e;null===(e=this._lightDomObserver)||void 0===e||e.disconnect(),super.disconnectedCallback()}firstUpdated(){this._expandableBody&&(this._expandableBody.hidden=!this.open)}async handleExpandedChange(){if(this.open){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return void(this.open=!1);await Qe(this._expandableBody),this._expandableBody.hidden=!1;const{keyframes:e,options:t}=st(this,"row.expand.show");await Ge(this._expandableBody,Xe(e,this._expandableBody.scrollHeight),t),this.emit("sgds-after-show")}else{if(this.emit("sgds-hide",{cancelable:!0}).defaultPrevented)return void(this.open=!0);await Qe(this._expandableBody);const{keyframes:e,options:t}=st(this,"row.expand.hide");await Ge(this._expandableBody,Xe(e,this._expandableBody.scrollHeight),t),this._expandableBody.hidden=!0,this.emit("sgds-after-hide")}}async handleCheckedChange(){this.checked&&this.emit("i-sgds-change",{detail:{checked:!0}})}async show(){if(!this.open)return this.open=!0,at(this,"sgds-after-show")}async hide(){if(this.open)return this.open=!1,at(this,"sgds-after-hide")}getCellText(e){var t;const s=this._getCells().filter(e=>e instanceof Br),i=s[e];return i?(null!==(t=i.textContent)&&void 0!==t?t:"").trim():""}_getCells(){return Array.from(this.children).filter(e=>e instanceof Br||e instanceof Hr)}_syncCellSlots(e){e.forEach(t=>{const s=`cell-${e.indexOf(t)}`;this._cellSlotNames.set(t,s),t.getAttribute("slot")!==s&&t.setAttribute("slot",s)})}_handleLightDomChange(){const e=this._getCells();this._syncCellSlots(e),this._isHeaderRow=e.some(e=>e instanceof Hr),this.requestUpdate()}_onCheckboxChange(e){this.emit("i-sgds-change",{detail:{checked:e.target.checked}})}_toggleExpand(){this.open?this.hide():this.show()}_onExpandKeyDown(e){"Enter"===e.key&&(e.preventDefault(),this._toggleExpand())}_onSortKeyDown(e,t){"Enter"===e.key&&(e.preventDefault(),t.handleSortClick())}_renderCell(e,t){var s;const i=this._cellSlotNames.get(e);if(e instanceof Hr)return ee`<th
|
|
2166
2166
|
width=${We(e.width)}
|
|
2167
|
-
colspan=${We(e.
|
|
2168
|
-
rowspan=${We(e.
|
|
2169
|
-
aria-sort=${We(e.
|
|
2167
|
+
colspan=${We(e.colSpan)}
|
|
2168
|
+
rowspan=${We(e.rowSpan)}
|
|
2169
|
+
aria-sort=${We(e.sortDirection)}
|
|
2170
2170
|
scope="col"
|
|
2171
2171
|
tabindex=${We(e.sorting?"0":void 0)}
|
|
2172
2172
|
?data-sorting=${e.sorting}
|
|
@@ -2178,19 +2178,19 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
2178
2178
|
${e.sorting?ee`
|
|
2179
2179
|
<button
|
|
2180
2180
|
type="button"
|
|
2181
|
-
class="sort-button ${"none"===e.
|
|
2182
|
-
aria-label=${"descending"===e.
|
|
2181
|
+
class="sort-button ${"none"===e.sortDirection?"":"active"}"
|
|
2182
|
+
aria-label=${"descending"===e.sortDirection?"Sort descending":"Sort ascending"}
|
|
2183
2183
|
?disabled=${!this.hasDataRows}
|
|
2184
2184
|
>
|
|
2185
2185
|
<sgds-icon
|
|
2186
2186
|
class="sort-icon"
|
|
2187
|
-
name=${"descending"===e.
|
|
2187
|
+
name=${"descending"===e.sortDirection?"sort-descending":"sort-ascending"}
|
|
2188
2188
|
size="sm"
|
|
2189
2189
|
></sgds-icon>
|
|
2190
2190
|
</button>
|
|
2191
2191
|
`:ie}
|
|
2192
2192
|
</div>
|
|
2193
|
-
</th>`;const a=null!==(s=this.columnAlignments[t])&&void 0!==s?s:"left";return ee`<td colspan=${We(e.
|
|
2193
|
+
</th>`;const a=null!==(s=this.columnAlignments[t])&&void 0!==s?s:"left";return ee`<td colspan=${We(e.colSpan)} rowspan=${We(e.rowSpan)}>
|
|
2194
2194
|
<div class="data-table-cell ${"right"===a?"align-right":"align-left"}">
|
|
2195
2195
|
${i?ee`<slot name=${i}></slot>`:ie}
|
|
2196
2196
|
</div>
|
|
@@ -2210,7 +2210,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
2210
2210
|
<tr part=${s} ?data-header-row=${this._isHeaderRow} class=${this.open?"active":""}>
|
|
2211
2211
|
${this.expand?this._renderExpandCell():this.showExpandPlaceholder?this._renderExpandPlaceholder():ie}
|
|
2212
2212
|
${this.showCheckbox?this._renderCheckboxCell():ie}
|
|
2213
|
-
${(()=>{let t=0;return e.map(e=>{const s=this._renderCell(e,t),i=Number(e.
|
|
2213
|
+
${(()=>{let t=0;return e.map(e=>{const s=this._renderCell(e,t),i=Number(e.colSpan)>0?Number(e.colSpan):1;return t+=i,s})})()}
|
|
2214
2214
|
</tr>
|
|
2215
2215
|
|
|
2216
2216
|
${this.expand?ee`
|
|
@@ -2224,31 +2224,36 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
2224
2224
|
</td>
|
|
2225
2225
|
</tr>
|
|
2226
2226
|
`:ie}
|
|
2227
|
-
`}}Or.styles=[...He.styles,Er],Or.dependencies={"sgds-checkbox":ya,"sgds-data-table-cell":Br,"sgds-data-table-head":Hr,"sgds-icon":xt},e([ze({type:Object,reflect:!0})],Or.prototype,"rowData",void 0),e([ze({type:Boolean,reflect:!0})],Or.prototype,"expand",void 0),e([ze({type:Boolean,reflect:!0})],Or.prototype,"open",void 0),e([ze({type:Boolean,reflect:!0})],Or.prototype,"checked",void 0),e([ze({type:Boolean})],Or.prototype,"showCheckbox",void 0),e([ze({type:Boolean})],Or.prototype,"showExpandPlaceholder",void 0),e([ze({attribute:!1})],Or.prototype,"columnAlignments",void 0),e([ze({type:Boolean})],Or.prototype,"hasDataRows",void 0),e([Le(".expandable-body")],Or.prototype,"_expandableBody",void 0),e([Le("sgds-checkbox")],Or.prototype,"_checkboxEl",void 0),e([Ve()],Or.prototype,"_isHeaderRow",void 0),e([ot("open",{waitUntilFirstUpdate:!0})],Or.prototype,"handleExpandedChange",null),e([ot("checked")],Or.prototype,"handleCheckedChange",null),it("row.expand.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:250,easing:"ease-in-out"}}),it("row.expand.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:250,easing:"ease-in-out"}});class Tr extends He{constructor(){super(...arguments),this.multiSelect=!1,this.dataLength=0,this.currentPage=1,this.itemsPerPage=5,this.footerText="",this.
|
|
2227
|
+
`}}Or.styles=[...He.styles,Er],Or.dependencies={"sgds-checkbox":ya,"sgds-data-table-cell":Br,"sgds-data-table-head":Hr,"sgds-icon":xt},e([ze({type:Object,reflect:!0})],Or.prototype,"rowData",void 0),e([ze({type:Boolean,reflect:!0})],Or.prototype,"expand",void 0),e([ze({type:Boolean,reflect:!0})],Or.prototype,"open",void 0),e([ze({type:Boolean,reflect:!0})],Or.prototype,"checked",void 0),e([ze({type:Boolean})],Or.prototype,"showCheckbox",void 0),e([ze({type:Boolean})],Or.prototype,"showExpandPlaceholder",void 0),e([ze({attribute:!1})],Or.prototype,"columnAlignments",void 0),e([ze({type:Boolean})],Or.prototype,"hasDataRows",void 0),e([Le(".expandable-body")],Or.prototype,"_expandableBody",void 0),e([Le("sgds-checkbox")],Or.prototype,"_checkboxEl",void 0),e([Ve()],Or.prototype,"_isHeaderRow",void 0),e([ot("open",{waitUntilFirstUpdate:!0})],Or.prototype,"handleExpandedChange",null),e([ot("checked")],Or.prototype,"handleCheckedChange",null),it("row.expand.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:250,easing:"ease-in-out"}}),it("row.expand.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:250,easing:"ease-in-out"}});class Tr extends He{constructor(){super(...arguments),this.multiSelect=!1,this.dataLength=0,this.currentPage=1,this.itemsPerPage=5,this.footerText="",this.isLoading=!1,this.serverSort=!1,this.paginationVariant="default",this.layout="auto",this.mode="client",this.tableRows=[],this.headerRows=[],this._headerCells=[],this._initialRowPositions=new WeakMap,this._hasCapturedInitialRowPositions=!1,this._rowHandlers=new WeakMap}connectedCallback(){super.connectedCallback(),this.setAttribute("role","table")}_isRowChecked(e){var t;return e.checked||!0===(null===(t=e.checkbox)||void 0===t?void 0:t.checked)}_updateHeaderCheckbox(){const e=this.tableRows.filter(e=>this._isRowChecked(e)).length,t=e===this.tableRows.length&&e>0;this.headerRows.forEach(s=>{s.checked=t,s.checkbox&&(s.checkbox.checked=t,s.checkbox.indeterminate=e>0&&!t)})}async _syncHeaderCheckboxAfterRender(){if(!this.multiSelect||0===this.headerRows.length)return;const e=[...this.headerRows,...this.tableRows];await Promise.all(e.map(e=>e.updateComplete)),this._updateHeaderCheckbox()}_emitRowSelect(){const e=this.tableRows.filter(e=>this._isRowChecked(e)).map(e=>e.rowData);this.emit("sgds-row-select",{detail:{selected:e}})}_attachRowListener(e){const t=this._rowHandlers.get(e);t&&e.removeEventListener("i-sgds-change",t);const s=t=>{const{checked:s}=t.detail;this.headerRows.includes(e)?this.tableRows.forEach(e=>{e.checked=s,e.checkbox&&(e.checkbox.checked=s)}):(e.checked=s,this._updateHeaderCheckbox()),this._emitRowSelect()};this._rowHandlers.set(e,s),e.addEventListener("i-sgds-change",s)}_configureRows(){const e=this.tableRows.some(e=>e.expand),t=this.tableRows.length>0;this.headerRows.forEach(s=>{s.showCheckbox=this.multiSelect,s.showExpandPlaceholder=e,s.hasDataRows=t,this.multiSelect&&this._attachRowListener(s)}),this.tableRows.forEach(t=>{t.showCheckbox=this.multiSelect,t.showExpandPlaceholder=!t.expand&&e,this.multiSelect&&this._attachRowListener(t)}),this.multiSelect&&this._syncHeaderCheckboxAfterRender(),this._applyColumnAlignment()}_applyColumnAlignment(){const e=this._headerCells.reduce((e,t)=>{var s;const i=Number(t.colSpan)>0?Number(t.colSpan):1,a=null!==(s=t.textAlign)&&void 0!==s?s:"left";for(let t=0;t<i;t++)e.push(a);return e},[]);this.headerRows.forEach(t=>{t.columnAlignments=[...e]}),this.tableRows.forEach(t=>{t.columnAlignments=[...e]})}_extractCellText(e,t){const s=e.getCellText(t);if(s)return s;const i=Array.from(e.children).filter(e=>"sgds-data-table-cell"===e.tagName.toLowerCase())[t];return((null==i?void 0:i.textContent)||"").trim()}_toComparableValue(e,t,s){return t&&e.rowData&&t in e.rowData?e.rowData[t]:this._extractCellText(e,s)}_compareValues(e,t,s){if(e===t)return 0;const i=Number(e),a=Number(t);if(Number.isFinite(i)&&Number.isFinite(a))return"ascending"===s?i-a:a-i;const o=String(e).localeCompare(String(t),void 0,{numeric:!0,sensitivity:"base"});return"ascending"===s?o:-o}_resetOtherHeaderSortStates(e){this._headerCells.forEach(t=>{t!==e&&t.sorting&&(t.sortDirection="none")})}_getRowsInInitialPositionOrder(e){return[...e].sort((e,t)=>{const s=this._initialRowPositions.get(e),i=this._initialRowPositions.get(t);return void 0===s&&void 0===i?0:void 0===s?1:void 0===i?-1:s-i})}_captureInitialRowPositions(e){this._hasCapturedInitialRowPositions||(e.forEach((e,t)=>{this._initialRowPositions.set(e,t)}),this._hasCapturedInitialRowPositions=!0)}_handleSort(e){const t=e.composedPath().find(e=>e instanceof Hr);if(!t||!t.sorting)return;const{key:s,direction:i}=e.detail,a=t?this._headerCells.indexOf(t):-1;if(this._resetOtherHeaderSortStates(t),this.serverSort)return e.stopPropagation(),void this.emit("sgds-sort",{detail:{key:s,direction:i}});if(!(a<0)){if("none"===i)return this.tableRows=this._getRowsInInitialPositionOrder(this.tableRows),this._syncDomRowOrder(),void this._updateVisibleRows();if("client"===this.mode){const e=(this.currentPage-1)*this.itemsPerPage,t=e+this.itemsPerPage,o=[...this.tableRows],n=o.slice(e,t).sort((e,t)=>{const o=this._toComparableValue(e,s,a),n=this._toComparableValue(t,s,a);return this._compareValues(o,n,i)});return o.splice(e,n.length,...n),this.tableRows=o,this._syncDomRowOrder(),void this._updateVisibleRows()}this.tableRows=[...this.tableRows].sort((e,t)=>{const o=this._toComparableValue(e,s,a),n=this._toComparableValue(t,s,a);return this._compareValues(o,n,i)}),this._syncDomRowOrder(),this._updateVisibleRows()}}_syncDomRowOrder(){var e;const t=null===(e=this.tableRows[0])||void 0===e?void 0:e.parentElement;t&&this.tableRows.forEach(e=>t.appendChild(e))}_handleSlotChange(e){const t=e.target.assignedElements({flatten:!0}).filter(e=>e instanceof Or),s=e=>Array.from(e.children).filter(e=>{const t=e.tagName.toLowerCase();return!("sgds-data-table-cell"!==t&&"sgds-data-table-head"!==t)&&"content"!==e.getAttribute("slot")});this.headerRows=t.filter(e=>s(e).some(e=>"sgds-data-table-head"===e.tagName.toLowerCase())),this.tableRows=t.filter(e=>{const t=s(e);return t.length>0&&t.every(e=>"sgds-data-table-cell"===e.tagName.toLowerCase())}),this._headerCells=this.headerRows.reduce((e,t)=>{const s=Array.from(t.children).filter(e=>e instanceof Hr);return e.push(...s),e},[]),this._captureInitialRowPositions(this.tableRows),this._headerCells.forEach(e=>{e.sorting&&!e.sortDirection&&(e.sortDirection="none")}),this._configureRows(),this._updateVisibleRows()}_updateVisibleRows(){if(this.isLoading)return void this.tableRows.forEach(e=>e.style.display="none");if("server"===this.mode)return void this.tableRows.forEach(e=>e.style.display="");const e=this.dataLength||this.tableRows.length,t=Math.max(1,Math.ceil(e/this.itemsPerPage));if(this.currentPage>t)return void(this.currentPage=t);const s=(this.currentPage-1)*this.itemsPerPage,i=new Set(this.tableRows.slice(s,s+this.itemsPerPage));this.tableRows.forEach(e=>e.style.display=i.has(e)?"":"none")}_getSkeletonColumnCount(){const e=this.headerRows[0],t=(e?Array.from(e.children).filter(e=>e instanceof Hr):[]).reduce((e,t)=>e+(Number(t.colSpan)>0?Number(t.colSpan):1),0),s=this.tableRows[0],i=s?Array.from(s.children).filter(e=>e instanceof Br).length:0,a=this.tableRows.some(e=>e.expand),o=(this.multiSelect?1:0)+(a?1:0),n=t||i||1;return Math.max(1,n+o)}_renderLoadingSkeleton(){const e=this._getSkeletonColumnCount(),t=Math.max(1,this.itemsPerPage||1);return ee`<div class="loading" role="status" aria-live="polite" aria-label="Loading">
|
|
2228
|
+
<div class="loading-grid" style=${`--sgds-data-table-loading-columns: ${e};`} aria-hidden="true">
|
|
2229
|
+
${Array.from({length:t},(t,s)=>ee`<div class="loading-grid-row" key=${s}>
|
|
2230
|
+
${Array.from({length:e},()=>ee`<sgds-skeleton .height=${"56px"} .borderRadius=${"4px"}></sgds-skeleton>`)}
|
|
2231
|
+
</div>`)}
|
|
2232
|
+
</div>
|
|
2233
|
+
</div>`}updated(e){(e.has("currentPage")||e.has("itemsPerPage")||e.has("mode")||e.has("isLoading"))&&this._updateVisibleRows(),e.has("multiSelect")&&this._configureRows(),this.multiSelect&&(e.has("tableRows")||e.has("headerRows"))&&this._syncHeaderCheckboxAfterRender()}render(){const e=this.dataLength||this.tableRows.length,t=(this.currentPage-1)*this.itemsPerPage,s=Math.min(t+this.itemsPerPage,e),i=0===e?0:t+1,a=!this.isLoading&&0===this.tableRows.length,o=0!==e;return ee`
|
|
2228
2234
|
<div class="data-table">
|
|
2229
|
-
<div>
|
|
2235
|
+
<div class="table-container">
|
|
2230
2236
|
<slot @slotchange=${this._handleSlotChange} @i-sgds-sort=${this._handleSort} class="table"></slot>
|
|
2231
|
-
${this.isLoading?ee`<
|
|
2232
|
-
<div class="loading-menu"><sgds-spinner size="xs" tone="brand"></sgds-spinner>Loading...</div>
|
|
2233
|
-
</div>`:a?ee`<slot name="no-data" class="no-data" role="status" aria-live="polite">No data</slot>`:ie}
|
|
2237
|
+
${this.isLoading?this._renderLoadingSkeleton():a?ee`<slot name="no-data" class="no-data" role="status" aria-live="polite">No data</slot>`:ie}
|
|
2234
2238
|
</div>
|
|
2235
2239
|
|
|
2236
|
-
${
|
|
2240
|
+
${o?ee`<div class="footer">
|
|
2237
2241
|
${this.footerText||ee`<span>Showing ${i} to ${s} of ${e} results</span>`}
|
|
2238
2242
|
<sgds-pagination
|
|
2239
2243
|
.dataLength=${e}
|
|
2240
2244
|
.currentPage=${this.currentPage}
|
|
2241
2245
|
.itemsPerPage=${this.itemsPerPage}
|
|
2246
|
+
.variant=${this.paginationVariant}
|
|
2242
2247
|
size="sm"
|
|
2243
2248
|
@sgds-page-change=${e=>{this.currentPage=e.detail.currentPage,this.emit("sgds-page-change")}}
|
|
2244
2249
|
></sgds-pagination>
|
|
2245
|
-
</div
|
|
2250
|
+
</div>`:ie}
|
|
2246
2251
|
</div>
|
|
2247
2252
|
`}}Tr.styles=[...He.styles,Er,n`
|
|
2248
2253
|
:host {
|
|
2249
2254
|
display: block;
|
|
2250
2255
|
}
|
|
2251
|
-
`],Tr.dependencies={"sgds-pagination":on,"sgds-data-table-cell":Br,"sgds-data-table-head":Hr,"sgds-
|
|
2256
|
+
`],Tr.dependencies={"sgds-pagination":on,"sgds-data-table-cell":Br,"sgds-data-table-head":Hr,"sgds-skeleton":Cn},e([ze({type:Boolean})],Tr.prototype,"multiSelect",void 0),e([ze({type:Number})],Tr.prototype,"dataLength",void 0),e([ze({type:Number})],Tr.prototype,"currentPage",void 0),e([ze({type:Number})],Tr.prototype,"itemsPerPage",void 0),e([ze({type:String})],Tr.prototype,"footerText",void 0),e([ze({type:Boolean})],Tr.prototype,"isLoading",void 0),e([ze({type:Boolean})],Tr.prototype,"serverSort",void 0),e([ze({type:String})],Tr.prototype,"paginationVariant",void 0),e([ze({type:String,reflect:!0})],Tr.prototype,"layout",void 0),e([ze({type:String})],Tr.prototype,"mode",void 0),e([Ve()],Tr.prototype,"tableRows",void 0),e([Ve()],Tr.prototype,"headerRows",void 0),lt("sgds-data-table",Tr),lt("sgds-data-table-row",Or),lt("sgds-data-table-cell",Br),lt("sgds-data-table-head",Hr);const Rr="appnav-context";var Fr=n`:host{display:block}nav{box-shadow:0 2px 4px 0 hsla(0,0%,5%,.08);position:relative;z-index:var(--sgds-z-index-floating)}:host([tone=brand]) nav{background-color:var(--sgds-primary-surface-default)}:host([tone=gradient-1]) nav{background:var(--sgds-gradient-1)}:host([tone=gradient-2]) nav{background:var(--sgds-gradient-2)}:host([tone=gradient-3]) nav{background:var(--sgds-gradient-3)}:host([tone=gradient-4]) nav{background:var(--sgds-gradient-4)}.navbar{align-items:stretch;display:flex;flex-wrap:wrap;font-size:var(--sgds-font-size-label-sm);gap:var(--sgds-gap-xs);justify-content:flex-start;margin:auto;min-height:var(--sgds-mainnav-height,72px);padding:0 var(--sgds-mainnav-mobile-padding-x);width:100%}.navbar-brand{align-items:center;color:var(--sgds-color-fixed-light);display:flex;text-decoration:none;white-space:nowrap}.navbar-brand:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.navbar-nav{align-items:flex-start;display:flex;flex-direction:column;gap:var(--sgds-gap-xs);height:100%;margin-bottom:0;margin-left:auto;margin-top:0}nav>.navbar-body{background-color:var(--sgds-surface-default);border-top:var(--sgds-border-width-1) solid var(--sgds-border-color-translucent);box-shadow:0 2px 4px 0 hsla(0,0%,5%,.08);padding:var(--sgds-padding-md) 0;position:absolute;transition:transform .2s ease-in-out;width:100%;z-index:var(--sgds-z-index-floating)}nav>.navbar-body .navbar-nav{height:100dvh;margin:auto}nav>.navbar-body slot::slotted(*){padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x)}.navbar-collapse{align-items:center;flex-basis:100%;flex-grow:1}.navbar-toggler{align-self:center}@media (prefers-reduced-motion:reduce){.navbar-toggler{transition:none}}.navbar-nav-scroll{overflow-y:auto}@media (min-width:512px){.navbar-expand-sm{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-sm .navbar-nav{align-items:center;flex-direction:row}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media (min-width:768px){.navbar-expand-md{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-md .navbar-nav{align-items:center;flex-direction:row}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media (min-width:1024px){.navbar{padding:0 var(--sgds-mainnav-padding-x)}.navbar-expand-lg{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-lg .navbar-nav{align-items:center;flex-direction:row}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media (min-width:1280px){.navbar-expand-xl{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-xl .navbar-nav{align-items:center;flex-direction:row}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}@media (min-width:1440px){.navbar-expand-xxl{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-xxl .navbar-nav{align-items:center;flex-direction:row}.navbar-expand-xxl .navbar-nav-scroll{overflow:visible}.navbar-expand-xxl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xxl .navbar-toggler{display:none}}.navbar-expand{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand .navbar-nav{align-items:center;flex-direction:row}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-end{margin-left:auto}.navbar-end,slot[name=start]{align-items:center;display:flex;gap:var(--sgds-gap-xs)}slot[name=start].slot-empty{display:none}slot[name=profile]{align-self:stretch;display:flex}slot[name=start]::slotted(*){color:var(--sgds-color-fixed-light)}.navbar-end.slot-empty,.slot-desktop-only{display:none}.appnav-menu-item{align-items:center;box-sizing:border-box;cursor:pointer;display:flex;font-size:var(--sgds-font-size-label-sm);line-height:var(--sgds-line-height-2-xs,20px);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);text-decoration:none;width:100%}.appnav-menu-item,.appnav-menu-item:hover{color:var(--sgds-color-default)}.appnav-menu-item:focus-visible{color:var(--sgds-primary-color-default);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`;class Nr extends Eo{constructor(){super(...arguments),this._breakpointReached=!1,this._expanded=!1,this.tone="brand",this.hasStartSlot=!1,this.hasSlotController=new $i(this,"start"),this._hasDefaultSlotItems=!1,this._hasProfileSlotItems=!1,this._defaultSlotItems=[]}updated(){this.hasStartSlot||(this.hasStartSlot=this.hasSlotController.test("start")),this._expanded=this.expanded}_onBreakpointReached(e){this._breakpointReached=e}_isBreakpointReached(){return this._breakpointReached}_handleTogglerKeydown(e){var t;if("Tab"===e.key&&!e.shiftKey&&this.expanded){e.preventDefault();const s=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".appnav-menu-item");null==s||s.focus()}}_handleDefaultSlotChange(e){const t=e.target.assignedElements({flatten:!0});this._hasDefaultSlotItems=t.length>0,this._defaultSlotItems=t.filter(e=>void 0!==e.tagName).map(e=>{var t;return{label:e.getAttribute("ariaLabel")||e.getAttribute("aria-label")||(null===(t=e.textContent)||void 0===t?void 0:t.trim())||"",element:e}}),t.forEach(e=>{e.setAttribute("expand",this.expand)})}_handleMobileItemClick(e){e.element.click(),this.hide()}_renderAppnavToggler(){return ee`<sgds-icon-button
|
|
2252
2257
|
name="three-dots-vertical"
|
|
2253
2258
|
variant="ghost"
|
|
2254
2259
|
size="sm"
|
|
@@ -2514,7 +2519,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
2514
2519
|
clip-rule="evenodd"
|
|
2515
2520
|
/>
|
|
2516
2521
|
</svg>
|
|
2517
|
-
`,
|
|
2522
|
+
`,Dl=Object.freeze({__proto__:null,default:Ll}),Il=ee`
|
|
2518
2523
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
2519
2524
|
<path
|
|
2520
2525
|
fill="currentColor"
|
|
@@ -2523,7 +2528,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
2523
2528
|
clip-rule="evenodd"
|
|
2524
2529
|
/>
|
|
2525
2530
|
</svg>
|
|
2526
|
-
`,El=Object.freeze({__proto__:null,default:
|
|
2531
|
+
`,El=Object.freeze({__proto__:null,default:Il}),Bl=ee`
|
|
2527
2532
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
2528
2533
|
<path
|
|
2529
2534
|
fill="currentColor"
|
|
@@ -2789,7 +2794,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
2789
2794
|
clip-rule="evenodd"
|
|
2790
2795
|
/>
|
|
2791
2796
|
</svg>
|
|
2792
|
-
`,
|
|
2797
|
+
`,Dd=Object.freeze({__proto__:null,default:Ld}),Id=ee`
|
|
2793
2798
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
2794
2799
|
<path
|
|
2795
2800
|
fill="currentColor"
|
|
@@ -2802,7 +2807,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
2802
2807
|
clip-rule="evenodd"
|
|
2803
2808
|
/>
|
|
2804
2809
|
</svg>
|
|
2805
|
-
`,Ed=Object.freeze({__proto__:null,default:
|
|
2810
|
+
`,Ed=Object.freeze({__proto__:null,default:Id}),Bd=ee`
|
|
2806
2811
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
2807
2812
|
<path
|
|
2808
2813
|
fill="currentColor"
|
|
@@ -3092,7 +3097,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
3092
3097
|
clip-rule="evenodd"
|
|
3093
3098
|
/>
|
|
3094
3099
|
</svg>
|
|
3095
|
-
`,
|
|
3100
|
+
`,Dc=Object.freeze({__proto__:null,default:Lc}),Ic=ee`
|
|
3096
3101
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
3097
3102
|
<path
|
|
3098
3103
|
fill="currentColor"
|
|
@@ -3101,7 +3106,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
3101
3106
|
clip-rule="evenodd"
|
|
3102
3107
|
/>
|
|
3103
3108
|
</svg>
|
|
3104
|
-
`,Ec=Object.freeze({__proto__:null,default:
|
|
3109
|
+
`,Ec=Object.freeze({__proto__:null,default:Ic}),Bc=ee`
|
|
3105
3110
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
3106
3111
|
<path
|
|
3107
3112
|
fill="currentColor"
|
|
@@ -3373,7 +3378,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
3373
3378
|
clip-rule="evenodd"
|
|
3374
3379
|
/>
|
|
3375
3380
|
</svg>
|
|
3376
|
-
`,
|
|
3381
|
+
`,Dh=Object.freeze({__proto__:null,default:Lh}),Ih=ee`
|
|
3377
3382
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
3378
3383
|
<path
|
|
3379
3384
|
fill="currentColor"
|
|
@@ -3382,7 +3387,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
3382
3387
|
clip-rule="evenodd"
|
|
3383
3388
|
/>
|
|
3384
3389
|
</svg>
|
|
3385
|
-
`,Eh=Object.freeze({__proto__:null,default:
|
|
3390
|
+
`,Eh=Object.freeze({__proto__:null,default:Ih}),Bh=ee`
|
|
3386
3391
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
3387
3392
|
<path
|
|
3388
3393
|
fill="currentColor"
|
|
@@ -3637,7 +3642,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
3637
3642
|
clip-rule="evenodd"
|
|
3638
3643
|
/>
|
|
3639
3644
|
</svg>
|
|
3640
|
-
`,
|
|
3645
|
+
`,Dp=Object.freeze({__proto__:null,default:Lp}),Ip=ee`
|
|
3641
3646
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
3642
3647
|
<path
|
|
3643
3648
|
fill="currentColor"
|
|
@@ -3646,7 +3651,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
3646
3651
|
clip-rule="evenodd"
|
|
3647
3652
|
/>
|
|
3648
3653
|
</svg>
|
|
3649
|
-
`,Ep=Object.freeze({__proto__:null,default:
|
|
3654
|
+
`,Ep=Object.freeze({__proto__:null,default:Ip}),Bp=ee`
|
|
3650
3655
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
3651
3656
|
<path
|
|
3652
3657
|
fill="currentColor"
|
|
@@ -3888,7 +3893,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
3888
3893
|
clip-rule="evenodd"
|
|
3889
3894
|
/>
|
|
3890
3895
|
</svg>
|
|
3891
|
-
`,
|
|
3896
|
+
`,Dg=Object.freeze({__proto__:null,default:Lg}),Ig=ee`
|
|
3892
3897
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
3893
3898
|
<path
|
|
3894
3899
|
fill="currentColor"
|
|
@@ -3897,7 +3902,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
3897
3902
|
clip-rule="evenodd"
|
|
3898
3903
|
/>
|
|
3899
3904
|
</svg>
|
|
3900
|
-
`,Eg=Object.freeze({__proto__:null,default:
|
|
3905
|
+
`,Eg=Object.freeze({__proto__:null,default:Ig}),Bg=ee`
|
|
3901
3906
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
3902
3907
|
<path
|
|
3903
3908
|
fill="currentColor"
|
|
@@ -4175,7 +4180,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
4175
4180
|
clip-rule="evenodd"
|
|
4176
4181
|
/>
|
|
4177
4182
|
</svg>
|
|
4178
|
-
`,
|
|
4183
|
+
`,Du=Object.freeze({__proto__:null,default:Lu}),Iu=ee`
|
|
4179
4184
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
4180
4185
|
<path
|
|
4181
4186
|
fill="currentColor"
|
|
@@ -4184,7 +4189,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
4184
4189
|
clip-rule="evenodd"
|
|
4185
4190
|
/>
|
|
4186
4191
|
</svg>
|
|
4187
|
-
`,Eu=Object.freeze({__proto__:null,default:
|
|
4192
|
+
`,Eu=Object.freeze({__proto__:null,default:Iu}),Bu=ee`
|
|
4188
4193
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
4189
4194
|
<path
|
|
4190
4195
|
fill="currentColor"
|
|
@@ -4468,7 +4473,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
4468
4473
|
clip-rule="evenodd"
|
|
4469
4474
|
/>
|
|
4470
4475
|
</svg>
|
|
4471
|
-
`,
|
|
4476
|
+
`,Dv=Object.freeze({__proto__:null,default:Lv}),Iv=ee`
|
|
4472
4477
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
4473
4478
|
<path
|
|
4474
4479
|
fill="currentColor"
|
|
@@ -4477,7 +4482,7 @@ const nn="important",rn=" !"+nn;const ln=qe(class extends Ye{constructor(e){if(s
|
|
|
4477
4482
|
clip-rule="evenodd"
|
|
4478
4483
|
/>
|
|
4479
4484
|
</svg>
|
|
4480
|
-
`,Ev=Object.freeze({__proto__:null,default:
|
|
4485
|
+
`,Ev=Object.freeze({__proto__:null,default:Iv}),Bv=ee`
|
|
4481
4486
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
4482
4487
|
<path
|
|
4483
4488
|
fill="currentColor"
|