@siemens/ix 4.0.0 → 4.1.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 (735) hide show
  1. package/components/ix-action-card.js +1 -1
  2. package/components/ix-application-header.js +5 -5
  3. package/components/ix-application-switch-modal.js +5 -5
  4. package/components/ix-avatar.js +1 -1
  5. package/components/ix-blind.js +1 -1
  6. package/components/ix-breadcrumb-item.js +1 -1
  7. package/components/ix-breadcrumb.js +4 -4
  8. package/components/ix-button.js +1 -1
  9. package/components/ix-card-list.js +4 -4
  10. package/components/ix-category-filter.js +18 -12
  11. package/components/ix-category-filter.js.map +1 -1
  12. package/components/ix-checkbox-group.js +4 -4
  13. package/components/ix-checkbox.js +1 -1
  14. package/components/ix-chip.js +4 -4
  15. package/components/ix-content-header.js +3 -3
  16. package/components/ix-custom-field.js +4 -4
  17. package/components/ix-date-dropdown.js +9 -9
  18. package/components/ix-date-input.js +30 -14
  19. package/components/ix-date-input.js.map +1 -1
  20. package/components/ix-date-picker.js +1 -1
  21. package/components/ix-date-time-card.js +1 -1
  22. package/components/ix-datetime-picker.js +12 -12
  23. package/components/ix-datetime-picker.js.map +1 -1
  24. package/components/ix-divider.js +1 -1
  25. package/components/ix-drawer.js +7 -7
  26. package/components/ix-dropdown-button.js +7 -7
  27. package/components/ix-dropdown-header.js +2 -2
  28. package/components/ix-dropdown-item.js +1 -1
  29. package/components/ix-dropdown-quick-actions.js +1 -1
  30. package/components/ix-dropdown.js +1 -1
  31. package/components/ix-empty-state.js +4 -4
  32. package/components/ix-event-list-item.js +4 -4
  33. package/components/ix-event-list.js +2 -2
  34. package/components/ix-expanding-search.js +6 -6
  35. package/components/ix-field-label.js +1 -1
  36. package/components/ix-field-wrapper.js +1 -1
  37. package/components/ix-filter-chip.js +1 -1
  38. package/components/ix-flip-tile-content.js +1 -1
  39. package/components/ix-flip-tile.js +5 -5
  40. package/components/ix-group-context-menu.js +1 -1
  41. package/components/ix-group.js +11 -11
  42. package/components/ix-helper-text.js +3 -3
  43. package/components/ix-icon-button.js +1 -1
  44. package/components/ix-icon-toggle-button.js +2 -2
  45. package/components/ix-input-group.js +1 -1
  46. package/components/ix-input.js +23 -12
  47. package/components/ix-input.js.map +1 -1
  48. package/components/ix-key-value-list.js +1 -1
  49. package/components/ix-key-value.js +1 -1
  50. package/components/ix-kpi.js +3 -3
  51. package/components/ix-layout-auto.js +1 -1
  52. package/components/ix-layout-grid.js +1 -1
  53. package/components/ix-link-button.js +4 -4
  54. package/components/ix-link-button.js.map +1 -1
  55. package/components/ix-menu-about-item.js +1 -1
  56. package/components/ix-menu-about-news.js +8 -8
  57. package/components/ix-menu-about.js +10 -8
  58. package/components/ix-menu-about.js.map +1 -1
  59. package/components/ix-menu-avatar-item.js +1 -1
  60. package/components/ix-menu-avatar.js +10 -10
  61. package/components/ix-menu-category.js +11 -11
  62. package/components/ix-menu-expand-icon.js +1 -1
  63. package/components/ix-menu-item.js +1 -1
  64. package/components/ix-menu-settings-item.js +1 -1
  65. package/components/ix-menu-settings.js +1 -1
  66. package/components/ix-menu.js +18 -18
  67. package/components/ix-message-bar.js +3 -3
  68. package/components/ix-modal-content.js +1 -1
  69. package/components/ix-modal-footer.js +1 -1
  70. package/components/ix-modal-header.js +1 -1
  71. package/components/ix-modal-loading.js +2 -2
  72. package/components/ix-modal.js +3 -3
  73. package/components/ix-number-input.js +169 -36
  74. package/components/ix-number-input.js.map +1 -1
  75. package/components/ix-pagination.js +42 -19
  76. package/components/ix-pagination.js.map +1 -1
  77. package/components/ix-pane-layout.js +1 -1
  78. package/components/ix-pane.js +9 -9
  79. package/components/ix-pill.js +6 -6
  80. package/components/ix-progress-indicator.js +5 -5
  81. package/components/ix-push-card.js +2 -2
  82. package/components/ix-radio-group.js +6 -6
  83. package/components/ix-radio.js +4 -4
  84. package/components/ix-row.js +1 -1
  85. package/components/ix-select-item.js +1 -1
  86. package/components/ix-select.js +1 -1
  87. package/components/ix-slider.js +8 -8
  88. package/components/ix-spinner.js +1 -1
  89. package/components/ix-split-button.js +30 -16
  90. package/components/ix-split-button.js.map +1 -1
  91. package/components/ix-tab-item.js +1 -1
  92. package/components/ix-tabs.js +1 -1
  93. package/components/ix-textarea.js +7 -7
  94. package/components/ix-tile.js +4 -4
  95. package/components/ix-time-input.js +31 -15
  96. package/components/ix-time-input.js.map +1 -1
  97. package/components/ix-time-picker.js +1 -1
  98. package/components/ix-toast-container.js +6 -6
  99. package/components/ix-toast.js +1 -1
  100. package/components/ix-toggle-button.js +1 -1
  101. package/components/ix-toggle.js +4 -4
  102. package/components/ix-tooltip.js +1 -1
  103. package/components/ix-tree-item.js +1 -1
  104. package/components/ix-tree.js +2 -2
  105. package/components/ix-typography.js +1 -1
  106. package/components/ix-upload.js +5 -5
  107. package/components/ix-validation-tooltip.js +2 -2
  108. package/components/ix-workflow-step.js +3 -3
  109. package/components/ix-workflow-steps.js +1 -1
  110. package/components/{p-ChZQLy9v.js → p-10zMtvCF.js} +4 -4
  111. package/components/{p-ChZQLy9v.js.map → p-10zMtvCF.js.map} +1 -1
  112. package/components/{p-D8hPr0Kb.js → p-1pd_0dhF.js} +3 -3
  113. package/components/{p-D8hPr0Kb.js.map → p-1pd_0dhF.js.map} +1 -1
  114. package/components/{p-axBTucsn.js → p-B006bhbX.js} +3 -3
  115. package/components/{p-axBTucsn.js.map → p-B006bhbX.js.map} +1 -1
  116. package/components/{p-B-mB5dVY.js → p-BBwXlKhE.js} +3 -3
  117. package/components/{p-B-mB5dVY.js.map → p-BBwXlKhE.js.map} +1 -1
  118. package/components/{p-DInJFFDT.js → p-BEDohapR.js} +4 -4
  119. package/components/{p-DInJFFDT.js.map → p-BEDohapR.js.map} +1 -1
  120. package/components/{p-DkDGUG2W.js → p-BI7B-PUA.js} +4 -4
  121. package/components/{p-DkDGUG2W.js.map → p-BI7B-PUA.js.map} +1 -1
  122. package/components/{p-DvD1nW88.js → p-BLeWaHpy.js} +5 -5
  123. package/components/{p-DvD1nW88.js.map → p-BLeWaHpy.js.map} +1 -1
  124. package/components/{p-CFDRGf6r.js → p-BR5ayBuu.js} +3 -3
  125. package/components/{p-CFDRGf6r.js.map → p-BR5ayBuu.js.map} +1 -1
  126. package/components/{p-Cj9oZ8ym.js → p-BVUD9f4A.js} +8 -8
  127. package/components/{p-Cj9oZ8ym.js.map → p-BVUD9f4A.js.map} +1 -1
  128. package/components/{p-CvuFiT5X.js → p-BZLbfHdO.js} +66 -25
  129. package/components/p-BZLbfHdO.js.map +1 -0
  130. package/components/{p-BHcP7TVn.js → p-Bk0vKwmt.js} +4 -4
  131. package/components/{p-BHcP7TVn.js.map → p-Bk0vKwmt.js.map} +1 -1
  132. package/components/{p-GPVWLtS3.js → p-Bye33cYU.js} +7 -7
  133. package/components/{p-GPVWLtS3.js.map → p-Bye33cYU.js.map} +1 -1
  134. package/components/{p-4kEXJDiJ.js → p-Bz7hxKB6.js} +4 -4
  135. package/components/{p-4kEXJDiJ.js.map → p-Bz7hxKB6.js.map} +1 -1
  136. package/components/{p-D6KzHh-w.js → p-C4KxNeD2.js} +3 -3
  137. package/components/{p-D6KzHh-w.js.map → p-C4KxNeD2.js.map} +1 -1
  138. package/components/{p-DWRnKXkl.js → p-C6_1qmP4.js} +3 -3
  139. package/components/{p-DWRnKXkl.js.map → p-C6_1qmP4.js.map} +1 -1
  140. package/components/{p-OLe05BAC.js → p-COWPG_SD.js} +3 -3
  141. package/components/p-COWPG_SD.js.map +1 -0
  142. package/components/{p-C56HnkHy.js → p-Cc4uqNv5.js} +18 -11
  143. package/components/p-Cc4uqNv5.js.map +1 -0
  144. package/components/{p-FWLjfP4_.js → p-CjDPpSJX.js} +13 -13
  145. package/components/p-CjDPpSJX.js.map +1 -0
  146. package/components/{p-DkKuaBAh.js → p-ClQxnZ3d.js} +6 -6
  147. package/components/{p-DkKuaBAh.js.map → p-ClQxnZ3d.js.map} +1 -1
  148. package/components/{p-CL7Uj2A_.js → p-ColBHyXN.js} +5 -5
  149. package/components/{p-CL7Uj2A_.js.map → p-ColBHyXN.js.map} +1 -1
  150. package/components/{p-ChFNWyCb.js → p-CrqgL2m1.js} +8 -4
  151. package/components/p-CrqgL2m1.js.map +1 -0
  152. package/components/{p-De0habf3.js → p-CvD2yWeJ.js} +4 -4
  153. package/components/{p-De0habf3.js.map → p-CvD2yWeJ.js.map} +1 -1
  154. package/components/{p-B1sSJ2R2.js → p-DC9anobw.js} +6 -6
  155. package/components/{p-B1sSJ2R2.js.map → p-DC9anobw.js.map} +1 -1
  156. package/components/{p-BTR8UA6s.js → p-DSTHZygb.js} +8 -8
  157. package/components/{p-BTR8UA6s.js.map → p-DSTHZygb.js.map} +1 -1
  158. package/components/{p-Ow_osSm5.js → p-DXFN8JXp.js} +20 -9
  159. package/components/p-DXFN8JXp.js.map +1 -0
  160. package/components/{p-BtDCIGt3.js → p-Db0RazS2.js} +3 -3
  161. package/components/{p-BtDCIGt3.js.map → p-Db0RazS2.js.map} +1 -1
  162. package/components/{p-DTo0UW1Q.js → p-DlVaL0Yi.js} +7 -7
  163. package/components/{p-DTo0UW1Q.js.map → p-DlVaL0Yi.js.map} +1 -1
  164. package/components/{p-LVGd1t9U.js → p-Dp03DeD0.js} +5 -5
  165. package/components/{p-LVGd1t9U.js.map → p-Dp03DeD0.js.map} +1 -1
  166. package/components/{p-CMC0yuht.js → p-Dy6xvLn4.js} +4 -4
  167. package/components/{p-CMC0yuht.js.map → p-Dy6xvLn4.js.map} +1 -1
  168. package/components/{p-BAG4Ixzu.js → p-DyGPjxFm.js} +5 -5
  169. package/components/{p-BAG4Ixzu.js.map → p-DyGPjxFm.js.map} +1 -1
  170. package/components/{p-CwFNYtOl.js → p-PpLLlogo.js} +5 -5
  171. package/components/{p-CwFNYtOl.js.map → p-PpLLlogo.js.map} +1 -1
  172. package/components/{p-S6nC3Yb4.js → p-g2Y5blor.js} +68 -43
  173. package/components/p-g2Y5blor.js.map +1 -0
  174. package/components/{p-CDPfohEH.js → p-kJlC6ZD0.js} +62 -41
  175. package/components/p-kJlC6ZD0.js.map +1 -0
  176. package/dist/cjs/{helper-text-util-BlElJLxk.js → helper-text-util-D2W-yNmK.js} +8 -4
  177. package/dist/cjs/helper-text-util-D2W-yNmK.js.map +1 -0
  178. package/dist/cjs/{input.util-4AhBphgX.js → input.fc-B5JMSZbY.js} +68 -42
  179. package/dist/cjs/input.fc-B5JMSZbY.js.map +1 -0
  180. package/dist/cjs/ix-avatar_2.cjs.entry.js +1 -1
  181. package/dist/cjs/ix-category-filter.cjs.entry.js +14 -8
  182. package/dist/cjs/ix-category-filter.entry.cjs.js.map +1 -1
  183. package/dist/cjs/ix-col.ix-date-picker.ix-layout-grid.ix-row.entry.cjs.js.map +1 -1
  184. package/dist/cjs/ix-col_4.cjs.entry.js +9 -9
  185. package/dist/cjs/ix-date-input.cjs.entry.js +22 -8
  186. package/dist/cjs/ix-date-input.entry.cjs.js.map +1 -1
  187. package/dist/cjs/ix-date-time-card.cjs.entry.js +1 -1
  188. package/dist/cjs/ix-date-time-card.entry.cjs.js.map +1 -1
  189. package/dist/cjs/ix-datetime-picker.cjs.entry.js +2 -2
  190. package/dist/cjs/ix-datetime-picker.entry.cjs.js.map +1 -1
  191. package/dist/cjs/ix-divider.cjs.entry.js +1 -1
  192. package/dist/cjs/ix-drawer.cjs.entry.js +5 -5
  193. package/dist/cjs/ix-dropdown-button.cjs.entry.js +3 -3
  194. package/dist/cjs/ix-dropdown-header.cjs.entry.js +1 -1
  195. package/dist/cjs/ix-dropdown-item.cjs.entry.js +3 -3
  196. package/dist/cjs/ix-dropdown-quick-actions.cjs.entry.js +1 -1
  197. package/dist/cjs/ix-dropdown.cjs.entry.js +2 -2
  198. package/dist/cjs/ix-empty-state.cjs.entry.js +1 -1
  199. package/dist/cjs/ix-event-list-item.cjs.entry.js +4 -4
  200. package/dist/cjs/ix-event-list.cjs.entry.js +2 -2
  201. package/dist/cjs/ix-expanding-search.cjs.entry.js +4 -4
  202. package/dist/cjs/ix-field-label_2.cjs.entry.js +4 -4
  203. package/dist/cjs/ix-filter-chip_2.cjs.entry.js +2 -2
  204. package/dist/cjs/ix-flip-tile-content.cjs.entry.js +1 -1
  205. package/dist/cjs/ix-flip-tile.cjs.entry.js +3 -3
  206. package/dist/cjs/ix-group-context-menu_2.cjs.entry.js +1 -1
  207. package/dist/cjs/ix-group.cjs.entry.js +8 -8
  208. package/dist/cjs/ix-helper-text.cjs.entry.js +2 -2
  209. package/dist/cjs/ix-icon-button_2.cjs.entry.js +2 -2
  210. package/dist/cjs/ix-icon-toggle-button.cjs.entry.js +1 -1
  211. package/dist/cjs/ix-input-group.cjs.entry.js +1 -1
  212. package/dist/cjs/ix-input.cjs.entry.js +20 -11
  213. package/dist/cjs/ix-input.entry.cjs.js.map +1 -1
  214. package/dist/cjs/ix-key-value-list.cjs.entry.js +1 -1
  215. package/dist/cjs/ix-key-value.cjs.entry.js +1 -1
  216. package/dist/cjs/ix-kpi.cjs.entry.js +3 -3
  217. package/dist/cjs/ix-layout-auto.cjs.entry.js +1 -1
  218. package/dist/cjs/ix-link-button.cjs.entry.js +4 -4
  219. package/dist/cjs/ix-link-button.entry.cjs.js.map +1 -1
  220. package/dist/cjs/ix-menu-about-item.cjs.entry.js +1 -1
  221. package/dist/cjs/ix-menu-about-news.cjs.entry.js +4 -4
  222. package/dist/cjs/ix-menu-about.cjs.entry.js +6 -4
  223. package/dist/cjs/ix-menu-about.entry.cjs.js.map +1 -1
  224. package/dist/cjs/ix-menu-avatar.cjs.entry.js +2 -2
  225. package/dist/cjs/ix-menu-category.cjs.entry.js +5 -5
  226. package/dist/cjs/ix-menu-expand-icon.cjs.entry.js +1 -1
  227. package/dist/cjs/ix-menu-item.cjs.entry.js +4 -4
  228. package/dist/cjs/{ix-menu-settings-Cdqo0r8E.js → ix-menu-settings-CtWl0bME.js} +14 -7
  229. package/dist/cjs/ix-menu-settings-CtWl0bME.js.map +1 -0
  230. package/dist/cjs/ix-menu-settings-item.cjs.entry.js +1 -1
  231. package/dist/cjs/ix-menu-settings.cjs.entry.js +1 -1
  232. package/dist/cjs/ix-menu.cjs.entry.js +12 -12
  233. package/dist/cjs/ix-message-bar.cjs.entry.js +1 -1
  234. package/dist/cjs/ix-modal-content_2.cjs.entry.js +2 -2
  235. package/dist/cjs/ix-modal-footer.cjs.entry.js +1 -1
  236. package/dist/cjs/ix-modal-loading.cjs.entry.js +1 -1
  237. package/dist/cjs/ix-modal.cjs.entry.js +3 -3
  238. package/dist/cjs/ix-number-input.cjs.entry.js +161 -33
  239. package/dist/cjs/ix-number-input.entry.cjs.js.map +1 -1
  240. package/dist/cjs/ix-pagination.cjs.entry.js +29 -7
  241. package/dist/cjs/ix-pagination.entry.cjs.js.map +1 -1
  242. package/dist/cjs/ix-pane-layout.cjs.entry.js +1 -1
  243. package/dist/cjs/ix-pane.cjs.entry.js +6 -6
  244. package/dist/cjs/ix-pill.cjs.entry.js +4 -4
  245. package/dist/cjs/ix-progress-indicator.cjs.entry.js +3 -3
  246. package/dist/cjs/ix-push-card.cjs.entry.js +1 -1
  247. package/dist/cjs/ix-radio-group.cjs.entry.js +2 -2
  248. package/dist/cjs/ix-radio.cjs.entry.js +3 -3
  249. package/dist/cjs/ix-select.cjs.entry.js +52 -13
  250. package/dist/cjs/ix-select.entry.cjs.js.map +1 -1
  251. package/dist/cjs/ix-slider.cjs.entry.js +6 -6
  252. package/dist/cjs/ix-split-button.cjs.entry.js +24 -12
  253. package/dist/cjs/ix-split-button.entry.cjs.js.map +1 -1
  254. package/dist/cjs/ix-tab-item_2.cjs.entry.js +5 -5
  255. package/dist/cjs/ix-textarea.cjs.entry.js +5 -5
  256. package/dist/cjs/ix-textarea.entry.cjs.js.map +1 -1
  257. package/dist/cjs/ix-tile.cjs.entry.js +4 -4
  258. package/dist/cjs/ix-time-input.cjs.entry.js +22 -8
  259. package/dist/cjs/ix-time-input.entry.cjs.js.map +1 -1
  260. package/dist/cjs/ix-time-picker.cjs.entry.js +56 -35
  261. package/dist/cjs/ix-time-picker.entry.cjs.js.map +1 -1
  262. package/dist/cjs/ix-toast-container.cjs.entry.js +2 -2
  263. package/dist/cjs/ix-toast.cjs.entry.js +2 -2
  264. package/dist/cjs/ix-toggle.cjs.entry.js +3 -3
  265. package/dist/cjs/ix-tooltip.cjs.entry.js +17 -6
  266. package/dist/cjs/ix-tooltip.entry.cjs.js.map +1 -1
  267. package/dist/cjs/ix-tree-item.cjs.entry.js +4 -4
  268. package/dist/cjs/ix-tree.cjs.entry.js +1 -1
  269. package/dist/cjs/ix-typography.cjs.entry.js +1 -1
  270. package/dist/cjs/ix-upload.cjs.entry.js +3 -3
  271. package/dist/cjs/ix-validation-tooltip.cjs.entry.js +2 -2
  272. package/dist/cjs/ix-workflow-step.cjs.entry.js +3 -3
  273. package/dist/cjs/ix-workflow-steps.cjs.entry.js +1 -1
  274. package/dist/cjs/loader.cjs.js +1 -1
  275. package/dist/cjs/siemens-ix.cjs.js +1 -1
  276. package/dist/collection/components/category-filter/category-filter.css +321 -50
  277. package/dist/collection/components/category-filter/category-filter.js +13 -7
  278. package/dist/collection/components/category-filter/category-filter.js.map +1 -1
  279. package/dist/collection/components/date-input/date-input.js +58 -4
  280. package/dist/collection/components/date-input/date-input.js.map +1 -1
  281. package/dist/collection/components/date-picker/date-picker.css +6 -8
  282. package/dist/collection/components/date-picker/date-picker.js +5 -5
  283. package/dist/collection/components/date-picker/date-picker.js.map +1 -1
  284. package/dist/collection/components/date-time-card/date-time-card.css +3 -2
  285. package/dist/collection/components/datetime-picker/datetime-picker.css +12 -1
  286. package/dist/collection/components/datetime-picker/datetime-picker.js +1 -1
  287. package/dist/collection/components/datetime-picker/datetime-picker.js.map +1 -1
  288. package/dist/collection/components/divider/divider.js +1 -1
  289. package/dist/collection/components/drawer/drawer.js +5 -5
  290. package/dist/collection/components/dropdown/dropdown.js +2 -2
  291. package/dist/collection/components/dropdown-button/dropdown-button.js +3 -3
  292. package/dist/collection/components/dropdown-header/dropdown-header.js +1 -1
  293. package/dist/collection/components/dropdown-item/dropdown-item.js +3 -3
  294. package/dist/collection/components/dropdown-quick-actions/dropdown-quick-actions.js +1 -1
  295. package/dist/collection/components/empty-state/empty-state.js +1 -1
  296. package/dist/collection/components/event-list/event-list.js +2 -2
  297. package/dist/collection/components/event-list-item/event-list-item.js +4 -4
  298. package/dist/collection/components/expanding-search/expanding-search.js +4 -4
  299. package/dist/collection/components/field-label/field-label.js +1 -1
  300. package/dist/collection/components/field-wrapper/field-wrapper.js +2 -2
  301. package/dist/collection/components/field-wrapper/helper-text-util.js +6 -2
  302. package/dist/collection/components/field-wrapper/helper-text-util.js.map +1 -1
  303. package/dist/collection/components/filter-chip/filter-chip.js +1 -1
  304. package/dist/collection/components/flip-tile/flip-tile.js +3 -3
  305. package/dist/collection/components/flip-tile-content/flip-tile-content.js +1 -1
  306. package/dist/collection/components/group/group-context-menu.js +1 -1
  307. package/dist/collection/components/group/group.js +8 -8
  308. package/dist/collection/components/helper-text/helper-text.js +1 -1
  309. package/dist/collection/components/icon-button/icon-button.js +1 -1
  310. package/dist/collection/components/icon-toggle-button/icon-toggle-button.js +1 -1
  311. package/dist/collection/components/input/input.fc.js +10 -1
  312. package/dist/collection/components/input/input.fc.js.map +1 -1
  313. package/dist/collection/components/input/input.js +54 -5
  314. package/dist/collection/components/input/input.js.map +1 -1
  315. package/dist/collection/components/input/input.util.js +20 -3
  316. package/dist/collection/components/input/input.util.js.map +1 -1
  317. package/dist/collection/components/input/number-input.js +228 -36
  318. package/dist/collection/components/input/number-input.js.map +1 -1
  319. package/dist/collection/components/input/textarea.js +2 -2
  320. package/dist/collection/components/input-group/input-group.js +1 -1
  321. package/dist/collection/components/key-value/key-value.js +1 -1
  322. package/dist/collection/components/key-value-list/key-value-list.js +1 -1
  323. package/dist/collection/components/kpi/kpi.js +3 -3
  324. package/dist/collection/components/layout-auto/layout-auto.js +1 -1
  325. package/dist/collection/components/layout-grid/layout-grid.js +2 -2
  326. package/dist/collection/components/link-button/link-button.css +2 -8
  327. package/dist/collection/components/link-button/link-button.js +3 -3
  328. package/dist/collection/components/menu/menu-expand-icon.js +1 -1
  329. package/dist/collection/components/menu/menu.js +12 -12
  330. package/dist/collection/components/menu-about/menu-about.js +6 -4
  331. package/dist/collection/components/menu-about/menu-about.js.map +1 -1
  332. package/dist/collection/components/menu-about-item/menu-about-item.js +1 -1
  333. package/dist/collection/components/menu-about-news/menu-about-news.js +4 -4
  334. package/dist/collection/components/menu-avatar/menu-avatar.js +2 -2
  335. package/dist/collection/components/menu-avatar-item/menu-avatar-item.js +1 -1
  336. package/dist/collection/components/menu-category/menu-category.js +5 -5
  337. package/dist/collection/components/menu-item/menu-item.js +4 -4
  338. package/dist/collection/components/menu-settings/menu-settings.js +6 -4
  339. package/dist/collection/components/menu-settings/menu-settings.js.map +1 -1
  340. package/dist/collection/components/menu-settings-item/menu-settings-item.js +1 -1
  341. package/dist/collection/components/message-bar/message-bar.js +1 -1
  342. package/dist/collection/components/modal/modal.js +3 -3
  343. package/dist/collection/components/modal-content/modal-content.js +1 -1
  344. package/dist/collection/components/modal-footer/modal-footer.js +1 -1
  345. package/dist/collection/components/modal-header/modal-header.js +1 -1
  346. package/dist/collection/components/modal-loading/modal-loading.js +1 -1
  347. package/dist/collection/components/pagination/pagination.js +52 -7
  348. package/dist/collection/components/pagination/pagination.js.map +1 -1
  349. package/dist/collection/components/pane/pane.js +6 -6
  350. package/dist/collection/components/pane-layout/pane-layout.js +1 -1
  351. package/dist/collection/components/pill/pill.js +4 -4
  352. package/dist/collection/components/progress-indicator/progress-indicator.js +3 -3
  353. package/dist/collection/components/push-card/push-card.js +1 -1
  354. package/dist/collection/components/radio/radio.js +3 -3
  355. package/dist/collection/components/radio-group/radio-group.js +2 -2
  356. package/dist/collection/components/row/row.js +1 -1
  357. package/dist/collection/components/select/select.js +94 -14
  358. package/dist/collection/components/select/select.js.map +1 -1
  359. package/dist/collection/components/select-item/select-item.js +1 -1
  360. package/dist/collection/components/slider/slider.js +6 -6
  361. package/dist/collection/components/spinner/spinner.js +1 -1
  362. package/dist/collection/components/split-button/split-button.js +70 -12
  363. package/dist/collection/components/split-button/split-button.js.map +1 -1
  364. package/dist/collection/components/tab-item/tab-item.js +3 -3
  365. package/dist/collection/components/tabs/tabs.js +2 -2
  366. package/dist/collection/components/tile/tile.js +4 -4
  367. package/dist/collection/components/time-input/time-input.js +59 -5
  368. package/dist/collection/components/time-input/time-input.js.map +1 -1
  369. package/dist/collection/components/time-picker/time-picker.css +20 -52
  370. package/dist/collection/components/time-picker/time-picker.js +58 -38
  371. package/dist/collection/components/time-picker/time-picker.js.map +1 -1
  372. package/dist/collection/components/time-picker/time-picker.types.js.map +1 -1
  373. package/dist/collection/components/toast/toast-container.js +2 -2
  374. package/dist/collection/components/toast/toast.js +2 -2
  375. package/dist/collection/components/toggle/toggle.js +3 -3
  376. package/dist/collection/components/tooltip/tooltip.css +2 -3
  377. package/dist/collection/components/tooltip/tooltip.js +17 -6
  378. package/dist/collection/components/tooltip/tooltip.js.map +1 -1
  379. package/dist/collection/components/tree/tree.js +1 -1
  380. package/dist/collection/components/tree-item/tree-item.js +4 -4
  381. package/dist/collection/components/typography/typography.js +1 -1
  382. package/dist/collection/components/upload/upload.js +3 -3
  383. package/dist/collection/components/utils/menu-tabs/menu-tabs-utils.js +6 -1
  384. package/dist/collection/components/utils/menu-tabs/menu-tabs-utils.js.map +1 -1
  385. package/dist/collection/components/validation-tooltip/validation-tooltip.js +2 -2
  386. package/dist/collection/components/workflow-step/workflow-step.js +3 -3
  387. package/dist/collection/components/workflow-steps/workflow-steps.js +1 -1
  388. package/dist/esm/{helper-text-util-BurV4TiQ.js → helper-text-util-gKdL-wH2.js} +8 -4
  389. package/dist/esm/helper-text-util-gKdL-wH2.js.map +1 -0
  390. package/dist/esm/{input.util-VHrSuCP7.js → input.fc-CQbX6V05.js} +68 -43
  391. package/dist/esm/input.fc-CQbX6V05.js.map +1 -0
  392. package/dist/esm/ix-avatar_2.entry.js +1 -1
  393. package/dist/esm/ix-category-filter.entry.js +14 -8
  394. package/dist/esm/ix-category-filter.entry.js.map +1 -1
  395. package/dist/esm/ix-col.ix-date-picker.ix-layout-grid.ix-row.entry.js.map +1 -1
  396. package/dist/esm/ix-col_4.entry.js +9 -9
  397. package/dist/esm/ix-date-input.entry.js +18 -4
  398. package/dist/esm/ix-date-input.entry.js.map +1 -1
  399. package/dist/esm/ix-date-time-card.entry.js +1 -1
  400. package/dist/esm/ix-date-time-card.entry.js.map +1 -1
  401. package/dist/esm/ix-datetime-picker.entry.js +2 -2
  402. package/dist/esm/ix-datetime-picker.entry.js.map +1 -1
  403. package/dist/esm/ix-divider.entry.js +1 -1
  404. package/dist/esm/ix-drawer.entry.js +5 -5
  405. package/dist/esm/ix-dropdown-button.entry.js +3 -3
  406. package/dist/esm/ix-dropdown-header.entry.js +1 -1
  407. package/dist/esm/ix-dropdown-item.entry.js +3 -3
  408. package/dist/esm/ix-dropdown-quick-actions.entry.js +1 -1
  409. package/dist/esm/ix-dropdown.entry.js +2 -2
  410. package/dist/esm/ix-empty-state.entry.js +1 -1
  411. package/dist/esm/ix-event-list-item.entry.js +4 -4
  412. package/dist/esm/ix-event-list.entry.js +2 -2
  413. package/dist/esm/ix-expanding-search.entry.js +4 -4
  414. package/dist/esm/ix-field-label_2.entry.js +4 -4
  415. package/dist/esm/ix-filter-chip_2.entry.js +2 -2
  416. package/dist/esm/ix-flip-tile-content.entry.js +1 -1
  417. package/dist/esm/ix-flip-tile.entry.js +3 -3
  418. package/dist/esm/ix-group-context-menu_2.entry.js +1 -1
  419. package/dist/esm/ix-group.entry.js +8 -8
  420. package/dist/esm/ix-helper-text.entry.js +2 -2
  421. package/dist/esm/ix-icon-button_2.entry.js +2 -2
  422. package/dist/esm/ix-icon-toggle-button.entry.js +1 -1
  423. package/dist/esm/ix-input-group.entry.js +1 -1
  424. package/dist/esm/ix-input.entry.js +15 -6
  425. package/dist/esm/ix-input.entry.js.map +1 -1
  426. package/dist/esm/ix-key-value-list.entry.js +1 -1
  427. package/dist/esm/ix-key-value.entry.js +1 -1
  428. package/dist/esm/ix-kpi.entry.js +3 -3
  429. package/dist/esm/ix-layout-auto.entry.js +1 -1
  430. package/dist/esm/ix-link-button.entry.js +4 -4
  431. package/dist/esm/ix-link-button.entry.js.map +1 -1
  432. package/dist/esm/ix-menu-about-item.entry.js +1 -1
  433. package/dist/esm/ix-menu-about-news.entry.js +4 -4
  434. package/dist/esm/ix-menu-about.entry.js +6 -4
  435. package/dist/esm/ix-menu-about.entry.js.map +1 -1
  436. package/dist/esm/ix-menu-avatar.entry.js +2 -2
  437. package/dist/esm/ix-menu-category.entry.js +5 -5
  438. package/dist/esm/ix-menu-expand-icon.entry.js +1 -1
  439. package/dist/esm/ix-menu-item.entry.js +4 -4
  440. package/dist/esm/{ix-menu-settings-Bif4wByb.js → ix-menu-settings-f9o5GGw5.js} +14 -7
  441. package/dist/esm/ix-menu-settings-f9o5GGw5.js.map +1 -0
  442. package/dist/esm/ix-menu-settings-item.entry.js +1 -1
  443. package/dist/esm/ix-menu-settings.entry.js +1 -1
  444. package/dist/esm/ix-menu.entry.js +12 -12
  445. package/dist/esm/ix-message-bar.entry.js +1 -1
  446. package/dist/esm/ix-modal-content_2.entry.js +2 -2
  447. package/dist/esm/ix-modal-footer.entry.js +1 -1
  448. package/dist/esm/ix-modal-loading.entry.js +1 -1
  449. package/dist/esm/ix-modal.entry.js +3 -3
  450. package/dist/esm/ix-number-input.entry.js +158 -30
  451. package/dist/esm/ix-number-input.entry.js.map +1 -1
  452. package/dist/esm/ix-pagination.entry.js +29 -7
  453. package/dist/esm/ix-pagination.entry.js.map +1 -1
  454. package/dist/esm/ix-pane-layout.entry.js +1 -1
  455. package/dist/esm/ix-pane.entry.js +6 -6
  456. package/dist/esm/ix-pill.entry.js +4 -4
  457. package/dist/esm/ix-progress-indicator.entry.js +3 -3
  458. package/dist/esm/ix-push-card.entry.js +1 -1
  459. package/dist/esm/ix-radio-group.entry.js +2 -2
  460. package/dist/esm/ix-radio.entry.js +3 -3
  461. package/dist/esm/ix-select.entry.js +52 -13
  462. package/dist/esm/ix-select.entry.js.map +1 -1
  463. package/dist/esm/ix-slider.entry.js +6 -6
  464. package/dist/esm/ix-split-button.entry.js +24 -12
  465. package/dist/esm/ix-split-button.entry.js.map +1 -1
  466. package/dist/esm/ix-tab-item_2.entry.js +5 -5
  467. package/dist/esm/ix-textarea.entry.js +3 -3
  468. package/dist/esm/ix-tile.entry.js +4 -4
  469. package/dist/esm/ix-time-input.entry.js +19 -5
  470. package/dist/esm/ix-time-input.entry.js.map +1 -1
  471. package/dist/esm/ix-time-picker.entry.js +56 -35
  472. package/dist/esm/ix-time-picker.entry.js.map +1 -1
  473. package/dist/esm/ix-toast-container.entry.js +2 -2
  474. package/dist/esm/ix-toast.entry.js +2 -2
  475. package/dist/esm/ix-toggle.entry.js +3 -3
  476. package/dist/esm/ix-tooltip.entry.js +17 -6
  477. package/dist/esm/ix-tooltip.entry.js.map +1 -1
  478. package/dist/esm/ix-tree-item.entry.js +4 -4
  479. package/dist/esm/ix-tree.entry.js +1 -1
  480. package/dist/esm/ix-typography.entry.js +1 -1
  481. package/dist/esm/ix-upload.entry.js +3 -3
  482. package/dist/esm/ix-validation-tooltip.entry.js +2 -2
  483. package/dist/esm/ix-workflow-step.entry.js +3 -3
  484. package/dist/esm/ix-workflow-steps.entry.js +1 -1
  485. package/dist/esm/loader.js +1 -1
  486. package/dist/esm/siemens-ix.js +1 -1
  487. package/dist/siemens-ix/ix-category-filter.entry.esm.js.map +1 -1
  488. package/dist/siemens-ix/ix-col.ix-date-picker.ix-layout-grid.ix-row.entry.esm.js.map +1 -1
  489. package/dist/siemens-ix/ix-date-input.entry.esm.js.map +1 -1
  490. package/dist/siemens-ix/ix-date-time-card.entry.esm.js.map +1 -1
  491. package/dist/siemens-ix/ix-datetime-picker.entry.esm.js.map +1 -1
  492. package/dist/siemens-ix/ix-input.entry.esm.js.map +1 -1
  493. package/dist/siemens-ix/ix-link-button.entry.esm.js.map +1 -1
  494. package/dist/siemens-ix/ix-menu-about.entry.esm.js.map +1 -1
  495. package/dist/siemens-ix/ix-number-input.entry.esm.js.map +1 -1
  496. package/dist/siemens-ix/ix-pagination.entry.esm.js.map +1 -1
  497. package/dist/siemens-ix/ix-select.entry.esm.js.map +1 -1
  498. package/dist/siemens-ix/ix-split-button.entry.esm.js.map +1 -1
  499. package/dist/siemens-ix/ix-time-input.entry.esm.js.map +1 -1
  500. package/dist/siemens-ix/ix-time-picker.entry.esm.js.map +1 -1
  501. package/dist/siemens-ix/ix-tooltip.entry.esm.js.map +1 -1
  502. package/dist/siemens-ix/p-0411df39.entry.js +2 -0
  503. package/dist/siemens-ix/p-051f428c.entry.js +2 -0
  504. package/dist/siemens-ix/{p-4288bd66.entry.js.map → p-051f428c.entry.js.map} +1 -1
  505. package/dist/siemens-ix/{p-49843cce.entry.js → p-086d31e7.entry.js} +2 -2
  506. package/dist/siemens-ix/p-086d31e7.entry.js.map +1 -0
  507. package/dist/siemens-ix/{p-9f7f5cd3.entry.js → p-0ce03ad3.entry.js} +2 -2
  508. package/dist/siemens-ix/{p-60d2f3db.entry.js → p-0d621531.entry.js} +2 -2
  509. package/dist/siemens-ix/{p-4a127027.entry.js → p-10f2a239.entry.js} +2 -2
  510. package/dist/siemens-ix/{p-d70cd703.entry.js → p-196cffb5.entry.js} +2 -2
  511. package/dist/siemens-ix/{p-94596bff.entry.js → p-1de1a2bf.entry.js} +2 -2
  512. package/dist/siemens-ix/{p-b7c64537.entry.js → p-2597a988.entry.js} +2 -2
  513. package/dist/siemens-ix/{p-a8f08878.entry.js → p-2ffde2d5.entry.js} +2 -2
  514. package/dist/siemens-ix/p-31a8eaf9.entry.js +2 -0
  515. package/dist/siemens-ix/{p-2e3ac12c.entry.js → p-33fcea65.entry.js} +2 -2
  516. package/dist/siemens-ix/{p-bd2127d0.entry.js → p-367df024.entry.js} +2 -2
  517. package/dist/siemens-ix/{p-65c759c5.entry.js → p-3751c675.entry.js} +2 -2
  518. package/dist/siemens-ix/{p-76bd4cf9.entry.js → p-37bd983a.entry.js} +2 -2
  519. package/dist/siemens-ix/{p-d2831f7b.entry.js → p-38e45020.entry.js} +2 -2
  520. package/dist/siemens-ix/{p-d997238b.entry.js → p-396e1f3d.entry.js} +2 -2
  521. package/dist/siemens-ix/{p-0fd006b9.entry.js → p-3b7573d6.entry.js} +2 -2
  522. package/dist/siemens-ix/p-3ce5fd87.entry.js +2 -0
  523. package/dist/siemens-ix/p-3ce5fd87.entry.js.map +1 -0
  524. package/dist/siemens-ix/p-3f13b14e.entry.js +2 -0
  525. package/dist/siemens-ix/p-3f13b14e.entry.js.map +1 -0
  526. package/dist/siemens-ix/p-3f62166e.entry.js +2 -0
  527. package/dist/siemens-ix/{p-6880e267.entry.js.map → p-3f62166e.entry.js.map} +1 -1
  528. package/dist/siemens-ix/p-425d6925.entry.js +2 -0
  529. package/dist/siemens-ix/{p-ec3ec461.entry.js → p-484bddf4.entry.js} +2 -2
  530. package/dist/siemens-ix/{p-df5494ff.entry.js → p-496e98ac.entry.js} +2 -2
  531. package/dist/siemens-ix/{p-ab6d123c.entry.js → p-4c18f123.entry.js} +2 -2
  532. package/dist/siemens-ix/{p-c96ce76c.entry.js → p-4c1f90cb.entry.js} +2 -2
  533. package/dist/siemens-ix/{p-a53d7dbb.entry.js → p-4e4d792d.entry.js} +2 -2
  534. package/dist/siemens-ix/p-51ae739e.entry.js +2 -0
  535. package/dist/siemens-ix/p-51ae739e.entry.js.map +1 -0
  536. package/dist/siemens-ix/{p-80981f03.entry.js → p-5779f16e.entry.js} +2 -2
  537. package/dist/siemens-ix/{p-4d0e900c.entry.js → p-5b57bde1.entry.js} +2 -2
  538. package/dist/siemens-ix/{p-6045dce9.entry.js → p-5d6f43fd.entry.js} +2 -2
  539. package/dist/siemens-ix/p-5iwF1M9X.js +2 -0
  540. package/dist/siemens-ix/p-5iwF1M9X.js.map +1 -0
  541. package/dist/siemens-ix/{p-2b2f339e.entry.js → p-6445a54f.entry.js} +2 -2
  542. package/dist/siemens-ix/{p-acb7c236.entry.js → p-667e3184.entry.js} +2 -2
  543. package/dist/siemens-ix/{p-92e0ebf1.entry.js → p-6a4bc78a.entry.js} +2 -2
  544. package/dist/siemens-ix/p-6dc6eb63.entry.js +2 -0
  545. package/dist/siemens-ix/{p-453aa17a.entry.js.map → p-6dc6eb63.entry.js.map} +1 -1
  546. package/dist/siemens-ix/{p-319e292f.entry.js → p-74e7b03f.entry.js} +2 -2
  547. package/dist/siemens-ix/{p-7c474c82.entry.js → p-77fd2138.entry.js} +2 -2
  548. package/dist/siemens-ix/{p-11b1eaa3.entry.js → p-7bad0544.entry.js} +2 -2
  549. package/dist/siemens-ix/{p-23e4f5f3.entry.js → p-7beba4ad.entry.js} +2 -2
  550. package/dist/siemens-ix/p-7beba4ad.entry.js.map +1 -0
  551. package/dist/siemens-ix/{p-ffe0835b.entry.js → p-7f90eeef.entry.js} +2 -2
  552. package/dist/siemens-ix/{p-b76ed7c3.entry.js → p-84df2a86.entry.js} +2 -2
  553. package/dist/siemens-ix/p-84df2a86.entry.js.map +1 -0
  554. package/dist/siemens-ix/p-8b42ad35.entry.js +2 -0
  555. package/dist/siemens-ix/{p-31f77d98.entry.js.map → p-8b42ad35.entry.js.map} +1 -1
  556. package/dist/siemens-ix/{p-5c22d3e5.entry.js → p-8f9368b8.entry.js} +2 -2
  557. package/dist/siemens-ix/p-8fa8d0e3.entry.js +2 -0
  558. package/dist/siemens-ix/p-92ec7f27.entry.js +2 -0
  559. package/dist/siemens-ix/{p-DBsKyLIP.js → p-BcCDexod.js} +2 -2
  560. package/dist/siemens-ix/p-BcCDexod.js.map +1 -0
  561. package/dist/siemens-ix/p-Cn013Iz8.js +2 -0
  562. package/dist/siemens-ix/p-Cn013Iz8.js.map +1 -0
  563. package/dist/siemens-ix/p-a3baca2f.entry.js +2 -0
  564. package/dist/siemens-ix/{p-75a10c1e.entry.js → p-b3453edf.entry.js} +2 -2
  565. package/dist/siemens-ix/p-b41a7abb.entry.js +2 -0
  566. package/dist/siemens-ix/{p-53df921a.entry.js.map → p-b41a7abb.entry.js.map} +1 -1
  567. package/dist/siemens-ix/{p-9a4db5e9.entry.js → p-b76df1c7.entry.js} +2 -2
  568. package/dist/siemens-ix/{p-332dccc7.entry.js → p-b7ef70d4.entry.js} +2 -2
  569. package/dist/siemens-ix/{p-43ecc5c3.entry.js → p-b8f4b001.entry.js} +2 -2
  570. package/dist/siemens-ix/{p-531f9746.entry.js → p-b9880608.entry.js} +2 -2
  571. package/dist/siemens-ix/{p-619a3dc8.entry.js → p-c5c863e1.entry.js} +2 -2
  572. package/dist/siemens-ix/{p-bb744e91.entry.js → p-c94739d0.entry.js} +2 -2
  573. package/dist/siemens-ix/{p-8cb3d70c.entry.js → p-ca3b24b1.entry.js} +2 -2
  574. package/dist/siemens-ix/{p-4acf0d7b.entry.js → p-cd1afcc9.entry.js} +2 -2
  575. package/dist/siemens-ix/{p-713df610.entry.js → p-cf041cfd.entry.js} +2 -2
  576. package/dist/siemens-ix/{p-338c68ea.entry.js → p-d10b9798.entry.js} +2 -2
  577. package/dist/siemens-ix/{p-6fd7d11a.entry.js → p-d193381f.entry.js} +2 -2
  578. package/dist/siemens-ix/{p-d90d1310.entry.js → p-d3a60c52.entry.js} +2 -2
  579. package/dist/siemens-ix/p-d688f76e.entry.js +2 -0
  580. package/dist/siemens-ix/{p-2d96a4a1.entry.js.map → p-d688f76e.entry.js.map} +1 -1
  581. package/dist/siemens-ix/p-dc8de6cb.entry.js +2 -0
  582. package/dist/siemens-ix/p-dc8de6cb.entry.js.map +1 -0
  583. package/dist/siemens-ix/p-dd16efd4.entry.js +2 -0
  584. package/dist/siemens-ix/p-dd16efd4.entry.js.map +1 -0
  585. package/dist/siemens-ix/p-de12078d.entry.js +2 -0
  586. package/dist/siemens-ix/{p-418671c7.entry.js.map → p-de12078d.entry.js.map} +1 -1
  587. package/dist/siemens-ix/{p-f40573e7.entry.js → p-df6bb698.entry.js} +2 -2
  588. package/dist/siemens-ix/p-e0b9cf68.entry.js +2 -0
  589. package/dist/siemens-ix/{p-5bb86bf7.entry.js → p-e42f62a1.entry.js} +2 -2
  590. package/dist/siemens-ix/{p-fb02d7fd.entry.js → p-e48977ed.entry.js} +2 -2
  591. package/dist/siemens-ix/{p-3099c12a.entry.js → p-e7bdc0a0.entry.js} +2 -2
  592. package/dist/siemens-ix/p-e7bdc0a0.entry.js.map +1 -0
  593. package/dist/siemens-ix/{p-ff6f13e1.entry.js → p-ea15fc79.entry.js} +2 -2
  594. package/dist/siemens-ix/{p-18d4645d.entry.js → p-ea37abf6.entry.js} +2 -2
  595. package/dist/siemens-ix/{p-f253d38c.entry.js → p-eba7f62c.entry.js} +2 -2
  596. package/dist/siemens-ix/{p-b64a3d8a.entry.js → p-ebef3d52.entry.js} +2 -2
  597. package/dist/siemens-ix/p-f05aa76f.entry.js +2 -0
  598. package/dist/siemens-ix/p-f05aa76f.entry.js.map +1 -0
  599. package/dist/siemens-ix/p-fb8877bc.entry.js +2 -0
  600. package/dist/siemens-ix/p-fb8877bc.entry.js.map +1 -0
  601. package/dist/siemens-ix/{p-e3dca831.entry.js → p-ff83eafd.entry.js} +2 -2
  602. package/dist/siemens-ix/siemens-ix-core.css +1 -1
  603. package/dist/siemens-ix/siemens-ix.css +2 -5
  604. package/dist/siemens-ix/siemens-ix.esm.js +1 -1
  605. package/dist/types/components/date-input/date-input.d.ts +10 -0
  606. package/dist/types/components/field-wrapper/helper-text-util.d.ts +5 -1
  607. package/dist/types/components/input/input.d.ts +9 -0
  608. package/dist/types/components/input/input.fc.d.ts +6 -0
  609. package/dist/types/components/input/input.util.d.ts +1 -0
  610. package/dist/types/components/input/number-input.d.ts +31 -5
  611. package/dist/types/components/menu-about/menu-about.d.ts +1 -1
  612. package/dist/types/components/menu-settings/menu-settings.d.ts +1 -1
  613. package/dist/types/components/pagination/pagination.d.ts +8 -0
  614. package/dist/types/components/select/select.d.ts +11 -0
  615. package/dist/types/components/split-button/split-button.d.ts +15 -4
  616. package/dist/types/components/time-input/time-input.d.ts +10 -0
  617. package/dist/types/components/time-picker/time-picker.d.ts +6 -1
  618. package/dist/types/components/tooltip/tooltip.d.ts +2 -1
  619. package/dist/types/components/utils/menu-tabs/menu-tabs-utils.d.ts +1 -0
  620. package/dist/types/components.d.ts +160 -12
  621. package/hydrate/index.js +673 -347
  622. package/hydrate/index.mjs +673 -347
  623. package/package.json +1 -1
  624. package/scss/components/_links.scss +2 -5
  625. package/scss/mixins/_input.scss +2 -2
  626. package/scss/theme/classic/dark/_variables.scss +1 -1
  627. package/components/p-C56HnkHy.js.map +0 -1
  628. package/components/p-CDPfohEH.js.map +0 -1
  629. package/components/p-ChFNWyCb.js.map +0 -1
  630. package/components/p-CvuFiT5X.js.map +0 -1
  631. package/components/p-FWLjfP4_.js.map +0 -1
  632. package/components/p-OLe05BAC.js.map +0 -1
  633. package/components/p-Ow_osSm5.js.map +0 -1
  634. package/components/p-S6nC3Yb4.js.map +0 -1
  635. package/dist/cjs/helper-text-util-BlElJLxk.js.map +0 -1
  636. package/dist/cjs/input.util-4AhBphgX.js.map +0 -1
  637. package/dist/cjs/ix-menu-settings-Cdqo0r8E.js.map +0 -1
  638. package/dist/esm/helper-text-util-BurV4TiQ.js.map +0 -1
  639. package/dist/esm/input.util-VHrSuCP7.js.map +0 -1
  640. package/dist/esm/ix-menu-settings-Bif4wByb.js.map +0 -1
  641. package/dist/siemens-ix/p-10ed549b.entry.js +0 -2
  642. package/dist/siemens-ix/p-10ed549b.entry.js.map +0 -1
  643. package/dist/siemens-ix/p-1550973a.entry.js +0 -2
  644. package/dist/siemens-ix/p-1de6e736.entry.js +0 -2
  645. package/dist/siemens-ix/p-1de6e736.entry.js.map +0 -1
  646. package/dist/siemens-ix/p-23e4f5f3.entry.js.map +0 -1
  647. package/dist/siemens-ix/p-2d96a4a1.entry.js +0 -2
  648. package/dist/siemens-ix/p-3099c12a.entry.js.map +0 -1
  649. package/dist/siemens-ix/p-31f77d98.entry.js +0 -2
  650. package/dist/siemens-ix/p-418671c7.entry.js +0 -2
  651. package/dist/siemens-ix/p-4288bd66.entry.js +0 -2
  652. package/dist/siemens-ix/p-453aa17a.entry.js +0 -2
  653. package/dist/siemens-ix/p-45b53c34.entry.js +0 -2
  654. package/dist/siemens-ix/p-45b53c34.entry.js.map +0 -1
  655. package/dist/siemens-ix/p-49843cce.entry.js.map +0 -1
  656. package/dist/siemens-ix/p-53df921a.entry.js +0 -2
  657. package/dist/siemens-ix/p-598ece5a.entry.js +0 -2
  658. package/dist/siemens-ix/p-6880e267.entry.js +0 -2
  659. package/dist/siemens-ix/p-712e393d.entry.js +0 -2
  660. package/dist/siemens-ix/p-712e393d.entry.js.map +0 -1
  661. package/dist/siemens-ix/p-89a7705b.entry.js +0 -2
  662. package/dist/siemens-ix/p-89a7705b.entry.js.map +0 -1
  663. package/dist/siemens-ix/p-DBsKyLIP.js.map +0 -1
  664. package/dist/siemens-ix/p-DS9crO46.js +0 -2
  665. package/dist/siemens-ix/p-DS9crO46.js.map +0 -1
  666. package/dist/siemens-ix/p-DXAZefAa.js +0 -2
  667. package/dist/siemens-ix/p-DXAZefAa.js.map +0 -1
  668. package/dist/siemens-ix/p-a0ffeea7.entry.js +0 -2
  669. package/dist/siemens-ix/p-a6e398d2.entry.js +0 -2
  670. package/dist/siemens-ix/p-b76ed7c3.entry.js.map +0 -1
  671. package/dist/siemens-ix/p-b7da78c6.entry.js +0 -2
  672. package/dist/siemens-ix/p-b7da78c6.entry.js.map +0 -1
  673. package/dist/siemens-ix/p-c6536a88.entry.js +0 -2
  674. package/dist/siemens-ix/p-d18df859.entry.js +0 -2
  675. package/dist/siemens-ix/p-e5180acd.entry.js +0 -2
  676. package/dist/siemens-ix/p-e5180acd.entry.js.map +0 -1
  677. package/dist/siemens-ix/p-fdb802ac.entry.js +0 -2
  678. /package/dist/siemens-ix/{p-fdb802ac.entry.js.map → p-0411df39.entry.js.map} +0 -0
  679. /package/dist/siemens-ix/{p-9f7f5cd3.entry.js.map → p-0ce03ad3.entry.js.map} +0 -0
  680. /package/dist/siemens-ix/{p-60d2f3db.entry.js.map → p-0d621531.entry.js.map} +0 -0
  681. /package/dist/siemens-ix/{p-4a127027.entry.js.map → p-10f2a239.entry.js.map} +0 -0
  682. /package/dist/siemens-ix/{p-d70cd703.entry.js.map → p-196cffb5.entry.js.map} +0 -0
  683. /package/dist/siemens-ix/{p-94596bff.entry.js.map → p-1de1a2bf.entry.js.map} +0 -0
  684. /package/dist/siemens-ix/{p-b7c64537.entry.js.map → p-2597a988.entry.js.map} +0 -0
  685. /package/dist/siemens-ix/{p-a8f08878.entry.js.map → p-2ffde2d5.entry.js.map} +0 -0
  686. /package/dist/siemens-ix/{p-598ece5a.entry.js.map → p-31a8eaf9.entry.js.map} +0 -0
  687. /package/dist/siemens-ix/{p-2e3ac12c.entry.js.map → p-33fcea65.entry.js.map} +0 -0
  688. /package/dist/siemens-ix/{p-bd2127d0.entry.js.map → p-367df024.entry.js.map} +0 -0
  689. /package/dist/siemens-ix/{p-65c759c5.entry.js.map → p-3751c675.entry.js.map} +0 -0
  690. /package/dist/siemens-ix/{p-76bd4cf9.entry.js.map → p-37bd983a.entry.js.map} +0 -0
  691. /package/dist/siemens-ix/{p-d2831f7b.entry.js.map → p-38e45020.entry.js.map} +0 -0
  692. /package/dist/siemens-ix/{p-d997238b.entry.js.map → p-396e1f3d.entry.js.map} +0 -0
  693. /package/dist/siemens-ix/{p-0fd006b9.entry.js.map → p-3b7573d6.entry.js.map} +0 -0
  694. /package/dist/siemens-ix/{p-c6536a88.entry.js.map → p-425d6925.entry.js.map} +0 -0
  695. /package/dist/siemens-ix/{p-ec3ec461.entry.js.map → p-484bddf4.entry.js.map} +0 -0
  696. /package/dist/siemens-ix/{p-df5494ff.entry.js.map → p-496e98ac.entry.js.map} +0 -0
  697. /package/dist/siemens-ix/{p-ab6d123c.entry.js.map → p-4c18f123.entry.js.map} +0 -0
  698. /package/dist/siemens-ix/{p-c96ce76c.entry.js.map → p-4c1f90cb.entry.js.map} +0 -0
  699. /package/dist/siemens-ix/{p-a53d7dbb.entry.js.map → p-4e4d792d.entry.js.map} +0 -0
  700. /package/dist/siemens-ix/{p-80981f03.entry.js.map → p-5779f16e.entry.js.map} +0 -0
  701. /package/dist/siemens-ix/{p-4d0e900c.entry.js.map → p-5b57bde1.entry.js.map} +0 -0
  702. /package/dist/siemens-ix/{p-6045dce9.entry.js.map → p-5d6f43fd.entry.js.map} +0 -0
  703. /package/dist/siemens-ix/{p-2b2f339e.entry.js.map → p-6445a54f.entry.js.map} +0 -0
  704. /package/dist/siemens-ix/{p-acb7c236.entry.js.map → p-667e3184.entry.js.map} +0 -0
  705. /package/dist/siemens-ix/{p-92e0ebf1.entry.js.map → p-6a4bc78a.entry.js.map} +0 -0
  706. /package/dist/siemens-ix/{p-319e292f.entry.js.map → p-74e7b03f.entry.js.map} +0 -0
  707. /package/dist/siemens-ix/{p-7c474c82.entry.js.map → p-77fd2138.entry.js.map} +0 -0
  708. /package/dist/siemens-ix/{p-11b1eaa3.entry.js.map → p-7bad0544.entry.js.map} +0 -0
  709. /package/dist/siemens-ix/{p-ffe0835b.entry.js.map → p-7f90eeef.entry.js.map} +0 -0
  710. /package/dist/siemens-ix/{p-5c22d3e5.entry.js.map → p-8f9368b8.entry.js.map} +0 -0
  711. /package/dist/siemens-ix/{p-d18df859.entry.js.map → p-8fa8d0e3.entry.js.map} +0 -0
  712. /package/dist/siemens-ix/{p-a6e398d2.entry.js.map → p-92ec7f27.entry.js.map} +0 -0
  713. /package/dist/siemens-ix/{p-1550973a.entry.js.map → p-a3baca2f.entry.js.map} +0 -0
  714. /package/dist/siemens-ix/{p-75a10c1e.entry.js.map → p-b3453edf.entry.js.map} +0 -0
  715. /package/dist/siemens-ix/{p-9a4db5e9.entry.js.map → p-b76df1c7.entry.js.map} +0 -0
  716. /package/dist/siemens-ix/{p-332dccc7.entry.js.map → p-b7ef70d4.entry.js.map} +0 -0
  717. /package/dist/siemens-ix/{p-43ecc5c3.entry.js.map → p-b8f4b001.entry.js.map} +0 -0
  718. /package/dist/siemens-ix/{p-531f9746.entry.js.map → p-b9880608.entry.js.map} +0 -0
  719. /package/dist/siemens-ix/{p-619a3dc8.entry.js.map → p-c5c863e1.entry.js.map} +0 -0
  720. /package/dist/siemens-ix/{p-bb744e91.entry.js.map → p-c94739d0.entry.js.map} +0 -0
  721. /package/dist/siemens-ix/{p-8cb3d70c.entry.js.map → p-ca3b24b1.entry.js.map} +0 -0
  722. /package/dist/siemens-ix/{p-4acf0d7b.entry.js.map → p-cd1afcc9.entry.js.map} +0 -0
  723. /package/dist/siemens-ix/{p-713df610.entry.js.map → p-cf041cfd.entry.js.map} +0 -0
  724. /package/dist/siemens-ix/{p-338c68ea.entry.js.map → p-d10b9798.entry.js.map} +0 -0
  725. /package/dist/siemens-ix/{p-6fd7d11a.entry.js.map → p-d193381f.entry.js.map} +0 -0
  726. /package/dist/siemens-ix/{p-d90d1310.entry.js.map → p-d3a60c52.entry.js.map} +0 -0
  727. /package/dist/siemens-ix/{p-f40573e7.entry.js.map → p-df6bb698.entry.js.map} +0 -0
  728. /package/dist/siemens-ix/{p-a0ffeea7.entry.js.map → p-e0b9cf68.entry.js.map} +0 -0
  729. /package/dist/siemens-ix/{p-5bb86bf7.entry.js.map → p-e42f62a1.entry.js.map} +0 -0
  730. /package/dist/siemens-ix/{p-fb02d7fd.entry.js.map → p-e48977ed.entry.js.map} +0 -0
  731. /package/dist/siemens-ix/{p-ff6f13e1.entry.js.map → p-ea15fc79.entry.js.map} +0 -0
  732. /package/dist/siemens-ix/{p-18d4645d.entry.js.map → p-ea37abf6.entry.js.map} +0 -0
  733. /package/dist/siemens-ix/{p-f253d38c.entry.js.map → p-eba7f62c.entry.js.map} +0 -0
  734. /package/dist/siemens-ix/{p-b64a3d8a.entry.js.map → p-ebef3d52.entry.js.map} +0 -0
  735. /package/dist/siemens-ix/{p-e3dca831.entry.js.map → p-ff83eafd.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"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,WAAW,CACJ,CACjB,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACnE,OAAO,CACL,qBAAe,SAAS,EAAC,KAAK,EAAC,KAAK,EAAC,aAAa;YAChD,eAAS,KAAK,EAAC,gBAAgB,EAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,IAAI,GAAW;YACnE,KAAK,CAAC,QAAQ,CACD,CACjB,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACtE,OAAO,CACL,qBAAe,SAAS,EAAC,KAAK,EAAC,KAAK,EAAC,aAAa;YAChD,eAAS,KAAK,EAAC,iBAAiB,EAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAC,IAAI,GAAW;YACvE,KAAK,CAAC,SAAS,CACF,CACjB,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAK,CAAC,UAAU;QAChB,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAChC,qBAAe,KAAK,EAAC,aAAa,EAAC,SAAS,EAAC,MAAM,IAChD,KAAK,CAAC,UAAU,CACH,CACjB,CACF,CAAC;AACJ,CAAC","sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { h } from '@stencil/core';\nimport {\n iconError,\n iconInfo,\n iconSuccess,\n iconWarning,\n} from '@siemens/ix-icons/icons';\n\nexport function hasAnyText({\n invalidText,\n warningText,\n infoText,\n validText,\n helperText,\n}: {\n invalidText?: string;\n warningText?: string;\n infoText?: string;\n validText?: string;\n helperText?: string;\n}) {\n return [invalidText, warningText, infoText, validText, helperText].some(\n (text) => text?.trim()\n );\n}\n\nexport function HelperText(\n props: Readonly<{\n isInvalid: boolean;\n invalidText?: string;\n isWarning: boolean;\n warningText?: string;\n isInfo: boolean;\n infoText?: string;\n isValid: boolean;\n validText?: string;\n helperText?: string;\n }>\n) {\n if (!hasAnyText(props)) return null;\n if (props.isInvalid && props.invalidText && props.invalidText.trim() !== '') {\n return (\n <ix-typography textColor=\"alarm\" class=\"bottom-text\">\n <ix-icon class=\"text-icon invalid\" name={iconError} size=\"16\"></ix-icon>\n {props.invalidText}\n </ix-typography>\n );\n }\n\n if (props.isWarning && props.warningText && props.warningText.trim() !== '') {\n return (\n <ix-typography textColor=\"std\" class=\"bottom-text\">\n <ix-icon\n class=\"text-icon warning\"\n name={iconWarning}\n size=\"16\"\n ></ix-icon>\n {props.warningText}\n </ix-typography>\n );\n }\n\n if (props.isInfo && props.infoText && props.infoText.trim() !== '') {\n return (\n <ix-typography textColor=\"std\" class=\"bottom-text\">\n <ix-icon class=\"text-icon info\" name={iconInfo} size=\"16\"></ix-icon>\n {props.infoText}\n </ix-typography>\n );\n }\n\n if (props.isValid && props.validText && props.validText.trim() !== '') {\n return (\n <ix-typography textColor=\"std\" class=\"bottom-text\">\n <ix-icon class=\"text-icon valid\" name={iconSuccess} size=\"16\"></ix-icon>\n {props.validText}\n </ix-typography>\n );\n }\n\n return (\n props.helperText &&\n props.helperText.trim() !== '' && (\n <ix-typography class=\"bottom-text\" textColor=\"soft\">\n {props.helperText}\n </ix-typography>\n )\n );\n}\n"]}
