@politiet/sheriff-web-components 2.13.0 → 2.13.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 +173 -7
- package/dist/mixins/sds-dialog-target-mixin.d.ts.map +1 -1
- package/dist/mixins/sds-dialog-target-mixin.js +10 -0
- package/dist/mixins/sds-dialog-target-mixin.js.map +1 -1
- package/dist/sds-button/sds-button.styles.d.ts.map +1 -1
- package/dist/sds-button/sds-button.styles.js +7 -2
- package/dist/sds-button/sds-button.styles.js.map +1 -1
- package/dist/sds-radio/sds-radio.d.ts +53 -1
- package/dist/sds-radio/sds-radio.d.ts.map +1 -1
- package/dist/sds-radio/sds-radio.js +218 -41
- package/dist/sds-radio/sds-radio.js.map +1 -1
- package/dist/sds-radio/sds-radio.styles.js +36 -36
- package/dist/sds-radio/sds-radio.styles.js.map +1 -1
- package/dist/sds-radio-group/sds-radio-group.d.ts +4 -2
- package/dist/sds-radio-group/sds-radio-group.d.ts.map +1 -1
- package/dist/sds-radio-group/sds-radio-group.js +10 -3
- package/dist/sds-radio-group/sds-radio-group.js.map +1 -1
- package/dist/sheriff-web-components.js +188 -180
- package/dist/skill/SKILL.md +127 -41
- package/dist/skill/references/components.md +247 -35
- package/dist/skill/references/react-wrappers.md +34 -9
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +1 -1
- package/web-types.json +133 -40
|
@@ -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=>new a("string"==typeof t?t:t+"",void 0,o),d=(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)},n=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let s="";for(const e of t.cssRules)s+=e.cssText;return i(s)})(t):t,{is:l,defineProperty:c,getOwnPropertyDescriptor:h,getOwnPropertyNames:p,getOwnPropertySymbols:g,getPrototypeOf:v}=Object,u=globalThis,f=u.trustedTypes,b=f?f.emptyScript:"",_=u.reactiveElementPolyfillSupport,m=(t,s)=>t,x={toAttribute(t,s){switch(s){case Boolean:t=t?b: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}},y=(t,s)=>!l(t,s),w={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:y};Symbol.metadata??=/* @__PURE__ */Symbol("metadata"),u.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=w){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&&c(this.prototype,t,o)}}static getPropertyDescriptor(t,s,e){const{get:o,set:r}=h(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)??w}static _$Ei(){if(this.hasOwnProperty(m("elementProperties")))return;const t=v(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(m("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(m("properties"))){const t=this.properties,s=[...p(t),...g(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(n(t))}else void 0!==t&&s.push(n(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:x).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:x;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??y)(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[m("elementProperties")]=/* @__PURE__ */new Map,k[m("finalized")]=/* @__PURE__ */new Map,_?.({ReactiveElement:k}),(u.reactiveElementVersions??=[]).push("2.1.2");const z={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:y},$=(t=z,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 S(t){return(s,e)=>"object"==typeof e?$(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 C(t){return S({...t,state:!0,attribute:!1})}const E=(t,s,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&"object"!=typeof s&&Object.defineProperty(t,s,e),e);function O(t,s){return(s,e,o)=>E(s,e,{get(){return s=this,s.renderRoot?.querySelector(t)??null;var s}})}function A(t){return(s,e)=>{const{slot:o,selector:r}=t??{},a="slot"+(o?`[name=${o}]`:":not([name])");return E(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 L(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 P=globalThis,D=t=>t,q=P.trustedTypes,T=q?q.createPolicy("lit-html",{createHTML:t=>t}):void 0,M="$lit$",V=`lit$${Math.random().toFixed(9).slice(2)}$`,B="?"+V,j=`<${B}>`,R=document,I=()=>R.createComment(""),N=t=>null===t||"object"!=typeof t&&"function"!=typeof t,H=Array.isArray,F="[ \t\n\f\r]",U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,K=/-->/g,W=/>/g,G=RegExp(`>|${F}(?:([^\\s"'>=/]+)(${F}*=${F}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Z=/'/g,Y=/"/g,Q=/^(?:script|style|textarea|title)$/i,X=t=>(s,...e)=>({_$litType$:t,strings:s,values:e}),J=X(1),tt=X(2),st=/* @__PURE__ */Symbol.for("lit-noChange"),et=/* @__PURE__ */Symbol.for("lit-nothing"),ot=/* @__PURE__ */new WeakMap,rt=R.createTreeWalker(R,129);function at(t,s){if(!H(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==T?T.createHTML(s):s}class it{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=K:void 0!==n[1]?i=W:void 0!==n[2]?(Q.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:Z):i===Y||i===Z?i=G:i===K||i===W?i=U:(i=G,r=void 0);const h=i===G&&t[d+1].startsWith("/>")?" ":"";a+=i===U?s+j:l>=0?(o.push(e),s.slice(0,l)+M+s.slice(l)+V+h):s+V+(-2===l?d:h)}return[at(t,a+(t[e]||"<?>")+(2===s?"</svg>":3===s?"</math>":"")),o]})(t,s);if(this.el=it.createElement(n,e),rt.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(o=rt.nextNode())&&d.length<i;){if(1===o.nodeType){if(o.hasAttributes())for(const t of o.getAttributeNames())if(t.endsWith(M)){const s=l[a++],e=o.getAttribute(t).split(V),i=/([.?@])?(.*)/.exec(s);d.push({type:1,index:r,name:i[2],strings:e,ctor:"."===i[1]?ht:"?"===i[1]?pt:"@"===i[1]?gt:ct}),o.removeAttribute(t)}else t.startsWith(V)&&(d.push({type:6,index:r}),o.removeAttribute(t));if(Q.test(o.tagName)){const t=o.textContent.split(V),s=t.length-1;if(s>0){o.textContent=q?q.emptyScript:"";for(let e=0;e<s;e++)o.append(t[e],I()),rt.nextNode(),d.push({type:2,index:++r});o.append(t[s],I())}}}else if(8===o.nodeType)if(o.data===B)d.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(V,t+1));)d.push({type:7,index:r}),t+=V.length-1}r++}}static createElement(t,s){const e=R.createElement("template");return e.innerHTML=t,e}}function dt(t,s,e=t,o){if(s===st)return s;let r=void 0!==o?e._$Co?.[o]:e._$Cl;const a=N(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=dt(t,r._$AS(t,s.values),r,o)),s}class nt{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??R).importNode(s,!0);rt.currentNode=o;let r=rt.nextNode(),a=0,i=0,d=e[0];for(;void 0!==d;){if(a===d.index){let s;2===d.type?s=new lt(r,r.nextSibling,this,t):1===d.type?s=new d.ctor(r,d.name,d.strings,this,t):6===d.type&&(s=new vt(r,this,t)),this._$AV.push(s),d=e[++i]}a!==d?.index&&(r=rt.nextNode(),a++)}return rt.currentNode=R,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 lt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,s,e,o){this.type=2,this._$AH=et,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=dt(this,t,s),N(t)?t===et||null==t||""===t?(this._$AH!==et&&this._$AR(),this._$AH=et):t!==this._$AH&&t!==st&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>H(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!==et&&N(this._$AH)?this._$AA.nextSibling.data=t:this.T(R.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=it.createElement(at(e.h,e.h[0]),this.options)),e);if(this._$AH?._$AD===o)this._$AH.p(s);else{const t=new nt(o,this),e=t.u(this.options);t.p(s),this.T(e),this._$AH=t}}_$AC(t){let s=ot.get(t.strings);return void 0===s&&ot.set(t.strings,s=new it(t)),s}k(t){H(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 lt(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=D(t).nextSibling;D(t).remove(),t=s}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class ct{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,s,e,o,r){this.type=1,this._$AH=et,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=et}_$AI(t,s=this,e,o){const r=this.strings;let a=!1;if(void 0===r)t=dt(this,t,s,0),a=!N(t)||t!==this._$AH&&t!==st,a&&(this._$AH=t);else{const o=t;let i,d;for(t=r[0],i=0;i<r.length-1;i++)d=dt(this,o[e+i],s,i),d===st&&(d=this._$AH[i]),a||=!N(d)||d!==this._$AH[i],d===et?t=et:t!==et&&(t+=(d??"")+r[i+1]),this._$AH[i]=d}a&&!o&&this.j(t)}j(t){t===et?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class ht extends ct{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===et?void 0:t}}class pt extends ct{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==et)}}class gt extends ct{constructor(t,s,e,o,r){super(t,s,e,o,r),this.type=5}_$AI(t,s=this){if((t=dt(this,t,s,0)??et)===st)return;const e=this._$AH,o=t===et&&e!==et||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,r=t!==et&&(e===et||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 vt{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){dt(this,t)}}const ut=P.litHtmlPolyfillSupport;ut?.(it,lt),(P.litHtmlVersions??=[]).push("3.3.3");const ft=globalThis;let bt=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 lt(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 st}};bt._$litElement$=!0,bt.finalized=!0,ft.litElementHydrateSupport?.({LitElement:bt});const _t=ft.litElementPolyfillSupport;_t?.({LitElement:bt}),(ft.litElementVersions??=[]).push("4.2.2");class mt extends bt{constructor(){super(...arguments),this.sheriffVersion="2.13.0"}}const xt=/* @__PURE__ */Symbol.for(""),yt=t=>{if(t?.r===xt)return t?._$litStatic$},wt=t=>({_$litStatic$:t,r:xt}),kt=(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:xt}),zt=/* @__PURE__ */new Map,$t=(St=J,(t,...s)=>{const e=s.length;let o,r;const a=[],i=[];let d,n=0,l=!1;for(;n<e;){for(d=t[n];n<e&&void 0!==(r=s[n],o=yt(r));)d+=o+t[++n],l=!0;n!==e&&i.push(r),a.push(d),n++}if(n===e&&a.push(t[e]),l){const e=a.join("$$lit$$");void 0===(t=zt.get(e))&&(a.raw=a,zt.set(e,t=a)),s=i}return St(t,...s)});var St;const Ct=d`
|
|
1
|
+
var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=/* @__PURE__ */Symbol(),r=/* @__PURE__ */new WeakMap;let a=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(s&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=r.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&r.set(e,t))}return t}toString(){return this.cssText}};const i=t=>new a("string"==typeof t?t:t+"",void 0,o),d=(t,...e)=>{const s=1===t.length?t[0]:e.reduce((e,s,o)=>e+(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.")})(s)+t[o+1],t[0]);return new a(s,t,o)},n=s?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return i(e)})(t):t,{is:l,defineProperty:c,getOwnPropertyDescriptor:h,getOwnPropertyNames:p,getOwnPropertySymbols:g,getPrototypeOf:v}=Object,u=globalThis,f=u.trustedTypes,b=f?f.emptyScript:"",_=u.reactiveElementPolyfillSupport,m=(t,e)=>t,x={toAttribute(t,e){switch(e){case Boolean:t=t?b:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(o){s=null}}return s}},y=(t,e)=>!l(t,e),w={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:y};Symbol.metadata??=/* @__PURE__ */Symbol("metadata"),u.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,e=w){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=/* @__PURE__ */Symbol(),o=this.getPropertyDescriptor(t,s,e);void 0!==o&&c(this.prototype,t,o)}}static getPropertyDescriptor(t,e,s){const{get:o,set:r}=h(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:o,set(e){const a=o?.call(this);r?.call(this,e),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??w}static _$Ei(){if(this.hasOwnProperty(m("elementProperties")))return;const t=v(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(m("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(m("properties"))){const t=this.properties,e=[...p(t),...g(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=/* @__PURE__ */new Map;for(const[e,s]of this.elementProperties){const t=this._$Eu(e,s);void 0!==t&&this._$Eh.set(t,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(n(t))}else void 0!==t&&e.push(n(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"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,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,o)=>{if(s)t.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const s of o){const o=document.createElement("style"),r=e.litNonce;void 0!==r&&o.setAttribute("nonce",r),o.textContent=s.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,e,s){this._$AK(t,s)}_$ET(t,e){const s=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,s);if(void 0!==o&&!0===s.reflect){const r=(void 0!==s.converter?.toAttribute?s.converter:x).toAttribute(e,s.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,e){const s=this.constructor,o=s._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=s.getPropertyOptions(o),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:x;this._$Em=o;const a=r.fromAttribute(e,t.type);this[o]=a??this._$Ej?.get(o)??a,this._$Em=null}}requestUpdate(t,e,s,o=!1,r){if(void 0!==t){const a=this.constructor;if(!1===o&&(r=this[t]),s??=a.getPropertyOptions(t),!((s.hasChanged??y)(r,e)||s.useDefault&&s.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(a._$Eu(t,s))))return;this.C(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:o,wrapped:r},a){s&&!(this._$Ej??=/* @__PURE__ */new Map).has(t)&&(this._$Ej.set(t,a??e??this[t]),!0!==r||void 0!==a)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),!0===o&&this._$Em!==t&&(this._$Eq??=/* @__PURE__ */new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}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,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t){const{wrapped:t}=s,o=this[e];!0!==t||this._$AL.has(e)||void 0===o||this.C(e,void 0,s,o)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}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[m("elementProperties")]=/* @__PURE__ */new Map,k[m("finalized")]=/* @__PURE__ */new Map,_?.({ReactiveElement:k}),(u.reactiveElementVersions??=[]).push("2.1.2");const z={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:y},$=(t=z,e,s)=>{const{kind:o,metadata:r}=s;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(s.name,t),"accessor"===o){const{name:o}=s;return{set(s){const r=e.get.call(this);e.set.call(this,s),this.requestUpdate(o,r,t,!0,s)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if("setter"===o){const{name:o}=s;return function(s){const r=this[o];e.call(this,s),this.requestUpdate(o,r,t,!0,s)}}throw Error("Unsupported decorator location: "+o)};function S(t){return(e,s)=>"object"==typeof s?$(t,e,s):((t,e,s)=>{const o=e.hasOwnProperty(s);return e.constructor.createProperty(s,t),o?Object.getOwnPropertyDescriptor(e,s):void 0})(t,e,s)}function C(t){return S({...t,state:!0,attribute:!1})}const E=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,s),s);function A(t,e){return(e,s,o)=>E(e,s,{get(){return e=this,e.renderRoot?.querySelector(t)??null;var e}})}function L(t){return(e,s)=>{const{slot:o,selector:r}=t??{},a="slot"+(o?`[name=${o}]`:":not([name])");return E(e,s,{get(){const e=this.renderRoot?.querySelector(a),s=e?.assignedElements(t)??[];return void 0===r?s:s.filter(t=>t.matches(r))}})}}function O(t){return e=>{var s;customElements.get(t)||(s=t,(t,e)=>{void 0!==e?e.addInitializer(()=>{customElements.define(s,t)}):customElements.define(s,t)})(e)}}const P=globalThis,D=t=>t,T=P.trustedTypes,q=T?T.createPolicy("lit-html",{createHTML:t=>t}):void 0,M="$lit$",V=`lit$${Math.random().toFixed(9).slice(2)}$`,B="?"+V,R=`<${B}>`,j=document,I=()=>j.createComment(""),N=t=>null===t||"object"!=typeof t&&"function"!=typeof t,H=Array.isArray,F="[ \t\n\f\r]",U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,G=/-->/g,K=/>/g,W=RegExp(`>|${F}(?:([^\\s"'>=/]+)(${F}*=${F}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Z=/'/g,Y=/"/g,Q=/^(?:script|style|textarea|title)$/i,X=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),J=X(1),tt=X(2),et=/* @__PURE__ */Symbol.for("lit-noChange"),st=/* @__PURE__ */Symbol.for("lit-nothing"),ot=/* @__PURE__ */new WeakMap,rt=j.createTreeWalker(j,129);function at(t,e){if(!H(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==q?q.createHTML(e):e}class it{constructor({strings:t,_$litType$:e},s){let o;this.parts=[];let r=0,a=0;const i=t.length-1,d=this.parts,[n,l]=((t,e)=>{const s=t.length-1,o=[];let r,a=2===e?"<svg>":3===e?"<math>":"",i=U;for(let d=0;d<s;d++){const e=t[d];let s,n,l=-1,c=0;for(;c<e.length&&(i.lastIndex=c,n=i.exec(e),null!==n);)c=i.lastIndex,i===U?"!--"===n[1]?i=G:void 0!==n[1]?i=K:void 0!==n[2]?(Q.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,s=n[1],i=void 0===n[3]?W:'"'===n[3]?Y:Z):i===Y||i===Z?i=W:i===G||i===K?i=U:(i=W,r=void 0);const h=i===W&&t[d+1].startsWith("/>")?" ":"";a+=i===U?e+R:l>=0?(o.push(s),e.slice(0,l)+M+e.slice(l)+V+h):e+V+(-2===l?d:h)}return[at(t,a+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),o]})(t,e);if(this.el=it.createElement(n,s),rt.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(o=rt.nextNode())&&d.length<i;){if(1===o.nodeType){if(o.hasAttributes())for(const t of o.getAttributeNames())if(t.endsWith(M)){const e=l[a++],s=o.getAttribute(t).split(V),i=/([.?@])?(.*)/.exec(e);d.push({type:1,index:r,name:i[2],strings:s,ctor:"."===i[1]?ht:"?"===i[1]?pt:"@"===i[1]?gt:ct}),o.removeAttribute(t)}else t.startsWith(V)&&(d.push({type:6,index:r}),o.removeAttribute(t));if(Q.test(o.tagName)){const t=o.textContent.split(V),e=t.length-1;if(e>0){o.textContent=T?T.emptyScript:"";for(let s=0;s<e;s++)o.append(t[s],I()),rt.nextNode(),d.push({type:2,index:++r});o.append(t[e],I())}}}else if(8===o.nodeType)if(o.data===B)d.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(V,t+1));)d.push({type:7,index:r}),t+=V.length-1}r++}}static createElement(t,e){const s=j.createElement("template");return s.innerHTML=t,s}}function dt(t,e,s=t,o){if(e===et)return e;let r=void 0!==o?s._$Co?.[o]:s._$Cl;const a=N(e)?void 0:e._$litDirective$;return r?.constructor!==a&&(r?._$AO?.(!1),void 0===a?r=void 0:(r=new a(t),r._$AT(t,s,o)),void 0!==o?(s._$Co??=[])[o]=r:s._$Cl=r),void 0!==r&&(e=dt(t,r._$AS(t,e.values),r,o)),e}class nt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,o=(t?.creationScope??j).importNode(e,!0);rt.currentNode=o;let r=rt.nextNode(),a=0,i=0,d=s[0];for(;void 0!==d;){if(a===d.index){let e;2===d.type?e=new lt(r,r.nextSibling,this,t):1===d.type?e=new d.ctor(r,d.name,d.strings,this,t):6===d.type&&(e=new vt(r,this,t)),this._$AV.push(e),d=s[++i]}a!==d?.index&&(r=rt.nextNode(),a++)}return rt.currentNode=j,o}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class lt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,o){this.type=2,this._$AH=st,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=dt(this,t,e),N(t)?t===st||null==t||""===t?(this._$AH!==st&&this._$AR(),this._$AH=st):t!==this._$AH&&t!==et&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>H(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!==st&&N(this._$AH)?this._$AA.nextSibling.data=t:this.T(j.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,o="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=it.createElement(at(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===o)this._$AH.p(e);else{const t=new nt(o,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=ot.get(t.strings);return void 0===e&&ot.set(t.strings,e=new it(t)),e}k(t){H(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,o=0;for(const r of t)o===e.length?e.push(s=new lt(this.O(I()),this.O(I()),this,this.options)):s=e[o],s._$AI(r),o++;o<e.length&&(this._$AR(s&&s._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=D(t).nextSibling;D(t).remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class ct{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,o,r){this.type=1,this._$AH=st,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=st}_$AI(t,e=this,s,o){const r=this.strings;let a=!1;if(void 0===r)t=dt(this,t,e,0),a=!N(t)||t!==this._$AH&&t!==et,a&&(this._$AH=t);else{const o=t;let i,d;for(t=r[0],i=0;i<r.length-1;i++)d=dt(this,o[s+i],e,i),d===et&&(d=this._$AH[i]),a||=!N(d)||d!==this._$AH[i],d===st?t=st:t!==st&&(t+=(d??"")+r[i+1]),this._$AH[i]=d}a&&!o&&this.j(t)}j(t){t===st?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class ht extends ct{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===st?void 0:t}}class pt extends ct{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==st)}}class gt extends ct{constructor(t,e,s,o,r){super(t,e,s,o,r),this.type=5}_$AI(t,e=this){if((t=dt(this,t,e,0)??st)===et)return;const s=this._$AH,o=t===st&&s!==st||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==st&&(s===st||o);o&&this.element.removeEventListener(this.name,this,s),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 vt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){dt(this,t)}}const ut=P.litHtmlPolyfillSupport;ut?.(it,lt),(P.litHtmlVersions??=[]).push("3.3.3");const ft=globalThis;let bt=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 e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,s)=>{const o=s?.renderBefore??e;let r=o._$litPart$;if(void 0===r){const t=s?.renderBefore??null;o._$litPart$=r=new lt(e.insertBefore(I(),t),t,void 0,s??{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return et}};bt._$litElement$=!0,bt.finalized=!0,ft.litElementHydrateSupport?.({LitElement:bt});const _t=ft.litElementPolyfillSupport;_t?.({LitElement:bt}),(ft.litElementVersions??=[]).push("4.2.2");class mt extends bt{constructor(){super(...arguments),this.sheriffVersion="2.13.1"}}const xt=/* @__PURE__ */Symbol.for(""),yt=t=>{if(t?.r===xt)return t?._$litStatic$},wt=t=>({_$litStatic$:t,r:xt}),kt=(t,...e)=>({_$litStatic$:e.reduce((e,s,o)=>e+(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.`)})(s)+t[o+1],t[0]),r:xt}),zt=/* @__PURE__ */new Map,$t=(St=J,(t,...e)=>{const s=e.length;let o,r;const a=[],i=[];let d,n=0,l=!1;for(;n<s;){for(d=t[n];n<s&&void 0!==(r=e[n],o=yt(r));)d+=o+t[++n],l=!0;n!==s&&i.push(r),a.push(d),n++}if(n===s&&a.push(t[s]),l){const s=a.join("$$lit$$");void 0===(t=zt.get(s))&&(a.raw=a,zt.set(s,t=a)),e=i}return St(t,...e)});var St;const Ct=d`
|
|
2
2
|
:host {
|
|
3
3
|
--_sds-alert-background-color: var(--sds-alert-background-color, var(--sds-color-alert-info-surface-tinted));
|
|
4
4
|
|
|
@@ -174,7 +174,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
174
174
|
margin: 0 !important;
|
|
175
175
|
max-width: var(--_sds-alert-max-line-width) !important;
|
|
176
176
|
}
|
|
177
|
-
`,Et=/* @__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","close","load","unload","abort","error","resize","scroll","keyup","select"]);function
|
|
177
|
+
`,Et=/* @__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","close","load","unload","abort","error","resize","scroll","keyup","select"]);function At(t){return class extends t{dispatchSheriffEvent(t,e,s=!Et.has(t)){return this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0,cancelable:s}))}dispatchKeyboardEvent(t,e){return this.dispatchEvent(new KeyboardEvent(t,{key:e.key,code:e.code,bubbles:!0,composed:!0,cancelable:!Et.has(t),ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,repeat:e.repeat,isComposing:e.isComposing,location:e.location}))}}}var Lt=Object.defineProperty,Ot=(t,e,s,o)=>{for(var r,a=void 0,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(e,s,a)||a);return a&&Lt(e,s,a),a};const Pt={info:"InformationSquareFill-aksel-filled",success:"check_circle-material-filled",attention:"warning-material-filled",danger:"dangerous-material-filled"},Dt=class extends(At(mt)){constructor(){super(...arguments),this.variant="primary",this.size="md",this.palette="info",this.iconTag=kt`sds-icon`,this.buttonTag=kt`sds-button`,this._remove=()=>{this.dispatchSheriffEvent("sds-remove")},this._renderIcon=(t,e)=>$t`<${this.iconTag} name="${t}" size=${e}></${this.iconTag}>`,this._renderRemoveButton=t=>$t`<${this.buttonTag}
|
|
178
178
|
class="sds-alert__remove-btn"
|
|
179
179
|
variant="tertiary"
|
|
180
180
|
size="sm"
|
|
@@ -183,14 +183,14 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
183
183
|
@click=${this._remove}
|
|
184
184
|
>
|
|
185
185
|
${this._renderIcon("close-material-outlined","sm")}
|
|
186
|
-
</${this.buttonTag}>`}render(){const t="primary"===this.variant?"md":this.size??"md",
|
|
187
|
-
<div class="sds-alert__type">${this._renderIcon(
|
|
186
|
+
</${this.buttonTag}>`}render(){const t="primary"===this.variant?"md":this.size??"md",e=Pt[this.palette]??Pt.info;return J`<div class="sds-alert">
|
|
187
|
+
<div class="sds-alert__type">${this._renderIcon(e,t)}</div>
|
|
188
188
|
<div class="sds-alert__content">
|
|
189
189
|
<slot name="title"></slot>
|
|
190
190
|
<slot name="message"></slot>
|
|
191
191
|
</div>
|
|
192
|
-
${this.removableLabel&&"primary"===this.variant?J`<div class="sds-alert__actions">${this._renderRemoveButton(this.removableLabel)}</div>`:
|
|
193
|
-
</div>`}};Dt.styles=[Ct];let
|
|
192
|
+
${this.removableLabel&&"primary"===this.variant?J`<div class="sds-alert__actions">${this._renderRemoveButton(this.removableLabel)}</div>`:st}
|
|
193
|
+
</div>`}};Dt.styles=[Ct];let Tt=Dt;Ot([S({type:String,reflect:!0})],Tt.prototype,"variant"),Ot([S({type:String,reflect:!0})],Tt.prototype,"size"),Ot([S({type:String,attribute:"removable-label",reflect:!0})],Tt.prototype,"removableLabel"),Ot([S({type:String,attribute:"data-palette",reflect:!0})],Tt.prototype,"palette");const qt=t=>t??st,Mt=1,Vt=2,Bt=t=>(...e)=>({_$litDirective$:t,values:e});class Rt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}let jt=class extends Rt{constructor(t){if(super(t),this.it=st,t.type!==Vt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===st||null==t)return this._t=void 0,this.it=t;if(t===et)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 e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};jt.directiveName="unsafeHTML",jt.resultType=1;let It=class extends jt{};It.directiveName="unsafeSVG",It.resultType=2;const Nt=Bt(It),Ht=["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"],Ft={"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>'},Ut=t=>import(`@politiet/sheriff-icons/dist/assets/${t}.js`).then(({default:t})=>t),Gt=t=>fetch(`https://cdn.jsdelivr.net/npm/@politiet/sheriff-icons/dist/assets/${t}.svg`).then(e=>{if(!e.ok)throw new TypeError(`Sheriff: unknown icon: '${t}'`);return e.text()});const Kt=d`
|
|
194
194
|
:host {
|
|
195
195
|
--_sds-icon-size: var(--sds-icon-size, var(--sds-components-icon-md));
|
|
196
196
|
--_sds-icon-color: var(--sds-icon-color, var(--sds-color-text-subtle, var(--sds-color-neutral-text-subtle)));
|
|
@@ -223,11 +223,11 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
223
223
|
height: 100%;
|
|
224
224
|
overflow: hidden;
|
|
225
225
|
}
|
|
226
|
-
`;var
|
|
227
|
-
<div class="sds-icon" role="${
|
|
226
|
+
`;var Wt=Object.defineProperty,Zt=(t,e,s,o)=>{for(var r,a=void 0,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(e,s,a)||a);return a&&Wt(e,s,a),a};const Yt=((t=class extends mt{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 J`
|
|
227
|
+
<div class="sds-icon" role="${qt(this.label?"img":void 0)}" style="${qt(this.color?`color:${this.color}`:void 0)}" aria-label="${qt(this.label)}">
|
|
228
228
|
${this.name?J`<slot aria-hidden="true">${Nt(this.svg)}</slot>`:J`<slot aria-hidden="true"></slot>`}
|
|
229
229
|
</div>
|
|
230
|
-
`}async fetchIcon(){if(!this.name)return void(this.svg="");const
|
|
230
|
+
`}async fetchIcon(){if(!this.name)return void(this.svg="");const e=await new Promise(e=>{t.iconLoader.resolve(this.name,e)});this.svg=e}updated(t){super.updated(t),t.has("name")&&this.name&&this.fetchIcon()}}).styles=[Kt],t.iconLoader=new class{constructor(){this.cache=/* @__PURE__ */new Map,this.pending=/* @__PURE__ */new Map,this._loadLocal=!1,this._disableSystemIcons=!1,this.resolver=this._loadLocal?Ut:Gt}get loadLocal(){return this._loadLocal}set loadLocal(t){this._loadLocal=t,this.resolver=t?Ut:Gt}set disableSystemIcons(t){this._disableSystemIcons=t}resolve(t,e){if(!this._disableSystemIcons&&(t=>Ht.includes(t))(t))return void e(Ft[t]);const s=this.cache.get(t);if("string"==typeof s)e(s);else{const s=this.pending.get(t);if(s)return void s.then(e);const o=this.resolver(t).then(e=>(this.cache.set(t,e),e)).catch(()=>"").finally(()=>{this.pending.delete(t)});this.pending.set(t,o),o.then(e)}}clear(){this.cache.clear(),this.pending.clear()}get currentLoader(){return this.resolver}},t);Zt([S({type:String,reflect:!0})],Yt.prototype,"name"),Zt([S({type:String,reflect:!0})],Yt.prototype,"size"),Zt([S({type:String,reflect:!0})],Yt.prototype,"color"),Zt([S({type:String,reflect:!0})],Yt.prototype,"label"),Zt([C()],Yt.prototype,"svg");let Qt=Yt;var Xt=Object.getOwnPropertyDescriptor;let Jt=class extends Qt{};Jt=((t,e,s,o)=>{for(var r,a=o>1?void 0:o?Xt(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(a)||a);return a})([O("sds-icon")],Jt);const te=Bt(class extends Rt{constructor(t){if(super(t),t.type!==Mt||"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(e=>t[e]).join(" ")+" "}update(t,[e]){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 e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const s=t.element.classList;for(const o of this.st)o in e||(s.remove(o),this.st.delete(o));for(const o in e){const t=!!e[o];t===this.st.has(o)||this.nt?.has(o)||(t?(s.add(o),this.st.add(o)):(s.remove(o),this.st.delete(o)))}return et}}),ee=d`
|
|
231
231
|
:host {
|
|
232
232
|
--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-action-default, var(--sds-color-main-action-default)));
|
|
233
233
|
--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-action-default, var(--sds-color-main-action-default)));
|
|
@@ -377,7 +377,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
377
377
|
--_sds-button-min-height: var(--sds-button-height, var(--sds-components-button-md));
|
|
378
378
|
--_sds-button-font-size: var(--sds-button-font-size, var(--sds-components-font-size-content-md));
|
|
379
379
|
|
|
380
|
-
&:host([variant='tertiary']) {
|
|
380
|
+
&:host([variant='tertiary']:not([inverted])) {
|
|
381
381
|
--_sds-button-padding-inline: var(--sds-button-padding-inline, 0);
|
|
382
382
|
}
|
|
383
383
|
}
|
|
@@ -387,7 +387,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
387
387
|
--_sds-button-min-height: var(--sds-button-height, var(--sds-components-button-sm));
|
|
388
388
|
--_sds-button-font-size: var(--sds-button-font-size, var(--sds-components-font-size-content-sm));
|
|
389
389
|
|
|
390
|
-
&:host([variant='tertiary']) {
|
|
390
|
+
&:host([variant='tertiary']:not([inverted])) {
|
|
391
391
|
--_sds-button-padding-inline: var(--sds-button-padding-inline, 0);
|
|
392
392
|
}
|
|
393
393
|
}
|
|
@@ -455,10 +455,15 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
455
455
|
:host([inverted][variant='tertiary']) {
|
|
456
456
|
--_sds-button-background-color: var(--sds-button-background-color, transparent);
|
|
457
457
|
--_sds-button-border-color: var(--sds-button-border-color, transparent);
|
|
458
|
+
--_sds-button-padding-inline: var(--sds-button-padding-inline, var(--sds-spacing-xs));
|
|
458
459
|
--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-action-contrast-default, var(--sds-color-accent-action-contrast-default)));
|
|
459
460
|
--sds-typography-link-text-decoration: none;
|
|
460
461
|
--sds-loader-main-color: var(--sds-color-accent-action-contrast-default);
|
|
461
462
|
|
|
463
|
+
&:host([icon]) {
|
|
464
|
+
--_sds-button-padding-inline: var(--sds-button-padding-inline, 0);
|
|
465
|
+
}
|
|
466
|
+
|
|
462
467
|
.sds-button:hover {
|
|
463
468
|
--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-action-contrast-default, var(--sds-color-accent-action-contrast-default)));
|
|
464
469
|
--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-action-contrast-default, var(--sds-color-accent-action-contrast-default)));
|
|
@@ -479,27 +484,27 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
479
484
|
--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-action-contrast-default, var(--sds-color-neutral-action-contrast-default)));
|
|
480
485
|
}
|
|
481
486
|
}
|
|
482
|
-
`;function
|
|
487
|
+
`;function se(t){return class extends t{focus(){this.disabled||this.control?.focus()}blur(){this.disabled||this.control?.blur()}click(){this.disabled||this.readOnly||this.control?.click()}}}var oe=Object.defineProperty,re=(t,e,s,o)=>{for(var r,a=void 0,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(e,s,a)||a);return a&&oe(e,s,a),a};function ae(t){const e=class extends t{constructor(...t){super(...t),this.disabled=!1,this.readOnly=!1,this.internals=this.attachInternals()}get readonly(){return this.readOnly}set readonly(t){this.readOnly=t??!1}get form(){return this.internals.form}formDisabledCallback(t){this.disabled=t}firstUpdated(t){super.firstUpdated(t),this.updateValidity()}updateValidity(){}};e.formAssociated=!0,e.shadowRootOptions={...bt.shadowRootOptions,delegatesFocus:!0};let s=e;return re([S({type:String,reflect:!0})],s.prototype,"name"),re([S({type:Boolean,reflect:!0})],s.prototype,"disabled"),re([S({type:Boolean,attribute:"readonly",reflect:!0})],s.prototype,"readOnly"),s}var ie=Object.defineProperty,de=(t,e,s,o)=>{for(var r,a=void 0,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(e,s,a)||a);return a&&ie(e,s,a),a};var ne=Object.defineProperty,le=(t,e,s,o)=>{for(var r,a=void 0,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(e,s,a)||a);return a&&ne(e,s,a),a};var ce=Object.defineProperty,he=(t,e,s,o)=>{for(var r,a=void 0,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(e,s,a)||a);return a&&ce(e,s,a),a};const pe=class extends(function(t){class e extends t{get effectiveCommand(){return this.command??this.dataCommand}get effectiveCommandFor(){return this.commandFor??this.dataCommandFor}updated(t){super.updated(t),(t.has("command")||t.has("commandFor")||t.has("dataCommand")||t.has("dataCommandFor"))&&this._updateCommandTarget()}connectedCallback(){super.connectedCallback(),this.hasUpdated&&this._updateCommandTarget()}disconnectedCallback(){super.disconnectedCallback(),this._cleanupDialogObserver()}_cleanupDialogObserver(){this._dialogOpenObserver&&(this._dialogOpenObserver.disconnect(),this._dialogOpenObserver=void 0),this._dialogElement=void 0}_observeDialog(t,e){this._dialogOpenObserver=new MutationObserver(s=>{for(const o of s)if("open"===o.attributeName){const s=e.hasAttribute("open");t.setAttribute("aria-expanded",String(s))}}),this._dialogOpenObserver.observe(e,{attributes:!0,attributeFilter:["open"]})}_clearAriaFields(t){t.removeAttribute("aria-haspopup"),t.removeAttribute("aria-expanded"),t.removeAttribute("aria-controls")}_updateCommandTarget(){this._cleanupDialogObserver();const t=this.shadowRoot?.querySelector("#control");if(!t)return;const e=this.effectiveCommand,s=this.effectiveCommandFor;if(!s||!e)return void this._clearAriaFields(t);const o=this.getRootNode(),r=o.getElementById?.(s)??document.getElementById(s);var a;null!=(a=r)&&"showModal"in a&&"requestClose"in a&&"close"in a&&"open"in a?(this._dialogElement=r,"show-modal"===e?(t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded",String(r.open)),t.setAttribute("aria-controls",s),this._observeDialog(t,r)):this._clearAriaFields(t)):this._clearAriaFields(t)}runDialogCommand(){if(this._dialogElement?.isConnected||this._updateCommandTarget(),this._dialogElement)switch(this.effectiveCommand){case"show-modal":this._dialogElement.showModal();break;case"close":this._dialogElement.close();break;case"request-close":this._dialogElement.requestClose()}}}return de([S({type:String,attribute:"command",reflect:!0})],e.prototype,"command"),de([S({type:String,attribute:"commandfor",reflect:!0})],e.prototype,"commandFor"),de([S({type:String,attribute:"data-command"})],e.prototype,"dataCommand"),de([S({type:String,attribute:"data-commandfor"})],e.prototype,"dataCommandFor"),e}(function(t){class e extends t{updated(t){super.updated(t),(t.has("popoverTarget")||t.has("popoverTargetAction"))&&this._updatePopoverTarget()}disconnectedCallback(){super.disconnectedCallback(),this._cleanupPopoverListener()}_cleanupPopoverListener(){this._popoverToggleHandler&&this._popoverElement&&(this._popoverElement.removeEventListener("toggle",this._popoverToggleHandler),this._popoverToggleHandler=void 0,this._popoverElement=void 0)}_updatePopoverTarget(){const t=this.shadowRoot?.querySelector("#control");if(t)if(this._cleanupPopoverListener(),this.popoverTarget){const e=this.getRootNode(),s=e.getElementById?.(this.popoverTarget)??document.getElementById(this.popoverTarget);if(s){t.popoverTargetElement=s,this._popoverElement=s;const e=s.getAttribute("role");"tooltip"===e?t.setAttribute("aria-describedby",this.popoverTarget):(this._popoverToggleHandler=e=>{const s="open"===e.newState;t.setAttribute("aria-expanded",String(s))},s.addEventListener("toggle",this._popoverToggleHandler),t.setAttribute("aria-haspopup",e||"dialog"),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",this.popoverTarget))}this.popoverTargetAction&&(t.popoverTargetAction=this.popoverTargetAction)}else t.popoverTargetElement=null,t.popoverTargetAction="",t.removeAttribute("aria-haspopup"),t.removeAttribute("aria-expanded"),t.removeAttribute("aria-controls"),t.removeAttribute("aria-describedby")}}return le([S({type:String,attribute:"popovertarget"})],e.prototype,"popoverTarget"),le([S({type:String,attribute:"popovertargetaction"})],e.prototype,"popoverTargetAction"),e}(se(At(mt))))){constructor(){super(),this.disabled=!1,this.icon=!1,this.inverted=!1,this.loading=!1,this.size="lg",this.type="button",this.value="",this.variant="primary",this.label=void 0,this._handleClick=t=>{this.popoverTarget?this._handlePopoverClick(t):(t.preventDefault(),t.stopImmediatePropagation(),this.disabled||(this.effectiveCommandFor&&this.effectiveCommand?this._handleDialogCommandClick():"submit"===this.type?this._handleSubmitClick():"reset"===this.type?this._handleResetClick():this.dispatchSheriffEvent("click")))},this.internals=this.attachInternals()}updated(t){super.updated(t),t.has("variant")&&"critical"===this.variant&&this.setAttribute("data-palette","danger")}_resolveForm(){if(this.form){return this.getRootNode().querySelector(`form#${this.form}`)}return this.internals.form}_handlePopoverClick(t){t.stopImmediatePropagation(),this.disabled||this.dispatchSheriffEvent("click")}_handleDialogCommandClick(){this.runDialogCommand(),this.dispatchSheriffEvent("click")}_handleSubmitClick(){this.dispatchSheriffEvent("submit")&&this._resolveForm()?.requestSubmit()}_handleResetClick(){this.dispatchSheriffEvent("reset")&&this._resolveForm()?.reset()}render(){const t={"sds-button":!0,"sds-button--as-link":!!this.href};return this.href?J` <a id="link" class="${te(t)}" href="${this.href}" target="${qt(this.target)}">
|
|
483
488
|
<slot name="before"></slot>
|
|
484
489
|
<slot></slot>
|
|
485
490
|
<slot name="after"></slot>
|
|
486
491
|
</a>`:J`
|
|
487
492
|
<button
|
|
488
493
|
id="control"
|
|
489
|
-
form="${
|
|
490
|
-
class="${
|
|
494
|
+
form="${qt(this.form)}"
|
|
495
|
+
class="${te(t)}"
|
|
491
496
|
type="${this.type}"
|
|
492
|
-
name="${
|
|
493
|
-
value="${
|
|
497
|
+
name="${qt(this.name)}"
|
|
498
|
+
value="${qt(this.value)}"
|
|
494
499
|
?disabled="${this.disabled}"
|
|
495
500
|
@click="${this._handleClick}"
|
|
496
|
-
aria-label="${
|
|
501
|
+
aria-label="${qt(this.label)}"
|
|
497
502
|
>
|
|
498
|
-
${this.loading?J`<sds-loader slot="before" ?contrast="${this.inverted||"primary"!==this.variant}"></sds-loader>`:
|
|
503
|
+
${this.loading?J`<sds-loader slot="before" ?contrast="${this.inverted||"primary"!==this.variant}"></sds-loader>`:st} ${this.loading?st:J`<slot name="before"></slot>`}
|
|
499
504
|
<slot></slot>
|
|
500
|
-
${this.loading?
|
|
505
|
+
${this.loading?st:J`<slot name="after"></slot>`}
|
|
501
506
|
</button>
|
|
502
|
-
`}};
|
|
507
|
+
`}};pe.styles=[ee],pe.formAssociated=!0,pe.shadowRootOptions={...mt.shadowRootOptions,delegatesFocus:!0};let ge=pe;he([S({type:Boolean,reflect:!0})],ge.prototype,"disabled"),he([S({type:Boolean,reflect:!0})],ge.prototype,"icon"),he([S({type:Boolean,reflect:!0})],ge.prototype,"inverted"),he([S({type:Boolean,reflect:!0})],ge.prototype,"loading"),he([S({type:String,reflect:!0})],ge.prototype,"form"),he([S({type:String,reflect:!0})],ge.prototype,"href"),he([S({type:String,reflect:!0})],ge.prototype,"name"),he([S({type:String,reflect:!0})],ge.prototype,"size"),he([S({type:String,reflect:!0})],ge.prototype,"target"),he([S({type:String,reflect:!0})],ge.prototype,"type"),he([S({type:String,reflect:!0})],ge.prototype,"value"),he([S({type:String,reflect:!0})],ge.prototype,"variant"),he([S({type:String,reflect:!0})],ge.prototype,"label"),he([A("#control")],ge.prototype,"control");var ve=Object.getOwnPropertyDescriptor;let ue=class extends ge{};ue=((t,e,s,o)=>{for(var r,a=o>1?void 0:o?ve(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(a)||a);return a})([O("sds-button")],ue);var fe=Object.getOwnPropertyDescriptor;let be=class extends Tt{};function _e(t,e,s,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 s=t,o=s.tagName.toUpperCase();if(!e.includes(o))return!0;return Array.from(s.childNodes).some(t=>t.nodeType===Node.ELEMENT_NODE)}return!1});r?.length>0&&console.warn(o,...r)}be=((t,e,s,o)=>{for(var r,a=o>1?void 0:o?fe(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(a)||a);return a})([O("sds-alert")],be);const me=d`
|
|
503
508
|
:host {
|
|
504
509
|
--_sds-card-background-color: var(--sds-card-background-color, var(--sds-color-surface-tinted, var(--sds-color-main-surface-tinted)));
|
|
505
510
|
--_sds-card-border-radius: var(--sds-card-border-radius, var(--sds-radius-md));
|
|
@@ -634,11 +639,11 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
634
639
|
--_sds-card-text-line-height: var(--sds-card-text-line-height, var(--sds-typography-body-md-desktop-line-height));
|
|
635
640
|
}
|
|
636
641
|
}
|
|
637
|
-
`;var
|
|
642
|
+
`;var xe=Object.defineProperty,ye=Object.getOwnPropertyDescriptor,we=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?ye(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(e,s,a):r(a))||a);return o&&a&&xe(e,s,a),a};let ke=class extends mt{constructor(){super(...arguments),this._textSlotEmpty=!1,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&&_e(this.headingSlot,["H2","H3","H4","H5","H6"],0,this._headerWarning)},this._handleTextSlotChange=()=>{_e(this.textSlot,["P"],0,this._contentWarning),this._textSlotEmpty=0===this.textSlot.assignedElements({flatten:!0}).length}}firstUpdated(){_e(this.textSlot,["P"],0,this._contentWarning),this._textSlotEmpty=0===this.textSlot.assignedElements({flatten:!0}).length;this.headingSlot.assignedNodes({flatten:!0}).length>0&&_e(this.headingSlot,["H2","H3","H4","H5","H6"],0,this._headerWarning)}render(){const t=J`
|
|
638
643
|
<slot name="heading" id="heading" @slotchange=${this._handleHeadingSlotChange}></slot>
|
|
639
644
|
<slot name="text" id="content" @slotchange=${this._handleTextSlotChange}></slot>
|
|
640
645
|
<sds-icon name="arrow_forward-material-outlined" size="md" class="sds-card__icon" role="presentation"></sds-icon>
|
|
641
|
-
`,
|
|
646
|
+
`,e={"sds-card__content":!0,"sds-card__content--no-text":this._textSlotEmpty};return J`<article class="sds-card">${this.link?J`<a href="${this.link}" class=${te(e)}>${t}</a>`:J`<div class=${te(e)}>${t}</div>`}</article>`}};ke.styles=[me],we([S({type:String,reflect:!0})],ke.prototype,"link",2),we([A("slot#heading")],ke.prototype,"headingSlot",2),we([A("slot#content")],ke.prototype,"textSlot",2),we([C()],ke.prototype,"_textSlotEmpty",2),ke=we([O("sds-card")],ke);const ze=d`
|
|
642
647
|
:host {
|
|
643
648
|
--_sds-checkbox-block-gap: var(--sds-checkbox-block-gap, var(--sds-spacing-4xs));
|
|
644
649
|
--_sds-checkbox-inline-gap: var(--sds-checkbox-inline-gap, var(--sds-spacing-3xs));
|
|
@@ -863,31 +868,31 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
863
868
|
margin-block-start: -1px;
|
|
864
869
|
}
|
|
865
870
|
}
|
|
866
|
-
`;var $
|
|
867
|
-
<div class="${
|
|
871
|
+
`;var $e=Object.defineProperty,Se=Object.getOwnPropertyDescriptor,Ce=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?Se(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(e,s,a):r(a))||a);return o&&a&&$e(e,s,a),a};let Ee=class extends(se(At(ae(mt)))){constructor(){super(...arguments),this.checked=!1,this.error=!1,this.required=!1,this.size="md",this._hasSlottedLabel=!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 e=t.target;this.checked=e.checked,this.internals.setFormValue(e.checked?e.value:null),this._validate(),this.dispatchSheriffEvent("change")},this._handleFocus=t=>{t.stopImmediatePropagation(),this.dispatchSheriffEvent("focus")},this._handleBlur=t=>{t.stopImmediatePropagation(),this.dispatchSheriffEvent("blur")},this._handleLabelSlotChange=t=>{this._hasSlottedLabel=t.target.assignedNodes().length>0}}get disabled(){return this._disabled}set disabled(t){const e=t??!1,s=this._disabled;s!==e&&(this._disabled=e,this.requestUpdate("disabled",s),this._settingDisabledFromParent||(this._disabledIsAuthorControlled=e))}get parentRequestDisabled(){return this._parentRequestDisabled}set parentRequestDisabled(t){const e=t??!1,s=this._parentRequestDisabled;s!==e&&(this._parentRequestDisabled=e,this.requestUpdate("parentRequestDisabled",s),this._disabledIsAuthorControlled||(this._settingDisabledFromParent=!0,this.disabled=e,this._settingDisabledFromParent=!1))}connectedCallback(){super.connectedCallback(),this._initialChecked=this.checked,this.internals.role="none",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({})}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)},e=this._hasSlottedLabel||Boolean(this.label),s={"sds-checkbox__input":!0,"sds-checkbox__input--error":Boolean(this.error)},o=this.helpText?"help-text":void 0;return J`
|
|
872
|
+
<div class="${te(t)}">
|
|
868
873
|
<input
|
|
869
874
|
id="control"
|
|
870
875
|
type="checkbox"
|
|
871
|
-
name="${
|
|
872
|
-
value="${
|
|
876
|
+
name="${qt(this.name)}"
|
|
877
|
+
value="${qt(this.value)}"
|
|
873
878
|
.checked="${this.checked}"
|
|
874
879
|
?checked="${this.checked}"
|
|
875
880
|
?disabled="${this.disabled}"
|
|
876
881
|
?required="${this.required}"
|
|
877
882
|
?readonly="${this.readOnly}"
|
|
878
|
-
aria-describedby="${
|
|
883
|
+
aria-describedby="${qt(o)}"
|
|
879
884
|
aria-invalid="${this.error?"true":"false"}"
|
|
880
885
|
@change="${this._handleChange}"
|
|
881
886
|
@focus="${this._handleFocus}"
|
|
882
887
|
@blur="${this._handleBlur}"
|
|
883
|
-
class="${
|
|
888
|
+
class="${te(s)}"
|
|
884
889
|
/>
|
|
885
|
-
<label for="control" class="sds-checkbox__label" ?hidden="${!
|
|
890
|
+
<label for="control" class="sds-checkbox__label" ?hidden="${!e}">
|
|
886
891
|
<slot name="label" @slotchange="${this._handleLabelSlotChange}">${this.label}</slot>
|
|
887
892
|
</label>
|
|
888
|
-
${this.helpText?J`<span id="help-text" class="sds-checkbox__help-text">${this.helpText}</span>`:
|
|
893
|
+
${this.helpText?J`<span id="help-text" class="sds-checkbox__help-text">${this.helpText}</span>`:st}
|
|
889
894
|
</div>
|
|
890
|
-
`}};
|
|
895
|
+
`}};Ee.styles=[ze],Ce([S({type:String,reflect:!0})],Ee.prototype,"label",2),Ce([S({type:String})],Ee.prototype,"value",2),Ce([S({type:Boolean,reflect:!0})],Ee.prototype,"checked",2),Ce([S({type:Boolean,reflect:!0})],Ee.prototype,"error",2),Ce([S({type:Boolean,reflect:!0})],Ee.prototype,"required",2),Ce([S({type:String,reflect:!0})],Ee.prototype,"size",2),Ce([S({type:String,attribute:"help-text"})],Ee.prototype,"helpText",2),Ce([S({type:Boolean,reflect:!0})],Ee.prototype,"disabled",1),Ce([S({type:Boolean,attribute:!1})],Ee.prototype,"parentRequestDisabled",1),Ce([A("#control")],Ee.prototype,"control",2),Ce([C()],Ee.prototype,"_hasSlottedLabel",2),Ee=Ce([O("sds-checkbox")],Ee);const Ae=d`
|
|
891
896
|
:host {
|
|
892
897
|
--_sds-checkbox-group-gap: var(--sds-checkbox-group-gap, var(--sds-spacing-xs));
|
|
893
898
|
--_sds-checkbox-group-font-family: var(--sds-checkbox-group-font-family, var(--sds-typography-font-family-roboto));
|
|
@@ -979,16 +984,16 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
979
984
|
--_sds-checkbox-group-help-text-font-size: var(--sds-checkbox-group-help-text-font-size, var(--sds-components-font-size-content-lg));
|
|
980
985
|
--_sds-checkbox-group-help-text-line-height: var(--sds-checkbox-group-help-text-line-height, var(--sds-components-line-height-squeezed-lg));
|
|
981
986
|
}
|
|
982
|
-
`;var
|
|
983
|
-
<fieldset class="${
|
|
984
|
-
${this.legend?J`<legend class="sds-checkbox-group__legend">${this.readOnly?J`<sds-icon name="lock-material-filled" size="md"></sds-icon>`:
|
|
985
|
-
${this.helpText?J`<p id="help-text" class="sds-checkbox-group__help-text">${this.helpText}</p>`:
|
|
987
|
+
`;var Le=Object.defineProperty,Oe=Object.getOwnPropertyDescriptor,Pe=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?Oe(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(e,s,a):r(a))||a);return o&&a&&Le(e,s,a),a};const De=["disabled","errorMessage","readOnly","size"];let Te=class extends(At(mt)){constructor(){super(...arguments),this.readOnly=!1,this.disabled=!1,this.size="md",this._selectedValues=[],this._handleCheckboxChange=t=>{const e=t.target,s=e.value,o=e.checked;this._selectedValues=o?[...this._selectedValues,s]:this._selectedValues.filter(t=>t!==s),this.dispatchSheriffEvent("sds-update")},this._handleSlotChange=()=>{this._updateChildProps([...De])}}_getChildCheckboxes(){return this._slotElement?.assignedElements({flatten:!0}).filter(t=>"SDS-CHECKBOX"===t.tagName)??[]}_updateChildProps(t){const e=this._getChildCheckboxes();for(const s of e)for(const e of t)switch(e){case"readOnly":s.readOnly=this.readOnly;break;case"disabled":s.parentRequestDisabled=this.disabled;break;case"errorMessage":s.error=Boolean(this.errorMessage);break;case"size":s.size=this.size}}updated(t){super.updated(t);const e=Array.from(t.keys());(e.includes("errorMessage")||e.includes("error-message"))&&this._updateChildProps(["errorMessage"])}attributeChangedCallback(t,e,s){if(super.attributeChangedCallback(t,e,s),"readonly"===t)return void this._updateChildProps(["readOnly"]);const o=t;De.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)},e=[this.errorMessage?"error-message":null,this.helpText?"help-text":null].filter(Boolean).join(" ")||void 0;return J`
|
|
988
|
+
<fieldset class="${te(t)}" aria-describedby="${qt(e)}" aria-invalid="${this.errorMessage?"true":"false"}">
|
|
989
|
+
${this.legend?J`<legend class="sds-checkbox-group__legend">${this.readOnly?J`<sds-icon name="lock-material-filled" size="md"></sds-icon>`:st}</sds-icon>${this.legend}</legend>`:st}
|
|
990
|
+
${this.helpText?J`<p id="help-text" class="sds-checkbox-group__help-text">${this.helpText}</p>`:st}
|
|
986
991
|
<div class="sds-checkbox-group__checkboxes" @change=${this._handleCheckboxChange}>
|
|
987
992
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
988
993
|
</div>
|
|
989
|
-
${this.errorMessage?J`<sds-alert id="error-message" variant="secondary" data-palette="danger"><p slot="message">${this.errorMessage}</p></sds-alert>`:
|
|
994
|
+
${this.errorMessage?J`<sds-alert id="error-message" variant="secondary" data-palette="danger"><p slot="message">${this.errorMessage}</p></sds-alert>`:st}
|
|
990
995
|
</fieldset>
|
|
991
|
-
`}};
|
|
996
|
+
`}};Te.styles=[Ae],Pe([S({type:String,reflect:!0})],Te.prototype,"legend",2),Pe([S({type:String,attribute:"help-text",reflect:!0})],Te.prototype,"helpText",2),Pe([S({type:String,attribute:"error-message",reflect:!0})],Te.prototype,"errorMessage",2),Pe([S({type:Boolean,attribute:"readonly",reflect:!0})],Te.prototype,"readOnly",2),Pe([S({type:Boolean,reflect:!0})],Te.prototype,"disabled",2),Pe([S({type:String,reflect:!0})],Te.prototype,"size",2),Pe([C()],Te.prototype,"_selectedValues",2),Pe([A("slot")],Te.prototype,"_slotElement",2),Te=Pe([O("sds-checkbox-group")],Te);const qe=d`
|
|
992
997
|
:host {
|
|
993
998
|
--_sds-chip-font-family: var(--sds-chip-font-family, var(--sds-typography-font-family-roboto));
|
|
994
999
|
--_sds-chip-font-weight: var(--sds-chip-font-weight, var(--sds-typography-font-weight-regular));
|
|
@@ -1133,16 +1138,16 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
1133
1138
|
white-space: nowrap;
|
|
1134
1139
|
}
|
|
1135
1140
|
}
|
|
1136
|
-
`;var
|
|
1141
|
+
`;var Me=Object.defineProperty,Ve=Object.getOwnPropertyDescriptor,Be=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?Ve(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(e,s,a):r(a))||a);return o&&a&&Me(e,s,a),a};let Re=class extends(se(At(ae(mt)))){constructor(){super(...arguments),this._initialChecked=!1,this._readOnly=!1,this._slotLabel="",this.variant="selectable",this.size="md",this.checked=!1,this._handleSlotChange=t=>{const e=t.target;this._slotLabel=e.assignedNodes().map(t=>t.textContent).join("").trim()},this._handleChange=t=>{if(t.stopImmediatePropagation(),!(t.target instanceof HTMLInputElement))return;if(this.disabled||this.readOnly)return void(t.target.checked=this.checked??!1);const e=t.target;this.checked=e.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=>{" "!==t.key&&"Enter"!==t.key||this._remove()}}get readOnly(){return this._readOnly}set readOnly(t){const e=this._readOnly;this._readOnly=t??!1,this.requestUpdate("readOnly",e)}connectedCallback(){super.connectedCallback(),this._initialChecked=this.checked??!1,this.internals.role="none",this.checked&&this.internals.setFormValue(this.value??null)}formResetCallback(){this.checked=this._initialChecked,this.internals.setFormValue(this.value??null)}get type(){return"checkbox"}render(){const t="removable"===this.variant&&!this.readOnly&&!this.disabled,e={"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?J`<button class="${te(e)}" @click=${this._remove} @keyup="${this._keypress}">
|
|
1137
1142
|
<slot></slot>
|
|
1138
1143
|
<sds-icon name="close-material-outlined" size="s"></sds-icon>
|
|
1139
|
-
</button>`:J`<label class="${
|
|
1144
|
+
</button>`:J`<label class="${te(e)}">
|
|
1140
1145
|
<input
|
|
1141
1146
|
id="control"
|
|
1142
1147
|
type="checkbox"
|
|
1143
1148
|
aria-label="${this._slotLabel}"
|
|
1144
|
-
name="${
|
|
1145
|
-
value="${
|
|
1149
|
+
name="${qt(this.name)}"
|
|
1150
|
+
value="${qt(this.value)}"
|
|
1146
1151
|
.checked="${this.checked??!1}"
|
|
1147
1152
|
?checked="${this.checked}"
|
|
1148
1153
|
?disabled="${this.disabled}"
|
|
@@ -1150,7 +1155,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
1150
1155
|
@change="${this._handleChange}"
|
|
1151
1156
|
/>
|
|
1152
1157
|
<span aria-hidden="true"><slot @slotchange="${this._handleSlotChange}"></slot></span>
|
|
1153
|
-
</label>`}};
|
|
1158
|
+
</label>`}};Re.styles=[qe],Be([A("#control")],Re.prototype,"control",2),Be([C()],Re.prototype,"_slotLabel",2),Be([S({type:String,reflect:!0})],Re.prototype,"variant",2),Be([S({type:String,reflect:!0})],Re.prototype,"size",2),Be([S({type:Boolean,reflect:!0})],Re.prototype,"checked",2),Be([S({type:String})],Re.prototype,"value",2),Be([S({type:Boolean,attribute:"readonly",reflect:!0})],Re.prototype,"readOnly",1),Re=Be([O("sds-chip")],Re);const je=d`
|
|
1154
1159
|
:host {
|
|
1155
1160
|
--_sds-env-banner-background-color: var(--sds-env-banner-background-color, var(--sds-color-alert-info-surface-active));
|
|
1156
1161
|
--_sds-env-banner-text-color: var(--sds-env-banner-text-color, var(--sds-color-alert-info-text-default));
|
|
@@ -1245,12 +1250,12 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
1245
1250
|
--_sds-env-banner-build-grid-column: var(--sds-env-banner-build-grid-column, 3 / 4);
|
|
1246
1251
|
}
|
|
1247
1252
|
}
|
|
1248
|
-
`;var
|
|
1253
|
+
`;var Ie=Object.defineProperty,Ne=(t,e,s,o)=>{for(var r,a=void 0,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(e,s,a)||a);return a&&Ie(e,s,a),a};const He={opplaering:"Opplæring",local:"Local",dev:"Dev",test:"Test",stage:"Stage",prod:"Prod"},Fe=class extends bt{render(){const t=this.env?He[this.env]:st;return J`
|
|
1249
1254
|
<div class="sds-env-banner">
|
|
1250
|
-
${t?J`<span class="sds-env-banner__env">${t}</span>`:
|
|
1251
|
-
${this.build?J`<span class="sds-env-banner__build">${this.build}</span>`:
|
|
1255
|
+
${t?J`<span class="sds-env-banner__env">${t}</span>`:st}
|
|
1256
|
+
${this.build?J`<span class="sds-env-banner__build">${this.build}</span>`:st}
|
|
1252
1257
|
</div>
|
|
1253
|
-
`}};
|
|
1258
|
+
`}};Fe.styles=[je];let Ue=Fe;Ne([S({type:String,reflect:!0})],Ue.prototype,"env"),Ne([S({type:String,reflect:!0})],Ue.prototype,"build");var Ge=Object.getOwnPropertyDescriptor;let Ke=class extends Ue{};Ke=((t,e,s,o)=>{for(var r,a=o>1?void 0:o?Ge(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(a)||a);return a})([O("sds-environment-banner")],Ke);const We=d`
|
|
1254
1259
|
:host {
|
|
1255
1260
|
--_sds-details-text-color: var(--sds-details-text-color, var(--sds-color-text-default, var(--sds-color-main-text-default)));
|
|
1256
1261
|
|
|
@@ -1388,7 +1393,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
1388
1393
|
display: inline;
|
|
1389
1394
|
margin: 0;
|
|
1390
1395
|
}
|
|
1391
|
-
`;var
|
|
1396
|
+
`;var Ze=Object.defineProperty,Ye=Object.getOwnPropertyDescriptor,Qe=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?Ye(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(e,s,a):r(a))||a);return o&&a&&Ze(e,s,a),a};let Xe=class extends(At(mt)){constructor(){super(...arguments),this.open=!1,this.standalone=!1,this.name=void 0,this._initialized=!1,this._handleToggle=t=>{const e=t.currentTarget;this.open!==e.open&&(this.open=e.open)}}updated(t){this._initialized?t.has("open")&&this.dispatchSheriffEvent("toggle",{open:!!this.open}):this._initialized=!0}render(){return J`
|
|
1392
1397
|
<details class="sds-details" .name="${this.name??""}" ?data-standalone="${this.standalone}" ?open="${this.open}" @toggle="${this._handleToggle}">
|
|
1393
1398
|
<summary class="sds-details__summary">
|
|
1394
1399
|
<sds-icon name="chevron_up-material-filled" role="presentation"></sds-icon>
|
|
@@ -1400,7 +1405,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
1400
1405
|
<slot></slot>
|
|
1401
1406
|
</div>
|
|
1402
1407
|
</details>
|
|
1403
|
-
`}};
|
|
1408
|
+
`}};Xe.styles=[We],Qe([S({type:Boolean,reflect:!0})],Xe.prototype,"open",2),Qe([S({type:Boolean,reflect:!0})],Xe.prototype,"standalone",2),Qe([S({type:String,reflect:!0})],Xe.prototype,"name",2),Xe=Qe([O("sds-details")],Xe);const Je=d`
|
|
1404
1409
|
:host {
|
|
1405
1410
|
display: block;
|
|
1406
1411
|
}
|
|
@@ -1437,7 +1442,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
1437
1442
|
:host([outlined]) div ::slotted(sds-details:only-child[open]) {
|
|
1438
1443
|
--sds-details-summary-border-radius: var(--sds-radius-md) var(--sds-radius-md) 0 0;
|
|
1439
1444
|
}
|
|
1440
|
-
`;var
|
|
1445
|
+
`;var ts=Object.defineProperty,es=Object.getOwnPropertyDescriptor,ss=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?es(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(e,s,a):r(a))||a);return o&&a&&ts(e,s,a),a};let os=class extends mt{constructor(){super(...arguments),this.outlined=!1,this._toggleListeners=/* @__PURE__ */new Map}updated(t){t.has("name")&&this._syncChildren()}disconnectedCallback(){super.disconnectedCallback(),this._removeListeners()}_handleSlotChange(){this._syncChildren()}_syncChildren(){this._removeListeners();const t=this._detailsChildren;t.forEach(e=>{if(e.name=this.name,this.name){const s=s=>{const{open:o}=s.detail;o&&t.forEach(t=>{t!==e&&t.open&&(t.open=!1)})};e.addEventListener("toggle",s),this._toggleListeners.set(e,s)}})}_removeListeners(){this._toggleListeners.forEach((t,e)=>{e.removeEventListener("toggle",t)}),this._toggleListeners.clear()}render(){return J`<div><slot @slotchange="${this._handleSlotChange}"></slot></div>`}};os.styles=[Je],ss([S({type:Boolean,reflect:!0})],os.prototype,"outlined",2),ss([S({type:String,reflect:!0})],os.prototype,"name",2),ss([L({selector:"sds-details"})],os.prototype,"_detailsChildren",2),os=ss([O("sds-details-group")],os);const rs=d`
|
|
1441
1446
|
:host {
|
|
1442
1447
|
--_sds-dialog-background-color: var(--sds-dialog-background-color, var(--sds-color-surface-default, var(--sds-color-main-surface-default)));
|
|
1443
1448
|
--_sds-dialog-backdrop-color: var(--sds-dialog-backdrop-color, rgba(0, 0, 0, 0.5));
|
|
@@ -1557,7 +1562,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
1557
1562
|
--_sds-dialog-animation-duration: 0ms;
|
|
1558
1563
|
}
|
|
1559
1564
|
}
|
|
1560
|
-
`;var
|
|
1565
|
+
`;var as=Object.defineProperty,is=(t,e,s,o)=>{for(var r,a=void 0,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(e,s,a)||a);return a&&as(e,s,a),a};let ds=!1;const ns=class extends(At(mt)){constructor(){super(...arguments),this.open=!1,this.modal=!1,this.closedby="closerequest",this.closeButtonLabel="Lukk dialogvindu",this._isHeaderSlotEmpty=!0,this._pointerDownInside=!1,this._handleClose=()=>{this.open=!1,this.dispatchSheriffEvent("close"),this.dispatchSheriffEvent("sds-close")},this._handleClick=t=>{const e=t.target;e?.closest('[data-command="close"],[command="close"]')&&this._closeDialog()},this._handlePointerDown=t=>{const e=this._dialog.getBoundingClientRect(),{clientX:s,clientY:o}=t;this._pointerDownInside=e.top<=o&&o<=e.bottom&&e.left<=s&&s<=e.right},this._handlePointerUp=t=>{const e=this._pointerDownInside;this._pointerDownInside=!1,"any"!==this.closedby||e||t.target===this._dialog&&requestAnimationFrame(()=>{this._dialog&&this._dialog.open&&this._closeDialog()})},this._handleCancel=t=>{"none"===this.closedby&&t.preventDefault()},this._handleHeaderSlotChange=t=>{const e=t.target;this._isHeaderSlotEmpty=0===e.assignedElements().length},this._handleAutoFocus=()=>{const t=this.shadowRoot?.querySelector("slot:not([name])")?.assignedElements({flatten:!0});if(!t||0===t.length)return;const e=t.find(t=>null!=t.getAttribute("autofocus"));e instanceof HTMLElement&&document.activeElement!==e&&e.focus()}}addEventListener(t,e,s){"sds-close"!==t||ds||(ds=!0,console.warn("[Sheriff] The 'sds-close' event on sds-dialog is deprecated and will be removed in the next major release. Listen for the 'close' event instead.")),super.addEventListener(t,e,s)}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("pointerdown",this._handlePointerDown),this._dialog.addEventListener("pointerup",this._handlePointerUp),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}requestClose(){this._dialog&&this._dialog.requestClose()}render(){return J`
|
|
1561
1566
|
<dialog .closedBy="${this.closedby}" class=${this._isHeaderSlotEmpty?"sds-dialog__empty-header":""}>
|
|
1562
1567
|
<div class="sds-dialog__header">
|
|
1563
1568
|
<slot name="header" @slotchange=${this._handleHeaderSlotChange}></slot>
|
|
@@ -1565,12 +1570,12 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
1565
1570
|
<sds-button class="sds-dialog__close-button" icon variant="tertiary" size="md" command="close" label="${this.closeButtonLabel}">
|
|
1566
1571
|
<sds-icon name="close-material-outlined" size="md"></sds-icon>
|
|
1567
1572
|
</sds-button>
|
|
1568
|
-
`:
|
|
1573
|
+
`:st}
|
|
1569
1574
|
</div>
|
|
1570
1575
|
<slot></slot>
|
|
1571
1576
|
<slot name="footer"></slot>
|
|
1572
1577
|
</dialog>
|
|
1573
|
-
`}};
|
|
1578
|
+
`}};ns.styles=[rs];let ls=ns;is([S({type:Boolean,reflect:!0})],ls.prototype,"open"),is([S({type:Boolean,reflect:!0})],ls.prototype,"modal"),is([S({type:String,reflect:!0})],ls.prototype,"closedby"),is([S({type:String,attribute:"close-button-label"})],ls.prototype,"closeButtonLabel"),is([A("dialog")],ls.prototype,"_dialog"),is([C()],ls.prototype,"_isHeaderSlotEmpty");var cs=Object.getOwnPropertyDescriptor;let hs=class extends ls{};hs=((t,e,s,o)=>{for(var r,a=o>1?void 0:o?cs(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(a)||a);return a})([O("sds-dialog")],hs);const ps=d`
|
|
1574
1579
|
:host {
|
|
1575
1580
|
--_sds-heading-font-family: var(--sds-heading-font-family, var(--sds-typography-font-family-roboto));
|
|
1576
1581
|
--_sds-heading-text-color: var(--sds-heading-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
|
|
@@ -1729,7 +1734,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
1729
1734
|
--_sds-heading-line-height: var(--sds-heading-line-height, var(--sds-typography-heading-xs-desktop-line-height));
|
|
1730
1735
|
}
|
|
1731
1736
|
}
|
|
1732
|
-
`;var
|
|
1737
|
+
`;var gs=Object.defineProperty,vs=(t,e,s,o)=>{for(var r,a=void 0,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(e,s,a)||a);return a&&gs(e,s,a),a};const us=class extends mt{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 J`<h1 class=${te(t)}><slot></slot></h1>`;case"h2":return J`<h2 class=${te(t)}><slot></slot></h2>`;case"h3":return J`<h3 class=${te(t)}><slot></slot></h3>`;case"h4":return J`<h4 class=${te(t)}><slot></slot></h4>`;case"h5":return J`<h5 class=${te(t)}><slot></slot></h5>`;case"h6":return J`<h6 class=${te(t)}><slot></slot></h6>`}}};us.styles=[ps];let fs=us;vs([S({type:String,reflect:!0})],fs.prototype,"level"),vs([S({type:String,reflect:!0})],fs.prototype,"size");var bs=Object.getOwnPropertyDescriptor;let _s=class extends fs{};_s=((t,e,s,o)=>{for(var r,a=o>1?void 0:o?bs(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(a)||a);return a})([O("sds-heading")],_s);const ms=d`
|
|
1733
1738
|
:host {
|
|
1734
1739
|
--_sds-internal-header-background-color: var(--sds-internal-header-background-color, var(--sds-color-action-default, var(--sds-color-accent-action-default)));
|
|
1735
1740
|
--_sds-internal-header-text-color: var(--sds-internal-header-text-color, var(--sds-color-action-contrast-default, var(--sds-color-main-action-contrast-default)));
|
|
@@ -1848,12 +1853,12 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
1848
1853
|
--_sds-internal-header-title-line-height: var(--sds-internal-header-title-line-height, var(--sds-typography-heading-sm-desktop-line-height));
|
|
1849
1854
|
}
|
|
1850
1855
|
}
|
|
1851
|
-
`;var
|
|
1856
|
+
`;var xs=Object.defineProperty,ys=(t,e,s,o)=>{for(var r,a=void 0,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(e,s,a)||a);return a&&xs(e,s,a),a};const ws=class extends bt{constructor(){super(...arguments),this.appName="",this.homeHref=""}get internalLogo(){return tt`
|
|
1852
1857
|
<svg class="sds-internal-header__internal-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 32" fill="currentColor" aria-hidden="true">
|
|
1853
1858
|
<path d="M6.5 24.3333H0L13.6667 0H20L6.5 24.3333Z" fill="var(--sds-color-support-3-action-default)" />
|
|
1854
1859
|
<path d="M12.5 32H6L19.6667 7.66663H26L12.5 32Z" fill="var(--sds-color-neutral-border-default)" />
|
|
1855
1860
|
</svg>
|
|
1856
|
-
`}get appNameElement(){if(!this.appName)return
|
|
1861
|
+
`}get appNameElement(){if(!this.appName)return st;const t=J`<span class="sds-internal-header__title">${this.appName}</span>`;return this.homeHref?J`<a class="sds-internal-header__home" href=${this.homeHref}>${t}</a>`:t}render(){return J`
|
|
1857
1862
|
<header class="sds-internal-header">
|
|
1858
1863
|
<div class="sds-internal-header__brand">${this.internalLogo} ${this.appNameElement}</div>
|
|
1859
1864
|
<div class="sds-internal-header__slots">
|
|
@@ -1865,7 +1870,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
1865
1870
|
</div>
|
|
1866
1871
|
</div>
|
|
1867
1872
|
</header>
|
|
1868
|
-
`}};
|
|
1873
|
+
`}};ws.styles=[ms];let ks=ws;ys([S({type:String,attribute:"app-name",reflect:!0})],ks.prototype,"appName"),ys([S({type:String,attribute:"home-href",reflect:!0})],ks.prototype,"homeHref");var zs=Object.getOwnPropertyDescriptor;let $s=class extends ks{};$s=((t,e,s,o)=>{for(var r,a=o>1?void 0:o?zs(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(a)||a);return a})([O("sds-internal-header")],$s);const Ss=d`
|
|
1869
1874
|
:host {
|
|
1870
1875
|
--_sds-loader-main-color: var(--sds-loader-main-color, var(--sds-color-action-contrast-default, var(--sds-color-main-action-contrast-default)));
|
|
1871
1876
|
--_sds-loader-secondary-color: var(--sds-loader-secondary-color, var(--sds-color-border-subtle, var(--sds-color-main-border-subtle)));
|
|
@@ -1941,10 +1946,10 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
1941
1946
|
stroke-dashoffset: -120px;
|
|
1942
1947
|
}
|
|
1943
1948
|
}
|
|
1944
|
-
`;var
|
|
1949
|
+
`;var Cs=Object.defineProperty,Es=Object.getOwnPropertyDescriptor,As=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?Es(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(e,s,a):r(a))||a);return o&&a&&Cs(e,s,a),a};let Ls=class extends mt{constructor(){super(...arguments),this.size="md",this.contrast=!1}render(){return J`<svg aria-label="Laster" class="sds-loader" role="img" viewBox="0 0 50 50">
|
|
1945
1950
|
<circle class="sds-loader__background" cx="25" cy="25" r="20" fill="none" stroke-width="7"></circle>
|
|
1946
1951
|
<circle class="sds-loader__circle" cx="25" cy="25" r="20" fill="none" stroke-width="7"></circle>
|
|
1947
|
-
</svg>`}};
|
|
1952
|
+
</svg>`}};Ls.styles=[Ss],As([S({type:String,reflect:!0})],Ls.prototype,"size",2),As([S({type:Boolean,reflect:!0})],Ls.prototype,"contrast",2),Ls=As([O("sds-loader")],Ls);const Os=d`
|
|
1948
1953
|
:host {
|
|
1949
1954
|
--_sds-notification-background-color: var(--sds-notification-background-color, var(--sds-color-alert-info-surface-tinted));
|
|
1950
1955
|
|
|
@@ -2081,9 +2086,9 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2081
2086
|
margin: 0 !important;
|
|
2082
2087
|
max-width: var(--_sds-notification-max-line-width) !important;
|
|
2083
2088
|
}
|
|
2084
|
-
`;var
|
|
2089
|
+
`;var Ps=Object.defineProperty,Ds=Object.getOwnPropertyDescriptor,Ts=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?Ds(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(e,s,a):r(a))||a);return o&&a&&Ps(e,s,a),a};const qs={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 Ms=!1,Vs=class extends(At(mt)){constructor(){super(),this.variant="info",this._remove=()=>{this.dispatchSheriffEvent("sds-remove")},Ms||(Ms=!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 J`<div class="${te({"sds-notification":!0})}">
|
|
2085
2090
|
<div class="sds-notification__type">
|
|
2086
|
-
<sds-icon class="sds-notification__icon" name="${
|
|
2091
|
+
<sds-icon class="sds-notification__icon" name="${qs[this.variant]}" size="md"></sds-icon>
|
|
2087
2092
|
</div>
|
|
2088
2093
|
<div class="sds-notification__content">
|
|
2089
2094
|
<slot name="title"></slot>
|
|
@@ -2093,13 +2098,13 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2093
2098
|
<sds-button icon variant="tertiary" color="${t}" size="sm" @click=${this._remove} aria-label="${this.removableLabel}">
|
|
2094
2099
|
<sds-icon name="close-material-outlined" size="sm"></sds-icon>
|
|
2095
2100
|
</sds-button>
|
|
2096
|
-
</div>`:
|
|
2097
|
-
</div>`}};
|
|
2101
|
+
</div>`:st}
|
|
2102
|
+
</div>`}};Vs.styles=[Os],Ts([S({type:String,reflect:!0})],Vs.prototype,"variant",2),Ts([S({type:String,attribute:"removable-label",reflect:!0})],Vs.prototype,"removableLabel",2),Vs=Ts([O("sds-notification")],Vs);const Bs=d`
|
|
2098
2103
|
:host {
|
|
2099
2104
|
display: flex;
|
|
2100
2105
|
flex-direction: column;
|
|
2101
2106
|
}
|
|
2102
|
-
`;var
|
|
2107
|
+
`;var Rs=Object.defineProperty,js=Object.getOwnPropertyDescriptor,Is=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?js(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(e,s,a):r(a))||a);return o&&a&&Rs(e,s,a),a};let Ns=class extends mt{constructor(){super(),this.internals=this.attachInternals(),this.internals.role="list"}render(){return J`<slot></slot>`}};Ns.styles=[Bs],Is([S({type:String,reflect:!0,attribute:"heading-level"})],Ns.prototype,"headingLevel",2),Ns=Is([O("sds-process")],Ns);const Hs=d`
|
|
2103
2108
|
:host {
|
|
2104
2109
|
--_sds-process-step-border-width: var(--sds-process-step-border-width, 2px);
|
|
2105
2110
|
--_sds-process-step-border-color: var(--sds-process-step-border-color, var(--sds-color-action-default, var(--sds-color-main-action-default)));
|
|
@@ -2243,21 +2248,21 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2243
2248
|
:host(:last-of-type) {
|
|
2244
2249
|
--_sds-process-step-line-display: none;
|
|
2245
2250
|
}
|
|
2246
|
-
`;var
|
|
2251
|
+
`;var Fs=Object.defineProperty,Us=Object.getOwnPropertyDescriptor,Gs=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?Us(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(e,s,a):r(a))||a);return o&&a&&Fs(e,s,a),a};let Ks=class extends mt{constructor(){super(),this._headingLevel="h2",this._handleMarkerSlotChange=()=>{if(!this.markerSlot||!this.step)return;const t=0===this.markerSlot.assignedNodes({flatten:!0}).length;this.step.classList.toggle("sds-process-step--sub-step",t)},this.internals=this.attachInternals(),this.internals.role="listitem"}connectedCallback(){super.connectedCallback();const t=this.closest("sds-process");t&&t.headingLevel&&(this._headingLevel=t.headingLevel)}firstUpdated(){this._handleMarkerSlotChange()}get safeHeadingLevel(){return["h2","h3","h4","h5","h6"].includes(this._headingLevel)?this._headingLevel:"h2"}render(){return $t`
|
|
2247
2252
|
<div class="sds-process-step">
|
|
2248
2253
|
<div class="sds-process-step__item">
|
|
2249
2254
|
<div class="sds-process-step__marker" aria-hidden="true">
|
|
2250
2255
|
<slot name="marker" @slotchange=${this._handleMarkerSlotChange}></slot>
|
|
2251
2256
|
</div>
|
|
2252
2257
|
<div class="sds-process-step__content">
|
|
2253
|
-
${this.heading?$t`<${wt(this.safeHeadingLevel)} class="sds-process-step__heading">${this.heading}</${wt(this.safeHeadingLevel)}>`:
|
|
2254
|
-
${this.timestamp?$t`<div class="sds-process-step__timestamp">${this.timestamp}</div>`:
|
|
2258
|
+
${this.heading?$t`<${wt(this.safeHeadingLevel)} class="sds-process-step__heading">${this.heading}</${wt(this.safeHeadingLevel)}>`:st}
|
|
2259
|
+
${this.timestamp?$t`<div class="sds-process-step__timestamp">${this.timestamp}</div>`:st}
|
|
2255
2260
|
<div class="sds-process-step__slot-content"><slot></slot></div>
|
|
2256
2261
|
</div>
|
|
2257
2262
|
</div>
|
|
2258
2263
|
<span class="sds-process-step__line"></span>
|
|
2259
2264
|
</div>
|
|
2260
|
-
`}};
|
|
2265
|
+
`}};Ks.styles=[Hs],Gs([S({type:String,reflect:!0})],Ks.prototype,"heading",2),Gs([S({type:String,reflect:!0})],Ks.prototype,"timestamp",2),Gs([A('slot[name="marker"]')],Ks.prototype,"markerSlot",2),Gs([A(".sds-process-step")],Ks.prototype,"step",2),Ks=Gs([O("sds-process-step")],Ks);const Ws=d`
|
|
2261
2266
|
${i(':host{--_ds-floating:top;--_ds-floating-arrow-size:0;--_ds-floating-arrow-visibility:inherit;animation:ds-fade-in .15s ease-in-out forwards;inset:0 auto auto 0;margin:0;overflow:visible;position:absolute}:host:before{background:inherit;border:inherit;border-left-color:transparent;border-top-color:transparent;box-sizing:border-box;content:"";height:var(--_ds-floating-arrow-size);left:var(--_ds-floating-arrow-x,50%);position:absolute;rotate:45deg;top:var(--_ds-floating-arrow-y,100%);translate:-50% -50%;visibility:var(--_ds-floating-arrow-visibility);width:var(--_ds-floating-arrow-size)}:host[data-overscroll=contain]{--_ds-floating-overscroll:contain;overscroll-behavior:contain;overflow:auto}:host{&[data-floating|=top]:before{top:100%;rotate:45deg}&[data-floating|=right]:before{left:0;rotate:135deg}&[data-floating|=bottom]:before{top:0;rotate:-135deg}&[data-floating|=left]:before{left:100%;rotate:-45deg}--_ds-floating:var(--dsc-popover-placement);--_ds-floating-arrow-size:var(--dsc-popover-arrow-size);--dsc-popover-background:var(--ds-color-surface-default);--dsc-popover-border-width:var(--ds-border-width-default);--dsc-popover-border-style:solid;--dsc-popover-border-color:var(--ds-color-border-default);--dsc-popover-color:var(--ds-color-text-default);--dsc-popover-arrow-size:var(--ds-size-3);--dsc-popover-border-radius:var(--ds-border-radius-md);--dsc-popover-max-width:300px;--dsc-popover-padding:var(--ds-size-3) var(--ds-size-4);--dsc-popover-box-shadow:var(--ds-shadow-md);--dsc-popover-placement:top;background:var(--dsc-popover-background);border-radius:var(--dsc-popover-border-radius);border-width:var(--dsc-popover-border-width);border-style:var(--dsc-popover-border-style);border-color:var(--dsc-popover-border-color);box-shadow:var(--dsc-popover-box-shadow);box-sizing:border-box;color:var(--dsc-popover-color);max-width:var(--dsc-popover-max-width);padding:var(--dsc-popover-padding)}:host[data-variant=default]{--dsc-popover-background:var(--ds-color-surface-default)}:host[data-variant=tinted]{--dsc-popover-background:var(--ds-color-surface-tinted)}[data-popover=inline]{all:unset;cursor:pointer;text-decoration:underline dotted;text-underline-offset:.27em;font-size:inherit}[data-popover=inline]:not([hidden]){display:inline}[data-popover=inline]:focus-visible{box-shadow:var(--_ds--focus,var(--dsc-focus-boxShadow));outline:var(--_ds--focus,var(--dsc-focus-outline));outline-offset:var(--_ds--focus,var(--ds-border-width-focus))}[data-popover=inline]:focus-visible *{--_ds--focus: }')}
|
|
2262
2267
|
|
|
2263
2268
|
:host {
|
|
@@ -2305,7 +2310,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2305
2310
|
animation: none;
|
|
2306
2311
|
}
|
|
2307
2312
|
}
|
|
2308
|
-
`;var
|
|
2313
|
+
`;var Zs=Object.defineProperty,Ys=Object.getOwnPropertyDescriptor,Qs=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?Ys(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(e,s,a):r(a))||a);return o&&a&&Zs(e,s,a),a};let Xs=class extends mt{constructor(){super(...arguments),this.placement="top",this.autoPlacement=void 0,this.overscroll=void 0}connectedCallback(){super.connectedCallback(),this.hasAttribute("popover")||this.setAttribute("popover","auto"),this.syncDataAttributes()}updated(t){(t.has("placement")||t.has("autoPlacement")||t.has("overscroll"))&&this.syncDataAttributes()}syncDataAttributes(){this.placement&&(this.dataset.placement=this.placement),this.autoPlacement&&(this.dataset.autoplacement=this.autoPlacement),this.overscroll&&(this.dataset.overscroll=this.overscroll)}render(){return J`<slot></slot>`}};Xs.styles=[Ws],Qs([S({type:String,reflect:!0})],Xs.prototype,"placement",2),Qs([S({type:String,reflect:!0})],Xs.prototype,"autoPlacement",2),Qs([S({type:String,reflect:!0})],Xs.prototype,"overscroll",2),Xs=Qs([O("sds-popover")],Xs);const Js=d`
|
|
2309
2314
|
:host {
|
|
2310
2315
|
--_sds-radio-font-family: var(--sds-radio-font-family, var(--sds-typography-font-family-roboto));
|
|
2311
2316
|
--_sds-radio-disabled-opacity: var(--sds-radio-disabled-opacity, var(--sds-color-states-disabled-opacity));
|
|
@@ -2346,6 +2351,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2346
2351
|
|
|
2347
2352
|
.sds-radio {
|
|
2348
2353
|
display: grid;
|
|
2354
|
+
cursor: pointer;
|
|
2349
2355
|
font-family: var(--_sds-radio-font-family);
|
|
2350
2356
|
gap: var(--_sds-radio-block-gap) var(--_sds-radio-inline-gap);
|
|
2351
2357
|
grid-template-areas: var(--_sds-radio-grid-template-areas);
|
|
@@ -2357,13 +2363,22 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2357
2363
|
pointer-events: none;
|
|
2358
2364
|
opacity: var(--_sds-radio-disabled-opacity);
|
|
2359
2365
|
}
|
|
2366
|
+
}
|
|
2360
2367
|
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2368
|
+
:host([readonly]) .sds-radio {
|
|
2369
|
+
cursor: default;
|
|
2370
|
+
}
|
|
2371
|
+
|
|
2372
|
+
/* The host carries role="radio" and takes focus, so the ring keys off it. */
|
|
2373
|
+
:host(:focus-visible) {
|
|
2374
|
+
outline: none;
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
:host(:focus-visible) .sds-radio {
|
|
2378
|
+
box-shadow: 0 0 0 var(--_sds-radio-focus-spacing) var(--_sds-radio-focus-color-inner);
|
|
2379
|
+
outline: var(--_sds-radio-focus-outline-size) solid var(--_sds-radio-focus-color-outer);
|
|
2380
|
+
outline-offset: var(--_sds-radio-focus-spacing);
|
|
2381
|
+
border-radius: var(--_sds-radio-focus-radius);
|
|
2367
2382
|
}
|
|
2368
2383
|
|
|
2369
2384
|
.sds-radio--error {
|
|
@@ -2434,30 +2449,26 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2434
2449
|
}
|
|
2435
2450
|
}
|
|
2436
2451
|
|
|
2437
|
-
|
|
2452
|
+
/*
|
|
2453
|
+
* The input is inert so it stays out of the accessibility tree, which also excludes
|
|
2454
|
+
* it from hit testing — it never matches :hover or :active itself. Both are driven
|
|
2455
|
+
* from the host instead, so hovering the label highlights the control too, the same
|
|
2456
|
+
* way clicking the label already selects it.
|
|
2457
|
+
*/
|
|
2458
|
+
:host(:hover) &:not([readonly]) {
|
|
2438
2459
|
--_sds-radio-input-background-color: var(--sds-radio-input-background-color, var(--sds-color-surface-default, var(--sds-color-neutral-surface-default)));
|
|
2439
2460
|
--_sds-radio-input-border-color: var(--sds-radio-input-border-color, var(--sds-color-action-hover, var(--sds-color-main-action-hover)));
|
|
2461
|
+
}
|
|
2440
2462
|
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
}
|
|
2463
|
+
:host(:hover) &[checked]:not([readonly]) {
|
|
2464
|
+
--_sds-radio-input-background-color: var(--sds-radio-input-background-color, var(--sds-color-action-hover, var(--sds-color-main-action-hover)));
|
|
2465
|
+
--_sds-radio-input-border-color: var(--sds-radio-input-border-color, var(--sds-color-action-hover, var(--sds-color-main-action-hover)));
|
|
2466
|
+
--_sds-radio-input-dot-color: var(--sds-radio-input-dot-color, var(--sds-color-surface-default, var(--sds-color-neutral-surface-default)));
|
|
2446
2467
|
}
|
|
2447
2468
|
|
|
2448
|
-
&:
|
|
2469
|
+
:host(:active) &:not([readonly], [checked]) {
|
|
2449
2470
|
--_sds-radio-input-background-color: var(--sds-radio-input-background-color, var(--sds-color-surface-default, var(--sds-color-neutral-surface-default)));
|
|
2450
2471
|
--_sds-radio-input-border-color: var(--sds-radio-input-border-color, var(--sds-color-action-active, var(--sds-color-main-action-active)));
|
|
2451
|
-
|
|
2452
|
-
&[checked] {
|
|
2453
|
-
--_sds-radio-input-background-color: var(--sds-radio-input-background-color, var(--sds-color-action-active, var(--sds-color-main-action-active)));
|
|
2454
|
-
--_sds-radio-input-border-color: var(--sds-radio-input-border-color, var(--sds-color-action-active, var(--sds-color-main-action-active)));
|
|
2455
|
-
--_sds-radio-input-dot-color: var(--sds-radio-input-dot-color, var(--sds-color-surface-default, var(--sds-color-neutral-surface-default)));
|
|
2456
|
-
}
|
|
2457
|
-
}
|
|
2458
|
-
|
|
2459
|
-
&:focus-visible {
|
|
2460
|
-
outline: none;
|
|
2461
2472
|
}
|
|
2462
2473
|
|
|
2463
2474
|
&.sds-radio__input--error {
|
|
@@ -2469,26 +2480,20 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2469
2480
|
--_sds-radio-input-dot-color: var(--sds-radio-input-dot-color, var(--sds-color-alert-danger-action-contrast-default));
|
|
2470
2481
|
}
|
|
2471
2482
|
|
|
2472
|
-
|
|
2483
|
+
:host(:hover) &:not([readonly]) {
|
|
2473
2484
|
--_sds-radio-input-background-color: var(--sds-radio-input-background-color, var(--sds-color-surface-default, var(--sds-color-neutral-surface-default)));
|
|
2474
2485
|
--_sds-radio-input-border-color: var(--sds-radio-input-border-color, var(--sds-color-alert-danger-action-hover));
|
|
2486
|
+
}
|
|
2475
2487
|
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
}
|
|
2488
|
+
:host(:hover) &[checked]:not([readonly]) {
|
|
2489
|
+
--_sds-radio-input-background-color: var(--sds-radio-input-background-color, var(--sds-color-alert-danger-action-hover));
|
|
2490
|
+
--_sds-radio-input-border-color: var(--sds-radio-input-border-color, var(--sds-color-alert-danger-action-hover));
|
|
2491
|
+
--_sds-radio-input-dot-color: var(--sds-radio-input-dot-color, var(--sds-color-surface-default, var(--sds-color-neutral-surface-default)));
|
|
2481
2492
|
}
|
|
2482
2493
|
|
|
2483
|
-
&:
|
|
2494
|
+
:host(:active) &:not([readonly], [checked]) {
|
|
2484
2495
|
--_sds-radio-input-background-color: var(--sds-radio-input-background-color, var(--sds-color-surface-default, var(--sds-color-neutral-surface-default)));
|
|
2485
2496
|
--_sds-radio-input-border-color: var(--sds-radio-input-border-color, var(--sds-color-alert-danger-action-active));
|
|
2486
|
-
|
|
2487
|
-
&[checked] {
|
|
2488
|
-
--_sds-radio-input-background-color: var(--sds-radio-input-background-color, var(--sds-color-alert-danger-action-active));
|
|
2489
|
-
--_sds-radio-input-border-color: var(--sds-radio-input-border-color, var(--sds-color-alert-danger-action-active));
|
|
2490
|
-
--_sds-radio-input-dot-color: var(--sds-radio-input-dot-color, var(--sds-color-surface-default, var(--sds-color-neutral-surface-default)));
|
|
2491
|
-
}
|
|
2492
2497
|
}
|
|
2493
2498
|
}
|
|
2494
2499
|
}
|
|
@@ -2514,32 +2519,28 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2514
2519
|
margin-block-start: -1px;
|
|
2515
2520
|
}
|
|
2516
2521
|
}
|
|
2517
|
-
`;var to=Object.defineProperty,
|
|
2518
|
-
<div class="${
|
|
2522
|
+
`;var to=Object.defineProperty,eo=Object.getOwnPropertyDescriptor,so=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?eo(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(e,s,a):r(a))||a);return o&&a&&to(e,s,a),a};let oo=class extends(se(At(ae(mt)))){constructor(){super(...arguments),this.required=!1,this.label="",this.hideLabel=!1,this.value="on",this.checked=!1,this.error=!1,this.size="md",this._hasSlottedLabel=!1,this._slottedLabelText="",this._rootNode=null,this._disabled=!1,this._disabledIsAuthorControlled=!1,this._settingDisabledFromParent=!1,this._parentRequestDisabled=!1,this._initialChecked=!1,this._pendingGroupSync=!1,this._handleMouseDown=()=>{this.disabled||this.focus()},this._handleClick=()=>this._select(),this._handleKeydown=t=>{if(this.disabled)return;if(t.altKey||t.ctrlKey||t.shiftKey||t.metaKey)return;if(" "===t.key)return t.preventDefault(),void this.click();if(!this.name)return;const e=this._getGroupRadios().filter(t=>!t.disabled),s=e.indexOf(this);if(-1===s)return;let o;switch(t.key){case"ArrowUp":case"ArrowLeft":o=e[s>0?s-1:e.length-1];break;case"ArrowDown":case"ArrowRight":o=e[s<e.length-1?s+1:0];break;default:return}t.preventDefault(),e.length<2||(o?.focus(),o?.click())},this._handleFocus=t=>{t instanceof CustomEvent||(t.stopImmediatePropagation(),this.dispatchSheriffEvent("focus"))},this._handleBlur=t=>{t instanceof CustomEvent||(t.stopImmediatePropagation(),this.dispatchSheriffEvent("blur"))},this._handleLabelSlotChange=t=>{const e=t.target.assignedNodes();this._hasSlottedLabel=e.length>0,this._slottedLabelText=e.map(t=>t.textContent??"").join("").trim()}}get disabled(){return this._disabled}set disabled(t){const e=t??!1,s=this._disabled;s!==e&&(this._disabled=e,this.requestUpdate("disabled",s),this._settingDisabledFromParent||(this._disabledIsAuthorControlled=e))}get parentRequestDisabled(){return this._parentRequestDisabled}set parentRequestDisabled(t){const e=t??!1,s=this._parentRequestDisabled;s!==e&&(this._parentRequestDisabled=e,this.requestUpdate("parentRequestDisabled",s),this._disabledIsAuthorControlled||(this._settingDisabledFromParent=!0,this.disabled=e,this._settingDisabledFromParent=!1))}connectedCallback(){this._rootNode=this.getRootNode(),super.connectedCallback(),this.setAttribute("role","radio"),this._initialChecked||(this._initialChecked=this.checked??!1),this.addEventListener("keydown",this._handleKeydown),this.addEventListener("mousedown",this._handleMouseDown),this.addEventListener("click",this._handleClick),this.addEventListener("focus",this._handleFocus),this.addEventListener("blur",this._handleBlur),this._scheduleGroupSync()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleKeydown),this.removeEventListener("mousedown",this._handleMouseDown),this.removeEventListener("click",this._handleClick),this.removeEventListener("focus",this._handleFocus),this.removeEventListener("blur",this._handleBlur),this._syncGroup(this._getGroupRadios()),this._rootNode=null}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),t.has("name")&&(this._syncGroup(this._getGroupRadios(t.get("name"))),this._syncGroup(this.name?this._getGroupRadios():[this])),this._disabledIsAuthorControlled||this.disabled===this._parentRequestDisabled||(this._settingDisabledFromParent=!0,this.disabled=this._parentRequestDisabled??!1,this._settingDisabledFromParent=!1),(t.has("checked")||t.has("disabled"))&&this._updateGroupTabStops(this.name?this._getGroupRadios():[this]),this._syncHostAria()}_getGroupRadios(t=this.name,e=this._rootNode??this.getRootNode()){return t&&e?Array.from(e.querySelectorAll("sds-radio")).filter(e=>e.name===t):[]}_syncHostAria(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("aria-invalid",this.error?"true":"false"),this.disabled?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled"),this.required?this.setAttribute("aria-required","true"):this.removeAttribute("aria-required");const t=this._hasSlottedLabel?this._slottedLabelText:this.label??"";t?this.setAttribute("aria-label",t):this.removeAttribute("aria-label"),oo._supportsAriaElementReferences&&(this.internals.ariaDescribedByElements=this._helpTextElement?[this._helpTextElement]:[])}_select(){this.disabled||this.readOnly||this.checked||(this.checked=!0,this._uncheckSiblings(),this._updateGroupValidation(),this.dispatchSheriffEvent("change"))}_updateGroupPositions(t){t.forEach((e,s)=>{e.setAttribute("aria-posinset",String(s+1)),e.setAttribute("aria-setsize",String(t.length))})}_updateGroupTabStops(t){const e=t.filter(t=>!t.disabled),s=e.find(t=>t.checked)??e[0];for(const o of t)o.disabled?o.removeAttribute("tabindex"):o.tabIndex=o===s?0:-1}_syncGroup(t){this._updateGroupPositions(t),this._updateGroupTabStops(t)}_scheduleGroupSync(){this._pendingGroupSync||(this._pendingGroupSync=!0,queueMicrotask(()=>{this._pendingGroupSync=!1,this.isConnected&&this._syncGroup(this.name?this._getGroupRadios():[this])}))}_updateGroupValidation(){const t=this.name?this._getGroupRadios():[this],e=t.some(t=>t.checked),s=t.some(t=>t.required);t.forEach(t=>{t.control&&(s?t.internals.setValidity(e?{}:{valueMissing:!0},e?"":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 e of t)e!==this&&e.checked&&(e.checked=!1,e.internals.setFormValue(null))}focus(t){this.disabled||HTMLElement.prototype.focus.call(this,t)}blur(){HTMLElement.prototype.blur.call(this)}click(){this.disabled||this.readOnly||HTMLElement.prototype.click.call(this)}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)}render(){const t={"sds-radio":!0,"sds-radio--error":Boolean(this.error)},e=this._hasSlottedLabel||Boolean(this.label),s={"sds-radio__input":!0,"sds-radio__input--error":Boolean(this.error)};return J`
|
|
2523
|
+
<div class="${te(t)}">
|
|
2519
2524
|
<input
|
|
2520
2525
|
id="control"
|
|
2521
2526
|
type="radio"
|
|
2522
|
-
name="${
|
|
2523
|
-
value="${
|
|
2527
|
+
name="${qt(this.name)}"
|
|
2528
|
+
value="${qt(this.value)}"
|
|
2524
2529
|
?checked="${this.checked??!1}"
|
|
2525
2530
|
.checked="${this.checked??!1}"
|
|
2526
2531
|
?disabled="${this.disabled??!1}"
|
|
2527
2532
|
.disabled="${this.disabled??!1}"
|
|
2528
2533
|
?required="${this.required}"
|
|
2529
2534
|
?readonly="${this.readOnly}"
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
@change="${this._handleChange}"
|
|
2533
|
-
@focus="${this._handleFocus}"
|
|
2534
|
-
@blur="${this._handleBlur}"
|
|
2535
|
-
class="${ts(e)}"
|
|
2535
|
+
inert
|
|
2536
|
+
class="${te(s)}"
|
|
2536
2537
|
/>
|
|
2537
|
-
<label class="sds-radio__label"
|
|
2538
|
+
<label class="sds-radio__label" ?hidden="${!e}">
|
|
2538
2539
|
<slot name="label" @slotchange="${this._handleLabelSlotChange}">${this.label}</slot>
|
|
2539
2540
|
</label>
|
|
2540
|
-
${this.helpText?J`<span id="help-text" class="sds-radio__help-text">${this.helpText}</span>`:
|
|
2541
|
+
${this.helpText?J`<span id="help-text" class="sds-radio__help-text">${this.helpText}</span>`:st}
|
|
2541
2542
|
</div>
|
|
2542
|
-
`}};oo.styles=[
|
|
2543
|
+
`}};oo.styles=[Js],oo.shadowRootOptions={...bt.shadowRootOptions,delegatesFocus:!1},oo._supportsAriaElementReferences="undefined"!=typeof ElementInternals&&"ariaDescribedByElements"in ElementInternals.prototype,so([S({type:Boolean,reflect:!0})],oo.prototype,"required",2),so([S({type:String,reflect:!0})],oo.prototype,"label",2),so([S({type:Boolean,reflect:!0,attribute:"hide-label"})],oo.prototype,"hideLabel",2),so([S({type:String})],oo.prototype,"value",2),so([S({type:Boolean,reflect:!0})],oo.prototype,"checked",2),so([S({type:Boolean,reflect:!0})],oo.prototype,"error",2),so([S({type:String,reflect:!0})],oo.prototype,"size",2),so([S({type:String,attribute:"help-text"})],oo.prototype,"helpText",2),so([S({type:Boolean,reflect:!0})],oo.prototype,"disabled",1),so([S({type:Boolean,attribute:!1})],oo.prototype,"parentRequestDisabled",1),so([A("#control")],oo.prototype,"control",2),so([A("#help-text")],oo.prototype,"_helpTextElement",2),so([C()],oo.prototype,"_hasSlottedLabel",2),so([C()],oo.prototype,"_slottedLabelText",2),oo=so([O("sds-radio")],oo);const ro=d`
|
|
2543
2544
|
:host {
|
|
2544
2545
|
--_sds-radio-group-gap: var(--sds-radio-group-gap, var(--sds-spacing-xs));
|
|
2545
2546
|
--_sds-radio-group-row-gap: var(--sds-radio-group-row-gap, var(--sds-spacing-md));
|
|
@@ -2637,18 +2638,25 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2637
2638
|
--_sds-radio-group-help-text-font-size: var(--sds-radio-group-help-text-font-size, var(--sds-components-font-size-content-lg));
|
|
2638
2639
|
--_sds-radio-group-help-text-line-height: var(--sds-radio-group-help-text-line-height, var(--sds-components-line-height-squeezed-lg));
|
|
2639
2640
|
}
|
|
2640
|
-
`;var ao=Object.defineProperty,io=Object.getOwnPropertyDescriptor,no=(t,s,
|
|
2641
|
-
<fieldset class="${
|
|
2642
|
-
${this.legend?J`<legend class="sds-radio-group__legend">${this.readOnly?J`<sds-icon name="lock-material-filled" size="md"></sds-icon>`:
|
|
2643
|
-
${this.helpText?J`<p id="help-text" class="sds-radio-group__help-text">${this.helpText}</p>`:
|
|
2644
|
-
<div
|
|
2641
|
+
`;var ao=Object.defineProperty,io=Object.getOwnPropertyDescriptor,no=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?io(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(e,s,a):r(a))||a);return o&&a&&ao(e,s,a),a};const lo=["disabled","errorMessage","readOnly","required","size"];let co=class extends(At(mt)){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 e=t.composedPath().find(t=>t instanceof HTMLElement&&"SDS-RADIO"===t.tagName);e&&(this._selectedValue=e.getAttribute("value")||null,this.dispatchSheriffEvent("sds-update"))},this._handleSlotChange=()=>{this._updateChildProps([...lo])}}_getChildRadios(){return this._slotElement?.assignedElements({flatten:!0}).filter(t=>"SDS-RADIO"===t.tagName)??[]}_updateChildProps(t){const e=this._getChildRadios();for(const s of e)for(const e of t)switch(e){case"readOnly":s.readOnly=this.readOnly;break;case"disabled":s.parentRequestDisabled=this.disabled;break;case"errorMessage":s.error=Boolean(this.errorMessage);break;case"required":s.required=this.required;break;case"size":s.size=this.size}}updated(t){super.updated(t);const e=Array.from(t.keys());(e.includes("errorMessage")||e.includes("error-message"))&&this._updateChildProps(["errorMessage"])}attributeChangedCallback(t,e,s){if(super.attributeChangedCallback(t,e,s),"readonly"===t)return void this._updateChildProps(["readOnly"]);const o=t;lo.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},e={"sds-radio-group__radios":!0,"sds-radio-group--column":"column"===this.direction,"sds-radio-group--row":"row"===this.direction},s=[this.errorMessage?"error-message":null,this.helpText?"help-text":null].filter(Boolean).join(" ")||void 0;return J`
|
|
2642
|
+
<fieldset class="${te(t)}" role="none">
|
|
2643
|
+
${this.legend?J`<legend id="group-legend" class="sds-radio-group__legend">${this.readOnly?J`<sds-icon name="lock-material-filled" size="md"></sds-icon>`:st}${this.legend}</legend>`:st}
|
|
2644
|
+
${this.helpText?J`<p id="help-text" class="sds-radio-group__help-text">${this.helpText}</p>`:st}
|
|
2645
|
+
<div
|
|
2646
|
+
class="${te(e)}"
|
|
2647
|
+
role="radiogroup"
|
|
2648
|
+
aria-labelledby="${qt(this.legend?"group-legend":void 0)}"
|
|
2649
|
+
aria-describedby="${qt(s)}"
|
|
2650
|
+
aria-invalid="${this.errorMessage?"true":"false"}"
|
|
2651
|
+
@change=${this._handleRadioChange}
|
|
2652
|
+
>
|
|
2645
2653
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
2646
2654
|
</div>
|
|
2647
2655
|
${this.errorMessage?J`<sds-alert id="error-message" variant="secondary" data-palette="danger">
|
|
2648
2656
|
<p slot="message">${this.errorMessage}</p>
|
|
2649
|
-
</sds-alert>`:
|
|
2657
|
+
</sds-alert>`:st}
|
|
2650
2658
|
</fieldset>
|
|
2651
|
-
`}get value(){return{selectedValue:this._selectedValue}}};co.styles=[ro],no([S({type:String})],co.prototype,"legend",2),no([S({type:String,attribute:"help-text"})],co.prototype,"helpText",2),no([S({type:String,attribute:"error-message"})],co.prototype,"errorMessage",2),no([S({type:Boolean,attribute:"readonly",reflect:!0})],co.prototype,"readOnly",2),no([S({type:String})],co.prototype,"direction",2),no([S({type:Boolean,reflect:!0})],co.prototype,"disabled",2),no([S({type:Boolean,reflect:!0})],co.prototype,"required",2),no([S({type:String,reflect:!0})],co.prototype,"size",2),no([C()],co.prototype,"_selectedValue",2),no([
|
|
2659
|
+
`}get value(){return{selectedValue:this._selectedValue}}};co.styles=[ro],no([S({type:String})],co.prototype,"legend",2),no([S({type:String,attribute:"help-text"})],co.prototype,"helpText",2),no([S({type:String,attribute:"error-message"})],co.prototype,"errorMessage",2),no([S({type:Boolean,attribute:"readonly",reflect:!0})],co.prototype,"readOnly",2),no([S({type:String})],co.prototype,"direction",2),no([S({type:Boolean,reflect:!0})],co.prototype,"disabled",2),no([S({type:Boolean,reflect:!0})],co.prototype,"required",2),no([S({type:String,reflect:!0})],co.prototype,"size",2),no([C()],co.prototype,"_selectedValue",2),no([A("slot")],co.prototype,"_slotElement",2),co=no([O("sds-radio-group")],co);const ho=d`
|
|
2652
2660
|
:host {
|
|
2653
2661
|
--_sds-select-background-color: var(--sds-select-background-color, var(--sds-color-background-default, var(--sds-color-neutral-background-default)));
|
|
2654
2662
|
--_sds-select-text-color: var(--sds-select-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
|
|
@@ -2819,12 +2827,12 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2819
2827
|
--_sds-select-helptext-line-height: var(--sds-select-helptext-line-height, var(--sds-components-line-height-squeezed-lg));
|
|
2820
2828
|
--_sds-select-icon-background-size: var(--sds-select-icon-background-size, var(--sds-components-icon-lg));
|
|
2821
2829
|
}
|
|
2822
|
-
`;var po=Object.defineProperty,go=(t,s,
|
|
2823
|
-
<div class="${
|
|
2824
|
-
<label for="control" class="sds-select__label" ?hidden="${!
|
|
2825
|
-
${this.readOnly?J`<sds-icon name="lock-material-filled" size="m"></sds-icon>`:
|
|
2830
|
+
`;var po=Object.defineProperty,go=(t,e,s,o)=>{for(var r,a=void 0,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(e,s,a)||a);return a&&po(e,s,a),a};const vo=class extends(se(At(ae(mt)))){constructor(){super(...arguments),this.required=!1,this.size="md",this._hasSlottedLabel=!1,this._defaultValue=null,this._pendingLightDomSync=!1,this._handleSlotChange=()=>{if(null==this.value){const t=this.getLightDomSelectedValue();null!=t&&(this.value=t)}this._scheduleLightDomSync()},this._handleLabelSlotChange=t=>{this._hasSlottedLabel=t.target.assignedNodes().length>0},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;if(t.altKey||t.ctrlKey||t.shiftKey||t.metaKey)return;/* @__PURE__ */new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown"," ","Enter"]).has(t.key)&&(t.preventDefault(),t.stopImmediatePropagation())}}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){super.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 e of t){if("childList"===e.type)return void this._scheduleLightDomSync();if("characterData"===e.type)return void this._scheduleLightDomSync();if("attributes"===e.type){const t=e.target;if(!(t instanceof HTMLElement))continue;const s=t.tagName;if("OPTION"===s||"OPTGROUP"===s||"HR"===s)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()}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 J`<hr />`;default:return st}})}renderOption(t){const e=t.getAttribute("value"),s=t.value,o=null!=this.value&&s===this.value;return J` <option value=${qt(null===e?void 0:e)} ?disabled=${t.disabled} .selected=${o}>${t.text}</option> `}renderOptgroup(t){const e=Array.from(t.querySelectorAll("option"));return J` <optgroup label=${qt(t.label||void 0)} ?disabled=${t.disabled}>${e.map(t=>this.renderOption(t))}</optgroup> `}render(){const t={"sds-select":!0,"sds-select--error":Boolean(this.errorMessage)},e=[this.errorMessage?"error-message":null,this.helpText?"help-text":null].filter(Boolean).join(" ")||void 0,s=this._hasSlottedLabel||Boolean(this.label);return J`
|
|
2831
|
+
<div class="${te(t)}">
|
|
2832
|
+
<label for="control" class="sds-select__label" ?hidden="${!s}">
|
|
2833
|
+
${this.readOnly?J`<sds-icon name="lock-material-filled" size="m"></sds-icon>`:st}<slot name="label" @slotchange=${this._handleLabelSlotChange}>${this.label}</slot>
|
|
2826
2834
|
</label>
|
|
2827
|
-
${this.helpText?J`<p id="help-text" class="sds-select__help-text">${this.helpText}</p>`:
|
|
2835
|
+
${this.helpText?J`<p id="help-text" class="sds-select__help-text">${this.helpText}</p>`:st}
|
|
2828
2836
|
|
|
2829
2837
|
<div hidden>
|
|
2830
2838
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
@@ -2833,12 +2841,12 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2833
2841
|
<select
|
|
2834
2842
|
id="control"
|
|
2835
2843
|
class="sds-select__control"
|
|
2836
|
-
name=${
|
|
2844
|
+
name=${qt(this.name)}
|
|
2837
2845
|
?disabled=${this.disabled}
|
|
2838
2846
|
?required=${this.required}
|
|
2839
|
-
aria-readonly=${
|
|
2847
|
+
aria-readonly=${qt(this.readOnly)}
|
|
2840
2848
|
aria-invalid=${this.errorMessage?"true":"false"}
|
|
2841
|
-
aria-describedby=${
|
|
2849
|
+
aria-describedby=${qt(e)}
|
|
2842
2850
|
@keydown=${this._handleKeyDown}
|
|
2843
2851
|
@change=${this._handleChange}
|
|
2844
2852
|
@focus=${this._handleFocus}
|
|
@@ -2851,9 +2859,9 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2851
2859
|
<sds-alert id="error-message" variant="secondary" data-palette="danger">
|
|
2852
2860
|
<p slot="message">${this.errorMessage}</p>
|
|
2853
2861
|
</sds-alert>
|
|
2854
|
-
`:
|
|
2862
|
+
`:st}
|
|
2855
2863
|
</div>
|
|
2856
|
-
`}};vo.styles=[ho];let uo=vo;go([S({type:String,reflect:!0})],uo.prototype,"label"),go([S({type:String,attribute:!1})],uo.prototype,"value"),go([S({type:String,attribute:"default-value"})],uo.prototype,"defaultValue"),go([S({type:String,attribute:"help-text",reflect:!0})],uo.prototype,"helpText"),go([S({type:String,attribute:"error-message",reflect:!0})],uo.prototype,"errorMessage"),go([S({type:Boolean,reflect:!0})],uo.prototype,"required"),go([S({type:String,reflect:!0})],uo.prototype,"size"),go([
|
|
2864
|
+
`}};vo.styles=[ho];let uo=vo;go([S({type:String,reflect:!0})],uo.prototype,"label"),go([S({type:String,attribute:!1})],uo.prototype,"value"),go([S({type:String,attribute:"default-value"})],uo.prototype,"defaultValue"),go([S({type:String,attribute:"help-text",reflect:!0})],uo.prototype,"helpText"),go([S({type:String,attribute:"error-message",reflect:!0})],uo.prototype,"errorMessage"),go([S({type:Boolean,reflect:!0})],uo.prototype,"required"),go([S({type:String,reflect:!0})],uo.prototype,"size"),go([A("#control")],uo.prototype,"control"),go([C()],uo.prototype,"_hasSlottedLabel");var fo=Object.getOwnPropertyDescriptor;let bo=class extends uo{};bo=((t,e,s,o)=>{for(var r,a=o>1?void 0:o?fo(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(a)||a);return a})([O("sds-select")],bo);const _o=d`
|
|
2857
2865
|
:host {
|
|
2858
2866
|
display: flex;
|
|
2859
2867
|
flex-direction: row;
|
|
@@ -2888,7 +2896,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
2888
2896
|
|
|
2889
2897
|
--sds-stepper-step-step-gap: 0 var(--sds-spacing-3xs);
|
|
2890
2898
|
}
|
|
2891
|
-
`;var mo=Object.defineProperty,xo=Object.getOwnPropertyDescriptor,yo=(t,s,
|
|
2899
|
+
`;var mo=Object.defineProperty,xo=Object.getOwnPropertyDescriptor,yo=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?xo(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(e,s,a):r(a))||a);return o&&a&&mo(e,s,a),a};let wo=class extends(At(mt)){constructor(){super(),this.orientation="horizontal",this._setActiveStep=(t,e)=>{t.forEach((t,s)=>{t.active=s===e})},this._handleChildClick=t=>{t.preventDefault(),t.stopImmediatePropagation();const e=t.composedPath().find(t=>t instanceof Element&&"sds-stepper-step"===t.tagName.toLowerCase());if(!e)return;const s=this.steps.indexOf(e);-1!==s&&(this._setActiveStep(this.steps,s),this.dispatchSheriffEvent("change",{index:s}))},this.internals=this.attachInternals(),this.internals.role="tablist"}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,e)=>{t.style.setProperty("--sds-stepper-step-counter-content",`"${e+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 J`<slot @_sds-step-clicked="${this._handleChildClick}"></slot>`}};wo.styles=[_o],yo([S({type:String,reflect:!0})],wo.prototype,"orientation",2),yo([L({selector:"sds-stepper-step",flatten:!0})],wo.prototype,"steps",2),wo=yo([O("sds-stepper")],wo);const ko=d`
|
|
2892
2900
|
:host {
|
|
2893
2901
|
/* Sizing */
|
|
2894
2902
|
--_sds-stepper-step-circle-size: var(--sds-stepper-circle-size, 28px);
|
|
@@ -3149,7 +3157,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
3149
3157
|
--_sds-stepper-step-counter-border-color: var(--sds-stepper-step-counter-border-color, var(--sds-color-neutral-border-strong));
|
|
3150
3158
|
--_sds-stepper-step-counter-text-color: var(--sds-stepper-step-counter-text-color, var(--sds-color-neutral-text-default));
|
|
3151
3159
|
}
|
|
3152
|
-
`;var zo=Object.defineProperty,$o=Object.getOwnPropertyDescriptor,So=(t,s,
|
|
3160
|
+
`;var zo=Object.defineProperty,$o=Object.getOwnPropertyDescriptor,So=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?$o(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(e,s,a):r(a))||a);return o&&a&&zo(e,s,a),a};let Co=class extends(At(mt)){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=()=>J`<div class="sds-stepper-step__step--static">
|
|
3153
3161
|
<span class="sds-stepper-step__counter"></span>
|
|
3154
3162
|
<div class="sds-stepper-step__label"><slot></slot></div>
|
|
3155
3163
|
</div>`,this._renderInteractiveStep=()=>J`<button type="button" role="tab" aria-selected="${this.active?"true":"false"}" id="button" class="sds-stepper-step__step" @click="${this._handleClick}">
|
|
@@ -3163,7 +3171,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
3163
3171
|
<span class="sds-stepper-step__divider sds-stepper-step__divider--before"></span>
|
|
3164
3172
|
${this._renderNonInteractiveStep()}
|
|
3165
3173
|
<span class="sds-stepper-step__divider sds-stepper-step__divider--after"></span>
|
|
3166
|
-
</div>`}};Co.styles=[ko],Co.shadowRootOptions={...mt.shadowRootOptions,delegatesFocus:!0},So([S({type:Boolean,reflect:!0})],Co.prototype,"complete",2),So([S({type:Boolean,reflect:!0})],Co.prototype,"interactive",2),So([S({type:Boolean,reflect:!0})],Co.prototype,"active",2),Co=So([
|
|
3174
|
+
</div>`}};Co.styles=[ko],Co.shadowRootOptions={...mt.shadowRootOptions,delegatesFocus:!0},So([S({type:Boolean,reflect:!0})],Co.prototype,"complete",2),So([S({type:Boolean,reflect:!0})],Co.prototype,"interactive",2),So([S({type:Boolean,reflect:!0})],Co.prototype,"active",2),Co=So([O("sds-stepper-step")],Co);const Eo=d`
|
|
3167
3175
|
:host {
|
|
3168
3176
|
--_sds-switch-background-color: var(--sds-switch-background-color, var(--sds-color-surface-default, var(--sds-color-neutral-surface-default)));
|
|
3169
3177
|
--_sds-switch-text-color: var(--sds-switch-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
|
|
@@ -3313,7 +3321,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
3313
3321
|
.sds-switch__input:checked::before {
|
|
3314
3322
|
--_sds-switch-button-position: calc(var(--_sds-switch-width) - var(--_sds-switch-button-size) - var(--_sds-switch-button-gap) - var(--_sds-switch-border-width));
|
|
3315
3323
|
}
|
|
3316
|
-
`;var
|
|
3324
|
+
`;var Ao=Object.defineProperty,Lo=Object.getOwnPropertyDescriptor,Oo=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?Lo(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(e,s,a):r(a))||a);return o&&a&&Ao(e,s,a),a};let Po=class extends(se(At(ae(mt)))){constructor(){super(...arguments),this.label="",this.hideLabel=!1,this.reverse=!1,this.checked=!1,this.size="md",this._hasSlottedLabel=!1,this._initialChecked=!1,this._handleChange=t=>{if(t.stopImmediatePropagation(),this.disabled||this.readOnly)return t.target.checked=this.checked,void t.preventDefault();const e=t.target;this.checked=e.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.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._handleLabelSlotChange=t=>{this._hasSlottedLabel=t.target.assignedNodes().length>0}}connectedCallback(){super.connectedCallback(),this._initialChecked=this.checked,this.internals.setFormValue(this.checked?"on":"off")}updated(t){super.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"}get type(){return"checkbox"}render(){const t={"sds-switch__label":!0,"sds-switch__label--hidden":this.hideLabel},e=J`<input
|
|
3317
3325
|
class="sds-switch__input"
|
|
3318
3326
|
id="control"
|
|
3319
3327
|
type="checkbox"
|
|
@@ -3322,13 +3330,13 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
3322
3330
|
?disabled="${this.disabled}"
|
|
3323
3331
|
.checked="${this.checked}"
|
|
3324
3332
|
?checked="${this.checked}"
|
|
3325
|
-
name="${
|
|
3333
|
+
name="${qt(this.name)}"
|
|
3326
3334
|
@change="${this._handleChange}"
|
|
3327
3335
|
@focus="${this._handleFocus}"
|
|
3328
3336
|
@blur="${this._handleBlur}"
|
|
3329
|
-
/>`,
|
|
3330
|
-
${
|
|
3331
|
-
</label>`;return J`<div class="${
|
|
3337
|
+
/>`,s=this.readOnly?J`<sds-icon name="lock-material-filled" size="${this.getIconSize()}"></sds-icon>`:st,o=this._hasSlottedLabel||Boolean(this.label),r=J`<label class="${te(t)}" for="control" ?hidden="${!o}">
|
|
3338
|
+
${s}<slot name="label" @slotchange="${this._handleLabelSlotChange}">${this.label}</slot>
|
|
3339
|
+
</label>`;return J`<div class="${te({"sds-switch":!0})}">${this.reverse?[r,e]:[e,r]}</div>`}};Po.styles=[Eo],Oo([S({type:String,reflect:!0})],Po.prototype,"label",2),Oo([S({type:Boolean,reflect:!0,attribute:"hide-label"})],Po.prototype,"hideLabel",2),Oo([S({type:Boolean,reflect:!0})],Po.prototype,"reverse",2),Oo([S({type:Boolean,reflect:!0})],Po.prototype,"checked",2),Oo([S({type:String,reflect:!0})],Po.prototype,"size",2),Oo([A("#control")],Po.prototype,"control",2),Oo([C()],Po.prototype,"_hasSlottedLabel",2),Po=Oo([O("sds-switch")],Po);const Do=d`
|
|
3332
3340
|
:host {
|
|
3333
3341
|
--_sds-tag-background-color: var(--sds-tag-background-color, var(--sds-color-surface-tinted, var(--sds-color-neutral-surface-tinted)));
|
|
3334
3342
|
--_sds-tag-text-color: var(--sds-tag-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
|
|
@@ -3389,9 +3397,9 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
3389
3397
|
--_sds-tag-font-size: var(--sds-tag-font-size, var(--sds-components-font-size-content-lg));
|
|
3390
3398
|
--_sds-tag-line-height: var(--sds-tag-line-height, var(--sds-components-line-height-squeezed-lg));
|
|
3391
3399
|
}
|
|
3392
|
-
`;var
|
|
3400
|
+
`;var To=Object.defineProperty,qo=Object.getOwnPropertyDescriptor,Mo=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?qo(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(e,s,a):r(a))||a);return o&&a&&To(e,s,a),a};let Vo=class extends mt{constructor(){super(...arguments),this.size="md"}render(){return J`<span class="${te({"sds-tag":!0})}">
|
|
3393
3401
|
<slot></slot>
|
|
3394
|
-
</span>`}};Vo.styles=[Do],Mo([S({type:String,reflect:!0})],Vo.prototype,"size",2),Vo=Mo([
|
|
3402
|
+
</span>`}};Vo.styles=[Do],Mo([S({type:String,reflect:!0})],Vo.prototype,"size",2),Vo=Mo([O("sds-tag")],Vo);const Bo=d`
|
|
3395
3403
|
${i('[data-tooltip]{--ds-tooltip:"";--_ds-data-tooltip:var(--ds-tooltip)}:host{--_ds-floating:top;--_ds-floating-arrow-size:0;--_ds-floating-arrow-visibility:inherit;animation:ds-fade-in .15s ease-in-out forwards;inset:0 auto auto 0;margin:0;overflow:visible;position:absolute}:host:before{background:inherit;border:inherit;border-left-color:transparent;border-top-color:transparent;box-sizing:border-box;content:"";height:var(--_ds-floating-arrow-size);left:var(--_ds-floating-arrow-x,50%);position:absolute;rotate:45deg;top:var(--_ds-floating-arrow-y,100%);translate:-50% -50%;visibility:var(--_ds-floating-arrow-visibility);width:var(--_ds-floating-arrow-size)}:host[data-overscroll=contain]{--_ds-floating-overscroll:contain;overscroll-behavior:contain;overflow:auto}:host{&[data-floating|=top]:before{top:100%;rotate:45deg}&[data-floating|=right]:before{left:0;rotate:135deg}&[data-floating|=bottom]:before{top:0;rotate:-135deg}&[data-floating|=left]:before{left:100%;rotate:-45deg}--_ds-floating:var(--dsc-tooltip-placement);--_ds-floating-arrow-size:var(--dsc-tooltip-arrow-size);--dsc-tooltip-background:var(--ds-color-neutral-text-default);--dsc-tooltip-color:var(--ds-color-neutral-background-default);--dsc-tooltip-border-radius:var(--ds-border-radius-default);--dsc-tooltip-padding:var(--ds-size-1) var(--ds-size-2);--dsc-tooltip-arrow-size:var(--ds-size-2);--dsc-tooltip-transition-duration:0.2s;--dsc-tooltip-transition-delay:150ms;--dsc-tooltip-placement:top;background:var(--dsc-tooltip-background);border-radius:var(--dsc-tooltip-border-radius);border:0;box-sizing:border-box;color:var(--dsc-tooltip-color);line-height:var(--ds-line-height-sm);padding:var(--dsc-tooltip-padding);view-transition-name:ds-tooltip}:host:after{content:"";box-sizing:border-box;height:var(--_dsc-tooltip-safearea-height,0);width:var(--_dsc-tooltip-safearea-width,0);translate:var(--_dsc-tooltip-safearea-translate);position:absolute;left:var(--_ds-floating-arrow-x,50%);top:var(--_ds-floating-arrow-y,100%)}:host[data-floating=bottom]:after,:host[data-floating=top]:after{top:100%;left:0;width:100%;height:var(--dsc-tooltip-arrow-size)}:host[data-floating=left]:after,:host[data-floating=right]:after{top:0;left:100%;width:var(--dsc-tooltip-arrow-size);height:100%}:host[data-floating=bottom]:after{top:calc(var(--dsc-tooltip-arrow-size)*-1)}:host[data-floating=right]:after{left:calc(var(--dsc-tooltip-arrow-size)*-1)}:host:not([popover]){display:none}@media (forced-colors:active){:host{background:CanvasText}}')}
|
|
3396
3404
|
|
|
3397
3405
|
:host {
|
|
@@ -3474,7 +3482,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
3474
3482
|
border: 1px solid CanvasText;
|
|
3475
3483
|
}
|
|
3476
3484
|
}
|
|
3477
|
-
`;var
|
|
3485
|
+
`;var Ro=Object.defineProperty,jo=Object.getOwnPropertyDescriptor,Io=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?jo(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(e,s,a):r(a))||a);return o&&a&&Ro(e,s,a),a};let No=class extends(At(mt)){constructor(){super(...arguments),this.placement="top",this.triggers=[],this.cleanups=[],this.onSelfMouseEnter=()=>{clearTimeout(this.hoverTimeout)},this.onSelfMouseLeave=()=>this.hide(),this.onKeyDown=t=>{"Escape"===t.key&&this.hide()}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tooltip"),this.setAttribute("popover","manual"),this.setAttribute("aria-hidden","true"),this.dataset.placement=this.placement,this.bindTriggers(),requestAnimationFrame(()=>this.syncTriggerLabels())}updated(t){t.has("placement")&&(this.dataset.placement=this.placement)}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.hoverTimeout),document.removeEventListener("keydown",this.onKeyDown);for(const t of this.cleanups)t();this.cleanups=[],this.triggers=[],this.activeTrigger=void 0}render(){return J`<slot @slotchange=${this.syncTriggerLabels}></slot>`}syncTriggerLabels(){const t=this.textContent?.trim()??"";t&&this.triggers.map(e=>{const s=e.shadowRoot?.querySelector("button, a")??e;this.cleanups.push(()=>s.removeAttribute("aria-label")),s.setAttribute("aria-label",t)})}bindTriggers(){if(this.id){this.triggers=[...document.querySelectorAll("[aria-describedby]")].filter(t=>{const e=t.getAttribute("aria-describedby");return e?.split(/\s+/).includes(this.id)??!1});for(const t of this.triggers){const e=()=>this.show(t),s=()=>this.scheduleHide(),o=()=>this.show(t),r=()=>this.hide();t.addEventListener("mouseenter",e),t.addEventListener("mouseleave",s),t.addEventListener("focusin",o),t.addEventListener("focusout",r),this.cleanups.push(()=>{t.removeEventListener("mouseenter",e),t.removeEventListener("mouseleave",s),t.removeEventListener("focusin",o),t.removeEventListener("focusout",r)})}this.addEventListener("mouseenter",this.onSelfMouseEnter),this.addEventListener("mouseleave",this.onSelfMouseLeave),this.cleanups.push(()=>{this.removeEventListener("mouseenter",this.onSelfMouseEnter),this.removeEventListener("mouseleave",this.onSelfMouseLeave)})}}show(t){clearTimeout(this.hoverTimeout),this.matches(":popover-open")||this.showPopover(),this.activeTrigger!==t&&(this.activeTrigger=t,this.dispatchSheriffEvent("toggle",t)),document.addEventListener("keydown",this.onKeyDown)}hide(){clearTimeout(this.hoverTimeout);try{this.hidePopover()}catch{}this.activeTrigger=void 0,document.removeEventListener("keydown",this.onKeyDown)}scheduleHide(){clearTimeout(this.hoverTimeout),this.hoverTimeout=setTimeout(()=>this.hide(),200)}};No.styles=[Bo],Io([S({type:String,reflect:!0})],No.prototype,"placement",2),No=Io([O("sds-tooltip")],No);const Ho=d`
|
|
3478
3486
|
:host {
|
|
3479
3487
|
--_sds-text-font-family: var(--sds-text-font-family, var(--sds-typography-font-family-roboto));
|
|
3480
3488
|
--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-mobile-font-size));
|
|
@@ -3893,7 +3901,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
3893
3901
|
--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-strong-tall-desktop-line-height));
|
|
3894
3902
|
}
|
|
3895
3903
|
}
|
|
3896
|
-
`;var Fo=Object.defineProperty,Uo=(t,s,
|
|
3904
|
+
`;var Fo=Object.defineProperty,Uo=(t,e,s,o)=>{for(var r,a=void 0,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(e,s,a)||a);return a&&Fo(e,s,a),a};const Go=class extends mt{constructor(){super(...arguments),this.size="md",this.strong=!1,this.subtle=!1,this.tall=!1}render(){return J`<p><slot></slot></p>`}};Go.styles=[Ho];let Ko=Go;Uo([S({type:String,reflect:!0})],Ko.prototype,"size"),Uo([S({type:Boolean,reflect:!0})],Ko.prototype,"strong"),Uo([S({type:Boolean,reflect:!0})],Ko.prototype,"subtle"),Uo([S({type:Boolean,reflect:!0})],Ko.prototype,"tall");var Wo=Object.getOwnPropertyDescriptor;let Zo=class extends Ko{};Zo=((t,e,s,o)=>{for(var r,a=o>1?void 0:o?Wo(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(a)||a);return a})([O("sds-text")],Zo);const Yo=d`
|
|
3897
3905
|
:host {
|
|
3898
3906
|
--_sds-textfield-background-color: var(--sds-textfield-background-color, var(--sds-color-background-default, var(--sds-color-neutral-background-default)));
|
|
3899
3907
|
--_sds-textfield-text-color: var(--sds-textfield-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
|
|
@@ -4065,32 +4073,32 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
4065
4073
|
--sds-icon-size: var(--sds-textfield-icon-size, var(--sds-components-icon-lg));
|
|
4066
4074
|
}
|
|
4067
4075
|
}
|
|
4068
|
-
`;var Qo=Object.defineProperty,Xo=(t,s,
|
|
4069
|
-
<div class="${
|
|
4070
|
-
<label for="sds-textfield" class="sds-textfield__label" ?hidden="${!
|
|
4071
|
-
${this.readOnly?J`<sds-icon name="lock-material-filled" size="m"></sds-icon>`:
|
|
4076
|
+
`;var Qo=Object.defineProperty,Xo=(t,e,s,o)=>{for(var r,a=void 0,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(e,s,a)||a);return a&&Qo(e,s,a),a};const Jo=class extends(se(At(ae(mt)))){constructor(){super(...arguments),this.type="text",this.required=!1,this.size="md",this.hasIcon=!1,this._hasSlottedLabel=!1,this._defaultValue=null,this.handleSlotChange=t=>{const e=t.target;this.hasIcon=e.assignedNodes({flatten:!0}).length>0},this._handleLabelSlotChange=t=>{this._hasSlottedLabel=t.target.assignedNodes().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){for(const t of Array.from(this.form?.elements??[]))if(t instanceof HTMLButtonElement||t instanceof HTMLInputElement){if("submit"!==t.type)continue;if(t.disabled)return;return void t.click()}this.form?.requestSubmit()}}}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&&(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()}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,e,s){this.control&&this.control.setSelectionRange(t,e,s)}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},e=[this.errorMessage?"error-message":null,this.helpText?"help-text":null].filter(Boolean).join(" ")||void 0,s=this._hasSlottedLabel||Boolean(this.label);return J`
|
|
4077
|
+
<div class="${te(t)}">
|
|
4078
|
+
<label for="sds-textfield" class="sds-textfield__label" ?hidden="${!s}">
|
|
4079
|
+
${this.readOnly?J`<sds-icon name="lock-material-filled" size="m"></sds-icon>`:st}
|
|
4072
4080
|
<slot name="label" @slotchange="${this._handleLabelSlotChange}">${this.label}</slot>
|
|
4073
4081
|
</label>
|
|
4074
|
-
${this.helpText?J`<p id="help-text" class="sds-textfield__help-text">${this.helpText}</p>`:
|
|
4082
|
+
${this.helpText?J`<p id="help-text" class="sds-textfield__help-text">${this.helpText}</p>`:st}
|
|
4075
4083
|
<div class="sds-textfield__input-container">
|
|
4076
4084
|
<input
|
|
4077
4085
|
part="input"
|
|
4078
4086
|
class="sds-textfield__input"
|
|
4079
|
-
type="${
|
|
4087
|
+
type="${qt(this.type)}"
|
|
4080
4088
|
id="sds-textfield"
|
|
4081
4089
|
?disabled="${this.disabled}"
|
|
4082
4090
|
?readonly="${this.readOnly}"
|
|
4083
|
-
placeholder="${
|
|
4091
|
+
placeholder="${qt(this.placeholder)}"
|
|
4084
4092
|
.value="${this.value??""}"
|
|
4085
|
-
name="${
|
|
4086
|
-
autocomplete="${
|
|
4093
|
+
name="${qt(this.name)}"
|
|
4094
|
+
autocomplete="${qt(this.autocomplete)}"
|
|
4087
4095
|
?required="${this.required}"
|
|
4088
|
-
pattern="${
|
|
4089
|
-
min="${
|
|
4090
|
-
minlength="${
|
|
4091
|
-
max="${
|
|
4092
|
-
maxlength="${
|
|
4093
|
-
aria-describedby="${
|
|
4096
|
+
pattern="${qt(this.pattern)}"
|
|
4097
|
+
min="${qt(this.min)}"
|
|
4098
|
+
minlength="${qt(this.minlength)}"
|
|
4099
|
+
max="${qt(this.max)}"
|
|
4100
|
+
maxlength="${qt(this.maxlength)}"
|
|
4101
|
+
aria-describedby="${qt(e)}"
|
|
4094
4102
|
aria-invalid="${this.errorMessage?"true":"false"}"
|
|
4095
4103
|
@input="${this._handleInputChange}"
|
|
4096
4104
|
@change="${this._handleInputChange}"
|
|
@@ -4101,9 +4109,9 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
4101
4109
|
/>
|
|
4102
4110
|
<slot name="after" @slotchange="${this.handleSlotChange}" aria-hidden="true"></slot>
|
|
4103
4111
|
</div>
|
|
4104
|
-
${this.errorMessage?J`<sds-alert id="error-message" variant="secondary" data-palette="danger"><p slot="message">${this.errorMessage}</p></sds-alert>`:
|
|
4112
|
+
${this.errorMessage?J`<sds-alert id="error-message" variant="secondary" data-palette="danger"><p slot="message">${this.errorMessage}</p></sds-alert>`:st}
|
|
4105
4113
|
</div>
|
|
4106
|
-
`}};Jo.styles=[Yo];let tr=Jo;Xo([S({type:String,reflect:!0})],tr.prototype,"type"),Xo([S({type:String})],tr.prototype,"value"),Xo([S({type:String,reflect:!0})],tr.prototype,"label"),Xo([S({type:String,reflect:!0})],tr.prototype,"placeholder"),Xo([S({type:String,attribute:"help-text",reflect:!0})],tr.prototype,"helpText"),Xo([S({type:String,attribute:"error-message",reflect:!0})],tr.prototype,"errorMessage"),Xo([S({type:String,reflect:!0})],tr.prototype,"autocomplete"),Xo([S({type:Boolean,reflect:!0})],tr.prototype,"required"),Xo([S({type:String,reflect:!0})],tr.prototype,"pattern"),Xo([S({type:Number,reflect:!0})],tr.prototype,"minlength"),Xo([S({type:Number,reflect:!0})],tr.prototype,"maxlength"),Xo([S({type:String,reflect:!0})],tr.prototype,"min"),Xo([S({type:String,reflect:!0})],tr.prototype,"max"),Xo([S({type:String,reflect:!0})],tr.prototype,"size"),Xo([C()],tr.prototype,"hasIcon"),Xo([C()],tr.prototype,"_hasSlottedLabel"),Xo([
|
|
4114
|
+
`}};Jo.styles=[Yo];let tr=Jo;Xo([S({type:String,reflect:!0})],tr.prototype,"type"),Xo([S({type:String})],tr.prototype,"value"),Xo([S({type:String,reflect:!0})],tr.prototype,"label"),Xo([S({type:String,reflect:!0})],tr.prototype,"placeholder"),Xo([S({type:String,attribute:"help-text",reflect:!0})],tr.prototype,"helpText"),Xo([S({type:String,attribute:"error-message",reflect:!0})],tr.prototype,"errorMessage"),Xo([S({type:String,reflect:!0})],tr.prototype,"autocomplete"),Xo([S({type:Boolean,reflect:!0})],tr.prototype,"required"),Xo([S({type:String,reflect:!0})],tr.prototype,"pattern"),Xo([S({type:Number,reflect:!0})],tr.prototype,"minlength"),Xo([S({type:Number,reflect:!0})],tr.prototype,"maxlength"),Xo([S({type:String,reflect:!0})],tr.prototype,"min"),Xo([S({type:String,reflect:!0})],tr.prototype,"max"),Xo([S({type:String,reflect:!0})],tr.prototype,"size"),Xo([C()],tr.prototype,"hasIcon"),Xo([C()],tr.prototype,"_hasSlottedLabel"),Xo([A("#sds-textfield")],tr.prototype,"control");var er=Object.getOwnPropertyDescriptor;let sr=class extends tr{};sr=((t,e,s,o)=>{for(var r,a=o>1?void 0:o?er(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(a)||a);return a})([O("sds-textfield")],sr);const or=d`
|
|
4107
4115
|
:host {
|
|
4108
4116
|
--_sds-textarea-background-color: var(--sds-textarea-background-color, var(--sds-color-background-default, var(--sds-color-neutral-background-default)));
|
|
4109
4117
|
--_sds-textarea-text-color: var(--sds-textarea-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
|
|
@@ -4306,16 +4314,16 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
4306
4314
|
--_sds-textarea-counter-font-size: var(--sds-textarea-counter-font-size, var(--sds-components-font-size-content-lg));
|
|
4307
4315
|
--_sds-textarea-counter-line-height: var(--sds-textarea-counter-line-height, var(--sds-components-line-height-squeezed-lg));
|
|
4308
4316
|
}
|
|
4309
|
-
`;var rr=Object.defineProperty,ar=Object.getOwnPropertyDescriptor,ir=(t,s,
|
|
4317
|
+
`;var rr=Object.defineProperty,ar=Object.getOwnPropertyDescriptor,ir=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?ar(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(e,s,a):r(a))||a);return o&&a&&rr(e,s,a),a};let dr=class extends(se(At(ae(mt)))){constructor(){super(...arguments),this.autosize=!1,this.required=!1,this.size="md",this._hasSlottedLabel=!1,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._handleLabelSlotChange=t=>{this._hasSlottedLabel=t.target.assignedNodes().length>0}}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&&(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 st;const t=this.value?.length||0;return this.hasTypedTooManyCharacters()?J`<sds-alert variant="secondary" data-palette="danger"
|
|
4310
4318
|
><p class="sds-textarea__character-counter" slot="message">Du har ${t-this.counter} tegn for mye</p></sds-alert
|
|
4311
|
-
>`:J`<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"}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
|
|
4312
|
-
<div class="${
|
|
4313
|
-
<div style="${
|
|
4314
|
-
<label for="sds-textarea" class="sds-textarea__label" ?hidden="${!
|
|
4315
|
-
${this.readOnly?J`<sds-icon name="lock-material-filled" size="m"></sds-icon>`:
|
|
4319
|
+
>`:J`<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"}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,e,s){this.control&&this.control.setSelectionRange(t,e,s)}checkValidity(){return this.control.checkValidity()}reportValidity(){return this.control.reportValidity()}setCustomValidity(t){this.control.setCustomValidity(t),this.updateValidity()}render(){const t=Boolean(this.errorMessage||this.hasTypedTooManyCharacters()),e=this._hasSlottedLabel||Boolean(this.label),s={"sds-textarea":!0,"sds-textarea--error":t},o=[this.errorMessage?"error-message":null,this.helpText?"help-text":null].filter(Boolean).join(" ")||void 0;return J`
|
|
4320
|
+
<div class="${te(s)}">
|
|
4321
|
+
<div style="${e||this.helpText?st:"display: none"}">
|
|
4322
|
+
<label for="sds-textarea" class="sds-textarea__label" ?hidden="${!e}">
|
|
4323
|
+
${this.readOnly?J`<sds-icon name="lock-material-filled" size="m"></sds-icon>`:st}
|
|
4316
4324
|
<slot name="label" @slotchange="${this._handleLabelSlotChange}">${this.label}</slot>
|
|
4317
4325
|
</label>
|
|
4318
|
-
${this.helpText?J`<p id="help-text" class="sds-textarea__help-text">${this.helpText}</p>`:
|
|
4326
|
+
${this.helpText?J`<p id="help-text" class="sds-textarea__help-text">${this.helpText}</p>`:st}
|
|
4319
4327
|
</div>
|
|
4320
4328
|
<div class="sds-textarea__input-container">
|
|
4321
4329
|
<textarea
|
|
@@ -4323,17 +4331,17 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
4323
4331
|
id="sds-textarea"
|
|
4324
4332
|
?disabled="${this.disabled}"
|
|
4325
4333
|
?readonly="${this.readOnly}"
|
|
4326
|
-
placeholder="${
|
|
4334
|
+
placeholder="${qt(this.placeholder)}"
|
|
4327
4335
|
.value="${this.value??""}"
|
|
4328
4336
|
.autocomplete="${this.autocomplete}"
|
|
4329
|
-
name="${
|
|
4337
|
+
name="${qt(this.name)}"
|
|
4330
4338
|
?required="${this.required}"
|
|
4331
|
-
rows="${
|
|
4332
|
-
cols="${
|
|
4333
|
-
wrap="${
|
|
4334
|
-
minlength="${
|
|
4335
|
-
maxlength="${
|
|
4336
|
-
aria-describedby="${
|
|
4339
|
+
rows="${qt(this.rows)}"
|
|
4340
|
+
cols="${qt(this.cols)}"
|
|
4341
|
+
wrap="${qt(this.wrap)}"
|
|
4342
|
+
minlength="${qt(this.minlength)}"
|
|
4343
|
+
maxlength="${qt(this.maxlength)}"
|
|
4344
|
+
aria-describedby="${qt(o)}"
|
|
4337
4345
|
aria-invalid="${t?"true":"false"}"
|
|
4338
4346
|
@input="${this._handleInputChange}"
|
|
4339
4347
|
@change="${this._handleInputChange}"
|
|
@@ -4342,7 +4350,7 @@ var t;const s=globalThis,e=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.native
|
|
|
4342
4350
|
@blur="${this._handleBlur}"
|
|
4343
4351
|
></textarea>
|
|
4344
4352
|
</div>
|
|
4345
|
-
${this.errorMessage?J`<sds-alert id="error-message" variant="secondary" data-palette="danger"><p slot="message">${this.errorMessage}</p></sds-alert>`:
|
|
4353
|
+
${this.errorMessage?J`<sds-alert id="error-message" variant="secondary" data-palette="danger"><p slot="message">${this.errorMessage}</p></sds-alert>`:st}
|
|
4346
4354
|
${this.renderCharacterCounter()}
|
|
4347
4355
|
</div>
|
|
4348
|
-
`}};dr.styles=[or],ir([S({type:String})],dr.prototype,"value",2),ir([S({type:String,reflect:!0})],dr.prototype,"label",2),ir([S({type:String,reflect:!0})],dr.prototype,"placeholder",2),ir([S({type:String,attribute:"help-text",reflect:!0})],dr.prototype,"helpText",2),ir([S({type:String,attribute:"error-message",reflect:!0})],dr.prototype,"errorMessage",2),ir([S({type:String,reflect:!0})],dr.prototype,"autocomplete",2),ir([S({type:Boolean,reflect:!0})],dr.prototype,"autosize",2),ir([S({type:Boolean,reflect:!0})],dr.prototype,"required",2),ir([S({type:Number,reflect:!0})],dr.prototype,"rows",2),ir([S({type:Number,reflect:!0})],dr.prototype,"cols",2),ir([S({type:String,reflect:!0})],dr.prototype,"wrap",2),ir([S({type:Number,reflect:!0})],dr.prototype,"minlength",2),ir([S({type:Number,reflect:!0})],dr.prototype,"maxlength",2),ir([S({type:Number,reflect:!0})],dr.prototype,"counter",2),ir([S({type:String,reflect:!0})],dr.prototype,"size",2),ir([
|
|
4356
|
+
`}};dr.styles=[or],ir([S({type:String})],dr.prototype,"value",2),ir([S({type:String,reflect:!0})],dr.prototype,"label",2),ir([S({type:String,reflect:!0})],dr.prototype,"placeholder",2),ir([S({type:String,attribute:"help-text",reflect:!0})],dr.prototype,"helpText",2),ir([S({type:String,attribute:"error-message",reflect:!0})],dr.prototype,"errorMessage",2),ir([S({type:String,reflect:!0})],dr.prototype,"autocomplete",2),ir([S({type:Boolean,reflect:!0})],dr.prototype,"autosize",2),ir([S({type:Boolean,reflect:!0})],dr.prototype,"required",2),ir([S({type:Number,reflect:!0})],dr.prototype,"rows",2),ir([S({type:Number,reflect:!0})],dr.prototype,"cols",2),ir([S({type:String,reflect:!0})],dr.prototype,"wrap",2),ir([S({type:Number,reflect:!0})],dr.prototype,"minlength",2),ir([S({type:Number,reflect:!0})],dr.prototype,"maxlength",2),ir([S({type:Number,reflect:!0})],dr.prototype,"counter",2),ir([S({type:String,reflect:!0})],dr.prototype,"size",2),ir([A("#sds-textarea")],dr.prototype,"control",2),ir([C()],dr.prototype,"_hasSlottedLabel",2),dr=ir([O("sds-textarea")],dr);export{be as SDSAlert,ue as SDSButton,ke as SDSCard,Ee as SDSCheckbox,Te as SDSCheckboxGroup,Re as SDSChip,Xe as SDSDetails,os as SDSDetailsGroup,hs as SDSDialog,Ke as SDSEnvironmentBanner,_s as SDSHeading,Jt as SDSIcon,$s as SDSInternalHeader,Ls as SDSLoader,Vs as SDSNotification,Xs as SDSPopover,Ns as SDSProcess,Ks as SDSProcessStep,oo as SDSRadio,co as SDSRadioGroup,bo as SDSSelect,wo as SDSStepper,Co as SDSStepperStep,Po as SDSSwitch,Vo as SDSTag,Zo as SDSText,dr as SDSTextArea,sr as SDSTextField,No as SDSTooltip};
|