@vonage/vivid 4.24.0 → 4.25.0

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 (392) hide show
  1. package/custom-elements.json +12314 -4711
  2. package/elevation/index.cjs +1 -1
  3. package/elevation/index.js +1 -1
  4. package/index.cjs +112 -150
  5. package/index.js +37 -35
  6. package/lib/accordion-item/accordion-item.d.ts +6 -0
  7. package/lib/action-group/action-group.d.ts +6 -0
  8. package/lib/alert/alert.d.ts +20 -0
  9. package/lib/audio-player/audio-player.d.ts +6 -0
  10. package/lib/badge/badge.d.ts +9 -1
  11. package/lib/banner/banner.d.ts +25 -0
  12. package/lib/breadcrumb/breadcrumb.d.ts +6 -0
  13. package/lib/breadcrumb-item/breadcrumb-item.d.ts +63 -7
  14. package/lib/button/button.d.ts +732 -7
  15. package/lib/button/locale.d.ts +3 -0
  16. package/lib/calendar-event/calendar-event.d.ts +6 -0
  17. package/lib/card/card.d.ts +394 -2
  18. package/lib/card/card.template.d.ts +2 -1
  19. package/lib/checkbox/checkbox.d.ts +1822 -5
  20. package/lib/combobox/combobox.d.ts +1827 -20
  21. package/lib/data-grid/data-grid-cell.d.ts +339 -1
  22. package/lib/data-grid/locale.d.ts +5 -0
  23. package/lib/date-picker/date-picker.d.ts +1676 -207
  24. package/lib/date-range-picker/date-range-picker.d.ts +840 -107
  25. package/lib/date-time-picker/date-time-picker.d.ts +1678 -209
  26. package/lib/dial-pad/dial-pad.d.ts +8 -0
  27. package/lib/dialog/dialog.d.ts +12 -0
  28. package/lib/divider/divider.d.ts +6 -0
  29. package/lib/fab/fab.d.ts +6 -0
  30. package/lib/file-picker/file-picker.d.ts +1508 -30
  31. package/lib/header/header.d.ts +6 -0
  32. package/lib/icon/icon.d.ts +1 -0
  33. package/lib/icon/icon.template.d.ts +2 -1
  34. package/lib/menu/menu.d.ts +16 -7
  35. package/lib/menu/name.d.ts +1 -0
  36. package/lib/menu-item/menu-item.d.ts +14 -2
  37. package/lib/nav/nav.d.ts +6 -0
  38. package/lib/nav-disclosure/nav-disclosure.d.ts +13 -0
  39. package/lib/nav-item/nav-item.d.ts +405 -3
  40. package/lib/note/note.d.ts +6 -0
  41. package/lib/number-field/number-field.d.ts +1857 -36
  42. package/lib/option/option.d.ts +12 -0
  43. package/lib/progress/progress.d.ts +6 -0
  44. package/lib/progress-ring/progress-ring.d.ts +6 -0
  45. package/lib/radio/radio.d.ts +1137 -4
  46. package/lib/radio-group/radio-group.d.ts +20 -2
  47. package/lib/range-slider/range-slider.d.ts +752 -5
  48. package/lib/rich-text-editor/definition.d.ts +2 -2
  49. package/lib/rich-text-editor/facades/vivid-prose-mirror.facade.d.ts +3 -1
  50. package/lib/rich-text-editor/locale.d.ts +1 -0
  51. package/lib/rich-text-editor/menubar/menubar.d.ts +6 -0
  52. package/lib/rich-text-editor/rich-text-editor.d.ts +352 -2
  53. package/lib/searchable-select/option-tag.d.ts +6 -0
  54. package/lib/searchable-select/searchable-select.d.ts +1857 -36
  55. package/lib/select/select.d.ts +1843 -28
  56. package/lib/selectable-box/selectable-box.d.ts +6 -0
  57. package/lib/slider/slider.d.ts +384 -2
  58. package/lib/split-button/split-button.d.ts +18 -0
  59. package/lib/switch/switch.d.ts +386 -3
  60. package/lib/tab/tab.d.ts +18 -1
  61. package/lib/tab-panel/tab-panel.d.ts +6 -0
  62. package/lib/tag/tag.d.ts +12 -0
  63. package/lib/tag-group/tag-group.d.ts +6 -0
  64. package/lib/text-area/text-area.d.ts +2174 -19
  65. package/lib/text-field/text-field.d.ts +2195 -31
  66. package/lib/time-picker/time-picker.d.ts +839 -106
  67. package/lib/toggletip/toggletip.d.ts +10 -4
  68. package/lib/tooltip/tooltip.d.ts +10 -4
  69. package/lib/tree-item/tree-item.d.ts +12 -0
  70. package/lib/tree-view/tree-view.d.ts +6 -0
  71. package/lib/video-player/video-player.d.ts +6 -0
  72. package/lib/visually-hidden/definition.d.ts +4 -0
  73. package/lib/visually-hidden/visually-hidden.d.ts +3 -0
  74. package/lib/visually-hidden/visually-hidden.template.d.ts +3 -0
  75. package/locales/de-DE.cjs +33 -1
  76. package/locales/de-DE.js +33 -1
  77. package/locales/en-GB.cjs +33 -1
  78. package/locales/en-GB.js +33 -1
  79. package/locales/en-US.cjs +33 -1
  80. package/locales/en-US.js +33 -1
  81. package/locales/ja-JP.cjs +33 -1
  82. package/locales/ja-JP.js +33 -1
  83. package/locales/zh-CN.cjs +33 -1
  84. package/locales/zh-CN.js +33 -1
  85. package/menu/index.cjs +1 -1
  86. package/menu/index.js +1 -1
  87. package/nav/index.cjs +1 -1
  88. package/nav/index.js +1 -1
  89. package/nav-disclosure/index.cjs +1 -1
  90. package/nav-disclosure/index.js +1 -1
  91. package/nav-item/index.cjs +1 -1
  92. package/nav-item/index.js +1 -1
  93. package/note/index.cjs +1 -1
  94. package/note/index.js +1 -1
  95. package/number-field/index.cjs +1 -1
  96. package/number-field/index.js +1 -1
  97. package/option/index.cjs +1 -1
  98. package/option/index.js +1 -1
  99. package/package.json +1 -1
  100. package/pagination/index.cjs +1 -1
  101. package/pagination/index.js +1 -1
  102. package/popup/index.cjs +1 -1
  103. package/popup/index.js +1 -1
  104. package/progress/index.cjs +1 -1
  105. package/progress/index.js +1 -1
  106. package/progress-ring/index.cjs +1 -1
  107. package/progress-ring/index.js +1 -1
  108. package/radio/index.cjs +1 -1
  109. package/radio/index.js +1 -1
  110. package/radio-group/index.cjs +1 -1
  111. package/radio-group/index.js +1 -1
  112. package/range-slider/index.cjs +1 -1
  113. package/range-slider/index.js +1 -1
  114. package/rich-text-editor/index.cjs +1 -1
  115. package/rich-text-editor/index.js +1 -1
  116. package/searchable-select/index.cjs +1 -1
  117. package/searchable-select/index.js +1 -1
  118. package/select/index.cjs +1 -1
  119. package/select/index.js +1 -1
  120. package/selectable-box/index.cjs +1 -1
  121. package/selectable-box/index.js +1 -1
  122. package/shared/affix.cjs +13 -7
  123. package/shared/affix.js +13 -8
  124. package/shared/aria/delegates-aria.d.ts +6 -0
  125. package/shared/aria/host-semantics.d.ts +6 -0
  126. package/shared/breadcrumb-item.cjs +2 -5
  127. package/shared/breadcrumb-item.js +2 -5
  128. package/shared/button.cjs +13 -11
  129. package/shared/button.js +13 -11
  130. package/shared/calendar-picker.template.cjs +3 -3
  131. package/shared/calendar-picker.template.js +1 -1
  132. package/shared/char-count.cjs +92 -0
  133. package/shared/char-count.js +90 -0
  134. package/shared/definition.js +1 -1
  135. package/shared/definition10.js +1 -1
  136. package/shared/definition11.cjs +27 -44
  137. package/shared/definition11.js +28 -45
  138. package/shared/definition12.js +1 -1
  139. package/shared/definition13.js +1 -1
  140. package/shared/definition14.cjs +53 -22
  141. package/shared/definition14.js +54 -23
  142. package/shared/definition15.cjs +31 -36
  143. package/shared/definition15.js +30 -36
  144. package/shared/definition16.cjs +43 -63
  145. package/shared/definition16.js +42 -63
  146. package/shared/definition17.cjs +8 -4
  147. package/shared/definition17.js +8 -4
  148. package/shared/definition18.cjs +10 -14
  149. package/shared/definition18.js +9 -14
  150. package/shared/definition19.cjs +85 -100
  151. package/shared/definition19.js +75 -91
  152. package/shared/definition2.js +1 -1
  153. package/shared/definition20.cjs +15 -20
  154. package/shared/definition20.js +14 -20
  155. package/shared/definition21.cjs +22 -3
  156. package/shared/definition21.js +23 -4
  157. package/shared/definition22.cjs +4 -4
  158. package/shared/definition22.js +5 -5
  159. package/shared/definition23.cjs +5 -38
  160. package/shared/definition23.js +5 -37
  161. package/shared/definition24.cjs +2 -7
  162. package/shared/definition24.js +3 -8
  163. package/shared/definition25.js +1 -1
  164. package/shared/definition26.cjs +157 -171
  165. package/shared/definition26.js +156 -171
  166. package/shared/definition27.cjs +1 -1
  167. package/shared/definition27.js +2 -2
  168. package/shared/definition28.cjs +32 -17
  169. package/shared/definition28.js +33 -18
  170. package/shared/definition29.js +1 -1
  171. package/shared/definition3.js +1 -1
  172. package/shared/definition30.cjs +96 -482
  173. package/shared/definition30.js +99 -482
  174. package/shared/definition31.cjs +334 -57
  175. package/shared/definition31.js +333 -56
  176. package/shared/definition32.cjs +104 -19
  177. package/shared/definition32.js +105 -20
  178. package/shared/definition33.cjs +67 -15
  179. package/shared/definition33.js +66 -14
  180. package/shared/definition34.cjs +15 -50
  181. package/shared/definition34.js +14 -49
  182. package/shared/definition35.cjs +28 -397
  183. package/shared/definition35.js +27 -397
  184. package/shared/definition36.cjs +404 -54
  185. package/shared/definition36.js +404 -55
  186. package/shared/definition37.cjs +57 -234
  187. package/shared/definition37.js +57 -233
  188. package/shared/definition38.cjs +221 -66
  189. package/shared/definition38.js +220 -65
  190. package/shared/definition39.cjs +52 -44
  191. package/shared/definition39.js +51 -43
  192. package/shared/definition4.cjs +31 -24
  193. package/shared/definition4.js +33 -26
  194. package/shared/definition40.cjs +56 -266
  195. package/shared/definition40.js +55 -265
  196. package/shared/definition41.cjs +285 -142
  197. package/shared/definition41.js +285 -142
  198. package/shared/definition42.cjs +156 -564
  199. package/shared/definition42.js +156 -565
  200. package/shared/definition43.cjs +554 -14378
  201. package/shared/definition43.js +553 -14377
  202. package/shared/definition44.cjs +14418 -1155
  203. package/shared/definition44.js +14417 -1156
  204. package/shared/definition45.cjs +1049 -677
  205. package/shared/definition45.js +1050 -678
  206. package/shared/definition46.cjs +848 -113
  207. package/shared/definition46.js +847 -112
  208. package/shared/definition47.cjs +125 -90
  209. package/shared/definition47.js +124 -89
  210. package/shared/definition48.cjs +88 -455
  211. package/shared/definition48.js +87 -454
  212. package/shared/definition49.cjs +466 -109
  213. package/shared/definition49.js +466 -109
  214. package/shared/definition5.cjs +8 -7
  215. package/shared/definition5.js +6 -5
  216. package/shared/definition50.cjs +106 -106
  217. package/shared/definition50.js +105 -105
  218. package/shared/definition51.cjs +136 -15
  219. package/shared/definition51.js +135 -14
  220. package/shared/definition52.cjs +16 -115
  221. package/shared/definition52.js +15 -114
  222. package/shared/definition53.cjs +78 -412
  223. package/shared/definition53.js +77 -410
  224. package/shared/definition54.cjs +445 -23
  225. package/shared/definition54.js +443 -22
  226. package/shared/definition55.cjs +22 -136
  227. package/shared/definition55.js +21 -135
  228. package/shared/definition56.cjs +95 -291
  229. package/shared/definition56.js +95 -292
  230. package/shared/definition57.cjs +192 -480
  231. package/shared/definition57.js +190 -479
  232. package/shared/definition58.cjs +411 -24
  233. package/shared/definition58.js +410 -24
  234. package/shared/definition59.cjs +27 -144
  235. package/shared/definition59.js +27 -143
  236. package/shared/definition6.js +1 -1
  237. package/shared/definition60.cjs +83 -54
  238. package/shared/definition60.js +82 -53
  239. package/shared/definition61.cjs +78 -166
  240. package/shared/definition61.js +77 -164
  241. package/shared/definition62.cjs +143 -232
  242. package/shared/definition62.js +141 -231
  243. package/shared/definition63.cjs +234 -69417
  244. package/shared/definition63.js +233 -69416
  245. package/shared/definition64.cjs +69454 -28
  246. package/shared/definition64.js +69453 -27
  247. package/shared/definition65.cjs +28 -2168
  248. package/shared/definition65.js +27 -2166
  249. package/shared/definition66.cjs +27 -0
  250. package/shared/definition66.js +23 -0
  251. package/shared/definition67.cjs +2195 -0
  252. package/shared/definition67.js +2190 -0
  253. package/shared/definition7.cjs +11 -2
  254. package/shared/definition7.js +12 -3
  255. package/shared/definition8.cjs +24 -11
  256. package/shared/definition8.js +26 -13
  257. package/shared/definition9.cjs +1 -2
  258. package/shared/definition9.js +2 -3
  259. package/shared/delegates-aria.js +1 -1
  260. package/shared/deprecation/replaced-props.d.ts +20 -0
  261. package/shared/divider.cjs +41 -0
  262. package/shared/divider.js +38 -0
  263. package/shared/feedback/feedback-message.d.ts +345 -0
  264. package/shared/feedback/locale.d.ts +4 -0
  265. package/{lib/text-anchor/text-anchor.d.ts → shared/feedback/mixins.d.ts} +62 -39
  266. package/shared/form-associated.cjs +124 -100
  267. package/shared/form-associated.js +125 -101
  268. package/shared/form-element.cjs +84 -0
  269. package/shared/form-element.js +82 -0
  270. package/shared/foundation/button/button.d.ts +378 -2
  271. package/shared/foundation/form-associated/form-associated.d.ts +753 -49
  272. package/shared/foundation/listbox/listbox.d.ts +1 -1
  273. package/shared/foundation/vivid-element/vivid-element.d.ts +14 -0
  274. package/shared/host-semantics.js +1 -1
  275. package/shared/key-codes.js +1 -1
  276. package/shared/linkable.cjs +70 -0
  277. package/shared/linkable.js +68 -0
  278. package/shared/localization/Locale.d.ts +14 -0
  279. package/shared/mixins.cjs +306 -0
  280. package/shared/mixins.js +300 -0
  281. package/shared/patterns/affix.d.ts +16 -1
  282. package/shared/patterns/anchored.d.ts +20 -8
  283. package/shared/patterns/char-count/char-count.d.ts +351 -0
  284. package/shared/patterns/char-count/index.d.ts +1 -0
  285. package/shared/patterns/char-count/locale.d.ts +4 -0
  286. package/shared/patterns/form-elements/form-element.d.ts +744 -0
  287. package/shared/patterns/form-elements/index.d.ts +3 -1
  288. package/shared/patterns/form-elements/with-error-text.d.ts +1122 -0
  289. package/shared/patterns/form-elements/with-success-text.d.ts +341 -0
  290. package/shared/patterns/index.d.ts +2 -0
  291. package/shared/patterns/linkable.d.ts +394 -0
  292. package/shared/patterns/localized.d.ts +6 -0
  293. package/shared/patterns/trapped-focus.d.ts +6 -0
  294. package/shared/picker-field/mixins/calendar-picker.d.ts +420 -52
  295. package/shared/picker-field/mixins/calendar-picker.template.d.ts +420 -52
  296. package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +6 -0
  297. package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +843 -107
  298. package/shared/picker-field/mixins/single-date-picker.d.ts +1259 -155
  299. package/shared/picker-field/mixins/single-value-picker.d.ts +417 -49
  300. package/shared/picker-field/mixins/time-selection-picker.d.ts +842 -106
  301. package/shared/picker-field/mixins/time-selection-picker.template.d.ts +839 -103
  302. package/shared/picker-field/picker-field.d.ts +1491 -15
  303. package/shared/picker-field.template.cjs +13 -22
  304. package/shared/picker-field.template.js +14 -23
  305. package/shared/repeat.js +1 -1
  306. package/shared/slider.template.cjs +1 -1
  307. package/shared/slider.template.js +1 -1
  308. package/shared/time-selection-picker.template.cjs +10 -15
  309. package/shared/time-selection-picker.template.js +10 -16
  310. package/shared/vivid-element.cjs +53 -4
  311. package/shared/vivid-element.js +53 -3
  312. package/shared/with-error-text.cjs +56 -0
  313. package/shared/with-error-text.js +54 -0
  314. package/shared/with-success-text.cjs +23 -0
  315. package/shared/with-success-text.js +21 -0
  316. package/side-drawer/index.cjs +1 -1
  317. package/side-drawer/index.js +1 -1
  318. package/slider/index.cjs +1 -1
  319. package/slider/index.js +1 -1
  320. package/split-button/index.cjs +1 -1
  321. package/split-button/index.js +1 -1
  322. package/styles/core/all.css +1 -1
  323. package/styles/core/theme.css +1 -1
  324. package/styles/core/typography.css +1 -1
  325. package/styles/tokens/theme-dark.css +4 -4
  326. package/styles/tokens/theme-light.css +4 -4
  327. package/styles/tokens/vivid-2-compat.css +1 -1
  328. package/switch/index.cjs +1 -1
  329. package/switch/index.js +1 -1
  330. package/tab/index.cjs +1 -1
  331. package/tab/index.js +1 -1
  332. package/tab-panel/index.cjs +1 -1
  333. package/tab-panel/index.js +1 -1
  334. package/tabs/index.cjs +1 -1
  335. package/tabs/index.js +1 -1
  336. package/tag/index.cjs +1 -1
  337. package/tag/index.js +1 -1
  338. package/tag-group/index.cjs +1 -1
  339. package/tag-group/index.js +1 -1
  340. package/text-area/index.cjs +1 -1
  341. package/text-area/index.js +1 -1
  342. package/text-field/index.cjs +1 -1
  343. package/text-field/index.js +1 -1
  344. package/time-picker/index.cjs +1 -1
  345. package/time-picker/index.js +1 -1
  346. package/toggletip/index.cjs +1 -1
  347. package/toggletip/index.js +1 -1
  348. package/tooltip/index.cjs +1 -1
  349. package/tooltip/index.js +1 -1
  350. package/tree-item/index.cjs +1 -1
  351. package/tree-item/index.js +1 -1
  352. package/tree-view/index.cjs +1 -1
  353. package/tree-view/index.js +1 -1
  354. package/video-player/index.cjs +1 -1
  355. package/video-player/index.js +1 -1
  356. package/visually-hidden/index.cjs +5 -0
  357. package/visually-hidden/index.js +3 -0
  358. package/vivid.api.json +744 -1490
  359. package/lib/checkbox/checkbox.form-associated.d.ts +0 -11
  360. package/lib/file-picker/file-picker.form-associated.d.ts +0 -11
  361. package/lib/number-field/number-field.form-associated.d.ts +0 -11
  362. package/lib/radio/radio.form-associated.d.ts +0 -13
  363. package/lib/range-slider/range-slider.form-associated.d.ts +0 -11
  364. package/lib/searchable-select/searchable-select.form-associated.d.ts +0 -11
  365. package/lib/select/select.form-associated.d.ts +0 -11
  366. package/lib/slider/slider.form-associated.d.ts +0 -11
  367. package/lib/switch/switch.form-associated.d.ts +0 -11
  368. package/lib/text-anchor/definition.d.ts +0 -2
  369. package/lib/text-anchor/text-anchor.template.d.ts +0 -3
  370. package/lib/text-area/text-area.form-associated.d.ts +0 -11
  371. package/lib/text-field/text-field.form-associated.d.ts +0 -11
  372. package/shared/anchor.cjs +0 -49
  373. package/shared/anchor.js +0 -47
  374. package/shared/apply-mixins.cjs +0 -23
  375. package/shared/apply-mixins.js +0 -21
  376. package/shared/applyMixinsWithObservables.cjs +0 -15
  377. package/shared/applyMixinsWithObservables.js +0 -13
  378. package/shared/direction.cjs +0 -17
  379. package/shared/direction.js +0 -15
  380. package/shared/form-elements.cjs +0 -209
  381. package/shared/form-elements.js +0 -202
  382. package/shared/foundation/anchor/anchor.d.ts +0 -11
  383. package/shared/foundation/utilities/apply-mixins.d.ts +0 -1
  384. package/shared/patterns/form-elements/form-elements.d.ts +0 -58
  385. package/shared/picker-field/picker-field.form-associated.d.ts +0 -11
  386. package/shared/text-anchor.cjs +0 -38
  387. package/shared/text-anchor.js +0 -36
  388. package/shared/text-anchor.template.cjs +0 -35
  389. package/shared/text-anchor.template.js +0 -33
  390. package/shared/utils/applyMixinsWithObservables.d.ts +0 -1
  391. package/text-anchor/index.cjs +0 -17
  392. package/text-anchor/index.js +0 -15
