@warp-ds/elements 2.6.0 → 2.7.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/dist/custom-elements.json +1552 -0
  2. package/dist/index.d.ts +561 -0
  3. package/dist/packages/affix/affix.js +11 -11
  4. package/dist/packages/affix/affix.js.map +3 -3
  5. package/dist/packages/alert/alert.js +7 -7
  6. package/dist/packages/alert/alert.js.map +3 -3
  7. package/dist/packages/attention/attention.js +22 -22
  8. package/dist/packages/attention/attention.js.map +3 -3
  9. package/dist/packages/breadcrumbs/breadcrumbs.js +9 -9
  10. package/dist/packages/breadcrumbs/breadcrumbs.js.map +3 -3
  11. package/dist/packages/button/button.js +11 -11
  12. package/dist/packages/button/button.js.map +3 -3
  13. package/dist/packages/card/card.js +8 -8
  14. package/dist/packages/card/card.js.map +3 -3
  15. package/dist/packages/checkbox/checkbox.a11y.test.d.ts +1 -0
  16. package/dist/packages/checkbox/checkbox.a11y.test.js +73 -0
  17. package/dist/packages/checkbox/checkbox.d.ts +49 -0
  18. package/dist/packages/checkbox/checkbox.js +2594 -0
  19. package/dist/packages/checkbox/checkbox.js.map +7 -0
  20. package/dist/packages/checkbox/checkbox.react.stories.d.ts +12 -0
  21. package/dist/packages/checkbox/checkbox.react.stories.js +10 -0
  22. package/dist/packages/checkbox/checkbox.stories.d.ts +25 -0
  23. package/dist/packages/checkbox/checkbox.stories.js +183 -0
  24. package/dist/packages/checkbox/checkbox.test.d.ts +1 -0
  25. package/dist/packages/checkbox/checkbox.test.js +142 -0
  26. package/dist/packages/checkbox/react.d.ts +5 -0
  27. package/dist/packages/checkbox/react.js +15 -0
  28. package/dist/packages/checkbox/styles.d.ts +1 -0
  29. package/dist/packages/checkbox/styles.js +134 -0
  30. package/dist/packages/checkbox-group/checkbox-group.a11y.test.d.ts +2 -0
  31. package/dist/packages/checkbox-group/checkbox-group.a11y.test.js +109 -0
  32. package/dist/packages/checkbox-group/checkbox-group.d.ts +33 -0
  33. package/dist/packages/checkbox-group/checkbox-group.js +71 -0
  34. package/dist/packages/checkbox-group/checkbox-group.js.map +7 -0
  35. package/dist/packages/checkbox-group/checkbox-group.test.d.ts +2 -0
  36. package/dist/packages/checkbox-group/checkbox-group.test.js +112 -0
  37. package/dist/packages/checkbox-group/locales/da/messages.d.mts +1 -0
  38. package/dist/packages/checkbox-group/locales/da/messages.mjs +1 -0
  39. package/dist/packages/checkbox-group/locales/en/messages.d.mts +1 -0
  40. package/dist/packages/checkbox-group/locales/en/messages.mjs +1 -0
  41. package/dist/packages/checkbox-group/locales/fi/messages.d.mts +1 -0
  42. package/dist/packages/checkbox-group/locales/fi/messages.mjs +1 -0
  43. package/dist/packages/checkbox-group/locales/nb/messages.d.mts +1 -0
  44. package/dist/packages/checkbox-group/locales/nb/messages.mjs +1 -0
  45. package/dist/packages/checkbox-group/locales/sv/messages.d.mts +1 -0
  46. package/dist/packages/checkbox-group/locales/sv/messages.mjs +1 -0
  47. package/dist/packages/checkbox-group/react.d.ts +2 -0
  48. package/dist/packages/checkbox-group/react.js +11 -0
  49. package/dist/packages/combobox/combobox.js +11 -11
  50. package/dist/packages/combobox/combobox.js.map +3 -3
  51. package/dist/packages/datepicker/datepicker.js +42 -42
  52. package/dist/packages/datepicker/datepicker.js.map +3 -3
  53. package/dist/packages/expandable/expandable.js +11 -11
  54. package/dist/packages/expandable/expandable.js.map +3 -3
  55. package/dist/packages/i18n.d.ts +2 -0
  56. package/dist/packages/i18n.js +87 -2
  57. package/dist/packages/modal-header/modal-header.js +15 -15
  58. package/dist/packages/modal-header/modal-header.js.map +3 -3
  59. package/dist/packages/page-indicator/page-indicator.js +7 -7
  60. package/dist/packages/page-indicator/page-indicator.js.map +3 -3
  61. package/dist/packages/pagination/pagination.js +24 -24
  62. package/dist/packages/pagination/pagination.js.map +3 -3
  63. package/dist/packages/pill/pill.js +10 -10
  64. package/dist/packages/pill/pill.js.map +3 -3
  65. package/dist/packages/select/select.js +20 -20
  66. package/dist/packages/select/select.js.map +3 -3
  67. package/dist/packages/slider/Slider.d.ts +2 -0
  68. package/dist/packages/slider/Slider.js +8 -0
  69. package/dist/packages/slider/index.d.ts +2 -0
  70. package/dist/packages/slider/index.js +2 -0
  71. package/dist/packages/slider/locales/da/messages.d.mts +1 -0
  72. package/dist/packages/slider/locales/da/messages.mjs +1 -0
  73. package/dist/packages/slider/locales/en/messages.d.mts +1 -0
  74. package/dist/packages/slider/locales/en/messages.mjs +1 -0
  75. package/dist/packages/slider/locales/fi/messages.d.mts +1 -0
  76. package/dist/packages/slider/locales/fi/messages.mjs +1 -0
  77. package/dist/packages/slider/locales/nb/messages.d.mts +1 -0
  78. package/dist/packages/slider/locales/nb/messages.mjs +1 -0
  79. package/dist/packages/slider/locales/sv/messages.d.mts +1 -0
  80. package/dist/packages/slider/locales/sv/messages.mjs +1 -0
  81. package/dist/packages/slider/react.d.ts +3 -0
  82. package/dist/packages/slider/react.js +13 -0
  83. package/dist/packages/slider/slider.d.ts +64 -0
  84. package/dist/packages/slider/slider.js +2641 -0
  85. package/dist/packages/slider/slider.js.map +7 -0
  86. package/dist/packages/slider/slider.react.stories.d.ts +19 -0
  87. package/dist/packages/slider/slider.react.stories.js +161 -0
  88. package/dist/packages/slider/slider.stories.d.ts +26 -0
  89. package/dist/packages/slider/slider.stories.js +464 -0
  90. package/dist/packages/slider/slider.test.d.ts +5 -0
  91. package/dist/packages/slider/slider.test.js +380 -0
  92. package/dist/packages/slider/styles/w-slider.styles.d.ts +1 -0
  93. package/dist/packages/slider/styles/w-slider.styles.js +154 -0
  94. package/dist/packages/slider/styles.d.ts +1 -0
  95. package/dist/packages/slider/styles.js +2 -0
  96. package/dist/packages/slider-thumb/SliderThumb.d.ts +2 -0
  97. package/dist/packages/slider-thumb/SliderThumb.js +8 -0
  98. package/dist/packages/slider-thumb/oddbird-css-anchor-positioning.d.ts +2 -0
  99. package/dist/packages/slider-thumb/oddbird-css-anchor-positioning.js +3 -0
  100. package/dist/packages/slider-thumb/react.d.ts +6 -0
  101. package/dist/packages/slider-thumb/react.js +15 -0
  102. package/dist/packages/slider-thumb/slider-thumb.d.ts +72 -0
  103. package/dist/packages/slider-thumb/slider-thumb.js +2774 -0
  104. package/dist/packages/slider-thumb/slider-thumb.js.map +7 -0
  105. package/dist/packages/slider-thumb/styles/w-slider-thumb.styles.d.ts +1 -0
  106. package/dist/packages/slider-thumb/styles/w-slider-thumb.styles.js +194 -0
  107. package/dist/packages/step/step.js +13 -13
  108. package/dist/packages/step/step.js.map +3 -3
  109. package/dist/packages/step-indicator/step-indicator.a11y.test.js +6 -2
  110. package/dist/packages/textarea/textarea.a11y.test.js +1 -1
  111. package/dist/packages/textarea/textarea.test.js +2 -1
  112. package/dist/packages/textfield/styles/w-textfield.styles.js +6 -0
  113. package/dist/packages/textfield/textfield.js +7 -1
  114. package/dist/packages/textfield/textfield.js.map +2 -2
  115. package/dist/packages/toast/toast.js +13 -13
  116. package/dist/packages/toast/toast.js.map +3 -3
  117. package/dist/setup-tests.js +1 -1
  118. package/dist/web-types.json +328 -1
  119. package/package.json +1 -1
