@govtechsg/sgds-web-component 3.11.0 → 3.12.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/components/Checkbox/index.umd.min.js +6 -6
  2. package/components/Checkbox/index.umd.min.js.map +1 -1
  3. package/components/ComboBox/index.umd.min.js +240 -240
  4. package/components/ComboBox/index.umd.min.js.map +1 -1
  5. package/components/Datepicker/index.umd.min.js +22 -22
  6. package/components/Datepicker/index.umd.min.js.map +1 -1
  7. package/components/FileUpload/index.umd.min.js +8 -8
  8. package/components/FileUpload/index.umd.min.js.map +1 -1
  9. package/components/Input/index.umd.min.js +14 -14
  10. package/components/Input/index.umd.min.js.map +1 -1
  11. package/components/Input/sgds-input.d.ts +1 -0
  12. package/components/Input/sgds-input.js +1 -4
  13. package/components/Input/sgds-input.js.map +1 -1
  14. package/components/Modal/index.umd.min.js.map +1 -1
  15. package/components/Modal/sgds-modal.d.ts +1 -1
  16. package/components/Modal/sgds-modal.js +1 -1
  17. package/components/Modal/sgds-modal.js.map +1 -1
  18. package/components/QuantityToggle/index.umd.min.js +2 -2
  19. package/components/QuantityToggle/index.umd.min.js.map +1 -1
  20. package/components/Radio/index.umd.min.js +9 -9
  21. package/components/Radio/index.umd.min.js.map +1 -1
  22. package/components/Select/index.umd.min.js +11 -11
  23. package/components/Select/index.umd.min.js.map +1 -1
  24. package/components/Tab/index.umd.min.js.map +1 -1
  25. package/components/Tab/sgds-tab-group.d.ts +2 -2
  26. package/components/Tab/sgds-tab-group.js +2 -2
  27. package/components/Tab/sgds-tab-group.js.map +1 -1
  28. package/components/Textarea/index.umd.min.js +6 -6
  29. package/components/Textarea/index.umd.min.js.map +1 -1
  30. package/components/Textarea/sgds-textarea.d.ts +2 -0
  31. package/components/Textarea/sgds-textarea.js +14 -2
  32. package/components/Textarea/sgds-textarea.js.map +1 -1
  33. package/components/index.umd.min.js +4 -4
  34. package/components/index.umd.min.js.map +1 -1
  35. package/css/fouc.css +2 -2
  36. package/index.umd.min.js +49 -49
  37. package/index.umd.min.js.map +1 -1
  38. package/package.json +1 -1
  39. package/react/components/Input/sgds-input.cjs.js +1 -4
  40. package/react/components/Input/sgds-input.cjs.js.map +1 -1
  41. package/react/components/Input/sgds-input.js +1 -4
  42. package/react/components/Input/sgds-input.js.map +1 -1
  43. package/react/components/Modal/sgds-modal.cjs.js +1 -1
  44. package/react/components/Modal/sgds-modal.cjs.js.map +1 -1
  45. package/react/components/Modal/sgds-modal.js +1 -1
  46. package/react/components/Modal/sgds-modal.js.map +1 -1
  47. package/react/components/Tab/sgds-tab-group.cjs.js +2 -2
  48. package/react/components/Tab/sgds-tab-group.cjs.js.map +1 -1
  49. package/react/components/Tab/sgds-tab-group.js +2 -2
  50. package/react/components/Tab/sgds-tab-group.js.map +1 -1
  51. package/react/components/Textarea/sgds-textarea.cjs.js +14 -2
  52. package/react/components/Textarea/sgds-textarea.cjs.js.map +1 -1
  53. package/react/components/Textarea/sgds-textarea.js +14 -2
  54. package/react/components/Textarea/sgds-textarea.js.map +1 -1
  55. package/react/index.cjs.js +12 -12
  56. package/react/index.d.ts +2 -2
  57. package/react/index.js +2 -2
  58. package/react/utils/inputValidationController.cjs.js +2 -1
  59. package/react/utils/inputValidationController.cjs.js.map +1 -1
  60. package/react/utils/inputValidationController.js +2 -1
  61. package/react/utils/inputValidationController.js.map +1 -1
  62. package/react/utils/validatorMixin.cjs.js +24 -6
  63. package/react/utils/validatorMixin.cjs.js.map +1 -1
  64. package/react/utils/validatorMixin.js +24 -6
  65. package/react/utils/validatorMixin.js.map +1 -1
  66. package/utils/inputValidationController.js +2 -1
  67. package/utils/inputValidationController.js.map +1 -1
  68. package/utils/validatorMixin.js +24 -6
  69. package/utils/validatorMixin.js.map +1 -1