@@ -1,16 +1,17 @@
1
1
  import { I as Icon, i as iconDefinition } from './definition28.js';
2
2
  import { B as Button, b as buttonDefinition } from './definition11.js';
3
- import { V as VividElement, a as attr, h as html, g as createRegisterFunction, i as defineVividComponent } from './vivid-element.js';
3
+ import { V as VividElement, a as attr, h as html, d as createRegisterFunction, f as defineVividComponent } from './vivid-element.js';
4
+ import { a as WithFeedback, f as feedbackMessageDefinition } from './mixins.js';
4
5
  import { D as DelegatesAria, d as delegateAria } from './delegates-aria.js';
5
- import { a as applyMixinsWithObservables } from './applyMixinsWithObservables.js';
6
6
  import { F as FormAssociated } from './form-associated.js';
7
+ import { W as WithErrorText } from './with-error-text.js';
8
+ import { F as FormElement } from './form-element.js';
7
9
  import { L as Localized } from './localized.js';
8
- import { a as FormElementHelperText, e as errorText, f as formElements, g as getFeedbackTemplate } from './form-elements.js';
9
10
  import { w as when } from './when.js';
10
11
  import { r as ref } from './ref.js';
11
12
  import { c as classNames } from './class-names.js';
12
13
 
13
- const styles = ":host{display:block;max-inline-size:400px}.base{display:flex;flex-direction:column;block-size:inherit;max-block-size:inherit}.control{display:flex;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;padding:16px;border:1px dashed var(--vvd-color-neutral-400);border-radius:8px;background-color:var(--vvd-color-cta-50);color:var(--vvd-color-neutral-600);cursor:pointer;font:var(--vvd-typography-base);gap:8px;inline-size:100%;min-block-size:52px;outline:none;transition:all .3s ease}.control:not(.size-expanded){min-block-size:52px}.control.size-expanded{min-block-size:120px}.control:focus-visible{--focus-stroke-gap-color: transparent;box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px))}.control:hover,.control:active,.control:focus-visible{background-color:var(--vvd-color-cta-100)}.main{pointer-events:none}.dz-preview{display:grid;box-sizing:border-box;padding:8px;border:1px solid var(--vvd-color-neutral-300);border-radius:8px;background-color:var(--file-picker-list-item-background-color, var(--vvd-color-canvas));grid-template-columns:1fr auto;grid-template-rows:auto auto;inline-size:100%}.dz-preview .dz-details{display:flex;min-width:0;flex-direction:column;max-inline-size:100%}.dz-preview .dz-details .dz-filename{overflow:hidden;color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base);text-overflow:ellipsis;white-space:nowrap}.dz-preview .dz-details .dz-size{color:var(--vvd-color-neutral-600);font:var(--vvd-typography-base-condensed)}.dz-preview .dz-error-message{display:flex;align-items:center;color:var(--vvd-color-alert-600);font:var(--vvd-typography-base-condensed-bold);gap:4px;margin-block-start:4px}.dz-preview:not(.dz-error) .dz-error-message{display:none}.dz-preview.dz-error{border:1px solid var(--vvd-color-alert-500);background-color:var(--vvd-color-alert-50)}.dz-preview.dz-error .dz-details .dz-size,.dz-preview.dz-error .dz-progress{display:none}.dz-preview .remove-btn{display:inline;align-self:center;grid-column:2/-1;grid-row:1/-1}.message{margin-block-start:4px;--_low-ink-color: var(--vvd-color-neutral-600)}.preview-list{--scrollbar-track-color: transparent;--scrollbar-thumb-color: color-mix(in srgb, var(--vvd-color-neutral-950), transparent 70%)}.preview-list{scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.preview-list ::-webkit-scrollbar{width:4px}.preview-list ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.preview-list ::-webkit-scrollbar-thumb{border:0;border-radius:4px;background-color:var(--scrollbar-fallback-track-color, var(--scrollbar-thumb-color))}.preview-list{display:flex;flex-direction:column;gap:12px;margin-block-start:12px;overflow-y:auto}.preview-list:empty{display:none}";
14
+ const styles = ":host{display:block;max-inline-size:400px}.base{display:flex;flex-direction:column;block-size:inherit;max-block-size:inherit;--_low-ink-color: var(--vvd-color-neutral-600)}.control-wrapper{display:flex;flex-direction:column;block-size:inherit;gap:4px;max-block-size:inherit}.control{display:flex;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;padding:16px;border:1px dashed var(--vvd-color-neutral-400);border-radius:8px;background-color:var(--vvd-color-cta-50);color:var(--vvd-color-neutral-600);cursor:pointer;font:var(--vvd-typography-base);gap:8px;inline-size:100%;min-block-size:52px;outline:none;transition:all .3s ease}.control:not(.size-expanded){min-block-size:52px}.control.size-expanded{min-block-size:120px}.control:focus-visible{--focus-stroke-gap-color: transparent;box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px))}.control:hover,.control:active,.control:focus-visible{background-color:var(--vvd-color-cta-100)}.main{pointer-events:none}.dz-preview{display:grid;box-sizing:border-box;padding:8px;border:1px solid var(--vvd-color-neutral-300);border-radius:8px;background-color:var(--file-picker-list-item-background-color, var(--vvd-color-canvas));grid-template-columns:1fr auto;grid-template-rows:auto auto;inline-size:100%}.dz-preview .dz-details{display:flex;min-width:0;flex-direction:column;max-inline-size:100%}.dz-preview .dz-details .dz-filename{overflow:hidden;color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base);text-overflow:ellipsis;white-space:nowrap}.dz-preview .dz-details .dz-size{color:var(--vvd-color-neutral-600);font:var(--vvd-typography-base-condensed)}.dz-preview .dz-error-message{display:flex;align-items:center;color:var(--vvd-color-alert-600);font:var(--vvd-typography-base-condensed-bold);gap:4px;margin-block-start:4px}.dz-preview:not(.dz-error) .dz-error-message{display:none}.dz-preview.dz-error{border:1px solid var(--vvd-color-alert-500);background-color:var(--vvd-color-alert-50)}.dz-preview.dz-error .dz-details .dz-size,.dz-preview.dz-error .dz-progress{display:none}.dz-preview .remove-btn{display:inline;align-self:center;grid-column:2/-1;grid-row:1/-1}.preview-list{--scrollbar-track-color: transparent;--scrollbar-thumb-color: color-mix(in srgb, var(--vvd-color-neutral-950), transparent 70%)}.preview-list{scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.preview-list ::-webkit-scrollbar{width:4px}.preview-list ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.preview-list ::-webkit-scrollbar-thumb{border:0;border-radius:4px;background-color:var(--scrollbar-fallback-track-color, var(--scrollbar-thumb-color))}.preview-list{display:flex;flex-direction:column;gap:12px;margin-block-start:12px;overflow-y:auto}.preview-list:empty{display:none}";
14
15
 