1
+ {"version":3,"file":"helper-text-util.js","sourceRoot":"","sources":["../../../src/components/field-wrapper/helper-text-util.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EACL,SAAS,EACT,QAAQ,EACR,WAAW,EACX,WAAW,GACZ,MAAM,yBAAyB,CAAC;AAEjC,MAAM,UAAU,UAAU,CAA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W,EACjB,IAAI,EAAC,IAAI,GACA;YACV,KAAK,CAAC,WAAW,CACJ,CACjB,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACnE,OAAO,CACL,qBAAe,SAAS,EAAC,KAAK,EAAC,KAAK,EAAC,aAAa;YAChD,eAAS,KAAK,EAAC,gBAAgB,EAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,IAAI,GAAW;YACnE,KAAK,CAAC,QAAQ,CACD,CACjB,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACtE,OAAO,CACL,qBAAe,SAAS,EAAC,KAAK,EAAC,KAAK,EAAC,aAAa;YAChD,eAAS,KAAK,EAAC,iBAAiB,EAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAC,IAAI,GAAW;YACvE,KAAK,CAAC,SAAS,CACF,CACjB,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAK,CAAC,UAAU;QAChB,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAChC,qBAAe,KAAK,EAAC,aAAa,EAAC,SAAS,EAAC,MAAM,IAChD,KAAK,CAAC,UAAU,CACH,CACjB,CACF,CAAC;AACJ,CAAC","sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { h } from '@stencil/core';\nimport {\n iconError,\n iconInfo,\n iconSuccess,\n iconWarning,\n} from '@siemens/ix-icons/icons';\n\nexport function hasAnyText({\n invalidText,\n isInvalid,\n warningText,\n isWarning,\n infoText,\n isInfo,\n validText,\n isValid,\n helperText,\n}: {\n invalidText?: string;\n isInvalid?: boolean;\n warningText?: string;\n isWarning?: boolean;\n infoText?: string;\n isInfo?: boolean;\n validText?: string;\n isValid?: boolean;\n helperText?: string;\n}) {\n return !!(\n (isInvalid && invalidText?.trim()) ||\n (isWarning && warningText?.trim()) ||\n (isInfo && infoText?.trim()) ||\n (isValid && validText?.trim()) ||\n helperText?.trim()\n );\n}\n\nexport function HelperText(\n props: Readonly<{\n isInvalid: boolean;\n invalidText?: string;\n isWarning: boolean;\n warningText?: string;\n isInfo: boolean;\n infoText?: string;\n isValid: boolean;\n validText?: string;\n helperText?: string;\n }>\n) {\n if (!hasAnyText(props)) return null;\n if (props.isInvalid && props.invalidText && props.invalidText.trim() !== '') {\n return (\n <ix-typography textColor=\"alarm\" class=\"bottom-text\">\n <ix-icon class=\"text-icon invalid\" name={iconError} size=\"16\"></ix-icon>\n {props.invalidText}\n </ix-typography>\n );\n }\n\n if (props.isWarning && props.warningText && props.warningText.trim() !== '') {\n return (\n <ix-typography textColor=\"std\" class=\"bottom-text\">\n <ix-icon\n class=\"text-icon warning\"\n name={iconWarning}\n size=\"16\"\n ></ix-icon>\n {props.warningText}\n </ix-typography>\n );\n }\n\n if (props.isInfo && props.infoText && props.infoText.trim() !== '') {\n return (\n <ix-typography textColor=\"std\" class=\"bottom-text\">\n <ix-icon class=\"text-icon info\" name={iconInfo} size=\"16\"></ix-icon>\n {props.infoText}\n </ix-typography>\n );\n }\n\n if (props.isValid && props.validText && props.validText.trim() !== '') {\n return (\n <ix-typography textColor=\"std\" class=\"bottom-text\">\n <ix-icon class=\"text-icon valid\" name={iconSuccess} size=\"16\"></ix-icon>\n {props.validText}\n </ix-typography>\n );\n }\n\n return (\n props.helperText &&\n props.helperText.trim() !== '' && (\n <ix-typography class=\"bottom-text\" textColor=\"soft\">\n {props.helperText}\n </ix-typography>\n )\n );\n}\n"]}
@@ -25,7 +25,7 @@ export class FilterChip {
25
25
  this.closeClick.emit();
26
26
  }
