@warp-ds/elements 2.11.0-next.1 → 2.12.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/custom-elements.json +326 -0
  2. package/dist/docs/index.md +1 -0
  3. package/dist/docs/modal/modal.md +1 -0
  4. package/dist/docs/modal/styling.md +1 -0
  5. package/dist/docs/textfield/api.md +12 -0
  6. package/dist/docs/textfield/textfield.md +12 -0
  7. package/dist/docs/tooltip/accessibility.md +9 -0
  8. package/dist/docs/tooltip/api.md +87 -0
  9. package/dist/docs/tooltip/examples.md +32 -0
  10. package/dist/docs/tooltip/styling.md +47 -0
  11. package/dist/docs/tooltip/tooltip.md +197 -0
  12. package/dist/docs/tooltip/usage.md +10 -0
  13. package/dist/entrypoint-react.d.ts +1 -0
  14. package/dist/entrypoint-react.js +1 -0
  15. package/dist/index.d.ts +163 -0
  16. package/dist/packages/affix/affix.js +3 -3
  17. package/dist/packages/affix/affix.js.map +2 -2
  18. package/dist/packages/affix/styles.js +1 -1
  19. package/dist/packages/attention/attention.stories.js +5 -1
  20. package/dist/packages/modal/modal.d.ts +1 -0
  21. package/dist/packages/modal/modal.js +5 -1
  22. package/dist/packages/modal/modal.js.map +2 -2
  23. package/dist/packages/modal/modal.react.stories.d.ts +1 -1
  24. package/dist/packages/modal/react.d.ts +13 -5
  25. package/dist/packages/modal/react.js +10 -4
  26. package/dist/packages/modal/styles.js +5 -1
  27. package/dist/packages/modal-footer/react.d.ts +2 -1
  28. package/dist/packages/modal-footer/react.js +11 -5
  29. package/dist/packages/modal-header/react.js +1 -0
  30. package/dist/packages/select/select.js +1 -1
  31. package/dist/packages/select/select.js.map +2 -2
  32. package/dist/packages/select/styles.js +1 -1
  33. package/dist/packages/tab/react.d.ts +1 -0
  34. package/dist/packages/tab/react.js +2 -1
  35. package/dist/packages/tabs/tabs.js +4 -4
  36. package/dist/packages/tabs/tabs.js.map +3 -3
  37. package/dist/packages/tabs/tabs.react.stories.js +5 -5
  38. package/dist/packages/textarea/styles.js +1 -1
  39. package/dist/packages/textarea/textarea.js +6 -6
  40. package/dist/packages/textarea/textarea.js.map +2 -2
  41. package/dist/packages/textfield/input-styles.js +1 -1
  42. package/dist/packages/textfield/react.d.ts +1 -1
  43. package/dist/packages/textfield/styles.js +1 -1
  44. package/dist/packages/textfield/textfield.d.ts +8 -0
  45. package/dist/packages/textfield/textfield.js +32 -15
  46. package/dist/packages/textfield/textfield.js.map +3 -3
  47. package/dist/packages/textfield/textfield.react.stories.d.ts +2 -2
  48. package/dist/packages/tooltip/locales/da/messages.d.mts +1 -0
  49. package/dist/packages/tooltip/locales/da/messages.mjs +1 -0
  50. package/dist/packages/tooltip/locales/en/messages.d.mts +1 -0
  51. package/dist/packages/tooltip/locales/en/messages.mjs +1 -0
  52. package/dist/packages/tooltip/locales/fi/messages.d.mts +1 -0
  53. package/dist/packages/tooltip/locales/fi/messages.mjs +1 -0
  54. package/dist/packages/tooltip/locales/nb/messages.d.mts +1 -0
  55. package/dist/packages/tooltip/locales/nb/messages.mjs +1 -0
  56. package/dist/packages/tooltip/locales/sv/messages.d.mts +1 -0
  57. package/dist/packages/tooltip/locales/sv/messages.mjs +1 -0
  58. package/dist/packages/tooltip/react.d.ts +16 -0
  59. package/dist/packages/tooltip/react.js +28 -0
  60. package/dist/packages/tooltip/styles.d.ts +1 -0
  61. package/dist/packages/tooltip/styles.js +66 -0
  62. package/dist/packages/tooltip/tooltip.d.ts +72 -0
  63. package/dist/packages/tooltip/tooltip.hydration.test.d.ts +1 -0
  64. package/dist/packages/tooltip/tooltip.hydration.test.js +13 -0
  65. package/dist/packages/tooltip/tooltip.js +2528 -0
  66. package/dist/packages/tooltip/tooltip.js.map +7 -0
  67. package/dist/packages/tooltip/tooltip.react.stories.d.ts +12 -0
  68. package/dist/packages/tooltip/tooltip.react.stories.js +12 -0
  69. package/dist/packages/tooltip/tooltip.stories.d.ts +17 -0
  70. package/dist/packages/tooltip/tooltip.stories.js +115 -0
  71. package/dist/packages/tooltip/tooltip.test.d.ts +2 -0
  72. package/dist/packages/tooltip/tooltip.test.js +130 -0
  73. package/dist/web-types.json +89 -2
  74. package/eik/index.js +19 -19
  75. package/package.json +2 -1