15
16
  var objectExtend = extend;
16
17
 
@@ -2138,34 +2139,15 @@ function $3ed269f2f0fb224b$var$__guardMethod__(obj, methodName, transform) {
2138
2139
  else return undefined;
2139
2140
  }
2140
2141
 
2141
- class _FilePicker extends VividElement {
2142
- }
2143
- class FormAssociatedFilePicker extends FormAssociated(_FilePicker) {
2144
- constructor() {
2145
- super(...arguments);
2146
- this.proxy = document.createElement("input");
2147
- }
2148
- }
2149
-
2150
2142
  var __defProp = Object.defineProperty;
2151
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
2152
- var __typeError = (msg) => {
2153
- throw TypeError(msg);
2154
- };
2155
2143
  var __decorateClass = (decorators, target, key, kind) => {
2156
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
2144
+ var result = void 0 ;
2157
2145
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
2158
2146
  if (decorator = decorators[i])
2159
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2160
- if (kind && result) __defProp(target, key, result);
2147
+ result = (decorator(target, key, result) ) || result;
2148
+ if (result) __defProp(target, key, result);
2161
2149
  return result;
2162
2150
  };
2163
- var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
2164
- var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
2165
- var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
2166
- var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
2167
- var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
2168
- var _dropzone, _FilePicker_instances, syncSingleFileState_fn, _localizeErrorMessage, _localizeFileSizeNumberAndUnits, addRemoveButtonToFilesPreview_fn, chooseFile_fn, updateHiddenFileInput_fn, keepOnlyNewestFile_fn, handleFilesChanged_fn, updateFormValue_fn, setValueToAFakePathLikeNativeInput_fn, getCustomValidationError_fn, formatNumbersInMessage_fn;
2169
2151
  const isFormAssociatedTryingToSetFormValueToFakePath = (value) => typeof value === "string";
