xv-webcomponents 0.1.43 → 0.1.44

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 (310) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +129 -129
  3. package/dist/cjs/app-globals-V2Kpy_OQ.js +8 -0
  4. package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -0
  5. package/dist/cjs/index-BE3kw7I4.js +36 -0
  6. package/dist/cjs/index-BE3kw7I4.js.map +1 -0
  7. package/dist/cjs/index-MLh9SbX2.js +1917 -0
  8. package/dist/cjs/index-MLh9SbX2.js.map +1 -0
  9. package/dist/cjs/index.cjs.js +10 -0
  10. package/dist/cjs/index.cjs.js.map +1 -0
  11. package/dist/cjs/loader.cjs.js +16 -0
  12. package/dist/cjs/loader.cjs.js.map +1 -0
  13. package/dist/cjs/xv-accordion-v2_34.cjs.entry.js +3510 -0
  14. package/dist/cjs/xv-accordion-v2_34.cjs.entry.js.map +1 -0
  15. package/dist/cjs/xv-breadcrumbs-v2.cjs.entry.js +20 -0
  16. package/dist/cjs/xv-breadcrumbs-v2.cjs.entry.js.map +1 -0
  17. package/dist/cjs/xv-breadcrumbs-v2.entry.cjs.js.map +1 -0
  18. package/dist/cjs/xv-webcomponents.cjs.js +28 -0
  19. package/dist/cjs/xv-webcomponents.cjs.js.map +1 -0
  20. package/dist/collection/assets/fonts/fontawesome5/fa-brands-400.svg +3717 -0
  21. package/dist/collection/assets/fonts/fontawesome5/fa-duotone-900.svg +15326 -0
  22. package/dist/collection/assets/fonts/fontawesome5/fa-light-300.svg +12420 -0
  23. package/dist/collection/assets/fonts/fontawesome5/fa-regular-400.svg +11323 -0
  24. package/dist/collection/assets/fonts/fontawesome5/fa-solid-900.svg +9653 -0
  25. package/dist/collection/collection-manifest.json +46 -0
  26. package/dist/collection/components/xv-accordion/xv-accordion.css +3 -0
  27. package/dist/collection/components/xv-accordion/xv-accordion.js +163 -0
  28. package/dist/collection/components/xv-accordion/xv-accordion.js.map +1 -0
  29. package/dist/collection/components/xv-accordion-item/xv-accordion-item.css +68 -0
  30. package/dist/collection/components/xv-accordion-item/xv-accordion-item.js +132 -0
  31. package/dist/collection/components/xv-accordion-item/xv-accordion-item.js.map +1 -0
  32. package/dist/collection/components/xv-breadcrumbs/xv-breadcrumbs.css +3 -0
  33. package/dist/collection/components/xv-breadcrumbs/xv-breadcrumbs.js +19 -0
  34. package/dist/collection/components/xv-breadcrumbs/xv-breadcrumbs.js.map +1 -0
  35. package/dist/collection/components/xv-button/xv-button-v2.css +173 -0
  36. package/dist/collection/components/xv-button/xv-button.js +229 -0
  37. package/dist/collection/components/xv-button/xv-button.js.map +1 -0
  38. package/dist/collection/components/xv-card/xv-card.css +63 -0
  39. package/dist/collection/components/xv-card/xv-card.js +122 -0
  40. package/dist/collection/components/xv-card/xv-card.js.map +1 -0
  41. package/dist/collection/components/xv-checkbox/xv-checkbox.css +138 -0
  42. package/dist/collection/components/xv-checkbox/xv-checkbox.js +402 -0
  43. package/dist/collection/components/xv-checkbox/xv-checkbox.js.map +1 -0
  44. package/dist/collection/components/xv-data-table/_vars.js +3 -0
  45. package/dist/collection/components/xv-data-table/_vars.js.map +1 -0
  46. package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.css +90 -0
  47. package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.js +182 -0
  48. package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.js.map +1 -0
  49. package/dist/collection/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.css +7 -0
  50. package/dist/collection/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.js +101 -0
  51. package/dist/collection/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.js.map +1 -0
  52. package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.css +71 -0
  53. package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.js +354 -0
  54. package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.js.map +1 -0
  55. package/dist/collection/components/xv-data-table/xv-data-table.css +104 -0
  56. package/dist/collection/components/xv-data-table/xv-data-table.js +114 -0
  57. package/dist/collection/components/xv-data-table/xv-data-table.js.map +1 -0
  58. package/dist/collection/components/xv-dropdown/_vars.js +2 -0
  59. package/dist/collection/components/xv-dropdown/_vars.js.map +1 -0
  60. package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.css +14 -0
  61. package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js +153 -0
  62. package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js.map +1 -0
  63. package/dist/collection/components/xv-dropdown/xv-dropdown.css +232 -0
  64. package/dist/collection/components/xv-dropdown/xv-dropdown.js +443 -0
  65. package/dist/collection/components/xv-dropdown/xv-dropdown.js.map +1 -0
  66. package/dist/collection/components/xv-file-uploader/_vars.js +6 -0
  67. package/dist/collection/components/xv-file-uploader/_vars.js.map +1 -0
  68. package/dist/collection/components/xv-file-uploader/xv-file-uploader.css +136 -0
  69. package/dist/collection/components/xv-file-uploader/xv-file-uploader.js +448 -0
  70. package/dist/collection/components/xv-file-uploader/xv-file-uploader.js.map +1 -0
  71. package/dist/collection/components/xv-footer/xv-footer.css +230 -0
  72. package/dist/collection/components/xv-footer/xv-footer.js +37 -0
  73. package/dist/collection/components/xv-footer/xv-footer.js.map +1 -0
  74. package/dist/collection/components/xv-header/xv-header.css +22587 -0
  75. package/dist/collection/components/xv-header/xv-header.js +54 -0
  76. package/dist/collection/components/xv-header/xv-header.js.map +1 -0
  77. package/dist/collection/components/xv-link/xv-link.css +67 -0
  78. package/dist/collection/components/xv-link/xv-link.js +132 -0
  79. package/dist/collection/components/xv-link/xv-link.js.map +1 -0
  80. package/dist/collection/components/xv-loader/xv-loader.css +65 -0
  81. package/dist/collection/components/xv-loader/xv-loader.js +106 -0
  82. package/dist/collection/components/xv-loader/xv-loader.js.map +1 -0
  83. package/dist/collection/components/xv-login-modal/xv-login-modal.css +22575 -0
  84. package/dist/collection/components/xv-login-modal/xv-login-modal.js +146 -0
  85. package/dist/collection/components/xv-login-modal/xv-login-modal.js.map +1 -0
  86. package/dist/collection/components/xv-modal/xv-modal.css +102 -0
  87. package/dist/collection/components/xv-modal/xv-modal.js +226 -0
  88. package/dist/collection/components/xv-modal/xv-modal.js.map +1 -0
  89. package/dist/collection/components/xv-notification/_vars.js +8 -0
  90. package/dist/collection/components/xv-notification/_vars.js.map +1 -0
  91. package/dist/collection/components/xv-notification/xv-notification.css +113 -0
  92. package/dist/collection/components/xv-notification/xv-notification.js +118 -0
  93. package/dist/collection/components/xv-notification/xv-notification.js.map +1 -0
  94. package/dist/collection/components/xv-number-input/xv-number-input.css +128 -0
  95. package/dist/collection/components/xv-number-input/xv-number-input.js +373 -0
  96. package/dist/collection/components/xv-number-input/xv-number-input.js.map +1 -0
  97. package/dist/collection/components/xv-overflow-menu/_vars.js +6 -0
  98. package/dist/collection/components/xv-overflow-menu/_vars.js.map +1 -0
  99. package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.css +45 -0
  100. package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js +137 -0
  101. package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js.map +1 -0
  102. package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.css +105 -0
  103. package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js +202 -0
  104. package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js.map +1 -0
  105. package/dist/{xv-webcomponents/_vars-IZ3lIQzL.js → collection/components/xv-progress-indicator/_vars.js} +3 -7
  106. package/dist/collection/components/xv-progress-indicator/_vars.js.map +1 -0
  107. package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.css +96 -0
  108. package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.js +54 -0
  109. package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.js.map +1 -0
  110. package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.css +45 -0
  111. package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js +157 -0
  112. package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js.map +1 -0
  113. package/dist/collection/components/xv-table/_vars.js +3 -0
  114. package/dist/collection/components/xv-table/_vars.js.map +1 -0
  115. package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.css +93 -0
  116. package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js +160 -0
  117. package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js.map +1 -0
  118. package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.css +58 -0
  119. package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js +76 -0
  120. package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js.map +1 -0
  121. package/dist/collection/components/xv-table/xv-table-row/xv-table-row.css +39 -0
  122. package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js +333 -0
  123. package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js.map +1 -0
  124. package/dist/collection/components/xv-table/xv-table.css +137 -0
  125. package/dist/collection/components/xv-table/xv-table.js +159 -0
  126. package/dist/collection/components/xv-table/xv-table.js.map +1 -0
  127. package/dist/collection/components/xv-tabs/_vars.js +11 -0
  128. package/dist/collection/components/xv-tabs/_vars.js.map +1 -0
  129. package/dist/collection/components/xv-tabs/xv-tab/xv-tab.css +10 -0
  130. package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js +106 -0
  131. package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js.map +1 -0
  132. package/dist/collection/components/xv-tabs/xv-tabs.css +139 -0
  133. package/dist/collection/components/xv-tabs/xv-tabs.js +221 -0
  134. package/dist/collection/components/xv-tabs/xv-tabs.js.map +1 -0
  135. package/dist/collection/components/xv-tag/xv-tag.css +97 -0
  136. package/dist/collection/components/xv-tag/xv-tag.js +158 -0
  137. package/dist/collection/components/xv-tag/xv-tag.js.map +1 -0
  138. package/dist/collection/components/xv-text-input/xv-text-input.css +144 -0
  139. package/dist/collection/components/xv-text-input/xv-text-input.js +324 -0
  140. package/dist/collection/components/xv-text-input/xv-text-input.js.map +1 -0
  141. package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.css +95 -0
  142. package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.js +201 -0
  143. package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.js.map +1 -0
  144. package/dist/collection/components/xv-tooltip/xv-tooltip.css +43 -0
  145. package/dist/collection/components/xv-tooltip/xv-tooltip.js +114 -0
  146. package/dist/collection/components/xv-tooltip/xv-tooltip.js.map +1 -0
  147. package/dist/collection/index.js +11 -0
  148. package/dist/collection/index.js.map +1 -0
  149. package/dist/collection/scss/xv/images/xv-sprite.svg +1 -0
  150. package/dist/collection/scss/xv/sprite/images/xv-sprite.svg +1 -0
  151. package/dist/collection/types/enum.js +15 -0
  152. package/dist/collection/types/enum.js.map +1 -0
  153. package/dist/{xv-webcomponents/utils-1tk8kwKx.js → collection/utils/utils.js} +7 -11
  154. package/dist/collection/utils/utils.js.map +1 -0
  155. package/dist/esm/app-globals-DQuL1Twl.js +6 -0
  156. package/dist/esm/app-globals-DQuL1Twl.js.map +1 -0
  157. package/dist/esm/index-DLYJiP99.js +1907 -0
  158. package/dist/esm/index-DLYJiP99.js.map +1 -0
  159. package/dist/esm/index-NvoCloOY.js +31 -0
  160. package/dist/esm/index-NvoCloOY.js.map +1 -0
  161. package/dist/esm/index.js +4 -0
  162. package/dist/esm/index.js.map +1 -0
  163. package/dist/esm/loader.js +14 -0
  164. package/dist/esm/loader.js.map +1 -0
  165. package/dist/esm/xv-accordion-v2_34.entry.js +3475 -0
  166. package/dist/esm/xv-accordion-v2_34.entry.js.map +1 -0
  167. package/dist/esm/xv-breadcrumbs-v2.entry.js +18 -0
  168. package/dist/esm/xv-breadcrumbs-v2.entry.js.map +1 -0
  169. package/dist/esm/xv-webcomponents.js +24 -0
  170. package/dist/esm/xv-webcomponents.js.map +1 -0
  171. package/dist/index.cjs.js +1 -0
  172. package/dist/index.js +1 -0
  173. package/dist/types/components/xv-button/xv-button.d.ts +21 -12
  174. package/dist/types/components/xv-data-table/_vars.d.ts +11 -0
  175. package/dist/types/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.d.ts +13 -0
  176. package/dist/types/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.d.ts +9 -0
  177. package/dist/types/components/xv-data-table/xv-data-table-row/xv-data-table-row.d.ts +25 -0
  178. package/dist/types/components/xv-data-table/xv-data-table.d.ts +9 -0
  179. package/dist/types/components/xv-dropdown/xv-dropdown.d.ts +1 -0
  180. package/dist/types/components/xv-file-uploader/_vars.d.ts +4 -0
  181. package/dist/types/components/xv-file-uploader/xv-file-uploader.d.ts +36 -0
  182. package/dist/types/components/xv-header/xv-header.d.ts +0 -2
  183. package/dist/types/components/xv-number-input/xv-number-input.d.ts +26 -0
  184. package/dist/types/components/xv-table/_vars.d.ts +1 -5
  185. package/dist/types/components/xv-table/xv-table-cell/xv-table-cell.d.ts +2 -1
  186. package/dist/types/components/xv-text-input/xv-text-input.d.ts +10 -11
  187. package/dist/types/components/xv-toggle-tip/xv-toggle-tip.d.ts +19 -0
  188. package/dist/types/components/xv-tooltip/xv-tooltip.d.ts +10 -8
  189. package/dist/types/components.d.ts +508 -105
  190. package/dist/types/stencil-public-runtime.d.ts +1 -1
  191. package/dist/types/types/enum.d.ts +5 -0
  192. package/dist/xv-webcomponents/index.esm.js +1 -13
  193. package/dist/xv-webcomponents/index.esm.js.map +1 -1
  194. package/dist/xv-webcomponents/loader.esm.js.map +1 -1
  195. package/dist/xv-webcomponents/p-5b63a259.entry.js +2 -0
  196. package/dist/xv-webcomponents/p-5b63a259.entry.js.map +1 -0
  197. package/dist/xv-webcomponents/p-9c06f44c.entry.js +2 -0
  198. package/dist/xv-webcomponents/p-9c06f44c.entry.js.map +1 -0
  199. package/dist/xv-webcomponents/p-DLYJiP99.js +3 -0
  200. package/dist/xv-webcomponents/p-DLYJiP99.js.map +1 -0
  201. package/dist/xv-webcomponents/p-DQuL1Twl.js +2 -0
  202. package/dist/xv-webcomponents/p-DQuL1Twl.js.map +1 -0
  203. package/dist/xv-webcomponents/p-NvoCloOY.js +2 -0
  204. package/dist/xv-webcomponents/p-NvoCloOY.js.map +1 -0
  205. package/dist/xv-webcomponents/xv-breadcrumbs-v2.entry.esm.js.map +1 -1
  206. package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -49
  207. package/dist/xv-webcomponents/xv-webcomponents.esm.js.map +1 -1
  208. package/loader/cdn.js +1 -0
  209. package/loader/index.cjs.js +1 -0
  210. package/loader/index.d.ts +24 -0
  211. package/loader/index.es2017.js +1 -0
  212. package/loader/index.js +2 -0
  213. package/package.json +53 -53
  214. package/dist/types/components/xv-text-input/_vars.d.ts +0 -5
  215. package/dist/types/components/xv-user-menu/interfaces/MenuItem.d.ts +0 -0
  216. package/dist/types/components/xv-user-menu/xv-user-menu.d.ts +0 -41
  217. package/dist/xv-webcomponents/_vars-FbbDWn6g.js +0 -13
  218. package/dist/xv-webcomponents/_vars-FbbDWn6g.js.map +0 -1
  219. package/dist/xv-webcomponents/_vars-IZ3lIQzL.js.map +0 -1
  220. package/dist/xv-webcomponents/enum-DTBL51oP.js +0 -13
  221. package/dist/xv-webcomponents/enum-DTBL51oP.js.map +0 -1
  222. package/dist/xv-webcomponents/index-rZAC0WRb.js +0 -4238
  223. package/dist/xv-webcomponents/index-rZAC0WRb.js.map +0 -1
  224. package/dist/xv-webcomponents/utils-1tk8kwKx.js.map +0 -1
  225. package/dist/xv-webcomponents/xv-accordion-v2-item.entry.esm.js.map +0 -1
  226. package/dist/xv-webcomponents/xv-accordion-v2-item.entry.js +0 -36
  227. package/dist/xv-webcomponents/xv-accordion-v2-item.entry.js.map +0 -1
  228. package/dist/xv-webcomponents/xv-accordion-v2.entry.esm.js.map +0 -1
  229. package/dist/xv-webcomponents/xv-accordion-v2.entry.js +0 -41
  230. package/dist/xv-webcomponents/xv-accordion-v2.entry.js.map +0 -1
  231. package/dist/xv-webcomponents/xv-breadcrumbs-v2.entry.js +0 -18
  232. package/dist/xv-webcomponents/xv-breadcrumbs-v2.entry.js.map +0 -1
  233. package/dist/xv-webcomponents/xv-button-v2.entry.esm.js.map +0 -1
  234. package/dist/xv-webcomponents/xv-button-v2.entry.js +0 -35
  235. package/dist/xv-webcomponents/xv-button-v2.entry.js.map +0 -1
  236. package/dist/xv-webcomponents/xv-card-v2.entry.esm.js.map +0 -1
  237. package/dist/xv-webcomponents/xv-card-v2.entry.js +0 -19
  238. package/dist/xv-webcomponents/xv-card-v2.entry.js.map +0 -1
  239. package/dist/xv-webcomponents/xv-checkbox-v2.entry.esm.js.map +0 -1
  240. package/dist/xv-webcomponents/xv-checkbox-v2.entry.js +0 -106
  241. package/dist/xv-webcomponents/xv-checkbox-v2.entry.js.map +0 -1
  242. package/dist/xv-webcomponents/xv-dropdown-v2-item.entry.esm.js.map +0 -1
  243. package/dist/xv-webcomponents/xv-dropdown-v2-item.entry.js +0 -36
  244. package/dist/xv-webcomponents/xv-dropdown-v2-item.entry.js.map +0 -1
  245. package/dist/xv-webcomponents/xv-dropdown-v2.entry.esm.js.map +0 -1
  246. package/dist/xv-webcomponents/xv-dropdown-v2.entry.js +0 -136
  247. package/dist/xv-webcomponents/xv-dropdown-v2.entry.js.map +0 -1
  248. package/dist/xv-webcomponents/xv-footer.entry.esm.js.map +0 -1
  249. package/dist/xv-webcomponents/xv-footer.entry.js +0 -30
  250. package/dist/xv-webcomponents/xv-footer.entry.js.map +0 -1
  251. package/dist/xv-webcomponents/xv-header.entry.esm.js.map +0 -1
  252. package/dist/xv-webcomponents/xv-header.entry.js +0 -81
  253. package/dist/xv-webcomponents/xv-header.entry.js.map +0 -1
  254. package/dist/xv-webcomponents/xv-link-v2.entry.esm.js.map +0 -1
  255. package/dist/xv-webcomponents/xv-link-v2.entry.js +0 -27
  256. package/dist/xv-webcomponents/xv-link-v2.entry.js.map +0 -1
  257. package/dist/xv-webcomponents/xv-loader-v2.entry.esm.js.map +0 -1
  258. package/dist/xv-webcomponents/xv-loader-v2.entry.js +0 -33
  259. package/dist/xv-webcomponents/xv-loader-v2.entry.js.map +0 -1
  260. package/dist/xv-webcomponents/xv-login-modal.entry.esm.js.map +0 -1
  261. package/dist/xv-webcomponents/xv-login-modal.entry.js +0 -89
  262. package/dist/xv-webcomponents/xv-login-modal.entry.js.map +0 -1
  263. package/dist/xv-webcomponents/xv-modal-v2.entry.esm.js.map +0 -1
  264. package/dist/xv-webcomponents/xv-modal-v2.entry.js +0 -78
  265. package/dist/xv-webcomponents/xv-modal-v2.entry.js.map +0 -1
  266. package/dist/xv-webcomponents/xv-notification-v2.entry.esm.js.map +0 -1
  267. package/dist/xv-webcomponents/xv-notification-v2.entry.js +0 -50
  268. package/dist/xv-webcomponents/xv-notification-v2.entry.js.map +0 -1
  269. package/dist/xv-webcomponents/xv-overflow-menu-v2-item.entry.esm.js.map +0 -1
  270. package/dist/xv-webcomponents/xv-overflow-menu-v2-item.entry.js +0 -32
  271. package/dist/xv-webcomponents/xv-overflow-menu-v2-item.entry.js.map +0 -1
  272. package/dist/xv-webcomponents/xv-overflow-menu-v2.entry.esm.js.map +0 -1
  273. package/dist/xv-webcomponents/xv-overflow-menu-v2.entry.js +0 -74
  274. package/dist/xv-webcomponents/xv-overflow-menu-v2.entry.js.map +0 -1
  275. package/dist/xv-webcomponents/xv-progress-indicator-v2-item.entry.esm.js.map +0 -1
  276. package/dist/xv-webcomponents/xv-progress-indicator-v2-item.entry.js +0 -21
  277. package/dist/xv-webcomponents/xv-progress-indicator-v2-item.entry.js.map +0 -1
  278. package/dist/xv-webcomponents/xv-progress-indicator-v2.entry.esm.js.map +0 -1
  279. package/dist/xv-webcomponents/xv-progress-indicator-v2.entry.js +0 -75
  280. package/dist/xv-webcomponents/xv-progress-indicator-v2.entry.js.map +0 -1
  281. package/dist/xv-webcomponents/xv-tab-v2.entry.esm.js.map +0 -1
  282. package/dist/xv-webcomponents/xv-tab-v2.entry.js +0 -21
  283. package/dist/xv-webcomponents/xv-tab-v2.entry.js.map +0 -1
  284. package/dist/xv-webcomponents/xv-table-v2-cell.entry.esm.js.map +0 -1
  285. package/dist/xv-webcomponents/xv-table-v2-cell.entry.js +0 -41
  286. package/dist/xv-webcomponents/xv-table-v2-cell.entry.js.map +0 -1
  287. package/dist/xv-webcomponents/xv-table-v2-expand.entry.esm.js.map +0 -1
  288. package/dist/xv-webcomponents/xv-table-v2-expand.entry.js +0 -29
  289. package/dist/xv-webcomponents/xv-table-v2-expand.entry.js.map +0 -1
  290. package/dist/xv-webcomponents/xv-table-v2-row.entry.esm.js.map +0 -1
  291. package/dist/xv-webcomponents/xv-table-v2-row.entry.js +0 -66
  292. package/dist/xv-webcomponents/xv-table-v2-row.entry.js.map +0 -1
  293. package/dist/xv-webcomponents/xv-table-v2.entry.esm.js.map +0 -1
  294. package/dist/xv-webcomponents/xv-table-v2.entry.js +0 -53
  295. package/dist/xv-webcomponents/xv-table-v2.entry.js.map +0 -1
  296. package/dist/xv-webcomponents/xv-tabs-v2.entry.esm.js.map +0 -1
  297. package/dist/xv-webcomponents/xv-tabs-v2.entry.js +0 -109
  298. package/dist/xv-webcomponents/xv-tabs-v2.entry.js.map +0 -1
  299. package/dist/xv-webcomponents/xv-tag-v2.entry.esm.js.map +0 -1
  300. package/dist/xv-webcomponents/xv-tag-v2.entry.js +0 -29
  301. package/dist/xv-webcomponents/xv-tag-v2.entry.js.map +0 -1
  302. package/dist/xv-webcomponents/xv-text-input-v2.entry.esm.js.map +0 -1
  303. package/dist/xv-webcomponents/xv-text-input-v2.entry.js +0 -65
  304. package/dist/xv-webcomponents/xv-text-input-v2.entry.js.map +0 -1
  305. package/dist/xv-webcomponents/xv-tooltip-v2.entry.esm.js.map +0 -1
  306. package/dist/xv-webcomponents/xv-tooltip-v2.entry.js +0 -24
  307. package/dist/xv-webcomponents/xv-tooltip-v2.entry.js.map +0 -1
  308. package/dist/xv-webcomponents/xv-user-menu.entry.esm.js.map +0 -1
  309. package/dist/xv-webcomponents/xv-user-menu.entry.js +0 -43
  310. package/dist/xv-webcomponents/xv-user-menu.entry.js.map +0 -1