@@ -35,7 +35,7 @@ export const inputLabelStyles = css `
35
35
 
36
36
  /* Optional text styling */
37
37
  label span {
38
- --_padding-left: var(--w-c-input-optional-padding-left, 0.8rem);
38
+ --_padding-left: var(--w-c-input-optional-padding-left, 0.4rem);
39
39
  --_font-weight: var(--w-c-input-optional-font-weight, 400);
40
40
  --_font-size: var(--w-c-input-optional-font-size, var(--w-font-size-s));
41
41
  --_line-height: var(
@@ -6,7 +6,7 @@ import type { WarpTextField } from "./textfield.js";
6
6
  *
7
7
  * [Warp component reference](https://warp-ds.github.io/docs/components/text-area/frameworks/elements)
8
8
  */
9
- export declare const TextField: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.HTMLAttributes<WarpTextField>, "autocomplete" | "name" | "type" | "disabled" | "invalid" | "label" | "helpText" | "optional" | "size" | "max" | "min" | "minLength" | "minlength" | "maxLength" | "maxlength" | "pattern" | "placeholder" | "readOnly" | "readonly" | "required" | "value" | "step" | "formatter" | "mask" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "onblur" | "onchange" | "onfocus" | "oninput" | "_hasPrefix" | "_hasSuffix" | "updated" | "firstUpdated" | "resetFormControl" | "_inputstyles" | "_helptextstyles" | "_label" | "_helpId" | "_id" | "_error" | "handler" | "prefixSlotChange" | "suffixSlotChange" | "render" | "validationTarget" | "form" | "internals" | "showError" | "validationMessage" | "validity" | "validationComplete" | "checkValidity" | "formResetCallback" | "valueChangedCallback" | "validityCallback" | "validationMessageCallback" | "setValue" | "shouldFormValueUpdate" | "renderOptions" | "onFocus" | "onBlur" | "onChange" | "onInput"> & {
9
+ export declare const TextField: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.HTMLAttributes<WarpTextField>, "autocomplete" | "name" | "type" | "disabled" | "invalid" | "label" | "helpText" | "optional" | "size" | "max" | "min" | "minLength" | "minlength" | "maxLength" | "maxlength" | "pattern" | "placeholder" | "readOnly" | "readonly" | "required" | "value" | "step" | "tooltip" | "formatter" | "mask" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "onblur" | "onchange" | "onfocus" | "oninput" | "_hasPrefix" | "_hasSuffix" | "updated" | "firstUpdated" | "resetFormControl" | "_inputstyles" | "_helptextstyles" | "_label" | "_helpId" | "_id" | "_error" | "handler" | "prefixSlotChange" | "suffixSlotChange" | "render" | "validationTarget" | "form" | "internals" | "showError" | "validationMessage" | "validity" | "validationComplete" | "checkValidity" | "formResetCallback" | "valueChangedCallback" | "validityCallback" | "validationMessageCallback" | "setValue" | "shouldFormValueUpdate" | "renderOptions" | "onFocus" | "onBlur" | "onChange" | "onInput"> & {
10
10
  onBlur?: ((e: FocusEvent) => void) | undefined;
11
11
  onblur?: ((e: FocusEvent) => void) | undefined;
12
12
  onChange?: ((e: ChangeEventWithTarget<HTMLInputElement>) => void) | undefined;
@@ -1,2 +1,2 @@
1
1
  import { unsafeCSS } from "lit";
2
- export const styles = unsafeCSS("*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.focus\\:\\[--w-outline-offset\\:-2px\\]:focus{--w-outline-offset:-2px}.bg-transparent{background-color:#0000}.border-1{border-width:1px}.rounded-4{border-radius:4px}.caret-current{caret-color:currentColor}.block{display:block}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.outline-\\[--w-s-color-border-negative\\]\\!{outline-color:var(--w-s-color-border-negative)!important}.relative{position:relative}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled-subtle{background-color:var(--w-s-color-background-disabled-subtle)}.s-text{color:var(--w-s-color-text)}.s-text-disabled{color:var(--w-s-color-text-disabled)}.s-text-negative{color:var(--w-s-color-text-negative)}.s-text-subtle{color:var(--w-s-color-text-subtle)}.placeholder\\:s-text-placeholder::placeholder{color:var(--w-s-color-text-placeholder)}.s-border-disabled{border-color:var(--w-s-color-border-disabled)}.s-border-negative{border-color:var(--w-s-color-border-negative)}.s-border-strong{border-color:var(--w-s-color-border-strong)}.hover\\:s-border-negative-hover:hover{border-color:var(--w-s-color-border-negative-hover)}.hover\\:s-border-strong-hover:hover{border-color:var(--w-s-color-border-strong-hover)}.active\\:s-border-selected:active{border-color:var(--w-s-color-border-selected)}.w-full{width:100%}.min-h-\\[42\\]{min-height:4.2rem}.mb-0{margin-bottom:0}.mt-4{margin-top:.4rem}.px-8{padding-left:.8rem;padding-right:.8rem}.py-12{padding-top:1.2rem;padding-bottom:1.2rem}.pb-4{padding-bottom:.4rem}.pl-0{padding-left:0}.pl-8{padding-left:.8rem}.pr-40{padding-right:4rem}.pl-\\[var\\(--w-prefix-width\\,_40px\\)\\]{padding-left:var(--w-prefix-width,40px)}.visible{visibility:visible}.cursor-pointer{cursor:pointer}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:grayscale}.font-bold{font-weight:700}.font-normal{font-weight:400}.pointer-events-none{pointer-events:none}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.text-m{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-s{font-size:var(--w-font-size-s);line-height:var(--w-line-height-s)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}.leading-m{line-height:var(--w-line-height-m)}@media (min-width:480px){.sm\\:min-h-\\[45\\]{min-height:4.5rem}}");
2
+ export const styles = unsafeCSS("*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.align-text-top{vertical-align:text-top}.focus\\:\\[--w-outline-offset\\:-2px\\]:focus{--w-outline-offset:-2px}.bg-transparent{background-color:#0000}.appearance-none{-webkit-appearance:none;appearance:none}.border-1{border-width:1px}.rounded-4{border-radius:4px}.caret-current{caret-color:currentColor}.block{display:block}.inline{display:inline}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.outline-\\[--w-s-color-border-negative\\]\\!{outline-color:var(--w-s-color-border-negative)!important}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled-subtle{background-color:var(--w-s-color-background-disabled-subtle)}.s-text{color:var(--w-s-color-text)}.s-text-disabled{color:var(--w-s-color-text-disabled)}.s-text-negative{color:var(--w-s-color-text-negative)}.placeholder\\:s-text-placeholder::placeholder{color:var(--w-s-color-text-placeholder)}.s-border-disabled{border-color:var(--w-s-color-border-disabled)}.s-border-negative{border-color:var(--w-s-color-border-negative)}.s-border-strong{border-color:var(--w-s-color-border-strong)}.hover\\:s-border-negative-hover:hover{border-color:var(--w-s-color-border-negative-hover)}.hover\\:s-border-strong-hover:hover{border-color:var(--w-s-color-border-strong-hover)}.active\\:s-border-selected:active{border-color:var(--w-s-color-border-selected)}.w-full{width:100%}.min-h-\\[42\\]{min-height:4.2rem}.m-0{margin:0}.mb-0{margin-bottom:0}.ml-4{margin-left:.4rem}.p-0{padding:0}.px-8{padding-left:.8rem;padding-right:.8rem}.py-12{padding-top:1.2rem;padding-bottom:1.2rem}.pl-0{padding-left:0}.pr-40{padding-right:4rem}.pl-\\[var\\(--w-prefix-width\\,_40px\\)\\]{padding-left:var(--w-prefix-width,40px)}.visible{visibility:visible}.pointer-events-none{pointer-events:none}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.text-m{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.leading-m{line-height:var(--w-line-height-m)}@media (min-width:480px){.sm\\:min-h-\\[45\\]{min-height:4.5rem}}");
@@ -128,6 +128,14 @@ declare class WarpTextField extends WarpTextField_base {
128
128
  * A space-separated string that hints to browsers [what type of content it can suggest](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/autocomplete#value) to autofill.
129
129
  */
130
130
  autocomplete?: HTMLInputElement["autocomplete"];
131
+ /**
132
+ * Suplementary information that should show in a tooltip behind an information icon after the label.
133
+ *
134
+ * Use the `tooltip` slot if you need markup and not just text.
135
+ *
136
+ * You must provide a label to be able to show an info icon with a tooltip.
137
+ */
138
+ tooltip?: string;
131
139
  /**
132
140
  * Function to format value when the input field.
133
141
  *
@@ -1,4 +1,4 @@
1
- var je=Object.defineProperty;var Ie=Object.getOwnPropertyDescriptor;var ie=o=>{throw TypeError(o)};var p=(o,e,r,t)=>{for(var a=t>1?void 0:t?Ie(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&&je(e,r,a),a};var G=(o,e,r)=>e.has(o)||ie("Cannot "+r);var ne=(o,e,r)=>(G(o,e,"read from private field"),r?r.call(o):e.get(o)),J=(o,e,r)=>e.has(o)?ie("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,r),se=(o,e,r,t)=>(G(o,e,"write to private field"),t?t.call(o,r):e.set(o,r),r),le=(o,e,r)=>(G(o,e,"access private method"),r);var K=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)?K.apply(void 0,t):typeof t=="object"&&t?Object.keys(t).map(function(a){return t[a]?a:""}):"")},[]).join(" ")};var L=o=>typeof o=="string",Ye=o=>typeof o=="function",de=new Map,he="en";function re(o){return[...Array.isArray(o)?o:[o],he]}function te(o,e,r){let t=re(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 X(()=>Z("date",t,r),()=>new Intl.DateTimeFormat(t,a)).format(L(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 te(o,e,t)}function Q(o,e,r){let t=re(o);return X(()=>Z("number",t,r),()=>new Intl.NumberFormat(t,r)).format(e)}function ce(o,e,r,{offset:t=0,...a}){let l=re(o),s=e?X(()=>Z("plural-ordinal",l),()=>new Intl.PluralRules(l,{type:"ordinal"})):X(()=>Z("plural-cardinal",l),()=>new Intl.PluralRules(l,{type:"cardinal"}));return a[r]??a[s.select(r-t)]??a.other}function X(o,e){let r=o(),t=de.get(r);return t||(t=e(),de.set(r,t)),t}function Z(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}/,ue=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)}}),be="%__lingui_octothorpe__%",He=(o,e,r={})=>{let t=e||o,a=s=>typeof s=="object"?s:r[s],l=(s,i)=>{let b=Object.keys(r).length?a("number"):void 0,f=Q(t,s,b);return i.replace(new RegExp(be,"g"),f)};return{plural:(s,i)=>{let{offset:b=0}=i,f=ce(t,!1,s,i);return l(s-b,f)},selectordinal:(s,i)=>{let{offset:b=0}=i,f=ce(t,!0,s,i);return l(s-b,f)},select:Xe,number:(s,i)=>Q(t,s,a(i)||{style:i}),date:(s,i)=>te(t,s,a(i)||i),time:(s,i)=>De(t,s,a(i)||i)}},Xe=(o,e)=>e[o]??e.other;function Ze(o,e,r){return(t={},a)=>{let l=He(e,r,a),s=(b,f=!1)=>Array.isArray(b)?b.reduce((C,M)=>{if(M==="#"&&f)return C+be;if(L(M))return C+M;let[F,y,E]=M,S={};y==="plural"||y==="selectordinal"||y==="select"?Object.entries(E).forEach(([$,N])=>{S[$]=s(N,y==="plural"||y==="selectordinal")}):S=E;let w;if(y){let $=l[y];w=$(t[F],S)}else w=t[F];return w==null?C:C+w},""):b,i=s(o);return L(i)&&pe.test(i)?ue(i):L(i)?i:i?String(i):""}}var Re=Object.defineProperty,Te=(o,e,r)=>e in o?Re(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,qe=(o,e,r)=>(Te(o,typeof e!="symbol"?e+"":e,r),r),W=class{constructor(){qe(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,Be=(o,e,r)=>e in o?Ue(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,V=(o,e,r)=>(Be(o,typeof e!="symbol"?e+"":e,r),r),ee=class extends W{constructor(e){super(),V(this,"_locale",""),V(this,"_locales"),V(this,"_localeData",{}),V(this,"_messages",{}),V(this,"_missing"),V(this,"_messageCompiler"),V(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??he,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=""),L(e)||(r=e.values||r,a=e.message,e=e.id);let l=this.messages[e],s=l===void 0,i=this._missing;if(i&&s)return Ye(i)?i(this._locale,e):i;s&&this.emit("missing",{id:e,locale:this._locale});let b=l||a||e;return L(b)&&(this._messageCompiler?b=this._messageCompiler(b):console.warn(`Uncompiled message detected! Message:
1
+ var je=Object.defineProperty;var Ie=Object.getOwnPropertyDescriptor;var ne=o=>{throw TypeError(o)};var h=(o,e,r,t)=>{for(var a=t>1?void 0:t?Ie(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&&je(e,r,a),a};var G=(o,e,r)=>e.has(o)||ne("Cannot "+r);var se=(o,e,r)=>(G(o,e,"read from private field"),r?r.call(o):e.get(o)),J=(o,e,r)=>e.has(o)?ne("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,r),le=(o,e,r,t)=>(G(o,e,"write to private field"),t?t.call(o,r):e.set(o,r),r),de=(o,e,r)=>(G(o,e,"access private method"),r);var K=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)?K.apply(void 0,t):typeof t=="object"&&t?Object.keys(t).map(function(a){return t[a]?a:""}):"")},[]).join(" ")};var L=o=>typeof o=="string",Ye=o=>typeof o=="function",ce=new Map,he="en";function re(o){return[...Array.isArray(o)?o:[o],he]}function te(o,e,r){let t=re(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 X(()=>Z("date",t,r),()=>new Intl.DateTimeFormat(t,a)).format(L(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 te(o,e,t)}function Q(o,e,r){let t=re(o);return X(()=>Z("number",t,r),()=>new Intl.NumberFormat(t,r)).format(e)}function pe(o,e,r,{offset:t=0,...a}){let d=re(o),s=e?X(()=>Z("plural-ordinal",d),()=>new Intl.PluralRules(d,{type:"ordinal"})):X(()=>Z("plural-cardinal",d),()=>new Intl.PluralRules(d,{type:"cardinal"}));return a[r]??a[s.select(r-t)]??a.other}function X(o,e){let r=o(),t=ce.get(r);return t||(t=e(),ce.set(r,t)),t}function Z(o,e,r){let t=e.join("-");return`${o}-${t}-${JSON.stringify(r)}`}var ue=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,be=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)}}),ge="%__lingui_octothorpe__%",He=(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,f=Q(t,s,b);return i.replace(new RegExp(ge,"g"),f)};return{plural:(s,i)=>{let{offset:b=0}=i,f=pe(t,!1,s,i);return d(s-b,f)},selectordinal:(s,i)=>{let{offset:b=0}=i,f=pe(t,!0,s,i);return d(s-b,f)},select:Xe,number:(s,i)=>Q(t,s,a(i)||{style:i}),date:(s,i)=>te(t,s,a(i)||i),time:(s,i)=>De(t,s,a(i)||i)}},Xe=(o,e)=>e[o]??e.other;function Ze(o,e,r){return(t={},a)=>{let d=He(e,r,a),s=(b,f=!1)=>Array.isArray(b)?b.reduce((C,M)=>{if(M==="#"&&f)return C+ge;if(L(M))return C+M;let[O,y,E]=M,S={};y==="plural"||y==="selectordinal"||y==="select"?Object.entries(E).forEach(([$,A])=>{S[$]=s(A,y==="plural"||y==="selectordinal")}):S=E;let w;if(y){let $=d[y];w=$(t[O],S)}else w=t[O];return w==null?C:C+w},""):b,i=s(o);return L(i)&&ue.test(i)?be(i):L(i)?i:i?String(i):""}}var Re=Object.defineProperty,Te=(o,e,r)=>e in o?Re(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,qe=(o,e,r)=>(Te(o,typeof e!="symbol"?e+"":e,r),r),W=class{constructor(){qe(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,Be=(o,e,r)=>e in o?Ue(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,V=(o,e,r)=>(Be(o,typeof e!="symbol"?e+"":e,r),r),ee=class extends W{constructor(e){super(),V(this,"_locale",""),V(this,"_locales"),V(this,"_localeData",{}),V(this,"_messages",{}),V(this,"_missing"),V(this,"_messageCompiler"),V(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??he,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=""),L(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 Ye(i)?i(this._locale,e):i;s&&this.emit("missing",{id:e,locale:this._locale});let b=d||a||e;return L(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
- `)),L(b)&&pe.test(b)?ue(b):L(b)?b:Ze(b,this._locale,this._locales)(r,t?.formats)}date(e,r){return te(this._locales||this._locale,e,r)}number(e,r){return Q(this._locales||this._locale,e,r)}};function Ge(o={}){return new ee(o)}var _=Ge();var h=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)},m=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 ge(o){var e,r,t,a,l,s,i,b,f,C,M,F,y,E,S,w,$,N,q;class Ae extends o{constructor(...n){var c,g,v;super(...n),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),i.set(this,!0),f.set(this,""),C.set(this,()=>{m(this,a,!0,"f"),m(this,r,!0,"f"),h(this,e,"m",w).call(this)}),M.set(this,()=>{m(this,r,!1,"f"),h(this,e,"m",$).call(this,this.shouldFormValueUpdate()?h(this,f,"f"):""),!this.validity.valid&&h(this,a,"f")&&m(this,t,!0,"f");let z=h(this,e,"m",w).call(this);this.validationMessageCallback&&this.validationMessageCallback(z?this.internals.validationMessage:"")}),F.set(this,()=>{var z;h(this,i,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),m(this,i,!1,"f")),m(this,a,!0,"f"),m(this,t,!0,"f"),h(this,e,"m",w).call(this),(z=this===null||this===void 0?void 0:this.validationMessageCallback)===null||z===void 0||z.call(this,this.showError?this.internals.validationMessage:"")}),y.set(this,void 0),E.set(this,!1),S.set(this,Promise.resolve()),(c=this.addEventListener)===null||c===void 0||c.call(this,"focus",h(this,C,"f")),(g=this.addEventListener)===null||g===void 0||g.call(this,"blur",h(this,M,"f")),(v=this.addEventListener)===null||v===void 0||v.call(this,"invalid",h(this,F,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let n=this.validators.map(v=>v.attribute).flat(),c=super.observedAttributes||[];return[...new Set([...c,...n])]}static getValidator(n){return this.validators.find(c=>c.attribute===n)||null}static getValidators(n){return this.validators.filter(c=>{var g;if(c.attribute===n||!((g=c.attribute)===null||g===void 0)&&g.includes(n))return!0})}get form(){return this.internals.form}get showError(){return h(this,e,"m",w).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(n,c,g){var v;(v=super.attributeChangedCallback)===null||v===void 0||v.call(this,n,c,g);let j=this.constructor.getValidators(n);j?.length&&this.validationTarget&&this.setValue(h(this,f,"f"))}setValue(n){var c;m(this,t,!1,"f"),(c=this.validationMessageCallback)===null||c===void 0||c.call(this,""),m(this,f,n,"f");let v=this.shouldFormValueUpdate()?n:null;this.internals.setFormValue(v),h(this,e,"m",$).call(this,v),this.valueChangedCallback&&this.valueChangedCallback(v),h(this,e,"m",w).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(n=>n(h(this,S,"f")))}formResetCallback(){var n,c;m(this,a,!1,"f"),m(this,t,!1,"f"),h(this,e,"m",w).call(this),(n=this.resetFormControl)===null||n===void 0||n.call(this),(c=this.validationMessageCallback)===null||c===void 0||c.call(this,h(this,e,"m",w).call(this)?this.validationMessage:"")}}return r=new WeakMap,t=new WeakMap,a=new WeakMap,l=new WeakMap,s=new WeakMap,i=new WeakMap,f=new WeakMap,C=new WeakMap,M=new WeakMap,F=new WeakMap,y=new WeakMap,E=new WeakMap,S=new WeakMap,e=new WeakSet,b=function(){let n=this.getRootNode(),c=`${this.localName}[name="${this.getAttribute("name")}"]`;return n.querySelectorAll(c)},w=function(){if(this.hasAttribute("disabled"))return!1;let n=h(this,t,"f")||h(this,a,"f")&&!this.validity.valid&&!h(this,r,"f");return n&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),n},$=function(n){let c=this.constructor,g={},v=c.validators,z=[],j=v.some(k=>k.isValid instanceof Promise);h(this,E,"f")||(m(this,S,new Promise(k=>{m(this,y,k,"f")}),"f"),m(this,E,!0,"f")),h(this,l,"f")&&(h(this,l,"f").abort(),m(this,s,h(this,l,"f"),"f"));let I=new AbortController;m(this,l,I,"f");let Y,ae=!1;v.length&&(v.forEach(k=>{let U=k.key||"customError",O=k.isValid(this,n,I.signal);O instanceof Promise?(z.push(O),O.then(B=>{B!=null&&(g[U]=!B,Y=h(this,e,"m",q).call(this,k,n),h(this,e,"m",N).call(this,g,Y))})):(g[U]=!O,this.validity[U]!==!O&&(ae=!0),!O&&!Y&&(Y=h(this,e,"m",q).call(this,k,n)))}),Promise.allSettled(z).then(()=>{var k;I?.signal.aborted||(m(this,E,!1,"f"),(k=h(this,y,"f"))===null||k===void 0||k.call(this))}),(ae||!j)&&h(this,e,"m",N).call(this,g,Y))},N=function(n,c){if(this.validationTarget)this.internals.setValidity(n,c,this.validationTarget),m(this,i,!1,"f");else{if(this.internals.setValidity(n,c),this.internals.validity.valid)return;m(this,i,!0,"f")}},q=function(n,c){if(this.validityCallback){let g=this.validityCallback(n.key||"customError");if(g)return g}return n.message instanceof Function?n.message(this,c):n.message},Ae}import{html as D,LitElement as Fe,nothing as Oe}from"lit";import{property as u,query as ir}from"lit/decorators.js";import{classMap as nr}from"lit/directives/class-map.js";import{ifDefined as x}from"lit/directives/if-defined.js";var Je=["en","nb","fi","da","sv"],oe="en",R=o=>Je.find(e=>o===e||o.toLowerCase().includes(e))||oe;function fe(){if(typeof window>"u"){let o=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return R(o)}try{let o=ve(document);if(o)return R(o);let e=er();if(e)return R(e);let r=ve(ye());return r?R(r):oe}catch(o){return console.warn("could not detect locale, falling back to source locale",o),oe}}var we=(o,e,r,t,a)=>{_.load("en",o),_.load("nb",e),_.load("fi",r),_.load("da",t),_.load("sv",a);let l=fe();_.activate(l),xe(),Qe()},Ke="warp-i18n-change";function xe(){typeof window>"u"||window.dispatchEvent(new Event(Ke))}var me=!1;function Qe(){if(me||typeof window>"u"||!document?.documentElement)return;me=!0;let o=()=>{let a=fe();_.locale!==a&&(_.activate(a),xe())},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=ye();r&&r.documentElement&&r!==document&&e.observe(r.documentElement,{attributes:!0,attributeFilter:["lang"]});let t=We();t&&e.observe(t,{attributes:!0,attributeFilter:["lang"]})}function ye(){try{return window.parent?.document??null}catch{return null}}function ve(o){try{return o?.documentElement?.lang??""}catch{return""}}function We(){try{return window.frameElement??null}catch{return null}}function er(){try{return window.frameElement?.getAttribute?.("lang")??""}catch{return""}}import{css as rr}from"lit";import{unsafeCSS as tr}from"lit";var ke=rr`
9
+ `)),L(b)&&ue.test(b)?be(b):L(b)?b:Ze(b,this._locale,this._locales)(r,t?.formats)}date(e,r){return te(this._locales||this._locale,e,r)}number(e,r){return Q(this._locales||this._locale,e,r)}};function Ge(o={}){return new ee(o)}var _=Ge();var p=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)},m=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 me(o){var e,r,t,a,d,s,i,b,f,C,M,O,y,E,S,w,$,A,q;class Ae extends o{constructor(...n){var c,g,v;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),f.set(this,""),C.set(this,()=>{m(this,a,!0,"f"),m(this,r,!0,"f"),p(this,e,"m",w).call(this)}),M.set(this,()=>{m(this,r,!1,"f"),p(this,e,"m",$).call(this,this.shouldFormValueUpdate()?p(this,f,"f"):""),!this.validity.valid&&p(this,a,"f")&&m(this,t,!0,"f");let z=p(this,e,"m",w).call(this);this.validationMessageCallback&&this.validationMessageCallback(z?this.internals.validationMessage:"")}),O.set(this,()=>{var z;p(this,i,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),m(this,i,!1,"f")),m(this,a,!0,"f"),m(this,t,!0,"f"),p(this,e,"m",w).call(this),(z=this===null||this===void 0?void 0:this.validationMessageCallback)===null||z===void 0||z.call(this,this.showError?this.internals.validationMessage:"")}),y.set(this,void 0),E.set(this,!1),S.set(this,Promise.resolve()),(c=this.addEventListener)===null||c===void 0||c.call(this,"focus",p(this,C,"f")),(g=this.addEventListener)===null||g===void 0||g.call(this,"blur",p(this,M,"f")),(v=this.addEventListener)===null||v===void 0||v.call(this,"invalid",p(this,O,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let n=this.validators.map(v=>v.attribute).flat(),c=super.observedAttributes||[];return[...new Set([...c,...n])]}static getValidator(n){return this.validators.find(c=>c.attribute===n)||null}static getValidators(n){return this.validators.filter(c=>{var g;if(c.attribute===n||!((g=c.attribute)===null||g===void 0)&&g.includes(n))return!0})}get form(){return this.internals.form}get showError(){return p(this,e,"m",w).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(n,c,g){var v;(v=super.attributeChangedCallback)===null||v===void 0||v.call(this,n,c,g);let I=this.constructor.getValidators(n);I?.length&&this.validationTarget&&this.setValue(p(this,f,"f"))}setValue(n){var c;m(this,t,!1,"f"),(c=this.validationMessageCallback)===null||c===void 0||c.call(this,""),m(this,f,n,"f");let v=this.shouldFormValueUpdate()?n:null;this.internals.setFormValue(v),p(this,e,"m",$).call(this,v),this.valueChangedCallback&&this.valueChangedCallback(v),p(this,e,"m",w).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(n=>n(p(this,S,"f")))}formResetCallback(){var n,c;m(this,a,!1,"f"),m(this,t,!1,"f"),p(this,e,"m",w).call(this),(n=this.resetFormControl)===null||n===void 0||n.call(this),(c=this.validationMessageCallback)===null||c===void 0||c.call(this,p(this,e,"m",w).call(this)?this.validationMessage:"")}}return r=new WeakMap,t=new WeakMap,a=new WeakMap,d=new WeakMap,s=new WeakMap,i=new WeakMap,f=new WeakMap,C=new WeakMap,M=new WeakMap,O=new WeakMap,y=new WeakMap,E=new WeakMap,S=new WeakMap,e=new WeakSet,b=function(){let n=this.getRootNode(),c=`${this.localName}[name="${this.getAttribute("name")}"]`;return n.querySelectorAll(c)},w=function(){if(this.hasAttribute("disabled"))return!1;let n=p(this,t,"f")||p(this,a,"f")&&!this.validity.valid&&!p(this,r,"f");return n&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),n},$=function(n){let c=this.constructor,g={},v=c.validators,z=[],I=v.some(k=>k.isValid instanceof Promise);p(this,E,"f")||(m(this,S,new Promise(k=>{m(this,y,k,"f")}),"f"),m(this,E,!0,"f")),p(this,d,"f")&&(p(this,d,"f").abort(),m(this,s,p(this,d,"f"),"f"));let Y=new AbortController;m(this,d,Y,"f");let D,ie=!1;v.length&&(v.forEach(k=>{let U=k.key||"customError",F=k.isValid(this,n,Y.signal);F instanceof Promise?(z.push(F),F.then(B=>{B!=null&&(g[U]=!B,D=p(this,e,"m",q).call(this,k,n),p(this,e,"m",A).call(this,g,D))})):(g[U]=!F,this.validity[U]!==!F&&(ie=!0),!F&&!D&&(D=p(this,e,"m",q).call(this,k,n)))}),Promise.allSettled(z).then(()=>{var k;Y?.signal.aborted||(m(this,E,!1,"f"),(k=p(this,y,"f"))===null||k===void 0||k.call(this))}),(ie||!I)&&p(this,e,"m",A).call(this,g,D))},A=function(n,c){if(this.validationTarget)this.internals.setValidity(n,c,this.validationTarget),m(this,i,!1,"f");else{if(this.internals.setValidity(n,c),this.internals.validity.valid)return;m(this,i,!0,"f")}},q=function(n,c){if(this.validityCallback){let g=this.validityCallback(n.key||"customError");if(g)return g}return n.message instanceof Function?n.message(this,c):n.message},Ae}import{html as N,LitElement as Fe,nothing as ae}from"lit";import{property as u,query as ir}from"lit/decorators.js";import{classMap as nr}from"lit/directives/class-map.js";import{ifDefined as x}from"lit/directives/if-defined.js";var Je=["en","nb","fi","da","sv"],oe="en",R=o=>Je.find(e=>o===e||o.toLowerCase().includes(e))||oe;function we(){if(typeof window>"u"){let o=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return R(o)}try{let o=fe(document);if(o)return R(o);let e=er();if(e)return R(e);let r=fe(ke());return r?R(r):oe}catch(o){return console.warn("could not detect locale, falling back to source locale",o),oe}}var xe=(o,e,r,t,a)=>{_.load("en",o),_.load("nb",e),_.load("fi",r),_.load("da",t),_.load("sv",a);let d=we();_.activate(d),ye(),Qe()},Ke="warp-i18n-change";function ye(){typeof window>"u"||window.dispatchEvent(new Event(Ke))}var ve=!1;function Qe(){if(ve||typeof window>"u"||!document?.documentElement)return;ve=!0;let o=()=>{let a=we();_.locale!==a&&(_.activate(a),ye())},e=new MutationObserver(a=>{for(let d of a)if(d.type==="attributes"&&d.attributeName==="lang"){o();break}});e.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]});let r=ke();r&&r.documentElement&&r!==document&&e.observe(r.documentElement,{attributes:!0,attributeFilter:["lang"]});let t=We();t&&e.observe(t,{attributes:!0,attributeFilter:["lang"]})}function ke(){try{return window.parent?.document??null}catch{return null}}function fe(o){try{return o?.documentElement?.lang??""}catch{return""}}function We(){try{return window.frameElement??null}catch{return null}}function er(){try{return window.frameElement?.getAttribute?.("lang")??""}catch{return""}}import{css as rr}from"lit";import{unsafeCSS as tr}from"lit";var _e=rr`
10
10
  *,
11
11
  :before,
12
12
  :after {
@@ -2445,7 +2445,7 @@ Please compile your catalog first.
2445
2445
  display: none
2446
2446
  }
2447
2447
  }
2448
- `);var _e=JSON.parse('{"textfield.label.optional":["Valgfri"]}');var ze=JSON.parse('{"textfield.label.optional":["Optional"]}');var Ce=JSON.parse('{"textfield.label.optional":["Valinnainen"]}');var Me=JSON.parse('{"textfield.label.optional":["Valgfri"]}');var Ee=JSON.parse('{"textfield.label.optional":["Valfritt"]}');import{css as or}from"lit";var Se=or`
2448
+ `);var ze=JSON.parse('{"textfield.label.optional":["Valgfri"]}');var Ce=JSON.parse('{"textfield.label.optional":["Optional"]}');var Me=JSON.parse('{"textfield.label.optional":["Valinnainen"]}');var Ee=JSON.parse('{"textfield.label.optional":["Valgfri"]}');var Se=JSON.parse('{"textfield.label.optional":["Valfritt"]}');import{css as or}from"lit";var Le=or`
2449
2449
  .w-textfield {
2450
2450
  --_input-padding-top: 12px;
2451
2451
  --_input-padding-left: 8px;
@@ -2505,7 +2505,7 @@ Please compile your catalog first.
2505
2505
  text-overflow: ellipsis;
2506
2506
  z-index: 1;
2507
2507
  }
2508
- `;import{unsafeCSS as ar}from"lit";var Le=ar("*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.focus\\:\\[--w-outline-offset\\:-2px\\]:focus{--w-outline-offset:-2px}.bg-transparent{background-color:#0000}.border-1{border-width:1px}.rounded-4{border-radius:4px}.caret-current{caret-color:currentColor}.block{display:block}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.outline-\\[--w-s-color-border-negative\\]\\!{outline-color:var(--w-s-color-border-negative)!important}.relative{position:relative}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled-subtle{background-color:var(--w-s-color-background-disabled-subtle)}.s-text{color:var(--w-s-color-text)}.s-text-disabled{color:var(--w-s-color-text-disabled)}.s-text-negative{color:var(--w-s-color-text-negative)}.s-text-subtle{color:var(--w-s-color-text-subtle)}.placeholder\\:s-text-placeholder::placeholder{color:var(--w-s-color-text-placeholder)}.s-border-disabled{border-color:var(--w-s-color-border-disabled)}.s-border-negative{border-color:var(--w-s-color-border-negative)}.s-border-strong{border-color:var(--w-s-color-border-strong)}.hover\\:s-border-negative-hover:hover{border-color:var(--w-s-color-border-negative-hover)}.hover\\:s-border-strong-hover:hover{border-color:var(--w-s-color-border-strong-hover)}.active\\:s-border-selected:active{border-color:var(--w-s-color-border-selected)}.w-full{width:100%}.min-h-\\[42\\]{min-height:4.2rem}.mb-0{margin-bottom:0}.mt-4{margin-top:.4rem}.px-8{padding-left:.8rem;padding-right:.8rem}.py-12{padding-top:1.2rem;padding-bottom:1.2rem}.pb-4{padding-bottom:.4rem}.pl-0{padding-left:0}.pl-8{padding-left:.8rem}.pr-40{padding-right:4rem}.pl-\\[var\\(--w-prefix-width\\,_40px\\)\\]{padding-left:var(--w-prefix-width,40px)}.visible{visibility:visible}.cursor-pointer{cursor:pointer}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:grayscale}.font-bold{font-weight:700}.font-normal{font-weight:400}.pointer-events-none{pointer-events:none}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.text-m{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-s{font-size:var(--w-font-size-s);line-height:var(--w-line-height-s)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}.leading-m{line-height:var(--w-line-height-m)}@media (min-width:480px){.sm\\:min-h-\\[45\\]{min-height:4.5rem}}");import{css as $e}from"lit";var Ve=$e`
2508
+ `;import{unsafeCSS as ar}from"lit";var $e=ar("*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.align-text-top{vertical-align:text-top}.focus\\:\\[--w-outline-offset\\:-2px\\]:focus{--w-outline-offset:-2px}.bg-transparent{background-color:#0000}.appearance-none{-webkit-appearance:none;appearance:none}.border-1{border-width:1px}.rounded-4{border-radius:4px}.caret-current{caret-color:currentColor}.block{display:block}.inline{display:inline}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.outline-\\[--w-s-color-border-negative\\]\\!{outline-color:var(--w-s-color-border-negative)!important}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled-subtle{background-color:var(--w-s-color-background-disabled-subtle)}.s-text{color:var(--w-s-color-text)}.s-text-disabled{color:var(--w-s-color-text-disabled)}.s-text-negative{color:var(--w-s-color-text-negative)}.placeholder\\:s-text-placeholder::placeholder{color:var(--w-s-color-text-placeholder)}.s-border-disabled{border-color:var(--w-s-color-border-disabled)}.s-border-negative{border-color:var(--w-s-color-border-negative)}.s-border-strong{border-color:var(--w-s-color-border-strong)}.hover\\:s-border-negative-hover:hover{border-color:var(--w-s-color-border-negative-hover)}.hover\\:s-border-strong-hover:hover{border-color:var(--w-s-color-border-strong-hover)}.active\\:s-border-selected:active{border-color:var(--w-s-color-border-selected)}.w-full{width:100%}.min-h-\\[42\\]{min-height:4.2rem}.m-0{margin:0}.mb-0{margin-bottom:0}.ml-4{margin-left:.4rem}.p-0{padding:0}.px-8{padding-left:.8rem;padding-right:.8rem}.py-12{padding-top:1.2rem;padding-bottom:1.2rem}.pl-0{padding-left:0}.pr-40{padding-right:4rem}.pl-\\[var\\(--w-prefix-width\\,_40px\\)\\]{padding-left:var(--w-prefix-width,40px)}.visible{visibility:visible}.pointer-events-none{pointer-events:none}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.text-m{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.leading-m{line-height:var(--w-line-height-m)}@media (min-width:480px){.sm\\:min-h-\\[45\\]{min-height:4.5rem}}");import{css as Ve}from"lit";var Pe=Ve`
2509
2509
  /* Label component tokens with semantic fallbacks */
2510
2510
  label {
2511
2511
  /* Internal tokens - not part of public API */
@@ -2532,7 +2532,7 @@ Please compile your catalog first.
2532
2532
 
2533
2533
  /* Optional text styling */
2534
2534
  label span {
2535
- --_padding-left: var(--w-c-input-optional-padding-left, 0.8rem);
2535
+ --_padding-left: var(--w-c-input-optional-padding-left, 0.4rem);
2536
2536
  --_font-weight: var(--w-c-input-optional-font-weight, 400);
2537
2537
  --_font-size: var(--w-c-input-optional-font-size, var(--w-font-size-s));
2538
2538
  --_line-height: var(
@@ -2547,7 +2547,7 @@ Please compile your catalog first.
2547
2547
  line-height: var(--_line-height);
2548
2548
  color: var(--_color);
2549
2549
  }
2550
- `,Pe=$e`
2550
+ `,Oe=Ve`
2551
2551
  /* Help text component tokens with semantic fallbacks */
2552
2552
  :host {
2553
2553
  --_help-text-color: var(
@@ -2581,17 +2581,34 @@ Please compile your catalog first.
2581
2581
  display: var(--_help-text-display);
2582
2582
  color: var(--_help-text-color);
2583
2583
  }
2584
- `;var P={base:"block text-m leading-m mb-0 px-8 py-12 rounded-4 w-full focusable focus:[--w-outline-offset:-2px] caret-current",default:"border-1 s-text s-bg s-border-strong hover:s-border-strong-hover active:s-border-selected",disabled:"border-1 s-text-disabled s-bg-disabled-subtle s-border-disabled pointer-events-none",invalid:"border-1 s-text-negative s-bg s-border-negative hover:s-border-negative-hover outline-[--w-s-color-border-negative]!",readOnly:"pl-0 bg-transparent pointer-events-none",placeholder:"placeholder:s-text-placeholder",suffix:"pr-40",prefix:"pl-[var(--w-prefix-width,_40px)]",textArea:"min-h-[42] sm:min-h-[45]"},T,Ne,H,d=class extends ge(Fe){constructor(){super();J(this,T);this.disabled=!1;this.invalid=!1;this.optional=!1;this.readOnly=!1;this.readonly=!1;this.required=!1;this._hasPrefix=!1;this._hasSuffix=!1;J(this,H);we(ze,Me,Ce,_e,Ee)}updated(r){r.has("value")&&typeof this.value<"u"&&(this.setValue(this.value),this.formatter&&this.mask&&(this.mask.innerText=this.formatter(this.value)))}firstUpdated(){se(this,H,this.value)}resetFormControl(){this.value=ne(this,H)}get _inputstyles(){return K([P.base,this._hasSuffix&&P.suffix,this._hasPrefix&&P.prefix,!this.invalid&&!this.disabled&&!(this.readonly||this.readOnly)&&P.default,this.invalid&&!this.disabled&&!(this.readonly||this.readOnly)&&P.invalid,!this.invalid&&this.disabled&&!(this.readonly||this.readOnly)&&P.disabled,!this.invalid&&!this.disabled&&(this.readonly||this.readOnly)&&P.readOnly])}get _helptextstyles(){return"help-text"}get _label(){if(this.label)return D`<label for="${this._id}"
2585
- >${this.label}${this.label.length&&this.optional&&!this.required?D` <span>
2586
- ${_._({id:"textfield.label.optional",message:"Optional",comment:"Shown behind label when marked as optional"})}
2587
- </span>`:Oe}</label
2588
- >`}get _helpId(){if(this.helpText)return`${this._id}__hint`}get _id(){return"textfield"}get _error(){if(this.invalid&&this._helpId)return this._helpId}handler(r){let{name:t,value:a}=r.currentTarget;this.value=a;let l={name:t,value:a,target:r.target},s=new Proxy(l,{get(b,f){return typeof window<"u"&&(window.location.host.startsWith("www")||console.warn("w-textfield's CustomEvent is deprecated, please use the browser-native events instead (e.g. replace e.detail.value with e.target.value)")),b[f]}}),i=new CustomEvent(r.type,{detail:s});this.dispatchEvent(i)}prefixSlotChange(){this.renderRoot.querySelector("slot[name=prefix]").assignedElements().length&&(this._hasPrefix=!0)}suffixSlotChange(){this.renderRoot.querySelector("slot[name=suffix]").assignedElements().length&&(this._hasSuffix=!0)}render(){return D`
2584
+ `;var P={base:"block text-m leading-m mb-0 px-8 py-12 rounded-4 w-full focusable focus:[--w-outline-offset:-2px] caret-current",default:"border-1 s-text s-bg s-border-strong hover:s-border-strong-hover active:s-border-selected",disabled:"border-1 s-text-disabled s-bg-disabled-subtle s-border-disabled pointer-events-none",invalid:"border-1 s-text-negative s-bg s-border-negative hover:s-border-negative-hover outline-[--w-s-color-border-negative]!",readOnly:"pl-0 bg-transparent pointer-events-none",placeholder:"placeholder:s-text-placeholder",suffix:"pr-40",prefix:"pl-[var(--w-prefix-width,_40px)]",textArea:"min-h-[42] sm:min-h-[45]"},T,Ne,H,l=class extends me(Fe){constructor(){super();J(this,T);this.disabled=!1;this.invalid=!1;this.optional=!1;this.readOnly=!1;this.readonly=!1;this.required=!1;this._hasPrefix=!1;this._hasSuffix=!1;J(this,H);xe(Ce,Ee,Me,ze,Se)}updated(r){r.has("value")&&typeof this.value<"u"&&(this.setValue(this.value),this.formatter&&this.mask&&(this.mask.innerText=this.formatter(this.value)))}firstUpdated(){le(this,H,this.value)}resetFormControl(){this.value=se(this,H)}get _inputstyles(){return K([P.base,this._hasSuffix&&P.suffix,this._hasPrefix&&P.prefix,!this.invalid&&!this.disabled&&!(this.readonly||this.readOnly)&&P.default,this.invalid&&!this.disabled&&!(this.readonly||this.readOnly)&&P.invalid,!this.invalid&&this.disabled&&!(this.readonly||this.readOnly)&&P.disabled,!this.invalid&&!this.disabled&&(this.readonly||this.readOnly)&&P.readOnly])}get _helptextstyles(){return"help-text"}get _label(){if(this.label){let r=this.label.length&&this.optional&&!this.required,t=!!this.tooltip;return N`
2585
+ <label for="${this._id}">
2586
+ ${this.label}${r?N`
2587
+ <span>
2588
+ ${_._({id:"textfield.label.optional",message:"Optional",comment:"Shown behind label when marked as optional"})}
2589
+ </span>
2590
+ `:ae}
2591
+ ${t?N`
2592
+ <button
2593
+ id="tooltip-target"
2594
+ class="appearance-none align-text-top bg-transparent m-0 p-0 ml-4"
2595
+ part="tooltip-target"
2596
+ aria-details="tooltip"
2597
+ >
2598
+ <w-icon name="Info" size="small"></w-icon>
2599
+ </button>
2600
+ <w-tooltip for="tooltip-target" id="tooltip">
2601
+ ${this.tooltip}
2602
+ </w-tooltip>
2603
+ `:ae}
2604
+ </label>
2605
+ `}}get _helpId(){if(this.helpText)return`${this._id}__hint`}get _id(){return"textfield"}get _error(){if(this.invalid&&this._helpId)return this._helpId}handler(r){let{name:t,value:a}=r.currentTarget;this.value=a;let d={name:t,value:a,target:r.target},s=new Proxy(d,{get(b,f){return typeof window<"u"&&(window.location.host.startsWith("www")||console.warn("w-textfield's CustomEvent is deprecated, please use the browser-native events instead (e.g. replace e.detail.value with e.target.value)")),b[f]}}),i=new CustomEvent(r.type,{detail:s});this.dispatchEvent(i)}prefixSlotChange(){this.renderRoot.querySelector("slot[name=prefix]").assignedElements().length&&(this._hasPrefix=!0)}suffixSlotChange(){this.renderRoot.querySelector("slot[name=suffix]").assignedElements().length&&(this._hasSuffix=!0)}render(){return N`
2589
2606
  ${this._label}
2590
2607
  <div
2591
2608
  class="${nr({"w-textfield":!0,"w-textfield--has-prefix":this._hasPrefix,"w-textfield--has-suffix":this._hasSuffix})}"
2592
2609
  >
2593
2610
  <div class="w-textfield__input-wrapper">
2594
- ${this.formatter?D`<div class="w-textfield__mask"></div>`:Oe}
2611
+ ${this.formatter?N`<div class="w-textfield__mask"></div>`:ae}
2595
2612
  <input
2596
2613
  part="input"
2597
2614
  class="${this._inputstyles}"
@@ -2618,15 +2635,15 @@ Please compile your catalog first.
2618
2635
  @change="${this.handler}"
2619
2636
  @input="${this.handler}"
2620
2637
  @focus="${this.handler}"
2621
- @keydown="${le(this,T,Ne)}"
2638
+ @keydown="${de(this,T,Ne)}"
2622
2639
  />
2623
2640
  </div>
2624
2641
  <slot @slotchange="${this.prefixSlotChange}" name="prefix"></slot>
2625
2642
  <slot @slotchange="${this.suffixSlotChange}" name="suffix"></slot>
2626
2643
  </div>
2627
2644
  <span class="sr-only" id="aria-description">${this.ariaDescription}</span>
2628
- ${this.helpText&&D`<div class="${this._helptextstyles}" id="${this._helpId}">
2645
+ ${this.helpText&&N`<div class="${this._helptextstyles}" id="${this._helpId}">
2629
2646
  ${this.helpText}
2630
2647
  </div>`}
2631
- `}};T=new WeakSet,Ne=function(r){r.key==="Enter"&&this.internals.form&&this.internals.form.requestSubmit()},H=new WeakMap,d.shadowRootOptions={...Fe.shadowRootOptions,delegatesFocus:!0},d.styles=[ke,Le,Se,Ve,Pe],p([u({type:Boolean,reflect:!0})],d.prototype,"disabled",2),p([u({type:Boolean,reflect:!0})],d.prototype,"invalid",2),p([u({type:String,reflect:!0})],d.prototype,"label",2),p([u({type:String,reflect:!0,attribute:"help-text"})],d.prototype,"helpText",2),p([u({type:Boolean,reflect:!0})],d.prototype,"optional",2),p([u({type:String,reflect:!0})],d.prototype,"size",2),p([u({type:Number,reflect:!0})],d.prototype,"max",2),p([u({type:Number,reflect:!0})],d.prototype,"min",2),p([u({type:Number,reflect:!0,attribute:"min-length"})],d.prototype,"minLength",2),p([u({type:Number,reflect:!0})],d.prototype,"minlength",2),p([u({type:Number,reflect:!0,attribute:"max-length"})],d.prototype,"maxLength",2),p([u({type:Number,reflect:!0})],d.prototype,"maxlength",2),p([u({type:String,reflect:!0})],d.prototype,"pattern",2),p([u({type:String,reflect:!0})],d.prototype,"placeholder",2),p([u({type:Boolean,reflect:!0,attribute:"read-only"})],d.prototype,"readOnly",2),p([u({type:Boolean,reflect:!0})],d.prototype,"readonly",2),p([u({type:Boolean,reflect:!0})],d.prototype,"required",2),p([u({type:String,reflect:!0})],d.prototype,"type",2),p([u({type:String,reflect:!0})],d.prototype,"value",2),p([u({type:String,reflect:!0})],d.prototype,"name",2),p([u({type:Number,reflect:!0})],d.prototype,"step",2),p([u({type:String,reflect:!0})],d.prototype,"autocomplete",2),p([u({attribute:!1})],d.prototype,"formatter",2),p([ir(".w-textfield__mask")],d.prototype,"mask",2),p([u({type:Boolean})],d.prototype,"_hasPrefix",2),p([u({type:Boolean})],d.prototype,"_hasSuffix",2);customElements.get("w-textfield")||customElements.define("w-textfield",d);export{d as WarpTextField};
2648
+ `}};T=new WeakSet,Ne=function(r){r.key==="Enter"&&this.internals.form&&this.internals.form.requestSubmit()},H=new WeakMap,l.shadowRootOptions={...Fe.shadowRootOptions,delegatesFocus:!0},l.styles=[_e,$e,Le,Pe,Oe],h([u({type:Boolean,reflect:!0})],l.prototype,"disabled",2),h([u({type:Boolean,reflect:!0})],l.prototype,"invalid",2),h([u({type:String,reflect:!0})],l.prototype,"label",2),h([u({type:String,reflect:!0,attribute:"help-text"})],l.prototype,"helpText",2),h([u({type:Boolean,reflect:!0})],l.prototype,"optional",2),h([u({type:String,reflect:!0})],l.prototype,"size",2),h([u({type:Number,reflect:!0})],l.prototype,"max",2),h([u({type:Number,reflect:!0})],l.prototype,"min",2),h([u({type:Number,reflect:!0,attribute:"min-length"})],l.prototype,"minLength",2),h([u({type:Number,reflect:!0})],l.prototype,"minlength",2),h([u({type:Number,reflect:!0,attribute:"max-length"})],l.prototype,"maxLength",2),h([u({type:Number,reflect:!0})],l.prototype,"maxlength",2),h([u({type:String,reflect:!0})],l.prototype,"pattern",2),h([u({type:String,reflect:!0})],l.prototype,"placeholder",2),h([u({type:Boolean,reflect:!0,attribute:"read-only"})],l.prototype,"readOnly",2),h([u({type:Boolean,reflect:!0})],l.prototype,"readonly",2),h([u({type:Boolean,reflect:!0})],l.prototype,"required",2),h([u({type:String,reflect:!0})],l.prototype,"type",2),h([u({type:String,reflect:!0})],l.prototype,"value",2),h([u({type:String,reflect:!0})],l.prototype,"name",2),h([u({type:Number,reflect:!0})],l.prototype,"step",2),h([u({type:String,reflect:!0})],l.prototype,"autocomplete",2),h([u({type:String,reflect:!0})],l.prototype,"tooltip",2),h([u({attribute:!1})],l.prototype,"formatter",2),h([ir(".w-textfield__mask")],l.prototype,"mask",2),h([u({type:Boolean})],l.prototype,"_hasPrefix",2),h([u({type:Boolean})],l.prototype,"_hasSuffix",2);customElements.get("w-textfield")||customElements.define("w-textfield",l);export{l as WarpTextField};
2632
2649
  //# sourceMappingURL=textfield.js.map