2170
2152
  const generateFilePreviewTemplate = (buttonTag, iconTag, locale) => {
2171
2153
  return `<div class="dz-preview dz-file-preview">
@@ -2180,13 +2162,13 @@ const generateFilePreviewTemplate = (buttonTag, iconTag, locale) => {
2180
2162
  <${buttonTag} class="remove-btn" icon="delete-line" appearance="ghost-light" size="condensed" aria-label="${locale.filePicker.removeFileLabel}"></${buttonTag}>
2181
2163
  </div>`;
2182
2164
  };
2183
- let FilePicker = class extends DelegatesAria(
2184
- Localized(FormAssociatedFilePicker)
2165
+ class FilePicker extends WithFeedback(
2166
+ WithErrorText(
2167
+ FormElement(DelegatesAria(Localized(FormAssociated(VividElement))))
2168
+ )
2185
2169
  ) {
2186
2170
  constructor() {
2187
2171
  super();
2188
- __privateAdd(this, _FilePicker_instances);
2189
- __privateAdd(this, _dropzone);
2190
2172
  this.singleFile = false;
2191
2173
  this.maxFileSize = 256;
2192
2174
  /**
@@ -2206,7 +2188,7 @@ let FilePicker = class extends DelegatesAria(
2206
2188
  * Used internally to hold the tag that icon is registered at.
2207
2189
  */
2208
2190
  this.iconTag = "vwc-icon";
2209
- __privateAdd(this, _localizeErrorMessage, (file, message) => {
2191
+ this.#localizeErrorMessage = (file, message) => {
2210
2192
  if (file.previewElement) {
2211
2193
  file.previewElement.classList.add("dz-error");
2212
2194
  if (typeof message !== "string" && message.error) {
@@ -2215,15 +2197,21 @@ let FilePicker = class extends DelegatesAria(
2215
2197
  for (const node of file.previewElement.querySelectorAll(
2216
2198
  "[data-dz-errormessage]"
2217
2199
  )) {
2218
- node.textContent = __privateMethod(this, _FilePicker_instances, formatNumbersInMessage_fn).call(this, message);
2200
+ node.textContent = this.#formatNumbersInMessage(message);
2219
2201
  }
2220
2202
  }
2221
- });
2222
- __privateAdd(this, _localizeFileSizeNumberAndUnits, () => {
2223
- __privateGet(this, _dropzone).filesize = (size) => {
2224
- return __privateMethod(this, _FilePicker_instances, formatNumbersInMessage_fn).call(this, $3ed269f2f0fb224b$export$2e2bcd8739ae039.prototype.filesize.call(__privateGet(this, _dropzone), size));
2203
+ };
2204
+ this.#localizeFileSizeNumberAndUnits = () => {
2205
+ this.#dropzone.filesize = (size) => {
2206
+ return this.#formatNumbersInMessage(
2207
+ $3ed269f2f0fb224b$export$2e2bcd8739ae039.prototype.filesize.call(this.#dropzone, size)
2208
+ );
2225
2209
  };
2226
- });
2210
+ };
2211
+ /**
2212
+ * @internal
2213
+ */
2214
+ this.proxy = document.createElement("input");
2227
2215
  this.setFormValue = (value, state) => {
2228
2216
  if (isFormAssociatedTryingToSetFormValueToFakePath(value)) {
2229
2217
  return;
@@ -2232,13 +2220,14 @@ let FilePicker = class extends DelegatesAria(
2232
2220
  };
2233
2221
  $3ed269f2f0fb224b$export$2e2bcd8739ae039.autoDiscover = false;
2234
2222
  }
2223
+ #dropzone;
2235
2224
  /**
2236
2225
  * Files that have been added to the file picker and passed validation.
2237
2226
  *
2238
2227
  * @public
2239
2228
  */
2240
2229
  get files() {
2241
- return __privateGet(this, _dropzone)?.getAcceptedFiles() ?? [];
2230
+ return this.#dropzone?.getAcceptedFiles() ?? [];
2242
2231
  }
2243
2232
  /**
2244
2233
  * Files that have been rejected by the file picker for failing validation.
@@ -2246,45 +2235,71 @@ let FilePicker = class extends DelegatesAria(
2246
2235
  * @public
2247
2236
  */
2248
2237
  get rejectedFiles() {
2249
- return __privateGet(this, _dropzone)?.getRejectedFiles() ?? [];
2238
+ return this.#dropzone?.getRejectedFiles() ?? [];
2239
+ }
2240
+ #syncSingleFileState() {
2241
+ if (this.singleFile) {
2242
+ this.#dropzone?.hiddenFileInput?.removeAttribute("multiple");
2243
+ } else {
2244
+ this.#dropzone?.hiddenFileInput?.setAttribute("multiple", "multiple");
2245
+ }
2250
2246
  }
2251
2247
  singleFileChanged() {
2252
- __privateMethod(this, _FilePicker_instances, syncSingleFileState_fn).call(this);
2248
+ this.#syncSingleFileState();
2253
2249
  }
2254
2250
  maxFilesChanged(_oldValue, newValue) {
2255
- if (!__privateGet(this, _dropzone)) {
2251
+ if (!this.#dropzone) {
2256
2252
  return;
2257
2253
  }
2258
- __privateGet(this, _dropzone).options.maxFiles = newValue;
2259
- __privateMethod(this, _FilePicker_instances, updateHiddenFileInput_fn).call(this);
2254
+ this.#dropzone.options.maxFiles = newValue;
2255
+ this.#updateHiddenFileInput();
2260
2256
  }
2261
2257
  maxFileSizeChanged(_oldValue, newValue) {
2262
- if (!__privateGet(this, _dropzone)) {
2258
+ if (!this.#dropzone) {
2263
2259
  return;
2264
2260
  }
2265
- __privateGet(this, _dropzone).options.maxFilesize = newValue;
2261
+ this.#dropzone.options.maxFilesize = newValue;
2266
2262
  }
2267
2263
  acceptChanged(_oldValue, newValue) {
2268
- if (!__privateGet(this, _dropzone)) {
2264
+ if (!this.#dropzone) {
2269
2265
  return;
2270
2266
  }
2271
- __privateGet(this, _dropzone).options.acceptedFiles = newValue;
2267
+ this.#dropzone.options.acceptedFiles = newValue;
2272
2268
  }
2273
2269
  invalidFileTypeErrorChanged(_oldValue, newValue) {
2274
- if (__privateGet(this, _dropzone))
2275
- __privateGet(this, _dropzone).options.dictInvalidFileType = newValue || this.locale.filePicker.invalidFileTypeError;
2270
+ if (this.#dropzone)
2271
+ this.#dropzone.options.dictInvalidFileType = newValue || this.locale.filePicker.invalidFileTypeError;
2276
2272
  }
2277
2273
  maxFilesExceededErrorChanged(_oldValue, newValue) {
2278
- if (__privateGet(this, _dropzone))
2279
- __privateGet(this, _dropzone).options.dictMaxFilesExceeded = newValue || this.locale.filePicker.maxFilesExceededError;
2274
+ if (this.#dropzone)
2275
+ this.#dropzone.options.dictMaxFilesExceeded = newValue || this.locale.filePicker.maxFilesExceededError;
2280
2276
  }
2281
2277
  fileTooBigErrorChanged(_oldValue, newValue) {
2282
- if (__privateGet(this, _dropzone))
2283
- __privateGet(this, _dropzone).options.dictFileTooBig = newValue || this.locale.filePicker.fileTooBigError;
2278
+ if (this.#dropzone)
2279
+ this.#dropzone.options.dictFileTooBig = newValue || this.locale.filePicker.fileTooBigError;
2284
2280
  }
2285
2281
  nameChanged(previous, next) {
2286
2282
  super.nameChanged(previous, next);
2287
- __privateMethod(this, _FilePicker_instances, updateFormValue_fn).call(this);
2283
+ this.#updateFormValue();
2284
+ }
2285
+ #localizeErrorMessage;
2286
+ #localizeFileSizeNumberAndUnits;
2287
+ #addRemoveButtonToFilesPreview() {
2288
+ this.#dropzone.on("addedfiles", (files) => {
2289
+ for (const file of files) {
2290
+ if (file.previewElement) {
2291
+ const removeButton = file.previewElement.querySelector(
2292
+ ".remove-btn"
2293
+ );
2294
+ removeButton.addEventListener("click", (e) => {
2295
+ e.preventDefault();
2296
+ e.stopPropagation();
2297
+ this.#dropzone.removeFile(file);
2298
+ });
2299
+ }
2300
+ }
2301
+ this.#handleFilesChanged();
2302
+ });
2288
2303
  }
2289
2304
  connectedCallback() {
2290
2305
  super.connectedCallback();
@@ -2294,7 +2309,7 @@ let FilePicker = class extends DelegatesAria(
2294
2309
  const previewList = this.shadowRoot.querySelector(
2295
2310
  ".preview-list"
2296
2311
  );
2297
- __privateSet(this, _dropzone, new $3ed269f2f0fb224b$export$2e2bcd8739ae039(control, {
2312
+ this.#dropzone = new $3ed269f2f0fb224b$export$2e2bcd8739ae039(control, {
2298
2313
  url: "/",
2299
2314
  // dummy url, we do not use dropzone's upload functionality
2300
2315
  maxFiles: this.maxFiles ?? null,
@@ -2312,18 +2327,18 @@ let FilePicker = class extends DelegatesAria(
2312
2327
  dictInvalidFileType: this.invalidFileTypeError || this.locale.filePicker.invalidFileTypeError,
2313
2328
  dictMaxFilesExceeded: this.maxFilesExceededError || this.locale.filePicker.maxFilesExceededError,
2314
2329
  dictFileTooBig: this.fileTooBigError || this.locale.filePicker.fileTooBigError,
2315
- error: __privateGet(this, _localizeErrorMessage)
2316
- }));
2317
- __privateGet(this, _localizeFileSizeNumberAndUnits).call(this);
2318
- __privateMethod(this, _FilePicker_instances, addRemoveButtonToFilesPreview_fn).call(this);
2319
- __privateGet(this, _dropzone).on("removedfile", () => {
2320
- __privateMethod(this, _FilePicker_instances, handleFilesChanged_fn).call(this);
2330
+ error: this.#localizeErrorMessage
2321
2331
  });
2322
- __privateMethod(this, _FilePicker_instances, syncSingleFileState_fn).call(this);
2332
+ this.#localizeFileSizeNumberAndUnits();
2333
+ this.#addRemoveButtonToFilesPreview();
2334
+ this.#dropzone.on("removedfile", () => {
2335
+ this.#handleFilesChanged();
2336
+ });
2337
+ this.#syncSingleFileState();
2323
2338
  }
2324
2339
  disconnectedCallback() {
2325
2340
  super.disconnectedCallback();
2326
- __privateGet(this, _dropzone).destroy();
2341
+ this.#dropzone.destroy();
2327
2342
  }
2328
2343
  /**
2329
2344
  * Used internally to set the button tag.
@@ -2344,137 +2359,104 @@ let FilePicker = class extends DelegatesAria(
2344
2359
  */
2345
2360
  handleKeydown(e) {
2346
2361
  if (e.key === "Enter" || e.key === " ") {
2347
- __privateMethod(this, _FilePicker_instances, chooseFile_fn).call(this);
2362
+ this.#chooseFile();
2348
2363
  }
2349
2364
  return true;
2350
2365
  }
2366
+ #chooseFile() {
2367
+ if (this.#dropzone.hiddenFileInput) {
2368
+ this.#dropzone.hiddenFileInput.click();
2369
+ }
2370
+ }
2371
+ #updateHiddenFileInput() {
2372
+ this.#dropzone.hiddenFileInput.dispatchEvent(
2373
+ new Event("change", { bubbles: false })
2374
+ );
2375
+ }
2376
+ #keepOnlyNewestFile() {
2377
+ for (let i = 0; i < this.files.length - 1; i++) {
2378
+ this.#dropzone.removeFile(this.files[i]);
2379
+ }
2380
+ }
2381
+ #handleFilesChanged() {
2382
+ if (this.singleFile && this.files.length >= 1) {
2383
+ this.#keepOnlyNewestFile();
2384
+ }
2385
+ this.$emit("change");
2386
+ this.#updateFormValue();
2387
+ this.validate();
2388
+ requestAnimationFrame(() => this.#syncSingleFileState());
2389
+ }
2390
+ #updateFormValue() {
2391
+ const files = this.files;
2392
+ if (!this.name) {
2393
+ this.setFormValue(null);
2394
+ } else {
2395
+ const formData = new FormData();
2396
+ for (const file of files) {
2397
+ formData.append(this.name, file);
2398
+ }
2399
+ this.setFormValue(formData);
2400
+ }
2401
+ this.#setValueToAFakePathLikeNativeInput();
2402
+ }
2403
+ #setValueToAFakePathLikeNativeInput() {
2404
+ this.value = this.files.length > 0 ? `C:\\fakepath\\${this.files[0].name}` : "";
2405
+ }
2406
+ #getCustomValidationError() {
2407
+ if (this.rejectedFiles.length > 0) {
2408
+ return this.locale.filePicker.invalidFilesError;
2409
+ }
2410
+ return null;
2411
+ }
2351
2412
  /** {@inheritDoc (FormAssociated:interface).validate} */