27
27
  render() {
28
- return (h(Host, { key: '8cc1b9fa681c0a4db152ce8be3c6f5e9e57f342d', class: { disabled: this.disabled, readonly: this.readonly }, title: this.hostElement.textContent }, h("div", { key: '61c4d43d905cad264fb7eef85b8d59a4fa5bc966', class: "slot-container" }, h("slot", { key: 'f46f5e585c9a822f78d173945da0fdb91666ef09' })), !this.disabled && !this.readonly ? (h("ix-icon-button", { variant: "tertiary", oval: true, icon: iconCloseSmall, size: "16", tabindex: this.disabled ? -1 : 0, disabled: this.disabled, onClick: (e) => this.onCloseClick(e), "aria-label": this.ariaLabelCloseIconButton })) : null));
28
+ return (h(Host, { key: '03b4a6c34e034efe267406a523a902e85665b351', class: { disabled: this.disabled, readonly: this.readonly }, title: this.hostElement.textContent }, h("div", { key: '75c8992cf2e8dc2d2ff76d1579219ff4bef46fd2', class: "slot-container" }, h("slot", { key: 'ea52727be5fa2cda2f9ddaa2a7a37a1c7c1f4f91' })), !this.disabled && !this.readonly ? (h("ix-icon-button", { variant: "tertiary", oval: true, icon: iconCloseSmall, size: "16", tabindex: this.disabled ? -1 : 0, disabled: this.disabled, onClick: (e) => this.onCloseClick(e), "aria-label": this.ariaLabelCloseIconButton })) : null));
29
29
  }
