@rededor/site-front-end-lib 20.0.12 → 20.0.13
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/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 +12 -12
- 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 +54 -54
- 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 +128 -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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rededor-site-front-end-lib-cura-buttons-cura-button-outline.mjs","sources":["../../../projects/site-front-end-lib/cura/buttons/cura-button-outline/cura-button-outline.component.ts","../../../projects/site-front-end-lib/cura/buttons/cura-button-outline/cura-button-outline.component.html","../../../projects/site-front-end-lib/cura/buttons/cura-button-outline/rededor-site-front-end-lib-cura-buttons-cura-button-outline.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\r\nimport { Component, input, output, HostListener, computed, inject } from '@angular/core';\r\nimport { labelSizes, ButtonType, ButtonSize, IconPosition, BackgroundType, FontColor, TextAlign } from '@rededor/site-front-end-lib/cura/buttons';\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 { CuraLoaderCircleComponent } from '@rededor/site-front-end-lib/cura/loaders/cura-loader-circle';\r\nimport { CuraLabelComponent } from '@rededor/site-front-end-lib/cura/forms/cura-label';\r\nimport { LabelSize } from '@rededor/site-front-end-lib/cura/forms';\r\n\r\n@Component({\r\n selector: 'cura-button-outline',\r\n imports: [CommonModule, CuraIconComponent, CuraLoaderCircleComponent, CuraLabelComponent],\r\n templateUrl: './cura-button-outline.component.html',\r\n styleUrls: ['./cura-button-outline.component.scss'],\r\n host: {\r\n '[attr.role]': 'href() ? \"link\" : type()',\r\n '[attr.aria-disabled]': 'disabled()',\r\n '[attr.href]': 'href()',\r\n },\r\n})\r\nexport class CuraButtonOutlineComponent {\r\n private curaApi: CuraApiService = inject(CuraApiService);\r\n\r\n /**\r\n * Button type: button (default) | submit | reset\r\n */\r\n type = input<ButtonType>('button');\r\n\r\n /**\r\n * Button size: small | medium | large (default)\r\n */\r\n size = input<ButtonSize>('large');\r\n\r\n /**\r\n * Disabled state. Boolean.\r\n */\r\n disabled = input<boolean>(false);\r\n\r\n /**\r\n * Loading state. Boolean.\r\n */\r\n isLoading = input<boolean>(false);\r\n\r\n /**\r\n * Name of the icon to be used from iconset.\r\n */\r\n iconName = input<string>('');\r\n\r\n /**\r\n * Custom iconset if needed.\r\n */\r\n iconset = input<string>('default');\r\n\r\n /**\r\n * Icon position: left (default) | right.\r\n */\r\n iconPosition = input<IconPosition>('left');\r\n\r\n /**\r\n * Set button to FAB/icon only.\r\n */\r\n iconOnly = input<boolean>(false);\r\n\r\n /**\r\n * Property href switch button to link.\r\n */\r\n href = input<string>('');\r\n\r\n /**\r\n * Set target if link.\r\n */\r\n target = input<string>('_self');\r\n\r\n /**\r\n * Color base from color scheme. Default: primary.\r\n */\r\n color = input<string>('primary');\r\n\r\n /**\r\n * Set the font background to dark or light.\r\n */\r\n background = input<BackgroundType>('light');\r\n\r\n /**\r\n * Set the font color to dark or light.\r\n */\r\n fontColor = input<FontColor>('dark');\r\n\r\n /**\r\n * Set text alignment for the button label.\r\n * Values: left (default) | center | right.\r\n */\r\n textAlign = input<TextAlign>('left');\r\n\r\n /**\r\n * Justify icons and label inside the button.\r\n * Values: false (default) | true.\r\n */\r\n justify = input<boolean>(false);\r\n\r\n /**\r\n * Accessible name for the button (aria-label).\r\n * Required for icon-only buttons or when button text is not descriptive enough.\r\n */\r\n ariaLabel = input<string>('');\r\n\r\n buttonClick = output<Event>();\r\n\r\n hovered = false;\r\n\r\n // Computed signal\r\n buttonStyles = computed(() => {\r\n const styles: { [key: string]: string } = {};\r\n\r\n styles['--base-spacing'] = this.curaApi.theme.spacing.getSpacing();\r\n styles['--neutral-white'] = this.curaApi.theme.colors.getColor('neutral-white');\r\n styles['--neutral-base'] = this.curaApi.theme.colors.getColor('neutral-base');\r\n styles['--neutral-dark'] = this.curaApi.theme.colors.getColor('neutral-dark');\r\n styles['--font-size'] = this.curaApi.theme.fonts.getSize();\r\n styles['--font-family'] = this.curaApi.theme.fonts.getFamily();\r\n const weights = this.curaApi.theme.fonts.getWeights();\r\n styles['--font-weight-medium'] = weights.medium;\r\n styles['--text-align'] = this.textAlign();\r\n\r\n const colorMappings = [\r\n { name: '--color-dark-neutral-purewhite', theme: this.background() === 'light' ? `${this.color()}-dark` : 'neutral-purewhite' },\r\n { name: '--color-lighter-color-darker', theme: this.background() === 'light' ? `${this.color()}-lighter` : `${this.color()}-darker` },\r\n { name: '--color-light-color-darker', theme: this.background() === 'light' ? `${this.color()}-light` : `${this.color()}-lighter` },\r\n { name: '--neutral-dark', theme: 'neutral-dark' },\r\n ];\r\n\r\n colorMappings.forEach((mapping) => {\r\n styles[mapping.name] = this.curaApi.theme.colors.getColor(mapping.theme);\r\n });\r\n\r\n return styles;\r\n });\r\n\r\n containerClasses = computed(() => {\r\n const classes = [];\r\n classes.push(this.size()?.toLowerCase());\r\n classes.push(`icon-${this.iconPosition()?.toLowerCase()}`);\r\n\r\n if (this.iconOnly()) classes.push('icon-only');\r\n if (this.disabled()) classes.push('disabled');\r\n if (this.isLoading()) classes.push('isLoading');\r\n if (this.justify()) classes.push('justify');\r\n\r\n return classes.join(' ');\r\n });\r\n\r\n iconSize = computed(() => {\r\n return this.size() === 'large' ? '20' : '16';\r\n });\r\n\r\n symbolColor = computed(() => {\r\n if (this.disabled()) return 'neutral-dark';\r\n return this.fontColor() === 'light' ? 'neutral-purewhite' : `${this.color()}-darker`;\r\n });\r\n\r\n labelSize = computed(() => {\r\n return (labelSizes[this.size()] || labelSizes['default']) as LabelSize;\r\n });\r\n\r\n @HostListener('mouseenter')\r\n handleMouseEnter() {\r\n if (this.disabled()) return;\r\n this.hovered = true;\r\n }\r\n\r\n @HostListener('mouseleave')\r\n handleMouseLeave() {\r\n this.hovered = false;\r\n }\r\n\r\n handleClick(event: Event) {\r\n if (this.disabled() || this.isLoading()) {\r\n event.preventDefault();\r\n return;\r\n }\r\n\r\n this.buttonClick.emit(event);\r\n }\r\n}\r\n","<ng-template #button>\r\n <ng-content></ng-content>\r\n</ng-template>\r\n\r\n@if (href()) {\r\n <a\r\n [href]=\"disabled() ? '' : href()\"\r\n [target]=\"target()\"\r\n [class]=\"containerClasses()\"\r\n [ngStyle]=\"buttonStyles()\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n (click)=\"handleClick($event)\"\r\n (mouseenter)=\"handleMouseEnter()\"\r\n (mouseleave)=\"handleMouseLeave()\"\r\n >\r\n <span class=\"button-container\">\r\n @if (iconName()) {\r\n <cura-icon [name]=\"iconName()\" [size]=\"iconSize()\" [color]=\"symbolColor()\" [iconset]=\"iconset()\" [disabled]=\"disabled()\"> </cura-icon>\r\n }\r\n <cura-label class=\"label\" [size]=\"labelSize()\" lineHeight=\"normal\" [color]=\"symbolColor()\">\r\n <ng-container *ngTemplateOutlet=\"button\"></ng-container>\r\n </cura-label>\r\n </span>\r\n <cura-loader-circle [size]=\"size()\" [color]=\"symbolColor()\"> </cura-loader-circle>\r\n </a>\r\n} @else {\r\n <button\r\n [type]=\"type()\"\r\n [class]=\"containerClasses()\"\r\n [ngStyle]=\"buttonStyles()\"\r\n [disabled]=\"disabled()\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n (click)=\"handleClick($event)\"\r\n (mouseenter)=\"handleMouseEnter()\"\r\n (mouseleave)=\"handleMouseLeave()\"\r\n >\r\n <span class=\"button-container\">\r\n @if (iconName()) {\r\n <cura-icon [name]=\"iconName()\" [size]=\"iconSize()\" [color]=\"symbolColor()\" [iconset]=\"iconset()\" [disabled]=\"disabled()\"> </cura-icon>\r\n }\r\n <cura-label class=\"label\" [size]=\"labelSize()\" lineHeight=\"normal\" [color]=\"symbolColor()\">\r\n <ng-container *ngTemplateOutlet=\"button\"></ng-container>\r\n </cura-label>\r\n </span>\r\n <cura-loader-circle [size]=\"size()\" [color]=\"symbolColor()\"> </cura-loader-circle>\r\n </button>\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MAoBa,0BAA0B,CAAA;AAXvC,IAAA,WAAA,GAAA;AAYU,QAAA,IAAA,CAAA,OAAO,GAAmB,MAAM,CAAC,cAAc,CAAC;AAExD;;AAEG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAa,QAAQ,gDAAC;AAElC;;AAEG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAa,OAAO,gDAAC;AAEjC;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KA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-front-end-lib-cura-buttons-cura-button-outline.mjs","sources":["../../../projects/site-front-end-lib/cura/buttons/cura-button-outline/cura-button-outline.component.ts","../../../projects/site-front-end-lib/cura/buttons/cura-button-outline/cura-button-outline.component.html","../../../projects/site-front-end-lib/cura/buttons/cura-button-outline/rededor-site-front-end-lib-cura-buttons-cura-button-outline.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, input, output, HostListener, computed, inject } from '@angular/core';\nimport { labelSizes, ButtonType, ButtonSize, IconPosition, BackgroundType, FontColor, TextAlign } from '@rededor/site-front-end-lib/cura/buttons';\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\nimport { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';\nimport { CuraLoaderCircleComponent } from '@rededor/site-front-end-lib/cura/loaders/cura-loader-circle';\nimport { CuraLabelComponent } from '@rededor/site-front-end-lib/cura/forms/cura-label';\nimport { LabelSize } from '@rededor/site-front-end-lib/cura/forms';\n\n@Component({\n selector: 'cura-button-outline',\n imports: [CommonModule, CuraIconComponent, CuraLoaderCircleComponent, CuraLabelComponent],\n templateUrl: './cura-button-outline.component.html',\n styleUrls: ['./cura-button-outline.component.scss'],\n host: {\n '[attr.role]': 'href() ? \"link\" : type()',\n '[attr.aria-disabled]': 'disabled()',\n '[attr.href]': 'href()',\n },\n})\nexport class CuraButtonOutlineComponent {\n private curaApi: CuraApiService = inject(CuraApiService);\n\n /**\n * Button type: button (default) | submit | reset\n */\n type = input<ButtonType>('button');\n\n /**\n * Button size: small | medium | large (default)\n */\n size = input<ButtonSize>('large');\n\n /**\n * Disabled state. Boolean.\n */\n disabled = input<boolean>(false);\n\n /**\n * Loading state. Boolean.\n */\n isLoading = input<boolean>(false);\n\n /**\n * Name of the icon to be used from iconset.\n */\n iconName = input<string>('');\n\n /**\n * Custom iconset if needed.\n */\n iconset = input<string>('default');\n\n /**\n * Icon position: left (default) | right.\n */\n iconPosition = input<IconPosition>('left');\n\n /**\n * Set button to FAB/icon only.\n */\n iconOnly = input<boolean>(false);\n\n /**\n * Property href switch button to link.\n */\n href = input<string>('');\n\n /**\n * Set target if link.\n */\n target = input<string>('_self');\n\n /**\n * Color base from color scheme. Default: primary.\n */\n color = input<string>('primary');\n\n /**\n * Set the font background to dark or light.\n */\n background = input<BackgroundType>('light');\n\n /**\n * Set the font color to dark or light.\n */\n fontColor = input<FontColor>('dark');\n\n /**\n * Set text alignment for the button label.\n * Values: left (default) | center | right.\n */\n textAlign = input<TextAlign>('left');\n\n /**\n * Justify icons and label inside the button.\n * Values: false (default) | true.\n */\n justify = input<boolean>(false);\n\n /**\n * Accessible name for the button (aria-label).\n * Required for icon-only buttons or when button text is not descriptive enough.\n */\n ariaLabel = input<string>('');\n\n buttonClick = output<Event>();\n\n hovered = false;\n\n // Computed signal\n buttonStyles = computed(() => {\n const styles: { [key: string]: string } = {};\n\n styles['--base-spacing'] = this.curaApi.theme.spacing.getSpacing();\n styles['--neutral-white'] = this.curaApi.theme.colors.getColor('neutral-white');\n styles['--neutral-base'] = this.curaApi.theme.colors.getColor('neutral-base');\n styles['--neutral-dark'] = this.curaApi.theme.colors.getColor('neutral-dark');\n styles['--font-size'] = this.curaApi.theme.fonts.getSize();\n styles['--font-family'] = this.curaApi.theme.fonts.getFamily();\n const weights = this.curaApi.theme.fonts.getWeights();\n styles['--font-weight-medium'] = weights.medium;\n styles['--text-align'] = this.textAlign();\n\n const colorMappings = [\n { name: '--color-dark-neutral-purewhite', theme: this.background() === 'light' ? `${this.color()}-dark` : 'neutral-purewhite' },\n { name: '--color-lighter-color-darker', theme: this.background() === 'light' ? `${this.color()}-lighter` : `${this.color()}-darker` },\n { name: '--color-light-color-darker', theme: this.background() === 'light' ? `${this.color()}-light` : `${this.color()}-lighter` },\n { name: '--neutral-dark', theme: 'neutral-dark' },\n ];\n\n colorMappings.forEach((mapping) => {\n styles[mapping.name] = this.curaApi.theme.colors.getColor(mapping.theme);\n });\n\n return styles;\n });\n\n containerClasses = computed(() => {\n const classes = [];\n classes.push(this.size()?.toLowerCase());\n classes.push(`icon-${this.iconPosition()?.toLowerCase()}`);\n\n if (this.iconOnly()) classes.push('icon-only');\n if (this.disabled()) classes.push('disabled');\n if (this.isLoading()) classes.push('isLoading');\n if (this.justify()) classes.push('justify');\n\n return classes.join(' ');\n });\n\n iconSize = computed(() => {\n return this.size() === 'large' ? '20' : '16';\n });\n\n symbolColor = computed(() => {\n if (this.disabled()) return 'neutral-dark';\n return this.fontColor() === 'light' ? 'neutral-purewhite' : `${this.color()}-darker`;\n });\n\n labelSize = computed(() => {\n return (labelSizes[this.size()] || labelSizes['default']) as LabelSize;\n });\n\n @HostListener('mouseenter')\n handleMouseEnter() {\n if (this.disabled()) return;\n this.hovered = true;\n }\n\n @HostListener('mouseleave')\n handleMouseLeave() {\n this.hovered = false;\n }\n\n handleClick(event: Event) {\n if (this.disabled() || this.isLoading()) {\n event.preventDefault();\n return;\n }\n\n this.buttonClick.emit(event);\n }\n}\n","<ng-template #button>\n <ng-content></ng-content>\n</ng-template>\n\n@if (href()) {\n <a\n [href]=\"disabled() ? '' : href()\"\n [target]=\"target()\"\n [class]=\"containerClasses()\"\n [ngStyle]=\"buttonStyles()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"handleClick($event)\"\n (mouseenter)=\"handleMouseEnter()\"\n (mouseleave)=\"handleMouseLeave()\"\n >\n <span class=\"button-container\">\n @if (iconName()) {\n <cura-icon [name]=\"iconName()\" [size]=\"iconSize()\" [color]=\"symbolColor()\" [iconset]=\"iconset()\" [disabled]=\"disabled()\"> </cura-icon>\n }\n <cura-label class=\"label\" [size]=\"labelSize()\" lineHeight=\"normal\" [color]=\"symbolColor()\">\n <ng-container *ngTemplateOutlet=\"button\"></ng-container>\n </cura-label>\n </span>\n <cura-loader-circle [size]=\"size()\" [color]=\"symbolColor()\"> </cura-loader-circle>\n </a>\n} @else {\n <button\n [type]=\"type()\"\n [class]=\"containerClasses()\"\n [ngStyle]=\"buttonStyles()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"handleClick($event)\"\n (mouseenter)=\"handleMouseEnter()\"\n (mouseleave)=\"handleMouseLeave()\"\n >\n <span class=\"button-container\">\n @if (iconName()) {\n <cura-icon [name]=\"iconName()\" [size]=\"iconSize()\" [color]=\"symbolColor()\" [iconset]=\"iconset()\" [disabled]=\"disabled()\"> </cura-icon>\n }\n <cura-label class=\"label\" [size]=\"labelSize()\" lineHeight=\"normal\" [color]=\"symbolColor()\">\n <ng-container *ngTemplateOutlet=\"button\"></ng-container>\n </cura-label>\n </span>\n <cura-loader-circle [size]=\"size()\" [color]=\"symbolColor()\"> </cura-loader-circle>\n </button>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MAoBa,0BAA0B,CAAA;AAXvC,IAAA,WAAA,GAAA;AAYU,QAAA,IAAA,CAAA,OAAO,GAAmB,MAAM,CAAC,cAAc,CAAC;AAExD;;AAEG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAa,QAAQ,gDAAC;AAElC;;AAEG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAa,OAAO,gDAAC;AAEjC;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,oDAAC;AAEhC;;AAEG;AACH,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAU,KAAK,qDAAC;AAEjC;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,EAAE,oDAAC;AAE5B;;AAEG;AACH,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAS,SAAS,mDAAC;AAElC;;AAEG;AACH,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAe,MAAM,wDAAC;AAE1C;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,oDAAC;AAEhC;;AA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A,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,yBAAyB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,kBAAkB,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,QAAA,EAAA,WAAA,EAAA,OAAA,EAAA,aAAA,EAAA,YAAA,EAAA,cAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAS7E,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAXtC,SAAS;+BACE,qBAAqB,EAAA,OAAA,EACtB,CAAC,YAAY,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,kBAAkB,CAAC,EAAA,IAAA,EAGnF;AACJ,wBAAA,aAAa,EAAE,0BAA0B;AACzC,wBAAA,sBAAsB,EAAE,YAAY;AACpC,wBAAA,aAAa,EAAE,QAAQ;AACxB,qBAAA,EAAA,QAAA,EAAA,0vDAAA,EAAA,MAAA,EAAA,CAAA,+7GAAA,CAAA,EAAA;;sBAkJA,YAAY;uBAAC,YAAY;;sBAMzB,YAAY;uBAAC,YAAY;;;AE1K5B;;AAEG;;;;"}
|
|
@@ -109,16 +109,16 @@ class CuraButtonSelectComponent {
|
|
|
109
109
|
this.selected.set(newSelectedValue);
|
|
110
110
|
this.onclick.emit({ selected: newSelectedValue });
|
|
111
111
|
}
|
|
112
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
113
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
112
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CuraButtonSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
113
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: CuraButtonSelectComponent, isStandalone: true, selector: "cura-button-select", inputs: { selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, counter: { classPropertyName: "counter", publicName: "counter", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, background: { classPropertyName: "background", publicName: "background", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, iconPosition: { classPropertyName: "iconPosition", publicName: "iconPosition", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selectedChange", onclick: "onclick" }, host: { listeners: { "mouseenter": "handleMouseEnter()", "mouseleave": "handleMouseLeave()" }, properties: { "attr.role": "\"button\"", "attr.aria-disabled": "disabled()", "attr.aria-pressed": "selected()" } }, ngImport: i0, template: "<button\n [class]=\"containerClasses()\"\n [ngStyle]=\"buttonStyles()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"handleClick($event)\"\n (mouseenter)=\"handleMouseEnter()\"\n (mouseleave)=\"handleMouseLeave()\"\n>\n <div class=\"button-container\">\n @if (iconName() && iconPosition() !== 'right') {\n <cura-icon [name]=\"iconName()\" [size]=\"iconSize()\" [color]=\"iconColor()\" [disabled]=\"disabled()\"> </cura-icon>\n }\n\n <cura-label class=\"label\" [size]=\"labelSize()\" lineHeight=\"0%\" [color]=\"labelFontColor()\" weight=\"regular\">\n <ng-content></ng-content>\n </cura-label>\n\n @if (counter()) {\n <cura-badge-counter class=\"badge-number\" [number]=\"counter()\" [color]=\"color()\" [disabled]=\"disabled()\"> </cura-badge-counter>\n }\n\n @if (iconPosition() === 'right' && selected()) {\n <cura-icon name=\"check\" [size]=\"iconSize()\" [color]=\"iconColor()\" [disabled]=\"disabled()\"> </cura-icon>\n }\n </div>\n</button>\n", styles: [":host{--border-radius: 4px;display:inline-block;vertical-align:middle;position:relative}:host button,:host a{outline:none;box-shadow:none;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none!important;font-size:var(--font-size);cursor:pointer;transition:background-color .07s linear,box-shadow .07s linear,border-color .07s linear;border-radius:var(--border-radius);position:relative;background-color:var(--neutral-purewhite);box-sizing:border-box;border:none}:host button:focus,:host a:focus{outline:2px solid #6ea8ff}:host button:before,:host a:before{content:\"\";width:100%;height:100%;position:absolute;left:0;top:0;box-sizing:border-box;border:2px solid var(--color-border);border-radius:var(--border-radius)}:host button:not(.disabled):hover,:host a:not(.disabled):hover{background-color:var(--color-background-hover);border-color:var(--color-border-hover-pressed)}:host button:focus,:host a:focus{border-color:var(--color-border)!important}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px);min-height:calc(var(--cura-spacing-base) * 11px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px);min-height:calc(var(--cura-spacing-base) * 10px)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px);min-height:calc(var(--cura-spacing-base) * 8px)}:host button cura-label,:host a cura-label{flex:1;text-align:var(--text-align, \"left\")}:host button .button-container,:host a .button-container{display:flex;align-items:center;opacity:1;transition:opacity .2s linear;position:relative;flex-direction:row!important}:host button .button-container .badge-number,:host a .button-container .badge-number{margin-left:10px}:host button.icon-right .button-container,:host a.icon-right .button-container{flex-direction:row-reverse}:host button.justify .button-container,:host a.justify .button-container{width:100%}:host button.icon-left cura-icon,:host a.icon-left cura-icon{margin-right:calc(var(--cura-spacing-base) * 3px)}:host button.icon-right cura-icon,:host a.icon-right cura-icon{margin-left:calc(var(--cura-spacing-base) * 3px)}:host button.medium.icon-left cura-icon,:host button.small.icon-left cura-icon,:host a.medium.icon-left cura-icon,:host a.small.icon-left cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button.medium.icon-right cura-icon,:host button.small.icon-right cura-icon,:host a.medium.icon-right cura-icon,:host a.small.icon-right cura-icon{margin-left:calc(var(--cura-spacing-base) * 2px)}:host button.selected,:host a.selected{cursor:pointer;background-color:var(--color-select);border-color:var(--color-select)}:host button.selected:not(.disabled):hover,:host a.selected:not(.disabled):hover{background-color:var(--color-border-hover-pressed);border-color:var(--color-border-hover-pressed)}:host button.selected:focus,:host a.selected:focus{border-color:var(--color-select-focus)!important}:host button.selected.disabled,:host a.selected.disabled{background-color:var(--color-disable-select);border-color:var(--color-disable-select)}:host button.disabled,:host a.disabled{cursor:not-allowed;background-color:var(--neutral-white-primary-darker);border-color:var(--color-border-disable-unselect)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: CuraLabelComponent, selector: "cura-label", inputs: ["size", "weight", "spotColor", "color", "marginBlock", "lineHeight", "textOverflow"] }, { kind: "component", type: CuraBadgeCounterComponent, selector: "cura-badge-counter", inputs: ["number", "color", "disabled", "type"] }] }); }
|
|
114
114
|
}
|
|
115
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CuraButtonSelectComponent, decorators: [{
|
|
116
116
|
type: Component,
|
|
117
117
|
args: [{ selector: 'cura-button-select', imports: [CommonModule, CuraIconComponent, CuraLabelComponent, CuraBadgeCounterComponent], host: {
|
|
118
118
|
'[attr.role]': '"button"',
|
|
119
119
|
'[attr.aria-disabled]': 'disabled()',
|
|
120
120
|
'[attr.aria-pressed]': 'selected()',
|
|
121
|
-
}, template: "<button\
|
|
121
|
+
}, template: "<button\n [class]=\"containerClasses()\"\n [ngStyle]=\"buttonStyles()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"handleClick($event)\"\n (mouseenter)=\"handleMouseEnter()\"\n (mouseleave)=\"handleMouseLeave()\"\n>\n <div class=\"button-container\">\n @if (iconName() && iconPosition() !== 'right') {\n <cura-icon [name]=\"iconName()\" [size]=\"iconSize()\" [color]=\"iconColor()\" [disabled]=\"disabled()\"> </cura-icon>\n }\n\n <cura-label class=\"label\" [size]=\"labelSize()\" lineHeight=\"0%\" [color]=\"labelFontColor()\" weight=\"regular\">\n <ng-content></ng-content>\n </cura-label>\n\n @if (counter()) {\n <cura-badge-counter class=\"badge-number\" [number]=\"counter()\" [color]=\"color()\" [disabled]=\"disabled()\"> </cura-badge-counter>\n }\n\n @if (iconPosition() === 'right' && selected()) {\n <cura-icon name=\"check\" [size]=\"iconSize()\" [color]=\"iconColor()\" [disabled]=\"disabled()\"> </cura-icon>\n }\n </div>\n</button>\n", styles: [":host{--border-radius: 4px;display:inline-block;vertical-align:middle;position:relative}:host button,:host a{outline:none;box-shadow:none;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none!important;font-size:var(--font-size);cursor:pointer;transition:background-color .07s linear,box-shadow .07s linear,border-color .07s linear;border-radius:var(--border-radius);position:relative;background-color:var(--neutral-purewhite);box-sizing:border-box;border:none}:host button:focus,:host a:focus{outline:2px solid #6ea8ff}:host button:before,:host a:before{content:\"\";width:100%;height:100%;position:absolute;left:0;top:0;box-sizing:border-box;border:2px solid var(--color-border);border-radius:var(--border-radius)}:host button:not(.disabled):hover,:host a:not(.disabled):hover{background-color:var(--color-background-hover);border-color:var(--color-border-hover-pressed)}:host button:focus,:host a:focus{border-color:var(--color-border)!important}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px);min-height:calc(var(--cura-spacing-base) * 11px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px);min-height:calc(var(--cura-spacing-base) * 10px)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px);min-height:calc(var(--cura-spacing-base) * 8px)}:host button cura-label,:host a cura-label{flex:1;text-align:var(--text-align, \"left\")}:host button .button-container,:host a .button-container{display:flex;align-items:center;opacity:1;transition:opacity .2s linear;position:relative;flex-direction:row!important}:host button .button-container .badge-number,:host a .button-container .badge-number{margin-left:10px}:host button.icon-right .button-container,:host a.icon-right .button-container{flex-direction:row-reverse}:host button.justify .button-container,:host a.justify .button-container{width:100%}:host button.icon-left cura-icon,:host a.icon-left cura-icon{margin-right:calc(var(--cura-spacing-base) * 3px)}:host button.icon-right cura-icon,:host a.icon-right cura-icon{margin-left:calc(var(--cura-spacing-base) * 3px)}:host button.medium.icon-left cura-icon,:host button.small.icon-left cura-icon,:host a.medium.icon-left cura-icon,:host a.small.icon-left cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button.medium.icon-right cura-icon,:host button.small.icon-right cura-icon,:host a.medium.icon-right cura-icon,:host a.small.icon-right cura-icon{margin-left:calc(var(--cura-spacing-base) * 2px)}:host button.selected,:host a.selected{cursor:pointer;background-color:var(--color-select);border-color:var(--color-select)}:host button.selected:not(.disabled):hover,:host a.selected:not(.disabled):hover{background-color:var(--color-border-hover-pressed);border-color:var(--color-border-hover-pressed)}:host button.selected:focus,:host a.selected:focus{border-color:var(--color-select-focus)!important}:host button.selected.disabled,:host a.selected.disabled{background-color:var(--color-disable-select);border-color:var(--color-disable-select)}:host button.disabled,:host a.disabled{cursor:not-allowed;background-color:var(--neutral-white-primary-darker);border-color:var(--color-border-disable-unselect)}\n"] }]
|
|
122
122
|
}], propDecorators: { selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }, { type: i0.Output, args: ["selectedChange"] }], iconName: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconName", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], counter: [{ type: i0.Input, args: [{ isSignal: true, alias: "counter", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], background: [{ type: i0.Input, args: [{ isSignal: true, alias: "background", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], iconPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPosition", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], onclick: [{ type: i0.Output, args: ["onclick"] }], handleMouseEnter: [{
|
|
123
123
|
type: HostListener,
|
|
124
124
|
args: ['mouseenter']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rededor-site-front-end-lib-cura-buttons-cura-button-select.mjs","sources":["../../../projects/site-front-end-lib/cura/buttons/cura-button-select/cura-button-select.component.ts","../../../projects/site-front-end-lib/cura/buttons/cura-button-select/cura-button-select.component.html","../../../projects/site-front-end-lib/cura/buttons/cura-button-select/rededor-site-front-end-lib-cura-buttons-cura-button-select.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\r\nimport { Component, input, output, model, HostListener, computed, inject } from '@angular/core';\r\nimport { labelSizes, ButtonSize, IconPosition, BackgroundType } from '@rededor/site-front-end-lib/cura/buttons';\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 { CuraLabelComponent } from '@rededor/site-front-end-lib/cura/forms/cura-label';\r\nimport { LabelSize } from '@rededor/site-front-end-lib/cura/forms';\r\nimport { CuraBadgeCounterComponent } from '@rededor/site-front-end-lib/cura/badges/cura-badge-counter';\r\n\r\n@Component({\r\n selector: 'cura-button-select',\r\n imports: [CommonModule, CuraIconComponent, CuraLabelComponent, CuraBadgeCounterComponent],\r\n templateUrl: './cura-button-select.component.html',\r\n styleUrls: ['./cura-button-select.component.scss'],\r\n host: {\r\n '[attr.role]': '\"button\"',\r\n '[attr.aria-disabled]': 'disabled()',\r\n '[attr.aria-pressed]': 'selected()',\r\n },\r\n})\r\nexport class CuraButtonSelectComponent {\r\n private curaApi: CuraApiService = inject(CuraApiService);\r\n\r\n selected = model<boolean>(false);\r\n iconName = input<string>('');\r\n size = input<ButtonSize>('medium');\r\n counter = input<number | null>(null);\r\n disabled = input<boolean>(false);\r\n background = input<BackgroundType>('light');\r\n color = input<string>('primary');\r\n iconPosition = input<IconPosition>();\r\n\r\n /**\r\n * Accessible name for the button (aria-label).\r\n * Required for icon-only buttons or when button text is not descriptive enough.\r\n */\r\n ariaLabel = input<string>('');\r\n\r\n onclick = output<{ selected: boolean }>();\r\n\r\n hovered = false;\r\n\r\n buttonStyles = computed(() => {\r\n const styles: { [key: string]: string } = {};\r\n\r\n styles['--base-spacing'] = this.curaApi.theme.spacing.getSpacing();\r\n styles['--font-size'] = this.curaApi.theme.fonts.getSize();\r\n styles['--font-family'] = this.curaApi.theme.fonts.getFamily();\r\n const weights = this.curaApi.theme.fonts.getWeights();\r\n styles['--font-weight-medium'] = weights.medium;\r\n\r\n const colorMappings = [\r\n { name: '--color-border', theme: this.background() === 'light' ? `${this.color()}-darker` : 'neutral-white' },\r\n { name: '--color-border-hover-pressed', theme: this.background() === 'light' ? `${this.color()}-dark` : `${this.color()}-light` },\r\n { name: '--color-background-hover', theme: this.background() === 'light' ? `${this.color()}-light` : `${this.color()}-dark` },\r\n { name: '--color-select', theme: this.background() === 'light' ? `${this.color()}-base` : 'neutral-white' },\r\n { name: '--color-select-hover-pressed', theme: this.background() === 'light' ? `${this.color()}-dark` : `${this.color()}-lighter` },\r\n { name: '--color-select-focus', theme: this.background() === 'light' ? `${this.color()}-base` : `${this.color()}-lighter` },\r\n { name: '--color-disable-select', theme: this.background() === 'light' ? 'neutral-white' : 'neutral-black' },\r\n { name: '--color-border-disable-unselect', theme: 'neutral-dark' },\r\n { name: '--color-counter-disabled', theme: this.background() === 'light' ? 'neutral-pale' : 'neutral-black' },\r\n { name: '--color-counter', theme: !this.disabled() ? 'primary-lighter' : '' },\r\n ];\r\n\r\n colorMappings.forEach((mapping) => {\r\n if (mapping.theme) {\r\n styles[mapping.name] = this.curaApi.theme.colors.getColor(mapping.theme);\r\n }\r\n });\r\n\r\n return styles;\r\n });\r\n\r\n containerClasses = computed(() => {\r\n const classes = [];\r\n classes.push(this.size()?.toLowerCase());\r\n\r\n if (this.iconPosition()) {\r\n classes.push(`icon-${this.iconPosition()?.toLowerCase()}`);\r\n }\r\n\r\n if (this.disabled()) classes.push('disabled');\r\n if (this.selected()) classes.push('selected');\r\n\r\n return classes.join(' ');\r\n });\r\n\r\n labelFontColor = computed(() => {\r\n if (this.disabled()) return 'neutral-dark';\r\n\r\n if (this.background() === 'dark') {\r\n return this.selected() ? 'neutral-black' : 'neutral-white';\r\n }\r\n if (this.background() === 'light') {\r\n return this.selected() ? 'neutral-white' : 'neutral-black';\r\n }\r\n return 'neutral-black';\r\n });\r\n\r\n iconSize = computed(() => {\r\n return this.size() === 'large' ? '20' : '16';\r\n });\r\n\r\n iconColor = computed(() => {\r\n if (this.disabled()) return 'neutral-dark';\r\n\r\n if (this.background() === 'dark') {\r\n return this.selected() ? 'neutral-black' : 'neutral-white';\r\n }\r\n if (this.background() === 'light') {\r\n return this.selected() ? 'neutral-white' : 'neutral-black';\r\n }\r\n return 'neutral-black';\r\n });\r\n\r\n labelSize = computed(() => {\r\n return (labelSizes[this.size()] || labelSizes['default']) as LabelSize;\r\n });\r\n\r\n @HostListener('mouseenter')\r\n handleMouseEnter() {\r\n if (this.disabled()) return;\r\n this.hovered = true;\r\n }\r\n\r\n @HostListener('mouseleave')\r\n handleMouseLeave() {\r\n this.hovered = false;\r\n }\r\n\r\n handleClick(event: Event) {\r\n if (this.disabled()) {\r\n event.preventDefault();\r\n }\r\n\r\n const newSelectedValue = !this.selected();\r\n this.selected.set(newSelectedValue);\r\n this.onclick.emit({ selected: newSelectedValue });\r\n }\r\n}\r\n","<button\r\n [class]=\"containerClasses()\"\r\n [ngStyle]=\"buttonStyles()\"\r\n [disabled]=\"disabled()\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n (click)=\"handleClick($event)\"\r\n (mouseenter)=\"handleMouseEnter()\"\r\n (mouseleave)=\"handleMouseLeave()\"\r\n>\r\n <div class=\"button-container\">\r\n @if (iconName() && iconPosition() !== 'right') {\r\n <cura-icon [name]=\"iconName()\" [size]=\"iconSize()\" [color]=\"iconColor()\" [disabled]=\"disabled()\"> </cura-icon>\r\n }\r\n\r\n <cura-label class=\"label\" [size]=\"labelSize()\" lineHeight=\"0%\" [color]=\"labelFontColor()\" weight=\"regular\">\r\n <ng-content></ng-content>\r\n </cura-label>\r\n\r\n @if (counter()) {\r\n <cura-badge-counter class=\"badge-number\" [number]=\"counter()\" [color]=\"color()\" [disabled]=\"disabled()\"> </cura-badge-counter>\r\n }\r\n\r\n @if (iconPosition() === 'right' && selected()) {\r\n <cura-icon name=\"check\" [size]=\"iconSize()\" [color]=\"iconColor()\" [disabled]=\"disabled()\"> </cura-icon>\r\n }\r\n </div>\r\n</button>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MAoBa,yBAAyB,CAAA;AAXtC,IAAA,WAAA,GAAA;AAYU,QAAA,IAAA,CAAA,OAAO,GAAmB,MAAM,CAAC,cAAc,CAAC;AAExD,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,oDAAC;AAChC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,EAAE,oDAAC;AAC5B,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAa,QAAQ,gDAAC;AAClC,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAgB,IAAI,mDAAC;AACpC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,oDAAC;A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E,kBAAkB,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,QAAA,EAAA,WAAA,EAAA,OAAA,EAAA,aAAA,EAAA,YAAA,EAAA,cAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,yBAAyB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,OAAA,EAAA,UAAA,EAAA,MAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAS7E,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAXrC,SAAS;+BACE,oBAAoB,EAAA,OAAA,EACrB,CAAC,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,yBAAyB,CAAC,EAAA,IAAA,EAGnF;AACJ,wBAAA,aAAa,EAAE,UAAU;AACzB,wBAAA,sBAAsB,EAAE,YAAY;AACpC,wBAAA,qBAAqB,EAAE,YAAY;AACpC,qBAAA,EAAA,QAAA,EAAA,kkCAAA,EAAA,MAAA,EAAA,CAAA,2tGAAA,CAAA,EAAA;;sBAqGA,YAAY;uBAAC,YAAY;;sBAMzB,YAAY;uBAAC,YAAY;;;AE7H5B;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"rededor-site-front-end-lib-cura-buttons-cura-button-select.mjs","sources":["../../../projects/site-front-end-lib/cura/buttons/cura-button-select/cura-button-select.component.ts","../../../projects/site-front-end-lib/cura/buttons/cura-button-select/cura-button-select.component.html","../../../projects/site-front-end-lib/cura/buttons/cura-button-select/rededor-site-front-end-lib-cura-buttons-cura-button-select.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, input, output, model, HostListener, computed, inject } from '@angular/core';\nimport { labelSizes, ButtonSize, IconPosition, BackgroundType } from '@rededor/site-front-end-lib/cura/buttons';\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\nimport { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';\nimport { CuraLabelComponent } from '@rededor/site-front-end-lib/cura/forms/cura-label';\nimport { LabelSize } from '@rededor/site-front-end-lib/cura/forms';\nimport { CuraBadgeCounterComponent } from '@rededor/site-front-end-lib/cura/badges/cura-badge-counter';\n\n@Component({\n selector: 'cura-button-select',\n imports: [CommonModule, CuraIconComponent, CuraLabelComponent, CuraBadgeCounterComponent],\n templateUrl: './cura-button-select.component.html',\n styleUrls: ['./cura-button-select.component.scss'],\n host: {\n '[attr.role]': '\"button\"',\n '[attr.aria-disabled]': 'disabled()',\n '[attr.aria-pressed]': 'selected()',\n },\n})\nexport class CuraButtonSelectComponent {\n private curaApi: CuraApiService = inject(CuraApiService);\n\n selected = model<boolean>(false);\n iconName = input<string>('');\n size = input<ButtonSize>('medium');\n counter = input<number | null>(null);\n disabled = input<boolean>(false);\n background = input<BackgroundType>('light');\n color = input<string>('primary');\n iconPosition = input<IconPosition>();\n\n /**\n * Accessible name for the button (aria-label).\n * Required for icon-only buttons or when button text is not descriptive enough.\n */\n ariaLabel = input<string>('');\n\n onclick = output<{ selected: boolean }>();\n\n hovered = false;\n\n buttonStyles = computed(() => {\n const styles: { [key: string]: string } = {};\n\n styles['--base-spacing'] = this.curaApi.theme.spacing.getSpacing();\n styles['--font-size'] = this.curaApi.theme.fonts.getSize();\n styles['--font-family'] = this.curaApi.theme.fonts.getFamily();\n const weights = this.curaApi.theme.fonts.getWeights();\n styles['--font-weight-medium'] = weights.medium;\n\n const colorMappings = [\n { name: '--color-border', theme: this.background() === 'light' ? `${this.color()}-darker` : 'neutral-white' },\n { name: '--color-border-hover-pressed', theme: this.background() === 'light' ? `${this.color()}-dark` : `${this.color()}-light` },\n { name: '--color-background-hover', theme: this.background() === 'light' ? `${this.color()}-light` : `${this.color()}-dark` },\n { name: '--color-select', theme: this.background() === 'light' ? `${this.color()}-base` : 'neutral-white' },\n { name: '--color-select-hover-pressed', theme: this.background() === 'light' ? `${this.color()}-dark` : `${this.color()}-lighter` },\n { name: '--color-select-focus', theme: this.background() === 'light' ? `${this.color()}-base` : `${this.color()}-lighter` },\n { name: '--color-disable-select', theme: this.background() === 'light' ? 'neutral-white' : 'neutral-black' },\n { name: '--color-border-disable-unselect', theme: 'neutral-dark' },\n { name: '--color-counter-disabled', theme: this.background() === 'light' ? 'neutral-pale' : 'neutral-black' },\n { name: '--color-counter', theme: !this.disabled() ? 'primary-lighter' : '' },\n ];\n\n colorMappings.forEach((mapping) => {\n if (mapping.theme) {\n styles[mapping.name] = this.curaApi.theme.colors.getColor(mapping.theme);\n }\n });\n\n return styles;\n });\n\n containerClasses = computed(() => {\n const classes = [];\n classes.push(this.size()?.toLowerCase());\n\n if (this.iconPosition()) {\n classes.push(`icon-${this.iconPosition()?.toLowerCase()}`);\n }\n\n if (this.disabled()) classes.push('disabled');\n if (this.selected()) classes.push('selected');\n\n return classes.join(' ');\n });\n\n labelFontColor = computed(() => {\n if (this.disabled()) return 'neutral-dark';\n\n if (this.background() === 'dark') {\n return this.selected() ? 'neutral-black' : 'neutral-white';\n }\n if (this.background() === 'light') {\n return this.selected() ? 'neutral-white' : 'neutral-black';\n }\n return 'neutral-black';\n });\n\n iconSize = computed(() => {\n return this.size() === 'large' ? '20' : '16';\n });\n\n iconColor = computed(() => {\n if (this.disabled()) return 'neutral-dark';\n\n if (this.background() === 'dark') {\n return this.selected() ? 'neutral-black' : 'neutral-white';\n }\n if (this.background() === 'light') {\n return this.selected() ? 'neutral-white' : 'neutral-black';\n }\n return 'neutral-black';\n });\n\n labelSize = computed(() => {\n return (labelSizes[this.size()] || labelSizes['default']) as LabelSize;\n });\n\n @HostListener('mouseenter')\n handleMouseEnter() {\n if (this.disabled()) return;\n this.hovered = true;\n }\n\n @HostListener('mouseleave')\n handleMouseLeave() {\n this.hovered = false;\n }\n\n handleClick(event: Event) {\n if (this.disabled()) {\n event.preventDefault();\n }\n\n const newSelectedValue = !this.selected();\n this.selected.set(newSelectedValue);\n this.onclick.emit({ selected: newSelectedValue });\n }\n}\n","<button\n [class]=\"containerClasses()\"\n [ngStyle]=\"buttonStyles()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"handleClick($event)\"\n (mouseenter)=\"handleMouseEnter()\"\n (mouseleave)=\"handleMouseLeave()\"\n>\n <div class=\"button-container\">\n @if (iconName() && iconPosition() !== 'right') {\n <cura-icon [name]=\"iconName()\" [size]=\"iconSize()\" [color]=\"iconColor()\" [disabled]=\"disabled()\"> </cura-icon>\n }\n\n <cura-label class=\"label\" [size]=\"labelSize()\" lineHeight=\"0%\" [color]=\"labelFontColor()\" weight=\"regular\">\n <ng-content></ng-content>\n </cura-label>\n\n @if (counter()) {\n <cura-badge-counter class=\"badge-number\" [number]=\"counter()\" [color]=\"color()\" [disabled]=\"disabled()\"> </cura-badge-counter>\n }\n\n @if (iconPosition() === 'right' && selected()) {\n <cura-icon name=\"check\" [size]=\"iconSize()\" [color]=\"iconColor()\" [disabled]=\"disabled()\"> </cura-icon>\n }\n </div>\n</button>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MAoBa,yBAAyB,CAAA;AAXtC,IAAA,WAAA,GAAA;AAYU,QAAA,IAAA,CAAA,OAAO,GAAmB,MAAM,CAAC,cAAc,CAAC;AAExD,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,oDAAC;AAChC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,EAAE,oDAAC;AAC5B,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAa,QAAQ,gDAAC;AAClC,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAgB,IAAI,mDAAC;AACpC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,oDAAC;AAChC,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAiB,OAAO,sDAAC;AAC3C,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,SAAS,i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,YAAA,EAAA,cAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,yBAAyB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,OAAA,EAAA,UAAA,EAAA,MAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAS7E,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAXrC,SAAS;+BACE,oBAAoB,EAAA,OAAA,EACrB,CAAC,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,yBAAyB,CAAC,EAAA,IAAA,EAGnF;AACJ,wBAAA,aAAa,EAAE,UAAU;AACzB,wBAAA,sBAAsB,EAAE,YAAY;AACpC,wBAAA,qBAAqB,EAAE,YAAY;AACpC,qBAAA,EAAA,QAAA,EAAA,4gCAAA,EAAA,MAAA,EAAA,CAAA,2tGAAA,CAAA,EAAA;;sBAqGA,YAAY;uBAAC,YAAY;;sBAMzB,YAAY;uBAAC,YAAY;;;AE7H5B;;AAEG;;;;"}
|
|
@@ -135,16 +135,16 @@ class CuraButtonTransparentComponent {
|
|
|
135
135
|
}
|
|
136
136
|
this.buttonClick.emit(event);
|
|
137
137
|
}
|
|
138
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
139
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
138
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CuraButtonTransparentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
139
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: CuraButtonTransparentComponent, isStandalone: true, selector: "cura-button-transparent", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: false, transformFunction: null }, iconset: { classPropertyName: "iconset", publicName: "iconset", isSignal: true, isRequired: false, transformFunction: null }, iconPosition: { classPropertyName: "iconPosition", publicName: "iconPosition", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, fontColor: { classPropertyName: "fontColor", publicName: "fontColor", isSignal: true, isRequired: false, transformFunction: null }, textAlign: { classPropertyName: "textAlign", publicName: "textAlign", isSignal: true, isRequired: false, transformFunction: null }, justify: { classPropertyName: "justify", publicName: "justify", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { buttonClick: "buttonClick" }, host: { listeners: { "mouseenter": "handleMouseEnter()", "mouseleave": "handleMouseLeave()" }, properties: { "attr.role": "href() ? \"link\" : type()", "attr.aria-disabled": "disabled()", "attr.href": "href()" } }, ngImport: i0, template: "<ng-template #button>\n <ng-content></ng-content>\n</ng-template>\n\n@if (href()) {\n <a\n [href]=\"disabled() ? '' : href()\"\n [target]=\"target()\"\n [class]=\"containerClasses()\"\n [ngStyle]=\"buttonStyles()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"handleClick($event)\"\n (mouseenter)=\"handleMouseEnter()\"\n (mouseleave)=\"handleMouseLeave()\"\n >\n <span class=\"button-container\">\n @if (iconName()) {\n <cura-icon [name]=\"iconName()\" [size]=\"iconSize()\" [color]=\"symbolColor()\" [iconset]=\"iconset()\" [disabled]=\"disabled()\"> </cura-icon>\n }\n <cura-label class=\"label\" [size]=\"labelSize()\" lineHeight=\"normal\" [color]=\"symbolColor()\">\n <ng-container *ngTemplateOutlet=\"button\"></ng-container>\n </cura-label>\n </span>\n <cura-loader-circle [size]=\"size()\" [color]=\"symbolColor()\"> </cura-loader-circle>\n </a>\n} @else {\n <button\n [type]=\"type()\"\n [class]=\"containerClasses()\"\n [ngStyle]=\"buttonStyles()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"handleClick($event)\"\n (mouseenter)=\"handleMouseEnter()\"\n (mouseleave)=\"handleMouseLeave()\"\n >\n <span class=\"button-container\">\n @if (iconName()) {\n <cura-icon [name]=\"iconName()\" [size]=\"iconSize()\" [color]=\"symbolColor()\" [iconset]=\"iconset()\" [disabled]=\"disabled()\"> </cura-icon>\n }\n <cura-label class=\"label\" [size]=\"labelSize()\" lineHeight=\"normal\" [color]=\"symbolColor()\">\n <ng-container *ngTemplateOutlet=\"button\"></ng-container>\n </cura-label>\n </span>\n <cura-loader-circle [size]=\"size()\" [color]=\"symbolColor()\"> </cura-loader-circle>\n </button>\n}\n", styles: [":host{--border-radius: 4px;display:inline-block;vertical-align:middle;position:relative}:host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none!important;font-size:var(--font-size);cursor:pointer;transition:background-color .07s linear,box-shadow .07s linear,border-color .07s linear;border-radius:var(--border-radius);position:relative;background-color:transparent;border:none}:host button:focus,:host a:focus{outline:2px solid #6ea8ff}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px);min-height:calc(var(--cura-spacing-base) * 11px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px);min-height:calc(var(--cura-spacing-base) * 10px)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px);min-height:calc(var(--cura-spacing-base) * 8px)}:host button .button-container,:host a .button-container{display:flex;align-items:center;opacity:1;transition:opacity .2s linear;position:relative}:host button.icon-right .button-container,:host a.icon-right .button-container{flex-direction:row-reverse}:host button.justify .button-container,:host a.justify .button-container{width:100%}:host button cura-label,:host a cura-label{flex:1;text-align:var(--text-align, \"left\")}:host button.icon-left cura-icon,:host a.icon-left cura-icon{margin-right:calc(var(--cura-spacing-base) * 3px)}:host button.icon-right cura-icon,:host a.icon-right cura-icon{margin-left:calc(var(--cura-spacing-base) * 3px)}:host button.medium.icon-left cura-icon,:host button.small.icon-left cura-icon,:host a.medium.icon-left cura-icon,:host a.small.icon-left cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button.medium.icon-right cura-icon,:host button.small.icon-right cura-icon,:host a.medium.icon-right cura-icon,:host a.small.icon-right cura-icon{margin-left:calc(var(--cura-spacing-base) * 2px)}:host button.disabled,:host a.disabled{cursor:not-allowed}:host button.icon-only,:host a.icon-only{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px)}:host button.icon-only cura-label,:host a.icon-only cura-label{display:none}:host button.icon-only cura-icon,:host a.icon-only cura-icon{margin-left:0!important;margin-right:0!important}:host button.icon-only.medium,:host a.icon-only.medium{padding:calc(var(--cura-spacing-base) * 3px)}:host button.icon-only.small,:host a.icon-only.small{padding:calc(var(--cura-spacing-base) * 2px)}:host button cura-loader-circle,:host a cura-loader-circle{position:absolute;display:none}:host button.isLoading,:host a.isLoading{cursor:wait}:host button.isLoading .button-container,:host a.isLoading .button-container{opacity:0}:host button.isLoading cura-loader-circle,:host a.isLoading cura-loader-circle{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: CuraLoaderCircleComponent, selector: "cura-loader-circle", inputs: ["size", "color"] }, { kind: "component", type: CuraLabelComponent, selector: "cura-label", inputs: ["size", "weight", "spotColor", "color", "marginBlock", "lineHeight", "textOverflow"] }] }); }
|
|
140
140
|
}
|
|
141
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CuraButtonTransparentComponent, decorators: [{
|
|
142
142
|
type: Component,
|
|
143
143
|
args: [{ selector: 'cura-button-transparent', imports: [CommonModule, CuraIconComponent, CuraLoaderCircleComponent, CuraLabelComponent], host: {
|
|
144
144
|
'[attr.role]': 'href() ? "link" : type()',
|
|
145
145
|
'[attr.aria-disabled]': 'disabled()',
|
|
146
146
|
'[attr.href]': 'href()',
|
|
147
|
-
}, template: "<ng-template #button>\
|
|
147
|
+
}, template: "<ng-template #button>\n <ng-content></ng-content>\n</ng-template>\n\n@if (href()) {\n <a\n [href]=\"disabled() ? '' : href()\"\n [target]=\"target()\"\n [class]=\"containerClasses()\"\n [ngStyle]=\"buttonStyles()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"handleClick($event)\"\n (mouseenter)=\"handleMouseEnter()\"\n (mouseleave)=\"handleMouseLeave()\"\n >\n <span class=\"button-container\">\n @if (iconName()) {\n <cura-icon [name]=\"iconName()\" [size]=\"iconSize()\" [color]=\"symbolColor()\" [iconset]=\"iconset()\" [disabled]=\"disabled()\"> </cura-icon>\n }\n <cura-label class=\"label\" [size]=\"labelSize()\" lineHeight=\"normal\" [color]=\"symbolColor()\">\n <ng-container *ngTemplateOutlet=\"button\"></ng-container>\n </cura-label>\n </span>\n <cura-loader-circle [size]=\"size()\" [color]=\"symbolColor()\"> </cura-loader-circle>\n </a>\n} @else {\n <button\n [type]=\"type()\"\n [class]=\"containerClasses()\"\n [ngStyle]=\"buttonStyles()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"handleClick($event)\"\n (mouseenter)=\"handleMouseEnter()\"\n (mouseleave)=\"handleMouseLeave()\"\n >\n <span class=\"button-container\">\n @if (iconName()) {\n <cura-icon [name]=\"iconName()\" [size]=\"iconSize()\" [color]=\"symbolColor()\" [iconset]=\"iconset()\" [disabled]=\"disabled()\"> </cura-icon>\n }\n <cura-label class=\"label\" [size]=\"labelSize()\" lineHeight=\"normal\" [color]=\"symbolColor()\">\n <ng-container *ngTemplateOutlet=\"button\"></ng-container>\n </cura-label>\n </span>\n <cura-loader-circle [size]=\"size()\" [color]=\"symbolColor()\"> </cura-loader-circle>\n </button>\n}\n", styles: [":host{--border-radius: 4px;display:inline-block;vertical-align:middle;position:relative}:host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none!important;font-size:var(--font-size);cursor:pointer;transition:background-color .07s linear,box-shadow .07s linear,border-color .07s linear;border-radius:var(--border-radius);position:relative;background-color:transparent;border:none}:host button:focus,:host a:focus{outline:2px solid #6ea8ff}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px);min-height:calc(var(--cura-spacing-base) * 11px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px);min-height:calc(var(--cura-spacing-base) * 10px)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px);min-height:calc(var(--cura-spacing-base) * 8px)}:host button .button-container,:host a .button-container{display:flex;align-items:center;opacity:1;transition:opacity .2s linear;position:relative}:host button.icon-right .button-container,:host a.icon-right .button-container{flex-direction:row-reverse}:host button.justify .button-container,:host a.justify .button-container{width:100%}:host button cura-label,:host a cura-label{flex:1;text-align:var(--text-align, \"left\")}:host button.icon-left cura-icon,:host a.icon-left cura-icon{margin-right:calc(var(--cura-spacing-base) * 3px)}:host button.icon-right cura-icon,:host a.icon-right cura-icon{margin-left:calc(var(--cura-spacing-base) * 3px)}:host button.medium.icon-left cura-icon,:host button.small.icon-left cura-icon,:host a.medium.icon-left cura-icon,:host a.small.icon-left cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button.medium.icon-right cura-icon,:host button.small.icon-right cura-icon,:host a.medium.icon-right cura-icon,:host a.small.icon-right cura-icon{margin-left:calc(var(--cura-spacing-base) * 2px)}:host button.disabled,:host a.disabled{cursor:not-allowed}:host button.icon-only,:host a.icon-only{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px)}:host button.icon-only cura-label,:host a.icon-only cura-label{display:none}:host button.icon-only cura-icon,:host a.icon-only cura-icon{margin-left:0!important;margin-right:0!important}:host button.icon-only.medium,:host a.icon-only.medium{padding:calc(var(--cura-spacing-base) * 3px)}:host button.icon-only.small,:host a.icon-only.small{padding:calc(var(--cura-spacing-base) * 2px)}:host button cura-loader-circle,:host a cura-loader-circle{position:absolute;display:none}:host button.isLoading,:host a.isLoading{cursor:wait}:host button.isLoading .button-container,:host a.isLoading .button-container{opacity:0}:host button.isLoading cura-loader-circle,:host a.isLoading cura-loader-circle{display:block}\n"] }]
|
|
148
148
|
}], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], iconName: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconName", required: false }] }], iconset: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconset", required: false }] }], iconPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPosition", required: false }] }], iconOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOnly", required: false }] }], href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], fontColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "fontColor", required: false }] }], textAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "textAlign", required: false }] }], justify: [{ type: i0.Input, args: [{ isSignal: true, alias: "justify", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], buttonClick: [{ type: i0.Output, args: ["buttonClick"] }], handleMouseEnter: [{
|
|
149
149
|
type: HostListener,
|
|
150
150
|
args: ['mouseenter']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rededor-site-front-end-lib-cura-buttons-cura-button-transparent.mjs","sources":["../../../projects/site-front-end-lib/cura/buttons/cura-button-transparent/cura-button-transparent.component.ts","../../../projects/site-front-end-lib/cura/buttons/cura-button-transparent/cura-button-transparent.component.html","../../../projects/site-front-end-lib/cura/buttons/cura-button-transparent/rededor-site-front-end-lib-cura-buttons-cura-button-transparent.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\r\nimport { Component, input, output, HostListener, computed, inject } from '@angular/core';\r\nimport { labelSizes, ButtonType, ButtonSize, IconPosition, FontColor, TextAlign } from '@rededor/site-front-end-lib/cura/buttons';\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 { CuraLoaderCircleComponent } from '@rededor/site-front-end-lib/cura/loaders/cura-loader-circle';\r\nimport { CuraLabelComponent } from '@rededor/site-front-end-lib/cura/forms/cura-label';\r\nimport { LabelSize } from '@rededor/site-front-end-lib/cura/forms';\r\n\r\n@Component({\r\n selector: 'cura-button-transparent',\r\n imports: [CommonModule, CuraIconComponent, CuraLoaderCircleComponent, CuraLabelComponent],\r\n templateUrl: './cura-button-transparent.component.html',\r\n styleUrls: ['./cura-button-transparent.component.scss'],\r\n host: {\r\n '[attr.role]': 'href() ? \"link\" : type()',\r\n '[attr.aria-disabled]': 'disabled()',\r\n '[attr.href]': 'href()',\r\n },\r\n})\r\nexport class CuraButtonTransparentComponent {\r\n private curaApi: CuraApiService = inject(CuraApiService);\r\n\r\n /**\r\n * Button type: button (default) | submit | reset\r\n */\r\n type = input<ButtonType>('button');\r\n\r\n /**\r\n * Button size: small | medium | large (default)\r\n */\r\n size = input<ButtonSize>('large');\r\n\r\n /**\r\n * Disabled state. Boolean.\r\n */\r\n disabled = input<boolean>(false);\r\n\r\n /**\r\n * Loading state. Boolean.\r\n */\r\n isLoading = input<boolean>(false);\r\n\r\n /**\r\n * Name of the icon to be used from iconset.\r\n */\r\n iconName = input<string>('');\r\n\r\n /**\r\n * Custom iconset if needed.\r\n */\r\n iconset = input<string>('default');\r\n\r\n /**\r\n * Icon position: left (default) | right.\r\n */\r\n iconPosition = input<IconPosition>('left');\r\n\r\n /**\r\n * Set button to FAB/icon only.\r\n */\r\n iconOnly = input<boolean>(false);\r\n\r\n /**\r\n * Property href switch button to link.\r\n */\r\n href = input<string>('');\r\n\r\n /**\r\n * Set target if link.\r\n */\r\n target = input<string>('_self');\r\n\r\n /**\r\n * Color base from color scheme. Default: primary.\r\n */\r\n color = input<string>('primary');\r\n\r\n /**\r\n * Set the font color to dark or light.\r\n * Default: dark.\r\n */\r\n fontColor = input<FontColor>('dark');\r\n\r\n /**\r\n * Set text alignment for the button label.\r\n * Values: left (default) | center | right.\r\n */\r\n textAlign = input<TextAlign>('left');\r\n\r\n /**\r\n * Justify icons and label inside the button.\r\n * Values: false (default) | true.\r\n */\r\n justify = input<boolean>(false);\r\n\r\n /**\r\n * Accessible name for the button (aria-label).\r\n * Required for icon-only buttons or when button text is not descriptive enough.\r\n */\r\n ariaLabel = input<string>('');\r\n\r\n buttonClick = output<Event>();\r\n\r\n hovered = false;\r\n\r\n // Computed signal\r\n buttonStyles = computed(() => {\r\n const styles: { [key: string]: string } = {};\r\n\r\n styles['--base-spacing'] = this.curaApi.theme.spacing.getSpacing();\r\n styles['--neutral-white'] = this.curaApi.theme.colors.getColor('neutral-white');\r\n styles['--neutral-base'] = this.curaApi.theme.colors.getColor('neutral-base');\r\n styles['--neutral-dark'] = this.curaApi.theme.colors.getColor('neutral-dark');\r\n styles['--font-size'] = this.curaApi.theme.fonts.getSize();\r\n styles['--font-family'] = this.curaApi.theme.fonts.getFamily();\r\n const weights = this.curaApi.theme.fonts.getWeights();\r\n styles['--font-weight-medium'] = weights.medium;\r\n styles['--text-align'] = this.textAlign();\r\n\r\n return styles;\r\n });\r\n\r\n containerClasses = computed(() => {\r\n const classes = [];\r\n classes.push(this.size()?.toLowerCase());\r\n classes.push(`icon-${this.iconPosition()?.toLowerCase()}`);\r\n\r\n if (this.iconOnly()) classes.push('icon-only');\r\n if (this.disabled()) classes.push('disabled');\r\n if (this.isLoading()) classes.push('isLoading');\r\n if (this.justify()) classes.push('justify');\r\n\r\n return classes.join(' ');\r\n });\r\n\r\n iconSize = computed(() => {\r\n return this.size() === 'large' ? '20' : '16';\r\n });\r\n\r\n symbolColor = computed(() => {\r\n if (this.disabled()) return 'neutral-dark';\r\n if (this.hovered && !this.isLoading()) {\r\n return this.fontColor() === 'light' ? `${this.color()}-light` : `${this.color()}-darker`;\r\n }\r\n return this.fontColor() === 'light' ? 'neutral-white' : `${this.color()}-dark`;\r\n });\r\n\r\n labelSize = computed(() => {\r\n return (labelSizes[this.size()] || labelSizes['default']) as LabelSize;\r\n });\r\n\r\n @HostListener('mouseenter')\r\n handleMouseEnter() {\r\n if (this.disabled()) return;\r\n this.hovered = true;\r\n }\r\n\r\n @HostListener('mouseleave')\r\n handleMouseLeave() {\r\n this.hovered = false;\r\n }\r\n\r\n handleClick(event: Event) {\r\n if (this.disabled() || this.isLoading()) {\r\n event.preventDefault();\r\n return;\r\n }\r\n\r\n this.buttonClick.emit(event);\r\n }\r\n}\r\n","<ng-template #button>\r\n <ng-content></ng-content>\r\n</ng-template>\r\n\r\n@if (href()) {\r\n <a\r\n [href]=\"disabled() ? '' : href()\"\r\n [target]=\"target()\"\r\n [class]=\"containerClasses()\"\r\n [ngStyle]=\"buttonStyles()\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n (click)=\"handleClick($event)\"\r\n (mouseenter)=\"handleMouseEnter()\"\r\n (mouseleave)=\"handleMouseLeave()\"\r\n >\r\n <span class=\"button-container\">\r\n @if (iconName()) {\r\n <cura-icon [name]=\"iconName()\" [size]=\"iconSize()\" [color]=\"symbolColor()\" [iconset]=\"iconset()\" [disabled]=\"disabled()\"> </cura-icon>\r\n }\r\n <cura-label class=\"label\" [size]=\"labelSize()\" lineHeight=\"normal\" [color]=\"symbolColor()\">\r\n <ng-container *ngTemplateOutlet=\"button\"></ng-container>\r\n </cura-label>\r\n </span>\r\n <cura-loader-circle [size]=\"size()\" [color]=\"symbolColor()\"> </cura-loader-circle>\r\n </a>\r\n} @else {\r\n <button\r\n [type]=\"type()\"\r\n [class]=\"containerClasses()\"\r\n [ngStyle]=\"buttonStyles()\"\r\n [disabled]=\"disabled()\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n (click)=\"handleClick($event)\"\r\n (mouseenter)=\"handleMouseEnter()\"\r\n (mouseleave)=\"handleMouseLeave()\"\r\n >\r\n <span class=\"button-container\">\r\n @if (iconName()) {\r\n <cura-icon [name]=\"iconName()\" [size]=\"iconSize()\" [color]=\"symbolColor()\" [iconset]=\"iconset()\" [disabled]=\"disabled()\"> </cura-icon>\r\n }\r\n <cura-label class=\"label\" [size]=\"labelSize()\" lineHeight=\"normal\" [color]=\"symbolColor()\">\r\n <ng-container *ngTemplateOutlet=\"button\"></ng-container>\r\n </cura-label>\r\n </span>\r\n <cura-loader-circle [size]=\"size()\" [color]=\"symbolColor()\"> </cura-loader-circle>\r\n </button>\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"m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A,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,kBAAkB,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,QAAA,EAAA,WAAA,EAAA,OAAA,EAAA,aAAA,EAAA,YAAA,EAAA,cAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAS7E,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAX1C,SAAS;+BACE,yBAAyB,EAAA,OAAA,EAC1B,CAAC,YAAY,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,kBAAkB,CAAC,EAAA,IAAA,EAGnF;AACJ,wBAAA,aAAa,EAAE,0BAA0B;AACzC,wBAAA,sBAAsB,EAAE,YAAY;AACpC,wBAAA,aAAa,EAAE,QAAQ;AACxB,qBAAA,EAAA,QAAA,EAAA,w1DAAA,EAAA,MAAA,EAAA,CAAA,m1FAAA,CAAA,EAAA;;sBAsIA,YAAY;uBAAC,YAAY;;sBAMzB,YAAY;uBAAC,YAAY;;;AE9J5B;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"rededor-site-front-end-lib-cura-buttons-cura-button-transparent.mjs","sources":["../../../projects/site-front-end-lib/cura/buttons/cura-button-transparent/cura-button-transparent.component.ts","../../../projects/site-front-end-lib/cura/buttons/cura-button-transparent/cura-button-transparent.component.html","../../../projects/site-front-end-lib/cura/buttons/cura-button-transparent/rededor-site-front-end-lib-cura-buttons-cura-button-transparent.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, input, output, HostListener, computed, inject } from '@angular/core';\nimport { labelSizes, ButtonType, ButtonSize, IconPosition, FontColor, TextAlign } from '@rededor/site-front-end-lib/cura/buttons';\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\nimport { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';\nimport { CuraLoaderCircleComponent } from '@rededor/site-front-end-lib/cura/loaders/cura-loader-circle';\nimport { CuraLabelComponent } from '@rededor/site-front-end-lib/cura/forms/cura-label';\nimport { LabelSize } from '@rededor/site-front-end-lib/cura/forms';\n\n@Component({\n selector: 'cura-button-transparent',\n imports: [CommonModule, CuraIconComponent, CuraLoaderCircleComponent, CuraLabelComponent],\n templateUrl: './cura-button-transparent.component.html',\n styleUrls: ['./cura-button-transparent.component.scss'],\n host: {\n '[attr.role]': 'href() ? \"link\" : type()',\n '[attr.aria-disabled]': 'disabled()',\n '[attr.href]': 'href()',\n },\n})\nexport class CuraButtonTransparentComponent {\n private curaApi: CuraApiService = inject(CuraApiService);\n\n /**\n * Button type: button (default) | submit | reset\n */\n type = input<ButtonType>('button');\n\n /**\n * Button size: small | medium | large (default)\n */\n size = input<ButtonSize>('large');\n\n /**\n * Disabled state. Boolean.\n */\n disabled = input<boolean>(false);\n\n /**\n * Loading state. Boolean.\n */\n isLoading = input<boolean>(false);\n\n /**\n * Name of the icon to be used from iconset.\n */\n iconName = input<string>('');\n\n /**\n * Custom iconset if needed.\n */\n iconset = input<string>('default');\n\n /**\n * Icon position: left (default) | right.\n */\n iconPosition = input<IconPosition>('left');\n\n /**\n * Set button to FAB/icon only.\n */\n iconOnly = input<boolean>(false);\n\n /**\n * Property href switch button to link.\n */\n href = input<string>('');\n\n /**\n * Set target if link.\n */\n target = input<string>('_self');\n\n /**\n * Color base from color scheme. Default: primary.\n */\n color = input<string>('primary');\n\n /**\n * Set the font color to dark or light.\n * Default: dark.\n */\n fontColor = input<FontColor>('dark');\n\n /**\n * Set text alignment for the button label.\n * Values: left (default) | center | right.\n */\n textAlign = input<TextAlign>('left');\n\n /**\n * Justify icons and label inside the button.\n * Values: false (default) | true.\n */\n justify = input<boolean>(false);\n\n /**\n * Accessible name for the button (aria-label).\n * Required for icon-only buttons or when button text is not descriptive enough.\n */\n ariaLabel = input<string>('');\n\n buttonClick = output<Event>();\n\n hovered = false;\n\n // Computed signal\n buttonStyles = computed(() => {\n const styles: { [key: string]: string } = {};\n\n styles['--base-spacing'] = this.curaApi.theme.spacing.getSpacing();\n styles['--neutral-white'] = this.curaApi.theme.colors.getColor('neutral-white');\n styles['--neutral-base'] = this.curaApi.theme.colors.getColor('neutral-base');\n styles['--neutral-dark'] = this.curaApi.theme.colors.getColor('neutral-dark');\n styles['--font-size'] = this.curaApi.theme.fonts.getSize();\n styles['--font-family'] = this.curaApi.theme.fonts.getFamily();\n const weights = this.curaApi.theme.fonts.getWeights();\n styles['--font-weight-medium'] = weights.medium;\n styles['--text-align'] = this.textAlign();\n\n return styles;\n });\n\n containerClasses = computed(() => {\n const classes = [];\n classes.push(this.size()?.toLowerCase());\n classes.push(`icon-${this.iconPosition()?.toLowerCase()}`);\n\n if (this.iconOnly()) classes.push('icon-only');\n if (this.disabled()) classes.push('disabled');\n if (this.isLoading()) classes.push('isLoading');\n if (this.justify()) classes.push('justify');\n\n return classes.join(' ');\n });\n\n iconSize = computed(() => {\n return this.size() === 'large' ? '20' : '16';\n });\n\n symbolColor = computed(() => {\n if (this.disabled()) return 'neutral-dark';\n if (this.hovered && !this.isLoading()) {\n return this.fontColor() === 'light' ? `${this.color()}-light` : `${this.color()}-darker`;\n }\n return this.fontColor() === 'light' ? 'neutral-white' : `${this.color()}-dark`;\n });\n\n labelSize = computed(() => {\n return (labelSizes[this.size()] || labelSizes['default']) as LabelSize;\n });\n\n @HostListener('mouseenter')\n handleMouseEnter() {\n if (this.disabled()) return;\n this.hovered = true;\n }\n\n @HostListener('mouseleave')\n handleMouseLeave() {\n this.hovered = false;\n }\n\n handleClick(event: Event) {\n if (this.disabled() || this.isLoading()) {\n event.preventDefault();\n return;\n }\n\n this.buttonClick.emit(event);\n }\n}\n","<ng-template #button>\n <ng-content></ng-content>\n</ng-template>\n\n@if (href()) {\n <a\n [href]=\"disabled() ? '' : href()\"\n [target]=\"target()\"\n [class]=\"containerClasses()\"\n [ngStyle]=\"buttonStyles()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"handleClick($event)\"\n (mouseenter)=\"handleMouseEnter()\"\n (mouseleave)=\"handleMouseLeave()\"\n >\n <span class=\"button-container\">\n @if (iconName()) {\n <cura-icon [name]=\"iconName()\" [size]=\"iconSize()\" [color]=\"symbolColor()\" [iconset]=\"iconset()\" [disabled]=\"disabled()\"> </cura-icon>\n }\n <cura-label class=\"label\" [size]=\"labelSize()\" lineHeight=\"normal\" [color]=\"symbolColor()\">\n <ng-container *ngTemplateOutlet=\"button\"></ng-container>\n </cura-label>\n </span>\n <cura-loader-circle [size]=\"size()\" [color]=\"symbolColor()\"> </cura-loader-circle>\n </a>\n} @else {\n <button\n [type]=\"type()\"\n [class]=\"containerClasses()\"\n [ngStyle]=\"buttonStyles()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"handleClick($event)\"\n (mouseenter)=\"handleMouseEnter()\"\n (mouseleave)=\"handleMouseLeave()\"\n >\n <span class=\"button-container\">\n @if (iconName()) {\n <cura-icon [name]=\"iconName()\" [size]=\"iconSize()\" [color]=\"symbolColor()\" [iconset]=\"iconset()\" [disabled]=\"disabled()\"> </cura-icon>\n }\n <cura-label class=\"label\" [size]=\"labelSize()\" lineHeight=\"normal\" [color]=\"symbolColor()\">\n <ng-container *ngTemplateOutlet=\"button\"></ng-container>\n </cura-label>\n </span>\n <cura-loader-circle [size]=\"size()\" [color]=\"symbolColor()\"> </cura-loader-circle>\n </button>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MAoBa,8BAA8B,CAAA;AAX3C,IAAA,WAAA,GAAA;AAYU,QAAA,IAAA,CAAA,OAAO,GAAmB,MAAM,CAAC,cAAc,CAAC;AAExD;;AAEG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAa,QAAQ,gDAAC;AAElC;;AAEG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAa,OAAO,gDAAC;AAEjC;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CA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BAAiB,EAAE,yBAAyB,EAAE,kBAAkB,CAAC,EAAA,IAAA,EAGnF;AACJ,wBAAA,aAAa,EAAE,0BAA0B;AACzC,wBAAA,sBAAsB,EAAE,YAAY;AACpC,wBAAA,aAAa,EAAE,QAAQ;AACxB,qBAAA,EAAA,QAAA,EAAA,0vDAAA,EAAA,MAAA,EAAA,CAAA,m1FAAA,CAAA,EAAA;;sBAsIA,YAAY;uBAAC,YAAY;;sBAMzB,YAAY;uBAAC,YAAY;;;AE9J5B;;AAEG;;;;"}
|
|
@@ -144,16 +144,16 @@ class CuraButtonComponent {
|
|
|
144
144
|
}
|
|
145
145
|
this.buttonClick.emit(event);
|
|
146
146
|
}
|
|
147
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
148
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
147
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CuraButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
148
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: CuraButtonComponent, isStandalone: true, selector: "cura-button", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: false, transformFunction: null }, iconset: { classPropertyName: "iconset", publicName: "iconset", isSignal: true, isRequired: false, transformFunction: null }, iconPosition: { classPropertyName: "iconPosition", publicName: "iconPosition", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, background: { classPropertyName: "background", publicName: "background", isSignal: true, isRequired: false, transformFunction: null }, fontColor: { classPropertyName: "fontColor", publicName: "fontColor", isSignal: true, isRequired: false, transformFunction: null }, textAlign: { classPropertyName: "textAlign", publicName: "textAlign", isSignal: true, isRequired: false, transformFunction: null }, justify: { classPropertyName: "justify", publicName: "justify", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { buttonClick: "buttonClick" }, host: { listeners: { "mouseenter": "handleMouseEnter()", "mouseleave": "handleMouseLeave()" }, properties: { "attr.role": "href() ? \"link\" : type()", "attr.aria-disabled": "disabled()", "attr.href": "href()" } }, ngImport: i0, template: "<ng-template #button>\n <ng-content></ng-content>\n</ng-template>\n\n@if (href()) {\n <a\n [href]=\"disabled() ? '' : href()\"\n [target]=\"target()\"\n [class]=\"containerClasses()\"\n [ngStyle]=\"buttonStyles()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"handleClick($event)\"\n (mouseenter)=\"handleMouseEnter()\"\n (mouseleave)=\"handleMouseLeave()\"\n >\n <span class=\"button-container\">\n @if (iconName()) {\n <cura-icon [name]=\"iconName()\" [size]=\"iconSize()\" [color]=\"symbolColor()\" [iconset]=\"iconset()\" [disabled]=\"disabled()\"> </cura-icon>\n }\n <cura-label class=\"label\" [size]=\"labelSize()\" lineHeight=\"normal\" [color]=\"symbolColor()\">\n <ng-container *ngTemplateOutlet=\"button\"></ng-container>\n </cura-label>\n </span>\n <cura-loader-circle [size]=\"size()\" [color]=\"symbolColor()\"> </cura-loader-circle>\n </a>\n} @else {\n <button\n [type]=\"type()\"\n [class]=\"containerClasses()\"\n [ngStyle]=\"buttonStyles()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"handleClick($event)\"\n (mouseenter)=\"handleMouseEnter()\"\n (mouseleave)=\"handleMouseLeave()\"\n >\n <span class=\"button-container\">\n @if (iconName()) {\n <cura-icon [name]=\"iconName()\" [size]=\"iconSize()\" [color]=\"symbolColor()\" [iconset]=\"iconset()\" [disabled]=\"disabled()\"> </cura-icon>\n }\n <cura-label class=\"label\" [size]=\"labelSize()\" lineHeight=\"normal\" [color]=\"symbolColor()\">\n <ng-container *ngTemplateOutlet=\"button\"></ng-container>\n </cura-label>\n </span>\n <cura-loader-circle [size]=\"size()\" [color]=\"symbolColor()\"> </cura-loader-circle>\n </button>\n}\n", styles: [":host{--border-radius: 4px;display:inline-block;vertical-align:middle;position:relative}:host button,:host a{outline:none;box-shadow:none;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none!important;font-size:var(--font-size);cursor:pointer;transition:background-color .07s linear,box-shadow .07s linear,border-color .07s linear;border-radius:var(--border-radius);position:relative;background-color:var(--color-base-neutral-purewhite);box-sizing:border-box;border:none}:host button:focus,:host a:focus{outline:2px solid #6ea8ff}:host button:before,:host a:before{content:\"\";width:100%;height:100%;position:absolute;left:0;top:0;box-sizing:border-box;border:2px solid transparent;border-radius:var(--border-radius)}:host button:not(.disabled):not(.isLoading):before,:host a:not(.disabled):not(.isLoading):before{border:2px solid var(--color-base-color-light)}:host button:not(.disabled):hover,:host a:not(.disabled):hover{background:var(--color-base-color-light);box-shadow:0 4px 8px #26262629}:host button:not(.disabled):not(.isLoading):hover:before,:host a:not(.disabled):not(.isLoading):hover:before{border-color:var(--color-dark-color-base)}:host button:not(.isLoading):not(.disabled):active,:host a:not(.isLoading):not(.disabled):active{background-color:var(--color-dark-color-light)}:host button:not(.isLoading):not(.disabled):active:before,:host a:not(.isLoading):not(.disabled):active:before{border-color:var(--color-dark-color-light)}:host button:hover,:host a:hover{box-shadow:0 4px 8px #26262629}:host button.medium:hover,:host a.medium:hover{box-shadow:0 3px 6px #26262629}:host button.small:hover,:host a.small:hover{box-shadow:0 2px 5px #26262629}:host button:active,:host button.disabled:hover,:host button.isLoading:hover,:host a:active,:host a.disabled:hover,:host a.isLoading:hover{box-shadow:none!important}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px);min-height:calc(var(--cura-spacing-base) * 11px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px);min-height:calc(var(--cura-spacing-base) * 10px)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px);min-height:calc(var(--cura-spacing-base) * 8px)}:host button .button-container,:host a .button-container{display:flex;align-items:center;opacity:1;transition:opacity .2s linear;position:relative}:host button.icon-right .button-container,:host a.icon-right .button-container{flex-direction:row-reverse}:host button.justify .button-container,:host a.justify .button-container{width:100%}:host button cura-label,:host a cura-label{flex:1;text-align:var(--text-align, \"left\")}:host button.icon-left cura-icon,:host a.icon-left cura-icon{margin-right:calc(var(--cura-spacing-base) * 3px)}:host button.icon-right cura-icon,:host a.icon-right cura-icon{margin-left:calc(var(--cura-spacing-base) * 3px)}:host button.medium.icon-left cura-icon,:host button.small.icon-left cura-icon,:host a.medium.icon-left cura-icon,:host a.small.icon-left cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button.medium.icon-right cura-icon,:host button.small.icon-right cura-icon,:host a.medium.icon-right cura-icon,:host a.small.icon-right cura-icon{margin-left:calc(var(--cura-spacing-base) * 2px)}:host button.disabled,:host a.disabled{cursor:not-allowed;background-color:var(--neutral-pale-neutral-black)}:host button.icon-only,:host a.icon-only{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px)}:host button.icon-only cura-label,:host a.icon-only cura-label{display:none}:host button.icon-only cura-icon,:host a.icon-only cura-icon{margin-left:0!important;margin-right:0!important}:host button.icon-only.medium,:host a.icon-only.medium{padding:calc(var(--cura-spacing-base) * 3px)}:host button.icon-only.small,:host a.icon-only.small{padding:calc(var(--cura-spacing-base) * 2px)}:host button cura-loader-circle,:host a cura-loader-circle{position:absolute;display:none}:host button.isLoading,:host a.isLoading{cursor:wait}:host button.isLoading .button-container,:host a.isLoading .button-container{opacity:0}:host button.isLoading cura-loader-circle,:host a.isLoading cura-loader-circle{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: CuraLoaderCircleComponent, selector: "cura-loader-circle", inputs: ["size", "color"] }, { kind: "component", type: CuraLabelComponent, selector: "cura-label", inputs: ["size", "weight", "spotColor", "color", "marginBlock", "lineHeight", "textOverflow"] }] }); }
|
|
149
149
|
}
|
|
150
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CuraButtonComponent, decorators: [{
|
|
151
151
|
type: Component,
|
|
152
152
|
args: [{ selector: 'cura-button', imports: [CommonModule, CuraIconComponent, CuraLoaderCircleComponent, CuraLabelComponent], host: {
|
|
153
153
|
'[attr.role]': 'href() ? "link" : type()',
|
|
154
154
|
'[attr.aria-disabled]': 'disabled()',
|
|
155
155
|
'[attr.href]': 'href()',
|
|
156
|
-
}, template: "<ng-template #button>\
|
|
156
|
+
}, template: "<ng-template #button>\n <ng-content></ng-content>\n</ng-template>\n\n@if (href()) {\n <a\n [href]=\"disabled() ? '' : href()\"\n [target]=\"target()\"\n [class]=\"containerClasses()\"\n [ngStyle]=\"buttonStyles()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"handleClick($event)\"\n (mouseenter)=\"handleMouseEnter()\"\n (mouseleave)=\"handleMouseLeave()\"\n >\n <span class=\"button-container\">\n @if (iconName()) {\n <cura-icon [name]=\"iconName()\" [size]=\"iconSize()\" [color]=\"symbolColor()\" [iconset]=\"iconset()\" [disabled]=\"disabled()\"> </cura-icon>\n }\n <cura-label class=\"label\" [size]=\"labelSize()\" lineHeight=\"normal\" [color]=\"symbolColor()\">\n <ng-container *ngTemplateOutlet=\"button\"></ng-container>\n </cura-label>\n </span>\n <cura-loader-circle [size]=\"size()\" [color]=\"symbolColor()\"> </cura-loader-circle>\n </a>\n} @else {\n <button\n [type]=\"type()\"\n [class]=\"containerClasses()\"\n [ngStyle]=\"buttonStyles()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"handleClick($event)\"\n (mouseenter)=\"handleMouseEnter()\"\n (mouseleave)=\"handleMouseLeave()\"\n >\n <span class=\"button-container\">\n @if (iconName()) {\n <cura-icon [name]=\"iconName()\" [size]=\"iconSize()\" [color]=\"symbolColor()\" [iconset]=\"iconset()\" [disabled]=\"disabled()\"> </cura-icon>\n }\n <cura-label class=\"label\" [size]=\"labelSize()\" lineHeight=\"normal\" [color]=\"symbolColor()\">\n <ng-container *ngTemplateOutlet=\"button\"></ng-container>\n </cura-label>\n </span>\n <cura-loader-circle [size]=\"size()\" [color]=\"symbolColor()\"> </cura-loader-circle>\n </button>\n}\n", styles: [":host{--border-radius: 4px;display:inline-block;vertical-align:middle;position:relative}:host button,:host a{outline:none;box-shadow:none;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none!important;font-size:var(--font-size);cursor:pointer;transition:background-color .07s linear,box-shadow .07s linear,border-color .07s linear;border-radius:var(--border-radius);position:relative;background-color:var(--color-base-neutral-purewhite);box-sizing:border-box;border:none}:host button:focus,:host a:focus{outline:2px solid #6ea8ff}:host button:before,:host a:before{content:\"\";width:100%;height:100%;position:absolute;left:0;top:0;box-sizing:border-box;border:2px solid transparent;border-radius:var(--border-radius)}:host button:not(.disabled):not(.isLoading):before,:host a:not(.disabled):not(.isLoading):before{border:2px solid var(--color-base-color-light)}:host button:not(.disabled):hover,:host a:not(.disabled):hover{background:var(--color-base-color-light);box-shadow:0 4px 8px #26262629}:host button:not(.disabled):not(.isLoading):hover:before,:host a:not(.disabled):not(.isLoading):hover:before{border-color:var(--color-dark-color-base)}:host button:not(.isLoading):not(.disabled):active,:host a:not(.isLoading):not(.disabled):active{background-color:var(--color-dark-color-light)}:host button:not(.isLoading):not(.disabled):active:before,:host a:not(.isLoading):not(.disabled):active:before{border-color:var(--color-dark-color-light)}:host button:hover,:host a:hover{box-shadow:0 4px 8px #26262629}:host button.medium:hover,:host a.medium:hover{box-shadow:0 3px 6px #26262629}:host button.small:hover,:host a.small:hover{box-shadow:0 2px 5px #26262629}:host button:active,:host button.disabled:hover,:host button.isLoading:hover,:host a:active,:host a.disabled:hover,:host a.isLoading:hover{box-shadow:none!important}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px);min-height:calc(var(--cura-spacing-base) * 11px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px);min-height:calc(var(--cura-spacing-base) * 10px)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px);min-height:calc(var(--cura-spacing-base) * 8px)}:host button .button-container,:host a .button-container{display:flex;align-items:center;opacity:1;transition:opacity .2s linear;position:relative}:host button.icon-right .button-container,:host a.icon-right .button-container{flex-direction:row-reverse}:host button.justify .button-container,:host a.justify .button-container{width:100%}:host button cura-label,:host a cura-label{flex:1;text-align:var(--text-align, \"left\")}:host button.icon-left cura-icon,:host a.icon-left cura-icon{margin-right:calc(var(--cura-spacing-base) * 3px)}:host button.icon-right cura-icon,:host a.icon-right cura-icon{margin-left:calc(var(--cura-spacing-base) * 3px)}:host button.medium.icon-left cura-icon,:host button.small.icon-left cura-icon,:host a.medium.icon-left cura-icon,:host a.small.icon-left cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button.medium.icon-right cura-icon,:host button.small.icon-right cura-icon,:host a.medium.icon-right cura-icon,:host a.small.icon-right cura-icon{margin-left:calc(var(--cura-spacing-base) * 2px)}:host button.disabled,:host a.disabled{cursor:not-allowed;background-color:var(--neutral-pale-neutral-black)}:host button.icon-only,:host a.icon-only{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px)}:host button.icon-only cura-label,:host a.icon-only cura-label{display:none}:host button.icon-only cura-icon,:host a.icon-only cura-icon{margin-left:0!important;margin-right:0!important}:host button.icon-only.medium,:host a.icon-only.medium{padding:calc(var(--cura-spacing-base) * 3px)}:host button.icon-only.small,:host a.icon-only.small{padding:calc(var(--cura-spacing-base) * 2px)}:host button cura-loader-circle,:host a cura-loader-circle{position:absolute;display:none}:host button.isLoading,:host a.isLoading{cursor:wait}:host button.isLoading .button-container,:host a.isLoading .button-container{opacity:0}:host button.isLoading cura-loader-circle,:host a.isLoading cura-loader-circle{display:block}\n"] }]
|
|
157
157
|
}], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], iconName: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconName", required: false }] }], iconset: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconset", required: false }] }], iconPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPosition", required: false }] }], iconOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOnly", required: false }] }], href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], background: [{ type: i0.Input, args: [{ isSignal: true, alias: "background", required: false }] }], fontColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "fontColor", required: false }] }], textAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "textAlign", required: false }] }], justify: [{ type: i0.Input, args: [{ isSignal: true, alias: "justify", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], buttonClick: [{ type: i0.Output, args: ["buttonClick"] }], handleMouseEnter: [{
|
|
158
158
|
type: HostListener,
|
|
159
159
|
args: ['mouseenter']
|