@lucca-front/ng 18.2.2 → 18.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/callout/callout/callout.component.d.ts +8 -1
- package/callout/callout-disclosure/callout-disclosure.component.d.ts +8 -1
- package/callout/callout-icon.pipe.d.ts +14 -0
- package/callout/callout-popover/callout-popover.component.d.ts +8 -1
- package/callout/callout-state.d.ts +3 -2
- package/callout/callout.utils.d.ts +15 -0
- package/esm2022/button/button.component.mjs +2 -2
- package/esm2022/callout/callout/callout.component.mjs +17 -16
- package/esm2022/callout/callout-disclosure/callout-disclosure.component.mjs +16 -15
- package/esm2022/callout/callout-icon.pipe.mjs +23 -0
- package/esm2022/callout/callout-popover/callout-popover.component.mjs +19 -17
- package/esm2022/callout/callout-state.mjs +2 -1
- package/esm2022/callout/callout.utils.mjs +20 -0
- package/esm2022/core-select/option/option.component.mjs +3 -3
- package/esm2022/form-field/form-field.component.mjs +3 -3
- package/esm2022/forms/phone-number-input/phone-number-input.component.mjs +3 -3
- package/esm2022/forms/phone-number-input/validators.mjs +2 -2
- package/esm2022/multi-select/displayer/default-displayer.component.mjs +3 -3
- package/esm2022/multi-select/input/select-input.component.mjs +3 -3
- package/esm2022/multi-select/panel/panel.component.mjs +3 -3
- package/esm2022/option/item/option-item.component.mjs +3 -3
- package/esm2022/option/item/tree-option-item.component.mjs +3 -3
- package/esm2022/plg-push/plg-push.component.mjs +3 -3
- package/esm2022/popover2/content/popover-content/popover-content.component.mjs +3 -3
- package/esm2022/simple-select/panel/panel.component.mjs +3 -3
- package/esm2022/skeleton/skeleton-button/skeleton-button.component.mjs +2 -2
- package/esm2022/skeleton/skeleton-field/skeleton-field.component.mjs +2 -2
- package/fesm2022/lucca-front-ng-button.mjs +2 -2
- package/fesm2022/lucca-front-ng-button.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-callout.mjs +84 -43
- package/fesm2022/lucca-front-ng-callout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select.mjs +2 -2
- package/fesm2022/lucca-front-ng-core-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-field.mjs +2 -2
- package/fesm2022/lucca-front-ng-form-field.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs +3 -3
- package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-multi-select.mjs +6 -6
- package/fesm2022/lucca-front-ng-multi-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-option.mjs +4 -4
- package/fesm2022/lucca-front-ng-option.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-plg-push.mjs +2 -2
- package/fesm2022/lucca-front-ng-plg-push.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popover2.mjs +2 -2
- package/fesm2022/lucca-front-ng-popover2.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-simple-select.mjs +2 -2
- package/fesm2022/lucca-front-ng-simple-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-skeleton.mjs +4 -4
- package/fesm2022/lucca-front-ng-skeleton.mjs.map +1 -1
- package/package.json +15 -14
- package/schematics/action-icon/index.js +2 -13
- package/schematics/empty-state-title/index.js +2 -13
- package/schematics/lib/local-deps/installer.js +18 -0
- package/schematics/lib/local-deps/package.json +23 -0
- package/schematics/new-icons/index.js +2 -13
- package/schematics/palettes/index.js +2 -13
- package/schematics/tokens-spacing/index.js +2 -13
- package/src/components/_calendar.scss +5 -3
- package/src/components/_dropdown.scss +2 -1
- package/src/components/_popup.scss +2 -1
- package/src/components/_sidepanel.scss +3 -1
- package/src/components/cdk/_overlay.scss +2 -1
- package/src/components/cdk/_textarea.scss +3 -1
- package/src/definitions/option/_option-item.scss +3 -2
|
@@ -26,7 +26,14 @@ export declare class CalloutComponent {
|
|
|
26
26
|
* Defaults to no icon.
|
|
27
27
|
*/
|
|
28
28
|
icon: LuccaIcon;
|
|
29
|
-
|
|
29
|
+
/**
|
|
30
|
+
* State is a shorthand to set the icon and the palette to the recommended values for the icon and palette based on
|
|
31
|
+
* the provided state.
|
|
32
|
+
*
|
|
33
|
+
* If one of the icon or palette inputs are filled along with the state input, their values will have the priority over
|
|
34
|
+
* state (so setting state to success and palette to warning will make the palette warning)
|
|
35
|
+
*/
|
|
36
|
+
state: CalloutState;
|
|
30
37
|
/**
|
|
31
38
|
* Is the callout removed? Works with two way binding too.
|
|
32
39
|
*/
|
|
@@ -8,7 +8,14 @@ export declare class CalloutDisclosureComponent {
|
|
|
8
8
|
heading: PortalContent;
|
|
9
9
|
palette: Palette;
|
|
10
10
|
size: 'M' | 'S';
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* State is a shorthand to set the icon and the palette to the recommended values for the icon and palette based on
|
|
13
|
+
* the provided state.
|
|
14
|
+
*
|
|
15
|
+
* If one of the icon or palette inputs are filled along with the state input, their values will have the priority over
|
|
16
|
+
* state (so setting state to success and palette to warning will make the palette warning)
|
|
17
|
+
*/
|
|
18
|
+
state: CalloutState;
|
|
12
19
|
open: boolean;
|
|
13
20
|
openChange: EventEmitter<boolean>;
|
|
14
21
|
onToggle(event: Event): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { LuccaIcon } from '@lucca-front/icons';
|
|
3
|
+
import { CalloutState } from './callout-state';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Get icon for callout
|
|
7
|
+
*
|
|
8
|
+
* If the icon is defined then it takes priority over the callout state icon
|
|
9
|
+
*/
|
|
10
|
+
export declare class CalloutIconPipe implements PipeTransform {
|
|
11
|
+
transform(state: CalloutState, icon: LuccaIcon): LuccaIcon | undefined;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CalloutIconPipe, never>;
|
|
13
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CalloutIconPipe, "luCalloutIcon", true>;
|
|
14
|
+
}
|
|
@@ -33,7 +33,14 @@ export declare class CalloutPopoverComponent implements OnDestroy {
|
|
|
33
33
|
* Icon shows in button and next to popover's title
|
|
34
34
|
*/
|
|
35
35
|
icon: LuccaIcon;
|
|
36
|
-
|
|
36
|
+
/**
|
|
37
|
+
* State is a shorthand to set the icon and the palette to the recommended values for the icon and palette based on
|
|
38
|
+
* the provided state.
|
|
39
|
+
*
|
|
40
|
+
* If one of the icon or palette inputs are filled along with the state input, their values will have the priority over
|
|
41
|
+
* state (so setting state to success and palette to warning will make the palette warning)
|
|
42
|
+
*/
|
|
43
|
+
state: CalloutState;
|
|
37
44
|
/**
|
|
38
45
|
* Heading for the details popover
|
|
39
46
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Palette } from '@lucca-front/ng/core';
|
|
2
1
|
import { LuccaIcon } from '@lucca-front/icons';
|
|
3
|
-
|
|
2
|
+
import { Palette } from '@lucca-front/ng/core';
|
|
3
|
+
export declare const CalloutStates: readonly ["success", "warning", "error"];
|
|
4
|
+
export type CalloutState = (typeof CalloutStates)[number];
|
|
4
5
|
export declare const CalloutStateMap: Record<CalloutState, {
|
|
5
6
|
icon: LuccaIcon;
|
|
6
7
|
palette: Palette;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LuccaIcon } from '@lucca-front/icons';
|
|
2
|
+
import { Palette } from '@lucca-front/ng/core';
|
|
3
|
+
import { CalloutState } from './callout-state';
|
|
4
|
+
/**
|
|
5
|
+
* Get icon for callout
|
|
6
|
+
*
|
|
7
|
+
* If the icon is defined then it takes priority over the callout state icon
|
|
8
|
+
*/
|
|
9
|
+
export declare function getCalloutIcon(state: CalloutState | undefined, icon: LuccaIcon | undefined): LuccaIcon | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Get palette for callout
|
|
12
|
+
*
|
|
13
|
+
* If the palette is different from "none" then it takes priority over the callout state palette
|
|
14
|
+
*/
|
|
15
|
+
export declare function getCalloutPalette(state: CalloutState | undefined, palette: Palette): string;
|
|
@@ -53,13 +53,13 @@ export class ButtonComponent {
|
|
|
53
53
|
this.#luClass.setState(ngClassConfig);
|
|
54
54
|
}
|
|
55
55
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
56
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.0.1", type: ButtonComponent, isStandalone: true, selector: "button[luButton],a[luButton]", inputs: { size: "size", block: ["block", "block", booleanAttribute], delete: ["delete", "delete", booleanAttribute], palette: "palette", state: "state", luButton: "luButton" }, host: { classAttribute: "button" }, providers: [LuClass], queries: [{ propertyName: "iconComponentRef", first: true, predicate: IconComponent, descendants: true, read: (ElementRef) }], usesOnChanges: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: ["@charset \"UTF-8\";.button{--components-button-font-size: var(--sizes-M-fontSize);--components-button-line-height: var(--sizes-M-lineHeight);--components-button-padding: var(--pr-t-spacings-100) var(--pr-t-spacings-200);--components-button-gap: var(--pr-t-spacings-100);--components-button-opacity: 1;--components-button-cursor: pointer;--components-button-pointerEvents: auto;--components-button-width: auto;--components-button-minWidth: none;--components-button-userSelect: auto;--components-button-boxShadow: none;--components-button-color: var(--palettes-0, var(--palettes-text, var(--palettes-product-0)));--components-button-backgroundColor: var(--palettes-700, var(--palettes-product-700));--icon-size: 1.5rem;background-color:var(--components-button-backgroundColor);box-shadow:var(--components-button-boxShadow);border-radius:var(--commons-borderRadius-M);line-height:var(--components-button-line-height);padding:var(--components-button-padding);transition-property:background-color,color,border-color,box-shadow;transition-duration:var(--commons-animations-durations-fast);width:var(--components-button-width);min-width:var(--components-button-minWidth);font-size:var(--components-button-font-size);gap:var(--components-button-gap);pointer-events:var(--components-button-pointerEvents);-webkit-user-select:var(--components-button-userSelect);user-select:var(--components-button-userSelect);opacity:var(--components-button-opacity);cursor:var(--components-button-cursor);transition-timing-function:ease;font-family:inherit;display:inline-flex;align-items:center;justify-content:center;position:relative;text-decoration:none;vertical-align:middle;white-space:nowrap;text-align:center;font-weight:600;border:0}.button,.button:is(a){color:var(--components-button-color)}.button .lucca-icon{display:block}.button .button-icon{--icon-size: 1.5rem}.button:not(.mod-outlined,.mod-outline) .numericBadge{--components-numericBadge-background: var(--palettes-product-200);--components-numericBadge-color: var(--palettes-product-800)}.button:hover{--components-button-color: var(--palettes-0, var(--palettes-text, var(--palettes-product-0)));--components-button-backgroundColor: var(--palettes-600, var(--palettes-product-600))}.button:focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:2px}.button:active{--components-button-backgroundColor: var(--palettes-800, var(--palettes-product-800))}.button:disabled{--components-button-cursor: default;--components-button-color: var(--palettes-neutral-500);--components-button-backgroundColor: var(--commons-disabled-background);--components-button-pointerEvents: none}.button:disabled .numericBadge{background-color:var(--palettes-neutral-200);color:var(--palettes-neutral-500)}.button.mod-block{--components-button-width: 100%}.button.mod-S{--icon-size: 1.25rem;--components-button-font-size: var(--sizes-S-fontSize);--components-button-line-height: var(--sizes-S-lineHeight);--components-button-padding: var(--pr-t-spacings-75) var(--pr-t-spacings-150);--components-button-gap: var(--pr-t-spacings-75)}.button.mod-S .numericBadge{--components-numericBadge-size: 1.25rem;--components-numericBadge-borderRadius: 6px;--components-numericBadge-fontSize: var(--sizes-XS-fontSize);--components-numericBadge-lineHeight: var(--sizes-XS-lineHeight)}.button.mod-XS{--icon-size: 1rem;--components-button-font-size: var(--sizes-XS-fontSize);--components-button-line-height: var(--sizes-XS-lineHeight);--components-button-padding: var(--pr-t-spacings-50) var(--pr-t-spacings-100);--components-button-gap: var(--pr-t-spacings-50)}.button.mod-XS .numericBadge{--components-numericBadge-size: 1rem;--components-numericBadge-borderRadius: var(--commons-borderRadius-M);--components-numericBadge-fontSize: var(--sizes-XS-fontSize);--components-numericBadge-lineHeight: var(--sizes-XS-lineHeight)}.button.mod-outlined:where(:not(.is-success,.is-error)),.button.mod-outline:where(:not(.is-success,.is-error)){--components-button-backgroundColor: var(--palettes-neutral-0);--components-button-color: var(--palettes-700, var(--palettes-neutral-700));--components-button-boxShadow: 0 0 0 var(--commons-divider-width) var(--palettes-400, var(--palettes-neutral-400))}.button.mod-outlined:where(:not(.is-success,.is-error)):hover,.button.mod-outline:where(:not(.is-success,.is-error)):hover{--components-button-color: var(--palettes-700, var(--palettes-neutral-700));--components-button-backgroundColor: var(--palettes-100, var(--palettes-neutral-100))}.button.mod-outlined:where(:not(.is-success,.is-error)):active,.button.mod-outline:where(:not(.is-success,.is-error)):active{--components-button-backgroundColor: var(--palettes-200, var(--palettes-neutral-200))}.button.mod-outlined:where(:not(.is-success,.is-error)):focus-visible,.button.mod-outline:where(:not(.is-success,.is-error)):focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:3px}.button.mod-outlined:where(:not(.is-success,.is-error)):disabled,.button.mod-outline:where(:not(.is-success,.is-error)):disabled{--components-button-backgroundColor: var(--palettes-neutral-0);--components-button-boxShadow: 0 0 0 1px var(--commons-disabled-placeholder);--components-button-color: var(--palettes-neutral-500)}.button.mod-outlined.is-disabled,.button.mod-outlined.disabled,.button.mod-outline.is-disabled,.button.mod-outline.disabled{--components-button-backgroundColor: var(--palettes-neutral-0);--components-button-boxShadow: 0 0 0 1px var(--commons-disabled-placeholder);--components-button-color: var(--palettes-neutral-500)}.button.mod-text:where(:not(.is-success,.is-error)),.button.mod-link:where(:not(.is-success,.is-error)){--components-button-backgroundColor: transparent;--components-button-color: var(--palettes-700, var(--palettes-neutral-700))}.button.mod-text:where(:not(.is-success,.is-error)):hover,.button.mod-text:where(:not(.is-success,.is-error)):focus-visible,.button.mod-link:where(:not(.is-success,.is-error)):hover,.button.mod-link:where(:not(.is-success,.is-error)):focus-visible{--components-button-color: var(--palettes-700, var(--palettes-neutral-700));--components-button-backgroundColor: var(--palettes-100, var(--palettes-neutral-100))}.button.mod-text:where(:not(.is-success,.is-error)):active,.button.mod-link:where(:not(.is-success,.is-error)):active{--components-button-backgroundColor: var(--palettes-200, var(--palettes-neutral-200))}.button.mod-text:where(:not(.is-success,.is-error)):disabled,.button.mod-link:where(:not(.is-success,.is-error)):disabled{--components-button-backgroundColor: transparent;--components-button-color: var(--palettes-neutral-500)}.button.mod-text.is-disabled,.button.mod-text.disabled,.button.mod-link.is-disabled,.button.mod-link.disabled{--components-button-backgroundColor: transparent;--components-button-color: var(--palettes-neutral-500)}.button.mod-withIcon,.button.mod-icon{--components-button-padding: var(--pr-t-spacings-100) var(--pr-t-spacings-150)}.button.mod-withIcon.mod-S,.button.mod-icon.mod-S{--components-button-padding: var(--pr-t-spacings-75) var(--pr-t-spacings-150)}.button.mod-withIcon.mod-XS,.button.mod-icon.mod-XS{--components-button-padding: var(--pr-t-spacings-50) var(--pr-t-spacings-100)}.button.mod-onlyIcon{--components-button-padding: var(--pr-t-spacings-100)}.button.mod-onlyIcon.mod-S{--components-button-padding: var(--pr-t-spacings-75)}.button.mod-onlyIcon.mod-XS{--components-button-padding: var(--pr-t-spacings-50)}.button.mod-delete:hover{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-100)}.button.mod-delete:active{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-200)}.button.mod-delete.mod-text:hover,.button.mod-delete.mod-text:focus-visible,.button.mod-delete.mod-link:hover,.button.mod-delete.mod-link:focus-visible{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-100)}.button.mod-delete.mod-text:active,.button.mod-delete.mod-link:active{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-200)}.button.mod-delete.mod-outlined:hover,.button.mod-delete.mod-outline:hover{--components-button-boxShadow: 0 0 0 var(--commons-divider-width) var(--palettes-error-400);--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-100)}.button.mod-delete.mod-outlined:focus-visible,.button.mod-delete.mod-outline:focus-visible{--components-button-boxShadow: 0 0 0 var(--commons-divider-width) var(--palettes-error-400);--components-button-color: var(--palettes-error-700)}.button.mod-delete.mod-outlined:active,.button.mod-delete.mod-outline:active{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-200)}.button.mod-inverted,.button.mod-invert{--components-button-color: var(--palettes-neutral-0)}.button.mod-inverted:hover,.button.mod-inverted:focus-visible,.button.mod-invert:hover,.button.mod-invert:focus-visible{--components-button-color: var(--palettes-neutral-0);--components-button-backgroundColor: var(--palettes-neutral-900)}.button.mod-inverted:active,.button.mod-invert:active{--components-button-backgroundColor: var(--palettes-neutral-700)}.button.mod-more{--components-button-minWidth: 2rem;--components-button-padding: 0}.button.mod-more:before{--icon-content: \"\\e97c\";font-weight:400;display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:Lucca icons;content:var(--icon-content);-webkit-font-smoothing:antialiased;text-transform:none;height:0;vertical-align:text-top}.button.mod-more.mod-S{--components-button-minWidth: 1.75rem}.button.mod-more.mod-XS{--components-button-minWidth: 1.5rem}.button.is-loading,.button.loading{--components-button-opacity: .4;--components-button-pointerEvents: none;--components-button-color: transparent;--components-button-userSelect: none}.button.is-loading:after,.button.loading:after{content:\"\";width:var(--components-button-font-size);height:var(--components-button-font-size);border-radius:var(--commons-borderRadius-full);line-height:.8rem;border-width:3px;inset:0;margin:auto;position:absolute;border-style:solid;animation-name:rotate;animation-duration:var(--commons-loading-speed);animation-timing-function:linear;animation-iteration-count:infinite;border-color:var(--commons-loading-frontground);border-top-color:transparent}.button.is-loading.mod-S:after,.button.loading.mod-S:after{content:\"\";width:var(--sizes-S-fontSize);height:var(--sizes-S-fontSize);border-radius:var(--commons-borderRadius-full);line-height:.8rem;border-width:3px;inset:0;margin:auto;position:absolute;border-style:solid;animation-name:rotate;animation-duration:var(--commons-loading-speed);animation-timing-function:linear;animation-iteration-count:infinite;border-color:var(--commons-loading-frontground);border-top-color:transparent}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.button.is-error,.button.error{--palettes-text: #ffffff;--palettes-0: #ffffff;--palettes-50: #ffebec;--palettes-100: #ffd6d8;--palettes-200: #fdbebe;--palettes-300: #faa3a3;--palettes-400: #fa8989;--palettes-500: #f76e6e;--palettes-600: #f15050;--palettes-700: #da2f2f;--palettes-800: #aa0e0e;--palettes-900: #630303;--components-button-color: transparent;--components-button-pointerEvents: none;--components-button-userSelect: none}.button.is-error:after,.button.error:after{color:var(--palettes-neutral-0);font-size:calc(1.5 * var(--components-button-font-size));height:var(--components-button-line-height);inset:0;margin:auto;position:absolute}.button.is-error:after,.button.error:after{--icon-content: \"\\e9bf\";font-weight:400;display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:Lucca icons;content:var(--icon-content);-webkit-font-smoothing:antialiased;text-transform:none}.button.is-success,.button.success{--palettes-text: #ffffff;--palettes-0: #ffffff;--palettes-50: #dbfae0;--palettes-100: #bef3c7;--palettes-200: #a2ebaf;--palettes-300: #84e695;--palettes-400: #68d97b;--palettes-500: #57c769;--palettes-600: #39b155;--palettes-700: #279b42;--palettes-800: #0a762e;--palettes-900: #004d20;--components-button-color: transparent;--components-button-pointerEvents: none;--components-button-userSelect: none}.button.is-success:after,.button.success:after{color:var(--palettes-neutral-0);font-size:calc(1.5 * var(--components-button-font-size));height:var(--components-button-line-height);inset:0;margin:auto;position:absolute}.button.is-success:after,.button.success:after{--icon-content: \"\\e97d\";font-weight:400;display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:Lucca icons;content:var(--icon-content);-webkit-font-smoothing:antialiased;text-transform:none}.button.is-disabled,.button.disabled{--components-button-cursor: default;--components-button-color: var(--palettes-neutral-500);--components-button-backgroundColor: var(--commons-disabled-background);--components-button-pointerEvents: none}.button.is-disabled .numericBadge,.button.disabled .numericBadge{background-color:var(--palettes-neutral-200);color:var(--palettes-neutral-500)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
56
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.0.1", type: ButtonComponent, isStandalone: true, selector: "button[luButton],a[luButton]", inputs: { size: "size", block: ["block", "block", booleanAttribute], delete: ["delete", "delete", booleanAttribute], palette: "palette", state: "state", luButton: "luButton" }, host: { classAttribute: "button" }, providers: [LuClass], queries: [{ propertyName: "iconComponentRef", first: true, predicate: IconComponent, descendants: true, read: (ElementRef) }], usesOnChanges: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: ["@charset \"UTF-8\";.button{--components-button-font-size: var(--sizes-M-fontSize);--components-button-line-height: var(--sizes-M-lineHeight);--components-button-padding: var(--pr-t-spacings-100) var(--pr-t-spacings-200);--components-button-gap: var(--pr-t-spacings-100);--components-button-opacity: 1;--components-button-cursor: pointer;--components-button-pointerEvents: auto;--components-button-width: auto;--components-button-minWidth: none;--components-button-userSelect: auto;--components-button-boxShadow: none;--components-button-color: var(--palettes-0, var(--palettes-text, var(--palettes-product-0)));--components-button-backgroundColor: var(--palettes-700, var(--palettes-product-700));--icon-size: 1.5rem;background-color:var(--components-button-backgroundColor);box-shadow:var(--components-button-boxShadow);border-radius:var(--commons-borderRadius-M);line-height:var(--components-button-line-height);padding:var(--components-button-padding);transition-property:background-color,color,border-color,box-shadow;transition-duration:var(--commons-animations-durations-fast);width:var(--components-button-width);min-width:var(--components-button-minWidth);font-size:var(--components-button-font-size);gap:var(--components-button-gap);pointer-events:var(--components-button-pointerEvents);-webkit-user-select:var(--components-button-userSelect);user-select:var(--components-button-userSelect);opacity:var(--components-button-opacity);cursor:var(--components-button-cursor);transition-timing-function:ease;font-family:inherit;display:inline-flex;align-items:center;justify-content:center;position:relative;text-decoration:none;vertical-align:middle;white-space:nowrap;text-align:center;font-weight:600;border:0}.button,.button:is(a){color:var(--components-button-color)}.button .lucca-icon{display:block}.button .button-icon{--icon-size: 1.5rem}.button:not(.mod-outlined,.mod-outline) .numericBadge{--components-numericBadge-background: var(--palettes-200, var(--palettes-product-200));--components-numericBadge-color: var(--palettes-800, var(--palettes-product-700))}.button:hover{--components-button-color: var(--palettes-0, var(--palettes-text, var(--palettes-product-0)));--components-button-backgroundColor: var(--palettes-600, var(--palettes-product-600))}.button:focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:2px}.button:active{--components-button-backgroundColor: var(--palettes-800, var(--palettes-product-800))}.button:disabled{--components-button-cursor: default;--components-button-color: var(--palettes-neutral-500);--components-button-backgroundColor: var(--commons-disabled-background);--components-button-pointerEvents: none}.button:disabled .numericBadge{background-color:var(--palettes-neutral-200);color:var(--palettes-neutral-500)}.button.mod-block{--components-button-width: 100%}.button.mod-S{--icon-size: 1.25rem;--components-button-font-size: var(--sizes-S-fontSize);--components-button-line-height: var(--sizes-S-lineHeight);--components-button-padding: var(--pr-t-spacings-75) var(--pr-t-spacings-150);--components-button-gap: var(--pr-t-spacings-75)}.button.mod-S .numericBadge{--components-numericBadge-size: 1.25rem;--components-numericBadge-borderRadius: 6px;--components-numericBadge-fontSize: var(--sizes-XS-fontSize);--components-numericBadge-lineHeight: var(--sizes-XS-lineHeight)}.button.mod-XS{--icon-size: 1rem;--components-button-font-size: var(--sizes-XS-fontSize);--components-button-line-height: var(--sizes-XS-lineHeight);--components-button-padding: var(--pr-t-spacings-50) var(--pr-t-spacings-100);--components-button-gap: var(--pr-t-spacings-50)}.button.mod-XS .numericBadge{--components-numericBadge-size: 1rem;--components-numericBadge-borderRadius: var(--commons-borderRadius-M);--components-numericBadge-fontSize: var(--sizes-XS-fontSize);--components-numericBadge-lineHeight: var(--sizes-XS-lineHeight)}.button.mod-outlined:where(:not(.is-success,.is-error)),.button.mod-outline:where(:not(.is-success,.is-error)){--components-button-backgroundColor: var(--palettes-neutral-0);--components-button-color: var(--palettes-700, var(--palettes-neutral-700));--components-button-boxShadow: 0 0 0 var(--commons-divider-width) var(--palettes-400, var(--palettes-neutral-400))}.button.mod-outlined:where(:not(.is-success,.is-error)):hover,.button.mod-outline:where(:not(.is-success,.is-error)):hover{--components-button-color: var(--palettes-700, var(--palettes-neutral-700));--components-button-backgroundColor: var(--palettes-100, var(--palettes-neutral-100))}.button.mod-outlined:where(:not(.is-success,.is-error)):active,.button.mod-outline:where(:not(.is-success,.is-error)):active{--components-button-backgroundColor: var(--palettes-200, var(--palettes-neutral-200))}.button.mod-outlined:where(:not(.is-success,.is-error)):focus-visible,.button.mod-outline:where(:not(.is-success,.is-error)):focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:3px}.button.mod-outlined:where(:not(.is-success,.is-error)):disabled,.button.mod-outline:where(:not(.is-success,.is-error)):disabled{--components-button-backgroundColor: var(--palettes-neutral-0);--components-button-boxShadow: 0 0 0 1px var(--commons-disabled-placeholder);--components-button-color: var(--palettes-neutral-500)}.button.mod-outlined.is-disabled,.button.mod-outlined.disabled,.button.mod-outline.is-disabled,.button.mod-outline.disabled{--components-button-backgroundColor: var(--palettes-neutral-0);--components-button-boxShadow: 0 0 0 1px var(--commons-disabled-placeholder);--components-button-color: var(--palettes-neutral-500)}.button.mod-text:where(:not(.is-success,.is-error)),.button.mod-link:where(:not(.is-success,.is-error)){--components-button-backgroundColor: transparent;--components-button-color: var(--palettes-700, var(--palettes-neutral-700))}.button.mod-text:where(:not(.is-success,.is-error)):hover,.button.mod-text:where(:not(.is-success,.is-error)):focus-visible,.button.mod-link:where(:not(.is-success,.is-error)):hover,.button.mod-link:where(:not(.is-success,.is-error)):focus-visible{--components-button-color: var(--palettes-700, var(--palettes-neutral-700));--components-button-backgroundColor: var(--palettes-100, var(--palettes-neutral-100))}.button.mod-text:where(:not(.is-success,.is-error)):active,.button.mod-link:where(:not(.is-success,.is-error)):active{--components-button-backgroundColor: var(--palettes-200, var(--palettes-neutral-200))}.button.mod-text:where(:not(.is-success,.is-error)):disabled,.button.mod-link:where(:not(.is-success,.is-error)):disabled{--components-button-backgroundColor: transparent;--components-button-color: var(--palettes-neutral-500)}.button.mod-text.is-disabled,.button.mod-text.disabled,.button.mod-link.is-disabled,.button.mod-link.disabled{--components-button-backgroundColor: transparent;--components-button-color: var(--palettes-neutral-500)}.button.mod-withIcon,.button.mod-icon{--components-button-padding: var(--pr-t-spacings-100) var(--pr-t-spacings-150)}.button.mod-withIcon.mod-S,.button.mod-icon.mod-S{--components-button-padding: var(--pr-t-spacings-75) var(--pr-t-spacings-150)}.button.mod-withIcon.mod-XS,.button.mod-icon.mod-XS{--components-button-padding: var(--pr-t-spacings-50) var(--pr-t-spacings-100)}.button.mod-onlyIcon{--components-button-padding: var(--pr-t-spacings-100)}.button.mod-onlyIcon.mod-S{--components-button-padding: var(--pr-t-spacings-75)}.button.mod-onlyIcon.mod-XS{--components-button-padding: var(--pr-t-spacings-50)}.button.mod-delete:hover{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-100)}.button.mod-delete:active{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-200)}.button.mod-delete.mod-text:hover,.button.mod-delete.mod-text:focus-visible,.button.mod-delete.mod-link:hover,.button.mod-delete.mod-link:focus-visible{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-100)}.button.mod-delete.mod-text:active,.button.mod-delete.mod-link:active{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-200)}.button.mod-delete.mod-outlined:hover,.button.mod-delete.mod-outline:hover{--components-button-boxShadow: 0 0 0 var(--commons-divider-width) var(--palettes-error-400);--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-100)}.button.mod-delete.mod-outlined:focus-visible,.button.mod-delete.mod-outline:focus-visible{--components-button-boxShadow: 0 0 0 var(--commons-divider-width) var(--palettes-error-400);--components-button-color: var(--palettes-error-700)}.button.mod-delete.mod-outlined:active,.button.mod-delete.mod-outline:active{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-200)}.button.mod-inverted,.button.mod-invert{--components-button-color: var(--palettes-neutral-0)}.button.mod-inverted:hover,.button.mod-inverted:focus-visible,.button.mod-invert:hover,.button.mod-invert:focus-visible{--components-button-color: var(--palettes-neutral-0);--components-button-backgroundColor: var(--palettes-neutral-900)}.button.mod-inverted:active,.button.mod-invert:active{--components-button-backgroundColor: var(--palettes-neutral-700)}.button.mod-more{--components-button-minWidth: 2rem;--components-button-padding: 0}.button.mod-more:before{--icon-content: \"\\e97c\";font-weight:400;display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:Lucca icons;content:var(--icon-content);-webkit-font-smoothing:antialiased;text-transform:none;height:0;vertical-align:text-top}.button.mod-more.mod-S{--components-button-minWidth: 1.75rem}.button.mod-more.mod-XS{--components-button-minWidth: 1.5rem}.button.is-loading,.button.loading{--components-button-opacity: .4;--components-button-pointerEvents: none;--components-button-color: transparent;--components-button-userSelect: none}.button.is-loading:after,.button.loading:after{content:\"\";width:var(--components-button-font-size);height:var(--components-button-font-size);border-radius:var(--commons-borderRadius-full);line-height:.8rem;border-width:3px;inset:0;margin:auto;position:absolute;border-style:solid;animation-name:rotate;animation-duration:var(--commons-loading-speed);animation-timing-function:linear;animation-iteration-count:infinite;border-color:var(--commons-loading-frontground);border-top-color:transparent}.button.is-loading.mod-S:after,.button.loading.mod-S:after{content:\"\";width:var(--sizes-S-fontSize);height:var(--sizes-S-fontSize);border-radius:var(--commons-borderRadius-full);line-height:.8rem;border-width:3px;inset:0;margin:auto;position:absolute;border-style:solid;animation-name:rotate;animation-duration:var(--commons-loading-speed);animation-timing-function:linear;animation-iteration-count:infinite;border-color:var(--commons-loading-frontground);border-top-color:transparent}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.button.is-error,.button.error{--palettes-text: #ffffff;--palettes-0: #ffffff;--palettes-50: #ffebec;--palettes-100: #ffd6d8;--palettes-200: #fdbebe;--palettes-300: #faa3a3;--palettes-400: #fa8989;--palettes-500: #f76e6e;--palettes-600: #f15050;--palettes-700: #da2f2f;--palettes-800: #aa0e0e;--palettes-900: #630303;--components-button-color: transparent;--components-button-pointerEvents: none;--components-button-userSelect: none}.button.is-error:after,.button.error:after{color:var(--palettes-neutral-0);font-size:calc(1.5 * var(--components-button-font-size));height:var(--components-button-line-height);inset:0;margin:auto;position:absolute}.button.is-error:after,.button.error:after{--icon-content: \"\\e9bf\";font-weight:400;display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:Lucca icons;content:var(--icon-content);-webkit-font-smoothing:antialiased;text-transform:none}.button.is-success,.button.success{--palettes-text: #ffffff;--palettes-0: #ffffff;--palettes-50: #dbfae0;--palettes-100: #bef3c7;--palettes-200: #a2ebaf;--palettes-300: #84e695;--palettes-400: #68d97b;--palettes-500: #57c769;--palettes-600: #39b155;--palettes-700: #279b42;--palettes-800: #0a762e;--palettes-900: #004d20;--components-button-color: transparent;--components-button-pointerEvents: none;--components-button-userSelect: none}.button.is-success:after,.button.success:after{color:var(--palettes-neutral-0);font-size:calc(1.5 * var(--components-button-font-size));height:var(--components-button-line-height);inset:0;margin:auto;position:absolute}.button.is-success:after,.button.success:after{--icon-content: \"\\e97d\";font-weight:400;display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:Lucca icons;content:var(--icon-content);-webkit-font-smoothing:antialiased;text-transform:none}.button.is-disabled,.button.disabled{--components-button-cursor: default;--components-button-color: var(--palettes-neutral-500);--components-button-backgroundColor: var(--commons-disabled-background);--components-button-pointerEvents: none}.button.is-disabled .numericBadge,.button.disabled .numericBadge{background-color:var(--palettes-neutral-200);color:var(--palettes-neutral-500)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
57
57
|
}
|
|
58
58
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
59
59
|
type: Component,
|
|
60
60
|
args: [{ selector: 'button[luButton],a[luButton]', standalone: true, providers: [LuClass], template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
61
61
|
class: 'button',
|
|
62
|
-
}, styles: ["@charset \"UTF-8\";.button{--components-button-font-size: var(--sizes-M-fontSize);--components-button-line-height: var(--sizes-M-lineHeight);--components-button-padding: var(--pr-t-spacings-100) var(--pr-t-spacings-200);--components-button-gap: var(--pr-t-spacings-100);--components-button-opacity: 1;--components-button-cursor: pointer;--components-button-pointerEvents: auto;--components-button-width: auto;--components-button-minWidth: none;--components-button-userSelect: auto;--components-button-boxShadow: none;--components-button-color: var(--palettes-0, var(--palettes-text, var(--palettes-product-0)));--components-button-backgroundColor: var(--palettes-700, var(--palettes-product-700));--icon-size: 1.5rem;background-color:var(--components-button-backgroundColor);box-shadow:var(--components-button-boxShadow);border-radius:var(--commons-borderRadius-M);line-height:var(--components-button-line-height);padding:var(--components-button-padding);transition-property:background-color,color,border-color,box-shadow;transition-duration:var(--commons-animations-durations-fast);width:var(--components-button-width);min-width:var(--components-button-minWidth);font-size:var(--components-button-font-size);gap:var(--components-button-gap);pointer-events:var(--components-button-pointerEvents);-webkit-user-select:var(--components-button-userSelect);user-select:var(--components-button-userSelect);opacity:var(--components-button-opacity);cursor:var(--components-button-cursor);transition-timing-function:ease;font-family:inherit;display:inline-flex;align-items:center;justify-content:center;position:relative;text-decoration:none;vertical-align:middle;white-space:nowrap;text-align:center;font-weight:600;border:0}.button,.button:is(a){color:var(--components-button-color)}.button .lucca-icon{display:block}.button .button-icon{--icon-size: 1.5rem}.button:not(.mod-outlined,.mod-outline) .numericBadge{--components-numericBadge-background: var(--palettes-product-200);--components-numericBadge-color: var(--palettes-product-800)}.button:hover{--components-button-color: var(--palettes-0, var(--palettes-text, var(--palettes-product-0)));--components-button-backgroundColor: var(--palettes-600, var(--palettes-product-600))}.button:focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:2px}.button:active{--components-button-backgroundColor: var(--palettes-800, var(--palettes-product-800))}.button:disabled{--components-button-cursor: default;--components-button-color: var(--palettes-neutral-500);--components-button-backgroundColor: var(--commons-disabled-background);--components-button-pointerEvents: none}.button:disabled .numericBadge{background-color:var(--palettes-neutral-200);color:var(--palettes-neutral-500)}.button.mod-block{--components-button-width: 100%}.button.mod-S{--icon-size: 1.25rem;--components-button-font-size: var(--sizes-S-fontSize);--components-button-line-height: var(--sizes-S-lineHeight);--components-button-padding: var(--pr-t-spacings-75) var(--pr-t-spacings-150);--components-button-gap: var(--pr-t-spacings-75)}.button.mod-S .numericBadge{--components-numericBadge-size: 1.25rem;--components-numericBadge-borderRadius: 6px;--components-numericBadge-fontSize: var(--sizes-XS-fontSize);--components-numericBadge-lineHeight: var(--sizes-XS-lineHeight)}.button.mod-XS{--icon-size: 1rem;--components-button-font-size: var(--sizes-XS-fontSize);--components-button-line-height: var(--sizes-XS-lineHeight);--components-button-padding: var(--pr-t-spacings-50) var(--pr-t-spacings-100);--components-button-gap: var(--pr-t-spacings-50)}.button.mod-XS .numericBadge{--components-numericBadge-size: 1rem;--components-numericBadge-borderRadius: var(--commons-borderRadius-M);--components-numericBadge-fontSize: var(--sizes-XS-fontSize);--components-numericBadge-lineHeight: var(--sizes-XS-lineHeight)}.button.mod-outlined:where(:not(.is-success,.is-error)),.button.mod-outline:where(:not(.is-success,.is-error)){--components-button-backgroundColor: var(--palettes-neutral-0);--components-button-color: var(--palettes-700, var(--palettes-neutral-700));--components-button-boxShadow: 0 0 0 var(--commons-divider-width) var(--palettes-400, var(--palettes-neutral-400))}.button.mod-outlined:where(:not(.is-success,.is-error)):hover,.button.mod-outline:where(:not(.is-success,.is-error)):hover{--components-button-color: var(--palettes-700, var(--palettes-neutral-700));--components-button-backgroundColor: var(--palettes-100, var(--palettes-neutral-100))}.button.mod-outlined:where(:not(.is-success,.is-error)):active,.button.mod-outline:where(:not(.is-success,.is-error)):active{--components-button-backgroundColor: var(--palettes-200, var(--palettes-neutral-200))}.button.mod-outlined:where(:not(.is-success,.is-error)):focus-visible,.button.mod-outline:where(:not(.is-success,.is-error)):focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:3px}.button.mod-outlined:where(:not(.is-success,.is-error)):disabled,.button.mod-outline:where(:not(.is-success,.is-error)):disabled{--components-button-backgroundColor: var(--palettes-neutral-0);--components-button-boxShadow: 0 0 0 1px var(--commons-disabled-placeholder);--components-button-color: var(--palettes-neutral-500)}.button.mod-outlined.is-disabled,.button.mod-outlined.disabled,.button.mod-outline.is-disabled,.button.mod-outline.disabled{--components-button-backgroundColor: var(--palettes-neutral-0);--components-button-boxShadow: 0 0 0 1px var(--commons-disabled-placeholder);--components-button-color: var(--palettes-neutral-500)}.button.mod-text:where(:not(.is-success,.is-error)),.button.mod-link:where(:not(.is-success,.is-error)){--components-button-backgroundColor: transparent;--components-button-color: var(--palettes-700, var(--palettes-neutral-700))}.button.mod-text:where(:not(.is-success,.is-error)):hover,.button.mod-text:where(:not(.is-success,.is-error)):focus-visible,.button.mod-link:where(:not(.is-success,.is-error)):hover,.button.mod-link:where(:not(.is-success,.is-error)):focus-visible{--components-button-color: var(--palettes-700, var(--palettes-neutral-700));--components-button-backgroundColor: var(--palettes-100, var(--palettes-neutral-100))}.button.mod-text:where(:not(.is-success,.is-error)):active,.button.mod-link:where(:not(.is-success,.is-error)):active{--components-button-backgroundColor: var(--palettes-200, var(--palettes-neutral-200))}.button.mod-text:where(:not(.is-success,.is-error)):disabled,.button.mod-link:where(:not(.is-success,.is-error)):disabled{--components-button-backgroundColor: transparent;--components-button-color: var(--palettes-neutral-500)}.button.mod-text.is-disabled,.button.mod-text.disabled,.button.mod-link.is-disabled,.button.mod-link.disabled{--components-button-backgroundColor: transparent;--components-button-color: var(--palettes-neutral-500)}.button.mod-withIcon,.button.mod-icon{--components-button-padding: var(--pr-t-spacings-100) var(--pr-t-spacings-150)}.button.mod-withIcon.mod-S,.button.mod-icon.mod-S{--components-button-padding: var(--pr-t-spacings-75) var(--pr-t-spacings-150)}.button.mod-withIcon.mod-XS,.button.mod-icon.mod-XS{--components-button-padding: var(--pr-t-spacings-50) var(--pr-t-spacings-100)}.button.mod-onlyIcon{--components-button-padding: var(--pr-t-spacings-100)}.button.mod-onlyIcon.mod-S{--components-button-padding: var(--pr-t-spacings-75)}.button.mod-onlyIcon.mod-XS{--components-button-padding: var(--pr-t-spacings-50)}.button.mod-delete:hover{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-100)}.button.mod-delete:active{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-200)}.button.mod-delete.mod-text:hover,.button.mod-delete.mod-text:focus-visible,.button.mod-delete.mod-link:hover,.button.mod-delete.mod-link:focus-visible{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-100)}.button.mod-delete.mod-text:active,.button.mod-delete.mod-link:active{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-200)}.button.mod-delete.mod-outlined:hover,.button.mod-delete.mod-outline:hover{--components-button-boxShadow: 0 0 0 var(--commons-divider-width) var(--palettes-error-400);--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-100)}.button.mod-delete.mod-outlined:focus-visible,.button.mod-delete.mod-outline:focus-visible{--components-button-boxShadow: 0 0 0 var(--commons-divider-width) var(--palettes-error-400);--components-button-color: var(--palettes-error-700)}.button.mod-delete.mod-outlined:active,.button.mod-delete.mod-outline:active{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-200)}.button.mod-inverted,.button.mod-invert{--components-button-color: var(--palettes-neutral-0)}.button.mod-inverted:hover,.button.mod-inverted:focus-visible,.button.mod-invert:hover,.button.mod-invert:focus-visible{--components-button-color: var(--palettes-neutral-0);--components-button-backgroundColor: var(--palettes-neutral-900)}.button.mod-inverted:active,.button.mod-invert:active{--components-button-backgroundColor: var(--palettes-neutral-700)}.button.mod-more{--components-button-minWidth: 2rem;--components-button-padding: 0}.button.mod-more:before{--icon-content: \"\\e97c\";font-weight:400;display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:Lucca icons;content:var(--icon-content);-webkit-font-smoothing:antialiased;text-transform:none;height:0;vertical-align:text-top}.button.mod-more.mod-S{--components-button-minWidth: 1.75rem}.button.mod-more.mod-XS{--components-button-minWidth: 1.5rem}.button.is-loading,.button.loading{--components-button-opacity: .4;--components-button-pointerEvents: none;--components-button-color: transparent;--components-button-userSelect: none}.button.is-loading:after,.button.loading:after{content:\"\";width:var(--components-button-font-size);height:var(--components-button-font-size);border-radius:var(--commons-borderRadius-full);line-height:.8rem;border-width:3px;inset:0;margin:auto;position:absolute;border-style:solid;animation-name:rotate;animation-duration:var(--commons-loading-speed);animation-timing-function:linear;animation-iteration-count:infinite;border-color:var(--commons-loading-frontground);border-top-color:transparent}.button.is-loading.mod-S:after,.button.loading.mod-S:after{content:\"\";width:var(--sizes-S-fontSize);height:var(--sizes-S-fontSize);border-radius:var(--commons-borderRadius-full);line-height:.8rem;border-width:3px;inset:0;margin:auto;position:absolute;border-style:solid;animation-name:rotate;animation-duration:var(--commons-loading-speed);animation-timing-function:linear;animation-iteration-count:infinite;border-color:var(--commons-loading-frontground);border-top-color:transparent}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.button.is-error,.button.error{--palettes-text: #ffffff;--palettes-0: #ffffff;--palettes-50: #ffebec;--palettes-100: #ffd6d8;--palettes-200: #fdbebe;--palettes-300: #faa3a3;--palettes-400: #fa8989;--palettes-500: #f76e6e;--palettes-600: #f15050;--palettes-700: #da2f2f;--palettes-800: #aa0e0e;--palettes-900: #630303;--components-button-color: transparent;--components-button-pointerEvents: none;--components-button-userSelect: none}.button.is-error:after,.button.error:after{color:var(--palettes-neutral-0);font-size:calc(1.5 * var(--components-button-font-size));height:var(--components-button-line-height);inset:0;margin:auto;position:absolute}.button.is-error:after,.button.error:after{--icon-content: \"\\e9bf\";font-weight:400;display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:Lucca icons;content:var(--icon-content);-webkit-font-smoothing:antialiased;text-transform:none}.button.is-success,.button.success{--palettes-text: #ffffff;--palettes-0: #ffffff;--palettes-50: #dbfae0;--palettes-100: #bef3c7;--palettes-200: #a2ebaf;--palettes-300: #84e695;--palettes-400: #68d97b;--palettes-500: #57c769;--palettes-600: #39b155;--palettes-700: #279b42;--palettes-800: #0a762e;--palettes-900: #004d20;--components-button-color: transparent;--components-button-pointerEvents: none;--components-button-userSelect: none}.button.is-success:after,.button.success:after{color:var(--palettes-neutral-0);font-size:calc(1.5 * var(--components-button-font-size));height:var(--components-button-line-height);inset:0;margin:auto;position:absolute}.button.is-success:after,.button.success:after{--icon-content: \"\\e97d\";font-weight:400;display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:Lucca icons;content:var(--icon-content);-webkit-font-smoothing:antialiased;text-transform:none}.button.is-disabled,.button.disabled{--components-button-cursor: default;--components-button-color: var(--palettes-neutral-500);--components-button-backgroundColor: var(--commons-disabled-background);--components-button-pointerEvents: none}.button.is-disabled .numericBadge,.button.disabled .numericBadge{background-color:var(--palettes-neutral-200);color:var(--palettes-neutral-500)}\n"] }]
|
|
62
|
+
}, styles: ["@charset \"UTF-8\";.button{--components-button-font-size: var(--sizes-M-fontSize);--components-button-line-height: var(--sizes-M-lineHeight);--components-button-padding: var(--pr-t-spacings-100) var(--pr-t-spacings-200);--components-button-gap: var(--pr-t-spacings-100);--components-button-opacity: 1;--components-button-cursor: pointer;--components-button-pointerEvents: auto;--components-button-width: auto;--components-button-minWidth: none;--components-button-userSelect: auto;--components-button-boxShadow: none;--components-button-color: var(--palettes-0, var(--palettes-text, var(--palettes-product-0)));--components-button-backgroundColor: var(--palettes-700, var(--palettes-product-700));--icon-size: 1.5rem;background-color:var(--components-button-backgroundColor);box-shadow:var(--components-button-boxShadow);border-radius:var(--commons-borderRadius-M);line-height:var(--components-button-line-height);padding:var(--components-button-padding);transition-property:background-color,color,border-color,box-shadow;transition-duration:var(--commons-animations-durations-fast);width:var(--components-button-width);min-width:var(--components-button-minWidth);font-size:var(--components-button-font-size);gap:var(--components-button-gap);pointer-events:var(--components-button-pointerEvents);-webkit-user-select:var(--components-button-userSelect);user-select:var(--components-button-userSelect);opacity:var(--components-button-opacity);cursor:var(--components-button-cursor);transition-timing-function:ease;font-family:inherit;display:inline-flex;align-items:center;justify-content:center;position:relative;text-decoration:none;vertical-align:middle;white-space:nowrap;text-align:center;font-weight:600;border:0}.button,.button:is(a){color:var(--components-button-color)}.button .lucca-icon{display:block}.button .button-icon{--icon-size: 1.5rem}.button:not(.mod-outlined,.mod-outline) .numericBadge{--components-numericBadge-background: var(--palettes-200, var(--palettes-product-200));--components-numericBadge-color: var(--palettes-800, var(--palettes-product-700))}.button:hover{--components-button-color: var(--palettes-0, var(--palettes-text, var(--palettes-product-0)));--components-button-backgroundColor: var(--palettes-600, var(--palettes-product-600))}.button:focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:2px}.button:active{--components-button-backgroundColor: var(--palettes-800, var(--palettes-product-800))}.button:disabled{--components-button-cursor: default;--components-button-color: var(--palettes-neutral-500);--components-button-backgroundColor: var(--commons-disabled-background);--components-button-pointerEvents: none}.button:disabled .numericBadge{background-color:var(--palettes-neutral-200);color:var(--palettes-neutral-500)}.button.mod-block{--components-button-width: 100%}.button.mod-S{--icon-size: 1.25rem;--components-button-font-size: var(--sizes-S-fontSize);--components-button-line-height: var(--sizes-S-lineHeight);--components-button-padding: var(--pr-t-spacings-75) var(--pr-t-spacings-150);--components-button-gap: var(--pr-t-spacings-75)}.button.mod-S .numericBadge{--components-numericBadge-size: 1.25rem;--components-numericBadge-borderRadius: 6px;--components-numericBadge-fontSize: var(--sizes-XS-fontSize);--components-numericBadge-lineHeight: var(--sizes-XS-lineHeight)}.button.mod-XS{--icon-size: 1rem;--components-button-font-size: var(--sizes-XS-fontSize);--components-button-line-height: var(--sizes-XS-lineHeight);--components-button-padding: var(--pr-t-spacings-50) var(--pr-t-spacings-100);--components-button-gap: var(--pr-t-spacings-50)}.button.mod-XS .numericBadge{--components-numericBadge-size: 1rem;--components-numericBadge-borderRadius: var(--commons-borderRadius-M);--components-numericBadge-fontSize: var(--sizes-XS-fontSize);--components-numericBadge-lineHeight: var(--sizes-XS-lineHeight)}.button.mod-outlined:where(:not(.is-success,.is-error)),.button.mod-outline:where(:not(.is-success,.is-error)){--components-button-backgroundColor: var(--palettes-neutral-0);--components-button-color: var(--palettes-700, var(--palettes-neutral-700));--components-button-boxShadow: 0 0 0 var(--commons-divider-width) var(--palettes-400, var(--palettes-neutral-400))}.button.mod-outlined:where(:not(.is-success,.is-error)):hover,.button.mod-outline:where(:not(.is-success,.is-error)):hover{--components-button-color: var(--palettes-700, var(--palettes-neutral-700));--components-button-backgroundColor: var(--palettes-100, var(--palettes-neutral-100))}.button.mod-outlined:where(:not(.is-success,.is-error)):active,.button.mod-outline:where(:not(.is-success,.is-error)):active{--components-button-backgroundColor: var(--palettes-200, var(--palettes-neutral-200))}.button.mod-outlined:where(:not(.is-success,.is-error)):focus-visible,.button.mod-outline:where(:not(.is-success,.is-error)):focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:3px}.button.mod-outlined:where(:not(.is-success,.is-error)):disabled,.button.mod-outline:where(:not(.is-success,.is-error)):disabled{--components-button-backgroundColor: var(--palettes-neutral-0);--components-button-boxShadow: 0 0 0 1px var(--commons-disabled-placeholder);--components-button-color: var(--palettes-neutral-500)}.button.mod-outlined.is-disabled,.button.mod-outlined.disabled,.button.mod-outline.is-disabled,.button.mod-outline.disabled{--components-button-backgroundColor: var(--palettes-neutral-0);--components-button-boxShadow: 0 0 0 1px var(--commons-disabled-placeholder);--components-button-color: var(--palettes-neutral-500)}.button.mod-text:where(:not(.is-success,.is-error)),.button.mod-link:where(:not(.is-success,.is-error)){--components-button-backgroundColor: transparent;--components-button-color: var(--palettes-700, var(--palettes-neutral-700))}.button.mod-text:where(:not(.is-success,.is-error)):hover,.button.mod-text:where(:not(.is-success,.is-error)):focus-visible,.button.mod-link:where(:not(.is-success,.is-error)):hover,.button.mod-link:where(:not(.is-success,.is-error)):focus-visible{--components-button-color: var(--palettes-700, var(--palettes-neutral-700));--components-button-backgroundColor: var(--palettes-100, var(--palettes-neutral-100))}.button.mod-text:where(:not(.is-success,.is-error)):active,.button.mod-link:where(:not(.is-success,.is-error)):active{--components-button-backgroundColor: var(--palettes-200, var(--palettes-neutral-200))}.button.mod-text:where(:not(.is-success,.is-error)):disabled,.button.mod-link:where(:not(.is-success,.is-error)):disabled{--components-button-backgroundColor: transparent;--components-button-color: var(--palettes-neutral-500)}.button.mod-text.is-disabled,.button.mod-text.disabled,.button.mod-link.is-disabled,.button.mod-link.disabled{--components-button-backgroundColor: transparent;--components-button-color: var(--palettes-neutral-500)}.button.mod-withIcon,.button.mod-icon{--components-button-padding: var(--pr-t-spacings-100) var(--pr-t-spacings-150)}.button.mod-withIcon.mod-S,.button.mod-icon.mod-S{--components-button-padding: var(--pr-t-spacings-75) var(--pr-t-spacings-150)}.button.mod-withIcon.mod-XS,.button.mod-icon.mod-XS{--components-button-padding: var(--pr-t-spacings-50) var(--pr-t-spacings-100)}.button.mod-onlyIcon{--components-button-padding: var(--pr-t-spacings-100)}.button.mod-onlyIcon.mod-S{--components-button-padding: var(--pr-t-spacings-75)}.button.mod-onlyIcon.mod-XS{--components-button-padding: var(--pr-t-spacings-50)}.button.mod-delete:hover{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-100)}.button.mod-delete:active{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-200)}.button.mod-delete.mod-text:hover,.button.mod-delete.mod-text:focus-visible,.button.mod-delete.mod-link:hover,.button.mod-delete.mod-link:focus-visible{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-100)}.button.mod-delete.mod-text:active,.button.mod-delete.mod-link:active{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-200)}.button.mod-delete.mod-outlined:hover,.button.mod-delete.mod-outline:hover{--components-button-boxShadow: 0 0 0 var(--commons-divider-width) var(--palettes-error-400);--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-100)}.button.mod-delete.mod-outlined:focus-visible,.button.mod-delete.mod-outline:focus-visible{--components-button-boxShadow: 0 0 0 var(--commons-divider-width) var(--palettes-error-400);--components-button-color: var(--palettes-error-700)}.button.mod-delete.mod-outlined:active,.button.mod-delete.mod-outline:active{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-200)}.button.mod-inverted,.button.mod-invert{--components-button-color: var(--palettes-neutral-0)}.button.mod-inverted:hover,.button.mod-inverted:focus-visible,.button.mod-invert:hover,.button.mod-invert:focus-visible{--components-button-color: var(--palettes-neutral-0);--components-button-backgroundColor: var(--palettes-neutral-900)}.button.mod-inverted:active,.button.mod-invert:active{--components-button-backgroundColor: var(--palettes-neutral-700)}.button.mod-more{--components-button-minWidth: 2rem;--components-button-padding: 0}.button.mod-more:before{--icon-content: \"\\e97c\";font-weight:400;display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:Lucca icons;content:var(--icon-content);-webkit-font-smoothing:antialiased;text-transform:none;height:0;vertical-align:text-top}.button.mod-more.mod-S{--components-button-minWidth: 1.75rem}.button.mod-more.mod-XS{--components-button-minWidth: 1.5rem}.button.is-loading,.button.loading{--components-button-opacity: .4;--components-button-pointerEvents: none;--components-button-color: transparent;--components-button-userSelect: none}.button.is-loading:after,.button.loading:after{content:\"\";width:var(--components-button-font-size);height:var(--components-button-font-size);border-radius:var(--commons-borderRadius-full);line-height:.8rem;border-width:3px;inset:0;margin:auto;position:absolute;border-style:solid;animation-name:rotate;animation-duration:var(--commons-loading-speed);animation-timing-function:linear;animation-iteration-count:infinite;border-color:var(--commons-loading-frontground);border-top-color:transparent}.button.is-loading.mod-S:after,.button.loading.mod-S:after{content:\"\";width:var(--sizes-S-fontSize);height:var(--sizes-S-fontSize);border-radius:var(--commons-borderRadius-full);line-height:.8rem;border-width:3px;inset:0;margin:auto;position:absolute;border-style:solid;animation-name:rotate;animation-duration:var(--commons-loading-speed);animation-timing-function:linear;animation-iteration-count:infinite;border-color:var(--commons-loading-frontground);border-top-color:transparent}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.button.is-error,.button.error{--palettes-text: #ffffff;--palettes-0: #ffffff;--palettes-50: #ffebec;--palettes-100: #ffd6d8;--palettes-200: #fdbebe;--palettes-300: #faa3a3;--palettes-400: #fa8989;--palettes-500: #f76e6e;--palettes-600: #f15050;--palettes-700: #da2f2f;--palettes-800: #aa0e0e;--palettes-900: #630303;--components-button-color: transparent;--components-button-pointerEvents: none;--components-button-userSelect: none}.button.is-error:after,.button.error:after{color:var(--palettes-neutral-0);font-size:calc(1.5 * var(--components-button-font-size));height:var(--components-button-line-height);inset:0;margin:auto;position:absolute}.button.is-error:after,.button.error:after{--icon-content: \"\\e9bf\";font-weight:400;display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:Lucca icons;content:var(--icon-content);-webkit-font-smoothing:antialiased;text-transform:none}.button.is-success,.button.success{--palettes-text: #ffffff;--palettes-0: #ffffff;--palettes-50: #dbfae0;--palettes-100: #bef3c7;--palettes-200: #a2ebaf;--palettes-300: #84e695;--palettes-400: #68d97b;--palettes-500: #57c769;--palettes-600: #39b155;--palettes-700: #279b42;--palettes-800: #0a762e;--palettes-900: #004d20;--components-button-color: transparent;--components-button-pointerEvents: none;--components-button-userSelect: none}.button.is-success:after,.button.success:after{color:var(--palettes-neutral-0);font-size:calc(1.5 * var(--components-button-font-size));height:var(--components-button-line-height);inset:0;margin:auto;position:absolute}.button.is-success:after,.button.success:after{--icon-content: \"\\e97d\";font-weight:400;display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:Lucca icons;content:var(--icon-content);-webkit-font-smoothing:antialiased;text-transform:none}.button.is-disabled,.button.disabled{--components-button-cursor: default;--components-button-color: var(--palettes-neutral-500);--components-button-backgroundColor: var(--commons-disabled-background);--components-button-pointerEvents: none}.button.is-disabled .numericBadge,.button.disabled .numericBadge{background-color:var(--palettes-neutral-200);color:var(--palettes-neutral-500)}\n"] }]
|
|
63
63
|
}], propDecorators: { size: [{
|
|
64
64
|
type: Input
|
|
65
65
|
}], block: [{
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { NgClass
|
|
1
|
+
import { NgClass } from '@angular/common';
|
|
2
2
|
import { booleanAttribute, ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, Output, ViewEncapsulation } from '@angular/core';
|
|
3
3
|
import { getIntl, PortalDirective } from '@lucca-front/ng/core';
|
|
4
|
-
import {
|
|
4
|
+
import { CalloutIconPipe } from '../callout-icon.pipe';
|
|
5
5
|
import { LU_CALLOUT_TRANSLATIONS } from '../callout.translate';
|
|
6
|
+
import { getCalloutPalette } from '../callout.utils';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
export class CalloutComponent {
|
|
8
9
|
constructor() {
|
|
@@ -12,30 +13,22 @@ export class CalloutComponent {
|
|
|
12
13
|
this.removedChange = new EventEmitter();
|
|
13
14
|
this.intl = getIntl(LU_CALLOUT_TRANSLATIONS);
|
|
14
15
|
}
|
|
15
|
-
set state(state) {
|
|
16
|
-
const { icon, palette } = CalloutStateMap[state];
|
|
17
|
-
if (this.palette === 'none') {
|
|
18
|
-
this.palette = palette;
|
|
19
|
-
}
|
|
20
|
-
if (!this.icon) {
|
|
21
|
-
this.icon = icon;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
16
|
get hiddenAttr() {
|
|
25
17
|
return this.removed ? 'hidden' : null;
|
|
26
18
|
}
|
|
27
19
|
get calloutClasses() {
|
|
20
|
+
const palette = getCalloutPalette(this.state, this.palette);
|
|
28
21
|
return {
|
|
29
22
|
[`mod-${this.size}`]: !!this.size,
|
|
30
|
-
[`palette-${
|
|
23
|
+
[`palette-${palette}`]: !!palette,
|
|
31
24
|
};
|
|
32
25
|
}
|
|
33
26
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: CalloutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
34
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
27
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.1", type: CalloutComponent, isStandalone: true, selector: "lu-callout", inputs: { heading: "heading", palette: "palette", size: "size", removable: ["removable", "removable", booleanAttribute], icon: "icon", state: "state", removed: ["removed", "removed", booleanAttribute] }, outputs: { removedChange: "removedChange" }, host: { properties: { "attr.hidden": "this.hiddenAttr" } }, ngImport: i0, template: "@if (!removed) {\n<div class=\"callout\" [ngClass]=\"calloutClasses\">\n\t@if (state | luCalloutIcon: icon; as calloutIcon) {\n\t<div class=\"callout-icon\">\n\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-{{calloutIcon}}\"></span>\n\t</div>\n\t}\n\t<div class=\"callout-content\">\n\t\t@if (heading) {\n\t\t<strong class=\"callout-content-title\">\n\t\t\t<ng-container *luPortal=\"heading\"></ng-container>\n\t\t</strong>\n\t\t}\n\t\t<div class=\"callout-content-description\">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t</div>\n\t@if (removable) {\n\t<button type=\"button\" class=\"callout-kill\" (click)=\"removed = true; removedChange.emit(true)\">\n\t\t<span class=\"u-mask\">{{ intl.close }}</span>\n\t</button>\n\t}\n</div>\n}\n", styles: ["@charset \"UTF-8\";.callout{--components-callout-gap: var(--pr-t-spacings-150);--components-callout-display: flex;--components-callout-padding: var(--pr-t-spacings-100) var(--pr-t-spacings-150);--components-callout-fontSize: inherit;--components-callout-lineHeight: inherit;--components-callout-kill-size: 1.5rem;align-items:flex-start;position:relative;border-radius:var(--commons-borderRadius-L);background-color:var(--palettes-50, var(--palettes-neutral-50));color:var(--palettes-neutral-800);box-shadow:0 0 0 var(--commons-divider-width) var(--palettes-300, var(--palettes-neutral-300));gap:var(--components-callout-gap);padding:var(--components-callout-padding);font-size:var(--components-callout-fontSize);line-height:var(--components-callout-lineHeight)}.callout:not([hidden]){display:var(--components-callout-display)}.callout a,.callout .link{--commons-text-link-color: var(--palettes-neutral-800);--commons-text-link-hover: var(--palettes-neutral-700)}.callout-content{flex:1;display:flex;flex-direction:column;gap:var(--pr-t-spacings-50)}.callout-content-title{font-weight:600}.callout-content-description-actions{display:flex;gap:var(--pr-t-spacings-75);margin-top:var(--pr-t-spacings-50);padding:var(--pr-t-spacings-50) 0}.callout-content-description-actions .button{--icon-size: 1.25rem;--components-button-font-size: var(--sizes-S-fontSize);--components-button-line-height: var(--sizes-S-lineHeight);--components-button-padding: var(--pr-t-spacings-75) var(--pr-t-spacings-150);--components-button-gap: var(--pr-t-spacings-75)}.callout-content-description-actions .button .numericBadge{--components-numericBadge-size: 1.25rem;--components-numericBadge-borderRadius: 6px;--components-numericBadge-fontSize: var(--sizes-XS-fontSize);--components-numericBadge-lineHeight: var(--sizes-XS-lineHeight)}.callout-icon{display:inline-flex;color:var(--palettes-700, var(--palettes-neutral-700))}.callout-kill{padding:0;border:0;width:100%;background-color:transparent;color:inherit;text-align:left;display:block;font:inherit;cursor:pointer;color:var(--palettes-neutral-700);text-align:center;transition-duration:var(--commons-animations-durations-fast);transition-property:background-color;height:var(--components-callout-kill-size);width:var(--components-callout-kill-size)}.callout-kill:focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:2px;border-radius:var(--commons-borderRadius-M)}.callout-kill:before{--icon-content: \"\\e9bf\";font-weight:400;display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:Lucca icons;content:var(--icon-content);-webkit-font-smoothing:antialiased;text-transform:none;font-size:var(--sizes-S-lineHeight)}.callout.mod-S{--components-callout-gap: var(--pr-t-spacings-100);--components-callout-fontSize: var(--sizes-S-fontSize);--components-callout-lineHeight: var(--sizes-S-lineHeight);--components-callout-kill-size: 1.25rem}.callout.mod-S .callout-icon{--icon-size: 1.25rem}.callout.mod-S .callout-content-description-actions .button{--icon-size: 1rem;--components-button-font-size: var(--sizes-XS-fontSize);--components-button-line-height: var(--sizes-XS-lineHeight);--components-button-padding: var(--pr-t-spacings-50) var(--pr-t-spacings-100);--components-button-gap: var(--pr-t-spacings-50)}.callout.mod-S .callout-content-description-actions .button .numericBadge{--components-numericBadge-size: 1rem;--components-numericBadge-borderRadius: var(--commons-borderRadius-M);--components-numericBadge-fontSize: var(--sizes-XS-fontSize);--components-numericBadge-lineHeight: var(--sizes-XS-lineHeight)}lu-callout{display:block}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: PortalDirective, selector: "[luPortal]", inputs: ["luPortal", "luPortalContext"] }, { kind: "pipe", type: CalloutIconPipe, name: "luCalloutIcon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
35
28
|
}
|
|
36
29
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: CalloutComponent, decorators: [{
|
|
37
30
|
type: Component,
|
|
38
|
-
args: [{ selector: 'lu-callout', standalone: true, imports: [NgClass,
|
|
31
|
+
args: [{ selector: 'lu-callout', standalone: true, imports: [NgClass, PortalDirective, CalloutIconPipe], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "@if (!removed) {\n<div class=\"callout\" [ngClass]=\"calloutClasses\">\n\t@if (state | luCalloutIcon: icon; as calloutIcon) {\n\t<div class=\"callout-icon\">\n\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-{{calloutIcon}}\"></span>\n\t</div>\n\t}\n\t<div class=\"callout-content\">\n\t\t@if (heading) {\n\t\t<strong class=\"callout-content-title\">\n\t\t\t<ng-container *luPortal=\"heading\"></ng-container>\n\t\t</strong>\n\t\t}\n\t\t<div class=\"callout-content-description\">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t</div>\n\t@if (removable) {\n\t<button type=\"button\" class=\"callout-kill\" (click)=\"removed = true; removedChange.emit(true)\">\n\t\t<span class=\"u-mask\">{{ intl.close }}</span>\n\t</button>\n\t}\n</div>\n}\n", styles: ["@charset \"UTF-8\";.callout{--components-callout-gap: var(--pr-t-spacings-150);--components-callout-display: flex;--components-callout-padding: var(--pr-t-spacings-100) var(--pr-t-spacings-150);--components-callout-fontSize: inherit;--components-callout-lineHeight: inherit;--components-callout-kill-size: 1.5rem;align-items:flex-start;position:relative;border-radius:var(--commons-borderRadius-L);background-color:var(--palettes-50, var(--palettes-neutral-50));color:var(--palettes-neutral-800);box-shadow:0 0 0 var(--commons-divider-width) var(--palettes-300, var(--palettes-neutral-300));gap:var(--components-callout-gap);padding:var(--components-callout-padding);font-size:var(--components-callout-fontSize);line-height:var(--components-callout-lineHeight)}.callout:not([hidden]){display:var(--components-callout-display)}.callout a,.callout .link{--commons-text-link-color: var(--palettes-neutral-800);--commons-text-link-hover: var(--palettes-neutral-700)}.callout-content{flex:1;display:flex;flex-direction:column;gap:var(--pr-t-spacings-50)}.callout-content-title{font-weight:600}.callout-content-description-actions{display:flex;gap:var(--pr-t-spacings-75);margin-top:var(--pr-t-spacings-50);padding:var(--pr-t-spacings-50) 0}.callout-content-description-actions .button{--icon-size: 1.25rem;--components-button-font-size: var(--sizes-S-fontSize);--components-button-line-height: var(--sizes-S-lineHeight);--components-button-padding: var(--pr-t-spacings-75) var(--pr-t-spacings-150);--components-button-gap: var(--pr-t-spacings-75)}.callout-content-description-actions .button .numericBadge{--components-numericBadge-size: 1.25rem;--components-numericBadge-borderRadius: 6px;--components-numericBadge-fontSize: var(--sizes-XS-fontSize);--components-numericBadge-lineHeight: var(--sizes-XS-lineHeight)}.callout-icon{display:inline-flex;color:var(--palettes-700, var(--palettes-neutral-700))}.callout-kill{padding:0;border:0;width:100%;background-color:transparent;color:inherit;text-align:left;display:block;font:inherit;cursor:pointer;color:var(--palettes-neutral-700);text-align:center;transition-duration:var(--commons-animations-durations-fast);transition-property:background-color;height:var(--components-callout-kill-size);width:var(--components-callout-kill-size)}.callout-kill:focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:2px;border-radius:var(--commons-borderRadius-M)}.callout-kill:before{--icon-content: \"\\e9bf\";font-weight:400;display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:Lucca icons;content:var(--icon-content);-webkit-font-smoothing:antialiased;text-transform:none;font-size:var(--sizes-S-lineHeight)}.callout.mod-S{--components-callout-gap: var(--pr-t-spacings-100);--components-callout-fontSize: var(--sizes-S-fontSize);--components-callout-lineHeight: var(--sizes-S-lineHeight);--components-callout-kill-size: 1.25rem}.callout.mod-S .callout-icon{--icon-size: 1.25rem}.callout.mod-S .callout-content-description-actions .button{--icon-size: 1rem;--components-button-font-size: var(--sizes-XS-fontSize);--components-button-line-height: var(--sizes-XS-lineHeight);--components-button-padding: var(--pr-t-spacings-50) var(--pr-t-spacings-100);--components-button-gap: var(--pr-t-spacings-50)}.callout.mod-S .callout-content-description-actions .button .numericBadge{--components-numericBadge-size: 1rem;--components-numericBadge-borderRadius: var(--commons-borderRadius-M);--components-numericBadge-fontSize: var(--sizes-XS-fontSize);--components-numericBadge-lineHeight: var(--sizes-XS-lineHeight)}lu-callout{display:block}\n"] }]
|
|
39
32
|
}], propDecorators: {
|
|
40
33
|
/**
|
|
41
34
|
* The title of the callout
|
|
@@ -69,7 +62,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
|
|
|
69
62
|
*/
|
|
70
63
|
icon: [{
|
|
71
64
|
type: Input
|
|
72
|
-
}],
|
|
65
|
+
}],
|
|
66
|
+
/**
|
|
67
|
+
* State is a shorthand to set the icon and the palette to the recommended values for the icon and palette based on
|
|
68
|
+
* the provided state.
|
|
69
|
+
*
|
|
70
|
+
* If one of the icon or palette inputs are filled along with the state input, their values will have the priority over
|
|
71
|
+
* state (so setting state to success and palette to warning will make the palette warning)
|
|
72
|
+
*/
|
|
73
|
+
state: [{
|
|
73
74
|
type: Input
|
|
74
75
|
}],
|
|
75
76
|
/**
|
|
@@ -84,4 +85,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
|
|
|
84
85
|
}], removedChange: [{
|
|
85
86
|
type: Output
|
|
86
87
|
}] } });
|
|
87
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
88
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FsbG91dC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9uZy9jYWxsb3V0L2NhbGxvdXQvY2FsbG91dC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9uZy9jYWxsb3V0L2NhbGxvdXQvY2FsbG91dC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDMUMsT0FBTyxFQUFFLGdCQUFnQixFQUFFLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxZQUFZLEVBQUUsV0FBVyxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFbEosT0FBTyxFQUFFLE9BQU8sRUFBMEIsZUFBZSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDeEYsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBRXZELE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQy9ELE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGtCQUFrQixDQUFDOztBQVdyRCxNQUFNLE9BQU8sZ0JBQWdCO0lBVDdCO1FBcUJDLFlBQU8sR0FBWSxNQUFNLENBQUM7UUFZMUIsY0FBUyxHQUFHLEtBQUssQ0FBQztRQXVCbEIsWUFBTyxHQUFHLEtBQUssQ0FBQztRQVFoQixrQkFBYSxHQUEwQixJQUFJLFlBQVksRUFBVyxDQUFDO1FBRTVELFNBQUksR0FBRyxP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iY2FsbG91dC1jb250ZW50LWRlc2NyaXB0aW9uXCI+XG5cdFx0XHQ8bmctY29udGVudD48L25nLWNvbnRlbnQ+XG5cdFx0PC9kaXY+XG5cdDwvZGl2PlxuXHRAaWYgKHJlbW92YWJsZSkge1xuXHQ8YnV0dG9uIHR5cGU9XCJidXR0b25cIiBjbGFzcz1cImNhbGxvdXQta2lsbFwiIChjbGljayk9XCJyZW1vdmVkID0gdHJ1ZTsgcmVtb3ZlZENoYW5nZS5lbWl0KHRydWUpXCI+XG5cdFx0PHNwYW4gY2xhc3M9XCJ1LW1hc2tcIj57eyBpbnRsLmNsb3NlIH19PC9zcGFuPlxuXHQ8L2J1dHRvbj5cblx0fVxuPC9kaXY+XG59XG4iXX0=
|
|
@@ -2,7 +2,8 @@ import { CommonModule, NgClass } from '@angular/common';
|
|
|
2
2
|
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewEncapsulation, booleanAttribute } from '@angular/core';
|
|
3
3
|
import { PortalDirective } from '@lucca-front/ng/core';
|
|
4
4
|
import { IconComponent } from '@lucca-front/ng/icon';
|
|
5
|
-
import {
|
|
5
|
+
import { CalloutIconPipe } from '../callout-icon.pipe';
|
|
6
|
+
import { getCalloutPalette } from '../callout.utils';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
import * as i1 from "@angular/common";
|
|
8
9
|
export class CalloutDisclosureComponent {
|
|
@@ -12,32 +13,24 @@ export class CalloutDisclosureComponent {
|
|
|
12
13
|
this.open = false;
|
|
13
14
|
this.openChange = new EventEmitter();
|
|
14
15
|
}
|
|
15
|
-
set state(state) {
|
|
16
|
-
const { icon, palette } = CalloutStateMap[state];
|
|
17
|
-
if (this.palette === 'none') {
|
|
18
|
-
this.palette = palette;
|
|
19
|
-
}
|
|
20
|
-
if (!this.icon) {
|
|
21
|
-
this.icon = icon;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
16
|
onToggle(event) {
|
|
25
17
|
if (event.target instanceof HTMLDetailsElement) {
|
|
26
18
|
this.openChange.emit(event.target.open);
|
|
27
19
|
}
|
|
28
20
|
}
|
|
29
21
|
get calloutClasses() {
|
|
22
|
+
const palette = getCalloutPalette(this.state, this.palette);
|
|
30
23
|
return {
|
|
31
24
|
[`mod-${this.size}`]: !!this.size,
|
|
32
|
-
[`palette-${
|
|
25
|
+
[`palette-${palette}`]: !!palette,
|
|
33
26
|
};
|
|
34
27
|
}
|
|
35
28
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: CalloutDisclosureComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
36
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
29
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.1", type: CalloutDisclosureComponent, isStandalone: true, selector: "lu-callout-disclosure", inputs: { icon: "icon", heading: "heading", palette: "palette", size: "size", state: "state", open: ["open", "open", booleanAttribute] }, outputs: { openChange: "openChange" }, ngImport: i0, template: "<details class=\"calloutDisclosure\" [ngClass]=\"calloutClasses\" [class.mod-iconless]=\"!icon\" [open]=\"open\" (toggle)=\"onToggle($event)\">\n\t<summary class=\"calloutDisclosure-summary\">\n\t\t@if (state | luCalloutIcon: icon; as calloutIcon) {\n\t\t<span class=\"calloutDisclosure-summary-icon\">\n\t\t\t<lu-icon [icon]=\"calloutIcon\"></lu-icon>\n\t\t</span>\n\t\t}\n\t\t<span class=\"calloutDisclosure-summary-title\">\n\t\t\t<ng-container *luPortal=\"heading\"></ng-container>\n\t\t</span>\n\t\t<lu-icon class=\"calloutDisclosure-summary-chevron\" icon=\"arrowChevronBottom\"></lu-icon>\n\t</summary>\n\t<div class=\"calloutDisclosure-details\">\n\t\t<ng-content></ng-content>\n\t</div>\n</details>\n", styles: [".calloutDisclosure{--components-calloutDisclosure-paddingHorizontal: var(--pr-t-spacings-150);border-radius:var(--commons-borderRadius-L);background-color:var(--palettes-50, var(--palettes-neutral-50));color:var(--palettes-neutral-800);box-shadow:0 0 0 var(--commons-divider-width) var(--palettes-300, var(--palettes-neutral-300))}.calloutDisclosure a,.calloutDisclosure .link{--commons-text-link-color: var(--palettes-neutral-800);--commons-text-link-hover: var(--palettes-neutral-700)}.calloutDisclosure-summary{display:flex;gap:var(--pr-t-spacings-150);padding:var(--pr-t-spacings-100) var(--components-calloutDisclosure-paddingHorizontal);border-radius:var(--commons-borderRadius-L);transition:background-color var(--commons-animations-durations-fast) ease;cursor:pointer;z-index:1;position:relative}.calloutDisclosure-summary:hover{background-color:var(--palettes-100, var(--palettes-neutral-100))}.calloutDisclosure-summary:focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:3px;border-radius:6px}.calloutDisclosure-summary:focus-visible~.calloutDisclosure-details{box-shadow:none}.calloutDisclosure-summary-icon{color:var(--palettes-700, var(--palettes-neutral-700))}.calloutDisclosure-summary-title{font-weight:600}.calloutDisclosure-summary-chevron{color:var(--palettes-neutral-700);margin-left:auto;transition:transform var(--commons-animations-durations-standard) ease}.calloutDisclosure-details{margin:0 calc(var(--components-calloutDisclosure-paddingHorizontal) + 2.25rem);padding:var(--pr-t-spacings-100) 0 var(--pr-t-spacings-200);box-shadow:0 -1px 0 0 var(--palettes-200, var(--palettes-neutral-200))}.calloutDisclosure[open] .calloutDisclosure-summary-chevron{transform:rotate(-180deg)}.calloutDisclosure.mod-S .calloutDisclosure-summary-title{font-size:var(--sizes-S-fontSize);line-height:var(--sizes-S-lineHeight)}.calloutDisclosure.mod-S .calloutDisclosure-summary-icon,.calloutDisclosure.mod-S .calloutDisclosure-summary-chevron{--icon-size: 1.25rem}.calloutDisclosure.mod-S .calloutDisclosure-details{margin-left:calc(var(--components-calloutDisclosure-paddingHorizontal) + 2rem)}.calloutDisclosure.mod-S .calloutFeedbackList{--components-calloutFeedbackList-gap: var(--pr-t-spacings-100);--components-calloutFeedbackList-fontSize: var(--sizes-S-fontSize);--components-calloutFeedbackList-lineHeight: var(--sizes-S-lineHeight)}.calloutDisclosure.mod-S .calloutFeedbackList .button{--icon-size: 1rem;--components-button-font-size: var(--sizes-XS-fontSize);--components-button-line-height: var(--sizes-XS-lineHeight);--components-button-padding: var(--pr-t-spacings-50) var(--pr-t-spacings-100);--components-button-gap: var(--pr-t-spacings-50)}.calloutDisclosure.mod-S .calloutFeedbackList .button .numericBadge{--components-numericBadge-size: 1rem;--components-numericBadge-borderRadius: var(--commons-borderRadius-M);--components-numericBadge-fontSize: var(--sizes-XS-fontSize);--components-numericBadge-lineHeight: var(--sizes-XS-lineHeight)}.calloutDisclosure.mod-iconless .calloutDisclosure-summary-icon{display:none}.calloutDisclosure.mod-iconless .calloutDisclosure-details{margin-left:var(--components-calloutDisclosure-paddingHorizontal)}lu-callout-disclosure{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconComponent, selector: "lu-icon", inputs: ["icon", "alt", "size", "color"] }, { kind: "directive", type: PortalDirective, selector: "[luPortal]", inputs: ["luPortal", "luPortalContext"] }, { kind: "pipe", type: CalloutIconPipe, name: "luCalloutIcon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
37
30
|
}
|
|
38
31
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: CalloutDisclosureComponent, decorators: [{
|
|
39
32
|
type: Component,
|
|
40
|
-
args: [{ selector: 'lu-callout-disclosure', standalone: true, imports: [CommonModule, IconComponent, NgClass, PortalDirective], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<details class=\"calloutDisclosure\" [ngClass]=\"calloutClasses\" [class.mod-iconless]=\"!icon\" [open]=\"open\" (toggle)=\"onToggle($event)\">\n\t<summary class=\"calloutDisclosure-summary\">\n\t\t
|
|
33
|
+
args: [{ selector: 'lu-callout-disclosure', standalone: true, imports: [CommonModule, IconComponent, NgClass, PortalDirective, CalloutIconPipe], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<details class=\"calloutDisclosure\" [ngClass]=\"calloutClasses\" [class.mod-iconless]=\"!icon\" [open]=\"open\" (toggle)=\"onToggle($event)\">\n\t<summary class=\"calloutDisclosure-summary\">\n\t\t@if (state | luCalloutIcon: icon; as calloutIcon) {\n\t\t<span class=\"calloutDisclosure-summary-icon\">\n\t\t\t<lu-icon [icon]=\"calloutIcon\"></lu-icon>\n\t\t</span>\n\t\t}\n\t\t<span class=\"calloutDisclosure-summary-title\">\n\t\t\t<ng-container *luPortal=\"heading\"></ng-container>\n\t\t</span>\n\t\t<lu-icon class=\"calloutDisclosure-summary-chevron\" icon=\"arrowChevronBottom\"></lu-icon>\n\t</summary>\n\t<div class=\"calloutDisclosure-details\">\n\t\t<ng-content></ng-content>\n\t</div>\n</details>\n", styles: [".calloutDisclosure{--components-calloutDisclosure-paddingHorizontal: var(--pr-t-spacings-150);border-radius:var(--commons-borderRadius-L);background-color:var(--palettes-50, var(--palettes-neutral-50));color:var(--palettes-neutral-800);box-shadow:0 0 0 var(--commons-divider-width) var(--palettes-300, var(--palettes-neutral-300))}.calloutDisclosure a,.calloutDisclosure .link{--commons-text-link-color: var(--palettes-neutral-800);--commons-text-link-hover: var(--palettes-neutral-700)}.calloutDisclosure-summary{display:flex;gap:var(--pr-t-spacings-150);padding:var(--pr-t-spacings-100) var(--components-calloutDisclosure-paddingHorizontal);border-radius:var(--commons-borderRadius-L);transition:background-color var(--commons-animations-durations-fast) ease;cursor:pointer;z-index:1;position:relative}.calloutDisclosure-summary:hover{background-color:var(--palettes-100, var(--palettes-neutral-100))}.calloutDisclosure-summary:focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:3px;border-radius:6px}.calloutDisclosure-summary:focus-visible~.calloutDisclosure-details{box-shadow:none}.calloutDisclosure-summary-icon{color:var(--palettes-700, var(--palettes-neutral-700))}.calloutDisclosure-summary-title{font-weight:600}.calloutDisclosure-summary-chevron{color:var(--palettes-neutral-700);margin-left:auto;transition:transform var(--commons-animations-durations-standard) ease}.calloutDisclosure-details{margin:0 calc(var(--components-calloutDisclosure-paddingHorizontal) + 2.25rem);padding:var(--pr-t-spacings-100) 0 var(--pr-t-spacings-200);box-shadow:0 -1px 0 0 var(--palettes-200, var(--palettes-neutral-200))}.calloutDisclosure[open] .calloutDisclosure-summary-chevron{transform:rotate(-180deg)}.calloutDisclosure.mod-S .calloutDisclosure-summary-title{font-size:var(--sizes-S-fontSize);line-height:var(--sizes-S-lineHeight)}.calloutDisclosure.mod-S .calloutDisclosure-summary-icon,.calloutDisclosure.mod-S .calloutDisclosure-summary-chevron{--icon-size: 1.25rem}.calloutDisclosure.mod-S .calloutDisclosure-details{margin-left:calc(var(--components-calloutDisclosure-paddingHorizontal) + 2rem)}.calloutDisclosure.mod-S .calloutFeedbackList{--components-calloutFeedbackList-gap: var(--pr-t-spacings-100);--components-calloutFeedbackList-fontSize: var(--sizes-S-fontSize);--components-calloutFeedbackList-lineHeight: var(--sizes-S-lineHeight)}.calloutDisclosure.mod-S .calloutFeedbackList .button{--icon-size: 1rem;--components-button-font-size: var(--sizes-XS-fontSize);--components-button-line-height: var(--sizes-XS-lineHeight);--components-button-padding: var(--pr-t-spacings-50) var(--pr-t-spacings-100);--components-button-gap: var(--pr-t-spacings-50)}.calloutDisclosure.mod-S .calloutFeedbackList .button .numericBadge{--components-numericBadge-size: 1rem;--components-numericBadge-borderRadius: var(--commons-borderRadius-M);--components-numericBadge-fontSize: var(--sizes-XS-fontSize);--components-numericBadge-lineHeight: var(--sizes-XS-lineHeight)}.calloutDisclosure.mod-iconless .calloutDisclosure-summary-icon{display:none}.calloutDisclosure.mod-iconless .calloutDisclosure-details{margin-left:var(--components-calloutDisclosure-paddingHorizontal)}lu-callout-disclosure{display:block}\n"] }]
|
|
41
34
|
}], propDecorators: { icon: [{
|
|
42
35
|
type: Input
|
|
43
36
|
}], heading: [{
|
|
@@ -47,7 +40,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
|
|
|
47
40
|
type: Input
|
|
48
41
|
}], size: [{
|
|
49
42
|
type: Input
|
|
50
|
-
}],
|
|
43
|
+
}],
|
|
44
|
+
/**
|
|
45
|
+
* State is a shorthand to set the icon and the palette to the recommended values for the icon and palette based on
|
|
46
|
+
* the provided state.
|
|
47
|
+
*
|
|
48
|
+
* If one of the icon or palette inputs are filled along with the state input, their values will have the priority over
|
|
49
|
+
* state (so setting state to success and palette to warning will make the palette warning)
|
|
50
|
+
*/
|
|
51
|
+
state: [{
|
|
51
52
|
type: Input
|
|
52
53
|
}], open: [{
|
|
53
54
|
type: Input,
|
|
@@ -55,4 +56,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
|
|
|
55
56
|
}], openChange: [{
|
|
56
57
|
type: Output
|
|
57
58
|
}] } });
|
|
58
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
59
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FsbG91dC1kaXNjbG9zdXJlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL25nL2NhbGxvdXQvY2FsbG91dC1kaXNjbG9zdXJlL2NhbGxvdXQtZGlzY2xvc3VyZS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9uZy9jYWxsb3V0L2NhbGxvdXQtZGlzY2xvc3VyZS9jYWxsb3V0LWRpc2Nsb3N1cmUuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxPQUFPLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUN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+PC9sdS1pY29uPlxuXHQ8L3N1bW1hcnk+XG5cdDxkaXYgY2xhc3M9XCJjYWxsb3V0RGlzY2xvc3VyZS1kZXRhaWxzXCI+XG5cdFx0PG5nLWNvbnRlbnQ+PC9uZy1jb250ZW50PlxuXHQ8L2Rpdj5cbjwvZGV0YWlscz5cbiJdfQ==
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Pipe } from '@angular/core';
|
|
2
|
+
import { getCalloutIcon } from './callout.utils';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Get icon for callout
|
|
6
|
+
*
|
|
7
|
+
* If the icon is defined then it takes priority over the callout state icon
|
|
8
|
+
*/
|
|
9
|
+
export class CalloutIconPipe {
|
|
10
|
+
transform(state, icon) {
|
|
11
|
+
return getCalloutIcon(state, icon);
|
|
12
|
+
}
|
|
13
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: CalloutIconPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
14
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: CalloutIconPipe, isStandalone: true, name: "luCalloutIcon" }); }
|
|
15
|
+
}
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: CalloutIconPipe, decorators: [{
|
|
17
|
+
type: Pipe,
|
|
18
|
+
args: [{
|
|
19
|
+
name: 'luCalloutIcon',
|
|
20
|
+
standalone: true,
|
|
21
|
+
}]
|
|
22
|
+
}] });
|
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FsbG91dC1pY29uLnBpcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wYWNrYWdlcy9uZy9jYWxsb3V0L2NhbGxvdXQt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