@politiet/sheriff-web-components 2.5.0 → 2.5.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/custom-elements.json +210 -126
- package/dist/mixins/sds-event-dispatcher-mixin.d.ts +2 -1
- package/dist/mixins/sds-event-dispatcher-mixin.d.ts.map +1 -1
- package/dist/mixins/sds-event-dispatcher-mixin.js +58 -1
- package/dist/mixins/sds-event-dispatcher-mixin.js.map +1 -1
- package/dist/react-wrappers/SDSTextFieldWrapper.d.ts +2 -0
- package/dist/react-wrappers/SDSTextFieldWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSTextFieldWrapper.js +1 -0
- package/dist/react-wrappers/SDSTextFieldWrapper.js.map +1 -1
- package/dist/sds-alert/sds-alert.component.d.ts +2 -1
- package/dist/sds-alert/sds-alert.component.d.ts.map +1 -1
- package/dist/sds-alert/sds-alert.component.js +3 -5
- package/dist/sds-alert/sds-alert.component.js.map +1 -1
- package/dist/sds-button/sds-button.component.d.ts +2 -1
- package/dist/sds-button/sds-button.component.d.ts.map +1 -1
- package/dist/sds-button/sds-button.component.js +5 -17
- package/dist/sds-button/sds-button.component.js.map +1 -1
- package/dist/sds-checkbox/sds-checkbox.d.ts +2 -1
- package/dist/sds-checkbox/sds-checkbox.d.ts.map +1 -1
- package/dist/sds-checkbox/sds-checkbox.js +5 -4
- package/dist/sds-checkbox/sds-checkbox.js.map +1 -1
- package/dist/sds-checkbox-group/sds-checkbox-group.d.ts +2 -1
- package/dist/sds-checkbox-group/sds-checkbox-group.d.ts.map +1 -1
- package/dist/sds-checkbox-group/sds-checkbox-group.js +3 -5
- package/dist/sds-checkbox-group/sds-checkbox-group.js.map +1 -1
- package/dist/sds-chip/sds-chip.d.ts +2 -1
- package/dist/sds-chip/sds-chip.d.ts.map +1 -1
- package/dist/sds-chip/sds-chip.js +4 -9
- package/dist/sds-chip/sds-chip.js.map +1 -1
- package/dist/sds-details/sds-details.d.ts +3 -1
- package/dist/sds-details/sds-details.d.ts.map +1 -1
- package/dist/sds-details/sds-details.js +3 -6
- package/dist/sds-details/sds-details.js.map +1 -1
- package/dist/sds-dialog/sds-dialog.d.ts +2 -1
- package/dist/sds-dialog/sds-dialog.d.ts.map +1 -1
- package/dist/sds-dialog/sds-dialog.js +3 -5
- package/dist/sds-dialog/sds-dialog.js.map +1 -1
- package/dist/sds-icon/sds-icon.styles.d.ts.map +1 -1
- package/dist/sds-icon/sds-icon.styles.js +2 -1
- package/dist/sds-icon/sds-icon.styles.js.map +1 -1
- package/dist/sds-notification/sds-notification.d.ts +2 -1
- package/dist/sds-notification/sds-notification.d.ts.map +1 -1
- package/dist/sds-notification/sds-notification.js +3 -5
- package/dist/sds-notification/sds-notification.js.map +1 -1
- package/dist/sds-radio/sds-radio.d.ts +2 -1
- package/dist/sds-radio/sds-radio.d.ts.map +1 -1
- package/dist/sds-radio/sds-radio.js +5 -4
- package/dist/sds-radio/sds-radio.js.map +1 -1
- package/dist/sds-radio-group/sds-radio-group.d.ts +2 -1
- package/dist/sds-radio-group/sds-radio-group.d.ts.map +1 -1
- package/dist/sds-radio-group/sds-radio-group.js +3 -2
- package/dist/sds-radio-group/sds-radio-group.js.map +1 -1
- package/dist/sds-select/sds-select.d.ts +2 -1
- package/dist/sds-select/sds-select.d.ts.map +1 -1
- package/dist/sds-select/sds-select.js +6 -5
- package/dist/sds-select/sds-select.js.map +1 -1
- package/dist/sds-switch/sds-switch.d.ts +2 -1
- package/dist/sds-switch/sds-switch.d.ts.map +1 -1
- package/dist/sds-switch/sds-switch.js +5 -13
- package/dist/sds-switch/sds-switch.js.map +1 -1
- package/dist/sds-textarea/sds-textarea.d.ts +3 -1
- package/dist/sds-textarea/sds-textarea.d.ts.map +1 -1
- package/dist/sds-textarea/sds-textarea.js +15 -5
- package/dist/sds-textarea/sds-textarea.js.map +1 -1
- package/dist/sds-textfield/sds-textfield.d.ts +3 -1
- package/dist/sds-textfield/sds-textfield.d.ts.map +1 -1
- package/dist/sds-textfield/sds-textfield.js +28 -16
- package/dist/sds-textfield/sds-textfield.js.map +1 -1
- package/dist/sheriff-web-components.js +86 -85
- package/package.json +25 -25
- package/web-types.json +30 -148
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=/* @__PURE__ */Symbol(),r=/* @__PURE__ */new WeakMap;let a=class{constructor(t,s,e){if(this._$cssResult$=!0,e!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=s}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=r.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&r.set(s,t))}return t}toString(){return this.cssText}};const i=(t,...s)=>{const e=1===t.length?t[0]:s.reduce((s,e,o)=>s+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(e)+t[o+1],t[0]);return new a(e,t,o)},d=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let s="";for(const e of t.cssRules)s+=e.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,o))(s)})(t):t,{is:n,defineProperty:l,getOwnPropertyDescriptor:c,getOwnPropertyNames:h,getOwnPropertySymbols:p,getPrototypeOf:g}=Object,v=globalThis,u=v.trustedTypes,f=u?u.emptyScript:"",b=v.reactiveElementPolyfillSupport,_=(t,s)=>t,m={toAttribute(t,s){switch(s){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let e=t;switch(s){case Boolean:e=null!==t;break;case Number:e=null===t?null:Number(t);break;case Object:case Array:try{e=JSON.parse(t)}catch(o){e=null}}return e}},x=(t,s)=>!n(t,s),y={attribute:!0,type:String,converter:m,reflect:!1,useDefault:!1,hasChanged:x};Symbol.metadata??=/* @__PURE__ */Symbol("metadata"),v.litPropertyMetadata??=/* @__PURE__ */new WeakMap;let w=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const e=/* @__PURE__ */Symbol(),o=this.getPropertyDescriptor(t,e,s);void 0!==o&&l(this.prototype,t,o)}}static getPropertyDescriptor(t,s,e){const{get:o,set:r}=c(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:o,set(s){const a=o?.call(this);r?.call(this,s),this.requestUpdate(t,a,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(_("elementProperties")))return;const t=g(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(_("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(_("properties"))){const t=this.properties,s=[...h(t),...p(t)];for(const e of s)this.createProperty(e,t[e])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,e]of s)this.elementProperties.set(t,e)}this._$Eh=/* @__PURE__ */new Map;for(const[s,e]of this.elementProperties){const t=this._$Eu(s,e);void 0!==t&&this._$Eh.set(t,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const s=[];if(Array.isArray(t)){const e=new Set(t.flat(1/0).reverse());for(const t of e)s.unshift(d(t))}else void 0!==t&&s.push(d(t));return s}static _$Eu(t,s){const e=s.attribute;return!1===e?void 0:"string"==typeof e?e:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=/* @__PURE__ */new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=/* @__PURE__ */new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=/* @__PURE__ */new Map,s=this.constructor.elementProperties;for(const e of s.keys())this.hasOwnProperty(e)&&(t.set(e,this[e]),delete this[e]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,o)=>{if(e)t.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement("style"),r=s.litNonce;void 0!==r&&o.setAttribute("nonce",r),o.textContent=e.cssText,t.appendChild(o)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,s,e){this._$AK(t,e)}_$ET(t,s){const e=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,e);if(void 0!==o&&!0===e.reflect){const r=(void 0!==e.converter?.toAttribute?e.converter:m).toAttribute(s,e.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,s){const e=this.constructor,o=e._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=e.getPropertyOptions(o),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:m;this._$Em=o;const a=r.fromAttribute(s,t.type);this[o]=a??this._$Ej?.get(o)??a,this._$Em=null}}requestUpdate(t,s,e,o=!1,r){if(void 0!==t){const a=this.constructor;if(!1===o&&(r=this[t]),e??=a.getPropertyOptions(t),!((e.hasChanged??x)(r,s)||e.useDefault&&e.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(a._$Eu(t,e))))return;this.C(t,s,e)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:e,reflect:o,wrapped:r},a){e&&!(this._$Ej??=/* @__PURE__ */new Map).has(t)&&(this._$Ej.set(t,a??s??this[t]),!0!==r||void 0!==a)||(this._$AL.has(t)||(this.hasUpdated||e||(s=void 0),this._$AL.set(t,s)),!0===o&&this._$Em!==t&&(this._$Eq??=/* @__PURE__ */new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,e]of t){const{wrapped:t}=e,o=this[s];!0!==t||this._$AL.has(s)||void 0===o||this.C(s,void 0,e,o)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(s)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=/* @__PURE__ */new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}};w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[_("elementProperties")]=/* @__PURE__ */new Map,w[_("finalized")]=/* @__PURE__ */new Map,b?.({ReactiveElement:w}),(v.reactiveElementVersions??=[]).push("2.1.2");const k={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:x},z=(t=k,s,e)=>{const{kind:o,metadata:r}=e;let a=globalThis.litPropertyMetadata.get(r);if(void 0===a&&globalThis.litPropertyMetadata.set(r,a=/* @__PURE__ */new Map),"setter"===o&&((t=Object.create(t)).wrapped=!0),a.set(e.name,t),"accessor"===o){const{name:o}=e;return{set(e){const r=s.get.call(this);s.set.call(this,e),this.requestUpdate(o,r,t,!0,e)},init(s){return void 0!==s&&this.C(o,void 0,t,s),s}}}if("setter"===o){const{name:o}=e;return function(e){const r=this[o];s.call(this,e),this.requestUpdate(o,r,t,!0,e)}}throw Error("Unsupported decorator location: "+o)};function $(t){return(s,e)=>"object"==typeof e?z(t,s,e):((t,s,e)=>{const o=s.hasOwnProperty(e);return s.constructor.createProperty(e,t),o?Object.getOwnPropertyDescriptor(s,e):void 0})(t,s,e)}function S(t){return $({...t,state:!0,attribute:!1})}const C=(t,s,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&"object"!=typeof s&&Object.defineProperty(t,s,e),e);function E(t,s){return(s,e,o)=>C(s,e,{get(){return s=this,s.renderRoot?.querySelector(t)??null;var s}})}function O(t){return(s,e)=>{const{slot:o,selector:r}=t??{},a="slot"+(o?`[name=${o}]`:":not([name])");return C(s,e,{get(){const s=this.renderRoot?.querySelector(a),e=s?.assignedElements(t)??[];return void 0===r?e:e.filter(t=>t.matches(r))}})}}function A(t){return s=>{var e;customElements.get(t)||(e=t,(t,s)=>{void 0!==s?s.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)})(s)}}const q=globalThis,P=t=>t,D=q.trustedTypes,L=D?D.createPolicy("lit-html",{createHTML:t=>t}):void 0,V="$lit$",R=`lit$${Math.random().toFixed(9).slice(2)}$`,M="?"+R,B=`<${M}>`,T=document,I=()=>T.createComment(""),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,N=Array.isArray,F="[ \t\n\f\r]",U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,H=/-->/g,W=/>/g,G=RegExp(`>|${F}(?:([^\\s"'>=/]+)(${F}*=${F}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),K=/'/g,Y=/"/g,Z=/^(?:script|style|textarea|title)$/i,Q=(et=1,(t,...s)=>({_$litType$:et,strings:t,values:s})),X=/* @__PURE__ */Symbol.for("lit-noChange"),J=/* @__PURE__ */Symbol.for("lit-nothing"),tt=/* @__PURE__ */new WeakMap,st=T.createTreeWalker(T,129);var et;function ot(t,s){if(!N(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==L?L.createHTML(s):s}class rt{constructor({strings:t,_$litType$:s},e){let o;this.parts=[];let r=0,a=0;const i=t.length-1,d=this.parts,[n,l]=((t,s)=>{const e=t.length-1,o=[];let r,a=2===s?"<svg>":3===s?"<math>":"",i=U;for(let d=0;d<e;d++){const s=t[d];let e,n,l=-1,c=0;for(;c<s.length&&(i.lastIndex=c,n=i.exec(s),null!==n);)c=i.lastIndex,i===U?"!--"===n[1]?i=H:void 0!==n[1]?i=W:void 0!==n[2]?(Z.test(n[2])&&(r=RegExp("</"+n[2],"g")),i=G):void 0!==n[3]&&(i=G):i===G?">"===n[0]?(i=r??U,l=-1):void 0===n[1]?l=-2:(l=i.lastIndex-n[2].length,e=n[1],i=void 0===n[3]?G:'"'===n[3]?Y:K):i===Y||i===K?i=G:i===H||i===W?i=U:(i=G,r=void 0);const h=i===G&&t[d+1].startsWith("/>")?" ":"";a+=i===U?s+B:l>=0?(o.push(e),s.slice(0,l)+V+s.slice(l)+R+h):s+R+(-2===l?d:h)}return[ot(t,a+(t[e]||"<?>")+(2===s?"</svg>":3===s?"</math>":"")),o]})(t,s);if(this.el=rt.createElement(n,e),st.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(o=st.nextNode())&&d.length<i;){if(1===o.nodeType){if(o.hasAttributes())for(const t of o.getAttributeNames())if(t.endsWith(V)){const s=l[a++],e=o.getAttribute(t).split(R),i=/([.?@])?(.*)/.exec(s);d.push({type:1,index:r,name:i[2],strings:e,ctor:"."===i[1]?lt:"?"===i[1]?ct:"@"===i[1]?ht:nt}),o.removeAttribute(t)}else t.startsWith(R)&&(d.push({type:6,index:r}),o.removeAttribute(t));if(Z.test(o.tagName)){const t=o.textContent.split(R),s=t.length-1;if(s>0){o.textContent=D?D.emptyScript:"";for(let e=0;e<s;e++)o.append(t[e],I()),st.nextNode(),d.push({type:2,index:++r});o.append(t[s],I())}}}else if(8===o.nodeType)if(o.data===M)d.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(R,t+1));)d.push({type:7,index:r}),t+=R.length-1}r++}}static createElement(t,s){const e=T.createElement("template");return e.innerHTML=t,e}}function at(t,s,e=t,o){if(s===X)return s;let r=void 0!==o?e._$Co?.[o]:e._$Cl;const a=j(s)?void 0:s._$litDirective$;return r?.constructor!==a&&(r?._$AO?.(!1),void 0===a?r=void 0:(r=new a(t),r._$AT(t,e,o)),void 0!==o?(e._$Co??=[])[o]=r:e._$Cl=r),void 0!==r&&(s=at(t,r._$AS(t,s.values),r,o)),s}class it{constructor(t,s){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:s},parts:e}=this._$AD,o=(t?.creationScope??T).importNode(s,!0);st.currentNode=o;let r=st.nextNode(),a=0,i=0,d=e[0];for(;void 0!==d;){if(a===d.index){let s;2===d.type?s=new dt(r,r.nextSibling,this,t):1===d.type?s=new d.ctor(r,d.name,d.strings,this,t):6===d.type&&(s=new pt(r,this,t)),this._$AV.push(s),d=e[++i]}a!==d?.index&&(r=st.nextNode(),a++)}return st.currentNode=T,o}p(t){let s=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,s),s+=e.strings.length-2):e._$AI(t[s])),s++}}class dt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,s,e,o){this.type=2,this._$AH=J,this._$AN=void 0,this._$AA=t,this._$AB=s,this._$AM=e,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const s=this._$AM;return void 0!==s&&11===t?.nodeType&&(t=s.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,s=this){t=at(this,t,s),j(t)?t===J||null==t||""===t?(this._$AH!==J&&this._$AR(),this._$AH=J):t!==this._$AH&&t!==X&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>N(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==J&&j(this._$AH)?this._$AA.nextSibling.data=t:this.T(T.createTextNode(t)),this._$AH=t}$(t){const{values:s,_$litType$:e}=t,o="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=rt.createElement(ot(e.h,e.h[0]),this.options)),e);if(this._$AH?._$AD===o)this._$AH.p(s);else{const t=new it(o,this),e=t.u(this.options);t.p(s),this.T(e),this._$AH=t}}_$AC(t){let s=tt.get(t.strings);return void 0===s&&tt.set(t.strings,s=new rt(t)),s}k(t){N(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let e,o=0;for(const r of t)o===s.length?s.push(e=new dt(this.O(I()),this.O(I()),this,this.options)):e=s[o],e._$AI(r),o++;o<s.length&&(this._$AR(e&&e._$AB.nextSibling,o),s.length=o)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t!==this._$AB;){const s=P(t).nextSibling;P(t).remove(),t=s}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class nt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,s,e,o,r){this.type=1,this._$AH=J,this._$AN=void 0,this.element=t,this.name=s,this._$AM=o,this.options=r,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=J}_$AI(t,s=this,e,o){const r=this.strings;let a=!1;if(void 0===r)t=at(this,t,s,0),a=!j(t)||t!==this._$AH&&t!==X,a&&(this._$AH=t);else{const o=t;let i,d;for(t=r[0],i=0;i<r.length-1;i++)d=at(this,o[e+i],s,i),d===X&&(d=this._$AH[i]),a||=!j(d)||d!==this._$AH[i],d===J?t=J:t!==J&&(t+=(d??"")+r[i+1]),this._$AH[i]=d}a&&!o&&this.j(t)}j(t){t===J?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class lt extends nt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===J?void 0:t}}class ct extends nt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==J)}}class ht extends nt{constructor(t,s,e,o,r){super(t,s,e,o,r),this.type=5}_$AI(t,s=this){if((t=at(this,t,s,0)??J)===X)return;const e=this._$AH,o=t===J&&e!==J||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,r=t!==J&&(e===J||o);o&&this.element.removeEventListener(this.name,this,e),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class pt{constructor(t,s,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=s,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){at(this,t)}}const gt=q.litHtmlPolyfillSupport;gt?.(rt,dt),(q.litHtmlVersions??=[]).push("3.3.2");const vt=globalThis;let ut=class extends w{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,s,e)=>{const o=e?.renderBefore??s;let r=o._$litPart$;if(void 0===r){const t=e?.renderBefore??null;o._$litPart$=r=new dt(s.insertBefore(I(),t),t,void 0,e??{})}return r._$AI(t),r})(s,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return X}};ut._$litElement$=!0,ut.finalized=!0,vt.litElementHydrateSupport?.({LitElement:ut});const ft=vt.litElementPolyfillSupport;ft?.({LitElement:ut}),(vt.litElementVersions??=[]).push("4.2.2");const bt=/* @__PURE__ */Symbol.for(""),_t=t=>{if(t?.r===bt)return t?._$litStatic$},mt=(t,...s)=>({_$litStatic$:s.reduce((s,e,o)=>s+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[o+1],t[0]),r:bt}),xt=/* @__PURE__ */new Map,yt=(t=>(s,...e)=>{const o=e.length;let r,a;const i=[],d=[];let n,l=0,c=!1;for(;l<o;){for(n=s[l];l<o&&void 0!==(a=e[l],r=_t(a));)n+=r+s[++l],c=!0;l!==o&&d.push(a),i.push(n),l++}if(l===o&&i.push(s[o]),c){const t=i.join("$$lit$$");void 0===(s=xt.get(t))&&(i.raw=i,xt.set(t,s=i)),e=d}return t(s,...e)})(Q),wt=i`
|
|
1
|
+
var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=/* @__PURE__ */Symbol(),r=/* @__PURE__ */new WeakMap;let a=class{constructor(t,s,e){if(this._$cssResult$=!0,e!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=s}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=r.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&r.set(s,t))}return t}toString(){return this.cssText}};const i=(t,...s)=>{const e=1===t.length?t[0]:s.reduce((s,e,o)=>s+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(e)+t[o+1],t[0]);return new a(e,t,o)},d=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let s="";for(const e of t.cssRules)s+=e.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,o))(s)})(t):t,{is:n,defineProperty:l,getOwnPropertyDescriptor:c,getOwnPropertyNames:h,getOwnPropertySymbols:p,getPrototypeOf:g}=Object,v=globalThis,u=v.trustedTypes,f=u?u.emptyScript:"",b=v.reactiveElementPolyfillSupport,_=(t,s)=>t,m={toAttribute(t,s){switch(s){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let e=t;switch(s){case Boolean:e=null!==t;break;case Number:e=null===t?null:Number(t);break;case Object:case Array:try{e=JSON.parse(t)}catch(o){e=null}}return e}},x=(t,s)=>!n(t,s),y={attribute:!0,type:String,converter:m,reflect:!1,useDefault:!1,hasChanged:x};Symbol.metadata??=/* @__PURE__ */Symbol("metadata"),v.litPropertyMetadata??=/* @__PURE__ */new WeakMap;let k=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const e=/* @__PURE__ */Symbol(),o=this.getPropertyDescriptor(t,e,s);void 0!==o&&l(this.prototype,t,o)}}static getPropertyDescriptor(t,s,e){const{get:o,set:r}=c(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:o,set(s){const a=o?.call(this);r?.call(this,s),this.requestUpdate(t,a,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(_("elementProperties")))return;const t=g(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(_("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(_("properties"))){const t=this.properties,s=[...h(t),...p(t)];for(const e of s)this.createProperty(e,t[e])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,e]of s)this.elementProperties.set(t,e)}this._$Eh=/* @__PURE__ */new Map;for(const[s,e]of this.elementProperties){const t=this._$Eu(s,e);void 0!==t&&this._$Eh.set(t,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const s=[];if(Array.isArray(t)){const e=new Set(t.flat(1/0).reverse());for(const t of e)s.unshift(d(t))}else void 0!==t&&s.push(d(t));return s}static _$Eu(t,s){const e=s.attribute;return!1===e?void 0:"string"==typeof e?e:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=/* @__PURE__ */new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=/* @__PURE__ */new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=/* @__PURE__ */new Map,s=this.constructor.elementProperties;for(const e of s.keys())this.hasOwnProperty(e)&&(t.set(e,this[e]),delete this[e]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,o)=>{if(e)t.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement("style"),r=s.litNonce;void 0!==r&&o.setAttribute("nonce",r),o.textContent=e.cssText,t.appendChild(o)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,s,e){this._$AK(t,e)}_$ET(t,s){const e=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,e);if(void 0!==o&&!0===e.reflect){const r=(void 0!==e.converter?.toAttribute?e.converter:m).toAttribute(s,e.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,s){const e=this.constructor,o=e._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=e.getPropertyOptions(o),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:m;this._$Em=o;const a=r.fromAttribute(s,t.type);this[o]=a??this._$Ej?.get(o)??a,this._$Em=null}}requestUpdate(t,s,e,o=!1,r){if(void 0!==t){const a=this.constructor;if(!1===o&&(r=this[t]),e??=a.getPropertyOptions(t),!((e.hasChanged??x)(r,s)||e.useDefault&&e.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(a._$Eu(t,e))))return;this.C(t,s,e)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:e,reflect:o,wrapped:r},a){e&&!(this._$Ej??=/* @__PURE__ */new Map).has(t)&&(this._$Ej.set(t,a??s??this[t]),!0!==r||void 0!==a)||(this._$AL.has(t)||(this.hasUpdated||e||(s=void 0),this._$AL.set(t,s)),!0===o&&this._$Em!==t&&(this._$Eq??=/* @__PURE__ */new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,e]of t){const{wrapped:t}=e,o=this[s];!0!==t||this._$AL.has(s)||void 0===o||this.C(s,void 0,e,o)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(s)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=/* @__PURE__ */new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}};k.elementStyles=[],k.shadowRootOptions={mode:"open"},k[_("elementProperties")]=/* @__PURE__ */new Map,k[_("finalized")]=/* @__PURE__ */new Map,b?.({ReactiveElement:k}),(v.reactiveElementVersions??=[]).push("2.1.2");const w={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:x},z=(t=w,s,e)=>{const{kind:o,metadata:r}=e;let a=globalThis.litPropertyMetadata.get(r);if(void 0===a&&globalThis.litPropertyMetadata.set(r,a=/* @__PURE__ */new Map),"setter"===o&&((t=Object.create(t)).wrapped=!0),a.set(e.name,t),"accessor"===o){const{name:o}=e;return{set(e){const r=s.get.call(this);s.set.call(this,e),this.requestUpdate(o,r,t,!0,e)},init(s){return void 0!==s&&this.C(o,void 0,t,s),s}}}if("setter"===o){const{name:o}=e;return function(e){const r=this[o];s.call(this,e),this.requestUpdate(o,r,t,!0,e)}}throw Error("Unsupported decorator location: "+o)};function $(t){return(s,e)=>"object"==typeof e?z(t,s,e):((t,s,e)=>{const o=s.hasOwnProperty(e);return s.constructor.createProperty(e,t),o?Object.getOwnPropertyDescriptor(s,e):void 0})(t,s,e)}function S(t){return $({...t,state:!0,attribute:!1})}const C=(t,s,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&"object"!=typeof s&&Object.defineProperty(t,s,e),e);function E(t,s){return(s,e,o)=>C(s,e,{get(){return s=this,s.renderRoot?.querySelector(t)??null;var s}})}function O(t){return(s,e)=>{const{slot:o,selector:r}=t??{},a="slot"+(o?`[name=${o}]`:":not([name])");return C(s,e,{get(){const s=this.renderRoot?.querySelector(a),e=s?.assignedElements(t)??[];return void 0===r?e:e.filter(t=>t.matches(r))}})}}function A(t){return s=>{var e;customElements.get(t)||(e=t,(t,s)=>{void 0!==s?s.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)})(s)}}const q=globalThis,P=t=>t,D=q.trustedTypes,L=D?D.createPolicy("lit-html",{createHTML:t=>t}):void 0,V="$lit$",R=`lit$${Math.random().toFixed(9).slice(2)}$`,M="?"+R,B=`<${M}>`,T=document,I=()=>T.createComment(""),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,F=Array.isArray,N="[ \t\n\f\r]",U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,H=/-->/g,K=/>/g,W=RegExp(`>|${N}(?:([^\\s"'>=/]+)(${N}*=${N}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),G=/'/g,Y=/"/g,Z=/^(?:script|style|textarea|title)$/i,Q=(et=1,(t,...s)=>({_$litType$:et,strings:t,values:s})),X=/* @__PURE__ */Symbol.for("lit-noChange"),J=/* @__PURE__ */Symbol.for("lit-nothing"),tt=/* @__PURE__ */new WeakMap,st=T.createTreeWalker(T,129);var et;function ot(t,s){if(!F(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==L?L.createHTML(s):s}class rt{constructor({strings:t,_$litType$:s},e){let o;this.parts=[];let r=0,a=0;const i=t.length-1,d=this.parts,[n,l]=((t,s)=>{const e=t.length-1,o=[];let r,a=2===s?"<svg>":3===s?"<math>":"",i=U;for(let d=0;d<e;d++){const s=t[d];let e,n,l=-1,c=0;for(;c<s.length&&(i.lastIndex=c,n=i.exec(s),null!==n);)c=i.lastIndex,i===U?"!--"===n[1]?i=H:void 0!==n[1]?i=K:void 0!==n[2]?(Z.test(n[2])&&(r=RegExp("</"+n[2],"g")),i=W):void 0!==n[3]&&(i=W):i===W?">"===n[0]?(i=r??U,l=-1):void 0===n[1]?l=-2:(l=i.lastIndex-n[2].length,e=n[1],i=void 0===n[3]?W:'"'===n[3]?Y:G):i===Y||i===G?i=W:i===H||i===K?i=U:(i=W,r=void 0);const h=i===W&&t[d+1].startsWith("/>")?" ":"";a+=i===U?s+B:l>=0?(o.push(e),s.slice(0,l)+V+s.slice(l)+R+h):s+R+(-2===l?d:h)}return[ot(t,a+(t[e]||"<?>")+(2===s?"</svg>":3===s?"</math>":"")),o]})(t,s);if(this.el=rt.createElement(n,e),st.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(o=st.nextNode())&&d.length<i;){if(1===o.nodeType){if(o.hasAttributes())for(const t of o.getAttributeNames())if(t.endsWith(V)){const s=l[a++],e=o.getAttribute(t).split(R),i=/([.?@])?(.*)/.exec(s);d.push({type:1,index:r,name:i[2],strings:e,ctor:"."===i[1]?lt:"?"===i[1]?ct:"@"===i[1]?ht:nt}),o.removeAttribute(t)}else t.startsWith(R)&&(d.push({type:6,index:r}),o.removeAttribute(t));if(Z.test(o.tagName)){const t=o.textContent.split(R),s=t.length-1;if(s>0){o.textContent=D?D.emptyScript:"";for(let e=0;e<s;e++)o.append(t[e],I()),st.nextNode(),d.push({type:2,index:++r});o.append(t[s],I())}}}else if(8===o.nodeType)if(o.data===M)d.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(R,t+1));)d.push({type:7,index:r}),t+=R.length-1}r++}}static createElement(t,s){const e=T.createElement("template");return e.innerHTML=t,e}}function at(t,s,e=t,o){if(s===X)return s;let r=void 0!==o?e._$Co?.[o]:e._$Cl;const a=j(s)?void 0:s._$litDirective$;return r?.constructor!==a&&(r?._$AO?.(!1),void 0===a?r=void 0:(r=new a(t),r._$AT(t,e,o)),void 0!==o?(e._$Co??=[])[o]=r:e._$Cl=r),void 0!==r&&(s=at(t,r._$AS(t,s.values),r,o)),s}class it{constructor(t,s){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:s},parts:e}=this._$AD,o=(t?.creationScope??T).importNode(s,!0);st.currentNode=o;let r=st.nextNode(),a=0,i=0,d=e[0];for(;void 0!==d;){if(a===d.index){let s;2===d.type?s=new dt(r,r.nextSibling,this,t):1===d.type?s=new d.ctor(r,d.name,d.strings,this,t):6===d.type&&(s=new pt(r,this,t)),this._$AV.push(s),d=e[++i]}a!==d?.index&&(r=st.nextNode(),a++)}return st.currentNode=T,o}p(t){let s=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,s),s+=e.strings.length-2):e._$AI(t[s])),s++}}class dt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,s,e,o){this.type=2,this._$AH=J,this._$AN=void 0,this._$AA=t,this._$AB=s,this._$AM=e,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const s=this._$AM;return void 0!==s&&11===t?.nodeType&&(t=s.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,s=this){t=at(this,t,s),j(t)?t===J||null==t||""===t?(this._$AH!==J&&this._$AR(),this._$AH=J):t!==this._$AH&&t!==X&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>F(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==J&&j(this._$AH)?this._$AA.nextSibling.data=t:this.T(T.createTextNode(t)),this._$AH=t}$(t){const{values:s,_$litType$:e}=t,o="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=rt.createElement(ot(e.h,e.h[0]),this.options)),e);if(this._$AH?._$AD===o)this._$AH.p(s);else{const t=new it(o,this),e=t.u(this.options);t.p(s),this.T(e),this._$AH=t}}_$AC(t){let s=tt.get(t.strings);return void 0===s&&tt.set(t.strings,s=new rt(t)),s}k(t){F(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let e,o=0;for(const r of t)o===s.length?s.push(e=new dt(this.O(I()),this.O(I()),this,this.options)):e=s[o],e._$AI(r),o++;o<s.length&&(this._$AR(e&&e._$AB.nextSibling,o),s.length=o)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t!==this._$AB;){const s=P(t).nextSibling;P(t).remove(),t=s}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class nt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,s,e,o,r){this.type=1,this._$AH=J,this._$AN=void 0,this.element=t,this.name=s,this._$AM=o,this.options=r,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=J}_$AI(t,s=this,e,o){const r=this.strings;let a=!1;if(void 0===r)t=at(this,t,s,0),a=!j(t)||t!==this._$AH&&t!==X,a&&(this._$AH=t);else{const o=t;let i,d;for(t=r[0],i=0;i<r.length-1;i++)d=at(this,o[e+i],s,i),d===X&&(d=this._$AH[i]),a||=!j(d)||d!==this._$AH[i],d===J?t=J:t!==J&&(t+=(d??"")+r[i+1]),this._$AH[i]=d}a&&!o&&this.j(t)}j(t){t===J?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class lt extends nt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===J?void 0:t}}class ct extends nt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==J)}}class ht extends nt{constructor(t,s,e,o,r){super(t,s,e,o,r),this.type=5}_$AI(t,s=this){if((t=at(this,t,s,0)??J)===X)return;const e=this._$AH,o=t===J&&e!==J||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,r=t!==J&&(e===J||o);o&&this.element.removeEventListener(this.name,this,e),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class pt{constructor(t,s,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=s,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){at(this,t)}}const gt=q.litHtmlPolyfillSupport;gt?.(rt,dt),(q.litHtmlVersions??=[]).push("3.3.2");const vt=globalThis;let ut=class extends k{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,s,e)=>{const o=e?.renderBefore??s;let r=o._$litPart$;if(void 0===r){const t=e?.renderBefore??null;o._$litPart$=r=new dt(s.insertBefore(I(),t),t,void 0,e??{})}return r._$AI(t),r})(s,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return X}};ut._$litElement$=!0,ut.finalized=!0,vt.litElementHydrateSupport?.({LitElement:ut});const ft=vt.litElementPolyfillSupport;ft?.({LitElement:ut}),(vt.litElementVersions??=[]).push("4.2.2");const bt=/* @__PURE__ */Symbol.for(""),_t=t=>{if(t?.r===bt)return t?._$litStatic$},mt=(t,...s)=>({_$litStatic$:s.reduce((s,e,o)=>s+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[o+1],t[0]),r:bt}),xt=/* @__PURE__ */new Map,yt=(t=>(s,...e)=>{const o=e.length;let r,a;const i=[],d=[];let n,l=0,c=!1;for(;l<o;){for(n=s[l];l<o&&void 0!==(a=e[l],r=_t(a));)n+=r+s[++l],c=!0;l!==o&&d.push(a),i.push(n),l++}if(l===o&&i.push(s[o]),c){const t=i.join("$$lit$$");void 0===(s=xt.get(t))&&(i.raw=i,xt.set(t,s=i)),e=d}return t(s,...e)})(Q),kt=i`
|
|
2
2
|
:host {
|
|
3
3
|
--_sds-alert-background-color: var(--sds-alert-background-color, var(--sds-color-alert-info-surface-tinted));
|
|
4
4
|
|
|
@@ -180,7 +180,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
180
180
|
margin: 0 !important;
|
|
181
181
|
max-width: var(--_sds-alert-max-line-width) !important;
|
|
182
182
|
}
|
|
183
|
-
|
|
183
|
+
`,wt=/* @__PURE__ */new Set(["focus","blur","focusin","focusout","input","change","play","pause","ended","volumechange","timeupdate","durationchange","loadeddata","loadedmetadata","loadstart","canplay","canplaythrough","playing","seeked","stalled","suspend","waiting","ratechange","load","unload","abort","error","resize","scroll","keyup","reset","select"]);function zt(t){return class extends t{dispatchSheriffEvent(t,s,e=!wt.has(t)){return this.dispatchEvent(new CustomEvent(t,{detail:s,bubbles:!0,composed:!0,cancelable:e}))}dispatchKeyboardEvent(t,s){return this.dispatchEvent(new KeyboardEvent(t,{key:s.key,code:s.code,bubbles:!0,composed:!0,cancelable:!wt.has(t),ctrlKey:s.ctrlKey,shiftKey:s.shiftKey,altKey:s.altKey,metaKey:s.metaKey,repeat:s.repeat,isComposing:s.isComposing,location:s.location}))}}}var $t=Object.defineProperty,St=(t,s,e,o)=>{for(var r,a=void 0,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(s,e,a)||a);return a&&$t(s,e,a),a};const Ct={info:"InformationSquareFill-aksel-filled",success:"check_circle-material-filled",attention:"warning-material-filled",danger:"dangerous-material-filled"},Et=class extends(zt(ut)){constructor(){super(...arguments),this.variant="primary",this.size="md",this.palette="info",this.iconTag=mt`sds-icon`,this.buttonTag=mt`sds-button`,this._remove=()=>{this.dispatchSheriffEvent("sds-remove")},this._renderIcon=(t,s,e)=>yt`<${this.iconTag} ${e?`class=${e}`:""} name="${t}" size=${s}></${this.iconTag}>`,this._renderRemoveButton=t=>yt`<${this.buttonTag}
|
|
184
184
|
class="sds-alert__remove-btn"
|
|
185
185
|
variant="tertiary"
|
|
186
186
|
size="sm"
|
|
@@ -189,19 +189,20 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
189
189
|
@click=${this._remove}
|
|
190
190
|
>
|
|
191
191
|
${this._renderIcon("close-material-outlined","sm")}
|
|
192
|
-
</${this.buttonTag}>`}render(){const t="primary"===this.variant?"md":this.size??"md",s
|
|
192
|
+
</${this.buttonTag}>`}render(){const t="primary"===this.variant?"md":this.size??"md",s=Ct[this.palette]??Ct.info;return Q`<div class="sds-alert">
|
|
193
193
|
<div class="sds-alert__type">${this._renderIcon(s,t,"sds-alert__icon")}</div>
|
|
194
194
|
<div class="sds-alert__content">
|
|
195
195
|
<slot name="title"></slot>
|
|
196
196
|
<slot name="message"></slot>
|
|
197
197
|
</div>
|
|
198
198
|
${this.removableLabel&&"primary"===this.variant?Q`<div class="sds-alert__actions">${this._renderRemoveButton(this.removableLabel)}</div>`:J}
|
|
199
|
-
</div>`}};
|
|
199
|
+
</div>`}};Et.styles=[kt];let Ot=Et;St([$({type:String,reflect:!0})],Ot.prototype,"variant"),St([$({type:String,reflect:!0})],Ot.prototype,"size"),St([$({type:String,attribute:"removable-label",reflect:!0})],Ot.prototype,"removableLabel"),St([$({type:String,attribute:"data-palette",reflect:!0})],Ot.prototype,"palette");const At=t=>t??J,qt=1,Pt=2,Dt=t=>(...s)=>({_$litDirective$:t,values:s});class Lt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,s,e){this._$Ct=t,this._$AM=s,this._$Ci=e}_$AS(t,s){return this.update(t,s)}update(t,s){return this.render(...s)}}let Vt=class extends Lt{constructor(t){if(super(t),this.it=J,t.type!==Pt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===J||null==t)return this._t=void 0,this.it=t;if(t===X)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const s=[t];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}};Vt.directiveName="unsafeHTML",Vt.resultType=1;class Rt extends Vt{}Rt.directiveName="unsafeSVG",Rt.resultType=2;const Mt=Dt(Rt),Bt=["arrow_forward-material-outlined","check_circle-material-filled","close-material-outlined","dangerous-material-filled","InformationSquareFill-aksel-filled","lock-material-filled","search-material-filled","warning-material-filled","chevron_up-material-filled"],Tt={"arrow_forward-material-outlined":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M662.82-440.39H145.87v-79.22h516.95L423.87-758.57 480-814.7 814.7-480 480-145.87l-56.13-55.56z"/></svg>',"check_circle-material-filled":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="m419.87-289.52 289.22-289.22-57.31-56.87L419.87-403.7 304.96-518.61l-56.31 56.87zm60.21 223.65q-85.47 0-161.01-32.39-75.53-32.4-131.97-88.84T98.26-318.99q-32.39-75.46-32.39-160.93 0-86.47 32.39-162.01 32.4-75.53 88.75-131.5t131.85-88.62 161.01-32.65q86.52 0 162.12 32.61 75.61 32.6 131.53 88.5 55.93 55.89 88.55 131.45Q894.7-566.58 894.7-480q0 85.55-32.65 161.07-32.65 75.53-88.62 131.9T642.01-98.26q-75.46 32.39-161.93 32.39"/></svg>',"close-material-outlined":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M249-193.43 193.43-249l231-231-231-231L249-766.57l231 231 231-231L766.57-711l-231 231 231 231L711-193.43l-231-231z"/></svg>',"dangerous-material-filled":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M324.35-105.87 105.87-324.35v-311.87L324.35-854.7h311.87L854.7-636.22v311.87L636.22-105.87zm34.91-206.87L480-433.48l120.74 120.74 47.09-46.52L526.52-480l121.31-120.74-47.09-47.09L480-526.52 359.26-647.83l-46.52 47.09L433.48-480 312.74-359.26z"/></svg>',"InformationSquareFill-aksel-filled":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M3.25 4A.75.75 0 0 1 4 3.25h16a.75.75 0 0 1 .75.75v16a.75.75 0 0 1-.75.75H4a.75.75 0 0 1-.75-.75zM11 7.75a1 1 0 1 1 2 0 1 1 0 0 1-2 0m-1.25 3a.75.75 0 0 1 .75-.75H12a.75.75 0 0 1 .75.75v4.75h.75a.75.75 0 0 1 0 1.5h-3a.75.75 0 0 1 0-1.5h.75v-4h-.75a.75.75 0 0 1-.75-.75" clip-rule="evenodd"/></svg>',"lock-material-filled":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M225.09-67q-32.68 0-55.95-23.27t-23.27-55.95v-423.82q0-32.91 23.27-56.35t55.95-23.44h58.69v-83.56q0-82.44 57.17-140.18 57.16-57.73 139.02-57.73t139.05 57.73q57.2 57.74 57.2 140.18v83.56h58.69q32.91 0 56.35 23.44t23.44 56.35v423.82q0 32.68-23.44 55.95T734.91-67zm255.08-214.13q31.83 0 54.33-22.03t22.5-52.97q0-30-22.67-54.5t-54.5-24.5-54.33 24.5-22.5 55 22.67 52.5 54.5 22M363-649.83h234v-83.43q0-49.96-33.79-84.11-33.8-34.15-82.96-34.15t-83.21 34.15Q363-783.22 363-733.26z"/></svg>',"search-material-filled":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M795.43-105.17 529.04-371q-29.43 24.26-69.11 37.94-39.67 13.67-85.32 13.67-112.12 0-189.87-77.83Q107-475.04 107-585t77.83-187.78q77.82-77.83 188.28-77.83t187.78 77.83q77.33 77.82 77.33 187.93 0 43.98-13.15 83.13-13.16 39.15-39.46 73.59L853-162.74zM373.81-398.61q77.66 0 131.42-54.53Q559-507.67 559-585t-53.85-131.86-131.34-54.53q-78.33 0-132.96 54.53T186.22-585t54.55 131.86 133.04 54.53"/></svg>',"warning-material-filled":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M27.56-112.65 480-894.7l452.44 782.05zm456.62-125.48q13.15 0 22.61-9.64 9.47-9.65 9.47-22.8t-9.64-22.33q-9.65-9.19-22.8-9.19t-22.61 9.36q-9.47 9.36-9.47 22.51t9.64 22.62q9.65 9.47 22.8 9.47M454-348h60v-219.48h-60z"/></svg>',"chevron_up-material-filled":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 32 32"><path d="m16 11.5 8 8-1.867 1.867L16 15.233l-6.133 6.134L8 19.5z"/></svg>'},It=t=>import(`@politiet/sheriff-icons/dist/assets/${t}.js`).then(({default:t})=>t).catch(t=>{console.log(t)}),jt=t=>fetch(`https://cdn.jsdelivr.net/npm/@politiet/sheriff-icons/dist/assets/${t}.svg`).then(s=>{if(!s.ok)throw new TypeError(`Sheriff: unknown icon: '${t}'`);return s.text()});const Ft=i`
|
|
200
200
|
:host {
|
|
201
201
|
--_sds-icon-size: var(--sds-icon-size, var(--sds-components-icon-md));
|
|
202
202
|
--_sds-icon-color: var(--sds-icon-color, var(--sds-color-text-subtle, var(--sds-color-neutral-text-subtle)));
|
|
203
|
+
--_sds-icon-display: var(--sds-icon-display, inline-block);
|
|
203
204
|
|
|
204
|
-
display:
|
|
205
|
+
display: var(--_sds-icon-display);
|
|
205
206
|
color: var(--_sds-icon-color);
|
|
206
207
|
block-size: var(--_sds-icon-size);
|
|
207
208
|
inline-size: var(--_sds-icon-size);
|
|
@@ -228,11 +229,11 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
228
229
|
height: 100%;
|
|
229
230
|
overflow: hidden;
|
|
230
231
|
}
|
|
231
|
-
`;var
|
|
232
|
-
<div class="sds-icon" role="${
|
|
233
|
-
${this.name?Q`<slot aria-hidden="true">${
|
|
232
|
+
`;var Nt=Object.defineProperty,Ut=(t,s,e,o)=>{for(var r,a=void 0,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(s,e,a)||a);return a&&Nt(s,e,a),a};const Ht=((t=class extends ut{constructor(){super(...arguments),this.name="",this.color="",this.label="",this.svg=""}static setLoadLocal(t){this.iconLoader.loadLocal=t}static registerResolver(t){this.iconLoader.resolver=t}render(){return Q`
|
|
233
|
+
<div class="sds-icon" role="${At(this.label?"img":void 0)}" style="${At(this.color?`color:${this.color}`:void 0)}" aria-label="${At(this.label)}">
|
|
234
|
+
${this.name?Q`<slot aria-hidden="true">${Mt(this.svg)}</slot>`:Q`<slot aria-hidden="true"></slot>`}
|
|
234
235
|
</div>
|
|
235
|
-
`}async fetchIcon(){if(!this.name)return void(this.svg="");const s=await new Promise(s=>{t.iconLoader.resolve(this.name,s)});this.svg=s}updated(t){super.updated(t),t.has("name")&&this.name&&this.fetchIcon()}}).styles=[
|
|
236
|
+
`}async fetchIcon(){if(!this.name)return void(this.svg="");const s=await new Promise(s=>{t.iconLoader.resolve(this.name,s)});this.svg=s}updated(t){super.updated(t),t.has("name")&&this.name&&this.fetchIcon()}}).styles=[Ft],t.iconLoader=new class{constructor(){this.cache=/* @__PURE__ */new Map,this._loadLocal=!1,this._disableSystemIcons=!1,this.resolver=this._loadLocal?It:jt}get loadLocal(){return this._loadLocal}set loadLocal(t){this._loadLocal=t,this.resolver=t?It:jt}set disableSystemIcons(t){this._disableSystemIcons=t}resolve(t,s){if(!this._disableSystemIcons&&(t=>Bt.includes(t))(t))return void s(Tt[t]);let e=this.cache.get(t);"string"!=typeof e?(e||(e=this.resolver(t).catch(()=>"").then(s=>(this.cache.set(t,s),s)),this.cache.set(t,e)),e.then(s)):s(e)}clear(){this.cache.clear()}get currentLoader(){return this.resolver}},t);Ut([$({type:String,reflect:!0})],Ht.prototype,"name"),Ut([$({type:String,reflect:!0})],Ht.prototype,"size"),Ut([$({type:String,reflect:!0})],Ht.prototype,"color"),Ut([$({type:String,reflect:!0})],Ht.prototype,"label"),Ut([S()],Ht.prototype,"svg");let Kt=Ht;var Wt=Object.getOwnPropertyDescriptor;let Gt=class extends Kt{};Gt=((t,s,e,o)=>{for(var r,a=o>1?void 0:o?Wt(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(a)||a);return a})([A("sds-icon")],Gt);const Yt=Dt(class extends Lt{constructor(t){if(super(t),t.type!==qt||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(s=>t[s]).join(" ")+" "}update(t,[s]){if(void 0===this.st){this.st=/* @__PURE__ */new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(t=>""!==t)));for(const t in s)s[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(s)}const e=t.element.classList;for(const o of this.st)o in s||(e.remove(o),this.st.delete(o));for(const o in s){const t=!!s[o];t===this.st.has(o)||this.nt?.has(o)||(t?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return X}}),Zt=i`
|
|
236
237
|
:host {
|
|
237
238
|
--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-action-default, var(--sds-color-main-action-default)));
|
|
238
239
|
--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-action-default, var(--sds-color-main-action-default)));
|
|
@@ -404,18 +405,18 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
404
405
|
--_sds-button-padding-inline: var(--sds-button-padding-inline, 0);
|
|
405
406
|
min-width: var(--_sds-button-min-height);
|
|
406
407
|
}
|
|
407
|
-
`;var
|
|
408
|
+
`;var Qt=Object.defineProperty,Xt=(t,s,e,o)=>{for(var r,a=void 0,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(s,e,a)||a);return a&&Qt(s,e,a),a};const Jt=class extends(zt(ut)){constructor(){super(),this.disabled=!1,this.icon=!1,this.loading=!1,this.size="lg",this.type="button",this.value="",this.variant="primary",this._handleClick=t=>{if(t.preventDefault(),t.stopImmediatePropagation(),!this.disabled)switch(this.type){case"submit":if(this.dispatchSheriffEvent("submit"))if(this.form){const t=this.getRootNode().querySelector(`form#${this.form}`);t?.requestSubmit()}else this.internals.form&&this.internals.form.requestSubmit();break;case"reset":if(this.dispatchSheriffEvent("reset"))if(this.form){const t=this.getRootNode().querySelector(`form#${this.form}`);t?.reset()}else this.internals.form&&this.internals.form.reset();break;default:this.dispatchSheriffEvent("click")}},this.internals=this.attachInternals()}updated(t){t.has("variant")&&"critical"===this.variant&&this.setAttribute("data-palette","danger")}focus(){this.disabled||this.shadowRoot?.querySelector("button")?.focus()}blur(){this.disabled||this.shadowRoot?.querySelector("button")?.blur()}click(){this.disabled||this.shadowRoot?.querySelector("button")?.click()}render(){const t={"sds-button":!0,"sds-button--as-link":!!this.href};return this.href?Q` <a id="link" class="${Yt(t)}" href="${this.href}" target="${At(this.target)}">
|
|
408
409
|
<slot name="before"></slot>
|
|
409
410
|
<slot></slot>
|
|
410
411
|
<slot name="after"></slot>
|
|
411
412
|
</a>`:Q`
|
|
412
413
|
<button
|
|
413
414
|
id="control"
|
|
414
|
-
form="${
|
|
415
|
-
class="${
|
|
415
|
+
form="${At(this.form)}"
|
|
416
|
+
class="${Yt(t)}"
|
|
416
417
|
type="${this.type}"
|
|
417
|
-
name="${
|
|
418
|
-
value="${
|
|
418
|
+
name="${At(this.name)}"
|
|
419
|
+
value="${At(this.value)}"
|
|
419
420
|
?disabled="${this.disabled}"
|
|
420
421
|
@click="${this._handleClick}"
|
|
421
422
|
>
|
|
@@ -423,7 +424,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
423
424
|
<slot></slot>
|
|
424
425
|
${this.loading?J:Q`<slot name="after"></slot>`}
|
|
425
426
|
</button>
|
|
426
|
-
`}};
|
|
427
|
+
`}};Jt.styles=[Zt],Jt.formAssociated=!0,Jt.shadowRootOptions={...ut.shadowRootOptions,delegatesFocus:!0};let ts=Jt;Xt([$({type:Boolean,reflect:!0})],ts.prototype,"disabled"),Xt([$({type:Boolean,reflect:!0})],ts.prototype,"icon"),Xt([$({type:Boolean,reflect:!0})],ts.prototype,"loading"),Xt([$({type:String,reflect:!0})],ts.prototype,"form"),Xt([$({type:String,reflect:!0})],ts.prototype,"href"),Xt([$({type:String,reflect:!0})],ts.prototype,"name"),Xt([$({type:String,reflect:!0})],ts.prototype,"size"),Xt([$({type:String,reflect:!0})],ts.prototype,"target"),Xt([$({type:String,reflect:!0})],ts.prototype,"type"),Xt([$({type:String,reflect:!0})],ts.prototype,"value"),Xt([$({type:String,reflect:!0})],ts.prototype,"variant");var ss=Object.getOwnPropertyDescriptor;let es=class extends ts{};es=((t,s,e,o)=>{for(var r,a=o>1?void 0:o?ss(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(a)||a);return a})([A("sds-button")],es);var os=Object.getOwnPropertyDescriptor;let rs=class extends Ot{};function as(t,s,e,o){const r=t?.assignedNodes({flatten:!0}).filter(t=>{if(t.nodeType===Node.TEXT_NODE){return(t.textContent?.trim()??"").length>0}if(t.nodeType===Node.ELEMENT_NODE){const e=t,o=e.tagName.toUpperCase();if(!s.includes(o))return!0;return Array.from(e.childNodes).some(t=>t.nodeType===Node.ELEMENT_NODE)}return!1});r?.length>0&&console.warn(o,...r)}rs=((t,s,e,o)=>{for(var r,a=o>1?void 0:o?os(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(a)||a);return a})([A("sds-alert")],rs);const is=i`
|
|
427
428
|
:host {
|
|
428
429
|
--_sds-card-background-color: var(--sds-card-background-color, var(--sds-color-surface-tinted, var(--sds-color-main-surface-tinted)));
|
|
429
430
|
--_sds-card-border-radius: var(--sds-card-border-radius, var(--sds-radius-md));
|
|
@@ -544,11 +545,11 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
544
545
|
--_sds-card-text-line-height: var(--sds-card-text-line-height, var(--sds-typography-body-md-desktop-line-height));
|
|
545
546
|
}
|
|
546
547
|
}
|
|
547
|
-
`;var
|
|
548
|
+
`;var ds=Object.defineProperty,ns=Object.getOwnPropertyDescriptor,ls=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?ns(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&ds(s,e,a),a};let cs=class extends ut{constructor(){super(...arguments),this._contentWarning="[sds-card] text slot should only contain top-level <p> elements with no nested elements:",this._headerWarning="[sds-card] header slot should only contain one of <h2>–<h6> elements:",this._handleHeadingSlotChange=()=>{this.headingSlot.assignedNodes({flatten:!0}).length>0&&as(this.headingSlot,["H2","H3","H4","H5","H6"],0,this._headerWarning)},this._handleTextSlotChange=()=>{as(this.textSlot,["P"],0,this._contentWarning)}}firstUpdated(){as(this.textSlot,["P"],0,this._contentWarning);this.headingSlot.assignedNodes({flatten:!0}).length>0&&as(this.headingSlot,["H2","H3","H4","H5","H6"],0,this._headerWarning)}render(){const t=Q`
|
|
548
549
|
<slot name="heading" id="heading" @slotchange=${this._handleHeadingSlotChange}></slot>
|
|
549
550
|
<slot name="text" id="content" @slotchange=${this._handleTextSlotChange}></slot>
|
|
550
551
|
<sds-icon name="arrow_forward-material-outlined" size="md" class="sds-card__icon"></sds-icon>
|
|
551
|
-
`;return Q`<article class="sds-card">${this.link?Q`<a href="${this.link}" class="sds-card__content">${t}</a>`:Q`<div class="sds-card__content">${t}</div>`}</article>`}};
|
|
552
|
+
`;return Q`<article class="sds-card">${this.link?Q`<a href="${this.link}" class="sds-card__content">${t}</a>`:Q`<div class="sds-card__content">${t}</div>`}</article>`}};cs.styles=[is],ls([$({type:String,reflect:!0})],cs.prototype,"link",2),ls([E("slot#heading")],cs.prototype,"headingSlot",2),ls([E("slot#text")],cs.prototype,"textSlot",2),cs=ls([A("sds-card")],cs);const hs=i`
|
|
552
553
|
:host {
|
|
553
554
|
--_sds-checkbox-block-gap: var(--sds-checkbox-block-gap, var(--sds-spacing-4xs));
|
|
554
555
|
--_sds-checkbox-inline-gap: var(--sds-checkbox-inline-gap, var(--sds-spacing-3xs));
|
|
@@ -770,13 +771,13 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
770
771
|
margin-block-start: -1px;
|
|
771
772
|
}
|
|
772
773
|
}
|
|
773
|
-
`;var
|
|
774
|
-
<div class="${
|
|
774
|
+
`;var ps=Object.defineProperty,gs=Object.getOwnPropertyDescriptor,vs=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?gs(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&ps(s,e,a),a};let us=class extends(zt(ut)){constructor(){super(),this.checked=!1,this.error=!1,this.required=!1,this.size="md",this.readOnly=!1,this._disabled=!1,this._disabledIsAuthorControlled=!1,this._settingDisabledFromParent=!1,this._parentRequestDisabled=!1,this._initialChecked=!1,this._handleChange=t=>{if(t.stopImmediatePropagation(),this.disabled||this.readOnly)return t.target.checked=this.checked,void t.preventDefault();const s=t.target;this.checked=s.checked,this.internals.setFormValue(s.checked?s.value:null),this._validate(),this.dispatchSheriffEvent("change")},this._handleFocus=t=>{t.stopImmediatePropagation(),this.dispatchSheriffEvent("focus")},this._handleBlur=t=>{t.stopImmediatePropagation(),this.dispatchSheriffEvent("blur")},this.internals=this.attachInternals()}get disabled(){return this._disabled}set disabled(t){const s=t??!1,e=this._disabled;e!==s&&(this._disabled=s,this.requestUpdate("disabled",e),this._settingDisabledFromParent||(this._disabledIsAuthorControlled=s))}get parentRequestDisabled(){return this._parentRequestDisabled}set parentRequestDisabled(t){const s=t??!1,e=this._parentRequestDisabled;e!==s&&(this._parentRequestDisabled=s,this.requestUpdate("parentRequestDisabled",e),this._disabledIsAuthorControlled||(this._settingDisabledFromParent=!0,this.disabled=s,this._settingDisabledFromParent=!1))}connectedCallback(){super.connectedCallback(),this._initialChecked=this.checked,this.internals.role="checkbox",this.checked&&this.internals.setFormValue(this.value??"on")}firstUpdated(t){super.firstUpdated(t),this.control&&(this.control.required=this.required),this._validate()}formResetCallback(){this.checked=this._initialChecked,this.control&&(this.control.checked=this._initialChecked);const t=this.checked?this.value??"on":null;this.internals.setFormValue(t),this._validate()}_validate(){this.required&&!this.checked?this.internals.setValidity({valueMissing:!0},this.control.validationMessage,this.control):this.internals.setValidity({})}focus(){this.disabled||this.shadowRoot?.querySelector("input")?.focus()}blur(){this.disabled||this.shadowRoot?.querySelector("input")?.blur()}click(){this.disabled||this.readOnly||this.shadowRoot?.querySelector("input")?.click()}updated(t){super.updated(t),t.has("required")&&this.control&&(this.control.required=this.required),t.has("checked")&&this._validate(),this._disabledIsAuthorControlled||this.disabled===this._parentRequestDisabled||(this._settingDisabledFromParent=!0,this.disabled=this._parentRequestDisabled??!1,this._settingDisabledFromParent=!1)}get type(){return"checkbox"}render(){const t={"sds-checkbox":!0,"sds-checkbox--error":Boolean(this.error)},s={"sds-checkbox__input":!0,"sds-checkbox__input--error":Boolean(this.error)};return Q`
|
|
775
|
+
<div class="${Yt(t)}">
|
|
775
776
|
<input
|
|
776
777
|
id="control"
|
|
777
778
|
type="checkbox"
|
|
778
|
-
name="${
|
|
779
|
-
value="${
|
|
779
|
+
name="${At(this.name)}"
|
|
780
|
+
value="${At(this.value)}"
|
|
780
781
|
.checked="${this.checked}"
|
|
781
782
|
?checked="${this.checked}"
|
|
782
783
|
?disabled="${this.disabled}"
|
|
@@ -785,12 +786,12 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
785
786
|
@change="${this._handleChange}"
|
|
786
787
|
@focus="${this._handleFocus}"
|
|
787
788
|
@blur="${this._handleBlur}"
|
|
788
|
-
class="${
|
|
789
|
+
class="${Yt(s)}"
|
|
789
790
|
/>
|
|
790
791
|
${this.label?Q`<label for="control" class="sds-checkbox__label">${this.label}</label>`:J}
|
|
791
792
|
${this.helpText?Q`<span class="sds-checkbox__help-text">${this.helpText}</span>`:J}
|
|
792
793
|
</div>
|
|
793
|
-
`}};
|
|
794
|
+
`}};us.styles=[hs],us.formAssociated=!0,us.shadowRootOptions={...ut.shadowRootOptions,delegatesFocus:!0},vs([$({type:String,reflect:!0})],us.prototype,"name",2),vs([$({type:String,reflect:!0})],us.prototype,"label",2),vs([$({type:String})],us.prototype,"value",2),vs([$({type:Boolean,reflect:!0})],us.prototype,"checked",2),vs([$({type:Boolean,reflect:!0})],us.prototype,"disabled",1),vs([$({type:Boolean,reflect:!0})],us.prototype,"error",2),vs([$({type:Boolean,reflect:!0})],us.prototype,"required",2),vs([$({type:String,reflect:!0})],us.prototype,"size",2),vs([$({type:String,attribute:"help-text"})],us.prototype,"helpText",2),vs([$({type:Boolean,attribute:"readonly",reflect:!0})],us.prototype,"readOnly",2),vs([$({type:Boolean,attribute:!1})],us.prototype,"parentRequestDisabled",1),vs([E("#control")],us.prototype,"control",2),us=vs([A("sds-checkbox")],us);const fs=i`
|
|
794
795
|
:host {
|
|
795
796
|
--_sds-checkbox-group-gap: var(--sds-checkbox-group-gap, var(--sds-spacing-xs));
|
|
796
797
|
--_sds-checkbox-group-font-family: var(--sds-checkbox-group-font-family, var(--sds-typography-font-family-roboto));
|
|
@@ -882,8 +883,8 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
882
883
|
--_sds-checkbox-group-help-text-font-size: var(--sds-checkbox-group-help-text-font-size, var(--sds-components-font-size-content-lg));
|
|
883
884
|
--_sds-checkbox-group-help-text-line-height: var(--sds-checkbox-group-help-text-line-height, var(--sds-components-line-height-squeezed-lg));
|
|
884
885
|
}
|
|
885
|
-
`;var
|
|
886
|
-
<fieldset class="${
|
|
886
|
+
`;var bs=Object.defineProperty,_s=Object.getOwnPropertyDescriptor,ms=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?_s(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&bs(s,e,a),a};const xs=["disabled","errorMessage","readOnly","size"];let ys=class extends(zt(ut)){constructor(){super(...arguments),this.readOnly=!1,this.disabled=!1,this.size="md",this._selectedValues=[],this._handleCheckboxChange=t=>{const s=t.target,e=s.value,o=s.checked;this._selectedValues=o?[...this._selectedValues,e]:this._selectedValues.filter(t=>t!==e),this.dispatchSheriffEvent("sds-update")},this._handleSlotChange=()=>{this._updateChildProps([...xs])}}_getChildCheckboxes(){return this._slotElement?.assignedElements({flatten:!0}).filter(t=>"SDS-CHECKBOX"===t.tagName)??[]}_updateChildProps(t){const s=this._getChildCheckboxes();for(const e of s)for(const s of t)switch(s){case"readOnly":e.readOnly=this.readOnly;break;case"disabled":e.parentRequestDisabled=this.disabled;break;case"errorMessage":e.error=Boolean(this.errorMessage);break;case"size":e.size=this.size}}updated(t){super.updated(t);const s=Array.from(t.keys());(s.includes("errorMessage")||s.includes("error-message"))&&this._updateChildProps(["errorMessage"])}attributeChangedCallback(t,s,e){if(super.attributeChangedCallback(t,s,e),"readonly"===t)return void this._updateChildProps(["readOnly"]);const o=t;xs.includes(o)&&this._updateChildProps([o])}get value(){return{selectedValues:this._selectedValues}}render(){const t={"sds-checkbox-group":!0,"sds-checkbox-group--disabled":this.disabled,"sds-checkbox-group--error":Boolean(this.errorMessage)};return Q`
|
|
887
|
+
<fieldset class="${Yt(t)}">
|
|
887
888
|
${this.legend?Q`<legend class="sds-checkbox-group__legend">${this.readOnly?Q`<sds-icon name="lock-material-filled" size="md"></sds-icon>`:J}</sds-icon>${this.legend}</legend>`:J}
|
|
888
889
|
${this.helpText?Q`<p class="sds-checkbox-group__help-text">${this.helpText}</p>`:J}
|
|
889
890
|
<div class="sds-checkbox-group__checkboxes" @change=${this._handleCheckboxChange}>
|
|
@@ -891,7 +892,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
891
892
|
</div>
|
|
892
893
|
${this.errorMessage?Q`<sds-alert variant="secondary" data-palette="danger"><p slot="message">${this.errorMessage}</p></sds-alert>`:J}
|
|
893
894
|
</fieldset>
|
|
894
|
-
`}};
|
|
895
|
+
`}};ys.styles=[fs],ms([$({type:String,reflect:!0})],ys.prototype,"legend",2),ms([$({type:String,attribute:"help-text",reflect:!0})],ys.prototype,"helpText",2),ms([$({type:String,attribute:"error-message",reflect:!0})],ys.prototype,"errorMessage",2),ms([$({type:Boolean,attribute:"readonly",reflect:!0})],ys.prototype,"readOnly",2),ms([$({type:Boolean,reflect:!0})],ys.prototype,"disabled",2),ms([$({type:String,reflect:!0})],ys.prototype,"size",2),ms([S()],ys.prototype,"_selectedValues",2),ms([E("slot")],ys.prototype,"_slotElement",2),ys=ms([A("sds-checkbox-group")],ys);const ks=i`
|
|
895
896
|
:host {
|
|
896
897
|
--_sds-chip-font-family: var(--sds-chip-font-family, var(--sds-typography-font-family-roboto));
|
|
897
898
|
--_sds-chip-font-weight: var(--sds-chip-font-weight, var(--sds-typography-font-weight-regular));
|
|
@@ -1036,22 +1037,22 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
1036
1037
|
white-space: nowrap;
|
|
1037
1038
|
}
|
|
1038
1039
|
}
|
|
1039
|
-
`;var
|
|
1040
|
+
`;var ws=Object.defineProperty,zs=Object.getOwnPropertyDescriptor,$s=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?zs(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&ws(s,e,a),a};let Ss=class extends(zt(ut)){constructor(){super(),this.variant="selectable",this.size="md",this.checked=!1,this.disabled=!1,this.readonly=!1,this._initialChecked=!1,this._toggle=t=>{t.preventDefault(),t.stopImmediatePropagation(),this.disabled||this.readonly||(this.checked=!this.checked,this.internals.setFormValue(this.checked?this.value??"on":null),this.dispatchSheriffEvent("change"))},this._remove=()=>{this.disabled||this.readonly||this.dispatchSheriffEvent("sds-remove")},this._keypress=t=>{[" ","Enter"].includes(t.key)&&("removable"===this.variant?this._remove():this._toggle(t))},this.internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this._initialChecked=this.checked,this.internals.role="checkbox",this.checked&&this.internals.setFormValue(this.value??null)}formResetCallback(){this.checked=this._initialChecked,this.internals.setFormValue(this.value??null)}focus(){this.disabled||this.shadowRoot?.querySelector("input")?.focus()}blur(){this.disabled||this.shadowRoot?.querySelector("input")?.blur()}click(){this.disabled||this.shadowRoot?.querySelector("input")?.click()}render(){const t="removable"===this.variant&&!this.readonly&&!this.disabled,s={"sds-chip":!0,"sds-chip--small":"small"===this.size||"sm"===this.size,"sds-chip--large":"large"===this.size||"lg"===this.size,"sds-chip--removable":t};return t?Q`<button class="${Yt(s)}" @click=${this._remove} @keyup="${this._keypress}">
|
|
1040
1041
|
<slot></slot>
|
|
1041
1042
|
<sds-icon name="close-material-outlined" size="s"></sds-icon>
|
|
1042
|
-
</button>`:Q`<label class="${
|
|
1043
|
+
</button>`:Q`<label class="${Yt(s)}" @click="${this._toggle}" @keyup="${this._keypress}">
|
|
1043
1044
|
<input
|
|
1044
1045
|
id="control"
|
|
1045
1046
|
type="checkbox"
|
|
1046
|
-
name="${
|
|
1047
|
-
value="${
|
|
1047
|
+
name="${At(this.name)}"
|
|
1048
|
+
value="${At(this.value)}"
|
|
1048
1049
|
.checked="${this.checked}"
|
|
1049
1050
|
?checked="${this.checked}"
|
|
1050
1051
|
?disabled="${this.disabled}"
|
|
1051
1052
|
?readonly="${this.readonly}"
|
|
1052
1053
|
/>
|
|
1053
1054
|
<slot></slot>
|
|
1054
|
-
</label>`}};
|
|
1055
|
+
</label>`}};Ss.styles=[ks],Ss.formAssociated=!0,Ss.shadowRootOptions={...ut.shadowRootOptions,delegatesFocus:!0},$s([$({type:String,reflect:!0})],Ss.prototype,"variant",2),$s([$({type:String,reflect:!0})],Ss.prototype,"size",2),$s([$({type:Boolean,reflect:!0})],Ss.prototype,"checked",2),$s([$({type:String,reflect:!0})],Ss.prototype,"name",2),$s([$({type:String})],Ss.prototype,"value",2),$s([$({type:Boolean,reflect:!0})],Ss.prototype,"disabled",2),$s([$({type:Boolean,reflect:!0})],Ss.prototype,"readonly",2),$s([E("#control")],Ss.prototype,"control",2),Ss=$s([A("sds-chip")],Ss);const Cs=i`
|
|
1055
1056
|
:host {
|
|
1056
1057
|
--_sds-details-text-color: var(--sds-details-text-color, var(--sds-color-text-default, var(--sds-color-main-text-default)));
|
|
1057
1058
|
|
|
@@ -1182,7 +1183,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
1182
1183
|
display: inline;
|
|
1183
1184
|
margin: 0;
|
|
1184
1185
|
}
|
|
1185
|
-
`;var
|
|
1186
|
+
`;var Es=Object.defineProperty,Os=Object.getOwnPropertyDescriptor,As=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?Os(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&Es(s,e,a),a};let qs=class extends(zt(ut)){constructor(){super(...arguments),this.open=!1,this.standalone=!1,this.name=void 0,this._handleToggle=t=>{const s=t.currentTarget;this.open!==s.open&&(this.open=s.open),this.dispatchSheriffEvent("sds-toggle",{open:s.open})}}render(){return Q`
|
|
1186
1187
|
<details class="sds-details" .name="${this.name??""}" ?data-standalone="${this.standalone}" ?open="${this.open}" @toggle="${this._handleToggle}">
|
|
1187
1188
|
<summary class="sds-details__summary">
|
|
1188
1189
|
<sds-icon name="chevron_up-material-filled"></sds-icon>
|
|
@@ -1194,7 +1195,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
1194
1195
|
<slot></slot>
|
|
1195
1196
|
</div>
|
|
1196
1197
|
</details>
|
|
1197
|
-
`}};
|
|
1198
|
+
`}};qs.styles=[Cs],As([$({type:Boolean,reflect:!0})],qs.prototype,"open",2),As([$({type:Boolean,reflect:!0})],qs.prototype,"standalone",2),As([$({type:String,reflect:!0})],qs.prototype,"name",2),qs=As([A("sds-details")],qs);const Ps=i`
|
|
1198
1199
|
:host {
|
|
1199
1200
|
--_sds-dialog-background-color: var(--sds-dialog-background-color, var(--sds-color-surface-default, var(--sds-color-main-surface-default)));
|
|
1200
1201
|
--_sds-dialog-backdrop-color: var(--sds-dialog-backdrop-color, rgba(0, 0, 0, 0.5));
|
|
@@ -1306,7 +1307,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
1306
1307
|
--_sds-dialog-animation-duration: 0ms;
|
|
1307
1308
|
}
|
|
1308
1309
|
}
|
|
1309
|
-
`;var
|
|
1310
|
+
`;var Ds=Object.defineProperty,Ls=Object.getOwnPropertyDescriptor,Vs=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?Ls(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&Ds(s,e,a),a};let Rs=class extends(zt(ut)){constructor(){super(...arguments),this.open=!1,this.modal=!1,this.closedby="closerequest",this.closeButtonLabel="Lukk dialogvindu",this._handleClose=()=>{this.open=!1,this.dispatchSheriffEvent("sds-close")},this._handleClick=t=>{const s=t.target;if(s?.closest('[data-command="close"]'))return void this._closeDialog();if(s!==this._dialog)return;if("any"!==this.closedby)return;if("closedBy"in this._dialog)return;const{clientX:e,clientY:o}=t,{top:r,bottom:a,left:i,right:d}=this._dialog.getBoundingClientRect();(r>o||a<o||i>e||d<e)&&this._closeDialog()},this._handleCancel=t=>{"none"===this.closedby&&t.preventDefault()},this._handleAutoFocus=()=>{const t=this.shadowRoot?.querySelector("slot:not([name])")?.assignedElements({flatten:!0});if(!t||0===t.length)return;const s=t.find(t=>null!=t.getAttribute("autofocus"));s instanceof HTMLElement&&document.activeElement!==s&&s.focus()}}firstUpdated(){this._setupEventListeners(),this.open&&this._openDialog()}updated(t){t.has("open")&&(this.open?this._openDialog():this._closeDialog())}_setupEventListeners(){this._dialog.addEventListener("close",this._handleClose),this._dialog.addEventListener("cancel",this._handleCancel),this._dialog.addEventListener("click",this._handleClick),this._dialog.addEventListener("animationend",this._handleAutoFocus)}_openDialog(){this._dialog&&(this.modal?this._dialog.showModal():this._dialog.show())}_closeDialog(){this._dialog&&this._dialog.close()}show(){this.open=!0}showModal(){this.modal=!0,this.open=!0}close(){this.open=!1}render(){const t=0===this.headerSlotElements.length;return Q`
|
|
1310
1311
|
<dialog closedby="${this.closedby}" class=${t?"sds-dialog__empty-header":""}>
|
|
1311
1312
|
<div class="sds-dialog__header">
|
|
1312
1313
|
<slot name="header"></slot>
|
|
@@ -1319,7 +1320,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
1319
1320
|
<slot></slot>
|
|
1320
1321
|
<slot name="footer"></slot>
|
|
1321
1322
|
</dialog>
|
|
1322
|
-
`}};
|
|
1323
|
+
`}};Rs.styles=[Ps],Vs([$({type:Boolean,reflect:!0})],Rs.prototype,"open",2),Vs([$({type:Boolean,reflect:!0})],Rs.prototype,"modal",2),Vs([$({type:String,reflect:!0})],Rs.prototype,"closedby",2),Vs([$({type:String,attribute:"close-button-label"})],Rs.prototype,"closeButtonLabel",2),Vs([E("dialog")],Rs.prototype,"_dialog",2),Vs([O({slot:"header",flatten:!1})],Rs.prototype,"headerSlotElements",2),Rs=Vs([A("sds-dialog")],Rs);const Ms=i`
|
|
1323
1324
|
:host {
|
|
1324
1325
|
--_sds-heading-font-family: var(--sds-heading-font-family, var(--sds-typography-font-family-roboto));
|
|
1325
1326
|
--_sds-heading-text-color: var(--sds-heading-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
|
|
@@ -1472,7 +1473,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
1472
1473
|
--_sds-heading-line-height: var(--sds-heading-line-height, var(--sds-typography-heading-xs-desktop-line-height));
|
|
1473
1474
|
}
|
|
1474
1475
|
}
|
|
1475
|
-
`;var
|
|
1476
|
+
`;var Bs=Object.defineProperty,Ts=(t,s,e,o)=>{for(var r,a=void 0,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(s,e,a)||a);return a&&Bs(s,e,a),a};const Is=class extends ut{constructor(){super(...arguments),this.level="h1"}render(){const t={"sds-heading":!0,"sds-heading--xl":"xl"===this.size,"sds-heading--lg":"l"===this.size||"lg"===this.size,"sds-heading--md":"m"===this.size||"md"===this.size,"sds-heading--sm":"s"===this.size||"sm"===this.size,"sds-heading--xs":"xs"===this.size};switch(this.level?.toLowerCase()){case"h1":default:return Q`<h1 class=${Yt(t)}><slot></slot></h1>`;case"h2":return Q`<h2 class=${Yt(t)}><slot></slot></h2>`;case"h3":return Q`<h3 class=${Yt(t)}><slot></slot></h3>`;case"h4":return Q`<h4 class=${Yt(t)}><slot></slot></h4>`;case"h5":return Q`<h5 class=${Yt(t)}><slot></slot></h5>`;case"h6":return Q`<h6 class=${Yt(t)}><slot></slot></h6>`}}};Is.styles=[Ms];let js=Is;Ts([$({type:String,reflect:!0})],js.prototype,"level"),Ts([$({type:String,reflect:!0})],js.prototype,"size");var Fs=Object.getOwnPropertyDescriptor;let Ns=class extends js{};Ns=((t,s,e,o)=>{for(var r,a=o>1?void 0:o?Fs(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(a)||a);return a})([A("sds-heading")],Ns);const Us=i`
|
|
1476
1477
|
:host {
|
|
1477
1478
|
--_sds-loader-main-color: var(--sds-loader-main-color, var(--sds-color-action-contrast-default, var(--sds-color-main-action-contrast-default)));
|
|
1478
1479
|
--_sds-loader-secondary-color: var(--sds-loader-secondary-color, var(--sds-color-border-subtle, var(--sds-color-main-border-subtle)));
|
|
@@ -1548,10 +1549,10 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
1548
1549
|
stroke-dashoffset: -120px;
|
|
1549
1550
|
}
|
|
1550
1551
|
}
|
|
1551
|
-
`;var
|
|
1552
|
+
`;var Hs=Object.defineProperty,Ks=Object.getOwnPropertyDescriptor,Ws=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?Ks(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&Hs(s,e,a),a};let Gs=class extends ut{constructor(){super(...arguments),this.size="md",this.contrast=!1}render(){return Q`<svg aria-label="Laster" class="sds-loader" role="img" viewBox="0 0 50 50">
|
|
1552
1553
|
<circle class="sds-loader__background" cx="25" cy="25" r="20" fill="none" stroke-width="7"></circle>
|
|
1553
1554
|
<circle class="sds-loader__circle" cx="25" cy="25" r="20" fill="none" stroke-width="7"></circle>
|
|
1554
|
-
</svg>`}};
|
|
1555
|
+
</svg>`}};Gs.styles=[Us],Ws([$({type:String,reflect:!0})],Gs.prototype,"size",2),Ws([$({type:Boolean,reflect:!0})],Gs.prototype,"contrast",2),Gs=Ws([A("sds-loader")],Gs);const Ys=i`
|
|
1555
1556
|
:host {
|
|
1556
1557
|
--_sds-notification-background-color: var(--sds-notification-background-color, var(--sds-color-alert-info-surface-tinted));
|
|
1557
1558
|
|
|
@@ -1688,9 +1689,9 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
1688
1689
|
margin: 0 !important;
|
|
1689
1690
|
max-width: var(--_sds-notification-max-line-width) !important;
|
|
1690
1691
|
}
|
|
1691
|
-
`;var
|
|
1692
|
+
`;var Zs=Object.defineProperty,Qs=Object.getOwnPropertyDescriptor,Xs=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?Qs(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&Zs(s,e,a),a};const Js={info:"InformationSquareFill-aksel-filled",success:"check_circle-material-filled",attention:"warning-material-filled",warning:"warning-material-filled",danger:"dangerous-material-filled",critical:"dangerous-material-filled"};let te=!1,se=class extends(zt(ut)){constructor(){super(),this.variant="info",this._remove=()=>{this.dispatchSheriffEvent("sds-remove")},te||(te=!0,console.warn("[Sheriff] The Notification component is deprecated and will be removed in the next major release. Please migrate to the Alert component."))}updated(t){t.has("variant")&&"critical"===this.variant?this.variant="danger":t.has("variant")&&"warning"===this.variant&&(this.variant="attention")}render(){const t="danger"===this.variant||"critical"===this.variant?"danger":"accent";return Q`<div class="${Yt({"sds-notification":!0})}">
|
|
1692
1693
|
<div class="sds-notification__type">
|
|
1693
|
-
<sds-icon class="sds-notification__icon" name="${
|
|
1694
|
+
<sds-icon class="sds-notification__icon" name="${Js[this.variant]}" size="md"></sds-icon>
|
|
1694
1695
|
</div>
|
|
1695
1696
|
<div class="sds-notification__content">
|
|
1696
1697
|
<slot name="title"></slot>
|
|
@@ -1701,7 +1702,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
1701
1702
|
<sds-icon name="close-material-outlined" size="sm"></sds-icon>
|
|
1702
1703
|
</sds-button>
|
|
1703
1704
|
</div>`:J}
|
|
1704
|
-
</div>`}};
|
|
1705
|
+
</div>`}};se.styles=[Ys],Xs([$({type:String,reflect:!0})],se.prototype,"variant",2),Xs([$({type:String,attribute:"removable-label",reflect:!0})],se.prototype,"removableLabel",2),se=Xs([A("sds-notification")],se);const ee=i`
|
|
1705
1706
|
:host {
|
|
1706
1707
|
--_sds-radio-font-family: var(--sds-radio-font-family, var(--sds-typography-font-family-roboto));
|
|
1707
1708
|
--_sds-radio-disabled-opacity: var(--sds-radio-disabled-opacity, var(--sds-color-states-disabled-opacity));
|
|
@@ -1903,13 +1904,13 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
1903
1904
|
margin-block-start: -1px;
|
|
1904
1905
|
}
|
|
1905
1906
|
}
|
|
1906
|
-
`;var
|
|
1907
|
-
<div class="${
|
|
1907
|
+
`;var oe=Object.defineProperty,re=Object.getOwnPropertyDescriptor,ae=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?re(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&oe(s,e,a),a};let ie=class extends(zt(ut)){constructor(){super(),this.required=!1,this.label="",this.hideLabel=!1,this.value="on",this.checked=!1,this.error=!1,this.readOnly=!1,this.size="md",this._disabled=!1,this._disabledIsAuthorControlled=!1,this._settingDisabledFromParent=!1,this._parentRequestDisabled=!1,this._initialChecked=!1,this._handleKeydown=t=>{if(!this.name||this.disabled||this.readOnly)return;const s=this.getRootNode(),e=Array.from(s.querySelectorAll(`sds-radio[name="${this.name}"]`)),o=e.indexOf(this);if(-1===o)return;let r=null;switch(t.key){case"ArrowUp":case"ArrowLeft":r=o>0?o-1:e.length-1;break;case"ArrowDown":case"ArrowRight":r=o<e.length-1?o+1:0;break;default:return}const a=e[r];a?.focus(),a?.click(),t.preventDefault()},this._handleChange=t=>{if(this.disabled||this.readOnly)return t.target.checked=this.checked??!1,void t.preventDefault();const s=t.target;this.checked=s.checked,this.checked&&this._uncheckSiblings(),this._updateGroupValidation(),this.dispatchSheriffEvent("change")},this._handleFocus=t=>{t.stopImmediatePropagation(),this.dispatchSheriffEvent("focus")},this._handleBlur=t=>{t.stopImmediatePropagation(),this.dispatchSheriffEvent("blur")},this.internals=this.attachInternals()}get disabled(){return this._disabled}set disabled(t){const s=t??!1,e=this._disabled;e!==s&&(this._disabled=s,this.requestUpdate("disabled",e),this._settingDisabledFromParent||(this._disabledIsAuthorControlled=s))}get parentRequestDisabled(){return this._parentRequestDisabled}set parentRequestDisabled(t){const s=t??!1,e=this._parentRequestDisabled;e!==s&&(this._parentRequestDisabled=s,this.requestUpdate("parentRequestDisabled",e),this._disabledIsAuthorControlled||(this._settingDisabledFromParent=!0,this.disabled=s,this._settingDisabledFromParent=!1))}connectedCallback(){super.connectedCallback(),this.internals.role="radio",this._initialChecked||(this._initialChecked=this.checked??!1),this.addEventListener("keydown",this._handleKeydown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleKeydown)}firstUpdated(t){super.firstUpdated(t),this._updateGroupValidation()}updated(t){super.updated(t),t.has("checked")&&(this.checked?(this._uncheckSiblings(),this.internals.setFormValue(this.value??null)):this.internals.setFormValue(null),this._updateGroupValidation()),t.has("required")&&this.control&&(this.control.required=this.required??!1),this._disabledIsAuthorControlled||this.disabled===this._parentRequestDisabled||(this._settingDisabledFromParent=!0,this.disabled=this._parentRequestDisabled??!1,this._settingDisabledFromParent=!1)}_getGroupRadios(){if(!this.name)return[this];const t=this.getRootNode();return Array.from(t.querySelectorAll(`sds-radio[name="${this.name}"]`))}_updateGroupValidation(){const t=this._getGroupRadios(),s=t.some(t=>t.checked),e=t.some(t=>t.required);t.forEach(t=>{t.control&&(e?t.internals.setValidity(s?{}:{valueMissing:!0},s?"":t.control.validationMessage,t.control):t.internals.setValidity({}))})}formResetCallback(){this.checked=this._initialChecked,this.control.checked=this._initialChecked,this.internals.setFormValue(this.checked?this.value??"on":null),this._updateGroupValidation()}_uncheckSiblings(){if(!this.name)return;const t=this._getGroupRadios();for(const s of t)s!==this&&s.checked&&(s.checked=!1,s.internals.setFormValue(null))}get form(){return this.internals.form}get type(){return"radio"}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}get willValidate(){return this.internals.willValidate}checkValidity(){return this.internals.checkValidity()}reportValidity(){return this.internals.reportValidity()}setCustomValidity(t){this.internals.setValidity({customError:!!t},t)}formDisabledCallback(t){this._settingDisabledFromParent=!0,this.disabled=t,this._settingDisabledFromParent=!1,this.control&&(this.control.disabled=t)}focus(){this.disabled||this.shadowRoot?.querySelector("input")?.focus()}blur(){this.disabled||this.shadowRoot?.querySelector("input")?.blur()}click(){this.disabled||this.readOnly||this.shadowRoot?.querySelector("input")?.click()}render(){const t={"sds-radio":!0,"sds-radio--error":Boolean(this.error)},s={"sds-radio__input":!0,"sds-radio__input--error":Boolean(this.error)};return Q`
|
|
1908
|
+
<div class="${Yt(t)}">
|
|
1908
1909
|
<input
|
|
1909
1910
|
id="control"
|
|
1910
1911
|
type="radio"
|
|
1911
|
-
name="${
|
|
1912
|
-
value="${
|
|
1912
|
+
name="${At(this.name)}"
|
|
1913
|
+
value="${At(this.value)}"
|
|
1913
1914
|
?checked="${this.checked??!1}"
|
|
1914
1915
|
.checked="${this.checked??!1}"
|
|
1915
1916
|
?disabled="${this.disabled??!1}"
|
|
@@ -1919,12 +1920,12 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
1919
1920
|
@change="${this._handleChange}"
|
|
1920
1921
|
@focus="${this._handleFocus}"
|
|
1921
1922
|
@blur="${this._handleBlur}"
|
|
1922
|
-
class="${
|
|
1923
|
+
class="${Yt(s)}"
|
|
1923
1924
|
/>
|
|
1924
1925
|
${this.label?Q`<label class="sds-radio__label" for="control">${this.label}</label>`:J}
|
|
1925
1926
|
${this.helpText?Q`<span class="sds-radio__help-text">${this.helpText}</span>`:J}
|
|
1926
1927
|
</div>
|
|
1927
|
-
`}};
|
|
1928
|
+
`}};ie.styles=[ee],ie.formAssociated=!0,ie.shadowRootOptions={...ut.shadowRootOptions,delegatesFocus:!0},ae([$({type:Boolean,reflect:!0})],ie.prototype,"required",2),ae([$({type:String,reflect:!0})],ie.prototype,"label",2),ae([$({type:Boolean,reflect:!0,attribute:"hide-label"})],ie.prototype,"hideLabel",2),ae([$({type:String,reflect:!0})],ie.prototype,"name",2),ae([$({type:String})],ie.prototype,"value",2),ae([$({type:Boolean,reflect:!0})],ie.prototype,"checked",2),ae([$({type:Boolean,reflect:!0})],ie.prototype,"error",2),ae([$({type:Boolean,attribute:"readonly",reflect:!0})],ie.prototype,"readOnly",2),ae([$({type:String,reflect:!0})],ie.prototype,"size",2),ae([$({type:String,attribute:"help-text"})],ie.prototype,"helpText",2),ae([$({type:Boolean,reflect:!0})],ie.prototype,"disabled",1),ae([$({type:Boolean,attribute:!1})],ie.prototype,"parentRequestDisabled",1),ae([E("#control")],ie.prototype,"control",2),ie=ae([A("sds-radio")],ie);const de=i`
|
|
1928
1929
|
:host {
|
|
1929
1930
|
--_sds-radio-group-gap: var(--sds-radio-group-gap, var(--sds-spacing-xs));
|
|
1930
1931
|
--_sds-radio-group-row-gap: var(--sds-radio-group-row-gap, var(--sds-spacing-md));
|
|
@@ -2022,18 +2023,18 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2022
2023
|
--_sds-radio-group-help-text-font-size: var(--sds-radio-group-help-text-font-size, var(--sds-components-font-size-content-lg));
|
|
2023
2024
|
--_sds-radio-group-help-text-line-height: var(--sds-radio-group-help-text-line-height, var(--sds-components-line-height-squeezed-lg));
|
|
2024
2025
|
}
|
|
2025
|
-
`;var
|
|
2026
|
-
<fieldset class="${
|
|
2026
|
+
`;var ne=Object.defineProperty,le=Object.getOwnPropertyDescriptor,ce=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?le(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&ne(s,e,a),a};const he=["disabled","errorMessage","readOnly","required","size"];let pe=class extends(zt(ut)){constructor(){super(...arguments),this.readOnly=!1,this.direction="column",this.disabled=!1,this.required=!1,this.size="md",this._selectedValue=null,this._handleRadioChange=t=>{const s=t.composedPath().find(t=>t instanceof HTMLElement&&"SDS-RADIO"===t.tagName);s&&(this._selectedValue=s.getAttribute("value")||null,this.dispatchSheriffEvent("sds-update"))},this._handleSlotChange=()=>{this._updateChildProps([...he])}}_getChildRadios(){return this._slotElement?.assignedElements({flatten:!0}).filter(t=>"SDS-RADIO"===t.tagName)??[]}_updateChildProps(t){const s=this._getChildRadios();for(const e of s)for(const s of t)switch(s){case"readOnly":e.readOnly=this.readOnly;break;case"disabled":e.parentRequestDisabled=this.disabled;break;case"errorMessage":e.error=Boolean(this.errorMessage);break;case"required":e.required=this.required;break;case"size":e.size=this.size}}updated(t){super.updated(t);const s=Array.from(t.keys());(s.includes("errorMessage")||s.includes("error-message"))&&this._updateChildProps(["errorMessage"])}attributeChangedCallback(t,s,e){if(super.attributeChangedCallback(t,s,e),"readonly"===t)return void this._updateChildProps(["readOnly"]);const o=t;he.includes(o)&&this._updateChildProps([o])}render(){const t={"sds-radio-group":!0,"sds-radio-group--readonly":this.readOnly??!1,"sds-radio-group--disabled":this.disabled??!1},s={"sds-radio-group__radios":!0,"sds-radio-group--column":"column"===this.direction,"sds-radio-group--row":"row"===this.direction};return Q`
|
|
2027
|
+
<fieldset class="${Yt(t)}">
|
|
2027
2028
|
${this.legend?Q`<legend class="sds-radio-group__legend">${this.readOnly?Q`<sds-icon name="lock-material-filled" size="md"></sds-icon>`:J}${this.legend}</legend>`:J}
|
|
2028
2029
|
${this.helpText?Q`<p class="sds-radio-group__help-text">${this.helpText}</p>`:J}
|
|
2029
|
-
<div class="${
|
|
2030
|
+
<div class="${Yt(s)}" @change=${this._handleRadioChange}>
|
|
2030
2031
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
2031
2032
|
</div>
|
|
2032
2033
|
${this.errorMessage?Q`<sds-alert variant="secondary" data-palette="danger">
|
|
2033
2034
|
<p slot="message">${this.errorMessage}</p>
|
|
2034
2035
|
</sds-alert>`:J}
|
|
2035
2036
|
</fieldset>
|
|
2036
|
-
`}get value(){return{selectedValue:this._selectedValue}}};
|
|
2037
|
+
`}get value(){return{selectedValue:this._selectedValue}}};pe.styles=[de],ce([$({type:String})],pe.prototype,"legend",2),ce([$({type:String,attribute:"help-text"})],pe.prototype,"helpText",2),ce([$({type:String,attribute:"error-message"})],pe.prototype,"errorMessage",2),ce([$({type:Boolean,attribute:"readonly",reflect:!0})],pe.prototype,"readOnly",2),ce([$({type:String})],pe.prototype,"direction",2),ce([$({type:Boolean,reflect:!0})],pe.prototype,"disabled",2),ce([$({type:Boolean,reflect:!0})],pe.prototype,"required",2),ce([$({type:String,reflect:!0})],pe.prototype,"size",2),ce([S()],pe.prototype,"_selectedValue",2),ce([E("slot")],pe.prototype,"_slotElement",2),pe=ce([A("sds-radio-group")],pe);const ge=i`
|
|
2037
2038
|
:host {
|
|
2038
2039
|
--_sds-select-background-color: var(--sds-select-background-color, var(--sds-color-background-default, var(--sds-color-neutral-background-default)));
|
|
2039
2040
|
--_sds-select-text-color: var(--sds-select-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
|
|
@@ -2209,8 +2210,8 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2209
2210
|
--_sds-select-helptext-font-size: var(--sds-select-helptext-font-size, var(--sds-components-font-size-content-lg));
|
|
2210
2211
|
--_sds-select-helptext-line-height: var(--sds-select-helptext-line-height, var(--sds-components-line-height-squeezed-lg));
|
|
2211
2212
|
}
|
|
2212
|
-
`;var
|
|
2213
|
-
<div class="${
|
|
2213
|
+
`;var ve=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,fe=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?ue(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&ve(s,e,a),a};let be=class extends(zt(ut)){constructor(){super(),this.disabled=!1,this.required=!1,this.readOnly=!1,this.size="md",this._defaultValue=null,this._pendingLightDomSync=!1,this._handleSlotChange=()=>{if(null==this.value){const t=this.getLightDomSelectedValue();null!=t&&(this.value=t)}this._scheduleLightDomSync()},this._handleChange=t=>{t.stopImmediatePropagation(),t.target instanceof HTMLSelectElement&&(this.disabled||this.readOnly?t.target.value=this.value??"":(this.value=t.target.value,this._setFormValue(this.value),this.updateValidity(),this.dispatchSheriffEvent("input"),this.dispatchSheriffEvent("change")))},this._handleFocus=t=>{t.stopImmediatePropagation(),this.dispatchSheriffEvent("focus")},this._handleBlur=t=>{t.stopImmediatePropagation(),this.updateValidity(),this.dispatchSheriffEvent("blur")},this._handleKeyDown=t=>{if(!this.readOnly)return;/* @__PURE__ */new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown"," ","Enter"]).has(t.key)&&(t.preventDefault(),t.stopImmediatePropagation())},this.internals=this.attachInternals()}connectedCallback(){if(super.connectedCallback(),null==this.value){const t=Array.from(this.querySelectorAll("option")).find(t=>t.hasAttribute("selected")||t.defaultSelected);t&&(this.value=t.value)}this._startObservingLightDom()}disconnectedCallback(){this._stopObservingLightDom(),super.disconnectedCallback()}firstUpdated(){const t=this.control?.value??"";this.value=this.value??this.defaultValue??t,this.control.value=this.value??"",this._defaultValue=this.value??null,this.internals.setFormValue(this._defaultValue),this.updateValidity()}updated(t){this.control&&t.has("value")&&(this.control.value=this.value??"",this._setFormValue(this.value),this.updateValidity())}_setFormValue(t){this.internals.setFormValue(null==t?null:t)}_scheduleLightDomSync(){this._pendingLightDomSync||(this._pendingLightDomSync=!0,queueMicrotask(()=>{this._pendingLightDomSync=!1;const t=this.getLightDomSelectedValue();void 0!==t&&t!==this.value&&(this.value=t),this.requestUpdate(),this.updateComplete.then(()=>{this.control&&(this.control.value=this.value??"",this._setFormValue(this.value),this.updateValidity())})}))}_startObservingLightDom(){this._lightDomObserver||(this._lightDomObserver=new MutationObserver(t=>{for(const s of t){if("childList"===s.type)return void this._scheduleLightDomSync();if("characterData"===s.type)return void this._scheduleLightDomSync();if("attributes"===s.type){const t=s.target;if(!(t instanceof HTMLElement))continue;const e=t.tagName;if("OPTION"===e||"OPTGROUP"===e||"HR"===e)return void this._scheduleLightDomSync()}}}),this._lightDomObserver.observe(this,{subtree:!0,childList:!0,attributes:!0,characterData:!0}))}_stopObservingLightDom(){this._lightDomObserver?.disconnect(),this._lightDomObserver=void 0,this._pendingLightDomSync=!1}updateValidity(){this.control&&(this.control.checkValidity()?this.internals.setValidity({}):this.internals.setValidity({customError:!0},this.control.validationMessage,this.control))}getLightDomSelectedValue(){const t=Array.from(this.querySelectorAll("option")).find(t=>t.hasAttribute("selected")||t.defaultSelected);return t?.value}formResetCallback(){this.internals.setFormValue(this._defaultValue);const t=this._defaultValue??"";this.control&&(this.control.value=t),this.value=this._defaultValue??"",this.updateValidity()}focus(){this.disabled||this.readOnly||!this.control||this.control.focus()}blur(){this.disabled||this.readOnly||!this.control||this.control.blur()}click(){this.disabled||this.readOnly||!this.control||this.control.click()}renderFromLightDom(){const t=this.children??[];return Array.from(t).filter(t=>t instanceof HTMLElement).map(t=>{switch(t.tagName){case"OPTION":return this.renderOption(t);case"OPTGROUP":return this.renderOptgroup(t);case"HR":return Q`<hr />`;default:return J}})}renderOption(t){const s=t.getAttribute("value"),e=t.value,o=null!=this.value&&e===this.value;return Q` <option value=${At(null===s?void 0:s)} ?disabled=${t.disabled} .selected=${o}>${t.text}</option> `}renderOptgroup(t){const s=Array.from(t.querySelectorAll("option"));return Q` <optgroup label=${At(t.label||void 0)} ?disabled=${t.disabled}>${s.map(t=>this.renderOption(t))}</optgroup> `}render(){const t={"sds-select":!0,"sds-select--error":Boolean(this.errorMessage)};return Q`
|
|
2214
|
+
<div class="${Yt(t)}">
|
|
2214
2215
|
${this.label?Q` <label for="select" class="sds-select__label"> ${this.readOnly?Q`<sds-icon name="lock-material-filled" size="m"></sds-icon>`:J} ${this.label} </label> `:J}
|
|
2215
2216
|
${this.helpText?Q`<p class="sds-select__help-text">${this.helpText}</p>`:J}
|
|
2216
2217
|
|
|
@@ -2221,10 +2222,10 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2221
2222
|
<select
|
|
2222
2223
|
id="select"
|
|
2223
2224
|
class="sds-select__control"
|
|
2224
|
-
name=${
|
|
2225
|
+
name=${At(this.name)}
|
|
2225
2226
|
?disabled=${this.disabled}
|
|
2226
2227
|
?required=${this.required}
|
|
2227
|
-
aria-readonly=${
|
|
2228
|
+
aria-readonly=${At(this.readOnly)}
|
|
2228
2229
|
aria-invalid=${this.errorMessage?"true":"false"}
|
|
2229
2230
|
@keydown=${this._handleKeyDown}
|
|
2230
2231
|
@change=${this._handleChange}
|
|
@@ -2240,7 +2241,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2240
2241
|
</sds-alert>
|
|
2241
2242
|
`:J}
|
|
2242
2243
|
</div>
|
|
2243
|
-
`}};
|
|
2244
|
+
`}};be.styles=[ge],be.formAssociated=!0,be.shadowRootOptions={...ut.shadowRootOptions,delegatesFocus:!0},fe([$({type:String,reflect:!0})],be.prototype,"name",2),fe([$({type:String,reflect:!0})],be.prototype,"label",2),fe([$({type:String,attribute:!1})],be.prototype,"value",2),fe([$({type:String,attribute:"default-value"})],be.prototype,"defaultValue",2),fe([$({type:String,attribute:"help-text",reflect:!0})],be.prototype,"helpText",2),fe([$({type:String,attribute:"error-message",reflect:!0})],be.prototype,"errorMessage",2),fe([$({type:Boolean,reflect:!0})],be.prototype,"disabled",2),fe([$({type:Boolean,reflect:!0})],be.prototype,"required",2),fe([$({type:Boolean,attribute:"readonly",reflect:!0})],be.prototype,"readOnly",2),fe([$({type:String,reflect:!0})],be.prototype,"size",2),fe([E("#select")],be.prototype,"control",2),be=fe([A("sds-select")],be);const _e=i`
|
|
2244
2245
|
:host {
|
|
2245
2246
|
/* Sizing */
|
|
2246
2247
|
--_sds-stepper-step-circle-size: var(--sds-stepper-circle-size, 32px);
|
|
@@ -2498,7 +2499,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2498
2499
|
--_sds-stepper-step-counter-border-color: var(--sds-stepper-step-counter-border-color, var(--sds-color-neutral-border-strong));
|
|
2499
2500
|
--_sds-stepper-step-counter-text-color: var(--sds-stepper-step-counter-text-color, var(--sds-color-neutral-text-default));
|
|
2500
2501
|
}
|
|
2501
|
-
`;var
|
|
2502
|
+
`;var me=Object.defineProperty,xe=Object.getOwnPropertyDescriptor,ye=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?xe(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&me(s,e,a),a};let ke=class extends(zt(ut)){constructor(){super(),this.complete=!1,this.interactive=!1,this.active=!1,this._handleClick=t=>{t.preventDefault(),t.stopImmediatePropagation(),this.dispatchSheriffEvent("_sds-step-clicked")},this._renderNonInteractiveStep=()=>Q`<div class="sds-stepper-step__step--static">
|
|
2502
2503
|
<span class="sds-stepper-step__counter"></span>
|
|
2503
2504
|
<div class="sds-stepper-step__label"><slot></slot></div>
|
|
2504
2505
|
</div>`,this._renderInteractiveStep=()=>Q`<button type="button" role="tab" aria-selected="${this.active?"true":"false"}" id="button" class="sds-stepper-step__step" @click="${this._handleClick}">
|
|
@@ -2512,7 +2513,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2512
2513
|
<span class="sds-stepper-step__divider sds-stepper-step__divider--before"></span>
|
|
2513
2514
|
${this._renderNonInteractiveStep()}
|
|
2514
2515
|
<span class="sds-stepper-step__divider sds-stepper-step__divider--after"></span>
|
|
2515
|
-
</div>`}};
|
|
2516
|
+
</div>`}};ke.styles=[_e],ke.shadowRootOptions={...ut.shadowRootOptions,delegatesFocus:!0},ye([$({type:Boolean,reflect:!0})],ke.prototype,"complete",2),ye([$({type:Boolean,reflect:!0})],ke.prototype,"interactive",2),ye([$({type:Boolean,reflect:!0})],ke.prototype,"active",2),ke=ye([A("sds-stepper-step")],ke);const we=i`
|
|
2516
2517
|
:host {
|
|
2517
2518
|
display: flex;
|
|
2518
2519
|
flex-direction: row;
|
|
@@ -2546,7 +2547,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2546
2547
|
|
|
2547
2548
|
--sds-stepper-step-step-gap: 0 var(--sds-spacing-3xs);
|
|
2548
2549
|
}
|
|
2549
|
-
`;var
|
|
2550
|
+
`;var ze=Object.defineProperty,$e=Object.getOwnPropertyDescriptor,Se=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?$e(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&ze(s,e,a),a};let Ce=class extends(zt(ut)){constructor(){super(),this.orientation="horizontal",this._setActiveStep=(t,s)=>{t.forEach((t,e)=>{t.active=e===s})},this._handleChildClick=t=>{t.preventDefault(),t.stopImmediatePropagation();const s=t.composedPath().find(t=>t instanceof ke);if(!s)return;const e=this.steps.indexOf(s);-1!==e&&(this._setActiveStep(this.steps,e),this.dispatchSheriffEvent("change",{index:e}))},this.role="tablist",this.internals=this.attachInternals()}getActiveStep(){return this.steps.findIndex(t=>t.active)}connectedCallback(){super.connectedCallback(),this.hasAttribute("aria-label")||(this.ariaLabel="Steg")}goToStep(t){t<0||t>=this.steps.length||(this._setActiveStep(this.steps,t),this.dispatchSheriffEvent("change",{index:t}))}_applyStepNumbers(){this.steps.forEach((t,s)=>{t.style.setProperty("--sds-stepper-step-counter-content",`"${s+1}"`)})}firstUpdated(){const t=navigator.userAgent;if(/safari/i.test(t)&&!/chrome/i.test(t)&&!/crios/i.test(t)&&!/edgios/i.test(t)&&!/fxios/i.test(t)){this.shadowRoot.querySelector("slot").addEventListener("slotchange",()=>this._applyStepNumbers()),this._applyStepNumbers()}}render(){return Q`<slot @_sds-step-clicked="${this._handleChildClick}"></slot>`}};Ce.styles=[we],Se([$({type:String,reflect:!0})],Ce.prototype,"orientation",2),Se([O({selector:"sds-stepper-step",flatten:!0})],Ce.prototype,"steps",2),Ce=Se([A("sds-stepper")],Ce);const Ee=i`
|
|
2550
2551
|
:host {
|
|
2551
2552
|
--_sds-switch-background-color: var(--sds-switch-background-color, var(--sds-color-surface-default, var(--sds-color-neutral-surface-default)));
|
|
2552
2553
|
--_sds-switch-text-color: var(--sds-switch-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
|
|
@@ -2696,7 +2697,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2696
2697
|
.sds-switch__input:checked::before {
|
|
2697
2698
|
--_sds-switch-button-position: calc(var(--_sds-switch-width) - var(--_sds-switch-button-size) - var(--_sds-switch-button-gap) - var(--_sds-switch-border-width));
|
|
2698
2699
|
}
|
|
2699
|
-
`;var
|
|
2700
|
+
`;var Oe=Object.defineProperty,Ae=Object.getOwnPropertyDescriptor,qe=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?Ae(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&Oe(s,e,a),a};let Pe=class extends(zt(ut)){constructor(){super(),this.disabled=!1,this.label="",this.hideLabel=!1,this.reverse=!1,this.checked=!1,this.readOnly=!1,this.size="md",this._initialChecked=!1,this._handleChange=t=>{if(t.stopImmediatePropagation(),!this.disabled){const s=t.target;this.checked=s.checked,this.internals.setFormValue(this.checked?"on":"off"),this.dispatchSheriffEvent("change")}},this._handleFocus=t=>{t.stopImmediatePropagation(),this.disabled||this.dispatchSheriffEvent("focus")},this._handleBlur=t=>{t.stopImmediatePropagation(),this.disabled||this.disabled||this.dispatchSheriffEvent("blur")},this.getIconSize=()=>{switch(this.size){case"sm":case"md":case"lg":return this.size;case"l":return"lg";case"s":return"sm"}},this.internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this._initialChecked=this.checked,this.internals.setFormValue(this.checked?"on":"off")}updated(t){t.has("checked")&&(this.control.checked=this.checked,this.internals.setFormValue(this.checked?"on":"off"))}formResetCallback(){this.checked=this._initialChecked,this.control.checked=this._initialChecked,this.internals.setFormValue(this._initialChecked?"on":"off")}formStateRestoreCallback(t){this.checked=t}get value(){return this.checked?"on":"off"}render(){const t={"sds-switch__label":!0,"sds-switch__label--hidden":this.hideLabel},s=Q`<input
|
|
2700
2701
|
class="sds-switch__input"
|
|
2701
2702
|
id="control"
|
|
2702
2703
|
type="checkbox"
|
|
@@ -2705,11 +2706,11 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2705
2706
|
?disabled="${this.disabled}"
|
|
2706
2707
|
.checked="${this.checked}"
|
|
2707
2708
|
?checked="${this.checked}"
|
|
2708
|
-
name="${
|
|
2709
|
+
name="${At(this.name)}"
|
|
2709
2710
|
@change="${this._handleChange}"
|
|
2710
2711
|
@focus="${this._handleFocus}"
|
|
2711
2712
|
@blur="${this._handleBlur}"
|
|
2712
|
-
/>`,e=this.readOnly?Q`<sds-icon name="lock-material-filled" size="${this.getIconSize()}"></sds-icon>`:J,o=Q`<label class="${
|
|
2713
|
+
/>`,e=this.readOnly?Q`<sds-icon name="lock-material-filled" size="${this.getIconSize()}"></sds-icon>`:J,o=Q`<label class="${Yt(t)}" for="control">${e}${this.label}</label>`;return Q`<div class="${Yt({"sds-switch":!0})}">${this.reverse?[o,s]:[s,o]}</div>`}};Pe.styles=[Ee],Pe.formAssociated=!0,Pe.shadowRootOptions={...ut.shadowRootOptions,delegatesFocus:!0},qe([$({type:Boolean,reflect:!0})],Pe.prototype,"disabled",2),qe([$({type:String,reflect:!0})],Pe.prototype,"label",2),qe([$({type:Boolean,reflect:!0,attribute:"hide-label"})],Pe.prototype,"hideLabel",2),qe([$({type:String,reflect:!0})],Pe.prototype,"name",2),qe([$({type:Boolean,reflect:!0})],Pe.prototype,"reverse",2),qe([$({type:Boolean,reflect:!0})],Pe.prototype,"checked",2),qe([$({type:Boolean,attribute:"readonly",reflect:!0})],Pe.prototype,"readOnly",2),qe([$({type:String,reflect:!0})],Pe.prototype,"size",2),qe([E("#control")],Pe.prototype,"control",2),Pe=qe([A("sds-switch")],Pe);const De=i`
|
|
2713
2714
|
:host {
|
|
2714
2715
|
--_sds-tag-background-color: var(--sds-tag-background-color, var(--sds-color-surface-tinted, var(--sds-color-neutral-surface-tinted)));
|
|
2715
2716
|
--_sds-tag-text-color: var(--sds-tag-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
|
|
@@ -2770,9 +2771,9 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2770
2771
|
--_sds-tag-font-size: var(--sds-tag-font-size, var(--sds-components-font-size-content-lg));
|
|
2771
2772
|
--_sds-tag-line-height: var(--sds-tag-line-height, var(--sds-components-line-height-squeezed-lg));
|
|
2772
2773
|
}
|
|
2773
|
-
`;var
|
|
2774
|
+
`;var Le=Object.defineProperty,Ve=Object.getOwnPropertyDescriptor,Re=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?Ve(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&Le(s,e,a),a};let Me=class extends ut{constructor(){super(...arguments),this.size="md"}render(){return Q`<span class="${Yt({"sds-tag":!0})}">
|
|
2774
2775
|
<slot></slot>
|
|
2775
|
-
</span>`}};
|
|
2776
|
+
</span>`}};Me.styles=[De],Re([$({type:String,reflect:!0})],Me.prototype,"size",2),Me=Re([A("sds-tag")],Me);const Be=i`
|
|
2776
2777
|
:host {
|
|
2777
2778
|
--_sds-text-font-family: var(--sds-text-font-family, var(--sds-typography-font-family-roboto));
|
|
2778
2779
|
--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-mobile-font-size));
|
|
@@ -3047,7 +3048,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
3047
3048
|
--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xl-desktop-line-height));
|
|
3048
3049
|
}
|
|
3049
3050
|
}
|
|
3050
|
-
`;var
|
|
3051
|
+
`;var Te=Object.defineProperty,Ie=(t,s,e,o)=>{for(var r,a=void 0,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(s,e,a)||a);return a&&Te(s,e,a),a};const je=class extends ut{constructor(){super(...arguments),this.size="md",this.strong=!1,this.tall=!1}render(){return Q`<p><slot></slot></p>`}};je.styles=[Be];let Fe=je;Ie([$({type:String,reflect:!0})],Fe.prototype,"size"),Ie([$({type:Boolean,reflect:!0})],Fe.prototype,"strong"),Ie([$({type:Boolean,reflect:!0})],Fe.prototype,"tall");var Ne=Object.getOwnPropertyDescriptor;let Ue=class extends Fe{};Ue=((t,s,e,o)=>{for(var r,a=o>1?void 0:o?Ne(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(a)||a);return a})([A("sds-text")],Ue);const He=i`
|
|
3051
3052
|
:host {
|
|
3052
3053
|
--_sds-textfield-background-color: var(--sds-textfield-background-color, var(--sds-color-background-default, var(--sds-color-neutral-background-default)));
|
|
3053
3054
|
--_sds-textfield-text-color: var(--sds-textfield-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
|
|
@@ -3214,26 +3215,26 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
3214
3215
|
--sds-icon-size: var(--sds-textfield-icon-size, var(--sds-components-icon-lg));
|
|
3215
3216
|
}
|
|
3216
3217
|
}
|
|
3217
|
-
`;var
|
|
3218
|
-
<div class="${
|
|
3218
|
+
`;var Ke=Object.defineProperty,We=Object.getOwnPropertyDescriptor,Ge=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?We(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&Ke(s,e,a),a};let Ye=class extends(zt(ut)){constructor(){super(),this.type="text",this.disabled=!1,this.readOnly=!1,this.required=!1,this.size="md",this.hasIcon=!1,this._defaultValue=null,this.handleSlotChange=t=>{const s=t.target;this.hasIcon=s.assignedNodes({flatten:!0}).length>0},this._handleInputChange=t=>{t.stopImmediatePropagation(),!this.disabled&&t.target instanceof HTMLInputElement&&(this.value=t.target.value,this.internals.setFormValue(""===this.value?null:this.value),this.updateValidity(),this.dispatchSheriffEvent(t.type))},this._handleSelect=t=>{t.stopImmediatePropagation(),this.disabled||this.dispatchSheriffEvent("select")},this._handleFocus=t=>{t.stopImmediatePropagation(),this.dispatchSheriffEvent("focus")},this._handleBlur=t=>{t.stopImmediatePropagation(),this.updateValidity(),this.dispatchSheriffEvent("blur")},this._handleKeyDown=t=>{t.stopImmediatePropagation();if(this.dispatchKeyboardEvent("keydown",t)&&"Enter"===t.key){const t=this.internals?.form;t?.requestSubmit?t.requestSubmit():t?.submit()}},this.internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this._defaultValue=this.value??null,this.internals.setFormValue(this._defaultValue)}updated(t){super.updated(t),t.has("value")&&(this.internals.setFormValue(this.value??""),this.control&&(this.control.value=this.value??""))}updateValidity(){this.control.checkValidity()?this.internals.setValidity({}):this.internals.setValidity({customError:!0},this.control.validationMessage,this.control)}formResetCallback(){this.internals.setFormValue(this._defaultValue);const t=this._defaultValue??"";this.control.value=t,this.value=t,this.updateValidity()}select(){this.disabled||this.control.select()}focus(){this.disabled||this.control.focus()}blur(){this.disabled||this.control.blur()}click(){this.disabled||this.control.click()}get selectionStart(){return this.control?this.control.selectionStart:null}set selectionStart(t){this.control&&null!==t&&(this.control.selectionStart=t)}get selectionEnd(){return this.control?this.control.selectionEnd:null}set selectionEnd(t){this.control&&null!==t&&(this.control.selectionEnd=t)}setSelectionRange(t,s,e){this.control&&this.control.setSelectionRange(t,s,e)}checkValidity(){return this.control.checkValidity()}reportValidity(){return this.control.reportValidity()}setCustomValidity(t){this.control.setCustomValidity(t),this.updateValidity()}render(){const t={"sds-textfield":!0,"sds-textfield--error":Boolean(this.errorMessage),"sds-textfield--has-icon":this.hasIcon};return Q`
|
|
3219
|
+
<div class="${Yt(t)}">
|
|
3219
3220
|
${this.label?Q`<label for="sds-textfield" class="sds-textfield__label">${this.readOnly?Q`<sds-icon name="lock-material-filled" size="m"></sds-icon>`:J}</sds-icon>${this.label}</label>`:J}
|
|
3220
3221
|
${this.helpText?Q`<p class="sds-textfield__help-text">${this.helpText}</p>`:J}
|
|
3221
3222
|
<div class="sds-textfield__input-container">
|
|
3222
3223
|
<input
|
|
3223
3224
|
part="input"
|
|
3224
3225
|
class="sds-textfield__input"
|
|
3225
|
-
type="${
|
|
3226
|
+
type="${At(this.type)}"
|
|
3226
3227
|
id="sds-textfield"
|
|
3227
3228
|
?disabled="${this.disabled}"
|
|
3228
3229
|
?readonly="${this.readOnly}"
|
|
3229
|
-
placeholder="${
|
|
3230
|
+
placeholder="${At(this.placeholder)}"
|
|
3230
3231
|
.value="${this.value??""}"
|
|
3231
|
-
name="${
|
|
3232
|
-
autocomplete="${
|
|
3232
|
+
name="${At(this.name)}"
|
|
3233
|
+
autocomplete="${At(this.autocomplete)}"
|
|
3233
3234
|
?required="${this.required}"
|
|
3234
|
-
pattern="${
|
|
3235
|
-
minlength="${
|
|
3236
|
-
maxlength="${
|
|
3235
|
+
pattern="${At(this.pattern)}"
|
|
3236
|
+
minlength="${At(this.minlength)}"
|
|
3237
|
+
maxlength="${At(this.maxlength)}"
|
|
3237
3238
|
@input="${this._handleInputChange}"
|
|
3238
3239
|
@change="${this._handleInputChange}"
|
|
3239
3240
|
@select="${this._handleSelect}"
|
|
@@ -3245,7 +3246,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
3245
3246
|
</div>
|
|
3246
3247
|
${this.errorMessage?Q`<sds-alert variant="secondary" data-palette="danger"><p slot="message">${this.errorMessage}</p></sds-alert>`:J}
|
|
3247
3248
|
</div>
|
|
3248
|
-
`}};
|
|
3249
|
+
`}};Ye.styles=[He],Ye.formAssociated=!0,Ye.shadowRootOptions={...ut.shadowRootOptions,delegatesFocus:!0},Ge([$({type:String,reflect:!0})],Ye.prototype,"type",2),Ge([$({type:String})],Ye.prototype,"value",2),Ge([$({type:String,reflect:!0})],Ye.prototype,"name",2),Ge([$({type:String,reflect:!0})],Ye.prototype,"label",2),Ge([$({type:String,reflect:!0})],Ye.prototype,"placeholder",2),Ge([$({type:String,attribute:"help-text",reflect:!0})],Ye.prototype,"helpText",2),Ge([$({type:String,attribute:"error-message",reflect:!0})],Ye.prototype,"errorMessage",2),Ge([$({type:Boolean,reflect:!0})],Ye.prototype,"disabled",2),Ge([$({type:Boolean,attribute:"readonly",reflect:!0})],Ye.prototype,"readOnly",2),Ge([$({type:String,reflect:!0})],Ye.prototype,"autocomplete",2),Ge([$({type:Boolean,reflect:!0})],Ye.prototype,"required",2),Ge([$({type:String,reflect:!0})],Ye.prototype,"pattern",2),Ge([$({type:Number,reflect:!0})],Ye.prototype,"minlength",2),Ge([$({type:Number,reflect:!0})],Ye.prototype,"maxlength",2),Ge([$({type:String,reflect:!0})],Ye.prototype,"size",2),Ge([S()],Ye.prototype,"hasIcon",2),Ge([E("#sds-textfield")],Ye.prototype,"control",2),Ye=Ge([A("sds-textfield")],Ye);const Ze=i`
|
|
3249
3250
|
:host {
|
|
3250
3251
|
--_sds-textarea-background-color: var(--sds-textarea-background-color, var(--sds-color-background-default, var(--sds-color-neutral-background-default)));
|
|
3251
3252
|
--_sds-textarea-text-color: var(--sds-textarea-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
|
|
@@ -3429,10 +3430,10 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
3429
3430
|
--_sds-textarea-counter-font-size: var(--sds-textarea-counter-font-size, var(--sds-components-font-size-content-lg));
|
|
3430
3431
|
--_sds-textarea-counter-line-height: var(--sds-textarea-counter-line-height, var(--sds-components-line-height-squeezed-lg));
|
|
3431
3432
|
}
|
|
3432
|
-
`;var
|
|
3433
|
+
`;var Qe=Object.defineProperty,Xe=Object.getOwnPropertyDescriptor,Je=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?Xe(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&Qe(s,e,a),a};let to=class extends(zt(ut)){constructor(){super(),this.disabled=!1,this.readOnly=!1,this.required=!1,this.size="md",this._defaultValue=null,this._handleInputChange=t=>{t.stopImmediatePropagation(),!this.disabled&&t.target instanceof HTMLTextAreaElement&&(this.value=t.target.value,this.internals.setFormValue(""===this.value?null:this.value),this.updateValidity(),this.dispatchSheriffEvent(t.type))},this._handleSelect=t=>{t.stopImmediatePropagation(),this.disabled||this.dispatchSheriffEvent("select")},this._handleFocus=t=>{t.stopImmediatePropagation(),this.dispatchSheriffEvent("focus")},this._handleBlur=t=>{t.stopImmediatePropagation(),this.updateValidity(),this.dispatchSheriffEvent("blur")},this.internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this._defaultValue=this.value??null,this.internals.setFormValue(this._defaultValue)}updated(t){super.updated(t),t.has("value")&&(this.internals.setFormValue(this.value??""),this.control&&(this.control.value=this.value??""))}updateValidity(){this.control.checkValidity()?this.internals.setValidity({}):this.internals.setValidity({customError:!0},this.control.validationMessage,this.control)}hasTypedTooManyCharacters(){if(!this.counter)return!1;return(this.value?.length||0)>this.counter}renderCharacterCounter(){if(void 0===this.counter)return J;const t=this.value?.length||0;return this.hasTypedTooManyCharacters()?Q`<sds-alert variant="secondary" data-palette="danger"
|
|
3433
3434
|
><p class="sds-textarea__character-counter" slot="message">Du har ${t-this.counter} tegn for mye</p></sds-alert
|
|
3434
3435
|
>`:Q`<p class="sds-textarea__character-counter">Du har ${this.counter-t} tegn igjen</p>`}formResetCallback(){this.internals.setFormValue(this._defaultValue);const t=this._defaultValue??"";this.control.value=t,this.value=t,this.updateValidity()}select(){this.disabled||this.control.select()}type(){return"textarea"}focus(){this.disabled||this.control.focus()}blur(){this.disabled||this.control.blur()}click(){this.disabled||this.control.click()}get selectionStart(){return this.control?this.control.selectionStart:null}set selectionStart(t){this.control&&null!==t&&(this.control.selectionStart=t)}get selectionEnd(){return this.control?this.control.selectionEnd:null}set selectionEnd(t){this.control&&null!==t&&(this.control.selectionEnd=t)}setSelectionRange(t,s,e){this.control&&this.control.setSelectionRange(t,s,e)}checkValidity(){return this.control.checkValidity()}reportValidity(){return this.control.reportValidity()}setCustomValidity(t){this.control.setCustomValidity(t),this.updateValidity()}render(){const t={"sds-textarea":!0,"sds-textarea--error":Boolean(this.errorMessage||this.hasTypedTooManyCharacters())};return Q`
|
|
3435
|
-
<div class="${
|
|
3436
|
+
<div class="${Yt(t)}">
|
|
3436
3437
|
${this.label||this.helpText?Q`<div>
|
|
3437
3438
|
${this.label?Q`<label for="sds-textarea" class="sds-textarea__label">${this.label}</label>`:J}
|
|
3438
3439
|
${this.helpText?Q`<p class="sds-textarea__help-text">${this.helpText}</p>`:J}
|
|
@@ -3443,16 +3444,16 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
3443
3444
|
id="sds-textarea"
|
|
3444
3445
|
?disabled="${this.disabled}"
|
|
3445
3446
|
?readonly="${this.readOnly}"
|
|
3446
|
-
placeholder="${
|
|
3447
|
+
placeholder="${At(this.placeholder)}"
|
|
3447
3448
|
.value="${this.value??""}"
|
|
3448
3449
|
.autocomplete="${this.autocomplete}"
|
|
3449
|
-
name="${
|
|
3450
|
+
name="${At(this.name)}"
|
|
3450
3451
|
?required="${this.required}"
|
|
3451
|
-
rows="${
|
|
3452
|
-
cols="${
|
|
3453
|
-
wrap="${
|
|
3454
|
-
minlength="${
|
|
3455
|
-
maxlength="${
|
|
3452
|
+
rows="${At(this.rows)}"
|
|
3453
|
+
cols="${At(this.cols)}"
|
|
3454
|
+
wrap="${At(this.wrap)}"
|
|
3455
|
+
minlength="${At(this.minlength)}"
|
|
3456
|
+
maxlength="${At(this.maxlength)}"
|
|
3456
3457
|
@input="${this._handleInputChange}"
|
|
3457
3458
|
@change="${this._handleInputChange}"
|
|
3458
3459
|
@select="${this._handleSelect}"
|
|
@@ -3462,4 +3463,4 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
3462
3463
|
</div>
|
|
3463
3464
|
${this.errorMessage?Q`<sds-alert variant="secondary" data-palette="danger"><p slot="message">${this.errorMessage}</p></sds-alert>`:J} ${this.renderCharacterCounter()}
|
|
3464
3465
|
</div>
|
|
3465
|
-
`}};
|
|
3466
|
+
`}};to.styles=[Ze],to.formAssociated=!0,to.shadowRootOptions={...ut.shadowRootOptions,delegatesFocus:!0},Je([$({type:String})],to.prototype,"value",2),Je([$({type:String,reflect:!0})],to.prototype,"name",2),Je([$({type:String,reflect:!0})],to.prototype,"label",2),Je([$({type:String,reflect:!0})],to.prototype,"placeholder",2),Je([$({type:String,attribute:"help-text",reflect:!0})],to.prototype,"helpText",2),Je([$({type:String,attribute:"error-message",reflect:!0})],to.prototype,"errorMessage",2),Je([$({type:Boolean,reflect:!0})],to.prototype,"disabled",2),Je([$({type:Boolean,attribute:"readonly",reflect:!0})],to.prototype,"readOnly",2),Je([$({type:String,reflect:!0})],to.prototype,"autocomplete",2),Je([$({type:Boolean,reflect:!0})],to.prototype,"required",2),Je([$({type:Number,reflect:!0})],to.prototype,"rows",2),Je([$({type:Number,reflect:!0})],to.prototype,"cols",2),Je([$({type:String,reflect:!0})],to.prototype,"wrap",2),Je([$({type:Number,reflect:!0})],to.prototype,"minlength",2),Je([$({type:Number,reflect:!0})],to.prototype,"maxlength",2),Je([$({type:Number,reflect:!0})],to.prototype,"counter",2),Je([$({type:String,reflect:!0})],to.prototype,"size",2),Je([E("#sds-textarea")],to.prototype,"control",2),to=Je([A("sds-textarea")],to);export{rs as SDSAlert,es as SDSButton,cs as SDSCard,us as SDSCheckbox,ys as SDSCheckboxGroup,Ss as SDSChip,qs as SDSDetails,Rs as SDSDialog,Ns as SDSHeading,Gt as SDSIcon,Gs as SDSLoader,se as SDSNotification,ie as SDSRadio,pe as SDSRadioGroup,be as SDSSelect,Ce as SDSStepper,ke as SDSStepperStep,Pe as SDSSwitch,Me as SDSTag,Ue as SDSText,to as SDSTextArea,Ye as SDSTextField};
|