@lucca/prisme 21.2.2 → 21.2.4-rc.1
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/fesm2022/lucca-prisme-button.mjs +16 -16
- package/fesm2022/lucca-prisme-button.mjs.map +1 -1
- package/fesm2022/lucca-prisme-core.mjs +3 -3
- package/fesm2022/lucca-prisme-core.mjs.map +1 -1
- package/fesm2022/lucca-prisme-icon.mjs +9 -9
- package/fesm2022/lucca-prisme-icon.mjs.map +1 -1
- package/package.json +6 -4
|
@@ -31,43 +31,43 @@ class ButtonComponent {
|
|
|
31
31
|
constructor() {
|
|
32
32
|
this.#prClass = inject(PrClass);
|
|
33
33
|
this.#elementRef = inject(ElementRef);
|
|
34
|
-
this.notifyError = signal(false, ...(ngDevMode ? [{ debugName: "notifyError" }] : []));
|
|
34
|
+
this.notifyError = signal(false, ...(ngDevMode ? [{ debugName: "notifyError" }] : /* istanbul ignore next */ []));
|
|
35
35
|
/**
|
|
36
36
|
* Change the size of the Button
|
|
37
37
|
*/
|
|
38
|
-
this.size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
|
|
38
|
+
this.size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : /* istanbul ignore next */ []));
|
|
39
39
|
/**
|
|
40
40
|
* Apply block display
|
|
41
41
|
*/
|
|
42
|
-
this.block = input(false, { ...(ngDevMode ? { debugName: "block" } : {}), transform: booleanAttribute });
|
|
42
|
+
this.block = input(false, { ...(ngDevMode ? { debugName: "block" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
43
43
|
/**
|
|
44
44
|
* Indicates an action with significant or irreversible consequences on hover and focus. Only compatible with outlined and ghost
|
|
45
45
|
*/
|
|
46
|
-
this.critical = input(false, { ...(ngDevMode ? { debugName: "critical" } : {}), transform: booleanAttribute });
|
|
46
|
+
this.critical = input(false, { ...(ngDevMode ? { debugName: "critical" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
47
47
|
/**
|
|
48
48
|
* @deprecated use `critical` input instead
|
|
49
49
|
*/
|
|
50
|
-
this.delete = input(false, { ...(ngDevMode ? { debugName: "delete" } : {}), transform: booleanAttribute });
|
|
50
|
+
this.delete = input(false, { ...(ngDevMode ? { debugName: "delete" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
51
51
|
/**
|
|
52
52
|
* Indicates the presence of a menu
|
|
53
53
|
*/
|
|
54
|
-
this.disclosure = input(false, { ...(ngDevMode ? { debugName: "disclosure" } : {}), transform: booleanAttribute });
|
|
54
|
+
this.disclosure = input(false, { ...(ngDevMode ? { debugName: "disclosure" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
55
55
|
/**
|
|
56
56
|
* Applies a color palette to the Button
|
|
57
57
|
*/
|
|
58
|
-
this.palette = input('none', ...(ngDevMode ? [{ debugName: "palette" }] : []));
|
|
58
|
+
this.palette = input('none', ...(ngDevMode ? [{ debugName: "palette" }] : /* istanbul ignore next */ []));
|
|
59
59
|
/**
|
|
60
60
|
* Modifies the state of the Button
|
|
61
61
|
*/
|
|
62
|
-
this.state = input('default', ...(ngDevMode ? [{ debugName: "state" }] : []));
|
|
63
|
-
this.luButton = input('', ...(ngDevMode ? [{ debugName: "luButton" }] : []));
|
|
62
|
+
this.state = input('default', ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
|
|
63
|
+
this.luButton = input('', ...(ngDevMode ? [{ debugName: "luButton" }] : /* istanbul ignore next */ []));
|
|
64
64
|
/**
|
|
65
65
|
* '' is the default value when you just set the `prButton` directive without a value attached to it.
|
|
66
66
|
* We just make this explicit here.
|
|
67
67
|
*/
|
|
68
|
-
this.prButton = input('', ...(ngDevMode ? [{ debugName: "prButton" }] : []));
|
|
69
|
-
this.buttonType = computed(() => this.luButton() || this.prButton(), ...(ngDevMode ? [{ debugName: "buttonType" }] : []));
|
|
70
|
-
this.iconComponentRef = contentChild(IconComponent, { ...(ngDevMode ? { debugName: "iconComponentRef" } : {}), read: ElementRef });
|
|
68
|
+
this.prButton = input('', ...(ngDevMode ? [{ debugName: "prButton" }] : /* istanbul ignore next */ []));
|
|
69
|
+
this.buttonType = computed(() => this.luButton() || this.prButton(), ...(ngDevMode ? [{ debugName: "buttonType" }] : /* istanbul ignore next */ []));
|
|
70
|
+
this.iconComponentRef = contentChild(IconComponent, { ...(ngDevMode ? { debugName: "iconComponentRef" } : /* istanbul ignore next */ {}), read: ElementRef });
|
|
71
71
|
this.classesConfig = computed(() => {
|
|
72
72
|
const config = {
|
|
73
73
|
[`mod-${this.size()}`]: !!this.size(),
|
|
@@ -95,7 +95,7 @@ class ButtonComponent {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
return config;
|
|
98
|
-
}, ...(ngDevMode ? [{ debugName: "classesConfig" }] : []));
|
|
98
|
+
}, ...(ngDevMode ? [{ debugName: "classesConfig" }] : /* istanbul ignore next */ []));
|
|
99
99
|
_effectWithDeps([this.state], (state) => {
|
|
100
100
|
if (state) {
|
|
101
101
|
this.triggerErrorIfNeeded();
|
|
@@ -112,10 +112,10 @@ class ButtonComponent {
|
|
|
112
112
|
this.notifyError.set(true);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
116
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.8", type: ButtonComponent, isStandalone: true, selector: "button[luButton], a[luButton], span[luButton], button[prButton], a[prButton], span[prButton]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, critical: { classPropertyName: "critical", publicName: "critical", isSignal: true, isRequired: false, transformFunction: null }, delete: { classPropertyName: "delete", publicName: "delete", isSignal: true, isRequired: false, transformFunction: null }, disclosure: { classPropertyName: "disclosure", publicName: "disclosure", isSignal: true, isRequired: false, transformFunction: null }, palette: { classPropertyName: "palette", publicName: "palette", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, luButton: { classPropertyName: "luButton", publicName: "luButton", isSignal: true, isRequired: false, transformFunction: null }, prButton: { classPropertyName: "prButton", publicName: "prButton", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "triggerErrorIfNeeded()", "animationend": "notifyError.set(false)" }, properties: { "class.is-error": "notifyError()" }, classAttribute: "button" }, providers: [PrClass], queries: [{ propertyName: "iconComponentRef", first: true, predicate: IconComponent, descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: '<ng-content />', isInline: true, styles: ["@charset \"UTF-8\";@layer components{.button{--components-button-font: var(--pr-t-font-body-M);--components-button-borderRadius: var(--pr-t-border-radius-default);--components-button-paddingBlock: var(--pr-t-spacings-100);--components-button-paddingInline: var(--pr-t-spacings-150);--components-button-paddingBlockStart: var(--components-button-paddingBlock);--components-button-paddingBlockEnd: var(--components-button-paddingBlock);--components-button-paddingInlineStart: var(--components-button-paddingInline);--components-button-paddingInlineEnd: var(--components-button-paddingInline);--components-button-padding: var(--components-button-paddingBlockStart) var(--components-button-paddingInlineEnd) var(--components-button-paddingBlockEnd) var(--components-button-paddingInlineStart);--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: var(--pr-t-elevation-shadow-button);--components-button-color: var(--palettes-0, var(--palettes-text, var(--palettes-product-0)));--components-button-backgroundColor: var(--palettes-700, var(--palettes-product-700));--components-button-arrow-transform: none;--components-button-AI-background-opacity: 25%;--components-button-font-size: var(--pr-t-font-body-M-fontSize);--components-button-line-height: var(--pr-t-font-body-M-lineHeight);--icon-size: 1.5rem;background-color:var(--components-button-backgroundColor);box-shadow:var(--components-button-boxShadow);border-radius:var(--components-button-borderRadius);padding:var(--components-button-padding);transition-property:background-color,color,border-color,box-shadow;transition-duration:var(--commons-animations-durations-fast);inline-size:var(--components-button-width);min-inline-size:var(--components-button-minWidth);font:var(--components-button-font);font-size:var(--components-button-font-size);line-height:var(--components-button-line-height);font-weight:var(--pr-t-font-fontWeight-semibold);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;display:inline-flex;align-items:center;justify-content:center;position:relative;text-decoration:none;vertical-align:middle;text-wrap:balance;text-align:center;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-800))}.button:hover{--components-button-color: var(--palettes-0, var(--palettes-text, var(--palettes-product-0)));--components-button-backgroundColor: var(--palettes-800, var(--palettes-product-800))}.button:focus-visible{outline:2px solid var(--palettes-700, var(--palettes-product-700));outline-offset:2px;border-radius:var(--components-button-borderRadius)}.button:active{--components-button-backgroundColor: var(--palettes-900, var(--palettes-product-900))}.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{--components-numericBadge-background: var(--palettes-neutral-200);--components-numericBadge-color: var(--palettes-neutral-500)}}@layer mods{.button.mod-AI:not(.invert){--components-button-backgroundColor: var(--palettes-neutral-0);--components-button-color: var(--palettes-700, var(--palettes-neutral-700));--components-button-boxShadow: var(--pr-t-elevation-shadow-button), 0 0 0 var(--commons-divider-width) var(--palettes-neutral-200)}.button.mod-AI:not(.invert):hover{--components-button-boxShadow: var(--pr-t-elevation-shadow-button), 0 0 0 var(--commons-divider-width) var(--palettes-300, var(--palettes-neutral-300));--components-button-color: var(--palettes-700, var(--palettes-neutral-700));--components-button-backgroundColor: var(--palettes-50, var(--palettes-neutral-50))}.button.mod-AI:not(.invert):active{--components-button-backgroundColor: var(--palettes-100, var(--palettes-neutral-100))}.button.mod-AI:not(.invert):focus-visible{outline:2px solid var(--palettes-700, var(--palettes-product-700));outline-offset:3px}.button.mod-AI:not(.invert):disabled{--components-button-backgroundColor: var(--palettes-neutral-0);--components-button-boxShadow: 0 0 0 1px var(--palettes-neutral-100);--components-button-color: var(--pr-t-color-text-disabled)}.button.mod-AI:not(.invert):not(:disabled):before{content:\"\";pointer-events:none;position:absolute;inset:calc(var(--commons-divider-width) * -1);padding:var(--commons-divider-width);background-image:conic-gradient(from 135deg,var(--palettes-brand-400),var(--palettes-AI-500),var(--palettes-brand-400));border-radius:calc(var(--pr-t-border-radius-default) + var(--commons-divider-width));-webkit-mask:linear-gradient(var(--palettes-neutral-0)) content-box,linear-gradient(var(--palettes-neutral-0));mask:linear-gradient(var(--palettes-neutral-0)) content-box,linear-gradient(var(--palettes-neutral-0));-webkit-mask-composite:xor;mask-composite:exclude}.button.mod-AI:not(.invert):not(:disabled):not(.mod-invert) .lucca-icon{background-image:linear-gradient(135deg,var(--palettes-AI-600),var(--palettes-brand-500));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.button.mod-AI:not(.invert).mod-invert{--components-button-backgroundColor: transparent;--components-button-color: var(--palettes-neutral-0);background-image:linear-gradient(225deg,color-mix(in srgb,var(--palettes-AI-500) var(--components-button-AI-background-opacity),transparent),color-mix(in srgb,var(--palettes-brand-400) var(--components-button-AI-background-opacity),transparent))}.button.mod-AI:not(.invert).mod-invert:hover,.button.mod-AI:not(.invert).mod-invert:focus-visible{--components-button-AI-background-opacity: 15%;--components-button-color: var(--palettes-neutral-0)}.button.mod-AI:not(.invert).mod-invert:active{--components-button-AI-background-opacity: 5%}.button.mod-AI:not(.invert).is-success .lucca-icon{background-image:none}.button.mod-AI:not(.invert).is-success:before{content:none}.button.mod-AI:not(.invert).is-success:after{background-image:linear-gradient(135deg,var(--palettes-AI-600),var(--palettes-brand-500));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.button.mod-AI:not(.invert).is-loading{--components-button-color: transparent;--components-button-backgroundColor: var(--palettes-neutral-0);--commons-loading-frontground: var(--palettes-neutral-300);--components-button-boxShadow: 0 0 0 var(--commons-divider-width) var(--palettes-neutral-100)}.button.mod-AI:not(.invert).is-loading .lucca-icon{background-image:none!important}.button.mod-AI:not(.invert).is-loading:before{content:none}.button.mod-block{--components-button-width: 100%}.button.mod-S{--icon-size: 1.25rem;--components-button-font: var(--pr-t-font-body-S);--components-button-paddingBlock: var(--pr-t-spacings-75);--components-button-paddingInline: var(--pr-t-spacings-100);--components-button-gap: var(--pr-t-spacings-75)}.button.mod-S .numericBadge{--components-numericBadge-size: 1.25rem;--components-numericBadge-borderRadius: var(--pr-t-border-radius-small);--components-numericBadge-font: var(--pr-t-font-body-XS);--components-numericBadge-fontSize: var(--pr-t-font-body-XS-fontSize);--components-numericBadge-lineHeight: var(--pr-t-font-body-XS-lineHeight)}.button.mod-S{--components-button-font-size: var(--pr-t-font-body-S-fontSize);--components-button-line-height: var(--pr-t-font-body-S-lineHeight)}.button.mod-S:after{font-size:var(--pr-t-font-body-S-lineHeight);block-size:var(--pr-t-font-body-S-lineHeight)}.button.mod-XS{--icon-size: 1rem;--components-button-font: var(--pr-t-font-body-XS);--components-button-paddingBlock: var(--pr-t-spacings-50);--components-button-paddingInline: var(--pr-t-spacings-75);--components-button-gap: var(--pr-t-spacings-50);--components-button-borderRadius: var(--pr-t-border-radius-small)}.button.mod-XS .numericBadge{--components-numericBadge-size: 1rem;--components-numericBadge-borderRadius: var(--pr-t-border-radius-small);--components-numericBadge-font: var(--pr-t-font-body-XS);--components-numericBadge-fontSize: var(--pr-t-font-body-XS-fontSize);--components-numericBadge-lineHeight: var(--pr-t-font-body-XS-lineHeight)}.button.mod-XS{--components-button-font-size: var(--pr-t-font-body-XS-fontSize);--components-button-line-height: var(--pr-t-font-body-XS-lineHeight)}.button.mod-XS:after{font-size:var(--pr-t-font-body-XS-lineHeight);block-size:var(--pr-t-font-body-XS-lineHeight)}.button.mod-disclosure{--components-button-paddingInlineEnd: var(--pr-t-spacings-100)}.button.mod-disclosure .icon-arrowChevronBottom{transition-property:transform;transition-duration:var(--commons-animations-durations-fast);transform:var(--components-button-arrow-transform)}.button.mod-disclosure[aria-expanded=true]{--components-button-arrow-transform: rotate(180deg)}.button.mod-outline:where(:not(.is-success,.is-error)),.button.mod-outlined: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: var(--pr-t-elevation-shadow-button), 0 0 0 var(--commons-divider-width) var(--palettes-neutral-200)}.button.mod-outline:where(:not(.is-success,.is-error)):hover,.button.mod-outlined:where(:not(.is-success,.is-error)):hover{--components-button-boxShadow: var(--pr-t-elevation-shadow-button), 0 0 0 var(--commons-divider-width) var(--palettes-300, var(--palettes-neutral-300));--components-button-color: var(--palettes-700, var(--palettes-neutral-700));--components-button-backgroundColor: var(--palettes-50, var(--palettes-neutral-50))}.button.mod-outline:where(:not(.is-success,.is-error)):active,.button.mod-outlined:where(:not(.is-success,.is-error)):active{--components-button-backgroundColor: var(--palettes-100, var(--palettes-neutral-100))}.button.mod-outline:where(:not(.is-success,.is-error)):focus-visible,.button.mod-outlined:where(:not(.is-success,.is-error)):focus-visible{outline:2px solid var(--palettes-700, var(--palettes-product-700));outline-offset:3px}.button.mod-outline:where(:not(.is-success,.is-error)):disabled,.button.mod-outlined:where(:not(.is-success,.is-error)):disabled{--components-button-backgroundColor: var(--palettes-neutral-0);--components-button-boxShadow: 0 0 0 1px var(--palettes-neutral-100);--components-button-color: var(--pr-t-color-text-disabled)}.button.mod-link:where(:not(.is-success,.is-error)),.button.mod-text:where(:not(.is-success,.is-error)),.button.mod-ghost:where(:not(.is-success,.is-error)){--components-button-backgroundColor: transparent;--components-button-color: var(--palettes-700, var(--pr-t-color-text-subtle));--components-button-boxShadow: none}.button.mod-link:where(:not(.is-success,.is-error)):hover,.button.mod-link:where(:not(.is-success,.is-error)):focus-visible,.button.mod-text:where(:not(.is-success,.is-error)):hover,.button.mod-text:where(:not(.is-success,.is-error)):focus-visible,.button.mod-ghost:where(:not(.is-success,.is-error)):hover,.button.mod-ghost:where(:not(.is-success,.is-error)):focus-visible{--components-button-color: var(--palettes-700, var(--pr-t-color-text-subtle));--components-button-backgroundColor: var(--palettes-50, var(--palettes-neutral-50))}.button.mod-link:where(:not(.is-success,.is-error)):active,.button.mod-text:where(:not(.is-success,.is-error)):active,.button.mod-ghost:where(:not(.is-success,.is-error)):active{--components-button-backgroundColor: var(--palettes-100, var(--palettes-neutral-100))}.button.mod-link:where(:not(.is-success,.is-error)):disabled,.button.mod-text:where(:not(.is-success,.is-error)):disabled,.button.mod-ghost:where(:not(.is-success,.is-error)):disabled{--components-button-backgroundColor: transparent;--components-button-color: var(--pr-t-color-text-disabled)}.button.mod-withIcon.mod-iconOnLeft{--components-button-paddingInlineStart: var(--pr-t-spacings-100)}.button.mod-withIcon.mod-iconOnLeft.mod-S{--components-button-paddingInlineStart: var(--pr-t-spacings-75)}.button.mod-withIcon.mod-iconOnLeft.mod-XS{--components-button-paddingInlineStart: var(--pr-t-spacings-50)}.button.mod-withIcon.mod-iconOnRight{--components-button-paddingInlineEnd: var(--pr-t-spacings-100)}.button.mod-withIcon.mod-iconOnRight.mod-S{--components-button-paddingInlineEnd: var(--pr-t-spacings-75)}.button.mod-withIcon.mod-iconOnRight.mod-XS{--components-button-paddingInlineEnd: var(--pr-t-spacings-50)}.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:has(.numericBadge){--components-button-paddingInlineEnd: var(--pr-t-spacings-100)}.button:has(.numericBadge).mod-S{--components-button-paddingInlineEnd: var(--pr-t-spacings-75)}.button:has(.numericBadge).mod-XS{--components-button-paddingInlineEnd: var(--pr-t-spacings-50)}.button.mod-delete:hover,.button.mod-critical:hover{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-100)}.button.mod-delete:active,.button.mod-critical:active{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-200)}.button.mod-delete.mod-link:hover,.button.mod-delete.mod-link:focus-visible,.button.mod-delete.mod-text:hover,.button.mod-delete.mod-text:focus-visible,.button.mod-critical.mod-link:hover,.button.mod-critical.mod-link:focus-visible,.button.mod-critical.mod-text:hover,.button.mod-critical.mod-text:focus-visible{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-100)}.button.mod-delete.mod-link:active,.button.mod-delete.mod-text:active,.button.mod-critical.mod-link:active,.button.mod-critical.mod-text:active{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-200)}.button.mod-delete.mod-outline:hover,.button.mod-delete.mod-outlined:hover,.button.mod-critical.mod-outline:hover,.button.mod-critical.mod-outlined:hover{--components-button-boxShadow: var(--pr-t-elevation-shadow-button), 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-outline:focus-visible,.button.mod-delete.mod-outlined:focus-visible,.button.mod-critical.mod-outline:focus-visible,.button.mod-critical.mod-outlined: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-outline:active,.button.mod-delete.mod-outlined:active,.button.mod-critical.mod-outline:active,.button.mod-critical.mod-outlined:active{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-200)}.button.mod-invert,.button.mod-inverted{--components-button-color: var(--palettes-neutral-0)}.button.mod-invert:hover,.button.mod-invert:focus-visible,.button.mod-inverted:hover,.button.mod-inverted:focus-visible{--components-button-color: var(--palettes-neutral-0);--components-button-backgroundColor: var(--palettes-neutral-900)}.button.mod-invert:active,.button.mod-inverted:active{--components-button-backgroundColor: var(--palettes-neutral-700)}.button.mod-more{--components-button-minWidth: 2rem;--components-button-padding: 0}.button.mod-more:after{--icon-content: \"\\e97c\";font-weight:var(--pr-t-font-fontWeight-regular);display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:var(--icon-fontFamily);content:var(--icon-content)/\"\";-webkit-font-smoothing:antialiased;text-transform:none;block-size:0;order:-1;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.loading,.button.is-loading{--components-button-pointerEvents: none;--components-button-color: transparent;--components-button-userSelect: none;--components-button-boxShadow: none;--components-button-backgroundColor: var(--palettes-500, var(--palettes-product-500));--commons-loading-frontground: var(--palettes-50, var(--palettes-product-50))}.button.loading:after,.button.is-loading:after{content:\"\";inline-size:var(--pr-t-font-body-M-lineHeight);block-size:var(--pr-t-font-body-M-lineHeight);border-radius:var(--pr-t-border-radius-full);line-height:.8rem;border-width:var(--commons-loading-borderWidth);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-block-start-color:transparent}.button.loading .numericBadge,.button.is-loading .numericBadge{--components-numericBadge-background: transparent;--components-numericBadge-color: transparent}.button.loading.mod-S:after,.button.is-loading.mod-S:after{content:\"\";inline-size:var(--pr-t-font-body-S-lineHeight);block-size:var(--pr-t-font-body-S-lineHeight);border-radius:var(--pr-t-border-radius-full);line-height:.8rem;border-width:var(--commons-loading-borderWidth);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-block-start-color:transparent}.button.loading.mod-XS:after,.button.is-loading.mod-XS:after{content:\"\";inline-size:var(--pr-t-font-body-XS-lineHeight);block-size:var(--pr-t-font-body-XS-lineHeight);border-radius:var(--pr-t-border-radius-full);line-height:.8rem;border-width:var(--commons-loading-borderWidth);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-block-start-color:transparent}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.button.loading.mod-XS,.button.is-loading.mod-XS{--commons-loading-borderWidth: 2px}.button.loading.mod-outlined,.button.is-loading.mod-outlined{--components-button-backgroundColor: var(--palettes-neutral-0);--commons-loading-frontground: var(--palettes-neutral-300);--components-button-boxShadow: 0 0 0 var(--commons-divider-width) var(--palettes-neutral-100)}.button.loading.mod-ghost,.button.is-loading.mod-ghost{--components-button-backgroundColor: var(--palettes-neutral-50);--commons-loading-frontground: var(--palettes-neutral-400)}.button.error,.button.is-error{animation-name:shake;animation-iteration-count:1;animation-duration:var(--commons-animations-durations-standard)}@keyframes shake{0%,to{transform:translateZ(0)}20%,60%{transform:translate3d(-3px,0,0)}40%,80%{transform:translate3d(3px,0,0)}}.button.success,.button.is-success{--components-button-backgroundColor: var(--palettes-500, var(--palettes-product-500));--components-button-color: transparent;--components-button-pointerEvents: none;--components-button-userSelect: none}.button.success:after,.button.is-success:after{--icon-content: \"\\e97d\";font-weight:var(--pr-t-font-fontWeight-regular);display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:var(--icon-fontFamily);content:var(--icon-content)/\"\";-webkit-font-smoothing:antialiased;text-transform:none;color:var(--palettes-neutral-0);font-size:calc(1.5 * var(--pr-t-font-body-M-fontSize));block-size:var(--pr-t-font-body-M-lineHeight);inset:0;margin:auto;position:absolute}.button.success .numericBadge,.button.is-success .numericBadge{--components-numericBadge-background: transparent;--components-numericBadge-color: transparent}.button.success.mod-AI,.button.success.mod-outlined,.button.is-success.mod-AI,.button.is-success.mod-outlined{--components-button-backgroundColor: var(--palettes-neutral-0);--components-button-boxShadow: 0 0 0 var(--commons-divider-width) var(--palettes-neutral-100)}.button.success.mod-AI:after,.button.success.mod-outlined:after,.button.is-success.mod-AI:after,.button.is-success.mod-outlined:after{color:var(--palettes-700, var(--palettes-product-700))}.button.success.mod-ghost,.button.is-success.mod-ghost{--components-button-backgroundColor: var(--palettes-neutral-50);--components-button-boxShadow: none}.button.success.mod-ghost:after,.button.is-success.mod-ghost:after{color:var(--palettes-700, var(--palettes-product-700))}.button.disabled,.button.is-disabled,.button[aria-disabled=true]{--components-button-cursor: default;--components-button-color: var(--pr-t-color-text-disabled);--components-button-backgroundColor: var(--commons-disabled-background);--components-button-pointerEvents: none}.button.disabled .numericBadge,.button.is-disabled .numericBadge,.button[aria-disabled=true] .numericBadge{--components-numericBadge-background: var(--palettes-neutral-200);--components-numericBadge-color: var(--palettes-neutral-500)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
115
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
116
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.14", type: ButtonComponent, isStandalone: true, selector: "button[luButton], a[luButton], span[luButton], button[prButton], a[prButton], span[prButton]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, critical: { classPropertyName: "critical", publicName: "critical", isSignal: true, isRequired: false, transformFunction: null }, delete: { classPropertyName: "delete", publicName: "delete", isSignal: true, isRequired: false, transformFunction: null }, disclosure: { classPropertyName: "disclosure", publicName: "disclosure", isSignal: true, isRequired: false, transformFunction: null }, palette: { classPropertyName: "palette", publicName: "palette", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, luButton: { classPropertyName: "luButton", publicName: "luButton", isSignal: true, isRequired: false, transformFunction: null }, prButton: { classPropertyName: "prButton", publicName: "prButton", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "triggerErrorIfNeeded()", "animationend": "notifyError.set(false)" }, properties: { "class.is-error": "notifyError()" }, classAttribute: "button" }, providers: [PrClass], queries: [{ propertyName: "iconComponentRef", first: true, predicate: IconComponent, descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: '<ng-content />', isInline: true, styles: ["@charset \"UTF-8\";@layer components{.button{--components-button-font: var(--pr-t-font-body-M);--components-button-borderRadius: var(--pr-t-border-radius-default);--components-button-paddingBlock: var(--pr-t-spacings-100);--components-button-paddingInline: var(--pr-t-spacings-150);--components-button-paddingBlockStart: var(--components-button-paddingBlock);--components-button-paddingBlockEnd: var(--components-button-paddingBlock);--components-button-paddingInlineStart: var(--components-button-paddingInline);--components-button-paddingInlineEnd: var(--components-button-paddingInline);--components-button-padding: var(--components-button-paddingBlockStart) var(--components-button-paddingInlineEnd) var(--components-button-paddingBlockEnd) var(--components-button-paddingInlineStart);--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: var(--pr-t-elevation-shadow-button);--components-button-color: var(--palettes-0, var(--palettes-text, var(--palettes-product-0)));--components-button-backgroundColor: var(--palettes-700, var(--palettes-product-700));--components-button-arrow-transform: none;--components-button-AI-background-opacity: 25%;--components-button-font-size: var(--pr-t-font-body-M-fontSize);--components-button-line-height: var(--pr-t-font-body-M-lineHeight);--icon-size: 1.5rem;background-color:var(--components-button-backgroundColor);box-shadow:var(--components-button-boxShadow);border-radius:var(--components-button-borderRadius);padding:var(--components-button-padding);transition-property:background-color,color,border-color,box-shadow;transition-duration:var(--commons-animations-durations-fast);inline-size:var(--components-button-width);min-inline-size:var(--components-button-minWidth);font:var(--components-button-font);font-size:var(--components-button-font-size);line-height:var(--components-button-line-height);font-weight:var(--pr-t-font-fontWeight-semibold);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;display:inline-flex;align-items:center;justify-content:center;position:relative;text-decoration:none;vertical-align:middle;text-wrap:balance;text-align:center;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-800))}.button:hover{--components-button-color: var(--palettes-0, var(--palettes-text, var(--palettes-product-0)));--components-button-backgroundColor: var(--palettes-800, var(--palettes-product-800))}.button:focus-visible{outline:2px solid var(--palettes-700, var(--palettes-product-700));outline-offset:2px;border-radius:var(--components-button-borderRadius)}.button:active{--components-button-backgroundColor: var(--palettes-900, var(--palettes-product-900))}.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{--components-numericBadge-background: var(--palettes-neutral-200);--components-numericBadge-color: var(--palettes-neutral-500)}}@layer mods{.button.mod-AI:not(.invert){--components-button-backgroundColor: var(--palettes-neutral-0);--components-button-color: var(--palettes-700, var(--palettes-neutral-700));--components-button-boxShadow: var(--pr-t-elevation-shadow-button), 0 0 0 var(--commons-divider-width) var(--palettes-neutral-200)}.button.mod-AI:not(.invert):hover{--components-button-boxShadow: var(--pr-t-elevation-shadow-button), 0 0 0 var(--commons-divider-width) var(--palettes-300, var(--palettes-neutral-300));--components-button-color: var(--palettes-700, var(--palettes-neutral-700));--components-button-backgroundColor: var(--palettes-50, var(--palettes-neutral-50))}.button.mod-AI:not(.invert):active{--components-button-backgroundColor: var(--palettes-100, var(--palettes-neutral-100))}.button.mod-AI:not(.invert):focus-visible{outline:2px solid var(--palettes-700, var(--palettes-product-700));outline-offset:3px}.button.mod-AI:not(.invert):disabled{--components-button-backgroundColor: var(--palettes-neutral-0);--components-button-boxShadow: 0 0 0 1px var(--palettes-neutral-100);--components-button-color: var(--pr-t-color-text-disabled)}.button.mod-AI:not(.invert):not(:disabled):before{content:\"\";pointer-events:none;position:absolute;inset:calc(var(--commons-divider-width) * -1);padding:var(--commons-divider-width);background-image:conic-gradient(from 135deg,var(--palettes-brand-400),var(--palettes-AI-500),var(--palettes-brand-400));border-radius:calc(var(--pr-t-border-radius-default) + var(--commons-divider-width));-webkit-mask:linear-gradient(var(--palettes-neutral-0)) content-box,linear-gradient(var(--palettes-neutral-0));mask:linear-gradient(var(--palettes-neutral-0)) content-box,linear-gradient(var(--palettes-neutral-0));-webkit-mask-composite:xor;mask-composite:exclude}.button.mod-AI:not(.invert):not(:disabled):not(.mod-invert) .lucca-icon{background-image:linear-gradient(135deg,var(--palettes-AI-600),var(--palettes-brand-500));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.button.mod-AI:not(.invert).mod-invert{--components-button-backgroundColor: transparent;--components-button-color: var(--palettes-neutral-0);background-image:linear-gradient(225deg,color-mix(in srgb,var(--palettes-AI-500) var(--components-button-AI-background-opacity),transparent),color-mix(in srgb,var(--palettes-brand-400) var(--components-button-AI-background-opacity),transparent))}.button.mod-AI:not(.invert).mod-invert:hover,.button.mod-AI:not(.invert).mod-invert:focus-visible{--components-button-AI-background-opacity: 15%;--components-button-color: var(--palettes-neutral-0)}.button.mod-AI:not(.invert).mod-invert:active{--components-button-AI-background-opacity: 5%}.button.mod-AI:not(.invert).is-success .lucca-icon{background-image:none}.button.mod-AI:not(.invert).is-success:before{content:none}.button.mod-AI:not(.invert).is-success:after{background-image:linear-gradient(135deg,var(--palettes-AI-600),var(--palettes-brand-500));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.button.mod-AI:not(.invert).is-loading{--components-button-color: transparent;--components-button-backgroundColor: var(--palettes-neutral-0);--commons-loading-frontground: var(--palettes-neutral-300);--components-button-boxShadow: 0 0 0 var(--commons-divider-width) var(--palettes-neutral-100)}.button.mod-AI:not(.invert).is-loading .lucca-icon{background-image:none!important}.button.mod-AI:not(.invert).is-loading:before{content:none}.button.mod-block{--components-button-width: 100%}.button.mod-S{--icon-size: 1.25rem;--components-button-font: var(--pr-t-font-body-S);--components-button-paddingBlock: var(--pr-t-spacings-75);--components-button-paddingInline: var(--pr-t-spacings-100);--components-button-gap: var(--pr-t-spacings-75)}.button.mod-S .numericBadge{--components-numericBadge-size: 1.25rem;--components-numericBadge-borderRadius: var(--pr-t-border-radius-small);--components-numericBadge-font: var(--pr-t-font-body-XS);--components-numericBadge-fontSize: var(--pr-t-font-body-XS-fontSize);--components-numericBadge-lineHeight: var(--pr-t-font-body-XS-lineHeight)}.button.mod-S{--components-button-font-size: var(--pr-t-font-body-S-fontSize);--components-button-line-height: var(--pr-t-font-body-S-lineHeight)}.button.mod-S:after{font-size:var(--pr-t-font-body-S-lineHeight);block-size:var(--pr-t-font-body-S-lineHeight)}.button.mod-XS{--icon-size: 1rem;--components-button-font: var(--pr-t-font-body-XS);--components-button-paddingBlock: var(--pr-t-spacings-50);--components-button-paddingInline: var(--pr-t-spacings-75);--components-button-gap: var(--pr-t-spacings-50);--components-button-borderRadius: var(--pr-t-border-radius-small)}.button.mod-XS .numericBadge{--components-numericBadge-size: 1rem;--components-numericBadge-borderRadius: var(--pr-t-border-radius-small);--components-numericBadge-font: var(--pr-t-font-body-XS);--components-numericBadge-fontSize: var(--pr-t-font-body-XS-fontSize);--components-numericBadge-lineHeight: var(--pr-t-font-body-XS-lineHeight)}.button.mod-XS{--components-button-font-size: var(--pr-t-font-body-XS-fontSize);--components-button-line-height: var(--pr-t-font-body-XS-lineHeight)}.button.mod-XS:after{font-size:var(--pr-t-font-body-XS-lineHeight);block-size:var(--pr-t-font-body-XS-lineHeight)}.button.mod-disclosure{--components-button-paddingInlineEnd: var(--pr-t-spacings-100)}.button.mod-disclosure .icon-arrowChevronBottom{transition-property:transform;transition-duration:var(--commons-animations-durations-fast);transform:var(--components-button-arrow-transform)}.button.mod-disclosure[aria-expanded=true]{--components-button-arrow-transform: rotate(180deg)}.button.mod-outline:where(:not(.is-success,.is-error)),.button.mod-outlined: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: var(--pr-t-elevation-shadow-button), 0 0 0 var(--commons-divider-width) var(--palettes-neutral-200)}.button.mod-outline:where(:not(.is-success,.is-error)):hover,.button.mod-outlined:where(:not(.is-success,.is-error)):hover{--components-button-boxShadow: var(--pr-t-elevation-shadow-button), 0 0 0 var(--commons-divider-width) var(--palettes-300, var(--palettes-neutral-300));--components-button-color: var(--palettes-700, var(--palettes-neutral-700));--components-button-backgroundColor: var(--palettes-50, var(--palettes-neutral-50))}.button.mod-outline:where(:not(.is-success,.is-error)):active,.button.mod-outlined:where(:not(.is-success,.is-error)):active{--components-button-backgroundColor: var(--palettes-100, var(--palettes-neutral-100))}.button.mod-outline:where(:not(.is-success,.is-error)):focus-visible,.button.mod-outlined:where(:not(.is-success,.is-error)):focus-visible{outline:2px solid var(--palettes-700, var(--palettes-product-700));outline-offset:3px}.button.mod-outline:where(:not(.is-success,.is-error)):disabled,.button.mod-outlined:where(:not(.is-success,.is-error)):disabled{--components-button-backgroundColor: var(--palettes-neutral-0);--components-button-boxShadow: 0 0 0 1px var(--palettes-neutral-100);--components-button-color: var(--pr-t-color-text-disabled)}.button.mod-link:where(:not(.is-success,.is-error)),.button.mod-text:where(:not(.is-success,.is-error)),.button.mod-ghost:where(:not(.is-success,.is-error)){--components-button-backgroundColor: transparent;--components-button-color: var(--palettes-700, var(--pr-t-color-text-subtle));--components-button-boxShadow: none}.button.mod-link:where(:not(.is-success,.is-error)):hover,.button.mod-link:where(:not(.is-success,.is-error)):focus-visible,.button.mod-text:where(:not(.is-success,.is-error)):hover,.button.mod-text:where(:not(.is-success,.is-error)):focus-visible,.button.mod-ghost:where(:not(.is-success,.is-error)):hover,.button.mod-ghost:where(:not(.is-success,.is-error)):focus-visible{--components-button-color: var(--palettes-700, var(--pr-t-color-text-subtle));--components-button-backgroundColor: var(--palettes-50, var(--palettes-neutral-50))}.button.mod-link:where(:not(.is-success,.is-error)):active,.button.mod-text:where(:not(.is-success,.is-error)):active,.button.mod-ghost:where(:not(.is-success,.is-error)):active{--components-button-backgroundColor: var(--palettes-100, var(--palettes-neutral-100))}.button.mod-link:where(:not(.is-success,.is-error)):disabled,.button.mod-text:where(:not(.is-success,.is-error)):disabled,.button.mod-ghost:where(:not(.is-success,.is-error)):disabled{--components-button-backgroundColor: transparent;--components-button-color: var(--pr-t-color-text-disabled)}.button.mod-withIcon.mod-iconOnLeft{--components-button-paddingInlineStart: var(--pr-t-spacings-100)}.button.mod-withIcon.mod-iconOnLeft.mod-S{--components-button-paddingInlineStart: var(--pr-t-spacings-75)}.button.mod-withIcon.mod-iconOnLeft.mod-XS{--components-button-paddingInlineStart: var(--pr-t-spacings-50)}.button.mod-withIcon.mod-iconOnRight{--components-button-paddingInlineEnd: var(--pr-t-spacings-100)}.button.mod-withIcon.mod-iconOnRight.mod-S{--components-button-paddingInlineEnd: var(--pr-t-spacings-75)}.button.mod-withIcon.mod-iconOnRight.mod-XS{--components-button-paddingInlineEnd: var(--pr-t-spacings-50)}.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:has(.numericBadge){--components-button-paddingInlineEnd: var(--pr-t-spacings-100)}.button:has(.numericBadge).mod-S{--components-button-paddingInlineEnd: var(--pr-t-spacings-75)}.button:has(.numericBadge).mod-XS{--components-button-paddingInlineEnd: var(--pr-t-spacings-50)}.button.mod-delete:hover,.button.mod-critical:hover{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-100)}.button.mod-delete:active,.button.mod-critical:active{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-200)}.button.mod-delete.mod-link:hover,.button.mod-delete.mod-link:focus-visible,.button.mod-delete.mod-text:hover,.button.mod-delete.mod-text:focus-visible,.button.mod-critical.mod-link:hover,.button.mod-critical.mod-link:focus-visible,.button.mod-critical.mod-text:hover,.button.mod-critical.mod-text:focus-visible{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-100)}.button.mod-delete.mod-link:active,.button.mod-delete.mod-text:active,.button.mod-critical.mod-link:active,.button.mod-critical.mod-text:active{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-200)}.button.mod-delete.mod-outline:hover,.button.mod-delete.mod-outlined:hover,.button.mod-critical.mod-outline:hover,.button.mod-critical.mod-outlined:hover{--components-button-boxShadow: var(--pr-t-elevation-shadow-button), 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-outline:focus-visible,.button.mod-delete.mod-outlined:focus-visible,.button.mod-critical.mod-outline:focus-visible,.button.mod-critical.mod-outlined: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-outline:active,.button.mod-delete.mod-outlined:active,.button.mod-critical.mod-outline:active,.button.mod-critical.mod-outlined:active{--components-button-color: var(--palettes-error-700);--components-button-backgroundColor: var(--palettes-error-200)}.button.mod-invert,.button.mod-inverted{--components-button-color: var(--palettes-neutral-0)}.button.mod-invert:hover,.button.mod-invert:focus-visible,.button.mod-inverted:hover,.button.mod-inverted:focus-visible{--components-button-color: var(--palettes-neutral-0);--components-button-backgroundColor: var(--palettes-neutral-900)}.button.mod-invert:active,.button.mod-inverted:active{--components-button-backgroundColor: var(--palettes-neutral-700)}.button.mod-more{--components-button-minWidth: 2rem;--components-button-padding: 0}.button.mod-more:after{--icon-content: \"\\e97c\";font-weight:var(--pr-t-font-fontWeight-regular);display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:var(--icon-fontFamily);content:var(--icon-content)/\"\";-webkit-font-smoothing:antialiased;text-transform:none;block-size:0;order:-1;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.loading,.button.is-loading{--components-button-pointerEvents: none;--components-button-color: transparent;--components-button-userSelect: none;--components-button-boxShadow: none;--components-button-backgroundColor: var(--palettes-500, var(--palettes-product-500));--commons-loading-frontground: var(--palettes-50, var(--palettes-product-50))}.button.loading:after,.button.is-loading:after{content:\"\";inline-size:var(--pr-t-font-body-M-lineHeight);block-size:var(--pr-t-font-body-M-lineHeight);border-radius:var(--pr-t-border-radius-full);line-height:.8rem;border-width:var(--commons-loading-borderWidth);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-block-start-color:transparent}.button.loading .numericBadge,.button.is-loading .numericBadge{--components-numericBadge-background: transparent;--components-numericBadge-color: transparent}.button.loading.mod-S:after,.button.is-loading.mod-S:after{content:\"\";inline-size:var(--pr-t-font-body-S-lineHeight);block-size:var(--pr-t-font-body-S-lineHeight);border-radius:var(--pr-t-border-radius-full);line-height:.8rem;border-width:var(--commons-loading-borderWidth);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-block-start-color:transparent}.button.loading.mod-XS:after,.button.is-loading.mod-XS:after{content:\"\";inline-size:var(--pr-t-font-body-XS-lineHeight);block-size:var(--pr-t-font-body-XS-lineHeight);border-radius:var(--pr-t-border-radius-full);line-height:.8rem;border-width:var(--commons-loading-borderWidth);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-block-start-color:transparent}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.button.loading.mod-XS,.button.is-loading.mod-XS{--commons-loading-borderWidth: 2px}.button.loading.mod-outlined,.button.is-loading.mod-outlined{--components-button-backgroundColor: var(--palettes-neutral-0);--commons-loading-frontground: var(--palettes-neutral-300);--components-button-boxShadow: 0 0 0 var(--commons-divider-width) var(--palettes-neutral-100)}.button.loading.mod-ghost,.button.is-loading.mod-ghost{--components-button-backgroundColor: var(--palettes-neutral-50);--commons-loading-frontground: var(--palettes-neutral-400)}.button.error,.button.is-error{animation-name:shake;animation-iteration-count:1;animation-duration:var(--commons-animations-durations-standard)}@keyframes shake{0%,to{transform:translateZ(0)}20%,60%{transform:translate3d(-3px,0,0)}40%,80%{transform:translate3d(3px,0,0)}}.button.success,.button.is-success{--components-button-backgroundColor: var(--palettes-500, var(--palettes-product-500));--components-button-color: transparent;--components-button-pointerEvents: none;--components-button-userSelect: none}.button.success:after,.button.is-success:after{--icon-content: \"\\e97d\";font-weight:var(--pr-t-font-fontWeight-regular);display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:var(--icon-fontFamily);content:var(--icon-content)/\"\";-webkit-font-smoothing:antialiased;text-transform:none;color:var(--palettes-neutral-0);font-size:calc(1.5 * var(--pr-t-font-body-M-fontSize));block-size:var(--pr-t-font-body-M-lineHeight);inset:0;margin:auto;position:absolute}.button.success .numericBadge,.button.is-success .numericBadge{--components-numericBadge-background: transparent;--components-numericBadge-color: transparent}.button.success.mod-AI,.button.success.mod-outlined,.button.is-success.mod-AI,.button.is-success.mod-outlined{--components-button-backgroundColor: var(--palettes-neutral-0);--components-button-boxShadow: 0 0 0 var(--commons-divider-width) var(--palettes-neutral-100)}.button.success.mod-AI:after,.button.success.mod-outlined:after,.button.is-success.mod-AI:after,.button.is-success.mod-outlined:after{color:var(--palettes-700, var(--palettes-product-700))}.button.success.mod-ghost,.button.is-success.mod-ghost{--components-button-backgroundColor: var(--palettes-neutral-50);--components-button-boxShadow: none}.button.success.mod-ghost:after,.button.is-success.mod-ghost:after{color:var(--palettes-700, var(--palettes-product-700))}.button.disabled,.button.is-disabled,.button[aria-disabled=true]{--components-button-cursor: default;--components-button-color: var(--pr-t-color-text-disabled);--components-button-backgroundColor: var(--commons-disabled-background);--components-button-pointerEvents: none}.button.disabled .numericBadge,.button.is-disabled .numericBadge,.button[aria-disabled=true] .numericBadge{--components-numericBadge-background: var(--palettes-neutral-200);--components-numericBadge-color: var(--palettes-neutral-500)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
117
117
|
}
|
|
118
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
118
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
119
119
|
type: Component,
|
|
120
120
|
args: [{ selector: 'button[luButton], a[luButton], span[luButton], button[prButton], a[prButton], span[prButton]', providers: [PrClass], template: '<ng-content />', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
121
121
|
class: 'button',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucca-prisme-button.mjs","sources":["../../../packages/prisme/button/button-type.ts","../../../packages/prisme/button/button.component.ts","../../../packages/prisme/button/lucca-prisme-button.ts"],"sourcesContent":["/**\n * Available ButtonComponent Types\n */\n\nexport const BUTTON_SIZE = ['M', 'S', 'XS'] as const;\nexport type ButtonSize = (typeof BUTTON_SIZE)[number];\n\nexport const BUTTON_STATE = ['default', 'loading', 'error', 'success'] as const;\nexport type ButtonState = (typeof BUTTON_STATE)[number];\n\nexport const BUTTON_TYPE = ['', 'outlined', 'AI', 'AI-invert', 'ghost', 'ghost-invert', 'text', 'text-invert'] as const;\nexport type ButtonType = (typeof BUTTON_TYPE)[number];\n","import { booleanAttribute, ChangeDetectionStrategy, Component, computed, contentChild, ElementRef, inject, input, signal, ViewEncapsulation } from '@angular/core';\nimport { Palette, PrClass, ɵeffectWithDeps } from '@lucca/prisme/core';\nimport { IconComponent } from '@lucca/prisme/icon';\nimport { ButtonSize, ButtonState, ButtonType } from './button-type';\n\n@Component({\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'button[luButton], a[luButton], span[luButton], button[prButton], a[prButton], span[prButton]',\n\tproviders: [PrClass],\n\ttemplate: '<ng-content />',\n\tstyleUrl: './button.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n\thost: {\n\t\tclass: 'button',\n\t\t'[class.is-error]': 'notifyError()',\n\t\t'(click)': 'triggerErrorIfNeeded()',\n\t\t'(animationend)': 'notifyError.set(false)',\n\t},\n})\nexport class ButtonComponent {\n\t#prClass = inject(PrClass);\n\t#elementRef = inject<ElementRef<HTMLButtonElement>>(ElementRef);\n\n\treadonly notifyError = signal(false);\n\n\t/**\n\t * Change the size of the Button\n\t */\n\treadonly size = input<ButtonSize>();\n\n\t/**\n\t * Apply block display\n\t */\n\treadonly block = input(false, { transform: booleanAttribute });\n\n\t/**\n\t * Indicates an action with significant or irreversible consequences on hover and focus. Only compatible with outlined and ghost\n\t */\n\treadonly critical = input(false, { transform: booleanAttribute });\n\n\t/**\n\t * @deprecated use `critical` input instead\n\t */\n\treadonly delete = input(false, { transform: booleanAttribute });\n\n\t/**\n\t * Indicates the presence of a menu\n\t */\n\treadonly disclosure = input(false, { transform: booleanAttribute });\n\n\t/**\n\t * Applies a color palette to the Button\n\t */\n\treadonly palette = input<Palette>('none');\n\n\t/**\n\t * Modifies the state of the Button\n\t */\n\treadonly state = input<ButtonState>('default');\n\n\treadonly luButton = input<ButtonType>('');\n\n\t/**\n\t * '' is the default value when you just set the `prButton` directive without a value attached to it.\n\t * We just make this explicit here.\n\t */\n\treadonly prButton = input<ButtonType>('');\n\n\treadonly buttonType = computed(() => this.luButton() || this.prButton());\n\n\treadonly iconComponentRef = contentChild<IconComponent, ElementRef<HTMLElement>>(IconComponent, { read: ElementRef });\n\n\treadonly classesConfig = computed(() => {\n\t\tconst config = {\n\t\t\t[`mod-${this.size()}`]: !!this.size(),\n\t\t\t[`mod-block`]: this.block(),\n\t\t\t[`palette-${this.palette()}`]: !!this.palette(),\n\t\t\t[`is-${this.state()}`]: !!this.state() && this.state() !== 'error',\n\t\t\t['mod-onlyIcon']: this.iconOnly,\n\t\t\t['mod-iconOnLeft']: this.iconOnLeft,\n\t\t\t['mod-iconOnRight']: this.iconOnRight,\n\t\t\t['mod-withIcon']: this.iconComponentRef() !== undefined && !this.disclosure() && !this.iconOnly,\n\t\t\t['mod-critical']: this.critical() || this.delete(),\n\t\t\t['mod-disclosure']: this.disclosure(),\n\t\t};\n\n\t\tif (this.buttonType() !== '') {\n\t\t\tif (this.buttonType() === 'ghost-invert') {\n\t\t\t\tconfig['mod-ghost'] = true;\n\t\t\t\tconfig['mod-invert'] = true;\n\t\t\t} else if (this.luButton() === 'AI-invert') {\n\t\t\t\tconfig['mod-AI'] = true;\n\t\t\t\tconfig['mod-invert'] = true;\n\t\t\t} else {\n\t\t\t\tconfig[`mod-${this.buttonType()}`] = true;\n\t\t\t}\n\t\t}\n\t\treturn config;\n\t});\n\n\tprivate get iconOnly(): boolean {\n\t\tconst childNodes = Array.from(this.#elementRef?.nativeElement?.childNodes || []);\n\t\tconst noText = childNodes.every(({ nodeName }) => nodeName !== '#text');\n\t\t// ignore icon and comment\n\t\tconst noSpan =\n\t\t\tchildNodes.filter((node: HTMLElement) => {\n\t\t\t\treturn node.nodeName !== '#comment' && node.nodeName.toLowerCase() !== 'lu-icon' && !node?.className?.includes('mask');\n\t\t\t}).length == 0;\n\t\treturn !!this.iconComponentRef() && noSpan && noText;\n\t}\n\n\tprivate get iconOnLeft(): boolean {\n\t\treturn this.iconComponentRef()?.nativeElement === this.#elementRef?.nativeElement?.firstChild;\n\t}\n\n\tprivate get iconOnRight(): boolean {\n\t\treturn this.iconComponentRef()?.nativeElement === this.#elementRef?.nativeElement?.lastChild;\n\t}\n\n\tconstructor() {\n\t\tɵeffectWithDeps([this.state], (state) => {\n\t\t\tif (state) {\n\t\t\t\tthis.triggerErrorIfNeeded();\n\t\t\t}\n\t\t});\n\n\t\tɵeffectWithDeps([this.classesConfig], (config) => {\n\t\t\tif (config) {\n\t\t\t\tthis.#prClass.setState(config);\n\t\t\t}\n\t\t});\n\t}\n\n\ttriggerErrorIfNeeded(): void {\n\t\tif (this.state() === 'error') {\n\t\t\tthis.notifyError.set(true);\n\t\t}\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵeffectWithDeps"],"mappings":";;;;;AAAA;;AAEG;AAEI,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI;AAGnC,MAAM,YAAY,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS;MAGxD,WAAW,GAAG,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,aAAa;;MCUhG,eAAe,CAAA;AAC3B,IAAA,QAAQ;AACR,IAAA,WAAW;AA+EX,IAAA,IAAY,QAAQ,GAAA;AACnB,QAAA,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,aAAa,EAAE,UAAU,IAAI,EAAE,CAAC;AAChF,QAAA,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,QAAQ,KAAK,OAAO,CAAC;;QAEvE,MAAM,MAAM,GACX,UAAU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OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,gBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,aAAa,CAAA,EAAA,EAAA,GAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ACvErH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"lucca-prisme-button.mjs","sources":["../../../packages/prisme/button/button-type.ts","../../../packages/prisme/button/button.component.ts","../../../packages/prisme/button/lucca-prisme-button.ts"],"sourcesContent":["/**\n * Available ButtonComponent Types\n */\n\nexport const BUTTON_SIZE = ['M', 'S', 'XS'] as const;\nexport type ButtonSize = (typeof BUTTON_SIZE)[number];\n\nexport const BUTTON_STATE = ['default', 'loading', 'error', 'success'] as const;\nexport type ButtonState = (typeof BUTTON_STATE)[number];\n\nexport const BUTTON_TYPE = ['', 'outlined', 'AI', 'AI-invert', 'ghost', 'ghost-invert', 'text', 'text-invert'] as const;\nexport type ButtonType = (typeof BUTTON_TYPE)[number];\n","import { booleanAttribute, ChangeDetectionStrategy, Component, computed, contentChild, ElementRef, inject, input, signal, ViewEncapsulation } from '@angular/core';\nimport { Palette, PrClass, ɵeffectWithDeps } from '@lucca/prisme/core';\nimport { IconComponent } from '@lucca/prisme/icon';\nimport { ButtonSize, ButtonState, ButtonType } from './button-type';\n\n@Component({\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'button[luButton], a[luButton], span[luButton], button[prButton], a[prButton], span[prButton]',\n\tproviders: [PrClass],\n\ttemplate: '<ng-content />',\n\tstyleUrl: './button.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n\thost: {\n\t\tclass: 'button',\n\t\t'[class.is-error]': 'notifyError()',\n\t\t'(click)': 'triggerErrorIfNeeded()',\n\t\t'(animationend)': 'notifyError.set(false)',\n\t},\n})\nexport class ButtonComponent {\n\t#prClass = inject(PrClass);\n\t#elementRef = inject<ElementRef<HTMLButtonElement>>(ElementRef);\n\n\treadonly notifyError = signal(false);\n\n\t/**\n\t * Change the size of the Button\n\t */\n\treadonly size = input<ButtonSize>();\n\n\t/**\n\t * Apply block display\n\t */\n\treadonly block = input(false, { transform: booleanAttribute });\n\n\t/**\n\t * Indicates an action with significant or irreversible consequences on hover and focus. Only compatible with outlined and ghost\n\t */\n\treadonly critical = input(false, { transform: booleanAttribute });\n\n\t/**\n\t * @deprecated use `critical` input instead\n\t */\n\treadonly delete = input(false, { transform: booleanAttribute });\n\n\t/**\n\t * Indicates the presence of a menu\n\t */\n\treadonly disclosure = input(false, { transform: booleanAttribute });\n\n\t/**\n\t * Applies a color palette to the Button\n\t */\n\treadonly palette = input<Palette>('none');\n\n\t/**\n\t * Modifies the state of the Button\n\t */\n\treadonly state = input<ButtonState>('default');\n\n\treadonly luButton = input<ButtonType>('');\n\n\t/**\n\t * '' is the default value when you just set the `prButton` directive without a value attached to it.\n\t * We just make this explicit here.\n\t */\n\treadonly prButton = input<ButtonType>('');\n\n\treadonly buttonType = computed(() => this.luButton() || this.prButton());\n\n\treadonly iconComponentRef = contentChild<IconComponent, ElementRef<HTMLElement>>(IconComponent, { read: ElementRef });\n\n\treadonly classesConfig = computed(() => {\n\t\tconst config = {\n\t\t\t[`mod-${this.size()}`]: !!this.size(),\n\t\t\t[`mod-block`]: this.block(),\n\t\t\t[`palette-${this.palette()}`]: !!this.palette(),\n\t\t\t[`is-${this.state()}`]: !!this.state() && this.state() !== 'error',\n\t\t\t['mod-onlyIcon']: this.iconOnly,\n\t\t\t['mod-iconOnLeft']: this.iconOnLeft,\n\t\t\t['mod-iconOnRight']: this.iconOnRight,\n\t\t\t['mod-withIcon']: this.iconComponentRef() !== undefined && !this.disclosure() && !this.iconOnly,\n\t\t\t['mod-critical']: this.critical() || this.delete(),\n\t\t\t['mod-disclosure']: this.disclosure(),\n\t\t};\n\n\t\tif (this.buttonType() !== '') {\n\t\t\tif (this.buttonType() === 'ghost-invert') {\n\t\t\t\tconfig['mod-ghost'] = true;\n\t\t\t\tconfig['mod-invert'] = true;\n\t\t\t} else if (this.luButton() === 'AI-invert') {\n\t\t\t\tconfig['mod-AI'] = true;\n\t\t\t\tconfig['mod-invert'] = true;\n\t\t\t} else {\n\t\t\t\tconfig[`mod-${this.buttonType()}`] = true;\n\t\t\t}\n\t\t}\n\t\treturn config;\n\t});\n\n\tprivate get iconOnly(): boolean {\n\t\tconst childNodes = Array.from(this.#elementRef?.nativeElement?.childNodes || []);\n\t\tconst noText = childNodes.every(({ nodeName }) => nodeName !== '#text');\n\t\t// ignore icon and comment\n\t\tconst noSpan =\n\t\t\tchildNodes.filter((node: HTMLElement) => {\n\t\t\t\treturn node.nodeName !== '#comment' && node.nodeName.toLowerCase() !== 'lu-icon' && !node?.className?.includes('mask');\n\t\t\t}).length == 0;\n\t\treturn !!this.iconComponentRef() && noSpan && noText;\n\t}\n\n\tprivate get iconOnLeft(): boolean {\n\t\treturn this.iconComponentRef()?.nativeElement === this.#elementRef?.nativeElement?.firstChild;\n\t}\n\n\tprivate get iconOnRight(): boolean {\n\t\treturn this.iconComponentRef()?.nativeElement === this.#elementRef?.nativeElement?.lastChild;\n\t}\n\n\tconstructor() {\n\t\tɵeffectWithDeps([this.state], (state) => {\n\t\t\tif (state) {\n\t\t\t\tthis.triggerErrorIfNeeded();\n\t\t\t}\n\t\t});\n\n\t\tɵeffectWithDeps([this.classesConfig], (config) => {\n\t\t\tif (config) {\n\t\t\t\tthis.#prClass.setState(config);\n\t\t\t}\n\t\t});\n\t}\n\n\ttriggerErrorIfNeeded(): void {\n\t\tif (this.state() === 'error') {\n\t\t\tthis.notifyError.set(true);\n\t\t}\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵeffectWithDeps"],"mappings":";;;;;AAAA;;AAEG;AAEI,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI;AAGnC,MAAM,YAAY,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS;MAGxD,WAAW,GAAG,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,aAAa;;MCUhG,eAAe,CAAA;AAC3B,IAAA,QAAQ;AACR,IAAA,WAAW;AA+EX,IAAA,IAAY,QAAQ,GAAA;AACnB,QAAA,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,aAAa,EAAE,UAAU,IAAI,EAAE,CAAC;AAChF,QAAA,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,QAAQ,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,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,gBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,aAAa,CAAA,EAAA,EAAA,GAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ACvErH;;AAEG;;;;"}
|
|
@@ -53,10 +53,10 @@ class PrClass {
|
|
|
53
53
|
this.#renderer.removeClass(this.#elementRef.nativeElement, klass);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
57
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
56
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PrClass, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
57
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PrClass }); }
|
|
58
58
|
}
|
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PrClass, decorators: [{
|
|
60
60
|
type: Injectable
|
|
61
61
|
}] });
|
|
62
62
|
function normalizeToRecord(obj) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucca-prisme-core.mjs","sources":["../../../packages/prisme/core/class.ts","../../../packages/prisme/core/style.ts","../../../packages/prisme/core/signal.ts","../../../packages/prisme/core/lucca-prisme-core.ts"],"sourcesContent":["import { ElementRef, inject, Injectable, Renderer2 } from '@angular/core';\n\ntype PrClassSupportedTypes = string | string[] | Set<string> | { [klass: string]: boolean };\n\ninterface CssClassState {\n\tenabled: boolean;\n\tchanged: boolean;\n\ttouched: boolean;\n}\n\n@Injectable()\nexport class PrClass {\n\t#elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\t#renderer = inject(Renderer2);\n\n\t#state: Record<string, boolean> = {};\n\t#stateMap = new Map<string, CssClassState>();\n\n\tpublic setState(value: PrClassSupportedTypes) {\n\t\tthis.#state = normalizeToRecord(value);\n\n\t\tfor (const [klass, enabled] of Object.entries(this.#state)) {\n\t\t\tthis.#updateState(klass, enabled);\n\t\t}\n\n\t\tthis.#applyStateDiff();\n\t}\n\n\t#updateState(klass: string, nextEnabled: boolean) {\n\t\tconst state = this.#stateMap.get(klass);\n\t\tif (state !== undefined) {\n\t\t\tif (state.enabled !== nextEnabled) {\n\t\t\t\tstate.changed = true;\n\t\t\t\tstate.enabled = nextEnabled;\n\t\t\t}\n\t\t\tstate.touched = true;\n\t\t} else {\n\t\t\tthis.#stateMap.set(klass, { enabled: nextEnabled, changed: true, touched: true });\n\t\t}\n\t}\n\n\t#applyStateDiff() {\n\t\tfor (const stateEntry of this.#stateMap) {\n\t\t\tconst klass = stateEntry[0];\n\t\t\tconst state = stateEntry[1];\n\n\t\t\tif (state.changed) {\n\t\t\t\tthis.#toggleClass(klass, state.enabled);\n\t\t\t\tstate.changed = false;\n\t\t\t} else if (!state.touched) {\n\t\t\t\t// A class that was previously active got removed from the new collection of classes -\n\t\t\t\t// remove from the DOM as well.\n\t\t\t\tif (state.enabled) {\n\t\t\t\t\tthis.#toggleClass(klass, false);\n\t\t\t\t}\n\t\t\t\tthis.#stateMap.delete(klass);\n\t\t\t}\n\n\t\t\tstate.touched = false;\n\t\t}\n\t}\n\n\t#toggleClass(klass: string, enabled: boolean): void {\n\t\tif (enabled) {\n\t\t\tthis.#renderer.addClass(this.#elementRef.nativeElement, klass);\n\t\t} else {\n\t\t\tthis.#renderer.removeClass(this.#elementRef.nativeElement, klass);\n\t\t}\n\t}\n}\n\nfunction normalizeToRecord(obj: PrClassSupportedTypes): Record<string, boolean> {\n\tif (Array.isArray(obj) || obj instanceof Set) {\n\t\tconst result: Record<string, boolean> = {};\n\n\t\tfor (const item of obj) {\n\t\t\tresult[item] = true;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tif (typeof obj === 'string') {\n\t\tobj = obj.trim();\n\t\treturn obj ? { [obj]: true } : {};\n\t}\n\n\treturn obj;\n}\n","/**\n * Available CSS palettes\n */\n// primary is deprecated\n// grey is deprecated\nexport const PALETTE = ['success', 'warning', 'error', 'product', 'neutral', 'none', 'primary', 'grey', 'brand'] as const;\nexport type Palette = (typeof PALETTE)[number];\n\nexport const DECORATIVE_PALETTE = ['kiwi', 'lime', 'cucumber', 'mint', 'glacier', 'lagoon', 'blueberry', 'lavender', 'grape', 'watermelon', 'pumpkin', 'pineapple'] as const;\nexport type DecorativePalette = (typeof DECORATIVE_PALETTE)[number];\n","/**\n * In order to make this efficient when building the split, I copied this from lucca-front/core, TODO use it from here instead\n */\nimport { CreateEffectOptions, effect, EffectCleanupRegisterFn, EffectRef, Signal, untracked } from '@angular/core';\n\ntype SignalsValue<T> = T extends readonly unknown[] ? TupleOfSignalValues<T> : [RecordOfSignalValues<T>];\n\ntype TupleOfSignalValues<T> = T extends readonly [Signal<infer U>, ...infer R] ? [U, ...TupleOfSignalValues<R>] : [];\ntype RecordOfSignalValues<T> = { [K in keyof T]: T[K] extends Signal<infer U> ? U : never };\n\nexport type EffectWithDepsInput = ReadonlyArray<Signal<unknown>> | Record<string, Signal<unknown>>;\n\n/**\n * Effect peut être dangereux car l'action accomplie peut elle-même déclencher des écritures dans des signaux.\n * C'est une mauvaise pratique, interdite par défaut par Angular.\n * La plupart du temps, seule la lecture des signaux est intéressante à tracker, pas les actions qui en découlent.\n */\nexport function ɵeffectWithDeps<const T extends EffectWithDepsInput>(\n\tdependencies: T,\n\taction: (...values: [...SignalsValue<T>, EffectCleanupRegisterFn]) => unknown,\n\toptions?: CreateEffectOptions,\n): EffectRef {\n\treturn effect((onCleanup) => {\n\t\tconst deps = isReadonlyArray(dependencies) ? readTupleOfSignalValues(dependencies) : [readRecordOfSignalValues(dependencies)];\n\n\t\tuntracked(() => action(...(deps as SignalsValue<T>), onCleanup));\n\t}, options);\n}\n\nfunction readTupleOfSignalValues<T extends readonly Signal<unknown>[]>(signals: T): TupleOfSignalValues<T> {\n\treturn signals.map((signal) => signal()) as TupleOfSignalValues<T>;\n}\n\nfunction readRecordOfSignalValues<T extends Record<string, Signal<unknown>>>(signals: T): RecordOfSignalValues<T> {\n\treturn Object.fromEntries(Object.entries(signals).map(([key, signal]) => [key, signal()])) as RecordOfSignalValues<T>;\n}\n\nfunction isReadonlyArray(input: EffectWithDepsInput): input is ReadonlyArray<Signal<unknown>> {\n\treturn Array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AAA,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC;AAE3B,YAAA,IAAI,KAAK,CAAC,OAAO,EAAE;gBAClB,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC;AACvC,gBAAA,KAAK,CAAC,OAAO,GAAG,KAAK;YACtB;AAAO,iBAAA,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;;;AAG1B,gBAAA,IAAI,KAAK,CAAC,OAAO,EAAE;AAClB,oBAAA,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC;gBAChC;AACA,gBAAA,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC;YAC7B;AAEA,YAAA,KAAK,CAAC,OAAO,GAAG,KAAK;QACtB;IACD;IAEA,YAAY,CAAC,KAAa,EAAE,OAAgB,EAAA;QAC3C,IAAI,OAAO,EAAE;AACZ,YAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,KAAK,CAAC;QAC/D;aAAO;AACN,YAAA,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,KAAK,CAAC;QAClE;IACD
|
|
1
|
+
{"version":3,"file":"lucca-prisme-core.mjs","sources":["../../../packages/prisme/core/class.ts","../../../packages/prisme/core/style.ts","../../../packages/prisme/core/signal.ts","../../../packages/prisme/core/lucca-prisme-core.ts"],"sourcesContent":["import { ElementRef, inject, Injectable, Renderer2 } from '@angular/core';\n\ntype PrClassSupportedTypes = string | string[] | Set<string> | { [klass: string]: boolean };\n\ninterface CssClassState {\n\tenabled: boolean;\n\tchanged: boolean;\n\ttouched: boolean;\n}\n\n@Injectable()\nexport class PrClass {\n\t#elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\t#renderer = inject(Renderer2);\n\n\t#state: Record<string, boolean> = {};\n\t#stateMap = new Map<string, CssClassState>();\n\n\tpublic setState(value: PrClassSupportedTypes) {\n\t\tthis.#state = normalizeToRecord(value);\n\n\t\tfor (const [klass, enabled] of Object.entries(this.#state)) {\n\t\t\tthis.#updateState(klass, enabled);\n\t\t}\n\n\t\tthis.#applyStateDiff();\n\t}\n\n\t#updateState(klass: string, nextEnabled: boolean) {\n\t\tconst state = this.#stateMap.get(klass);\n\t\tif (state !== undefined) {\n\t\t\tif (state.enabled !== nextEnabled) {\n\t\t\t\tstate.changed = true;\n\t\t\t\tstate.enabled = nextEnabled;\n\t\t\t}\n\t\t\tstate.touched = true;\n\t\t} else {\n\t\t\tthis.#stateMap.set(klass, { enabled: nextEnabled, changed: true, touched: true });\n\t\t}\n\t}\n\n\t#applyStateDiff() {\n\t\tfor (const stateEntry of this.#stateMap) {\n\t\t\tconst klass = stateEntry[0];\n\t\t\tconst state = stateEntry[1];\n\n\t\t\tif (state.changed) {\n\t\t\t\tthis.#toggleClass(klass, state.enabled);\n\t\t\t\tstate.changed = false;\n\t\t\t} else if (!state.touched) {\n\t\t\t\t// A class that was previously active got removed from the new collection of classes -\n\t\t\t\t// remove from the DOM as well.\n\t\t\t\tif (state.enabled) {\n\t\t\t\t\tthis.#toggleClass(klass, false);\n\t\t\t\t}\n\t\t\t\tthis.#stateMap.delete(klass);\n\t\t\t}\n\n\t\t\tstate.touched = false;\n\t\t}\n\t}\n\n\t#toggleClass(klass: string, enabled: boolean): void {\n\t\tif (enabled) {\n\t\t\tthis.#renderer.addClass(this.#elementRef.nativeElement, klass);\n\t\t} else {\n\t\t\tthis.#renderer.removeClass(this.#elementRef.nativeElement, klass);\n\t\t}\n\t}\n}\n\nfunction normalizeToRecord(obj: PrClassSupportedTypes): Record<string, boolean> {\n\tif (Array.isArray(obj) || obj instanceof Set) {\n\t\tconst result: Record<string, boolean> = {};\n\n\t\tfor (const item of obj) {\n\t\t\tresult[item] = true;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tif (typeof obj === 'string') {\n\t\tobj = obj.trim();\n\t\treturn obj ? { [obj]: true } : {};\n\t}\n\n\treturn obj;\n}\n","/**\n * Available CSS palettes\n */\n// primary is deprecated\n// grey is deprecated\nexport const PALETTE = ['success', 'warning', 'error', 'product', 'neutral', 'none', 'primary', 'grey', 'brand'] as const;\nexport type Palette = (typeof PALETTE)[number];\n\nexport const DECORATIVE_PALETTE = ['kiwi', 'lime', 'cucumber', 'mint', 'glacier', 'lagoon', 'blueberry', 'lavender', 'grape', 'watermelon', 'pumpkin', 'pineapple'] as const;\nexport type DecorativePalette = (typeof DECORATIVE_PALETTE)[number];\n","/**\n * In order to make this efficient when building the split, I copied this from lucca-front/core, TODO use it from here instead\n */\nimport { CreateEffectOptions, effect, EffectCleanupRegisterFn, EffectRef, Signal, untracked } from '@angular/core';\n\ntype SignalsValue<T> = T extends readonly unknown[] ? TupleOfSignalValues<T> : [RecordOfSignalValues<T>];\n\ntype TupleOfSignalValues<T> = T extends readonly [Signal<infer U>, ...infer R] ? [U, ...TupleOfSignalValues<R>] : [];\ntype RecordOfSignalValues<T> = { [K in keyof T]: T[K] extends Signal<infer U> ? U : never };\n\nexport type EffectWithDepsInput = ReadonlyArray<Signal<unknown>> | Record<string, Signal<unknown>>;\n\n/**\n * Effect peut être dangereux car l'action accomplie peut elle-même déclencher des écritures dans des signaux.\n * C'est une mauvaise pratique, interdite par défaut par Angular.\n * La plupart du temps, seule la lecture des signaux est intéressante à tracker, pas les actions qui en découlent.\n */\nexport function ɵeffectWithDeps<const T extends EffectWithDepsInput>(\n\tdependencies: T,\n\taction: (...values: [...SignalsValue<T>, EffectCleanupRegisterFn]) => unknown,\n\toptions?: CreateEffectOptions,\n): EffectRef {\n\treturn effect((onCleanup) => {\n\t\tconst deps = isReadonlyArray(dependencies) ? readTupleOfSignalValues(dependencies) : [readRecordOfSignalValues(dependencies)];\n\n\t\tuntracked(() => action(...(deps as SignalsValue<T>), onCleanup));\n\t}, options);\n}\n\nfunction readTupleOfSignalValues<T extends readonly Signal<unknown>[]>(signals: T): TupleOfSignalValues<T> {\n\treturn signals.map((signal) => signal()) as TupleOfSignalValues<T>;\n}\n\nfunction readRecordOfSignalValues<T extends Record<string, Signal<unknown>>>(signals: T): RecordOfSignalValues<T> {\n\treturn Object.fromEntries(Object.entries(signals).map(([key, signal]) => [key, signal()])) as RecordOfSignalValues<T>;\n}\n\nfunction isReadonlyArray(input: EffectWithDepsInput): input is ReadonlyArray<Signal<unknown>> {\n\treturn Array.isArray(input);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAWa,OAAO,CAAA;AACnB,IAAA,WAAW,GAAG,MAAM,CAA0B,UAAU,CAAC;AACzD,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IAE7B,MAAM,GAA4B,EAAE;AACpC,IAAA,SAAS,GAAG,IAAI,GAAG,EAAyB;AAErC,IAAA,QAAQ,CAAC,KAA4B,EAAA;AAC3C,QAAA,IAAI,CAAC,MAAM,GAAG,iBAAiB,CAAC,KAAK,CAAC;AAEtC,QAAA,KAAK,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;AAC3D,YAAA,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC;QAClC;QAEA,IAAI,CAAC,eAAe,EAAE;IACvB;IAEA,YAAY,CAAC,KAAa,EAAE,WAAoB,EAAA;QAC/C,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC;AACvC,QAAA,IAAI,KAAK,KAAK,SAAS,EAAE;AACxB,YAAA,IAAI,KAAK,CAAC,OAAO,KAAK,WAAW,EAAE;AAClC,gBAAA,KAAK,CAAC,OAAO,GAAG,IAAI;AACpB,gBAAA,KAAK,CAAC,OAAO,GAAG,WAAW;YAC5B;AACA,YAAA,KAAK,CAAC,OAAO,GAAG,IAAI;QACrB;aAAO;YACN,IAAI,CAAC,SAAS,CAAC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,IAAA,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,MAAM,EAAE,CAA2B;AACnE;AAEA,SAAS,wBAAwB,CAA4C,OAAU,EAAA;AACtF,IAAA,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC,CAA4B;AACtH;AAEA,SAAS,eAAe,CAAC,KAA0B,EAAA;AAClD,IAAA,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;AAC5B;;ACvCA;;AAEG;;;;"}
|
|
@@ -7,34 +7,34 @@ class IconComponent {
|
|
|
7
7
|
/**
|
|
8
8
|
* Defines icon to display
|
|
9
9
|
*/
|
|
10
|
-
this.icon = input.required(...(ngDevMode ? [{ debugName: "icon" }] : []));
|
|
10
|
+
this.icon = input.required(...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
11
11
|
/**
|
|
12
12
|
* Information conveyed by the screen reader
|
|
13
13
|
*/
|
|
14
|
-
this.alt = input(...(ngDevMode ? [undefined, { debugName: "alt" }] : []));
|
|
14
|
+
this.alt = input(...(ngDevMode ? [undefined, { debugName: "alt" }] : /* istanbul ignore next */ []));
|
|
15
15
|
/**
|
|
16
16
|
* Which size should the icon be? XXS to XXL
|
|
17
17
|
*/
|
|
18
|
-
this.size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
|
|
18
|
+
this.size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : /* istanbul ignore next */ []));
|
|
19
19
|
/**
|
|
20
20
|
* Changes the color of the icon (inherit by default)
|
|
21
21
|
*/
|
|
22
|
-
this.color = input('inherit', ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
22
|
+
this.color = input('inherit', ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
23
23
|
/**
|
|
24
24
|
* Display icon in AI mode
|
|
25
25
|
*/
|
|
26
|
-
this.AI = input(false, { ...(ngDevMode ? { debugName: "AI" } : {}), transform: booleanAttribute });
|
|
26
|
+
this.AI = input(false, { ...(ngDevMode ? { debugName: "AI" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
27
27
|
this.iconClasses = computed(() => {
|
|
28
28
|
const size = this.size();
|
|
29
29
|
return {
|
|
30
30
|
[`mod-${size}`]: !!size,
|
|
31
31
|
};
|
|
32
|
-
}, ...(ngDevMode ? [{ debugName: "iconClasses" }] : []));
|
|
32
|
+
}, ...(ngDevMode ? [{ debugName: "iconClasses" }] : /* istanbul ignore next */ []));
|
|
33
33
|
}
|
|
34
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
35
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
34
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: IconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
35
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: IconComponent, isStandalone: true, selector: "lu-icon, pr-icon", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: true, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, AI: { classPropertyName: "AI", publicName: "AI", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<span\n\taria-hidden=\"true\"\n\t[class.mod-AI]=\"AI()\"\n\tclass=\"lucca-icon icon-{{ icon() }} icon-color-{{ color() }}\"\n\t[ngClass]=\"iconClasses()\"\n></span>\n@if (alt()) {\n\t<span class=\"pr-u-mask\">{{ alt() }}</span>\n}\n", styles: ["@layer base{lu-icon{display:inline-flex}}@layer mods{.icon-color-primary,.icon-color-secondary,.icon-color-product{color:var(--palettes-product-700)}.icon-color-error{color:var(--palettes-error-700)}.icon-color-warning{color:var(--palettes-warning-700)}.icon-color-success{color:var(--palettes-success-700)}.icon-color-light{color:var(--palettes-neutral-600)}.icon-color-placeholder{color:var(--palettes-neutral-400)}}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
36
36
|
}
|
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: IconComponent, decorators: [{
|
|
38
38
|
type: Component,
|
|
39
39
|
args: [{ selector: 'lu-icon, pr-icon', imports: [NgClass], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<span\n\taria-hidden=\"true\"\n\t[class.mod-AI]=\"AI()\"\n\tclass=\"lucca-icon icon-{{ icon() }} icon-color-{{ color() }}\"\n\t[ngClass]=\"iconClasses()\"\n></span>\n@if (alt()) {\n\t<span class=\"pr-u-mask\">{{ alt() }}</span>\n}\n", styles: ["@layer base{lu-icon{display:inline-flex}}@layer mods{.icon-color-primary,.icon-color-secondary,.icon-color-product{color:var(--palettes-product-700)}.icon-color-error{color:var(--palettes-error-700)}.icon-color-warning{color:var(--palettes-warning-700)}.icon-color-success{color:var(--palettes-success-700)}.icon-color-light{color:var(--palettes-neutral-600)}.icon-color-placeholder{color:var(--palettes-neutral-400)}}\n"] }]
|
|
40
40
|
}], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: true }] }], alt: [{ type: i0.Input, args: [{ isSignal: true, alias: "alt", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], AI: [{ type: i0.Input, args: [{ isSignal: true, alias: "AI", required: false }] }] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucca-prisme-icon.mjs","sources":["../../../packages/prisme/icon/icon.component.ts","../../../packages/prisme/icon/icon.component.html","../../../packages/prisme/icon/icons.ts","../../../packages/prisme/icon/lucca-prisme-icon.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from '@angular/core';\nimport type { LuccaIcon } from './icons';\n\n@Component({\n\tselector: 'lu-icon, pr-icon',\n\timports: [NgClass],\n\ttemplateUrl: './icon.component.html',\n\tstyleUrl: './icon.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class IconComponent {\n\t/**\n\t * Defines icon to display\n\t */\n\treadonly icon = input.required<LuccaIcon>();\n\n\t/**\n\t * Information conveyed by the screen reader\n\t */\n\treadonly alt = input<string>();\n\n\t/**\n\t * Which size should the icon be? XXS to XXL\n\t */\n\treadonly size = input<'XXS' | 'XS' | 'S' | 'M' | 'L' | 'XL' | 'XXL'>();\n\n\t/**\n\t * Changes the color of the icon (inherit by default)\n\t */\n\treadonly color = input<'primary' | 'secondary' | 'product' | 'error' | 'warning' | 'success' | 'light' | 'placeholder' | 'inherit'>('inherit');\n\n\t/**\n\t * Display icon in AI mode\n\t */\n\treadonly AI = input(false, { transform: booleanAttribute });\n\n\treadonly iconClasses = computed(() => {\n\t\tconst size = this.size();\n\t\treturn {\n\t\t\t[`mod-${size}`]: !!size,\n\t\t};\n\t});\n}\n","<span\n\taria-hidden=\"true\"\n\t[class.mod-AI]=\"AI()\"\n\tclass=\"lucca-icon icon-{{ icon() }} icon-color-{{ color() }}\"\n\t[ngClass]=\"iconClasses()\"\n></span>\n@if (alt()) {\n\t<span class=\"pr-u-mask\">{{ alt() }}</span>\n}\n","// *******************************************\n// *** THIS FILE IS GENERATED, DO NOT EDIT ***\n// *** The generator is update-icons.js\t\t ***\n// *******************************************\n\nexport type LuccaIcon =\n\t| 'app'\n\t| 'apps'\n\t| 'nineTiles'\n\t| 'mosaic'\n\t| 'tiles'\n\t| 'appWidget'\n\t| 'arrowBackward'\n\t| 'backward'\n\t| 'arrowBottom'\n\t| 'arrowFullSouth'\n\t| 'arrowBottomLeft'\n\t| 'arrowBottomRight'\n\t| 'arrowCenterReduce'\n\t| 'arrowChevronBottom'\n\t| 'arrowSouth'\n\t| 'southArrow'\n\t| 'southThinArrow'\n\t| 'chevronSouth'\n\t| 'chevronBottom'\n\t| 'arrowChevronLeft'\n\t| 'arrowWest'\n\t| 'westArrow'\n\t| 'westThinArrow'\n\t| 'chevronWest'\n\t| 'chevronLeft'\n\t| 'arrowChevronRight'\n\t| 'arrowEast'\n\t| 'eastArrow'\n\t| 'eastThinArrow'\n\t| 'chevronEast'\n\t| 'chevronRight'\n\t| 'arrowChevronTop'\n\t| 'arrowNorth'\n\t| 'northArrow'\n\t| 'northThinArrow'\n\t| 'chevronNorth'\n\t| 'chevronTop'\n\t| 'arrowCorner'\n\t| 'distribute'\n\t| 'arrowCornerExpand'\n\t| 'arrowCurvedDownRight'\n\t| 'arrowDownload'\n\t| 'download'\n\t| 'arrowExternal'\n\t| 'outside'\n\t| 'arrowForward'\n\t| 'arrowDouble'\n\t| 'forward'\n\t| 'arrowLeft'\n\t| 'arrowFullWest'\n\t| 'arrowLineBottom'\n\t| 'arrowLineTop'\n\t| 'arrowLogin'\n\t| 'login'\n\t| 'arrowLogout'\n\t| 'logout'\n\t| 'arrowOppositeLeftRight'\n\t| 'arrowOppositeHorizontal'\n\t| 'swap'\n\t| 'arrowOppositeRightLeft'\n\t| 'arrowOppositeTopBottom'\n\t| 'arrowOppositeVertical'\n\t| 'creditDebit'\n\t| 'arrowReply'\n\t| 'reply'\n\t| 'arrowReset'\n\t| 'refresh'\n\t| 'update'\n\t| 'arrowRight'\n\t| 'arrowFullEast'\n\t| 'arrowSync'\n\t| 'sync'\n\t| 'arrowSyncStrikethrough'\n\t| 'syncDisabled'\n\t| 'arrowTop'\n\t| 'arrowFullNorth'\n\t| 'arrowTopLeft'\n\t| 'arrowTopRight'\n\t| 'arrowUnfoldLess'\n\t| 'collapse'\n\t| 'arrowUnfoldMore'\n\t| 'expand'\n\t| 'arrowUpload'\n\t| 'upload'\n\t| 'cloudUpload'\n\t| 'bell'\n\t| 'notification'\n\t| 'bellStrikethrough'\n\t| 'book'\n\t| 'bookmark'\n\t| 'bookmarkFilled'\n\t| 'boxArchive'\n\t| 'archive'\n\t| 'boxUnarchive'\n\t| 'unarchive'\n\t| 'branch'\n\t| 'bubbleAnswer'\n\t| 'answer'\n\t| 'bubbleConversation'\n\t| 'messenger'\n\t| 'bubbleSpeech'\n\t| 'chat'\n\t| 'talk'\n\t| 'dialog'\n\t| 'bubbleSpeechStrikethrough'\n\t| 'bubbleStars'\n\t| 'buildingCompany'\n\t| 'building'\n\t| 'establishment'\n\t| 'buildingHouse'\n\t| 'house'\n\t| 'home'\n\t| 'buildingHouseFilled'\n\t| 'houseFilled'\n\t| 'homeFill'\n\t| 'buildingHouseStarred'\n\t| 'houseStarred'\n\t| 'homeStarred'\n\t| 'buildingStore'\n\t| 'store'\n\t| 'bulb'\n\t| 'lightBulb'\n\t| 'calendarChecked'\n\t| 'calendarDate'\n\t| 'calendar'\n\t| 'planning'\n\t| 'calendarEdit'\n\t| 'planningEdit'\n\t| 'calendarPlanning'\n\t| 'payPeriod'\n\t| 'calendarSettings'\n\t| 'planningManage'\n\t| 'calendarStrikethrough'\n\t| 'calendarOff'\n\t| 'capCrown'\n\t| 'crown'\n\t| 'capGraduate'\n\t| 'graduate'\n\t| 'school'\n\t| 'certificationFailed'\n\t| 'certifKo'\n\t| 'certificationSuccess'\n\t| 'certifOk'\n\t| 'certificationWaiting'\n\t| 'certifWaiting'\n\t| 'chartDonut'\n\t| 'donut'\n\t| 'donutChart'\n\t| 'chartFlow'\n\t| 'familyTree'\n\t| 'orgTree'\n\t| 'chartHorizontalBar'\n\t| 'horizontalBarChart'\n\t| 'chartLevels'\n\t| 'level'\n\t| 'chartPie'\n\t| 'dashboard'\n\t| 'chartSpider'\n\t| 'chartVerticalBar'\n\t| 'analytics'\n\t| 'charts'\n\t| 'clipboard'\n\t| 'paste'\n\t| 'completion'\n\t| 'cornersFocus'\n\t| 'cornersFullscreenExit'\n\t| 'fullscreenExit'\n\t| 'cornersFullscreenOpen'\n\t| 'fullscreen'\n\t| 'dataTable'\n\t| 'table'\n\t| 'database'\n\t| 'databaseArrow'\n\t| 'apiSync'\n\t| 'deviceCamera'\n\t| 'camera'\n\t| 'deviceComputer'\n\t| 'computer'\n\t| 'deviceLaptop'\n\t| 'laptop'\n\t| 'deviceMobile'\n\t| 'deviceMouse'\n\t| 'computerMouse'\n\t| 'devicePrinter'\n\t| 'print'\n\t| 'deviceTablet'\n\t| 'deviceVideo'\n\t| 'dotsDrag'\n\t| 'drag'\n\t| 'emojiSmile'\n\t| 'eye'\n\t| 'watch'\n\t| 'eyeStrikethrough'\n\t| 'unwatch'\n\t| 'fileContract'\n\t| 'contract'\n\t| 'fileCopy'\n\t| 'copy'\n\t| 'fileDocument'\n\t| 'file'\n\t| 'files'\n\t| 'fileExport'\n\t| 'fileFolder'\n\t| 'folder'\n\t| 'fileImport'\n\t| 'importDirty'\n\t| 'importPristine'\n\t| 'filePlus'\n\t| 'fileSign'\n\t| 'sign'\n\t| 'filtersDescending'\n\t| 'filterAbstract'\n\t| 'filtersFunnel'\n\t| 'funnel'\n\t| 'filter'\n\t| 'filtersSort'\n\t| 'sort'\n\t| 'reorder'\n\t| 'flag'\n\t| 'floppyDiskSave'\n\t| 'save'\n\t| 'foodBirthdayCake'\n\t| 'birthday'\n\t| 'foodBobun'\n\t| 'lunchAlternative'\n\t| 'foodBurger'\n\t| 'lunch'\n\t| 'foodChefHat'\n\t| 'restaurant'\n\t| 'foodClocheDish'\n\t| 'diner'\n\t| 'foodCocktail'\n\t| 'drink'\n\t| 'foodCoffee'\n\t| 'coffee'\n\t| 'breaktime'\n\t| 'foodCroissant'\n\t| 'breakfast'\n\t| 'foodCutlery'\n\t| 'meal'\n\t| 'foodSandwich'\n\t| 'snack'\n\t| 'formatBulletedList'\n\t| 'list'\n\t| 'formatClipperAttachment'\n\t| 'attach'\n\t| 'formatCornerUpLeft'\n\t| 'formatUndo'\n\t| 'formatCornerUpRight'\n\t| 'formatRedo'\n\t| 'formatLink'\n\t| 'formatNumberedList'\n\t| 'formatListNb'\n\t| 'formatText'\n\t| 'formatJustify'\n\t| 'formatTextBold'\n\t| 'formatBold'\n\t| 'formatTextClear'\n\t| 'formatClear'\n\t| 'formatTextItalic'\n\t| 'formatItalic'\n\t| 'formatTextSize'\n\t| 'formatSize'\n\t| 'formatTextStrikethrough'\n\t| 'formatStrikethrough'\n\t| 'formatTextUnderline'\n\t| 'formatUnderlined'\n\t| 'formatUnlink'\n\t| 'unlink'\n\t| 'gift'\n\t| 'present'\n\t| 'heart'\n\t| 'heartFilled'\n\t| 'heartStrikethrough'\n\t| 'brokenHeart'\n\t| 'hotelBed'\n\t| 'bed'\n\t| 'hotel'\n\t| 'hotelHanger'\n\t| 'hanger'\n\t| 'hotelIron'\n\t| 'iron'\n\t| 'pressing'\n\t| 'hotelLuggage'\n\t| 'luggage'\n\t| 'jigsawPuzzle'\n\t| 'puzzle'\n\t| 'journey'\n\t| 'milestone'\n\t| 'jumpingCc'\n\t| 'lucca'\n\t| 'laboratoryTestFlask'\n\t| 'test'\n\t| 'layers'\n\t| 'floor'\n\t| 'listChecked'\n\t| 'listChecklist'\n\t| 'listTodo'\n\t| 'listMultipleChoices'\n\t| 'lockClose'\n\t| 'lock'\n\t| 'lockKey'\n\t| 'key'\n\t| 'lockOpen'\n\t| 'unlock'\n\t| 'mailEnvelope'\n\t| 'mail'\n\t| 'mailMailbox'\n\t| 'mailbox'\n\t| 'stamp'\n\t| 'postage'\n\t| 'mailPaperPlane'\n\t| 'send'\n\t| 'mapGlobe'\n\t| 'globe'\n\t| 'mapLocation'\n\t| 'location'\n\t| 'mapPin'\n\t| 'pin'\n\t| 'mapPlan'\n\t| 'mapTripStep'\n\t| 'mathsDivide'\n\t| 'divide'\n\t| 'mathsEquals'\n\t| 'mathsMinus'\n\t| 'minus'\n\t| 'partial'\n\t| 'minimize'\n\t| 'mathsMultiplicate'\n\t| 'close'\n\t| 'thinCross'\n\t| 'cross'\n\t| 'crossBold'\n\t| 'mathsNotEqual'\n\t| 'mathsPlus'\n\t| 'plus'\n\t| 'plusBold'\n\t| 'medicalDoctor'\n\t| 'menuBurger'\n\t| 'menu'\n\t| 'hamburgerMenu'\n\t| 'menuDots'\n\t| 'menuEllipsis'\n\t| 'ellipsis'\n\t| 'moneyBag'\n\t| 'moneybag'\n\t| 'moneyBagStrikethrough'\n\t| 'noMoney'\n\t| 'moneyBankImport'\n\t| 'moneyBanknoteStrikethrough'\n\t| 'moneyBill'\n\t| 'bill'\n\t| 'moneyBuildingBank'\n\t| 'bank'\n\t| 'moneyCardCheck'\n\t| 'moneyCardImport'\n\t| 'importCb'\n\t| 'moneyCheck'\n\t| 'moneyCoins'\n\t| 'money'\n\t| 'payment'\n\t| 'moneyCurrencyDollar'\n\t| 'dollar'\n\t| 'moneyCurrencyEuro'\n\t| 'euro'\n\t| 'moneyIban'\n\t| 'moneyPaymentCard'\n\t| 'bankingCard'\n\t| 'moneyPaymentCards'\n\t| 'moneyPiggyBank'\n\t| 'piggyBank'\n\t| 'moneyWallet'\n\t| 'wallet'\n\t| 'officeBriefcase'\n\t| 'officeChair'\n\t| 'chair'\n\t| 'officeCompass'\n\t| 'compass'\n\t| 'officeElectricalPlug'\n\t| 'officeFirstAid'\n\t| 'officeMicrophone'\n\t| 'officePen'\n\t| 'edit'\n\t| 'editMini'\n\t| 'officePenStar'\n\t| 'officePenWriting'\n\t| 'editWrite'\n\t| 'editFrame'\n\t| 'officePhone'\n\t| 'telephone'\n\t| 'officeScissors'\n\t| 'cut'\n\t| 'officeSupplies'\n\t| 'supplies'\n\t| 'peopleAccessibility'\n\t| 'peopleAdd'\n\t| 'userAdd'\n\t| 'adduser'\n\t| 'peopleArrowUp'\n\t| 'peopleEdit'\n\t| 'peopleFolder'\n\t| 'peopleGroup'\n\t| 'userGroup'\n\t| 'group'\n\t| 'peopleHouse'\n\t| 'peopleId'\n\t| 'identityCard'\n\t| 'userFile'\n\t| 'dossierRh'\n\t| 'peopleLocked'\n\t| 'userRoles'\n\t| 'peoplePerson'\n\t| 'user'\n\t| 'face'\n\t| 'peopleRemove'\n\t| 'userRemove'\n\t| 'peopleSwitch'\n\t| 'send2user'\n\t| 'userSendTo'\n\t| 'peopleTeacher'\n\t| 'teacher'\n\t| 'pictureGallery'\n\t| 'gallery'\n\t| 'pictureImage'\n\t| 'image'\n\t| 'picturePalette'\n\t| 'palette'\n\t| 'playerPauseCircle'\n\t| 'pause'\n\t| 'playerPlay'\n\t| 'playFull'\n\t| 'playerPlayCircle'\n\t| 'play'\n\t| 'playerRecording'\n\t| 'playerStopCircle'\n\t| 'stop'\n\t| 'priceTag'\n\t| 'pricetag'\n\t| 'priorityHigh'\n\t| 'high'\n\t| 'priorityHigher'\n\t| 'higher'\n\t| 'priorityHighest'\n\t| 'highest'\n\t| 'priorityLow'\n\t| 'low'\n\t| 'priorityLower'\n\t| 'lower'\n\t| 'priorityLowest'\n\t| 'lowest'\n\t| 'priorityMedium'\n\t| 'medium'\n\t| 'rotationLeft'\n\t| 'rotate'\n\t| 'rotationRight'\n\t| 'rotateRight'\n\t| 'searchMagnifyingGlass'\n\t| 'search'\n\t| 'searchZoomIn'\n\t| 'searchZoomOut'\n\t| 'settingsEqualizer'\n\t| 'sliders'\n\t| 'settingsGear'\n\t| 'settings'\n\t| 'settingsTools'\n\t| 'tools'\n\t| 'share'\n\t| 'signAt'\n\t| 'signBan'\n\t| 'forbidden'\n\t| 'signCancel'\n\t| 'cancel'\n\t| 'signCheckbox'\n\t| 'signClose'\n\t| 'signConfirm'\n\t| 'confirm'\n\t| 'tick'\n\t| 'tickThin'\n\t| 'tickBold'\n\t| 'signConstruction'\n\t| 'build'\n\t| 'signDecimal'\n\t| 'signDiscount'\n\t| 'discount'\n\t| 'signError'\n\t| 'error'\n\t| 'signHelp'\n\t| 'help'\n\t| 'helpOutline'\n\t| 'signInfo'\n\t| 'info'\n\t| 'signParking'\n\t| 'parking'\n\t| 'signRating'\n\t| 'signShieldError'\n\t| 'signShieldSuccess'\n\t| 'signShieldWarning'\n\t| 'signSimpleChoice'\n\t| 'signSuccess'\n\t| 'success'\n\t| 'signTag'\n\t| 'signTranslation'\n\t| 'signWarning'\n\t| 'warning'\n\t| 'signWebhook'\n\t| 'soundMegaphone'\n\t| 'star'\n\t| 'unstared'\n\t| 'starFilled'\n\t| 'target'\n\t| 'thumbDown'\n\t| 'thumbDownFilled'\n\t| 'thumbUp'\n\t| 'thumbUpFilled'\n\t| 'thumbnail'\n\t| 'timeAlarm'\n\t| 'alarm'\n\t| 'timeClock'\n\t| 'clock'\n\t| 'timeFuture'\n\t| 'postpone'\n\t| 'timeHourglass'\n\t| 'timer'\n\t| 'timePast'\n\t| 'history'\n\t| 'timeTimer'\n\t| 'chronoOn'\n\t| 'timeTimerStrikethrough'\n\t| 'overplanned'\n\t| 'timeTimesheet'\n\t| 'timesheet'\n\t| 'transportBus'\n\t| 'bus'\n\t| 'transportCar'\n\t| 'car'\n\t| 'transportCarElectric'\n\t| 'transportCarwashStation'\n\t| 'cleanCar'\n\t| 'transportGazStation'\n\t| 'gasoline'\n\t| 'transportMotocycle'\n\t| 'transportMotocycleElectric'\n\t| 'transportPlane'\n\t| 'plane'\n\t| 'transportRocket'\n\t| 'rocket'\n\t| 'transportScooter'\n\t| 'transportScooterElectric'\n\t| 'transportSpeedometer'\n\t| 'speedometer'\n\t| 'mileage'\n\t| 'transportSubway'\n\t| 'subway'\n\t| 'transportTaxi'\n\t| 'taxi'\n\t| 'transportToll'\n\t| 'toll'\n\t| 'tollDollar'\n\t| 'tollEuro'\n\t| 'transportTrain'\n\t| 'train'\n\t| 'transportTruck'\n\t| 'truck'\n\t| 'trashDelete'\n\t| 'trash'\n\t| 'trendingGrowth'\n\t| 'evolution'\n\t| 'trendingLoss'\n\t| 'evolutionDown'\n\t| 'weatherCloudy'\n\t| 'weatherLightning'\n\t| 'weatherStars'\n\t| 'weatherStormy'\n\t| 'weatherStorm'\n\t| 'weatherSunny'\n\t| 'weatherSun'\n\t| 'weight';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAYa,aAAa,CAAA;AAR1B,IAAA,WAAA,GAAA;AASC;;AAEG;AACM,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,+CAAa;AAE3C;;AAEG;QACM,IAAA,CAAA,GAAG,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,KAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AAE9B;;AAEG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAiD;AAEtE;;AAEG;AACM,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAA8G,SAAS,iDAAC;AAE9I;;AAEG;QACM,IAAA,CAAA,EAAE,GAAG,KAAK,CAAC,KAAK,+CAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAElD,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAK;AACpC,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE;YACxB,OAAO;AACN,gBAAA,CAAC,OAAO,IAAI,CAAA,CAAE,GAAG,CAAC,CAAC,IAAI;a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CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAML,aAAa,EAAA,UAAA,EAAA,CAAA;kBARzB,SAAS;+BACC,kBAAkB,EAAA,OAAA,EACnB,CAAC,OAAO,CAAC,EAAA,eAAA,EAGD,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,0OAAA,EAAA,MAAA,EAAA,CAAA,saAAA,CAAA,EAAA;;;AEVtC;AACA;AACA;AACA;;ACHA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"lucca-prisme-icon.mjs","sources":["../../../packages/prisme/icon/icon.component.ts","../../../packages/prisme/icon/icon.component.html","../../../packages/prisme/icon/icons.ts","../../../packages/prisme/icon/lucca-prisme-icon.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from '@angular/core';\nimport type { LuccaIcon } from './icons';\n\n@Component({\n\tselector: 'lu-icon, pr-icon',\n\timports: [NgClass],\n\ttemplateUrl: './icon.component.html',\n\tstyleUrl: './icon.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class IconComponent {\n\t/**\n\t * Defines icon to display\n\t */\n\treadonly icon = input.required<LuccaIcon>();\n\n\t/**\n\t * Information conveyed by the screen reader\n\t */\n\treadonly alt = input<string>();\n\n\t/**\n\t * Which size should the icon be? XXS to XXL\n\t */\n\treadonly size = input<'XXS' | 'XS' | 'S' | 'M' | 'L' | 'XL' | 'XXL'>();\n\n\t/**\n\t * Changes the color of the icon (inherit by default)\n\t */\n\treadonly color = input<'primary' | 'secondary' | 'product' | 'error' | 'warning' | 'success' | 'light' | 'placeholder' | 'inherit'>('inherit');\n\n\t/**\n\t * Display icon in AI mode\n\t */\n\treadonly AI = input(false, { transform: booleanAttribute });\n\n\treadonly iconClasses = computed(() => {\n\t\tconst size = this.size();\n\t\treturn {\n\t\t\t[`mod-${size}`]: !!size,\n\t\t};\n\t});\n}\n","<span\n\taria-hidden=\"true\"\n\t[class.mod-AI]=\"AI()\"\n\tclass=\"lucca-icon icon-{{ icon() }} icon-color-{{ color() }}\"\n\t[ngClass]=\"iconClasses()\"\n></span>\n@if (alt()) {\n\t<span class=\"pr-u-mask\">{{ alt() }}</span>\n}\n","// *******************************************\n// *** THIS FILE IS GENERATED, DO NOT EDIT ***\n// *** The generator is update-icons.js\t\t ***\n// *******************************************\n\nexport type LuccaIcon =\n\t| 'app'\n\t| 'apps'\n\t| 'nineTiles'\n\t| 'mosaic'\n\t| 'tiles'\n\t| 'appWidget'\n\t| 'arrowBackward'\n\t| 'backward'\n\t| 'arrowBottom'\n\t| 'arrowFullSouth'\n\t| 'arrowBottomLeft'\n\t| 'arrowBottomRight'\n\t| 'arrowCenterReduce'\n\t| 'arrowChevronBottom'\n\t| 'arrowSouth'\n\t| 'southArrow'\n\t| 'southThinArrow'\n\t| 'chevronSouth'\n\t| 'chevronBottom'\n\t| 'arrowChevronLeft'\n\t| 'arrowWest'\n\t| 'westArrow'\n\t| 'westThinArrow'\n\t| 'chevronWest'\n\t| 'chevronLeft'\n\t| 'arrowChevronRight'\n\t| 'arrowEast'\n\t| 'eastArrow'\n\t| 'eastThinArrow'\n\t| 'chevronEast'\n\t| 'chevronRight'\n\t| 'arrowChevronTop'\n\t| 'arrowNorth'\n\t| 'northArrow'\n\t| 'northThinArrow'\n\t| 'chevronNorth'\n\t| 'chevronTop'\n\t| 'arrowCorner'\n\t| 'distribute'\n\t| 'arrowCornerExpand'\n\t| 'arrowCurvedDownRight'\n\t| 'arrowDownload'\n\t| 'download'\n\t| 'arrowExternal'\n\t| 'outside'\n\t| 'arrowForward'\n\t| 'arrowDouble'\n\t| 'forward'\n\t| 'arrowLeft'\n\t| 'arrowFullWest'\n\t| 'arrowLineBottom'\n\t| 'arrowLineTop'\n\t| 'arrowLogin'\n\t| 'login'\n\t| 'arrowLogout'\n\t| 'logout'\n\t| 'arrowOppositeLeftRight'\n\t| 'arrowOppositeHorizontal'\n\t| 'swap'\n\t| 'arrowOppositeRightLeft'\n\t| 'arrowOppositeTopBottom'\n\t| 'arrowOppositeVertical'\n\t| 'creditDebit'\n\t| 'arrowReply'\n\t| 'reply'\n\t| 'arrowReset'\n\t| 'refresh'\n\t| 'update'\n\t| 'arrowRight'\n\t| 'arrowFullEast'\n\t| 'arrowSync'\n\t| 'sync'\n\t| 'arrowSyncStrikethrough'\n\t| 'syncDisabled'\n\t| 'arrowTop'\n\t| 'arrowFullNorth'\n\t| 'arrowTopLeft'\n\t| 'arrowTopRight'\n\t| 'arrowUnfoldLess'\n\t| 'collapse'\n\t| 'arrowUnfoldMore'\n\t| 'expand'\n\t| 'arrowUpload'\n\t| 'upload'\n\t| 'cloudUpload'\n\t| 'bell'\n\t| 'notification'\n\t| 'bellStrikethrough'\n\t| 'book'\n\t| 'bookmark'\n\t| 'bookmarkFilled'\n\t| 'boxArchive'\n\t| 'archive'\n\t| 'boxUnarchive'\n\t| 'unarchive'\n\t| 'branch'\n\t| 'bubbleAnswer'\n\t| 'answer'\n\t| 'bubbleConversation'\n\t| 'messenger'\n\t| 'bubbleSpeech'\n\t| 'chat'\n\t| 'talk'\n\t| 'dialog'\n\t| 'bubbleSpeechStrikethrough'\n\t| 'bubbleStars'\n\t| 'buildingCompany'\n\t| 'building'\n\t| 'establishment'\n\t| 'buildingHouse'\n\t| 'house'\n\t| 'home'\n\t| 'buildingHouseFilled'\n\t| 'houseFilled'\n\t| 'homeFill'\n\t| 'buildingHouseStarred'\n\t| 'houseStarred'\n\t| 'homeStarred'\n\t| 'buildingStore'\n\t| 'store'\n\t| 'bulb'\n\t| 'lightBulb'\n\t| 'calendarChecked'\n\t| 'calendarDate'\n\t| 'calendar'\n\t| 'planning'\n\t| 'calendarEdit'\n\t| 'planningEdit'\n\t| 'calendarPlanning'\n\t| 'payPeriod'\n\t| 'calendarSettings'\n\t| 'planningManage'\n\t| 'calendarStrikethrough'\n\t| 'calendarOff'\n\t| 'capCrown'\n\t| 'crown'\n\t| 'capGraduate'\n\t| 'graduate'\n\t| 'school'\n\t| 'certificationFailed'\n\t| 'certifKo'\n\t| 'certificationSuccess'\n\t| 'certifOk'\n\t| 'certificationWaiting'\n\t| 'certifWaiting'\n\t| 'chartDonut'\n\t| 'donut'\n\t| 'donutChart'\n\t| 'chartFlow'\n\t| 'familyTree'\n\t| 'orgTree'\n\t| 'chartHorizontalBar'\n\t| 'horizontalBarChart'\n\t| 'chartLevels'\n\t| 'level'\n\t| 'chartPie'\n\t| 'dashboard'\n\t| 'chartSpider'\n\t| 'chartVerticalBar'\n\t| 'analytics'\n\t| 'charts'\n\t| 'clipboard'\n\t| 'paste'\n\t| 'completion'\n\t| 'cornersFocus'\n\t| 'cornersFullscreenExit'\n\t| 'fullscreenExit'\n\t| 'cornersFullscreenOpen'\n\t| 'fullscreen'\n\t| 'dataTable'\n\t| 'table'\n\t| 'database'\n\t| 'databaseArrow'\n\t| 'apiSync'\n\t| 'deviceCamera'\n\t| 'camera'\n\t| 'deviceComputer'\n\t| 'computer'\n\t| 'deviceLaptop'\n\t| 'laptop'\n\t| 'deviceMobile'\n\t| 'deviceMouse'\n\t| 'computerMouse'\n\t| 'devicePrinter'\n\t| 'print'\n\t| 'deviceTablet'\n\t| 'deviceVideo'\n\t| 'dotsDrag'\n\t| 'drag'\n\t| 'emojiSmile'\n\t| 'eye'\n\t| 'watch'\n\t| 'eyeStrikethrough'\n\t| 'unwatch'\n\t| 'fileContract'\n\t| 'contract'\n\t| 'fileCopy'\n\t| 'copy'\n\t| 'fileDocument'\n\t| 'file'\n\t| 'files'\n\t| 'fileExport'\n\t| 'fileFolder'\n\t| 'folder'\n\t| 'fileImport'\n\t| 'importDirty'\n\t| 'importPristine'\n\t| 'filePlus'\n\t| 'fileSign'\n\t| 'sign'\n\t| 'filtersDescending'\n\t| 'filterAbstract'\n\t| 'filtersFunnel'\n\t| 'funnel'\n\t| 'filter'\n\t| 'filtersSort'\n\t| 'sort'\n\t| 'reorder'\n\t| 'flag'\n\t| 'floppyDiskSave'\n\t| 'save'\n\t| 'foodBirthdayCake'\n\t| 'birthday'\n\t| 'foodBobun'\n\t| 'lunchAlternative'\n\t| 'foodBurger'\n\t| 'lunch'\n\t| 'foodChefHat'\n\t| 'restaurant'\n\t| 'foodClocheDish'\n\t| 'diner'\n\t| 'foodCocktail'\n\t| 'drink'\n\t| 'foodCoffee'\n\t| 'coffee'\n\t| 'breaktime'\n\t| 'foodCroissant'\n\t| 'breakfast'\n\t| 'foodCutlery'\n\t| 'meal'\n\t| 'foodSandwich'\n\t| 'snack'\n\t| 'formatBulletedList'\n\t| 'list'\n\t| 'formatClipperAttachment'\n\t| 'attach'\n\t| 'formatCornerUpLeft'\n\t| 'formatUndo'\n\t| 'formatCornerUpRight'\n\t| 'formatRedo'\n\t| 'formatLink'\n\t| 'formatNumberedList'\n\t| 'formatListNb'\n\t| 'formatText'\n\t| 'formatJustify'\n\t| 'formatTextBold'\n\t| 'formatBold'\n\t| 'formatTextClear'\n\t| 'formatClear'\n\t| 'formatTextItalic'\n\t| 'formatItalic'\n\t| 'formatTextSize'\n\t| 'formatSize'\n\t| 'formatTextStrikethrough'\n\t| 'formatStrikethrough'\n\t| 'formatTextUnderline'\n\t| 'formatUnderlined'\n\t| 'formatUnlink'\n\t| 'unlink'\n\t| 'gift'\n\t| 'present'\n\t| 'heart'\n\t| 'heartFilled'\n\t| 'heartStrikethrough'\n\t| 'brokenHeart'\n\t| 'hotelBed'\n\t| 'bed'\n\t| 'hotel'\n\t| 'hotelHanger'\n\t| 'hanger'\n\t| 'hotelIron'\n\t| 'iron'\n\t| 'pressing'\n\t| 'hotelLuggage'\n\t| 'luggage'\n\t| 'jigsawPuzzle'\n\t| 'puzzle'\n\t| 'journey'\n\t| 'milestone'\n\t| 'jumpingCc'\n\t| 'lucca'\n\t| 'laboratoryTestFlask'\n\t| 'test'\n\t| 'layers'\n\t| 'floor'\n\t| 'listChecked'\n\t| 'listChecklist'\n\t| 'listTodo'\n\t| 'listMultipleChoices'\n\t| 'lockClose'\n\t| 'lock'\n\t| 'lockKey'\n\t| 'key'\n\t| 'lockOpen'\n\t| 'unlock'\n\t| 'mailEnvelope'\n\t| 'mail'\n\t| 'mailMailbox'\n\t| 'mailbox'\n\t| 'stamp'\n\t| 'postage'\n\t| 'mailPaperPlane'\n\t| 'send'\n\t| 'mapGlobe'\n\t| 'globe'\n\t| 'mapLocation'\n\t| 'location'\n\t| 'mapPin'\n\t| 'pin'\n\t| 'mapPlan'\n\t| 'mapTripStep'\n\t| 'mathsDivide'\n\t| 'divide'\n\t| 'mathsEquals'\n\t| 'mathsMinus'\n\t| 'minus'\n\t| 'partial'\n\t| 'minimize'\n\t| 'mathsMultiplicate'\n\t| 'close'\n\t| 'thinCross'\n\t| 'cross'\n\t| 'crossBold'\n\t| 'mathsNotEqual'\n\t| 'mathsPlus'\n\t| 'plus'\n\t| 'plusBold'\n\t| 'medicalDoctor'\n\t| 'menuBurger'\n\t| 'menu'\n\t| 'hamburgerMenu'\n\t| 'menuDots'\n\t| 'menuEllipsis'\n\t| 'ellipsis'\n\t| 'moneyBag'\n\t| 'moneybag'\n\t| 'moneyBagStrikethrough'\n\t| 'noMoney'\n\t| 'moneyBankImport'\n\t| 'moneyBanknoteStrikethrough'\n\t| 'moneyBill'\n\t| 'bill'\n\t| 'moneyBuildingBank'\n\t| 'bank'\n\t| 'moneyCardCheck'\n\t| 'moneyCardImport'\n\t| 'importCb'\n\t| 'moneyCheck'\n\t| 'moneyCoins'\n\t| 'money'\n\t| 'payment'\n\t| 'moneyCurrencyDollar'\n\t| 'dollar'\n\t| 'moneyCurrencyEuro'\n\t| 'euro'\n\t| 'moneyIban'\n\t| 'moneyPaymentCard'\n\t| 'bankingCard'\n\t| 'moneyPaymentCards'\n\t| 'moneyPiggyBank'\n\t| 'piggyBank'\n\t| 'moneyWallet'\n\t| 'wallet'\n\t| 'officeBriefcase'\n\t| 'officeChair'\n\t| 'chair'\n\t| 'officeCompass'\n\t| 'compass'\n\t| 'officeElectricalPlug'\n\t| 'officeFirstAid'\n\t| 'officeMicrophone'\n\t| 'officePen'\n\t| 'edit'\n\t| 'editMini'\n\t| 'officePenStar'\n\t| 'officePenWriting'\n\t| 'editWrite'\n\t| 'editFrame'\n\t| 'officePhone'\n\t| 'telephone'\n\t| 'officeScissors'\n\t| 'cut'\n\t| 'officeSupplies'\n\t| 'supplies'\n\t| 'peopleAccessibility'\n\t| 'peopleAdd'\n\t| 'userAdd'\n\t| 'adduser'\n\t| 'peopleArrowUp'\n\t| 'peopleEdit'\n\t| 'peopleFolder'\n\t| 'peopleGroup'\n\t| 'userGroup'\n\t| 'group'\n\t| 'peopleHouse'\n\t| 'peopleId'\n\t| 'identityCard'\n\t| 'userFile'\n\t| 'dossierRh'\n\t| 'peopleLocked'\n\t| 'userRoles'\n\t| 'peoplePerson'\n\t| 'user'\n\t| 'face'\n\t| 'peopleRemove'\n\t| 'userRemove'\n\t| 'peopleSwitch'\n\t| 'send2user'\n\t| 'userSendTo'\n\t| 'peopleTeacher'\n\t| 'teacher'\n\t| 'pictureGallery'\n\t| 'gallery'\n\t| 'pictureImage'\n\t| 'image'\n\t| 'picturePalette'\n\t| 'palette'\n\t| 'playerPauseCircle'\n\t| 'pause'\n\t| 'playerPlay'\n\t| 'playFull'\n\t| 'playerPlayCircle'\n\t| 'play'\n\t| 'playerRecording'\n\t| 'playerStopCircle'\n\t| 'stop'\n\t| 'priceTag'\n\t| 'pricetag'\n\t| 'priorityHigh'\n\t| 'high'\n\t| 'priorityHigher'\n\t| 'higher'\n\t| 'priorityHighest'\n\t| 'highest'\n\t| 'priorityLow'\n\t| 'low'\n\t| 'priorityLower'\n\t| 'lower'\n\t| 'priorityLowest'\n\t| 'lowest'\n\t| 'priorityMedium'\n\t| 'medium'\n\t| 'rotationLeft'\n\t| 'rotate'\n\t| 'rotationRight'\n\t| 'rotateRight'\n\t| 'searchMagnifyingGlass'\n\t| 'search'\n\t| 'searchZoomIn'\n\t| 'searchZoomOut'\n\t| 'settingsEqualizer'\n\t| 'sliders'\n\t| 'settingsGear'\n\t| 'settings'\n\t| 'settingsTools'\n\t| 'tools'\n\t| 'share'\n\t| 'signAt'\n\t| 'signBan'\n\t| 'forbidden'\n\t| 'signCancel'\n\t| 'cancel'\n\t| 'signCheckbox'\n\t| 'signClose'\n\t| 'signConfirm'\n\t| 'confirm'\n\t| 'tick'\n\t| 'tickThin'\n\t| 'tickBold'\n\t| 'signConstruction'\n\t| 'build'\n\t| 'signDecimal'\n\t| 'signDiscount'\n\t| 'discount'\n\t| 'signError'\n\t| 'error'\n\t| 'signHelp'\n\t| 'help'\n\t| 'helpOutline'\n\t| 'signInfo'\n\t| 'info'\n\t| 'signParking'\n\t| 'parking'\n\t| 'signRating'\n\t| 'signShieldError'\n\t| 'signShieldSuccess'\n\t| 'signShieldWarning'\n\t| 'signSimpleChoice'\n\t| 'signSuccess'\n\t| 'success'\n\t| 'signTag'\n\t| 'signTranslation'\n\t| 'signWarning'\n\t| 'warning'\n\t| 'signWebhook'\n\t| 'soundMegaphone'\n\t| 'star'\n\t| 'unstared'\n\t| 'starFilled'\n\t| 'target'\n\t| 'thumbDown'\n\t| 'thumbDownFilled'\n\t| 'thumbUp'\n\t| 'thumbUpFilled'\n\t| 'thumbnail'\n\t| 'timeAlarm'\n\t| 'alarm'\n\t| 'timeClock'\n\t| 'clock'\n\t| 'timeFuture'\n\t| 'postpone'\n\t| 'timeHourglass'\n\t| 'timer'\n\t| 'timePast'\n\t| 'history'\n\t| 'timeTimer'\n\t| 'chronoOn'\n\t| 'timeTimerStrikethrough'\n\t| 'overplanned'\n\t| 'timeTimesheet'\n\t| 'timesheet'\n\t| 'transportBus'\n\t| 'bus'\n\t| 'transportCar'\n\t| 'car'\n\t| 'transportCarElectric'\n\t| 'transportCarwashStation'\n\t| 'cleanCar'\n\t| 'transportGazStation'\n\t| 'gasoline'\n\t| 'transportMotocycle'\n\t| 'transportMotocycleElectric'\n\t| 'transportPlane'\n\t| 'plane'\n\t| 'transportRocket'\n\t| 'rocket'\n\t| 'transportScooter'\n\t| 'transportScooterElectric'\n\t| 'transportSpeedometer'\n\t| 'speedometer'\n\t| 'mileage'\n\t| 'transportSubway'\n\t| 'subway'\n\t| 'transportTaxi'\n\t| 'taxi'\n\t| 'transportToll'\n\t| 'toll'\n\t| 'tollDollar'\n\t| 'tollEuro'\n\t| 'transportTrain'\n\t| 'train'\n\t| 'transportTruck'\n\t| 'truck'\n\t| 'trashDelete'\n\t| 'trash'\n\t| 'trendingGrowth'\n\t| 'evolution'\n\t| 'trendingLoss'\n\t| 'evolutionDown'\n\t| 'weatherCloudy'\n\t| 'weatherLightning'\n\t| 'weatherStars'\n\t| 'weatherStormy'\n\t| 'weatherStorm'\n\t| 'weatherSunny'\n\t| 'weatherSun'\n\t| 'weight';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAYa,aAAa,CAAA;AAR1B,IAAA,WAAA,GAAA;AASC;;AAEG;AACM,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,0EAAa;AAE3C;;AAEG;QACM,IAAA,CAAA,GAAG,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,KAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;AAE9B;;AAEG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAiD;AAEtE;;AAEG;AACM,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAA8G,SAAS,4EAAC;AAE9I;;AAEG;QACM,IAAA,CAAA,EAAE,GAAG,KAAK,CAAC,KAAK,0EAAI,S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ASA,EAAA,MAAA,EAAA,CAAA,saAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDHW,OAAO,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAML,aAAa,EAAA,UAAA,EAAA,CAAA;kBARzB,SAAS;+BACC,kBAAkB,EAAA,OAAA,EACnB,CAAC,OAAO,CAAC,EAAA,eAAA,EAGD,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,0OAAA,EAAA,MAAA,EAAA,CAAA,saAAA,CAAA,EAAA;;;AEVtC;AACA;AACA;AACA;;ACHA;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lucca/prisme",
|
|
3
|
-
"version": "21.2.
|
|
3
|
+
"version": "21.2.4-rc.1",
|
|
4
4
|
"description": "Design system made by @lucca",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/LuccaSA/lucca-front.git"
|
|
7
|
+
"url": "git+https://github.com/LuccaSA/lucca-front.git",
|
|
8
|
+
"directory": "packages/prisme"
|
|
8
9
|
},
|
|
9
10
|
"license": "MIT",
|
|
10
11
|
"public": true,
|
|
@@ -20,8 +21,8 @@
|
|
|
20
21
|
"@angular/cdk": "^21.0.0",
|
|
21
22
|
"@angular/animations": "^21.0.0",
|
|
22
23
|
"@types/dompurify": "^3.0.0",
|
|
23
|
-
"@lucca-front/icons": "21.2.
|
|
24
|
-
"@lucca-front/scss": "21.2.
|
|
24
|
+
"@lucca-front/icons": "21.2.4-rc.1",
|
|
25
|
+
"@lucca-front/scss": "21.2.4-rc.1",
|
|
25
26
|
"isomorphic-dompurify": "^2.11.0",
|
|
26
27
|
"date-fns": "^3.6.0",
|
|
27
28
|
"rxjs": "^7.8.0"
|
|
@@ -53,6 +54,7 @@
|
|
|
53
54
|
}
|
|
54
55
|
},
|
|
55
56
|
"sideEffects": false,
|
|
57
|
+
"type": "module",
|
|
56
58
|
"dependencies": {
|
|
57
59
|
"tslib": "^2.3.0"
|
|
58
60
|
}
|