@rededor/site-front-end-lib 20.0.8 → 20.0.9
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/README.md +124 -124
- package/components/cards/index.d.ts +6 -6
- package/fesm2022/rededor-site-front-end-lib-components-algolia-dropdown.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-algolia-dropdown.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-algolia-search.mjs +20 -20
- package/fesm2022/rededor-site-front-end-lib-components-algolia-search.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-banner.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-banner.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-breadcrumbs.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-cards.mjs +24 -19
- package/fesm2022/rededor-site-front-end-lib-components-cards.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-carousels.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-carousels.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-cta-wrapper.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-cta-wrapper.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-error.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-error.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-filter-letter-and-terms.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-filter-letter-and-terms.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-filters-filter-generic.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-filters-filter-generic.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-filters-filter-planos-convenios.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-filters-filter-planos-convenios.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-footer.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-footer.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-header-components-action.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-header-components-action.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-header-components-auxiliar.mjs +8 -8
- package/fesm2022/rededor-site-front-end-lib-components-header-components-auxiliar.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-header-components-main.mjs +8 -8
- package/fesm2022/rededor-site-front-end-lib-components-header-components-main.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-header-components-side.mjs +8 -8
- package/fesm2022/rededor-site-front-end-lib-components-header-components-side.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-header-services.mjs +3 -3
- package/fesm2022/rededor-site-front-end-lib-components-header-services.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-header.mjs +8 -8
- package/fesm2022/rededor-site-front-end-lib-components-header.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-image.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-image.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-load-screen.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-load-screen.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-modal-drawer.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-modal-drawer.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-modal.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-modal.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-overlay.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-overlay.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-page-header.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-page-header.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-page-template-fullcontent.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-page-template-fullcontent.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-page-template-sidebar.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-page-template-sidebar.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-pagination.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-pagination.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-search.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-search.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-section-navigation.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-section-navigation.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-side-ctas.mjs +20 -20
- package/fesm2022/rededor-site-front-end-lib-components-side-ctas.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-sidebar-navigation.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-sidebar-navigation.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-sticky-navigation.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-sticky-navigation.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-components-whatsapp.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-components-whatsapp.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-core.mjs +51 -51
- package/fesm2022/rededor-site-front-end-lib-core.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-accordion.mjs +8 -8
- package/fesm2022/rededor-site-front-end-lib-cura-accordion.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-api.mjs +26 -26
- package/fesm2022/rededor-site-front-end-lib-cura-api.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-counter.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-counter.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-distance.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-distance.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-dot.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-dot.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-pill.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-pill.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button-outline.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button-outline.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button-select.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button-select.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button-transparent.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button-transparent.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-buttons.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-cards-cura-card.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-cura-cards-cura-card.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-feedback-cura-alert.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-cura-feedback-cura-alert.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-feedback-cura-modal.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-cura-feedback-cura-modal.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-feedback-cura-toast.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-cura-feedback-cura-toast.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-checkbox.mjs +5 -5
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-checkbox.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-input-text.mjs +5 -5
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-input-text.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-label.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-label.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-radio.mjs +5 -5
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-radio.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-select-option.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-select-option.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-select.mjs +5 -5
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-select.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-switch.mjs +5 -5
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-switch.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-forms.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-icons-cura-icon.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-cura-icons-cura-icon.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-loaders-cura-loader-bar.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-cura-loaders-cura-loader-bar.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-loaders-cura-loader-circle.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-cura-loaders-cura-loader-circle.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-texts-cura-display.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-cura-texts-cura-display.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-texts-cura-heading.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-cura-texts-cura-heading.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-cura-texts-cura-paragraph.mjs +4 -4
- package/fesm2022/rededor-site-front-end-lib-cura-texts-cura-paragraph.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-enums.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-services-algolia-search-api.mjs +3 -3
- package/fesm2022/rededor-site-front-end-lib-services-algolia-search-api.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-services-algolia.mjs +3 -3
- package/fesm2022/rededor-site-front-end-lib-services-algolia.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-services-ngu-carousel.mjs +3 -3
- package/fesm2022/rededor-site-front-end-lib-services-ngu-carousel.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-services-ssr-loading.mjs +3 -3
- package/fesm2022/rededor-site-front-end-lib-services-ssr-loading.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-services-transfer-state.mjs +3 -3
- package/fesm2022/rededor-site-front-end-lib-services-transfer-state.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-services-youtube.mjs +3 -3
- package/fesm2022/rededor-site-front-end-lib-services-youtube.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-shared.mjs +6 -6
- package/fesm2022/rededor-site-front-end-lib-shared.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/_breakpoints.scss +5 -5
|
@@ -85,16 +85,16 @@ class CuraModalComponent {
|
|
|
85
85
|
window.removeEventListener('keydown', this.handleCloseOnEsc);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
89
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
88
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CuraModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
89
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.16", type: CuraModalComponent, isStandalone: true, selector: "cura-modal", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, background: { classPropertyName: "background", publicName: "background", isSignal: true, isRequired: false, transformFunction: null }, top: { classPropertyName: "top", publicName: "top", isSignal: true, isRequired: false, transformFunction: null }, bottom: { classPropertyName: "bottom", publicName: "bottom", isSignal: true, isRequired: false, transformFunction: null }, left: { classPropertyName: "left", publicName: "left", isSignal: true, isRequired: false, transformFunction: null }, right: { classPropertyName: "right", publicName: "right", isSignal: true, isRequired: false, transformFunction: null }, mobileCloseLabel: { classPropertyName: "mobileCloseLabel", publicName: "mobileCloseLabel", isSignal: true, isRequired: false, transformFunction: null }, zindex: { classPropertyName: "zindex", publicName: "zindex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", modalClose: "modalClose" }, host: { attributes: { "role": "dialog", "aria-modal": "true" }, properties: { "style.--zIndex": "zindex()" } }, ngImport: i0, template: "<div class=\"modal container\" [class.open]=\"open()\" [style]=\"styles()\">\n <div class=\"modal backdrop\" [class.open]=\"open()\" (click)=\"handleClose()\"></div>\n\n <div class=\"wrapper\">\n <!-- Desktop close button -->\n <button class=\"close desktop\" type=\"button\" (click)=\"handleClose()\">\n <cura-icon name=\"close\" color=\"error-dark\" size=\"small\"> </cura-icon>\n </button>\n\n <ng-content></ng-content>\n\n <!-- Mobile close button -->\n <button class=\"close mobile\" type=\"button\" (click)=\"handleClose()\">\n <cura-icon name=\"close\" color=\"error-dark\" [size]=\"16\"> </cura-icon>\n <cura-paragraph color=\"error-dark\" size=\"small\" marginBlock=\"0\">\n {{ mobileCloseLabel() }}\n </cura-paragraph>\n </button>\n </div>\n</div>\n", styles: [":host{display:block}.modal{position:fixed;height:100%;width:100%;top:var(--top-offset);bottom:var(--bottom-offset);left:var(--left-offset);right:var(--right-offset);z-index:-1;margin-top:var(--offset-top)}.modal.open{z-index:var(--zIndex)}.modal.open .backdrop,.modal.open .wrapper{opacity:1;visibility:visible;animation:fadeIn .3s ease-out}.container{display:flex;align-items:center;justify-content:center}.backdrop,.wrapper{opacity:0;visibility:hidden;transition:opacity .3s ease,visibility .3s ease}.backdrop{background-color:var(--background-color);z-index:calc(var(--zIndex) - 10);animation:fadeIn .3s ease-out}.wrapper{position:fixed;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-light);border-radius:4px;max-width:600px;min-width:200px;padding:0 8px 8px;z-index:var(--zIndex);box-shadow:0 8px 32px #0000001f,0 4px 16px #00000014;transform:scale(.95);transition:transform .3s ease-out,opacity .3s ease,visibility .3s ease}.wrapper ::ng-deep>*:not(button){max-height:80vh;overflow:auto;padding-right:12px}.modal.open .wrapper{transform:scale(1);opacity:1;visibility:visible}.close{justify-self:flex-end;padding-top:8px;background:none;border:none;cursor:pointer;display:flex;align-items:center}.close.mobile{display:none}.close.desktop{display:flex}@media (max-width: 768px){.wrapper{position:fixed;bottom:0;width:80%;padding-top:8px;padding-bottom:0;border-radius:4px 4px 0 0;border-bottom:none}.close{align-items:center;border-top:1px dashed var(--neutral-light);margin-top:8px;padding:8px 0;justify-content:center;width:100%}.close.mobile{display:flex;gap:4px}.close.desktop{display:none}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}\n"], dependencies: [{ kind: "component", type: CuraIconComponent, selector: "cura-icon", inputs: ["name", "color", "size", "iconset", "disabled"] }, { kind: "component", type: CuraParagraphComponent, selector: "cura-paragraph", inputs: ["size", "spotColor", "color", "marginBlock", "lineHeight", "textOverflow"] }] }); }
|
|
90
90
|
}
|
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
91
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CuraModalComponent, decorators: [{
|
|
92
92
|
type: Component,
|
|
93
93
|
args: [{ selector: 'cura-modal', imports: [CuraIconComponent, CuraParagraphComponent], host: {
|
|
94
94
|
role: 'dialog',
|
|
95
95
|
'aria-modal': 'true',
|
|
96
96
|
'[style.--zIndex]': 'zindex()',
|
|
97
|
-
}, template: "<div class=\"modal container\" [class.open]=\"open()\" [style]=\"styles()\">\
|
|
97
|
+
}, template: "<div class=\"modal container\" [class.open]=\"open()\" [style]=\"styles()\">\n <div class=\"modal backdrop\" [class.open]=\"open()\" (click)=\"handleClose()\"></div>\n\n <div class=\"wrapper\">\n <!-- Desktop close button -->\n <button class=\"close desktop\" type=\"button\" (click)=\"handleClose()\">\n <cura-icon name=\"close\" color=\"error-dark\" size=\"small\"> </cura-icon>\n </button>\n\n <ng-content></ng-content>\n\n <!-- Mobile close button -->\n <button class=\"close mobile\" type=\"button\" (click)=\"handleClose()\">\n <cura-icon name=\"close\" color=\"error-dark\" [size]=\"16\"> </cura-icon>\n <cura-paragraph color=\"error-dark\" size=\"small\" marginBlock=\"0\">\n {{ mobileCloseLabel() }}\n </cura-paragraph>\n </button>\n </div>\n</div>\n", styles: [":host{display:block}.modal{position:fixed;height:100%;width:100%;top:var(--top-offset);bottom:var(--bottom-offset);left:var(--left-offset);right:var(--right-offset);z-index:-1;margin-top:var(--offset-top)}.modal.open{z-index:var(--zIndex)}.modal.open .backdrop,.modal.open .wrapper{opacity:1;visibility:visible;animation:fadeIn .3s ease-out}.container{display:flex;align-items:center;justify-content:center}.backdrop,.wrapper{opacity:0;visibility:hidden;transition:opacity .3s ease,visibility .3s ease}.backdrop{background-color:var(--background-color);z-index:calc(var(--zIndex) - 10);animation:fadeIn .3s ease-out}.wrapper{position:fixed;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-light);border-radius:4px;max-width:600px;min-width:200px;padding:0 8px 8px;z-index:var(--zIndex);box-shadow:0 8px 32px #0000001f,0 4px 16px #00000014;transform:scale(.95);transition:transform .3s ease-out,opacity .3s ease,visibility .3s ease}.wrapper ::ng-deep>*:not(button){max-height:80vh;overflow:auto;padding-right:12px}.modal.open .wrapper{transform:scale(1);opacity:1;visibility:visible}.close{justify-self:flex-end;padding-top:8px;background:none;border:none;cursor:pointer;display:flex;align-items:center}.close.mobile{display:none}.close.desktop{display:flex}@media (max-width: 768px){.wrapper{position:fixed;bottom:0;width:80%;padding-top:8px;padding-bottom:0;border-radius:4px 4px 0 0;border-bottom:none}.close{align-items:center;border-top:1px dashed var(--neutral-light);margin-top:8px;padding:8px 0;justify-content:center;width:100%}.close.mobile{display:flex;gap:4px}.close.desktop{display:none}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}\n"] }]
|
|
98
98
|
}], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], background: [{ type: i0.Input, args: [{ isSignal: true, alias: "background", required: false }] }], top: [{ type: i0.Input, args: [{ isSignal: true, alias: "top", required: false }] }], bottom: [{ type: i0.Input, args: [{ isSignal: true, alias: "bottom", required: false }] }], left: [{ type: i0.Input, args: [{ isSignal: true, alias: "left", required: false }] }], right: [{ type: i0.Input, args: [{ isSignal: true, alias: "right", required: false }] }], mobileCloseLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "mobileCloseLabel", required: false }] }], zindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "zindex", required: false }] }], modalClose: [{ type: i0.Output, args: ["modalClose"] }] } });
|
|
99
99
|
|
|
100
100
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rededor-site-front-end-lib-cura-feedback-cura-modal.mjs","sources":["../../../projects/site-front-end-lib/cura/feedback/cura-modal/cura-modal.component.ts","../../../projects/site-front-end-lib/cura/feedback/cura-modal/cura-modal.component.html","../../../projects/site-front-end-lib/cura/feedback/cura-modal/rededor-site-front-end-lib-cura-feedback-cura-modal.ts"],"sourcesContent":["import { Component, input, output, computed, inject, model, OnInit, OnDestroy, PLATFORM_ID } from '@angular/core';\
|
|
1
|
+
{"version":3,"file":"rededor-site-front-end-lib-cura-feedback-cura-modal.mjs","sources":["../../../projects/site-front-end-lib/cura/feedback/cura-modal/cura-modal.component.ts","../../../projects/site-front-end-lib/cura/feedback/cura-modal/cura-modal.component.html","../../../projects/site-front-end-lib/cura/feedback/cura-modal/rededor-site-front-end-lib-cura-feedback-cura-modal.ts"],"sourcesContent":["import { Component, input, output, computed, inject, model, OnInit, OnDestroy, PLATFORM_ID } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\nimport { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';\nimport { CuraParagraphComponent } from '@rededor/site-front-end-lib/cura/texts/cura-paragraph';\nimport { ModalBackground } from './cura-modal.definitions';\n\n@Component({\n selector: 'cura-modal',\n imports: [CuraIconComponent, CuraParagraphComponent],\n templateUrl: './cura-modal.component.html',\n styleUrls: ['./cura-modal.component.scss'],\n host: {\n role: 'dialog',\n 'aria-modal': 'true',\n '[style.--zIndex]': 'zindex()',\n },\n})\nexport class CuraModalComponent implements OnInit, OnDestroy {\n private curaApi = inject(CuraApiService);\n private platformId = inject(PLATFORM_ID);\n\n /**\n * Property open to control modal visibility\n */\n open = model<boolean>(false);\n\n /**\n * Property background to control modal backdrop color\n */\n background = input<ModalBackground>('light');\n\n /**\n * Property top to control modal top position\n */\n top = input<number>(0);\n\n /**\n * Property bottom to control modal bottom position\n */\n bottom = input<number>(0);\n\n /**\n * Property left to control modal left position\n */\n left = input<number>(0);\n\n /**\n * Property right to control modal right position\n */\n right = input<number>(0);\n\n /**\n * Defines the label for the close button when the modal is viewed on mobile\n */\n mobileCloseLabel = input<string>('Fechar');\n\n /**\n * Property zindex to control the z-index value of the component\n */\n zindex = input<string>('100');\n\n /**\n * Event close to handle modal close\n */\n modalClose = output<void>();\n\n // Computed styles\n styles = computed(() => {\n const backgroundTheme = {\n dark: this.curaApi?.theme?.colors?.getColor('neutral-black', 0.4) || 'rgba(0, 0, 0, 0.4)',\n light: this.curaApi?.theme?.colors?.getColor('primary-darker', 0.8) || 'rgba(0, 0, 0, 0.8)',\n };\n\n return {\n '--background-color': backgroundTheme[this.background()],\n '--top-offset': `${this.top()}px`,\n '--bottom-offset': `${this.bottom()}px`,\n '--left-offset': `${this.left()}px`,\n '--right-offset': `${this.right()}px`,\n '--neutral-purewhite': this.curaApi?.theme?.colors?.getColor('neutral-purewhite') || '#ffffff',\n '--neutral-light': this.curaApi?.theme?.colors?.getColor('neutral-light') || '#f5f5f5',\n '--base-spacing': this.curaApi?.theme?.spacing?.getSpacing() || '16px',\n };\n });\n\n ngOnInit(): void {\n if (isPlatformBrowser(this.platformId)) {\n window.addEventListener('keydown', this.handleCloseOnEsc);\n }\n }\n\n ngOnDestroy(): void {\n if (isPlatformBrowser(this.platformId)) {\n window.removeEventListener('keydown', this.handleCloseOnEsc);\n }\n }\n\n handleCloseOnEsc = (evt: KeyboardEvent): void => {\n if (evt.key !== 'Escape' || !this.open()) {\n return;\n }\n this.open.set(false);\n this.modalClose.emit();\n };\n\n // Handle close method\n handleClose = (): void => {\n this.modalClose.emit();\n this.open.set(false);\n };\n}\n","<div class=\"modal container\" [class.open]=\"open()\" [style]=\"styles()\">\n <div class=\"modal backdrop\" [class.open]=\"open()\" (click)=\"handleClose()\"></div>\n\n <div class=\"wrapper\">\n <!-- Desktop close button -->\n <button class=\"close desktop\" type=\"button\" (click)=\"handleClose()\">\n <cura-icon name=\"close\" color=\"error-dark\" size=\"small\"> </cura-icon>\n </button>\n\n <ng-content></ng-content>\n\n <!-- Mobile close button -->\n <button class=\"close mobile\" type=\"button\" (click)=\"handleClose()\">\n <cura-icon name=\"close\" color=\"error-dark\" [size]=\"16\"> </cura-icon>\n <cura-paragraph color=\"error-dark\" size=\"small\" marginBlock=\"0\">\n {{ mobileCloseLabel() }}\n </cura-paragraph>\n </button>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAkBa,kBAAkB,CAAA;AAX/B,IAAA,WAAA,GAAA;AAYU,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,cAAc,CAAC;AAChC,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AAExC;;AAEG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAU,KAAK,gDAAC;AAE5B;;AAEG;AACH,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAkB,OAAO,sDAAC;AAE5C;;AAEG;AACH,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK,CAAS,CAAC,+CAAC;AAEtB;;AAEG;AACH,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAS,CAAC,kDAAC;AAEzB;;AAEG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,CAAC,gDAAC;AAEvB;;AAEG;AACH,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,CAAC,iDAAC;AAExB;;AAEG;AACH,QAAA,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAAS,QAAQ,4DAAC;AAE1C;;AAEG;AACH,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAS,KAAK,kDAAC;AAE7B;;AAEG;QACH,IAAA,CAAA,UAAU,GAAG,MAAM,EAAQ;;AAG3B,QAAA,IAAA,CAAA,MAAM,GAAG,QAAQ,CAAC,MAAK;AACrB,YAAA,MAAM,eAAe,GAAG;AACtB,gBAAA,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ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A,EAAA,OAAA,EAAA,aAAA,EAAA,YAAA,EAAA,cAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FASxC,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAX9B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,WACb,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,EAAA,IAAA,EAG9C;AACJ,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,YAAY,EAAE,MAAM;AACpB,wBAAA,kBAAkB,EAAE,UAAU;AAC/B,qBAAA,EAAA,QAAA,EAAA,4yBAAA,EAAA,MAAA,EAAA,CAAA,urDAAA,CAAA,EAAA;;;AEhBH;;AAEG;;;;"}
|
|
@@ -177,17 +177,17 @@ class CuraToastComponent {
|
|
|
177
177
|
}, delay);
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
181
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
180
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CuraToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
181
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: CuraToastComponent, isStandalone: true, selector: "cura-toast", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, closeButton: { classPropertyName: "closeButton", publicName: "closeButton", isSignal: true, isRequired: false, transformFunction: null }, loader: { classPropertyName: "loader", publicName: "loader", isSignal: true, isRequired: false, transformFunction: null }, autoCloseDelay: { classPropertyName: "autoCloseDelay", publicName: "autoCloseDelay", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toastClosed: "toastClosed" }, host: { attributes: { "role": "alert", "aria-live": "polite", "aria-atomic": "true" }, properties: { "attr.aria-label": "label()" } }, ngImport: i0, template: "<div [ngClass]=\"containerClasses()\" [ngStyle]=\"toastStyles()\">\n <cura-icon class=\"default-icon\" [name]=\"iconName()\" [size]=\"16\" [color]=\"type() + '-dark'\"></cura-icon>\n\n <div class=\"content\">\n <cura-heading [level]=\"4\" size=\"xsmall\" [color]=\"type() + '-dark'\" weight=\"bold\" marginBlock=\"0\">\n {{ label() }}\n </cura-heading>\n\n <cura-paragraph [color]=\"type() + '-darker'\" size=\"xsmall\" marginBlock=\"0\" lineHeight=\"133.33%\">\n <ng-content></ng-content>\n </cura-paragraph>\n\n <ng-content select=\"[slot=actions]\"></ng-content>\n </div>\n\n @if (closeButton()) {\n <cura-icon class=\"close-icon\" name=\"close\" [size]=\"16\" color=\"error-dark\" (click)=\"handleClose()\"></cura-icon>\n }\n\n @if (loader() && autoCloseDelay()) {\n <cura-loader-bar [color]=\"type() + '-base'\" [progress]=\"progress()\"></cura-loader-bar>\n }\n</div>\n", styles: [":host{display:block;box-sizing:border-box}:host .container{position:fixed;z-index:99999;display:flex;box-sizing:border-box;min-width:320px;height:fit-content;padding:16px;border:1px solid var(--color-base);border-radius:12px;background-color:var(--neutral-purewhite);overflow:hidden;box-shadow:0 8px 16px 0 var(--neutral-black-shadow-4, rgba(38, 38, 38, .12))}:host .container.loader{padding:16px 16px 20px}:host .container.top{top:24px}:host .container.top.center{top:-100%;left:50%;transform:translate(-50%);opacity:0;transition:opacity .5s ease-in-out,top .5s ease-in-out}:host .container.top.center.active{top:24px;opacity:1}:host .container.bottom{bottom:24px}:host .container.bottom.center{bottom:-100%;left:50%;transform:translate(-50%);opacity:0;transition:opacity .5s ease-in-out,bottom .5s ease-in-out}:host .container.bottom.center.active{bottom:24px;opacity:1}:host .container.left{left:-100%;opacity:0;transition:opacity .5s ease-in-out,left .5s ease-in-out}@media (max-width: 768px){:host .container.left{right:unset;left:50%;transform:translate(-50%)}}:host .container.left.active{left:24px;opacity:1}:host .container.right{right:-100%;opacity:0;transition:opacity .5s ease-in-out,right .5s ease-in-out}@media (max-width: 768px){:host .container.right{right:unset;left:50%;transform:translate(-50%)}}:host .container.right.active{right:24px;opacity:1}:host .container .content{flex:1 1 0;display:flex;flex-direction:column;gap:4px}:host .container .default-icon{margin-right:12px}:host .container .close-icon{margin-left:12px;cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: CuraIconComponent, selector: "cura-icon", inputs: ["name", "color", "size", "iconset", "disabled"] }, { kind: "component", type: CuraHeadingComponent, selector: "cura-heading", inputs: ["level", "size", "weight", "spotColor", "color", "marginBlock", "lineHeight", "textOverflow"] }, { kind: "component", type: CuraParagraphComponent, selector: "cura-paragraph", inputs: ["size", "spotColor", "color", "marginBlock", "lineHeight", "textOverflow"] }, { kind: "component", type: CuraLoaderBarComponent, selector: "cura-loader-bar", inputs: ["color", "progress"] }] }); }
|
|
182
182
|
}
|
|
183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
183
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CuraToastComponent, decorators: [{
|
|
184
184
|
type: Component,
|
|
185
185
|
args: [{ selector: 'cura-toast', imports: [CommonModule, CuraIconComponent, CuraHeadingComponent, CuraParagraphComponent, CuraLoaderBarComponent], host: {
|
|
186
186
|
role: 'alert',
|
|
187
187
|
'aria-live': 'polite',
|
|
188
188
|
'aria-atomic': 'true',
|
|
189
189
|
'[attr.aria-label]': 'label()',
|
|
190
|
-
}, template: "<div [ngClass]=\"containerClasses()\" [ngStyle]=\"toastStyles()\">\
|
|
190
|
+
}, template: "<div [ngClass]=\"containerClasses()\" [ngStyle]=\"toastStyles()\">\n <cura-icon class=\"default-icon\" [name]=\"iconName()\" [size]=\"16\" [color]=\"type() + '-dark'\"></cura-icon>\n\n <div class=\"content\">\n <cura-heading [level]=\"4\" size=\"xsmall\" [color]=\"type() + '-dark'\" weight=\"bold\" marginBlock=\"0\">\n {{ label() }}\n </cura-heading>\n\n <cura-paragraph [color]=\"type() + '-darker'\" size=\"xsmall\" marginBlock=\"0\" lineHeight=\"133.33%\">\n <ng-content></ng-content>\n </cura-paragraph>\n\n <ng-content select=\"[slot=actions]\"></ng-content>\n </div>\n\n @if (closeButton()) {\n <cura-icon class=\"close-icon\" name=\"close\" [size]=\"16\" color=\"error-dark\" (click)=\"handleClose()\"></cura-icon>\n }\n\n @if (loader() && autoCloseDelay()) {\n <cura-loader-bar [color]=\"type() + '-base'\" [progress]=\"progress()\"></cura-loader-bar>\n }\n</div>\n", styles: [":host{display:block;box-sizing:border-box}:host .container{position:fixed;z-index:99999;display:flex;box-sizing:border-box;min-width:320px;height:fit-content;padding:16px;border:1px solid var(--color-base);border-radius:12px;background-color:var(--neutral-purewhite);overflow:hidden;box-shadow:0 8px 16px 0 var(--neutral-black-shadow-4, rgba(38, 38, 38, .12))}:host .container.loader{padding:16px 16px 20px}:host .container.top{top:24px}:host .container.top.center{top:-100%;left:50%;transform:translate(-50%);opacity:0;transition:opacity .5s ease-in-out,top .5s ease-in-out}:host .container.top.center.active{top:24px;opacity:1}:host .container.bottom{bottom:24px}:host .container.bottom.center{bottom:-100%;left:50%;transform:translate(-50%);opacity:0;transition:opacity .5s ease-in-out,bottom .5s ease-in-out}:host .container.bottom.center.active{bottom:24px;opacity:1}:host .container.left{left:-100%;opacity:0;transition:opacity .5s ease-in-out,left .5s ease-in-out}@media (max-width: 768px){:host .container.left{right:unset;left:50%;transform:translate(-50%)}}:host .container.left.active{left:24px;opacity:1}:host .container.right{right:-100%;opacity:0;transition:opacity .5s ease-in-out,right .5s ease-in-out}@media (max-width: 768px){:host .container.right{right:unset;left:50%;transform:translate(-50%)}}:host .container.right.active{right:24px;opacity:1}:host .container .content{flex:1 1 0;display:flex;flex-direction:column;gap:4px}:host .container .default-icon{margin-right:12px}:host .container .close-icon{margin-left:12px;cursor:pointer}\n"] }]
|
|
191
191
|
}], ctorParameters: () => [], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], closeButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeButton", required: false }] }], loader: [{ type: i0.Input, args: [{ isSignal: true, alias: "loader", required: false }] }], autoCloseDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoCloseDelay", required: false }] }], toastClosed: [{ type: i0.Output, args: ["toastClosed"] }] } });
|
|
192
192
|
|
|
193
193
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rededor-site-front-end-lib-cura-feedback-cura-toast.mjs","sources":["../../../projects/site-front-end-lib/cura/feedback/cura-toast/cura-toast.component.ts","../../../projects/site-front-end-lib/cura/feedback/cura-toast/cura-toast.component.html","../../../projects/site-front-end-lib/cura/feedback/cura-toast/rededor-site-front-end-lib-cura-feedback-cura-toast.ts"],"sourcesContent":["import { Component, input, output, inject, computed, signal, OnInit, OnDestroy, ElementRef, effect } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\r\nimport { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';\r\nimport { CuraHeadingComponent } from '@rededor/site-front-end-lib/cura/texts/cura-heading';\r\nimport { CuraParagraphComponent } from '@rededor/site-front-end-lib/cura/texts/cura-paragraph';\r\nimport { CuraLoaderBarComponent } from '@rededor/site-front-end-lib/cura/loaders/cura-loader-bar';\r\nimport { ToastType, ToastPosition } from './cura-toast.definitions';\r\n\r\n@Component({\r\n selector: 'cura-toast',\r\n imports: [CommonModule, CuraIconComponent, CuraHeadingComponent, CuraParagraphComponent, CuraLoaderBarComponent],\r\n templateUrl: './cura-toast.component.html',\r\n styleUrls: ['./cura-toast.component.scss'],\r\n host: {\r\n role: 'alert',\r\n 'aria-live': 'polite',\r\n 'aria-atomic': 'true',\r\n '[attr.aria-label]': 'label()',\r\n },\r\n})\r\nexport class CuraToastComponent implements OnInit, OnDestroy {\r\n private curaApi: CuraApiService = inject(CuraApiService);\r\n private elementRef = inject(ElementRef);\r\n private intervalId?: ReturnType<typeof setInterval>;\r\n\r\n /**\r\n * Toast type: info (default) | success | warning | error\r\n */\r\n type = input<ToastType>('info');\r\n\r\n /**\r\n * Toast position on screen\r\n */\r\n position = input<ToastPosition>('top-right');\r\n\r\n /**\r\n * Custom icon name\r\n */\r\n icon = input<string>('');\r\n\r\n /**\r\n * Toast label/title\r\n */\r\n label = input<string>('');\r\n\r\n /**\r\n * Show close button. Default: true\r\n */\r\n closeButton = input<boolean>(true);\r\n\r\n /**\r\n * Show loader bar. Default: true\r\n */\r\n loader = input<boolean>(true);\r\n\r\n /**\r\n * Auto close delay in milliseconds. Default: 10000ms (10s)\r\n */\r\n autoCloseDelay = input<number>(10000);\r\n\r\n /**\r\n * Close event emitter\r\n */\r\n toastClosed = output<void>();\r\n\r\n /**\r\n * Progress state for loader animation\r\n */\r\n progress = signal<number>(0);\r\n\r\n /**\r\n * Active state for animation\r\n */\r\n isActive = signal<boolean>(false);\r\n\r\n constructor() {\r\n // Watch for type and position changes to update styles\r\n effect(() => {\r\n this.type();\r\n this.position();\r\n });\r\n }\r\n\r\n toastStyles = computed(() => {\r\n if (!this.curaApi) return {};\r\n\r\n const colors = [\r\n { name: '--neutral-purewhite', theme: 'neutral-purewhite' },\r\n { name: '--neutral-base', theme: 'neutral-base', opacity: 0.2 },\r\n { name: '--primary-base', theme: 'primary-base' },\r\n { name: '--color-base', theme: `${this.type()}-base` },\r\n ];\r\n\r\n const styles: { [key: string]: string } = {};\r\n\r\n colors.forEach((color) => {\r\n if (color.opacity !== undefined) {\r\n styles[color.name] = this.curaApi.theme.colors.getColor(color.theme, color.opacity);\r\n } else {\r\n styles[color.name] = this.curaApi.theme.colors.getColor(color.theme);\r\n }\r\n });\r\n\r\n return styles;\r\n });\r\n\r\n containerClasses = computed(() => {\r\n const [firstPosition, secondPosition] = this.position().split('-');\r\n const classes: { [key: string]: boolean } = {\r\n container: true,\r\n };\r\n\r\n if (firstPosition) classes[firstPosition] = true;\r\n if (secondPosition) classes[secondPosition] = true;\r\n if (this.loader()) classes['loader'] = true;\r\n if (this.isActive()) classes['active'] = true;\r\n\r\n return classes;\r\n });\r\n\r\n iconName = computed(() => {\r\n const iconMapping: { [key in ToastType]: string } = {\r\n info: 'infoCircle',\r\n success: 'checkCircle',\r\n warning: 'alertCircle',\r\n error: 'alertTriangle',\r\n };\r\n return this.icon() || iconMapping[this.type()];\r\n });\r\n\r\n ngOnInit(): void {\r\n // Activate animation after a small delay to ensure DOM is ready\r\n setTimeout(() => {\r\n this.openContainer();\r\n this.startAnimation();\r\n }, 10);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this.intervalId) {\r\n clearInterval(this.intervalId);\r\n }\r\n }\r\n\r\n /**\r\n * Opens the toast container with animation\r\n */\r\n openContainer(): void {\r\n this.isActive.set(true);\r\n }\r\n\r\n /**\r\n * Closes the toast container with animation\r\n */\r\n closeContainer(): void {\r\n this.isActive.set(false);\r\n\r\n setTimeout(() => {\r\n this.toastClosed.emit();\r\n // Remove element from DOM\r\n const element = this.elementRef.nativeElement;\r\n if (element && element.parentNode) {\r\n element.parentNode.removeChild(element);\r\n }\r\n }, 500);\r\n }\r\n\r\n /**\r\n * Public method to close toast\r\n */\r\n close(): void {\r\n this.closeContainer();\r\n }\r\n\r\n /**\r\n * Handle close button click\r\n */\r\n handleClose(): void {\r\n this.closeContainer();\r\n }\r\n\r\n /**\r\n * Starts the auto-close animation\r\n */\r\n private startAnimation(): void {\r\n const delay = this.autoCloseDelay();\r\n\r\n if (!delay) return;\r\n\r\n if (this.loader()) {\r\n this.progress.set(0);\r\n this.intervalId = setInterval(() => {\r\n const currentProgress = this.progress();\r\n if (currentProgress >= 100) {\r\n if (this.intervalId) {\r\n clearInterval(this.intervalId);\r\n }\r\n this.closeContainer();\r\n } else {\r\n this.progress.set(currentProgress + 1);\r\n }\r\n }, delay / 100);\r\n } else {\r\n this.intervalId = setInterval(() => {\r\n if (this.intervalId) {\r\n clearInterval(this.intervalId);\r\n }\r\n this.closeContainer();\r\n }, delay);\r\n }\r\n }\r\n}\r\n","<div [ngClass]=\"containerClasses()\" [ngStyle]=\"toastStyles()\">\r\n <cura-icon class=\"default-icon\" [name]=\"iconName()\" [size]=\"16\" [color]=\"type() + '-dark'\"></cura-icon>\r\n\r\n <div class=\"content\">\r\n <cura-heading [level]=\"4\" size=\"xsmall\" [color]=\"type() + '-dark'\" weight=\"bold\" marginBlock=\"0\">\r\n {{ label() }}\r\n </cura-heading>\r\n\r\n <cura-paragraph [color]=\"type() + '-darker'\" size=\"xsmall\" marginBlock=\"0\" lineHeight=\"133.33%\">\r\n <ng-content></ng-content>\r\n </cura-paragraph>\r\n\r\n <ng-content select=\"[slot=actions]\"></ng-content>\r\n </div>\r\n\r\n @if (closeButton()) {\r\n <cura-icon class=\"close-icon\" name=\"close\" [size]=\"16\" color=\"error-dark\" (click)=\"handleClose()\"></cura-icon>\r\n }\r\n\r\n @if (loader() && autoCloseDelay()) {\r\n <cura-loader-bar [color]=\"type() + '-base'\" [progress]=\"progress()\"></cura-loader-bar>\r\n }\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MAqBa,kBAAkB,CA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S;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EAAA,OAAA,EACb,CAAC,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,sBAAsB,CAAC,EAAA,IAAA,EAG1G;AACJ,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,WAAW,EAAE,QAAQ;AACrB,wBAAA,aAAa,EAAE,MAAM;AACrB,wBAAA,mBAAmB,EAAE,SAAS;AAC/B,qBAAA,EAAA,QAAA,EAAA,i8BAAA,EAAA,MAAA,EAAA,CAAA,whDAAA,CAAA,EAAA;;;AEnBH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"rededor-site-front-end-lib-cura-feedback-cura-toast.mjs","sources":["../../../projects/site-front-end-lib/cura/feedback/cura-toast/cura-toast.component.ts","../../../projects/site-front-end-lib/cura/feedback/cura-toast/cura-toast.component.html","../../../projects/site-front-end-lib/cura/feedback/cura-toast/rededor-site-front-end-lib-cura-feedback-cura-toast.ts"],"sourcesContent":["import { Component, input, output, inject, computed, signal, OnInit, OnDestroy, ElementRef, effect } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\nimport { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';\nimport { CuraHeadingComponent } from '@rededor/site-front-end-lib/cura/texts/cura-heading';\nimport { CuraParagraphComponent } from '@rededor/site-front-end-lib/cura/texts/cura-paragraph';\nimport { CuraLoaderBarComponent } from '@rededor/site-front-end-lib/cura/loaders/cura-loader-bar';\nimport { ToastType, ToastPosition } from './cura-toast.definitions';\n\n@Component({\n selector: 'cura-toast',\n imports: [CommonModule, CuraIconComponent, CuraHeadingComponent, CuraParagraphComponent, CuraLoaderBarComponent],\n templateUrl: './cura-toast.component.html',\n styleUrls: ['./cura-toast.component.scss'],\n host: {\n role: 'alert',\n 'aria-live': 'polite',\n 'aria-atomic': 'true',\n '[attr.aria-label]': 'label()',\n },\n})\nexport class CuraToastComponent implements OnInit, OnDestroy {\n private curaApi: CuraApiService = inject(CuraApiService);\n private elementRef = inject(ElementRef);\n private intervalId?: ReturnType<typeof setInterval>;\n\n /**\n * Toast type: info (default) | success | warning | error\n */\n type = input<ToastType>('info');\n\n /**\n * Toast position on screen\n */\n position = input<ToastPosition>('top-right');\n\n /**\n * Custom icon name\n */\n icon = input<string>('');\n\n /**\n * Toast label/title\n */\n label = input<string>('');\n\n /**\n * Show close button. Default: true\n */\n closeButton = input<boolean>(true);\n\n /**\n * Show loader bar. Default: true\n */\n loader = input<boolean>(true);\n\n /**\n * Auto close delay in milliseconds. Default: 10000ms (10s)\n */\n autoCloseDelay = input<number>(10000);\n\n /**\n * Close event emitter\n */\n toastClosed = output<void>();\n\n /**\n * Progress state for loader animation\n */\n progress = signal<number>(0);\n\n /**\n * Active state for animation\n */\n isActive = signal<boolean>(false);\n\n constructor() {\n // Watch for type and position changes to update styles\n effect(() => {\n this.type();\n this.position();\n });\n }\n\n toastStyles = computed(() => {\n if (!this.curaApi) return {};\n\n const colors = [\n { name: '--neutral-purewhite', theme: 'neutral-purewhite' },\n { name: '--neutral-base', theme: 'neutral-base', opacity: 0.2 },\n { name: '--primary-base', theme: 'primary-base' },\n { name: '--color-base', theme: `${this.type()}-base` },\n ];\n\n const styles: { [key: string]: string } = {};\n\n colors.forEach((color) => {\n if (color.opacity !== undefined) {\n styles[color.name] = this.curaApi.theme.colors.getColor(color.theme, color.opacity);\n } else {\n styles[color.name] = this.curaApi.theme.colors.getColor(color.theme);\n }\n });\n\n return styles;\n });\n\n containerClasses = computed(() => {\n const [firstPosition, secondPosition] = this.position().split('-');\n const classes: { [key: string]: boolean } = {\n container: true,\n };\n\n if (firstPosition) classes[firstPosition] = true;\n if (secondPosition) classes[secondPosition] = true;\n if (this.loader()) classes['loader'] = true;\n if (this.isActive()) classes['active'] = true;\n\n return classes;\n });\n\n iconName = computed(() => {\n const iconMapping: { [key in ToastType]: string } = {\n info: 'infoCircle',\n success: 'checkCircle',\n warning: 'alertCircle',\n error: 'alertTriangle',\n };\n return this.icon() || iconMapping[this.type()];\n });\n\n ngOnInit(): void {\n // Activate animation after a small delay to ensure DOM is ready\n setTimeout(() => {\n this.openContainer();\n this.startAnimation();\n }, 10);\n }\n\n ngOnDestroy(): void {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n }\n\n /**\n * Opens the toast container with animation\n */\n openContainer(): void {\n this.isActive.set(true);\n }\n\n /**\n * Closes the toast container with animation\n */\n closeContainer(): void {\n this.isActive.set(false);\n\n setTimeout(() => {\n this.toastClosed.emit();\n // Remove element from DOM\n const element = this.elementRef.nativeElement;\n if (element && element.parentNode) {\n element.parentNode.removeChild(element);\n }\n }, 500);\n }\n\n /**\n * Public method to close toast\n */\n close(): void {\n this.closeContainer();\n }\n\n /**\n * Handle close button click\n */\n handleClose(): void {\n this.closeContainer();\n }\n\n /**\n * Starts the auto-close animation\n */\n private startAnimation(): void {\n const delay = this.autoCloseDelay();\n\n if (!delay) return;\n\n if (this.loader()) {\n this.progress.set(0);\n this.intervalId = setInterval(() => {\n const currentProgress = this.progress();\n if (currentProgress >= 100) {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n this.closeContainer();\n } else {\n this.progress.set(currentProgress + 1);\n }\n }, delay / 100);\n } else {\n this.intervalId = setInterval(() => {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n this.closeContainer();\n }, delay);\n }\n }\n}\n","<div [ngClass]=\"containerClasses()\" [ngStyle]=\"toastStyles()\">\n <cura-icon class=\"default-icon\" [name]=\"iconName()\" [size]=\"16\" [color]=\"type() + '-dark'\"></cura-icon>\n\n <div class=\"content\">\n <cura-heading [level]=\"4\" size=\"xsmall\" [color]=\"type() + '-dark'\" weight=\"bold\" marginBlock=\"0\">\n {{ label() }}\n </cura-heading>\n\n <cura-paragraph [color]=\"type() + '-darker'\" size=\"xsmall\" marginBlock=\"0\" lineHeight=\"133.33%\">\n <ng-content></ng-content>\n </cura-paragraph>\n\n <ng-content select=\"[slot=actions]\"></ng-content>\n </div>\n\n @if (closeButton()) {\n <cura-icon class=\"close-icon\" name=\"close\" [size]=\"16\" color=\"error-dark\" (click)=\"handleClose()\"></cura-icon>\n }\n\n @if (loader() && autoCloseDelay()) {\n <cura-loader-bar [color]=\"type() + '-base'\" [progress]=\"progress()\"></cura-loader-bar>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MAqBa,kBAAkB,CAAA;AAuD7B,IAAA,WAAA,GAAA;AAtDQ,QAAA,IAAA,CAAA,OAAO,GAAmB,MAAM,CAAC,cAAc,CAAC;AAChD,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAGvC;;AAEG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAY,MAAM,gDAAC;AAE/B;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAgB,WAAW,oDAAC;AAE5C;;AAEG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,EAAE,gDAAC;AAExB;;AAEG;AACH,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC;AAEzB;;AAEG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAU,IAAI,uDAAC;AAElC;;AAEG;AACH,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAU,IAAI,kDAAC;AAE7B;;AAEG;AACH,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAS,KAAK,0DAAC;AAErC;;AAEG;QACH,IAAA,CAAA,WAAW,GAAG,MAAM,EAAQ;AAE5B;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAS,CAAC,oDAAC;AAE5B;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAU,KAAK,oDAAC;AAUjC,QAAA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QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,WAAA,EAAA,OAAA,EAAA,aAAA,EAAA,YAAA,EAAA,cAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,sBAAsB,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAUpG,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAZ9B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EAAA,OAAA,EACb,CAAC,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,sBAAsB,CAAC,EAAA,IAAA,EAG1G;AACJ,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,WAAW,EAAE,QAAQ;AACrB,wBAAA,aAAa,EAAE,MAAM;AACrB,wBAAA,mBAAmB,EAAE,SAAS;AAC/B,qBAAA,EAAA,QAAA,EAAA,m5BAAA,EAAA,MAAA,EAAA,CAAA,whDAAA,CAAA,EAAA;;;AEnBH;;AAEG;;;;"}
|
|
@@ -219,16 +219,16 @@ class CuraCheckboxComponent {
|
|
|
219
219
|
indeterminate: false,
|
|
220
220
|
});
|
|
221
221
|
}
|
|
222
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
223
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
222
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CuraCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
223
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: CuraCheckboxComponent, isStandalone: true, selector: "cura-checkbox", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ontabindex: { classPropertyName: "ontabindex", publicName: "ontabindex", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, background: { classPropertyName: "background", publicName: "background", isSignal: true, isRequired: false, transformFunction: null }, iconColor: { classPropertyName: "iconColor", publicName: "iconColor", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, overflowLabel: { classPropertyName: "overflowLabel", publicName: "overflowLabel", isSignal: true, isRequired: false, transformFunction: null }, overflowHelper: { classPropertyName: "overflowHelper", publicName: "overflowHelper", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", indeterminate: "indeterminateChange", value: "valueChange", onchange: "onchange" }, host: { attributes: { "role": "checkbox" }, properties: { "attr.aria-checked": "checked()", "attr.aria-disabled": "disabled()", "attr.aria-required": "required()", "attr.aria-invalid": "status() === \"error\"" } }, providers: [
|
|
224
224
|
{
|
|
225
225
|
provide: NG_VALUE_ACCESSOR,
|
|
226
226
|
useExisting: forwardRef(() => CuraCheckboxComponent),
|
|
227
227
|
multi: true,
|
|
228
228
|
},
|
|
229
|
-
], ngImport: i0, template: "<div [class]=\"containerClasses()\" [style]=\"styles()\" (click)=\"handleClick()\">\
|
|
229
|
+
], ngImport: i0, template: "<div [class]=\"containerClasses()\" [style]=\"styles()\" (click)=\"handleClick()\">\n <div class=\"info\">\n <div class=\"label-wrapper\">\n <cura-label [textOverflow]=\"overflowLabel()\" [class]=\"labelClasses()\" weight=\"bold\" [size]=\"labelSize()\" [color]=\"labelColor()\">\n {{ label() }}\n </cura-label>\n\n @if (required()) {\n <cura-paragraph lineHeight=\"0%\" marginBlock=\"0\" color=\"error-base\"> * </cura-paragraph>\n }\n </div>\n\n <cura-label [textOverflow]=\"overflowHelper()\" [color]=\"messageColor()\" size=\"xsmall\" [class]=\"messageClasses()\">\n <ng-content></ng-content>\n </cura-label>\n </div>\n\n <div class=\"checkbox\" [tabIndex]=\"ontabindex()\">\n <input\n type=\"checkbox\"\n [name]=\"name()\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n [required]=\"required()\"\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate()\"\n (keydown.space)=\"handleClick()\"\n (keydown.enter)=\"handleClick()\"\n />\n\n @if (checked() || indeterminate()) {\n <cura-icon class=\"icon\" [name]=\"iconName()\" [size]=\"iconSizeValue()\" [color]=\"iconColorValue()\"> </cura-icon>\n }\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block;box-sizing:border-box;min-width:0}.container{display:flex;align-items:center;flex-direction:row-reverse;justify-content:start;gap:var(--gap);cursor:pointer}.position.container{flex-direction:row}.position .label-wrapper{justify-content:end}.position .message{text-align:right}.position .label{order:1}.info{display:flex;flex-direction:column;overflow:hidden}.label-wrapper{display:flex;justify-content:start;align-items:center;gap:5px}.control{width:fit-content;cursor:pointer;position:relative}.checkbox{appearance:none;border:2px solid var(--neutral-base-neutral-medium);border-radius:4px;background:var(--neutral-black-neutral-purewhite);flex:1 0;display:flex;align-items:center;justify-content:center;position:relative;cursor:pointer;box-sizing:border-box;width:var(--size);height:var(--size);flex:0 0 var(--size)}.icon{position:absolute;display:flex;opacity:0;transition:opacity .3s}.checkbox:focus{border-color:var(--info-base)!important}.disabled .checkbox{background:var(--neutral-black-neutral-white);border-color:var(--neutral-darker-neutral-base);cursor:not-allowed}.disabled .checkbox:hover{border-color:var(--neutral-darker-neutral-base)!important}.disabled.checked .checkbox,.disabled.indeterminate .checkbox{background:var(--neutral-black-neutral-white);border-color:var(--neutral-darker-neutral-base)}.disabled.checked .checkbox:hover,.disabled.indeterminate .checkbox:hover{border-color:var(--neutral-base-neutral-white);background:var(--primary-base-neutral-white)}.disabled .checkbox:focus{border-color:var(--neutral-darker-neutral-base)!important}.checked .checkbox{border-color:var(--color-dark);background:var(--color-base)}.checked .checkbox:hover{border-color:var(--color-base)!important;background:var(--color-light)}.indeterminate .checkbox{border-color:var(--color-base);background:var(--color-light)}.indeterminate .checkbox:hover{border-color:var(--color-dark)!important;background:var(--color-base)}.checked .icon,.indeterminate .icon{opacity:1}:not(.disabled):not(.checked):not(.indeterminate) .checkbox:hover{border-color:var(--neutral-purewhite-neutral-dark)}.success.dark .checkbox{background:var(--neutral-black)}.success .checkbox{border-color:var(--success-base);background:var(--success-lighter)}.success .checkbox:hover{border-color:var(--success-base)!important}.success.checked .checkbox{border-color:var(--success-dark-base);background:var(--success-base-lighter)}.success.checked .checkbox:hover{border-color:var(--success-dark-base)}.error.dark .checkbox{background:var(--neutral-black)}.error .checkbox{border-color:var(--error-base);background:var(--error-lighter)}.error .checkbox:hover{border-color:var(--error-base)!important}.error.checked .checkbox{border-color:var(--error-dark-base);background:var(--error-base-lighter)}.error.checked .checkbox:hover{border-color:var(--error-dark-base)}.label.textoverflow-single,.message.textoverflow-single{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;max-width:100%}input{appearance:none;-webkit-appearance:none;-moz-appearance:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: CuraLabelComponent, selector: "cura-label", inputs: ["size", "weight", "spotColor", "color", "marginBlock", "lineHeight", "textOverflow"] }, { kind: "component", type: CuraParagraphComponent, selector: "cura-paragraph", inputs: ["size", "spotColor", "color", "marginBlock", "lineHeight", "textOverflow"] }, { kind: "component", type: CuraIconComponent, selector: "cura-icon", inputs: ["name", "color", "size", "iconset", "disabled"] }] }); }
|
|
230
230
|
}
|
|
231
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
231
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CuraCheckboxComponent, decorators: [{
|
|
232
232
|
type: Component,
|
|
233
233
|
args: [{ selector: 'cura-checkbox', imports: [CommonModule, CuraLabelComponent, CuraParagraphComponent, CuraIconComponent], host: {
|
|
234
234
|
role: 'checkbox',
|
|
@@ -242,7 +242,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
242
242
|
useExisting: forwardRef(() => CuraCheckboxComponent),
|
|
243
243
|
multi: true,
|
|
244
244
|
},
|
|
245
|
-
], template: "<div [class]=\"containerClasses()\" [style]=\"styles()\" (click)=\"handleClick()\">\
|
|
245
|
+
], template: "<div [class]=\"containerClasses()\" [style]=\"styles()\" (click)=\"handleClick()\">\n <div class=\"info\">\n <div class=\"label-wrapper\">\n <cura-label [textOverflow]=\"overflowLabel()\" [class]=\"labelClasses()\" weight=\"bold\" [size]=\"labelSize()\" [color]=\"labelColor()\">\n {{ label() }}\n </cura-label>\n\n @if (required()) {\n <cura-paragraph lineHeight=\"0%\" marginBlock=\"0\" color=\"error-base\"> * </cura-paragraph>\n }\n </div>\n\n <cura-label [textOverflow]=\"overflowHelper()\" [color]=\"messageColor()\" size=\"xsmall\" [class]=\"messageClasses()\">\n <ng-content></ng-content>\n </cura-label>\n </div>\n\n <div class=\"checkbox\" [tabIndex]=\"ontabindex()\">\n <input\n type=\"checkbox\"\n [name]=\"name()\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n [required]=\"required()\"\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate()\"\n (keydown.space)=\"handleClick()\"\n (keydown.enter)=\"handleClick()\"\n />\n\n @if (checked() || indeterminate()) {\n <cura-icon class=\"icon\" [name]=\"iconName()\" [size]=\"iconSizeValue()\" [color]=\"iconColorValue()\"> </cura-icon>\n }\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block;box-sizing:border-box;min-width:0}.container{display:flex;align-items:center;flex-direction:row-reverse;justify-content:start;gap:var(--gap);cursor:pointer}.position.container{flex-direction:row}.position .label-wrapper{justify-content:end}.position .message{text-align:right}.position .label{order:1}.info{display:flex;flex-direction:column;overflow:hidden}.label-wrapper{display:flex;justify-content:start;align-items:center;gap:5px}.control{width:fit-content;cursor:pointer;position:relative}.checkbox{appearance:none;border:2px solid var(--neutral-base-neutral-medium);border-radius:4px;background:var(--neutral-black-neutral-purewhite);flex:1 0;display:flex;align-items:center;justify-content:center;position:relative;cursor:pointer;box-sizing:border-box;width:var(--size);height:var(--size);flex:0 0 var(--size)}.icon{position:absolute;display:flex;opacity:0;transition:opacity .3s}.checkbox:focus{border-color:var(--info-base)!important}.disabled .checkbox{background:var(--neutral-black-neutral-white);border-color:var(--neutral-darker-neutral-base);cursor:not-allowed}.disabled .checkbox:hover{border-color:var(--neutral-darker-neutral-base)!important}.disabled.checked .checkbox,.disabled.indeterminate .checkbox{background:var(--neutral-black-neutral-white);border-color:var(--neutral-darker-neutral-base)}.disabled.checked .checkbox:hover,.disabled.indeterminate .checkbox:hover{border-color:var(--neutral-base-neutral-white);background:var(--primary-base-neutral-white)}.disabled .checkbox:focus{border-color:var(--neutral-darker-neutral-base)!important}.checked .checkbox{border-color:var(--color-dark);background:var(--color-base)}.checked .checkbox:hover{border-color:var(--color-base)!important;background:var(--color-light)}.indeterminate .checkbox{border-color:var(--color-base);background:var(--color-light)}.indeterminate .checkbox:hover{border-color:var(--color-dark)!important;background:var(--color-base)}.checked .icon,.indeterminate .icon{opacity:1}:not(.disabled):not(.checked):not(.indeterminate) .checkbox:hover{border-color:var(--neutral-purewhite-neutral-dark)}.success.dark .checkbox{background:var(--neutral-black)}.success .checkbox{border-color:var(--success-base);background:var(--success-lighter)}.success .checkbox:hover{border-color:var(--success-base)!important}.success.checked .checkbox{border-color:var(--success-dark-base);background:var(--success-base-lighter)}.success.checked .checkbox:hover{border-color:var(--success-dark-base)}.error.dark .checkbox{background:var(--neutral-black)}.error .checkbox{border-color:var(--error-base);background:var(--error-lighter)}.error .checkbox:hover{border-color:var(--error-base)!important}.error.checked .checkbox{border-color:var(--error-dark-base);background:var(--error-base-lighter)}.error.checked .checkbox:hover{border-color:var(--error-dark-base)}.label.textoverflow-single,.message.textoverflow-single{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;max-width:100%}input{appearance:none;-webkit-appearance:none;-moz-appearance:none}\n"] }]
|
|
246
246
|
}], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }, { type: i0.Output, args: ["indeterminateChange"] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ontabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "ontabindex", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], background: [{ type: i0.Input, args: [{ isSignal: true, alias: "background", required: false }] }], iconColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconColor", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], overflowLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "overflowLabel", required: false }] }], overflowHelper: [{ type: i0.Input, args: [{ isSignal: true, alias: "overflowHelper", required: false }] }], onchange: [{ type: i0.Output, args: ["onchange"] }] } });
|
|
247
247
|
|
|
248
248
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rededor-site-front-end-lib-cura-forms-cura-checkbox.mjs","sources":["../../../projects/site-front-end-lib/cura/forms/cura-checkbox/cura-checkbox.component.ts","../../../projects/site-front-end-lib/cura/forms/cura-checkbox/cura-checkbox.component.html","../../../projects/site-front-end-lib/cura/forms/cura-checkbox/rededor-site-front-end-lib-cura-forms-cura-checkbox.ts"],"sourcesContent":["import { Component, input, output, inject, computed, forwardRef, model } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\r\nimport { CuraLabelComponent } from '@rededor/site-front-end-lib/cura/forms/cura-label';\r\nimport { CuraParagraphComponent } from '@rededor/site-front-end-lib/cura/texts/cura-paragraph';\r\nimport { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';\r\nimport { formsSizes, TextOverflow } from '@rededor/site-front-end-lib/cura/forms';\r\nimport { CheckboxSize, CheckboxPosition, CheckboxBackground, CheckboxIconColor, CheckboxStatus, CheckboxChangeEvent } from './cura-checkbox.definitions';\r\n\r\n@Component({\r\n selector: 'cura-checkbox',\r\n imports: [CommonModule, CuraLabelComponent, CuraParagraphComponent, CuraIconComponent],\r\n templateUrl: './cura-checkbox.component.html',\r\n styleUrls: ['./cura-checkbox.component.scss'],\r\n host: {\r\n role: 'checkbox',\r\n '[attr.aria-checked]': 'checked()',\r\n '[attr.aria-disabled]': 'disabled()',\r\n '[attr.aria-required]': 'required()',\r\n '[attr.aria-invalid]': 'status() === \"error\"',\r\n },\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => CuraCheckboxComponent),\r\n multi: true,\r\n },\r\n ],\r\n})\r\nexport class CuraCheckboxComponent implements ControlValueAccessor {\r\n private curaApi: CuraApiService = inject(CuraApiService);\r\n\r\n /**\r\n * Reflects the checked state of the checkbox.\r\n * Using model for two-way binding and form control integration.\r\n */\r\n checked = model<boolean>(false);\r\n\r\n /**\r\n * Reflects the indeterminate state of the checkbox.\r\n * Using model for two-way binding and form control integration.\r\n */\r\n indeterminate = model<boolean>(false);\r\n\r\n /**\r\n * Status of the checkbox.\r\n */\r\n status = input<CheckboxStatus>('default');\r\n\r\n /**\r\n * Reflects the disabled state of the checkbox.\r\n */\r\n disabled = input<boolean>(false);\r\n\r\n /**\r\n * Reflects the required state of the checkbox.\r\n */\r\n required = input<boolean>(false);\r\n\r\n /**\r\n * Text label associated with the checkbox.\r\n */\r\n label = input<string>('');\r\n\r\n /**\r\n * Specifies the tabindex of the checkbox.\r\n */\r\n ontabindex = input<number>(0);\r\n\r\n /**\r\n * Position of the label relative to the checkbox.\r\n */\r\n position = input<CheckboxPosition>('left');\r\n\r\n /**\r\n * Value associated with the checkbox.\r\n */\r\n value = model<string | any>('');\r\n\r\n /**\r\n * Name attribute of the checkbox.\r\n */\r\n name = input<string>('');\r\n\r\n /**\r\n * Size of the checkbox.\r\n */\r\n size = input<CheckboxSize>('medium');\r\n\r\n /**\r\n * Background theme of the checkbox.\r\n */\r\n background = input<CheckboxBackground>('light');\r\n\r\n /**\r\n * Icon color theme of the checkbox.\r\n */\r\n iconColor = input<CheckboxIconColor>('dark');\r\n\r\n /**\r\n * Color theme of the checkbox.\r\n */\r\n color = input<string>('accent');\r\n\r\n /**\r\n * Controls how the label text should handle overflow.\r\n * - `'none'`: No overflow handling; the label displays normally.\r\n * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.\r\n * - `string`: Custom overflow handling mode.\r\n *\r\n * @default 'none'\r\n */\r\n overflowLabel = input<TextOverflow>('none');\r\n\r\n /**\r\n * Controls how the helper text should handle overflow.\r\n * - `'none'`: No overflow handling; the label displays normally.\r\n * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.\r\n * - `string`: Custom overflow handling mode.\r\n *\r\n * @default 'none'\r\n */\r\n overflowHelper = input<TextOverflow>('none');\r\n\r\n /**\r\n * Change event emitter\r\n */\r\n onchange = output<CheckboxChangeEvent>();\r\n\r\n // Form control callbacks\r\n private onChange = (value: boolean) => {};\r\n private onTouched = () => {};\r\n\r\n styles = computed(() => {\r\n const formsSize = formsSizes[this.size()];\r\n\r\n const sizeStyles = {\r\n '--size': `${formsSize.size}px`,\r\n '--gap': `${formsSize.gap}px`,\r\n };\r\n\r\n const isDark = this.isDarkBackground();\r\n const colorPrefix = this.color();\r\n\r\n const colors = [\r\n { name: '--color-base', background: `${colorPrefix}-base` },\r\n { name: '--color-lighter', background: `${colorPrefix}-lighter` },\r\n { name: '--color-light', background: `${colorPrefix}-light` },\r\n { name: '--color-dark', background: `${colorPrefix}-dark` },\r\n { name: '--info-base', background: 'info-base' },\r\n { name: '--error-base', background: 'error-base' },\r\n { name: '--success-lighter', background: 'success-lighter' },\r\n { name: '--success-base', background: 'success-base' },\r\n { name: '--success-dark', background: 'success-dark' },\r\n { name: '--error-lighter', background: 'error-lighter' },\r\n { name: '--neutral-black', background: 'neutral-black' },\r\n { name: '--primary-base-neutral-white', background: isDark ? 'primary-base' : 'neutral-white' },\r\n { name: '--neutral-base-neutral-medium', background: isDark ? 'neutral-base' : 'neutral-medium' },\r\n { name: '--neutral-black-neutral-purewhite', background: isDark ? 'neutral-black' : 'neutral-purewhite' },\r\n { name: '--neutral-black-neutral-white', background: isDark ? 'neutral-black' : 'neutral-white' },\r\n { name: '--neutral-darker-neutral-base', background: isDark ? 'neutral-darker' : 'neutral-base' },\r\n { name: '--neutral-base-neutral-base', background: isDark ? 'primary-base' : 'neutral-base' },\r\n { name: '--neutral-purewhite-neutral-dark', background: isDark ? 'neutral-purewhite' : 'neutral-dark' },\r\n { name: '--primary-base-neutral-medium', background: isDark ? 'primary-base' : 'neutral-medium' },\r\n { name: '--success-base-lighter', background: isDark ? 'success-base' : 'success-lighter' },\r\n { name: '--success-dark-base', background: isDark ? 'success-dark' : 'success-base' },\r\n { name: '--error-base-lighter', background: isDark ? 'error-base' : 'error-lighter' },\r\n { name: '--error-dark-base', background: isDark ? 'error-dark' : 'error-base' },\r\n ];\r\n\r\n const colorStyles: { [key: string]: string } = {};\r\n colors.forEach((color) => {\r\n if (this.curaApi) {\r\n colorStyles[color.name] = this.curaApi.theme.colors.getColor(color.background);\r\n }\r\n });\r\n\r\n return { ...sizeStyles, ...colorStyles };\r\n });\r\n\r\n private colorConfig = computed(() => {\r\n if (this.disabled()) {\r\n return {\r\n icon: 'neutral-dark',\r\n label: 'neutral-dark',\r\n message: 'neutral-dark',\r\n };\r\n }\r\n\r\n const darkBackground = this.isDarkBackground();\r\n const darkIconColor = this.isDarkIconColor();\r\n\r\n const statusColors = {\r\n success: {\r\n icon: 'success-dark',\r\n label: darkBackground ? 'success-lighter' : 'success-darker',\r\n message: darkBackground ? 'success-base' : 'success-dark',\r\n },\r\n error: {\r\n icon: 'error-dark',\r\n label: darkBackground ? 'error-lighter' : 'neutral-darker',\r\n message: darkBackground ? 'error-base' : 'error-dark',\r\n },\r\n default: {\r\n icon: darkIconColor ? 'neutral-black' : 'neutral-purewhite',\r\n label: darkBackground ? 'neutral-white' : 'neutral-black',\r\n message: darkBackground ? 'primary-lighter' : 'neutral-dark',\r\n },\r\n };\r\n\r\n return statusColors[this.status()];\r\n });\r\n\r\n iconName = computed(() => (this.indeterminate() ? 'minus' : 'check'));\r\n iconSizeValue = computed(() => (this.size() === 'large' ? 20 : 'micro'));\r\n iconColorValue = computed(() => this.colorConfig().icon);\r\n\r\n labelSize = computed(() => (this.size() === 'large' ? 'medium' : 'xsmall'));\r\n labelClasses = computed(() => 'label' + (this.overflowLabel() === 'single' ? ' textoverflow-single' : ''));\r\n labelColor = computed(() => this.colorConfig().label);\r\n\r\n messageClasses = computed(() => 'message' + (this.overflowHelper() === 'single' ? ' textoverflow-single' : ''));\r\n messageColor = computed(() => this.colorConfig().message);\r\n\r\n // ControlValueAccessor implementation\r\n writeValue(value: boolean): void {\r\n this.checked.set(value ?? false);\r\n }\r\n\r\n registerOnChange(fn: (value: boolean) => void): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: () => void): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n private isDarkBackground(): boolean {\r\n return this.background() === 'dark';\r\n }\r\n\r\n private isDarkIconColor(): boolean {\r\n return this.iconColor() === 'dark';\r\n }\r\n\r\n containerClasses = computed(() => {\r\n const classes = ['container'];\r\n\r\n if (this.checked()) classes.push('checked');\r\n if (this.disabled()) classes.push('disabled');\r\n if (this.background() === 'dark') classes.push('dark');\r\n if (this.indeterminate()) classes.push('indeterminate');\r\n if (this.position() === 'right') classes.push('position');\r\n classes.push(this.status());\r\n\r\n return classes.join(' ');\r\n });\r\n\r\n handleClick(): void {\r\n if (this.disabled()) return;\r\n\r\n this.indeterminate.set(false);\r\n\r\n const newCheckedState = !this.checked();\r\n this.checked.set(newCheckedState);\r\n\r\n // Notify form control\r\n this.onChange(newCheckedState);\r\n this.onTouched();\r\n\r\n this.onchange.emit({\r\n value: this.value(),\r\n checked: newCheckedState,\r\n indeterminate: false,\r\n });\r\n }\r\n}\r\n","<div [class]=\"containerClasses()\" [style]=\"styles()\" (click)=\"handleClick()\">\r\n <div class=\"info\">\r\n <div class=\"label-wrapper\">\r\n <cura-label [textOverflow]=\"overflowLabel()\" [class]=\"labelClasses()\" weight=\"bold\" [size]=\"labelSize()\" [color]=\"labelColor()\">\r\n {{ label() }}\r\n </cura-label>\r\n\r\n @if (required()) {\r\n <cura-paragraph lineHeight=\"0%\" marginBlock=\"0\" color=\"error-base\"> * </cura-paragraph>\r\n }\r\n </div>\r\n\r\n <cura-label [textOverflow]=\"overflowHelper()\" [color]=\"messageColor()\" size=\"xsmall\" [class]=\"messageClasses()\">\r\n <ng-content></ng-content>\r\n </cura-label>\r\n </div>\r\n\r\n <div class=\"checkbox\" [tabIndex]=\"ontabindex()\">\r\n <input\r\n type=\"checkbox\"\r\n [name]=\"name()\"\r\n [value]=\"value()\"\r\n [disabled]=\"disabled()\"\r\n [required]=\"required()\"\r\n [checked]=\"checked()\"\r\n [indeterminate]=\"indeterminate()\"\r\n (keydown.space)=\"handleClick()\"\r\n (keydown.enter)=\"handleClick()\"\r\n />\r\n\r\n @if (checked() || indeterminate()) {\r\n <cura-icon class=\"icon\" [name]=\"iconName()\" [size]=\"iconSizeValue()\" [color]=\"iconColorValue()\"> </cura-icon>\r\n }\r\n </div>\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MA8Ba,qBAAqB,CAAA;AApBlC,IAAA,WAAA,GAAA;AAqBU,QAAA,IAAA,CAAA,OAAO,GAAmB,MAAM,CAAC,cAAc,CAAC;AAExD;;;AAGG;AACH,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAU,KAAK,mDAAC;AAE/B;;;AAGG;AACH,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAU,KAAK,yDAAC;AAErC;;AAEG;AACH,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAiB,SAAS,kDAAC;AAEzC;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,oDAAC;AAEhC;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,oDAAC;AAEhC;;AAEG;AACH,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC;AAEzB;;AAEG;AACH,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAS,CAAC,sDAAC;A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,EAAA,QAAA,EAAA,WAAA,EAAA,OAAA,EAAA,aAAA,EAAA,YAAA,EAAA,cAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,sBAAsB,gJAAE,iBAAiB,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,EAAA,MAAA,EAAA,SAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAkB1E,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBApBjC,SAAS;+BACE,eAAe,EAAA,OAAA,EAChB,CAAC,YAAY,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,iBAAiB,CAAC,EAAA,IAAA,EAGhF;AACJ,wBAAA,IAAI,EAAE,UAAU;AAChB,wBAAA,qBAAqB,EAAE,WAAW;AAClC,wBAAA,sBAAsB,EAAE,YAAY;AACpC,wBAAA,sBAAsB,EAAE,YAAY;AACpC,wBAAA,qBAAqB,EAAE,sBAAsB;qBAC9C,EAAA,SAAA,EACU;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,2BAA2B,CAAC;AACpD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,uyCAAA,EAAA,MAAA,EAAA,CAAA,mhGAAA,CAAA,EAAA;;;AE5BH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"rededor-site-front-end-lib-cura-forms-cura-checkbox.mjs","sources":["../../../projects/site-front-end-lib/cura/forms/cura-checkbox/cura-checkbox.component.ts","../../../projects/site-front-end-lib/cura/forms/cura-checkbox/cura-checkbox.component.html","../../../projects/site-front-end-lib/cura/forms/cura-checkbox/rededor-site-front-end-lib-cura-forms-cura-checkbox.ts"],"sourcesContent":["import { Component, input, output, inject, computed, forwardRef, model } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\nimport { CuraLabelComponent } from '@rededor/site-front-end-lib/cura/forms/cura-label';\nimport { CuraParagraphComponent } from '@rededor/site-front-end-lib/cura/texts/cura-paragraph';\nimport { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';\nimport { formsSizes, TextOverflow } from '@rededor/site-front-end-lib/cura/forms';\nimport { CheckboxSize, CheckboxPosition, CheckboxBackground, CheckboxIconColor, CheckboxStatus, CheckboxChangeEvent } from './cura-checkbox.definitions';\n\n@Component({\n selector: 'cura-checkbox',\n imports: [CommonModule, CuraLabelComponent, CuraParagraphComponent, CuraIconComponent],\n templateUrl: './cura-checkbox.component.html',\n styleUrls: ['./cura-checkbox.component.scss'],\n host: {\n role: 'checkbox',\n '[attr.aria-checked]': 'checked()',\n '[attr.aria-disabled]': 'disabled()',\n '[attr.aria-required]': 'required()',\n '[attr.aria-invalid]': 'status() === \"error\"',\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CuraCheckboxComponent),\n multi: true,\n },\n ],\n})\nexport class CuraCheckboxComponent implements ControlValueAccessor {\n private curaApi: CuraApiService = inject(CuraApiService);\n\n /**\n * Reflects the checked state of the checkbox.\n * Using model for two-way binding and form control integration.\n */\n checked = model<boolean>(false);\n\n /**\n * Reflects the indeterminate state of the checkbox.\n * Using model for two-way binding and form control integration.\n */\n indeterminate = model<boolean>(false);\n\n /**\n * Status of the checkbox.\n */\n status = input<CheckboxStatus>('default');\n\n /**\n * Reflects the disabled state of the checkbox.\n */\n disabled = input<boolean>(false);\n\n /**\n * Reflects the required state of the checkbox.\n */\n required = input<boolean>(false);\n\n /**\n * Text label associated with the checkbox.\n */\n label = input<string>('');\n\n /**\n * Specifies the tabindex of the checkbox.\n */\n ontabindex = input<number>(0);\n\n /**\n * Position of the label relative to the checkbox.\n */\n position = input<CheckboxPosition>('left');\n\n /**\n * Value associated with the checkbox.\n */\n value = model<string | any>('');\n\n /**\n * Name attribute of the checkbox.\n */\n name = input<string>('');\n\n /**\n * Size of the checkbox.\n */\n size = input<CheckboxSize>('medium');\n\n /**\n * Background theme of the checkbox.\n */\n background = input<CheckboxBackground>('light');\n\n /**\n * Icon color theme of the checkbox.\n */\n iconColor = input<CheckboxIconColor>('dark');\n\n /**\n * Color theme of the checkbox.\n */\n color = input<string>('accent');\n\n /**\n * Controls how the label text should handle overflow.\n * - `'none'`: No overflow handling; the label displays normally.\n * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.\n * - `string`: Custom overflow handling mode.\n *\n * @default 'none'\n */\n overflowLabel = input<TextOverflow>('none');\n\n /**\n * Controls how the helper text should handle overflow.\n * - `'none'`: No overflow handling; the label displays normally.\n * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.\n * - `string`: Custom overflow handling mode.\n *\n * @default 'none'\n */\n overflowHelper = input<TextOverflow>('none');\n\n /**\n * Change event emitter\n */\n onchange = output<CheckboxChangeEvent>();\n\n // Form control callbacks\n private onChange = (value: boolean) => {};\n private onTouched = () => {};\n\n styles = computed(() => {\n const formsSize = formsSizes[this.size()];\n\n const sizeStyles = {\n '--size': `${formsSize.size}px`,\n '--gap': `${formsSize.gap}px`,\n };\n\n const isDark = this.isDarkBackground();\n const colorPrefix = this.color();\n\n const colors = [\n { name: '--color-base', background: `${colorPrefix}-base` },\n { name: '--color-lighter', background: `${colorPrefix}-lighter` },\n { name: '--color-light', background: `${colorPrefix}-light` },\n { name: '--color-dark', background: `${colorPrefix}-dark` },\n { name: '--info-base', background: 'info-base' },\n { name: '--error-base', background: 'error-base' },\n { name: '--success-lighter', background: 'success-lighter' },\n { name: '--success-base', background: 'success-base' },\n { name: '--success-dark', background: 'success-dark' },\n { name: '--error-lighter', background: 'error-lighter' },\n { name: '--neutral-black', background: 'neutral-black' },\n { name: '--primary-base-neutral-white', background: isDark ? 'primary-base' : 'neutral-white' },\n { name: '--neutral-base-neutral-medium', background: isDark ? 'neutral-base' : 'neutral-medium' },\n { name: '--neutral-black-neutral-purewhite', background: isDark ? 'neutral-black' : 'neutral-purewhite' },\n { name: '--neutral-black-neutral-white', background: isDark ? 'neutral-black' : 'neutral-white' },\n { name: '--neutral-darker-neutral-base', background: isDark ? 'neutral-darker' : 'neutral-base' },\n { name: '--neutral-base-neutral-base', background: isDark ? 'primary-base' : 'neutral-base' },\n { name: '--neutral-purewhite-neutral-dark', background: isDark ? 'neutral-purewhite' : 'neutral-dark' },\n { name: '--primary-base-neutral-medium', background: isDark ? 'primary-base' : 'neutral-medium' },\n { name: '--success-base-lighter', background: isDark ? 'success-base' : 'success-lighter' },\n { name: '--success-dark-base', background: isDark ? 'success-dark' : 'success-base' },\n { name: '--error-base-lighter', background: isDark ? 'error-base' : 'error-lighter' },\n { name: '--error-dark-base', background: isDark ? 'error-dark' : 'error-base' },\n ];\n\n const colorStyles: { [key: string]: string } = {};\n colors.forEach((color) => {\n if (this.curaApi) {\n colorStyles[color.name] = this.curaApi.theme.colors.getColor(color.background);\n }\n });\n\n return { ...sizeStyles, ...colorStyles };\n });\n\n private colorConfig = computed(() => {\n if (this.disabled()) {\n return {\n icon: 'neutral-dark',\n label: 'neutral-dark',\n message: 'neutral-dark',\n };\n }\n\n const darkBackground = this.isDarkBackground();\n const darkIconColor = this.isDarkIconColor();\n\n const statusColors = {\n success: {\n icon: 'success-dark',\n label: darkBackground ? 'success-lighter' : 'success-darker',\n message: darkBackground ? 'success-base' : 'success-dark',\n },\n error: {\n icon: 'error-dark',\n label: darkBackground ? 'error-lighter' : 'neutral-darker',\n message: darkBackground ? 'error-base' : 'error-dark',\n },\n default: {\n icon: darkIconColor ? 'neutral-black' : 'neutral-purewhite',\n label: darkBackground ? 'neutral-white' : 'neutral-black',\n message: darkBackground ? 'primary-lighter' : 'neutral-dark',\n },\n };\n\n return statusColors[this.status()];\n });\n\n iconName = computed(() => (this.indeterminate() ? 'minus' : 'check'));\n iconSizeValue = computed(() => (this.size() === 'large' ? 20 : 'micro'));\n iconColorValue = computed(() => this.colorConfig().icon);\n\n labelSize = computed(() => (this.size() === 'large' ? 'medium' : 'xsmall'));\n labelClasses = computed(() => 'label' + (this.overflowLabel() === 'single' ? ' textoverflow-single' : ''));\n labelColor = computed(() => this.colorConfig().label);\n\n messageClasses = computed(() => 'message' + (this.overflowHelper() === 'single' ? ' textoverflow-single' : ''));\n messageColor = computed(() => this.colorConfig().message);\n\n // ControlValueAccessor implementation\n writeValue(value: boolean): void {\n this.checked.set(value ?? false);\n }\n\n registerOnChange(fn: (value: boolean) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n private isDarkBackground(): boolean {\n return this.background() === 'dark';\n }\n\n private isDarkIconColor(): boolean {\n return this.iconColor() === 'dark';\n }\n\n containerClasses = computed(() => {\n const classes = ['container'];\n\n if (this.checked()) classes.push('checked');\n if (this.disabled()) classes.push('disabled');\n if (this.background() === 'dark') classes.push('dark');\n if (this.indeterminate()) classes.push('indeterminate');\n if (this.position() === 'right') classes.push('position');\n classes.push(this.status());\n\n return classes.join(' ');\n });\n\n handleClick(): void {\n if (this.disabled()) return;\n\n this.indeterminate.set(false);\n\n const newCheckedState = !this.checked();\n this.checked.set(newCheckedState);\n\n // Notify form control\n this.onChange(newCheckedState);\n this.onTouched();\n\n this.onchange.emit({\n value: this.value(),\n checked: newCheckedState,\n indeterminate: false,\n });\n }\n}\n","<div [class]=\"containerClasses()\" [style]=\"styles()\" (click)=\"handleClick()\">\n <div class=\"info\">\n <div class=\"label-wrapper\">\n <cura-label [textOverflow]=\"overflowLabel()\" [class]=\"labelClasses()\" weight=\"bold\" [size]=\"labelSize()\" [color]=\"labelColor()\">\n {{ label() }}\n </cura-label>\n\n @if (required()) {\n <cura-paragraph lineHeight=\"0%\" marginBlock=\"0\" color=\"error-base\"> * </cura-paragraph>\n }\n </div>\n\n <cura-label [textOverflow]=\"overflowHelper()\" [color]=\"messageColor()\" size=\"xsmall\" [class]=\"messageClasses()\">\n <ng-content></ng-content>\n </cura-label>\n </div>\n\n <div class=\"checkbox\" [tabIndex]=\"ontabindex()\">\n <input\n type=\"checkbox\"\n [name]=\"name()\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n [required]=\"required()\"\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate()\"\n (keydown.space)=\"handleClick()\"\n (keydown.enter)=\"handleClick()\"\n />\n\n @if (checked() || indeterminate()) {\n <cura-icon class=\"icon\" [name]=\"iconName()\" [size]=\"iconSizeValue()\" [color]=\"iconColorValue()\"> </cura-icon>\n }\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MA8Ba,qBAAqB,CAAA;AApBlC,IAAA,WAAA,GAAA;AAqBU,QAAA,IAAA,CAAA,OAAO,GAAmB,MAAM,CAAC,cAAc,CAAC;AAExD;;;AAGG;AACH,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAU,KAAK,mDAAC;AAE/B;;;AAGG;AACH,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAU,KAAK,yDAAC;AAErC;;AAEG;AACH,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAiB,SAAS,kDAAC;AAEzC;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,oDAAC;AAEhC;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,oDAAC;AAEhC;;AAEG;AACH,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC;AAEzB;;AAEG;AACH,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAS,CAAC,sDAAC;AAE7B;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAmB,MAAM,oDAAC;AAE1C;;AAEG;AACH,QAAA,IAAA,CAAA,KAAK,GAAG,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