@infineon/infineon-design-system-stencil 39.4.4--canary.2134.cd83647d2771e1e22b8c6c80a0df75f24ca168b6.0 → 39.4.4--canary.2134.bb609f61311d4fde41e8336aa402a4fd507e0769.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 (144) hide show
  1. package/dist/cjs/_commonjsHelpers-CFO10eej.js +10 -0
  2. package/dist/cjs/_commonjsHelpers-CFO10eej.js.map +1 -0
  3. package/dist/cjs/ifx-action-list-item.cjs.entry.js +2 -1
  4. package/dist/cjs/ifx-action-list-item.cjs.entry.js.map +1 -1
  5. package/dist/cjs/ifx-action-list-item.entry.cjs.js.map +1 -1
  6. package/dist/cjs/ifx-basic-table.cjs.entry.js +2 -1
  7. package/dist/cjs/ifx-basic-table.cjs.entry.js.map +1 -1
  8. package/dist/cjs/ifx-basic-table.entry.cjs.js.map +1 -1
  9. package/dist/cjs/ifx-button.cjs.entry.js +146 -0
  10. package/dist/cjs/ifx-button.cjs.entry.js.map +1 -0
  11. package/dist/cjs/ifx-button.entry.cjs.js.map +1 -0
  12. package/dist/cjs/ifx-checkbox.cjs.entry.js +125 -0
  13. package/dist/cjs/ifx-checkbox.cjs.entry.js.map +1 -0
  14. package/dist/cjs/ifx-checkbox.entry.cjs.js.map +1 -0
  15. package/dist/cjs/ifx-chip.ifx-chip-item.ifx-pagination.entry.cjs.js.map +1 -0
  16. package/dist/cjs/ifx-chip_3.cjs.entry.js +615 -0
  17. package/dist/cjs/ifx-chip_3.cjs.entry.js.map +1 -0
  18. package/dist/cjs/ifx-icon-button.cjs.entry.js +76 -0
  19. package/dist/cjs/ifx-icon-button.cjs.entry.js.map +1 -0
  20. package/dist/cjs/ifx-icon-button.entry.cjs.js.map +1 -0
  21. package/dist/cjs/ifx-icon.cjs.entry.js +127 -0
  22. package/dist/cjs/ifx-icon.cjs.entry.js.map +1 -0
  23. package/dist/cjs/ifx-icon.entry.cjs.js.map +1 -0
  24. package/dist/cjs/ifx-indicator.cjs.entry.js +42 -0
  25. package/dist/cjs/ifx-indicator.cjs.entry.js.map +1 -0
  26. package/dist/cjs/ifx-indicator.entry.cjs.js.map +1 -0
  27. package/dist/cjs/ifx-link.cjs.entry.js +2 -1
  28. package/dist/cjs/ifx-link.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ifx-link.entry.cjs.js.map +1 -1
  30. package/dist/cjs/ifx-search-field.cjs.entry.js +2 -1
  31. package/dist/cjs/ifx-search-field.cjs.entry.js.map +1 -1
  32. package/dist/cjs/ifx-search-field.entry.cjs.js.map +1 -1
  33. package/dist/cjs/ifx-select.cjs.entry.js +7323 -0
  34. package/dist/cjs/ifx-select.cjs.entry.js.map +1 -0
  35. package/dist/cjs/ifx-select.entry.cjs.js.map +1 -0
  36. package/dist/cjs/ifx-spinner.ifx-text-field.entry.cjs.js.map +1 -1
  37. package/dist/cjs/ifx-spinner_2.cjs.entry.js +2 -1
  38. package/dist/cjs/ifx-spinner_2.cjs.entry.js.map +1 -1
  39. package/dist/cjs/ifx-table.cjs.entry.js +1207 -0
  40. package/dist/cjs/ifx-table.cjs.entry.js.map +1 -0
  41. package/dist/cjs/ifx-table.entry.cjs.js.map +1 -0
  42. package/dist/cjs/{index-DihxupoM.js → index-CVw4GUo6.js} +4 -7
  43. package/dist/{esm/index-Beav1bNT.js.map → cjs/index-CVw4GUo6.js.map} +1 -1
  44. package/dist/cjs/index-Dc5gCGlQ.js +30 -2
  45. package/dist/cjs/infineon-design-system-stencil.cjs.js +1 -1
  46. package/dist/cjs/loader.cjs.js +1 -1
  47. package/dist/collection/components/table-advanced-version/table.js +66 -25
  48. package/dist/collection/components/table-advanced-version/table.js.map +1 -1
  49. package/dist/components/ifx-table.js +66 -25
  50. package/dist/components/ifx-table.js.map +1 -1
  51. package/dist/esm/_commonjsHelpers-B85MJLTf.js +8 -0
  52. package/dist/esm/_commonjsHelpers-B85MJLTf.js.map +1 -0
  53. package/dist/esm/ifx-action-list-item.entry.js +2 -1
  54. package/dist/esm/ifx-action-list-item.entry.js.map +1 -1
  55. package/dist/esm/ifx-basic-table.entry.js +2 -1
  56. package/dist/esm/ifx-basic-table.entry.js.map +1 -1
  57. package/dist/esm/ifx-button.entry.js +144 -0
  58. package/dist/esm/ifx-button.entry.js.map +1 -0
  59. package/dist/esm/ifx-checkbox.entry.js +123 -0
  60. package/dist/esm/ifx-checkbox.entry.js.map +1 -0
  61. package/dist/esm/ifx-chip.ifx-chip-item.ifx-pagination.entry.js.map +1 -0
  62. package/dist/esm/ifx-chip_3.entry.js +611 -0
  63. package/dist/esm/ifx-chip_3.entry.js.map +1 -0
  64. package/dist/esm/ifx-icon-button.entry.js +74 -0
  65. package/dist/esm/ifx-icon-button.entry.js.map +1 -0
  66. package/dist/esm/ifx-icon.entry.js +125 -0
  67. package/dist/esm/ifx-icon.entry.js.map +1 -0
  68. package/dist/esm/ifx-indicator.entry.js +40 -0
  69. package/dist/esm/ifx-indicator.entry.js.map +1 -0
  70. package/dist/esm/ifx-link.entry.js +2 -1
  71. package/dist/esm/ifx-link.entry.js.map +1 -1
  72. package/dist/esm/ifx-search-field.entry.js +2 -1
  73. package/dist/esm/ifx-search-field.entry.js.map +1 -1
  74. package/dist/esm/ifx-select.entry.js +7321 -0
  75. package/dist/esm/ifx-select.entry.js.map +1 -0
  76. package/dist/esm/ifx-spinner.ifx-text-field.entry.js.map +1 -1
  77. package/dist/esm/ifx-spinner_2.entry.js +2 -1
  78. package/dist/esm/ifx-spinner_2.entry.js.map +1 -1
  79. package/dist/esm/ifx-table.entry.js +1205 -0
  80. package/dist/esm/ifx-table.entry.js.map +1 -0
  81. package/dist/esm/{index-Beav1bNT.js → index-Bt32KzDW.js} +4 -6
  82. package/dist/{cjs/index-DihxupoM.js.map → esm/index-Bt32KzDW.js.map} +1 -1
  83. package/dist/esm/index-PqnYwNKt.js +30 -2
  84. package/dist/esm/infineon-design-system-stencil.js +1 -1
  85. package/dist/esm/loader.js +1 -1
  86. package/dist/infineon-design-system-stencil/ifx-action-list-item.entry.esm.js.map +1 -1
  87. package/dist/infineon-design-system-stencil/ifx-basic-table.entry.esm.js.map +1 -1
  88. package/dist/infineon-design-system-stencil/ifx-button.entry.esm.js.map +1 -0
  89. package/dist/infineon-design-system-stencil/ifx-checkbox.entry.esm.js.map +1 -0
  90. package/dist/infineon-design-system-stencil/ifx-chip.ifx-chip-item.ifx-pagination.entry.esm.js.map +1 -0
  91. package/dist/infineon-design-system-stencil/ifx-icon-button.entry.esm.js.map +1 -0
  92. package/dist/infineon-design-system-stencil/ifx-icon.entry.esm.js.map +1 -0
  93. package/dist/infineon-design-system-stencil/ifx-indicator.entry.esm.js.map +1 -0
  94. package/dist/infineon-design-system-stencil/ifx-link.entry.esm.js.map +1 -1
  95. package/dist/infineon-design-system-stencil/ifx-search-field.entry.esm.js.map +1 -1
  96. package/dist/infineon-design-system-stencil/ifx-select.entry.esm.js.map +1 -0
  97. package/dist/infineon-design-system-stencil/ifx-spinner.ifx-text-field.entry.esm.js.map +1 -1
  98. package/dist/infineon-design-system-stencil/ifx-table.entry.esm.js.map +1 -0
  99. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
  100. package/dist/infineon-design-system-stencil/p-169f26ae.entry.js +2 -0
  101. package/dist/infineon-design-system-stencil/{p-6fd710a6.entry.js.map → p-169f26ae.entry.js.map} +1 -1
  102. package/dist/infineon-design-system-stencil/p-2d5290c7.entry.js +2 -0
  103. package/dist/infineon-design-system-stencil/p-2d5290c7.entry.js.map +1 -0
  104. package/dist/infineon-design-system-stencil/p-39561a49.entry.js +2 -0
  105. package/dist/infineon-design-system-stencil/p-39561a49.entry.js.map +1 -0
  106. package/dist/infineon-design-system-stencil/p-3d77ef02.entry.js +2 -0
  107. package/dist/infineon-design-system-stencil/{p-81f0d6ad.entry.js.map → p-3d77ef02.entry.js.map} +1 -1
  108. package/dist/infineon-design-system-stencil/p-4da5a2a5.entry.js +2 -0
  109. package/dist/infineon-design-system-stencil/p-4da5a2a5.entry.js.map +1 -0
  110. package/dist/infineon-design-system-stencil/p-4fba0543.entry.js +2 -0
  111. package/dist/infineon-design-system-stencil/{p-7b705420.entry.js.map → p-4fba0543.entry.js.map} +1 -1
  112. package/dist/infineon-design-system-stencil/p-5e3d0ff0.entry.js +2 -0
  113. package/dist/infineon-design-system-stencil/p-5e3d0ff0.entry.js.map +1 -0
  114. package/dist/infineon-design-system-stencil/p-5fb3eb8b.entry.js +2 -0
  115. package/dist/infineon-design-system-stencil/p-5fb3eb8b.entry.js.map +1 -0
  116. package/dist/infineon-design-system-stencil/p-6e115707.entry.js +2 -0
  117. package/dist/infineon-design-system-stencil/{p-1b5dce92.entry.js.map → p-6e115707.entry.js.map} +1 -1
  118. package/dist/infineon-design-system-stencil/p-8a58c2be.entry.js +2 -0
  119. package/dist/infineon-design-system-stencil/p-8a58c2be.entry.js.map +1 -0
  120. package/dist/infineon-design-system-stencil/p-B85MJLTf.js +2 -0
  121. package/dist/infineon-design-system-stencil/p-B85MJLTf.js.map +1 -0
  122. package/dist/infineon-design-system-stencil/{p-Beav1bNT.js → p-DMLRPGid.js} +3 -3
  123. package/dist/infineon-design-system-stencil/{p-Beav1bNT.js.map → p-DMLRPGid.js.map} +1 -1
  124. package/dist/infineon-design-system-stencil/p-a85754a5.entry.js +3 -0
  125. package/dist/infineon-design-system-stencil/p-a85754a5.entry.js.map +1 -0
  126. package/dist/infineon-design-system-stencil/p-fcae5dc1.entry.js +2 -0
  127. package/dist/infineon-design-system-stencil/{p-646620f9.entry.js.map → p-fcae5dc1.entry.js.map} +1 -1
  128. package/dist/infineon-design-system-stencil/p-ff4cc197.entry.js +2 -0
  129. package/dist/infineon-design-system-stencil/p-ff4cc197.entry.js.map +1 -0
  130. package/package.json +1 -1
  131. package/dist/cjs/ifx-button.ifx-checkbox.ifx-chip.ifx-chip-item.ifx-icon.ifx-icon-button.ifx-indicator.ifx-pagination.ifx-select.ifx-table.entry.cjs.js.map +0 -1
  132. package/dist/cjs/ifx-button_10.cjs.entry.js +0 -9551
  133. package/dist/cjs/ifx-button_10.cjs.entry.js.map +0 -1
  134. package/dist/esm/ifx-button.ifx-checkbox.ifx-chip.ifx-chip-item.ifx-icon.ifx-icon-button.ifx-indicator.ifx-pagination.ifx-select.ifx-table.entry.js.map +0 -1
  135. package/dist/esm/ifx-button_10.entry.js +0 -9540
  136. package/dist/esm/ifx-button_10.entry.js.map +0 -1
  137. package/dist/infineon-design-system-stencil/ifx-button.ifx-checkbox.ifx-chip.ifx-chip-item.ifx-icon.ifx-icon-button.ifx-indicator.ifx-pagination.ifx-select.ifx-table.entry.esm.js.map +0 -1
  138. package/dist/infineon-design-system-stencil/p-1b5dce92.entry.js +0 -2
  139. package/dist/infineon-design-system-stencil/p-3f6242bc.entry.js +0 -3
  140. package/dist/infineon-design-system-stencil/p-3f6242bc.entry.js.map +0 -1
  141. package/dist/infineon-design-system-stencil/p-646620f9.entry.js +0 -2
  142. package/dist/infineon-design-system-stencil/p-6fd710a6.entry.js +0 -2
  143. package/dist/infineon-design-system-stencil/p-7b705420.entry.js +0 -2
  144. package/dist/infineon-design-system-stencil/p-81f0d6ad.entry.js +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"ifx-spinner.ifx-text-field.entry.cjs.js","sources":["src/components/spinner/spinner.scss?tag=ifx-spinner&encapsulation=shadow","src/components/spinner/spinner.tsx","src/components/text-field/text-field.scss?tag=ifx-text-field&encapsulation=shadow","src/components/text-field/text-field.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n\n:host {\n display: inline-block;\n\n}\n\n.spinner {\n position: relative;\n width: tokens.$ifxSize500;\n height: tokens.$ifxSize500;\n\n}\n\n.spinner.s {\n width: tokens.$ifxSize300;\n height: tokens.$ifxSize300;\n}\n\n.border {\n box-sizing: border-box;\n position: absolute;\n width: 100%;\n height: 100%;\n border: 4px solid transparent;\n border-top-color: tokens.$ifxColorOcean500;\n border-left-color: tokens.$ifxColorOcean500;\n border-right-color: tokens.$ifxColorOcean500;\n border-top-left-radius: 1px;\n border-top-right-radius: 1px;\n border-radius: 50%;\n animation: spin 2s linear infinite;\n\n &.inverted {\n border-top-color: tokens.$ifxColorBaseWhite;\n border-left-color: tokens.$ifxColorBaseWhite;\n border-right-color: tokens.$ifxColorBaseWhite;\n }\n}\n\n.semiconductor {\n width: 100%;\n height: 100%;\n animation: spin 2s linear infinite;\n\n & svg {\n fill: tokens.$ifxColorOcean500;\n }\n\n &.inverted {\n & svg {\n fill: tokens.$ifxColorBaseWhite;\n }\n }\n\n &.s {\n & svg {\n width: tokens.$ifxSize300;\n height: tokens.$ifxSize300;\n }\n }\n}\n\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}","import { Component, h, Prop, Element } from '@stencil/core';\nimport { trackComponent } from '../../global/utils/tracking';\nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\nimport classNames from 'classnames';\n \n@Component({\n tag: 'ifx-spinner',\n styleUrl: 'spinner.scss',\n shadow: true,\n})\nexport class Spinner {\n @Element() el;\n @Prop() size: string;\n @Prop() variant: string;\n @Prop() inverted: boolean = false;\n @Prop() ariaLabel: string | null;\n\n async componentDidLoad() { \n if(!isNestedInIfxComponent(this.el)) { \n const framework = detectFramework();\n trackComponent('ifx-spinner', await framework)\n }\n }\n\n render() {\n return (\n <div role=\"status\" \n aria-label={this.ariaLabel || \"Loading\"}\n class={this.getClassNames()}>\n <div class={`${this.variant !== 'brand' ? 'border' : \"\"} ${this.inverted ? 'inverted' : \"\"}`}></div>\n {this.variant === 'brand'\n && <div class={`semiconductor ${this.inverted ? 'inverted' : \"\"} ${this.getSizeClass()}`}>\n <svg width='40' height='40' viewBox=\"0 0 40 40\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g id=\"spinner/conductor\">\n <path id=\"Vector\" d=\"M38.75 18.75C39.4375 18.75 40 19.3125 40 20C40 20.6875 39.4409 21.25 38.75 21.25H35V26.25H38.75C39.4375 26.25 40 26.8125 40 27.5C40 28.1875 39.4409 28.75 38.75 28.75H35V30C35 32.7617 32.7617 35 30 35H28.75V38.75C28.75 39.4409 28.1875 40 27.5 40C26.8125 40 26.25 39.4409 26.25 38.75V35H21.25V38.75C21.25 39.4409 20.6875 40 20 40C19.3125 40 18.75 39.4409 18.75 38.75V35H13.75V38.75C13.75 39.4409 13.1875 40 12.5 40C11.8125 40 11.25 39.4409 11.25 38.75V35H10C7.23828 35 5 32.7617 5 30V28.75H1.25C0.559062 28.75 0 28.1875 0 27.5C0 26.8125 0.559062 26.25 1.25 26.25H5V21.25H1.25C0.559062 21.25 0 20.6875 0 20C0 19.3125 0.559062 18.75 1.25 18.75H5V13.75H1.25C0.559062 13.75 0 13.1875 0 12.5C0 11.8125 0.559062 11.25 1.25 11.25H5V10C5 7.23828 7.23828 5 10 5H11.25V1.25C11.25 0.5625 11.8125 0 12.5 0C13.1875 0 13.75 0.559063 13.75 1.25V5H18.75V1.25C18.75 0.559063 19.3091 0 20 0C20.6909 0 21.25 0.559063 21.25 1.25V5H26.25V1.25C26.25 0.559063 26.8091 0 27.5 0C28.1909 0 28.75 0.559063 28.75 1.25V5H30C32.7617 5 35 7.23828 35 10V11.25H38.75C39.4409 11.25 40 11.8091 40 12.5C40 13.1909 39.4409 13.75 38.75 13.75H35V18.75H38.75ZM32.5 10C32.5 8.62188 31.3781 7.5 30 7.5H10C8.62187 7.5 7.5 8.62188 7.5 10V30C7.5 31.3781 8.62187 32.5 10 32.5H30C31.3781 32.5 32.5 31.3781 32.5 30V10Z\" />\n </g>\n </svg>\n </div>}\n </div>\n );\n }\n\n getSizeClass() {\n return `${this.size}` === \"s\"\n ? \"s\"\n : \"\";\n }\n\n getClassNames() {\n return classNames(\n 'spinner',\n this.size && `spinner ${this.getSizeClass()}`\n );\n }\n}\n","@use '~@infineon/design-system-tokens/dist/tokens';\n@use '../../global/font.scss';\n\n:host {\n display: flex;\n}\n\n.textInput__container {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 0px;\n width: 100%;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n font-family: var(--ifx-font-family); // tokens.$ifxFontFamilyBody;\n\n & .delete-icon {\n position: absolute;\n right: tokens.$ifxSpace200;\n }\n\n &:not(.readonly, .disabled) .delete-icon {\n &:hover {\n cursor: pointer;\n }\n }\n\n &.disabled:not(.readonly) {\n\n & #text-field { \n color: tokens.$ifxColorBaseWhite;\n }\n\n & .delete-icon { \n color: tokens.$ifxColorBaseWhite;\n }\n \n & .textInput__top-wrapper {\n & label {\n color: tokens.$ifxColorEngineering300;\n }\n\n & .required {\n color: tokens.$ifxColorEngineering300;\n }\n }\n\n & .textInput__bottom-wrapper {\n input {\n border: 1px solid tokens.$ifxColorEngineering300;\n background-color: tokens.$ifxColorEngineering300;\n\n &::placeholder {\n font-size: tokens.$ifxFontSizeM;\n color: tokens.$ifxColorBaseWhite;\n }\n }\n }\n }\n\n & .textInput__top-wrapper {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n padding: 0px;\n gap: tokens.$ifxSpace50;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n\n & label {\n font-style: normal;\n font-weight: tokens.$ifxFontWeightRegular;\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightM;\n display: flex;\n align-items: center;\n color: tokens.$ifxColorBaseBlack;\n flex: none;\n order: 0;\n flex-grow: 0;\n\n & .optional-required {\n margin-left: tokens.$ifxSpace50;\n }\n\n & .optional {\n margin-left: tokens.$ifxSpace50;\n }\n\n & .required {\n color: tokens.$ifxColorEngineering500;\n margin-left: tokens.$ifxSpace50;\n\n &.error {\n color: tokens.$ifxColorRed500;\n }\n }\n }\n }\n\n .input-container {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n }\n\n & .textInput__bottom-wrapper {\n flex-grow: 1;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 0px;\n gap: tokens.$ifxSpace50;\n flex: none;\n order: 1;\n align-self: stretch;\n flex-grow: 0;\n\n & input {\n width: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: tokens.$ifxSpace100 tokens.$ifxSpace200;\n gap: tokens.$ifxSpace100;\n height: tokens.$ifxSize500;\n background-color: tokens.$ifxColorBaseWhite;\n color: tokens.$ifxColorBaseBlack;\n font-family: var(--ifx-font-family); // tokens.$ifxFontFamilyBody;\n\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightM;\n border: 1px solid tokens.$ifxColorEngineering400;\n border-radius: tokens.$ifxBorderRadius12;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n text-overflow: ellipsis;\n\n &.input-s {\n height: tokens.$ifxSize450;\n font-size: tokens.$ifxFontSizeS;\n line-height: tokens.$ifxLineHeightS;\n\n &::placeholder {\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightS;\n }\n }\n\n &.icon {\n padding-left: tokens.$ifxSpace500;\n }\n\n &.error {\n border: 1px solid tokens.$ifxColorRed500;\n\n &:focus {\n outline: none;\n }\n }\n\n &.readonly {\n border: none;\n border-radius: var(--borderRadius-12, 1px);\n border-bottom: 1px solid var(--color-engineering-300, #bfbbbb);\n background: var(--color-base-white, #fff);\n padding-left: 0;\n\n &::placeholder {\n color: tokens.$ifxColorBaseBlack;\n }\n }\n\n &.success {\n border: 1px solid tokens.$ifxColorGreen500;\n\n &:focus {\n outline: none;\n }\n }\n\n &:focus:not(.error, .success):not(.readonly) {\n outline: none;\n border: 1px solid tokens.$ifxColorOcean500;\n }\n\n &.readonly:focus,\n &[readonly]:focus {\n outline: none;\n box-shadow: none;\n border: none;\n border-bottom: 1px solid var(--color-engineering-300, #bfbbbb);\n }\n\n &:hover:not(:disabled, :focus, .error, .success):not(.readonly) {\n border: 1px solid tokens.$ifxColorEngineering500;\n }\n }\n\n & .input-icon {\n // Position the icon within the icon container\n // Adjust the positioning as needed\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n left: tokens.$ifxSpace200;\n /* Adjust this value to control the icon's left offset */\n transition: 0.3s;\n color: tokens.$ifxColorEngineering400;\n }\n\n & .textInput__bottom-wrapper-caption {\n font-style: normal;\n font-weight: tokens.$ifxFontWeightRegular;\n font-size: tokens.$ifxFontSizeXs;\n line-height: tokens.$ifxLineHeightXs;\n color: tokens.$ifxColorBaseBlack;\n flex: none;\n order: 1;\n align-self: stretch;\n flex-grow: 0;\n\n &.error {\n color: tokens.$ifxColorRed500;\n }\n\n &.disabled {\n color: tokens.$ifxColorEngineering300;\n }\n }\n }\n}","import { Component, h, Event, Element, Prop, EventEmitter, Watch, Method, AttachInternals, State } from '@stencil/core';\nimport { trackComponent } from '../../global/utils/tracking';\nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\n\n@Component({\n tag: 'ifx-text-field',\n styleUrl: 'text-field.scss',\n shadow: true,\n // formAssociated: true\n})\nexport class TextField {\n private inputElement: HTMLInputElement;\n @Element() el;\n @Prop() placeholder: string = 'Placeholder';\n @Prop({ mutable: true }) value: string = '';\n @Prop() error: boolean = false;\n @Prop() label: string = '';\n @Prop() icon: string = '';\n @Prop() caption: string = '';\n @Prop() size: string = 'm';\n @Prop() required: boolean = false;\n @Prop() success: boolean = false;\n @Prop() disabled: boolean = false;\n @Prop() readOnly: boolean = false;\n @Prop() maxlength?: number;\n @Prop() showDeleteIcon: boolean = false;\n @Prop() autocomplete: string = 'on';\n @Prop() type: 'text' | 'password' = 'text';\n @Prop() internalId: string = 'text-field';\n @State() internalType: string;\n @Event() ifxInput: EventEmitter<String>;\n // @Prop({ reflect: true })\n // resetOnSubmit: boolean = false;\n\n @AttachInternals() internals: ElementInternals;\n\n @Watch('value')\n valueWatcher(newValue: string) {\n if (newValue !== this.inputElement.value) {\n this.inputElement.value = newValue;\n }\n }\n\n @Method()\n async reset() {\n this.value = '';\n this.inputElement.value = '';\n }\n\n handleDeleteContent() {\n if (!this.disabled && !this.readOnly) {\n this.reset();\n this.ifxInput.emit(this.value);\n }\n }\n\n handleInput() {\n const query = this.inputElement.value;\n this.value = query;\n //this.internals.setFormValue(query) // update form value\n this.ifxInput.emit(this.value);\n }\n\n handleTypeProp() {\n this.internalType = this.type === 'text' || this.type === 'password' ? this.type : 'text';\n }\n\n // formResetCallback() {\n // this.internals.setValidity({});\n // this.internals.setFormValue(\"\");\n // }\n\n componentWillLoad() {\n this.handleTypeProp();\n }\n\n async componentDidLoad() {\n if (!isNestedInIfxComponent(this.el)) {\n const framework = detectFramework();\n trackComponent('ifx-text-field', await framework);\n }\n }\n\n render() {\n return (\n <div\n aria-label=\"a text field for user input\"\n aria-value={this.value}\n aria-disabled={this.disabled}\n class={`textInput__container ${this.readOnly ? 'readonly' : ''} ${this.disabled && !this.error ? 'disabled' : ''}`}\n >\n <div class=\"textInput__top-wrapper\">\n {this.label && (\n <label htmlFor={this.internalId}>\n <span>{this.label}</span>\n {this.required && <span class={`required ${this.error && !this.readOnly ? 'error' : ''}`}>*</span>}\n </label>\n )}\n </div>\n\n <div class=\"textInput__bottom-wrapper\">\n <div class=\"input-container\">\n {this.icon && <ifx-icon class=\"input-icon\" icon={this.icon} />}\n <input\n ref={el => (this.inputElement = el)}\n disabled={this.disabled && !this.error}\n autocomplete={this.autocomplete}\n type={this.internalType}\n id={this.internalId}\n value={this.value}\n onInput={() => this.handleInput()}\n placeholder={this.placeholder}\n readonly={this.readOnly}\n maxlength={this.maxlength}\n class={`${this.icon ? 'icon' : ''}\n ${this.error ? 'error' : ''} \n ${this.readOnly ? 'readonly' : ''} \n ${this.size === 's' ? 'input-s' : ''}\n ${this.success ? 'success' : ''}`}\n />\n\n {this.showDeleteIcon && this.value && <ifx-icon class=\"delete-icon\" icon=\"cRemove16\" onClick={() => this.handleDeleteContent()}></ifx-icon>}\n </div>\n {this.caption && (\n <div class={`textInput__bottom-wrapper-caption ${this.error && !this.readOnly ? 'error' : ''} ${this.disabled && !this.readOnly && !this.error ? 'disabled' : ''}`}>\n {this.caption}\n </div>\n )}\n </div>\n </div>\n );\n }\n}\n"],"names":["isNestedInIfxComponent","detectFramework","trackComponent","h","classNames"],"mappings":";;;;;;;AAAA,MAAM,UAAU,GAAG,mvBAAmvB;;MCWzvB,OAAO,GAAA,MAAA;AALpB,IAAA,WAAA,CAAA,OAAA,EAAA;;AASU,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAwClC;AArCC,IAAA,MAAM,gBAAgB,GAAA;QACpB,IAAG,CAACA,+BAAsB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;AACnC,YAAA,MAAM,SAAS,GAAGC,kCAAe,EAAE;AACnC,YAAAC,iCAAc,CAAC,aAAa,EAAE,MAAM,SAAS,CAAC;;;IAIlD,MAAM,GAAA;AACJ,QAAA,QACEC,OAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,QAAQ,gBACN,IAAI,CAAC,SAAS,IAAI,SAAS,EACrC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,EAAA,EAC3BA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAE,CAAA,EAAG,IAAI,CAAC,OAAO,KAAK,OAAO,GAAG,QAAQ,GAAG,EAAE,CAAI,CAAA,EAAA,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,EAAE,CAAE,CAAA,EAAQ,CAAA,EACnG,IAAI,CAAC,OAAO,KAAK;eACbA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAE,iBAAiB,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,EAAE,CAAA,CAAA,EAAI,IAAI,CAAC,YAAY,EAAE,CAAE,CAAA,EAAA,EACtFA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAA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A,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,UAAU,GAAG,EAAE,CAAA,CAAE,EAAA,EAC/J,IAAI,CAAC,OAAO,CACT,CACP,CACG,CACF;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ifx-spinner.ifx-text-field.entry.cjs.js","sources":["src/components/spinner/spinner.scss?tag=ifx-spinner&encapsulation=shadow","src/components/spinner/spinner.tsx","src/components/text-field/text-field.scss?tag=ifx-text-field&encapsulation=shadow","src/components/text-field/text-field.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n\n:host {\n display: inline-block;\n\n}\n\n.spinner {\n position: relative;\n width: tokens.$ifxSize500;\n height: tokens.$ifxSize500;\n\n}\n\n.spinner.s {\n width: tokens.$ifxSize300;\n height: tokens.$ifxSize300;\n}\n\n.border {\n box-sizing: border-box;\n position: absolute;\n width: 100%;\n height: 100%;\n border: 4px solid transparent;\n border-top-color: tokens.$ifxColorOcean500;\n border-left-color: tokens.$ifxColorOcean500;\n border-right-color: tokens.$ifxColorOcean500;\n border-top-left-radius: 1px;\n border-top-right-radius: 1px;\n border-radius: 50%;\n animation: spin 2s linear infinite;\n\n &.inverted {\n border-top-color: tokens.$ifxColorBaseWhite;\n border-left-color: tokens.$ifxColorBaseWhite;\n border-right-color: tokens.$ifxColorBaseWhite;\n }\n}\n\n.semiconductor {\n width: 100%;\n height: 100%;\n animation: spin 2s linear infinite;\n\n & svg {\n fill: tokens.$ifxColorOcean500;\n }\n\n &.inverted {\n & svg {\n fill: tokens.$ifxColorBaseWhite;\n }\n }\n\n &.s {\n & svg {\n width: tokens.$ifxSize300;\n height: tokens.$ifxSize300;\n }\n }\n}\n\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}","import { Component, h, Prop, Element } from '@stencil/core';\nimport { trackComponent } from '../../global/utils/tracking';\nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\nimport classNames from 'classnames';\n \n@Component({\n tag: 'ifx-spinner',\n styleUrl: 'spinner.scss',\n shadow: true,\n})\nexport class Spinner {\n @Element() el;\n @Prop() size: string;\n @Prop() variant: string;\n @Prop() inverted: boolean = false;\n @Prop() ariaLabel: string | null;\n\n async componentDidLoad() { \n if(!isNestedInIfxComponent(this.el)) { \n const framework = detectFramework();\n trackComponent('ifx-spinner', await framework)\n }\n }\n\n render() {\n return (\n <div role=\"status\" \n aria-label={this.ariaLabel || \"Loading\"}\n class={this.getClassNames()}>\n <div class={`${this.variant !== 'brand' ? 'border' : \"\"} ${this.inverted ? 'inverted' : \"\"}`}></div>\n {this.variant === 'brand'\n && <div class={`semiconductor ${this.inverted ? 'inverted' : \"\"} ${this.getSizeClass()}`}>\n <svg width='40' height='40' viewBox=\"0 0 40 40\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g id=\"spinner/conductor\">\n <path id=\"Vector\" d=\"M38.75 18.75C39.4375 18.75 40 19.3125 40 20C40 20.6875 39.4409 21.25 38.75 21.25H35V26.25H38.75C39.4375 26.25 40 26.8125 40 27.5C40 28.1875 39.4409 28.75 38.75 28.75H35V30C35 32.7617 32.7617 35 30 35H28.75V38.75C28.75 39.4409 28.1875 40 27.5 40C26.8125 40 26.25 39.4409 26.25 38.75V35H21.25V38.75C21.25 39.4409 20.6875 40 20 40C19.3125 40 18.75 39.4409 18.75 38.75V35H13.75V38.75C13.75 39.4409 13.1875 40 12.5 40C11.8125 40 11.25 39.4409 11.25 38.75V35H10C7.23828 35 5 32.7617 5 30V28.75H1.25C0.559062 28.75 0 28.1875 0 27.5C0 26.8125 0.559062 26.25 1.25 26.25H5V21.25H1.25C0.559062 21.25 0 20.6875 0 20C0 19.3125 0.559062 18.75 1.25 18.75H5V13.75H1.25C0.559062 13.75 0 13.1875 0 12.5C0 11.8125 0.559062 11.25 1.25 11.25H5V10C5 7.23828 7.23828 5 10 5H11.25V1.25C11.25 0.5625 11.8125 0 12.5 0C13.1875 0 13.75 0.559063 13.75 1.25V5H18.75V1.25C18.75 0.559063 19.3091 0 20 0C20.6909 0 21.25 0.559063 21.25 1.25V5H26.25V1.25C26.25 0.559063 26.8091 0 27.5 0C28.1909 0 28.75 0.559063 28.75 1.25V5H30C32.7617 5 35 7.23828 35 10V11.25H38.75C39.4409 11.25 40 11.8091 40 12.5C40 13.1909 39.4409 13.75 38.75 13.75H35V18.75H38.75ZM32.5 10C32.5 8.62188 31.3781 7.5 30 7.5H10C8.62187 7.5 7.5 8.62188 7.5 10V30C7.5 31.3781 8.62187 32.5 10 32.5H30C31.3781 32.5 32.5 31.3781 32.5 30V10Z\" />\n </g>\n </svg>\n </div>}\n </div>\n );\n }\n\n getSizeClass() {\n return `${this.size}` === \"s\"\n ? \"s\"\n : \"\";\n }\n\n getClassNames() {\n return classNames(\n 'spinner',\n this.size && `spinner ${this.getSizeClass()}`\n );\n }\n}\n","@use '~@infineon/design-system-tokens/dist/tokens';\n@use '../../global/font.scss';\n\n:host {\n display: flex;\n}\n\n.textInput__container {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 0px;\n width: 100%;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n font-family: var(--ifx-font-family); // tokens.$ifxFontFamilyBody;\n\n & .delete-icon {\n position: absolute;\n right: tokens.$ifxSpace200;\n }\n\n &:not(.readonly, .disabled) .delete-icon {\n &:hover {\n cursor: pointer;\n }\n }\n\n &.disabled:not(.readonly) {\n\n & #text-field { \n color: tokens.$ifxColorBaseWhite;\n }\n\n & .delete-icon { \n color: tokens.$ifxColorBaseWhite;\n }\n \n & .textInput__top-wrapper {\n & label {\n color: tokens.$ifxColorEngineering300;\n }\n\n & .required {\n color: tokens.$ifxColorEngineering300;\n }\n }\n\n & .textInput__bottom-wrapper {\n input {\n border: 1px solid tokens.$ifxColorEngineering300;\n background-color: tokens.$ifxColorEngineering300;\n\n &::placeholder {\n font-size: tokens.$ifxFontSizeM;\n color: tokens.$ifxColorBaseWhite;\n }\n }\n }\n }\n\n & .textInput__top-wrapper {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n padding: 0px;\n gap: tokens.$ifxSpace50;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n\n & label {\n font-style: normal;\n font-weight: tokens.$ifxFontWeightRegular;\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightM;\n display: flex;\n align-items: center;\n color: tokens.$ifxColorBaseBlack;\n flex: none;\n order: 0;\n flex-grow: 0;\n\n & .optional-required {\n margin-left: tokens.$ifxSpace50;\n }\n\n & .optional {\n margin-left: tokens.$ifxSpace50;\n }\n\n & .required {\n color: tokens.$ifxColorEngineering500;\n margin-left: tokens.$ifxSpace50;\n\n &.error {\n color: tokens.$ifxColorRed500;\n }\n }\n }\n }\n\n .input-container {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n }\n\n & .textInput__bottom-wrapper {\n flex-grow: 1;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 0px;\n gap: tokens.$ifxSpace50;\n flex: none;\n order: 1;\n align-self: stretch;\n flex-grow: 0;\n\n & input {\n width: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: tokens.$ifxSpace100 tokens.$ifxSpace200;\n gap: tokens.$ifxSpace100;\n height: tokens.$ifxSize500;\n background-color: tokens.$ifxColorBaseWhite;\n color: tokens.$ifxColorBaseBlack;\n font-family: var(--ifx-font-family); // tokens.$ifxFontFamilyBody;\n\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightM;\n border: 1px solid tokens.$ifxColorEngineering400;\n border-radius: tokens.$ifxBorderRadius12;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n text-overflow: ellipsis;\n\n &.input-s {\n height: tokens.$ifxSize450;\n font-size: tokens.$ifxFontSizeS;\n line-height: tokens.$ifxLineHeightS;\n\n &::placeholder {\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightS;\n }\n }\n\n &.icon {\n padding-left: tokens.$ifxSpace500;\n }\n\n &.error {\n border: 1px solid tokens.$ifxColorRed500;\n\n &:focus {\n outline: none;\n }\n }\n\n &.readonly {\n border: none;\n border-radius: var(--borderRadius-12, 1px);\n border-bottom: 1px solid var(--color-engineering-300, #bfbbbb);\n background: var(--color-base-white, #fff);\n padding-left: 0;\n\n &::placeholder {\n color: tokens.$ifxColorBaseBlack;\n }\n }\n\n &.success {\n border: 1px solid tokens.$ifxColorGreen500;\n\n &:focus {\n outline: none;\n }\n }\n\n &:focus:not(.error, .success):not(.readonly) {\n outline: none;\n border: 1px solid tokens.$ifxColorOcean500;\n }\n\n &.readonly:focus,\n &[readonly]:focus {\n outline: none;\n box-shadow: none;\n border: none;\n border-bottom: 1px solid var(--color-engineering-300, #bfbbbb);\n }\n\n &:hover:not(:disabled, :focus, .error, .success):not(.readonly) {\n border: 1px solid tokens.$ifxColorEngineering500;\n }\n }\n\n & .input-icon {\n // Position the icon within the icon container\n // Adjust the positioning as needed\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n left: tokens.$ifxSpace200;\n /* Adjust this value to control the icon's left offset */\n transition: 0.3s;\n color: tokens.$ifxColorEngineering400;\n }\n\n & .textInput__bottom-wrapper-caption {\n font-style: normal;\n font-weight: tokens.$ifxFontWeightRegular;\n font-size: tokens.$ifxFontSizeXs;\n line-height: tokens.$ifxLineHeightXs;\n color: tokens.$ifxColorBaseBlack;\n flex: none;\n order: 1;\n align-self: stretch;\n flex-grow: 0;\n\n &.error {\n color: tokens.$ifxColorRed500;\n }\n\n &.disabled {\n color: tokens.$ifxColorEngineering300;\n }\n }\n }\n}","import { Component, h, Event, Element, Prop, EventEmitter, Watch, Method, AttachInternals, State } from '@stencil/core';\nimport { trackComponent } from '../../global/utils/tracking';\nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\n\n@Component({\n tag: 'ifx-text-field',\n styleUrl: 'text-field.scss',\n shadow: true,\n // formAssociated: true\n})\nexport class TextField {\n private inputElement: HTMLInputElement;\n @Element() el;\n @Prop() placeholder: string = 'Placeholder';\n @Prop({ mutable: true }) value: string = '';\n @Prop() error: boolean = false;\n @Prop() label: string = '';\n @Prop() icon: string = '';\n @Prop() caption: string = '';\n @Prop() size: string = 'm';\n @Prop() required: boolean = false;\n @Prop() success: boolean = false;\n @Prop() disabled: boolean = false;\n @Prop() readOnly: boolean = false;\n @Prop() maxlength?: number;\n @Prop() showDeleteIcon: boolean = false;\n @Prop() autocomplete: string = 'on';\n @Prop() type: 'text' | 'password' = 'text';\n @Prop() internalId: string = 'text-field';\n @State() internalType: string;\n @Event() ifxInput: EventEmitter<String>;\n // @Prop({ reflect: true })\n // resetOnSubmit: boolean = false;\n\n @AttachInternals() internals: ElementInternals;\n\n @Watch('value')\n valueWatcher(newValue: string) {\n if (newValue !== this.inputElement.value) {\n this.inputElement.value = newValue;\n }\n }\n\n @Method()\n async reset() {\n this.value = '';\n this.inputElement.value = '';\n }\n\n handleDeleteContent() {\n if (!this.disabled && !this.readOnly) {\n this.reset();\n this.ifxInput.emit(this.value);\n }\n }\n\n handleInput() {\n const query = this.inputElement.value;\n this.value = query;\n //this.internals.setFormValue(query) // update form value\n this.ifxInput.emit(this.value);\n }\n\n handleTypeProp() {\n this.internalType = this.type === 'text' || this.type === 'password' ? this.type : 'text';\n }\n\n // formResetCallback() {\n // this.internals.setValidity({});\n // this.internals.setFormValue(\"\");\n // }\n\n componentWillLoad() {\n this.handleTypeProp();\n }\n\n async componentDidLoad() {\n if (!isNestedInIfxComponent(this.el)) {\n const framework = detectFramework();\n trackComponent('ifx-text-field', await framework);\n }\n }\n\n render() {\n return (\n <div\n aria-label=\"a text field for user input\"\n aria-value={this.value}\n aria-disabled={this.disabled}\n class={`textInput__container ${this.readOnly ? 'readonly' : ''} ${this.disabled && !this.error ? 'disabled' : ''}`}\n >\n <div class=\"textInput__top-wrapper\">\n {this.label && (\n <label htmlFor={this.internalId}>\n <span>{this.label}</span>\n {this.required && <span class={`required ${this.error && !this.readOnly ? 'error' : ''}`}>*</span>}\n </label>\n )}\n </div>\n\n <div class=\"textInput__bottom-wrapper\">\n <div class=\"input-container\">\n {this.icon && <ifx-icon class=\"input-icon\" icon={this.icon} />}\n <input\n ref={el => (this.inputElement = el)}\n disabled={this.disabled && !this.error}\n autocomplete={this.autocomplete}\n type={this.internalType}\n id={this.internalId}\n value={this.value}\n onInput={() => this.handleInput()}\n placeholder={this.placeholder}\n readonly={this.readOnly}\n maxlength={this.maxlength}\n class={`${this.icon ? 'icon' : ''}\n ${this.error ? 'error' : ''} \n ${this.readOnly ? 'readonly' : ''} \n ${this.size === 's' ? 'input-s' : ''}\n ${this.success ? 'success' : ''}`}\n />\n\n {this.showDeleteIcon && this.value && <ifx-icon class=\"delete-icon\" icon=\"cRemove16\" onClick={() => this.handleDeleteContent()}></ifx-icon>}\n </div>\n {this.caption && (\n <div class={`textInput__bottom-wrapper-caption ${this.error && !this.readOnly ? 'error' : ''} ${this.disabled && !this.readOnly && !this.error ? 'disabled' : ''}`}>\n {this.caption}\n </div>\n )}\n </div>\n </div>\n );\n }\n}\n"],"names":["isNestedInIfxComponent","detectFramework","trackComponent","h","classNames"],"mappings":";;;;;;;;AAAA,MAAM,UAAU,GAAG,mvBAAmvB;;MCWzvB,OAAO,GAAA,MAAA;AALpB,IAAA,WAAA,CAAA,OAAA,EAAA;;AASU,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAwClC;AArCC,IAAA,MAAM,gBAAgB,GAAA;QACpB,IAAG,CAACA,+BAAsB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;AACnC,YAAA,MAAM,SAAS,GAAGC,kCAAe,EAAE;AACnC,YAAAC,iCAAc,CAAC,aAAa,EAAE,MAAM,SAAS,CAAC;;;IAIlD,MAAM,GAAA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AG,EAAE;kBAC7B,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,EAAE,CAAA;kBACzB,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,EAAE,CAAA;gBACjC,IAAI,CAAC,IAAI,KAAK,GAAG,GAAG,SAAS,GAAG,EAAE;gBAClC,IAAI,CAAC,OAAO,GAAG,SAAS,GAAG,EAAE,CAAA,CAAE,EACjC,CAAA,EAED,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,KAAK,IAAIA,OAAU,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,aAAa,EAAC,IAAI,EAAC,WAAW,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,mBAAmB,EAAE,EAAA,CAAa,CACvI,EACL,IAAI,CAAC,OAAO,KACXA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAE,CAAqC,kCAAA,EAAA,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,OAAO,GAAG,EAAE,CAAI,CAAA,EAAA,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,UAAU,GAAG,EAAE,CAAA,CAAE,EAAA,EAC/J,IAAI,CAAC,OAAO,CACT,CACP,CACG,CACF;;;;;;;;;;;;"}
