rebill-web-components-sdk 1.10.10-beta.1 → 1.10.10-beta.3

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 (170) hide show
  1. package/dist/cjs/card-fields-wrapper_11.cjs.entry.js +8 -8
  2. package/dist/cjs/index-C-VTnc0I.js.map +1 -1
  3. package/dist/cjs/input-otp.cjs.entry.js +2 -2
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/rebill-card.rebill-input-email.entry.cjs.js.map +1 -1
  6. package/dist/cjs/rebill-card_2.cjs.entry.js +78 -84
  7. package/dist/cjs/rebill-container_2.cjs.entry.js +1 -1
  8. package/dist/cjs/rebill-flex-container.cjs.entry.js +1 -1
  9. package/dist/cjs/rebill-grid-container.cjs.entry.js +1 -1
  10. package/dist/cjs/rebill-input-select.cjs.entry.js +2 -2
  11. package/dist/cjs/rebill-input-text.cjs.entry.js +2 -2
  12. package/dist/cjs/rebill-mode-sandbox_2.cjs.entry.js +1 -1
  13. package/dist/cjs/rebill-timeline-debit-day_2.cjs.entry.js +2 -2
  14. package/dist/cjs/rebill-web-components-sdk.cjs.js +1 -1
  15. package/dist/collection/components/shared/inputs/input-email/input-email.css +19 -8
  16. package/dist/collection/components/shared/inputs/input-email/input-email.js +85 -75
  17. package/dist/collection/components/shared/inputs/input-email/input-email.js.map +1 -1
  18. package/dist/collection/components/shared/inputs/input-otp/input-otp.js +2 -2
  19. package/dist/collection/components/shared/inputs/input-phone/input-phone.js +2 -2
  20. package/dist/collection/components/shared/inputs/input-select/input-select.js +2 -2
  21. package/dist/collection/components/shared/inputs/input-text/input-text.js +2 -2
  22. package/dist/collection/components/shared/layouts/generics/container.js +1 -1
  23. package/dist/collection/components/shared/layouts/generics/flex.js +1 -1
  24. package/dist/collection/components/shared/layouts/generics/grid.js +1 -1
  25. package/dist/collection/components/shared/mode-sandbox/mode-sandbox-mobile.js +1 -1
  26. package/dist/collection/components/shared/selectable-card/selectable-card.js +2 -2
  27. package/dist/collection/components/shared/singlePaymentMethod/singlePaymentMethod.js +4 -4
  28. package/dist/collection/components/shared/timeline/timeline-debit-day.js +1 -1
  29. package/dist/collection/components/shared/timeline/timeline-free-trial.js +1 -1
  30. package/dist/collection/utils/email-validation.js +11 -1
  31. package/dist/collection/utils/email-validation.js.map +1 -1
  32. package/dist/components/card-fields-wrapper.js +1 -1
  33. package/dist/components/change-card-success.js +1 -1
  34. package/dist/components/discount-coupon.js +1 -1
  35. package/dist/components/input-otp.js +1 -1
  36. package/dist/components/otp-component.js +1 -1
  37. package/dist/components/{p-xKyxKtdF.js → p-30DP4s-1.js} +4 -4
  38. package/dist/components/{p-xKyxKtdF.js.map → p-30DP4s-1.js.map} +1 -1
  39. package/dist/components/p-8BpuJ_V5.js.map +1 -1
  40. package/dist/components/{p-Cg8vTcm1.js → p-B28tIeVs.js} +3 -3
  41. package/dist/components/{p-Cg8vTcm1.js.map → p-B28tIeVs.js.map} +1 -1
  42. package/dist/components/{p-PtbrPqLv.js → p-B2zhJUcA.js} +4 -4
  43. package/dist/components/{p-PtbrPqLv.js.map → p-B2zhJUcA.js.map} +1 -1
  44. package/dist/components/{p-0K5ek-gN.js → p-B3jFm6B_.js} +4 -4
  45. package/dist/components/{p-0K5ek-gN.js.map → p-B3jFm6B_.js.map} +1 -1
  46. package/dist/components/{p-BGrQjFTc.js → p-BOYVvAQB.js} +3 -3
  47. package/dist/components/{p-BGrQjFTc.js.map → p-BOYVvAQB.js.map} +1 -1
  48. package/dist/components/{p-BgLkcEoy.js → p-BR18G7Pq.js} +4 -4
  49. package/dist/components/{p-BgLkcEoy.js.map → p-BR18G7Pq.js.map} +1 -1
  50. package/dist/components/{p-BwbfTRHn.js → p-Ba3VDw-H.js} +3 -3
  51. package/dist/components/{p-BwbfTRHn.js.map → p-Ba3VDw-H.js.map} +1 -1
  52. package/dist/components/{p-h01Qiljf.js → p-Ba8zuq-V.js} +3 -3
  53. package/dist/components/{p-h01Qiljf.js.map → p-Ba8zuq-V.js.map} +1 -1
  54. package/dist/components/{p-B0tiz_Xb.js → p-C7654vE1.js} +4 -4
  55. package/dist/components/{p-B0tiz_Xb.js.map → p-C7654vE1.js.map} +1 -1
  56. package/dist/components/{p-CiOrml-5.js → p-CFLYpSRc.js} +3 -3
  57. package/dist/components/{p-CiOrml-5.js.map → p-CFLYpSRc.js.map} +1 -1
  58. package/dist/components/{p-VlzBlwUc.js → p-CMVxImmw.js} +5 -5
  59. package/dist/components/{p-VlzBlwUc.js.map → p-CMVxImmw.js.map} +1 -1
  60. package/dist/components/{p-Cthy0N10.js → p-CP4gYqda.js} +5 -5
  61. package/dist/components/{p-Cthy0N10.js.map → p-CP4gYqda.js.map} +1 -1
  62. package/dist/components/{p-CSeC5LGG.js → p-Ch0U0Vmb.js} +3 -3
  63. package/dist/components/{p-CSeC5LGG.js.map → p-Ch0U0Vmb.js.map} +1 -1
  64. package/dist/components/{p-CamHvHq5.js → p-ChYpVv-Q.js} +4 -4
  65. package/dist/components/{p-CamHvHq5.js.map → p-ChYpVv-Q.js.map} +1 -1
  66. package/dist/components/{p-CtFu9Z9D.js → p-CypPi9fK.js} +4 -4
  67. package/dist/components/{p-CtFu9Z9D.js.map → p-CypPi9fK.js.map} +1 -1
  68. package/dist/components/{p-BOYEmkB-.js → p-D19UjlNC.js} +5 -5
  69. package/dist/components/{p-BOYEmkB-.js.map → p-D19UjlNC.js.map} +1 -1
  70. package/dist/components/{p-BqeCVajN.js → p-D6CVLxdH.js} +4 -4
  71. package/dist/components/{p-BqeCVajN.js.map → p-D6CVLxdH.js.map} +1 -1
  72. package/dist/components/{p-CVq9IPp4.js → p-DPB4aAQa.js} +6 -6
  73. package/dist/components/{p-CVq9IPp4.js.map → p-DPB4aAQa.js.map} +1 -1
  74. package/dist/components/{p-6IQljT42.js → p-Dhm2b0J_.js} +7 -7
  75. package/dist/components/{p-6IQljT42.js.map → p-Dhm2b0J_.js.map} +1 -1
  76. package/dist/components/{p-Dvnf-j7X.js → p-Dhs3vhG4.js} +5 -5
  77. package/dist/components/{p-Dvnf-j7X.js.map → p-Dhs3vhG4.js.map} +1 -1
  78. package/dist/components/{p-DR6_SaU9.js → p-Dp-CUwYp.js} +3 -3
  79. package/dist/components/{p-DR6_SaU9.js.map → p-Dp-CUwYp.js.map} +1 -1
  80. package/dist/components/{p-DeStKoNN.js → p-Dsrpb4rI.js} +3 -3
  81. package/dist/components/{p-DeStKoNN.js.map → p-Dsrpb4rI.js.map} +1 -1
  82. package/dist/components/{p-De7T_ng8.js → p-G3CHdt_U.js} +6 -6
  83. package/dist/components/{p-De7T_ng8.js.map → p-G3CHdt_U.js.map} +1 -1
  84. package/dist/components/{p-CN-2D26g.js → p-Pg_gixIL.js} +3 -3
  85. package/dist/components/{p-CN-2D26g.js.map → p-Pg_gixIL.js.map} +1 -1
  86. package/dist/components/{p-d40T-Ru7.js → p-fJpj0Zb5.js} +4 -4
  87. package/dist/components/{p-d40T-Ru7.js.map → p-fJpj0Zb5.js.map} +1 -1
  88. package/dist/components/{p-Czjk80qD.js → p-fXuAmVVV.js} +6 -6
  89. package/dist/components/{p-Czjk80qD.js.map → p-fXuAmVVV.js.map} +1 -1
  90. package/dist/components/{p-BMlyFJD4.js → p-iM2t1WOr.js} +3 -3
  91. package/dist/components/{p-BMlyFJD4.js.map → p-iM2t1WOr.js.map} +1 -1
  92. package/dist/components/{p-C-mZ7tbj.js → p-lrqPOj5Q.js} +3 -3
  93. package/dist/components/{p-C-mZ7tbj.js.map → p-lrqPOj5Q.js.map} +1 -1
  94. package/dist/components/{p-Bnocq8Cb.js → p-mSjgruQE.js} +4 -4
  95. package/dist/components/{p-Bnocq8Cb.js.map → p-mSjgruQE.js.map} +1 -1
  96. package/dist/components/{p-DP1RHUGR.js → p-r59n4m0a.js} +82 -90
  97. package/dist/components/p-r59n4m0a.js.map +1 -0
  98. package/dist/components/payment-method-selector.js +1 -1
  99. package/dist/components/rebill-address-form.js +1 -1
  100. package/dist/components/rebill-address-search.js +1 -1
  101. package/dist/components/rebill-address.js +1 -1
  102. package/dist/components/rebill-bank-selector.js +1 -1
  103. package/dist/components/rebill-change-card.js +19 -19
  104. package/dist/components/rebill-checkout-single-column.js +1 -1
  105. package/dist/components/rebill-checkout.js +26 -26
  106. package/dist/components/rebill-container.js +1 -1
  107. package/dist/components/rebill-flex-container.js +1 -1
  108. package/dist/components/rebill-footer.js +1 -1
  109. package/dist/components/rebill-grid-container.js +1 -1
  110. package/dist/components/rebill-input-email.js +1 -1
  111. package/dist/components/rebill-input-phone.js +1 -1
  112. package/dist/components/rebill-input-select.js +1 -1
  113. package/dist/components/rebill-input-text.js +1 -1
  114. package/dist/components/rebill-installments.js +1 -1
  115. package/dist/components/rebill-mode-sandbox-mobile.js +1 -1
  116. package/dist/components/rebill-processing-payment.js +1 -1
  117. package/dist/components/rebill-renewal.js +19 -19
  118. package/dist/components/rebill-summary.js +1 -1
  119. package/dist/components/rebill-timeline-debit-day.js +1 -1
  120. package/dist/components/rebill-timeline-free-trial.js +1 -1
  121. package/dist/components/renewal-success-page.js +1 -1
  122. package/dist/components/renewal-summary.js +1 -1
  123. package/dist/components/root-component.js +3 -3
  124. package/dist/components/selectable-card.js +1 -1
  125. package/dist/components/single-payment-method.js +1 -1
  126. package/dist/components/success-page.js +1 -1
  127. package/dist/components/user-information-phone.js +1 -1
  128. package/dist/components/user-information.js +1 -1
  129. package/dist/esm/card-fields-wrapper_11.entry.js +8 -8
  130. package/dist/esm/index-BTZ7D7jU.js.map +1 -1
  131. package/dist/esm/input-otp.entry.js +2 -2
  132. package/dist/esm/loader.js +1 -1
  133. package/dist/esm/rebill-card.rebill-input-email.entry.js.map +1 -1
  134. package/dist/esm/rebill-card_2.entry.js +78 -84
  135. package/dist/esm/rebill-container_2.entry.js +1 -1
  136. package/dist/esm/rebill-flex-container.entry.js +1 -1
  137. package/dist/esm/rebill-grid-container.entry.js +1 -1
  138. package/dist/esm/rebill-input-select.entry.js +2 -2
  139. package/dist/esm/rebill-input-text.entry.js +2 -2
  140. package/dist/esm/rebill-mode-sandbox_2.entry.js +1 -1
  141. package/dist/esm/rebill-timeline-debit-day_2.entry.js +2 -2
  142. package/dist/esm/rebill-web-components-sdk.js +1 -1
  143. package/dist/rebill-web-components-sdk/{p-2b3cb9b5.entry.js → p-11ee0328.entry.js} +2 -2
  144. package/dist/rebill-web-components-sdk/{p-24a79725.entry.js → p-130877f9.entry.js} +2 -2
  145. package/dist/rebill-web-components-sdk/{p-734696df.entry.js → p-16e7646e.entry.js} +2 -2
  146. package/dist/rebill-web-components-sdk/{p-c6c8bf05.entry.js → p-6eede717.entry.js} +2 -2
  147. package/dist/rebill-web-components-sdk/p-BTZ7D7jU.js.map +1 -1
  148. package/dist/rebill-web-components-sdk/p-b2fe4694.entry.js +2 -0
  149. package/dist/rebill-web-components-sdk/p-b2fe4694.entry.js.map +1 -0
  150. package/dist/rebill-web-components-sdk/{p-a09a0d53.entry.js → p-b350f63e.entry.js} +2 -2
  151. package/dist/rebill-web-components-sdk/{p-c38319c1.entry.js → p-be004b4f.entry.js} +2 -2
  152. package/dist/rebill-web-components-sdk/{p-894d7d00.entry.js → p-d73d7c39.entry.js} +2 -2
  153. package/dist/rebill-web-components-sdk/{p-45d1115b.entry.js → p-dd44d494.entry.js} +2 -2
  154. package/dist/rebill-web-components-sdk/{p-6ab7c3bc.entry.js → p-e54f571c.entry.js} +2 -2
  155. package/dist/rebill-web-components-sdk/rebill-card.rebill-input-email.entry.esm.js.map +1 -1
  156. package/dist/rebill-web-components-sdk/rebill-web-components-sdk.esm.js +1 -1
  157. package/dist/types/components/shared/inputs/input-email/input-email.d.ts +8 -17
  158. package/package.json +1 -1
  159. package/dist/components/p-DP1RHUGR.js.map +0 -1
  160. package/dist/rebill-web-components-sdk/p-8a2f420d.entry.js +0 -2
  161. package/dist/rebill-web-components-sdk/p-8a2f420d.entry.js.map +0 -1
  162. /package/dist/rebill-web-components-sdk/{p-2b3cb9b5.entry.js.map → p-11ee0328.entry.js.map} +0 -0
  163. /package/dist/rebill-web-components-sdk/{p-24a79725.entry.js.map → p-130877f9.entry.js.map} +0 -0
  164. /package/dist/rebill-web-components-sdk/{p-734696df.entry.js.map → p-16e7646e.entry.js.map} +0 -0
  165. /package/dist/rebill-web-components-sdk/{p-c6c8bf05.entry.js.map → p-6eede717.entry.js.map} +0 -0
  166. /package/dist/rebill-web-components-sdk/{p-a09a0d53.entry.js.map → p-b350f63e.entry.js.map} +0 -0
  167. /package/dist/rebill-web-components-sdk/{p-c38319c1.entry.js.map → p-be004b4f.entry.js.map} +0 -0
  168. /package/dist/rebill-web-components-sdk/{p-894d7d00.entry.js.map → p-d73d7c39.entry.js.map} +0 -0
  169. /package/dist/rebill-web-components-sdk/{p-45d1115b.entry.js.map → p-dd44d494.entry.js.map} +0 -0
  170. /package/dist/rebill-web-components-sdk/{p-6ab7c3bc.entry.js.map → p-e54f571c.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"p-Bnocq8Cb.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,mvFAAmvF;;MCO3vF,SAAS,iBAAAA,kBAAA,CAAA,MAAA,SAAA,SAAAC,CAAA,CAAA;;;;;;;;;;;AAEZ,IAAA,YAAY;;IAGZ,KAAK,GAAW,EAAE;;IAElB,WAAW,GAAW,EAAE;;IAEQ,KAAK,GAAW,EAAE;;IAElD,KAAK,GAAW,EAAE;;IAElB,EAAE,GAAW,EAAE;;IAEf,QAAQ,GAAY,KAAK;;AAEzB,IAAA,QAAQ;;AAER,IAAA,SAAS;;IAET,SAAS,GAAY,KAAK;;IAE1B,OAAO,GAA2B,SAAS;;IAE3C,SAAS,GAAY,KAAK;;AAEzB,IAAA,KAAK;;AAEL,IAAA,cAAc;;AAEd,IAAA,IAAI;AAEb,IAAA,gBAAgB,CAAC,KAAkB,EAAA;AACjC,QAAA,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM;QAC7B,IAAI,QAAQ,IAAI,IAAI,CAAC,EAAE,IAAI,QAAQ,EA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KAChC,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,YAAY,EAAC,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAA,EACpD,CAAa,CAAA,aAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAE,IAAI,CAAC,SAAS,EAAgB,CAAA,CAC7C,CACP,CACG,EACL,IAAI,CAAC,KAAK,IAAI,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAC,eAAe,EAAE,EAAA,IAAI,CAAC,KAAK,CAAQ,CAC1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/shared/inputs/input-text/input-text.css?tag=rebill-input-text","src/components/shared/inputs/input-text/input-text.tsx"],"sourcesContent":["@import '../shared-input.css';\n\n.input-wrapper {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.input-element {\n width: 100%;\n box-sizing: border-box;\n}\n\n.icon-left,\n.icon-right {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.icon-left {\n left: 0.75rem;\n color: var(--rebill-color-text-secondary-light);\n}\n\n.icon-right {\n right: 0.75rem;\n cursor: pointer;\n color: var(--rebill-color-text-secondary-light);\n}\n\n.input-element.input-error:focus {\n flex-direction: column;\n box-shadow: 0 0 0 2px var(--rebill-color-error-light);\n}\n\n/* Floating label styles */\n.floating-label {\n position: relative;\n}\n\n.floating-label .input-text__input-label {\n position: absolute;\n top: 50%;\n left: 0.75rem;\n transform: translateY(-50%);\n color: var(--rebill-color-text-secondary-light);\n transition: all 0.1s ease-in-out;\n pointer-events: none;\n}\n\n.floating-label .input-element::placeholder {\n color: transparent;\n}\n\n.floating-label .input-element:focus ~ .input-text__input-label,\n.floating-label .input-element:not(:placeholder-shown) ~ .input-text__input-label {\n top: 0;\n font-size: 0.62rem;\n color: var(--rebill-color-text-secondary);\n background-color: var(--rebill-color-background);\n padding: 0 4px;\n left: 0.75rem;\n}\n\n.floating-label.has-left-icon .input-text__input-label {\n left: 2.5rem;\n}\n\n/* Disabled state styles */\n.input-element:disabled {\n color: var(--rebill-color-neutrals-500);\n}\n\n.input-wrapper:has(.input-element:disabled) .icon-left,\n.input-wrapper:has(.input-element:disabled) .icon-right {\n color: var(--rebill-color-text-secondary-light) !important;\n}\n","import { Component, Element, Event, EventEmitter, Listen, Method, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'rebill-input-text',\n styleUrl: 'input-text.css',\n shadow: false,\n})\nexport class InputText {\n @Element() el: HTMLElement;\n private inputElement: HTMLInputElement;\n\n /** Etiqueta que se muestra arriba del input */\n @Prop() label: string = '';\n /** Placeholder del input */\n @Prop() placeholder: string = '';\n /** Valor del input */\n @Prop({ mutable: true, reflect: true }) value: string = '';\n /** Mensaje de error */\n @Prop() error: string = '';\n /** ID del input */\n @Prop() id: string = '';\n /** Estado deshabilitado */\n @Prop() disabled: boolean = false;\n /** Icono a la izquierda */\n @Prop() leftIcon: string;\n /** Icono a la derecha */\n @Prop() rightIcon: string;\n /** Permitir limpiar el input */\n @Prop() clearable: boolean = false;\n /** Variacion de estilo del input */\n @Prop() variant: 'default' | 'floating' = 'default';\n /** Convertir texto a mayúsculas automáticamente */\n @Prop() uppercase: boolean = false;\n /** Evento al cambiar el valor */\n @Event() input: EventEmitter<{ id: string; value: string }>;\n /** Evento al hacer clic en el icono derecho */\n @Event() rightIconClick: EventEmitter<{ id: string }>;\n /** Evento al salir del input */\n @Event() blur: EventEmitter<{ id: string; value: string }>;\n @Listen('change', { target: 'document' })\n handleFormChange(event: CustomEvent) {\n const formData = event.detail;\n if (formData && this.id in formData) {\n this.value = formData[this.id];\n }\n }\n\n private onInput = (event: Event) => {\n if (this.disabled) return;\n const input = event.target as HTMLInputElement;\n let inputValue = input.value;\n\n if (this.id === 'email') {\n inputValue = inputValue.toLowerCase();\n input.value = inputValue;\n } else if (this.uppercase) {\n inputValue = inputValue.toUpperCase();\n input.value = inputValue;\n }\n\n this.value = inputValue;\n this.input.emit({ id: this.id, value: this.value });\n };\n\n private onClear = () => {\n if (this.disabled) return;\n this.value = '';\n this.input.emit({ id: this.id, value: this.value });\n };\n\n private onRightIconClick = () => {\n if (this.disabled) return;\n this.rightIconClick.emit({ id: this.id });\n };\n\n private onBlur = () => {\n const trimmedValue = this.value.trim();\n\n if (trimmedValue !== this.value) {\n this.value = trimmedValue;\n this.input.emit({ id: this.id, value: this.value });\n }\n\n this.blur.emit({ id: this.id, value: this.value });\n };\n\n @Method()\n async getInputElement(): Promise<HTMLInputElement | null> {\n return this.inputElement;\n }\n\n render() {\n const isFloating = this.variant === 'floating';\n\n const inputClasses = {\n 'input-element': true,\n 'input-error': !!this.error,\n };\n\n const wrapperClasses = {\n 'input-wrapper': true,\n 'floating-label': isFloating,\n 'has-left-icon': !!this.leftIcon,\n 'has-right-icon': !!this.rightIcon,\n };\n\n return (\n <div class=\"input-container\">\n {!isFloating && this.label && (\n <label class={`input-label ${this.disabled ? 'disabled' : ''}`}>{this.label}</label>\n )}\n <div class={wrapperClasses}>\n {this.leftIcon && (\n <div class=\"icon-left\">\n <rebill-icon name={this.leftIcon}></rebill-icon>\n </div>\n )}\n <input\n ref={el => (this.inputElement = el)}\n type=\"text\"\n class={inputClasses}\n placeholder={isFloating ? this.label : this.placeholder}\n value={this.value}\n onInput={this.onInput}\n onBlur={this.onBlur}\n disabled={this.disabled}\n style={{\n paddingLeft: this.leftIcon ? '2.5rem' : '0.75rem',\n paddingRight: this.clearable || this.rightIcon ? '2.5rem' : '0.75rem',\n }}\n />\n {isFloating && <label class=\"input-text__input-label input-label\">{this.label}</label>}\n {this.clearable && this.value && (\n <div class=\"icon-right\" onClick={this.onClear}>\n <rebill-icon name=\"x\"></rebill-icon>\n </div>\n )}\n {this.rightIcon && !this.clearable && (\n <div class=\"icon-right\" onClick={this.onRightIconClick}>\n <rebill-icon name={this.rightIcon}></rebill-icon>\n </div>\n )}\n </div>\n {this.error && <span class=\"error-message\">{this.error}</span>}\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-mSjgruQE.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,mvFAAmvF;;MCO3vF,SAAS,iBAAAA,kBAAA,CAAA,MAAA,SAAA,SAAAC,CAAA,CAAA;;;;;;;;;;;AAEZ,IAAA,YAAY;;IAGZ,KAAK,GAAW,EAAE;;IAElB,WAAW,GAAW,EAAE;;IAEQ,KAAK,GAAW,EAAE;;IAElD,KAAK,GAAW,EAAE;;IAElB,EAAE,GAAW,EAAE;;IAEf,QAAQ,GAAY,KAAK;;AAEzB,IAAA,QAAQ;;AAER,IAAA,SAAS;;IAET,SAAS,GAAY,KAAK;;IAE1B,OAAO,GAA2B,SAAS;;IAE3C,SAAS,GAAY,KAAK;;AAEzB,IAAA,KAAK;;AAEL,IAAA,cAAc;;AAEd,IAAA,IAAI;AAEb,IAAA,gBAAgB,CAAC,KAAkB,EAAA;AACjC,QAAA,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM;QAC7B,IAAI,QAAQ,IAAI,IAAI,CAAC,EAAE,IAAI,QAAQ,EAAE;YACnC,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;;;AAI1B,IAAA,OAAO,GAAG,CAAC,KAAY,KAAI;QACjC,IAAI,IAAI,CAAC,QAAQ;YAAE;AACnB,QAAA,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B;AAC9C,QAAA,IAAI,UAAU,GAAG,KAAK,CAAC,KAAK;AAE5B,QAAA,IAAI,IAAI,CAAC,EAAE,KAAK,OAAO,EAAE;AACvB,YAAA,UAAU,GAAG,UAAU,CAAC,WAAW,EAAE;AACrC,YAAA,KAAK,CAAC,KAAK,GAAG,UAAU;;AACnB,aAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AACzB,YAAA,UAAU,GAAG,UAAU,CAAC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/components/shared/inputs/input-text/input-text.css?tag=rebill-input-text","src/components/shared/inputs/input-text/input-text.tsx"],"sourcesContent":["@import '../shared-input.css';\n\n.input-wrapper {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.input-element {\n width: 100%;\n box-sizing: border-box;\n}\n\n.icon-left,\n.icon-right {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.icon-left {\n left: 0.75rem;\n color: var(--rebill-color-text-secondary-light);\n}\n\n.icon-right {\n right: 0.75rem;\n cursor: pointer;\n color: var(--rebill-color-text-secondary-light);\n}\n\n.input-element.input-error:focus {\n flex-direction: column;\n box-shadow: 0 0 0 2px var(--rebill-color-error-light);\n}\n\n/* Floating label styles */\n.floating-label {\n position: relative;\n}\n\n.floating-label .input-text__input-label {\n position: absolute;\n top: 50%;\n left: 0.75rem;\n transform: translateY(-50%);\n color: var(--rebill-color-text-secondary-light);\n transition: all 0.1s ease-in-out;\n pointer-events: none;\n}\n\n.floating-label .input-element::placeholder {\n color: transparent;\n}\n\n.floating-label .input-element:focus ~ .input-text__input-label,\n.floating-label .input-element:not(:placeholder-shown) ~ .input-text__input-label {\n top: 0;\n font-size: 0.62rem;\n color: var(--rebill-color-text-secondary);\n background-color: var(--rebill-color-background);\n padding: 0 4px;\n left: 0.75rem;\n}\n\n.floating-label.has-left-icon .input-text__input-label {\n left: 2.5rem;\n}\n\n/* Disabled state styles */\n.input-element:disabled {\n color: var(--rebill-color-neutrals-500);\n}\n\n.input-wrapper:has(.input-element:disabled) .icon-left,\n.input-wrapper:has(.input-element:disabled) .icon-right {\n color: var(--rebill-color-text-secondary-light) !important;\n}\n","import { Component, Element, Event, EventEmitter, Listen, Method, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'rebill-input-text',\n styleUrl: 'input-text.css',\n shadow: false,\n})\nexport class InputText {\n @Element() el: HTMLElement;\n private inputElement: HTMLInputElement;\n\n /** Etiqueta que se muestra arriba del input */\n @Prop() label: string = '';\n /** Placeholder del input */\n @Prop() placeholder: string = '';\n /** Valor del input */\n @Prop({ mutable: true, reflect: true }) value: string = '';\n /** Mensaje de error */\n @Prop() error: string = '';\n /** ID del input */\n @Prop() id: string = '';\n /** Estado deshabilitado */\n @Prop() disabled: boolean = false;\n /** Icono a la izquierda */\n @Prop() leftIcon: string;\n /** Icono a la derecha */\n @Prop() rightIcon: string;\n /** Permitir limpiar el input */\n @Prop() clearable: boolean = false;\n /** Variacion de estilo del input */\n @Prop() variant: 'default' | 'floating' = 'default';\n /** Convertir texto a mayúsculas automáticamente */\n @Prop() uppercase: boolean = false;\n /** Evento al cambiar el valor */\n @Event() input: EventEmitter<{ id: string; value: string }>;\n /** Evento al hacer clic en el icono derecho */\n @Event() rightIconClick: EventEmitter<{ id: string }>;\n /** Evento al salir del input */\n @Event() blur: EventEmitter<{ id: string; value: string }>;\n @Listen('change', { target: 'document' })\n handleFormChange(event: CustomEvent) {\n const formData = event.detail;\n if (formData && this.id in formData) {\n this.value = formData[this.id];\n }\n }\n\n private onInput = (event: Event) => {\n if (this.disabled) return;\n const input = event.target as HTMLInputElement;\n let inputValue = input.value;\n\n if (this.id === 'email') {\n inputValue = inputValue.toLowerCase();\n input.value = inputValue;\n } else if (this.uppercase) {\n inputValue = inputValue.toUpperCase();\n input.value = inputValue;\n }\n\n this.value = inputValue;\n this.input.emit({ id: this.id, value: this.value });\n };\n\n private onClear = () => {\n if (this.disabled) return;\n this.value = '';\n this.input.emit({ id: this.id, value: this.value });\n };\n\n private onRightIconClick = () => {\n if (this.disabled) return;\n this.rightIconClick.emit({ id: this.id });\n };\n\n private onBlur = () => {\n const trimmedValue = this.value.trim();\n\n if (trimmedValue !== this.value) {\n this.value = trimmedValue;\n this.input.emit({ id: this.id, value: this.value });\n }\n\n this.blur.emit({ id: this.id, value: this.value });\n };\n\n @Method()\n async getInputElement(): Promise<HTMLInputElement | null> {\n return this.inputElement;\n }\n\n render() {\n const isFloating = this.variant === 'floating';\n\n const inputClasses = {\n 'input-element': true,\n 'input-error': !!this.error,\n };\n\n const wrapperClasses = {\n 'input-wrapper': true,\n 'floating-label': isFloating,\n 'has-left-icon': !!this.leftIcon,\n 'has-right-icon': !!this.rightIcon,\n };\n\n return (\n <div class=\"input-container\">\n {!isFloating && this.label && (\n <label class={`input-label ${this.disabled ? 'disabled' : ''}`}>{this.label}</label>\n )}\n <div class={wrapperClasses}>\n {this.leftIcon && (\n <div class=\"icon-left\">\n <rebill-icon name={this.leftIcon}></rebill-icon>\n </div>\n )}\n <input\n ref={el => (this.inputElement = el)}\n type=\"text\"\n class={inputClasses}\n placeholder={isFloating ? this.label : this.placeholder}\n value={this.value}\n onInput={this.onInput}\n onBlur={this.onBlur}\n disabled={this.disabled}\n style={{\n paddingLeft: this.leftIcon ? '2.5rem' : '0.75rem',\n paddingRight: this.clearable || this.rightIcon ? '2.5rem' : '0.75rem',\n }}\n />\n {isFloating && <label class=\"input-text__input-label input-label\">{this.label}</label>}\n {this.clearable && this.value && (\n <div class=\"icon-right\" onClick={this.onClear}>\n <rebill-icon name=\"x\"></rebill-icon>\n </div>\n )}\n {this.rightIcon && !this.clearable && (\n <div class=\"icon-right\" onClick={this.onRightIconClick}>\n <rebill-icon name={this.rightIcon}></rebill-icon>\n </div>\n )}\n </div>\n {this.error && <span class=\"error-message\">{this.error}</span>}\n </div>\n );\n }\n}\n"],"version":3}