@@ -0,0 +1,448 @@
1
+ import { h, Host, Fragment } from "@stencil/core";
2
+ import { SIZE_VAR } from "../../types/enum";
3
+ import { XvFileUploaderVariants } from "./_vars";
4
+ export class XvFileUploader {
5
+ constructor() {
6
+ this.variant = XvFileUploaderVariants.BUTTON;
7
+ this.size = SIZE_VAR.MD;
8
+ this.accept = [];
9
+ this.maxFileSizeMB = 5;
10
+ this.maxFiles = 20;
11
+ this.multiple = true;
12
+ this.files = [];
13
+ this.loadingStates = [];
14
+ this.errors = [];
15
+ this.dragActive = false;
16
+ this.errorMessages = [];
17
+ this.onFileSelect = (event) => {
18
+ const input = event.target;
19
+ const selectedFiles = Array.from(input.files || []);
20
+ this.handleFiles(selectedFiles);
21
+ };
22
+ this.onDrop = (event) => {
23
+ var _a;
24
+ event.preventDefault();
25
+ this.dragActive = false;
26
+ const droppedFiles = Array.from(((_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.files) || []);
27
+ this.handleFiles(droppedFiles);
28
+ };
29
+ this.handleFiles = (files) => {
30
+ this.files = this.validation(this.multiple ? [...this.files, ...files] : files);
31
+ this.filesChange.emit(this.files);
32
+ };
33
+ this.onDragOver = (event) => {
34
+ event.preventDefault();
35
+ this.dragActive = true;
36
+ };
37
+ this.onDragLeave = () => {
38
+ this.dragActive = false;
39
+ };
40
+ }
41
+ validation(files) {
42
+ var _a;
43
+ const maxSize = this.maxFileSizeMB * 1024 * 1024;
44
+ const seenFileNames = new Set();
45
+ const errorMessages = [];
46
+ const uniqueFiles = [];
47
+ for (const file of files) {
48
+ let error = null;
49
+ if (!seenFileNames.has(file.name)) {
50
+ seenFileNames.add(file.name);
51
+ uniqueFiles.push(file);
52
+ }
53
+ const extension = (_a = file.name.split('.').pop()) === null || _a === void 0 ? void 0 : _a.toLowerCase();
54
+ const isAccepted = this.accept.length === 0 ||
55
+ this.accept.some(type => {
56
+ const normalized = type.toLowerCase().replace(/^\./, '');
57
+ return normalized === extension;
58
+ });
59
+ if (!isAccepted) {
60
+ error = 'Unsupported file type.';
61
+ }
62
+ else if (file.size > maxSize) {
63
+ error = `File ${file.name} is too large.`;
64
+ }
65
+ errorMessages.push(error);
66
+ }
67
+ this.error = uniqueFiles.length > this.maxFiles
68
+ ? `Only ${this.maxFiles} file(s) allowed.`
69
+ : null;
70
+ this.errorMessages = errorMessages;
71
+ return uniqueFiles;
72
+ }
73
+ removeFile(index) {
74
+ this.files = this.validation([...this.files.slice(0, index), ...this.files.slice(index + 1)]);
75
+ this.filesChange.emit(this.files);
76
+ if (this.fileInput) {
77
+ this.fileInput.value = '';
78
+ }
79
+ }
80
+ render() {
81
+ var _a;
82
+ return (h(Host, { key: '1105dfa28937f83f3508498ecf3b00b181f3f062', class: { 'upload-wrapper': true, [`uploader-${this.size}`]: true, disabled: !!this.disabled } }, this.label && h("label", { key: 'bb7aeb7744325dc15cee88e63672ab2f1cac48fa', class: "label" }, this.label), this.description && h("p", { key: '17d6076cf70f1d69b9d760992739f5f8ae571711', class: "description" }, this.description), this.variant === 'button' ? (h("button", { disabled: this.disabled, class: "upload-btn", onClick: () => this.fileInput.click() }, this.addText || 'Dateien auswählen')) : (h("div", { class: { 'drop-zone': true, active: this.dragActive }, onDrop: this.onDrop, onDragOver: this.onDragOver, onDragLeave: this.onDragLeave, onClick: () => this.fileInput.click() }, this.addText || 'Dateien hierher ziehen oder darauf klicken, um eine Datei auszuwählen.', ((_a = this.accept) === null || _a === void 0 ? void 0 : _a.length) > 0 && h("span", null, " (", this.accept.join(', '), ")"))), h("input", { key: 'bc25da9c977df0452fd8946b160d7b89487a5aee', ref: el => (this.fileInput = el), type: "file", hidden: true, onChange: this.onFileSelect, multiple: this.multiple, accept: this.accept.map(type => `.${type}`).join(',') }), h("ul", { key: '3d2b5a6505a70c4a14004f0e0f3c6da7213b0007', class: "file-list" }, this.files.map((file, index) => {
83
+ var _a, _b;
84
+ return (h("li", { class: { file: true, withError: !!(((_a = this.errors) === null || _a === void 0 ? void 0 : _a[index]) || ((_b = this.errorMessages) === null || _b === void 0 ? void 0 : _b[index])) } }, h("div", { class: "file_container" }, h("span", { class: "file_container_name" }, file.name), this._renderLoaderState(index)), this._renderError(index)));
85
+ })), this.error && (h("div", { key: '3918fcaf5c5660eb2a5553886e191e2969d81cb4', class: "error-container" }, h("p", { key: '26fcb672d89ec14e99b83dfc78712b72d9042d72', class: "error-container_primary" }, this.error)))));
86
+ }
87
+ _renderLoaderState(index) {
88
+ var _a, _b, _c;
89
+ const state = ((_a = this.loadingStates) === null || _a === void 0 ? void 0 : _a[index]) || null;
90
+ const errorIcon = ((_b = this.errors) === null || _b === void 0 ? void 0 : _b[index]) || ((_c = this.errorMessages) === null || _c === void 0 ? void 0 : _c[index]) ? (h("svg", { class: "file_container_errorIcon", width: "16", height: "16", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512" }, h("path", { fill: "currentColor", d: "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z" }))) : null;
91
+ switch (state) {
92
+ case 'loading':
93
+ return (h(Fragment, null, errorIcon, h("xv-loader-v2", { size: SIZE_VAR.XS })));
94
+ case 'success':
95
+ return (h(Fragment, null, errorIcon, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 18 16", fill: "none" }, h("path", { d: "M9 16C6.125 16 3.5 14.5 2.0625 12C0.625 9.53125 0.625 6.5 2.0625 4C3.5 1.53125 6.125 0 9 0C11.8438 0 14.4688 1.53125 15.9062 4C17.3438 6.5 17.3438 9.53125 15.9062 12C14.4688 14.5 11.8438 16 9 16ZM12.5312 6.53125H12.5C12.8125 6.25 12.8125 5.78125 12.5 5.46875C12.2188 5.1875 11.75 5.1875 11.4688 5.46875L8 8.96875L6.53125 7.5C6.21875 7.1875 5.75 7.1875 5.46875 7.5C5.15625 7.78125 5.15625 8.25 5.46875 8.53125L7.46875 10.5312C7.75 10.8438 8.21875 10.8438 8.53125 10.5312L12.5312 6.53125Z", fill: "#97BF0D" }))));
96
+ case 'uploaded':
97
+ default:
98
+ return (h(Fragment, null, errorIcon, h("xv-button-v2", { variant: "ghost", size: SIZE_VAR.XS, onClick: () => this.removeFile(index) }, h("span", { slot: "icon-left" }, "\u00D7"))));
99
+ }
100
+ }
101
+ _renderError(index) {
102
+ var _a, _b;
103
+ const error = ((_a = this.errors) === null || _a === void 0 ? void 0 : _a[index]) || ((_b = this.errorMessages) === null || _b === void 0 ? void 0 : _b[index]);
104
+ if (!error)
105
+ return;
106
+ if (typeof error === 'object') {
107
+ return (h("div", { class: "error-container" }, h("p", { class: "error-container_primary" }, error.primary), h("p", { class: "error-container_secondary" }, error.secondary)));
108
+ }
109
+ if (typeof error === 'string') {
110
+ return (h("div", { class: "error-container" }, h("p", { class: "error-container_primary" }, error)));
111
+ }
112
+ return null;
113
+ }
114
+ static get is() { return "xv-file-uploader"; }
115
+ static get encapsulation() { return "shadow"; }
116
+ static get originalStyleUrls() {
117
+ return {
118
+ "$": ["xv-file-uploader.scss"]
119
+ };
120
+ }
121
+ static get styleUrls() {
122
+ return {
123
+ "$": ["xv-file-uploader.css"]
124
+ };
125
+ }
126
+ static get properties() {
127
+ return {
128
+ "label": {
129
+ "type": "string",
130
+ "attribute": "label",
131
+ "mutable": false,
132
+ "complexType": {
133
+ "original": "string",
134
+ "resolved": "string",
135
+ "references": {}
136
+ },
137
+ "required": false,
138
+ "optional": true,
139
+ "docs": {
140
+ "tags": [],
141
+ "text": ""
142
+ },
143
+ "getter": false,
144
+ "setter": false,
145
+ "reflect": false
146
+ },
147
+ "description": {
148
+ "type": "string",
149
+ "attribute": "description",
150
+ "mutable": false,
151
+ "complexType": {
152
+ "original": "string",
153
+ "resolved": "string",
154
+ "references": {}
155
+ },
156
+ "required": false,
157
+ "optional": true,
158
+ "docs": {
159
+ "tags": [],
160
+ "text": ""
161
+ },
162
+ "getter": false,
163
+ "setter": false,
164
+ "reflect": false
165
+ },
166
+ "addText": {
167
+ "type": "string",
168
+ "attribute": "add-text",
169
+ "mutable": false,
170
+ "complexType": {
171
+ "original": "string",
172
+ "resolved": "string",
173
+ "references": {}
174
+ },
175
+ "required": false,
176
+ "optional": true,
177
+ "docs": {
178
+ "tags": [],
179
+ "text": ""
180
+ },
181
+ "getter": false,
182
+ "setter": false,
183
+ "reflect": false
184
+ },
185
+ "variant": {
186
+ "type": "string",
187
+ "attribute": "variant",
188
+ "mutable": false,
189
+ "complexType": {
190
+ "original": "XvFileUploaderVariants",
191
+ "resolved": "XvFileUploaderVariants.BUTTON | XvFileUploaderVariants.DRAG_DROP",
192
+ "references": {
193
+ "XvFileUploaderVariants": {
194
+ "location": "import",
195
+ "path": "./_vars",
196
+ "id": "src/components/xv-file-uploader/_vars.ts::XvFileUploaderVariants"
197
+ }
198
+ }
199
+ },
200
+ "required": false,
201
+ "optional": false,
202
+ "docs": {
203
+ "tags": [],
204
+ "text": ""
205
+ },
206
+ "getter": false,
207
+ "setter": false,
208
+ "reflect": false,
209
+ "defaultValue": "XvFileUploaderVariants.BUTTON"
210
+ },
211
+ "size": {
212
+ "type": "string",
213
+ "attribute": "size",
214
+ "mutable": false,
215
+ "complexType": {
216
+ "original": "SIZE_VAR",
217
+ "resolved": "SIZE_VAR.LG | SIZE_VAR.MD | SIZE_VAR.SM | SIZE_VAR.XL | SIZE_VAR.XS",
218
+ "references": {
219
+ "SIZE_VAR": {
220
+ "location": "import",
221
+ "path": "../../types/enum",
222
+ "id": "src/types/enum.ts::SIZE_VAR"
223
+ }
224
+ }
225
+ },
226
+ "required": false,
227
+ "optional": false,
228
+ "docs": {
229
+ "tags": [],
230
+ "text": ""
231
+ },
232
+ "getter": false,
233
+ "setter": false,
234
+ "reflect": false,
235
+ "defaultValue": "SIZE_VAR.MD"
236
+ },
237
+ "accept": {
238
+ "type": "unknown",
239
+ "attribute": "accept",
240
+ "mutable": false,
241
+ "complexType": {
242
+ "original": "string[]",
243
+ "resolved": "string[]",
244
+ "references": {}
245
+ },
246
+ "required": false,
247
+ "optional": false,
248
+ "docs": {
249
+ "tags": [],
250
+ "text": ""
251
+ },
252
+ "getter": false,
253
+ "setter": false,
254
+ "defaultValue": "[]"
255
+ },
256
+ "maxFileSizeMB": {
257
+ "type": "number",
258
+ "attribute": "max-file-size-mb",
259
+ "mutable": false,
260
+ "complexType": {
261
+ "original": "number",
262
+ "resolved": "number",
263
+ "references": {}
264
+ },
265
+ "required": false,
266
+ "optional": false,
267
+ "docs": {
268
+ "tags": [],
269
+ "text": ""
270
+ },
271
+ "getter": false,
272
+ "setter": false,
273
+ "reflect": false,
274
+ "defaultValue": "5"
275
+ },
276
+ "maxFiles": {
277
+ "type": "number",
278
+ "attribute": "max-files",
279
+ "mutable": false,
280
+ "complexType": {
281
+ "original": "number",
282
+ "resolved": "number",
283
+ "references": {}
284
+ },
285
+ "required": false,
286
+ "optional": false,
287
+ "docs": {
288
+ "tags": [],
289
+ "text": ""
290
+ },
291
+ "getter": false,
292
+ "setter": false,
293
+ "reflect": false,
294
+ "defaultValue": "20"
295
+ },
296
+ "multiple": {
297
+ "type": "boolean",
298
+ "attribute": "multiple",
299
+ "mutable": false,
300
+ "complexType": {
301
+ "original": "boolean",
302
+ "resolved": "boolean",
303
+ "references": {}
304
+ },
305
+ "required": false,
306
+ "optional": false,
307
+ "docs": {
308
+ "tags": [],
309
+ "text": ""
310
+ },
311
+ "getter": false,
312
+ "setter": false,
313
+ "reflect": false,
314
+ "defaultValue": "true"
315
+ },
316
+ "disabled": {
317
+ "type": "boolean",
318
+ "attribute": "disabled",
319
+ "mutable": false,
320
+ "complexType": {
321
+ "original": "boolean",
322
+ "resolved": "boolean",
323
+ "references": {}
324
+ },
325
+ "required": false,
326
+ "optional": true,
327
+ "docs": {
328
+ "tags": [],
329
+ "text": ""
330
+ },
331
+ "getter": false,
332
+ "setter": false,
333
+ "reflect": true
334
+ },
335
+ "files": {
336
+ "type": "unknown",
337
+ "attribute": "files",
338
+ "mutable": true,
339
+ "complexType": {
340
+ "original": "File[]",
341
+ "resolved": "File[]",
342
+ "references": {
343
+ "File": {
344
+ "location": "global",
345
+ "id": "global::File"
346
+ }
347
+ }
348
+ },
349
+ "required": false,
350
+ "optional": false,
351
+ "docs": {
352
+ "tags": [],
353
+ "text": ""
354
+ },
355
+ "getter": false,
356
+ "setter": false,
357
+ "defaultValue": "[]"
358
+ },
359
+ "loadingStates": {
360
+ "type": "unknown",
361
+ "attribute": "loading-states",
362
+ "mutable": true,
363
+ "complexType": {
364
+ "original": "('loading' | 'success' | 'uploaded')[]",
365
+ "resolved": "(\"loading\" | \"success\" | \"uploaded\")[]",
366
+ "references": {}
367
+ },
368
+ "required": false,
369
+ "optional": false,
370
+ "docs": {
371
+ "tags": [],
372
+ "text": ""
373
+ },
374
+ "getter": false,
375
+ "setter": false,
376
+ "defaultValue": "[]"
377
+ },
378
+ "error": {
379
+ "type": "string",
380
+ "attribute": "error",
381
+ "mutable": true,
382
+ "complexType": {
383
+ "original": "string",
384
+ "resolved": "string",
385
+ "references": {}
386
+ },
387
+ "required": false,
388
+ "optional": true,
389
+ "docs": {
390
+ "tags": [],
391
+ "text": ""
392
+ },
393
+ "getter": false,
394
+ "setter": false,
395
+ "reflect": true
396
+ },
397
+ "errors": {
398
+ "type": "unknown",
399
+ "attribute": "errors",
400
+ "mutable": true,
401
+ "complexType": {
402
+ "original": "string[] | { primary: string; secondary: string; }[]",
403
+ "resolved": "string[] | { primary: string; secondary: string; }[]",
404
+ "references": {}
405
+ },
406
+ "required": false,
407
+ "optional": false,
408
+ "docs": {
409
+ "tags": [],
410
+ "text": ""
411
+ },
412
+ "getter": false,
413
+ "setter": false,
414
+ "defaultValue": "[]"
415
+ }
416
+ };
417
+ }
418
+ static get states() {
419
+ return {
420
+ "dragActive": {},
421
+ "errorMessages": {}
422
+ };
423
+ }
424
+ static get events() {
425
+ return [{
426
+ "method": "filesChange",
427
+ "name": "filesChange",
428
+ "bubbles": true,
429
+ "cancelable": true,
430
+ "composed": true,
431
+ "docs": {
432
+ "tags": [],
433
+ "text": ""
434
+ },
435
+ "complexType": {
436
+ "original": "File[]",
437
+ "resolved": "File[]",
438
+ "references": {
439
+ "File": {
440
+ "location": "global",
441
+ "id": "global::File"
442
+ }
443
+ }
444
+ }
445
+ }];
446
+ }
447
+ }
448
+ //# sourceMappingURL=xv-file-uploader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xv-file-uploader.js","sourceRoot":"","sources":["../../../src/components/xv-file-uploader/xv-file-uploader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAgB,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC/F,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAOjD,MAAM,OAAO,cAAc;IAL3B;QASU,YAAO,GAA2B,sBAAsB,CAAC,MAAM,CAAC;QAChE,SAAI,GAAa,QAAQ,CAAC,EAAE,CAAC;QAC7B,WAAM,GAAa,EAAE,CAAC;QACW,kBAAa,GAAW,CAAC,CAAC;QACjC,aAAQ,GAAW,EAAE,CAAC;QAChD,aAAQ,GAAY,IAAI,CAAC;QAEO,UAAK,GAAW,EAAE,CAAC;QACU,kBAAa,GAA2C,EAAE,CAAC;QAExF,WAAM,GAAyD,EAAE,CAAC;QAEjG,eAAU,GAAG,KAAK,CAAC;QACnB,kBAAa,GAAa,EAAE,CAAC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;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, EventEmitter, Event, h, Host, Prop, State, Fragment } from '@stencil/core';\nimport { SIZE_VAR } from '../../types/enum';\nimport { XvFileUploaderVariants } from './_vars';\n\n@Component({\n tag: 'xv-file-uploader',\n styleUrl: 'xv-file-uploader.scss',\n shadow: true,\n})\nexport class XvFileUploader {\n @Prop() label?: string;\n @Prop() description?: string;\n @Prop({ attribute: 'add-text' }) addText?: string;\n @Prop() variant: XvFileUploaderVariants = XvFileUploaderVariants.BUTTON;\n @Prop() size: SIZE_VAR = SIZE_VAR.MD;\n @Prop() accept: string[] = [];\n @Prop({ attribute: 'max-file-size-mb' }) maxFileSizeMB: number = 5;\n @Prop({ attribute: 'max-files' }) maxFiles: number = 20;\n @Prop() multiple: boolean = true;\n @Prop({ reflect: true }) disabled?: boolean;\n @Prop({ reflect: true, mutable: true }) files: File[] = [];\n @Prop({ reflect: true, mutable: true, attribute: 'loading-states' }) loadingStates: ('loading' | 'success' | 'uploaded')[] = [];\n @Prop({ reflect: true, mutable: true }) error?: string;\n @Prop({ reflect: true, mutable: true }) errors: string[] | { primary: string; secondary: string; }[] = [];\n\n @State() dragActive = false;\n @State() errorMessages: string[] = [];\n\n @Event() filesChange: EventEmitter<File[]>;\n\n private fileInput: HTMLInputElement;\n\n private onFileSelect = (event: Event) => {\n const input = event.target as HTMLInputElement;\n const selectedFiles = Array.from(input.files || []);\n this.handleFiles(selectedFiles);\n };\n\n private onDrop = (event: DragEvent) => {\n event.preventDefault();\n this.dragActive = false;\n const droppedFiles = Array.from(event.dataTransfer?.files || []);\n this.handleFiles(droppedFiles);\n };\n\n private handleFiles = (files: File[]) => {\n this.files = this.validation(this.multiple ? [...this.files, ...files] : files);\n this.filesChange.emit(this.files);\n };\n\n private validation(files: File[]): File[] {\n const maxSize = this.maxFileSizeMB * 1024 * 1024;\n const seenFileNames = new Set<string>();\n const errorMessages: (string | null)[] = [];\n const uniqueFiles: File[] = [];\n\n for (const file of files) {\n let error: string | undefined = null;\n\n if (!seenFileNames.has(file.name)) {\n seenFileNames.add(file.name);\n uniqueFiles.push(file);\n }\n\n const extension = file.name.split('.').pop()?.toLowerCase();\n const isAccepted =\n this.accept.length === 0 ||\n this.accept.some(type => {\n const normalized = type.toLowerCase().replace(/^\\./, '');\n return normalized === extension;\n });\n\n if (!isAccepted) {\n error = 'Unsupported file type.';\n } else if (file.size > maxSize) {\n error = `File ${file.name} is too large.`;\n }\n\n errorMessages.push(error);\n }\n\n this.error = uniqueFiles.length > this.maxFiles\n ? `Only ${this.maxFiles} file(s) allowed.`\n : null;\n\n this.errorMessages = errorMessages;\n\n return uniqueFiles;\n }\n\n private removeFile(index: number) {\n this.files = this.validation([...this.files.slice(0, index), ...this.files.slice(index + 1)]);\n this.filesChange.emit(this.files);\n if (this.fileInput) {\n this.fileInput.value = '';\n }\n }\n\n private onDragOver = (event: DragEvent) => {\n event.preventDefault();\n this.dragActive = true;\n };\n\n private onDragLeave = () => {\n this.dragActive = false;\n };\n\n render() {\n return (\n <Host class={{ 'upload-wrapper': true, [`uploader-${this.size}`]: true, disabled: !!this.disabled }}>\n {this.label && <label class=\"label\">{this.label}</label>}\n {this.description && <p class=\"description\">{this.description}</p>}\n {this.variant === 'button' ? (\n <button disabled={this.disabled} class=\"upload-btn\" onClick={() => this.fileInput.click()}>\n {this.addText || 'Dateien auswählen'}\n </button>\n ) : (\n <div\n class={{ 'drop-zone': true, active: this.dragActive }}\n onDrop={this.onDrop}\n onDragOver={this.onDragOver}\n onDragLeave={this.onDragLeave}\n onClick={() => this.fileInput.click()}\n >\n {this.addText || 'Dateien hierher ziehen oder darauf klicken, um eine Datei auszuwählen.'}\n {this.accept?.length > 0 && <span> ({this.accept.join(', ')})</span>}\n </div>\n )}\n\n <input\n ref={el => (this.fileInput = el)}\n type=\"file\"\n hidden\n onChange={this.onFileSelect}\n multiple={this.multiple}\n accept={this.accept.map(type => `.${type}`).join(',')}\n />\n\n <ul class=\"file-list\">\n {this.files.map((file, index) => (\n <li class={{ file: true, withError: !!(this.errors?.[index] || this.errorMessages?.[index]) }}>\n <div class=\"file_container\">\n <span class=\"file_container_name\">{file.name}</span>\n {this._renderLoaderState(index)}\n </div>\n {this._renderError(index)}\n </li>\n ))}\n </ul>\n {this.error && (\n <div class=\"error-container\">\n <p class=\"error-container_primary\">{this.error}</p>\n </div>\n )}\n </Host>\n );\n }\n\n private _renderLoaderState(index: number) {\n const state = this.loadingStates?.[index] || null;\n\n const errorIcon = this.errors?.[index] || this.errorMessages?.[index] ? (\n <svg class=\"file_container_errorIcon\" width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path fill=\"currentColor\"\n d=\"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z\" />\n </svg>\n ) : null;\n\n switch (state) {\n case 'loading':\n return (\n <Fragment>\n {errorIcon}\n <xv-loader-v2 size={SIZE_VAR.XS} />\n </Fragment>\n );\n case 'success':\n return (\n <Fragment>\n {errorIcon}\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 18 16\" fill=\"none\">\n <path\n d=\"M9 16C6.125 16 3.5 14.5 2.0625 12C0.625 9.53125 0.625 6.5 2.0625 4C3.5 1.53125 6.125 0 9 0C11.8438 0 14.4688 1.53125 15.9062 4C17.3438 6.5 17.3438 9.53125 15.9062 12C14.4688 14.5 11.8438 16 9 16ZM12.5312 6.53125H12.5C12.8125 6.25 12.8125 5.78125 12.5 5.46875C12.2188 5.1875 11.75 5.1875 11.4688 5.46875L8 8.96875L6.53125 7.5C6.21875 7.1875 5.75 7.1875 5.46875 7.5C5.15625 7.78125 5.15625 8.25 5.46875 8.53125L7.46875 10.5312C7.75 10.8438 8.21875 10.8438 8.53125 10.5312L12.5312 6.53125Z\"\n fill=\"#97BF0D\" />\n </svg>\n </Fragment>\n );\n case 'uploaded':\n default:\n return (\n <Fragment>\n {errorIcon}\n <xv-button-v2 variant=\"ghost\" size={SIZE_VAR.XS} onClick={() => this.removeFile(index)}>\n <span slot=\"icon-left\">×</span>\n </xv-button-v2>\n </Fragment>\n );\n }\n }\n\n private _renderError(index: number) {\n const error = this.errors?.[index] || this.errorMessages?.[index];\n\n if (!error) return;\n\n if (typeof error === 'object') {\n return (\n <div class=\"error-container\">\n <p class=\"error-container_primary\">{error.primary}</p>\n <p class=\"error-container_secondary\">{error.secondary}</p>\n </div>\n );\n }\n\n if (typeof error === 'string') {\n return (\n <div class=\"error-container\">\n <p class=\"error-container_primary\">{error}</p>\n </div>\n );\n }\n\n return null;\n }\n}\n"]}