@warp-ds/elements 2.10.0-next.11 → 2.10.0-next.13

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 (197) hide show
  1. package/dist/custom-elements.json +211 -189
  2. package/dist/docs/badge/api.md +4 -4
  3. package/dist/docs/badge/badge.md +4 -4
  4. package/dist/docs/button/api.md +24 -24
  5. package/dist/docs/button/button.md +24 -24
  6. package/dist/docs/checkbox/api.md +2 -2
  7. package/dist/docs/checkbox/checkbox.md +2 -2
  8. package/dist/docs/checkbox-group/api.md +6 -6
  9. package/dist/docs/checkbox-group/checkbox-group.md +6 -6
  10. package/dist/docs/datepicker/api.md +8 -8
  11. package/dist/docs/datepicker/datepicker.md +8 -8
  12. package/dist/docs/expandable/api.md +6 -6
  13. package/dist/docs/expandable/expandable.md +6 -6
  14. package/dist/docs/icon/api.md +4 -4
  15. package/dist/docs/icon/icon.md +4 -4
  16. package/dist/docs/link/api.md +10 -10
  17. package/dist/docs/link/link.md +10 -10
  18. package/dist/docs/modal/api.md +2 -2
  19. package/dist/docs/modal/modal.md +2 -2
  20. package/dist/docs/pagination/api.md +4 -4
  21. package/dist/docs/pagination/pagination.md +4 -4
  22. package/dist/docs/pill/api.md +8 -8
  23. package/dist/docs/pill/pill.md +8 -8
  24. package/dist/docs/select/api.md +10 -10
  25. package/dist/docs/select/select.md +10 -10
  26. package/dist/docs/slider/api.md +22 -22
  27. package/dist/docs/slider/slider.md +22 -22
  28. package/dist/docs/slider-thumb/api.md +12 -12
  29. package/dist/docs/slider-thumb/slider-thumb.md +12 -12
  30. package/dist/docs/tabs/api.md +2 -2
  31. package/dist/docs/tabs/tabs.md +2 -2
  32. package/dist/docs/textarea/api.md +14 -14
  33. package/dist/docs/textarea/textarea.md +14 -14
  34. package/dist/docs/textfield/api.md +34 -34
  35. package/dist/docs/textfield/textfield.md +34 -34
  36. package/dist/packages/affix/affix.d.ts +1 -1
  37. package/dist/packages/affix/affix.js +8 -8
  38. package/dist/packages/affix/affix.js.map +4 -4
  39. package/dist/packages/affix/styles.js +2 -2
  40. package/dist/packages/alert/alert.js +7 -7
  41. package/dist/packages/alert/alert.js.map +3 -3
  42. package/dist/packages/alert/styles.js +2 -2
  43. package/dist/packages/attention/attention.js +42 -21
  44. package/dist/packages/attention/attention.js.map +4 -4
  45. package/dist/packages/attention/attention.stories.js +1 -1
  46. package/dist/packages/attention/styles.js +2 -2
  47. package/dist/packages/badge/badge.d.ts +2 -2
  48. package/dist/packages/badge/badge.js +6 -6
  49. package/dist/packages/badge/badge.js.map +3 -3
  50. package/dist/packages/badge/styles.js +2 -2
  51. package/dist/packages/box/box.js +6 -6
  52. package/dist/packages/box/box.js.map +3 -3
  53. package/dist/packages/box/styles.js +2 -2
  54. package/dist/packages/breadcrumbs/breadcrumbs.d.ts +1 -2
  55. package/dist/packages/breadcrumbs/breadcrumbs.js +7 -7
  56. package/dist/packages/breadcrumbs/breadcrumbs.js.map +4 -4
  57. package/dist/packages/breadcrumbs/breadcrumbs.react.stories.d.ts +1 -1
  58. package/dist/packages/breadcrumbs/styles.js +2 -2
  59. package/dist/packages/button/button.d.ts +11 -11
  60. package/dist/packages/button/button.js +37 -16
  61. package/dist/packages/button/button.js.map +4 -4
  62. package/dist/packages/button/button.react.stories.d.ts +2 -2
  63. package/dist/packages/button/react.d.ts +1 -1
  64. package/dist/packages/button/styles.js +18 -2
  65. package/dist/packages/card/card.js +8 -8
  66. package/dist/packages/card/card.js.map +4 -4
  67. package/dist/packages/card/styles.js +2 -2
  68. package/dist/packages/checkbox/checkbox.d.ts +2 -2
  69. package/dist/packages/checkbox/checkbox.js +9 -9
  70. package/dist/packages/checkbox/checkbox.js.map +3 -3
  71. package/dist/packages/checkbox-group/checkbox-group.d.ts +4 -4
  72. package/dist/packages/checkbox-group/checkbox-group.js.map +2 -2
  73. package/dist/packages/combobox/combobox.js +14 -15
  74. package/dist/packages/combobox/combobox.js.map +4 -4
  75. package/dist/packages/combobox/combobox.react.stories.d.ts +26 -10
  76. package/dist/packages/combobox/react.d.ts +13 -5
  77. package/dist/packages/combobox/styles.js +2 -3
  78. package/dist/packages/datepicker/datepicker.d.ts +5 -5
  79. package/dist/packages/datepicker/datepicker.js +29 -29
  80. package/dist/packages/datepicker/datepicker.js.map +4 -4
  81. package/dist/packages/datepicker/datepicker.react.stories.d.ts +12 -12
  82. package/dist/packages/datepicker/react.d.ts +6 -6
  83. package/dist/packages/expandable/expandable.d.ts +3 -3
  84. package/dist/packages/expandable/expandable.js +10 -10
  85. package/dist/packages/expandable/expandable.js.map +3 -3
  86. package/dist/packages/expandable/styles.js +2 -2
  87. package/dist/packages/icon/icon.d.ts +1 -1
  88. package/dist/packages/icon/icon.js +2 -2
  89. package/dist/packages/icon/icon.js.map +1 -1
  90. package/dist/packages/icon/icon.react.stories.d.ts +1 -1
  91. package/dist/packages/icon/icon.react.stories.js +2 -0
  92. package/dist/packages/icon/icon.stories.d.ts +7 -30
  93. package/dist/packages/icon/icon.stories.js +11 -2
  94. package/dist/packages/link/link.d.ts +5 -5
  95. package/dist/packages/link/link.js +40 -19
  96. package/dist/packages/link/link.js.map +3 -3
  97. package/dist/packages/link/styles.js +5 -0
  98. package/dist/packages/modal/modal.d.ts +1 -1
  99. package/dist/packages/modal/modal.js +7 -7
  100. package/dist/packages/modal/modal.js.map +3 -3
  101. package/dist/packages/modal/modal.react.stories.d.ts +4 -4
  102. package/dist/packages/modal/react.d.ts +4 -4
  103. package/dist/packages/modal/util.js +3 -1
  104. package/dist/packages/modal-footer/modal-footer.js +7 -7
  105. package/dist/packages/modal-footer/modal-footer.js.map +3 -3
  106. package/dist/packages/modal-header/modal-header.js +11 -11
  107. package/dist/packages/modal-header/modal-header.js.map +4 -4
  108. package/dist/packages/modal-header/react.d.ts +2 -2
  109. package/dist/packages/page-indicator/page-indicator.d.ts +0 -4
  110. package/dist/packages/page-indicator/page-indicator.js +6 -6
  111. package/dist/packages/page-indicator/page-indicator.js.map +4 -4
  112. package/dist/packages/page-indicator/page-indicator.stories.d.ts +8 -26
  113. package/dist/packages/page-indicator/page-indicator.stories.js +9 -7
  114. package/dist/packages/pagination/pagination.d.ts +8 -9
  115. package/dist/packages/pagination/pagination.js +15 -15
  116. package/dist/packages/pagination/pagination.js.map +4 -4
  117. package/dist/packages/pagination/pagination.react.stories.d.ts +6 -6
  118. package/dist/packages/pagination/pagination.test.js +4 -7
  119. package/dist/packages/pagination/react.d.ts +3 -3
  120. package/dist/packages/pagination/styles.js +2 -2
  121. package/dist/packages/pill/pill.d.ts +4 -4
  122. package/dist/packages/pill/pill.js +9 -9
  123. package/dist/packages/pill/pill.js.map +4 -4
  124. package/dist/packages/pill/pill.react.stories.d.ts +8 -8
  125. package/dist/packages/pill/react.d.ts +4 -4
  126. package/dist/packages/pill/styles.js +2 -2
  127. package/dist/packages/radio/form-associated-element.d.ts +1 -1
  128. package/dist/packages/radio/radio.d.ts +1 -1
  129. package/dist/packages/radio/radio.js +8 -8
  130. package/dist/packages/radio/radio.js.map +3 -3
  131. package/dist/packages/radio-group/radio-group.d.ts +2 -2
  132. package/dist/packages/radio-group/radio-group.js +11 -11
  133. package/dist/packages/radio-group/radio-group.js.map +4 -4
  134. package/dist/packages/radio-group/react.d.ts +4 -4
  135. package/dist/packages/select/react.d.ts +3 -3
  136. package/dist/packages/select/select.d.ts +6 -7
  137. package/dist/packages/select/select.js +13 -13
  138. package/dist/packages/select/select.js.map +4 -4
  139. package/dist/packages/select/select.react.stories.d.ts +7 -7
  140. package/dist/packages/select/select.react.stories.js +15 -10
  141. package/dist/packages/select/styles.js +2 -2
  142. package/dist/packages/slider/slider.d.ts +14 -14
  143. package/dist/packages/slider/slider.js +12 -12
  144. package/dist/packages/slider/slider.js.map +4 -4
  145. package/dist/packages/slider/slider.stories.js +1 -0
  146. package/dist/packages/slider/styles.js +2 -2
  147. package/dist/packages/slider-thumb/react.d.ts +2 -2
  148. package/dist/packages/slider-thumb/slider-thumb.d.ts +14 -14
  149. package/dist/packages/slider-thumb/slider-thumb.js +11 -11
  150. package/dist/packages/slider-thumb/slider-thumb.js.map +4 -4
  151. package/dist/packages/slider-thumb/styles.d.ts +1 -0
  152. package/dist/packages/slider-thumb/styles.js +2 -0
  153. package/dist/packages/step/step.js +10 -10
  154. package/dist/packages/step/step.js.map +4 -4
  155. package/dist/packages/step-indicator/step-indicator.js +6 -6
  156. package/dist/packages/step-indicator/step-indicator.js.map +3 -3
  157. package/dist/packages/step-indicator/styles.js +2 -2
  158. package/dist/packages/styles.js +4 -2
  159. package/dist/packages/switch/styles.js +2 -2
  160. package/dist/packages/switch/switch.d.ts +3 -3
  161. package/dist/packages/switch/switch.js +6 -6
  162. package/dist/packages/switch/switch.js.map +3 -3
  163. package/dist/packages/tab/react.d.ts +4 -4
  164. package/dist/packages/tab/tab.d.ts +1 -1
  165. package/dist/packages/tab/tab.js +6 -6
  166. package/dist/packages/tab/tab.js.map +3 -3
  167. package/dist/packages/tab-panel/tab-panel.js +5 -5
  168. package/dist/packages/tab-panel/tab-panel.js.map +3 -3
  169. package/dist/packages/tabs/styles.js +2 -2
  170. package/dist/packages/tabs/tabs.d.ts +4 -3
  171. package/dist/packages/tabs/tabs.js +6 -6
  172. package/dist/packages/tabs/tabs.js.map +3 -3
  173. package/dist/packages/textarea/react.d.ts +9 -9
  174. package/dist/packages/textarea/styles.js +2 -2
  175. package/dist/packages/textarea/textarea.a11y.test.js +1 -1
  176. package/dist/packages/textarea/textarea.d.ts +10 -10
  177. package/dist/packages/textarea/textarea.js +10 -10
  178. package/dist/packages/textarea/textarea.js.map +4 -4
  179. package/dist/packages/textarea/textarea.react.stories.d.ts +18 -18
  180. package/dist/packages/textfield/react.d.ts +9 -9
  181. package/dist/packages/textfield/styles.js +2 -2
  182. package/dist/packages/textfield/textfield.d.ts +22 -22
  183. package/dist/packages/textfield/textfield.js +10 -10
  184. package/dist/packages/textfield/textfield.js.map +3 -3
  185. package/dist/packages/textfield/textfield.react.stories.d.ts +18 -18
  186. package/dist/packages/toast/api.d.ts +1 -1
  187. package/dist/packages/toast/styles.js +2 -2
  188. package/dist/packages/toast/toast.d.ts +1 -1
  189. package/dist/packages/toast/toast.js +12 -12
  190. package/dist/packages/toast/toast.js.map +4 -4
  191. package/dist/packages/toast-container/styles.d.ts +1 -0
  192. package/dist/packages/toast-container/styles.js +2 -0
  193. package/dist/packages/toast-container/toast-container.js +8 -8
  194. package/dist/packages/toast-container/toast-container.js.map +3 -3
  195. package/dist/web-types.json +170 -159
  196. package/eik/index.js +19 -2459
  197. package/package.json +3 -3