@@ -3,7 +3,8 @@
3
3
  var index = require('./index-Dc5gCGlQ.js');
4
4
  var frameworkDetection = require('./framework-detection-C_6nNXcS.js');
5
5
  var domUtils = require('./dom-utils-dykhxr-_.js');
6
- var index$1 = require('./index-DihxupoM.js');
6
+ var index$1 = require('./index-CVw4GUo6.js');
7
+ require('./_commonjsHelpers-CFO10eej.js');
7
8
 
8
9
  const spinnerCss = ":host{display:inline-block}.spinner{position:relative;width:40px;height:40px}.spinner.s{width:24px;height:24px}.border{box-sizing:border-box;position:absolute;width:100%;height:100%;border:4px solid transparent;border-top-color:#0A8276;border-left-color:#0A8276;border-right-color:#0A8276;border-top-left-radius:1px;border-top-right-radius:1px;border-radius:50%;animation:spin 2s linear infinite}.border.inverted{border-top-color:#FFFFFF;border-left-color:#FFFFFF;border-right-color:#FFFFFF}.semiconductor{width:100%;height:100%;animation:spin 2s linear infinite}.semiconductor svg{fill:#0A8276}.semiconductor.inverted svg{fill:#FFFFFF}.semiconductor.s svg{width:24px;height:24px}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
