xv-webcomponents 0.1.43 → 0.1.46

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 (311) 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 +3542 -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 +98 -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 +163 -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 +98 -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 +268 -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 +158 -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 +233 -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 +185 -0
  47. package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.js +206 -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 +102 -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 +168 -0
  53. package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.js +360 -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 +214 -0
  56. package/dist/collection/components/xv-data-table/xv-data-table.js +133 -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 +109 -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 +327 -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 +233 -0
  69. package/dist/collection/components/xv-file-uploader/xv-file-uploader.js +514 -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 +325 -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 +22682 -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 +162 -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 +160 -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 +22670 -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 +210 -0
  87. package/dist/collection/components/xv-modal/xv-modal.js +245 -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 +208 -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 +223 -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 +140 -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 +200 -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 +191 -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 +140 -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 +188 -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 +153 -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 +134 -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 +232 -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 +105 -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 +228 -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 +192 -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 +242 -0
  139. package/dist/collection/components/xv-text-input/xv-text-input.js +343 -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 +190 -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 +107 -0
  145. package/dist/collection/components/xv-tooltip/xv-tooltip.js +162 -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 +3507 -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 +15 -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 +10 -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 +39 -0
  182. package/dist/types/components/xv-header/xv-header.d.ts +0 -2
  183. package/dist/types/components/xv-modal/xv-modal.d.ts +4 -0
  184. package/dist/types/components/xv-number-input/xv-number-input.d.ts +26 -0
  185. package/dist/types/components/xv-table/_vars.d.ts +1 -5
  186. package/dist/types/components/xv-table/xv-table-cell/xv-table-cell.d.ts +2 -1
  187. package/dist/types/components/xv-text-input/xv-text-input.d.ts +11 -11
  188. package/dist/types/components/xv-toggle-tip/xv-toggle-tip.d.ts +19 -0
  189. package/dist/types/components/xv-tooltip/xv-tooltip.d.ts +12 -8
  190. package/dist/types/components.d.ts +537 -105
  191. package/dist/types/stencil-public-runtime.d.ts +1 -1
  192. package/dist/types/types/enum.d.ts +5 -0
  193. package/dist/xv-webcomponents/index.esm.js +1 -13
  194. package/dist/xv-webcomponents/index.esm.js.map +1 -1
  195. package/dist/xv-webcomponents/loader.esm.js.map +1 -1
  196. package/dist/xv-webcomponents/p-851c4716.entry.js +2 -0
  197. package/dist/xv-webcomponents/p-851c4716.entry.js.map +1 -0
  198. package/dist/xv-webcomponents/p-DLYJiP99.js +3 -0
  199. package/dist/xv-webcomponents/p-DLYJiP99.js.map +1 -0
  200. package/dist/xv-webcomponents/p-DQuL1Twl.js +2 -0
  201. package/dist/xv-webcomponents/p-DQuL1Twl.js.map +1 -0
  202. package/dist/xv-webcomponents/p-NvoCloOY.js +2 -0
  203. package/dist/xv-webcomponents/p-NvoCloOY.js.map +1 -0
  204. package/dist/xv-webcomponents/p-d96c1b6a.entry.js +2 -0
  205. package/dist/xv-webcomponents/p-d96c1b6a.entry.js.map +1 -0
  206. package/dist/xv-webcomponents/xv-breadcrumbs-v2.entry.esm.js.map +1 -1
  207. package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -49
  208. package/dist/xv-webcomponents/xv-webcomponents.esm.js.map +1 -1
  209. package/loader/cdn.js +1 -0
  210. package/loader/index.cjs.js +1 -0
  211. package/loader/index.d.ts +24 -0
  212. package/loader/index.es2017.js +1 -0
  213. package/loader/index.js +2 -0
  214. package/package.json +53 -53
  215. package/dist/types/components/xv-text-input/_vars.d.ts +0 -5
  216. package/dist/types/components/xv-user-menu/interfaces/MenuItem.d.ts +0 -0
  217. package/dist/types/components/xv-user-menu/xv-user-menu.d.ts +0 -41
  218. package/dist/xv-webcomponents/_vars-FbbDWn6g.js +0 -13
  219. package/dist/xv-webcomponents/_vars-FbbDWn6g.js.map +0 -1
  220. package/dist/xv-webcomponents/_vars-IZ3lIQzL.js.map +0 -1
  221. package/dist/xv-webcomponents/enum-DTBL51oP.js +0 -13
  222. package/dist/xv-webcomponents/enum-DTBL51oP.js.map +0 -1
  223. package/dist/xv-webcomponents/index-rZAC0WRb.js +0 -4238
  224. package/dist/xv-webcomponents/index-rZAC0WRb.js.map +0 -1
  225. package/dist/xv-webcomponents/utils-1tk8kwKx.js.map +0 -1
  226. package/dist/xv-webcomponents/xv-accordion-v2-item.entry.esm.js.map +0 -1
  227. package/dist/xv-webcomponents/xv-accordion-v2-item.entry.js +0 -36
  228. package/dist/xv-webcomponents/xv-accordion-v2-item.entry.js.map +0 -1
  229. package/dist/xv-webcomponents/xv-accordion-v2.entry.esm.js.map +0 -1
  230. package/dist/xv-webcomponents/xv-accordion-v2.entry.js +0 -41
  231. package/dist/xv-webcomponents/xv-accordion-v2.entry.js.map +0 -1
  232. package/dist/xv-webcomponents/xv-breadcrumbs-v2.entry.js +0 -18
  233. package/dist/xv-webcomponents/xv-breadcrumbs-v2.entry.js.map +0 -1
  234. package/dist/xv-webcomponents/xv-button-v2.entry.esm.js.map +0 -1
  235. package/dist/xv-webcomponents/xv-button-v2.entry.js +0 -35
  236. package/dist/xv-webcomponents/xv-button-v2.entry.js.map +0 -1
  237. package/dist/xv-webcomponents/xv-card-v2.entry.esm.js.map +0 -1
  238. package/dist/xv-webcomponents/xv-card-v2.entry.js +0 -19
  239. package/dist/xv-webcomponents/xv-card-v2.entry.js.map +0 -1
  240. package/dist/xv-webcomponents/xv-checkbox-v2.entry.esm.js.map +0 -1
  241. package/dist/xv-webcomponents/xv-checkbox-v2.entry.js +0 -106
  242. package/dist/xv-webcomponents/xv-checkbox-v2.entry.js.map +0 -1
  243. package/dist/xv-webcomponents/xv-dropdown-v2-item.entry.esm.js.map +0 -1
  244. package/dist/xv-webcomponents/xv-dropdown-v2-item.entry.js +0 -36
  245. package/dist/xv-webcomponents/xv-dropdown-v2-item.entry.js.map +0 -1
  246. package/dist/xv-webcomponents/xv-dropdown-v2.entry.esm.js.map +0 -1
  247. package/dist/xv-webcomponents/xv-dropdown-v2.entry.js +0 -136
  248. package/dist/xv-webcomponents/xv-dropdown-v2.entry.js.map +0 -1
  249. package/dist/xv-webcomponents/xv-footer.entry.esm.js.map +0 -1
  250. package/dist/xv-webcomponents/xv-footer.entry.js +0 -30
  251. package/dist/xv-webcomponents/xv-footer.entry.js.map +0 -1
  252. package/dist/xv-webcomponents/xv-header.entry.esm.js.map +0 -1
  253. package/dist/xv-webcomponents/xv-header.entry.js +0 -81
  254. package/dist/xv-webcomponents/xv-header.entry.js.map +0 -1
  255. package/dist/xv-webcomponents/xv-link-v2.entry.esm.js.map +0 -1
  256. package/dist/xv-webcomponents/xv-link-v2.entry.js +0 -27
  257. package/dist/xv-webcomponents/xv-link-v2.entry.js.map +0 -1
  258. package/dist/xv-webcomponents/xv-loader-v2.entry.esm.js.map +0 -1
  259. package/dist/xv-webcomponents/xv-loader-v2.entry.js +0 -33
  260. package/dist/xv-webcomponents/xv-loader-v2.entry.js.map +0 -1
  261. package/dist/xv-webcomponents/xv-login-modal.entry.esm.js.map +0 -1
  262. package/dist/xv-webcomponents/xv-login-modal.entry.js +0 -89
  263. package/dist/xv-webcomponents/xv-login-modal.entry.js.map +0 -1
  264. package/dist/xv-webcomponents/xv-modal-v2.entry.esm.js.map +0 -1
  265. package/dist/xv-webcomponents/xv-modal-v2.entry.js +0 -78
  266. package/dist/xv-webcomponents/xv-modal-v2.entry.js.map +0 -1
  267. package/dist/xv-webcomponents/xv-notification-v2.entry.esm.js.map +0 -1
  268. package/dist/xv-webcomponents/xv-notification-v2.entry.js +0 -50
  269. package/dist/xv-webcomponents/xv-notification-v2.entry.js.map +0 -1
  270. package/dist/xv-webcomponents/xv-overflow-menu-v2-item.entry.esm.js.map +0 -1
  271. package/dist/xv-webcomponents/xv-overflow-menu-v2-item.entry.js +0 -32
  272. package/dist/xv-webcomponents/xv-overflow-menu-v2-item.entry.js.map +0 -1
  273. package/dist/xv-webcomponents/xv-overflow-menu-v2.entry.esm.js.map +0 -1
  274. package/dist/xv-webcomponents/xv-overflow-menu-v2.entry.js +0 -74
  275. package/dist/xv-webcomponents/xv-overflow-menu-v2.entry.js.map +0 -1
  276. package/dist/xv-webcomponents/xv-progress-indicator-v2-item.entry.esm.js.map +0 -1
  277. package/dist/xv-webcomponents/xv-progress-indicator-v2-item.entry.js +0 -21
  278. package/dist/xv-webcomponents/xv-progress-indicator-v2-item.entry.js.map +0 -1
  279. package/dist/xv-webcomponents/xv-progress-indicator-v2.entry.esm.js.map +0 -1
  280. package/dist/xv-webcomponents/xv-progress-indicator-v2.entry.js +0 -75
  281. package/dist/xv-webcomponents/xv-progress-indicator-v2.entry.js.map +0 -1
  282. package/dist/xv-webcomponents/xv-tab-v2.entry.esm.js.map +0 -1
  283. package/dist/xv-webcomponents/xv-tab-v2.entry.js +0 -21
  284. package/dist/xv-webcomponents/xv-tab-v2.entry.js.map +0 -1
  285. package/dist/xv-webcomponents/xv-table-v2-cell.entry.esm.js.map +0 -1
  286. package/dist/xv-webcomponents/xv-table-v2-cell.entry.js +0 -41
  287. package/dist/xv-webcomponents/xv-table-v2-cell.entry.js.map +0 -1
  288. package/dist/xv-webcomponents/xv-table-v2-expand.entry.esm.js.map +0 -1
  289. package/dist/xv-webcomponents/xv-table-v2-expand.entry.js +0 -29
  290. package/dist/xv-webcomponents/xv-table-v2-expand.entry.js.map +0 -1
  291. package/dist/xv-webcomponents/xv-table-v2-row.entry.esm.js.map +0 -1
  292. package/dist/xv-webcomponents/xv-table-v2-row.entry.js +0 -66
  293. package/dist/xv-webcomponents/xv-table-v2-row.entry.js.map +0 -1
  294. package/dist/xv-webcomponents/xv-table-v2.entry.esm.js.map +0 -1
  295. package/dist/xv-webcomponents/xv-table-v2.entry.js +0 -53
  296. package/dist/xv-webcomponents/xv-table-v2.entry.js.map +0 -1
  297. package/dist/xv-webcomponents/xv-tabs-v2.entry.esm.js.map +0 -1
  298. package/dist/xv-webcomponents/xv-tabs-v2.entry.js +0 -109
  299. package/dist/xv-webcomponents/xv-tabs-v2.entry.js.map +0 -1
  300. package/dist/xv-webcomponents/xv-tag-v2.entry.esm.js.map +0 -1
  301. package/dist/xv-webcomponents/xv-tag-v2.entry.js +0 -29
  302. package/dist/xv-webcomponents/xv-tag-v2.entry.js.map +0 -1
  303. package/dist/xv-webcomponents/xv-text-input-v2.entry.esm.js.map +0 -1
  304. package/dist/xv-webcomponents/xv-text-input-v2.entry.js +0 -65
  305. package/dist/xv-webcomponents/xv-text-input-v2.entry.js.map +0 -1
  306. package/dist/xv-webcomponents/xv-tooltip-v2.entry.esm.js.map +0 -1
  307. package/dist/xv-webcomponents/xv-tooltip-v2.entry.js +0 -24
  308. package/dist/xv-webcomponents/xv-tooltip-v2.entry.js.map +0 -1
  309. package/dist/xv-webcomponents/xv-user-menu.entry.esm.js.map +0 -1
  310. package/dist/xv-webcomponents/xv-user-menu.entry.js +0 -43
  311. package/dist/xv-webcomponents/xv-user-menu.entry.js.map +0 -1
