@warp-ds/elements 2.10.0-next.14 → 2.10.0-next.15

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.
Files changed (119) hide show
  1. package/dist/custom-elements.json +372 -0
  2. package/dist/docs/attention/api.md +48 -0
  3. package/dist/docs/attention/attention.md +48 -0
  4. package/dist/docs/button/api.md +8 -0
  5. package/dist/docs/button/button.md +8 -0
  6. package/dist/docs/card/api.md +8 -0
  7. package/dist/docs/card/card.md +8 -0
  8. package/dist/docs/checkbox/api.md +48 -0
  9. package/dist/docs/checkbox/checkbox.md +48 -0
  10. package/dist/docs/checkbox-group/api.md +24 -0
  11. package/dist/docs/checkbox-group/checkbox-group.md +24 -0
  12. package/dist/docs/combobox/api.md +8 -0
  13. package/dist/docs/combobox/combobox.md +8 -0
  14. package/dist/docs/datepicker/api.md +8 -0
  15. package/dist/docs/datepicker/datepicker.md +8 -0
  16. package/dist/docs/index.md +2 -0
  17. package/dist/docs/modal/api.md +16 -0
  18. package/dist/docs/modal/modal.md +16 -0
  19. package/dist/docs/slider-thumb/api.md +16 -0
  20. package/dist/docs/slider-thumb/slider-thumb.md +16 -0
  21. package/dist/docs/snackbar/accessibility.md +20 -0
  22. package/dist/docs/snackbar/api.md +30 -0
  23. package/dist/docs/snackbar/examples.md +191 -0
  24. package/dist/docs/snackbar/snackbar.md +385 -0
  25. package/dist/docs/snackbar/styling.md +72 -0
  26. package/dist/docs/snackbar/usage.md +60 -0
  27. package/dist/docs/snackbar-item/api.md +41 -0
  28. package/dist/docs/snackbar-item/snackbar-item.md +49 -0
  29. package/dist/docs/step/api.md +16 -0
  30. package/dist/docs/step/step.md +16 -0
  31. package/dist/docs/switch/api.md +8 -0
  32. package/dist/docs/switch/switch.md +8 -0
  33. package/dist/docs/textarea/api.md +40 -0
  34. package/dist/docs/textarea/textarea.md +40 -0
  35. package/dist/docs/textfield/api.md +32 -0
  36. package/dist/docs/textfield/textfield.md +32 -0
  37. package/dist/index.d.ts +292 -1
  38. package/dist/packages/affix/affix.js +4 -4
  39. package/dist/packages/affix/affix.js.map +2 -2
  40. package/dist/packages/alert/alert.js +2 -2
  41. package/dist/packages/alert/alert.js.map +2 -2
  42. package/dist/packages/attention/attention.d.ts +5 -0
  43. package/dist/packages/attention/attention.js +14 -14
  44. package/dist/packages/attention/attention.js.map +2 -2
  45. package/dist/packages/button/button.d.ts +5 -0
  46. package/dist/packages/button/button.js +3 -3
  47. package/dist/packages/button/button.js.map +2 -2
  48. package/dist/packages/button/button.react.stories.d.ts +2 -2
  49. package/dist/packages/button/button.test.js +0 -1
  50. package/dist/packages/button/react.d.ts +1 -1
  51. package/dist/packages/datepicker/datepicker.js +1 -1
  52. package/dist/packages/datepicker/datepicker.js.map +2 -2
  53. package/dist/packages/expandable/expandable.js +9 -9
  54. package/dist/packages/expandable/expandable.js.map +4 -4
  55. package/dist/packages/global.d.ts +1 -0
  56. package/dist/packages/global.js +5 -0
  57. package/dist/packages/icon/icon.d.ts +5 -0
  58. package/dist/packages/icon/icon.js +2 -2
  59. package/dist/packages/icon/icon.js.map +2 -2
  60. package/dist/packages/interaction-type-detection.d.ts +22 -0
  61. package/dist/packages/interaction-type-detection.js +38 -0
  62. package/dist/packages/modal/modal.js +1 -1
  63. package/dist/packages/modal/modal.js.map +2 -2
  64. package/dist/packages/modal-header/modal-header.js +3 -3
  65. package/dist/packages/modal-header/modal-header.js.map +2 -2
  66. package/dist/packages/pagination/pagination.js +1 -1
  67. package/dist/packages/pagination/pagination.js.map +2 -2
  68. package/dist/packages/pill/pill.js +4 -4
  69. package/dist/packages/pill/pill.js.map +2 -2
  70. package/dist/packages/select/select.js +3 -3
  71. package/dist/packages/select/select.js.map +2 -2
  72. package/dist/packages/snackbar/locales/da/messages.d.mts +1 -0
  73. package/dist/packages/snackbar/locales/da/messages.mjs +1 -0
  74. package/dist/packages/snackbar/locales/en/messages.d.mts +1 -0
  75. package/dist/packages/snackbar/locales/en/messages.mjs +1 -0
  76. package/dist/packages/snackbar/locales/fi/messages.d.mts +1 -0
  77. package/dist/packages/snackbar/locales/fi/messages.mjs +1 -0
  78. package/dist/packages/snackbar/locales/nb/messages.d.mts +1 -0
  79. package/dist/packages/snackbar/locales/nb/messages.mjs +1 -0
  80. package/dist/packages/snackbar/locales/sv/messages.d.mts +1 -0
  81. package/dist/packages/snackbar/locales/sv/messages.mjs +1 -0
  82. package/dist/packages/snackbar/react.d.ts +2 -0
  83. package/dist/packages/snackbar/react.js +11 -0
  84. package/dist/packages/snackbar/snackbar.d.ts +132 -0
  85. package/dist/packages/snackbar/snackbar.hydration.test.d.ts +1 -0
  86. package/dist/packages/snackbar/snackbar.hydration.test.js +13 -0
  87. package/dist/packages/snackbar/snackbar.js +2646 -0
  88. package/dist/packages/snackbar/snackbar.js.map +7 -0
  89. package/dist/packages/snackbar/snackbar.react.stories.d.ts +12 -0
  90. package/dist/packages/snackbar/snackbar.react.stories.js +160 -0
  91. package/dist/packages/snackbar/snackbar.stories.d.ts +20 -0
  92. package/dist/packages/snackbar/snackbar.stories.js +291 -0
  93. package/dist/packages/snackbar/snackbar.test.d.ts +4 -0
  94. package/dist/packages/snackbar/snackbar.test.js +17 -0
  95. package/dist/packages/snackbar/styles.d.ts +1 -0
  96. package/dist/packages/snackbar/styles.js +35 -0
  97. package/dist/packages/snackbar-item/react.d.ts +5 -0
  98. package/dist/packages/snackbar-item/react.js +15 -0
  99. package/dist/packages/snackbar-item/snackbar-item.d.ts +69 -0
  100. package/dist/packages/snackbar-item/snackbar-item.js +2601 -0
  101. package/dist/packages/snackbar-item/snackbar-item.js.map +7 -0
  102. package/dist/packages/snackbar-item/snackbar-item.react.test.d.ts +1 -0
  103. package/dist/packages/snackbar-item/snackbar-item.react.test.js +5 -0
  104. package/dist/packages/snackbar-item/styles.d.ts +1 -0
  105. package/dist/packages/snackbar-item/styles.js +111 -0
  106. package/dist/packages/step/step.js +9 -9
  107. package/dist/packages/step/step.js.map +2 -2
  108. package/dist/packages/tabs/tabs.react.stories.d.ts +4 -4
  109. package/dist/packages/tabs/tabs.react.stories.js +1 -1
  110. package/dist/packages/tabs/tabs.stories.d.ts +1 -1
  111. package/dist/packages/tabs/tabs.stories.js +1 -1
  112. package/dist/packages/toast/toast.js +6 -6
  113. package/dist/packages/toast/toast.js.map +4 -4
  114. package/dist/packages/utils/element-collapse.d.ts +12 -0
  115. package/dist/packages/utils/element-collapse.js +92 -0
  116. package/dist/packages/utils/expand-transition.js +1 -1
  117. package/dist/web-types.json +88 -3
  118. package/eik/index.js +12 -12
  119. package/package.json +1 -3