@@ -10,7 +10,7 @@ const t=globalThis,l=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 y=globalThis,V=e=>{y.emitLitDebugLogEvents&&y.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let H,$=0;y.litIssuedWarnings??=new Set,H=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",y.litIssuedWarnings.has(t)||y.litIssuedWarnings.has(e)||(console.warn(t),y.litIssuedWarnings.add(t))},queueMicrotask(()=>{H("dev-mode","Lit is in dev mode. Not recommended for production!")});const B=y.ShadyDOM?.inUse&&!0===y.ShadyDOM?.noPatch?y.ShadyDOM.wrap:e=>e,S=y.trustedTypes,k=S?S.createPolicy("lit-html",{createHTML:e=>e}):void 0,L=e=>e,A=(e,t,l)=>L,E=e=>{if(oe!==A)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");oe=e},P=()=>{oe=A},z=(e,t,l)=>oe(e,t,l),T="$lit$",I=`lit$${Math.random().toFixed(9).slice(2)}$`,N="?"+I,R=`<${N}>`,U=document,O=()=>U.createComment(""),D=e=>null===e||"object"!=typeof e&&"function"!=typeof e,F=Array.isArray,W="[ \t\n\f\r]",q=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,j=/-->/g,J=/>/g,G=new RegExp(`>|${W}(?:([^\\s"'>=/]+)(${W}*=${W}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),K=/'/g,X=/"/g,Y=/^(?:script|style|textarea|title)$/i,Q=(ee=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$)&&H("","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$:ee,strings:e,values:t}));var ee;const te=Symbol.for("lit-noChange"),le=Symbol.for("lit-nothing"),ie=new WeakMap,ae=U.createTreeWalker(U,129);let oe=A;function re(e,t){if(!F(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!==k?k.createHTML(t):t}class se{constructor({strings:e,_$litType$:t},l){let i;this.parts=[];let a=0,o=0;const r=e.length-1,s=this.parts,[n,c]=((e,t)=>{const l=e.length-1,i=[];let a,o=2===t?"<svg>":3===t?"<math>":"",r=q;for(let t=0;t<l;t++){const l=e[t];let s,n,c=-1,h=0;for(;h<l.length&&(r.lastIndex=h,n=r.exec(l),null!==n);)if(h=r.lastIndex,r===q){if("!--"===n[1])r=j;else if(void 0!==n[1])r=J;else if(void 0!==n[2])Y.test(n[2])&&(a=new RegExp(`</${n[2]}`,"g")),r=G;else if(void 0!==n[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 r===G?">"===n[0]?(r=a??q,c=-1):void 0===n[1]?c=-2:(c=r.lastIndex-n[2].length,s=n[1],r=void 0===n[3]?G:'"'===n[3]?X:K):r===X||r===K?r=G:r===j||r===J?r=q:(r=G,a=void 0);console.assert(-1===c||r===G||r===K||r===X,"unexpected parse state B");const d=r===G&&e[t+1].startsWith("/>")?" ":"";o+=r===q?l+R:c>=0?(i.push(s),l.slice(0,c)+T+l.slice(c)+I+d):l+I+(-2===c?t:d)}return[re(e,o+(e[l]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]})(e,t);if(this.el=se.createElement(n,l),ae.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=ae.nextNode())&&s.length<r;){if(1===i.nodeType){{const e=i.localName;if(/^(?:textarea|template)$/i.test(e)&&i.innerHTML.includes(I)){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);H("",t)}}if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(T)){const t=c[o++],l=i.getAttribute(e).split(I),r=/([.?@])?(.*)/.exec(t);s.push({type:1,index:a,name:r[2],strings:l,ctor:"."===r[1]?ve:"?"===r[1]?ge:"@"===r[1]?pe:de}),i.removeAttribute(e)}else e.startsWith(I)&&(s.push({type:6,index:a}),i.removeAttribute(e));if(Y.test(i.tagName)){const e=i.textContent.split(I),t=e.length-1;if(t>0){i.textContent=S?S.emptyScript:"";for(let l=0;l<t;l++)i.append(e[l],O()),ae.nextNode(),s.push({type:2,index:++a});i.append(e[t],O())}}}else if(8===i.nodeType){if(i.data===N)s.push({type:2,index:a});else{let e=-1;for(;-1!==(e=i.data.indexOf(I,e+1));)s.push({type:7,index:a}),e+=I.length-1}}a++}if(c.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("${...}")+"`");V&&V({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const l=U.createElement("template");return l.innerHTML=e,l}}function ne(e,t,l=e,i){if(t===te)return t;let a=void 0!==i?l.__directives?.[i]:l.__directive;const o=D(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,l,i)),void 0!==i?(l.__directives??=[])[i]=a:l.__directive=a),void 0!==a&&(t=ne(e,a._$resolve(e,t.values),a,i)),t}class ce{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:l}=this._$template,i=(e?.creationScope??U).importNode(t,!0);ae.currentNode=i;let a=ae.nextNode(),o=0,r=0,s=l[0];for(;void 0!==s;){if(o===s.index){let t;2===s.type?t=new he(a,a.nextSibling,this,e):1===s.type?t=new s.ctor(a,s.name,s.strings,this,e):6===s.type&&(t=new ue(a,this,e)),this._$parts.push(t),s=l[++r]}o!==s?.index&&(a=ae.nextNode(),o++)}return ae.currentNode=U,i}_update(e){let t=0;for(const l of this._$parts)void 0!==l&&(V&&V({kind:"set part",part:l,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==l.strings?(l._$setValue(e,l,t),t+=l.strings.length-2):l._$setValue(e[t])),t++}}class he{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,l,i){this.type=2,this._$committedValue=le,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=l,this.options=i,this.__isConnected=i?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=B(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=ne(this,e,t),D(e))e===le||null==e||""===e?(this._$committedValue!==le&&(V&&V({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=le):e!==this._$committedValue&&e!==te&&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(e=>F(e)||"function"==typeof e?.[Symbol.iterator])(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return B(B(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),oe!==A){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)}}V&&V({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==le&&D(this._$committedValue)){const t=B(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=z(t,"data","property")),e=this._textSanitizer(e),V&&V({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=U.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=z(t,"data","property")),e=this._textSanitizer(e),V&&V({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){const{values:t,_$litType$:l}=e,i="number"==typeof l?this._$getTemplate(e):(void 0===l.el&&(l.el=se.createElement(re(l.h,l.h[0]),this.options)),l);if(this._$committedValue?._$template===i)V&&V({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 ce(i,this),l=e._clone(this.options);V&&V({kind:"template instantiated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:l,values:t}),e._update(t),V&&V({kind:"template instantiated and updated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:l,values:t}),this._commitNode(l),this._$committedValue=e}}_$getTemplate(e){let t=ie.get(e.strings);return void 0===t&&ie.set(e.strings,t=new se(e)),t}_commitIterable(e){F(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let l,i=0;for(const a of e)i===t.length?t.push(l=new he(this._insert(O()),this._insert(O()),this,this.options)):l=t[i],l._$setValue(a),i++;i<t.length&&(this._$clear(l&&B(l._$endNode).nextSibling,i),t.length=i)}_$clear(e=B(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e!==this._$endNode;){const t=B(e).nextSibling;B(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 de{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,l,i,a){this.type=1,this._$committedValue=le,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=i,this.options=a,l.length>2||""!==l[0]||""!==l[1]?(this._$committedValue=new Array(l.length-1).fill(new String),this.strings=l):this._$committedValue=le,this._sanitizer=void 0}_$setValue(e,t=this,l,i){const a=this.strings;let o=!1;if(void 0===a)e=ne(this,e,t,0),o=!D(e)||e!==this._$committedValue&&e!==te,o&&(this._$committedValue=e);else{const i=e;let r,s;for(e=a[0],r=0;r<a.length-1;r++)s=ne(this,i[l+r],t,r),s===te&&(s=this._$committedValue[r]),o||=!D(s)||s!==this._$committedValue[r],s===le?e=le:e!==le&&(e+=(s??"")+a[r+1]),this._$committedValue[r]=s}o&&!i&&this._commitValue(e)}_commitValue(e){e===le?B(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=oe(this.element,this.name,"attribute")),e=this._sanitizer(e??""),V&&V({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),B(this.element).setAttribute(this.name,e??""))}}class ve extends de{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=oe(this.element,this.name,"property")),e=this._sanitizer(e),V&&V({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===le?void 0:e}}class ge extends de{constructor(){super(...arguments),this.type=4}_commitValue(e){V&&V({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===le),options:this.options}),B(this.element).toggleAttribute(this.name,!!e&&e!==le)}}class pe extends de{constructor(e,t,l,i,a){if(super(e,t,l,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=ne(this,e,t,0)??le)===te)return;const l=this._$committedValue,i=e===le&&l!==le||e.capture!==l.capture||e.once!==l.once||e.passive!==l.passive,a=e!==le&&(l===le||i);V&&V({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:i,addListener:a,oldListener:l}),i&&this.element.removeEventListener(this.name,this,l),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 ue{constructor(e,t,l){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=l}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){V&&V({kind:"commit to element binding",element:this.element,value:e,options:this.options}),ne(this,e)}}const we=y.litHtmlPolyfillSupportDevMode;we?.(se,he),(y.litHtmlVersions??=[]).push("3.3.2"),y.litHtmlVersions.length>1&&queueMicrotask(()=>{H("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const fe=(e,t,l)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const i=$++,a=l?.renderBefore??t;let o=a._$litPart$;if(V&&V({kind:"begin render",id:i,value:e,container:t,options:l,part:o}),void 0===o){const e=l?.renderBefore??null;a._$litPart$=o=new he(t.insertBefore(O(),e),e,void 0,l??{})}return o._$setValue(e),V&&V({kind:"end render",id:i,value:e,container:t,options:l,part:o}),o};fe.setSanitizer=E,fe.createSanitizer=z,fe._testOnlyClearSanitizerFactoryDoNotCallOrElse=P;
13
+ const y=globalThis,V=e=>{y.emitLitDebugLogEvents&&y.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let H,$=0;y.litIssuedWarnings??=new Set,H=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",y.litIssuedWarnings.has(t)||y.litIssuedWarnings.has(e)||(console.warn(t),y.litIssuedWarnings.add(t))},queueMicrotask(()=>{H("dev-mode","Lit is in dev mode. Not recommended for production!")});const S=y.ShadyDOM?.inUse&&!0===y.ShadyDOM?.noPatch?y.ShadyDOM.wrap:e=>e,B=y.trustedTypes,k=B?B.createPolicy("lit-html",{createHTML:e=>e}):void 0,L=e=>e,A=(e,t,l)=>L,E=e=>{if(oe!==A)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");oe=e},P=()=>{oe=A},z=(e,t,l)=>oe(e,t,l),T="$lit$",I=`lit$${Math.random().toFixed(9).slice(2)}$`,N="?"+I,R=`<${N}>`,U=document,O=()=>U.createComment(""),D=e=>null===e||"object"!=typeof e&&"function"!=typeof e,F=Array.isArray,W="[ \t\n\f\r]",q=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,j=/-->/g,J=/>/g,G=new RegExp(`>|${W}(?:([^\\s"'>=/]+)(${W}*=${W}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),K=/'/g,X=/"/g,Y=/^(?:script|style|textarea|title)$/i,Q=(ee=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$)&&H("","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$:ee,strings:e,values:t}));var ee;const te=Symbol.for("lit-noChange"),le=Symbol.for("lit-nothing"),ie=new WeakMap,ae=U.createTreeWalker(U,129);let oe=A;function re(e,t){if(!F(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!==k?k.createHTML(t):t}class se{constructor({strings:e,_$litType$:t},l){let i;this.parts=[];let a=0,o=0;const r=e.length-1,s=this.parts,[n,c]=((e,t)=>{const l=e.length-1,i=[];let a,o=2===t?"<svg>":3===t?"<math>":"",r=q;for(let t=0;t<l;t++){const l=e[t];let s,n,c=-1,h=0;for(;h<l.length&&(r.lastIndex=h,n=r.exec(l),null!==n);)if(h=r.lastIndex,r===q){if("!--"===n[1])r=j;else if(void 0!==n[1])r=J;else if(void 0!==n[2])Y.test(n[2])&&(a=new RegExp(`</${n[2]}`,"g")),r=G;else if(void 0!==n[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 r===G?">"===n[0]?(r=a??q,c=-1):void 0===n[1]?c=-2:(c=r.lastIndex-n[2].length,s=n[1],r=void 0===n[3]?G:'"'===n[3]?X:K):r===X||r===K?r=G:r===j||r===J?r=q:(r=G,a=void 0);console.assert(-1===c||r===G||r===K||r===X,"unexpected parse state B");const d=r===G&&e[t+1].startsWith("/>")?" ":"";o+=r===q?l+R:c>=0?(i.push(s),l.slice(0,c)+T+l.slice(c)+I+d):l+I+(-2===c?t:d)}return[re(e,o+(e[l]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]})(e,t);if(this.el=se.createElement(n,l),ae.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=ae.nextNode())&&s.length<r;){if(1===i.nodeType){{const e=i.localName;if(/^(?:textarea|template)$/i.test(e)&&i.innerHTML.includes(I)){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);H("",t)}}if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(T)){const t=c[o++],l=i.getAttribute(e).split(I),r=/([.?@])?(.*)/.exec(t);s.push({type:1,index:a,name:r[2],strings:l,ctor:"."===r[1]?ve:"?"===r[1]?ge:"@"===r[1]?pe:de}),i.removeAttribute(e)}else e.startsWith(I)&&(s.push({type:6,index:a}),i.removeAttribute(e));if(Y.test(i.tagName)){const e=i.textContent.split(I),t=e.length-1;if(t>0){i.textContent=B?B.emptyScript:"";for(let l=0;l<t;l++)i.append(e[l],O()),ae.nextNode(),s.push({type:2,index:++a});i.append(e[t],O())}}}else if(8===i.nodeType){if(i.data===N)s.push({type:2,index:a});else{let e=-1;for(;-1!==(e=i.data.indexOf(I,e+1));)s.push({type:7,index:a}),e+=I.length-1}}a++}if(c.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("${...}")+"`");V&&V({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const l=U.createElement("template");return l.innerHTML=e,l}}function ne(e,t,l=e,i){if(t===te)return t;let a=void 0!==i?l.__directives?.[i]:l.__directive;const o=D(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,l,i)),void 0!==i?(l.__directives??=[])[i]=a:l.__directive=a),void 0!==a&&(t=ne(e,a._$resolve(e,t.values),a,i)),t}class ce{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:l}=this._$template,i=(e?.creationScope??U).importNode(t,!0);ae.currentNode=i;let a=ae.nextNode(),o=0,r=0,s=l[0];for(;void 0!==s;){if(o===s.index){let t;2===s.type?t=new he(a,a.nextSibling,this,e):1===s.type?t=new s.ctor(a,s.name,s.strings,this,e):6===s.type&&(t=new ue(a,this,e)),this._$parts.push(t),s=l[++r]}o!==s?.index&&(a=ae.nextNode(),o++)}return ae.currentNode=U,i}_update(e){let t=0;for(const l of this._$parts)void 0!==l&&(V&&V({kind:"set part",part:l,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==l.strings?(l._$setValue(e,l,t),t+=l.strings.length-2):l._$setValue(e[t])),t++}}class he{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,l,i){this.type=2,this._$committedValue=le,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=l,this.options=i,this.__isConnected=i?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=S(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=ne(this,e,t),D(e))e===le||null==e||""===e?(this._$committedValue!==le&&(V&&V({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=le):e!==this._$committedValue&&e!==te&&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(e=>F(e)||"function"==typeof e?.[Symbol.iterator])(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return S(S(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),oe!==A){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)}}V&&V({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==le&&D(this._$committedValue)){const t=S(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=z(t,"data","property")),e=this._textSanitizer(e),V&&V({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=U.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=z(t,"data","property")),e=this._textSanitizer(e),V&&V({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){const{values:t,_$litType$:l}=e,i="number"==typeof l?this._$getTemplate(e):(void 0===l.el&&(l.el=se.createElement(re(l.h,l.h[0]),this.options)),l);if(this._$committedValue?._$template===i)V&&V({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 ce(i,this),l=e._clone(this.options);V&&V({kind:"template instantiated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:l,values:t}),e._update(t),V&&V({kind:"template instantiated and updated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:l,values:t}),this._commitNode(l),this._$committedValue=e}}_$getTemplate(e){let t=ie.get(e.strings);return void 0===t&&ie.set(e.strings,t=new se(e)),t}_commitIterable(e){F(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let l,i=0;for(const a of e)i===t.length?t.push(l=new he(this._insert(O()),this._insert(O()),this,this.options)):l=t[i],l._$setValue(a),i++;i<t.length&&(this._$clear(l&&S(l._$endNode).nextSibling,i),t.length=i)}_$clear(e=S(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e!==this._$endNode;){const t=S(e).nextSibling;S(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 de{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,l,i,a){this.type=1,this._$committedValue=le,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=i,this.options=a,l.length>2||""!==l[0]||""!==l[1]?(this._$committedValue=new Array(l.length-1).fill(new String),this.strings=l):this._$committedValue=le,this._sanitizer=void 0}_$setValue(e,t=this,l,i){const a=this.strings;let o=!1;if(void 0===a)e=ne(this,e,t,0),o=!D(e)||e!==this._$committedValue&&e!==te,o&&(this._$committedValue=e);else{const i=e;let r,s;for(e=a[0],r=0;r<a.length-1;r++)s=ne(this,i[l+r],t,r),s===te&&(s=this._$committedValue[r]),o||=!D(s)||s!==this._$committedValue[r],s===le?e=le:e!==le&&(e+=(s??"")+a[r+1]),this._$committedValue[r]=s}o&&!i&&this._commitValue(e)}_commitValue(e){e===le?S(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=oe(this.element,this.name,"attribute")),e=this._sanitizer(e??""),V&&V({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),S(this.element).setAttribute(this.name,e??""))}}class ve extends de{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=oe(this.element,this.name,"property")),e=this._sanitizer(e),V&&V({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===le?void 0:e}}class ge extends de{constructor(){super(...arguments),this.type=4}_commitValue(e){V&&V({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===le),options:this.options}),S(this.element).toggleAttribute(this.name,!!e&&e!==le)}}class pe extends de{constructor(e,t,l,i,a){if(super(e,t,l,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=ne(this,e,t,0)??le)===te)return;const l=this._$committedValue,i=e===le&&l!==le||e.capture!==l.capture||e.once!==l.once||e.passive!==l.passive,a=e!==le&&(l===le||i);V&&V({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:i,addListener:a,oldListener:l}),i&&this.element.removeEventListener(this.name,this,l),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 ue{constructor(e,t,l){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=l}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){V&&V({kind:"commit to element binding",element:this.element,value:e,options:this.options}),ne(this,e)}}const we=y.litHtmlPolyfillSupportDevMode;we?.(se,he),(y.litHtmlVersions??=[]).push("3.3.2"),y.litHtmlVersions.length>1&&queueMicrotask(()=>{H("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const fe=(e,t,l)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const i=$++,a=l?.renderBefore??t;let o=a._$litPart$;if(V&&V({kind:"begin render",id:i,value:e,container:t,options:l,part:o}),void 0===o){const e=l?.renderBefore??null;a._$litPart$=o=new he(t.insertBefore(O(),e),e,void 0,l??{})}return o._$setValue(e),V&&V({kind:"end render",id:i,value:e,container:t,options:l,part:o}),o};fe.setSanitizer=E,fe.createSanitizer=z,fe._testOnlyClearSanitizerFactoryDoNotCallOrElse=P;
14
14
  /**
15
15
  * @license
16
16
  * Copyright 2017 Google LLC
@@ -44,12 +44,12 @@ const He=(e,t,l)=>(l.configurable=!0,l.enumerable=!0,Reflect.decorate&&"object"!
44
44
  * Copyright 2017 Google LLC
45
45
  * SPDX-License-Identifier: BSD-3-Clause
46
46
  */
47
- function Be(e){return(t,l)=>He(t,l,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(e)??null}})}
47
+ function Se(e){return(t,l)=>He(t,l,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(e)??null}})}
48
48
  /**
49
49
  * @license
50
50
  * Copyright 2020 Google LLC
51
51
  * SPDX-License-Identifier: BSD-3-Clause
52
- */globalThis.litIssuedWarnings??=new Set,$e=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",globalThis.litIssuedWarnings.has(t)||globalThis.litIssuedWarnings.has(e)||(console.warn(t),globalThis.litIssuedWarnings.add(t))},window.ShadyDOM?.inUse&&!0===window.ShadyDOM?.noPatch&&window.ShadyDOM.wrap;const Se=1,ke=2,Le=e=>(...t)=>({_$litDirective$:e,values:t});
52
+ */globalThis.litIssuedWarnings??=new Set,$e=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",globalThis.litIssuedWarnings.has(t)||globalThis.litIssuedWarnings.has(e)||(console.warn(t),globalThis.litIssuedWarnings.add(t))},window.ShadyDOM?.inUse&&!0===window.ShadyDOM?.noPatch&&window.ShadyDOM.wrap;const Be=1,ke=2,Le=e=>(...t)=>({_$litDirective$:e,values:t});
53
53
  /**
54
54
  * @license
55
55
  * Copyright 2017 Google LLC
@@ -74,7 +74,7 @@ function Be(e){return(t,l)=>He(t,l,{async get(){return await this.updateComplete
74
74
  * Copyright 2018 Google LLC
75
75
  * SPDX-License-Identifier: BSD-3-Clause
76
76
  */
