@warp-ds/elements 2.4.0-next.9 → 2.5.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +29 -7
- package/dist/index.d.ts +16 -14
- package/dist/packages/attention/attention.js +12 -12
- package/dist/packages/attention/attention.js.map +3 -3
- package/dist/packages/breadcrumbs/breadcrumbs.js +9 -9
- package/dist/packages/breadcrumbs/breadcrumbs.js.map +3 -3
- package/dist/packages/button/button.js +8 -8
- package/dist/packages/button/button.js.map +3 -3
- package/dist/packages/card/card.js +8 -8
- package/dist/packages/card/card.js.map +3 -3
- package/dist/packages/combobox/combobox.js +13 -13
- package/dist/packages/combobox/combobox.js.map +3 -3
- package/dist/packages/combobox/combobox.react.stories.d.ts +1 -1
- package/dist/packages/datepicker/datepicker.js +15 -15
- package/dist/packages/datepicker/datepicker.js.map +3 -3
- package/dist/packages/datepicker/datepicker.react.stories.d.ts +1 -1
- package/dist/packages/i18n.js +6 -2
- package/dist/packages/icon/icon.d.ts +27 -0
- package/dist/packages/icon/icon.js +101 -0
- package/dist/packages/icon/icon.react.stories.d.ts +28 -0
- package/dist/packages/icon/icon.react.stories.js +37 -0
- package/dist/packages/icon/icon.stories.d.ts +39 -0
- package/dist/packages/icon/icon.stories.js +43 -0
- package/dist/packages/icon/react.d.ts +2 -0
- package/dist/packages/icon/react.js +11 -0
- package/dist/packages/icon/style.d.ts +1 -0
- package/dist/packages/icon/style.js +27 -0
- package/dist/packages/modal-header/modal-header.js +7 -7
- package/dist/packages/modal-header/modal-header.js.map +3 -3
- package/dist/packages/page-indicator/locales/da/messages.mjs +1 -0
- package/dist/packages/page-indicator/locales/en/messages.mjs +1 -0
- package/dist/packages/page-indicator/locales/fi/messages.mjs +1 -0
- package/dist/packages/page-indicator/locales/nb/messages.mjs +1 -0
- package/dist/packages/page-indicator/locales/sv/messages.mjs +1 -0
- package/dist/packages/page-indicator/page-indicator.d.ts +16 -0
- package/dist/packages/page-indicator/page-indicator.js +14 -5
- package/dist/packages/page-indicator/page-indicator.js.map +4 -4
- package/dist/packages/page-indicator/page-indicator.stories.js +22 -6
- package/dist/packages/page-indicator/page-indicator.test.d.ts +1 -0
- package/dist/packages/page-indicator/page-indicator.test.js +118 -0
- package/dist/packages/pagination/pagination.js +14 -14
- package/dist/packages/pagination/pagination.js.map +3 -3
- package/dist/packages/pill/pill.js +8 -8
- package/dist/packages/pill/pill.js.map +3 -3
- package/dist/packages/select/select.js +15 -15
- package/dist/packages/select/select.js.map +3 -3
- package/dist/packages/select/select.react.stories.d.ts +1 -1
- package/dist/packages/slider/slider.js +17 -17
- package/dist/packages/slider/slider.js.map +3 -3
- package/dist/packages/step/locales/da/messages.d.mts +1 -0
- package/dist/packages/step/locales/en/messages.d.mts +1 -0
- package/dist/packages/step/locales/fi/messages.d.mts +1 -0
- package/dist/packages/step/locales/nb/messages.d.mts +1 -0
- package/dist/packages/step/locales/sv/messages.d.mts +1 -0
- package/dist/packages/step/step.js +7 -7
- package/dist/packages/step/step.js.map +4 -4
- package/dist/packages/step-indicator/step-indicator.d.ts +0 -1
- package/dist/packages/step-indicator/step-indicator.js +5 -14
- package/dist/packages/step-indicator/step-indicator.js.map +4 -4
- package/dist/packages/tabs/tabs.react.stories.js +6 -6
- package/dist/packages/textarea/textarea.react.stories.d.ts +1 -1
- package/dist/packages/textfield/textfield.react.stories.d.ts +1 -1
- package/dist/packages/toast/toast.js +8 -8
- package/dist/packages/toast/toast.js.map +3 -3
- package/dist/web-types.json +6 -6
- package/package.json +1 -1
- /package/dist/packages/{step-indicator → page-indicator}/locales/da/messages.d.mts +0 -0
- /package/dist/packages/{step-indicator → page-indicator}/locales/en/messages.d.mts +0 -0
- /package/dist/packages/{step-indicator → page-indicator}/locales/fi/messages.d.mts +0 -0
- /package/dist/packages/{step-indicator → page-indicator}/locales/nb/messages.d.mts +0 -0
- /package/dist/packages/{step-indicator → page-indicator}/locales/sv/messages.d.mts +0 -0
- /package/dist/packages/{step-indicator → step}/locales/da/messages.mjs +0 -0
- /package/dist/packages/{step-indicator → step}/locales/en/messages.mjs +0 -0
- /package/dist/packages/{step-indicator → step}/locales/fi/messages.mjs +0 -0
- /package/dist/packages/{step-indicator → step}/locales/nb/messages.mjs +0 -0
- /package/dist/packages/{step-indicator → step}/locales/sv/messages.mjs +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var Fe=Object.create;var A=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var Be=Object.getOwnPropertyNames;var Pe=Object.getPrototypeOf,$e=Object.prototype.hasOwnProperty;var q=r=>{throw TypeError(r)};var V=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var Je=(r,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Be(e))!$e.call(r,a)&&a!==o&&A(r,a,{get:()=>e[a],enumerable:!(t=U(e,a))||t.enumerable});return r};var Xe=(r,e,o)=>(o=r!=null?Fe(Pe(r)):{},Je(e||!r||!r.__esModule?A(o,"default",{value:r,enumerable:!0}):o,r));var x=(r,e,o,t)=>{for(var a=t>1?void 0:t?U(e,o):e,n=r.length-1,i;n>=0;n--)(i=r[n])&&(a=(t?i(e,o,a):i(a))||a);return t&&a&&A(e,o,a),a};var Re=(r,e,o)=>e.has(r)||q("Cannot "+o);var D=(r,e,o)=>(Re(r,e,"read from private field"),o?o.call(r):e.get(r)),K=(r,e,o)=>e.has(r)?q("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,o);var G=V(f=>{"use strict";Object.defineProperty(f,"__esModule",{value:!0});f.errorMessages=f.ErrorType=void 0;var k;(function(r){r.MalformedUnicode="MALFORMED_UNICODE",r.MalformedHexadecimal="MALFORMED_HEXADECIMAL",r.CodePointLimit="CODE_POINT_LIMIT",r.OctalDeprecation="OCTAL_DEPRECATION",r.EndOfString="END_OF_STRING"})(k=f.ErrorType||(f.ErrorType={}));f.errorMessages=new Map([[k.MalformedUnicode,"malformed Unicode character escape sequence"],[k.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[k.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[k.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[k.EndOfString,"malformed escape sequence at end of string"]])});var ee=V(g=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});g.unraw=g.errorMessages=g.ErrorType=void 0;var d=G();Object.defineProperty(g,"ErrorType",{enumerable:!0,get:function(){return d.ErrorType}});Object.defineProperty(g,"errorMessages",{enumerable:!0,get:function(){return d.errorMessages}});function Ze(r){return!r.match(/[^a-f0-9]/i)?parseInt(r,16):NaN}function C(r,e,o){let t=Ze(r);if(Number.isNaN(t)||o!==void 0&&o!==r.length)throw new SyntaxError(d.errorMessages.get(e));return t}function He(r){let e=C(r,d.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(e)}function Q(r,e){let o=C(r,d.ErrorType.MalformedUnicode,4);if(e!==void 0){let t=C(e,d.ErrorType.MalformedUnicode,4);return String.fromCharCode(o,t)}return String.fromCharCode(o)}function Ue(r){return r.charAt(0)==="{"&&r.charAt(r.length-1)==="}"}function qe(r){if(!Ue(r))throw new SyntaxError(d.errorMessages.get(d.ErrorType.MalformedUnicode));let e=r.slice(1,-1),o=C(e,d.ErrorType.MalformedUnicode);try{return String.fromCodePoint(o)}catch(t){throw t instanceof RangeError?new SyntaxError(d.errorMessages.get(d.ErrorType.CodePointLimit)):t}}function Ve(r,e=!1){if(e)throw new SyntaxError(d.errorMessages.get(d.ErrorType.OctalDeprecation));let o=parseInt(r,8);return String.fromCharCode(o)}var Ke=new Map([["b","\b"],["f","\f"],["n",`
|
|
2
|
-
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function Ge(r){return Ke.get(r)||r}var Qe=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function W(r,e=!1){return r.replace(Qe,function(o,t,a,n,i,s,
|
|
2
|
+
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function Ge(r){return Ke.get(r)||r}var Qe=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function W(r,e=!1){return r.replace(Qe,function(o,t,a,n,i,s,c,u,v){if(t!==void 0)return"\\";if(a!==void 0)return He(a);if(n!==void 0)return qe(n);if(i!==void 0)return Q(i,s);if(c!==void 0)return Q(c);if(u==="0")return"\0";if(u!==void 0)return Ve(u,!e);if(v!==void 0)return Ge(v);throw new SyntaxError(d.errorMessages.get(d.ErrorType.EndOfString))})}g.unraw=W;g.default=W});var L=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return r.reduce(function(o,t){return o.concat(typeof t=="string"?t:Array.isArray(t)?L.apply(void 0,t):typeof t=="object"&&t?Object.keys(t).map(function(a){return t[a]?a:""}):"")},[]).join(" ")};var te=Xe(ee(),1);var m=r=>typeof r=="string",We=r=>typeof r=="function",re=new Map,ae="en";function F(r){return[...Array.isArray(r)?r:[r],ae]}function B(r,e,o){let t=F(r);o||(o="default");let a;if(typeof o=="string")switch(a={day:"numeric",month:"short",year:"numeric"},o){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=o;return M(()=>O("date",t,o),()=>new Intl.DateTimeFormat(t,a)).format(m(e)?new Date(e):e)}function er(r,e,o){let t;if(o||(o="default"),typeof o=="string")switch(t={second:"numeric",minute:"numeric",hour:"numeric"},o){case"full":case"long":t.timeZoneName="short";break;case"short":delete t.second}else t=o;return B(r,e,t)}function T(r,e,o){let t=F(r);return M(()=>O("number",t,o),()=>new Intl.NumberFormat(t,o)).format(e)}function oe(r,e,o,{offset:t=0,...a}){var s,c;let n=F(r),i=e?M(()=>O("plural-ordinal",n),()=>new Intl.PluralRules(n,{type:"ordinal"})):M(()=>O("plural-cardinal",n),()=>new Intl.PluralRules(n,{type:"cardinal"}));return(c=(s=a[o])!=null?s:a[i.select(o-t)])!=null?c:a.other}function M(r,e){let o=r(),t=re.get(o);return t||(t=e(),re.set(o,t)),t}function O(r,e,o){let t=e.join("-");return`${r}-${t}-${JSON.stringify(o)}`}var ne=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,ie="%__lingui_octothorpe__%",rr=(r,e,o={})=>{let t=e||r,a=i=>typeof i=="object"?i:o[i],n=(i,s)=>{let c=Object.keys(o).length?a("number"):void 0,u=T(t,i,c);return s.replace(new RegExp(ie,"g"),u)};return{plural:(i,s)=>{let{offset:c=0}=s,u=oe(t,!1,i,s);return n(i-c,u)},selectordinal:(i,s)=>{let{offset:c=0}=s,u=oe(t,!0,i,s);return n(i-c,u)},select:or,number:(i,s)=>T(t,i,a(s)||{style:s}),date:(i,s)=>B(t,i,a(s)||s),time:(i,s)=>er(t,i,a(s)||s)}},or=(r,e)=>{var o;return(o=e[r])!=null?o:e.other};function tr(r,e,o){return(t={},a)=>{let n=rr(e,o,a),i=(c,u=!1)=>Array.isArray(c)?c.reduce((v,z)=>{if(z==="#"&&u)return v+ie;if(m(z))return v+z;let[Z,h,H]=z,N={};h==="plural"||h==="selectordinal"||h==="select"?Object.entries(H).forEach(([j,Ye])=>{N[j]=i(Ye,h==="plural"||h==="selectordinal")}):N=H;let E;if(h){let j=n[h];E=j(t[Z],N)}else E=t[Z];return E==null?v:v+E},""):c,s=i(r);return m(s)&&ne.test(s)?(0,te.unraw)(s):m(s)?s:s?String(s):""}}var ar=Object.defineProperty,nr=(r,e,o)=>e in r?ar(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,ir=(r,e,o)=>(nr(r,typeof e!="symbol"?e+"":e,o),o),I=class{constructor(){ir(this,"_events",{})}on(e,o){var a;var t;return(a=(t=this._events)[e])!=null||(t[e]=[]),this._events[e].push(o),()=>this.removeListener(e,o)}removeListener(e,o){let t=this._getListeners(e);if(!t)return;let a=t.indexOf(o);~a&&t.splice(a,1)}emit(e,...o){let t=this._getListeners(e);t&&t.map(a=>a.apply(this,o))}_getListeners(e){let o=this._events[e];return Array.isArray(o)?o:!1}},sr=Object.defineProperty,lr=(r,e,o)=>e in r?sr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,w=(r,e,o)=>(lr(r,typeof e!="symbol"?e+"":e,o),o),Y=class extends I{constructor(e){var o;super(),w(this,"_locale",""),w(this,"_locales"),w(this,"_localeData",{}),w(this,"_messages",{}),w(this,"_missing"),w(this,"_messageCompiler"),w(this,"t",this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale=="string"||e.locales)&&this.activate((o=e.locale)!=null?o:ae,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var e;return(e=this._messages[this._locale])!=null?e:{}}get localeData(){var e;return(e=this._localeData[this._locale])!=null?e:{}}_loadLocaleData(e,o){let t=this._localeData[e];t?Object.assign(t,o):this._localeData[e]=o}setMessagesCompiler(e){return this._messageCompiler=e,this}loadLocaleData(e,o){typeof e=="string"?this._loadLocaleData(e,o):Object.keys(e).forEach(t=>this._loadLocaleData(t,e[t])),this.emit("change")}_load(e,o){let t=this._messages[e];t?Object.assign(t,o):this._messages[e]=o}load(e,o){typeof e=="string"&&typeof o=="object"?this._load(e,o):Object.entries(e).forEach(([t,a])=>this._load(t,a)),this.emit("change")}loadAndActivate({locale:e,locales:o,messages:t}){this._locale=e,this._locales=o||void 0,this._messages[this._locale]=t,this.emit("change")}activate(e,o){this._locale=e,this._locales=o,this.emit("change")}_(e,o,t){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let a=t==null?void 0:t.message;e||(e=""),m(e)||(o=e.values||o,a=e.message,e=e.id);let n=this.messages[e],i=n===void 0,s=this._missing;if(s&&i)return We(s)?s(this._locale,e):s;i&&this.emit("missing",{id:e,locale:this._locale});let c=n||a||e;return m(c)&&(this._messageCompiler?c=this._messageCompiler(c):console.warn(`Uncompiled message detected! Message:
|
|
3
3
|
|
|
4
|
-
> ${
|
|
4
|
+
> ${c}
|
|
5
5
|
|
|
6
6
|
That means you use raw catalog or your catalog doesn't have a translation for the message and fallback was used.
|
|
7
7
|
ICU features such as interpolation and plurals will not work properly for that message.
|
|
8
8
|
|
|
9
9
|
Please compile your catalog first.
|
|
10
|
-
`)),m(l)&&ne.test(l)?JSON.parse(`"${l}"`):m(l)?l:tr(l,this._locale,this._locales)(o,t==null?void 0:t.formats)}date(e,o){return B(this._locales||this._locale,e,o)}number(e,o){return T(this._locales||this._locale,e,o)}};function lr(r={}){return new Y(r)}var c=lr();var P=typeof window!="undefined",se=!0;if(P){let r=window.matchMedia("(prefers-reduced-motion: reduce)"),e=({matches:o})=>se=!o;r.addEventListener&&r.addEventListener("change",e),e(r)}var ce=r=>{r.style.transition=null,r.style.backfaceVisibility=null,r.style.overflow=null},le=r=>{let e=se?"var(--f-expansion-duration, 0.3s)":"0.01s";r.style.transition=`height ${e}`,r.style.backfaceVisibility="hidden",r.style.overflow="hidden"},dr=(r,e)=>()=>{r.style.height="auto",r.style.overflow=null,e&&e()},ur=r=>()=>{r&&r()},de=(r,e)=>{let o=(()=>{if(!e)return new Promise(n=>{e=n})})(),t=dr(r,e);ce(r),r.style.height="auto";let a=r.scrollHeight;if(P&&requestAnimationFrame(()=>{r.addEventListener("transitionend",t,{once:!0}),r.style.height="0px",r.style.transitionTimingFunction="ease-out",le(r),requestAnimationFrame(()=>r.style.height=a+"px")}),o)return o},ue=(r,e)=>{let o=(()=>{if(!e)return new Promise(n=>{e=n})})(),t=ur(e);ce(r);let a=r.scrollHeight;if(P&&requestAnimationFrame(()=>{r.addEventListener("transitionend",t,{once:!0}),r.style.height=a+"px",r.style.transitionTimingFunction="ease-in",le(r),requestAnimationFrame(()=>r.style.height="0px")}),o)return o};import{css as mo,html as y,LitElement as vo}from"lit";import{property as S,state as ho}from"lit/decorators.js";import{when as fo}from"lit/directives/when.js";import{LitElement as pr}from"lit";import{unsafeStatic as gr,html as br}from"lit/static-html.js";var mr=JSON.parse('{"icon.title.warning":["Varseltrekant med utropstegn"]}'),vr=JSON.parse('{"icon.title.warning":["Warning triangle with exclamation point"]}'),hr=JSON.parse('{"icon.title.warning":["Varoituskolmio, jonka sis\xE4ll\xE4 on huutomerkki"]}'),fr=JSON.parse('{"icon.title.warning":["Advarselstrekant med et udr\xE5bstegn"]}'),wr=JSON.parse('{"icon.title.warning":["Varningstriangel med utropstecken"]}'),pe=["en","nb","fi","da","sv"],ge="en",xr=()=>{var r;let e;switch((r=process==null?void 0:process.env)==null?void 0:r.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},be=()=>{var r;let e=(r=document==null?void 0:document.location)==null?void 0:r.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":ge},$=r=>pe.find(e=>r===e||r.toLowerCase().includes(e))||be();function kr(){var r;if(typeof window=="undefined"){let e=xr();return $(e)}try{let e=(r=document==null?void 0:document.documentElement)==null?void 0:r.lang,o=be();return pe.includes(e)?$(e!=null?e:o):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),$(o))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),ge}}var yr=(r,e,o,t,a,n)=>r==="nb"?o:r==="fi"?t:r==="da"?a:r==="sv"?n:e,_r=(r,e,o,t,a)=>{let n=kr(),i=yr(n,r,e,o,t,a);c.load(n,i),c.activate(n)};_r(vr,mr,hr,fr,wr);var zr=class extends pr{render(){let r=c.t({message:"Warning triangle with exclamation point",id:"icon.title.warning",comment:"Title for warning icon"});return br`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-warning-16-part">${gr(`<title>${r}</title>`)}<path stroke="currentColor" d="m.712 14.07 6.25-12.994a1 1 0 0 1 1.792-.022l6.635 12.995a1 1 0 0 1-.89 1.455H1.613a1 1 0 0 1-.902-1.434Z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8 6v4.992M8 13v.333"></path></svg>`}};customElements.get("w-icon-warning-16")||customElements.define("w-icon-warning-16",zr);import{LitElement as Er}from"lit";import{unsafeStatic as Lr,html as Cr}from"lit/static-html.js";var Mr=JSON.parse('{"icon.title.error":["\xC5ttekant med utropstegn"]}'),Or=JSON.parse('{"icon.title.error":["Octagon with exclamation point"]}'),Sr=JSON.parse('{"icon.title.error":["Kahdeksankulmio, jonka sis\xE4ll\xE4 on huutomerkki"]}'),Nr=JSON.parse('{"icon.title.error":["Ottekant med et udr\xE5bstegn"]}'),jr=JSON.parse('{"icon.title.error":["Oktagon med utropstecken"]}'),me=["en","nb","fi","da","sv"],ve="en",Ar=()=>{var r;let e;switch((r=process==null?void 0:process.env)==null?void 0:r.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},he=()=>{var r;let e=(r=document==null?void 0:document.location)==null?void 0:r.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":ve},J=r=>me.find(e=>r===e||r.toLowerCase().includes(e))||he();function Dr(){var r;if(typeof window=="undefined"){let e=Ar();return J(e)}try{let e=(r=document==null?void 0:document.documentElement)==null?void 0:r.lang,o=he();return me.includes(e)?J(e!=null?e:o):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),J(o))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),ve}}var Tr=(r,e,o,t,a,n)=>r==="nb"?o:r==="fi"?t:r==="da"?a:r==="sv"?n:e,Ir=(r,e,o,t,a)=>{let n=Dr(),i=Tr(n,r,e,o,t,a);c.load(n,i),c.activate(n)};Ir(Or,Mr,Sr,Nr,jr);var Yr=class extends Er{render(){let r=c.t({message:"Octagon with exclamation point",id:"icon.title.error",comment:"Title for error icon"});return Cr`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-error-16-part">${Lr(`<title>${r}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M.5 11.107 4.748 15.5h6.503l4.248-4.393V4.893L11.252.5H4.748L.5 4.893z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8 11.398a.25.25 0 1 1 0-.5m0 .5a.25.25 0 1 0 0-.5"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M8 8.5V3"></path></svg>`}};customElements.get("w-icon-error-16")||customElements.define("w-icon-error-16",Yr);import{LitElement as Fr}from"lit";import{unsafeStatic as Br,html as Pr}from"lit/static-html.js";var $r=JSON.parse('{"icon.title.success":["Sirkel med sjekkmerke"]}'),Jr=JSON.parse('{"icon.title.success":["Circle with checkmark"]}'),Xr=JSON.parse('{"icon.title.success":["Ympyr\xE4, jonka sis\xE4ll\xE4 on valintamerkki"]}'),Rr=JSON.parse('{"icon.title.success":["Cirkel med et flueben"]}'),Zr=JSON.parse('{"icon.title.success":["Cirkel med bock"]}'),fe=["en","nb","fi","da","sv"],we="en",Hr=()=>{var r;let e;switch((r=process==null?void 0:process.env)==null?void 0:r.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},xe=()=>{var r;let e=(r=document==null?void 0:document.location)==null?void 0:r.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":we},X=r=>fe.find(e=>r===e||r.toLowerCase().includes(e))||xe();function Ur(){var r;if(typeof window=="undefined"){let e=Hr();return X(e)}try{let e=(r=document==null?void 0:document.documentElement)==null?void 0:r.lang,o=xe();return fe.includes(e)?X(e!=null?e:o):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),X(o))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),we}}var qr=(r,e,o,t,a,n)=>r==="nb"?o:r==="fi"?t:r==="da"?a:r==="sv"?n:e,Vr=(r,e,o,t,a)=>{let n=Ur(),i=qr(n,r,e,o,t,a);c.load(n,i),c.activate(n)};Vr(Jr,$r,Xr,Rr,Zr);var Kr=class extends Fr{render(){let r=c.t({message:"Circle with checkmark",id:"icon.title.success",comment:"Title for success icon"});return Pr`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-success-16-part">${Br(`<title>${r}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m4 8.815 1.633 2.318a.7.7 0 0 0 1.138.034l5.228-6.615"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M.5 7.999a7.5 7.5 0 1 0 15 0 7.5 7.5 0 0 0-15 0"></path></svg>`}};customElements.get("w-icon-success-16")||customElements.define("w-icon-success-16",Kr);import{LitElement as Gr}from"lit";import{unsafeStatic as Qr,html as Wr}from"lit/static-html.js";var eo=JSON.parse('{"icon.title.close":["Kryss"]}'),ro=JSON.parse('{"icon.title.close":["Cross"]}'),oo=JSON.parse('{"icon.title.close":["Rasti"]}'),to=JSON.parse('{"icon.title.close":["Kryds"]}'),ao=JSON.parse('{"icon.title.close":["Kryss"]}'),ke=["en","nb","fi","da","sv"],ye="en",no=()=>{var r;let e;switch((r=process==null?void 0:process.env)==null?void 0:r.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},_e=()=>{var r;let e=(r=document==null?void 0:document.location)==null?void 0:r.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":ye},R=r=>ke.find(e=>r===e||r.toLowerCase().includes(e))||_e();function io(){var r;if(typeof window=="undefined"){let e=no();return R(e)}try{let e=(r=document==null?void 0:document.documentElement)==null?void 0:r.lang,o=_e();return ke.includes(e)?R(e!=null?e:o):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),R(o))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),ye}}var so=(r,e,o,t,a,n)=>r==="nb"?o:r==="fi"?t:r==="da"?a:r==="sv"?n:e,co=(r,e,o,t,a)=>{let n=io(),i=so(n,r,e,o,t,a);c.load(n,i),c.activate(n)};co(ro,eo,oo,to,ao);var lo=class extends Gr{render(){let r=c.t({message:"Cross",id:"icon.title.close",comment:"Title for close icon"});return Wr`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-close-16-part">${Qr(`<title>${r}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m12.5 3.5-9 9m0-9 9 9"></path></svg>`}};customElements.get("w-icon-close-16")||customElements.define("w-icon-close-16",lo);var uo=["en","nb","fi","da","sv"],Ee="en",ze=r=>uo.find(e=>r===e||r.toLowerCase().includes(e))||Ee;function po(){if(typeof window=="undefined"){let r=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return ze(r)}try{let r=document.documentElement.lang;return ze(r)}catch(r){return console.warn("could not detect locale, falling back to source locale",r),Ee}}var go=(r,e,o,t,a,n)=>r==="nb"?o:r==="fi"?t:r==="da"?a:r==="sv"?n:e,Le=(r,e,o,t,a)=>{let n=po(),i=go(n,r,e,o,t,a);c.load(n,i),c.activate(n)};import{css as Ce}from"lit";var Me=Ce`
|
|
10
|
+
`)),m(c)&&ne.test(c)?JSON.parse(`"${c}"`):m(c)?c:tr(c,this._locale,this._locales)(o,t==null?void 0:t.formats)}date(e,o){return B(this._locales||this._locale,e,o)}number(e,o){return T(this._locales||this._locale,e,o)}};function cr(r={}){return new Y(r)}var l=cr();var P=typeof window!="undefined",se=!0;if(P){let r=window.matchMedia("(prefers-reduced-motion: reduce)"),e=({matches:o})=>se=!o;r.addEventListener&&r.addEventListener("change",e),e(r)}var le=r=>{r.style.transition=null,r.style.backfaceVisibility=null,r.style.overflow=null},ce=r=>{let e=se?"var(--f-expansion-duration, 0.3s)":"0.01s";r.style.transition=`height ${e}`,r.style.backfaceVisibility="hidden",r.style.overflow="hidden"},dr=(r,e)=>()=>{r.style.height="auto",r.style.overflow=null,e&&e()},ur=r=>()=>{r&&r()},de=(r,e)=>{let o=(()=>{if(!e)return new Promise(n=>{e=n})})(),t=dr(r,e);le(r),r.style.height="auto";let a=r.scrollHeight;if(P&&requestAnimationFrame(()=>{r.addEventListener("transitionend",t,{once:!0}),r.style.height="0px",r.style.transitionTimingFunction="ease-out",ce(r),requestAnimationFrame(()=>r.style.height=a+"px")}),o)return o},ue=(r,e)=>{let o=(()=>{if(!e)return new Promise(n=>{e=n})})(),t=ur(e);le(r);let a=r.scrollHeight;if(P&&requestAnimationFrame(()=>{r.addEventListener("transitionend",t,{once:!0}),r.style.height=a+"px",r.style.transitionTimingFunction="ease-in",ce(r),requestAnimationFrame(()=>r.style.height="0px")}),o)return o};import{css as bo,html as y,LitElement as mo}from"lit";import{property as S,state as vo}from"lit/decorators.js";import{when as ho}from"lit/directives/when.js";import{LitElement as pr}from"lit";import{unsafeStatic as gr,html as br}from"lit/static-html.js";var mr=JSON.parse('{"icon.title.warning":["Varseltrekant med utropstegn"]}'),vr=JSON.parse('{"icon.title.warning":["Warning triangle with exclamation point"]}'),hr=JSON.parse('{"icon.title.warning":["Varoituskolmio, jonka sis\xE4ll\xE4 on huutomerkki"]}'),fr=JSON.parse('{"icon.title.warning":["Advarselstrekant med et udr\xE5bstegn"]}'),wr=JSON.parse('{"icon.title.warning":["Varningstriangel med utropstecken"]}'),pe=["en","nb","fi","da","sv"],ge="en",xr=()=>{var r;let e;switch((r=process==null?void 0:process.env)==null?void 0:r.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},be=()=>{var r;let e=(r=document==null?void 0:document.location)==null?void 0:r.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":ge},$=r=>pe.find(e=>r===e||r.toLowerCase().includes(e))||be();function kr(){var r;if(typeof window=="undefined"){let e=xr();return $(e)}try{let e=(r=document==null?void 0:document.documentElement)==null?void 0:r.lang,o=be();return pe.includes(e)?$(e!=null?e:o):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),$(o))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),ge}}var yr=(r,e,o,t,a,n)=>r==="nb"?o:r==="fi"?t:r==="da"?a:r==="sv"?n:e,_r=(r,e,o,t,a)=>{let n=kr(),i=yr(n,r,e,o,t,a);l.load(n,i),l.activate(n)};_r(vr,mr,hr,fr,wr);var zr=class extends pr{render(){let r=l.t({message:"Warning triangle with exclamation point",id:"icon.title.warning",comment:"Title for warning icon"});return br`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-warning-16-part">${gr(`<title>${r}</title>`)}<path stroke="currentColor" d="m.712 14.07 6.25-12.994a1 1 0 0 1 1.792-.022l6.635 12.995a1 1 0 0 1-.89 1.455H1.613a1 1 0 0 1-.902-1.434Z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8 6v4.992M8 13v.333"></path></svg>`}};customElements.get("w-icon-warning-16")||customElements.define("w-icon-warning-16",zr);import{LitElement as Er}from"lit";import{unsafeStatic as Lr,html as Cr}from"lit/static-html.js";var Mr=JSON.parse('{"icon.title.error":["\xC5ttekant med utropstegn"]}'),Or=JSON.parse('{"icon.title.error":["Octagon with exclamation point"]}'),Sr=JSON.parse('{"icon.title.error":["Kahdeksankulmio, jonka sis\xE4ll\xE4 on huutomerkki"]}'),Nr=JSON.parse('{"icon.title.error":["Ottekant med et udr\xE5bstegn"]}'),jr=JSON.parse('{"icon.title.error":["Oktagon med utropstecken"]}'),me=["en","nb","fi","da","sv"],ve="en",Ar=()=>{var r;let e;switch((r=process==null?void 0:process.env)==null?void 0:r.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},he=()=>{var r;let e=(r=document==null?void 0:document.location)==null?void 0:r.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":ve},J=r=>me.find(e=>r===e||r.toLowerCase().includes(e))||he();function Dr(){var r;if(typeof window=="undefined"){let e=Ar();return J(e)}try{let e=(r=document==null?void 0:document.documentElement)==null?void 0:r.lang,o=he();return me.includes(e)?J(e!=null?e:o):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),J(o))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),ve}}var Tr=(r,e,o,t,a,n)=>r==="nb"?o:r==="fi"?t:r==="da"?a:r==="sv"?n:e,Ir=(r,e,o,t,a)=>{let n=Dr(),i=Tr(n,r,e,o,t,a);l.load(n,i),l.activate(n)};Ir(Or,Mr,Sr,Nr,jr);var Yr=class extends Er{render(){let r=l.t({message:"Octagon with exclamation point",id:"icon.title.error",comment:"Title for error icon"});return Cr`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-error-16-part">${Lr(`<title>${r}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M.5 11.107 4.748 15.5h6.503l4.248-4.393V4.893L11.252.5H4.748L.5 4.893z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8 11.398a.25.25 0 1 1 0-.5m0 .5a.25.25 0 1 0 0-.5"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M8 8.5V3"></path></svg>`}};customElements.get("w-icon-error-16")||customElements.define("w-icon-error-16",Yr);import{LitElement as Fr}from"lit";import{unsafeStatic as Br,html as Pr}from"lit/static-html.js";var $r=JSON.parse('{"icon.title.success":["Sirkel med sjekkmerke"]}'),Jr=JSON.parse('{"icon.title.success":["Circle with checkmark"]}'),Xr=JSON.parse('{"icon.title.success":["Ympyr\xE4, jonka sis\xE4ll\xE4 on valintamerkki"]}'),Rr=JSON.parse('{"icon.title.success":["Cirkel med et flueben"]}'),Zr=JSON.parse('{"icon.title.success":["Cirkel med bock"]}'),fe=["en","nb","fi","da","sv"],we="en",Hr=()=>{var r;let e;switch((r=process==null?void 0:process.env)==null?void 0:r.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},xe=()=>{var r;let e=(r=document==null?void 0:document.location)==null?void 0:r.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":we},X=r=>fe.find(e=>r===e||r.toLowerCase().includes(e))||xe();function Ur(){var r;if(typeof window=="undefined"){let e=Hr();return X(e)}try{let e=(r=document==null?void 0:document.documentElement)==null?void 0:r.lang,o=xe();return fe.includes(e)?X(e!=null?e:o):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),X(o))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),we}}var qr=(r,e,o,t,a,n)=>r==="nb"?o:r==="fi"?t:r==="da"?a:r==="sv"?n:e,Vr=(r,e,o,t,a)=>{let n=Ur(),i=qr(n,r,e,o,t,a);l.load(n,i),l.activate(n)};Vr(Jr,$r,Xr,Rr,Zr);var Kr=class extends Fr{render(){let r=l.t({message:"Circle with checkmark",id:"icon.title.success",comment:"Title for success icon"});return Pr`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-success-16-part">${Br(`<title>${r}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m4 8.815 1.633 2.318a.7.7 0 0 0 1.138.034l5.228-6.615"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M.5 7.999a7.5 7.5 0 1 0 15 0 7.5 7.5 0 0 0-15 0"></path></svg>`}};customElements.get("w-icon-success-16")||customElements.define("w-icon-success-16",Kr);import{LitElement as Gr}from"lit";import{unsafeStatic as Qr,html as Wr}from"lit/static-html.js";var eo=JSON.parse('{"icon.title.close":["Kryss"]}'),ro=JSON.parse('{"icon.title.close":["Cross"]}'),oo=JSON.parse('{"icon.title.close":["Rasti"]}'),to=JSON.parse('{"icon.title.close":["Kryds"]}'),ao=JSON.parse('{"icon.title.close":["Kryss"]}'),ke=["en","nb","fi","da","sv"],ye="en",no=()=>{var r;let e;switch((r=process==null?void 0:process.env)==null?void 0:r.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},_e=()=>{var r;let e=(r=document==null?void 0:document.location)==null?void 0:r.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":ye},R=r=>ke.find(e=>r===e||r.toLowerCase().includes(e))||_e();function io(){var r;if(typeof window=="undefined"){let e=no();return R(e)}try{let e=(r=document==null?void 0:document.documentElement)==null?void 0:r.lang,o=_e();return ke.includes(e)?R(e!=null?e:o):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),R(o))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),ye}}var so=(r,e,o,t,a,n)=>r==="nb"?o:r==="fi"?t:r==="da"?a:r==="sv"?n:e,lo=(r,e,o,t,a)=>{let n=io(),i=so(n,r,e,o,t,a);l.load(n,i),l.activate(n)};lo(ro,eo,oo,to,ao);var co=class extends Gr{render(){let r=l.t({message:"Cross",id:"icon.title.close",comment:"Title for close icon"});return Wr`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-close-16-part">${Qr(`<title>${r}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m12.5 3.5-9 9m0-9 9 9"></path></svg>`}};customElements.get("w-icon-close-16")||customElements.define("w-icon-close-16",co);var uo=["en","nb","fi","da","sv"],Ee="en",ze=r=>uo.find(e=>r===e||r.toLowerCase().includes(e))||Ee;function po(){if(typeof window=="undefined"){let r=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return ze(r)}try{let r=document.documentElement.lang;return ze(r)}catch(r){return console.warn("could not detect locale, falling back to source locale",r),Ee}}var Le=(r,e,o,t,a)=>{l.load("en",r),l.load("nb",e),l.load("fi",o),l.load("da",t),l.load("sv",a);let n=po();l.activate(n)};import{css as Ce}from"lit";var Me=Ce`
|
|
11
11
|
*,
|
|
12
12
|
:before,
|
|
13
13
|
:after {
|
|
@@ -280,7 +280,7 @@ Please compile your catalog first.
|
|
|
280
280
|
svg {
|
|
281
281
|
pointer-events: none;
|
|
282
282
|
}
|
|
283
|
-
`,
|
|
283
|
+
`,Qo=Ce`*, :before, :after {
|
|
284
284
|
--w-rotate: 0;
|
|
285
285
|
--w-rotate-x: 0;
|
|
286
286
|
--w-rotate-y: 0;
|
|
@@ -2446,21 +2446,21 @@ Please compile your catalog first.
|
|
|
2446
2446
|
display: none
|
|
2447
2447
|
}
|
|
2448
2448
|
}
|
|
2449
|
-
`;var Oe=JSON.parse('{"toast.aria.error":["Fejl"],"toast.aria.successful":["Fuldf\xF8rt"],"toast.aria.warning":["Advarsel"]}');var Se=JSON.parse('{"toast.aria.error":["Error"],"toast.aria.successful":["Successful"],"toast.aria.warning":["Warning"]}');var Ne=JSON.parse('{"toast.aria.error":["Virhe"],"toast.aria.successful":["Onnistui"],"toast.aria.warning":["Varoitus"]}');var je=JSON.parse('{"toast.aria.error":["Feil"],"toast.aria.successful":["Vellykket"],"toast.aria.warning":["Advarsel"]}');var Ae=JSON.parse('{"toast.aria.error":["Fel"],"toast.aria.successful":["Genomf\xF6rt"],"toast.aria.warning":["Varning"]}');import{css as
|
|
2449
|
+
`;var Oe=JSON.parse('{"toast.aria.error":["Fejl"],"toast.aria.successful":["Fuldf\xF8rt"],"toast.aria.warning":["Advarsel"]}');var Se=JSON.parse('{"toast.aria.error":["Error"],"toast.aria.successful":["Successful"],"toast.aria.warning":["Warning"]}');var Ne=JSON.parse('{"toast.aria.error":["Virhe"],"toast.aria.successful":["Onnistui"],"toast.aria.warning":["Varoitus"]}');var je=JSON.parse('{"toast.aria.error":["Feil"],"toast.aria.successful":["Vellykket"],"toast.aria.warning":["Advarsel"]}');var Ae=JSON.parse('{"toast.aria.error":["Fel"],"toast.aria.successful":["Genomf\xF6rt"],"toast.aria.warning":["Varning"]}');import{css as go}from"lit";var De=go`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.bg-transparent{background-color:#0000}.border-2{border-width:2px}.rounded-8{border-radius:8px}.rounded-full{border-radius:9999px}.block{display:block}.flex{display:flex}.grid{display:grid}.shrink-0{flex-shrink:0}.auto-rows-auto{grid-auto-rows:auto}.overflow-hidden{overflow:hidden}.self-center{align-self:center}.bottom-16{bottom:1.6rem}.left-0{left:0}.right-0{right:0}.justify-center{justify-content:center}.justify-items-center{justify-items:center}.fixed{position:fixed}.relative{position:relative}.static{position:static}.z-50{z-index:50}.s-bg-negative-subtle{background-color:var(--w-s-color-background-negative-subtle)}.s-bg-positive-subtle{background-color:var(--w-s-color-background-positive-subtle)}.s-bg-warning-subtle{background-color:var(--w-s-color-background-warning-subtle)}.s-text{color:var(--w-s-color-text)}.s-icon{color:var(--w-s-color-icon)}.s-icon-negative{color:var(--w-s-color-icon-negative)}.s-icon-positive{color:var(--w-s-color-icon-positive)}.s-icon-warning{color:var(--w-s-color-icon-warning)}.hover\\:s-icon-hover:hover{color:var(--w-s-color-icon-hover)}.active\\:s-icon-active:active{color:var(--w-s-color-icon-active)}.s-border-negative-subtle{border-color:var(--w-s-color-border-negative-subtle)}.s-border-positive-subtle{border-color:var(--w-s-color-border-positive-subtle)}.s-border-warning-subtle{border-color:var(--w-s-color-border-warning-subtle)}.w-full{width:100%}.h-\\[16px\\]{height:16px}.w-\\[16px\\]{width:16px}.mx-8{margin-left:.8rem;margin-right:.8rem}.mx-auto{margin-left:auto;margin-right:auto}.last-child\\:mb-0>:last-child{margin-bottom:0}.ml-auto{margin-left:auto}.mr-8{margin-right:.8rem}.mt-16{margin-top:1.6rem}.m-\\[8px\\]{margin:8px}.p-8{padding:.8rem}.py-4{padding-top:.4rem;padding-bottom:.4rem}.p-\\[8px\\]{padding:8px}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.translate-z-0{--w-translate-z:0rem;transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.transform{transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width:480px){.sm\\:mx-16{margin-left:1.6rem;margin-right:1.6rem}}`;var p={wrapper:"relative overflow-hidden w-full",base:"flex group p-8 mt-16 rounded-8 border-2 pointer-events-auto transition-all",positive:"s-bg-positive-subtle s-border-positive-subtle s-text",warning:"s-bg-warning-subtle s-border-warning-subtle s-text",negative:"s-bg-negative-subtle s-border-negative-subtle s-text",iconBase:"shrink-0 rounded-full w-[16px] h-[16px] m-[8px]",iconPositive:"s-icon-positive",iconWarning:"s-icon-warning",iconNegative:"s-icon-negative",iconLoading:"animate-bounce",content:"self-center mr-8 py-4 last-child:mb-0",close:"bg-transparent ml-auto p-[8px] s-icon hover:s-icon-hover active:s-icon-active"},_,Te,Ie,b=class extends mo{constructor(){super();K(this,_);this.id=Date.now().toString(36)+Math.random().toString(36).slice(2,5);this.type="success";this.text="";this.canclose=!1;this._expanded=!1;Le(Se,je,Ne,Oe,Ae)}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}updated(){!this._expanded&&this._wrapper&&de(this._wrapper,()=>this._expanded=!0)}get _wrapper(){var o,t;return(t=(o=this.renderRoot)==null?void 0:o.querySelector("section"))!=null?t:null}get _warning(){return this.type==="warning"}get _error(){return this.type==="error"}get _role(){return this._error||this._warning?"alert":"status"}get _typeLabel(){return this._warning?l._({id:"toast.aria.warning",message:"Warning",comment:"Default screenreader message for warning in toast component"}):this._error?l._({id:"toast.aria.error",message:"Error",comment:"Default screenreader message for error in toast component"}):l._({id:"toast.aria.successful",message:"Successful",comment:"Default screenreader message for successful in toast component"})}get _iconMarkup(){return this._warning?y`<w-icon-warning-16></w-icon-warning-16>`:this._error?y`<w-icon-error-16></w-icon-error-16>`:y`<w-icon-success-16></w-icon-success-16>`}async collapse(){return new Promise(o=>{this._expanded&&this._wrapper?ue(this._wrapper,o):o()})}close(){let o=new CustomEvent("close",{detail:{id:this.id},bubbles:!0,composed:!0});this.updateComplete.then(()=>this.dispatchEvent(o))}render(){return this.text?y` <section class="${p.wrapper}" aria-label="${this._typeLabel}">
|
|
2450
2450
|
<div class="${D(this,_,Te)}">
|
|
2451
2451
|
<div class="${D(this,_,Ie)}">${this._iconMarkup}</div>
|
|
2452
2452
|
<div role="${this._role}" class="${p.content}">
|
|
2453
2453
|
<p>${this.text}</p>
|
|
2454
2454
|
</div>
|
|
2455
|
-
${
|
|
2455
|
+
${ho(this.canclose===!0,()=>y`
|
|
2456
2456
|
<w-button variant="pill" small="" @click="${this.close}">
|
|
2457
2457
|
<w-icon-close-16 style="display: flex"></w-icon-close-16>
|
|
2458
2458
|
</w-button>
|
|
2459
2459
|
`)}
|
|
2460
2460
|
</div>
|
|
2461
|
-
</section>`:y``}};_=new WeakSet,Te=function(){return L([p.base,this.type==="success"&&p.positive,this.type==="warning"&&p.warning,this.type==="error"&&p.negative])},Ie=function(){return L([p.iconBase,this.type==="success"&&p.iconPositive,this.type==="warning"&&p.iconWarning,this.type==="error"&&p.iconNegative])},b.styles=[Me,De,
|
|
2461
|
+
</section>`:y``}};_=new WeakSet,Te=function(){return L([p.base,this.type==="success"&&p.positive,this.type==="warning"&&p.warning,this.type==="error"&&p.negative])},Ie=function(){return L([p.iconBase,this.type==="success"&&p.iconPositive,this.type==="warning"&&p.iconWarning,this.type==="error"&&p.iconNegative])},b.styles=[Me,De,bo`
|
|
2462
2462
|
:host {
|
|
2463
2463
|
display: block;
|
|
2464
2464
|
}
|
|
2465
|
-
`],x([S({type:String,attribute:!0,reflect:!0})],b.prototype,"id",2),x([S({type:String,attribute:!0,reflect:!0})],b.prototype,"type",2),x([S({type:String,attribute:!0,reflect:!0})],b.prototype,"text",2),x([S({type:Boolean,attribute:!0,reflect:!0})],b.prototype,"canclose",2),x([
|
|
2465
|
+
`],x([S({type:String,attribute:!0,reflect:!0})],b.prototype,"id",2),x([S({type:String,attribute:!0,reflect:!0})],b.prototype,"type",2),x([S({type:String,attribute:!0,reflect:!0})],b.prototype,"text",2),x([S({type:Boolean,attribute:!0,reflect:!0})],b.prototype,"canclose",2),x([vo()],b.prototype,"_expanded",2);customElements.get("w-toast")||customElements.define("w-toast",b);export{b as WarpToast};
|
|
2466
2466
|
//# sourceMappingURL=toast.js.map
|