@warp-ds/elements 2.9.1-next.2 → 2.9.1-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 (94) hide show
  1. package/dist/custom-elements.json +8 -23
  2. package/dist/docs/attention/api.md +6 -3
  3. package/dist/docs/attention/attention.md +6 -3
  4. package/dist/docs/slider-thumb/api.md +0 -24
  5. package/dist/docs/slider-thumb/slider-thumb.md +0 -24
  6. package/dist/index.d.ts +0 -18
  7. package/dist/packages/affix/affix.js +11 -12
  8. package/dist/packages/affix/affix.js.map +4 -4
  9. package/dist/packages/alert/alert.d.ts +1 -1
  10. package/dist/packages/alert/alert.js.map +1 -1
  11. package/dist/packages/attention/attention.d.ts +3 -2
  12. package/dist/packages/attention/attention.js +27 -28
  13. package/dist/packages/attention/attention.js.map +4 -4
  14. package/dist/packages/breadcrumbs/breadcrumbs.js +7 -8
  15. package/dist/packages/breadcrumbs/breadcrumbs.js.map +4 -4
  16. package/dist/packages/button/button.d.ts +4 -2
  17. package/dist/packages/button/button.js +14 -15
  18. package/dist/packages/button/button.js.map +4 -4
  19. package/dist/packages/card/card.js +8 -9
  20. package/dist/packages/card/card.js.map +4 -4
  21. package/dist/packages/checkbox/checkbox.d.ts +2 -0
  22. package/dist/packages/checkbox-group/checkbox-group.d.ts +2 -0
  23. package/dist/packages/checkbox-group/checkbox-group.js +15 -16
  24. package/dist/packages/checkbox-group/checkbox-group.js.map +4 -4
  25. package/dist/packages/checkbox-group/locales/da/messages.mjs +1 -1
  26. package/dist/packages/checkbox-group/locales/en/messages.mjs +1 -1
  27. package/dist/packages/checkbox-group/locales/fi/messages.mjs +1 -1
  28. package/dist/packages/checkbox-group/locales/nb/messages.mjs +1 -1
  29. package/dist/packages/checkbox-group/locales/sv/messages.mjs +1 -1
  30. package/dist/packages/combobox/combobox.js +13 -14
  31. package/dist/packages/combobox/combobox.js.map +4 -4
  32. package/dist/packages/combobox/locales/da/messages.mjs +1 -1
  33. package/dist/packages/combobox/locales/en/messages.mjs +1 -1
  34. package/dist/packages/combobox/locales/fi/messages.mjs +1 -1
  35. package/dist/packages/combobox/locales/nb/messages.mjs +1 -1
  36. package/dist/packages/combobox/locales/sv/messages.mjs +1 -1
  37. package/dist/packages/datepicker/datepicker.d.ts +2 -0
  38. package/dist/packages/datepicker/datepicker.js +51 -52
  39. package/dist/packages/datepicker/datepicker.js.map +4 -4
  40. package/dist/packages/datepicker/locales/da/messages.mjs +1 -1
  41. package/dist/packages/datepicker/locales/en/messages.mjs +1 -1
  42. package/dist/packages/datepicker/locales/fi/messages.mjs +1 -1
  43. package/dist/packages/datepicker/locales/nb/messages.mjs +1 -1
  44. package/dist/packages/datepicker/locales/sv/messages.mjs +1 -1
  45. package/dist/packages/link/link.d.ts +2 -0
  46. package/dist/packages/modal-header/modal-header.js +13 -14
  47. package/dist/packages/modal-header/modal-header.js.map +4 -4
  48. package/dist/packages/page-indicator/page-indicator.js +7 -8
  49. package/dist/packages/page-indicator/page-indicator.js.map +4 -4
  50. package/dist/packages/pagination/locales/da/messages.mjs +1 -1
  51. package/dist/packages/pagination/locales/en/messages.mjs +1 -1
  52. package/dist/packages/pagination/locales/fi/messages.mjs +1 -1
  53. package/dist/packages/pagination/locales/nb/messages.mjs +1 -1
  54. package/dist/packages/pagination/locales/sv/messages.mjs +1 -1
  55. package/dist/packages/pagination/pagination.js +31 -32
  56. package/dist/packages/pagination/pagination.js.map +4 -4
  57. package/dist/packages/pill/pill.js +11 -12
  58. package/dist/packages/pill/pill.js.map +4 -4
  59. package/dist/packages/radio/radio.d.ts +2 -0
  60. package/dist/packages/radio-group/radio-group.d.ts +2 -0
  61. package/dist/packages/radio-group/radio-group.js +17 -18
  62. package/dist/packages/radio-group/radio-group.js.map +4 -4
  63. package/dist/packages/select/select.js +19 -20
  64. package/dist/packages/select/select.js.map +4 -4
  65. package/dist/packages/slider/locales/da/messages.mjs +1 -1
  66. package/dist/packages/slider/locales/en/messages.mjs +1 -1
  67. package/dist/packages/slider/locales/fi/messages.mjs +1 -1
  68. package/dist/packages/slider/locales/nb/messages.mjs +1 -1
  69. package/dist/packages/slider/locales/sv/messages.mjs +1 -1
  70. package/dist/packages/slider/slider.d.ts +2 -0
  71. package/dist/packages/slider/slider.js +22 -23
  72. package/dist/packages/slider/slider.js.map +4 -4
  73. package/dist/packages/slider-thumb/slider-thumb.d.ts +5 -0
  74. package/dist/packages/slider-thumb/slider-thumb.js +33 -34
  75. package/dist/packages/slider-thumb/slider-thumb.js.map +4 -4
  76. package/dist/packages/step/locales/da/messages.mjs +1 -1
  77. package/dist/packages/step/locales/en/messages.mjs +1 -1
  78. package/dist/packages/step/locales/fi/messages.mjs +1 -1
  79. package/dist/packages/step/locales/nb/messages.mjs +1 -1
  80. package/dist/packages/step/locales/sv/messages.mjs +1 -1
  81. package/dist/packages/step/step.js +11 -12
  82. package/dist/packages/step/step.js.map +4 -4
  83. package/dist/packages/switch/switch.d.ts +2 -0
  84. package/dist/packages/tab/tab.d.ts +2 -0
  85. package/dist/packages/tabs/tabs.js +1 -1
  86. package/dist/packages/tabs/tabs.js.map +3 -3
  87. package/dist/packages/textarea/textarea.d.ts +2 -0
  88. package/dist/packages/textarea/textarea.js +20 -21
  89. package/dist/packages/textarea/textarea.js.map +4 -4
  90. package/dist/packages/textfield/textfield.d.ts +2 -0
  91. package/dist/packages/toast/toast.js +13 -14
  92. package/dist/packages/toast/toast.js.map +4 -4
  93. package/dist/web-types.json +6 -6
  94. package/package.json +19 -19