@@ -58,9 +58,13 @@ describe('WCAG 4.1.2 - Name, Role, Value', () => {
58
58
  `);
59
59
  const completedStep = document.querySelector('w-step[completed]');
60
60
  expect(completedStep).toBeTruthy();
61
- await expect.poll(() => completedStep?.shadowRoot?.querySelector('[aria-label="Step indicator completed circle"]')).toBeTruthy();
61
+ await expect
62
+ .poll(() => completedStep?.shadowRoot?.querySelector('[aria-label="Step indicator completed circle"]'))
63
+ .toBeTruthy();
62
64
  const incompleteStep = document.querySelector('w-step:not([completed])');
63
65
  expect(incompleteStep).toBeTruthy();
64
- await expect.poll(() => incompleteStep?.shadowRoot?.querySelector('[aria-label="Step indicator completed circle"]')).toBeFalsy();
66
+ await expect
67
+ .poll(() => incompleteStep?.shadowRoot?.querySelector('[aria-label="Step indicator completed circle"]'))
68
+ .toBeFalsy();
65
69
  });
66
70
  });
@@ -1,7 +1,7 @@
1
+ import { i18n } from '@lingui/core';
1
2
  import { html } from 'lit';
2
3
  import { describe, expect, test } from 'vitest';
3
4
  import { render } from 'vitest-browser-lit';
4
- import { i18n } from '@lingui/core';
5
5
  import { messages } from './locales/en/messages.mjs';
6
6
  import './textarea.js';
7
7
  // Initialize i18n with English locale for tests
@@ -165,7 +165,8 @@ test('restores original help text when validation passes', async () => {
165
165
  await expect.poll(() => wTextArea.invalid).toBe(true);
166
166
  await expect.poll(() => wTextArea.helpText).not.toBe('Enter your message');
167
167
  // Fill in a value
168
- await textarea.fill('Hello');
168
+ wTextArea.value = 'Hello';
169
+ await wTextArea.updateComplete;
169
170
  // Wait for value + validity to update, then restore original help text
170
171
  await expect.poll(() => wTextArea.value).toBe('Hello');
171
172
  await expect.poll(() => wTextArea.checkValidity()).toBe(true);
@@ -34,6 +34,12 @@ export const wTextfieldStyles = css `
34
34
  display: none;
35
35
  }
36
36
 
37
+
38
+ /* It's supposed to behave like a placeholder, but look like a value. Don't tell the designers 🤫 */
39
+ input::placeholder {
40
+ color: var(--w-textfield-placeholder-color-text, var(--w-s-color-text-placeholder));
41
+ }
42
+
37
43
  /* Could also consider giving the input mask a background color instead of this */
38
44
  .w-textfield__input-wrapper:has(.w-textfield__mask):not(:focus-within) input {
39
45
  color: transparent;
@@ -1,4 +1,4 @@
1
- var te=Object.defineProperty;var ae=Object.getOwnPropertyDescriptor;var R=a=>{throw TypeError(a)};var d=(a,e,r,o)=>{for(var l=o>1?void 0:o?ae(e,r):e,u=a.length-1,w;u>=0;u--)(w=a[u])&&(l=(o?w(e,r,l):w(l))||l);return o&&l&&te(e,r,l),l};var U=(a,e,r)=>e.has(a)||R("Cannot "+r);var H=(a,e,r)=>(U(a,e,"read from private field"),r?r.call(a):e.get(a)),D=(a,e,r)=>e.has(a)?R("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,r),G=(a,e,r,o)=>(U(a,e,"write to private field"),o?o.call(a,r):e.set(a,r),r);var j=function(){for(var a=[],e=arguments.length;e--;)a[e]=arguments[e];return a.reduce(function(r,o){return r.concat(typeof o=="string"?o:Array.isArray(o)?j.apply(void 0,o):typeof o=="object"&&o?Object.keys(o).map(function(l){return o[l]?l:""}):"")},[]).join(" ")};var n=function(a,e,r,o){if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?a!==e||!o:!e.has(a))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?o:r==="a"?o.call(a):o?o.value:e.get(a)},h=function(a,e,r,o,l){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!l)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?a!==e||!l:!e.has(a))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?l.call(a,r):l?l.value=r:e.set(a,r),r};function J(a){var e,r,o,l,u,w,k,re,_,A,F,L,E,z,Y,f,X,O,Z;class oe extends a{constructor(...t){var i,b,p;super(...t),e.add(this),this.internals=this.attachInternals(),r.set(this,!1),o.set(this,!1),l.set(this,!1),u.set(this,void 0),w.set(this,void 0),k.set(this,!0),_.set(this,""),A.set(this,()=>{h(this,l,!0,"f"),h(this,r,!0,"f"),n(this,e,"m",f).call(this)}),F.set(this,()=>{h(this,r,!1,"f"),n(this,e,"m",X).call(this,this.shouldFormValueUpdate()?n(this,_,"f"):""),!this.validity.valid&&n(this,l,"f")&&h(this,o,!0,"f");let m=n(this,e,"m",f).call(this);this.validationMessageCallback&&this.validationMessageCallback(m?this.internals.validationMessage:"")}),L.set(this,()=>{var m;n(this,k,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),h(this,k,!1,"f")),h(this,l,!0,"f"),h(this,o,!0,"f"),n(this,e,"m",f).call(this),(m=this===null||this===void 0?void 0:this.validationMessageCallback)===null||m===void 0||m.call(this,this.showError?this.internals.validationMessage:"")}),E.set(this,void 0),z.set(this,!1),Y.set(this,Promise.resolve()),(i=this.addEventListener)===null||i===void 0||i.call(this,"focus",n(this,A,"f")),(b=this.addEventListener)===null||b===void 0||b.call(this,"blur",n(this,F,"f")),(p=this.addEventListener)===null||p===void 0||p.call(this,"invalid",n(this,L,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let t=this.validators.map(p=>p.attribute).flat(),i=super.observedAttributes||[];return[...new Set([...i,...t])]}static getValidator(t){return this.validators.find(i=>i.attribute===t)||null}static getValidators(t){return this.validators.filter(i=>{var b;if(i.attribute===t||!((b=i.attribute)===null||b===void 0)&&b.includes(t))return!0})}get form(){return this.internals.form}get showError(){return n(this,e,"m",f).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(t,i,b){var p;(p=super.attributeChangedCallback)===null||p===void 0||p.call(this,t,i,b);let $=this.constructor.getValidators(t);$!=null&&$.length&&this.validationTarget&&this.setValue(n(this,_,"f"))}setValue(t){var i;h(this,o,!1,"f"),(i=this.validationMessageCallback)===null||i===void 0||i.call(this,""),h(this,_,t,"f");let p=this.shouldFormValueUpdate()?t:null;this.internals.setFormValue(p),n(this,e,"m",X).call(this,p),this.valueChangedCallback&&this.valueChangedCallback(p),n(this,e,"m",f).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(t=>t(n(this,Y,"f")))}formResetCallback(){var t,i;h(this,l,!1,"f"),h(this,o,!1,"f"),n(this,e,"m",f).call(this),(t=this.resetFormControl)===null||t===void 0||t.call(this),(i=this.validationMessageCallback)===null||i===void 0||i.call(this,n(this,e,"m",f).call(this)?this.validationMessage:"")}}return r=new WeakMap,o=new WeakMap,l=new WeakMap,u=new WeakMap,w=new WeakMap,k=new WeakMap,_=new WeakMap,A=new WeakMap,F=new WeakMap,L=new WeakMap,E=new WeakMap,z=new WeakMap,Y=new WeakMap,e=new WeakSet,re=function(){let t=this.getRootNode(),i=`${this.localName}[name="${this.getAttribute("name")}"]`;return t.querySelectorAll(i)},f=function(){if(this.hasAttribute("disabled"))return!1;let t=n(this,o,"f")||n(this,l,"f")&&!this.validity.valid&&!n(this,r,"f");return t&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),t},X=function(t){let i=this.constructor,b={},p=i.validators,m=[],$=p.some(v=>v.isValid instanceof Promise);n(this,z,"f")||(h(this,Y,new Promise(v=>{h(this,E,v,"f")}),"f"),h(this,z,!0,"f")),n(this,u,"f")&&(n(this,u,"f").abort(),h(this,w,n(this,u,"f"),"f"));let M=new AbortController;h(this,u,M,"f");let S,B=!1;p.length&&(p.forEach(v=>{let N=v.key||"customError",y=v.isValid(this,t,M.signal);y instanceof Promise?(m.push(y),y.then(I=>{I!=null&&(b[N]=!I,S=n(this,e,"m",Z).call(this,v,t),n(this,e,"m",O).call(this,b,S))})):(b[N]=!y,this.validity[N]!==!y&&(B=!0),!y&&!S&&(S=n(this,e,"m",Z).call(this,v,t)))}),Promise.allSettled(m).then(()=>{var v;M!=null&&M.signal.aborted||(h(this,z,!1,"f"),(v=n(this,E,"f"))===null||v===void 0||v.call(this))}),(B||!$)&&n(this,e,"m",O).call(this,b,S))},O=function(t,i){if(this.validationTarget)this.internals.setValidity(t,i,this.validationTarget),h(this,k,!1,"f");else{if(this.internals.setValidity(t,i),this.internals.validity.valid)return;h(this,k,!0,"f")}},Z=function(t,i){if(this.validityCallback){let b=this.validityCallback(t.key||"customError");if(b)return b}return t.message instanceof Function?t.message(this,i):t.message},oe}import{html as P,LitElement as ee,nothing as se}from"lit";import{property as c,query as le}from"lit/decorators.js";import{classMap as de}from"lit/directives/class-map.js";import{ifDefined as g}from"lit/directives/if-defined.js";import{css as K}from"lit";var Q=K`
1
+ var te=Object.defineProperty;var ae=Object.getOwnPropertyDescriptor;var R=a=>{throw TypeError(a)};var d=(a,e,r,o)=>{for(var l=o>1?void 0:o?ae(e,r):e,u=a.length-1,w;u>=0;u--)(w=a[u])&&(l=(o?w(e,r,l):w(l))||l);return o&&l&&te(e,r,l),l};var U=(a,e,r)=>e.has(a)||R("Cannot "+r);var H=(a,e,r)=>(U(a,e,"read from private field"),r?r.call(a):e.get(a)),D=(a,e,r)=>e.has(a)?R("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,r),G=(a,e,r,o)=>(U(a,e,"write to private field"),o?o.call(a,r):e.set(a,r),r);var j=function(){for(var a=[],e=arguments.length;e--;)a[e]=arguments[e];return a.reduce(function(r,o){return r.concat(typeof o=="string"?o:Array.isArray(o)?j.apply(void 0,o):typeof o=="object"&&o?Object.keys(o).map(function(l){return o[l]?l:""}):"")},[]).join(" ")};var n=function(a,e,r,o){if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?a!==e||!o:!e.has(a))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?o:r==="a"?o.call(a):o?o.value:e.get(a)},h=function(a,e,r,o,l){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!l)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?a!==e||!l:!e.has(a))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?l.call(a,r):l?l.value=r:e.set(a,r),r};function J(a){var e,r,o,l,u,w,k,re,_,A,F,L,E,z,Y,f,X,O,Z;class oe extends a{constructor(...t){var i,b,p;super(...t),e.add(this),this.internals=this.attachInternals(),r.set(this,!1),o.set(this,!1),l.set(this,!1),u.set(this,void 0),w.set(this,void 0),k.set(this,!0),_.set(this,""),A.set(this,()=>{h(this,l,!0,"f"),h(this,r,!0,"f"),n(this,e,"m",f).call(this)}),F.set(this,()=>{h(this,r,!1,"f"),n(this,e,"m",X).call(this,this.shouldFormValueUpdate()?n(this,_,"f"):""),!this.validity.valid&&n(this,l,"f")&&h(this,o,!0,"f");let m=n(this,e,"m",f).call(this);this.validationMessageCallback&&this.validationMessageCallback(m?this.internals.validationMessage:"")}),L.set(this,()=>{var m;n(this,k,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),h(this,k,!1,"f")),h(this,l,!0,"f"),h(this,o,!0,"f"),n(this,e,"m",f).call(this),(m=this===null||this===void 0?void 0:this.validationMessageCallback)===null||m===void 0||m.call(this,this.showError?this.internals.validationMessage:"")}),E.set(this,void 0),z.set(this,!1),Y.set(this,Promise.resolve()),(i=this.addEventListener)===null||i===void 0||i.call(this,"focus",n(this,A,"f")),(b=this.addEventListener)===null||b===void 0||b.call(this,"blur",n(this,F,"f")),(p=this.addEventListener)===null||p===void 0||p.call(this,"invalid",n(this,L,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let t=this.validators.map(p=>p.attribute).flat(),i=super.observedAttributes||[];return[...new Set([...i,...t])]}static getValidator(t){return this.validators.find(i=>i.attribute===t)||null}static getValidators(t){return this.validators.filter(i=>{var b;if(i.attribute===t||!((b=i.attribute)===null||b===void 0)&&b.includes(t))return!0})}get form(){return this.internals.form}get showError(){return n(this,e,"m",f).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(t,i,b){var p;(p=super.attributeChangedCallback)===null||p===void 0||p.call(this,t,i,b);let $=this.constructor.getValidators(t);$!=null&&$.length&&this.validationTarget&&this.setValue(n(this,_,"f"))}setValue(t){var i;h(this,o,!1,"f"),(i=this.validationMessageCallback)===null||i===void 0||i.call(this,""),h(this,_,t,"f");let p=this.shouldFormValueUpdate()?t:null;this.internals.setFormValue(p),n(this,e,"m",X).call(this,p),this.valueChangedCallback&&this.valueChangedCallback(p),n(this,e,"m",f).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(t=>t(n(this,Y,"f")))}formResetCallback(){var t,i;h(this,l,!1,"f"),h(this,o,!1,"f"),n(this,e,"m",f).call(this),(t=this.resetFormControl)===null||t===void 0||t.call(this),(i=this.validationMessageCallback)===null||i===void 0||i.call(this,n(this,e,"m",f).call(this)?this.validationMessage:"")}}return r=new WeakMap,o=new WeakMap,l=new WeakMap,u=new WeakMap,w=new WeakMap,k=new WeakMap,_=new WeakMap,A=new WeakMap,F=new WeakMap,L=new WeakMap,E=new WeakMap,z=new WeakMap,Y=new WeakMap,e=new WeakSet,re=function(){let t=this.getRootNode(),i=`${this.localName}[name="${this.getAttribute("name")}"]`;return t.querySelectorAll(i)},f=function(){if(this.hasAttribute("disabled"))return!1;let t=n(this,o,"f")||n(this,l,"f")&&!this.validity.valid&&!n(this,r,"f");return t&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),t},X=function(t){let i=this.constructor,b={},p=i.validators,m=[],$=p.some(v=>v.isValid instanceof Promise);n(this,z,"f")||(h(this,Y,new Promise(v=>{h(this,E,v,"f")}),"f"),h(this,z,!0,"f")),n(this,u,"f")&&(n(this,u,"f").abort(),h(this,w,n(this,u,"f"),"f"));let M=new AbortController;h(this,u,M,"f");let S,B=!1;p.length&&(p.forEach(v=>{let I=v.key||"customError",y=v.isValid(this,t,M.signal);y instanceof Promise?(m.push(y),y.then(N=>{N!=null&&(b[I]=!N,S=n(this,e,"m",Z).call(this,v,t),n(this,e,"m",O).call(this,b,S))})):(b[I]=!y,this.validity[I]!==!y&&(B=!0),!y&&!S&&(S=n(this,e,"m",Z).call(this,v,t)))}),Promise.allSettled(m).then(()=>{var v;M!=null&&M.signal.aborted||(h(this,z,!1,"f"),(v=n(this,E,"f"))===null||v===void 0||v.call(this))}),(B||!$)&&n(this,e,"m",O).call(this,b,S))},O=function(t,i){if(this.validationTarget)this.internals.setValidity(t,i,this.validationTarget),h(this,k,!1,"f");else{if(this.internals.setValidity(t,i),this.internals.validity.valid)return;h(this,k,!0,"f")}},Z=function(t,i){if(this.validityCallback){let b=this.validityCallback(t.key||"customError");if(b)return b}return t.message instanceof Function?t.message(this,i):t.message},oe}import{html as P,LitElement as ee,nothing as se}from"lit";import{property as c,query as le}from"lit/decorators.js";import{classMap as de}from"lit/directives/class-map.js";import{ifDefined as g}from"lit/directives/if-defined.js";import{css as K}from"lit";var Q=K`
2
2
  *,
3
3
  :before,
4
4
  :after {
@@ -2471,6 +2471,12 @@ var te=Object.defineProperty;var ae=Object.getOwnPropertyDescriptor;var R=a=>{th
2471
2471
  display: none;
2472
2472
  }
2473
2473
 
2474
+
2475
+ /* It's supposed to behave like a placeholder, but look like a value. Don't tell the designers 🤫 */
2476
+ input::placeholder {
2477
+ color: var(--w-textfield-placeholder-color-text, var(--w-s-color-text-placeholder));
2478
+ }
2479
+
2474
2480
  /* Could also consider giving the input mask a background color instead of this */
2475
2481
  .w-textfield__input-wrapper:has(.w-textfield__mask):not(:focus-within) input {
2476
2482
  color: transparent;