77
- class extends Ae{constructor(e){if(super(e),e.type!==Se||"class"!==e.name||e.strings?.length>2)throw new Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){if(void 0===this._previousClasses){this._previousClasses=new Set,void 0!==e.strings&&(this._staticClasses=new Set(e.strings.join(" ").split(/\s/).filter(e=>""!==e)));for(const e in t)t[e]&&!this._staticClasses?.has(e)&&this._previousClasses.add(e);return this.render(t)}const l=e.element.classList;for(const e of this._previousClasses)e in t||(l.remove(e),this._previousClasses.delete(e));for(const e in t){const i=!!t[e];i===this._previousClasses.has(e)||this._staticClasses?.has(e)||(i?(l.add(e),this._previousClasses.add(e)):(l.remove(e),this._previousClasses.delete(e)))}return te}}),Ke=e=>e??le,Xe=Symbol.for(""),Ye=e=>{if(e?.r===Xe)return e?._$litStatic$},Qe=(e,...t)=>({_$litStatic$:t.reduce((t,l,i)=>t+(e=>{if(void 0!==e._$litStatic$)return e._$litStatic$;throw new Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(l)+e[i+1],e[0]),r:Xe}),et=new Map,tt=(lt=Q,(e,...t)=>{const l=t.length;let i,a;const o=[],r=[];let s,n=0,c=!1;for(;n<l;){for(s=e[n];n<l&&void 0!==(a=t[n],i=Ye(a));)s+=i+e[++n],c=!0;n!==l&&r.push(a),o.push(s),n++}if(n===l&&o.push(e[l]),c){const l=o.join("$$lit$$");void 0===(e=et.get(l))&&(o.raw=o,et.set(l,e=o)),t=r}return lt(e,...t)});
77
+ class extends Ae{constructor(e){if(super(e),e.type!==Be||"class"!==e.name||e.strings?.length>2)throw new Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){if(void 0===this._previousClasses){this._previousClasses=new Set,void 0!==e.strings&&(this._staticClasses=new Set(e.strings.join(" ").split(/\s/).filter(e=>""!==e)));for(const e in t)t[e]&&!this._staticClasses?.has(e)&&this._previousClasses.add(e);return this.render(t)}const l=e.element.classList;for(const e of this._previousClasses)e in t||(l.remove(e),this._previousClasses.delete(e));for(const e in t){const i=!!t[e];i===this._previousClasses.has(e)||this._staticClasses?.has(e)||(i?(l.add(e),this._previousClasses.add(e)):(l.remove(e),this._previousClasses.delete(e)))}return te}}),Ke=e=>e??le,Xe=Symbol.for(""),Ye=e=>{if(e?.r===Xe)return e?._$litStatic$},Qe=(e,...t)=>({_$litStatic$:t.reduce((t,l,i)=>t+(e=>{if(void 0!==e._$litStatic$)return e._$litStatic$;throw new Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(l)+e[i+1],e[0]),r:Xe}),et=new Map,tt=(lt=Q,(e,...t)=>{const l=t.length;let i,a;const o=[],r=[];let s,n=0,c=!1;for(;n<l;){for(s=e[n];n<l&&void 0!==(a=t[n],i=Ye(a));)s+=i+e[++n],c=!0;n!==l&&r.push(a),o.push(s),n++}if(n===l&&o.push(e[l]),c){const l=o.join("$$lit$$");void 0===(e=et.get(l))&&(o.raw=o,et.set(l,e=o)),t=r}return lt(e,...t)});
78
78
  /**
79
79
  * @license
80
80
  * Copyright 2018 Google LLC
@@ -105,7 +105,7 @@ class extends Ae{constructor(e){if(super(e),e.type!==Se||"class"!==e.name||e.str
105
105
  <slot name="rightIcon"></slot>`}
106
106
 
107
107
  </${t}>
108
- `}}dt.styles=[...rt.styles,ct,ht],e([Ve({type:String,reflect:!0})],dt.prototype,"type",void 0),e([Ve({type:String,reflect:!0})],dt.prototype,"form",void 0),e([Ve({type:String,reflect:!0,attribute:"formaction"})],dt.prototype,"formAction",void 0),e([Ve({type:String,reflect:!0,attribute:"formmethod"})],dt.prototype,"formMethod",void 0),e([Ve({attribute:"formnovalidate",type:Boolean,reflect:!0})],dt.prototype,"formNoValidate",void 0),e([Ve({type:String,reflect:!0,attribute:"formtarget"})],dt.prototype,"formTarget",void 0),e([Ve({type:Boolean,reflect:!0})],dt.prototype,"fullWidth",void 0),e([Ve({type:Boolean})],dt.prototype,"hasLeftIconSlot",void 0),e([Ve({type:Boolean})],dt.prototype,"hasRightIconSlot",void 0);var vt=r`.file-upload{display:flex;flex-direction:column;gap:var(--sgds-form-gap-2-xl)}.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}.file-upload-list-item{align-items:center;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) var(--sgds-form-padding-x)}.file-upload-list-item span:not(:first-of-type){cursor:pointer}ul{margin:0;padding:0}input{display:none}label,sgds-button{cursor:pointer}sgds-close-button{margin-left:auto}sgds-icon.valid{color:var(--sgds-form-success-color-default)}sgds-icon.invalid{color:var(--sgds-color-muted)}`,gt=r`.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-14);font-weight:var(--sgds-font-weight-regular)}.valid-icon{color:var(--sgds-form-success-color-default)}`,pt=r`.form-text{color:var(--sgds-form-color-subtle);font-size:var(--sgds-font-size-14);line-height:var(--sgds-line-height-20)}.form-text.disabled{opacity:var(--sgds-opacity-50)}`,ut=r`.form-label{color:var(--sgds-form-color-default);margin-bottom:0}.form-label.disabled{opacity:var(--sgds-opacity-50)}.form-check-label{color:var(--sgds-form-color-default)}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:not-allowed}`,wt=r`.form-control::placeholder{color:var(--sgds-form-color-subtle);font-family:var(--sgds-font-family-brand);font-weight:var(--sgds-font-weight-light);line-height:var(--sgds-line-height-24)}`;function ft(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}class mt extends We{constructor(){super(...arguments),this.label="",this.hintText="",this.disabled=!1,this.invalid=!1,this._controlId=ft("input"),this._labelId=ft("label")}setInvalid(e){this.invalid=e,e?this.emit("sgds-invalid"):this.emit("sgds-valid")}}mt.styles=[...We.styles,gt,pt,ut,wt],e([Ve({reflect:!0})],mt.prototype,"label",void 0),e([Ve({reflect:!0})],mt.prototype,"hintText",void 0),e([Ve({reflect:!0})],mt.prototype,"name",void 0),e([Ve({type:Boolean,reflect:!0})],mt.prototype,"disabled",void 0),e([Ve({type:Boolean,reflect:!0})],mt.prototype,"invalid",void 0);class Zt{constructor(e,t){(this.host=e).addController(this),this._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,l){return this._internals.setValidity(e,t,l)}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 l in t)t[l]&&(this.validationError=l.toString(),this._internals.setValidity({[this.validationError]:!0},e.validationMessage,e))}}const Ct=t=>{class l extends t{constructor(){super(...arguments),this._isTouched=!1}connectedCallback(){var e;super.connectedCallback(),this._mixinShouldSkipSgdsValidation()||null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new Zt(this))}async firstUpdated(e){super.firstUpdated(e),this.input=this.shadowRoot.querySelector("input")||await this.sgdsInput||this.shadowRoot.querySelector("textarea")||await this.sgdsDatepickerInput,this._mixinShouldSkipSgdsValidation()||(this._mixinSetFormValue(),this._mixinValidate(this.input))}formResetCallback(){this._mixinResetFormControl?this._mixinResetFormControl():(this.value=this.defaultValue,this._mixinResetValidity(this.input)),this._mixinSetFormValue()}_mixinHandleChange(e){this._mixinSetFormValue(),this.inputValidationController.handleChange(e)}_mixinHandleInputChange(e){this._mixinSetFormValue(),this.inputValidationController.handleInput(e)}_mixinResetValidity(e){this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this.inputValidationController.validateInput(e),this._isTouched&&(this._isTouched=!1)}_mixinValidate(e){this.inputValidationController.validateInput(e)}_mixinSetFormValue(){this.inputValidationController.setFormValue()}_mixinCheckValidity(){return this.inputValidationController.checkValidity()}_mixinReportValidity(){return this.inputValidationController.reportValidity()}_mixinGetValidity(){return this.inputValidationController.validity}_mixinGetValidationMessage(){return this.inputValidationController.validationMessage}_mixinSetValidity(e,t,l){return this.inputValidationController.setValidity(e,t,l)}_mixinShouldSkipSgdsValidation(){const e=this.closest("form");return(null==e?void 0:e.noValidate)||this.noValidate}}return l.formAssociated=!0,e([Be("sgds-input")],l.prototype,"sgdsInput",void 0),e([Be("sgds-datepicker-input")],l.prototype,"sgdsDatepickerInput",void 0),l};var xt=Q`
108
+ `}}dt.styles=[...rt.styles,ct,ht],e([Ve({type:String,reflect:!0})],dt.prototype,"type",void 0),e([Ve({type:String,reflect:!0})],dt.prototype,"form",void 0),e([Ve({type:String,reflect:!0,attribute:"formaction"})],dt.prototype,"formAction",void 0),e([Ve({type:String,reflect:!0,attribute:"formmethod"})],dt.prototype,"formMethod",void 0),e([Ve({attribute:"formnovalidate",type:Boolean,reflect:!0})],dt.prototype,"formNoValidate",void 0),e([Ve({type:String,reflect:!0,attribute:"formtarget"})],dt.prototype,"formTarget",void 0),e([Ve({type:Boolean,reflect:!0})],dt.prototype,"fullWidth",void 0),e([Ve({type:Boolean})],dt.prototype,"hasLeftIconSlot",void 0),e([Ve({type:Boolean})],dt.prototype,"hasRightIconSlot",void 0);var vt=r`.file-upload{display:flex;flex-direction:column;gap:var(--sgds-form-gap-2-xl)}.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}.file-upload-list-item{align-items:center;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) var(--sgds-form-padding-x)}.file-upload-list-item span:not(:first-of-type){cursor:pointer}ul{margin:0;padding:0}input{display:none}label,sgds-button{cursor:pointer}sgds-close-button{margin-left:auto}sgds-icon.valid{color:var(--sgds-form-success-color-default)}sgds-icon.invalid{color:var(--sgds-color-muted)}`,gt=r`.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-14);font-weight:var(--sgds-font-weight-regular)}.valid-icon{color:var(--sgds-form-success-color-default)}`,pt=r`.form-text{color:var(--sgds-form-color-subtle);font-size:var(--sgds-font-size-14);line-height:var(--sgds-line-height-20)}.form-text.disabled{opacity:var(--sgds-opacity-50)}`,ut=r`.form-label{color:var(--sgds-form-color-default);margin-bottom:0}.form-label.disabled{opacity:var(--sgds-opacity-50)}.form-check-label{color:var(--sgds-form-color-default)}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:not-allowed}`,wt=r`.form-control::placeholder{color:var(--sgds-form-color-subtle);font-family:var(--sgds-font-family-brand);font-weight:var(--sgds-font-weight-light);line-height:var(--sgds-line-height-24)}`;function ft(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}class mt extends We{constructor(){super(...arguments),this.label="",this.hintText="",this.disabled=!1,this.invalid=!1,this._controlId=ft("input"),this._labelId=ft("label")}setInvalid(e){this.invalid=e,e?this.emit("sgds-invalid"):this.emit("sgds-valid")}}mt.styles=[...We.styles,gt,pt,ut,wt],e([Ve({reflect:!0})],mt.prototype,"label",void 0),e([Ve({reflect:!0})],mt.prototype,"hintText",void 0),e([Ve({reflect:!0})],mt.prototype,"name",void 0),e([Ve({type:Boolean,reflect:!0})],mt.prototype,"disabled",void 0),e([Ve({type:Boolean,reflect:!0})],mt.prototype,"invalid",void 0);class Zt{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,l){return this._internals.setValidity(e,t,l)}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 l in t)t[l]&&(this.validationError=l.toString(),this._internals.setValidity({[this.validationError]:!0},e.validationMessage,e))}}const Ct=t=>{class l extends t{constructor(...e){super(...e),this._isTouched=!1,this._internals=this.attachInternals()}connectedCallback(){var e;super.connectedCallback(),this._mixinShouldSkipSgdsValidation()||null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new Zt(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._mixinShouldSkipSgdsValidation()||(this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this.inputValidationController.validateInput(e),this._isTouched&&(this._isTouched=!1))}_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,l){if(!this._mixinShouldSkipSgdsValidation())return this.inputValidationController.setValidity(e,t,l)}_mixinShouldSkipSgdsValidation(){const e=this.closest("form");return(null==e?void 0:e.noValidate)||this.noValidate}}return l.formAssociated=!0,e([Se("sgds-input")],l.prototype,"sgdsInput",void 0),e([Se("sgds-datepicker-input")],l.prototype,"sgdsDatepickerInput",void 0),l};var xt=Q`
109
109
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
110
110
  <path
111
111
  fill="currentColor"
@@ -179,7 +179,7 @@ class extends Ae{constructor(e){if(super(e),e.type!==Se||"class"!==e.name||e.str
179
179
  clip-rule="evenodd"
180
180
  />
181
181
  </svg>
182
- `,Bt=Q`
182
+ `,St=Q`
183
183
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
184
184
  <path
185
185
  fill="currentColor"
@@ -192,7 +192,7 @@ class extends Ae{constructor(e){if(super(e),e.type!==Se||"class"!==e.name||e.str
192
192
  clip-rule="evenodd"
193
193
  />
194
194
  </svg>
195
- `,St=Q`
195
+ `,Bt=Q`
196
196
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
197
197
  <path
198
198
  fill="currentColor"
@@ -250,7 +250,7 @@ class extends Ae{constructor(e){if(super(e),e.type!==Se||"class"!==e.name||e.str
250
250
  clip-rule="evenodd"
251
251
  />
252
252
  </svg>
253
- `;const zt={announcement:xt,archive:bt,"arrow-bar-down":Mt,"arrow-bar-left":_t,"arrow-bar-right":yt,"arrow-bar-up":Vt,"arrow-circle-down":Ht,"arrow-circle-left":$t,"arrow-circle-right":Bt,"arrow-circle-up":St,"arrow-clockwise":kt,"arrow-down":Lt,"arrow-left":At,"arrow-repeat":Et,"arrow-right":Pt,"arrow-square-down":Q`
253
+ `;const zt={announcement:xt,archive:bt,"arrow-bar-down":Mt,"arrow-bar-left":_t,"arrow-bar-right":yt,"arrow-bar-up":Vt,"arrow-circle-down":Ht,"arrow-circle-left":$t,"arrow-circle-right":St,"arrow-circle-up":Bt,"arrow-clockwise":kt,"arrow-down":Lt,"arrow-left":At,"arrow-repeat":Et,"arrow-right":Pt,"arrow-square-down":Q`
254
254
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
255
255
  <path
256
256
  fill="currentColor"