2352
2413
  validate() {
2353
2414
  if (this.proxy) {
2354
- this.proxy.setCustomValidity(__privateMethod(this, _FilePicker_instances, getCustomValidationError_fn).call(this) ?? "");
2415
+ this.proxy.setCustomValidity(this.#getCustomValidationError() ?? "");
2355
2416
  }
2356
2417
  super.validate(this.control);
2357
2418
  }
2358
2419
  formResetCallback() {
2359
2420
  super.formResetCallback();
2360
- __privateGet(this, _dropzone).removeAllFiles();
2421
+ this.#dropzone.removeAllFiles();
2422
+ }
2423
+ #formatNumbersInMessage(message) {
2424
+ if (this.locale.common.useCommaAsDecimalSeparator) {
2425
+ return message.replace(/(\d+)\.(\d+)/g, "$1,$2");
2426
+ }
2427
+ return message;
2361
2428
  }
2362
2429
  /**
2363
2430
  * Removes all files from the File Picker.
2364
2431
  */
2365
2432
  removeAllFiles() {
2366
- __privateGet(this, _dropzone)?.removeAllFiles();
2367
- }
2368
- };
2369
- _dropzone = new WeakMap();
2370
- _FilePicker_instances = new WeakSet();
2371
- syncSingleFileState_fn = function() {
2372
- if (this.singleFile) {
2373
- __privateGet(this, _dropzone)?.hiddenFileInput?.removeAttribute("multiple");
2374
- } else {
2375
- __privateGet(this, _dropzone)?.hiddenFileInput?.setAttribute("multiple", "multiple");
2376
- }
2377
- };
2378
- _localizeErrorMessage = new WeakMap();
2379
- _localizeFileSizeNumberAndUnits = new WeakMap();
2380
- addRemoveButtonToFilesPreview_fn = function() {
2381
- __privateGet(this, _dropzone).on("addedfiles", (files) => {
2382
- for (const file of files) {
2383
- if (file.previewElement) {
2384
- const removeButton = file.previewElement.querySelector(
2385
- ".remove-btn"
2386
- );
2387
- removeButton.addEventListener("click", (e) => {
2388
- e.preventDefault();
2389
- e.stopPropagation();
2390
- __privateGet(this, _dropzone).removeFile(file);
2391
- });
2392
- }
2393
- }
2394
- __privateMethod(this, _FilePicker_instances, handleFilesChanged_fn).call(this);
2395
- });
2396
- };
2397
- chooseFile_fn = function() {
2398
- if (__privateGet(this, _dropzone).hiddenFileInput) {
2399
- __privateGet(this, _dropzone).hiddenFileInput.click();
2400
- }
2401
- };
2402
- updateHiddenFileInput_fn = function() {
2403
- __privateGet(this, _dropzone).hiddenFileInput.dispatchEvent(
2404
- new Event("change", { bubbles: false })
2405
- );
2406
- };
2407
- keepOnlyNewestFile_fn = function() {
2408
- for (let i = 0; i < this.files.length - 1; i++) {
2409
- __privateGet(this, _dropzone).removeFile(this.files[i]);
2410
- }
2411
- };
2412
- handleFilesChanged_fn = function() {
2413
- if (this.singleFile && this.files.length >= 1) {
2414
- __privateMethod(this, _FilePicker_instances, keepOnlyNewestFile_fn).call(this);
2415
- }
2416
- this.$emit("change");
2417
- __privateMethod(this, _FilePicker_instances, updateFormValue_fn).call(this);
2418
- this.validate();
2419
- requestAnimationFrame(() => __privateMethod(this, _FilePicker_instances, syncSingleFileState_fn).call(this));
2420
- };
2421
- updateFormValue_fn = function() {
2422
- const files = this.files;
2423
- if (!this.name) {
2424
- this.setFormValue(null);
2425
- } else {
2426
- const formData = new FormData();
2427
- for (const file of files) {
2428
- formData.append(this.name, file);
2429
- }
2430
- this.setFormValue(formData);
2431
- }
2432
- __privateMethod(this, _FilePicker_instances, setValueToAFakePathLikeNativeInput_fn).call(this);
2433
- };
2434
- setValueToAFakePathLikeNativeInput_fn = function() {
2435
- this.value = this.files.length > 0 ? `C:\\fakepath\\${this.files[0].name}` : "";
2436
- };
2437
- getCustomValidationError_fn = function() {
2438
- if (this.rejectedFiles.length > 0) {
2439
- return this.locale.filePicker.invalidFilesError;
2433
+ this.#dropzone?.removeAllFiles();
2440
2434
  }
2441
- return null;
2442
- };
2443
- formatNumbersInMessage_fn = function(message) {
2444
- if (this.locale.common.useCommaAsDecimalSeparator) {
2445
- return message.replace(/(\d+)\.(\d+)/g, "$1,$2");
2446
- }
2447
- return message;
2448
- };
2435
+ }
2449
2436
  __decorateClass([
2450
2437
  attr({ attribute: "single-file", mode: "boolean" })
2451
- ], FilePicker.prototype, "singleFile", 2);
2438
+ ], FilePicker.prototype, "singleFile");
2452
2439
  __decorateClass([
2453
2440
  attr({ attribute: "max-files" })
2454
- ], FilePicker.prototype, "maxFiles", 2);
2441
+ ], FilePicker.prototype, "maxFiles");
2455
2442
  __decorateClass([
2456
2443
  attr({ mode: "fromView", attribute: "max-file-size" })
2457
- ], FilePicker.prototype, "maxFileSize", 2);
2444
+ ], FilePicker.prototype, "maxFileSize");
2458
2445
  __decorateClass([
2459
2446
  attr
2460
- ], FilePicker.prototype, "accept", 2);
2447
+ ], FilePicker.prototype, "accept");
2461
2448
  __decorateClass([
2462
2449
  attr
2463
- ], FilePicker.prototype, "size", 2);
2450
+ ], FilePicker.prototype, "size");
2464
2451
  __decorateClass([
2465
2452
  attr({ attribute: "invalid-file-type-error" })
2466
- ], FilePicker.prototype, "invalidFileTypeError", 2);
2453
+ ], FilePicker.prototype, "invalidFileTypeError");
2467
2454
  __decorateClass([
2468
2455
  attr({ attribute: "max-files-exceeded-error" })
2469
- ], FilePicker.prototype, "maxFilesExceededError", 2);
2456
+ ], FilePicker.prototype, "maxFilesExceededError");
2470
2457
  __decorateClass([
2471
2458
  attr({ attribute: "file-too-big-error" })
2472
- ], FilePicker.prototype, "fileTooBigError", 2);
2473
- FilePicker = __decorateClass([
2474
- errorText,
2475
- formElements
2476
- ], FilePicker);
2477
- applyMixinsWithObservables(FilePicker, FormElementHelperText);
2459
+ ], FilePicker.prototype, "fileTooBigError");
2478
2460
 
