@siemens/ix 4.1.0 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/READMEOSS.html +1 -1
  2. package/components/index.js.map +1 -1
  3. package/components/ix-checkbox-group.js +3 -3
  4. package/components/ix-checkbox.js +1 -1
  5. package/components/ix-custom-field.js +3 -3
  6. package/components/ix-date-input.js +8 -10
  7. package/components/ix-date-input.js.map +1 -1
  8. package/components/ix-datetime-picker.js +1 -1
  9. package/components/ix-field-label.js +1 -1
  10. package/components/ix-field-wrapper.js +1 -1
  11. package/components/ix-helper-text.js +1 -1
  12. package/components/ix-input.js +4 -4
  13. package/components/ix-menu-about.js +2 -2
  14. package/components/ix-menu-settings.js +1 -1
  15. package/components/ix-number-input.js +4 -4
  16. package/components/ix-pagination.js +3 -3
  17. package/components/ix-radio-group.js +3 -3
  18. package/components/ix-radio.js +1 -1
  19. package/components/ix-select.js +1 -1
  20. package/components/ix-tab-item.js +1 -1
  21. package/components/ix-textarea.js +4 -4
  22. package/components/ix-time-input.js +9 -11
  23. package/components/ix-time-input.js.map +1 -1
  24. package/components/ix-time-picker.js +1 -1
  25. package/components/ix-toggle.js +1 -1
  26. package/components/{p-DyGPjxFm.js → p-7E7AMiQV.js} +3 -3
  27. package/components/p-7E7AMiQV.js.map +1 -0
  28. package/components/{p-Bz7hxKB6.js → p-B1p0kpQJ.js} +3 -3
  29. package/components/{p-Bz7hxKB6.js.map → p-B1p0kpQJ.js.map} +1 -1
  30. package/components/{p-BVUD9f4A.js → p-BIg1TSrD.js} +3 -3
  31. package/components/{p-BVUD9f4A.js.map → p-BIg1TSrD.js.map} +1 -1
  32. package/components/{p-BZLbfHdO.js → p-BOQ00Fbs.js} +5 -5
  33. package/components/{p-BZLbfHdO.js.map → p-BOQ00Fbs.js.map} +1 -1
  34. package/components/{p-Cc4uqNv5.js → p-BiqdnsgA.js} +3 -3
  35. package/components/{p-Cc4uqNv5.js.map → p-BiqdnsgA.js.map} +1 -1
  36. package/components/{p-kJlC6ZD0.js → p-BmMUyJRQ.js} +35 -20
  37. package/components/p-BmMUyJRQ.js.map +1 -0
  38. package/components/{p-g2Y5blor.js → p-DUU5I7wZ.js} +3 -3
  39. package/components/{p-g2Y5blor.js.map → p-DUU5I7wZ.js.map} +1 -1
  40. package/components/{p-xHo-3QVy.js → p-Dq_H2flK.js} +9 -3
  41. package/components/p-Dq_H2flK.js.map +1 -0
  42. package/dist/cjs/index.cjs.js.map +1 -1
  43. package/dist/cjs/{input.fc-B5JMSZbY.js → input.fc-DrxRYq_G.js} +3 -3
  44. package/dist/cjs/{input.fc-B5JMSZbY.js.map → input.fc-DrxRYq_G.js.map} +1 -1
  45. package/dist/cjs/ix-checkbox-group.cjs.entry.js +1 -1
  46. package/dist/cjs/ix-checkbox.cjs.entry.js +1 -1
  47. package/dist/cjs/ix-custom-field.cjs.entry.js +1 -1
  48. package/dist/cjs/ix-date-input.cjs.entry.js +6 -8
  49. package/dist/cjs/ix-date-input.entry.cjs.js.map +1 -1
  50. package/dist/cjs/ix-field-label_2.cjs.entry.js +1 -1
  51. package/dist/cjs/ix-helper-text.cjs.entry.js +1 -1
  52. package/dist/cjs/ix-input.cjs.entry.js +2 -2
  53. package/dist/cjs/ix-number-input.cjs.entry.js +2 -2
  54. package/dist/cjs/ix-radio-group.cjs.entry.js +1 -1
  55. package/dist/cjs/ix-radio.cjs.entry.js +1 -1
  56. package/dist/cjs/ix-select.cjs.entry.js +1 -1
  57. package/dist/cjs/ix-tab-item.ix-tabs.entry.cjs.js.map +1 -1
  58. package/dist/cjs/ix-tab-item_2.cjs.entry.js +1 -1
  59. package/dist/cjs/ix-textarea.cjs.entry.js +2 -2
  60. package/dist/cjs/ix-time-input.cjs.entry.js +6 -8
  61. package/dist/cjs/ix-time-input.entry.cjs.js.map +1 -1
  62. package/dist/cjs/ix-time-picker.cjs.entry.js +33 -18
  63. package/dist/cjs/ix-time-picker.entry.cjs.js.map +1 -1
  64. package/dist/cjs/ix-toggle.cjs.entry.js +1 -1
  65. package/dist/cjs/{validation-CfL71_0d.js → validation-DTmSqO2d.js} +9 -2
  66. package/dist/{esm/validation-D_dk-JqT.js.map → cjs/validation-DTmSqO2d.js.map} +1 -1
  67. package/dist/collection/components/date-input/date-input.js +5 -7
  68. package/dist/collection/components/date-input/date-input.js.map +1 -1
  69. package/dist/collection/components/tab-item/tab-item.css +1 -1
  70. package/dist/collection/components/time-input/time-input.js +5 -7
  71. package/dist/collection/components/time-input/time-input.js.map +1 -1
  72. package/dist/collection/components/time-picker/time-picker.js +33 -18
  73. package/dist/collection/components/time-picker/time-picker.js.map +1 -1
  74. package/dist/collection/components/utils/input/validation.js +6 -0
  75. package/dist/collection/components/utils/input/validation.js.map +1 -1
  76. package/dist/collection/components/utils/modal/index.js.map +1 -1
  77. package/dist/collection/components/utils/modal/loading.js.map +1 -1
  78. package/dist/esm/index.js.map +1 -1
  79. package/dist/esm/{input.fc-CQbX6V05.js → input.fc-KJF8Z9iJ.js} +3 -3
  80. package/dist/esm/{input.fc-CQbX6V05.js.map → input.fc-KJF8Z9iJ.js.map} +1 -1
  81. package/dist/esm/ix-checkbox-group.entry.js +1 -1
  82. package/dist/esm/ix-checkbox.entry.js +1 -1
  83. package/dist/esm/ix-custom-field.entry.js +1 -1
  84. package/dist/esm/ix-date-input.entry.js +6 -8
  85. package/dist/esm/ix-date-input.entry.js.map +1 -1
  86. package/dist/esm/ix-field-label_2.entry.js +1 -1
  87. package/dist/esm/ix-helper-text.entry.js +1 -1
  88. package/dist/esm/ix-input.entry.js +2 -2
  89. package/dist/esm/ix-number-input.entry.js +2 -2
  90. package/dist/esm/ix-radio-group.entry.js +1 -1
  91. package/dist/esm/ix-radio.entry.js +1 -1
  92. package/dist/esm/ix-select.entry.js +1 -1
  93. package/dist/esm/ix-tab-item.ix-tabs.entry.js.map +1 -1
  94. package/dist/esm/ix-tab-item_2.entry.js +1 -1
  95. package/dist/esm/ix-textarea.entry.js +2 -2
  96. package/dist/esm/ix-time-input.entry.js +6 -8
  97. package/dist/esm/ix-time-input.entry.js.map +1 -1
  98. package/dist/esm/ix-time-picker.entry.js +33 -18
  99. package/dist/esm/ix-time-picker.entry.js.map +1 -1
  100. package/dist/esm/ix-toggle.entry.js +1 -1
  101. package/dist/esm/{validation-D_dk-JqT.js → validation-LJh16vt2.js} +9 -3
  102. package/dist/{cjs/validation-CfL71_0d.js.map → esm/validation-LJh16vt2.js.map} +1 -1
  103. package/dist/siemens-ix/index.esm.js.map +1 -1
  104. package/dist/siemens-ix/ix-date-input.entry.esm.js.map +1 -1
  105. package/dist/siemens-ix/ix-tab-item.ix-tabs.entry.esm.js.map +1 -1
  106. package/dist/siemens-ix/ix-time-input.entry.esm.js.map +1 -1
  107. package/dist/siemens-ix/ix-time-picker.entry.esm.js.map +1 -1
  108. package/dist/siemens-ix/p-0c325f08.entry.js +2 -0
  109. package/dist/siemens-ix/p-0c325f08.entry.js.map +1 -0
  110. package/dist/siemens-ix/p-0eca5a77.entry.js +2 -0
  111. package/dist/siemens-ix/{p-3751c675.entry.js.map → p-0eca5a77.entry.js.map} +1 -1
  112. package/dist/siemens-ix/{p-086d31e7.entry.js → p-26c629c3.entry.js} +2 -2
  113. package/dist/siemens-ix/{p-51ae739e.entry.js → p-33b3ed5b.entry.js} +2 -2
  114. package/dist/siemens-ix/{p-7f90eeef.entry.js → p-4431f891.entry.js} +2 -2
  115. package/dist/siemens-ix/{p-620158aa.entry.js → p-4e77d861.entry.js} +2 -2
  116. package/dist/siemens-ix/p-68aaf0fe.entry.js +2 -0
  117. package/dist/siemens-ix/p-68aaf0fe.entry.js.map +1 -0
  118. package/dist/siemens-ix/{p-ebef3d52.entry.js → p-79537728.entry.js} +2 -2
  119. package/dist/siemens-ix/{p-CAj3Tlcn.js → p-C7nQNUsO.js} +2 -2
  120. package/dist/siemens-ix/{p-CAj3Tlcn.js.map → p-C7nQNUsO.js.map} +1 -1
  121. package/dist/siemens-ix/{p-5iwF1M9X.js → p-DaswuiGO.js} +2 -2
  122. package/dist/siemens-ix/{p-5iwF1M9X.js.map → p-DaswuiGO.js.map} +1 -1
  123. package/dist/siemens-ix/{p-3b7573d6.entry.js → p-a4225101.entry.js} +2 -2
  124. package/dist/siemens-ix/{p-1c83cb5f.entry.js → p-b27a9744.entry.js} +2 -2
  125. package/dist/siemens-ix/{p-3f13b14e.entry.js → p-ba9ed3d1.entry.js} +2 -2
  126. package/dist/siemens-ix/{p-10f2a239.entry.js → p-c15e64a8.entry.js} +2 -2
  127. package/dist/siemens-ix/{p-7364534a.entry.js → p-c43b201b.entry.js} +2 -2
  128. package/dist/siemens-ix/{p-84df2a86.entry.js → p-d2c18c15.entry.js} +2 -2
  129. package/dist/siemens-ix/p-d2c18c15.entry.js.map +1 -0
  130. package/dist/siemens-ix/{p-5d6f43fd.entry.js → p-f119c105.entry.js} +2 -2
  131. package/dist/siemens-ix/{p-6445a54f.entry.js → p-fc73c8cc.entry.js} +2 -2
  132. package/dist/siemens-ix/siemens-ix.esm.js +1 -1
  133. package/dist/types/components/time-picker/time-picker.d.ts +2 -1
  134. package/dist/types/components/utils/input/validation.d.ts +1 -0
  135. package/dist/types/components/utils/modal/index.d.ts +1 -1
  136. package/dist/types/components/utils/modal/loading.d.ts +4 -0
  137. package/hydrate/index.js +48 -31
  138. package/hydrate/index.mjs +48 -31
  139. package/package.json +1 -1
  140. package/components/p-DyGPjxFm.js.map +0 -1
  141. package/components/p-kJlC6ZD0.js.map +0 -1
  142. package/components/p-xHo-3QVy.js.map +0 -1
  143. package/dist/siemens-ix/p-3751c675.entry.js +0 -2
  144. package/dist/siemens-ix/p-84df2a86.entry.js.map +0 -1
  145. package/dist/siemens-ix/p-dd16efd4.entry.js +0 -2
  146. package/dist/siemens-ix/p-dd16efd4.entry.js.map +0 -1
  147. package/dist/siemens-ix/p-f05aa76f.entry.js +0 -2
  148. package/dist/siemens-ix/p-f05aa76f.entry.js.map +0 -1
  149. /package/dist/siemens-ix/{p-086d31e7.entry.js.map → p-26c629c3.entry.js.map} +0 -0
  150. /package/dist/siemens-ix/{p-51ae739e.entry.js.map → p-33b3ed5b.entry.js.map} +0 -0
  151. /package/dist/siemens-ix/{p-7f90eeef.entry.js.map → p-4431f891.entry.js.map} +0 -0
  152. /package/dist/siemens-ix/{p-620158aa.entry.js.map → p-4e77d861.entry.js.map} +0 -0
  153. /package/dist/siemens-ix/{p-ebef3d52.entry.js.map → p-79537728.entry.js.map} +0 -0
  154. /package/dist/siemens-ix/{p-3b7573d6.entry.js.map → p-a4225101.entry.js.map} +0 -0
  155. /package/dist/siemens-ix/{p-1c83cb5f.entry.js.map → p-b27a9744.entry.js.map} +0 -0
  156. /package/dist/siemens-ix/{p-3f13b14e.entry.js.map → p-ba9ed3d1.entry.js.map} +0 -0
  157. /package/dist/siemens-ix/{p-10f2a239.entry.js.map → p-c15e64a8.entry.js.map} +0 -0
  158. /package/dist/siemens-ix/{p-7364534a.entry.js.map → p-c43b201b.entry.js.map} +0 -0
  159. /package/dist/siemens-ix/{p-5d6f43fd.entry.js.map → p-f119c105.entry.js.map} +0 -0
  160. /package/dist/siemens-ix/{p-6445a54f.entry.js.map → p-fc73c8cc.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,h as o,H as r,g as i}from"./p-CtoreFVF.js";import{A as n,B as a}from"./p-8HpPmDK_.js";import{H as d}from"./p-CAj3Tlcn.js";import{m as l}from"./p-bcj7UEIC.js";import{o as s,m as h,a as b,b as c,e as u,c as p,I as m,d as v,S as f}from"./p-5iwF1M9X.js";import"./p-Bb7pDeaQ.js";import"./p-CX81WQtk.js";import"./p-pXYAoEyc.js";import"./p-DhE1t8Qh.js";import"./p-C5MWUgDN.js";const x='input{min-height:2rem;width:auto;padding:0.25rem 0.5rem;background-color:var(--theme-input--background);color:var(--theme-input--color);-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;text-overflow:ellipsis;border:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color);border-radius:var(--theme-input--border-radius);box-shadow:var(--theme-input--box-shadow);font-feature-settings:"clig" off, "liga" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-md);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}input[type=number]{text-align:right}input[type=number]::-webkit-inner-spin-button{margin-right:-2px;margin-left:2px;display:none}input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px var(--theme-color-component-info) inset !important;-webkit-text-fill-color:var(--theme-input--color--autofill) !important;background-color:var(--theme-input--background--autofill) !important;border:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;color:var(--theme-input--color--autofill) !important}input:-webkit-autofill,input:autofill{-webkit-box-shadow:0 0 0 1000px var(--theme-color-component-info) inset !important;-webkit-text-fill-color:var(--theme-input--color--autofill) !important;background-color:var(--theme-input--background--autofill) !important;border:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;color:var(--theme-input--color--autofill) !important}input::-moz-placeholder{color:var(--theme-input-hint--color)}input::placeholder{color:var(--theme-input-hint--color)}input.hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only),input:hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only){border-color:var(--theme-input--border-color--hover) !important;background-color:var(--theme-input--background--hover)}input.hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only),input:hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only){border-color:var(--theme-input--border-color--hover) !important;background-color:var(--theme-input--background--hover)}input.focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only),input:focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only){outline:1px solid var(--theme-color-focus-bdr);outline-offset:var(--theme-input--focus--outline-offset);border-color:var(--theme-input--border-color--focus) !important}input.focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only),input:focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only){outline:1px solid var(--theme-color-focus-bdr);outline-offset:var(--theme-input--focus--outline-offset);border-color:var(--theme-input--border-color--focus) !important}input:-moz-read-only{box-shadow:none;background-color:transparent;outline:none;border:none;border-radius:0;border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--readonly)}input.read-only,input:read-only{box-shadow:none;background-color:transparent;outline:none;border:none;border-radius:0;border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--readonly)}input.read-only::-moz-placeholder,input:read-only::-moz-placeholder{color:transparent}input:-moz-read-only::placeholder{color:transparent}input.read-only::placeholder,input:read-only::placeholder{color:transparent}input:disabled,input.disabled{box-shadow:none;background-color:transparent;outline:none;border:none;border-radius:0;color:var(--theme-input--color--disabled);border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--disabled)}input:disabled::-moz-placeholder,input.disabled::-moz-placeholder{color:transparent}input:disabled::placeholder,input.disabled::placeholder{color:transparent}textarea{min-height:2rem;width:auto;padding:0.25rem 0.5rem;background-color:var(--theme-input--background);color:var(--theme-input--color);-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;text-overflow:ellipsis;border:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color);border-radius:var(--theme-input--border-radius);box-shadow:var(--theme-input--box-shadow);font-feature-settings:"clig" off, "liga" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-md);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}textarea[type=number]{text-align:right}textarea[type=number]::-webkit-inner-spin-button{margin-right:-2px;margin-left:2px;display:none}textarea:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px var(--theme-color-component-info) inset !important;-webkit-text-fill-color:var(--theme-input--color--autofill) !important;background-color:var(--theme-input--background--autofill) !important;border:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;color:var(--theme-input--color--autofill) !important}textarea:-webkit-autofill,textarea:autofill{-webkit-box-shadow:0 0 0 1000px var(--theme-color-component-info) inset !important;-webkit-text-fill-color:var(--theme-input--color--autofill) !important;background-color:var(--theme-input--background--autofill) !important;border:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;color:var(--theme-input--color--autofill) !important}textarea::-moz-placeholder{color:var(--theme-input-hint--color)}textarea::placeholder{color:var(--theme-input-hint--color)}textarea.hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only),textarea:hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only){border-color:var(--theme-input--border-color--hover) !important;background-color:var(--theme-input--background--hover)}textarea.hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only),textarea:hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only){border-color:var(--theme-input--border-color--hover) !important;background-color:var(--theme-input--background--hover)}textarea.focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only),textarea:focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only){outline:1px solid var(--theme-color-focus-bdr);outline-offset:var(--theme-input--focus--outline-offset);border-color:var(--theme-input--border-color--focus) !important}textarea.focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only),textarea:focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only){outline:1px solid var(--theme-color-focus-bdr);outline-offset:var(--theme-input--focus--outline-offset);border-color:var(--theme-input--border-color--focus) !important}textarea:-moz-read-only{box-shadow:none;background-color:transparent;outline:none;border:none;border-radius:0;border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--readonly)}textarea.read-only,textarea:read-only{box-shadow:none;background-color:transparent;outline:none;border:none;border-radius:0;border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--readonly)}textarea.read-only::-moz-placeholder,textarea:read-only::-moz-placeholder{color:transparent}textarea:-moz-read-only::placeholder{color:transparent}textarea.read-only::placeholder,textarea:read-only::placeholder{color:transparent}textarea:disabled,textarea.disabled{box-shadow:none;background-color:transparent;outline:none;border:none;border-radius:0;color:var(--theme-input--color--disabled);border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--disabled)}textarea:disabled::-moz-placeholder,textarea.disabled::-moz-placeholder{color:transparent}textarea:disabled::placeholder,textarea.disabled::placeholder{color:transparent}textarea{min-height:2rem;height:3.25rem;padding:calc(0.375rem - var(--theme-input--border-thickness)) calc(0.5rem - var(--theme-input--border-thickness))}textarea.ix-info:not(.disabled):not(:disabled):not([disabled]),input.ix-info:not(.disabled):not(:disabled):not([disabled]){border-color:var(--theme-input--border-color--info)}textarea.ix-info:not(.disabled):not(:disabled):not([disabled]):hover,input.ix-info:not(.disabled):not(:disabled):not([disabled]):hover{border-color:var(--theme-input--border-color--info--hover) !important}textarea.ix-info:not(.disabled):not(:disabled):not([disabled]):active,input.ix-info:not(.disabled):not(:disabled):not([disabled]):active{border-color:var(--theme-input--border-color--info--active) !important}textarea.ix-warning:not(.disabled):not(:disabled):not([disabled]),input.ix-warning:not(.disabled):not(:disabled):not([disabled]){background-color:var(--theme-input--background--warning);border-color:var(--theme-input--border-color--warning--active) !important}textarea.ix-warning:not(.disabled):not(:disabled):not([disabled]):hover,input.ix-warning:not(.disabled):not(:disabled):not([disabled]):hover{background-color:var(--theme-input--background--warning--hover);border-color:var(--theme-input--border-color--warning--hover) !important}textarea.ix-warning:not(.disabled):not(:disabled):not([disabled]):active,input.ix-warning:not(.disabled):not(:disabled):not([disabled]):active{border-color:var(--theme-input--border-color--warning--active) !important}textarea[class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled]),input[class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled]){background-color:var(--theme-input--background--invalid);border-color:var(--theme-input--border-color--invalid) !important}textarea[class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled]):hover,input[class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled]):hover{background-color:var(--theme-input--background--invalid--hover);border-color:var(--theme-input--border-color--invalid--hover) !important}textarea[class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled]):active,input[class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled]):active{border-color:var(--theme-input--border-color--invalid--active) !important}:host{display:inline-block;position:relative;width:auto}: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{}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host{}: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{}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host{}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host .input-wrapper{display:flex;position:relative;align-items:center;width:100%;height:100%}:host input{width:100%;height:100%}:host .start-container,:host .end-container{display:flex;position:absolute;align-items:center;justify-content:center;z-index:1}:host .start-container{left:0}:host .end-container{right:0}:host .start-container ::slotted(*){margin-left:0.5rem}:host .start-container ::slotted(ix-icon.size-24),:host .start-container ::slotted(ix-icon-button.btn-icon-16){margin-left:0.25rem}:host .start-container ::slotted(ix-icon-button.btn-icon-32){margin-left:0}:host .end-container ::slotted(*){margin-right:0.5rem}:host .end-container ::slotted(ix-icon.size-24),:host .end-container ::slotted(ix-icon-button.btn-icon-16){margin-right:0.25rem}:host .end-container ::slotted(ix-icon-button.btn-icon-32){margin-right:0}:host .bottom-text{margin-top:0.25rem;margin-bottom:0.25rem}:host(.disabled){pointer-events:none}:host(.disabled) input,:host(.disabled) textarea{pointer-events:none}:host(.ix-info:not(.disabled):not(:disabled):not([disabled])) input{border-color:var(--theme-input--border-color--info)}:host(.ix-info:not(.disabled):not(:disabled):not([disabled])) input:hover{border-color:var(--theme-input--border-color--info--hover) !important}:host(.ix-info:not(.disabled):not(:disabled):not([disabled])) input:active{border-color:var(--theme-input--border-color--info--active) !important}:host(.ix-warning:not(.disabled):not(:disabled):not([disabled])) input{background-color:var(--theme-input--background--warning);border-color:var(--theme-input--border-color--warning--active) !important}:host(.ix-warning:not(.disabled):not(:disabled):not([disabled])) input:hover{background-color:var(--theme-input--background--warning--hover);border-color:var(--theme-input--border-color--warning--active) !important}:host(.ix-warning:not(.disabled):not(:disabled):not([disabled])) input:active{border-color:var(--theme-input--border-color--warning--active) !important}:host([class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled])) input,:host(.ix-invalid--required:not(.disabled):not(:disabled):not([disabled])) input{background-color:var(--theme-input--background--invalid);border-color:var(--theme-input--border-color--invalid) !important}:host([class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled])) input:hover,:host(.ix-invalid--required:not(.disabled):not(:disabled):not([disabled])) input:hover{background-color:var(--theme-input--background--invalid--hover);border-color:var(--theme-input--border-color--invalid--hover) !important}:host([class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled])) input:active,:host(.ix-invalid--required:not(.disabled):not(:disabled):not([disabled])) input:active{border-color:var(--theme-input--border-color--invalid--active) !important}:host .input-wrapper.show-stepper-buttons input[type=number]{min-width:6rem}:host .number-stepper-container{display:flex;position:relative;flex-direction:row;flex-wrap:nowrap;margin-right:0.25rem}:host .number-stepper-container.container-hidden{display:none}';var g=undefined&&undefined.__decorate||function(e,t,o,r){var i=arguments.length,n=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")n=Reflect.decorate(e,t,o,r);else for(var d=e.length-1;d>=0;d--)if(a=e[d])n=(i<3?a(n):i>3?a(t,o,n):a(t,o))||n;return i>3&&n&&Object.defineProperty(t,o,n),n};let y=0;const k=/[^\dEe+\-.,]/;const w=class{constructor(o){e(this,o);this.valueChange=t(this,"valueChange",7);this.validityStateChange=t(this,"validityStateChange",7);this.ixBlur=t(this,"ixBlur",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.value=0;this.required=false;this.disabled=false;this.readonly=false;this.step=1;this.suppressSubmitOnEnter=false;this.textAlignment="end";this.allowEmptyValueChange=false;this.isInvalid=false;this.isValid=false;this.isInfo=false;this.isWarning=false;this.isInvalidByRequired=false;this.inputRef=l();this.slotEndRef=l();this.slotStartRef=l();this.numberInputId=`number-input-${y++}`;this.touched=false;this.handleInputChange=e=>{const t=this.convertNumberStringToFloat(e);const o=this.isScientificNotation(e.trim());if(o){this.formInternals.setFormValue(e)}this.handleValueChangeEvent(t)};this.handleBlur=()=>{if(!this.inputRef.current)return;const e=this.inputRef.current.value;const t=this.convertNumberStringToFloat(e);if(t!==undefined){this.inputRef.current.value=this.formatValue(t)}this.updateFormInternalValue(t);s(this,this.inputRef.current);this.touched=true};this.handleKeyDown=e=>{if(this.disabled||this.readonly){return}switch(e.key){case"ArrowUp":e.preventDefault();this.handleStepOperation("up");break;case"ArrowDown":e.preventDefault();this.handleStepOperation("down");break}};this.handleBeforeInput=e=>{var t,o;if(this.disabled||this.readonly)return;if(e.inputType==="insertText"){const t=e.data;if(t&&k.test(t)){e.preventDefault()}}if(e.inputType==="insertFromPaste"){const r=e.dataTransfer||e.clipboardData;const i=(o=(t=r===null||r===void 0?void 0:r.getData)===null||t===void 0?void 0:t.call(r,"text"))!==null&&o!==void 0?o:"";if(k.test(i)){e.preventDefault()}}};this.handlePaste=e=>{var t,o;const r=(o=(t=e.clipboardData)===null||t===void 0?void 0:t.getData("text"))!==null&&o!==void 0?o:"";if(k.test(r)){e.preventDefault()}}}onValueChange(e){this.updateFormInternalValue(e)}updateClassMappings(e){h(this,e)}componentWillLoad(){this.updateFormInternalValue(this.value)}connectedCallback(){this.disposableChangesAndVisibilityObservers=b(this.hostElement,this.updatePaddings.bind(this))}disconnectedCallback(){var e;(e=this.disposableChangesAndVisibilityObservers)===null||e===void 0?void 0:e.call(this)}updatePaddings(){c(this.slotStartRef.current,this.slotEndRef.current,this.inputRef.current)}convertNumberStringToFloat(e){if(!e||e.trim()===""){return undefined}const t=Number.parseFloat(e);return Number.isNaN(t)?undefined:t}isScientificNotation(e){const t=Number.parseFloat(e);return!Number.isNaN(t)&&Number.isFinite(t)&&/[eE]/.test(e)}formatValue(e){if(e===undefined||e===null){return""}return e.toString()}handleValueChangeEvent(e){this.valueChange.emit(this.allowEmptyValueChange?e:e!==null&&e!==void 0?e:0)}updateFormInternalValue(e){const t=e!==undefined&&e!==null?e.toString():"";this.formInternals.setFormValue(t);this.value=e}handleStepOperation(e){var t,o;if(!this.inputRef.current){return}const r=(t=this.value)!==null&&t!==void 0?t:0;const i=typeof this.step==="string"?Number.parseFloat(this.step):(o=this.step)!==null&&o!==void 0?o:1;let n;if(e==="up"){n=r+i}else{n=r-i}if(this.min!==undefined){const e=typeof this.min==="string"?Number.parseFloat(this.min):this.min;n=Math.max(n,e)}if(this.max!==undefined){const e=typeof this.max==="string"?Number.parseFloat(this.max):this.max;n=Math.min(n,e)}this.inputRef.current.value=n.toString();this.updateFormInternalValue(n);u(this,this.inputRef.current);this.handleValueChangeEvent(n)}async getAssociatedFormElement(){return this.formInternals.form}async hasValidValue(){const e=await this.getNativeInputElement();if(e.value===""){return!this.required}const t=this.convertNumberStringToFloat(e.value);return t!==undefined}getNativeInputElement(){return this.inputRef.waitForCurrent()}async focusInput(){return(await this.getNativeInputElement()).focus()}isTouched(){return Promise.resolve(this.touched)}render(){var e;const t=this.showStepperButtons&&(this.disabled||this.readonly)===false;return o(r,{key:"4b541dbe6fe2b32b5158eed8f398de300ea71bb4",class:{disabled:this.disabled,readonly:this.readonly}},o("ix-field-wrapper",{key:"7ef2bb50ba7c9b3b24612752155a2072329e4b61",id:this.numberInputId,required:this.required,label:this.label,helperText:this.helperText,invalidText:this.invalidText,infoText:this.infoText,warningText:this.warningText,validText:this.validText,showTextAsTooltip:this.showTextAsTooltip,isInvalid:this.isInvalid,isValid:this.isValid,isInfo:this.isInfo,isWarning:this.isWarning,controlRef:this.inputRef},o("div",{key:"7e71d63d2a9ecbb16550925e68f3dc8dd76c3968",class:{"input-wrapper":true,"show-stepper-buttons":!!this.showStepperButtons}},o(p,{key:"8d936c9126f94c42db87b2d95d34ab178eadd31d",slotStartRef:this.slotStartRef,onSlotChange:()=>this.updatePaddings()}),o(m,{key:"c56f510ea8a519204d3d36136d4b0a5a17246370",id:this.numberInputId,readonly:this.readonly,disabled:this.disabled,step:this.step,min:this.min,max:this.max,pattern:this.pattern,type:"number",isInvalid:this.isInvalid,required:this.required,value:this.formatValue(this.value),placeholder:this.placeholder,inputRef:this.inputRef,onKeyPress:e=>v(this,e),onKeyDown:e=>this.handleKeyDown(e),onBeforeInput:e=>this.handleBeforeInput(e),onPaste:e=>this.handlePaste(e),valueChange:this.handleInputChange,updateFormInternalValue:e=>{const t=this.isScientificNotation(e.trim());if(!t){const t=this.convertNumberStringToFloat(e);this.updateFormInternalValue(t)}},onBlur:this.handleBlur,form:(e=this.formInternals.form)!==null&&e!==void 0?e:undefined,suppressSubmitOnEnter:this.suppressSubmitOnEnter,textAlignment:this.textAlignment}),o(f,{key:"2d7e82c421d51985c9d24c69b6f641279e3e84aa",slotEndRef:this.slotEndRef,onSlotChange:()=>this.updatePaddings()},o("div",{key:"5b1e6f03bf456305386537428b23b3fc2706e411",class:{"number-stepper-container":true,"container-hidden":!t}},o("ix-icon-button",{key:"44a5f583fb174c556a063f384174883ec307f9f4",variant:"subtle-tertiary",icon:n,size:"16",class:"number-stepper-button step-minus","aria-label":"decrement number",onClick:()=>this.handleStepOperation("down")}),o("ix-icon-button",{key:"c007fe5451c3f124e61214160c7ebc8cc1150b25",variant:"subtle-tertiary",icon:a,size:"16",class:"number-stepper-button step-plus","aria-label":"increment number",onClick:()=>this.handleStepOperation("up")}))))))}static get formAssociated(){return true}get hostElement(){return i(this)}static get watchers(){return{value:["onValueChange"]}}};g([d()],w.prototype,"updateClassMappings",null);w.style=x;export{w as ix_number_input};
2
- //# sourceMappingURL=p-51ae739e.entry.js.map
1
+ import{r as e,c as t,h as o,H as r,g as i}from"./p-CtoreFVF.js";import{A as n,B as a}from"./p-8HpPmDK_.js";import{H as d}from"./p-C7nQNUsO.js";import{m as l}from"./p-bcj7UEIC.js";import{o as s,m as h,a as b,b as c,e as u,c as p,I as m,d as v,S as f}from"./p-DaswuiGO.js";import"./p-Bb7pDeaQ.js";import"./p-CX81WQtk.js";import"./p-pXYAoEyc.js";import"./p-DhE1t8Qh.js";import"./p-C5MWUgDN.js";const x='input{min-height:2rem;width:auto;padding:0.25rem 0.5rem;background-color:var(--theme-input--background);color:var(--theme-input--color);-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;text-overflow:ellipsis;border:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color);border-radius:var(--theme-input--border-radius);box-shadow:var(--theme-input--box-shadow);font-feature-settings:"clig" off, "liga" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-md);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}input[type=number]{text-align:right}input[type=number]::-webkit-inner-spin-button{margin-right:-2px;margin-left:2px;display:none}input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px var(--theme-color-component-info) inset !important;-webkit-text-fill-color:var(--theme-input--color--autofill) !important;background-color:var(--theme-input--background--autofill) !important;border:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;color:var(--theme-input--color--autofill) !important}input:-webkit-autofill,input:autofill{-webkit-box-shadow:0 0 0 1000px var(--theme-color-component-info) inset !important;-webkit-text-fill-color:var(--theme-input--color--autofill) !important;background-color:var(--theme-input--background--autofill) !important;border:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;color:var(--theme-input--color--autofill) !important}input::-moz-placeholder{color:var(--theme-input-hint--color)}input::placeholder{color:var(--theme-input-hint--color)}input.hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only),input:hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only){border-color:var(--theme-input--border-color--hover) !important;background-color:var(--theme-input--background--hover)}input.hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only),input:hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only){border-color:var(--theme-input--border-color--hover) !important;background-color:var(--theme-input--background--hover)}input.focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only),input:focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only){outline:1px solid var(--theme-color-focus-bdr);outline-offset:var(--theme-input--focus--outline-offset);border-color:var(--theme-input--border-color--focus) !important}input.focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only),input:focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only){outline:1px solid var(--theme-color-focus-bdr);outline-offset:var(--theme-input--focus--outline-offset);border-color:var(--theme-input--border-color--focus) !important}input:-moz-read-only{box-shadow:none;background-color:transparent;outline:none;border:none;border-radius:0;border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--readonly)}input.read-only,input:read-only{box-shadow:none;background-color:transparent;outline:none;border:none;border-radius:0;border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--readonly)}input.read-only::-moz-placeholder,input:read-only::-moz-placeholder{color:transparent}input:-moz-read-only::placeholder{color:transparent}input.read-only::placeholder,input:read-only::placeholder{color:transparent}input:disabled,input.disabled{box-shadow:none;background-color:transparent;outline:none;border:none;border-radius:0;color:var(--theme-input--color--disabled);border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--disabled)}input:disabled::-moz-placeholder,input.disabled::-moz-placeholder{color:transparent}input:disabled::placeholder,input.disabled::placeholder{color:transparent}textarea{min-height:2rem;width:auto;padding:0.25rem 0.5rem;background-color:var(--theme-input--background);color:var(--theme-input--color);-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;text-overflow:ellipsis;border:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color);border-radius:var(--theme-input--border-radius);box-shadow:var(--theme-input--box-shadow);font-feature-settings:"clig" off, "liga" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-md);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}textarea[type=number]{text-align:right}textarea[type=number]::-webkit-inner-spin-button{margin-right:-2px;margin-left:2px;display:none}textarea:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px var(--theme-color-component-info) inset !important;-webkit-text-fill-color:var(--theme-input--color--autofill) !important;background-color:var(--theme-input--background--autofill) !important;border:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;color:var(--theme-input--color--autofill) !important}textarea:-webkit-autofill,textarea:autofill{-webkit-box-shadow:0 0 0 1000px var(--theme-color-component-info) inset !important;-webkit-text-fill-color:var(--theme-input--color--autofill) !important;background-color:var(--theme-input--background--autofill) !important;border:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;color:var(--theme-input--color--autofill) !important}textarea::-moz-placeholder{color:var(--theme-input-hint--color)}textarea::placeholder{color:var(--theme-input-hint--color)}textarea.hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only),textarea:hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only){border-color:var(--theme-input--border-color--hover) !important;background-color:var(--theme-input--background--hover)}textarea.hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only),textarea:hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only){border-color:var(--theme-input--border-color--hover) !important;background-color:var(--theme-input--background--hover)}textarea.focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only),textarea:focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only){outline:1px solid var(--theme-color-focus-bdr);outline-offset:var(--theme-input--focus--outline-offset);border-color:var(--theme-input--border-color--focus) !important}textarea.focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only),textarea:focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only){outline:1px solid var(--theme-color-focus-bdr);outline-offset:var(--theme-input--focus--outline-offset);border-color:var(--theme-input--border-color--focus) !important}textarea:-moz-read-only{box-shadow:none;background-color:transparent;outline:none;border:none;border-radius:0;border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--readonly)}textarea.read-only,textarea:read-only{box-shadow:none;background-color:transparent;outline:none;border:none;border-radius:0;border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--readonly)}textarea.read-only::-moz-placeholder,textarea:read-only::-moz-placeholder{color:transparent}textarea:-moz-read-only::placeholder{color:transparent}textarea.read-only::placeholder,textarea:read-only::placeholder{color:transparent}textarea:disabled,textarea.disabled{box-shadow:none;background-color:transparent;outline:none;border:none;border-radius:0;color:var(--theme-input--color--disabled);border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--disabled)}textarea:disabled::-moz-placeholder,textarea.disabled::-moz-placeholder{color:transparent}textarea:disabled::placeholder,textarea.disabled::placeholder{color:transparent}textarea{min-height:2rem;height:3.25rem;padding:calc(0.375rem - var(--theme-input--border-thickness)) calc(0.5rem - var(--theme-input--border-thickness))}textarea.ix-info:not(.disabled):not(:disabled):not([disabled]),input.ix-info:not(.disabled):not(:disabled):not([disabled]){border-color:var(--theme-input--border-color--info)}textarea.ix-info:not(.disabled):not(:disabled):not([disabled]):hover,input.ix-info:not(.disabled):not(:disabled):not([disabled]):hover{border-color:var(--theme-input--border-color--info--hover) !important}textarea.ix-info:not(.disabled):not(:disabled):not([disabled]):active,input.ix-info:not(.disabled):not(:disabled):not([disabled]):active{border-color:var(--theme-input--border-color--info--active) !important}textarea.ix-warning:not(.disabled):not(:disabled):not([disabled]),input.ix-warning:not(.disabled):not(:disabled):not([disabled]){background-color:var(--theme-input--background--warning);border-color:var(--theme-input--border-color--warning--active) !important}textarea.ix-warning:not(.disabled):not(:disabled):not([disabled]):hover,input.ix-warning:not(.disabled):not(:disabled):not([disabled]):hover{background-color:var(--theme-input--background--warning--hover);border-color:var(--theme-input--border-color--warning--hover) !important}textarea.ix-warning:not(.disabled):not(:disabled):not([disabled]):active,input.ix-warning:not(.disabled):not(:disabled):not([disabled]):active{border-color:var(--theme-input--border-color--warning--active) !important}textarea[class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled]),input[class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled]){background-color:var(--theme-input--background--invalid);border-color:var(--theme-input--border-color--invalid) !important}textarea[class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled]):hover,input[class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled]):hover{background-color:var(--theme-input--background--invalid--hover);border-color:var(--theme-input--border-color--invalid--hover) !important}textarea[class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled]):active,input[class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled]):active{border-color:var(--theme-input--border-color--invalid--active) !important}:host{display:inline-block;position:relative;width:auto}: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{}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host{}: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{}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host{}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host .input-wrapper{display:flex;position:relative;align-items:center;width:100%;height:100%}:host input{width:100%;height:100%}:host .start-container,:host .end-container{display:flex;position:absolute;align-items:center;justify-content:center;z-index:1}:host .start-container{left:0}:host .end-container{right:0}:host .start-container ::slotted(*){margin-left:0.5rem}:host .start-container ::slotted(ix-icon.size-24),:host .start-container ::slotted(ix-icon-button.btn-icon-16){margin-left:0.25rem}:host .start-container ::slotted(ix-icon-button.btn-icon-32){margin-left:0}:host .end-container ::slotted(*){margin-right:0.5rem}:host .end-container ::slotted(ix-icon.size-24),:host .end-container ::slotted(ix-icon-button.btn-icon-16){margin-right:0.25rem}:host .end-container ::slotted(ix-icon-button.btn-icon-32){margin-right:0}:host .bottom-text{margin-top:0.25rem;margin-bottom:0.25rem}:host(.disabled){pointer-events:none}:host(.disabled) input,:host(.disabled) textarea{pointer-events:none}:host(.ix-info:not(.disabled):not(:disabled):not([disabled])) input{border-color:var(--theme-input--border-color--info)}:host(.ix-info:not(.disabled):not(:disabled):not([disabled])) input:hover{border-color:var(--theme-input--border-color--info--hover) !important}:host(.ix-info:not(.disabled):not(:disabled):not([disabled])) input:active{border-color:var(--theme-input--border-color--info--active) !important}:host(.ix-warning:not(.disabled):not(:disabled):not([disabled])) input{background-color:var(--theme-input--background--warning);border-color:var(--theme-input--border-color--warning--active) !important}:host(.ix-warning:not(.disabled):not(:disabled):not([disabled])) input:hover{background-color:var(--theme-input--background--warning--hover);border-color:var(--theme-input--border-color--warning--active) !important}:host(.ix-warning:not(.disabled):not(:disabled):not([disabled])) input:active{border-color:var(--theme-input--border-color--warning--active) !important}:host([class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled])) input,:host(.ix-invalid--required:not(.disabled):not(:disabled):not([disabled])) input{background-color:var(--theme-input--background--invalid);border-color:var(--theme-input--border-color--invalid) !important}:host([class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled])) input:hover,:host(.ix-invalid--required:not(.disabled):not(:disabled):not([disabled])) input:hover{background-color:var(--theme-input--background--invalid--hover);border-color:var(--theme-input--border-color--invalid--hover) !important}:host([class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled])) input:active,:host(.ix-invalid--required:not(.disabled):not(:disabled):not([disabled])) input:active{border-color:var(--theme-input--border-color--invalid--active) !important}:host .input-wrapper.show-stepper-buttons input[type=number]{min-width:6rem}:host .number-stepper-container{display:flex;position:relative;flex-direction:row;flex-wrap:nowrap;margin-right:0.25rem}:host .number-stepper-container.container-hidden{display:none}';var g=undefined&&undefined.__decorate||function(e,t,o,r){var i=arguments.length,n=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,o):r,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")n=Reflect.decorate(e,t,o,r);else for(var d=e.length-1;d>=0;d--)if(a=e[d])n=(i<3?a(n):i>3?a(t,o,n):a(t,o))||n;return i>3&&n&&Object.defineProperty(t,o,n),n};let y=0;const k=/[^\dEe+\-.,]/;const w=class{constructor(o){e(this,o);this.valueChange=t(this,"valueChange",7);this.validityStateChange=t(this,"validityStateChange",7);this.ixBlur=t(this,"ixBlur",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.value=0;this.required=false;this.disabled=false;this.readonly=false;this.step=1;this.suppressSubmitOnEnter=false;this.textAlignment="end";this.allowEmptyValueChange=false;this.isInvalid=false;this.isValid=false;this.isInfo=false;this.isWarning=false;this.isInvalidByRequired=false;this.inputRef=l();this.slotEndRef=l();this.slotStartRef=l();this.numberInputId=`number-input-${y++}`;this.touched=false;this.handleInputChange=e=>{const t=this.convertNumberStringToFloat(e);const o=this.isScientificNotation(e.trim());if(o){this.formInternals.setFormValue(e)}this.handleValueChangeEvent(t)};this.handleBlur=()=>{if(!this.inputRef.current)return;const e=this.inputRef.current.value;const t=this.convertNumberStringToFloat(e);if(t!==undefined){this.inputRef.current.value=this.formatValue(t)}this.updateFormInternalValue(t);s(this,this.inputRef.current);this.touched=true};this.handleKeyDown=e=>{if(this.disabled||this.readonly){return}switch(e.key){case"ArrowUp":e.preventDefault();this.handleStepOperation("up");break;case"ArrowDown":e.preventDefault();this.handleStepOperation("down");break}};this.handleBeforeInput=e=>{var t,o;if(this.disabled||this.readonly)return;if(e.inputType==="insertText"){const t=e.data;if(t&&k.test(t)){e.preventDefault()}}if(e.inputType==="insertFromPaste"){const r=e.dataTransfer||e.clipboardData;const i=(o=(t=r===null||r===void 0?void 0:r.getData)===null||t===void 0?void 0:t.call(r,"text"))!==null&&o!==void 0?o:"";if(k.test(i)){e.preventDefault()}}};this.handlePaste=e=>{var t,o;const r=(o=(t=e.clipboardData)===null||t===void 0?void 0:t.getData("text"))!==null&&o!==void 0?o:"";if(k.test(r)){e.preventDefault()}}}onValueChange(e){this.updateFormInternalValue(e)}updateClassMappings(e){h(this,e)}componentWillLoad(){this.updateFormInternalValue(this.value)}connectedCallback(){this.disposableChangesAndVisibilityObservers=b(this.hostElement,this.updatePaddings.bind(this))}disconnectedCallback(){var e;(e=this.disposableChangesAndVisibilityObservers)===null||e===void 0?void 0:e.call(this)}updatePaddings(){c(this.slotStartRef.current,this.slotEndRef.current,this.inputRef.current)}convertNumberStringToFloat(e){if(!e||e.trim()===""){return undefined}const t=Number.parseFloat(e);return Number.isNaN(t)?undefined:t}isScientificNotation(e){const t=Number.parseFloat(e);return!Number.isNaN(t)&&Number.isFinite(t)&&/[eE]/.test(e)}formatValue(e){if(e===undefined||e===null){return""}return e.toString()}handleValueChangeEvent(e){this.valueChange.emit(this.allowEmptyValueChange?e:e!==null&&e!==void 0?e:0)}updateFormInternalValue(e){const t=e!==undefined&&e!==null?e.toString():"";this.formInternals.setFormValue(t);this.value=e}handleStepOperation(e){var t,o;if(!this.inputRef.current){return}const r=(t=this.value)!==null&&t!==void 0?t:0;const i=typeof this.step==="string"?Number.parseFloat(this.step):(o=this.step)!==null&&o!==void 0?o:1;let n;if(e==="up"){n=r+i}else{n=r-i}if(this.min!==undefined){const e=typeof this.min==="string"?Number.parseFloat(this.min):this.min;n=Math.max(n,e)}if(this.max!==undefined){const e=typeof this.max==="string"?Number.parseFloat(this.max):this.max;n=Math.min(n,e)}this.inputRef.current.value=n.toString();this.updateFormInternalValue(n);u(this,this.inputRef.current);this.handleValueChangeEvent(n)}async getAssociatedFormElement(){return this.formInternals.form}async hasValidValue(){const e=await this.getNativeInputElement();if(e.value===""){return!this.required}const t=this.convertNumberStringToFloat(e.value);return t!==undefined}getNativeInputElement(){return this.inputRef.waitForCurrent()}async focusInput(){return(await this.getNativeInputElement()).focus()}isTouched(){return Promise.resolve(this.touched)}render(){var e;const t=this.showStepperButtons&&(this.disabled||this.readonly)===false;return o(r,{key:"4b541dbe6fe2b32b5158eed8f398de300ea71bb4",class:{disabled:this.disabled,readonly:this.readonly}},o("ix-field-wrapper",{key:"7ef2bb50ba7c9b3b24612752155a2072329e4b61",id:this.numberInputId,required:this.required,label:this.label,helperText:this.helperText,invalidText:this.invalidText,infoText:this.infoText,warningText:this.warningText,validText:this.validText,showTextAsTooltip:this.showTextAsTooltip,isInvalid:this.isInvalid,isValid:this.isValid,isInfo:this.isInfo,isWarning:this.isWarning,controlRef:this.inputRef},o("div",{key:"7e71d63d2a9ecbb16550925e68f3dc8dd76c3968",class:{"input-wrapper":true,"show-stepper-buttons":!!this.showStepperButtons}},o(p,{key:"8d936c9126f94c42db87b2d95d34ab178eadd31d",slotStartRef:this.slotStartRef,onSlotChange:()=>this.updatePaddings()}),o(m,{key:"c56f510ea8a519204d3d36136d4b0a5a17246370",id:this.numberInputId,readonly:this.readonly,disabled:this.disabled,step:this.step,min:this.min,max:this.max,pattern:this.pattern,type:"number",isInvalid:this.isInvalid,required:this.required,value:this.formatValue(this.value),placeholder:this.placeholder,inputRef:this.inputRef,onKeyPress:e=>v(this,e),onKeyDown:e=>this.handleKeyDown(e),onBeforeInput:e=>this.handleBeforeInput(e),onPaste:e=>this.handlePaste(e),valueChange:this.handleInputChange,updateFormInternalValue:e=>{const t=this.isScientificNotation(e.trim());if(!t){const t=this.convertNumberStringToFloat(e);this.updateFormInternalValue(t)}},onBlur:this.handleBlur,form:(e=this.formInternals.form)!==null&&e!==void 0?e:undefined,suppressSubmitOnEnter:this.suppressSubmitOnEnter,textAlignment:this.textAlignment}),o(f,{key:"2d7e82c421d51985c9d24c69b6f641279e3e84aa",slotEndRef:this.slotEndRef,onSlotChange:()=>this.updatePaddings()},o("div",{key:"5b1e6f03bf456305386537428b23b3fc2706e411",class:{"number-stepper-container":true,"container-hidden":!t}},o("ix-icon-button",{key:"44a5f583fb174c556a063f384174883ec307f9f4",variant:"subtle-tertiary",icon:n,size:"16",class:"number-stepper-button step-minus","aria-label":"decrement number",onClick:()=>this.handleStepOperation("down")}),o("ix-icon-button",{key:"c007fe5451c3f124e61214160c7ebc8cc1150b25",variant:"subtle-tertiary",icon:a,size:"16",class:"number-stepper-button step-plus","aria-label":"increment number",onClick:()=>this.handleStepOperation("up")}))))))}static get formAssociated(){return true}get hostElement(){return i(this)}static get watchers(){return{value:["onValueChange"]}}};g([d()],w.prototype,"updateClassMappings",null);w.style=x;export{w as ix_number_input};
2
+ //# sourceMappingURL=p-33b3ed5b.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,c as o,h as r,H as t,g as h}from"./p-CtoreFVF.js";import{a as i}from"./p-Bb7pDeaQ.js";import{H as c}from"./p-CAj3Tlcn.js";const n=':host{display:inline-flex;flex-direction:row;position:relative;min-height:1.5rem;max-height:calc(100% - 0.5rem);margin-block-start:0.25rem;margin-block-end:0.25rem}: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{}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host{}: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{}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host{}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host input[type=checkbox]{display:none}:host .wrapper{display:flex;align-items:flex-start;width:100%;max-height:100%}:host .label{word-break:break-word;display:block;white-space:normal;overflow:hidden;margin-block-start:0.125rem;margin-inline-start:0.5rem;min-height:1rem}:host .switch{all:unset;position:relative;display:inline-block;width:3rem;min-width:3rem;max-width:3rem;height:1.5rem}:host .slider{position:absolute;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:0.0625rem solid transparent}:host .slider:before{position:absolute;content:"";height:1.125rem;width:1.125rem;left:0.125rem;bottom:0.125rem;background-color:var(--theme-switch-thumb-off--background);transition:var(--theme-default-time);border-radius:50%;border:1px solid var(--theme-switch-thumb-off--border-color)}:host .switch.checked>.slider::before{background-color:var(--theme-switch-thumb-on--background);transform:translateX(1.5rem)}:host .switch>.slider{border-color:var(--theme-switch-off--border-color)}:host .switch:hover>.slider{background-color:var(--theme-switch-off--background--hover);border-color:var(--theme-switch-off--border-color--hover)}:host .switch:hover>.slider:before{background-color:var(--theme-switch-thumb-off--background--hover);border:1px solid var(--theme-switch-thumb-off--border-color--hover)}:host .switch:active>.slider{background-color:var(--theme-switch-off--background--active);border-color:var(--theme-switch-off--border-color--active)}:host .switch:active>.slider:before{background-color:var(--theme-switch-thumb-off--background--active);border:1px solid var(--theme-switch-thumb-off--border-color--active)}:host .switch.checked>.slider{background-color:var(--theme-switch-on--background);border-color:var(--theme-switch-on--border-color)}:host .switch.checked>.slider:before{border:1px solid var(--theme-switch-thumb-on--border-color)}:host .switch.checked:hover>.slider{background-color:var(--theme-switch-on--background--hover);border-color:var(--theme-switch-on--border-color--hover)}:host .switch.checked:hover>.slider:before{background-color:var(--theme-switch-thumb-on--background--hover);border:1px solid var(--theme-switch-thumb-on--border-color--hover)}:host .switch.checked:active>.slider{background-color:var(--theme-switch-on--background--active);border-color:var(--theme-switch-on--border-color--active)}:host .switch.checked:active>.slider:before{background-color:var(--theme-switch-thumb-on--background--active);border:1px solid var(--theme-switch-thumb-on--border-color--active)}:host .switch.indeterminate>.slider::before{transform:translateX(0.75rem)}:host(:not(.disabled)) .wrapper{cursor:pointer}:host(:not(.disabled)) .switch:focus-visible>.slider{outline:0.0625rem solid var(--theme-color-focus-bdr);outline-offset:0.0625rem}:host(.disabled){pointer-events:none}:host(.disabled) .switch{opacity:0.5}:host(.disabled) .switch>.slider{background-color:var(--theme-switch-off--background--disabled)}:host(.disabled) .switch>.slider:before{background-color:var(--theme-switch-thumb-off--background--disabled)}:host(.disabled) .switch.checked>.slider{background-color:var(--theme-switch-on--background--disabled)}:host(.disabled) .switch.checked>.slider:before{background-color:var(--theme-switch-thumb-on--background--disabled)}:host(.disabled) .label{color:var(--theme-color-weak-text)}:host(.ix-valid:not(.disabled)) .slider{--theme-switch-off--background:var(\n --theme-switch-off--background--valid\n );--theme-switch-off--background--hover:var(\n --theme-switch-off--background--valid--hover\n );--theme-switch-off--background--active:var(\n --theme-switch-off--background--valid--active\n );--theme-switch-thumb-off--border-color:var(\n --theme-switch-thumb-off--border-color--valid\n );--theme-switch-thumb-off--border-color--hover:var(\n --theme-switch-thumb-off--border-color--valid--hover\n );--theme-switch-thumb-off--border-color--active:var(\n --theme-switch-thumb-off--border-color--valid--active\n );--theme-switch-thumb-off--background:var(\n --theme-switch-thumb-off--background--valid\n );--theme-switch-thumb-off--background--hover:var(\n --theme-switch-thumb-off--background--valid--hover\n );--theme-switch-thumb-off--background--active:var(\n --theme-switch-thumb-off--background--valid--active\n );--theme-switch-off--border-color:var(\n --theme-switch-off--border-color--valid\n );--theme-switch-off--border-color--hover:var(\n --theme-switch-off--border-color--valid--hover\n );--theme-switch-off--border-color--active:var(\n --theme-switch-off--border-color--valid--active\n );--theme-switch-on--background:var(\n --theme-switch-on--background--valid\n );--theme-switch-on--background--hover:var(\n --theme-switch-on--background--valid--hover\n );--theme-switch-on--background--active:var(\n --theme-switch-on--background--valid--active\n );--theme-switch-thumb-on--border-color:var(\n --theme-switch-thumb-on--border-color--valid\n );--theme-switch-thumb-on--border-color--hover:var(\n --theme-switch-thumb-on--border-color--valid--hover\n );--theme-switch-thumb-on--border-color--active:var(\n --theme-switch-thumb-on--border-color--valid--active\n );--theme-switch-thumb-on--background:var(\n --theme-switch-thumb-on--background--valid\n );--theme-switch-thumb-on--background--hover:var(\n --theme-switch-thumb-on--background--valid--hover\n );--theme-switch-thumb-on--background--active:var(\n --theme-switch-thumb-on--background--valid--active\n );--theme-switch-on--border-color:var(\n --theme-switch-on--border-color--valid\n );--theme-switch-on--border-color--hover:var(\n --theme-switch-on--border-color--valid--hover\n );--theme-switch-on--border-color--active:var(\n --theme-switch-on--border-color--valid--active\n );--theme-switch-mixed--background:var(\n --theme-switch-mixed--background--valid\n );--theme-switch-mixed--background--hover:var(\n --theme-switch-mixed--background--valid--hover\n );--theme-switch-mixed--background--active:var(\n --theme-switch-mixed--background--valid--active\n );--theme-switch-thumb-mixed--border-color:var(\n --theme-switch-thumb-mixed--border-color--valid\n );--theme-switch-thumb-mixed--border-color--hover:var(\n --theme-switch-thumb-mixed--border-color--valid--hover\n );--theme-switch-thumb-mixed--border-color--active:var(\n --theme-switch-thumb-mixed--border-color--valid--active\n );--theme-switch-thumb-mixed--background:var(\n --theme-switch-thumb-mixed--background--valid\n );--theme-switch-thumb-mixed--background--hover:var(\n --theme-switch-thumb-mixed--background--valid--hover\n );--theme-switch-thumb-mixed--background--active:var(\n --theme-switch-thumb-mixed--background--valid--active\n );--theme-switch-mixed--border-color:var(\n --theme-switch-mixed--border-color--valid\n );--theme-switch-mixed--border-color--hover:var(\n --theme-switch-mixed--border-color--valid--hover\n );--theme-switch-mixed--border-color--active:var(\n --theme-switch-mixed--border-color--valid--active\n )}:host(.ix-info:not(.disabled)) .slider{--theme-switch-off--background:var(\n --theme-switch-off--background--info\n );--theme-switch-off--background--hover:var(\n --theme-switch-off--background--info--hover\n );--theme-switch-off--background--active:var(\n --theme-switch-off--background--info--active\n );--theme-switch-thumb-off--border-color:var(\n --theme-switch-thumb-off--border-color--info\n );--theme-switch-thumb-off--border-color--hover:var(\n --theme-switch-thumb-off--border-color--info--hover\n );--theme-switch-thumb-off--border-color--active:var(\n --theme-switch-thumb-off--border-color--info--active\n );--theme-switch-thumb-off--background:var(\n --theme-switch-thumb-off--background--info\n );--theme-switch-thumb-off--background--hover:var(\n --theme-switch-thumb-off--background--info--hover\n );--theme-switch-thumb-off--background--active:var(\n --theme-switch-thumb-off--background--info--active\n );--theme-switch-off--border-color:var(\n --theme-switch-off--border-color--info\n );--theme-switch-off--border-color--hover:var(\n --theme-switch-off--border-color--info--hover\n );--theme-switch-off--border-color--active:var(\n --theme-switch-off--border-color--info--active\n );--theme-switch-on--background:var(\n --theme-switch-on--background--info\n );--theme-switch-on--background--hover:var(\n --theme-switch-on--background--info--hover\n );--theme-switch-on--background--active:var(\n --theme-switch-on--background--info--active\n );--theme-switch-thumb-on--border-color:var(\n --theme-switch-thumb-on--border-color--info\n );--theme-switch-thumb-on--border-color--hover:var(\n --theme-switch-thumb-on--border-color--info--hover\n );--theme-switch-thumb-on--border-color--active:var(\n --theme-switch-thumb-on--border-color--info--active\n );--theme-switch-thumb-on--background:var(\n --theme-switch-thumb-on--background--info\n );--theme-switch-thumb-on--background--hover:var(\n --theme-switch-thumb-on--background--info--hover\n );--theme-switch-thumb-on--background--active:var(\n --theme-switch-thumb-on--background--info--active\n );--theme-switch-on--border-color:var(\n --theme-switch-on--border-color--info\n );--theme-switch-on--border-color--hover:var(\n --theme-switch-on--border-color--info--hover\n );--theme-switch-on--border-color--active:var(\n --theme-switch-on--border-color--info--active\n );--theme-switch-mixed--background:var(\n --theme-switch-mixed--background--info\n );--theme-switch-mixed--background--hover:var(\n --theme-switch-mixed--background--info--hover\n );--theme-switch-mixed--background--active:var(\n --theme-switch-mixed--background--info--active\n );--theme-switch-thumb-mixed--border-color:var(\n --theme-switch-thumb-mixed--border-color--info\n );--theme-switch-thumb-mixed--border-color--hover:var(\n --theme-switch-thumb-mixed--border-color--info--hover\n );--theme-switch-thumb-mixed--border-color--active:var(\n --theme-switch-thumb-mixed--border-color--info--active\n );--theme-switch-thumb-mixed--background:var(\n --theme-switch-thumb-mixed--background--info\n );--theme-switch-thumb-mixed--background--hover:var(\n --theme-switch-thumb-mixed--background--info--hover\n );--theme-switch-thumb-mixed--background--active:var(\n --theme-switch-thumb-mixed--background--info--active\n );--theme-switch-mixed--border-color:var(\n --theme-switch-mixed--border-color--info\n );--theme-switch-mixed--border-color--hover:var(\n --theme-switch-mixed--border-color--info--hover\n );--theme-switch-mixed--border-color--active:var(\n --theme-switch-mixed--border-color--info--active\n )}:host(.ix-warning:not(.disabled)) .slider{--theme-switch-off--background:var(\n --theme-switch-off--background--warning\n );--theme-switch-off--background--hover:var(\n --theme-switch-off--background--warning--hover\n );--theme-switch-off--background--active:var(\n --theme-switch-off--background--warning--active\n );--theme-switch-thumb-off--border-color:var(\n --theme-switch-thumb-off--border-color--warning\n );--theme-switch-thumb-off--border-color--hover:var(\n --theme-switch-thumb-off--border-color--warning--hover\n );--theme-switch-thumb-off--border-color--active:var(\n --theme-switch-thumb-off--border-color--warning--active\n );--theme-switch-thumb-off--background:var(\n --theme-switch-thumb-off--background--warning\n );--theme-switch-thumb-off--background--hover:var(\n --theme-switch-thumb-off--background--warning--hover\n );--theme-switch-thumb-off--background--active:var(\n --theme-switch-thumb-off--background--warning--active\n );--theme-switch-off--border-color:var(\n --theme-switch-off--border-color--warning\n );--theme-switch-off--border-color--hover:var(\n --theme-switch-off--border-color--warning--hover\n );--theme-switch-off--border-color--active:var(\n --theme-switch-off--border-color--warning--active\n );--theme-switch-on--background:var(\n --theme-switch-on--background--warning\n );--theme-switch-on--background--hover:var(\n --theme-switch-on--background--warning--hover\n );--theme-switch-on--background--active:var(\n --theme-switch-on--background--warning--active\n );--theme-switch-thumb-on--border-color:var(\n --theme-switch-thumb-on--border-color--warning\n );--theme-switch-thumb-on--border-color--hover:var(\n --theme-switch-thumb-on--border-color--warning--hover\n );--theme-switch-thumb-on--border-color--active:var(\n --theme-switch-thumb-on--border-color--warning--active\n );--theme-switch-thumb-on--background:var(\n --theme-switch-thumb-on--background--warning\n );--theme-switch-thumb-on--background--hover:var(\n --theme-switch-thumb-on--background--warning--hover\n );--theme-switch-thumb-on--background--active:var(\n --theme-switch-thumb-on--background--warning--active\n );--theme-switch-on--border-color:var(\n --theme-switch-on--border-color--warning\n );--theme-switch-on--border-color--hover:var(\n --theme-switch-on--border-color--warning--hover\n );--theme-switch-on--border-color--active:var(\n --theme-switch-on--border-color--warning--active\n );--theme-switch-mixed--background:var(\n --theme-switch-mixed--background--warning\n );--theme-switch-mixed--background--hover:var(\n --theme-switch-mixed--background--warning--hover\n );--theme-switch-mixed--background--active:var(\n --theme-switch-mixed--background--warning--active\n );--theme-switch-thumb-mixed--border-color:var(\n --theme-switch-thumb-mixed--border-color--warning\n );--theme-switch-thumb-mixed--border-color--hover:var(\n --theme-switch-thumb-mixed--border-color--warning--hover\n );--theme-switch-thumb-mixed--border-color--active:var(\n --theme-switch-thumb-mixed--border-color--warning--active\n );--theme-switch-thumb-mixed--background:var(\n --theme-switch-thumb-mixed--background--warning\n );--theme-switch-thumb-mixed--background--hover:var(\n --theme-switch-thumb-mixed--background--warning--hover\n );--theme-switch-thumb-mixed--background--active:var(\n --theme-switch-thumb-mixed--background--warning--active\n );--theme-switch-mixed--border-color:var(\n --theme-switch-mixed--border-color--warning\n );--theme-switch-mixed--border-color--hover:var(\n --theme-switch-mixed--border-color--warning--hover\n );--theme-switch-mixed--border-color--active:var(\n --theme-switch-mixed--border-color--warning--active\n )}:host(.ix-invalid--required:not(.disabled)) .slider{--theme-switch-off--background:var(\n --theme-switch-off--background--invalid\n );--theme-switch-off--background--hover:var(\n --theme-switch-off--background--invalid--hover\n );--theme-switch-off--background--active:var(\n --theme-switch-off--background--invalid--active\n );--theme-switch-thumb-off--border-color:var(\n --theme-switch-thumb-off--border-color--invalid\n );--theme-switch-thumb-off--border-color--hover:var(\n --theme-switch-thumb-off--border-color--invalid--hover\n );--theme-switch-thumb-off--border-color--active:var(\n --theme-switch-thumb-off--border-color--invalid--active\n );--theme-switch-thumb-off--background:var(\n --theme-switch-thumb-off--background--invalid\n );--theme-switch-thumb-off--background--hover:var(\n --theme-switch-thumb-off--background--invalid--hover\n );--theme-switch-thumb-off--background--active:var(\n --theme-switch-thumb-off--background--invalid--active\n );--theme-switch-off--border-color:var(\n --theme-switch-off--border-color--invalid\n );--theme-switch-off--border-color--hover:var(\n --theme-switch-off--border-color--invalid--hover\n );--theme-switch-off--border-color--active:var(\n --theme-switch-off--border-color--invalid--active\n );--theme-switch-on--background:var(\n --theme-switch-on--background--invalid\n );--theme-switch-on--background--hover:var(\n --theme-switch-on--background--invalid--hover\n );--theme-switch-on--background--active:var(\n --theme-switch-on--background--invalid--active\n );--theme-switch-thumb-on--border-color:var(\n --theme-switch-thumb-on--border-color--invalid\n );--theme-switch-thumb-on--border-color--hover:var(\n --theme-switch-thumb-on--border-color--invalid--hover\n );--theme-switch-thumb-on--border-color--active:var(\n --theme-switch-thumb-on--border-color--invalid--active\n );--theme-switch-thumb-on--background:var(\n --theme-switch-thumb-on--background--invalid\n );--theme-switch-thumb-on--background--hover:var(\n --theme-switch-thumb-on--background--invalid--hover\n );--theme-switch-thumb-on--background--active:var(\n --theme-switch-thumb-on--background--invalid--active\n );--theme-switch-on--border-color:var(\n --theme-switch-on--border-color--invalid\n );--theme-switch-on--border-color--hover:var(\n --theme-switch-on--border-color--invalid--hover\n );--theme-switch-on--border-color--active:var(\n --theme-switch-on--border-color--invalid--active\n );--theme-switch-mixed--background:var(\n --theme-switch-mixed--background--invalid\n );--theme-switch-mixed--background--hover:var(\n --theme-switch-mixed--background--invalid--hover\n );--theme-switch-mixed--background--active:var(\n --theme-switch-mixed--background--invalid--active\n );--theme-switch-thumb-mixed--border-color:var(\n --theme-switch-thumb-mixed--border-color--invalid\n );--theme-switch-thumb-mixed--border-color--hover:var(\n --theme-switch-thumb-mixed--border-color--invalid--hover\n );--theme-switch-thumb-mixed--border-color--active:var(\n --theme-switch-thumb-mixed--border-color--invalid--active\n );--theme-switch-thumb-mixed--background:var(\n --theme-switch-thumb-mixed--background--invalid\n );--theme-switch-thumb-mixed--background--hover:var(\n --theme-switch-thumb-mixed--background--invalid--hover\n );--theme-switch-thumb-mixed--background--active:var(\n --theme-switch-thumb-mixed--background--invalid--active\n );--theme-switch-mixed--border-color:var(\n --theme-switch-mixed--border-color--invalid\n );--theme-switch-mixed--border-color--hover:var(\n --theme-switch-mixed--border-color--invalid--hover\n );--theme-switch-mixed--border-color--active:var(\n --theme-switch-mixed--border-color--invalid--active\n )}:host(.ix-invalid:not(.disabled)) .slider{--theme-switch-off--background:var(\n --theme-switch-off--background--invalid\n );--theme-switch-off--background--hover:var(\n --theme-switch-off--background--invalid--hover\n );--theme-switch-off--background--active:var(\n --theme-switch-off--background--invalid--active\n );--theme-switch-thumb-off--border-color:var(\n --theme-switch-thumb-off--border-color--invalid\n );--theme-switch-thumb-off--border-color--hover:var(\n --theme-switch-thumb-off--border-color--invalid--hover\n );--theme-switch-thumb-off--border-color--active:var(\n --theme-switch-thumb-off--border-color--invalid--active\n );--theme-switch-thumb-off--background:var(\n --theme-switch-thumb-off--background--invalid\n );--theme-switch-thumb-off--background--hover:var(\n --theme-switch-thumb-off--background--invalid--hover\n );--theme-switch-thumb-off--background--active:var(\n --theme-switch-thumb-off--background--invalid--active\n );--theme-switch-off--border-color:var(\n --theme-switch-off--border-color--invalid\n );--theme-switch-off--border-color--hover:var(\n --theme-switch-off--border-color--invalid--hover\n );--theme-switch-off--border-color--active:var(\n --theme-switch-off--border-color--invalid--active\n );--theme-switch-on--background:var(\n --theme-switch-on--background--invalid\n );--theme-switch-on--background--hover:var(\n --theme-switch-on--background--invalid--hover\n );--theme-switch-on--background--active:var(\n --theme-switch-on--background--invalid--active\n );--theme-switch-thumb-on--border-color:var(\n --theme-switch-thumb-on--border-color--invalid\n );--theme-switch-thumb-on--border-color--hover:var(\n --theme-switch-thumb-on--border-color--invalid--hover\n );--theme-switch-thumb-on--border-color--active:var(\n --theme-switch-thumb-on--border-color--invalid--active\n );--theme-switch-thumb-on--background:var(\n --theme-switch-thumb-on--background--invalid\n );--theme-switch-thumb-on--background--hover:var(\n --theme-switch-thumb-on--background--invalid--hover\n );--theme-switch-thumb-on--background--active:var(\n --theme-switch-thumb-on--background--invalid--active\n );--theme-switch-on--border-color:var(\n --theme-switch-on--border-color--invalid\n );--theme-switch-on--border-color--hover:var(\n --theme-switch-on--border-color--invalid--hover\n );--theme-switch-on--border-color--active:var(\n --theme-switch-on--border-color--invalid--active\n );--theme-switch-mixed--background:var(\n --theme-switch-mixed--background--invalid\n );--theme-switch-mixed--background--hover:var(\n --theme-switch-mixed--background--invalid--hover\n );--theme-switch-mixed--background--active:var(\n --theme-switch-mixed--background--invalid--active\n );--theme-switch-thumb-mixed--border-color:var(\n --theme-switch-thumb-mixed--border-color--invalid\n );--theme-switch-thumb-mixed--border-color--hover:var(\n --theme-switch-thumb-mixed--border-color--invalid--hover\n );--theme-switch-thumb-mixed--border-color--active:var(\n --theme-switch-thumb-mixed--border-color--invalid--active\n );--theme-switch-thumb-mixed--background:var(\n --theme-switch-thumb-mixed--background--invalid\n );--theme-switch-thumb-mixed--background--hover:var(\n --theme-switch-thumb-mixed--background--invalid--hover\n );--theme-switch-thumb-mixed--background--active:var(\n --theme-switch-thumb-mixed--background--invalid--active\n );--theme-switch-mixed--border-color:var(\n --theme-switch-mixed--border-color--invalid\n );--theme-switch-mixed--border-color--hover:var(\n --theme-switch-mixed--border-color--invalid--hover\n );--theme-switch-mixed--border-color--active:var(\n --theme-switch-mixed--border-color--invalid--active\n )}';var a=undefined&&undefined.__decorate||function(e,o,r,t){var h=arguments.length,i=h<3?o:t===null?t=Object.getOwnPropertyDescriptor(o,r):t,c;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")i=Reflect.decorate(e,o,r,t);else for(var n=e.length-1;n>=0;n--)if(c=e[n])i=(h<3?c(i):h>3?c(o,r,i):c(o,r))||i;return h>3&&i&&Object.defineProperty(o,r,i),i};const d=class{constructor(r){e(this,r);this.checkedChange=o(this,"checkedChange",7);this.valueChange=o(this,"valueChange",7);this.ixBlur=o(this,"ixBlur",7);if(r.$hostElement$["s-ei"]){this.formInternals=r.$hostElement$["s-ei"]}else{this.formInternals=r.$hostElement$.attachInternals();r.$hostElement$["s-ei"]=this.formInternals}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;this.touched=false}onCheckedChange(e){if(this.disabled){return}const o=this.indeterminate;const r=this.checked;if(this.indeterminate){this.indeterminate=false}this.checked=e;const{defaultPrevented:t}=this.checkedChange.emit(this.checked);if(t){this.indeterminate=o;this.checked=r}}componentWillLoad(){this.updateFormInternalValue()}updateFormInternalValue(){if(this.checked){this.formInternals.setFormValue(this.value)}else{this.formInternals.setFormValue(null)}}watchCheckedChange(){this.touched=true;this.updateFormInternalValue()}hasValidValue(){return Promise.resolve(this.checked)}getAssociatedFormElement(){return Promise.resolve(this.formInternals.form)}isTouched(){return Promise.resolve(this.touched)}updateClassMappings(){}render(){let e=this.textOff;if(this.checked){e=this.textOn}if(this.indeterminate){e=this.textIndeterminate}return r(t,{key:"990e3533b6e155d261dcdcf3dd7e06e0dceb8072",role:"switch","aria-checked":i(this.checked),"aria-disabled":i(this.disabled),class:{disabled:this.disabled},onBlur:()=>this.ixBlur.emit(),onFocus:()=>this.touched=true},r("label",{key:"568b91b6c2ad362dc753518f97ca98b2c45a4130",class:"wrapper"},r("button",{key:"dcbe522c2ccc95354cb982892eff554db86b4e8f",class:{switch:true,checked:this.checked,indeterminate:this.indeterminate},onClick:()=>this.onCheckedChange(!this.checked),tabindex:-1,"aria-hidden":"true"},r("div",{key:"d281b839212a95e47b977bc46f052f7e6ca927c9",class:"slider"})),r("input",{key:"8169a27e13433034a97c97ca99507237332abb30",type:"checkbox",disabled:this.disabled,indeterminate:this.indeterminate,checked:this.checked,tabindex:0,"aria-hidden":i(true),"aria-checked":i(this.checked),onChange:e=>this.onCheckedChange(e.target.checked)}),!this.hideText&&r("ix-typography",{key:"7bc9b1f72447ff21057cdef3eb77a4ebd7a45ae7",class:"label"},e)))}static get formAssociated(){return true}get hostElement(){return h(this)}static get watchers(){return{checked:["watchCheckedChange"]}}};a([c()],d.prototype,"updateClassMappings",null);d.style=n;export{d as ix_toggle};
2
- //# sourceMappingURL=p-7f90eeef.entry.js.map
1
+ import{r as e,c as o,h as r,H as t,g as h}from"./p-CtoreFVF.js";import{a as i}from"./p-Bb7pDeaQ.js";import{H as c}from"./p-C7nQNUsO.js";const n=':host{display:inline-flex;flex-direction:row;position:relative;min-height:1.5rem;max-height:calc(100% - 0.5rem);margin-block-start:0.25rem;margin-block-end:0.25rem}: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{}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host{}: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{}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host{}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host input[type=checkbox]{display:none}:host .wrapper{display:flex;align-items:flex-start;width:100%;max-height:100%}:host .label{word-break:break-word;display:block;white-space:normal;overflow:hidden;margin-block-start:0.125rem;margin-inline-start:0.5rem;min-height:1rem}:host .switch{all:unset;position:relative;display:inline-block;width:3rem;min-width:3rem;max-width:3rem;height:1.5rem}:host .slider{position:absolute;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:0.0625rem solid transparent}:host .slider:before{position:absolute;content:"";height:1.125rem;width:1.125rem;left:0.125rem;bottom:0.125rem;background-color:var(--theme-switch-thumb-off--background);transition:var(--theme-default-time);border-radius:50%;border:1px solid var(--theme-switch-thumb-off--border-color)}:host .switch.checked>.slider::before{background-color:var(--theme-switch-thumb-on--background);transform:translateX(1.5rem)}:host .switch>.slider{border-color:var(--theme-switch-off--border-color)}:host .switch:hover>.slider{background-color:var(--theme-switch-off--background--hover);border-color:var(--theme-switch-off--border-color--hover)}:host .switch:hover>.slider:before{background-color:var(--theme-switch-thumb-off--background--hover);border:1px solid var(--theme-switch-thumb-off--border-color--hover)}:host .switch:active>.slider{background-color:var(--theme-switch-off--background--active);border-color:var(--theme-switch-off--border-color--active)}:host .switch:active>.slider:before{background-color:var(--theme-switch-thumb-off--background--active);border:1px solid var(--theme-switch-thumb-off--border-color--active)}:host .switch.checked>.slider{background-color:var(--theme-switch-on--background);border-color:var(--theme-switch-on--border-color)}:host .switch.checked>.slider:before{border:1px solid var(--theme-switch-thumb-on--border-color)}:host .switch.checked:hover>.slider{background-color:var(--theme-switch-on--background--hover);border-color:var(--theme-switch-on--border-color--hover)}:host .switch.checked:hover>.slider:before{background-color:var(--theme-switch-thumb-on--background--hover);border:1px solid var(--theme-switch-thumb-on--border-color--hover)}:host .switch.checked:active>.slider{background-color:var(--theme-switch-on--background--active);border-color:var(--theme-switch-on--border-color--active)}:host .switch.checked:active>.slider:before{background-color:var(--theme-switch-thumb-on--background--active);border:1px solid var(--theme-switch-thumb-on--border-color--active)}:host .switch.indeterminate>.slider::before{transform:translateX(0.75rem)}:host(:not(.disabled)) .wrapper{cursor:pointer}:host(:not(.disabled)) .switch:focus-visible>.slider{outline:0.0625rem solid var(--theme-color-focus-bdr);outline-offset:0.0625rem}:host(.disabled){pointer-events:none}:host(.disabled) .switch{opacity:0.5}:host(.disabled) .switch>.slider{background-color:var(--theme-switch-off--background--disabled)}:host(.disabled) .switch>.slider:before{background-color:var(--theme-switch-thumb-off--background--disabled)}:host(.disabled) .switch.checked>.slider{background-color:var(--theme-switch-on--background--disabled)}:host(.disabled) .switch.checked>.slider:before{background-color:var(--theme-switch-thumb-on--background--disabled)}:host(.disabled) .label{color:var(--theme-color-weak-text)}:host(.ix-valid:not(.disabled)) .slider{--theme-switch-off--background:var(\n --theme-switch-off--background--valid\n );--theme-switch-off--background--hover:var(\n --theme-switch-off--background--valid--hover\n );--theme-switch-off--background--active:var(\n --theme-switch-off--background--valid--active\n );--theme-switch-thumb-off--border-color:var(\n --theme-switch-thumb-off--border-color--valid\n );--theme-switch-thumb-off--border-color--hover:var(\n --theme-switch-thumb-off--border-color--valid--hover\n );--theme-switch-thumb-off--border-color--active:var(\n --theme-switch-thumb-off--border-color--valid--active\n );--theme-switch-thumb-off--background:var(\n --theme-switch-thumb-off--background--valid\n );--theme-switch-thumb-off--background--hover:var(\n --theme-switch-thumb-off--background--valid--hover\n );--theme-switch-thumb-off--background--active:var(\n --theme-switch-thumb-off--background--valid--active\n );--theme-switch-off--border-color:var(\n --theme-switch-off--border-color--valid\n );--theme-switch-off--border-color--hover:var(\n --theme-switch-off--border-color--valid--hover\n );--theme-switch-off--border-color--active:var(\n --theme-switch-off--border-color--valid--active\n );--theme-switch-on--background:var(\n --theme-switch-on--background--valid\n );--theme-switch-on--background--hover:var(\n --theme-switch-on--background--valid--hover\n );--theme-switch-on--background--active:var(\n --theme-switch-on--background--valid--active\n );--theme-switch-thumb-on--border-color:var(\n --theme-switch-thumb-on--border-color--valid\n );--theme-switch-thumb-on--border-color--hover:var(\n --theme-switch-thumb-on--border-color--valid--hover\n );--theme-switch-thumb-on--border-color--active:var(\n --theme-switch-thumb-on--border-color--valid--active\n );--theme-switch-thumb-on--background:var(\n --theme-switch-thumb-on--background--valid\n );--theme-switch-thumb-on--background--hover:var(\n --theme-switch-thumb-on--background--valid--hover\n );--theme-switch-thumb-on--background--active:var(\n --theme-switch-thumb-on--background--valid--active\n );--theme-switch-on--border-color:var(\n --theme-switch-on--border-color--valid\n );--theme-switch-on--border-color--hover:var(\n --theme-switch-on--border-color--valid--hover\n );--theme-switch-on--border-color--active:var(\n --theme-switch-on--border-color--valid--active\n );--theme-switch-mixed--background:var(\n --theme-switch-mixed--background--valid\n );--theme-switch-mixed--background--hover:var(\n --theme-switch-mixed--background--valid--hover\n );--theme-switch-mixed--background--active:var(\n --theme-switch-mixed--background--valid--active\n );--theme-switch-thumb-mixed--border-color:var(\n --theme-switch-thumb-mixed--border-color--valid\n );--theme-switch-thumb-mixed--border-color--hover:var(\n --theme-switch-thumb-mixed--border-color--valid--hover\n );--theme-switch-thumb-mixed--border-color--active:var(\n --theme-switch-thumb-mixed--border-color--valid--active\n );--theme-switch-thumb-mixed--background:var(\n --theme-switch-thumb-mixed--background--valid\n );--theme-switch-thumb-mixed--background--hover:var(\n --theme-switch-thumb-mixed--background--valid--hover\n );--theme-switch-thumb-mixed--background--active:var(\n --theme-switch-thumb-mixed--background--valid--active\n );--theme-switch-mixed--border-color:var(\n --theme-switch-mixed--border-color--valid\n );--theme-switch-mixed--border-color--hover:var(\n --theme-switch-mixed--border-color--valid--hover\n );--theme-switch-mixed--border-color--active:var(\n --theme-switch-mixed--border-color--valid--active\n )}:host(.ix-info:not(.disabled)) .slider{--theme-switch-off--background:var(\n --theme-switch-off--background--info\n );--theme-switch-off--background--hover:var(\n --theme-switch-off--background--info--hover\n );--theme-switch-off--background--active:var(\n --theme-switch-off--background--info--active\n );--theme-switch-thumb-off--border-color:var(\n --theme-switch-thumb-off--border-color--info\n );--theme-switch-thumb-off--border-color--hover:var(\n --theme-switch-thumb-off--border-color--info--hover\n );--theme-switch-thumb-off--border-color--active:var(\n --theme-switch-thumb-off--border-color--info--active\n );--theme-switch-thumb-off--background:var(\n --theme-switch-thumb-off--background--info\n );--theme-switch-thumb-off--background--hover:var(\n --theme-switch-thumb-off--background--info--hover\n );--theme-switch-thumb-off--background--active:var(\n --theme-switch-thumb-off--background--info--active\n );--theme-switch-off--border-color:var(\n --theme-switch-off--border-color--info\n );--theme-switch-off--border-color--hover:var(\n --theme-switch-off--border-color--info--hover\n );--theme-switch-off--border-color--active:var(\n --theme-switch-off--border-color--info--active\n );--theme-switch-on--background:var(\n --theme-switch-on--background--info\n );--theme-switch-on--background--hover:var(\n --theme-switch-on--background--info--hover\n );--theme-switch-on--background--active:var(\n --theme-switch-on--background--info--active\n );--theme-switch-thumb-on--border-color:var(\n --theme-switch-thumb-on--border-color--info\n );--theme-switch-thumb-on--border-color--hover:var(\n --theme-switch-thumb-on--border-color--info--hover\n );--theme-switch-thumb-on--border-color--active:var(\n --theme-switch-thumb-on--border-color--info--active\n );--theme-switch-thumb-on--background:var(\n --theme-switch-thumb-on--background--info\n );--theme-switch-thumb-on--background--hover:var(\n --theme-switch-thumb-on--background--info--hover\n );--theme-switch-thumb-on--background--active:var(\n --theme-switch-thumb-on--background--info--active\n );--theme-switch-on--border-color:var(\n --theme-switch-on--border-color--info\n );--theme-switch-on--border-color--hover:var(\n --theme-switch-on--border-color--info--hover\n );--theme-switch-on--border-color--active:var(\n --theme-switch-on--border-color--info--active\n );--theme-switch-mixed--background:var(\n --theme-switch-mixed--background--info\n );--theme-switch-mixed--background--hover:var(\n --theme-switch-mixed--background--info--hover\n );--theme-switch-mixed--background--active:var(\n --theme-switch-mixed--background--info--active\n );--theme-switch-thumb-mixed--border-color:var(\n --theme-switch-thumb-mixed--border-color--info\n );--theme-switch-thumb-mixed--border-color--hover:var(\n --theme-switch-thumb-mixed--border-color--info--hover\n );--theme-switch-thumb-mixed--border-color--active:var(\n --theme-switch-thumb-mixed--border-color--info--active\n );--theme-switch-thumb-mixed--background:var(\n --theme-switch-thumb-mixed--background--info\n );--theme-switch-thumb-mixed--background--hover:var(\n --theme-switch-thumb-mixed--background--info--hover\n );--theme-switch-thumb-mixed--background--active:var(\n --theme-switch-thumb-mixed--background--info--active\n );--theme-switch-mixed--border-color:var(\n --theme-switch-mixed--border-color--info\n );--theme-switch-mixed--border-color--hover:var(\n --theme-switch-mixed--border-color--info--hover\n );--theme-switch-mixed--border-color--active:var(\n --theme-switch-mixed--border-color--info--active\n )}:host(.ix-warning:not(.disabled)) .slider{--theme-switch-off--background:var(\n --theme-switch-off--background--warning\n );--theme-switch-off--background--hover:var(\n --theme-switch-off--background--warning--hover\n );--theme-switch-off--background--active:var(\n --theme-switch-off--background--warning--active\n );--theme-switch-thumb-off--border-color:var(\n --theme-switch-thumb-off--border-color--warning\n );--theme-switch-thumb-off--border-color--hover:var(\n --theme-switch-thumb-off--border-color--warning--hover\n );--theme-switch-thumb-off--border-color--active:var(\n --theme-switch-thumb-off--border-color--warning--active\n );--theme-switch-thumb-off--background:var(\n --theme-switch-thumb-off--background--warning\n );--theme-switch-thumb-off--background--hover:var(\n --theme-switch-thumb-off--background--warning--hover\n );--theme-switch-thumb-off--background--active:var(\n --theme-switch-thumb-off--background--warning--active\n );--theme-switch-off--border-color:var(\n --theme-switch-off--border-color--warning\n );--theme-switch-off--border-color--hover:var(\n --theme-switch-off--border-color--warning--hover\n );--theme-switch-off--border-color--active:var(\n --theme-switch-off--border-color--warning--active\n );--theme-switch-on--background:var(\n --theme-switch-on--background--warning\n );--theme-switch-on--background--hover:var(\n --theme-switch-on--background--warning--hover\n );--theme-switch-on--background--active:var(\n --theme-switch-on--background--warning--active\n );--theme-switch-thumb-on--border-color:var(\n --theme-switch-thumb-on--border-color--warning\n );--theme-switch-thumb-on--border-color--hover:var(\n --theme-switch-thumb-on--border-color--warning--hover\n );--theme-switch-thumb-on--border-color--active:var(\n --theme-switch-thumb-on--border-color--warning--active\n );--theme-switch-thumb-on--background:var(\n --theme-switch-thumb-on--background--warning\n );--theme-switch-thumb-on--background--hover:var(\n --theme-switch-thumb-on--background--warning--hover\n );--theme-switch-thumb-on--background--active:var(\n --theme-switch-thumb-on--background--warning--active\n );--theme-switch-on--border-color:var(\n --theme-switch-on--border-color--warning\n );--theme-switch-on--border-color--hover:var(\n --theme-switch-on--border-color--warning--hover\n );--theme-switch-on--border-color--active:var(\n --theme-switch-on--border-color--warning--active\n );--theme-switch-mixed--background:var(\n --theme-switch-mixed--background--warning\n );--theme-switch-mixed--background--hover:var(\n --theme-switch-mixed--background--warning--hover\n );--theme-switch-mixed--background--active:var(\n --theme-switch-mixed--background--warning--active\n );--theme-switch-thumb-mixed--border-color:var(\n --theme-switch-thumb-mixed--border-color--warning\n );--theme-switch-thumb-mixed--border-color--hover:var(\n --theme-switch-thumb-mixed--border-color--warning--hover\n );--theme-switch-thumb-mixed--border-color--active:var(\n --theme-switch-thumb-mixed--border-color--warning--active\n );--theme-switch-thumb-mixed--background:var(\n --theme-switch-thumb-mixed--background--warning\n );--theme-switch-thumb-mixed--background--hover:var(\n --theme-switch-thumb-mixed--background--warning--hover\n );--theme-switch-thumb-mixed--background--active:var(\n --theme-switch-thumb-mixed--background--warning--active\n );--theme-switch-mixed--border-color:var(\n --theme-switch-mixed--border-color--warning\n );--theme-switch-mixed--border-color--hover:var(\n --theme-switch-mixed--border-color--warning--hover\n );--theme-switch-mixed--border-color--active:var(\n --theme-switch-mixed--border-color--warning--active\n )}:host(.ix-invalid--required:not(.disabled)) .slider{--theme-switch-off--background:var(\n --theme-switch-off--background--invalid\n );--theme-switch-off--background--hover:var(\n --theme-switch-off--background--invalid--hover\n );--theme-switch-off--background--active:var(\n --theme-switch-off--background--invalid--active\n );--theme-switch-thumb-off--border-color:var(\n --theme-switch-thumb-off--border-color--invalid\n );--theme-switch-thumb-off--border-color--hover:var(\n --theme-switch-thumb-off--border-color--invalid--hover\n );--theme-switch-thumb-off--border-color--active:var(\n --theme-switch-thumb-off--border-color--invalid--active\n );--theme-switch-thumb-off--background:var(\n --theme-switch-thumb-off--background--invalid\n );--theme-switch-thumb-off--background--hover:var(\n --theme-switch-thumb-off--background--invalid--hover\n );--theme-switch-thumb-off--background--active:var(\n --theme-switch-thumb-off--background--invalid--active\n );--theme-switch-off--border-color:var(\n --theme-switch-off--border-color--invalid\n );--theme-switch-off--border-color--hover:var(\n --theme-switch-off--border-color--invalid--hover\n );--theme-switch-off--border-color--active:var(\n --theme-switch-off--border-color--invalid--active\n );--theme-switch-on--background:var(\n --theme-switch-on--background--invalid\n );--theme-switch-on--background--hover:var(\n --theme-switch-on--background--invalid--hover\n );--theme-switch-on--background--active:var(\n --theme-switch-on--background--invalid--active\n );--theme-switch-thumb-on--border-color:var(\n --theme-switch-thumb-on--border-color--invalid\n );--theme-switch-thumb-on--border-color--hover:var(\n --theme-switch-thumb-on--border-color--invalid--hover\n );--theme-switch-thumb-on--border-color--active:var(\n --theme-switch-thumb-on--border-color--invalid--active\n );--theme-switch-thumb-on--background:var(\n --theme-switch-thumb-on--background--invalid\n );--theme-switch-thumb-on--background--hover:var(\n --theme-switch-thumb-on--background--invalid--hover\n );--theme-switch-thumb-on--background--active:var(\n --theme-switch-thumb-on--background--invalid--active\n );--theme-switch-on--border-color:var(\n --theme-switch-on--border-color--invalid\n );--theme-switch-on--border-color--hover:var(\n --theme-switch-on--border-color--invalid--hover\n );--theme-switch-on--border-color--active:var(\n --theme-switch-on--border-color--invalid--active\n );--theme-switch-mixed--background:var(\n --theme-switch-mixed--background--invalid\n );--theme-switch-mixed--background--hover:var(\n --theme-switch-mixed--background--invalid--hover\n );--theme-switch-mixed--background--active:var(\n --theme-switch-mixed--background--invalid--active\n );--theme-switch-thumb-mixed--border-color:var(\n --theme-switch-thumb-mixed--border-color--invalid\n );--theme-switch-thumb-mixed--border-color--hover:var(\n --theme-switch-thumb-mixed--border-color--invalid--hover\n );--theme-switch-thumb-mixed--border-color--active:var(\n --theme-switch-thumb-mixed--border-color--invalid--active\n );--theme-switch-thumb-mixed--background:var(\n --theme-switch-thumb-mixed--background--invalid\n );--theme-switch-thumb-mixed--background--hover:var(\n --theme-switch-thumb-mixed--background--invalid--hover\n );--theme-switch-thumb-mixed--background--active:var(\n --theme-switch-thumb-mixed--background--invalid--active\n );--theme-switch-mixed--border-color:var(\n --theme-switch-mixed--border-color--invalid\n );--theme-switch-mixed--border-color--hover:var(\n --theme-switch-mixed--border-color--invalid--hover\n );--theme-switch-mixed--border-color--active:var(\n --theme-switch-mixed--border-color--invalid--active\n )}:host(.ix-invalid:not(.disabled)) .slider{--theme-switch-off--background:var(\n --theme-switch-off--background--invalid\n );--theme-switch-off--background--hover:var(\n --theme-switch-off--background--invalid--hover\n );--theme-switch-off--background--active:var(\n --theme-switch-off--background--invalid--active\n );--theme-switch-thumb-off--border-color:var(\n --theme-switch-thumb-off--border-color--invalid\n );--theme-switch-thumb-off--border-color--hover:var(\n --theme-switch-thumb-off--border-color--invalid--hover\n );--theme-switch-thumb-off--border-color--active:var(\n --theme-switch-thumb-off--border-color--invalid--active\n );--theme-switch-thumb-off--background:var(\n --theme-switch-thumb-off--background--invalid\n );--theme-switch-thumb-off--background--hover:var(\n --theme-switch-thumb-off--background--invalid--hover\n );--theme-switch-thumb-off--background--active:var(\n --theme-switch-thumb-off--background--invalid--active\n );--theme-switch-off--border-color:var(\n --theme-switch-off--border-color--invalid\n );--theme-switch-off--border-color--hover:var(\n --theme-switch-off--border-color--invalid--hover\n );--theme-switch-off--border-color--active:var(\n --theme-switch-off--border-color--invalid--active\n );--theme-switch-on--background:var(\n --theme-switch-on--background--invalid\n );--theme-switch-on--background--hover:var(\n --theme-switch-on--background--invalid--hover\n );--theme-switch-on--background--active:var(\n --theme-switch-on--background--invalid--active\n );--theme-switch-thumb-on--border-color:var(\n --theme-switch-thumb-on--border-color--invalid\n );--theme-switch-thumb-on--border-color--hover:var(\n --theme-switch-thumb-on--border-color--invalid--hover\n );--theme-switch-thumb-on--border-color--active:var(\n --theme-switch-thumb-on--border-color--invalid--active\n );--theme-switch-thumb-on--background:var(\n --theme-switch-thumb-on--background--invalid\n );--theme-switch-thumb-on--background--hover:var(\n --theme-switch-thumb-on--background--invalid--hover\n );--theme-switch-thumb-on--background--active:var(\n --theme-switch-thumb-on--background--invalid--active\n );--theme-switch-on--border-color:var(\n --theme-switch-on--border-color--invalid\n );--theme-switch-on--border-color--hover:var(\n --theme-switch-on--border-color--invalid--hover\n );--theme-switch-on--border-color--active:var(\n --theme-switch-on--border-color--invalid--active\n );--theme-switch-mixed--background:var(\n --theme-switch-mixed--background--invalid\n );--theme-switch-mixed--background--hover:var(\n --theme-switch-mixed--background--invalid--hover\n );--theme-switch-mixed--background--active:var(\n --theme-switch-mixed--background--invalid--active\n );--theme-switch-thumb-mixed--border-color:var(\n --theme-switch-thumb-mixed--border-color--invalid\n );--theme-switch-thumb-mixed--border-color--hover:var(\n --theme-switch-thumb-mixed--border-color--invalid--hover\n );--theme-switch-thumb-mixed--border-color--active:var(\n --theme-switch-thumb-mixed--border-color--invalid--active\n );--theme-switch-thumb-mixed--background:var(\n --theme-switch-thumb-mixed--background--invalid\n );--theme-switch-thumb-mixed--background--hover:var(\n --theme-switch-thumb-mixed--background--invalid--hover\n );--theme-switch-thumb-mixed--background--active:var(\n --theme-switch-thumb-mixed--background--invalid--active\n );--theme-switch-mixed--border-color:var(\n --theme-switch-mixed--border-color--invalid\n );--theme-switch-mixed--border-color--hover:var(\n --theme-switch-mixed--border-color--invalid--hover\n );--theme-switch-mixed--border-color--active:var(\n --theme-switch-mixed--border-color--invalid--active\n )}';var a=undefined&&undefined.__decorate||function(e,o,r,t){var h=arguments.length,i=h<3?o:t===null?t=Object.getOwnPropertyDescriptor(o,r):t,c;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")i=Reflect.decorate(e,o,r,t);else for(var n=e.length-1;n>=0;n--)if(c=e[n])i=(h<3?c(i):h>3?c(o,r,i):c(o,r))||i;return h>3&&i&&Object.defineProperty(o,r,i),i};const d=class{constructor(r){e(this,r);this.checkedChange=o(this,"checkedChange",7);this.valueChange=o(this,"valueChange",7);this.ixBlur=o(this,"ixBlur",7);if(r.$hostElement$["s-ei"]){this.formInternals=r.$hostElement$["s-ei"]}else{this.formInternals=r.$hostElement$.attachInternals();r.$hostElement$["s-ei"]=this.formInternals}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;this.touched=false}onCheckedChange(e){if(this.disabled){return}const o=this.indeterminate;const r=this.checked;if(this.indeterminate){this.indeterminate=false}this.checked=e;const{defaultPrevented:t}=this.checkedChange.emit(this.checked);if(t){this.indeterminate=o;this.checked=r}}componentWillLoad(){this.updateFormInternalValue()}updateFormInternalValue(){if(this.checked){this.formInternals.setFormValue(this.value)}else{this.formInternals.setFormValue(null)}}watchCheckedChange(){this.touched=true;this.updateFormInternalValue()}hasValidValue(){return Promise.resolve(this.checked)}getAssociatedFormElement(){return Promise.resolve(this.formInternals.form)}isTouched(){return Promise.resolve(this.touched)}updateClassMappings(){}render(){let e=this.textOff;if(this.checked){e=this.textOn}if(this.indeterminate){e=this.textIndeterminate}return r(t,{key:"990e3533b6e155d261dcdcf3dd7e06e0dceb8072",role:"switch","aria-checked":i(this.checked),"aria-disabled":i(this.disabled),class:{disabled:this.disabled},onBlur:()=>this.ixBlur.emit(),onFocus:()=>this.touched=true},r("label",{key:"568b91b6c2ad362dc753518f97ca98b2c45a4130",class:"wrapper"},r("button",{key:"dcbe522c2ccc95354cb982892eff554db86b4e8f",class:{switch:true,checked:this.checked,indeterminate:this.indeterminate},onClick:()=>this.onCheckedChange(!this.checked),tabindex:-1,"aria-hidden":"true"},r("div",{key:"d281b839212a95e47b977bc46f052f7e6ca927c9",class:"slider"})),r("input",{key:"8169a27e13433034a97c97ca99507237332abb30",type:"checkbox",disabled:this.disabled,indeterminate:this.indeterminate,checked:this.checked,tabindex:0,"aria-hidden":i(true),"aria-checked":i(this.checked),onChange:e=>this.onCheckedChange(e.target.checked)}),!this.hideText&&r("ix-typography",{key:"7bc9b1f72447ff21057cdef3eb77a4ebd7a45ae7",class:"label"},e)))}static get formAssociated(){return true}get hostElement(){return h(this)}static get watchers(){return{checked:["watchCheckedChange"]}}};a([c()],d.prototype,"updateClassMappings",null);d.style=n;export{d as ix_toggle};
2
+ //# sourceMappingURL=p-4431f891.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,h as e,H as i,g as s}from"./p-CtoreFVF.js";import{H as n}from"./p-CAj3Tlcn.js";const a=":host{display:block;width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}";var l=undefined&&undefined.__decorate||function(t,e,i,s){var n=arguments.length,a=n<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,i):s,l;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)if(l=t[o])a=(n<3?l(a):n>3?l(e,i,a):l(e,i))||a;return n>3&&a&&Object.defineProperty(e,i,a),a};const o=class{constructor(e){t(this,e);this.required=false;this.isInvalid=false;this.isValid=false;this.isInfo=false;this.isWarning=false}updateValidationState({isInvalid:t,isValid:e,isInfo:i,isWarning:s}){this.isInvalid=t;this.isValid=e;this.isInfo=i;this.isWarning=s}render(){return e(i,{key:"732dae3e5ba3f37b5eac745ce48338cae5397d9e"},e("ix-field-wrapper",{key:"5df555252c2de619f3dd5daa082632695a88e3f6",label:this.label,helperText:this.helperText,infoText:this.infoText,warningText:this.warningText,invalidText:this.invalidText,validText:this.validText,showTextAsTooltip:this.showTextAsTooltip,isInvalid:this.isInvalid,isValid:this.isValid,isInfo:this.isInfo,isWarning:this.isWarning,required:this.required},e("slot",{key:"81d169fce11d76b04876eb3483909bf163c44370"})))}get hostElement(){return s(this)}};l([n({includeChildren:true})],o.prototype,"updateValidationState",null);o.style=a;export{o as ix_custom_field};
2
- //# sourceMappingURL=p-620158aa.entry.js.map
1
+ import{r as t,h as e,H as i,g as s}from"./p-CtoreFVF.js";import{H as n}from"./p-C7nQNUsO.js";const a=":host{display:block;width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}";var o=undefined&&undefined.__decorate||function(t,e,i,s){var n=arguments.length,a=n<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,i):s,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")a=Reflect.decorate(t,e,i,s);else for(var f=t.length-1;f>=0;f--)if(o=t[f])a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a;return n>3&&a&&Object.defineProperty(e,i,a),a};const f=class{constructor(e){t(this,e);this.required=false;this.isInvalid=false;this.isValid=false;this.isInfo=false;this.isWarning=false}updateValidationState({isInvalid:t,isValid:e,isInfo:i,isWarning:s}){this.isInvalid=t;this.isValid=e;this.isInfo=i;this.isWarning=s}render(){return e(i,{key:"732dae3e5ba3f37b5eac745ce48338cae5397d9e"},e("ix-field-wrapper",{key:"5df555252c2de619f3dd5daa082632695a88e3f6",label:this.label,helperText:this.helperText,infoText:this.infoText,warningText:this.warningText,invalidText:this.invalidText,validText:this.validText,showTextAsTooltip:this.showTextAsTooltip,isInvalid:this.isInvalid,isValid:this.isValid,isInfo:this.isInfo,isWarning:this.isWarning,required:this.required},e("slot",{key:"81d169fce11d76b04876eb3483909bf163c44370"})))}get hostElement(){return s(this)}};o([n({includeChildren:true})],f.prototype,"updateValidationState",null);f.style=a;export{f as ix_custom_field};
2
+ //# sourceMappingURL=p-4e77d861.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as t,c as e,h as o,H as r,g as i}from"./p-CtoreFVF.js";import{o as a}from"./p-8HpPmDK_.js";import{D as n}from"./p-bDicGJUN.js";import{a as l,b as d,h as s,S as h,c as b}from"./p-DaswuiGO.js";import{H as c,c as u,g as p}from"./p-C7nQNUsO.js";import{m}from"./p-bcj7UEIC.js";import{h as v,o as f,c as g,a as x}from"./p-BvFOMxgl.js";import"./p-Bb7pDeaQ.js";import"./p-CX81WQtk.js";import"./p-pXYAoEyc.js";import"./p-DhE1t8Qh.js";import"./p-C5MWUgDN.js";import"./p-D3K9vmFp.js";const y='input{min-height:2rem;width:auto;padding:0.25rem 0.5rem;background-color:var(--theme-input--background);color:var(--theme-input--color);-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;text-overflow:ellipsis;border:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color);border-radius:var(--theme-input--border-radius);box-shadow:var(--theme-input--box-shadow);font-feature-settings:"clig" off, "liga" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-md);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}input[type=number]{text-align:right}input[type=number]::-webkit-inner-spin-button{margin-right:-2px;margin-left:2px;display:none}input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px var(--theme-color-component-info) inset !important;-webkit-text-fill-color:var(--theme-input--color--autofill) !important;background-color:var(--theme-input--background--autofill) !important;border:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;color:var(--theme-input--color--autofill) !important}input:-webkit-autofill,input:autofill{-webkit-box-shadow:0 0 0 1000px var(--theme-color-component-info) inset !important;-webkit-text-fill-color:var(--theme-input--color--autofill) !important;background-color:var(--theme-input--background--autofill) !important;border:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;color:var(--theme-input--color--autofill) !important}input::-moz-placeholder{color:var(--theme-input-hint--color)}input::placeholder{color:var(--theme-input-hint--color)}input.hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only),input:hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only){border-color:var(--theme-input--border-color--hover) !important;background-color:var(--theme-input--background--hover)}input.hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only),input:hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only){border-color:var(--theme-input--border-color--hover) !important;background-color:var(--theme-input--background--hover)}input.focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only),input:focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only){outline:1px solid var(--theme-color-focus-bdr);outline-offset:var(--theme-input--focus--outline-offset);border-color:var(--theme-input--border-color--focus) !important}input.focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only),input:focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only){outline:1px solid var(--theme-color-focus-bdr);outline-offset:var(--theme-input--focus--outline-offset);border-color:var(--theme-input--border-color--focus) !important}input:-moz-read-only{box-shadow:none;background-color:transparent;outline:none;border:none;border-radius:0;border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--readonly)}input.read-only,input:read-only{box-shadow:none;background-color:transparent;outline:none;border:none;border-radius:0;border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--readonly)}input.read-only::-moz-placeholder,input:read-only::-moz-placeholder{color:transparent}input:-moz-read-only::placeholder{color:transparent}input.read-only::placeholder,input:read-only::placeholder{color:transparent}input:disabled,input.disabled{box-shadow:none;background-color:transparent;outline:none;border:none;border-radius:0;color:var(--theme-input--color--disabled);border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--disabled)}input:disabled::-moz-placeholder,input.disabled::-moz-placeholder{color:transparent}input:disabled::placeholder,input.disabled::placeholder{color:transparent}textarea{min-height:2rem;width:auto;padding:0.25rem 0.5rem;background-color:var(--theme-input--background);color:var(--theme-input--color);-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;text-overflow:ellipsis;border:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color);border-radius:var(--theme-input--border-radius);box-shadow:var(--theme-input--box-shadow);font-feature-settings:"clig" off, "liga" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-md);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}textarea[type=number]{text-align:right}textarea[type=number]::-webkit-inner-spin-button{margin-right:-2px;margin-left:2px;display:none}textarea:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px var(--theme-color-component-info) inset !important;-webkit-text-fill-color:var(--theme-input--color--autofill) !important;background-color:var(--theme-input--background--autofill) !important;border:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;color:var(--theme-input--color--autofill) !important}textarea:-webkit-autofill,textarea:autofill{-webkit-box-shadow:0 0 0 1000px var(--theme-color-component-info) inset !important;-webkit-text-fill-color:var(--theme-input--color--autofill) !important;background-color:var(--theme-input--background--autofill) !important;border:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color--autofill) !important;color:var(--theme-input--color--autofill) !important}textarea::-moz-placeholder{color:var(--theme-input-hint--color)}textarea::placeholder{color:var(--theme-input-hint--color)}textarea.hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only),textarea:hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only){border-color:var(--theme-input--border-color--hover) !important;background-color:var(--theme-input--background--hover)}textarea.hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only),textarea:hover:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only){border-color:var(--theme-input--border-color--hover) !important;background-color:var(--theme-input--background--hover)}textarea.focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only),textarea:focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:-moz-read-only){outline:1px solid var(--theme-color-focus-bdr);outline-offset:var(--theme-input--focus--outline-offset);border-color:var(--theme-input--border-color--focus) !important}textarea.focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only),textarea:focus:not(.readonly,.read-only,.disabled,[readonly],[disabled],:read-only){outline:1px solid var(--theme-color-focus-bdr);outline-offset:var(--theme-input--focus--outline-offset);border-color:var(--theme-input--border-color--focus) !important}textarea:-moz-read-only{box-shadow:none;background-color:transparent;outline:none;border:none;border-radius:0;border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--readonly)}textarea.read-only,textarea:read-only{box-shadow:none;background-color:transparent;outline:none;border:none;border-radius:0;border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--readonly)}textarea.read-only::-moz-placeholder,textarea:read-only::-moz-placeholder{color:transparent}textarea:-moz-read-only::placeholder{color:transparent}textarea.read-only::placeholder,textarea:read-only::placeholder{color:transparent}textarea:disabled,textarea.disabled{box-shadow:none;background-color:transparent;outline:none;border:none;border-radius:0;color:var(--theme-input--color--disabled);border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--disabled)}textarea:disabled::-moz-placeholder,textarea.disabled::-moz-placeholder{color:transparent}textarea:disabled::placeholder,textarea.disabled::placeholder{color:transparent}textarea{min-height:2rem;height:3.25rem;padding:calc(0.375rem - var(--theme-input--border-thickness)) calc(0.5rem - var(--theme-input--border-thickness))}textarea.ix-info:not(.disabled):not(:disabled):not([disabled]),input.ix-info:not(.disabled):not(:disabled):not([disabled]){border-color:var(--theme-input--border-color--info)}textarea.ix-info:not(.disabled):not(:disabled):not([disabled]):hover,input.ix-info:not(.disabled):not(:disabled):not([disabled]):hover{border-color:var(--theme-input--border-color--info--hover) !important}textarea.ix-info:not(.disabled):not(:disabled):not([disabled]):active,input.ix-info:not(.disabled):not(:disabled):not([disabled]):active{border-color:var(--theme-input--border-color--info--active) !important}textarea.ix-warning:not(.disabled):not(:disabled):not([disabled]),input.ix-warning:not(.disabled):not(:disabled):not([disabled]){background-color:var(--theme-input--background--warning);border-color:var(--theme-input--border-color--warning--active) !important}textarea.ix-warning:not(.disabled):not(:disabled):not([disabled]):hover,input.ix-warning:not(.disabled):not(:disabled):not([disabled]):hover{background-color:var(--theme-input--background--warning--hover);border-color:var(--theme-input--border-color--warning--hover) !important}textarea.ix-warning:not(.disabled):not(:disabled):not([disabled]):active,input.ix-warning:not(.disabled):not(:disabled):not([disabled]):active{border-color:var(--theme-input--border-color--warning--active) !important}textarea[class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled]),input[class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled]){background-color:var(--theme-input--background--invalid);border-color:var(--theme-input--border-color--invalid) !important}textarea[class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled]):hover,input[class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled]):hover{background-color:var(--theme-input--background--invalid--hover);border-color:var(--theme-input--border-color--invalid--hover) !important}textarea[class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled]):active,input[class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled]):active{border-color:var(--theme-input--border-color--invalid--active) !important}:host{display:inline-block;position:relative;width:auto}: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{}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host{}: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{}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host{}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host .input-wrapper{display:flex;position:relative;align-items:center;width:100%;height:100%}:host input{width:100%;height:100%}:host .start-container,:host .end-container{display:flex;position:absolute;align-items:center;justify-content:center;z-index:1}:host .start-container{left:0}:host .end-container{right:0}:host .start-container ::slotted(*){margin-left:0.5rem}:host .start-container ::slotted(ix-icon.size-24),:host .start-container ::slotted(ix-icon-button.btn-icon-16){margin-left:0.25rem}:host .start-container ::slotted(ix-icon-button.btn-icon-32){margin-left:0}:host .end-container ::slotted(*){margin-right:0.5rem}:host .end-container ::slotted(ix-icon.size-24),:host .end-container ::slotted(ix-icon-button.btn-icon-16){margin-right:0.25rem}:host .end-container ::slotted(ix-icon-button.btn-icon-32){margin-right:0}:host .bottom-text{margin-top:0.25rem;margin-bottom:0.25rem}:host(.disabled){pointer-events:none}:host(.disabled) input,:host(.disabled) textarea{pointer-events:none}:host(.ix-info:not(.disabled):not(:disabled):not([disabled])) input{border-color:var(--theme-input--border-color--info)}:host(.ix-info:not(.disabled):not(:disabled):not([disabled])) input:hover{border-color:var(--theme-input--border-color--info--hover) !important}:host(.ix-info:not(.disabled):not(:disabled):not([disabled])) input:active{border-color:var(--theme-input--border-color--info--active) !important}:host(.ix-warning:not(.disabled):not(:disabled):not([disabled])) input{background-color:var(--theme-input--background--warning);border-color:var(--theme-input--border-color--warning--active) !important}:host(.ix-warning:not(.disabled):not(:disabled):not([disabled])) input:hover{background-color:var(--theme-input--background--warning--hover);border-color:var(--theme-input--border-color--warning--active) !important}:host(.ix-warning:not(.disabled):not(:disabled):not([disabled])) input:active{border-color:var(--theme-input--border-color--warning--active) !important}:host([class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled])) input,:host(.ix-invalid--required:not(.disabled):not(:disabled):not([disabled])) input{background-color:var(--theme-input--background--invalid);border-color:var(--theme-input--border-color--invalid) !important}:host([class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled])) input:hover,:host(.ix-invalid--required:not(.disabled):not(:disabled):not([disabled])) input:hover{background-color:var(--theme-input--background--invalid--hover);border-color:var(--theme-input--border-color--invalid--hover) !important}:host([class*=ix-invalid]:not(.disabled):not(:disabled):not([disabled])) input:active,:host(.ix-invalid--required:not(.disabled):not(:disabled):not([disabled])) input:active{border-color:var(--theme-input--border-color--invalid--active) !important}:host{display:inline-block;position:relative}: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{}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host{}: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{}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host{}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host input{width:100%;height:100%}:host .calendar-hidden{display:none}:host(.readonly) input{pointer-events:none}';var k=undefined&&undefined.__decorate||function(t,e,o,r){var i=arguments.length,a=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,o):r,n;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")a=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)if(n=t[l])a=(i<3?n(a):i>3?n(e,o,a):n(e,o))||a;return i>3&&a&&Object.defineProperty(e,o,a),a};const w=class{constructor(o){t(this,o);this.valueChange=e(this,"valueChange",6);this.validityStateChange=e(this,"validityStateChange",7);this.ixFocus=e(this,"ixFocus",7);this.ixBlur=e(this,"ixBlur",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.value="";this.minDate="";this.maxDate="";this.format="yyyy/LL/dd";this.readonly=false;this.disabled=false;this.i18nErrorDateUnparsable="Date is not valid";this.showWeekNumbers=false;this.weekStartIndex=0;this.suppressSubmitOnEnter=false;this.textAlignment="start";this.show=false;this.from=null;this.isInputInvalid=false;this.isInvalid=false;this.isValid=false;this.isInfo=false;this.isWarning=false;this.focus=false;this.slotStartRef=m();this.slotEndRef=m();this.datepickerRef=m();this.inputElementRef=m();this.dropdownElementRef=m();this.touched=false}watchValuePropHandler(t){this.onInput(t)}updateFormInternalValue(t){if(t){this.formInternals.setFormValue(t)}else{this.formInternals.setFormValue(null)}this.value=t}connectedCallback(){this.classObserver=u(this.hostElement,(()=>this.checkClassList()));this.disposableChangesAndVisibilityObservers=l(this.hostElement,this.updatePaddings.bind(this))}componentWillLoad(){this.onInput(this.value);if(this.isInputInvalid){this.from=null}else{this.watchValue()}this.checkClassList();this.updateFormInternalValue(this.value)}updatePaddings(){d(this.slotStartRef.current,this.slotEndRef.current,this.inputElementRef.current)}disconnectedCallback(){var t,e;(t=this.classObserver)===null||t===void 0?void 0:t.destroy();(e=this.disposableChangesAndVisibilityObservers)===null||e===void 0?void 0:e.call(this)}watchValue(){this.from=this.value}hasValidValue(){return Promise.resolve(!!this.value)}getAssociatedFormElement(){return Promise.resolve(this.formInternals.form)}async onInput(t){this.value=t;if(!t){this.valueChange.emit(t);return}if(!this.format){return}const e=n.fromFormat(t,this.format);const o=n.fromFormat(this.minDate,this.format);const r=n.fromFormat(this.maxDate,this.format);this.isInputInvalid=!e.isValid||e<o||e>r;if(this.isInputInvalid){this.invalidReason=e.invalidReason||undefined;this.from=undefined}else{this.updateFormInternalValue(t);this.closeDropdown()}this.valueChange.emit(t)}onCalenderClick(t){v(t,this.show,(()=>this.openDropdown()),this.inputElementRef)}async openDropdown(){return f(this.dropdownElementRef)}async closeDropdown(){return g(this.dropdownElementRef)}checkClassList(){this.isInvalid=this.hostElement.classList.contains("ix-invalid")}handleInputKeyDown(t){s(t,this.suppressSubmitOnEnter,this.formInternals.form)}renderInput(){var t;return o("div",{class:"input-wrapper"},o(b,{slotStartRef:this.slotStartRef,onSlotChange:()=>this.updatePaddings()}),o("input",{autoComplete:"off",class:{"is-invalid":this.isInputInvalid},disabled:this.disabled,readOnly:this.readonly,readonly:this.readonly,required:this.required,ref:this.inputElementRef,type:"text",value:(t=this.value)!==null&&t!==void 0?t:"",placeholder:this.placeholder,name:this.name,onInput:t=>{const e=t.target;this.onInput(e.value)},onClick:t=>{if(this.show){t.stopPropagation();t.preventDefault()}},onFocus:async()=>{this.openDropdown();this.ixFocus.emit()},onBlur:()=>{this.ixBlur.emit();this.touched=true},onKeyDown:t=>this.handleInputKeyDown(t),style:{textAlign:this.textAlignment}}),o(h,{slotEndRef:this.slotEndRef,onSlotChange:()=>this.updatePaddings()},o("ix-icon-button",{"data-testid":"open-calendar",class:{"calendar-hidden":this.disabled||this.readonly},variant:"subtle-tertiary",icon:a,onClick:t=>this.onCalenderClick(t),"aria-label":this.ariaLabelCalendarButton})))}hookValidationLifecycle({isInfo:t,isInvalid:e,isInvalidByRequired:o,isValid:r,isWarning:i}){this.isInvalid=e||o||this.isInputInvalid;this.isInfo=t;this.isValid=r;this.isWarning=i}async onInputValidationChange(){const t=await this.getValidityState();this.validityStateChange.emit({patternMismatch:t.patternMismatch,invalidReason:this.invalidReason})}getValidityState(){return Promise.resolve(x(this.isInputInvalid,!!this.required,this.value))}getNativeInputElement(){return this.inputElementRef.waitForCurrent()}async focusInput(){return(await this.getNativeInputElement()).focus()}isTouched(){return Promise.resolve(this.touched)}render(){var t;const e=p(this.isInputInvalid,this.invalidText,this.i18nErrorDateUnparsable);return o(r,{key:"4a7f986c62a82763e46faa0203a5b6ff82415aaf",class:{disabled:this.disabled,readonly:this.readonly}},o("ix-field-wrapper",{key:"c366d9ef3a538fd71e8d0f33d305e46da824421e",label:this.label,helperText:this.helperText,isInvalid:this.isInvalid,invalidText:e,infoText:this.infoText,isInfo:this.isInfo,isWarning:this.isWarning,warningText:this.warningText,isValid:this.isValid,validText:this.validText,showTextAsTooltip:this.showTextAsTooltip,required:this.required,controlRef:this.inputElementRef},this.renderInput()),o("ix-dropdown",{key:"6f10990b1e667f0e079f951d920707c15e24e50e","data-testid":"date-dropdown",trigger:this.inputElementRef.waitForCurrent(),ref:this.dropdownElementRef,closeBehavior:"outside",suppressOverflowBehavior:true,show:this.show,onShowChanged:t=>{this.show=t.detail}},o("ix-date-picker",{key:"df14f590271c8177fa10360e72b0338088ed79be",ref:this.datepickerRef,format:this.format,locale:this.locale,singleSelection:true,from:(t=this.from)!==null&&t!==void 0?t:"",minDate:this.minDate,maxDate:this.maxDate,onDateChange:t=>{const{from:e}=t.detail;this.onInput(e)},showWeekNumbers:this.showWeekNumbers,ariaLabelNextMonthButton:this.ariaLabelNextMonthButton,ariaLabelPreviousMonthButton:this.ariaLabelPreviousMonthButton,embedded:true})))}static get formAssociated(){return true}get hostElement(){return i(this)}static get watchers(){return{value:["watchValuePropHandler","watchValue"],isInputInvalid:["onInputValidationChange"]}}};k([c()],w.prototype,"hookValidationLifecycle",null);w.style=y;export{w as ix_date_input};
2
+ //# sourceMappingURL=p-68aaf0fe.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["registerInstance","createEvent","h","Host","getElement","iconCalendar","DateTime","addDisposableChangesAndVisibilityObservers","adjustPaddingForStartAndEnd","handleSubmitOnEnterKeydown","SlotEnd","SlotStart","HookValidationLifecycle","createClassMutationObserver","getValidationText","makeRef","handleIconClick","openDropdown","closeDropdown","createValidityState","dateInputCss","__decorate","undefined","decorators","target","key","desc","c","arguments","length","r","Object","getOwnPropertyDescriptor","d","Reflect","decorate","i","defineProperty","DateInput","constructor","hostRef","this","valueChange","validityStateChange","ixFocus","ixBlur","$hostElement$","formInternals","attachInternals","value","minDate","maxDate","format","readonly","disabled","i18nErrorDateUnparsable","showWeekNumbers","weekStartIndex","suppressSubmitOnEnter","textAlignment","show","from","isInputInvalid","isInvalid","isValid","isInfo","isWarning","focus","slotStartRef","slotEndRef","datepickerRef","inputElementRef","dropdownElementRef","touched","watchValuePropHandler","newValue","onInput","updateFormInternalValue","setFormValue","connectedCallback","classObserver","hostElement","checkClassList","disposableChangesAndVisibilityObservers","updatePaddings","bind","componentWillLoad","watchValue","current","disconnectedCallback","_a","_b","destroy","call","hasValidValue","Promise","resolve","getAssociatedFormElement","form","emit","date","fromFormat","invalidReason","onCalenderClick","event","classList","contains","handleInputKeyDown","renderInput","class","onSlotChange","autoComplete","readOnly","required","ref","type","placeholder","name","onClick","stopPropagation","preventDefault","onFocus","async","onBlur","onKeyDown","style","textAlign","variant","icon","ariaLabelCalendarButton","hookValidationLifecycle","isInvalidByRequired","onInputValidationChange","state","getValidityState","patternMismatch","getNativeInputElement","waitForCurrent","focusInput","isTouched","render","invalidText","label","helperText","infoText","warningText","validText","showTextAsTooltip","controlRef","trigger","closeBehavior","suppressOverflowBehavior","onShowChanged","detail","locale","singleSelection","onDateChange","ariaLabelNextMonthButton","ariaLabelPreviousMonthButton","embedded","formAssociated","watchers","prototype"],"sources":["0"],"mappings":"YAAcA,OAAuBC,OAAaC,OAAQC,OAAWC,MAAkB,8BACzEC,MAAoB,8BACpBC,MAAgB,8BAChBC,OAAiDC,OAAkCC,OAAiCC,OAAcC,MAAiB,8BACnJC,OAA8BC,OAAkCC,MAAyB,yBACzFC,MAAe,8BACfC,OAAsBC,OAAmBC,OAAoBC,MAA2B,wBAC/F,wBACA,wBACA,wBACA,wBACA,wBACA,kBAEP,MAAMC,EAAe,qieAUrB,IAAIC,EAAcC,WAAaA,UAAUD,YAAe,SAAUE,EAAYC,EAAQC,EAAKC,GACvF,IAAIC,EAAIC,UAAUC,OAAQC,EAAIH,EAAI,EAAIH,EAASE,IAAS,KAAOA,EAAOK,OAAOC,yBAAyBR,EAAQC,GAAOC,EAAMO,EAC3H,UAAWC,UAAY,iBAAmBA,QAAQC,WAAa,WAC3DL,EAAII,QAAQC,SAASZ,EAAYC,EA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oH,yBAA0BC,6BAA8BrH,KAAKqH,6BAA8BC,SAAU,QACtL,CACA,yBAAWC,GAAmB,OAAO,IAAM,CAC3C,eAAI/E,GAAgB,OAAO7E,EAAWqC,KAAO,CAC7C,mBAAWwH,GAAa,MAAO,CAC3BhH,MAAS,CAAC,wBAAyB,cACnCa,eAAkB,CAAC,2BACpB,GAEPzC,EAAW,CACPT,KACD0B,EAAU4H,UAAW,0BAA2B,MACnD5H,EAAUuF,MAAQzG,SAETkB","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as t,c as e,h as i,H as s,g as r}from"./p-CtoreFVF.js";import{H as n}from"./p-CAj3Tlcn.js";import{m as a}from"./p-bcj7UEIC.js";const o=":host{display:inline-block;position:relative}:host .checkbox-container{display:flex;flex-direction:column;gap:0.5rem 1rem;margin:0.375rem 0;flex-wrap:wrap}:host .checkbox-container.row-layout{flex-direction:row}";var h=undefined&&undefined.__decorate||function(t,e,i,s){var r=arguments.length,n=r<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,i):s,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")n=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)if(a=t[o])n=(r<3?a(n):r>3?a(e,i,n):a(e,i))||n;return r>3&&n&&Object.defineProperty(e,i,n),n};const l=class{constructor(i){t(this,i);this.valueChange=e(this,"valueChange",7);this.direction="column";this.required=false;this.isInvalid=false;this.isValid=false;this.isInfo=false;this.isWarning=false;this.touched=false;this.groupRef=a();this.observer=new MutationObserver((()=>{this.ensureOnlyLastRadioChecked();this.hasNestedRequiredRadio()}))}get radiobuttonElements(){return Array.from(this.hostElement.querySelectorAll("ix-radio"))}connectedCallback(){this.observer.observe(this.hostElement,{childList:true,subtree:true,attributes:true,attributeFilter:["checked","required"]})}componentWillLoad(){this.selectInitialValue();this.ensureOnlyLastRadioChecked();this.hasNestedRequiredRadio()}disconnectedCallback(){if(this.observer){this.observer.disconnect()}}selectInitialValue(){if(!this.value){return}this.radiobuttonElements.forEach((t=>{t.checked=t.value===this.value}))}ensureOnlyLastRadioChecked(){const t=this.radiobuttonElements.filter((t=>t.checked));t.forEach(((e,i)=>{if(i===t.length-1){return}e.checked=false}));const e=this.isSomeRadioChecked();for(const t of this.radiobuttonElements){t.tabIndex=t.checked?0:-1}if(!e&&this.radiobuttonElements.length>0){this.radiobuttonElements[0].tabIndex=0}}hasNestedRequiredRadio(){this.required=this.radiobuttonElements.some((t=>t.required))}isSomeRadioChecked(){return this.radiobuttonElements.some((t=>t.checked))}onValueChangeHandler(t){this.touched=true;this.radiobuttonElements.forEach((e=>{e.checked=e.value===t}))}onCheckedChangeHandler(t){this.radiobuttonElements.forEach((e=>{if(e!==t.target){e.checked=false;return}e.checked=true;this.valueChange.emit(e.value)}))}onClassField({isInvalid:t,isInfo:e,isValid:i,isWarning:s,isInvalidByRequired:r}){this.isInvalid=t||r;this.isInfo=e;this.isValid=i;this.isWarning=s}hasValidValue(){return Promise.resolve(!!Array.from(this.hostElement.querySelectorAll("ix-radio")).find((t=>t.checked)))}isTouched(){return Promise.resolve(this.touched)}async setCheckedToNextItem(t,e=true){const{radiobuttonElements:i}=this;const{length:s}=i;if(s<=1){return}const r=i.indexOf(t);const n=e?1:-1;let a=(r+n+s)%s;while(i[a].disabled){if(a===r){return}a=(a+n+s)%s}const o=i[a];o.setCheckedState(true);o.focus()}render(){return i(s,{key:"db3158ccabcd99d1b5185607b848c424a4c4c970",onIxBlur:()=>this.touched=true,ref:this.groupRef,role:"radiogroup"},i("ix-field-wrapper",{key:"5668fbc12f4d264869dfe03dc2bbd3d380da6ae1",label:this.label,helperText:this.helperText,invalidText:this.invalidText,infoText:this.infoText,warningText:this.warningText,validText:this.validText,showTextAsTooltip:this.showTextAsTooltip,isValid:this.isValid,isInfo:this.isInfo,isWarning:this.isWarning,isInvalid:this.isInvalid,controlRef:this.groupRef},i("div",{key:"a5ec59c15eb8353d66bc6f0668dd7148dbd447a6",class:{"checkbox-container":true,"row-layout":this.direction==="row"}},i("slot",{key:"325b19034d55cc20cd556a24585d05ce32f22bb6"}))))}get hostElement(){return r(this)}static get watchers(){return{value:["onValueChangeHandler"]}}};h([n({includeChildren:true})],l.prototype,"onClassField",null);l.style=o;export{l as ix_radio_group};
2
- //# sourceMappingURL=p-ebef3d52.entry.js.map
1
+ import{r as t,c as e,h as i,H as s,g as r}from"./p-CtoreFVF.js";import{H as n}from"./p-C7nQNUsO.js";import{m as a}from"./p-bcj7UEIC.js";const o=":host{display:inline-block;position:relative}:host .checkbox-container{display:flex;flex-direction:column;gap:0.5rem 1rem;margin:0.375rem 0;flex-wrap:wrap}:host .checkbox-container.row-layout{flex-direction:row}";var h=undefined&&undefined.__decorate||function(t,e,i,s){var r=arguments.length,n=r<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,i):s,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")n=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)if(a=t[o])n=(r<3?a(n):r>3?a(e,i,n):a(e,i))||n;return r>3&&n&&Object.defineProperty(e,i,n),n};const l=class{constructor(i){t(this,i);this.valueChange=e(this,"valueChange",7);this.direction="column";this.required=false;this.isInvalid=false;this.isValid=false;this.isInfo=false;this.isWarning=false;this.touched=false;this.groupRef=a();this.observer=new MutationObserver((()=>{this.ensureOnlyLastRadioChecked();this.hasNestedRequiredRadio()}))}get radiobuttonElements(){return Array.from(this.hostElement.querySelectorAll("ix-radio"))}connectedCallback(){this.observer.observe(this.hostElement,{childList:true,subtree:true,attributes:true,attributeFilter:["checked","required"]})}componentWillLoad(){this.selectInitialValue();this.ensureOnlyLastRadioChecked();this.hasNestedRequiredRadio()}disconnectedCallback(){if(this.observer){this.observer.disconnect()}}selectInitialValue(){if(!this.value){return}this.radiobuttonElements.forEach((t=>{t.checked=t.value===this.value}))}ensureOnlyLastRadioChecked(){const t=this.radiobuttonElements.filter((t=>t.checked));t.forEach(((e,i)=>{if(i===t.length-1){return}e.checked=false}));const e=this.isSomeRadioChecked();for(const t of this.radiobuttonElements){t.tabIndex=t.checked?0:-1}if(!e&&this.radiobuttonElements.length>0){this.radiobuttonElements[0].tabIndex=0}}hasNestedRequiredRadio(){this.required=this.radiobuttonElements.some((t=>t.required))}isSomeRadioChecked(){return this.radiobuttonElements.some((t=>t.checked))}onValueChangeHandler(t){this.touched=true;this.radiobuttonElements.forEach((e=>{e.checked=e.value===t}))}onCheckedChangeHandler(t){this.radiobuttonElements.forEach((e=>{if(e!==t.target){e.checked=false;return}e.checked=true;this.valueChange.emit(e.value)}))}onClassField({isInvalid:t,isInfo:e,isValid:i,isWarning:s,isInvalidByRequired:r}){this.isInvalid=t||r;this.isInfo=e;this.isValid=i;this.isWarning=s}hasValidValue(){return Promise.resolve(!!Array.from(this.hostElement.querySelectorAll("ix-radio")).find((t=>t.checked)))}isTouched(){return Promise.resolve(this.touched)}async setCheckedToNextItem(t,e=true){const{radiobuttonElements:i}=this;const{length:s}=i;if(s<=1){return}const r=i.indexOf(t);const n=e?1:-1;let a=(r+n+s)%s;while(i[a].disabled){if(a===r){return}a=(a+n+s)%s}const o=i[a];o.setCheckedState(true);o.focus()}render(){return i(s,{key:"db3158ccabcd99d1b5185607b848c424a4c4c970",onIxBlur:()=>this.touched=true,ref:this.groupRef,role:"radiogroup"},i("ix-field-wrapper",{key:"5668fbc12f4d264869dfe03dc2bbd3d380da6ae1",label:this.label,helperText:this.helperText,invalidText:this.invalidText,infoText:this.infoText,warningText:this.warningText,validText:this.validText,showTextAsTooltip:this.showTextAsTooltip,isValid:this.isValid,isInfo:this.isInfo,isWarning:this.isWarning,isInvalid:this.isInvalid,controlRef:this.groupRef},i("div",{key:"a5ec59c15eb8353d66bc6f0668dd7148dbd447a6",class:{"checkbox-container":true,"row-layout":this.direction==="row"}},i("slot",{key:"325b19034d55cc20cd556a24585d05ce32f22bb6"}))))}get hostElement(){return r(this)}static get watchers(){return{value:["onValueChangeHandler"]}}};h([n({includeChildren:true})],l.prototype,"onClassField",null);l.style=o;export{l as ix_radio_group};
2
+ //# sourceMappingURL=p-79537728.entry.js.map
@@ -1,2 +1,2 @@
1
- import{g as i}from"./p-CtoreFVF.js";async function n(i){if(typeof i.isTouched==="function"){return i.isTouched()}}async function t(i){if(i.getAssociatedFormElement&&typeof i.getAssociatedFormElement==="function"){const n=await i.getAssociatedFormElement();if(!n){return false}return n.noValidate}return false}function e(i,n,t){const e=new MutationObserver(n);e.observe(i,{subtree:t===null||t===void 0?void 0:t.includeChildren,childList:t===null||t===void 0?void 0:t.includeChildren,attributes:true,attributeFilter:["class"]});return{destroy(){e.disconnect()}}}function o(i,n,t){return i.classList.contains(`${n}`)||(t?!!i.querySelector(`.${n}`):false)}function a(i,n=false){return{isInvalid:o(i,"ix-invalid",n)||o(i,"ix-invalid--validity-invalid",n),isInvalidByRequired:o(i,"ix-invalid--required",n),isValid:o(i,"ix-valid",n),isInfo:o(i,"ix-info",n),isWarning:o(i,"ix-warning",n)}}function l(o){return(l,s)=>{let r;let u;const{componentWillLoad:c,disconnectedCallback:d,connectedCallback:f}=l;l.connectedCallback=function(){const e=i(this);r=async()=>{const i=await t(e);if(i){return}if(e.hasValidValue&&typeof e.hasValidValue==="function"){const i=await e.hasValidValue();const t=await n(e);if(e.required){e.classList.toggle("ix-invalid--required",!i&&t)}else{e.classList.remove("ix-invalid--required")}}if(e.getValidityState&&typeof e.getValidityState==="function"){const i=await e.getValidityState();e.classList.toggle(`ix-invalid--validity-patternMismatch`,i.patternMismatch)}};e.addEventListener("checkedChange",r);e.addEventListener("valueChange",r);e.addEventListener("ixBlur",r);setTimeout(r);return f===null||f===void 0?void 0:f.call(this)};l.componentWillLoad=function(){const n=i(this);u=e(n,(()=>{const i=a(n,o===null||o===void 0?void 0:o.includeChildren);l[s].call(this,i)}),o);const t=a(n,o===null||o===void 0?void 0:o.includeChildren);l[s].call(this,t);return c===null||c===void 0?void 0:c.call(this)};l.disconnectedCallback=function(){const n=i(this);if(n&&u){u.destroy();u=null}if(n&&r){n.removeEventListener("checkedChange",r);n.removeEventListener("valueChange",r);n.removeEventListener("ixBlur",r);r=null}return d===null||d===void 0?void 0:d.call(this)}}}export{l as H,a,e as c,t as s};
2
- //# sourceMappingURL=p-CAj3Tlcn.js.map
1
+ import{g as i}from"./p-CtoreFVF.js";async function n(i){if(typeof i.isTouched==="function"){return i.isTouched()}}async function t(i){if(i.getAssociatedFormElement&&typeof i.getAssociatedFormElement==="function"){const n=await i.getAssociatedFormElement();if(!n){return false}return n.noValidate}return false}function e(i,n,t){const e=new MutationObserver(n);e.observe(i,{subtree:t===null||t===void 0?void 0:t.includeChildren,childList:t===null||t===void 0?void 0:t.includeChildren,attributes:true,attributeFilter:["class"]});return{destroy(){e.disconnect()}}}function o(i,n,t){return i.classList.contains(`${n}`)||(t?!!i.querySelector(`.${n}`):false)}function a(i,n=false){return{isInvalid:o(i,"ix-invalid",n)||o(i,"ix-invalid--validity-invalid",n),isInvalidByRequired:o(i,"ix-invalid--required",n),isValid:o(i,"ix-valid",n),isInfo:o(i,"ix-info",n),isWarning:o(i,"ix-warning",n)}}function l(o){return(l,r)=>{let u;let s;const{componentWillLoad:c,disconnectedCallback:d,connectedCallback:f}=l;l.connectedCallback=function(){const e=i(this);u=async()=>{const i=await t(e);if(i){return}if(e.hasValidValue&&typeof e.hasValidValue==="function"){const i=await e.hasValidValue();const t=await n(e);if(e.required){e.classList.toggle("ix-invalid--required",!i&&t)}else{e.classList.remove("ix-invalid--required")}}if(e.getValidityState&&typeof e.getValidityState==="function"){const i=await e.getValidityState();e.classList.toggle(`ix-invalid--validity-patternMismatch`,i.patternMismatch)}};e.addEventListener("checkedChange",u);e.addEventListener("valueChange",u);e.addEventListener("ixBlur",u);setTimeout(u);return f===null||f===void 0?void 0:f.call(this)};l.componentWillLoad=function(){const n=i(this);s=e(n,(()=>{const i=a(n,o===null||o===void 0?void 0:o.includeChildren);l[r].call(this,i)}),o);const t=a(n,o===null||o===void 0?void 0:o.includeChildren);l[r].call(this,t);return c===null||c===void 0?void 0:c.call(this)};l.disconnectedCallback=function(){const n=i(this);if(n&&s){s.destroy();s=null}if(n&&u){n.removeEventListener("checkedChange",u);n.removeEventListener("valueChange",u);n.removeEventListener("ixBlur",u);u=null}return d===null||d===void 0?void 0:d.call(this)}}}function r(i,n,t){if(i){return n!==null&&n!==void 0?n:t}return n}export{l as H,a,e as c,r as g,t as s};
2
+ //# sourceMappingURL=p-C7nQNUsO.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"p-CAj3Tlcn.js","sources":["src/components/utils/input/validation.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 { getElement } from '@stencil/core';\nimport { HTMLIxFormComponentElement, IxFormComponent } from '.';\nimport { IxComponent } from '../internal';\n\nexport type ClassMutationObserver = {\n destroy: () => void;\n};\n\nexport async function isTouched<T>(host: IxFormComponent<T>) {\n if (typeof host.isTouched === 'function') {\n return host.isTouched();\n }\n}\n\nexport async function shouldSuppressInternalValidation<T>(\n host: IxFormComponent<T>\n) {\n if (\n host.getAssociatedFormElement &&\n typeof host.getAssociatedFormElement === 'function'\n ) {\n const form = await host.getAssociatedFormElement();\n\n if (!form) {\n return false;\n }\n\n return form.noValidate;\n }\n\n return false;\n}\n\nexport function createClassMutationObserver(\n element: HTMLElement,\n callback: () => void,\n options?: {\n includeChildren?: boolean;\n }\n): ClassMutationObserver {\n const observer = new MutationObserver(callback);\n observer.observe(element, {\n subtree: options?.includeChildren,\n childList: options?.includeChildren,\n attributes: true,\n attributeFilter: ['class'],\n });\n\n return {\n destroy() {\n observer.disconnect();\n },\n };\n}\n\nexport type ValidationResultProperty =\n | 'isInvalid'\n | 'isInvalidByRequired'\n | 'isValid'\n | 'isInfo'\n | 'isWarning';\nexport type ValidationResults = Record<ValidationResultProperty, boolean>;\n\nfunction classListContains(\n hostElement: HTMLIxFormComponentElement<unknown>,\n className: string,\n includeChildren: boolean\n) {\n return (\n hostElement.classList.contains(`${className}`) ||\n (includeChildren ? !!hostElement.querySelector(`.${className}`) : false)\n );\n}\n\nexport function checkFieldClasses(\n hostElement: HTMLIxFormComponentElement<unknown>,\n includeChildren = false\n): ValidationResults {\n return {\n isInvalid:\n classListContains(hostElement, 'ix-invalid', includeChildren) ||\n classListContains(\n hostElement,\n 'ix-invalid--validity-invalid',\n includeChildren\n ),\n isInvalidByRequired: classListContains(\n hostElement,\n 'ix-invalid--required',\n includeChildren\n ),\n isValid: classListContains(hostElement, 'ix-valid', includeChildren),\n isInfo: classListContains(hostElement, 'ix-info', includeChildren),\n isWarning: classListContains(hostElement, 'ix-warning', includeChildren),\n };\n}\n\nexport function HookValidationLifecycle(options?: {\n includeChildren?: boolean;\n}) {\n return (proto: IxComponent, methodName: string) => {\n let checkIfRequiredFunction: (() => Promise<void>) | null;\n let classMutationObserver: ClassMutationObserver | null;\n const { componentWillLoad, disconnectedCallback, connectedCallback } =\n proto;\n\n proto.connectedCallback = function () {\n const host = getElement(\n this\n ) as unknown as HTMLIxFormComponentElement<unknown>;\n\n checkIfRequiredFunction = async () => {\n const skipValidation = await shouldSuppressInternalValidation(host);\n if (skipValidation) {\n return;\n }\n\n if (host.hasValidValue && typeof host.hasValidValue === 'function') {\n const hasValue = await host.hasValidValue();\n const touched = await isTouched(host);\n\n if (host.required) {\n host.classList.toggle('ix-invalid--required', !hasValue && touched);\n } else {\n host.classList.remove('ix-invalid--required');\n }\n }\n\n if (\n host.getValidityState &&\n typeof host.getValidityState === 'function'\n ) {\n const validityState = await host.getValidityState();\n\n host.classList.toggle(\n `ix-invalid--validity-patternMismatch`,\n validityState.patternMismatch\n );\n }\n };\n\n host.addEventListener('checkedChange', checkIfRequiredFunction);\n host.addEventListener('valueChange', checkIfRequiredFunction);\n host.addEventListener('ixBlur', checkIfRequiredFunction);\n setTimeout(checkIfRequiredFunction);\n return connectedCallback?.call(this);\n };\n\n proto.componentWillLoad = function () {\n const host = getElement(\n this\n ) as unknown as HTMLIxFormComponentElement<unknown>;\n classMutationObserver = createClassMutationObserver(\n host,\n () => {\n const result = checkFieldClasses(host, options?.includeChildren);\n proto[methodName].call(this, result);\n },\n options\n );\n const result = checkFieldClasses(host, options?.includeChildren);\n proto[methodName].call(this, result);\n return componentWillLoad?.call(this);\n };\n\n proto.disconnectedCallback = function () {\n const host = getElement(this);\n\n if (host && classMutationObserver) {\n classMutationObserver.destroy();\n classMutationObserver = null;\n }\n\n if (host && checkIfRequiredFunction) {\n host.removeEventListener('checkedChange', checkIfRequiredFunction);\n host.removeEventListener('valueChange', checkIfRequiredFunction);\n host.removeEventListener('ixBlur', checkIfRequiredFunction);\n checkIfRequiredFunction = null;\n }\n\n return disconnectedCallback?.call(this);\n };\n };\n}\n"],"names":[],"mappings":";;AAAA;;;;;;;AAOG;AASI,eAAe,SAAS,CAAI,IAAwB,EAAA;AACzD,IAAA,IAAI,OAAO,IAAI,CAAC,SAAS,KAAK,UAAU,EAAE;AACxC,QAAA,OAAO,IAAI,CAAC,SAAS,EAAE;;AAE3B;AAEO,eAAe,gCAAgC,CACpD,IAAwB,EAAA;IAExB,IACE,IAAI,CAAC,wBAAwB;AAC7B,QAAA,OAAO,IAAI,CAAC,wBAAwB,KAAK,UAAU,EACnD;AACA,QAAA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,wBAAwB,EAAE;QAElD,IAAI,CAAC,IAAI,EAAE;AACT,YAAA,OAAO,KAAK;;QAGd,OAAO,IAAI,CAAC,UAAU;;AAGxB,IAAA,OAAO,KAAK;AACd;SAEgB,2BAA2B,CACzC,OAAoB,EACpB,QAAoB,EACpB,OAEC,EAAA;AAED,IAAA,MAAM,QAAQ,GAAG,IAAI,gBAAgB,CAAC,QAAQ,CAAC;AAC/C,IAAA,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE;AACxB,QAAA,OAAO,EAAE,OAAO,KAAA,IAAA,IAAP,OAAO,KAAP,MAAA,GAAA,M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AAuB,GAAG,IAAI;;YAGhC,OAAO,oBAAoB,KAApB,IAAA,IAAA,oBAAoB,KAApB,MAAA,GAAA,MAAA,GAAA,oBAAoB,CAAE,IAAI,CAAC,IAAI,CAAC;AACzC,SAAC;AACH,KAAC;AACH;;;;"}
1
+ {"version":3,"file":"p-C7nQNUsO.js","sources":["src/components/utils/input/validation.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 { getElement } from '@stencil/core';\nimport { HTMLIxFormComponentElement, IxFormComponent } from '.';\nimport { IxComponent } from '../internal';\n\nexport type ClassMutationObserver = {\n destroy: () => void;\n};\n\nexport async function isTouched<T>(host: IxFormComponent<T>) {\n if (typeof host.isTouched === 'function') {\n return host.isTouched();\n }\n}\n\nexport async function shouldSuppressInternalValidation<T>(\n host: IxFormComponent<T>\n) {\n if (\n host.getAssociatedFormElement &&\n typeof host.getAssociatedFormElement === 'function'\n ) {\n const form = await host.getAssociatedFormElement();\n\n if (!form) {\n return false;\n }\n\n return form.noValidate;\n }\n\n return false;\n}\n\nexport function createClassMutationObserver(\n element: HTMLElement,\n callback: () => void,\n options?: {\n includeChildren?: boolean;\n }\n): ClassMutationObserver {\n const observer = new MutationObserver(callback);\n observer.observe(element, {\n subtree: options?.includeChildren,\n childList: options?.includeChildren,\n attributes: true,\n attributeFilter: ['class'],\n });\n\n return {\n destroy() {\n observer.disconnect();\n },\n };\n}\n\nexport type ValidationResultProperty =\n | 'isInvalid'\n | 'isInvalidByRequired'\n | 'isValid'\n | 'isInfo'\n | 'isWarning';\nexport type ValidationResults = Record<ValidationResultProperty, boolean>;\n\nfunction classListContains(\n hostElement: HTMLIxFormComponentElement<unknown>,\n className: string,\n includeChildren: boolean\n) {\n return (\n hostElement.classList.contains(`${className}`) ||\n (includeChildren ? !!hostElement.querySelector(`.${className}`) : false)\n );\n}\n\nexport function checkFieldClasses(\n hostElement: HTMLIxFormComponentElement<unknown>,\n includeChildren = false\n): ValidationResults {\n return {\n isInvalid:\n classListContains(hostElement, 'ix-invalid', includeChildren) ||\n classListContains(\n hostElement,\n 'ix-invalid--validity-invalid',\n includeChildren\n ),\n isInvalidByRequired: classListContains(\n hostElement,\n 'ix-invalid--required',\n includeChildren\n ),\n isValid: classListContains(hostElement, 'ix-valid', includeChildren),\n isInfo: classListContains(hostElement, 'ix-info', includeChildren),\n isWarning: classListContains(hostElement, 'ix-warning', includeChildren),\n };\n}\n\nexport function HookValidationLifecycle(options?: {\n includeChildren?: boolean;\n}) {\n return (proto: IxComponent, methodName: string) => {\n let checkIfRequiredFunction: (() => Promise<void>) | null;\n let classMutationObserver: ClassMutationObserver | null;\n const { componentWillLoad, disconnectedCallback, connectedCallback } =\n proto;\n\n proto.connectedCallback = function () {\n const host = getElement(\n this\n ) as unknown as HTMLIxFormComponentElement<unknown>;\n\n checkIfRequiredFunction = async () => {\n const skipValidation = await shouldSuppressInternalValidation(host);\n if (skipValidation) {\n return;\n }\n\n if (host.hasValidValue && typeof host.hasValidValue === 'function') {\n const hasValue = await host.hasValidValue();\n const touched = await isTouched(host);\n\n if (host.required) {\n host.classList.toggle('ix-invalid--required', !hasValue && touched);\n } else {\n host.classList.remove('ix-invalid--required');\n }\n }\n\n if (\n host.getValidityState &&\n typeof host.getValidityState === 'function'\n ) {\n const validityState = await host.getValidityState();\n\n host.classList.toggle(\n `ix-invalid--validity-patternMismatch`,\n validityState.patternMismatch\n );\n }\n };\n\n host.addEventListener('checkedChange', checkIfRequiredFunction);\n host.addEventListener('valueChange', checkIfRequiredFunction);\n host.addEventListener('ixBlur', checkIfRequiredFunction);\n setTimeout(checkIfRequiredFunction);\n return connectedCallback?.call(this);\n };\n\n proto.componentWillLoad = function () {\n const host = getElement(\n this\n ) as unknown as HTMLIxFormComponentElement<unknown>;\n classMutationObserver = createClassMutationObserver(\n host,\n () => {\n const result = checkFieldClasses(host, options?.includeChildren);\n proto[methodName].call(this, result);\n },\n options\n );\n const result = checkFieldClasses(host, options?.includeChildren);\n proto[methodName].call(this, result);\n return componentWillLoad?.call(this);\n };\n\n proto.disconnectedCallback = function () {\n const host = getElement(this);\n\n if (host && classMutationObserver) {\n classMutationObserver.destroy();\n classMutationObserver = null;\n }\n\n if (host && checkIfRequiredFunction) {\n host.removeEventListener('checkedChange', checkIfRequiredFunction);\n host.removeEventListener('valueChange', checkIfRequiredFunction);\n host.removeEventListener('ixBlur', checkIfRequiredFunction);\n checkIfRequiredFunction = null;\n }\n\n return disconnectedCallback?.call(this);\n };\n };\n}\n\nexport function getValidationText(\n isInputInvalid: boolean,\n customInvalidText: string | undefined,\n i18nFallbackText: string\n): string | undefined {\n if (isInputInvalid) {\n return customInvalidText ?? i18nFallbackText;\n }\n return customInvalidText;\n}\n"],"names":[],"mappings":";;AAAA;;;;;;;AAOG;AASI,eAAe,SAAS,CAAI,IAAwB,EAAA;AACzD,IAAA,IAAI,OAAO,IAAI,CAAC,SAAS,KAAK,UAAU,EAAE;AACxC,QAAA,OAAO,IAAI,CAAC,SAAS,EAAE;;AAE3B;AAEO,eAAe,gCAAgC,CACpD,IAAwB,EAAA;IAExB,IACE,IAAI,CAAC,wBAAwB;AAC7B,QAAA,OAAO,IAAI,CAAC,wBAAwB,KAAK,UAAU,EACnD;AACA,QAAA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,wBAAwB,EAAE;QAElD,IAAI,CAAC,IAAI,EAAE;AACT,YAAA,OAAO,KAAK;;QAGd,OAAO,IAAI,CAAC,UAAU;;AAGxB,IAAA,OAAO,KAAK;AACd;SAEgB,2BAA2B,CACzC,OAAoB,EACpB,QAAoB,EACpB,OAEC,EAAA;AAED,IAAA,MAAM,QAAQ,GAAG,IAAI,gBAAgB,CAAC,QAAQ,CAAC;AAC/C,IAAA,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE;AACxB,QAAA,OAAO,EAAE,OAAO,KAAA,IAAA,IAAP,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uBAAuB,CAAC;gBAC3D,uBAAuB,GAAG,IAAI;;YAGhC,OAAO,oBAAoB,KAApB,IAAA,IAAA,oBAAoB,KAApB,MAAA,GAAA,MAAA,GAAA,oBAAoB,CAAE,IAAI,CAAC,IAAI,CAAC;AACzC,SAAC;AACH,KAAC;AACH;SAEgB,iBAAiB,CAC/B,cAAuB,EACvB,iBAAqC,EACrC,gBAAwB,EAAA;IAExB,IAAI,cAAc,EAAE;AAClB,QAAA,OAAO,iBAAiB,KAAjB,IAAA,IAAA,iBAAiB,cAAjB,iBAAiB,GAAI,gBAAgB;;AAE9C,IAAA,OAAO,iBAAiB;AAC1B;;;;"}
@@ -1,2 +1,2 @@
1
- import{h as n}from"./p-CtoreFVF.js";import{a as t}from"./p-Bb7pDeaQ.js";import{s as e}from"./p-CAj3Tlcn.js";import{c as i}from"./p-CX81WQtk.js";import{c as o}from"./p-pXYAoEyc.js";import{a as r}from"./p-DhE1t8Qh.js";import{A as a}from"./p-C5MWUgDN.js";function s(n){const t=5;r(n,{duration:a.defaultTime,easing:"easeInOutSine",loop:2,translateX:[{value:t*-1},{value:t},{value:t/-2},{value:t/2},{value:0}]})}function u(n,t){n.isInvalid=t.isInvalid||t.isInvalidByRequired;n.isValid=t.isValid;n.isInfo=t.isInfo;n.isWarning=t.isWarning}function l(n,t){if(n.allowedCharactersPattern){const e=new RegExp(n.allowedCharactersPattern);if(!e.test(t.key)){t.preventDefault();s(n.inputRef.current)}}}async function c(n,t){const i=t.validity;const o=!n.hostElement.classList.contains("ix-invalid--validity-invalid");const r=i.valid;if(o!==r){const t=n.validityStateChange.emit(i);if(t.defaultPrevented){return}}if(n.value===null||n.value===undefined){return}const a=await e(n);if(a){return}const{valid:s}=i;n.hostElement.classList.toggle("ix-invalid--validity-invalid",!s)}function f(n,t){n.ixBlur.emit();if(!t){throw new Error("Input element is not available")}t.setAttribute("data-ix-touched","true");c(n,t)}function d(n,t,e){var i;if(!n){return}const r=16;const a=o(t+r/2);if(e.slotEnd){n.style.paddingRight=`calc(${a} + ${(i=e.additionalPaddingRight)!==null&&i!==void 0?i:"0rem"})`}else{n.style.paddingLeft=a}}function m(n,t,e){requestAnimationFrame((()=>{requestAnimationFrame((()=>{if(n){const t=n.getBoundingClientRect();if(t){d(e,t.width,{slotEnd:false})}}if(t){const n=t.getBoundingClientRect();if(n){d(e,n.width,{slotEnd:true})}}}))}))}function p(n){const e={"aria-invalid":`${t(n.isInvalid)}`,"aria-required":`${t(n.required)}`};if(n.isInvalid&&n.invalidText){e["aria-errormessage"]=n.invalidText}return e}const v=(n,t)=>{const e=b(n,t);const o=i(t);o.observe(n,{subtree:true,attributes:true});return()=>{e.disconnect();o.disconnect()}};function b(n,t){const e=new IntersectionObserver((n=>{n.forEach((n=>{if(n.isIntersecting){t()}}))}));e.observe(n);return e}function h(n,t,e){if(t||n.key!=="Enter"||!e){return}n.preventDefault();const i=e.querySelector('button[type="submit"], ix-button[type="submit"]');if(i){e.requestSubmit(i)}if(e.length===1){e.requestSubmit()}}function y(t){return n("textarea",Object.assign({readOnly:t.readonly,disabled:t.disabled,maxLength:t.maxLength,minLength:t.minLength,cols:t.textareaCols,rows:t.textareaRows,ref:t.textAreaRef,class:{"is-invalid":t.isInvalid},required:t.required,value:t.value,placeholder:t.placeholder,onInput:n=>{const e=n.target;t.updateFormInternalValue(e.value);t.valueChange(e.value)},onBlur:()=>t.onBlur(),style:{resize:t.resizeBehavior,height:t.textareaHeight,width:t.textareaWidth}},t.ariaAttributes))}function g(t){return n("input",Object.assign({id:t.id,autoComplete:"off",readOnly:t.readonly,disabled:t.disabled,step:t.step,min:t.min,max:t.max,maxLength:t.maxLength?Number(t.maxLength):undefined,minLength:t.minLength?Number(t.minLength):undefined,ref:t.inputRef,pattern:t.pattern,type:t.type,class:{"is-invalid":t.isInvalid},style:{textAlign:t.textAlignment},required:t.required,value:t.value,placeholder:t.placeholder,onKeyPress:n=>t.onKeyPress(n),onKeyDown:n=>{var e;(e=t.onKeyDown)===null||e===void 0?void 0:e.call(t,n);h(n,!!t.suppressSubmitOnEnter,t.form)}},{onBeforeInput:n=>{var e;return(e=t.onBeforeInput)===null||e===void 0?void 0:e.call(t,n)}},{onPaste:n=>{var e;return(e=t.onPaste)===null||e===void 0?void 0:e.call(t,n)},onInput:n=>{const e=n.target;t.updateFormInternalValue(e.value);t.valueChange(e.value)},onBlur:()=>t.onBlur()},t.ariaAttributes))}const x=(t,e)=>n("div",{class:"end-container",ref:t.slotEndRef},n("slot",{name:"end",onSlotchange:t.onSlotChange}),e);const j=t=>n("div",{class:"start-container",ref:t.slotStartRef},n("slot",{name:"start",onSlotchange:t.onSlotChange}));export{g as I,x as S,y as T,v as a,m as b,j as c,l as d,c as e,p as g,h,u as m,f as o};
2
- //# sourceMappingURL=p-5iwF1M9X.js.map
1
+ import{h as n}from"./p-CtoreFVF.js";import{a as t}from"./p-Bb7pDeaQ.js";import{s as e}from"./p-C7nQNUsO.js";import{c as i}from"./p-CX81WQtk.js";import{c as o}from"./p-pXYAoEyc.js";import{a as r}from"./p-DhE1t8Qh.js";import{A as a}from"./p-C5MWUgDN.js";function s(n){const t=5;r(n,{duration:a.defaultTime,easing:"easeInOutSine",loop:2,translateX:[{value:t*-1},{value:t},{value:t/-2},{value:t/2},{value:0}]})}function u(n,t){n.isInvalid=t.isInvalid||t.isInvalidByRequired;n.isValid=t.isValid;n.isInfo=t.isInfo;n.isWarning=t.isWarning}function l(n,t){if(n.allowedCharactersPattern){const e=new RegExp(n.allowedCharactersPattern);if(!e.test(t.key)){t.preventDefault();s(n.inputRef.current)}}}async function c(n,t){const i=t.validity;const o=!n.hostElement.classList.contains("ix-invalid--validity-invalid");const r=i.valid;if(o!==r){const t=n.validityStateChange.emit(i);if(t.defaultPrevented){return}}if(n.value===null||n.value===undefined){return}const a=await e(n);if(a){return}const{valid:s}=i;n.hostElement.classList.toggle("ix-invalid--validity-invalid",!s)}function f(n,t){n.ixBlur.emit();if(!t){throw new Error("Input element is not available")}t.setAttribute("data-ix-touched","true");c(n,t)}function d(n,t,e){var i;if(!n){return}const r=16;const a=o(t+r/2);if(e.slotEnd){n.style.paddingRight=`calc(${a} + ${(i=e.additionalPaddingRight)!==null&&i!==void 0?i:"0rem"})`}else{n.style.paddingLeft=a}}function m(n,t,e){requestAnimationFrame((()=>{requestAnimationFrame((()=>{if(n){const t=n.getBoundingClientRect();if(t){d(e,t.width,{slotEnd:false})}}if(t){const n=t.getBoundingClientRect();if(n){d(e,n.width,{slotEnd:true})}}}))}))}function p(n){const e={"aria-invalid":`${t(n.isInvalid)}`,"aria-required":`${t(n.required)}`};if(n.isInvalid&&n.invalidText){e["aria-errormessage"]=n.invalidText}return e}const v=(n,t)=>{const e=b(n,t);const o=i(t);o.observe(n,{subtree:true,attributes:true});return()=>{e.disconnect();o.disconnect()}};function b(n,t){const e=new IntersectionObserver((n=>{n.forEach((n=>{if(n.isIntersecting){t()}}))}));e.observe(n);return e}function h(n,t,e){if(t||n.key!=="Enter"||!e){return}n.preventDefault();const i=e.querySelector('button[type="submit"], ix-button[type="submit"]');if(i){e.requestSubmit(i)}if(e.length===1){e.requestSubmit()}}function y(t){return n("textarea",Object.assign({readOnly:t.readonly,disabled:t.disabled,maxLength:t.maxLength,minLength:t.minLength,cols:t.textareaCols,rows:t.textareaRows,ref:t.textAreaRef,class:{"is-invalid":t.isInvalid},required:t.required,value:t.value,placeholder:t.placeholder,onInput:n=>{const e=n.target;t.updateFormInternalValue(e.value);t.valueChange(e.value)},onBlur:()=>t.onBlur(),style:{resize:t.resizeBehavior,height:t.textareaHeight,width:t.textareaWidth}},t.ariaAttributes))}function g(t){return n("input",Object.assign({id:t.id,autoComplete:"off",readOnly:t.readonly,disabled:t.disabled,step:t.step,min:t.min,max:t.max,maxLength:t.maxLength?Number(t.maxLength):undefined,minLength:t.minLength?Number(t.minLength):undefined,ref:t.inputRef,pattern:t.pattern,type:t.type,class:{"is-invalid":t.isInvalid},style:{textAlign:t.textAlignment},required:t.required,value:t.value,placeholder:t.placeholder,onKeyPress:n=>t.onKeyPress(n),onKeyDown:n=>{var e;(e=t.onKeyDown)===null||e===void 0?void 0:e.call(t,n);h(n,!!t.suppressSubmitOnEnter,t.form)}},{onBeforeInput:n=>{var e;return(e=t.onBeforeInput)===null||e===void 0?void 0:e.call(t,n)}},{onPaste:n=>{var e;return(e=t.onPaste)===null||e===void 0?void 0:e.call(t,n)},onInput:n=>{const e=n.target;t.updateFormInternalValue(e.value);t.valueChange(e.value)},onBlur:()=>t.onBlur()},t.ariaAttributes))}const x=(t,e)=>n("div",{class:"end-container",ref:t.slotEndRef},n("slot",{name:"end",onSlotchange:t.onSlotChange}),e);const j=t=>n("div",{class:"start-container",ref:t.slotStartRef},n("slot",{name:"start",onSlotchange:t.onSlotChange}));export{g as I,x as S,y as T,v as a,m as b,j as c,l as d,c as e,p as g,h,u as m,f as o};
2
+ //# sourceMappingURL=p-DaswuiGO.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"p-5iwF1M9X.js","sources":["src/components/input/input.animation.ts","src/components/input/input.util.ts","src/components/input/input.fc.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 { animate } from 'animejs';\nimport Animation from '../utils/animation';\n\nexport function shakeInput(input: HTMLInputElement) {\n const xMax = 5;\n animate(input, {\n duration: Animation.defaultTime,\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 { createMutationObserver } from '../utils/mutation-observer';\nimport { convertToRemString } from '../utils/rwd.util';\nimport { generateUUID } from '../utils/uuid';\nimport { shakeInput } from './input.animation';\n\nexport function createIdIfNotExists(\n element: IxFormComponent,\n idPrefix: string = 'input'\n) {\n return element.hasAttribute('id')\n ? element.getAttribute('id')\n : `${idPrefix}-${generateUUID()}`;\n}\n\nexport function mapValidationResult<T>(\n ref: IxInputFieldComponent<T>,\n result: ValidationResults\n) {\n ref.isInvalid = result.isInvalid || result.isInvalidByRequired;\n ref.isValid = result.isValid;\n ref.isInfo = result.isInfo;\n ref.isWarning = result.isWarning;\n}\n\nexport function checkAllowedKeys<T>(\n comp: IxInputFieldComponent<T>,\n event: KeyboardEvent\n) {\n if (comp.allowedCharactersPattern) {\n const regex = new RegExp(comp.allowedCharactersPattern);\n if (!regex.test(event.key)) {\n event.preventDefault();\n shakeInput(comp.inputRef.current);\n }\n }\n}\n\nexport async function checkInternalValidity<T>(\n comp: IxFormComponent<T>,\n input: HTMLInputElement | HTMLTextAreaElement\n) {\n const validityState = input.validity;\n const currentValidityState = !comp.hostElement.classList.contains(\n 'ix-invalid--validity-invalid'\n );\n const newValidityState = validityState.valid;\n\n if (currentValidityState !== newValidityState) {\n const eventResult = comp.validityStateChange.emit(validityState);\n if (eventResult.defaultPrevented) {\n return;\n }\n }\n\n if (comp.value === null || comp.value === undefined) {\n return;\n }\n\n const skipValidation = await shouldSuppressInternalValidation(comp);\n if (skipValidation) {\n return;\n }\n\n const { valid } = validityState;\n comp.hostElement.classList.toggle('ix-invalid--validity-invalid', !valid);\n}\n\nexport function onInputBlur<T>(\n comp: IxFormComponent<T>,\n input?: HTMLInputElement | HTMLTextAreaElement | null\n) {\n comp.ixBlur.emit();\n\n if (!input) {\n throw new Error('Input element is not available');\n }\n\n input.setAttribute('data-ix-touched', 'true');\n checkInternalValidity(comp, input);\n}\n\nexport function applyPaddingEnd(\n inputElement: HTMLElement | null,\n width: number,\n options: {\n slotEnd: boolean;\n additionalPaddingRight?: string;\n }\n) {\n if (!inputElement) {\n return;\n }\n\n const remInPixels = 16;\n const padding = convertToRemString(width + remInPixels / 2);\n\n if (options.slotEnd) {\n inputElement.style.paddingRight = `calc(${padding} + ${\n options.additionalPaddingRight ?? '0rem'\n })`;\n } else {\n inputElement.style.paddingLeft = padding;\n }\n}\n\nexport function adjustPaddingForStartAndEnd(\n startElement: HTMLElement | null,\n endElement: HTMLElement | null,\n inputElement: HTMLElement | null\n) {\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n if (startElement) {\n const startBoundingRect = startElement.getBoundingClientRect();\n if (startBoundingRect) {\n applyPaddingEnd(inputElement, startBoundingRect.width, {\n slotEnd: false,\n });\n }\n }\n\n if (endElement) {\n const endBoundingRect = endElement.getBoundingClientRect();\n if (endBoundingRect) {\n applyPaddingEnd(inputElement, endBoundingRect.width, {\n slotEnd: true,\n });\n }\n }\n });\n });\n}\n\nexport function getAriaAttributesForInput(\n component: IxInputFieldComponent\n): A11yAttributes {\n const inputAria: A11yAttributes = {\n 'aria-invalid': `${a11yBoolean(component.isInvalid)}`,\n 'aria-required': `${a11yBoolean(component.required)}`,\n };\n\n if (component.isInvalid && component.invalidText) {\n inputAria['aria-errormessage'] = component.invalidText;\n }\n return inputAria;\n}\n\nexport type DisposableChangesAndVisibilityObservers = () => void;\n\nexport const addDisposableChangesAndVisibilityObservers = (\n element: HTMLElement,\n callback: () => void\n): DisposableChangesAndVisibilityObservers => {\n const intersectionObserver = observeElementUntilVisible(element, callback);\n const mutationObserver = createMutationObserver(callback);\n\n mutationObserver.observe(element, {\n subtree: true,\n attributes: true,\n });\n\n return () => {\n intersectionObserver.disconnect();\n mutationObserver.disconnect();\n };\n};\n\nfunction observeElementUntilVisible(\n hostElement: HTMLElement,\n updateCallback: () => void\n): IntersectionObserver {\n const intersectionObserver = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n updateCallback();\n }\n });\n });\n\n intersectionObserver.observe(hostElement);\n return intersectionObserver;\n}\n\nexport function handleSubmitOnEnterKeydown(\n event: KeyboardEvent,\n suppressSubmitOnEnter: boolean,\n form: HTMLFormElement | null | undefined\n) {\n if (suppressSubmitOnEnter || event.key !== 'Enter' || !form) {\n return;\n }\n\n event.preventDefault();\n const submitButton = form.querySelector<HTMLElement>(\n 'button[type=\"submit\"], ix-button[type=\"submit\"]'\n );\n\n if (submitButton) {\n form.requestSubmit(submitButton);\n }\n\n if (form.length === 1) {\n form.requestSubmit();\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { FunctionalComponent, h } from '@stencil/core';\nimport { A11yAttributes } from '../utils/a11y';\nimport { handleSubmitOnEnterKeydown } from './input.util';\nimport { MakeRef } from '../utils/make-ref';\n\nexport function TextareaElement(\n props: Readonly<{\n resizeBehavior: 'both' | 'horizontal' | 'vertical' | 'none';\n textareaHeight?: string;\n textareaWidth?: string;\n textareaRows?: number;\n textareaCols?: number;\n disabled: boolean;\n readonly: boolean;\n maxLength?: number;\n minLength?: number;\n isInvalid: boolean;\n required: boolean;\n value: string;\n placeholder?: string;\n textAreaRef: (el: HTMLTextAreaElement | undefined) => void;\n valueChange: (value: string) => void;\n updateFormInternalValue: (value: string) => void;\n onBlur: () => void;\n ariaAttributes?: A11yAttributes;\n }>\n) {\n return (\n <textarea\n readOnly={props.readonly}\n disabled={props.disabled}\n maxLength={props.maxLength}\n minLength={props.minLength}\n cols={props.textareaCols}\n rows={props.textareaRows}\n ref={props.textAreaRef}\n class={{\n 'is-invalid': props.isInvalid,\n }}\n required={props.required}\n value={props.value}\n placeholder={props.placeholder}\n onInput={(inputEvent) => {\n const target = inputEvent.target as HTMLInputElement;\n props.updateFormInternalValue(target.value);\n props.valueChange(target.value);\n }}\n onBlur={() => props.onBlur()}\n style={{\n resize: props.resizeBehavior,\n height: props.textareaHeight,\n width: props.textareaWidth,\n }}\n {...props.ariaAttributes}\n ></textarea>\n );\n}\n\nexport function InputElement(\n props: Readonly<{\n id: string;\n disabled: boolean;\n readonly: boolean;\n maxLength?: string | number;\n minLength?: string | number;\n max?: string | number;\n min?: string | number;\n step?: string | number;\n pattern?: string;\n type: string;\n isInvalid: boolean;\n required: boolean;\n value: string | number;\n placeholder?: string;\n textAlignment?: 'start' | 'end';\n inputRef: (el: HTMLInputElement | undefined) => void;\n onKeyPress: (event: KeyboardEvent) => void;\n onKeyDown?: (event: KeyboardEvent) => void;\n onBeforeInput?: (event: InputEvent) => void;\n onPaste?: (event: ClipboardEvent) => void;\n valueChange: (value: string) => void;\n updateFormInternalValue: (value: string) => void;\n onBlur: () => void;\n ariaAttributes?: A11yAttributes;\n form?: HTMLFormElement;\n suppressSubmitOnEnter?: boolean;\n }>\n) {\n return (\n <input\n id={props.id}\n autoComplete=\"off\"\n readOnly={props.readonly}\n disabled={props.disabled}\n step={props.step}\n min={props.min}\n max={props.max}\n maxLength={props.maxLength ? Number(props.maxLength) : undefined}\n minLength={props.minLength ? Number(props.minLength) : undefined}\n ref={props.inputRef}\n pattern={props.pattern}\n type={props.type}\n class={{\n 'is-invalid': props.isInvalid,\n }}\n style={{\n textAlign: props.textAlignment,\n }}\n required={props.required}\n value={props.value}\n placeholder={props.placeholder}\n onKeyPress={(event) => props.onKeyPress(event)}\n onKeyDown={(e) => {\n props.onKeyDown?.(e);\n handleSubmitOnEnterKeydown(\n e,\n !!props.suppressSubmitOnEnter,\n props.form\n );\n }}\n {...({\n onBeforeInput: (event: InputEvent) => props.onBeforeInput?.(event),\n } as any)}\n onPaste={(event) => props.onPaste?.(event)}\n onInput={(inputEvent) => {\n const target = inputEvent.target as HTMLInputElement;\n props.updateFormInternalValue(target.value);\n props.valueChange(target.value);\n }}\n onBlur={() => props.onBlur()}\n {...props.ariaAttributes}\n ></input>\n );\n}\n\nexport const SlotEnd: FunctionalComponent<{\n slotEndRef: MakeRef<HTMLDivElement>;\n onSlotChange?: (e: Event) => void;\n}> = (props, children) => {\n return (\n <div class=\"end-container\" ref={props.slotEndRef}>\n <slot name=\"end\" onSlotchange={props.onSlotChange}></slot>\n {children}\n </div>\n );\n};\n\nexport const SlotStart: FunctionalComponent<{\n slotStartRef: MakeRef<HTMLDivElement>;\n onSlotChange?: (e: Event) => void;\n}> = (props) => {\n return (\n <div class=\"start-container\" ref={props.slotStartRef}>\n <slot name=\"start\" onSlotchange={props.onSlotChange}></slot>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;;AAOG;AAIG,SAAU,UAAU,CAAC,KAAuB,EAAA;IAChD,MAAM,IAAI,GAAG,CAAC;IACd,OAAO,CAAC,KAAK,EAAE;QACb,QAAQ,EAAE,SAAS,CAAC,WAAW;AAC/B,QAAA,MAAM,EAAE,eAAe;AACvB,QAAA,IAAI,EAAE,CAAC;AACP,QAAA,UAAU,EAAE;AACV,YAAA;AACE,gBAAA,KAAK,EAAE,IAAI,GAAG,EAAE;AACjB,aAAA;AACD,YAAA;AACE,gBAAA,KAAK,EAAE,IAAI;AACZ,aAAA;AACD,YAAA;AACE,gBAAA,KAAK,EAAE,IAAI,GAAG,EAAE;AACjB,aAAA;AACD,YAAA;gBACE,KAAK,EAAE,IAAI,GAAG,CAAC;AAChB,aAAA;AACD,YAAA;AACE,gBAAA,KAAK,EAAE,CAAC;AACT,aAAA;AACF,SAAA;AACF,KAAA,CAAC;AACJ;;ACnCA;;;;;;;AAOG;AAuBa,SAAA,mBAAmB,CACjC,GAA6B,EAC7B,MAAyB,EAAA;IAEzB,GAAG,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,mBAAmB;AAC9D,IAAA,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO;AAC5B,IAAA,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM;AAC1B,IAAA,GAAG,CAAC,S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,KAAK,KAAI;AACb,IAAA,QACE,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,iBAAiB,EAAC,GAAG,EAAE,KAAK,CAAC,YAAY,EAAA,EAClD,CAAA,CAAA,MAAA,EAAA,EAAM,IAAI,EAAC,OAAO,EAAC,YAAY,EAAE,KAAK,CAAC,YAAY,EAAA,CAAS,CACxD;AAEV;;;;"}
1
+ {"version":3,"file":"p-DaswuiGO.js","sources":["src/components/input/input.animation.ts","src/components/input/input.util.ts","src/components/input/input.fc.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 { animate } from 'animejs';\nimport Animation from '../utils/animation';\n\nexport function shakeInput(input: HTMLInputElement) {\n const xMax = 5;\n animate(input, {\n duration: Animation.defaultTime,\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 { createMutationObserver } from '../utils/mutation-observer';\nimport { convertToRemString } from '../utils/rwd.util';\nimport { generateUUID } from '../utils/uuid';\nimport { shakeInput } from './input.animation';\n\nexport function createIdIfNotExists(\n element: IxFormComponent,\n idPrefix: string = 'input'\n) {\n return element.hasAttribute('id')\n ? element.getAttribute('id')\n : `${idPrefix}-${generateUUID()}`;\n}\n\nexport function mapValidationResult<T>(\n ref: IxInputFieldComponent<T>,\n result: ValidationResults\n) {\n ref.isInvalid = result.isInvalid || result.isInvalidByRequired;\n ref.isValid = result.isValid;\n ref.isInfo = result.isInfo;\n ref.isWarning = result.isWarning;\n}\n\nexport function checkAllowedKeys<T>(\n comp: IxInputFieldComponent<T>,\n event: KeyboardEvent\n) {\n if (comp.allowedCharactersPattern) {\n const regex = new RegExp(comp.allowedCharactersPattern);\n if (!regex.test(event.key)) {\n event.preventDefault();\n shakeInput(comp.inputRef.current);\n }\n }\n}\n\nexport async function checkInternalValidity<T>(\n comp: IxFormComponent<T>,\n input: HTMLInputElement | HTMLTextAreaElement\n) {\n const validityState = input.validity;\n const currentValidityState = !comp.hostElement.classList.contains(\n 'ix-invalid--validity-invalid'\n );\n const newValidityState = validityState.valid;\n\n if (currentValidityState !== newValidityState) {\n const eventResult = comp.validityStateChange.emit(validityState);\n if (eventResult.defaultPrevented) {\n return;\n }\n }\n\n if (comp.value === null || comp.value === undefined) {\n return;\n }\n\n const skipValidation = await shouldSuppressInternalValidation(comp);\n if (skipValidation) {\n return;\n }\n\n const { valid } = validityState;\n comp.hostElement.classList.toggle('ix-invalid--validity-invalid', !valid);\n}\n\nexport function onInputBlur<T>(\n comp: IxFormComponent<T>,\n input?: HTMLInputElement | HTMLTextAreaElement | null\n) {\n comp.ixBlur.emit();\n\n if (!input) {\n throw new Error('Input element is not available');\n }\n\n input.setAttribute('data-ix-touched', 'true');\n checkInternalValidity(comp, input);\n}\n\nexport function applyPaddingEnd(\n inputElement: HTMLElement | null,\n width: number,\n options: {\n slotEnd: boolean;\n additionalPaddingRight?: string;\n }\n) {\n if (!inputElement) {\n return;\n }\n\n const remInPixels = 16;\n const padding = convertToRemString(width + remInPixels / 2);\n\n if (options.slotEnd) {\n inputElement.style.paddingRight = `calc(${padding} + ${\n options.additionalPaddingRight ?? '0rem'\n })`;\n } else {\n inputElement.style.paddingLeft = padding;\n }\n}\n\nexport function adjustPaddingForStartAndEnd(\n startElement: HTMLElement | null,\n endElement: HTMLElement | null,\n inputElement: HTMLElement | null\n) {\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n if (startElement) {\n const startBoundingRect = startElement.getBoundingClientRect();\n if (startBoundingRect) {\n applyPaddingEnd(inputElement, startBoundingRect.width, {\n slotEnd: false,\n });\n }\n }\n\n if (endElement) {\n const endBoundingRect = endElement.getBoundingClientRect();\n if (endBoundingRect) {\n applyPaddingEnd(inputElement, endBoundingRect.width, {\n slotEnd: true,\n });\n }\n }\n });\n });\n}\n\nexport function getAriaAttributesForInput(\n component: IxInputFieldComponent\n): A11yAttributes {\n const inputAria: A11yAttributes = {\n 'aria-invalid': `${a11yBoolean(component.isInvalid)}`,\n 'aria-required': `${a11yBoolean(component.required)}`,\n };\n\n if (component.isInvalid && component.invalidText) {\n inputAria['aria-errormessage'] = component.invalidText;\n }\n return inputAria;\n}\n\nexport type DisposableChangesAndVisibilityObservers = () => void;\n\nexport const addDisposableChangesAndVisibilityObservers = (\n element: HTMLElement,\n callback: () => void\n): DisposableChangesAndVisibilityObservers => {\n const intersectionObserver = observeElementUntilVisible(element, callback);\n const mutationObserver = createMutationObserver(callback);\n\n mutationObserver.observe(element, {\n subtree: true,\n attributes: true,\n });\n\n return () => {\n intersectionObserver.disconnect();\n mutationObserver.disconnect();\n };\n};\n\nfunction observeElementUntilVisible(\n hostElement: HTMLElement,\n updateCallback: () => void\n): IntersectionObserver {\n const intersectionObserver = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n updateCallback();\n }\n });\n });\n\n intersectionObserver.observe(hostElement);\n return intersectionObserver;\n}\n\nexport function handleSubmitOnEnterKeydown(\n event: KeyboardEvent,\n suppressSubmitOnEnter: boolean,\n form: HTMLFormElement | null | undefined\n) {\n if (suppressSubmitOnEnter || event.key !== 'Enter' || !form) {\n return;\n }\n\n event.preventDefault();\n const submitButton = form.querySelector<HTMLElement>(\n 'button[type=\"submit\"], ix-button[type=\"submit\"]'\n );\n\n if (submitButton) {\n form.requestSubmit(submitButton);\n }\n\n if (form.length === 1) {\n form.requestSubmit();\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { FunctionalComponent, h } from '@stencil/core';\nimport { A11yAttributes } from '../utils/a11y';\nimport { handleSubmitOnEnterKeydown } from './input.util';\nimport { MakeRef } from '../utils/make-ref';\n\nexport function TextareaElement(\n props: Readonly<{\n resizeBehavior: 'both' | 'horizontal' | 'vertical' | 'none';\n textareaHeight?: string;\n textareaWidth?: string;\n textareaRows?: number;\n textareaCols?: number;\n disabled: boolean;\n readonly: boolean;\n maxLength?: number;\n minLength?: number;\n isInvalid: boolean;\n required: boolean;\n value: string;\n placeholder?: string;\n textAreaRef: (el: HTMLTextAreaElement | undefined) => void;\n valueChange: (value: string) => void;\n updateFormInternalValue: (value: string) => void;\n onBlur: () => void;\n ariaAttributes?: A11yAttributes;\n }>\n) {\n return (\n <textarea\n readOnly={props.readonly}\n disabled={props.disabled}\n maxLength={props.maxLength}\n minLength={props.minLength}\n cols={props.textareaCols}\n rows={props.textareaRows}\n ref={props.textAreaRef}\n class={{\n 'is-invalid': props.isInvalid,\n }}\n required={props.required}\n value={props.value}\n placeholder={props.placeholder}\n onInput={(inputEvent) => {\n const target = inputEvent.target as HTMLInputElement;\n props.updateFormInternalValue(target.value);\n props.valueChange(target.value);\n }}\n onBlur={() => props.onBlur()}\n style={{\n resize: props.resizeBehavior,\n height: props.textareaHeight,\n width: props.textareaWidth,\n }}\n {...props.ariaAttributes}\n ></textarea>\n );\n}\n\nexport function InputElement(\n props: Readonly<{\n id: string;\n disabled: boolean;\n readonly: boolean;\n maxLength?: string | number;\n minLength?: string | number;\n max?: string | number;\n min?: string | number;\n step?: string | number;\n pattern?: string;\n type: string;\n isInvalid: boolean;\n required: boolean;\n value: string | number;\n placeholder?: string;\n textAlignment?: 'start' | 'end';\n inputRef: (el: HTMLInputElement | undefined) => void;\n onKeyPress: (event: KeyboardEvent) => void;\n onKeyDown?: (event: KeyboardEvent) => void;\n onBeforeInput?: (event: InputEvent) => void;\n onPaste?: (event: ClipboardEvent) => void;\n valueChange: (value: string) => void;\n updateFormInternalValue: (value: string) => void;\n onBlur: () => void;\n ariaAttributes?: A11yAttributes;\n form?: HTMLFormElement;\n suppressSubmitOnEnter?: boolean;\n }>\n) {\n return (\n <input\n id={props.id}\n autoComplete=\"off\"\n readOnly={props.readonly}\n disabled={props.disabled}\n step={props.step}\n min={props.min}\n max={props.max}\n maxLength={props.maxLength ? Number(props.maxLength) : undefined}\n minLength={props.minLength ? Number(props.minLength) : undefined}\n ref={props.inputRef}\n pattern={props.pattern}\n type={props.type}\n class={{\n 'is-invalid': props.isInvalid,\n }}\n style={{\n textAlign: props.textAlignment,\n }}\n required={props.required}\n value={props.value}\n placeholder={props.placeholder}\n onKeyPress={(event) => props.onKeyPress(event)}\n onKeyDown={(e) => {\n props.onKeyDown?.(e);\n handleSubmitOnEnterKeydown(\n e,\n !!props.suppressSubmitOnEnter,\n props.form\n );\n }}\n {...({\n onBeforeInput: (event: InputEvent) => props.onBeforeInput?.(event),\n } as any)}\n onPaste={(event) => props.onPaste?.(event)}\n onInput={(inputEvent) => {\n const target = inputEvent.target as HTMLInputElement;\n props.updateFormInternalValue(target.value);\n props.valueChange(target.value);\n }}\n onBlur={() => props.onBlur()}\n {...props.ariaAttributes}\n ></input>\n );\n}\n\nexport const SlotEnd: FunctionalComponent<{\n slotEndRef: MakeRef<HTMLDivElement>;\n onSlotChange?: (e: Event) => void;\n}> = (props, children) => {\n return (\n <div class=\"end-container\" ref={props.slotEndRef}>\n <slot name=\"end\" onSlotchange={props.onSlotChange}></slot>\n {children}\n </div>\n );\n};\n\nexport const SlotStart: FunctionalComponent<{\n slotStartRef: MakeRef<HTMLDivElement>;\n onSlotChange?: (e: Event) => void;\n}> = (props) => {\n return (\n <div class=\"start-container\" ref={props.slotStartRef}>\n <slot name=\"start\" onSlotchange={props.onS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Tlcn.js";import{H as n}from"./p-Cn013Iz8.js";import"./p-8HpPmDK_.js";const a=":host{display:block}:host .bottom-text{display:flex;position:relative;align-items:flex-start;justify-content:flex-start;gap:0.25rem;margin-right:0.25rem}:host .text-icon{margin:0.125rem}:host .text-icon.invalid{color:var(--theme-helper-icon--color--invalid)}:host .text-icon.info{color:var(--theme-helper-icon--color--info)}:host .text-icon.warning{color:var(--theme-helper-icon--color--warning)}:host .text-icon.valid{color:var(--theme-helper-icon--color--valid)}";const l=class{constructor(e){t(this,e);this.validationResults={isInfo:false,isInvalid:false,isValid:false,isWarning:false,isInvalidByRequired:false};this.observer=new MutationObserver((()=>this.checkForRequired()))}connectedCallback(){this.observer.observe(window.document,{childList:true,subtree:true})}disconnectedCallback(){if(this.observer){this.observer.disconnect()}}componentWillRender(){this.checkForRequired()}async checkForRequired(){if(!this.htmlFor){return}const t=document.getElementById(this.htmlFor);if(!t){return}if(this.classObserver){this.classObserver.destroy()}this.classObserver=o(t,(()=>{this.validationResults=r(t)}));this.validationResults=r(t)}render(){return e(i,{key:"95d6dfb6a163ee5e6b4d7d478780af394427548c"},e(n,Object.assign({key:"dc7f97b4cb8b2563c1a1089764e25eb63c75b583",helperText:this.helperText,invalidText:this.invalidText,validText:this.validText,infoText:this.infoText,warningText:this.warningText},this.validationResults)))}get hostElement(){return s(this)}};l.style=a;export{l as ix_helper_text};
2
- //# sourceMappingURL=p-3b7573d6.entry.js.map
1
+ import{r as t,h as e,H as i,g as s}from"./p-CtoreFVF.js";import{c as o,a as r}from"./p-C7nQNUsO.js";import{H as n}from"./p-Cn013Iz8.js";import"./p-8HpPmDK_.js";const a=":host{display:block}:host .bottom-text{display:flex;position:relative;align-items:flex-start;justify-content:flex-start;gap:0.25rem;margin-right:0.25rem}:host .text-icon{margin:0.125rem}:host .text-icon.invalid{color:var(--theme-helper-icon--color--invalid)}:host .text-icon.info{color:var(--theme-helper-icon--color--info)}:host .text-icon.warning{color:var(--theme-helper-icon--color--warning)}:host .text-icon.valid{color:var(--theme-helper-icon--color--valid)}";const l=class{constructor(e){t(this,e);this.validationResults={isInfo:false,isInvalid:false,isValid:false,isWarning:false,isInvalidByRequired:false};this.observer=new MutationObserver((()=>this.checkForRequired()))}connectedCallback(){this.observer.observe(window.document,{childList:true,subtree:true})}disconnectedCallback(){if(this.observer){this.observer.disconnect()}}componentWillRender(){this.checkForRequired()}async checkForRequired(){if(!this.htmlFor){return}const t=document.getElementById(this.htmlFor);if(!t){return}if(this.classObserver){this.classObserver.destroy()}this.classObserver=o(t,(()=>{this.validationResults=r(t)}));this.validationResults=r(t)}render(){return e(i,{key:"95d6dfb6a163ee5e6b4d7d478780af394427548c"},e(n,Object.assign({key:"dc7f97b4cb8b2563c1a1089764e25eb63c75b583",helperText:this.helperText,invalidText:this.invalidText,validText:this.validText,infoText:this.infoText,warningText:this.warningText},this.validationResults)))}get hostElement(){return s(this)}};l.style=a;export{l as ix_helper_text};
2
+ //# sourceMappingURL=p-a4225101.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,h as t,H as i,g as s}from"./p-CtoreFVF.js";import{H as r}from"./p-CAj3Tlcn.js";import{m as a}from"./p-bcj7UEIC.js";const o=":host{display:inline-block;position:relative}:host .checkbox-container{display:flex;flex-direction:column;gap:1rem;margin:0.375rem 0;flex-wrap:wrap}:host .checkbox-container.row-layout{flex-direction:row}";var l=undefined&&undefined.__decorate||function(e,t,i,s){var r=arguments.length,a=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,i):s,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")a=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)if(o=e[l])a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a;return r>3&&a&&Object.defineProperty(t,i,a),a};const n=class{constructor(t){e(this,t);this.direction="column";this.showTextAsTooltip=false;this.required=false;this.isInvalid=false;this.isInfo=false;this.isValid=false;this.isWarning=false;this.touched=false;this.groupRef=a();this.observer=new MutationObserver((()=>{this.checkForRequiredCheckbox()}))}get checkboxElements(){return Array.from(this.hostElement.querySelectorAll("ix-checkbox"))}checkForRequiredCheckbox(){this.required=this.checkboxElements.some((e=>e.required))}connectedCallback(){this.observer.observe(this.hostElement,{childList:true,subtree:true,attributes:true,attributeFilter:["checked","required"]})}componentWillLoad(){this.checkForRequiredCheckbox()}disconnectedCallback(){if(this.observer){this.observer.disconnect()}}onClassFieldUpdate({isInvalid:e,isInvalidByRequired:t,isInfo:i,isValid:s,isWarning:r}){this.isInvalid=e||t;this.isInfo=i;this.isValid=s;this.isWarning=r}isTouched(){return Promise.resolve(this.touched)}hasValidValue(){return Promise.resolve(this.checkboxElements.some((e=>e.checked)))}render(){return t(i,{key:"ac1e91fd23038317e1a39b612f67e91d53ba946c",ref:this.groupRef,onIxBlur:()=>this.touched=true},t("ix-field-wrapper",{key:"1278bca33da0339052756f01e8ca2de2641feffb",label:this.label,helperText:this.helperText,invalidText:this.invalidText,infoText:this.infoText,validText:this.validText,warningText:this.warningText,showTextAsTooltip:this.showTextAsTooltip,isInvalid:this.isInvalid,isInfo:this.isInfo,isValid:this.isValid,isWarning:this.isWarning,controlRef:this.groupRef},t("div",{key:"7ba4ca7e379f49c6234c681a682cb08ec3d44b87",class:{"checkbox-container":true,"row-layout":this.direction==="row"}},t("slot",{key:"a843f1bfd2942b4f0e9d2060646b50e97e55bca8"}))))}get hostElement(){return s(this)}};l([r({includeChildren:true})],n.prototype,"onClassFieldUpdate",null);n.style=o;export{n as ix_checkbox_group};
2
- //# sourceMappingURL=p-1c83cb5f.entry.js.map
1
+ import{r as e,h as t,H as i,g as s}from"./p-CtoreFVF.js";import{H as r}from"./p-C7nQNUsO.js";import{m as a}from"./p-bcj7UEIC.js";const o=":host{display:inline-block;position:relative}:host .checkbox-container{display:flex;flex-direction:column;gap:1rem;margin:0.375rem 0;flex-wrap:wrap}:host .checkbox-container.row-layout{flex-direction:row}";var n=undefined&&undefined.__decorate||function(e,t,i,s){var r=arguments.length,a=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,i):s,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)if(o=e[n])a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a;return r>3&&a&&Object.defineProperty(t,i,a),a};const l=class{constructor(t){e(this,t);this.direction="column";this.showTextAsTooltip=false;this.required=false;this.isInvalid=false;this.isInfo=false;this.isValid=false;this.isWarning=false;this.touched=false;this.groupRef=a();this.observer=new MutationObserver((()=>{this.checkForRequiredCheckbox()}))}get checkboxElements(){return Array.from(this.hostElement.querySelectorAll("ix-checkbox"))}checkForRequiredCheckbox(){this.required=this.checkboxElements.some((e=>e.required))}connectedCallback(){this.observer.observe(this.hostElement,{childList:true,subtree:true,attributes:true,attributeFilter:["checked","required"]})}componentWillLoad(){this.checkForRequiredCheckbox()}disconnectedCallback(){if(this.observer){this.observer.disconnect()}}onClassFieldUpdate({isInvalid:e,isInvalidByRequired:t,isInfo:i,isValid:s,isWarning:r}){this.isInvalid=e||t;this.isInfo=i;this.isValid=s;this.isWarning=r}isTouched(){return Promise.resolve(this.touched)}hasValidValue(){return Promise.resolve(this.checkboxElements.some((e=>e.checked)))}render(){return t(i,{key:"ac1e91fd23038317e1a39b612f67e91d53ba946c",ref:this.groupRef,onIxBlur:()=>this.touched=true},t("ix-field-wrapper",{key:"1278bca33da0339052756f01e8ca2de2641feffb",label:this.label,helperText:this.helperText,invalidText:this.invalidText,infoText:this.infoText,validText:this.validText,warningText:this.warningText,showTextAsTooltip:this.showTextAsTooltip,isInvalid:this.isInvalid,isInfo:this.isInfo,isValid:this.isValid,isWarning:this.isWarning,controlRef:this.groupRef},t("div",{key:"7ba4ca7e379f49c6234c681a682cb08ec3d44b87",class:{"checkbox-container":true,"row-layout":this.direction==="row"}},t("slot",{key:"a843f1bfd2942b4f0e9d2060646b50e97e55bca8"}))))}get hostElement(){return s(this)}};n([r({includeChildren:true})],l.prototype,"onClassFieldUpdate",null);l.style=o;export{l as ix_checkbox_group};
2
+ //# sourceMappingURL=p-b27a9744.entry.js.map