@siemens/ix 2.6.0 → 2.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. package/components/button.js +7 -2
  2. package/components/button.js.map +1 -1
  3. package/components/dropdown-item.js +1 -1
  4. package/components/dropdown-item.js.map +1 -1
  5. package/components/field-label.js +1 -1
  6. package/components/field-label.js.map +1 -1
  7. package/components/field-wrapper.js +2 -2
  8. package/components/field-wrapper.js.map +1 -1
  9. package/components/index3.js +2 -1
  10. package/components/index3.js.map +1 -1
  11. package/components/input.util.js +4 -8
  12. package/components/input.util.js.map +1 -1
  13. package/components/ix-date-input.js +6 -6
  14. package/components/ix-date-input.js.map +1 -1
  15. package/components/ix-input.js +3 -3
  16. package/components/ix-input.js.map +1 -1
  17. package/components/ix-number-input.js +5 -5
  18. package/components/ix-number-input.js.map +1 -1
  19. package/components/ix-textarea.js +2 -2
  20. package/components/ix-textarea.js.map +1 -1
  21. package/components/ix-toggle-button.js +2 -2
  22. package/components/ix-toggle.js +25 -5
  23. package/components/ix-toggle.js.map +1 -1
  24. package/components/ix-tree.js +330 -496
  25. package/components/ix-tree.js.map +1 -1
  26. package/components/ix-upload.js +3 -3
  27. package/components/ix-validation-tooltip.js +2 -2
  28. package/components/ix-workflow-step.js +3 -3
  29. package/components/ix-workflow-steps.js +1 -1
  30. package/components/modal.js +6 -0
  31. package/components/modal.js.map +1 -1
  32. package/components/select.js +68 -52
  33. package/components/select.js.map +1 -1
  34. package/components/tooltip.js +2 -2
  35. package/components/tree-item.js +6 -5
  36. package/components/tree-item.js.map +1 -1
  37. package/dist/cjs/{app-globals-3c9c6a50.js → app-globals-4d8f1524.js} +2 -2
  38. package/dist/cjs/{app-globals-3c9c6a50.js.map → app-globals-4d8f1524.js.map} +1 -1
  39. package/dist/cjs/core-js-b22adfab.js +26 -0
  40. package/dist/cjs/core-js-b22adfab.js.map +1 -0
  41. package/dist/cjs/{helper-text-util-3192e78f.js → helper-text-util-635a1877.js} +2 -2
  42. package/dist/cjs/{helper-text-util-3192e78f.js.map → helper-text-util-635a1877.js.map} +1 -1
  43. package/dist/cjs/{index-74904d8b.js → index-492e6488.js} +2 -2
  44. package/dist/cjs/{index-74904d8b.js.map → index-492e6488.js.map} +1 -1
  45. package/dist/cjs/{index-d2117dc0.js → index-b44a6617.js} +3 -1
  46. package/dist/cjs/index-b44a6617.js.map +1 -0
  47. package/dist/cjs/index.cjs.js +2 -2
  48. package/dist/cjs/{index.es2017-0c2b80b6.js → index.es2017-805b5876.js} +3 -3
  49. package/dist/cjs/{index.es2017-0c2b80b6.js.map → index.es2017-805b5876.js.map} +1 -1
  50. package/dist/cjs/{input.util-1c2fa43d.js → input.util-54d161e6.js} +5 -9
  51. package/dist/cjs/input.util-54d161e6.js.map +1 -0
  52. package/dist/cjs/ix-application-header.cjs.entry.js +2 -2
  53. package/dist/cjs/ix-application-switch-modal.cjs.entry.js +1 -1
  54. package/dist/cjs/ix-button.cjs.entry.js +7 -2
  55. package/dist/cjs/ix-button.cjs.entry.js.map +1 -1
  56. package/dist/cjs/ix-col_4.cjs.entry.js +1 -1
  57. package/dist/cjs/ix-date-input.cjs.entry.js +6 -6
  58. package/dist/cjs/ix-date-input.cjs.entry.js.map +1 -1
  59. package/dist/cjs/ix-dropdown-item.cjs.entry.js +1 -1
  60. package/dist/cjs/ix-dropdown-item.cjs.entry.js.map +1 -1
  61. package/dist/cjs/ix-field-label_3.cjs.entry.js +7 -7
  62. package/dist/cjs/ix-field-label_3.cjs.entry.js.map +1 -1
  63. package/dist/cjs/ix-helper-text.cjs.entry.js +2 -2
  64. package/dist/cjs/{ix-icon.entry-e95ddded.js → ix-icon.entry-e33446e2.js} +2 -2
  65. package/dist/cjs/{ix-icon.entry-e95ddded.js.map → ix-icon.entry-e33446e2.js.map} +1 -1
  66. package/dist/cjs/ix-input.cjs.entry.js +5 -5
  67. package/dist/cjs/ix-input.cjs.entry.js.map +1 -1
  68. package/dist/cjs/ix-menu.cjs.entry.js +2 -2
  69. package/dist/cjs/ix-number-input.cjs.entry.js +7 -7
  70. package/dist/cjs/ix-number-input.cjs.entry.js.map +1 -1
  71. package/dist/cjs/ix-select.cjs.entry.js +68 -52
  72. package/dist/cjs/ix-select.cjs.entry.js.map +1 -1
  73. package/dist/cjs/ix-textarea.cjs.entry.js +3 -3
  74. package/dist/cjs/ix-textarea.cjs.entry.js.map +1 -1
  75. package/dist/cjs/ix-time-picker.cjs.entry.js +1 -1
  76. package/dist/cjs/ix-toggle-button.cjs.entry.js +2 -2
  77. package/dist/cjs/ix-toggle.cjs.entry.js +17 -3
  78. package/dist/cjs/ix-toggle.cjs.entry.js.map +1 -1
  79. package/dist/cjs/ix-tree-item.cjs.entry.js +6 -5
  80. package/dist/cjs/ix-tree-item.cjs.entry.js.map +1 -1
  81. package/dist/cjs/ix-tree.cjs.entry.js +330 -489
  82. package/dist/cjs/ix-tree.cjs.entry.js.map +1 -1
  83. package/dist/cjs/ix-upload.cjs.entry.js +3 -3
  84. package/dist/cjs/ix-validation-tooltip.cjs.entry.js +2 -2
  85. package/dist/cjs/ix-workflow-step.cjs.entry.js +3 -3
  86. package/dist/cjs/ix-workflow-steps.cjs.entry.js +1 -1
  87. package/dist/cjs/loader.cjs.js +3 -3
  88. package/dist/cjs/{modal-a49409aa.js → modal-923c83a6.js} +7 -1
  89. package/dist/cjs/modal-923c83a6.js.map +1 -0
  90. package/dist/cjs/{setup-86b7d543.js → setup-cc07fbfc.js} +2 -2
  91. package/dist/cjs/{setup-86b7d543.js.map → setup-cc07fbfc.js.map} +1 -1
  92. package/dist/cjs/siemens-ix.cjs.js +3 -3
  93. package/dist/collection/components/button/button.js +7 -2
  94. package/dist/collection/components/button/button.js.map +1 -1
  95. package/dist/collection/components/date-input/date-input.js +8 -6
  96. package/dist/collection/components/date-input/date-input.js.map +1 -1
  97. package/dist/collection/components/dropdown-item/dropdown-item.css +0 -3
  98. package/dist/collection/components/field-label/field-label.js +13 -5
  99. package/dist/collection/components/field-label/field-label.js.map +1 -1
  100. package/dist/collection/components/field-wrapper/field-wrapper.js +12 -4
  101. package/dist/collection/components/field-wrapper/field-wrapper.js.map +1 -1
  102. package/dist/collection/components/input/input.fc.js +4 -8
  103. package/dist/collection/components/input/input.fc.js.map +1 -1
  104. package/dist/collection/components/input/input.js +5 -3
  105. package/dist/collection/components/input/input.js.map +1 -1
  106. package/dist/collection/components/input/number-input.js +7 -5
  107. package/dist/collection/components/input/number-input.js.map +1 -1
  108. package/dist/collection/components/input/textarea.js +2 -2
  109. package/dist/collection/components/input/textarea.js.map +1 -1
  110. package/dist/collection/components/modal/test/modal.ct.js +57 -65
  111. package/dist/collection/components/modal/test/modal.ct.js.map +1 -1
  112. package/dist/collection/components/select/select.js +68 -52
  113. package/dist/collection/components/select/select.js.map +1 -1
  114. package/dist/collection/components/select/test/select.ct.js +72 -100
  115. package/dist/collection/components/select/test/select.ct.js.map +1 -1
  116. package/dist/collection/components/toggle/toggle.css +376 -161
  117. package/dist/collection/components/toggle/toggle.js +17 -3
  118. package/dist/collection/components/toggle/toggle.js.map +1 -1
  119. package/dist/collection/components/toggle-button/toggle-button.js +2 -2
  120. package/dist/collection/components/tooltip/tooltip.js +2 -2
  121. package/dist/collection/components/tree/tree.js +6 -3
  122. package/dist/collection/components/tree/tree.js.map +1 -1
  123. package/dist/collection/components/tree-item/tree-item.js +6 -5
  124. package/dist/collection/components/tree-item/tree-item.js.map +1 -1
  125. package/dist/collection/components/upload/upload.js +3 -3
  126. package/dist/collection/components/utils/lazy-list/index.js +2 -0
  127. package/dist/collection/components/utils/lazy-list/index.js.map +1 -0
  128. package/dist/collection/components/utils/lazy-list/lazy.js +343 -0
  129. package/dist/collection/components/utils/lazy-list/lazy.js.map +1 -0
  130. package/dist/collection/components/utils/modal/modal.js +6 -0
  131. package/dist/collection/components/utils/modal/modal.js.map +1 -1
  132. package/dist/collection/components/validation-tooltip/validation-tooltip.js +2 -2
  133. package/dist/collection/components/workflow-step/workflow-step.js +3 -3
  134. package/dist/collection/components/workflow-steps/workflow-steps.js +1 -1
  135. package/dist/collection/tests/html-tags/html-tags.e2e.js +17 -0
  136. package/dist/collection/tests/html-tags/html-tags.e2e.js.map +1 -0
  137. package/dist/esm/app-globals-40082a83.js +7 -0
  138. package/dist/esm/{app-globals-ae0ca705.js.map → app-globals-40082a83.js.map} +1 -1
  139. package/dist/esm/{core-js-78b486a8.js → core-js-4a847feb.js} +2 -2
  140. package/dist/esm/{core-js-78b486a8.js.map → core-js-4a847feb.js.map} +1 -1
  141. package/dist/esm/{helper-text-util-10896253.js → helper-text-util-e47b864d.js} +2 -2
  142. package/dist/esm/{helper-text-util-10896253.js.map → helper-text-util-e47b864d.js.map} +1 -1
  143. package/dist/esm/{index-ad2af369.js → index-2b76ea55.js} +3 -2
  144. package/dist/esm/index-2b76ea55.js.map +1 -0
  145. package/dist/esm/{index-60d17930.js → index-7421df0c.js} +2 -2
  146. package/dist/esm/{index-60d17930.js.map → index-7421df0c.js.map} +1 -1
  147. package/dist/esm/{index.es2017-93ac816c.js → index.es2017-4e6fdf77.js} +3 -3
  148. package/dist/esm/{index.es2017-93ac816c.js.map → index.es2017-4e6fdf77.js.map} +1 -1
  149. package/dist/esm/index.js +3 -3
  150. package/dist/esm/{input.util-715860e3.js → input.util-c855b2ed.js} +5 -9
  151. package/dist/esm/input.util-c855b2ed.js.map +1 -0
  152. package/dist/esm/ix-application-header.entry.js +2 -2
  153. package/dist/esm/ix-application-switch-modal.entry.js +1 -1
  154. package/dist/esm/ix-button.entry.js +7 -2
  155. package/dist/esm/ix-button.entry.js.map +1 -1
  156. package/dist/esm/ix-col_4.entry.js +1 -1
  157. package/dist/esm/ix-date-input.entry.js +6 -6
  158. package/dist/esm/ix-date-input.entry.js.map +1 -1
  159. package/dist/esm/ix-dropdown-item.entry.js +1 -1
  160. package/dist/esm/ix-dropdown-item.entry.js.map +1 -1
  161. package/dist/esm/ix-field-label_3.entry.js +7 -7
  162. package/dist/esm/ix-field-label_3.entry.js.map +1 -1
  163. package/dist/esm/ix-helper-text.entry.js +2 -2
  164. package/dist/esm/{ix-icon.entry-621b700a.js → ix-icon.entry-f5f7c268.js} +2 -2
  165. package/dist/esm/{ix-icon.entry-621b700a.js.map → ix-icon.entry-f5f7c268.js.map} +1 -1
  166. package/dist/esm/ix-input.entry.js +5 -5
  167. package/dist/esm/ix-input.entry.js.map +1 -1
  168. package/dist/esm/ix-menu.entry.js +2 -2
  169. package/dist/esm/ix-number-input.entry.js +7 -7
  170. package/dist/esm/ix-number-input.entry.js.map +1 -1
  171. package/dist/esm/ix-select.entry.js +68 -52
  172. package/dist/esm/ix-select.entry.js.map +1 -1
  173. package/dist/esm/ix-textarea.entry.js +3 -3
  174. package/dist/esm/ix-textarea.entry.js.map +1 -1
  175. package/dist/esm/ix-time-picker.entry.js +1 -1
  176. package/dist/esm/ix-toggle-button.entry.js +2 -2
  177. package/dist/esm/ix-toggle.entry.js +18 -4
  178. package/dist/esm/ix-toggle.entry.js.map +1 -1
  179. package/dist/esm/ix-tree-item.entry.js +6 -5
  180. package/dist/esm/ix-tree-item.entry.js.map +1 -1
  181. package/dist/esm/ix-tree.entry.js +330 -489
  182. package/dist/esm/ix-tree.entry.js.map +1 -1
  183. package/dist/esm/ix-upload.entry.js +3 -3
  184. package/dist/esm/ix-validation-tooltip.entry.js +2 -2
  185. package/dist/esm/ix-workflow-step.entry.js +3 -3
  186. package/dist/esm/ix-workflow-steps.entry.js +1 -1
  187. package/dist/esm/loader.js +3 -3
  188. package/dist/esm/{modal-101eef04.js → modal-4b3f8800.js} +7 -1
  189. package/dist/{cjs/modal-a49409aa.js.map → esm/modal-4b3f8800.js.map} +1 -1
  190. package/dist/esm/{setup-d88021f8.js → setup-9c5fe321.js} +2 -2
  191. package/dist/esm/{setup-d88021f8.js.map → setup-9c5fe321.js.map} +1 -1
  192. package/dist/esm/siemens-ix.js +3 -3
  193. package/dist/siemens-ix/index.esm.js +1 -1
  194. package/dist/siemens-ix/{p-0dbc970e.entry.js → p-0b2f0536.entry.js} +2 -2
  195. package/dist/siemens-ix/{p-2b226409.entry.js → p-0b5c9f33.entry.js} +2 -2
  196. package/dist/siemens-ix/p-0b5c9f33.entry.js.map +1 -0
  197. package/dist/siemens-ix/{p-044c2a7b.entry.js → p-18542846.entry.js} +2 -2
  198. package/dist/siemens-ix/p-20938f73.entry.js +2 -0
  199. package/dist/siemens-ix/p-20938f73.entry.js.map +1 -0
  200. package/dist/siemens-ix/p-22cba43a.entry.js +2 -0
  201. package/dist/siemens-ix/p-22cba43a.entry.js.map +1 -0
  202. package/dist/siemens-ix/{p-9fe2759f.entry.js → p-243e8b32.entry.js} +2 -2
  203. package/dist/siemens-ix/p-243e8b32.entry.js.map +1 -0
  204. package/dist/siemens-ix/p-38d9d569.js +2 -0
  205. package/dist/siemens-ix/p-38d9d569.js.map +1 -0
  206. package/dist/siemens-ix/{p-d7aa00d6.js → p-3aaecbd9.js} +2 -2
  207. package/dist/siemens-ix/{p-175599e4.entry.js → p-42320fb3.entry.js} +2 -2
  208. package/dist/siemens-ix/p-44fa005c.js +4 -0
  209. package/dist/siemens-ix/{p-a2200306.js.map → p-44fa005c.js.map} +1 -1
  210. package/dist/siemens-ix/p-451551d1.js +2 -0
  211. package/dist/siemens-ix/p-451551d1.js.map +1 -0
  212. package/dist/siemens-ix/p-53fd545a.entry.js +2 -0
  213. package/dist/siemens-ix/p-53fd545a.entry.js.map +1 -0
  214. package/dist/siemens-ix/p-5fbdff13.entry.js +2 -0
  215. package/dist/siemens-ix/p-5fbdff13.entry.js.map +1 -0
  216. package/dist/siemens-ix/{p-1f6df0c6.js → p-738c2d1f.js} +2 -2
  217. package/dist/siemens-ix/{p-424e8092.entry.js → p-897c8e5b.entry.js} +2 -2
  218. package/dist/siemens-ix/p-897c8e5b.entry.js.map +1 -0
  219. package/dist/siemens-ix/{p-f35386ec.js → p-93d4d3c9.js} +2 -2
  220. package/dist/siemens-ix/{p-9948574f.entry.js → p-97d4b3bd.entry.js} +2 -2
  221. package/dist/siemens-ix/{p-6a4a2064.entry.js → p-9f960c0b.entry.js} +2 -2
  222. package/dist/siemens-ix/{p-0c89cbcc.entry.js → p-a4dc6824.entry.js} +2 -2
  223. package/dist/siemens-ix/{p-fe87443e.js → p-a6af13b0.js} +2 -2
  224. package/dist/siemens-ix/p-af7c4b16.entry.js +2 -0
  225. package/dist/siemens-ix/p-af7c4b16.entry.js.map +1 -0
  226. package/dist/siemens-ix/{p-a3364116.entry.js → p-afb4565c.entry.js} +2 -2
  227. package/dist/siemens-ix/{p-4c9b7548.entry.js → p-bc272f75.entry.js} +2 -2
  228. package/dist/siemens-ix/{p-3205726a.entry.js → p-bfe469e4.entry.js} +2 -2
  229. package/dist/siemens-ix/{p-792e1c52.entry.js → p-c07557b0.entry.js} +2 -2
  230. package/dist/siemens-ix/p-c07557b0.entry.js.map +1 -0
  231. package/dist/siemens-ix/p-c3ca17fc.js +2 -0
  232. package/dist/siemens-ix/p-c530de51.entry.js +2 -0
  233. package/dist/siemens-ix/p-c530de51.entry.js.map +1 -0
  234. package/dist/siemens-ix/p-d2f21544.js +2 -0
  235. package/dist/siemens-ix/{p-68bb2a09.entry.js → p-d9b654af.entry.js} +2 -2
  236. package/dist/siemens-ix/p-d9b654af.entry.js.map +1 -0
  237. package/dist/siemens-ix/{p-e9a37b3f.entry.js → p-ee0645f8.entry.js} +2 -2
  238. package/dist/siemens-ix/p-fe158b99.js +2 -0
  239. package/dist/siemens-ix/p-fe158b99.js.map +1 -0
  240. package/dist/siemens-ix/{p-f39048a2.entry.js → p-fe396297.entry.js} +2 -2
  241. package/dist/siemens-ix/siemens-ix.esm.js +1 -1
  242. package/dist/types/components/button/button.d.ts +1 -0
  243. package/dist/types/components/date-input/date-input.d.ts +2 -0
  244. package/dist/types/components/field-label/field-label.d.ts +1 -1
  245. package/dist/types/components/field-wrapper/field-wrapper.d.ts +1 -1
  246. package/dist/types/components/input/input.d.ts +2 -0
  247. package/dist/types/components/input/number-input.d.ts +2 -0
  248. package/dist/types/components/modal/test/modal.ct.d.ts +2 -1
  249. package/dist/types/components/select/select.d.ts +9 -8
  250. package/dist/types/components/utils/lazy-list/index.d.ts +2 -0
  251. package/dist/types/components/utils/lazy-list/lazy.d.ts +51 -0
  252. package/dist/types/components.d.ts +9 -3
  253. package/hydrate/index.js +499 -621
  254. package/package.json +1 -2
  255. package/dist/cjs/_commonjsHelpers-0192c5b3.js +0 -17
  256. package/dist/cjs/_commonjsHelpers-0192c5b3.js.map +0 -1
  257. package/dist/cjs/core-js-2fc351ee.js +0 -26
  258. package/dist/cjs/core-js-2fc351ee.js.map +0 -1
  259. package/dist/cjs/index-d2117dc0.js.map +0 -1
  260. package/dist/cjs/input.util-1c2fa43d.js.map +0 -1
  261. package/dist/esm/_commonjsHelpers-e557d4a5.js +0 -13
  262. package/dist/esm/_commonjsHelpers-e557d4a5.js.map +0 -1
  263. package/dist/esm/app-globals-ae0ca705.js +0 -7
  264. package/dist/esm/index-ad2af369.js.map +0 -1
  265. package/dist/esm/input.util-715860e3.js.map +0 -1
  266. package/dist/esm/modal-101eef04.js.map +0 -1
  267. package/dist/siemens-ix/p-0f0e7e14.entry.js +0 -2
  268. package/dist/siemens-ix/p-0f0e7e14.entry.js.map +0 -1
  269. package/dist/siemens-ix/p-23a4b81f.js +0 -2
  270. package/dist/siemens-ix/p-23a4b81f.js.map +0 -1
  271. package/dist/siemens-ix/p-2b226409.entry.js.map +0 -1
  272. package/dist/siemens-ix/p-424e8092.entry.js.map +0 -1
  273. package/dist/siemens-ix/p-45840cb9.js +0 -2
  274. package/dist/siemens-ix/p-45840cb9.js.map +0 -1
  275. package/dist/siemens-ix/p-4624a772.entry.js +0 -2
  276. package/dist/siemens-ix/p-4624a772.entry.js.map +0 -1
  277. package/dist/siemens-ix/p-50096707.js +0 -2
  278. package/dist/siemens-ix/p-5682e985.js +0 -2
  279. package/dist/siemens-ix/p-5db5a0b5.entry.js +0 -2
  280. package/dist/siemens-ix/p-5db5a0b5.entry.js.map +0 -1
  281. package/dist/siemens-ix/p-68bb2a09.entry.js.map +0 -1
  282. package/dist/siemens-ix/p-792e1c52.entry.js.map +0 -1
  283. package/dist/siemens-ix/p-79bb0d39.js +0 -2
  284. package/dist/siemens-ix/p-79bb0d39.js.map +0 -1
  285. package/dist/siemens-ix/p-857f99c8.entry.js +0 -2
  286. package/dist/siemens-ix/p-857f99c8.entry.js.map +0 -1
  287. package/dist/siemens-ix/p-9fe2759f.entry.js.map +0 -1
  288. package/dist/siemens-ix/p-a2200306.js +0 -4
  289. package/dist/siemens-ix/p-a427e6a2.js +0 -2
  290. package/dist/siemens-ix/p-a427e6a2.js.map +0 -1
  291. package/dist/siemens-ix/p-bded112a.entry.js +0 -2
  292. package/dist/siemens-ix/p-bded112a.entry.js.map +0 -1
  293. package/dist/siemens-ix/p-f7618d1d.entry.js +0 -2
  294. package/dist/siemens-ix/p-f7618d1d.entry.js.map +0 -1
  295. /package/dist/siemens-ix/{p-0dbc970e.entry.js.map → p-0b2f0536.entry.js.map} +0 -0
  296. /package/dist/siemens-ix/{p-044c2a7b.entry.js.map → p-18542846.entry.js.map} +0 -0
  297. /package/dist/siemens-ix/{p-d7aa00d6.js.map → p-3aaecbd9.js.map} +0 -0
  298. /package/dist/siemens-ix/{p-175599e4.entry.js.map → p-42320fb3.entry.js.map} +0 -0
  299. /package/dist/siemens-ix/{p-1f6df0c6.js.map → p-738c2d1f.js.map} +0 -0
  300. /package/dist/siemens-ix/{p-f35386ec.js.map → p-93d4d3c9.js.map} +0 -0
  301. /package/dist/siemens-ix/{p-9948574f.entry.js.map → p-97d4b3bd.entry.js.map} +0 -0
  302. /package/dist/siemens-ix/{p-6a4a2064.entry.js.map → p-9f960c0b.entry.js.map} +0 -0
  303. /package/dist/siemens-ix/{p-0c89cbcc.entry.js.map → p-a4dc6824.entry.js.map} +0 -0
  304. /package/dist/siemens-ix/{p-fe87443e.js.map → p-a6af13b0.js.map} +0 -0
  305. /package/dist/siemens-ix/{p-a3364116.entry.js.map → p-afb4565c.entry.js.map} +0 -0
  306. /package/dist/siemens-ix/{p-4c9b7548.entry.js.map → p-bc272f75.entry.js.map} +0 -0
  307. /package/dist/siemens-ix/{p-3205726a.entry.js.map → p-bfe469e4.entry.js.map} +0 -0
  308. /package/dist/siemens-ix/{p-5682e985.js.map → p-c3ca17fc.js.map} +0 -0
  309. /package/dist/siemens-ix/{p-50096707.js.map → p-d2f21544.js.map} +0 -0
  310. /package/dist/siemens-ix/{p-e9a37b3f.entry.js.map → p-ee0645f8.entry.js.map} +0 -0
  311. /package/dist/siemens-ix/{p-f39048a2.entry.js.map → p-fe396297.entry.js.map} +0 -0
