@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
@@ -1 +0,0 @@
1
- {"file":"input.util-715860e3.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,QAAQ,EAAE,CAAC,WAAW;YACpB,MAAM,MAAM,GAAG,WAAW,CAAC,MAA0B,CAAC;YACtD,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;SACjC,EACD,OAAO,EAAE,CAAC,UAAU;YAClB,MAAM,MAAM,GAAG,UAAU,CAAC,MAA0B,CAAC;YACrD,KAAK,CAAC,uBAAuB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;SAC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AAC,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 onChange={(changeEvent) => {\n const target = changeEvent.target as HTMLInputElement;\n props.valueChange(target.value);\n }}\n onInput={(inputEvent) => {\n const target = inputEvent.target as HTMLInputElement;\n props.updateFormInternalValue(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 onChange={(changeEvent) => {\n const target = changeEvent.target as HTMLInputElement;\n props.valueChange(target.value);\n }}\n onInput={(inputEvent) => {\n const target = inputEvent.target as HTMLInputElement;\n props.updateFormInternalValue(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 +0,0 @@
1
- {"file":"modal-101eef04.js","mappings":";;AAAA;;;;;;;;AAkBA,MAAM,wBAAwB;IAC5B,MAAM,UAAU,CACd,IAAS,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AAC,gBAAgB,CACxB,eAAe,EACf,OAAO,EAAE,MAAM,EAAe;QAC5B,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvB,MAAM,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;KACtC,CACF,CAAC;IAEF,OAAO;QACL,WAAW,EAAE,SAAS;QACtB,OAAO;QACP,SAAS;KACV,CAAC;AACJ;;;;","names":["setA11yAttributes"],"sources":["src/components/utils/delegate.ts","src/components/utils/modal/message.ts","src/components/utils/modal/modal.ts"],"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\nexport type DelegateConfig = {\n parentElement?: Element;\n};\n\nexport interface FrameworkDelegate {\n attachView<R = HTMLElement>(view: any, config?: DelegateConfig): Promise<R>;\n removeView(view: any): Promise<void>;\n}\n\nclass DefaultFrameworkDelegate implements FrameworkDelegate {\n async attachView<R = HTMLElement>(\n view: any,\n config?: DelegateConfig\n ): Promise<R> {\n const attachToElement = config?.parentElement ?? document.body;\n attachToElement.appendChild(view);\n return view;\n }\n\n async removeView(view: any) {\n view.remove();\n }\n}\n\nconst coreDelegate = new DefaultFrameworkDelegate();\nlet currentDelegate: FrameworkDelegate = coreDelegate;\n\nexport function registerFrameworkDelegate(delegate: FrameworkDelegate) {\n currentDelegate = delegate;\n}\n\nexport const resolveDelegate = () => {\n return currentDelegate;\n};\n\nexport const getCoreDelegate = () => coreDelegate;\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 { getCoreDelegate } from '../delegate';\nimport { TypedEvent } from '../typed-event';\nimport { ModalConfig } from './modal';\n\nexport type MessageConfig<T> = Omit<\n ModalConfig<T, unknown>,\n 'content' | 'title'\n> &\n MessageContent;\n\nfunction setA11yAttributes(element: HTMLElement, config: MessageContent) {\n const ariaDescribedby = config.ariaDescribedby;\n const ariaLabelledby = config.ariaLabelledby;\n\n delete config['ariaDescribedby'];\n delete config['ariaLabelledby'];\n\n if (ariaDescribedby) {\n element.setAttribute('aria-describedby', ariaDescribedby);\n }\n\n if (ariaLabelledby) {\n element.setAttribute('aria-labelledby', ariaLabelledby);\n }\n}\n\nfunction createConfirmButtons(\n textOkay: string,\n textCancel?: string,\n payloadOkay?: any,\n payloadCancel?: any\n) {\n let actions: MessageAction[] = [];\n\n if (textCancel !== undefined) {\n actions = [\n ...actions,\n {\n id: 'cancel',\n text: textCancel,\n type: 'cancel',\n payload: payloadCancel,\n } as MessageAction,\n ];\n }\n return [\n ...actions,\n {\n id: 'okay',\n text: textOkay,\n type: 'okay',\n payload: payloadOkay,\n } as MessageAction,\n ];\n}\n\nexport type MessageAction = {\n id: string;\n type: 'button-primary' | 'button-secondary' | 'okay' | 'cancel';\n text: string;\n payload?: any;\n};\n\nexport type MessageContent = {\n icon: string;\n iconColor?: string;\n messageTitle: string;\n message: string;\n actions: MessageAction[];\n ariaLabelledby?: string;\n ariaDescribedby?: string;\n};\n\nexport async function showMessage<T>(config: MessageConfig<T>) {\n const onMessageAction = new TypedEvent<{\n actionId: string;\n payload: T;\n }>();\n const dialog = document.createElement('ix-modal');\n const header = document.createElement('ix-modal-header');\n const content = document.createElement('ix-modal-content');\n const footer = document.createElement('ix-modal-footer');\n\n setA11yAttributes(dialog, config);\n\n Object.assign(header, config);\n Object.assign(content, config);\n Object.assign(footer, config);\n\n header.innerText = config.messageTitle;\n content.innerText = config.message;\n\n config.actions.forEach(({ id, text, type, payload }) => {\n const button = document.createElement('ix-button');\n button.innerText = text;\n footer.appendChild(button);\n\n if (type === 'okay') {\n button.variant = 'primary';\n button.addEventListener('click', () =>\n dialog.closeModal({\n actionId: id,\n payload,\n })\n );\n return;\n } else if (type === 'cancel') {\n button.variant = 'primary';\n button.outline = true;\n button.addEventListener('click', () =>\n dialog.dismissModal({\n actionId: id,\n payload,\n })\n );\n return;\n }\n });\n\n dialog.appendChild(header);\n dialog.appendChild(content);\n dialog.appendChild(footer);\n\n const dialogRef =\n await getCoreDelegate().attachView<HTMLIxModalElement>(dialog);\n\n dialogRef.addEventListener(\n 'dialogClose',\n (\n event: CustomEvent<{\n actionId: string;\n payload: T;\n }>\n ) => {\n onMessageAction.emit(event.detail);\n dialogRef.remove();\n }\n );\n\n dialogRef.addEventListener(\n 'dialogDismiss',\n (\n event: CustomEvent<{\n actionId: string;\n payload: T;\n }>\n ) => {\n onMessageAction.emit(event.detail);\n dialogRef.remove();\n }\n );\n\n setA11yAttributes(dialogRef, config);\n Object.assign(dialogRef, config);\n\n dialogRef.showModal();\n return onMessageAction;\n}\n\nshowMessage.info = (\n title: string,\n message: string,\n textOkay: string,\n textCancel?: string,\n payloadOkay?: any,\n payloadCancel?: any\n) => {\n return showMessage({\n message,\n messageTitle: title,\n icon: 'info',\n actions: createConfirmButtons(\n textOkay,\n textCancel,\n payloadOkay,\n payloadCancel\n ),\n });\n};\n\nshowMessage.warning = (\n title: string,\n message: string,\n textOkay: string,\n textCancel?: string,\n payloadOkay?: any,\n payloadCancel?: any\n) => {\n return showMessage({\n message,\n messageTitle: title,\n icon: 'warning',\n iconColor: 'color-warning',\n actions: createConfirmButtons(\n textOkay,\n textCancel,\n payloadOkay,\n payloadCancel\n ),\n });\n};\n\nshowMessage.error = (\n title: string,\n message: string,\n textOkay: string,\n textCancel?: string,\n payloadOkay?: any,\n payloadCancel?: any\n) => {\n return showMessage({\n message,\n messageTitle: title,\n icon: 'error',\n iconColor: 'color-alarm',\n actions: createConfirmButtons(\n textOkay,\n textCancel,\n payloadOkay,\n payloadCancel\n ),\n });\n};\n\nshowMessage.success = (\n title: string,\n message: string,\n textOkay: string,\n textCancel?: string,\n payloadOkay?: any,\n payloadCancel?: any\n) => {\n return showMessage({\n message,\n messageTitle: title,\n icon: 'success',\n iconColor: 'color-success',\n actions: createConfirmButtons(\n textOkay,\n textCancel,\n payloadOkay,\n payloadCancel\n ),\n });\n};\n\nshowMessage.question = (\n title: string,\n message: string,\n textOkay: string,\n textCancel?: string,\n payloadOkay?: any,\n payloadCancel?: any\n) => {\n return showMessage({\n message,\n messageTitle: title,\n icon: 'question',\n actions: createConfirmButtons(\n textOkay,\n textCancel,\n payloadOkay,\n payloadCancel\n ),\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 { IxModalSize } from '../../modal/modal';\nimport { getCoreDelegate, resolveDelegate } from '../delegate';\nimport { TypedEvent } from '../typed-event';\n\nexport function setA11yAttributes(element: HTMLElement, config: ModalConfig) {\n const ariaDescribedby = config.ariaDescribedby;\n const ariaLabelledby = config.ariaLabelledby;\n\n delete config['ariaDescribedby'];\n delete config['ariaLabelledby'];\n\n if (ariaDescribedby) {\n element.setAttribute('aria-describedby', ariaDescribedby);\n }\n\n if (ariaLabelledby) {\n element.setAttribute('aria-labelledby', ariaLabelledby);\n }\n}\n\nexport interface ModalConfig<TReason = any, CONTENT = any> {\n animation?: boolean;\n ariaDescribedby?: string;\n ariaLabelledby?: string;\n backdrop?: boolean;\n closeOnBackdropClick?: boolean;\n beforeDismiss?: (reason?: TReason) => boolean | Promise<boolean>;\n centered?: boolean;\n container?: string | HTMLElement;\n content: CONTENT | string;\n keyboard?: boolean;\n size?: IxModalSize;\n title?: string;\n}\n\nexport interface ModalInstance<TReason = any> {\n htmlElement: HTMLIxModalElement;\n onClose: TypedEvent<TReason>;\n onDismiss: TypedEvent<TReason>;\n}\n\nfunction getIxModal(element: Element) {\n return element.closest('ix-modal');\n}\n\nexport function closeModal<TClose = any>(\n element: Element,\n closeResult: TClose\n) {\n const dialog = getIxModal(element);\n if (dialog) {\n dialog.closeModal(closeResult);\n return;\n }\n}\n\nexport function dismissModal(element: Element, dismissResult?: any) {\n const dialog = getIxModal(element);\n if (dialog) {\n dialog.dismissModal(dismissResult);\n return;\n }\n}\n\nexport async function showModal<T>(\n config: ModalConfig<T>\n): Promise<ModalInstance<T>> {\n const delegate = resolveDelegate();\n let dialogRef: HTMLIxModalElement;\n const onClose = new TypedEvent<T>();\n const onDismiss = new TypedEvent<T>();\n\n if (typeof config.content === 'string') {\n const dialog = document.createElement('ix-modal');\n dialog.innerText = config.content;\n dialogRef = await getCoreDelegate().attachView(dialog);\n }\n\n if (\n config.content instanceof HTMLElement &&\n config.content.tagName !== 'IX-MODAL'\n ) {\n const dialog = document.createElement('ix-modal');\n dialog.appendChild(config.content);\n dialogRef = await getCoreDelegate().attachView(dialog);\n }\n if (!dialogRef) {\n dialogRef = await delegate.attachView<HTMLIxModalElement>(config.content);\n }\n\n setA11yAttributes(dialogRef, config);\n Object.assign(dialogRef, config);\n\n await dialogRef.showModal();\n dialogRef.addEventListener('dialogClose', async ({ detail }: CustomEvent) => {\n onClose.emit(detail);\n await delegate.removeView(dialogRef);\n });\n\n dialogRef.addEventListener(\n 'dialogDismiss',\n async ({ detail }: CustomEvent) => {\n onDismiss.emit(detail);\n await delegate.removeView(dialogRef);\n }\n );\n\n return {\n htmlElement: dialogRef,\n onClose,\n onDismiss,\n };\n}\n"],"version":3}
@@ -1,2 +0,0 @@
1
- import{r as e,c as t,h as o,H as r}from"./p-5806df2b.js";const s=":host{display:flex;align-items:center;height:32px;width:100%;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 .tree-node-container{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;align-items:center;height:2rem;flex-grow:1;align-items:center}:host .tree-node-container .tree-node-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .icon-toggle-container{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;min-width:2rem}:host .icon-toggle-container ix-icon{transition:transform var(--theme-default-time) ease-in-out}:host .icon-toggle-container ix-icon.icon-toggle-down{transform:rotate(90deg)}:host(:not(.disabled):not(:disabled):not(.selected).hover),:host(:not(.disabled):not(:disabled):not(.selected):hover){background-color:var(--theme-tree-item--background--hover)}:host(:not(.disabled):not(:disabled):not(.selected).active),:host(:not(.disabled):not(:disabled):not(.selected):active){background-color:var(--theme-tree-item--background--active)}:host(.selected){background-color:var(--theme-tree-item--background--selected)}:host(.selected.hover),:host(.selected:hover){background-color:var(--theme-tree-item--background--selected-hover)}:host(.selected.active),:host(.selected:active){background-color:var(--theme-tree-item--background--selected-active)}";const c=s;const i=class{constructor(o){e(this,o);this.toggle=t(this,"toggle",7);this.itemClick=t(this,"itemClick",7);this.text=undefined;this.hasChildren=false;this.context=undefined}render(){var e,t,s;return o(r,{key:"0e92eced558f94df77f6ce6ac359395ecd3b1623",class:{selected:!!((e=this.context)===null||e===void 0?void 0:e.isSelected)}},o("div",{key:"51c671e62ef92b7dc7080194fd566d58261e7481",class:"icon-toggle-container",onClick:e=>{e.preventDefault();this.toggle.emit()}},this.hasChildren?o("ix-icon",{name:"chevron-right",size:"16",class:{["icon-toggle-down"]:!!((t=this.context)===null||t===void 0?void 0:t.isExpanded)},color:`color-${((s=this.context)===null||s===void 0?void 0:s.isExpanded)?"primary":"std-text"}`}):null),o("div",{key:"da22cba786a63d23dcb56cb393438b6aacbbf185",class:"tree-node-container",onClick:()=>{this.itemClick.emit()}},o("div",{key:"02989a25709e9d964b6ac4ddbb073b0b92347bd5",class:"tree-node-text"},this.text),o("slot",{key:"d9acb398b2008935e305ef145cfca52f888e2334"})))}};i.style=c;export{i as ix_tree_item};
2
- //# sourceMappingURL=p-0f0e7e14.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["treeItemCss","IxTreeItemStyle0","TreeItem","render","h","Host","key","class","selected","_a","this","context","isSelected","onClick","e","preventDefault","toggle","emit","hasChildren","name","size","_b","isExpanded","color","_c","itemClick","text"],"sources":["src/components/tree-item/tree-item.scss?tag=ix-tree-item&encapsulation=shadow","src/components/tree-item/tree-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 'common-variables';\n@import 'mixins/text-truncation';\n@import 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n\n display: flex;\n align-items: center;\n\n height: 32px;\n width: 100%;\n\n cursor: pointer;\n\n .tree-node-container {\n @include ellipsis;\n display: flex;\n align-items: center;\n height: $x-large-space;\n flex-grow: 1;\n align-items: center;\n\n .tree-node-text {\n @include ellipsis;\n }\n }\n\n .icon-toggle-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n min-width: 2rem;\n\n ix-icon {\n transition: transform var(--theme-default-time) ease-in-out;\n\n &.icon-toggle-down {\n transform: rotate(90deg);\n }\n }\n }\n}\n\n:host(:not(.disabled):not(:disabled):not(.selected).hover),\n:host(:not(.disabled):not(:disabled):not(.selected):hover) {\n background-color: var(--theme-tree-item--background--hover);\n}\n\n:host(:not(.disabled):not(:disabled):not(.selected).active),\n:host(:not(.disabled):not(:disabled):not(.selected):active) {\n background-color: var(--theme-tree-item--background--active);\n}\n\n:host(.selected) {\n background-color: var(--theme-tree-item--background--selected);\n}\n\n:host(.selected.hover),\n:host(.selected:hover) {\n background-color: var(--theme-tree-item--background--selected-hover);\n}\n\n:host(.selected.active),\n:host(.selected:active) {\n background-color: var(--theme-tree-item--background--selected-active);\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 { Component, Event, EventEmitter, h, Host, Prop } from '@stencil/core';\nimport { TreeItemContext } from '../tree/tree-model';\n\n@Component({\n tag: 'ix-tree-item',\n styleUrl: 'tree-item.scss',\n shadow: true,\n})\nexport class TreeItem {\n /**\n * Text\n */\n @Prop() text?: string;\n\n /**\n * Has tree item children\n */\n @Prop() hasChildren = false;\n\n /**\n * Context\n */\n @Prop() context?: TreeItemContext;\n\n /**\n * Expand/Collapsed toggled\n */\n @Event() toggle!: EventEmitter<void>;\n\n /**\n * Click on item not on the expand/collapse icon\n */\n @Event() itemClick!: EventEmitter<void>;\n\n render() {\n return (\n <Host\n class={{\n selected: !!this.context?.isSelected,\n }}\n >\n <div\n class=\"icon-toggle-container\"\n onClick={(e) => {\n e.preventDefault();\n this.toggle.emit();\n }}\n >\n {this.hasChildren ? (\n <ix-icon\n name={'chevron-right'}\n size=\"16\"\n class={{\n ['icon-toggle-down']: !!this.context?.isExpanded,\n }}\n color={`color-${\n this.context?.isExpanded ? 'primary' : 'std-text'\n }`}\n />\n ) : null}\n </div>\n <div\n class=\"tree-node-container\"\n onClick={() => {\n this.itemClick.emit();\n }}\n >\n <div class=\"tree-node-text\">{this.text}</div>\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"yDAAA,MAAMA,EAAc,+gEACpB,MAAAC,EAAeD,E,MCgBFE,EAAQ,M,kIASG,M,uBAiBtB,MAAAC,G,UACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CACHC,MAAO,CACLC,aAAYC,EAAAC,KAAKC,WAAO,MAAAF,SAAA,SAAAA,EAAEG,cAG5BR,EAAA,OAAAE,IAAA,2CACEC,MAAM,wBACNM,QAAUC,IACRA,EAAEC,iBACFL,KAAKM,OAAOC,MAAM,GAGnBP,KAAKQ,YACJd,EAAA,WACEe,KAAM,gBACNC,KAAK,KACLb,MAAO,CACL,CAAC,wBAAuBc,EAAAX,KAAKC,WAAO,MAAAU,SAAA,SAAAA,EAAEC,aAExCC,MAAO,WACLC,EAAAd,KAAKC,WAAO,MAAAa,SAAA,SAAAA,EAAEF,YAAa,UAAY,eAGzC,MAENlB,EAAA,OAAAE,IAAA,2CACEC,MAAM,sBACNM,QAAS,KACPH,KAAKe,UAAUR,MAAM,GAGvBb,EAAA,OAAAE,IAAA,2CAAKC,MAAM,kBAAkBG,KAAKgB,MAClCtB,EAAA,QAAAE,IAAA,8C"}
@@ -1,2 +0,0 @@
1
- import{T as e}from"./p-c4749812.js";class t{async attachView(e,t){var o;const n=(o=t===null||t===void 0?void 0:t.parentElement)!==null&&o!==void 0?o:document.body;n.appendChild(e);return e}async removeView(e){e.remove()}}const o=new t;let n=o;function a(e){n=e}const i=()=>n;const c=()=>o;function s(e,t){const o=t.ariaDescribedby;const n=t.ariaLabelledby;delete t["ariaDescribedby"];delete t["ariaLabelledby"];if(o){e.setAttribute("aria-describedby",o)}if(n){e.setAttribute("aria-labelledby",n)}}function l(e,t,o,n){let a=[];if(t!==undefined){a=[...a,{id:"cancel",text:t,type:"cancel",payload:n}]}return[...a,{id:"okay",text:e,type:"okay",payload:o}]}async function r(t){const o=new e;const n=document.createElement("ix-modal");const a=document.createElement("ix-modal-header");const i=document.createElement("ix-modal-content");const l=document.createElement("ix-modal-footer");s(n,t);Object.assign(a,t);Object.assign(i,t);Object.assign(l,t);a.innerText=t.messageTitle;i.innerText=t.message;t.actions.forEach((({id:e,text:t,type:o,payload:a})=>{const i=document.createElement("ix-button");i.innerText=t;l.appendChild(i);if(o==="okay"){i.variant="primary";i.addEventListener("click",(()=>n.closeModal({actionId:e,payload:a})));return}else if(o==="cancel"){i.variant="primary";i.outline=true;i.addEventListener("click",(()=>n.dismissModal({actionId:e,payload:a})));return}}));n.appendChild(a);n.appendChild(i);n.appendChild(l);const r=await c().attachView(n);r.addEventListener("dialogClose",(e=>{o.emit(e.detail);r.remove()}));r.addEventListener("dialogDismiss",(e=>{o.emit(e.detail);r.remove()}));s(r,t);Object.assign(r,t);r.showModal();return o}r.info=(e,t,o,n,a,i)=>r({message:t,messageTitle:e,icon:"info",actions:l(o,n,a,i)});r.warning=(e,t,o,n,a,i)=>r({message:t,messageTitle:e,icon:"warning",iconColor:"color-warning",actions:l(o,n,a,i)});r.error=(e,t,o,n,a,i)=>r({message:t,messageTitle:e,icon:"error",iconColor:"color-alarm",actions:l(o,n,a,i)});r.success=(e,t,o,n,a,i)=>r({message:t,messageTitle:e,icon:"success",iconColor:"color-success",actions:l(o,n,a,i)});r.question=(e,t,o,n,a,i)=>r({message:t,messageTitle:e,icon:"question",actions:l(o,n,a,i)});function d(e,t){const o=t.ariaDescribedby;const n=t.ariaLabelledby;delete t["ariaDescribedby"];delete t["ariaLabelledby"];if(o){e.setAttribute("aria-describedby",o)}if(n){e.setAttribute("aria-labelledby",n)}}function m(e){return e.closest("ix-modal")}function u(e,t){const o=m(e);if(o){o.closeModal(t);return}}function f(e,t){const o=m(e);if(o){o.dismissModal(t);return}}async function y(t){const o=i();let n;const a=new e;const s=new e;if(typeof t.content==="string"){const e=document.createElement("ix-modal");e.innerText=t.content;n=await c().attachView(e)}if(t.content instanceof HTMLElement&&t.content.tagName!=="IX-MODAL"){const e=document.createElement("ix-modal");e.appendChild(t.content);n=await c().attachView(e)}if(!n){n=await o.attachView(t.content)}d(n,t);Object.assign(n,t);await n.showModal();n.addEventListener("dialogClose",(async({detail:e})=>{a.emit(e);await o.removeView(n)}));n.addEventListener("dialogDismiss",(async({detail:e})=>{s.emit(e);await o.removeView(n)}));return{htmlElement:n,onClose:a,onDismiss:s}}export{i as a,y as b,u as c,f as d,c as g,a as r,r as s};
2
- //# sourceMappingURL=p-23a4b81f.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["DefaultFrameworkDelegate","attachView","view","config","attachToElement","_a","parentElement","document","body","appendChild","removeView","remove","coreDelegate","currentDelegate","registerFrameworkDelegate","delegate","resolveDelegate","getCoreDelegate","setA11yAttributes","element","ariaDescribedby","ariaLabelledby","setAttribute","createConfirmButtons","textOkay","textCancel","payloadOkay","payloadCancel","actions","undefined","id","text","type","payload","async","showMessage","onMessageAction","TypedEvent","dialog","createElement","header","content","footer","Object","assign","innerText","messageTitle","message","forEach","button","variant","addEventListener","closeModal","actionId","outline","dismissModal","dialogRef","event","emit","detail","showModal","info","title","icon","warning","iconColor","error","success","question","getIxModal","closest","closeResult","dismissResult","onClose","onDismiss","HTMLElement","tagName","htmlElement"],"sources":["src/components/utils/delegate.ts","src/components/utils/modal/message.ts","src/components/utils/modal/modal.ts"],"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\nexport type DelegateConfig = {\n parentElement?: Element;\n};\n\nexport interface FrameworkDelegate {\n attachView<R = HTMLElement>(view: any, config?: DelegateConfig): Promise<R>;\n removeView(view: any): Promise<void>;\n}\n\nclass DefaultFrameworkDelegate implements FrameworkDelegate {\n async attachView<R = HTMLElement>(\n view: any,\n config?: DelegateConfig\n ): Promise<R> {\n const attachToElement = config?.parentElement ?? document.body;\n attachToElement.appendChild(view);\n return view;\n }\n\n async removeView(view: any) {\n view.remove();\n }\n}\n\nconst coreDelegate = new DefaultFrameworkDelegate();\nlet currentDelegate: FrameworkDelegate = coreDelegate;\n\nexport function registerFrameworkDelegate(delegate: FrameworkDelegate) {\n currentDelegate = delegate;\n}\n\nexport const resolveDelegate = () => {\n return currentDelegate;\n};\n\nexport const getCoreDelegate = () => coreDelegate;\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 { getCoreDelegate } from '../delegate';\nimport { TypedEvent } from '../typed-event';\nimport { ModalConfig } from './modal';\n\nexport type MessageConfig<T> = Omit<\n ModalConfig<T, unknown>,\n 'content' | 'title'\n> &\n MessageContent;\n\nfunction setA11yAttributes(element: HTMLElement, config: MessageContent) {\n const ariaDescribedby = config.ariaDescribedby;\n const ariaLabelledby = config.ariaLabelledby;\n\n delete config['ariaDescribedby'];\n delete config['ariaLabelledby'];\n\n if (ariaDescribedby) {\n element.setAttribute('aria-describedby', ariaDescribedby);\n }\n\n if (ariaLabelledby) {\n element.setAttribute('aria-labelledby', ariaLabelledby);\n }\n}\n\nfunction createConfirmButtons(\n textOkay: string,\n textCancel?: string,\n payloadOkay?: any,\n payloadCancel?: any\n) {\n let actions: MessageAction[] = [];\n\n if (textCancel !== undefined) {\n actions = [\n ...actions,\n {\n id: 'cancel',\n text: textCancel,\n type: 'cancel',\n payload: payloadCancel,\n } as MessageAction,\n ];\n }\n return [\n ...actions,\n {\n id: 'okay',\n text: textOkay,\n type: 'okay',\n payload: payloadOkay,\n } as MessageAction,\n ];\n}\n\nexport type MessageAction = {\n id: string;\n type: 'button-primary' | 'button-secondary' | 'okay' | 'cancel';\n text: string;\n payload?: any;\n};\n\nexport type MessageContent = {\n icon: string;\n iconColor?: string;\n messageTitle: string;\n message: string;\n actions: MessageAction[];\n ariaLabelledby?: string;\n ariaDescribedby?: string;\n};\n\nexport async function showMessage<T>(config: MessageConfig<T>) {\n const onMessageAction = new TypedEvent<{\n actionId: string;\n payload: T;\n }>();\n const dialog = document.createElement('ix-modal');\n const header = document.createElement('ix-modal-header');\n const content = document.createElement('ix-modal-content');\n const footer = document.createElement('ix-modal-footer');\n\n setA11yAttributes(dialog, config);\n\n Object.assign(header, config);\n Object.assign(content, config);\n Object.assign(footer, config);\n\n header.innerText = config.messageTitle;\n content.innerText = config.message;\n\n config.actions.forEach(({ id, text, type, payload }) => {\n const button = document.createElement('ix-button');\n button.innerText = text;\n footer.appendChild(button);\n\n if (type === 'okay') {\n button.variant = 'primary';\n button.addEventListener('click', () =>\n dialog.closeModal({\n actionId: id,\n payload,\n })\n );\n return;\n } else if (type === 'cancel') {\n button.variant = 'primary';\n button.outline = true;\n button.addEventListener('click', () =>\n dialog.dismissModal({\n actionId: id,\n payload,\n })\n );\n return;\n }\n });\n\n dialog.appendChild(header);\n dialog.appendChild(content);\n dialog.appendChild(footer);\n\n const dialogRef =\n await getCoreDelegate().attachView<HTMLIxModalElement>(dialog);\n\n dialogRef.addEventListener(\n 'dialogClose',\n (\n event: CustomEvent<{\n actionId: string;\n payload: T;\n }>\n ) => {\n onMessageAction.emit(event.detail);\n dialogRef.remove();\n }\n );\n\n dialogRef.addEventListener(\n 'dialogDismiss',\n (\n event: CustomEvent<{\n actionId: string;\n payload: T;\n }>\n ) => {\n onMessageAction.emit(event.detail);\n dialogRef.remove();\n }\n );\n\n setA11yAttributes(dialogRef, config);\n Object.assign(dialogRef, config);\n\n dialogRef.showModal();\n return onMessageAction;\n}\n\nshowMessage.info = (\n title: string,\n message: string,\n textOkay: string,\n textCancel?: string,\n payloadOkay?: any,\n payloadCancel?: any\n) => {\n return showMessage({\n message,\n messageTitle: title,\n icon: 'info',\n actions: createConfirmButtons(\n textOkay,\n textCancel,\n payloadOkay,\n payloadCancel\n ),\n });\n};\n\nshowMessage.warning = (\n title: string,\n message: string,\n textOkay: string,\n textCancel?: string,\n payloadOkay?: any,\n payloadCancel?: any\n) => {\n return showMessage({\n message,\n messageTitle: title,\n icon: 'warning',\n iconColor: 'color-warning',\n actions: createConfirmButtons(\n textOkay,\n textCancel,\n payloadOkay,\n payloadCancel\n ),\n });\n};\n\nshowMessage.error = (\n title: string,\n message: string,\n textOkay: string,\n textCancel?: string,\n payloadOkay?: any,\n payloadCancel?: any\n) => {\n return showMessage({\n message,\n messageTitle: title,\n icon: 'error',\n iconColor: 'color-alarm',\n actions: createConfirmButtons(\n textOkay,\n textCancel,\n payloadOkay,\n payloadCancel\n ),\n });\n};\n\nshowMessage.success = (\n title: string,\n message: string,\n textOkay: string,\n textCancel?: string,\n payloadOkay?: any,\n payloadCancel?: any\n) => {\n return showMessage({\n message,\n messageTitle: title,\n icon: 'success',\n iconColor: 'color-success',\n actions: createConfirmButtons(\n textOkay,\n textCancel,\n payloadOkay,\n payloadCancel\n ),\n });\n};\n\nshowMessage.question = (\n title: string,\n message: string,\n textOkay: string,\n textCancel?: string,\n payloadOkay?: any,\n payloadCancel?: any\n) => {\n return showMessage({\n message,\n messageTitle: title,\n icon: 'question',\n actions: createConfirmButtons(\n textOkay,\n textCancel,\n payloadOkay,\n payloadCancel\n ),\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 { IxModalSize } from '../../modal/modal';\nimport { getCoreDelegate, resolveDelegate } from '../delegate';\nimport { TypedEvent } from '../typed-event';\n\nexport function setA11yAttributes(element: HTMLElement, config: ModalConfig) {\n const ariaDescribedby = config.ariaDescribedby;\n const ariaLabelledby = config.ariaLabelledby;\n\n delete config['ariaDescribedby'];\n delete config['ariaLabelledby'];\n\n if (ariaDescribedby) {\n element.setAttribute('aria-describedby', ariaDescribedby);\n }\n\n if (ariaLabelledby) {\n element.setAttribute('aria-labelledby', ariaLabelledby);\n }\n}\n\nexport interface ModalConfig<TReason = any, CONTENT = any> {\n animation?: boolean;\n ariaDescribedby?: string;\n ariaLabelledby?: string;\n backdrop?: boolean;\n closeOnBackdropClick?: boolean;\n beforeDismiss?: (reason?: TReason) => boolean | Promise<boolean>;\n centered?: boolean;\n container?: string | HTMLElement;\n content: CONTENT | string;\n keyboard?: boolean;\n size?: IxModalSize;\n title?: string;\n}\n\nexport interface ModalInstance<TReason = any> {\n htmlElement: HTMLIxModalElement;\n onClose: TypedEvent<TReason>;\n onDismiss: TypedEvent<TReason>;\n}\n\nfunction getIxModal(element: Element) {\n return element.closest('ix-modal');\n}\n\nexport function closeModal<TClose = any>(\n element: Element,\n closeResult: TClose\n) {\n const dialog = getIxModal(element);\n if (dialog) {\n dialog.closeModal(closeResult);\n return;\n }\n}\n\nexport function dismissModal(element: Element, dismissResult?: any) {\n const dialog = getIxModal(element);\n if (dialog) {\n dialog.dismissModal(dismissResult);\n return;\n }\n}\n\nexport async function showModal<T>(\n config: ModalConfig<T>\n): Promise<ModalInstance<T>> {\n const delegate = resolveDelegate();\n let dialogRef: HTMLIxModalElement;\n const onClose = new TypedEvent<T>();\n const onDismiss = new TypedEvent<T>();\n\n if (typeof config.content === 'string') {\n const dialog = document.createElement('ix-modal');\n dialog.innerText = config.content;\n dialogRef = await getCoreDelegate().attachView(dialog);\n }\n\n if (\n config.content instanceof HTMLElement &&\n config.content.tagName !== 'IX-MODAL'\n ) {\n const dialog = document.createElement('ix-modal');\n dialog.appendChild(config.content);\n dialogRef = await getCoreDelegate().attachView(dialog);\n }\n if (!dialogRef) {\n dialogRef = await delegate.attachView<HTMLIxModalElement>(config.content);\n }\n\n setA11yAttributes(dialogRef, config);\n Object.assign(dialogRef, config);\n\n await dialogRef.showModal();\n dialogRef.addEventListener('dialogClose', async ({ detail }: CustomEvent) => {\n onClose.emit(detail);\n await delegate.removeView(dialogRef);\n });\n\n dialogRef.addEventListener(\n 'dialogDismiss',\n async ({ detail }: CustomEvent) => {\n onDismiss.emit(detail);\n await delegate.removeView(dialogRef);\n }\n );\n\n return {\n htmlElement: dialogRef,\n onClose,\n onDismiss,\n };\n}\n"],"mappings":"oCAkBA,MAAMA,EACJ,gBAAMC,CACJC,EACAC,G,MAEA,MAAMC,GAAkBC,EAAAF,IAAM,MAANA,SAAM,SAANA,EAAQG,iBAAa,MAAAD,SAAA,EAAAA,EAAIE,SAASC,KAC1DJ,EAAgBK,YAAYP,GAC5B,OAAOA,C,CAGT,gBAAMQ,CAAWR,GACfA,EAAKS,Q,EAIT,MAAMC,EAAe,IAAIZ,EACzB,IAAIa,EAAqCD,E,SAEz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AAKC,SACP5C,EAASL,WAAW8C,EAAU,IAGtCA,EAAUL,iBACR,iBACAjB,OAASyB,aACPe,EAAUhB,KAAKC,SACT5C,EAASL,WAAW8C,EAAU,IAIxC,MAAO,CACLqB,YAAarB,EACbiB,UACAC,YAEJ,Q"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["isIxInputFieldComponent","obj","getAssociatedFormElement","getNativeInputElement","fieldLabelCss","IxFieldLabelStyle0","FormFieldLabel","this","htmlForObserver","MutationObserver","checkForInternalState","a11yAttributes","labelRef","makeRef","connectedCallback","registerHtmlForObserver","registerControlRefObserver","disconnectedCallback","disconnect","htmlForClassObserver","destroy","controlRefClassObserver","componentWillRender","componentWillLoad","a11yHostAttributes","hostElement","window","htmlFor","observe","document","childList","subtree","controlRef","input","waitForCurrent","createClassMutationObserver","checkForInvalidState","registerHtmlForClassObserver","forElement","elementToCheck","isInvalid","classList","contains","getElementById","required","focusOnClick","target","focus","render","h","Host","key","onClick","Object","assign","ref","color","format","fieldWrapperCss","IxFieldWrapperStyle0","FieldWrapper","slotRef","textOptions","invalidText","isValid","validText","isWarning","warningText","isInfo","infoText","helperText","label","class","htmlForLabel","showTextAsTooltip","renderHelperText","name","hasAnyText","for","showDelay","placement","OverlayController","constructor","overlays","Set","connected","instance","add","disconnected","delete","present","willPresent","dismissOthers","dismiss","willDismiss","forEach","overlay","TooltipController","tooltipController","tooltipCss","IxTooltipStyle0","numberToPixel","value","Tooltip","arrowElement","shadowRoot","querySelector","destroyAutoUpdate","disposeAutoUpdate","undefined","showTooltip","anchorElement","clearTimeout","hideTooltipTimeout","applyTooltipPosition","showTooltipTimeout","setTimeout","hideTooltip","hideDelay","interactive","computeArrowPosition","middlewareData","x","y","arrow","resetPosition","top","right","bottom","left","startsWith","computeTooltipPosition","computePosition","strategy","middleware","shift","offset","element","flip","fallbackStrategy","fallbackAxisSideDirection","padding","hide","applyTooltipArrowPosition","computeResponse","arrowPosition","style","Promise","resolve","autoUpdate","async","isHidden","_a","referenceHidden","ancestorResize","ancestorScroll","elementResize","animationFrame","clearHideTimeout","queryAnchorElements","resolveSelector","HTMLElement","registerTriggerListener","triggerElementList","disposeListener","onMouseEnter","onMouseLeave","onFocusIn","onFocusOut","addEventListener","removeEventListener","registerTooltipListener","onKeydown","event","code","componentDidLoad","observer","body","attributes","attributeFilter","isPresent","visible","role","titleContent","__decorate","OnListener","self"],"sources":["src/components/utils/input/index.ts","src/components/field-label/field-label.scss?tag=ix-field-label&encapsulation=shadow","src/components/field-label/field-label.tsx","src/components/field-wrapper/field-wrapper.scss?tag=ix-field-wrapper&encapsulation=shadow","src/components/field-wrapper/field-wrapper.tsx","src/components/utils/overlay.ts","src/components/tooltip/tooltip-controller.ts","src/components/tooltip/tooltip.scss?tag=ix-tooltip&encapsulation=shadow","src/components/tooltip/tooltip.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 */\nimport { EventEmitter } from '@stencil/core';\nimport { IxComponent } from '../internal';\n\nexport * from './validation';\n\nexport interface FieldWrapperInterface {\n /**\n * Label for the field component\n */\n label?: string;\n /**\n * Show text below the field component which show additional information\n */\n helperText?: string;\n /**\n * Info text for the field component\n */\n infoText?: string;\n /**\n * Warning text for the field component\n */\n warningText?: string;\n /**\n * Error text for the field component\n */\n invalidText?: string;\n /**\n * Valid text for the field component\n */\n validText?: string;\n /**\n * Show helper, info, warning, error and valid text as tooltip\n */\n showTextAsTooltip?: boolean;\n}\n\nexport type HTMLIxFormComponentElement<T> = HTMLElement & IxFormComponent<T>;\nexport type HTMLIxInputFieldComponentElement<T> =\n HTMLIxFormComponentElement<T> & IxInputFieldComponent<T>;\n\nexport interface IxFormValidationState {\n // Annotate as @State()\n isInvalid: boolean;\n // Annotate as @State()\n isValid: boolean;\n // Annotate as @State()\n isInfo: boolean;\n // Annotate as @State()\n isWarning: boolean;\n}\n\nexport interface IxFormComponent<T = string> extends IxComponent {\n // Private internal\n formInternals: ElementInternals;\n\n // Annotate as @Prop({ reflect: true })\n required?: boolean;\n // Annotate as @Prop({ reflect: true })\n name?: string;\n // Annotate as @Prop()\n value?: T;\n // Annotate as @Prop()\n disabled: boolean;\n\n valueChange: EventEmitter<T>;\n updateFormInternalValue(value: T): void;\n hasValidValue(): Promise<boolean>;\n getValidityState?(): Promise<ValidityState>;\n getAssociatedFormElement(): Promise<HTMLFormElement | null>;\n}\n\nexport interface IxInputFieldComponent<T = string>\n extends IxFormComponent<T>,\n IxFormValidationState,\n FieldWrapperInterface {\n // Annotate as @Prop()\n placeholder?: string;\n // Annotate as @Prop()\n readonly: boolean;\n\n ixBlur: EventEmitter<void>;\n\n // Annotate as @Method()\n getNativeInputElement(): Promise<HTMLInputElement | HTMLTextAreaElement>;\n\n // Annotate as @Method()\n focusInput(): void;\n}\n\nexport function isIxInputFieldComponent(\n obj: HTMLElement\n): obj is HTMLIxInputFieldComponentElement<unknown> {\n return (\n obj &&\n 'getAssociatedFormElement' in obj &&\n typeof obj.getAssociatedFormElement === 'function' &&\n 'getNativeInputElement' in obj &&\n typeof obj.getNativeInputElement === 'function'\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\n:host {\n display: inline-block;\n position: relative;\n\n margin-top: 0.5rem;\n margin-bottom: 0.25rem;\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 { Component, Host, Prop, h, Element, Watch } from '@stencil/core';\nimport { IxComponent } from '../utils/internal';\nimport {\n ClassMutationObserver,\n createClassMutationObserver,\n HTMLIxFormComponentElement,\n isIxInputFieldComponent,\n} from '../utils/input';\nimport { A11yAttributes, a11yHostAttributes } from '../utils/a11y';\nimport { MakeRef, makeRef } from '../utils/make-ref';\n\n@Component({\n tag: 'ix-field-label',\n styleUrl: 'field-label.scss',\n shadow: true,\n})\nexport class FormFieldLabel implements IxComponent {\n @Element() hostElement!: HTMLIxFieldLabelElement;\n\n /**\n * A value is required or must be checked for the form to be submittable\n */\n @Prop({ reflect: true, mutable: true }) required?: boolean;\n\n /**\n * The id of the form element that the label is associated with\n */\n @Prop({ reflect: true }) htmlFor?: string;\n\n /** @internal */\n @Prop() controlRef?: MakeRef<HTMLElement>;\n\n /** @internal */\n @Prop({ mutable: true }) isInvalid: boolean = false;\n\n private readonly htmlForObserver = new MutationObserver(() =>\n this.checkForInternalState()\n );\n private htmlForClassObserver?: ClassMutationObserver;\n private controlRefClassObserver?: ClassMutationObserver;\n private a11yAttributes: A11yAttributes = {};\n private readonly labelRef = makeRef<HTMLLabelElement>();\n\n connectedCallback() {\n this.registerHtmlForObserver();\n this.registerControlRefObserver();\n }\n\n disconnectedCallback(): void {\n if (this.htmlForObserver) {\n this.htmlForObserver.disconnect();\n }\n if (this.htmlForClassObserver) {\n this.htmlForClassObserver.destroy();\n }\n if (this.controlRefClassObserver) {\n this.controlRefClassObserver.destroy();\n }\n }\n\n componentWillRender() {\n this.checkForInternalState();\n }\n\n componentWillLoad(): void | Promise<void> {\n this.a11yAttributes = a11yHostAttributes(this.hostElement);\n }\n\n @Watch('htmlFor')\n private registerHtmlForObserver() {\n if (typeof window === 'undefined') {\n return;\n }\n\n if (this.htmlForObserver) {\n this.htmlForObserver.disconnect();\n }\n\n if (this.htmlFor) {\n this.htmlForObserver.observe(window.document, {\n childList: true,\n subtree: true,\n });\n }\n }\n\n @Watch('controlRef')\n private async registerControlRefObserver() {\n if (typeof window === 'undefined') {\n return;\n }\n\n if (this.controlRefClassObserver) {\n this.controlRefClassObserver.destroy();\n }\n\n if (this.controlRef) {\n const input = await this.controlRef.waitForCurrent();\n\n this.controlRefClassObserver = createClassMutationObserver(input, () =>\n this.checkForInvalidState(input)\n );\n }\n }\n\n private registerHtmlForClassObserver(\n forElement: HTMLIxFormComponentElement<unknown>\n ) {\n if (this.htmlForClassObserver) {\n this.htmlForClassObserver.destroy();\n }\n\n this.htmlForClassObserver = createClassMutationObserver(forElement, () =>\n this.checkForInvalidState(forElement)\n );\n }\n\n private checkForInvalidState(elementToCheck: HTMLElement) {\n this.isInvalid =\n elementToCheck.classList.contains('is-invalid') ||\n elementToCheck.classList.contains('ix-invalid');\n }\n\n private async checkForInternalState() {\n if (this.htmlFor) {\n const forElement = document.getElementById(\n this.htmlFor\n ) as HTMLIxFormComponentElement<unknown>;\n if (forElement) {\n if (typeof forElement.required === 'boolean') {\n this.required = forElement.required;\n }\n\n this.registerHtmlForClassObserver(forElement);\n this.checkForInvalidState(forElement);\n }\n }\n\n if (this.controlRef) {\n const input = await this.controlRef.waitForCurrent();\n this.required = (\n input as HTMLInputElement | HTMLTextAreaElement\n ).required;\n }\n }\n\n private async focusOnClick() {\n if (this.htmlFor) {\n const target = document.getElementById(this.htmlFor);\n if (target) {\n let input: HTMLElement | null = null;\n if (isIxInputFieldComponent(target)) {\n input = await target.getNativeInputElement();\n } else {\n input = target;\n }\n if (typeof input.focus === 'function') {\n input.focus();\n }\n }\n }\n\n if (this.controlRef) {\n (await this.controlRef.waitForCurrent()).focus();\n }\n }\n\n render() {\n return (\n <Host onClick={() => this.focusOnClick()}>\n <label\n htmlFor={this.htmlFor}\n {...this.a11yAttributes}\n ref={this.labelRef}\n >\n <ix-typography\n color={this.isInvalid ? 'alarm' : 'soft'}\n format=\"label\"\n >\n <slot></slot>\n {this.required && <span>&nbsp;*</span>}\n </ix-typography>\n </label>\n </Host>\n );\n }\n}\n","@import \"./field-wrapper.mixins.scss\";\n\n:host {\n display: flex;\n position: relative;\n flex-direction: column;\n\n .slot-wrapper {\n display: flex;\n position: relative;\n align-items: center;\n justify-content: flex-start;\n gap: 0.25rem;\n }\n\n .field-bottom,\n .field-top {\n display: flex;\n flex-direction: row;\n position: relative;\n justify-content: space-between;\n gap: 1rem;\n width: min-content;\n min-width: 100%;\n }\n\n .field-bottom .bottom-right {\n margin-left: auto;\n margin-right: 0px;\n }\n\n @include helper-text;\n\n .bottom-text {\n margin-top: 0.25rem;\n margin-bottom: 0.25rem;\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 { Component, Element, Host, Prop, h } from '@stencil/core';\nimport { FieldWrapperInterface } from '../utils/input';\nimport { MakeRef, makeRef } from '../utils/make-ref';\nimport { hasAnyText, renderHelperText } from './helper-text-util';\n\n/** @internal */\n@Component({\n tag: 'ix-field-wrapper',\n styleUrl: 'field-wrapper.scss',\n shadow: true,\n})\nexport class FieldWrapper implements FieldWrapperInterface {\n @Element() hostElement!: HTMLIxFieldWrapperElement;\n\n /**\n * Show text below the field component\n */\n @Prop() helperText?: string;\n\n /**\n * Label for the field component\n */\n @Prop() label?: string;\n\n /**\n * Error text for the field component\n */\n @Prop() invalidText?: string;\n\n /**\n * Valid text for the field component\n */\n @Prop() validText?: string;\n\n /**\n * Info text for the field component\n */\n @Prop() infoText?: string;\n\n /**\n * Warning text for the field component\n */\n @Prop() warningText?: string;\n\n /**\n * Is the field component invalid\n */\n @Prop() isInvalid: boolean = false;\n\n /**\n * Is the field component valid\n */\n @Prop() isValid: boolean = false;\n\n /**\n * Is the field component info\n */\n @Prop() isInfo: boolean = false;\n\n /**\n * Is the field component warning\n */\n @Prop() isWarning: boolean = false;\n\n /**\n * Show helper, error, info, warning text as tooltip\n */\n @Prop() showTextAsTooltip: boolean = false;\n\n /**\n * Show label as required\n */\n @Prop() required: boolean = false;\n\n /**\n * The id of the form element that the label is associated with\n */\n @Prop() htmlForLabel?: string;\n\n /**\n * The control element that the label is associated with\n */\n @Prop() controlRef?: MakeRef<HTMLElement>;\n\n private readonly slotRef = makeRef<HTMLDivElement>();\n\n render() {\n const textOptions = {\n invalidText: this.invalidText,\n isInvalid: this.isInvalid,\n isValid: this.isValid,\n validText: this.validText,\n isWarning: this.isWarning,\n warningText: this.warningText,\n isInfo: this.isInfo,\n infoText: this.infoText,\n helperText: this.helperText,\n };\n return (\n <Host>\n {this.label && (\n <div class=\"field-top\">\n <ix-field-label\n required={this.required}\n htmlFor={this.htmlForLabel}\n controlRef={this.controlRef}\n isInvalid={this.isInvalid}\n >\n {this.label}\n </ix-field-label>\n </div>\n )}\n <div\n class={{\n 'slot-wrapper': true,\n }}\n ref={this.slotRef}\n >\n <slot></slot>\n </div>\n <div class={'field-bottom'}>\n {!this.showTextAsTooltip && renderHelperText(textOptions)}\n <div class=\"bottom-right\">\n <slot name=\"bottom-right\"></slot>\n </div>\n </div>\n\n {this.showTextAsTooltip === true && hasAnyText(textOptions) && (\n <ix-tooltip\n for={this.slotRef.waitForCurrent()}\n showDelay={500}\n placement=\"bottom\"\n >\n {renderHelperText(textOptions)}\n </ix-tooltip>\n )}\n </Host>\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 */\nimport { IxComponent } from '../utils/internal';\n\nexport interface IxOverlayComponent extends IxComponent {\n isPresent(): boolean;\n\n willPresent?(): boolean;\n willDismiss?(): boolean;\n\n present(): void;\n dismiss(): void;\n}\n\nexport class OverlayController {\n overlays: Set<IxOverlayComponent> = new Set();\n\n connected(instance: IxOverlayComponent): void {\n this.overlays.add(instance);\n }\n\n disconnected(instance: IxOverlayComponent): void {\n this.overlays.delete(instance);\n }\n\n present(instance: IxOverlayComponent): void {\n if (instance.willPresent && !instance.willPresent()) {\n return;\n }\n this.dismissOthers(instance);\n instance.present();\n }\n\n dismiss(instance: IxOverlayComponent): void {\n if (instance.willDismiss && !instance.willDismiss()) {\n return;\n }\n instance.dismiss();\n }\n\n private dismissOthers(instance: IxOverlayComponent): void {\n this.overlays.forEach((overlay) => {\n if (overlay !== instance) {\n this.dismiss(overlay);\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 { OverlayController } from '../utils/overlay';\n\nclass TooltipController extends OverlayController {}\n\nexport const tooltipController = new TooltipController();\n",":host {\n display: inline-block;\n position: fixed;\n left: 0;\n top: 0;\n z-index: var(--theme-z-index-tooltip);\n\n max-width: 18.25rem;\n width: max-content;\n\n opacity: 0;\n visibility: collapse !important;\n overflow-wrap: break-word;\n\n border-radius: 0.25rem;\n\n .tooltip-title {\n display: flex;\n align-items: center;\n\n ::slotted(ix-icon) {\n margin-right: 0.35rem;\n }\n }\n\n .tooltip-container {\n display: block;\n position: relative;\n width: auto;\n height: 100%;\n background: var(--theme-tootlip--background);\n color: var(--theme-color-std-text);\n padding: 0.375rem 0.75rem 0.375rem 0.875rem;\n\n box-shadow: var(--theme-shadow-4);\n border-radius: inherit;\n }\n}\n\n:host(.visible) {\n opacity: 1;\n visibility: visible !important;\n}\n\n:host(.visible) {\n .arrow,\n .arrow::before {\n position: absolute;\n width: 12px;\n height: 12px;\n background: inherit;\n }\n\n .arrow {\n visibility: hidden;\n }\n\n .arrow::before {\n visibility: visible;\n content: '';\n transform: rotate(45deg);\n background-color: var(--theme-tootlip--background);\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 */\nimport {\n arrow,\n autoUpdate,\n computePosition,\n ComputePositionReturn,\n flip,\n hide,\n offset,\n shift,\n} from '@floating-ui/dom';\nimport {\n Component,\n Element,\n h,\n Host,\n Method,\n Prop,\n State,\n} from '@stencil/core';\nimport { OnListener } from '../utils/listener';\nimport { tooltipController } from './tooltip-controller';\nimport { IxOverlayComponent } from '../utils/overlay';\nimport { resolveSelector } from '../utils/find-element';\nimport { ElementReference } from 'src/components';\n\ntype ArrowPosition = {\n top?: string;\n left?: string;\n right?: string;\n};\n\nconst numberToPixel = (value?: number | null) =>\n value != null ? `${value}px` : '';\n\n/**\n * @slot title-icon - Icon of tooltip title\n * @slot title-content - Content of tooltip title\n *\n * @since 1.4.0\n */\n@Component({\n tag: 'ix-tooltip',\n styleUrl: 'tooltip.scss',\n shadow: true,\n})\nexport class Tooltip implements IxOverlayComponent {\n /**\n * CSS selector for hover trigger element e.g. `for=\"[data-my-custom-select]\"`\n */\n @Prop() for?: ElementReference;\n\n /**\n * Title of the tooltip\n */\n @Prop() titleContent?: string;\n\n /**\n * Define if the user can access the tooltip via mouse.\n */\n @Prop() interactive = false;\n\n /**\n * Initial placement of the tooltip.\n * If the selected placement doesn't have enough space, the tooltip will be repositioned to another location.\n * @since 1.5.0\n */\n @Prop() placement: 'top' | 'right' | 'bottom' | 'left' = 'top';\n\n /** @internal */\n @Prop() showDelay = 0;\n\n /** @internal */\n @Prop() hideDelay = 50;\n\n /** @internal */\n @Prop() animationFrame = false;\n\n @State() visible = false;\n\n @Element() hostElement!: HTMLIxTooltipElement;\n\n private observer?: MutationObserver;\n private hideTooltipTimeout?: NodeJS.Timeout;\n private showTooltipTimeout?: NodeJS.Timeout;\n private disposeAutoUpdate?: () => void;\n private disposeListener?: () => void;\n\n private get arrowElement(): HTMLElement {\n return this.hostElement.shadowRoot!.querySelector('.arrow')!;\n }\n\n private destroyAutoUpdate() {\n if (this.disposeAutoUpdate !== undefined) {\n this.disposeAutoUpdate();\n }\n }\n\n /** @internal */\n @Method()\n async showTooltip(anchorElement: Element) {\n clearTimeout(this.hideTooltipTimeout);\n await this.applyTooltipPosition(anchorElement);\n\n this.showTooltipTimeout = setTimeout(() => {\n tooltipController.present(this);\n // Need to compute and apply tooltip position after initial render,\n // because arrow has no valid bounding rect before that\n this.applyTooltipPosition(anchorElement);\n }, this.showDelay);\n }\n\n /** @internal */\n @Method()\n async hideTooltip() {\n clearTimeout(this.showTooltipTimeout);\n let hideDelay = 50;\n\n if (this.interactive && this.hideDelay === hideDelay) {\n hideDelay = 150;\n }\n\n this.hideTooltipTimeout = setTimeout(() => {\n tooltipController.dismiss(this);\n }, hideDelay);\n this.destroyAutoUpdate();\n }\n\n private computeArrowPosition({\n placement,\n middlewareData,\n }: ComputePositionReturn): ArrowPosition | undefined {\n let { x, y } = middlewareData.arrow!;\n const resetPosition = {\n top: 'unset',\n right: 'unset',\n bottom: 'unset',\n left: 'unset',\n };\n\n if (placement.startsWith('top')) {\n return {\n ...resetPosition,\n left: numberToPixel(x),\n top: numberToPixel(y),\n };\n }\n\n if (placement.startsWith('right')) {\n return {\n ...resetPosition,\n left: numberToPixel(-6),\n top: numberToPixel(y),\n };\n }\n\n if (placement.startsWith('bottom')) {\n return {\n ...resetPosition,\n left: numberToPixel(x),\n top: numberToPixel(-6),\n };\n }\n\n if (placement.startsWith('left')) {\n return {\n ...resetPosition,\n right: numberToPixel(-6),\n top: numberToPixel(y),\n };\n }\n }\n\n private async computeTooltipPosition(target: Element) {\n return computePosition(target, this.hostElement, {\n strategy: 'fixed',\n placement: this.placement,\n middleware: [\n shift(),\n offset(12),\n arrow({\n element: this.arrowElement,\n }),\n flip({\n fallbackStrategy: 'initialPlacement',\n fallbackAxisSideDirection: 'end',\n padding: 10,\n }),\n hide(),\n ],\n });\n }\n\n private applyTooltipArrowPosition(computeResponse: ComputePositionReturn) {\n const arrowPosition = this.computeArrowPosition(computeResponse);\n Object.assign(this.arrowElement.style, arrowPosition);\n }\n\n private async applyTooltipPosition(target: Element) {\n if (!target) {\n return;\n }\n\n return new Promise<ComputePositionReturn>((resolve) => {\n this.destroyAutoUpdate();\n this.disposeAutoUpdate = autoUpdate(\n target,\n this.hostElement,\n async () => {\n setTimeout(async () => {\n const computeResponse = await this.computeTooltipPosition(target);\n\n const isHidden =\n computeResponse.middlewareData.hide?.referenceHidden;\n\n if (isHidden) {\n setTimeout(() => this.hideTooltip());\n resolve(computeResponse);\n }\n\n if (computeResponse.middlewareData.arrow) {\n this.applyTooltipArrowPosition(computeResponse);\n }\n\n const { x, y } = computeResponse;\n Object.assign(this.hostElement.style, {\n left: x !== null ? `${x}px` : '',\n top: y !== null ? `${y}px` : '',\n });\n\n resolve(computeResponse);\n });\n },\n {\n ancestorResize: true,\n ancestorScroll: true,\n elementResize: true,\n animationFrame: this.animationFrame,\n }\n );\n });\n }\n\n private clearHideTimeout() {\n if (this.interactive) {\n clearTimeout(this.hideTooltipTimeout);\n }\n }\n\n private async queryAnchorElements(): Promise<Array<HTMLElement> | undefined> {\n if (typeof this.for === 'string') {\n return resolveSelector(this.for, this.hostElement);\n }\n\n if (this.for instanceof HTMLElement) {\n return Promise.resolve([this.for]);\n }\n\n if (this.for instanceof Promise) {\n const element = await this.for;\n return [element];\n }\n }\n\n private async registerTriggerListener() {\n const triggerElementList = await this.queryAnchorElements();\n\n if (this.disposeListener) {\n this.disposeListener();\n }\n\n if (!triggerElementList) {\n return;\n }\n\n triggerElementList.forEach((element) => {\n const onMouseEnter = () => {\n this.showTooltip(element);\n };\n\n const onMouseLeave = () => {\n this.hideTooltip();\n };\n\n const onFocusIn = () => {\n if (this.showTooltipTimeout !== undefined) {\n clearTimeout(this.showTooltipTimeout);\n }\n\n onMouseEnter();\n };\n\n const onFocusOut = () => {\n this.hideTooltip();\n };\n\n element.addEventListener('mouseenter', onMouseEnter);\n element.addEventListener('mouseleave', onMouseLeave);\n element.addEventListener('focusin', onFocusIn);\n element.addEventListener('focusout', onFocusOut);\n\n this.disposeListener = () => {\n element.removeEventListener('mouseenter', onMouseEnter);\n element.removeEventListener('mouseleave', onMouseLeave);\n element.removeEventListener('focusin', onFocusIn);\n element.removeEventListener('focusout', onFocusOut);\n };\n });\n }\n\n private registerTooltipListener() {\n const { hostElement } = this;\n hostElement.addEventListener('mouseenter', () => this.clearHideTimeout());\n hostElement.addEventListener('focusin', () => this.clearHideTimeout());\n\n hostElement.addEventListener('mouseleave', () => this.hideTooltip());\n hostElement.addEventListener('focusout', () => this.hideTooltip());\n }\n\n @OnListener<Tooltip>('keydown', (self) => self.visible)\n async onKeydown(event: KeyboardEvent) {\n if (event.code === 'Escape') {\n this.hideTooltip();\n }\n }\n\n componentWillLoad() {\n this.registerTriggerListener();\n }\n\n componentDidLoad() {\n this.observer = new MutationObserver(() => {\n this.registerTriggerListener();\n });\n\n this.observer.observe(document.body, {\n attributes: true,\n attributeFilter: ['data-ix-tooltip'],\n childList: true,\n subtree: true,\n });\n\n this.registerTooltipListener();\n }\n\n connectedCallback() {\n tooltipController.connected(this);\n }\n\n disconnectedCallback() {\n this.observer?.disconnect();\n this.destroyAutoUpdate();\n tooltipController.disconnected(this);\n }\n\n isPresent(): boolean {\n return this.visible;\n }\n\n present(): void {\n this.visible = true;\n }\n\n dismiss(): void {\n this.visible = false;\n }\n\n render() {\n return (\n <Host\n class={{\n visible: this.visible,\n }}\n role=\"tooltip\"\n >\n <div class=\"tooltip-container\">\n <div class={'tooltip-title'}>\n <slot name=\"title-icon\"></slot>\n <ix-typography format=\"h5\">\n {this.titleContent}\n <slot name=\"title-content\"></slot>\n </ix-typography>\n </div>\n <div class={'tooltip-content'}>\n <slot></slot>\n </div>\n <div class=\"arrow\"></div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"uYAiGgBA,EACdC,GAEA,OACEA,GACA,6BAA8BA,UACvBA,EAAIC,2BAA6B,YACxC,0BAA2BD,UACpBA,EAAIE,wBAA0B,UAEzC,CC3GA,MAAMC,EAAgB,wFACtB,MAAAC,EAAeD,E,MCwBFE,EAAc,M,yBAmBRC,KAAAC,gBAAkB,IAAIC,kBAAiB,IACtDF,KAAKG,0BAICH,KAAAI,eAAiC,GACxBJ,KAAAK,SAAWC,I,wFARkB,K,CAU9C,iBAAAC,GACEP,KAAKQ,0BACLR,KAAKS,4B,CAGP,oBAAAC,GACE,GAAIV,KAAKC,gBAAiB,CACxBD,KAAKC,gBAAgBU,Y,CAE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AIT,iBAAA9F,GACEhB,KAAK2J,yB,CAGP,gBAAAa,GACExK,KAAKyK,SAAW,IAAIvK,kBAAiB,KACnCF,KAAK2J,yBAAyB,IAGhC3J,KAAKyK,SAASpJ,QAAQC,SAASoJ,KAAM,CACnCC,WAAY,KACZC,gBAAiB,CAAC,mBAClBrJ,UAAW,KACXC,QAAS,OAGXxB,KAAKoK,yB,CAGP,iBAAA7J,GACEoF,EAAkBb,UAAU9E,K,CAG9B,oBAAAU,G,OACEuI,EAAAjJ,KAAKyK,YAAQ,MAAAxB,SAAA,SAAAA,EAAEtI,aACfX,KAAKoG,oBACLT,EAAkBV,aAAajF,K,CAGjC,SAAA6K,GACE,OAAO7K,KAAK8K,O,CAGd,OAAA3F,GACEnF,KAAK8K,QAAU,I,CAGjB,OAAAxF,GACEtF,KAAK8K,QAAU,K,CAGjB,MAAArI,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CACHqB,MAAO,CACL6G,QAAS9K,KAAK8K,SAEhBC,KAAK,WAELrI,EAAA,OAAAE,IAAA,2CAAKqB,MAAM,qBACTvB,EAAA,OAAAE,IAAA,2CAAKqB,MAAO,iBACVvB,EAAA,QAAAE,IAAA,2CAAMyB,KAAK,eACX3B,EAAA,iBAAAE,IAAA,2CAAeM,OAAO,MACnBlD,KAAKgL,aACNtI,EAAA,QAAAE,IAAA,2CAAMyB,KAAK,oBAGf3B,EAAA,OAAAE,IAAA,2CAAKqB,MAAO,mBACVvB,EAAA,QAAAE,IAAA,8CAEFF,EAAA,OAAAE,IAAA,2CAAKqB,MAAM,W,oCAlEbgH,EAAA,CADLC,EAAoB,WAAYC,GAASA,EAAKL,W"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["numberInputCss","IxNumberInputStyle0","numberInputIds","NumberInput","this","inputRef","makeRef","slotEndRef","slotStartRef","numberInputId","updateClassMappings","result","mapValidationResult","componentWillLoad","updateFormInternalValue","value","componentDidRender","updatePaddings","adjustPaddingForStartAndEnd","current","formInternals","setFormValue","toString","getAssociatedFormElement","form","hasValidValue","Promise","resolve","getNativeInputElement","waitForCurrent","focusInput","focus","render","showStepperButtons","disabled","readonly","h","Host","key","class","id","required","label","helperText","invalidText","infoText","warningText","validText","showTextAsTooltip","isInvalid","isValid","isInfo","isWarning","controlRef","SlotStart","onSlotChange","InputElement","min","max","pattern","type","placeholder","onKeyPress","event","checkAllowedKeys","valueChange","emit","Number","onBlur","onInputBlur","SlotEnd","ghost","icon","iconMinus","size","onClick","stepDown","checkInternalValidity","iconPlus","stepUp","__decorate","HookValidationLifecycle"],"sources":["src/components/input/number-input.scss?tag=ix-number-input&encapsulation=shadow","src/components/input/number-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 './input.mixins.scss';\n\n@include input-field;\n\n:host {\n .input-wrapper.show-stepper-buttons {\n input[type='number'] {\n min-width: 6rem;\n }\n }\n\n .number-stepper-container {\n display: flex;\n position: relative;\n flex-direction: row;\n flex-wrap: nowrap;\n margin-right: 0.25rem;\n\n &.container-hidden {\n display: none;\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 { iconMinus, iconPlus } 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 h,\n} from '@stencil/core';\nimport {\n HookValidationLifecycle,\n IxInputFieldComponent,\n ValidationResults,\n} from '../utils/input';\nimport { MakeRef, makeRef } from '../utils/make-ref';\nimport { InputElement, SlotEnd, SlotStart } from './input.fc';\nimport {\n adjustPaddingForStartAndEnd,\n checkAllowedKeys,\n checkInternalValidity,\n mapValidationResult,\n onInputBlur,\n} from './input.util';\n\nlet numberInputIds = 0;\n\n/**\n * @since 2.6.0\n * @form-ready 2.6.0\n */\n@Component({\n tag: 'ix-number-input',\n styleUrl: 'number-input.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NumberInput implements IxInputFieldComponent<number> {\n @Element() hostElement!: HTMLIxNumberInputElement;\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 * The value of the input field\n */\n @Prop({ reflect: true, mutable: true }) value: number = 0;\n\n /**\n * Indicates if the field is required\n */\n @Prop({ reflect: true }) required: boolean = false;\n\n /**\n * Disables the input field\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Indicates if the field is read-only\n */\n @Prop() readonly: boolean = false;\n\n /**\n * The helper text for the input field\n */\n @Prop() helperText?: string;\n\n /**\n * The info text for the input field\n */\n @Prop() infoText?: string;\n\n /**\n * Indicates if the text should be shown as a tooltip\n */\n @Prop() showTextAsTooltip?: boolean;\n\n /**\n * The valid text for the input field\n */\n @Prop() validText?: string;\n\n /**\n * The warning text for the input field\n */\n @Prop() warningText?: string;\n\n /**\n * The label for the input field\n */\n @Prop({ reflect: true }) label?: string;\n\n /**\n * The error text for the input field\n */\n @Prop() invalidText?: string;\n\n /**\n * The pattern for the input field\n */\n @Prop() pattern?: string;\n\n /**\n * The minimum value for the input field\n */\n @Prop() min?: string | number;\n\n /**\n * The maximum value for the input field\n */\n @Prop() max?: string | number;\n\n /**\n * The allowed characters pattern for the input field\n */\n @Prop() allowedCharactersPattern?: string;\n\n /**\n * Indicates if the stepper buttons should be shown\n */\n @Prop() showStepperButtons?: boolean;\n\n /**\n * Event emitted when the value of the input field changes\n */\n @Event() valueChange!: EventEmitter<number>;\n\n /**\n * Event emitted when the validity state of the input field changes\n */\n @Event() validityStateChange!: EventEmitter<ValidityState>;\n\n /**\n * Event emitted when the input field loses focus\n */\n @Event() ixBlur!: EventEmitter<void>;\n\n @State() isInvalid = false;\n @State() isValid = false;\n @State() isInfo = false;\n @State() isWarning = false;\n @State() isInvalidByRequired = false;\n\n private readonly inputRef = makeRef<HTMLInputElement>();\n private readonly slotEndRef = makeRef<HTMLDivElement>();\n private readonly slotStartRef = makeRef<HTMLDivElement>();\n private readonly numberInputId = `number-input-${numberInputIds++}`;\n\n @HookValidationLifecycle()\n updateClassMappings(result: ValidationResults) {\n mapValidationResult(this, result);\n }\n\n componentWillLoad() {\n this.updateFormInternalValue(this.value);\n }\n\n componentDidRender() {\n this.updatePaddings();\n }\n\n private updatePaddings() {\n adjustPaddingForStartAndEnd(\n this.slotStartRef.current,\n this.slotEndRef.current,\n this.inputRef.current\n );\n }\n\n updateFormInternalValue(value: number) {\n this.formInternals.setFormValue(value.toString());\n this.value = value;\n }\n\n /** @internal */\n @Method()\n async getAssociatedFormElement(): Promise<HTMLFormElement | null> {\n return this.formInternals.form;\n }\n\n /** @internal */\n @Method()\n hasValidValue(): Promise<boolean> {\n return Promise.resolve(!!this.value);\n }\n\n /**\n * Returns the native input element used under the hood\n */\n @Method()\n getNativeInputElement(): Promise<HTMLInputElement> {\n return this.inputRef.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 showStepperButtons =\n this.showStepperButtons && (this.disabled || this.readonly) === false;\n\n return (\n <Host\n class={{\n disabled: this.disabled,\n readonly: this.readonly,\n }}\n >\n <ix-field-wrapper\n id={this.numberInputId}\n required={this.required}\n label={this.label}\n helperText={this.helperText}\n invalidText={this.invalidText}\n infoText={this.infoText}\n warningText={this.warningText}\n validText={this.validText}\n showTextAsTooltip={this.showTextAsTooltip}\n isInvalid={this.isInvalid}\n isValid={this.isValid}\n isInfo={this.isInfo}\n isWarning={this.isWarning}\n controlRef={this.inputRef as unknown as MakeRef<HTMLElement>}\n >\n <div\n class={{\n 'input-wrapper': true,\n 'show-stepper-buttons': !!this.showStepperButtons,\n }}\n >\n <SlotStart\n slotStartRef={this.slotStartRef}\n onSlotChange={() => this.updatePaddings()}\n ></SlotStart>\n <InputElement\n id={this.numberInputId}\n readonly={this.readonly}\n disabled={this.disabled}\n min={this.min}\n max={this.max}\n pattern={this.pattern}\n type={'number'}\n isInvalid={this.isInvalid}\n required={this.required}\n value={this.value}\n placeholder={this.placeholder}\n inputRef={this.inputRef}\n onKeyPress={(event) => checkAllowedKeys(this, event)}\n valueChange={(value) => this.valueChange.emit(Number(value))}\n updateFormInternalValue={(value) =>\n this.updateFormInternalValue(Number(value))\n }\n onBlur={() => onInputBlur(this, this.inputRef.current)}\n ></InputElement>\n <SlotEnd\n slotEndRef={this.slotEndRef}\n onSlotChange={() => this.updatePaddings()}\n >\n <div\n class={{\n 'number-stepper-container': true,\n 'container-hidden': !showStepperButtons,\n }}\n >\n <ix-icon-button\n ghost\n icon={iconMinus}\n size=\"16\"\n class=\"number-stepper-button step-minus\"\n onClick={() => {\n if (!this.inputRef.current) {\n return;\n }\n this.inputRef.current.stepDown();\n checkInternalValidity(this, this.inputRef.current);\n this.updateFormInternalValue(\n Number(this.inputRef.current.value)\n );\n this.valueChange.emit(this.value);\n }}\n ></ix-icon-button>\n <ix-icon-button\n ghost\n icon={iconPlus}\n size=\"16\"\n class=\"number-stepper-button step-plus\"\n onClick={() => {\n if (!this.inputRef.current) {\n return;\n }\n this.inputRef.current.stepUp();\n checkInternalValidity(this, this.inputRef.current);\n this.updateFormInternalValue(\n Number(this.inputRef.current.value)\n );\n this.valueChange.emit(this.value);\n }}\n ></ix-icon-button>\n </div>\n </SlotEnd>\n </div>\n </ix-field-wrapper>\n </Host>\n );\n }\n}\n"],"mappings":"gVAAA,MAAMA,EAAiB,q0hBACvB,MAAAC,EAAeD,E,2WCoCf,IAAIE,EAAiB,E,MAYRC,EAAW,M,sUAmHLC,KAAAC,SAAWC,IACXF,KAAAG,WAAaD,IACbF,KAAAI,aAAeF,IACfF,KAAAK,cAAgB,gBAAgBP,M,0DArG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ASc,SAC1Cf,KAAKU,wBACHqD,OAAO/D,KAAKC,SAASc,QAAQJ,QAE/BX,KAAK6D,YAAYC,KAAK9D,KAAKW,MAAM,Q,4EAvJnDiE,EAAA,CADCC,K"}
@@ -1,2 +0,0 @@
1
- var e=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}function n(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}export{e as a,n as c,o as g};
2
- //# sourceMappingURL=p-45840cb9.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import{r as e,c as o,h as t,H as r,g as i}from"./p-5806df2b.js";const s=":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}";const d=s;const n=class{constructor(t){e(this,t);this.itemClick=o(this,"itemClick",7);this.label=undefined;this.icon=undefined;this.hover=false;this.disabled=false;this.checked=false;this.isSubMenu=false;this.suppressChecked=false}async emitItemClick(){this.itemClick.emit(this.hostElement)}async getDropdownItemElement(){return this.hostElement}isIconOnly(){return this.label===undefined&&this.hostElement.innerText===""&&this.icon!==undefined}render(){return t(r,{key:"a3bb371da7e04f07da99bcd2e675152cba162c9c",class:{hover:this.hover,"icon-only":this.isIconOnly(),disabled:this.disabled,submenu:this.isSubMenu},role:"listitem"},t("button",{key:"fe8d07d5524ca68d92599f1f67bebf4728e9d55c",type:"button",tabIndex:0,class:{"dropdown-item":true,"no-checked-field":this.suppressChecked},onClick:()=>this.emitItemClick()},!this.suppressChecked?t("div",{class:"dropdown-item-checked"},this.checked?t("ix-icon",{class:"checkmark",name:"single-check",size:"16"}):null):null,this.icon?t("ix-icon",{class:"dropdown-item-icon",name:this.icon}):null,t("div",{key:"30d9ed8400a979bd463182b1914fb6a13554fcd3",class:"dropdown-item-text"},this.label,t("slot",{key:"d69eeb6bdb5633331415cebf3e3170809c2cc291"})),this.isSubMenu?t("ix-icon",{name:"chevron-right-small",class:"submenu-icon"}):null))}get hostElement(){return i(this)}};n.style=d;export{n as ix_dropdown_item};
2
- //# sourceMappingURL=p-4624a772.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["dropdownItemCss","IxDropdownItemStyle0","DropdownItem","emitItemClick","this","itemClick","emit","hostElement","getDropdownItemElement","isIconOnly","label","undefined","innerText","icon","render","h","Host","key","class","hover","disabled","submenu","isSubMenu","role","type","tabIndex","suppressChecked","onClick","checked","name","size"],"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"],"mappings":"gEAAA,MAAMA,EAAkB,ilFACxB,MAAAC,EAAeD,E,MCyBFE,EAAY,M,kHAgBP,M,cAKG,M,aAKD,M,eAGE,M,qBAGM,K,CAS1B,mBAAMC,GACJC,KAAKC,UAAUC,KAAKF,KAAKG,Y,CAK3B,4BAAMC,GACJ,OAAOJ,KAAKG,W,CAGN,UAAAE,GACN,OACEL,KAAKM,QAAUC,WACfP,KAAKG,YAAYK,YAAc,IAC/BR,KAAKS,OAASF,S,CAIlB,MAAAG,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CACHC,MAAO,CACLC,MAAOf,KAAKe,MACZ,YAAaf,KAAKK,aAClBW,SAAUhB,KAAKgB,SACfC,QAASjB,KAAKkB,WAEhBC,KAAK,YAELR,EAAA,UAAAE,IAAA,2CACEO,KAAK,SACLC,SAAU,EACVP,MAAO,CACL,gBAAiB,KACjB,mBAAoBd,KAAKsB,iBAE3BC,QAAS,IAAMvB,KAAKD,kBAElBC,KAAKsB,gBACLX,EAAA,OAAKG,MAAM,yBACRd,KAAKwB,QACJb,EAAA,WACEG,MAAM,YACNW,KAAM,eACNC,KAAK,OAEL,MAEJ,KACH1B,KAAKS,KACJE,EAAA,WAASG,MAAM,qBAAqBW,KAAMzB,KAAKS,OAC7C,KACJE,EAAA,OAAAE,IAAA,2CAAKC,MAAM,sBACRd,KAAKM,MACNK,EAAA,QAAAE,IAAA,8CAEDb,KAAKkB,UACJP,EAAA,WACEc,KAAM,sBACNX,MAAO,iBAEP,M"}
@@ -1,2 +0,0 @@
1
- import{a}from"./p-d7aa00d6.js";const o=a;export{o as g};
2
- //# sourceMappingURL=p-50096707.js.map
@@ -1,2 +0,0 @@
1
- import"./p-46a6cd9d.js";import{b as t}from"./p-23a4b81f.js";async function o(o){const c=document.createElement("ix-application-switch-modal");c.config=o;const a=await t({content:c,size:"840",closeOnBackdropClick:true});const i=a.htmlElement.querySelector("ix-application-switch-modal");return t=>{i.config=t}}export{o as s};
2
- //# sourceMappingURL=p-5682e985.js.map
@@ -1,2 +0,0 @@
1
- import{r as e,c as t,h as o,F as r,H as h,g as i}from"./p-5806df2b.js";import{a as c}from"./p-5fe87e71.js";const a=':host{display:inline-flex;position:relative;height:2rem;justify-content:flex-start;align-items:center;margin-right:0.25rem;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 .switch{position:relative;display:inline-block;width:3rem;min-width:3rem;max-width:3rem;height:1.5rem;margin-right:0.25rem}:host .switch input{opacity:0;width:0;height:0}:host .slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:var(--theme-switch-off--background);transition:var(--theme-default-time);border-radius:1.5rem;border:1px solid transparent}:host .slider:before{position:absolute;content:"";height:1.125rem;width:1.125rem;left:4px;bottom:2px;background-color:var(--theme-switch-thumb-off--background);transition:var(--theme-default-time);border-radius:50%}:host input{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}:host input:focus-visible+.switch>.slider{outline:1px solid var(--theme-color-focus-bdr);outline-offset:1px}:host input:checked+.switch>.slider::before{background-color:var(--theme-switch-thumb-on--background);transform:translateX(1.35rem)}:host input+.switch>.slider{border-color:var(--theme-switch-off--border-color)}:host input+.switch:hover>.slider{background-color:var(--theme-switch-off--background--hover);border-color:var(--theme-switch-off--border-color--hover)}:host input+.switch:hover>.slider:before{background-color:var(--theme-switch-thumb-off--background--hover)}:host input+.switch:active>.slider{background-color:var(--theme-switch-off--background--active);border-color:var(--theme-switch-off--border-color--active)}:host input+.switch:active>.slider:before{background-color:var(--theme-switch-thumb-off--background--active)}:host input:checked+.switch>.slider{background-color:var(--theme-switch-on--background);border-color:var(--theme-switch-on--border-color)}:host input:checked+.switch:hover>.slider{background-color:var(--theme-switch-on--background--hover);border-color:var(--theme-switch-on--border-color--hover)}:host input:checked+.switch:hover>.slider:before{background-color:var(--theme-switch-thumb-on--background--hover)}:host input:checked+.switch:active>.slider{background-color:var(--theme-switch-on--background--active);border-color:var(--theme-switch-on--border-color--active)}:host input:checked+.switch:active>.slider:before{background-color:var(--theme-switch-thumb-on--background--active)}:host input:indeterminate+.switch>.slider::before{transform:translateX(0.7rem)}:host .toggle-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host(.disabled){pointer-events:none}:host(.disabled) input+.switch{opacity:0.5}:host(.disabled) input+.switch>.slider{background-color:var(--theme-switch-off--background--disabled)}:host(.disabled) input+.switch>.slider:before{background-color:var(--theme-switch-thumb-off--background--disabled)}:host(.disabled) input:checked+.switch>.slider{background-color:var(--theme-switch-on--background--disabled)}:host(.disabled) input:checked+.switch>.slider:before{background-color:var(--theme-switch-thumb-on--background--disabled)}:host(.disabled) .toggle-text{color:var(--theme-color-weak-text)}:host(.ix-info:not(.disabled)) .slider{--theme-switch-off--background:var(--theme-switch-off--background--info);--theme-switch-off--background--hover:var(--theme-switch-off--background--info--hover);--theme-switch-off--background--active:var(--theme-switch-off--background--info--active);--theme-switch-thumb-off--background:var(--theme-switch-thumb-off--background--info);--theme-switch-thumb-off--background--hover:var(--theme-switch-thumb-off--background--info--hover);--theme-switch-thumb-off--background--active:var(--theme-switch-thumb-off--background--info--active);--theme-switch-off--border-color:var(--theme-switch-off--border-color--info);--theme-switch-off--border-color--hover:var(--theme-switch-off--border-color--info--hover);--theme-switch-off--border-color--active:var(--theme-switch-off--border-color--info--active);--theme-switch-on--background:var(--theme-switch-on--background--info);--theme-switch-on--background--hover:var(--theme-switch-on--background--info--hover);--theme-switch-on--background--active:var(--theme-switch-on--background--info--active);--theme-switch-thumb-on--background:var(--theme-switch-thumb-on--background--info);--theme-switch-thumb-on--background--hover:var(--theme-switch-thumb-on--background--info--hover);--theme-switch-thumb-on--background--active:var(--theme-switch-thumb-on--background--info--active);--theme-switch-on--border-color:var(--theme-switch-on--border-color--info);--theme-switch-on--border-color--hover:var(--theme-switch-on--border-color--info--hover);--theme-switch-on--border-color--active:var(--theme-switch-on--border-color--info--active);--theme-switch-mixed--background:var(--theme-switch-mixed--background--info);--theme-switch-mixed--background--hover:var(--theme-switch-mixed--background--info--hover);--theme-switch-mixed--background--active:var(--theme-switch-mixed--background--info--active);--theme-switch-thumb-mixed--background:var(--theme-switch-thumb-mixed--background--info);--theme-switch-thumb-mixed--background--hover:var(--theme-switch-thumb-mixed--background--info--hover);--theme-switch-thumb-mixed--background--active:var(--theme-switch-thumb-mixed--background--info--active);--theme-switch-mixed--border-color:var(--theme-switch-mixed--border-color--info);--theme-switch-mixed--border-color--hover:var(--theme-switch-mixed--border-color--info--hover);--theme-switch-mixed--border-color--active:var(--theme-switch-mixed--border-color--info--active)}:host(.ix-warning:not(.disabled)) .slider{--theme-switch-off--background:var(--theme-switch-off--background--warning);--theme-switch-off--background--hover:var(--theme-switch-off--background--warning--hover);--theme-switch-off--background--active:var(--theme-switch-off--background--warning--active);--theme-switch-thumb-off--background:var(--theme-switch-thumb-off--background--warning);--theme-switch-thumb-off--background--hover:var(--theme-switch-thumb-off--background--warning--hover);--theme-switch-thumb-off--background--active:var(--theme-switch-thumb-off--background--warning--active);--theme-switch-off--border-color:var(--theme-switch-off--border-color--warning);--theme-switch-off--border-color--hover:var(--theme-switch-off--border-color--warning--hover);--theme-switch-off--border-color--active:var(--theme-switch-off--border-color--warning--active);--theme-switch-on--background:var(--theme-switch-on--background--warning);--theme-switch-on--background--hover:var(--theme-switch-on--background--warning--hover);--theme-switch-on--background--active:var(--theme-switch-on--background--warning--active);--theme-switch-thumb-on--background:var(--theme-switch-thumb-on--background--warning);--theme-switch-thumb-on--background--hover:var(--theme-switch-thumb-on--background--warning--hover);--theme-switch-thumb-on--background--active:var(--theme-switch-thumb-on--background--warning--active);--theme-switch-on--border-color:var(--theme-switch-on--border-color--warning);--theme-switch-on--border-color--hover:var(--theme-switch-on--border-color--warning--hover);--theme-switch-on--border-color--active:var(--theme-switch-on--border-color--warning--active);--theme-switch-mixed--background:var(--theme-switch-mixed--background--warning);--theme-switch-mixed--background--hover:var(--theme-switch-mixed--background--warning--hover);--theme-switch-mixed--background--active:var(--theme-switch-mixed--background--warning--active);--theme-switch-thumb-mixed--background:var(--theme-switch-thumb-mixed--background--warning);--theme-switch-thumb-mixed--background--hover:var(--theme-switch-thumb-mixed--background--warning--hover);--theme-switch-thumb-mixed--background--active:var(--theme-switch-thumb-mixed--background--warning--active);--theme-switch-mixed--border-color:var(--theme-switch-mixed--border-color--warning);--theme-switch-mixed--border-color--hover:var(--theme-switch-mixed--border-color--warning--hover);--theme-switch-mixed--border-color--active:var(--theme-switch-mixed--border-color--warning--active)}:host(.ix-invalid--required:not(.disabled)) .slider{--theme-switch-off--background:var(--theme-switch-off--background--invalid);--theme-switch-off--background--hover:var(--theme-switch-off--background--invalid--hover);--theme-switch-off--background--active:var(--theme-switch-off--background--invalid--active);--theme-switch-thumb-off--background:var(--theme-switch-thumb-off--background--invalid);--theme-switch-thumb-off--background--hover:var(--theme-switch-thumb-off--background--invalid--hover);--theme-switch-thumb-off--background--active:var(--theme-switch-thumb-off--background--invalid--active);--theme-switch-off--border-color:var(--theme-switch-off--border-color--invalid);--theme-switch-off--border-color--hover:var(--theme-switch-off--border-color--invalid--hover);--theme-switch-off--border-color--active:var(--theme-switch-off--border-color--invalid--active);--theme-switch-on--background:var(--theme-switch-on--background--invalid);--theme-switch-on--background--hover:var(--theme-switch-on--background--invalid--hover);--theme-switch-on--background--active:var(--theme-switch-on--background--invalid--active);--theme-switch-thumb-on--background:var(--theme-switch-thumb-on--background--invalid);--theme-switch-thumb-on--background--hover:var(--theme-switch-thumb-on--background--invalid--hover);--theme-switch-thumb-on--background--active:var(--theme-switch-thumb-on--background--invalid--active);--theme-switch-on--border-color:var(--theme-switch-on--border-color--invalid);--theme-switch-on--border-color--hover:var(--theme-switch-on--border-color--invalid--hover);--theme-switch-on--border-color--active:var(--theme-switch-on--border-color--invalid--active);--theme-switch-mixed--background:var(--theme-switch-mixed--background--invalid);--theme-switch-mixed--background--hover:var(--theme-switch-mixed--background--invalid--hover);--theme-switch-mixed--background--active:var(--theme-switch-mixed--background--invalid--active);--theme-switch-thumb-mixed--background:var(--theme-switch-thumb-mixed--background--invalid);--theme-switch-thumb-mixed--background--hover:var(--theme-switch-thumb-mixed--background--invalid--hover);--theme-switch-thumb-mixed--background--active:var(--theme-switch-thumb-mixed--background--invalid--active);--theme-switch-mixed--border-color:var(--theme-switch-mixed--border-color--invalid);--theme-switch-mixed--border-color--hover:var(--theme-switch-mixed--border-color--invalid--hover);--theme-switch-mixed--border-color--active:var(--theme-switch-mixed--border-color--invalid--active)}:host(.ix-invalid:not(.disabled)) .slider{--theme-switch-off--background:var(--theme-switch-off--background--invalid);--theme-switch-off--background--hover:var(--theme-switch-off--background--invalid--hover);--theme-switch-off--background--active:var(--theme-switch-off--background--invalid--active);--theme-switch-thumb-off--background:var(--theme-switch-thumb-off--background--invalid);--theme-switch-thumb-off--background--hover:var(--theme-switch-thumb-off--background--invalid--hover);--theme-switch-thumb-off--background--active:var(--theme-switch-thumb-off--background--invalid--active);--theme-switch-off--border-color:var(--theme-switch-off--border-color--invalid);--theme-switch-off--border-color--hover:var(--theme-switch-off--border-color--invalid--hover);--theme-switch-off--border-color--active:var(--theme-switch-off--border-color--invalid--active);--theme-switch-on--background:var(--theme-switch-on--background--invalid);--theme-switch-on--background--hover:var(--theme-switch-on--background--invalid--hover);--theme-switch-on--background--active:var(--theme-switch-on--background--invalid--active);--theme-switch-thumb-on--background:var(--theme-switch-thumb-on--background--invalid);--theme-switch-thumb-on--background--hover:var(--theme-switch-thumb-on--background--invalid--hover);--theme-switch-thumb-on--background--active:var(--theme-switch-thumb-on--background--invalid--active);--theme-switch-on--border-color:var(--theme-switch-on--border-color--invalid);--theme-switch-on--border-color--hover:var(--theme-switch-on--border-color--invalid--hover);--theme-switch-on--border-color--active:var(--theme-switch-on--border-color--invalid--active);--theme-switch-mixed--background:var(--theme-switch-mixed--background--invalid);--theme-switch-mixed--background--hover:var(--theme-switch-mixed--background--invalid--hover);--theme-switch-mixed--background--active:var(--theme-switch-mixed--background--invalid--active);--theme-switch-thumb-mixed--background:var(--theme-switch-thumb-mixed--background--invalid);--theme-switch-thumb-mixed--background--hover:var(--theme-switch-thumb-mixed--background--invalid--hover);--theme-switch-thumb-mixed--background--active:var(--theme-switch-thumb-mixed--background--invalid--active);--theme-switch-mixed--border-color:var(--theme-switch-mixed--border-color--invalid);--theme-switch-mixed--border-color--hover:var(--theme-switch-mixed--border-color--invalid--hover);--theme-switch-mixed--border-color--active:var(--theme-switch-mixed--border-color--invalid--active)}';const d=a;const n=class{constructor(o){e(this,o);this.checkedChange=t(this,"checkedChange",7);this.valueChange=t(this,"valueChange",7);if(o.$hostElement$["s-ei"]){this.formInternals=o.$hostElement$["s-ei"]}else{this.formInternals=o.$hostElement$.attachInternals();o.$hostElement$["s-ei"]=this.formInternals}this.name=undefined;this.value="on";this.checked=false;this.disabled=false;this.indeterminate=false;this.textOn="On";this.textOff="Off";this.textIndeterminate="Mixed";this.hideText=false;this.required=false}onCheckedChange(e){if(this.indeterminate){this.indeterminate=false}this.checked=e;this.checkedChange.emit(this.checked)}componentWillLoad(){this.updateFormInternalValue()}updateFormInternalValue(){if(this.checked){this.formInternals.setFormValue(this.value)}else{this.formInternals.setFormValue(null)}}watchCheckedChange(){this.updateFormInternalValue()}hasValidValue(){return Promise.resolve(this.checked)}getAssociatedFormElement(){return Promise.resolve(this.formInternals.form)}render(){return o(h,{key:"2aafe9718c088e425a93a520063a55690dfa2f4e",class:{disabled:this.disabled},onClick:()=>this.onCheckedChange(!this.checked)},o("input",{key:"eba13dd0d816d4f93113b7bc3eff1bd9bb304eb2",disabled:this.disabled,indeterminate:this.indeterminate,checked:this.checked,role:"switch",tabindex:0,type:"checkbox","aria-checked":c(this.checked),onChange:e=>this.onCheckedChange(e.target.checked)}),o("label",{key:"587d507fb9e5208d4dfad4be72ca6a1483a3b96a",class:"switch",tabIndex:-1},o("span",{key:"6e3d43c84b83d15d1196aa4df1ab1944be820c25",class:"slider"})),!this.hideText?o(r,null,!this.indeterminate?o("span",{class:"toggle-text","aria-hidden":c(true)},this.checked?this.textOn:this.textOff):o("span",{class:"toggle-text","aria-hidden":c(true)},this.textIndeterminate)):null)}static get formAssociated(){return true}get hostElement(){return i(this)}static get watchers(){return{checked:["watchCheckedChange"]}}};n.style=d;export{n as ix_toggle};
2
- //# sourceMappingURL=p-5db5a0b5.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["toggleCss","IxToggleStyle0","Toggle","onCheckedChange","newChecked","this","indeterminate","checked","checkedChange","emit","componentWillLoad","updateFormInternalValue","formInternals","setFormValue","value","watchCheckedChange","hasValidValue","Promise","resolve","getAssociatedFormElement","form","render","h","Host","key","class","disabled","onClick","role","tabindex","type","a11yBoolean","onChange","event","target","tabIndex","hideText","Fragment","textOn","textOff","textIndeterminate"],"sources":["src/components/toggle/toggle.scss?tag=ix-toggle&encapsulation=shadow","src/components/toggle/toggle.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/hover';\n@import 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n display: inline-flex;\n position: relative;\n height: 2rem;\n justify-content: flex-start;\n align-items: center;\n margin-right: 0.25rem;\n\n cursor: pointer;\n\n .switch {\n position: relative;\n display: inline-block;\n width: 3rem;\n min-width: 3rem;\n max-width: 3rem;\n height: 1.5rem;\n margin-right: 0.25rem;\n }\n\n .switch input {\n opacity: 0;\n width: 0;\n height: 0;\n }\n\n .slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: var(--theme-switch-off--background);\n transition: var(--theme-default-time);\n border-radius: 1.5rem;\n border: 1px solid transparent;\n }\n\n .slider:before {\n position: absolute;\n content: '';\n height: 1.125rem;\n width: 1.125rem;\n left: 4px;\n bottom: 2px;\n background-color: var(--theme-switch-thumb-off--background);\n transition: var(--theme-default-time);\n border-radius: 50%;\n }\n\n input {\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n }\n\n input:focus-visible + .switch > .slider {\n outline: 1px solid var(--theme-color-focus-bdr);\n outline-offset: 1px;\n }\n\n input:checked + .switch > .slider::before {\n background-color: var(--theme-switch-thumb-on--background);\n transform: translateX(1.35rem);\n }\n\n // Toggle NOT checked\n input + .switch > .slider {\n border-color: var(--theme-switch-off--border-color);\n }\n\n input + .switch:hover > .slider {\n background-color: var(--theme-switch-off--background--hover);\n border-color: var(--theme-switch-off--border-color--hover);\n }\n\n input + .switch:hover > .slider:before {\n background-color: var(--theme-switch-thumb-off--background--hover);\n }\n\n input + .switch:active > .slider {\n background-color: var(--theme-switch-off--background--active);\n border-color: var(--theme-switch-off--border-color--active);\n }\n\n input + .switch:active > .slider:before {\n background-color: var(--theme-switch-thumb-off--background--active);\n }\n\n // Toggle checked\n input:checked + .switch > .slider {\n background-color: var(--theme-switch-on--background);\n border-color: var(--theme-switch-on--border-color);\n }\n\n input:checked + .switch:hover > .slider {\n background-color: var(--theme-switch-on--background--hover);\n border-color: var(--theme-switch-on--border-color--hover);\n }\n\n input:checked + .switch:hover > .slider:before {\n background-color: var(--theme-switch-thumb-on--background--hover);\n }\n\n input:checked + .switch:active > .slider {\n background-color: var(--theme-switch-on--background--active);\n border-color: var(--theme-switch-on--border-color--active);\n }\n\n input:checked + .switch:active > .slider:before {\n background-color: var(--theme-switch-thumb-on--background--active);\n }\n\n input:indeterminate + .switch > .slider::before {\n transform: translateX(0.7rem);\n }\n\n .toggle-text {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n}\n\n:host(.disabled) {\n pointer-events: none;\n\n input + .switch {\n opacity: 0.5;\n }\n\n input + .switch > .slider {\n background-color: var(--theme-switch-off--background--disabled);\n }\n\n input + .switch > .slider:before {\n background-color: var(--theme-switch-thumb-off--background--disabled);\n }\n\n input:checked + .switch > .slider {\n background-color: var(--theme-switch-on--background--disabled);\n }\n\n input:checked + .switch > .slider:before {\n background-color: var(--theme-switch-thumb-on--background--disabled);\n }\n\n .toggle-text {\n color: var(--theme-color-weak-text);\n }\n}\n\n@mixin toggle-variant($selector) {\n :host(#{$selector}:not(.disabled)) {\n .slider {\n @content;\n }\n }\n}\n\n@mixin define-toggle-vars($state, $type) {\n --theme-switch-#{$state}--background: var(--theme-switch-#{$state}--background--#{$type});\n --theme-switch-#{$state}--background--hover: var(--theme-switch-#{$state}--background--#{$type}--hover);\n --theme-switch-#{$state}--background--active: var(--theme-switch-#{$state}--background--#{$type}--active);\n\n --theme-switch-thumb-#{$state}--background: var(--theme-switch-thumb-#{$state}--background--#{$type});\n --theme-switch-thumb-#{$state}--background--hover: var(--theme-switch-thumb-#{$state}--background--#{$type}--hover);\n --theme-switch-thumb-#{$state}--background--active: var(--theme-switch-thumb-#{$state}--background--#{$type}--active);\n\n --theme-switch-#{$state}--border-color: var(--theme-switch-#{$state}--border-color--#{$type});\n --theme-switch-#{$state}--border-color--hover: var(--theme-switch-#{$state}--border-color--#{$type}--hover);\n --theme-switch-#{$state}--border-color--active: var(--theme-switch-#{$state}--border-color--#{$type}--active);\n}\n\n@include toggle-variant(\n $selector: '.ix-info',\n) {\n @include define-toggle-vars('off', 'info');\n @include define-toggle-vars('on', 'info');\n @include define-toggle-vars('mixed', 'info');\n}\n\n@include toggle-variant(\n $selector: '.ix-warning',\n) {\n @include define-toggle-vars('off', 'warning');\n @include define-toggle-vars('on', 'warning');\n @include define-toggle-vars('mixed', 'warning');\n}\n\n@include toggle-variant(\n $selector: '.ix-invalid--required',\n) {\n @include define-toggle-vars('off', 'invalid');\n @include define-toggle-vars('on', 'invalid');\n @include define-toggle-vars('mixed', 'invalid');\n}\n\n@include toggle-variant(\n $selector: '.ix-invalid',\n) {\n @include define-toggle-vars('off', 'invalid');\n @include define-toggle-vars('on', 'invalid');\n @include define-toggle-vars('mixed', 'invalid');\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 AttachInternals,\n Component,\n Element,\n Event,\n EventEmitter,\n Fragment,\n h,\n Host,\n Method,\n Prop,\n Watch,\n} from '@stencil/core';\nimport { a11yBoolean } from '../utils/a11y';\nimport { IxFormComponent } from '../utils/input';\n\n/**\n * @form-ready 2.6.0\n * */\n@Component({\n tag: 'ix-toggle',\n styleUrl: 'toggle.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class Toggle implements IxFormComponent<string> {\n @AttachInternals() formInternals!: ElementInternals;\n\n @Element() hostElement!: HTMLIxToggleElement;\n\n /**\n * Name of the checkbox component\n */\n @Prop({ reflect: true }) name?: string;\n\n /**\n * Value of the checkbox component\n */\n @Prop({ reflect: true }) value: string = 'on';\n\n /**\n * Whether the slide-toggle element is checked or not.\n */\n @Prop({ mutable: true, reflect: true }) checked = false;\n\n /**\n * Whether the slide-toggle element is disabled or not.\n */\n @Prop() disabled = false;\n\n /**\n * If true the control is in indeterminate state\n */\n @Prop({ mutable: true, reflect: true }) indeterminate = false;\n\n /**\n * Text for on state\n */\n @Prop() textOn = 'On';\n\n /**\n * Text for off state\n */\n @Prop() textOff = 'Off';\n\n /**\n * Text for indeterminate state\n */\n @Prop() textIndeterminate = 'Mixed';\n\n /**\n * Hide `on` and `off` text\n */\n @Prop() hideText = false;\n\n /**\n * Required state of the checkbox component.\n *\n * If true, checkbox needs to be checked to be valid\n */\n @Prop({ reflect: true }) required = false;\n\n /**\n * An event will be dispatched each time the slide-toggle changes its value.\n */\n @Event() checkedChange!: EventEmitter<boolean>;\n\n /** @internal */\n @Event() valueChange!: EventEmitter<string>;\n\n onCheckedChange(newChecked: boolean) {\n if (this.indeterminate) {\n this.indeterminate = false;\n }\n this.checked = newChecked;\n this.checkedChange.emit(this.checked);\n }\n\n componentWillLoad() {\n this.updateFormInternalValue();\n }\n\n updateFormInternalValue(): void {\n if (this.checked) {\n this.formInternals.setFormValue(this.value);\n } else {\n this.formInternals.setFormValue(null);\n }\n }\n\n @Watch('checked')\n watchCheckedChange() {\n this.updateFormInternalValue();\n }\n\n /** @internal */\n @Method()\n hasValidValue(): Promise<boolean> {\n return Promise.resolve(this.checked);\n }\n\n /** @internal */\n @Method()\n getAssociatedFormElement(): Promise<HTMLFormElement | null> {\n return Promise.resolve(this.formInternals.form);\n }\n\n render() {\n return (\n <Host\n class={{\n disabled: this.disabled,\n }}\n onClick={() => this.onCheckedChange(!this.checked)}\n >\n <input\n disabled={this.disabled}\n indeterminate={this.indeterminate}\n checked={this.checked}\n role=\"switch\"\n tabindex={0}\n type=\"checkbox\"\n aria-checked={a11yBoolean(this.checked)}\n onChange={(event) =>\n this.onCheckedChange((event.target as HTMLInputElement).checked)\n }\n ></input>\n <label class=\"switch\" tabIndex={-1}>\n <span class=\"slider\"></span>\n </label>\n {!this.hideText ? (\n <Fragment>\n {!this.indeterminate ? (\n <span class={'toggle-text'} aria-hidden={a11yBoolean(true)}>\n {this.checked ? this.textOn : this.textOff}\n </span>\n ) : (\n <span class={'toggle-text'} aria-hidden={a11yBoolean(true)}>\n {this.textIndeterminate}\n </span>\n )}\n </Fragment>\n ) : null}\n </Host>\n );\n }\n}\n"],"mappings":"2GAAA,MAAMA,EAAY,8mbAClB,MAAAC,EAAeD,E,MCiCFE,EAAM,M,0TAawB,K,aAKS,M,cAK/B,M,mBAKqC,M,YAKvC,K,aAKC,M,uBAKU,Q,cAKT,M,cAOiB,K,CAUpC,eAAAC,CAAgBC,GACd,GAAIC,KAAKC,cAAe,CACtBD,KAAKC,cAAgB,K,CAEvBD,KAAKE,QAAUH,EACfC,KAAKG,cAAcC,KAAKJ,KAAKE,Q,CAG/B,iBAAAG,GACEL,KAAKM,yB,CAGP,uBAAAA,GACE,GAAIN,KAAKE,QAAS,CAChBF,KAAKO,cAAcC,aAAaR,KAAKS,M,KAChC,CACLT,KAAKO,cAAcC,aAAa,K,EAKpC,kBAAAE,GACEV,KAAKM,yB,CAKP,aAAAK,GACE,OAAOC,QAAQC,QAAQb,KAAKE,Q,CAK9B,wBAAAY,GACE,OAAOF,QAAQC,QAAQb,KAAKO,cAAcQ,K,CAG5C,MAAAC,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CACHC,MAAO,CACLC,SAAUrB,KAAKqB,UAEjBC,QAAS,IAAMtB,KAAKF,iBAAiBE,KAAKE,UAE1Ce,EAAA,SAAAE,IAAA,2CACEE,SAAUrB,KAAKqB,SACfpB,cAAeD,KAAKC,cACpBC,QAASF,KAAKE,QACdqB,KAAK,SACLC,SAAU,EACVC,KAAK,WAAU,eACDC,EAAY1B,KAAKE,SAC/ByB,SAAWC,GACT5B,KAAKF,gBAAiB8B,EAAMC,OAA4B3B,WAG5De,EAAA,SAAAE,IAAA,2CAAOC,MAAM,SAASU,UAAW,GAC/Bb,EAAA,QAAAE,IAAA,2CAAMC,MAAM,aAEZpB,KAAK+B,SACLd,EAACe,EAAQ,MACLhC,KAAKC,cACLgB,EAAA,QAAMG,MAAO,cAAa,cAAeM,EAAY,OAClD1B,KAAKE,QAAUF,KAAKiC,OAASjC,KAAKkC,SAGrCjB,EAAA,QAAMG,MAAO,cAAa,cAAeM,EAAY,OAClD1B,KAAKmC,oBAIV,K"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["buttonCss","IxButtonStyle0","Button","handleClick","event","this","disabled","loading","stopPropagation","preventDefault","componentDidLoad","type","submitButton","document","createElement","style","display","tabIndex","hostElement","appendChild","submitButtonElement","dispatchFormEvents","click","render","baseButtonProps","variant","outline","ghost","iconOnly","iconOval","selected","icon","iconSize","onClick","alignment","h","Host","key","class","BaseButton","Object","assign"],"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"],"mappings":"6FAAA,MAAMA,EAAY,oyrBAClB,MAAAC,EAAeD,E,MCkBFE,EAAM,M,sCAKgB,U,aAKf,M,WAKF,M,cAKoB,M,UAKA,S,aAOT,M,mCAQa,S,cAGD,I,CAUvC,WAAAC,CAAYC,GACV,GAAIC,KAAKC,UAAYD,KAAKE,QAAS,CACjCH,EAAMI,kBACNJ,EAAMK,gB,EAIV,gBAAAC,GACE,GAAIL,KAAKM,OAAS,SAAU,CAC1B,MAAMC,EAAeC,SAASC,cAAc,UAC5CF,EAAaG,MAAMC,QAAU,OAC7BJ,EAAaD,KAAO,SACpBC,EAAaK,UAAY,EACzBZ,KAAKa,YAAYC,YAAYP,GAE7BP,KAAKe,oBAAsBR,C,EAI/B,kBAAAS,GACE,GACEhB,KAAKM,OAAS,UACdN,KAAKe,sBACJf,KAAKC,WACLD,KAAKE,QACN,CACAF,KAAKe,oBAAoBE,O,EAI7B,MAAAC,GACE,MAAMC,EAAmC,CACvCC,QAASpB,KAAKoB,QACdC,QAASrB,KAAKqB,QACdC,MAAOtB,KAAKsB,MACZC,SAAU,MACVC,SAAU,MACVC,SAAU,MACVxB,SAAUD,KAAKC,UAAYD,KAAKE,QAChCwB,KAAM1B,KAAK0B,KACXC,SAAU3B,KAAK2B,SACfzB,QAASF,KAAKE,QACd0B,QAAS,IAAM5B,KAAKgB,qBACpBV,KAAMN,KAAKM,KACXuB,UAAW7B,KAAK6B,WAGlB,OACEC,EAACC,EAAI,CAAAC,IAAA,2CACHC,MAAO,CACLhC,SAAUD,KAAKC,UAAYD,KAAKE,UAGlC4B,EAACI,EAAUC,OAAAC,OAAA,CAAAJ,IAAA,4CAAKb,GACdW,EAAA,QAAAE,IAAA,8C"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["inputCss","IxInputStyle0","inputIds","Input","this","inputRef","makeRef","slotEndRef","slotStartRef","inputId","updateClassMappings","result","mapValidationResult","updateInputType","inputType","type","componentWillLoad","updateFormInternalValue","value","componentDidRender","updatePaddings","adjustPaddingForStartAndEnd","current","formInternals","setFormValue","getAssociatedFormElement","form","hasValidValue","Promise","resolve","getNativeInputElement","waitForCurrent","focusInput","focus","render","inputAria","getAriaAttributesForInput","h","Host","key","class","disabled","readonly","htmlForLabel","required","label","helperText","invalidText","infoText","warningText","validText","showTextAsTooltip","isInvalid","isValid","isInfo","isWarning","controlRef","SlotStart","onSlotChange","InputElement","id","maxLength","minLength","pattern","placeholder","onKeyPress","event","checkAllowedKeys","valueChange","emit","onBlur","onInputBlur","ariaAttributes","SlotEnd","color","ghost","icon","iconEye","iconEyeCancelled","onClick","slot","_a","length","__decorate","HookValidationLifecycle"],"sources":["src/components/input/input.scss?tag=ix-input&encapsulation=shadow","src/components/input/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 'components/form/input';\n@import 'mixins/shadow-dom/component';\n@import 'mixins/validation/form-component';\n@import './input.mixins.scss';\n\n@include input-field;\n\n:host {\n .password-eye {\n margin-left: 0.125rem;\n color: red;\n\n &.eye-hidden {\n display: none;\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 { iconEye, iconEyeCancelled } from '@siemens/ix-icons/icons';\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Method,\n Prop,\n State,\n Watch,\n h,\n} from '@stencil/core';\nimport { A11yAttributes } from '../utils/a11y';\nimport {\n HookValidationLifecycle,\n IxInputFieldComponent,\n ValidationResults,\n} from '../utils/input';\nimport { MakeRef, makeRef } from '../utils/make-ref';\nimport { InputElement, SlotEnd, SlotStart } from './input.fc';\nimport {\n adjustPaddingForStartAndEnd,\n checkAllowedKeys,\n getAriaAttributesForInput,\n mapValidationResult,\n onInputBlur,\n} from './input.util';\n\nlet inputIds = 0;\n\n/**\n * @since 2.6.0\n * @form-ready 2.6.0\n */\n@Component({\n tag: 'ix-input',\n styleUrl: 'input.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class Input implements IxInputFieldComponent<string> {\n @Element() hostElement!: HTMLIxInputElement;\n @AttachInternals() formInternals!: ElementInternals;\n\n /**\n * The type of the text field. Possible values are 'text', 'email', or 'password'.\n */\n @Prop() type: 'text' | 'email' | 'password' | 'tel' | 'url' = 'text';\n\n /**\n * The name of the text field.\n */\n @Prop({ reflect: true }) name?: string;\n\n /**\n * The placeholder text for the text field.\n */\n @Prop({ reflect: true }) placeholder?: string;\n\n /**\n * The value of the text field.\n */\n @Prop({ reflect: true, mutable: true }) value: string = '';\n\n /**\n * Specifies whether the text field is required.\n */\n @Prop({ reflect: true }) required: boolean = false;\n\n /**\n * Specifies whether the text field is disabled.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * Specifies whether the text field is readonly.\n */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /**\n * The helper text for the text field.\n */\n @Prop() helperText?: string;\n\n /**\n * The info text for the text field.\n */\n @Prop() infoText?: string;\n\n /**\n * Specifies whether to show the text as a tooltip.\n */\n @Prop() showTextAsTooltip?: boolean;\n\n /**\n * The valid text for the text field.\n */\n @Prop() validText?: string;\n\n /**\n * The warning text for the text field.\n */\n @Prop() warningText?: string;\n\n /**\n * The label for the text field.\n */\n @Prop({ reflect: true }) label?: string;\n\n /**\n * The error text for the text field.\n */\n @Prop() invalidText?: string;\n\n /**\n * The pattern for the text field.\n */\n @Prop() pattern?: string;\n\n /**\n * The maximum length of the text field.\n */\n @Prop() maxLength?: number;\n\n /**\n * The minimum length of the text field.\n */\n @Prop() minLength?: number;\n\n /**\n * The allowed characters pattern for the text field.\n */\n @Prop() allowedCharactersPattern?: string;\n\n /**\n * Event emitted when the value of the text field changes.\n */\n @Event() valueChange!: EventEmitter<string>;\n\n /**\n * Event emitted when the validity state of the text field changes.\n */\n @Event() validityStateChange!: EventEmitter<ValidityState>;\n\n /**\n * Event emitted when the text field loses focus.\n */\n @Event() ixBlur!: EventEmitter<void>;\n\n @State() isInvalid = false;\n @State() isValid = false;\n @State() isInfo = false;\n @State() isWarning = false;\n @State() isInvalidByRequired = false;\n\n @State() inputType = 'text';\n\n private readonly inputRef = makeRef<HTMLInputElement>();\n private readonly slotEndRef = makeRef<HTMLDivElement>();\n private readonly slotStartRef = makeRef<HTMLDivElement>();\n\n private readonly inputId = `input-${inputIds++}`;\n\n @HookValidationLifecycle()\n updateClassMappings(result: ValidationResults) {\n mapValidationResult(this, result);\n }\n\n @Watch('type')\n updateInputType() {\n this.inputType = this.type;\n }\n\n componentWillLoad() {\n this.updateFormInternalValue(this.value);\n this.inputType = this.type;\n }\n\n componentDidRender() {\n this.updatePaddings();\n }\n\n private updatePaddings() {\n adjustPaddingForStartAndEnd(\n this.slotStartRef.current,\n this.slotEndRef.current,\n this.inputRef.current\n );\n }\n\n updateFormInternalValue(value: string) {\n this.formInternals.setFormValue(value);\n this.value = value;\n }\n\n /** @internal */\n @Method()\n async getAssociatedFormElement(): Promise<HTMLFormElement | null> {\n return this.formInternals.form;\n }\n\n /** @internal */\n @Method()\n hasValidValue(): Promise<boolean> {\n return Promise.resolve(!!this.value);\n }\n\n /**\n * Returns the native input element used in the text field.\n */\n @Method()\n getNativeInputElement() {\n return this.inputRef.waitForCurrent();\n }\n\n /**\n * Focuses the input field\n */\n @Method()\n async focusInput(): Promise<void> {\n return (await this.getNativeInputElement()).focus();\n }\n\n render() {\n const inputAria: A11yAttributes = getAriaAttributesForInput(this);\n return (\n <Host\n class={{\n disabled: this.disabled,\n readonly: this.readonly,\n }}\n >\n <ix-field-wrapper\n htmlForLabel={this.inputId}\n required={this.required}\n label={this.label}\n helperText={this.helperText}\n invalidText={this.invalidText}\n infoText={this.infoText}\n warningText={this.warningText}\n validText={this.validText}\n showTextAsTooltip={this.showTextAsTooltip}\n isInvalid={this.isInvalid}\n isValid={this.isValid}\n isInfo={this.isInfo}\n isWarning={this.isWarning}\n controlRef={this.inputRef as unknown as MakeRef<HTMLElement>}\n >\n <div class=\"input-wrapper\">\n <SlotStart\n slotStartRef={this.slotStartRef}\n onSlotChange={() => this.updatePaddings()}\n ></SlotStart>\n <InputElement\n id={this.inputId}\n readonly={this.readonly}\n disabled={this.disabled}\n maxLength={this.maxLength}\n minLength={this.minLength}\n pattern={this.pattern}\n type={this.inputType}\n isInvalid={this.isInvalid}\n required={this.required}\n value={this.value}\n placeholder={this.placeholder}\n inputRef={this.inputRef}\n onKeyPress={(event) => checkAllowedKeys(this, event)}\n valueChange={(value) => this.valueChange.emit(value)}\n updateFormInternalValue={(value) =>\n this.updateFormInternalValue(value)\n }\n onBlur={() => onInputBlur(this, this.inputRef.current)}\n ariaAttributes={inputAria}\n ></InputElement>\n <SlotEnd\n slotEndRef={this.slotEndRef}\n onSlotChange={() => this.updatePaddings()}\n >\n <ix-icon-button\n color=\"color-weak-text\"\n class={{\n 'password-eye': true,\n 'eye-hidden': this.type !== 'password',\n }}\n ghost\n icon={\n this.inputType === 'password' ? iconEye : iconEyeCancelled\n }\n onClick={() => {\n if (this.inputType === 'password') {\n this.inputType = 'text';\n return;\n }\n\n this.inputType = 'password';\n }}\n ></ix-icon-button>\n </SlotEnd>\n </div>\n {!!this.maxLength && this.maxLength > 0 && (\n <ix-typography class=\"bottom-text\" slot=\"bottom-right\" color=\"soft\">\n {this.value?.length}/{this.maxLength}\n </ix-typography>\n )}\n </ix-field-wrapper>\n </Host>\n );\n }\n}\n"],"mappings":"gVAAA,MAAMA,EAAW,027BACjB,MAAAC,EAAeD,E,2WCsCf,IAAIE,EAAW,E,MAYFC,EAAK,M,sUAqHCC,KAAAC,SAAWC,IACXF,KAAAG,WAAaD,IACbF,KAAAI,aAAeF,IAEfF,KAAAK,QAAU,SAASP,M,UAlH0B,O,0DAeN,G,cAKX,M,cAKA,M,cAKA,M,uTAwExB,M,aACF,M,YACD,M,eACG,M,yBACU,M,eAEV,M,CASrB,mBAAAQ,CAAoBC,GAClBC,EAAoBR,KAAMO,E,CAI5B,eAAAE,GACET,KAAKU,UAAYV,KAAKW,I,CAGxB,iBAAAC,GACEZ,KAAKa,wBAAwBb,KAAKc,OAClCd,KAAKU,UAAYV,KAAKW,I,CAGxB,kBAAAI,GACEf,KAAKgB,gB,CAGC,cAAAA,GACNC,EACEjB,KAAKI,aAAac,QAClBlB,KAAKG,WAAWe,QAChBlB,KAAKC,SAASiB,Q,CAIlB,uBAAAL,CAAwBC,GACtBd,KAAKmB,cAAcC,aAAaN,GAChCd,KAAKc,MAAQA,C,CAKf,8BAAMO,GACJ,OAAOrB,KAAKmB,cAAcG,I,CAK5B,aAAAC,GACE,OAAOC,QAAQC,UAAUzB,KAAKc,M,CAOhC,qBAAAY,GACE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eAAgBrC,IAElBE,EAACoC,EAAO,CAAAlC,IAAA,2CACNhC,WAAYH,KAAKG,WACjBmD,aAAc,IAAMtD,KAAKgB,kBAEzBiB,EAAA,kBAAAE,IAAA,2CACEmC,MAAM,kBACNlC,MAAO,CACL,eAAgB,KAChB,aAAcpC,KAAKW,OAAS,YAE9B4D,MAAK,KACLC,KACExE,KAAKU,YAAc,WAAa+D,EAAUC,EAE5CC,QAAS,KACP,GAAI3E,KAAKU,YAAc,WAAY,CACjCV,KAAKU,UAAY,OACjB,M,CAGFV,KAAKU,UAAY,UAAU,QAKhCV,KAAKyD,WAAazD,KAAKyD,UAAY,GACpCxB,EAAA,iBAAAE,IAAA,2CAAeC,MAAM,cAAcwC,KAAK,eAAeN,MAAM,SAC1DO,EAAA7E,KAAKc,SAAK,MAAA+D,SAAA,S,EAAEC,OAAM,IAAG9E,KAAKyD,Y,mIAzIvCsB,EAAA,CADCC,K"}
@@ -1,2 +0,0 @@
1
- import{h as n}from"./p-5806df2b.js";import{a as e}from"./p-5fe87e71.js";import{s as t}from"./p-f97a15c4.js";import{a}from"./p-360b158e.js";import{a as i}from"./p-71206084.js";function o(e){return n("textarea",Object.assign({readOnly:e.readonly,disabled:e.disabled,maxLength:e.maxLength,minLength:e.minLength,cols:e.textareaCols,rows:e.textareaRows,ref:e.textAreaRef,class:{"is-invalid":e.isInvalid},required:e.required,value:e.value,placeholder:e.placeholder,onChange:n=>{const t=n.target;e.valueChange(t.value)},onInput:n=>{const t=n.target;e.updateFormInternalValue(t.value)},onBlur:()=>e.onBlur(),style:{resize:e.resizeBehavior,height:e.textareaHeight,width:e.textareaWidth}},e.ariaAttributes))}function s(e){return n("input",Object.assign({id:e.id,autoComplete:"off",readOnly:e.readonly,disabled:e.disabled,min:e.min,max:e.max,maxLength:e.maxLength?Number(e.maxLength):undefined,minLength:e.maxLength?Number(e.minLength):undefined,ref:e.inputRef,pattern:e.pattern,type:e.type,class:{"is-invalid":e.isInvalid},required:e.required,value:e.value,placeholder:e.placeholder,onKeyPress:n=>e.onKeyPress(n),onChange:n=>{const t=n.target;e.valueChange(t.value)},onInput:n=>{const t=n.target;e.updateFormInternalValue(t.value)},onBlur:()=>e.onBlur()},e.ariaAttributes))}const r=(e,t)=>n("div",{class:"end-container",ref:e.slotEndRef},n("slot",{name:"end",onSlotchange:e.onSlotChange}),t);const c=e=>n("div",{class:"start-container",ref:e.slotStartRef},n("slot",{name:"start",onSlotchange:e.onSlotChange}));function l(n){const e=5;i({targets:n,duration:200,easing:"easeInOutSine",loop:2,translateX:[{value:e*-1},{value:e},{value:e/-2},{value:e/2},{value:0}]})}function u(n,e){n.isInvalid=e.isInvalid||e.isInvalidByRequired;n.isValid=e.isValid;n.isInfo=e.isInfo;n.isWarning=e.isWarning}function f(n,e){if(n.allowedCharactersPattern){const t=new RegExp(n.allowedCharactersPattern);if(!t.test(e.key)){e.preventDefault();l(n.inputRef.current)}}}async function d(n,e){const a=e.validity;const i=n.validityStateChange.emit(a);if(i.defaultPrevented){return}if(!n.value){return}const o=await t(n);if(o){return}const{valid:s}=a;n.hostElement.classList.toggle("ix-invalid",!s)}function m(n,e){n.ixBlur.emit();if(!e){throw new Error("Input element is not available")}d(n,e)}function p(n,e,t){var i;if(!n){return}const o=16;const s=a(e+o/2);if(t.slotEnd){n.style.paddingRight=`calc(${s} + ${(i=t.additionalPaddingRight)!==null&&i!==void 0?i:"0rem"})`}else{n.style.paddingLeft=s}}function v(n,e,t){requestAnimationFrame((()=>{requestAnimationFrame((()=>{if(n){const e=n.getBoundingClientRect();if(e){p(t,e.width,{slotEnd:false})}}if(e){const n=e.getBoundingClientRect();if(n){p(t,n.width,{slotEnd:true})}}}))}))}function h(n){const t={"aria-invalid":`${e(n.isInvalid)}`,"aria-required":`${e(n.required)}`};if(n.isInvalid&&n.invalidText){t["aria-errormessage"]=n.invalidText}return t}export{s as I,r as S,o as T,v as a,c as b,f as c,d,h as g,u as m,m as o};
2
- //# sourceMappingURL=p-79bb0d39.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["TextareaElement","props","h","Object","assign","readOnly","readonly","disabled","maxLength","minLength","cols","textareaCols","rows","textareaRows","ref","textAreaRef","class","isInvalid","required","value","placeholder","onChange","changeEvent","target","valueChange","onInput","inputEvent","updateFormInternalValue","onBlur","style","resize","resizeBehavior","height","textareaHeight","width","textareaWidth","ariaAttributes","InputElement","id","autoComplete","min","max","Number","undefined","inputRef","pattern","type","onKeyPress","event","SlotEnd","children","slotEndRef","name","onSlotchange","onSlotChange","SlotStart","slotStartRef","shakeInput","input","xMax","anime","targets","duration","easing","loop","translateX","mapValidationResult","result","isInvalidByRequired","isValid","isInfo","isWarning","checkAllowedKeys","comp","allowedCharactersPattern","regex","RegExp","test","key","preventDefault","current","async","checkInternalValidity","validityState","validity","eventResult","validityStateChange","emit","defaultPrevented","skipValidation","shouldSuppressInternalValidation","valid","hostElement","classList","toggle","onInputBlur","ixBlur","Error","applyPaddingEnd","inputElement","options","remInPixels","padding","convertToRemString","slotEnd","paddingRight","_a","additionalPaddingRight","paddingLeft","adjustPaddingForStartAndEnd","startElement","endElement","requestAnimationFrame","startBoundingRect","getBoundingClientRect","endBoundingRect","getAriaAttributesForInput","component","inputAria","a11yBoolean","invalidText"],"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 onChange={(changeEvent) => {\n const target = changeEvent.target as HTMLInputElement;\n props.valueChange(target.value);\n }}\n onInput={(inputEvent) => {\n const target = inputEvent.target as HTMLInputElement;\n props.updateFormInternalValue(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 onChange={(changeEvent) => {\n const target = changeEvent.target as HTMLInputElement;\n props.valueChange(target.value);\n }}\n onInput={(inputEvent) => {\n const target = inputEvent.target as HTMLInputElement;\n props.updateFormInternalValue(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"],"mappings":"wLAYgBA,EAAgBC,GAoB9B,OACEC,EAAA,WAAAC,OAAAC,OAAA,CACEC,SAAUJ,EAAMK,SAChBC,SAAUN,EAAMM,SAChBC,UAAWP,EAAMO,UACjBC,UAAWR,EAAMQ,UACjBC,KAAMT,EAAMU,aACZC,KAAMX,EAAMY,aACZC,IAAKb,EAAMc,YACXC,MAAO,CACL,aAAcf,EAAMgB,WAEtBC,SAAUjB,EAAMiB,SAChBC,MAAOlB,EAAMkB,MACbC,YAAanB,EAAMmB,YACnBC,SAAWC,IACT,MAAMC,EAASD,EAAYC,OAC3BtB,EAAMuB,YAAYD,EAAOJ,MAAM,EAEjCM,QAAUC,IACR,MAAMH,EAASG,EAAWH,OAC1BtB,EAAM0B,wBAAwBJ,EAAOJ,MAAM,EAE7CS,OAAQ,IAAM3B,EAAM2B,SACpBC,MAAO,CACLC,OAAQ7B,EAAM8B,eACdC,OAAQ/B,EAAMgC,eACdC,MAAOjC,EAAMkC,gBAEXlC,EAAMmC,gBAGhB,C,SAEgBC,EAAapC,GAqB3B,OACEC,EAAA,QAAAC,OAAAC,OAAA,CACEkC,GAAIrC,EAAMqC,GACVC,aAAa,MACblC,SAAUJ,EAAMK,SAChBC,SAAUN,EAAMM,SAChBiC,I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