30
30
  static get is() { return "ix-filter-chip"; }
31
31
  static get encapsulation() { return "shadow"; }
@@ -117,7 +117,7 @@ export class FlipTile {
117
117
  }, 2 * Animation.defaultTime);
118
118
  }
119
119
  render() {
120
- return (h(Host, { key: '8e765099be7fad3f1e3ad850934cacf3a3a0005b', class: {
120
+ return (h(Host, { key: '32727b4df750f9d1892f365a7e8d729447be05ac', class: {
121
121
  [`flip-tile-variant-${this.variant}`]: true,
122
122
  }, style: {
123
123
  height: `${this.height}${this.height === 'auto' ? '' : 'rem'}`,
@@ -126,10 +126,10 @@ export class FlipTile {
126
126
  width: `${this.width}${this.width === 'auto' ? '' : 'rem'}`,
127
127
  'min-width': `${this.width}${this.width === 'auto' ? '' : 'rem'}`,
128
128
  'max-width': `${this.width}${this.width === 'auto' ? '' : 'rem'}`,
129
- } }, h("div", { key: 'b2b5f3eb5e7434781c6e20c4227f6ba0558ef1ba', class: "flip-tile-container" }, h("div", { key: '62bf878e8dbe1b0ede76e18bfd7864559e5bc40e', class: "flip-tile-header" }, h("div", { key: 'a6778965143f874ba4afb4cf85668caa72b6b37d', class: "header-slot-container text-l-title" }, h("slot", { key: '8d8fbdea8c689955d3d883386d5de53ce3716102', name: "header" })), h("ix-icon-button", { key: 'a7f7ad867ff020682dad39ee879d75a539b2311e', icon: iconEye, variant: "tertiary", onClick: () => this.toggleIndex(), "aria-label": this.ariaLabelEyeIconButton })), h("div", { key: '9f36cb8e3242c3df057ca422cc16c2dbd46d05c2', class: "content-container" }, h("slot", { key: '1b8931c0bdb7fb8fcf1ef7179c441e7054aba515' })), h("div", { key: '20d76b0e598ad7c202ec917cc07c3a9dc4c22ce6', class: {
129
+ } }, h("div", { key: 'e58093dce55ede49f9f1782327c73918ee21d2c6', class: "flip-tile-container" }, h("div", { key: 'bd60e44b5b04177c4003936aa15d6539cd093883', class: "flip-tile-header" }, h("div", { key: '792d0e39b406fb50561f3c35c0340ee827b568e6', class: "header-slot-container text-l-title" }, h("slot", { key: '9e320aef9f89689b594c9555e154c8795dbdb233', name: "header" })), h("ix-icon-button", { key: 'dc0a042565001a79ea17e33671f4c2486b702ebf', icon: iconEye, variant: "tertiary", onClick: () => this.toggleIndex(), "aria-label": this.ariaLabelEyeIconButton })), h("div", { key: 'fa61544ccf0e16884c4d747e0e7cc174216d7906', class: "content-container" }, h("slot", { key: '1ed79120c3e926bb5f48a0e1980f5dfb785050f8' })), h("div", { key: '543216df0a9e93c9a739b921259e529eb494e751', class: {
130
130
  footer: true,
131
131
  'show-footer': this.hasFooterSlot,
132
- } }, h("slot", { key: '6b8c833a377673cc30625afda00a1881d5e66fca', name: "footer", onSlotchange: (event) => this.handleFooterSlotChange(event) })))));
132
+ } }, h("slot", { key: '271f61fc236be2813cec900c788fe4bfcb2c285d', name: "footer", onSlotchange: (event) => this.handleFooterSlotChange(event) })))));
133
133
  }
134
134
  static get is() { return "ix-flip-tile"; }
135
135
  static get encapsulation() { return "shadow"; }
@@ -17,7 +17,7 @@ export class FlipTileContent {
17
17
  this.contentVisible = false;
18
18
  }
19
19
  render() {
20
- return h(Host, { key: '5965aa904c665ec7f059cfd2923d13d6c408f435' }, this.contentVisible ? h("slot", null) : null);
20
+ return h(Host, { key: '264e3539d6c5abcd8716968a4128da99ca191375' }, this.contentVisible ? h("slot", null) : null);
21
21
  }
22
22
  static get is() { return "ix-flip-tile-content"; }
23
23
  static get encapsulation() { return "shadow"; }
@@ -38,7 +38,7 @@ export class GroupContextMenu {
38
38
  this.configureDropdown(dropdownElement, triggerElement);
39
39
  }
40
40
  render() {
41
- return (h(Host, { key: '6df61ec63b35350e4911a5b45ecf02ec8f05d42a' }, h("ix-icon-button", { key: '480474db13076c449bb664cc3be7aef9b2604c41', class: { hide: !this.showContextMenu }, size: "24", variant: "subtle-tertiary", icon: iconContextMenu }), h("slot", { key: 'cf8842a68562de5d58a8bec0441db254a56ad05b', onSlotchange: () => this.onSlotChange() })));
41
+ return (h(Host, { key: '13eed06b9866e6d59f3972d2940f752d8f245b52' }, h("ix-icon-button", { key: '6fc57583df2308b3fa234d8fd675cbcb05a55974', class: { hide: !this.showContextMenu }, size: "24", variant: "subtle-tertiary", icon: iconContextMenu }), h("slot", { key: 'b56d53e0b2154c0eefcd99fdd8eeb508457b7641', onSlotchange: () => this.onSlotChange() })));
42
42
  }
43
43
  static get is() { return "ix-group-context-menu"; }
44
44
  static get encapsulation() { return "shadow"; }
@@ -137,27 +137,27 @@ export class Group {
137
137
  }
138
138
  }
