@infineon/infineon-design-system-stencil 37.3.1--canary.1960.d4dcc36e9d41a4a210e129ff6a7e0f326da46908.0 → 37.3.1--canary.1962.83919e8cc535190b1a71ae559b5f4da23b212d86.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. package/dist/cjs/framework-detection-795f52c2.js +139 -0
  2. package/dist/cjs/framework-detection-795f52c2.js.map +1 -0
  3. package/dist/cjs/ifx-accordion_2.cjs.entry.js +1 -1
  4. package/dist/cjs/ifx-alert_2.cjs.entry.js +1 -1
  5. package/dist/cjs/ifx-badge.cjs.entry.js +1 -1
  6. package/dist/cjs/ifx-basic-table.cjs.entry.js +1 -1
  7. package/dist/cjs/ifx-breadcrumb.cjs.entry.js +1 -1
  8. package/dist/cjs/ifx-button.cjs.entry.js +1 -1
  9. package/dist/cjs/ifx-card.cjs.entry.js +1 -1
  10. package/dist/cjs/ifx-checkbox-group.cjs.entry.js +1 -1
  11. package/dist/cjs/ifx-checkbox.cjs.entry.js +1 -1
  12. package/dist/cjs/ifx-chip_3.cjs.entry.js +1 -1
  13. package/dist/cjs/ifx-content-switcher.cjs.entry.js +1 -1
  14. package/dist/cjs/ifx-date-picker.cjs.entry.js +1 -1
  15. package/dist/cjs/ifx-dropdown.cjs.entry.js +1 -1
  16. package/dist/cjs/ifx-file-upload.cjs.entry.js +1 -1
  17. package/dist/cjs/ifx-footer.cjs.entry.js +1 -1
  18. package/dist/cjs/ifx-icon-button.cjs.entry.js +1 -1
  19. package/dist/cjs/ifx-icon.cjs.entry.js +1 -1
  20. package/dist/cjs/ifx-indicator.cjs.entry.js +1 -1
  21. package/dist/cjs/ifx-link.cjs.entry.js +1 -1
  22. package/dist/cjs/ifx-modal.cjs.entry.js +1 -1
  23. package/dist/cjs/ifx-multiselect_2.cjs.entry.js +1 -1
  24. package/dist/cjs/ifx-navbar.cjs.entry.js +1 -1
  25. package/dist/cjs/ifx-notification.cjs.entry.js +1 -1
  26. package/dist/cjs/ifx-progress-bar.cjs.entry.js +1 -1
  27. package/dist/cjs/ifx-radio-button-group.cjs.entry.js +1 -1
  28. package/dist/cjs/ifx-radio-button.cjs.entry.js +1 -1
  29. package/dist/cjs/ifx-search-bar.cjs.entry.js +1 -1
  30. package/dist/cjs/ifx-search-field.cjs.entry.js +1 -1
  31. package/dist/cjs/ifx-segmented-control.cjs.entry.js +2 -2
  32. package/dist/cjs/ifx-segmented-control.cjs.entry.js.map +1 -1
  33. package/dist/cjs/ifx-select.cjs.entry.js +1 -1
  34. package/dist/cjs/ifx-sidebar.cjs.entry.js +1 -1
  35. package/dist/cjs/ifx-slider.cjs.entry.js +1 -1
  36. package/dist/cjs/ifx-spinner_2.cjs.entry.js +1 -1
  37. package/dist/cjs/ifx-status.cjs.entry.js +1 -1
  38. package/dist/cjs/ifx-stepper.cjs.entry.js +1 -1
  39. package/dist/cjs/ifx-switch.cjs.entry.js +1 -1
  40. package/dist/cjs/ifx-table.cjs.entry.js +1 -1
  41. package/dist/cjs/ifx-tabs.cjs.entry.js +1 -1
  42. package/dist/cjs/ifx-tag.cjs.entry.js +1 -1
  43. package/dist/cjs/ifx-textarea.cjs.entry.js +1 -1
  44. package/dist/cjs/ifx-tooltip.cjs.entry.js +1 -1
  45. package/dist/cjs/ifx-tree-view.cjs.entry.js +1 -1
  46. package/dist/collection/components/segmented-control/segmented-control.css +1 -1
  47. package/dist/collection/global/utils/framework-detection.js +55 -32
  48. package/dist/collection/global/utils/framework-detection.js.map +1 -1
  49. package/dist/collection/global/utils/tracking.js +26 -3
  50. package/dist/collection/global/utils/tracking.js.map +1 -1
  51. package/dist/components/ifx-accordion-item.js +1 -1
  52. package/dist/components/ifx-accordion.js +1 -1
  53. package/dist/components/ifx-alert.js +1 -1
  54. package/dist/components/ifx-badge.js +1 -1
  55. package/dist/components/ifx-basic-table.js +1 -1
  56. package/dist/components/ifx-breadcrumb-item-label.js +1 -1
  57. package/dist/components/ifx-breadcrumb.js +1 -1
  58. package/dist/components/ifx-button.js +1 -1
  59. package/dist/components/ifx-card.js +1 -1
  60. package/dist/components/ifx-checkbox-group.js +2 -2
  61. package/dist/components/ifx-checkbox.js +1 -1
  62. package/dist/components/ifx-chip-item.js +1 -1
  63. package/dist/components/ifx-chip.js +1 -1
  64. package/dist/components/ifx-content-switcher.js +1 -1
  65. package/dist/components/ifx-date-picker.js +2 -2
  66. package/dist/components/ifx-download.js +1 -1
  67. package/dist/components/ifx-dropdown-item.js +1 -1
  68. package/dist/components/ifx-dropdown-trigger-button.js +2 -2
  69. package/dist/components/ifx-dropdown.js +1 -1
  70. package/dist/components/ifx-faq.js +3 -3
  71. package/dist/components/ifx-file-upload.js +5 -5
  72. package/dist/components/ifx-filter-accordion.js +2 -2
  73. package/dist/components/ifx-filter-bar.js +2 -2
  74. package/dist/components/ifx-filter-search.js +2 -2
  75. package/dist/components/ifx-footer.js +1 -1
  76. package/dist/components/ifx-icon-button.js +1 -1
  77. package/dist/components/ifx-icon.js +1 -1
  78. package/dist/components/ifx-icons-preview.js +4 -4
  79. package/dist/components/ifx-indicator.js +1 -1
  80. package/dist/components/ifx-link.js +1 -1
  81. package/dist/components/ifx-list-entry.js +3 -3
  82. package/dist/components/ifx-list.js +2 -2
  83. package/dist/components/ifx-modal.js +3 -3
  84. package/dist/components/ifx-multiselect-option.js +1 -1
  85. package/dist/components/ifx-multiselect.js +1 -1
  86. package/dist/components/ifx-navbar-item.js +2 -2
  87. package/dist/components/ifx-navbar.js +2 -2
  88. package/dist/components/ifx-notification.js +1 -1
  89. package/dist/components/ifx-overview-table.js +3 -3
  90. package/dist/components/ifx-pagination.js +1 -1
  91. package/dist/components/ifx-progress-bar.js +1 -1
  92. package/dist/components/ifx-radio-button-group.js +2 -2
  93. package/dist/components/ifx-radio-button.js +1 -1
  94. package/dist/components/ifx-search-bar.js +3 -3
  95. package/dist/components/ifx-search-field.js +1 -1
  96. package/dist/components/ifx-segment.js +1 -1
  97. package/dist/components/ifx-segmented-control.js +3 -3
  98. package/dist/components/ifx-segmented-control.js.map +1 -1
  99. package/dist/components/ifx-select.js +1 -1
  100. package/dist/components/ifx-set-filter.js +7 -7
  101. package/dist/components/ifx-sidebar-item.js +2 -2
  102. package/dist/components/ifx-sidebar.js +1 -1
  103. package/dist/components/ifx-slider.js +2 -2
  104. package/dist/components/ifx-spinner.js +1 -1
  105. package/dist/components/ifx-status.js +1 -1
  106. package/dist/components/ifx-step.js +1 -1
  107. package/dist/components/ifx-stepper.js +1 -1
  108. package/dist/components/ifx-switch.js +1 -1
  109. package/dist/components/ifx-table.js +10 -10
  110. package/dist/components/ifx-tabs.js +2 -2
  111. package/dist/components/ifx-tag.js +2 -2
  112. package/dist/components/ifx-template.js +1 -1
  113. package/dist/components/ifx-templates-ui.js +8 -8
  114. package/dist/components/ifx-text-field.js +1 -1
  115. package/dist/components/ifx-textarea.js +1 -1
  116. package/dist/components/ifx-tooltip.js +2 -2
  117. package/dist/components/ifx-tree-view-item.js +2 -2
  118. package/dist/components/ifx-tree-view.js +1 -1
  119. package/dist/components/{p-01a2a671.js → p-0891a1e4.js} +3 -3
  120. package/dist/components/{p-01a2a671.js.map → p-0891a1e4.js.map} +1 -1
  121. package/dist/components/p-0b7e3932.js +136 -0
  122. package/dist/components/p-0b7e3932.js.map +1 -0
  123. package/dist/components/{p-1256041d.js → p-12079b02.js} +3 -3
  124. package/dist/components/{p-1256041d.js.map → p-12079b02.js.map} +1 -1
  125. package/dist/components/{p-7531ab3a.js → p-269d60da.js} +5 -5
  126. package/dist/components/{p-7531ab3a.js.map → p-269d60da.js.map} +1 -1
  127. package/dist/components/{p-bb9b541f.js → p-34a026ea.js} +2 -2
  128. package/dist/components/{p-bb9b541f.js.map → p-34a026ea.js.map} +1 -1
  129. package/dist/components/{p-6ff767df.js → p-5142c6b5.js} +2 -2
  130. package/dist/components/{p-6ff767df.js.map → p-5142c6b5.js.map} +1 -1
  131. package/dist/components/{p-29a39b8c.js → p-756867aa.js} +2 -2
  132. package/dist/components/{p-29a39b8c.js.map → p-756867aa.js.map} +1 -1
  133. package/dist/components/{p-4f6ab2e4.js → p-7f5c998f.js} +3 -3
  134. package/dist/components/{p-4f6ab2e4.js.map → p-7f5c998f.js.map} +1 -1
  135. package/dist/components/{p-d202acba.js → p-82ad178b.js} +5 -5
  136. package/dist/components/{p-d202acba.js.map → p-82ad178b.js.map} +1 -1
  137. package/dist/components/{p-e7f270c1.js → p-82e2b9ce.js} +2 -2
  138. package/dist/components/{p-e7f270c1.js.map → p-82e2b9ce.js.map} +1 -1
  139. package/dist/components/{p-307b57c7.js → p-836549b9.js} +4 -4
  140. package/dist/components/{p-307b57c7.js.map → p-836549b9.js.map} +1 -1
  141. package/dist/components/{p-72aae821.js → p-84f900dd.js} +3 -3
  142. package/dist/components/{p-72aae821.js.map → p-84f900dd.js.map} +1 -1
  143. package/dist/components/{p-150988ec.js → p-c815b44d.js} +6 -6
  144. package/dist/components/{p-150988ec.js.map → p-c815b44d.js.map} +1 -1
  145. package/dist/components/{p-862de1e8.js → p-cf88f676.js} +3 -3
  146. package/dist/components/{p-862de1e8.js.map → p-cf88f676.js.map} +1 -1
  147. package/dist/components/{p-8eaa55a1.js → p-d30cb869.js} +3 -3
  148. package/dist/components/{p-8eaa55a1.js.map → p-d30cb869.js.map} +1 -1
  149. package/dist/components/{p-ed0f491c.js → p-d4c65148.js} +2 -2
  150. package/dist/components/{p-ed0f491c.js.map → p-d4c65148.js.map} +1 -1
  151. package/dist/components/{p-80bd74d1.js → p-dc61d0d8.js} +2 -2
  152. package/dist/components/{p-80bd74d1.js.map → p-dc61d0d8.js.map} +1 -1
  153. package/dist/components/{p-1f61ec38.js → p-dcc86ab5.js} +3 -3
  154. package/dist/components/{p-1f61ec38.js.map → p-dcc86ab5.js.map} +1 -1
  155. package/dist/components/{p-bfd161fb.js → p-e1d7d7e0.js} +2 -2
  156. package/dist/components/{p-bfd161fb.js.map → p-e1d7d7e0.js.map} +1 -1
  157. package/dist/components/{p-b8d74876.js → p-e6ea3dd5.js} +4 -4
  158. package/dist/components/{p-b8d74876.js.map → p-e6ea3dd5.js.map} +1 -1
  159. package/dist/components/{p-5084c36c.js → p-f39da6e2.js} +3 -3
  160. package/dist/components/{p-5084c36c.js.map → p-f39da6e2.js.map} +1 -1
  161. package/dist/components/{p-88385a57.js → p-fa638f41.js} +2 -2
  162. package/dist/components/{p-88385a57.js.map → p-fa638f41.js.map} +1 -1
  163. package/dist/components/{p-28bc54da.js → p-feb602bf.js} +2 -2
  164. package/dist/components/{p-28bc54da.js.map → p-feb602bf.js.map} +1 -1
  165. package/dist/esm/framework-detection-a9e48c00.js +136 -0
  166. package/dist/esm/framework-detection-a9e48c00.js.map +1 -0
  167. package/dist/esm/ifx-accordion_2.entry.js +1 -1
  168. package/dist/esm/ifx-alert_2.entry.js +1 -1
  169. package/dist/esm/ifx-badge.entry.js +1 -1
  170. package/dist/esm/ifx-basic-table.entry.js +1 -1
  171. package/dist/esm/ifx-breadcrumb.entry.js +1 -1
  172. package/dist/esm/ifx-button.entry.js +1 -1
  173. package/dist/esm/ifx-card.entry.js +1 -1
  174. package/dist/esm/ifx-checkbox-group.entry.js +1 -1
  175. package/dist/esm/ifx-checkbox.entry.js +1 -1
  176. package/dist/esm/ifx-chip_3.entry.js +1 -1
  177. package/dist/esm/ifx-content-switcher.entry.js +1 -1
  178. package/dist/esm/ifx-date-picker.entry.js +1 -1
  179. package/dist/esm/ifx-dropdown.entry.js +1 -1
  180. package/dist/esm/ifx-file-upload.entry.js +1 -1
  181. package/dist/esm/ifx-footer.entry.js +1 -1
  182. package/dist/esm/ifx-icon-button.entry.js +1 -1
  183. package/dist/esm/ifx-icon.entry.js +1 -1
  184. package/dist/esm/ifx-indicator.entry.js +1 -1
  185. package/dist/esm/ifx-link.entry.js +1 -1
  186. package/dist/esm/ifx-modal.entry.js +1 -1
  187. package/dist/esm/ifx-multiselect_2.entry.js +1 -1
  188. package/dist/esm/ifx-navbar.entry.js +1 -1
  189. package/dist/esm/ifx-notification.entry.js +1 -1
  190. package/dist/esm/ifx-progress-bar.entry.js +1 -1
  191. package/dist/esm/ifx-radio-button-group.entry.js +1 -1
  192. package/dist/esm/ifx-radio-button.entry.js +1 -1
  193. package/dist/esm/ifx-search-bar.entry.js +1 -1
  194. package/dist/esm/ifx-search-field.entry.js +1 -1
  195. package/dist/esm/ifx-segmented-control.entry.js +2 -2
  196. package/dist/esm/ifx-segmented-control.entry.js.map +1 -1
  197. package/dist/esm/ifx-select.entry.js +1 -1
  198. package/dist/esm/ifx-sidebar.entry.js +1 -1
  199. package/dist/esm/ifx-slider.entry.js +1 -1
  200. package/dist/esm/ifx-spinner_2.entry.js +1 -1
  201. package/dist/esm/ifx-status.entry.js +1 -1
  202. package/dist/esm/ifx-stepper.entry.js +1 -1
  203. package/dist/esm/ifx-switch.entry.js +1 -1
  204. package/dist/esm/ifx-table.entry.js +1 -1
  205. package/dist/esm/ifx-tabs.entry.js +1 -1
  206. package/dist/esm/ifx-tag.entry.js +1 -1
  207. package/dist/esm/ifx-textarea.entry.js +1 -1
  208. package/dist/esm/ifx-tooltip.entry.js +1 -1
  209. package/dist/esm/ifx-tree-view.entry.js +1 -1
  210. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
  211. package/dist/infineon-design-system-stencil/{p-431d50b8.entry.js → p-028befb2.entry.js} +2 -2
  212. package/dist/infineon-design-system-stencil/{p-2a4642d0.entry.js → p-0a0cc242.entry.js} +2 -2
  213. package/dist/infineon-design-system-stencil/p-0b7e3932.js +2 -0
  214. package/dist/infineon-design-system-stencil/p-0b7e3932.js.map +1 -0
  215. package/dist/infineon-design-system-stencil/{p-ef7802f4.entry.js → p-17a18bb3.entry.js} +2 -2
  216. package/dist/infineon-design-system-stencil/{p-d448d22c.entry.js → p-2de4e88b.entry.js} +2 -2
  217. package/dist/infineon-design-system-stencil/{p-bc216f6d.entry.js → p-37abe78e.entry.js} +2 -2
  218. package/dist/infineon-design-system-stencil/{p-0feebdea.entry.js → p-398d3e6d.entry.js} +2 -2
  219. package/dist/infineon-design-system-stencil/{p-97c37974.entry.js → p-478ef05a.entry.js} +2 -2
  220. package/dist/infineon-design-system-stencil/{p-74190965.entry.js → p-4a4683e4.entry.js} +2 -2
  221. package/dist/infineon-design-system-stencil/{p-bba99322.entry.js → p-4fdbb988.entry.js} +2 -2
  222. package/dist/infineon-design-system-stencil/{p-40be6362.entry.js → p-62e67c7f.entry.js} +2 -2
  223. package/dist/infineon-design-system-stencil/{p-51a70ef9.entry.js → p-64140027.entry.js} +2 -2
  224. package/dist/infineon-design-system-stencil/{p-24fa4b84.entry.js → p-6b07f33c.entry.js} +2 -2
  225. package/dist/infineon-design-system-stencil/{p-44a61708.entry.js → p-71053bca.entry.js} +2 -2
  226. package/dist/infineon-design-system-stencil/{p-218c8275.entry.js → p-7395eaf1.entry.js} +2 -2
  227. package/dist/infineon-design-system-stencil/{p-6417bc5b.entry.js → p-7ad769f2.entry.js} +2 -2
  228. package/dist/infineon-design-system-stencil/{p-bb8d7729.entry.js → p-80c5b899.entry.js} +2 -2
  229. package/dist/infineon-design-system-stencil/{p-b1f276a9.entry.js → p-8381c50c.entry.js} +2 -2
  230. package/dist/infineon-design-system-stencil/{p-9f4f024a.entry.js → p-850f7b94.entry.js} +2 -2
  231. package/dist/infineon-design-system-stencil/{p-a1d02e8e.entry.js → p-887c98c5.entry.js} +2 -2
  232. package/dist/infineon-design-system-stencil/{p-5f433868.entry.js → p-89df9e5b.entry.js} +2 -2
  233. package/dist/infineon-design-system-stencil/{p-9e9f166d.entry.js → p-8c28bdd3.entry.js} +2 -2
  234. package/dist/infineon-design-system-stencil/{p-7097e349.entry.js → p-8ddaf045.entry.js} +2 -2
  235. package/dist/infineon-design-system-stencil/{p-47e35811.entry.js → p-8ec18362.entry.js} +2 -2
  236. package/dist/infineon-design-system-stencil/{p-b51937f3.entry.js → p-9c0034e8.entry.js} +2 -2
  237. package/dist/infineon-design-system-stencil/{p-5c2386f1.entry.js → p-a41471be.entry.js} +2 -2
  238. package/dist/infineon-design-system-stencil/{p-77cbcda1.entry.js → p-abcb8b8e.entry.js} +2 -2
  239. package/dist/infineon-design-system-stencil/{p-754c7267.entry.js → p-ac355fae.entry.js} +2 -2
  240. package/dist/infineon-design-system-stencil/{p-c3acb336.entry.js → p-b2281ff5.entry.js} +2 -2
  241. package/dist/infineon-design-system-stencil/{p-816d8d89.entry.js → p-b240a009.entry.js} +2 -2
  242. package/dist/infineon-design-system-stencil/{p-0b4463ab.entry.js → p-b31fd761.entry.js} +2 -2
  243. package/dist/infineon-design-system-stencil/{p-486f1f73.entry.js → p-b3a14c64.entry.js} +2 -2
  244. package/dist/infineon-design-system-stencil/{p-29f36497.entry.js → p-b5f1873a.entry.js} +2 -2
  245. package/dist/infineon-design-system-stencil/{p-5976c2b0.entry.js → p-b65da53c.entry.js} +2 -2
  246. package/dist/infineon-design-system-stencil/{p-b7c74d53.entry.js → p-be44ffb5.entry.js} +2 -2
  247. package/dist/infineon-design-system-stencil/{p-7f9e8260.entry.js → p-c23ab684.entry.js} +2 -2
  248. package/dist/infineon-design-system-stencil/{p-507107be.entry.js → p-c24ab74b.entry.js} +2 -2
  249. package/dist/infineon-design-system-stencil/{p-2b6fa7ea.entry.js → p-c88e4036.entry.js} +2 -2
  250. package/dist/infineon-design-system-stencil/{p-f47071d5.entry.js → p-cb4130b5.entry.js} +2 -2
  251. package/dist/infineon-design-system-stencil/p-d6253110.entry.js +2 -0
  252. package/dist/infineon-design-system-stencil/{p-5dc39c88.entry.js.map → p-d6253110.entry.js.map} +1 -1
  253. package/dist/infineon-design-system-stencil/{p-ce0db9fb.entry.js → p-d78cd447.entry.js} +2 -2
  254. package/dist/infineon-design-system-stencil/{p-13ae34b7.entry.js → p-dff719b2.entry.js} +2 -2
  255. package/dist/infineon-design-system-stencil/{p-8f3c079e.entry.js → p-f7092bc1.entry.js} +2 -2
  256. package/package.json +1 -1
  257. package/dist/cjs/framework-detection-78986016.js +0 -93
  258. package/dist/cjs/framework-detection-78986016.js.map +0 -1
  259. package/dist/components/p-e8504e6b.js +0 -90
  260. package/dist/components/p-e8504e6b.js.map +0 -1
  261. package/dist/esm/framework-detection-198a17af.js +0 -90
  262. package/dist/esm/framework-detection-198a17af.js.map +0 -1
  263. package/dist/infineon-design-system-stencil/p-5dc39c88.entry.js +0 -2
  264. package/dist/infineon-design-system-stencil/p-e8504e6b.js +0 -2
  265. package/dist/infineon-design-system-stencil/p-e8504e6b.js.map +0 -1
  266. /package/dist/infineon-design-system-stencil/{p-431d50b8.entry.js.map → p-028befb2.entry.js.map} +0 -0
  267. /package/dist/infineon-design-system-stencil/{p-2a4642d0.entry.js.map → p-0a0cc242.entry.js.map} +0 -0
  268. /package/dist/infineon-design-system-stencil/{p-ef7802f4.entry.js.map → p-17a18bb3.entry.js.map} +0 -0
  269. /package/dist/infineon-design-system-stencil/{p-d448d22c.entry.js.map → p-2de4e88b.entry.js.map} +0 -0
  270. /package/dist/infineon-design-system-stencil/{p-bc216f6d.entry.js.map → p-37abe78e.entry.js.map} +0 -0
  271. /package/dist/infineon-design-system-stencil/{p-0feebdea.entry.js.map → p-398d3e6d.entry.js.map} +0 -0
  272. /package/dist/infineon-design-system-stencil/{p-97c37974.entry.js.map → p-478ef05a.entry.js.map} +0 -0
  273. /package/dist/infineon-design-system-stencil/{p-74190965.entry.js.map → p-4a4683e4.entry.js.map} +0 -0
  274. /package/dist/infineon-design-system-stencil/{p-bba99322.entry.js.map → p-4fdbb988.entry.js.map} +0 -0
  275. /package/dist/infineon-design-system-stencil/{p-40be6362.entry.js.map → p-62e67c7f.entry.js.map} +0 -0
  276. /package/dist/infineon-design-system-stencil/{p-51a70ef9.entry.js.map → p-64140027.entry.js.map} +0 -0
  277. /package/dist/infineon-design-system-stencil/{p-24fa4b84.entry.js.map → p-6b07f33c.entry.js.map} +0 -0
  278. /package/dist/infineon-design-system-stencil/{p-44a61708.entry.js.map → p-71053bca.entry.js.map} +0 -0
  279. /package/dist/infineon-design-system-stencil/{p-218c8275.entry.js.map → p-7395eaf1.entry.js.map} +0 -0
  280. /package/dist/infineon-design-system-stencil/{p-6417bc5b.entry.js.map → p-7ad769f2.entry.js.map} +0 -0
  281. /package/dist/infineon-design-system-stencil/{p-bb8d7729.entry.js.map → p-80c5b899.entry.js.map} +0 -0
  282. /package/dist/infineon-design-system-stencil/{p-b1f276a9.entry.js.map → p-8381c50c.entry.js.map} +0 -0
  283. /package/dist/infineon-design-system-stencil/{p-9f4f024a.entry.js.map → p-850f7b94.entry.js.map} +0 -0
  284. /package/dist/infineon-design-system-stencil/{p-a1d02e8e.entry.js.map → p-887c98c5.entry.js.map} +0 -0
  285. /package/dist/infineon-design-system-stencil/{p-5f433868.entry.js.map → p-89df9e5b.entry.js.map} +0 -0
  286. /package/dist/infineon-design-system-stencil/{p-9e9f166d.entry.js.map → p-8c28bdd3.entry.js.map} +0 -0
  287. /package/dist/infineon-design-system-stencil/{p-7097e349.entry.js.map → p-8ddaf045.entry.js.map} +0 -0
  288. /package/dist/infineon-design-system-stencil/{p-47e35811.entry.js.map → p-8ec18362.entry.js.map} +0 -0
  289. /package/dist/infineon-design-system-stencil/{p-b51937f3.entry.js.map → p-9c0034e8.entry.js.map} +0 -0
  290. /package/dist/infineon-design-system-stencil/{p-5c2386f1.entry.js.map → p-a41471be.entry.js.map} +0 -0
  291. /package/dist/infineon-design-system-stencil/{p-77cbcda1.entry.js.map → p-abcb8b8e.entry.js.map} +0 -0
  292. /package/dist/infineon-design-system-stencil/{p-754c7267.entry.js.map → p-ac355fae.entry.js.map} +0 -0
  293. /package/dist/infineon-design-system-stencil/{p-c3acb336.entry.js.map → p-b2281ff5.entry.js.map} +0 -0
  294. /package/dist/infineon-design-system-stencil/{p-816d8d89.entry.js.map → p-b240a009.entry.js.map} +0 -0
  295. /package/dist/infineon-design-system-stencil/{p-0b4463ab.entry.js.map → p-b31fd761.entry.js.map} +0 -0
  296. /package/dist/infineon-design-system-stencil/{p-486f1f73.entry.js.map → p-b3a14c64.entry.js.map} +0 -0
  297. /package/dist/infineon-design-system-stencil/{p-29f36497.entry.js.map → p-b5f1873a.entry.js.map} +0 -0
  298. /package/dist/infineon-design-system-stencil/{p-5976c2b0.entry.js.map → p-b65da53c.entry.js.map} +0 -0
  299. /package/dist/infineon-design-system-stencil/{p-b7c74d53.entry.js.map → p-be44ffb5.entry.js.map} +0 -0
  300. /package/dist/infineon-design-system-stencil/{p-7f9e8260.entry.js.map → p-c23ab684.entry.js.map} +0 -0
  301. /package/dist/infineon-design-system-stencil/{p-507107be.entry.js.map → p-c24ab74b.entry.js.map} +0 -0
  302. /package/dist/infineon-design-system-stencil/{p-2b6fa7ea.entry.js.map → p-c88e4036.entry.js.map} +0 -0
  303. /package/dist/infineon-design-system-stencil/{p-f47071d5.entry.js.map → p-cb4130b5.entry.js.map} +0 -0
  304. /package/dist/infineon-design-system-stencil/{p-ce0db9fb.entry.js.map → p-d78cd447.entry.js.map} +0 -0
  305. /package/dist/infineon-design-system-stencil/{p-13ae34b7.entry.js.map → p-dff719b2.entry.js.map} +0 -0
  306. /package/dist/infineon-design-system-stencil/{p-8f3c079e.entry.js.map → p-f7092bc1.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{r as o,h as r,g as e}from"./p-b7a462e5.js";import{d as n,t as d}from"./p-e8504e6b.js";import{i}from"./p-1ecafb97.js";const a=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:inline-block}.container{display:flex;min-height:1.25em;align-items:center;padding:0 8px;border-radius:9999px;font-family:var(--ifx-font-family)}.container.no-border{padding:0}.container.border-engineering-100{border:1px solid #F7F7F7}.container.border-engineering-200{border:1px solid #EEEDED}.container.border-engineering-300{border:1px solid #BFBBBB}.container.border-engineering-400{border:1px solid #8D8786}.container.border-engineering-500{border:1px solid #575352}.container.border-engineering-600{border:1px solid #3C3A39}.container.border-ocean-100{border:1px solid #DFF4F3}.container.border-ocean-200{border:1px solid #B8DEDA}.container.border-ocean-300{border:1px solid #6CB4AD}.container.border-ocean-400{border:1px solid #3B9B91}.container.border-ocean-500{border:1px solid #0A8276}.container.border-ocean-600{border:1px solid #08665C}.container.border-ocean-700{border:1px solid #06534B}.container.border-red-500{border:1px solid #CD002F}.container.border-red-600{border:1px solid #A2001E}.container.border-red-700{border:1px solid #900021}.container.border-orange-500{border:1px solid #E16B25}.container.border-green-500{border:1px solid #4CA460}.container.border-lawn-400{border:1px solid #B9D257}.container.border-lawn-500{border:1px solid #9BBA43}.container.border-lawn-700{border:1px solid #3C6C0F}.container.border-berry-400{border:1px solid #BE3283}.container.border-berry-500{border:1px solid #9C216E}.container.border-sun-400{border:1px solid #FF9737}.container.border-sun-500{border:1px solid #F97414}.container.border-sand-400{border:1px solid #FBE273}.container.border-sand-500{border:1px solid #FCD442}.text{margin:0;padding-left:4px;font-style:normal;font-weight:600;font-size:1rem;line-height:1.25rem;display:inline;color:#1D1D1D}.dot{display:inline-block;width:8px;height:8px;border-radius:9999px}.dot.engineering-100{background-color:#F7F7F7}.dot.engineering-200{background-color:#EEEDED}.dot.engineering-300{background-color:#BFBBBB}.dot.engineering-400{background-color:#8D8786}.dot.engineering-500{background-color:#575352}.dot.engineering-600{background-color:#3C3A39}.dot.ocean-100{background-color:#DFF4F3}.dot.ocean-200{background-color:#B8DEDA}.dot.ocean-300{background-color:#6CB4AD}.dot.ocean-400{background-color:#3B9B91}.dot.ocean-500{background-color:#0A8276}.dot.ocean-600{background-color:#08665C}.dot.ocean-700{background-color:#06534B}.dot.red-500{background-color:#CD002F}.dot.red-600{background-color:#A2001E}.dot.red-700{background-color:#900021}.dot.orange-500{background-color:#E16B25}.dot.green-500{background-color:#4CA460}.dot.lawn-400{background-color:#B9D257}.dot.lawn-500{background-color:#9BBA43}.dot.lawn-700{background-color:#3C6C0F}.dot.berry-400{background-color:#BE3283}.dot.berry-500{background-color:#9C216E}.dot.sun-400{background-color:#FF9737}.dot.sun-500{background-color:#F97414}.dot.sand-400{background-color:#FBE273}.dot.sand-500{background-color:#FCD442}';const c=a;const t=class{constructor(r){o(this,r);this.border=false;this.color="orange-500"}componentWillLoad(){if(!i(this.el)){const o=n();d("ifx-status",o)}}render(){var o;const e=((o=this.color)===null||o===void 0?void 0:o.trim())?this.color:"orange-500";const n=this.border?`container border-${e}`:"container no-border";return r("div",{key:"e59c9709a120a139f2ae8aeb134eb111661b9f4f","aria-label":"a status indicator","aria-value":this.label,class:n},r("span",{key:"0283879f8d95d0b6679044c30fd34718813de0d6",class:`dot ${e}`}),r("p",{key:"3afcf903285d55715bcdd2e13f862298d9eda67a",class:"text"},this.label))}get el(){return e(this)}};t.style=c;export{t as ifx_status};
2
- //# sourceMappingURL=p-b7c74d53.entry.js.map
1
+ import{r as o,h as r,g as e}from"./p-b7a462e5.js";import{d as n,t as d}from"./p-0b7e3932.js";import{i}from"./p-1ecafb97.js";const a=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:inline-block}.container{display:flex;min-height:1.25em;align-items:center;padding:0 8px;border-radius:9999px;font-family:var(--ifx-font-family)}.container.no-border{padding:0}.container.border-engineering-100{border:1px solid #F7F7F7}.container.border-engineering-200{border:1px solid #EEEDED}.container.border-engineering-300{border:1px solid #BFBBBB}.container.border-engineering-400{border:1px solid #8D8786}.container.border-engineering-500{border:1px solid #575352}.container.border-engineering-600{border:1px solid #3C3A39}.container.border-ocean-100{border:1px solid #DFF4F3}.container.border-ocean-200{border:1px solid #B8DEDA}.container.border-ocean-300{border:1px solid #6CB4AD}.container.border-ocean-400{border:1px solid #3B9B91}.container.border-ocean-500{border:1px solid #0A8276}.container.border-ocean-600{border:1px solid #08665C}.container.border-ocean-700{border:1px solid #06534B}.container.border-red-500{border:1px solid #CD002F}.container.border-red-600{border:1px solid #A2001E}.container.border-red-700{border:1px solid #900021}.container.border-orange-500{border:1px solid #E16B25}.container.border-green-500{border:1px solid #4CA460}.container.border-lawn-400{border:1px solid #B9D257}.container.border-lawn-500{border:1px solid #9BBA43}.container.border-lawn-700{border:1px solid #3C6C0F}.container.border-berry-400{border:1px solid #BE3283}.container.border-berry-500{border:1px solid #9C216E}.container.border-sun-400{border:1px solid #FF9737}.container.border-sun-500{border:1px solid #F97414}.container.border-sand-400{border:1px solid #FBE273}.container.border-sand-500{border:1px solid #FCD442}.text{margin:0;padding-left:4px;font-style:normal;font-weight:600;font-size:1rem;line-height:1.25rem;display:inline;color:#1D1D1D}.dot{display:inline-block;width:8px;height:8px;border-radius:9999px}.dot.engineering-100{background-color:#F7F7F7}.dot.engineering-200{background-color:#EEEDED}.dot.engineering-300{background-color:#BFBBBB}.dot.engineering-400{background-color:#8D8786}.dot.engineering-500{background-color:#575352}.dot.engineering-600{background-color:#3C3A39}.dot.ocean-100{background-color:#DFF4F3}.dot.ocean-200{background-color:#B8DEDA}.dot.ocean-300{background-color:#6CB4AD}.dot.ocean-400{background-color:#3B9B91}.dot.ocean-500{background-color:#0A8276}.dot.ocean-600{background-color:#08665C}.dot.ocean-700{background-color:#06534B}.dot.red-500{background-color:#CD002F}.dot.red-600{background-color:#A2001E}.dot.red-700{background-color:#900021}.dot.orange-500{background-color:#E16B25}.dot.green-500{background-color:#4CA460}.dot.lawn-400{background-color:#B9D257}.dot.lawn-500{background-color:#9BBA43}.dot.lawn-700{background-color:#3C6C0F}.dot.berry-400{background-color:#BE3283}.dot.berry-500{background-color:#9C216E}.dot.sun-400{background-color:#FF9737}.dot.sun-500{background-color:#F97414}.dot.sand-400{background-color:#FBE273}.dot.sand-500{background-color:#FCD442}';const c=a;const t=class{constructor(r){o(this,r);this.border=false;this.color="orange-500"}componentWillLoad(){if(!i(this.el)){const o=n();d("ifx-status",o)}}render(){var o;const e=((o=this.color)===null||o===void 0?void 0:o.trim())?this.color:"orange-500";const n=this.border?`container border-${e}`:"container no-border";return r("div",{key:"e59c9709a120a139f2ae8aeb134eb111661b9f4f","aria-label":"a status indicator","aria-value":this.label,class:n},r("span",{key:"0283879f8d95d0b6679044c30fd34718813de0d6",class:`dot ${e}`}),r("p",{key:"3afcf903285d55715bcdd2e13f862298d9eda67a",class:"text"},this.label))}get el(){return e(this)}};t.style=c;export{t as ifx_status};
2
+ //# sourceMappingURL=p-be44ffb5.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as i,c as s,h as t,g as h}from"./p-b7a462e5.js";import{d as e,t as a}from"./p-e8504e6b.js";import{i as n}from"./p-1ecafb97.js";import{c as o}from"./p-e459974a.js";const l=":host{display:inline-block}";const r=l;const d=class{constructor(t){i(this,t);this.ifxOpen=s(this,"ifxOpen",7);this.ifxClose=s(this,"ifxClose",7);this.ifxDropdown=s(this,"ifxDropdown",7);this.placement="bottom-start";this.defaultOpen=false;this.internalIsOpen=false;this.noAppendToBody=false;this.noCloseOnOutsideClick=false;this.noCloseOnMenuClick=false}componentWillLoad(){this.updateSlotContent();this.watchHandlerIsOpen(this.defaultOpen,this.internalIsOpen);if(!n(this.el)){const i=e();a("ifx-dropdown",i)}}watchHandlerIsOpen(i,s){if(i!==s&&i!==this.internalIsOpen){if(i){this.openDropdown()}else{this.closeDropdown()}}}watchHandlerDisabled(i){if(this.trigger){this.trigger.disabled=i}}watchHandlerSlot(){this.updateSlotContent()}updateSlotContent(){this.trigger=this.el.querySelector("ifx-dropdown-trigger-button, ifx-dropdown-trigger");if(this.trigger){this.trigger.disabled=this.disabled;this.trigger.removeEventListener("click",this.triggerClickHandler.bind(this));this.trigger.addEventListener("click",this.triggerClickHandler.bind(this))}if(!this.noAppendToBody){if(this.menu){this.menu.remove()}this.menu=this.el.querySelector("ifx-dropdown-menu");document.body.append(this.menu)}else{this.menu=this.el.querySelector("ifx-dropdown-menu")}this.menu.removeEventListener("click",this.menuClickHandler.bind(this));this.menu.addEventListener("click",this.menuClickHandler.bind(this))}menuClickHandler(){if(!this.noCloseOnMenuClick){this.closeDropdown()}}triggerClickHandler(){if(!this.internalIsOpen){this.openDropdown()}else{this.closeDropdown()}}disconnectedCallback(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}if(this.menu){this.menu.remove()}}async isOpen(){return this.internalIsOpen}async closeDropdown(){if(this.internalIsOpen){this.internalIsOpen=false;this.trigger.isOpen=false;this.menu.isOpen=false;this.ifxClose.emit()}if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}}async openDropdown(){if(!this.internalIsOpen&&!this.disabled){this.internalIsOpen=true;this.trigger.isOpen=true;this.menu.isOpen=true;this.popperInstance=o(this.el,this.menu,{placement:this.placement});this.ifxOpen.emit()}}handleOutsideClick(i){const s=i.target;if(!this.noCloseOnOutsideClick&&!this.el.contains(s)&&!this.menu.contains(s)){this.closeDropdown()}}render(){return t("div",{key:"123f4d812d530e3eb1aa0cb1ce8e1320a9eb7548","aria-label":"dropdown menu",class:"dropdown"},t("slot",{key:"1379248d96c14ab493a2b56b819e9a026cd8ff1b"}))}get el(){return h(this)}static get watchers(){return{defaultOpen:["watchHandlerIsOpen"],disabled:["watchHandlerDisabled"]}}};d.style=r;export{d as ifx_dropdown};
2
- //# sourceMappingURL=p-7f9e8260.entry.js.map
1
+ import{r as i,c as s,h as t,g as h}from"./p-b7a462e5.js";import{d as e,t as a}from"./p-0b7e3932.js";import{i as n}from"./p-1ecafb97.js";import{c as o}from"./p-e459974a.js";const l=":host{display:inline-block}";const r=l;const d=class{constructor(t){i(this,t);this.ifxOpen=s(this,"ifxOpen",7);this.ifxClose=s(this,"ifxClose",7);this.ifxDropdown=s(this,"ifxDropdown",7);this.placement="bottom-start";this.defaultOpen=false;this.internalIsOpen=false;this.noAppendToBody=false;this.noCloseOnOutsideClick=false;this.noCloseOnMenuClick=false}componentWillLoad(){this.updateSlotContent();this.watchHandlerIsOpen(this.defaultOpen,this.internalIsOpen);if(!n(this.el)){const i=e();a("ifx-dropdown",i)}}watchHandlerIsOpen(i,s){if(i!==s&&i!==this.internalIsOpen){if(i){this.openDropdown()}else{this.closeDropdown()}}}watchHandlerDisabled(i){if(this.trigger){this.trigger.disabled=i}}watchHandlerSlot(){this.updateSlotContent()}updateSlotContent(){this.trigger=this.el.querySelector("ifx-dropdown-trigger-button, ifx-dropdown-trigger");if(this.trigger){this.trigger.disabled=this.disabled;this.trigger.removeEventListener("click",this.triggerClickHandler.bind(this));this.trigger.addEventListener("click",this.triggerClickHandler.bind(this))}if(!this.noAppendToBody){if(this.menu){this.menu.remove()}this.menu=this.el.querySelector("ifx-dropdown-menu");document.body.append(this.menu)}else{this.menu=this.el.querySelector("ifx-dropdown-menu")}this.menu.removeEventListener("click",this.menuClickHandler.bind(this));this.menu.addEventListener("click",this.menuClickHandler.bind(this))}menuClickHandler(){if(!this.noCloseOnMenuClick){this.closeDropdown()}}triggerClickHandler(){if(!this.internalIsOpen){this.openDropdown()}else{this.closeDropdown()}}disconnectedCallback(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}if(this.menu){this.menu.remove()}}async isOpen(){return this.internalIsOpen}async closeDropdown(){if(this.internalIsOpen){this.internalIsOpen=false;this.trigger.isOpen=false;this.menu.isOpen=false;this.ifxClose.emit()}if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}}async openDropdown(){if(!this.internalIsOpen&&!this.disabled){this.internalIsOpen=true;this.trigger.isOpen=true;this.menu.isOpen=true;this.popperInstance=o(this.el,this.menu,{placement:this.placement});this.ifxOpen.emit()}}handleOutsideClick(i){const s=i.target;if(!this.noCloseOnOutsideClick&&!this.el.contains(s)&&!this.menu.contains(s)){this.closeDropdown()}}render(){return t("div",{key:"123f4d812d530e3eb1aa0cb1ce8e1320a9eb7548","aria-label":"dropdown menu",class:"dropdown"},t("slot",{key:"1379248d96c14ab493a2b56b819e9a026cd8ff1b"}))}get el(){return h(this)}static get watchers(){return{defaultOpen:["watchHandlerIsOpen"],disabled:["watchHandlerDisabled"]}}};d.style=r;export{d as ifx_dropdown};
2
+ //# sourceMappingURL=p-c23ab684.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,h as t,a as n,g as o}from"./p-b7a462e5.js";import{d as i,t as d}from"./p-e8504e6b.js";import{i as a}from"./p-1ecafb97.js";import{c as r}from"./p-5cdc6210.js";const s=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{vertical-align:bottom;display:inline-flex;width:var(--bw, fit-content)}.btn{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;height:40px;padding:0px 16px;gap:8px;color:#FFFFFF;font-weight:600;border-radius:1px;line-height:1.5rem;font-family:var(--ifx-font-family);font-style:normal;text-decoration:none;user-select:none;font-size:1rem;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;width:var(--bw, fit-content)}.btn:not(.disabled){cursor:pointer}.btn.disabled{pointer-events:none}.btn-default{color:#FFFFFF;background-color:#0A8276}.btn-default:disabled,.btn-default.disabled{background-color:#BFBBBB;color:#FFFFFF;pointer-events:none}.btn-secondary-default{background-color:#FFFFFF;color:#0A8276;border:1px solid #0A8276}.btn-secondary-default:disabled,.btn-secondary-default.disabled{background-color:#FFFFFF;border:1px solid #BFBBBB;color:#BFBBBB;pointer-events:none}.btn-tertiary-default{background-color:transparent;color:#0A8276}.btn-tertiary-default:disabled,.btn-tertiary-default.disabled{color:#BFBBBB;pointer-events:none}.btn-danger{color:#FFFFFF;background-color:#CD002F;border-color:#CD002F}.btn-danger:disabled,.btn-danger.disabled{background-color:#BFBBBB;color:#FFFFFF;pointer-events:none}.btn-secondary-danger{background-color:#FFFFFF;color:#CD002F;border:1px solid #CD002F}.btn-secondary-danger:disabled,.btn-secondary-danger.disabled{background-color:#FFFFFF;border:1px solid #BFBBBB;color:#BFBBBB;pointer-events:none}.btn-tertiary-danger{background-color:transparent;color:#CD002F}.btn-tertiary-danger:disabled,.btn-tertiary-danger.disabled{background-color:#FFFFFF;color:#BFBBBB;pointer-events:none}.btn-inverse{color:#0A8276;background-color:#FFFFFF}.btn-inverse:disabled,.btn-inverse.disabled{opacity:1;background-color:#FFFFFF;color:#0A8276;pointer-events:none}.btn-secondary-inverse{color:#FFFFFF;border:1px solid #FFFFFF}.btn-secondary-inverse:disabled,.btn-secondary-inverse.disabled{border:1px solid #FFFFFF;color:#FFFFFF;pointer-events:none}.btn-tertiary-inverse{color:#FFFFFF}.btn-tertiary-inverse:disabled,.btn-tertiary-inverse.disabled{color:#FFFFFF;opacity:1;pointer-events:none}.btn ifx-icon:empty{display:none}.btn.btn-xs{font-size:0.875rem;height:32px;line-height:1rem}.btn.btn-s{font-size:0.875rem;height:36px;line-height:1.25rem}.btn.btn-l{font-size:1.25rem;height:48px;line-height:1.75rem}.btn.btn-default:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #0A8276}.btn.btn-default:not(:disabled,.disabled):hover{background-color:#08665C}.btn.btn-default:not(:disabled,.disabled):active,.btn.btn-default:not(:disabled,.disabled).active{background-color:#06534B}.btn.btn-secondary-default:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #0A8276}.btn.btn-secondary-default:not(:disabled,.disabled):hover{color:#FFFFFF;background-color:#08665C}.btn.btn-secondary-default:not(:disabled,.disabled):active,.btn.btn-secondary-default:not(:disabled,.disabled).active{background-color:#06534B}.btn.btn-secondary:not(:disabled,.disabled):hover{background-color:#9C216E}.btn.btn-secondary:not(:disabled,.disabled):active,.btn.btn-secondary:not(:disabled,.disabled).active{background-color:#9C216E}.btn.btn-danger:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #0A8276}.btn.btn-danger:not(:disabled,.disabled):hover{background-color:#A2001E}.btn.btn-danger:not(:disabled,.disabled):active,.btn.btn-danger:not(:disabled,.disabled).active{background-color:#900021}.btn.btn-secondary-danger:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #0A8276}.btn.btn-secondary-danger:not(:disabled,.disabled):hover{color:#FFFFFF;background-color:#A2001E}.btn.btn-secondary-danger:not(:disabled,.disabled):active,.btn.btn-secondary-danger:not(:disabled,.disabled).active{background-color:#900021}.btn.btn-inverse:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #0A8276, 0 0 0 4px #FFFFFF}.btn.btn-inverse:not(:disabled,.disabled):hover{background-color:#EEEDED}.btn.btn-inverse:not(:disabled,.disabled):active,.btn.btn-inverse:not(:disabled,.disabled).active{background-color:#BFBBBB}.btn.btn-secondary-inverse:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #0A8276, 0 0 0 4px #FFFFFF}.btn.btn-secondary-inverse:not(:disabled,.disabled):hover{color:#0A8276;background-color:#EEEDED}.btn.btn-secondary-inverse:not(:disabled,.disabled):active,.btn.btn-secondary-inverse:not(:disabled,.disabled).active{color:#0A8276;background-color:#BFBBBB}.btn.btn-tertiary-default:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #08665C}.btn.btn-tertiary-default:not(:disabled,.disabled):hover{color:#08665C}.btn.btn-tertiary-default:not(:disabled,.disabled):active,.btn.btn-tertiary-default:not(:disabled,.disabled).active{color:#06534B}.btn.btn-tertiary-danger:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #A2001E}.btn.btn-tertiary-danger:not(:disabled,.disabled):hover{color:#A2001E}.btn.btn-tertiary-danger:not(:disabled,.disabled):active,.btn.btn-tertiary-danger:not(:disabled,.disabled).active{color:#900021}.btn.btn-tertiary-inverse:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #0A8276, 0 0 0 4px #FFFFFF}.btn.btn-tertiary-inverse:not(:disabled,.disabled):hover{color:#EEEDED}.btn.btn-tertiary-inverse:not(:disabled,.disabled):active,.btn.btn-tertiary-inverse:not(:disabled,.disabled).active{color:#BFBBBB}';const b=s;const l=class{constructor(t){e(this,t);this.variant="primary";this.theme="default";this.size="m";this.disabled=false;this.target="_self";this.type="button";this.fullWidth=false;this.handleClick=e=>{if(this.el.shadowRoot){const t=this.el.closest("form");if(t){e.preventDefault();if(this.type==="reset"){this.resetClickHandler()}else{const e=document.createElement("button");if(this.type){e.type=this.type}e.style.display="none";t.appendChild(e);e.click();e.remove()}}}}}setInternalHref(e){this.internalHref=e}async setFocus(){this.focusableElement.focus()}insertNativeButton(){this.nativeButton=document.createElement("button");this.nativeButton.type=this.type;this.nativeButton.style.display="none";this.el.closest("form").appendChild(this.nativeButton)}handleFormAndInternalHref(){if(this.el.closest("form")){if(this.el.href){this.el.internalHref=undefined}this.insertNativeButton()}else{this.internalHref=this.href}}handleButtonWidth(){if(this.fullWidth){this.el.style.setProperty("--bw","100%")}else{this.el.style.setProperty("--bw","fit-content")}}componentWillLoad(){this.handleFormAndInternalHref();if(!a(this.el)){const e=i();d("ifx-button",e)}}componentWillRender(){this.handleButtonWidth()}resetClickHandler(){const e=this.el.closest("form");const t=e.querySelectorAll("ifx-text-field, ifx-textarea");t.forEach((e=>{e.reset()}))}handleKeyDown(e){if(e.key===" "||e.key==="Enter"&&!this.disabled){this.focusableElement.click()}}handleHostClick(e){if(this.disabled===true){e.stopImmediatePropagation()}}handleFocus(e){if(this.disabled){e.preventDefault();this.focusableElement.blur()}}render(){return t(n,{key:"4f6edce27cacd5d9859790e028cabf756b65463b"},t("a",{key:"d3a7759dbd2ed5128c5919e187c70ee82abfc643",role:this.href?"link":"button",tabIndex:this.disabled?-1:0,ref:e=>this.focusableElement=e,class:this.getClassNames(),href:!this.disabled?this.internalHref:undefined,target:this.target,onClick:this.handleClick,rel:this.target==="_blank"?"noopener noreferrer":undefined,onFocus:e=>this.handleFocus(e),"aria-disabled":this.disabled?"true":null,"aria-describedby":this.theme==="danger"?"Dangerous action":undefined,"aria-label":this.ariaLabel||undefined},t("slot",{key:"54e7e801f580008fc48688446cf58b304c283067"})))}getVariantClass(){return`${this.variant}`==="secondary"?`secondary-${this.theme}`:`${this.variant}`==="tertiary"?`tertiary-${this.theme}`:`${this.theme}`}getSizeClass(){if(`${this.size}`==="xs"){return"xs"}else if(`${this.size}`==="s"){return"s"}else if(`${this.size}`==="l"){return"l"}else return""}getClassNames(){return r("btn",this.size&&`btn-${this.getSizeClass()}`,`btn-${this.getVariantClass()}`,this.disabled?"disabled":"")}get el(){return o(this)}static get watchers(){return{href:["setInternalHref"]}}};l.style=b;export{l as ifx_button};
2
- //# sourceMappingURL=p-507107be.entry.js.map
1
+ import{r as e,h as t,a as n,g as o}from"./p-b7a462e5.js";import{d as i,t as d}from"./p-0b7e3932.js";import{i as a}from"./p-1ecafb97.js";import{c as r}from"./p-5cdc6210.js";const s=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{vertical-align:bottom;display:inline-flex;width:var(--bw, fit-content)}.btn{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;height:40px;padding:0px 16px;gap:8px;color:#FFFFFF;font-weight:600;border-radius:1px;line-height:1.5rem;font-family:var(--ifx-font-family);font-style:normal;text-decoration:none;user-select:none;font-size:1rem;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;width:var(--bw, fit-content)}.btn:not(.disabled){cursor:pointer}.btn.disabled{pointer-events:none}.btn-default{color:#FFFFFF;background-color:#0A8276}.btn-default:disabled,.btn-default.disabled{background-color:#BFBBBB;color:#FFFFFF;pointer-events:none}.btn-secondary-default{background-color:#FFFFFF;color:#0A8276;border:1px solid #0A8276}.btn-secondary-default:disabled,.btn-secondary-default.disabled{background-color:#FFFFFF;border:1px solid #BFBBBB;color:#BFBBBB;pointer-events:none}.btn-tertiary-default{background-color:transparent;color:#0A8276}.btn-tertiary-default:disabled,.btn-tertiary-default.disabled{color:#BFBBBB;pointer-events:none}.btn-danger{color:#FFFFFF;background-color:#CD002F;border-color:#CD002F}.btn-danger:disabled,.btn-danger.disabled{background-color:#BFBBBB;color:#FFFFFF;pointer-events:none}.btn-secondary-danger{background-color:#FFFFFF;color:#CD002F;border:1px solid #CD002F}.btn-secondary-danger:disabled,.btn-secondary-danger.disabled{background-color:#FFFFFF;border:1px solid #BFBBBB;color:#BFBBBB;pointer-events:none}.btn-tertiary-danger{background-color:transparent;color:#CD002F}.btn-tertiary-danger:disabled,.btn-tertiary-danger.disabled{background-color:#FFFFFF;color:#BFBBBB;pointer-events:none}.btn-inverse{color:#0A8276;background-color:#FFFFFF}.btn-inverse:disabled,.btn-inverse.disabled{opacity:1;background-color:#FFFFFF;color:#0A8276;pointer-events:none}.btn-secondary-inverse{color:#FFFFFF;border:1px solid #FFFFFF}.btn-secondary-inverse:disabled,.btn-secondary-inverse.disabled{border:1px solid #FFFFFF;color:#FFFFFF;pointer-events:none}.btn-tertiary-inverse{color:#FFFFFF}.btn-tertiary-inverse:disabled,.btn-tertiary-inverse.disabled{color:#FFFFFF;opacity:1;pointer-events:none}.btn ifx-icon:empty{display:none}.btn.btn-xs{font-size:0.875rem;height:32px;line-height:1rem}.btn.btn-s{font-size:0.875rem;height:36px;line-height:1.25rem}.btn.btn-l{font-size:1.25rem;height:48px;line-height:1.75rem}.btn.btn-default:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #0A8276}.btn.btn-default:not(:disabled,.disabled):hover{background-color:#08665C}.btn.btn-default:not(:disabled,.disabled):active,.btn.btn-default:not(:disabled,.disabled).active{background-color:#06534B}.btn.btn-secondary-default:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #0A8276}.btn.btn-secondary-default:not(:disabled,.disabled):hover{color:#FFFFFF;background-color:#08665C}.btn.btn-secondary-default:not(:disabled,.disabled):active,.btn.btn-secondary-default:not(:disabled,.disabled).active{background-color:#06534B}.btn.btn-secondary:not(:disabled,.disabled):hover{background-color:#9C216E}.btn.btn-secondary:not(:disabled,.disabled):active,.btn.btn-secondary:not(:disabled,.disabled).active{background-color:#9C216E}.btn.btn-danger:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #0A8276}.btn.btn-danger:not(:disabled,.disabled):hover{background-color:#A2001E}.btn.btn-danger:not(:disabled,.disabled):active,.btn.btn-danger:not(:disabled,.disabled).active{background-color:#900021}.btn.btn-secondary-danger:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #0A8276}.btn.btn-secondary-danger:not(:disabled,.disabled):hover{color:#FFFFFF;background-color:#A2001E}.btn.btn-secondary-danger:not(:disabled,.disabled):active,.btn.btn-secondary-danger:not(:disabled,.disabled).active{background-color:#900021}.btn.btn-inverse:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #0A8276, 0 0 0 4px #FFFFFF}.btn.btn-inverse:not(:disabled,.disabled):hover{background-color:#EEEDED}.btn.btn-inverse:not(:disabled,.disabled):active,.btn.btn-inverse:not(:disabled,.disabled).active{background-color:#BFBBBB}.btn.btn-secondary-inverse:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #0A8276, 0 0 0 4px #FFFFFF}.btn.btn-secondary-inverse:not(:disabled,.disabled):hover{color:#0A8276;background-color:#EEEDED}.btn.btn-secondary-inverse:not(:disabled,.disabled):active,.btn.btn-secondary-inverse:not(:disabled,.disabled).active{color:#0A8276;background-color:#BFBBBB}.btn.btn-tertiary-default:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #08665C}.btn.btn-tertiary-default:not(:disabled,.disabled):hover{color:#08665C}.btn.btn-tertiary-default:not(:disabled,.disabled):active,.btn.btn-tertiary-default:not(:disabled,.disabled).active{color:#06534B}.btn.btn-tertiary-danger:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #A2001E}.btn.btn-tertiary-danger:not(:disabled,.disabled):hover{color:#A2001E}.btn.btn-tertiary-danger:not(:disabled,.disabled):active,.btn.btn-tertiary-danger:not(:disabled,.disabled).active{color:#900021}.btn.btn-tertiary-inverse:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #0A8276, 0 0 0 4px #FFFFFF}.btn.btn-tertiary-inverse:not(:disabled,.disabled):hover{color:#EEEDED}.btn.btn-tertiary-inverse:not(:disabled,.disabled):active,.btn.btn-tertiary-inverse:not(:disabled,.disabled).active{color:#BFBBBB}';const b=s;const l=class{constructor(t){e(this,t);this.variant="primary";this.theme="default";this.size="m";this.disabled=false;this.target="_self";this.type="button";this.fullWidth=false;this.handleClick=e=>{if(this.el.shadowRoot){const t=this.el.closest("form");if(t){e.preventDefault();if(this.type==="reset"){this.resetClickHandler()}else{const e=document.createElement("button");if(this.type){e.type=this.type}e.style.display="none";t.appendChild(e);e.click();e.remove()}}}}}setInternalHref(e){this.internalHref=e}async setFocus(){this.focusableElement.focus()}insertNativeButton(){this.nativeButton=document.createElement("button");this.nativeButton.type=this.type;this.nativeButton.style.display="none";this.el.closest("form").appendChild(this.nativeButton)}handleFormAndInternalHref(){if(this.el.closest("form")){if(this.el.href){this.el.internalHref=undefined}this.insertNativeButton()}else{this.internalHref=this.href}}handleButtonWidth(){if(this.fullWidth){this.el.style.setProperty("--bw","100%")}else{this.el.style.setProperty("--bw","fit-content")}}componentWillLoad(){this.handleFormAndInternalHref();if(!a(this.el)){const e=i();d("ifx-button",e)}}componentWillRender(){this.handleButtonWidth()}resetClickHandler(){const e=this.el.closest("form");const t=e.querySelectorAll("ifx-text-field, ifx-textarea");t.forEach((e=>{e.reset()}))}handleKeyDown(e){if(e.key===" "||e.key==="Enter"&&!this.disabled){this.focusableElement.click()}}handleHostClick(e){if(this.disabled===true){e.stopImmediatePropagation()}}handleFocus(e){if(this.disabled){e.preventDefault();this.focusableElement.blur()}}render(){return t(n,{key:"4f6edce27cacd5d9859790e028cabf756b65463b"},t("a",{key:"d3a7759dbd2ed5128c5919e187c70ee82abfc643",role:this.href?"link":"button",tabIndex:this.disabled?-1:0,ref:e=>this.focusableElement=e,class:this.getClassNames(),href:!this.disabled?this.internalHref:undefined,target:this.target,onClick:this.handleClick,rel:this.target==="_blank"?"noopener noreferrer":undefined,onFocus:e=>this.handleFocus(e),"aria-disabled":this.disabled?"true":null,"aria-describedby":this.theme==="danger"?"Dangerous action":undefined,"aria-label":this.ariaLabel||undefined},t("slot",{key:"54e7e801f580008fc48688446cf58b304c283067"})))}getVariantClass(){return`${this.variant}`==="secondary"?`secondary-${this.theme}`:`${this.variant}`==="tertiary"?`tertiary-${this.theme}`:`${this.theme}`}getSizeClass(){if(`${this.size}`==="xs"){return"xs"}else if(`${this.size}`==="s"){return"s"}else if(`${this.size}`==="l"){return"l"}else return""}getClassNames(){return r("btn",this.size&&`btn-${this.getSizeClass()}`,`btn-${this.getVariantClass()}`,this.disabled?"disabled":"")}get el(){return o(this)}static get watchers(){return{href:["setInternalHref"]}}};l.style=b;export{l as ifx_button};
2
+ //# sourceMappingURL=p-c24ab74b.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,h as e,g as i,c as r}from"./p-b7a462e5.js";import{d as n,t as o}from"./p-e8504e6b.js";import{i as s}from"./p-1ecafb97.js";import{c as a}from"./p-5cdc6210.js";const p=":host{display:inline-block}.spinner{position:relative;width:40px;height:40px}.spinner.s{width:24px;height:24px}.border{box-sizing:border-box;position:absolute;width:100%;height:100%;border:4px solid transparent;border-top-color:#0A8276;border-left-color:#0A8276;border-right-color:#0A8276;border-top-left-radius:1px;border-top-right-radius:1px;border-radius:50%;animation:spin 2s linear infinite}.border.inverted{border-top-color:#FFFFFF;border-left-color:#FFFFFF;border-right-color:#FFFFFF}.semiconductor{width:100%;height:100%;animation:spin 2s linear infinite}.semiconductor svg{fill:#0A8276}.semiconductor.inverted svg{fill:#FFFFFF}.semiconductor.s svg{width:24px;height:24px}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";const l=p;const c=class{constructor(e){t(this,e);this.inverted=false}componentWillLoad(){if(!s(this.el)){const t=n();o("ifx-spinner",t)}}render(){return e("div",{key:"d1308117223db979d7a4caf123bf0d1c017d3df2","aria-label":"spinner indicating a loading process",class:this.getClassNames()},e("div",{key:"890097f80a403f78cfdbad8d6393dbc8f994b1b3",class:`${this.variant!=="brand"?"border":""} ${this.inverted?"inverted":""}`}),this.variant==="brand"&&e("div",{key:"63d937d775e2071ab21c454aa2baf9609e06b372",class:`semiconductor ${this.inverted?"inverted":""} ${this.getSizeClass()}`},e("svg",{key:"2c28fb566992ed63ed10e7c2bb85a973e2217a21",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("g",{key:"bbca58748ad55d2040e4e7311205e5c010dcf719",id:"spinner/conductor"},e("path",{key:"88a524bfea6a5ea585ef9b3c9bcf715252a98f49",id:"Vector",d:"M38.75 18.75C39.4375 18.75 40 19.3125 40 20C40 20.6875 39.4409 21.25 38.75 21.25H35V26.25H38.75C39.4375 26.25 40 26.8125 40 27.5C40 28.1875 39.4409 28.75 38.75 28.75H35V30C35 32.7617 32.7617 35 30 35H28.75V38.75C28.75 39.4409 28.1875 40 27.5 40C26.8125 40 26.25 39.4409 26.25 38.75V35H21.25V38.75C21.25 39.4409 20.6875 40 20 40C19.3125 40 18.75 39.4409 18.75 38.75V35H13.75V38.75C13.75 39.4409 13.1875 40 12.5 40C11.8125 40 11.25 39.4409 11.25 38.75V35H10C7.23828 35 5 32.7617 5 30V28.75H1.25C0.559062 28.75 0 28.1875 0 27.5C0 26.8125 0.559062 26.25 1.25 26.25H5V21.25H1.25C0.559062 21.25 0 20.6875 0 20C0 19.3125 0.559062 18.75 1.25 18.75H5V13.75H1.25C0.559062 13.75 0 13.1875 0 12.5C0 11.8125 0.559062 11.25 1.25 11.25H5V10C5 7.23828 7.23828 5 10 5H11.25V1.25C11.25 0.5625 11.8125 0 12.5 0C13.1875 0 13.75 0.559063 13.75 1.25V5H18.75V1.25C18.75 0.559063 19.3091 0 20 0C20.6909 0 21.25 0.559063 21.25 1.25V5H26.25V1.25C26.25 0.559063 26.8091 0 27.5 0C28.1909 0 28.75 0.559063 28.75 1.25V5H30C32.7617 5 35 7.23828 35 10V11.25H38.75C39.4409 11.25 40 11.8091 40 12.5C40 13.1909 39.4409 13.75 38.75 13.75H35V18.75H38.75ZM32.5 10C32.5 8.62188 31.3781 7.5 30 7.5H10C8.62187 7.5 7.5 8.62188 7.5 10V30C7.5 31.3781 8.62187 32.5 10 32.5H30C31.3781 32.5 32.5 31.3781 32.5 30V10Z"})))))}getSizeClass(){return`${this.size}`==="s"?"s":""}getClassNames(){return a("spinner",this.size&&`spinner ${this.getSizeClass()}`)}get el(){return i(this)}};c.style=l;const d=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:flex}.textInput__container{display:flex;flex-direction:column;align-items:flex-start;padding:0px;width:100%;flex:none;order:0;align-self:stretch;flex-grow:0;font-family:var(--ifx-font-family)}.textInput__container.disabled .textInput__top-wrapper label{color:#575352}.textInput__container.disabled .textInput__bottom-wrapper input{border:1px solid #575352;background-color:#EEEDED}.textInput__container.disabled .textInput__bottom-wrapper input::placeholder{font-size:0.875rem;color:#575352}.textInput__container .textInput__top-wrapper{display:flex;flex-direction:row;align-items:flex-start;padding:0px;gap:4px;flex:none;order:0;align-self:stretch;flex-grow:0}.textInput__container .textInput__top-wrapper label{font-style:normal;font-weight:400;font-size:1rem;line-height:1.5rem;display:flex;align-items:center;color:#1D1D1D;flex:none;order:0;flex-grow:0}.textInput__container .textInput__top-wrapper label .optional-required{margin-left:4px}.textInput__container .textInput__top-wrapper label .optional{margin-left:4px}.textInput__container .textInput__top-wrapper label .required{margin-left:4px}.textInput__container .textInput__top-wrapper label .required.error{color:#CD002F}.textInput__container .input-container{position:relative;display:flex;align-items:center;width:100%}.textInput__container .textInput__bottom-wrapper{flex-grow:1;position:relative;display:flex;flex-direction:column;align-items:flex-start;padding:0px;gap:4px;flex:none;order:1;align-self:stretch;flex-grow:0}.textInput__container .textInput__bottom-wrapper input{width:100%;box-sizing:border-box;display:flex;flex-direction:row;align-items:center;padding:8px 16px;gap:8px;height:40px;background-color:#FFFFFF;color:#1D1D1D;font-family:var(--ifx-font-family);font-size:1rem;line-height:1.5rem;border:1px solid #8D8786;border-radius:1px;flex:none;order:0;align-self:stretch;flex-grow:0;text-overflow:ellipsis}.textInput__container .textInput__bottom-wrapper input.input-s{height:36px;font-size:0.875rem;line-height:1.25rem}.textInput__container .textInput__bottom-wrapper input.input-s::placeholder{font-size:0.875rem;line-height:1.25rem}.textInput__container .textInput__bottom-wrapper input.icon{padding-left:40px}.textInput__container .textInput__bottom-wrapper input.error{border:1px solid #CD002F}.textInput__container .textInput__bottom-wrapper input.error:focus{outline:none}.textInput__container .textInput__bottom-wrapper input.success{border:1px solid #4CA460}.textInput__container .textInput__bottom-wrapper input.success:focus{outline:none}.textInput__container .textInput__bottom-wrapper input:focus:not(.error,.success){outline:none;border:1px solid #0A8276}.textInput__container .textInput__bottom-wrapper input:hover:not(:disabled,:focus,.error,.success){border:1px solid #575352}.textInput__container .textInput__bottom-wrapper input::placeholder{font-style:normal;font-weight:400;font-size:1rem;line-height:1.5rem;color:#8D8786;flex:none;order:1;flex-grow:1}.textInput__container .textInput__bottom-wrapper .input-icon{position:absolute;top:50%;transform:translateY(-50%);left:16px;transition:0.3s;color:#8D8786}.textInput__container .textInput__bottom-wrapper .textInput__bottom-wrapper-caption{font-style:normal;font-weight:400;font-size:0.75rem;line-height:1rem;letter-spacing:0.2px;color:#1D1D1D;flex:none;order:1;align-self:stretch;flex-grow:0}.textInput__container .textInput__bottom-wrapper .textInput__bottom-wrapper-caption.error{color:#CD002F}.textInput__container .textInput__bottom-wrapper .textInput__bottom-wrapper-caption.disabled{color:#575352}.textInput__container .delete-icon{position:absolute;right:16px}.textInput__container .delete-icon :hover{cursor:pointer}';const f=d;const h=class{constructor(e){t(this,e);this.ifxInput=r(this,"ifxInput",7);if(e.$hostElement$["s-ei"]){this.internals=e.$hostElement$["s-ei"]}else{this.internals=e.$hostElement$.attachInternals();e.$hostElement$["s-ei"]=this.internals}this.placeholder="Placeholder";this.value="";this.error=false;this.label="";this.icon="";this.caption="";this.size="m";this.required=false;this.optional=false;this.success=false;this.disabled=false;this.showDeleteIcon=false;this.autocomplete="on";this.type="text";this.internalId="text-field"}valueWatcher(t){if(t!==this.inputElement.value){this.inputElement.value=t}}async reset(){this.value="";this.inputElement.value=""}handleDeleteContent(){this.reset();this.ifxInput.emit(this.value)}handleInput(){const t=this.inputElement.value;this.value=t;this.internals.setFormValue(t);this.ifxInput.emit(this.value)}handleTypeProp(){this.internalType=this.type==="text"||this.type==="password"?this.type:"text"}formResetCallback(){this.internals.setValidity({});this.internals.setFormValue("")}componentWillLoad(){if(!s(this.el)){const t=n();o("ifx-text-field",t)}this.handleTypeProp()}render(){return e("div",{key:"21151d737a91ff22b989db308da0e61660a36b45","aria-label":"a text field for user input","aria-value":this.value,"aria-disabled":this.disabled,class:`textInput__container ${this.disabled?"disabled":""}`},e("div",{key:"f7344422e6e242335955313810090034b2a2fca3",class:"textInput__top-wrapper"},e("label",{key:"10666f37b96b09057740b2672bb84faa8111ef6b",htmlFor:this.internalId},e("slot",{key:"c0b5335bcef3faaf59be3a7f3335579b4e912046"}),this.optional&&this.required?e("span",{class:"optional-required"},"(optional) *"):this.optional?e("span",{class:"optional"},"(optional)"):this.required?e("span",{class:`required ${this.error?"error":""}`},"*"):null)),e("div",{key:"ce1a93f45efae7b97b82760603ee12db0145039d",class:"textInput__bottom-wrapper"},e("div",{key:"d4a783a646a18ff4bf285503e8814bec4380f167",class:"input-container"},this.icon&&e("ifx-icon",{key:"57d065166763bdc54ffd1ea0ac8866de43543b6a",class:"input-icon",icon:this.icon}),e("input",{key:"de16ad0dbc0b55b1b129cc933c801ae1eaf23d3d",ref:t=>this.inputElement=t,disabled:this.disabled,autocomplete:this.autocomplete,type:this.internalType,id:this.internalId,value:this.value,onInput:()=>this.handleInput(),placeholder:this.placeholder,maxlength:this.maxlength,class:`${this.icon?"icon":""}\n ${this.error?"error":""} \n ${this.size==="s"?"input-s":""}\n ${this.success?"success":""}`}),this.showDeleteIcon&&this.value&&e("ifx-icon",{key:"b21c3ff10ebcdb1feca9fd1f02b3a09f50727d99",class:"delete-icon",icon:"cRemove16",onClick:()=>this.handleDeleteContent()})),this.caption&&!this.error&&e("div",{key:"44d7d1c60b268fc2c71514e21544f702fc6ec2b6",class:`textInput__bottom-wrapper-caption ${this.disabled} ? disabled : ""`},this.caption),this.error&&e("div",{key:"a09e9cd9ec401ead9e9fde5b3ef113c87125a58b",class:"textInput__bottom-wrapper-caption error"},this.caption)))}static get formAssociated(){return true}get el(){return i(this)}static get watchers(){return{value:["valueWatcher"]}}};h.style=f;export{c as ifx_spinner,h as ifx_text_field};
2
- //# sourceMappingURL=p-2b6fa7ea.entry.js.map
1
+ import{r as t,h as e,g as i,c as r}from"./p-b7a462e5.js";import{d as n,t as o}from"./p-0b7e3932.js";import{i as s}from"./p-1ecafb97.js";import{c as a}from"./p-5cdc6210.js";const p=":host{display:inline-block}.spinner{position:relative;width:40px;height:40px}.spinner.s{width:24px;height:24px}.border{box-sizing:border-box;position:absolute;width:100%;height:100%;border:4px solid transparent;border-top-color:#0A8276;border-left-color:#0A8276;border-right-color:#0A8276;border-top-left-radius:1px;border-top-right-radius:1px;border-radius:50%;animation:spin 2s linear infinite}.border.inverted{border-top-color:#FFFFFF;border-left-color:#FFFFFF;border-right-color:#FFFFFF}.semiconductor{width:100%;height:100%;animation:spin 2s linear infinite}.semiconductor svg{fill:#0A8276}.semiconductor.inverted svg{fill:#FFFFFF}.semiconductor.s svg{width:24px;height:24px}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";const l=p;const c=class{constructor(e){t(this,e);this.inverted=false}componentWillLoad(){if(!s(this.el)){const t=n();o("ifx-spinner",t)}}render(){return e("div",{key:"d1308117223db979d7a4caf123bf0d1c017d3df2","aria-label":"spinner indicating a loading process",class:this.getClassNames()},e("div",{key:"890097f80a403f78cfdbad8d6393dbc8f994b1b3",class:`${this.variant!=="brand"?"border":""} ${this.inverted?"inverted":""}`}),this.variant==="brand"&&e("div",{key:"63d937d775e2071ab21c454aa2baf9609e06b372",class:`semiconductor ${this.inverted?"inverted":""} ${this.getSizeClass()}`},e("svg",{key:"2c28fb566992ed63ed10e7c2bb85a973e2217a21",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("g",{key:"bbca58748ad55d2040e4e7311205e5c010dcf719",id:"spinner/conductor"},e("path",{key:"88a524bfea6a5ea585ef9b3c9bcf715252a98f49",id:"Vector",d:"M38.75 18.75C39.4375 18.75 40 19.3125 40 20C40 20.6875 39.4409 21.25 38.75 21.25H35V26.25H38.75C39.4375 26.25 40 26.8125 40 27.5C40 28.1875 39.4409 28.75 38.75 28.75H35V30C35 32.7617 32.7617 35 30 35H28.75V38.75C28.75 39.4409 28.1875 40 27.5 40C26.8125 40 26.25 39.4409 26.25 38.75V35H21.25V38.75C21.25 39.4409 20.6875 40 20 40C19.3125 40 18.75 39.4409 18.75 38.75V35H13.75V38.75C13.75 39.4409 13.1875 40 12.5 40C11.8125 40 11.25 39.4409 11.25 38.75V35H10C7.23828 35 5 32.7617 5 30V28.75H1.25C0.559062 28.75 0 28.1875 0 27.5C0 26.8125 0.559062 26.25 1.25 26.25H5V21.25H1.25C0.559062 21.25 0 20.6875 0 20C0 19.3125 0.559062 18.75 1.25 18.75H5V13.75H1.25C0.559062 13.75 0 13.1875 0 12.5C0 11.8125 0.559062 11.25 1.25 11.25H5V10C5 7.23828 7.23828 5 10 5H11.25V1.25C11.25 0.5625 11.8125 0 12.5 0C13.1875 0 13.75 0.559063 13.75 1.25V5H18.75V1.25C18.75 0.559063 19.3091 0 20 0C20.6909 0 21.25 0.559063 21.25 1.25V5H26.25V1.25C26.25 0.559063 26.8091 0 27.5 0C28.1909 0 28.75 0.559063 28.75 1.25V5H30C32.7617 5 35 7.23828 35 10V11.25H38.75C39.4409 11.25 40 11.8091 40 12.5C40 13.1909 39.4409 13.75 38.75 13.75H35V18.75H38.75ZM32.5 10C32.5 8.62188 31.3781 7.5 30 7.5H10C8.62187 7.5 7.5 8.62188 7.5 10V30C7.5 31.3781 8.62187 32.5 10 32.5H30C31.3781 32.5 32.5 31.3781 32.5 30V10Z"})))))}getSizeClass(){return`${this.size}`==="s"?"s":""}getClassNames(){return a("spinner",this.size&&`spinner ${this.getSizeClass()}`)}get el(){return i(this)}};c.style=l;const d=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:flex}.textInput__container{display:flex;flex-direction:column;align-items:flex-start;padding:0px;width:100%;flex:none;order:0;align-self:stretch;flex-grow:0;font-family:var(--ifx-font-family)}.textInput__container.disabled .textInput__top-wrapper label{color:#575352}.textInput__container.disabled .textInput__bottom-wrapper input{border:1px solid #575352;background-color:#EEEDED}.textInput__container.disabled .textInput__bottom-wrapper input::placeholder{font-size:0.875rem;color:#575352}.textInput__container .textInput__top-wrapper{display:flex;flex-direction:row;align-items:flex-start;padding:0px;gap:4px;flex:none;order:0;align-self:stretch;flex-grow:0}.textInput__container .textInput__top-wrapper label{font-style:normal;font-weight:400;font-size:1rem;line-height:1.5rem;display:flex;align-items:center;color:#1D1D1D;flex:none;order:0;flex-grow:0}.textInput__container .textInput__top-wrapper label .optional-required{margin-left:4px}.textInput__container .textInput__top-wrapper label .optional{margin-left:4px}.textInput__container .textInput__top-wrapper label .required{margin-left:4px}.textInput__container .textInput__top-wrapper label .required.error{color:#CD002F}.textInput__container .input-container{position:relative;display:flex;align-items:center;width:100%}.textInput__container .textInput__bottom-wrapper{flex-grow:1;position:relative;display:flex;flex-direction:column;align-items:flex-start;padding:0px;gap:4px;flex:none;order:1;align-self:stretch;flex-grow:0}.textInput__container .textInput__bottom-wrapper input{width:100%;box-sizing:border-box;display:flex;flex-direction:row;align-items:center;padding:8px 16px;gap:8px;height:40px;background-color:#FFFFFF;color:#1D1D1D;font-family:var(--ifx-font-family);font-size:1rem;line-height:1.5rem;border:1px solid #8D8786;border-radius:1px;flex:none;order:0;align-self:stretch;flex-grow:0;text-overflow:ellipsis}.textInput__container .textInput__bottom-wrapper input.input-s{height:36px;font-size:0.875rem;line-height:1.25rem}.textInput__container .textInput__bottom-wrapper input.input-s::placeholder{font-size:0.875rem;line-height:1.25rem}.textInput__container .textInput__bottom-wrapper input.icon{padding-left:40px}.textInput__container .textInput__bottom-wrapper input.error{border:1px solid #CD002F}.textInput__container .textInput__bottom-wrapper input.error:focus{outline:none}.textInput__container .textInput__bottom-wrapper input.success{border:1px solid #4CA460}.textInput__container .textInput__bottom-wrapper input.success:focus{outline:none}.textInput__container .textInput__bottom-wrapper input:focus:not(.error,.success){outline:none;border:1px solid #0A8276}.textInput__container .textInput__bottom-wrapper input:hover:not(:disabled,:focus,.error,.success){border:1px solid #575352}.textInput__container .textInput__bottom-wrapper input::placeholder{font-style:normal;font-weight:400;font-size:1rem;line-height:1.5rem;color:#8D8786;flex:none;order:1;flex-grow:1}.textInput__container .textInput__bottom-wrapper .input-icon{position:absolute;top:50%;transform:translateY(-50%);left:16px;transition:0.3s;color:#8D8786}.textInput__container .textInput__bottom-wrapper .textInput__bottom-wrapper-caption{font-style:normal;font-weight:400;font-size:0.75rem;line-height:1rem;letter-spacing:0.2px;color:#1D1D1D;flex:none;order:1;align-self:stretch;flex-grow:0}.textInput__container .textInput__bottom-wrapper .textInput__bottom-wrapper-caption.error{color:#CD002F}.textInput__container .textInput__bottom-wrapper .textInput__bottom-wrapper-caption.disabled{color:#575352}.textInput__container .delete-icon{position:absolute;right:16px}.textInput__container .delete-icon :hover{cursor:pointer}';const f=d;const h=class{constructor(e){t(this,e);this.ifxInput=r(this,"ifxInput",7);if(e.$hostElement$["s-ei"]){this.internals=e.$hostElement$["s-ei"]}else{this.internals=e.$hostElement$.attachInternals();e.$hostElement$["s-ei"]=this.internals}this.placeholder="Placeholder";this.value="";this.error=false;this.label="";this.icon="";this.caption="";this.size="m";this.required=false;this.optional=false;this.success=false;this.disabled=false;this.showDeleteIcon=false;this.autocomplete="on";this.type="text";this.internalId="text-field"}valueWatcher(t){if(t!==this.inputElement.value){this.inputElement.value=t}}async reset(){this.value="";this.inputElement.value=""}handleDeleteContent(){this.reset();this.ifxInput.emit(this.value)}handleInput(){const t=this.inputElement.value;this.value=t;this.internals.setFormValue(t);this.ifxInput.emit(this.value)}handleTypeProp(){this.internalType=this.type==="text"||this.type==="password"?this.type:"text"}formResetCallback(){this.internals.setValidity({});this.internals.setFormValue("")}componentWillLoad(){if(!s(this.el)){const t=n();o("ifx-text-field",t)}this.handleTypeProp()}render(){return e("div",{key:"21151d737a91ff22b989db308da0e61660a36b45","aria-label":"a text field for user input","aria-value":this.value,"aria-disabled":this.disabled,class:`textInput__container ${this.disabled?"disabled":""}`},e("div",{key:"f7344422e6e242335955313810090034b2a2fca3",class:"textInput__top-wrapper"},e("label",{key:"10666f37b96b09057740b2672bb84faa8111ef6b",htmlFor:this.internalId},e("slot",{key:"c0b5335bcef3faaf59be3a7f3335579b4e912046"}),this.optional&&this.required?e("span",{class:"optional-required"},"(optional) *"):this.optional?e("span",{class:"optional"},"(optional)"):this.required?e("span",{class:`required ${this.error?"error":""}`},"*"):null)),e("div",{key:"ce1a93f45efae7b97b82760603ee12db0145039d",class:"textInput__bottom-wrapper"},e("div",{key:"d4a783a646a18ff4bf285503e8814bec4380f167",class:"input-container"},this.icon&&e("ifx-icon",{key:"57d065166763bdc54ffd1ea0ac8866de43543b6a",class:"input-icon",icon:this.icon}),e("input",{key:"de16ad0dbc0b55b1b129cc933c801ae1eaf23d3d",ref:t=>this.inputElement=t,disabled:this.disabled,autocomplete:this.autocomplete,type:this.internalType,id:this.internalId,value:this.value,onInput:()=>this.handleInput(),placeholder:this.placeholder,maxlength:this.maxlength,class:`${this.icon?"icon":""}\n ${this.error?"error":""} \n ${this.size==="s"?"input-s":""}\n ${this.success?"success":""}`}),this.showDeleteIcon&&this.value&&e("ifx-icon",{key:"b21c3ff10ebcdb1feca9fd1f02b3a09f50727d99",class:"delete-icon",icon:"cRemove16",onClick:()=>this.handleDeleteContent()})),this.caption&&!this.error&&e("div",{key:"44d7d1c60b268fc2c71514e21544f702fc6ec2b6",class:`textInput__bottom-wrapper-caption ${this.disabled} ? disabled : ""`},this.caption),this.error&&e("div",{key:"a09e9cd9ec401ead9e9fde5b3ef113c87125a58b",class:"textInput__bottom-wrapper-caption error"},this.caption)))}static get formAssociated(){return true}get el(){return i(this)}static get watchers(){return{value:["valueWatcher"]}}};h.style=f;export{c as ifx_spinner,h as ifx_text_field};
2
+ //# sourceMappingURL=p-c88e4036.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,h as o,a as n,g as i}from"./p-b7a462e5.js";import{d as a,t as s}from"./p-e8504e6b.js";import{i as r}from"./p-1ecafb97.js";function d(e,t,o,n=20,i=0){const a=[];if(i>=n){return a}const s=e=>{const a=e.assignedNodes().filter((e=>e.nodeType===1));if(a.length>0){const e=a[0].parentElement;return d(e,t,o,n,i+1)}return[]};const r=Array.from(e.children||[]);for(const e of r){if(t(e)){continue}if(o(e)){a.push(e)}if(e.shadowRoot!=null){a.push(...d(e.shadowRoot,t,o,n,i+1))}else if(e.tagName==="SLOT"){a.push(...s(e))}else{a.push(...d(e,t,o,n,i+1))}}return a}function c(e){return e.hasAttribute("hidden")||e.hasAttribute("aria-hidden")&&e.getAttribute("aria-hidden")!=="false"||e.style.display===`none`||e.style.opacity===`0`||e.style.visibility===`hidden`||e.style.visibility===`collapse`}function l(e){return e.hasAttribute("disabled")||e.hasAttribute("aria-disabled")&&e.getAttribute("aria-disabled")!=="false"}function f(e){if(e.getAttribute("tabindex")==="-1"||c(e)||l(e)){return false}return e.hasAttribute("tabindex")||(e instanceof HTMLAnchorElement||e instanceof HTMLAreaElement)&&e.hasAttribute("href")||e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement||e instanceof HTMLIFrameElement}function h(e,t,o){const n=e.animate(t,Object.assign(Object.assign({},o),{fill:"both"}));n.addEventListener("finish",(()=>{n.commitStyles();n.cancel()}));return n}const b={easing:"cubic-bezier(0.390, 0.575, 0.565, 1.000)"};const m={fadeIn:[Object.assign(Object.assign({offset:0},b),{opacity:0}),Object.assign(Object.assign({offset:1},b),{opacity:1})],fadeOut:[Object.assign(Object.assign({offset:0},b),{opacity:1}),Object.assign(Object.assign({offset:1},b),{opacity:0})]};const u=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:block}.modal-container{display:none;justify-content:center;align-items:center;position:fixed;top:0;left:0;width:100%;height:100%;z-index:1060;overflow-y:auto;font-family:var(--ifx-font-family)}.modal-container.open{display:flex}.modal-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#1D1D1D;opacity:0.5;z-index:0}.modal-content-container{position:absolute;display:flex;justify-content:center;width:90%;min-height:218px;background-color:#fff;border-radius:0;box-shadow:0 2px 10px rgba(0, 0, 0, 0.1);box-sizing:border-box;align-items:stretch}.modal-content-container.no-overflow{overflow:hidden}.modal-content-container.no-overflow .modal-body{overflow-y:auto}@media screen and (min-width: 768px){.modal-content-container{width:540px;min-height:132px}.modal-content-container.m,.modal-content-container.l,.modal-content-container.s{width:90%}}@media screen and (min-width: 1024px){.modal-content-container.s{width:47vw}.modal-content-container.m{width:63vw}.modal-content-container.l{width:80%}}.modal-content{display:flex;flex-direction:column;width:100%;max-height:90vh}.modal-icon-container{display:flex;align-items:center;justify-content:center;width:32px;background-color:#0A8276;align-self:stretch}.modal-icon-container.danger{background-color:#CD002F}.modal-icon-container ifx-icon{color:#FFFFFF}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:24px;min-height:76px;max-height:105px;box-sizing:border-box;border-radius:1px 1px 0px 0px;border-bottom:1px solid #EEEDED}.modal-caption{max-height:56px;display:-webkit-box;overflow:hidden;white-space:pre-wrap;word-wrap:break-word;-webkit-line-clamp:2;-webkit-box-orient:vertical}.modal-header h2{margin:0;font-weight:600;font-size:1.25rem;line-height:28px}.modal-header button{background:none;border:none;font-size:1.5em;padding:0;cursor:pointer}.modal-close-button{align-self:flex-start;margin-right:-8px}.modal-body{padding:16px 24px;min-height:56px;box-sizing:border-box;flex:1}.modal-footer.buttons-present ::slotted(*){display:flex;justify-content:flex-end;gap:16px;padding:16px 24px 32px 16px}.modal-border{display:flex;align-items:center;justify-content:center;width:100%;font-size:1.5em;flex-grow:1}.modal-border.primary{background-color:#0A8276}.modal-border.secondary{background-color:#575352}.modal-border.danger{background-color:#CD002F}.modal-border.success{background-color:#4CA460}.modal-border.warning{background-color:#E16B25}.modal-border.orange{background-color:#E16B25}.modal-border.ocean{background-color:#0A8276}.modal-border.grey{background-color:#575352}.modal-border.grey-200{background-color:#EEEDED}.modal-border.red{background-color:#CD002F}.modal-border.green{background-color:#4CA460}.modal-border.berry{background-color:#9C216E}';const p=u;const g=class{constructor(o){e(this,o);this.ifxOpen=t(this,"ifxOpen",7);this.ifxClose=t(this,"ifxClose",7);this.opened=false;this.showModal=this.opened||false;this.caption="Modal Title";this.closeOnOverlayClick=true;this.variant="default";this.size="s";this.alertIcon="";this.okButtonLabel="OK";this.cancelButtonLabel="Cancel";this.slotButtonsPresent=false;this.showCloseButton=true;this.focusableElements=[];this.handleTopFocus=()=>{this.attemptFocus(this.getLastFocusableElement())};this.handleBottomFocus=()=>{this.attemptFocus(this.getFirstFocusableElement())};this.handleKeypress=e=>{if(!this.showModal){return}if(e.key==="Escape"){this.doBeforeClose("ESCAPE_KEY")}}}componentWillLoad(){if(!r(this.hostElement)){const e=a();s("ifx-modal",e)}}componentDidLoad(){this.focusableElements=d(this.hostElement.shadowRoot,(e=>c(e)||e.matches("[data-focus-trap-edge]")),f)}componentWillRender(){if(this.showModal){this.handleComponentOverflow()}}handleComponentOverflow(){const e=this.hostElement.shadowRoot.querySelector(".modal-content-container");if(this.showModal&&this.isModalContentContainerHeightReachedViewport()){e.classList.add("no-overflow")}else if(e===null||e===void 0?void 0:e.classList.contains("no-overflow")){e===null||e===void 0?void 0:e.classList.remove("no-overflow")}}getFirstFocusableElement(){return this.focusableElements[0]}getLastFocusableElement(){return this.focusableElements[this.focusableElements.length-1]}attemptFocus(e){if(e==null){setTimeout((()=>{this.closeButton.focus()}));return}setTimeout((()=>{e.focus()}),0)}open(){this.showModal=true;try{const e=h(this.modalContainer,m.fadeIn,{duration:200});e.addEventListener("finish",(()=>{setTimeout((()=>{var e,t;(e=this.getLastFocusableElement())===null||e===void 0?void 0:e.focus();(t=this.getLastFocusableElement())===null||t===void 0?void 0:t.blur()}),0);this.ifxOpen.emit()}));this.hostElement.addEventListener("keydown",this.handleKeypress)}catch(e){this.ifxOpen.emit()}}close(){try{const e=h(this.modalContainer,m.fadeOut,{duration:200});e.addEventListener("finish",(()=>{this.showModal=false;this.ifxClose.emit()}));this.hostElement.removeEventListener("keydown",this.handleKeypress)}catch(e){this.showModal=false;this.ifxClose.emit()}}doBeforeClose(e){const t=[];t.push(e);const o=t.some((e=>e.defaultPrevented));if(!o){this.opened=false}}openedChanged(e){if(e===true){this.open()}else{this.close()}}handleOverlayClick(){if(this.closeOnOverlayClick){this.doBeforeClose("BACKDROP")}}handleContentUpdate(e){const t=e.target;const o=t.assignedNodes();if(o.length>0){o.forEach((e=>{if(e.observer){e.observer.disconnect();delete e.observer}const t=new MutationObserver(((e,t)=>{for(let t of e){if(t.type==="childList"){if(this.showModal){this.handleComponentOverflow()}}}}));t.observe(e,{attributes:true,childList:true,subtree:true});e.observer=t}))}}handleButtonsSlotChange(e){var t;if(((t=e.currentTarget.assignedElements()[0])===null||t===void 0?void 0:t.childElementCount)>0){this.slotButtonsPresent=true}else{this.slotButtonsPresent=false}}isModalContentContainerHeightReachedViewport(){return new Promise((e=>{setTimeout((()=>{const t=this.hostElement.shadowRoot.querySelector(".modal-content");const o=t.offsetHeight;const n=window.innerHeight;e(o>=n*.9)}),100)}))}render(){const e=this.variant!=="default";return o(n,{key:"24c13df6af069b1d93d4e70c0930bd4381b2dcc1"},o("div",{key:"fc6a23f20309e087dac7665bb71df58ea44669aa",ref:e=>this.modalContainer=e,class:`modal-container ${this.showModal?"open":""}`},o("div",{key:"109e80dce5854beda04fc593efae49bdf8a4d4e0",class:"modal-overlay",onClick:()=>this.handleOverlayClick()}),o("div",{key:"eb35fdaf211ceef40b983d378304a4642fa839e8","data-focus-trap-edge":true,onFocus:this.handleTopFocus,tabindex:"0"}),o("div",{key:"0b7b0108c0563ffc5e14fd8f1c39d4bf3c80c03d",class:`modal-content-container ${this.size}`,role:"dialog","aria-modal":"true","aria-label":this.caption},e?o("div",{class:`modal-icon-container ${this.variant==="alert-brand"?"":"danger"}`},this.alertIcon?o("ifx-icon",{icon:this.alertIcon}):null):null,o("div",{key:"23113f6efc3df7ca24976bde7999f29b21c57a56",class:"modal-content"},o("div",{key:"d89ad9950a9d9ea8b64ab9ad41b3e47ee3a3a8c3",class:"modal-header"},o("h2",{key:"ebad8ef7e759f916325a0a5fe7e87a016f9e169a",class:"modal-caption"},this.caption),this.showCloseButton&&o("ifx-icon-button",{key:"8655efa78858838ee8ec697cb9adad04b27e882b",class:"modal-close-button",ref:e=>this.closeButton=e,icon:"cross-16",variant:"tertiary",onClick:()=>this.doBeforeClose("CLOSE_BUTTON")})),o("div",{key:"71fd706680ffecda83c792639cd3781e739fad74",class:"modal-body"},o("slot",{key:"e9607ce7823d9fc0020ae4c0135612c9bb688984",name:"content",onSlotchange:e=>this.handleContentUpdate(e)})),o("div",{key:"3283f090e75460790a0f31708c34aa54efa77548",class:`modal-footer ${this.slotButtonsPresent?"buttons-present":""}`},o("slot",{key:"59f2179f10110195b68a4f1671aa342209d0e51b",name:"buttons",onSlotchange:e=>this.handleButtonsSlotChange(e)})))),o("div",{key:"f3e0591f72a4e3f756fc1e3378e27733d3ee2707","data-focus-trap-edge":true,onFocus:this.handleBottomFocus,tabindex:"0"})))}get hostElement(){return i(this)}static get watchers(){return{opened:["openedChanged"]}}};g.style=p;export{g as ifx_modal};
2
- //# sourceMappingURL=p-f47071d5.entry.js.map
1
+ import{r as e,c as t,h as o,a as n,g as i}from"./p-b7a462e5.js";import{d as a,t as s}from"./p-0b7e3932.js";import{i as r}from"./p-1ecafb97.js";function d(e,t,o,n=20,i=0){const a=[];if(i>=n){return a}const s=e=>{const a=e.assignedNodes().filter((e=>e.nodeType===1));if(a.length>0){const e=a[0].parentElement;return d(e,t,o,n,i+1)}return[]};const r=Array.from(e.children||[]);for(const e of r){if(t(e)){continue}if(o(e)){a.push(e)}if(e.shadowRoot!=null){a.push(...d(e.shadowRoot,t,o,n,i+1))}else if(e.tagName==="SLOT"){a.push(...s(e))}else{a.push(...d(e,t,o,n,i+1))}}return a}function c(e){return e.hasAttribute("hidden")||e.hasAttribute("aria-hidden")&&e.getAttribute("aria-hidden")!=="false"||e.style.display===`none`||e.style.opacity===`0`||e.style.visibility===`hidden`||e.style.visibility===`collapse`}function l(e){return e.hasAttribute("disabled")||e.hasAttribute("aria-disabled")&&e.getAttribute("aria-disabled")!=="false"}function f(e){if(e.getAttribute("tabindex")==="-1"||c(e)||l(e)){return false}return e.hasAttribute("tabindex")||(e instanceof HTMLAnchorElement||e instanceof HTMLAreaElement)&&e.hasAttribute("href")||e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement||e instanceof HTMLIFrameElement}function h(e,t,o){const n=e.animate(t,Object.assign(Object.assign({},o),{fill:"both"}));n.addEventListener("finish",(()=>{n.commitStyles();n.cancel()}));return n}const b={easing:"cubic-bezier(0.390, 0.575, 0.565, 1.000)"};const m={fadeIn:[Object.assign(Object.assign({offset:0},b),{opacity:0}),Object.assign(Object.assign({offset:1},b),{opacity:1})],fadeOut:[Object.assign(Object.assign({offset:0},b),{opacity:1}),Object.assign(Object.assign({offset:1},b),{opacity:0})]};const u=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:block}.modal-container{display:none;justify-content:center;align-items:center;position:fixed;top:0;left:0;width:100%;height:100%;z-index:1060;overflow-y:auto;font-family:var(--ifx-font-family)}.modal-container.open{display:flex}.modal-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#1D1D1D;opacity:0.5;z-index:0}.modal-content-container{position:absolute;display:flex;justify-content:center;width:90%;min-height:218px;background-color:#fff;border-radius:0;box-shadow:0 2px 10px rgba(0, 0, 0, 0.1);box-sizing:border-box;align-items:stretch}.modal-content-container.no-overflow{overflow:hidden}.modal-content-container.no-overflow .modal-body{overflow-y:auto}@media screen and (min-width: 768px){.modal-content-container{width:540px;min-height:132px}.modal-content-container.m,.modal-content-container.l,.modal-content-container.s{width:90%}}@media screen and (min-width: 1024px){.modal-content-container.s{width:47vw}.modal-content-container.m{width:63vw}.modal-content-container.l{width:80%}}.modal-content{display:flex;flex-direction:column;width:100%;max-height:90vh}.modal-icon-container{display:flex;align-items:center;justify-content:center;width:32px;background-color:#0A8276;align-self:stretch}.modal-icon-container.danger{background-color:#CD002F}.modal-icon-container ifx-icon{color:#FFFFFF}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:24px;min-height:76px;max-height:105px;box-sizing:border-box;border-radius:1px 1px 0px 0px;border-bottom:1px solid #EEEDED}.modal-caption{max-height:56px;display:-webkit-box;overflow:hidden;white-space:pre-wrap;word-wrap:break-word;-webkit-line-clamp:2;-webkit-box-orient:vertical}.modal-header h2{margin:0;font-weight:600;font-size:1.25rem;line-height:28px}.modal-header button{background:none;border:none;font-size:1.5em;padding:0;cursor:pointer}.modal-close-button{align-self:flex-start;margin-right:-8px}.modal-body{padding:16px 24px;min-height:56px;box-sizing:border-box;flex:1}.modal-footer.buttons-present ::slotted(*){display:flex;justify-content:flex-end;gap:16px;padding:16px 24px 32px 16px}.modal-border{display:flex;align-items:center;justify-content:center;width:100%;font-size:1.5em;flex-grow:1}.modal-border.primary{background-color:#0A8276}.modal-border.secondary{background-color:#575352}.modal-border.danger{background-color:#CD002F}.modal-border.success{background-color:#4CA460}.modal-border.warning{background-color:#E16B25}.modal-border.orange{background-color:#E16B25}.modal-border.ocean{background-color:#0A8276}.modal-border.grey{background-color:#575352}.modal-border.grey-200{background-color:#EEEDED}.modal-border.red{background-color:#CD002F}.modal-border.green{background-color:#4CA460}.modal-border.berry{background-color:#9C216E}';const p=u;const g=class{constructor(o){e(this,o);this.ifxOpen=t(this,"ifxOpen",7);this.ifxClose=t(this,"ifxClose",7);this.opened=false;this.showModal=this.opened||false;this.caption="Modal Title";this.closeOnOverlayClick=true;this.variant="default";this.size="s";this.alertIcon="";this.okButtonLabel="OK";this.cancelButtonLabel="Cancel";this.slotButtonsPresent=false;this.showCloseButton=true;this.focusableElements=[];this.handleTopFocus=()=>{this.attemptFocus(this.getLastFocusableElement())};this.handleBottomFocus=()=>{this.attemptFocus(this.getFirstFocusableElement())};this.handleKeypress=e=>{if(!this.showModal){return}if(e.key==="Escape"){this.doBeforeClose("ESCAPE_KEY")}}}componentWillLoad(){if(!r(this.hostElement)){const e=a();s("ifx-modal",e)}}componentDidLoad(){this.focusableElements=d(this.hostElement.shadowRoot,(e=>c(e)||e.matches("[data-focus-trap-edge]")),f)}componentWillRender(){if(this.showModal){this.handleComponentOverflow()}}handleComponentOverflow(){const e=this.hostElement.shadowRoot.querySelector(".modal-content-container");if(this.showModal&&this.isModalContentContainerHeightReachedViewport()){e.classList.add("no-overflow")}else if(e===null||e===void 0?void 0:e.classList.contains("no-overflow")){e===null||e===void 0?void 0:e.classList.remove("no-overflow")}}getFirstFocusableElement(){return this.focusableElements[0]}getLastFocusableElement(){return this.focusableElements[this.focusableElements.length-1]}attemptFocus(e){if(e==null){setTimeout((()=>{this.closeButton.focus()}));return}setTimeout((()=>{e.focus()}),0)}open(){this.showModal=true;try{const e=h(this.modalContainer,m.fadeIn,{duration:200});e.addEventListener("finish",(()=>{setTimeout((()=>{var e,t;(e=this.getLastFocusableElement())===null||e===void 0?void 0:e.focus();(t=this.getLastFocusableElement())===null||t===void 0?void 0:t.blur()}),0);this.ifxOpen.emit()}));this.hostElement.addEventListener("keydown",this.handleKeypress)}catch(e){this.ifxOpen.emit()}}close(){try{const e=h(this.modalContainer,m.fadeOut,{duration:200});e.addEventListener("finish",(()=>{this.showModal=false;this.ifxClose.emit()}));this.hostElement.removeEventListener("keydown",this.handleKeypress)}catch(e){this.showModal=false;this.ifxClose.emit()}}doBeforeClose(e){const t=[];t.push(e);const o=t.some((e=>e.defaultPrevented));if(!o){this.opened=false}}openedChanged(e){if(e===true){this.open()}else{this.close()}}handleOverlayClick(){if(this.closeOnOverlayClick){this.doBeforeClose("BACKDROP")}}handleContentUpdate(e){const t=e.target;const o=t.assignedNodes();if(o.length>0){o.forEach((e=>{if(e.observer){e.observer.disconnect();delete e.observer}const t=new MutationObserver(((e,t)=>{for(let t of e){if(t.type==="childList"){if(this.showModal){this.handleComponentOverflow()}}}}));t.observe(e,{attributes:true,childList:true,subtree:true});e.observer=t}))}}handleButtonsSlotChange(e){var t;if(((t=e.currentTarget.assignedElements()[0])===null||t===void 0?void 0:t.childElementCount)>0){this.slotButtonsPresent=true}else{this.slotButtonsPresent=false}}isModalContentContainerHeightReachedViewport(){return new Promise((e=>{setTimeout((()=>{const t=this.hostElement.shadowRoot.querySelector(".modal-content");const o=t.offsetHeight;const n=window.innerHeight;e(o>=n*.9)}),100)}))}render(){const e=this.variant!=="default";return o(n,{key:"24c13df6af069b1d93d4e70c0930bd4381b2dcc1"},o("div",{key:"fc6a23f20309e087dac7665bb71df58ea44669aa",ref:e=>this.modalContainer=e,class:`modal-container ${this.showModal?"open":""}`},o("div",{key:"109e80dce5854beda04fc593efae49bdf8a4d4e0",class:"modal-overlay",onClick:()=>this.handleOverlayClick()}),o("div",{key:"eb35fdaf211ceef40b983d378304a4642fa839e8","data-focus-trap-edge":true,onFocus:this.handleTopFocus,tabindex:"0"}),o("div",{key:"0b7b0108c0563ffc5e14fd8f1c39d4bf3c80c03d",class:`modal-content-container ${this.size}`,role:"dialog","aria-modal":"true","aria-label":this.caption},e?o("div",{class:`modal-icon-container ${this.variant==="alert-brand"?"":"danger"}`},this.alertIcon?o("ifx-icon",{icon:this.alertIcon}):null):null,o("div",{key:"23113f6efc3df7ca24976bde7999f29b21c57a56",class:"modal-content"},o("div",{key:"d89ad9950a9d9ea8b64ab9ad41b3e47ee3a3a8c3",class:"modal-header"},o("h2",{key:"ebad8ef7e759f916325a0a5fe7e87a016f9e169a",class:"modal-caption"},this.caption),this.showCloseButton&&o("ifx-icon-button",{key:"8655efa78858838ee8ec697cb9adad04b27e882b",class:"modal-close-button",ref:e=>this.closeButton=e,icon:"cross-16",variant:"tertiary",onClick:()=>this.doBeforeClose("CLOSE_BUTTON")})),o("div",{key:"71fd706680ffecda83c792639cd3781e739fad74",class:"modal-body"},o("slot",{key:"e9607ce7823d9fc0020ae4c0135612c9bb688984",name:"content",onSlotchange:e=>this.handleContentUpdate(e)})),o("div",{key:"3283f090e75460790a0f31708c34aa54efa77548",class:`modal-footer ${this.slotButtonsPresent?"buttons-present":""}`},o("slot",{key:"59f2179f10110195b68a4f1671aa342209d0e51b",name:"buttons",onSlotchange:e=>this.handleButtonsSlotChange(e)})))),o("div",{key:"f3e0591f72a4e3f756fc1e3378e27733d3ee2707","data-focus-trap-edge":true,onFocus:this.handleBottomFocus,tabindex:"0"})))}get hostElement(){return i(this)}static get watchers(){return{opened:["openedChanged"]}}};g.style=p;export{g as ifx_modal};
2
+ //# sourceMappingURL=p-cb4130b5.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as e,c as t,h as s,g as i}from"./p-b7a462e5.js";import{d as o,t as a}from"./p-0b7e3932.js";import{i as n}from"./p-1ecafb97.js";const r=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}.group{display:flex;flex-direction:column;justify-content:space-between;gap:12px}.group__label{font:400 0.75rem/1rem "Source Sans 3"}.group__label:empty{display:none}.group__controls{display:flex;flex-wrap:wrap}.group__controls ::slotted(*){margin-left:-1px;margin-top:-1px}.group__caption{display:flex;align-items:center;gap:8px;font:400 0.75rem/1rem "Source Sans 3"}';const l=r;const c=class{constructor(s){e(this,s);this.ifxChange=t(this,"ifxChange",7);this.caption="";this.label="";this.size="regular";this.selectedValue=""}onSegmentSelect(e){const{previousValue:t,selectedValue:s}=this.unselectPreviousSegment(e.detail);this.selectedValue=s;this.ifxChange.emit({previousValue:t,selectedValue:s})}unselectPreviousSegment(e){let t;let s;const i=this.getSegments();i.forEach((i=>{if(i.selected){if(i.segmentIndex!==e){i.selected=false;t=i.value}else{s=i.value}}}));return{previousValue:t,selectedValue:s}}getSegments(){return this.SegmentedControl.querySelectorAll("ifx-segment")}setActiveSegment(){const e=this.getSegments();let t=false;e.forEach(((e,s)=>{e.segmentIndex=s;if(t){if(e.selected)e.selected=false}else{if(e.selected){t=true;this.selectedValue=e.value}}}))}setSegmentSize(){const e=this.getSegments();e.forEach((e=>{e.shadowRoot.querySelector(".segment").classList.add(`segment--${this.size}`)}))}componentWillLoad(){if(!n(this.SegmentedControl)){const e=o();a("ifx-segmented-control",e)}}componentDidLoad(){this.setActiveSegment()}render(){return s("div",{key:"976552137dae35287135c76936b5efc67211f1b1","aria-value":this.selectedValue,"aria-label":"segmented control",class:"group"},s("div",{key:"09a2fb9276f90a6df9c383fe7b046299c30a939c",class:"group__label"},this.label.trim()),s("div",{key:"6b7e23370017bac5dd2489995b1825c06757848e",class:"group__controls"},s("slot",{key:"8c6993e1ef822f2173a5b9af7d31d91ab62d4a1d"})),this.caption.trim()&&s("div",{key:"f8389603353e61bb99c69edf342ab705e46690f0",class:"group__caption"},s("ifx-icon",{key:"702a4976c7197072f20e753c430ae3fc2b980f10",icon:"c-info-16"})," ",this.caption.trim()))}componentDidRender(){this.setSegmentSize()}get SegmentedControl(){return i(this)}};c.style=l;export{c as ifx_segmented_control};
2
+ //# sourceMappingURL=p-d6253110.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["segmentedControlCss","IfxSegmentedControlStyle0","SegmentedControl","constructor","hostRef","this","caption","label","size","selectedValue","onSegmentSelect","event","previousValue","unselectPreviousSegment","detail","ifxChange","emit","newSelectedIndex","segments","getSegments","forEach","control","selected","segmentIndex","value","querySelectorAll","setActiveSegment","activeSegmentedControlFound","idx","setSegmentSize","shadowRoot","querySelector","classList","add","componentWillLoad","isNestedInIfxComponent","framework","detectFramework","trackComponent","componentDidLoad","render","h","key","class","trim","icon","componentDidRender"],"sources":["src/components/segmented-control/segmented-control.scss?tag=ifx-segmented-control&encapsulation=shadow","src/components/segmented-control/segmented-control.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n.group {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n gap: tokens.$ifxSpace150;\n}\n\n.group__label {\n font: tokens.$ifxBodyBody03;\n\n &:empty {\n display: none;\n }\n}\n\n.group__controls {\n display: flex;\n flex-wrap: wrap;\n}\n\n.group__controls ::slotted(*) {\n margin-left: -1px;\n margin-top: -1px;\n}\n\n.group__caption {\n display: flex;\n align-items: center;\n gap: tokens.$ifxSpace100;\n \n font: tokens.$ifxBodyBody05;\n}\n","import { h, Component, Element, Event, EventEmitter, Listen, Prop } from \"@stencil/core\";\nimport { trackComponent } from '../../global/utils/tracking'; \nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\n\n@Component ({\n tag: 'ifx-segmented-control',\n styleUrl: 'segmented-control.scss',\n shadow: true\n})\n\nexport class SegmentedControl {\n @Element() SegmentedControl: HTMLIfxSegmentedControlElement;\n\n @Event() ifxChange: EventEmitter<{ previousValue: string, selectedValue: string }>;\n\n @Prop() caption: string = '';\n @Prop() label: string = '';\n @Prop() size: 'regular' | 'small' = 'regular';\n\n @Listen('segmentSelect')\n onSegmentSelect(event: CustomEvent) {\n const { previousValue, selectedValue } = this.unselectPreviousSegment(event.detail);\n this.selectedValue = selectedValue;\n this.ifxChange.emit({ previousValue, selectedValue });\n }\n\n private selectedValue: string = '';\n\n unselectPreviousSegment(newSelectedIndex: number): { previousValue: string, selectedValue: string } {\n let previousValue: string;\n let selectedValue: string;\n\n const segments: NodeList = this.getSegments();\n segments.forEach((control: HTMLIfxSegmentElement) => {\n if (control.selected) {\n if (control.segmentIndex !== newSelectedIndex) {\n control.selected = false;\n previousValue = control.value;\n } else {\n selectedValue = control.value;\n }\n }\n })\n\n return { previousValue, selectedValue };\n }\n\n getSegments(): NodeList {\n return this.SegmentedControl.querySelectorAll('ifx-segment');\n }\n\n setActiveSegment(): void {\n const segments: NodeList = this.getSegments();\n let activeSegmentedControlFound = false;\n segments.forEach((control: HTMLIfxSegmentElement, idx: number) => {\n control.segmentIndex = idx;\n if (activeSegmentedControlFound) {\n if (control.selected) control.selected = false;\n } else {\n if (control.selected) {\n activeSegmentedControlFound = true;\n this.selectedValue = control.value;\n }\n }\n });\n }\n\n setSegmentSize(): void {\n const segments: NodeList = this.getSegments();\n segments.forEach((control: HTMLIfxSegmentElement) => {\n control.shadowRoot.querySelector('.segment').classList.add(`segment--${this.size}`);\n });\n }\n\n componentWillLoad() { \n if(!isNestedInIfxComponent(this.SegmentedControl)) { \n const framework = detectFramework();\n trackComponent('ifx-segmented-control', framework)\n }\n }\n\n componentDidLoad() {\n this.setActiveSegment();\n }\n\n render() {\n return (\n <div aria-value={this.selectedValue} aria-label='segmented control' class='group'>\n <div class='group__label'>\n { this.label.trim() }\n </div>\n \n <div class='group__controls'>\n <slot />\n </div>\n \n {\n this.caption.trim() &&\n <div class='group__caption'>\n <ifx-icon icon='c-info-16'></ifx-icon> { this.caption.trim() }\n </div>\n }\n </div>\n );\n }\n\n componentDidRender() {\n this.setSegmentSize();\n }\n}"],"mappings":"wIAAA,MAAMA,EAAsB,+aAC5B,MAAAC,EAAeD,E,MCUFE,EAAgB,MAN7B,WAAAC,CAAAC,G,+CAWYC,KAAAC,QAAkB,GAClBD,KAAAE,MAAgB,GAChBF,KAAAG,KAA4B,UAS5BH,KAAAI,cAAwB,E,CANhC,eAAAC,CAAgBC,GACZ,MAAMC,cAAEA,EAAaH,cAAEA,GAAkBJ,KAAKQ,wBAAwBF,EAAMG,QAC5ET,KAAKI,cAAgBA,EACrBJ,KAAKU,UAAUC,KAAK,CAAEJ,gBAAeH,iB,CAKzC,uBAAAI,CAAwBI,GACpB,IAAIL,EACJ,IAAIH,EAEJ,MAAMS,EAAqBb,KAAKc,cAChCD,EAASE,SAASC,IACd,GAAIA,EAAQC,SAAU,CAClB,GAAID,EAAQE,eAAiBN,EAAkB,CAC3CI,EAAQC,SAAW,MACnBV,EAAgBS,EAAQG,K,KACrB,CACHf,EAAgBY,EAAQG,K,MAKpC,MAAO,CAAEZ,gBAAeH,gB,CAG5B,WAAAU,GACI,OAAOd,KAAKH,iBAAiBuB,iBAAiB,c,CAGlD,gBAAAC,GACI,MAAMR,EAAqBb,KAAKc,cAChC,IAAIQ,EAA8B,MAClCT,EAASE,SAAQ,CAACC,EAAgCO,KAC9CP,EAAQE,aAAeK,EACvB,GAAID,EAA6B,CAC7B,GAAIN,EAAQC,SAAUD,EAAQC,SAAW,K,KACtC,CACH,GAAID,EAAQC,SAAU,CAClBK,EAA8B,KAC9BtB,KAAKI,cAAgBY,EAAQG,K,MAM7C,cAAAK,GACI,MAAMX,EAAqBb,KAAKc,cAChCD,EAASE,SAASC,IACdA,EAAQS,WAAWC,cAAc,YAAYC,UAAUC,IAAI,YAAY5B,KAAKG,OAAO,G,CAI3F,iBAAA0B,GACI,IAAIC,EAAuB9B,KAAKH,kBAAmB,CAC/C,MAAMkC,EAAYC,IAClBC,EAAe,wBAAyBF,E,EAIhD,gBAAAG,GACIlC,KAAKqB,kB,CAGT,MAAAc,GACI,OACIC,EAAA,OAAAC,IAAA,wDAAiBrC,KAAKI,cAAa,aAAa,oBAAoBkC,MAAM,SACtEF,EAAA,OAAAC,IAAA,2CAAKC,MAAM,gBACLtC,KAAKE,MAAMqC,QAGjBH,EAAA,OAAAC,IAAA,2CAAKC,MAAM,mBACPF,EAAA,QAAAC,IAAA,8CAIArC,KAAKC,QAAQsC,QACbH,EAAA,OAAAC,IAAA,2CAAKC,MAAM,kBACPF,EAAA,YAAAC,IAAA,2CAAUG,KAAK,cAAuB,IAAGxC,KAAKC,QAAQsC,Q,CAO1E,kBAAAE,GACIzC,KAAKwB,gB","ignoreList":[]}
1
+ {"version":3,"names":["segmentedControlCss","IfxSegmentedControlStyle0","SegmentedControl","constructor","hostRef","this","caption","label","size","selectedValue","onSegmentSelect","event","previousValue","unselectPreviousSegment","detail","ifxChange","emit","newSelectedIndex","segments","getSegments","forEach","control","selected","segmentIndex","value","querySelectorAll","setActiveSegment","activeSegmentedControlFound","idx","setSegmentSize","shadowRoot","querySelector","classList","add","componentWillLoad","isNestedInIfxComponent","framework","detectFramework","trackComponent","componentDidLoad","render","h","key","class","trim","icon","componentDidRender"],"sources":["src/components/segmented-control/segmented-control.scss?tag=ifx-segmented-control&encapsulation=shadow","src/components/segmented-control/segmented-control.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n.group {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n gap: tokens.$ifxSpace150;\n}\n\n.group__label {\n font: tokens.$ifxBodyBody05;\n\n &:empty {\n display: none;\n }\n}\n\n.group__controls {\n display: flex;\n flex-wrap: wrap;\n}\n\n.group__controls ::slotted(*) {\n margin-left: -1px;\n margin-top: -1px;\n}\n\n.group__caption {\n display: flex;\n align-items: center;\n gap: tokens.$ifxSpace100;\n \n font: tokens.$ifxBodyBody05;\n}\n","import { h, Component, Element, Event, EventEmitter, Listen, Prop } from \"@stencil/core\";\nimport { trackComponent } from '../../global/utils/tracking'; \nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\n\n@Component ({\n tag: 'ifx-segmented-control',\n styleUrl: 'segmented-control.scss',\n shadow: true\n})\n\nexport class SegmentedControl {\n @Element() SegmentedControl: HTMLIfxSegmentedControlElement;\n\n @Event() ifxChange: EventEmitter<{ previousValue: string, selectedValue: string }>;\n\n @Prop() caption: string = '';\n @Prop() label: string = '';\n @Prop() size: 'regular' | 'small' = 'regular';\n\n @Listen('segmentSelect')\n onSegmentSelect(event: CustomEvent) {\n const { previousValue, selectedValue } = this.unselectPreviousSegment(event.detail);\n this.selectedValue = selectedValue;\n this.ifxChange.emit({ previousValue, selectedValue });\n }\n\n private selectedValue: string = '';\n\n unselectPreviousSegment(newSelectedIndex: number): { previousValue: string, selectedValue: string } {\n let previousValue: string;\n let selectedValue: string;\n\n const segments: NodeList = this.getSegments();\n segments.forEach((control: HTMLIfxSegmentElement) => {\n if (control.selected) {\n if (control.segmentIndex !== newSelectedIndex) {\n control.selected = false;\n previousValue = control.value;\n } else {\n selectedValue = control.value;\n }\n }\n })\n\n return { previousValue, selectedValue };\n }\n\n getSegments(): NodeList {\n return this.SegmentedControl.querySelectorAll('ifx-segment');\n }\n\n setActiveSegment(): void {\n const segments: NodeList = this.getSegments();\n let activeSegmentedControlFound = false;\n segments.forEach((control: HTMLIfxSegmentElement, idx: number) => {\n control.segmentIndex = idx;\n if (activeSegmentedControlFound) {\n if (control.selected) control.selected = false;\n } else {\n if (control.selected) {\n activeSegmentedControlFound = true;\n this.selectedValue = control.value;\n }\n }\n });\n }\n\n setSegmentSize(): void {\n const segments: NodeList = this.getSegments();\n segments.forEach((control: HTMLIfxSegmentElement) => {\n control.shadowRoot.querySelector('.segment').classList.add(`segment--${this.size}`);\n });\n }\n\n componentWillLoad() { \n if(!isNestedInIfxComponent(this.SegmentedControl)) { \n const framework = detectFramework();\n trackComponent('ifx-segmented-control', framework)\n }\n }\n\n componentDidLoad() {\n this.setActiveSegment();\n }\n\n render() {\n return (\n <div aria-value={this.selectedValue} aria-label='segmented control' class='group'>\n <div class='group__label'>\n { this.label.trim() }\n </div>\n \n <div class='group__controls'>\n <slot />\n </div>\n \n {\n this.caption.trim() &&\n <div class='group__caption'>\n <ifx-icon icon='c-info-16'></ifx-icon> { this.caption.trim() }\n </div>\n }\n </div>\n );\n }\n\n componentDidRender() {\n this.setSegmentSize();\n }\n}"],"mappings":"wIAAA,MAAMA,EAAsB,gbAC5B,MAAAC,EAAeD,E,MCUFE,EAAgB,MAN7B,WAAAC,CAAAC,G,+CAWYC,KAAAC,QAAkB,GAClBD,KAAAE,MAAgB,GAChBF,KAAAG,KAA4B,UAS5BH,KAAAI,cAAwB,E,CANhC,eAAAC,CAAgBC,GACZ,MAAMC,cAAEA,EAAaH,cAAEA,GAAkBJ,KAAKQ,wBAAwBF,EAAMG,QAC5ET,KAAKI,cAAgBA,EACrBJ,KAAKU,UAAUC,KAAK,CAAEJ,gBAAeH,iB,CAKzC,uBAAAI,CAAwBI,GACpB,IAAIL,EACJ,IAAIH,EAEJ,MAAMS,EAAqBb,KAAKc,cAChCD,EAASE,SAASC,IACd,GAAIA,EAAQC,SAAU,CAClB,GAAID,EAAQE,eAAiBN,EAAkB,CAC3CI,EAAQC,SAAW,MACnBV,EAAgBS,EAAQG,K,KACrB,CACHf,EAAgBY,EAAQG,K,MAKpC,MAAO,CAAEZ,gBAAeH,gB,CAG5B,WAAAU,GACI,OAAOd,KAAKH,iBAAiBuB,iBAAiB,c,CAGlD,gBAAAC,GACI,MAAMR,EAAqBb,KAAKc,cAChC,IAAIQ,EAA8B,MAClCT,EAASE,SAAQ,CAACC,EAAgCO,KAC9CP,EAAQE,aAAeK,EACvB,GAAID,EAA6B,CAC7B,GAAIN,EAAQC,SAAUD,EAAQC,SAAW,K,KACtC,CACH,GAAID,EAAQC,SAAU,CAClBK,EAA8B,KAC9BtB,KAAKI,cAAgBY,EAAQG,K,MAM7C,cAAAK,GACI,MAAMX,EAAqBb,KAAKc,cAChCD,EAASE,SAASC,IACdA,EAAQS,WAAWC,cAAc,YAAYC,UAAUC,IAAI,YAAY5B,KAAKG,OAAO,G,CAI3F,iBAAA0B,GACI,IAAIC,EAAuB9B,KAAKH,kBAAmB,CAC/C,MAAMkC,EAAYC,IAClBC,EAAe,wBAAyBF,E,EAIhD,gBAAAG,GACIlC,KAAKqB,kB,CAGT,MAAAc,GACI,OACIC,EAAA,OAAAC,IAAA,wDAAiBrC,KAAKI,cAAa,aAAa,oBAAoBkC,MAAM,SACtEF,EAAA,OAAAC,IAAA,2CAAKC,MAAM,gBACLtC,KAAKE,MAAMqC,QAGjBH,EAAA,OAAAC,IAAA,2CAAKC,MAAM,mBACPF,EAAA,QAAAC,IAAA,8CAIArC,KAAKC,QAAQsC,QACbH,EAAA,OAAAC,IAAA,2CAAKC,MAAM,kBACPF,EAAA,YAAAC,IAAA,2CAAUG,KAAK,cAAuB,IAAGxC,KAAKC,QAAQsC,Q,CAO1E,kBAAAE,GACIzC,KAAKwB,gB","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as t,c as s,h as i,a as e,g as n}from"./p-b7a462e5.js";import{g as o}from"./p-27d2afb4.js";import{d as r,t as c}from"./p-e8504e6b.js";import{i as h}from"./p-1ecafb97.js";const a="ifx-icon{display:inline-flex;justify-content:center}ifx-icon:empty{display:none}";const l=a;const u=class{constructor(i){t(this,i);this.consoleError=s(this,"consoleError",7);this.icon=""}updateIcon(t){this.internalIcon=t;this.setIcon()}convertStringToHtml(t){const s=document.createElement("div");s.innerHTML=t;return s.firstChild}convertHtmlToObject(t){let s=Array.from(t.attributes,(({name:t,value:s})=>({name:t,value:s}))).reduce(((t,s)=>{t[s.name]=s.value;return t}),{});return s}convertPathsToVnode(t){let s=[];const e=this.convertHtmlToObject(t);const n=i("path",e);s.push(n);if(t.firstChild){const e=t.querySelectorAll("path");const n=t.querySelectorAll("path").length;for(let t=0;t<n;t++){let n=this.convertHtmlToObject(e[t]);let o=i("path",n);s.push(o)}}return s}getSVG(t){const s=this.convertStringToHtml(this.ifxIcon);const e=s.getAttribute("width");const n=s.getAttribute("height");const o=s.getAttribute("fill");const r=s.getAttribute("viewBox");return i("svg",{class:"inline-svg",width:e,height:n,xmlns:"http://www.w3.org/2000/svg",fill:o,viewBox:r},...t)}constructIcon(){if(this.ifxIcon){const t=this.convertStringToHtml(this.ifxIcon);const s=this.convertPathsToVnode(t);const i=this.getSVG(s);return i}else if(this.icon!==""){console.error("Icon not found!");this.consoleError.emit(true);return}else{return}}setIcon(){const t=t=>t.replace(/[-_]+(.)/g,((t,s)=>s.toUpperCase())).replace(/^(.)/,(t=>t.toLowerCase()));const s=t(this.internalIcon);this.ifxIcon=o(s)}isInsideAgGrid(t){var s;let i=t;while(i){if((s=i.className)===null||s===void 0?void 0:s.toLowerCase().startsWith("ag-")){return true}i=i.parentElement}return false}isInsideChoices(t){var s;let i=t;while(i){if((s=i.className)===null||s===void 0?void 0:s.toLowerCase().startsWith("choices__")){return true}i=i.parentElement}return false}componentWillLoad(){this.internalIcon=this.icon;this.setIcon();if(!h(this.el)){if(!this.isInsideAgGrid(this.el)&&!this.isInsideChoices(this.el)){const t=r();c("ifx-icon",t)}}}render(){return i(e,{key:"f24594768c03f010640e0107a86f66cb7b247c74"},this.constructIcon())}get el(){return n(this)}static get watchers(){return{icon:["updateIcon"]}}};u.style=l;export{u as ifx_icon};
2
- //# sourceMappingURL=p-ce0db9fb.entry.js.map
1
+ import{r as t,c as s,h as i,a as e,g as n}from"./p-b7a462e5.js";import{g as o}from"./p-27d2afb4.js";import{d as r,t as c}from"./p-0b7e3932.js";import{i as h}from"./p-1ecafb97.js";const a="ifx-icon{display:inline-flex;justify-content:center}ifx-icon:empty{display:none}";const l=a;const u=class{constructor(i){t(this,i);this.consoleError=s(this,"consoleError",7);this.icon=""}updateIcon(t){this.internalIcon=t;this.setIcon()}convertStringToHtml(t){const s=document.createElement("div");s.innerHTML=t;return s.firstChild}convertHtmlToObject(t){let s=Array.from(t.attributes,(({name:t,value:s})=>({name:t,value:s}))).reduce(((t,s)=>{t[s.name]=s.value;return t}),{});return s}convertPathsToVnode(t){let s=[];const e=this.convertHtmlToObject(t);const n=i("path",e);s.push(n);if(t.firstChild){const e=t.querySelectorAll("path");const n=t.querySelectorAll("path").length;for(let t=0;t<n;t++){let n=this.convertHtmlToObject(e[t]);let o=i("path",n);s.push(o)}}return s}getSVG(t){const s=this.convertStringToHtml(this.ifxIcon);const e=s.getAttribute("width");const n=s.getAttribute("height");const o=s.getAttribute("fill");const r=s.getAttribute("viewBox");return i("svg",{class:"inline-svg",width:e,height:n,xmlns:"http://www.w3.org/2000/svg",fill:o,viewBox:r},...t)}constructIcon(){if(this.ifxIcon){const t=this.convertStringToHtml(this.ifxIcon);const s=this.convertPathsToVnode(t);const i=this.getSVG(s);return i}else if(this.icon!==""){console.error("Icon not found!");this.consoleError.emit(true);return}else{return}}setIcon(){const t=t=>t.replace(/[-_]+(.)/g,((t,s)=>s.toUpperCase())).replace(/^(.)/,(t=>t.toLowerCase()));const s=t(this.internalIcon);this.ifxIcon=o(s)}isInsideAgGrid(t){var s;let i=t;while(i){if((s=i.className)===null||s===void 0?void 0:s.toLowerCase().startsWith("ag-")){return true}i=i.parentElement}return false}isInsideChoices(t){var s;let i=t;while(i){if((s=i.className)===null||s===void 0?void 0:s.toLowerCase().startsWith("choices__")){return true}i=i.parentElement}return false}componentWillLoad(){this.internalIcon=this.icon;this.setIcon();if(!h(this.el)){if(!this.isInsideAgGrid(this.el)&&!this.isInsideChoices(this.el)){const t=r();c("ifx-icon",t)}}}render(){return i(e,{key:"f24594768c03f010640e0107a86f66cb7b247c74"},this.constructIcon())}get el(){return n(this)}static get watchers(){return{icon:["updateIcon"]}}};u.style=l;export{u as ifx_icon};
2
+ //# sourceMappingURL=p-d78cd447.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as i,c as e,h as s,g as t}from"./p-b7a462e5.js";import{d as l,t as a}from"./p-e8504e6b.js";import{i as o}from"./p-1ecafb97.js";const r=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{font-family:var(--ifx-font-family, sans-serif)}.file-upload-wrapper{display:flex;flex-direction:column}.file-upload-wrapper.disabled{pointer-events:none}.file-upload-wrapper.disabled label,.file-upload-wrapper.disabled .file-upload-info{color:#575352}.file-upload-label{font-style:normal;font-weight:400;font-size:1rem;line-height:1.5rem;color:#1D1D1D}.file-upload-label .required{display:inline-block;margin-left:4px}.file-upload-label .required.error{color:#CD002F}.upload-dropzone{border:1px dashed #BFBBBB;padding:40px;text-align:center;cursor:pointer;color:#1D1D1D;transition:border-color 0.3s ease;border-radius:1px;background:#FFFFFF}.upload-dropzone ifx-icon{color:#0A8276}.upload-dropzone:hover{border:1px dashed #8D8786}.upload-dropzone.drag-over{border:1px solid #0A8276;background:#F7F7F7}.upload-dropzone.drag-over.error{border:1px solid #0A8276}.upload-dropzone.error{border-color:#CD002F}.disabled .upload-dropzone{pointer-events:none;border-color:#BFBBBB;color:#BFBBBB}.disabled .upload-dropzone ifx-icon{color:#BFBBBB}.upload-dropzone input{display:none}.file-upload-info{font-style:normal;font-weight:400;font-size:0.75rem;line-height:1rem;letter-spacing:0em;color:#1D1D1D;margin:0;margin-top:4px}.file-upload-status{font-style:normal;font-weight:400;font-size:0.75rem;line-height:1rem;letter-spacing:0.2px;margin-top:8px}.file-upload-status.file-upload-status__error{display:flex;align-items:center;color:#CD002F}.file-upload-status.file-upload-status__error ifx-icon{position:relative;top:-1px;color:#CD002F;margin-right:8px}.upload-heading{font:600 1.125rem/1.625rem "Source Sans 3";margin-bottom:8px}.file-list-wrapper{margin-top:16px}.file-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:16px}.file-item{border:1px solid #BFBBBB;padding-top:12px;padding-right:16px;padding-bottom:8px;padding-left:16px;display:flex;gap:8px}.file-info{width:100%;min-width:0}.file-top-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:-8px}.file-top-row ifx-icon{flex-shrink:0}.file-name-wrapper{display:flex;min-width:0;max-width:100%;white-space:nowrap;overflow:hidden;font-weight:400;font-size:0.875rem}.file-name-base{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:1;min-width:0}.file-name-ext{flex-shrink:0;margin-left:0}.file-middle-row{display:flex;align-items:center;font-size:0.75rem;line-height:1rem;flex-wrap:wrap;color:#575352}.file-middle-row .file-status{margin-left:12px}.file-middle-row .file-status ifx-icon{margin-right:8px}.file-progress-row{margin-top:4px}.file-progress-row ifx-progress-bar{width:100%}.upload-success{border-color:#0A8276}.upload-success .file-status ifx-icon{position:relative;top:1px;color:#4CA460}.upload-failed{border-color:#CD002F}.upload-failed .file-status{color:#CD002F;margin-left:0}';const n=r;const h=class{constructor(s){i(this,s);this.ifxFileUploadAdd=e(this,"ifxFileUploadAdd",7);this.ifxFileUploadRemove=e(this,"ifxFileUploadRemove",7);this.ifxFileUploadChange=e(this,"ifxFileUploadChange",7);this.ifxFileUploadError=e(this,"ifxFileUploadError",7);this.ifxFileUploadInvalid=e(this,"ifxFileUploadInvalid",7);this.ifxFileUploadStart=e(this,"ifxFileUploadStart",7);this.ifxFileUploadComplete=e(this,"ifxFileUploadComplete",7);this.ifxFileUploadAllComplete=e(this,"ifxFileUploadAllComplete",7);this.ifxFileUploadAbort=e(this,"ifxFileUploadAbort",7);this.ifxFileUploadDrop=e(this,"ifxFileUploadDrop",7);this.ifxFileUploadClick=e(this,"ifxFileUploadClick",7);this.ifxFileUploadMaxFilesExceeded=e(this,"ifxFileUploadMaxFilesExceeded",7);this.ifxFileUploadValidation=e(this,"ifxFileUploadValidation",7);this.ifxFileUploadRetry=e(this,"ifxFileUploadRetry",7);this.dragAndDrop=false;this.required=false;this.disabled=false;this.maxFileSizeMB=7;this.allowedFileTypes=["jpg","jpeg","png","pdf","mov","mp3","mp4"];this.additionalAllowedFileTypes=[];this.label="Label";this.labelRequiredError="At least one file must be uploaded";this.labelBrowseFiles="Browse files";this.labelDragAndDrop="Drag & Drop or browse files to upload";this.labelUploadedFilesHeading="Uploaded files";this.labelFileTooLarge="Upload failed. Max file size: {{size}}MB.";this.labelUnsupportedFileType="Unsupported file type.";this.labelUploaded="Successfully uploaded";this.labelUploadFailed="Upload failed. Please try again.";this.labelSupportedFormatsTemplate="Supported file formats: {{types}}. Max file size: {{size}}MB.";this.labelFileSingular="file";this.labelFilePlural="files";this.labelMaxFilesInfo="Up to {{count}} {{files}}.";this.labelMaxFilesExceeded="Upload limit exceeded. Only {{count}} {{files}} allowed.";this.ariaLabelBrowseFiles="Browse files";this.ariaLabelDropzone="Upload area. Click to browse or drag and drop files.";this.ariaLabelFileInput="Upload file";this.ariaLabelRemoveFile="Remove file";this.ariaLabelCancelUpload="Cancel upload";this.ariaLabelRetryUpload="Retry upload";this.ariaLabelUploadingStatus="Upload in progress";this.ariaLabelUploadedStatus="Upload completed";this.ariaLabelUploadFailedStatus="Upload failed";this.internalId=`ifx-file-upload-${Math.random().toString(36).substr(2,9)}`;this.isDragOver=false;this.files=[];this.uploadTasks=[];this.rejectedSizeFiles=[];this.rejectedTypeFiles=[];this.requiredError=false;this.statusMessage=null;this.fileInputEl=null;this.extensionToMimeMap={jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",gif:"image/gif",svg:"image/svg+xml",webp:"image/webp",pdf:"application/pdf",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",txt:"text/plain",csv:"text/csv",json:"application/json",mp3:"audio/mpeg",wav:"audio/wav",mp4:"video/mp4",mov:"video/quicktime",webm:"video/webm",zip:"application/zip",rar:"application/vnd.rar",tar:"application/x-tar",gz:"application/gzip",xml:"application/xml",html:"text/html",css:"text/css",js:"application/javascript"}}get maxFiles(){return this._maxFiles}set maxFiles(i){if(typeof i==="number"&&i<1){console.warn("Invalid `maxFiles` value. Must be >= 1. Value ignored.");this._maxFiles=undefined}else{this._maxFiles=i}}validateRequired(){var i,e;if(this.required&&this.files.length===0){this.requiredError=true;if(((i=this.statusMessage)===null||i===void 0?void 0:i.text)!==this.labelRequiredError){this.statusMessage={type:"error",text:this.labelRequiredError}}this.ifxFileUploadValidation.emit({valid:false})}else{this.requiredError=false;if(((e=this.statusMessage)===null||e===void 0?void 0:e.text)===this.labelRequiredError){this.statusMessage=null}this.ifxFileUploadValidation.emit({valid:true})}}pluralize(i){return i===1?this.labelFileSingular:this.labelFilePlural}getNormalizedFileTypes(){if(Array.isArray(this.allowedFileTypes)){return this.allowedFileTypes}try{return JSON.parse(this.allowedFileTypes)}catch(i){return this.allowedFileTypes.split(",").map((i=>i.trim()))}}getLabelFromMimeType(i){for(const[e,s]of Object.entries(this.extensionToMimeMap)){if(s===i){return e.toUpperCase()}}return i}handleFileChange(i){const e=i.target;if(!e.files)return;this.processFiles(e.files)}handleDrop(i){var e;if(this.disabled)return;i.preventDefault();i.stopPropagation();this.isDragOver=false;if((e=i.dataTransfer)===null||e===void 0?void 0:e.files){const e=Array.from(i.dataTransfer.files);const s=[...this.getNormalizedFileTypes().map((i=>this.extensionToMimeMap[i.toLowerCase()])).filter(Boolean),...this.getAdditionalMimeTypes()];const t=[];const l=[];e.forEach((i=>{const e=s.includes(i.type);const a=i.size<=this.maxFileSizeMB*1024*1024;if(e&&a)t.push(i);else l.push(i)}));this.ifxFileUploadDrop.emit({droppedFiles:e,acceptedFiles:t,rejectedFiles:l});this.processFiles(i.dataTransfer.files)}}handleDragOver(i){if(this.disabled)return;i.preventDefault();this.isDragOver=true}handleDragLeave(i){if(this.disabled)return;i.preventDefault();this.isDragOver=false}processFiles(i){const e=Array.from(i);const s=[...this.getNormalizedFileTypes().map((i=>this.extensionToMimeMap[i.toLowerCase()])).filter(Boolean),...this.getAdditionalMimeTypes()];const t=[];const l=[];const a=[];e.forEach((i=>{const e=s.includes(i.type);const o=i.size<=this.maxFileSizeMB*1024*1024;const r=this.files.some((e=>e.name===i.name&&e.size===i.size));if(r){this.ifxFileUploadInvalid.emit({file:i,reason:"duplicate"});this.ifxFileUploadError.emit({file:i,errorType:"duplicate",message:`File "${i.name}" is already added`,reason:"duplicate"});return}if(e&&o){t.push(i)}else{if(!e){a.push(i.name);this.ifxFileUploadInvalid.emit({file:i,reason:"invalid-type"})}if(!o){l.push(i.name);this.ifxFileUploadInvalid.emit({file:i,reason:"invalid-size"})}this.ifxFileUploadError.emit({file:i,errorType:!e?"invalid-type":"file-too-large",message:"Invalid file rejected",reason:!e?"unsupported-type":"file-too-large"})}}));this.rejectedSizeFiles=[...this.rejectedSizeFiles,...l];this.rejectedTypeFiles=[...this.rejectedTypeFiles,...a];if(this.maxFiles&&this.files.length+t.length>this.maxFiles){const i=this.maxFiles-this.files.length;const e=t.slice(0,Math.max(i,0));const s=t.slice(i);this.files=[...this.files,...e];e.forEach((i=>this.startUpload(i)));if(e.length>0){this.ifxFileUploadAdd.emit({addedFiles:e,files:this.files});this.ifxFileUploadChange.emit({files:this.files})}s.forEach((i=>{this.ifxFileUploadInvalid.emit({file:i,reason:"too-many-files"});this.ifxFileUploadError.emit({file:i,errorType:"too-many-files",message:`Upload limit exceeded. Max ${this.maxFiles} files allowed.`,reason:"too-many-files"})}));if(s.length>0){this.statusMessage={type:"error",text:this.labelMaxFilesExceeded.replace("{{count}}",this.maxFiles.toString()).replace("{{files}}",this.pluralize(this.maxFiles))};this.ifxFileUploadMaxFilesExceeded.emit({maxFiles:this.maxFiles,attempted:this.files.length+t.length})}return}t.forEach((i=>this.startUpload(i)));this.files=[...this.files,...t];if(t.length>0){this.ifxFileUploadAdd.emit({addedFiles:t,files:this.files});this.ifxFileUploadChange.emit({files:this.files})}this.validateRequired()}retryUpload(i){const e=this.uploadTasks.findIndex((e=>e.file.name===i.name));if(e!==-1){this.uploadTasks.splice(e,1);this.uploadTasks=[...this.uploadTasks]}this.ifxFileUploadRetry.emit({file:i});this.startUpload(i)}startUpload(i){this.ifxFileUploadStart.emit({file:i});const e={file:i,progress:3,intervalId:null,completed:false};this.uploadTasks=[...this.uploadTasks,e];if(this.uploadHandler){this.uploadHandler(i,(i=>{if(i>e.progress){e.progress=Math.min(100,i);this.uploadTasks=[...this.uploadTasks]}})).then((()=>{e.progress=100;e.completed=true;this.uploadTasks=[...this.uploadTasks];this.ifxFileUploadComplete.emit({file:i});this.ifxFileUploadChange.emit({files:this.files});if(this.uploadTasks.every((i=>i.completed))){this.ifxFileUploadAllComplete.emit({files:this.files})}})).catch((()=>{e.error=true;this.uploadTasks=[...this.uploadTasks];this.ifxFileUploadError.emit({file:i,errorType:"upload-failed",message:"Upload handler rejected file",reason:"custom"})}))}else{const s=i.size;const t=1e5;let l=0;e.intervalId=window.setInterval((()=>{l+=t/5;const a=Math.min(100,Math.round(l/s*100));e.progress=a;this.uploadTasks=[...this.uploadTasks];if(a>=100){clearInterval(e.intervalId);e.completed=true;e.intervalId=null;this.uploadTasks=[...this.uploadTasks];this.ifxFileUploadComplete.emit({file:i});this.ifxFileUploadChange.emit({files:this.files});if(this.uploadTasks.every((i=>i.completed))){this.ifxFileUploadAllComplete.emit({files:this.files})}}}),200)}this.uploadTasks=[...this.uploadTasks,e]}cancelUpload(i){const e=this.uploadTasks.findIndex((e=>e.file.name===i.name));if(e!==-1){const i=this.uploadTasks[e];if((i===null||i===void 0?void 0:i.intervalId)!==null){clearInterval(i.intervalId)}this.uploadTasks=this.uploadTasks.filter(((i,s)=>s!==e))}this.files=this.files.filter((e=>e.name!==i.name));this.ifxFileUploadAbort.emit({file:i});this.ifxFileUploadChange.emit({files:this.files});if(this.fileInputEl){this.fileInputEl.value=""}this.validateRequired()}removeFile(i){var e;this.uploadTasks=this.uploadTasks.filter((e=>e.file.name!==i.name));this.files=this.files.filter((e=>e.name!==i.name));this.ifxFileUploadRemove.emit({removedFile:i,files:this.files});this.ifxFileUploadChange.emit({files:this.files});this.validateRequired();if(this.fileInputEl){this.fileInputEl.value=""}if(this.maxFiles&&this.files.length<this.maxFiles&&((e=this.statusMessage)===null||e===void 0?void 0:e.text)!==this.labelRequiredError){this.statusMessage=null}}clearRejectedFile(i,e){if(e==="size"){this.rejectedSizeFiles=this.rejectedSizeFiles.filter((e=>e!==i))}else{this.rejectedTypeFiles=this.rejectedTypeFiles.filter((e=>e!==i))}if(this.fileInputEl){this.fileInputEl.value=""}if(this.maxFiles&&this.files.length<this.maxFiles){this.statusMessage=null}this.validateRequired()}splitFileNameParts(i){const e=i.name;const s=e.lastIndexOf(".");if(s===-1)return{base:e,ext:""};return{base:e.substring(0,s),ext:e.substring(s)}}getFileIcon(i){var e;const s=(e=i.name.split(".").pop())===null||e===void 0?void 0:e.toLowerCase();switch(s){case"pdf":return"file-pdf-16";case"jpg":case"jpeg":return"file-jpg-16";case"png":return"file-png-16";case"mov":return"file-mov-16";case"mp3":return"file-mp3-16";case"mp4":return"file-mp4-16";default:return"file-16"}}formatSize(i){if(i>=1024*1024*1024){return`${(i/(1024*1024*1024)).toFixed(1)} GB`}else if(i>=1024*1024){return`${(i/(1024*1024)).toFixed(1)} MB`}else if(i>=1024){return`${(i/1024).toFixed(0)} KB`}else{return`${i} B`}}getAcceptAttribute(){const i=this.getNormalizedFileTypes().map((i=>"."+i.toLowerCase()));const e=this.getAdditionalMimeTypes();return[...i,...e].join(",")}getFormattedProgressText(i){const e=Math.round(i.progress/100*i.file.size);const s=this.formatSize(e);const t=this.formatSize(i.file.size);return`${s} / ${t} uploaded`}getAdditionalMimeTypes(){if(!this.additionalAllowedFileTypes)return[];if(Array.isArray(this.additionalAllowedFileTypes))return this.additionalAllowedFileTypes;return this.additionalAllowedFileTypes.split(",").map((i=>i.trim()))}getSupportedFileText(){const i=this.getNormalizedFileTypes().map((i=>i.toUpperCase()));const e=this.getAdditionalMimeTypes().map((i=>this.getLabelFromMimeType(i)));const s=[...i,...e];const t=s.join(", ");let l=this.labelSupportedFormatsTemplate.replace("{{types}}",t).replace("{{size}}",this.maxFileSizeMB.toString());if(this.labelMaxFilesInfo&&this.maxFiles){const i=this.pluralize(this.maxFiles);const e=this.labelMaxFilesInfo.replace("{{count}}",this.maxFiles.toString()).replace("{{files}}",i);l+=` ${e}`}return l}getFormattedFileTooLargeText(){return this.labelFileTooLarge.replace("{{size}}",this.maxFileSizeMB.toString())}renderStatusMessage(){if(!this.statusMessage)return null;return s("div",{class:`file-upload-status file-upload-status__${this.statusMessage.type}`},this.statusMessage.type==="error"&&s("ifx-icon",{icon:"c-warning-16"}),this.statusMessage.text)}isInputDisabled(){return this.disabled||this.maxFiles!==undefined&&this.files.length>=this.maxFiles}componentWillLoad(){if(!o(this.hostElement)){const i=l();a("ifx-file-upload",i)}}componentDidLoad(){if(this.hostElement.hasAttribute("show-demo-states")){this.showDemoStates=true}if(this.showDemoStates){this.injectDemoState()}}async injectDemoState(){const i=new Array(5e4).fill("a").join("");const e=i+i;const s=new File([i],"Image.jpg",{type:"image/jpeg"});const t=new File([e],"File.pdf",{type:"application/pdf"});const l=new File([i],"Text.docx",{type:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"});const a=new File([e+e+e],"Video.mp4",{type:"video/mp4"});const o=new File(["demo"],"Script.exe",{type:"application/x-msdownload"});this.files=[t,s,l];this.uploadTasks=[{file:t,progress:100,intervalId:null,completed:true},{file:s,progress:40,intervalId:null,completed:false},{file:l,progress:80,intervalId:null,completed:false,error:true}];this.rejectedSizeFiles=[a.name];this.rejectedTypeFiles=[o.name]}async triggerDemoValidation(){this.validateRequired()}render(){return s("div",{key:"a9cea6fe1f122bd00ddee401138c075911332968",class:{"file-upload-wrapper":true,disabled:this.disabled}},this.label&&s("label",{key:"05c0b05bd08e2e6850ed568165416d249ce72e10",class:"file-upload-label",htmlFor:this.internalId},this.label,this.required&&s("span",{key:"3c30d8f88259072e9548054131b1963e527902a2",class:`required ${this.requiredError?"error":""}`},"*")),this.dragAndDrop?this.renderDragAndDropArea():this.renderUploadArea(),(this.files.length>0||this.rejectedSizeFiles.length>0||this.rejectedTypeFiles.length>0)&&s("div",{key:"cf05de4f4ca9bec4a2d17e4134356b4027cf93a3",class:"file-list-wrapper"},s("div",{key:"63afc1dea10b55f33b5957c8195a624d5224cc15",class:"upload-heading"},this.labelUploadedFilesHeading),s("ul",{key:"680c4247f6046899bad807cb277a7e21d7b89022",class:"file-list"},this.rejectedSizeFiles.map((i=>s("li",{class:"file-item upload-failed",key:`rejected-size-${i}`},s("div",{class:"file-icon"},s("ifx-icon",{icon:"file-16"})),s("div",{class:"file-info"},s("div",{class:"file-top-row"},s("span",{class:"file-name-wrapper"},s("span",{class:"file-name-base"},this.splitFileNameParts({name:i}).base),s("span",{class:"file-name-ext"},this.splitFileNameParts({name:i}).ext)),s("div",{class:"file-actions"},s("ifx-icon-button",{shape:"square",variant:"tertiary",icon:"delete-forever-16",size:"s","aria-label":this.ariaLabelRemoveFile,onClick:()=>this.clearRejectedFile(i,"size")}))),s("div",{class:"file-middle-row"},s("span",{class:"file-status","aria-label":this.labelFileTooLarge.replace("{{size}}",this.maxFileSizeMB.toString())},this.getFormattedFileTooLargeText())))))),this.rejectedTypeFiles.map((i=>s("li",{class:"file-item upload-failed",key:`rejected-type-${i}`},s("div",{class:"file-icon"},s("ifx-icon",{icon:"file-16"})),s("div",{class:"file-info"},s("div",{class:"file-top-row"},s("span",{class:"file-name-wrapper"},s("span",{class:"file-name-base"},this.splitFileNameParts({name:i}).base),s("span",{class:"file-name-ext"},this.splitFileNameParts({name:i}).ext)),s("div",{class:"file-actions"},s("ifx-icon-button",{shape:"square",variant:"tertiary",icon:"delete-forever-16",size:"s","aria-label":this.ariaLabelRemoveFile,onClick:()=>this.clearRejectedFile(i,"type")}))),s("div",{class:"file-middle-row"},s("span",{class:"file-status","aria-label":this.labelUnsupportedFileType},this.labelUnsupportedFileType)))))),this.files.map((i=>{var e;const t=this.uploadTasks.find((e=>e.file.name===i.name));const l=(e=t===null||t===void 0?void 0:t.progress)!==null&&e!==void 0?e:100;const a=t&&!t.completed;const o=(t===null||t===void 0?void 0:t.error)===true;const r=o?"file-item upload-failed":a?"file-item uploading":"file-item upload-success";const n=`${i.name}-${i.size}`;const{base:h,ext:d}=this.splitFileNameParts(i);return s("li",{class:r,key:n},s("div",{class:"file-icon"},s("ifx-icon",{icon:this.getFileIcon(i)})),s("div",{class:"file-info"},s("div",{class:"file-top-row"},s("span",{class:"file-name-wrapper"},s("span",{class:"file-name-base"},h),s("span",{class:"file-name-ext"},d)),s("div",{class:"file-actions"},s("ifx-icon-button",{shape:"square",variant:"tertiary",icon:"refresh-16",size:"s","aria-label":this.ariaLabelRetryUpload,onClick:()=>this.retryUpload(i),style:{display:o?"inline-flex":"none"}}),s("ifx-icon-button",{shape:"square",variant:"tertiary",icon:"cross-16",size:"s","aria-label":this.ariaLabelCancelUpload,onClick:()=>this.cancelUpload(i),style:{display:a?"inline-flex":"none"}}),s("ifx-icon-button",{shape:"square",variant:"tertiary",icon:"delete-forever-16",size:"s","aria-label":this.ariaLabelRemoveFile,onClick:()=>this.removeFile(i),style:{display:!a?"inline-flex":"none"}}))),s("div",{class:"file-middle-row"},a&&t&&!t.error&&s("span",{class:"file-uploading","aria-label":this.ariaLabelUploadingStatus},this.getFormattedProgressText(t)),!a&&!o&&s("span",null,s("span",{class:"file-size"},this.formatSize(i.size)),s("span",{class:"file-status","aria-label":this.ariaLabelUploadedStatus},s("ifx-icon",{icon:"check-16"}),this.labelUploaded)),o&&s("span",{class:"file-status","aria-label":this.ariaLabelUploadFailedStatus},this.labelUploadFailed)),a&&t&&!t.error&&s("div",{class:"file-progress-row"},s("ifx-progress-bar",{size:"s",value:l,"show-label":"true"}))))})))))}renderUploadArea(){const i=i=>{this.fileInputEl=i};return s("div",{class:{"upload-button":true}},s("ifx-button",{variant:"secondary",onClick:()=>{var i;return(i=this.fileInputEl)===null||i===void 0?void 0:i.click()},disabled:this.isInputDisabled(),"aria-label":this.ariaLabelBrowseFiles},s("ifx-icon",{icon:"upload-16"}),this.labelBrowseFiles),s("input",{id:this.internalId,ref:i,type:"file",accept:this.getAcceptAttribute(),multiple:true,onChange:i=>this.handleFileChange(i),style:{display:"none"},disabled:this.isInputDisabled(),"aria-label":this.ariaLabelFileInput}),s("p",{class:"file-upload-info"},this.getSupportedFileText()),this.renderStatusMessage())}renderDragAndDropArea(){const i=i=>{this.fileInputEl=i};const e=()=>{if(this.fileInputEl){this.fileInputEl.click()}};return s("div",{class:{disabled:this.isInputDisabled()}},s("div",{class:{"upload-dropzone":true,"drag-over":this.isDragOver,error:this.requiredError},onClick:e,onDragOver:i=>this.handleDragOver(i),onDragLeave:i=>this.handleDragLeave(i),onDrop:i=>this.handleDrop(i),role:"button",tabIndex:0,"aria-label":this.ariaLabelDropzone},s("ifx-icon",{icon:"upload-16",class:"custom-icon"}),s("p",null,this.labelDragAndDrop),s("p",{class:"file-upload-info"},this.getSupportedFileText()),s("div",{style:{height:"0px",overflow:"hidden"}},s("input",{id:this.internalId,ref:i,type:"file",accept:this.getAcceptAttribute(),multiple:true,onChange:i=>this.handleFileChange(i),disabled:this.isInputDisabled(),"aria-label":this.ariaLabelFileInput}))),this.renderStatusMessage())}get hostElement(){return t(this)}};h.style=n;export{h as ifx_file_upload};
2
- //# sourceMappingURL=p-13ae34b7.entry.js.map
1
+ import{r as i,c as e,h as s,g as t}from"./p-b7a462e5.js";import{d as l,t as a}from"./p-0b7e3932.js";import{i as o}from"./p-1ecafb97.js";const r=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{font-family:var(--ifx-font-family, sans-serif)}.file-upload-wrapper{display:flex;flex-direction:column}.file-upload-wrapper.disabled{pointer-events:none}.file-upload-wrapper.disabled label,.file-upload-wrapper.disabled .file-upload-info{color:#575352}.file-upload-label{font-style:normal;font-weight:400;font-size:1rem;line-height:1.5rem;color:#1D1D1D}.file-upload-label .required{display:inline-block;margin-left:4px}.file-upload-label .required.error{color:#CD002F}.upload-dropzone{border:1px dashed #BFBBBB;padding:40px;text-align:center;cursor:pointer;color:#1D1D1D;transition:border-color 0.3s ease;border-radius:1px;background:#FFFFFF}.upload-dropzone ifx-icon{color:#0A8276}.upload-dropzone:hover{border:1px dashed #8D8786}.upload-dropzone.drag-over{border:1px solid #0A8276;background:#F7F7F7}.upload-dropzone.drag-over.error{border:1px solid #0A8276}.upload-dropzone.error{border-color:#CD002F}.disabled .upload-dropzone{pointer-events:none;border-color:#BFBBBB;color:#BFBBBB}.disabled .upload-dropzone ifx-icon{color:#BFBBBB}.upload-dropzone input{display:none}.file-upload-info{font-style:normal;font-weight:400;font-size:0.75rem;line-height:1rem;letter-spacing:0em;color:#1D1D1D;margin:0;margin-top:4px}.file-upload-status{font-style:normal;font-weight:400;font-size:0.75rem;line-height:1rem;letter-spacing:0.2px;margin-top:8px}.file-upload-status.file-upload-status__error{display:flex;align-items:center;color:#CD002F}.file-upload-status.file-upload-status__error ifx-icon{position:relative;top:-1px;color:#CD002F;margin-right:8px}.upload-heading{font:600 1.125rem/1.625rem "Source Sans 3";margin-bottom:8px}.file-list-wrapper{margin-top:16px}.file-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:16px}.file-item{border:1px solid #BFBBBB;padding-top:12px;padding-right:16px;padding-bottom:8px;padding-left:16px;display:flex;gap:8px}.file-info{width:100%;min-width:0}.file-top-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:-8px}.file-top-row ifx-icon{flex-shrink:0}.file-name-wrapper{display:flex;min-width:0;max-width:100%;white-space:nowrap;overflow:hidden;font-weight:400;font-size:0.875rem}.file-name-base{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:1;min-width:0}.file-name-ext{flex-shrink:0;margin-left:0}.file-middle-row{display:flex;align-items:center;font-size:0.75rem;line-height:1rem;flex-wrap:wrap;color:#575352}.file-middle-row .file-status{margin-left:12px}.file-middle-row .file-status ifx-icon{margin-right:8px}.file-progress-row{margin-top:4px}.file-progress-row ifx-progress-bar{width:100%}.upload-success{border-color:#0A8276}.upload-success .file-status ifx-icon{position:relative;top:1px;color:#4CA460}.upload-failed{border-color:#CD002F}.upload-failed .file-status{color:#CD002F;margin-left:0}';const n=r;const h=class{constructor(s){i(this,s);this.ifxFileUploadAdd=e(this,"ifxFileUploadAdd",7);this.ifxFileUploadRemove=e(this,"ifxFileUploadRemove",7);this.ifxFileUploadChange=e(this,"ifxFileUploadChange",7);this.ifxFileUploadError=e(this,"ifxFileUploadError",7);this.ifxFileUploadInvalid=e(this,"ifxFileUploadInvalid",7);this.ifxFileUploadStart=e(this,"ifxFileUploadStart",7);this.ifxFileUploadComplete=e(this,"ifxFileUploadComplete",7);this.ifxFileUploadAllComplete=e(this,"ifxFileUploadAllComplete",7);this.ifxFileUploadAbort=e(this,"ifxFileUploadAbort",7);this.ifxFileUploadDrop=e(this,"ifxFileUploadDrop",7);this.ifxFileUploadClick=e(this,"ifxFileUploadClick",7);this.ifxFileUploadMaxFilesExceeded=e(this,"ifxFileUploadMaxFilesExceeded",7);this.ifxFileUploadValidation=e(this,"ifxFileUploadValidation",7);this.ifxFileUploadRetry=e(this,"ifxFileUploadRetry",7);this.dragAndDrop=false;this.required=false;this.disabled=false;this.maxFileSizeMB=7;this.allowedFileTypes=["jpg","jpeg","png","pdf","mov","mp3","mp4"];this.additionalAllowedFileTypes=[];this.label="Label";this.labelRequiredError="At least one file must be uploaded";this.labelBrowseFiles="Browse files";this.labelDragAndDrop="Drag & Drop or browse files to upload";this.labelUploadedFilesHeading="Uploaded files";this.labelFileTooLarge="Upload failed. Max file size: {{size}}MB.";this.labelUnsupportedFileType="Unsupported file type.";this.labelUploaded="Successfully uploaded";this.labelUploadFailed="Upload failed. Please try again.";this.labelSupportedFormatsTemplate="Supported file formats: {{types}}. Max file size: {{size}}MB.";this.labelFileSingular="file";this.labelFilePlural="files";this.labelMaxFilesInfo="Up to {{count}} {{files}}.";this.labelMaxFilesExceeded="Upload limit exceeded. Only {{count}} {{files}} allowed.";this.ariaLabelBrowseFiles="Browse files";this.ariaLabelDropzone="Upload area. Click to browse or drag and drop files.";this.ariaLabelFileInput="Upload file";this.ariaLabelRemoveFile="Remove file";this.ariaLabelCancelUpload="Cancel upload";this.ariaLabelRetryUpload="Retry upload";this.ariaLabelUploadingStatus="Upload in progress";this.ariaLabelUploadedStatus="Upload completed";this.ariaLabelUploadFailedStatus="Upload failed";this.internalId=`ifx-file-upload-${Math.random().toString(36).substr(2,9)}`;this.isDragOver=false;this.files=[];this.uploadTasks=[];this.rejectedSizeFiles=[];this.rejectedTypeFiles=[];this.requiredError=false;this.statusMessage=null;this.fileInputEl=null;this.extensionToMimeMap={jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",gif:"image/gif",svg:"image/svg+xml",webp:"image/webp",pdf:"application/pdf",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",txt:"text/plain",csv:"text/csv",json:"application/json",mp3:"audio/mpeg",wav:"audio/wav",mp4:"video/mp4",mov:"video/quicktime",webm:"video/webm",zip:"application/zip",rar:"application/vnd.rar",tar:"application/x-tar",gz:"application/gzip",xml:"application/xml",html:"text/html",css:"text/css",js:"application/javascript"}}get maxFiles(){return this._maxFiles}set maxFiles(i){if(typeof i==="number"&&i<1){console.warn("Invalid `maxFiles` value. Must be >= 1. Value ignored.");this._maxFiles=undefined}else{this._maxFiles=i}}validateRequired(){var i,e;if(this.required&&this.files.length===0){this.requiredError=true;if(((i=this.statusMessage)===null||i===void 0?void 0:i.text)!==this.labelRequiredError){this.statusMessage={type:"error",text:this.labelRequiredError}}this.ifxFileUploadValidation.emit({valid:false})}else{this.requiredError=false;if(((e=this.statusMessage)===null||e===void 0?void 0:e.text)===this.labelRequiredError){this.statusMessage=null}this.ifxFileUploadValidation.emit({valid:true})}}pluralize(i){return i===1?this.labelFileSingular:this.labelFilePlural}getNormalizedFileTypes(){if(Array.isArray(this.allowedFileTypes)){return this.allowedFileTypes}try{return JSON.parse(this.allowedFileTypes)}catch(i){return this.allowedFileTypes.split(",").map((i=>i.trim()))}}getLabelFromMimeType(i){for(const[e,s]of Object.entries(this.extensionToMimeMap)){if(s===i){return e.toUpperCase()}}return i}handleFileChange(i){const e=i.target;if(!e.files)return;this.processFiles(e.files)}handleDrop(i){var e;if(this.disabled)return;i.preventDefault();i.stopPropagation();this.isDragOver=false;if((e=i.dataTransfer)===null||e===void 0?void 0:e.files){const e=Array.from(i.dataTransfer.files);const s=[...this.getNormalizedFileTypes().map((i=>this.extensionToMimeMap[i.toLowerCase()])).filter(Boolean),...this.getAdditionalMimeTypes()];const t=[];const l=[];e.forEach((i=>{const e=s.includes(i.type);const a=i.size<=this.maxFileSizeMB*1024*1024;if(e&&a)t.push(i);else l.push(i)}));this.ifxFileUploadDrop.emit({droppedFiles:e,acceptedFiles:t,rejectedFiles:l});this.processFiles(i.dataTransfer.files)}}handleDragOver(i){if(this.disabled)return;i.preventDefault();this.isDragOver=true}handleDragLeave(i){if(this.disabled)return;i.preventDefault();this.isDragOver=false}processFiles(i){const e=Array.from(i);const s=[...this.getNormalizedFileTypes().map((i=>this.extensionToMimeMap[i.toLowerCase()])).filter(Boolean),...this.getAdditionalMimeTypes()];const t=[];const l=[];const a=[];e.forEach((i=>{const e=s.includes(i.type);const o=i.size<=this.maxFileSizeMB*1024*1024;const r=this.files.some((e=>e.name===i.name&&e.size===i.size));if(r){this.ifxFileUploadInvalid.emit({file:i,reason:"duplicate"});this.ifxFileUploadError.emit({file:i,errorType:"duplicate",message:`File "${i.name}" is already added`,reason:"duplicate"});return}if(e&&o){t.push(i)}else{if(!e){a.push(i.name);this.ifxFileUploadInvalid.emit({file:i,reason:"invalid-type"})}if(!o){l.push(i.name);this.ifxFileUploadInvalid.emit({file:i,reason:"invalid-size"})}this.ifxFileUploadError.emit({file:i,errorType:!e?"invalid-type":"file-too-large",message:"Invalid file rejected",reason:!e?"unsupported-type":"file-too-large"})}}));this.rejectedSizeFiles=[...this.rejectedSizeFiles,...l];this.rejectedTypeFiles=[...this.rejectedTypeFiles,...a];if(this.maxFiles&&this.files.length+t.length>this.maxFiles){const i=this.maxFiles-this.files.length;const e=t.slice(0,Math.max(i,0));const s=t.slice(i);this.files=[...this.files,...e];e.forEach((i=>this.startUpload(i)));if(e.length>0){this.ifxFileUploadAdd.emit({addedFiles:e,files:this.files});this.ifxFileUploadChange.emit({files:this.files})}s.forEach((i=>{this.ifxFileUploadInvalid.emit({file:i,reason:"too-many-files"});this.ifxFileUploadError.emit({file:i,errorType:"too-many-files",message:`Upload limit exceeded. Max ${this.maxFiles} files allowed.`,reason:"too-many-files"})}));if(s.length>0){this.statusMessage={type:"error",text:this.labelMaxFilesExceeded.replace("{{count}}",this.maxFiles.toString()).replace("{{files}}",this.pluralize(this.maxFiles))};this.ifxFileUploadMaxFilesExceeded.emit({maxFiles:this.maxFiles,attempted:this.files.length+t.length})}return}t.forEach((i=>this.startUpload(i)));this.files=[...this.files,...t];if(t.length>0){this.ifxFileUploadAdd.emit({addedFiles:t,files:this.files});this.ifxFileUploadChange.emit({files:this.files})}this.validateRequired()}retryUpload(i){const e=this.uploadTasks.findIndex((e=>e.file.name===i.name));if(e!==-1){this.uploadTasks.splice(e,1);this.uploadTasks=[...this.uploadTasks]}this.ifxFileUploadRetry.emit({file:i});this.startUpload(i)}startUpload(i){this.ifxFileUploadStart.emit({file:i});const e={file:i,progress:3,intervalId:null,completed:false};this.uploadTasks=[...this.uploadTasks,e];if(this.uploadHandler){this.uploadHandler(i,(i=>{if(i>e.progress){e.progress=Math.min(100,i);this.uploadTasks=[...this.uploadTasks]}})).then((()=>{e.progress=100;e.completed=true;this.uploadTasks=[...this.uploadTasks];this.ifxFileUploadComplete.emit({file:i});this.ifxFileUploadChange.emit({files:this.files});if(this.uploadTasks.every((i=>i.completed))){this.ifxFileUploadAllComplete.emit({files:this.files})}})).catch((()=>{e.error=true;this.uploadTasks=[...this.uploadTasks];this.ifxFileUploadError.emit({file:i,errorType:"upload-failed",message:"Upload handler rejected file",reason:"custom"})}))}else{const s=i.size;const t=1e5;let l=0;e.intervalId=window.setInterval((()=>{l+=t/5;const a=Math.min(100,Math.round(l/s*100));e.progress=a;this.uploadTasks=[...this.uploadTasks];if(a>=100){clearInterval(e.intervalId);e.completed=true;e.intervalId=null;this.uploadTasks=[...this.uploadTasks];this.ifxFileUploadComplete.emit({file:i});this.ifxFileUploadChange.emit({files:this.files});if(this.uploadTasks.every((i=>i.completed))){this.ifxFileUploadAllComplete.emit({files:this.files})}}}),200)}this.uploadTasks=[...this.uploadTasks,e]}cancelUpload(i){const e=this.uploadTasks.findIndex((e=>e.file.name===i.name));if(e!==-1){const i=this.uploadTasks[e];if((i===null||i===void 0?void 0:i.intervalId)!==null){clearInterval(i.intervalId)}this.uploadTasks=this.uploadTasks.filter(((i,s)=>s!==e))}this.files=this.files.filter((e=>e.name!==i.name));this.ifxFileUploadAbort.emit({file:i});this.ifxFileUploadChange.emit({files:this.files});if(this.fileInputEl){this.fileInputEl.value=""}this.validateRequired()}removeFile(i){var e;this.uploadTasks=this.uploadTasks.filter((e=>e.file.name!==i.name));this.files=this.files.filter((e=>e.name!==i.name));this.ifxFileUploadRemove.emit({removedFile:i,files:this.files});this.ifxFileUploadChange.emit({files:this.files});this.validateRequired();if(this.fileInputEl){this.fileInputEl.value=""}if(this.maxFiles&&this.files.length<this.maxFiles&&((e=this.statusMessage)===null||e===void 0?void 0:e.text)!==this.labelRequiredError){this.statusMessage=null}}clearRejectedFile(i,e){if(e==="size"){this.rejectedSizeFiles=this.rejectedSizeFiles.filter((e=>e!==i))}else{this.rejectedTypeFiles=this.rejectedTypeFiles.filter((e=>e!==i))}if(this.fileInputEl){this.fileInputEl.value=""}if(this.maxFiles&&this.files.length<this.maxFiles){this.statusMessage=null}this.validateRequired()}splitFileNameParts(i){const e=i.name;const s=e.lastIndexOf(".");if(s===-1)return{base:e,ext:""};return{base:e.substring(0,s),ext:e.substring(s)}}getFileIcon(i){var e;const s=(e=i.name.split(".").pop())===null||e===void 0?void 0:e.toLowerCase();switch(s){case"pdf":return"file-pdf-16";case"jpg":case"jpeg":return"file-jpg-16";case"png":return"file-png-16";case"mov":return"file-mov-16";case"mp3":return"file-mp3-16";case"mp4":return"file-mp4-16";default:return"file-16"}}formatSize(i){if(i>=1024*1024*1024){return`${(i/(1024*1024*1024)).toFixed(1)} GB`}else if(i>=1024*1024){return`${(i/(1024*1024)).toFixed(1)} MB`}else if(i>=1024){return`${(i/1024).toFixed(0)} KB`}else{return`${i} B`}}getAcceptAttribute(){const i=this.getNormalizedFileTypes().map((i=>"."+i.toLowerCase()));const e=this.getAdditionalMimeTypes();return[...i,...e].join(",")}getFormattedProgressText(i){const e=Math.round(i.progress/100*i.file.size);const s=this.formatSize(e);const t=this.formatSize(i.file.size);return`${s} / ${t} uploaded`}getAdditionalMimeTypes(){if(!this.additionalAllowedFileTypes)return[];if(Array.isArray(this.additionalAllowedFileTypes))return this.additionalAllowedFileTypes;return this.additionalAllowedFileTypes.split(",").map((i=>i.trim()))}getSupportedFileText(){const i=this.getNormalizedFileTypes().map((i=>i.toUpperCase()));const e=this.getAdditionalMimeTypes().map((i=>this.getLabelFromMimeType(i)));const s=[...i,...e];const t=s.join(", ");let l=this.labelSupportedFormatsTemplate.replace("{{types}}",t).replace("{{size}}",this.maxFileSizeMB.toString());if(this.labelMaxFilesInfo&&this.maxFiles){const i=this.pluralize(this.maxFiles);const e=this.labelMaxFilesInfo.replace("{{count}}",this.maxFiles.toString()).replace("{{files}}",i);l+=` ${e}`}return l}getFormattedFileTooLargeText(){return this.labelFileTooLarge.replace("{{size}}",this.maxFileSizeMB.toString())}renderStatusMessage(){if(!this.statusMessage)return null;return s("div",{class:`file-upload-status file-upload-status__${this.statusMessage.type}`},this.statusMessage.type==="error"&&s("ifx-icon",{icon:"c-warning-16"}),this.statusMessage.text)}isInputDisabled(){return this.disabled||this.maxFiles!==undefined&&this.files.length>=this.maxFiles}componentWillLoad(){if(!o(this.hostElement)){const i=l();a("ifx-file-upload",i)}}componentDidLoad(){if(this.hostElement.hasAttribute("show-demo-states")){this.showDemoStates=true}if(this.showDemoStates){this.injectDemoState()}}async injectDemoState(){const i=new Array(5e4).fill("a").join("");const e=i+i;const s=new File([i],"Image.jpg",{type:"image/jpeg"});const t=new File([e],"File.pdf",{type:"application/pdf"});const l=new File([i],"Text.docx",{type:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"});const a=new File([e+e+e],"Video.mp4",{type:"video/mp4"});const o=new File(["demo"],"Script.exe",{type:"application/x-msdownload"});this.files=[t,s,l];this.uploadTasks=[{file:t,progress:100,intervalId:null,completed:true},{file:s,progress:40,intervalId:null,completed:false},{file:l,progress:80,intervalId:null,completed:false,error:true}];this.rejectedSizeFiles=[a.name];this.rejectedTypeFiles=[o.name]}async triggerDemoValidation(){this.validateRequired()}render(){return s("div",{key:"a9cea6fe1f122bd00ddee401138c075911332968",class:{"file-upload-wrapper":true,disabled:this.disabled}},this.label&&s("label",{key:"05c0b05bd08e2e6850ed568165416d249ce72e10",class:"file-upload-label",htmlFor:this.internalId},this.label,this.required&&s("span",{key:"3c30d8f88259072e9548054131b1963e527902a2",class:`required ${this.requiredError?"error":""}`},"*")),this.dragAndDrop?this.renderDragAndDropArea():this.renderUploadArea(),(this.files.length>0||this.rejectedSizeFiles.length>0||this.rejectedTypeFiles.length>0)&&s("div",{key:"cf05de4f4ca9bec4a2d17e4134356b4027cf93a3",class:"file-list-wrapper"},s("div",{key:"63afc1dea10b55f33b5957c8195a624d5224cc15",class:"upload-heading"},this.labelUploadedFilesHeading),s("ul",{key:"680c4247f6046899bad807cb277a7e21d7b89022",class:"file-list"},this.rejectedSizeFiles.map((i=>s("li",{class:"file-item upload-failed",key:`rejected-size-${i}`},s("div",{class:"file-icon"},s("ifx-icon",{icon:"file-16"})),s("div",{class:"file-info"},s("div",{class:"file-top-row"},s("span",{class:"file-name-wrapper"},s("span",{class:"file-name-base"},this.splitFileNameParts({name:i}).base),s("span",{class:"file-name-ext"},this.splitFileNameParts({name:i}).ext)),s("div",{class:"file-actions"},s("ifx-icon-button",{shape:"square",variant:"tertiary",icon:"delete-forever-16",size:"s","aria-label":this.ariaLabelRemoveFile,onClick:()=>this.clearRejectedFile(i,"size")}))),s("div",{class:"file-middle-row"},s("span",{class:"file-status","aria-label":this.labelFileTooLarge.replace("{{size}}",this.maxFileSizeMB.toString())},this.getFormattedFileTooLargeText())))))),this.rejectedTypeFiles.map((i=>s("li",{class:"file-item upload-failed",key:`rejected-type-${i}`},s("div",{class:"file-icon"},s("ifx-icon",{icon:"file-16"})),s("div",{class:"file-info"},s("div",{class:"file-top-row"},s("span",{class:"file-name-wrapper"},s("span",{class:"file-name-base"},this.splitFileNameParts({name:i}).base),s("span",{class:"file-name-ext"},this.splitFileNameParts({name:i}).ext)),s("div",{class:"file-actions"},s("ifx-icon-button",{shape:"square",variant:"tertiary",icon:"delete-forever-16",size:"s","aria-label":this.ariaLabelRemoveFile,onClick:()=>this.clearRejectedFile(i,"type")}))),s("div",{class:"file-middle-row"},s("span",{class:"file-status","aria-label":this.labelUnsupportedFileType},this.labelUnsupportedFileType)))))),this.files.map((i=>{var e;const t=this.uploadTasks.find((e=>e.file.name===i.name));const l=(e=t===null||t===void 0?void 0:t.progress)!==null&&e!==void 0?e:100;const a=t&&!t.completed;const o=(t===null||t===void 0?void 0:t.error)===true;const r=o?"file-item upload-failed":a?"file-item uploading":"file-item upload-success";const n=`${i.name}-${i.size}`;const{base:h,ext:d}=this.splitFileNameParts(i);return s("li",{class:r,key:n},s("div",{class:"file-icon"},s("ifx-icon",{icon:this.getFileIcon(i)})),s("div",{class:"file-info"},s("div",{class:"file-top-row"},s("span",{class:"file-name-wrapper"},s("span",{class:"file-name-base"},h),s("span",{class:"file-name-ext"},d)),s("div",{class:"file-actions"},s("ifx-icon-button",{shape:"square",variant:"tertiary",icon:"refresh-16",size:"s","aria-label":this.ariaLabelRetryUpload,onClick:()=>this.retryUpload(i),style:{display:o?"inline-flex":"none"}}),s("ifx-icon-button",{shape:"square",variant:"tertiary",icon:"cross-16",size:"s","aria-label":this.ariaLabelCancelUpload,onClick:()=>this.cancelUpload(i),style:{display:a?"inline-flex":"none"}}),s("ifx-icon-button",{shape:"square",variant:"tertiary",icon:"delete-forever-16",size:"s","aria-label":this.ariaLabelRemoveFile,onClick:()=>this.removeFile(i),style:{display:!a?"inline-flex":"none"}}))),s("div",{class:"file-middle-row"},a&&t&&!t.error&&s("span",{class:"file-uploading","aria-label":this.ariaLabelUploadingStatus},this.getFormattedProgressText(t)),!a&&!o&&s("span",null,s("span",{class:"file-size"},this.formatSize(i.size)),s("span",{class:"file-status","aria-label":this.ariaLabelUploadedStatus},s("ifx-icon",{icon:"check-16"}),this.labelUploaded)),o&&s("span",{class:"file-status","aria-label":this.ariaLabelUploadFailedStatus},this.labelUploadFailed)),a&&t&&!t.error&&s("div",{class:"file-progress-row"},s("ifx-progress-bar",{size:"s",value:l,"show-label":"true"}))))})))))}renderUploadArea(){const i=i=>{this.fileInputEl=i};return s("div",{class:{"upload-button":true}},s("ifx-button",{variant:"secondary",onClick:()=>{var i;return(i=this.fileInputEl)===null||i===void 0?void 0:i.click()},disabled:this.isInputDisabled(),"aria-label":this.ariaLabelBrowseFiles},s("ifx-icon",{icon:"upload-16"}),this.labelBrowseFiles),s("input",{id:this.internalId,ref:i,type:"file",accept:this.getAcceptAttribute(),multiple:true,onChange:i=>this.handleFileChange(i),style:{display:"none"},disabled:this.isInputDisabled(),"aria-label":this.ariaLabelFileInput}),s("p",{class:"file-upload-info"},this.getSupportedFileText()),this.renderStatusMessage())}renderDragAndDropArea(){const i=i=>{this.fileInputEl=i};const e=()=>{if(this.fileInputEl){this.fileInputEl.click()}};return s("div",{class:{disabled:this.isInputDisabled()}},s("div",{class:{"upload-dropzone":true,"drag-over":this.isDragOver,error:this.requiredError},onClick:e,onDragOver:i=>this.handleDragOver(i),onDragLeave:i=>this.handleDragLeave(i),onDrop:i=>this.handleDrop(i),role:"button",tabIndex:0,"aria-label":this.ariaLabelDropzone},s("ifx-icon",{icon:"upload-16",class:"custom-icon"}),s("p",null,this.labelDragAndDrop),s("p",{class:"file-upload-info"},this.getSupportedFileText()),s("div",{style:{height:"0px",overflow:"hidden"}},s("input",{id:this.internalId,ref:i,type:"file",accept:this.getAcceptAttribute(),multiple:true,onChange:i=>this.handleFileChange(i),disabled:this.isInputDisabled(),"aria-label":this.ariaLabelFileInput}))),this.renderStatusMessage())}get hostElement(){return t(this)}};h.style=n;export{h as ifx_file_upload};
2
+ //# sourceMappingURL=p-dff719b2.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,h as o,g as i}from"./p-b7a462e5.js";import{d as e,t as s}from"./p-e8504e6b.js";import{i as a}from"./p-1ecafb97.js";import{c as l}from"./p-e459974a.js";const d=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:inline-flex}.tooltip__container{display:inline-flex;flex-direction:column;position:relative;font-family:var(--ifx-font-family)}.tooltip-extended,.tooltip-compact,.tooltip-dismissible{background-color:#1D1D1D;border:1px solid black;z-index:1080;display:none;transition:opacity 0.3s;position:absolute;font-size:14px;font-style:normal;font-weight:400;line-height:20px;color:#FFFFFF;width:max-content;box-sizing:border-box;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;}.visible.tooltip-extended,.visible.tooltip-compact,.visible.tooltip-dismissible{display:flex !important;align-items:start}.tooltip-dismissible .close-button{all:unset;cursor:pointer;position:relative;order:2;margin-top:12px;margin-right:12px;line-height:0px}.tooltip-dismissible .tooltip-dismissible-content{display:flex;flex-direction:column;gap:12px;padding:12px;flex-grow:1;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere}.tooltip-dismissible .tooltip-dismissible-header,.tooltip-dismissible .tooltip-dismissible-body{font-size:14px;font-style:normal;line-height:20px}.tooltip-dismissible .tooltip-dismissible-header{font-weight:600}.tooltip-dismissible .tooltip-dismissible-body{font-weight:400}.tooltip-compact{padding:4px 8px;text-align:center;flex-grow:1}.tooltip-extended{align-items:center;padding:12px;gap:10px}.tooltip-extended .extended_icon{display:flex;align-self:flex-start;align-items:center;cursor:pointer}.tooltip-extended .tooltip-extended-content{display:flex;flex-direction:column;gap:12px;flex-grow:1;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere}.tooltip-extended .tooltip-extended-header,.tooltip-extended .tooltip-extended-body{font-size:14px;font-style:normal;line-height:20px}.tooltip-extended .tooltip-extended-header{font-weight:600}.tooltip-extended .tooltip-extended-body{font-weight:400}.tooltip__container .tooltip-arrow-svg{position:absolute;width:8px;height:8px}[data-placement=top].tooltip-extended>.tooltip-arrow-svg,[data-placement=top].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=top].tooltip-compact>.tooltip-arrow-svg{bottom:-7px;left:50%;transform:rotate(180deg) translateX(-50%)}[data-placement=top-start].tooltip-extended>.tooltip-arrow-svg,[data-placement=top-start].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=top-start].tooltip-compact>.tooltip-arrow-svg{bottom:-7px;left:10px;transform:rotate(180deg)}[data-placement=top-end].tooltip-extended>.tooltip-arrow-svg,[data-placement=top-end].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=top-end].tooltip-compact>.tooltip-arrow-svg{bottom:-7px;right:10px;transform:rotate(180deg)}[data-placement=bottom].tooltip-extended>.tooltip-arrow-svg,[data-placement=bottom].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=bottom].tooltip-compact>.tooltip-arrow-svg{top:-7px;left:50%;transform:translateX(-50%)}[data-placement=bottom-start].tooltip-extended>.tooltip-arrow-svg,[data-placement=bottom-start].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=bottom-start].tooltip-compact>.tooltip-arrow-svg{top:-7px;left:10px}[data-placement=bottom-end].tooltip-extended>.tooltip-arrow-svg,[data-placement=bottom-end].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=bottom-end].tooltip-compact>.tooltip-arrow-svg{top:-7px;right:10px}[data-placement=left].tooltip-extended>.tooltip-arrow-svg,[data-placement=left].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=left].tooltip-compact>.tooltip-arrow-svg{right:-3px;top:50%;transform:rotate(90deg) translateY(-50%) translateX(-50%)}[data-placement=right].tooltip-extended>.tooltip-arrow-svg,[data-placement=right].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=right].tooltip-compact>.tooltip-arrow-svg{left:-3px;top:50%;transform:rotate(270deg) translateY(-50%) translateX(50%)}.tooltip-compact{min-width:28px !important;max-width:145px !important}.tooltip-dismissible{min-width:145px !important;max-width:310px !important}.tooltip-extended{min-width:145px !important;max-width:310px !important}';const p=d;const n=class{constructor(o){t(this,o);this.tooltipVisible=false;this.header="";this.text="";this.position="auto";this.internalPosition="auto";this.variant="compact";this.popperInstance=null;this.onMouseEnter=()=>{var t,o;(t=this.popperInstance)===null||t===void 0?void 0:t.setOptions((t=>Object.assign(Object.assign({},t),{modifiers:[...t.modifiers,{name:"eventListeners",enabled:true}]})));this.initializePopper();this.tooltipVisible=true;this.tooltipEl.style.display="block";(o=this.popperInstance)===null||o===void 0?void 0:o.update()};this.onMouseLeave=()=>{this.tooltipVisible=false;this.tooltipEl.style.display="none"};this.onClick=()=>{var t;if(this.variant.toLowerCase()==="dismissible"){this.initializePopper();this.tooltipVisible=!this.tooltipVisible;this.tooltipEl.style.display=this.tooltipVisible?"block":"none";(t=this.popperInstance)===null||t===void 0?void 0:t.update()}};this.onDismissClick=()=>{this.tooltipVisible=false;this.tooltipEl.style.display="none"}}componentWillLoad(){if(!a(this.el)){const t=e();s("ifx-tooltip",t)}if(this.variant.toLowerCase().trim()===""){this.variant="compact"}}componentDidLoad(){const t=this.el.shadowRoot.querySelector(".tooltip__container").firstChild;if(this.variant.toLowerCase()==="compact"||this.variant.toLowerCase()==="extended"){t.addEventListener("mouseenter",this.onMouseEnter);t.addEventListener("mouseleave",this.onMouseLeave)}else{t.addEventListener("click",this.onClick)}}initializePopper(){if(this.popperInstance)return;this.referenceEl=this.el;if(this.variant.toLowerCase()==="compact"){this.tooltipEl=this.el.shadowRoot.querySelector(".tooltip-compact")}else if(this.variant.toLowerCase()==="dismissible"){this.tooltipEl=this.el.shadowRoot.querySelector(".tooltip-dismissible")}else{this.tooltipEl=this.el.shadowRoot.querySelector(".tooltip-extended")}const t=this.position==="auto"?this.determineBestPosition():this.position;this.internalPosition=t;if(this.tooltipEl&&this.referenceEl){this.popperInstance=l(this.referenceEl,this.tooltipEl,{placement:this.internalPosition,modifiers:[{name:"offset",options:{offset:[0,8]}},{name:"arrow",options:{element:".tooltip-arrow-svg"}}]})}this.tooltipEl.setAttribute("data-placement",t)}determineBestPosition(){const t=this.referenceEl.getBoundingClientRect();const o=window.scrollY;const i=window.scrollX;const e=t.top+o+t.height/2;const s=t.left+i+t.width/2;if(this.position==="auto"){if(e>window.innerHeight/2){if(s>window.innerWidth/2){return"top-end"}else{return"top-start"}}else{if(s>window.innerWidth/2){return"bottom-end"}else{return"bottom-start"}}}else{return this.position}}positionChanged(t){var o;this.internalPosition=t;(o=this.popperInstance)===null||o===void 0?void 0:o.destroy();this.popperInstance=null}disconnectedCallback(){var t;(t=this.popperInstance)===null||t===void 0?void 0:t.destroy()}render(){const t={"tooltip-dismissible":true,visible:this.tooltipVisible};const i={"tooltip-compact":true,visible:this.tooltipVisible};const e={"tooltip-extended":true,visible:this.tooltipVisible};return o("div",{key:"25d2c329b7784d96128dd851e75098e4cfb6da84","aria-label":"a tooltip showing important information","aria-value":this.header,class:"tooltip__container"},o("slot",{key:"a29d04ca80a0d148f415abd6b63af62f392849f3"}),this.variant.toLowerCase()==="dismissible"&&o("div",{key:"22ad260c5d46278e4f7ebdaafc3cc7876a331e4c",class:t},o("button",{key:"9ff17a1b56c1f19c3e3bb22cf6b92745c26614e2","aria-label":"Close Tooltip",class:"close-button",onClick:this.onDismissClick},o("ifx-icon",{key:"79dce9dff1b8f5f97254b55599cb653bfe587e73",icon:"cross16"})),o("div",{key:"641a69f72552427b5410276e7eff401a7903c3bf",class:"tooltip-dismissible-content"},this.header&&o("div",{key:"edb6683ee0251272d012d0034972606539d8e763",class:"tooltip-dismissible-header"},this.header),o("div",{key:"0d0301a012751009182c381dbfa2d09795115c8f",class:"tooltip-dismissible-body"},this.text)),o("svg",{key:"85a78b47d577caf95e9384f9b05c63acee200af9",class:"tooltip-arrow-svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{key:"47c8b8a64c81db908031715a0bded22195e89654",id:"Indicator",d:"M6 0L12 8L0 8L6 0Z",fill:"#1D1D1D"}))),this.variant.toLowerCase()==="compact"&&o("div",{key:"9673576e1dd4001929af8df58325ef504c8209cb",class:i},this.text,o("svg",{key:"3ac78682948105642df9779921396be8ddaef4e0",class:"tooltip-arrow-svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{key:"eabf5f7a8d69def4f94e80fbab9a2ec5deaaf36b",id:"Indicator",d:"M6 0L12 8L0 8L6 0Z",fill:"#1D1D1D"}))),this.variant.toLowerCase()==="extended"&&o("div",{key:"a5d3445fb94dcff603ccbcfea4a705da338e9df0",class:e},o("slot",{key:"eeaf6a5de965dcb7d39a9057d75fa7d1e20b0c87",name:"icon"},this.icon?o("div",{class:"extended_icon"},o("ifx-icon",{icon:this.icon})):o("svg",{class:"extended_icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},o("path",{stroke:"#fff","stroke-linecap":"round","stroke-linejoin":"round",d:"M20.5 2.5h-16a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-16a2 2 0 0 0-2-2Z"}),o("path",{stroke:"#fff",d:"M19 17H6l2.5-4 2.097 2.516.405.486.379-.506 4.118-5.49.003-.002L19 17Z"}),o("path",{fill:"#fff",d:"M10 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}))),o("div",{key:"e392cf5a0989977582f3df3bcf0d6674e55da32e",class:"tooltip-extended-content"},this.header&&o("div",{key:"8fce83d556f681a33d0087ac77c5572a2d8a2f50",class:"tooltip-extended-header"},this.header),o("div",{key:"b80466a0b9ec4c423a0025f0e99b6b576a1a8f90",class:"tooltip-extended-body"},this.text)),o("svg",{key:"995d3900d983bf75645cba86f80aa5fd80190991",class:"tooltip-arrow-svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{key:"67e30041c8e3644d229536ccd1cf4cecf5a4eefe",id:"Indicator",d:"M6 0L12 8L0 8L6 0Z",fill:"#1D1D1D"}))))}get el(){return i(this)}static get watchers(){return{position:["positionChanged"]}}};n.style=p;export{n as ifx_tooltip};
2
- //# sourceMappingURL=p-8f3c079e.entry.js.map
1
+ import{r as t,h as o,g as i}from"./p-b7a462e5.js";import{d as e,t as s}from"./p-0b7e3932.js";import{i as a}from"./p-1ecafb97.js";import{c as l}from"./p-e459974a.js";const d=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:inline-flex}.tooltip__container{display:inline-flex;flex-direction:column;position:relative;font-family:var(--ifx-font-family)}.tooltip-extended,.tooltip-compact,.tooltip-dismissible{background-color:#1D1D1D;border:1px solid black;z-index:1080;display:none;transition:opacity 0.3s;position:absolute;font-size:14px;font-style:normal;font-weight:400;line-height:20px;color:#FFFFFF;width:max-content;box-sizing:border-box;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;}.visible.tooltip-extended,.visible.tooltip-compact,.visible.tooltip-dismissible{display:flex !important;align-items:start}.tooltip-dismissible .close-button{all:unset;cursor:pointer;position:relative;order:2;margin-top:12px;margin-right:12px;line-height:0px}.tooltip-dismissible .tooltip-dismissible-content{display:flex;flex-direction:column;gap:12px;padding:12px;flex-grow:1;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere}.tooltip-dismissible .tooltip-dismissible-header,.tooltip-dismissible .tooltip-dismissible-body{font-size:14px;font-style:normal;line-height:20px}.tooltip-dismissible .tooltip-dismissible-header{font-weight:600}.tooltip-dismissible .tooltip-dismissible-body{font-weight:400}.tooltip-compact{padding:4px 8px;text-align:center;flex-grow:1}.tooltip-extended{align-items:center;padding:12px;gap:10px}.tooltip-extended .extended_icon{display:flex;align-self:flex-start;align-items:center;cursor:pointer}.tooltip-extended .tooltip-extended-content{display:flex;flex-direction:column;gap:12px;flex-grow:1;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere}.tooltip-extended .tooltip-extended-header,.tooltip-extended .tooltip-extended-body{font-size:14px;font-style:normal;line-height:20px}.tooltip-extended .tooltip-extended-header{font-weight:600}.tooltip-extended .tooltip-extended-body{font-weight:400}.tooltip__container .tooltip-arrow-svg{position:absolute;width:8px;height:8px}[data-placement=top].tooltip-extended>.tooltip-arrow-svg,[data-placement=top].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=top].tooltip-compact>.tooltip-arrow-svg{bottom:-7px;left:50%;transform:rotate(180deg) translateX(-50%)}[data-placement=top-start].tooltip-extended>.tooltip-arrow-svg,[data-placement=top-start].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=top-start].tooltip-compact>.tooltip-arrow-svg{bottom:-7px;left:10px;transform:rotate(180deg)}[data-placement=top-end].tooltip-extended>.tooltip-arrow-svg,[data-placement=top-end].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=top-end].tooltip-compact>.tooltip-arrow-svg{bottom:-7px;right:10px;transform:rotate(180deg)}[data-placement=bottom].tooltip-extended>.tooltip-arrow-svg,[data-placement=bottom].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=bottom].tooltip-compact>.tooltip-arrow-svg{top:-7px;left:50%;transform:translateX(-50%)}[data-placement=bottom-start].tooltip-extended>.tooltip-arrow-svg,[data-placement=bottom-start].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=bottom-start].tooltip-compact>.tooltip-arrow-svg{top:-7px;left:10px}[data-placement=bottom-end].tooltip-extended>.tooltip-arrow-svg,[data-placement=bottom-end].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=bottom-end].tooltip-compact>.tooltip-arrow-svg{top:-7px;right:10px}[data-placement=left].tooltip-extended>.tooltip-arrow-svg,[data-placement=left].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=left].tooltip-compact>.tooltip-arrow-svg{right:-3px;top:50%;transform:rotate(90deg) translateY(-50%) translateX(-50%)}[data-placement=right].tooltip-extended>.tooltip-arrow-svg,[data-placement=right].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=right].tooltip-compact>.tooltip-arrow-svg{left:-3px;top:50%;transform:rotate(270deg) translateY(-50%) translateX(50%)}.tooltip-compact{min-width:28px !important;max-width:145px !important}.tooltip-dismissible{min-width:145px !important;max-width:310px !important}.tooltip-extended{min-width:145px !important;max-width:310px !important}';const p=d;const n=class{constructor(o){t(this,o);this.tooltipVisible=false;this.header="";this.text="";this.position="auto";this.internalPosition="auto";this.variant="compact";this.popperInstance=null;this.onMouseEnter=()=>{var t,o;(t=this.popperInstance)===null||t===void 0?void 0:t.setOptions((t=>Object.assign(Object.assign({},t),{modifiers:[...t.modifiers,{name:"eventListeners",enabled:true}]})));this.initializePopper();this.tooltipVisible=true;this.tooltipEl.style.display="block";(o=this.popperInstance)===null||o===void 0?void 0:o.update()};this.onMouseLeave=()=>{this.tooltipVisible=false;this.tooltipEl.style.display="none"};this.onClick=()=>{var t;if(this.variant.toLowerCase()==="dismissible"){this.initializePopper();this.tooltipVisible=!this.tooltipVisible;this.tooltipEl.style.display=this.tooltipVisible?"block":"none";(t=this.popperInstance)===null||t===void 0?void 0:t.update()}};this.onDismissClick=()=>{this.tooltipVisible=false;this.tooltipEl.style.display="none"}}componentWillLoad(){if(!a(this.el)){const t=e();s("ifx-tooltip",t)}if(this.variant.toLowerCase().trim()===""){this.variant="compact"}}componentDidLoad(){const t=this.el.shadowRoot.querySelector(".tooltip__container").firstChild;if(this.variant.toLowerCase()==="compact"||this.variant.toLowerCase()==="extended"){t.addEventListener("mouseenter",this.onMouseEnter);t.addEventListener("mouseleave",this.onMouseLeave)}else{t.addEventListener("click",this.onClick)}}initializePopper(){if(this.popperInstance)return;this.referenceEl=this.el;if(this.variant.toLowerCase()==="compact"){this.tooltipEl=this.el.shadowRoot.querySelector(".tooltip-compact")}else if(this.variant.toLowerCase()==="dismissible"){this.tooltipEl=this.el.shadowRoot.querySelector(".tooltip-dismissible")}else{this.tooltipEl=this.el.shadowRoot.querySelector(".tooltip-extended")}const t=this.position==="auto"?this.determineBestPosition():this.position;this.internalPosition=t;if(this.tooltipEl&&this.referenceEl){this.popperInstance=l(this.referenceEl,this.tooltipEl,{placement:this.internalPosition,modifiers:[{name:"offset",options:{offset:[0,8]}},{name:"arrow",options:{element:".tooltip-arrow-svg"}}]})}this.tooltipEl.setAttribute("data-placement",t)}determineBestPosition(){const t=this.referenceEl.getBoundingClientRect();const o=window.scrollY;const i=window.scrollX;const e=t.top+o+t.height/2;const s=t.left+i+t.width/2;if(this.position==="auto"){if(e>window.innerHeight/2){if(s>window.innerWidth/2){return"top-end"}else{return"top-start"}}else{if(s>window.innerWidth/2){return"bottom-end"}else{return"bottom-start"}}}else{return this.position}}positionChanged(t){var o;this.internalPosition=t;(o=this.popperInstance)===null||o===void 0?void 0:o.destroy();this.popperInstance=null}disconnectedCallback(){var t;(t=this.popperInstance)===null||t===void 0?void 0:t.destroy()}render(){const t={"tooltip-dismissible":true,visible:this.tooltipVisible};const i={"tooltip-compact":true,visible:this.tooltipVisible};const e={"tooltip-extended":true,visible:this.tooltipVisible};return o("div",{key:"25d2c329b7784d96128dd851e75098e4cfb6da84","aria-label":"a tooltip showing important information","aria-value":this.header,class:"tooltip__container"},o("slot",{key:"a29d04ca80a0d148f415abd6b63af62f392849f3"}),this.variant.toLowerCase()==="dismissible"&&o("div",{key:"22ad260c5d46278e4f7ebdaafc3cc7876a331e4c",class:t},o("button",{key:"9ff17a1b56c1f19c3e3bb22cf6b92745c26614e2","aria-label":"Close Tooltip",class:"close-button",onClick:this.onDismissClick},o("ifx-icon",{key:"79dce9dff1b8f5f97254b55599cb653bfe587e73",icon:"cross16"})),o("div",{key:"641a69f72552427b5410276e7eff401a7903c3bf",class:"tooltip-dismissible-content"},this.header&&o("div",{key:"edb6683ee0251272d012d0034972606539d8e763",class:"tooltip-dismissible-header"},this.header),o("div",{key:"0d0301a012751009182c381dbfa2d09795115c8f",class:"tooltip-dismissible-body"},this.text)),o("svg",{key:"85a78b47d577caf95e9384f9b05c63acee200af9",class:"tooltip-arrow-svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{key:"47c8b8a64c81db908031715a0bded22195e89654",id:"Indicator",d:"M6 0L12 8L0 8L6 0Z",fill:"#1D1D1D"}))),this.variant.toLowerCase()==="compact"&&o("div",{key:"9673576e1dd4001929af8df58325ef504c8209cb",class:i},this.text,o("svg",{key:"3ac78682948105642df9779921396be8ddaef4e0",class:"tooltip-arrow-svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{key:"eabf5f7a8d69def4f94e80fbab9a2ec5deaaf36b",id:"Indicator",d:"M6 0L12 8L0 8L6 0Z",fill:"#1D1D1D"}))),this.variant.toLowerCase()==="extended"&&o("div",{key:"a5d3445fb94dcff603ccbcfea4a705da338e9df0",class:e},o("slot",{key:"eeaf6a5de965dcb7d39a9057d75fa7d1e20b0c87",name:"icon"},this.icon?o("div",{class:"extended_icon"},o("ifx-icon",{icon:this.icon})):o("svg",{class:"extended_icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},o("path",{stroke:"#fff","stroke-linecap":"round","stroke-linejoin":"round",d:"M20.5 2.5h-16a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-16a2 2 0 0 0-2-2Z"}),o("path",{stroke:"#fff",d:"M19 17H6l2.5-4 2.097 2.516.405.486.379-.506 4.118-5.49.003-.002L19 17Z"}),o("path",{fill:"#fff",d:"M10 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}))),o("div",{key:"e392cf5a0989977582f3df3bcf0d6674e55da32e",class:"tooltip-extended-content"},this.header&&o("div",{key:"8fce83d556f681a33d0087ac77c5572a2d8a2f50",class:"tooltip-extended-header"},this.header),o("div",{key:"b80466a0b9ec4c423a0025f0e99b6b576a1a8f90",class:"tooltip-extended-body"},this.text)),o("svg",{key:"995d3900d983bf75645cba86f80aa5fd80190991",class:"tooltip-arrow-svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{key:"67e30041c8e3644d229536ccd1cf4cecf5a4eefe",id:"Indicator",d:"M6 0L12 8L0 8L6 0Z",fill:"#1D1D1D"}))))}get el(){return i(this)}static get watchers(){return{position:["positionChanged"]}}};n.style=p;export{n as ifx_tooltip};
2
+ //# sourceMappingURL=p-f7092bc1.entry.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infineon/infineon-design-system-stencil",
3
- "version": "37.3.1--canary.1960.d4dcc36e9d41a4a210e129ff6a7e0f326da46908.0",
3
+ "version": "37.3.1--canary.1962.83919e8cc535190b1a71ae559b5f4da23b212d86.0",
4
4
  "private": false,
5
5
  "description": "Infineon design system Stencil web components",
6
6
  "homepage": "https://infineon.github.io/infineon-design-system-stencil",
@@ -1,93 +0,0 @@
1
- 'use strict';
2
-
3
- function initializeTracking() {
4
- (function (t, r, _kk, n, pp) {
5
- if (typeof window.btntConfig !== "object") {
6
- window.btntConfig = {
7
- domain: "https://ssgtm.infineon.com",
8
- withCookies: true,
9
- maxBatchSize: 10
10
- };
11
- }
12
- if (window["btnt"])
13
- return;
14
- window["btnt"] = function (z) {
15
- if (typeof z !== "object") {
16
- z = {};
17
- }
18
- if (typeof window.btntQueue !== "object") {
19
- window.btntQueue = [];
20
- }
21
- window.btntQueue.push(z);
22
- };
23
- n = t.createElement(r);
24
- pp = t.getElementsByTagName(r)[0];
25
- n.async = 1;
26
- n.src = window.btntConfig.domain + "/btnt.js";
27
- pp.parentNode.insertBefore(n, pp);
28
- })(document, "script");
29
- }
30
- function trackComponent(componentName, environment) {
31
- if (!window.btnt)
32
- initializeTracking();
33
- window.btnt({
34
- event_name: "component_initialized",
35
- component_name: componentName,
36
- environment: environment
37
- });
38
- }
39
-
40
- let frameworkCache = null;
41
- const detectFramework = () => {
42
- if (frameworkCache)
43
- return frameworkCache;
44
- const win = window;
45
- const doc = document;
46
- // Check for React
47
- if (win.React) {
48
- frameworkCache = 'React';
49
- return frameworkCache;
50
- }
51
- // Check for React 16+ roots
52
- const reactRoots = doc.querySelector('[data-reactroot], [data-reactid]');
53
- if (reactRoots) {
54
- frameworkCache = 'React';
55
- return frameworkCache;
56
- }
57
- // Check for React 18+ root containers
58
- const rootContainers = Array.from(doc.querySelectorAll('body > div'));
59
- const hasReactRoot = rootContainers.some(container => {
60
- const keys = Object.keys(container);
61
- return keys.some(key => key.startsWith('__reactContainer'));
62
- });
63
- if (hasReactRoot) {
64
- frameworkCache = 'React';
65
- return frameworkCache;
66
- }
67
- // Check for Angular
68
- if (win.ng || win.getAllAngularRootElements) {
69
- frameworkCache = 'Angular';
70
- return frameworkCache;
71
- }
72
- if (doc.querySelector('[ng-version], [ng-app]')) {
73
- frameworkCache = 'Angular';
74
- return frameworkCache;
75
- }
76
- // Check for Vue
77
- if (win.Vue || win.__VUE__) {
78
- frameworkCache = 'Vue';
79
- return frameworkCache;
80
- }
81
- if (doc.querySelector('[data-v-app]')) {
82
- frameworkCache = 'Vue';
83
- return frameworkCache;
84
- }
85
- // Default to Vanilla
86
- frameworkCache = 'Vanilla';
87
- return frameworkCache;
88
- };
89
-
90
- exports.detectFramework = detectFramework;
91
- exports.trackComponent = trackComponent;
92
-
93
- //# sourceMappingURL=framework-detection-78986016.js.map
@@ -1 +0,0 @@
1
- {"file":"framework-detection-78986016.js","mappings":";;AAQA,SAAS,kBAAkB;IACvB,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE;QACzB,IAAI,OAAO,MAAM,CAAC,UAAU,KAAK,QAAQ,EAAE;YACzC,MAAM,CAAC,UAAU,GAAG;gBACpB,MAAM,EAAE,4BAA4B;gBACpC,WAAW,EAAE,IAAI;gBACjB,YAAY,EAAE,EAAE;aACf,CAAC;SACH;QAED,IAAI,MAAM,CAAC,MAAM,CAAC;YAAE,OAAO;QAE3B,MAAM,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC;YAC1B,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE;gBACzB,CAAC,GAAG,EAAE,CAAC;aACR;YACD,IAAI,OAAO,MAAM,CAAC,SAAS,KAAK,QAAQ,EAAE;gBACxC,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC;aACvB;YACD,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAC1B,CAAC;QAEF,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACvB,EAAE,GAAG,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAClC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC;QACZ,CAAC,CAAC,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,GAAG,UAAU,CAAC;QAC9C,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;KAEnC,EAAE,QAAQ,EAAE,QAAQ,CAAG,CAAC;AAC3B,CAAC;SAEe,cAAc,CAAC,aAAqB,EAAE,WAAmB;IACzE,IAAI,CAAC,MAAM,CAAC,IAAI;QAAE,kBAAkB,EAAE,CAAC;IAEvC,MAAM,CAAC,IAAI,CAAC;QACV,UAAU,EAAE,uBAAuB;QACnC,cAAc,EAAE,aAAa;QAC7B,WAAW,EAAE,WAAW;KACzB,CAAC,CAAC;AACJ;;AC/CD,IAAI,cAAc,GAAkB,IAAI,CAAC;MAE5B,eAAe,GAAG;IAC7B,IAAI,cAAc;QAAE,OAAO,cAAc,CAAC;IAE1C,MAAM,GAAG,GAAG,MAAa,CAAC;IAC1B,MAAM,GAAG,GAAG,QAAQ,CAAC;;IAGrB,IAAI,GAAG,CAAC,KAAK,EAAE;QACb,cAAc,GAAG,OAAO,CAAC;QACzB,OAAO,cAAc,CAAC;KACvB;;IAGD,MAAM,UAAU,GAAG,GAAG,CAAC,aAAa,CAAC,kCAAkC,CAAC,CAAC;IACzE,IAAI,UAAU,EAAE;QACd,cAAc,GAAG,OAAO,CAAC;QACzB,OAAO,cAAc,CAAC;KACvB;;IAGD,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAAC;IACtE,MAAM,YAAY,GAAG,cAAc,CAAC,IAAI,CAAC,SAAS;QAChD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACpC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC,CAAC;KAC7D,CAAC,CAAC;IAEH,IAAI,YAAY,EAAE;QAChB,cAAc,GAAG,OAAO,CAAC;QACzB,OAAO,cAAc,CAAC;KACvB;;IAGD,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,yBAAyB,EAAE;QAC3C,cAAc,GAAG,SAAS,CAAC;QAC3B,OAAO,cAAc,CAAC;KACvB;IAED,IAAI,GAAG,CAAC,aAAa,CAAC,wBAAwB,CAAC,EAAE;QAC/C,cAAc,GAAG,SAAS,CAAC;QAC3B,OAAO,cAAc,CAAC;KACvB;;IAGD,IAAI,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,EAAE;QAC1B,cAAc,GAAG,KAAK,CAAC;QACvB,OAAO,cAAc,CAAC;KACvB;IAED,IAAI,GAAG,CAAC,aAAa,CAAC,cAAc,CAAC,EAAE;QACrC,cAAc,GAAG,KAAK,CAAC;QACvB,OAAO,cAAc,CAAC;KACvB;;IAGD,cAAc,GAAG,SAAS,CAAC;IAC3B,OAAO,cAAc,CAAC;AACxB;;;;;","names":[],"sources":["src/global/utils/tracking.ts","src/global/utils/framework-detection.ts"],"sourcesContent":["declare global {\n interface Window {\n btntConfig?: any;\n btntQueue?: any[];\n btnt?: (data: object) => void; \n }\n}\n\nfunction initializeTracking() { \n (function (t, r, _kk, n, pp) {\n if (typeof window.btntConfig !== \"object\") {\n window.btntConfig = {\n domain: \"https://ssgtm.infineon.com\",\n withCookies: true,\n maxBatchSize: 10\n };\n }\n\n if (window[\"btnt\"]) return;\n\n window[\"btnt\"] = function (z) {\n if (typeof z !== \"object\") {\n z = {};\n }\n if (typeof window.btntQueue !== \"object\") {\n window.btntQueue = [];\n }\n window.btntQueue.push(z);\n };\n\n n = t.createElement(r);\n pp = t.getElementsByTagName(r)[0];\n n.async = 1;\n n.src = window.btntConfig.domain + \"/btnt.js\";\n pp.parentNode.insertBefore(n, pp);\n \n })(document, \"script\", );\n }\n\n export function trackComponent(componentName: string, environment: string) {\n if (!window.btnt) initializeTracking();\n \n window.btnt({\n event_name: \"component_initialized\",\n component_name: componentName,\n environment: environment\n });\n } \n\n export default trackComponent","let frameworkCache: string | null = null;\n\nexport const detectFramework = (): string => {\n if (frameworkCache) return frameworkCache;\n \n const win = window as any;\n const doc = document;\n\n // Check for React\n if (win.React) {\n frameworkCache = 'React';\n return frameworkCache;\n }\n \n // Check for React 16+ roots\n const reactRoots = doc.querySelector('[data-reactroot], [data-reactid]');\n if (reactRoots) {\n frameworkCache = 'React';\n return frameworkCache;\n }\n \n // Check for React 18+ root containers\n const rootContainers = Array.from(doc.querySelectorAll('body > div'));\n const hasReactRoot = rootContainers.some(container => {\n const keys = Object.keys(container);\n return keys.some(key => key.startsWith('__reactContainer'));\n });\n \n if (hasReactRoot) {\n frameworkCache = 'React';\n return frameworkCache;\n }\n\n // Check for Angular\n if (win.ng || win.getAllAngularRootElements) {\n frameworkCache = 'Angular';\n return frameworkCache;\n }\n \n if (doc.querySelector('[ng-version], [ng-app]')) {\n frameworkCache = 'Angular';\n return frameworkCache;\n }\n \n // Check for Vue\n if (win.Vue || win.__VUE__) {\n frameworkCache = 'Vue';\n return frameworkCache;\n }\n \n if (doc.querySelector('[data-v-app]')) {\n frameworkCache = 'Vue';\n return frameworkCache;\n }\n\n // Default to Vanilla\n frameworkCache = 'Vanilla';\n return frameworkCache;\n};"],"version":3}