rebill-web-components-sdk 1.8.23 → 1.8.24
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.
- package/dist/cjs/apm-checkout_19.cjs.entry.js +1 -1
- package/dist/cjs/card-identification.card-iframe.card-skeleton.rebill-input-combo.rebill-installments.entry.cjs.js.map +1 -1
- package/dist/cjs/card-identification_5.cjs.entry.js +1 -1
- package/dist/cjs/index-C-VTnc0I.js.map +1 -1
- package/dist/cjs/otp-component.rebill-modal-overlay.rebill-mode-sandbox.rebill-mode-sandbox-mobile.rebill-summary.success-page.user-information.entry.cjs.js.map +1 -1
- package/dist/cjs/otp-component_7.cjs.entry.js +1 -1
- package/dist/cjs/rebill-container.rebill-input-checkbox.entry.cjs.js.map +1 -1
- package/dist/cjs/rebill-container_2.cjs.entry.js +1 -1
- package/dist/cjs/rebill-input-select.cjs.entry.js +1 -1
- package/dist/cjs/rebill-input-select.entry.cjs.js.map +1 -1
- package/dist/cjs/rebill-input-text.cjs.entry.js +1 -1
- package/dist/cjs/rebill-input-text.entry.cjs.js.map +1 -1
- package/dist/collection/components/shared/inputs/input-checkbox/input-checkbox.css +11 -0
- package/dist/collection/components/shared/inputs/input-combo/input-combo.css +30 -0
- package/dist/collection/components/shared/inputs/input-phone/input-phone.css +39 -1
- package/dist/collection/components/shared/inputs/input-select/input-select.css +42 -0
- package/dist/collection/components/shared/inputs/input-text/input-text.css +11 -0
- package/dist/collection/components/shared/modal-overlay/modal-overlay.css +11 -4
- package/dist/components/card-fields-wrapper.js +1 -1
- package/dist/components/card-identification.js +1 -1
- package/dist/components/discount-coupon.js +1 -1
- package/dist/components/{p-Mgbx0b10.js → p--RloWBLk.js} +3 -3
- package/dist/components/{p-Mgbx0b10.js.map → p--RloWBLk.js.map} +1 -1
- package/dist/components/{p-B8GIr65u.js → p--gCxFWo3.js} +7 -7
- package/dist/components/{p-B8GIr65u.js.map → p--gCxFWo3.js.map} +1 -1
- package/dist/components/p-8BpuJ_V5.js.map +1 -1
- package/dist/components/{p-DVmistTq.js → p-BIHeH7ht.js} +3 -3
- package/dist/components/{p-DVmistTq.js.map → p-BIHeH7ht.js.map} +1 -1
- package/dist/components/{p-DStRg6vz.js → p-BJHx0OQj.js} +3 -3
- package/dist/components/{p-DStRg6vz.js.map → p-BJHx0OQj.js.map} +1 -1
- package/dist/components/{p-BgJ9ZORq.js → p-BZj9nSOY.js} +3 -3
- package/dist/components/{p-BgJ9ZORq.js.map → p-BZj9nSOY.js.map} +1 -1
- package/dist/components/{p-c9SkZ__E.js → p-Bb1L1oJK.js} +3 -3
- package/dist/components/{p-c9SkZ__E.js.map → p-Bb1L1oJK.js.map} +1 -1
- package/dist/components/{p-zU9a56AF.js → p-BeNxLLvH.js} +3 -3
- package/dist/components/{p-zU9a56AF.js.map → p-BeNxLLvH.js.map} +1 -1
- package/dist/components/{p-D9Eow84L.js → p-BnUMlZY9.js} +4 -4
- package/dist/components/{p-D9Eow84L.js.map → p-BnUMlZY9.js.map} +1 -1
- package/dist/components/{p-CWdTbodL.js → p-Bw7Jq0SL.js} +3 -3
- package/dist/components/{p-CWdTbodL.js.map → p-Bw7Jq0SL.js.map} +1 -1
- package/dist/components/{p-DTjDV-2m.js → p-BxXWkB7L.js} +6 -6
- package/dist/components/{p-DTjDV-2m.js.map → p-BxXWkB7L.js.map} +1 -1
- package/dist/components/{p-8eukGNL9.js → p-C2gtk16s.js} +3 -3
- package/dist/components/{p-8eukGNL9.js.map → p-C2gtk16s.js.map} +1 -1
- package/dist/components/{p-D2wX2Bnk.js → p-C4TcKKa8.js} +4 -4
- package/dist/components/{p-D2wX2Bnk.js.map → p-C4TcKKa8.js.map} +1 -1
- package/dist/components/{p-CHUzEc6D.js → p-C8lHS2ZV.js} +5 -5
- package/dist/components/{p-CHUzEc6D.js.map → p-C8lHS2ZV.js.map} +1 -1
- package/dist/components/{p-DQIG3sUQ.js → p-CH8Qt-7B.js} +3 -3
- package/dist/components/{p-DQIG3sUQ.js.map → p-CH8Qt-7B.js.map} +1 -1
- package/dist/components/{p-CN4bVlrI.js → p-CK6dlS5z.js} +5 -5
- package/dist/components/{p-CN4bVlrI.js.map → p-CK6dlS5z.js.map} +1 -1
- package/dist/components/{p-DgIW2T8E.js → p-CVQ9SnQp.js} +6 -6
- package/dist/components/{p-DgIW2T8E.js.map → p-CVQ9SnQp.js.map} +1 -1
- package/dist/components/{p-6aqJA2NI.js → p-CYC_SbCo.js} +3 -3
- package/dist/components/{p-6aqJA2NI.js.map → p-CYC_SbCo.js.map} +1 -1
- package/dist/components/{p-y5rBN7LS.js → p-Coc_KFqp.js} +4 -4
- package/dist/components/{p-y5rBN7LS.js.map → p-Coc_KFqp.js.map} +1 -1
- package/dist/components/{p-ti0gvUO5.js → p-CpCPsj5Y.js} +3 -3
- package/dist/components/{p-ti0gvUO5.js.map → p-CpCPsj5Y.js.map} +1 -1
- package/dist/components/{p-DuW9_9Co.js → p-Cqrdj1mj.js} +3 -3
- package/dist/components/{p-DuW9_9Co.js.map → p-Cqrdj1mj.js.map} +1 -1
- package/dist/components/{p-B9fIqz0z.js → p-DSnJHRr3.js} +3 -3
- package/dist/components/{p-B9fIqz0z.js.map → p-DSnJHRr3.js.map} +1 -1
- package/dist/components/{p-BpkqlhjE.js → p-DUxs56Lj.js} +3 -3
- package/dist/components/{p-BpkqlhjE.js.map → p-DUxs56Lj.js.map} +1 -1
- package/dist/components/{p-DLh7v0Ng.js → p-Dzeq5BdH.js} +5 -5
- package/dist/components/{p-DLh7v0Ng.js.map → p-Dzeq5BdH.js.map} +1 -1
- package/dist/components/payment-method-selector.js +1 -1
- package/dist/components/rebill-address-form.js +1 -1
- package/dist/components/rebill-address-search.js +1 -1
- package/dist/components/rebill-address.js +1 -1
- package/dist/components/rebill-bank-selector.js +1 -1
- package/dist/components/rebill-checkout-single-column.js +1 -1
- package/dist/components/rebill-checkout.js +21 -21
- package/dist/components/rebill-footer.js +1 -1
- package/dist/components/rebill-input-checkbox.js +1 -1
- package/dist/components/rebill-input-combo.js +1 -1
- package/dist/components/rebill-input-phone.js +1 -1
- package/dist/components/rebill-input-select.js +1 -1
- package/dist/components/rebill-input-text.js +1 -1
- package/dist/components/rebill-installments.js +1 -1
- package/dist/components/rebill-modal-overlay.js +1 -1
- package/dist/components/rebill-processing-payment.js +1 -1
- package/dist/components/rebill-renewal.js +17 -17
- package/dist/components/rebill-summary.js +1 -1
- package/dist/components/renewal-success-page.js +1 -1
- package/dist/components/root-component.js +3 -3
- package/dist/components/success-page.js +1 -1
- package/dist/components/user-information-phone.js +1 -1
- package/dist/components/user-information.js +1 -1
- package/dist/esm/apm-checkout_19.entry.js +1 -1
- package/dist/esm/card-identification.card-iframe.card-skeleton.rebill-input-combo.rebill-installments.entry.js.map +1 -1
- package/dist/esm/card-identification_5.entry.js +1 -1
- package/dist/esm/index-D8cwEAmw.js.map +1 -1
- package/dist/esm/otp-component.rebill-modal-overlay.rebill-mode-sandbox.rebill-mode-sandbox-mobile.rebill-summary.success-page.user-information.entry.js.map +1 -1
- package/dist/esm/otp-component_7.entry.js +1 -1
- package/dist/esm/rebill-container.rebill-input-checkbox.entry.js.map +1 -1
- package/dist/esm/rebill-container_2.entry.js +1 -1
- package/dist/esm/rebill-input-select.entry.js +1 -1
- package/dist/esm/rebill-input-select.entry.js.map +1 -1
- package/dist/esm/rebill-input-text.entry.js +1 -1
- package/dist/esm/rebill-input-text.entry.js.map +1 -1
- package/dist/rebill-web-components-sdk/card-identification.card-iframe.card-skeleton.rebill-input-combo.rebill-installments.entry.esm.js.map +1 -1
- package/dist/rebill-web-components-sdk/otp-component.rebill-modal-overlay.rebill-mode-sandbox.rebill-mode-sandbox-mobile.rebill-summary.success-page.user-information.entry.esm.js.map +1 -1
- package/dist/rebill-web-components-sdk/{p-fc6b9d89.entry.js → p-1bbc702a.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-fc6b9d89.entry.js.map → p-1bbc702a.entry.js.map} +1 -1
- package/dist/rebill-web-components-sdk/p-2354c848.entry.js +2 -0
- package/dist/rebill-web-components-sdk/{p-33238246.entry.js.map → p-2354c848.entry.js.map} +1 -1
- package/dist/rebill-web-components-sdk/p-61e86126.entry.js +2 -0
- package/dist/rebill-web-components-sdk/{p-c7c48b15.entry.js.map → p-61e86126.entry.js.map} +1 -1
- package/dist/rebill-web-components-sdk/{p-7d0e00c6.entry.js → p-7b33865e.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-7d0e00c6.entry.js.map → p-7b33865e.entry.js.map} +1 -1
- package/dist/rebill-web-components-sdk/p-D8cwEAmw.js.map +1 -1
- package/dist/rebill-web-components-sdk/p-ca2882ea.entry.js +2 -0
- package/dist/rebill-web-components-sdk/{p-a758a555.entry.js.map → p-ca2882ea.entry.js.map} +1 -1
- package/dist/rebill-web-components-sdk/{p-d7eaf879.entry.js → p-f3afcd86.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-d7eaf879.entry.js.map → p-f3afcd86.entry.js.map} +1 -1
- package/dist/rebill-web-components-sdk/rebill-container.rebill-input-checkbox.entry.esm.js.map +1 -1
- package/dist/rebill-web-components-sdk/rebill-input-select.entry.esm.js.map +1 -1
- package/dist/rebill-web-components-sdk/rebill-input-text.entry.esm.js.map +1 -1
- package/dist/rebill-web-components-sdk/rebill-web-components-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/rebill-web-components-sdk/p-33238246.entry.js +0 -2
- package/dist/rebill-web-components-sdk/p-a758a555.entry.js +0 -2
- package/dist/rebill-web-components-sdk/p-c7c48b15.entry.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-DuW9_9Co.js","mappings":";;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,0dAA0d;;ACOpf,IAAK,aAIJ;AAJD,CAAA,UAAK,aAAa,EAAA;AAChB,IAAA,aAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,aAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,aAAA,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,MAAM,EAAC,KAAK,EAAE,WAAW,CAAC,iBAAiB,GAAI,CACtE,CACF,CACP,CACG,CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","sessionState"],"sources":["src/components/checkout/discount-coupon/discount-coupon.css?tag=discount-coupon","src/components/checkout/discount-coupon/discount-coupon.tsx"],"sourcesContent":[".summary-row {\n gap: 12px;\n}\n.coupon-chip {\n display: flex;\n align-items: center;\n background: var(--rebill-color-background);\n border: 1px solid var(--rebill-color-border-primary);\n justify-content: space-between;\n border-radius: 6px;\n padding: 4px 8px;\n gap: 8px;\n width: fit-content;\n}\n\n.coupon-icon {\n width: 28px;\n height: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n}\n\n.coupon-close {\n cursor: pointer;\n}\n\n.coupon-content {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n gap: 4px;\n}\n","import { Component, Element, Event, EventEmitter, h, Prop, State } from '@stencil/core';\nimport { api } from '../../../api';\nimport { I18nService } from '../../../i18n/i18n.service';\nimport { sessionState, SessionStore } from '../../../store/session.store';\nimport { formatAmountWithoutCurrency } from '../../../utils';\nimport { COLORS_ENUM } from '../../../utils/color-class-mapper';\n\nenum ACTION_STATUS {\n EDITING = 'editing',\n APPLIED = 'applied',\n NOT_APPLIED = 'not_applied',\n}\n\n@Component({\n tag: 'discount-coupon',\n styleUrl: 'discount-coupon.css',\n shadow: false,\n})\nexport class DiscountCoupon {\n @Element() el: HTMLElement;\n @Prop() hideLabel: boolean = false;\n @State() couponCode: string = '';\n @State() actionStatus: ACTION_STATUS = ACTION_STATUS.NOT_APPLIED;\n @State() isLoading: boolean = false;\n @State() isError: boolean = false;\n @State() currentLocale: string = sessionState.currentLocale;\n @Event() discountApplied: EventEmitter<boolean>;\n private inputRef: HTMLRebillInputTextElement;\n private unsubscribeCurrentLocaleStore?: () => void;\n\n componentWillLoad() {\n this.unsubscribeCurrentLocaleStore = SessionStore.onChange('currentLocale', () => {\n this.currentLocale = sessionState.currentLocale;\n });\n\n if (\n sessionState.data.pricing.discountCouponCode &&\n sessionState.data.pricing.discountAmount > 0\n ) {\n this.actionStatus = ACTION_STATUS.APPLIED;\n this.couponCode = sessionState.data.pricing.discountCouponCode;\n }\n }\n\n disconnectedCallback() {\n if (this.unsubscribeCurrentLocaleStore) {\n this.unsubscribeCurrentLocaleStore();\n }\n }\n componentDidUpdate() {\n if (this.actionStatus === ACTION_STATUS.EDITING && this.inputRef) {\n setTimeout(async () => {\n const inputElement = await this.inputRef.getInputElement();\n if (inputElement) {\n inputElement.focus();\n }\n }, 0);\n }\n }\n\n private async onApplyCoupon() {\n const sessionId = sessionState.data.sessionId;\n if (!sessionId) {\n return;\n }\n this.isLoading = true;\n try {\n const response = await api.discountCoupon.applyDiscountCoupon({\n couponCode: this.couponCode,\n quantity: 1,\n sessionId: sessionId,\n organizationId: sessionState.data.organization.id,\n });\n this.actionStatus = ACTION_STATUS.APPLIED;\n SessionStore.setDiscount({\n couponCode: this.couponCode,\n amount: response.amount,\n discountType: response.discountType,\n discountAmount: response.discountedAmount,\n discountedPercentage: response?.discountedPercentage || 0,\n discountDuration: response?.discountDuration || null,\n });\n this.discountApplied.emit(true);\n } catch (error) {\n this.actionStatus = ACTION_STATUS.EDITING;\n this.discountApplied.emit(false);\n this.isError = true;\n SessionStore.setDiscount(null);\n } finally {\n this.isLoading = false;\n }\n }\n\n private onCancelCoupon() {\n this.actionStatus = ACTION_STATUS.NOT_APPLIED;\n this.couponCode = '';\n this.isError = false;\n }\n\n render() {\n return (\n <div>\n <div\n class=\"summary-row\"\n style={{\n alignItems: this.actionStatus === ACTION_STATUS.EDITING ? 'flex-start' : 'center',\n display: 'flex',\n }}\n >\n {!this.hideLabel && (\n <rebill-typography\n variant=\"body2\"\n style={{ marginTop: this.actionStatus === ACTION_STATUS.EDITING ? '7px' : '0px' }}\n >\n {I18nService.translate('discountCoupons.discount')}\n </rebill-typography>\n )}\n {this.actionStatus === ACTION_STATUS.NOT_APPLIED && (\n <rebill-button\n variant=\"filled\"\n size=\"small\"\n theme=\"primary-dark\"\n onClick={() => (this.actionStatus = ACTION_STATUS.EDITING)}\n >\n {I18nService.translate('discountCoupons.addDiscount')}\n </rebill-button>\n )}\n {this.actionStatus === ACTION_STATUS.EDITING && (\n <div class=\"summary-row\" style={{ alignItems: 'flex-start', display: 'flex' }}>\n <rebill-input-text\n ref={el => (this.inputRef = el)}\n id=\"discountCoupon\"\n value={this.couponCode}\n placeholder={I18nService.translate('discountCoupons.addDiscount')}\n disabled={this.isLoading}\n error={this.isError ? I18nService.translate('discountCoupons.error') : ''}\n clearable={true}\n uppercase={true}\n onInput={e => {\n e.stopPropagation();\n if (e.detail && e.detail.value !== undefined) {\n this.couponCode = e.detail.value;\n }\n }}\n onBlur={() => {\n if (!this.couponCode.trim()) {\n this.onCancelCoupon();\n }\n }}\n />\n <rebill-button\n variant=\"filled\"\n theme=\"primary-dark\"\n size=\"small\"\n loading={this.isLoading}\n disabled={this.isLoading || !this.couponCode.trim()}\n onClick={() => this.onApplyCoupon()}\n style={{ marginTop: this.actionStatus === ACTION_STATUS.EDITING ? '3px' : '0px' }}\n >\n {I18nService.translate('discountCoupons.apply')}\n </rebill-button>\n </div>\n )}\n {this.actionStatus === ACTION_STATUS.APPLIED && (\n <div class=\"coupon-chip\">\n <rebill-icon name=\"tag-sale\" size=\"16px\" />\n <div\n class=\"coupon-content\"\n onClick={() => (this.actionStatus = ACTION_STATUS.EDITING)}\n >\n <rebill-typography variant=\"overline\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {sessionState.data.pricing.discountCouponCode}\n </rebill-typography>\n <rebill-typography variant=\"overline\" color={COLORS_ENUM.GREEN}>\n -$\n {formatAmountWithoutCurrency(\n sessionState.data.pricing.discountAmount,\n sessionState.data.pricing.currency,\n )}\n </rebill-typography>\n </div>\n <div\n class=\"coupon-close\"\n onClick={() => {\n this.actionStatus = ACTION_STATUS.NOT_APPLIED;\n this.couponCode = '';\n SessionStore.setDiscount(null);\n this.discountApplied.emit(false);\n }}\n >\n <rebill-icon name=\"x\" size=\"20px\" color={COLORS_ENUM.PRIMARY_DARK_TEXT} />\n </div>\n </div>\n )}\n </div>\n </div>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-Cqrdj1mj.js","mappings":";;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,0dAA0d;;ACOpf,IAAK,aAIJ;AAJD,CAAA,UAAK,aAAa,EAAA;AAChB,IAAA,aAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,aAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,aAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC7B,CAAC,EAJI,aAAa,KAAb,aAAa,GAIjB,EAAA,CAAA,CAAA;MAOY,cAAc,iBAAAA,kBAAA,CAAA,MAAA,cAAA,SAAAC,CAAA,CAAA;;;;;;;;;IAEjB,SAAS,GAAY,KAAK;IACzB,UAAU,GAAW,EAAE;AACvB,IAAA,YAAY,GAAkB,aAAa,CAAC,WAAW;IACvD,SAAS,GAAY,KAAK;IAC1B,OAAO,GAAY,KAAK;AACxB,IAAA,aAAa,GAAWC,KAAY,CAAC,aAAa;AAClD,IAAA,eAAe;AAChB,IAAA,QAAQ;AACR,IAAA,6BAA6B;IAErC,iBAAiB,GAAA;QACf,IAAI,CAAC,6BAA6B,GAAG,YAAY,CAAC,QAAQ,CAAC,eAAe,EAAE,MAAK;AAC/E,YAAA,IAAI,CAAC,aAAa,GAAGA,KAAY,CAAC,aAAa;AACjD,SAAC,CAAC;AAEF,QAAA,IACEA,KAAY,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB;YAC5CA,KAAY,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,GAAG,CAAC,EAC5C;AACA,YAAA,IAAI,CAAC,YAAY,GAAG,aAAa,CAAC,OAAO;YACzC,IAAI,CAAC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AAQ,CACnC,CACiB,CAChB,EACN,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAC,cAAc,EACpB,OAAO,EAAE,MAAK;AACZ,gBAAA,IAAI,CAAC,YAAY,GAAG,aAAa,CAAC,WAAW;AAC7C,gBAAA,IAAI,CAAC,UAAU,GAAG,EAAE;AACpB,gBAAA,YAAY,CAAC,WAAW,CAAC,IAAI,CAAC;AAC9B,gBAAA,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC;AAClC,aAAC,EAAA,EAED,CAAa,CAAA,aAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,WAAW,CAAC,iBAAiB,GAAI,CACtE,CACF,CACP,CACG,CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","sessionState"],"sources":["src/components/checkout/discount-coupon/discount-coupon.css?tag=discount-coupon","src/components/checkout/discount-coupon/discount-coupon.tsx"],"sourcesContent":[".summary-row {\n gap: 12px;\n}\n.coupon-chip {\n display: flex;\n align-items: center;\n background: var(--rebill-color-background);\n border: 1px solid var(--rebill-color-border-primary);\n justify-content: space-between;\n border-radius: 6px;\n padding: 4px 8px;\n gap: 8px;\n width: fit-content;\n}\n\n.coupon-icon {\n width: 28px;\n height: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n}\n\n.coupon-close {\n cursor: pointer;\n}\n\n.coupon-content {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n gap: 4px;\n}\n","import { Component, Element, Event, EventEmitter, h, Prop, State } from '@stencil/core';\nimport { api } from '../../../api';\nimport { I18nService } from '../../../i18n/i18n.service';\nimport { sessionState, SessionStore } from '../../../store/session.store';\nimport { formatAmountWithoutCurrency } from '../../../utils';\nimport { COLORS_ENUM } from '../../../utils/color-class-mapper';\n\nenum ACTION_STATUS {\n EDITING = 'editing',\n APPLIED = 'applied',\n NOT_APPLIED = 'not_applied',\n}\n\n@Component({\n tag: 'discount-coupon',\n styleUrl: 'discount-coupon.css',\n shadow: false,\n})\nexport class DiscountCoupon {\n @Element() el: HTMLElement;\n @Prop() hideLabel: boolean = false;\n @State() couponCode: string = '';\n @State() actionStatus: ACTION_STATUS = ACTION_STATUS.NOT_APPLIED;\n @State() isLoading: boolean = false;\n @State() isError: boolean = false;\n @State() currentLocale: string = sessionState.currentLocale;\n @Event() discountApplied: EventEmitter<boolean>;\n private inputRef: HTMLRebillInputTextElement;\n private unsubscribeCurrentLocaleStore?: () => void;\n\n componentWillLoad() {\n this.unsubscribeCurrentLocaleStore = SessionStore.onChange('currentLocale', () => {\n this.currentLocale = sessionState.currentLocale;\n });\n\n if (\n sessionState.data.pricing.discountCouponCode &&\n sessionState.data.pricing.discountAmount > 0\n ) {\n this.actionStatus = ACTION_STATUS.APPLIED;\n this.couponCode = sessionState.data.pricing.discountCouponCode;\n }\n }\n\n disconnectedCallback() {\n if (this.unsubscribeCurrentLocaleStore) {\n this.unsubscribeCurrentLocaleStore();\n }\n }\n componentDidUpdate() {\n if (this.actionStatus === ACTION_STATUS.EDITING && this.inputRef) {\n setTimeout(async () => {\n const inputElement = await this.inputRef.getInputElement();\n if (inputElement) {\n inputElement.focus();\n }\n }, 0);\n }\n }\n\n private async onApplyCoupon() {\n const sessionId = sessionState.data.sessionId;\n if (!sessionId) {\n return;\n }\n this.isLoading = true;\n try {\n const response = await api.discountCoupon.applyDiscountCoupon({\n couponCode: this.couponCode,\n quantity: 1,\n sessionId: sessionId,\n organizationId: sessionState.data.organization.id,\n });\n this.actionStatus = ACTION_STATUS.APPLIED;\n SessionStore.setDiscount({\n couponCode: this.couponCode,\n amount: response.amount,\n discountType: response.discountType,\n discountAmount: response.discountedAmount,\n discountedPercentage: response?.discountedPercentage || 0,\n discountDuration: response?.discountDuration || null,\n });\n this.discountApplied.emit(true);\n } catch (error) {\n this.actionStatus = ACTION_STATUS.EDITING;\n this.discountApplied.emit(false);\n this.isError = true;\n SessionStore.setDiscount(null);\n } finally {\n this.isLoading = false;\n }\n }\n\n private onCancelCoupon() {\n this.actionStatus = ACTION_STATUS.NOT_APPLIED;\n this.couponCode = '';\n this.isError = false;\n }\n\n render() {\n return (\n <div>\n <div\n class=\"summary-row\"\n style={{\n alignItems: this.actionStatus === ACTION_STATUS.EDITING ? 'flex-start' : 'center',\n display: 'flex',\n }}\n >\n {!this.hideLabel && (\n <rebill-typography\n variant=\"body2\"\n style={{ marginTop: this.actionStatus === ACTION_STATUS.EDITING ? '7px' : '0px' }}\n >\n {I18nService.translate('discountCoupons.discount')}\n </rebill-typography>\n )}\n {this.actionStatus === ACTION_STATUS.NOT_APPLIED && (\n <rebill-button\n variant=\"filled\"\n size=\"small\"\n theme=\"primary-dark\"\n onClick={() => (this.actionStatus = ACTION_STATUS.EDITING)}\n >\n {I18nService.translate('discountCoupons.addDiscount')}\n </rebill-button>\n )}\n {this.actionStatus === ACTION_STATUS.EDITING && (\n <div class=\"summary-row\" style={{ alignItems: 'flex-start', display: 'flex' }}>\n <rebill-input-text\n ref={el => (this.inputRef = el)}\n id=\"discountCoupon\"\n value={this.couponCode}\n placeholder={I18nService.translate('discountCoupons.addDiscount')}\n disabled={this.isLoading}\n error={this.isError ? I18nService.translate('discountCoupons.error') : ''}\n clearable={true}\n uppercase={true}\n onInput={e => {\n e.stopPropagation();\n if (e.detail && e.detail.value !== undefined) {\n this.couponCode = e.detail.value;\n }\n }}\n onBlur={() => {\n if (!this.couponCode.trim()) {\n this.onCancelCoupon();\n }\n }}\n />\n <rebill-button\n variant=\"filled\"\n theme=\"primary-dark\"\n size=\"small\"\n loading={this.isLoading}\n disabled={this.isLoading || !this.couponCode.trim()}\n onClick={() => this.onApplyCoupon()}\n style={{ marginTop: this.actionStatus === ACTION_STATUS.EDITING ? '3px' : '0px' }}\n >\n {I18nService.translate('discountCoupons.apply')}\n </rebill-button>\n </div>\n )}\n {this.actionStatus === ACTION_STATUS.APPLIED && (\n <div class=\"coupon-chip\">\n <rebill-icon name=\"tag-sale\" size=\"16px\" />\n <div\n class=\"coupon-content\"\n onClick={() => (this.actionStatus = ACTION_STATUS.EDITING)}\n >\n <rebill-typography variant=\"overline\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {sessionState.data.pricing.discountCouponCode}\n </rebill-typography>\n <rebill-typography variant=\"overline\" color={COLORS_ENUM.GREEN}>\n -$\n {formatAmountWithoutCurrency(\n sessionState.data.pricing.discountAmount,\n sessionState.data.pricing.currency,\n )}\n </rebill-typography>\n </div>\n <div\n class=\"coupon-close\"\n onClick={() => {\n this.actionStatus = ACTION_STATUS.NOT_APPLIED;\n this.couponCode = '';\n SessionStore.setDiscount(null);\n this.discountApplied.emit(false);\n }}\n >\n <rebill-icon name=\"x\" size=\"20px\" color={COLORS_ENUM.PRIMARY_DARK_TEXT} />\n </div>\n </div>\n )}\n </div>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, H, createEvent, h } from './p-8BpuJ_V5.js';
|
|
2
2
|
import { d as defineCustomElement$1 } from './p-BSay3C61.js';
|
|
3
3
|
|
|
4
|
-
const inputComboCss = ".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}:host{display:block;width:100%;box-sizing:border-box}.combo-wrapper{display:flex;align-items:stretch;width:100%;height:38.33px;border-radius:var(--input-group-inner-border-radius, 8px);border:1.5px solid var(--rebill-color-border);background:var(--rebill-color-background);transition:border-color 0.2s;position:relative;box-sizing:border-box}.combo-wrapper:focus-within{border-color:var(--rebill-color-primary);box-shadow:0 0 0 2px var(--rebill-color-primary-light)}.combo-wrapper.error{border-color:var(--rebill-color-error)}.combo-wrapper.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-section{position:relative;flex-shrink:0;min-width:80px;display:flex;align-items:center}.select-combo-trigger{width:100%;height:100%;padding:0 30px 0 14px;font-size:0.875rem;font-weight:normal;color:var(--rebill-color-text-primary);background:transparent;border:none;outline:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;user-select:none;box-sizing:border-box;position:relative;transition:border-color 0.2s}.select-combo-trigger:focus{outline:none}.select-combo-trigger:hover:not(.disabled){border-color:var(--rebill-color-primary)}.select-combo-trigger.placeholder .select-value{color:var(--rebill-color-text-secondary-light)}.combo-wrapper.disabled .select-combo-trigger{cursor:not-allowed;color:var(--rebill-color-text-secondary)}.select-value{flex:1;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-section .icon-wrapper{position:absolute;right:0.75rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;height:20px;width:20px}.select-icon{color:var(--rebill-color-text-secondary);transition:transform 0.2s ease;transform-origin:50% 50%;display:block}.combo-wrapper.disabled .select-icon{color:var(--rebill-color-disabled)}.select-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%}.select-option{padding:0.75rem;font-size:0.875rem;color:var(--rebill-color-text-primary);cursor:pointer;border-bottom:1px solid var(--rebill-color-border);transition:background-color 0.15s ease}.select-option:last-child{border-bottom:none}.select-option:hover,.select-option.highlighted{background-color:#f0f9ff}.select-option.selected{background-color:var(--rebill-color-primary);color:white}.select-option.selected:hover,.select-option.selected.highlighted{background-color:var(--rebill-color-primary)}.select-dropdown::-webkit-scrollbar{width:6px}.select-dropdown::-webkit-scrollbar-track{background:transparent}.select-dropdown::-webkit-scrollbar-thumb{background-color:var(--rebill-color-border);border-radius:3px}.select-dropdown::-webkit-scrollbar-thumb:hover{background-color:var(--rebill-color-text-secondary)}.combo-divider{width:1px;background-color:var(--rebill-color-border);margin:0;flex-shrink:0}.input-section{flex:1;min-width:0;display:flex;align-items:center}.combo-input{width:100%;height:100%;padding:0 14px;font-size:0.875rem;color:var(--rebill-color-text-primary);background:transparent;border:none;outline:none;box-sizing:border-box}.combo-input:focus{outline:none}.combo-input::placeholder{color:var(--rebill-color-text-secondary-light);font-size:0.875rem;opacity:1}.combo-wrapper.disabled .combo-input{color:var(--rebill-color-text-secondary);cursor:not-allowed}.combo-wrapper.disabled .combo-input::placeholder{color:var(--rebill-color-text-secondary)}@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)}}.select-dropdown::-webkit-scrollbar{width:6px}.select-dropdown::-webkit-scrollbar-track{background:transparent}.select-dropdown::-webkit-scrollbar-thumb{background-color:var(--rebill-color-border);border-radius:3px}.select-dropdown::-webkit-scrollbar-thumb:hover{background-color:var(--rebill-color-text-secondary)}";
|
|
4
|
+
const inputComboCss = ".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}}:host{display:block;width:100%;box-sizing:border-box}.combo-wrapper{display:flex;align-items:stretch;width:100%;height:38.33px;border-radius:var(--input-group-inner-border-radius, 8px);border:1.5px solid var(--rebill-color-border);background:var(--rebill-color-background);transition:border-color 0.2s;position:relative;box-sizing:border-box}.combo-wrapper:focus-within{border-color:var(--rebill-color-primary);box-shadow:0 0 0 2px var(--rebill-color-primary-light)}.combo-wrapper.error{border-color:var(--rebill-color-error)}.combo-wrapper.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-section{position:relative;flex-shrink:0;min-width:80px;display:flex;align-items:center}.select-combo-trigger{width:100%;height:100%;padding:0 30px 0 14px;font-size:0.875rem;font-weight:normal;color:var(--rebill-color-text-primary);background:transparent;border:none;outline:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;user-select:none;box-sizing:border-box;position:relative;transition:border-color 0.2s}.select-combo-trigger:focus{outline:none}.select-combo-trigger:hover:not(.disabled){border-color:var(--rebill-color-primary)}.select-combo-trigger.placeholder .select-value{color:var(--rebill-color-text-secondary-light)}.combo-wrapper.disabled .select-combo-trigger{cursor:not-allowed;color:var(--rebill-color-text-secondary)}.select-value{flex:1;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-section .icon-wrapper{position:absolute;right:0.75rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;height:20px;width:20px}.select-icon{color:var(--rebill-color-text-secondary);transition:transform 0.2s ease;transform-origin:50% 50%;display:block}.combo-wrapper.disabled .select-icon{color:var(--rebill-color-disabled)}.select-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%}.select-option{padding:0.75rem;font-size:0.875rem;color:var(--rebill-color-text-primary);cursor:pointer;border-bottom:1px solid var(--rebill-color-border);transition:background-color 0.15s ease}.select-option:last-child{border-bottom:none}.select-option:hover,.select-option.highlighted{background-color:#f0f9ff}.select-option.selected{background-color:var(--rebill-color-primary);color:white}.select-option.selected:hover,.select-option.selected.highlighted{background-color:var(--rebill-color-primary)}.select-dropdown::-webkit-scrollbar{width:6px}.select-dropdown::-webkit-scrollbar-track{background:transparent}.select-dropdown::-webkit-scrollbar-thumb{background-color:var(--rebill-color-border);border-radius:3px}.select-dropdown::-webkit-scrollbar-thumb:hover{background-color:var(--rebill-color-text-secondary)}.combo-divider{width:1px;background-color:var(--rebill-color-border);margin:0;flex-shrink:0}.input-section{flex:1;min-width:0;display:flex;align-items:center}.combo-input{width:100%;height:100%;padding:0 14px;font-size:0.875rem;color:var(--rebill-color-text-primary);background:transparent;border:none;outline:none;box-sizing:border-box}.combo-input:focus{outline:none}.combo-input::placeholder{color:var(--rebill-color-text-secondary-light);font-size:0.875rem;opacity:1}.combo-wrapper.disabled .combo-input{color:var(--rebill-color-text-secondary);cursor:not-allowed}.combo-wrapper.disabled .combo-input::placeholder{color:var(--rebill-color-text-secondary)}@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)}}.select-dropdown::-webkit-scrollbar{width:6px}.select-dropdown::-webkit-scrollbar-track{background:transparent}.select-dropdown::-webkit-scrollbar-thumb{background-color:var(--rebill-color-border);border-radius:3px}.select-dropdown::-webkit-scrollbar-thumb:hover{background-color:var(--rebill-color-text-secondary)}@media screen and (max-width: 768px){.select-combo-trigger{font-size:1rem}.select-option{font-size:1rem}.combo-input{font-size:1rem}.combo-input::placeholder{font-size:1rem}}";
|
|
5
5
|
|
|
6
6
|
const InputCombo = /*@__PURE__*/ proxyCustomElement(class InputCombo extends H {
|
|
7
7
|
constructor(registerHost) {
|
|
@@ -219,6 +219,6 @@ function defineCustomElement() {
|
|
|
219
219
|
defineCustomElement();
|
|
220
220
|
|
|
221
221
|
export { InputCombo as I, defineCustomElement as d };
|
|
222
|
-
//# sourceMappingURL=p-
|
|
222
|
+
//# sourceMappingURL=p-DSnJHRr3.js.map
|
|
223
223
|
|
|
224
|
-
//# sourceMappingURL=p-
|
|
224
|
+
//# sourceMappingURL=p-DSnJHRr3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-B9fIqz0z.js","mappings":";;;AAAA,MAAM,aAAa,GAAG,qgLAAqgL;;MCO9gL,UAAU,iBAAAA,kBAAA,CAAA,MAAA,UAAA,SAA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KAAA,EAAA,EAAA,KAAK,EAAE,CAAA,cAAA,EAAiB,IAAI,CAAC,WAAW,KAAK,MAAM,CAAC,KAAK,GAAG,UAAU,GAAG,EAAE,CAAA,CAAA,EAAI,IAAI,CAAC,gBAAgB,KAAK,KAAK,GAAG,aAAa,GAAG,EAAE,CAAA,CAAE,EACrI,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EACxC,IAAI,EAAC,QAAQ,EACE,eAAA,EAAA,IAAI,CAAC,WAAW,KAAK,MAAM,CAAC,KAAK,GAAG,MAAM,GAAG,OAAO,EAAA,EAElE,MAAM,CAAC,KAAK,CACT,CACP,CAAC,CACE,CACP,CACG,EAGN,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,eAAe,EAAO,CAAA,EAGjC,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,eAAe,EAAA,EACxB,CAAA,CAAA,OAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,iCAAiC,EACvC,WAAW,EAAE,IAAI,CAAC,gBAAgB,EAClC,KAAK,EAAE,IAAI,CAAC,UAAU,EACtB,OAAO,EAAE,IAAI,CAAC,aAAa,EAC3B,MAAM,EAAE,IAAI,CAAC,WAAW,EACxB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAA,CACvB,CACE,CACF,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-combo/input-combo.css?tag=rebill-input-combo","src/components/shared/inputs/input-combo/input-combo.tsx"],"sourcesContent":["@import '../shared-input.css';\n\n:host {\n display: block;\n width: 100%;\n box-sizing: border-box;\n}\n\n.combo-wrapper {\n display: flex;\n align-items: stretch;\n width: 100%;\n height: 38.33px;\n border-radius: var(--input-group-inner-border-radius, 8px);\n border: 1.5px solid var(--rebill-color-border);\n background: var(--rebill-color-background);\n transition: border-color 0.2s;\n position: relative;\n box-sizing: border-box;\n}\n\n.combo-wrapper:focus-within {\n border-color: var(--rebill-color-primary);\n box-shadow: 0 0 0 2px var(--rebill-color-primary-light);\n}\n\n.combo-wrapper.error {\n border-color: var(--rebill-color-error);\n}\n\n.combo-wrapper.disabled {\n background-color: var(--rebill-color-background);\n border-color: var(--rebill-color-disabled);\n color: var(--rebill-color-text-secondary);\n cursor: not-allowed;\n opacity: 0.7;\n}\n\n/* Sección del selector */\n.select-section {\n position: relative;\n flex-shrink: 0;\n min-width: 80px;\n display: flex;\n align-items: center;\n}\n\n.select-combo-trigger {\n width: 100%;\n height: 100%;\n padding: 0 30px 0 14px;\n font-size: 0.875rem;\n font-weight: normal;\n color: var(--rebill-color-text-primary);\n background: transparent;\n border: none;\n outline: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: space-between;\n user-select: none;\n box-sizing: border-box;\n position: relative;\n transition: border-color 0.2s;\n}\n\n.select-combo-trigger:focus {\n outline: none;\n}\n\n.select-combo-trigger:hover:not(.disabled) {\n border-color: var(--rebill-color-primary);\n}\n\n.select-combo-trigger.placeholder .select-value {\n color: var(--rebill-color-text-secondary-light);\n}\n\n.combo-wrapper.disabled .select-combo-trigger {\n cursor: not-allowed;\n color: var(--rebill-color-text-secondary);\n}\n\n.select-value {\n flex: 1;\n text-align: left;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.select-section .icon-wrapper {\n position: absolute;\n right: 0.75rem;\n top: 50%;\n transform: translateY(-50%);\n display: flex;\n align-items: center;\n justify-content: center;\n height: 20px;\n width: 20px;\n}\n\n.select-icon {\n color: var(--rebill-color-text-secondary);\n transition: transform 0.2s ease;\n transform-origin: 50% 50%;\n display: block;\n}\n\n.combo-wrapper.disabled .select-icon {\n color: var(--rebill-color-disabled);\n}\n\n/* Dropdown del selector */\n.select-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.select-option {\n padding: 0.75rem;\n font-size: 0.875rem;\n color: var(--rebill-color-text-primary);\n cursor: pointer;\n border-bottom: 1px solid var(--rebill-color-border);\n transition: background-color 0.15s ease;\n}\n\n.select-option:last-child {\n border-bottom: none;\n}\n\n.select-option:hover,\n.select-option.highlighted {\n background-color: #f0f9ff;\n}\n\n.select-option.selected {\n background-color: var(--rebill-color-primary);\n color: white;\n}\n\n.select-option.selected:hover,\n.select-option.selected.highlighted {\n background-color: var(--rebill-color-primary);\n}\n\n/* Scrollbar styling para el dropdown */\n.select-dropdown::-webkit-scrollbar {\n width: 6px;\n}\n\n.select-dropdown::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.select-dropdown::-webkit-scrollbar-thumb {\n background-color: var(--rebill-color-border);\n border-radius: 3px;\n}\n\n.select-dropdown::-webkit-scrollbar-thumb:hover {\n background-color: var(--rebill-color-text-secondary);\n}\n\n/* Divisor vertical */\n.combo-divider {\n width: 1px;\n background-color: var(--rebill-color-border);\n margin: 0;\n flex-shrink: 0;\n}\n\n/* Sección del input de texto */\n.input-section {\n flex: 1;\n min-width: 0;\n display: flex;\n align-items: center;\n}\n\n.combo-input {\n width: 100%;\n height: 100%;\n padding: 0 14px;\n font-size: 0.875rem;\n color: var(--rebill-color-text-primary);\n background: transparent;\n border: none;\n outline: none;\n box-sizing: border-box;\n}\n\n.combo-input:focus {\n outline: none;\n}\n\n.combo-input::placeholder {\n color: var(--rebill-color-text-secondary-light);\n font-size: 0.875rem;\n opacity: 1;\n}\n\n.combo-wrapper.disabled .combo-input {\n color: var(--rebill-color-text-secondary);\n cursor: not-allowed;\n}\n\n.combo-wrapper.disabled .combo-input::placeholder {\n color: var(--rebill-color-text-secondary);\n}\n\n/* Animación del dropdown */\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 para el dropdown */\n.select-dropdown::-webkit-scrollbar {\n width: 6px;\n}\n\n.select-dropdown::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.select-dropdown::-webkit-scrollbar-thumb {\n background-color: var(--rebill-color-border);\n border-radius: 3px;\n}\n\n.select-dropdown::-webkit-scrollbar-thumb:hover {\n background-color: var(--rebill-color-text-secondary);\n}\n","import { Component, Event, EventEmitter, Listen, Prop, State, h } from '@stencil/core';\n\n@Component({\n tag: 'rebill-input-combo',\n styleUrl: 'input-combo.css',\n shadow: false,\n})\nexport class InputCombo {\n private dropdownRef?: HTMLDivElement;\n private triggerRef?: HTMLDivElement;\n\n /** Etiqueta que se muestra arriba del campo */\n @Prop() label: string = '';\n /** Opciones del selector */\n @Prop() options: { label: string; value: string }[] = [];\n /** Valor del selector */\n @Prop({ mutable: true, reflect: true }) selectValue: string = '';\n /** Valor del input de texto */\n @Prop({ mutable: true, reflect: true }) inputValue: string = '';\n /** Placeholder del campo de texto */\n @Prop() inputPlaceholder: string = '';\n /** Placeholder del selector */\n @Prop() selectPlaceholder: string = '';\n /** Mensaje de error */\n @Prop() error: string = '';\n /** ID del selector */\n @Prop() selectId: string = '';\n /** ID del input de texto */\n @Prop() inputId: string = '';\n /** Estado deshabilitado */\n @Prop() disabled: boolean = false;\n /** Ancho del selector (en porcentaje o píxeles) */\n @Prop() selectWidth: string = '120px';\n /** Estado interno para mostrar/ocultar el dropdown */\n @State() isOpen: boolean = false;\n /** Índice de la opción resaltada para navegación con teclado */\n @State() highlightedIndex: number = -1;\n /** ID único del componente */\n @State() componentId: string = '';\n\n @Event() blur: EventEmitter<{ id: string; value: string }>;\n /** Evento al cambiar el valor del selector */\n @Event() selectChange: EventEmitter<{ id: string; value: string }>;\n /** Evento al cambiar el valor del input */\n @Event() input: EventEmitter<{ id: string; value: string }>;\n\n componentWillLoad() {\n this.componentId = this.selectId || `combo-${Math.random().toString(36).substr(2, 9)}`;\n }\n\n @Listen('change', { target: 'document' })\n handleFormChange(event: CustomEvent) {\n const formData = event.detail;\n if (formData) {\n // Manejar cambios del selector\n if (this.selectId && this.selectId in formData) {\n const newSelectValue = formData[this.selectId];\n if (typeof newSelectValue === 'string') {\n this.selectValue = newSelectValue;\n }\n }\n // Manejar cambios del input\n if (this.inputId && this.inputId in formData) {\n const newInputValue = formData[this.inputId];\n if (typeof newInputValue === 'string') {\n this.inputValue = newInputValue;\n }\n }\n }\n }\n\n @Listen('closeAllSelects', { target: 'document' })\n handleCloseAllSelects(event: CustomEvent) {\n if (event.detail !== this.componentId) {\n this.closeDropdown();\n }\n }\n\n @Listen('click', { target: 'document' })\n handleDocumentClick(event: Event) {\n if (\n this.dropdownRef &&\n this.triggerRef &&\n !this.dropdownRef.contains(event.target as Node) &&\n !this.triggerRef.contains(event.target as Node)\n ) {\n this.closeDropdown();\n }\n }\n\n private toggleDropdown = () => {\n if (this.disabled) return;\n\n const wasOpen = this.isOpen;\n this.isOpen = !this.isOpen;\n\n if (this.isOpen) {\n if (!wasOpen) {\n document.dispatchEvent(new CustomEvent('closeAllSelects', { detail: this.componentId }));\n }\n\n this.highlightedIndex = this.options.findIndex(option => option.value === this.selectValue);\n if (this.highlightedIndex === -1) {\n this.highlightedIndex = 0;\n }\n }\n };\n\n private openDropdown = () => {\n if (this.disabled) return;\n\n document.dispatchEvent(new CustomEvent('closeAllSelects', { detail: this.componentId }));\n\n this.isOpen = true;\n this.highlightedIndex = this.options.findIndex(option => option.value === this.selectValue);\n if (this.highlightedIndex === -1) {\n this.highlightedIndex = 0;\n }\n };\n\n private closeDropdown = () => {\n this.isOpen = false;\n this.highlightedIndex = -1;\n };\n\n private selectOption = (option: { label: string; value: string }) => {\n if (this.disabled) return;\n this.selectValue = option.value;\n this.closeDropdown();\n this.input.emit({ id: this.selectId, value: this.selectValue });\n };\n\n private onInputChange = (event: Event) => {\n if (this.disabled) return;\n const input = event.target as HTMLInputElement;\n this.inputValue = input.value;\n this.input.emit({ id: this.inputId, value: this.inputValue });\n };\n\n private onSelectBlur = () => {\n this.blur.emit({ id: this.selectId, value: this.selectValue });\n };\n\n private onInputBlur = () => {\n const trimmedValue = this.inputValue.trim();\n\n if (trimmedValue !== this.inputValue) {\n this.inputValue = trimmedValue;\n this.input.emit({ id: this.inputId, value: this.inputValue });\n }\n\n this.blur.emit({ id: this.inputId, value: this.inputValue });\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (this.disabled) return;\n\n switch (event.key) {\n case 'Enter':\n case ' ':\n event.preventDefault();\n if (this.isOpen && this.highlightedIndex >= 0) {\n this.selectOption(this.options[this.highlightedIndex]);\n } else {\n this.toggleDropdown();\n }\n break;\n case 'Escape':\n event.preventDefault();\n this.closeDropdown();\n break;\n case 'ArrowDown':\n event.preventDefault();\n if (!this.isOpen) {\n this.openDropdown();\n } else {\n this.highlightedIndex = Math.min(this.highlightedIndex + 1, this.options.length - 1);\n }\n break;\n case 'ArrowUp':\n event.preventDefault();\n if (this.isOpen) {\n this.highlightedIndex = Math.max(this.highlightedIndex - 1, 0);\n }\n break;\n }\n };\n\n private getSelectedOptionLabel = (): string => {\n const selectedOption = this.options.find(option => option.value === this.selectValue);\n return selectedOption ? selectedOption.label : this.selectPlaceholder;\n };\n\n render() {\n const selectedLabel = this.getSelectedOptionLabel();\n const hasSelectValue = this.selectValue !== '';\n\n return (\n <div class=\"input-container\">\n {this.label && (\n <label class={`input-label ${this.disabled ? 'disabled' : ''}`}>{this.label}</label>\n )}\n <div\n class={`input-combo-wrapper combo-wrapper ${this.disabled ? 'disabled' : ''} ${this.error ? 'error' : ''}`}\n >\n {/* Selector */}\n <div class=\"select-section\" style={{ width: this.selectWidth }}>\n <div\n ref={el => (this.triggerRef = el)}\n class={`input-combo-select select-combo-trigger ${!hasSelectValue ? 'placeholder' : ''}`}\n onClick={this.toggleDropdown}\n onKeyDown={this.handleKeyDown}\n onBlur={this.onSelectBlur}\n tabIndex={this.disabled ? -1 : 0}\n role=\"combobox\"\n aria-expanded={this.isOpen.toString()}\n aria-haspopup=\"listbox\"\n >\n <span class=\"select-value\">{selectedLabel}</span>\n <div class=\"icon-wrapper\">\n <rebill-icon name=\"chevron-up-down\" size=\"20px\" class=\"select-icon\" />\n </div>\n </div>\n\n {this.isOpen && (\n <div ref={el => (this.dropdownRef = el)} class=\"select-dropdown\" role=\"listbox\">\n {this.options.map((option, index) => (\n <div\n class={`select-option ${this.selectValue === option.value ? 'selected' : ''} ${this.highlightedIndex === index ? 'highlighted' : ''}`}\n onClick={() => this.selectOption(option)}\n role=\"option\"\n aria-selected={this.selectValue === option.value ? 'true' : 'false'}\n >\n {option.label}\n </div>\n ))}\n </div>\n )}\n </div>\n\n {/* Divisor vertical */}\n <div class=\"combo-divider\"></div>\n\n {/* Campo de texto */}\n <div class=\"input-section\">\n <input\n type=\"text\"\n class=\"input-combo-element combo-input\"\n placeholder={this.inputPlaceholder}\n value={this.inputValue}\n onInput={this.onInputChange}\n onBlur={this.onInputBlur}\n disabled={this.disabled}\n />\n </div>\n </div>\n {this.error && <span class=\"error-message\">{this.error}</span>}\n </div>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-DSnJHRr3.js","mappings":";;;AAAA,MAAM,aAAa,GAAG,kyLAAkyL;;MCO3yL,UAAU,iBAAAA,kBAAA,C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K,MAC9B,CACE,CAAA,KAAA,EAAA,EAAA,KAAK,EAAE,CAAA,cAAA,EAAiB,IAAI,CAAC,WAAW,KAAK,MAAM,CAAC,KAAK,GAAG,UAAU,GAAG,EAAE,CAAA,CAAA,EAAI,IAAI,CAAC,gBAAgB,KAAK,KAAK,GAAG,aAAa,GAAG,EAAE,CAAA,CAAE,EACrI,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EACxC,IAAI,EAAC,QAAQ,EACE,eAAA,EAAA,IAAI,CAAC,WAAW,KAAK,MAAM,CAAC,KAAK,GAAG,MAAM,GAAG,OAAO,EAAA,EAElE,MAAM,CAAC,KAAK,CACT,CACP,CAAC,CACE,CACP,CACG,EAGN,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,eAAe,EAAO,CAAA,EAGjC,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,eAAe,EAAA,EACxB,CAAA,CAAA,OAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,iCAAiC,EACvC,WAAW,EAAE,IAAI,CAAC,gBAAgB,EAClC,KAAK,EAAE,IAAI,CAAC,UAAU,EACtB,OAAO,EAAE,IAAI,CAAC,aAAa,EAC3B,MAAM,EAAE,IAAI,CAAC,WAAW,EACxB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAA,CACvB,CACE,CACF,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-combo/input-combo.css?tag=rebill-input-combo","src/components/shared/inputs/input-combo/input-combo.tsx"],"sourcesContent":["@import '../shared-input.css';\n\n:host {\n display: block;\n width: 100%;\n box-sizing: border-box;\n}\n\n.combo-wrapper {\n display: flex;\n align-items: stretch;\n width: 100%;\n height: 38.33px;\n border-radius: var(--input-group-inner-border-radius, 8px);\n border: 1.5px solid var(--rebill-color-border);\n background: var(--rebill-color-background);\n transition: border-color 0.2s;\n position: relative;\n box-sizing: border-box;\n}\n\n.combo-wrapper:focus-within {\n border-color: var(--rebill-color-primary);\n box-shadow: 0 0 0 2px var(--rebill-color-primary-light);\n}\n\n.combo-wrapper.error {\n border-color: var(--rebill-color-error);\n}\n\n.combo-wrapper.disabled {\n background-color: var(--rebill-color-background);\n border-color: var(--rebill-color-disabled);\n color: var(--rebill-color-text-secondary);\n cursor: not-allowed;\n opacity: 0.7;\n}\n\n/* Sección del selector */\n.select-section {\n position: relative;\n flex-shrink: 0;\n min-width: 80px;\n display: flex;\n align-items: center;\n}\n\n.select-combo-trigger {\n width: 100%;\n height: 100%;\n padding: 0 30px 0 14px;\n font-size: 0.875rem;\n font-weight: normal;\n color: var(--rebill-color-text-primary);\n background: transparent;\n border: none;\n outline: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: space-between;\n user-select: none;\n box-sizing: border-box;\n position: relative;\n transition: border-color 0.2s;\n}\n\n.select-combo-trigger:focus {\n outline: none;\n}\n\n.select-combo-trigger:hover:not(.disabled) {\n border-color: var(--rebill-color-primary);\n}\n\n.select-combo-trigger.placeholder .select-value {\n color: var(--rebill-color-text-secondary-light);\n}\n\n.combo-wrapper.disabled .select-combo-trigger {\n cursor: not-allowed;\n color: var(--rebill-color-text-secondary);\n}\n\n.select-value {\n flex: 1;\n text-align: left;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.select-section .icon-wrapper {\n position: absolute;\n right: 0.75rem;\n top: 50%;\n transform: translateY(-50%);\n display: flex;\n align-items: center;\n justify-content: center;\n height: 20px;\n width: 20px;\n}\n\n.select-icon {\n color: var(--rebill-color-text-secondary);\n transition: transform 0.2s ease;\n transform-origin: 50% 50%;\n display: block;\n}\n\n.combo-wrapper.disabled .select-icon {\n color: var(--rebill-color-disabled);\n}\n\n/* Dropdown del selector */\n.select-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.select-option {\n padding: 0.75rem;\n font-size: 0.875rem;\n color: var(--rebill-color-text-primary);\n cursor: pointer;\n border-bottom: 1px solid var(--rebill-color-border);\n transition: background-color 0.15s ease;\n}\n\n.select-option:last-child {\n border-bottom: none;\n}\n\n.select-option:hover,\n.select-option.highlighted {\n background-color: #f0f9ff;\n}\n\n.select-option.selected {\n background-color: var(--rebill-color-primary);\n color: white;\n}\n\n.select-option.selected:hover,\n.select-option.selected.highlighted {\n background-color: var(--rebill-color-primary);\n}\n\n/* Scrollbar styling para el dropdown */\n.select-dropdown::-webkit-scrollbar {\n width: 6px;\n}\n\n.select-dropdown::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.select-dropdown::-webkit-scrollbar-thumb {\n background-color: var(--rebill-color-border);\n border-radius: 3px;\n}\n\n.select-dropdown::-webkit-scrollbar-thumb:hover {\n background-color: var(--rebill-color-text-secondary);\n}\n\n/* Divisor vertical */\n.combo-divider {\n width: 1px;\n background-color: var(--rebill-color-border);\n margin: 0;\n flex-shrink: 0;\n}\n\n/* Sección del input de texto */\n.input-section {\n flex: 1;\n min-width: 0;\n display: flex;\n align-items: center;\n}\n\n.combo-input {\n width: 100%;\n height: 100%;\n padding: 0 14px;\n font-size: 0.875rem;\n color: var(--rebill-color-text-primary);\n background: transparent;\n border: none;\n outline: none;\n box-sizing: border-box;\n}\n\n.combo-input:focus {\n outline: none;\n}\n\n.combo-input::placeholder {\n color: var(--rebill-color-text-secondary-light);\n font-size: 0.875rem;\n opacity: 1;\n}\n\n.combo-wrapper.disabled .combo-input {\n color: var(--rebill-color-text-secondary);\n cursor: not-allowed;\n}\n\n.combo-wrapper.disabled .combo-input::placeholder {\n color: var(--rebill-color-text-secondary);\n}\n\n/* Animación del dropdown */\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 para el dropdown */\n.select-dropdown::-webkit-scrollbar {\n width: 6px;\n}\n\n.select-dropdown::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.select-dropdown::-webkit-scrollbar-thumb {\n background-color: var(--rebill-color-border);\n border-radius: 3px;\n}\n\n.select-dropdown::-webkit-scrollbar-thumb:hover {\n background-color: var(--rebill-color-text-secondary);\n}\n\n/* Fix para evitar zoom en dispositivos móviles */\n@media screen and (max-width: 768px) {\n .select-combo-trigger {\n font-size: 1rem;\n }\n\n .select-option {\n font-size: 1rem;\n }\n\n .combo-input {\n font-size: 1rem;\n }\n\n .combo-input::placeholder {\n font-size: 1rem;\n }\n}\n","import { Component, Event, EventEmitter, Listen, Prop, State, h } from '@stencil/core';\n\n@Component({\n tag: 'rebill-input-combo',\n styleUrl: 'input-combo.css',\n shadow: false,\n})\nexport class InputCombo {\n private dropdownRef?: HTMLDivElement;\n private triggerRef?: HTMLDivElement;\n\n /** Etiqueta que se muestra arriba del campo */\n @Prop() label: string = '';\n /** Opciones del selector */\n @Prop() options: { label: string; value: string }[] = [];\n /** Valor del selector */\n @Prop({ mutable: true, reflect: true }) selectValue: string = '';\n /** Valor del input de texto */\n @Prop({ mutable: true, reflect: true }) inputValue: string = '';\n /** Placeholder del campo de texto */\n @Prop() inputPlaceholder: string = '';\n /** Placeholder del selector */\n @Prop() selectPlaceholder: string = '';\n /** Mensaje de error */\n @Prop() error: string = '';\n /** ID del selector */\n @Prop() selectId: string = '';\n /** ID del input de texto */\n @Prop() inputId: string = '';\n /** Estado deshabilitado */\n @Prop() disabled: boolean = false;\n /** Ancho del selector (en porcentaje o píxeles) */\n @Prop() selectWidth: string = '120px';\n /** Estado interno para mostrar/ocultar el dropdown */\n @State() isOpen: boolean = false;\n /** Índice de la opción resaltada para navegación con teclado */\n @State() highlightedIndex: number = -1;\n /** ID único del componente */\n @State() componentId: string = '';\n\n @Event() blur: EventEmitter<{ id: string; value: string }>;\n /** Evento al cambiar el valor del selector */\n @Event() selectChange: EventEmitter<{ id: string; value: string }>;\n /** Evento al cambiar el valor del input */\n @Event() input: EventEmitter<{ id: string; value: string }>;\n\n componentWillLoad() {\n this.componentId = this.selectId || `combo-${Math.random().toString(36).substr(2, 9)}`;\n }\n\n @Listen('change', { target: 'document' })\n handleFormChange(event: CustomEvent) {\n const formData = event.detail;\n if (formData) {\n // Manejar cambios del selector\n if (this.selectId && this.selectId in formData) {\n const newSelectValue = formData[this.selectId];\n if (typeof newSelectValue === 'string') {\n this.selectValue = newSelectValue;\n }\n }\n // Manejar cambios del input\n if (this.inputId && this.inputId in formData) {\n const newInputValue = formData[this.inputId];\n if (typeof newInputValue === 'string') {\n this.inputValue = newInputValue;\n }\n }\n }\n }\n\n @Listen('closeAllSelects', { target: 'document' })\n handleCloseAllSelects(event: CustomEvent) {\n if (event.detail !== this.componentId) {\n this.closeDropdown();\n }\n }\n\n @Listen('click', { target: 'document' })\n handleDocumentClick(event: Event) {\n if (\n this.dropdownRef &&\n this.triggerRef &&\n !this.dropdownRef.contains(event.target as Node) &&\n !this.triggerRef.contains(event.target as Node)\n ) {\n this.closeDropdown();\n }\n }\n\n private toggleDropdown = () => {\n if (this.disabled) return;\n\n const wasOpen = this.isOpen;\n this.isOpen = !this.isOpen;\n\n if (this.isOpen) {\n if (!wasOpen) {\n document.dispatchEvent(new CustomEvent('closeAllSelects', { detail: this.componentId }));\n }\n\n this.highlightedIndex = this.options.findIndex(option => option.value === this.selectValue);\n if (this.highlightedIndex === -1) {\n this.highlightedIndex = 0;\n }\n }\n };\n\n private openDropdown = () => {\n if (this.disabled) return;\n\n document.dispatchEvent(new CustomEvent('closeAllSelects', { detail: this.componentId }));\n\n this.isOpen = true;\n this.highlightedIndex = this.options.findIndex(option => option.value === this.selectValue);\n if (this.highlightedIndex === -1) {\n this.highlightedIndex = 0;\n }\n };\n\n private closeDropdown = () => {\n this.isOpen = false;\n this.highlightedIndex = -1;\n };\n\n private selectOption = (option: { label: string; value: string }) => {\n if (this.disabled) return;\n this.selectValue = option.value;\n this.closeDropdown();\n this.input.emit({ id: this.selectId, value: this.selectValue });\n };\n\n private onInputChange = (event: Event) => {\n if (this.disabled) return;\n const input = event.target as HTMLInputElement;\n this.inputValue = input.value;\n this.input.emit({ id: this.inputId, value: this.inputValue });\n };\n\n private onSelectBlur = () => {\n this.blur.emit({ id: this.selectId, value: this.selectValue });\n };\n\n private onInputBlur = () => {\n const trimmedValue = this.inputValue.trim();\n\n if (trimmedValue !== this.inputValue) {\n this.inputValue = trimmedValue;\n this.input.emit({ id: this.inputId, value: this.inputValue });\n }\n\n this.blur.emit({ id: this.inputId, value: this.inputValue });\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (this.disabled) return;\n\n switch (event.key) {\n case 'Enter':\n case ' ':\n event.preventDefault();\n if (this.isOpen && this.highlightedIndex >= 0) {\n this.selectOption(this.options[this.highlightedIndex]);\n } else {\n this.toggleDropdown();\n }\n break;\n case 'Escape':\n event.preventDefault();\n this.closeDropdown();\n break;\n case 'ArrowDown':\n event.preventDefault();\n if (!this.isOpen) {\n this.openDropdown();\n } else {\n this.highlightedIndex = Math.min(this.highlightedIndex + 1, this.options.length - 1);\n }\n break;\n case 'ArrowUp':\n event.preventDefault();\n if (this.isOpen) {\n this.highlightedIndex = Math.max(this.highlightedIndex - 1, 0);\n }\n break;\n }\n };\n\n private getSelectedOptionLabel = (): string => {\n const selectedOption = this.options.find(option => option.value === this.selectValue);\n return selectedOption ? selectedOption.label : this.selectPlaceholder;\n };\n\n render() {\n const selectedLabel = this.getSelectedOptionLabel();\n const hasSelectValue = this.selectValue !== '';\n\n return (\n <div class=\"input-container\">\n {this.label && (\n <label class={`input-label ${this.disabled ? 'disabled' : ''}`}>{this.label}</label>\n )}\n <div\n class={`input-combo-wrapper combo-wrapper ${this.disabled ? 'disabled' : ''} ${this.error ? 'error' : ''}`}\n >\n {/* Selector */}\n <div class=\"select-section\" style={{ width: this.selectWidth }}>\n <div\n ref={el => (this.triggerRef = el)}\n class={`input-combo-select select-combo-trigger ${!hasSelectValue ? 'placeholder' : ''}`}\n onClick={this.toggleDropdown}\n onKeyDown={this.handleKeyDown}\n onBlur={this.onSelectBlur}\n tabIndex={this.disabled ? -1 : 0}\n role=\"combobox\"\n aria-expanded={this.isOpen.toString()}\n aria-haspopup=\"listbox\"\n >\n <span class=\"select-value\">{selectedLabel}</span>\n <div class=\"icon-wrapper\">\n <rebill-icon name=\"chevron-up-down\" size=\"20px\" class=\"select-icon\" />\n </div>\n </div>\n\n {this.isOpen && (\n <div ref={el => (this.dropdownRef = el)} class=\"select-dropdown\" role=\"listbox\">\n {this.options.map((option, index) => (\n <div\n class={`select-option ${this.selectValue === option.value ? 'selected' : ''} ${this.highlightedIndex === index ? 'highlighted' : ''}`}\n onClick={() => this.selectOption(option)}\n role=\"option\"\n aria-selected={this.selectValue === option.value ? 'true' : 'false'}\n >\n {option.label}\n </div>\n ))}\n </div>\n )}\n </div>\n\n {/* Divisor vertical */}\n <div class=\"combo-divider\"></div>\n\n {/* Campo de texto */}\n <div class=\"input-section\">\n <input\n type=\"text\"\n class=\"input-combo-element combo-input\"\n placeholder={this.inputPlaceholder}\n value={this.inputValue}\n onInput={this.onInputChange}\n onBlur={this.onInputBlur}\n disabled={this.disabled}\n />\n </div>\n </div>\n {this.error && <span class=\"error-message\">{this.error}</span>}\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -3116,7 +3116,7 @@ class PhoneValidator {
|
|
|
3116
3116
|
}
|
|
3117
3117
|
}
|
|
3118
3118
|
|
|
3119
|
-
const inputPhoneCss = ".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}:host{display:block;width:100%;position:relative}.input-container{display:flex;flex-direction:column;width:100%;position:relative}.phone-input-container{display:flex;height:38.33px;border:1.5px solid var(--rebill-color-border);border-radius:var(--input-group-inner-border-radius, 8px);background:var(--rebill-color-background);transition:border-color 0.2s;overflow:visible;position:relative;box-sizing:border-box}.phone-input-container:focus-within{border-color:var(--rebill-color-primary)}.phone-input-container.input-error{border-color:var(--rebill-color-error)}.phone-input-container.disabled{background-color:var(--rebill-color-background);border-color:var(--rebill-color-disabled);opacity:0.7;cursor:not-allowed}.country-selector{display:flex;align-items:center;padding:10px 8px;background:var(--rebill-color-background);border-right:1.5px solid var(--rebill-color-border);border-radius:var(--input-group-inner-border-radius, 8px) 0 0\n var(--input-group-inner-border-radius, 8px);cursor:pointer;user-select:none;position:relative;z-index:1}.country-selector:hover{background:var(--rebill-color-background-secondary, #f8f9fa)}.flag{font-size:
|
|
3119
|
+
const inputPhoneCss = ".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}}:host{display:block;width:100%;position:relative}.input-container{display:flex;flex-direction:column;width:100%;position:relative}.phone-input-container{display:flex;height:38.33px;border:1.5px solid var(--rebill-color-border);border-radius:var(--input-group-inner-border-radius, 8px);background:var(--rebill-color-background);transition:border-color 0.2s;overflow:visible;position:relative;box-sizing:border-box}.phone-input-container:focus-within{border-color:var(--rebill-color-primary)}.phone-input-container.input-error{border-color:var(--rebill-color-error)}.phone-input-container.disabled{background-color:var(--rebill-color-background);border-color:var(--rebill-color-disabled);opacity:0.7;cursor:not-allowed}.country-selector{display:flex;align-items:center;padding:10px 8px;background:var(--rebill-color-background);border-right:1.5px solid var(--rebill-color-border);border-radius:var(--input-group-inner-border-radius, 8px) 0 0\n var(--input-group-inner-border-radius, 8px);cursor:pointer;user-select:none;position:relative;z-index:1}.country-selector:hover{background:var(--rebill-color-background-secondary, #f8f9fa)}.flag{font-size:0.875rem;margin-right:4px}.dial-code{font-size:0.875rem;color:var(--rebill-color-text-primary);font-weight:500;margin-right:4px;text-align:left !important}.dropdown-arrow{font-size:0.6rem;color:var(--rebill-color-text-secondary);transition:transform 0.3s ease;transform-origin:center}.dropdown-arrow.open{transform:rotate(180deg)}.phone-number-input{flex:1;border:none;outline:none;padding:10px 14px;font-size:0.875rem;color:var(--rebill-color-text-primary);background:transparent;min-width:0}.phone-number-input::placeholder{color:var(--rebill-color-text-secondary-light);font-size:0.875rem;opacity:1}.phone-number-input:disabled{color:var(--rebill-color-text-secondary);cursor:not-allowed}.country-dropdown{position:absolute;top:100%;left:0;right:0;background:var(--rebill-color-background, #ffffff);border:1.5px solid var(--rebill-color-border, #ebedef);border-radius:var(--input-group-inner-border-radius, 8px);box-shadow:0 8px 25px -5px rgba(0, 0, 0, 0.1),\n 0 10px 10px -5px rgba(0, 0, 0, 0.04);z-index:9999;max-height:200px;overflow-y:auto;min-width:200px;width:100%;margin-top:4px}.country-option{display:flex;align-items:center;padding:10px 12px;cursor:pointer;transition:background-color 0.15s ease;background:var(--rebill-color-background, #ffffff);border-bottom:1px solid var(--rebill-color-border, #ebedef)}.country-option:last-child{border-bottom:none}.country-option:hover{background:var(--rebill-color-background-secondary, #f8f9fa)}.country-option .flag{margin-right:10px;font-size:1.1rem;width:20px;text-align:center}.country-option .country-name{flex:1;font-size:0.875rem;color:var(--rebill-color-text-primary, #3b4049);margin-right:12px;font-weight:400}.country-option .dial-code{font-size:0.875rem;color:var(--rebill-color-text-secondary, #6b7280);font-weight:500;min-width:40px;text-align:right}.error-message{color:var(--rebill-color-error);font-size:0.75rem;margin-top:0.375rem}.disabled .country-selector{cursor:not-allowed;background:var(--rebill-color-background)}.disabled .country-selector:hover{background:var(--rebill-color-background)}.disabled .dial-code,.disabled .dropdown-arrow{color:var(--rebill-color-text-secondary)}.search-container{padding:0.75rem;border-bottom:1px solid var(--rebill-color-border);background-color:var(--rebill-color-background)}.search-input-wrapper{position:relative;display:flex;align-items:center;width:100%}.search-icon{position:absolute;left:0.75rem;color:var(--rebill-color-text-secondary);z-index:1;pointer-events:none}.search-input{width:100%;padding:0.5rem 0.75rem 0.5rem 2.5rem;border:1px solid var(--rebill-color-border);border-radius:0.375rem;font-size:0.875rem;color:var(--rebill-color-text-primary);background-color:var(--rebill-color-background);outline:none;transition:border-color 0.2s ease;box-sizing:border-box}.search-input:focus{border-color:var(--rebill-color-primary);box-shadow:0 0 0 2px var(--rebill-color-primary-light)}.search-input::placeholder{color:var(--rebill-color-text-secondary-light)}.clear-search{position:absolute;right:0.75rem;background:none;border:none;cursor:pointer;padding:0.25rem;border-radius:0.25rem;display:flex;align-items:center;justify-content:center;color:var(--rebill-color-text-secondary);transition:background-color 0.2s ease}.clear-search:hover{background-color:var(--rebill-color-background-hover);color:var(--rebill-color-text-primary)}.no-results{padding:0.75rem;text-align:center;color:var(--rebill-color-text-secondary);font-style:italic;border-bottom:1px solid var(--rebill-color-border)}@media screen and (max-width: 768px){.phone-number-input{font-size:1rem}.phone-number-input::placeholder{font-size:1rem}.dial-code{font-size:1rem}.country-option .country-name{font-size:1rem}.country-option .dial-code{font-size:1rem}.search-input{font-size:1rem}}";
|
|
3120
3120
|
|
|
3121
3121
|
const InputPhone = /*@__PURE__*/ proxyCustomElement(class InputPhone extends H {
|
|
3122
3122
|
constructor(registerHost) {
|
|
@@ -3403,6 +3403,6 @@ function defineCustomElement() {
|
|
|
3403
3403
|
defineCustomElement();
|
|
3404
3404
|
|
|
3405
3405
|
export { InputPhone as I, defineCustomElement as d };
|
|
3406
|
-
//# sourceMappingURL=p-
|
|
3406
|
+
//# sourceMappingURL=p-DUxs56Lj.js.map
|
|
3407
3407
|
|
|
3408
|
-
//# sourceMappingURL=p-
|
|
3408
|
+
//# sourceMappingURL=p-DUxs56Lj.js.map
|