@@ -5,6 +5,8 @@ export declare class WCheckbox extends WCheckbox_base {
5
5
  static styles: import("lit").CSSResult[];
6
6
  static shadowRootOptions: {
7
7
  delegatesFocus: boolean;
8
+ clonable?: boolean;
9
+ customElementRegistry?: CustomElementRegistry;
8
10
  mode: ShadowRootMode;
9
11
  serializable?: boolean;
10
12
  slotAssignment?: SlotAssignmentMode;
@@ -4,6 +4,8 @@ export declare class WCheckboxGroup extends WCheckboxGroup_base {
4
4
  #private;
5
5
  static shadowRootOptions: {
6
6
  delegatesFocus: boolean;
7
+ clonable?: boolean;
8
+ customElementRegistry?: CustomElementRegistry;
7
9
  mode: ShadowRootMode;
8
10
  serializable?: boolean;
9
11
  slotAssignment?: SlotAssignmentMode;
@@ -1,36 +1,35 @@
1
- var it=Object.create;var he=Object.defineProperty;var Le=Object.getOwnPropertyDescriptor;var nt=Object.getOwnPropertyNames;var at=Object.getPrototypeOf,ot=Object.prototype.hasOwnProperty;var ke=s=>{throw TypeError(s)};var Te=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports);var lt=(s,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of nt(e))!ot.call(s,i)&&i!==t&&he(s,i,{get:()=>e[i],enumerable:!(r=Le(e,i))||r.enumerable});return s};var ct=(s,e,t)=>(t=s!=null?it(at(s)):{},lt(e||!s||!s.__esModule?he(t,"default",{value:s,enumerable:!0}):t,s));var I=(s,e,t,r)=>{for(var i=r>1?void 0:r?Le(e,t):e,l=s.length-1,a;l>=0;l--)(a=s[l])&&(i=(r?a(e,t,i):a(i))||i);return r&&i&&he(e,t,i),i};var fe=(s,e,t)=>e.has(s)||ke("Cannot "+t);var F=(s,e,t)=>(fe(s,e,"read from private field"),t?t.call(s):e.get(s)),S=(s,e,t)=>e.has(s)?ke("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(s):e.set(s,t),K=(s,e,t,r)=>(fe(s,e,"write to private field"),r?r.call(s,t):e.set(s,t),t),d=(s,e,t)=>(fe(s,e,"access private method"),t);var Ve=Te(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});A.errorMessages=A.ErrorType=void 0;var $;(function(s){s.MalformedUnicode="MALFORMED_UNICODE",s.MalformedHexadecimal="MALFORMED_HEXADECIMAL",s.CodePointLimit="CODE_POINT_LIMIT",s.OctalDeprecation="OCTAL_DEPRECATION",s.EndOfString="END_OF_STRING"})($=A.ErrorType||(A.ErrorType={}));A.errorMessages=new Map([[$.MalformedUnicode,"malformed Unicode character escape sequence"],[$.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[$.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[$.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[$.EndOfString,"malformed escape sequence at end of string"]])});var Ne=Te(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.unraw=L.errorMessages=L.ErrorType=void 0;var _=Ve();Object.defineProperty(L,"ErrorType",{enumerable:!0,get:function(){return _.ErrorType}});Object.defineProperty(L,"errorMessages",{enumerable:!0,get:function(){return _.errorMessages}});function ut(s){return!s.match(/[^a-f0-9]/i)?parseInt(s,16):NaN}function Z(s,e,t){let r=ut(s);if(Number.isNaN(r)||t!==void 0&&t!==s.length)throw new SyntaxError(_.errorMessages.get(e));return r}function dt(s){let e=Z(s,_.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(e)}function Ie(s,e){let t=Z(s,_.ErrorType.MalformedUnicode,4);if(e!==void 0){let r=Z(e,_.ErrorType.MalformedUnicode,4);return String.fromCharCode(t,r)}return String.fromCharCode(t)}function ht(s){return s.charAt(0)==="{"&&s.charAt(s.length-1)==="}"}function ft(s){if(!ht(s))throw new SyntaxError(_.errorMessages.get(_.ErrorType.MalformedUnicode));let e=s.slice(1,-1),t=Z(e,_.ErrorType.MalformedUnicode);try{return String.fromCodePoint(t)}catch(r){throw r instanceof RangeError?new SyntaxError(_.errorMessages.get(_.ErrorType.CodePointLimit)):r}}function mt(s,e=!1){if(e)throw new SyntaxError(_.errorMessages.get(_.ErrorType.OctalDeprecation));let t=parseInt(s,8);return String.fromCharCode(t)}var gt=new Map([["b","\b"],["f","\f"],["n",`
2
- `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function pt(s){return gt.get(s)||s}var vt=/\\(?:(\\)|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 Oe(s,e=!1){return s.replace(vt,function(t,r,i,l,a,n,u,m,E){if(r!==void 0)return"\\";if(i!==void 0)return dt(i);if(l!==void 0)return ft(l);if(a!==void 0)return Ie(a,n);if(u!==void 0)return Ie(u);if(m==="0")return"\0";if(m!==void 0)return mt(m,!e);if(E!==void 0)return pt(E);throw new SyntaxError(_.errorMessages.get(_.ErrorType.EndOfString))})}L.unraw=Oe;L.default=Oe});var De=ct(Ne(),1);var O=s=>typeof s=="string",_t=s=>typeof s=="function",Ae=new Map,qe="en";function ve(s){return[...Array.isArray(s)?s:[s],qe]}function _e(s,e,t){let r=ve(s);t||(t="default");let i;if(typeof t=="string")switch(i={day:"numeric",month:"short",year:"numeric"},t){case"full":i.weekday="long";case"long":i.month="long";break;case"short":i.month="numeric";break}else i=t;return Y(()=>ee("date",r,t),()=>new Intl.DateTimeFormat(r,i)).format(O(e)?new Date(e):e)}function bt(s,e,t){let r;if(t||(t="default"),typeof t=="string")switch(r={second:"numeric",minute:"numeric",hour:"numeric"},t){case"full":case"long":r.timeZoneName="short";break;case"short":delete r.second}else r=t;return _e(s,e,r)}function me(s,e,t){let r=ve(s);return Y(()=>ee("number",r,t),()=>new Intl.NumberFormat(r,t)).format(e)}function Pe(s,e,t,{offset:r=0,...i}){var n,u;let l=ve(s),a=e?Y(()=>ee("plural-ordinal",l),()=>new Intl.PluralRules(l,{type:"ordinal"})):Y(()=>ee("plural-cardinal",l),()=>new Intl.PluralRules(l,{type:"cardinal"}));return(u=(n=i[t])!=null?n:i[a.select(t-r)])!=null?u:i.other}function Y(s,e){let t=s(),r=Ae.get(t);return r||(r=e(),Ae.set(t,r)),r}function ee(s,e,t){let r=e.join("-");return`${s}-${r}-${JSON.stringify(t)}`}var Ue=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,$e="%__lingui_octothorpe__%",yt=(s,e,t={})=>{let r=e||s,i=a=>typeof a=="object"?a:t[a],l=(a,n)=>{let u=Object.keys(t).length?i("number"):void 0,m=me(r,a,u);return n.replace(new RegExp($e,"g"),m)};return{plural:(a,n)=>{let{offset:u=0}=n,m=Pe(r,!1,a,n);return l(a-u,m)},selectordinal:(a,n)=>{let{offset:u=0}=n,m=Pe(r,!0,a,n);return l(a-u,m)},select:wt,number:(a,n)=>me(r,a,i(n)||{style:n}),date:(a,n)=>_e(r,a,i(n)||n),time:(a,n)=>bt(r,a,i(n)||n)}},wt=(s,e)=>{var t;return(t=e[s])!=null?t:e.other};function Mt(s,e,t){return(r={},i)=>{let l=yt(e,t,i),a=(u,m=!1)=>Array.isArray(u)?u.reduce((E,k)=>{if(k==="#"&&m)return E+$e;if(O(k))return E+k;let[q,w,T]=k,V={};w==="plural"||w==="selectordinal"||w==="select"?Object.entries(T).forEach(([N,z])=>{V[N]=a(z,w==="plural"||w==="selectordinal")}):V=T;let b;if(w){let N=l[w];b=N(r[q],V)}else b=r[q];return b==null?E:E+b},""):u,n=a(s);return O(n)&&Ue.test(n)?(0,De.unraw)(n):O(n)?n:n?String(n):""}}var Ct=Object.defineProperty,Et=(s,e,t)=>e in s?Ct(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,xt=(s,e,t)=>(Et(s,typeof e!="symbol"?e+"":e,t),t),ge=class{constructor(){xt(this,"_events",{})}on(e,t){var i;var r;return(i=(r=this._events)[e])!=null||(r[e]=[]),this._events[e].push(t),()=>this.removeListener(e,t)}removeListener(e,t){let r=this._getListeners(e);if(!r)return;let i=r.indexOf(t);~i&&r.splice(i,1)}emit(e,...t){let r=this._getListeners(e);r&&r.map(i=>i.apply(this,t))}_getListeners(e){let t=this._events[e];return Array.isArray(t)?t:!1}},Ft=Object.defineProperty,St=(s,e,t)=>e in s?Ft(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,P=(s,e,t)=>(St(s,typeof e!="symbol"?e+"":e,t),t),pe=class extends ge{constructor(e){var t;super(),P(this,"_locale",""),P(this,"_locales"),P(this,"_localeData",{}),P(this,"_messages",{}),P(this,"_missing"),P(this,"_messageCompiler"),P(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((t=e.locale)!=null?t:qe,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,t){let r=this._localeData[e];r?Object.assign(r,t):this._localeData[e]=t}setMessagesCompiler(e){return this._messageCompiler=e,this}loadLocaleData(e,t){typeof e=="string"?this._loadLocaleData(e,t):Object.keys(e).forEach(r=>this._loadLocaleData(r,e[r])),this.emit("change")}_load(e,t){let r=this._messages[e];r?Object.assign(r,t):this._messages[e]=t}load(e,t){typeof e=="string"&&typeof t=="object"?this._load(e,t):Object.entries(e).forEach(([r,i])=>this._load(r,i)),this.emit("change")}loadAndActivate({locale:e,locales:t,messages:r}){this._locale=e,this._locales=t||void 0,this._messages[this._locale]=r,this.emit("change")}activate(e,t){this._locale=e,this._locales=t,this.emit("change")}_(e,t,r){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 i=r==null?void 0:r.message;e||(e=""),O(e)||(t=e.values||t,i=e.message,e=e.id);let l=this.messages[e],a=l===void 0,n=this._missing;if(n&&a)return _t(n)?n(this._locale,e):n;a&&this.emit("missing",{id:e,locale:this._locale});let u=l||i||e;return O(u)&&(this._messageCompiler?u=this._messageCompiler(u):console.warn(`Uncompiled message detected! Message:
1
+ var Jt=Object.defineProperty;var Bt=Object.getOwnPropertyDescriptor;var Ct=i=>{throw TypeError(i)};var S=(i,t,e,s)=>{for(var a=s>1?void 0:s?Bt(t,e):t,c=i.length-1,o;c>=0;c--)(o=i[c])&&(a=(s?o(t,e,a):o(a))||a);return s&&a&&Jt(t,e,a),a};var ot=(i,t,e)=>t.has(i)||Ct("Cannot "+e);var M=(i,t,e)=>(ot(i,t,"read from private field"),e?e.call(i):t.get(i)),x=(i,t,e)=>t.has(i)?Ct("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,e),W=(i,t,e,s)=>(ot(i,t,"write to private field"),s?s.call(i,e):t.set(i,e),e),h=(i,t,e)=>(ot(i,t,"access private method"),e);var I=i=>typeof i=="string",Kt=i=>typeof i=="function",Et=new Map,xt="en";function ut(i){return[...Array.isArray(i)?i:[i],xt]}function dt(i,t,e){let s=ut(i);e||(e="default");let a;if(typeof e=="string")switch(a={day:"numeric",month:"short",year:"numeric"},e){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=e;return K(()=>Q("date",s,e),()=>new Intl.DateTimeFormat(s,a)).format(I(t)?new Date(t):t)}function Qt(i,t,e){let s;if(e||(e="default"),typeof e=="string")switch(s={second:"numeric",minute:"numeric",hour:"numeric"},e){case"full":case"long":s.timeZoneName="short";break;case"short":delete s.second}else s=e;return dt(i,t,s)}function lt(i,t,e){let s=ut(i);return K(()=>Q("number",s,e),()=>new Intl.NumberFormat(s,e)).format(t)}function Mt(i,t,e,{offset:s=0,...a}){var n,f;let c=ut(i),o=t?K(()=>Q("plural-ordinal",c),()=>new Intl.PluralRules(c,{type:"ordinal"})):K(()=>Q("plural-cardinal",c),()=>new Intl.PluralRules(c,{type:"cardinal"}));return(f=(n=a[e])!=null?n:a[o.select(e-s)])!=null?f:a.other}function K(i,t){let e=i(),s=Et.get(e);return s||(s=t(),Et.set(e,s)),s}function Q(i,t,e){let s=t.join("-");return`${i}-${s}-${JSON.stringify(e)}`}var Ft=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,kt=i=>i.replace(/\\u([a-fA-F0-9]{4})|\\x([a-fA-F0-9]{2})/g,(t,e,s)=>{if(e){let a=parseInt(e,16);return String.fromCharCode(a)}else{let a=parseInt(s,16);return String.fromCharCode(a)}}),Vt="%__lingui_octothorpe__%",Gt=(i,t,e={})=>{let s=t||i,a=o=>typeof o=="object"?o:e[o],c=(o,n)=>{let f=Object.keys(e).length?a("number"):void 0,v=lt(s,o,f);return n.replace(new RegExp(Vt,"g"),v)};return{plural:(o,n)=>{let{offset:f=0}=n,v=Mt(s,!1,o,n);return c(o-f,v)},selectordinal:(o,n)=>{let{offset:f=0}=n,v=Mt(s,!0,o,n);return c(o-f,v)},select:Xt,number:(o,n)=>lt(s,o,a(n)||{style:n}),date:(o,n)=>dt(s,o,a(n)||n),time:(o,n)=>Qt(s,o,a(n)||n)}},Xt=(i,t)=>{var e;return(e=t[i])!=null?e:t.other};function Zt(i,t,e){return(s={},a)=>{let c=Gt(t,e,a),o=(f,v=!1)=>Array.isArray(f)?f.reduce((F,k)=>{if(k==="#"&&v)return F+Vt;if(I(k))return F+k;let[P,y,V]=k,L={};y==="plural"||y==="selectordinal"||y==="select"?Object.entries(V).forEach(([T,U])=>{L[T]=o(U,y==="plural"||y==="selectordinal")}):L=V;let _;if(y){let T=c[y];_=T(s[P],L)}else _=s[P];return _==null?F:F+_},""):f,n=o(i);return I(n)&&Ft.test(n)?kt(n):I(n)?n:n?String(n):""}}var Yt=Object.defineProperty,te=(i,t,e)=>t in i?Yt(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,ee=(i,t,e)=>(te(i,typeof t!="symbol"?t+"":t,e),e),ct=class{constructor(){ee(this,"_events",{})}on(t,e){var a;var s;return(a=(s=this._events)[t])!=null||(s[t]=[]),this._events[t].push(e),()=>this.removeListener(t,e)}removeListener(t,e){let s=this._getListeners(t);if(!s)return;let a=s.indexOf(e);~a&&s.splice(a,1)}emit(t,...e){let s=this._getListeners(t);s&&s.map(a=>a.apply(this,e))}_getListeners(t){let e=this._events[t];return Array.isArray(e)?e:!1}},se=Object.defineProperty,ie=(i,t,e)=>t in i?se(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,A=(i,t,e)=>(ie(i,typeof t!="symbol"?t+"":t,e),e),ht=class extends ct{constructor(t){var e;super(),A(this,"_locale",""),A(this,"_locales"),A(this,"_localeData",{}),A(this,"_messages",{}),A(this,"_missing"),A(this,"_messageCompiler"),A(this,"t",this._.bind(this)),t.missing!=null&&(this._missing=t.missing),t.messages!=null&&this.load(t.messages),t.localeData!=null&&this.loadLocaleData(t.localeData),(typeof t.locale=="string"||t.locales)&&this.activate((e=t.locale)!=null?e:xt,t.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var t;return(t=this._messages[this._locale])!=null?t:{}}get localeData(){var t;return(t=this._localeData[this._locale])!=null?t:{}}_loadLocaleData(t,e){let s=this._localeData[t];s?Object.assign(s,e):this._localeData[t]=e}setMessagesCompiler(t){return this._messageCompiler=t,this}loadLocaleData(t,e){typeof t=="string"?this._loadLocaleData(t,e):Object.keys(t).forEach(s=>this._loadLocaleData(s,t[s])),this.emit("change")}_load(t,e){let s=this._messages[t];s?Object.assign(s,e):this._messages[t]=e}load(t,e){typeof t=="string"&&typeof e=="object"?this._load(t,e):Object.entries(t).forEach(([s,a])=>this._load(s,a)),this.emit("change")}loadAndActivate({locale:t,locales:e,messages:s}){this._locale=t,this._locales=e||void 0,this._messages[this._locale]=s,this.emit("change")}activate(t,e){this._locale=t,this._locales=e,this.emit("change")}_(t,e,s){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=s==null?void 0:s.message;t||(t=""),I(t)||(e=t.values||e,a=t.message,t=t.id);let c=this.messages[t],o=c===void 0,n=this._missing;if(n&&o)return Kt(n)?n(this._locale,t):n;o&&this.emit("missing",{id:t,locale:this._locale});let f=c||a||t;return I(f)&&(this._messageCompiler?f=this._messageCompiler(f):console.warn(`Uncompiled message detected! Message:
3
2
 
4
- > ${u}
3
+ > ${f}
5
4
 
6
5
  That means you use raw catalog or your catalog doesn't have a translation for the message and fallback was used.
7
6
  ICU features such as interpolation and plurals will not work properly for that message.
8
7
 
9
8
  Please compile your catalog first.
10
- `)),O(u)&&Ue.test(u)?JSON.parse(`"${u}"`):O(u)?u:Mt(u,this._locale,this._locales)(t,r==null?void 0:r.formats)}date(e,t){return _e(this._locales||this._locale,e,t)}number(e,t){return me(this._locales||this._locale,e,t)}};function Lt(s={}){return new pe(s)}var y=Lt();var f=function(s,e,t,r){if(t==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?s!==e||!r:!e.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?r:t==="a"?r.call(s):r?r.value:e.get(s)},p=function(s,e,t,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?s!==e||!i:!e.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(s,t):i?i.value=t:e.set(s,t),t};function Re(s){var e,t,r,i,l,a,n,u,m,E,k,q,w,T,V,b,N,z,ce;class rt extends s{constructor(...c){var h,g,v;super(...c),e.add(this),this.internals=this.attachInternals(),t.set(this,!1),r.set(this,!1),i.set(this,!1),l.set(this,void 0),a.set(this,void 0),n.set(this,!0),m.set(this,""),E.set(this,()=>{p(this,i,!0,"f"),p(this,t,!0,"f"),f(this,e,"m",b).call(this)}),k.set(this,()=>{p(this,t,!1,"f"),f(this,e,"m",N).call(this,this.shouldFormValueUpdate()?f(this,m,"f"):""),!this.validity.valid&&f(this,i,"f")&&p(this,r,!0,"f");let x=f(this,e,"m",b).call(this);this.validationMessageCallback&&this.validationMessageCallback(x?this.internals.validationMessage:"")}),q.set(this,()=>{var x;f(this,n,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),p(this,n,!1,"f")),p(this,i,!0,"f"),p(this,r,!0,"f"),f(this,e,"m",b).call(this),(x=this===null||this===void 0?void 0:this.validationMessageCallback)===null||x===void 0||x.call(this,this.showError?this.internals.validationMessage:"")}),w.set(this,void 0),T.set(this,!1),V.set(this,Promise.resolve()),(h=this.addEventListener)===null||h===void 0||h.call(this,"focus",f(this,E,"f")),(g=this.addEventListener)===null||g===void 0||g.call(this,"blur",f(this,k,"f")),(v=this.addEventListener)===null||v===void 0||v.call(this,"invalid",f(this,q,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let c=this.validators.map(v=>v.attribute).flat(),h=super.observedAttributes||[];return[...new Set([...h,...c])]}static getValidator(c){return this.validators.find(h=>h.attribute===c)||null}static getValidators(c){return this.validators.filter(h=>{var g;if(h.attribute===c||!((g=h.attribute)===null||g===void 0)&&g.includes(c))return!0})}get form(){return this.internals.form}get showError(){return f(this,e,"m",b).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(c,h,g){var v;(v=super.attributeChangedCallback)===null||v===void 0||v.call(this,c,h,g);let W=this.constructor.getValidators(c);W!=null&&W.length&&this.validationTarget&&this.setValue(f(this,m,"f"))}setValue(c){var h;p(this,r,!1,"f"),(h=this.validationMessageCallback)===null||h===void 0||h.call(this,""),p(this,m,c,"f");let v=this.shouldFormValueUpdate()?c:null;this.internals.setFormValue(v),f(this,e,"m",N).call(this,v),this.valueChangedCallback&&this.valueChangedCallback(v),f(this,e,"m",b).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(c=>c(f(this,V,"f")))}formResetCallback(){var c,h;p(this,i,!1,"f"),p(this,r,!1,"f"),f(this,e,"m",b).call(this),(c=this.resetFormControl)===null||c===void 0||c.call(this),(h=this.validationMessageCallback)===null||h===void 0||h.call(this,f(this,e,"m",b).call(this)?this.validationMessage:"")}}return t=new WeakMap,r=new WeakMap,i=new WeakMap,l=new WeakMap,a=new WeakMap,n=new WeakMap,m=new WeakMap,E=new WeakMap,k=new WeakMap,q=new WeakMap,w=new WeakMap,T=new WeakMap,V=new WeakMap,e=new WeakSet,u=function(){let c=this.getRootNode(),h=`${this.localName}[name="${this.getAttribute("name")}"]`;return c.querySelectorAll(h)},b=function(){if(this.hasAttribute("disabled"))return!1;let c=f(this,r,"f")||f(this,i,"f")&&!this.validity.valid&&!f(this,t,"f");return c&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),c},N=function(c){let h=this.constructor,g={},v=h.validators,x=[],W=v.some(M=>M.isValid instanceof Promise);f(this,T,"f")||(p(this,V,new Promise(M=>{p(this,w,M,"f")}),"f"),p(this,T,!0,"f")),f(this,l,"f")&&(f(this,l,"f").abort(),p(this,a,f(this,l,"f"),"f"));let B=new AbortController;p(this,l,B,"f");let G,Se=!1;v.length&&(v.forEach(M=>{let ue=M.key||"customError",U=M.isValid(this,c,B.signal);U instanceof Promise?(x.push(U),U.then(de=>{de!=null&&(g[ue]=!de,G=f(this,e,"m",ce).call(this,M,c),f(this,e,"m",z).call(this,g,G))})):(g[ue]=!U,this.validity[ue]!==!U&&(Se=!0),!U&&!G&&(G=f(this,e,"m",ce).call(this,M,c)))}),Promise.allSettled(x).then(()=>{var M;B!=null&&B.signal.aborted||(p(this,T,!1,"f"),(M=f(this,w,"f"))===null||M===void 0||M.call(this))}),(Se||!W)&&f(this,e,"m",z).call(this,g,G))},z=function(c,h){if(this.validationTarget)this.internals.setValidity(c,h,this.validationTarget),p(this,n,!1,"f");else{if(this.internals.setValidity(c,h),this.internals.validity.valid)return;p(this,n,!0,"f")}},ce=function(c,h){if(this.validityCallback){let g=this.validityCallback(c.key||"customError");if(g)return g}return c.message instanceof Function?c.message(this,h):c.message},rt}import{css as Nt,html as se,LitElement as Ye,nothing as ye}from"lit";import{property as R,state as At}from"lit/decorators.js";import{ifDefined as we}from"lit/directives/if-defined.js";var kt=["en","nb","fi","da","sv"],be="en",te=s=>kt.find(e=>s===e||s.toLowerCase().includes(e))||be;function ze(){if(typeof window=="undefined"){let s=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return te(s)}try{let s=je(document);if(s)return te(s);let e=Ot();if(e)return te(e);let t=je(Be());return t?te(t):be}catch(s){return console.warn("could not detect locale, falling back to source locale",s),be}}var Je=(s,e,t,r,i)=>{y.load("en",s),y.load("nb",e),y.load("fi",t),y.load("da",r),y.load("sv",i);let l=ze();y.activate(l),We(),Vt()},Tt="warp-i18n-change";function We(){typeof window!="undefined"&&window.dispatchEvent(new Event(Tt))}var He=!1;function Vt(){if(He||typeof window=="undefined"||!(document!=null&&document.documentElement))return;He=!0;let s=()=>{let i=ze();y.locale!==i&&(y.activate(i),We())},e=new MutationObserver(i=>{for(let l of i)if(l.type==="attributes"&&l.attributeName==="lang"){s();break}});e.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]});let t=Be();t&&t.documentElement&&t!==document&&e.observe(t.documentElement,{attributes:!0,attributeFilter:["lang"]});let r=It();r&&e.observe(r,{attributes:!0,attributeFilter:["lang"]})}function Be(){var s,e;try{return(e=(s=window.parent)==null?void 0:s.document)!=null?e:null}catch(t){return null}}function je(s){var e,t;try{return(t=(e=s==null?void 0:s.documentElement)==null?void 0:e.lang)!=null?t:""}catch(r){return""}}function It(){var s;try{return(s=window.frameElement)!=null?s:null}catch(e){return null}}function Ot(){var s,e,t;try{return(t=(e=(s=window.frameElement)==null?void 0:s.getAttribute)==null?void 0:e.call(s,"lang"))!=null?t:""}catch(r){return""}}var Ge=JSON.parse('{"checkbox-group.validation.required":["Mindst \xE9n valgt mulighed er p\xE5kr\xE6vet."],"checkbox-group.label.optional":["Valgfri"]}');var Ke=JSON.parse('{"checkbox-group.validation.required":["At least one selection is required."],"checkbox-group.label.optional":["Optional"]}');var Xe=JSON.parse('{"checkbox-group.validation.required":["V\xE4hint\xE4\xE4n yksi valinta vaaditaan."],"checkbox-group.label.optional":["Valinnainen"]}');var Qe=JSON.parse('{"checkbox-group.validation.required":["Minst ett valg er p\xE5krevd."],"checkbox-group.label.optional":["Valgfri"]}');var Ze=JSON.parse('{"checkbox-group.validation.required":["Minst ett val kr\xE4vs."],"checkbox-group.label.optional":["Valfritt"]}');Je(Ke,Qe,Xe,Ge,Ze);var Pt=()=>y._({id:"checkbox-group.validation.required",message:"At least one selection is required.",comment:"Shown when required checkbox group has no selections"}),H,Q,j,ne,ae,oe,o,re,le,Me,Ce,ie,Ee,X,et,tt,xe,st,D,Fe,C=class extends Re(Ye){constructor(){super(...arguments);S(this,o);this.optional=!1;this.required=!1;this.invalid=!1;S(this,H,!1);S(this,Q,!1);this._internalTabIndex=-1;S(this,j);S(this,ne,()=>{d(this,o,re).call(this),d(this,o,D).call(this),this.requestUpdate()});S(this,ae,()=>{d(this,o,re).call(this),d(this,o,D).call(this),this.requestUpdate()});S(this,oe,()=>{d(this,o,Ce).call(this),d(this,o,D).call(this),this.requestUpdate()});S(this,le,()=>{this.requestUpdate()})}render(){let t=d(this,o,Me).call(this)>0,i=this.required&&!t&&F(this,H),l=this.invalid||i,a=l?d(this,o,et).call(this):this.helpText,n=a?"checkbox-group__help":void 0,u=this.label?"checkbox-group__label":void 0,m=l?"true":void 0;return se`
9
+ `)),I(f)&&Ft.test(f)?kt(f):I(f)?f:Zt(f,this._locale,this._locales)(e,s==null?void 0:s.formats)}date(t,e){return dt(this._locales||this._locale,t,e)}number(t,e){return lt(this._locales||this._locale,t,e)}};function ae(i={}){return new ht(i)}var b=ae();var d=function(i,t,e,s){if(e==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?i!==t||!s:!t.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?s:e==="a"?s.call(i):s?s.value:t.get(i)},g=function(i,t,e,s,a){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?i!==t||!a:!t.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?a.call(i,e):a?a.value=e:t.set(i,e),e};function Lt(i){var t,e,s,a,c,o,n,f,v,F,k,P,y,V,L,_,T,U,at;class Wt extends i{constructor(...l){var u,m,p;super(...l),t.add(this),this.internals=this.attachInternals(),e.set(this,!1),s.set(this,!1),a.set(this,!1),c.set(this,void 0),o.set(this,void 0),n.set(this,!0),v.set(this,""),F.set(this,()=>{g(this,a,!0,"f"),g(this,e,!0,"f"),d(this,t,"m",_).call(this)}),k.set(this,()=>{g(this,e,!1,"f"),d(this,t,"m",T).call(this,this.shouldFormValueUpdate()?d(this,v,"f"):""),!this.validity.valid&&d(this,a,"f")&&g(this,s,!0,"f");let E=d(this,t,"m",_).call(this);this.validationMessageCallback&&this.validationMessageCallback(E?this.internals.validationMessage:"")}),P.set(this,()=>{var E;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,s,!0,"f"),d(this,t,"m",_).call(this),(E=this===null||this===void 0?void 0:this.validationMessageCallback)===null||E===void 0||E.call(this,this.showError?this.internals.validationMessage:"")}),y.set(this,void 0),V.set(this,!1),L.set(this,Promise.resolve()),(u=this.addEventListener)===null||u===void 0||u.call(this,"focus",d(this,F,"f")),(m=this.addEventListener)===null||m===void 0||m.call(this,"blur",d(this,k,"f")),(p=this.addEventListener)===null||p===void 0||p.call(this,"invalid",d(this,P,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let l=this.validators.map(p=>p.attribute).flat(),u=super.observedAttributes||[];return[...new Set([...u,...l])]}static getValidator(l){return this.validators.find(u=>u.attribute===l)||null}static getValidators(l){return this.validators.filter(u=>{var m;if(u.attribute===l||!((m=u.attribute)===null||m===void 0)&&m.includes(l))return!0})}get form(){return this.internals.form}get showError(){return d(this,t,"m",_).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(l,u,m){var p;(p=super.attributeChangedCallback)===null||p===void 0||p.call(this,l,u,m);let j=this.constructor.getValidators(l);j!=null&&j.length&&this.validationTarget&&this.setValue(d(this,v,"f"))}setValue(l){var u;g(this,s,!1,"f"),(u=this.validationMessageCallback)===null||u===void 0||u.call(this,""),g(this,v,l,"f");let p=this.shouldFormValueUpdate()?l:null;this.internals.setFormValue(p),d(this,t,"m",T).call(this,p),this.valueChangedCallback&&this.valueChangedCallback(p),d(this,t,"m",_).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(l=>l(d(this,L,"f")))}formResetCallback(){var l,u;g(this,a,!1,"f"),g(this,s,!1,"f"),d(this,t,"m",_).call(this),(l=this.resetFormControl)===null||l===void 0||l.call(this),(u=this.validationMessageCallback)===null||u===void 0||u.call(this,d(this,t,"m",_).call(this)?this.validationMessage:"")}}return e=new WeakMap,s=new WeakMap,a=new WeakMap,c=new WeakMap,o=new WeakMap,n=new WeakMap,v=new WeakMap,F=new WeakMap,k=new WeakMap,P=new WeakMap,y=new WeakMap,V=new WeakMap,L=new WeakMap,t=new WeakSet,f=function(){let l=this.getRootNode(),u=`${this.localName}[name="${this.getAttribute("name")}"]`;return l.querySelectorAll(u)},_=function(){if(this.hasAttribute("disabled"))return!1;let l=d(this,s,"f")||d(this,a,"f")&&!this.validity.valid&&!d(this,e,"f");return l&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),l},T=function(l){let u=this.constructor,m={},p=u.validators,E=[],j=p.some(w=>w.isValid instanceof Promise);d(this,V,"f")||(g(this,L,new Promise(w=>{g(this,y,w,"f")}),"f"),g(this,V,!0,"f")),d(this,c,"f")&&(d(this,c,"f").abort(),g(this,o,d(this,c,"f"),"f"));let H=new AbortController;g(this,c,H,"f");let z,wt=!1;p.length&&(p.forEach(w=>{let rt=w.key||"customError",q=w.isValid(this,l,H.signal);q instanceof Promise?(E.push(q),q.then(nt=>{nt!=null&&(m[rt]=!nt,z=d(this,t,"m",at).call(this,w,l),d(this,t,"m",U).call(this,m,z))})):(m[rt]=!q,this.validity[rt]!==!q&&(wt=!0),!q&&!z&&(z=d(this,t,"m",at).call(this,w,l)))}),Promise.allSettled(E).then(()=>{var w;H!=null&&H.signal.aborted||(g(this,V,!1,"f"),(w=d(this,y,"f"))===null||w===void 0||w.call(this))}),(wt||!j)&&d(this,t,"m",U).call(this,m,z))},U=function(l,u){if(this.validationTarget)this.internals.setValidity(l,u,this.validationTarget),g(this,n,!1,"f");else{if(this.internals.setValidity(l,u),this.internals.validity.valid)return;g(this,n,!0,"f")}},at=function(l,u){if(this.validityCallback){let m=this.validityCallback(l.key||"customError");if(m)return m}return l.message instanceof Function?l.message(this,u):l.message},Wt}import{css as he,html as X,LitElement as Rt,nothing as mt}from"lit";import{property as O,state as ue}from"lit/decorators.js";import{ifDefined as gt}from"lit/directives/if-defined.js";var re=["en","nb","fi","da","sv"],ft="en",G=i=>re.find(t=>i===t||i.toLowerCase().includes(t))||ft;function Tt(){if(typeof window=="undefined"){let i=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return G(i)}try{let i=It(document);if(i)return G(i);let t=ce();if(t)return G(t);let e=It(Pt());return e?G(e):ft}catch(i){return console.warn("could not detect locale, falling back to source locale",i),ft}}var At=(i,t,e,s,a)=>{b.load("en",i),b.load("nb",t),b.load("fi",e),b.load("da",s),b.load("sv",a);let c=Tt();b.activate(c),Nt(),oe()},ne="warp-i18n-change";function Nt(){typeof window!="undefined"&&window.dispatchEvent(new Event(ne))}var St=!1;function oe(){if(St||typeof window=="undefined"||!(document!=null&&document.documentElement))return;St=!0;let i=()=>{let a=Tt();b.locale!==a&&(b.activate(a),Nt())},t=new MutationObserver(a=>{for(let c of a)if(c.type==="attributes"&&c.attributeName==="lang"){i();break}});t.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]});let e=Pt();e&&e.documentElement&&e!==document&&t.observe(e.documentElement,{attributes:!0,attributeFilter:["lang"]});let s=le();s&&t.observe(s,{attributes:!0,attributeFilter:["lang"]})}function Pt(){var i,t;try{return(t=(i=window.parent)==null?void 0:i.document)!=null?t:null}catch(e){return null}}function It(i){var t,e;try{return(e=(t=i==null?void 0:i.documentElement)==null?void 0:t.lang)!=null?e:""}catch(s){return""}}function le(){var i;try{return(i=window.frameElement)!=null?i:null}catch(t){return null}}function ce(){var i,t,e;try{return(e=(t=(i=window.frameElement)==null?void 0:i.getAttribute)==null?void 0:t.call(i,"lang"))!=null?e:""}catch(s){return""}}var qt=JSON.parse('{"checkbox-group.label.optional":["Valgfri"],"checkbox-group.validation.required":["Mindst \xE9n valgt mulighed er p\xE5kr\xE6vet."]}');var Ot=JSON.parse('{"checkbox-group.label.optional":["Optional"],"checkbox-group.validation.required":["At least one selection is required."]}');var $t=JSON.parse('{"checkbox-group.label.optional":["Valinnainen"],"checkbox-group.validation.required":["V\xE4hint\xE4\xE4n yksi valinta vaaditaan."]}');var Dt=JSON.parse('{"checkbox-group.label.optional":["Valgfri"],"checkbox-group.validation.required":["Minst ett valg er p\xE5krevd."]}');var Ut=JSON.parse('{"checkbox-group.label.optional":["Valfritt"],"checkbox-group.validation.required":["Minst ett val kr\xE4vs."]}');At(Ot,Dt,$t,qt,Ut);var de=()=>b._({id:"checkbox-group.validation.required",message:"At least one selection is required.",comment:"Shown when required checkbox group has no selections"}),$,B,D,tt,et,st,r,Z,it,pt,vt,Y,_t,J,jt,Ht,bt,zt,N,yt,C=class extends Lt(Rt){constructor(){super(...arguments);x(this,r);this.optional=!1;this.required=!1;this.invalid=!1;x(this,$,!1);x(this,B,!1);this._internalTabIndex=-1;x(this,D);x(this,tt,()=>{h(this,r,Z).call(this),h(this,r,N).call(this),this.requestUpdate()});x(this,et,()=>{h(this,r,Z).call(this),h(this,r,N).call(this),this.requestUpdate()});x(this,st,()=>{h(this,r,vt).call(this),h(this,r,N).call(this),this.requestUpdate()});x(this,it,()=>{this.requestUpdate()})}render(){let e=h(this,r,pt).call(this)>0,a=this.required&&!e&&M(this,$),c=this.invalid||a,o=c?h(this,r,jt).call(this):this.helpText,n=o?"checkbox-group__help":void 0,f=this.label?"checkbox-group__label":void 0,v=c?"true":void 0;return X`
11
10
  <div class="wrapper" tabindex="${this._internalTabIndex}">
12
- ${this.label?se`
13
- <div class="label" id="${u}">
11
+ ${this.label?X`
12
+ <div class="label" id="${f}">
14
13
  <span>${this.label}</span>
15
- ${this.optional?se`
14
+ ${this.optional?X`
16
15
  <span class="optional">
17
- ${y._({id:"checkbox-group.label.optional",message:"Optional",comment:"Shown behind label when marked as optional"})}
16
+ ${b._({id:"checkbox-group.label.optional",message:"Optional",comment:"Shown behind label when marked as optional"})}
18
17
  </span>
19
- `:ye}
18
+ `:mt}
20
19
  </div>
21
- `:ye}
20
+ `:mt}
22
21
  <div
23
22
  class="checkbox-group"
24
23
  role="group"
25
- aria-labelledby=${we(u)}
26
- aria-describedby=${we(n)}
27
- aria-invalid=${we(m)}
24
+ aria-labelledby=${gt(f)}
25
+ aria-describedby=${gt(n)}
26
+ aria-invalid=${gt(v)}
28
27
  >
29
28
  <slot></slot>
30
29
  </div>
31
- ${a?se`<div class="${l?"help-text error":"help-text"}" id="${n}">${a}</div>`:ye}
30
+ ${o?X`<div class="${c?"help-text error":"help-text"}" id="${n}">${o}</div>`:mt}
32
31
  </div>
33
- `}connectedCallback(){super.connectedCallback(),this.addEventListener("change",F(this,ne)),this.addEventListener("invalid",F(this,ae)),this.addEventListener("slotchange",F(this,oe)),K(this,j,y.on("change",F(this,le))),this.setValue(null),d(this,o,Fe).call(this)}disconnectedCallback(){var t;(t=F(this,j))==null||t.call(this),K(this,j,void 0),super.disconnectedCallback()}checkValidity(){return d(this,o,D).call(this),this.internals.checkValidity()}reportValidity(){return d(this,o,re).call(this),d(this,o,D).call(this),this.internals.checkValidity()}focus(t){let r=d(this,o,Ee).call(this);if(r!=null&&r.focus){r.focus(t);return}HTMLElement.prototype.focus.call(this,t)}updated(t){super.updated(t),d(this,o,tt).call(this,t)&&(t.has("name")&&d(this,o,Ce).call(this),d(this,o,D).call(this))}};H=new WeakMap,Q=new WeakMap,j=new WeakMap,ne=new WeakMap,ae=new WeakMap,oe=new WeakMap,o=new WeakSet,re=function(){K(this,H,!0)},le=new WeakMap,Me=function(){return d(this,o,X).call(this).filter(t=>t.checked).length},Ce=function(){if(this.name)for(let t of d(this,o,X).call(this)){let r=t;r&&typeof r=="object"&&!r.name&&(r._groupName=this.name)}},ie=function(t){for(let r of d(this,o,X).call(this))"_groupInvalid"in r&&(r._groupInvalid=t)},Ee=function(){return d(this,o,X).call(this)[0]},X=function(){var r,i;let t=(r=this.shadowRoot)==null?void 0:r.querySelector("slot");return(i=t==null?void 0:t.assignedElements({flatten:!0}))!=null?i:[]},et=function(){return Pt()},tt=function(t){return t.has("invalid")||t.has("required")||t.has("helpText")||t.has("name")},xe=function(t){let r=d(this,o,Ee).call(this);this.internals.setValidity(t," ",r!=null?r:void 0)},st=function(t){this._internalTabIndex=t?0:-1},D=function(){d(this,o,Fe).call(this);let t=d(this,o,Me).call(this)>0,r=this.required&&!t,i=this.invalid,l=r&&F(this,H),a=i||l;if(d(this,o,st).call(this,a),r){d(this,o,xe).call(this,{valueMissing:!0}),d(this,o,ie).call(this,a);return}if(i){d(this,o,xe).call(this,{customError:!0}),d(this,o,ie).call(this,!0);return}this.internals.setValidity({}),d(this,o,ie).call(this,!1)},Fe=function(){F(this,Q)||this.internals.form&&(this.name&&this.name.trim().length>0||(console.warn('w-checkbox-group: "name" is required for form submission.'),K(this,Q,!0)))},C.shadowRootOptions={...Ye.shadowRootOptions,delegatesFocus:!0},C.styles=Nt`
32
+ `}connectedCallback(){super.connectedCallback(),this.addEventListener("change",M(this,tt)),this.addEventListener("invalid",M(this,et)),this.addEventListener("slotchange",M(this,st)),W(this,D,b.on("change",M(this,it))),this.setValue(null),h(this,r,yt).call(this)}disconnectedCallback(){var e;(e=M(this,D))==null||e.call(this),W(this,D,void 0),super.disconnectedCallback()}checkValidity(){return h(this,r,N).call(this),this.internals.checkValidity()}reportValidity(){return h(this,r,Z).call(this),h(this,r,N).call(this),this.internals.checkValidity()}focus(e){let s=h(this,r,_t).call(this);if(s!=null&&s.focus){s.focus(e);return}HTMLElement.prototype.focus.call(this,e)}updated(e){super.updated(e),h(this,r,Ht).call(this,e)&&(e.has("name")&&h(this,r,vt).call(this),h(this,r,N).call(this))}};$=new WeakMap,B=new WeakMap,D=new WeakMap,tt=new WeakMap,et=new WeakMap,st=new WeakMap,r=new WeakSet,Z=function(){W(this,$,!0)},it=new WeakMap,pt=function(){return h(this,r,J).call(this).filter(e=>e.checked).length},vt=function(){if(this.name)for(let e of h(this,r,J).call(this)){let s=e;s&&typeof s=="object"&&!s.name&&(s._groupName=this.name)}},Y=function(e){for(let s of h(this,r,J).call(this))"_groupInvalid"in s&&(s._groupInvalid=e)},_t=function(){return h(this,r,J).call(this)[0]},J=function(){var s,a;let e=(s=this.shadowRoot)==null?void 0:s.querySelector("slot");return(a=e==null?void 0:e.assignedElements({flatten:!0}))!=null?a:[]},jt=function(){return de()},Ht=function(e){return e.has("invalid")||e.has("required")||e.has("helpText")||e.has("name")},bt=function(e){let s=h(this,r,_t).call(this);this.internals.setValidity(e," ",s!=null?s:void 0)},zt=function(e){this._internalTabIndex=e?0:-1},N=function(){h(this,r,yt).call(this);let e=h(this,r,pt).call(this)>0,s=this.required&&!e,a=this.invalid,c=s&&M(this,$),o=a||c;if(h(this,r,zt).call(this,o),s){h(this,r,bt).call(this,{valueMissing:!0}),h(this,r,Y).call(this,o);return}if(a){h(this,r,bt).call(this,{customError:!0}),h(this,r,Y).call(this,!0);return}this.internals.setValidity({}),h(this,r,Y).call(this,!1)},yt=function(){M(this,B)||this.internals.form&&(this.name&&this.name.trim().length>0||(console.warn('w-checkbox-group: "name" is required for form submission.'),W(this,B,!0)))},C.shadowRootOptions={...Rt.shadowRootOptions,delegatesFocus:!0},C.styles=he`
34
33
  .wrapper {
35
34
  display: inline-flex;
36
35
  flex-direction: column;
@@ -67,5 +66,5 @@ Please compile your catalog first.
67
66
  .error {
68
67
  color: var(--w-s-color-text-negative);
69
68
  }
70
- `,I([R({type:String,reflect:!0})],C.prototype,"label",2),I([R({type:String,reflect:!0})],C.prototype,"name",2),I([R({type:Boolean,reflect:!0})],C.prototype,"optional",2),I([R({type:String,reflect:!0,attribute:"help-text"})],C.prototype,"helpText",2),I([R({type:Boolean,reflect:!0})],C.prototype,"required",2),I([R({type:Boolean,reflect:!0})],C.prototype,"invalid",2),I([At()],C.prototype,"_internalTabIndex",2);customElements.get("w-checkbox-group")||customElements.define("w-checkbox-group",C);export{C as WCheckboxGroup};
69
+ `,S([O({type:String,reflect:!0})],C.prototype,"label",2),S([O({type:String,reflect:!0})],C.prototype,"name",2),S([O({type:Boolean,reflect:!0})],C.prototype,"optional",2),S([O({type:String,reflect:!0,attribute:"help-text"})],C.prototype,"helpText",2),S([O({type:Boolean,reflect:!0})],C.prototype,"required",2),S([O({type:Boolean,reflect:!0})],C.prototype,"invalid",2),S([ue()],C.prototype,"_internalTabIndex",2);customElements.get("w-checkbox-group")||customElements.define("w-checkbox-group",C);export{C as WCheckboxGroup};
71
70
  //# sourceMappingURL=checkbox-group.js.map