@warp-ds/elements 2.4.0-next.11 → 2.4.0-next.12

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.
@@ -8,7 +8,6 @@ export declare class WarpStepIndicator extends LitElement {
8
8
  horizontal: boolean;
9
9
  right: boolean;
10
10
  static styles: import("lit").CSSResult[];
11
- constructor();
12
11
  updated(): void;
13
12
  updateStepsContext(): void;
14
13
  render(): import("lit").TemplateResult<1>;
@@ -1,13 +1,4 @@
1
- var ce=Object.create;var E=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var de=Object.getOwnPropertyNames;var pe=Object.getPrototypeOf,be=Object.prototype.hasOwnProperty;var P=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var ge=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of de(e))!be.call(o,a)&&a!==r&&E(o,a,{get:()=>e[a],enumerable:!(t=F(e,a))||t.enumerable});return o};var ue=(o,e,r)=>(r=o!=null?ce(pe(o)):{},ge(e||!o||!o.__esModule?E(r,"default",{value:o,enumerable:!0}):r,o));var S=(o,e,r,t)=>{for(var a=t>1?void 0:t?F(e,r):e,l=o.length-1,n;l>=0;l--)(n=o[l])&&(a=(t?n(e,r,a):n(a))||a);return t&&a&&E(e,r,a),a};var I=P(h=>{"use strict";Object.defineProperty(h,"__esModule",{value:!0});h.errorMessages=h.ErrorType=void 0;var f;(function(o){o.MalformedUnicode="MALFORMED_UNICODE",o.MalformedHexadecimal="MALFORMED_HEXADECIMAL",o.CodePointLimit="CODE_POINT_LIMIT",o.OctalDeprecation="OCTAL_DEPRECATION",o.EndOfString="END_OF_STRING"})(f=h.ErrorType||(h.ErrorType={}));h.errorMessages=new Map([[f.MalformedUnicode,"malformed Unicode character escape sequence"],[f.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[f.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[f.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[f.EndOfString,"malformed escape sequence at end of string"]])});var Z=P(p=>{"use strict";Object.defineProperty(p,"__esModule",{value:!0});p.unraw=p.errorMessages=p.ErrorType=void 0;var c=I();Object.defineProperty(p,"ErrorType",{enumerable:!0,get:function(){return c.ErrorType}});Object.defineProperty(p,"errorMessages",{enumerable:!0,get:function(){return c.errorMessages}});function he(o){return!o.match(/[^a-f0-9]/i)?parseInt(o,16):NaN}function y(o,e,r){let t=he(o);if(Number.isNaN(t)||r!==void 0&&r!==o.length)throw new SyntaxError(c.errorMessages.get(e));return t}function me(o){let e=y(o,c.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(e)}function X(o,e){let r=y(o,c.ErrorType.MalformedUnicode,4);if(e!==void 0){let t=y(e,c.ErrorType.MalformedUnicode,4);return String.fromCharCode(r,t)}return String.fromCharCode(r)}function ve(o){return o.charAt(0)==="{"&&o.charAt(o.length-1)==="}"}function fe(o){if(!ve(o))throw new SyntaxError(c.errorMessages.get(c.ErrorType.MalformedUnicode));let e=o.slice(1,-1),r=y(e,c.ErrorType.MalformedUnicode);try{return String.fromCodePoint(r)}catch(t){throw t instanceof RangeError?new SyntaxError(c.errorMessages.get(c.ErrorType.CodePointLimit)):t}}function we(o,e=!1){if(e)throw new SyntaxError(c.errorMessages.get(c.ErrorType.OctalDeprecation));let r=parseInt(o,8);return String.fromCharCode(r)}var xe=new Map([["b","\b"],["f","\f"],["n",`
2
- `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function ke(o){return xe.get(o)||o}var ye=/\\(?:(\\)|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 U(o,e=!1){return o.replace(ye,function(r,t,a,l,n,i,s,d,g){if(t!==void 0)return"\\";if(a!==void 0)return me(a);if(l!==void 0)return fe(l);if(n!==void 0)return X(n,i);if(s!==void 0)return X(s);if(d==="0")return"\0";if(d!==void 0)return we(d,!e);if(g!==void 0)return ke(g);throw new SyntaxError(c.errorMessages.get(c.ErrorType.EndOfString))})}p.unraw=U;p.default=U});var O=function(){for(var o=[],e=arguments.length;e--;)o[e]=arguments[e];return o.reduce(function(r,t){return r.concat(typeof t=="string"?t:Array.isArray(t)?O.apply(void 0,t):typeof t=="object"&&t?Object.keys(t).map(function(a){return t[a]?a:""}):"")},[]).join(" ")};import{html as Fe,LitElement as Pe}from"lit";import{property as ne}from"lit/decorators.js";var R=ue(Z(),1);var b=o=>typeof o=="string",_e=o=>typeof o=="function",H=new Map,q="en";function T(o){return[...Array.isArray(o)?o:[o],q]}function Y(o,e,r){let t=T(o);r||(r="default");let a;if(typeof r=="string")switch(a={day:"numeric",month:"short",year:"numeric"},r){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=r;return _(()=>z("date",t,r),()=>new Intl.DateTimeFormat(t,a)).format(b(e)?new Date(e):e)}function ze(o,e,r){let t;if(r||(r="default"),typeof r=="string")switch(t={second:"numeric",minute:"numeric",hour:"numeric"},r){case"full":case"long":t.timeZoneName="short";break;case"short":delete t.second}else t=r;return Y(o,e,t)}function L(o,e,r){let t=T(o);return _(()=>z("number",t,r),()=>new Intl.NumberFormat(t,r)).format(e)}function $(o,e,r,{offset:t=0,...a}){var i,s;let l=T(o),n=e?_(()=>z("plural-ordinal",l),()=>new Intl.PluralRules(l,{type:"ordinal"})):_(()=>z("plural-cardinal",l),()=>new Intl.PluralRules(l,{type:"cardinal"}));return(s=(i=a[r])!=null?i:a[n.select(r-t)])!=null?s:a.other}function _(o,e){let r=o(),t=H.get(r);return t||(t=e(),H.set(r,t)),t}function z(o,e,r){let t=e.join("-");return`${o}-${t}-${JSON.stringify(r)}`}var J=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,B="%__lingui_octothorpe__%",Me=(o,e,r={})=>{let t=e||o,a=n=>typeof n=="object"?n:r[n],l=(n,i)=>{let s=Object.keys(r).length?a("number"):void 0,d=L(t,n,s);return i.replace(new RegExp(B,"g"),d)};return{plural:(n,i)=>{let{offset:s=0}=i,d=$(t,!1,n,i);return l(n-s,d)},selectordinal:(n,i)=>{let{offset:s=0}=i,d=$(t,!0,n,i);return l(n-s,d)},select:Ce,number:(n,i)=>L(t,n,a(i)||{style:i}),date:(n,i)=>Y(t,n,a(i)||i),time:(n,i)=>ze(t,n,a(i)||i)}},Ce=(o,e)=>{var r;return(r=e[o])!=null?r:e.other};function Ee(o,e,r){return(t={},a)=>{let l=Me(e,r,a),n=(s,d=!1)=>Array.isArray(s)?s.reduce((g,x)=>{if(x==="#"&&d)return g+B;if(b(x))return g+x;let[D,u,A]=x,M={};u==="plural"||u==="selectordinal"||u==="select"?Object.entries(A).forEach(([C,le])=>{M[C]=n(le,u==="plural"||u==="selectordinal")}):M=A;let k;if(u){let C=l[u];k=C(t[D],M)}else k=t[D];return k==null?g:g+k},""):s,i=n(o);return b(i)&&J.test(i)?(0,R.unraw)(i):b(i)?i:i?String(i):""}}var Se=Object.defineProperty,Oe=(o,e,r)=>e in o?Se(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Le=(o,e,r)=>(Oe(o,typeof e!="symbol"?e+"":e,r),r),j=class{constructor(){Le(this,"_events",{})}on(e,r){var a;var t;return(a=(t=this._events)[e])!=null||(t[e]=[]),this._events[e].push(r),()=>this.removeListener(e,r)}removeListener(e,r){let t=this._getListeners(e);if(!t)return;let a=t.indexOf(r);~a&&t.splice(a,1)}emit(e,...r){let t=this._getListeners(e);t&&t.map(a=>a.apply(this,r))}_getListeners(e){let r=this._events[e];return Array.isArray(r)?r:!1}},je=Object.defineProperty,Ne=(o,e,r)=>e in o?je(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,m=(o,e,r)=>(Ne(o,typeof e!="symbol"?e+"":e,r),r),N=class extends j{constructor(e){var r;super(),m(this,"_locale",""),m(this,"_locales"),m(this,"_localeData",{}),m(this,"_messages",{}),m(this,"_missing"),m(this,"_messageCompiler"),m(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((r=e.locale)!=null?r:q,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,r){let t=this._localeData[e];t?Object.assign(t,r):this._localeData[e]=r}setMessagesCompiler(e){return this._messageCompiler=e,this}loadLocaleData(e,r){typeof e=="string"?this._loadLocaleData(e,r):Object.keys(e).forEach(t=>this._loadLocaleData(t,e[t])),this.emit("change")}_load(e,r){let t=this._messages[e];t?Object.assign(t,r):this._messages[e]=r}load(e,r){typeof e=="string"&&typeof r=="object"?this._load(e,r):Object.entries(e).forEach(([t,a])=>this._load(t,a)),this.emit("change")}loadAndActivate({locale:e,locales:r,messages:t}){this._locale=e,this._locales=r||void 0,this._messages[this._locale]=t,this.emit("change")}activate(e,r){this._locale=e,this._locales=r,this.emit("change")}_(e,r,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=""),b(e)||(r=e.values||r,a=e.message,e=e.id);let l=this.messages[e],n=l===void 0,i=this._missing;if(i&&n)return _e(i)?i(this._locale,e):i;n&&this.emit("missing",{id:e,locale:this._locale});let s=l||a||e;return b(s)&&(this._messageCompiler?s=this._messageCompiler(s):console.warn(`Uncompiled message detected! Message:
3
-
4
- > ${s}
5
-
6
- That means you use raw catalog or your catalog doesn't have a translation for the message and fallback was used.
7
- ICU features such as interpolation and plurals will not work properly for that message.
8
-
9
- Please compile your catalog first.
10
- `)),b(s)&&J.test(s)?JSON.parse(`"${s}"`):b(s)?s:Ee(s,this._locale,this._locales)(r,t==null?void 0:t.formats)}date(e,r){return Y(this._locales||this._locale,e,r)}number(e,r){return L(this._locales||this._locale,e,r)}};function Te(o={}){return new N(o)}var v=Te();var Ye=["en","nb","fi","da","sv"],V="en",G=o=>Ye.find(e=>o===e||o.toLowerCase().includes(e))||V;function De(){if(typeof window=="undefined"){let o=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return G(o)}try{let o=document.documentElement.lang;return G(o)}catch(o){return console.warn("could not detect locale, falling back to source locale",o),V}}var K=(o,e,r,t,a)=>{v.load("en",o),v.load("nb",e),v.load("fi",r),v.load("da",t),v.load("sv",a);let l=De();v.activate(l)};import{css as Q}from"lit";var W=Q`
1
+ var h=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var l=(a,t,o,r)=>{for(var e=r>1?void 0:r?u(t,o):t,n=a.length-1,d;n>=0;n--)(d=a[n])&&(e=(r?d(t,o,e):d(e))||e);return r&&e&&h(t,o,e),e};var s=function(){for(var a=[],t=arguments.length;t--;)a[t]=arguments[t];return a.reduce(function(o,r){return o.concat(typeof r=="string"?r:Array.isArray(r)?s.apply(void 0,r):typeof r=="object"&&r?Object.keys(r).map(function(e){return r[e]?e:""}):"")},[]).join(" ")};import{html as w,LitElement as f}from"lit";import{property as g}from"lit/decorators.js";import{css as c}from"lit";var b=c`
11
2
  *,
12
3
  :before,
13
4
  :after {
@@ -280,7 +271,7 @@ Please compile your catalog first.
280
271
  svg {
281
272
  pointer-events: none;
282
273
  }
283
- `,Be=Q`*, :before, :after {
274
+ `,z=c`*, :before, :after {
284
275
  --w-rotate: 0;
285
276
  --w-rotate-x: 0;
286
277
  --w-rotate-y: 0;
@@ -2446,9 +2437,9 @@ Please compile your catalog first.
2446
2437
  display: none
2447
2438
  }
2448
2439
  }
2449
- `;var ee=JSON.parse('{"steps.aria.emptyCircle":["Tom cirkel"],"steps.aria.active":["Trinindikator aktiv cirkel"],"steps.aria.completed":["Trinindikator fuldf\xF8rt cirkel"]}');var re=JSON.parse('{"steps.aria.emptyCircle":["Empty circle"],"steps.aria.active":["Step indicator active circle"],"steps.aria.completed":["Step indicator completed circle"]}');var oe=JSON.parse('{"steps.aria.emptyCircle":["Tyhj\xE4 ympyr\xE4"],"steps.aria.active":["Vaiheilmaisin aktiivinen ympyr\xE4"],"steps.aria.completed":["Vaiheilmaisin valmis ympyr\xE4"]}');var te=JSON.parse('{"steps.aria.emptyCircle":["Tom sirkel"],"steps.aria.active":["Stegindikator aktiv sirkel"],"steps.aria.completed":["Stegindikator hel sirkel"]}');var ae=JSON.parse('{"steps.aria.emptyCircle":["Tom cirkel"],"steps.aria.active":["Stegindikator aktiv cirkel"],"steps.aria.completed":["Stegindikator full\xE4ndad cirkel"]}');import{css as Ae}from"lit";var ie=Ae`*,: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}.text-center{text-align:center}.text-right{text-align:right}.border-2{border-width:2px}.rounded-full{border-radius:9999px}.flex{display:flex}.grid{display:grid}.flex-1{flex:1}.gap-x-16{column-gap:1.6rem}.gap-y-16{row-gap:1.6rem}.row-span-2{grid-row:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.row-start-1{grid-row-start:1}.row-start-2{grid-row-start:2}.col-start-2{grid-column-start:2}.grid-flow-col{grid-auto-flow:column}.grid-rows-\\[20px_auto\\]{grid-template-rows:20px auto}.grid-rows-\\[auto_20px\\]{grid-template-rows:auto 20px}.grid-cols-\\[1fr_20px_1fr\\]{grid-template-columns:1fr 20px 1fr}.grid-cols-\\[1fr_20px\\]{grid-template-columns:1fr 20px}.grid-cols-\\[20px_1fr\\]{grid-template-columns:20px 1fr}.items-center{align-items:center}.justify-self-end{justify-self:end}.justify-self-center{justify-self:center}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled{background-color:var(--w-s-color-background-disabled)}.s-bg-primary{background-color:var(--w-s-color-background-primary)}.s-icon-inverted{color:var(--w-s-color-icon-inverted)}.s-border{border-color:var(--w-s-color-border)}.s-border-primary{border-color:var(--w-s-color-border-primary)}.h-2{height:.2rem}.h-20{height:2rem}.h-full{height:100%}.w-2{width:.2rem}.w-20{width:2rem}.w-full{width:100%}.last\\:mb-0:last-child{margin-bottom:0}.px-16{padding-left:1.6rem;padding-right:1.6rem}.pb-0{padding-bottom:0}.pb-32{padding-bottom:3.2rem}.invisible{visibility:hidden}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}`;var se={wrapper:"w-full",horizontal:"flex"},w=class extends Pe{constructor(){super();this.horizontal=!1;this.right=!1;K(re,te,oe,ee,ae)}updated(){this.updateStepsContext()}updateStepsContext(){let r=this.querySelectorAll("w-step");r.forEach((t,a)=>{t.setContext({horizontal:this.horizontal,right:this.right,isLast:a===r.length-1,isFirst:a===0})})}render(){let r=O([se.wrapper,this.horizontal&&se.horizontal]);return Fe`
2450
- <div role="list" class=${r} ${this.horizontal&&"style='display: grid; grid-auto-rows: 1fr;grid-template-columns: 1fr;'"}>
2440
+ `;import{css as m}from"lit";var p=m`*,: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}.text-center{text-align:center}.text-right{text-align:right}.border-2{border-width:2px}.rounded-full{border-radius:9999px}.flex{display:flex}.grid{display:grid}.flex-1{flex:1}.gap-x-16{column-gap:1.6rem}.gap-y-16{row-gap:1.6rem}.row-span-2{grid-row:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.row-start-1{grid-row-start:1}.row-start-2{grid-row-start:2}.col-start-2{grid-column-start:2}.grid-flow-col{grid-auto-flow:column}.grid-rows-\\[20px_auto\\]{grid-template-rows:20px auto}.grid-rows-\\[auto_20px\\]{grid-template-rows:auto 20px}.grid-cols-\\[1fr_20px_1fr\\]{grid-template-columns:1fr 20px 1fr}.grid-cols-\\[1fr_20px\\]{grid-template-columns:1fr 20px}.grid-cols-\\[20px_1fr\\]{grid-template-columns:20px 1fr}.items-center{align-items:center}.justify-self-end{justify-self:end}.justify-self-center{justify-self:center}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled{background-color:var(--w-s-color-background-disabled)}.s-bg-primary{background-color:var(--w-s-color-background-primary)}.s-icon-inverted{color:var(--w-s-color-icon-inverted)}.s-border{border-color:var(--w-s-color-border)}.s-border-primary{border-color:var(--w-s-color-border-primary)}.h-2{height:.2rem}.h-20{height:2rem}.h-full{height:100%}.w-2{width:.2rem}.w-20{width:2rem}.w-full{width:100%}.last\\:mb-0:last-child{margin-bottom:0}.px-16{padding-left:1.6rem;padding-right:1.6rem}.pb-0{padding-bottom:0}.pb-32{padding-bottom:3.2rem}.invisible{visibility:hidden}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}`;var v={wrapper:"w-full",horizontal:"flex"},i=class extends f{constructor(){super(...arguments);this.horizontal=!1;this.right=!1}updated(){this.updateStepsContext()}updateStepsContext(){let o=this.querySelectorAll("w-step");o.forEach((r,e)=>{r.setContext({horizontal:this.horizontal,right:this.right,isLast:e===o.length-1,isFirst:e===0})})}render(){let o=s([v.wrapper,this.horizontal&&v.horizontal]);return w`
2441
+ <div role="list" class=${o} ${this.horizontal&&"style='display: grid; grid-auto-rows: 1fr;grid-template-columns: 1fr;'"}>
2451
2442
  <slot></slot>
2452
2443
  </div>
2453
- `}};w.styles=[W,ie],S([ne({type:Boolean,reflect:!0})],w.prototype,"horizontal",2),S([ne({type:Boolean,reflect:!0})],w.prototype,"right",2);customElements.get("w-step-indicator")||customElements.define("w-step-indicator",w);export{w as WarpStepIndicator};
2444
+ `}};i.styles=[b,p],l([g({type:Boolean,reflect:!0})],i.prototype,"horizontal",2),l([g({type:Boolean,reflect:!0})],i.prototype,"right",2);customElements.get("w-step-indicator")||customElements.define("w-step-indicator",i);export{i as WarpStepIndicator};
2454
2445
  //# sourceMappingURL=step-indicator.js.map