2479
2461
  const getClasses = ({ size }) => classNames("control", "dz-default", "dz-message", [
2480
2462
  `size-${size}`,
@@ -2491,18 +2473,21 @@ const FilePickerTemplate = (context) => {
2491
2473
  (x) => x.label,
2492
2474
  html`<label>${(x) => x.label}</label>`
2493
2475
  )}
2494
- <div
2495
- ${ref("control")}
2496
- class="${getClasses}"
2497
- tabindex="0"
2498
- @keydown="${(x, c) => x.handleKeydown(c.event)}"
2499
- ${delegateAria({
2476
+ <div class="control-wrapper">
2477
+ <div
2478
+ ${ref("control")}
2479
+ class="${getClasses}"
2480
+ tabindex="0"
2481
+ @keydown="${(x, c) => x.handleKeydown(c.event)}"
2482
+ aria-describedby="${(x) => x._feedbackDescribedBy}"
2483
+ ${delegateAria({
2500
2484
  role: "button"
2501
2485
  })}
2502
- >
2503
- <slot class="main"></slot>
2486
+ >
2487
+ <slot class="main"></slot>
2488
+ </div>
2489
+ ${(x) => x._getFeedbackTemplate(context)}
2504
2490
  </div>
2505
- ${getFeedbackTemplate(context)}
2506
2491
  <div class="preview-list"></div>
2507
2492
  </div>
2508
2493
  `;
@@ -2512,7 +2497,7 @@ const filePickerDefinition = defineVividComponent(
2512
2497
  "file-picker",
2513
2498
  FilePicker,
2514
2499
  FilePickerTemplate,
2515
- [iconDefinition, buttonDefinition],
2500
+ [iconDefinition, buttonDefinition, feedbackMessageDefinition],
2516
2501
  {
2517
2502
  styles,
2518
2503
  shadowOptions: {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const definition = require('./definition64.cjs');
3
+ const definition = require('./definition65.cjs');
4
4
  const vividElement = require('./vivid-element.cjs');
5
5
  const delegatesAria = require('./delegates-aria.cjs');
6
6
  const classNames = require('./class-names.cjs');
@@ -1,5 +1,5 @@
1
- import { E as Elevation, e as elevationDefinition } from './definition64.js';
2
- import { V as VividElement, a as attr, h as html, g as createRegisterFunction, i as defineVividComponent } from './vivid-element.js';
1
+ import { E as Elevation, e as elevationDefinition } from './definition65.js';
2
+ import { V as VividElement, a as attr, h as html, d as createRegisterFunction, f as defineVividComponent } from './vivid-element.js';
3
3
  import { D as DelegatesAria, d as delegateAria } from './delegates-aria.js';
4
4
  import { c as classNames } from './class-names.js';
5
5
 
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const vividElement = require('./vivid-element.cjs');
4
+ const definition = require('./definition66.cjs');
4
5
  const _has = require('./_has.cjs');
5
6
  const classNames = require('./class-names.cjs');
6
7
  const when = require('./when.cjs');
@@ -243,6 +244,9 @@ __decorateClass([
243
244
  __decorateClass([
244
245
  vividElement.observable
245
246
  ], Icon.prototype, "iconLoaded", 2);
247
+ __decorateClass([
248
+ vividElement.attr
249
+ ], Icon.prototype, "label", 2);
246
250
  __decorateClass([
247
251
  vividElement.attr
248
252
  ], Icon.prototype, "name", 2);
@@ -255,24 +259,35 @@ const getClasses = ({ connotation, size }) => classNames.classNames(
255
259
  [`connotation-${connotation}`, Boolean(connotation)],
256
260
  [`size-${size}`, typeof size === "number"]
257
261
  );
258
- const iconTemplate = vividElement.html`
259
- <figure class="${getClasses}" ?aria-busy="${(x) => !x.iconLoaded}">
260
- <slot>
261
- ${when.when(
262
- (x) => !x.iconLoaded,
263
- vividElement.html`<img alt="${(x) => x.name}" src="${(x) => x.iconUrl}" />`
264
- )}
265
- ${when.when(
266
- (x) => x.iconLoaded && x._svg,
267
- (x) => vividElement.html`${x._svg}`
268
- )}
269
- </slot>
270
- </figure>
271
- `;
262
+ const iconTemplate = (context) => {
263
+ const visuallyHiddenTag = context.tagFor(definition.VisuallyHidden);
264
+ const isDecorative = (x) => !x.label || x.label.trim().length === 0;
265
+ return vividElement.html`
266
+ <figure class="${getClasses}" ?aria-hidden="${(x) => isDecorative(x)}" ?aria-busy="${(x) => !x.iconLoaded}">
267
+ <slot>
268
+ ${when.when(
269
+ (x) => !x.iconLoaded,
270
+ vividElement.html`<img alt="${(x) => x.name}" src="${(x) => x.iconUrl}" />`
271
+ )}
272
+ ${when.when(
273
+ (x) => x.iconLoaded && x._svg,
274
+ (x) => vividElement.html`${x._svg}`
275
+ )}
276
+ </slot>
277
+ <${visuallyHiddenTag} class="label">${(x) => x.label}</${visuallyHiddenTag}>
278
+ </figure>
279
+ `;
280
+ };
272
281
 
273
- const iconDefinition = vividElement.defineVividComponent("icon", Icon, iconTemplate, [], {
274
- styles
275
- });
282
+ const iconDefinition = vividElement.defineVividComponent(
283
+ "icon",
284
+ Icon,
285
+ iconTemplate,
286
+ [definition.visuallyHiddenDefinition],
287
+ {
288
+ styles
289
+ }
290
+ );
276
291
  const registerIcon = vividElement.createRegisterFunction(iconDefinition);
277
292
 
278
293
  exports.Icon = Icon;
@@ -1,4 +1,5 @@
1
- import { V as VividElement, a as attr, o as observable, v as volatile, h as html, g as createRegisterFunction, i as defineVividComponent } from './vivid-element.js';
1
+ import { V as VividElement, a as attr, o as observable, v as volatile, h as html, d as createRegisterFunction, f as defineVividComponent } from './vivid-element.js';
2
+ import { V as VisuallyHidden, v as visuallyHiddenDefinition } from './definition66.js';
2
3
  import { _ as _curry1, a as _curry2, b as _has } from './_has.js';
3
4
  import { c as classNames } from './class-names.js';
4
5
  import { w as when } from './when.js';
@@ -241,6 +242,9 @@ __decorateClass([
241
242
  __decorateClass([
242
243
  observable
243
244
  ], Icon.prototype, "iconLoaded", 2);
245
+ __decorateClass([
246
+ attr
247
+ ], Icon.prototype, "label", 2);
244
248
  __decorateClass([
245
249
  attr
246
250
  ], Icon.prototype, "name", 2);
@@ -253,24 +257,35 @@ const getClasses = ({ connotation, size }) => classNames(
253
257
  [`connotation-${connotation}`, Boolean(connotation)],
254
258
  [`size-${size}`, typeof size === "number"]
255
259
  );
256
- const iconTemplate = html`
257
- <figure class="${getClasses}" ?aria-busy="${(x) => !x.iconLoaded}">
258
- <slot>
259
- ${when(
260
- (x) => !x.iconLoaded,
261
- html`<img alt="${(x) => x.name}" src="${(x) => x.iconUrl}" />`
262
- )}
263
- ${when(
264
- (x) => x.iconLoaded && x._svg,
265
- (x) => html`${x._svg}`
266
- )}
267
- </slot>
268
- </figure>
269
- `;
260
+ const iconTemplate = (context) => {
261
+ const visuallyHiddenTag = context.tagFor(VisuallyHidden);
262
+ const isDecorative = (x) => !x.label || x.label.trim().length === 0;
263
+ return html`
264
+ <figure class="${getClasses}" ?aria-hidden="${(x) => isDecorative(x)}" ?aria-busy="${(x) => !x.iconLoaded}">
265
+ <slot>
266
+ ${when(
267
+ (x) => !x.iconLoaded,
268
+ html`<img alt="${(x) => x.name}" src="${(x) => x.iconUrl}" />`
269
+ )}
270
+ ${when(
271
+ (x) => x.iconLoaded && x._svg,
272
+ (x) => html`${x._svg}`
273
+ )}
274
+ </slot>
275
+ <${visuallyHiddenTag} class="label">${(x) => x.label}</${visuallyHiddenTag}>
276
+ </figure>
277
+ `;
278
+ };
270
279
 
271
- const iconDefinition = defineVividComponent("icon", Icon, iconTemplate, [], {
272
- styles
273
- });
280
+ const iconDefinition = defineVividComponent(
281
+ "icon",
282
+ Icon,
283
+ iconTemplate,
284
+ [visuallyHiddenDefinition],
285
+ {
286
+ styles
287
+ }
288
+ );
274
289
  const registerIcon = createRegisterFunction(iconDefinition);
275
290
 
276
291
  export { Icon as I, iconDefinition as i, memoizeWith as m, registerIcon as r };
@@ -1,4 +1,4 @@
1
- import { V as VividElement, a as attr, h as html, g as createRegisterFunction, i as defineVividComponent } from './vivid-element.js';
1
+ import { V as VividElement, a as attr, h as html, d as createRegisterFunction, f as defineVividComponent } from './vivid-element.js';
2
2
  import { c as classNames } from './class-names.js';
3
3
 
4
4
  var __defProp = Object.defineProperty;