@@ -1,6 +1,5 @@
1
1
  import { proxyCustomElement, H, createEvent, h } from './p-8BpuJ_V5.js';
2
2
  import { I as I18nService } from './p-5WvVvcYf.js';
3
- import { C as COLORS_ENUM } from './p-C5Pu-n-i.js';
4
3
  import { d as defineCustomElement$1 } from './p-Np4T5oyp.js';
5
4
 
6
5
  const COMMON_EMAIL_DOMAINS = [
@@ -292,18 +291,6 @@ function detectMissingDotInMultiPartDomain(domainPart) {
292
291
  }
293
292
  return null;
294
293
  }
295
- /**
296
- * Valida el formato básico del email completo
297
- * @param email - El email a validar
298
- * @returns true si el formato es válido, false en caso contrario
299
- */
300
- function validateEmailFormat(email) {
301
- if (!email || email.trim() === '') {
302
- return true;
303
- }
304
- const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
305
- return emailRegex.test(email);
306
- }
307
294
  /**
308
295
  * Genera sugerencias de email basadas en dominios comunes
309
296
  * @param emailValue - El valor actual del email que el usuario está escribiendo
@@ -393,7 +380,7 @@ function suggestEmailCorrection(emailValue) {
393
380
  return correctDomainTypos(localPart, domainPart);
394
381
  }
395
382
 
396
- const inputEmailCss = ".input-container{display:flex;flex-direction:column}.input-label{font-size:0.875rem;color:var(--rebill-color-text-primary);font-weight:500;margin-bottom:0.375rem}.input-label.disabled{cursor:not-allowed}.input-element{border-radius:var(--input-group-inner-border-radius, 8px);border:1.5px solid var(--rebill-color-border);padding:10px 14px;font-size:0.875rem;color:var(--rebill-color-text-primary);outline:none;transition:border-color 0.2s;background:var(--rebill-color-background);height:38.33px;box-sizing:border-box}.input-element.input-error{border-color:var(--rebill-color-error)}.input-element:disabled{background-color:var(--rebill-color-background);border-color:var(--rebill-color-disabled);color:var(--rebill-color-text-secondary);cursor:not-allowed;opacity:0.7}select.input-element{padding:10px 30px 10px 14px;appearance:none;cursor:pointer}select.input-element:disabled{cursor:not-allowed}.input-element:focus{border-color:var(--rebill-color-primary)}.input-element:disabled:focus{border-color:var(--rebill-color-disabled)}.input-element::placeholder{color:var(--rebill-color-text-secondary-light);font-size:0.875rem;opacity:1}.select-wrapper.disabled .select-icon{color:var(--rebill-color-disabled)}.error-message{color:var(--rebill-color-error);font-size:0.75rem;margin-top:0.375rem}@media screen and (max-width: 768px){.input-element{font-size:1rem}.input-element::placeholder{font-size:1rem}}.input-wrapper{position:relative;display:flex;align-items:center}.input-element{width:100%;box-sizing:border-box}.icon-left,.icon-right{position:absolute;display:flex;align-items:center;justify-content:center;top:50%;transform:translateY(-50%)}.icon-left{left:0.75rem;color:var(--rebill-color-text-secondary-light)}.icon-right{right:0.75rem;cursor:pointer;color:var(--rebill-color-text-secondary-light)}.input-element.input-error:focus{flex-direction:column;box-shadow:0 0 0 2px var(--rebill-color-error-light)}.input-wrapper.has-invalid-format .input-element{border-color:var(--rebill-color-error)}.input-wrapper.has-invalid-format .input-element:focus{box-shadow:0 0 0 2px var(--rebill-color-error-light)}.floating-label{position:relative}.floating-label .input-text__input-label{position:absolute;top:50%;left:0.75rem;transform:translateY(-50%);color:var(--rebill-color-text-secondary-light);transition:all 0.1s ease-in-out;pointer-events:none}.floating-label .input-element::placeholder{color:transparent}.floating-label .input-element:focus~.input-text__input-label,.floating-label .input-element:not(:placeholder-shown)~.input-text__input-label{top:0;font-size:0.62rem;color:var(--rebill-color-text-secondary);background-color:var(--rebill-color-background);padding:0 4px;left:0.75rem}.floating-label.has-left-icon .input-text__input-label{left:2.5rem}.input-element:disabled{color:var(--rebill-color-neutrals-500)}.input-wrapper:has(.input-element:disabled) .icon-left,.input-wrapper:has(.input-element:disabled) .icon-right{color:var(--rebill-color-text-secondary-light) !important}.email-suggestions-dropdown{position:absolute;top:100%;left:0;right:0;z-index:1000;background-color:var(--rebill-color-background);border:1px solid var(--rebill-color-border);border-radius:0.375rem;box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1),\n 0 2px 4px -1px rgba(0, 0, 0, 0.06);margin-top:0.25rem;max-height:200px;overflow-y:auto;animation:slideDown 0.15s ease-out;box-sizing:border-box;width:100%}.email-suggestions-header{padding:0.75rem;font-size:0.875rem;font-weight:400;color:var(--rebill-color-primary);border-bottom:1px solid var(--rebill-color-border);background-color:var(--rebill-color-background)}.email-suggestion-item{padding:0.75rem;font-size:0.875rem;color:var(--rebill-color-text-primary);cursor:pointer;transition:background-color 0.15s ease}.email-suggestion-item:last-child{border-bottom:none}.email-suggestion-item:hover,.email-suggestion-item.highlighted{background-color:var(--rebill-color-background-right)}@keyframes slideDown{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.email-suggestions-dropdown::-webkit-scrollbar{width:6px}.email-suggestions-dropdown::-webkit-scrollbar-track{background:transparent}.email-suggestions-dropdown::-webkit-scrollbar-thumb{background-color:var(--rebill-color-border);border-radius:3px}.email-suggestions-dropdown::-webkit-scrollbar-thumb:hover{background-color:var(--rebill-color-text-secondary)}.email-correction-suggestion{display:flex;align-items:center;gap:8px;font-size:0.75rem;margin-top:0.375rem;line-height:1.4}.email-correction-icon{flex-shrink:0}.email-correction-text{color:var(--rebill-color-text-primary);flex:1}.email-correction-link{color:var(--rebill-color-link);text-decoration:underline;cursor:pointer;font-weight:500;transition:opacity 0.2s ease}.email-correction-link:hover{opacity:0.8}";
383
+ const inputEmailCss = ".input-container{display:flex;flex-direction:column}.input-label{font-size:0.875rem;color:var(--rebill-color-text-primary);font-weight:500;margin-bottom:0.375rem}.input-label.disabled{cursor:not-allowed}.input-element{border-radius:var(--input-group-inner-border-radius, 8px);border:1.5px solid var(--rebill-color-border);padding:10px 14px;font-size:0.875rem;color:var(--rebill-color-text-primary);outline:none;transition:border-color 0.2s;background:var(--rebill-color-background);height:38.33px;box-sizing:border-box}.input-element.input-error{border-color:var(--rebill-color-error)}.input-element:disabled{background-color:var(--rebill-color-background);border-color:var(--rebill-color-disabled);color:var(--rebill-color-text-secondary);cursor:not-allowed;opacity:0.7}select.input-element{padding:10px 30px 10px 14px;appearance:none;cursor:pointer}select.input-element:disabled{cursor:not-allowed}.input-element:focus{border-color:var(--rebill-color-primary)}.input-element:disabled:focus{border-color:var(--rebill-color-disabled)}.input-element::placeholder{color:var(--rebill-color-text-secondary-light);font-size:0.875rem;opacity:1}.select-wrapper.disabled .select-icon{color:var(--rebill-color-disabled)}.error-message{color:var(--rebill-color-error);font-size:0.75rem;margin-top:0.375rem}@media screen and (max-width: 768px){.input-element{font-size:1rem}.input-element::placeholder{font-size:1rem}}.input-wrapper{position:relative;display:flex;align-items:center}.input-element{width:100%;box-sizing:border-box}.icon-left,.icon-right{position:absolute;display:flex;align-items:center;justify-content:center;top:50%;transform:translateY(-50%)}.icon-left{left:0.75rem;color:var(--rebill-color-text-secondary-light)}.icon-right{right:0.75rem;cursor:pointer;color:var(--rebill-color-text-secondary-light)}.input-element.input-error:focus{flex-direction:column;box-shadow:0 0 0 2px var(--rebill-color-error-light)}.floating-label{position:relative}.floating-label .input-text__input-label{position:absolute;top:50%;left:0.75rem;transform:translateY(-50%);color:var(--rebill-color-text-secondary-light);transition:all 0.1s ease-in-out;pointer-events:none}.floating-label .input-element::placeholder{color:transparent}.floating-label .input-element:focus~.input-text__input-label,.floating-label .input-element:not(:placeholder-shown)~.input-text__input-label{top:0;font-size:0.62rem;color:var(--rebill-color-text-secondary);background-color:var(--rebill-color-background);padding:0 4px;left:0.75rem}.floating-label.has-left-icon .input-text__input-label{left:2.5rem}.input-element:disabled{color:var(--rebill-color-neutrals-500)}.input-wrapper:has(.input-element:disabled) .icon-left,.input-wrapper:has(.input-element:disabled) .icon-right{color:var(--rebill-color-text-secondary-light) !important}.email-suggestions-dropdown{position:absolute;top:100%;left:0;right:0;z-index:1000;background-color:var(--rebill-color-background);border:1px solid var(--rebill-color-border);border-radius:0.375rem;box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1),\n 0 2px 4px -1px rgba(0, 0, 0, 0.06);margin-top:0.25rem;max-height:200px;overflow-y:auto;animation:slideDown 0.15s ease-out;box-sizing:border-box;width:100%}.email-suggestions-dropdown.dropdown-up{top:auto;bottom:100%;margin-top:0;margin-bottom:0.25rem;animation:slideUp 0.15s ease-out}.email-suggestions-header{padding:0.75rem;font-size:0.875rem;font-weight:400;color:var(--rebill-color-primary);border-bottom:1px solid var(--rebill-color-border);background-color:var(--rebill-color-background)}.email-suggestion-item{padding:0.75rem;font-size:0.875rem;color:var(--rebill-color-text-primary);cursor:pointer;transition:background-color 0.15s ease}.email-suggestion-item:last-child{border-bottom:none}.email-suggestion-item:hover,.email-suggestion-item.highlighted{background-color:var(--rebill-color-background-right)}@keyframes slideDown{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.email-suggestions-dropdown::-webkit-scrollbar{width:6px}.email-suggestions-dropdown::-webkit-scrollbar-track{background:transparent}.email-suggestions-dropdown::-webkit-scrollbar-thumb{background-color:var(--rebill-color-border);border-radius:3px}.email-suggestions-dropdown::-webkit-scrollbar-thumb:hover{background-color:var(--rebill-color-text-secondary)}.email-correction-suggestion{display:flex;align-items:center;gap:8px;font-size:0.75rem;margin-top:0.375rem;line-height:1.4}.email-correction-icon{flex-shrink:0}.email-correction-text{color:var(--rebill-color-text-primary);flex:1}.email-correction-link{color:var(--rebill-color-link);text-decoration:underline;cursor:pointer;font-weight:500;transition:opacity 0.2s ease}.email-correction-link:hover{opacity:0.8}";
397
384
 
398
385
  const InputEmail = /*@__PURE__*/ proxyCustomElement(class InputEmail extends H {
399
386
  constructor(registerHost) {
@@ -407,11 +394,7 @@ const InputEmail = /*@__PURE__*/ proxyCustomElement(class InputEmail extends H {
407
394
  get el() { return this; }
408
395
  inputElement;
409
396
  suggestionsDropdownRef;
410
- isMouseOverSuggestions = false;
411
397
  blurTimeout;
412
- // Constants
413
- INPUT_PADDING_WITH_ICON = '2.5rem';
414
- INPUT_PADDING_DEFAULT = '0.75rem';
415
398
  /** Etiqueta que se muestra arriba del input */
416
399
  label = '';
417
400
  /** Placeholder del input */
@@ -440,10 +423,8 @@ const InputEmail = /*@__PURE__*/ proxyCustomElement(class InputEmail extends H {
440
423
  highlightedSuggestionIndex = -1;
441
424
  /** Sugerencia de corrección de email (para errores tipográficos) */
442
425
  emailCorrectionSuggestion = null;
443
- /** Indica si el formato del email es válido */
444
- isValidFormat = true;
445
- /** Indica si el usuario ya salió del campo (blur) */
446
- hasBlurred = false;
426
+ /** Posición del dropdown (arriba o abajo) */
427
+ dropdownPosition = 'down';
447
428
  handleFormChange(event) {
448
429
  const formData = event.detail;
449
430
  if (formData && this.id in formData) {
@@ -453,8 +434,17 @@ const InputEmail = /*@__PURE__*/ proxyCustomElement(class InputEmail extends H {
453
434
  handleDocumentClick(event) {
454
435
  if (this.suggestionsDropdownRef &&
455
436
  !this.suggestionsDropdownRef.contains(event.target) &&
456
- !this.inputElement?.contains(event.target) &&
457
- !this.isMouseOverSuggestions) {
437
+ !this.inputElement?.contains(event.target)) {
438
+ this.emailSuggestions = [];
439
+ this.highlightedSuggestionIndex = -1;
440
+ }
441
+ }
442
+ handleDocumentTouchEnd(event) {
443
+ const target = event.changedTouches?.[0]?.target;
444
+ if (this.suggestionsDropdownRef &&
445
+ target &&
446
+ !this.suggestionsDropdownRef.contains(target) &&
447
+ !this.inputElement?.contains(target)) {
458
448
  this.emailSuggestions = [];
459
449
  this.highlightedSuggestionIndex = -1;
460
450
  }
@@ -468,6 +458,24 @@ const InputEmail = /*@__PURE__*/ proxyCustomElement(class InputEmail extends H {
468
458
  checkForTypo(emailValue) {
469
459
  this.emailCorrectionSuggestion = suggestEmailCorrection(emailValue);
470
460
  }
461
+ /**
462
+ * Calcula si el dropdown debe posicionarse arriba o abajo según el espacio disponible
463
+ */
464
+ calculateDropdownPosition() {
465
+ if (!this.inputElement || !this.suggestionsDropdownRef)
466
+ return;
467
+ const inputRect = this.inputElement.getBoundingClientRect();
468
+ const dropdownHeight = this.suggestionsDropdownRef.offsetHeight || 200; // max-height del CSS
469
+ const spaceBelow = window.innerHeight - inputRect.bottom;
470
+ const spaceAbove = inputRect.top;
471
+ // Si no hay espacio abajo pero sí arriba, posicionar arriba
472
+ if (spaceBelow < dropdownHeight && spaceAbove > spaceBelow) {
473
+ this.dropdownPosition = 'up';
474
+ }
475
+ else {
476
+ this.dropdownPosition = 'down';
477
+ }
478
+ }
471
479
  // ============================================================================
472
480
  // INPUT EVENT HANDLERS
473
481
  // ============================================================================
@@ -475,15 +483,15 @@ const InputEmail = /*@__PURE__*/ proxyCustomElement(class InputEmail extends H {
475
483
  return value.toLowerCase();
476
484
  }
477
485
  updateEmailState(inputValue) {
478
- this.isValidFormat = validateEmailFormat(inputValue);
479
486
  this.emailSuggestions = getEmailSuggestions(inputValue);
480
487
  this.highlightedSuggestionIndex = -1;
481
488
  // Limpiar sugerencia de corrección al modificar el input
482
489
  this.emailCorrectionSuggestion = null;
483
490
  this.value = inputValue;
484
- }
485
- emitInputEvent(value) {
486
- this.input.emit({ id: this.id, value });
491
+ // Calcular posición del dropdown después de actualizar sugerencias
492
+ if (this.emailSuggestions.length > 0) {
493
+ setTimeout(() => this.calculateDropdownPosition(), 0);
494
+ }
487
495
  }
488
496
  onInput = (event) => {
489
497
  if (this.disabled)
@@ -492,14 +500,12 @@ const InputEmail = /*@__PURE__*/ proxyCustomElement(class InputEmail extends H {
492
500
  const inputValue = this.normalizeEmailInput(input.value);
493
501
  input.value = inputValue;
494
502
  this.updateEmailState(inputValue);
495
- this.emitInputEvent(inputValue);
503
+ this.input.emit({ id: this.id, value: inputValue });
496
504
  };
497
505
  resetValidationState() {
498
- this.isValidFormat = true;
499
506
  this.emailSuggestions = [];
500
507
  this.highlightedSuggestionIndex = -1;
501
508
  this.emailCorrectionSuggestion = null;
502
- this.hasBlurred = false;
503
509
  }
504
510
  onClear = () => {
505
511
  if (this.disabled)
@@ -525,11 +531,11 @@ const InputEmail = /*@__PURE__*/ proxyCustomElement(class InputEmail extends H {
525
531
  clearTimeout(this.blurTimeout);
526
532
  }
527
533
  this.blurTimeout = window.setTimeout(() => {
528
- if (!this.isMouseOverSuggestions) {
529
- this.hasBlurred = true;
534
+ // Verificar si el elemento activo está dentro del dropdown o es el input
535
+ const activeElement = document.activeElement;
536
+ const isClickingSuggestion = this.suggestionsDropdownRef?.contains(activeElement) || activeElement === this.inputElement;
537
+ if (!isClickingSuggestion) {
530
538
  this.trimAndUpdateValue();
531
- // Revalidar formato después del trim
532
- this.isValidFormat = validateEmailFormat(this.value);
533
539
  this.clearSuggestions();
534
540
  // Verificar errores tipográficos solo cuando sale del campo
535
541
  this.checkForTypo(this.value);
@@ -540,43 +546,38 @@ const InputEmail = /*@__PURE__*/ proxyCustomElement(class InputEmail extends H {
540
546
  onFocus = () => {
541
547
  if (this.value) {
542
548
  this.emailSuggestions = getEmailSuggestions(this.value);
549
+ // Calcular posición después de que se rendericen las sugerencias
550
+ setTimeout(() => this.calculateDropdownPosition(), 0);
543
551
  }
544
552
  };
545
553
  // ============================================================================
546
554
  // SUGGESTION INTERACTION HANDLERS
547
555
  // ============================================================================
548
- moveHighlightDown() {
549
- this.highlightedSuggestionIndex = Math.min(this.highlightedSuggestionIndex + 1, this.emailSuggestions.length - 1);
550
- }
551
- moveHighlightUp() {
552
- this.highlightedSuggestionIndex = Math.max(this.highlightedSuggestionIndex - 1, -1);
553
- }
554
- selectHighlightedSuggestion() {
555
- if (this.highlightedSuggestionIndex >= 0) {
556
- this.selectSuggestion(this.emailSuggestions[this.highlightedSuggestionIndex]);
557
- }
558
- }
559
- closeSuggestions() {
560
- this.emailSuggestions = [];
561
- this.highlightedSuggestionIndex = -1;
562
- }
563
556
  onKeyDown = (event) => {
564
557
  if (this.emailSuggestions.length === 0) {
565
558
  return;
566
559
  }
567
- const keyHandlers = {
568
- ArrowDown: () => this.moveHighlightDown(),
569
- ArrowUp: () => this.moveHighlightUp(),
570
- Escape: () => this.closeSuggestions(),
571
- };
572
- const handler = keyHandlers[event.key];
573
- if (handler) {
574
- event.preventDefault();
575
- handler();
576
- }
577
- else if (event.key === 'Enter' && this.highlightedSuggestionIndex >= 0) {
578
- event.preventDefault();
579
- this.selectHighlightedSuggestion();
560
+ switch (event.key) {
561
+ case 'ArrowDown':
562
+ event.preventDefault();
563
+ this.highlightedSuggestionIndex = Math.min(this.highlightedSuggestionIndex + 1, this.emailSuggestions.length - 1);
564
+ break;
565
+ case 'ArrowUp':
566
+ event.preventDefault();
567
+ this.highlightedSuggestionIndex = Math.max(this.highlightedSuggestionIndex - 1, -1);
568
+ break;
569
+ case 'Escape':
570
+ event.preventDefault();
571
+ this.emailSuggestions = [];
572
+ this.highlightedSuggestionIndex = -1;
573
+ break;
574
+ case 'Enter':
575
+ if (this.highlightedSuggestionIndex >= 0 &&
576
+ this.highlightedSuggestionIndex < this.emailSuggestions.length) {
577
+ event.preventDefault();
578
+ this.selectSuggestion(this.emailSuggestions[this.highlightedSuggestionIndex]);
579
+ }
580
+ break;
580
581
  }
581
582
  };
582
583
  selectSuggestion = (suggestion) => {
@@ -598,11 +599,10 @@ const InputEmail = /*@__PURE__*/ proxyCustomElement(class InputEmail extends H {
598
599
  handleSuggestionMouseEnter = (index) => {
599
600
  this.highlightedSuggestionIndex = index;
600
601
  };
601
- handleSuggestionsMouseEnter = () => {
602
- this.isMouseOverSuggestions = true;
603
- };
604
- handleSuggestionsMouseLeave = () => {
605
- this.isMouseOverSuggestions = false;
602
+ handleSuggestionTouchEnd = (suggestion, event) => {
603
+ event.preventDefault();
604
+ event.stopPropagation();
605
+ this.selectSuggestion(suggestion);
606
606
  };
607
607
  // ============================================================================
608
608
  // PUBLIC METHODS
@@ -618,18 +618,6 @@ const InputEmail = /*@__PURE__*/ proxyCustomElement(class InputEmail extends H {
618
618
  // ============================================================================
619
619
  // RENDER HELPERS
620
620
  // ============================================================================
621
- getInputPaddingStyles() {
622
- return {
623
- paddingLeft: this.leftIcon ? this.INPUT_PADDING_WITH_ICON : this.INPUT_PADDING_DEFAULT,
624
- paddingRight: this.clearable ? this.INPUT_PADDING_WITH_ICON : this.INPUT_PADDING_DEFAULT,
625
- };
626
- }
627
- shouldShowInvalidFormat() {
628
- return !this.isValidFormat && this.value && !this.error && this.hasBlurred;
629
- }
630
- shouldShowInvalidFormatError() {
631
- return !this.isValidFormat && this.value && !this.error && this.hasBlurred;
632
- }
633
621
  renderEmailCorrectionSuggestion() {
634
622
  if (!this.emailCorrectionSuggestion)
635
623
  return null;
@@ -637,7 +625,7 @@ const InputEmail = /*@__PURE__*/ proxyCustomElement(class InputEmail extends H {
637
625
  email: this.emailCorrectionSuggestion,
638
626
  });
639
627
  const parts = translatedText.split(this.emailCorrectionSuggestion);
640
- return (h("div", { class: "email-correction-suggestion", role: "status", "aria-live": "polite" }, h("rebill-icon", { name: "circle-info-outline", size: "16px", color: COLORS_ENUM.NEUTRALS_500 }), h("span", { class: "email-correction-text" }, parts.map((part, index) => (h("span", { key: index }, part, index < parts.length - 1 && (h("span", { class: "email-correction-link", onClick: this.applyCorrection }, this.emailCorrectionSuggestion))))))));
628
+ return (h("div", { class: "email-correction-suggestion", role: "status", "aria-live": "polite" }, h("rebill-icon", { name: "circle-info-outline", size: "16px" }), h("span", { class: "email-correction-text" }, parts.map((part, index) => (h("span", { key: index }, part, index < parts.length - 1 && (h("span", { class: "email-correction-link", onClick: this.applyCorrection }, this.emailCorrectionSuggestion))))))));
641
629
  }
642
630
  render() {
643
631
  const isFloating = this.variant === 'floating';
@@ -651,11 +639,16 @@ const InputEmail = /*@__PURE__*/ proxyCustomElement(class InputEmail extends H {
651
639
  'floating-label': isFloating,
652
640
  'has-left-icon': !!this.leftIcon,
653
641
  'has-email-suggestions': showEmailSuggestions,
654
- 'has-invalid-format': this.shouldShowInvalidFormat(),
655
642
  };
656
- return (h("div", { key: '5e40ed1a07b4d6c4b8aa7d4296613d4972a9f53c', class: "input-container" }, !isFloating && this.label && (h("label", { key: 'c9495052e17b8a3809b27eca34d0d13b6e2d4659', class: `input-label ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '27464568b4aa841a1563bc251ec278316e5b98f2', class: wrapperClasses }, this.leftIcon && (h("div", { key: '0087a2c77deb8a5b5e47fb89ed07130a98775056', class: "icon-left" }, h("rebill-icon", { key: '53422720b4914238bdf07ef6e2366c6b687fb18f', name: this.leftIcon }))), h("input", { key: 'ec35a711e007049c0d83efc4f81a83bc593f7808', ref: el => (this.inputElement = el), type: "email", class: inputClasses, placeholder: isFloating ? this.label : this.placeholder, value: this.value, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeyDown, disabled: this.disabled, autocomplete: "email", autocapitalize: "none", autocorrect: "off", spellcheck: "false", "aria-autocomplete": "list", "aria-expanded": showEmailSuggestions ? 'true' : 'false', "aria-haspopup": "listbox", "aria-owns": showEmailSuggestions ? 'email-suggestions' : undefined, "aria-invalid": !this.isValidFormat && this.value && this.hasBlurred ? 'true' : 'false', "aria-describedby": this.error || (!this.isValidFormat && this.value && this.hasBlurred)
657
- ? `${this.id}-error`
658
- : undefined, style: this.getInputPaddingStyles() }), isFloating && h("label", { key: 'd6c0532aaa21de0fa4f02670b1e13f848ea10663', class: "input-text__input-label input-label" }, this.label), this.clearable && this.value && (h("div", { key: '9d005dae6956ccc5210edec04d591e05c8e7badd', class: "icon-right", onClick: this.onClear }, h("rebill-icon", { key: 'ab11a4670e21d4da92aadaff27d63bf4f4b33a71', name: "x" }))), showEmailSuggestions && (h("div", { key: 'ed65d951fc245455cf6b2cd6b3e31f20ed7af55b', id: "email-suggestions", ref: el => (this.suggestionsDropdownRef = el), class: "email-suggestions-dropdown", role: "listbox", "aria-label": I18nService.translate('userInformation.suggestionsLabel', 'Email suggestions'), onMouseEnter: this.handleSuggestionsMouseEnter, onMouseLeave: this.handleSuggestionsMouseLeave }, h("div", { key: '2229c646e008d7d06e8367557f51242353eb1262', class: "email-suggestions-header" }, I18nService.translate('userInformation.suggestionsHeader', 'Suggestion')), this.emailSuggestions.map((suggestion, index) => (h("div", { key: suggestion, role: "option", "aria-selected": this.highlightedSuggestionIndex === index ? 'true' : 'false', class: `email-suggestion-item ${this.highlightedSuggestionIndex === index ? 'highlighted' : ''}`, onClick: () => this.selectSuggestion(suggestion), onMouseEnter: () => this.handleSuggestionMouseEnter(index) }, suggestion)))))), this.error && (h("span", { key: 'e52aa1a0bb4a601956736ae5560d2e1185504587', id: `${this.id}-error`, class: "error-message", role: "alert" }, this.error)), this.shouldShowInvalidFormatError() && (h("span", { key: '2335067645f44850b24459788a818062a1eb368a', id: `${this.id}-error`, class: "error-message", role: "alert" }, I18nService.translate('paymentErrors.emailInvalid', 'The email address is not valid'))), this.renderEmailCorrectionSuggestion()));
643
+ return (h("div", { key: 'ed7774a2ea20bf39efc4ea94cb06a4a9c105b663', class: "input-container" }, !isFloating && this.label && (h("label", { key: 'cf2ec695410acf32c321b9a069aa59a6f6470dc3', class: `input-label ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: 'e543a97cdc613fca6167dadf8a07b2777e90a495', class: wrapperClasses }, this.leftIcon && (h("div", { key: '03df3d4cc8c33c1759e2ed0fb18947d25e5a8e11', class: "icon-left" }, h("rebill-icon", { key: '67abed1bc54b6a64141744cbb32a0be15880a298', name: this.leftIcon }))), h("input", { key: '99c93d4e17b0dc740a53002c871fc57d406475c1', ref: el => (this.inputElement = el), type: "email", class: inputClasses, placeholder: isFloating ? this.label : this.placeholder, value: this.value, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeyDown, disabled: this.disabled, autocomplete: "email", autocapitalize: "none", autocorrect: "off", spellcheck: "false", "aria-autocomplete": "list", "aria-expanded": showEmailSuggestions ? 'true' : 'false', "aria-haspopup": "listbox", "aria-owns": showEmailSuggestions ? 'email-suggestions' : undefined, "aria-invalid": !!this.error ? 'true' : 'false', "aria-describedby": this.error ? `${this.id}-error` : undefined, style: {
644
+ paddingLeft: this.leftIcon ? '2.5rem' : '0.75rem',
645
+ paddingRight: this.clearable && this.value ? '2.5rem' : '0.75rem',
646
+ } }), isFloating && h("label", { key: '88a949293b8ebe6bcce0b734f764a85d5b71236c', class: "input-text__input-label input-label" }, this.label), this.clearable && this.value && (h("div", { key: 'c048feb271e68b3ff7fd6c7cc8f33c6f8d4433a4', class: "icon-right", onClick: this.onClear }, h("rebill-icon", { key: '0ab75a65fac36cd6528c4ac396f044452f2df7a2', name: "x" }))), showEmailSuggestions && (h("div", { key: '2db5ec50f09ac0c993f22a9346027ee8eba5f12c', id: "email-suggestions", ref: el => {
647
+ this.suggestionsDropdownRef = el;
648
+ if (el) {
649
+ setTimeout(() => this.calculateDropdownPosition(), 0);
650
+ }
651
+ }, class: `email-suggestions-dropdown ${this.dropdownPosition === 'up' ? 'dropdown-up' : ''}`, role: "listbox", "aria-label": I18nService.translate('userInformation.suggestionsLabel', 'Email suggestions') }, h("div", { key: 'bb037425cb813cfde02c24600ab36e114d2560a5', class: "email-suggestions-header" }, I18nService.translate('userInformation.suggestionsHeader', 'Suggestion')), this.emailSuggestions.map((suggestion, index) => (h("div", { key: suggestion, role: "option", "aria-selected": this.highlightedSuggestionIndex === index ? 'true' : 'false', class: `email-suggestion-item ${this.highlightedSuggestionIndex === index ? 'highlighted' : ''}`, onClick: () => this.selectSuggestion(suggestion), onTouchEnd: e => this.handleSuggestionTouchEnd(suggestion, e), onMouseEnter: () => this.handleSuggestionMouseEnter(index) }, suggestion)))))), this.error && (h("span", { key: '6450cd4636ec361fe0fe0f9044feb7a3d8329118', id: `${this.id}-error`, class: "error-message", role: "alert" }, this.error)), this.renderEmailCorrectionSuggestion()));
659
652
  }
660
653
  static get style() { return inputEmailCss; }
661
654
  }, [256, "rebill-input-email", {
@@ -671,10 +664,9 @@ const InputEmail = /*@__PURE__*/ proxyCustomElement(class InputEmail extends H {
671
664
  "emailSuggestions": [32],
672
665
  "highlightedSuggestionIndex": [32],
673
666
  "emailCorrectionSuggestion": [32],
674
- "isValidFormat": [32],
675
- "hasBlurred": [32],
667
+ "dropdownPosition": [32],
676
668
  "getInputElement": [64]
677
- }, [[4, "change", "handleFormChange"], [4, "click", "handleDocumentClick"]]]);
669
+ }, [[4, "change", "handleFormChange"], [4, "click", "handleDocumentClick"], [5, "touchend", "handleDocumentTouchEnd"]]]);
678
670
  function defineCustomElement() {
679
671
  if (typeof customElements === "undefined") {
680
672
  return;
@@ -696,6 +688,6 @@ function defineCustomElement() {
696
688
  defineCustomElement();
697
689
 
698
690
  export { InputEmail as I, defineCustomElement as d };
699
- //# sourceMappingURL=p-DP1RHUGR.js.map
691
+ //# sourceMappingURL=p-r59n4m0a.js.map
700
692
 
701
- //# sourceMappingURL=p-DP1RHUGR.js.map
693
+ //# sourceMappingURL=p-r59n4m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,EAEzD,EAAA,UAAU,CACP,CACP,CAAC,CACE,CACP,CACG,EACL,IAAI,CAAC,KAAK,KACT,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,EAAE,EAAE,CAAG,EAAA,IAAI,CAAC,EAAE,CAAA,MAAA,CAAQ,EAAE,KAAK,EAAC,eAAe,EAAC,IAAI,EAAC,OAAO,EAAA,EAC7D,IAAI,CAAC,KAAK,CACN,CACR,EACA,IAAI,CAAC,+BAA+B,EAAE,CACnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/utils/email-validation.constants.ts","src/utils/email-validation.ts","src/components/shared/inputs/input-email/input-email.css?tag=rebill-input-email","src/components/shared/inputs/input-email/input-email.tsx"],"sourcesContent":["export const COMMON_EMAIL_DOMAINS = [\n 'gmail.com',\n 'outlook.com',\n 'hotmail.com',\n 'yahoo.com',\n 'icloud.com',\n 'msn.com',\n 'live.com',\n];\n\nexport const VALID_TLDS = [\n 'com',\n 'org',\n 'net',\n 'info',\n 'biz',\n 'online',\n 'site',\n 'store',\n 'shop',\n 'xyz',\n 'pro',\n 'name',\n 'email',\n 'cloud',\n 'tech',\n 'app',\n 'dev',\n 'io',\n 'me',\n 'ai',\n 'co',\n 'int',\n 'edu',\n 'gov',\n 'mil',\n 'us',\n 'ca',\n 'uk',\n 'de',\n 'fr',\n 'es',\n 'it',\n 'nl',\n 'be',\n 'se',\n 'no',\n 'dk',\n 'fi',\n 'ch',\n 'at',\n 'pl',\n 'cz',\n 'gr',\n 'hu',\n 'pt',\n 'ro',\n 'bg',\n 'si',\n 'sk',\n 'ie',\n 'lt',\n 'lv',\n 'ee',\n 'is',\n 'ru',\n 'tr',\n 'ge',\n 'am',\n 'az',\n 'ar',\n 'mx',\n 'br',\n 'cl',\n 'co',\n 'uy',\n 'py',\n 'bo',\n 'pe',\n 'ec',\n 've',\n 'pa',\n 'cr',\n 'ni',\n 'hn',\n 'sv',\n 'gt',\n 'bs',\n 'bb',\n 'ag',\n 'dm',\n 'gd',\n 'lc',\n 'vc',\n 'tt',\n 'jm',\n 'do',\n 'ht',\n 'ky',\n 'tc',\n 'vg',\n 'bm',\n 'gf',\n 'gp',\n 'mq',\n 're',\n 'yt',\n 'pf',\n 'nc',\n];\n\nexport const MAX_LEVENSHTEIN_DISTANCE_DOMAIN = 3;\nexport const MAX_LEVENSHTEIN_DISTANCE_TLD = 2;\nexport const BLUR_DELAY_MS = 200;\n","import {\n COMMON_EMAIL_DOMAINS,\n MAX_LEVENSHTEIN_DISTANCE_DOMAIN,\n MAX_LEVENSHTEIN_DISTANCE_TLD,\n VALID_TLDS,\n} from './email-validation.constants';\n\n// ============================================================================\n// HELPER FUNCTIONS\n// ============================================================================\n\nfunction normalizeDomain(domain: string): string {\n return domain?.toLowerCase().trim() || '';\n}\n\nfunction normalizeTLD(tld: string): string {\n if (!tld) return '';\n return tld.toLowerCase().replace(/^\\./, '');\n}\n\nfunction isExactCommonDomain(domain: string): boolean {\n return COMMON_EMAIL_DOMAINS.some(\n commonDomain => normalizeDomain(commonDomain) === normalizeDomain(domain),\n );\n}\n\nfunction buildEmailCorrection(localPart: string, domain: string): string {\n return `${localPart}@${domain}`;\n}\n\nfunction getDomainParts(commonDomain: string): { name: string; tld: string } {\n const parts = commonDomain.split('.');\n return {\n name: parts[0],\n tld: parts[1] || '',\n };\n}\n\nfunction levenshteinDistance(str1: string, str2: string): number {\n const matrix: number[][] = [];\n\n for (let i = 0; i <= str2.length; i++) {\n matrix[i] = [i];\n }\n\n for (let j = 0; j <= str1.length; j++) {\n matrix[0][j] = j;\n }\n\n for (let i = 1; i <= str2.length; i++) {\n for (let j = 1; j <= str1.length; j++) {\n if (str2.charAt(i - 1) === str1.charAt(j - 1)) {\n matrix[i][j] = matrix[i - 1][j - 1];\n } else {\n matrix[i][j] = Math.min(\n matrix[i - 1][j - 1] + 1,\n matrix[i][j - 1] + 1,\n matrix[i - 1][j] + 1,\n );\n }\n }\n }\n\n return matrix[str2.length][str1.length];\n}\n\nfunction extractDomainName(domain: string): string {\n return domain.split('.')[0];\n}\n\n/**\n * Valida si el TLD es válido\n * Los TLDs en VALID_TLDS no tienen punto (ej: \"com\")\n */\nexport function isValidTLD(tld: string): boolean {\n if (!tld) return false;\n return VALID_TLDS.includes(normalizeTLD(tld));\n}\n\n/**\n * Encuentra un TLD válido similar al ingresado\n * Retorna el TLD sin punto porque se usa en join('.')\n */\nexport function findSimilarTLD(inputTLD: string): string | null {\n if (!inputTLD) return null;\n\n const normalized = normalizeTLD(inputTLD);\n\n if (VALID_TLDS.includes(normalized)) {\n return null;\n }\n let bestMatch: string | null = null;\n let minDistance = Infinity;\n\n for (const validTLD of VALID_TLDS) {\n const distance = levenshteinDistance(normalized, validTLD);\n\n if (distance < minDistance && distance > 0 && distance <= MAX_LEVENSHTEIN_DISTANCE_TLD) {\n minDistance = distance;\n bestMatch = validTLD;\n }\n }\n\n return bestMatch;\n}\n\n/**\n * Encuentra el dominio más similar a uno de los dominios comunes\n */\nexport function findSimilarDomain(inputDomain: string): string | null {\n if (!inputDomain || inputDomain.trim() === '') {\n return null;\n }\n\n const normalizedInput = inputDomain.toLowerCase().trim();\n const domainName = extractDomainName(normalizedInput);\n\n let bestMatch: string | null = null;\n let minDistance = Infinity;\n\n for (const domain of COMMON_EMAIL_DOMAINS) {\n const commonDomainName = extractDomainName(domain);\n const distance = levenshteinDistance(domainName, commonDomainName);\n\n if (distance < minDistance && distance > 0 && distance <= MAX_LEVENSHTEIN_DISTANCE_DOMAIN) {\n minDistance = distance;\n bestMatch = domain;\n }\n }\n\n return bestMatch;\n}\n\n/**\n * Detecta si hay errores de formato en el dominio (no errores tipográficos)\n * ej: doble punto (..), punto al inicio/final, caracteres inválidos\n */\nexport function hasEmailFormatError(domainPart: string): boolean {\n if (!domainPart) return false;\n\n if (domainPart.includes('..')) {\n return true;\n }\n\n if (domainPart.startsWith('.') || domainPart.endsWith('.')) {\n return true;\n }\n\n const validDomainPattern = /^[a-zA-Z0-9.-]+$/;\n if (!validDomainPattern.test(domainPart)) {\n return true;\n }\n\n // Validar que el TLD (después del último punto) tenga al menos 2 caracteres\n const lastDotIndex = domainPart.lastIndexOf('.');\n if (lastDotIndex !== -1) {\n const tld = domainPart.substring(lastDotIndex + 1);\n if (tld.length < 2) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Detecta si falta un punto en el dominio (ej: \"gmailcom\" -> \"gmail.com\")\n */\nexport function detectMissingDot(\n domainPart: string,\n isValidTLDFn: (tld: string) => boolean,\n): string | null {\n if (!domainPart || domainPart.includes('.')) {\n return null;\n }\n\n for (const commonDomain of COMMON_EMAIL_DOMAINS) {\n const commonDomainName = extractDomainName(commonDomain);\n const normalizedDomain = normalizeDomain(domainPart);\n const normalizedCommonName = normalizeDomain(commonDomainName);\n\n if (normalizedDomain.startsWith(normalizedCommonName)) {\n const remaining = normalizedDomain.substring(normalizedCommonName.length);\n\n if (isValidTLDFn(remaining)) {\n return `${commonDomainName}.${remaining}`;\n }\n }\n }\n for (const commonDomain of COMMON_EMAIL_DOMAINS) {\n const commonDomainName = extractDomainName(commonDomain);\n const { tld: commonTLD } = getDomainParts(commonDomain);\n\n const expectedWithoutDot = `${commonDomainName}${commonTLD}`;\n if (normalizeDomain(domainPart) === normalizeDomain(expectedWithoutDot)) {\n return commonDomain;\n }\n }\n\n return null;\n}\n\n/**\n * Detecta si falta un punto en un dominio de múltiples partes\n * ej: \"gmailcom.ar\" -> \"gmail.com.ar\"\n */\nexport function detectMissingDotInMultiPartDomain(domainPart: string): string | null {\n if (!domainPart || !domainPart.includes('.')) {\n return null;\n }\n\n const domainParts = domainPart.split('.');\n const firstPart = domainParts[0];\n const restParts = domainParts.slice(1);\n\n for (const commonDomain of COMMON_EMAIL_DOMAINS) {\n const commonDomainName = extractDomainName(commonDomain);\n const { tld: commonTLD } = getDomainParts(commonDomain);\n\n const expectedWithoutDot = `${commonDomainName}${commonTLD}`;\n if (normalizeDomain(firstPart) === normalizeDomain(expectedWithoutDot)) {\n const correctedParts = [commonDomainName, commonTLD, ...restParts];\n return correctedParts.join('.');\n }\n }\n\n return null;\n}\n\n/**\n * Valida el formato básico del email completo\n * @param email - El email a validar\n * @returns true si el formato es válido, false en caso contrario\n */\nexport function validateEmailFormat(email: string): boolean {\n if (!email || email.trim() === '') {\n return true;\n }\n\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (!emailRegex.test(email)) {\n return false;\n }\n\n // Extraer la parte del dominio para validar formato completo (incluyendo TLD de al menos 2 caracteres)\n const parts = email.split('@');\n if (parts.length !== 2) {\n return false;\n }\n\n const domainPart = parts[1];\n // Usar hasEmailFormatError para validar el dominio (incluye validación de TLD de 1 carácter)\n return !hasEmailFormatError(domainPart);\n}\n\n/**\n * Genera sugerencias de email basadas en dominios comunes\n * @param emailValue - El valor actual del email que el usuario está escribiendo\n * @returns Array de emails sugeridos\n */\nexport function getEmailSuggestions(emailValue: string): string[] {\n if (!emailValue || !emailValue.includes('@')) {\n return [];\n }\n\n const [localPart, domainPart] = emailValue.split('@');\n\n if (!localPart) {\n return [];\n }\n\n if (domainPart && domainPart.includes('.') && !domainPart.endsWith('.')) {\n return [];\n }\n\n const filteredDomains = COMMON_EMAIL_DOMAINS.filter(domain => {\n if (!domainPart || domainPart.trim() === '') {\n return true;\n }\n return domain.startsWith(domainPart.toLowerCase());\n });\n\n return filteredDomains.map(domain => `${localPart}@${domain}`);\n}\n\n/**\n * Corrige errores tipográficos en un dominio que ya tiene puntos\n * @param localPart - La parte local del email (antes del @)\n * @param domainPart - La parte del dominio (después del @)\n * @returns El email corregido sugerido, o null si no hay corrección\n */\nfunction correctDomainTypos(localPart: string, domainPart: string): string | null {\n const domainParts = domainPart.split('.');\n const domainName = domainParts[0];\n const isDomainNameValid = COMMON_EMAIL_DOMAINS.some(domain => {\n const { name } = getDomainParts(domain);\n return normalizeDomain(name) === normalizeDomain(domainName);\n });\n\n let correctedDomainParts = [...domainParts];\n let hasCorrection = false;\n\n if (!isDomainNameValid) {\n const similarDomain = findSimilarDomain(domainPart);\n if (similarDomain) {\n const { name } = getDomainParts(similarDomain);\n correctedDomainParts[0] = name;\n hasCorrection = true;\n }\n }\n\n for (let i = 1; i < correctedDomainParts.length; i++) {\n const part = correctedDomainParts[i];\n if (!isValidTLD(part)) {\n const similarTLD = findSimilarTLD(part);\n if (similarTLD) {\n correctedDomainParts[i] = similarTLD;\n hasCorrection = true;\n }\n }\n }\n\n return hasCorrection ? buildEmailCorrection(localPart, correctedDomainParts.join('.')) : null;\n}\n\n/**\n * Detecta si hay un error tipográfico en el email y sugiere una corrección\n * @param emailValue - El email a verificar\n * @returns El email corregido sugerido, o null si no hay corrección\n */\nexport function suggestEmailCorrection(emailValue: string): string | null {\n if (!emailValue || !emailValue.includes('@')) {\n return null;\n }\n\n const [localPart, domainPart] = emailValue.split('@');\n\n if (!localPart || !domainPart) {\n return null;\n }\n\n if (hasEmailFormatError(domainPart)) {\n return null;\n }\n\n if (isExactCommonDomain(domainPart)) {\n return null;\n }\n\n if (!domainPart.includes('.')) {\n const correctedDomain = detectMissingDot(domainPart, isValidTLD);\n return correctedDomain ? buildEmailCorrection(localPart, correctedDomain) : null;\n }\n\n const missingDotCorrection = detectMissingDotInMultiPartDomain(domainPart);\n if (missingDotCorrection) {\n return buildEmailCorrection(localPart, missingDotCorrection);\n }\n\n return correctDomainTypos(localPart, domainPart);\n}\n","@import '../shared-input.css';\n\n.input-wrapper {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.input-element {\n width: 100%;\n box-sizing: border-box;\n}\n\n.icon-left,\n.icon-right {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.icon-left {\n left: 0.75rem;\n color: var(--rebill-color-text-secondary-light);\n}\n\n.icon-right {\n right: 0.75rem;\n cursor: pointer;\n color: var(--rebill-color-text-secondary-light);\n}\n\n.input-element.input-error:focus {\n flex-direction: column;\n box-shadow: 0 0 0 2px var(--rebill-color-error-light);\n}\n\n/* Floating label styles */\n.floating-label {\n position: relative;\n}\n\n.floating-label .input-text__input-label {\n position: absolute;\n top: 50%;\n left: 0.75rem;\n transform: translateY(-50%);\n color: var(--rebill-color-text-secondary-light);\n transition: all 0.1s ease-in-out;\n pointer-events: none;\n}\n\n.floating-label .input-element::placeholder {\n color: transparent;\n}\n\n.floating-label .input-element:focus ~ .input-text__input-label,\n.floating-label .input-element:not(:placeholder-shown) ~ .input-text__input-label {\n top: 0;\n font-size: 0.62rem;\n color: var(--rebill-color-text-secondary);\n background-color: var(--rebill-color-background);\n padding: 0 4px;\n left: 0.75rem;\n}\n\n.floating-label.has-left-icon .input-text__input-label {\n left: 2.5rem;\n}\n\n/* Disabled state styles */\n.input-element:disabled {\n color: var(--rebill-color-neutrals-500);\n}\n\n.input-wrapper:has(.input-element:disabled) .icon-left,\n.input-wrapper:has(.input-element:disabled) .icon-right {\n color: var(--rebill-color-text-secondary-light) !important;\n}\n\n/* Email suggestions dropdown */\n.email-suggestions-dropdown {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: 1000;\n background-color: var(--rebill-color-background);\n border: 1px solid var(--rebill-color-border);\n border-radius: 0.375rem;\n box-shadow:\n 0 4px 6px -1px rgba(0, 0, 0, 0.1),\n 0 2px 4px -1px rgba(0, 0, 0, 0.06);\n margin-top: 0.25rem;\n max-height: 200px;\n overflow-y: auto;\n animation: slideDown 0.15s ease-out;\n box-sizing: border-box;\n width: 100%;\n}\n\n.email-suggestions-dropdown.dropdown-up {\n top: auto;\n bottom: 100%;\n margin-top: 0;\n margin-bottom: 0.25rem;\n animation: slideUp 0.15s ease-out;\n}\n\n.email-suggestions-header {\n padding: 0.75rem;\n font-size: 0.875rem;\n font-weight: 400;\n color: var(--rebill-color-primary);\n border-bottom: 1px solid var(--rebill-color-border);\n background-color: var(--rebill-color-background);\n}\n\n.email-suggestion-item {\n padding: 0.75rem;\n font-size: 0.875rem;\n color: var(--rebill-color-text-primary);\n cursor: pointer;\n transition: background-color 0.15s ease;\n}\n\n.email-suggestion-item:last-child {\n border-bottom: none;\n}\n\n.email-suggestion-item:hover,\n.email-suggestion-item.highlighted {\n background-color: var(--rebill-color-background-right);\n}\n\n@keyframes slideDown {\n from {\n opacity: 0;\n transform: translateY(-8px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes slideUp {\n from {\n opacity: 0;\n transform: translateY(8px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n/* Scrollbar styling for email suggestions dropdown */\n.email-suggestions-dropdown::-webkit-scrollbar {\n width: 6px;\n}\n\n.email-suggestions-dropdown::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.email-suggestions-dropdown::-webkit-scrollbar-thumb {\n background-color: var(--rebill-color-border);\n border-radius: 3px;\n}\n\n.email-suggestions-dropdown::-webkit-scrollbar-thumb:hover {\n background-color: var(--rebill-color-text-secondary);\n}\n\n/* Email correction suggestion */\n.email-correction-suggestion {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 0.75rem;\n margin-top: 0.375rem;\n line-height: 1.4;\n}\n\n.email-correction-icon {\n flex-shrink: 0;\n}\n\n.email-correction-text {\n color: var(--rebill-color-text-primary);\n flex: 1;\n}\n\n.email-correction-link {\n color: var(--rebill-color-link);\n text-decoration: underline;\n cursor: pointer;\n font-weight: 500;\n transition: opacity 0.2s ease;\n}\n\n.email-correction-link:hover {\n opacity: 0.8;\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Listen,\n Method,\n Prop,\n State,\n h,\n} from '@stencil/core';\nimport { I18nService } from '../../../../i18n/i18n.service';\nimport { getEmailSuggestions, suggestEmailCorrection } from '../../../../utils/email-validation';\nimport { BLUR_DELAY_MS } from '../../../../utils/email-validation.constants';\n\n@Component({\n tag: 'rebill-input-email',\n styleUrl: 'input-email.css',\n shadow: false,\n})\nexport class InputEmail {\n @Element() el: HTMLElement;\n private inputElement: HTMLInputElement;\n private suggestionsDropdownRef?: HTMLDivElement;\n private blurTimeout?: number;\n\n /** Etiqueta que se muestra arriba del input */\n @Prop() label: string = '';\n /** Placeholder del input */\n @Prop() placeholder: string = '';\n /** Valor del input */\n @Prop({ mutable: true, reflect: true }) value: string = '';\n /** Mensaje de error */\n @Prop() error: string = '';\n /** ID del input */\n @Prop() id: string = 'email';\n /** Estado deshabilitado */\n @Prop() disabled: boolean = false;\n /** Icono a la izquierda */\n @Prop() leftIcon: string;\n /** Permitir limpiar el input */\n @Prop() clearable: boolean = false;\n /** Variacion de estilo del input */\n @Prop() variant: 'default' | 'floating' = 'default';\n /** Evento al cambiar el valor */\n @Event() input: EventEmitter<{ id: string; value: string }>;\n /** Evento al salir del input */\n @Event() blur: EventEmitter<{ id: string; value: string }>;\n /** Sugerencias de email */\n @State() emailSuggestions: string[] = [];\n /** Índice de la sugerencia resaltada */\n @State() highlightedSuggestionIndex: number = -1;\n /** Sugerencia de corrección de email (para errores tipográficos) */\n @State() emailCorrectionSuggestion: string | null = null;\n /** Posición del dropdown (arriba o abajo) */\n @State() dropdownPosition: 'down' | 'up' = 'down';\n\n @Listen('change', { target: 'document' })\n handleFormChange(event: CustomEvent) {\n const formData = event.detail;\n if (formData && this.id in formData) {\n this.value = formData[this.id];\n }\n }\n\n @Listen('click', { target: 'document' })\n handleDocumentClick(event: MouseEvent) {\n if (\n this.suggestionsDropdownRef &&\n !this.suggestionsDropdownRef.contains(event.target as Node) &&\n !this.inputElement?.contains(event.target as Node)\n ) {\n this.emailSuggestions = [];\n this.highlightedSuggestionIndex = -1;\n }\n }\n\n @Listen('touchend', { target: 'document' })\n handleDocumentTouchEnd(event: TouchEvent) {\n const target = event.changedTouches?.[0]?.target as Node;\n if (\n this.suggestionsDropdownRef &&\n target &&\n !this.suggestionsDropdownRef.contains(target) &&\n !this.inputElement?.contains(target)\n ) {\n this.emailSuggestions = [];\n this.highlightedSuggestionIndex = -1;\n }\n }\n\n // ============================================================================\n // EMAIL VALIDATION & SUGGESTIONS\n // ============================================================================\n\n /**\n * Detecta si hay un error tipográfico en el email y actualiza el estado\n */\n private checkForTypo(emailValue: string): void {\n this.emailCorrectionSuggestion = suggestEmailCorrection(emailValue);\n }\n\n /**\n * Calcula si el dropdown debe posicionarse arriba o abajo según el espacio disponible\n */\n private calculateDropdownPosition(): void {\n if (!this.inputElement || !this.suggestionsDropdownRef) return;\n\n const inputRect = this.inputElement.getBoundingClientRect();\n const dropdownHeight = this.suggestionsDropdownRef.offsetHeight || 200; // max-height del CSS\n const spaceBelow = window.innerHeight - inputRect.bottom;\n const spaceAbove = inputRect.top;\n\n // Si no hay espacio abajo pero sí arriba, posicionar arriba\n if (spaceBelow < dropdownHeight && spaceAbove > spaceBelow) {\n this.dropdownPosition = 'up';\n } else {\n this.dropdownPosition = 'down';\n }\n }\n\n // ============================================================================\n // INPUT EVENT HANDLERS\n // ============================================================================\n\n private normalizeEmailInput(value: string): string {\n return value.toLowerCase();\n }\n\n private updateEmailState(inputValue: string): void {\n this.emailSuggestions = getEmailSuggestions(inputValue);\n this.highlightedSuggestionIndex = -1;\n // Limpiar sugerencia de corrección al modificar el input\n this.emailCorrectionSuggestion = null;\n this.value = inputValue;\n\n // Calcular posición del dropdown después de actualizar sugerencias\n if (this.emailSuggestions.length > 0) {\n setTimeout(() => this.calculateDropdownPosition(), 0);\n }\n }\n\n private onInput = (event: Event) => {\n if (this.disabled) return;\n\n const input = event.target as HTMLInputElement;\n const inputValue = this.normalizeEmailInput(input.value);\n\n input.value = inputValue;\n this.updateEmailState(inputValue);\n this.input.emit({ id: this.id, value: inputValue });\n };\n\n private resetValidationState(): void {\n this.emailSuggestions = [];\n this.highlightedSuggestionIndex = -1;\n this.emailCorrectionSuggestion = null;\n }\n\n private onClear = () => {\n if (this.disabled) return;\n\n this.value = '';\n this.resetValidationState();\n this.input.emit({ id: this.id, value: this.value });\n };\n\n private trimAndUpdateValue(): void {\n const trimmedValue = this.value.trim();\n if (trimmedValue !== this.value) {\n this.value = trimmedValue;\n this.input.emit({ id: this.id, value: this.value });\n }\n }\n\n private clearSuggestions(): void {\n this.emailSuggestions = [];\n this.highlightedSuggestionIndex = -1;\n // Nota: No limpiamos emailCorrectionSuggestion para que el usuario pueda verla\n }\n\n private onBlur = () => {\n if (this.blurTimeout) {\n clearTimeout(this.blurTimeout);\n }\n\n this.blurTimeout = window.setTimeout(() => {\n // Verificar si el elemento activo está dentro del dropdown o es el input\n const activeElement = document.activeElement;\n const isClickingSuggestion =\n this.suggestionsDropdownRef?.contains(activeElement) || activeElement === this.inputElement;\n\n if (!isClickingSuggestion) {\n this.trimAndUpdateValue();\n this.clearSuggestions();\n // Verificar errores tipográficos solo cuando sale del campo\n this.checkForTypo(this.value);\n this.blur.emit({ id: this.id, value: this.value });\n }\n }, BLUR_DELAY_MS);\n };\n\n private onFocus = () => {\n if (this.value) {\n this.emailSuggestions = getEmailSuggestions(this.value);\n // Calcular posición después de que se rendericen las sugerencias\n setTimeout(() => this.calculateDropdownPosition(), 0);\n }\n };\n\n // ============================================================================\n // SUGGESTION INTERACTION HANDLERS\n // ============================================================================\n\n private onKeyDown = (event: KeyboardEvent) => {\n if (this.emailSuggestions.length === 0) {\n return;\n }\n\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n this.highlightedSuggestionIndex = Math.min(\n this.highlightedSuggestionIndex + 1,\n this.emailSuggestions.length - 1,\n );\n break;\n case 'ArrowUp':\n event.preventDefault();\n this.highlightedSuggestionIndex = Math.max(this.highlightedSuggestionIndex - 1, -1);\n break;\n case 'Escape':\n event.preventDefault();\n this.emailSuggestions = [];\n this.highlightedSuggestionIndex = -1;\n break;\n case 'Enter':\n if (\n this.highlightedSuggestionIndex >= 0 &&\n this.highlightedSuggestionIndex < this.emailSuggestions.length\n ) {\n event.preventDefault();\n this.selectSuggestion(this.emailSuggestions[this.highlightedSuggestionIndex]);\n }\n break;\n }\n };\n\n private selectSuggestion = (suggestion: string) => {\n this.value = suggestion;\n this.emailSuggestions = [];\n this.highlightedSuggestionIndex = -1;\n this.emailCorrectionSuggestion = null;\n if (this.inputElement) {\n this.inputElement.value = suggestion;\n }\n this.input.emit({ id: this.id, value: this.value });\n this.inputElement?.focus();\n };\n\n private applyCorrection = () => {\n if (this.emailCorrectionSuggestion) {\n this.selectSuggestion(this.emailCorrectionSuggestion);\n }\n };\n\n private handleSuggestionMouseEnter = (index: number) => {\n this.highlightedSuggestionIndex = index;\n };\n\n private handleSuggestionTouchEnd = (suggestion: string, event: TouchEvent) => {\n event.preventDefault();\n event.stopPropagation();\n this.selectSuggestion(suggestion);\n };\n\n // ============================================================================\n // PUBLIC METHODS\n // ============================================================================\n\n @Method()\n async getInputElement(): Promise<HTMLInputElement | null> {\n return this.inputElement;\n }\n\n disconnectedCallback() {\n if (this.blurTimeout) {\n clearTimeout(this.blurTimeout);\n }\n }\n\n // ============================================================================\n // RENDER HELPERS\n // ============================================================================\n\n private renderEmailCorrectionSuggestion() {\n if (!this.emailCorrectionSuggestion) return null;\n\n const translatedText = I18nService.translate('userInformation.emailCorrectionSuggestion', {\n email: this.emailCorrectionSuggestion,\n });\n const parts = translatedText.split(this.emailCorrectionSuggestion);\n\n return (\n <div class=\"email-correction-suggestion\" role=\"status\" aria-live=\"polite\">\n <rebill-icon name=\"circle-info-outline\" size=\"16px\" />\n <span class=\"email-correction-text\">\n {parts.map((part, index) => (\n <span key={index}>\n {part}\n {index < parts.length - 1 && (\n <span class=\"email-correction-link\" onClick={this.applyCorrection}>\n {this.emailCorrectionSuggestion}\n </span>\n )}\n </span>\n ))}\n </span>\n </div>\n );\n }\n\n render() {\n const isFloating = this.variant === 'floating';\n const showEmailSuggestions = this.emailSuggestions.length > 0;\n\n const inputClasses = {\n 'input-element': true,\n 'input-error': !!this.error,\n };\n\n const wrapperClasses = {\n 'input-wrapper': true,\n 'floating-label': isFloating,\n 'has-left-icon': !!this.leftIcon,\n 'has-email-suggestions': showEmailSuggestions,\n };\n\n return (\n <div class=\"input-container\">\n {!isFloating && this.label && (\n <label class={`input-label ${this.disabled ? 'disabled' : ''}`}>{this.label}</label>\n )}\n <div class={wrapperClasses}>\n {this.leftIcon && (\n <div class=\"icon-left\">\n <rebill-icon name={this.leftIcon}></rebill-icon>\n </div>\n )}\n <input\n ref={el => (this.inputElement = el)}\n type=\"email\"\n class={inputClasses}\n placeholder={isFloating ? this.label : this.placeholder}\n value={this.value}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onKeyDown={this.onKeyDown}\n disabled={this.disabled}\n autocomplete=\"email\"\n autocapitalize=\"none\"\n autocorrect=\"off\"\n spellcheck=\"false\"\n aria-autocomplete=\"list\"\n aria-expanded={showEmailSuggestions ? 'true' : 'false'}\n aria-haspopup=\"listbox\"\n aria-owns={showEmailSuggestions ? 'email-suggestions' : undefined}\n aria-invalid={!!this.error ? 'true' : 'false'}\n aria-describedby={this.error ? `${this.id}-error` : undefined}\n style={{\n paddingLeft: this.leftIcon ? '2.5rem' : '0.75rem',\n paddingRight: this.clearable && this.value ? '2.5rem' : '0.75rem',\n }}\n />\n {isFloating && <label class=\"input-text__input-label input-label\">{this.label}</label>}\n {this.clearable && this.value && (\n <div class=\"icon-right\" onClick={this.onClear}>\n <rebill-icon name=\"x\"></rebill-icon>\n </div>\n )}\n {showEmailSuggestions && (\n <div\n id=\"email-suggestions\"\n ref={el => {\n this.suggestionsDropdownRef = el;\n if (el) {\n setTimeout(() => this.calculateDropdownPosition(), 0);\n }\n }}\n class={`email-suggestions-dropdown ${this.dropdownPosition === 'up' ? 'dropdown-up' : ''}`}\n role=\"listbox\"\n aria-label={I18nService.translate(\n 'userInformation.suggestionsLabel',\n 'Email suggestions',\n )}\n >\n <div class=\"email-suggestions-header\">\n {I18nService.translate('userInformation.suggestionsHeader', 'Suggestion')}\n </div>\n {this.emailSuggestions.map((suggestion, index) => (\n <div\n key={suggestion}\n role=\"option\"\n aria-selected={this.highlightedSuggestionIndex === index ? 'true' : 'false'}\n class={`email-suggestion-item ${this.highlightedSuggestionIndex === index ? 'highlighted' : ''}`}\n onClick={() => this.selectSuggestion(suggestion)}\n onTouchEnd={e => this.handleSuggestionTouchEnd(suggestion, e)}\n onMouseEnter={() => this.handleSuggestionMouseEnter(index)}\n >\n {suggestion}\n </div>\n ))}\n </div>\n )}\n </div>\n {this.error && (\n <span id={`${this.id}-error`} class=\"error-message\" role=\"alert\">\n {this.error}\n </span>\n )}\n {this.renderEmailCorrectionSuggestion()}\n </div>\n );\n }\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
- import { P as PaymentMethodSelector$1, d as defineCustomElement$1 } from './p-6IQljT42.js';
1
+ import { P as PaymentMethodSelector$1, d as defineCustomElement$1 } from './p-Dhm2b0J_.js';
2
2
 
3
3
  const PaymentMethodSelector = PaymentMethodSelector$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { A as AddressForm, d as defineCustomElement$1 } from './p-CamHvHq5.js';
1
+ import { A as AddressForm, d as defineCustomElement$1 } from './p-ChYpVv-Q.js';
2
2
 
3
3
  const RebillAddressForm = AddressForm;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { A as AddressSearch, d as defineCustomElement$1 } from './p-C-mZ7tbj.js';
1
+ import { A as AddressSearch, d as defineCustomElement$1 } from './p-lrqPOj5Q.js';
2
2
 
3
3
  const RebillAddressSearch = AddressSearch;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { A as Address, d as defineCustomElement$1 } from './p-De7T_ng8.js';
1
+ import { A as Address, d as defineCustomElement$1 } from './p-G3CHdt_U.js';
2
2
 
3
3
  const RebillAddress = Address;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { B as BankSelector, d as defineCustomElement$1 } from './p-BwbfTRHn.js';
1
+ import { B as BankSelector, d as defineCustomElement$1 } from './p-Ba3VDw-H.js';
2
2
 
3
3
  const RebillBankSelector = BankSelector;
4
4
  const defineCustomElement = defineCustomElement$1;