@infineon/infineon-design-system-stencil 37.14.1--canary.1992.3e71b7856771af2263a4087bfd658e85cd1c7c03.0 → 37.14.1--canary.2005.0b8acf50350a42e6e5d4cdfbd4812c690c1c2ced.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 (329) hide show
  1. package/dist/cjs/ifx-alert_2.cjs.entry.js +1 -1
  2. package/dist/cjs/ifx-basic-table.cjs.entry.js +1 -1
  3. package/dist/cjs/ifx-checkbox.cjs.entry.js +6 -17
  4. package/dist/cjs/ifx-checkbox.cjs.entry.js.map +1 -1
  5. package/dist/cjs/ifx-checkbox.entry.cjs.js.map +1 -1
  6. package/dist/cjs/ifx-chip_3.cjs.entry.js +1 -1
  7. package/dist/cjs/ifx-date-picker.cjs.entry.js +7 -7
  8. package/dist/cjs/ifx-date-picker.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ifx-date-picker.entry.cjs.js.map +1 -1
  10. package/dist/cjs/ifx-faq.cjs.entry.js +1 -1
  11. package/dist/cjs/ifx-filter-accordion.cjs.entry.js +2 -2
  12. package/dist/cjs/ifx-filter-bar.cjs.entry.js +1 -1
  13. package/dist/cjs/ifx-filter-search.cjs.entry.js +1 -1
  14. package/dist/cjs/ifx-filter-type-group.cjs.entry.js +1 -1
  15. package/dist/cjs/ifx-list-entry.cjs.entry.js +1 -1
  16. package/dist/cjs/ifx-multiselect.ifx-multiselect-option.entry.cjs.js.map +1 -1
  17. package/dist/cjs/ifx-multiselect_2.cjs.entry.js +5 -5
  18. package/dist/cjs/ifx-multiselect_2.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ifx-overview-table.cjs.entry.js +1 -1
  20. package/dist/cjs/ifx-overview-table.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ifx-overview-table.entry.cjs.js.map +1 -1
  22. package/dist/cjs/ifx-progress-bar.cjs.entry.js +1 -1
  23. package/dist/cjs/ifx-radio-button-group.cjs.entry.js +1 -1
  24. package/dist/cjs/ifx-radio-button.cjs.entry.js +5 -15
  25. package/dist/cjs/ifx-radio-button.cjs.entry.js.map +1 -1
  26. package/dist/cjs/ifx-radio-button.entry.cjs.js.map +1 -1
  27. package/dist/cjs/ifx-search-bar.cjs.entry.js +1 -1
  28. package/dist/cjs/ifx-search-field.cjs.entry.js +2 -2
  29. package/dist/cjs/ifx-segment.cjs.entry.js +1 -1
  30. package/dist/cjs/ifx-segmented-control.cjs.entry.js +2 -2
  31. package/dist/cjs/ifx-select.cjs.entry.js +3 -3
  32. package/dist/cjs/ifx-select.cjs.entry.js.map +1 -1
  33. package/dist/cjs/ifx-select.entry.cjs.js.map +1 -1
  34. package/dist/cjs/ifx-slider.cjs.entry.js +2 -2
  35. package/dist/cjs/ifx-spinner.ifx-text-field.entry.cjs.js.map +1 -1
  36. package/dist/cjs/ifx-spinner_2.cjs.entry.js +11 -11
  37. package/dist/cjs/ifx-spinner_2.cjs.entry.js.map +1 -1
  38. package/dist/cjs/ifx-status.cjs.entry.js +1 -1
  39. package/dist/cjs/ifx-step.cjs.entry.js +4 -4
  40. package/dist/cjs/ifx-stepper.cjs.entry.js +2 -2
  41. package/dist/cjs/ifx-switch.cjs.entry.js +4 -15
  42. package/dist/cjs/ifx-switch.cjs.entry.js.map +1 -1
  43. package/dist/cjs/ifx-switch.entry.cjs.js.map +1 -1
  44. package/dist/cjs/ifx-tab.cjs.entry.js +1 -1
  45. package/dist/cjs/ifx-table.cjs.entry.js +2 -2
  46. package/dist/cjs/ifx-tabs.cjs.entry.js +2 -2
  47. package/dist/cjs/ifx-tag.cjs.entry.js +1 -1
  48. package/dist/cjs/ifx-templates-ui.cjs.entry.js +1 -1
  49. package/dist/cjs/ifx-textarea.cjs.entry.js +9 -9
  50. package/dist/cjs/ifx-textarea.cjs.entry.js.map +1 -1
  51. package/dist/cjs/ifx-textarea.entry.cjs.js.map +1 -1
  52. package/dist/cjs/ifx-tooltip.cjs.entry.js +4 -4
  53. package/dist/cjs/ifx-tree-view-item.cjs.entry.js +2 -2
  54. package/dist/cjs/ifx-tree-view.cjs.entry.js +1 -1
  55. package/dist/collection/components/checkbox/checkbox.js +9 -9
  56. package/dist/collection/components/checkbox/checkbox.js.map +1 -1
  57. package/dist/collection/components/date-picker/date-picker.js +7 -7
  58. package/dist/collection/components/date-picker/date-picker.js.map +1 -1
  59. package/dist/collection/components/overview-table/overview-table.js +1 -1
  60. package/dist/collection/components/overview-table/overview-table.js.map +1 -1
  61. package/dist/collection/components/pagination/pagination.js +1 -1
  62. package/dist/collection/components/progress-bar/progress-bar.js +1 -1
  63. package/dist/collection/components/radio-button/radio-button.js +6 -7
  64. package/dist/collection/components/radio-button/radio-button.js.map +1 -1
  65. package/dist/collection/components/radio-button-group/radio-button-group.js +1 -1
  66. package/dist/collection/components/search-bar/search-bar.js +1 -1
  67. package/dist/collection/components/search-field/search-field.js +2 -2
  68. package/dist/collection/components/segmented-control/segment/segment.js +1 -1
  69. package/dist/collection/components/segmented-control/segmented-control.js +2 -2
  70. package/dist/collection/components/select/multi-select/multiselect-option.js +4 -4
  71. package/dist/collection/components/select/multi-select/multiselect.js +1 -1
  72. package/dist/collection/components/select/multi-select/multiselect.js.map +1 -1
  73. package/dist/collection/components/select/single-select/select.css +17 -9
  74. package/dist/collection/components/select/single-select/select.js +2 -2
  75. package/dist/collection/components/slider/slider.js +2 -2
  76. package/dist/collection/components/spinner/spinner.js +2 -2
  77. package/dist/collection/components/status/status.js +1 -1
  78. package/dist/collection/components/stepper/step/step.js +4 -4
  79. package/dist/collection/components/stepper/stepper.js +2 -2
  80. package/dist/collection/components/switch/switch.js +7 -7
  81. package/dist/collection/components/switch/switch.js.map +1 -1
  82. package/dist/collection/components/table-advanced-version/filter-bar/filter-bar.js +1 -1
  83. package/dist/collection/components/table-advanced-version/filter-type-group/filter-accordion/filter-accordion.js +2 -2
  84. package/dist/collection/components/table-advanced-version/filter-type-group/filter-search/filter-search.js +1 -1
  85. package/dist/collection/components/table-advanced-version/filter-type-group/filter-type-group.js +1 -1
  86. package/dist/collection/components/table-advanced-version/list/list-entry/list-entry.js +1 -1
  87. package/dist/collection/components/table-advanced-version/table.js +2 -2
  88. package/dist/collection/components/table-basic-version/table.js +1 -1
  89. package/dist/collection/components/tabs/tab.js +1 -1
  90. package/dist/collection/components/tabs/tabs.js +2 -2
  91. package/dist/collection/components/tag/tag.js +1 -1
  92. package/dist/collection/components/templates/template/template.js +1 -1
  93. package/dist/collection/components/templates/templates-ui/templates-ui.js +1 -1
  94. package/dist/collection/components/text-field/text-field.js +9 -9
  95. package/dist/collection/components/text-field/text-field.js.map +1 -1
  96. package/dist/collection/components/textarea/textarea.js +9 -9
  97. package/dist/collection/components/textarea/textarea.js.map +1 -1
  98. package/dist/collection/components/tooltip/tooltip.js +4 -4
  99. package/dist/collection/components/tree-view/tree-view-item.js +2 -2
  100. package/dist/collection/components/tree-view/tree-view.js +1 -1
  101. package/dist/collection/stories/setup-and-installation/faq/faq.js +1 -1
  102. package/dist/collection/test-setup.js +2 -2
  103. package/dist/collection/test-setup.js.map +1 -1
  104. package/dist/components/ifx-basic-table.js +1 -1
  105. package/dist/components/ifx-checkbox.js +1 -1
  106. package/dist/components/ifx-chip-item.js +1 -1
  107. package/dist/components/ifx-date-picker.js +7 -7
  108. package/dist/components/ifx-date-picker.js.map +1 -1
  109. package/dist/components/ifx-faq.js +1 -1
  110. package/dist/components/ifx-file-upload.js +1 -1
  111. package/dist/components/ifx-filter-accordion.js +2 -2
  112. package/dist/components/ifx-filter-bar.js +1 -1
  113. package/dist/components/ifx-filter-search.js +2 -2
  114. package/dist/components/ifx-filter-type-group.js +1 -1
  115. package/dist/components/ifx-icons-preview.js +1 -1
  116. package/dist/components/ifx-list-entry.js +3 -3
  117. package/dist/components/ifx-multiselect-option.js +1 -1
  118. package/dist/components/ifx-multiselect.js +1 -1
  119. package/dist/components/ifx-overview-table.js +1 -1
  120. package/dist/components/ifx-overview-table.js.map +1 -1
  121. package/dist/components/ifx-pagination.js +1 -1
  122. package/dist/components/ifx-progress-bar.js +1 -1
  123. package/dist/components/ifx-radio-button-group.js +1 -1
  124. package/dist/components/ifx-radio-button.js +1 -1
  125. package/dist/components/ifx-search-bar.js +2 -2
  126. package/dist/components/ifx-search-field.js +1 -1
  127. package/dist/components/ifx-segment.js +1 -1
  128. package/dist/components/ifx-segmented-control.js +2 -2
  129. package/dist/components/ifx-select.js +1 -1
  130. package/dist/components/ifx-set-filter.js +6 -6
  131. package/dist/components/ifx-slider.js +2 -2
  132. package/dist/components/ifx-spinner.js +1 -1
  133. package/dist/components/ifx-status.js +1 -1
  134. package/dist/components/ifx-step.js +4 -4
  135. package/dist/components/ifx-stepper.js +2 -2
  136. package/dist/components/ifx-switch.js +4 -15
  137. package/dist/components/ifx-switch.js.map +1 -1
  138. package/dist/components/ifx-tab.js +1 -1
  139. package/dist/components/ifx-table.js +6 -6
  140. package/dist/components/ifx-tabs.js +2 -2
  141. package/dist/components/ifx-tag.js +1 -1
  142. package/dist/components/ifx-template.js +1 -1
  143. package/dist/components/ifx-templates-ui.js +4 -4
  144. package/dist/components/ifx-text-field.js +1 -1
  145. package/dist/components/ifx-textarea.js +9 -9
  146. package/dist/components/ifx-textarea.js.map +1 -1
  147. package/dist/components/ifx-tooltip.js +4 -4
  148. package/dist/components/ifx-tree-view-item.js +3 -3
  149. package/dist/components/ifx-tree-view.js +1 -1
  150. package/dist/components/{p-C7jhiUEX.js → p-AfeIKrPd.js} +4 -4
  151. package/dist/components/{p-C7jhiUEX.js.map → p-AfeIKrPd.js.map} +1 -1
  152. package/dist/components/{p-H7UrXx90.js → p-B1lfea8R.js} +7 -7
  153. package/dist/components/{p-H7UrXx90.js.map → p-B1lfea8R.js.map} +1 -1
  154. package/dist/components/{p-CSpaQFX2.js → p-BK6jtaez.js} +4 -4
  155. package/dist/components/{p-CSpaQFX2.js.map → p-BK6jtaez.js.map} +1 -1
  156. package/dist/components/{p-DL0DaOdR.js → p-BdxNbvkX.js} +8 -19
  157. package/dist/components/p-BdxNbvkX.js.map +1 -0
  158. package/dist/components/{p-D4E8VwPm.js → p-COBB2gby.js} +3 -3
  159. package/dist/components/{p-D4E8VwPm.js.map → p-COBB2gby.js.map} +1 -1
  160. package/dist/components/{p-CW1EYr_B.js → p-D0FTDBJi.js} +7 -17
  161. package/dist/components/p-D0FTDBJi.js.map +1 -0
  162. package/dist/components/{p-Coa3oQEK.js → p-DBHwLTn9.js} +5 -5
  163. package/dist/components/{p-Coa3oQEK.js.map → p-DBHwLTn9.js.map} +1 -1
  164. package/dist/components/{p-BRAYMYpA.js → p-DVfM92xI.js} +5 -5
  165. package/dist/components/{p-BRAYMYpA.js.map → p-DVfM92xI.js.map} +1 -1
  166. package/dist/components/{p-CFMrihYb.js → p-Dt9X9aqI.js} +4 -4
  167. package/dist/components/{p-CFMrihYb.js.map → p-Dt9X9aqI.js.map} +1 -1
  168. package/dist/components/{p-Bsg4XNJ8.js → p-dFnoI9Z9.js} +3 -3
  169. package/dist/components/{p-Bsg4XNJ8.js.map → p-dFnoI9Z9.js.map} +1 -1
  170. package/dist/components/{p-B_2EeLyJ.js → p-jpHS2EcW.js} +11 -11
  171. package/dist/components/p-jpHS2EcW.js.map +1 -0
  172. package/dist/components/{p-BZbKc4N2.js → p-wf80ST1n.js} +5 -5
  173. package/dist/components/p-wf80ST1n.js.map +1 -0
  174. package/dist/esm/ifx-alert_2.entry.js +1 -1
  175. package/dist/esm/ifx-basic-table.entry.js +1 -1
  176. package/dist/esm/ifx-checkbox.entry.js +6 -17
  177. package/dist/esm/ifx-checkbox.entry.js.map +1 -1
  178. package/dist/esm/ifx-chip_3.entry.js +1 -1
  179. package/dist/esm/ifx-date-picker.entry.js +7 -7
  180. package/dist/esm/ifx-date-picker.entry.js.map +1 -1
  181. package/dist/esm/ifx-faq.entry.js +1 -1
  182. package/dist/esm/ifx-filter-accordion.entry.js +2 -2
  183. package/dist/esm/ifx-filter-bar.entry.js +1 -1
  184. package/dist/esm/ifx-filter-search.entry.js +1 -1
  185. package/dist/esm/ifx-filter-type-group.entry.js +1 -1
  186. package/dist/esm/ifx-list-entry.entry.js +1 -1
  187. package/dist/esm/ifx-multiselect.ifx-multiselect-option.entry.js.map +1 -1
  188. package/dist/esm/ifx-multiselect_2.entry.js +5 -5
  189. package/dist/esm/ifx-multiselect_2.entry.js.map +1 -1
  190. package/dist/esm/ifx-overview-table.entry.js +1 -1
  191. package/dist/esm/ifx-overview-table.entry.js.map +1 -1
  192. package/dist/esm/ifx-progress-bar.entry.js +1 -1
  193. package/dist/esm/ifx-radio-button-group.entry.js +1 -1
  194. package/dist/esm/ifx-radio-button.entry.js +5 -15
  195. package/dist/esm/ifx-radio-button.entry.js.map +1 -1
  196. package/dist/esm/ifx-search-bar.entry.js +1 -1
  197. package/dist/esm/ifx-search-field.entry.js +2 -2
  198. package/dist/esm/ifx-segment.entry.js +1 -1
  199. package/dist/esm/ifx-segmented-control.entry.js +2 -2
  200. package/dist/esm/ifx-select.entry.js +3 -3
  201. package/dist/esm/ifx-select.entry.js.map +1 -1
  202. package/dist/esm/ifx-slider.entry.js +2 -2
  203. package/dist/esm/ifx-spinner.ifx-text-field.entry.js.map +1 -1
  204. package/dist/esm/ifx-spinner_2.entry.js +11 -11
  205. package/dist/esm/ifx-spinner_2.entry.js.map +1 -1
  206. package/dist/esm/ifx-status.entry.js +1 -1
  207. package/dist/esm/ifx-step.entry.js +4 -4
  208. package/dist/esm/ifx-stepper.entry.js +2 -2
  209. package/dist/esm/ifx-switch.entry.js +4 -15
  210. package/dist/esm/ifx-switch.entry.js.map +1 -1
  211. package/dist/esm/ifx-tab.entry.js +1 -1
  212. package/dist/esm/ifx-table.entry.js +2 -2
  213. package/dist/esm/ifx-tabs.entry.js +2 -2
  214. package/dist/esm/ifx-tag.entry.js +1 -1
  215. package/dist/esm/ifx-templates-ui.entry.js +1 -1
  216. package/dist/esm/ifx-textarea.entry.js +9 -9
  217. package/dist/esm/ifx-textarea.entry.js.map +1 -1
  218. package/dist/esm/ifx-tooltip.entry.js +4 -4
  219. package/dist/esm/ifx-tree-view-item.entry.js +2 -2
  220. package/dist/esm/ifx-tree-view.entry.js +1 -1
  221. package/dist/infineon-design-system-stencil/ifx-checkbox.entry.esm.js.map +1 -1
  222. package/dist/infineon-design-system-stencil/ifx-date-picker.entry.esm.js.map +1 -1
  223. package/dist/infineon-design-system-stencil/ifx-multiselect.ifx-multiselect-option.entry.esm.js.map +1 -1
  224. package/dist/infineon-design-system-stencil/ifx-overview-table.entry.esm.js.map +1 -1
  225. package/dist/infineon-design-system-stencil/ifx-radio-button.entry.esm.js.map +1 -1
  226. package/dist/infineon-design-system-stencil/ifx-select.entry.esm.js.map +1 -1
  227. package/dist/infineon-design-system-stencil/ifx-spinner.ifx-text-field.entry.esm.js.map +1 -1
  228. package/dist/infineon-design-system-stencil/ifx-switch.entry.esm.js.map +1 -1
  229. package/dist/infineon-design-system-stencil/ifx-textarea.entry.esm.js.map +1 -1
  230. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
  231. package/dist/infineon-design-system-stencil/{p-c082f65d.entry.js → p-022667fd.entry.js} +2 -2
  232. package/dist/infineon-design-system-stencil/{p-9f677df3.entry.js → p-0eaf5a5e.entry.js} +2 -2
  233. package/dist/infineon-design-system-stencil/{p-b3e0da8d.entry.js → p-262afd53.entry.js} +2 -2
  234. package/dist/infineon-design-system-stencil/{p-423fd640.entry.js → p-296c1bd4.entry.js} +2 -2
  235. package/dist/infineon-design-system-stencil/{p-8e721b4b.entry.js → p-34146964.entry.js} +2 -2
  236. package/dist/infineon-design-system-stencil/{p-29bf7f39.entry.js → p-41291d21.entry.js} +2 -2
  237. package/dist/infineon-design-system-stencil/p-50867a1f.entry.js +2 -0
  238. package/dist/infineon-design-system-stencil/{p-d1a40b06.entry.js.map → p-50867a1f.entry.js.map} +1 -1
  239. package/dist/infineon-design-system-stencil/{p-9afbc104.entry.js → p-5c1a8c83.entry.js} +2 -2
  240. package/dist/infineon-design-system-stencil/{p-27d80304.entry.js → p-62b09872.entry.js} +2 -2
  241. package/dist/infineon-design-system-stencil/p-66a4ed41.entry.js +2 -0
  242. package/dist/infineon-design-system-stencil/{p-01f4ac35.entry.js → p-7462fff6.entry.js} +2 -2
  243. package/dist/infineon-design-system-stencil/{p-20185a81.entry.js → p-79399588.entry.js} +2 -2
  244. package/dist/infineon-design-system-stencil/{p-019e01a1.entry.js → p-7b091a06.entry.js} +2 -2
  245. package/dist/infineon-design-system-stencil/{p-29924f68.entry.js → p-7b4b783a.entry.js} +2 -2
  246. package/dist/infineon-design-system-stencil/{p-92b41859.entry.js → p-7c32c3aa.entry.js} +2 -2
  247. package/dist/infineon-design-system-stencil/p-86523f4e.entry.js +2 -0
  248. package/dist/infineon-design-system-stencil/p-86523f4e.entry.js.map +1 -0
  249. package/dist/infineon-design-system-stencil/{p-a3894e45.entry.js → p-92e5b3bd.entry.js} +2 -2
  250. package/dist/infineon-design-system-stencil/{p-afdb48bc.entry.js → p-a405b6f4.entry.js} +2 -2
  251. package/dist/infineon-design-system-stencil/p-a5b15118.entry.js +2 -0
  252. package/dist/infineon-design-system-stencil/p-a5b15118.entry.js.map +1 -0
  253. package/dist/infineon-design-system-stencil/p-acc5ae62.entry.js +2 -0
  254. package/dist/infineon-design-system-stencil/p-acc5ae62.entry.js.map +1 -0
  255. package/dist/infineon-design-system-stencil/{p-c585d41f.entry.js → p-b25c4f18.entry.js} +2 -2
  256. package/dist/infineon-design-system-stencil/{p-c585d41f.entry.js.map → p-b25c4f18.entry.js.map} +1 -1
  257. package/dist/infineon-design-system-stencil/p-b4d19492.entry.js +2 -0
  258. package/dist/infineon-design-system-stencil/p-b4d19492.entry.js.map +1 -0
  259. package/dist/infineon-design-system-stencil/{p-901e400b.entry.js → p-b81d2f37.entry.js} +2 -2
  260. package/dist/infineon-design-system-stencil/p-be04a034.entry.js +2 -0
  261. package/dist/infineon-design-system-stencil/p-be04a034.entry.js.map +1 -0
  262. package/dist/infineon-design-system-stencil/{p-4bfaae7f.entry.js → p-bf480e62.entry.js} +2 -2
  263. package/dist/infineon-design-system-stencil/{p-30e08f40.entry.js → p-c06b0a60.entry.js} +2 -2
  264. package/dist/infineon-design-system-stencil/p-c75784ef.entry.js +2 -0
  265. package/dist/infineon-design-system-stencil/{p-9622982d.entry.js.map → p-c75784ef.entry.js.map} +1 -1
  266. package/dist/infineon-design-system-stencil/{p-ae623793.entry.js → p-c863b508.entry.js} +2 -2
  267. package/dist/infineon-design-system-stencil/{p-a4d53b78.entry.js → p-cc0309cc.entry.js} +2 -2
  268. package/dist/infineon-design-system-stencil/{p-2845216b.entry.js → p-cdbc14e1.entry.js} +2 -2
  269. package/dist/infineon-design-system-stencil/{p-bf51fc38.entry.js → p-d094dc8e.entry.js} +2 -2
  270. package/dist/infineon-design-system-stencil/p-d094dc8e.entry.js.map +1 -0
  271. package/dist/infineon-design-system-stencil/{p-cf4d16d1.entry.js → p-e1b6894c.entry.js} +2 -2
  272. package/dist/infineon-design-system-stencil/p-e1b6894c.entry.js.map +1 -0
  273. package/dist/infineon-design-system-stencil/{p-aae0430e.entry.js → p-e2dd3eef.entry.js} +2 -2
  274. package/dist/infineon-design-system-stencil/{p-c2b28f48.entry.js → p-e54f95d9.entry.js} +2 -2
  275. package/dist/infineon-design-system-stencil/p-e54f95d9.entry.js.map +1 -0
  276. package/dist/infineon-design-system-stencil/{p-c633f9b0.entry.js → p-ea61b79e.entry.js} +2 -2
  277. package/dist/infineon-design-system-stencil/{p-1e99b82a.entry.js → p-f53f7d80.entry.js} +2 -2
  278. package/dist/types/components/checkbox/checkbox.d.ts +0 -1
  279. package/dist/types/components/date-picker/date-picker.d.ts +0 -1
  280. package/dist/types/components/radio-button/radio-button.d.ts +0 -1
  281. package/dist/types/components/switch/switch.d.ts +0 -1
  282. package/dist/types/components/text-field/text-field.d.ts +0 -1
  283. package/dist/types/components/textarea/textarea.d.ts +0 -1
  284. package/package.json +1 -1
  285. package/dist/components/p-BZbKc4N2.js.map +0 -1
  286. package/dist/components/p-B_2EeLyJ.js.map +0 -1
  287. package/dist/components/p-CW1EYr_B.js.map +0 -1
  288. package/dist/components/p-DL0DaOdR.js.map +0 -1
  289. package/dist/infineon-design-system-stencil/p-0468c9a7.entry.js +0 -2
  290. package/dist/infineon-design-system-stencil/p-1783d3c4.entry.js +0 -2
  291. package/dist/infineon-design-system-stencil/p-1783d3c4.entry.js.map +0 -1
  292. package/dist/infineon-design-system-stencil/p-32426d70.entry.js +0 -2
  293. package/dist/infineon-design-system-stencil/p-32426d70.entry.js.map +0 -1
  294. package/dist/infineon-design-system-stencil/p-9622982d.entry.js +0 -2
  295. package/dist/infineon-design-system-stencil/p-a2885d0f.entry.js +0 -2
  296. package/dist/infineon-design-system-stencil/p-a2885d0f.entry.js.map +0 -1
  297. package/dist/infineon-design-system-stencil/p-b3170276.entry.js +0 -2
  298. package/dist/infineon-design-system-stencil/p-b3170276.entry.js.map +0 -1
  299. package/dist/infineon-design-system-stencil/p-bf51fc38.entry.js.map +0 -1
  300. package/dist/infineon-design-system-stencil/p-c2b28f48.entry.js.map +0 -1
  301. package/dist/infineon-design-system-stencil/p-cf4d16d1.entry.js.map +0 -1
  302. package/dist/infineon-design-system-stencil/p-d1a40b06.entry.js +0 -2
  303. package/dist/infineon-design-system-stencil/p-d4534780.entry.js +0 -2
  304. package/dist/infineon-design-system-stencil/p-d4534780.entry.js.map +0 -1
  305. /package/dist/infineon-design-system-stencil/{p-c082f65d.entry.js.map → p-022667fd.entry.js.map} +0 -0
  306. /package/dist/infineon-design-system-stencil/{p-9f677df3.entry.js.map → p-0eaf5a5e.entry.js.map} +0 -0
  307. /package/dist/infineon-design-system-stencil/{p-b3e0da8d.entry.js.map → p-262afd53.entry.js.map} +0 -0
  308. /package/dist/infineon-design-system-stencil/{p-423fd640.entry.js.map → p-296c1bd4.entry.js.map} +0 -0
  309. /package/dist/infineon-design-system-stencil/{p-8e721b4b.entry.js.map → p-34146964.entry.js.map} +0 -0
  310. /package/dist/infineon-design-system-stencil/{p-29bf7f39.entry.js.map → p-41291d21.entry.js.map} +0 -0
  311. /package/dist/infineon-design-system-stencil/{p-9afbc104.entry.js.map → p-5c1a8c83.entry.js.map} +0 -0
  312. /package/dist/infineon-design-system-stencil/{p-27d80304.entry.js.map → p-62b09872.entry.js.map} +0 -0
  313. /package/dist/infineon-design-system-stencil/{p-0468c9a7.entry.js.map → p-66a4ed41.entry.js.map} +0 -0
  314. /package/dist/infineon-design-system-stencil/{p-01f4ac35.entry.js.map → p-7462fff6.entry.js.map} +0 -0
  315. /package/dist/infineon-design-system-stencil/{p-20185a81.entry.js.map → p-79399588.entry.js.map} +0 -0
  316. /package/dist/infineon-design-system-stencil/{p-019e01a1.entry.js.map → p-7b091a06.entry.js.map} +0 -0
  317. /package/dist/infineon-design-system-stencil/{p-29924f68.entry.js.map → p-7b4b783a.entry.js.map} +0 -0
  318. /package/dist/infineon-design-system-stencil/{p-92b41859.entry.js.map → p-7c32c3aa.entry.js.map} +0 -0
  319. /package/dist/infineon-design-system-stencil/{p-a3894e45.entry.js.map → p-92e5b3bd.entry.js.map} +0 -0
  320. /package/dist/infineon-design-system-stencil/{p-afdb48bc.entry.js.map → p-a405b6f4.entry.js.map} +0 -0
  321. /package/dist/infineon-design-system-stencil/{p-901e400b.entry.js.map → p-b81d2f37.entry.js.map} +0 -0
  322. /package/dist/infineon-design-system-stencil/{p-4bfaae7f.entry.js.map → p-bf480e62.entry.js.map} +0 -0
  323. /package/dist/infineon-design-system-stencil/{p-30e08f40.entry.js.map → p-c06b0a60.entry.js.map} +0 -0
  324. /package/dist/infineon-design-system-stencil/{p-ae623793.entry.js.map → p-c863b508.entry.js.map} +0 -0
  325. /package/dist/infineon-design-system-stencil/{p-a4d53b78.entry.js.map → p-cc0309cc.entry.js.map} +0 -0
  326. /package/dist/infineon-design-system-stencil/{p-2845216b.entry.js.map → p-cdbc14e1.entry.js.map} +0 -0
  327. /package/dist/infineon-design-system-stencil/{p-aae0430e.entry.js.map → p-e2dd3eef.entry.js.map} +0 -0
  328. /package/dist/infineon-design-system-stencil/{p-c633f9b0.entry.js.map → p-ea61b79e.entry.js.map} +0 -0
  329. /package/dist/infineon-design-system-stencil/{p-1e99b82a.entry.js.map → p-f53f7d80.entry.js.map} +0 -0
