@warp-ds/elements 2.10.0-next.1 → 2.10.0-next.3

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 (84) hide show
  1. package/dist/custom-elements.json +146 -69
  2. package/dist/docs/card/accessibility.md +74 -0
  3. package/dist/docs/card/api.md +9 -3
  4. package/dist/docs/card/card.md +234 -3
  5. package/dist/docs/card/examples.md +75 -0
  6. package/dist/docs/card/usage.md +76 -0
  7. package/dist/docs/combobox/accessibility.md +71 -0
  8. package/dist/docs/combobox/api.md +60 -30
  9. package/dist/docs/combobox/combobox.md +203 -30
  10. package/dist/docs/combobox/examples.md +44 -0
  11. package/dist/docs/combobox/usage.md +28 -0
  12. package/dist/docs/icon/accessibility.md +5 -0
  13. package/dist/docs/icon/api.md +37 -0
  14. package/dist/docs/icon/examples.md +45 -0
  15. package/dist/docs/icon/icon.md +107 -0
  16. package/dist/docs/icon/usage.md +11 -0
  17. package/dist/docs/link/api.md +18 -22
  18. package/dist/docs/link/examples.md +75 -0
  19. package/dist/docs/link/link.md +111 -22
  20. package/dist/docs/link/usage.md +18 -0
  21. package/dist/index.d.ts +479 -183
  22. package/dist/packages/affix/affix.js +3 -3
  23. package/dist/packages/affix/affix.js.map +4 -4
  24. package/dist/packages/alert/alert.js +1 -1
  25. package/dist/packages/alert/alert.js.map +3 -3
  26. package/dist/packages/attention/attention.js.map +4 -4
  27. package/dist/packages/attention/attention.test.js +1 -1
  28. package/dist/packages/breadcrumbs/breadcrumbs.js.map +1 -1
  29. package/dist/packages/button/button.js.map +3 -3
  30. package/dist/packages/card/card.d.ts +9 -6
  31. package/dist/packages/card/card.js.map +3 -3
  32. package/dist/packages/checkbox/checkbox.d.ts +40 -11
  33. package/dist/packages/checkbox/checkbox.js.map +2 -2
  34. package/dist/packages/checkbox/checkbox.test.js +1 -1
  35. package/dist/packages/checkbox-group/checkbox-group.a11y.test.js +1 -1
  36. package/dist/packages/checkbox-group/checkbox-group.d.ts +30 -5
  37. package/dist/packages/checkbox-group/checkbox-group.js.map +3 -3
  38. package/dist/packages/combobox/combobox.a11y.test.js +24 -0
  39. package/dist/packages/combobox/combobox.d.ts +65 -45
  40. package/dist/packages/combobox/combobox.hydration.test.js +39 -1
  41. package/dist/packages/combobox/combobox.js +13 -13
  42. package/dist/packages/combobox/combobox.js.map +4 -4
  43. package/dist/packages/combobox/combobox.stories.js +28 -15
  44. package/dist/packages/combobox/combobox.test.js +110 -0
  45. package/dist/packages/datepicker/DatePicker.test.js +1 -1
  46. package/dist/packages/datepicker/datepicker.js.map +4 -4
  47. package/dist/packages/datepicker/datepicker.test.js +1 -1
  48. package/dist/packages/expandable/expandable.js +2 -2
  49. package/dist/packages/expandable/expandable.js.map +3 -3
  50. package/dist/packages/icon/icon.d.ts +13 -3
  51. package/dist/packages/icon/icon.js +2 -2
  52. package/dist/packages/icon/icon.js.map +3 -3
  53. package/dist/packages/icon/icon.react.stories.d.ts +1 -1
  54. package/dist/packages/icon/react.d.ts +2 -2
  55. package/dist/packages/link/link.d.ts +15 -16
  56. package/dist/packages/link/link.js.map +2 -2
  57. package/dist/packages/link/link.test.js +1 -1
  58. package/dist/packages/modal-header/modal-header.js +3 -1
  59. package/dist/packages/modal-header/modal-header.js.map +4 -4
  60. package/dist/packages/page-indicator/page-indicator.js.map +1 -1
  61. package/dist/packages/pagination/pagination.js.map +4 -4
  62. package/dist/packages/pagination/pagination.test.js +1 -1
  63. package/dist/packages/pill/pill.js.map +4 -4
  64. package/dist/packages/radio/radio.test.js +1 -1
  65. package/dist/packages/radio-group/radio-group.a11y.test.js +1 -1
  66. package/dist/packages/radio-group/radio-group.js.map +1 -1
  67. package/dist/packages/select/select.js.map +4 -4
  68. package/dist/packages/slider/slider.js.map +1 -1
  69. package/dist/packages/slider/slider.test.js +1 -1
  70. package/dist/packages/slider-thumb/slider-thumb.js.map +1 -1
  71. package/dist/packages/step/step.js +1 -1
  72. package/dist/packages/step/step.js.map +4 -4
  73. package/dist/packages/switch/switch.a11y.test.js +1 -1
  74. package/dist/packages/tabs/tabs.a11y.test.js +1 -1
  75. package/dist/packages/tabs/tabs.test.js +1 -1
  76. package/dist/packages/textarea/textarea.js.map +1 -1
  77. package/dist/packages/textarea/textarea.test.js +1 -1
  78. package/dist/packages/textfield/textfield.test.js +1 -1
  79. package/dist/packages/toast/toast.js +3 -3
  80. package/dist/packages/toast/toast.js.map +4 -4
  81. package/dist/packages/toast/toast.stories.d.ts +1 -5
  82. package/dist/packages/toast/toast.stories.js +0 -17
  83. package/dist/web-types.json +147 -75
  84. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- var ve=Object.defineProperty;var fe=Object.getOwnPropertyDescriptor;var w=(o,e,r,t)=>{for(var a=t>1?void 0:t?fe(e,r):e,d=o.length-1,s;d>=0;d--)(s=o[d])&&(a=(t?s(e,r,a):s(a))||a);return t&&a&&ve(e,r,a),a};var W=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)?W.apply(void 0,t):typeof t=="object"&&t?Object.keys(t).map(function(a){return t[a]?a:""}):"")},[]).join(" ")};var F=o=>typeof o=="string",we=o=>typeof o=="function",oe=new Map,ie="en";function H(o){return[...Array.isArray(o)?o:[o],ie]}function K(o,e,r){let t=H(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 O(()=>N("date",t,r),()=>new Intl.DateTimeFormat(t,a)).format(F(e)?new Date(e):e)}function xe(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 K(o,e,t)}function G(o,e,r){let t=H(o);return O(()=>N("number",t,r),()=>new Intl.NumberFormat(t,r)).format(e)}function ae(o,e,r,{offset:t=0,...a}){var i,b;let d=H(o),s=e?O(()=>N("plural-ordinal",d),()=>new Intl.PluralRules(d,{type:"ordinal"})):O(()=>N("plural-cardinal",d),()=>new Intl.PluralRules(d,{type:"cardinal"}));return(b=(i=a[r])!=null?i:a[s.select(r-t)])!=null?b:a.other}function O(o,e){let r=o(),t=oe.get(r);return t||(t=e(),oe.set(r,t)),t}function N(o,e,r){let t=e.join("-");return`${o}-${t}-${JSON.stringify(r)}`}var ne=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,se=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)}}),le="%__lingui_octothorpe__%",ke=(o,e,r={})=>{let t=e||o,a=s=>typeof s=="object"?s:r[s],d=(s,i)=>{let b=Object.keys(r).length?a("number"):void 0,g=G(t,s,b);return i.replace(new RegExp(le,"g"),g)};return{plural:(s,i)=>{let{offset:b=0}=i,g=ae(t,!1,s,i);return d(s-b,g)},selectordinal:(s,i)=>{let{offset:b=0}=i,g=ae(t,!0,s,i);return d(s-b,g)},select:ye,number:(s,i)=>G(t,s,a(i)||{style:i}),date:(s,i)=>K(t,s,a(i)||i),time:(s,i)=>xe(t,s,a(i)||i)}},ye=(o,e)=>{var r;return(r=e[o])!=null?r:e.other};function _e(o,e,r){return(t={},a)=>{let d=ke(e,r,a),s=(b,g=!1)=>Array.isArray(b)?b.reduce((y,_)=>{if(_==="#"&&g)return y+le;if(F(_))return y+_;let[P,v,z]=_,C={};v==="plural"||v==="selectordinal"||v==="select"?Object.entries(z).forEach(([M,T])=>{C[M]=s(T,v==="plural"||v==="selectordinal")}):C=z;let m;if(v){let M=d[v];m=M(t[P],C)}else m=t[P];return m==null?y:y+m},""):b,i=s(o);return F(i)&&ne.test(i)?se(i):F(i)?i:i?String(i):""}}var ze=Object.defineProperty,Ce=(o,e,r)=>e in o?ze(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Fe=(o,e,r)=>(Ce(o,typeof e!="symbol"?e+"":e,r),r),U=class{constructor(){Fe(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}},Ee=Object.defineProperty,Me=(o,e,r)=>e in o?Ee(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,L=(o,e,r)=>(Me(o,typeof e!="symbol"?e+"":e,r),r),q=class extends U{constructor(e){var r;super(),L(this,"_locale",""),L(this,"_locales"),L(this,"_localeData",{}),L(this,"_messages",{}),L(this,"_missing"),L(this,"_messageCompiler"),L(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:ie,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=""),F(e)||(r=e.values||r,a=e.message,e=e.id);let d=this.messages[e],s=d===void 0,i=this._missing;if(i&&s)return we(i)?i(this._locale,e):i;s&&this.emit("missing",{id:e,locale:this._locale});let b=d||a||e;return F(b)&&(this._messageCompiler?b=this._messageCompiler(b):console.warn(`Uncompiled message detected! Message:
1
+ var ve=Object.defineProperty;var fe=Object.getOwnPropertyDescriptor;var w=(o,e,r,t)=>{for(var a=t>1?void 0:t?fe(e,r):e,d=o.length-1,s;d>=0;d--)(s=o[d])&&(a=(t?s(e,r,a):s(a))||a);return t&&a&&ve(e,r,a),a};var B=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)?B.apply(void 0,t):typeof t=="object"&&t?Object.keys(t).map(function(a){return t[a]?a:""}):"")},[]).join(" ")};var F=o=>typeof o=="string",we=o=>typeof o=="function",oe=new Map,ie="en";function H(o){return[...Array.isArray(o)?o:[o],ie]}function K(o,e,r){let t=H(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 O(()=>N("date",t,r),()=>new Intl.DateTimeFormat(t,a)).format(F(e)?new Date(e):e)}function xe(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 K(o,e,t)}function G(o,e,r){let t=H(o);return O(()=>N("number",t,r),()=>new Intl.NumberFormat(t,r)).format(e)}function ae(o,e,r,{offset:t=0,...a}){var i,b;let d=H(o),s=e?O(()=>N("plural-ordinal",d),()=>new Intl.PluralRules(d,{type:"ordinal"})):O(()=>N("plural-cardinal",d),()=>new Intl.PluralRules(d,{type:"cardinal"}));return(b=(i=a[r])!=null?i:a[s.select(r-t)])!=null?b:a.other}function O(o,e){let r=o(),t=oe.get(r);return t||(t=e(),oe.set(r,t)),t}function N(o,e,r){let t=e.join("-");return`${o}-${t}-${JSON.stringify(r)}`}var ne=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,se=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)}}),le="%__lingui_octothorpe__%",ke=(o,e,r={})=>{let t=e||o,a=s=>typeof s=="object"?s:r[s],d=(s,i)=>{let b=Object.keys(r).length?a("number"):void 0,g=G(t,s,b);return i.replace(new RegExp(le,"g"),g)};return{plural:(s,i)=>{let{offset:b=0}=i,g=ae(t,!1,s,i);return d(s-b,g)},selectordinal:(s,i)=>{let{offset:b=0}=i,g=ae(t,!0,s,i);return d(s-b,g)},select:ye,number:(s,i)=>G(t,s,a(i)||{style:i}),date:(s,i)=>K(t,s,a(i)||i),time:(s,i)=>xe(t,s,a(i)||i)}},ye=(o,e)=>{var r;return(r=e[o])!=null?r:e.other};function _e(o,e,r){return(t={},a)=>{let d=ke(e,r,a),s=(b,g=!1)=>Array.isArray(b)?b.reduce((y,_)=>{if(_==="#"&&g)return y+le;if(F(_))return y+_;let[P,v,z]=_,C={};v==="plural"||v==="selectordinal"||v==="select"?Object.entries(z).forEach(([M,T])=>{C[M]=s(T,v==="plural"||v==="selectordinal")}):C=z;let m;if(v){let M=d[v];m=M(t[P],C)}else m=t[P];return m==null?y:y+m},""):b,i=s(o);return F(i)&&ne.test(i)?se(i):F(i)?i:i?String(i):""}}var ze=Object.defineProperty,Ce=(o,e,r)=>e in o?ze(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Fe=(o,e,r)=>(Ce(o,typeof e!="symbol"?e+"":e,r),r),U=class{constructor(){Fe(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}},Ee=Object.defineProperty,Me=(o,e,r)=>e in o?Ee(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,L=(o,e,r)=>(Me(o,typeof e!="symbol"?e+"":e,r),r),q=class extends U{constructor(e){var r;super(),L(this,"_locale",""),L(this,"_locales"),L(this,"_localeData",{}),L(this,"_messages",{}),L(this,"_missing"),L(this,"_messageCompiler"),L(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:ie,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=""),F(e)||(r=e.values||r,a=e.message,e=e.id);let d=this.messages[e],s=d===void 0,i=this._missing;if(i&&s)return we(i)?i(this._locale,e):i;s&&this.emit("missing",{id:e,locale:this._locale});let b=d||a||e;return F(b)&&(this._messageCompiler?b=this._messageCompiler(b):console.warn(`Uncompiled message detected! Message:
2
2
 
3
3
  > ${b}
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
- `)),F(b)&&ne.test(b)?se(b):F(b)?b:_e(b,this._locale,this._locales)(r,t==null?void 0:t.formats)}date(e,r){return K(this._locales||this._locale,e,r)}number(e,r){return G(this._locales||this._locale,e,r)}};function Le(o={}){return new q(o)}var J=Le();import{html as Y,LitElement as Ie}from"lit";import{property as A}from"lit/decorators.js";var c=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)},h=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 ce(o){var e,r,t,a,d,s,i,b,g,y,_,P,v,z,C,m,M,T,X;class me extends o{constructor(...n){var l,u,p;super(...n),e.add(this),this.internals=this.attachInternals(),r.set(this,!1),t.set(this,!1),a.set(this,!1),d.set(this,void 0),s.set(this,void 0),i.set(this,!0),g.set(this,""),y.set(this,()=>{h(this,a,!0,"f"),h(this,r,!0,"f"),c(this,e,"m",m).call(this)}),_.set(this,()=>{h(this,r,!1,"f"),c(this,e,"m",M).call(this,this.shouldFormValueUpdate()?c(this,g,"f"):""),!this.validity.valid&&c(this,a,"f")&&h(this,t,!0,"f");let x=c(this,e,"m",m).call(this);this.validationMessageCallback&&this.validationMessageCallback(x?this.internals.validationMessage:"")}),P.set(this,()=>{var x;c(this,i,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),h(this,i,!1,"f")),h(this,a,!0,"f"),h(this,t,!0,"f"),c(this,e,"m",m).call(this),(x=this===null||this===void 0?void 0:this.validationMessageCallback)===null||x===void 0||x.call(this,this.showError?this.internals.validationMessage:"")}),v.set(this,void 0),z.set(this,!1),C.set(this,Promise.resolve()),(l=this.addEventListener)===null||l===void 0||l.call(this,"focus",c(this,y,"f")),(u=this.addEventListener)===null||u===void 0||u.call(this,"blur",c(this,_,"f")),(p=this.addEventListener)===null||p===void 0||p.call(this,"invalid",c(this,P,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let n=this.validators.map(p=>p.attribute).flat(),l=super.observedAttributes||[];return[...new Set([...l,...n])]}static getValidator(n){return this.validators.find(l=>l.attribute===n)||null}static getValidators(n){return this.validators.filter(l=>{var u;if(l.attribute===n||!((u=l.attribute)===null||u===void 0)&&u.includes(n))return!0})}get form(){return this.internals.form}get showError(){return c(this,e,"m",m).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(n,l,u){var p;(p=super.attributeChangedCallback)===null||p===void 0||p.call(this,n,l,u);let j=this.constructor.getValidators(n);j!=null&&j.length&&this.validationTarget&&this.setValue(c(this,g,"f"))}setValue(n){var l;h(this,t,!1,"f"),(l=this.validationMessageCallback)===null||l===void 0||l.call(this,""),h(this,g,n,"f");let p=this.shouldFormValueUpdate()?n:null;this.internals.setFormValue(p),c(this,e,"m",M).call(this,p),this.valueChangedCallback&&this.valueChangedCallback(p),c(this,e,"m",m).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(n=>n(c(this,C,"f")))}formResetCallback(){var n,l;h(this,a,!1,"f"),h(this,t,!1,"f"),c(this,e,"m",m).call(this),(n=this.resetFormControl)===null||n===void 0||n.call(this),(l=this.validationMessageCallback)===null||l===void 0||l.call(this,c(this,e,"m",m).call(this)?this.validationMessage:"")}}return r=new WeakMap,t=new WeakMap,a=new WeakMap,d=new WeakMap,s=new WeakMap,i=new WeakMap,g=new WeakMap,y=new WeakMap,_=new WeakMap,P=new WeakMap,v=new WeakMap,z=new WeakMap,C=new WeakMap,e=new WeakSet,b=function(){let n=this.getRootNode(),l=`${this.localName}[name="${this.getAttribute("name")}"]`;return n.querySelectorAll(l)},m=function(){if(this.hasAttribute("disabled"))return!1;let n=c(this,t,"f")||c(this,a,"f")&&!this.validity.valid&&!c(this,r,"f");return n&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),n},M=function(n){let l=this.constructor,u={},p=l.validators,x=[],j=p.some(f=>f.isValid instanceof Promise);c(this,z,"f")||(h(this,C,new Promise(f=>{h(this,v,f,"f")}),"f"),h(this,z,!0,"f")),c(this,d,"f")&&(c(this,d,"f").abort(),h(this,s,c(this,d,"f"),"f"));let $=new AbortController;h(this,d,$,"f");let D,te=!1;p.length&&(p.forEach(f=>{let Z=f.key||"customError",S=f.isValid(this,n,$.signal);S instanceof Promise?(x.push(S),S.then(B=>{B!=null&&(u[Z]=!B,D=c(this,e,"m",X).call(this,f,n),c(this,e,"m",T).call(this,u,D))})):(u[Z]=!S,this.validity[Z]!==!S&&(te=!0),!S&&!D&&(D=c(this,e,"m",X).call(this,f,n)))}),Promise.allSettled(x).then(()=>{var f;$!=null&&$.signal.aborted||(h(this,z,!1,"f"),(f=c(this,v,"f"))===null||f===void 0||f.call(this))}),(te||!j)&&c(this,e,"m",T).call(this,u,D))},T=function(n,l){if(this.validationTarget)this.internals.setValidity(n,l,this.validationTarget),h(this,i,!1,"f");else{if(this.internals.setValidity(n,l),this.internals.validity.valid)return;h(this,i,!0,"f")}},X=function(n,l){if(this.validityCallback){let u=this.validityCallback(n.key||"customError");if(u)return u}return n.message instanceof Function?n.message(this,l):n.message},me}import{css as de}from"lit";var be=de`
9
+ `)),F(b)&&ne.test(b)?se(b):F(b)?b:_e(b,this._locale,this._locales)(r,t==null?void 0:t.formats)}date(e,r){return K(this._locales||this._locale,e,r)}number(e,r){return G(this._locales||this._locale,e,r)}};function Le(o={}){return new q(o)}var J=Le();import{html as Y,LitElement as Ie}from"lit";import{property as A}from"lit/decorators.js";var c=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)},h=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 ce(o){var e,r,t,a,d,s,i,b,g,y,_,P,v,z,C,m,M,T,X;class me extends o{constructor(...n){var l,u,p;super(...n),e.add(this),this.internals=this.attachInternals(),r.set(this,!1),t.set(this,!1),a.set(this,!1),d.set(this,void 0),s.set(this,void 0),i.set(this,!0),g.set(this,""),y.set(this,()=>{h(this,a,!0,"f"),h(this,r,!0,"f"),c(this,e,"m",m).call(this)}),_.set(this,()=>{h(this,r,!1,"f"),c(this,e,"m",M).call(this,this.shouldFormValueUpdate()?c(this,g,"f"):""),!this.validity.valid&&c(this,a,"f")&&h(this,t,!0,"f");let x=c(this,e,"m",m).call(this);this.validationMessageCallback&&this.validationMessageCallback(x?this.internals.validationMessage:"")}),P.set(this,()=>{var x;c(this,i,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),h(this,i,!1,"f")),h(this,a,!0,"f"),h(this,t,!0,"f"),c(this,e,"m",m).call(this),(x=this===null||this===void 0?void 0:this.validationMessageCallback)===null||x===void 0||x.call(this,this.showError?this.internals.validationMessage:"")}),v.set(this,void 0),z.set(this,!1),C.set(this,Promise.resolve()),(l=this.addEventListener)===null||l===void 0||l.call(this,"focus",c(this,y,"f")),(u=this.addEventListener)===null||u===void 0||u.call(this,"blur",c(this,_,"f")),(p=this.addEventListener)===null||p===void 0||p.call(this,"invalid",c(this,P,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let n=this.validators.map(p=>p.attribute).flat(),l=super.observedAttributes||[];return[...new Set([...l,...n])]}static getValidator(n){return this.validators.find(l=>l.attribute===n)||null}static getValidators(n){return this.validators.filter(l=>{var u;if(l.attribute===n||!((u=l.attribute)===null||u===void 0)&&u.includes(n))return!0})}get form(){return this.internals.form}get showError(){return c(this,e,"m",m).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(n,l,u){var p;(p=super.attributeChangedCallback)===null||p===void 0||p.call(this,n,l,u);let j=this.constructor.getValidators(n);j!=null&&j.length&&this.validationTarget&&this.setValue(c(this,g,"f"))}setValue(n){var l;h(this,t,!1,"f"),(l=this.validationMessageCallback)===null||l===void 0||l.call(this,""),h(this,g,n,"f");let p=this.shouldFormValueUpdate()?n:null;this.internals.setFormValue(p),c(this,e,"m",M).call(this,p),this.valueChangedCallback&&this.valueChangedCallback(p),c(this,e,"m",m).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(n=>n(c(this,C,"f")))}formResetCallback(){var n,l;h(this,a,!1,"f"),h(this,t,!1,"f"),c(this,e,"m",m).call(this),(n=this.resetFormControl)===null||n===void 0||n.call(this),(l=this.validationMessageCallback)===null||l===void 0||l.call(this,c(this,e,"m",m).call(this)?this.validationMessage:"")}}return r=new WeakMap,t=new WeakMap,a=new WeakMap,d=new WeakMap,s=new WeakMap,i=new WeakMap,g=new WeakMap,y=new WeakMap,_=new WeakMap,P=new WeakMap,v=new WeakMap,z=new WeakMap,C=new WeakMap,e=new WeakSet,b=function(){let n=this.getRootNode(),l=`${this.localName}[name="${this.getAttribute("name")}"]`;return n.querySelectorAll(l)},m=function(){if(this.hasAttribute("disabled"))return!1;let n=c(this,t,"f")||c(this,a,"f")&&!this.validity.valid&&!c(this,r,"f");return n&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),n},M=function(n){let l=this.constructor,u={},p=l.validators,x=[],j=p.some(f=>f.isValid instanceof Promise);c(this,z,"f")||(h(this,C,new Promise(f=>{h(this,v,f,"f")}),"f"),h(this,z,!0,"f")),c(this,d,"f")&&(c(this,d,"f").abort(),h(this,s,c(this,d,"f"),"f"));let $=new AbortController;h(this,d,$,"f");let D,te=!1;p.length&&(p.forEach(f=>{let W=f.key||"customError",S=f.isValid(this,n,$.signal);S instanceof Promise?(x.push(S),S.then(Z=>{Z!=null&&(u[W]=!Z,D=c(this,e,"m",X).call(this,f,n),c(this,e,"m",T).call(this,u,D))})):(u[W]=!S,this.validity[W]!==!S&&(te=!0),!S&&!D&&(D=c(this,e,"m",X).call(this,f,n)))}),Promise.allSettled(x).then(()=>{var f;$!=null&&$.signal.aborted||(h(this,z,!1,"f"),(f=c(this,v,"f"))===null||f===void 0||f.call(this))}),(te||!j)&&c(this,e,"m",T).call(this,u,D))},T=function(n,l){if(this.validationTarget)this.internals.setValidity(n,l,this.validationTarget),h(this,i,!1,"f");else{if(this.internals.setValidity(n,l),this.internals.validity.valid)return;h(this,i,!0,"f")}},X=function(n,l){if(this.validityCallback){let u=this.validityCallback(n.key||"customError");if(u)return u}return n.message instanceof Function?n.message(this,l):n.message},me}import{css as de}from"lit";var be=de`
10
10
  *,
11
11
  :before,
12
12
  :after {
@@ -2470,7 +2470,7 @@ Please compile your catalog first.
2470
2470
  --w-icon-size: 32px;
2471
2471
  }
2472
2472
 
2473
- `;var ee=new Map,De='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>';function Ye(o,e={}){var t;let r=(t=e.responseParser)!=null?t:(a=>a.text());return ee.has(o)||ee.set(o,fetch(o).then(r)),ee.get(o)}var E=class extends Ve{constructor(){super(...arguments);this.locale=document.documentElement.lang||"en";this.svg=null}async fetchIcon(r){let t=`https://assets.finn.no/pkg/eikons/v1/${this.locale}/${r}.svg`;try{let a=await Ye(t);return new DOMParser().parseFromString(a,"text/html").body.querySelector("svg")}catch(a){return null}}firstUpdated(){this.loadIcon()}updated(r){(r.has("name")||r.has("locale"))&&this.loadIcon()}async loadIcon(){if(!this.name){this.svg=null;return}let r=await this.fetchIcon(this.name);r||(r=new DOMParser().parseFromString(De,"text/html").body.firstElementChild),this.svg=r}render(){let r=this.size||"medium",t=this.name||"",a={"w-icon":!0,"w-icon--s":r==="small","w-icon--m":r==="medium","w-icon--l":r==="large"},d=typeof r=="string"&&r.endsWith("px")?`--w-icon-size: ${r};`:"";return Te`<div class="${$e(a)}" style="${d}" part="w-${t.toLowerCase()}">${this.svg}</div>`}};E.styles=[he],w([Q({type:String,reflect:!0})],E.prototype,"name",2),w([Q({type:String,reflect:!0})],E.prototype,"size",2),w([Q({type:String,reflect:!0,useDefault:!0})],E.prototype,"locale",2),w([je()],E.prototype,"svg",2);customElements.get("w-icon")||customElements.define("w-icon",E);var Ae=["en","nb","fi","da","sv"],re="en",I=o=>Ae.find(e=>o===e||o.toLowerCase().includes(e))||re;function R(){if(typeof window=="undefined"){let o=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return I(o)}try{let o=pe(document);if(o)return I(o);let e=Ne();if(e)return I(e);let r=pe(Oe());return r?I(r):re}catch(o){return console.warn("could not detect locale, falling back to source locale",o),re}}function Oe(){var o,e;try{return(e=(o=window.parent)==null?void 0:o.document)!=null?e:null}catch(r){return null}}function pe(o){var e,r;try{return(r=(e=o==null?void 0:o.documentElement)==null?void 0:e.lang)!=null?r:""}catch(t){return""}}function Ne(){var o,e,r;try{return(r=(e=(o=window.frameElement)==null?void 0:o.getAttribute)==null?void 0:e.call(o,"lang"))!=null?r:""}catch(t){return""}}var ge="absolute top-0 bottom-0 flex justify-center items-center focusable rounded-4 focus:[--w-outline-offset:-2px] bg-transparent ",Re={wrapper:ge+"right-0",wrapperWithLabel:"w-max pr-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"},Xe={wrapper:ge+"left-0",wrapperWithLabel:"w-max pl-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"},k=class extends ce(Ie){constructor(){super(...arguments);this.ariaLabel=null;this.clear=!1;this.search=!1;this.label="";this.icon=null}get _classBase(){return this.slot==="suffix"?Re:Xe}get _classes(){return W([this._classBase.wrapper,this.label?this._classBase.wrapperWithLabel:this._classBase.wrapperWithIcon])}resetContainingTextField(r){let t=this.closest("w-textfield");t&&t.resetFormControl(),r.stopPropagation()}submitContainingForm(r){let t=this.internals.form;t&&t.submit(),r.stopPropagation()}get _searchButton(){let r=this.ariaLabel||J._({id:"affix.aria.search",message:"Search",comment:"Aria label for the search button in affix"});return Y`
2473
+ `;var ee=new Map,De='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>';function Ye(o,e={}){var t;let r=(t=e.responseParser)!=null?t:(a=>a.text());return ee.has(o)||ee.set(o,fetch(o).then(r)),ee.get(o)}var E=class extends Ve{constructor(){super(...arguments);this.locale=document.documentElement.lang||"en";this.svg=null}async fetchIcon(r){let t=`https://assets.finn.no/pkg/eikons/v1/${this.locale}/${r}.svg`;try{let a=await Ye(t);return new DOMParser().parseFromString(a,"text/html").body.querySelector("svg")}catch(a){return null}}firstUpdated(){this.loadIcon()}updated(r){(r.has("name")||r.has("locale"))&&this.loadIcon()}async loadIcon(){if(!this.name){this.svg=null;return}let r=await this.fetchIcon(this.name);r||(r=new DOMParser().parseFromString(De,"text/html").body.firstElementChild),this.svg=r}render(){let r=this.size||"medium",t=this.name||"",a={"w-icon":!0,"w-icon--s":r==="small","w-icon--m":r==="medium","w-icon--l":r==="large"},d=typeof r=="string"&&r.endsWith("px")?`--w-icon-size: ${r};`:"";return Te`<div class="${$e(a)}" style="${d}" part="w-${t.toLowerCase()}">${this.svg}</div>`}};E.styles=[he],w([Q({type:String,reflect:!0})],E.prototype,"name",2),w([Q({type:String,reflect:!0})],E.prototype,"size",2),w([Q({type:String,reflect:!0,useDefault:!0})],E.prototype,"locale",2),w([je()],E.prototype,"svg",2);customElements.get("w-icon")||customElements.define("w-icon",E);var Ae=["en","nb","fi","da","sv"],re="en",I=o=>Ae.find(e=>o===e||o.toLowerCase().includes(e))||re;function R(){if(typeof window=="undefined"){let o=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return I(o)}try{let o=pe(document);if(o)return I(o);let e=Ne();if(e)return I(e);let r=pe(Oe());return r?I(r):re}catch(o){return console.warn("could not detect locale, falling back to source locale",o),re}}function Oe(){var o,e;try{return(e=(o=window.parent)==null?void 0:o.document)!=null?e:null}catch(r){return null}}function pe(o){var e,r;try{return(r=(e=o==null?void 0:o.documentElement)==null?void 0:e.lang)!=null?r:""}catch(t){return""}}function Ne(){var o,e,r;try{return(r=(e=(o=window.frameElement)==null?void 0:o.getAttribute)==null?void 0:e.call(o,"lang"))!=null?r:""}catch(t){return""}}var ge="absolute top-0 bottom-0 flex justify-center items-center focusable rounded-4 focus:[--w-outline-offset:-2px] bg-transparent ",Re={wrapper:ge+"right-0",wrapperWithLabel:"w-max pr-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"},Xe={wrapper:ge+"left-0",wrapperWithLabel:"w-max pl-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"},k=class extends ce(Ie){constructor(){super(...arguments);this.ariaLabel=null;this.clear=!1;this.search=!1;this.label="";this.icon=null}get _classBase(){return this.slot==="suffix"?Re:Xe}get _classes(){return B([this._classBase.wrapper,this.label?this._classBase.wrapperWithLabel:this._classBase.wrapperWithIcon])}resetContainingTextField(r){let t=this.closest("w-textfield");t&&t.resetFormControl(),r.stopPropagation()}submitContainingForm(r){let t=this.internals.form;t&&t.submit(),r.stopPropagation()}get _searchButton(){let r=this.ariaLabel||J._({id:"affix.aria.search",message:"Search",comment:"Aria label for the search button in affix"});return Y`
2474
2474
  <button aria-label="${r}" class="${this._classes}" type="submit" @click="${this.submitContainingForm.bind(this)}">
2475
2475
  <w-icon name="Search" size="small" locale="${R()}" class="flex"></w-icon>
2476
2476
  </button>