@@ -15,12 +15,10 @@ import { a as anime } from './anime.es-a5520566.js';
15
15
  function TextareaElement(props) {
16
16
  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: {
17
17
  'is-invalid': props.isInvalid,
18
- }, required: props.required, value: props.value, placeholder: props.placeholder, onChange: (changeEvent) => {
19
- const target = changeEvent.target;
20
- props.valueChange(target.value);
21
- }, onInput: (inputEvent) => {
18
+ }, required: props.required, value: props.value, placeholder: props.placeholder, onInput: (inputEvent) => {
22
19
  const target = inputEvent.target;
23
20
  props.updateFormInternalValue(target.value);
21
+ props.valueChange(target.value);
24
22
  }, onBlur: () => props.onBlur(), style: {
25
23
  resize: props.resizeBehavior,
26
24
  height: props.textareaHeight,
@@ -30,12 +28,10 @@ function TextareaElement(props) {
30
28
  function InputElement(props) {
31
29
  return (h("input", Object.assign({ id: props.id, autoComplete: "off", readOnly: props.readonly, disabled: props.disabled, min: props.min, max: props.max, maxLength: props.maxLength ? Number(props.maxLength) : undefined, minLength: props.maxLength ? Number(props.minLength) : undefined, ref: props.inputRef, pattern: props.pattern, type: props.type, class: {
32
30
  'is-invalid': props.isInvalid,
33
- }, required: props.required, value: props.value, placeholder: props.placeholder, onKeyPress: (event) => props.onKeyPress(event), onChange: (changeEvent) => {
34
- const target = changeEvent.target;
35
- props.valueChange(target.value);
36
- }, onInput: (inputEvent) => {
31
+ }, required: props.required, value: props.value, placeholder: props.placeholder, onKeyPress: (event) => props.onKeyPress(event), onInput: (inputEvent) => {
37
32
  const target = inputEvent.target;
38
33
  props.updateFormInternalValue(target.value);
34
+ props.valueChange(target.value);
39
35
  }, onBlur: () => props.onBlur() }, props.ariaAttributes)));
40
36
  }
41
37
  const SlotEnd = (props, children) => {
@@ -178,4 +174,4 @@ function getAriaAttributesForInput(component) {
178
174
 
179
175
  export { InputElement as I, SlotEnd as S, TextareaElement as T, adjustPaddingForStartAndEnd as a, SlotStart as b, checkAllowedKeys as c, checkInternalValidity as d, getAriaAttributesForInput as g, mapValidationResult as m, onInputBlur as o };
180
176
 
181
- //# sourceMappingURL=input.util-715860e3.js.map
177
+ //# sourceMappingURL=input.util-c855b2ed.js.map
@@ -0,0 +1 @@
1
+ {"file":"input.util-c855b2ed.js","mappings":";;;;;;AAAA;;;;;;;;SAYgB,eAAe,CAAC,KAmB/B;IACC,QACE,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;YAClB,MAAM,MAAM,GAAG,UAAU,CAAC,MAA0B,CAAC;YACrD,KAAK,CAAC,uBAAuB,CAAC,MAAM,CAAC,K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EAAE;KACtD,CAAC;IAEF,IAAI,SAAS,CAAC,SAAS,IAAI,SAAS,CAAC,WAAW,EAAE;QAChD,SAAS,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAAC,WAAW,CAAC;KACxD;IACD,OAAO,SAAS,CAAC;AACnB;;;;","names":[],"sources":["src/components/input/input.fc.tsx","src/components/input/input.animation.ts","src/components/input/input.util.ts"],"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, FunctionalComponent } from '@stencil/core';\nimport { MakeRef } from '../utils/make-ref';\nimport { A11yAttributes } from '../utils/a11y';\n\nexport function TextareaElement(props: {\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 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(props: {\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 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 return (\n <input\n id={props.id}\n autoComplete=\"off\"\n readOnly={props.readonly}\n disabled={props.disabled}\n min={props.min}\n max={props.max}\n maxLength={props.maxLength ? Number(props.maxLength) : undefined}\n minLength={props.maxLength ? 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","/*\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 anime from 'animejs';\n\nexport function shakeInput(input: HTMLInputElement) {\n const xMax = 5;\n anime({\n targets: input,\n duration: 200,\n easing: 'easeInOutSine',\n loop: 2,\n translateX: [\n {\n value: xMax * -1,\n },\n {\n value: xMax,\n },\n {\n value: xMax / -2,\n },\n {\n value: xMax / 2,\n },\n {\n value: 0,\n },\n ],\n });\n}\n","/*\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 { 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) {\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', !valid);\n}\n\nexport function onInputBlur<T>(\n comp: IxInputFieldComponent<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 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"],"version":3}
@@ -1,11 +1,11 @@
1
1
  import { r as registerInstance, c as createEvent, d as readTask, h, F as Fragment, H as Host, g as getElement } from './index-97874de0.js';
2
- import { s as showAppSwitch } from './index-60d17930.js';
2
+ import { s as showAppSwitch } from './index-7421df0c.js';
3
3
  import { a as applicationLayoutService } from './service-c7fc628b.js';
4
4
  import { a as useContextConsumer, A as ApplicationLayoutContext } from './context-42311cff.js';
5
5
  import { m as menuController } from './menu-service-f974814b.js';
6
6
  import { h as hasSlottedElements } from './shadow-dom-cc0bc152.js';
7
7
  import './animation-4a73b1c3.js';
8
- import './modal-101eef04.js';
8
+ import './modal-4b3f8800.js';
9
9
  import './typed-event-ad6484c5.js';
10
10
  import './breakpoints-d5c2f627.js';
11
11
 
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, H as Host, g as getElement } from './index-97874de0.js';
2
2
  import './animation-4a73b1c3.js';
3
- import { d as dismissModal } from './modal-101eef04.js';
3
+ import { d as dismissModal } from './modal-4b3f8800.js';
4
4
  import './typed-event-ad6484c5.js';
5
5
 
6
6
  const applicationSwitchModalCss = ":host{display:block}:host *,:host *::after,:host *::before{box-sizing:border-box}:host ::-webkit-scrollbar-button{display:none}@-moz-document url-prefix(){:host *{scrollbar-color:var(--theme-scrollbar-thumb--background) var(--theme-scrollbar-track--background);scrollbar-width:thin}}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host .content{padding:2rem;padding-right:0}:host .content-apps{display:flex;position:relative;flex-wrap:wrap;justify-content:space-evenly;max-height:50vh;margin-right:0.25rem;gap:1.5rem}:host .loading{display:flex;flex-direction:row;align-items:center}:host .loading ix-spinner{margin-right:1rem}:host .AppEntry{all:unset;display:flex;flex-direction:row;align-items:center;gap:1rem;padding:0.5rem;flex:1 1 45%;cursor:pointer;border:0.0625rem solid transparent}:host .AppEntry.Selected{background-color:var(--theme-color-ghost--selected);border:var(--theme-dynamic-bdr-1)}:host .AppEntry:not(.disabled):not(:disabled).hover,:host .AppEntry:not(.disabled):not(:disabled):hover{background-color:var(--theme-ghost--background--hover)}:host .AppEntry:not(.disabled):not(:disabled).active,:host .AppEntry:not(.disabled):not(:disabled):active{background-color:var(--theme-ghost--background--active)}:host .AppEntry:focus-visible{border:1px solid var(--theme-color-focus-bdr)}:host .AppName{display:flex;flex-direction:column}:host .AppName ix-icon{margin-left:1rem}:host .AppIcon{width:3rem;height:3rem;border-radius:0.25rem}";
@@ -41,6 +41,10 @@ const Button = class {
41
41
  this.submitButtonElement.click();
42
42
  }
43
43
  }
44
+ setFocus() {
45
+ var _a;
46
+ (_a = this.hostElement.shadowRoot.querySelector('button')) === null || _a === void 0 ? void 0 : _a.focus();
47
+ }
44
48
  render() {
45
49
  const baseButtonProps = {
46
50
  variant: this.variant,
@@ -56,10 +60,11 @@ const Button = class {
56
60
  onClick: () => this.dispatchFormEvents(),
57
61
  type: this.type,
58
62
  alignment: this.alignment,
63
+ tabIndex: this.hostElement.tabIndex,
59
64
  };
60
- return (h(Host, { key: 'abc4e56d344d0e643d75881be8af126d1741c71d', class: {
65
+ return (h(Host, { key: 'd5ab86ccc3e14d1c70b57f43c56424f933580b63', tabindex: this.disabled ? -1 : 0, class: {
61
66
  disabled: this.disabled || this.loading,
62
- } }, h(BaseButton, Object.assign({ key: 'b99f950df525f45a94fd44a59591124c803d5254' }, baseButtonProps), h("slot", { key: '0aba994d33f94c9c235ec25da2bea0be1a2b798c' }))));
67
+ }, onFocus: () => this.setFocus() }, h(BaseButton, Object.assign({ key: 'f7df5bf7cf56a26cd42f8b3af19e94b77395a55b' }, baseButtonProps), h("slot", { key: '19fb63277a484ddbd75065f0b0ac78ce510f0847' }))));
63
68
  }
64
69
  get hostElement() { return getElement(this); }
65
70
  };
@@ -1 +1 @@
1
- {"file":"ix-button.entry.js","mappings":";;;AAAA,MAAM,SAAS,GAAG,myrBAAmyrB,CAAC;AACtzrB,uBAAe,SAAS;;MCkBX,MAAM;;;uBAKgB,SAAS;uBAKxB,K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AE,IAAI,CAAC,OAAO;YACrB,OAAO,EAAE,MAAM,IAAI,CAAC,kBAAkB,EAAE;YACxC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC;QAEF,QACE,EAAC,IAAI,qDACH,KAAK,EAAE;gBACL,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO;aACxC,IAED,EAAC,UAAU,qEAAK,eAAe,GAC7B,8DAAa,CACF,CACR,EACP;KACH;;;;;;;","names":[],"sources":["src/components/button/button.scss?tag=ix-button&encapsulation=shadow","src/components/button/button.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 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@import './button-mixin';\n\n@include btn;\n$button-categories: (danger, primary, secondary);\n@each $category in $button-categories {\n @include btn-variant($category);\n @include btn-variant('outline-#{$category}');\n @include btn-variant('invisible-#{$category}', false);\n}\n\n:host {\n min-width: 5rem;\n}\n","/*\n * SPDX-FileCopyrightText: 2023 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 { Component, Element, h, Host, Listen, Prop } from '@stencil/core';\nimport { BaseButton, BaseButtonProps } from './base-button';\n\nexport type ButtonVariant = 'danger' | 'primary' | 'secondary';\n\n@Component({\n tag: 'ix-button',\n shadow: true,\n styleUrl: './button.scss',\n})\nexport class Button {\n /**\n * Button variant\n * @since 2.3.0 - variant danger\n */\n @Prop() variant: ButtonVariant = 'primary';\n\n /**\n * Outline button\n */\n @Prop() outline = false;\n\n /**\n * Button with no background or outline\n */\n @Prop() ghost = false;\n\n /**\n * Disable the button\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Type of the button\n */\n @Prop() type: 'button' | 'submit' = 'button';\n\n /**\n * Loading button\n *\n * @since 2.0.0\n */\n @Prop() loading: boolean = false;\n\n /**\n * Icon name\n */\n @Prop() icon?: string;\n\n /** @internal */\n @Prop() alignment: 'center' | 'start' = 'center';\n\n /** @internal */\n @Prop() iconSize: '12' | '16' | '24' = '24';\n\n @Element() hostElement!: HTMLIxButtonElement;\n\n /**\n * Temp. workaround until stencil issue is fixed (https://github.com/ionic-team/stencil/issues/2284)\n */\n submitButtonElement?: HTMLButtonElement;\n\n @Listen('click', { capture: true })\n handleClick(event: Event) {\n if (this.disabled || this.loading) {\n event.stopPropagation();\n event.preventDefault();\n }\n }\n\n componentDidLoad() {\n if (this.type === 'submit') {\n const submitButton = document.createElement('button');\n submitButton.style.display = 'none';\n submitButton.type = 'submit';\n submitButton.tabIndex = -1;\n this.hostElement.appendChild(submitButton);\n\n this.submitButtonElement = submitButton;\n }\n }\n\n dispatchFormEvents() {\n if (\n this.type === 'submit' &&\n this.submitButtonElement &&\n !this.disabled &&\n !this.loading\n ) {\n this.submitButtonElement.click();\n }\n }\n\n render() {\n const baseButtonProps: BaseButtonProps = {\n variant: this.variant,\n outline: this.outline,\n ghost: this.ghost,\n iconOnly: false,\n iconOval: false,\n selected: false,\n disabled: this.disabled || this.loading,\n icon: this.icon,\n iconSize: this.iconSize,\n loading: this.loading,\n onClick: () => this.dispatchFormEvents(),\n type: this.type,\n alignment: this.alignment,\n };\n\n return (\n <Host\n class={{\n disabled: this.disabled || this.loading,\n }}\n >\n <BaseButton {...baseButtonProps}>\n <slot></slot>\n </BaseButton>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ix-button.entry.js","mappings":";;;AAAA,MAAM,SAAS,GAAG,myrBAAmyrB,CAAC;AACtzrB,uBAAe,SAAS;;MCkBX,MAAM;;;uBAKgB,SAAS;uBAKxB,KAAK;qBAKP,KAAK;wBAKe,KAAK;oBAKL,QAAQ;uBAOjB,KAAK;;yBAQQ,QAAQ;wBAGT,IAAI;;IAU3C,WAAW,CAAC,KAAY;QACtB,IAAI,IAA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,OAAO;YACrB,OAAO,EAAE,MAAM,IAAI,CAAC,kBAAkB,EAAE;YACxC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,QAAQ;SACpC,CAAC;QAEF,QACE,EAAC,IAAI,qDACH,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC,EAChC,KAAK,EAAE;gBACL,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO;aACxC,EACD,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,IAE9B,EAAC,UAAU,qEAAK,eAAe,GAC7B,8DAAa,CACF,CACR,EACP;KACH;;;;;;;","names":[],"sources":["src/components/button/button.scss?tag=ix-button&encapsulation=shadow","src/components/button/button.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 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@import './button-mixin';\n\n@include btn;\n$button-categories: (danger, primary, secondary);\n@each $category in $button-categories {\n @include btn-variant($category);\n @include btn-variant('outline-#{$category}');\n @include btn-variant('invisible-#{$category}', false);\n}\n\n:host {\n min-width: 5rem;\n}\n","/*\n * SPDX-FileCopyrightText: 2023 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 { Component, Element, h, Host, Listen, Prop } from '@stencil/core';\nimport { BaseButton, BaseButtonProps } from './base-button';\n\nexport type ButtonVariant = 'danger' | 'primary' | 'secondary';\n\n@Component({\n tag: 'ix-button',\n shadow: true,\n styleUrl: './button.scss',\n})\nexport class Button {\n /**\n * Button variant\n * @since 2.3.0 - variant danger\n */\n @Prop() variant: ButtonVariant = 'primary';\n\n /**\n * Outline button\n */\n @Prop() outline = false;\n\n /**\n * Button with no background or outline\n */\n @Prop() ghost = false;\n\n /**\n * Disable the button\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Type of the button\n */\n @Prop() type: 'button' | 'submit' = 'button';\n\n /**\n * Loading button\n *\n * @since 2.0.0\n */\n @Prop() loading: boolean = false;\n\n /**\n * Icon name\n */\n @Prop() icon?: string;\n\n /** @internal */\n @Prop() alignment: 'center' | 'start' = 'center';\n\n /** @internal */\n @Prop() iconSize: '12' | '16' | '24' = '24';\n\n @Element() hostElement!: HTMLIxButtonElement;\n\n /**\n * Temp. workaround until stencil issue is fixed (https://github.com/ionic-team/stencil/issues/2284)\n */\n submitButtonElement?: HTMLButtonElement;\n\n @Listen('click', { capture: true })\n handleClick(event: Event) {\n if (this.disabled || this.loading) {\n event.stopPropagation();\n event.preventDefault();\n }\n }\n\n componentDidLoad() {\n if (this.type === 'submit') {\n const submitButton = document.createElement('button');\n submitButton.style.display = 'none';\n submitButton.type = 'submit';\n submitButton.tabIndex = -1;\n this.hostElement.appendChild(submitButton);\n\n this.submitButtonElement = submitButton;\n }\n }\n\n dispatchFormEvents() {\n if (\n this.type === 'submit' &&\n this.submitButtonElement &&\n !this.disabled &&\n !this.loading\n ) {\n this.submitButtonElement.click();\n }\n }\n\n setFocus() {\n this.hostElement.shadowRoot!.querySelector('button')?.focus();\n }\n\n render() {\n const baseButtonProps: BaseButtonProps = {\n variant: this.variant,\n outline: this.outline,\n ghost: this.ghost,\n iconOnly: false,\n iconOval: false,\n selected: false,\n disabled: this.disabled || this.loading,\n icon: this.icon,\n iconSize: this.iconSize,\n loading: this.loading,\n onClick: () => this.dispatchFormEvents(),\n type: this.type,\n alignment: this.alignment,\n tabIndex: this.hostElement.tabIndex,\n };\n\n return (\n <Host\n tabindex={this.disabled ? -1 : 0}\n class={{\n disabled: this.disabled || this.loading,\n }}\n onFocus={() => this.setFocus()}\n >\n <BaseButton {...baseButtonProps}>\n <slot></slot>\n </BaseButton>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -3,7 +3,7 @@ import { m as matchBreakpoint } from './breakpoints-d5c2f627.js';
3
3
  import { D as DateTime_1, I as Info_1 } from './luxon-aa110584.js';
4
4
  import { O as OnListener } from './listener-18b29507.js';
5
5
  import { m as makeRef } from './make-ref-4b76e9b5.js';
6
- import { n as iconChevronRightSmall, o as iconChevronLeftSmall, p as iconSingleCheck } from './index-ad2af369.js';
6
+ import { o as iconChevronRightSmall, p as iconChevronLeftSmall, q as iconSingleCheck } from './index-2b76ea55.js';
7
7
 
8
8
  const colCss = ":host{position:relative;flex-basis:0;flex-grow:1;width:100%;max-width:100%;min-height:1px;padding:calc(var(--ix-layout-grid-gutter) * 0.5)}:host *,:host *::after,:host *::before{box-sizing:border-box}:host ::-webkit-scrollbar-button{display:none}@-moz-document url-prefix(){:host *{scrollbar-color:var(--theme-scrollbar-thumb--background) var(--theme-scrollbar-track--background);scrollbar-width:thin}}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}";
9
9
  const IxColStyle0 = colCss;
@@ -1,10 +1,10 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-97874de0.js';
2
+ import { i as iconCalendar } from './index-2b76ea55.js';
2
3
  import { D as DateTime_1 } from './luxon-aa110584.js';
3
4
  import { d as dropdownController } from './dropdown-controller-cb6d3789.js';
4
- import { m as makeRef } from './make-ref-4b76e9b5.js';
5
+ import { a as adjustPaddingForStartAndEnd, S as SlotEnd, b as SlotStart } from './input.util-c855b2ed.js';
5
6
  import { H as HookValidationLifecycle, c as createClassMutationObserver } from './validation-45aa490c.js';
6
- import { a as adjustPaddingForStartAndEnd, S as SlotEnd, b as SlotStart } from './input.util-715860e3.js';
7
- import { i as iconCalendar } from './index-ad2af369.js';
7
+ import { m as makeRef } from './make-ref-4b76e9b5.js';
8
8
  import './a11y-b10c12e0.js';
9
9
  import './rwd.util-d8e00a88.js';
10
10
  import './anime.es-a5520566.js';
@@ -235,12 +235,12 @@ const DateInput = class {
235
235
  const invalidText = this.isInputInvalid
236
236
  ? this.i18nErrorDateUnparsable
237
237
  : this.invalidText;
238
- return (h(Host, { key: 'f8e90dff95d76faed16b0bbb67f7ae014d170c8f', class: {
238
+ return (h(Host, { key: 'd05f1297b5282bca5b43401e5527a0ddee4a8a58', class: {
239
239
  disabled: this.disabled,
240
240
  readonly: this.readonly,
241
- } }, h("ix-field-wrapper", { key: 'b101c12280803e5316d03ca8ac00179dea52f3ce', label: this.label, helperText: this.helperText, isInvalid: this.isInvalid, invalidText: invalidText, infoText: this.infoText, isInfo: this.isInfo, isWarning: this.isWarning, warningText: this.warningText, isValid: this.isValid, validText: this.validText, showTextAsTooltip: this.showTextAsTooltip, required: this.required, controlRef: this.inputElementRef }, this.renderInput()), h("ix-dropdown", { key: 'de9f9c3775cd061d5098a2b9ed2242f509ea4be0', "data-testid": "date-dropdown", trigger: this.inputElementRef.waitForCurrent(), ref: this.dropdownElementRef, closeBehavior: "outside", suppressOverflowBehavior: true, show: this.show, onShowChanged: (event) => {
241
+ } }, h("ix-field-wrapper", { key: '2b910308be3df70b11eb8cbfb355b8c9c3accc0b', label: this.label, helperText: this.helperText, isInvalid: this.isInvalid, invalidText: invalidText, infoText: this.infoText, isInfo: this.isInfo, isWarning: this.isWarning, warningText: this.warningText, isValid: this.isValid, validText: this.validText, showTextAsTooltip: this.showTextAsTooltip, required: this.required, controlRef: this.inputElementRef }, this.renderInput()), h("ix-dropdown", { key: '2665ff4fd4c5f257dd92b00a7b5dddd3fb1881b6', "data-testid": "date-dropdown", trigger: this.inputElementRef.waitForCurrent(), ref: this.dropdownElementRef, closeBehavior: "outside", suppressOverflowBehavior: true, show: this.show, onShowChanged: (event) => {
242
242
  this.show = event.detail;
243
- } }, h("ix-date-picker", { key: '3c1ee7eeeb71f458fdce19e32d517d32ada48e74', ref: this.datepickerRef, format: this.format, locale: this.locale, range: false, from: (_a = this.from) !== null && _a !== void 0 ? _a : '', onDateChange: (event) => {
243
+ } }, h("ix-date-picker", { key: '211396b59afb9fd5037f4efee6b8e626a5dd3403', ref: this.datepickerRef, format: this.format, locale: this.locale, range: false, from: (_a = this.from) !== null && _a !== void 0 ? _a : '', onDateChange: (event) => {
244
244
  const { from } = event.detail;
245
245
  this.onInput(from);
246
246
  } }))));
@@ -1 +1 @@
1
- {"file":"ix-date-input.entry.js","mappings":";;;;;;;;;;;AAAA,MAAM,YAAY,GAAG,iq9BAAiq9B,CAAC;AACvr9B,0BAAe,YAAY;;ACD3B;;;;;;;;;;;;;;;;;;MAmDa,SAAS;;;;;;;;;;;;;;QAiHH,iBAAY,GAAG,OAAO,EAAkB,CAAC;QACzC,eAAU,GAAG,OAAO,EAAkB,CAAC;QAEvC,kBAAa,GAAG,OAAO,EAA2B,CAAC;QAEnD,oBAAe,GAAG,OAAO,EAAoB,CAAC;QAC9C,uBAAkB,GAAG,OAAO,EAAyB,CAAC;;;qBAtGf,EAAE;;sBAajC,YAAY;;;;;wBAyBT,KAAK;wBAKL,KAAK;;;;;uCA0B/B,mBAAmB;oBAkBL,KAAK;oBACU,IAAI;8BACT,KAAK;yBACV,KAAK;uBACP,KAAK;sBACN,KAAK;yBACF,KAAK;qBACT,KAAK;;IAYtB,uBAAuB,CAAC,KAAa;QACnC,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QACvC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;KACpB;IAED,iBAAiB;QACf,IAAI,CAAC,aAAa,GAAG,2BAA2B,CAAC,IAAI,CAAC,WAAW,EAAE,MACjE,IAAI,CAAC,cAAc,EAAE,CACtB,CAAC;KACH;IA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EACf,aAAa,EAAE,CAAC,KAAK;gBACnB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC;aAC1B,IAED,uEACE,GAAG,EAAE,IAAI,CAAC,aAAa,EACvB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,MAAA,IAAI,CAAC,IAAI,mCAAI,EAAE,EACrB,YAAY,EAAE,CAAC,KAAK;gBAClB,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;gBAC9B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;aACpB,GACe,CACN,CACT,EACP;KACH;;;;;;;;AA9GD;IADC,uBAAuB,EAAE;wDAYzB;;;;;","names":["DateTime"],"sources":["src/components/date-input/date-input.scss?tag=ix-date-input&encapsulation=shadow","src/components/date-input/date-input.tsx"],"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@import 'mixins/shadow-dom/component';\n@import 'components/form/input';\n@import './../input/input.mixins.scss';\n\n@include input-field;\n\n:host {\n @include ix-component;\n\n display: inline-block;\n position: relative;\n\n input {\n width: 100%;\n height: 100%;\n }\n\n .calendar-hidden {\n display: none;\n }\n}\n\n:host(.readonly) {\n input {\n pointer-events: none;\n }\n}\n","/*\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 {\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 { DateTime } from 'luxon';\nimport { dropdownController } from '../dropdown/dropdown-controller';\nimport { MakeRef, makeRef } from '../utils/make-ref';\nimport {\n ClassMutationObserver,\n HookValidationLifecycle,\n IxInputFieldComponent,\n ValidationResults,\n createClassMutationObserver,\n} from '../utils/input';\nimport { SlotEnd, SlotStart } from '../input/input.fc';\nimport { adjustPaddingForStartAndEnd } from '../input/input.util';\nimport { iconCalendar } from '@siemens/ix-icons/icons';\n\nexport type DateInputValidityState = {\n patternMismatch: boolean;\n invalidReason?: string;\n};\n\n/**\n * @since 2.6.0\n * @form-ready 2.6.0\n */\n@Component({\n tag: 'ix-date-input',\n styleUrl: 'date-input.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class DateInput implements IxInputFieldComponent<string> {\n @Element() hostElement!: HTMLIxDateInputElement;\n @AttachInternals() formInternals!: ElementInternals;\n\n /**\n * name of the input element\n */\n @Prop({ reflect: true }) name?: string;\n\n /**\n * placeholder of the input element\n */\n @Prop({ reflect: true }) placeholder?: string;\n\n /**\n * value of the input element\n */\n @Prop({ reflect: true, mutable: true }) value: string = '';\n\n /**\n * Locale identifier (e.g. 'en' or 'de').\n *\n * @since 2.6.0\n */\n @Prop() locale?: string;\n\n /**\n * Date format string.\n * See {@link \"https://moment.github.io/luxon/#/formatting?id=table-of-tokens\"} for all available tokens.\n */\n @Prop() format: string = 'yyyy/LL/dd';\n\n /**\n * required attribute\n */\n @Prop() required?: boolean;\n\n /**\n * helper text below the input field\n */\n @Prop() helperText?: string;\n\n /**\n * label of the input field\n */\n @Prop() label?: string;\n\n /**\n * error text below the input field\n */\n @Prop({ reflect: true }) invalidText?: string;\n\n /**\n * readonly attribute\n */\n @Prop() readonly: boolean = false;\n\n /**\n * disabled attribute\n */\n @Prop() disabled: boolean = false;\n\n /**\n * info text below the input field\n */\n @Prop() infoText?: string;\n\n /**\n * warning text below the input field\n */\n @Prop() warningText?: string;\n\n /**\n * valid text below the input field\n */\n @Prop() validText?: string;\n\n /**\n * show text as tooltip\n */\n @Prop() showTextAsTooltip?: boolean;\n\n /**\n * i18n string for the error message when the date is not parsable\n */\n @Prop({ attribute: 'i18n-error-date-unparsable' }) i18nErrorDateUnparsable =\n 'Date is not valid';\n\n /**\n * Input change event.\n */\n @Event({ cancelable: false }) valueChange!: EventEmitter<string>;\n\n /**\n * Validation state change event.\n */\n @Event() validityStateChange!: EventEmitter<DateInputValidityState>;\n\n /** @internal */\n @Event() ixFocus!: EventEmitter<void>;\n\n /** @internal */\n @Event() ixBlur!: EventEmitter<void>;\n\n @State() show = false;\n @State() from: string | null = null;\n @State() isInputInvalid = false;\n @State() isInvalid = false;\n @State() isValid = false;\n @State() isInfo = false;\n @State() isWarning = false;\n @State() focus = false;\n\n private readonly slotStartRef = makeRef<HTMLDivElement>();\n private readonly slotEndRef = makeRef<HTMLDivElement>();\n\n private readonly datepickerRef = makeRef<HTMLIxDatePickerElement>();\n\n private readonly inputElementRef = makeRef<HTMLInputElement>();\n private readonly dropdownElementRef = makeRef<HTMLIxDropdownElement>();\n private classObserver?: ClassMutationObserver;\n private invalidReason?: string;\n\n updateFormInternalValue(value: string): void {\n this.formInternals.setFormValue(value);\n this.value = value;\n }\n\n connectedCallback(): void {\n this.classObserver = createClassMutationObserver(this.hostElement, () =>\n this.checkClassList()\n );\n }\n\n componentWillLoad(): void {\n this.onInput(this.value);\n if (this.isInputInvalid) {\n this.from = null;\n } else {\n this.watchValue();\n }\n\n this.checkClassList();\n this.updateFormInternalValue(this.value);\n }\n\n componentDidRender(): void {\n this.updatePaddings();\n }\n\n private updatePaddings() {\n adjustPaddingForStartAndEnd(\n this.slotStartRef.current,\n this.slotEndRef.current,\n this.inputElementRef.current\n );\n }\n\n disconnectedCallback(): void {\n if (this.classObserver) {\n this.classObserver.destroy();\n }\n }\n\n @Watch('value')\n watchValue() {\n this.from = this.value;\n }\n\n /** @internal */\n @Method()\n hasValidValue(): Promise<boolean> {\n return Promise.resolve(!!this.value);\n }\n\n /** @internal */\n @Method()\n getAssociatedFormElement(): Promise<HTMLFormElement | null> {\n return Promise.resolve(this.formInternals.form);\n }\n\n async onInput(value: string) {\n this.value = value;\n if (!value) {\n this.valueChange.emit(value);\n return;\n }\n\n if (!this.format) {\n return;\n }\n\n const date = DateTime.fromFormat(value, this.format);\n if (date.isValid) {\n this.isInputInvalid = false;\n\n this.updateFormInternalValue(value);\n this.closeDropdown();\n } else {\n this.isInputInvalid = true;\n this.invalidReason = date.invalidReason;\n }\n\n this.valueChange.emit(value);\n }\n\n onCalenderClick(event: Event) {\n if (!this.show) {\n event.stopPropagation();\n event.preventDefault();\n this.openDropdown();\n }\n\n if (this.inputElementRef.current) {\n this.inputElementRef.current.focus();\n }\n }\n\n async openDropdown() {\n const dropdownElement = await this.dropdownElementRef.waitForCurrent();\n const id = dropdownElement.getAttribute('data-ix-dropdown');\n\n dropdownController.dismissAll();\n if (!id) {\n return;\n }\n\n const dropdown = dropdownController.getDropdownById(id);\n if (!dropdown) {\n return;\n }\n dropdownController.present(dropdown);\n }\n\n async closeDropdown() {\n const dropdownElement = await this.dropdownElementRef.waitForCurrent();\n const id = dropdownElement.getAttribute('data-ix-dropdown');\n\n if (!id) {\n return;\n }\n\n const dropdown = dropdownController.getDropdownById(id);\n if (!dropdown) {\n return;\n }\n dropdownController.dismiss(dropdown);\n }\n\n private checkClassList() {\n this.isInvalid = this.hostElement.classList.contains('ix-invalid');\n }\n\n private renderInput() {\n return (\n <div class=\"input-wrapper\">\n <SlotStart\n slotStartRef={this.slotStartRef}\n onSlotChange={() => this.updatePaddings()}\n ></SlotStart>\n <input\n autoComplete=\"off\"\n class={{\n 'is-invalid': this.isInputInvalid,\n }}\n disabled={this.disabled}\n readOnly={this.readonly}\n readonly={this.readonly}\n required={this.required}\n ref={this.inputElementRef}\n type=\"text\"\n value={this.value}\n onInput={(event) => {\n const target = event.target as HTMLInputElement;\n this.onInput(target.value);\n }}\n onClick={(event) => {\n if (this.show) {\n event.stopPropagation();\n event.preventDefault();\n }\n }}\n onFocus={async () => {\n this.openDropdown();\n this.ixFocus.emit();\n }}\n onBlur={() => this.ixBlur.emit()}\n ></input>\n <SlotEnd\n slotEndRef={this.slotEndRef}\n onSlotChange={() => this.updatePaddings()}\n >\n <ix-icon-button\n data-testid=\"open-calendar\"\n class={{ 'calendar-hidden': this.disabled || this.readonly }}\n ghost\n icon={iconCalendar}\n onClick={(event) => this.onCalenderClick(event)}\n ></ix-icon-button>\n </SlotEnd>\n </div>\n );\n }\n\n @HookValidationLifecycle()\n hookValidationLifecycle({\n isInfo,\n isInvalid,\n isInvalidByRequired,\n isValid,\n isWarning,\n }: ValidationResults) {\n this.isInvalid = isInvalid || isInvalidByRequired || this.isInputInvalid;\n this.isInfo = isInfo;\n this.isValid = isValid;\n this.isWarning = isWarning;\n }\n\n @Watch('isInputInvalid')\n async onInputValidationChange() {\n const state = await this.getValidityState();\n this.validityStateChange.emit({\n patternMismatch: state.patternMismatch,\n invalidReason: this.invalidReason,\n });\n }\n\n /** @internal */\n @Method()\n getValidityState(): Promise<ValidityState> {\n return Promise.resolve({\n badInput: false,\n customError: false,\n patternMismatch: this.isInputInvalid,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valid: !this.isInputInvalid,\n valueMissing: !!this.required && !this.value,\n });\n }\n\n /**\n * Get the native input element\n */\n @Method()\n getNativeInputElement(): Promise<HTMLInputElement> {\n return this.inputElementRef.waitForCurrent();\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 render() {\n const invalidText = this.isInputInvalid\n ? this.i18nErrorDateUnparsable\n : this.invalidText;\n\n return (\n <Host\n class={{\n disabled: this.disabled,\n readonly: this.readonly,\n }}\n >\n <ix-field-wrapper\n label={this.label}\n helperText={this.helperText}\n isInvalid={this.isInvalid}\n invalidText={invalidText}\n infoText={this.infoText}\n isInfo={this.isInfo}\n isWarning={this.isWarning}\n warningText={this.warningText}\n isValid={this.isValid}\n validText={this.validText}\n showTextAsTooltip={this.showTextAsTooltip}\n required={this.required}\n controlRef={this.inputElementRef as unknown as MakeRef<HTMLElement>}\n >\n {this.renderInput()}\n </ix-field-wrapper>\n <ix-dropdown\n data-testid=\"date-dropdown\"\n trigger={this.inputElementRef.waitForCurrent()}\n ref={this.dropdownElementRef}\n closeBehavior=\"outside\"\n suppressOverflowBehavior={true}\n show={this.show}\n onShowChanged={(event) => {\n this.show = event.detail;\n }}\n >\n <ix-date-picker\n ref={this.datepickerRef}\n format={this.format}\n locale={this.locale}\n range={false}\n from={this.from ?? ''}\n onDateChange={(event) => {\n const { from } = event.detail;\n this.onInput(from);\n }}\n ></ix-date-picker>\n </ix-dropdown>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ix-date-input.entry.js","mappings":";;;;;;;;;;;AAAA,MAAM,YAAY,GAAG,iq9BAAiq9B,CAAC;AACvr9B,0BAAe,YAAY;;ACD3B;;;;;;;;;;;;;;;;;;MAqDa,SAAS;;;;;;;;;;;;;;QAiHH,iBAAY,GAAG,OAAO,EAAkB,CAAC;QACzC,eAAU,GAAG,OAAO,EAAkB,CAAC;QAEvC,kBAAa,GAAG,OAAO,EAA2B,CAAC;QAEnD,oBAAe,GAAG,OAAO,EAAoB,CAAC;QAC9C,uBAAkB,GAAG,OAAO,EAAyB,CAAC;;;qBAtGf,EAAE;;sBAajC,YAAY;;;;;wBAyBT,KAAK;wBAKL,KAAK;;;;;uCA0B/B,mBAAmB;oBAkBL,KAAK;oBACU,IAAI;8BACT,KAAK;yBACV,KAAK;uBACP,KAAK;sBACN,KAAK;yBACF,KAAK;qBACT,KAAK;;IAYtB,uBAAuB,CAAC,KAAa;QACnC,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QACvC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;KACpB;IAED,iBAAiB;QACf,IAAI,CAAC,aAAa,GAAG,2BAA2B,CAAC,IAAI,CAAC,WAAW,EAAE,MACjE,IAAI,CAAC,cAAc,EAAE,CACtB,CAAC;KACH;IAED,iBAAiB;QACf,I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CAAC,KAAK;gBACnB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC;aAC1B,IAED,uEACE,GAAG,EAAE,IAAI,CAAC,aAAa,EACvB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,MAAA,IAAI,CAAC,IAAI,mCAAI,EAAE,EACrB,YAAY,EAAE,CAAC,KAAK;gBAClB,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;gBAC9B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;aACpB,GACe,CACN,CACT,EACP;KACH;;;;;;;;AA9GD;IADC,uBAAuB,EAAE;wDAYzB;;;;;","names":["DateTime"],"sources":["src/components/date-input/date-input.scss?tag=ix-date-input&encapsulation=shadow","src/components/date-input/date-input.tsx"],"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@import 'mixins/shadow-dom/component';\n@import 'components/form/input';\n@import './../input/input.mixins.scss';\n\n@include input-field;\n\n:host {\n @include ix-component;\n\n display: inline-block;\n position: relative;\n\n input {\n width: 100%;\n height: 100%;\n }\n\n .calendar-hidden {\n display: none;\n }\n}\n\n:host(.readonly) {\n input {\n pointer-events: none;\n }\n}\n","/*\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 { iconCalendar } 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 { DateTime } from 'luxon';\nimport { dropdownController } from '../dropdown/dropdown-controller';\nimport { SlotEnd, SlotStart } from '../input/input.fc';\nimport { adjustPaddingForStartAndEnd } from '../input/input.util';\nimport {\n ClassMutationObserver,\n HookValidationLifecycle,\n IxInputFieldComponent,\n ValidationResults,\n createClassMutationObserver,\n} from '../utils/input';\nimport { makeRef } from '../utils/make-ref';\n\nexport type DateInputValidityState = {\n patternMismatch: boolean;\n invalidReason?: string;\n};\n\n/**\n * @since 2.6.0\n * @form-ready 2.6.0\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-date-input',\n styleUrl: 'date-input.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class DateInput implements IxInputFieldComponent<string> {\n @Element() hostElement!: HTMLIxDateInputElement;\n @AttachInternals() formInternals!: ElementInternals;\n\n /**\n * name of the input element\n */\n @Prop({ reflect: true }) name?: string;\n\n /**\n * placeholder of the input element\n */\n @Prop({ reflect: true }) placeholder?: string;\n\n /**\n * value of the input element\n */\n @Prop({ reflect: true, mutable: true }) value: string = '';\n\n /**\n * Locale identifier (e.g. 'en' or 'de').\n *\n * @since 2.6.0\n */\n @Prop() locale?: string;\n\n /**\n * Date format string.\n * See {@link \"https://moment.github.io/luxon/#/formatting?id=table-of-tokens\"} for all available tokens.\n */\n @Prop() format: string = 'yyyy/LL/dd';\n\n /**\n * required attribute\n */\n @Prop() required?: boolean;\n\n /**\n * helper text below the input field\n */\n @Prop() helperText?: string;\n\n /**\n * label of the input field\n */\n @Prop() label?: string;\n\n /**\n * error text below the input field\n */\n @Prop({ reflect: true }) invalidText?: string;\n\n /**\n * readonly attribute\n */\n @Prop() readonly: boolean = false;\n\n /**\n * disabled attribute\n */\n @Prop() disabled: boolean = false;\n\n /**\n * info text below the input field\n */\n @Prop() infoText?: string;\n\n /**\n * warning text below the input field\n */\n @Prop() warningText?: string;\n\n /**\n * valid text below the input field\n */\n @Prop() validText?: string;\n\n /**\n * show text as tooltip\n */\n @Prop() showTextAsTooltip?: boolean;\n\n /**\n * i18n string for the error message when the date is not parsable\n */\n @Prop({ attribute: 'i18n-error-date-unparsable' }) i18nErrorDateUnparsable =\n 'Date is not valid';\n\n /**\n * Input change event.\n */\n @Event({ cancelable: false }) valueChange!: EventEmitter<string>;\n\n /**\n * Validation state change event.\n */\n @Event() validityStateChange!: EventEmitter<DateInputValidityState>;\n\n /** @internal */\n @Event() ixFocus!: EventEmitter<void>;\n\n /** @internal */\n @Event() ixBlur!: EventEmitter<void>;\n\n @State() show = false;\n @State() from: string | null = null;\n @State() isInputInvalid = false;\n @State() isInvalid = false;\n @State() isValid = false;\n @State() isInfo = false;\n @State() isWarning = false;\n @State() focus = false;\n\n private readonly slotStartRef = makeRef<HTMLDivElement>();\n private readonly slotEndRef = makeRef<HTMLDivElement>();\n\n private readonly datepickerRef = makeRef<HTMLIxDatePickerElement>();\n\n private readonly inputElementRef = makeRef<HTMLInputElement>();\n private readonly dropdownElementRef = makeRef<HTMLIxDropdownElement>();\n private classObserver?: ClassMutationObserver;\n private invalidReason?: string;\n\n updateFormInternalValue(value: string): void {\n this.formInternals.setFormValue(value);\n this.value = value;\n }\n\n connectedCallback(): void {\n this.classObserver = createClassMutationObserver(this.hostElement, () =>\n this.checkClassList()\n );\n }\n\n componentWillLoad(): void {\n this.onInput(this.value);\n if (this.isInputInvalid) {\n this.from = null;\n } else {\n this.watchValue();\n }\n\n this.checkClassList();\n this.updateFormInternalValue(this.value);\n }\n\n componentDidRender(): void {\n this.updatePaddings();\n }\n\n private updatePaddings() {\n adjustPaddingForStartAndEnd(\n this.slotStartRef.current,\n this.slotEndRef.current,\n this.inputElementRef.current\n );\n }\n\n disconnectedCallback(): void {\n if (this.classObserver) {\n this.classObserver.destroy();\n }\n }\n\n @Watch('value')\n watchValue() {\n this.from = this.value;\n }\n\n /** @internal */\n @Method()\n hasValidValue(): Promise<boolean> {\n return Promise.resolve(!!this.value);\n }\n\n /** @internal */\n @Method()\n getAssociatedFormElement(): Promise<HTMLFormElement | null> {\n return Promise.resolve(this.formInternals.form);\n }\n\n async onInput(value: string) {\n this.value = value;\n if (!value) {\n this.valueChange.emit(value);\n return;\n }\n\n if (!this.format) {\n return;\n }\n\n const date = DateTime.fromFormat(value, this.format);\n if (date.isValid) {\n this.isInputInvalid = false;\n\n this.updateFormInternalValue(value);\n this.closeDropdown();\n } else {\n this.isInputInvalid = true;\n this.invalidReason = date.invalidReason;\n }\n\n this.valueChange.emit(value);\n }\n\n onCalenderClick(event: Event) {\n if (!this.show) {\n event.stopPropagation();\n event.preventDefault();\n this.openDropdown();\n }\n\n if (this.inputElementRef.current) {\n this.inputElementRef.current.focus();\n }\n }\n\n async openDropdown() {\n const dropdownElement = await this.dropdownElementRef.waitForCurrent();\n const id = dropdownElement.getAttribute('data-ix-dropdown');\n\n dropdownController.dismissAll();\n if (!id) {\n return;\n }\n\n const dropdown = dropdownController.getDropdownById(id);\n if (!dropdown) {\n return;\n }\n dropdownController.present(dropdown);\n }\n\n async closeDropdown() {\n const dropdownElement = await this.dropdownElementRef.waitForCurrent();\n const id = dropdownElement.getAttribute('data-ix-dropdown');\n\n if (!id) {\n return;\n }\n\n const dropdown = dropdownController.getDropdownById(id);\n if (!dropdown) {\n return;\n }\n dropdownController.dismiss(dropdown);\n }\n\n private checkClassList() {\n this.isInvalid = this.hostElement.classList.contains('ix-invalid');\n }\n\n private renderInput() {\n return (\n <div class=\"input-wrapper\">\n <SlotStart\n slotStartRef={this.slotStartRef}\n onSlotChange={() => this.updatePaddings()}\n ></SlotStart>\n <input\n autoComplete=\"off\"\n class={{\n 'is-invalid': this.isInputInvalid,\n }}\n disabled={this.disabled}\n readOnly={this.readonly}\n readonly={this.readonly}\n required={this.required}\n ref={this.inputElementRef}\n type=\"text\"\n value={this.value}\n onInput={(event) => {\n const target = event.target as HTMLInputElement;\n this.onInput(target.value);\n }}\n onClick={(event) => {\n if (this.show) {\n event.stopPropagation();\n event.preventDefault();\n }\n }}\n onFocus={async () => {\n this.openDropdown();\n this.ixFocus.emit();\n }}\n onBlur={() => this.ixBlur.emit()}\n ></input>\n <SlotEnd\n slotEndRef={this.slotEndRef}\n onSlotChange={() => this.updatePaddings()}\n >\n <ix-icon-button\n data-testid=\"open-calendar\"\n class={{ 'calendar-hidden': this.disabled || this.readonly }}\n ghost\n icon={iconCalendar}\n onClick={(event) => this.onCalenderClick(event)}\n ></ix-icon-button>\n </SlotEnd>\n </div>\n );\n }\n\n @HookValidationLifecycle()\n hookValidationLifecycle({\n isInfo,\n isInvalid,\n isInvalidByRequired,\n isValid,\n isWarning,\n }: ValidationResults) {\n this.isInvalid = isInvalid || isInvalidByRequired || this.isInputInvalid;\n this.isInfo = isInfo;\n this.isValid = isValid;\n this.isWarning = isWarning;\n }\n\n @Watch('isInputInvalid')\n async onInputValidationChange() {\n const state = await this.getValidityState();\n this.validityStateChange.emit({\n patternMismatch: state.patternMismatch,\n invalidReason: this.invalidReason,\n });\n }\n\n /** @internal */\n @Method()\n getValidityState(): Promise<ValidityState> {\n return Promise.resolve({\n badInput: false,\n customError: false,\n patternMismatch: this.isInputInvalid,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valid: !this.isInputInvalid,\n valueMissing: !!this.required && !this.value,\n });\n }\n\n /**\n * Get the native input element\n */\n @Method()\n getNativeInputElement(): Promise<HTMLInputElement> {\n return this.inputElementRef.waitForCurrent();\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 render() {\n const invalidText = this.isInputInvalid\n ? this.i18nErrorDateUnparsable\n : this.invalidText;\n\n return (\n <Host\n class={{\n disabled: this.disabled,\n readonly: this.readonly,\n }}\n >\n <ix-field-wrapper\n label={this.label}\n helperText={this.helperText}\n isInvalid={this.isInvalid}\n invalidText={invalidText}\n infoText={this.infoText}\n isInfo={this.isInfo}\n isWarning={this.isWarning}\n warningText={this.warningText}\n isValid={this.isValid}\n validText={this.validText}\n showTextAsTooltip={this.showTextAsTooltip}\n required={this.required}\n controlRef={this.inputElementRef}\n >\n {this.renderInput()}\n </ix-field-wrapper>\n <ix-dropdown\n data-testid=\"date-dropdown\"\n trigger={this.inputElementRef.waitForCurrent()}\n ref={this.dropdownElementRef}\n closeBehavior=\"outside\"\n suppressOverflowBehavior={true}\n show={this.show}\n onShowChanged={(event) => {\n this.show = event.detail;\n }}\n >\n <ix-date-picker\n ref={this.datepickerRef}\n format={this.format}\n locale={this.locale}\n range={false}\n from={this.from ?? ''}\n onDateChange={(event) => {\n const { from } = event.detail;\n this.onInput(from);\n }}\n ></ix-date-picker>\n </ix-dropdown>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-97874de0.js';
2
2
 
3
- const dropdownItemCss = ":host{--ix-dropdown-item-checked-color:var(--theme-color-primary);display:flex;flex-direction:row;position:relative;height:2.5rem;width:auto;overflow:hidden;cursor:pointer}:host *,:host *::after,:host *::before{box-sizing:border-box}:host ::-webkit-scrollbar-button{display:none}@-moz-document url-prefix(){:host *{scrollbar-color:var(--theme-scrollbar-thumb--background) var(--theme-scrollbar-track--background);scrollbar-width:thin}}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host .dropdown-item{all:unset;display:flex;flex-direction:row;align-items:center;position:relative;height:calc(100% - 2px);width:calc(100% - 0.5rem - 1.5rem);padding:0 0.5rem;padding-right:1.5rem;border:0.0625rem solid transparent;white-space:nowrap}:host .dropdown-item.no-checked-field{width:calc(100% - 1rem - 1.5rem);padding:0 1rem;padding-right:1.5rem}:host .dropdown-item:focus-visible{border-color:var(--theme-color-focus-bdr)}:host .dropdown-item-checked{display:flex;align-items:center;justify-content:center;position:relative;height:100%;width:1rem;min-width:1rem;margin-right:0.5rem;color:var(--ix-dropdown-item-checked-color)}:host .dropdown-item-icon{margin-right:0.5rem;color:var(--theme-color-std-text)}:host .dropdown-item-text{display:block;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .dropdown-item:focus-visible{outline:1px solid yellow}:host .submenu-icon{margin-left:auto}:host(.icon-only) .dropdown-item-icon{margin-right:0px}:host(.icon-only) .dropdown-item-checked{display:none}:host(.icon-only) .dropdown-item{width:calc(100% - 0.5rem - 0.5rem);padding:0 0.5rem;padding-right:0.5rem}:host(.submenu) .dropdown-item{width:calc(100% - 0.5rem - 0.5rem);padding:0 0.5rem;padding-right:0.5rem}:host(:not(.disabled):not(:disabled).hover),:host(:not(.disabled):not(:disabled):hover){background-color:var(--theme-ghost--background--hover)}:host(:not(.disabled):not(:disabled).active),:host(:not(.disabled):not(:disabled):active){background-color:var(--theme-ghost--background--active)}:host(.disabled){pointer-events:none;color:var(--theme-color-weak-text) !important}:host(.disabled) .dropdown-item-icon{color:var(--theme-color-weak-text) !important}";
3
+ const dropdownItemCss = ":host{--ix-dropdown-item-checked-color:var(--theme-color-primary);display:flex;flex-direction:row;position:relative;height:2.5rem;width:auto;overflow:hidden;cursor:pointer}:host *,:host *::after,:host *::before{box-sizing:border-box}:host ::-webkit-scrollbar-button{display:none}@-moz-document url-prefix(){:host *{scrollbar-color:var(--theme-scrollbar-thumb--background) var(--theme-scrollbar-track--background);scrollbar-width:thin}}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host .dropdown-item{all:unset;display:flex;flex-direction:row;align-items:center;position:relative;height:calc(100% - 2px);width:calc(100% - 0.5rem - 1.5rem);padding:0 0.5rem;padding-right:1.5rem;border:0.0625rem solid transparent;white-space:nowrap}:host .dropdown-item.no-checked-field{width:calc(100% - 1rem - 1.5rem);padding:0 1rem;padding-right:1.5rem}:host .dropdown-item:focus-visible{border-color:var(--theme-color-focus-bdr)}:host .dropdown-item-checked{display:flex;align-items:center;justify-content:center;position:relative;height:100%;width:1rem;min-width:1rem;margin-right:0.5rem;color:var(--ix-dropdown-item-checked-color)}:host .dropdown-item-icon{margin-right:0.5rem;color:var(--theme-color-std-text)}:host .dropdown-item-text{display:block;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .submenu-icon{margin-left:auto}:host(.icon-only) .dropdown-item-icon{margin-right:0px}:host(.icon-only) .dropdown-item-checked{display:none}:host(.icon-only) .dropdown-item{width:calc(100% - 0.5rem - 0.5rem);padding:0 0.5rem;padding-right:0.5rem}:host(.submenu) .dropdown-item{width:calc(100% - 0.5rem - 0.5rem);padding:0 0.5rem;padding-right:0.5rem}:host(:not(.disabled):not(:disabled).hover),:host(:not(.disabled):not(:disabled):hover){background-color:var(--theme-ghost--background--hover)}:host(:not(.disabled):not(:disabled).active),:host(:not(.disabled):not(:disabled):active){background-color:var(--theme-ghost--background--active)}:host(.disabled){pointer-events:none;color:var(--theme-color-weak-text) !important}:host(.disabled) .dropdown-item-icon{color:var(--theme-color-weak-text) !important}";
4
4
  const IxDropdownItemStyle0 = dropdownItemCss;
5
5
 
6
6
  const DropdownItem = class {
@@ -1 +1 @@
1
- {"file":"ix-dropdown-item.entry.js","mappings":";;AAAA,MAAM,eAAe,GAAG,glFAAglF,CAAC;AACzmF,6BAAe,eAAe;;MCyBjB,YAAY;;;;;;qBAgBP,KAAK;wBAKF,KAAK;uBAKN,KAAK;yBAGH,KAAK;+BAGC,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,EACP;KACH;;;;;;;","names":[],"sources":["src/components/dropdown-item/dropdown-item.scss?tag=ix-dropdown-item&encapsulation=shadow","src/components/dropdown-item/dropdown-item.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 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\n@import 'mixins/shadow-dom/component';\n@import 'mixins/shadow-dom/hover';\n\n$itemPadding: 0.5rem;\n$itemPaddingRight: 1.5rem;\n$focusBorder: 0.0625rem;\n\n@mixin applyItemWidth($padding, $paddingRight) {\n width: calc(100% - #{$padding} - #{$paddingRight});\n\n padding: 0 $padding;\n padding-right: $paddingRight;\n}\n\n:host {\n --ix-dropdown-item-checked-color: var(--theme-color-primary);\n @include ix-component;\n display: flex;\n flex-direction: row;\n\n position: relative;\n height: 2.5rem;\n width: auto;\n overflow: hidden;\n cursor: pointer;\n\n .dropdown-item {\n all: unset;\n display: flex;\n flex-direction: row;\n align-items: center;\n position: relative;\n height: calc(100% - 2px);\n @include applyItemWidth($itemPadding, $itemPaddingRight);\n border: $focusBorder solid transparent;\n white-space: nowrap;\n }\n\n .dropdown-item.no-checked-field {\n @include applyItemWidth(1rem, $itemPaddingRight);\n }\n\n .dropdown-item:focus-visible {\n border-color: var(--theme-color-focus-bdr);\n }\n\n .dropdown-item-checked {\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n height: 100%;\n width: 1rem;\n min-width: 1rem;\n margin-right: 0.5rem;\n\n color: var(--ix-dropdown-item-checked-color);\n }\n\n .dropdown-item-icon {\n margin-right: 0.5rem;\n color: var(--theme-color-std-text);\n }\n\n .dropdown-item-text {\n display: block;\n position: relative;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .dropdown-item:focus-visible {\n outline: 1px solid yellow;\n }\n\n .submenu-icon {\n margin-left: auto;\n }\n}\n\n:host(.icon-only) {\n .dropdown-item-icon {\n margin-right: 0px;\n }\n\n .dropdown-item-checked {\n display: none;\n }\n\n .dropdown-item {\n @include applyItemWidth(0.5rem, 0.5rem);\n }\n}\n\n:host(.submenu) {\n .dropdown-item {\n @include applyItemWidth($itemPadding, 0.5rem);\n }\n}\n\n@include ghost-hover-pressed;\n\n:host(.disabled) {\n pointer-events: none;\n color: var(--theme-color-weak-text) !important;\n\n .dropdown-item-icon {\n color: var(--theme-color-weak-text) !important;\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2023 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 {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n} from '@stencil/core';\nimport { DropdownItemWrapper } from '../dropdown/dropdown-controller';\n\n@Component({\n tag: 'ix-dropdown-item',\n styleUrl: 'dropdown-item.scss',\n shadow: true,\n})\nexport class DropdownItem implements DropdownItemWrapper {\n @Element() hostElement!: HTMLIxDropdownItemElement;\n\n /**\n * Label of dropdown item\n */\n @Prop() label?: string;\n\n /**\n * Icon of dropdown item\n */\n @Prop() icon?: string;\n\n /**\n * Display hover state\n */\n @Prop() hover = false;\n\n /**\n * Disable item and remove event listeners\n */\n @Prop() disabled = false;\n\n /**\n * Whether the item is checked or not. If true a checkmark will mark the item as checked.\n */\n @Prop() checked = false;\n\n /** @internal */\n @Prop() isSubMenu = false;\n\n /** @internal */\n @Prop() suppressChecked = false;\n\n /** @internal */\n @Event() itemClick!: EventEmitter<HTMLIxDropdownItemElement>;\n\n /**\n * Internal usage only\n */\n @Method()\n async emitItemClick() {\n this.itemClick.emit(this.hostElement);\n }\n\n /** @internal */\n @Method()\n async getDropdownItemElement() {\n return this.hostElement;\n }\n\n private isIconOnly() {\n return (\n this.label === undefined &&\n this.hostElement.innerText === '' &&\n this.icon !== undefined\n );\n }\n\n render() {\n return (\n <Host\n class={{\n hover: this.hover,\n 'icon-only': this.isIconOnly(),\n disabled: this.disabled,\n submenu: this.isSubMenu,\n }}\n role=\"listitem\"\n >\n <button\n type=\"button\"\n tabIndex={0}\n class={{\n 'dropdown-item': true,\n 'no-checked-field': this.suppressChecked,\n }}\n onClick={() => this.emitItemClick()}\n >\n {!this.suppressChecked ? (\n <div class=\"dropdown-item-checked\">\n {this.checked ? (\n <ix-icon\n class=\"checkmark\"\n name={'single-check'}\n size=\"16\"\n ></ix-icon>\n ) : null}\n </div>\n ) : null}\n {this.icon ? (\n <ix-icon class=\"dropdown-item-icon\" name={this.icon}></ix-icon>\n ) : null}\n <div class=\"dropdown-item-text\">\n {this.label}\n <slot></slot>\n </div>\n {this.isSubMenu ? (\n <ix-icon\n name={'chevron-right-small'}\n class={'submenu-icon'}\n ></ix-icon>\n ) : null}\n </button>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ix-dropdown-item.entry.js","mappings":";;AAAA,MAAM,eAAe,GAAG,ohFAAohF,CAAC;AAC7iF,6BAAe,eAAe;;MCyBjB,YAAY;;;;;;qBAgBP,KAAK;wBAKF,KAAK;uBAKN,KAAK;yBAGH,KAAK;+BAGC,KAAK;;;;;IAS/B,MAAM,aAAa;QACjB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;KACvC;;IAID,MAAM,sBAAsB;QAC1B,OAAO,IAAI,CAAC,WAAW,CAAC;KACzB;IAEO,UAAU;QAChB,QACE,IAAI,CAAC,KAAK,KAAK,SAAS;YACxB,IAAI,CAAC,WAAW,CAAC,SAAS,KAAK,EAAE;YACjC,IAAI,CAAC,IAAI,KAAK,SAAS,EACvB;KACH;IAED,MAAM;QACJ,QACE,EAAC,IAAI,qDACH,KAAK,EAAE;gBACL,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,WAAW,EAAE,IAAI,CAAC,UAAU,EAAE;gBAC9B,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,OAAO,EAAE,IAAI,CAAC,SAAS;aACxB,EACD,IAAI,EAAC,UAAU,IAEf,+DACE,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,EACX,KAAK,EAAE;gBACL,eAAe,EAAE,IAAI;gBACrB,kBAAkB,EAAE,IAAI,CAAC,eAAe;aACzC,EACD,OAAO,EAAE,MAAM,IAAI,CAAC,aAAa,EAAE,IAElC,CAAC,IAAI,CAAC,eAAe,IACpB,WAAK,KAAK,EAAC,uBAAuB,IAC/B,IAAI,CAAC,OAAO,IACX,eACE,KAAK,EAAC,WAAW,EACjB,IAAI,EAAE,cAAc,EACpB,IAAI,EAAC,IAAI,GACA,IACT,IAAI,CACJ,IACJ,IAAI,EACP,IAAI,CAAC,IAAI,IACR,eAAS,KAAK,EAAC,oBAAoB,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,GAAY,IAC7D,IAAI,EACR,4DAAK,KAAK,EAAC,oBAAoB,IAC5B,IAAI,CAAC,KAAK,EACX,8DAAa,CACT,EACL,IAAI,CAAC,SAAS,IACb,eACE,IAAI,EAAE,qBAAqB,EAC3B,KAAK,EAAE,cAAc,GACZ,IACT,IAAI,CACD,CACJ,EACP;KACH;;;;;;;","names":[],"sources":["src/components/dropdown-item/dropdown-item.scss?tag=ix-dropdown-item&encapsulation=shadow","src/components/dropdown-item/dropdown-item.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 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\n@import 'mixins/shadow-dom/component';\n@import 'mixins/shadow-dom/hover';\n\n$itemPadding: 0.5rem;\n$itemPaddingRight: 1.5rem;\n$focusBorder: 0.0625rem;\n\n@mixin applyItemWidth($padding, $paddingRight) {\n width: calc(100% - #{$padding} - #{$paddingRight});\n\n padding: 0 $padding;\n padding-right: $paddingRight;\n}\n\n:host {\n --ix-dropdown-item-checked-color: var(--theme-color-primary);\n @include ix-component;\n display: flex;\n flex-direction: row;\n\n position: relative;\n height: 2.5rem;\n width: auto;\n overflow: hidden;\n cursor: pointer;\n\n .dropdown-item {\n all: unset;\n display: flex;\n flex-direction: row;\n align-items: center;\n position: relative;\n height: calc(100% - 2px);\n @include applyItemWidth($itemPadding, $itemPaddingRight);\n border: $focusBorder solid transparent;\n white-space: nowrap;\n }\n\n .dropdown-item.no-checked-field {\n @include applyItemWidth(1rem, $itemPaddingRight);\n }\n\n .dropdown-item:focus-visible {\n border-color: var(--theme-color-focus-bdr);\n }\n\n .dropdown-item-checked {\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n height: 100%;\n width: 1rem;\n min-width: 1rem;\n margin-right: 0.5rem;\n\n color: var(--ix-dropdown-item-checked-color);\n }\n\n .dropdown-item-icon {\n margin-right: 0.5rem;\n color: var(--theme-color-std-text);\n }\n\n .dropdown-item-text {\n display: block;\n position: relative;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .submenu-icon {\n margin-left: auto;\n }\n}\n\n:host(.icon-only) {\n .dropdown-item-icon {\n margin-right: 0px;\n }\n\n .dropdown-item-checked {\n display: none;\n }\n\n .dropdown-item {\n @include applyItemWidth(0.5rem, 0.5rem);\n }\n}\n\n:host(.submenu) {\n .dropdown-item {\n @include applyItemWidth($itemPadding, 0.5rem);\n }\n}\n\n@include ghost-hover-pressed;\n\n:host(.disabled) {\n pointer-events: none;\n color: var(--theme-color-weak-text) !important;\n\n .dropdown-item-icon {\n color: var(--theme-color-weak-text) !important;\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2023 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 {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n} from '@stencil/core';\nimport { DropdownItemWrapper } from '../dropdown/dropdown-controller';\n\n@Component({\n tag: 'ix-dropdown-item',\n styleUrl: 'dropdown-item.scss',\n shadow: true,\n})\nexport class DropdownItem implements DropdownItemWrapper {\n @Element() hostElement!: HTMLIxDropdownItemElement;\n\n /**\n * Label of dropdown item\n */\n @Prop() label?: string;\n\n /**\n * Icon of dropdown item\n */\n @Prop() icon?: string;\n\n /**\n * Display hover state\n */\n @Prop() hover = false;\n\n /**\n * Disable item and remove event listeners\n */\n @Prop() disabled = false;\n\n /**\n * Whether the item is checked or not. If true a checkmark will mark the item as checked.\n */\n @Prop() checked = false;\n\n /** @internal */\n @Prop() isSubMenu = false;\n\n /** @internal */\n @Prop() suppressChecked = false;\n\n /** @internal */\n @Event() itemClick!: EventEmitter<HTMLIxDropdownItemElement>;\n\n /**\n * Internal usage only\n */\n @Method()\n async emitItemClick() {\n this.itemClick.emit(this.hostElement);\n }\n\n /** @internal */\n @Method()\n async getDropdownItemElement() {\n return this.hostElement;\n }\n\n private isIconOnly() {\n return (\n this.label === undefined &&\n this.hostElement.innerText === '' &&\n this.icon !== undefined\n );\n }\n\n render() {\n return (\n <Host\n class={{\n hover: this.hover,\n 'icon-only': this.isIconOnly(),\n disabled: this.disabled,\n submenu: this.isSubMenu,\n }}\n role=\"listitem\"\n >\n <button\n type=\"button\"\n tabIndex={0}\n class={{\n 'dropdown-item': true,\n 'no-checked-field': this.suppressChecked,\n }}\n onClick={() => this.emitItemClick()}\n >\n {!this.suppressChecked ? (\n <div class=\"dropdown-item-checked\">\n {this.checked ? (\n <ix-icon\n class=\"checkmark\"\n name={'single-check'}\n size=\"16\"\n ></ix-icon>\n ) : null}\n </div>\n ) : null}\n {this.icon ? (\n <ix-icon class=\"dropdown-item-icon\" name={this.icon}></ix-icon>\n ) : null}\n <div class=\"dropdown-item-text\">\n {this.label}\n <slot></slot>\n </div>\n {this.isSubMenu ? (\n <ix-icon\n name={'chevron-right-small'}\n class={'submenu-icon'}\n ></ix-icon>\n ) : null}\n </button>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -2,11 +2,11 @@ import { r as registerInstance, h, H as Host, g as getElement } from './index-97
2
2
  import { b as a11yHostAttributes } from './a11y-b10c12e0.js';
3
3
  import { m as makeRef } from './make-ref-4b76e9b5.js';
4
4
  import { c as createClassMutationObserver } from './validation-45aa490c.js';
5
- import { h as hasAnyText, r as renderHelperText } from './helper-text-util-10896253.js';
5
+ import { h as hasAnyText, r as renderHelperText } from './helper-text-util-e47b864d.js';
6
6
  import { c as computePosition, s as shift, o as offset, b as arrow, f as flip, h as hide, a as autoUpdate } from './floating-ui.dom.esm-d4ad786a.js';
7
7
  import { O as OnListener } from './listener-18b29507.js';
8
8
  import { r as resolveSelector } from './find-element-af8265f7.js';
9
- import './index-ad2af369.js';
9
+ import './index-2b76ea55.js';
10
10
 
11
11
  function isIxInputFieldComponent(obj) {
12
12
  return (obj &&
@@ -125,7 +125,7 @@ const FormFieldLabel = class {
125
125
  }
126
126
  }
127
127
  render() {
128
- return (h(Host, { key: '3a62067a0af7847c578459a35bcbd56c54f59bf1', onClick: () => this.focusOnClick() }, h("label", Object.assign({ key: '05aea8c0c5783f8cffb9d3968f1621564203c2ac', htmlFor: this.htmlFor }, this.a11yAttributes, { ref: this.labelRef }), h("ix-typography", { key: '6285d1624065c691d9beb3a1c4c31268e0a6bde9', color: this.isInvalid ? 'alarm' : 'soft', format: "label" }, h("slot", { key: 'cc8185cb40bf055c6f2e29ee09265acc10719657' }), this.required && h("span", { key: 'b8c6191b6a0fd1314afd21d555268417292b1201' }, "\u00A0*")))));
128
+ return (h(Host, { key: 'bef5f15183b60646f3092ef0c9d8ca1172a4d149', onClick: () => this.focusOnClick() }, h("label", Object.assign({ key: '1203a82e14cca571098ce7dacd2ce71d7bd674fd', htmlFor: this.htmlFor }, this.a11yAttributes, { ref: this.labelRef }), h("ix-typography", { key: '9e6b76080bc45ca0f46667e4c6610002f64ae884', color: this.isInvalid ? 'alarm' : 'soft', format: "label" }, h("slot", { key: 'a80749a45eb26b4655b9b0c13855980d2ef35323' }), this.required && h("span", { key: '54f33771b6cace5a63dd82b9813f8fbb6425536e' }, "\u00A0*")))));
129
129
  }
130
130
  get hostElement() { return getElement(this); }
131
131
  static get watchers() { return {
@@ -169,9 +169,9 @@ const FieldWrapper = class {
169
169
  infoText: this.infoText,
170
170
  helperText: this.helperText,
171
171
  };
172
- return (h(Host, { key: '3a1885ca13c1de17fdbb33eb6cde695cbdb3469e' }, this.label && (h("div", { key: '9e8c0a96fe7014feb6ac76473137183ba92e2ad1', class: "field-top" }, h("ix-field-label", { key: '923dec87ac02cf550400aba0bf929b95d8a271ed', required: this.required, htmlFor: this.htmlForLabel, controlRef: this.controlRef, isInvalid: this.isInvalid }, this.label))), h("div", { key: 'a6694ebd1d18d2411565960ff5f1e6ee900491e8', class: {
172
+ return (h(Host, { key: 'cca8bb819e4c2e02176ef9edc0d2456b3b3cbb5c' }, this.label && (h("div", { key: '3e9aa899b1e7257cabfd9e9c36823598d798c2b2', class: "field-top" }, h("ix-field-label", { key: '425ee0329aa0f27abebe81995f4843cd734c1a6a', required: this.required, htmlFor: this.htmlForLabel, controlRef: this.controlRef, isInvalid: this.isInvalid }, this.label))), h("div", { key: '3fe4cedebd10b2c3fb9abf47223049e12a666010', class: {
173
173
  'slot-wrapper': true,
174
- }, ref: this.slotRef }, h("slot", { key: '302fcd87bd9cba38a3057b9a6542dbaed9d16bbc' })), h("div", { key: '8f5c9836963e0df796388b8dac20db7289ea067e', class: 'field-bottom' }, !this.showTextAsTooltip && renderHelperText(textOptions), h("div", { key: '620bf3f6730971ee840744fce7b8a7de2d2f12a9', class: "bottom-right" }, h("slot", { key: '7cff3c8d8f550a88e4bccacf6b71547edb89b0a7', name: "bottom-right" }))), this.showTextAsTooltip === true && hasAnyText(textOptions) && (h("ix-tooltip", { key: '9041af539fd29c6fd2e8e3e4a00daa8e2c15ed22', for: this.slotRef.waitForCurrent(), showDelay: 500, placement: "bottom" }, renderHelperText(textOptions)))));
174
+ }, ref: this.slotRef }, h("slot", { key: '206122b8896175febbb37f4c3c54a8e3555a46d5' })), h("div", { key: 'f238391284d847e62e76eb78e1f85863f60092a5', class: 'field-bottom' }, !this.showTextAsTooltip && renderHelperText(textOptions), h("div", { key: '55d56938344a710759252156997d528486b67e14', class: "bottom-right" }, h("slot", { key: 'bbc9255ddc0e95a6896a8d5ff0cd5f7146c434bf', name: "bottom-right" }))), this.showTextAsTooltip === true && hasAnyText(textOptions) && (h("ix-tooltip", { key: 'e50287d266f19646efe1b56a56ef9a5b11bd7fed', for: this.slotRef.waitForCurrent(), showDelay: 500, placement: "bottom" }, renderHelperText(textOptions)))));
175
175
  }
176
176
  get hostElement() { return getElement(this); }
177
177
  };
@@ -454,9 +454,9 @@ const Tooltip = class {
454
454
  this.visible = false;
455
455
  }
456
456
  render() {
457
- return (h(Host, { key: '1f46e4d330357c6f1d8770cfb407d31cc244aa64', class: {
457
+ return (h(Host, { key: 'ebbc608804dfd761125e956c9309d3c7e9a6d12c', class: {
458
458
  visible: this.visible,
459
- }, role: "tooltip" }, h("div", { key: '7a7896373a839c25a39fe41331223732ed40959d', class: "tooltip-container" }, h("div", { key: 'adb027026f5a668d2dbce4bceacdc1f66b7b7995', class: 'tooltip-title' }, h("slot", { key: '183340b03555b6e170f76c38e952ffa2bcad300f', name: "title-icon" }), h("ix-typography", { key: '14f5f8452aeda63a3acba3b577d2ffc81241200f', format: "h5" }, this.titleContent, h("slot", { key: '613335f4965c9e151f82a2e6b1d3f3635702dc1f', name: "title-content" }))), h("div", { key: 'c36f41b65c2e21b160bc7eee8dbee0c132d7d803', class: 'tooltip-content' }, h("slot", { key: 'f17ab01352090365d03a89d2e1c6a56823c74a5c' })), h("div", { key: '617f5fb5598ebd172591170e5400cab0e1d3f0a3', class: "arrow" }))));
459
+ }, role: "tooltip" }, h("div", { key: '4a028e58597259058d5da914b89daaa464b024b3', class: "tooltip-container" }, h("div", { key: 'a89fb49efcea7926b8eb1dcea67aa2f082f6d7e1', class: 'tooltip-title' }, h("slot", { key: '2c18717f991c7f4387cb42c406cc64a1e7648807', name: "title-icon" }), h("ix-typography", { key: 'eecf6414ae15538c2b66ace8540c8974e044872a', format: "h5" }, this.titleContent, h("slot", { key: '1fd60eaa5087211e30643f35a178353bbe988951', name: "title-content" }))), h("div", { key: '58b1fa21258323a98b2626b4f620be85dcb92183', class: 'tooltip-content' }, h("slot", { key: 'dda6df03fcc825588bed72d729f76b4cf2af36eb' })), h("div", { key: '8a7cb430d02aed565c2c80e417f332be4f33ef08', class: "arrow" }))));
460
460
  }
461
461
  get hostElement() { return getElement(this); }
462
462
  };