@@ -191,28 +191,28 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
191
191
 
192
192
  | Name | Type | Default | Summary |
193
193
  |-|-|-|-|
194
- | autocomplete | `string \| undefined` | `-` | 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. |
194
+ | autocomplete | `HTMLInputElement["autocomplete"] \| undefined` | `-` | 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. |
195
195
  | disabled | `boolean` | `false` | Makes the element not focusable and hides it from form submits |
196
- | formatter (JS only) | `(value: string) => string` | `-` | Function to format value when the input field |
197
- | help-text | `string` | `-` | Description shown below the input field |
196
+ | formatter (JS only) | `((value: string) => string) \| undefined` | `-` | Function to format value when the input field |
197
+ | help-text | `string \| undefined` | `-` | Description shown below the input field |
198
198
  | invalid | `boolean` | `false` | Mark the form field as invalid. |
199
- | label | `string` | `-` | Either a `label` or an `aria-label` must be provided. |
200
- | max | `number` | `-` | Use with `type="number"` to set the [maximum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#maxlength). |
201
- | max-length | `number` | `-` | **Deprecated**: Use the native `maxlength` attribute |
202
- | maxlength | `number` | `-` | For `text`, `search`, `url`, `tel`, `email` and `password` fields, sets the [maximum string length](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#maxlength) allowed. |
203
- | min | `number` | `-` | Use with `type="number"` to set the [minimum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#minlength). |
204
- | min-length | `number` | `-` | **Deprecated**: Use the native `minlength` attribute |
205
- | minlength | `number` | `-` | For `text`, `search`, `url`, `tel`, `email` and `password` fields, sets the [minimum string length](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#minlength) required. |
206
- | name | `string` | `-` | The [name](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name) of the input field when submitting the form. |
207
- | pattern | `string` | `-` | Sets a [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions) that the input's value must [match to pass validation](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#pattern) |
208
- | placeholder | `string` | `-` | Shown in the textfield when it doesn't have a value |
199
+ | label | `string \| undefined` | `-` | Either a `label` or an `aria-label` must be provided. |
200
+ | max | `number \| undefined` | `-` | Use with `type="number"` to set the [maximum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#maxlength). |
201
+ | max-length | `number \| undefined` | `-` | **Deprecated**: Use the native `maxlength` attribute |
202
+ | maxlength | `number \| undefined` | `-` | For `text`, `search`, `url`, `tel`, `email` and `password` fields, sets the [maximum string length](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#maxlength) allowed. |
203
+ | min | `number \| undefined` | `-` | Use with `type="number"` to set the [minimum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#minlength). |
204
+ | min-length | `number \| undefined` | `-` | **Deprecated**: Use the native `minlength` attribute |
205
+ | minlength | `number \| undefined` | `-` | For `text`, `search`, `url`, `tel`, `email` and `password` fields, sets the [minimum string length](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#minlength) required. |
206
+ | name | `string \| undefined` | `-` | The [name](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name) of the input field when submitting the form. |
207
+ | pattern | `string \| undefined` | `-` | Sets a [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions) that the input's value must [match to pass validation](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#pattern) |
208
+ | placeholder | `string \| undefined` | `-` | Shown in the textfield when it doesn't have a value |
209
209
  | read-only | `boolean` | `false` | **Deprecated**: Use the native readonly attribute instead. |
210
210
  | readonly | `boolean` | `false` | Whether the input can be selected but not changed by the user. |
211
211
  | required | `boolean` | `false` | Whether user input is required on the input before form submission. |
212
- | size | `string` | `-` | Sets the [size](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#size) (width) of the input field to fit the expected length of inputs. |
213
- | step | `number` | `-` | Forces `number` inputs to be a whole number of `step` |
214
- | type | `string` | `-` | The [type of input](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#input_types). |
215
- | value | `string` | `-` | Lets you set the current value. |
212
+ | size | `string \| undefined` | `-` | Sets the [size](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#size) (width) of the input field to fit the expected length of inputs. |
213
+ | step | `number \| undefined` | `-` | Forces `number` inputs to be a whole number of `step` |
214
+ | type | `string \| undefined` | `-` | The [type of input](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#input_types). |
215
+ | value | `string \| undefined` | `-` | Lets you set the current value. |
216
216
 
217
217
  ### Property Details
218
218
 
@@ -220,7 +220,7 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
220
220
 
221
221
  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.
222
222
 
223
- - Type: `string | undefined`
223
+ - Type: `HTMLInputElement["autocomplete"] | undefined`
224
224
  - Default: `-`
225
225
 
226
226
  #### disabled
@@ -241,7 +241,7 @@ Function to format value when the input field.
241
241
  Only active when the input field does not have focus,
242
242
  similar to the accessible input [masking example from Filament Group](https://filamentgroup.github.io/politespace/demo/demo.html).
243
243
 
244
- - Type: `(value: string) => string`
244
+ - Type: `((value: string) => string) | undefined`
245
245
  - Default: `-`
246
246
 
247
247
  #### help-text
@@ -249,7 +249,7 @@ similar to the accessible input [masking example from Filament Group](https://fi
249
249
  Use in combination with `invalid` to show as a validation error message,
250
250
  or on its own to show a help text.
251
251
 
252
- - Type: `string`
252
+ - Type: `string | undefined`
253
253
  - Default: `-`
254
254
 
255
255
  #### invalid
@@ -263,14 +263,14 @@ Mark the form field as invalid. Make sure to also set a `help-text` to help user
263
263
 
264
264
  Either a `label` or an `aria-label` must be provided.
265
265
 
266
- - Type: `string`
266
+ - Type: `string | undefined`
267
267
  - Default: `-`
268
268
 
269
269
  #### max
270
270
 
271
271
  Use with `type="number"` to set the [maximum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#maxlength).
272
272
 
273
- - Type: `number`
273
+ - Type: `number | undefined`
274
274
  - Default: `-`
275
275
 
276
276
  #### max-length
@@ -279,21 +279,21 @@ Use with `type="number"` to set the [maximum allowed value](https://developer.mo
279
279
 
280
280
 
281
281
 
282
- - Type: `number`
282
+ - Type: `number | undefined`
283
283
  - Default: `-`
284
284
 
285
285
  #### maxlength
286
286
 
287
287
  For `text`, `search`, `url`, `tel`, `email` and `password` fields, sets the [maximum string length](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#maxlength) allowed.
288
288
 
289
- - Type: `number`
289
+ - Type: `number | undefined`
290
290
  - Default: `-`
291
291
 
292
292
  #### min
293
293
 
294
294
  Use with `type="number"` to set the [minimum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#minlength).
295
295
 
296
- - Type: `number`
296
+ - Type: `number | undefined`
297
297
  - Default: `-`
298
298
 
299
299
  #### min-length
@@ -302,28 +302,28 @@ Use with `type="number"` to set the [minimum allowed value](https://developer.mo
302
302
 
303
303
 
304
304
 
305
- - Type: `number`
305
+ - Type: `number | undefined`
306
306
  - Default: `-`
307
307
 
308
308
  #### minlength
309
309
 
310
310
  For `text`, `search`, `url`, `tel`, `email` and `password` fields, sets the [minimum string length](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#minlength) required.
311
311
 
312
- - Type: `number`
312
+ - Type: `number | undefined`
313
313
  - Default: `-`
314
314
 
315
315
  #### name
316
316
 
317
317
  The [name](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name) of the input field when submitting the form.
318
318
 
319
- - Type: `string`
319
+ - Type: `string | undefined`
320
320
  - Default: `-`
321
321
 
322
322
  #### pattern
323
323
 
324
324
  Sets a [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions) that the input's value must [match to pass validation](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#pattern)
325
325
 
326
- - Type: `string`
326
+ - Type: `string | undefined`
327
327
  - Default: `-`
328
328
 
329
329
  #### placeholder
@@ -332,7 +332,7 @@ Set a text that is shown in the textfield when it doesn't have a value.
332
332
 
333
333
  Placeholder text should not be used as a substitute for labeling the element with a visible label.
334
334
 
335
- - Type: `string`
335
+ - Type: `string | undefined`
336
336
  - Default: `-`
337
337
 
338
338
  #### read-only
@@ -362,7 +362,7 @@ Whether user input is required on the input before form submission.
362
362
 
363
363
  Sets the [size](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#size) (width) of the input field to fit the expected length of inputs.
364
364
 
365
- - Type: `string`
365
+ - Type: `string | undefined`
366
366
  - Default: `-`
367
367
 
368
368
  #### step
@@ -372,20 +372,20 @@ When used with `number` this attribute forces inputs to be a whole number of `st
372
372
  For example with a `step="5"` only values that divide evenly on 5 are allowed.
373
373
  Using arrow up and down in the input field increments and decrements by 5.
374
374
 
375
- - Type: `number`
375
+ - Type: `number | undefined`
376
376
  - Default: `-`
377
377
 
378
378
  #### type
379
379
 
380
380
  The [type of input](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#input_types).
381
381
 
382
- - Type: `string`
382
+ - Type: `string | undefined`
383
383
  - Default: `-`
384
384
 
385
385
  #### value
386
386
 
387
387
  Lets you set the current value.
388
388
 
389
- - Type: `string`
389
+ - Type: `string | undefined`
390
390
  - Default: `-`
391
391
 
@@ -60,7 +60,7 @@ declare class WarpAffix extends WarpAffix_base {
60
60
  /** @internal */
61
61
  get _text(): import("lit").TemplateResult<1>;
62
62
  /** @internal */
63
- get _markup(): "" | import("lit").TemplateResult<1>;
63
+ get _markup(): "" | import("lit").TemplateResult<1> | undefined;
64
64
  render(): import("lit").TemplateResult<1>;
65
65
  }
66
66
  export { WarpAffix };
@@ -1,4 +1,4 @@
1
- var ve=Object.defineProperty;var fe=Object.getOwnPropertyDescriptor;var w=(t,e,r,o)=>{for(var a=o>1?void 0:o?fe(e,r):e,d=t.length-1,s;d>=0;d--)(s=t[d])&&(a=(o?s(e,r,a):s(a))||a);return o&&a&&ve(e,r,a),a};var B=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return t.reduce(function(r,o){return r.concat(typeof o=="string"?o:Array.isArray(o)?B.apply(void 0,o):typeof o=="object"&&o?Object.keys(o).map(function(a){return o[a]?a:""}):"")},[]).join(" ")};var F=t=>typeof t=="string",we=t=>typeof t=="function",te=new Map,ie="en";function H(t){return[...Array.isArray(t)?t:[t],ie]}function K(t,e,r){let o=H(t);r||(r="default");let a;if(typeof r=="string")switch(a={day:"numeric",month:"short",year:"numeric"},r){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=r;return O(()=>N("date",o,r),()=>new Intl.DateTimeFormat(o,a)).format(F(e)?new Date(e):e)}function xe(t,e,r){let o;if(r||(r="default"),typeof r=="string")switch(o={second:"numeric",minute:"numeric",hour:"numeric"},r){case"full":case"long":o.timeZoneName="short";break;case"short":delete o.second}else o=r;return K(t,e,o)}function G(t,e,r){let o=H(t);return O(()=>N("number",o,r),()=>new Intl.NumberFormat(o,r)).format(e)}function ae(t,e,r,{offset:o=0,...a}){let d=H(t),s=e?O(()=>N("plural-ordinal",d),()=>new Intl.PluralRules(d,{type:"ordinal"})):O(()=>N("plural-cardinal",d),()=>new Intl.PluralRules(d,{type:"cardinal"}));return a[r]??a[s.select(r-o)]??a.other}function O(t,e){let r=t(),o=te.get(r);return o||(o=e(),te.set(r,o)),o}function N(t,e,r){let o=e.join("-");return`${t}-${o}-${JSON.stringify(r)}`}var ne=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,se=t=>t.replace(/\\u([a-fA-F0-9]{4})|\\x([a-fA-F0-9]{2})/g,(e,r,o)=>{if(r){let a=parseInt(r,16);return String.fromCharCode(a)}else{let a=parseInt(o,16);return String.fromCharCode(a)}}),le="%__lingui_octothorpe__%",ke=(t,e,r={})=>{let o=e||t,a=s=>typeof s=="object"?s:r[s],d=(s,n)=>{let b=Object.keys(r).length?a("number"):void 0,g=G(o,s,b);return n.replace(new RegExp(le,"g"),g)};return{plural:(s,n)=>{let{offset:b=0}=n,g=ae(o,!1,s,n);return d(s-b,g)},selectordinal:(s,n)=>{let{offset:b=0}=n,g=ae(o,!0,s,n);return d(s-b,g)},select:ye,number:(s,n)=>G(o,s,a(n)||{style:n}),date:(s,n)=>K(o,s,a(n)||n),time:(s,n)=>xe(o,s,a(n)||n)}},ye=(t,e)=>e[t]??e.other;function _e(t,e,r){return(o={},a)=>{let d=ke(e,r,a),s=(b,g=!1)=>Array.isArray(b)?b.reduce((y,_)=>{if(_==="#"&&g)return y+le;if(F(_))return y+_;let[P,v,z]=_,C={};v==="plural"||v==="selectordinal"||v==="select"?Object.entries(z).forEach(([M,V])=>{C[M]=s(V,v==="plural"||v==="selectordinal")}):C=z;let m;if(v){let M=d[v];m=M(o[P],C)}else m=o[P];return m==null?y:y+m},""):b,n=s(t);return F(n)&&ne.test(n)?se(n):F(n)?n:n?String(n):""}}var ze=Object.defineProperty,Ce=(t,e,r)=>e in t?ze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Fe=(t,e,r)=>(Ce(t,typeof e!="symbol"?e+"":e,r),r),U=class{constructor(){Fe(this,"_events",{})}on(e,r){var o;return(o=this._events)[e]??(o[e]=[]),this._events[e].push(r),()=>this.removeListener(e,r)}removeListener(e,r){let o=this._getListeners(e);if(!o)return;let a=o.indexOf(r);~a&&o.splice(a,1)}emit(e,...r){let o=this._getListeners(e);o&&o.map(a=>a.apply(this,r))}_getListeners(e){let r=this._events[e];return Array.isArray(r)?r:!1}},Ee=Object.defineProperty,Me=(t,e,r)=>e in t?Ee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,L=(t,e,r)=>(Me(t,typeof e!="symbol"?e+"":e,r),r),q=class extends U{constructor(e){super(),L(this,"_locale",""),L(this,"_locales"),L(this,"_localeData",{}),L(this,"_messages",{}),L(this,"_missing"),L(this,"_messageCompiler"),L(this,"t",this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale=="string"||e.locales)&&this.activate(e.locale??ie,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 o=this._localeData[e];o?Object.assign(o,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(o=>this._loadLocaleData(o,e[o])),this.emit("change")}_load(e,r){let o=this._messages[e];o?Object.assign(o,r):this._messages[e]=r}load(e,r){typeof e=="string"&&typeof r=="object"?this._load(e,r):Object.entries(e).forEach(([o,a])=>this._load(o,a)),this.emit("change")}loadAndActivate({locale:e,locales:r,messages:o}){this._locale=e,this._locales=r||void 0,this._messages[this._locale]=o,this.emit("change")}activate(e,r){this._locale=e,this._locales=r,this.emit("change")}_(e,r,o){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=o?.message;e||(e=""),F(e)||(r=e.values||r,a=e.message,e=e.id);let d=this.messages[e],s=d===void 0,n=this._missing;if(n&&s)return we(n)?n(this._locale,e):n;s&&this.emit("missing",{id:e,locale:this._locale});let b=d||a||e;return F(b)&&(this._messageCompiler?b=this._messageCompiler(b):console.warn(`Uncompiled message detected! Message:
1
+ var me=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var w=(t,e,r,o)=>{for(var a=o>1?void 0:o?ve(e,r):e,d=t.length-1,s;d>=0;d--)(s=t[d])&&(a=(o?s(e,r,a):s(a))||a);return o&&a&&me(e,r,a),a};var B=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return t.reduce(function(r,o){return r.concat(typeof o=="string"?o:Array.isArray(o)?B.apply(void 0,o):typeof o=="object"&&o?Object.keys(o).map(function(a){return o[a]?a:""}):"")},[]).join(" ")};var F=t=>typeof t=="string",fe=t=>typeof t=="function",te=new Map,ie="en";function H(t){return[...Array.isArray(t)?t:[t],ie]}function K(t,e,r){let o=H(t);r||(r="default");let a;if(typeof r=="string")switch(a={day:"numeric",month:"short",year:"numeric"},r){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=r;return O(()=>N("date",o,r),()=>new Intl.DateTimeFormat(o,a)).format(F(e)?new Date(e):e)}function we(t,e,r){let o;if(r||(r="default"),typeof r=="string")switch(o={second:"numeric",minute:"numeric",hour:"numeric"},r){case"full":case"long":o.timeZoneName="short";break;case"short":delete o.second}else o=r;return K(t,e,o)}function G(t,e,r){let o=H(t);return O(()=>N("number",o,r),()=>new Intl.NumberFormat(o,r)).format(e)}function ae(t,e,r,{offset:o=0,...a}){let d=H(t),s=e?O(()=>N("plural-ordinal",d),()=>new Intl.PluralRules(d,{type:"ordinal"})):O(()=>N("plural-cardinal",d),()=>new Intl.PluralRules(d,{type:"cardinal"}));return a[r]??a[s.select(r-o)]??a.other}function O(t,e){let r=t(),o=te.get(r);return o||(o=e(),te.set(r,o)),o}function N(t,e,r){let o=e.join("-");return`${t}-${o}-${JSON.stringify(r)}`}var ne=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,se=t=>t.replace(/\\u([a-fA-F0-9]{4})|\\x([a-fA-F0-9]{2})/g,(e,r,o)=>{if(r){let a=parseInt(r,16);return String.fromCharCode(a)}else{let a=parseInt(o,16);return String.fromCharCode(a)}}),le="%__lingui_octothorpe__%",xe=(t,e,r={})=>{let o=e||t,a=s=>typeof s=="object"?s:r[s],d=(s,n)=>{let b=Object.keys(r).length?a("number"):void 0,g=G(o,s,b);return n.replace(new RegExp(le,"g"),g)};return{plural:(s,n)=>{let{offset:b=0}=n,g=ae(o,!1,s,n);return d(s-b,g)},selectordinal:(s,n)=>{let{offset:b=0}=n,g=ae(o,!0,s,n);return d(s-b,g)},select:ke,number:(s,n)=>G(o,s,a(n)||{style:n}),date:(s,n)=>K(o,s,a(n)||n),time:(s,n)=>we(o,s,a(n)||n)}},ke=(t,e)=>e[t]??e.other;function ye(t,e,r){return(o={},a)=>{let d=xe(e,r,a),s=(b,g=!1)=>Array.isArray(b)?b.reduce((y,_)=>{if(_==="#"&&g)return y+le;if(F(_))return y+_;let[P,v,z]=_,C={};v==="plural"||v==="selectordinal"||v==="select"?Object.entries(z).forEach(([M,V])=>{C[M]=s(V,v==="plural"||v==="selectordinal")}):C=z;let m;if(v){let M=d[v];m=M(o[P],C)}else m=o[P];return m==null?y:y+m},""):b,n=s(t);return F(n)&&ne.test(n)?se(n):F(n)?n:n?String(n):""}}var _e=Object.defineProperty,ze=(t,e,r)=>e in t?_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ce=(t,e,r)=>(ze(t,typeof e!="symbol"?e+"":e,r),r),U=class{constructor(){Ce(this,"_events",{})}on(e,r){var o;return(o=this._events)[e]??(o[e]=[]),this._events[e].push(r),()=>this.removeListener(e,r)}removeListener(e,r){let o=this._getListeners(e);if(!o)return;let a=o.indexOf(r);~a&&o.splice(a,1)}emit(e,...r){let o=this._getListeners(e);o&&o.map(a=>a.apply(this,r))}_getListeners(e){let r=this._events[e];return Array.isArray(r)?r:!1}},Fe=Object.defineProperty,Ee=(t,e,r)=>e in t?Fe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,L=(t,e,r)=>(Ee(t,typeof e!="symbol"?e+"":e,r),r),q=class extends U{constructor(e){super(),L(this,"_locale",""),L(this,"_locales"),L(this,"_localeData",{}),L(this,"_messages",{}),L(this,"_missing"),L(this,"_messageCompiler"),L(this,"t",this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale=="string"||e.locales)&&this.activate(e.locale??ie,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 o=this._localeData[e];o?Object.assign(o,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(o=>this._loadLocaleData(o,e[o])),this.emit("change")}_load(e,r){let o=this._messages[e];o?Object.assign(o,r):this._messages[e]=r}load(e,r){typeof e=="string"&&typeof r=="object"?this._load(e,r):Object.entries(e).forEach(([o,a])=>this._load(o,a)),this.emit("change")}loadAndActivate({locale:e,locales:r,messages:o}){this._locale=e,this._locales=r||void 0,this._messages[this._locale]=o,this.emit("change")}activate(e,r){this._locale=e,this._locales=r,this.emit("change")}_(e,r,o){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=o?.message;e||(e=""),F(e)||(r=e.values||r,a=e.message,e=e.id);let d=this.messages[e],s=d===void 0,n=this._missing;if(n&&s)return fe(n)?n(this._locale,e):n;s&&this.emit("missing",{id:e,locale:this._locale});let b=d||a||e;return F(b)&&(this._messageCompiler?b=this._messageCompiler(b):console.warn(`Uncompiled message detected! Message:
2
2
 
3
3
  > ${b}
4
4
 
@@ -6,7 +6,7 @@ That means you use raw catalog or your catalog doesn't have a translation for th
6
6
  ICU features such as interpolation and plurals will not work properly for that message.
7
7
 
8
8
  Please compile your catalog first.
9
- `)),F(b)&&ne.test(b)?se(b):F(b)?b:_e(b,this._locale,this._locales)(r,o?.formats)}date(e,r){return K(this._locales||this._locale,e,r)}number(e,r){return G(this._locales||this._locale,e,r)}};function Le(t={}){return new q(t)}var J=Le();import{html as Y,LitElement as Ie}from"lit";import{property as A}from"lit/decorators.js";var c=function(t,e,r,o){if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?o:r==="a"?o.call(t):o?o.value:e.get(t)},h=function(t,e,r,o,a){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?a.call(t,r):a?a.value=r:e.set(t,r),r};function ce(t){var e,r,o,a,d,s,n,b,g,y,_,P,v,z,C,m,M,V,X;class me extends t{constructor(...i){var l,u,p;super(...i),e.add(this),this.internals=this.attachInternals(),r.set(this,!1),o.set(this,!1),a.set(this,!1),d.set(this,void 0),s.set(this,void 0),n.set(this,!0),g.set(this,""),y.set(this,()=>{h(this,a,!0,"f"),h(this,r,!0,"f"),c(this,e,"m",m).call(this)}),_.set(this,()=>{h(this,r,!1,"f"),c(this,e,"m",M).call(this,this.shouldFormValueUpdate()?c(this,g,"f"):""),!this.validity.valid&&c(this,a,"f")&&h(this,o,!0,"f");let x=c(this,e,"m",m).call(this);this.validationMessageCallback&&this.validationMessageCallback(x?this.internals.validationMessage:"")}),P.set(this,()=>{var x;c(this,n,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),h(this,n,!1,"f")),h(this,a,!0,"f"),h(this,o,!0,"f"),c(this,e,"m",m).call(this),(x=this===null||this===void 0?void 0:this.validationMessageCallback)===null||x===void 0||x.call(this,this.showError?this.internals.validationMessage:"")}),v.set(this,void 0),z.set(this,!1),C.set(this,Promise.resolve()),(l=this.addEventListener)===null||l===void 0||l.call(this,"focus",c(this,y,"f")),(u=this.addEventListener)===null||u===void 0||u.call(this,"blur",c(this,_,"f")),(p=this.addEventListener)===null||p===void 0||p.call(this,"invalid",c(this,P,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let i=this.validators.map(p=>p.attribute).flat(),l=super.observedAttributes||[];return[...new Set([...l,...i])]}static getValidator(i){return this.validators.find(l=>l.attribute===i)||null}static getValidators(i){return this.validators.filter(l=>{var u;if(l.attribute===i||!((u=l.attribute)===null||u===void 0)&&u.includes(i))return!0})}get form(){return this.internals.form}get showError(){return c(this,e,"m",m).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(i,l,u){var p;(p=super.attributeChangedCallback)===null||p===void 0||p.call(this,i,l,u);let $=this.constructor.getValidators(i);$?.length&&this.validationTarget&&this.setValue(c(this,g,"f"))}setValue(i){var l;h(this,o,!1,"f"),(l=this.validationMessageCallback)===null||l===void 0||l.call(this,""),h(this,g,i,"f");let p=this.shouldFormValueUpdate()?i:null;this.internals.setFormValue(p),c(this,e,"m",M).call(this,p),this.valueChangedCallback&&this.valueChangedCallback(p),c(this,e,"m",m).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(i=>i(c(this,C,"f")))}formResetCallback(){var i,l;h(this,a,!1,"f"),h(this,o,!1,"f"),c(this,e,"m",m).call(this),(i=this.resetFormControl)===null||i===void 0||i.call(this),(l=this.validationMessageCallback)===null||l===void 0||l.call(this,c(this,e,"m",m).call(this)?this.validationMessage:"")}}return r=new WeakMap,o=new WeakMap,a=new WeakMap,d=new WeakMap,s=new WeakMap,n=new WeakMap,g=new WeakMap,y=new WeakMap,_=new WeakMap,P=new WeakMap,v=new WeakMap,z=new WeakMap,C=new WeakMap,e=new WeakSet,b=function(){let i=this.getRootNode(),l=`${this.localName}[name="${this.getAttribute("name")}"]`;return i.querySelectorAll(l)},m=function(){if(this.hasAttribute("disabled"))return!1;let i=c(this,o,"f")||c(this,a,"f")&&!this.validity.valid&&!c(this,r,"f");return i&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),i},M=function(i){let l=this.constructor,u={},p=l.validators,x=[],$=p.some(f=>f.isValid instanceof Promise);c(this,z,"f")||(h(this,C,new Promise(f=>{h(this,v,f,"f")}),"f"),h(this,z,!0,"f")),c(this,d,"f")&&(c(this,d,"f").abort(),h(this,s,c(this,d,"f"),"f"));let j=new AbortController;h(this,d,j,"f");let D,oe=!1;p.length&&(p.forEach(f=>{let W=f.key||"customError",S=f.isValid(this,i,j.signal);S instanceof Promise?(x.push(S),S.then(Z=>{Z!=null&&(u[W]=!Z,D=c(this,e,"m",X).call(this,f,i),c(this,e,"m",V).call(this,u,D))})):(u[W]=!S,this.validity[W]!==!S&&(oe=!0),!S&&!D&&(D=c(this,e,"m",X).call(this,f,i)))}),Promise.allSettled(x).then(()=>{var f;j?.signal.aborted||(h(this,z,!1,"f"),(f=c(this,v,"f"))===null||f===void 0||f.call(this))}),(oe||!$)&&c(this,e,"m",V).call(this,u,D))},V=function(i,l){if(this.validationTarget)this.internals.setValidity(i,l,this.validationTarget),h(this,n,!1,"f");else{if(this.internals.setValidity(i,l),this.internals.validity.valid)return;h(this,n,!0,"f")}},X=function(i,l){if(this.validityCallback){let u=this.validityCallback(i.key||"customError");if(u)return u}return i.message instanceof Function?i.message(this,l):i.message},me}import{css as de}from"lit";var be=de`
9
+ `)),F(b)&&ne.test(b)?se(b):F(b)?b:ye(b,this._locale,this._locales)(r,o?.formats)}date(e,r){return K(this._locales||this._locale,e,r)}number(e,r){return G(this._locales||this._locale,e,r)}};function Me(t={}){return new q(t)}var J=Me();import{html as Y,LitElement as Re}from"lit";import{property as A}from"lit/decorators.js";var c=function(t,e,r,o){if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?o:r==="a"?o.call(t):o?o.value:e.get(t)},h=function(t,e,r,o,a){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?a.call(t,r):a?a.value=r:e.set(t,r),r};function ce(t){var e,r,o,a,d,s,n,b,g,y,_,P,v,z,C,m,M,V,X;class ge extends t{constructor(...i){var l,u,p;super(...i),e.add(this),this.internals=this.attachInternals(),r.set(this,!1),o.set(this,!1),a.set(this,!1),d.set(this,void 0),s.set(this,void 0),n.set(this,!0),g.set(this,""),y.set(this,()=>{h(this,a,!0,"f"),h(this,r,!0,"f"),c(this,e,"m",m).call(this)}),_.set(this,()=>{h(this,r,!1,"f"),c(this,e,"m",M).call(this,this.shouldFormValueUpdate()?c(this,g,"f"):""),!this.validity.valid&&c(this,a,"f")&&h(this,o,!0,"f");let x=c(this,e,"m",m).call(this);this.validationMessageCallback&&this.validationMessageCallback(x?this.internals.validationMessage:"")}),P.set(this,()=>{var x;c(this,n,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),h(this,n,!1,"f")),h(this,a,!0,"f"),h(this,o,!0,"f"),c(this,e,"m",m).call(this),(x=this===null||this===void 0?void 0:this.validationMessageCallback)===null||x===void 0||x.call(this,this.showError?this.internals.validationMessage:"")}),v.set(this,void 0),z.set(this,!1),C.set(this,Promise.resolve()),(l=this.addEventListener)===null||l===void 0||l.call(this,"focus",c(this,y,"f")),(u=this.addEventListener)===null||u===void 0||u.call(this,"blur",c(this,_,"f")),(p=this.addEventListener)===null||p===void 0||p.call(this,"invalid",c(this,P,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let i=this.validators.map(p=>p.attribute).flat(),l=super.observedAttributes||[];return[...new Set([...l,...i])]}static getValidator(i){return this.validators.find(l=>l.attribute===i)||null}static getValidators(i){return this.validators.filter(l=>{var u;if(l.attribute===i||!((u=l.attribute)===null||u===void 0)&&u.includes(i))return!0})}get form(){return this.internals.form}get showError(){return c(this,e,"m",m).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(i,l,u){var p;(p=super.attributeChangedCallback)===null||p===void 0||p.call(this,i,l,u);let $=this.constructor.getValidators(i);$?.length&&this.validationTarget&&this.setValue(c(this,g,"f"))}setValue(i){var l;h(this,o,!1,"f"),(l=this.validationMessageCallback)===null||l===void 0||l.call(this,""),h(this,g,i,"f");let p=this.shouldFormValueUpdate()?i:null;this.internals.setFormValue(p),c(this,e,"m",M).call(this,p),this.valueChangedCallback&&this.valueChangedCallback(p),c(this,e,"m",m).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(i=>i(c(this,C,"f")))}formResetCallback(){var i,l;h(this,a,!1,"f"),h(this,o,!1,"f"),c(this,e,"m",m).call(this),(i=this.resetFormControl)===null||i===void 0||i.call(this),(l=this.validationMessageCallback)===null||l===void 0||l.call(this,c(this,e,"m",m).call(this)?this.validationMessage:"")}}return r=new WeakMap,o=new WeakMap,a=new WeakMap,d=new WeakMap,s=new WeakMap,n=new WeakMap,g=new WeakMap,y=new WeakMap,_=new WeakMap,P=new WeakMap,v=new WeakMap,z=new WeakMap,C=new WeakMap,e=new WeakSet,b=function(){let i=this.getRootNode(),l=`${this.localName}[name="${this.getAttribute("name")}"]`;return i.querySelectorAll(l)},m=function(){if(this.hasAttribute("disabled"))return!1;let i=c(this,o,"f")||c(this,a,"f")&&!this.validity.valid&&!c(this,r,"f");return i&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),i},M=function(i){let l=this.constructor,u={},p=l.validators,x=[],$=p.some(f=>f.isValid instanceof Promise);c(this,z,"f")||(h(this,C,new Promise(f=>{h(this,v,f,"f")}),"f"),h(this,z,!0,"f")),c(this,d,"f")&&(c(this,d,"f").abort(),h(this,s,c(this,d,"f"),"f"));let j=new AbortController;h(this,d,j,"f");let D,oe=!1;p.length&&(p.forEach(f=>{let W=f.key||"customError",S=f.isValid(this,i,j.signal);S instanceof Promise?(x.push(S),S.then(Z=>{Z!=null&&(u[W]=!Z,D=c(this,e,"m",X).call(this,f,i),c(this,e,"m",V).call(this,u,D))})):(u[W]=!S,this.validity[W]!==!S&&(oe=!0),!S&&!D&&(D=c(this,e,"m",X).call(this,f,i)))}),Promise.allSettled(x).then(()=>{var f;j?.signal.aborted||(h(this,z,!1,"f"),(f=c(this,v,"f"))===null||f===void 0||f.call(this))}),(oe||!$)&&c(this,e,"m",V).call(this,u,D))},V=function(i,l){if(this.validationTarget)this.internals.setValidity(i,l,this.validationTarget),h(this,n,!1,"f");else{if(this.internals.setValidity(i,l),this.internals.validity.valid)return;h(this,n,!0,"f")}},X=function(i,l){if(this.validityCallback){let u=this.validityCallback(i.key||"customError");if(u)return u}return i.message instanceof Function?i.message(this,l):i.message},ge}import{css as Le}from"lit";import{unsafeCSS as Pe}from"lit";var de=Le`
10
10
  *,
11
11
  :before,
12
12
  :after {
@@ -279,7 +279,7 @@ Please compile your catalog first.
279
279
  svg {
280
280
  pointer-events: none;
281
281
  }
282
- `,He=de`*, :before, :after {
282
+ `,Je=Pe(`*, :before, :after {
283
283
  --w-rotate: 0;
284
284
  --w-rotate-x: 0;
285
285
  --w-rotate-y: 0;
@@ -2144,8 +2144,8 @@ Please compile your catalog first.
2144
2144
  overflow-wrap: break-word
2145
2145
  }
2146
2146
 
2147
- .before\\:content-\\[\\"–\\"\\]:before {
2148
- content: "–"
2147
+ .before\\:content-\\[\\"\xE2\u20AC\u201C\\"\\]:before {
2148
+ content: "\xE2\u20AC\u201C"
2149
2149
  }
2150
2150
 
2151
2151
  .before\\:content-\\[\\"\\"\\]:before {
@@ -2445,7 +2445,7 @@ Please compile your catalog first.
2445
2445
  display: none
2446
2446
  }
2447
2447
  }
2448
- `;import{css as Pe}from"lit";var ue=Pe`*,: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}.rounded-4{border-radius:4px}.block{display:block}.flex{display:flex}.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}.items-center{align-items:center}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.justify-center{justify-content:center}.absolute{position:absolute}.relative{position:relative}.static{position:static}.s-text{color:var(--w-s-color-text)}.w-40{width:4rem}.w-max{width:max-content}.pb-0{padding-bottom:0}.pl-12{padding-left:1.2rem}.pr-12{padding-right:1.2rem}.cursor-default{cursor:default}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:grayscale}.font-bold{font-weight:700}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}`;import{html as Ve,LitElement as Te}from"lit";import{property as Q,state as $e}from"lit/decorators.js";import{classMap as je}from"lit/directives/class-map.js";import{css as Se}from"lit";var he=Se`
2448
+ `);import{unsafeCSS as Se}from"lit";var be=Se("*,: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}.rounded-4{border-radius:4px}.block{display:block}.flex{display:flex}.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}.items-center{align-items:center}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.justify-center{justify-content:center}.absolute{position:absolute}.relative{position:relative}.static{position:static}.s-text{color:var(--w-s-color-text)}.w-40{width:4rem}.w-max{width:max-content}.pb-0{padding-bottom:0}.pl-12{padding-left:1.2rem}.pr-12{padding-right:1.2rem}.cursor-default{cursor:default}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:grayscale}.font-bold{font-weight:700}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}");import{html as Te,LitElement as $e}from"lit";import{property as Q,state as je}from"lit/decorators.js";import{classMap as De}from"lit/directives/class-map.js";import{css as Ve}from"lit";var ue=Ve`
2449
2449
  :host {
2450
2450
  display: inline-block;
2451
2451
  }
@@ -2470,7 +2470,7 @@ Please compile your catalog first.
2470
2470
  --w-icon-size: 32px;
2471
2471
  }
2472
2472
 
2473
- `;var ee=new Map,De='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>';function Ye(t,e={}){let r=e.responseParser??(o=>o.text());return ee.has(t)||ee.set(t,fetch(t).then(r)),ee.get(t)}var E=class extends Te{constructor(){super(...arguments);this.locale=document.documentElement.lang||"en";this.svg=null}async fetchIcon(r){let o=`https://assets.finn.no/pkg/eikons/v1/${this.locale}/${r}.svg`;try{let a=await Ye(o);return new DOMParser().parseFromString(a,"text/html").body.querySelector("svg")}catch{return null}}firstUpdated(){this.loadIcon()}updated(r){(r.has("name")||r.has("locale"))&&this.loadIcon()}async loadIcon(){if(!this.name){this.svg=null;return}let r=await this.fetchIcon(this.name);r||(r=new DOMParser().parseFromString(De,"text/html").body.firstElementChild),this.svg=r}render(){let r=this.size||"medium",o=this.name||"",a={"w-icon":!0,"w-icon--s":r==="small","w-icon--m":r==="medium","w-icon--l":r==="large"},d=typeof r=="string"&&r.endsWith("px")?`--w-icon-size: ${r};`:"";return Ve`<div class="${je(a)}" style="${d}" part="w-${o.toLowerCase()}">${this.svg}</div>`}};E.styles=[he],w([Q({type:String,reflect:!0})],E.prototype,"name",2),w([Q({type:String,reflect:!0})],E.prototype,"size",2),w([Q({type:String,reflect:!0,useDefault:!0})],E.prototype,"locale",2),w([$e()],E.prototype,"svg",2);customElements.get("w-icon")||customElements.define("w-icon",E);var Ae=["en","nb","fi","da","sv"],re="en",I=t=>Ae.find(e=>t===e||t.toLowerCase().includes(e))||re;function R(){if(typeof window>"u"){let t=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return I(t)}try{let t=pe(document);if(t)return I(t);let e=Ne();if(e)return I(e);let r=pe(Oe());return r?I(r):re}catch(t){return console.warn("could not detect locale, falling back to source locale",t),re}}function Oe(){try{return window.parent?.document??null}catch{return null}}function pe(t){try{return t?.documentElement?.lang??""}catch{return""}}function Ne(){try{return window.frameElement?.getAttribute?.("lang")??""}catch{return""}}var ge="absolute top-0 bottom-0 flex justify-center items-center focusable rounded-4 focus:[--w-outline-offset:-2px] bg-transparent ",Re={wrapper:ge+"right-0",wrapperWithLabel:"w-max pr-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"},Xe={wrapper:ge+"left-0",wrapperWithLabel:"w-max pl-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"},k=class extends ce(Ie){constructor(){super(...arguments);this.ariaLabel=null;this.clear=!1;this.search=!1;this.label="";this.icon=null}get _classBase(){return this.slot==="suffix"?Re:Xe}get _classes(){return B([this._classBase.wrapper,this.label?this._classBase.wrapperWithLabel:this._classBase.wrapperWithIcon])}resetContainingTextField(r){let o=this.closest("w-textfield");o&&o.resetFormControl(),r.stopPropagation()}submitContainingForm(r){let o=this.internals.form;o&&o.submit(),r.stopPropagation()}get _searchButton(){let r=this.ariaLabel||J._({id:"affix.aria.search",message:"Search",comment:"Aria label for the search button in affix"});return Y`
2473
+ `;var ee=new Map,Ye='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>';function Ae(t,e={}){let r=e.responseParser??(o=>o.text());return ee.has(t)||ee.set(t,fetch(t).then(r)),ee.get(t)}var E=class extends $e{constructor(){super(...arguments);this.locale=document.documentElement.lang||"en";this.svg=null}async fetchIcon(r){let o=`https://assets.finn.no/pkg/eikons/v1/${this.locale}/${r}.svg`;try{let a=await Ae(o);return new DOMParser().parseFromString(a,"text/html").body.querySelector("svg")}catch{return null}}firstUpdated(){this.loadIcon()}updated(r){(r.has("name")||r.has("locale"))&&this.loadIcon()}async loadIcon(){if(!this.name){this.svg=null;return}let r=await this.fetchIcon(this.name);r||(r=new DOMParser().parseFromString(Ye,"text/html").body.firstElementChild),this.svg=r}render(){let r=this.size||"medium",o=this.name||"",a={"w-icon":!0,"w-icon--s":r==="small","w-icon--m":r==="medium","w-icon--l":r==="large"},d=typeof r=="string"&&r.endsWith("px")?`--w-icon-size: ${r};`:"";return Te`<div class="${De(a)}" style="${d}" part="w-${o.toLowerCase()}">${this.svg}</div>`}};E.styles=[ue],w([Q({type:String,reflect:!0})],E.prototype,"name",2),w([Q({type:String,reflect:!0})],E.prototype,"size",2),w([Q({type:String,reflect:!0,useDefault:!0})],E.prototype,"locale",2),w([je()],E.prototype,"svg",2);customElements.get("w-icon")||customElements.define("w-icon",E);var Oe=["en","nb","fi","da","sv"],re="en",I=t=>Oe.find(e=>t===e||t.toLowerCase().includes(e))||re;function R(){if(typeof window>"u"){let t=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return I(t)}try{let t=he(document);if(t)return I(t);let e=Ie();if(e)return I(e);let r=he(Ne());return r?I(r):re}catch(t){return console.warn("could not detect locale, falling back to source locale",t),re}}function Ne(){try{return window.parent?.document??null}catch{return null}}function he(t){try{return t?.documentElement?.lang??""}catch{return""}}function Ie(){try{return window.frameElement?.getAttribute?.("lang")??""}catch{return""}}var pe="absolute top-0 bottom-0 flex justify-center items-center focusable rounded-4 focus:[--w-outline-offset:-2px] bg-transparent ",Xe={wrapper:pe+"right-0",wrapperWithLabel:"w-max pr-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"},We={wrapper:pe+"left-0",wrapperWithLabel:"w-max pl-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"},k=class extends ce(Re){constructor(){super(...arguments);this.ariaLabel=null;this.clear=!1;this.search=!1;this.label="";this.icon=null}get _classBase(){return this.slot==="suffix"?Xe:We}get _classes(){return B([this._classBase.wrapper,this.label?this._classBase.wrapperWithLabel:this._classBase.wrapperWithIcon])}resetContainingTextField(r){let o=this.closest("w-textfield");o&&o.resetFormControl(),r.stopPropagation()}submitContainingForm(r){let o=this.internals.form;o&&o.submit(),r.stopPropagation()}get _searchButton(){let r=this.ariaLabel||J._({id:"affix.aria.search",message:"Search",comment:"Aria label for the search button in affix"});return Y`
2474
2474
  <button aria-label="${r}" class="${this._classes}" type="submit" @click="${this.submitContainingForm.bind(this)}">
2475
2475
  <w-icon name="Search" size="small" locale="${R()}" class="flex"></w-icon>
2476
2476
  </button>
@@ -2486,5 +2486,5 @@ Please compile your catalog first.
2486
2486
  <div class="${this._classes}">
2487
2487
  <span class="${this._classBase.label}">${this.label}</span>
2488
2488
  </div>
2489
- `}get _markup(){if(this.label)return this._text;if(this.icon)return this._icon;if(this.search)return this._searchButton;if(this.clear)return this._clearButton}render(){return Y`${this._markup}`}};k.styles=[be,ue],w([A({attribute:"aria-label",reflect:!0,useDefault:!0})],k.prototype,"ariaLabel",2),w([A({type:Boolean})],k.prototype,"clear",2),w([A({type:Boolean})],k.prototype,"search",2),w([A({reflect:!0,useDefault:!0})],k.prototype,"label",2),w([A({reflect:!0,useDefault:!0})],k.prototype,"icon",2);customElements.get("w-affix")||customElements.define("w-affix",k);export{k as WarpAffix};
2489
+ `}get _markup(){if(this.label)return this._text;if(this.icon)return this._icon;if(this.search)return this._searchButton;if(this.clear)return this._clearButton}render(){return Y`${this._markup}`}};k.styles=[de,be],w([A({attribute:"aria-label",reflect:!0,useDefault:!0})],k.prototype,"ariaLabel",2),w([A({type:Boolean})],k.prototype,"clear",2),w([A({type:Boolean})],k.prototype,"search",2),w([A({reflect:!0,useDefault:!0})],k.prototype,"label",2),w([A({reflect:!0,useDefault:!0})],k.prototype,"icon",2);customElements.get("w-affix")||customElements.define("w-affix",k);export{k as WarpAffix};
2490
2490
  //# sourceMappingURL=affix.js.map