@design-system-rte/angular 0.16.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/breadcrumbs/breadcrumb-item/breadcrumb-item.component.mjs +1 -1
- package/esm2022/lib/components/button/button.component.mjs +11 -4
- package/esm2022/lib/components/card/card.component.mjs +40 -0
- package/esm2022/lib/components/divider/divider.component.mjs +3 -3
- 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/side-nav/base-side-nav/base-side-nav.component.mjs +63 -0
- package/esm2022/lib/components/side-nav/nav-item/nav-item.component.mjs +58 -0
- package/esm2022/lib/components/side-nav/nav-menu/nav-menu.component.mjs +90 -0
- package/esm2022/lib/components/side-nav/side-nav.component.mjs +96 -0
- package/esm2022/lib/components/toast/toast.component.mjs +57 -0
- package/esm2022/lib/components/toast/toast.service.mjs +114 -0
- package/esm2022/lib/components/tooltip/tooltip.component.mjs +3 -3
- package/esm2022/lib/components/tooltip/tooltip.directive.mjs +11 -8
- package/esm2022/lib/services/overlay.service.mjs +9 -1
- package/esm2022/public-api.mjs +5 -1
- package/fesm2022/design-system-rte-angular.mjs +519 -26
- 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/card/card.component.d.ts +19 -0
- 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/side-nav/base-side-nav/base-side-nav.component.d.ts +26 -0
- package/lib/components/side-nav/nav-item/nav-item.component.d.ts +28 -0
- package/lib/components/side-nav/nav-menu/nav-menu.component.d.ts +42 -0
- package/lib/components/side-nav/side-nav.component.d.ts +33 -0
- 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/components/tooltip/tooltip.directive.d.ts +4 -3
- package/lib/services/overlay.service.d.ts +2 -0
- package/package.json +2 -2
- package/public-api.d.ts +4 -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';
|
|
@@ -7,7 +7,8 @@ import { DomSanitizer } from '@angular/platform-browser';
|
|
|
7
7
|
import { HttpClient } from '@angular/common/http';
|
|
8
8
|
import { isValidIconName as isValidIconName$1 } from '@design-system-rte/core/components/icon/icon-utils';
|
|
9
9
|
import { labelSize } from '@design-system-rte/core/components/radio-button/radio-button.constants';
|
|
10
|
-
import {
|
|
10
|
+
import { TOOLTIP_GAP, TOOLTIP_FADE_OUT_DURATION } from '@design-system-rte/core/components/tooltip/tooltip.constants';
|
|
11
|
+
import { getTooltipGap } from '@design-system-rte/core/components/tooltip/tooltip.utils';
|
|
11
12
|
import { getAutoPlacement, getCoordinates, getAutoPlacementDropdown, getAutoAlignment } from '@design-system-rte/core/components/utils/auto-placement';
|
|
12
13
|
import { FOCUSABLE_ELEMENTS_QUERY } from '@design-system-rte/core/constants/dom/dom.constants';
|
|
13
14
|
import { splitButtonLeftIconSize, splitButtonRightIconSize } from '@design-system-rte/core/components/split-button/split-button.constants';
|
|
@@ -15,7 +16,7 @@ import { SPACE_KEY, ENTER_KEY, ARROW_DOWN_KEY, ARROW_UP_KEY, ARROW_LEFT_KEY, ARR
|
|
|
15
16
|
import { BehaviorSubject } from 'rxjs';
|
|
16
17
|
import { map } from 'rxjs/operators';
|
|
17
18
|
import { DropdownManager } from '@design-system-rte/core/components/dropdown/DropdownManager';
|
|
18
|
-
import {
|
|
19
|
+
import { ButtonIconSize } from '@design-system-rte/core/components/button/common/common-button.constants';
|
|
19
20
|
import { getShowIcon, getShowText, getDisplayCount, getBadgeIconSize, getShowBadge } from '@design-system-rte/core/components/badge/badge.utils';
|
|
20
21
|
import { CHIP_TYPE_TO_ARIA_ROLE_MAP } from '@design-system-rte/core/components/chip/chip.constants';
|
|
21
22
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
@@ -24,23 +25,35 @@ import { switchHeight, switchWidth } from '@design-system-rte/core/components/sw
|
|
|
24
25
|
import { isValidSegmentedControlOptions, focusNextSegmentElement, focusPreviousSegmentElement, focusPreviousNotSegmentElement, focusNextNotSegmentElement, getSegmentPosition } from '@design-system-rte/core/components/segmented-control/segmented-control-utils';
|
|
25
26
|
import { BREADCRUMBS_DEFAULT_ARIA_LABEL } from '@design-system-rte/core/components/breadcrumbs/breadcrumbs.constants';
|
|
26
27
|
import { shouldTruncateBreadcrumbs, getBreadcrumbsTruncatedItems } from '@design-system-rte/core/components/breadcrumbs/breadcrumbs.utils';
|
|
28
|
+
import { cardSize } from '@design-system-rte/core/components/card/card.constats';
|
|
27
29
|
import { POPOVER_GAP_ARROW, POPOVER_GAP } from '@design-system-rte/core/components/popover/popover.constants';
|
|
28
|
-
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
|
+
import { sideNavCollapsedSize, sideNavPanelSize, dividerAppearanceBySideNavAppearance } from '@design-system-rte/core/components/side-nav/side-nav.constants';
|
|
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';
|
|
29
35
|
|
|
30
36
|
class ButtonComponent {
|
|
31
37
|
constructor() {
|
|
32
38
|
this.rteButtonVariant = input("primary");
|
|
33
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
|
+
});
|
|
34
47
|
}
|
|
35
48
|
get classes() {
|
|
36
49
|
return `rte-button ${this.rteButtonVariant()} size-${this.rteButtonSize()}`;
|
|
37
50
|
}
|
|
38
51
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
39
|
-
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 }); }
|
|
40
53
|
}
|
|
41
54
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
42
55
|
type: Component,
|
|
43
|
-
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"] }]
|
|
44
57
|
}], propDecorators: { classes: [{
|
|
45
58
|
type: HostBinding,
|
|
46
59
|
args: ["class"]
|
|
@@ -620,6 +633,9 @@ class OverlayService {
|
|
|
620
633
|
}
|
|
621
634
|
return this.overlayRoot;
|
|
622
635
|
}
|
|
636
|
+
createWithoutAppend(component, viewContainer) {
|
|
637
|
+
return viewContainer.createComponent(component);
|
|
638
|
+
}
|
|
623
639
|
create(component, viewContainer, freezeNavigation = false) {
|
|
624
640
|
const root = this.getOverlayRoot(freezeNavigation);
|
|
625
641
|
const componentRef = viewContainer.createComponent(component);
|
|
@@ -632,6 +648,11 @@ class OverlayService {
|
|
|
632
648
|
};
|
|
633
649
|
return componentRef;
|
|
634
650
|
}
|
|
651
|
+
addToOverlay(componentRef) {
|
|
652
|
+
const root = this.getOverlayRoot(this.isNavigationFrozen);
|
|
653
|
+
root.appendChild(componentRef.location.nativeElement);
|
|
654
|
+
this.activeOverlays.add(componentRef);
|
|
655
|
+
}
|
|
635
656
|
destroy() {
|
|
636
657
|
if (this.activeOverlays.size === 0) {
|
|
637
658
|
if (this.isNavigationFrozen) {
|
|
@@ -657,11 +678,11 @@ class TooltipComponent {
|
|
|
657
678
|
this.arrow = input(true);
|
|
658
679
|
}
|
|
659
680
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
660
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: TooltipComponent, isStandalone: true, selector: "rte-tooltip", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, arrow: { classPropertyName: "arrow", publicName: "arrow", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"tooltip {{ position() }} {{ alignment() }}\"\n [ngClass]=\"{ arrow: arrow() }\"\n>\n <span role=\"tooltip\" class=\"tooltip-label\"> {{ label() }} </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\";:host{position:absolute;
|
|
681
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: TooltipComponent, isStandalone: true, selector: "rte-tooltip", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, arrow: { classPropertyName: "arrow", publicName: "arrow", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"tooltip {{ position() }} {{ alignment() }}\"\n [ngClass]=\"{ arrow: arrow() }\"\n>\n <span role=\"tooltip\" class=\"tooltip-label\"> {{ label() }} </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\";:host{position:absolute;transition:opacity .15s ease-out}:host:not(:hover){transition:opacity .1s ease-in}.tooltip{color:var(--content-primary-inverse);text-align:center;z-index:1;max-width:160px;max-height:40px;padding-block:4px;padding-inline:16px;border-radius:4px;background:var(--background-inverse)}.tooltip-label{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:fit-content}.tooltip.top,.tooltip.bottom{transform:translate(-50%)}.tooltip.left,.tooltip.right{transform:translateY(-50%)}.tooltip.top{bottom:0}.tooltip.top:after{top:100%;left:50%;margin-left:-5px;border-color:var(--background-inverse) transparent transparent transparent}.tooltip.top.start:after{left:25%}.tooltip.top.end:after{left:75%}.tooltip.bottom:after{bottom:100%;left:50%;margin-left:-5px;border-color:transparent transparent var(--background-inverse) transparent}.tooltip.bottom.start:after{left:25%}.tooltip.bottom.end:after{left:75%}.tooltip.left{right:0}.tooltip.left:after{top:50%;left:100%;margin-top:-5px;border-color:transparent transparent transparent var(--background-inverse)}.tooltip.left.start:after{top:25%}.tooltip.left.end:after{top:75%}.tooltip.right:after{top:50%;right:100%;margin-top:-5px;border-color:transparent var(--background-inverse) transparent transparent}.tooltip.right.start:after{top:25%}.tooltip.right.end:after{top:75%}.tooltip.arrow:after{content:\"\";position:absolute;border-width:5px;border-style:solid}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
661
682
|
}
|
|
662
683
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
663
684
|
type: Component,
|
|
664
|
-
args: [{ selector: "rte-tooltip", imports: [CommonModule], standalone: true, template: "<div\n class=\"tooltip {{ position() }} {{ alignment() }}\"\n [ngClass]=\"{ arrow: arrow() }\"\n>\n <span role=\"tooltip\" class=\"tooltip-label\"> {{ label() }} </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\";:host{position:absolute;
|
|
685
|
+
args: [{ selector: "rte-tooltip", imports: [CommonModule], standalone: true, template: "<div\n class=\"tooltip {{ position() }} {{ alignment() }}\"\n [ngClass]=\"{ arrow: arrow() }\"\n>\n <span role=\"tooltip\" class=\"tooltip-label\"> {{ label() }} </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\";:host{position:absolute;transition:opacity .15s ease-out}:host:not(:hover){transition:opacity .1s ease-in}.tooltip{color:var(--content-primary-inverse);text-align:center;z-index:1;max-width:160px;max-height:40px;padding-block:4px;padding-inline:16px;border-radius:4px;background:var(--background-inverse)}.tooltip-label{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:fit-content}.tooltip.top,.tooltip.bottom{transform:translate(-50%)}.tooltip.left,.tooltip.right{transform:translateY(-50%)}.tooltip.top{bottom:0}.tooltip.top:after{top:100%;left:50%;margin-left:-5px;border-color:var(--background-inverse) transparent transparent transparent}.tooltip.top.start:after{left:25%}.tooltip.top.end:after{left:75%}.tooltip.bottom:after{bottom:100%;left:50%;margin-left:-5px;border-color:transparent transparent var(--background-inverse) transparent}.tooltip.bottom.start:after{left:25%}.tooltip.bottom.end:after{left:75%}.tooltip.left{right:0}.tooltip.left:after{top:50%;left:100%;margin-top:-5px;border-color:transparent transparent transparent var(--background-inverse)}.tooltip.left.start:after{top:25%}.tooltip.left.end:after{top:75%}.tooltip.right:after{top:50%;right:100%;margin-top:-5px;border-color:transparent var(--background-inverse) transparent transparent}.tooltip.right.start:after{top:25%}.tooltip.right.end:after{top:75%}.tooltip.arrow:after{content:\"\";position:absolute;border-width:5px;border-style:solid}\n"] }]
|
|
665
686
|
}] });
|
|
666
687
|
|
|
667
688
|
class TooltipDirective {
|
|
@@ -683,11 +704,11 @@ class TooltipDirective {
|
|
|
683
704
|
this.rteTooltipAlignment = input("center");
|
|
684
705
|
this.rteTooltipArrow = input(true);
|
|
685
706
|
this.rteTooltipShouldFocusTrigger = input(true);
|
|
707
|
+
this.rteTooltipGap = input(TOOLTIP_GAP);
|
|
686
708
|
this.tooltipRef = null;
|
|
687
709
|
this.elementRef = inject(ElementRef);
|
|
688
710
|
this.viewContainerRef = inject(ViewContainerRef);
|
|
689
711
|
this.renderer = inject(Renderer2);
|
|
690
|
-
this.cdr = inject(ChangeDetectorRef);
|
|
691
712
|
this.overlayService = inject(OverlayService);
|
|
692
713
|
this.hostElement = this.elementRef.nativeElement;
|
|
693
714
|
}
|
|
@@ -722,8 +743,9 @@ class TooltipDirective {
|
|
|
722
743
|
assignDirectiveToComponent() {
|
|
723
744
|
if (this.tooltipRef) {
|
|
724
745
|
const tooltipElement = this.tooltipRef.location.nativeElement;
|
|
746
|
+
const gap = getTooltipGap(this.rteTooltipArrow(), this.rteTooltipGap());
|
|
725
747
|
const position = this.rteTooltipPosition() === "auto"
|
|
726
|
-
? getAutoPlacement(this.hostElement, tooltipElement, "top",
|
|
748
|
+
? getAutoPlacement(this.hostElement, tooltipElement, "top", gap, true)
|
|
727
749
|
: this.rteTooltipPosition();
|
|
728
750
|
this.tooltipRef.setInput("label", this.rteTooltip());
|
|
729
751
|
this.tooltipRef.setInput("position", position);
|
|
@@ -734,7 +756,8 @@ class TooltipDirective {
|
|
|
734
756
|
positionTooltip() {
|
|
735
757
|
if (this.tooltipRef) {
|
|
736
758
|
const tooltipElement = this.tooltipRef.location.nativeElement;
|
|
737
|
-
const
|
|
759
|
+
const gap = getTooltipGap(this.rteTooltipArrow(), this.rteTooltipGap());
|
|
760
|
+
const positions = getCoordinates(this.tooltipRef.instance.position(), this.hostElement, tooltipElement, gap);
|
|
738
761
|
this.renderer.setStyle(this.hostElement, "position", "relative");
|
|
739
762
|
this.renderer.setStyle(tooltipElement, "top", `${positions.top}px`);
|
|
740
763
|
this.renderer.setStyle(tooltipElement, "left", `${positions.left}px`);
|
|
@@ -750,11 +773,11 @@ class TooltipDirective {
|
|
|
750
773
|
this.tooltipRef = null;
|
|
751
774
|
this.overlayService.destroy();
|
|
752
775
|
}
|
|
753
|
-
},
|
|
776
|
+
}, TOOLTIP_FADE_OUT_DURATION);
|
|
754
777
|
}
|
|
755
778
|
}
|
|
756
779
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
757
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.14", type: TooltipDirective, isStandalone: true, selector: "[rteTooltip]", inputs: { rteTooltip: { classPropertyName: "rteTooltip", publicName: "rteTooltip", isSignal: true, isRequired: true, transformFunction: null }, rteTooltipPosition: { classPropertyName: "rteTooltipPosition", publicName: "rteTooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, rteTooltipAlignment: { classPropertyName: "rteTooltipAlignment", publicName: "rteTooltipAlignment", isSignal: true, isRequired: false, transformFunction: null }, rteTooltipArrow: { classPropertyName: "rteTooltipArrow", publicName: "rteTooltipArrow", isSignal: true, isRequired: false, transformFunction: null }, rteTooltipShouldFocusTrigger: { classPropertyName: "rteTooltipShouldFocusTrigger", publicName: "rteTooltipShouldFocusTrigger", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "focus": "onFocus()", "blur": "onBlur()" } }, ngImport: i0 }); }
|
|
780
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.14", type: TooltipDirective, isStandalone: true, selector: "[rteTooltip]", inputs: { rteTooltip: { classPropertyName: "rteTooltip", publicName: "rteTooltip", isSignal: true, isRequired: true, transformFunction: null }, rteTooltipPosition: { classPropertyName: "rteTooltipPosition", publicName: "rteTooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, rteTooltipAlignment: { classPropertyName: "rteTooltipAlignment", publicName: "rteTooltipAlignment", isSignal: true, isRequired: false, transformFunction: null }, rteTooltipArrow: { classPropertyName: "rteTooltipArrow", publicName: "rteTooltipArrow", isSignal: true, isRequired: false, transformFunction: null }, rteTooltipShouldFocusTrigger: { classPropertyName: "rteTooltipShouldFocusTrigger", publicName: "rteTooltipShouldFocusTrigger", isSignal: true, isRequired: false, transformFunction: null }, rteTooltipGap: { classPropertyName: "rteTooltipGap", publicName: "rteTooltipGap", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "focus": "onFocus()", "blur": "onBlur()" } }, ngImport: i0 }); }
|
|
758
781
|
}
|
|
759
782
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
760
783
|
type: Directive,
|
|
@@ -785,11 +808,11 @@ class DividerComponent {
|
|
|
785
808
|
this.isHorizontal = computed(() => this.orientation() === "horizontal");
|
|
786
809
|
}
|
|
787
810
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
788
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: DividerComponent, isStandalone: true, selector: "rte-divider", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, thickness: { classPropertyName: "thickness", publicName: "thickness", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, endPoint: { classPropertyName: "endPoint", publicName: "endPoint", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (isHorizontal()) {\n <hr class=\"horizontal {{thickness()}} {{appearance()}} {{endPoint()}}\" />\n} @else {\n <div class=\"vertical {{thickness()}} {{appearance()}} {{endPoint()}}\" role=\"separator\"></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\"
|
|
811
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: DividerComponent, isStandalone: true, selector: "rte-divider", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, thickness: { classPropertyName: "thickness", publicName: "thickness", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, endPoint: { classPropertyName: "endPoint", publicName: "endPoint", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (isHorizontal()) {\n <hr class=\"horizontal {{thickness()}} {{appearance()}} {{endPoint()}}\" />\n} @else {\n <div class=\"vertical {{thickness()}} {{appearance()}} {{endPoint()}}\" role=\"separator\"></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\";:host{display:contents}.horizontal{border:none;padding:0;margin:0;width:100%}.horizontal.round{border-radius:999px}.horizontal.light{border-top:1px solid var(--border-divider)}.horizontal.medium{border-top:2px solid var(--border-divider)}.horizontal.bold{border-top:4px solid var(--border-divider)}.horizontal.inverse{border-top-color:var(--border-inverse)}.horizontal.brand{border-top-color:var(--border-brand-default)}.horizontal.brand-navigation{border-top-color:var(--border-brand-navigation-divider)}.vertical{height:100%;background-color:var(--border-divider);margin:0;padding:0}.vertical.round{border-radius:999px}.vertical.light{width:1px}.vertical.medium{width:2px}.vertical.bold{width:4px}.vertical.inverse{background-color:var(--border-inverse)}.vertical.brand{background-color:var(--border-brand-default)}.vertical.brand-navigation{background-color:var(--border-brand-navigation-divider)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
789
812
|
}
|
|
790
813
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DividerComponent, decorators: [{
|
|
791
814
|
type: Component,
|
|
792
|
-
args: [{ selector: "rte-divider", imports: [CommonModule], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (isHorizontal()) {\n <hr class=\"horizontal {{thickness()}} {{appearance()}} {{endPoint()}}\" />\n} @else {\n <div class=\"vertical {{thickness()}} {{appearance()}} {{endPoint()}}\" role=\"separator\"></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\"
|
|
815
|
+
args: [{ selector: "rte-divider", imports: [CommonModule], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (isHorizontal()) {\n <hr class=\"horizontal {{thickness()}} {{appearance()}} {{endPoint()}}\" />\n} @else {\n <div class=\"vertical {{thickness()}} {{appearance()}} {{endPoint()}}\" role=\"separator\"></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\";:host{display:contents}.horizontal{border:none;padding:0;margin:0;width:100%}.horizontal.round{border-radius:999px}.horizontal.light{border-top:1px solid var(--border-divider)}.horizontal.medium{border-top:2px solid var(--border-divider)}.horizontal.bold{border-top:4px solid var(--border-divider)}.horizontal.inverse{border-top-color:var(--border-inverse)}.horizontal.brand{border-top-color:var(--border-brand-default)}.horizontal.brand-navigation{border-top-color:var(--border-brand-navigation-divider)}.vertical{height:100%;background-color:var(--border-divider);margin:0;padding:0}.vertical.round{border-radius:999px}.vertical.light{width:1px}.vertical.medium{width:2px}.vertical.bold{width:4px}.vertical.inverse{background-color:var(--border-inverse)}.vertical.brand{background-color:var(--border-brand-default)}.vertical.brand-navigation{background-color:var(--border-brand-navigation-divider)}\n"] }]
|
|
793
816
|
}] });
|
|
794
817
|
|
|
795
818
|
class DropdownItemComponent {
|
|
@@ -1255,11 +1278,11 @@ class BadgeComponent {
|
|
|
1255
1278
|
}));
|
|
1256
1279
|
}
|
|
1257
1280
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1258
|
-
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 }); }
|
|
1259
1282
|
}
|
|
1260
1283
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BadgeComponent, decorators: [{
|
|
1261
1284
|
type: Component,
|
|
1262
|
-
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"] }]
|
|
1263
1286
|
}] });
|
|
1264
1287
|
|
|
1265
1288
|
class BadgeDirective {
|
|
@@ -1329,7 +1352,7 @@ class IconButtonComponent {
|
|
|
1329
1352
|
this.badgeContent = input();
|
|
1330
1353
|
this.badgeType = input();
|
|
1331
1354
|
this.badgeIcon = input("settings");
|
|
1332
|
-
this.buttonIconSize = computed(() =>
|
|
1355
|
+
this.buttonIconSize = computed(() => ButtonIconSize[this.size()]);
|
|
1333
1356
|
this.isValidIconName = computed(() => isValidIconName(this.name()));
|
|
1334
1357
|
this.click = output();
|
|
1335
1358
|
this.shouldDisplayBadge = computed(() => {
|
|
@@ -1368,7 +1391,7 @@ class IconButtonToggleComponent {
|
|
|
1368
1391
|
this.isSelected = computed(() => {
|
|
1369
1392
|
return this.isControlled() ? this.selected() : this.internalSelected();
|
|
1370
1393
|
});
|
|
1371
|
-
this.buttonIconSize = computed(() =>
|
|
1394
|
+
this.buttonIconSize = computed(() => ButtonIconSize[this.size()]);
|
|
1372
1395
|
}
|
|
1373
1396
|
toggleInternalSelectedState() {
|
|
1374
1397
|
this.internalSelected.set(!this.internalSelected());
|
|
@@ -1798,7 +1821,7 @@ class BreadcrumbItemComponent {
|
|
|
1798
1821
|
this.initialScrollWidth.set(el.scrollWidth);
|
|
1799
1822
|
}
|
|
1800
1823
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BreadcrumbItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1801
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: BreadcrumbItemComponent, isStandalone: true, selector: "rte-breadcrumb-item", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, isLast: { classPropertyName: "isLast", publicName: "isLast", isSignal: true, isRequired: false, transformFunction: null }, breadcrumbItemMaxWidth: { classPropertyName: "breadcrumbItemMaxWidth", publicName: "breadcrumbItemMaxWidth", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"rte-breadcrumb-item\">\n @if (isLast()) {\n @if (isEllipsisActive()) {\n <div\n [rteTooltip]=\"item()!.label\"\n [rteTooltipPosition]=\"'bottom'\"\n [style]=\"tooltipTriggerStyle()\"\n >\n <a\n role=\"link\"\n aria-current=\"page\"\n tabindex=\"-1\"\n [attr.aria-label]=\"item()!.label\"\n [style]=\"linkStyle()\"\n >\n {{ item()!.label }}\n </a>\n </div>\n } @else {\n <a\n role=\"link\"\n aria-current=\"page\"\n tabindex=\"0\"\n [attr.aria-label]=\"item()!.label\"\n [style]=\"linkStyle()\"\n >\n {{ item()!.label }}\n </a>\n }\n } @else {\n @if (isEllipsisActive()) {\n <div\n [rteTooltip]=\"item()!.label\"\n [rteTooltipPosition]=\"'bottom'\"\n [style]=\"tooltipTriggerStyle()\"\n [style.overflow]=\"'unset'\"\n [rteTooltipShouldFocusTrigger]=\"false\"\n >\n <rte-link\n [href]=\"item()!.link\"\n [label]=\"item()!.label\"\n [subtle]=\"true\"\n [maxWidth]=\"breadcrumbItemMaxWidth()\"\n />\n </div>\n } @else {\n <rte-link\n [href]=\"item()!.link\"\n [label]=\"item()!.label\"\n [subtle]=\"true\"\n [maxWidth]=\"breadcrumbItemMaxWidth()\"\n />\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-breadcrumb-item{display:inline-flex;align-items:center;opacity:0;animation:fadeIn .15s forwards;font-family:Arial;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px}.rte-breadcrumb-item rte-link ::ng-deep a,.rte-breadcrumb-item rte-link ::ng-deep a.subtle{color:var(--content-tertiary)!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rte-breadcrumb-item a{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rte-breadcrumb-item:last-child{cursor:default;color:var(--content-primary)}.rte-breadcrumb-item :focus-visible{outline:1px solid var(--border-brand-focused);outline-offset:4px;border-radius:4px}@keyframes fadeIn{to{opacity:1}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: LinkComponent, selector: "rte-link", inputs: ["label", "href", "subtle", "externalLink", "reverse", "maxWidth"] }, { kind: "directive", type: TooltipDirective, selector: "[rteTooltip]", inputs: ["rteTooltip", "rteTooltipPosition", "rteTooltipAlignment", "rteTooltipArrow", "rteTooltipShouldFocusTrigger"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1824
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: BreadcrumbItemComponent, isStandalone: true, selector: "rte-breadcrumb-item", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, isLast: { classPropertyName: "isLast", publicName: "isLast", isSignal: true, isRequired: false, transformFunction: null }, breadcrumbItemMaxWidth: { classPropertyName: "breadcrumbItemMaxWidth", publicName: "breadcrumbItemMaxWidth", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"rte-breadcrumb-item\">\n @if (isLast()) {\n @if (isEllipsisActive()) {\n <div\n [rteTooltip]=\"item()!.label\"\n [rteTooltipPosition]=\"'bottom'\"\n [style]=\"tooltipTriggerStyle()\"\n >\n <a\n role=\"link\"\n aria-current=\"page\"\n tabindex=\"-1\"\n [attr.aria-label]=\"item()!.label\"\n [style]=\"linkStyle()\"\n >\n {{ item()!.label }}\n </a>\n </div>\n } @else {\n <a\n role=\"link\"\n aria-current=\"page\"\n tabindex=\"0\"\n [attr.aria-label]=\"item()!.label\"\n [style]=\"linkStyle()\"\n >\n {{ item()!.label }}\n </a>\n }\n } @else {\n @if (isEllipsisActive()) {\n <div\n [rteTooltip]=\"item()!.label\"\n [rteTooltipPosition]=\"'bottom'\"\n [style]=\"tooltipTriggerStyle()\"\n [style.overflow]=\"'unset'\"\n [rteTooltipShouldFocusTrigger]=\"false\"\n >\n <rte-link\n [href]=\"item()!.link\"\n [label]=\"item()!.label\"\n [subtle]=\"true\"\n [maxWidth]=\"breadcrumbItemMaxWidth()\"\n />\n </div>\n } @else {\n <rte-link\n [href]=\"item()!.link\"\n [label]=\"item()!.label\"\n [subtle]=\"true\"\n [maxWidth]=\"breadcrumbItemMaxWidth()\"\n />\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-breadcrumb-item{display:inline-flex;align-items:center;opacity:0;animation:fadeIn .15s forwards;font-family:Arial;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px}.rte-breadcrumb-item rte-link ::ng-deep a,.rte-breadcrumb-item rte-link ::ng-deep a.subtle{color:var(--content-tertiary)!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rte-breadcrumb-item a{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rte-breadcrumb-item:last-child{cursor:default;color:var(--content-primary)}.rte-breadcrumb-item :focus-visible{outline:1px solid var(--border-brand-focused);outline-offset:4px;border-radius:4px}@keyframes fadeIn{to{opacity:1}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: LinkComponent, selector: "rte-link", inputs: ["label", "href", "subtle", "externalLink", "reverse", "maxWidth"] }, { kind: "directive", type: TooltipDirective, selector: "[rteTooltip]", inputs: ["rteTooltip", "rteTooltipPosition", "rteTooltipAlignment", "rteTooltipArrow", "rteTooltipShouldFocusTrigger", "rteTooltipGap"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1802
1825
|
}
|
|
1803
1826
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BreadcrumbItemComponent, decorators: [{
|
|
1804
1827
|
type: Component,
|
|
@@ -1827,18 +1850,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1827
1850
|
|
|
1828
1851
|
class BannerComponent {
|
|
1829
1852
|
constructor() {
|
|
1830
|
-
this.type = input("
|
|
1853
|
+
this.type = input("info");
|
|
1831
1854
|
this.message = input.required();
|
|
1832
1855
|
this.position = input("push");
|
|
1833
1856
|
this.title = input();
|
|
1834
1857
|
this.closable = input(false);
|
|
1835
|
-
this.showIcon = input(false);
|
|
1836
1858
|
this.isOpen = input(true);
|
|
1837
1859
|
this.actionLabel = input();
|
|
1838
1860
|
this.click = output();
|
|
1839
1861
|
this.visible = signal(false);
|
|
1840
1862
|
this.rendering = signal(false);
|
|
1841
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
|
+
});
|
|
1842
1873
|
}
|
|
1843
1874
|
ngOnInit() {
|
|
1844
1875
|
this.visible.set(this.isOpen());
|
|
@@ -1876,11 +1907,45 @@ class BannerComponent {
|
|
|
1876
1907
|
});
|
|
1877
1908
|
}
|
|
1878
1909
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BannerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1879
|
-
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 }); }
|
|
1880
1911
|
}
|
|
1881
1912
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BannerComponent, decorators: [{
|
|
1882
1913
|
type: Component,
|
|
1883
|
-
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"] }]
|
|
1915
|
+
}] });
|
|
1916
|
+
|
|
1917
|
+
class CardComponent {
|
|
1918
|
+
constructor() {
|
|
1919
|
+
this.size = input("m");
|
|
1920
|
+
this.cardType = input("default");
|
|
1921
|
+
this.clickable = input(false);
|
|
1922
|
+
this.disabled = input(false);
|
|
1923
|
+
this.ariaLabel = input(undefined);
|
|
1924
|
+
this.ariaLabelledby = input(undefined);
|
|
1925
|
+
this.ariaRole = input(undefined);
|
|
1926
|
+
this.cardClicked = output();
|
|
1927
|
+
this.cardWidth = computed(() => `${cardSize[this.size()]}px`);
|
|
1928
|
+
this.tabIndex = computed(() => (this.clickable() ? 0 : -1));
|
|
1929
|
+
}
|
|
1930
|
+
onClick() {
|
|
1931
|
+
if (!this.disabled() && this.clickable()) {
|
|
1932
|
+
this.cardClicked.emit();
|
|
1933
|
+
}
|
|
1934
|
+
}
|
|
1935
|
+
onKeyDown(event) {
|
|
1936
|
+
if (!this.disabled() && this.clickable()) {
|
|
1937
|
+
if ([ENTER_KEY, SPACE_KEY].includes(event.key)) {
|
|
1938
|
+
event.preventDefault();
|
|
1939
|
+
this.cardClicked.emit();
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1944
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: CardComponent, isStandalone: true, selector: "rte-card", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, cardType: { classPropertyName: "cardType", publicName: "cardType", isSignal: true, isRequired: false, transformFunction: null }, clickable: { classPropertyName: "clickable", publicName: "clickable", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaRole: { classPropertyName: "ariaRole", publicName: "ariaRole", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cardClicked: "cardClicked" }, ngImport: i0, template: "<div\n class=\"card card-{{cardType()}}\"\n [style.width]=\"cardWidth()\"\n [attr.disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-role]=\"ariaRole()\"\n [ngClass]=\"{'clickable': clickable()}\"\n [tabIndex]=\"tabIndex()\"\n (click)=\"onClick()\"\n (keydown)=\"onKeyDown($event)\"\n>\n <ng-content/>\n</div>\n\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\";.card{display:flex;flex-direction:column;justify-content:center;align-items:center;align-self:stretch;border-radius:4px;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%);transition:background-color .3s,box-shadow .3s}.card:active{box-shadow:0 1px 2px 0 var(--elevation-shadow-key),0 0 2px 0 var(--elevation-shadow-ambient);background:linear-gradient(0deg,var(--elevation-surface-shadow-1) 0%,var(--elevation-surface-shadow-1) 100%)}.card:hover{box-shadow:0 4px 8px 0 var(--elevation-shadow-key),0 0 2px 0 var(--elevation-shadow-ambient);background:linear-gradient(0deg,var(--elevation-surface-shadow-3) 0%,var(--elevation-surface-shadow-3) 100%)}.card[disabled=true]{background:var(--background-disabled);opacity:30%;box-shadow:none;pointer-events:none}.card[disabled=true].card-outlined{border:1px solid var(--border-disabled)}.card.card-outlined{flex-shrink:0;border:1px solid var(--border-tertiary);box-shadow:none}.card.card-outlined:active{border-color:var(--border-secondary)}.card.clickable{cursor:pointer}.card:focus-visible{outline:1px solid var(--border-brand-focused);outline-offset:4px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1945
|
+
}
|
|
1946
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CardComponent, decorators: [{
|
|
1947
|
+
type: Component,
|
|
1948
|
+
args: [{ selector: "rte-card", imports: [CommonModule], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"card card-{{cardType()}}\"\n [style.width]=\"cardWidth()\"\n [attr.disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-role]=\"ariaRole()\"\n [ngClass]=\"{'clickable': clickable()}\"\n [tabIndex]=\"tabIndex()\"\n (click)=\"onClick()\"\n (keydown)=\"onKeyDown($event)\"\n>\n <ng-content/>\n</div>\n\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\";.card{display:flex;flex-direction:column;justify-content:center;align-items:center;align-self:stretch;border-radius:4px;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%);transition:background-color .3s,box-shadow .3s}.card:active{box-shadow:0 1px 2px 0 var(--elevation-shadow-key),0 0 2px 0 var(--elevation-shadow-ambient);background:linear-gradient(0deg,var(--elevation-surface-shadow-1) 0%,var(--elevation-surface-shadow-1) 100%)}.card:hover{box-shadow:0 4px 8px 0 var(--elevation-shadow-key),0 0 2px 0 var(--elevation-shadow-ambient);background:linear-gradient(0deg,var(--elevation-surface-shadow-3) 0%,var(--elevation-surface-shadow-3) 100%)}.card[disabled=true]{background:var(--background-disabled);opacity:30%;box-shadow:none;pointer-events:none}.card[disabled=true].card-outlined{border:1px solid var(--border-disabled)}.card.card-outlined{flex-shrink:0;border:1px solid var(--border-tertiary);box-shadow:none}.card.card-outlined:active{border-color:var(--border-secondary)}.card.clickable{cursor:pointer}.card:focus-visible{outline:1px solid var(--border-brand-focused);outline-offset:4px}\n"] }]
|
|
1884
1949
|
}] });
|
|
1885
1950
|
|
|
1886
1951
|
class FocusTrapService {
|
|
@@ -1976,7 +2041,7 @@ class PopoverComponent {
|
|
|
1976
2041
|
this.clickSecondaryButton.emit();
|
|
1977
2042
|
}
|
|
1978
2043
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1979
|
-
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"] }] }); }
|
|
1980
2045
|
}
|
|
1981
2046
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PopoverComponent, decorators: [{
|
|
1982
2047
|
type: Component,
|
|
@@ -2316,9 +2381,437 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2316
2381
|
}]
|
|
2317
2382
|
}] });
|
|
2318
2383
|
|
|
2384
|
+
class BaseSideNavComponent {
|
|
2385
|
+
constructor() {
|
|
2386
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
2387
|
+
this.elementRef = inject((ElementRef));
|
|
2388
|
+
this.contentRef = viewChild("contentRef");
|
|
2389
|
+
this.collapsedSize = sideNavCollapsedSize;
|
|
2390
|
+
this.panelSize = sideNavPanelSize;
|
|
2391
|
+
this.size = input("m");
|
|
2392
|
+
this.appearance = input("brand");
|
|
2393
|
+
this.collapsed = input(false);
|
|
2394
|
+
this.showHeader = input(true);
|
|
2395
|
+
this.showFooter = input(true);
|
|
2396
|
+
this.minWidth = computed(() => {
|
|
2397
|
+
return this.collapsed() ? `${this.collapsedSize}px` : `${this.panelSize[this.size()]}px`;
|
|
2398
|
+
});
|
|
2399
|
+
}
|
|
2400
|
+
ngAfterViewInit() {
|
|
2401
|
+
this.setupResizeObserver();
|
|
2402
|
+
}
|
|
2403
|
+
ngOnDestroy() {
|
|
2404
|
+
this.cleanupResizeObserver();
|
|
2405
|
+
}
|
|
2406
|
+
setupResizeObserver() {
|
|
2407
|
+
const containerEl = this.elementRef.nativeElement;
|
|
2408
|
+
const contentEl = this.contentRef()?.nativeElement;
|
|
2409
|
+
if (!containerEl || !contentEl) {
|
|
2410
|
+
return;
|
|
2411
|
+
}
|
|
2412
|
+
const setHeightVar = () => {
|
|
2413
|
+
const height = contentEl.offsetHeight;
|
|
2414
|
+
containerEl.style.setProperty("--content-height", `${height}px`);
|
|
2415
|
+
};
|
|
2416
|
+
this.resizeHandler = setHeightVar;
|
|
2417
|
+
setHeightVar();
|
|
2418
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
2419
|
+
setHeightVar();
|
|
2420
|
+
});
|
|
2421
|
+
this.resizeObserver.observe(contentEl);
|
|
2422
|
+
window.addEventListener("resize", setHeightVar);
|
|
2423
|
+
}
|
|
2424
|
+
cleanupResizeObserver() {
|
|
2425
|
+
if (this.resizeObserver) {
|
|
2426
|
+
this.resizeObserver.disconnect();
|
|
2427
|
+
this.resizeObserver = undefined;
|
|
2428
|
+
}
|
|
2429
|
+
if (this.resizeHandler) {
|
|
2430
|
+
window.removeEventListener("resize", this.resizeHandler);
|
|
2431
|
+
this.resizeHandler = undefined;
|
|
2432
|
+
}
|
|
2433
|
+
}
|
|
2434
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BaseSideNavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2435
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: BaseSideNavComponent, isStandalone: true, selector: "rte-base-side-nav", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, showHeader: { classPropertyName: "showHeader", publicName: "showHeader", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "contentRef", first: true, predicate: ["contentRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"side-nav-container\">\n <nav class=\"side-nav\" [ngClass]=\"{'collapsed': collapsed(), 'appearance': appearance()}\" [style.min-width]=\"minWidth()\">\n @if (showHeader()) {\n <div class=\"side-nav-header\">\n <ng-content select=\"[side-nav-header]\"></ng-content>\n </div>\n }\n\n <div class=\"side-nav-body\">\n <ng-content select=\"[side-nav-body]\"></ng-content>\n </div>\n\n @if (showFooter()) {\n <div class=\"side-nav-footer\">\n <ng-content select=\"[side-nav-footer]\"></ng-content>\n </div>\n }\n </nav>\n <div #contentRef class=\"side-nav-content\">\n <ng-content select=\"[side-nav-content]\"></ng-content>\n </div>\n</div>\n\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-container{height:auto;padding:0;position:relative;display:flex;align-items:stretch;flex:1}.side-nav-content{flex:1 1 auto;min-width:0;overflow-y:auto}.side-nav{background-color:var(--background-brand-navigation-default);flex:0 0 auto;align-self:stretch;display:flex;flex-direction:column;gap:0px;box-sizing:border-box;border-radius:0;transition:min-width .3s;color:var(--content-brand-navigation-default);max-height:var(--content-height)}.side-nav.neutral{background-color:var(--background-neutral-navigation-default);color:var(--content-secondary)}.side-nav-header{align-items:center;justify-content:space-between;width:100%;box-sizing:border-box}.side-nav-body{width:100%;box-sizing:border-box;flex:1;overflow-y:auto;min-height:0}.side-nav-footer{align-items:center;justify-content:space-between;box-sizing:border-box;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2436
|
+
}
|
|
2437
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BaseSideNavComponent, decorators: [{
|
|
2438
|
+
type: Component,
|
|
2439
|
+
args: [{ selector: "rte-base-side-nav", imports: [CommonModule], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"side-nav-container\">\n <nav class=\"side-nav\" [ngClass]=\"{'collapsed': collapsed(), 'appearance': appearance()}\" [style.min-width]=\"minWidth()\">\n @if (showHeader()) {\n <div class=\"side-nav-header\">\n <ng-content select=\"[side-nav-header]\"></ng-content>\n </div>\n }\n\n <div class=\"side-nav-body\">\n <ng-content select=\"[side-nav-body]\"></ng-content>\n </div>\n\n @if (showFooter()) {\n <div class=\"side-nav-footer\">\n <ng-content select=\"[side-nav-footer]\"></ng-content>\n </div>\n }\n </nav>\n <div #contentRef class=\"side-nav-content\">\n <ng-content select=\"[side-nav-content]\"></ng-content>\n </div>\n</div>\n\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-container{height:auto;padding:0;position:relative;display:flex;align-items:stretch;flex:1}.side-nav-content{flex:1 1 auto;min-width:0;overflow-y:auto}.side-nav{background-color:var(--background-brand-navigation-default);flex:0 0 auto;align-self:stretch;display:flex;flex-direction:column;gap:0px;box-sizing:border-box;border-radius:0;transition:min-width .3s;color:var(--content-brand-navigation-default);max-height:var(--content-height)}.side-nav.neutral{background-color:var(--background-neutral-navigation-default);color:var(--content-secondary)}.side-nav-header{align-items:center;justify-content:space-between;width:100%;box-sizing:border-box}.side-nav-body{width:100%;box-sizing:border-box;flex:1;overflow-y:auto;min-height:0}.side-nav-footer{align-items:center;justify-content:space-between;box-sizing:border-box;width:100%}\n"] }]
|
|
2440
|
+
}] });
|
|
2441
|
+
|
|
2442
|
+
function getNavTabIndex$1(parentMenuOpen) {
|
|
2443
|
+
return parentMenuOpen === false ? -1 : 0;
|
|
2444
|
+
}
|
|
2445
|
+
class NavItemComponent {
|
|
2446
|
+
constructor() {
|
|
2447
|
+
this.id = input();
|
|
2448
|
+
this.icon = input();
|
|
2449
|
+
this.showIcon = input(true);
|
|
2450
|
+
this.label = input.required();
|
|
2451
|
+
this.collapsed = input(false);
|
|
2452
|
+
this.link = input();
|
|
2453
|
+
this.appearance = input("brand");
|
|
2454
|
+
this.active = input(false);
|
|
2455
|
+
this.badge = input();
|
|
2456
|
+
this.isNested = input(false);
|
|
2457
|
+
this.parentMenuOpen = input();
|
|
2458
|
+
this.role = input();
|
|
2459
|
+
this.showDivider = input(false);
|
|
2460
|
+
this.focused = signal(false);
|
|
2461
|
+
this.tabIndex = computed(() => getNavTabIndex$1(this.parentMenuOpen()));
|
|
2462
|
+
this.itemClick = output();
|
|
2463
|
+
this.iconSize = computed(() => {
|
|
2464
|
+
return getNavItemLabelIconSize(this.isNested(), this.collapsed());
|
|
2465
|
+
});
|
|
2466
|
+
}
|
|
2467
|
+
handleClick(event) {
|
|
2468
|
+
event.stopPropagation();
|
|
2469
|
+
this.itemClick.emit(this.id() || this.label());
|
|
2470
|
+
}
|
|
2471
|
+
handleKeyDown(event) {
|
|
2472
|
+
if ([SPACE_KEY, ENTER_KEY].includes(event.key)) {
|
|
2473
|
+
event.preventDefault();
|
|
2474
|
+
this.itemClick.emit(this.id() || this.label());
|
|
2475
|
+
}
|
|
2476
|
+
}
|
|
2477
|
+
handleFocus() {
|
|
2478
|
+
this.focused.set(true);
|
|
2479
|
+
}
|
|
2480
|
+
handleBlur() {
|
|
2481
|
+
this.focused.set(false);
|
|
2482
|
+
}
|
|
2483
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2484
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: NavItemComponent, isStandalone: true, selector: "rte-nav-item", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, isNested: { classPropertyName: "isNested", publicName: "isNested", isSignal: true, isRequired: false, transformFunction: null }, parentMenuOpen: { classPropertyName: "parentMenuOpen", publicName: "parentMenuOpen", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, showDivider: { classPropertyName: "showDivider", publicName: "showDivider", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick" }, ngImport: i0, template: "@if (collapsed() && label()) {\n <div\n class=\"nav-item-container {{appearance()}}\"\n rteTooltip\n rteTooltipPosition=\"right\"\n rteTooltipAlignment=\"center\"\n [id]=\"id()\"\n [ngClass]=\"{ collapsed: collapsed(), nested: isNested(), active: active(), focused: focused() }\"\n [attr.role]=\"role()\"\n [rteTooltip]=\"label()\"\n [rteTooltipArrow]=\"false\"\n [rteTooltipGap]=\"12\"\n [rteTooltipShouldFocusTrigger]=\"false\">\n <ng-container [ngTemplateOutlet]=\"contentTemplate\" />\n </div>\n} @else {\n <div\n class=\"nav-item-container {{appearance()}}\"\n [id]=\"id()\"\n [ngClass]=\"{ collapsed: collapsed(), nested: isNested(), active: active(), focused: focused() }\"\n [attr.role]=\"role()\">\n <ng-container [ngTemplateOutlet]=\"contentTemplate\" />\n </div>\n}\n\n<ng-template #contentTemplate>\n @if (link()) {\n <a\n class=\"nav-item\"\n [href]=\"link()!\"\n [attr.tabindex]=\"tabIndex()\"\n [attr.aria-label]=\"label()\"\n (focus)=\"handleFocus()\"\n (blur)=\"handleBlur()\">\n <div class=\"nav-item-left\">\n @if (showIcon() && icon()) {\n <rte-icon class=\"icon\" [name]=\"icon()!\" [size]=\"iconSize()\" />\n }\n @if (!collapsed()) {\n <span>{{ label() }}</span>\n }\n </div>\n <div class=\"nav-item-right\">\n @if (badge()) {\n <rte-badge\n [badgeType]=\"badge()!.badgeType || 'brand'\"\n [badgeSize]=\"badge()!.size || 'm'\"\n [badgeContent]=\"badge()!.content || 'number'\"\n [count]=\"badge()!.count\"\n [icon]=\"badge()!.icon || 'notification'\"\n [simpleBadge]=\"true\"\n />\n }\n </div>\n </a>\n } @else {\n <span\n class=\"nav-item\"\n [attr.tabindex]=\"tabIndex()\"\n [attr.aria-label]=\"label()\"\n (click)=\"handleClick($event)\"\n (keydown)=\"handleKeyDown($event)\"\n (focus)=\"handleFocus()\"\n (blur)=\"handleBlur()\">\n <div class=\"nav-item-left\">\n @if (showIcon() && icon()) {\n <rte-icon class=\"icon\" [name]=\"icon()!\" [size]=\"iconSize()\" />\n }\n @if (!collapsed()) {\n <span>{{ label() }}</span>\n }\n </div>\n <div class=\"nav-item-right\">\n @if (badge()) {\n <rte-badge\n [badgeType]=\"badge()!.badgeType || 'brand'\"\n [badgeSize]=\"badge()!.size || 'm'\"\n [badgeContent]=\"badge()!.content || 'number'\"\n [count]=\"badge()!.count\"\n [icon]=\"badge()!.icon || 'notification'\"\n [simpleBadge]=\"true\"\n />\n }\n </div>\n </span>\n }\n</ng-template>\n\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\";.nav-item-container{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;width:100%;display:flex;justify-content:flex-start;gap:8px;padding:8px 6px;border-radius:4px;cursor:pointer;transition:background-color .3s ease;align-items:center;box-sizing:border-box;border-left:2px solid transparent;color:var(--content-brand-navigation-default)}.nav-item-container.neutral{color:var(--content-secondary)}.nav-item-container.neutral:hover{background:var(--background-neutral-navigation-hover);color:var(--content-primary)}.nav-item-container.neutral.active{box-shadow:inset 0 1px 4px 0 var(--elevation-shadow-key);background:linear-gradient(0deg,var(--elevation-surface-inner-shadow) 0%,var(--elevation-surface-inner-shadow) 100%);color:var(--content-brand-pressed)}.nav-item-container.neutral.nested{border-radius:0 4px 4px 0;border-left:1px solid var(--border-divider)}.nav-item-container.neutral.nested.active{border-left:1px solid var(--border-brand-navigation-active)}.nav-item-container:hover{background:var(--background-brand-navigation-hover);color:var(--content-brand-navigation-hover)}.nav-item-container.active{background:var(--background-brand-navigation-pressed);border-left:2px solid var(--border-brand-navigation-divider);color:var(--content-primary-inverse)}.nav-item-container:active.focused{outline:none}.nav-item-container .nav-item{display:flex;padding:0;align-items:center;gap:8px;flex:1 0 0;-webkit-user-select:none;user-select:none;outline:none;justify-content:space-between}.nav-item-container .nav-item:link,.nav-item-container .nav-item:visited,.nav-item-container .nav-item:link:hover,.nav-item-container .nav-item:visited:hover{text-decoration:none;color:inherit}.nav-item-container .nav-item .nav-item-left{display:flex;align-items:center;gap:8px}.nav-item-container .nav-item .nav-item-right{display:flex;align-items:center;gap:4px}.nav-item-container.focused{outline:1px solid var(--border-brand-focused);outline-offset:0}.nav-item-container.collapsed{padding:8px 12px;justify-content:center;border-left:none}.nav-item-container.collapsed .nav-item{justify-content:center;gap:0}.nav-item-container.nested{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;border-radius:0 4px 4px 0;border-left:1px solid var(--border-brand-navigation-divider);padding:4px 8px}.nav-item-container.nested.active{box-shadow:inset 0 1px 4px 0 var(--elevation-shadow-key)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "rte-icon", inputs: ["name", "size", "color", "classes", "appearance"] }, { kind: "component", type: BadgeComponent, selector: "rte-badge", inputs: ["badgeType", "badgeSize", "badgeContent", "count", "icon", "simpleBadge"] }, { kind: "directive", type: TooltipDirective, selector: "[rteTooltip]", inputs: ["rteTooltip", "rteTooltipPosition", "rteTooltipAlignment", "rteTooltipArrow", "rteTooltipShouldFocusTrigger", "rteTooltipGap"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2485
|
+
}
|
|
2486
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavItemComponent, decorators: [{
|
|
2487
|
+
type: Component,
|
|
2488
|
+
args: [{ selector: "rte-nav-item", imports: [CommonModule, IconComponent, BadgeComponent, TooltipDirective], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (collapsed() && label()) {\n <div\n class=\"nav-item-container {{appearance()}}\"\n rteTooltip\n rteTooltipPosition=\"right\"\n rteTooltipAlignment=\"center\"\n [id]=\"id()\"\n [ngClass]=\"{ collapsed: collapsed(), nested: isNested(), active: active(), focused: focused() }\"\n [attr.role]=\"role()\"\n [rteTooltip]=\"label()\"\n [rteTooltipArrow]=\"false\"\n [rteTooltipGap]=\"12\"\n [rteTooltipShouldFocusTrigger]=\"false\">\n <ng-container [ngTemplateOutlet]=\"contentTemplate\" />\n </div>\n} @else {\n <div\n class=\"nav-item-container {{appearance()}}\"\n [id]=\"id()\"\n [ngClass]=\"{ collapsed: collapsed(), nested: isNested(), active: active(), focused: focused() }\"\n [attr.role]=\"role()\">\n <ng-container [ngTemplateOutlet]=\"contentTemplate\" />\n </div>\n}\n\n<ng-template #contentTemplate>\n @if (link()) {\n <a\n class=\"nav-item\"\n [href]=\"link()!\"\n [attr.tabindex]=\"tabIndex()\"\n [attr.aria-label]=\"label()\"\n (focus)=\"handleFocus()\"\n (blur)=\"handleBlur()\">\n <div class=\"nav-item-left\">\n @if (showIcon() && icon()) {\n <rte-icon class=\"icon\" [name]=\"icon()!\" [size]=\"iconSize()\" />\n }\n @if (!collapsed()) {\n <span>{{ label() }}</span>\n }\n </div>\n <div class=\"nav-item-right\">\n @if (badge()) {\n <rte-badge\n [badgeType]=\"badge()!.badgeType || 'brand'\"\n [badgeSize]=\"badge()!.size || 'm'\"\n [badgeContent]=\"badge()!.content || 'number'\"\n [count]=\"badge()!.count\"\n [icon]=\"badge()!.icon || 'notification'\"\n [simpleBadge]=\"true\"\n />\n }\n </div>\n </a>\n } @else {\n <span\n class=\"nav-item\"\n [attr.tabindex]=\"tabIndex()\"\n [attr.aria-label]=\"label()\"\n (click)=\"handleClick($event)\"\n (keydown)=\"handleKeyDown($event)\"\n (focus)=\"handleFocus()\"\n (blur)=\"handleBlur()\">\n <div class=\"nav-item-left\">\n @if (showIcon() && icon()) {\n <rte-icon class=\"icon\" [name]=\"icon()!\" [size]=\"iconSize()\" />\n }\n @if (!collapsed()) {\n <span>{{ label() }}</span>\n }\n </div>\n <div class=\"nav-item-right\">\n @if (badge()) {\n <rte-badge\n [badgeType]=\"badge()!.badgeType || 'brand'\"\n [badgeSize]=\"badge()!.size || 'm'\"\n [badgeContent]=\"badge()!.content || 'number'\"\n [count]=\"badge()!.count\"\n [icon]=\"badge()!.icon || 'notification'\"\n [simpleBadge]=\"true\"\n />\n }\n </div>\n </span>\n }\n</ng-template>\n\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\";.nav-item-container{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;width:100%;display:flex;justify-content:flex-start;gap:8px;padding:8px 6px;border-radius:4px;cursor:pointer;transition:background-color .3s ease;align-items:center;box-sizing:border-box;border-left:2px solid transparent;color:var(--content-brand-navigation-default)}.nav-item-container.neutral{color:var(--content-secondary)}.nav-item-container.neutral:hover{background:var(--background-neutral-navigation-hover);color:var(--content-primary)}.nav-item-container.neutral.active{box-shadow:inset 0 1px 4px 0 var(--elevation-shadow-key);background:linear-gradient(0deg,var(--elevation-surface-inner-shadow) 0%,var(--elevation-surface-inner-shadow) 100%);color:var(--content-brand-pressed)}.nav-item-container.neutral.nested{border-radius:0 4px 4px 0;border-left:1px solid var(--border-divider)}.nav-item-container.neutral.nested.active{border-left:1px solid var(--border-brand-navigation-active)}.nav-item-container:hover{background:var(--background-brand-navigation-hover);color:var(--content-brand-navigation-hover)}.nav-item-container.active{background:var(--background-brand-navigation-pressed);border-left:2px solid var(--border-brand-navigation-divider);color:var(--content-primary-inverse)}.nav-item-container:active.focused{outline:none}.nav-item-container .nav-item{display:flex;padding:0;align-items:center;gap:8px;flex:1 0 0;-webkit-user-select:none;user-select:none;outline:none;justify-content:space-between}.nav-item-container .nav-item:link,.nav-item-container .nav-item:visited,.nav-item-container .nav-item:link:hover,.nav-item-container .nav-item:visited:hover{text-decoration:none;color:inherit}.nav-item-container .nav-item .nav-item-left{display:flex;align-items:center;gap:8px}.nav-item-container .nav-item .nav-item-right{display:flex;align-items:center;gap:4px}.nav-item-container.focused{outline:1px solid var(--border-brand-focused);outline-offset:0}.nav-item-container.collapsed{padding:8px 12px;justify-content:center;border-left:none}.nav-item-container.collapsed .nav-item{justify-content:center;gap:0}.nav-item-container.nested{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;border-radius:0 4px 4px 0;border-left:1px solid var(--border-brand-navigation-divider);padding:4px 8px}.nav-item-container.nested.active{box-shadow:inset 0 1px 4px 0 var(--elevation-shadow-key)}\n"] }]
|
|
2489
|
+
}] });
|
|
2490
|
+
|
|
2491
|
+
function getNavTabIndex(parentMenuOpen) {
|
|
2492
|
+
return parentMenuOpen === false ? -1 : 0;
|
|
2493
|
+
}
|
|
2494
|
+
class NavMenuComponent {
|
|
2495
|
+
constructor() {
|
|
2496
|
+
this.id = input();
|
|
2497
|
+
this.icon = input();
|
|
2498
|
+
this.showIcon = input(true);
|
|
2499
|
+
this.label = input.required();
|
|
2500
|
+
this.collapsed = input(false);
|
|
2501
|
+
this.link = input();
|
|
2502
|
+
this.items = input.required();
|
|
2503
|
+
this.open = input(false);
|
|
2504
|
+
this.showMenuIcon = input(true);
|
|
2505
|
+
this.isNested = input(false);
|
|
2506
|
+
this.parentMenuOpen = input();
|
|
2507
|
+
this.appearance = input("brand");
|
|
2508
|
+
this.badge = input();
|
|
2509
|
+
this.showDivider = input(false);
|
|
2510
|
+
this.itemClick = output();
|
|
2511
|
+
this.openChange = output();
|
|
2512
|
+
this.hasNestedItems = computed(() => !!this.items().length);
|
|
2513
|
+
this.shouldShowMenu = computed(() => !this.collapsed() && this.hasNestedItems());
|
|
2514
|
+
this.tabIndex = computed(() => getNavTabIndex(this.parentMenuOpen()));
|
|
2515
|
+
this.dividerAppearance = computed(() => dividerAppearanceBySideNavAppearance[this.appearance()]);
|
|
2516
|
+
this.iconSize = computed(() => {
|
|
2517
|
+
return getNavItemLabelIconSize(this.isNested(), this.collapsed());
|
|
2518
|
+
});
|
|
2519
|
+
effect(() => {
|
|
2520
|
+
if (this.parentMenuOpen() === false && this.open()) {
|
|
2521
|
+
this.closeMenu();
|
|
2522
|
+
}
|
|
2523
|
+
}, { allowSignalWrites: true });
|
|
2524
|
+
}
|
|
2525
|
+
toggleMenu() {
|
|
2526
|
+
this.openChange.emit({ id: this.id() || this.label(), open: !this.open() });
|
|
2527
|
+
}
|
|
2528
|
+
handleEscape() {
|
|
2529
|
+
if (this.open()) {
|
|
2530
|
+
this.closeMenu();
|
|
2531
|
+
}
|
|
2532
|
+
}
|
|
2533
|
+
handleKeyDown(event) {
|
|
2534
|
+
if ([SPACE_KEY, ENTER_KEY].includes(event.key)) {
|
|
2535
|
+
event.preventDefault();
|
|
2536
|
+
this.toggleMenu();
|
|
2537
|
+
}
|
|
2538
|
+
if (event.key === ESCAPE_KEY) {
|
|
2539
|
+
event.preventDefault();
|
|
2540
|
+
this.handleEscape();
|
|
2541
|
+
}
|
|
2542
|
+
}
|
|
2543
|
+
hasNestedItemsForItem(item) {
|
|
2544
|
+
return !!item.items?.length;
|
|
2545
|
+
}
|
|
2546
|
+
handleMenuOpenChange(event) {
|
|
2547
|
+
const targetMenu = this.items().find((item) => item.id === event.id);
|
|
2548
|
+
if (targetMenu) {
|
|
2549
|
+
targetMenu.open = event.open;
|
|
2550
|
+
}
|
|
2551
|
+
}
|
|
2552
|
+
handleMenuClick(itemId) {
|
|
2553
|
+
const item = this.items().find((i) => i.id === itemId || i.label === itemId);
|
|
2554
|
+
if (item?.onClick) {
|
|
2555
|
+
item.onClick();
|
|
2556
|
+
}
|
|
2557
|
+
}
|
|
2558
|
+
closeMenu() {
|
|
2559
|
+
this.openChange.emit({ id: this.id() || this.label(), open: false });
|
|
2560
|
+
}
|
|
2561
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2562
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: NavMenuComponent, isStandalone: true, selector: "rte-nav-menu", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, showMenuIcon: { classPropertyName: "showMenuIcon", publicName: "showMenuIcon", isSignal: true, isRequired: false, transformFunction: null }, isNested: { classPropertyName: "isNested", publicName: "isNested", isSignal: true, isRequired: false, transformFunction: null }, parentMenuOpen: { classPropertyName: "parentMenuOpen", publicName: "parentMenuOpen", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, showDivider: { classPropertyName: "showDivider", publicName: "showDivider", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick", openChange: "openChange" }, ngImport: i0, template: "@if (collapsed() && label()) {\n <li\n class=\"nav-menu-container {{appearance()}}\"\n rteTooltip\n rteTooltipPosition=\"right\"\n rteTooltipAlignment=\"center\"\n [rteTooltipGap]=\"12\"\n [ngClass]=\"{ collapsed: collapsed(), open: open(), nested: isNested() }\"\n [rteTooltip]=\"label()\"\n [rteTooltipArrow]=\"false\"\n [rteTooltipShouldFocusTrigger]=\"false\">\n <ng-container [ngTemplateOutlet]=\"menuContentTemplate\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"nestedMenuTemplate\"></ng-container>\n </li>\n} @else {\n <li\n class=\"nav-menu-container {{appearance()}}\"\n [ngClass]=\"{ collapsed: collapsed(), open: open(), nested: isNested() }\">\n <ng-container [ngTemplateOutlet]=\"menuContentTemplate\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"nestedMenuTemplate\"></ng-container>\n </li>\n}\n\n<ng-template #menuContentTemplate>\n @if (link()) {\n <a\n class=\"nav-menu\"\n [href]=\"link()!\"\n [attr.tabindex]=\"tabIndex()\"\n [attr.aria-label]=\"label()\"\n (click)=\"toggleMenu()\">\n <div class=\"menu-content-left\">\n @if (showIcon() && icon()) {\n <rte-icon class=\"icon\" [name]=\"icon()!\" [size]=\"iconSize()\" />\n }\n @if (!collapsed()) {\n <span>{{ label() }}</span>\n }\n </div>\n <div class=\"menu-content-right\">\n @if (badge()) {\n <rte-badge\n [badgeType]=\"badge()!.badgeType || 'brand'\"\n [badgeSize]=\"badge()!.size || 'm'\"\n [badgeContent]=\"badge()!.content || 'number'\"\n [count]=\"badge()!.count\"\n [icon]=\"badge()!.icon || 'notification'\"\n [simpleBadge]=\"true\"\n />\n }\n @if (shouldShowMenu() && showMenuIcon()) {\n <rte-icon name=\"arrow-chevron-right\" class=\"menu-icon\" [ngClass]=\"{ 'menu-icon-open': open() }\" />\n }\n </div>\n </a>\n } @else {\n <span\n class=\"nav-menu\"\n [attr.tabindex]=\"tabIndex()\"\n [attr.aria-label]=\"label()\"\n (click)=\"toggleMenu()\"\n (keydown)=\"handleKeyDown($event)\">\n <div class=\"menu-content-left\">\n @if (showIcon() && icon()) {\n <rte-icon class=\"icon\" [name]=\"icon()!\" [size]=\"iconSize()\" />\n }\n @if (!collapsed()) {\n <span>{{ label() }}</span>\n }\n </div>\n <div class=\"menu-content-right\">\n @if (badge()) {\n <rte-badge\n [badgeType]=\"badge()!.badgeType || 'brand'\"\n [badgeSize]=\"badge()!.size || 'm'\"\n [badgeContent]=\"badge()!.content || 'number'\"\n [count]=\"badge()!.count\"\n [icon]=\"badge()!.icon || 'notification'\"\n [simpleBadge]=\"true\"\n />\n }\n @if (shouldShowMenu() && showMenuIcon()) {\n <rte-icon name=\"arrow-chevron-right\" class=\"menu-icon\" [ngClass]=\"{ 'menu-icon-open': open() }\" />\n }\n </div>\n </span>\n }\n</ng-template>\n\n<ng-template #nestedMenuTemplate>\n @if (shouldShowMenu()) {\n <ul class=\"nested-menu\" [ngClass]=\"{ 'nested-menu-open': open() }\">\n @if (open()) {\n @for (item of items(); track item.id || item.label) {\n @if (hasNestedItemsForItem(item)) {\n <rte-nav-menu\n [id]=\"item.id\"\n [label]=\"item.label\"\n [icon]=\"item.icon\"\n [showIcon]=\"item.showIcon ?? true\"\n [collapsed]=\"collapsed()\"\n [link]=\"item.link\"\n [items]=\"item.items || []\"\n [showMenuIcon]=\"showMenuIcon()\"\n [isNested]=\"true\"\n [open]=\"item.open\"\n [parentMenuOpen]=\"open()\"\n [appearance]=\"appearance()\"\n [showDivider]=\"item.showDivider!\"\n [badge]=\"item.badge\"\n (itemClick)=\"handleMenuClick($event)\"\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]=\"collapsed()\"\n [link]=\"item.link\"\n [isNested]=\"true\"\n [parentMenuOpen]=\"open()\"\n [appearance]=\"appearance()\"\n [showDivider]=\"item.showDivider!\"\n [badge]=\"item.badge\"\n (itemClick)=\"itemClick.emit($event)\" />\n </li>\n @if (item.showDivider) {\n <rte-divider [appearance]=\"dividerAppearance()\" />\n }\n }\n }\n }\n </ul>\n }\n</ng-template>\n\n@if (showDivider()) {\n <rte-divider [appearance]=\"dividerAppearance()\" />\n}\n\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:contents}.nav-menu-container{width:100%;display:flex;flex-direction:column;justify-content:flex-start;border-radius:4px;transition:background-color .3s;box-sizing:border-box}.nav-menu-container.neutral .nav-menu{color:var(--content-secondary)}.nav-menu-container.neutral .nav-menu:hover{background:var(--background-neutral-navigation-hover);color:var(--content-primary)}.nav-menu-container.neutral .nav-menu.focused{outline:none}.nav-menu-container.neutral.nested .nav-menu{border-radius:0 4px 4px 0;border-left:1px solid var(--border-divider)}.nav-menu-container .nav-menu{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;display:flex;padding:8px 6px;align-items:center;gap:8px;flex:1 0 0;-webkit-user-select:none;user-select:none;justify-content:space-between;width:100%;box-sizing:border-box;cursor:pointer;border-left:2px solid transparent;color:var(--content-brand-navigation-default)}.nav-menu-container .nav-menu .menu-content-left{display:flex;align-items:center;gap:8px}.nav-menu-container .nav-menu .menu-content-right{display:flex;align-items:center;gap:4px}.nav-menu-container .nav-menu:hover{border-radius:4px;background:var(--background-brand-navigation-hover);color:var(--content-brand-navigation-hover)}.nav-menu-container .nav-menu:link,.nav-menu-container .nav-menu:link:hover{text-decoration:none;color:inherit}.nav-menu-container .nav-menu:focus-visible{outline:1px solid var(--border-brand-focused);outline-offset:0;border-radius:4px}.nav-menu-container.collapsed .nav-menu{padding:8px 12px;justify-content:center;gap:0;border-left:none}.nav-menu-container.nested .nav-menu{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;border-radius:0 4px 4px 0;border-left:1px solid var(--border-brand-navigation-divider);padding:4px 8px}.nav-menu-container .menu-icon{flex-shrink:0;transition:transform .2s;margin-left:auto}.nav-menu-container .menu-icon-open{transform:rotate(90deg)}.nav-menu-container .nested-menu{list-style:none;margin:0;max-height:0;overflow:hidden;transition:max-height .3s,padding .3s;padding:0 0 0 16px;gap:0}.nav-menu-container .nested-menu.nested-menu-open{max-height:1000px;padding-top:4px;padding-bottom:4px}.nav-menu-container .icon{flex-shrink:0}\n"], dependencies: [{ kind: "component", type: NavMenuComponent, selector: "rte-nav-menu", inputs: ["id", "icon", "showIcon", "label", "collapsed", "link", "items", "open", "showMenuIcon", "isNested", "parentMenuOpen", "appearance", "badge", "showDivider"], outputs: ["itemClick", "openChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "rte-icon", inputs: ["name", "size", "color", "classes", "appearance"] }, { kind: "component", type: BadgeComponent, selector: "rte-badge", inputs: ["badgeType", "badgeSize", "badgeContent", "count", "icon", "simpleBadge"] }, { kind: "component", type: DividerComponent, selector: "rte-divider", inputs: ["orientation", "thickness", "appearance", "endPoint"] }, { kind: "component", type: NavItemComponent, selector: "rte-nav-item", inputs: ["id", "icon", "showIcon", "label", "collapsed", "link", "appearance", "active", "badge", "isNested", "parentMenuOpen", "role", "showDivider"], outputs: ["itemClick"] }, { kind: "directive", type: TooltipDirective, selector: "[rteTooltip]", inputs: ["rteTooltip", "rteTooltipPosition", "rteTooltipAlignment", "rteTooltipArrow", "rteTooltipShouldFocusTrigger", "rteTooltipGap"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2563
|
+
}
|
|
2564
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavMenuComponent, decorators: [{
|
|
2565
|
+
type: Component,
|
|
2566
|
+
args: [{ selector: "rte-nav-menu", imports: [CommonModule, IconComponent, BadgeComponent, DividerComponent, NavItemComponent, TooltipDirective], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (collapsed() && label()) {\n <li\n class=\"nav-menu-container {{appearance()}}\"\n rteTooltip\n rteTooltipPosition=\"right\"\n rteTooltipAlignment=\"center\"\n [rteTooltipGap]=\"12\"\n [ngClass]=\"{ collapsed: collapsed(), open: open(), nested: isNested() }\"\n [rteTooltip]=\"label()\"\n [rteTooltipArrow]=\"false\"\n [rteTooltipShouldFocusTrigger]=\"false\">\n <ng-container [ngTemplateOutlet]=\"menuContentTemplate\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"nestedMenuTemplate\"></ng-container>\n </li>\n} @else {\n <li\n class=\"nav-menu-container {{appearance()}}\"\n [ngClass]=\"{ collapsed: collapsed(), open: open(), nested: isNested() }\">\n <ng-container [ngTemplateOutlet]=\"menuContentTemplate\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"nestedMenuTemplate\"></ng-container>\n </li>\n}\n\n<ng-template #menuContentTemplate>\n @if (link()) {\n <a\n class=\"nav-menu\"\n [href]=\"link()!\"\n [attr.tabindex]=\"tabIndex()\"\n [attr.aria-label]=\"label()\"\n (click)=\"toggleMenu()\">\n <div class=\"menu-content-left\">\n @if (showIcon() && icon()) {\n <rte-icon class=\"icon\" [name]=\"icon()!\" [size]=\"iconSize()\" />\n }\n @if (!collapsed()) {\n <span>{{ label() }}</span>\n }\n </div>\n <div class=\"menu-content-right\">\n @if (badge()) {\n <rte-badge\n [badgeType]=\"badge()!.badgeType || 'brand'\"\n [badgeSize]=\"badge()!.size || 'm'\"\n [badgeContent]=\"badge()!.content || 'number'\"\n [count]=\"badge()!.count\"\n [icon]=\"badge()!.icon || 'notification'\"\n [simpleBadge]=\"true\"\n />\n }\n @if (shouldShowMenu() && showMenuIcon()) {\n <rte-icon name=\"arrow-chevron-right\" class=\"menu-icon\" [ngClass]=\"{ 'menu-icon-open': open() }\" />\n }\n </div>\n </a>\n } @else {\n <span\n class=\"nav-menu\"\n [attr.tabindex]=\"tabIndex()\"\n [attr.aria-label]=\"label()\"\n (click)=\"toggleMenu()\"\n (keydown)=\"handleKeyDown($event)\">\n <div class=\"menu-content-left\">\n @if (showIcon() && icon()) {\n <rte-icon class=\"icon\" [name]=\"icon()!\" [size]=\"iconSize()\" />\n }\n @if (!collapsed()) {\n <span>{{ label() }}</span>\n }\n </div>\n <div class=\"menu-content-right\">\n @if (badge()) {\n <rte-badge\n [badgeType]=\"badge()!.badgeType || 'brand'\"\n [badgeSize]=\"badge()!.size || 'm'\"\n [badgeContent]=\"badge()!.content || 'number'\"\n [count]=\"badge()!.count\"\n [icon]=\"badge()!.icon || 'notification'\"\n [simpleBadge]=\"true\"\n />\n }\n @if (shouldShowMenu() && showMenuIcon()) {\n <rte-icon name=\"arrow-chevron-right\" class=\"menu-icon\" [ngClass]=\"{ 'menu-icon-open': open() }\" />\n }\n </div>\n </span>\n }\n</ng-template>\n\n<ng-template #nestedMenuTemplate>\n @if (shouldShowMenu()) {\n <ul class=\"nested-menu\" [ngClass]=\"{ 'nested-menu-open': open() }\">\n @if (open()) {\n @for (item of items(); track item.id || item.label) {\n @if (hasNestedItemsForItem(item)) {\n <rte-nav-menu\n [id]=\"item.id\"\n [label]=\"item.label\"\n [icon]=\"item.icon\"\n [showIcon]=\"item.showIcon ?? true\"\n [collapsed]=\"collapsed()\"\n [link]=\"item.link\"\n [items]=\"item.items || []\"\n [showMenuIcon]=\"showMenuIcon()\"\n [isNested]=\"true\"\n [open]=\"item.open\"\n [parentMenuOpen]=\"open()\"\n [appearance]=\"appearance()\"\n [showDivider]=\"item.showDivider!\"\n [badge]=\"item.badge\"\n (itemClick)=\"handleMenuClick($event)\"\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]=\"collapsed()\"\n [link]=\"item.link\"\n [isNested]=\"true\"\n [parentMenuOpen]=\"open()\"\n [appearance]=\"appearance()\"\n [showDivider]=\"item.showDivider!\"\n [badge]=\"item.badge\"\n (itemClick)=\"itemClick.emit($event)\" />\n </li>\n @if (item.showDivider) {\n <rte-divider [appearance]=\"dividerAppearance()\" />\n }\n }\n }\n }\n </ul>\n }\n</ng-template>\n\n@if (showDivider()) {\n <rte-divider [appearance]=\"dividerAppearance()\" />\n}\n\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:contents}.nav-menu-container{width:100%;display:flex;flex-direction:column;justify-content:flex-start;border-radius:4px;transition:background-color .3s;box-sizing:border-box}.nav-menu-container.neutral .nav-menu{color:var(--content-secondary)}.nav-menu-container.neutral .nav-menu:hover{background:var(--background-neutral-navigation-hover);color:var(--content-primary)}.nav-menu-container.neutral .nav-menu.focused{outline:none}.nav-menu-container.neutral.nested .nav-menu{border-radius:0 4px 4px 0;border-left:1px solid var(--border-divider)}.nav-menu-container .nav-menu{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;display:flex;padding:8px 6px;align-items:center;gap:8px;flex:1 0 0;-webkit-user-select:none;user-select:none;justify-content:space-between;width:100%;box-sizing:border-box;cursor:pointer;border-left:2px solid transparent;color:var(--content-brand-navigation-default)}.nav-menu-container .nav-menu .menu-content-left{display:flex;align-items:center;gap:8px}.nav-menu-container .nav-menu .menu-content-right{display:flex;align-items:center;gap:4px}.nav-menu-container .nav-menu:hover{border-radius:4px;background:var(--background-brand-navigation-hover);color:var(--content-brand-navigation-hover)}.nav-menu-container .nav-menu:link,.nav-menu-container .nav-menu:link:hover{text-decoration:none;color:inherit}.nav-menu-container .nav-menu:focus-visible{outline:1px solid var(--border-brand-focused);outline-offset:0;border-radius:4px}.nav-menu-container.collapsed .nav-menu{padding:8px 12px;justify-content:center;gap:0;border-left:none}.nav-menu-container.nested .nav-menu{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;border-radius:0 4px 4px 0;border-left:1px solid var(--border-brand-navigation-divider);padding:4px 8px}.nav-menu-container .menu-icon{flex-shrink:0;transition:transform .2s;margin-left:auto}.nav-menu-container .menu-icon-open{transform:rotate(90deg)}.nav-menu-container .nested-menu{list-style:none;margin:0;max-height:0;overflow:hidden;transition:max-height .3s,padding .3s;padding:0 0 0 16px;gap:0}.nav-menu-container .nested-menu.nested-menu-open{max-height:1000px;padding-top:4px;padding-bottom:4px}.nav-menu-container .icon{flex-shrink:0}\n"] }]
|
|
2567
|
+
}], ctorParameters: () => [] });
|
|
2568
|
+
|
|
2569
|
+
const TRANSITION_DURATION = 300;
|
|
2570
|
+
class SideNavComponent {
|
|
2571
|
+
constructor() {
|
|
2572
|
+
this.size = input("m");
|
|
2573
|
+
this.collapsible = input(false);
|
|
2574
|
+
this.headerConfig = input();
|
|
2575
|
+
this.items = input([]);
|
|
2576
|
+
this.footerItems = input();
|
|
2577
|
+
this.collapsed = input(false);
|
|
2578
|
+
this.appearance = input("brand");
|
|
2579
|
+
this.isCollapsed = signal(false);
|
|
2580
|
+
this.shouldShowTitle = signal(true);
|
|
2581
|
+
this.itemClicked = output();
|
|
2582
|
+
this.titleTimeoutId = null;
|
|
2583
|
+
this.collapseIcon = computed(() => {
|
|
2584
|
+
return this.isCollapsed() ? "arrow-double-right" : "arrow-double-left";
|
|
2585
|
+
});
|
|
2586
|
+
this.dividerAppearance = computed(() => {
|
|
2587
|
+
return dividerAppearanceBySideNavAppearance[this.appearance()];
|
|
2588
|
+
});
|
|
2589
|
+
effect(() => {
|
|
2590
|
+
this.isCollapsed.set(this.collapsed());
|
|
2591
|
+
}, { allowSignalWrites: true });
|
|
2592
|
+
effect(() => {
|
|
2593
|
+
if (this.titleTimeoutId) {
|
|
2594
|
+
clearTimeout(this.titleTimeoutId);
|
|
2595
|
+
this.titleTimeoutId = null;
|
|
2596
|
+
}
|
|
2597
|
+
if (this.isCollapsed()) {
|
|
2598
|
+
this.shouldShowTitle.set(false);
|
|
2599
|
+
}
|
|
2600
|
+
else {
|
|
2601
|
+
this.titleTimeoutId = setTimeout(() => {
|
|
2602
|
+
this.shouldShowTitle.set(true);
|
|
2603
|
+
this.titleTimeoutId = null;
|
|
2604
|
+
}, TRANSITION_DURATION);
|
|
2605
|
+
}
|
|
2606
|
+
}, { allowSignalWrites: true });
|
|
2607
|
+
}
|
|
2608
|
+
handleHeaderKeyDown(event) {
|
|
2609
|
+
if ([SPACE_KEY, ENTER_KEY].includes(event.key)) {
|
|
2610
|
+
event.preventDefault();
|
|
2611
|
+
const config = this.headerConfig();
|
|
2612
|
+
if (config?.onClick) {
|
|
2613
|
+
config.onClick();
|
|
2614
|
+
}
|
|
2615
|
+
}
|
|
2616
|
+
}
|
|
2617
|
+
handleHeaderClick() {
|
|
2618
|
+
const config = this.headerConfig();
|
|
2619
|
+
if (config?.onClick) {
|
|
2620
|
+
config.onClick();
|
|
2621
|
+
}
|
|
2622
|
+
}
|
|
2623
|
+
hasNestedItems(item) {
|
|
2624
|
+
return !!item.items?.length;
|
|
2625
|
+
}
|
|
2626
|
+
handleItemClick(itemId) {
|
|
2627
|
+
this.itemClicked.emit(itemId);
|
|
2628
|
+
}
|
|
2629
|
+
handleFooterItemClick(itemId) {
|
|
2630
|
+
this.itemClicked.emit(itemId);
|
|
2631
|
+
}
|
|
2632
|
+
handleMenuOpenChange(event) {
|
|
2633
|
+
const targetMenu = this.items().find((item) => item.id === event.id);
|
|
2634
|
+
if (targetMenu) {
|
|
2635
|
+
targetMenu.open = event.open;
|
|
2636
|
+
}
|
|
2637
|
+
}
|
|
2638
|
+
handleFooterMenuOpenChange(event) {
|
|
2639
|
+
const targetMenu = this.footerItems()?.find((item) => item.id === event.id);
|
|
2640
|
+
if (targetMenu) {
|
|
2641
|
+
targetMenu.open = event.open;
|
|
2642
|
+
}
|
|
2643
|
+
}
|
|
2644
|
+
handleCollapseClick() {
|
|
2645
|
+
this.isCollapsed.set(!this.isCollapsed());
|
|
2646
|
+
}
|
|
2647
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SideNavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2648
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SideNavComponent, isStandalone: true, selector: "rte-side-nav", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, headerConfig: { classPropertyName: "headerConfig", publicName: "headerConfig", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, footerItems: { classPropertyName: "footerItems", publicName: "footerItems", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClicked: "itemClicked" }, ngImport: i0, 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"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: BaseSideNavComponent, selector: "rte-base-side-nav", inputs: ["size", "appearance", "collapsed", "showHeader", "showFooter"] }, { kind: "component", type: DividerComponent, selector: "rte-divider", inputs: ["orientation", "thickness", "appearance", "endPoint"] }, { kind: "component", type: NavItemComponent, selector: "rte-nav-item", inputs: ["id", "icon", "showIcon", "label", "collapsed", "link", "appearance", "active", "badge", "isNested", "parentMenuOpen", "role", "showDivider"], outputs: ["itemClick"] }, { kind: "component", type: NavMenuComponent, selector: "rte-nav-menu", inputs: ["id", "icon", "showIcon", "label", "collapsed", "link", "items", "open", "showMenuIcon", "isNested", "parentMenuOpen", "appearance", "badge", "showDivider"], outputs: ["itemClick", "openChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2649
|
+
}
|
|
2650
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SideNavComponent, decorators: [{
|
|
2651
|
+
type: Component,
|
|
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"] }]
|
|
2653
|
+
}], ctorParameters: () => [] });
|
|
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
|
+
|
|
2319
2812
|
/**
|
|
2320
2813
|
* Generated bundle index. Do not edit.
|
|
2321
2814
|
*/
|
|
2322
2815
|
|
|
2323
|
-
export { BadgeDirective, BannerComponent, BreadcrumbsComponent, ButtonComponent, CheckboxComponent, CheckboxGroupComponent, ChipComponent, ColDirective, DividerComponent, GridDirective, IconButtonComponent, IconButtonToggleComponent, IconComponent, LinkComponent, ModalDirective, ModalModule, ModalTriggerDirective, PopoverDirective, RadioButtonComponent, RadioButtonGroupComponent, SegmentedControlComponent, 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 };
|
|
2324
2817
|
//# sourceMappingURL=design-system-rte-angular.mjs.map
|