9
10
 
@@ -1 +1 @@
1
- {"file":"ifx-spinner.ifx-text-field.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,UAAU,GAAG,mvBAAmvB;;MCWzvB,OAAO,GAAA,MAAA;AALpB,IAAA,WAAA,CAAA,OAAA,EAAA;;AASU,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAwClC;AArCC,IAAA,MAAM,gBAAgB,GAAA;QACpB,IAAG,CAACA,+BAAsB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;AACnC,YAAA,MAAM,SAAS,GAAGC,kCAAe,EAAE;AACnC,YAAAC,iCAAc,CAAC,aAAa,EAAE,MAAM,SAAS,CAAC;;;IAIlD,MAAM,GAAA;AACJ,QAAA,QACEC,OAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,QAAQ,gBACN,IAAI,CAAC,SAAS,IAAI,SAAS,EACrC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,EAAA,EAC3BA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAE,CAAA,EAAG,IAAI,CAAC,OAAO,KAAK,OAAO,GAAG,QAAQ,GAAG,EAAE,CAAI,CAAA,EAAA,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,EAAE,CAAE,CAAA,EAAQ,CAAA,EACnG,IAAI,CAAC,OAAO,KAAK;eACbA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,E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,IAAI,CAAC,OAAO,KACXA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAE,CAAqC,kCAAA,EAAA,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,OAAO,GAAG,EAAE,CAAI,CAAA,EAAA,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,UAAU,GAAG,EAAE,CAAA,CAAE,EAAA,EAC/J,IAAI,CAAC,OAAO,CACT,CACP,CACG,CACF;;;;;;;;;;;;","names":["isNestedInIfxComponent","detectFramework","trackComponent","h","classNames"],"sources":["src/components/spinner/spinner.scss?tag=ifx-spinner&encapsulation=shadow","src/components/spinner/spinner.tsx","src/components/text-field/text-field.scss?tag=ifx-text-field&encapsulation=shadow","src/components/text-field/text-field.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n\n:host {\n display: inline-block;\n\n}\n\n.spinner {\n position: relative;\n width: tokens.$ifxSize500;\n height: tokens.$ifxSize500;\n\n}\n\n.spinner.s {\n width: tokens.$ifxSize300;\n height: tokens.$ifxSize300;\n}\n\n.border {\n box-sizing: border-box;\n position: absolute;\n width: 100%;\n height: 100%;\n border: 4px solid transparent;\n border-top-color: tokens.$ifxColorOcean500;\n border-left-color: tokens.$ifxColorOcean500;\n border-right-color: tokens.$ifxColorOcean500;\n border-top-left-radius: 1px;\n border-top-right-radius: 1px;\n border-radius: 50%;\n animation: spin 2s linear infinite;\n\n &.inverted {\n border-top-color: tokens.$ifxColorBaseWhite;\n border-left-color: tokens.$ifxColorBaseWhite;\n border-right-color: tokens.$ifxColorBaseWhite;\n }\n}\n\n.semiconductor {\n width: 100%;\n height: 100%;\n animation: spin 2s linear infinite;\n\n & svg {\n fill: tokens.$ifxColorOcean500;\n }\n\n &.inverted {\n & svg {\n fill: tokens.$ifxColorBaseWhite;\n }\n }\n\n &.s {\n & svg {\n width: tokens.$ifxSize300;\n height: tokens.$ifxSize300;\n }\n }\n}\n\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}","import { Component, h, Prop, Element } from '@stencil/core';\nimport { trackComponent } from '../../global/utils/tracking';\nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\nimport classNames from 'classnames';\n \n@Component({\n tag: 'ifx-spinner',\n styleUrl: 'spinner.scss',\n shadow: true,\n})\nexport class Spinner {\n @Element() el;\n @Prop() size: string;\n @Prop() variant: string;\n @Prop() inverted: boolean = false;\n @Prop() ariaLabel: string | null;\n\n async componentDidLoad() { \n if(!isNestedInIfxComponent(this.el)) { \n const framework = detectFramework();\n trackComponent('ifx-spinner', await framework)\n }\n }\n\n render() {\n return (\n <div role=\"status\" \n aria-label={this.ariaLabel || \"Loading\"}\n class={this.getClassNames()}>\n <div class={`${this.variant !== 'brand' ? 'border' : \"\"} ${this.inverted ? 'inverted' : \"\"}`}></div>\n {this.variant === 'brand'\n && <div class={`semiconductor ${this.inverted ? 'inverted' : \"\"} ${this.getSizeClass()}`}>\n <svg width='40' height='40' viewBox=\"0 0 40 40\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g id=\"spinner/conductor\">\n <path id=\"Vector\" d=\"M38.75 18.75C39.4375 18.75 40 19.3125 40 20C40 20.6875 39.4409 21.25 38.75 21.25H35V26.25H38.75C39.4375 26.25 40 26.8125 40 27.5C40 28.1875 39.4409 28.75 38.75 28.75H35V30C35 32.7617 32.7617 35 30 35H28.75V38.75C28.75 39.4409 28.1875 40 27.5 40C26.8125 40 26.25 39.4409 26.25 38.75V35H21.25V38.75C21.25 39.4409 20.6875 40 20 40C19.3125 40 18.75 39.4409 18.75 38.75V35H13.75V38.75C13.75 39.4409 13.1875 40 12.5 40C11.8125 40 11.25 39.4409 11.25 38.75V35H10C7.23828 35 5 32.7617 5 30V28.75H1.25C0.559062 28.75 0 28.1875 0 27.5C0 26.8125 0.559062 26.25 1.25 26.25H5V21.25H1.25C0.559062 21.25 0 20.6875 0 20C0 19.3125 0.559062 18.75 1.25 18.75H5V13.75H1.25C0.559062 13.75 0 13.1875 0 12.5C0 11.8125 0.559062 11.25 1.25 11.25H5V10C5 7.23828 7.23828 5 10 5H11.25V1.25C11.25 0.5625 11.8125 0 12.5 0C13.1875 0 13.75 0.559063 13.75 1.25V5H18.75V1.25C18.75 0.559063 19.3091 0 20 0C20.6909 0 21.25 0.559063 21.25 1.25V5H26.25V1.25C26.25 0.559063 26.8091 0 27.5 0C28.1909 0 28.75 0.559063 28.75 1.25V5H30C32.7617 5 35 7.23828 35 10V11.25H38.75C39.4409 11.25 40 11.8091 40 12.5C40 13.1909 39.4409 13.75 38.75 13.75H35V18.75H38.75ZM32.5 10C32.5 8.62188 31.3781 7.5 30 7.5H10C8.62187 7.5 7.5 8.62188 7.5 10V30C7.5 31.3781 8.62187 32.5 10 32.5H30C31.3781 32.5 32.5 31.3781 32.5 30V10Z\" />\n </g>\n </svg>\n </div>}\n </div>\n );\n }\n\n getSizeClass() {\n return `${this.size}` === \"s\"\n ? \"s\"\n : \"\";\n }\n\n getClassNames() {\n return classNames(\n 'spinner',\n this.size && `spinner ${this.getSizeClass()}`\n );\n }\n}\n","@use '~@infineon/design-system-tokens/dist/tokens';\n@use '../../global/font.scss';\n\n:host {\n display: flex;\n}\n\n.textInput__container {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 0px;\n width: 100%;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n font-family: var(--ifx-font-family); // tokens.$ifxFontFamilyBody;\n\n & .delete-icon {\n position: absolute;\n right: tokens.$ifxSpace200;\n }\n\n &:not(.readonly, .disabled) .delete-icon {\n &:hover {\n cursor: pointer;\n }\n }\n\n &.disabled:not(.readonly) {\n\n & #text-field { \n color: tokens.$ifxColorBaseWhite;\n }\n\n & .delete-icon { \n color: tokens.$ifxColorBaseWhite;\n }\n \n & .textInput__top-wrapper {\n & label {\n color: tokens.$ifxColorEngineering300;\n }\n\n & .required {\n color: tokens.$ifxColorEngineering300;\n }\n }\n\n & .textInput__bottom-wrapper {\n input {\n border: 1px solid tokens.$ifxColorEngineering300;\n background-color: tokens.$ifxColorEngineering300;\n\n &::placeholder {\n font-size: tokens.$ifxFontSizeM;\n color: tokens.$ifxColorBaseWhite;\n }\n }\n }\n }\n\n & .textInput__top-wrapper {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n padding: 0px;\n gap: tokens.$ifxSpace50;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n\n & label {\n font-style: normal;\n font-weight: tokens.$ifxFontWeightRegular;\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightM;\n display: flex;\n align-items: center;\n color: tokens.$ifxColorBaseBlack;\n flex: none;\n order: 0;\n flex-grow: 0;\n\n & .optional-required {\n margin-left: tokens.$ifxSpace50;\n }\n\n & .optional {\n margin-left: tokens.$ifxSpace50;\n }\n\n & .required {\n color: tokens.$ifxColorEngineering500;\n margin-left: tokens.$ifxSpace50;\n\n &.error {\n color: tokens.$ifxColorRed500;\n }\n }\n }\n }\n\n .input-container {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n }\n\n & .textInput__bottom-wrapper {\n flex-grow: 1;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 0px;\n gap: tokens.$ifxSpace50;\n flex: none;\n order: 1;\n align-self: stretch;\n flex-grow: 0;\n\n & input {\n width: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: tokens.$ifxSpace100 tokens.$ifxSpace200;\n gap: tokens.$ifxSpace100;\n height: tokens.$ifxSize500;\n background-color: tokens.$ifxColorBaseWhite;\n color: tokens.$ifxColorBaseBlack;\n font-family: var(--ifx-font-family); // tokens.$ifxFontFamilyBody;\n\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightM;\n border: 1px solid tokens.$ifxColorEngineering400;\n border-radius: tokens.$ifxBorderRadius12;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n text-overflow: ellipsis;\n\n &.input-s {\n height: tokens.$ifxSize450;\n font-size: tokens.$ifxFontSizeS;\n line-height: tokens.$ifxLineHeightS;\n\n &::placeholder {\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightS;\n }\n }\n\n &.icon {\n padding-left: tokens.$ifxSpace500;\n }\n\n &.error {\n border: 1px solid tokens.$ifxColorRed500;\n\n &:focus {\n outline: none;\n }\n }\n\n &.readonly {\n border: none;\n border-radius: var(--borderRadius-12, 1px);\n border-bottom: 1px solid var(--color-engineering-300, #bfbbbb);\n background: var(--color-base-white, #fff);\n padding-left: 0;\n\n &::placeholder {\n color: tokens.$ifxColorBaseBlack;\n }\n }\n\n &.success {\n border: 1px solid tokens.$ifxColorGreen500;\n\n &:focus {\n outline: none;\n }\n }\n\n &:focus:not(.error, .success):not(.readonly) {\n outline: none;\n border: 1px solid tokens.$ifxColorOcean500;\n }\n\n &.readonly:focus,\n &[readonly]:focus {\n outline: none;\n box-shadow: none;\n border: none;\n border-bottom: 1px solid var(--color-engineering-300, #bfbbbb);\n }\n\n &:hover:not(:disabled, :focus, .error, .success):not(.readonly) {\n border: 1px solid tokens.$ifxColorEngineering500;\n }\n }\n\n & .input-icon {\n // Position the icon within the icon container\n // Adjust the positioning as needed\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n left: tokens.$ifxSpace200;\n /* Adjust this value to control the icon's left offset */\n transition: 0.3s;\n color: tokens.$ifxColorEngineering400;\n }\n\n & .textInput__bottom-wrapper-caption {\n font-style: normal;\n font-weight: tokens.$ifxFontWeightRegular;\n font-size: tokens.$ifxFontSizeXs;\n line-height: tokens.$ifxLineHeightXs;\n color: tokens.$ifxColorBaseBlack;\n flex: none;\n order: 1;\n align-self: stretch;\n flex-grow: 0;\n\n &.error {\n color: tokens.$ifxColorRed500;\n }\n\n &.disabled {\n color: tokens.$ifxColorEngineering300;\n }\n }\n }\n}","import { Component, h, Event, Element, Prop, EventEmitter, Watch, Method, AttachInternals, State } from '@stencil/core';\nimport { trackComponent } from '../../global/utils/tracking';\nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\n\n@Component({\n tag: 'ifx-text-field',\n styleUrl: 'text-field.scss',\n shadow: true,\n // formAssociated: true\n})\nexport class TextField {\n private inputElement: HTMLInputElement;\n @Element() el;\n @Prop() placeholder: string = 'Placeholder';\n @Prop({ mutable: true }) value: string = '';\n @Prop() error: boolean = false;\n @Prop() label: string = '';\n @Prop() icon: string = '';\n @Prop() caption: string = '';\n @Prop() size: string = 'm';\n @Prop() required: boolean = false;\n @Prop() success: boolean = false;\n @Prop() disabled: boolean = false;\n @Prop() readOnly: boolean = false;\n @Prop() maxlength?: number;\n @Prop() showDeleteIcon: boolean = false;\n @Prop() autocomplete: string = 'on';\n @Prop() type: 'text' | 'password' = 'text';\n @Prop() internalId: string = 'text-field';\n @State() internalType: string;\n @Event() ifxInput: EventEmitter<String>;\n // @Prop({ reflect: true })\n // resetOnSubmit: boolean = false;\n\n @AttachInternals() internals: ElementInternals;\n\n @Watch('value')\n valueWatcher(newValue: string) {\n if (newValue !== this.inputElement.value) {\n this.inputElement.value = newValue;\n }\n }\n\n @Method()\n async reset() {\n this.value = '';\n this.inputElement.value = '';\n }\n\n handleDeleteContent() {\n if (!this.disabled && !this.readOnly) {\n this.reset();\n this.ifxInput.emit(this.value);\n }\n }\n\n handleInput() {\n const query = this.inputElement.value;\n this.value = query;\n //this.internals.setFormValue(query) // update form value\n this.ifxInput.emit(this.value);\n }\n\n handleTypeProp() {\n this.internalType = this.type === 'text' || this.type === 'password' ? this.type : 'text';\n }\n\n // formResetCallback() {\n // this.internals.setValidity({});\n // this.internals.setFormValue(\"\");\n // }\n\n componentWillLoad() {\n this.handleTypeProp();\n }\n\n async componentDidLoad() {\n if (!isNestedInIfxComponent(this.el)) {\n const framework = detectFramework();\n trackComponent('ifx-text-field', await framework);\n }\n }\n\n render() {\n return (\n <div\n aria-label=\"a text field for user input\"\n aria-value={this.value}\n aria-disabled={this.disabled}\n class={`textInput__container ${this.readOnly ? 'readonly' : ''} ${this.disabled && !this.error ? 'disabled' : ''}`}\n >\n <div class=\"textInput__top-wrapper\">\n {this.label && (\n <label htmlFor={this.internalId}>\n <span>{this.label}</span>\n {this.required && <span class={`required ${this.error && !this.readOnly ? 'error' : ''}`}>*</span>}\n </label>\n )}\n </div>\n\n <div class=\"textInput__bottom-wrapper\">\n <div class=\"input-container\">\n {this.icon && <ifx-icon class=\"input-icon\" icon={this.icon} />}\n <input\n ref={el => (this.inputElement = el)}\n disabled={this.disabled && !this.error}\n autocomplete={this.autocomplete}\n type={this.internalType}\n id={this.internalId}\n value={this.value}\n onInput={() => this.handleInput()}\n placeholder={this.placeholder}\n readonly={this.readOnly}\n maxlength={this.maxlength}\n class={`${this.icon ? 'icon' : ''}\n ${this.error ? 'error' : ''} \n ${this.readOnly ? 'readonly' : ''} \n ${this.size === 's' ? 'input-s' : ''}\n ${this.success ? 'success' : ''}`}\n />\n\n {this.showDeleteIcon && this.value && <ifx-icon class=\"delete-icon\" icon=\"cRemove16\" onClick={() => this.handleDeleteContent()}></ifx-icon>}\n </div>\n {this.caption && (\n <div class={`textInput__bottom-wrapper-caption ${this.error && !this.readOnly ? 'error' : ''} ${this.disabled && !this.readOnly && !this.error ? 'disabled' : ''}`}>\n {this.caption}\n </div>\n )}\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ifx-spinner.ifx-text-field.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,UAAU,GAAG,mvBAAmvB;;MCWzvB,OAAO,GAAA,MAAA;AALpB,IAAA,WAAA,CAAA,OAAA,EAAA;;AASU,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAwClC;AArCC,IAAA,MAAM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,MAAM,IAAI,CAAC,WAAW,EAAE,EACjC,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,KAAK,EAAE,GAAG,IAAI,CAAC,IAAI,GAAG,MAAM,GAAG,EAAE;kBAC7B,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,EAAE,CAAA;kBACzB,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,EAAE,CAAA;gBACjC,IAAI,CAAC,IAAI,KAAK,GAAG,GAAG,SAAS,GAAG,EAAE;gBAClC,IAAI,CAAC,OAAO,GAAG,SAAS,GAAG,EAAE,CAAA,CAAE,EACjC,CAAA,EAED,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,KAAK,IAAIA,OAAU,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,aAAa,EAAC,IAAI,EAAC,WAAW,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,mBAAmB,EAAE,EAAA,CAAa,CACvI,EACL,IAAI,CAAC,OAAO,KACXA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAE,CAAqC,kCAAA,EAAA,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,OAAO,GAAG,EAAE,CAAI,CAAA,EAAA,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,UAAU,GAAG,EAAE,CAAA,CAAE,EAAA,EAC/J,IAAI,CAAC,OAAO,CACT,CACP,CACG,CACF;;;;;;;;;;;;","names":["isNestedInIfxComponent","detectFramework","trackComponent","h","classNames"],"sources":["src/components/spinner/spinner.scss?tag=ifx-spinner&encapsulation=shadow","src/components/spinner/spinner.tsx","src/components/text-field/text-field.scss?tag=ifx-text-field&encapsulation=shadow","src/components/text-field/text-field.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n\n:host {\n display: inline-block;\n\n}\n\n.spinner {\n position: relative;\n width: tokens.$ifxSize500;\n height: tokens.$ifxSize500;\n\n}\n\n.spinner.s {\n width: tokens.$ifxSize300;\n height: tokens.$ifxSize300;\n}\n\n.border {\n box-sizing: border-box;\n position: absolute;\n width: 100%;\n height: 100%;\n border: 4px solid transparent;\n border-top-color: tokens.$ifxColorOcean500;\n border-left-color: tokens.$ifxColorOcean500;\n border-right-color: tokens.$ifxColorOcean500;\n border-top-left-radius: 1px;\n border-top-right-radius: 1px;\n border-radius: 50%;\n animation: spin 2s linear infinite;\n\n &.inverted {\n border-top-color: tokens.$ifxColorBaseWhite;\n border-left-color: tokens.$ifxColorBaseWhite;\n border-right-color: tokens.$ifxColorBaseWhite;\n }\n}\n\n.semiconductor {\n width: 100%;\n height: 100%;\n animation: spin 2s linear infinite;\n\n & svg {\n fill: tokens.$ifxColorOcean500;\n }\n\n &.inverted {\n & svg {\n fill: tokens.$ifxColorBaseWhite;\n }\n }\n\n &.s {\n & svg {\n width: tokens.$ifxSize300;\n height: tokens.$ifxSize300;\n }\n }\n}\n\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}","import { Component, h, Prop, Element } from '@stencil/core';\nimport { trackComponent } from '../../global/utils/tracking';\nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\nimport classNames from 'classnames';\n \n@Component({\n tag: 'ifx-spinner',\n styleUrl: 'spinner.scss',\n shadow: true,\n})\nexport class Spinner {\n @Element() el;\n @Prop() size: string;\n @Prop() variant: string;\n @Prop() inverted: boolean = false;\n @Prop() ariaLabel: string | null;\n\n async componentDidLoad() { \n if(!isNestedInIfxComponent(this.el)) { \n const framework = detectFramework();\n trackComponent('ifx-spinner', await framework)\n }\n }\n\n render() {\n return (\n <div role=\"status\" \n aria-label={this.ariaLabel || \"Loading\"}\n class={this.getClassNames()}>\n <div class={`${this.variant !== 'brand' ? 'border' : \"\"} ${this.inverted ? 'inverted' : \"\"}`}></div>\n {this.variant === 'brand'\n && <div class={`semiconductor ${this.inverted ? 'inverted' : \"\"} ${this.getSizeClass()}`}>\n <svg width='40' height='40' viewBox=\"0 0 40 40\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g id=\"spinner/conductor\">\n <path id=\"Vector\" d=\"M38.75 18.75C39.4375 18.75 40 19.3125 40 20C40 20.6875 39.4409 21.25 38.75 21.25H35V26.25H38.75C39.4375 26.25 40 26.8125 40 27.5C40 28.1875 39.4409 28.75 38.75 28.75H35V30C35 32.7617 32.7617 35 30 35H28.75V38.75C28.75 39.4409 28.1875 40 27.5 40C26.8125 40 26.25 39.4409 26.25 38.75V35H21.25V38.75C21.25 39.4409 20.6875 40 20 40C19.3125 40 18.75 39.4409 18.75 38.75V35H13.75V38.75C13.75 39.4409 13.1875 40 12.5 40C11.8125 40 11.25 39.4409 11.25 38.75V35H10C7.23828 35 5 32.7617 5 30V28.75H1.25C0.559062 28.75 0 28.1875 0 27.5C0 26.8125 0.559062 26.25 1.25 26.25H5V21.25H1.25C0.559062 21.25 0 20.6875 0 20C0 19.3125 0.559062 18.75 1.25 18.75H5V13.75H1.25C0.559062 13.75 0 13.1875 0 12.5C0 11.8125 0.559062 11.25 1.25 11.25H5V10C5 7.23828 7.23828 5 10 5H11.25V1.25C11.25 0.5625 11.8125 0 12.5 0C13.1875 0 13.75 0.559063 13.75 1.25V5H18.75V1.25C18.75 0.559063 19.3091 0 20 0C20.6909 0 21.25 0.559063 21.25 1.25V5H26.25V1.25C26.25 0.559063 26.8091 0 27.5 0C28.1909 0 28.75 0.559063 28.75 1.25V5H30C32.7617 5 35 7.23828 35 10V11.25H38.75C39.4409 11.25 40 11.8091 40 12.5C40 13.1909 39.4409 13.75 38.75 13.75H35V18.75H38.75ZM32.5 10C32.5 8.62188 31.3781 7.5 30 7.5H10C8.62187 7.5 7.5 8.62188 7.5 10V30C7.5 31.3781 8.62187 32.5 10 32.5H30C31.3781 32.5 32.5 31.3781 32.5 30V10Z\" />\n </g>\n </svg>\n </div>}\n </div>\n );\n }\n\n getSizeClass() {\n return `${this.size}` === \"s\"\n ? \"s\"\n : \"\";\n }\n\n getClassNames() {\n return classNames(\n 'spinner',\n this.size && `spinner ${this.getSizeClass()}`\n );\n }\n}\n","@use '~@infineon/design-system-tokens/dist/tokens';\n@use '../../global/font.scss';\n\n:host {\n display: flex;\n}\n\n.textInput__container {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 0px;\n width: 100%;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n font-family: var(--ifx-font-family); // tokens.$ifxFontFamilyBody;\n\n & .delete-icon {\n position: absolute;\n right: tokens.$ifxSpace200;\n }\n\n &:not(.readonly, .disabled) .delete-icon {\n &:hover {\n cursor: pointer;\n }\n }\n\n &.disabled:not(.readonly) {\n\n & #text-field { \n color: tokens.$ifxColorBaseWhite;\n }\n\n & .delete-icon { \n color: tokens.$ifxColorBaseWhite;\n }\n \n & .textInput__top-wrapper {\n & label {\n color: tokens.$ifxColorEngineering300;\n }\n\n & .required {\n color: tokens.$ifxColorEngineering300;\n }\n }\n\n & .textInput__bottom-wrapper {\n input {\n border: 1px solid tokens.$ifxColorEngineering300;\n background-color: tokens.$ifxColorEngineering300;\n\n &::placeholder {\n font-size: tokens.$ifxFontSizeM;\n color: tokens.$ifxColorBaseWhite;\n }\n }\n }\n }\n\n & .textInput__top-wrapper {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n padding: 0px;\n gap: tokens.$ifxSpace50;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n\n & label {\n font-style: normal;\n font-weight: tokens.$ifxFontWeightRegular;\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightM;\n display: flex;\n align-items: center;\n color: tokens.$ifxColorBaseBlack;\n flex: none;\n order: 0;\n flex-grow: 0;\n\n & .optional-required {\n margin-left: tokens.$ifxSpace50;\n }\n\n & .optional {\n margin-left: tokens.$ifxSpace50;\n }\n\n & .required {\n color: tokens.$ifxColorEngineering500;\n margin-left: tokens.$ifxSpace50;\n\n &.error {\n color: tokens.$ifxColorRed500;\n }\n }\n }\n }\n\n .input-container {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n }\n\n & .textInput__bottom-wrapper {\n flex-grow: 1;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 0px;\n gap: tokens.$ifxSpace50;\n flex: none;\n order: 1;\n align-self: stretch;\n flex-grow: 0;\n\n & input {\n width: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: tokens.$ifxSpace100 tokens.$ifxSpace200;\n gap: tokens.$ifxSpace100;\n height: tokens.$ifxSize500;\n background-color: tokens.$ifxColorBaseWhite;\n color: tokens.$ifxColorBaseBlack;\n font-family: var(--ifx-font-family); // tokens.$ifxFontFamilyBody;\n\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightM;\n border: 1px solid tokens.$ifxColorEngineering400;\n border-radius: tokens.$ifxBorderRadius12;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n text-overflow: ellipsis;\n\n &.input-s {\n height: tokens.$ifxSize450;\n font-size: tokens.$ifxFontSizeS;\n line-height: tokens.$ifxLineHeightS;\n\n &::placeholder {\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightS;\n }\n }\n\n &.icon {\n padding-left: tokens.$ifxSpace500;\n }\n\n &.error {\n border: 1px solid tokens.$ifxColorRed500;\n\n &:focus {\n outline: none;\n }\n }\n\n &.readonly {\n border: none;\n border-radius: var(--borderRadius-12, 1px);\n border-bottom: 1px solid var(--color-engineering-300, #bfbbbb);\n background: var(--color-base-white, #fff);\n padding-left: 0;\n\n &::placeholder {\n color: tokens.$ifxColorBaseBlack;\n }\n }\n\n &.success {\n border: 1px solid tokens.$ifxColorGreen500;\n\n &:focus {\n outline: none;\n }\n }\n\n &:focus:not(.error, .success):not(.readonly) {\n outline: none;\n border: 1px solid tokens.$ifxColorOcean500;\n }\n\n &.readonly:focus,\n &[readonly]:focus {\n outline: none;\n box-shadow: none;\n border: none;\n border-bottom: 1px solid var(--color-engineering-300, #bfbbbb);\n }\n\n &:hover:not(:disabled, :focus, .error, .success):not(.readonly) {\n border: 1px solid tokens.$ifxColorEngineering500;\n }\n }\n\n & .input-icon {\n // Position the icon within the icon container\n // Adjust the positioning as needed\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n left: tokens.$ifxSpace200;\n /* Adjust this value to control the icon's left offset */\n transition: 0.3s;\n color: tokens.$ifxColorEngineering400;\n }\n\n & .textInput__bottom-wrapper-caption {\n font-style: normal;\n font-weight: tokens.$ifxFontWeightRegular;\n font-size: tokens.$ifxFontSizeXs;\n line-height: tokens.$ifxLineHeightXs;\n color: tokens.$ifxColorBaseBlack;\n flex: none;\n order: 1;\n align-self: stretch;\n flex-grow: 0;\n\n &.error {\n color: tokens.$ifxColorRed500;\n }\n\n &.disabled {\n color: tokens.$ifxColorEngineering300;\n }\n }\n }\n}","import { Component, h, Event, Element, Prop, EventEmitter, Watch, Method, AttachInternals, State } from '@stencil/core';\nimport { trackComponent } from '../../global/utils/tracking';\nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\n\n@Component({\n tag: 'ifx-text-field',\n styleUrl: 'text-field.scss',\n shadow: true,\n // formAssociated: true\n})\nexport class TextField {\n private inputElement: HTMLInputElement;\n @Element() el;\n @Prop() placeholder: string = 'Placeholder';\n @Prop({ mutable: true }) value: string = '';\n @Prop() error: boolean = false;\n @Prop() label: string = '';\n @Prop() icon: string = '';\n @Prop() caption: string = '';\n @Prop() size: string = 'm';\n @Prop() required: boolean = false;\n @Prop() success: boolean = false;\n @Prop() disabled: boolean = false;\n @Prop() readOnly: boolean = false;\n @Prop() maxlength?: number;\n @Prop() showDeleteIcon: boolean = false;\n @Prop() autocomplete: string = 'on';\n @Prop() type: 'text' | 'password' = 'text';\n @Prop() internalId: string = 'text-field';\n @State() internalType: string;\n @Event() ifxInput: EventEmitter<String>;\n // @Prop({ reflect: true })\n // resetOnSubmit: boolean = false;\n\n @AttachInternals() internals: ElementInternals;\n\n @Watch('value')\n valueWatcher(newValue: string) {\n if (newValue !== this.inputElement.value) {\n this.inputElement.value = newValue;\n }\n }\n\n @Method()\n async reset() {\n this.value = '';\n this.inputElement.value = '';\n }\n\n handleDeleteContent() {\n if (!this.disabled && !this.readOnly) {\n this.reset();\n this.ifxInput.emit(this.value);\n }\n }\n\n handleInput() {\n const query = this.inputElement.value;\n this.value = query;\n //this.internals.setFormValue(query) // update form value\n this.ifxInput.emit(this.value);\n }\n\n handleTypeProp() {\n this.internalType = this.type === 'text' || this.type === 'password' ? this.type : 'text';\n }\n\n // formResetCallback() {\n // this.internals.setValidity({});\n // this.internals.setFormValue(\"\");\n // }\n\n componentWillLoad() {\n this.handleTypeProp();\n }\n\n async componentDidLoad() {\n if (!isNestedInIfxComponent(this.el)) {\n const framework = detectFramework();\n trackComponent('ifx-text-field', await framework);\n }\n }\n\n render() {\n return (\n <div\n aria-label=\"a text field for user input\"\n aria-value={this.value}\n aria-disabled={this.disabled}\n class={`textInput__container ${this.readOnly ? 'readonly' : ''} ${this.disabled && !this.error ? 'disabled' : ''}`}\n >\n <div class=\"textInput__top-wrapper\">\n {this.label && (\n <label htmlFor={this.internalId}>\n <span>{this.label}</span>\n {this.required && <span class={`required ${this.error && !this.readOnly ? 'error' : ''}`}>*</span>}\n </label>\n )}\n </div>\n\n <div class=\"textInput__bottom-wrapper\">\n <div class=\"input-container\">\n {this.icon && <ifx-icon class=\"input-icon\" icon={this.icon} />}\n <input\n ref={el => (this.inputElement = el)}\n disabled={this.disabled && !this.error}\n autocomplete={this.autocomplete}\n type={this.internalType}\n id={this.internalId}\n value={this.value}\n onInput={() => this.handleInput()}\n placeholder={this.placeholder}\n readonly={this.readOnly}\n maxlength={this.maxlength}\n class={`${this.icon ? 'icon' : ''}\n ${this.error ? 'error' : ''} \n ${this.readOnly ? 'readonly' : ''} \n ${this.size === 's' ? 'input-s' : ''}\n ${this.success ? 'success' : ''}`}\n />\n\n {this.showDeleteIcon && this.value && <ifx-icon class=\"delete-icon\" icon=\"cRemove16\" onClick={() => this.handleDeleteContent()}></ifx-icon>}\n </div>\n {this.caption && (\n <div class={`textInput__bottom-wrapper-caption ${this.error && !this.readOnly ? 'error' : ''} ${this.disabled && !this.readOnly && !this.error ? 'disabled' : ''}`}>\n {this.caption}\n </div>\n )}\n </div>\n </div>\n );\n }\n}\n"],"version":3}