@design-system-rte/angular 0.17.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/esm2022/lib/components/badge/badge.component.mjs +3 -3
- package/esm2022/lib/components/banner/banner.component.mjs +14 -6
- package/esm2022/lib/components/button/button.component.mjs +11 -4
- package/esm2022/lib/components/icon-button/icon-button.component.mjs +3 -3
- package/esm2022/lib/components/icon-button-toggle/icon-button-toggle.component.mjs +3 -3
- package/esm2022/lib/components/popover/popover.component.mjs +1 -1
- package/esm2022/lib/components/toast/toast.component.mjs +57 -0
- package/esm2022/lib/components/toast/toast.service.mjs +114 -0
- package/esm2022/lib/services/overlay.service.mjs +9 -1
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/design-system-rte-angular.mjs +197 -15
- package/fesm2022/design-system-rte-angular.mjs.map +1 -1
- package/lib/components/badge/badge.directive.d.ts +1 -1
- package/lib/components/banner/banner.component.d.ts +3 -2
- package/lib/components/button/button.component.d.ts +5 -1
- package/lib/components/icon-button/icon-button.component.d.ts +3 -3
- package/lib/components/icon-button-toggle/icon-button-toggle.component.d.ts +2 -2
- package/lib/components/split-button/split-button.component.d.ts +1 -1
- package/lib/components/text-input/text-input.component.d.ts +3 -3
- package/lib/components/toast/toast.component.d.ts +30 -0
- package/lib/components/toast/toast.service.d.ts +34 -0
- package/lib/services/overlay.service.d.ts +2 -0
- package/package.json +2 -2
- package/public-api.d.ts +2 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, Component, ChangeDetectionStrategy, HostBinding, Directive, inject, Injectable, DestroyRef, ChangeDetectorRef, effect,
|
|
2
|
+
import { input, computed, Component, ChangeDetectionStrategy, HostBinding, Directive, inject, Injectable, DestroyRef, ChangeDetectorRef, effect, ElementRef, ViewContainerRef, Renderer2, HostListener, output, contentChild, NgModule, signal, viewChild, viewChildren, RendererFactory2 } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
@@ -16,7 +16,7 @@ import { SPACE_KEY, ENTER_KEY, ARROW_DOWN_KEY, ARROW_UP_KEY, ARROW_LEFT_KEY, ARR
|
|
|
16
16
|
import { BehaviorSubject } from 'rxjs';
|
|
17
17
|
import { map } from 'rxjs/operators';
|
|
18
18
|
import { DropdownManager } from '@design-system-rte/core/components/dropdown/DropdownManager';
|
|
19
|
-
import {
|
|
19
|
+
import { ButtonIconSize } from '@design-system-rte/core/components/button/common/common-button.constants';
|
|
20
20
|
import { getShowIcon, getShowText, getDisplayCount, getBadgeIconSize, getShowBadge } from '@design-system-rte/core/components/badge/badge.utils';
|
|
21
21
|
import { CHIP_TYPE_TO_ARIA_ROLE_MAP } from '@design-system-rte/core/components/chip/chip.constants';
|
|
22
22
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
@@ -27,24 +27,33 @@ import { BREADCRUMBS_DEFAULT_ARIA_LABEL } from '@design-system-rte/core/componen
|
|
|
27
27
|
import { shouldTruncateBreadcrumbs, getBreadcrumbsTruncatedItems } from '@design-system-rte/core/components/breadcrumbs/breadcrumbs.utils';
|
|
28
28
|
import { cardSize } from '@design-system-rte/core/components/card/card.constats';
|
|
29
29
|
import { POPOVER_GAP_ARROW, POPOVER_GAP } from '@design-system-rte/core/components/popover/popover.constants';
|
|
30
|
-
import { IconSize } from '@design-system-rte/core/components/icon/icon.constants';
|
|
30
|
+
import { IconSize, IconTypeMap } from '@design-system-rte/core/components/icon/icon.constants';
|
|
31
31
|
import { sideNavCollapsedSize, sideNavPanelSize, dividerAppearanceBySideNavAppearance } from '@design-system-rte/core/components/side-nav/side-nav.constants';
|
|
32
32
|
import { getNavItemLabelIconSize } from '@design-system-rte/core/components/side-nav/nav-item/nav-item.utils';
|
|
33
|
+
import { getToastPriority } from '@design-system-rte/core/components/toast/toast.utils';
|
|
34
|
+
import { v4 } from 'uuid';
|
|
33
35
|
|
|
34
36
|
class ButtonComponent {
|
|
35
37
|
constructor() {
|
|
36
38
|
this.rteButtonVariant = input("primary");
|
|
37
39
|
this.rteButtonSize = input("m");
|
|
40
|
+
this.rteBadgeCount = input();
|
|
41
|
+
this.rteBadgeContent = input();
|
|
42
|
+
this.shouldDisplayBadge = computed(() => {
|
|
43
|
+
const count = this.rteBadgeCount();
|
|
44
|
+
const content = this.rteBadgeContent();
|
|
45
|
+
return (count && count > 0 && content === "number") || content === "icon";
|
|
46
|
+
});
|
|
38
47
|
}
|
|
39
48
|
get classes() {
|
|
40
49
|
return `rte-button ${this.rteButtonVariant()} size-${this.rteButtonSize()}`;
|
|
41
50
|
}
|
|
42
51
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
43
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: ButtonComponent, isStandalone: true, selector: "button[rteButton]", inputs: { rteButtonVariant: { classPropertyName: "rteButtonVariant", publicName: "rteButtonVariant", isSignal: true, isRequired: false, transformFunction: null }, rteButtonSize: { classPropertyName: "rteButtonSize", publicName: "rteButtonSize", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.classes" } }, ngImport: i0, template: "<span class=\"rte-button-label\">\n
|
|
52
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: ButtonComponent, isStandalone: true, selector: "button[rteButton]", inputs: { rteButtonVariant: { classPropertyName: "rteButtonVariant", publicName: "rteButtonVariant", isSignal: true, isRequired: false, transformFunction: null }, rteButtonSize: { classPropertyName: "rteButtonSize", publicName: "rteButtonSize", isSignal: true, isRequired: false, transformFunction: null }, rteBadgeCount: { classPropertyName: "rteBadgeCount", publicName: "rteBadgeCount", isSignal: true, isRequired: false, transformFunction: null }, rteBadgeContent: { classPropertyName: "rteBadgeContent", publicName: "rteBadgeContent", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.classes" } }, ngImport: i0, template: "<span class=\"rte-button-label\">\n <ng-content />\n <!-- Le badge est g\u00E9r\u00E9 par BadgeDirective attach\u00E9e via hostDirectives -->\n</span>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:wght,FILL,GRAD@400,0,0&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap\";:host{display:inline-flex;flex-shrink:0;align-items:center;cursor:pointer;justify-content:center;width:fit-content}:host:focus-visible{outline:1px solid var(--border-brand-focused);outline-offset:4px}:host.size-s{font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Nunito;font-size:14px;letter-spacing:-.5px;font-weight:600;line-height:20px;height:24px;border-radius:4px;padding:4px 8px}:host.size-s .rte-button-label{margin:0 4px}:host.size-m{font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Nunito;font-weight:600;font-size:16px;line-height:24px;letter-spacing:-.5px;height:32px;border-radius:4px;padding:4px 12px}:host.size-m .rte-button-label{margin:0 6px}:host.size-l{font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Nunito;font-weight:600;font-size:20px;line-height:28px;letter-spacing:-.5px;height:40px;border-radius:8px;padding:4px 16px}:host.size-l .rte-button-label{margin:0 8px}:host.primary{border:var(--border-brand-default);color:var(--content-primary-inverse);background:var(--background-brand-default)}:host.primary:hover{background:var(--background-brand-hover);border:var(--background-brand-hover)}:host.primary:active{background:var(--background-brand-pressed)}:host.primary:disabled{background:var(--background-disabled);border:solid 1px var(--border-disabled);color:var(--content-disabled);box-shadow:none;cursor:default}:host.secondary{background:var(--background-default);border:solid 1px var(--border-brand-default);color:var(--content-brand-default)}:host.secondary:hover{background:var(--background-brand-inverse-hover)}:host.secondary:active{background:var(--background-brand-inverse-pressed)}:host.secondary:disabled{background:var(--background-disabled);border:solid 1px var(--border-disabled);color:var(--content-disabled);cursor:default}:host.text{background:transparent;border:none;color:var(--content-brand-default)}:host.text:hover{background:var(--background-brand-inverse-hover)}:host.text:active{background:var(--background-brand-inverse-pressed)}:host.text:disabled{background:var(--background-disabled);color:var(--content-disabled);cursor:default}:host.transparent{background:transparent;border:none;color:var(--content-brand-default)}:host.transparent:hover{color:var(--content-brand-hover)}:host.transparent:active{color:var(--content-brand-pressed)}:host.transparent:disabled{color:var(--content-disabled);box-shadow:none;cursor:default}:host.danger{background:var(--background-danger-default);border:none;color:var(--content-primary-inverse)}:host.danger:hover{background:var(--background-danger-hover)}:host.danger:active{background:var(--background-danger-pressed)}:host.danger:disabled{background:var(--background-disabled);border:var(--border-disabled);color:var(--content-disabled);box-shadow:none;cursor:default}:host.neutral{background:none;border:none;color:var(--content-primary)}:host.neutral:hover{color:var(--content-secondary)}:host.neutral:active{color:var(--content-tertiary)}:host.neutral:disabled{background:var(--background-disabled);box-shadow:none;color:var(--content-disabled);cursor:default}:host.reverse{background:none;border:none;color:var(--content-primary-inverse)}:host.reverse:hover{color:var(--background-hover)}:host.reverse:active{color:var(--content-primary-inverse)}:host.reverse:disabled{background:var(--background-disabled);box-shadow:none;color:var(--content-disabled);cursor:default}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
44
53
|
}
|
|
45
54
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
46
55
|
type: Component,
|
|
47
|
-
args: [{ selector: "button[rteButton]", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<span class=\"rte-button-label\">\n
|
|
56
|
+
args: [{ selector: "button[rteButton]", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<span class=\"rte-button-label\">\n <ng-content />\n <!-- Le badge est g\u00E9r\u00E9 par BadgeDirective attach\u00E9e via hostDirectives -->\n</span>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:wght,FILL,GRAD@400,0,0&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap\";:host{display:inline-flex;flex-shrink:0;align-items:center;cursor:pointer;justify-content:center;width:fit-content}:host:focus-visible{outline:1px solid var(--border-brand-focused);outline-offset:4px}:host.size-s{font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Nunito;font-size:14px;letter-spacing:-.5px;font-weight:600;line-height:20px;height:24px;border-radius:4px;padding:4px 8px}:host.size-s .rte-button-label{margin:0 4px}:host.size-m{font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Nunito;font-weight:600;font-size:16px;line-height:24px;letter-spacing:-.5px;height:32px;border-radius:4px;padding:4px 12px}:host.size-m .rte-button-label{margin:0 6px}:host.size-l{font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Nunito;font-weight:600;font-size:20px;line-height:28px;letter-spacing:-.5px;height:40px;border-radius:8px;padding:4px 16px}:host.size-l .rte-button-label{margin:0 8px}:host.primary{border:var(--border-brand-default);color:var(--content-primary-inverse);background:var(--background-brand-default)}:host.primary:hover{background:var(--background-brand-hover);border:var(--background-brand-hover)}:host.primary:active{background:var(--background-brand-pressed)}:host.primary:disabled{background:var(--background-disabled);border:solid 1px var(--border-disabled);color:var(--content-disabled);box-shadow:none;cursor:default}:host.secondary{background:var(--background-default);border:solid 1px var(--border-brand-default);color:var(--content-brand-default)}:host.secondary:hover{background:var(--background-brand-inverse-hover)}:host.secondary:active{background:var(--background-brand-inverse-pressed)}:host.secondary:disabled{background:var(--background-disabled);border:solid 1px var(--border-disabled);color:var(--content-disabled);cursor:default}:host.text{background:transparent;border:none;color:var(--content-brand-default)}:host.text:hover{background:var(--background-brand-inverse-hover)}:host.text:active{background:var(--background-brand-inverse-pressed)}:host.text:disabled{background:var(--background-disabled);color:var(--content-disabled);cursor:default}:host.transparent{background:transparent;border:none;color:var(--content-brand-default)}:host.transparent:hover{color:var(--content-brand-hover)}:host.transparent:active{color:var(--content-brand-pressed)}:host.transparent:disabled{color:var(--content-disabled);box-shadow:none;cursor:default}:host.danger{background:var(--background-danger-default);border:none;color:var(--content-primary-inverse)}:host.danger:hover{background:var(--background-danger-hover)}:host.danger:active{background:var(--background-danger-pressed)}:host.danger:disabled{background:var(--background-disabled);border:var(--border-disabled);color:var(--content-disabled);box-shadow:none;cursor:default}:host.neutral{background:none;border:none;color:var(--content-primary)}:host.neutral:hover{color:var(--content-secondary)}:host.neutral:active{color:var(--content-tertiary)}:host.neutral:disabled{background:var(--background-disabled);box-shadow:none;color:var(--content-disabled);cursor:default}:host.reverse{background:none;border:none;color:var(--content-primary-inverse)}:host.reverse:hover{color:var(--background-hover)}:host.reverse:active{color:var(--content-primary-inverse)}:host.reverse:disabled{background:var(--background-disabled);box-shadow:none;color:var(--content-disabled);cursor:default}\n"] }]
|
|
48
57
|
}], propDecorators: { classes: [{
|
|
49
58
|
type: HostBinding,
|
|
50
59
|
args: ["class"]
|
|
@@ -624,6 +633,9 @@ class OverlayService {
|
|
|
624
633
|
}
|
|
625
634
|
return this.overlayRoot;
|
|
626
635
|
}
|
|
636
|
+
createWithoutAppend(component, viewContainer) {
|
|
637
|
+
return viewContainer.createComponent(component);
|
|
638
|
+
}
|
|
627
639
|
create(component, viewContainer, freezeNavigation = false) {
|
|
628
640
|
const root = this.getOverlayRoot(freezeNavigation);
|
|
629
641
|
const componentRef = viewContainer.createComponent(component);
|
|
@@ -636,6 +648,11 @@ class OverlayService {
|
|
|
636
648
|
};
|
|
637
649
|
return componentRef;
|
|
638
650
|
}
|
|
651
|
+
addToOverlay(componentRef) {
|
|
652
|
+
const root = this.getOverlayRoot(this.isNavigationFrozen);
|
|
653
|
+
root.appendChild(componentRef.location.nativeElement);
|
|
654
|
+
this.activeOverlays.add(componentRef);
|
|
655
|
+
}
|
|
639
656
|
destroy() {
|
|
640
657
|
if (this.activeOverlays.size === 0) {
|
|
641
658
|
if (this.isNavigationFrozen) {
|
|
@@ -1261,11 +1278,11 @@ class BadgeComponent {
|
|
|
1261
1278
|
}));
|
|
1262
1279
|
}
|
|
1263
1280
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1264
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: BadgeComponent, isStandalone: true, selector: "rte-badge", inputs: { badgeType: { classPropertyName: "badgeType", publicName: "badgeType", isSignal: true, isRequired: false, transformFunction: null }, badgeSize: { classPropertyName: "badgeSize", publicName: "badgeSize", isSignal: true, isRequired: false, transformFunction: null }, badgeContent: { classPropertyName: "badgeContent", publicName: "badgeContent", isSignal: true, isRequired: false, transformFunction: null }, count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, simpleBadge: { classPropertyName: "simpleBadge", publicName: "simpleBadge", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"badge size-{{ badgeSize() }} type-{{ badgeType() }}\"\n data-testid=\"badge\"\n [attr.data-simple-badge]=\"simpleBadge()\"\n [ngClass]=\"{ hidden: !showBadge(), 'count-overflow': countOverflow() }\"\n>\n <rte-icon\n *ngIf=\"showIcon()\"\n class=\"badge-icon\"\n [name]=\"icon()\"\n [size]=\"iconSize()!\"\n />\n <span *ngIf=\"showText()\" class=\"badge-text\">\n {{ displayCount() }}\n </span>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:wght,FILL,GRAD@400,0,0&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap\";.badge{position:absolute;border-radius:999px;display:flex;align-items:center;justify-content:center;transition:opacity .15s ease-in-out;box-sizing:border-box}.badge.hidden{opacity:0}.badge.type-brand{box-shadow:0 2px 4px 0 var(--elevation-shadow-key-brand),0 0 2px 0 var(--elevation-shadow-ambient-brand);background:linear-gradient(0deg,var(--elevation-surface-shadow-2) 0%,var(--elevation-surface-shadow-2) 100%);background-color:var(--background-brand-default);color:var(--content-primary-inverse)}.badge.type-neutral{box-shadow:0 2px 4px 0 var(--elevation-shadow-key),0 0 2px 0 var(--elevation-shadow-ambient);background:linear-gradient(0deg,var(--elevation-surface-shadow-2) 0%,var(--elevation-surface-shadow-2) 100%);background-color:var(--background-neutral-regular-default);color:var(--content-secondary)}.badge.type-indicator{box-shadow:0 2px 4px 0 var(--elevation-shadow-key-brand),0 0 2px 0 var(--elevation-shadow-ambient-brand);background:linear-gradient(0deg,var(--elevation-surface-shadow-2) 0%,var(--elevation-surface-shadow-2) 100%);background-color:var(--background-danger-default);color:var(--content-primary-inverse)}.badge.size-xs{width:6px;height:6px;box-shadow:none;top
|
|
1281
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: BadgeComponent, isStandalone: true, selector: "rte-badge", inputs: { badgeType: { classPropertyName: "badgeType", publicName: "badgeType", isSignal: true, isRequired: false, transformFunction: null }, badgeSize: { classPropertyName: "badgeSize", publicName: "badgeSize", isSignal: true, isRequired: false, transformFunction: null }, badgeContent: { classPropertyName: "badgeContent", publicName: "badgeContent", isSignal: true, isRequired: false, transformFunction: null }, count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, simpleBadge: { classPropertyName: "simpleBadge", publicName: "simpleBadge", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"badge size-{{ badgeSize() }} type-{{ badgeType() }}\"\n data-testid=\"badge\"\n [attr.data-simple-badge]=\"simpleBadge()\"\n [ngClass]=\"{ hidden: !showBadge(), 'count-overflow': countOverflow() }\"\n>\n <rte-icon\n *ngIf=\"showIcon()\"\n class=\"badge-icon\"\n [name]=\"icon()\"\n [size]=\"iconSize()!\"\n />\n <span *ngIf=\"showText()\" class=\"badge-text\">\n {{ displayCount() }}\n </span>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:wght,FILL,GRAD@400,0,0&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap\";.badge{position:absolute;border-radius:999px;display:flex;align-items:center;justify-content:center;transition:opacity .15s ease-in-out;box-sizing:border-box}.badge.hidden{opacity:0}.badge.type-brand{box-shadow:0 2px 4px 0 var(--elevation-shadow-key-brand),0 0 2px 0 var(--elevation-shadow-ambient-brand);background:linear-gradient(0deg,var(--elevation-surface-shadow-2) 0%,var(--elevation-surface-shadow-2) 100%);background-color:var(--background-brand-default);color:var(--content-primary-inverse)}.badge.type-neutral{box-shadow:0 2px 4px 0 var(--elevation-shadow-key),0 0 2px 0 var(--elevation-shadow-ambient);background:linear-gradient(0deg,var(--elevation-surface-shadow-2) 0%,var(--elevation-surface-shadow-2) 100%);background-color:var(--background-neutral-regular-default);color:var(--content-secondary)}.badge.type-indicator{box-shadow:0 2px 4px 0 var(--elevation-shadow-key-brand),0 0 2px 0 var(--elevation-shadow-ambient-brand);background:linear-gradient(0deg,var(--elevation-surface-shadow-2) 0%,var(--elevation-surface-shadow-2) 100%);background-color:var(--background-danger-default);color:var(--content-primary-inverse)}.badge.size-xs{width:6px;height:6px;box-shadow:none;top:-3;right:-3}.badge.size-s{width:12px;height:12px;top:-6px;right:-6px}.badge.size-m{font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Arial;font-weight:700;font-size:12px;line-height:16px;letter-spacing:0px;min-width:16px;width:fit-content;height:16px;top:-8px;right:-8px;padding:0 2px}.badge.size-m.count-overflow{padding:0 4px}.badge.size-l{font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Arial;font-weight:700;font-size:16px;line-height:24px;letter-spacing:0px;min-width:24px;width:fit-content;height:24px;top:-12px;right:-12px;padding:0 4px}.badge.size-l.count-overflow{padding:0 6px}.badge[data-simple-badge=true]{position:static;box-shadow:none}.badge .badge-text{margin:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "rte-icon", inputs: ["name", "size", "color", "classes", "appearance"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1265
1282
|
}
|
|
1266
1283
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BadgeComponent, decorators: [{
|
|
1267
1284
|
type: Component,
|
|
1268
|
-
args: [{ selector: "rte-badge", imports: [CommonModule, IconComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"badge size-{{ badgeSize() }} type-{{ badgeType() }}\"\n data-testid=\"badge\"\n [attr.data-simple-badge]=\"simpleBadge()\"\n [ngClass]=\"{ hidden: !showBadge(), 'count-overflow': countOverflow() }\"\n>\n <rte-icon\n *ngIf=\"showIcon()\"\n class=\"badge-icon\"\n [name]=\"icon()\"\n [size]=\"iconSize()!\"\n />\n <span *ngIf=\"showText()\" class=\"badge-text\">\n {{ displayCount() }}\n </span>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:wght,FILL,GRAD@400,0,0&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap\";.badge{position:absolute;border-radius:999px;display:flex;align-items:center;justify-content:center;transition:opacity .15s ease-in-out;box-sizing:border-box}.badge.hidden{opacity:0}.badge.type-brand{box-shadow:0 2px 4px 0 var(--elevation-shadow-key-brand),0 0 2px 0 var(--elevation-shadow-ambient-brand);background:linear-gradient(0deg,var(--elevation-surface-shadow-2) 0%,var(--elevation-surface-shadow-2) 100%);background-color:var(--background-brand-default);color:var(--content-primary-inverse)}.badge.type-neutral{box-shadow:0 2px 4px 0 var(--elevation-shadow-key),0 0 2px 0 var(--elevation-shadow-ambient);background:linear-gradient(0deg,var(--elevation-surface-shadow-2) 0%,var(--elevation-surface-shadow-2) 100%);background-color:var(--background-neutral-regular-default);color:var(--content-secondary)}.badge.type-indicator{box-shadow:0 2px 4px 0 var(--elevation-shadow-key-brand),0 0 2px 0 var(--elevation-shadow-ambient-brand);background:linear-gradient(0deg,var(--elevation-surface-shadow-2) 0%,var(--elevation-surface-shadow-2) 100%);background-color:var(--background-danger-default);color:var(--content-primary-inverse)}.badge.size-xs{width:6px;height:6px;box-shadow:none;top
|
|
1285
|
+
args: [{ selector: "rte-badge", imports: [CommonModule, IconComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"badge size-{{ badgeSize() }} type-{{ badgeType() }}\"\n data-testid=\"badge\"\n [attr.data-simple-badge]=\"simpleBadge()\"\n [ngClass]=\"{ hidden: !showBadge(), 'count-overflow': countOverflow() }\"\n>\n <rte-icon\n *ngIf=\"showIcon()\"\n class=\"badge-icon\"\n [name]=\"icon()\"\n [size]=\"iconSize()!\"\n />\n <span *ngIf=\"showText()\" class=\"badge-text\">\n {{ displayCount() }}\n </span>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:wght,FILL,GRAD@400,0,0&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap\";.badge{position:absolute;border-radius:999px;display:flex;align-items:center;justify-content:center;transition:opacity .15s ease-in-out;box-sizing:border-box}.badge.hidden{opacity:0}.badge.type-brand{box-shadow:0 2px 4px 0 var(--elevation-shadow-key-brand),0 0 2px 0 var(--elevation-shadow-ambient-brand);background:linear-gradient(0deg,var(--elevation-surface-shadow-2) 0%,var(--elevation-surface-shadow-2) 100%);background-color:var(--background-brand-default);color:var(--content-primary-inverse)}.badge.type-neutral{box-shadow:0 2px 4px 0 var(--elevation-shadow-key),0 0 2px 0 var(--elevation-shadow-ambient);background:linear-gradient(0deg,var(--elevation-surface-shadow-2) 0%,var(--elevation-surface-shadow-2) 100%);background-color:var(--background-neutral-regular-default);color:var(--content-secondary)}.badge.type-indicator{box-shadow:0 2px 4px 0 var(--elevation-shadow-key-brand),0 0 2px 0 var(--elevation-shadow-ambient-brand);background:linear-gradient(0deg,var(--elevation-surface-shadow-2) 0%,var(--elevation-surface-shadow-2) 100%);background-color:var(--background-danger-default);color:var(--content-primary-inverse)}.badge.size-xs{width:6px;height:6px;box-shadow:none;top:-3;right:-3}.badge.size-s{width:12px;height:12px;top:-6px;right:-6px}.badge.size-m{font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Arial;font-weight:700;font-size:12px;line-height:16px;letter-spacing:0px;min-width:16px;width:fit-content;height:16px;top:-8px;right:-8px;padding:0 2px}.badge.size-m.count-overflow{padding:0 4px}.badge.size-l{font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Arial;font-weight:700;font-size:16px;line-height:24px;letter-spacing:0px;min-width:24px;width:fit-content;height:24px;top:-12px;right:-12px;padding:0 4px}.badge.size-l.count-overflow{padding:0 6px}.badge[data-simple-badge=true]{position:static;box-shadow:none}.badge .badge-text{margin:0}\n"] }]
|
|
1269
1286
|
}] });
|
|
1270
1287
|
|
|
1271
1288
|
class BadgeDirective {
|
|
@@ -1335,7 +1352,7 @@ class IconButtonComponent {
|
|
|
1335
1352
|
this.badgeContent = input();
|
|
1336
1353
|
this.badgeType = input();
|
|
1337
1354
|
this.badgeIcon = input("settings");
|
|
1338
|
-
this.buttonIconSize = computed(() =>
|
|
1355
|
+
this.buttonIconSize = computed(() => ButtonIconSize[this.size()]);
|
|
1339
1356
|
this.isValidIconName = computed(() => isValidIconName(this.name()));
|
|
1340
1357
|
this.click = output();
|
|
1341
1358
|
this.shouldDisplayBadge = computed(() => {
|
|
@@ -1374,7 +1391,7 @@ class IconButtonToggleComponent {
|
|
|
1374
1391
|
this.isSelected = computed(() => {
|
|
1375
1392
|
return this.isControlled() ? this.selected() : this.internalSelected();
|
|
1376
1393
|
});
|
|
1377
|
-
this.buttonIconSize = computed(() =>
|
|
1394
|
+
this.buttonIconSize = computed(() => ButtonIconSize[this.size()]);
|
|
1378
1395
|
}
|
|
1379
1396
|
toggleInternalSelectedState() {
|
|
1380
1397
|
this.internalSelected.set(!this.internalSelected());
|
|
@@ -1833,18 +1850,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1833
1850
|
|
|
1834
1851
|
class BannerComponent {
|
|
1835
1852
|
constructor() {
|
|
1836
|
-
this.type = input("
|
|
1853
|
+
this.type = input("info");
|
|
1837
1854
|
this.message = input.required();
|
|
1838
1855
|
this.position = input("push");
|
|
1839
1856
|
this.title = input();
|
|
1840
1857
|
this.closable = input(false);
|
|
1841
|
-
this.showIcon = input(false);
|
|
1842
1858
|
this.isOpen = input(true);
|
|
1843
1859
|
this.actionLabel = input();
|
|
1844
1860
|
this.click = output();
|
|
1845
1861
|
this.visible = signal(false);
|
|
1846
1862
|
this.rendering = signal(false);
|
|
1847
1863
|
this.close = output();
|
|
1864
|
+
this.iconTypeMap = {
|
|
1865
|
+
info: "info",
|
|
1866
|
+
error: "dangerous",
|
|
1867
|
+
success: "check-circle",
|
|
1868
|
+
warning: "warning",
|
|
1869
|
+
};
|
|
1870
|
+
this.iconName = computed(() => {
|
|
1871
|
+
return this.iconTypeMap[this.type()];
|
|
1872
|
+
});
|
|
1848
1873
|
}
|
|
1849
1874
|
ngOnInit() {
|
|
1850
1875
|
this.visible.set(this.isOpen());
|
|
@@ -1882,11 +1907,11 @@ class BannerComponent {
|
|
|
1882
1907
|
});
|
|
1883
1908
|
}
|
|
1884
1909
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BannerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1885
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: BannerComponent, isStandalone: true, selector: "rte-banner", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null },
|
|
1910
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: BannerComponent, isStandalone: true, selector: "rte-banner", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, actionLabel: { classPropertyName: "actionLabel", publicName: "actionLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { click: "click", close: "close" }, usesOnChanges: true, ngImport: i0, template: "<section\n *ngIf=\"rendering()\"\n class=\"rte-banner-container {{ type() }} {{ position() }}\"\n class=\"rte-banner\"\n [ngClass]=\"{ open: visible(), close: !visible() }\"\n [attr.role]=\"type() === 'error' ? 'alert' : 'status'\"\n>\n <div class=\"rte-banner-icon\">\n <rte-icon [name]=\"iconName()\" [size]=\"32\" />\n </div>\n <div class=\"rte-banner-content\">\n <span *ngIf=\"title()\" class=\"rte-banner-title\">{{ title() }}</span>\n <div *ngIf=\"message()\" class=\"rte-banner-message\">\n <span>{{ message() }}</span>\n </div>\n </div>\n <button\n *ngIf=\"actionLabel()\"\n rteButton\n rteButtonVariant=\"text\"\n rteButtonSize=\"s\"\n [attr.aria-label]=\"actionLabel()!\"\n (click)=\"clickAction()\"\n >\n {{ actionLabel() }}\n </button>\n <div *ngIf=\"closable()\" class=\"rte-banner-close-icon\">\n <rte-icon-button\n name=\"close\"\n variant=\"neutral\"\n ariaLabel=\"close banner\"\n (click)=\"closeBanner()\"\n />\n </div>\n</section>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:wght,FILL,GRAD@400,0,0&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap\";.rte-banner{box-shadow:0 8px 16px 0 var(--elevation-shadow-key),0 0 2px 0 var(--elevation-shadow-ambient);background:linear-gradient(0deg,var(--elevation-surface-shadow-4) 0%,var(--elevation-surface-shadow-4) 100%);padding:16px;gap:16px;align-self:stretch;border-radius:0 0 4px 4px;display:flex;box-sizing:border-box;width:100%;min-width:320px;justify-content:center;align-items:center;color:var(--content-info-default);top:0;left:0;opacity:0;transition:opacity .2s ease,transform .2s ease;z-index:10;border-bottom:8px solid var(--border-info);background-color:var(--background-default)}.rte-banner.error{color:var(--content-danger-default);border-bottom-color:var(--border-danger)}.rte-banner.success{color:var(--content-success-default);border-bottom-color:var(--border-success)}.rte-banner.warning{color:var(--content-primary);border-bottom-color:var(--border-warning)}.rte-banner.overlay{position:fixed}.rte-banner.open{opacity:1;transform:translateY(0)}.rte-banner.close{opacity:0;transform:translateY(-10px)}.rte-banner .rte-banner-icon{display:flex;padding:0 0 0 16px;justify-content:center;align-items:center;gap:var(--positive-spacing_0, 0);align-self:stretch}.rte-banner .banner-close-icon{color:var(--content-secondary)}.rte-banner .rte-banner-content{display:flex;padding:0 16px;flex-direction:column;align-items:flex-start;gap:8px;flex:1 0 0;border-radius:0;opacity:100%}.rte-banner .rte-banner-content .rte-banner-title{font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Nunito;font-weight:600;font-size:20px;line-height:28px;letter-spacing:-.5px}.rte-banner .rte-banner-content .rte-banner-action-button{width:max-content}.rte-banner .rte-banner-content .rte-banner-message{font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Arial;font-weight:400;font-size:14px;line-height:20px;letter-spacing:0px;color:var(--content-secondary);display:flex;align-items:center;gap:24px;padding:8px 0;justify-content:space-between;width:100%}.rte-banner .rte-banner-close-icon{color:var(--content-secondary)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "rte-icon", inputs: ["name", "size", "color", "classes", "appearance"] }, { kind: "component", type: IconButtonComponent, selector: "rte-icon-button", inputs: ["disabled", "name", "size", "variant", "type", "appearance", "compactSpacing", "ariaLabel", "ariaLabelledBy", "badgeCount", "badgeContent", "badgeType", "badgeIcon"], outputs: ["click"] }, { kind: "component", type: ButtonComponent, selector: "button[rteButton]", inputs: ["rteButtonVariant", "rteButtonSize", "rteBadgeCount", "rteBadgeContent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1886
1911
|
}
|
|
1887
1912
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BannerComponent, decorators: [{
|
|
1888
1913
|
type: Component,
|
|
1889
|
-
args: [{ selector: "rte-banner", imports: [CommonModule, IconComponent, IconButtonComponent, ButtonComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<section\n *ngIf=\"rendering()\"\n class=\"rte-banner-container {{ type() }} {{ position() }}\"\n [ngClass]=\"{ open: visible(), close: !visible() }\"\n [attr.role]=\"type() === '
|
|
1914
|
+
args: [{ selector: "rte-banner", imports: [CommonModule, IconComponent, IconButtonComponent, ButtonComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<section\n *ngIf=\"rendering()\"\n class=\"rte-banner-container {{ type() }} {{ position() }}\"\n class=\"rte-banner\"\n [ngClass]=\"{ open: visible(), close: !visible() }\"\n [attr.role]=\"type() === 'error' ? 'alert' : 'status'\"\n>\n <div class=\"rte-banner-icon\">\n <rte-icon [name]=\"iconName()\" [size]=\"32\" />\n </div>\n <div class=\"rte-banner-content\">\n <span *ngIf=\"title()\" class=\"rte-banner-title\">{{ title() }}</span>\n <div *ngIf=\"message()\" class=\"rte-banner-message\">\n <span>{{ message() }}</span>\n </div>\n </div>\n <button\n *ngIf=\"actionLabel()\"\n rteButton\n rteButtonVariant=\"text\"\n rteButtonSize=\"s\"\n [attr.aria-label]=\"actionLabel()!\"\n (click)=\"clickAction()\"\n >\n {{ actionLabel() }}\n </button>\n <div *ngIf=\"closable()\" class=\"rte-banner-close-icon\">\n <rte-icon-button\n name=\"close\"\n variant=\"neutral\"\n ariaLabel=\"close banner\"\n (click)=\"closeBanner()\"\n />\n </div>\n</section>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:wght,FILL,GRAD@400,0,0&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap\";.rte-banner{box-shadow:0 8px 16px 0 var(--elevation-shadow-key),0 0 2px 0 var(--elevation-shadow-ambient);background:linear-gradient(0deg,var(--elevation-surface-shadow-4) 0%,var(--elevation-surface-shadow-4) 100%);padding:16px;gap:16px;align-self:stretch;border-radius:0 0 4px 4px;display:flex;box-sizing:border-box;width:100%;min-width:320px;justify-content:center;align-items:center;color:var(--content-info-default);top:0;left:0;opacity:0;transition:opacity .2s ease,transform .2s ease;z-index:10;border-bottom:8px solid var(--border-info);background-color:var(--background-default)}.rte-banner.error{color:var(--content-danger-default);border-bottom-color:var(--border-danger)}.rte-banner.success{color:var(--content-success-default);border-bottom-color:var(--border-success)}.rte-banner.warning{color:var(--content-primary);border-bottom-color:var(--border-warning)}.rte-banner.overlay{position:fixed}.rte-banner.open{opacity:1;transform:translateY(0)}.rte-banner.close{opacity:0;transform:translateY(-10px)}.rte-banner .rte-banner-icon{display:flex;padding:0 0 0 16px;justify-content:center;align-items:center;gap:var(--positive-spacing_0, 0);align-self:stretch}.rte-banner .banner-close-icon{color:var(--content-secondary)}.rte-banner .rte-banner-content{display:flex;padding:0 16px;flex-direction:column;align-items:flex-start;gap:8px;flex:1 0 0;border-radius:0;opacity:100%}.rte-banner .rte-banner-content .rte-banner-title{font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Nunito;font-weight:600;font-size:20px;line-height:28px;letter-spacing:-.5px}.rte-banner .rte-banner-content .rte-banner-action-button{width:max-content}.rte-banner .rte-banner-content .rte-banner-message{font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Arial;font-weight:400;font-size:14px;line-height:20px;letter-spacing:0px;color:var(--content-secondary);display:flex;align-items:center;gap:24px;padding:8px 0;justify-content:space-between;width:100%}.rte-banner .rte-banner-close-icon{color:var(--content-secondary)}\n"] }]
|
|
1890
1915
|
}] });
|
|
1891
1916
|
|
|
1892
1917
|
class CardComponent {
|
|
@@ -2016,7 +2041,7 @@ class PopoverComponent {
|
|
|
2016
2041
|
this.clickSecondaryButton.emit();
|
|
2017
2042
|
}
|
|
2018
2043
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2019
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: PopoverComponent, isStandalone: true, selector: "rte-popover", inputs: { primaryButtonLabel: { classPropertyName: "primaryButtonLabel", publicName: "primaryButtonLabel", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: true, transformFunction: null }, alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, arrow: { classPropertyName: "arrow", publicName: "arrow", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, secondaryButtonLabel: { classPropertyName: "secondaryButtonLabel", publicName: "secondaryButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, coordinates: { classPropertyName: "coordinates", publicName: "coordinates", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clickPrimaryButton: "clickPrimaryButton", clickSecondaryButton: "clickSecondaryButton" }, ngImport: i0, template: "<div\n #root\n class=\"rte-popover\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.data-arrow]=\"arrow()\"\n [attr.data-position]=\"position()\"\n [attr.data-alignment]=\"alignment()\"\n [attr.data-open]=\"isOpen()\"\n [style]=\"{ top: coordinates().top + 'px', left: coordinates().left + 'px' }\"\n>\n <div class=\"popoverInner\">\n <div class=\"popoverContentContainer\">\n <div *ngIf=\"title\" class=\"popoverTitle\">{{ title() }}</div>\n <div class=\"popoverContent\">{{ content() }}</div>\n </div>\n <div class=\"popoverButtonContainer\">\n <button *ngIf=\"secondaryButtonLabel()\"\n rteButton\n rteButtonVariant=\"secondary\"\n (click)=\"handleClickSecondaryButton()\"\n >{{ secondaryButtonLabel() }}</button>\n <button rteButton\n rteButtonVariant=\"primary\"\n (click)=\"handleClickPrimaryButton()\"\n >{{ primaryButtonLabel() }}</button>\n </div>\n </div>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:wght,FILL,GRAD@400,0,0&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap\";.rte-popoverTrigger{position:relative;width:max-content}.rte-popover{position:absolute;pointer-events:auto;top:0;left:0;padding:0;display:flex;flex-direction:column;gap:0px;filter:drop-shadow(0 4px 8px rgba(0,0,0,.12)) drop-shadow(0 2px 4px rgba(0,0,0,.08));background-color:var(--background-default);transition:opacity .15s ease-out;opacity:0;z-index:1000;min-width:320px;max-width:600px;width:fit-content;height:fit-content}.rte-popover .popoverInner{display:flex;flex-direction:column;align-items:flex-start;padding:24px;gap:24px;border-radius:4px}.rte-popover .popoverInner .popoverContentContainer{display:flex;flex-direction:column;align-items:flex-start;padding:0;gap:16px}.rte-popover .popoverInner .popoverContentContainer .popoverTitle{overflow:hidden;text-overflow:ellipsis;color:var(--content-primary);font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Nunito;font-weight:600;font-size:24px;line-height:32px;letter-spacing:-.5px}.rte-popover .popoverInner .popoverContentContainer .popoverContent{color:var(--content-secondary);font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Arial;font-weight:400;font-size:14px;line-height:20px;letter-spacing:0px;width:100%;word-break:break-word}.rte-popover .popoverInner .popoverButtonContainer{display:flex;justify-content:flex-end;align-items:flex-start;padding:0;gap:24px;width:100%}.rte-popover:after{content:\"\";position:absolute;border-width:12px;border-style:solid}.rte-popover[data-position=top]:after{top:100%;left:50%;margin-left:-12px;border-color:var(--background-default) transparent transparent transparent}.rte-popover[data-position=top][data-alignment=start]:after{left:20px}.rte-popover[data-position=top][data-alignment=end]:after{left:auto;right:20px}.rte-popover[data-position=bottom]:after{bottom:100%;left:50%;margin-left:-12px;border-color:transparent transparent var(--background-default) transparent}.rte-popover[data-position=bottom][data-alignment=start]:after{left:20px}.rte-popover[data-position=bottom][data-alignment=end]:after{left:auto;right:20px}.rte-popover[data-position=left]:after{top:50%;left:100%;margin-top:-12px;border-color:transparent transparent transparent var(--background-default)}.rte-popover[data-position=left][data-alignment=start]:after{top:20px}.rte-popover[data-position=left][data-alignment=end]:after{top:auto;bottom:20px}.rte-popover[data-position=right]:after{top:50%;right:100%;margin-top:-12px;border-color:transparent var(--background-default) transparent transparent}.rte-popover[data-position=right][data-alignment=start]:after{top:20px}.rte-popover[data-position=right][data-alignment=end]:after{top:auto;bottom:20px}.rte-popover[data-arrow=false]:after{display:none}.rte-popover[data-open=true]{opacity:1}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[rteButton]", inputs: ["rteButtonVariant", "rteButtonSize"] }] }); }
|
|
2044
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: PopoverComponent, isStandalone: true, selector: "rte-popover", inputs: { primaryButtonLabel: { classPropertyName: "primaryButtonLabel", publicName: "primaryButtonLabel", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: true, transformFunction: null }, alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, arrow: { classPropertyName: "arrow", publicName: "arrow", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, secondaryButtonLabel: { classPropertyName: "secondaryButtonLabel", publicName: "secondaryButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, coordinates: { classPropertyName: "coordinates", publicName: "coordinates", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clickPrimaryButton: "clickPrimaryButton", clickSecondaryButton: "clickSecondaryButton" }, ngImport: i0, template: "<div\n #root\n class=\"rte-popover\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.data-arrow]=\"arrow()\"\n [attr.data-position]=\"position()\"\n [attr.data-alignment]=\"alignment()\"\n [attr.data-open]=\"isOpen()\"\n [style]=\"{ top: coordinates().top + 'px', left: coordinates().left + 'px' }\"\n>\n <div class=\"popoverInner\">\n <div class=\"popoverContentContainer\">\n <div *ngIf=\"title\" class=\"popoverTitle\">{{ title() }}</div>\n <div class=\"popoverContent\">{{ content() }}</div>\n </div>\n <div class=\"popoverButtonContainer\">\n <button *ngIf=\"secondaryButtonLabel()\"\n rteButton\n rteButtonVariant=\"secondary\"\n (click)=\"handleClickSecondaryButton()\"\n >{{ secondaryButtonLabel() }}</button>\n <button rteButton\n rteButtonVariant=\"primary\"\n (click)=\"handleClickPrimaryButton()\"\n >{{ primaryButtonLabel() }}</button>\n </div>\n </div>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:wght,FILL,GRAD@400,0,0&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap\";.rte-popoverTrigger{position:relative;width:max-content}.rte-popover{position:absolute;pointer-events:auto;top:0;left:0;padding:0;display:flex;flex-direction:column;gap:0px;filter:drop-shadow(0 4px 8px rgba(0,0,0,.12)) drop-shadow(0 2px 4px rgba(0,0,0,.08));background-color:var(--background-default);transition:opacity .15s ease-out;opacity:0;z-index:1000;min-width:320px;max-width:600px;width:fit-content;height:fit-content}.rte-popover .popoverInner{display:flex;flex-direction:column;align-items:flex-start;padding:24px;gap:24px;border-radius:4px}.rte-popover .popoverInner .popoverContentContainer{display:flex;flex-direction:column;align-items:flex-start;padding:0;gap:16px}.rte-popover .popoverInner .popoverContentContainer .popoverTitle{overflow:hidden;text-overflow:ellipsis;color:var(--content-primary);font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Nunito;font-weight:600;font-size:24px;line-height:32px;letter-spacing:-.5px}.rte-popover .popoverInner .popoverContentContainer .popoverContent{color:var(--content-secondary);font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Arial;font-weight:400;font-size:14px;line-height:20px;letter-spacing:0px;width:100%;word-break:break-word}.rte-popover .popoverInner .popoverButtonContainer{display:flex;justify-content:flex-end;align-items:flex-start;padding:0;gap:24px;width:100%}.rte-popover:after{content:\"\";position:absolute;border-width:12px;border-style:solid}.rte-popover[data-position=top]:after{top:100%;left:50%;margin-left:-12px;border-color:var(--background-default) transparent transparent transparent}.rte-popover[data-position=top][data-alignment=start]:after{left:20px}.rte-popover[data-position=top][data-alignment=end]:after{left:auto;right:20px}.rte-popover[data-position=bottom]:after{bottom:100%;left:50%;margin-left:-12px;border-color:transparent transparent var(--background-default) transparent}.rte-popover[data-position=bottom][data-alignment=start]:after{left:20px}.rte-popover[data-position=bottom][data-alignment=end]:after{left:auto;right:20px}.rte-popover[data-position=left]:after{top:50%;left:100%;margin-top:-12px;border-color:transparent transparent transparent var(--background-default)}.rte-popover[data-position=left][data-alignment=start]:after{top:20px}.rte-popover[data-position=left][data-alignment=end]:after{top:auto;bottom:20px}.rte-popover[data-position=right]:after{top:50%;right:100%;margin-top:-12px;border-color:transparent var(--background-default) transparent transparent}.rte-popover[data-position=right][data-alignment=start]:after{top:20px}.rte-popover[data-position=right][data-alignment=end]:after{top:auto;bottom:20px}.rte-popover[data-arrow=false]:after{display:none}.rte-popover[data-open=true]{opacity:1}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[rteButton]", inputs: ["rteButtonVariant", "rteButtonSize", "rteBadgeCount", "rteBadgeContent"] }] }); }
|
|
2020
2045
|
}
|
|
2021
2046
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PopoverComponent, decorators: [{
|
|
2022
2047
|
type: Component,
|
|
@@ -2627,9 +2652,166 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2627
2652
|
args: [{ selector: "rte-side-nav", imports: [CommonModule, BaseSideNavComponent, DividerComponent, NavItemComponent, NavMenuComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<rte-base-side-nav\n [size]=\"size()\"\n [collapsed]=\"isCollapsed()\"\n [appearance]=\"appearance()\">\n <div side-nav-header>\n <div class=\"side-nav-header-container\">\n <div class=\"side-nav-header {{appearance()}}\" [ngClass]=\"{ collapsed: isCollapsed() }\">\n @if (headerConfig()?.link) {\n <a\n class=\"side-nav-header-title-container\"\n [href]=\"headerConfig()!.link!\"\n [attr.aria-label]=\"headerConfig()?.ariaLabel\"\n (click)=\"handleHeaderClick()\">\n <div class=\"side-nav-header-title\">\n <div class=\"side-nav-header-identifier\">{{ headerConfig()?.identifier }}</div>\n @if (!isCollapsed()) {\n <h1 [ngClass]=\"{ 'hidden': !shouldShowTitle() }\">{{ headerConfig()?.title }}</h1>\n }\n </div>\n </a>\n } @else if (headerConfig()?.onClick) {\n <div\n class=\"side-nav-header-title-container\"\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-label]=\"headerConfig()?.ariaLabel\"\n (click)=\"handleHeaderClick()\"\n (keydown)=\"handleHeaderKeyDown($event)\">\n <div class=\"side-nav-header-title\">\n <div class=\"side-nav-header-identifier\">{{ headerConfig()?.identifier }}</div>\n @if (!isCollapsed()) {\n <h1 [ngClass]=\"{ 'hidden': !shouldShowTitle() }\">{{ headerConfig()?.title }}</h1>\n }\n </div>\n </div>\n } @else {\n <div class=\"side-nav-header-title-container\">\n <div class=\"side-nav-header-title\">\n <div class=\"side-nav-header-identifier\">{{ headerConfig()?.identifier }}</div>\n @if (!isCollapsed()) {\n <h1 [ngClass]=\"{ 'hidden': !shouldShowTitle() }\">{{ headerConfig()?.title }}</h1>\n }\n </div>\n </div>\n }\n <div class=\"side-nav-header-version\" [ngClass]=\"{ 'hidden': !shouldShowTitle() }\">\n <span>{{ headerConfig()?.version }}</span>\n </div>\n </div>\n <rte-divider [appearance]=\"dividerAppearance()\"/>\n </div>\n </div>\n <div side-nav-body>\n <div class=\"side-nav-body\">\n <ul>\n @for (item of items(); track item.label) {\n @if (hasNestedItems(item)) {\n <rte-nav-menu\n [id]=\"item.id\"\n [label]=\"item.label\"\n [icon]=\"item.icon\"\n [showIcon]=\"item.showIcon ?? true\"\n [collapsed]=\"isCollapsed()\"\n [link]=\"item.link\"\n [open]=\"item.open\"\n [items]=\"item.items || []\"\n [appearance]=\"appearance()\"\n [badge]=\"item.badge\"\n [showDivider]=\"item.showDivider!\"\n (openChange)=\"handleMenuOpenChange($event)\"\n />\n } @else {\n <li>\n <rte-nav-item\n [id]=\"item.id\"\n [label]=\"item.label\"\n [icon]=\"item.icon\"\n [showIcon]=\"item.showIcon ?? true\"\n [collapsed]=\"isCollapsed()\"\n [link]=\"item.link\"\n [appearance]=\"appearance()\"\n [active]=\"item.active ?? false\"\n [badge]=\"item.badge\"\n (itemClick)=\"handleItemClick(item.id || item.label)\"></rte-nav-item>\n </li>\n @if (item.showDivider) {\n <rte-divider [appearance]=\"dividerAppearance()\" />\n }\n }\n }\n </ul>\n </div>\n </div>\n @if (footerItems()?.length || collapsible()) {\n <div side-nav-footer>\n <div class=\"side-nav-footer-container\">\n @if (footerItems()?.length) {\n <div class=\"side-nav-footer-items\">\n <ul>\n @for (item of footerItems()!; track item.id || item.label) {\n @if (hasNestedItems(item)) {\n <rte-nav-menu\n [id]=\"item.id\"\n [label]=\"item.label\"\n [icon]=\"item.icon\"\n [showIcon]=\"item.showIcon ?? true\"\n [collapsed]=\"isCollapsed()\"\n [link]=\"item.link\"\n [open]=\"item.open\"\n [items]=\"item.items || []\"\n [appearance]=\"appearance()\"\n [badge]=\"item.badge\"\n [showDivider]=\"item.showDivider!\"\n (openChange)=\"handleFooterMenuOpenChange($event)\"\n />\n } @else {\n <li>\n <rte-nav-item\n [id]=\"item.id\"\n [label]=\"item.label\"\n [icon]=\"item.icon\"\n [showIcon]=\"item.showIcon ?? true\"\n [collapsed]=\"isCollapsed()\"\n [link]=\"item.link\"\n [appearance]=\"appearance()\"\n [active]=\"item.active ?? false\"\n [badge]=\"item.badge\"\n (itemClick)=\"handleFooterItemClick(item.id || item.label)\"></rte-nav-item>\n </li>\n @if (item.showDivider) {\n <rte-divider [appearance]=\"dividerAppearance()\" />\n }\n }\n }\n </ul>\n </div>\n }\n <rte-divider [appearance]=\"dividerAppearance()\"/>\n @if (collapsible()) {\n <div class=\"side-nav-footer\">\n <div class=\"collapsible-section\">\n <ul>\n <li>\n <rte-nav-item\n [label]=\"isCollapsed() ? 'Ouvrir le menu' : 'R\u00E9duire le menu'\"\n [icon]=\"collapseIcon()\"\n [collapsed]=\"isCollapsed()\"\n [appearance]=\"appearance()\"\n (itemClick)=\"handleCollapseClick()\"\n />\n </li>\n </ul>\n </div>\n </div>\n }\n </div>\n </div>\n }\n <div side-nav-content>\n <ng-content select=\"[content]\"></ng-content>\n </div>\n</rte-base-side-nav>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:wght,FILL,GRAD@400,0,0&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap\";.side-nav-header-container{display:flex;padding:4px;flex-direction:column;justify-content:center;align-items:flex-start;flex-shrink:0;align-self:stretch;height:120px;min-height:120px;max-height:120px}.side-nav-header-container.collapsed{align-items:center;justify-content:center;padding:4px}.side-nav-header{display:flex;position:relative;padding:20px 8px;flex-direction:column;align-items:flex-start;gap:4px;flex:1 0 0;align-self:stretch;height:120px;transition:opacity .3s}.side-nav-header.collapsed{padding:8px;justify-content:center;align-items:center;flex:1 0 0;align-self:stretch}.side-nav-header.collapsed .side-nav-header-title-container{padding:8px;justify-content:center;align-items:center;flex-grow:0;gap:0;align-self:auto}.side-nav-header.collapsed .side-nav-header-title-container .side-nav-header-title{gap:0}.side-nav-header.neutral .side-nav-header-title-container[href]:hover,.side-nav-header.neutral .side-nav-header-title-container[role=button]:hover{background:var(--background-neutral-navigation-hover);box-shadow:0 1px 2px 0 var(--elevation-shadow-key),0 0 2px 0 var(--elevation-shadow-ambient)}.side-nav-header .side-nav-header-title-container{display:flex;padding:0 8px;align-items:center;gap:8px;flex:1 0 0;align-self:stretch;text-decoration:none;color:inherit}.side-nav-header .side-nav-header-title-container[href],.side-nav-header .side-nav-header-title-container[role=button]{cursor:pointer}.side-nav-header .side-nav-header-title-container[href]:hover,.side-nav-header .side-nav-header-title-container[role=button]:hover{border-radius:4px;opacity:100%;background:var(--background-brand-navigation-hover)}.side-nav-header .side-nav-header-title-container .side-nav-header-title{display:flex;align-items:center;gap:8px}.side-nav-header .side-nav-header-title-container .side-nav-header-title .side-nav-header-identifier{font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Arial;font-weight:700;font-size:12px;line-height:16px;letter-spacing:0px;display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1 0 0;align-self:stretch;color:var(--content-brand-navigation-default);text-align:center;-webkit-user-select:none;user-select:none;border-radius:4px;background:var(--background-brand-navigation-pressed);min-width:24px;height:24px}.side-nav-header .side-nav-header-title-container .side-nav-header-title h1{font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Nunito;font-weight:600;font-size:16px;line-height:24px;letter-spacing:-.5px;-webkit-user-select:none;user-select:none;align-self:stretch;margin:0;transition:opacity .3s}.side-nav-header .side-nav-header-title-container .side-nav-header-title h1.hidden{opacity:0;max-height:0;padding:0;margin:0}.side-nav-header .side-nav-header-version{display:flex;position:absolute;bottom:4px;right:8px;flex-direction:column;justify-content:flex-end;align-items:flex-end;gap:0px;align-self:stretch;font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Arial;font-weight:400;font-size:10px;line-height:14px;letter-spacing:0px;transition:opacity .3s,max-height .3s;max-height:50px;overflow:hidden;opacity:1}.side-nav-header .side-nav-header-version.hidden{opacity:0;max-height:0;padding:0;margin:0}.side-nav-body{display:flex;padding:16px 8px;flex-direction:column;align-items:flex-start;gap:8px;flex:1 0 0;overflow-x:hidden;overflow-y:auto;width:100%;box-sizing:border-box}.side-nav-body ul{list-style:none;padding:0;margin:0;width:100%;box-sizing:border-box;display:flex;flex-direction:column;gap:8px}.side-nav-footer-container{padding:8px}.side-nav-footer-container .side-nav-footer{display:flex;flex-direction:column;align-items:center;justify-content:space-between;box-sizing:border-box;width:100%;margin-top:4px}.side-nav-footer-items{display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%;box-sizing:border-box;margin-bottom:8px}.side-nav-footer-items ul{list-style:none;padding:0;margin:0;width:100%;box-sizing:border-box}.collapsible-section{display:flex;padding:4px 0;flex-direction:column;align-items:flex-start;align-self:stretch}.collapsible-section ul{list-style:none;padding:0;margin:0;width:100%;box-sizing:border-box}\n"] }]
|
|
2628
2653
|
}], ctorParameters: () => [] });
|
|
2629
2654
|
|
|
2655
|
+
class ToastComponent {
|
|
2656
|
+
constructor() {
|
|
2657
|
+
this.id = input("");
|
|
2658
|
+
this.message = input("");
|
|
2659
|
+
this.type = input("info");
|
|
2660
|
+
this.duration = input("medium");
|
|
2661
|
+
this.isOpen = input(false);
|
|
2662
|
+
this.placement = input("bottom-right");
|
|
2663
|
+
this.closable = input(true);
|
|
2664
|
+
this.autoDismiss = input(true);
|
|
2665
|
+
this.showActionButton = input(true);
|
|
2666
|
+
this.iconName = input("");
|
|
2667
|
+
this.showLeftIcon = input(true);
|
|
2668
|
+
this.actionButtonLabel = input("");
|
|
2669
|
+
this.onActionButtonClick = input(() => { });
|
|
2670
|
+
this.close = output();
|
|
2671
|
+
this.displayCustomIcon = computed(() => {
|
|
2672
|
+
console.log("iconName", this.iconName());
|
|
2673
|
+
return this.showLeftIcon() && !!this.iconName();
|
|
2674
|
+
});
|
|
2675
|
+
this.displayLeftIcon = computed(() => {
|
|
2676
|
+
return this.showLeftIcon() && IconTypeMap[this.type()];
|
|
2677
|
+
});
|
|
2678
|
+
this.displayActionButton = computed(() => {
|
|
2679
|
+
return this.showActionButton() && this.actionButtonLabel() && !!this.onActionButtonClick();
|
|
2680
|
+
});
|
|
2681
|
+
this.position = computed(() => this.placement()?.split("-")[0]);
|
|
2682
|
+
this.alignment = computed(() => this.placement()?.split("-")[1]);
|
|
2683
|
+
this.visible = signal(false);
|
|
2684
|
+
this.defaultIconName = computed(() => IconTypeMap[this.type()]);
|
|
2685
|
+
this.iconSize = IconSize["xl"];
|
|
2686
|
+
}
|
|
2687
|
+
onClickActionButton() {
|
|
2688
|
+
const action = this.onActionButtonClick();
|
|
2689
|
+
if (action) {
|
|
2690
|
+
action();
|
|
2691
|
+
}
|
|
2692
|
+
}
|
|
2693
|
+
clickCloseButton() {
|
|
2694
|
+
this.close.emit();
|
|
2695
|
+
}
|
|
2696
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2697
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ToastComponent, isStandalone: true, selector: "rte-toast", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, autoDismiss: { classPropertyName: "autoDismiss", publicName: "autoDismiss", isSignal: true, isRequired: false, transformFunction: null }, showActionButton: { classPropertyName: "showActionButton", publicName: "showActionButton", isSignal: true, isRequired: false, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: false, transformFunction: null }, showLeftIcon: { classPropertyName: "showLeftIcon", publicName: "showLeftIcon", isSignal: true, isRequired: false, transformFunction: null }, actionButtonLabel: { classPropertyName: "actionButtonLabel", publicName: "actionButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, onActionButtonClick: { classPropertyName: "onActionButtonClick", publicName: "onActionButtonClick", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close" }, ngImport: i0, template: "<div\n class=\"rte-toast {{ type() }} {{ position() }} {{ alignment() }}\"\n role=\"status\"\n ref=\"{ref}\"\n [ngClass]=\"{ open: isOpen() }\"\n>\n <div class=\"rte-toast-content\">\n @if (displayLeftIcon()) {\n <rte-icon\n class=\"rte-toast-icon\"\n aria-hidden=\"true\"\n [name]=\"defaultIconName()\"\n [size]=\"iconSize\"\n />\n } @else {\n @if (displayCustomIcon()) {\n <rte-icon\n class=\"rte-toast-icon\"\n aria-hidden=\"true\"\n [name]=\"iconName()!\"\n [size]=\"iconSize\"\n />\n }\n }\n <span class=\"rte-toast-message\">{{ message() }}</span>\n </div>\n @if (displayActionButton()) {\n <button\n rteButton\n rteButtonVariant=\"text\"\n class=\"rte-toast-action-button\"\n (click)=\"onClickActionButton()\"\n >\n {{ actionButtonLabel() }}\n </button>\n }\n @if (closable()) {\n <rte-icon-button\n name=\"close\"\n [attr.data-testid]=\"'toast-close-button'\"\n [variant]=\"type() === 'neutral' ? 'reverse' : 'neutral'\"\n (click)=\"clickCloseButton()\"\n />\n }\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:wght,FILL,GRAD@400,0,0&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap\";.rte-toast{box-shadow:0 2px 4px 0 var(--elevation-shadow-key),0 0 2px 0 var(--elevation-shadow-ambient);background:linear-gradient(0deg,var(--elevation-surface-shadow-2) 0%,var(--elevation-surface-shadow-2) 100%);display:flex;width:400px;min-width:240px;max-width:336px;padding:8px 4px 8px 16px;align-items:center;border-radius:4px;border-bottom:4px solid var(--border-info);color:var(--content-primary);background-color:var(--background-default);z-index:10;position:fixed;inset:auto;opacity:0;transition:opacity .3s ease,transform .2s ease}.rte-toast.top{top:12px}.rte-toast.bottom{bottom:12px}.rte-toast.bottom.center{left:50%;transform:translate(-50%,10px)}.rte-toast.bottom.center.open{opacity:1;transform:translate(-50%)}.rte-toast.left{left:12px;transform:translate(-10px)}.rte-toast.left.open{opacity:1;transform:translate(0)}.rte-toast.right{right:12px;transform:translate(10px)}.rte-toast.right.open{opacity:1;transform:translate(0)}.rte-toast .rte-toast-message{font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Arial;font-weight:400;font-size:12px;line-height:16px;letter-spacing:0px;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;width:100%;-webkit-line-clamp:2;line-clamp:2}.rte-toast .rte-toast-icon{flex:1 0 auto}.rte-toast .rte-toast-content{display:flex;align-items:center;gap:12px;flex-grow:1;overflow:hidden;width:100%}.rte-toast.info{border-bottom-color:var(--border-info)}.rte-toast.info .rte-toast-icon{color:var(--content-info-default)}.rte-toast.error{border-bottom-color:var(--border-danger)}.rte-toast.error .rte-toast-icon{color:var(--content-danger-default)}.rte-toast.success{border-bottom-color:var(--border-success)}.rte-toast.success .rte-toast-icon{color:var(--content-success-default)}.rte-toast.warning{border-bottom-color:var(--border-warning)}.rte-toast.warning .rte-toast-icon{color:var(--content-warning-default)}.rte-toast.neutral{background-color:var(--background-inverse);color:var(--content-primary-inverse);border-bottom-color:var(--border-primary)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconComponent, selector: "rte-icon", inputs: ["name", "size", "color", "classes", "appearance"] }, { kind: "component", type: IconButtonComponent, selector: "rte-icon-button", inputs: ["disabled", "name", "size", "variant", "type", "appearance", "compactSpacing", "ariaLabel", "ariaLabelledBy", "badgeCount", "badgeContent", "badgeType", "badgeIcon"], outputs: ["click"] }, { kind: "component", type: ButtonComponent, selector: "button[rteButton]", inputs: ["rteButtonVariant", "rteButtonSize", "rteBadgeCount", "rteBadgeContent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2698
|
+
}
|
|
2699
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToastComponent, decorators: [{
|
|
2700
|
+
type: Component,
|
|
2701
|
+
args: [{ selector: "rte-toast", imports: [CommonModule, IconComponent, IconButtonComponent, ButtonComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"rte-toast {{ type() }} {{ position() }} {{ alignment() }}\"\n role=\"status\"\n ref=\"{ref}\"\n [ngClass]=\"{ open: isOpen() }\"\n>\n <div class=\"rte-toast-content\">\n @if (displayLeftIcon()) {\n <rte-icon\n class=\"rte-toast-icon\"\n aria-hidden=\"true\"\n [name]=\"defaultIconName()\"\n [size]=\"iconSize\"\n />\n } @else {\n @if (displayCustomIcon()) {\n <rte-icon\n class=\"rte-toast-icon\"\n aria-hidden=\"true\"\n [name]=\"iconName()!\"\n [size]=\"iconSize\"\n />\n }\n }\n <span class=\"rte-toast-message\">{{ message() }}</span>\n </div>\n @if (displayActionButton()) {\n <button\n rteButton\n rteButtonVariant=\"text\"\n class=\"rte-toast-action-button\"\n (click)=\"onClickActionButton()\"\n >\n {{ actionButtonLabel() }}\n </button>\n }\n @if (closable()) {\n <rte-icon-button\n name=\"close\"\n [attr.data-testid]=\"'toast-close-button'\"\n [variant]=\"type() === 'neutral' ? 'reverse' : 'neutral'\"\n (click)=\"clickCloseButton()\"\n />\n }\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:wght,FILL,GRAD@400,0,0&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap\";.rte-toast{box-shadow:0 2px 4px 0 var(--elevation-shadow-key),0 0 2px 0 var(--elevation-shadow-ambient);background:linear-gradient(0deg,var(--elevation-surface-shadow-2) 0%,var(--elevation-surface-shadow-2) 100%);display:flex;width:400px;min-width:240px;max-width:336px;padding:8px 4px 8px 16px;align-items:center;border-radius:4px;border-bottom:4px solid var(--border-info);color:var(--content-primary);background-color:var(--background-default);z-index:10;position:fixed;inset:auto;opacity:0;transition:opacity .3s ease,transform .2s ease}.rte-toast.top{top:12px}.rte-toast.bottom{bottom:12px}.rte-toast.bottom.center{left:50%;transform:translate(-50%,10px)}.rte-toast.bottom.center.open{opacity:1;transform:translate(-50%)}.rte-toast.left{left:12px;transform:translate(-10px)}.rte-toast.left.open{opacity:1;transform:translate(0)}.rte-toast.right{right:12px;transform:translate(10px)}.rte-toast.right.open{opacity:1;transform:translate(0)}.rte-toast .rte-toast-message{font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Arial;font-weight:400;font-size:12px;line-height:16px;letter-spacing:0px;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;width:100%;-webkit-line-clamp:2;line-clamp:2}.rte-toast .rte-toast-icon{flex:1 0 auto}.rte-toast .rte-toast-content{display:flex;align-items:center;gap:12px;flex-grow:1;overflow:hidden;width:100%}.rte-toast.info{border-bottom-color:var(--border-info)}.rte-toast.info .rte-toast-icon{color:var(--content-info-default)}.rte-toast.error{border-bottom-color:var(--border-danger)}.rte-toast.error .rte-toast-icon{color:var(--content-danger-default)}.rte-toast.success{border-bottom-color:var(--border-success)}.rte-toast.success .rte-toast-icon{color:var(--content-success-default)}.rte-toast.warning{border-bottom-color:var(--border-warning)}.rte-toast.warning .rte-toast-icon{color:var(--content-warning-default)}.rte-toast.neutral{background-color:var(--background-inverse);color:var(--content-primary-inverse);border-bottom-color:var(--border-primary)}\n"] }]
|
|
2702
|
+
}] });
|
|
2703
|
+
|
|
2704
|
+
class ToastService {
|
|
2705
|
+
constructor() {
|
|
2706
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
|
2707
|
+
this.currentOpenedToastRef = null;
|
|
2708
|
+
this.toastQueue = signal([]);
|
|
2709
|
+
this.overlayService = inject(OverlayService);
|
|
2710
|
+
effect(() => {
|
|
2711
|
+
const toastToOpen = this.toastQueue()[0];
|
|
2712
|
+
if (!toastToOpen) {
|
|
2713
|
+
this.currentOpenedToastRef = null;
|
|
2714
|
+
return;
|
|
2715
|
+
}
|
|
2716
|
+
if (this.currentOpenedToastRef?.instance.id() === toastToOpen.instance.id()) {
|
|
2717
|
+
return;
|
|
2718
|
+
}
|
|
2719
|
+
else {
|
|
2720
|
+
if (this.currentOpenedToastRef) {
|
|
2721
|
+
this.currentOpenedToastRef.setInput("isOpen", false);
|
|
2722
|
+
}
|
|
2723
|
+
}
|
|
2724
|
+
this.overlayService.addToOverlay(toastToOpen);
|
|
2725
|
+
requestAnimationFrame(() => {
|
|
2726
|
+
requestAnimationFrame(() => {
|
|
2727
|
+
toastToOpen.setInput("isOpen", true);
|
|
2728
|
+
this.currentOpenedToastRef = toastToOpen;
|
|
2729
|
+
});
|
|
2730
|
+
});
|
|
2731
|
+
});
|
|
2732
|
+
}
|
|
2733
|
+
getAllToasts() {
|
|
2734
|
+
return this.toastQueue();
|
|
2735
|
+
}
|
|
2736
|
+
getCurrentOpenedToast() {
|
|
2737
|
+
return this.currentOpenedToastRef;
|
|
2738
|
+
}
|
|
2739
|
+
isInQueue(toastId) {
|
|
2740
|
+
return this.toastQueue().some((toast) => toast.instance.id() === toastId);
|
|
2741
|
+
}
|
|
2742
|
+
addToQueue(config) {
|
|
2743
|
+
const toast = this.build(config);
|
|
2744
|
+
toast.instance.close.subscribe(() => {
|
|
2745
|
+
this.removeFromQueue(toast.instance.id());
|
|
2746
|
+
});
|
|
2747
|
+
this.toastQueue.update((list) => [...list, toast].sort((a, b) => {
|
|
2748
|
+
const priorityA = getToastPriority({
|
|
2749
|
+
hasActionButton: a.instance.showActionButton(),
|
|
2750
|
+
type: a.instance.type(),
|
|
2751
|
+
});
|
|
2752
|
+
const priorityB = getToastPriority({
|
|
2753
|
+
hasActionButton: b.instance.showActionButton(),
|
|
2754
|
+
type: b.instance.type(),
|
|
2755
|
+
});
|
|
2756
|
+
return priorityA - priorityB;
|
|
2757
|
+
}));
|
|
2758
|
+
return toast.instance.id();
|
|
2759
|
+
}
|
|
2760
|
+
removeFromQueue(toastId) {
|
|
2761
|
+
if (this.toastQueue().length === 0)
|
|
2762
|
+
return;
|
|
2763
|
+
if (this.toastQueue().length === 1 && this.toastQueue()[0].instance.id() === toastId) {
|
|
2764
|
+
const onlyToast = this.toastQueue()[0];
|
|
2765
|
+
this.toastQueue.set([]);
|
|
2766
|
+
onlyToast.setInput("isOpen", false);
|
|
2767
|
+
this.waitExitAnimation(onlyToast, () => {
|
|
2768
|
+
onlyToast.destroy();
|
|
2769
|
+
});
|
|
2770
|
+
return;
|
|
2771
|
+
}
|
|
2772
|
+
const toastToHide = this.toastQueue().find((toast) => toast.instance.id() === toastId);
|
|
2773
|
+
if (!toastToHide)
|
|
2774
|
+
return;
|
|
2775
|
+
this.toastQueue.update((list) => list.filter((c) => c.instance.id() !== toastId));
|
|
2776
|
+
toastToHide.setInput("isOpen", false);
|
|
2777
|
+
this.waitExitAnimation(toastToHide, () => {
|
|
2778
|
+
toastToHide.destroy();
|
|
2779
|
+
});
|
|
2780
|
+
}
|
|
2781
|
+
build(config) {
|
|
2782
|
+
const toast = this.overlayService.createWithoutAppend(ToastComponent, this.viewContainerRef);
|
|
2783
|
+
this.assignInputsValues(toast, config);
|
|
2784
|
+
return toast;
|
|
2785
|
+
}
|
|
2786
|
+
assignInputsValues(toast, config) {
|
|
2787
|
+
const { message, type = "info", closable = true, autoDismiss = false, duration = "medium", placement = "bottom-right", showActionButton = true, showLeftIcon = true, iconName, actionButtonLabel, onActionButtonClick, } = config;
|
|
2788
|
+
toast.setInput("message", message);
|
|
2789
|
+
toast.setInput("id", v4());
|
|
2790
|
+
toast.setInput("type", type);
|
|
2791
|
+
toast.setInput("closable", closable);
|
|
2792
|
+
toast.setInput("autoDismiss", autoDismiss);
|
|
2793
|
+
toast.setInput("duration", duration);
|
|
2794
|
+
toast.setInput("placement", placement);
|
|
2795
|
+
toast.setInput("iconName", iconName);
|
|
2796
|
+
toast.setInput("showLeftIcon", showLeftIcon);
|
|
2797
|
+
toast.setInput("showActionButton", showActionButton);
|
|
2798
|
+
toast.setInput("actionButtonLabel", actionButtonLabel);
|
|
2799
|
+
toast.setInput("onActionButtonClick", onActionButtonClick);
|
|
2800
|
+
}
|
|
2801
|
+
waitExitAnimation(ref, done) {
|
|
2802
|
+
setTimeout(done, 300);
|
|
2803
|
+
}
|
|
2804
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToastService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2805
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToastService, providedIn: "root" }); }
|
|
2806
|
+
}
|
|
2807
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToastService, decorators: [{
|
|
2808
|
+
type: Injectable,
|
|
2809
|
+
args: [{ providedIn: "root" }]
|
|
2810
|
+
}], ctorParameters: () => [] });
|
|
2811
|
+
|
|
2630
2812
|
/**
|
|
2631
2813
|
* Generated bundle index. Do not edit.
|
|
2632
2814
|
*/
|
|
2633
2815
|
|
|
2634
|
-
export { BadgeDirective, BannerComponent, BreadcrumbsComponent, ButtonComponent, CardComponent, CheckboxComponent, CheckboxGroupComponent, ChipComponent, ColDirective, DividerComponent, GridDirective, IconButtonComponent, IconButtonToggleComponent, IconComponent, LinkComponent, ModalDirective, ModalModule, ModalTriggerDirective, PopoverDirective, RadioButtonComponent, RadioButtonGroupComponent, SegmentedControlComponent, SideNavComponent, SplitButtonComponent, SwitchComponent, TextInputComponent, TextareaComponent, TooltipDirective };
|
|
2816
|
+
export { BadgeDirective, BannerComponent, BreadcrumbsComponent, ButtonComponent, CardComponent, CheckboxComponent, CheckboxGroupComponent, ChipComponent, ColDirective, DividerComponent, GridDirective, IconButtonComponent, IconButtonToggleComponent, IconComponent, LinkComponent, ModalDirective, ModalModule, ModalTriggerDirective, PopoverDirective, RadioButtonComponent, RadioButtonGroupComponent, SegmentedControlComponent, SideNavComponent, SplitButtonComponent, SwitchComponent, TextInputComponent, TextareaComponent, ToastComponent, ToastService, TooltipDirective };
|
|
2635
2817
|
//# sourceMappingURL=design-system-rte-angular.mjs.map
|