@politiet/sheriff-web-components 2.7.2 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +422 -9
- package/dist/mixins/sds-dialog-target-mixin.d.ts.map +1 -1
- package/dist/mixins/sds-dialog-target-mixin.js +4 -2
- package/dist/mixins/sds-dialog-target-mixin.js.map +1 -1
- package/dist/mixins/sds-event-dispatcher-mixin.js +1 -1
- package/dist/mixins/sds-event-dispatcher-mixin.js.map +1 -1
- package/dist/mixins/sds-form-control-mixin.d.ts +1 -0
- package/dist/mixins/sds-form-control-mixin.d.ts.map +1 -1
- package/dist/mixins/sds-form-control-mixin.js +7 -0
- package/dist/mixins/sds-form-control-mixin.js.map +1 -1
- package/dist/react-wrappers/SDSDialogWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSDialogWrapper.js +1 -1
- package/dist/react-wrappers/SDSDialogWrapper.js.map +1 -1
- package/dist/sds-button/sds-button.component.d.ts +7 -0
- package/dist/sds-button/sds-button.component.d.ts.map +1 -1
- package/dist/sds-button/sds-button.component.js +52 -50
- package/dist/sds-button/sds-button.component.js.map +1 -1
- package/dist/sds-button/sds-button.styles.d.ts.map +1 -1
- package/dist/sds-button/sds-button.styles.js +87 -3
- package/dist/sds-button/sds-button.styles.js.map +1 -1
- package/dist/sds-card/sds-card.d.ts +1 -0
- package/dist/sds-card/sds-card.d.ts.map +1 -1
- package/dist/sds-card/sds-card.js +11 -3
- package/dist/sds-card/sds-card.js.map +1 -1
- package/dist/sds-card/sds-card.styles.d.ts.map +1 -1
- package/dist/sds-card/sds-card.styles.js +14 -3
- package/dist/sds-card/sds-card.styles.js.map +1 -1
- package/dist/sds-checkbox/sds-checkbox.d.ts +3 -1
- package/dist/sds-checkbox/sds-checkbox.d.ts.map +1 -1
- package/dist/sds-checkbox/sds-checkbox.js +13 -3
- package/dist/sds-checkbox/sds-checkbox.js.map +1 -1
- package/dist/sds-checkbox/sds-checkbox.styles.d.ts.map +1 -1
- package/dist/sds-checkbox/sds-checkbox.styles.js +4 -2
- package/dist/sds-checkbox/sds-checkbox.styles.js.map +1 -1
- package/dist/sds-chip/sds-chip.d.ts +1 -0
- package/dist/sds-chip/sds-chip.d.ts.map +1 -1
- package/dist/sds-chip/sds-chip.js +3 -0
- package/dist/sds-chip/sds-chip.js.map +1 -1
- package/dist/sds-details/sds-details.styles.js +6 -6
- package/dist/sds-details/sds-details.styles.js.map +1 -1
- package/dist/sds-dialog/sds-dialog.component.d.ts +1 -0
- package/dist/sds-dialog/sds-dialog.component.d.ts.map +1 -1
- package/dist/sds-dialog/sds-dialog.component.js +10 -0
- package/dist/sds-dialog/sds-dialog.component.js.map +1 -1
- package/dist/sds-dialog/sds-dialog.d.ts +1 -0
- package/dist/sds-dialog/sds-dialog.d.ts.map +1 -1
- package/dist/sds-dialog/sds-dialog.js.map +1 -1
- package/dist/sds-dialog/sds-dialog.styles.d.ts.map +1 -1
- package/dist/sds-dialog/sds-dialog.styles.js +8 -2
- package/dist/sds-dialog/sds-dialog.styles.js.map +1 -1
- package/dist/sds-popover/assets/popover-styles.d.ts.map +1 -1
- package/dist/sds-popover/assets/popover-styles.js +1 -1
- package/dist/sds-popover/assets/popover-styles.js.map +1 -1
- package/dist/sds-radio/sds-radio.d.ts +3 -1
- package/dist/sds-radio/sds-radio.d.ts.map +1 -1
- package/dist/sds-radio/sds-radio.js +13 -3
- package/dist/sds-radio/sds-radio.js.map +1 -1
- package/dist/sds-radio/sds-radio.styles.d.ts.map +1 -1
- package/dist/sds-radio/sds-radio.styles.js +10 -3
- package/dist/sds-radio/sds-radio.styles.js.map +1 -1
- package/dist/sds-select/sds-select.component.d.ts +3 -1
- package/dist/sds-select/sds-select.component.d.ts.map +1 -1
- package/dist/sds-select/sds-select.component.js +14 -5
- package/dist/sds-select/sds-select.component.js.map +1 -1
- package/dist/sds-select/sds-select.styles.d.ts.map +1 -1
- package/dist/sds-select/sds-select.styles.js +3 -2
- package/dist/sds-select/sds-select.styles.js.map +1 -1
- package/dist/sds-stepper-step/sds-stepper-step.styles.d.ts.map +1 -1
- package/dist/sds-stepper-step/sds-stepper-step.styles.js +4 -3
- package/dist/sds-stepper-step/sds-stepper-step.styles.js.map +1 -1
- package/dist/sds-switch/sds-switch.d.ts +4 -0
- package/dist/sds-switch/sds-switch.d.ts.map +1 -1
- package/dist/sds-switch/sds-switch.js +16 -2
- package/dist/sds-switch/sds-switch.js.map +1 -1
- package/dist/sds-switch/sds-switch.styles.js +6 -6
- package/dist/sds-switch/sds-switch.styles.js.map +1 -1
- package/dist/sds-text/sds-text.styles.d.ts.map +1 -1
- package/dist/sds-text/sds-text.styles.js +2 -1
- package/dist/sds-text/sds-text.styles.js.map +1 -1
- package/dist/sds-textarea/sds-textarea.d.ts +4 -1
- package/dist/sds-textarea/sds-textarea.d.ts.map +1 -1
- package/dist/sds-textarea/sds-textarea.js +22 -8
- package/dist/sds-textarea/sds-textarea.js.map +1 -1
- package/dist/sds-textarea/sds-textarea.styles.d.ts.map +1 -1
- package/dist/sds-textarea/sds-textarea.styles.js +12 -3
- package/dist/sds-textarea/sds-textarea.styles.js.map +1 -1
- package/dist/sds-textfield/sds-textfield.d.ts +8 -1
- package/dist/sds-textfield/sds-textfield.d.ts.map +1 -1
- package/dist/sds-textfield/sds-textfield.js +40 -13
- package/dist/sds-textfield/sds-textfield.js.map +1 -1
- package/dist/sds-textfield/sds-textfield.styles.d.ts.map +1 -1
- package/dist/sds-textfield/sds-textfield.styles.js +4 -3
- package/dist/sds-textfield/sds-textfield.styles.js.map +1 -1
- package/dist/sds-tooltip/assets/tooltip-styles.d.ts.map +1 -1
- package/dist/sds-tooltip/assets/tooltip-styles.js +1 -1
- package/dist/sds-tooltip/assets/tooltip-styles.js.map +1 -1
- package/dist/shared/assets/positioning.js +1 -1
- package/dist/sheriff-web-components.js +409 -269
- package/dist/skill/references/components.md +1 -1
- package/dist/skill/references/react-wrappers.md +1 -1
- package/package.json +2 -2
- package/web-types.json +312 -5
|
@@ -1,4 +1,4 @@
|
|
|
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:"",m=u.reactiveElementPolyfillSupport,_=(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(_("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(_("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(_("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[_("elementProperties")]=/* @__PURE__ */new Map,k[_("finalized")]=/* @__PURE__ */new Map,m?.({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 O(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 L(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$",R=`lit$${Math.random().toFixed(9).slice(2)}$`,V="?"+R,B=`<${V}>`,j=document,F=()=>j.createComment(""),I=t=>null===t||"object"!=typeof t&&"function"!=typeof t,H=Array.isArray,N="[ \t\n\f\r]",U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,W=/-->/g,K=/>/g,G=RegExp(`>|${N}(?:([^\\s"'>=/]+)(${N}*=${N}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Y=/'/g,X=/"/g,Z=/^(?:script|style|textarea|title)$/i,Q=(ot=1,(t,...e)=>({_$litType$:ot,strings:t,values:e})),J=/* @__PURE__ */Symbol.for("lit-noChange"),tt=/* @__PURE__ */Symbol.for("lit-nothing"),et=/* @__PURE__ */new WeakMap,st=j.createTreeWalker(j,129);var ot;function rt(t,e){if(!H(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==q?q.createHTML(e):e}let at=class t{constructor({strings:e,_$litType$:s},o){let r;this.parts=[];let a=0,i=0;const d=e.length-1,n=this.parts,[l,c]=((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=W:void 0!==n[1]?i=K:void 0!==n[2]?(Z.test(n[2])&&(r=RegExp("</"+n[2],"g")),i=G):void 0!==n[3]&&(i=G):i===G?">"===n[0]?(i=r??U,l=-1):void 0===n[1]?l=-2:(l=i.lastIndex-n[2].length,s=n[1],i=void 0===n[3]?G:'"'===n[3]?X:Y):i===X||i===Y?i=G:i===W||i===K?i=U:(i=G,r=void 0);const h=i===G&&t[d+1].startsWith("/>")?" ":"";a+=i===U?e+B:l>=0?(o.push(s),e.slice(0,l)+M+e.slice(l)+R+h):e+R+(-2===l?d:h)}return[rt(t,a+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),o]})(e,s);if(this.el=t.createElement(l,o),st.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=st.nextNode())&&n.length<d;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(M)){const e=c[i++],s=r.getAttribute(t).split(R),o=/([.?@])?(.*)/.exec(e);n.push({type:1,index:a,name:o[2],strings:s,ctor:"."===o[1]?ct:"?"===o[1]?ht:"@"===o[1]?pt:lt}),r.removeAttribute(t)}else t.startsWith(R)&&(n.push({type:6,index:a}),r.removeAttribute(t));if(Z.test(r.tagName)){const t=r.textContent.split(R),e=t.length-1;if(e>0){r.textContent=T?T.emptyScript:"";for(let s=0;s<e;s++)r.append(t[s],F()),st.nextNode(),n.push({type:2,index:++a});r.append(t[e],F())}}}else if(8===r.nodeType)if(r.data===V)n.push({type:2,index:a});else{let t=-1;for(;-1!==(t=r.data.indexOf(R,t+1));)n.push({type:7,index:a}),t+=R.length-1}a++}}static createElement(t,e){const s=j.createElement("template");return s.innerHTML=t,s}};function it(t,e,s=t,o){if(e===J)return e;let r=void 0!==o?s._$Co?.[o]:s._$Cl;const a=I(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=it(t,r._$AS(t,e.values),r,o)),e}let dt=class{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);st.currentNode=o;let r=st.nextNode(),a=0,i=0,d=s[0];for(;void 0!==d;){if(a===d.index){let e;2===d.type?e=new nt(r,r.nextSibling,this,t):1===d.type?e=new d.ctor(r,d.name,d.strings,this,t):6===d.type&&(e=new gt(r,this,t)),this._$AV.push(e),d=s[++i]}a!==d?.index&&(r=st.nextNode(),a++)}return st.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++}},nt=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,o){this.type=2,this._$AH=tt,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=it(this,t,e),I(t)?t===tt||null==t||""===t?(this._$AH!==tt&&this._$AR(),this._$AH=tt):t!==this._$AH&&t!==J&&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!==tt&&I(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=at.createElement(rt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===o)this._$AH.p(e);else{const t=new dt(o,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=et.get(t.strings);return void 0===e&&et.set(t.strings,e=new at(t)),e}k(e){H(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let o,r=0;for(const a of e)r===s.length?s.push(o=new t(this.O(F()),this.O(F()),this,this.options)):o=s[r],o._$AI(a),r++;r<s.length&&(this._$AR(o&&o._$AB.nextSibling,r),s.length=r)}_$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))}},lt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,o,r){this.type=1,this._$AH=tt,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=tt}_$AI(t,e=this,s,o){const r=this.strings;let a=!1;if(void 0===r)t=it(this,t,e,0),a=!I(t)||t!==this._$AH&&t!==J,a&&(this._$AH=t);else{const o=t;let i,d;for(t=r[0],i=0;i<r.length-1;i++)d=it(this,o[s+i],e,i),d===J&&(d=this._$AH[i]),a||=!I(d)||d!==this._$AH[i],d===tt?t=tt:t!==tt&&(t+=(d??"")+r[i+1]),this._$AH[i]=d}a&&!o&&this.j(t)}j(t){t===tt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ct=class extends lt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===tt?void 0:t}},ht=class extends lt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==tt)}},pt=class extends lt{constructor(t,e,s,o,r){super(t,e,s,o,r),this.type=5}_$AI(t,e=this){if((t=it(this,t,e,0)??tt)===J)return;const s=this._$AH,o=t===tt&&s!==tt||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==tt&&(s===tt||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)}},gt=class{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){it(this,t)}};const vt=P.litHtmlPolyfillSupport;vt?.(at,nt),(P.litHtmlVersions??=[]).push("3.3.2");const ut=globalThis;let ft=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 nt(e.insertBefore(F(),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 J}};ft._$litElement$=!0,ft.finalized=!0,ut.litElementHydrateSupport?.({LitElement:ft});const bt=ut.litElementPolyfillSupport;bt?.({LitElement:ft}),(ut.litElementVersions??=[]).push("4.2.2");const mt=/* @__PURE__ */Symbol.for(""),_t=t=>{if(t?.r===mt)return t?._$litStatic$},xt=t=>({_$litStatic$:t,r:mt}),yt=(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:mt}),wt=/* @__PURE__ */new Map,kt=(t=>(e,...s)=>{const o=s.length;let r,a;const i=[],d=[];let n,l=0,c=!1;for(;l<o;){for(n=e[l];l<o&&void 0!==(a=s[l],r=_t(a));)n+=r+e[++l],c=!0;l!==o&&d.push(a),i.push(n),l++}if(l===o&&i.push(e[o]),c){const t=i.join("$$lit$$");void 0===(e=wt.get(t))&&(i.raw=i,wt.set(t,e=i)),s=d}return t(e,...s)})(Q),zt=d`
|
|
1
|
+
var t,e=Object.defineProperty,s=(t,s,o)=>((t,s,o)=>s in t?e(t,s,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[s]=o)(t,"symbol"!=typeof s?s+"":s,o);const o=globalThis,r=o.ShadowRoot&&(void 0===o.ShadyCSS||o.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,a=/* @__PURE__ */Symbol(),i=/* @__PURE__ */new WeakMap;let d=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==a)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(r&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=i.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&i.set(e,t))}return t}toString(){return this.cssText}};const n=t=>new d("string"==typeof t?t:t+"",void 0,a),l=(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 d(s,t,a)},c=r?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return n(e)})(t):t,{is:h,defineProperty:p,getOwnPropertyDescriptor:g,getOwnPropertyNames:u,getOwnPropertySymbols:v,getPrototypeOf:f}=Object,b=globalThis,m=b.trustedTypes,_=m?m.emptyScript:"",x=b.reactiveElementPolyfillSupport,y=(t,e)=>t,w={toAttribute(t,e){switch(e){case Boolean:t=t?_: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}},k=(t,e)=>!h(t,e),z={attribute:!0,type:String,converter:w,reflect:!1,useDefault:!1,hasChanged:k};Symbol.metadata??=/* @__PURE__ */Symbol("metadata"),b.litPropertyMetadata??=/* @__PURE__ */new WeakMap;let $=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=z){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&&p(this.prototype,t,o)}}static getPropertyDescriptor(t,e,s){const{get:o,set:r}=g(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)??z}static _$Ei(){if(this.hasOwnProperty(y("elementProperties")))return;const t=f(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(y("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(y("properties"))){const t=this.properties,e=[...u(t),...v(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(c(t))}else void 0!==t&&e.push(c(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,e)=>{if(r)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const s of e){const e=document.createElement("style"),r=o.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=s.cssText,t.appendChild(e)}})(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:w).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:w;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??k)(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){}};$.elementStyles=[],$.shadowRootOptions={mode:"open"},$[y("elementProperties")]=/* @__PURE__ */new Map,$[y("finalized")]=/* @__PURE__ */new Map,x?.({ReactiveElement:$}),(b.reactiveElementVersions??=[]).push("2.1.2");const S={attribute:!0,type:String,converter:w,reflect:!1,hasChanged:k},C=(t=S,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 E(t){return(e,s)=>"object"==typeof s?C(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 A(t){return E({...t,state:!0,attribute:!1})}const L=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,s),s);function O(t,e){return(e,s,o)=>L(e,s,{get(){return e=this,e.renderRoot?.querySelector(t)??null;var e}})}function T(t){return(e,s)=>{const{slot:o,selector:r}=t??{},a="slot"+(o?`[name=${o}]`:":not([name])");return L(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 P(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 D=globalThis,M=t=>t,q=D.trustedTypes,R=q?q.createPolicy("lit-html",{createHTML:t=>t}):void 0,V="$lit$",B=`lit$${Math.random().toFixed(9).slice(2)}$`,H="?"+B,j=`<${H}>`,F=document,I=()=>F.createComment(""),N=t=>null===t||"object"!=typeof t&&"function"!=typeof t,U=Array.isArray,W="[ \t\n\f\r]",K=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,G=/-->/g,Y=/>/g,X=RegExp(`>|${W}(?:([^\\s"'>=/]+)(${W}*=${W}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Z=/'/g,Q=/"/g,J=/^(?:script|style|textarea|title)$/i,tt=(at=1,(t,...e)=>({_$litType$:at,strings:t,values:e})),et=/* @__PURE__ */Symbol.for("lit-noChange"),st=/* @__PURE__ */Symbol.for("lit-nothing"),ot=/* @__PURE__ */new WeakMap,rt=F.createTreeWalker(F,129);var at;function it(t,e){if(!U(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==R?R.createHTML(e):e}let dt=class t{constructor({strings:e,_$litType$:s},o){let r;this.parts=[];let a=0,i=0;const d=e.length-1,n=this.parts,[l,c]=((t,e)=>{const s=t.length-1,o=[];let r,a=2===e?"<svg>":3===e?"<math>":"",i=K;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===K?"!--"===n[1]?i=G:void 0!==n[1]?i=Y:void 0!==n[2]?(J.test(n[2])&&(r=RegExp("</"+n[2],"g")),i=X):void 0!==n[3]&&(i=X):i===X?">"===n[0]?(i=r??K,l=-1):void 0===n[1]?l=-2:(l=i.lastIndex-n[2].length,s=n[1],i=void 0===n[3]?X:'"'===n[3]?Q:Z):i===Q||i===Z?i=X:i===G||i===Y?i=K:(i=X,r=void 0);const h=i===X&&t[d+1].startsWith("/>")?" ":"";a+=i===K?e+j:l>=0?(o.push(s),e.slice(0,l)+V+e.slice(l)+B+h):e+B+(-2===l?d:h)}return[it(t,a+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),o]})(e,s);if(this.el=t.createElement(l,o),rt.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=rt.nextNode())&&n.length<d;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(V)){const e=c[i++],s=r.getAttribute(t).split(B),o=/([.?@])?(.*)/.exec(e);n.push({type:1,index:a,name:o[2],strings:s,ctor:"."===o[1]?pt:"?"===o[1]?gt:"@"===o[1]?ut:ht}),r.removeAttribute(t)}else t.startsWith(B)&&(n.push({type:6,index:a}),r.removeAttribute(t));if(J.test(r.tagName)){const t=r.textContent.split(B),e=t.length-1;if(e>0){r.textContent=q?q.emptyScript:"";for(let s=0;s<e;s++)r.append(t[s],I()),rt.nextNode(),n.push({type:2,index:++a});r.append(t[e],I())}}}else if(8===r.nodeType)if(r.data===H)n.push({type:2,index:a});else{let t=-1;for(;-1!==(t=r.data.indexOf(B,t+1));)n.push({type:7,index:a}),t+=B.length-1}a++}}static createElement(t,e){const s=F.createElement("template");return s.innerHTML=t,s}};function nt(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=nt(t,r._$AS(t,e.values),r,o)),e}let lt=class{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??F).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 ct(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=F,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++}},ct=class t{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=nt(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=>U(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(F.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=dt.createElement(it(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===o)this._$AH.p(e);else{const t=new lt(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 dt(t)),e}k(e){U(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let o,r=0;for(const a of e)r===s.length?s.push(o=new t(this.O(I()),this.O(I()),this,this.options)):o=s[r],o._$AI(a),r++;r<s.length&&(this._$AR(o&&o._$AB.nextSibling,r),s.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=M(t).nextSibling;M(t).remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}},ht=class{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=nt(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=nt(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??"")}},pt=class extends ht{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===st?void 0:t}},gt=class extends ht{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==st)}},ut=class extends ht{constructor(t,e,s,o,r){super(t,e,s,o,r),this.type=5}_$AI(t,e=this){if((t=nt(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)}},vt=class{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){nt(this,t)}};const ft=D.litHtmlPolyfillSupport;ft?.(dt,ct),(D.litHtmlVersions??=[]).push("3.3.3");const bt=globalThis;let mt=class extends ${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 ct(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}};mt._$litElement$=!0,mt.finalized=!0,bt.litElementHydrateSupport?.({LitElement:mt});const _t=bt.litElementPolyfillSupport;_t?.({LitElement:mt}),(bt.litElementVersions??=[]).push("4.2.2");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=(t=>(e,...s)=>{const o=s.length;let r,a;const i=[],d=[];let n,l=0,c=!1;for(;l<o;){for(n=e[l];l<o&&void 0!==(a=s[l],r=yt(a));)n+=r+e[++l],c=!0;l!==o&&d.push(a),i.push(n),l++}if(l===o&&i.push(e[o]),c){const t=i.join("$$lit$$");void 0===(e=zt.get(t))&&(i.raw=i,zt.set(t,e=i)),s=d}return t(e,...s)})(tt),St=l`
|
|
2
2
|
:host {
|
|
3
3
|
--_sds-alert-background-color: var(--sds-alert-background-color, var(--sds-color-alert-info-surface-tinted));
|
|
4
4
|
|
|
@@ -180,7 +180,7 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
180
180
|
margin: 0 !important;
|
|
181
181
|
max-width: var(--_sds-alert-max-line-width) !important;
|
|
182
182
|
}
|
|
183
|
-
|
|
183
|
+
`,Ct=/* @__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 Et(t){return class extends t{dispatchSheriffEvent(t,e,s=!Ct.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:!Ct.has(t),ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,repeat:e.repeat,isComposing:e.isComposing,location:e.location}))}}}var At=Object.defineProperty,Lt=(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&&At(e,s,a),a};const Ot={info:"InformationSquareFill-aksel-filled",success:"check_circle-material-filled",attention:"warning-material-filled",danger:"dangerous-material-filled"},Tt=class extends(Et(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,s)=>$t`<${this.iconTag} ${s?`class=${s}`:""} name="${t}" size=${e}></${this.iconTag}>`,this._renderRemoveButton=t=>$t`<${this.buttonTag}
|
|
184
184
|
class="sds-alert__remove-btn"
|
|
185
185
|
variant="tertiary"
|
|
186
186
|
size="sm"
|
|
@@ -189,14 +189,14 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
189
189
|
@click=${this._remove}
|
|
190
190
|
>
|
|
191
191
|
${this._renderIcon("close-material-outlined","sm")}
|
|
192
|
-
</${this.buttonTag}>`}render(){const t="primary"===this.variant?"md":this.size??"md",e=
|
|
192
|
+
</${this.buttonTag}>`}render(){const t="primary"===this.variant?"md":this.size??"md",e=Ot[this.palette]??Ot.info;return tt`<div class="sds-alert">
|
|
193
193
|
<div class="sds-alert__type">${this._renderIcon(e,t,"sds-alert__icon")}</div>
|
|
194
194
|
<div class="sds-alert__content">
|
|
195
195
|
<slot name="title"></slot>
|
|
196
196
|
<slot name="message"></slot>
|
|
197
197
|
</div>
|
|
198
|
-
${this.removableLabel&&"primary"===this.variant?
|
|
199
|
-
</div>`}};
|
|
198
|
+
${this.removableLabel&&"primary"===this.variant?tt`<div class="sds-alert__actions">${this._renderRemoveButton(this.removableLabel)}</div>`:st}
|
|
199
|
+
</div>`}};Tt.styles=[St];let Pt=Tt;Lt([E({type:String,reflect:!0})],Pt.prototype,"variant"),Lt([E({type:String,reflect:!0})],Pt.prototype,"size"),Lt([E({type:String,attribute:"removable-label",reflect:!0})],Pt.prototype,"removableLabel"),Lt([E({type:String,attribute:"data-palette",reflect:!0})],Pt.prototype,"palette");const Dt=t=>t??st,Mt=1,qt=2,Rt=t=>(...e)=>({_$litDirective$:t,values:e});let Vt=class{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)}},Bt=class extends Vt{constructor(t){if(super(t),this.it=st,t.type!==qt)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:[]}}};Bt.directiveName="unsafeHTML",Bt.resultType=1;let Ht=class extends Bt{};Ht.directiveName="unsafeSVG",Ht.resultType=2;const jt=Rt(Ht),Ft=["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"],It={"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>'},Nt=t=>import(`@politiet/sheriff-icons/dist/assets/${t}.js`).then(({default:t})=>t).catch(t=>{console.log(t)}),Ut=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 Wt=l`
|
|
200
200
|
:host {
|
|
201
201
|
--_sds-icon-size: var(--sds-icon-size, var(--sds-components-icon-md));
|
|
202
202
|
--_sds-icon-color: var(--sds-icon-color, var(--sds-color-text-subtle, var(--sds-color-neutral-text-subtle)));
|
|
@@ -229,11 +229,11 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
229
229
|
height: 100%;
|
|
230
230
|
overflow: hidden;
|
|
231
231
|
}
|
|
232
|
-
`;var
|
|
233
|
-
<div class="sds-icon" role="${
|
|
234
|
-
${this.name?
|
|
232
|
+
`;var Kt=Object.defineProperty,Gt=(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&&Kt(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 tt`
|
|
233
|
+
<div class="sds-icon" role="${Dt(this.label?"img":void 0)}" style="${Dt(this.color?`color:${this.color}`:void 0)}" aria-label="${Dt(this.label)}">
|
|
234
|
+
${this.name?tt`<slot aria-hidden="true">${jt(this.svg)}</slot>`:tt`<slot aria-hidden="true"></slot>`}
|
|
235
235
|
</div>
|
|
236
|
-
`}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=[
|
|
236
|
+
`}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=[Wt],t.iconLoader=new class{constructor(){this.cache=/* @__PURE__ */new Map,this._loadLocal=!1,this._disableSystemIcons=!1,this.resolver=this._loadLocal?Nt:Ut}get loadLocal(){return this._loadLocal}set loadLocal(t){this._loadLocal=t,this.resolver=t?Nt:Ut}set disableSystemIcons(t){this._disableSystemIcons=t}resolve(t,e){if(!this._disableSystemIcons&&(t=>Ft.includes(t))(t))return void e(It[t]);let s=this.cache.get(t);"string"!=typeof s?(s||(s=this.resolver(t).catch(()=>"").then(e=>(this.cache.set(t,e),e)),this.cache.set(t,s)),s.then(e)):e(s)}clear(){this.cache.clear()}get currentLoader(){return this.resolver}},t);Gt([E({type:String,reflect:!0})],Yt.prototype,"name"),Gt([E({type:String,reflect:!0})],Yt.prototype,"size"),Gt([E({type:String,reflect:!0})],Yt.prototype,"color"),Gt([E({type:String,reflect:!0})],Yt.prototype,"label"),Gt([A()],Yt.prototype,"svg");let Xt=Yt;var Zt=Object.getOwnPropertyDescriptor;let Qt=class extends Xt{};Qt=((t,e,s,o)=>{for(var r,a=o>1?void 0:o?Zt(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(a)||a);return a})([P("sds-icon")],Qt);const Jt=Rt(class extends Vt{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}}),te=l`
|
|
237
237
|
:host {
|
|
238
238
|
--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-action-default, var(--sds-color-main-action-default)));
|
|
239
239
|
--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-action-default, var(--sds-color-main-action-default)));
|
|
@@ -242,6 +242,7 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
242
242
|
--_sds-button-focus-color: var(--sds-button-focus-color, var(--sds-color-states-focus-outer));
|
|
243
243
|
--_sds-button-focus-inner-color: var(--sds-button-focus-inner-color, var(--sds-color-states-focus-inner));
|
|
244
244
|
--_sds-button-focus-spacing: var(--sds-button-focus-spacing, var(--sds-color-states-focus-spacing));
|
|
245
|
+
--_sds-button-focus-outline-size: var(--sds-button-focus-outline-size, var(--sds-color-states-focus-outline-size));
|
|
245
246
|
--_sds-button-font-family: var(--sds-button-font, var(--sds-typography-font-family-roboto));
|
|
246
247
|
--_sds-button-font-size: var(--sds-button-font-size, var(--sds-components-font-size-content-lg));
|
|
247
248
|
--_sds-button-font-weight: var(--sds-button-font-weight, var(--sds-typography-body-md-strong-desktop-font-weight));
|
|
@@ -290,9 +291,9 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
290
291
|
}
|
|
291
292
|
|
|
292
293
|
&:focus-visible {
|
|
293
|
-
box-shadow: 0 0 0 var(--
|
|
294
|
-
outline:
|
|
295
|
-
outline-offset:
|
|
294
|
+
box-shadow: 0 0 0 var(--_sds-button-focus-spacing) var(--_sds-button-focus-inner-color);
|
|
295
|
+
outline: var(--_sds-button-focus-outline-size) solid var(--_sds-button-focus-color);
|
|
296
|
+
outline-offset: var(--_sds-button-focus-spacing);
|
|
296
297
|
}
|
|
297
298
|
|
|
298
299
|
&:active {
|
|
@@ -405,152 +406,110 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
405
406
|
--_sds-button-padding-inline: var(--sds-button-padding-inline, 0);
|
|
406
407
|
min-width: var(--_sds-button-min-height);
|
|
407
408
|
}
|
|
408
|
-
`;function Jt(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 te=Object.defineProperty,ee=(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&&te(e,s,a),a};function se(t){const e=class extends t{constructor(...t){super(...t),this.disabled=!1,this.readOnly=!1,this.internals=this.attachInternals()}get form(){return this.internals.form}formDisabledCallback(t){this.disabled=t}};e.formAssociated=!0,e.shadowRootOptions={...ft.shadowRootOptions,delegatesFocus:!0};let s=e;return ee([S({type:String,reflect:!0})],s.prototype,"name"),ee([S({type:Boolean,reflect:!0})],s.prototype,"disabled"),ee([S({type:Boolean,attribute:"readonly",reflect:!0})],s.prototype,"readOnly"),s}const oe=d`
|
|
409
|
-
:host {
|
|
410
|
-
--_sds-dialog-background-color: var(--sds-dialog-background-color, var(--sds-color-surface-default, var(--sds-color-main-surface-default)));
|
|
411
|
-
--_sds-dialog-backdrop-color: var(--sds-dialog-backdrop-color, rgba(0, 0, 0, 0.5));
|
|
412
|
-
|
|
413
|
-
--_sds-dialog-border-color: var(--sds-dialog-border-color, var(--sds-color-border-subtle, var(--sds-color-main-border-subtle)));
|
|
414
|
-
--_sds-dialog-border-radius: var(--sds-dialog-border-radius, var(--sds-radius-md));
|
|
415
|
-
--_sds-dialog-border-width: var(--sds-dialog-border-width, var(--sds-border-sm));
|
|
416
|
-
|
|
417
|
-
--_sds-dialog-max-width: var(--sds-dialog-max-width, min(60ch, 100vw));
|
|
418
|
-
--_sds-dialog-max-height: var(--sds-dialog-max-height, calc(100dvh - var(--sds-spacing-lg)));
|
|
419
|
-
|
|
420
|
-
--_sds-dialog-margin: var(--sds-dialog-margin, auto);
|
|
421
|
-
--_sds-dialog-padding-block: var(--sds-dialog-padding-block, var(--sds-spacing-sm));
|
|
422
|
-
--_sds-dialog-padding-inline: var(--sds-dialog-padding-inline, var(--sds-spacing-sm));
|
|
423
|
-
--_sds-dialog-gap: var(--sds-dialog-gap, var(--sds-spacing-xs));
|
|
424
|
-
|
|
425
|
-
--_sds-dialog-font-family: var(--sds-dialog-font-family, var(--sds-typography-font-family-roboto));
|
|
426
|
-
--_sds-dialog-text-color: var(--sds-dialog-text-color, var(--sds-color-text-default, var(--sds-color-main-text-default)));
|
|
427
|
-
|
|
428
|
-
--_sds-dialog-box-shadow: var(--sds-dialog-box-shadow, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
|
|
429
|
-
|
|
430
|
-
--_sds-dialog-animation-duration: var(--sds-dialog-animation-duration, 200ms);
|
|
431
|
-
--_sds-dialog-close-button-offset: var(--sds-dialog-close-button-offset, var(--sds-spacing-3xs));
|
|
432
|
-
|
|
433
|
-
display: contents;
|
|
434
|
-
}
|
|
435
409
|
|
|
436
|
-
|
|
437
|
-
color: var(--
|
|
438
|
-
|
|
439
|
-
|
|
410
|
+
:host([inverted]) {
|
|
411
|
+
--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-action-contrast-default, var(--sds-color-accent-action-contrast-default)));
|
|
412
|
+
--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-action-contrast-default, var(--sds-color-accent-action-contrast-default)));
|
|
413
|
+
--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-action-default, var(--sds-color-accent-action-default)));
|
|
440
414
|
|
|
441
|
-
|
|
442
|
-
|
|
415
|
+
--sds-loader-main-color: var(--sds-color-action-default, var(--sds-color-accent-action-default));
|
|
416
|
+
--sds-loader-secondary-color: var(--sds-color-border-subtle, var(--sds-color-accent-border-subtle));
|
|
417
|
+
--sds-icon-color: var(--sds-color-action-default, var(--sds-color-accent-action-default));
|
|
443
418
|
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
max-height: var(--_sds-dialog-max-height);
|
|
448
|
-
|
|
449
|
-
overflow: auto;
|
|
450
|
-
padding: 0;
|
|
451
|
-
|
|
452
|
-
opacity: 0;
|
|
453
|
-
transform: translateY(-1rem);
|
|
454
|
-
animation: sds-dialog-fade-in var(--_sds-dialog-animation-duration) ease-out forwards;
|
|
455
|
-
|
|
456
|
-
&:focus-visible {
|
|
457
|
-
outline: 3px solid var(--sds-color-states-focus-outer);
|
|
458
|
-
outline-offset: 3px;
|
|
419
|
+
.sds-button:hover {
|
|
420
|
+
--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-surface-hover, var(--sds-color-accent-surface-hover)));
|
|
421
|
+
--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-surface-hover, var(--sds-color-accent-surface-hover)));
|
|
459
422
|
}
|
|
460
423
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
margin: var(--_sds-dialog-margin);
|
|
465
|
-
padding-block: var(--_sds-dialog-padding-block);
|
|
466
|
-
padding-inline: var(--_sds-dialog-padding-inline);
|
|
467
|
-
gap: var(--_sds-dialog-gap);
|
|
424
|
+
.sds-button:active {
|
|
425
|
+
--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-surface-active, var(--sds-color-accent-surface-active)));
|
|
426
|
+
--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-surface-active, var(--sds-color-accent-surface-active)));
|
|
468
427
|
}
|
|
428
|
+
}
|
|
469
429
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
430
|
+
:host([inverted][variant='primary']) {
|
|
431
|
+
.sds-button:disabled {
|
|
432
|
+
--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-action-contrast-default, var(--sds-color-neutral-action-contrast-default)));
|
|
433
|
+
--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-action-contrast-default, var(--sds-color-neutral-action-contrast-default)));
|
|
434
|
+
--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-action-default, var(--sds-color-neutral-action-default)));
|
|
473
435
|
}
|
|
436
|
+
}
|
|
474
437
|
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
438
|
+
:host([inverted][variant='secondary']) {
|
|
439
|
+
--_sds-button-background-color: var(--sds-button-background-color, transparent);
|
|
440
|
+
--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-action-contrast-default, var(--sds-color-accent-action-contrast-default)));
|
|
441
|
+
--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-action-contrast-default, var(--sds-color-accent-action-contrast-default)));
|
|
442
|
+
--sds-loader-main-color: var(--sds-color-accent-action-contrast-default);
|
|
443
|
+
|
|
444
|
+
.sds-button:hover {
|
|
445
|
+
--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-action-contrast-default, var(--sds-color-accent-action-contrast-default)));
|
|
446
|
+
--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-action-contrast-default, var(--sds-color-accent-action-contrast-default)));
|
|
447
|
+
--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-action-default, var(--sds-color-accent-action-default)));
|
|
448
|
+
--sds-loader-main-color: var(--sds-color-accent-action-default);
|
|
480
449
|
}
|
|
481
450
|
|
|
482
|
-
|
|
483
|
-
|
|
451
|
+
.sds-button:active {
|
|
452
|
+
--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-surface-active, var(--sds-color-accent-surface-active)));
|
|
453
|
+
--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-surface-active, var(--sds-color-accent-surface-active)));
|
|
454
|
+
--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-action-default, var(--sds-color-accent-action-default)));
|
|
455
|
+
--sds-loader-main-color: var(--sds-color-accent-action-default);
|
|
484
456
|
}
|
|
485
|
-
}
|
|
486
457
|
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
458
|
+
.sds-button:disabled {
|
|
459
|
+
--_sds-button-background-color: var(--sds-button-background-color, transparent);
|
|
460
|
+
--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-action-contrast-default, var(--sds-color-neutral-action-contrast-default)));
|
|
461
|
+
--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-action-contrast-default, var(--sds-color-neutral-action-contrast-default)));
|
|
491
462
|
}
|
|
492
463
|
}
|
|
493
464
|
|
|
494
|
-
|
|
495
|
-
--
|
|
496
|
-
--
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
right: var(--_sds-dialog-close-button-offset);
|
|
501
|
-
z-index: 1;
|
|
502
|
-
}
|
|
465
|
+
:host([inverted][variant='tertiary']) {
|
|
466
|
+
--_sds-button-background-color: var(--sds-button-background-color, transparent);
|
|
467
|
+
--_sds-button-border-color: var(--sds-button-border-color, transparent);
|
|
468
|
+
--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-action-contrast-default, var(--sds-color-accent-action-contrast-default)));
|
|
469
|
+
--sds-typography-link-text-decoration: none;
|
|
470
|
+
--sds-loader-main-color: var(--sds-color-accent-action-contrast-default);
|
|
503
471
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
472
|
+
.sds-button:hover {
|
|
473
|
+
--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-action-contrast-default, var(--sds-color-accent-action-contrast-default)));
|
|
474
|
+
--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-action-contrast-default, var(--sds-color-accent-action-contrast-default)));
|
|
475
|
+
--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-action-default, var(--sds-color-accent-action-default)));
|
|
476
|
+
--sds-loader-main-color: var(--sds-color-accent-action-default);
|
|
477
|
+
}
|
|
507
478
|
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
--_sds-
|
|
511
|
-
--_sds-
|
|
479
|
+
.sds-button:active {
|
|
480
|
+
--_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-surface-active, var(--sds-color-accent-surface-active)));
|
|
481
|
+
--_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-surface-active, var(--sds-color-accent-surface-active)));
|
|
482
|
+
--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-action-default, var(--sds-color-accent-action-default)));
|
|
483
|
+
--sds-loader-main-color: var(--sds-color-accent-action-default);
|
|
512
484
|
}
|
|
513
|
-
}
|
|
514
485
|
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
--_sds-
|
|
486
|
+
.sds-button:disabled {
|
|
487
|
+
--_sds-button-background-color: var(--sds-button-background-color, transparent);
|
|
488
|
+
--_sds-button-border-color: var(--sds-button-border-color, transparent);
|
|
489
|
+
--_sds-button-text-color: var(--sds-button-text-color, var(--sds-color-action-contrast-default, var(--sds-color-neutral-action-contrast-default)));
|
|
518
490
|
}
|
|
519
491
|
}
|
|
520
|
-
`;var
|
|
521
|
-
<dialog .closedBy="${this.closedby}" class=${this._isHeaderSlotEmpty?"sds-dialog__empty-header":""}>
|
|
522
|
-
<div class="sds-dialog__header">
|
|
523
|
-
<slot name="header" @slotchange=${this._handleHeaderSlotChange}></slot>
|
|
524
|
-
${this.closeButtonLabel?Q`
|
|
525
|
-
<sds-button class="sds-dialog__close-button" icon variant="tertiary" size="md" command="close" label="${this.closeButtonLabel}">
|
|
526
|
-
<sds-icon name="close-material-outlined" size="md"></sds-icon>
|
|
527
|
-
</sds-button>
|
|
528
|
-
`:tt}
|
|
529
|
-
</div>
|
|
530
|
-
<slot></slot>
|
|
531
|
-
<slot name="footer"></slot>
|
|
532
|
-
</dialog>
|
|
533
|
-
`}};ie.styles=[oe];let de=ie;ae([S({type:Boolean,reflect:!0})],de.prototype,"open"),ae([S({type:Boolean,reflect:!0})],de.prototype,"modal"),ae([S({type:String,reflect:!0})],de.prototype,"closedby"),ae([S({type:String,attribute:"close-button-label"})],de.prototype,"closeButtonLabel"),ae([A("dialog")],de.prototype,"_dialog"),ae([C()],de.prototype,"_isHeaderSlotEmpty");var ne=Object.getOwnPropertyDescriptor;let le=class extends de{};le=((t,e,s,o)=>{for(var r,a=o>1?void 0:o?ne(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(a)||a);return a})([L("sds-dialog")],le);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};var pe=Object.defineProperty,ge=(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&&pe(e,s,a),a};var ve=Object.defineProperty,ue=(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&&ve(e,s,a),a};const fe=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()}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);r&&r instanceof le?(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)switch(this.effectiveCommand){case"show-modal":this._dialogElement.showModal();break;case"close":this._dialogElement.close();break;case"request-close":this._dialogElement.requestClose()}}}return he([S({type:String,attribute:"command",reflect:!0})],e.prototype,"command"),he([S({type:String,attribute:"commandfor",reflect:!0})],e.prototype,"commandFor"),he([S({type:String,attribute:"data-command"})],e.prototype,"dataCommand"),he([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 ge([S({type:String,attribute:"popovertarget"})],e.prototype,"popoverTarget"),ge([S({type:String,attribute:"popovertargetaction"})],e.prototype,"popoverTargetAction"),e}(Jt(St(ft))))){constructor(){super(),this.disabled=!1,this.icon=!1,this.loading=!1,this.size="lg",this.type="button",this.value="",this.variant="primary",this.label=void 0,this._handleClick=t=>{if(this.popoverTarget)return t.stopImmediatePropagation(),void(this.disabled||this.dispatchSheriffEvent("click"));if(this.effectiveCommandFor&&this.effectiveCommand)return t.preventDefault(),t.stopImmediatePropagation(),void(this.disabled||(this.runDialogCommand(),this.dispatchSheriffEvent("click")));if(t.preventDefault(),t.stopImmediatePropagation(),!this.disabled)switch(this.type){case"submit":if(this.dispatchSheriffEvent("submit"))if(this.form){const t=this.getRootNode().querySelector(`form#${this.form}`);t?.requestSubmit()}else this.internals.form&&this.internals.form.requestSubmit();break;case"reset":if(this.dispatchSheriffEvent("reset"))if(this.form){const t=this.getRootNode().querySelector(`form#${this.form}`);t?.reset()}else this.internals.form&&this.internals.form.reset();break;default:this.dispatchSheriffEvent("click")}},this.internals=this.attachInternals()}updated(t){super.updated(t),t.has("variant")&&"critical"===this.variant&&this.setAttribute("data-palette","danger")}render(){const t={"sds-button":!0,"sds-button--as-link":!!this.href};return this.href?Q` <a id="link" class="${Zt(t)}" href="${this.href}" target="${Pt(this.target)}">
|
|
492
|
+
`;function ee(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 se=Object.defineProperty,oe=(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&&se(e,s,a),a};function re(t){const e=class extends t{constructor(...t){super(...t),this.disabled=!1,this.readOnly=!1,this.internals=this.attachInternals()}get form(){return this.internals.form}formDisabledCallback(t){this.disabled=t}firstUpdated(t){super.firstUpdated(t),this.updateValidity()}updateValidity(){}};e.formAssociated=!0,e.shadowRootOptions={...mt.shadowRootOptions,delegatesFocus:!0};let s=e;return oe([E({type:String,reflect:!0})],s.prototype,"name"),oe([E({type:Boolean,reflect:!0})],s.prototype,"disabled"),oe([E({type:Boolean,attribute:"readonly",reflect:!0})],s.prototype,"readOnly"),s}var ae=Object.defineProperty,ie=(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&&ae(e,s,a),a};var de=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&&de(e,s,a),a};var le=Object.defineProperty,ce=(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&&le(e,s,a),a};const he=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()}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)switch(this.effectiveCommand){case"show-modal":this._dialogElement.showModal();break;case"close":this._dialogElement.close();break;case"request-close":this._dialogElement.requestClose()}}}return ie([E({type:String,attribute:"command",reflect:!0})],e.prototype,"command"),ie([E({type:String,attribute:"commandfor",reflect:!0})],e.prototype,"commandFor"),ie([E({type:String,attribute:"data-command"})],e.prototype,"dataCommand"),ie([E({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 ne([E({type:String,attribute:"popovertarget"})],e.prototype,"popoverTarget"),ne([E({type:String,attribute:"popovertargetaction"})],e.prototype,"popoverTargetAction"),e}(ee(Et(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?tt` <a id="link" class="${Jt(t)}" href="${this.href}" target="${Dt(this.target)}">
|
|
534
493
|
<slot name="before"></slot>
|
|
535
494
|
<slot></slot>
|
|
536
495
|
<slot name="after"></slot>
|
|
537
|
-
</a>`:
|
|
496
|
+
</a>`:tt`
|
|
538
497
|
<button
|
|
539
498
|
id="control"
|
|
540
|
-
form="${
|
|
541
|
-
class="${
|
|
499
|
+
form="${Dt(this.form)}"
|
|
500
|
+
class="${Jt(t)}"
|
|
542
501
|
type="${this.type}"
|
|
543
|
-
name="${
|
|
544
|
-
value="${
|
|
502
|
+
name="${Dt(this.name)}"
|
|
503
|
+
value="${Dt(this.value)}"
|
|
545
504
|
?disabled="${this.disabled}"
|
|
546
505
|
@click="${this._handleClick}"
|
|
547
|
-
aria-label="${
|
|
506
|
+
aria-label="${Dt(this.label)}"
|
|
548
507
|
>
|
|
549
|
-
${this.loading?
|
|
508
|
+
${this.loading?tt`<sds-loader slot="before" ?contrast="${this.inverted||"primary"!==this.variant}"></sds-loader>`:st} ${this.loading?st:tt`<slot name="before"></slot>`}
|
|
550
509
|
<slot></slot>
|
|
551
|
-
${this.loading?tt
|
|
510
|
+
${this.loading?st:tt`<slot name="after"></slot>`}
|
|
552
511
|
</button>
|
|
553
|
-
`}};
|
|
512
|
+
`}};he.styles=[te],he.formAssociated=!0,he.shadowRootOptions={...mt.shadowRootOptions,delegatesFocus:!0};let pe=he;ce([E({type:Boolean,reflect:!0})],pe.prototype,"disabled"),ce([E({type:Boolean,reflect:!0})],pe.prototype,"icon"),ce([E({type:Boolean,reflect:!0})],pe.prototype,"inverted"),ce([E({type:Boolean,reflect:!0})],pe.prototype,"loading"),ce([E({type:String,reflect:!0})],pe.prototype,"form"),ce([E({type:String,reflect:!0})],pe.prototype,"href"),ce([E({type:String,reflect:!0})],pe.prototype,"name"),ce([E({type:String,reflect:!0})],pe.prototype,"size"),ce([E({type:String,reflect:!0})],pe.prototype,"target"),ce([E({type:String,reflect:!0})],pe.prototype,"type"),ce([E({type:String,reflect:!0})],pe.prototype,"value"),ce([E({type:String,reflect:!0})],pe.prototype,"variant"),ce([E({type:String,reflect:!0})],pe.prototype,"label"),ce([O("#control")],pe.prototype,"control");var ge=Object.getOwnPropertyDescriptor;let ue=class extends pe{};ue=((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})([P("sds-button")],ue);var ve=Object.getOwnPropertyDescriptor;let fe=class extends Pt{};function be(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)}fe=((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})([P("sds-alert")],fe);const me=l`
|
|
554
513
|
:host {
|
|
555
514
|
--_sds-card-background-color: var(--sds-card-background-color, var(--sds-color-surface-tinted, var(--sds-color-main-surface-tinted)));
|
|
556
515
|
--_sds-card-border-radius: var(--sds-card-border-radius, var(--sds-radius-md));
|
|
@@ -560,6 +519,7 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
560
519
|
--_sds-card-focus-color: var(--sds-card-focus-color, var(--sds-color-states-focus-outer));
|
|
561
520
|
--_sds-card-focus-inner-color: var(--sds-card-focus-inner-color, var(--sds-color-states-focus-inner));
|
|
562
521
|
--_sds-card-focus-spacing: var(--sds-card-focus-spacing, var(--sds-color-states-focus-spacing));
|
|
522
|
+
--_sds-card-focus-outline-size: var(--sds-card-focus-outline-size, var(--sds-color-states-focus-outline-size));
|
|
563
523
|
--_sds-card-icon-color: var(--sds-card-icon-color, var(--sds-color-neutral-text-default));
|
|
564
524
|
--_sds-card-icon-display: var(--sds-card-icon-display, block);
|
|
565
525
|
|
|
@@ -576,6 +536,11 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
576
536
|
display: block;
|
|
577
537
|
}
|
|
578
538
|
|
|
539
|
+
.sds-card {
|
|
540
|
+
height: 100%;
|
|
541
|
+
display: grid;
|
|
542
|
+
}
|
|
543
|
+
|
|
579
544
|
.sds-card__content {
|
|
580
545
|
background-color: var(--_sds-card-background-color);
|
|
581
546
|
border-radius: var(--_sds-card-border-radius);
|
|
@@ -586,7 +551,7 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
586
551
|
|
|
587
552
|
display: grid;
|
|
588
553
|
grid-template-columns: 1fr auto;
|
|
589
|
-
grid-template-rows: auto
|
|
554
|
+
grid-template-rows: auto 1fr;
|
|
590
555
|
grid-template-areas:
|
|
591
556
|
"heading icon"
|
|
592
557
|
"text text";
|
|
@@ -600,8 +565,8 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
600
565
|
}
|
|
601
566
|
|
|
602
567
|
&:focus-visible {
|
|
603
|
-
box-shadow: 0 0 0 var(--
|
|
604
|
-
outline: var(--_sds-card-focus-
|
|
568
|
+
box-shadow: 0 0 0 var(--_sds-card-focus-spacing) var(--_sds-card-focus-inner-color);
|
|
569
|
+
outline: var(--_sds-card-focus-outline-size) solid var(--_sds-card-focus-color);
|
|
605
570
|
outline-offset: var(--_sds-card-focus-spacing);
|
|
606
571
|
}
|
|
607
572
|
}
|
|
@@ -659,6 +624,11 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
659
624
|
--_sds-card-gap: var(--sds-card-gap, var(--sds-spacing-3xs) var(--sds-spacing-xs));
|
|
660
625
|
}
|
|
661
626
|
|
|
627
|
+
.sds-card__content--no-text {
|
|
628
|
+
--_sds-card-gap: var(--sds-card-gap, var(--sds-spacing-zero) var(--sds-spacing-xs));
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
|
|
662
632
|
::slotted(p) {
|
|
663
633
|
display: block !important;
|
|
664
634
|
}
|
|
@@ -674,11 +644,11 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
674
644
|
--_sds-card-text-line-height: var(--sds-card-text-line-height, var(--sds-typography-body-md-desktop-line-height));
|
|
675
645
|
}
|
|
676
646
|
}
|
|
677
|
-
`;var
|
|
647
|
+
`;var _e=Object.defineProperty,xe=Object.getOwnPropertyDescriptor,ye=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?xe(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 we=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&&be(this.headingSlot,["H2","H3","H4","H5","H6"],0,this._headerWarning)},this._handleTextSlotChange=()=>{be(this.textSlot,["P"],0,this._contentWarning),this._textSlotEmpty=0===this.textSlot.assignedElements({flatten:!0}).length}}firstUpdated(){be(this.textSlot,["P"],0,this._contentWarning),this._textSlotEmpty=0===this.textSlot.assignedElements({flatten:!0}).length;this.headingSlot.assignedNodes({flatten:!0}).length>0&&be(this.headingSlot,["H2","H3","H4","H5","H6"],0,this._headerWarning)}render(){const t=tt`
|
|
678
648
|
<slot name="heading" id="heading" @slotchange=${this._handleHeadingSlotChange}></slot>
|
|
679
649
|
<slot name="text" id="content" @slotchange=${this._handleTextSlotChange}></slot>
|
|
680
650
|
<sds-icon name="arrow_forward-material-outlined" size="md" class="sds-card__icon" role="presentation"></sds-icon>
|
|
681
|
-
|
|
651
|
+
`,e={"sds-card__content":!0,"sds-card__content--no-text":this._textSlotEmpty};return tt`<article class="sds-card">${this.link?tt`<a href="${this.link}" class=${Jt(e)}>${t}</a>`:tt`<div class=${Jt(e)}>${t}</div>`}</article>`}};we.styles=[me],ye([E({type:String,reflect:!0})],we.prototype,"link",2),ye([O("slot#heading")],we.prototype,"headingSlot",2),ye([O("slot#content")],we.prototype,"textSlot",2),ye([A()],we.prototype,"_textSlotEmpty",2),we=ye([P("sds-card")],we);const ke=l`
|
|
682
652
|
:host {
|
|
683
653
|
--_sds-checkbox-block-gap: var(--sds-checkbox-block-gap, var(--sds-spacing-4xs));
|
|
684
654
|
--_sds-checkbox-inline-gap: var(--sds-checkbox-inline-gap, var(--sds-spacing-3xs));
|
|
@@ -706,6 +676,7 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
706
676
|
--_sds-checkbox-focus-color-outer: var(--sds-checkbox-focus-color-outer, var(--sds-color-states-focus-outer));
|
|
707
677
|
--_sds-checkbox-focus-color-inner: var(--sds-checkbox-focus-color-inner, var(--sds-color-states-focus-inner));
|
|
708
678
|
--_sds-checkbox-focus-spacing: var(--sds-checkbox-focus-spacing, var(--sds-color-states-focus-spacing));
|
|
679
|
+
--_sds-checkbox-focus-outline-size: var(--sds-checkbox-focus-outline-size, var(--sds-color-states-focus-outline-size));
|
|
709
680
|
--_sds-checkbox-focus-radius: var(--sds-checkbox-focus-radius, var(--sds-radius-xs));
|
|
710
681
|
|
|
711
682
|
--_sds-checkbox-disabled-opacity: var(--sds-checkbox-disabled-opacity, var(--sds-color-states-disabled-opacity));
|
|
@@ -734,8 +705,9 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
734
705
|
}
|
|
735
706
|
|
|
736
707
|
&:has(:focus-visible) {
|
|
737
|
-
|
|
738
|
-
outline
|
|
708
|
+
box-shadow: 0 0 0 var(--_sds-checkbox-focus-spacing) var(--_sds-checkbox-focus-color-inner);
|
|
709
|
+
outline: var(--_sds-checkbox-focus-outline-size) solid var(--_sds-checkbox-focus-color-outer);
|
|
710
|
+
outline-offset: var(--_sds-checkbox-focus-spacing);
|
|
739
711
|
border-radius: var(--_sds-checkbox-focus-radius);
|
|
740
712
|
}
|
|
741
713
|
}
|
|
@@ -901,29 +873,31 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
901
873
|
margin-block-start: -1px;
|
|
902
874
|
}
|
|
903
875
|
}
|
|
904
|
-
`;var
|
|
905
|
-
<div class="${
|
|
876
|
+
`;var ze=Object.defineProperty,$e=Object.getOwnPropertyDescriptor,Se=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?$e(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 Ce=class extends(ee(Et(re(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 tt`
|
|
877
|
+
<div class="${Jt(t)}">
|
|
906
878
|
<input
|
|
907
879
|
id="control"
|
|
908
880
|
type="checkbox"
|
|
909
|
-
name="${
|
|
910
|
-
value="${
|
|
881
|
+
name="${Dt(this.name)}"
|
|
882
|
+
value="${Dt(this.value)}"
|
|
911
883
|
.checked="${this.checked}"
|
|
912
884
|
?checked="${this.checked}"
|
|
913
885
|
?disabled="${this.disabled}"
|
|
914
886
|
?required="${this.required}"
|
|
915
887
|
?readonly="${this.readOnly}"
|
|
916
|
-
aria-describedby="${
|
|
888
|
+
aria-describedby="${Dt(o)}"
|
|
917
889
|
aria-invalid="${this.error?"true":"false"}"
|
|
918
890
|
@change="${this._handleChange}"
|
|
919
891
|
@focus="${this._handleFocus}"
|
|
920
892
|
@blur="${this._handleBlur}"
|
|
921
|
-
class="${
|
|
893
|
+
class="${Jt(s)}"
|
|
922
894
|
/>
|
|
923
|
-
|
|
924
|
-
|
|
895
|
+
<label for="control" class="sds-checkbox__label" ?hidden="${!e}">
|
|
896
|
+
<slot name="label" @slotchange="${this._handleLabelSlotChange}">${this.label}</slot>
|
|
897
|
+
</label>
|
|
898
|
+
${this.helpText?tt`<span id="help-text" class="sds-checkbox__help-text">${this.helpText}</span>`:st}
|
|
925
899
|
</div>
|
|
926
|
-
`}};
|
|
900
|
+
`}};Ce.styles=[ke],Se([E({type:String,reflect:!0})],Ce.prototype,"label",2),Se([E({type:String})],Ce.prototype,"value",2),Se([E({type:Boolean,reflect:!0})],Ce.prototype,"checked",2),Se([E({type:Boolean,reflect:!0})],Ce.prototype,"error",2),Se([E({type:Boolean,reflect:!0})],Ce.prototype,"required",2),Se([E({type:String,reflect:!0})],Ce.prototype,"size",2),Se([E({type:String,attribute:"help-text"})],Ce.prototype,"helpText",2),Se([E({type:Boolean,reflect:!0})],Ce.prototype,"disabled",1),Se([E({type:Boolean,attribute:!1})],Ce.prototype,"parentRequestDisabled",1),Se([O("#control")],Ce.prototype,"control",2),Se([A()],Ce.prototype,"_hasSlottedLabel",2),Ce=Se([P("sds-checkbox")],Ce);const Ee=l`
|
|
927
901
|
:host {
|
|
928
902
|
--_sds-checkbox-group-gap: var(--sds-checkbox-group-gap, var(--sds-spacing-xs));
|
|
929
903
|
--_sds-checkbox-group-font-family: var(--sds-checkbox-group-font-family, var(--sds-typography-font-family-roboto));
|
|
@@ -1015,16 +989,16 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
1015
989
|
--_sds-checkbox-group-help-text-font-size: var(--sds-checkbox-group-help-text-font-size, var(--sds-components-font-size-content-lg));
|
|
1016
990
|
--_sds-checkbox-group-help-text-line-height: var(--sds-checkbox-group-help-text-line-height, var(--sds-components-line-height-squeezed-lg));
|
|
1017
991
|
}
|
|
1018
|
-
`;var
|
|
1019
|
-
<fieldset class="${
|
|
1020
|
-
${this.legend?
|
|
1021
|
-
${this.helpText?
|
|
992
|
+
`;var Ae=Object.defineProperty,Le=Object.getOwnPropertyDescriptor,Oe=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?Le(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&&Ae(e,s,a),a};const Te=["disabled","errorMessage","readOnly","size"];let Pe=class extends(Et(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([...Te])}}_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;Te.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 tt`
|
|
993
|
+
<fieldset class="${Jt(t)}" aria-describedby="${Dt(e)}" aria-invalid="${this.errorMessage?"true":"false"}">
|
|
994
|
+
${this.legend?tt`<legend class="sds-checkbox-group__legend">${this.readOnly?tt`<sds-icon name="lock-material-filled" size="md"></sds-icon>`:st}</sds-icon>${this.legend}</legend>`:st}
|
|
995
|
+
${this.helpText?tt`<p id="help-text" class="sds-checkbox-group__help-text">${this.helpText}</p>`:st}
|
|
1022
996
|
<div class="sds-checkbox-group__checkboxes" @change=${this._handleCheckboxChange}>
|
|
1023
997
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
1024
998
|
</div>
|
|
1025
|
-
${this.errorMessage?
|
|
999
|
+
${this.errorMessage?tt`<sds-alert id="error-message" variant="secondary" data-palette="danger"><p slot="message">${this.errorMessage}</p></sds-alert>`:st}
|
|
1026
1000
|
</fieldset>
|
|
1027
|
-
`}};
|
|
1001
|
+
`}};Pe.styles=[Ee],Oe([E({type:String,reflect:!0})],Pe.prototype,"legend",2),Oe([E({type:String,attribute:"help-text",reflect:!0})],Pe.prototype,"helpText",2),Oe([E({type:String,attribute:"error-message",reflect:!0})],Pe.prototype,"errorMessage",2),Oe([E({type:Boolean,attribute:"readonly",reflect:!0})],Pe.prototype,"readOnly",2),Oe([E({type:Boolean,reflect:!0})],Pe.prototype,"disabled",2),Oe([E({type:String,reflect:!0})],Pe.prototype,"size",2),Oe([A()],Pe.prototype,"_selectedValues",2),Oe([O("slot")],Pe.prototype,"_slotElement",2),Pe=Oe([P("sds-checkbox-group")],Pe);const De=l`
|
|
1028
1002
|
:host {
|
|
1029
1003
|
--_sds-chip-font-family: var(--sds-chip-font-family, var(--sds-typography-font-family-roboto));
|
|
1030
1004
|
--_sds-chip-font-weight: var(--sds-chip-font-weight, var(--sds-typography-font-weight-regular));
|
|
@@ -1169,16 +1143,16 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
1169
1143
|
white-space: nowrap;
|
|
1170
1144
|
}
|
|
1171
1145
|
}
|
|
1172
|
-
`;var
|
|
1146
|
+
`;var Me=Object.defineProperty,qe=Object.getOwnPropertyDescriptor,Re=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?qe(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 Ve=class extends(ee(Et(re(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)}set readonly(t){this.readOnly=t}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?tt`<button class="${Jt(e)}" @click=${this._remove} @keyup="${this._keypress}">
|
|
1173
1147
|
<slot></slot>
|
|
1174
1148
|
<sds-icon name="close-material-outlined" size="s"></sds-icon>
|
|
1175
|
-
</button>`:
|
|
1149
|
+
</button>`:tt`<label class="${Jt(e)}">
|
|
1176
1150
|
<input
|
|
1177
1151
|
id="control"
|
|
1178
1152
|
type="checkbox"
|
|
1179
1153
|
aria-label="${this._slotLabel}"
|
|
1180
|
-
name="${
|
|
1181
|
-
value="${
|
|
1154
|
+
name="${Dt(this.name)}"
|
|
1155
|
+
value="${Dt(this.value)}"
|
|
1182
1156
|
.checked="${this.checked??!1}"
|
|
1183
1157
|
?checked="${this.checked}"
|
|
1184
1158
|
?disabled="${this.disabled}"
|
|
@@ -1186,7 +1160,7 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
1186
1160
|
@change="${this._handleChange}"
|
|
1187
1161
|
/>
|
|
1188
1162
|
<span aria-hidden="true"><slot @slotchange="${this._handleSlotChange}"></slot></span>
|
|
1189
|
-
</label>`}};
|
|
1163
|
+
</label>`}};Ve.styles=[De],Re([O("#control")],Ve.prototype,"control",2),Re([A()],Ve.prototype,"_slotLabel",2),Re([E({type:String,reflect:!0})],Ve.prototype,"variant",2),Re([E({type:String,reflect:!0})],Ve.prototype,"size",2),Re([E({type:Boolean,reflect:!0})],Ve.prototype,"checked",2),Re([E({type:String})],Ve.prototype,"value",2),Re([E({type:Boolean,attribute:"readonly",reflect:!0})],Ve.prototype,"readOnly",1),Ve=Re([P("sds-chip")],Ve);const Be=l`
|
|
1190
1164
|
:host {
|
|
1191
1165
|
--_sds-details-text-color: var(--sds-details-text-color, var(--sds-color-text-default, var(--sds-color-main-text-default)));
|
|
1192
1166
|
|
|
@@ -1199,9 +1173,9 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
1199
1173
|
--_sds-details-content-padding: var(--sds-details-content-padding, var(--sds-spacing-xs));
|
|
1200
1174
|
--_sds-details-content-background-color: var(--sds-details-background-color, var(--sds-color-surface-default, var(--sds-color-main-surface-default)));
|
|
1201
1175
|
|
|
1202
|
-
--_sds-details-focus-outline-
|
|
1203
|
-
--_sds-details-focus-
|
|
1204
|
-
--_sds-details-focus-
|
|
1176
|
+
--_sds-details-focus-outline-size: var(--sds-details-focus-outline-size, var(--sds-details-focus-outline-width, var(--sds-color-states-focus-outline-size)));
|
|
1177
|
+
--_sds-details-focus-color: var(--sds-details-focus-color, var(--sds-details-focus-outline-color, var(--sds-color-states-focus-outer)));
|
|
1178
|
+
--_sds-details-focus-spacing: var(--sds-details-focus-spacing, var(--sds-details-focus-outline-offset, var(--sds-color-states-focus-spacing)));
|
|
1205
1179
|
--_sds-details-focus-inner-color: var(--sds-details-focus-inner-color, var(--sds-color-states-focus-inner));
|
|
1206
1180
|
|
|
1207
1181
|
--_sds-details-icon-transition: var(--sds-details-icon-transition, transform 0.2s ease);
|
|
@@ -1277,9 +1251,9 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
1277
1251
|
}
|
|
1278
1252
|
|
|
1279
1253
|
&:focus-visible {
|
|
1280
|
-
box-shadow: 0 0 0 var(--
|
|
1281
|
-
outline: var(--_sds-details-focus-outline-
|
|
1282
|
-
outline-offset: var(--_sds-details-focus-
|
|
1254
|
+
box-shadow: 0 0 0 var(--_sds-details-focus-spacing) var(--_sds-details-focus-inner-color);
|
|
1255
|
+
outline: var(--_sds-details-focus-outline-size) solid var(--_sds-details-focus-color);
|
|
1256
|
+
outline-offset: var(--_sds-details-focus-spacing);
|
|
1283
1257
|
}
|
|
1284
1258
|
}
|
|
1285
1259
|
|
|
@@ -1322,7 +1296,7 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
1322
1296
|
display: inline;
|
|
1323
1297
|
margin: 0;
|
|
1324
1298
|
}
|
|
1325
|
-
`;var
|
|
1299
|
+
`;var He=Object.defineProperty,je=Object.getOwnPropertyDescriptor,Fe=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?je(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&&He(e,s,a),a};let Ie=class extends(Et(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 tt`
|
|
1326
1300
|
<details class="sds-details" .name="${this.name??""}" ?data-standalone="${this.standalone}" ?open="${this.open}" @toggle="${this._handleToggle}">
|
|
1327
1301
|
<summary class="sds-details__summary">
|
|
1328
1302
|
<sds-icon name="chevron_up-material-filled" role="presentation"></sds-icon>
|
|
@@ -1334,7 +1308,7 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
1334
1308
|
<slot></slot>
|
|
1335
1309
|
</div>
|
|
1336
1310
|
</details>
|
|
1337
|
-
`}};
|
|
1311
|
+
`}};Ie.styles=[Be],Fe([E({type:Boolean,reflect:!0})],Ie.prototype,"open",2),Fe([E({type:Boolean,reflect:!0})],Ie.prototype,"standalone",2),Fe([E({type:String,reflect:!0})],Ie.prototype,"name",2),Ie=Fe([P("sds-details")],Ie);const Ne=l`
|
|
1338
1312
|
:host {
|
|
1339
1313
|
display: block;
|
|
1340
1314
|
}
|
|
@@ -1361,7 +1335,138 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
1361
1335
|
:host([outlined]) div ::slotted(sds-details:last-child[open]) {
|
|
1362
1336
|
--sds-details-summary-border-radius: 0;
|
|
1363
1337
|
}
|
|
1364
|
-
`;var
|
|
1338
|
+
`;var Ue=Object.defineProperty,We=Object.getOwnPropertyDescriptor,Ke=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?We(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&&Ue(e,s,a),a};let Ge=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 tt`<div><slot @slotchange="${this._handleSlotChange}"></slot></div>`}};Ge.styles=[Ne],Ke([E({type:Boolean,reflect:!0})],Ge.prototype,"outlined",2),Ke([E({type:String,reflect:!0})],Ge.prototype,"name",2),Ke([T({selector:"sds-details"})],Ge.prototype,"_detailsChildren",2),Ge=Ke([P("sds-details-group")],Ge);const Ye=l`
|
|
1339
|
+
:host {
|
|
1340
|
+
--_sds-dialog-background-color: var(--sds-dialog-background-color, var(--sds-color-surface-default, var(--sds-color-main-surface-default)));
|
|
1341
|
+
--_sds-dialog-backdrop-color: var(--sds-dialog-backdrop-color, rgba(0, 0, 0, 0.5));
|
|
1342
|
+
|
|
1343
|
+
--_sds-dialog-border-color: var(--sds-dialog-border-color, var(--sds-color-border-subtle, var(--sds-color-main-border-subtle)));
|
|
1344
|
+
--_sds-dialog-border-radius: var(--sds-dialog-border-radius, var(--sds-radius-md));
|
|
1345
|
+
--_sds-dialog-border-width: var(--sds-dialog-border-width, var(--sds-border-sm));
|
|
1346
|
+
|
|
1347
|
+
--_sds-dialog-max-width: var(--sds-dialog-max-width, min(60ch, 100vw));
|
|
1348
|
+
--_sds-dialog-max-height: var(--sds-dialog-max-height, calc(100dvh - var(--sds-spacing-lg)));
|
|
1349
|
+
|
|
1350
|
+
--_sds-dialog-margin: var(--sds-dialog-margin, auto);
|
|
1351
|
+
--_sds-dialog-padding-block: var(--sds-dialog-padding-block, var(--sds-spacing-sm));
|
|
1352
|
+
--_sds-dialog-padding-inline: var(--sds-dialog-padding-inline, var(--sds-spacing-sm));
|
|
1353
|
+
--_sds-dialog-gap: var(--sds-dialog-gap, var(--sds-spacing-xs));
|
|
1354
|
+
|
|
1355
|
+
--_sds-dialog-font-family: var(--sds-dialog-font-family, var(--sds-typography-font-family-roboto));
|
|
1356
|
+
--_sds-dialog-text-color: var(--sds-dialog-text-color, var(--sds-color-text-default, var(--sds-color-main-text-default)));
|
|
1357
|
+
|
|
1358
|
+
--_sds-dialog-box-shadow: var(--sds-dialog-box-shadow, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
|
|
1359
|
+
|
|
1360
|
+
--_sds-dialog-animation-duration: var(--sds-dialog-animation-duration, 200ms);
|
|
1361
|
+
--_sds-dialog-close-button-offset: var(--sds-dialog-close-button-offset, var(--sds-spacing-3xs));
|
|
1362
|
+
|
|
1363
|
+
--_sds-dialog-focus-color: var(--sds-dialog-focus-color, var(--sds-color-states-focus-outer));
|
|
1364
|
+
--_sds-dialog-focus-inner-color: var(--sds-dialog-focus-inner-color, var(--sds-color-states-focus-inner));
|
|
1365
|
+
--_sds-dialog-focus-spacing: var(--sds-dialog-focus-spacing, var(--sds-color-states-focus-spacing));
|
|
1366
|
+
--_sds-dialog-focus-outline-size: var(--sds-dialog-focus-outline-size, var(--sds-color-states-focus-outline-size));
|
|
1367
|
+
|
|
1368
|
+
display: contents;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
dialog {
|
|
1372
|
+
color: var(--_sds-dialog-text-color);
|
|
1373
|
+
background-color: var(--_sds-dialog-background-color);
|
|
1374
|
+
box-shadow: var(--_sds-dialog-box-shadow);
|
|
1375
|
+
|
|
1376
|
+
border: var(--_sds-dialog-border-width) solid var(--_sds-dialog-border-color);
|
|
1377
|
+
border-radius: var(--_sds-dialog-border-radius);
|
|
1378
|
+
|
|
1379
|
+
font-family: var(--_sds-dialog-font-family);
|
|
1380
|
+
|
|
1381
|
+
max-width: var(--_sds-dialog-max-width);
|
|
1382
|
+
max-height: var(--_sds-dialog-max-height);
|
|
1383
|
+
|
|
1384
|
+
overflow: auto;
|
|
1385
|
+
padding: 0;
|
|
1386
|
+
|
|
1387
|
+
opacity: 0;
|
|
1388
|
+
transform: translateY(-1rem);
|
|
1389
|
+
animation: sds-dialog-fade-in var(--_sds-dialog-animation-duration) ease-out forwards;
|
|
1390
|
+
|
|
1391
|
+
&:focus-visible {
|
|
1392
|
+
box-shadow: 0 0 0 var(--_sds-dialog-focus-spacing) var(--_sds-dialog-focus-inner-color);
|
|
1393
|
+
outline: var(--_sds-dialog-focus-outline-size) solid var(--_sds-dialog-focus-color);
|
|
1394
|
+
outline-offset: var(--_sds-dialog-focus-spacing);
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
&[open] {
|
|
1398
|
+
display: flex;
|
|
1399
|
+
flex-direction: column;
|
|
1400
|
+
margin: var(--_sds-dialog-margin);
|
|
1401
|
+
padding-block: var(--_sds-dialog-padding-block);
|
|
1402
|
+
padding-inline: var(--_sds-dialog-padding-inline);
|
|
1403
|
+
gap: var(--_sds-dialog-gap);
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
&.sds-dialog__empty-header:has(.sds-dialog__close-button) {
|
|
1407
|
+
/* Set padding right to avoid overflowing the close button */
|
|
1408
|
+
padding-right: var(--sds-dialog-padding-right, var(--sds-spacing-lg));
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
&::backdrop {
|
|
1412
|
+
background-color: var(--_sds-dialog-backdrop-color);
|
|
1413
|
+
/* @keyframes does not work for ::backdrop in Firefox, so use transition instead */
|
|
1414
|
+
transition: opacity var(--_sds-dialog-animation-duration) ease-out;
|
|
1415
|
+
opacity: 0;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
&[open]::backdrop {
|
|
1419
|
+
opacity: 1;
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
@keyframes sds-dialog-fade-in {
|
|
1424
|
+
to {
|
|
1425
|
+
opacity: 1;
|
|
1426
|
+
transform: translateY(0);
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
.sds-dialog__close-button {
|
|
1431
|
+
--sds-button-text-color: var(--sds-dialog-close-button-color, var(--sds-color-text-subtle, var(--sds-color-main-text-subtle)));
|
|
1432
|
+
--sds-button-padding-inline: 0;
|
|
1433
|
+
|
|
1434
|
+
position: absolute;
|
|
1435
|
+
top: var(--_sds-dialog-close-button-offset);
|
|
1436
|
+
right: var(--_sds-dialog-close-button-offset);
|
|
1437
|
+
z-index: 1;
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
.sds-dialog__header {
|
|
1441
|
+
margin-right: var(--sds-spacing-lg);
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
@media (max-width: 640px) {
|
|
1445
|
+
:host {
|
|
1446
|
+
--_sds-dialog-max-width: var(--sds-dialog-max-width, 100%);
|
|
1447
|
+
--_sds-dialog-margin: var(--sds-dialog-margin, var(--sds-spacing-xs));
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1452
|
+
:host {
|
|
1453
|
+
--_sds-dialog-animation-duration: 0ms;
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
`;var Xe=Object.defineProperty,Ze=(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&&Xe(e,s,a),a};let Qe=!1;const Je=class extends(Et(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||Qe||(Qe=!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 tt`
|
|
1457
|
+
<dialog .closedBy="${this.closedby}" class=${this._isHeaderSlotEmpty?"sds-dialog__empty-header":""}>
|
|
1458
|
+
<div class="sds-dialog__header">
|
|
1459
|
+
<slot name="header" @slotchange=${this._handleHeaderSlotChange}></slot>
|
|
1460
|
+
${this.closeButtonLabel?tt`
|
|
1461
|
+
<sds-button class="sds-dialog__close-button" icon variant="tertiary" size="md" command="close" label="${this.closeButtonLabel}">
|
|
1462
|
+
<sds-icon name="close-material-outlined" size="md"></sds-icon>
|
|
1463
|
+
</sds-button>
|
|
1464
|
+
`:st}
|
|
1465
|
+
</div>
|
|
1466
|
+
<slot></slot>
|
|
1467
|
+
<slot name="footer"></slot>
|
|
1468
|
+
</dialog>
|
|
1469
|
+
`}};Je.styles=[Ye];let ts=Je;Ze([E({type:Boolean,reflect:!0})],ts.prototype,"open"),Ze([E({type:Boolean,reflect:!0})],ts.prototype,"modal"),Ze([E({type:String,reflect:!0})],ts.prototype,"closedby"),Ze([E({type:String,attribute:"close-button-label"})],ts.prototype,"closeButtonLabel"),Ze([O("dialog")],ts.prototype,"_dialog"),Ze([A()],ts.prototype,"_isHeaderSlotEmpty");var es=Object.getOwnPropertyDescriptor;let ss=class extends ts{};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=r(a)||a);return a})([P("sds-dialog")],ss);const os=l`
|
|
1365
1470
|
:host {
|
|
1366
1471
|
--_sds-heading-font-family: var(--sds-heading-font-family, var(--sds-typography-font-family-roboto));
|
|
1367
1472
|
--_sds-heading-text-color: var(--sds-heading-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
|
|
@@ -1520,7 +1625,7 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
1520
1625
|
--_sds-heading-line-height: var(--sds-heading-line-height, var(--sds-typography-heading-xs-desktop-line-height));
|
|
1521
1626
|
}
|
|
1522
1627
|
}
|
|
1523
|
-
`;var
|
|
1628
|
+
`;var rs=Object.defineProperty,as=(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&&rs(e,s,a),a};const is=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 tt`<h1 class=${Jt(t)}><slot></slot></h1>`;case"h2":return tt`<h2 class=${Jt(t)}><slot></slot></h2>`;case"h3":return tt`<h3 class=${Jt(t)}><slot></slot></h3>`;case"h4":return tt`<h4 class=${Jt(t)}><slot></slot></h4>`;case"h5":return tt`<h5 class=${Jt(t)}><slot></slot></h5>`;case"h6":return tt`<h6 class=${Jt(t)}><slot></slot></h6>`}}};is.styles=[os];let ds=is;as([E({type:String,reflect:!0})],ds.prototype,"level"),as([E({type:String,reflect:!0})],ds.prototype,"size");var ns=Object.getOwnPropertyDescriptor;let ls=class extends ds{};ls=((t,e,s,o)=>{for(var r,a=o>1?void 0:o?ns(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(a)||a);return a})([P("sds-heading")],ls);const cs=l`
|
|
1524
1629
|
:host {
|
|
1525
1630
|
--_sds-loader-main-color: var(--sds-loader-main-color, var(--sds-color-action-contrast-default, var(--sds-color-main-action-contrast-default)));
|
|
1526
1631
|
--_sds-loader-secondary-color: var(--sds-loader-secondary-color, var(--sds-color-border-subtle, var(--sds-color-main-border-subtle)));
|
|
@@ -1596,10 +1701,10 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
1596
1701
|
stroke-dashoffset: -120px;
|
|
1597
1702
|
}
|
|
1598
1703
|
}
|
|
1599
|
-
`;var
|
|
1704
|
+
`;var hs=Object.defineProperty,ps=Object.getOwnPropertyDescriptor,gs=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?ps(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&&hs(e,s,a),a};let us=class extends mt{constructor(){super(...arguments),this.size="md",this.contrast=!1}render(){return tt`<svg aria-label="Laster" class="sds-loader" role="img" viewBox="0 0 50 50">
|
|
1600
1705
|
<circle class="sds-loader__background" cx="25" cy="25" r="20" fill="none" stroke-width="7"></circle>
|
|
1601
1706
|
<circle class="sds-loader__circle" cx="25" cy="25" r="20" fill="none" stroke-width="7"></circle>
|
|
1602
|
-
</svg>`}};
|
|
1707
|
+
</svg>`}};us.styles=[cs],gs([E({type:String,reflect:!0})],us.prototype,"size",2),gs([E({type:Boolean,reflect:!0})],us.prototype,"contrast",2),us=gs([P("sds-loader")],us);const vs=l`
|
|
1603
1708
|
:host {
|
|
1604
1709
|
--_sds-notification-background-color: var(--sds-notification-background-color, var(--sds-color-alert-info-surface-tinted));
|
|
1605
1710
|
|
|
@@ -1736,25 +1841,25 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
1736
1841
|
margin: 0 !important;
|
|
1737
1842
|
max-width: var(--_sds-notification-max-line-width) !important;
|
|
1738
1843
|
}
|
|
1739
|
-
`;var
|
|
1844
|
+
`;var fs=Object.defineProperty,bs=Object.getOwnPropertyDescriptor,ms=(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=(o?r(e,s,a):r(a))||a);return o&&a&&fs(e,s,a),a};const _s={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 xs=!1,ys=class extends(Et(mt)){constructor(){super(),this.variant="info",this._remove=()=>{this.dispatchSheriffEvent("sds-remove")},xs||(xs=!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 tt`<div class="${Jt({"sds-notification":!0})}">
|
|
1740
1845
|
<div class="sds-notification__type">
|
|
1741
|
-
<sds-icon class="sds-notification__icon" name="${
|
|
1846
|
+
<sds-icon class="sds-notification__icon" name="${_s[this.variant]}" size="md"></sds-icon>
|
|
1742
1847
|
</div>
|
|
1743
1848
|
<div class="sds-notification__content">
|
|
1744
1849
|
<slot name="title"></slot>
|
|
1745
1850
|
<slot name="message"></slot>
|
|
1746
1851
|
</div>
|
|
1747
|
-
${this.removableLabel?
|
|
1852
|
+
${this.removableLabel?tt`<div class="sds-notification__actions">
|
|
1748
1853
|
<sds-button icon variant="tertiary" color="${t}" size="sm" @click=${this._remove} aria-label="${this.removableLabel}">
|
|
1749
1854
|
<sds-icon name="close-material-outlined" size="sm"></sds-icon>
|
|
1750
1855
|
</sds-button>
|
|
1751
|
-
</div>`:
|
|
1752
|
-
</div>`}};
|
|
1856
|
+
</div>`:st}
|
|
1857
|
+
</div>`}};ys.styles=[vs],ms([E({type:String,reflect:!0})],ys.prototype,"variant",2),ms([E({type:String,attribute:"removable-label",reflect:!0})],ys.prototype,"removableLabel",2),ys=ms([P("sds-notification")],ys);const ws=l`
|
|
1753
1858
|
:host {
|
|
1754
1859
|
display: flex;
|
|
1755
1860
|
flex-direction: column;
|
|
1756
1861
|
}
|
|
1757
|
-
`;var
|
|
1862
|
+
`;var ks=Object.defineProperty,zs=Object.getOwnPropertyDescriptor,$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=(o?r(e,s,a):r(a))||a);return o&&a&&ks(e,s,a),a};let Ss=class extends mt{constructor(){super(),this.internals=this.attachInternals(),this.internals.role="list"}render(){return tt`<slot></slot>`}};Ss.styles=[ws],$s([E({type:String,reflect:!0,attribute:"heading-level"})],Ss.prototype,"headingLevel",2),Ss=$s([P("sds-process")],Ss);const Cs=l`
|
|
1758
1863
|
:host {
|
|
1759
1864
|
--_sds-process-step-border-width: var(--sds-process-step-border-width, 2px);
|
|
1760
1865
|
--_sds-process-step-border-color: var(--sds-process-step-border-color, var(--sds-color-action-default, var(--sds-color-main-action-default)));
|
|
@@ -1898,22 +2003,22 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
1898
2003
|
:host(:last-of-type) {
|
|
1899
2004
|
--_sds-process-step-line-display: none;
|
|
1900
2005
|
}
|
|
1901
|
-
`;var
|
|
2006
|
+
`;var Es=Object.defineProperty,As=Object.getOwnPropertyDescriptor,Ls=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?As(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&&Es(e,s,a),a};let Os=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`
|
|
1902
2007
|
<div class="sds-process-step">
|
|
1903
2008
|
<div class="sds-process-step__item">
|
|
1904
2009
|
<div class="sds-process-step__marker" aria-hidden="true">
|
|
1905
2010
|
<slot name="marker" @slotchange=${this._handleMarkerSlotChange}></slot>
|
|
1906
2011
|
</div>
|
|
1907
2012
|
<div class="sds-process-step__content">
|
|
1908
|
-
${this.heading
|
|
1909
|
-
${this.timestamp
|
|
2013
|
+
${this.heading?$t`<${wt(this.safeHeadingLevel)} class="sds-process-step__heading">${this.heading}</${wt(this.safeHeadingLevel)}>`:st}
|
|
2014
|
+
${this.timestamp?$t`<div class="sds-process-step__timestamp">${this.timestamp}</div>`:st}
|
|
1910
2015
|
<div class="sds-process-step__slot-content"><slot></slot></div>
|
|
1911
2016
|
</div>
|
|
1912
2017
|
</div>
|
|
1913
2018
|
<span class="sds-process-step__line"></span>
|
|
1914
2019
|
</div>
|
|
1915
|
-
`}};
|
|
1916
|
-
${
|
|
2020
|
+
`}};Os.styles=[Cs],Ls([E({type:String,reflect:!0})],Os.prototype,"heading",2),Ls([E({type:String,reflect:!0})],Os.prototype,"timestamp",2),Ls([O('slot[name="marker"]')],Os.prototype,"markerSlot",2),Ls([O(".sds-process-step")],Os.prototype,"step",2),Os=Ls([P("sds-process-step")],Os);const Ts=l`
|
|
2021
|
+
${n(':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: }')}
|
|
1917
2022
|
|
|
1918
2023
|
:host {
|
|
1919
2024
|
--dsc-popover-background: var(--sds-popover-background-color, var(--sds-color-surface-default, var(--sds-color-main-surface-default)));
|
|
@@ -1960,7 +2065,7 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
1960
2065
|
animation: none;
|
|
1961
2066
|
}
|
|
1962
2067
|
}
|
|
1963
|
-
`,Os={passive:!0,capture:!0},Ls=(t,e,s)=>void 0===s?t.getAttribute(e)??null:(null===s?t.removeAttribute(e):t.getAttribute(e)!==s&&t.setAttribute(e,s),null),Ps=(t,e)=>getComputedStyle(t).getPropertyValue(e).trim(),Ds=(t,...e)=>{let[s,...o]=e;for(let r of s.split(" "))t.addEventListener(r,...o);return()=>Ts(t,...e)},Ts=(t,...e)=>{let[s,...o]=e;for(let r of s.split(" "))t.removeEventListener(r,...o)},qs=(t,e)=>{typeof window<"u"&&typeof document<"u"&&(window._dsHotReloadCleanup||(window._dsHotReloadCleanup=/* @__PURE__ */new Map),window._dsHotReloadCleanup?.get(t)?.map(t=>t()),window._dsHotReloadCleanup?.set(t,e()))};let Ms;const Rs=()=>{"complete"===document.readyState&&(Ms||(Ms=((t,e)=>{let s=document.createElement("div");if(e)for(let[o,r]of Object.entries(e))Ls(s,o,r);return s})(0,{"aria-live":"assertive"}),Ms.style.overflow="hidden",Ms.style.position="fixed",Ms.style.whiteSpace="nowrap",Ms.style.width="1px"),Ms.isConnected||document.body.appendChild(Ms))};qs("announce",()=>[Ds(document,"focus mouseover",Rs,Os)]);const Vs=Math.min,Bs=Math.max,js=Math.round,Fs=Math.floor,Is=t=>({x:t,y:t}),Hs={left:"right",right:"left",bottom:"top",top:"bottom"};function Ns(t,e,s){return Bs(t,Vs(e,s))}function Us(t,e){return"function"==typeof t?t(e):t}function Ws(t){return t.split("-")[0]}function Ks(t){return t.split("-")[1]}function Gs(t){return"x"===t?"y":"x"}function Ys(t){return"y"===t?"height":"width"}function Xs(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function Zs(t){return Gs(Xs(t))}function Qs(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Js=["left","right"],to=["right","left"],eo=["top","bottom"],so=["bottom","top"];function oo(t){const e=Ws(t);return Hs[e]+t.slice(e.length)}function ro(t){const{x:e,y:s,width:o,height:r}=t;return{width:o,height:r,top:s,left:e,right:e+o,bottom:s+r,x:e,y:s}}function ao(t,e,s){let{reference:o,floating:r}=t;const a=Xs(e),i=Zs(e),d=Ys(i),n=Ws(e),l="y"===a,c=o.x+o.width/2-r.width/2,h=o.y+o.height/2-r.height/2,p=o[d]/2-r[d]/2;let g;switch(n){case"top":g={x:c,y:o.y-r.height};break;case"bottom":g={x:c,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:h};break;case"left":g={x:o.x-r.width,y:h};break;default:g={x:o.x,y:o.y}}switch(Ks(e)){case"start":g[i]-=p*(s&&l?-1:1);break;case"end":g[i]+=p*(s&&l?-1:1)}return g}async function io(t,e){var s;void 0===e&&(e={});const{x:o,y:r,platform:a,rects:i,elements:d,strategy:n}=t,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:p=!1,padding:g=0}=Us(e,t),v="number"!=typeof(y=g)?(w=y,{top:0,right:0,bottom:0,left:0,...w}):{top:y,right:y,bottom:y,left:y},u=d[p?"floating"===h?"reference":"floating":h],f=ro(await a.getClippingRect({element:null==(s=await(null==a.isElement?void 0:a.isElement(u)))||s?u:u.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(d.floating)),boundary:l,rootBoundary:c,strategy:n})),b="floating"===h?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,m=await(null==a.getOffsetParent?void 0:a.getOffsetParent(d.floating)),_=await(null==a.isElement?void 0:a.isElement(m))&&await(null==a.getScale?void 0:a.getScale(m))||{x:1,y:1},x=ro(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:b,offsetParent:m,strategy:n}):b);var y,w;return{top:(f.top-x.top+v.top)/_.y,bottom:(x.bottom-f.bottom+v.bottom)/_.y,left:(f.left-x.left+v.left)/_.x,right:(x.right-f.right+v.right)/_.x}}const no=/* @__PURE__ */new Set(["left","top"]);function lo(){return"undefined"!=typeof window}function co(t){return go(t)?(t.nodeName||"").toLowerCase():"#document"}function ho(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function po(t){var e;return null==(e=(go(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function go(t){return!!lo()&&(t instanceof Node||t instanceof ho(t).Node)}function vo(t){return!!lo()&&(t instanceof Element||t instanceof ho(t).Element)}function uo(t){return!!lo()&&(t instanceof HTMLElement||t instanceof ho(t).HTMLElement)}function fo(t){return!(!lo()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof ho(t).ShadowRoot)}function bo(t){const{overflow:e,overflowX:s,overflowY:o,display:r}=Co(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+s)&&"inline"!==r&&"contents"!==r}function mo(t){return/^(table|td|th)$/.test(co(t))}function _o(t){try{if(t.matches(":popover-open"))return!0}catch(e){}try{return t.matches(":modal")}catch(e){return!1}}const xo=/transform|translate|scale|rotate|perspective|filter/,yo=/paint|layout|strict|content/,wo=t=>!!t&&"none"!==t;let ko;function zo(t){const e=vo(t)?Co(t):t;return wo(e.transform)||wo(e.translate)||wo(e.scale)||wo(e.rotate)||wo(e.perspective)||!$o()&&(wo(e.backdropFilter)||wo(e.filter))||xo.test(e.willChange||"")||yo.test(e.contain||"")}function $o(){return null==ko&&(ko="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ko}function So(t){return/^(html|body|#document)$/.test(co(t))}function Co(t){return ho(t).getComputedStyle(t)}function Eo(t){return vo(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ao(t){if("html"===co(t))return t;const e=t.assignedSlot||t.parentNode||fo(t)&&t.host||po(t);return fo(e)?e.host:e}function Oo(t){const e=Ao(t);return So(e)?t.ownerDocument?t.ownerDocument.body:t.body:uo(e)&&bo(e)?e:Oo(e)}function Lo(t,e,s){var o;void 0===e&&(e=[]),void 0===s&&(s=!0);const r=Oo(t),a=r===(null==(o=t.ownerDocument)?void 0:o.body),i=ho(r);if(a){const t=Po(i);return e.concat(i,i.visualViewport||[],bo(r)?r:[],t&&s?Lo(t):[])}return e.concat(r,Lo(r,[],s))}function Po(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Do(t){const e=Co(t);let s=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=uo(t),a=r?t.offsetWidth:s,i=r?t.offsetHeight:o,d=js(s)!==a||js(o)!==i;return d&&(s=a,o=i),{width:s,height:o,$:d}}function To(t){return vo(t)?t:t.contextElement}function qo(t){const e=To(t);if(!uo(e))return Is(1);const s=e.getBoundingClientRect(),{width:o,height:r,$:a}=Do(e);let i=(a?js(s.width):s.width)/o,d=(a?js(s.height):s.height)/r;return i&&Number.isFinite(i)||(i=1),d&&Number.isFinite(d)||(d=1),{x:i,y:d}}const Mo=Is(0);function Ro(t){const e=ho(t);return $o()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Mo}function Vo(t,e,s,o){void 0===e&&(e=!1),void 0===s&&(s=!1);const r=t.getBoundingClientRect(),a=To(t);let i=Is(1);e&&(o?vo(o)&&(i=qo(o)):i=qo(t));const d=(n=a,void 0===(l=s)&&(l=!1),!(c=o)||l&&c!==ho(n)||!l?Is(0):Ro(a));var n,l,c;let h=(r.left+d.x)/i.x,p=(r.top+d.y)/i.y,g=r.width/i.x,v=r.height/i.y;if(a){const t=ho(a),e=o&&vo(o)?ho(o):o;let s=t,r=Po(s);for(;r&&o&&e!==s;){const t=qo(r),e=r.getBoundingClientRect(),o=Co(r),a=e.left+(r.clientLeft+parseFloat(o.paddingLeft))*t.x,i=e.top+(r.clientTop+parseFloat(o.paddingTop))*t.y;h*=t.x,p*=t.y,g*=t.x,v*=t.y,h+=a,p+=i,s=ho(r),r=Po(s)}}return ro({width:g,height:v,x:h,y:p})}function Bo(t,e){const s=Eo(t).scrollLeft;return e?e.left+s:Vo(po(t)).left+s}function jo(t,e){const s=t.getBoundingClientRect();return{x:s.left+e.scrollLeft-Bo(t,s),y:s.top+e.scrollTop}}function Fo(t,e,s){let o;if("viewport"===e)o=function(t,e){const s=ho(t),o=po(t),r=s.visualViewport;let a=o.clientWidth,i=o.clientHeight,d=0,n=0;if(r){a=r.width,i=r.height;const t=$o();(!t||t&&"fixed"===e)&&(d=r.offsetLeft,n=r.offsetTop)}const l=Bo(o);if(l<=0){const t=o.ownerDocument,e=t.body,s=getComputedStyle(e),r="CSS1Compat"===t.compatMode&&parseFloat(s.marginLeft)+parseFloat(s.marginRight)||0,i=Math.abs(o.clientWidth-e.clientWidth-r);i<=25&&(a-=i)}else l<=25&&(a+=l);return{width:a,height:i,x:d,y:n}}(t,s);else if("document"===e)o=function(t){const e=po(t),s=Eo(t),o=t.ownerDocument.body,r=Bs(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),a=Bs(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let i=-s.scrollLeft+Bo(t);const d=-s.scrollTop;return"rtl"===Co(o).direction&&(i+=Bs(e.clientWidth,o.clientWidth)-r),{width:r,height:a,x:i,y:d}}(po(t));else if(vo(e))o=function(t,e){const s=Vo(t,!0,"fixed"===e),o=s.top+t.clientTop,r=s.left+t.clientLeft,a=uo(t)?qo(t):Is(1);return{width:t.clientWidth*a.x,height:t.clientHeight*a.y,x:r*a.x,y:o*a.y}}(e,s);else{const s=Ro(t);o={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return ro(o)}function Io(t,e){const s=Ao(t);return!(s===e||!vo(s)||So(s))&&("fixed"===Co(s).position||Io(s,e))}function Ho(t,e,s){const o=uo(e),r=po(e),a="fixed"===s,i=Vo(t,!0,a,e);let d={scrollLeft:0,scrollTop:0};const n=Is(0);function l(){n.x=Bo(r)}if(o||!o&&!a)if(("body"!==co(e)||bo(r))&&(d=Eo(e)),o){const t=Vo(e,!0,a,e);n.x=t.x+e.clientLeft,n.y=t.y+e.clientTop}else r&&l();a&&!o&&r&&l();const c=!r||o||a?Is(0):jo(r,d);return{x:i.left+d.scrollLeft-n.x-c.x,y:i.top+d.scrollTop-n.y-c.y,width:i.width,height:i.height}}function No(t){return"static"===Co(t).position}function Uo(t,e){if(!uo(t)||"fixed"===Co(t).position)return null;if(e)return e(t);let s=t.offsetParent;return po(t)===s&&(s=s.ownerDocument.body),s}function Wo(t,e){const s=ho(t);if(_o(t))return s;if(!uo(t)){let e=Ao(t);for(;e&&!So(e);){if(vo(e)&&!No(e))return e;e=Ao(e)}return s}let o=Uo(t,e);for(;o&&mo(o)&&No(o);)o=Uo(o,e);return o&&So(o)&&No(o)&&!zo(o)?s:o||function(t){let e=Ao(t);for(;uo(e)&&!So(e);){if(zo(e))return e;if(_o(e))return null;e=Ao(e)}return null}(t)||s}const Ko={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:s,offsetParent:o,strategy:r}=t;const a="fixed"===r,i=po(o),d=!!e&&_o(e.floating);if(o===i||d&&a)return s;let n={scrollLeft:0,scrollTop:0},l=Is(1);const c=Is(0),h=uo(o);if((h||!h&&!a)&&(("body"!==co(o)||bo(i))&&(n=Eo(o)),h)){const t=Vo(o);l=qo(o),c.x=t.x+o.clientLeft,c.y=t.y+o.clientTop}const p=!i||h||a?Is(0):jo(i,n);return{width:s.width*l.x,height:s.height*l.y,x:s.x*l.x-n.scrollLeft*l.x+c.x+p.x,y:s.y*l.y-n.scrollTop*l.y+c.y+p.y}},getDocumentElement:po,getClippingRect:function(t){let{element:e,boundary:s,rootBoundary:o,strategy:r}=t;const a=[..."clippingAncestors"===s?_o(e)?[]:function(t,e){const s=e.get(t);if(s)return s;let o=Lo(t,[],!1).filter(t=>vo(t)&&"body"!==co(t)),r=null;const a="fixed"===Co(t).position;let i=a?Ao(t):t;for(;vo(i)&&!So(i);){const e=Co(i),s=zo(i);s||"fixed"!==e.position||(r=null),(a?!s&&!r:!s&&"static"===e.position&&r&&("absolute"===r.position||"fixed"===r.position)||bo(i)&&!s&&Io(t,i))?o=o.filter(t=>t!==i):r=e,i=Ao(i)}return e.set(t,o),o}(e,this._c):[].concat(s),o],i=Fo(e,a[0],r);let d=i.top,n=i.right,l=i.bottom,c=i.left;for(let h=1;h<a.length;h++){const t=Fo(e,a[h],r);d=Bs(t.top,d),n=Vs(t.right,n),l=Vs(t.bottom,l),c=Bs(t.left,c)}return{width:n-c,height:l-d,x:c,y:d}},getOffsetParent:Wo,getElementRects:async function(t){const e=this.getOffsetParent||Wo,s=this.getDimensions,o=await s(t.floating);return{reference:Ho(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:s}=Do(t);return{width:e,height:s}},getScale:qo,isElement:vo,isRTL:function(t){return"rtl"===Co(t).direction}};function Go(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}const Yo=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var s,o;const{x:r,y:a,placement:i,middlewareData:d}=e,n=await async function(t,e){const{placement:s,platform:o,elements:r}=t,a=await(null==o.isRTL?void 0:o.isRTL(r.floating)),i=Ws(s),d=Ks(s),n="y"===Xs(s),l=no.has(i)?-1:1,c=a&&n?-1:1,h=Us(e,t);let{mainAxis:p,crossAxis:g,alignmentAxis:v}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return d&&"number"==typeof v&&(g="end"===d?-1*v:v),n?{x:g*c,y:p*l}:{x:p*l,y:g*c}}(e,t);return i===(null==(s=d.offset)?void 0:s.placement)&&null!=(o=d.arrow)&&o.alignmentOffset?{}:{x:r+n.x,y:a+n.y,data:{...n,placement:i}}}}},Xo=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:s,y:o,placement:r,platform:a}=e,{mainAxis:i=!0,crossAxis:d=!1,limiter:n={fn:t=>{let{x:e,y:s}=t;return{x:e,y:s}}},...l}=Us(t,e),c={x:s,y:o},h=await a.detectOverflow(e,l),p=Xs(Ws(r)),g=Gs(p);let v=c[g],u=c[p];if(i){const t="y"===g?"bottom":"right";v=Ns(v+h["y"===g?"top":"left"],v,v-h[t])}if(d){const t="y"===p?"bottom":"right";u=Ns(u+h["y"===p?"top":"left"],u,u-h[t])}const f=n.fn({...e,[g]:v,[p]:u});return{...f,data:{x:f.x-s,y:f.y-o,enabled:{[g]:i,[p]:d}}}}}},Zo=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var s,o;const{placement:r,middlewareData:a,rects:i,initialPlacement:d,platform:n,elements:l}=e,{mainAxis:c=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:u=!0,...f}=Us(t,e);if(null!=(s=a.arrow)&&s.alignmentOffset)return{};const b=Ws(r),m=Xs(d),_=Ws(d)===d,x=await(null==n.isRTL?void 0:n.isRTL(l.floating)),y=p||(_||!u?[oo(d)]:function(t){const e=oo(t);return[Qs(t),e,Qs(e)]}(d)),w="none"!==v;!p&&w&&y.push(...function(t,e,s,o){const r=Ks(t);let a=function(t,e,s){switch(t){case"top":case"bottom":return s?e?to:Js:e?Js:to;case"left":case"right":return e?eo:so;default:return[]}}(Ws(t),"start"===s,o);return r&&(a=a.map(t=>t+"-"+r),e&&(a=a.concat(a.map(Qs)))),a}(d,u,v,x));const k=[d,...y],z=await n.detectOverflow(e,f),$=[];let S=(null==(o=a.flip)?void 0:o.overflows)||[];if(c&&$.push(z[b]),h){const t=function(t,e,s){void 0===s&&(s=!1);const o=Ks(t),r=Zs(t),a=Ys(r);let i="x"===r?o===(s?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[a]>e.floating[a]&&(i=oo(i)),[i,oo(i)]}(r,i,x);$.push(z[t[0]],z[t[1]])}if(S=[...S,{placement:r,overflows:$}],!$.every(t=>t<=0)){var C,E;const t=((null==(C=a.flip)?void 0:C.index)||0)+1,e=k[t];if(e&&("alignment"!==h||m===Xs(e)||S.every(t=>Xs(t.placement)!==m||t.overflows[0]>0)))return{data:{index:t,overflows:S},reset:{placement:e}};let s=null==(E=S.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:E.placement;if(!s)switch(g){case"bestFit":{var A;const t=null==(A=S.filter(t=>{if(w){const e=Xs(t.placement);return e===m||"y"===e}return!0}).map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:A[0];t&&(s=t);break}case"initialPlacement":s=d}if(r!==s)return{reset:{placement:s}}}return{}}}},Qo=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var s,o;const{placement:r,rects:a,platform:i,elements:d}=e,{apply:n=()=>{},...l}=Us(t,e),c=await i.detectOverflow(e,l),h=Ws(r),p=Ks(r),g="y"===Xs(r),{width:v,height:u}=a.floating;let f,b;"top"===h||"bottom"===h?(f=h,b=p===(await(null==i.isRTL?void 0:i.isRTL(d.floating))?"start":"end")?"left":"right"):(b=h,f="end"===p?"top":"bottom");const m=u-c.top-c.bottom,_=v-c.left-c.right,x=Vs(u-c[f],m),y=Vs(v-c[b],_),w=!e.middlewareData.shift;let k=x,z=y;if(null!=(s=e.middlewareData.shift)&&s.enabled.x&&(z=_),null!=(o=e.middlewareData.shift)&&o.enabled.y&&(k=m),w&&!p){const t=Bs(c.left,0),e=Bs(c.right,0),s=Bs(c.top,0),o=Bs(c.bottom,0);g?z=v-2*(0!==t||0!==e?t+e:Bs(c.left,c.right)):k=u-2*(0!==s||0!==o?s+o:Bs(c.top,c.bottom))}await n({...e,availableWidth:z,availableHeight:k});const $=await i.getDimensions(d.floating);return v!==$.width||u!==$.height?{reset:{rects:!0}}:{}}}},Jo=function(t){return void 0===t&&(t={}),{options:t,fn(e){const{x:s,y:o,placement:r,rects:a,middlewareData:i}=e,{offset:d=0,mainAxis:n=!0,crossAxis:l=!0}=Us(t,e),c={x:s,y:o},h=Xs(r),p=Gs(h);let g=c[p],v=c[h];const u=Us(d,e),f="number"==typeof u?{mainAxis:u,crossAxis:0}:{mainAxis:0,crossAxis:0,...u};if(n){const t="y"===p?"height":"width",e=a.reference[p]-a.floating[t]+f.mainAxis,s=a.reference[p]+a.reference[t]-f.mainAxis;g<e?g=e:g>s&&(g=s)}if(l){var b,m;const t="y"===p?"width":"height",e=no.has(Ws(r)),s=a.reference[h]-a.floating[t]+(e&&(null==(b=i.offset)?void 0:b[h])||0)+(e?0:f.crossAxis),o=a.reference[h]+a.reference[t]+(e?0:(null==(m=i.offset)?void 0:m[h])||0)-(e?f.crossAxis:0);v<s?v=s:v>o&&(v=o)}return{[p]:g,[h]:v}}}},tr="data-placement",er="data-autoplacement",sr=/* @__PURE__ */new Map;function or(t){let{newState:e,oldState:s,target:o,source:r=t.detail}=t,a=o instanceof HTMLElement&&null!==Ls(o,"popover")&&Ps(o,"--_ds-floating");if(!a)return;if("closed"===e)return sr.get(o)?.();if(!r){let t=o.getRootNode(),e=`[popovertarget="${o.id}"],[commandfor="${o.id}"]`;r=o.id&&t?.querySelector?.(e)||void 0}if(!r||r===o||s&&s===e)return;let i=Ps(o,"--_ds-floating-overscroll"),d=Ls(o,tr)||Ls(r,tr)||a,n=Ls(o,er)||Ls(r,er),l=parseFloat(getComputedStyle(o,"::before").height)||0,c=d.match(/left|right/gi)?"Height":"Width",h=r[`offset${c}`]/2+l;if("none"===d)return;let p={strategy:"absolute",placement:d,middleware:[Yo(l||0),Xo({padding:10,limiter:Jo({offset:{mainAxis:h}})}),ir(),..."false"===n?[]:[Zo({padding:10,crossAxis:!1})],...i?[Qo({apply({availableHeight:t}){"fit"===i&&(o.style.width=`${r.clientWidth}px`),o.style.maxHeight=`${Math.max(50,t-20)}px`}})]:[]]},g=function(t,e,s,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:d="function"==typeof IntersectionObserver,animationFrame:n=!1}=o,l=To(t),c=r||a?[...l?Lo(l):[],...e?Lo(e):[]]:[];c.forEach(t=>{r&&t.addEventListener("scroll",s,{passive:!0}),a&&t.addEventListener("resize",s)});const h=l&&d?function(t,e){let s,o=null;const r=po(t);function a(){var t;clearTimeout(s),null==(t=o)||t.disconnect(),o=null}return function i(d,n){void 0===d&&(d=!1),void 0===n&&(n=1),a();const l=t.getBoundingClientRect(),{left:c,top:h,width:p,height:g}=l;if(d||e(),!p||!g)return;const v={rootMargin:-Fs(h)+"px "+-Fs(r.clientWidth-(c+p))+"px "+-Fs(r.clientHeight-(h+g))+"px "+-Fs(c)+"px",threshold:Bs(0,Vs(1,n))||1};let u=!0;function f(e){const o=e[0].intersectionRatio;if(o!==n){if(!u)return i();o?i(!1,o):s=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==o||Go(l,t.getBoundingClientRect())||i(),u=!1}try{o=new IntersectionObserver(f,{...v,root:r.ownerDocument})}catch(b){o=new IntersectionObserver(f,v)}o.observe(t)}(!0),a}(l,s):null;let p,g=-1,v=null;i&&(v=new ResizeObserver(t=>{let[o]=t;o&&o.target===l&&v&&e&&(v.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var t;null==(t=v)||t.observe(e)})),s()}),l&&!n&&v.observe(l),e&&v.observe(e));let u=n?Vo(t):null;return n&&function e(){const o=Vo(t);u&&!Go(u,o)&&s(),u=o,p=requestAnimationFrame(e)}(),s(),()=>{var t;c.forEach(t=>{r&&t.removeEventListener("scroll",s),a&&t.removeEventListener("resize",s)}),null==h||h(),null==(t=v)||t.disconnect(),v=null,n&&cancelAnimationFrame(p)}}(r,o,async()=>{if(!r?.isConnected)return sr.get(o)?.();let{x:t,y:e}=await((t,e,s)=>{const o=/* @__PURE__ */new Map,r={platform:Ko,...s},a={...r.platform,_c:o};return(async(t,e,s)=>{const{placement:o="bottom",strategy:r="absolute",middleware:a=[],platform:i}=s,d=i.detectOverflow?i:{...i,detectOverflow:io},n=await(null==i.isRTL?void 0:i.isRTL(e));let l=await i.getElementRects({reference:t,floating:e,strategy:r}),{x:c,y:h}=ao(l,o,n),p=o,g=0;const v={};for(let u=0;u<a.length;u++){const s=a[u];if(!s)continue;const{name:f,fn:b}=s,{x:m,y:_,data:x,reset:y}=await b({x:c,y:h,initialPlacement:o,placement:p,strategy:r,middlewareData:v,rects:l,platform:d,elements:{reference:t,floating:e}});c=null!=m?m:c,h=null!=_?_:h,v[f]={...v[f],...x},y&&g<50&&(g++,"object"==typeof y&&(y.placement&&(p=y.placement),y.rects&&(l=!0===y.rects?await i.getElementRects({reference:t,floating:e,strategy:r}):y.rects),({x:c,y:h}=ao(l,p,n))),u=-1)}return{x:c,y:h,placement:p,strategy:r,middlewareData:v}})(t,e,{...r,platform:a})})(r,o,p);o.style.translate=`${t}px ${e}px`});sr.set(o,()=>sr.delete(o)&&g())}let rr;const ar=({type:t})=>{if("mousedown"===t&&(rr=!1),"scroll"===t&&!1===rr&&(rr=!0),"mouseup"===t&&rr)for(let[e]of sr)e.showPopover()};qs("popover",()=>[Ds(document,"mousedown scroll mouseup",ar,!0),Ds(document,"toggle ds-toggle-source",or,Os)]);const ir=()=>({name:"arrowPseudo",fn(t){let e=t.elements.floating,s=t.rects.reference,o=`${Math.round(s.width/2+s.x-t.x)}px`,r=`${Math.round(s.height/2+s.y-t.y)}px`;return e.style.setProperty("--_ds-floating-arrow-x",o),e.style.setProperty("--_ds-floating-arrow-y",r),Ls(e,"data-floating",t.placement),t}});var dr=Object.defineProperty,nr=Object.getOwnPropertyDescriptor,lr=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?nr(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&&dr(e,s,a),a};let cr=class extends ft{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 Q`<slot></slot>`}};cr.styles=[As],lr([S({type:String,reflect:!0})],cr.prototype,"placement",2),lr([S({type:String,reflect:!0})],cr.prototype,"autoPlacement",2),lr([S({type:String,reflect:!0})],cr.prototype,"overscroll",2),cr=lr([L("sds-popover")],cr);const hr=d`
|
|
2068
|
+
`,Ps={passive:!0,capture:!0},Ds=()=>typeof window<"u"&&typeof document<"u",Ms=(t,e,s)=>void 0===s?t.getAttribute(e)??null:(null===s?t.removeAttribute(e):t.getAttribute(e)!==s&&t.setAttribute(e,s),null),qs=(t,e)=>getComputedStyle(t).getPropertyValue(e).trim(),Rs=(t,...e)=>{let[s,...o]=e;for(let r of s.split(" "))t.addEventListener(r,...o);return()=>Vs(t,...e)},Vs=(t,...e)=>{let[s,...o]=e;for(let r of s.split(" "))t.removeEventListener(r,...o)},Bs=(t,e)=>{Ds()&&(window._dsHotReloadCleanup||(window._dsHotReloadCleanup=/* @__PURE__ */new Map),window._dsHotReloadCleanup?.get(t)?.map(t=>t()),window._dsHotReloadCleanup?.set(t,e()))};let Hs;const js=()=>{"complete"===document.readyState&&(Hs||(Hs=((t,e)=>{let s=document.createElement("div");if(e)for(let[o,r]of Object.entries(e))Ms(s,o,r);return s})(0,{"aria-live":"assertive"}),Hs.style.overflow="hidden",Hs.style.position="fixed",Hs.style.whiteSpace="nowrap",Hs.style.width="1px"),Hs.isConnected||document.body.appendChild(Hs))};Bs("announce",()=>[Rs(document,"focus mouseover",js,Ps)]);var Fs=class extends Event{constructor(t,{oldState:e="",newState:o="",...r}={}){super(t,r),s(this,"oldState"),s(this,"newState"),this.oldState=String(e||""),this.newState=String(o||"")}},Is=/* @__PURE__ */new WeakMap;function Ns(t,e,s){Is.set(t,setTimeout(()=>{Is.has(t)&&t.dispatchEvent(new Fs("toggle",{cancelable:!1,oldState:e,newState:s}))},0))}var Us=globalThis.ShadowRoot||function(){},Ws=globalThis.HTMLDialogElement||function(){},Ks=/* @__PURE__ */new WeakMap,Gs=/* @__PURE__ */new WeakMap,Ys=/* @__PURE__ */new WeakMap,Xs=/* @__PURE__ */new WeakMap;function Zs(t){return Xs.get(t)||"hidden"}var Qs=/* @__PURE__ */new WeakMap;function Js(t){return[...t].pop()}function to(t,e){return!("auto"!==t.popover&&"manual"!==t.popover&&"hint"!==t.popover||!t.isConnected||e&&"showing"!==Zs(t)||!e&&"hidden"!==Zs(t)||t instanceof Ws&&t.hasAttribute("open")||document.fullscreenElement===t)}function eo(t){if(!t)return 0;let e=Gs.get(document)||/* @__PURE__ */new Set,s=Ys.get(document)||/* @__PURE__ */new Set;return s.has(t)?[...s].indexOf(t)+e.size+1:e.has(t)?[...e].indexOf(t)+1:0}function so(t){let e,s=Ys.get(t)||/* @__PURE__ */new Set,o=Gs.get(t)||/* @__PURE__ */new Set,r=s.size>0?s:o.size>0?o:null;return r?(e=Js(r),e.isConnected?e:(r.delete(e),so(t))):null}function oo(t){for(let e of t||[]){if(e.isConnected)return e;t.delete(e)}return null}function ro(t){return"function"==typeof t.getRootNode?t.getRootNode():t.parentNode?ro(t.parentNode):t}function ao(t){for(;t;){if(t instanceof HTMLElement&&"auto"===t.popover&&"showing"===Xs.get(t))return t;if((t=t instanceof Element&&t.assignedSlot||t.parentElement||ro(t))instanceof Us&&(t=t.host),t instanceof Document)return}}function io(t,e){let s=/* @__PURE__ */new Map,o=0;for(let a of e||[])s.set(a,o),o+=1;s.set(t,o),o+=1;let r=null;return function(e){if(!e)return;let o=!1,a=null,i=null;for(;!o;){if(a=ao(e)||null,null===a||!s.has(a))return;("hint"===t.popover||"auto"===a.popover)&&(o=!0),o||(e=a.parentElement)}i=s.get(a),(null===r||s.get(r)<i)&&(r=a)}(t.parentElement||ro(t)),r}function no(t){return!(t.hidden||t instanceof Us||(t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLOptGroupElement||t instanceof HTMLOptionElement||t instanceof HTMLFieldSetElement)&&t.disabled||t instanceof HTMLInputElement&&"hidden"===t.type||t instanceof HTMLAnchorElement&&""===t.href)&&"number"==typeof t.tabIndex&&-1!==t.tabIndex}var lo=/* @__PURE__ */new WeakMap;function co(t){if(!to(t,!1))return;let e=t.ownerDocument;if(!t.dispatchEvent(new Fs("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"}))||!to(t,!1))return;let s=!1,o=t.popover,r=null,a=io(t,Gs.get(e)||/* @__PURE__ */new Set),i=io(t,Ys.get(e)||/* @__PURE__ */new Set);if("auto"===o&&(po(Ys.get(e)||/* @__PURE__ */new Set,s,!0),uo(a||e,s,!0),r="auto"),"hint"===o&&(i?(uo(i,s,!0),r="hint"):(po(Ys.get(e)||/* @__PURE__ */new Set,s,!0),a?(uo(a,s,!0),r="auto"):r="hint")),"auto"===o||"hint"===o){if(o!==t.popover||!to(t,!1))return;so(e)||(s=!0),"auto"===r?(Gs.has(e)||Gs.set(e,/* @__PURE__ */new Set),Gs.get(e).add(t)):"hint"===r&&(Ys.has(e)||Ys.set(e,/* @__PURE__ */new Set),Ys.get(e).add(t))}lo.delete(t);let d=e.activeElement;t.classList.add(":popover-open"),Xs.set(t,"showing"),Ks.has(e)||Ks.set(e,/* @__PURE__ */new Set),Ks.get(e).add(t),mo(Qs.get(t),!0),function(t){var e;null==(e=function(t){if(t.shadowRoot&&!0!==t.shadowRoot.delegatesFocus)return null;let e=t;e.shadowRoot&&(e=e.shadowRoot);let s=e.querySelector("[autofocus]");if(s)return s;{let t=e.querySelectorAll("slot");for(let e of t){let t=e.assignedElements({flatten:!0});for(let e of t){if(e.hasAttribute("autofocus"))return e;if(s=e.querySelector("[autofocus]"),s)return s}}}let o=t.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),r=o.currentNode;for(;r;){if(no(r))return r;r=o.nextNode()}}(t))||e.focus()}(t),s&&d&&"auto"===t.popover&&lo.set(t,d),Ns(t,"closed","open")}function ho(t,e=!1,s=!1){var o,r;if(!to(t,!0))return;let a=t.ownerDocument;if(["auto","hint"].includes(t.popover)&&(uo(t,e,s),!to(t,!0)))return;let i=Gs.get(a)||/* @__PURE__ */new Set,d=i.has(t)&&Js(i)===t;if(mo(Qs.get(t),!1),Qs.delete(t),s&&(t.dispatchEvent(new Fs("beforetoggle",{oldState:"open",newState:"closed"})),d&&Js(i)!==t&&uo(t,e,s),!to(t,!0)))return;null==(o=Ks.get(a))||o.delete(t),i.delete(t),null==(r=Ys.get(a))||r.delete(t),t.classList.remove(":popover-open"),Xs.set(t,"hidden"),s&&Ns(t,"open","closed");let n=lo.get(t);n&&(lo.delete(t),e&&n.focus())}function po(t,e=!1,s=!1){let o=oo(t);for(;o;)ho(o,e,s),o=oo(t)}function go(t,e,s,o){let r=!1,a=!1;for(;r||!a;){a=!0;let i=null,d=!1;for(let s of e)if(s===t)d=!0;else if(d){i=s;break}if(!i)return;for(;"showing"===Zs(i)&&e.size;)ho(Js(e),s,o);e.has(t)&&Js(e)!==t&&(r=!0),r&&(o=!1)}}function uo(t,e,s){let o=t.ownerDocument||t;if(t instanceof Document)return function(t,e=!1,s=!1){let o=so(t);for(;o;)ho(o,e,s),o=so(t)}(o,e,s);Ys.get(o)?.has(t)?go(t,Ys.get(o),e,s):(po(Ys.get(o)||/* @__PURE__ */new Set,e,s),Gs.get(o)?.has(t)&&go(t,Gs.get(o),e,s))}var vo=/* @__PURE__ */new WeakMap;function fo(t){if(!t.isTrusted)return;let e=t.composedPath()[0];if(!e)return;let s=e.ownerDocument;if(!so(s))return;let o=function(t){let e=ao(t),s=function(t){for(;t;){let e=t.popoverTargetElement;if(e instanceof HTMLElement)return e;if((t=t.parentElement||ro(t))instanceof Us&&(t=t.host),t instanceof Document)return}}(t);return eo(e)>eo(s)?e:s}(e);if(o&&"pointerdown"===t.type)vo.set(s,o);else if("pointerup"===t.type){let t=vo.get(s)===o;vo.delete(s),t&&uo(o||s,!1,!0)}}var bo=/* @__PURE__ */new WeakMap;function mo(t,e=!1){if(!t)return;bo.has(t)||bo.set(t,t.getAttribute("aria-expanded"));let s=t.popoverTargetElement;if(s instanceof HTMLElement&&"auto"===s.popover)t.setAttribute("aria-expanded",String(e));else{let e=bo.get(t);e?t.setAttribute("aria-expanded",e):t.removeAttribute("aria-expanded")}}var _o=globalThis.ShadowRoot||function(){};function xo(t,e,s){let o=t[e];Object.defineProperty(t,e,{value(t){return o.call(this,s(t))}})}var yo=/(^|[^\\]):popover-open\b/g;var wo=null;function ko(t){let e=function(){let t="function"==typeof globalThis.CSSLayerBlockRule;return`\n${t?"@layer popover-polyfill {":""}\n :where([popover]) {\n position: fixed;\n z-index: 2147483647;\n inset: 0;\n padding: 0.25em;\n width: fit-content;\n height: fit-content;\n border-width: initial;\n border-color: initial;\n border-image: initial;\n border-style: solid;\n background-color: canvas;\n color: canvastext;\n overflow: auto;\n margin: auto;\n }\n\n :where([popover]:not(.\\:popover-open)) {\n display: none;\n }\n\n :where(dialog[popover].\\:popover-open) {\n display: block;\n }\n\n :where(dialog[popover][open]) {\n display: revert;\n }\n\n :where([anchor].\\:popover-open) {\n inset: auto;\n }\n\n :where([anchor]:popover-open) {\n inset: auto;\n }\n\n @supports not (background-color: canvas) {\n :where([popover]) {\n background-color: white;\n color: black;\n }\n }\n\n @supports (width: -moz-fit-content) {\n :where([popover]) {\n width: -moz-fit-content;\n height: -moz-fit-content;\n }\n }\n\n @supports not (inset: 0) {\n :where([popover]) {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n }\n${t?"}":""}\n`}();if(null===wo)try{(wo=new CSSStyleSheet).replaceSync(e)}catch{wo=!1}if(!1===wo){let s=document.createElement("style");s.textContent=e,t instanceof Document?t.head.prepend(s):t.prepend(s)}else t.adoptedStyleSheets=[wo,...t.adoptedStyleSheets]}const zo=Math.min,$o=Math.max,So=Math.round,Co=Math.floor,Eo=t=>({x:t,y:t}),Ao={left:"right",right:"left",bottom:"top",top:"bottom"};function Lo(t,e,s){return $o(t,zo(e,s))}function Oo(t,e){return"function"==typeof t?t(e):t}function To(t){return t.split("-")[0]}function Po(t){return t.split("-")[1]}function Do(t){return"x"===t?"y":"x"}function Mo(t){return"y"===t?"height":"width"}function qo(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function Ro(t){return Do(qo(t))}function Vo(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Bo=["left","right"],Ho=["right","left"],jo=["top","bottom"],Fo=["bottom","top"];function Io(t){const e=To(t);return Ao[e]+t.slice(e.length)}function No(t){const{x:e,y:s,width:o,height:r}=t;return{width:o,height:r,top:s,left:e,right:e+o,bottom:s+r,x:e,y:s}}function Uo(t,e,s){let{reference:o,floating:r}=t;const a=qo(e),i=Ro(e),d=Mo(i),n=To(e),l="y"===a,c=o.x+o.width/2-r.width/2,h=o.y+o.height/2-r.height/2,p=o[d]/2-r[d]/2;let g;switch(n){case"top":g={x:c,y:o.y-r.height};break;case"bottom":g={x:c,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:h};break;case"left":g={x:o.x-r.width,y:h};break;default:g={x:o.x,y:o.y}}switch(Po(e)){case"start":g[i]-=p*(s&&l?-1:1);break;case"end":g[i]+=p*(s&&l?-1:1)}return g}async function Wo(t,e){var s;void 0===e&&(e={});const{x:o,y:r,platform:a,rects:i,elements:d,strategy:n}=t,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:p=!1,padding:g=0}=Oo(e,t),u="number"!=typeof(y=g)?(w=y,{top:0,right:0,bottom:0,left:0,...w}):{top:y,right:y,bottom:y,left:y},v=d[p?"floating"===h?"reference":"floating":h],f=No(await a.getClippingRect({element:null==(s=await(null==a.isElement?void 0:a.isElement(v)))||s?v:v.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(d.floating)),boundary:l,rootBoundary:c,strategy:n})),b="floating"===h?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,m=await(null==a.getOffsetParent?void 0:a.getOffsetParent(d.floating)),_=await(null==a.isElement?void 0:a.isElement(m))&&await(null==a.getScale?void 0:a.getScale(m))||{x:1,y:1},x=No(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:b,offsetParent:m,strategy:n}):b);var y,w;return{top:(f.top-x.top+u.top)/_.y,bottom:(x.bottom-f.bottom+u.bottom)/_.y,left:(f.left-x.left+u.left)/_.x,right:(x.right-f.right+u.right)/_.x}}const Ko=/* @__PURE__ */new Set(["left","top"]);function Go(){return"undefined"!=typeof window}function Yo(t){return Qo(t)?(t.nodeName||"").toLowerCase():"#document"}function Xo(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function Zo(t){var e;return null==(e=(Qo(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function Qo(t){return!!Go()&&(t instanceof Node||t instanceof Xo(t).Node)}function Jo(t){return!!Go()&&(t instanceof Element||t instanceof Xo(t).Element)}function tr(t){return!!Go()&&(t instanceof HTMLElement||t instanceof Xo(t).HTMLElement)}function er(t){return!(!Go()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof Xo(t).ShadowRoot)}function sr(t){const{overflow:e,overflowX:s,overflowY:o,display:r}=pr(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+s)&&"inline"!==r&&"contents"!==r}function or(t){return/^(table|td|th)$/.test(Yo(t))}function rr(t){try{if(t.matches(":popover-open"))return!0}catch(e){}try{return t.matches(":modal")}catch(e){return!1}}const ar=/transform|translate|scale|rotate|perspective|filter/,ir=/paint|layout|strict|content/,dr=t=>!!t&&"none"!==t;let nr;function lr(t){const e=Jo(t)?pr(t):t;return dr(e.transform)||dr(e.translate)||dr(e.scale)||dr(e.rotate)||dr(e.perspective)||!cr()&&(dr(e.backdropFilter)||dr(e.filter))||ar.test(e.willChange||"")||ir.test(e.contain||"")}function cr(){return null==nr&&(nr="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),nr}function hr(t){return/^(html|body|#document)$/.test(Yo(t))}function pr(t){return Xo(t).getComputedStyle(t)}function gr(t){return Jo(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ur(t){if("html"===Yo(t))return t;const e=t.assignedSlot||t.parentNode||er(t)&&t.host||Zo(t);return er(e)?e.host:e}function vr(t){const e=ur(t);return hr(e)?t.ownerDocument?t.ownerDocument.body:t.body:tr(e)&&sr(e)?e:vr(e)}function fr(t,e,s){var o;void 0===e&&(e=[]),void 0===s&&(s=!0);const r=vr(t),a=r===(null==(o=t.ownerDocument)?void 0:o.body),i=Xo(r);if(a){const t=br(i);return e.concat(i,i.visualViewport||[],sr(r)?r:[],t&&s?fr(t):[])}return e.concat(r,fr(r,[],s))}function br(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function mr(t){const e=pr(t);let s=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=tr(t),a=r?t.offsetWidth:s,i=r?t.offsetHeight:o,d=So(s)!==a||So(o)!==i;return d&&(s=a,o=i),{width:s,height:o,$:d}}function _r(t){return Jo(t)?t:t.contextElement}function xr(t){const e=_r(t);if(!tr(e))return Eo(1);const s=e.getBoundingClientRect(),{width:o,height:r,$:a}=mr(e);let i=(a?So(s.width):s.width)/o,d=(a?So(s.height):s.height)/r;return i&&Number.isFinite(i)||(i=1),d&&Number.isFinite(d)||(d=1),{x:i,y:d}}const yr=Eo(0);function wr(t){const e=Xo(t);return cr()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:yr}function kr(t,e,s,o){void 0===e&&(e=!1),void 0===s&&(s=!1);const r=t.getBoundingClientRect(),a=_r(t);let i=Eo(1);e&&(o?Jo(o)&&(i=xr(o)):i=xr(t));const d=(n=a,void 0===(l=s)&&(l=!1),!(c=o)||l&&c!==Xo(n)||!l?Eo(0):wr(a));var n,l,c;let h=(r.left+d.x)/i.x,p=(r.top+d.y)/i.y,g=r.width/i.x,u=r.height/i.y;if(a){const t=Xo(a),e=o&&Jo(o)?Xo(o):o;let s=t,r=br(s);for(;r&&o&&e!==s;){const t=xr(r),e=r.getBoundingClientRect(),o=pr(r),a=e.left+(r.clientLeft+parseFloat(o.paddingLeft))*t.x,i=e.top+(r.clientTop+parseFloat(o.paddingTop))*t.y;h*=t.x,p*=t.y,g*=t.x,u*=t.y,h+=a,p+=i,s=Xo(r),r=br(s)}}return No({width:g,height:u,x:h,y:p})}function zr(t,e){const s=gr(t).scrollLeft;return e?e.left+s:kr(Zo(t)).left+s}function $r(t,e){const s=t.getBoundingClientRect();return{x:s.left+e.scrollLeft-zr(t,s),y:s.top+e.scrollTop}}function Sr(t,e,s){let o;if("viewport"===e)o=function(t,e){const s=Xo(t),o=Zo(t),r=s.visualViewport;let a=o.clientWidth,i=o.clientHeight,d=0,n=0;if(r){a=r.width,i=r.height;const t=cr();(!t||t&&"fixed"===e)&&(d=r.offsetLeft,n=r.offsetTop)}const l=zr(o);if(l<=0){const t=o.ownerDocument,e=t.body,s=getComputedStyle(e),r="CSS1Compat"===t.compatMode&&parseFloat(s.marginLeft)+parseFloat(s.marginRight)||0,i=Math.abs(o.clientWidth-e.clientWidth-r);i<=25&&(a-=i)}else l<=25&&(a+=l);return{width:a,height:i,x:d,y:n}}(t,s);else if("document"===e)o=function(t){const e=Zo(t),s=gr(t),o=t.ownerDocument.body,r=$o(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),a=$o(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let i=-s.scrollLeft+zr(t);const d=-s.scrollTop;return"rtl"===pr(o).direction&&(i+=$o(e.clientWidth,o.clientWidth)-r),{width:r,height:a,x:i,y:d}}(Zo(t));else if(Jo(e))o=function(t,e){const s=kr(t,!0,"fixed"===e),o=s.top+t.clientTop,r=s.left+t.clientLeft,a=tr(t)?xr(t):Eo(1);return{width:t.clientWidth*a.x,height:t.clientHeight*a.y,x:r*a.x,y:o*a.y}}(e,s);else{const s=wr(t);o={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return No(o)}function Cr(t,e){const s=ur(t);return!(s===e||!Jo(s)||hr(s))&&("fixed"===pr(s).position||Cr(s,e))}function Er(t,e,s){const o=tr(e),r=Zo(e),a="fixed"===s,i=kr(t,!0,a,e);let d={scrollLeft:0,scrollTop:0};const n=Eo(0);function l(){n.x=zr(r)}if(o||!o&&!a)if(("body"!==Yo(e)||sr(r))&&(d=gr(e)),o){const t=kr(e,!0,a,e);n.x=t.x+e.clientLeft,n.y=t.y+e.clientTop}else r&&l();a&&!o&&r&&l();const c=!r||o||a?Eo(0):$r(r,d);return{x:i.left+d.scrollLeft-n.x-c.x,y:i.top+d.scrollTop-n.y-c.y,width:i.width,height:i.height}}function Ar(t){return"static"===pr(t).position}function Lr(t,e){if(!tr(t)||"fixed"===pr(t).position)return null;if(e)return e(t);let s=t.offsetParent;return Zo(t)===s&&(s=s.ownerDocument.body),s}function Or(t,e){const s=Xo(t);if(rr(t))return s;if(!tr(t)){let e=ur(t);for(;e&&!hr(e);){if(Jo(e)&&!Ar(e))return e;e=ur(e)}return s}let o=Lr(t,e);for(;o&&or(o)&&Ar(o);)o=Lr(o,e);return o&&hr(o)&&Ar(o)&&!lr(o)?s:o||function(t){let e=ur(t);for(;tr(e)&&!hr(e);){if(lr(e))return e;if(rr(e))return null;e=ur(e)}return null}(t)||s}const Tr={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:s,offsetParent:o,strategy:r}=t;const a="fixed"===r,i=Zo(o),d=!!e&&rr(e.floating);if(o===i||d&&a)return s;let n={scrollLeft:0,scrollTop:0},l=Eo(1);const c=Eo(0),h=tr(o);if((h||!h&&!a)&&(("body"!==Yo(o)||sr(i))&&(n=gr(o)),h)){const t=kr(o);l=xr(o),c.x=t.x+o.clientLeft,c.y=t.y+o.clientTop}const p=!i||h||a?Eo(0):$r(i,n);return{width:s.width*l.x,height:s.height*l.y,x:s.x*l.x-n.scrollLeft*l.x+c.x+p.x,y:s.y*l.y-n.scrollTop*l.y+c.y+p.y}},getDocumentElement:Zo,getClippingRect:function(t){let{element:e,boundary:s,rootBoundary:o,strategy:r}=t;const a=[..."clippingAncestors"===s?rr(e)?[]:function(t,e){const s=e.get(t);if(s)return s;let o=fr(t,[],!1).filter(t=>Jo(t)&&"body"!==Yo(t)),r=null;const a="fixed"===pr(t).position;let i=a?ur(t):t;for(;Jo(i)&&!hr(i);){const e=pr(i),s=lr(i);s||"fixed"!==e.position||(r=null),(a?!s&&!r:!s&&"static"===e.position&&r&&("absolute"===r.position||"fixed"===r.position)||sr(i)&&!s&&Cr(t,i))?o=o.filter(t=>t!==i):r=e,i=ur(i)}return e.set(t,o),o}(e,this._c):[].concat(s),o],i=Sr(e,a[0],r);let d=i.top,n=i.right,l=i.bottom,c=i.left;for(let h=1;h<a.length;h++){const t=Sr(e,a[h],r);d=$o(t.top,d),n=zo(t.right,n),l=zo(t.bottom,l),c=$o(t.left,c)}return{width:n-c,height:l-d,x:c,y:d}},getOffsetParent:Or,getElementRects:async function(t){const e=this.getOffsetParent||Or,s=this.getDimensions,o=await s(t.floating);return{reference:Er(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:s}=mr(t);return{width:e,height:s}},getScale:xr,isElement:Jo,isRTL:function(t){return"rtl"===pr(t).direction}};function Pr(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}const Dr=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var s,o;const{x:r,y:a,placement:i,middlewareData:d}=e,n=await async function(t,e){const{placement:s,platform:o,elements:r}=t,a=await(null==o.isRTL?void 0:o.isRTL(r.floating)),i=To(s),d=Po(s),n="y"===qo(s),l=Ko.has(i)?-1:1,c=a&&n?-1:1,h=Oo(e,t);let{mainAxis:p,crossAxis:g,alignmentAxis:u}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return d&&"number"==typeof u&&(g="end"===d?-1*u:u),n?{x:g*c,y:p*l}:{x:p*l,y:g*c}}(e,t);return i===(null==(s=d.offset)?void 0:s.placement)&&null!=(o=d.arrow)&&o.alignmentOffset?{}:{x:r+n.x,y:a+n.y,data:{...n,placement:i}}}}},Mr=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:s,y:o,placement:r,platform:a}=e,{mainAxis:i=!0,crossAxis:d=!1,limiter:n={fn:t=>{let{x:e,y:s}=t;return{x:e,y:s}}},...l}=Oo(t,e),c={x:s,y:o},h=await a.detectOverflow(e,l),p=qo(To(r)),g=Do(p);let u=c[g],v=c[p];if(i){const t="y"===g?"bottom":"right";u=Lo(u+h["y"===g?"top":"left"],u,u-h[t])}if(d){const t="y"===p?"bottom":"right";v=Lo(v+h["y"===p?"top":"left"],v,v-h[t])}const f=n.fn({...e,[g]:u,[p]:v});return{...f,data:{x:f.x-s,y:f.y-o,enabled:{[g]:i,[p]:d}}}}}},qr=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var s,o;const{placement:r,middlewareData:a,rects:i,initialPlacement:d,platform:n,elements:l}=e,{mainAxis:c=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:u="none",flipAlignment:v=!0,...f}=Oo(t,e);if(null!=(s=a.arrow)&&s.alignmentOffset)return{};const b=To(r),m=qo(d),_=To(d)===d,x=await(null==n.isRTL?void 0:n.isRTL(l.floating)),y=p||(_||!v?[Io(d)]:function(t){const e=Io(t);return[Vo(t),e,Vo(e)]}(d)),w="none"!==u;!p&&w&&y.push(...function(t,e,s,o){const r=Po(t);let a=function(t,e,s){switch(t){case"top":case"bottom":return s?e?Ho:Bo:e?Bo:Ho;case"left":case"right":return e?jo:Fo;default:return[]}}(To(t),"start"===s,o);return r&&(a=a.map(t=>t+"-"+r),e&&(a=a.concat(a.map(Vo)))),a}(d,v,u,x));const k=[d,...y],z=await n.detectOverflow(e,f),$=[];let S=(null==(o=a.flip)?void 0:o.overflows)||[];if(c&&$.push(z[b]),h){const t=function(t,e,s){void 0===s&&(s=!1);const o=Po(t),r=Ro(t),a=Mo(r);let i="x"===r?o===(s?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[a]>e.floating[a]&&(i=Io(i)),[i,Io(i)]}(r,i,x);$.push(z[t[0]],z[t[1]])}if(S=[...S,{placement:r,overflows:$}],!$.every(t=>t<=0)){var C,E;const t=((null==(C=a.flip)?void 0:C.index)||0)+1,e=k[t];if(e&&("alignment"!==h||m===qo(e)||S.every(t=>qo(t.placement)!==m||t.overflows[0]>0)))return{data:{index:t,overflows:S},reset:{placement:e}};let s=null==(E=S.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:E.placement;if(!s)switch(g){case"bestFit":{var A;const t=null==(A=S.filter(t=>{if(w){const e=qo(t.placement);return e===m||"y"===e}return!0}).map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:A[0];t&&(s=t);break}case"initialPlacement":s=d}if(r!==s)return{reset:{placement:s}}}return{}}}},Rr=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var s,o;const{placement:r,rects:a,platform:i,elements:d}=e,{apply:n=()=>{},...l}=Oo(t,e),c=await i.detectOverflow(e,l),h=To(r),p=Po(r),g="y"===qo(r),{width:u,height:v}=a.floating;let f,b;"top"===h||"bottom"===h?(f=h,b=p===(await(null==i.isRTL?void 0:i.isRTL(d.floating))?"start":"end")?"left":"right"):(b=h,f="end"===p?"top":"bottom");const m=v-c.top-c.bottom,_=u-c.left-c.right,x=zo(v-c[f],m),y=zo(u-c[b],_),w=!e.middlewareData.shift;let k=x,z=y;if(null!=(s=e.middlewareData.shift)&&s.enabled.x&&(z=_),null!=(o=e.middlewareData.shift)&&o.enabled.y&&(k=m),w&&!p){const t=$o(c.left,0),e=$o(c.right,0),s=$o(c.top,0),o=$o(c.bottom,0);g?z=u-2*(0!==t||0!==e?t+e:$o(c.left,c.right)):k=v-2*(0!==s||0!==o?s+o:$o(c.top,c.bottom))}await n({...e,availableWidth:z,availableHeight:k});const $=await i.getDimensions(d.floating);return u!==$.width||v!==$.height?{reset:{rects:!0}}:{}}}},Vr=function(t){return void 0===t&&(t={}),{options:t,fn(e){const{x:s,y:o,placement:r,rects:a,middlewareData:i}=e,{offset:d=0,mainAxis:n=!0,crossAxis:l=!0}=Oo(t,e),c={x:s,y:o},h=qo(r),p=Do(h);let g=c[p],u=c[h];const v=Oo(d,e),f="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(n){const t="y"===p?"height":"width",e=a.reference[p]-a.floating[t]+f.mainAxis,s=a.reference[p]+a.reference[t]-f.mainAxis;g<e?g=e:g>s&&(g=s)}if(l){var b,m;const t="y"===p?"width":"height",e=Ko.has(To(r)),s=a.reference[h]-a.floating[t]+(e&&(null==(b=i.offset)?void 0:b[h])||0)+(e?0:f.crossAxis),o=a.reference[h]+a.reference[t]+(e?0:(null==(m=i.offset)?void 0:m[h])||0)-(e?f.crossAxis:0);u<s?u=s:u>o&&(u=o)}return{[p]:g,[h]:u}}}};Ds()&&!(typeof HTMLElement<"u"&&"object"==typeof HTMLElement.prototype&&"popover"in HTMLElement.prototype)&&function(){if(typeof window>"u")return;function t(t){return t?.includes(":popover-open")&&(t=t.replace(yo,"$1.\\:popover-open")),t}window.ToggleEvent=window.ToggleEvent||Fs,xo(Document.prototype,"querySelector",t),xo(Document.prototype,"querySelectorAll",t),xo(Element.prototype,"querySelector",t),xo(Element.prototype,"querySelectorAll",t),xo(Element.prototype,"matches",t),xo(Element.prototype,"closest",t),xo(DocumentFragment.prototype,"querySelectorAll",t),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;let t=(this.getAttribute("popover")||"").toLowerCase();return""===t||"auto"==t?"auto":"hint"==t?"hint":"manual"},set(t){null===t?this.removeAttribute("popover"):this.setAttribute("popover",t)}},showPopover:{enumerable:!0,configurable:!0,value(t={}){co(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){ho(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t={}){return"boolean"==typeof t&&(t={force:t}),"showing"===Xs.get(this)&&void 0===t.force||!1===t.force?ho(this,!0,!0):(void 0===t.force||!0===t.force)&&co(this),"showing"===Xs.get(this)}}});let e=Element.prototype.attachShadow;e&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(t){let s=e.call(this,t);return ko(s),s}}});let s=HTMLElement.prototype.attachInternals;s&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){let t=s.call(this);return t.shadowRoot&&ko(t.shadowRoot),t}}});let o=/* @__PURE__ */new WeakMap;function r(t){Object.defineProperties(t.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(t){if(null===t)this.removeAttribute("popovertarget"),o.delete(this);else{if(!(t instanceof Element))throw TypeError("popoverTargetElement must be an element or null");this.setAttribute("popovertarget",""),o.set(this,t)}},get(){if("button"!==this.localName&&"input"!==this.localName||"input"===this.localName&&"reset"!==this.type&&"image"!==this.type&&"button"!==this.type||this.disabled||this.form&&"submit"===this.type)return null;let t=o.get(this);if(t&&t.isConnected)return t;if(t&&!t.isConnected)return o.delete(this),null;let e=ro(this),s=this.getAttribute("popovertarget");return(e instanceof Document||e instanceof _o)&&s&&e.getElementById(s)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){let t=(this.getAttribute("popovertargetaction")||"").toLowerCase();return"show"===t||"hide"===t?t:"toggle"},set(t){this.setAttribute("popovertargetaction",t)}}})}r(HTMLButtonElement),r(HTMLInputElement);let a=t=>{if(t.defaultPrevented)return;let e=t.composedPath(),s=e[0];if(!(s instanceof Element)||s?.shadowRoot)return;let o=ro(s);if(!(o instanceof _o||o instanceof Document))return;let r=e.find(t=>t.matches?.call(t,"[popovertargetaction],[popovertarget]"));return r?(function(t){let e=t.popoverTargetElement;if(!(e instanceof HTMLElement))return;let s=Zs(e);"show"===t.popoverTargetAction&&"showing"===s||"hide"===t.popoverTargetAction&&"hidden"===s||("showing"===s?ho(e,!0,!0):to(e,!1)&&(Qs.set(e,t),co(e)))}(r),void t.preventDefault()):void 0},i=t=>{let e=t.key,s=t.target;!t.defaultPrevented&&s&&("Escape"===e||"Esc"===e)&&uo(s.ownerDocument,!0,!0)};var d;(d=document).addEventListener("click",a),d.addEventListener("keydown",i),d.addEventListener("pointerdown",fo),d.addEventListener("pointerup",fo),ko(document)}();const Br="data-placement",Hr="data-autoplacement",jr=/* @__PURE__ */new Map;function Fr(t){let{newState:e,oldState:s,target:o,source:r=t.detail}=t,a=o instanceof HTMLElement&&null!==Ms(o,"popover")&&qs(o,"--_ds-floating");if(!a)return;if("closed"===e)return jr.get(o)?.();if(!r){let t=o.getRootNode(),e=`[popovertarget="${o.id}"],[commandfor="${o.id}"]`;r=o.id&&t?.querySelector?.(e)||void 0}if(!r||r===o||s&&s===e)return;o.style.scrollMarginBottom="var(--_ds-floating-arrow-size)";let i=qs(o,"--_ds-floating-overscroll"),d=Ms(o,Br)||Ms(r,Br)||a,n=Ms(o,Hr)||Ms(r,Hr),l=parseFloat(qs(o,"scroll-margin-bottom"))||0,c=d.match(/left|right/gi)?"Height":"Width",h=r[`offset${c}`]/2+l;if("none"===d)return;let p={strategy:"absolute",placement:d,middleware:[Dr(l),Mr({padding:10,limiter:Vr({offset:{mainAxis:h}})}),Ur(),..."false"===n?[]:[qr({padding:10,crossAxis:!1})],...i?[Rr({apply({availableHeight:t}){"fit"===i&&(o.style.width=`${r.offsetWidth}px`),o.style.maxHeight=`${Math.max(50,t-20)}px`}})]:[]]},g=function(t,e,s,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:d="function"==typeof IntersectionObserver,animationFrame:n=!1}=o,l=_r(t),c=r||a?[...l?fr(l):[],...e?fr(e):[]]:[];c.forEach(t=>{r&&t.addEventListener("scroll",s,{passive:!0}),a&&t.addEventListener("resize",s)});const h=l&&d?function(t,e){let s,o=null;const r=Zo(t);function a(){var t;clearTimeout(s),null==(t=o)||t.disconnect(),o=null}return function i(d,n){void 0===d&&(d=!1),void 0===n&&(n=1),a();const l=t.getBoundingClientRect(),{left:c,top:h,width:p,height:g}=l;if(d||e(),!p||!g)return;const u={rootMargin:-Co(h)+"px "+-Co(r.clientWidth-(c+p))+"px "+-Co(r.clientHeight-(h+g))+"px "+-Co(c)+"px",threshold:$o(0,zo(1,n))||1};let v=!0;function f(e){const o=e[0].intersectionRatio;if(o!==n){if(!v)return i();o?i(!1,o):s=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==o||Pr(l,t.getBoundingClientRect())||i(),v=!1}try{o=new IntersectionObserver(f,{...u,root:r.ownerDocument})}catch(b){o=new IntersectionObserver(f,u)}o.observe(t)}(!0),a}(l,s):null;let p,g=-1,u=null;i&&(u=new ResizeObserver(t=>{let[o]=t;o&&o.target===l&&u&&e&&(u.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var t;null==(t=u)||t.observe(e)})),s()}),l&&!n&&u.observe(l),e&&u.observe(e));let v=n?kr(t):null;return n&&function e(){const o=kr(t);v&&!Pr(v,o)&&s(),v=o,p=requestAnimationFrame(e)}(),s(),()=>{var t;c.forEach(t=>{r&&t.removeEventListener("scroll",s),a&&t.removeEventListener("resize",s)}),null==h||h(),null==(t=u)||t.disconnect(),u=null,n&&cancelAnimationFrame(p)}}(r,o,async()=>{if(!r?.isConnected)return jr.get(o)?.();let{x:t,y:e}=await((t,e,s)=>{const o=/* @__PURE__ */new Map,r={platform:Tr,...s},a={...r.platform,_c:o};return(async(t,e,s)=>{const{placement:o="bottom",strategy:r="absolute",middleware:a=[],platform:i}=s,d=i.detectOverflow?i:{...i,detectOverflow:Wo},n=await(null==i.isRTL?void 0:i.isRTL(e));let l=await i.getElementRects({reference:t,floating:e,strategy:r}),{x:c,y:h}=Uo(l,o,n),p=o,g=0;const u={};for(let v=0;v<a.length;v++){const s=a[v];if(!s)continue;const{name:f,fn:b}=s,{x:m,y:_,data:x,reset:y}=await b({x:c,y:h,initialPlacement:o,placement:p,strategy:r,middlewareData:u,rects:l,platform:d,elements:{reference:t,floating:e}});c=null!=m?m:c,h=null!=_?_:h,u[f]={...u[f],...x},y&&g<50&&(g++,"object"==typeof y&&(y.placement&&(p=y.placement),y.rects&&(l=!0===y.rects?await i.getElementRects({reference:t,floating:e,strategy:r}):y.rects),({x:c,y:h}=Uo(l,p,n))),v=-1)}return{x:c,y:h,placement:p,strategy:r,middlewareData:u}})(t,e,{...r,platform:a})})(r,o,p);o.style.translate=`${t}px ${e}px`});jr.set(o,()=>jr.delete(o)&&g())}let Ir;const Nr=({type:t})=>{if("mousedown"===t&&(Ir=!1),"scroll"===t&&!1===Ir&&(Ir=!0),"mouseup"===t&&Ir)for(let[e]of jr)e.showPopover()};Bs("popover",()=>[Rs(document,"mousedown scroll mouseup",Nr,!0),Rs(document,"toggle ds-toggle-source",Fr,Ps)]);const Ur=()=>({name:"arrowPseudo",fn(t){let e=t.elements.floating,s=t.rects.reference,o=`${Math.round(s.width/2+s.x-t.x)}px`,r=`${Math.round(s.height/2+s.y-t.y)}px`;return e.style.setProperty("--_ds-floating-arrow-x",o),e.style.setProperty("--_ds-floating-arrow-y",r),Ms(e,"data-floating",t.placement),t}});var Wr=Object.defineProperty,Kr=Object.getOwnPropertyDescriptor,Gr=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?Kr(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&&Wr(e,s,a),a};let Yr=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 tt`<slot></slot>`}};Yr.styles=[Ts],Gr([E({type:String,reflect:!0})],Yr.prototype,"placement",2),Gr([E({type:String,reflect:!0})],Yr.prototype,"autoPlacement",2),Gr([E({type:String,reflect:!0})],Yr.prototype,"overscroll",2),Yr=Gr([P("sds-popover")],Yr);const Xr=l`
|
|
1964
2069
|
:host {
|
|
1965
2070
|
--_sds-radio-font-family: var(--sds-radio-font-family, var(--sds-typography-font-family-roboto));
|
|
1966
2071
|
--_sds-radio-disabled-opacity: var(--sds-radio-disabled-opacity, var(--sds-color-states-disabled-opacity));
|
|
@@ -1984,6 +2089,12 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
1984
2089
|
--_sds-radio-input-dot-color: var(--sds-radio-input-dot-color, transparent);
|
|
1985
2090
|
--_sds-radio-input-dot-size: var(--sds-radio-input-dot-size, 4.5px);
|
|
1986
2091
|
|
|
2092
|
+
--_sds-radio-focus-color-outer: var(--sds-radio-focus-color-outer, var(--sds-color-states-focus-outer));
|
|
2093
|
+
--_sds-radio-focus-color-inner: var(--sds-radio-focus-color-inner, var(--sds-color-states-focus-inner));
|
|
2094
|
+
--_sds-radio-focus-spacing: var(--sds-radio-focus-spacing, var(--sds-color-states-focus-spacing));
|
|
2095
|
+
--_sds-radio-focus-outline-size: var(--sds-radio-focus-outline-size, var(--sds-color-states-focus-outline-size));
|
|
2096
|
+
--_sds-radio-focus-radius: var(--sds-radio-focus-radius, var(--sds-radius-xs));
|
|
2097
|
+
|
|
1987
2098
|
--_sds-radio-grid-template-areas: var(--sds-radio-grid-template-area, 'input content');
|
|
1988
2099
|
--_sds-radio-label-grid-area: var(--sds-radio-label-grid-area, content);
|
|
1989
2100
|
--_sds-radio-input-grid-area: var(--sds-radio-input-grid-area, input);
|
|
@@ -2008,9 +2119,10 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
2008
2119
|
}
|
|
2009
2120
|
|
|
2010
2121
|
&:has(:focus-visible) {
|
|
2011
|
-
|
|
2012
|
-
outline
|
|
2013
|
-
|
|
2122
|
+
box-shadow: 0 0 0 var(--_sds-radio-focus-spacing) var(--_sds-radio-focus-color-inner);
|
|
2123
|
+
outline: var(--_sds-radio-focus-outline-size) solid var(--_sds-radio-focus-color-outer);
|
|
2124
|
+
outline-offset: var(--_sds-radio-focus-spacing);
|
|
2125
|
+
border-radius: var(--_sds-radio-focus-radius);
|
|
2014
2126
|
}
|
|
2015
2127
|
}
|
|
2016
2128
|
|
|
@@ -2162,30 +2274,32 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
2162
2274
|
margin-block-start: -1px;
|
|
2163
2275
|
}
|
|
2164
2276
|
}
|
|
2165
|
-
`;var
|
|
2166
|
-
<div class="${
|
|
2277
|
+
`;var Zr=Object.defineProperty,Qr=Object.getOwnPropertyDescriptor,Jr=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?Qr(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&&Zr(e,s,a),a};let ta=class extends(ee(Et(re(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._disabled=!1,this._disabledIsAuthorControlled=!1,this._settingDisabledFromParent=!1,this._parentRequestDisabled=!1,this._initialChecked=!1,this._handleKeydown=t=>{if(!this.name||this.disabled||this.readOnly)return;const e=this.getRootNode(),s=Array.from(e.querySelectorAll(`sds-radio[name="${this.name}"]`)),o=s.indexOf(this);if(-1===o)return;let r=null;switch(t.key){case"ArrowUp":case"ArrowLeft":r=o>0?o-1:s.length-1;break;case"ArrowDown":case"ArrowRight":r=o<s.length-1?o+1:0;break;default:return}const a=s[r];a?.focus(),a?.click(),t.preventDefault()},this._handleChange=t=>{if(this.disabled||this.readOnly)return t.target.checked=this.checked??!1,void t.preventDefault();const e=t.target;this.checked=e.checked,this.checked&&this._uncheckSiblings(),this._updateGroupValidation(),this.dispatchSheriffEvent("change")},this._handleFocus=t=>{t.stopImmediatePropagation(),this.dispatchSheriffEvent("focus")},this._handleBlur=t=>{t.stopImmediatePropagation(),this.dispatchSheriffEvent("blur")},this._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.internals.role="radio",this._initialChecked||(this._initialChecked=this.checked??!1),this.addEventListener("keydown",this._handleKeydown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleKeydown)}firstUpdated(t){super.firstUpdated(t),this._updateGroupValidation()}updated(t){super.updated(t),t.has("checked")&&(this.checked?(this._uncheckSiblings(),this.internals.setFormValue(this.value??null)):this.internals.setFormValue(null),this._updateGroupValidation()),t.has("required")&&this.control&&(this.control.required=this.required??!1),this._disabledIsAuthorControlled||this.disabled===this._parentRequestDisabled||(this._settingDisabledFromParent=!0,this.disabled=this._parentRequestDisabled??!1,this._settingDisabledFromParent=!1)}_getGroupRadios(){if(!this.name)return[this];const t=this.getRootNode();return Array.from(t.querySelectorAll(`sds-radio[name="${this.name}"]`))}_updateGroupValidation(){const t=this._getGroupRadios(),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))}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)},o=this.helpText?"help-text":void 0;return tt`
|
|
2278
|
+
<div class="${Jt(t)}">
|
|
2167
2279
|
<input
|
|
2168
2280
|
id="control"
|
|
2169
2281
|
type="radio"
|
|
2170
|
-
name="${
|
|
2171
|
-
value="${
|
|
2282
|
+
name="${Dt(this.name)}"
|
|
2283
|
+
value="${Dt(this.value)}"
|
|
2172
2284
|
?checked="${this.checked??!1}"
|
|
2173
2285
|
.checked="${this.checked??!1}"
|
|
2174
2286
|
?disabled="${this.disabled??!1}"
|
|
2175
2287
|
.disabled="${this.disabled??!1}"
|
|
2176
2288
|
?required="${this.required}"
|
|
2177
2289
|
?readonly="${this.readOnly}"
|
|
2178
|
-
aria-describedby="${
|
|
2290
|
+
aria-describedby="${Dt(o)}"
|
|
2179
2291
|
aria-invalid="${this.error?"true":"false"}"
|
|
2180
2292
|
@change="${this._handleChange}"
|
|
2181
2293
|
@focus="${this._handleFocus}"
|
|
2182
2294
|
@blur="${this._handleBlur}"
|
|
2183
|
-
class="${
|
|
2295
|
+
class="${Jt(s)}"
|
|
2184
2296
|
/>
|
|
2185
|
-
|
|
2186
|
-
|
|
2297
|
+
<label class="sds-radio__label" for="control" ?hidden="${!e}">
|
|
2298
|
+
<slot name="label" @slotchange="${this._handleLabelSlotChange}">${this.label}</slot>
|
|
2299
|
+
</label>
|
|
2300
|
+
${this.helpText?tt`<span id="help-text" class="sds-radio__help-text">${this.helpText}</span>`:st}
|
|
2187
2301
|
</div>
|
|
2188
|
-
`}};
|
|
2302
|
+
`}};ta.styles=[Xr],Jr([E({type:Boolean,reflect:!0})],ta.prototype,"required",2),Jr([E({type:String,reflect:!0})],ta.prototype,"label",2),Jr([E({type:Boolean,reflect:!0,attribute:"hide-label"})],ta.prototype,"hideLabel",2),Jr([E({type:String})],ta.prototype,"value",2),Jr([E({type:Boolean,reflect:!0})],ta.prototype,"checked",2),Jr([E({type:Boolean,reflect:!0})],ta.prototype,"error",2),Jr([E({type:String,reflect:!0})],ta.prototype,"size",2),Jr([E({type:String,attribute:"help-text"})],ta.prototype,"helpText",2),Jr([E({type:Boolean,reflect:!0})],ta.prototype,"disabled",1),Jr([E({type:Boolean,attribute:!1})],ta.prototype,"parentRequestDisabled",1),Jr([O("#control")],ta.prototype,"control",2),Jr([A()],ta.prototype,"_hasSlottedLabel",2),ta=Jr([P("sds-radio")],ta);const ea=l`
|
|
2189
2303
|
:host {
|
|
2190
2304
|
--_sds-radio-group-gap: var(--sds-radio-group-gap, var(--sds-spacing-xs));
|
|
2191
2305
|
--_sds-radio-group-row-gap: var(--sds-radio-group-row-gap, var(--sds-spacing-md));
|
|
@@ -2283,18 +2397,18 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
2283
2397
|
--_sds-radio-group-help-text-font-size: var(--sds-radio-group-help-text-font-size, var(--sds-components-font-size-content-lg));
|
|
2284
2398
|
--_sds-radio-group-help-text-line-height: var(--sds-radio-group-help-text-line-height, var(--sds-components-line-height-squeezed-lg));
|
|
2285
2399
|
}
|
|
2286
|
-
`;var
|
|
2287
|
-
<fieldset class="${
|
|
2288
|
-
${this.legend?
|
|
2289
|
-
${this.helpText?
|
|
2290
|
-
<div class="${
|
|
2400
|
+
`;var sa=Object.defineProperty,oa=Object.getOwnPropertyDescriptor,ra=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?oa(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&&sa(e,s,a),a};const aa=["disabled","errorMessage","readOnly","required","size"];let ia=class extends(Et(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([...aa])}}_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;aa.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 tt`
|
|
2401
|
+
<fieldset class="${Jt(t)}" aria-describedby="${Dt(s)}" aria-invalid="${this.errorMessage?"true":"false"}">
|
|
2402
|
+
${this.legend?tt`<legend class="sds-radio-group__legend">${this.readOnly?tt`<sds-icon name="lock-material-filled" size="md"></sds-icon>`:st}${this.legend}</legend>`:st}
|
|
2403
|
+
${this.helpText?tt`<p id="help-text" class="sds-radio-group__help-text">${this.helpText}</p>`:st}
|
|
2404
|
+
<div class="${Jt(e)}" @change=${this._handleRadioChange}>
|
|
2291
2405
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
2292
2406
|
</div>
|
|
2293
|
-
${this.errorMessage?
|
|
2407
|
+
${this.errorMessage?tt`<sds-alert id="error-message" variant="secondary" data-palette="danger">
|
|
2294
2408
|
<p slot="message">${this.errorMessage}</p>
|
|
2295
|
-
</sds-alert>`:
|
|
2409
|
+
</sds-alert>`:st}
|
|
2296
2410
|
</fieldset>
|
|
2297
|
-
`}get value(){return{selectedValue:this._selectedValue}}};
|
|
2411
|
+
`}get value(){return{selectedValue:this._selectedValue}}};ia.styles=[ea],ra([E({type:String})],ia.prototype,"legend",2),ra([E({type:String,attribute:"help-text"})],ia.prototype,"helpText",2),ra([E({type:String,attribute:"error-message"})],ia.prototype,"errorMessage",2),ra([E({type:Boolean,attribute:"readonly",reflect:!0})],ia.prototype,"readOnly",2),ra([E({type:String})],ia.prototype,"direction",2),ra([E({type:Boolean,reflect:!0})],ia.prototype,"disabled",2),ra([E({type:Boolean,reflect:!0})],ia.prototype,"required",2),ra([E({type:String,reflect:!0})],ia.prototype,"size",2),ra([A()],ia.prototype,"_selectedValue",2),ra([O("slot")],ia.prototype,"_slotElement",2),ia=ra([P("sds-radio-group")],ia);const da=l`
|
|
2298
2412
|
:host {
|
|
2299
2413
|
--_sds-select-background-color: var(--sds-select-background-color, var(--sds-color-background-default, var(--sds-color-neutral-background-default)));
|
|
2300
2414
|
--_sds-select-text-color: var(--sds-select-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
|
|
@@ -2331,6 +2445,7 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
2331
2445
|
--_sds-select-focus-color: var(--sds-select-focus-color, var(--sds-color-states-focus-outer));
|
|
2332
2446
|
--_sds-select-focus-inner-color: var(--sds-select-focus-inner-color, var(--sds-color-states-focus-inner));
|
|
2333
2447
|
--_sds-select-focus-spacing: var(--sds-select-focus-spacing, var(--sds-color-states-focus-spacing));
|
|
2448
|
+
--_sds-select-focus-outline-size: var(--sds-select-focus-outline-size, var(--sds-color-states-focus-outline-size));
|
|
2334
2449
|
|
|
2335
2450
|
--_sds-select-error-border-color: var(--sds-select-error-border-color, var(--sds-color-alert-danger-border-default, var(--sds-color-neutral-border-strong)));
|
|
2336
2451
|
--_sds-select-error-text-color: var(--sds-select-error-text-color, var(--sds-color-alert-danger-text-default, var(--sds-color-neutral-text-default)));
|
|
@@ -2401,8 +2516,8 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
2401
2516
|
}
|
|
2402
2517
|
|
|
2403
2518
|
&:focus-visible {
|
|
2404
|
-
box-shadow: 0 0 0 var(--
|
|
2405
|
-
outline: var(--_sds-select-focus-
|
|
2519
|
+
box-shadow: 0 0 0 var(--_sds-select-focus-spacing) var(--_sds-select-focus-inner-color);
|
|
2520
|
+
outline: var(--_sds-select-focus-outline-size) solid var(--_sds-select-focus-color);
|
|
2406
2521
|
outline-offset: var(--_sds-select-focus-spacing);
|
|
2407
2522
|
}
|
|
2408
2523
|
|
|
@@ -2470,10 +2585,12 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
2470
2585
|
--_sds-select-helptext-font-size: var(--sds-select-helptext-font-size, var(--sds-components-font-size-content-lg));
|
|
2471
2586
|
--_sds-select-helptext-line-height: var(--sds-select-helptext-line-height, var(--sds-components-line-height-squeezed-lg));
|
|
2472
2587
|
}
|
|
2473
|
-
`;var
|
|
2474
|
-
<div class="${
|
|
2475
|
-
|
|
2476
|
-
|
|
2588
|
+
`;var na=Object.defineProperty,la=(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&&na(e,s,a),a};const ca=class extends(ee(Et(re(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;/* @__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 tt`<hr />`;default:return st}})}renderOption(t){const e=t.getAttribute("value"),s=t.value,o=null!=this.value&&s===this.value;return tt` <option value=${Dt(null===e?void 0:e)} ?disabled=${t.disabled} .selected=${o}>${t.text}</option> `}renderOptgroup(t){const e=Array.from(t.querySelectorAll("option"));return tt` <optgroup label=${Dt(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 tt`
|
|
2589
|
+
<div class="${Jt(t)}">
|
|
2590
|
+
<label for="control" class="sds-select__label" ?hidden="${!s}">
|
|
2591
|
+
${this.readOnly?tt`<sds-icon name="lock-material-filled" size="m"></sds-icon>`:st}<slot name="label" @slotchange=${this._handleLabelSlotChange}>${this.label}</slot>
|
|
2592
|
+
</label>
|
|
2593
|
+
${this.helpText?tt`<p id="help-text" class="sds-select__help-text">${this.helpText}</p>`:st}
|
|
2477
2594
|
|
|
2478
2595
|
<div hidden>
|
|
2479
2596
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
@@ -2482,12 +2599,12 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
2482
2599
|
<select
|
|
2483
2600
|
id="control"
|
|
2484
2601
|
class="sds-select__control"
|
|
2485
|
-
name=${
|
|
2602
|
+
name=${Dt(this.name)}
|
|
2486
2603
|
?disabled=${this.disabled}
|
|
2487
2604
|
?required=${this.required}
|
|
2488
|
-
aria-readonly=${
|
|
2605
|
+
aria-readonly=${Dt(this.readOnly)}
|
|
2489
2606
|
aria-invalid=${this.errorMessage?"true":"false"}
|
|
2490
|
-
aria-describedby=${
|
|
2607
|
+
aria-describedby=${Dt(e)}
|
|
2491
2608
|
@keydown=${this._handleKeyDown}
|
|
2492
2609
|
@change=${this._handleChange}
|
|
2493
2610
|
@focus=${this._handleFocus}
|
|
@@ -2496,13 +2613,13 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
2496
2613
|
${this.renderFromLightDom()}
|
|
2497
2614
|
</select>
|
|
2498
2615
|
|
|
2499
|
-
${this.errorMessage?
|
|
2616
|
+
${this.errorMessage?tt`
|
|
2500
2617
|
<sds-alert id="error-message" variant="secondary" data-palette="danger">
|
|
2501
2618
|
<p slot="message">${this.errorMessage}</p>
|
|
2502
2619
|
</sds-alert>
|
|
2503
|
-
`:
|
|
2620
|
+
`:st}
|
|
2504
2621
|
</div>
|
|
2505
|
-
`}}
|
|
2622
|
+
`}};ca.styles=[da];let ha=ca;la([E({type:String,reflect:!0})],ha.prototype,"label"),la([E({type:String,attribute:!1})],ha.prototype,"value"),la([E({type:String,attribute:"default-value"})],ha.prototype,"defaultValue"),la([E({type:String,attribute:"help-text",reflect:!0})],ha.prototype,"helpText"),la([E({type:String,attribute:"error-message",reflect:!0})],ha.prototype,"errorMessage"),la([E({type:Boolean,reflect:!0})],ha.prototype,"required"),la([E({type:String,reflect:!0})],ha.prototype,"size"),la([O("#control")],ha.prototype,"control"),la([A()],ha.prototype,"_hasSlottedLabel");var pa=Object.getOwnPropertyDescriptor;let ga=class extends ha{};ga=((t,e,s,o)=>{for(var r,a=o>1?void 0:o?pa(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(a)||a);return a})([P("sds-select")],ga);const ua=l`
|
|
2506
2623
|
:host {
|
|
2507
2624
|
display: flex;
|
|
2508
2625
|
flex-direction: row;
|
|
@@ -2537,7 +2654,7 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
2537
2654
|
|
|
2538
2655
|
--sds-stepper-step-step-gap: 0 var(--sds-spacing-3xs);
|
|
2539
2656
|
}
|
|
2540
|
-
`;var
|
|
2657
|
+
`;var va=Object.defineProperty,fa=Object.getOwnPropertyDescriptor,ba=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?fa(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&&va(e,s,a),a};let ma=class extends(Et(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 tt`<slot @_sds-step-clicked="${this._handleChildClick}"></slot>`}};ma.styles=[ua],ba([E({type:String,reflect:!0})],ma.prototype,"orientation",2),ba([T({selector:"sds-stepper-step",flatten:!0})],ma.prototype,"steps",2),ma=ba([P("sds-stepper")],ma);const _a=l`
|
|
2541
2658
|
:host {
|
|
2542
2659
|
/* Sizing */
|
|
2543
2660
|
--_sds-stepper-step-circle-size: var(--sds-stepper-circle-size, 28px);
|
|
@@ -2597,6 +2714,7 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
2597
2714
|
--_sds-stepper-step-focus-color: var(--sds-stepper-step-focus-color, var(--sds-color-states-focus-outer));
|
|
2598
2715
|
--_sds-stepper-step-focus-inner-color: var(--sds-stepper-step-focus-inner-color, var(--sds-color-states-focus-inner));
|
|
2599
2716
|
--_sds-stepper-step-focus-spacing: var(--sds-stepper-step-focus-spacing, var(--sds-color-states-focus-spacing));
|
|
2717
|
+
--_sds-stepper-step-focus-outline-size: var(--sds-stepper-step-focus-outline-size, var(--sds-color-states-focus-outline-size));
|
|
2600
2718
|
|
|
2601
2719
|
width: fit-content;
|
|
2602
2720
|
}
|
|
@@ -2668,9 +2786,9 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
2668
2786
|
cursor: pointer;
|
|
2669
2787
|
|
|
2670
2788
|
&:focus-visible {
|
|
2671
|
-
box-shadow: 0 0 0 var(--
|
|
2672
|
-
outline:
|
|
2673
|
-
outline-offset:
|
|
2789
|
+
box-shadow: 0 0 0 var(--_sds-stepper-step-focus-spacing) var(--_sds-stepper-step-focus-inner-color);
|
|
2790
|
+
outline: var(--_sds-stepper-step-focus-outline-size) solid var(--_sds-stepper-step-focus-color);
|
|
2791
|
+
outline-offset: var(--_sds-stepper-step-focus-spacing);
|
|
2674
2792
|
isolation: isolate;
|
|
2675
2793
|
}
|
|
2676
2794
|
}
|
|
@@ -2797,21 +2915,21 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
2797
2915
|
--_sds-stepper-step-counter-border-color: var(--sds-stepper-step-counter-border-color, var(--sds-color-neutral-border-strong));
|
|
2798
2916
|
--_sds-stepper-step-counter-text-color: var(--sds-stepper-step-counter-text-color, var(--sds-color-neutral-text-default));
|
|
2799
2917
|
}
|
|
2800
|
-
`;var
|
|
2918
|
+
`;var xa=Object.defineProperty,ya=Object.getOwnPropertyDescriptor,wa=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?ya(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&&xa(e,s,a),a};let ka=class extends(Et(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=()=>tt`<div class="sds-stepper-step__step--static">
|
|
2801
2919
|
<span class="sds-stepper-step__counter"></span>
|
|
2802
2920
|
<div class="sds-stepper-step__label"><slot></slot></div>
|
|
2803
|
-
</div>`,this._renderInteractiveStep=()=>
|
|
2921
|
+
</div>`,this._renderInteractiveStep=()=>tt`<button type="button" role="tab" aria-selected="${this.active?"true":"false"}" id="button" class="sds-stepper-step__step" @click="${this._handleClick}">
|
|
2804
2922
|
<span class="sds-stepper-step__counter"></span>
|
|
2805
2923
|
<div class="sds-stepper-step__label"><slot></slot></div>
|
|
2806
|
-
</button>`,this.internals=this.attachInternals()}render(){return this.interactive?
|
|
2924
|
+
</button>`,this.internals=this.attachInternals()}render(){return this.interactive?tt`<div class="sds-stepper-step">
|
|
2807
2925
|
<span class="sds-stepper-step__divider sds-stepper-step__divider--before"></span>
|
|
2808
2926
|
${this._renderInteractiveStep()}
|
|
2809
2927
|
<span class="sds-stepper-step__divider sds-stepper-step__divider--after"></span>
|
|
2810
|
-
</div>`:
|
|
2928
|
+
</div>`:tt`<div class="sds-stepper-step" role="tab" aria-disabled="true" tabindex="-1" aria-selected="false">
|
|
2811
2929
|
<span class="sds-stepper-step__divider sds-stepper-step__divider--before"></span>
|
|
2812
2930
|
${this._renderNonInteractiveStep()}
|
|
2813
2931
|
<span class="sds-stepper-step__divider sds-stepper-step__divider--after"></span>
|
|
2814
|
-
</div>`}};
|
|
2932
|
+
</div>`}};ka.styles=[_a],ka.shadowRootOptions={...mt.shadowRootOptions,delegatesFocus:!0},wa([E({type:Boolean,reflect:!0})],ka.prototype,"complete",2),wa([E({type:Boolean,reflect:!0})],ka.prototype,"interactive",2),wa([E({type:Boolean,reflect:!0})],ka.prototype,"active",2),ka=wa([P("sds-stepper-step")],ka);const za=l`
|
|
2815
2933
|
:host {
|
|
2816
2934
|
--_sds-switch-background-color: var(--sds-switch-background-color, var(--sds-color-surface-default, var(--sds-color-neutral-surface-default)));
|
|
2817
2935
|
--_sds-switch-text-color: var(--sds-switch-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
|
|
@@ -2838,9 +2956,9 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
2838
2956
|
--_sds-switch-button-position: var(--sds-switch-button-position, calc(var(--_sds-switch-button-gap) - var(--_sds-switch-border-width)));
|
|
2839
2957
|
--_sds-switch-button-radius: var(--sds-switch-button-radius, var(--sds-radius-full));
|
|
2840
2958
|
|
|
2841
|
-
--_sds-switch-focus-outline-
|
|
2842
|
-
--_sds-switch-focus-
|
|
2843
|
-
--_sds-switch-focus-
|
|
2959
|
+
--_sds-switch-focus-outline-size: var(--sds-switch-focus-outline-size, var(--sds-switch-focus-outline-width, var(--sds-color-states-focus-outline-size)));
|
|
2960
|
+
--_sds-switch-focus-color: var(--sds-switch-focus-color, var(--sds-switch-focus-outline-color, var(--sds-color-states-focus-outer)));
|
|
2961
|
+
--_sds-switch-focus-spacing: var(--sds-switch-focus-spacing, var(--sds-switch-focus-outline-offset, var(--sds-color-states-focus-spacing)));
|
|
2844
2962
|
--_sds-switch-focus-inner-color: var(--sds-switch-focus-inner-color, var(--sds-color-states-focus-inner));
|
|
2845
2963
|
|
|
2846
2964
|
--_sds-switch-disabled-opacity: var(--sds-switch-disabled-opacity, var(--sds-color-states-disabled-opacity));
|
|
@@ -2947,9 +3065,9 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
2947
3065
|
}
|
|
2948
3066
|
|
|
2949
3067
|
.sds-switch__input:focus-visible {
|
|
2950
|
-
box-shadow: 0 0 0 var(--
|
|
2951
|
-
outline: var(--_sds-switch-focus-outline-
|
|
2952
|
-
outline-offset: var(--_sds-switch-focus-
|
|
3068
|
+
box-shadow: 0 0 0 var(--_sds-switch-focus-spacing) var(--_sds-switch-focus-inner-color);
|
|
3069
|
+
outline: var(--_sds-switch-focus-outline-size) solid var(--_sds-switch-focus-color);
|
|
3070
|
+
outline-offset: var(--_sds-switch-focus-spacing);
|
|
2953
3071
|
}
|
|
2954
3072
|
|
|
2955
3073
|
.sds-switch__input:checked:not([readonly]) {
|
|
@@ -2961,7 +3079,7 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
2961
3079
|
.sds-switch__input:checked::before {
|
|
2962
3080
|
--_sds-switch-button-position: calc(var(--_sds-switch-width) - var(--_sds-switch-button-size) - var(--_sds-switch-button-gap) - var(--_sds-switch-border-width));
|
|
2963
3081
|
}
|
|
2964
|
-
`;var
|
|
3082
|
+
`;var $a=Object.defineProperty,Sa=Object.getOwnPropertyDescriptor,Ca=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?Sa(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&&$a(e,s,a),a};let Ea=class extends(ee(Et(re(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=tt`<input
|
|
2965
3083
|
class="sds-switch__input"
|
|
2966
3084
|
id="control"
|
|
2967
3085
|
type="checkbox"
|
|
@@ -2970,11 +3088,13 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
2970
3088
|
?disabled="${this.disabled}"
|
|
2971
3089
|
.checked="${this.checked}"
|
|
2972
3090
|
?checked="${this.checked}"
|
|
2973
|
-
name="${
|
|
3091
|
+
name="${Dt(this.name)}"
|
|
2974
3092
|
@change="${this._handleChange}"
|
|
2975
3093
|
@focus="${this._handleFocus}"
|
|
2976
3094
|
@blur="${this._handleBlur}"
|
|
2977
|
-
/>`,s=this.readOnly?
|
|
3095
|
+
/>`,s=this.readOnly?tt`<sds-icon name="lock-material-filled" size="${this.getIconSize()}"></sds-icon>`:st,o=this._hasSlottedLabel||Boolean(this.label),r=tt`<label class="${Jt(t)}" for="control" ?hidden="${!o}">
|
|
3096
|
+
${s}<slot name="label" @slotchange="${this._handleLabelSlotChange}">${this.label}</slot>
|
|
3097
|
+
</label>`;return tt`<div class="${Jt({"sds-switch":!0})}">${this.reverse?[r,e]:[e,r]}</div>`}};Ea.styles=[za],Ca([E({type:String,reflect:!0})],Ea.prototype,"label",2),Ca([E({type:Boolean,reflect:!0,attribute:"hide-label"})],Ea.prototype,"hideLabel",2),Ca([E({type:Boolean,reflect:!0})],Ea.prototype,"reverse",2),Ca([E({type:Boolean,reflect:!0})],Ea.prototype,"checked",2),Ca([E({type:String,reflect:!0})],Ea.prototype,"size",2),Ca([O("#control")],Ea.prototype,"control",2),Ca([A()],Ea.prototype,"_hasSlottedLabel",2),Ea=Ca([P("sds-switch")],Ea);const Aa=l`
|
|
2978
3098
|
:host {
|
|
2979
3099
|
--_sds-tag-background-color: var(--sds-tag-background-color, var(--sds-color-surface-tinted, var(--sds-color-neutral-surface-tinted)));
|
|
2980
3100
|
--_sds-tag-text-color: var(--sds-tag-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
|
|
@@ -3035,10 +3155,10 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
3035
3155
|
--_sds-tag-font-size: var(--sds-tag-font-size, var(--sds-components-font-size-content-lg));
|
|
3036
3156
|
--_sds-tag-line-height: var(--sds-tag-line-height, var(--sds-components-line-height-squeezed-lg));
|
|
3037
3157
|
}
|
|
3038
|
-
`;var
|
|
3158
|
+
`;var La=Object.defineProperty,Oa=Object.getOwnPropertyDescriptor,Ta=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?Oa(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&&La(e,s,a),a};let Pa=class extends mt{constructor(){super(...arguments),this.size="md"}render(){return tt`<span class="${Jt({"sds-tag":!0})}">
|
|
3039
3159
|
<slot></slot>
|
|
3040
|
-
</span>`}};
|
|
3041
|
-
${
|
|
3160
|
+
</span>`}};Pa.styles=[Aa],Ta([E({type:String,reflect:!0})],Pa.prototype,"size",2),Pa=Ta([P("sds-tag")],Pa);const Da=l`
|
|
3161
|
+
${n('[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}}')}
|
|
3042
3162
|
|
|
3043
3163
|
:host {
|
|
3044
3164
|
--dsc-tooltip-background: var(--sds-tooltip-background, var(--sds-color-neutral-text-default));
|
|
@@ -3120,7 +3240,7 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
3120
3240
|
border: 1px solid CanvasText;
|
|
3121
3241
|
}
|
|
3122
3242
|
}
|
|
3123
|
-
`;var
|
|
3243
|
+
`;var Ma=Object.defineProperty,qa=Object.getOwnPropertyDescriptor,Ra=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?qa(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&&Ma(e,s,a),a};let Va=class extends(Et(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 tt`<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)}};Va.styles=[Da],Ra([E({type:String,reflect:!0})],Va.prototype,"placement",2),Va=Ra([P("sds-tooltip")],Va);const Ba=l`
|
|
3124
3244
|
:host {
|
|
3125
3245
|
--_sds-text-font-family: var(--sds-text-font-family, var(--sds-typography-font-family-roboto));
|
|
3126
3246
|
--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-mobile-font-size));
|
|
@@ -3130,6 +3250,7 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
3130
3250
|
--_sds-text-text-decoration: var(--sds-text-text-decoration, inherit);
|
|
3131
3251
|
--_sds-text-text-decoration-thickness: var(--sds-text-text-decoration-thickness, var(--sds-typography-link-text-decoration-thickness));
|
|
3132
3252
|
--_sds-text-text-underline-offset: var(--sds-text-text-underline-offset, var(--sds-typography-link-text-underline-offset));
|
|
3253
|
+
--_sds-text-max-width: var(--sds-text-max-width, var(--sds-typography-max-line-width, 60ch));
|
|
3133
3254
|
|
|
3134
3255
|
display: block;
|
|
3135
3256
|
box-sizing: border-box;
|
|
@@ -3147,7 +3268,7 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
3147
3268
|
text-underline-offset: var(--_sds-text-text-underline-offset);
|
|
3148
3269
|
margin: 0;
|
|
3149
3270
|
padding: 0;
|
|
3150
|
-
max-width: var(--
|
|
3271
|
+
max-width: var(--_sds-text-max-width);
|
|
3151
3272
|
}
|
|
3152
3273
|
|
|
3153
3274
|
:host([data-palette]) {
|
|
@@ -3534,7 +3655,7 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
3534
3655
|
--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-strong-tall-desktop-line-height));
|
|
3535
3656
|
}
|
|
3536
3657
|
}
|
|
3537
|
-
`;var
|
|
3658
|
+
`;var Ha=Object.defineProperty,ja=(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&&Ha(e,s,a),a};const Fa=class extends mt{constructor(){super(...arguments),this.size="md",this.strong=!1,this.tall=!1}render(){return tt`<p><slot></slot></p>`}};Fa.styles=[Ba];let Ia=Fa;ja([E({type:String,reflect:!0})],Ia.prototype,"size"),ja([E({type:Boolean,reflect:!0})],Ia.prototype,"strong"),ja([E({type:Boolean,reflect:!0})],Ia.prototype,"tall");var Na=Object.getOwnPropertyDescriptor;let Ua=class extends Ia{};Ua=((t,e,s,o)=>{for(var r,a=o>1?void 0:o?Na(e,s):e,i=t.length-1;i>=0;i--)(r=t[i])&&(a=r(a)||a);return a})([P("sds-text")],Ua);const Wa=l`
|
|
3538
3659
|
:host {
|
|
3539
3660
|
--_sds-textfield-background-color: var(--sds-textfield-background-color, var(--sds-color-background-default, var(--sds-color-neutral-background-default)));
|
|
3540
3661
|
--_sds-textfield-text-color: var(--sds-textfield-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
|
|
@@ -3569,6 +3690,7 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
3569
3690
|
--_sds-textfield-focus-color: var(--sds-textfield-focus-color, var(--sds-color-states-focus-outer));
|
|
3570
3691
|
--_sds-textfield-focus-inner-color: var(--sds-textfield-focus-inner-color, var(--sds-color-states-focus-inner));
|
|
3571
3692
|
--_sds-textfield-focus-spacing: var(--sds-textfield-focus-spacing, var(--sds-color-states-focus-spacing));
|
|
3693
|
+
--_sds-textfield-focus-outline-size: var(--sds-textfield-focus-outline-size, var(--sds-color-states-focus-outline-size));
|
|
3572
3694
|
|
|
3573
3695
|
--_sds-textfield-cursor: var(--sds-textfield-cursor, auto);
|
|
3574
3696
|
|
|
@@ -3612,9 +3734,9 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
3612
3734
|
}
|
|
3613
3735
|
|
|
3614
3736
|
&:focus-visible {
|
|
3615
|
-
box-shadow: 0 0 0 var(--
|
|
3616
|
-
outline:
|
|
3617
|
-
outline-offset:
|
|
3737
|
+
box-shadow: 0 0 0 var(--_sds-textfield-focus-spacing) var(--_sds-textfield-focus-inner-color);
|
|
3738
|
+
outline: var(--_sds-textfield-focus-outline-size) solid var(--_sds-textfield-focus-color);
|
|
3739
|
+
outline-offset: var(--_sds-textfield-focus-spacing);
|
|
3618
3740
|
}
|
|
3619
3741
|
}
|
|
3620
3742
|
|
|
@@ -3705,27 +3827,32 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
3705
3827
|
--sds-icon-size: var(--sds-textfield-icon-size, var(--sds-components-icon-lg));
|
|
3706
3828
|
}
|
|
3707
3829
|
}
|
|
3708
|
-
`;var
|
|
3709
|
-
<div class="${
|
|
3710
|
-
|
|
3711
|
-
|
|
3830
|
+
`;var Ka=Object.defineProperty,Ga=Object.getOwnPropertyDescriptor,Ya=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?Ga(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&&Ka(e,s,a),a};let Xa=class extends(ee(Et(re(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 tt`
|
|
3831
|
+
<div class="${Jt(t)}">
|
|
3832
|
+
<label for="sds-textfield" class="sds-textfield__label" ?hidden="${!s}">
|
|
3833
|
+
${this.readOnly?tt`<sds-icon name="lock-material-filled" size="m"></sds-icon>`:st}
|
|
3834
|
+
<slot name="label" @slotchange="${this._handleLabelSlotChange}">${this.label}</slot>
|
|
3835
|
+
</label>
|
|
3836
|
+
${this.helpText?tt`<p id="help-text" class="sds-textfield__help-text">${this.helpText}</p>`:st}
|
|
3712
3837
|
<div class="sds-textfield__input-container">
|
|
3713
3838
|
<input
|
|
3714
3839
|
part="input"
|
|
3715
3840
|
class="sds-textfield__input"
|
|
3716
|
-
type="${
|
|
3841
|
+
type="${Dt(this.type)}"
|
|
3717
3842
|
id="sds-textfield"
|
|
3718
3843
|
?disabled="${this.disabled}"
|
|
3719
3844
|
?readonly="${this.readOnly}"
|
|
3720
|
-
placeholder="${
|
|
3845
|
+
placeholder="${Dt(this.placeholder)}"
|
|
3721
3846
|
.value="${this.value??""}"
|
|
3722
|
-
name="${
|
|
3723
|
-
autocomplete="${
|
|
3847
|
+
name="${Dt(this.name)}"
|
|
3848
|
+
autocomplete="${Dt(this.autocomplete)}"
|
|
3724
3849
|
?required="${this.required}"
|
|
3725
|
-
pattern="${
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3850
|
+
pattern="${Dt(this.pattern)}"
|
|
3851
|
+
min="${Dt(this.min)}"
|
|
3852
|
+
minlength="${Dt(this.minlength)}"
|
|
3853
|
+
max="${Dt(this.max)}"
|
|
3854
|
+
maxlength="${Dt(this.maxlength)}"
|
|
3855
|
+
aria-describedby="${Dt(e)}"
|
|
3729
3856
|
aria-invalid="${this.errorMessage?"true":"false"}"
|
|
3730
3857
|
@input="${this._handleInputChange}"
|
|
3731
3858
|
@change="${this._handleInputChange}"
|
|
@@ -3736,9 +3863,9 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
3736
3863
|
/>
|
|
3737
3864
|
<slot name="after" @slotchange="${this.handleSlotChange}" aria-hidden="true"></slot>
|
|
3738
3865
|
</div>
|
|
3739
|
-
${this.errorMessage?
|
|
3866
|
+
${this.errorMessage?tt`<sds-alert id="error-message" variant="secondary" data-palette="danger"><p slot="message">${this.errorMessage}</p></sds-alert>`:st}
|
|
3740
3867
|
</div>
|
|
3741
|
-
`}};
|
|
3868
|
+
`}};Xa.styles=[Wa],Ya([E({type:String,reflect:!0})],Xa.prototype,"type",2),Ya([E({type:String})],Xa.prototype,"value",2),Ya([E({type:String,reflect:!0})],Xa.prototype,"label",2),Ya([E({type:String,reflect:!0})],Xa.prototype,"placeholder",2),Ya([E({type:String,attribute:"help-text",reflect:!0})],Xa.prototype,"helpText",2),Ya([E({type:String,attribute:"error-message",reflect:!0})],Xa.prototype,"errorMessage",2),Ya([E({type:String,reflect:!0})],Xa.prototype,"autocomplete",2),Ya([E({type:Boolean,reflect:!0})],Xa.prototype,"required",2),Ya([E({type:String,reflect:!0})],Xa.prototype,"pattern",2),Ya([E({type:Number,reflect:!0})],Xa.prototype,"minlength",2),Ya([E({type:Number,reflect:!0})],Xa.prototype,"maxlength",2),Ya([E({type:String,reflect:!0})],Xa.prototype,"min",2),Ya([E({type:String,reflect:!0})],Xa.prototype,"max",2),Ya([E({type:String,reflect:!0})],Xa.prototype,"size",2),Ya([A()],Xa.prototype,"hasIcon",2),Ya([A()],Xa.prototype,"_hasSlottedLabel",2),Ya([O("#sds-textfield")],Xa.prototype,"control",2),Xa=Ya([P("sds-textfield")],Xa);const Za=l`
|
|
3742
3869
|
:host {
|
|
3743
3870
|
--_sds-textarea-background-color: var(--sds-textarea-background-color, var(--sds-color-background-default, var(--sds-color-neutral-background-default)));
|
|
3744
3871
|
--_sds-textarea-text-color: var(--sds-textarea-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
|
|
@@ -3781,6 +3908,7 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
3781
3908
|
--_sds-textarea-focus-color: var(--sds-textarea-focus-color, var(--sds-color-states-focus-outer));
|
|
3782
3909
|
--_sds-textarea-focus-inner-color: var(--sds-textarea-focus-inner-color, var(--sds-color-states-focus-inner));
|
|
3783
3910
|
--_sds-textarea-focus-spacing: var(--sds-textarea-focus-spacing, var(--sds-color-states-focus-spacing));
|
|
3911
|
+
--_sds-textarea-focus-outline-size: var(--sds-textarea-focus-outline-size, var(--sds-color-states-focus-outline-size));
|
|
3784
3912
|
|
|
3785
3913
|
all: unset;
|
|
3786
3914
|
display: block;
|
|
@@ -3800,6 +3928,7 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
3800
3928
|
|
|
3801
3929
|
.sds-textarea__input {
|
|
3802
3930
|
box-sizing: border-box;
|
|
3931
|
+
display: block;
|
|
3803
3932
|
color: var(--_sds-textarea-text-color);
|
|
3804
3933
|
padding: var(--_sds-textarea-padding-block) var(--_sds-textarea-padding-inline);
|
|
3805
3934
|
line-height: var(--_sds-textarea-line-height);
|
|
@@ -3821,9 +3950,9 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
3821
3950
|
}
|
|
3822
3951
|
|
|
3823
3952
|
&:focus-visible {
|
|
3824
|
-
box-shadow: 0 0 0 var(--
|
|
3825
|
-
outline:
|
|
3826
|
-
outline-offset:
|
|
3953
|
+
box-shadow: 0 0 0 var(--_sds-textarea-focus-spacing) var(--_sds-textarea-focus-inner-color);
|
|
3954
|
+
outline: var(--_sds-textarea-focus-outline-size) solid var(--_sds-textarea-focus-color);
|
|
3955
|
+
outline-offset: var(--_sds-textarea-focus-spacing);
|
|
3827
3956
|
}
|
|
3828
3957
|
|
|
3829
3958
|
&:active {
|
|
@@ -3841,6 +3970,13 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
3841
3970
|
max-width: var(--sds-typography-max-line-width);
|
|
3842
3971
|
}
|
|
3843
3972
|
|
|
3973
|
+
.sds-textarea__label:has(sds-icon) {
|
|
3974
|
+
align-items: center;
|
|
3975
|
+
display: flex;
|
|
3976
|
+
flex-direction: row;
|
|
3977
|
+
gap: var(--_sds-textarea-gap);
|
|
3978
|
+
}
|
|
3979
|
+
|
|
3844
3980
|
.sds-textarea__help-text {
|
|
3845
3981
|
color: var(--_sds-textarea-helptext-text-color);
|
|
3846
3982
|
font-size: var(--_sds-textarea-helptext-font-size);
|
|
@@ -3925,31 +4061,34 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
3925
4061
|
--_sds-textarea-counter-font-size: var(--sds-textarea-counter-font-size, var(--sds-components-font-size-content-lg));
|
|
3926
4062
|
--_sds-textarea-counter-line-height: var(--sds-textarea-counter-line-height, var(--sds-components-line-height-squeezed-lg));
|
|
3927
4063
|
}
|
|
3928
|
-
`;var
|
|
4064
|
+
`;var Qa=Object.defineProperty,Ja=Object.getOwnPropertyDescriptor,ti=(t,e,s,o)=>{for(var r,a=o>1?void 0:o?Ja(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&&Qa(e,s,a),a};let ei=class extends(ee(Et(re(mt)))){constructor(){super(...arguments),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()?tt`<sds-alert variant="secondary" data-palette="danger"
|
|
3929
4065
|
><p class="sds-textarea__character-counter" slot="message">Du har ${t-this.counter} tegn for mye</p></sds-alert
|
|
3930
|
-
>`:
|
|
3931
|
-
<div class="${
|
|
3932
|
-
${
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
</
|
|
4066
|
+
>`:tt`<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 tt`
|
|
4067
|
+
<div class="${Jt(s)}">
|
|
4068
|
+
<div style="${e||this.helpText?st:"display: none"}">
|
|
4069
|
+
<label for="sds-textarea" class="sds-textarea__label" ?hidden="${!e}">
|
|
4070
|
+
${this.readOnly?tt`<sds-icon name="lock-material-filled" size="m"></sds-icon>`:st}
|
|
4071
|
+
<slot name="label" @slotchange="${this._handleLabelSlotChange}">${this.label}</slot>
|
|
4072
|
+
</label>
|
|
4073
|
+
${this.helpText?tt`<p id="help-text" class="sds-textarea__help-text">${this.helpText}</p>`:st}
|
|
4074
|
+
</div>
|
|
3936
4075
|
<div class="sds-textarea__input-container">
|
|
3937
4076
|
<textarea
|
|
3938
4077
|
class="sds-textarea__input"
|
|
3939
4078
|
id="sds-textarea"
|
|
3940
4079
|
?disabled="${this.disabled}"
|
|
3941
4080
|
?readonly="${this.readOnly}"
|
|
3942
|
-
placeholder="${
|
|
4081
|
+
placeholder="${Dt(this.placeholder)}"
|
|
3943
4082
|
.value="${this.value??""}"
|
|
3944
4083
|
.autocomplete="${this.autocomplete}"
|
|
3945
|
-
name="${
|
|
4084
|
+
name="${Dt(this.name)}"
|
|
3946
4085
|
?required="${this.required}"
|
|
3947
|
-
rows="${
|
|
3948
|
-
cols="${
|
|
3949
|
-
wrap="${
|
|
3950
|
-
minlength="${
|
|
3951
|
-
maxlength="${
|
|
3952
|
-
aria-describedby="${
|
|
4086
|
+
rows="${Dt(this.rows)}"
|
|
4087
|
+
cols="${Dt(this.cols)}"
|
|
4088
|
+
wrap="${Dt(this.wrap)}"
|
|
4089
|
+
minlength="${Dt(this.minlength)}"
|
|
4090
|
+
maxlength="${Dt(this.maxlength)}"
|
|
4091
|
+
aria-describedby="${Dt(o)}"
|
|
3953
4092
|
aria-invalid="${t?"true":"false"}"
|
|
3954
4093
|
@input="${this._handleInputChange}"
|
|
3955
4094
|
@change="${this._handleInputChange}"
|
|
@@ -3958,6 +4097,7 @@ var t;const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.native
|
|
|
3958
4097
|
@blur="${this._handleBlur}"
|
|
3959
4098
|
></textarea>
|
|
3960
4099
|
</div>
|
|
3961
|
-
${this.errorMessage?
|
|
4100
|
+
${this.errorMessage?tt`<sds-alert id="error-message" variant="secondary" data-palette="danger"><p slot="message">${this.errorMessage}</p></sds-alert>`:st}
|
|
4101
|
+
${this.renderCharacterCounter()}
|
|
3962
4102
|
</div>
|
|
3963
|
-
`}};
|
|
4103
|
+
`}};ei.styles=[Za],ti([E({type:String})],ei.prototype,"value",2),ti([E({type:String,reflect:!0})],ei.prototype,"label",2),ti([E({type:String,reflect:!0})],ei.prototype,"placeholder",2),ti([E({type:String,attribute:"help-text",reflect:!0})],ei.prototype,"helpText",2),ti([E({type:String,attribute:"error-message",reflect:!0})],ei.prototype,"errorMessage",2),ti([E({type:String,reflect:!0})],ei.prototype,"autocomplete",2),ti([E({type:Boolean,reflect:!0})],ei.prototype,"required",2),ti([E({type:Number,reflect:!0})],ei.prototype,"rows",2),ti([E({type:Number,reflect:!0})],ei.prototype,"cols",2),ti([E({type:String,reflect:!0})],ei.prototype,"wrap",2),ti([E({type:Number,reflect:!0})],ei.prototype,"minlength",2),ti([E({type:Number,reflect:!0})],ei.prototype,"maxlength",2),ti([E({type:Number,reflect:!0})],ei.prototype,"counter",2),ti([E({type:String,reflect:!0})],ei.prototype,"size",2),ti([O("#sds-textarea")],ei.prototype,"control",2),ti([A()],ei.prototype,"_hasSlottedLabel",2),ei=ti([P("sds-textarea")],ei);export{fe as SDSAlert,ue as SDSButton,we as SDSCard,Ce as SDSCheckbox,Pe as SDSCheckboxGroup,Ve as SDSChip,Ie as SDSDetails,Ge as SDSDetailsGroup,ss as SDSDialog,ls as SDSHeading,Qt as SDSIcon,us as SDSLoader,ys as SDSNotification,Yr as SDSPopover,Ss as SDSProcess,Os as SDSProcessStep,ta as SDSRadio,ia as SDSRadioGroup,ga as SDSSelect,ma as SDSStepper,ka as SDSStepperStep,Ea as SDSSwitch,Pa as SDSTag,Ua as SDSText,ei as SDSTextArea,Xa as SDSTextField,Va as SDSTooltip};
|