@@ -0,0 +1,2 @@
1
+ import{r as e,c,h as i,a as s}from"./p-PqnYwNKt.js";import{d as t,t as o}from"./p-DcmcuUOA.js";import{i as a}from"./p-Bw2fh5LT.js";const r=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:inline-block;user-select:none}.container{display:flex;flex-direction:row;align-items:center}.container.gap{gap:16px}.switch__checkbox-container{padding:4px;display:flex;align-items:center;position:relative;width:32px;height:16px;background-color:#FFFFFF;border:1px solid #575352;border-radius:20px;cursor:pointer;transition:background-color 0.3s ease;outline:none}.switch__checkbox-container:focus{outline:4px solid #0A8276;outline-offset:2px}.switch__checkbox-container:focus:not(:focus-visible){outline:none}.switch__checkbox-container:focus-visible{outline:2px solid #0A8276;outline-offset:2px}.switch__checkbox-container.disabled{cursor:default;border-color:#BFBBBB}.switch__label-wrapper label:hover{cursor:pointer}.switch__label-wrapper.disabled{color:#BFBBBB}.switch__checkbox-wrapper .switch{width:16px;height:16px;background-color:#575352;border-radius:50%;transition:transform 0.3s ease, background-color 0.3s ease}.switch__checkbox-wrapper .switch.disabled{background-color:#BFBBBB;border-color:#BFBBBB;cursor:default}.switch__checkbox-wrapper .switch.checked{transform:translateX(16px);background-color:#FFFFFF}.switch__checkbox-wrapper .switch.checked.disabled{cursor:default}.switch__checkbox-container:hover .toggle-switch{box-shadow:0 0 5px rgba(0, 0, 0, 0.2)}.switch__checkbox-container.checked{background-color:#0A8276;border-color:#0A8276}.switch__checkbox-container.checked.disabled{background-color:#BFBBBB;border-color:#BFBBBB;cursor:default}';const h=class{constructor(i){e(this,i);this.ifxChange=c(this,"ifxChange",7);if(i.$hostElement$["s-ei"]){this.internals=i.$hostElement$["s-ei"]}else{this.internals=i.$hostElement$.attachInternals();i.$hostElement$["s-ei"]=this.internals}this.checked=false;this.name="";this.disabled=false;this.internalChecked=false}async isChecked(){return this.internalChecked}componentWillLoad(){this.internalChecked=this.checked}toggleLabelGap(){const e=this.el.shadowRoot.querySelector("slot");const c=this.el.shadowRoot.querySelector(".container");if(e.assignedNodes().length){c.classList.add("gap")}else{c.classList.remove("gap")}}async componentDidLoad(){if(!a(this.el)){const e=t();o("ifx-switch",await e)}this.toggleLabelGap()}valueChanged(e,c){if(e!==c){this.internalChecked=e}}toggleSwitch(){if(this.disabled)return;this.internalChecked=!this.internalChecked;this.ifxChange.emit(this.internalChecked)}handleKeyDown(e){if(this.disabled)return;if(e.key==="Enter"||e.key===" "){this.toggleSwitch()}}render(){return i("div",{key:"305eeaf2fe5904134c21a5abe556303366b65ae6",class:"container",role:"switch","aria-checked":this.internalChecked?"true":"false","aria-label":this.name,onClick:()=>this.toggleSwitch(),onKeyDown:e=>this.handleKeyDown(e)},i("div",{key:"bd115571fc983d6c79f05cc4e04956354f6f18f3",class:`switch__checkbox-container ${this.internalChecked?"checked":""} ${this.disabled?"disabled":""}`,tabindex:"0"},i("div",{key:"cd26894c8d3329d5b3f97460fe25e6dcb9713865",class:"switch__checkbox-wrapper"},i("input",{key:"e1785eb1b9d77b4d5043dbf52bd8892b5c8d33a6",type:"checkbox",hidden:true,name:this.name,disabled:this.disabled,checked:this.internalChecked,value:`${this.value}`}),i("div",{key:"212d207114a8c783c2019e962585c7aca3f2a6ab",class:`switch ${this.internalChecked?"checked":""} ${this.disabled?"disabled":""}`}))),i("div",{key:"5dc8dde1aa40fe6e889a52bc63866b1c3a753e24",class:`switch__label-wrapper ${this.disabled?"disabled":""}`},i("label",{key:"6e61b7f75aeac9db0d497b2c8843e22ca5a0c590",htmlFor:"switch"},i("slot",{key:"4692e1b1dab2874fc52c6d2828a1daf4962fa549",onSlotchange:()=>this.toggleLabelGap()}))))}get el(){return s(this)}static get watchers(){return{checked:["valueChanged"]}}};h.style=r;export{h as ifx_switch};
2
+ //# sourceMappingURL=p-be04a034.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["switchCss","Switch","constructor","hostRef","this","checked","name","disabled","internalChecked","isChecked","componentWillLoad","toggleLabelGap","slot","el","shadowRoot","querySelector","container","assignedNodes","length","classList","add","remove","componentDidLoad","isNestedInIfxComponent","framework","detectFramework","trackComponent","valueChanged","newValue","oldValue","toggleSwitch","ifxChange","emit","handleKeyDown","event","key","render","h","class","role","onClick","onKeyDown","tabindex","type","hidden","value","htmlFor","onSlotchange"],"sources":["src/components/switch/switch.scss?tag=ifx-switch&encapsulation=shadow","src/components/switch/switch.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n/* switch.css */\n:host {\n display: inline-block;\n user-select: none;\n}\n\n.container {\n display: flex;\n flex-direction: row;\n align-items: center;\n\n &.gap {\n gap: tokens.$ifxSpace200;\n }\n}\n\n\n.switch__checkbox-container {\n padding: tokens.$ifxSpace50;\n display: flex;\n align-items: center;\n position: relative;\n // Subtracting padding size from both height and width\n width: (tokens.$ifxSpace500)-8px;\n height: 16px;\n background-color: tokens.$ifxColorBaseWhite;\n border: 1px solid tokens.$ifxColorEngineering500;\n border-radius: 20px;\n cursor: pointer;\n transition: background-color 0.3s ease;\n outline: none;\n\n &:focus {\n outline: 4px solid tokens.$ifxColorOcean500;\n outline-offset: 2px;\n }\n\n &:focus:not(:focus-visible) {\n outline: none;\n }\n\n &:focus-visible {\n outline: 2px solid tokens.$ifxColorOcean500;\n outline-offset: 2px;\n }\n\n &.disabled {\n cursor: default;\n border-color: tokens.$ifxColorEngineering300;\n }\n\n\n}\n\n\n.switch__label-wrapper {\n\n & label { \n &:hover { \n cursor: pointer;\n }\n }\n\n &.disabled {\n color: tokens.$ifxColorEngineering300;\n }\n}\n\n\n.switch__checkbox-wrapper {\n\n .switch {\n // position: absolute;\n width: tokens.$ifxSpace200;\n height: tokens.$ifxSpace200;\n background-color: tokens.$ifxColorEngineering500;\n border-radius: 50%;\n transition: transform 0.3s ease, background-color 0.3s ease;\n\n &.disabled {\n background-color: tokens.$ifxColorEngineering300;\n border-color: tokens.$ifxColorEngineering300;\n cursor: default;\n }\n }\n\n .switch.checked {\n transform: translateX(16px);\n background-color: tokens.$ifxColorBaseWhite;\n\n &.disabled {\n cursor: default;\n }\n\n }\n\n}\n\n.switch__checkbox-container:hover .toggle-switch {\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);\n}\n\n\n\n.switch__checkbox-container.checked {\n background-color: tokens.$ifxColorOcean500;\n border-color: tokens.$ifxColorOcean500;\n\n &.disabled {\n background-color: tokens.$ifxColorEngineering300;\n border-color: tokens.$ifxColorEngineering300;\n cursor: default;\n }\n}","import { AttachInternals, Method } from '@stencil/core';\nimport { Component, Prop, State, Watch, h, Event, EventEmitter, Element } 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-switch',\n styleUrl: 'switch.scss',\n shadow: true,\n // formAssociated: true\n})\nexport class Switch {\n @Prop() checked: boolean = false;\n @Prop() name: string = '';\n @Prop() disabled: boolean = false;\n @Prop() value: string;\n @State() internalChecked: boolean = false;\n\n @AttachInternals() internals: ElementInternals;\n\n @Element() el: HTMLIfxSwitchElement;\n\n @Event({ eventName: 'ifxChange' }) ifxChange: EventEmitter<boolean>;\n\n @Method()\n async isChecked(): Promise<boolean> {\n return this.internalChecked;\n }\n\n componentWillLoad() {\n this.internalChecked = this.checked;\n }\n \n\n toggleLabelGap() {\n const slot = this.el.shadowRoot.querySelector('slot');\n const container = this.el.shadowRoot.querySelector('.container');\n if (slot.assignedNodes().length) {\n container.classList.add('gap')\n } else { \n container.classList.remove('gap')\n }\n }\n \n async componentDidLoad() {\n if(!isNestedInIfxComponent(this.el)) { \n const framework = detectFramework();\n trackComponent('ifx-switch', await framework)\n }\n this.toggleLabelGap();\n }\n \n @Watch('checked')\n valueChanged(newValue: boolean, oldValue: boolean) {\n if (newValue !== oldValue) {\n this.internalChecked = newValue;\n }\n }\n\n toggleSwitch() {\n if (this.disabled) return;\n this.internalChecked = !this.internalChecked;\n\n if (this.internalChecked) {\n if (this.value !== undefined) {\n //this.internals.setFormValue(this.value);\n } else {\n //this.internals.setFormValue(\"on\")\n }\n } else {\n //this.internals.setFormValue(null)\n }\n\n this.ifxChange.emit(this.internalChecked);\n }\n\n handleKeyDown(event: KeyboardEvent) {\n if (this.disabled) return;\n // If the pressed key is either 'Enter' or 'Space' \n if (event.key === 'Enter' || event.key === ' ') {\n this.toggleSwitch();\n }\n }\n\n /**\n * Callback for form association.\n * Called whenever the form is reset.\n */\n // formResetCallback() {\n // this.internals.setFormValue(null);\n // }\n\n render() {\n return (\n <div\n class=\"container\"\n role=\"switch\"\n aria-checked={this.internalChecked ? 'true' : 'false'}\n aria-label={this.name}\n onClick={() => this.toggleSwitch()}\n onKeyDown={(event) => this.handleKeyDown(event)}\n >\n {/* Checkbox */}\n <div \n class={`switch__checkbox-container ${this.internalChecked ? 'checked' : ''} ${this.disabled ? 'disabled' : ''}`}\n tabindex=\"0\"\n >\n <div class=\"switch__checkbox-wrapper\">\n <input type=\"checkbox\" hidden\n name={this.name}\n disabled={this.disabled}\n checked={this.internalChecked}\n value={`${this.value}`} />\n <div class={`switch ${this.internalChecked ? 'checked' : ''} ${this.disabled ? 'disabled' : ''}`} />\n </div>\n </div >\n\n {/* Label */}\n <div class={`switch__label-wrapper ${this.disabled ? 'disabled' : ''}`} >\n <label htmlFor=\"switch\">\n <slot onSlotchange={() => this.toggleLabelGap()} />\n </label>\n </div>\n </div>\n )\n\n }\n}\n"],"mappings":"mIAAA,MAAMA,EAAY,sgD,MCYLC,EAAM,MANnB,WAAAC,CAAAC,G,+MAOUC,KAAOC,QAAY,MACnBD,KAAIE,KAAW,GACfF,KAAQG,SAAY,MAEnBH,KAAeI,gBAAY,KA+GrC,CAtGC,eAAMC,GACJ,OAAOL,KAAKI,e,CAGd,iBAAAE,GACEN,KAAKI,gBAAkBJ,KAAKC,O,CAI9B,cAAAM,GACE,MAAMC,EAAOR,KAAKS,GAAGC,WAAWC,cAAc,QAC9C,MAAMC,EAAYZ,KAAKS,GAAGC,WAAWC,cAAc,cACnD,GAAIH,EAAKK,gBAAgBC,OAAQ,CAC/BF,EAAUG,UAAUC,IAAI,M,KACnB,CACLJ,EAAUG,UAAUE,OAAO,M,EAI/B,sBAAMC,GACJ,IAAIC,EAAuBnB,KAAKS,IAAK,CACnC,MAAMW,EAAYC,IAClBC,EAAe,mBAAoBF,E,CAErCpB,KAAKO,gB,CAIP,YAAAgB,CAAaC,EAAmBC,GAC9B,GAAID,IAAaC,EAAU,CACzBzB,KAAKI,gBAAkBoB,C,EAI3B,YAAAE,GACE,GAAI1B,KAAKG,SAAU,OACnBH,KAAKI,iBAAmBJ,KAAKI,gBAY7BJ,KAAK2B,UAAUC,KAAK5B,KAAKI,gB,CAG3B,aAAAyB,CAAcC,GACZ,GAAI9B,KAAKG,SAAU,OAEnB,GAAI2B,EAAMC,MAAQ,SAAWD,EAAMC,MAAQ,IAAK,CAC9C/B,KAAK0B,c,EAYT,MAAAM,GACE,OACEC,EAAA,OAAAF,IAAA,2CACEG,MAAM,YACNC,KAAK,SACS,eAAAnC,KAAKI,gBAAkB,OAAS,QAAO,aACzCJ,KAAKE,KACjBkC,QAAS,IAAMpC,KAAK0B,eACpBW,UAAYP,GAAU9B,KAAK6B,cAAcC,IAGzCG,EAAA,OAAAF,IAAA,2CACEG,MAAO,8BAA8BlC,KAAKI,gBAAkB,UAAY,MAAMJ,KAAKG,SAAW,WAAa,KAC3GmC,SAAS,KAETL,EAAK,OAAAF,IAAA,2CAAAG,MAAM,4BACTD,EAAA,SAAAF,IAAA,2CAAOQ,KAAK,WAAWC,OAAM,KAC3BtC,KAAMF,KAAKE,KACXC,SAAUH,KAAKG,SACfF,QAASD,KAAKI,gBACdqC,MAAO,GAAGzC,KAAKyC,UACjBR,EAAA,OAAAF,IAAA,2CAAKG,MAAO,UAAUlC,KAAKI,gBAAkB,UAAY,MAAMJ,KAAKG,SAAW,WAAa,SAKhG8B,EAAA,OAAAF,IAAA,2CAAKG,MAAO,yBAAyBlC,KAAKG,SAAW,WAAa,MAChE8B,EAAO,SAAAF,IAAA,2CAAAW,QAAQ,UACbT,EAAA,QAAAF,IAAA,2CAAMY,aAAc,IAAM3C,KAAKO,qB","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as e,c as i,h as t,a as s}from"./p-PqnYwNKt.js";function a(e){return Array.from(e.querySelectorAll("ifx-list-entry")).filter((e=>e.getAttribute("value")==="true")).map((e=>({label:e.getAttribute("label"),value:e.getAttribute("value"),type:e.getAttribute("type")})))}const d=".header{display:flex;align-items:flex-start;align-self:stretch;cursor:pointer;border-left:3px solid transparent}.text-and-icon{display:flex;padding:12px 16px 12px 20px;align-items:center;gap:16px;flex:1 0 0}.header.expanded{border-left:3px solid #0A8276}.text{display:flex;align-items:center;gap:8px;flex:1 0 0;color:#1D1D1D;font-size:16px;font-style:normal;font-weight:600;line-height:24px}.hidden{display:none}.accordion{border-bottom:1px solid #EEEDED}.filter-accordion-container{display:flex;padding:8px 16px 16px 20px;flex-direction:column;align-items:flex-start;gap:12px;align-self:stretch;border-left:3px solid #0A8276}::slotted(ifx-filter-entry:nth-child(n+7)){display:none}.link{display:flex;align-items:center;gap:8px}.show-more ::slotted(ifx-filter-entry:nth-child(n+7)){display:block}.show-more .show-more-link{display:none}";const n=class{constructor(t){e(this,t);this.ifxFilterAccordionChange=i(this,"ifxFilterAccordionChange",7);this.initialized=false;this.expanded=false;this.count=0;this.totalItems=0;this.filterGroupName="";this.handleCheckedChange=e=>{const i=e.detail.selectedItems;this.count=i.length;this.ifxFilterAccordionChange.emit({filterGroupName:this.filterGroupName,selectedItems:i})};this.toggleAccordion=e=>{e.stopPropagation();this.expanded=!this.expanded}}componentWillLoad(){this.el.addEventListener("ifxListUpdate",this.handleCheckedChange)}componentDidLoad(){if(!this.initialized){const e=a(this.el);this.count=e.length;this.initialized=true}}componentWillUnload(){this.el.removeEventListener("ifxListUpdate",this.handleCheckedChange)}render(){return t("div",{key:"ea1b33b97eb9cc71f2ddd9c0d184b56dadc1bce9",class:`accordion ${this.expanded?"expanded":""}`},t("div",{key:"bd5a24072d446d83f35305493b9471f22558d7fa",class:`header ${this.expanded?"expanded":""}`,onClick:this.toggleAccordion},t("div",{key:"2549cd6f6aa689f51e2fb2ae9ce49d94c38075e8",class:`text-and-icon ${this.expanded?"expanded":""}`},t("div",{key:"2fba6a223efabceaeb5303bd00de098b1827775d",class:"text"},t("span",{key:"9694ed7595562762dd5df9cd4f8ac20cb3d021d6"},this.filterGroupName),t("ifx-indicator",{key:"5cb8a2502dbdc1a03de0a75abfc128e74cc028e5",variant:"number",number:this.count})),t("ifx-icon",{key:"8fa4035bf42663bd2b90da495054dc0f75f02f38",class:this.expanded?"":"hidden",icon:"minus-16",onClick:this.toggleAccordion}),t("ifx-icon",{key:"a98f118d6c7869c44328e418c6c9fb89aa3872c5",class:this.expanded?"hidden":"",icon:"plus-16",onClick:this.toggleAccordion}))),this.expanded&&t("div",{key:"2cfd258ef8951b4633751399241d9e31fdddcc5b",class:"filter-accordion-container"},t("slot",{key:"9dcf56b81898bb2382b63a47a29af86880706a2a",name:"list"})))}get el(){return s(this)}};n.style=d;export{n as ifx_filter_accordion};
2
- //# sourceMappingURL=p-4bfaae7f.entry.js.map
1
+ import{r as e,c as i,h as t,a as s}from"./p-PqnYwNKt.js";function a(e){return Array.from(e.querySelectorAll("ifx-list-entry")).filter((e=>e.getAttribute("value")==="true")).map((e=>({label:e.getAttribute("label"),value:e.getAttribute("value"),type:e.getAttribute("type")})))}const n=".header{display:flex;align-items:flex-start;align-self:stretch;cursor:pointer;border-left:3px solid transparent}.text-and-icon{display:flex;padding:12px 16px 12px 20px;align-items:center;gap:16px;flex:1 0 0}.header.expanded{border-left:3px solid #0A8276}.text{display:flex;align-items:center;gap:8px;flex:1 0 0;color:#1D1D1D;font-size:16px;font-style:normal;font-weight:600;line-height:24px}.hidden{display:none}.accordion{border-bottom:1px solid #EEEDED}.filter-accordion-container{display:flex;padding:8px 16px 16px 20px;flex-direction:column;align-items:flex-start;gap:12px;align-self:stretch;border-left:3px solid #0A8276}::slotted(ifx-filter-entry:nth-child(n+7)){display:none}.link{display:flex;align-items:center;gap:8px}.show-more ::slotted(ifx-filter-entry:nth-child(n+7)){display:block}.show-more .show-more-link{display:none}";const l=class{constructor(t){e(this,t);this.ifxFilterAccordionChange=i(this,"ifxFilterAccordionChange",7);this.initialized=false;this.expanded=false;this.count=0;this.totalItems=0;this.filterGroupName="";this.handleCheckedChange=e=>{const i=e.detail.selectedItems;this.count=i.length;this.ifxFilterAccordionChange.emit({filterGroupName:this.filterGroupName,selectedItems:i})};this.toggleAccordion=e=>{e.stopPropagation();this.expanded=!this.expanded}}componentWillLoad(){this.el.addEventListener("ifxListUpdate",this.handleCheckedChange)}componentDidLoad(){if(!this.initialized){const e=a(this.el);this.count=e.length;this.initialized=true}}componentWillUnload(){this.el.removeEventListener("ifxListUpdate",this.handleCheckedChange)}render(){return t("div",{key:"3d0fd2cc850927fc6cc458867b049a582f47a0f5",class:`accordion ${this.expanded?"expanded":""}`},t("div",{key:"0bc0dafdcfd874ae01fd7bb8446036ad34c07603",class:`header ${this.expanded?"expanded":""}`,onClick:this.toggleAccordion},t("div",{key:"5b8a0a61ca1b4b5c640933b7e81e6c5f3f406ba1",class:`text-and-icon ${this.expanded?"expanded":""}`},t("div",{key:"16e29f1f8ca7870e1e62cd5bcd56766a8a6ac512",class:"text"},t("span",{key:"69687b082848bebb93647219eb8c1908b21d2c03"},this.filterGroupName),t("ifx-indicator",{key:"ede8211d6cee49e3a5af93e377b05863b324ab52",variant:"number",number:this.count})),t("ifx-icon",{key:"27394e246008a8cefc69782b50885973cb548ce6",class:this.expanded?"":"hidden",icon:"minus-16",onClick:this.toggleAccordion}),t("ifx-icon",{key:"c517b29a5a66c8747a724af163ca761d3a7e11d9",class:this.expanded?"hidden":"",icon:"plus-16",onClick:this.toggleAccordion}))),this.expanded&&t("div",{key:"289e7251b83c88a26445be01f22575c85c5689e3",class:"filter-accordion-container"},t("slot",{key:"d63dbb79d3676b8881afaa318b6d642563935baa",name:"list"})))}get el(){return s(this)}};l.style=n;export{l as ifx_filter_accordion};
2
+ //# sourceMappingURL=p-bf480e62.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,e as t,h as a,a as s}from"./p-PqnYwNKt.js";const i="*{padding:0;margin:0}.templates__container{display:flex;flex-direction:column;align-items:center}.templates__container .back__btn-wrapper{display:none}.templates__container .back__btn-wrapper.show{display:flex;justify-content:space-between;width:100%}.templates__container .back__btn-wrapper .alert__wrapper{display:none}.templates__container .back__btn-wrapper .alert__wrapper.show{display:block}.templates__container .templates__wrapper{display:flex;padding:20px 0px;gap:20px;flex-wrap:wrap}.templates__container .templates__title.hide{display:none}";const r=class{constructor(a){e(this,a);this.tableTemplate=t(`https://raw.githubusercontent.com/Infineon/public-assets/refs/heads/main/table_template.png`);this.wizardTemplate=t(`https://raw.githubusercontent.com/Infineon/public-assets/refs/heads/main/wizard_template.png`)}toggleTemplate(e){const t=this.el.shadowRoot.querySelector(".templates__wrapper").querySelectorAll("ifx-template");t.forEach((t=>{t.toggleTemplate(e)}))}handleError(e){const t=this.el.shadowRoot.querySelector(".alert__wrapper");if(e.detail){t.classList.add("show")}else{t.classList.remove("show")}}filterTemplates(e){const t=this.el.shadowRoot.querySelector(".templates__title");const a=this.el.shadowRoot.querySelector(".back__btn-wrapper");if(e.detail){t.classList.add("hide");if(e.detail!=="details"){a.classList.add("show")}this.toggleTemplate(e.detail)}else{t.classList.remove("hide");a.classList.remove("show");this.toggleTemplate(null)}}closeAlert(){const e=this.el.shadowRoot.querySelector(".alert__wrapper");e.classList.remove("show")}render(){return a("div",{key:"c34596386a391c421389f7d0715e01de0581de2e",class:"templates__container"},a("div",{key:"d36800e04daa98ba555b0e8e4f58957960d296f6",class:"back__btn-wrapper"},a("ifx-icon-button",{key:"0909aef53ac7b933839afa61bce5916e6e1dbb6f",onClick:()=>this.filterTemplates(false),shape:"round",variant:"tertiary",icon:"arrow-left-16",target:"_blank",size:"m"}),a("div",{key:"8c4928e1224963db801779c5a5557a3fef979d2d",class:"alert__wrapper"},a("ifx-alert",{key:"4cd3381649bd441959b55796fc7908507d1019ca",onClick:()=>this.closeAlert(),"aria-live":"assertive",variant:"danger",icon:"c-info-16"},"All fields are mandatory"))),a("h2",{key:"5e4c952723938f8d8c07e75d52da443dfd57cf42",class:"templates__title"},"Choose your template"),a("div",{key:"fea5647d0a300fb3b84c06a09dd12c0bd16b5630",class:"templates__wrapper"},a("ifx-template",{key:"b23fed97f867be22c33cf24fd5f8cb273c1c408e",name:"template-01",thumbnail:this.tableTemplate}),a("ifx-template",{key:"84798da9a0339349072f0df1e882ab8aed922068",name:"template-02",thumbnail:this.wizardTemplate})))}static get assetsDirs(){return["assets"]}get el(){return s(this)}};r.style=i;export{r as ifx_templates_ui};
2
- //# sourceMappingURL=p-30e08f40.entry.js.map
1
+ import{r as e,e as t,h as a,a as s}from"./p-PqnYwNKt.js";const i="*{padding:0;margin:0}.templates__container{display:flex;flex-direction:column;align-items:center}.templates__container .back__btn-wrapper{display:none}.templates__container .back__btn-wrapper.show{display:flex;justify-content:space-between;width:100%}.templates__container .back__btn-wrapper .alert__wrapper{display:none}.templates__container .back__btn-wrapper .alert__wrapper.show{display:block}.templates__container .templates__wrapper{display:flex;padding:20px 0px;gap:20px;flex-wrap:wrap}.templates__container .templates__title.hide{display:none}";const r=class{constructor(a){e(this,a);this.tableTemplate=t(`https://raw.githubusercontent.com/Infineon/public-assets/refs/heads/main/table_template.png`);this.wizardTemplate=t(`https://raw.githubusercontent.com/Infineon/public-assets/refs/heads/main/wizard_template.png`)}toggleTemplate(e){const t=this.el.shadowRoot.querySelector(".templates__wrapper").querySelectorAll("ifx-template");t.forEach((t=>{t.toggleTemplate(e)}))}handleError(e){const t=this.el.shadowRoot.querySelector(".alert__wrapper");if(e.detail){t.classList.add("show")}else{t.classList.remove("show")}}filterTemplates(e){const t=this.el.shadowRoot.querySelector(".templates__title");const a=this.el.shadowRoot.querySelector(".back__btn-wrapper");if(e.detail){t.classList.add("hide");if(e.detail!=="details"){a.classList.add("show")}this.toggleTemplate(e.detail)}else{t.classList.remove("hide");a.classList.remove("show");this.toggleTemplate(null)}}closeAlert(){const e=this.el.shadowRoot.querySelector(".alert__wrapper");e.classList.remove("show")}render(){return a("div",{key:"8bbe0f997f5be0ba57c7ebfc925569e07bcb8647",class:"templates__container"},a("div",{key:"9665ad8d5a715c5805bf84d34ebe44cf8ff9bf2b",class:"back__btn-wrapper"},a("ifx-icon-button",{key:"c7d6576bf8f57dcf789022fd9585b94990b49fd9",onClick:()=>this.filterTemplates(false),shape:"round",variant:"tertiary",icon:"arrow-left-16",target:"_blank",size:"m"}),a("div",{key:"9ba6925d962140954d3d4bafed5852375c6c0f26",class:"alert__wrapper"},a("ifx-alert",{key:"fea6fdfde3f746600383aba693fe5df9213e7e6a",onClick:()=>this.closeAlert(),"aria-live":"assertive",variant:"danger",icon:"c-info-16"},"All fields are mandatory"))),a("h2",{key:"05d896790656b9fc4ff3fb0525ad1724d81ad508",class:"templates__title"},"Choose your template"),a("div",{key:"cb376198a1e87f9d50a3cf880a39bbdbd6df8c6e",class:"templates__wrapper"},a("ifx-template",{key:"276793af1c820e057e7ad54d4eeea793fde803d9",name:"template-01",thumbnail:this.tableTemplate}),a("ifx-template",{key:"6bdc0169f614ad628aa85888a8b4b5b805056e19",name:"template-02",thumbnail:this.wizardTemplate})))}static get assetsDirs(){return["assets"]}get el(){return s(this)}};r.style=i;export{r as ifx_templates_ui};
2
+ //# sourceMappingURL=p-c06b0a60.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as e,c as t,h as s,a}from"./p-PqnYwNKt.js";import{d as i,t as o}from"./p-DcmcuUOA.js";import{i as n}from"./p-Bw2fh5LT.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=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 a=this.getSegments();a.forEach((a=>{if(a.selected){if(a.segmentIndex!==e){a.selected=false;t=a.value}else{s=a.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}`)}))}async componentDidLoad(){if(!n(this.SegmentedControl)){const e=i();o("ifx-segmented-control",await e)}this.setActiveSegment()}render(){return s("div",{key:"7c7d870d32000a823ae2d365fb8b864d800ec9fe","aria-value":this.selectedValue,"aria-label":"segmented control",class:"group"},s("div",{key:"66e95707b6616e370e35cd98e4c3b89853b8501f",class:"group__label"},this.label.trim()),s("div",{key:"ab8c969a145fa9e1071ee12426a641034ff8be4d",class:"group__controls"},s("slot",{key:"849c4bdf76a0951d829820620813258553b8a6df"})),this.caption.trim()&&s("div",{key:"905c964392ca304634aba610f96c43a4e5b95eb9",class:"group__caption"},s("ifx-icon",{key:"42fb13f0a7170a7b36ea2a9c8afb1d3ba9d579c9",icon:"c-info-16"})," ",this.caption.trim()))}componentDidRender(){this.setSegmentSize()}get SegmentedControl(){return a(this)}};l.style=r;export{l as ifx_segmented_control};
2
+ //# sourceMappingURL=p-c75784ef.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["segmentedControlCss","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","componentDidLoad","isNestedInIfxComponent","framework","detectFramework","trackComponent","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 async componentDidLoad() {\n if(!isNestedInIfxComponent(this.SegmentedControl)) { \n const framework = detectFramework();\n trackComponent('ifx-segmented-control', await framework)\n }\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,gb,MCWfC,EAAgB,MAN7B,WAAAC,CAAAC,G,+CAWYC,KAAOC,QAAW,GAClBD,KAAKE,MAAW,GAChBF,KAAIG,KAAwB,UAS5BH,KAAaI,cAAW,EAgFnC,CAtFG,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,sBAAM0B,GACF,IAAIC,EAAuB9B,KAAKH,kBAAmB,CAC/C,MAAMkC,EAAYC,IAClBC,EAAe,8BAA+BF,E,CAElD/B,KAAKqB,kB,CAGT,MAAAa,GACI,OACIC,EAAiB,OAAAC,IAAA,wDAAApC,KAAKI,cAAa,aAAa,oBAAoBiC,MAAM,SACtEF,EAAK,OAAAC,IAAA,2CAAAC,MAAM,gBACLrC,KAAKE,MAAMoC,QAGjBH,EAAK,OAAAC,IAAA,2CAAAC,MAAM,mBACPF,EAAA,QAAAC,IAAA,8CAIApC,KAAKC,QAAQqC,QACbH,EAAK,OAAAC,IAAA,2CAAAC,MAAM,kBACPF,EAAU,YAAAC,IAAA,2CAAAG,KAAK,cAAuB,IAAGvC,KAAKC,QAAQqC,Q,CAO1E,kBAAAE,GACIxC,KAAKwB,gB","ignoreList":[]}
1
+ {"version":3,"names":["segmentedControlCss","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","componentDidLoad","isNestedInIfxComponent","framework","detectFramework","trackComponent","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 async componentDidLoad() {\n if(!isNestedInIfxComponent(this.SegmentedControl)) { \n const framework = detectFramework();\n trackComponent('ifx-segmented-control', await framework)\n }\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":"mIAAA,MAAMA,EAAsB,gb,MCWfC,EAAgB,MAN7B,WAAAC,CAAAC,G,+CAWYC,KAAOC,QAAW,GAClBD,KAAKE,MAAW,GAChBF,KAAIG,KAAwB,UAS5BH,KAAaI,cAAW,EAgFnC,CAtFG,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,sBAAM0B,GACF,IAAIC,EAAuB9B,KAAKH,kBAAmB,CAC/C,MAAMkC,EAAYC,IAClBC,EAAe,8BAA+BF,E,CAElD/B,KAAKqB,kB,CAGT,MAAAa,GACI,OACIC,EAAiB,OAAAC,IAAA,wDAAApC,KAAKI,cAAa,aAAa,oBAAoBiC,MAAM,SACtEF,EAAK,OAAAC,IAAA,2CAAAC,MAAM,gBACLrC,KAAKE,MAAMoC,QAGjBH,EAAK,OAAAC,IAAA,2CAAAC,MAAM,mBACPF,EAAA,QAAAC,IAAA,8CAIApC,KAAKC,QAAQqC,QACbH,EAAK,OAAAC,IAAA,2CAAAC,MAAM,kBACPF,EAAU,YAAAC,IAAA,2CAAAG,KAAK,cAAuB,IAAGvC,KAAKC,QAAQqC,Q,CAO1E,kBAAAE,GACIxC,KAAKwB,gB","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as e,h as t}from"./p-PqnYwNKt.js";const r=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}.step-wrapper{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;gap:8px;font:400 1rem/1.5rem "Source Sans 3"}.step-wrapper.vertical{flex-direction:row;gap:12px;width:unset;height:100%}.step-wrapper.vertical .step-icon-wrapper{flex-direction:column;width:unset;height:100%}.step-wrapper.compact{gap:0;max-width:100%}.step-wrapper.compact .step-label{max-width:100%;cursor:auto;align-self:flex-start}.step-wrapper.compact.indicator-left{align-items:flex-end;text-align:right}.step-wrapper.compact.indicator-right{align-items:flex-start}.step-wrapper .step-label{max-width:90%;color:#8D8786;word-wrap:break-word}.step-wrapper .step-label.curr-label{font:600 1.25rem/1.75rem "Source Sans 3"}.step-wrapper .step-label.next-label{font:400 0.75rem/1rem "Source Sans 3"}.step-wrapper .step-label :hover{color:#8D8786}.step-wrapper.first-step .step-connector-l{height:0px}.step-wrapper.last-step .step-connector-r{height:0px}.step-wrapper.vertical.first-step .step-connector-l,.step-wrapper.vertical.last-step .step-connector-r{width:0px}.step-wrapper.complete .step-connector-l,.step-wrapper.complete .step-connector-r,.step-wrapper.complete .step-icon{background:#0A8276}.step-wrapper.complete .step-connector-l.active,.step-wrapper.complete .step-connector-l.error,.step-wrapper.complete .step-connector-r.active,.step-wrapper.complete .step-connector-r.error,.step-wrapper.complete .step-icon.active,.step-wrapper.complete .step-icon.error{background:#8D8786}.step-wrapper.complete:not(.disabled) .step-label{cursor:pointer;color:#1D1D1D}.step-wrapper.complete:not(.disabled) .step-label :hover{color:#08665C}.step-wrapper.disabled .step-connector-l,.step-wrapper.disabled .step-connector-r,.step-wrapper.disabled .step-icon{background-color:#8D8786}.step-wrapper.disabled .step-label,.step-wrapper.disabled .step-label :hover{color:#8D8786}.step-wrapper.active .step-connector-l,.step-wrapper.active .step-connector-r,.step-wrapper.active .step-icon{background:#0A8276}.step-wrapper.active .step-connector-l.active,.step-wrapper.active .step-connector-l.error,.step-wrapper.active .step-connector-r.active,.step-wrapper.active .step-connector-r.error,.step-wrapper.active .step-icon.active,.step-wrapper.active .step-icon.error{background:#8D8786}.step-wrapper.active .step-label,.step-wrapper.active .step-label :hover{color:#1D1D1D}.step-wrapper.active.complete .step-label{cursor:auto}.step-wrapper.clickable:not(.active) .step-label{cursor:pointer}.step-wrapper.error:not(.active){color:#CD002F}.step-wrapper.error:not(.active) .step-label{color:#CD002F}.step-wrapper.error:not(.active) .step-label :hover{color:#0A8276}.step-wrapper.disabled .step-label{cursor:auto}.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-l,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-r,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-icon{background:#08665C}.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-l.active,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-l.error,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-r.active,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-r.error,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-icon.active,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-icon.error{background:#8D8786}.step-wrapper:hover.complete:not(.disabled):not(.active) .step-label{color:#08665C}.active-indic{width:16px;height:16px;border-radius:9999px;background:white}.step-icon-wrapper{display:flex;flex-direction:row;justify-content:center;align-items:center;width:100%}.step-icon{width:24px;height:24px;background-color:#8D8786;border-radius:9999px;display:flex;align-items:center;justify-content:center;color:white}.step-connector-r,.step-connector-l{height:2px;min-width:40px;flex-grow:1;background-color:#8D8786}.vertical .step-connector-r,.vertical .step-connector-l{height:unset;min-width:unset;width:2px;min-height:40px}';const p=class{constructor(t){e(this,t);this.complete=false;this.disabled=false;this.error=false;this.lastStep=false;this.stepId=1;this.stepperState={activeStep:1,showStepNumber:false,variant:"default",indicatorPosition:"left"};this.clickable=false}onStepChange(e){const t=e.detail.previousActiveStep;if(t===this.stepId&&this.error){this.clickable=true}}updateCurrentStep(e){this.active=e.activeStep===this.stepId}updateErrorState(){if(this.active){this.error=false}}handleStepClick(){if(!this.disabled&&this.stepperState.variant!=="compact"&&(this.clickable||this.complete)){this.stepperState.setActiveStep(this.stepId,true)}}handleStepKeyDown(e){if(!this.disabled&&this.stepperState.variant!=="compact"&&(this.clickable||this.complete)&&e.key==="Enter"){this.stepperState.setActiveStep(this.stepId,true)}}stopOnClickPropogation(e){if(this.disabled){e.stopPropagation()}}render(){return t("div",{key:"b2ecec640e24f22126224764a7e4d1c7a7dac3ba","aria-current":this.active?"step":false,"aria-disabled":this.active||this.complete?false:true,onClick:e=>this.stopOnClickPropogation(e),class:`step-wrapper ${this.stepId===1?"first-step":""} \n ${this.error?"error":""}\n ${this.stepperState.variant}\n ${this.complete?"complete":""}\n ${this.lastStep?"last-step":""}\n indicator-${this.stepperState.indicatorPosition}\n ${this.active?"active":""}\n ${this.clickable?"clickable":""}\n ${this.disabled?"disabled":""}`},t("div",{key:"5dbbdc125c8cdcc4d6de860bbbfdb013e80e644a",class:"step-icon-wrapper"},this.stepperState.variant!=="compact"&&t("span",{key:"4148afe26904aef359e8a8845b5396b4d6ba677a",class:"step-connector-l"}),this.stepperState.variant!=="compact"&&(!this.error||this.error&&this.active)&&t("div",{key:"bc8db67f548a9fddf566eaf362603b2345a79a42",class:"step-icon"},this.stepperState.showStepNumber&&!this.complete&&!this.active?this.stepId:"",this.complete&&!this.active&&t("ifx-icon",{key:"2863d3b3635f51c4d1e11e94ffebf69daf3d7c8c",icon:"check16"}),this.active&&t("span",{key:"980494be3dd4b3da9ef0b097ff35f2574eae9c5d",class:"active-indic"})),this.stepperState.variant!=="compact"&&this.error&&!this.active&&t("ifx-icon",{key:"6a70f401d995a158aa7640a6069fd62fc3e87331",icon:"warningF16"}),this.stepperState.variant!=="compact"&&t("span",{key:"e36043a53330c6cda9be71e284e10716615b4be6",class:`step-connector-r ${this.active?"active":""}`})),(this.stepperState.variant!=="compact"||this.stepperState.variant==="compact"&&(this.active||this.stepId===this.stepperState.activeStep+1))&&t("div",{key:"26bf1d17d85b8a37cf881dfdbfdbb0d1e78c3642",tabIndex:!this.disabled&&this.complete&&!this.active?0:-1,class:`step-label ${this.stepperState.variant==="compact"?this.active?"curr-label":"next-label":""}`,onClick:()=>{this.handleStepClick()},onKeyDown:e=>{this.handleStepKeyDown(e)}},this.stepperState.variant!=="compact"&&t("slot",{key:"d48ab802c4d9e17035cd92eaf49b0399cfa4fdbf"}),this.stepperState.variant==="compact"&&!this.active?"Next: ":"",this.stepperState.variant==="compact"&&t("slot",{key:"5dfc63c25d1d2039244cfb5d23b3686c95932dd6"})))}static get watchers(){return{stepperState:["updateCurrentStep"],active:["updateErrorState"]}}};p.style=r;export{p as ifx_step};
2
- //# sourceMappingURL=p-ae623793.entry.js.map
1
+ import{r as e,h as t}from"./p-PqnYwNKt.js";const r=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}.step-wrapper{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;gap:8px;font:400 1rem/1.5rem "Source Sans 3"}.step-wrapper.vertical{flex-direction:row;gap:12px;width:unset;height:100%}.step-wrapper.vertical .step-icon-wrapper{flex-direction:column;width:unset;height:100%}.step-wrapper.compact{gap:0;max-width:100%}.step-wrapper.compact .step-label{max-width:100%;cursor:auto;align-self:flex-start}.step-wrapper.compact.indicator-left{align-items:flex-end;text-align:right}.step-wrapper.compact.indicator-right{align-items:flex-start}.step-wrapper .step-label{max-width:90%;color:#8D8786;word-wrap:break-word}.step-wrapper .step-label.curr-label{font:600 1.25rem/1.75rem "Source Sans 3"}.step-wrapper .step-label.next-label{font:400 0.75rem/1rem "Source Sans 3"}.step-wrapper .step-label :hover{color:#8D8786}.step-wrapper.first-step .step-connector-l{height:0px}.step-wrapper.last-step .step-connector-r{height:0px}.step-wrapper.vertical.first-step .step-connector-l,.step-wrapper.vertical.last-step .step-connector-r{width:0px}.step-wrapper.complete .step-connector-l,.step-wrapper.complete .step-connector-r,.step-wrapper.complete .step-icon{background:#0A8276}.step-wrapper.complete .step-connector-l.active,.step-wrapper.complete .step-connector-l.error,.step-wrapper.complete .step-connector-r.active,.step-wrapper.complete .step-connector-r.error,.step-wrapper.complete .step-icon.active,.step-wrapper.complete .step-icon.error{background:#8D8786}.step-wrapper.complete:not(.disabled) .step-label{cursor:pointer;color:#1D1D1D}.step-wrapper.complete:not(.disabled) .step-label :hover{color:#08665C}.step-wrapper.disabled .step-connector-l,.step-wrapper.disabled .step-connector-r,.step-wrapper.disabled .step-icon{background-color:#8D8786}.step-wrapper.disabled .step-label,.step-wrapper.disabled .step-label :hover{color:#8D8786}.step-wrapper.active .step-connector-l,.step-wrapper.active .step-connector-r,.step-wrapper.active .step-icon{background:#0A8276}.step-wrapper.active .step-connector-l.active,.step-wrapper.active .step-connector-l.error,.step-wrapper.active .step-connector-r.active,.step-wrapper.active .step-connector-r.error,.step-wrapper.active .step-icon.active,.step-wrapper.active .step-icon.error{background:#8D8786}.step-wrapper.active .step-label,.step-wrapper.active .step-label :hover{color:#1D1D1D}.step-wrapper.active.complete .step-label{cursor:auto}.step-wrapper.clickable:not(.active) .step-label{cursor:pointer}.step-wrapper.error:not(.active){color:#CD002F}.step-wrapper.error:not(.active) .step-label{color:#CD002F}.step-wrapper.error:not(.active) .step-label :hover{color:#0A8276}.step-wrapper.disabled .step-label{cursor:auto}.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-l,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-r,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-icon{background:#08665C}.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-l.active,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-l.error,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-r.active,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-r.error,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-icon.active,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-icon.error{background:#8D8786}.step-wrapper:hover.complete:not(.disabled):not(.active) .step-label{color:#08665C}.active-indic{width:16px;height:16px;border-radius:9999px;background:white}.step-icon-wrapper{display:flex;flex-direction:row;justify-content:center;align-items:center;width:100%}.step-icon{width:24px;height:24px;background-color:#8D8786;border-radius:9999px;display:flex;align-items:center;justify-content:center;color:white}.step-connector-r,.step-connector-l{height:2px;min-width:40px;flex-grow:1;background-color:#8D8786}.vertical .step-connector-r,.vertical .step-connector-l{height:unset;min-width:unset;width:2px;min-height:40px}';const p=class{constructor(t){e(this,t);this.complete=false;this.disabled=false;this.error=false;this.lastStep=false;this.stepId=1;this.stepperState={activeStep:1,showStepNumber:false,variant:"default",indicatorPosition:"left"};this.clickable=false}onStepChange(e){const t=e.detail.previousActiveStep;if(t===this.stepId&&this.error){this.clickable=true}}updateCurrentStep(e){this.active=e.activeStep===this.stepId}updateErrorState(){if(this.active){this.error=false}}handleStepClick(){if(!this.disabled&&this.stepperState.variant!=="compact"&&(this.clickable||this.complete)){this.stepperState.setActiveStep(this.stepId,true)}}handleStepKeyDown(e){if(!this.disabled&&this.stepperState.variant!=="compact"&&(this.clickable||this.complete)&&e.key==="Enter"){this.stepperState.setActiveStep(this.stepId,true)}}stopOnClickPropogation(e){if(this.disabled){e.stopPropagation()}}render(){return t("div",{key:"dd6c17bea0cd62475732ea2c577cd102f77df8ba","aria-current":this.active?"step":false,"aria-disabled":this.active||this.complete?false:true,onClick:e=>this.stopOnClickPropogation(e),class:`step-wrapper ${this.stepId===1?"first-step":""} \n ${this.error?"error":""}\n ${this.stepperState.variant}\n ${this.complete?"complete":""}\n ${this.lastStep?"last-step":""}\n indicator-${this.stepperState.indicatorPosition}\n ${this.active?"active":""}\n ${this.clickable?"clickable":""}\n ${this.disabled?"disabled":""}`},t("div",{key:"d923bfda8089c8b2199d45acaaf6ac8c9fdeec5d",class:"step-icon-wrapper"},this.stepperState.variant!=="compact"&&t("span",{key:"13aac7c30b1dcd6ff7df11a4c58f4f9f156c01fc",class:"step-connector-l"}),this.stepperState.variant!=="compact"&&(!this.error||this.error&&this.active)&&t("div",{key:"35da868f3749271c369959b782e980dc95c3c92f",class:"step-icon"},this.stepperState.showStepNumber&&!this.complete&&!this.active?this.stepId:"",this.complete&&!this.active&&t("ifx-icon",{key:"4813fe9d028d7e1a25e7058cce5a79a76cba76f1",icon:"check16"}),this.active&&t("span",{key:"d0c1dbfed346671ca777606ffe5f3efe2016a170",class:"active-indic"})),this.stepperState.variant!=="compact"&&this.error&&!this.active&&t("ifx-icon",{key:"d5e56742186a732d1cf95069b8a61d59b8a68073",icon:"warningF16"}),this.stepperState.variant!=="compact"&&t("span",{key:"188cb1e005c83ad4abc3b05a0c8833968588628e",class:`step-connector-r ${this.active?"active":""}`})),(this.stepperState.variant!=="compact"||this.stepperState.variant==="compact"&&(this.active||this.stepId===this.stepperState.activeStep+1))&&t("div",{key:"4a60050301d4666815c6eb64d85d6a85459fb272",tabIndex:!this.disabled&&this.complete&&!this.active?0:-1,class:`step-label ${this.stepperState.variant==="compact"?this.active?"curr-label":"next-label":""}`,onClick:()=>{this.handleStepClick()},onKeyDown:e=>{this.handleStepKeyDown(e)}},this.stepperState.variant!=="compact"&&t("slot",{key:"cbd47999729966cc8858b41bb54608eab8aa30c7"}),this.stepperState.variant==="compact"&&!this.active?"Next: ":"",this.stepperState.variant==="compact"&&t("slot",{key:"acb8a199531960f67d7c9c78238c9510118d79ab"})))}static get watchers(){return{stepperState:["updateCurrentStep"],active:["updateErrorState"]}}};p.style=r;export{p as ifx_step};
2
+ //# sourceMappingURL=p-c863b508.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as s,c as i,h as t,a as e}from"./p-PqnYwNKt.js";import{d as n,t as o}from"./p-DcmcuUOA.js";import{i as r}from"./p-Bw2fh5LT.js";import{c as h}from"./p-DMLRPGid.js";import"./p-B85MJLTf.js";const a=':root {\n --ifx-font-family: "Source Sans 3", "Arial, sans-serif";\n}\n\n:host {\n display: flex;\n}\n\n.search-field {\n box-sizing: border-box;\n background-color: #FFFFFF;\n width: 100%;\n font-family: var(--ifx-font-family);\n position: relative;\n}\n.search-field .search-field__wrapper {\n box-sizing: border-box;\n height: 40px;\n display: flex;\n align-items: center;\n border: 1px solid #8D8786;\n border-radius: 1px;\n padding: 8px 16px;\n gap: 12px;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n position: relative;\n width: 100%;\n outline: none;\n color: #8D8786;\n}\n.search-field .search-field__wrapper.focused {\n border: 2px solid #0A8276;\n}\n.search-field .search-field__wrapper.focused ifx-icon {\n color: #575352;\n}\n.search-field .search-field__wrapper.search-field__wrapper-s {\n height: 36px;\n}\n.search-field .search-field__wrapper:hover:not(.focused, :focus) {\n border: 1px solid #3C3A39;\n}\n.search-field .search-field__wrapper:focus {\n outline: none;\n border: 2px solid #0A8276;\n}\n.search-field .search-field__wrapper .delete-icon {\n right: 12px;\n cursor: pointer;\n}\n.search-field .search-field__wrapper .delete-icon:focus {\n outline: none;\n border: 2px solid #0A8276;\n border-radius: 12px;\n}\n.search-field .search-field__wrapper input[type=text] {\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n color: #8D8786;\n border: none;\n width: 100%;\n outline: none;\n height: 16px;\n}\n.search-field .search-field__wrapper input[type=text]:focus {\n outline: none;\n color: #1d1d1d;\n}\n.search-field .search-field__wrapper input[type=text]:disabled {\n background-color: #EEEDED;\n}\n.search-field .search-field__wrapper:has(input[disabled]) {\n background-color: #EEEDED;\n}\n.search-field .suggestions-dropdown {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n background: #FFFFFF;\n margin-top: 4px;\n border: 1px solid #EEEDED;\n box-shadow: 0px 6px 9px 0px rgba(29, 29, 29, 0.1);\n z-index: 1000;\n max-height: 300px;\n overflow-y: auto;\n container-type: inline-size;\n}\n.search-field .suggestions-dropdown .suggestions-header {\n font-family: Source Sans 3;\n font-size: 0.8125rem;\n font-weight: 600;\n line-height: 1.25rem;\n letter-spacing: 0.25em;\n text-transform: uppercase;\n color: #575352;\n border-bottom: 1px solid #EEEDED;\n padding: 12px 16px;\n}\n.search-field .suggestions-dropdown .suggestion-item {\n padding: 12px 16px;\n cursor: pointer;\n transition: background-color 0.2s ease;\n}\n.search-field .suggestions-dropdown .suggestion-item:last-child {\n border-bottom: none;\n}\n.search-field .suggestions-dropdown .suggestion-item:hover, .search-field .suggestions-dropdown .suggestion-item--selected {\n background-color: #EEEDED;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-icon {\n color: #575352;\n flex-shrink: 0;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-icon--history {\n color: #575352;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text {\n flex: 1;\n display: flex;\n align-items: center;\n min-width: 0;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text .suggestion-main-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-shrink: 1;\n min-width: 0;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text .suggestion-scope {\n color: #8D8786;\n flex-shrink: 0;\n white-space: nowrap;\n margin-left: 2px;\n font-weight: 600;\n font-size: 0.75rem;\n}\n@container (max-width: 320px) {\n .search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text {\n flex-direction: column;\n align-items: flex-start;\n }\n .search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text .suggestion-main-text {\n width: 100%;\n max-width: 100%;\n }\n .search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text .suggestion-scope {\n margin-left: 0;\n margin-top: 0;\n width: 100%;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n flex-shrink: 1;\n }\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-count {\n color: #8D8786;\n margin-left: auto;\n flex-shrink: 0;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-delete-icon {\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.2s ease, visibility 0.2s ease;\n cursor: pointer;\n margin-left: auto;\n flex-shrink: 0;\n color: #575352;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-delete-icon:hover {\n color: #3C3A39;\n}\n.search-field .suggestions-dropdown .suggestion-item:hover .suggestion-delete-icon {\n opacity: 1;\n visibility: visible;\n}\n.search-field .search-field__wrapper.dropdown-open {\n border-radius: 1px 1px 0 0;\n border-color: #0A8276;\n}';const c=class{constructor(t){s(this,t);this.ifxInput=i(this,"ifxInput",7);this.ifxSuggestionRequested=i(this,"ifxSuggestionRequested",7);this.ifxSuggestionSelected=i(this,"ifxSuggestionSelected",7);this.ifxFocus=i(this,"ifxFocus",7);this.ifxBlur=i(this,"ifxBlur",7);this.value="";this.suggestions=[];this.showSuggestions=false;this.maxSuggestions=10;this.maxHistoryItems=5;this.enableHistory=true;this.historyKey="ifx-search-history";this.historyHeaderText="Recent Searches";this.ariaLabel="Search Field";this.deleteIconAriaLabel="Clear search";this.historyDeleteAriaLabel="Remove from history";this.dropdownAriaLabel="Search suggestions and history";this.suggestionAriaLabel="Search suggestion";this.historyItemAriaLabel="Search history item";this.showDropdown=false;this.filteredSuggestions=[];this.selectedSuggestionIndex=-1;this.searchHistory=[];this.showDeleteIcon=false;this.showDeleteIconInternalState=false;this.disabled=false;this.size="l";this.isFocused=false;this.placeholder="Search...";this.autocomplete="off";this.maxlength=null;this.focusEmitted=false;this.handleInput=()=>{const s=this.inputElement.value;this.value=s;this.ifxInput.emit(this.value);if(this.showSuggestions){this.showDropdown=true;this.selectedSuggestionIndex=-1;this.requestSuggestions(s)}};this.handleDelete=()=>{this.inputElement.value="";this.value="";this.ifxInput.emit(this.value);this.hideDropdown()};this.handleSearch=()=>{if(this.value.trim()&&this.enableHistory){if(this.filteredSuggestions.length>0){this.addToHistory(this.value)}}this.hideDropdown()};this.handleHistoryDelete=(s,i)=>{s.stopPropagation();this.removeFromHistory(i)}}handleOutsideClick(s){const i=s.composedPath();if(!i.includes(this.inputElement)&&!i.includes(this.dropdownElement)){this.hideDropdown()}}handleKeyDown(s){if(!this.showDropdown)return;switch(s.key){case"ArrowDown":s.preventDefault();this.navigateSuggestions(1);break;case"ArrowUp":s.preventDefault();this.navigateSuggestions(-1);break;case"Enter":s.preventDefault();if(this.selectedSuggestionIndex>=0){this.selectSuggestion(this.filteredSuggestions[this.selectedSuggestionIndex])}else{this.handleSearch()}break;case"Escape":this.hideDropdown();break}}valueWatcher(s){if(this.inputElement&&s!==this.inputElement.value){this.inputElement.value=s}this.updateSuggestions()}suggestionsWatcher(){this.updateSuggestions()}focusInput(){if(!this.focusEmitted){this.focusEmitted=true;this.isFocused=true;this.ifxFocus.emit()}if(this.showSuggestions){if(this.value.length===0){this.showHistoryDropdown();this.showDropdown=this.enableHistory&&this.searchHistory.length>0}else{this.updateSuggestions();this.showDropdown=this.filteredSuggestions.length>0}}}blurInput(){setTimeout((()=>{this.isFocused=false;this.focusEmitted=false;this.ifxBlur.emit()}),150)}loadSearchHistory(){if(this.enableHistory&&typeof localStorage!=="undefined"){const s=localStorage.getItem(this.historyKey);this.searchHistory=s?JSON.parse(s):[];this.updateSuggestions();if(this.value.length===0&&this.searchHistory.length===0){this.showDropdown=false}}}clearSearchHistory(){if(this.enableHistory&&typeof localStorage!=="undefined"){localStorage.removeItem(this.historyKey);this.searchHistory=[];this.filteredSuggestions=[];this.selectedSuggestionIndex=-1;this.showDropdown=false;this.updateSuggestions()}}addToHistory(s){if(!this.enableHistory||!s.trim())return;const i=[...this.searchHistory];const t=i.indexOf(s);if(t>-1){i.splice(t,1)}i.unshift(s);this.searchHistory=i.slice(0,this.maxHistoryItems);if(typeof localStorage!=="undefined"){localStorage.setItem(this.historyKey,JSON.stringify(this.searchHistory))}}removeFromHistory(s){if(!this.enableHistory)return;const i=[...this.searchHistory];const t=i.indexOf(s);if(t>-1){i.splice(t,1);this.searchHistory=i;if(typeof localStorage!=="undefined"){localStorage.setItem(this.historyKey,JSON.stringify(this.searchHistory))}this.updateSuggestions();if(this.searchHistory.length===0&&this.value.length===0){this.showDropdown=false}}}requestSuggestions(s){this.ifxSuggestionRequested.emit(s);this.updateSuggestions()}updateSuggestions(){const s=this.value.toLowerCase();let i=[];if(s.length>0){if(this.suggestions&&this.suggestions.length>0){const t=this.suggestions.filter((i=>i.text.toLowerCase().includes(s)));i=[...i,...t]}if(this.enableHistory&&this.searchHistory.length>0){const t=this.searchHistory.filter((i=>i.toLowerCase().includes(s))).map(((s,i)=>({id:`history-${i}`,text:s,type:"history"})));i=[...i,...t]}i.sort(((i,t)=>{const e=i.text.toLowerCase();const n=t.text.toLowerCase();if(e===s&&n!==s)return-1;if(n===s&&e!==s)return 1;const o=e.startsWith(s);const r=n.startsWith(s);if(o&&!r)return-1;if(r&&!o)return 1;if(i.type==="suggestion"&&t.type==="history")return-1;if(i.type==="history"&&t.type==="suggestion")return 1;return e.localeCompare(n)}))}else{if(this.enableHistory&&this.searchHistory.length>0){const s=this.searchHistory.map(((s,i)=>({id:`history-${i}`,text:s,type:"history"})));i=s}}const t=i.reduce(((s,i)=>{const t=s.findIndex((s=>s.text.toLowerCase()===i.text.toLowerCase()&&s.scope===i.scope));if(t===-1){s.push(i)}else{if(i.type==="history"&&s[t].type!=="history"){s[t]=i}}return s}),[]);this.filteredSuggestions=t.slice(0,this.maxSuggestions);this.selectedSuggestionIndex=-1}navigateSuggestions(s){const i=this.filteredSuggestions.length-1;if(s>0){this.selectedSuggestionIndex=this.selectedSuggestionIndex<i?this.selectedSuggestionIndex+1:0}else{this.selectedSuggestionIndex=this.selectedSuggestionIndex>0?this.selectedSuggestionIndex-1:i}}selectSuggestion(s){this.value=s.text;this.inputElement.value=s.text;this.ifxSuggestionSelected.emit(s);this.ifxInput.emit(this.value);if(this.enableHistory){this.addToHistory(s.text)}this.hideDropdown()}hideDropdown(){this.showDropdown=false;this.selectedSuggestionIndex=-1;this.isFocused=false}showHistoryDropdown(){if(this.enableHistory&&this.searchHistory.length>0){const s=this.searchHistory.map(((s,i)=>({id:`history-${i}`,text:s,type:"history"})));this.filteredSuggestions=s.slice(0,this.maxSuggestions);this.selectedSuggestionIndex=-1}else{this.filteredSuggestions=[]}}isShowingOnlyHistory(){return this.value.length===0&&this.filteredSuggestions.length>0&&this.filteredSuggestions.every((s=>s.type==="history"))}renderHighlightedText(s,i){if(!i||i.length===0){return s}const e=s.toLowerCase();const n=i.toLowerCase();const o=e.indexOf(n);if(o===-1){return s}const r=s.substring(0,o);const h=s.substring(o,o+i.length);const a=s.substring(o+i.length);return[r,t("strong",null,h),a]}componentWillLoad(){this.loadSearchHistory()}async componentDidLoad(){if(!r(this.el)){const s=n();o("ifx-search-field",await s)}}componentWillUpdate(){if(this.value!==""){this.showDeleteIconInternalState=true}else this.showDeleteIconInternalState=false}render(){return t("div",{key:"b4b6e9c1fffb8a7f3a10bf48748441eaa71ac311","aria-disabled":this.disabled,"aria-value":this.value,class:"search-field"},t("div",{key:"711fd0df34e33f1ac62d2e0824238f57a7d63344",class:this.getWrapperClassNames(),tabindex:1,onClick:()=>this.focusInput()},t("ifx-icon",{key:"23ecf2888cf2be969bb021798ebfc73063f3ace3",icon:"search-16",class:"search-icon"}),t("input",{key:"ae313bce4320f7959359b4f63b0cc551f614418b",ref:s=>this.inputElement=s,type:"text",autocomplete:this.autocomplete,onInput:()=>this.handleInput(),onFocus:()=>this.focusInput(),onBlur:()=>this.blurInput(),placeholder:this.placeholder,disabled:this.disabled,maxlength:this.maxlength,value:this.value,role:"combobox","aria-expanded":this.showDropdown,"aria-autocomplete":"list","aria-haspopup":"listbox","aria-label":this.ariaLabel,"aria-labelledby":this.ariaLabelledBy,"aria-describedby":this.ariaDescribedBy,"aria-owns":this.showDropdown?"suggestions-dropdown":undefined,"aria-activedescendant":this.selectedSuggestionIndex>=0?`suggestion-${this.selectedSuggestionIndex}`:undefined}),this.showDeleteIcon&&this.showDeleteIconInternalState?t("ifx-icon",{icon:"cRemove16",class:"delete-icon",onClick:this.handleDelete,role:"button",tabindex:"0","aria-label":this.deleteIconAriaLabel,onKeyDown:s=>{if(s.key==="Enter"||s.key===" "){s.preventDefault();this.handleDelete()}}}):null),this.showDropdown&&this.filteredSuggestions.length>0&&t("div",{key:"914f35ac4df83db311423c761c33629caf9e1fb2",ref:s=>this.dropdownElement=s,id:"suggestions-dropdown",class:"suggestions-dropdown",role:"listbox","aria-label":this.dropdownAriaLabel},this.isShowingOnlyHistory()&&t("div",{key:"cdec95092cee646c785b9f9cb049b28a8071fb6a",class:"suggestions-header"},this.historyHeaderText),this.filteredSuggestions.map(((s,i)=>t("div",{key:s.id,id:`suggestion-${i}`,class:this.getSuggestionClassNames(i),role:"option","aria-selected":i===this.selectedSuggestionIndex,"aria-label":`${s.type==="history"?this.historyItemAriaLabel:this.suggestionAriaLabel}: ${s.text}${s.scope?`, ${s.scope}`:""}${s.resultCount?`, ${s.resultCount} results`:""}`,onClick:()=>this.selectSuggestion(s),onMouseEnter:()=>this.selectedSuggestionIndex=i},t("div",{class:"suggestion-content"},s.type==="history"&&t("ifx-icon",{icon:"history-16",class:"suggestion-icon suggestion-icon--history"}),s.type==="suggestion"&&t("ifx-icon",{icon:"search-16",class:"suggestion-icon suggestion-icon--suggestion"}),t("span",{class:"suggestion-text"},t("span",{class:"suggestion-main-text"},this.renderHighlightedText(s.text,this.value)),s.scope&&t("span",{class:"suggestion-scope"},"– ",s.scope)),s.resultCount!==undefined&&s.scope&&t("span",{class:"suggestion-count"},s.resultCount),s.type==="history"&&t("ifx-icon",{icon:"cross16",class:"suggestion-delete-icon",role:"button",tabindex:"0","aria-label":`${this.historyDeleteAriaLabel}: ${s.text}`,onClick:i=>this.handleHistoryDelete(i,s.text),onKeyDown:i=>{if(i.key==="Enter"||i.key===" "){i.preventDefault();this.handleHistoryDelete(i,s.text)}}})))))))}getSizeClass(){return`${this.size}`==="s"?"search-field__wrapper-s":""}getWrapperClassNames(){return h(`search-field__wrapper`,`search-field__wrapper ${this.getSizeClass()}`,`${this.isFocused?"focused":""}`,`${this.showDropdown?"dropdown-open":""}`)}getSuggestionClassNames(s){var i;return h("suggestion-item",{"suggestion-item--selected":s===this.selectedSuggestionIndex,"suggestion-item--history":((i=this.filteredSuggestions[s])===null||i===void 0?void 0:i.type)==="history"})}get el(){return e(this)}static get watchers(){return{value:["valueWatcher"],suggestions:["suggestionsWatcher"]}}};c.style=a;export{c as ifx_search_field};
2
- //# sourceMappingURL=p-a4d53b78.entry.js.map
1
+ import{r as s,c as i,h as t,a as e}from"./p-PqnYwNKt.js";import{d as n,t as o}from"./p-DcmcuUOA.js";import{i as r}from"./p-Bw2fh5LT.js";import{c as h}from"./p-DMLRPGid.js";import"./p-B85MJLTf.js";const a=':root {\n --ifx-font-family: "Source Sans 3", "Arial, sans-serif";\n}\n\n:host {\n display: flex;\n}\n\n.search-field {\n box-sizing: border-box;\n background-color: #FFFFFF;\n width: 100%;\n font-family: var(--ifx-font-family);\n position: relative;\n}\n.search-field .search-field__wrapper {\n box-sizing: border-box;\n height: 40px;\n display: flex;\n align-items: center;\n border: 1px solid #8D8786;\n border-radius: 1px;\n padding: 8px 16px;\n gap: 12px;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n position: relative;\n width: 100%;\n outline: none;\n color: #8D8786;\n}\n.search-field .search-field__wrapper.focused {\n border: 2px solid #0A8276;\n}\n.search-field .search-field__wrapper.focused ifx-icon {\n color: #575352;\n}\n.search-field .search-field__wrapper.search-field__wrapper-s {\n height: 36px;\n}\n.search-field .search-field__wrapper:hover:not(.focused, :focus) {\n border: 1px solid #3C3A39;\n}\n.search-field .search-field__wrapper:focus {\n outline: none;\n border: 2px solid #0A8276;\n}\n.search-field .search-field__wrapper .delete-icon {\n right: 12px;\n cursor: pointer;\n}\n.search-field .search-field__wrapper .delete-icon:focus {\n outline: none;\n border: 2px solid #0A8276;\n border-radius: 12px;\n}\n.search-field .search-field__wrapper input[type=text] {\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n color: #8D8786;\n border: none;\n width: 100%;\n outline: none;\n height: 16px;\n}\n.search-field .search-field__wrapper input[type=text]:focus {\n outline: none;\n color: #1d1d1d;\n}\n.search-field .search-field__wrapper input[type=text]:disabled {\n background-color: #EEEDED;\n}\n.search-field .search-field__wrapper:has(input[disabled]) {\n background-color: #EEEDED;\n}\n.search-field .suggestions-dropdown {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n background: #FFFFFF;\n margin-top: 4px;\n border: 1px solid #EEEDED;\n box-shadow: 0px 6px 9px 0px rgba(29, 29, 29, 0.1);\n z-index: 1000;\n max-height: 300px;\n overflow-y: auto;\n container-type: inline-size;\n}\n.search-field .suggestions-dropdown .suggestions-header {\n font-family: Source Sans 3;\n font-size: 0.8125rem;\n font-weight: 600;\n line-height: 1.25rem;\n letter-spacing: 0.25em;\n text-transform: uppercase;\n color: #575352;\n border-bottom: 1px solid #EEEDED;\n padding: 12px 16px;\n}\n.search-field .suggestions-dropdown .suggestion-item {\n padding: 12px 16px;\n cursor: pointer;\n transition: background-color 0.2s ease;\n}\n.search-field .suggestions-dropdown .suggestion-item:last-child {\n border-bottom: none;\n}\n.search-field .suggestions-dropdown .suggestion-item:hover, .search-field .suggestions-dropdown .suggestion-item--selected {\n background-color: #EEEDED;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-icon {\n color: #575352;\n flex-shrink: 0;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-icon--history {\n color: #575352;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text {\n flex: 1;\n display: flex;\n align-items: center;\n min-width: 0;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text .suggestion-main-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-shrink: 1;\n min-width: 0;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text .suggestion-scope {\n color: #8D8786;\n flex-shrink: 0;\n white-space: nowrap;\n margin-left: 2px;\n font-weight: 600;\n font-size: 0.75rem;\n}\n@container (max-width: 320px) {\n .search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text {\n flex-direction: column;\n align-items: flex-start;\n }\n .search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text .suggestion-main-text {\n width: 100%;\n max-width: 100%;\n }\n .search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text .suggestion-scope {\n margin-left: 0;\n margin-top: 0;\n width: 100%;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n flex-shrink: 1;\n }\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-count {\n color: #8D8786;\n margin-left: auto;\n flex-shrink: 0;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-delete-icon {\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.2s ease, visibility 0.2s ease;\n cursor: pointer;\n margin-left: auto;\n flex-shrink: 0;\n color: #575352;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-delete-icon:hover {\n color: #3C3A39;\n}\n.search-field .suggestions-dropdown .suggestion-item:hover .suggestion-delete-icon {\n opacity: 1;\n visibility: visible;\n}\n.search-field .search-field__wrapper.dropdown-open {\n border-radius: 1px 1px 0 0;\n border-color: #0A8276;\n}';const c=class{constructor(t){s(this,t);this.ifxInput=i(this,"ifxInput",7);this.ifxSuggestionRequested=i(this,"ifxSuggestionRequested",7);this.ifxSuggestionSelected=i(this,"ifxSuggestionSelected",7);this.ifxFocus=i(this,"ifxFocus",7);this.ifxBlur=i(this,"ifxBlur",7);this.value="";this.suggestions=[];this.showSuggestions=false;this.maxSuggestions=10;this.maxHistoryItems=5;this.enableHistory=true;this.historyKey="ifx-search-history";this.historyHeaderText="Recent Searches";this.ariaLabel="Search Field";this.deleteIconAriaLabel="Clear search";this.historyDeleteAriaLabel="Remove from history";this.dropdownAriaLabel="Search suggestions and history";this.suggestionAriaLabel="Search suggestion";this.historyItemAriaLabel="Search history item";this.showDropdown=false;this.filteredSuggestions=[];this.selectedSuggestionIndex=-1;this.searchHistory=[];this.showDeleteIcon=false;this.showDeleteIconInternalState=false;this.disabled=false;this.size="l";this.isFocused=false;this.placeholder="Search...";this.autocomplete="off";this.maxlength=null;this.focusEmitted=false;this.handleInput=()=>{const s=this.inputElement.value;this.value=s;this.ifxInput.emit(this.value);if(this.showSuggestions){this.showDropdown=true;this.selectedSuggestionIndex=-1;this.requestSuggestions(s)}};this.handleDelete=()=>{this.inputElement.value="";this.value="";this.ifxInput.emit(this.value);this.hideDropdown()};this.handleSearch=()=>{if(this.value.trim()&&this.enableHistory){if(this.filteredSuggestions.length>0){this.addToHistory(this.value)}}this.hideDropdown()};this.handleHistoryDelete=(s,i)=>{s.stopPropagation();this.removeFromHistory(i)}}handleOutsideClick(s){const i=s.composedPath();if(!i.includes(this.inputElement)&&!i.includes(this.dropdownElement)){this.hideDropdown()}}handleKeyDown(s){if(!this.showDropdown)return;switch(s.key){case"ArrowDown":s.preventDefault();this.navigateSuggestions(1);break;case"ArrowUp":s.preventDefault();this.navigateSuggestions(-1);break;case"Enter":s.preventDefault();if(this.selectedSuggestionIndex>=0){this.selectSuggestion(this.filteredSuggestions[this.selectedSuggestionIndex])}else{this.handleSearch()}break;case"Escape":this.hideDropdown();break}}valueWatcher(s){if(this.inputElement&&s!==this.inputElement.value){this.inputElement.value=s}this.updateSuggestions()}suggestionsWatcher(){this.updateSuggestions()}focusInput(){if(!this.focusEmitted){this.focusEmitted=true;this.isFocused=true;this.ifxFocus.emit()}if(this.showSuggestions){if(this.value.length===0){this.showHistoryDropdown();this.showDropdown=this.enableHistory&&this.searchHistory.length>0}else{this.updateSuggestions();this.showDropdown=this.filteredSuggestions.length>0}}}blurInput(){setTimeout((()=>{this.isFocused=false;this.focusEmitted=false;this.ifxBlur.emit()}),150)}loadSearchHistory(){if(this.enableHistory&&typeof localStorage!=="undefined"){const s=localStorage.getItem(this.historyKey);this.searchHistory=s?JSON.parse(s):[];this.updateSuggestions();if(this.value.length===0&&this.searchHistory.length===0){this.showDropdown=false}}}clearSearchHistory(){if(this.enableHistory&&typeof localStorage!=="undefined"){localStorage.removeItem(this.historyKey);this.searchHistory=[];this.filteredSuggestions=[];this.selectedSuggestionIndex=-1;this.showDropdown=false;this.updateSuggestions()}}addToHistory(s){if(!this.enableHistory||!s.trim())return;const i=[...this.searchHistory];const t=i.indexOf(s);if(t>-1){i.splice(t,1)}i.unshift(s);this.searchHistory=i.slice(0,this.maxHistoryItems);if(typeof localStorage!=="undefined"){localStorage.setItem(this.historyKey,JSON.stringify(this.searchHistory))}}removeFromHistory(s){if(!this.enableHistory)return;const i=[...this.searchHistory];const t=i.indexOf(s);if(t>-1){i.splice(t,1);this.searchHistory=i;if(typeof localStorage!=="undefined"){localStorage.setItem(this.historyKey,JSON.stringify(this.searchHistory))}this.updateSuggestions();if(this.searchHistory.length===0&&this.value.length===0){this.showDropdown=false}}}requestSuggestions(s){this.ifxSuggestionRequested.emit(s);this.updateSuggestions()}updateSuggestions(){const s=this.value.toLowerCase();let i=[];if(s.length>0){if(this.suggestions&&this.suggestions.length>0){const t=this.suggestions.filter((i=>i.text.toLowerCase().includes(s)));i=[...i,...t]}if(this.enableHistory&&this.searchHistory.length>0){const t=this.searchHistory.filter((i=>i.toLowerCase().includes(s))).map(((s,i)=>({id:`history-${i}`,text:s,type:"history"})));i=[...i,...t]}i.sort(((i,t)=>{const e=i.text.toLowerCase();const n=t.text.toLowerCase();if(e===s&&n!==s)return-1;if(n===s&&e!==s)return 1;const o=e.startsWith(s);const r=n.startsWith(s);if(o&&!r)return-1;if(r&&!o)return 1;if(i.type==="suggestion"&&t.type==="history")return-1;if(i.type==="history"&&t.type==="suggestion")return 1;return e.localeCompare(n)}))}else{if(this.enableHistory&&this.searchHistory.length>0){const s=this.searchHistory.map(((s,i)=>({id:`history-${i}`,text:s,type:"history"})));i=s}}const t=i.reduce(((s,i)=>{const t=s.findIndex((s=>s.text.toLowerCase()===i.text.toLowerCase()&&s.scope===i.scope));if(t===-1){s.push(i)}else{if(i.type==="history"&&s[t].type!=="history"){s[t]=i}}return s}),[]);this.filteredSuggestions=t.slice(0,this.maxSuggestions);this.selectedSuggestionIndex=-1}navigateSuggestions(s){const i=this.filteredSuggestions.length-1;if(s>0){this.selectedSuggestionIndex=this.selectedSuggestionIndex<i?this.selectedSuggestionIndex+1:0}else{this.selectedSuggestionIndex=this.selectedSuggestionIndex>0?this.selectedSuggestionIndex-1:i}}selectSuggestion(s){this.value=s.text;this.inputElement.value=s.text;this.ifxSuggestionSelected.emit(s);this.ifxInput.emit(this.value);if(this.enableHistory){this.addToHistory(s.text)}this.hideDropdown()}hideDropdown(){this.showDropdown=false;this.selectedSuggestionIndex=-1;this.isFocused=false}showHistoryDropdown(){if(this.enableHistory&&this.searchHistory.length>0){const s=this.searchHistory.map(((s,i)=>({id:`history-${i}`,text:s,type:"history"})));this.filteredSuggestions=s.slice(0,this.maxSuggestions);this.selectedSuggestionIndex=-1}else{this.filteredSuggestions=[]}}isShowingOnlyHistory(){return this.value.length===0&&this.filteredSuggestions.length>0&&this.filteredSuggestions.every((s=>s.type==="history"))}renderHighlightedText(s,i){if(!i||i.length===0){return s}const e=s.toLowerCase();const n=i.toLowerCase();const o=e.indexOf(n);if(o===-1){return s}const r=s.substring(0,o);const h=s.substring(o,o+i.length);const a=s.substring(o+i.length);return[r,t("strong",null,h),a]}componentWillLoad(){this.loadSearchHistory()}async componentDidLoad(){if(!r(this.el)){const s=n();o("ifx-search-field",await s)}}componentWillUpdate(){if(this.value!==""){this.showDeleteIconInternalState=true}else this.showDeleteIconInternalState=false}render(){return t("div",{key:"1464337ac84aa2707e9c17d6d21af2087253c233","aria-disabled":this.disabled,"aria-value":this.value,class:"search-field"},t("div",{key:"d7bace664f3b66a42feff790959c83d3cd86fbe0",class:this.getWrapperClassNames(),tabindex:1,onClick:()=>this.focusInput()},t("ifx-icon",{key:"deb5c77cf9ebde1146afdffc5279b260da4f757a",icon:"search-16",class:"search-icon"}),t("input",{key:"cc247404c0d78ca0e8d163e9a1b315abd279f093",ref:s=>this.inputElement=s,type:"text",autocomplete:this.autocomplete,onInput:()=>this.handleInput(),onFocus:()=>this.focusInput(),onBlur:()=>this.blurInput(),placeholder:this.placeholder,disabled:this.disabled,maxlength:this.maxlength,value:this.value,role:"combobox","aria-expanded":this.showDropdown,"aria-autocomplete":"list","aria-haspopup":"listbox","aria-label":this.ariaLabel,"aria-labelledby":this.ariaLabelledBy,"aria-describedby":this.ariaDescribedBy,"aria-owns":this.showDropdown?"suggestions-dropdown":undefined,"aria-activedescendant":this.selectedSuggestionIndex>=0?`suggestion-${this.selectedSuggestionIndex}`:undefined}),this.showDeleteIcon&&this.showDeleteIconInternalState?t("ifx-icon",{icon:"cRemove16",class:"delete-icon",onClick:this.handleDelete,role:"button",tabindex:"0","aria-label":this.deleteIconAriaLabel,onKeyDown:s=>{if(s.key==="Enter"||s.key===" "){s.preventDefault();this.handleDelete()}}}):null),this.showDropdown&&this.filteredSuggestions.length>0&&t("div",{key:"641b84e82bd07d44f6a657ac4e3af27af33f868a",ref:s=>this.dropdownElement=s,id:"suggestions-dropdown",class:"suggestions-dropdown",role:"listbox","aria-label":this.dropdownAriaLabel},this.isShowingOnlyHistory()&&t("div",{key:"66dbc2db67478154a79cc6a10796086e0ce819c3",class:"suggestions-header"},this.historyHeaderText),this.filteredSuggestions.map(((s,i)=>t("div",{key:s.id,id:`suggestion-${i}`,class:this.getSuggestionClassNames(i),role:"option","aria-selected":i===this.selectedSuggestionIndex,"aria-label":`${s.type==="history"?this.historyItemAriaLabel:this.suggestionAriaLabel}: ${s.text}${s.scope?`, ${s.scope}`:""}${s.resultCount?`, ${s.resultCount} results`:""}`,onClick:()=>this.selectSuggestion(s),onMouseEnter:()=>this.selectedSuggestionIndex=i},t("div",{class:"suggestion-content"},s.type==="history"&&t("ifx-icon",{icon:"history-16",class:"suggestion-icon suggestion-icon--history"}),s.type==="suggestion"&&t("ifx-icon",{icon:"search-16",class:"suggestion-icon suggestion-icon--suggestion"}),t("span",{class:"suggestion-text"},t("span",{class:"suggestion-main-text"},this.renderHighlightedText(s.text,this.value)),s.scope&&t("span",{class:"suggestion-scope"},"– ",s.scope)),s.resultCount!==undefined&&s.scope&&t("span",{class:"suggestion-count"},s.resultCount),s.type==="history"&&t("ifx-icon",{icon:"cross16",class:"suggestion-delete-icon",role:"button",tabindex:"0","aria-label":`${this.historyDeleteAriaLabel}: ${s.text}`,onClick:i=>this.handleHistoryDelete(i,s.text),onKeyDown:i=>{if(i.key==="Enter"||i.key===" "){i.preventDefault();this.handleHistoryDelete(i,s.text)}}})))))))}getSizeClass(){return`${this.size}`==="s"?"search-field__wrapper-s":""}getWrapperClassNames(){return h(`search-field__wrapper`,`search-field__wrapper ${this.getSizeClass()}`,`${this.isFocused?"focused":""}`,`${this.showDropdown?"dropdown-open":""}`)}getSuggestionClassNames(s){var i;return h("suggestion-item",{"suggestion-item--selected":s===this.selectedSuggestionIndex,"suggestion-item--history":((i=this.filteredSuggestions[s])===null||i===void 0?void 0:i.type)==="history"})}get el(){return e(this)}static get watchers(){return{value:["valueWatcher"],suggestions:["suggestionsWatcher"]}}};c.style=a;export{c as ifx_search_field};
2
+ //# sourceMappingURL=p-cc0309cc.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,c as i,h as t,a as s}from"./p-PqnYwNKt.js";import{d as a,t as n}from"./p-DcmcuUOA.js";import{i as l}from"./p-Bw2fh5LT.js";const r=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:inline-block}.chip{position:relative}.chip__wrapper{display:inline-flex;align-items:center;justify-content:center;gap:8px;box-sizing:border-box;border:1px solid #BFBBBB;border-radius:9999px;background:#FFFFFF;cursor:pointer;transition:border 100ms ease;font:400 0.875rem/1.25rem "Source Sans 3"}.chip__wrapper:hover,.chip__wrapper:focus-visible{outline:none;border:1px solid #575352}.chip__wrapper:focus{border:1px solid #0A8276}.chip__wrapper.chip__wrapper--small{padding:4px 12px}.chip__wrapper.chip__wrapper--large{padding:8px 16px}.chip__wrapper.chip__wrapper--opened{border:1px solid #0A8276}.chip__wrapper.chip__wrapper--opened .wrapper__open-button{transform:rotate(-180deg)}.chip__wrapper.chip__wrapper--selected{outline:3px solid #0A8276;outline-offset:-3px;color:#0A8276}.chip__wrapper.chip__wrapper--selected:hover,.chip__wrapper.chip__wrapper--selected:focus-visible{outline:3px solid #08665C;color:#08665C}.wrapper__label{display:inline-flex;align-items:center;gap:4px;font:400 0.875rem/1.25rem "Source Sans 3"}.wrapper__label .label__selected-options{font:600 0.875rem/1.25rem "Source Sans 3"}.wrapper__open-button{display:flex;align-items:center;transition:all 300ms ease}.wrapper__unselect-button{display:flex;align-items:center}.chip__dropdown{position:absolute;z-index:1;box-shadow:0px 6px 9px 0px rgba(29, 29, 29, 0.1019607843);border:1px solid #EEEDED;border-radius:1px;padding:8px 0;min-width:222px;background-color:#FFFFFF}';const c=class{constructor(t){e(this,t);this.ifxChange=i(this,"ifxChange",7);this.placeholder="";this.size="large";this.value=undefined;this.variant="single";this.readOnly=false;this.opened=false;this.selectedOptions=[]}handleValueChange(e){this.syncSelectedOptionsWithProp(e)}handleReadOnlyChange(e){if(e){this.opened=false}}closeDropdownOnOutsideClick(e){const i=e.composedPath();const t=this.chip.shadowRoot.querySelector(".chip__wrapper");const s=this.chip.shadowRoot.querySelector(".chip__dropdown");if(!i.includes(s)&&!i.includes(t)&&this.opened){this.toggleDropdownMenu()}}handleKeyDown(e){if(e.code!=="Tab"){e.preventDefault()}if(e.target.tagName==="IFX-CHIP"){this.handleWrapperKeyDown(e)}else if(e.target.tagName==="IFX-CHIP-ITEM"){this.handleDropdownKeyDown(e)}}updateSelectedOptions(e){const i=e.detail;const t=[...this.selectedOptions];if(this.variant!=="multi"){if(i.selected){this.opened=false;const t=this.getChipItems();t.forEach((i=>{if(i.selected&&i!==e.target){i.chipState=Object.assign(Object.assign({},i.chipState),{emitIfxChipItemSelect:false});i.selected=false}}));this.selectedOptions=[i]}else{this.selectedOptions=[]}this.value=this.selectedOptions[0]?this.selectedOptions[0].value:undefined}else{if(i.selected){if(!this.selectedOptions.find((e=>e.value===i.value))){this.selectedOptions=[...this.selectedOptions,i]}}else{this.selectedOptions=this.selectedOptions.filter((e=>e.value!==i.value))}this.value=this.selectedOptions.map((e=>e.value))}if(i.emitIfxChange){this.ifxChange.emit({previousSelection:t,currentSelection:this.selectedOptions,name:this.placeholder})}}getChipItems(){return this.chip.querySelectorAll("ifx-chip-item")}getSelectedOptions(){if(this.variant!=="multi"){return this.selectedOptions.map((e=>e.label)).join("")}return this.selectedOptions.slice(0,2).map((e=>e.label)).join(", ")}toggleDropdownMenu(){if(this.readOnly)return;this.opened=!this.opened}focusChipItemAt(e=0){this.opened=true;const i=this.getChipItems();let t;if(e===-1){t=i.item(i.length-1)}else if(e>=0&&e<i.length){t=i.item(e)}else{console.error(`Invalid index: ${e}`);return}const s=t.shadowRoot.querySelector(".chip-item");if(s){setTimeout((()=>{s.focus()}),1)}}focusChip(){const e=this.chip.shadowRoot.querySelector(".chip__wrapper");e.focus()}handleUnselectButtonClick(e){e.stopPropagation();this.opened=false;let i=false;const t=this.getChipItems();t.forEach((e=>{if(e.selected){i=true;e.chipState=Object.assign(Object.assign({},e.chipState),{emitIfxChipItemSelect:false});e.selected=false}}));if(i){const e=this.selectedOptions;this.selectedOptions=[];this.value=[];this.ifxChange.emit({previousSelection:e,currentSelection:[],name:this.placeholder})}}handleWrapperClick(){if(!this.readOnly){this.toggleDropdownMenu()}}handleWrapperKeyDown(e){if(this.readOnly)return;if(!this.opened){switch(e.code){case"Space":case"Enter":case"ArrowDown":this.focusChipItemAt(0);break;case"ArrowUp":this.focusChipItemAt(-1);break}}else{switch(e.code){case"Escape":this.opened=false;this.focusChip();break}}}handleDropdownKeyDown(e){let i=this.getChipItems();let t=Array.from(i).indexOf(e.target);if(t===-1){console.error("Target not found in chip items");return}switch(e.code){case"ArrowDown":if(t===i.length-1)break;this.focusChipItemAt(t+1);break;case"ArrowUp":if(t===0)break;this.focusChipItemAt(t-1);break;case"Escape":this.opened=false;this.focusChip();break;case"Space":if(this.variant==="single"){this.opened=false;this.focusChip()}break;case"Enter":this.opened=false;this.focusChip();break}}syncChipState(){const e=this.getChipItems();let i=0;e.forEach((e=>{e.chipState={emitIfxChipItemSelect:true,size:this.size==="small"?"small":"large",variant:this.variant==="multi"?"multi":"single",key:i++}}))}syncSelectedOptionsWithProp(e){this.selectedOptions=[];const i=(()=>{let e=0;return()=>e++})();if(Array.isArray(e)){this.selectedOptions=e.map((e=>({value:e,label:e,selected:true,key:i(),emitIfxChange:true})))}else if(typeof e==="string"){this.selectedOptions=[{value:e,label:e,selected:true,key:i(),emitIfxChange:true}]}this.syncChipState()}componentWillLoad(){this.syncSelectedOptionsWithProp(this.value)}async componentDidLoad(){if(!l(this.chip)){const e=a();n("ifx-chip",await e)}}render(){return t("div",{key:"c91add8c4af1fa4ec84184992969deefa67d3feb",class:"chip"},t("div",{key:"cc35edda151d00c7a7670859806f9678057d941e",class:`chip__wrapper chip__wrapper--${this.size==="small"?"small":"large"}\n chip__wrapper--${this.variant==="multi"?"multi":"single"}\n ${this.opened&&!this.readOnly?"chip__wrapper--opened":""}\n ${this.selectedOptions.length?"chip__wrapper--selected":""}`,tabIndex:0,onClick:!this.readOnly?()=>{this.handleWrapperClick()}:undefined,role:"combobox","aria-label":this.ariaLabel,"aria-value":this.getSelectedOptions(),"aria-haspopup":!this.readOnly?"listbox":undefined,"aria-expanded":!this.readOnly?this.opened.toString():undefined,"aria-controls":!this.readOnly?"dropdown":undefined,"aria-readonly":this.readOnly?"true":undefined,"aria-multiselectable":this.variant==="multi"?"true":undefined},t("div",{key:"a9c1790c753340227ee88a059f63d9c260705eb8",class:"wrapper__label"},this.selectedOptions.length===0&&`${this.placeholder}`,this.selectedOptions.length!==0&&(this.variant==="multi"||this.readOnly)&&this.placeholder!==""&&`${this.placeholder}:`,this.selectedOptions.length!==0&&t("div",{key:"4d797db98446a87c02944bd7650445d78f637e5d",class:"label__selected-options"},this.getSelectedOptions()),this.selectedOptions.length>2&&this.variant==="multi"&&t("ifx-indicator",{key:"9a3576fa06fbcac135b20a0ba2337832b168d28a",variant:"number",number:this.selectedOptions.length-2})),!this.readOnly&&(this.variant!=="multi"||this.variant==="multi"&&this.selectedOptions.length===0)&&t("div",{key:"678d1ba8227d543feb3da142d78e3c4bc5de1b32",class:"wrapper__open-button"},t("ifx-icon",{key:1,icon:`chevron-down-16`})),this.variant!=="multi"&&this.readOnly!==false&&this.selectedOptions.length>0&&t("div",{key:"d4856bfa3359a008797712a9391281303edb0dd8",class:"wrapper__unselect-button",onClick:e=>{this.handleUnselectButtonClick(e)}},t("ifx-icon",{key:2,icon:`cross16`})),this.selectedOptions.length>=1&&this.variant==="multi"&&t("div",{key:"059b498f687e043e70e1194de3d1c1a3a124409e",class:"wrapper__unselect-button",onClick:e=>{this.handleUnselectButtonClick(e)}},t("ifx-icon",{key:2,icon:`cross16`}))),this.opened&&!this.readOnly&&t("div",{key:"628c7180e6f8257942c79b24e254f6924910f115",id:"dropdown",role:"listbox",class:"chip__dropdown"},t("slot",{key:"373297c8235e4748e822da674a0488060bb9c228"})))}get chip(){return s(this)}static get watchers(){return{value:["handleValueChange"],readOnly:["handleReadOnlyChange"]}}};c.style=r;const h=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}.chip-item{display:flex;align-items:center;gap:8px;padding:8px 16px;user-select:none;transition:all 100ms ease;transition-property:background, color}.chip-item:hover{cursor:pointer;background-color:#EEEDED}.chip-item:active{background-color:#BFBBBB}.chip-item:focus{outline:2px solid #0A8276}.chip-item.chip-item--large{font:400 1rem/1.5rem "Source Sans 3"}.chip-item.chip-item--small{font:400 0.875rem/1.25rem "Source Sans 3"}.chip-item.chip-item--selected{color:#0A8276}.chip-item.chip-item--selected .chip-item__selected-indicator{display:block}.chip-item__selected-indicator{display:none;margin-left:auto}';const o=class{constructor(t){e(this,t);this.ifxChipItemSelect=i(this,"ifxChipItemSelect",5);this.value=undefined;this.chipState={emitIfxChipItemSelect:true,variant:"multi",size:"large"};this.selected=false}updateItemSelection(e){if(this.chipState.variant==="single"){const i=e.target;if(this.chipItem!==i&&this.chipItem.parentElement===i.parentElement){this.selected=false}}}validateSelected(e,i){if(e!==i){if(this.chipState.emitIfxChipItemSelect){this.emitIfxChipItemSelectEvent()}else{this.chipState.emitIfxChipItemSelect=true}}}getItemLabel(){return this.chipItem.innerText}toggleItemSelection(){this.selected=!this.selected}emitIfxChipItemSelectEvent(e=true){this.ifxChipItemSelect.emit({emitIfxChange:e,key:this.chipState.key,label:this.getItemLabel(),selected:this.selected,value:this.value})}handleItemClick(){this.toggleItemSelection()}handleItemKeyDown(e){if(e.code==="Enter"||e.code==="Space"){this.toggleItemSelection()}}handleSelectedState(){if(this.selected){this.emitIfxChipItemSelectEvent(false)}}componentWillLoad(){this.handleSelectedState()}render(){return t("div",{key:"0feac58e2e7104e948633503bb6e1e41a7933963",class:`chip-item chip-item--${this.chipState.size} \n chip-item--${(this.selected&&this.chipState.variant)==="single"?"selected":""}`,tabIndex:0,onClick:()=>{this.handleItemClick()},onKeyDown:e=>{this.handleItemKeyDown(e)},role:"option","aria-selected":this.selected.toString()},this.chipState.variant==="multi"&&t("ifx-checkbox",{key:"5bff8f27bda9843ffbad86fed014e6f5b1df3b9c",checked:this.selected,tabIndex:-1,size:"s"}),t("div",{key:"e4ed1025410e1821e1549d8f29f7cc6c5ba57a2d",class:"chip-item__label"}," ",t("slot",{key:"541c9acff7c19e816f75cea1d17de319eefb8536"})," "),t("div",{key:"e5fc6f9e1d1e40bcc2ac591f2e550abcffa4cdad",class:"chip-item__selected-indicator"},t("ifx-icon",{key:"24c75f1d1eb8927d5193875aacda59ce9117e0df",icon:"check-16"}," ")))}get chipItem(){return s(this)}static get watchers(){return{selected:["validateSelected"]}}};o.style=h;const p='@charset "UTF-8";:root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:inline-flex}.container{display:inline-flex;justify-content:center;align-items:center;gap:32px;font-family:var(--ifx-font-family)}.container .items__per-page-wrapper{display:flex;align-items:center;gap:16px}.container .items__per-page-wrapper .items__per-page-label{color:#1D1D1D;font-size:14px;font-style:normal;font-weight:600;line-height:20px}.container .items__per-page-wrapper .items__per-page-field{display:flex;flex-direction:column;align-items:flex-start}.container .items__per-page-wrapper .items__per-page-field ifx-select{width:92px}.container .items__total-wrapper{display:flex;justify-content:center;align-items:center;gap:12px}.container .items__total-wrapper .items__total-button{display:flex;width:40px;height:40px;justify-content:center;align-items:center;border-radius:100px;border:1px solid #BFBBBB;background:#FFF}.container .items__total-wrapper .page__numbers-wrapper{display:flex;justify-content:center;align-items:center;gap:12px}.container .items__total-wrapper .page__numbers-wrapper .page__number-item{display:flex;padding:6px;flex-direction:column;justify-content:center;align-items:center;gap:10px;border-radius:100px}.container .items__total-wrapper .page__numbers-wrapper .page__number-item.active{background-color:#0A8276}.container .items__total-wrapper .page__numbers-wrapper .page__number-item.active span{color:#fff}.container .items__total-wrapper .page__numbers-wrapper .page__number-item:hover{cursor:pointer}.container .items__total-wrapper .page__numbers-wrapper .page__number-item:hover:not(.active){background-color:#ddd}.container .items__total-wrapper .page__numbers-wrapper .page__number-item:active:not(.active){background-color:#575352}.container .items__total-wrapper .page__numbers-wrapper .page__number-item span{display:flex;width:16px;height:16px;flex-direction:column;justify-content:center;color:#1D1D1D;text-align:center;font-size:13px;font-style:normal;font-weight:400;line-height:20px}.pagination{display:flex}.pagination ifx-icon-button:first-of-type{margin-right:12px}.pagination ifx-icon-button:last-of-type{margin-left:12px}a{padding:8px;border-radius:100px}ol{list-style-type:none;padding:0;margin:0;display:inline-flex;align-items:center;gap:12px}li{display:flex;flex-direction:column;justify-content:center;align-items:center;border-radius:100px}li:hover:not(.active) a{background-color:#EEEDED}li:active:not(.active) a{background-color:#575352;color:#fff}li.active{background-color:#0A8276}li.active a{color:#fff}li:hover{cursor:pointer}li a{text-decoration:none;display:flex;width:16px;height:16px;flex-direction:column;justify-content:center;color:#1D1D1D;text-align:center;font-size:13px;font-style:normal;font-weight:400;line-height:20px;align-items:center}.prev.disabled,.next.disabled{cursor:default}.prev.disabled:hover,.next.disabled:hover{cursor:default;text-decoration:none}.prev{margin-right:2.5px}.next{margin-left:2.5px}@media (min-width: 400px){li:first-child,li.active-sibling,li.active,li.active+li,li:last-child{display:inline-flex !important;flex-direction:row}li:first-child:nth-last-child(n+8)~li{display:none}li:first-child:nth-last-child(n+8)~li.active-sibling:before{content:"…";font-size:13px;display:inline-block;margin-right:6px}li:first-child:nth-last-child(n+8)~li.active+li:after{content:"…";font-size:13px;display:inline-block;margin-left:6px}li:first-child:nth-last-child(n+8)~li:nth-last-child(-n+5){display:inline-flex;flex-direction:row}li:first-child:nth-last-child(n+8)~li:nth-last-child(5):before{content:"…";font-size:13px;display:inline-block;margin-right:6px}li:first-child:nth-last-child(n+8)~li:nth-child(-n+2):before,li:first-child:nth-last-child(n+8)~li:nth-child(-n+2):after,li:first-child:nth-last-child(n+8)~li:nth-last-child(-n+2):before,li:first-child:nth-last-child(n+8)~li:nth-last-child(-n+2):after,li:first-child:nth-last-child(n+8)~li.active-sibling:nth-last-child(-n+4):before,li:first-child:nth-last-child(n+8)~li.active-sibling:nth-last-child(-n+4):after{display:none !important}li:first-child:nth-last-child(n+8).active~li:nth-last-child(-n+5),li:first-child:nth-last-child(n+8)~li.active~li:nth-last-child(-n+5){display:none}li:first-child:nth-last-child(n+8).active~li:nth-last-child(-n+5):before,li:first-child:nth-last-child(n+8)~li.active~li:nth-last-child(-n+5):before{display:none}li:first-child:nth-last-child(n+8).active~li:nth-child(-n+5),li:first-child:nth-last-child(n+8)~li.active~li:nth-child(-n+5){display:inline-flex !important;flex-direction:row}li:first-child:nth-last-child(n+8).active~li:nth-child(-n+4):after,li:first-child:nth-last-child(n+8)~li.active~li:nth-child(-n+4):after{display:none}li:first-child:nth-last-child(n+8).active~li:nth-child(5):after,li:first-child:nth-last-child(n+8)~li.active~li:nth-child(5):after{content:"…";font-size:13px;display:inline-block;margin-left:6px}li:first-child:nth-last-child(n+8).active:before,li:first-child:nth-last-child(n+8).active:after,li:first-child:nth-last-child(n+8)~li.active:before,li:first-child:nth-last-child(n+8)~li.active:after{display:none}}';const d=class{constructor(t){e(this,t);this.ifxPageChange=i(this,"ifxPageChange",7);this.ifxItemsPerPageChange=i(this,"ifxItemsPerPageChange",7);this.currentPage=1;this.internalPage=1;this.internalItemsPerPage=10;this.numberOfPages=[];this.total=1;this.filteredItemsPerPage=[];this.visiblePages=[];this.CLASS_DISABLED="disabled";this.CLASS_ACTIVE="active";this.handlePageClick=e=>{const i=e.currentTarget;const t=parseInt(i.dataset.page);if(!isNaN(t))this.changePage(t)}}watchTotalHandler(){this.calculateNumberOfPages();this.updateVisiblePages()}currentPageWatcher(e){this.internalPage=Math.max(1,Math.min(e,this.numberOfPages.length));this.calculateNumberOfPages();this.updateVisiblePages()}setItemsPerPage(e){var i,t;const s=((i=e.detail)===null||i===void 0?void 0:i.value)||((t=e.detail)===null||t===void 0?void 0:t.label);const a=parseInt(s)||10;if(a===this.internalItemsPerPage){return}this.internalItemsPerPage=a;this.internalPage=1;this.calculateNumberOfPages();this.updateVisiblePages();this.handleEventEmission()}emitItemsPerPage(e){this.ifxItemsPerPageChange.emit(e.detail.label)}async componentDidLoad(){const e=this.el.shadowRoot.querySelector("#itemsPerPageSelect");if(e){e.addEventListener("ifxSelect",(e=>this.emitItemsPerPage(e)))}if(!l(this.el)){const e=a();n("ifx-pagination",await e)}this.initPagination()}disconnectedCallback(){const e=this.el.shadowRoot.querySelector("#itemsPerPageSelect");if(e){e.removeEventListener("ifxSelect",(e=>this.emitItemsPerPage(e)))}}updateVisiblePages(){const e=2;const i=this.numberOfPages.length;const t=this.internalPage;let s=[];if(i<=5){s=[...this.numberOfPages]}else{s.push(1);if(t>e+1)s.push("...");let a=Math.max(2,t-e);let n=Math.min(i-1,t+e);if(t<=e+1)n=e*2+1;if(t>=i-e)a=i-e*2;for(let e=a;e<=n;e++)s.push(e);if(t<i-e)s.push("...");s.push(i)}this.visiblePages=[...new Set(s)]}calculateNumberOfPages(){const e=Math.ceil(this.total/this.internalItemsPerPage);this.numberOfPages=Array.from({length:e},((e,i)=>i+1));this.internalPage=Math.max(1,Math.min(this.currentPage,e))}filterOptionsArray(){const e=typeof this.itemsPerPage==="string"?JSON.parse(this.itemsPerPage):this.itemsPerPage;this.filteredItemsPerPage=e.map((e=>Object.assign(Object.assign({},e),{label:e.label||e.value})))}componentWillLoad(){this.filterOptionsArray();const e=this.filteredItemsPerPage.find((e=>e.selected));if(e){this.internalItemsPerPage=Number(e.value)}else if(this.filteredItemsPerPage.length>0){this.internalItemsPerPage=Number(this.filteredItemsPerPage[0].value)}this.calculateNumberOfPages();this.internalPage=Math.max(1,Math.min(this.currentPage,this.numberOfPages.length));this.updateVisiblePages()}componentWillUpdate(){if(this.prevInternalPage!==this.internalPage){this.updateVisiblePages();this.prevInternalPage=this.internalPage}}componentDidUpdate(){this.initPagination()}handleEventEmission(){this.ifxPageChange.emit({currentPage:this.internalPage,totalPages:this.numberOfPages.length,itemsPerPage:this.internalItemsPerPage})}initPagination(){const e=this.el.shadowRoot.querySelector(".pagination");if(!e)return;const i=()=>{const i=e.querySelector(".prev");const t=e.querySelector(".next");if(i){i.disabled=this.internalPage===1;i.classList.toggle(this.CLASS_DISABLED,this.internalPage===1)}if(t){t.disabled=this.internalPage===this.numberOfPages.length;t.classList.toggle(this.CLASS_DISABLED,this.internalPage===this.numberOfPages.length)}};e.querySelectorAll("li").forEach((e=>{e.removeEventListener("click",this.handlePageClick);e.addEventListener("click",this.handlePageClick)}));i()}changePage(e){e=Math.max(1,Math.min(e,this.numberOfPages.length));if(e===this.internalPage)return;this.internalPage=e;this.handleEventEmission();this.initPagination()}render(){return t("div",{key:"572be4f9e025b9cbf558caca6b13d96836403c91",class:"container"},t("div",{key:"29d403aa753ff37aa30ae2eac8fb0979e91d5c2c",class:"items__per-page-wrapper"},t("div",{key:"a94ea5e6167216a8d60220d1ccd290a14ad66459",class:"items__per-page-label"},"Results per Page"),t("div",{key:"c11dbf5ca3f8146964145d46e64345d93d7dedf8",class:"items__per-page-field"},t("ifx-select",{key:"717e5d66e5790d52901d2f0d6b060fee129c3a78",id:"itemsPerPageSelect",placeholder:"false","show-search":"false",value:undefined,disabled:false,error:false,size:"s",options:this.filteredItemsPerPage,"placeholder-value":"Select"}))),t("div",{key:"79f8c4298d3e8b33911eb7d3199fd71498ab1b14",class:"items__total-wrapper"},t("div",{key:"ba8fb1aa5607423ec9adabfb7843e66772988c77",class:"pagination"},t("ifx-icon-button",{key:"83bbd7d2a1283cdfc65ee50b073ce17107276921",class:"prev",icon:"arrow-left-16",onClick:()=>this.changePage(this.internalPage-1)}),t("ol",{key:"366dc5ab48edce7bf02e312887d5fa3d2d9b65d5"},this.visiblePages.map(((e,i)=>typeof e==="number"?t("li",{key:`page-${e}`,class:{[this.CLASS_ACTIVE]:e===this.internalPage},"data-page":e},t("a",{href:"javascript:void(0)"},e)):t("li",{class:"ellipsis",key:`ellipsis-${i}`},t("span",null,"..."))))),t("ifx-icon-button",{key:"0aad1b8c94d0ed31b75ff0d2f89680c078000a70",class:"next",icon:"arrow-right-16",onClick:()=>this.changePage(this.internalPage+1)}))))}get el(){return s(this)}static get watchers(){return{total:["watchTotalHandler"],currentPage:["currentPageWatcher"]}}};d.style=p;export{c as ifx_chip,o as ifx_chip_item,d as ifx_pagination};
2
- //# sourceMappingURL=p-2845216b.entry.js.map
1
+ import{r as e,c as i,h as t,a as s}from"./p-PqnYwNKt.js";import{d as a,t as n}from"./p-DcmcuUOA.js";import{i as l}from"./p-Bw2fh5LT.js";const r=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:inline-block}.chip{position:relative}.chip__wrapper{display:inline-flex;align-items:center;justify-content:center;gap:8px;box-sizing:border-box;border:1px solid #BFBBBB;border-radius:9999px;background:#FFFFFF;cursor:pointer;transition:border 100ms ease;font:400 0.875rem/1.25rem "Source Sans 3"}.chip__wrapper:hover,.chip__wrapper:focus-visible{outline:none;border:1px solid #575352}.chip__wrapper:focus{border:1px solid #0A8276}.chip__wrapper.chip__wrapper--small{padding:4px 12px}.chip__wrapper.chip__wrapper--large{padding:8px 16px}.chip__wrapper.chip__wrapper--opened{border:1px solid #0A8276}.chip__wrapper.chip__wrapper--opened .wrapper__open-button{transform:rotate(-180deg)}.chip__wrapper.chip__wrapper--selected{outline:3px solid #0A8276;outline-offset:-3px;color:#0A8276}.chip__wrapper.chip__wrapper--selected:hover,.chip__wrapper.chip__wrapper--selected:focus-visible{outline:3px solid #08665C;color:#08665C}.wrapper__label{display:inline-flex;align-items:center;gap:4px;font:400 0.875rem/1.25rem "Source Sans 3"}.wrapper__label .label__selected-options{font:600 0.875rem/1.25rem "Source Sans 3"}.wrapper__open-button{display:flex;align-items:center;transition:all 300ms ease}.wrapper__unselect-button{display:flex;align-items:center}.chip__dropdown{position:absolute;z-index:1;box-shadow:0px 6px 9px 0px rgba(29, 29, 29, 0.1019607843);border:1px solid #EEEDED;border-radius:1px;padding:8px 0;min-width:222px;background-color:#FFFFFF}';const c=class{constructor(t){e(this,t);this.ifxChange=i(this,"ifxChange",7);this.placeholder="";this.size="large";this.value=undefined;this.variant="single";this.readOnly=false;this.opened=false;this.selectedOptions=[]}handleValueChange(e){this.syncSelectedOptionsWithProp(e)}handleReadOnlyChange(e){if(e){this.opened=false}}closeDropdownOnOutsideClick(e){const i=e.composedPath();const t=this.chip.shadowRoot.querySelector(".chip__wrapper");const s=this.chip.shadowRoot.querySelector(".chip__dropdown");if(!i.includes(s)&&!i.includes(t)&&this.opened){this.toggleDropdownMenu()}}handleKeyDown(e){if(e.code!=="Tab"){e.preventDefault()}if(e.target.tagName==="IFX-CHIP"){this.handleWrapperKeyDown(e)}else if(e.target.tagName==="IFX-CHIP-ITEM"){this.handleDropdownKeyDown(e)}}updateSelectedOptions(e){const i=e.detail;const t=[...this.selectedOptions];if(this.variant!=="multi"){if(i.selected){this.opened=false;const t=this.getChipItems();t.forEach((i=>{if(i.selected&&i!==e.target){i.chipState=Object.assign(Object.assign({},i.chipState),{emitIfxChipItemSelect:false});i.selected=false}}));this.selectedOptions=[i]}else{this.selectedOptions=[]}this.value=this.selectedOptions[0]?this.selectedOptions[0].value:undefined}else{if(i.selected){if(!this.selectedOptions.find((e=>e.value===i.value))){this.selectedOptions=[...this.selectedOptions,i]}}else{this.selectedOptions=this.selectedOptions.filter((e=>e.value!==i.value))}this.value=this.selectedOptions.map((e=>e.value))}if(i.emitIfxChange){this.ifxChange.emit({previousSelection:t,currentSelection:this.selectedOptions,name:this.placeholder})}}getChipItems(){return this.chip.querySelectorAll("ifx-chip-item")}getSelectedOptions(){if(this.variant!=="multi"){return this.selectedOptions.map((e=>e.label)).join("")}return this.selectedOptions.slice(0,2).map((e=>e.label)).join(", ")}toggleDropdownMenu(){if(this.readOnly)return;this.opened=!this.opened}focusChipItemAt(e=0){this.opened=true;const i=this.getChipItems();let t;if(e===-1){t=i.item(i.length-1)}else if(e>=0&&e<i.length){t=i.item(e)}else{console.error(`Invalid index: ${e}`);return}const s=t.shadowRoot.querySelector(".chip-item");if(s){setTimeout((()=>{s.focus()}),1)}}focusChip(){const e=this.chip.shadowRoot.querySelector(".chip__wrapper");e.focus()}handleUnselectButtonClick(e){e.stopPropagation();this.opened=false;let i=false;const t=this.getChipItems();t.forEach((e=>{if(e.selected){i=true;e.chipState=Object.assign(Object.assign({},e.chipState),{emitIfxChipItemSelect:false});e.selected=false}}));if(i){const e=this.selectedOptions;this.selectedOptions=[];this.value=[];this.ifxChange.emit({previousSelection:e,currentSelection:[],name:this.placeholder})}}handleWrapperClick(){if(!this.readOnly){this.toggleDropdownMenu()}}handleWrapperKeyDown(e){if(this.readOnly)return;if(!this.opened){switch(e.code){case"Space":case"Enter":case"ArrowDown":this.focusChipItemAt(0);break;case"ArrowUp":this.focusChipItemAt(-1);break}}else{switch(e.code){case"Escape":this.opened=false;this.focusChip();break}}}handleDropdownKeyDown(e){let i=this.getChipItems();let t=Array.from(i).indexOf(e.target);if(t===-1){console.error("Target not found in chip items");return}switch(e.code){case"ArrowDown":if(t===i.length-1)break;this.focusChipItemAt(t+1);break;case"ArrowUp":if(t===0)break;this.focusChipItemAt(t-1);break;case"Escape":this.opened=false;this.focusChip();break;case"Space":if(this.variant==="single"){this.opened=false;this.focusChip()}break;case"Enter":this.opened=false;this.focusChip();break}}syncChipState(){const e=this.getChipItems();let i=0;e.forEach((e=>{e.chipState={emitIfxChipItemSelect:true,size:this.size==="small"?"small":"large",variant:this.variant==="multi"?"multi":"single",key:i++}}))}syncSelectedOptionsWithProp(e){this.selectedOptions=[];const i=(()=>{let e=0;return()=>e++})();if(Array.isArray(e)){this.selectedOptions=e.map((e=>({value:e,label:e,selected:true,key:i(),emitIfxChange:true})))}else if(typeof e==="string"){this.selectedOptions=[{value:e,label:e,selected:true,key:i(),emitIfxChange:true}]}this.syncChipState()}componentWillLoad(){this.syncSelectedOptionsWithProp(this.value)}async componentDidLoad(){if(!l(this.chip)){const e=a();n("ifx-chip",await e)}}render(){return t("div",{key:"c91add8c4af1fa4ec84184992969deefa67d3feb",class:"chip"},t("div",{key:"cc35edda151d00c7a7670859806f9678057d941e",class:`chip__wrapper chip__wrapper--${this.size==="small"?"small":"large"}\n chip__wrapper--${this.variant==="multi"?"multi":"single"}\n ${this.opened&&!this.readOnly?"chip__wrapper--opened":""}\n ${this.selectedOptions.length?"chip__wrapper--selected":""}`,tabIndex:0,onClick:!this.readOnly?()=>{this.handleWrapperClick()}:undefined,role:"combobox","aria-label":this.ariaLabel,"aria-value":this.getSelectedOptions(),"aria-haspopup":!this.readOnly?"listbox":undefined,"aria-expanded":!this.readOnly?this.opened.toString():undefined,"aria-controls":!this.readOnly?"dropdown":undefined,"aria-readonly":this.readOnly?"true":undefined,"aria-multiselectable":this.variant==="multi"?"true":undefined},t("div",{key:"a9c1790c753340227ee88a059f63d9c260705eb8",class:"wrapper__label"},this.selectedOptions.length===0&&`${this.placeholder}`,this.selectedOptions.length!==0&&(this.variant==="multi"||this.readOnly)&&this.placeholder!==""&&`${this.placeholder}:`,this.selectedOptions.length!==0&&t("div",{key:"4d797db98446a87c02944bd7650445d78f637e5d",class:"label__selected-options"},this.getSelectedOptions()),this.selectedOptions.length>2&&this.variant==="multi"&&t("ifx-indicator",{key:"9a3576fa06fbcac135b20a0ba2337832b168d28a",variant:"number",number:this.selectedOptions.length-2})),!this.readOnly&&(this.variant!=="multi"||this.variant==="multi"&&this.selectedOptions.length===0)&&t("div",{key:"678d1ba8227d543feb3da142d78e3c4bc5de1b32",class:"wrapper__open-button"},t("ifx-icon",{key:1,icon:`chevron-down-16`})),this.variant!=="multi"&&this.readOnly!==false&&this.selectedOptions.length>0&&t("div",{key:"d4856bfa3359a008797712a9391281303edb0dd8",class:"wrapper__unselect-button",onClick:e=>{this.handleUnselectButtonClick(e)}},t("ifx-icon",{key:2,icon:`cross16`})),this.selectedOptions.length>=1&&this.variant==="multi"&&t("div",{key:"059b498f687e043e70e1194de3d1c1a3a124409e",class:"wrapper__unselect-button",onClick:e=>{this.handleUnselectButtonClick(e)}},t("ifx-icon",{key:2,icon:`cross16`}))),this.opened&&!this.readOnly&&t("div",{key:"628c7180e6f8257942c79b24e254f6924910f115",id:"dropdown",role:"listbox",class:"chip__dropdown"},t("slot",{key:"373297c8235e4748e822da674a0488060bb9c228"})))}get chip(){return s(this)}static get watchers(){return{value:["handleValueChange"],readOnly:["handleReadOnlyChange"]}}};c.style=r;const h=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}.chip-item{display:flex;align-items:center;gap:8px;padding:8px 16px;user-select:none;transition:all 100ms ease;transition-property:background, color}.chip-item:hover{cursor:pointer;background-color:#EEEDED}.chip-item:active{background-color:#BFBBBB}.chip-item:focus{outline:2px solid #0A8276}.chip-item.chip-item--large{font:400 1rem/1.5rem "Source Sans 3"}.chip-item.chip-item--small{font:400 0.875rem/1.25rem "Source Sans 3"}.chip-item.chip-item--selected{color:#0A8276}.chip-item.chip-item--selected .chip-item__selected-indicator{display:block}.chip-item__selected-indicator{display:none;margin-left:auto}';const o=class{constructor(t){e(this,t);this.ifxChipItemSelect=i(this,"ifxChipItemSelect",5);this.value=undefined;this.chipState={emitIfxChipItemSelect:true,variant:"multi",size:"large"};this.selected=false}updateItemSelection(e){if(this.chipState.variant==="single"){const i=e.target;if(this.chipItem!==i&&this.chipItem.parentElement===i.parentElement){this.selected=false}}}validateSelected(e,i){if(e!==i){if(this.chipState.emitIfxChipItemSelect){this.emitIfxChipItemSelectEvent()}else{this.chipState.emitIfxChipItemSelect=true}}}getItemLabel(){return this.chipItem.innerText}toggleItemSelection(){this.selected=!this.selected}emitIfxChipItemSelectEvent(e=true){this.ifxChipItemSelect.emit({emitIfxChange:e,key:this.chipState.key,label:this.getItemLabel(),selected:this.selected,value:this.value})}handleItemClick(){this.toggleItemSelection()}handleItemKeyDown(e){if(e.code==="Enter"||e.code==="Space"){this.toggleItemSelection()}}handleSelectedState(){if(this.selected){this.emitIfxChipItemSelectEvent(false)}}componentWillLoad(){this.handleSelectedState()}render(){return t("div",{key:"0feac58e2e7104e948633503bb6e1e41a7933963",class:`chip-item chip-item--${this.chipState.size} \n chip-item--${(this.selected&&this.chipState.variant)==="single"?"selected":""}`,tabIndex:0,onClick:()=>{this.handleItemClick()},onKeyDown:e=>{this.handleItemKeyDown(e)},role:"option","aria-selected":this.selected.toString()},this.chipState.variant==="multi"&&t("ifx-checkbox",{key:"5bff8f27bda9843ffbad86fed014e6f5b1df3b9c",checked:this.selected,tabIndex:-1,size:"s"}),t("div",{key:"e4ed1025410e1821e1549d8f29f7cc6c5ba57a2d",class:"chip-item__label"}," ",t("slot",{key:"541c9acff7c19e816f75cea1d17de319eefb8536"})," "),t("div",{key:"e5fc6f9e1d1e40bcc2ac591f2e550abcffa4cdad",class:"chip-item__selected-indicator"},t("ifx-icon",{key:"24c75f1d1eb8927d5193875aacda59ce9117e0df",icon:"check-16"}," ")))}get chipItem(){return s(this)}static get watchers(){return{selected:["validateSelected"]}}};o.style=h;const p='@charset "UTF-8";:root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:inline-flex}.container{display:inline-flex;justify-content:center;align-items:center;gap:32px;font-family:var(--ifx-font-family)}.container .items__per-page-wrapper{display:flex;align-items:center;gap:16px}.container .items__per-page-wrapper .items__per-page-label{color:#1D1D1D;font-size:14px;font-style:normal;font-weight:600;line-height:20px}.container .items__per-page-wrapper .items__per-page-field{display:flex;flex-direction:column;align-items:flex-start}.container .items__per-page-wrapper .items__per-page-field ifx-select{width:92px}.container .items__total-wrapper{display:flex;justify-content:center;align-items:center;gap:12px}.container .items__total-wrapper .items__total-button{display:flex;width:40px;height:40px;justify-content:center;align-items:center;border-radius:100px;border:1px solid #BFBBBB;background:#FFF}.container .items__total-wrapper .page__numbers-wrapper{display:flex;justify-content:center;align-items:center;gap:12px}.container .items__total-wrapper .page__numbers-wrapper .page__number-item{display:flex;padding:6px;flex-direction:column;justify-content:center;align-items:center;gap:10px;border-radius:100px}.container .items__total-wrapper .page__numbers-wrapper .page__number-item.active{background-color:#0A8276}.container .items__total-wrapper .page__numbers-wrapper .page__number-item.active span{color:#fff}.container .items__total-wrapper .page__numbers-wrapper .page__number-item:hover{cursor:pointer}.container .items__total-wrapper .page__numbers-wrapper .page__number-item:hover:not(.active){background-color:#ddd}.container .items__total-wrapper .page__numbers-wrapper .page__number-item:active:not(.active){background-color:#575352}.container .items__total-wrapper .page__numbers-wrapper .page__number-item span{display:flex;width:16px;height:16px;flex-direction:column;justify-content:center;color:#1D1D1D;text-align:center;font-size:13px;font-style:normal;font-weight:400;line-height:20px}.pagination{display:flex}.pagination ifx-icon-button:first-of-type{margin-right:12px}.pagination ifx-icon-button:last-of-type{margin-left:12px}a{padding:8px;border-radius:100px}ol{list-style-type:none;padding:0;margin:0;display:inline-flex;align-items:center;gap:12px}li{display:flex;flex-direction:column;justify-content:center;align-items:center;border-radius:100px}li:hover:not(.active) a{background-color:#EEEDED}li:active:not(.active) a{background-color:#575352;color:#fff}li.active{background-color:#0A8276}li.active a{color:#fff}li:hover{cursor:pointer}li a{text-decoration:none;display:flex;width:16px;height:16px;flex-direction:column;justify-content:center;color:#1D1D1D;text-align:center;font-size:13px;font-style:normal;font-weight:400;line-height:20px;align-items:center}.prev.disabled,.next.disabled{cursor:default}.prev.disabled:hover,.next.disabled:hover{cursor:default;text-decoration:none}.prev{margin-right:2.5px}.next{margin-left:2.5px}@media (min-width: 400px){li:first-child,li.active-sibling,li.active,li.active+li,li:last-child{display:inline-flex !important;flex-direction:row}li:first-child:nth-last-child(n+8)~li{display:none}li:first-child:nth-last-child(n+8)~li.active-sibling:before{content:"…";font-size:13px;display:inline-block;margin-right:6px}li:first-child:nth-last-child(n+8)~li.active+li:after{content:"…";font-size:13px;display:inline-block;margin-left:6px}li:first-child:nth-last-child(n+8)~li:nth-last-child(-n+5){display:inline-flex;flex-direction:row}li:first-child:nth-last-child(n+8)~li:nth-last-child(5):before{content:"…";font-size:13px;display:inline-block;margin-right:6px}li:first-child:nth-last-child(n+8)~li:nth-child(-n+2):before,li:first-child:nth-last-child(n+8)~li:nth-child(-n+2):after,li:first-child:nth-last-child(n+8)~li:nth-last-child(-n+2):before,li:first-child:nth-last-child(n+8)~li:nth-last-child(-n+2):after,li:first-child:nth-last-child(n+8)~li.active-sibling:nth-last-child(-n+4):before,li:first-child:nth-last-child(n+8)~li.active-sibling:nth-last-child(-n+4):after{display:none !important}li:first-child:nth-last-child(n+8).active~li:nth-last-child(-n+5),li:first-child:nth-last-child(n+8)~li.active~li:nth-last-child(-n+5){display:none}li:first-child:nth-last-child(n+8).active~li:nth-last-child(-n+5):before,li:first-child:nth-last-child(n+8)~li.active~li:nth-last-child(-n+5):before{display:none}li:first-child:nth-last-child(n+8).active~li:nth-child(-n+5),li:first-child:nth-last-child(n+8)~li.active~li:nth-child(-n+5){display:inline-flex !important;flex-direction:row}li:first-child:nth-last-child(n+8).active~li:nth-child(-n+4):after,li:first-child:nth-last-child(n+8)~li.active~li:nth-child(-n+4):after{display:none}li:first-child:nth-last-child(n+8).active~li:nth-child(5):after,li:first-child:nth-last-child(n+8)~li.active~li:nth-child(5):after{content:"…";font-size:13px;display:inline-block;margin-left:6px}li:first-child:nth-last-child(n+8).active:before,li:first-child:nth-last-child(n+8).active:after,li:first-child:nth-last-child(n+8)~li.active:before,li:first-child:nth-last-child(n+8)~li.active:after{display:none}}';const d=class{constructor(t){e(this,t);this.ifxPageChange=i(this,"ifxPageChange",7);this.ifxItemsPerPageChange=i(this,"ifxItemsPerPageChange",7);this.currentPage=1;this.internalPage=1;this.internalItemsPerPage=10;this.numberOfPages=[];this.total=1;this.filteredItemsPerPage=[];this.visiblePages=[];this.CLASS_DISABLED="disabled";this.CLASS_ACTIVE="active";this.handlePageClick=e=>{const i=e.currentTarget;const t=parseInt(i.dataset.page);if(!isNaN(t))this.changePage(t)}}watchTotalHandler(){this.calculateNumberOfPages();this.updateVisiblePages()}currentPageWatcher(e){this.internalPage=Math.max(1,Math.min(e,this.numberOfPages.length));this.calculateNumberOfPages();this.updateVisiblePages()}setItemsPerPage(e){var i,t;const s=((i=e.detail)===null||i===void 0?void 0:i.value)||((t=e.detail)===null||t===void 0?void 0:t.label);const a=parseInt(s)||10;if(a===this.internalItemsPerPage){return}this.internalItemsPerPage=a;this.internalPage=1;this.calculateNumberOfPages();this.updateVisiblePages();this.handleEventEmission()}emitItemsPerPage(e){this.ifxItemsPerPageChange.emit(e.detail.label)}async componentDidLoad(){const e=this.el.shadowRoot.querySelector("#itemsPerPageSelect");if(e){e.addEventListener("ifxSelect",(e=>this.emitItemsPerPage(e)))}if(!l(this.el)){const e=a();n("ifx-pagination",await e)}this.initPagination()}disconnectedCallback(){const e=this.el.shadowRoot.querySelector("#itemsPerPageSelect");if(e){e.removeEventListener("ifxSelect",(e=>this.emitItemsPerPage(e)))}}updateVisiblePages(){const e=2;const i=this.numberOfPages.length;const t=this.internalPage;let s=[];if(i<=5){s=[...this.numberOfPages]}else{s.push(1);if(t>e+1)s.push("...");let a=Math.max(2,t-e);let n=Math.min(i-1,t+e);if(t<=e+1)n=e*2+1;if(t>=i-e)a=i-e*2;for(let e=a;e<=n;e++)s.push(e);if(t<i-e)s.push("...");s.push(i)}this.visiblePages=[...new Set(s)]}calculateNumberOfPages(){const e=Math.ceil(this.total/this.internalItemsPerPage);this.numberOfPages=Array.from({length:e},((e,i)=>i+1));this.internalPage=Math.max(1,Math.min(this.currentPage,e))}filterOptionsArray(){const e=typeof this.itemsPerPage==="string"?JSON.parse(this.itemsPerPage):this.itemsPerPage;this.filteredItemsPerPage=e.map((e=>Object.assign(Object.assign({},e),{label:e.label||e.value})))}componentWillLoad(){this.filterOptionsArray();const e=this.filteredItemsPerPage.find((e=>e.selected));if(e){this.internalItemsPerPage=Number(e.value)}else if(this.filteredItemsPerPage.length>0){this.internalItemsPerPage=Number(this.filteredItemsPerPage[0].value)}this.calculateNumberOfPages();this.internalPage=Math.max(1,Math.min(this.currentPage,this.numberOfPages.length));this.updateVisiblePages()}componentWillUpdate(){if(this.prevInternalPage!==this.internalPage){this.updateVisiblePages();this.prevInternalPage=this.internalPage}}componentDidUpdate(){this.initPagination()}handleEventEmission(){this.ifxPageChange.emit({currentPage:this.internalPage,totalPages:this.numberOfPages.length,itemsPerPage:this.internalItemsPerPage})}initPagination(){const e=this.el.shadowRoot.querySelector(".pagination");if(!e)return;const i=()=>{const i=e.querySelector(".prev");const t=e.querySelector(".next");if(i){i.disabled=this.internalPage===1;i.classList.toggle(this.CLASS_DISABLED,this.internalPage===1)}if(t){t.disabled=this.internalPage===this.numberOfPages.length;t.classList.toggle(this.CLASS_DISABLED,this.internalPage===this.numberOfPages.length)}};e.querySelectorAll("li").forEach((e=>{e.removeEventListener("click",this.handlePageClick);e.addEventListener("click",this.handlePageClick)}));i()}changePage(e){e=Math.max(1,Math.min(e,this.numberOfPages.length));if(e===this.internalPage)return;this.internalPage=e;this.handleEventEmission();this.initPagination()}render(){return t("div",{key:"14f71cd0291d0b01d3b9da91ecec8d3908796107",class:"container"},t("div",{key:"d28f3b1a05cd937eec0efa30b661c1e5671542d3",class:"items__per-page-wrapper"},t("div",{key:"504286b0c1d4d1a77e283612389e2f0a98f76ce3",class:"items__per-page-label"},"Results per Page"),t("div",{key:"61fb210192777dc3ebf7810f0d311eae2abd3dc3",class:"items__per-page-field"},t("ifx-select",{key:"a576ef3d2ee4feb8d9f04550fa08e0a75fdafc07",id:"itemsPerPageSelect",placeholder:"false","show-search":"false",value:undefined,disabled:false,error:false,size:"s",options:this.filteredItemsPerPage,"placeholder-value":"Select"}))),t("div",{key:"72e40aa84cb9ba69cb4fcbe8d057cf8c6067ac13",class:"items__total-wrapper"},t("div",{key:"bf3777a0d9c82cda57125b8bab4a1cdb49f1cfb2",class:"pagination"},t("ifx-icon-button",{key:"bcda07cf867ee60e5896d853709b244d2cf4d3ad",class:"prev",icon:"arrow-left-16",onClick:()=>this.changePage(this.internalPage-1)}),t("ol",{key:"b3b9929e2a05c15aae434b3749dc748a46491cb4"},this.visiblePages.map(((e,i)=>typeof e==="number"?t("li",{key:`page-${e}`,class:{[this.CLASS_ACTIVE]:e===this.internalPage},"data-page":e},t("a",{href:"javascript:void(0)"},e)):t("li",{class:"ellipsis",key:`ellipsis-${i}`},t("span",null,"..."))))),t("ifx-icon-button",{key:"719da5df49fe092465e856c43e72d187fc7231a5",class:"next",icon:"arrow-right-16",onClick:()=>this.changePage(this.internalPage+1)}))))}get el(){return s(this)}static get watchers(){return{total:["watchTotalHandler"],currentPage:["currentPageWatcher"]}}};d.style=p;export{c as ifx_chip,o as ifx_chip_item,d as ifx_pagination};
2
+ //# sourceMappingURL=p-cdbc14e1.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,h as i,a as r}from"./p-PqnYwNKt.js";import{d as a,t as s}from"./p-DcmcuUOA.js";import{i as o}from"./p-Bw2fh5LT.js";const n='.date__picker-container{display:flex;flex-direction:column}.date__picker-container .label__wrapper{color:#1D1D1D;font:400 1rem/1.5rem "Source Sans 3"}.date__picker-container .label__wrapper .asterisk{display:none}.date__picker-container .label__wrapper .asterisk.required{display:inline;margin-left:4px}.date__picker-container .label__wrapper .asterisk.required.error{color:#CD002F}.date__picker-container.disabled .label__wrapper{color:#575352}.date__picker-container.error .caption__wrapper{color:#CD002F}.date__picker-container.disabled .caption__wrapper{color:#575352}.date__picker-container .caption__wrapper{margin-top:4px;color:#1D1D1D;font:400 0.75rem/1rem "Source Sans 3"}.date__picker-input{font-family:"Source Sans 3";outline:none;width:100%;cursor:pointer;border-radius:1px;border:1px solid #8D8786;height:100%}.date__picker-input.firefox__classes{padding:8px 16px;color:#8D8786;font-size:16px;text-transform:uppercase;font-style:normal;font-weight:400;line-height:24px;cursor:pointer}.date__picker-input:focus:not(.error,.success){border-color:#0A8276}.date__picker-input:hover:not(:disabled,:focus,.error,.success){border-color:#575352}.date__picker-input:disabled{border-color:#575352;background-color:#EEEDED}.date__picker-input.error{border-color:#CD002F}.date__picker-input.success:not(.error){border-color:#4CA460}.date__picker-input::-webkit-datetime-edit-text{color:#8D8786;font-size:16px;font-style:normal;font-weight:400;line-height:24px}.date__picker-input.has-value::-webkit-datetime-edit-text{color:#1D1D1D}.date__picker-input.has-value::-webkit-datetime-edit{color:#1D1D1D}::-webkit-datetime-edit{color:#8D8786;font-size:16px;text-transform:uppercase;font-style:normal;font-weight:400;line-height:24px}::-webkit-datetime-edit-fields-wrapper{padding:8px 16px;padding-bottom:9px;transform:translateY(1px)}::-webkit-inner-spin-button{display:none}::-webkit-calendar-picker-indicator{position:absolute;right:15px;font-size:19px;cursor:pointer;border-radius:1px}::-webkit-calendar-picker-indicator:focus-within{outline:2px solid #0A8276;outline-offset:2px}.input__wrapper{display:flex;justify-content:space-between;align-items:center;align-self:stretch;background:#FFFFFF;position:relative}.input__wrapper.large{height:40px}.input__wrapper.small{height:36px}.input__wrapper.disabled .icon__wrapper{background-color:#EEEDED}.icon__wrapper{position:absolute;right:17px;padding:2px;display:flex;justify-content:flex-end;align-items:center;pointer-events:none;z-index:100;background-color:#FFFFFF;line-height:16px}.icon__wrapper ifx-icon{vertical-align:middle}';const c=class{constructor(i){e(this,i);this.ifxDate=t(this,"ifxDate",7);if(i.$hostElement$["s-ei"]){this.internals=i.$hostElement$["s-ei"]}else{this.internals=i.$hostElement$.attachInternals();i.$hostElement$["s-ei"]=this.internals}this.inputId=`ifx-date-picker-${++p}`;this.size="s";this.error=false;this.success=false;this.disabled=false;this.type="date";this.required=false;this.autocomplete="on"}getDate(e){const t=e.target.value;const i=new Date(t);const r=i.getDate();const a=i.getMonth()+1;const s=i.getFullYear();if(!t){this.internals.setFormValue(null);if(this.type==="datetime-local"){const e=i.getHours();const t=i.getMinutes();this.ifxDate.emit({day:r,month:a,year:s,hours:e,minutes:t})}else{this.ifxDate.emit({day:r,month:a,year:s})}return}const o=this.el.shadowRoot.querySelector(".date__picker-input");o.classList.add("has-value");this.internals.setFormValue(i.toISOString().substring(0,10));if(this.type==="datetime-local"){const e=i.getHours();const t=i.getMinutes();this.ifxDate.emit({day:r,month:a,year:s,hours:e,minutes:t})}else{this.ifxDate.emit({day:r,month:a,year:s})}}handleInputFocusOnIconClick(){const e=this.el.shadowRoot.querySelector(".date__picker-input");if(e){e.focus()}}getBrowser(){if(navigator.userAgent.indexOf("Chrome")!=-1){return"Chrome"}else if(navigator.userAgent.indexOf("Opera")!=-1){return"Opera"}else if(navigator.userAgent.indexOf("MSIE")!=-1){return"IE"}else if(navigator.userAgent.indexOf("Firefox")!=-1){return"Firefox"}else{return"unknown"}}setFireFoxClasses(){const e=this.getBrowser();const t=this.el.shadowRoot.querySelector(".date__picker-input");if(e==="Firefox"){t.classList.add("firefox__classes")}else if(t.classList.contains("firefox__classes")){t.classList.remove("firefox__classes")}}async componentDidLoad(){if(!o(this.el)){const e=a();s("ifx-date-picker",await e)}this.setFireFoxClasses()}componentWillUpdate(){if(this.value){this.getDate({target:{value:this.value}})}}formResetCallback(){this.internals.setFormValue(null)}render(){var e,t;return i("div",{key:"54939ec686f17c6f9d5a77d2c578947707254f1e",class:`date__picker-container ${this.error?"error":""} ${this.disabled?"disabled":""}`},i("label",{key:"96190d8cd34abb294455693c106e06e99c44b14d",class:"label__wrapper",htmlFor:this.inputId},(e=this.label)===null||e===void 0?void 0:e.trim(),i("span",{key:"43b00aab35d90f6022af42a0fffc9f8ef3750a6b",class:`asterisk ${this.required?"required":""} ${this.error?"error":""}`},"*")),i("div",{key:"9077684afde83eadd4ba777a62f30d2b5ba35146",class:`input__wrapper ${this.size==="l"?"large":"small"} ${this.disabled?"disabled":""}`},i("input",{key:"7e2aa162dad9c942adc3abf52aa684d485bb0015",type:this.type,autocomplete:this.autocomplete,class:`date__picker-input ${this.error?"error":""} ${this.success?"success":""}`,disabled:this.disabled?true:undefined,"aria-invalid":this.error?true:undefined,"aria-label":this.ariaLabel,max:this.max,min:this.min,value:this.value,required:this.required,onChange:e=>this.getDate(e)}),i("div",{key:"d2f342fc05ecdf7f8c43fec285b2b2b4c3efc99d",class:"icon__wrapper",role:"button",onClick:()=>this.handleInputFocusOnIconClick()},i("ifx-icon",{key:"aa7b6906751018c0cad1e43ee0f86aa426dad285",icon:"calendar16","aria-hidden":"true"}))),((t=this.caption)===null||t===void 0?void 0:t.trim())&&i("div",{key:"bb91a4936b8db806bf3176e95429e7b434c92c1d",class:"caption__wrapper"},this.caption.trim()))}get el(){return r(this)}};let p=0;c.style=n;export{c as ifx_date_picker};
2
- //# sourceMappingURL=p-bf51fc38.entry.js.map
1
+ import{r as e,c as t,h as i,a as r}from"./p-PqnYwNKt.js";import{d as a,t as s}from"./p-DcmcuUOA.js";import{i as o}from"./p-Bw2fh5LT.js";const n='.date__picker-container{display:flex;flex-direction:column}.date__picker-container .label__wrapper{color:#1D1D1D;font:400 1rem/1.5rem "Source Sans 3"}.date__picker-container .label__wrapper .asterisk{display:none}.date__picker-container .label__wrapper .asterisk.required{display:inline;margin-left:4px}.date__picker-container .label__wrapper .asterisk.required.error{color:#CD002F}.date__picker-container.disabled .label__wrapper{color:#575352}.date__picker-container.error .caption__wrapper{color:#CD002F}.date__picker-container.disabled .caption__wrapper{color:#575352}.date__picker-container .caption__wrapper{margin-top:4px;color:#1D1D1D;font:400 0.75rem/1rem "Source Sans 3"}.date__picker-input{font-family:"Source Sans 3";outline:none;width:100%;cursor:pointer;border-radius:1px;border:1px solid #8D8786;height:100%}.date__picker-input.firefox__classes{padding:8px 16px;color:#8D8786;font-size:16px;text-transform:uppercase;font-style:normal;font-weight:400;line-height:24px;cursor:pointer}.date__picker-input:focus:not(.error,.success){border-color:#0A8276}.date__picker-input:hover:not(:disabled,:focus,.error,.success){border-color:#575352}.date__picker-input:disabled{border-color:#575352;background-color:#EEEDED}.date__picker-input.error{border-color:#CD002F}.date__picker-input.success:not(.error){border-color:#4CA460}.date__picker-input::-webkit-datetime-edit-text{color:#8D8786;font-size:16px;font-style:normal;font-weight:400;line-height:24px}.date__picker-input.has-value::-webkit-datetime-edit-text{color:#1D1D1D}.date__picker-input.has-value::-webkit-datetime-edit{color:#1D1D1D}::-webkit-datetime-edit{color:#8D8786;font-size:16px;text-transform:uppercase;font-style:normal;font-weight:400;line-height:24px}::-webkit-datetime-edit-fields-wrapper{padding:8px 16px;padding-bottom:9px;transform:translateY(1px)}::-webkit-inner-spin-button{display:none}::-webkit-calendar-picker-indicator{position:absolute;right:15px;font-size:19px;cursor:pointer;border-radius:1px}::-webkit-calendar-picker-indicator:focus-within{outline:2px solid #0A8276;outline-offset:2px}.input__wrapper{display:flex;justify-content:space-between;align-items:center;align-self:stretch;background:#FFFFFF;position:relative}.input__wrapper.large{height:40px}.input__wrapper.small{height:36px}.input__wrapper.disabled .icon__wrapper{background-color:#EEEDED}.icon__wrapper{position:absolute;right:17px;padding:2px;display:flex;justify-content:flex-end;align-items:center;pointer-events:none;z-index:100;background-color:#FFFFFF;line-height:16px}.icon__wrapper ifx-icon{vertical-align:middle}';const c=class{constructor(i){e(this,i);this.ifxDate=t(this,"ifxDate",7);if(i.$hostElement$["s-ei"]){this.internals=i.$hostElement$["s-ei"]}else{this.internals=i.$hostElement$.attachInternals();i.$hostElement$["s-ei"]=this.internals}this.inputId=`ifx-date-picker-${++p}`;this.size="s";this.error=false;this.success=false;this.disabled=false;this.type="date";this.required=false;this.autocomplete="on"}getDate(e){const t=e.target.value;const i=new Date(t);const r=i.getDate();const a=i.getMonth()+1;const s=i.getFullYear();if(!t){if(this.type==="datetime-local"){const e=i.getHours();const t=i.getMinutes();this.ifxDate.emit({day:r,month:a,year:s,hours:e,minutes:t})}else{this.ifxDate.emit({day:r,month:a,year:s})}return}const o=this.el.shadowRoot.querySelector(".date__picker-input");o.classList.add("has-value");if(this.type==="datetime-local"){const e=i.getHours();const t=i.getMinutes();this.ifxDate.emit({day:r,month:a,year:s,hours:e,minutes:t})}else{this.ifxDate.emit({day:r,month:a,year:s})}}handleInputFocusOnIconClick(){const e=this.el.shadowRoot.querySelector(".date__picker-input");if(e){e.focus()}}getBrowser(){if(navigator.userAgent.indexOf("Chrome")!=-1){return"Chrome"}else if(navigator.userAgent.indexOf("Opera")!=-1){return"Opera"}else if(navigator.userAgent.indexOf("MSIE")!=-1){return"IE"}else if(navigator.userAgent.indexOf("Firefox")!=-1){return"Firefox"}else{return"unknown"}}setFireFoxClasses(){const e=this.getBrowser();const t=this.el.shadowRoot.querySelector(".date__picker-input");if(e==="Firefox"){t.classList.add("firefox__classes")}else if(t.classList.contains("firefox__classes")){t.classList.remove("firefox__classes")}}async componentDidLoad(){if(!o(this.el)){const e=a();s("ifx-date-picker",await e)}this.setFireFoxClasses()}componentWillUpdate(){if(this.value){this.getDate({target:{value:this.value}})}}render(){var e,t;return i("div",{key:"7d17576703fc18fcaf23152d644ade7c13a24896",class:`date__picker-container ${this.error?"error":""} ${this.disabled?"disabled":""}`},i("label",{key:"ae9c4c36a6d11bd619b6f45d146b08dd0f8a1d21",class:"label__wrapper",htmlFor:this.inputId},(e=this.label)===null||e===void 0?void 0:e.trim(),i("span",{key:"fe09bfc685a43064a59f964d021a957b57dc9165",class:`asterisk ${this.required?"required":""} ${this.error?"error":""}`},"*")),i("div",{key:"ae2897c521f496ec9f13d68e96f57c5034e1174f",class:`input__wrapper ${this.size==="l"?"large":"small"} ${this.disabled?"disabled":""}`},i("input",{key:"fcd00c05631aed14e26f843e38fc09307d312dfe",type:this.type,autocomplete:this.autocomplete,class:`date__picker-input ${this.error?"error":""} ${this.success?"success":""}`,disabled:this.disabled?true:undefined,"aria-invalid":this.error?true:undefined,"aria-label":this.ariaLabel,max:this.max,min:this.min,value:this.value,required:this.required,onChange:e=>this.getDate(e)}),i("div",{key:"03e650aa82186eb8989f9a5da38d3f8ec72b9052",class:"icon__wrapper",role:"button",onClick:()=>this.handleInputFocusOnIconClick()},i("ifx-icon",{key:"33f085aeb96a81fc16fef8fa9aa0dc0bd3d760fe",icon:"calendar16","aria-hidden":"true"}))),((t=this.caption)===null||t===void 0?void 0:t.trim())&&i("div",{key:"bc29febf9a6aea7be226b43c0cf46b0e82a35981",class:"caption__wrapper"},this.caption.trim()))}get el(){return r(this)}};let p=0;c.style=n;export{c as ifx_date_picker};
2
+ //# sourceMappingURL=p-d094dc8e.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["datePickerCss","DatePicker","constructor","hostRef","this","inputId","datePickerId","size","error","success","disabled","type","required","autocomplete","getDate","e","inputValue","target","value","selectedDate","Date","day","month","getMonth","year","getFullYear","hours","getHours","minutes","getMinutes","ifxDate","emit","input","el","shadowRoot","querySelector","classList","add","handleInputFocusOnIconClick","focus","getBrowser","navigator","userAgent","indexOf","setFireFoxClasses","browser","contains","remove","componentDidLoad","isNestedInIfxComponent","framework","detectFramework","trackComponent","componentWillUpdate","render","h","key","class","htmlFor","_a","label","trim","undefined","ariaLabel","max","min","onChange","role","onClick","icon","_b","caption"],"sources":["src/components/date-picker/date-picker.scss?tag=ifx-date-picker&encapsulation=shadow","src/components/date-picker/date-picker.tsx"],"sourcesContent":["@use '~@infineon/design-system-tokens/dist/tokens';\n\n.date__picker-container {\n display: flex;\n flex-direction: column;\n\n & .label__wrapper {\n color: tokens.$ifxColorBaseBlack;\n font: tokens.$ifxBodyBody03;\n\n & .asterisk { \n display: none;\n &.required {\n display: inline;\n margin-left: 4px;\n \n &.error {\n color: #CD002F;\n }\n }\n }\n\n }\n\n &.disabled {\n .label__wrapper {\n color: tokens.$ifxColorEngineering500;\n }\n }\n\n &.error {\n .caption__wrapper {\n color: tokens.$ifxColorRed500;\n }\n }\n\n &.disabled {\n .caption__wrapper {\n color: tokens.$ifxColorEngineering500;\n }\n }\n\n & .caption__wrapper {\n margin-top: tokens.$ifxSpace50;\n color: tokens.$ifxColorBaseBlack;\n font: tokens.$ifxBodyBody05;\n }\n}\n\n.date__picker-input {\n font-family: 'Source Sans 3';\n outline: none;\n width: 100%;\n cursor: pointer;\n border-radius: 1px;\n border: 1px solid tokens.$ifxColorEngineering400;\n height: 100%;\n\n &.firefox__classes {\n padding: 8px 16px;\n color: tokens.$ifxColorEngineering400;\n font-size: 16px;\n text-transform: uppercase;\n font-style: normal;\n font-weight: 400;\n line-height: 24px;\n cursor: pointer;\n }\n\n &:focus:not(.error, .success) {\n border-color: tokens.$ifxColorOcean500;\n }\n\n &:hover:not(:disabled, :focus, .error, .success) {\n border-color: tokens.$ifxColorEngineering500;\n }\n\n &:disabled {\n border-color: tokens.$ifxColorEngineering500;\n background-color: tokens.$ifxColorEngineering200;\n }\n\n &.error {\n border-color: tokens.$ifxColorRed500;\n }\n\n &.success:not(.error) {\n border-color: tokens.$ifxColorGreen500;\n }\n\n &::-webkit-datetime-edit-text {\n color: tokens.$ifxColorEngineering400;\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 24px;\n }\n\n &.has-value::-webkit-datetime-edit-text {\n color: tokens.$ifxColorBaseBlack;\n }\n\n &.has-value::-webkit-datetime-edit {\n color: tokens.$ifxColorBaseBlack;\n }\n}\n\n::-webkit-datetime-edit {\n color: tokens.$ifxColorEngineering400;\n font-size: 16px;\n text-transform: uppercase;\n font-style: normal;\n font-weight: 400;\n line-height: 24px;\n}\n\n::-webkit-datetime-edit-fields-wrapper {\n padding: 8px 16px;\n padding-bottom: 9px;\n transform: translateY(1px);\n}\n\n::-webkit-inner-spin-button {\n display: none;\n}\n\n::-webkit-calendar-picker-indicator {\n position: absolute;\n right: 15px;\n font-size: 19px;\n cursor: pointer;\n border-radius: 1px;\n &:focus-within {\n outline: 2px solid tokens.$ifxColorOcean500;\n outline-offset: 2px;\n }\n}\n\n.input__wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n align-self: stretch;\n background: tokens.$ifxColorBaseWhite;\n position: relative;\n &.large {\n height: 40px;\n }\n\n &.small {\n height: 36px;\n }\n\n &.disabled {\n & .icon__wrapper {\n background-color: tokens.$ifxColorEngineering200;\n }\n }\n}\n\n.icon__wrapper {\n position: absolute;\n right: 17px;\n padding: 2px;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n pointer-events: none;\n z-index: 100;\n background-color: tokens.$ifxColorBaseWhite;\n line-height: 16px;\n\n & ifx-icon {\n vertical-align: middle;\n }\n}\n","import { AttachInternals } from '@stencil/core';\nimport { Component, Prop, h, Element, Event, EventEmitter } 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-date-picker',\n styleUrl: 'date-picker.scss',\n shadow: true,\n // formAssociated: true,\n})\n\nexport class DatePicker {\n private inputId: string = `ifx-date-picker-${++datePickerId}`;\n\n @Element() el: HTMLElement;\n @Prop() size: string = 's';\n @Prop() error: boolean = false;\n @Prop() success: boolean = false;\n @Prop() disabled: boolean = false;\n @Prop() ariaLabel: string | null;\n @Prop() value: string;\n @Prop() type: string = 'date'\n @Prop() max: string;\n @Prop() min: string;\n @Prop() required: boolean = false;\n @Prop() label: string;\n @Prop() caption: string;\n @Prop() autocomplete: string = 'on';\n\n @AttachInternals() internals: ElementInternals;\n\n @Event() ifxDate: EventEmitter;\n\n getDate(e) { \n const inputValue = e.target.value;\n const selectedDate = new Date(inputValue);\n const day = selectedDate.getDate();\n const month = selectedDate.getMonth() + 1; \n const year = selectedDate.getFullYear();\n\n \n \n if (!inputValue) {\n //this.internals.setFormValue(null);\n\n if(this.type === 'datetime-local') { \n const hours = selectedDate.getHours();\n const minutes = selectedDate.getMinutes();\n this.ifxDate.emit({day, month, year, hours, minutes});\n } else { \n this.ifxDate.emit({day, month, year});\n }\n return;\n }\n\n const input = this.el.shadowRoot.querySelector('.date__picker-input') as HTMLInputElement;\n input.classList.add('has-value');\n\n //this.internals.setFormValue(selectedDate.toISOString().substring(0,10))\n if(this.type === 'datetime-local') { \n const hours = selectedDate.getHours();\n const minutes = selectedDate.getMinutes();\n this.ifxDate.emit({day, month, year, hours, minutes});\n } else { \n this.ifxDate.emit({day, month, year})\n }\n }\n\n handleInputFocusOnIconClick() { \n const input = this.el.shadowRoot.querySelector('.date__picker-input') as HTMLInputElement;\n if(input) { \n input.focus()\n }\n }\n\n getBrowser() {\n if( navigator.userAgent.indexOf(\"Chrome\") != -1 ) {\n return \"Chrome\";\n } else if( navigator.userAgent.indexOf(\"Opera\") != -1 ) {\n return \"Opera\";\n } else if( navigator.userAgent.indexOf(\"MSIE\") != -1 ) {\n return \"IE\";\n } else if( navigator.userAgent.indexOf(\"Firefox\") != -1 ) {\n return \"Firefox\";\n } else {\n return \"unknown\";\n }\n }\n\n setFireFoxClasses() { \n const browser = this.getBrowser()\n const input = this.el.shadowRoot.querySelector('.date__picker-input');\n\n if(browser === 'Firefox') { \n input.classList.add('firefox__classes')\n } else if(input.classList.contains('firefox__classes')) { \n input.classList.remove('firefox__classes')\n }\n }\n\n async componentDidLoad() { \n if(!isNestedInIfxComponent(this.el)) { \n const framework = detectFramework();\n trackComponent('ifx-date-picker', await framework)\n }\n this.setFireFoxClasses()\n }\n\n componentWillUpdate() { \n if (this.value) {\n this.getDate({ target: { value: this.value } });\n }\n }\n\n // formResetCallback() {\n // this.internals.setFormValue(null);\n // }\n\n render() {\n return (\n <div class={`date__picker-container ${this.error ? 'error' : ''} ${this.disabled ? 'disabled': ''}`}>\n\n <label class='label__wrapper' htmlFor={ this.inputId }>\n { this.label?.trim() }\n <span class={`asterisk ${this.required ? 'required' : \"\"} ${this.error ? 'error' : \"\"}`}>*</span>\n </label>\n\n <div class={`input__wrapper ${this.size === 'l' ? 'large' : 'small'} ${this.disabled ? 'disabled' : ''}`}>\n <input\n type={this.type}\n autocomplete={this.autocomplete}\n class={`date__picker-input ${this.error ? 'error' : \"\"} ${this.success ? \"success\" : \"\"}`}\n disabled={this.disabled ? true : undefined}\n aria-invalid={this.error ? true : undefined}\n aria-label={this.ariaLabel}\n max={this.max}\n min={this.min}\n value={this.value}\n required={this.required}\n onChange={(e) => this.getDate(e)} />\n <div class=\"icon__wrapper\" role=\"button\" onClick={() => this.handleInputFocusOnIconClick()}>\n <ifx-icon icon='calendar16' aria-hidden=\"true\"></ifx-icon>\n </div>\n </div>\n\n { this.caption?.trim() && (\n <div class='caption__wrapper'>\n { this.caption.trim() }\n </div> \n )}\n </div>\n )\n }\n}\n\nlet datePickerId = 0;"],"mappings":"wIAAA,MAAMA,EAAgB,qhF,MCaTC,EAAU,MAPvB,WAAAC,CAAAC,G,2MAQUC,KAAAC,QAAkB,qBAAqBC,IAGvCF,KAAIG,KAAW,IACfH,KAAKI,MAAY,MACjBJ,KAAOK,QAAY,MACnBL,KAAQM,SAAY,MAGpBN,KAAIO,KAAW,OAGfP,KAAQQ,SAAY,MAGpBR,KAAYS,aAAW,IA8HhC,CAxHC,OAAAC,CAAQC,GACN,MAAMC,EAAaD,EAAEE,OAAOC,MAC5B,MAAMC,EAAe,IAAIC,KAAKJ,GAC9B,MAAMK,EAAMF,EAAaL,UACzB,MAAMQ,EAAQH,EAAaI,WAAa,EACxC,MAAMC,EAAOL,EAAaM,cAI1B,IAAKT,EAAY,CAGf,GAAGZ,KAAKO,OAAS,iBAAkB,CACjC,MAAMe,EAAQP,EAAaQ,WAC3B,MAAMC,EAAUT,EAAaU,aAC7BzB,KAAK0B,QAAQC,KAAK,CAACV,MAAKC,QAAOE,OAAME,QAAOE,W,KACvC,CACLxB,KAAK0B,QAAQC,KAAK,CAACV,MAAKC,QAAOE,Q,CAEjC,M,CAGF,MAAMQ,EAAQ5B,KAAK6B,GAAGC,WAAWC,cAAc,uBAC/CH,EAAMI,UAAUC,IAAI,aAGpB,GAAGjC,KAAKO,OAAS,iBAAkB,CACjC,MAAMe,EAAQP,EAAaQ,WAC3B,MAAMC,EAAUT,EAAaU,aAC7BzB,KAAK0B,QAAQC,KAAK,CAACV,MAAKC,QAAOE,OAAME,QAAOE,W,KACvC,CACLxB,KAAK0B,QAAQC,KAAK,CAACV,MAAKC,QAAOE,Q,EAInC,2BAAAc,GACE,MAAMN,EAAQ5B,KAAK6B,GAAGC,WAAWC,cAAc,uBAC/C,GAAGH,EAAO,CACRA,EAAMO,O,EAIX,UAAAC,GACG,GAAIC,UAAUC,UAAUC,QAAQ,YAAa,EAAK,CAChD,MAAO,Q,MACF,GAAIF,UAAUC,UAAUC,QAAQ,WAAY,EAAK,CACtD,MAAO,O,MACF,GAAIF,UAAUC,UAAUC,QAAQ,UAAW,EAAK,CACrD,MAAO,I,MACF,GAAIF,UAAUC,UAAUC,QAAQ,aAAc,EAAK,CACxD,MAAO,S,KACF,CACL,MAAO,S,EAIX,iBAAAC,GACE,MAAMC,EAAUzC,KAAKoC,aACrB,MAAMR,EAAQ5B,KAAK6B,GAAGC,WAAWC,cAAc,uBAE/C,GAAGU,IAAY,UAAW,CACxBb,EAAMI,UAAUC,IAAI,mB,MACf,GAAGL,EAAMI,UAAUU,SAAS,oBAAqB,CACtDd,EAAMI,UAAUW,OAAO,mB,EAI3B,sBAAMC,GACJ,IAAIC,EAAuB7C,KAAK6B,IAAK,CACnC,MAAMiB,EAAYC,IAClBC,EAAe,wBAAyBF,E,CAE1C9C,KAAKwC,mB,CAGP,mBAAAS,GACE,GAAIjD,KAAKc,MAAO,CACdd,KAAKU,QAAQ,CAAEG,OAAQ,CAAEC,MAAOd,KAAKc,Q,EAQzC,MAAAoC,G,QACE,OACEC,EAAA,OAAAC,IAAA,2CAAKC,MAAO,0BAA0BrD,KAAKI,MAAQ,QAAU,MAAMJ,KAAKM,SAAW,WAAY,MAE7F6C,EAAA,SAAAC,IAAA,2CAAOC,MAAM,iBAAiBC,QAAUtD,KAAKC,UACzCsD,EAAAvD,KAAKwD,SAAK,MAAAD,SAAA,SAAEA,EAAAE,OACdN,EAAA,QAAAC,IAAA,2CAAMC,MAAO,YAAYrD,KAAKQ,SAAW,WAAa,MAAMR,KAAKI,MAAQ,QAAU,MAAI,MAGzF+C,EAAA,OAAAC,IAAA,2CAAKC,MAAO,kBAAkBrD,KAAKG,OAAS,IAAM,QAAU,WAAWH,KAAKM,SAAW,WAAa,MAClG6C,EACA,SAAAC,IAAA,2CAAA7C,KAAMP,KAAKO,KACXE,aAAcT,KAAKS,aACnB4C,MAAO,sBAAsBrD,KAAKI,MAAQ,QAAU,MAAMJ,KAAKK,QAAU,UAAY,KACrFC,SAAUN,KAAKM,SAAW,KAAOoD,UAAS,eAC5B1D,KAAKI,MAAQ,KAAOsD,UACtB,aAAA1D,KAAK2D,UACjBC,IAAK5D,KAAK4D,IACVC,IAAK7D,KAAK6D,IACV/C,MAAOd,KAAKc,MACZN,SAAUR,KAAKQ,SACfsD,SAAWnD,GAAMX,KAAKU,QAAQC,KAC9BwC,EAAA,OAAAC,IAAA,2CAAKC,MAAM,gBAAgBU,KAAK,SAASC,QAAS,IAAMhE,KAAKkC,+BAC3DiB,EAAA,YAAAC,IAAA,2CAAUa,KAAK,aAAY,cAAa,aAI1CC,EAAAlE,KAAKmE,WAAO,MAAAD,SAAA,SAAAA,EAAET,SACZN,EAAA,OAAAC,IAAA,2CAAKC,MAAM,oBACPrD,KAAKmE,QAAQV,Q,2BAQ7B,IAAIvD,EAAe,E","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as t,h as e,a as i,c as r}from"./p-PqnYwNKt.js";import{d as n,t as o}from"./p-DcmcuUOA.js";import{i as s}from"./p-Bw2fh5LT.js";import{c as a}from"./p-DMLRPGid.js";import"./p-B85MJLTf.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=class{constructor(e){t(this,e);this.inverted=false}async componentDidLoad(){if(!s(this.el)){const t=n();o("ifx-spinner",await t)}}render(){return e("div",{key:"31b5c7c0cd9ed8aa434e37a8c9eb83a455c2a5f7","aria-label":"spinner indicating a loading process",class:this.getClassNames()},e("div",{key:"d2ddaa89a5fde1f908342997e251f7cba3df2929",class:`${this.variant!=="brand"?"border":""} ${this.inverted?"inverted":""}`}),this.variant==="brand"&&e("div",{key:"dc2faa0f770b39ddd8623ae5c6f9c0132a8cd82c",class:`semiconductor ${this.inverted?"inverted":""} ${this.getSizeClass()}`},e("svg",{key:"a0b89dd66eb983065fdec1f41019b54007d370f5",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("g",{key:"d8313728a4ac374c97ef4956429c6c7276d23bdf",id:"spinner/conductor"},e("path",{key:"3422556938c6d9ba6038362d5cbf60cc5f96266c",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)}};l.style=p;const c=':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 d=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(){this.handleTypeProp()}async componentDidLoad(){if(!s(this.el)){const t=n();o("ifx-text-field",await t)}}render(){return e("div",{key:"24639d032428ca7ee8af48c62099c0d12f491b2b","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:"b920a7e84a295a05283829fb38dee4bc168cb10f",class:"textInput__top-wrapper"},e("label",{key:"a5c3043468e97f1f89412bc0a1b65dcccce80db7",htmlFor:this.internalId},e("slot",{key:"96a98d03a9f33f81eccf8d9cd3f93d2c49aad30a"}),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:"17e3e96d4f542e3b76492b6d3cded89b0fdfec45",class:"textInput__bottom-wrapper"},e("div",{key:"1c5d9d736bf3cd3c49fb4d8efeceb9aa61a9af12",class:"input-container"},this.icon&&e("ifx-icon",{key:"d4237077d82eac5ffe48a42efddd2e3fbd783f4f",class:"input-icon",icon:this.icon}),e("input",{key:"4cb42924cbc4602bba8625adaa64efe2b10f5798",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:"430aee272978aa4401fc855139fbac015050f2e5",class:"delete-icon",icon:"cRemove16",onClick:()=>this.handleDeleteContent()})),this.caption&&!this.error&&e("div",{key:"e6bf3e1779945eb7cbd5521e558fc1f10b059787",class:`textInput__bottom-wrapper-caption ${this.disabled} ? disabled : ""`},this.caption),this.error&&e("div",{key:"f4ac30eacc9981110e41dc45fe9fe09ea41e5ee6",class:"textInput__bottom-wrapper-caption error"},this.caption)))}get el(){return i(this)}static get watchers(){return{value:["valueWatcher"]}}};d.style=c;export{l as ifx_spinner,d as ifx_text_field};
2
- //# sourceMappingURL=p-cf4d16d1.entry.js.map
1
+ import{r as t,h as e,a as i,c as r}from"./p-PqnYwNKt.js";import{d as n,t as o}from"./p-DcmcuUOA.js";import{i as s}from"./p-Bw2fh5LT.js";import{c as a}from"./p-DMLRPGid.js";import"./p-B85MJLTf.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=class{constructor(e){t(this,e);this.inverted=false}async componentDidLoad(){if(!s(this.el)){const t=n();o("ifx-spinner",await t)}}render(){return e("div",{key:"7cec3ef86795185d14979ea67bb02b94ca428b07","aria-label":"spinner indicating a loading process",class:this.getClassNames()},e("div",{key:"d8dea5acb66bde0f42beb7fe9ee69d887d5ca178",class:`${this.variant!=="brand"?"border":""} ${this.inverted?"inverted":""}`}),this.variant==="brand"&&e("div",{key:"51decc3e682ab5a2bee56c06d86663865acbf42b",class:`semiconductor ${this.inverted?"inverted":""} ${this.getSizeClass()}`},e("svg",{key:"dd0f03cea52f1297d5f46939d2f7d205d846fe80",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("g",{key:"ceed7284918f1a9efc1e29f84b986088729cd89e",id:"spinner/conductor"},e("path",{key:"a0982b7a458375bcab0d8d6ebb635f6901bca7b1",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)}};l.style=p;const c=':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 d=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.ifxInput.emit(this.value)}handleTypeProp(){this.internalType=this.type==="text"||this.type==="password"?this.type:"text"}componentWillLoad(){this.handleTypeProp()}async componentDidLoad(){if(!s(this.el)){const t=n();o("ifx-text-field",await t)}}render(){return e("div",{key:"a6e1aadd14e4dd4a743a95c8d50115db07d57be1","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:"5e14c39aed281d81db384f52861c64c3535af5ac",class:"textInput__top-wrapper"},e("label",{key:"cfd9498a353f79b4410c6644f5f8b1bf06690f57",htmlFor:this.internalId},e("slot",{key:"ca1cf7b3bc6eb577377bc07f8ce46e16a6d02f6a"}),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:"43f32ac9978697493b02bac68a149eef17858774",class:"textInput__bottom-wrapper"},e("div",{key:"2e15bb2744dd9a04b1dfe538b4dddac909dd9974",class:"input-container"},this.icon&&e("ifx-icon",{key:"b955861c56607a0fcb04c56b9ede08c7494d3f6d",class:"input-icon",icon:this.icon}),e("input",{key:"69d01e9533f1f6ee14229488d475bdcdf2bbc622",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:"63145cc72869f3d6c0eac475d0a1185f6d6086a8",class:"delete-icon",icon:"cRemove16",onClick:()=>this.handleDeleteContent()})),this.caption&&!this.error&&e("div",{key:"e4f53eb4cf89ee2efbcfac6e6e3f298df638fc59",class:`textInput__bottom-wrapper-caption ${this.disabled} ? disabled : ""`},this.caption),this.error&&e("div",{key:"82afd82585b0cb9e206eec66d4383af3de8479ac",class:"textInput__bottom-wrapper-caption error"},this.caption)))}get el(){return i(this)}static get watchers(){return{value:["valueWatcher"]}}};d.style=c;export{l as ifx_spinner,d as ifx_text_field};
2
+ //# sourceMappingURL=p-e1b6894c.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["spinnerCss","Spinner","constructor","hostRef","this","inverted","componentDidLoad","isNestedInIfxComponent","el","framework","detectFramework","trackComponent","render","h","key","class","getClassNames","variant","getSizeClass","width","height","viewBox","fill","xmlns","id","d","size","classNames","textFieldCss","TextField","placeholder","value","error","label","icon","caption","required","optional","success","disabled","showDeleteIcon","autocomplete","type","internalId","valueWatcher","newValue","inputElement","reset","handleDeleteContent","ifxInput","emit","handleInput","query","handleTypeProp","internalType","componentWillLoad","htmlFor","ref","onInput","maxlength","onClick"],"sources":["src/components/spinner/spinner.scss?tag=ifx-spinner&encapsulation=shadow","src/components/spinner/spinner.tsx","src/components/text-field/text-field.scss?tag=ifx-text-field&encapsulation=shadow","src/components/text-field/text-field.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n\n:host {\n display: inline-block;\n\n}\n\n.spinner {\n position: relative;\n width: tokens.$ifxSize500;\n height: tokens.$ifxSize500;\n\n}\n\n.spinner.s {\n width: tokens.$ifxSize300;\n height: tokens.$ifxSize300;\n}\n\n.border {\n box-sizing: border-box;\n position: absolute;\n width: 100%;\n height: 100%;\n border: 4px solid transparent;\n border-top-color: tokens.$ifxColorOcean500;\n border-left-color: tokens.$ifxColorOcean500;\n border-right-color: tokens.$ifxColorOcean500;\n border-top-left-radius: 1px;\n border-top-right-radius: 1px;\n border-radius: 50%;\n animation: spin 2s linear infinite;\n\n &.inverted {\n border-top-color: tokens.$ifxColorBaseWhite;\n border-left-color: tokens.$ifxColorBaseWhite;\n border-right-color: tokens.$ifxColorBaseWhite;\n }\n}\n\n.semiconductor {\n width: 100%;\n height: 100%;\n animation: spin 2s linear infinite;\n\n & svg {\n fill: tokens.$ifxColorOcean500;\n }\n\n &.inverted {\n & svg {\n fill: tokens.$ifxColorBaseWhite;\n }\n }\n\n &.s {\n & svg {\n width: tokens.$ifxSize300;\n height: tokens.$ifxSize300;\n }\n }\n}\n\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}","import { Component, h, Prop, Element } from '@stencil/core';\nimport { trackComponent } from '../../global/utils/tracking';\nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\nimport classNames from 'classnames';\n \n@Component({\n tag: 'ifx-spinner',\n styleUrl: 'spinner.scss',\n shadow: true,\n})\nexport class Spinner {\n @Element() el;\n @Prop() size: string;\n @Prop() variant: string;\n @Prop() inverted: boolean = false;\n\n async componentDidLoad() { \n if(!isNestedInIfxComponent(this.el)) { \n const framework = detectFramework();\n trackComponent('ifx-spinner', await framework)\n }\n }\n\n render() {\n return (\n <div aria-label=\"spinner indicating a loading process\" class={this.getClassNames()}>\n <div class={`${this.variant !== 'brand' ? 'border' : \"\"} ${this.inverted ? 'inverted' : \"\"}`}></div>\n {this.variant === 'brand'\n && <div class={`semiconductor ${this.inverted ? 'inverted' : \"\"} ${this.getSizeClass()}`}>\n <svg width='40' height='40' viewBox=\"0 0 40 40\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g id=\"spinner/conductor\">\n <path 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\" />\n </g>\n </svg>\n </div>}\n </div>\n );\n }\n\n getSizeClass() {\n return `${this.size}` === \"s\"\n ? \"s\"\n : \"\";\n }\n\n getClassNames() {\n return classNames(\n 'spinner',\n this.size && `spinner ${this.getSizeClass()}`\n );\n }\n}\n","@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n:host {\n display: flex;\n}\n\n.textInput__container {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 0px;\n width: 100%;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n font-family: var(--ifx-font-family); // tokens.$ifxFontFamilyBody;\n\n\n\n\n &.disabled {\n & .textInput__top-wrapper {\n & label {\n color: tokens.$ifxColorEngineering500;\n }\n }\n\n & .textInput__bottom-wrapper {\n input {\n border: 1px solid tokens.$ifxColorEngineering500;\n background-color: tokens.$ifxColorEngineering200;\n\n &::placeholder {\n font-size: tokens.$ifxFontSizeS;\n color: tokens.$ifxColorEngineering500;\n }\n }\n }\n }\n\n & .textInput__top-wrapper {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n padding: 0px;\n gap: 4px;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n\n & label {\n font-style: normal;\n font-weight: 400;\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightM;\n display: flex;\n align-items: center;\n color: tokens.$ifxColorBaseBlack;\n flex: none;\n order: 0;\n flex-grow: 0;\n\n & .optional-required {\n margin-left: 4px;\n }\n\n & .optional {\n margin-left: 4px;\n }\n\n & .required {\n margin-left: 4px;\n \n &.error {\n color: #CD002F;\n }\n }\n }\n }\n\n .input-container {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n }\n\n\n & .textInput__bottom-wrapper {\n flex-grow: 1;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 0px;\n gap: 4px;\n flex: none;\n order: 1;\n align-self: stretch;\n flex-grow: 0;\n\n & input {\n width: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: tokens.$ifxSpace100 tokens.$ifxSpace200;\n gap: tokens.$ifxSpace100;\n height: tokens.$ifxSize500;\n background-color: tokens.$ifxColorBaseWhite;\n color: tokens.$ifxColorBaseBlack;\n font-family: var(--ifx-font-family); // tokens.$ifxFontFamilyBody;\n\n\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightM;\n border: 1px solid tokens.$ifxColorEngineering400;\n border-radius: tokens.$ifxBorderRadius12;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n text-overflow: ellipsis;\n\n &.input-s {\n height: tokens.$ifxSize450;\n font-size: tokens.$ifxFontSizeS;\n line-height: tokens.$ifxLineHeightS;\n\n &::placeholder {\n font-size: tokens.$ifxFontSizeS;\n line-height: tokens.$ifxLineHeightS;\n }\n\n }\n\n &.icon {\n padding-left: tokens.$ifxSpace500;\n }\n\n &.error {\n border: 1px solid #CD002F;\n\n &:focus {\n outline: none;\n }\n }\n\n &.success {\n border: 1px solid #4CA460;\n\n &:focus {\n outline: none;\n }\n }\n\n\n &:focus:not(.error, .success) {\n outline: none;\n border: 1px solid tokens.$ifxColorOcean500;\n }\n\n &:hover:not(:disabled, :focus, .error, .success) {\n border: 1px solid tokens.$ifxColorEngineering500;\n }\n\n &::placeholder {\n font-style: normal;\n font-weight: 400;\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightM;\n color: #8D8786;\n flex: none;\n order: 1;\n flex-grow: 1;\n }\n }\n\n & .input-icon {\n // Position the icon within the icon container\n // Adjust the positioning as needed\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n left: tokens.$ifxSpace200;\n /* Adjust this value to control the icon's left offset */\n transition: .3s;\n color: tokens.$ifxColorEngineering400;\n }\n\n & .textInput__bottom-wrapper-caption {\n font-style: normal;\n font-weight: 400;\n font-size: tokens.$ifxFontSizeXs;\n line-height: tokens.$ifxLineHeightXs;\n letter-spacing: 0.2px;\n color: tokens.$ifxColorBaseBlack;\n flex: none;\n order: 1;\n align-self: stretch;\n flex-grow: 0;\n\n &.error {\n color: #CD002F;\n\n }\n\n &.disabled {\n color: tokens.$ifxColorEngineering500;\n }\n }\n\n \n }\n .delete-icon {\n position: absolute;\n right: tokens.$ifxSpace200;\n\n :hover {\n cursor: pointer;\n }\n }\n}","import { Component, h, Event, Element, Prop, EventEmitter, Watch, Method, AttachInternals, State } 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-text-field',\n styleUrl: 'text-field.scss',\n shadow: true,\n // formAssociated: true\n})\n\nexport class TextField {\n private inputElement: HTMLInputElement;\n @Element() el;\n @Prop() placeholder: string = \"Placeholder\"\n @Prop({ mutable: true }) value: string = '';\n @Prop() error: boolean = false;\n @Prop() label: string = \"\";\n @Prop() icon: string = \"\";\n @Prop() caption: string = \"\";\n @Prop() size: string = 'm';\n @Prop() required: boolean = false;\n @Prop() optional: boolean = false;\n @Prop() success: boolean = false;\n @Prop() disabled: boolean = false;\n @Prop() maxlength?: number;\n @Prop() showDeleteIcon: boolean = false;\n @Prop() autocomplete: string = 'on'\n @Prop() type: 'text' | 'password' = 'text';\n @Prop() internalId: string = \"text-field\"\n @State() internalType: string;\n @Event() ifxInput: EventEmitter<String>;\n // @Prop({ reflect: true })\n // resetOnSubmit: boolean = false;\n\n @AttachInternals() internals: ElementInternals;\n\n\n @Watch('value')\n valueWatcher(newValue: string) {\n if (newValue !== this.inputElement.value) {\n this.inputElement.value = newValue;\n }\n }\n\n @Method()\n async reset() {\n this.value = '';\n this.inputElement.value = '';\n }\n\n handleDeleteContent() {\n this.reset();\n this.ifxInput.emit(this.value);\n }\n\n handleInput() {\n const query = this.inputElement.value;\n this.value = query; // update the value property when input changes\n //this.internals.setFormValue(query) // update form value\n this.ifxInput.emit(this.value);\n }\n\n handleTypeProp() { \n this.internalType = this.type === 'text' || this.type === 'password' ? this.type : 'text'\n }\n\n // formResetCallback() {\n // this.internals.setValidity({});\n // this.internals.setFormValue(\"\");\n // }\n\n componentWillLoad() { \n this.handleTypeProp()\n }\n\n async componentDidLoad() { \n if(!isNestedInIfxComponent(this.el)) { \n const framework = detectFramework();\n trackComponent('ifx-text-field', await framework)\n }\n }\n\n render() {\n return (\n <div aria-label=\"a text field for user input\" aria-value={this.value} aria-disabled={this.disabled} class={`textInput__container ${this.disabled ? 'disabled' : \"\"}`}>\n <div class=\"textInput__top-wrapper\">\n <label htmlFor={this.internalId}>\n <slot></slot>\n {this.optional && this.required ? (\n <span class=\"optional-required\">(optional) *</span>\n ) : this.optional ? (\n <span class=\"optional\">(optional)</span>\n ) : this.required ? (\n <span class={`required ${this.error ? 'error' : \"\"}`}>*</span>\n ) : null}\n </label>\n </div>\n\n <div class=\"textInput__bottom-wrapper\">\n <div class=\"input-container\">\n {this.icon && (\n <ifx-icon class='input-icon' icon={this.icon} />\n )}\n <input\n ref={(el) => (this.inputElement = el)}\n disabled={this.disabled}\n autocomplete={this.autocomplete}\n type={this.internalType}\n id={this.internalId}\n value={this.value}\n onInput={() => this.handleInput()}\n placeholder={this.placeholder}\n maxlength={this.maxlength}\n class={\n `${this.icon ? 'icon' : \"\"}\n ${this.error ? 'error' : \"\"} \n ${this.size === \"s\" ? \"input-s\" : \"\"}\n ${this.success ? \"success\" : \"\"}`} />\n\n { (this.showDeleteIcon && this.value) && (\n <ifx-icon class=\"delete-icon\" icon=\"cRemove16\" onClick={() => this.handleDeleteContent()}></ifx-icon> \n )}\n </div>\n {this.caption && !this.error &&\n <div class={`textInput__bottom-wrapper-caption ${this.disabled} ? disabled : \"\"`}>\n {this.caption}\n </div>}\n {this.error &&\n <div class=\"textInput__bottom-wrapper-caption error\">\n {this.caption}\n </div>}\n </div>\n </div>\n );\n }\n}\n"],"mappings":"oMAAA,MAAMA,EAAa,ovB,MCWNC,EAAO,MALpB,WAAAC,CAAAC,G,UASUC,KAAQC,SAAY,KAqC7B,CAnCC,sBAAMC,GACJ,IAAIC,EAAuBH,KAAKI,IAAK,CACnC,MAAMC,EAAYC,IAClBC,EAAe,oBAAqBF,E,EAIxC,MAAAG,GACE,OACEC,EAAA,OAAAC,IAAA,wDAAgB,uCAAuCC,MAAOX,KAAKY,iBACjEH,EAAA,OAAAC,IAAA,2CAAKC,MAAO,GAAGX,KAAKa,UAAY,QAAU,SAAW,MAAMb,KAAKC,SAAW,WAAa,OACvFD,KAAKa,UAAY,SACbJ,EAAA,OAAAC,IAAA,2CAAKC,MAAO,iBAAiBX,KAAKC,SAAW,WAAa,MAAMD,KAAKc,kBACtEL,EAAA,OAAAC,IAAA,2CAAKK,MAAM,KAAKC,OAAO,KAAKC,QAAQ,YAAYC,KAAK,OAAOC,MAAM,8BAChEV,EAAG,KAAAC,IAAA,2CAAAU,GAAG,qBACJX,EAAA,QAAAC,IAAA,2CAAMU,GAAG,SAASC,EAAE,4vC,CAQlC,YAAAP,GACE,MAAO,GAAGd,KAAKsB,SAAW,IACtB,IACA,E,CAGN,aAAAV,GACE,OAAOW,EACL,UACAvB,KAAKsB,MAAQ,WAAWtB,KAAKc,iB,qCCjDnC,MAAMU,EAAe,2qH,MCYRC,EAAS,MAPtB,WAAA3B,CAAAC,G,6MAUUC,KAAW0B,YAAW,cACL1B,KAAK2B,MAAW,GACjC3B,KAAK4B,MAAY,MACjB5B,KAAK6B,MAAW,GAChB7B,KAAI8B,KAAW,GACf9B,KAAO+B,QAAW,GAClB/B,KAAIsB,KAAW,IACftB,KAAQgC,SAAY,MACpBhC,KAAQiC,SAAY,MACpBjC,KAAOkC,QAAY,MACnBlC,KAAQmC,SAAY,MAEpBnC,KAAcoC,eAAY,MAC1BpC,KAAYqC,aAAW,KACvBrC,KAAIsC,KAAwB,OAC5BtC,KAAUuC,WAAW,YA2G9B,CAjGC,YAAAC,CAAaC,GACX,GAAIA,IAAazC,KAAK0C,aAAaf,MAAO,CACxC3B,KAAK0C,aAAaf,MAAQc,C,EAK9B,WAAME,GACJ3C,KAAK2B,MAAQ,GACb3B,KAAK0C,aAAaf,MAAQ,E,CAG5B,mBAAAiB,GACE5C,KAAK2C,QACL3C,KAAK6C,SAASC,KAAK9C,KAAK2B,M,CAG1B,WAAAoB,GACE,MAAMC,EAAQhD,KAAK0C,aAAaf,MAChC3B,KAAK2B,MAAQqB,EAEbhD,KAAK6C,SAASC,KAAK9C,KAAK2B,M,CAG1B,cAAAsB,GACCjD,KAAKkD,aAAelD,KAAKsC,OAAS,QAAUtC,KAAKsC,OAAS,WAAatC,KAAKsC,KAAO,M,CAQpF,iBAAAa,GACEnD,KAAKiD,gB,CAGP,sBAAM/C,GACJ,IAAIC,EAAuBH,KAAKI,IAAK,CACnC,MAAMC,EAAYC,IAClBC,EAAe,uBAAwBF,E,EAI3C,MAAAG,GACE,OACEC,EAAgB,OAAAC,IAAA,sFAA0C,aAAAV,KAAK2B,MAAsB,gBAAA3B,KAAKmC,SAAUxB,MAAO,wBAAwBX,KAAKmC,SAAW,WAAa,MAC9J1B,EAAK,OAAAC,IAAA,2CAAAC,MAAM,0BACTF,EAAA,SAAAC,IAAA,2CAAO0C,QAASpD,KAAKuC,YACnB9B,EAAa,QAAAC,IAAA,6CACZV,KAAKiC,UAAYjC,KAAKgC,SACrBvB,EAAM,QAAAE,MAAM,qBAAmB,gBAC7BX,KAAKiC,SACPxB,EAAA,QAAME,MAAM,YAA4B,cACtCX,KAAKgC,SACPvB,EAAM,QAAAE,MAAO,YAAYX,KAAK4B,MAAQ,QAAU,MAAc,KAC5D,OAIRnB,EAAK,OAAAC,IAAA,2CAAAC,MAAM,6BACTF,EAAK,OAAAC,IAAA,2CAAAC,MAAM,mBACRX,KAAK8B,MACJrB,EAAA,YAAAC,IAAA,2CAAUC,MAAM,aAAamB,KAAM9B,KAAK8B,OAE1CrB,EAAA,SAAAC,IAAA,2CACE2C,IAAMjD,GAAQJ,KAAK0C,aAAetC,EAClC+B,SAAUnC,KAAKmC,SACfE,aAAcrC,KAAKqC,aACnBC,KAAMtC,KAAKkD,aACX9B,GAAIpB,KAAKuC,WACTZ,MAAO3B,KAAK2B,MACZ2B,QAAS,IAAMtD,KAAK+C,cACpBrB,YAAa1B,KAAK0B,YAClB6B,UAAWvD,KAAKuD,UAChB5C,MACE,GAAGX,KAAK8B,KAAO,OAAS,uBACtB9B,KAAK4B,MAAQ,QAAU,sBACzB5B,KAAKsB,OAAS,IAAM,UAAY,qBAChCtB,KAAKkC,QAAU,UAAY,OAE1BlC,KAAKoC,gBAAkBpC,KAAK2B,OAC7BlB,EAAU,YAAAC,IAAA,2CAAAC,MAAM,cAAcmB,KAAK,YAAY0B,QAAS,IAAMxD,KAAK4C,yBAGxE5C,KAAK+B,UAAY/B,KAAK4B,OACrBnB,EAAK,OAAAC,IAAA,2CAAAC,MAAO,qCAAqCX,KAAKmC,4BACnDnC,KAAK+B,SAET/B,KAAK4B,OACJnB,EAAK,OAAAC,IAAA,2CAAAC,MAAM,2CACRX,KAAK+B,U","ignoreList":[]}