@@ -126,4 +126,9 @@ declare class WarpButton extends WarpButton_base {
126
126
  resetFormControl(): void;
127
127
  render(): import("lit").TemplateResult<1>;
128
128
  }
129
+ declare global {
130
+ interface HTMLElementTagNameMap {
131
+ 'w-button': WarpButton;
132
+ }
133
+ }
129
134
  export { WarpButton };
@@ -1,4 +1,4 @@
1
- var Ne=Object.defineProperty;var je=Object.getOwnPropertyDescriptor;var le=o=>{throw TypeError(o)};var b=(o,e,r,t)=>{for(var a=t>1?void 0:t?je(e,r):e,l=o.length-1,s;l>=0;l--)(s=o[l])&&(a=(t?s(e,r,a):s(a))||a);return t&&a&&Ne(e,r,a),a};var ce=(o,e,r)=>e.has(o)||le("Cannot "+r);var de=(o,e,r)=>(ce(o,e,"read from private field"),r?r.call(o):e.get(o)),be=(o,e,r)=>e.has(o)?le("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,r),ue=(o,e,r,t)=>(ce(o,e,"write to private field"),t?t.call(o,r):e.set(o,r),r);var S=o=>typeof o=="string",Ye=o=>typeof o=="function",he=new Map,ge="en";function W(o){return[...Array.isArray(o)?o:[o],ge]}function ee(o,e,r){let t=W(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 q(()=>R("date",t,r),()=>new Intl.DateTimeFormat(t,a)).format(S(e)?new Date(e):e)}function De(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 ee(o,e,t)}function G(o,e,r){let t=W(o);return q(()=>R("number",t,r),()=>new Intl.NumberFormat(t,r)).format(e)}function ve(o,e,r,{offset:t=0,...a}){let l=W(o),s=e?q(()=>R("plural-ordinal",l),()=>new Intl.PluralRules(l,{type:"ordinal"})):q(()=>R("plural-cardinal",l),()=>new Intl.PluralRules(l,{type:"cardinal"}));return a[r]??a[s.select(r-t)]??a.other}function q(o,e){let r=o(),t=he.get(r);return t||(t=e(),he.set(r,t)),t}function R(o,e,r){let t=e.join("-");return`${o}-${t}-${JSON.stringify(r)}`}var pe=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,we=o=>o.replace(/\\u([a-fA-F0-9]{4})|\\x([a-fA-F0-9]{2})/g,(e,r,t)=>{if(r){let a=parseInt(r,16);return String.fromCharCode(a)}else{let a=parseInt(t,16);return String.fromCharCode(a)}}),me="%__lingui_octothorpe__%",qe=(o,e,r={})=>{let t=e||o,a=s=>typeof s=="object"?s:r[s],l=(s,n)=>{let h=Object.keys(r).length?a("number"):void 0,m=G(t,s,h);return n.replace(new RegExp(me,"g"),m)};return{plural:(s,n)=>{let{offset:h=0}=n,m=ve(t,!1,s,n);return l(s-h,m)},selectordinal:(s,n)=>{let{offset:h=0}=n,m=ve(t,!0,s,n);return l(s-h,m)},select:Re,number:(s,n)=>G(t,s,a(n)||{style:n}),date:(s,n)=>ee(t,s,a(n)||n),time:(s,n)=>De(t,s,a(n)||n)}},Re=(o,e)=>e[o]??e.other;function Qe(o,e,r){return(t={},a)=>{let l=qe(e,r,a),s=(h,m=!1)=>Array.isArray(h)?h.reduce((C,E)=>{if(E==="#"&&m)return C+me;if(S(E))return C+E;let[T,k,M]=E,F={};k==="plural"||k==="selectordinal"||k==="select"?Object.entries(M).forEach(([V,P])=>{F[V]=s(P,k==="plural"||k==="selectordinal")}):F=M;let f;if(k){let V=l[k];f=V(t[T],F)}else f=t[T];return f==null?C:C+f},""):h,n=s(o);return S(n)&&pe.test(n)?we(n):S(n)?n:n?String(n):""}}var Xe=Object.defineProperty,Ze=(o,e,r)=>e in o?Xe(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Ue=(o,e,r)=>(Ze(o,typeof e!="symbol"?e+"":e,r),r),J=class{constructor(){Ue(this,"_events",{})}on(e,r){var t;return(t=this._events)[e]??(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}},Be=Object.defineProperty,He=(o,e,r)=>e in o?Be(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,$=(o,e,r)=>(He(o,typeof e!="symbol"?e+"":e,r),r),K=class extends J{constructor(e){super(),$(this,"_locale",""),$(this,"_locales"),$(this,"_localeData",{}),$(this,"_messages",{}),$(this,"_missing"),$(this,"_messageCompiler"),$(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(e.locale??ge,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_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?.message;e||(e=""),S(e)||(r=e.values||r,a=e.message,e=e.id);let l=this.messages[e],s=l===void 0,n=this._missing;if(n&&s)return Ye(n)?n(this._locale,e):n;s&&this.emit("missing",{id:e,locale:this._locale});let h=l||a||e;return S(h)&&(this._messageCompiler?h=this._messageCompiler(h):console.warn(`Uncompiled message detected! Message:
1
+ var Oe=Object.defineProperty;var je=Object.getOwnPropertyDescriptor;var le=o=>{throw TypeError(o)};var b=(o,e,r,t)=>{for(var a=t>1?void 0:t?je(e,r):e,l=o.length-1,s;l>=0;l--)(s=o[l])&&(a=(t?s(e,r,a):s(a))||a);return t&&a&&Oe(e,r,a),a};var ce=(o,e,r)=>e.has(o)||le("Cannot "+r);var de=(o,e,r)=>(ce(o,e,"read from private field"),r?r.call(o):e.get(o)),be=(o,e,r)=>e.has(o)?le("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,r),ue=(o,e,r,t)=>(ce(o,e,"write to private field"),t?t.call(o,r):e.set(o,r),r);var S=o=>typeof o=="string",Ye=o=>typeof o=="function",he=new Map,ve="en";function W(o){return[...Array.isArray(o)?o:[o],ve]}function ee(o,e,r){let t=W(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 q(()=>R("date",t,r),()=>new Intl.DateTimeFormat(t,a)).format(S(e)?new Date(e):e)}function De(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 ee(o,e,t)}function G(o,e,r){let t=W(o);return q(()=>R("number",t,r),()=>new Intl.NumberFormat(t,r)).format(e)}function ge(o,e,r,{offset:t=0,...a}){let l=W(o),s=e?q(()=>R("plural-ordinal",l),()=>new Intl.PluralRules(l,{type:"ordinal"})):q(()=>R("plural-cardinal",l),()=>new Intl.PluralRules(l,{type:"cardinal"}));return a[r]??a[s.select(r-t)]??a.other}function q(o,e){let r=o(),t=he.get(r);return t||(t=e(),he.set(r,t)),t}function R(o,e,r){let t=e.join("-");return`${o}-${t}-${JSON.stringify(r)}`}var pe=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,we=o=>o.replace(/\\u([a-fA-F0-9]{4})|\\x([a-fA-F0-9]{2})/g,(e,r,t)=>{if(r){let a=parseInt(r,16);return String.fromCharCode(a)}else{let a=parseInt(t,16);return String.fromCharCode(a)}}),me="%__lingui_octothorpe__%",qe=(o,e,r={})=>{let t=e||o,a=s=>typeof s=="object"?s:r[s],l=(s,n)=>{let h=Object.keys(r).length?a("number"):void 0,m=G(t,s,h);return n.replace(new RegExp(me,"g"),m)};return{plural:(s,n)=>{let{offset:h=0}=n,m=ge(t,!1,s,n);return l(s-h,m)},selectordinal:(s,n)=>{let{offset:h=0}=n,m=ge(t,!0,s,n);return l(s-h,m)},select:Re,number:(s,n)=>G(t,s,a(n)||{style:n}),date:(s,n)=>ee(t,s,a(n)||n),time:(s,n)=>De(t,s,a(n)||n)}},Re=(o,e)=>e[o]??e.other;function Qe(o,e,r){return(t={},a)=>{let l=qe(e,r,a),s=(h,m=!1)=>Array.isArray(h)?h.reduce((C,E)=>{if(E==="#"&&m)return C+me;if(S(E))return C+E;let[$,k,M]=E,F={};k==="plural"||k==="selectordinal"||k==="select"?Object.entries(M).forEach(([V,P])=>{F[V]=s(P,k==="plural"||k==="selectordinal")}):F=M;let f;if(k){let V=l[k];f=V(t[$],F)}else f=t[$];return f==null?C:C+f},""):h,n=s(o);return S(n)&&pe.test(n)?we(n):S(n)?n:n?String(n):""}}var Xe=Object.defineProperty,Ze=(o,e,r)=>e in o?Xe(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Be=(o,e,r)=>(Ze(o,typeof e!="symbol"?e+"":e,r),r),J=class{constructor(){Be(this,"_events",{})}on(e,r){var t;return(t=this._events)[e]??(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}},Ue=Object.defineProperty,He=(o,e,r)=>e in o?Ue(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,T=(o,e,r)=>(He(o,typeof e!="symbol"?e+"":e,r),r),K=class extends J{constructor(e){super(),T(this,"_locale",""),T(this,"_locales"),T(this,"_localeData",{}),T(this,"_messages",{}),T(this,"_missing"),T(this,"_messageCompiler"),T(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(e.locale??ve,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_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?.message;e||(e=""),S(e)||(r=e.values||r,a=e.message,e=e.id);let l=this.messages[e],s=l===void 0,n=this._missing;if(n&&s)return Ye(n)?n(this._locale,e):n;s&&this.emit("missing",{id:e,locale:this._locale});let h=l||a||e;return S(h)&&(this._messageCompiler?h=this._messageCompiler(h):console.warn(`Uncompiled message detected! Message:
2
2
 
3
3
  > ${h}
4
4
 
@@ -6,7 +6,7 @@ That means you use raw catalog or your catalog doesn't have a translation for th
6
6
  ICU features such as interpolation and plurals will not work properly for that message.
7
7
 
8
8
  Please compile your catalog first.
9
- `)),S(h)&&pe.test(h)?we(h):S(h)?h:Qe(h,this._locale,this._locales)(r,t?.formats)}date(e,r){return ee(this._locales||this._locale,e,r)}number(e,r){return G(this._locales||this._locale,e,r)}};function Ge(o={}){return new K(o)}var _=Ge();var d=function(o,e,r,t){if(r==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?o!==e||!t:!e.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?t:r==="a"?t.call(o):t?t.value:e.get(o)},g=function(o,e,r,t,a){if(t==="m")throw new TypeError("Private method is not writable");if(t==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?o!==e||!a:!e.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t==="a"?a.call(o,r):a?a.value=r:e.set(o,r),r};function fe(o){var e,r,t,a,l,s,n,h,m,C,E,T,k,M,F,f,V,P,U;class Oe extends o{constructor(...i){var c,v,p;super(...i),e.add(this),this.internals=this.attachInternals(),r.set(this,!1),t.set(this,!1),a.set(this,!1),l.set(this,void 0),s.set(this,void 0),n.set(this,!0),m.set(this,""),C.set(this,()=>{g(this,a,!0,"f"),g(this,r,!0,"f"),d(this,e,"m",f).call(this)}),E.set(this,()=>{g(this,r,!1,"f"),d(this,e,"m",V).call(this,this.shouldFormValueUpdate()?d(this,m,"f"):""),!this.validity.valid&&d(this,a,"f")&&g(this,t,!0,"f");let z=d(this,e,"m",f).call(this);this.validationMessageCallback&&this.validationMessageCallback(z?this.internals.validationMessage:"")}),T.set(this,()=>{var z;d(this,n,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),g(this,n,!1,"f")),g(this,a,!0,"f"),g(this,t,!0,"f"),d(this,e,"m",f).call(this),(z=this===null||this===void 0?void 0:this.validationMessageCallback)===null||z===void 0||z.call(this,this.showError?this.internals.validationMessage:"")}),k.set(this,void 0),M.set(this,!1),F.set(this,Promise.resolve()),(c=this.addEventListener)===null||c===void 0||c.call(this,"focus",d(this,C,"f")),(v=this.addEventListener)===null||v===void 0||v.call(this,"blur",d(this,E,"f")),(p=this.addEventListener)===null||p===void 0||p.call(this,"invalid",d(this,T,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let i=this.validators.map(p=>p.attribute).flat(),c=super.observedAttributes||[];return[...new Set([...c,...i])]}static getValidator(i){return this.validators.find(c=>c.attribute===i)||null}static getValidators(i){return this.validators.filter(c=>{var v;if(c.attribute===i||!((v=c.attribute)===null||v===void 0)&&v.includes(i))return!0})}get form(){return this.internals.form}get showError(){return d(this,e,"m",f).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(i,c,v){var p;(p=super.attributeChangedCallback)===null||p===void 0||p.call(this,i,c,v);let O=this.constructor.getValidators(i);O?.length&&this.validationTarget&&this.setValue(d(this,m,"f"))}setValue(i){var c;g(this,t,!1,"f"),(c=this.validationMessageCallback)===null||c===void 0||c.call(this,""),g(this,m,i,"f");let p=this.shouldFormValueUpdate()?i:null;this.internals.setFormValue(p),d(this,e,"m",V).call(this,p),this.valueChangedCallback&&this.valueChangedCallback(p),d(this,e,"m",f).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(i=>i(d(this,F,"f")))}formResetCallback(){var i,c;g(this,a,!1,"f"),g(this,t,!1,"f"),d(this,e,"m",f).call(this),(i=this.resetFormControl)===null||i===void 0||i.call(this),(c=this.validationMessageCallback)===null||c===void 0||c.call(this,d(this,e,"m",f).call(this)?this.validationMessage:"")}}return r=new WeakMap,t=new WeakMap,a=new WeakMap,l=new WeakMap,s=new WeakMap,n=new WeakMap,m=new WeakMap,C=new WeakMap,E=new WeakMap,T=new WeakMap,k=new WeakMap,M=new WeakMap,F=new WeakMap,e=new WeakSet,h=function(){let i=this.getRootNode(),c=`${this.localName}[name="${this.getAttribute("name")}"]`;return i.querySelectorAll(c)},f=function(){if(this.hasAttribute("disabled"))return!1;let i=d(this,t,"f")||d(this,a,"f")&&!this.validity.valid&&!d(this,r,"f");return i&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),i},V=function(i){let c=this.constructor,v={},p=c.validators,z=[],O=p.some(y=>y.isValid instanceof Promise);d(this,M,"f")||(g(this,F,new Promise(y=>{g(this,k,y,"f")}),"f"),g(this,M,!0,"f")),d(this,l,"f")&&(d(this,l,"f").abort(),g(this,s,d(this,l,"f"),"f"));let N=new AbortController;g(this,l,N,"f");let j,se=!1;p.length&&(p.forEach(y=>{let B=y.key||"customError",I=y.isValid(this,i,N.signal);I instanceof Promise?(z.push(I),I.then(H=>{H!=null&&(v[B]=!H,j=d(this,e,"m",U).call(this,y,i),d(this,e,"m",P).call(this,v,j))})):(v[B]=!I,this.validity[B]!==!I&&(se=!0),!I&&!j&&(j=d(this,e,"m",U).call(this,y,i)))}),Promise.allSettled(z).then(()=>{var y;N?.signal.aborted||(g(this,M,!1,"f"),(y=d(this,k,"f"))===null||y===void 0||y.call(this))}),(se||!O)&&d(this,e,"m",P).call(this,v,j))},P=function(i,c){if(this.validationTarget)this.internals.setValidity(i,c,this.validationTarget),g(this,n,!1,"f");else{if(this.internals.setValidity(i,c),this.internals.validity.valid)return;g(this,n,!0,"f")}},U=function(i,c){if(this.validityCallback){let v=this.validityCallback(i.key||"customError");if(v)return v}return i.message instanceof Function?i.message(this,c):i.message},Oe}import{html as Z,LitElement as Pe,nothing as sr}from"lit";import{property as w,query as lr}from"lit/decorators.js";var Je=["en","nb","fi","da","sv"],re="en",Q=o=>Je.find(e=>o===e||o.toLowerCase().includes(e))||re;function ye(){if(typeof window>"u"){let o=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return Q(o)}try{let o=ke(document);if(o)return Q(o);let e=rr();if(e)return Q(e);let r=ke(Ce());return r?Q(r):re}catch(o){return console.warn("could not detect locale, falling back to source locale",o),re}}var _e=(o,e,r,t,a)=>{_.load("en",o),_.load("nb",e),_.load("fi",r),_.load("da",t),_.load("sv",a);let l=ye();_.activate(l),ze(),We()},Ke="warp-i18n-change";function ze(){typeof window>"u"||window.dispatchEvent(new Event(Ke))}var xe=!1;function We(){if(xe||typeof window>"u"||!document?.documentElement)return;xe=!0;let o=()=>{let a=ye();_.locale!==a&&(_.activate(a),ze())},e=new MutationObserver(a=>{for(let l of a)if(l.type==="attributes"&&l.attributeName==="lang"){o();break}});e.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]});let r=Ce();r&&r.documentElement&&r!==document&&e.observe(r.documentElement,{attributes:!0,attributeFilter:["lang"]});let t=er();t&&e.observe(t,{attributes:!0,attributeFilter:["lang"]})}function Ce(){try{return window.parent?.document??null}catch{return null}}function ke(o){try{return o?.documentElement?.lang??""}catch{return""}}function er(){try{return window.frameElement??null}catch{return null}}function rr(){try{return window.frameElement?.getAttribute?.("lang")??""}catch{return""}}import{html as ir,LitElement as Fe,nothing as nr}from"lit";import{property as L}from"lit/decorators.js";import{css as tr}from"lit";import{unsafeCSS as or}from"lit";var X=tr`
9
+ `)),S(h)&&pe.test(h)?we(h):S(h)?h:Qe(h,this._locale,this._locales)(r,t?.formats)}date(e,r){return ee(this._locales||this._locale,e,r)}number(e,r){return G(this._locales||this._locale,e,r)}};function Ge(o={}){return new K(o)}var _=Ge();var d=function(o,e,r,t){if(r==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?o!==e||!t:!e.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?t:r==="a"?t.call(o):t?t.value:e.get(o)},v=function(o,e,r,t,a){if(t==="m")throw new TypeError("Private method is not writable");if(t==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?o!==e||!a:!e.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t==="a"?a.call(o,r):a?a.value=r:e.set(o,r),r};function fe(o){var e,r,t,a,l,s,n,h,m,C,E,$,k,M,F,f,V,P,B;class Ne extends o{constructor(...i){var c,g,p;super(...i),e.add(this),this.internals=this.attachInternals(),r.set(this,!1),t.set(this,!1),a.set(this,!1),l.set(this,void 0),s.set(this,void 0),n.set(this,!0),m.set(this,""),C.set(this,()=>{v(this,a,!0,"f"),v(this,r,!0,"f"),d(this,e,"m",f).call(this)}),E.set(this,()=>{v(this,r,!1,"f"),d(this,e,"m",V).call(this,this.shouldFormValueUpdate()?d(this,m,"f"):""),!this.validity.valid&&d(this,a,"f")&&v(this,t,!0,"f");let z=d(this,e,"m",f).call(this);this.validationMessageCallback&&this.validationMessageCallback(z?this.internals.validationMessage:"")}),$.set(this,()=>{var z;d(this,n,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),v(this,n,!1,"f")),v(this,a,!0,"f"),v(this,t,!0,"f"),d(this,e,"m",f).call(this),(z=this===null||this===void 0?void 0:this.validationMessageCallback)===null||z===void 0||z.call(this,this.showError?this.internals.validationMessage:"")}),k.set(this,void 0),M.set(this,!1),F.set(this,Promise.resolve()),(c=this.addEventListener)===null||c===void 0||c.call(this,"focus",d(this,C,"f")),(g=this.addEventListener)===null||g===void 0||g.call(this,"blur",d(this,E,"f")),(p=this.addEventListener)===null||p===void 0||p.call(this,"invalid",d(this,$,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let i=this.validators.map(p=>p.attribute).flat(),c=super.observedAttributes||[];return[...new Set([...c,...i])]}static getValidator(i){return this.validators.find(c=>c.attribute===i)||null}static getValidators(i){return this.validators.filter(c=>{var g;if(c.attribute===i||!((g=c.attribute)===null||g===void 0)&&g.includes(i))return!0})}get form(){return this.internals.form}get showError(){return d(this,e,"m",f).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(i,c,g){var p;(p=super.attributeChangedCallback)===null||p===void 0||p.call(this,i,c,g);let N=this.constructor.getValidators(i);N?.length&&this.validationTarget&&this.setValue(d(this,m,"f"))}setValue(i){var c;v(this,t,!1,"f"),(c=this.validationMessageCallback)===null||c===void 0||c.call(this,""),v(this,m,i,"f");let p=this.shouldFormValueUpdate()?i:null;this.internals.setFormValue(p),d(this,e,"m",V).call(this,p),this.valueChangedCallback&&this.valueChangedCallback(p),d(this,e,"m",f).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(i=>i(d(this,F,"f")))}formResetCallback(){var i,c;v(this,a,!1,"f"),v(this,t,!1,"f"),d(this,e,"m",f).call(this),(i=this.resetFormControl)===null||i===void 0||i.call(this),(c=this.validationMessageCallback)===null||c===void 0||c.call(this,d(this,e,"m",f).call(this)?this.validationMessage:"")}}return r=new WeakMap,t=new WeakMap,a=new WeakMap,l=new WeakMap,s=new WeakMap,n=new WeakMap,m=new WeakMap,C=new WeakMap,E=new WeakMap,$=new WeakMap,k=new WeakMap,M=new WeakMap,F=new WeakMap,e=new WeakSet,h=function(){let i=this.getRootNode(),c=`${this.localName}[name="${this.getAttribute("name")}"]`;return i.querySelectorAll(c)},f=function(){if(this.hasAttribute("disabled"))return!1;let i=d(this,t,"f")||d(this,a,"f")&&!this.validity.valid&&!d(this,r,"f");return i&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),i},V=function(i){let c=this.constructor,g={},p=c.validators,z=[],N=p.some(y=>y.isValid instanceof Promise);d(this,M,"f")||(v(this,F,new Promise(y=>{v(this,k,y,"f")}),"f"),v(this,M,!0,"f")),d(this,l,"f")&&(d(this,l,"f").abort(),v(this,s,d(this,l,"f"),"f"));let O=new AbortController;v(this,l,O,"f");let j,se=!1;p.length&&(p.forEach(y=>{let U=y.key||"customError",I=y.isValid(this,i,O.signal);I instanceof Promise?(z.push(I),I.then(H=>{H!=null&&(g[U]=!H,j=d(this,e,"m",B).call(this,y,i),d(this,e,"m",P).call(this,g,j))})):(g[U]=!I,this.validity[U]!==!I&&(se=!0),!I&&!j&&(j=d(this,e,"m",B).call(this,y,i)))}),Promise.allSettled(z).then(()=>{var y;O?.signal.aborted||(v(this,M,!1,"f"),(y=d(this,k,"f"))===null||y===void 0||y.call(this))}),(se||!N)&&d(this,e,"m",P).call(this,g,j))},P=function(i,c){if(this.validationTarget)this.internals.setValidity(i,c,this.validationTarget),v(this,n,!1,"f");else{if(this.internals.setValidity(i,c),this.internals.validity.valid)return;v(this,n,!0,"f")}},B=function(i,c){if(this.validityCallback){let g=this.validityCallback(i.key||"customError");if(g)return g}return i.message instanceof Function?i.message(this,c):i.message},Ne}import{html as Z,LitElement as Pe,nothing as sr}from"lit";import{property as w,query as lr}from"lit/decorators.js";var Je=["en","nb","fi","da","sv"],re="en",Q=o=>Je.find(e=>o===e||o.toLowerCase().includes(e))||re;function ye(){if(typeof window>"u"){let o=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return Q(o)}try{let o=ke(document);if(o)return Q(o);let e=rr();if(e)return Q(e);let r=ke(Ce());return r?Q(r):re}catch(o){return console.warn("could not detect locale, falling back to source locale",o),re}}var _e=(o,e,r,t,a)=>{_.load("en",o),_.load("nb",e),_.load("fi",r),_.load("da",t),_.load("sv",a);let l=ye();_.activate(l),ze(),We()},Ke="warp-i18n-change";function ze(){typeof window>"u"||window.dispatchEvent(new Event(Ke))}var xe=!1;function We(){if(xe||typeof window>"u"||!document?.documentElement)return;xe=!0;let o=()=>{let a=ye();_.locale!==a&&(_.activate(a),ze())},e=new MutationObserver(a=>{for(let l of a)if(l.type==="attributes"&&l.attributeName==="lang"){o();break}});e.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]});let r=Ce();r&&r.documentElement&&r!==document&&e.observe(r.documentElement,{attributes:!0,attributeFilter:["lang"]});let t=er();t&&e.observe(t,{attributes:!0,attributeFilter:["lang"]})}function Ce(){try{return window.parent?.document??null}catch{return null}}function ke(o){try{return o?.documentElement?.lang??""}catch{return""}}function er(){try{return window.frameElement??null}catch{return null}}function rr(){try{return window.frameElement?.getAttribute?.("lang")??""}catch{return""}}import{html as ir,LitElement as Fe,nothing as nr}from"lit";import{property as L}from"lit/decorators.js";import{css as tr}from"lit";import{unsafeCSS as or}from"lit";var X=tr`
10
10
  *,
11
11
  :before,
12
12
  :after {
@@ -2917,7 +2917,7 @@ ${Se.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0
2917
2917
  >
2918
2918
  <slot></slot>
2919
2919
  </a>
2920
- `}};x.shadowRootOptions={...Fe.shadowRootOptions,delegatesFocus:!0},x.styles=[X,Me],b([L({type:Boolean,reflect:!0})],x.prototype,"autofocus",2),b([L({reflect:!0})],x.prototype,"variant",2),b([L({type:Boolean,reflect:!0})],x.prototype,"small",2),b([L({reflect:!0})],x.prototype,"href",2),b([L({type:Boolean,reflect:!0})],x.prototype,"disabled",2),b([L({reflect:!0})],x.prototype,"target",2),b([L({reflect:!0})],x.prototype,"rel",2),b([L({attribute:"full-width",type:Boolean,reflect:!0})],x.prototype,"fullWidth",2);customElements.get("w-link")||customElements.define("w-link",x);import{ifDefined as ne}from"lit/directives/if-defined.js";var Le=JSON.parse('{"button.aria.loading":["Indl\xE6ser..."]}');var Ve=JSON.parse('{"button.aria.loading":["Loading..."]}');var $e=JSON.parse('{"button.aria.loading":["Ladataan..."]}');var Te=JSON.parse('{"button.aria.loading":["Laster..."]}');var Ie=JSON.parse('{"button.aria.loading":["Laddar ..."]}');var Ae=["primary","secondary","negative","negativeQuiet","utility","pill","link","quiet","utilityQuiet","overlay","overlayInverted","overlayQuiet","overlayInvertedQuiet"],D,u=class extends fe(Pe){constructor(){super();this.autofocus=!1;this.quiet=!1;this.iconOnly=!1;this.small=!1;this.loading=!1;this.disabled=!1;this.fullWidth=!1;be(this,D);_e(Ve,Te,$e,Le,Ie),this.ariaValueTextLoading=_.t({id:"button.aria.loading",message:"Loading...",comment:"Screen reader message for buttons that are loading"})}updated(r){r.has("value")&&this.setValue(this.value)}connectedCallback(){super.connectedCallback();let r=this.variant||"secondary";if(!Ae.includes(r))throw new Error(`Invalid "variant" attribute. Set its value to one of the following:
2920
+ `}};x.shadowRootOptions={...Fe.shadowRootOptions,delegatesFocus:!0},x.styles=[X,Me],b([L({type:Boolean,reflect:!0})],x.prototype,"autofocus",2),b([L({reflect:!0})],x.prototype,"variant",2),b([L({type:Boolean,reflect:!0})],x.prototype,"small",2),b([L({reflect:!0})],x.prototype,"href",2),b([L({type:Boolean,reflect:!0})],x.prototype,"disabled",2),b([L({reflect:!0})],x.prototype,"target",2),b([L({reflect:!0})],x.prototype,"rel",2),b([L({attribute:"full-width",type:Boolean,reflect:!0})],x.prototype,"fullWidth",2);customElements.get("w-link")||customElements.define("w-link",x);import{ifDefined as ne}from"lit/directives/if-defined.js";var Le=JSON.parse('{"button.aria.loading":["Indl\xE6ser..."]}');var Ve=JSON.parse('{"button.aria.loading":["Loading..."]}');var Te=JSON.parse('{"button.aria.loading":["Ladataan..."]}');var $e=JSON.parse('{"button.aria.loading":["Laster..."]}');var Ie=JSON.parse('{"button.aria.loading":["Laddar ..."]}');var Ae=["primary","secondary","negative","negativeQuiet","utility","pill","link","quiet","utilityQuiet","overlay","overlayInverted","overlayQuiet","overlayInvertedQuiet"],D,u=class extends fe(Pe){constructor(){super();this.autofocus=!1;this.quiet=!1;this.iconOnly=!1;this.small=!1;this.loading=!1;this.disabled=!1;this.fullWidth=!1;be(this,D);_e(Ve,$e,Te,Le,Ie),this.ariaValueTextLoading=_.t({id:"button.aria.loading",message:"Loading...",comment:"Screen reader message for buttons that are loading"})}updated(r){r.has("value")&&this.setValue(this.value)}connectedCallback(){super.connectedCallback();let r=this.variant||"secondary";if(!Ae.includes(r))throw new Error(`Invalid "variant" attribute. Set its value to one of the following:
2921
2921
  ${Ae.join(", ")}.`);ue(this,D,this.value)}closestWithId(r){let t=this.shadowRoot,a=null;try{for(;t;){if(a=t.getElementById(r),a)return a;t=t.getRootNode().host?.getRootNode()}}catch{}return document.getElementById(r)}firstUpdated(){this.autofocus&&!this.href&&setTimeout(()=>this.focus(),0),this.buttonEl&&this.commandfor&&(this.buttonEl.commandForElement=this.closestWithId(this.commandfor))}_handleButtonClick(){this.type==="submit"?this.internals.form.requestSubmit():this.type==="reset"&&this.internals.form.reset()}resetFormControl(){this.value=de(this,D)}render(){let r=this.variant||"secondary";return Z` ${this.href?Z`
2922
2922
  <w-link
2923
2923
  href=${this.href}