@lucca/prisme 22.0.0 → 22.0.1-rc.2
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 +3 -3
- 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 +3 -3
- package/fesm2022/lucca-prisme-icon.mjs.map +1 -1
- package/fesm2022/lucca-prisme-numeric-badge.mjs +3 -3
- package/fesm2022/lucca-prisme-numeric-badge.mjs.map +1 -1
- package/fesm2022/lucca-prisme-skeleton.mjs +32 -32
- package/fesm2022/lucca-prisme-skeleton.mjs.map +1 -1
- package/fesm2022/lucca-prisme-tag.mjs +4 -4
- package/fesm2022/lucca-prisme-tag.mjs.map +1 -1
- package/fesm2022/lucca-prisme-tooltip.mjs +34 -31
- package/fesm2022/lucca-prisme-tooltip.mjs.map +1 -1
- package/package.json +3 -3
- package/types/lucca-prisme-icon.d.ts +1 -1
- package/types/lucca-prisme-tooltip.d.ts +2 -1
|
@@ -126,10 +126,10 @@ class ButtonComponent {
|
|
|
126
126
|
this.notifyError.set(true);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
130
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.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 }, disabled: { classPropertyName: "disabled", publicName: "disabled", 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()", "attr.disabled": "isDisabled() ? '' : null" }, 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:var(--pr-t-color-border-ai);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:var(--pr-t-color-icon-ai);-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(var(--palettes-ai-angle),color-mix(in srgb,var(--palettes-orchid-300) var(--components-button-AI-background-opacity),transparent),color-mix(in srgb,var(--palettes-brand-200) 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:var(--pr-t-color-icon-ai);-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)}.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)}.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-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,.button.loading:disabled,.button.is-loading,.button.is-loading:disabled{--components-button-color: transparent}.button.loading .lucca-icon,.button.loading:disabled .lucca-icon,.button.is-loading .lucca-icon,.button.is-loading:disabled .lucca-icon{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(--components-button-font-size));block-size:var(--components-button-line-height);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 }); }
|
|
129
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
130
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.4", 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 }, disabled: { classPropertyName: "disabled", publicName: "disabled", 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()", "attr.disabled": "isDisabled() ? '' : null" }, 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:var(--pr-t-color-border-ai);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:var(--pr-t-color-icon-ai);-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(var(--palettes-ai-angle),color-mix(in srgb,var(--palettes-orchid-300) var(--components-button-AI-background-opacity),transparent),color-mix(in srgb,var(--palettes-brand-200) 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:var(--pr-t-color-icon-ai);-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)}.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)}.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-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,.button.loading:disabled,.button.is-loading,.button.is-loading:disabled{--components-button-color: transparent}.button.loading .lucca-icon,.button.loading:disabled .lucca-icon,.button.is-loading .lucca-icon,.button.is-loading:disabled .lucca-icon{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(--components-button-font-size));block-size:var(--components-button-line-height);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 }); }
|
|
131
131
|
}
|
|
132
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
132
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
133
133
|
type: Component,
|
|
134
134
|
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: {
|
|
135
135
|
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'[attr.disabled]': \"isDisabled() ? '' : null\",\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<boolean, boolean | `${boolean}` | ''>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Disables the Button. Also applied automatically when `state` is `loading`\n\t */\n\treadonly disabled = input<boolean, boolean | `${boolean}` | ''>(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<boolean, boolean | `${boolean}` | ''>(false, { transform: booleanAttribute });\n\n\t/**\n\t * @deprecated use `critical` input instead\n\t */\n\treadonly delete = input<boolean, boolean | `${boolean}` | ''>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Indicates the presence of a menu\n\t */\n\treadonly disclosure = input<boolean, boolean | `${boolean}` | ''>(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 isDisabled = computed(() => this.disabled() || this.state() === 'loading');\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;;MCWhG,eAAe,CAAA;AAC3B,IAAA,QAAQ;AACR,IAAA,WAAW;AAsFX,IAAA,IAAY,QAAQ,GAAA;AACnB,QAA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AA,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;;AC/ErH;;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'[attr.disabled]': \"isDisabled() ? '' : null\",\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<boolean, boolean | `${boolean}` | ''>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Disables the Button. Also applied automatically when `state` is `loading`\n\t */\n\treadonly disabled = input<boolean, boolean | `${boolean}` | ''>(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<boolean, boolean | `${boolean}` | ''>(false, { transform: booleanAttribute });\n\n\t/**\n\t * @deprecated use `critical` input instead\n\t */\n\treadonly delete = input<boolean, boolean | `${boolean}` | ''>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Indicates the presence of a menu\n\t */\n\treadonly disclosure = input<boolean, boolean | `${boolean}` | ''>(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 isDisabled = computed(() => this.disabled() || this.state() === 'loading');\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;;MCWhG,eAAe,CAAA;AAC3B,IAAA,QAAQ;AACR,IAAA,WAAW;AAsFX,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,CAAC,MAAM,CAAC,CAAC,IAAiB,KAAI;YACvC,OAAO,IAAI,CAAC,QAAQ,KAAK,UAAU,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,SAAS,IAAI,CAAC,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,UAAU,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC/ErH;;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: "22.
|
|
57
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.
|
|
56
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: PrClass, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
57
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: PrClass }); }
|
|
58
58
|
}
|
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", 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/misc.ts","../../../packages/prisme/core/overlay/push-panel.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', '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\nexport const PRODUCT_PALETTE = ['pagga', 'poplee', 'coreHR', 'timmi', 'cleemy', 'cc'] as const;\nexport type ProductPalette = (typeof PRODUCT_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","type Nil = null | undefined;\n\nexport const isNil = <T>(value: T | Nil): value is Nil => typeof value === 'undefined' || value === null;\n\nexport const isNotNil = <T>(value: T): value is NonNullable<T> => !isNil(value);\n\nexport function assertNotNil<T>(input: T, errorMessage = '[assertNotNil] Unexpected null or undefined value.'): asserts input is NonNullable<T> {\n\tif (isNil(input)) {\n\t\tthrow new Error(errorMessage);\n\t}\n}\n\nexport const isNilOrEmptyString = (str: string | Nil): str is Nil | '' => isNil(str) || str === '';\n\nexport const isNotNilOrEmptyString = (str: string | Nil): str is string => !isNilOrEmptyString(str);\n","/**\n * Reads the `--commons-pushPanel-inlineSize` design token — the inline-end space reserved for a\n * docked panel that shrinks the page content — from the document root, in pixels.\n * Returns 0 when the token is unset or cannot be parsed as a pixel length.\n */\nexport function getPushPanelInlineSize(element: Element): number {\n\tconst raw = getComputedStyle(element).getPropertyValue('--commons-pushPanel-inlineSize').trim();\n\treturn parsePxExpression(raw);\n}\n\n/**\n * Resolves a CSS length restricted to pixels: either a bare `<px>` value or a flat `calc(...)`\n * summing/subtracting px terms — since custom properties are returned verbatim by getComputedStyle,\n * a token like `calc(32px + 348px)` never resolves on its own. Returns 0 (clamped, non-negative)\n * for anything outside that grammar, including relative units this parser deliberately doesn't handle.\n */\nfunction parsePxExpression(raw: string): number {\n\tconst inner = (/^calc\\((.*)\\)$/.exec(raw)?.[1] ?? raw).replace(/\\s+/g, '');\n\tconst terms = inner.match(/[+-]?\\d+(?:\\.\\d+)?px/g);\n\tif (!terms || terms.join('') !== inner) {\n\t\treturn 0;\n\t}\n\tconst sum = terms.reduce((acc, term) => acc + Number.parseFloat(term), 0);\n\treturn Math.max(0, sum);\n}\n\n/**\n * Builds a per-side viewport margin for a CDK `FlexibleConnectedPositionStrategy` so connected\n * overlays (popovers, tooltips, selects…) are pushed out of the reserved pushPanel zone on the\n * inline-end instead of overflowing into it. `base` is added to every side so an existing uniform\n * margin is preserved.\n */\nexport function getPushPanelViewportMargin(element: Element, base = 0): { start: number; end: number; top: number; bottom: number } {\n\tconst push = getPushPanelInlineSize(element);\n\treturn { start: base, end: base + push, top: base, bottom: base };\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,CAA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,CAAC,kBAAkB,CAAC,GAAG;;ACdlG;;;;AAIG;AACG,SAAU,sBAAsB,CAAC,OAAgB,EAAA;AACtD,IAAA,MAAM,GAAG,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC,gBAAgB,CAAC,gCAAgC,CAAC,CAAC,IAAI,EAAE;AAC/F,IAAA,OAAO,iBAAiB,CAAC,GAAG,CAAC;AAC9B;AAEA;;;;;AAKG;AACH,SAAS,iBAAiB,CAAC,GAAW,EAAA;IACrC,MAAM,KAAK,GAAG,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,EAAE,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;IAC1E,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,uBAAuB,CAAC;AAClD,IAAA,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,KAAK,EAAE;AACvC,QAAA,OAAO,CAAC;IACT;IACA,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,KAAK,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACzE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC;AACxB;AAEA;;;;;AAKG;SACa,0BAA0B,CAAC,OAAgB,EAAE,IAAI,GAAG,CAAC,EAAA;AACpE,IAAA,MAAM,IAAI,GAAG,sBAAsB,CAAC,OAAO,CAAC;AAC5C,IAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,GAAG,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;AAClE;;ACnCA;;AAEG;;;;"}
|
|
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/misc.ts","../../../packages/prisme/core/overlay/push-panel.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', '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\nexport const PRODUCT_PALETTE = ['pagga', 'poplee', 'coreHR', 'timmi', 'cleemy', 'cc'] as const;\nexport type ProductPalette = (typeof PRODUCT_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","type Nil = null | undefined;\n\nexport const isNil = <T>(value: T | Nil): value is Nil => typeof value === 'undefined' || value === null;\n\nexport const isNotNil = <T>(value: T): value is NonNullable<T> => !isNil(value);\n\nexport function assertNotNil<T>(input: T, errorMessage = '[assertNotNil] Unexpected null or undefined value.'): asserts input is NonNullable<T> {\n\tif (isNil(input)) {\n\t\tthrow new Error(errorMessage);\n\t}\n}\n\nexport const isNilOrEmptyString = (str: string | Nil): str is Nil | '' => isNil(str) || str === '';\n\nexport const isNotNilOrEmptyString = (str: string | Nil): str is string => !isNilOrEmptyString(str);\n","/**\n * Reads the `--commons-pushPanel-inlineSize` design token — the inline-end space reserved for a\n * docked panel that shrinks the page content — from the document root, in pixels.\n * Returns 0 when the token is unset or cannot be parsed as a pixel length.\n */\nexport function getPushPanelInlineSize(element: Element): number {\n\tconst raw = getComputedStyle(element).getPropertyValue('--commons-pushPanel-inlineSize').trim();\n\treturn parsePxExpression(raw);\n}\n\n/**\n * Resolves a CSS length restricted to pixels: either a bare `<px>` value or a flat `calc(...)`\n * summing/subtracting px terms — since custom properties are returned verbatim by getComputedStyle,\n * a token like `calc(32px + 348px)` never resolves on its own. Returns 0 (clamped, non-negative)\n * for anything outside that grammar, including relative units this parser deliberately doesn't handle.\n */\nfunction parsePxExpression(raw: string): number {\n\tconst inner = (/^calc\\((.*)\\)$/.exec(raw)?.[1] ?? raw).replace(/\\s+/g, '');\n\tconst terms = inner.match(/[+-]?\\d+(?:\\.\\d+)?px/g);\n\tif (!terms || terms.join('') !== inner) {\n\t\treturn 0;\n\t}\n\tconst sum = terms.reduce((acc, term) => acc + Number.parseFloat(term), 0);\n\treturn Math.max(0, sum);\n}\n\n/**\n * Builds a per-side viewport margin for a CDK `FlexibleConnectedPositionStrategy` so connected\n * overlays (popovers, tooltips, selects…) are pushed out of the reserved pushPanel zone on the\n * inline-end instead of overflowing into it. `base` is added to every side so an existing uniform\n * margin is preserved.\n */\nexport function getPushPanelViewportMargin(element: Element, base = 0): { start: number; end: number; top: number; bottom: number } {\n\tconst push = getPushPanelInlineSize(element);\n\treturn { start: base, end: base + push, top: base, bottom: base };\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,CA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AAI,GAAG,sBAAsB,CAAC,OAAO,CAAC;AAC5C,IAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,GAAG,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;AAClE;;ACnCA;;AAEG;;"}
|
|
@@ -42,10 +42,10 @@ class IconComponent {
|
|
|
42
42
|
}, /* @ts-ignore */
|
|
43
43
|
...(ngDevMode ? [{ debugName: "iconClasses" }] : /* istanbul ignore next */ []));
|
|
44
44
|
}
|
|
45
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
46
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.
|
|
45
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: IconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
46
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", 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-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 }); }
|
|
47
47
|
}
|
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: IconComponent, decorators: [{
|
|
49
49
|
type: Component,
|
|
50
50
|
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-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"] }]
|
|
51
51
|
}], 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.type.ts","../../../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":["/**\n * Available IconComponent types\n */\n\nexport const ICON_SIZE = ['XXS', 'XS', 'S', 'M', 'L', 'XL', 'XXL'] as const;\nexport type IconSize = (typeof ICON_SIZE)[number];\n\nexport const ICON_COLOR = ['product', 'error', 'warning', 'success', 'light', 'placeholder', 'inherit'] as const;\nexport type IconColor = (typeof ICON_COLOR)[number];\n","import { NgClass } from '@angular/common';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from '@angular/core';\nimport { IconColor, IconSize } from './icon.type';\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<IconSize>();\n\n\t/**\n\t * Changes the color of the icon (inherit by default)\n\t */\n\treadonly color = input<IconColor>('inherit');\n\n\t/**\n\t * Display icon in AI mode\n\t */\n\treadonly AI = input<boolean, boolean | `${boolean}` | ''>(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| 'arrowUndo'\n\t| 'arrowRedo'\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| 'signShieldCancel'\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\t| 'window'\n\t| 'windowAside'\n\t| 'windowAsideLarge'\n\t| 'windowCornerBottom'\n\t| 'windowCornerTop';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;AAEG;AAEI,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK;AAG1D,MAAM,UAAU,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS;;MCMzF,aAAa,CAAA;AAR1B,IAAA,WAAA,GAAA;AASC;;AAEG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,QAAQ;iFAAa;AAE3C;;AAEG;AACM,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK;2FAAU;AAE9B;;AAEG;AACM,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK;4FAAY;AAEjC;;AAEG;QACM,IAAA,CAAA,KAAK,GAAG,KAAK,CAAY,SAAS;kFAAC;AAE5C;;AAEG;QACM,IAAA,CAAA,EAAE,GAAG,KAAK,CAAuC,KAAK,0EAAI,SA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,MAAA,EAAA,CAAA,4XAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDFW,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;;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,4XAAA,CAAA,EAAA;;;AEXtC;AACA;AACA;AACA;;ACHA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"lucca-prisme-icon.mjs","sources":["../../../packages/prisme/icon/icon.type.ts","../../../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":["/**\n * Available IconComponent types\n */\n\nexport const ICON_SIZE = ['XXS', 'XS', 'S', 'M', 'L', 'XL', 'XXL'] as const;\nexport type IconSize = (typeof ICON_SIZE)[number];\n\nexport const ICON_COLOR = ['product', 'error', 'warning', 'success', 'light', 'placeholder', 'inherit'] as const;\nexport type IconColor = (typeof ICON_COLOR)[number];\n","import { NgClass } from '@angular/common';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from '@angular/core';\nimport { IconColor, IconSize } from './icon.type';\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<IconSize>();\n\n\t/**\n\t * Changes the color of the icon (inherit by default)\n\t */\n\treadonly color = input<IconColor>('inherit');\n\n\t/**\n\t * Display icon in AI mode\n\t */\n\treadonly AI = input<boolean, boolean | `${boolean}` | ''>(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| 'arrowRedo'\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| 'arrowUndo'\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| 'chartTree'\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| 'signShieldCancel'\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\t| 'window'\n\t| 'windowAside'\n\t| 'windowAsideLarge'\n\t| 'windowCornerBottom'\n\t| 'windowCornerTop';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;AAEG;AA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|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
76
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.
|
|
75
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NumericBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
76
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: NumericBadgeComponent, isStandalone: true, selector: "lu-numeric-badge,pr-numeric-badge", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, palette: { classPropertyName: "palette", publicName: "palette", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, maxValue: { classPropertyName: "maxValue", publicName: "maxValue", isSignal: true, isRequired: false, transformFunction: null }, disableTooltip: { classPropertyName: "disableTooltip", publicName: "disableTooltip", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.is-loading": "loading()", "attr.aria-hidden": "ariaHidden()" }, classAttribute: "numericBadge" }, providers: [PrClass], ngImport: i0, template: "<span class=\"numericBadge-value\" [luTooltip]=\"value()\" [luTooltipDisabled]=\"isDisabled()\">{{ displayValue() }}</span>\n", styles: ["@charset \"UTF-8\";@layer components{.numericBadge{--components-numericBadge-background: var(--palettes-200, var(--palettes-neutral-200));--components-numericBadge-color: var(--palettes-800, var(--palettes-neutral-700));--components-numericBadge-loadingColor: var(--palettes-500, var(--palettes-neutral-500));--components-numericBadge-size: 1.5rem;--components-numericBadge-font: var(--pr-t-font-body-S);--components-numericBadge-borderRadius: var(--pr-t-border-radius-default);display:inline-flex;align-items:center;justify-content:center;block-size:var(--components-numericBadge-size);min-inline-size:var(--components-numericBadge-size);padding:var(--pr-t-spacings-50);font:var(--components-numericBadge-font);font-weight:var(--pr-t-font-fontWeight-semibold);background-color:var(--components-numericBadge-background);color:var(--components-numericBadge-color);border-radius:var(--components-numericBadge-borderRadius);transition-timing-function:ease;white-space:nowrap;position:relative;transition-duration:var(--commons-animations-durations-fast);transition-property:color}.numericBadge:empty:before{content:\"\\a0\"/\"\"}.numericBadge-value{outline:none}}@layer mods{.numericBadge.mod-S{--components-numericBadge-size: 1.25rem;--components-numericBadge-borderRadius: var(--pr-t-border-radius-small);--components-numericBadge-font: var(--pr-t-font-body-XS)}.numericBadge.mod-XS{--components-numericBadge-size: 1rem;--components-numericBadge-borderRadius: var(--pr-t-border-radius-small);--components-numericBadge-font: var(--pr-t-font-body-XS)}.numericBadge.is-loading{--commons-loading-frontground: var(--components-numericBadge-loadingColor);--commons-loading-borderWidth: 2px;--components-numericBadge-color: transparent}.numericBadge.is-loading:after{content:\"\";inline-size:calc(var(--components-numericBadge-size) - var(--pr-t-spacings-100));block-size:calc(var(--components-numericBadge-size) - var(--pr-t-spacings-100));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)}}.numericBadge.is-loading.mod-S{--commons-loading-borderWidth: 1.5px}.numericBadge.is-loading.mod-XS{--commons-loading-borderWidth: 1px}.numericBadge:focus-within{outline:2px solid var(--palettes-700, var(--palettes-product-700));outline-offset:2px}}@layer base{lu-numeric-badge{display:inline-flex}}\n"], dependencies: [{ kind: "ngmodule", type: LuTooltipModule }, { kind: "directive", type: i1.LuTooltipTriggerDirective, selector: "[luTooltip],[prTooltip]", inputs: ["luTooltip", "prTooltip", "luTooltipEnterDelay", "prTooltipEnterDelay", "luTooltipLeaveDelay", "prTooltipLeaveDelay", "luTooltipDisabled", "prTooltipDisabled", "luTooltipOnlyForDisplay", "prTooltipOnlyForDisplay", "luTooltipPosition", "prTooltipPosition", "luTooltipWhenEllipsis", "prTooltipWhenEllipsis", "luTooltipAnchor", "prTooltipAnchor", "id"], exportAs: ["luTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
77
77
|
}
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NumericBadgeComponent, decorators: [{
|
|
79
79
|
type: Component,
|
|
80
80
|
args: [{ selector: 'lu-numeric-badge,pr-numeric-badge', changeDetection: ChangeDetectionStrategy.OnPush, imports: [LuTooltipModule], providers: [PrClass], host: {
|
|
81
81
|
class: 'numericBadge',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucca-prisme-numeric-badge.mjs","sources":["../../../packages/prisme/numeric-badge/numeric-badge.type.ts","../../../packages/prisme/numeric-badge/numeric-badge.component.ts","../../../packages/prisme/numeric-badge/numeric-badge.component.html","../../../packages/prisme/numeric-badge/lucca-prisme-numeric-badge.ts"],"sourcesContent":["/**\n * Available NumericBadgeComponent Types\n */\n\nexport const NUMERIC_BADGE_SIZE = ['XS', 'S', 'M'] as const;\nexport type NumericBadgeSize = (typeof NUMERIC_BADGE_SIZE)[number];\n","import { booleanAttribute, ChangeDetectionStrategy, Component, computed, HostAttributeToken, inject, input, numberAttribute, ViewEncapsulation } from '@angular/core';\nimport { PrClass, Palette, ɵeffectWithDeps } from '@lucca/prisme/core';\nimport { LuTooltipModule } from '@lucca/prisme/tooltip';\nimport { NumericBadgeSize } from './numeric-badge.type';\n\n@Component({\n\tselector: 'lu-numeric-badge,pr-numeric-badge',\n\ttemplateUrl: './numeric-badge.component.html',\n\tstyleUrl: './numeric-badge.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [LuTooltipModule],\n\tproviders: [PrClass],\n\thost: {\n\t\tclass: 'numericBadge',\n\t\t'[class.is-loading]': 'loading()',\n\t\t'[attr.aria-hidden]': 'ariaHidden()',\n\t},\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class NumericBadgeComponent {\n\t#luClass = inject(PrClass);\n\n\t/**\n\t * The value to display, number or string contains number only.\n\t */\n\treadonly value = input.required<number | string>();\n\n\t/**\n\t * The size of the badge\n\t */\n\treadonly size = input<NumericBadgeSize>();\n\n\t/**\n\t * The palette to use for this badge. Defaults to 'none' (inherits parent palette)\n\t */\n\treadonly palette = input<Palette>('none');\n\n\t/**\n\t * Applies the loading state\n\t */\n\treadonly loading = input(false, { transform: booleanAttribute });\n\n\t/**\n\t * Indicates the maximum value of number for the numeric badge\n\t */\n\treadonly maxValue = input(999, { transform: numberAttribute });\n\n\t/**\n\t * Disabled tooltip on numeric badge\n\t */\n\treadonly disableTooltip = input(false, { transform: booleanAttribute });\n\n\treadonly #initialAriaHidden = inject(new HostAttributeToken('aria-hidden'), { optional: true });\n\n\treadonly ariaHidden = computed(() => (this.loading() ? 'true' : this.#initialAriaHidden));\n\n\treadonly numericBadgeClasses = computed(() => {\n\t\tconst palette = this.palette();\n\t\tconst size = this.size();\n\t\treturn { [`palette-${palette}`]: !!palette, [`mod-${size}`]: !!size };\n\t});\n\n\treadonly displayValue = computed(() => {\n\t\tconst value = this.value();\n\t\tconst maxValue = this.maxValue();\n\t\tif (typeof value === 'number') {\n\t\t\treturn +value > maxValue ? `${maxValue}+` : value;\n\t\t} else {\n\t\t\treturn value;\n\t\t}\n\t});\n\n\treadonly isDisabled = computed<boolean>(() => {\n\t\tconst value = this.value();\n\t\treturn this.disableTooltip() || typeof value !== 'number' || this.loading() || this.maxValue() >= +value;\n\t});\n\n\tconstructor() {\n\t\tɵeffectWithDeps([this.numericBadgeClasses], (numericBadgeClasses) => {\n\t\t\tif (numericBadgeClasses) {\n\t\t\t\tthis.#luClass.setState(numericBadgeClasses);\n\t\t\t}\n\t\t});\n\t}\n}\n","<span class=\"numericBadge-value\" [luTooltip]=\"value()\" [luTooltipDisabled]=\"isDisabled()\">{{ displayValue() }}</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵeffectWithDeps"],"mappings":";;;;;;AAAA;;AAEG;AAEI,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG;;MCepC,qBAAqB,CAAA;AACjC,IAAA,QAAQ;AAgCC,IAAA,kBAAkB;AAyB3B,IAAA,WAAA,GAAA;AAzDA,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC;AAE1B;;AAEG;QACM,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,QAAQ;kFAAmB;AAElD;;AAEG;AACM,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK;4FAAoB;AAEzC;;AAEG;QACM,IAAA,CAAA,OAAO,GAAG,KAAK,CAAU,MAAM;oFAAC;AAEzC;;AAEG;QACM,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,KAAK,+EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEhE;;AAEG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,GAAG,gFAAI,SAAS,EAAE,eAAe,EAAA,CAAG;AAE9D;;AAEG;QACM,IAAA,CAAA,cAAc,GAAG,KAAK,CAAC,KAAK,sFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAE9D,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,IAAI,kBAAkB,CAAC,aAAa,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QAEtF,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,OAAO,EAAE,GAAG,MAAM,GAAG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AAI,EAAA,QAAA,EAAA,+HAAA,EAAA,MAAA,EAAA,CAAA,yoFAAA,CAAA,EAAA;;;AEjBtC;;AAEG
|
|
1
|
+
{"version":3,"file":"lucca-prisme-numeric-badge.mjs","sources":["../../../packages/prisme/numeric-badge/numeric-badge.type.ts","../../../packages/prisme/numeric-badge/numeric-badge.component.ts","../../../packages/prisme/numeric-badge/numeric-badge.component.html","../../../packages/prisme/numeric-badge/lucca-prisme-numeric-badge.ts"],"sourcesContent":["/**\n * Available NumericBadgeComponent Types\n */\n\nexport const NUMERIC_BADGE_SIZE = ['XS', 'S', 'M'] as const;\nexport type NumericBadgeSize = (typeof NUMERIC_BADGE_SIZE)[number];\n","import { booleanAttribute, ChangeDetectionStrategy, Component, computed, HostAttributeToken, inject, input, numberAttribute, ViewEncapsulation } from '@angular/core';\nimport { PrClass, Palette, ɵeffectWithDeps } from '@lucca/prisme/core';\nimport { LuTooltipModule } from '@lucca/prisme/tooltip';\nimport { NumericBadgeSize } from './numeric-badge.type';\n\n@Component({\n\tselector: 'lu-numeric-badge,pr-numeric-badge',\n\ttemplateUrl: './numeric-badge.component.html',\n\tstyleUrl: './numeric-badge.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [LuTooltipModule],\n\tproviders: [PrClass],\n\thost: {\n\t\tclass: 'numericBadge',\n\t\t'[class.is-loading]': 'loading()',\n\t\t'[attr.aria-hidden]': 'ariaHidden()',\n\t},\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class NumericBadgeComponent {\n\t#luClass = inject(PrClass);\n\n\t/**\n\t * The value to display, number or string contains number only.\n\t */\n\treadonly value = input.required<number | string>();\n\n\t/**\n\t * The size of the badge\n\t */\n\treadonly size = input<NumericBadgeSize>();\n\n\t/**\n\t * The palette to use for this badge. Defaults to 'none' (inherits parent palette)\n\t */\n\treadonly palette = input<Palette>('none');\n\n\t/**\n\t * Applies the loading state\n\t */\n\treadonly loading = input(false, { transform: booleanAttribute });\n\n\t/**\n\t * Indicates the maximum value of number for the numeric badge\n\t */\n\treadonly maxValue = input(999, { transform: numberAttribute });\n\n\t/**\n\t * Disabled tooltip on numeric badge\n\t */\n\treadonly disableTooltip = input(false, { transform: booleanAttribute });\n\n\treadonly #initialAriaHidden = inject(new HostAttributeToken('aria-hidden'), { optional: true });\n\n\treadonly ariaHidden = computed(() => (this.loading() ? 'true' : this.#initialAriaHidden));\n\n\treadonly numericBadgeClasses = computed(() => {\n\t\tconst palette = this.palette();\n\t\tconst size = this.size();\n\t\treturn { [`palette-${palette}`]: !!palette, [`mod-${size}`]: !!size };\n\t});\n\n\treadonly displayValue = computed(() => {\n\t\tconst value = this.value();\n\t\tconst maxValue = this.maxValue();\n\t\tif (typeof value === 'number') {\n\t\t\treturn +value > maxValue ? `${maxValue}+` : value;\n\t\t} else {\n\t\t\treturn value;\n\t\t}\n\t});\n\n\treadonly isDisabled = computed<boolean>(() => {\n\t\tconst value = this.value();\n\t\treturn this.disableTooltip() || typeof value !== 'number' || this.loading() || this.maxValue() >= +value;\n\t});\n\n\tconstructor() {\n\t\tɵeffectWithDeps([this.numericBadgeClasses], (numericBadgeClasses) => {\n\t\t\tif (numericBadgeClasses) {\n\t\t\t\tthis.#luClass.setState(numericBadgeClasses);\n\t\t\t}\n\t\t});\n\t}\n}\n","<span class=\"numericBadge-value\" [luTooltip]=\"value()\" [luTooltipDisabled]=\"isDisabled()\">{{ displayValue() }}</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵeffectWithDeps"],"mappings":";;;;;;AAAA;;AAEG;AAEI,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG;;MCepC,qBAAqB,CAAA;AACjC,IAAA,QAAQ;AAgCC,IAAA,kBAAkB;AAyB3B,IAAA,WAAA,GAAA;AAzDA,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC;AAE1B;;AAEG;QACM,IAAA,CAAA,KAAK,GAA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