@warp-ds/elements 2.3.0-next.10 → 2.3.0-next.12

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.
@@ -29,8 +29,16 @@ export const Range = {
29
29
  render() {
30
30
  return html `
31
31
  <w-slider label="Range" min="0" max="100">
32
- <w-slider-thumb slot="from" aria-label="From value" name="from"></w-slider-thumb>
33
- <w-slider-thumb slot="to" aria-label="To value" name="to"></w-slider-thumb>
32
+ <w-slider-thumb
33
+ slot="from"
34
+ aria-label="From value"
35
+ name="from"
36
+ ></w-slider-thumb>
37
+ <w-slider-thumb
38
+ slot="to"
39
+ aria-label="To value"
40
+ name="to"
41
+ ></w-slider-thumb>
34
42
  </w-slider>
35
43
  `;
36
44
  },
@@ -43,13 +51,27 @@ export const SuffixSquareMeters = {
43
51
  },
44
52
  render({ locale, suffix }) {
45
53
  return html `
46
- <w-slider label="Apartment size" min="0" max="250" suffix="${suffix}" data-testid="sqm">
47
- <w-slider-thumb slot="from" aria-label="From size" name="from"></w-slider-thumb>
48
- <w-slider-thumb slot="to" aria-label="To size" name="to"></w-slider-thumb>
54
+ <w-slider
55
+ label="Apartment size"
56
+ min="0"
57
+ max="250"
58
+ suffix="${suffix}"
59
+ data-testid="sqm"
60
+ >
61
+ <w-slider-thumb
62
+ slot="from"
63
+ aria-label="From size"
64
+ name="from"
65
+ ></w-slider-thumb>
66
+ <w-slider-thumb
67
+ slot="to"
68
+ aria-label="To size"
69
+ name="to"
70
+ ></w-slider-thumb>
49
71
  </w-slider>
50
72
  <script type="module">
51
73
  const sqmSlider = document.querySelector('w-slider[data-testid="sqm"]');
52
- sqmSlider.formatter = window.getNumberFormatter('${locale}').format;
74
+ sqmSlider.formatter = window.getNumberFormatter("${locale}").format;
53
75
  </script>
54
76
  `;
55
77
  },
@@ -61,13 +83,31 @@ export const SuffixCurrency = {
61
83
  },
62
84
  render({ locale, suffix }) {
63
85
  return html `
64
- <w-slider label="Price" min="0" max="250000" suffix="${suffix}" data-testid="currency">
65
- <w-slider-thumb slot="from" aria-label="From price" name="from"></w-slider-thumb>
66
- <w-slider-thumb slot="to" aria-label="To price" name="to"></w-slider-thumb>
86
+ <w-slider
87
+ label="Price"
88
+ min="0"
89
+ max="250000"
90
+ suffix="${suffix}"
91
+ data-testid="currency"
92
+ >
93
+ <w-slider-thumb
94
+ slot="from"
95
+ aria-label="From price"
96
+ name="from"
97
+ ></w-slider-thumb>
98
+ <w-slider-thumb
99
+ slot="to"
100
+ aria-label="To price"
101
+ name="to"
102
+ ></w-slider-thumb>
67
103
  </w-slider>
68
104
  <script type="module">
69
- const currencySlider = document.querySelector('w-slider[data-testid="currency"]');
70
- currencySlider.formatter = window.getNumberFormatter('${locale}').format;
105
+ const currencySlider = document.querySelector(
106
+ 'w-slider[data-testid="currency"]',
107
+ );
108
+ currencySlider.formatter = window.getNumberFormatter(
109
+ "${locale}",
110
+ ).format;
71
111
  </script>
72
112
  `;
73
113
  },
@@ -79,13 +119,27 @@ export const SuffixKilometers = {
79
119
  },
80
120
  render({ locale, suffix }) {
81
121
  return html `
82
- <w-slider label="Distance" min="0" max="250000" suffix="${suffix}" data-testid="km">
83
- <w-slider-thumb slot="from" aria-label="From distance" name="from"></w-slider-thumb>
84
- <w-slider-thumb slot="to" aria-label="To distance" name="to"></w-slider-thumb>
122
+ <w-slider
123
+ label="Distance"
124
+ min="0"
125
+ max="250000"
126
+ suffix="${suffix}"
127
+ data-testid="km"
128
+ >
129
+ <w-slider-thumb
130
+ slot="from"
131
+ aria-label="From distance"
132
+ name="from"
133
+ ></w-slider-thumb>
134
+ <w-slider-thumb
135
+ slot="to"
136
+ aria-label="To distance"
137
+ name="to"
138
+ ></w-slider-thumb>
85
139
  </w-slider>
86
140
  <script type="module">
87
141
  const kmSlider = document.querySelector('w-slider[data-testid="km"]');
88
- kmSlider.formatter = window.getNumberFormatter('${locale}').format;
142
+ kmSlider.formatter = window.getNumberFormatter("${locale}").format;
89
143
  </script>
90
144
  `;
91
145
  },
@@ -98,7 +152,13 @@ export const Marks = {
98
152
  },
99
153
  render({ markers, step }) {
100
154
  return html `
101
- <w-slider label="Single" min="0" max="100" step="${step}" markers="${markers}">
155
+ <w-slider
156
+ label="Single"
157
+ min="0"
158
+ max="100"
159
+ step="${step}"
160
+ markers="${markers}"
161
+ >
102
162
  <w-slider-thumb name="value"></w-slider-thumb>
103
163
  </w-slider>
104
164
  `;
@@ -121,20 +181,31 @@ export const OverUnder = {
121
181
  render() {
122
182
  return html `
123
183
  <form id="overunder" style="margin-bottom: 16px" lang="nb">
124
- <w-slider label="Produksjonsår" min="1950" max="2025" data-testid="overunder">
184
+ <w-slider
185
+ label="Produksjonsår"
186
+ min="1950"
187
+ max="2025"
188
+ data-testid="overunder"
189
+ allow-values-outside-range="true"
190
+ >
125
191
  <w-slider-thumb
126
192
  slot="from"
127
193
  aria-label="Fra år"
128
194
  aria-description="1950 inkluderer kjøretøy produsert fram til 1950"
129
- name="from"></w-slider-thumb>
195
+ name="from"
196
+ ></w-slider-thumb>
130
197
  <w-slider-thumb
131
198
  slot="to"
132
199
  aria-label="Til år"
133
200
  aria-description="2025 inkluderer kjøretøy produsert etter 2025"
134
- name="to"></w-slider-thumb>
201
+ name="to"
202
+ ></w-slider-thumb>
135
203
  </w-slider>
136
204
  </form>
137
- <p>Drag the slider to show the value below. See the Code tab for how to format the labels.</p>
205
+ <p>
206
+ Drag the slider to show the value below. See the Code tab for how to
207
+ format the labels.
208
+ </p>
138
209
  <output>
139
210
  <dl>
140
211
  <dt>From:</dt>
@@ -145,24 +216,26 @@ export const OverUnder = {
145
216
  </output>
146
217
  <script>
147
218
  /** Here is how you can show labels to indicate min and max values are "up to and including" and "this value and above". */
148
- const overunderSlider = document.querySelector('w-slider[data-testid="overunder"]');
149
- overunderSlider.formatter = function (value) {
150
- if (value === '1950') {
151
- return 'Før 1950';
219
+ const overunderSlider = document.querySelector(
220
+ 'w-slider[data-testid="overunder"]',
221
+ );
222
+ overunderSlider.formatter = function (value, type) {
223
+ if (value === "" && type === "from") {
224
+ return "Før 1950";
152
225
  }
153
- if (value === '2025') {
154
- return 'Etter 2025';
226
+ if (value === "" && type === "to") {
227
+ return "Etter 2025";
155
228
  }
156
229
  return value;
157
230
  };
158
231
 
159
232
  /** Code to show the form values in output */
160
- document.forms['overunder'].addEventListener('input', function () {
233
+ document.forms["overunder"].addEventListener("input", function () {
161
234
  const formData = new FormData(this);
162
- const from = formData.get('from');
163
- const to = formData.get('to');
164
- document.getElementById('overunder-from').innerText = from;
165
- document.getElementById('overunder-to').innerText = to;
235
+ const from = formData.get("from");
236
+ const to = formData.get("to");
237
+ document.getElementById("overunder-from").innerText = from;
238
+ document.getElementById("overunder-to").innerText = to;
166
239
  });
167
240
  </script>
168
241
  `;
@@ -182,16 +255,38 @@ export const SingleError = {
182
255
  },
183
256
  };
184
257
  export const RangeError = {
185
- args: {
186
- locale: 'nb',
187
- },
258
+ args: {},
188
259
  render() {
189
260
  return html `
190
- <w-slider label="Production year" min="1950" max="2025" over under>
191
- <p slot="description">Try typing a from value higher than a to value</p>
192
- <w-slider-thumb slot="from" name="from"></w-slider-thumb>
193
- <w-slider-thumb slot="to" name="to"></w-slider-thumb>
194
- </w-slider>
261
+ <form id="rangeerror" style="margin-bottom: 16px">
262
+ <w-slider label="Production year" min="1950" max="2025" over under>
263
+ <p slot="description">Try typing a from value higher than a to value</p>
264
+ <w-slider-thumb slot="from" name="from"></w-slider-thumb>
265
+ <w-slider-thumb slot="to" name="to"></w-slider-thumb>
266
+ </w-slider>
267
+ </form>
268
+ <p>
269
+ Drag the slider to show the value below. See the Code tab for how to
270
+ format the labels.
271
+ </p>
272
+ <output>
273
+ <dl>
274
+ <dt>From:</dt>
275
+ <dd id="rangeerror-from"></dd>
276
+ <dt>To:</dt>
277
+ <dd id="rangeerror-to"></dd>
278
+ </dl>
279
+ </output>
280
+ <script>
281
+ /** Code to show the form values in output */
282
+ document.forms["rangeerror"].addEventListener("input", function () {
283
+ const formData = new FormData(this);
284
+ const from = formData.get("from");
285
+ const to = formData.get("to");
286
+ document.getElementById("rangeerror-from").innerText = from;
287
+ document.getElementById("rangeerror-to").innerText = to;
288
+ });
289
+ </script>
195
290
  `;
196
291
  },
197
292
  };
@@ -3,7 +3,7 @@ import { StoryObj } from '@storybook/react';
3
3
  import { Textarea } from './react';
4
4
  declare const _default: {
5
5
  title: string;
6
- render(args: Omit<React.HTMLAttributes<import("./textarea").WarpTextarea>, "label" | "onblur" | "onchange" | "onfocus" | "oninput" | "onFocus" | "onBlur" | "onChange" | "onInput" | "render" | "renderOptions" | "connectedCallback" | "disconnectedCallback" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "form" | "disabled" | "name" | "value" | "updated" | "validationTarget" | "internals" | "showError" | "validationMessage" | "validity" | "validationComplete" | "checkValidity" | "formResetCallback" | "resetFormControl" | "valueChangedCallback" | "validityCallback" | "validationMessageCallback" | "setValue" | "shouldFormValueUpdate" | "invalid" | "optional" | "readOnly" | "helpText" | "placeholder" | "readonly" | "required" | "_helptextstyles" | "_helpId" | "_id" | "_error" | "handler" | "maxRows" | "minRows" | "minHeight" | "maxHeight" | "_textareaStyles"> & {
6
+ render(args: Omit<React.HTMLAttributes<import("./textarea").WarpTextarea>, "label" | "onblur" | "onchange" | "onfocus" | "oninput" | "onFocus" | "onBlur" | "onChange" | "onInput" | "render" | "renderOptions" | "connectedCallback" | "disconnectedCallback" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "form" | "disabled" | "name" | "value" | "updated" | "validationTarget" | "internals" | "showError" | "validationMessage" | "validity" | "validationComplete" | "checkValidity" | "formResetCallback" | "resetFormControl" | "valueChangedCallback" | "validityCallback" | "validationMessageCallback" | "setValue" | "shouldFormValueUpdate" | "invalid" | "helpText" | "optional" | "readOnly" | "readonly" | "placeholder" | "required" | "_helptextstyles" | "_helpId" | "_id" | "_error" | "handler" | "maxRows" | "minRows" | "minHeight" | "maxHeight" | "_textareaStyles"> & {
7
7
  onBlur?: (e: Event) => void;
8
8
  onblur?: (e: Event) => void;
9
9
  onChange?: (e: Event) => void;
@@ -2489,7 +2489,7 @@ var K=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var l=(h,o,i,r
2489
2489
  text-overflow: ellipsis;
2490
2490
  z-index: 1;
2491
2491
  }
2492
- `;import{css as ee}from"lit";var D=ee`*,: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)}.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}}`;var x={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]"},ae={base:"antialiased block relative text-s font-bold pb-4 cursor-pointer s-text",optional:"pl-8 font-normal text-s s-text-subtle"},N={base:"text-xs mt-4 block",color:"s-text-subtle",colorInvalid:"s-text-negative"},s=class extends B(G){constructor(){super(...arguments);this.type="text";this._hasPrefix=!1;this._hasSuffix=!1}updated(i){i.has("value")&&this.setValue(this.value),this.formatter&&this.value&&(this.mask.innerText=this.formatter(this.value))}get _inputstyles(){return Y([x.base,this._hasSuffix&&x.suffix,this._hasPrefix&&x.prefix,!this.invalid&&!this.disabled&&!(this.readonly||this.readOnly)&&x.default,this.invalid&&!this.disabled&&!(this.readonly||this.readOnly)&&x.invalid,!this.invalid&&this.disabled&&!(this.readonly||this.readOnly)&&x.disabled,!this.invalid&&!this.disabled&&(this.readonly||this.readOnly)&&x.readOnly])}get _helptextstyles(){return Y([N.base,this.invalid?N.colorInvalid:N.color])}get _label(){if(this.label)return j`<label for="${this._id}" class=${ae.base}>${this.label}</label>`}get _helpId(){if(this.helpText)return`${this._id}__hint`}get _id(){return"textfield"}get _error(){if(this.invalid&&this._helpId)return this._helpId}handler(i){let{name:r,value:n}=i.currentTarget;this.value=n;let g=new CustomEvent(i.type,{detail:{name:r,value:n,target:i.target}});this.dispatchEvent(g)}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 j`
2492
+ `;import{css as ee}from"lit";var D=ee`*,: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)}.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}}`;var x={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]"},ae={base:"antialiased block relative text-s font-bold pb-4 cursor-pointer s-text",optional:"pl-8 font-normal text-s s-text-subtle"},N={base:"text-xs mt-4 block",color:"s-text-subtle",colorInvalid:"s-text-negative"},s=class extends B(G){constructor(){super(...arguments);this.type="text";this._hasPrefix=!1;this._hasSuffix=!1}updated(i){i.has("value")&&this.setValue(this.value),this.formatter&&(this.mask.innerText=this.formatter(this.value))}get _inputstyles(){return Y([x.base,this._hasSuffix&&x.suffix,this._hasPrefix&&x.prefix,!this.invalid&&!this.disabled&&!(this.readonly||this.readOnly)&&x.default,this.invalid&&!this.disabled&&!(this.readonly||this.readOnly)&&x.invalid,!this.invalid&&this.disabled&&!(this.readonly||this.readOnly)&&x.disabled,!this.invalid&&!this.disabled&&(this.readonly||this.readOnly)&&x.readOnly])}get _helptextstyles(){return Y([N.base,this.invalid?N.colorInvalid:N.color])}get _label(){if(this.label)return j`<label for="${this._id}" class=${ae.base}>${this.label}</label>`}get _helpId(){if(this.helpText)return`${this._id}__hint`}get _id(){return"textfield"}get _error(){if(this.invalid&&this._helpId)return this._helpId}handler(i){let{name:r,value:n}=i.currentTarget;this.value=n;let g=new CustomEvent(i.type,{detail:{name:r,value:n,target:i.target}});this.dispatchEvent(g)}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 j`
2493
2493
  ${this._label}
2494
2494
  <div
2495
2495
  class="${te({"w-textfield":!0,"w-textfield--has-prefix":this._hasPrefix,"w-textfield--has-suffix":this._hasSuffix})}">