@@ -0,0 +1,514 @@
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.buttonVariant = 'primary';
10
+ this.maxFileSizeMB = 5;
11
+ this.maxFiles = 20;
12
+ this.multiple = true;
13
+ this.files = [];
14
+ this.loadingStates = [];
15
+ this.errors = [];
16
+ this.dragActive = false;
17
+ this.errorMessages = [];
18
+ this.onFileSelect = (event) => {
19
+ const input = event.target;
20
+ const selectedFiles = Array.from(input.files || []);
21
+ this.handleFiles(selectedFiles);
22
+ };
23
+ this.onDrop = (event) => {
24
+ var _a;
25
+ event.preventDefault();
26
+ this.dragActive = false;
27
+ const droppedFiles = Array.from(((_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.files) || []);
28
+ this.handleFiles(droppedFiles);
29
+ };
30
+ this.handleFiles = (files) => {
31
+ this.files = this.validation(this.multiple ? [...this.files, ...files] : files);
32
+ this.filesChange.emit(this.files);
33
+ };
34
+ this.onDragOver = (event) => {
35
+ event.preventDefault();
36
+ this.dragActive = true;
37
+ };
38
+ this.onDragLeave = () => {
39
+ this.dragActive = false;
40
+ };
41
+ }
42
+ async clearFiles() {
43
+ this.files = [];
44
+ if (this.fileInput) {
45
+ this.fileInput.value = '';
46
+ }
47
+ }
48
+ validation(files) {
49
+ const maxSize = this.maxFileSizeMB * 1024 * 1024;
50
+ const seenFileNames = new Set();
51
+ const errorMessages = [];
52
+ const uniqueFiles = [];
53
+ for (const file of files) {
54
+ let error = null;
55
+ if (!seenFileNames.has(file.name)) {
56
+ seenFileNames.add(file.name);
57
+ uniqueFiles.push(file);
58
+ }
59
+ const dotIndex = file.name.lastIndexOf('.');
60
+ const extension = file.name.substring(dotIndex).toLowerCase();
61
+ const isAccepted = this.accept.length === 0 || this.accept.some(type => type.toLowerCase() === extension);
62
+ if (!isAccepted) {
63
+ error = 'Unsupported file type.';
64
+ }
65
+ else if (file.size > maxSize) {
66
+ error = `File ${file.name} is too large.`;
67
+ }
68
+ errorMessages.push(error);
69
+ }
70
+ this.error = uniqueFiles.length > this.maxFiles
71
+ ? `Only ${this.maxFiles} file(s) allowed.`
72
+ : null;
73
+ this.errorMessages = errorMessages;
74
+ return uniqueFiles;
75
+ }
76
+ removeFile(index) {
77
+ if (this.files[index])
78
+ this.fileRemoved.emit(this.files[index]);
79
+ this.files = this.validation([...this.files.slice(0, index), ...this.files.slice(index + 1)]);
80
+ this.filesChange.emit(this.files);
81
+ if (this.fileInput) {
82
+ this.fileInput.value = '';
83
+ }
84
+ }
85
+ render() {
86
+ var _a;
87
+ return (h(Host, { key: 'cca5e29c47f1272eb20ce505f824bf0fee264d79', class: { 'upload-wrapper': true, [`uploader-${this.size}`]: true, disabled: !!this.disabled } }, this.label && h("label", { key: '83b6b040877e31d98485f8216923613dca2a8bdc', class: "label" }, this.label), this.description && h("p", { key: 'c5fee7ad8b3b000bf07436dbaa875c072e1e0169', class: "description" }, this.description), this.variant === 'button' ? (h("xv-button-v2", { variant: this.buttonVariant, disabled: this.disabled, 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: 'a3ccac67e702ea3d3e900b90fdb5fe0a2f8dd220', ref: el => (this.fileInput = el), type: "file", hidden: true, onChange: this.onFileSelect, multiple: this.multiple, accept: this.accept.join(',') }), h("ul", { key: 'c9ac4dce2a161863836af7c13c71783a9b51cdf0', class: "file-list" }, this.files.map((file, index) => {
88
+ var _a, _b;
89
+ 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)));
90
+ })), this.error && (h("div", { key: '642650576c9019fb3e90ff2306a4ba2bc57ca6f7', class: "error-container" }, h("p", { key: '5ec4fe02693c4aa160d57721b2a44814c2081662', class: "error-container_primary" }, this.error)))));
91
+ }
92
+ _renderLoaderState(index) {
93
+ var _a, _b, _c;
94
+ const state = ((_a = this.loadingStates) === null || _a === void 0 ? void 0 : _a[index]) || null;
95
+ 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;
96
+ switch (state) {
97
+ case 'loading':
98
+ return (h(Fragment, null, errorIcon, h("xv-loader-v2", { size: SIZE_VAR.XS })));
99
+ case 'success':
100
+ 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" })), h("xv-button-v2", { variant: "ghost", size: SIZE_VAR.XS, onClick: () => this.removeFile(index) }, h("span", { slot: "icon-left" }, "\u00D7"))));
101
+ case 'uploaded':
102
+ default:
103
+ 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"))));
104
+ }
105
+ }
106
+ _renderError(index) {
107
+ var _a, _b;
108
+ const error = ((_a = this.errors) === null || _a === void 0 ? void 0 : _a[index]) || ((_b = this.errorMessages) === null || _b === void 0 ? void 0 : _b[index]);
109
+ if (!error)
110
+ return;
111
+ if (typeof error === 'object') {
112
+ return (h("div", { class: "error-container" }, h("p", { class: "error-container_primary" }, error.primary), h("p", { class: "error-container_secondary" }, error.secondary)));
113
+ }
114
+ if (typeof error === 'string') {
115
+ return (h("div", { class: "error-container" }, h("p", { class: "error-container_primary" }, error)));
116
+ }
117
+ return null;
118
+ }
119
+ static get is() { return "xv-file-uploader"; }
120
+ static get encapsulation() { return "shadow"; }
121
+ static get originalStyleUrls() {
122
+ return {
123
+ "$": ["xv-file-uploader.scss"]
124
+ };
125
+ }
126
+ static get styleUrls() {
127
+ return {
128
+ "$": ["xv-file-uploader.css"]
129
+ };
130
+ }
131
+ static get properties() {
132
+ return {
133
+ "label": {
134
+ "type": "string",
135
+ "attribute": "label",
136
+ "mutable": false,
137
+ "complexType": {
138
+ "original": "string",
139
+ "resolved": "string",
140
+ "references": {}
141
+ },
142
+ "required": false,
143
+ "optional": true,
144
+ "docs": {
145
+ "tags": [],
146
+ "text": ""
147
+ },
148
+ "getter": false,
149
+ "setter": false,
150
+ "reflect": false
151
+ },
152
+ "description": {
153
+ "type": "string",
154
+ "attribute": "description",
155
+ "mutable": false,
156
+ "complexType": {
157
+ "original": "string",
158
+ "resolved": "string",
159
+ "references": {}
160
+ },
161
+ "required": false,
162
+ "optional": true,
163
+ "docs": {
164
+ "tags": [],
165
+ "text": ""
166
+ },
167
+ "getter": false,
168
+ "setter": false,
169
+ "reflect": false
170
+ },
171
+ "addText": {
172
+ "type": "string",
173
+ "attribute": "add-text",
174
+ "mutable": false,
175
+ "complexType": {
176
+ "original": "string",
177
+ "resolved": "string",
178
+ "references": {}
179
+ },
180
+ "required": false,
181
+ "optional": true,
182
+ "docs": {
183
+ "tags": [],
184
+ "text": ""
185
+ },
186
+ "getter": false,
187
+ "setter": false,
188
+ "reflect": false
189
+ },
190
+ "variant": {
191
+ "type": "string",
192
+ "attribute": "variant",
193
+ "mutable": false,
194
+ "complexType": {
195
+ "original": "XvFileUploaderVariants",
196
+ "resolved": "XvFileUploaderVariants.BUTTON | XvFileUploaderVariants.DRAG_DROP",
197
+ "references": {
198
+ "XvFileUploaderVariants": {
199
+ "location": "import",
200
+ "path": "./_vars",
201
+ "id": "src/components/xv-file-uploader/_vars.ts::XvFileUploaderVariants"
202
+ }
203
+ }
204
+ },
205
+ "required": false,
206
+ "optional": false,
207
+ "docs": {
208
+ "tags": [],
209
+ "text": ""
210
+ },
211
+ "getter": false,
212
+ "setter": false,
213
+ "reflect": false,
214
+ "defaultValue": "XvFileUploaderVariants.BUTTON"
215
+ },
216
+ "size": {
217
+ "type": "string",
218
+ "attribute": "size",
219
+ "mutable": false,
220
+ "complexType": {
221
+ "original": "SIZE_VAR",
222
+ "resolved": "SIZE_VAR.LG | SIZE_VAR.MD | SIZE_VAR.SM | SIZE_VAR.XL | SIZE_VAR.XS",
223
+ "references": {
224
+ "SIZE_VAR": {
225
+ "location": "import",
226
+ "path": "../../types/enum",
227
+ "id": "src/types/enum.ts::SIZE_VAR"
228
+ }
229
+ }
230
+ },
231
+ "required": false,
232
+ "optional": false,
233
+ "docs": {
234
+ "tags": [],
235
+ "text": ""
236
+ },
237
+ "getter": false,
238
+ "setter": false,
239
+ "reflect": false,
240
+ "defaultValue": "SIZE_VAR.MD"
241
+ },
242
+ "accept": {
243
+ "type": "unknown",
244
+ "attribute": "accept",
245
+ "mutable": false,
246
+ "complexType": {
247
+ "original": "string[]",
248
+ "resolved": "string[]",
249
+ "references": {}
250
+ },
251
+ "required": false,
252
+ "optional": false,
253
+ "docs": {
254
+ "tags": [],
255
+ "text": ""
256
+ },
257
+ "getter": false,
258
+ "setter": false,
259
+ "defaultValue": "[]"
260
+ },
261
+ "buttonVariant": {
262
+ "type": "string",
263
+ "attribute": "button-variant",
264
+ "mutable": false,
265
+ "complexType": {
266
+ "original": "'primary' | 'secondary' | 'ghost' | 'danger' | 'tertiary'",
267
+ "resolved": "\"danger\" | \"ghost\" | \"primary\" | \"secondary\" | \"tertiary\"",
268
+ "references": {}
269
+ },
270
+ "required": false,
271
+ "optional": false,
272
+ "docs": {
273
+ "tags": [],
274
+ "text": ""
275
+ },
276
+ "getter": false,
277
+ "setter": false,
278
+ "reflect": false,
279
+ "defaultValue": "'primary'"
280
+ },
281
+ "maxFileSizeMB": {
282
+ "type": "number",
283
+ "attribute": "max-file-size-mb",
284
+ "mutable": false,
285
+ "complexType": {
286
+ "original": "number",
287
+ "resolved": "number",
288
+ "references": {}
289
+ },
290
+ "required": false,
291
+ "optional": false,
292
+ "docs": {
293
+ "tags": [],
294
+ "text": ""
295
+ },
296
+ "getter": false,
297
+ "setter": false,
298
+ "reflect": false,
299
+ "defaultValue": "5"
300
+ },
301
+ "maxFiles": {
302
+ "type": "number",
303
+ "attribute": "max-files",
304
+ "mutable": false,
305
+ "complexType": {
306
+ "original": "number",
307
+ "resolved": "number",
308
+ "references": {}
309
+ },
310
+ "required": false,
311
+ "optional": false,
312
+ "docs": {
313
+ "tags": [],
314
+ "text": ""
315
+ },
316
+ "getter": false,
317
+ "setter": false,
318
+ "reflect": false,
319
+ "defaultValue": "20"
320
+ },
321
+ "multiple": {
322
+ "type": "boolean",
323
+ "attribute": "multiple",
324
+ "mutable": false,
325
+ "complexType": {
326
+ "original": "boolean",
327
+ "resolved": "boolean",
328
+ "references": {}
329
+ },
330
+ "required": false,
331
+ "optional": false,
332
+ "docs": {
333
+ "tags": [],
334
+ "text": ""
335
+ },
336
+ "getter": false,
337
+ "setter": false,
338
+ "reflect": false,
339
+ "defaultValue": "true"
340
+ },
341
+ "disabled": {
342
+ "type": "boolean",
343
+ "attribute": "disabled",
344
+ "mutable": false,
345
+ "complexType": {
346
+ "original": "boolean",
347
+ "resolved": "boolean",
348
+ "references": {}
349
+ },
350
+ "required": false,
351
+ "optional": true,
352
+ "docs": {
353
+ "tags": [],
354
+ "text": ""
355
+ },
356
+ "getter": false,
357
+ "setter": false,
358
+ "reflect": true
359
+ },
360
+ "files": {
361
+ "type": "unknown",
362
+ "attribute": "files",
363
+ "mutable": true,
364
+ "complexType": {
365
+ "original": "File[]",
366
+ "resolved": "File[]",
367
+ "references": {
368
+ "File": {
369
+ "location": "global",
370
+ "id": "global::File"
371
+ }
372
+ }
373
+ },
374
+ "required": false,
375
+ "optional": false,
376
+ "docs": {
377
+ "tags": [],
378
+ "text": ""
379
+ },
380
+ "getter": false,
381
+ "setter": false,
382
+ "defaultValue": "[]"
383
+ },
384
+ "loadingStates": {
385
+ "type": "unknown",
386
+ "attribute": "loading-states",
387
+ "mutable": true,
388
+ "complexType": {
389
+ "original": "('loading' | 'success' | 'uploaded')[]",
390
+ "resolved": "(\"loading\" | \"success\" | \"uploaded\")[]",
391
+ "references": {}
392
+ },
393
+ "required": false,
394
+ "optional": false,
395
+ "docs": {
396
+ "tags": [],
397
+ "text": ""
398
+ },
399
+ "getter": false,
400
+ "setter": false,
401
+ "defaultValue": "[]"
402
+ },
403
+ "error": {
404
+ "type": "string",
405
+ "attribute": "error",
406
+ "mutable": true,
407
+ "complexType": {
408
+ "original": "string",
409
+ "resolved": "string",
410
+ "references": {}
411
+ },
412
+ "required": false,
413
+ "optional": true,
414
+ "docs": {
415
+ "tags": [],
416
+ "text": ""
417
+ },
418
+ "getter": false,
419
+ "setter": false,
420
+ "reflect": true
421
+ },
422
+ "errors": {
423
+ "type": "unknown",
424
+ "attribute": "errors",
425
+ "mutable": true,
426
+ "complexType": {
427
+ "original": "string[] | { primary: string; secondary: string; }[]",
428
+ "resolved": "string[] | { primary: string; secondary: string; }[]",
429
+ "references": {}
430
+ },
431
+ "required": false,
432
+ "optional": false,
433
+ "docs": {
434
+ "tags": [],
435
+ "text": ""
436
+ },
437
+ "getter": false,
438
+ "setter": false,
439
+ "defaultValue": "[]"
440
+ }
441
+ };
442
+ }
443
+ static get states() {
444
+ return {
445
+ "dragActive": {},
446
+ "errorMessages": {}
447
+ };
448
+ }
449
+ static get events() {
450
+ return [{
451
+ "method": "filesChange",
452
+ "name": "filesChange",
453
+ "bubbles": true,
454
+ "cancelable": true,
455
+ "composed": true,
456
+ "docs": {
457
+ "tags": [],
458
+ "text": ""
459
+ },
460
+ "complexType": {
461
+ "original": "File[]",
462
+ "resolved": "File[]",
463
+ "references": {
464
+ "File": {
465
+ "location": "global",
466
+ "id": "global::File"
467
+ }
468
+ }
469
+ }
470
+ }, {
471
+ "method": "fileRemoved",
472
+ "name": "fileRemoved",
473
+ "bubbles": true,
474
+ "cancelable": true,
475
+ "composed": true,
476
+ "docs": {
477
+ "tags": [],
478
+ "text": ""
479
+ },
480
+ "complexType": {
481
+ "original": "File",
482
+ "resolved": "File",
483
+ "references": {
484
+ "File": {
485
+ "location": "global",
486
+ "id": "global::File"
487
+ }
488
+ }
489
+ }
490
+ }];
491
+ }
492
+ static get methods() {
493
+ return {
494
+ "clearFiles": {
495
+ "complexType": {
496
+ "signature": "() => Promise<void>",
497
+ "parameters": [],
498
+ "references": {
499
+ "Promise": {
500
+ "location": "global",
501
+ "id": "global::Promise"
502
+ }
503
+ },
504
+ "return": "Promise<void>"
505
+ },
506
+ "docs": {
507
+ "text": "",
508
+ "tags": []
509
+ }
510
+ }
511
+ };
512
+ }
513
+ }
514
+ //# 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,MAAM,eAAe,CAAC;AACvG,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;QACtB,kBAAa,GAA8D,SAAS,CAAC;QACpD,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;QAe9B,iBAAY,GAAG,CAAC,KAAY,EAAE,EAAE;YACtC,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;YAC/C,MAAM,aAAa,G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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, EventEmitter, Event, h, Host, Prop, State, Fragment, Method } 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() buttonVariant: 'primary' | 'secondary' | 'ghost' | 'danger' | 'tertiary' = 'primary';\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 @Event() fileRemoved: EventEmitter<File>;\n\n private fileInput: HTMLInputElement;\n\n @Method()\n async clearFiles() {\n this.files = [];\n if (this.fileInput) {\n this.fileInput.value = '';\n }\n }\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 dotIndex = file.name.lastIndexOf('.');\n const extension = file.name.substring(dotIndex).toLowerCase();\n const isAccepted = this.accept.length === 0 || this.accept.some(type => type.toLowerCase() === extension);\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 if (this.files[index]) this.fileRemoved.emit(this.files[index]);\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 <xv-button-v2 variant={this.buttonVariant} disabled={this.disabled} onClick={() => this.fileInput.click()}>\n {this.addText || 'Dateien auswählen'}\n </xv-button-v2>\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.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 <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 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"]}