139
139
  render() {
140
- return (h(Host, { key: '4afd808f34c4c47ef82b9ac86c9824f93c0ac022' }, h("div", { key: 'e4faee7660a7e0356be0847648d8c749b8a53dd8', class: {
140
+ return (h(Host, { key: 'b93d2c8f1290baa2983945ce349b90e95bf18696' }, h("div", { key: '3e9ce7ce3402f48bb17612a97bf9bee85767c6aa', class: {
141
141
  'group-header': true,
142
142
  expand: this.expanded,
143
143
  selected: this.selected,
144
- }, tabindex: "0" }, h("div", { key: '708f196e0212bf1134de3e12d7c22ec6b981c998', class: "group-header-clickable", onClick: (e) => this.onHeaderClick(e) }, h("div", { key: 'b7e7fdf40ff90648cb3d734340ddb2ae1c39f35f', class: {
144
+ }, tabindex: "0" }, h("div", { key: 'daeb1087643b9f0267b3e2ba13a3973486730888', class: "group-header-clickable", onClick: (e) => this.onHeaderClick(e) }, h("div", { key: '9771b2df1e5b68339aa9c4689de4b2d24bc09341', class: {
145
145
  'group-header-selection-indicator': true,
146
146
  'group-header-selection-indicator-item-selected': this.itemSelected,
147
- } }), h("div", { key: '11526d19f3cbe9cc5ced668a16b4d9401907a20b', class: "btn-expand-header" }, h("ix-icon", { key: '0484a742e10ef8d3448b948c708795f28977af50', "data-testid": "expand-collapsed-icon", class: {
147
+ } }), h("div", { key: 'e0e1454e780614a31955720bd7b62d7bfec1b7e0', class: "btn-expand-header" }, h("ix-icon", { key: '0742c7515bbac3d3ba0221a5c3b0860d6a1792a2', "data-testid": "expand-collapsed-icon", class: {
148
148
  hidden: !this.showExpandCollapsedIcon,
149
- }, name: this.expanded ? iconChevronUpSmall : iconChevronDownSmall, onClick: (event) => this.onExpandClick(event) })), h("div", { key: 'ebd85a3ffcff6a72afa619f9f339f9f335d5692a', class: "group-header-content" }, this.header ? (h("div", { class: "group-header-props-container" }, h("div", { class: "group-header-title" }, h("span", { title: this.header }, this.header)), h("div", { class: "group-subheader", title: this.subHeader }, this.subHeader))) : null, h("slot", { key: 'd32a324262fec6c9331b773d4244fa9a98ec8e26', name: "header" }))), this.hasDropdown && (h("ix-group-context-menu", { key: 'fc3c314ee1f858a833786d0086c0cbf372cbaa91' }, h("slot", { key: 'aba688f91e2891df29b28a836cea956967a0bfdc', name: "dropdown" })))), h("div", { key: 'ff1e7e553feafffb89d6e5727fa08e518c5e8f09', class: {
149
+ }, name: this.expanded ? iconChevronUpSmall : iconChevronDownSmall, onClick: (event) => this.onExpandClick(event) })), h("div", { key: '4aa355b5a3a7f70977275139779000b2474a4a91', class: "group-header-content" }, this.header ? (h("div", { class: "group-header-props-container" }, h("div", { class: "group-header-title" }, h("span", { title: this.header }, this.header)), h("div", { class: "group-subheader", title: this.subHeader }, this.subHeader))) : null, h("slot", { key: 'c782251ecc1044aa3f7923d8f58b7f9c28700b4f', name: "header" }))), this.hasDropdown && (h("ix-group-context-menu", { key: '0899d27a51f412aea136b00fcae9ab32859670f4' }, h("slot", { key: '76f9b3b94312879ac5e349546172e3d95aefce78', name: "dropdown" })))), h("div", { key: 'f6a6aac17d8685244c28b8c6ecd24c966985ba1b', class: {
150
150
  'group-content': true,
151
- } }, h("div", { key: '2491e7fc2db3a26f2a6590dc4f5672256aea0ba0', style: {
151
+ } }, h("div", { key: 'f805cc015b7bf9c919ea9129500e4af8773b7f63', style: {
152
152
  display: this.expanded ? 'contents' : 'none',
153
- } }, h("slot", { key: '9ff899ad82ec853ca26bf6516755aa96ff4f1a75', onSlotchange: () => {
153
+ } }, h("slot", { key: '703791e124429a91a5798429443c3494d18b262d', onSlotchange: () => {
154
154
  var _a;
155
155
  const slot = (_a = this.hostElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot:not([name])');
156
156
  this.showExpandCollapsedIcon = hasSlottedElements(slot);
157
- } }), h("ix-group-item", { key: 'deba11384b1595616beb387a20e13bd4a37bab85', class: {
157
+ } }), h("ix-group-item", { key: '5e471c137730667bd459ac80943369b59f81c544', class: {
158
158
  footer: true,
159
159
  'footer-visible': this.footerVisible,
160
- }, groupFooter: true, suppressSelection: true }, h("slot", { key: '93f76c08a387e415908c1425e88463306bd7f094', name: "footer", onSlotchange: () => this.onSlotChange() }))))));
160
+ }, groupFooter: true, suppressSelection: true }, h("slot", { key: '84526685ab81de426a70ecfb52db3211b4a3219b', name: "footer", onSlotchange: () => this.onSlotChange() }))))));
161
161
  }
162
162
  static get is() { return "ix-group"; }
163
163
  static get encapsulation() { return "shadow"; }
@@ -43,7 +43,7 @@ export class HelperText {
43
43
  this.validationResults = checkFieldClasses(forElement);
44
44
  }
45
45
  render() {
46
- return (h(Host, { key: '80773f9945e4d763cd06ef66b4654270a3a7dbd4' }, h(HelperTextUtil, Object.assign({ key: '214ef1f926975fcf41676cb525b7098060f7f42c', helperText: this.helperText,
46
+ return (h(Host, { key: '95d6dfb6a163ee5e6b4d7d478780af394427548c' }, h(HelperTextUtil, Object.assign({ key: 'dc7f97b4cb8b2563c1a1089764e25eb63c75b583', helperText: this.helperText,
47
47
  invalidText: this.invalidText,
48
48
  validText: this.validText,
49
49
  infoText: this.infoText,
@@ -79,7 +79,7 @@ export class IconButton {
79
79
  type: this.type,
80
80
  extraClasses: this.getIconSizeClass(),
81
81
  };
82
- return (h(Host, { key: 'bf38203ea971e79608015f29912cb8e25095aaa9', class: Object.assign(Object.assign({}, this.getIconSizeClass()), { disabled: this.disabled || this.loading }) }, h(BaseIconButton, Object.assign({ key: '79512317c4eb9af675ac19918f06ca7c163693a8' }, baseButtonProps))));
82
+ return (h(Host, { key: '04486b7d26d2b34a920b53f683b3b1b591b95311', class: Object.assign(Object.assign({}, this.getIconSizeClass()), { disabled: this.disabled || this.loading }) }, h(BaseIconButton, Object.assign({ key: '94936955261d6fc13e78ea98ddb3cf98d3fda058' }, baseButtonProps))));
83
83
  }
84
84
  static get is() { return "ix-icon-button"; }
85
85
  static get encapsulation() { return "shadow"; }
@@ -75,7 +75,7 @@ export class IconToggleButton {
75
75
  },
76
76
  extraClasses: Object.assign({ 'icon-button': true }, this.getIconSizeClass()),
77
77
  };
78
- return (h(Host, { key: '0cdca2a85b3ed4e29f1686911eedc5e269178ec2', class: Object.assign(Object.assign({}, this.getIconSizeClass()), { disabled: this.disabled || this.loading }) }, h(BaseIconButton, Object.assign({ key: 'b3fd9e932199b79af77f6a24c35fdb3f1c0177a7' }, baseButtonProps))));
78
+ return (h(Host, { key: 'cac43636bbec0b7a783309bc8acfff59dc899077', class: Object.assign(Object.assign({}, this.getIconSizeClass()), { disabled: this.disabled || this.loading }) }, h(BaseIconButton, Object.assign({ key: 'c1476c415753b630b480542ea220854ecb8c56a9' }, baseButtonProps))));
79
79
  }
80
80
  static get is() { return "ix-icon-toggle-button"; }
81
81
  static get encapsulation() { return "shadow"; }
@@ -7,6 +7,7 @@
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
9
  import { h } from "@stencil/core";
10
+ import { handleSubmitOnEnterKeydown } from "./input.util";
10
11
  export function TextareaElement(props) {
11
12
  return (h("textarea", Object.assign({ readOnly: props.readonly, disabled: props.disabled, maxLength: props.maxLength, minLength: props.minLength, cols: props.textareaCols, rows: props.textareaRows, ref: props.textAreaRef, class: {
12
13
  'is-invalid': props.isInvalid,
@@ -23,7 +24,15 @@ export function TextareaElement(props) {
23
24
  export function InputElement(props) {
24
25
  return (h("input", Object.assign({ id: props.id, autoComplete: "off", readOnly: props.readonly, disabled: props.disabled, step: props.step, min: props.min, max: props.max, maxLength: props.maxLength ? Number(props.maxLength) : undefined, minLength: props.minLength ? Number(props.minLength) : undefined, ref: props.inputRef, pattern: props.pattern, type: props.type, class: {
25
26
  'is-invalid': props.isInvalid,
26
- }, required: props.required, value: props.value, placeholder: props.placeholder, onKeyPress: (event) => props.onKeyPress(event), onInput: (inputEvent) => {
27
+ }, style: {
28
+ textAlign: props.textAlignment,
29
+ }, required: props.required, value: props.value, placeholder: props.placeholder, onKeyPress: (event) => props.onKeyPress(event), onKeyDown: (e) => {
30
+ var _a;
31
+ (_a = props.onKeyDown) === null || _a === void 0 ? void 0 : _a.call(props, e);
32
+ handleSubmitOnEnterKeydown(e, !!props.suppressSubmitOnEnter, props.form);
33
+ } }, {
34
+ onBeforeInput: (event) => { var _a; return (_a = props.onBeforeInput) === null || _a === void 0 ? void 0 : _a.call(props, event); },
35
+ }, { onPaste: (event) => { var _a; return (_a = props.onPaste) === null || _a === void 0 ? void 0 : _a.call(props, event); }, onInput: (inputEvent) => {
27
36
  const target = inputEvent.target;
28
37
  props.updateFormInternalValue(target.value);
29
38
  props.valueChange(target.value);
@@ -1 +1 @@
1
- {"version":3,"file":"input.fc.js","sourceRoot":"","sources":["../../../src/components/input/input.fc.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAuB,CAAC,EAAE,MAAM,eAAe,CAAC;AAIvD,MAAM,UAAU,eAAe,CAC7B,KAmBE;IAEF,OAAO,CACL,8BACE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,IAAI,EAAE,KAAK,CAAC,YAAY,EACxB,IAAI,EAAE,KAAK,CAAC,YAAY,EACxB,GAAG,EAAE,KAAK,CAAC,WAAW,EACtB,KAAK,EAAE;YACL,YAAY,EAAE,KAAK,CAAC,SAAS;SAC9B,EACD,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,OAAO,EAAE,CAAC,UAAU,EAAE,EAAE;YACtB,MAAM,MAAM,GAAG,UAAU,CAAC,MAA0B,CAAC;YACrD,KAAK,CAAC,uBAAuB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC5C,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAClC,CAAC,EACD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,EAC5B,KAAK,EAAE;YACL,MAAM,EAAE,KAAK,CAAC,cAAc;YAC5B,MAAM,EAAE,KAAK,CAAC,cAAc;YAC5B,KAAK,EAAE,KAAK,CAAC,aAAa;SAC3B,IACG,KAAK,CAAC,cAAc,EACd,CACb,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY,CAC1B,KAqBE;IAEF,OAAO,C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,QAAQ,EAAE,EAAE;IACvB,OAAO,CACL,WAAK,KAAK,EAAC,eAAe,EAAC,GAAG,EAAE,KAAK,CAAC,UAAU;QAC9C,YAAM,IAAI,EAAC,KAAK,EAAC,YAAY,EAAE,KAAK,CAAC,YAAY,GAAS;QACzD,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAGjB,CAAC,KAAK,EAAE,EAAE;IACb,OAAO,CACL,WAAK,KAAK,EAAC,iBAAiB,EAAC,GAAG,EAAE,KAAK,CAAC,YAAY;QAClD,YAAM,IAAI,EAAC,OAAO,EAAC,YAAY,EAAE,KAAK,CAAC,YAAY,GAAS,CACxD,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { FunctionalComponent, h } from '@stencil/core';\nimport { A11yAttributes } from '../utils/a11y';\nimport { MakeRef } from '../utils/make-ref';\n\nexport function TextareaElement(\n props: Readonly<{\n resizeBehavior: 'both' | 'horizontal' | 'vertical' | 'none';\n textareaHeight?: string;\n textareaWidth?: string;\n textareaRows?: number;\n textareaCols?: number;\n disabled: boolean;\n readonly: boolean;\n maxLength?: number;\n minLength?: number;\n isInvalid: boolean;\n required: boolean;\n value: string;\n placeholder?: string;\n textAreaRef: (el: HTMLTextAreaElement | undefined) => void;\n valueChange: (value: string) => void;\n updateFormInternalValue: (value: string) => void;\n onBlur: () => void;\n ariaAttributes?: A11yAttributes;\n }>\n) {\n return (\n <textarea\n readOnly={props.readonly}\n disabled={props.disabled}\n maxLength={props.maxLength}\n minLength={props.minLength}\n cols={props.textareaCols}\n rows={props.textareaRows}\n ref={props.textAreaRef}\n class={{\n 'is-invalid': props.isInvalid,\n }}\n required={props.required}\n value={props.value}\n placeholder={props.placeholder}\n onInput={(inputEvent) => {\n const target = inputEvent.target as HTMLInputElement;\n props.updateFormInternalValue(target.value);\n props.valueChange(target.value);\n }}\n onBlur={() => props.onBlur()}\n style={{\n resize: props.resizeBehavior,\n height: props.textareaHeight,\n width: props.textareaWidth,\n }}\n {...props.ariaAttributes}\n ></textarea>\n );\n}\n\nexport function InputElement(\n props: Readonly<{\n id: string;\n disabled: boolean;\n readonly: boolean;\n maxLength?: string | number;\n minLength?: string | number;\n max?: string | number;\n min?: string | number;\n step?: string | number;\n pattern?: string;\n type: string;\n isInvalid: boolean;\n required: boolean;\n value: string | number;\n placeholder?: string;\n inputRef: (el: HTMLInputElement | undefined) => void;\n onKeyPress: (event: KeyboardEvent) => void;\n valueChange: (value: string) => void;\n updateFormInternalValue: (value: string) => void;\n onBlur: () => void;\n ariaAttributes?: A11yAttributes;\n }>\n) {\n return (\n <input\n id={props.id}\n autoComplete=\"off\"\n readOnly={props.readonly}\n disabled={props.disabled}\n step={props.step}\n min={props.min}\n max={props.max}\n maxLength={props.maxLength ? Number(props.maxLength) : undefined}\n minLength={props.minLength ? Number(props.minLength) : undefined}\n ref={props.inputRef}\n pattern={props.pattern}\n type={props.type}\n class={{\n 'is-invalid': props.isInvalid,\n }}\n required={props.required}\n value={props.value}\n placeholder={props.placeholder}\n onKeyPress={(event) => props.onKeyPress(event)}\n onInput={(inputEvent) => {\n const target = inputEvent.target as HTMLInputElement;\n props.updateFormInternalValue(target.value);\n props.valueChange(target.value);\n }}\n onBlur={() => props.onBlur()}\n {...props.ariaAttributes}\n ></input>\n );\n}\n\nexport const SlotEnd: FunctionalComponent<{\n slotEndRef: MakeRef<HTMLDivElement>;\n onSlotChange?: (e: Event) => void;\n}> = (props, children) => {\n return (\n <div class=\"end-container\" ref={props.slotEndRef}>\n <slot name=\"end\" onSlotchange={props.onSlotChange}></slot>\n {children}\n </div>\n );\n};\n\nexport const SlotStart: FunctionalComponent<{\n slotStartRef: MakeRef<HTMLDivElement>;\n onSlotChange?: (e: Event) => void;\n}> = (props) => {\n return (\n <div class=\"start-container\" ref={props.slotStartRef}>\n <slot name=\"start\" onSlotchange={props.onSlotChange}></slot>\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"input.fc.js","sourceRoot":"","sources":["../../../src/components/input/input.fc.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAuB,CAAC,EAAE,MAAM,eAAe,CAAC;AAEvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAG1D,MAAM,UAAU,eAAe,CAC7B,KAmBE;IAEF,OAAO,CACL,8BACE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,IAAI,EAAE,KAAK,CAAC,YAAY,EACxB,IAAI,EAAE,KAAK,CAAC,YAAY,EACxB,GAAG,EAAE,KAAK,CAAC,WAAW,EACtB,KAAK,EAAE;YACL,YAAY,EAAE,KAAK,CAAC,SAAS;SAC9B,EACD,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,OAAO,EAAE,CAAC,UAAU,EAAE,EAAE;YACtB,MAAM,MAAM,GAAG,UAAU,CAAC,MAA0B,CAAC;YACrD,KAAK,CAAC,uBAAuB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC5C,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAClC,CAAC,EACD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,EAC5B,KAAK,EAAE;YACL,MAAM,EAAE,KAAK,CAAC,cAAc;YAC5B,MAAM,EAAE,KAAK,CAAC,cAAc;YAC5B,KAAK,EAAE,KAAK,CAAC,aAAa;SAC3B,IACG,KAAK,CAAC,cAAc,EACd,CACb,CAAC;AAC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A,KAAK,CAAC,aAAa,sDAAG,KAAK,CAAC,CAAA,EAAA;KAC3D,IACT,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,WAAC,OAAA,MAAA,KAAK,CAAC,OAAO,sDAAG,KAAK,CAAC,CAAA,EAAA,EAC1C,OAAO,EAAE,CAAC,UAAU,EAAE,EAAE;YACtB,MAAM,MAAM,GAAG,UAAU,CAAC,MAA0B,CAAC;YACrD,KAAK,CAAC,uBAAuB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC5C,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAClC,CAAC,EACD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,IACxB,KAAK,CAAC,cAAc,EACjB,CACV,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAGf,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;IACvB,OAAO,CACL,WAAK,KAAK,EAAC,eAAe,EAAC,GAAG,EAAE,KAAK,CAAC,UAAU;QAC9C,YAAM,IAAI,EAAC,KAAK,EAAC,YAAY,EAAE,KAAK,CAAC,YAAY,GAAS;QACzD,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAGjB,CAAC,KAAK,EAAE,EAAE;IACb,OAAO,CACL,WAAK,KAAK,EAAC,iBAAiB,EAAC,GAAG,EAAE,KAAK,CAAC,YAAY;QAClD,YAAM,IAAI,EAAC,OAAO,EAAC,YAAY,EAAE,KAAK,CAAC,YAAY,GAAS,CACxD,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { FunctionalComponent, h } from '@stencil/core';\nimport { A11yAttributes } from '../utils/a11y';\nimport { handleSubmitOnEnterKeydown } from './input.util';\nimport { MakeRef } from '../utils/make-ref';\n\nexport function TextareaElement(\n props: Readonly<{\n resizeBehavior: 'both' | 'horizontal' | 'vertical' | 'none';\n textareaHeight?: string;\n textareaWidth?: string;\n textareaRows?: number;\n textareaCols?: number;\n disabled: boolean;\n readonly: boolean;\n maxLength?: number;\n minLength?: number;\n isInvalid: boolean;\n required: boolean;\n value: string;\n placeholder?: string;\n textAreaRef: (el: HTMLTextAreaElement | undefined) => void;\n valueChange: (value: string) => void;\n updateFormInternalValue: (value: string) => void;\n onBlur: () => void;\n ariaAttributes?: A11yAttributes;\n }>\n) {\n return (\n <textarea\n readOnly={props.readonly}\n disabled={props.disabled}\n maxLength={props.maxLength}\n minLength={props.minLength}\n cols={props.textareaCols}\n rows={props.textareaRows}\n ref={props.textAreaRef}\n class={{\n 'is-invalid': props.isInvalid,\n }}\n required={props.required}\n value={props.value}\n placeholder={props.placeholder}\n onInput={(inputEvent) => {\n const target = inputEvent.target as HTMLInputElement;\n props.updateFormInternalValue(target.value);\n props.valueChange(target.value);\n }}\n onBlur={() => props.onBlur()}\n style={{\n resize: props.resizeBehavior,\n height: props.textareaHeight,\n width: props.textareaWidth,\n }}\n {...props.ariaAttributes}\n ></textarea>\n );\n}\n\nexport function InputElement(\n props: Readonly<{\n id: string;\n disabled: boolean;\n readonly: boolean;\n maxLength?: string | number;\n minLength?: string | number;\n max?: string | number;\n min?: string | number;\n step?: string | number;\n pattern?: string;\n type: string;\n isInvalid: boolean;\n required: boolean;\n value: string | number;\n placeholder?: string;\n textAlignment?: 'start' | 'end';\n inputRef: (el: HTMLInputElement | undefined) => void;\n onKeyPress: (event: KeyboardEvent) => void;\n onKeyDown?: (event: KeyboardEvent) => void;\n onBeforeInput?: (event: InputEvent) => void;\n onPaste?: (event: ClipboardEvent) => void;\n valueChange: (value: string) => void;\n updateFormInternalValue: (value: string) => void;\n onBlur: () => void;\n ariaAttributes?: A11yAttributes;\n form?: HTMLFormElement;\n suppressSubmitOnEnter?: boolean;\n }>\n) {\n return (\n <input\n id={props.id}\n autoComplete=\"off\"\n readOnly={props.readonly}\n disabled={props.disabled}\n step={props.step}\n min={props.min}\n max={props.max}\n maxLength={props.maxLength ? Number(props.maxLength) : undefined}\n minLength={props.minLength ? Number(props.minLength) : undefined}\n ref={props.inputRef}\n pattern={props.pattern}\n type={props.type}\n class={{\n 'is-invalid': props.isInvalid,\n }}\n style={{\n textAlign: props.textAlignment,\n }}\n required={props.required}\n value={props.value}\n placeholder={props.placeholder}\n onKeyPress={(event) => props.onKeyPress(event)}\n onKeyDown={(e) => {\n props.onKeyDown?.(e);\n handleSubmitOnEnterKeydown(\n e,\n !!props.suppressSubmitOnEnter,\n props.form\n );\n }}\n {...({\n onBeforeInput: (event: InputEvent) => props.onBeforeInput?.(event),\n } as any)}\n onPaste={(event) => props.onPaste?.(event)}\n onInput={(inputEvent) => {\n const target = inputEvent.target as HTMLInputElement;\n props.updateFormInternalValue(target.value);\n props.valueChange(target.value);\n }}\n onBlur={() => props.onBlur()}\n {...props.ariaAttributes}\n ></input>\n );\n}\n\nexport const SlotEnd: FunctionalComponent<{\n slotEndRef: MakeRef<HTMLDivElement>;\n onSlotChange?: (e: Event) => void;\n}> = (props, children) => {\n return (\n <div class=\"end-container\" ref={props.slotEndRef}>\n <slot name=\"end\" onSlotchange={props.onSlotChange}></slot>\n {children}\n </div>\n );\n};\n\nexport const SlotStart: FunctionalComponent<{\n slotStartRef: MakeRef<HTMLDivElement>;\n onSlotChange?: (e: Event) => void;\n}> = (props) => {\n return (\n <div class=\"start-container\" ref={props.slotStartRef}>\n <slot name=\"start\" onSlotchange={props.onSlotChange}></slot>\n </div>\n );\n};\n"]}
@@ -50,6 +50,15 @@ export class Input {
50
50
  * Specifies whether the text field is readonly.
51
51
  */
52
52
  this.readonly = false;
53
+ /**
54
+ * If false, pressing Enter will submit the form (if inside a form).
55
+ * Set to true to suppress submit on Enter.
56
+ */
57
+ this.suppressSubmitOnEnter = false;
58
+ /**
59
+ * Text alignment within the input. 'start' aligns the text to the start of the input, 'end' aligns the text to the end of the input.
60
+ */
61
+ this.textAlignment = 'start';
53
62
  this.isInvalid = false;
54
63
  this.isValid = false;
55
64
  this.isInfo = false;
@@ -122,15 +131,15 @@ export class Input {
122
131
  return Promise.resolve(this.touched);
123
132
  }
124
133
  render() {
125
- var _a;
134
+ var _a, _b;
126
135
  const inputAria = getAriaAttributesForInput(this);
127
- return (h(Host, { key: 'c74b72aaf7caf50aca8bada5a426ced0d03da3a4', class: {
136
+ return (h(Host, { key: '07337a899a3b73d3cb37b1fc84da266d95cff84a', class: {
128
137
  disabled: this.disabled,
129
138
  readonly: this.readonly,
130
- } }, h("ix-field-wrapper", { key: '259d4c941b5230eb3dab8f1e06d365fc5dd487bf', htmlForLabel: this.inputId, required: this.required, label: this.label, helperText: this.helperText, invalidText: this.invalidText, infoText: this.infoText, warningText: this.warningText, validText: this.validText, showTextAsTooltip: this.showTextAsTooltip, isInvalid: this.isInvalid, isValid: this.isValid, isInfo: this.isInfo, isWarning: this.isWarning, controlRef: this.inputRef }, h("div", { key: 'b74bc60a551f8068fc3fd273583089160ef0e272', class: "input-wrapper" }, h(SlotStart, { key: '5da1e346612ed0b0ce81b4ca370593e3cfdd950f', slotStartRef: this.slotStartRef, onSlotChange: () => this.updatePaddings() }), h(InputElement, { key: 'd259d8e2fdc27cf9ef550a649db0a05d407752b4', id: this.inputId, readonly: this.readonly, disabled: this.disabled, maxLength: this.maxLength, minLength: this.minLength, pattern: this.pattern, type: this.inputType, isInvalid: this.isInvalid, required: this.required, value: this.value, placeholder: this.placeholder, inputRef: this.inputRef, onKeyPress: (event) => checkAllowedKeys(this, event), valueChange: (value) => this.valueChange.emit(value), updateFormInternalValue: (value) => this.updateFormInternalValue(value), onBlur: () => {
139
+ } }, h("ix-field-wrapper", { key: '64461a842b4a784192fd7ab9fdc972bd4810785a', htmlForLabel: this.inputId, required: this.required, label: this.label, helperText: this.helperText, invalidText: this.invalidText, infoText: this.infoText, warningText: this.warningText, validText: this.validText, showTextAsTooltip: this.showTextAsTooltip, isInvalid: this.isInvalid, isValid: this.isValid, isInfo: this.isInfo, isWarning: this.isWarning, controlRef: this.inputRef }, h("div", { key: 'aac87eb96cb2cba4b9f86527b6d7784d0a015474', class: "input-wrapper" }, h(SlotStart, { key: '87bcf8d63bd1a4020a680bc2b6def8034a9d65de', slotStartRef: this.slotStartRef, onSlotChange: () => this.updatePaddings() }), h(InputElement, { key: 'f6b81c671a36b00bde716d72a40c17b6cd409c24', id: this.inputId, readonly: this.readonly, disabled: this.disabled, maxLength: this.maxLength, minLength: this.minLength, pattern: this.pattern, type: this.inputType, isInvalid: this.isInvalid, required: this.required, value: this.value, placeholder: this.placeholder, inputRef: this.inputRef, onKeyPress: (event) => checkAllowedKeys(this, event), valueChange: (value) => this.valueChange.emit(value), updateFormInternalValue: (value) => this.updateFormInternalValue(value), onBlur: () => {
131
140
  onInputBlur(this, this.inputRef.current);
132
141
  this.touched = true;
133
- }, ariaAttributes: inputAria }), h(SlotEnd, { key: '83f14577687a0437983e0cff26d59291cf1a5f47', slotEndRef: this.slotEndRef, onSlotChange: () => this.updatePaddings() }, h("ix-icon-button", { key: '4a54d7c381d87c75dca1e3febfb8d0e8d0095bf9', color: "color-weak-text", class: {
142
+ }, ariaAttributes: inputAria, form: (_a = this.formInternals.form) !== null && _a !== void 0 ? _a : undefined, suppressSubmitOnEnter: this.suppressSubmitOnEnter, textAlignment: this.textAlignment }), h(SlotEnd, { key: 'c8f10373d93bba50d0c633b77fd7ec548e4590d5', slotEndRef: this.slotEndRef, onSlotChange: () => this.updatePaddings() }, h("ix-icon-button", { key: '169c36e6719204de19756a1cf8c0a7c141119417', color: "color-weak-text", class: {
134
143
  'password-eye': true,
135
144
  'eye-hidden': this.type !== 'password' || this.disabled,
136
145
  }, variant: "tertiary", icon: this.inputType === 'password' ? iconEye : iconEyeCancelled, onClick: () => {
@@ -139,7 +148,7 @@ export class Input {
139
148
  return;
140
149
  }
141
150
  this.inputType = 'password';
142
- } }))), !!this.maxLength && this.maxLength > 0 && (h("ix-typography", { key: '40bbb9d175f5df31dba1115aaab0c7e2c07f067c', class: "bottom-text", slot: "bottom-right", textColor: "soft" }, ((_a = this.value) !== null && _a !== void 0 ? _a : '').length, "/", this.maxLength)))));
151
+ } }))), !!this.maxLength && this.maxLength > 0 && (h("ix-typography", { key: 'd4041de277ec45534274a6a4a739ff90cd4b98c1', class: "bottom-text", slot: "bottom-right", textColor: "soft" }, ((_b = this.value) !== null && _b !== void 0 ? _b : '').length, "/", this.maxLength)))));
143
152
  }
144
153
  static get is() { return "ix-input"; }
145
154
  static get encapsulation() { return "shadow"; }
@@ -502,6 +511,46 @@ export class Input {
502
511
  "getter": false,
503
512
  "setter": false,
504
513
  "reflect": false
514
+ },
515
+ "suppressSubmitOnEnter": {
516
+ "type": "boolean",
517
+ "attribute": "suppress-submit-on-enter",
518
+ "mutable": false,
519
+ "complexType": {
520
+ "original": "boolean",
521
+ "resolved": "boolean",
522
+ "references": {}
523
+ },
524
+ "required": false,
525
+ "optional": false,
526
+ "docs": {
527
+ "tags": [],
528
+ "text": "If false, pressing Enter will submit the form (if inside a form).\nSet to true to suppress submit on Enter."
529
+ },
530
+ "getter": false,
531
+ "setter": false,
532
+ "reflect": true,
533
+ "defaultValue": "false"
534
+ },
535
+ "textAlignment": {
536
+ "type": "string",
537
+ "attribute": "text-alignment",
538
+ "mutable": false,
539
+ "complexType": {
540
+ "original": "'start' | 'end'",
541
+ "resolved": "\"end\" | \"start\"",
542
+ "references": {}
543
+ },
544
+ "required": false,
545
+ "optional": false,
546
+ "docs": {
547
+ "tags": [],
548
+ "text": "Text alignment within the input. 'start' aligns the text to the start of the input, 'end' aligns the text to the end of the input."
549
+ },
550
+ "getter": false,
551
+ "setter": false,
552
+ "reflect": false,
553
+ "defaultValue": "'start'"
505
554
  }
506
555
  };
507
556
  }
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/components/input/input.tsx"],"names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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAjLC;IADC,uBAAuB,EAAE;gDAGzB","sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { iconEye, iconEyeCancelled } from '@siemens/ix-icons/icons';\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Method,\n Prop,\n State,\n Watch,\n h,\n} from '@stencil/core';\nimport { A11yAttributes } from '../utils/a11y';\nimport {\n HookValidationLifecycle,\n IxInputFieldComponent,\n ValidationResults,\n} from '../utils/input';\nimport { makeRef } from '../utils/make-ref';\nimport { InputElement, SlotEnd, SlotStart } from './input.fc';\nimport {\n addDisposableChangesAndVisibilityObservers,\n adjustPaddingForStartAndEnd,\n checkAllowedKeys,\n DisposableChangesAndVisibilityObservers,\n getAriaAttributesForInput,\n mapValidationResult,\n onInputBlur,\n} from './input.util';\n\nlet inputIds = 0;\n\n/**\n * @form-ready\n * @slot start - Element will be displayed at the start of the input\n * @slot end - Element will be displayed at the end of the input\n */\n@Component({\n tag: 'ix-input',\n styleUrl: 'input.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class Input implements IxInputFieldComponent<string> {\n @Element() hostElement!: HTMLIxInputElement;\n @AttachInternals() formInternals!: ElementInternals;\n\n /**\n * The type of the text field. Possible values are 'text', 'email', or 'password'.\n */\n @Prop() type: 'text' | 'email' | 'password' | 'tel' | 'url' = 'text';\n\n /**\n * The name of the text field.\n */\n @Prop({ reflect: true }) name?: string;\n\n /**\n * The placeholder text for the text field.\n */\n @Prop({ reflect: true }) placeholder?: string;\n\n /**\n * The value of the text field.\n */\n @Prop({ reflect: true, mutable: true }) value: string = '';\n\n /**\n * Specifies whether the text field is required.\n */\n @Prop({ reflect: true }) required: boolean = false;\n\n /**\n * Specifies whether the text field is disabled.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * Specifies whether the text field is readonly.\n */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /**\n * The helper text for the text field.\n */\n @Prop() helperText?: string;\n\n /**\n * The info text for the text field.\n */\n @Prop() infoText?: string;\n\n /**\n * Specifies whether to show the text as a tooltip.\n */\n @Prop() showTextAsTooltip?: boolean;\n\n /**\n * The valid text for the text field.\n */\n @Prop() validText?: string;\n\n /**\n * The warning text for the text field.\n */\n @Prop() warningText?: string;\n\n /**\n * The label for the text field.\n */\n @Prop({ reflect: true }) label?: string;\n\n /**\n * The error text for the text field.\n */\n @Prop() invalidText?: string;\n\n /**\n * The pattern for the text field.\n */\n @Prop() pattern?: string;\n\n /**\n * The maximum length of the text field.\n */\n @Prop() maxLength?: number;\n\n /**\n * The minimum length of the text field.\n */\n @Prop() minLength?: number;\n\n /**\n * The allowed characters pattern for the text field.\n */\n @Prop() allowedCharactersPattern?: string;\n\n /**\n * Event emitted when the value of the text field changes.\n */\n @Event() valueChange!: EventEmitter<string>;\n\n /**\n * Event emitted when the validity state of the text field changes.\n */\n @Event() validityStateChange!: EventEmitter<ValidityState>;\n\n /**\n * Event emitted when the text field loses focus.\n */\n @Event() ixBlur!: EventEmitter<void>;\n\n @State() isInvalid = false;\n @State() isValid = false;\n @State() isInfo = false;\n @State() isWarning = false;\n @State() isInvalidByRequired = false;\n\n @State() inputType = 'text';\n\n private readonly inputRef = makeRef<HTMLInputElement>();\n private readonly slotEndRef = makeRef<HTMLDivElement>();\n private readonly slotStartRef = makeRef<HTMLDivElement>();\n private readonly inputId = `input-${inputIds++}`;\n private touched = false;\n\n private disposableChangesAndVisibilityObservers?: DisposableChangesAndVisibilityObservers;\n\n @HookValidationLifecycle()\n updateClassMappings(result: ValidationResults) {\n mapValidationResult(this, result);\n }\n\n @Watch('type')\n updateInputType() {\n this.inputType = this.type;\n }\n\n componentWillLoad() {\n this.updateFormInternalValue(this.value);\n this.inputType = this.type;\n }\n\n connectedCallback(): void {\n this.disposableChangesAndVisibilityObservers =\n addDisposableChangesAndVisibilityObservers(\n this.hostElement,\n this.updatePaddings.bind(this)\n );\n }\n\n private updatePaddings() {\n adjustPaddingForStartAndEnd(\n this.slotStartRef.current,\n this.slotEndRef.current,\n this.inputRef.current\n );\n }\n\n disconnectedCallback(): void {\n this.disposableChangesAndVisibilityObservers?.();\n }\n\n updateFormInternalValue(value: string) {\n this.formInternals.setFormValue(value);\n this.value = value;\n }\n\n /** @internal */\n @Method()\n async getAssociatedFormElement(): Promise<HTMLFormElement | null> {\n return this.formInternals.form;\n }\n\n /** @internal */\n @Method()\n hasValidValue(): Promise<boolean> {\n return Promise.resolve(!!this.value);\n }\n\n /**\n * Returns the native input element used in the text field.\n */\n @Method()\n getNativeInputElement() {\n return this.inputRef.waitForCurrent();\n }\n\n /**\n * Returns the validity state of the input field.\n */\n @Method()\n async getValidityState(): Promise<ValidityState> {\n const input = await this.inputRef.waitForCurrent();\n return Promise.resolve(input.validity);\n }\n\n /**\n * Focuses the input field\n */\n @Method()\n async focusInput(): Promise<void> {\n return (await this.getNativeInputElement()).focus();\n }\n\n /**\n * Returns whether the text field has been touched.\n * @internal\n */\n @Method()\n isTouched(): Promise<boolean> {\n return Promise.resolve(this.touched);\n }\n\n render() {\n const inputAria: A11yAttributes = getAriaAttributesForInput(this);\n return (\n <Host\n class={{\n disabled: this.disabled,\n readonly: this.readonly,\n }}\n >\n <ix-field-wrapper\n htmlForLabel={this.inputId}\n required={this.required}\n label={this.label}\n helperText={this.helperText}\n invalidText={this.invalidText}\n infoText={this.infoText}\n warningText={this.warningText}\n validText={this.validText}\n showTextAsTooltip={this.showTextAsTooltip}\n isInvalid={this.isInvalid}\n isValid={this.isValid}\n isInfo={this.isInfo}\n isWarning={this.isWarning}\n controlRef={this.inputRef}\n >\n <div class=\"input-wrapper\">\n <SlotStart\n slotStartRef={this.slotStartRef}\n onSlotChange={() => this.updatePaddings()}\n ></SlotStart>\n <InputElement\n id={this.inputId}\n readonly={this.readonly}\n disabled={this.disabled}\n maxLength={this.maxLength}\n minLength={this.minLength}\n pattern={this.pattern}\n type={this.inputType}\n isInvalid={this.isInvalid}\n required={this.required}\n value={this.value}\n placeholder={this.placeholder}\n inputRef={this.inputRef}\n onKeyPress={(event) => checkAllowedKeys(this, event)}\n valueChange={(value) => this.valueChange.emit(value)}\n updateFormInternalValue={(value) =>\n this.updateFormInternalValue(value)\n }\n onBlur={() => {\n onInputBlur(this, this.inputRef.current);\n this.touched = true;\n }}\n ariaAttributes={inputAria}\n ></InputElement>\n <SlotEnd\n slotEndRef={this.slotEndRef}\n onSlotChange={() => this.updatePaddings()}\n >\n <ix-icon-button\n color=\"color-weak-text\"\n class={{\n 'password-eye': true,\n 'eye-hidden': this.type !== 'password' || this.disabled,\n }}\n variant=\"tertiary\"\n icon={\n this.inputType === 'password' ? iconEye : iconEyeCancelled\n }\n onClick={() => {\n if (this.inputType === 'password') {\n this.inputType = 'text';\n return;\n }\n\n this.inputType = 'password';\n }}\n ></ix-icon-button>\n </SlotEnd>\n </div>\n {!!this.maxLength && this.maxLength > 0 && (\n <ix-typography\n class=\"bottom-text\"\n slot=\"bottom-right\"\n textColor=\"soft\"\n >\n {(this.value ?? '').length}/{this.maxLength}\n </ix-typography>\n )}\n </ix-field-wrapper>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/components/input/input.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;;;;;;;AAEH,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EACL,eAAe,EACf,SAAS,EACT,OAAO,EACP,KAAK,EAEL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,EACL,CAAC,GACF,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,GAGxB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAA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,uBAAuB,EAAE;gDAGzB","sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { iconEye, iconEyeCancelled } from '@siemens/ix-icons/icons';\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Method,\n Prop,\n State,\n Watch,\n h,\n} from '@stencil/core';\nimport { A11yAttributes } from '../utils/a11y';\nimport {\n HookValidationLifecycle,\n IxInputFieldComponent,\n ValidationResults,\n} from '../utils/input';\nimport { makeRef } from '../utils/make-ref';\nimport { InputElement, SlotEnd, SlotStart } from './input.fc';\nimport {\n addDisposableChangesAndVisibilityObservers,\n adjustPaddingForStartAndEnd,\n checkAllowedKeys,\n DisposableChangesAndVisibilityObservers,\n getAriaAttributesForInput,\n mapValidationResult,\n onInputBlur,\n} from './input.util';\n\nlet inputIds = 0;\n\n/**\n * @form-ready\n * @slot start - Element will be displayed at the start of the input\n * @slot end - Element will be displayed at the end of the input\n */\n@Component({\n tag: 'ix-input',\n styleUrl: 'input.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class Input implements IxInputFieldComponent<string> {\n @Element() hostElement!: HTMLIxInputElement;\n @AttachInternals() formInternals!: ElementInternals;\n\n /**\n * The type of the text field. Possible values are 'text', 'email', or 'password'.\n */\n @Prop() type: 'text' | 'email' | 'password' | 'tel' | 'url' = 'text';\n\n /**\n * The name of the text field.\n */\n @Prop({ reflect: true }) name?: string;\n\n /**\n * The placeholder text for the text field.\n */\n @Prop({ reflect: true }) placeholder?: string;\n\n /**\n * The value of the text field.\n */\n @Prop({ reflect: true, mutable: true }) value: string = '';\n\n /**\n * Specifies whether the text field is required.\n */\n @Prop({ reflect: true }) required: boolean = false;\n\n /**\n * Specifies whether the text field is disabled.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * Specifies whether the text field is readonly.\n */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /**\n * The helper text for the text field.\n */\n @Prop() helperText?: string;\n\n /**\n * The info text for the text field.\n */\n @Prop() infoText?: string;\n\n /**\n * Specifies whether to show the text as a tooltip.\n */\n @Prop() showTextAsTooltip?: boolean;\n\n /**\n * The valid text for the text field.\n */\n @Prop() validText?: string;\n\n /**\n * The warning text for the text field.\n */\n @Prop() warningText?: string;\n\n /**\n * The label for the text field.\n */\n @Prop({ reflect: true }) label?: string;\n\n /**\n * The error text for the text field.\n */\n @Prop() invalidText?: string;\n\n /**\n * The pattern for the text field.\n */\n @Prop() pattern?: string;\n\n /**\n * The maximum length of the text field.\n */\n @Prop() maxLength?: number;\n\n /**\n * The minimum length of the text field.\n */\n @Prop() minLength?: number;\n\n /**\n * The allowed characters pattern for the text field.\n */\n @Prop() allowedCharactersPattern?: string;\n\n /**\n * If false, pressing Enter will submit the form (if inside a form).\n * Set to true to suppress submit on Enter.\n */\n @Prop({ reflect: true }) suppressSubmitOnEnter: boolean = false;\n\n /**\n * Text alignment within the input. 'start' aligns the text to the start of the input, 'end' aligns the text to the end of the input.\n */\n @Prop() textAlignment: 'start' | 'end' = 'start';\n\n /**\n * Event emitted when the value of the text field changes.\n */\n @Event() valueChange!: EventEmitter<string>;\n\n /**\n * Event emitted when the validity state of the text field changes.\n */\n @Event() validityStateChange!: EventEmitter<ValidityState>;\n\n /**\n * Event emitted when the text field loses focus.\n */\n @Event() ixBlur!: EventEmitter<void>;\n\n @State() isInvalid = false;\n @State() isValid = false;\n @State() isInfo = false;\n @State() isWarning = false;\n @State() isInvalidByRequired = false;\n\n @State() inputType = 'text';\n\n private readonly inputRef = makeRef<HTMLInputElement>();\n private readonly slotEndRef = makeRef<HTMLDivElement>();\n private readonly slotStartRef = makeRef<HTMLDivElement>();\n private readonly inputId = `input-${inputIds++}`;\n private touched = false;\n\n private disposableChangesAndVisibilityObservers?: DisposableChangesAndVisibilityObservers;\n\n @HookValidationLifecycle()\n updateClassMappings(result: ValidationResults) {\n mapValidationResult(this, result);\n }\n\n @Watch('type')\n updateInputType() {\n this.inputType = this.type;\n }\n\n componentWillLoad() {\n this.updateFormInternalValue(this.value);\n this.inputType = this.type;\n }\n\n connectedCallback(): void {\n this.disposableChangesAndVisibilityObservers =\n addDisposableChangesAndVisibilityObservers(\n this.hostElement,\n this.updatePaddings.bind(this)\n );\n }\n\n private updatePaddings() {\n adjustPaddingForStartAndEnd(\n this.slotStartRef.current,\n this.slotEndRef.current,\n this.inputRef.current\n );\n }\n\n disconnectedCallback(): void {\n this.disposableChangesAndVisibilityObservers?.();\n }\n\n updateFormInternalValue(value: string) {\n this.formInternals.setFormValue(value);\n this.value = value;\n }\n\n /** @internal */\n @Method()\n async getAssociatedFormElement(): Promise<HTMLFormElement | null> {\n return this.formInternals.form;\n }\n\n /** @internal */\n @Method()\n hasValidValue(): Promise<boolean> {\n return Promise.resolve(!!this.value);\n }\n\n /**\n * Returns the native input element used in the text field.\n */\n @Method()\n getNativeInputElement() {\n return this.inputRef.waitForCurrent();\n }\n\n /**\n * Returns the validity state of the input field.\n */\n @Method()\n async getValidityState(): Promise<ValidityState> {\n const input = await this.inputRef.waitForCurrent();\n return Promise.resolve(input.validity);\n }\n\n /**\n * Focuses the input field\n */\n @Method()\n async focusInput(): Promise<void> {\n return (await this.getNativeInputElement()).focus();\n }\n\n /**\n * Returns whether the text field has been touched.\n * @internal\n */\n @Method()\n isTouched(): Promise<boolean> {\n return Promise.resolve(this.touched);\n }\n\n render() {\n const inputAria: A11yAttributes = getAriaAttributesForInput(this);\n return (\n <Host\n class={{\n disabled: this.disabled,\n readonly: this.readonly,\n }}\n >\n <ix-field-wrapper\n htmlForLabel={this.inputId}\n required={this.required}\n label={this.label}\n helperText={this.helperText}\n invalidText={this.invalidText}\n infoText={this.infoText}\n warningText={this.warningText}\n validText={this.validText}\n showTextAsTooltip={this.showTextAsTooltip}\n isInvalid={this.isInvalid}\n isValid={this.isValid}\n isInfo={this.isInfo}\n isWarning={this.isWarning}\n controlRef={this.inputRef}\n >\n <div class=\"input-wrapper\">\n <SlotStart\n slotStartRef={this.slotStartRef}\n onSlotChange={() => this.updatePaddings()}\n ></SlotStart>\n <InputElement\n id={this.inputId}\n readonly={this.readonly}\n disabled={this.disabled}\n maxLength={this.maxLength}\n minLength={this.minLength}\n pattern={this.pattern}\n type={this.inputType}\n isInvalid={this.isInvalid}\n required={this.required}\n value={this.value}\n placeholder={this.placeholder}\n inputRef={this.inputRef}\n onKeyPress={(event) => checkAllowedKeys(this, event)}\n valueChange={(value) => this.valueChange.emit(value)}\n updateFormInternalValue={(value) =>\n this.updateFormInternalValue(value)\n }\n onBlur={() => {\n onInputBlur(this, this.inputRef.current);\n this.touched = true;\n }}\n ariaAttributes={inputAria}\n form={this.formInternals.form ?? undefined}\n suppressSubmitOnEnter={this.suppressSubmitOnEnter}\n textAlignment={this.textAlignment}\n ></InputElement>\n <SlotEnd\n slotEndRef={this.slotEndRef}\n onSlotChange={() => this.updatePaddings()}\n >\n <ix-icon-button\n color=\"color-weak-text\"\n class={{\n 'password-eye': true,\n 'eye-hidden': this.type !== 'password' || this.disabled,\n }}\n variant=\"tertiary\"\n icon={\n this.inputType === 'password' ? iconEye : iconEyeCancelled\n }\n onClick={() => {\n if (this.inputType === 'password') {\n this.inputType = 'text';\n return;\n }\n\n this.inputType = 'password';\n }}\n ></ix-icon-button>\n </SlotEnd>\n </div>\n {!!this.maxLength && this.maxLength > 0 && (\n <ix-typography\n class=\"bottom-text\"\n slot=\"bottom-right\"\n textColor=\"soft\"\n >\n {(this.value ?? '').length}/{this.maxLength}\n </ix-typography>\n )}\n </ix-field-wrapper>\n </Host>\n );\n }\n}\n"]}
@@ -34,9 +34,13 @@ export function checkAllowedKeys(comp, event) {
34
34
  }
35
35
  export async function checkInternalValidity(comp, input) {
36
36
  const validityState = input.validity;
37
- const eventResult = comp.validityStateChange.emit(validityState);
38
- if (eventResult.defaultPrevented) {
39
- return;
37
+ const currentValidityState = !comp.hostElement.classList.contains('ix-invalid--validity-invalid');
38
+ const newValidityState = validityState.valid;
39
+ if (currentValidityState !== newValidityState) {
40
+ const eventResult = comp.validityStateChange.emit(validityState);
41
+ if (eventResult.defaultPrevented) {
42
+ return;
43
+ }
40
44
  }
41
45
  if (comp.value === null || comp.value === undefined) {
42
46
  return;
@@ -125,4 +129,17 @@ function observeElementUntilVisible(hostElement, updateCallback) {
125
129
  intersectionObserver.observe(hostElement);
126
130
  return intersectionObserver;
127
131
  }
132
+ export function handleSubmitOnEnterKeydown(event, suppressSubmitOnEnter, form) {
133
+ if (suppressSubmitOnEnter || event.key !== 'Enter' || !form) {
134
+ return;
135
+ }
136
+ event.preventDefault();
137
+ const submitButton = form.querySelector('button[type="submit"], ix-button[type="submit"]');
138
+ if (submitButton) {
139
+ form.requestSubmit(submitButton);
140
+ }
141
+ if (form.length === 1) {
142
+ form.requestSubmit();
143
+ }
144
+ }
128
145
  //# sourceMappingURL=input.util.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.util.js","sourceRoot":"","sources":["../../../src/components/input/input.util.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAkB,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAIL,gCAAgC,GACjC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,UAAU,mBAAmB,CACjC,OAAwB,EACxB,WAAmB,OAAO;IAE1B,OAAO,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC;QAC/B,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC;QAC5B,CAAC,CAAC,GAAG,QAAQ,IAAI,YAAY,EAAE,EAAE,CAAC;AACtC,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A0B,CACjC,WAAwB,EACxB,cAA0B;IAE1B,MAAM,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,CAAC,OAAO,EAAE,EAAE;QAChE,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YACxB,IAAI,KAAK,CAAC,cAAc,EAAE,CAAC;gBACzB,cAAc,EAAE,CAAC;YACnB,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,oBAAoB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAC1C,OAAO,oBAAoB,CAAC;AAC9B,CAAC","sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { A11yAttributes, a11yBoolean } from '../utils/a11y';\nimport {\n IxFormComponent,\n IxInputFieldComponent,\n ValidationResults,\n shouldSuppressInternalValidation,\n} from '../utils/input';\nimport { createMutationObserver } from '../utils/mutation-observer';\nimport { convertToRemString } from '../utils/rwd.util';\nimport { generateUUID } from '../utils/uuid';\nimport { shakeInput } from './input.animation';\n\nexport function createIdIfNotExists(\n element: IxFormComponent,\n idPrefix: string = 'input'\n) {\n return element.hasAttribute('id')\n ? element.getAttribute('id')\n : `${idPrefix}-${generateUUID()}`;\n}\n\nexport function mapValidationResult<T>(\n ref: IxInputFieldComponent<T>,\n result: ValidationResults\n) {\n ref.isInvalid = result.isInvalid || result.isInvalidByRequired;\n ref.isValid = result.isValid;\n ref.isInfo = result.isInfo;\n ref.isWarning = result.isWarning;\n}\n\nexport function checkAllowedKeys<T>(\n comp: IxInputFieldComponent<T>,\n event: KeyboardEvent\n) {\n if (comp.allowedCharactersPattern) {\n const regex = new RegExp(comp.allowedCharactersPattern);\n if (!regex.test(event.key)) {\n event.preventDefault();\n shakeInput(comp.inputRef.current);\n }\n }\n}\n\nexport async function checkInternalValidity<T>(\n comp: IxFormComponent<T>,\n input: HTMLInputElement | HTMLTextAreaElement\n) {\n const validityState = input.validity;\n\n const eventResult = comp.validityStateChange.emit(validityState);\n\n if (eventResult.defaultPrevented) {\n return;\n }\n\n if (comp.value === null || comp.value === undefined) {\n return;\n }\n\n const skipValidation = await shouldSuppressInternalValidation(comp);\n if (skipValidation) {\n return;\n }\n\n const { valid } = validityState;\n comp.hostElement.classList.toggle('ix-invalid--validity-invalid', !valid);\n}\n\nexport function onInputBlur<T>(\n comp: IxFormComponent<T>,\n input?: HTMLInputElement | HTMLTextAreaElement | null\n) {\n comp.ixBlur.emit();\n\n if (!input) {\n throw new Error('Input element is not available');\n }\n\n input.setAttribute('data-ix-touched', 'true');\n checkInternalValidity(comp, input);\n}\n\nexport function applyPaddingEnd(\n inputElement: HTMLElement | null,\n width: number,\n options: {\n slotEnd: boolean;\n additionalPaddingRight?: string;\n }\n) {\n if (!inputElement) {\n return;\n }\n\n const remInPixels = 16;\n const padding = convertToRemString(width + remInPixels / 2);\n\n if (options.slotEnd) {\n inputElement.style.paddingRight = `calc(${padding} + ${\n options.additionalPaddingRight ?? '0rem'\n })`;\n } else {\n inputElement.style.paddingLeft = padding;\n }\n}\n\nexport function adjustPaddingForStartAndEnd(\n startElement: HTMLElement | null,\n endElement: HTMLElement | null,\n inputElement: HTMLElement | null\n) {\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n if (startElement) {\n const startBoundingRect = startElement.getBoundingClientRect();\n if (startBoundingRect) {\n applyPaddingEnd(inputElement, startBoundingRect.width, {\n slotEnd: false,\n });\n }\n }\n\n if (endElement) {\n const endBoundingRect = endElement.getBoundingClientRect();\n if (endBoundingRect) {\n applyPaddingEnd(inputElement, endBoundingRect.width, {\n slotEnd: true,\n });\n }\n }\n });\n });\n}\n\nexport function getAriaAttributesForInput(\n component: IxInputFieldComponent\n): A11yAttributes {\n const inputAria: A11yAttributes = {\n 'aria-invalid': `${a11yBoolean(component.isInvalid)}`,\n 'aria-required': `${a11yBoolean(component.required)}`,\n };\n\n if (component.isInvalid && component.invalidText) {\n inputAria['aria-errormessage'] = component.invalidText;\n }\n return inputAria;\n}\n\nexport type DisposableChangesAndVisibilityObservers = () => void;\n\nexport const addDisposableChangesAndVisibilityObservers = (\n element: HTMLElement,\n callback: () => void\n): DisposableChangesAndVisibilityObservers => {\n const intersectionObserver = observeElementUntilVisible(element, callback);\n const mutationObserver = createMutationObserver(callback);\n\n mutationObserver.observe(element, {\n subtree: true,\n attributes: true,\n });\n\n return () => {\n intersectionObserver.disconnect();\n mutationObserver.disconnect();\n };\n};\n\nfunction observeElementUntilVisible(\n hostElement: HTMLElement,\n updateCallback: () => void\n): IntersectionObserver {\n const intersectionObserver = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n updateCallback();\n }\n });\n });\n\n intersectionObserver.observe(hostElement);\n return intersectionObserver;\n}\n"]}
1
+ {"version":3,"file":"input.util.js","sourceRoot":"","sources":["../../../src/components/input/input.util.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAkB,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAIL,gCAAgC,GACjC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,UAAU,mBAAmB,CACjC,OAAwB,EACxB,WAAmB,OAAO;IAE1B,OAAO,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC;QAC/B,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC;QAC5B,CAAC,CAAC,GAAG,QAAQ,IAAI,YAAY,EAAE,EAAE,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,GAA6B,EAC7B,M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C,CAAC;IAEH,OAAO,GAAG,EAAE;QACV,oBAAoB,CAAC,UAAU,EAAE,CAAC;QAClC,gBAAgB,CAAC,UAAU,EAAE,CAAC;IAChC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,0BAA0B,CACjC,WAAwB,EACxB,cAA0B;IAE1B,MAAM,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,CAAC,OAAO,EAAE,EAAE;QAChE,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YACxB,IAAI,KAAK,CAAC,cAAc,EAAE,CAAC;gBACzB,cAAc,EAAE,CAAC;YACnB,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,oBAAoB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAC1C,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,KAAoB,EACpB,qBAA8B,EAC9B,IAAwC;IAExC,IAAI,qBAAqB,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;QAC5D,OAAO;IACT,CAAC;IAED,KAAK,CAAC,cAAc,EAAE,CAAC;IACvB,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CACrC,iDAAiD,CAClD,CAAC;IAEF,IAAI,YAAY,EAAE,CAAC;QACjB,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IACnC,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;AACH,CAAC","sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { A11yAttributes, a11yBoolean } from '../utils/a11y';\nimport {\n IxFormComponent,\n IxInputFieldComponent,\n ValidationResults,\n shouldSuppressInternalValidation,\n} from '../utils/input';\nimport { createMutationObserver } from '../utils/mutation-observer';\nimport { convertToRemString } from '../utils/rwd.util';\nimport { generateUUID } from '../utils/uuid';\nimport { shakeInput } from './input.animation';\n\nexport function createIdIfNotExists(\n element: IxFormComponent,\n idPrefix: string = 'input'\n) {\n return element.hasAttribute('id')\n ? element.getAttribute('id')\n : `${idPrefix}-${generateUUID()}`;\n}\n\nexport function mapValidationResult<T>(\n ref: IxInputFieldComponent<T>,\n result: ValidationResults\n) {\n ref.isInvalid = result.isInvalid || result.isInvalidByRequired;\n ref.isValid = result.isValid;\n ref.isInfo = result.isInfo;\n ref.isWarning = result.isWarning;\n}\n\nexport function checkAllowedKeys<T>(\n comp: IxInputFieldComponent<T>,\n event: KeyboardEvent\n) {\n if (comp.allowedCharactersPattern) {\n const regex = new RegExp(comp.allowedCharactersPattern);\n if (!regex.test(event.key)) {\n event.preventDefault();\n shakeInput(comp.inputRef.current);\n }\n }\n}\n\nexport async function checkInternalValidity<T>(\n comp: IxFormComponent<T>,\n input: HTMLInputElement | HTMLTextAreaElement\n) {\n const validityState = input.validity;\n const currentValidityState = !comp.hostElement.classList.contains(\n 'ix-invalid--validity-invalid'\n );\n const newValidityState = validityState.valid;\n\n if (currentValidityState !== newValidityState) {\n const eventResult = comp.validityStateChange.emit(validityState);\n if (eventResult.defaultPrevented) {\n return;\n }\n }\n\n if (comp.value === null || comp.value === undefined) {\n return;\n }\n\n const skipValidation = await shouldSuppressInternalValidation(comp);\n if (skipValidation) {\n return;\n }\n\n const { valid } = validityState;\n comp.hostElement.classList.toggle('ix-invalid--validity-invalid', !valid);\n}\n\nexport function onInputBlur<T>(\n comp: IxFormComponent<T>,\n input?: HTMLInputElement | HTMLTextAreaElement | null\n) {\n comp.ixBlur.emit();\n\n if (!input) {\n throw new Error('Input element is not available');\n }\n\n input.setAttribute('data-ix-touched', 'true');\n checkInternalValidity(comp, input);\n}\n\nexport function applyPaddingEnd(\n inputElement: HTMLElement | null,\n width: number,\n options: {\n slotEnd: boolean;\n additionalPaddingRight?: string;\n }\n) {\n if (!inputElement) {\n return;\n }\n\n const remInPixels = 16;\n const padding = convertToRemString(width + remInPixels / 2);\n\n if (options.slotEnd) {\n inputElement.style.paddingRight = `calc(${padding} + ${\n options.additionalPaddingRight ?? '0rem'\n })`;\n } else {\n inputElement.style.paddingLeft = padding;\n }\n}\n\nexport function adjustPaddingForStartAndEnd(\n startElement: HTMLElement | null,\n endElement: HTMLElement | null,\n inputElement: HTMLElement | null\n) {\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n if (startElement) {\n const startBoundingRect = startElement.getBoundingClientRect();\n if (startBoundingRect) {\n applyPaddingEnd(inputElement, startBoundingRect.width, {\n slotEnd: false,\n });\n }\n }\n\n if (endElement) {\n const endBoundingRect = endElement.getBoundingClientRect();\n if (endBoundingRect) {\n applyPaddingEnd(inputElement, endBoundingRect.width, {\n slotEnd: true,\n });\n }\n }\n });\n });\n}\n\nexport function getAriaAttributesForInput(\n component: IxInputFieldComponent\n): A11yAttributes {\n const inputAria: A11yAttributes = {\n 'aria-invalid': `${a11yBoolean(component.isInvalid)}`,\n 'aria-required': `${a11yBoolean(component.required)}`,\n };\n\n if (component.isInvalid && component.invalidText) {\n inputAria['aria-errormessage'] = component.invalidText;\n }\n return inputAria;\n}\n\nexport type DisposableChangesAndVisibilityObservers = () => void;\n\nexport const addDisposableChangesAndVisibilityObservers = (\n element: HTMLElement,\n callback: () => void\n): DisposableChangesAndVisibilityObservers => {\n const intersectionObserver = observeElementUntilVisible(element, callback);\n const mutationObserver = createMutationObserver(callback);\n\n mutationObserver.observe(element, {\n subtree: true,\n attributes: true,\n });\n\n return () => {\n intersectionObserver.disconnect();\n mutationObserver.disconnect();\n };\n};\n\nfunction observeElementUntilVisible(\n hostElement: HTMLElement,\n updateCallback: () => void\n): IntersectionObserver {\n const intersectionObserver = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n updateCallback();\n }\n });\n });\n\n intersectionObserver.observe(hostElement);\n return intersectionObserver;\n}\n\nexport function handleSubmitOnEnterKeydown(\n event: KeyboardEvent,\n suppressSubmitOnEnter: boolean,\n form: HTMLFormElement | null | undefined\n) {\n if (suppressSubmitOnEnter || event.key !== 'Enter' || !form) {\n return;\n }\n\n event.preventDefault();\n const submitButton = form.querySelector<HTMLElement>(\n 'button[type=\"submit\"], ix-button[type=\"submit\"]'\n );\n\n if (submitButton) {\n form.requestSubmit(submitButton);\n }\n\n if (form.length === 1) {\n form.requestSubmit();\n }\n}\n"]}