@design-system-rte/angular 1.3.0 → 1.4.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/esm2022/lib/components/dropdown/dropdown-item/dropdown-item.component.mjs +157 -14
- package/esm2022/lib/components/dropdown/dropdown-menu/dropdown-menu.component.mjs +71 -6
- package/esm2022/lib/components/dropdown/dropdown.directive.mjs +48 -39
- package/esm2022/lib/components/dropdown/dropdown.types.mjs +2 -0
- package/esm2022/lib/components/dropdown/index.mjs +1 -3
- package/esm2022/lib/components/segmented-control/segmented-control.component.mjs +5 -3
- package/esm2022/lib/components/stepper/stepper.component.mjs +3 -3
- package/esm2022/lib/components/tab/tab-item/tab-item.component.mjs +3 -3
- package/esm2022/lib/components/tab/tab.component.mjs +1 -1
- package/esm2022/lib/components/tag/tag.component.mjs +4 -3
- package/esm2022/public-api.mjs +9 -1
- package/fesm2022/design-system-rte-angular.mjs +318 -106
- package/fesm2022/design-system-rte-angular.mjs.map +1 -1
- package/lib/components/assistive-text/assistive-text.component.d.ts +1 -1
- package/lib/components/dropdown/dropdown-item/dropdown-item.component.d.ts +28 -16
- package/lib/components/dropdown/dropdown-menu/dropdown-menu.component.d.ts +14 -3
- package/lib/components/dropdown/dropdown.directive.d.ts +8 -4
- package/lib/components/dropdown/dropdown.types.d.ts +30 -0
- package/lib/components/dropdown/index.d.ts +1 -0
- package/lib/components/icon-button/icon-button.component.d.ts +1 -1
- package/lib/components/icon-button-toggle/icon-button-toggle.component.d.ts +1 -1
- package/lib/components/popover/popover.component.d.ts +1 -1
- package/lib/components/segmented-control/segmented-control.component.d.ts +3 -1
- package/lib/components/tab/tab.component.d.ts +1 -1
- package/lib/components/tag/tag.component.d.ts +2 -1
- package/lib/components/text-input/base-text-input/base-text-input.component.d.ts +1 -1
- package/lib/components/tooltip/tooltip.component.d.ts +1 -1
- package/package.json +2 -2
- package/public-api.d.ts +8 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, computed, Component, ChangeDetectionStrategy, HostBinding, Directive, inject, Injectable, DestroyRef, ChangeDetectorRef, effect, ElementRef, ViewContainerRef, Renderer2, HostListener, output, TemplateRef, contentChild, viewChild,
|
|
2
|
+
import { input, computed, Component, ChangeDetectionStrategy, HostBinding, Directive, inject, Injectable, DestroyRef, ChangeDetectorRef, effect, ElementRef, ViewContainerRef, Renderer2, HostListener, output, signal, TemplateRef, contentChild, viewChild, viewChildren, NgModule, 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';
|
|
@@ -14,12 +14,13 @@ import { FOCUSABLE_ELEMENTS_QUERY, FOCUSABLE_BUTTONS_QUERY } from '@design-syste
|
|
|
14
14
|
import { getShowIcon, getShowText, getDisplayCount, getBadgeIconSize, getShowBadge, shouldDisplayBadge } from '@design-system-rte/core/components/badge/badge.utils';
|
|
15
15
|
import { splitButtonLeftIconSize, splitButtonRightIconSize } from '@design-system-rte/core/components/split-button/split-button.constants';
|
|
16
16
|
import { SPACE_KEY, ENTER_KEY, ARROW_DOWN_KEY, ARROW_UP_KEY, ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ESCAPE_KEY, TAB_KEY, BACKSPACE_KEY, DELETE_KEY } from '@design-system-rte/core/constants/keyboard/keyboard.constants';
|
|
17
|
+
import { DropdownManager } from '@design-system-rte/core/components/dropdown/DropdownManager';
|
|
18
|
+
import { getAutoPlacementDropdown, getAutoAlignment, getCoordinates as getCoordinates$1, getAutoPlacement as getAutoPlacement$1 } from '@design-system-rte/core/components/utils/auto-placement';
|
|
19
|
+
import { logWarn, logError } from '@design-system-rte/core/utils/log-handlers';
|
|
17
20
|
import { BehaviorSubject } from 'rxjs';
|
|
18
21
|
import { map } from 'rxjs/operators';
|
|
19
22
|
import { waitForNextFrame } from '@design-system-rte/core/common/animation';
|
|
20
23
|
import { DROPDOWN_ANIMATION_DURATION } from '@design-system-rte/core/components/dropdown/dropdown.constants';
|
|
21
|
-
import { getAutoPlacementDropdown, getAutoAlignment, getCoordinates as getCoordinates$1, getAutoPlacement as getAutoPlacement$1 } from '@design-system-rte/core/components/utils/auto-placement';
|
|
22
|
-
import { DropdownManager } from '@design-system-rte/core/components/dropdown/DropdownManager';
|
|
23
24
|
import { ButtonIconSize } from '@design-system-rte/core/components/button/common/common-button.constants';
|
|
24
25
|
import { loaderSize } from '@design-system-rte/core/components/loader/loader.constants';
|
|
25
26
|
import { CHIP_TYPE_TO_ARIA_ROLE_MAP } from '@design-system-rte/core/components/chip/chip.constants';
|
|
@@ -919,11 +920,65 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
919
920
|
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}\n", styles: [":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"] }]
|
|
920
921
|
}] });
|
|
921
922
|
|
|
923
|
+
const focusNextElement = (dropdown) => {
|
|
924
|
+
const menuItems = getDropdownMenuItems(dropdown);
|
|
925
|
+
const activeElementIndex = menuItems.indexOf(document.activeElement);
|
|
926
|
+
if (activeElementIndex < menuItems.length - 1) {
|
|
927
|
+
const nextElement = menuItems[activeElementIndex + 1];
|
|
928
|
+
nextElement.focus();
|
|
929
|
+
}
|
|
930
|
+
else {
|
|
931
|
+
menuItems[0]?.focus();
|
|
932
|
+
}
|
|
933
|
+
};
|
|
934
|
+
const focusPreviousElement = (dropdown) => {
|
|
935
|
+
const menuItems = getDropdownMenuItems(dropdown);
|
|
936
|
+
const activeElementIndex = menuItems.indexOf(document.activeElement);
|
|
937
|
+
if (activeElementIndex > 0) {
|
|
938
|
+
const previousElement = menuItems[activeElementIndex - 1];
|
|
939
|
+
previousElement.focus();
|
|
940
|
+
}
|
|
941
|
+
else {
|
|
942
|
+
menuItems.at(-1)?.focus();
|
|
943
|
+
}
|
|
944
|
+
};
|
|
945
|
+
const focusDropdownFirstElement = (dropdownId) => {
|
|
946
|
+
const childDropdown = document.querySelector(`[data-menu-id='${dropdownId}']`);
|
|
947
|
+
if (childDropdown) {
|
|
948
|
+
const allChildDropdownElement = childDropdown?.querySelectorAll('li[role="menuitem"]');
|
|
949
|
+
allChildDropdownElement[0]?.focus();
|
|
950
|
+
}
|
|
951
|
+
};
|
|
952
|
+
const focusParentDropdownFirstElement = (dropdownId) => {
|
|
953
|
+
const parentDropdownId = DropdownManager.getParentDropdownId(dropdownId);
|
|
954
|
+
const parentDropdown = document.querySelector(`[data-menu-id='${parentDropdownId}']`);
|
|
955
|
+
parentDropdown?.querySelector("[data-active=true]")?.focus();
|
|
956
|
+
};
|
|
957
|
+
const getDropdownMenuItems = (dropdown) => {
|
|
958
|
+
const allDropdownElement = dropdown?.querySelectorAll('li[role="menuitem"]');
|
|
959
|
+
return allDropdownElement ? Array.from(allDropdownElement) : [];
|
|
960
|
+
};
|
|
961
|
+
|
|
962
|
+
const SUB_MENU_CLOSE_DELAY_MS = 300;
|
|
922
963
|
class DropdownItemComponent {
|
|
923
964
|
constructor() {
|
|
965
|
+
this.elementRef = inject(ElementRef);
|
|
966
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
924
967
|
this.item = input();
|
|
925
968
|
this.menuId = input();
|
|
926
969
|
this.itemEvent = output();
|
|
970
|
+
this.submenuRequest = output();
|
|
971
|
+
this.subMenuOpen = signal(false);
|
|
972
|
+
this.subMenuRef = null;
|
|
973
|
+
this.closeSubMenuTimeout = null;
|
|
974
|
+
this.subMenuSubscriptions = [];
|
|
975
|
+
this.dropdownManagerUnsubscribe = null;
|
|
976
|
+
this.hasChildren = computed(() => (this.item()?.children?.length ?? 0) > 0);
|
|
977
|
+
this.childDropdownId = computed(() => {
|
|
978
|
+
const menuId = this.menuId();
|
|
979
|
+
const label = this.item()?.label ?? "";
|
|
980
|
+
return menuId && label ? `${menuId}-${label.replace(/\s+/g, "")}` : "";
|
|
981
|
+
});
|
|
927
982
|
this.shouldDisplayBadge = computed(() => {
|
|
928
983
|
const item = this.item();
|
|
929
984
|
return shouldDisplayBadge({
|
|
@@ -933,6 +988,7 @@ class DropdownItemComponent {
|
|
|
933
988
|
badgeIcon: item?.badgeIcon,
|
|
934
989
|
});
|
|
935
990
|
});
|
|
991
|
+
this.boundHandleSubMenuMouseEnter = () => this.handleSubMenuMouseEnter();
|
|
936
992
|
}
|
|
937
993
|
handleClick(event) {
|
|
938
994
|
if (this.item()?.disabled) {
|
|
@@ -940,32 +996,157 @@ class DropdownItemComponent {
|
|
|
940
996
|
event.stopPropagation();
|
|
941
997
|
return;
|
|
942
998
|
}
|
|
999
|
+
if (this.hasChildren()) {
|
|
1000
|
+
event.preventDefault();
|
|
1001
|
+
event.stopPropagation();
|
|
1002
|
+
this.openSubMenu();
|
|
1003
|
+
return;
|
|
1004
|
+
}
|
|
943
1005
|
this.itemEvent.emit({
|
|
944
1006
|
event,
|
|
945
1007
|
id: this.item()?.id || this.item()?.label || "",
|
|
1008
|
+
item: this.item(),
|
|
946
1009
|
});
|
|
947
1010
|
}
|
|
948
1011
|
handleKeyDown(event) {
|
|
949
1012
|
event.preventDefault();
|
|
950
|
-
if ([SPACE_KEY, ENTER_KEY].includes(event.key)) {
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
1013
|
+
if (this.item()?.link && [SPACE_KEY, ENTER_KEY].includes(event.key)) {
|
|
1014
|
+
const link = event.target.closest("li")?.querySelector("a");
|
|
1015
|
+
link?.click();
|
|
1016
|
+
return;
|
|
1017
|
+
}
|
|
1018
|
+
if (this.hasChildren()) {
|
|
1019
|
+
if (event.key === SPACE_KEY) {
|
|
1020
|
+
this.openSubMenu();
|
|
1021
|
+
const childId = this.childDropdownId();
|
|
1022
|
+
if (childId) {
|
|
1023
|
+
setTimeout(() => focusDropdownFirstElement(childId), 0);
|
|
1024
|
+
}
|
|
960
1025
|
}
|
|
1026
|
+
return;
|
|
1027
|
+
}
|
|
1028
|
+
if ([SPACE_KEY, ENTER_KEY].includes(event.key)) {
|
|
1029
|
+
this.itemEvent.emit({
|
|
1030
|
+
event,
|
|
1031
|
+
id: this.item()?.id || this.item()?.label || "",
|
|
1032
|
+
item: this.item(),
|
|
1033
|
+
});
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
handleMouseEnter() {
|
|
1037
|
+
if (this.item()?.disabled || !this.hasChildren())
|
|
1038
|
+
return;
|
|
1039
|
+
const menuId = this.menuId();
|
|
1040
|
+
const childId = this.childDropdownId();
|
|
1041
|
+
if (menuId) {
|
|
1042
|
+
DropdownManager.closeSubMenus(menuId, childId);
|
|
1043
|
+
this.openSubMenu();
|
|
961
1044
|
}
|
|
962
1045
|
}
|
|
1046
|
+
handleFocus() {
|
|
1047
|
+
if (this.item()?.disabled || !this.hasChildren())
|
|
1048
|
+
return;
|
|
1049
|
+
const menuId = this.menuId();
|
|
1050
|
+
const childId = this.childDropdownId();
|
|
1051
|
+
if (menuId) {
|
|
1052
|
+
DropdownManager.closeSubMenus(menuId, childId);
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
handleMouseLeave() {
|
|
1056
|
+
if (!this.hasChildren())
|
|
1057
|
+
return;
|
|
1058
|
+
this.scheduleCloseSubMenu();
|
|
1059
|
+
}
|
|
1060
|
+
handleSubMenuMouseEnter() {
|
|
1061
|
+
this.cancelCloseSubMenu();
|
|
1062
|
+
}
|
|
1063
|
+
openSubMenuForKeyboard() {
|
|
1064
|
+
this.openSubMenu();
|
|
1065
|
+
const childId = this.childDropdownId();
|
|
1066
|
+
if (childId) {
|
|
1067
|
+
setTimeout(() => focusDropdownFirstElement(childId), 0);
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
openSubMenu() {
|
|
1071
|
+
if (this.subMenuRef)
|
|
1072
|
+
return;
|
|
1073
|
+
const children = this.item()?.children;
|
|
1074
|
+
const childId = this.childDropdownId();
|
|
1075
|
+
if (!children?.length || !childId)
|
|
1076
|
+
return;
|
|
1077
|
+
const triggerElement = this.elementRef.nativeElement.querySelector("li.rte-dropdown-item");
|
|
1078
|
+
if (!triggerElement)
|
|
1079
|
+
return;
|
|
1080
|
+
DropdownManager.open(childId);
|
|
1081
|
+
this.submenuRequest.emit({
|
|
1082
|
+
children,
|
|
1083
|
+
childId,
|
|
1084
|
+
triggerElement,
|
|
1085
|
+
onCreated: (result) => this.wireSubmenu(result),
|
|
1086
|
+
});
|
|
1087
|
+
}
|
|
1088
|
+
wireSubmenu(result) {
|
|
1089
|
+
if (this.subMenuRef)
|
|
1090
|
+
return;
|
|
1091
|
+
this.subMenuRef = result.componentRef;
|
|
1092
|
+
const hostElement = result.hostElement;
|
|
1093
|
+
const childId = this.childDropdownId();
|
|
1094
|
+
this.dropdownManagerUnsubscribe = DropdownManager.subscribe(childId ?? "", () => this.destroySubMenu());
|
|
1095
|
+
const menuInstance = this.subMenuRef.instance;
|
|
1096
|
+
const itemSub = menuInstance.itemEvent.subscribe((emittedItemEvent) => {
|
|
1097
|
+
this.itemEvent.emit({ ...emittedItemEvent, item: emittedItemEvent.item });
|
|
1098
|
+
});
|
|
1099
|
+
const closeSub = menuInstance.closingMenu.subscribe(() => {
|
|
1100
|
+
this.destroySubMenu();
|
|
1101
|
+
});
|
|
1102
|
+
this.subMenuSubscriptions.push(() => {
|
|
1103
|
+
itemSub.unsubscribe();
|
|
1104
|
+
closeSub.unsubscribe();
|
|
1105
|
+
});
|
|
1106
|
+
hostElement.addEventListener("mouseenter", this.boundHandleSubMenuMouseEnter);
|
|
1107
|
+
this.subMenuOpen.set(true);
|
|
1108
|
+
this.cdr.markForCheck();
|
|
1109
|
+
}
|
|
1110
|
+
scheduleCloseSubMenu() {
|
|
1111
|
+
this.cancelCloseSubMenu();
|
|
1112
|
+
this.closeSubMenuTimeout = setTimeout(() => {
|
|
1113
|
+
this.closeSubMenuTimeout = null;
|
|
1114
|
+
this.destroySubMenu();
|
|
1115
|
+
}, SUB_MENU_CLOSE_DELAY_MS);
|
|
1116
|
+
}
|
|
1117
|
+
cancelCloseSubMenu() {
|
|
1118
|
+
if (this.closeSubMenuTimeout) {
|
|
1119
|
+
clearTimeout(this.closeSubMenuTimeout);
|
|
1120
|
+
this.closeSubMenuTimeout = null;
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
destroySubMenu() {
|
|
1124
|
+
this.cancelCloseSubMenu();
|
|
1125
|
+
this.subMenuSubscriptions.forEach((unsubscribe) => unsubscribe());
|
|
1126
|
+
this.subMenuSubscriptions = [];
|
|
1127
|
+
if (this.subMenuRef) {
|
|
1128
|
+
const hostElement = this.subMenuRef.location.nativeElement;
|
|
1129
|
+
hostElement.removeEventListener("mouseenter", this.boundHandleSubMenuMouseEnter);
|
|
1130
|
+
const childId = this.childDropdownId();
|
|
1131
|
+
this.dropdownManagerUnsubscribe?.();
|
|
1132
|
+
this.dropdownManagerUnsubscribe = null;
|
|
1133
|
+
if (childId)
|
|
1134
|
+
DropdownManager.close(childId);
|
|
1135
|
+
this.subMenuRef.destroy();
|
|
1136
|
+
this.subMenuRef = null;
|
|
1137
|
+
}
|
|
1138
|
+
this.subMenuOpen.set(false);
|
|
1139
|
+
this.cdr.markForCheck();
|
|
1140
|
+
}
|
|
1141
|
+
ngOnDestroy() {
|
|
1142
|
+
this.destroySubMenu();
|
|
1143
|
+
}
|
|
963
1144
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DropdownItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
964
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: DropdownItemComponent, isStandalone: true, selector: "rte-dropdown-item", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, menuId: { classPropertyName: "menuId", publicName: "menuId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemEvent: "itemEvent" }, ngImport: i0, template: "<ng-container>\n <li\n #itemRef\n class=\"rte-dropdown-item\"\n role=\"menuitem\"\n tabindex=\"0\"\n [attr.data-disabled]=\"item()?.disabled\"\n [attr.data-active]=\"item()?.selected\"\n (click)=\"handleClick($event)\"\n (keydown)=\"handleKeyDown($event)\"\n >\n <span *ngIf=\"item()?.hasIndent && !item()?.leftIcon\" style=\"width: 20px\"></span>\n <rte-icon *ngIf=\"item()?.leftIcon\" [name]=\"item()?.leftIcon ?? ''\" />\n <ng-container [ngSwitch]=\"!!item()?.link\">\n <a *ngSwitchCase=\"true\" style=\"flex: 2; text-decoration: none; color: inherit\" [href]=\"item()?.link\"\n >{{ item()?.label }}\n </a>\n <span *ngSwitchDefault style=\"flex: 2\">{{ item()?.label }}</span>\n </ng-container>\n <div *ngIf=\"item()?.trailingText\">{{ item()?.trailingText }}</div>\n <rte-badge\n *ngIf=\"shouldDisplayBadge()\"\n [badgeType]=\"item()?.badgeType!\"\n [badgeContent]=\"item()?.badgeContent!\"\n [count]=\"item()?.badgeCount\"\n [simpleBadge]=\"true\"\n [icon]=\"item()?.badgeIcon ?? ''\"\n [badgeSize]=\"item()?.badgeSize!\"\n ></rte-badge>\n </li>\n <div *ngIf=\"item()?.hasSeparator\" class=\"dropdown-divider\">\n <rte-divider />\n </div>\n</ng-container>\n", styles: [".rte-dropdown-item{font-family:Arial;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;color:var(--content-secondary);display:flex;height:40px;padding:8px 12px;align-items:center;gap:12px;align-self:stretch;cursor:pointer;box-sizing:border-box}.rte-dropdown-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rte-dropdown-item:hover{background-color:var(--background-hover)}.rte-dropdown-item[data-disabled=true]{cursor:not-allowed;color:var(--content-disabled);background:var(--background-disabled)}.rte-dropdown-item[data-active=true]{background-color:var(--background-brand-inverse-pressed)}.rte-dropdown-item:focus-visible{outline:none;background-color:var(--background-hover)}.dropdown-divider{width:100%;padding:8px 0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: IconComponent, selector: "rte-icon", inputs: ["name", "size", "color", "classes", "appearance"] }, { kind: "component", type: DividerComponent, selector: "rte-divider", inputs: ["orientation", "thickness", "appearance", "endPoint"] }, { kind: "component", type: BadgeComponent, selector: "rte-badge", inputs: ["badgeType", "badgeSize", "badgeContent", "count", "icon", "simpleBadge"] }] }); }
|
|
1145
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: DropdownItemComponent, isStandalone: true, selector: "rte-dropdown-item", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, menuId: { classPropertyName: "menuId", publicName: "menuId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemEvent: "itemEvent", submenuRequest: "submenuRequest" }, ngImport: i0, template: "<ng-container>\n <li\n #itemRef\n class=\"rte-dropdown-item\"\n role=\"menuitem\"\n tabindex=\"0\"\n [attr.data-disabled]=\"item()?.disabled\"\n [attr.data-active]=\"hasChildren() ? subMenuOpen() : item()?.selected\"\n [attr.aria-haspopup]=\"hasChildren() ? 'menu' : null\"\n [attr.aria-expanded]=\"hasChildren() ? subMenuOpen() : null\"\n (click)=\"handleClick($event)\"\n (keydown)=\"handleKeyDown($event)\"\n (mouseenter)=\"handleMouseEnter()\"\n (mouseleave)=\"handleMouseLeave()\"\n (focus)=\"handleFocus()\"\n >\n <span *ngIf=\"item()?.hasIndent && !item()?.leftIcon\" style=\"width: 20px\"></span>\n <rte-icon *ngIf=\"item()?.leftIcon\" [name]=\"item()?.leftIcon ?? ''\" />\n <ng-container [ngSwitch]=\"!!item()?.link\">\n <a *ngSwitchCase=\"true\" style=\"flex: 2; text-decoration: none; color: inherit\" [href]=\"item()?.link\"\n >{{ item()?.label }}\n </a>\n <span *ngSwitchDefault style=\"flex: 2\">{{ item()?.label }}</span>\n </ng-container>\n <rte-icon *ngIf=\"hasChildren()\" name=\"arrow-chevron-right\" />\n <div *ngIf=\"item()?.trailingText\">{{ item()?.trailingText }}</div>\n <rte-badge\n *ngIf=\"shouldDisplayBadge()\"\n [badgeType]=\"item()?.badgeType!\"\n [badgeContent]=\"item()?.badgeContent!\"\n [count]=\"item()?.badgeCount\"\n [simpleBadge]=\"true\"\n [icon]=\"item()?.badgeIcon ?? ''\"\n [badgeSize]=\"item()?.badgeSize!\"\n ></rte-badge>\n </li>\n <div *ngIf=\"item()?.hasSeparator\" class=\"dropdown-divider\">\n <rte-divider />\n </div>\n</ng-container>\n", styles: [".rte-dropdown-item{font-family:Arial;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;color:var(--content-secondary);display:flex;height:40px;padding:8px 12px;align-items:center;gap:12px;align-self:stretch;cursor:pointer;box-sizing:border-box}.rte-dropdown-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rte-dropdown-item:hover{background-color:var(--background-hover)}.rte-dropdown-item[data-disabled=true]{cursor:not-allowed;color:var(--content-disabled);background:var(--background-disabled)}.rte-dropdown-item[data-active=true]{background-color:var(--background-brand-inverse-pressed)}.rte-dropdown-item:focus-visible{outline:none;background-color:var(--background-hover)}.dropdown-divider{width:100%;padding:8px 0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: IconComponent, selector: "rte-icon", inputs: ["name", "size", "color", "classes", "appearance"] }, { kind: "component", type: DividerComponent, selector: "rte-divider", inputs: ["orientation", "thickness", "appearance", "endPoint"] }, { kind: "component", type: BadgeComponent, selector: "rte-badge", inputs: ["badgeType", "badgeSize", "badgeContent", "count", "icon", "simpleBadge"] }] }); }
|
|
965
1146
|
}
|
|
966
1147
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DropdownItemComponent, decorators: [{
|
|
967
1148
|
type: Component,
|
|
968
|
-
args: [{ selector: "rte-dropdown-item", imports: [CommonModule, IconComponent, DividerComponent, BadgeComponent], standalone: true, template: "<ng-container>\n <li\n #itemRef\n class=\"rte-dropdown-item\"\n role=\"menuitem\"\n tabindex=\"0\"\n [attr.data-disabled]=\"item()?.disabled\"\n [attr.data-active]=\"item()?.selected\"\n (click)=\"handleClick($event)\"\n (keydown)=\"handleKeyDown($event)\"\n >\n <span *ngIf=\"item()?.hasIndent && !item()?.leftIcon\" style=\"width: 20px\"></span>\n <rte-icon *ngIf=\"item()?.leftIcon\" [name]=\"item()?.leftIcon ?? ''\" />\n <ng-container [ngSwitch]=\"!!item()?.link\">\n <a *ngSwitchCase=\"true\" style=\"flex: 2; text-decoration: none; color: inherit\" [href]=\"item()?.link\"\n >{{ item()?.label }}\n </a>\n <span *ngSwitchDefault style=\"flex: 2\">{{ item()?.label }}</span>\n </ng-container>\n <div *ngIf=\"item()?.trailingText\">{{ item()?.trailingText }}</div>\n <rte-badge\n *ngIf=\"shouldDisplayBadge()\"\n [badgeType]=\"item()?.badgeType!\"\n [badgeContent]=\"item()?.badgeContent!\"\n [count]=\"item()?.badgeCount\"\n [simpleBadge]=\"true\"\n [icon]=\"item()?.badgeIcon ?? ''\"\n [badgeSize]=\"item()?.badgeSize!\"\n ></rte-badge>\n </li>\n <div *ngIf=\"item()?.hasSeparator\" class=\"dropdown-divider\">\n <rte-divider />\n </div>\n</ng-container>\n", styles: [".rte-dropdown-item{font-family:Arial;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;color:var(--content-secondary);display:flex;height:40px;padding:8px 12px;align-items:center;gap:12px;align-self:stretch;cursor:pointer;box-sizing:border-box}.rte-dropdown-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rte-dropdown-item:hover{background-color:var(--background-hover)}.rte-dropdown-item[data-disabled=true]{cursor:not-allowed;color:var(--content-disabled);background:var(--background-disabled)}.rte-dropdown-item[data-active=true]{background-color:var(--background-brand-inverse-pressed)}.rte-dropdown-item:focus-visible{outline:none;background-color:var(--background-hover)}.dropdown-divider{width:100%;padding:8px 0}\n"] }]
|
|
1149
|
+
args: [{ selector: "rte-dropdown-item", imports: [CommonModule, IconComponent, DividerComponent, BadgeComponent], standalone: true, template: "<ng-container>\n <li\n #itemRef\n class=\"rte-dropdown-item\"\n role=\"menuitem\"\n tabindex=\"0\"\n [attr.data-disabled]=\"item()?.disabled\"\n [attr.data-active]=\"hasChildren() ? subMenuOpen() : item()?.selected\"\n [attr.aria-haspopup]=\"hasChildren() ? 'menu' : null\"\n [attr.aria-expanded]=\"hasChildren() ? subMenuOpen() : null\"\n (click)=\"handleClick($event)\"\n (keydown)=\"handleKeyDown($event)\"\n (mouseenter)=\"handleMouseEnter()\"\n (mouseleave)=\"handleMouseLeave()\"\n (focus)=\"handleFocus()\"\n >\n <span *ngIf=\"item()?.hasIndent && !item()?.leftIcon\" style=\"width: 20px\"></span>\n <rte-icon *ngIf=\"item()?.leftIcon\" [name]=\"item()?.leftIcon ?? ''\" />\n <ng-container [ngSwitch]=\"!!item()?.link\">\n <a *ngSwitchCase=\"true\" style=\"flex: 2; text-decoration: none; color: inherit\" [href]=\"item()?.link\"\n >{{ item()?.label }}\n </a>\n <span *ngSwitchDefault style=\"flex: 2\">{{ item()?.label }}</span>\n </ng-container>\n <rte-icon *ngIf=\"hasChildren()\" name=\"arrow-chevron-right\" />\n <div *ngIf=\"item()?.trailingText\">{{ item()?.trailingText }}</div>\n <rte-badge\n *ngIf=\"shouldDisplayBadge()\"\n [badgeType]=\"item()?.badgeType!\"\n [badgeContent]=\"item()?.badgeContent!\"\n [count]=\"item()?.badgeCount\"\n [simpleBadge]=\"true\"\n [icon]=\"item()?.badgeIcon ?? ''\"\n [badgeSize]=\"item()?.badgeSize!\"\n ></rte-badge>\n </li>\n <div *ngIf=\"item()?.hasSeparator\" class=\"dropdown-divider\">\n <rte-divider />\n </div>\n</ng-container>\n", styles: [".rte-dropdown-item{font-family:Arial;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;color:var(--content-secondary);display:flex;height:40px;padding:8px 12px;align-items:center;gap:12px;align-self:stretch;cursor:pointer;box-sizing:border-box}.rte-dropdown-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rte-dropdown-item:hover{background-color:var(--background-hover)}.rte-dropdown-item[data-disabled=true]{cursor:not-allowed;color:var(--content-disabled);background:var(--background-disabled)}.rte-dropdown-item[data-active=true]{background-color:var(--background-brand-inverse-pressed)}.rte-dropdown-item:focus-visible{outline:none;background-color:var(--background-hover)}.dropdown-divider{width:100%;padding:8px 0}\n"] }]
|
|
969
1150
|
}] });
|
|
970
1151
|
|
|
971
1152
|
class DropdownMenuFooterDirective {
|
|
@@ -1076,7 +1257,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1076
1257
|
class DropdownMenuComponent {
|
|
1077
1258
|
constructor() {
|
|
1078
1259
|
this.elementRef = inject(ElementRef);
|
|
1260
|
+
this.pendingPositioningFrameId = null;
|
|
1079
1261
|
this.dropdownService = inject(DropdownService);
|
|
1262
|
+
this.overlayService = inject(OverlayService);
|
|
1263
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
|
1080
1264
|
this.items = input([]);
|
|
1081
1265
|
this.menuId = input();
|
|
1082
1266
|
this.itemEvent = output();
|
|
@@ -1093,6 +1277,7 @@ class DropdownMenuComponent {
|
|
|
1093
1277
|
this.footerTemplate = input(undefined);
|
|
1094
1278
|
this.headerContentRef = viewChild("headerContent");
|
|
1095
1279
|
this.footerContentRef = viewChild("footerContent");
|
|
1280
|
+
this.itemComponents = viewChildren(DropdownItemComponent);
|
|
1096
1281
|
this.hasHeaderContent = computed(() => {
|
|
1097
1282
|
const hasTemplate = !!this.headerTemplate();
|
|
1098
1283
|
const hasProjectedContent = !!this.headerContentRef()?.nativeElement?.children.length;
|
|
@@ -1104,34 +1289,90 @@ class DropdownMenuComponent {
|
|
|
1104
1289
|
return hasTemplate || hasProjectedContent;
|
|
1105
1290
|
});
|
|
1106
1291
|
}
|
|
1292
|
+
static { this.SUB_MENU_OFFSET = 4; }
|
|
1107
1293
|
getChildMenuId(itemIndex) {
|
|
1108
1294
|
return `${this.menuId()}:${itemIndex + 1}`;
|
|
1109
1295
|
}
|
|
1110
1296
|
handleItemEvent(itemEvent) {
|
|
1111
1297
|
this.itemEvent.emit(itemEvent);
|
|
1112
1298
|
}
|
|
1299
|
+
handleSubmenuRequest(event) {
|
|
1300
|
+
const { children, childId, triggerElement, onCreated } = event;
|
|
1301
|
+
const componentRef = this.overlayService.create(DropdownMenuComponent, this.viewContainerRef);
|
|
1302
|
+
componentRef.setInput("items", children);
|
|
1303
|
+
componentRef.setInput("menuId", childId);
|
|
1304
|
+
componentRef.setInput("isOpen", true);
|
|
1305
|
+
const hostElement = componentRef.location.nativeElement;
|
|
1306
|
+
this.cancelPendingPositioningFrame();
|
|
1307
|
+
this.pendingPositioningFrameId = requestAnimationFrame(() => {
|
|
1308
|
+
this.pendingPositioningFrameId = null;
|
|
1309
|
+
try {
|
|
1310
|
+
const subMenuHost = componentRef.location?.nativeElement;
|
|
1311
|
+
const menuElement = subMenuHost?.querySelector(".rte-dropdown-menu");
|
|
1312
|
+
if (!triggerElement || !menuElement) {
|
|
1313
|
+
logWarn("DropdownMenuComponent", "Unable to position submenu: required DOM elements not found.");
|
|
1314
|
+
return;
|
|
1315
|
+
}
|
|
1316
|
+
const position = getAutoPlacementDropdown({
|
|
1317
|
+
hostElement: triggerElement,
|
|
1318
|
+
castedElement: menuElement,
|
|
1319
|
+
defaultPosition: "right",
|
|
1320
|
+
offset: DropdownMenuComponent.SUB_MENU_OFFSET,
|
|
1321
|
+
hasDropdownParent: true,
|
|
1322
|
+
});
|
|
1323
|
+
const alignment = getAutoAlignment(triggerElement, menuElement, position);
|
|
1324
|
+
const coords = getCoordinates$1(position, triggerElement, menuElement, DropdownMenuComponent.SUB_MENU_OFFSET, alignment);
|
|
1325
|
+
hostElement.style.display = "block";
|
|
1326
|
+
hostElement.style.position = "absolute";
|
|
1327
|
+
hostElement.style.top = `${coords.top}px`;
|
|
1328
|
+
hostElement.style.left = `${coords.left}px`;
|
|
1329
|
+
hostElement.style.opacity = "1";
|
|
1330
|
+
}
|
|
1331
|
+
catch (error) {
|
|
1332
|
+
logError("DropdownMenuComponent", "Error while positioning submenu:", error);
|
|
1333
|
+
}
|
|
1334
|
+
});
|
|
1335
|
+
onCreated({ componentRef, hostElement });
|
|
1336
|
+
}
|
|
1337
|
+
ngOnDestroy() {
|
|
1338
|
+
this.cancelPendingPositioningFrame();
|
|
1339
|
+
}
|
|
1340
|
+
cancelPendingPositioningFrame() {
|
|
1341
|
+
if (this.pendingPositioningFrameId !== null) {
|
|
1342
|
+
cancelAnimationFrame(this.pendingPositioningFrameId);
|
|
1343
|
+
this.pendingPositioningFrameId = null;
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1113
1346
|
onKeyDown(event) {
|
|
1114
1347
|
if (!event.target || !this.menuId()) {
|
|
1115
1348
|
return;
|
|
1116
1349
|
}
|
|
1117
|
-
if ([ARROW_UP_KEY, ARROW_DOWN_KEY,
|
|
1350
|
+
if ([ARROW_UP_KEY, ARROW_DOWN_KEY, TAB_KEY].includes(event.key)) {
|
|
1118
1351
|
event.preventDefault();
|
|
1119
1352
|
}
|
|
1120
1353
|
if (event.key === ESCAPE_KEY) {
|
|
1121
1354
|
this.closingMenu.emit();
|
|
1122
1355
|
}
|
|
1123
1356
|
const menuId = this.menuId();
|
|
1357
|
+
if (event.key === TAB_KEY && event.shiftKey) {
|
|
1358
|
+
const parentMenuId = DropdownManager.getParentDropdownId(menuId);
|
|
1359
|
+
if (parentMenuId) {
|
|
1360
|
+
focusParentDropdownFirstElement(menuId);
|
|
1361
|
+
this.closingMenu.emit();
|
|
1362
|
+
return;
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1124
1365
|
this.dropdownService.handleKeyboardInput(event.key, {
|
|
1125
1366
|
menuElement: this.elementRef,
|
|
1126
1367
|
menuId,
|
|
1127
1368
|
});
|
|
1128
1369
|
}
|
|
1129
1370
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DropdownMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1130
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: DropdownMenuComponent, isStandalone: true, selector: "rte-dropdown-menu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, menuId: { classPropertyName: "menuId", publicName: "menuId", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, headerTemplate: { classPropertyName: "headerTemplate", publicName: "headerTemplate", isSignal: true, isRequired: false, transformFunction: null }, footerTemplate: { classPropertyName: "footerTemplate", publicName: "footerTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemEvent: "itemEvent", closingMenu: "closingMenu" }, host: { listeners: { "keydown": "onKeyDown($event)" }, properties: { "attr.data-menu-id": "menuId()" } }, queries: [{ propertyName: "headerDirective", first: true, predicate: DropdownMenuHeaderDirective, descendants: true, isSignal: true }, { propertyName: "footerDirective", first: true, predicate: DropdownMenuFooterDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "headerContentRef", first: true, predicate: ["headerContent"], descendants: true, isSignal: true }, { propertyName: "footerContentRef", first: true, predicate: ["footerContent"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"rte-dropdown-menu {{ isOpen() ? 'open' : 'closed' }}\" [ngStyle]=\"menuStyle()\">\n @if (hasHeaderContent()) {\n <div class=\"rte-dropdown-menu-header\">\n @if (headerTemplate() || headerDirective()?.templateRef) {\n <ng-container [ngTemplateOutlet]=\"(headerTemplate() || headerDirective()?.templateRef) ?? null\"></ng-container>\n } @else {\n <div #headerContent>\n <ng-content select=\"[dropdown-menu-header]\"></ng-content>\n </div>\n }\n <rte-divider />\n </div>\n }\n <div class=\"rte-dropdown-menu-content\">\n <ul class=\"rte-dropdown-items\" role=\"menu\" [attr.aria-activedescendant]=\"menuId()\">\n @for (item of items(); track item.label; let i = $index) {\n <rte-dropdown-item
|
|
1371
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: DropdownMenuComponent, isStandalone: true, selector: "rte-dropdown-menu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, menuId: { classPropertyName: "menuId", publicName: "menuId", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, headerTemplate: { classPropertyName: "headerTemplate", publicName: "headerTemplate", isSignal: true, isRequired: false, transformFunction: null }, footerTemplate: { classPropertyName: "footerTemplate", publicName: "footerTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemEvent: "itemEvent", closingMenu: "closingMenu" }, host: { listeners: { "keydown": "onKeyDown($event)" }, properties: { "attr.data-menu-id": "menuId()" } }, queries: [{ propertyName: "headerDirective", first: true, predicate: DropdownMenuHeaderDirective, descendants: true, isSignal: true }, { propertyName: "footerDirective", first: true, predicate: DropdownMenuFooterDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "headerContentRef", first: true, predicate: ["headerContent"], descendants: true, isSignal: true }, { propertyName: "footerContentRef", first: true, predicate: ["footerContent"], descendants: true, isSignal: true }, { propertyName: "itemComponents", predicate: DropdownItemComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"rte-dropdown-menu {{ isOpen() ? 'open' : 'closed' }}\" [ngStyle]=\"menuStyle()\">\n @if (hasHeaderContent()) {\n <div class=\"rte-dropdown-menu-header\">\n @if (headerTemplate() || headerDirective()?.templateRef) {\n <ng-container [ngTemplateOutlet]=\"(headerTemplate() || headerDirective()?.templateRef) ?? null\"></ng-container>\n } @else {\n <div #headerContent>\n <ng-content select=\"[dropdown-menu-header]\"></ng-content>\n </div>\n }\n <rte-divider />\n </div>\n }\n <div class=\"rte-dropdown-menu-content\">\n <ul class=\"rte-dropdown-items\" role=\"menu\" [attr.aria-activedescendant]=\"menuId()\">\n @for (item of items(); track item.label; let i = $index) {\n <rte-dropdown-item\n [item]=\"item\"\n [menuId]=\"menuId()\"\n (itemEvent)=\"handleItemEvent($event)\"\n (submenuRequest)=\"handleSubmenuRequest($event)\"\n />\n }\n </ul>\n </div>\n @if (hasFooterContent()) {\n <div class=\"rte-dropdown-menu-footer\">\n <rte-divider />\n @if (footerTemplate() || footerDirective()?.templateRef) {\n <ng-container [ngTemplateOutlet]=\"(footerTemplate() || footerDirective()?.templateRef) ?? null\"></ng-container>\n } @else {\n <div #footerContent>\n <ng-content select=\"[dropdown-menu-footer]\"></ng-content>\n </div>\n }\n </div>\n }\n</div>\n", styles: [":host{display:none;position:absolute}.rte-dropdown-menu{opacity:0;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%);background-color:var(--background-default);position:absolute;top:0;left:0;display:flex;min-width:112px;max-width:280px;padding:8px 0;flex-direction:column;align-items:flex-start;gap:0px;border-radius:4px;transition:opacity .1s ease-in-out;pointer-events:auto;overflow-x:hidden;overflow-y:auto}.rte-dropdown-menu-header,.rte-dropdown-menu-content,.rte-dropdown-menu-footer{width:100%}.rte-dropdown-menu.open{opacity:1}.rte-dropdown-menu .rte-dropdown-items{width:100%;padding:0;margin:0}.rte-dropdown-menu .rte-dropdown-items li{list-style:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: DropdownItemComponent, selector: "rte-dropdown-item", inputs: ["item", "menuId"], outputs: ["itemEvent", "submenuRequest"] }, { kind: "component", type: DividerComponent, selector: "rte-divider", inputs: ["orientation", "thickness", "appearance", "endPoint"] }] }); }
|
|
1131
1372
|
}
|
|
1132
1373
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DropdownMenuComponent, decorators: [{
|
|
1133
1374
|
type: Component,
|
|
1134
|
-
args: [{ selector: "rte-dropdown-menu", imports: [CommonModule, DropdownItemComponent, DividerComponent], standalone: true, host: { "[attr.data-menu-id]": "menuId()" }, template: "<div class=\"rte-dropdown-menu {{ isOpen() ? 'open' : 'closed' }}\" [ngStyle]=\"menuStyle()\">\n @if (hasHeaderContent()) {\n <div class=\"rte-dropdown-menu-header\">\n @if (headerTemplate() || headerDirective()?.templateRef) {\n <ng-container [ngTemplateOutlet]=\"(headerTemplate() || headerDirective()?.templateRef) ?? null\"></ng-container>\n } @else {\n <div #headerContent>\n <ng-content select=\"[dropdown-menu-header]\"></ng-content>\n </div>\n }\n <rte-divider />\n </div>\n }\n <div class=\"rte-dropdown-menu-content\">\n <ul class=\"rte-dropdown-items\" role=\"menu\" [attr.aria-activedescendant]=\"menuId()\">\n @for (item of items(); track item.label; let i = $index) {\n <rte-dropdown-item
|
|
1375
|
+
args: [{ selector: "rte-dropdown-menu", imports: [CommonModule, DropdownItemComponent, DividerComponent], standalone: true, host: { "[attr.data-menu-id]": "menuId()" }, template: "<div class=\"rte-dropdown-menu {{ isOpen() ? 'open' : 'closed' }}\" [ngStyle]=\"menuStyle()\">\n @if (hasHeaderContent()) {\n <div class=\"rte-dropdown-menu-header\">\n @if (headerTemplate() || headerDirective()?.templateRef) {\n <ng-container [ngTemplateOutlet]=\"(headerTemplate() || headerDirective()?.templateRef) ?? null\"></ng-container>\n } @else {\n <div #headerContent>\n <ng-content select=\"[dropdown-menu-header]\"></ng-content>\n </div>\n }\n <rte-divider />\n </div>\n }\n <div class=\"rte-dropdown-menu-content\">\n <ul class=\"rte-dropdown-items\" role=\"menu\" [attr.aria-activedescendant]=\"menuId()\">\n @for (item of items(); track item.label; let i = $index) {\n <rte-dropdown-item\n [item]=\"item\"\n [menuId]=\"menuId()\"\n (itemEvent)=\"handleItemEvent($event)\"\n (submenuRequest)=\"handleSubmenuRequest($event)\"\n />\n }\n </ul>\n </div>\n @if (hasFooterContent()) {\n <div class=\"rte-dropdown-menu-footer\">\n <rte-divider />\n @if (footerTemplate() || footerDirective()?.templateRef) {\n <ng-container [ngTemplateOutlet]=\"(footerTemplate() || footerDirective()?.templateRef) ?? null\"></ng-container>\n } @else {\n <div #footerContent>\n <ng-content select=\"[dropdown-menu-footer]\"></ng-content>\n </div>\n }\n </div>\n }\n</div>\n", styles: [":host{display:none;position:absolute}.rte-dropdown-menu{opacity:0;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%);background-color:var(--background-default);position:absolute;top:0;left:0;display:flex;min-width:112px;max-width:280px;padding:8px 0;flex-direction:column;align-items:flex-start;gap:0px;border-radius:4px;transition:opacity .1s ease-in-out;pointer-events:auto;overflow-x:hidden;overflow-y:auto}.rte-dropdown-menu-header,.rte-dropdown-menu-content,.rte-dropdown-menu-footer{width:100%}.rte-dropdown-menu.open{opacity:1}.rte-dropdown-menu .rte-dropdown-items{width:100%;padding:0;margin:0}.rte-dropdown-menu .rte-dropdown-items li{list-style:none}\n"] }]
|
|
1135
1376
|
}], propDecorators: { onKeyDown: [{
|
|
1136
1377
|
type: HostListener,
|
|
1137
1378
|
args: ["keydown", ["$event"]]
|
|
@@ -1195,45 +1436,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1195
1436
|
args: ["closeDropdown", ["$event"]]
|
|
1196
1437
|
}] } });
|
|
1197
1438
|
|
|
1198
|
-
const focusNextElement = (dropdown) => {
|
|
1199
|
-
const menuItems = getDropdownMenuItems(dropdown);
|
|
1200
|
-
const activeElementIndex = menuItems.indexOf(document.activeElement);
|
|
1201
|
-
if (activeElementIndex < menuItems.length - 1) {
|
|
1202
|
-
const nextElement = menuItems[activeElementIndex + 1];
|
|
1203
|
-
nextElement.focus();
|
|
1204
|
-
}
|
|
1205
|
-
else {
|
|
1206
|
-
menuItems[0]?.focus();
|
|
1207
|
-
}
|
|
1208
|
-
};
|
|
1209
|
-
const focusPreviousElement = (dropdown) => {
|
|
1210
|
-
const menuItems = getDropdownMenuItems(dropdown);
|
|
1211
|
-
const activeElementIndex = menuItems.indexOf(document.activeElement);
|
|
1212
|
-
if (activeElementIndex > 0) {
|
|
1213
|
-
const previousElement = menuItems[activeElementIndex - 1];
|
|
1214
|
-
previousElement.focus();
|
|
1215
|
-
}
|
|
1216
|
-
else {
|
|
1217
|
-
menuItems.at(-1)?.focus();
|
|
1218
|
-
}
|
|
1219
|
-
};
|
|
1220
|
-
const focusDropdownFirstElement = (dropdownId) => {
|
|
1221
|
-
const childDropdown = document.querySelector(`[data-menu-id='${dropdownId}']`);
|
|
1222
|
-
if (childDropdown) {
|
|
1223
|
-
const allChildDropdownElement = childDropdown?.querySelectorAll('li[role="menuitem"]');
|
|
1224
|
-
allChildDropdownElement[0]?.focus();
|
|
1225
|
-
}
|
|
1226
|
-
};
|
|
1227
|
-
const focusParentDropdownFirstElement = (dropdownId) => {
|
|
1228
|
-
const parentDropdownId = DropdownManager.getParentDropdownId(dropdownId);
|
|
1229
|
-
const parentDropdown = document.querySelector(`[data-menu-id='${parentDropdownId}']`);
|
|
1230
|
-
parentDropdown?.querySelector("[data-active=true]")?.focus();
|
|
1231
|
-
};
|
|
1232
|
-
const getDropdownMenuItems = (dropdown) => {
|
|
1233
|
-
const allDropdownElement = dropdown?.querySelectorAll('li[role="menuitem"]');
|
|
1234
|
-
return allDropdownElement ? Array.from(allDropdownElement) : [];
|
|
1235
|
-
};
|
|
1236
|
-
|
|
1237
1439
|
class DropdownDirective {
|
|
1238
1440
|
static { this.idCounter = 0; }
|
|
1239
1441
|
constructor() {
|
|
@@ -1272,20 +1474,25 @@ class DropdownDirective {
|
|
|
1272
1474
|
};
|
|
1273
1475
|
});
|
|
1274
1476
|
this.dropdownMenuRef = null;
|
|
1477
|
+
this.itemEventSubscription = null;
|
|
1275
1478
|
this.handleClickOutside = (event) => {
|
|
1276
1479
|
const target = event.target;
|
|
1277
|
-
const isMenuItemClick = target.closest(".rte-dropdown-item") !== null;
|
|
1278
|
-
if (isMenuItemClick) {
|
|
1279
|
-
return;
|
|
1280
|
-
}
|
|
1281
1480
|
const clickedInTrigger = this.hostElement.contains(target);
|
|
1282
|
-
const
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1481
|
+
const dropdownMenuElement = this.dropdownMenuRef?.location.nativeElement;
|
|
1482
|
+
const clickedInThisMenu = dropdownMenuElement ? dropdownMenuElement.contains(target) : false;
|
|
1483
|
+
if (clickedInTrigger || clickedInThisMenu) {
|
|
1484
|
+
return;
|
|
1286
1485
|
}
|
|
1486
|
+
this.closeDropdown();
|
|
1487
|
+
this.clickedOutside.emit();
|
|
1287
1488
|
};
|
|
1288
1489
|
this.hostElement = this.elementRef.nativeElement;
|
|
1490
|
+
this.destroyRef.onDestroy(() => {
|
|
1491
|
+
this.unsubscribeItemEvent();
|
|
1492
|
+
this.removeClickOutsideListener();
|
|
1493
|
+
this.dropdownMenuRef?.destroy();
|
|
1494
|
+
this.dropdownMenuRef = null;
|
|
1495
|
+
});
|
|
1289
1496
|
effect(() => {
|
|
1290
1497
|
const isOpen = this.rteDropdownIsOpen();
|
|
1291
1498
|
if (isOpen) {
|
|
@@ -1316,9 +1523,12 @@ class DropdownDirective {
|
|
|
1316
1523
|
}
|
|
1317
1524
|
}
|
|
1318
1525
|
onTriggerKeyEvent(event) {
|
|
1319
|
-
|
|
1526
|
+
const shouldOpen = event.key === SPACE_KEY ||
|
|
1320
1527
|
event.key === ENTER_KEY ||
|
|
1321
|
-
(event.key === ARROW_DOWN_KEY && this.trigger()?.rteDropdownTriggerActivateWithArrowDown())
|
|
1528
|
+
(event.key === ARROW_DOWN_KEY && this.trigger()?.rteDropdownTriggerActivateWithArrowDown());
|
|
1529
|
+
if (shouldOpen) {
|
|
1530
|
+
event.preventDefault();
|
|
1531
|
+
event.stopPropagation();
|
|
1322
1532
|
this.showDropdownMenu();
|
|
1323
1533
|
if (this.rteDropdownAutofocus()) {
|
|
1324
1534
|
waitForNextFrame(() => focusDropdownFirstElement(this.dropdownId));
|
|
@@ -1327,31 +1537,29 @@ class DropdownDirective {
|
|
|
1327
1537
|
}
|
|
1328
1538
|
onMenuEvent(event) {
|
|
1329
1539
|
this.menuEvent.emit(event);
|
|
1330
|
-
|
|
1331
|
-
|
|
1540
|
+
if (!event.item?.children?.length) {
|
|
1541
|
+
this.isActive.set(false);
|
|
1542
|
+
this.dropdownService.closeAllMenus();
|
|
1543
|
+
}
|
|
1332
1544
|
}
|
|
1333
1545
|
ngAfterContentInit() {
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
this.showDropdownMenu();
|
|
1346
|
-
});
|
|
1347
|
-
this.trigger()?.dropdownTriggerCloseDropdown.subscribe(() => {
|
|
1348
|
-
this.closeDropdown();
|
|
1349
|
-
});
|
|
1350
|
-
}
|
|
1546
|
+
const trigger = this.trigger();
|
|
1547
|
+
if (!trigger)
|
|
1548
|
+
return;
|
|
1549
|
+
const triggerSubscriptions = [
|
|
1550
|
+
trigger.dropdownTriggered.subscribe(() => this.onTrigger()),
|
|
1551
|
+
trigger.dropdownKeyDown.subscribe((event) => this.onTriggerKeyEvent(event)),
|
|
1552
|
+
trigger.dropdownTriggerClearContent.subscribe(() => this.closeDropdown()),
|
|
1553
|
+
trigger.dropdownTriggerOpenDropdown.subscribe(() => this.showDropdownMenu()),
|
|
1554
|
+
trigger.dropdownTriggerCloseDropdown.subscribe(() => this.closeDropdown()),
|
|
1555
|
+
];
|
|
1556
|
+
this.destroyRef.onDestroy(() => triggerSubscriptions.forEach((subscription) => subscription.unsubscribe()));
|
|
1351
1557
|
}
|
|
1352
1558
|
showDropdownMenu() {
|
|
1559
|
+
this.unsubscribeItemEvent();
|
|
1353
1560
|
if (this.dropdownMenuRef) {
|
|
1354
1561
|
this.dropdownMenuRef.destroy();
|
|
1562
|
+
this.dropdownMenuRef = null;
|
|
1355
1563
|
}
|
|
1356
1564
|
this.dropdownMenuRef = this.overlayService.create(DropdownMenuComponent, this.viewContainerRef);
|
|
1357
1565
|
const menuId = this.rteDropdownId() || this.dropdownId;
|
|
@@ -1360,12 +1568,11 @@ class DropdownDirective {
|
|
|
1360
1568
|
this.assignInputs();
|
|
1361
1569
|
this.positionDropdownMenu(this.rteDropdownPosition());
|
|
1362
1570
|
this.addClickOutsideListener();
|
|
1363
|
-
this.dropdownMenuRef.instance.itemEvent.subscribe((event) =>
|
|
1364
|
-
this.onMenuEvent(event);
|
|
1365
|
-
});
|
|
1571
|
+
this.itemEventSubscription = this.dropdownMenuRef.instance.itemEvent.subscribe((event) => this.onMenuEvent(event));
|
|
1366
1572
|
const dropdownStateSubscription = this.dropdownService.state$.subscribe((state) => {
|
|
1367
1573
|
if (state === null) {
|
|
1368
1574
|
if (this.dropdownMenuRef) {
|
|
1575
|
+
this.unsubscribeItemEvent();
|
|
1369
1576
|
this.dropdownMenuRef.destroy();
|
|
1370
1577
|
this.dropdownMenuRef = null;
|
|
1371
1578
|
this.removeClickOutsideListener();
|
|
@@ -1411,7 +1618,13 @@ class DropdownDirective {
|
|
|
1411
1618
|
if (triggerElement) {
|
|
1412
1619
|
this.renderer.setStyle(dropdownMenuElement, "display", "block");
|
|
1413
1620
|
this.cdr.detectChanges();
|
|
1414
|
-
const computedPosition = position === "auto"
|
|
1621
|
+
const computedPosition = position === "auto"
|
|
1622
|
+
? getAutoPlacementDropdown({
|
|
1623
|
+
hostElement: triggerElement,
|
|
1624
|
+
castedElement: dropdownMenuElement,
|
|
1625
|
+
defaultPosition: "bottom",
|
|
1626
|
+
})
|
|
1627
|
+
: position;
|
|
1415
1628
|
const autoAlignment = this.rteDropdownAlignment() ?? getAutoAlignment(triggerElement, dropdownMenuElement, computedPosition);
|
|
1416
1629
|
const computedCoordinates = getCoordinates$1(computedPosition, triggerElement, dropdownMenuElement.children[0], this.rteDropdownOffset(), autoAlignment);
|
|
1417
1630
|
this.renderer.setStyle(dropdownMenuElement, "top", `${computedCoordinates.top}px`);
|
|
@@ -1420,11 +1633,9 @@ class DropdownDirective {
|
|
|
1420
1633
|
}
|
|
1421
1634
|
}
|
|
1422
1635
|
}
|
|
1423
|
-
|
|
1424
|
-
this.
|
|
1425
|
-
|
|
1426
|
-
this.dropdownMenuRef.destroy();
|
|
1427
|
-
}
|
|
1636
|
+
unsubscribeItemEvent() {
|
|
1637
|
+
this.itemEventSubscription?.unsubscribe();
|
|
1638
|
+
this.itemEventSubscription = null;
|
|
1428
1639
|
}
|
|
1429
1640
|
addClickOutsideListener() {
|
|
1430
1641
|
document.addEventListener("mousedown", this.handleClickOutside);
|
|
@@ -1492,8 +1703,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1492
1703
|
}]
|
|
1493
1704
|
}] });
|
|
1494
1705
|
|
|
1495
|
-
// Main dropdown module - import this to get everything
|
|
1496
|
-
|
|
1497
1706
|
class SplitButtonComponent {
|
|
1498
1707
|
constructor() {
|
|
1499
1708
|
this.appearance = input("primary");
|
|
@@ -1943,6 +2152,8 @@ class SegmentedControlComponent {
|
|
|
1943
2152
|
this.selectedSegment = input();
|
|
1944
2153
|
this.ariaLabel = input();
|
|
1945
2154
|
this.ariaLabelledBy = input();
|
|
2155
|
+
this.appearance = input("brand");
|
|
2156
|
+
this.compactSpacing = input(false);
|
|
1946
2157
|
this.segmentRefs = viewChildren("segment");
|
|
1947
2158
|
this.sliderLeft = signal(0);
|
|
1948
2159
|
this.sliderWidth = signal(0);
|
|
@@ -2050,11 +2261,11 @@ class SegmentedControlComponent {
|
|
|
2050
2261
|
}
|
|
2051
2262
|
}
|
|
2052
2263
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SegmentedControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2053
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.14", type: SegmentedControlComponent, isStandalone: true, selector: "rte-segmented-control", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, selectedSegment: { classPropertyName: "selectedSegment", publicName: "selectedSegment", 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 } }, outputs: { change: "change" }, viewQueries: [{ propertyName: "segmentRefs", predicate: ["segment"], descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div
|
|
2264
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.14", type: SegmentedControlComponent, isStandalone: true, selector: "rte-segmented-control", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, selectedSegment: { classPropertyName: "selectedSegment", publicName: "selectedSegment", 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 }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, compactSpacing: { classPropertyName: "compactSpacing", publicName: "compactSpacing", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { change: "change" }, viewQueries: [{ propertyName: "segmentRefs", predicate: ["segment"], descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div\n *ngIf=\"isValidOptions()\"\n class=\"rte-segmented-control\"\n role=\"radiogroup\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.data-number-of-segments]=\"options().length\"\n [attr.data-compact-spacing]=\"compactSpacing()\"\n>\n <span\n class=\"rte-segment-selected-indicator\"\n [ngStyle]=\"segmentSelectedIndicatorStyle()\"\n [attr.data-compact-spacing]=\"compactSpacing()\"\n ></span>\n <ng-container *ngFor=\"let option of options(); let idx = index\">\n <div\n class=\"rte-segment-container\"\n [attr.data-position]=\"getSegmentPosition(idx)\"\n [attr.data-appearance]=\"appearance()\"\n [attr.data-compact-spacing]=\"compactSpacing()\"\n >\n <div\n #segment\n role=\"radio\"\n class=\"rte-segment\"\n tabindex=\"0\"\n [attr.data-id]=\"option.id\"\n [attr.data-segment-type]=\"option.icon ? 'icon' : 'label'\"\n [attr.data-compact-spacing]=\"compactSpacing()\"\n [class.selected]=\"isSegmentSelected(option.id)\"\n [attr.aria-checked]=\"isSegmentSelected(option.id)\"\n [attr.aria-label]=\"option.label\"\n (click)=\"selectSegment(option.id)\"\n (keydown)=\"handleKeyDown($event)\"\n (keyup)=\"handleKeyUp($event)\"\n >\n <rte-icon *ngIf=\"isSegmentSelected(option.id)\" name=\"check-small\" class=\"rte-selected-icon\" [size]=\"24\" />\n <div class=\"rte-segment-content\">\n <ng-container *ngIf=\"option.icon; else label\">\n <rte-icon\n [name]=\"option.icon\"\n [size]=\"compactSpacing() ? 20 : 24\"\n [appearance]=\"isSegmentSelected(option.id) ? 'filled' : 'outlined'\"\n ></rte-icon>\n </ng-container>\n <ng-template #label>\n <span class=\"rte-segment-label\">{{ option.label }}</span>\n </ng-template>\n </div>\n <rte-badge\n *ngIf=\"shouldDisplayBadge(option)\"\n [count]=\"option.badgeCount\"\n [badgeContent]=\"option.badgeContent!\"\n [icon]=\"option.badgeIcon!\"\n [badgeType]=\"option.badgeType!\"\n [simpleBadge]=\"true\"\n [badgeSize]=\"option.badgeSize!\"\n ></rte-badge>\n </div>\n </div>\n </ng-container>\n</div>\n", styles: [".rte-segmented-control{display:flex;min-width:168px;max-width:720px}.rte-segmented-control[data-number-of-segments=\"3\"]{min-width:256px}.rte-segmented-control[data-compact-spacing=true]{min-width:80px}.rte-segmented-control[data-compact-spacing=true][data-number-of-segments=\"3\"]{min-width:128px}.rte-segment-selected-indicator{position:absolute;top:4px;height:32px;background:var(--background-default);border-radius:999px;transition:left .2s ease-out,width .2s ease-out}.rte-segment-selected-indicator[data-compact-spacing=true]{height:24px}.rte-segment-container{display:flex;border-top:1px solid var(--border-inverse);border-bottom:1px solid var(--border-inverse);background:var(--background-brand-default);padding:4px 2px;align-items:center;flex:1 0 0;overflow:hidden;height:40px;box-sizing:border-box}.rte-segment-container[data-compact-spacing=true]{height:32px;padding:0 2px}.rte-segment-container[data-appearance=neutral]{border-top:1px solid var(--border-tertiary);border-bottom:1px solid var(--border-tertiary);background:var(--background-neutral-regular-default)}.rte-segment-container[data-appearance=neutral][data-position=left]{border-radius:999px 0 0 999px;border-left:1px solid var(--border-tertiary);padding-left:4px}.rte-segment-container[data-appearance=neutral][data-position=right]{border-radius:0 999px 999px 0;border-right:1px solid var(--border-tertiary);padding-right:4px}.rte-segment-container[data-appearance=neutral] .rte-segment-label,.rte-segment-container[data-appearance=neutral] .rte-segment{color:var(--content-secondary)}.rte-segment-container[data-appearance=neutral] .rte-segment.selected .rte-segment-content,.rte-segment-container[data-appearance=neutral] .rte-segment.selected .rte-segment-label,.rte-segment-container[data-appearance=neutral] .rte-segment.selected .rte-selected-icon{color:var(--content-primary)}.rte-segment-container[data-appearance=neutral] .rte-segment:hover:not(.selected){background:var(--background-neutral-regular-hover);cursor:pointer}.rte-segment-container[data-position=left]{border-radius:999px 0 0 999px;border-left:1px solid var(--border-inverse);padding-left:4px}.rte-segment-container[data-position=right]{border-radius:0 999px 999px 0;border-right:1px solid var(--border-inverse);padding-right:4px}.rte-segment{display:flex;padding:2px 8px;align-items:center;border-radius:999px;color:var(--content-primary-inverse);flex:1 1 auto;width:100%;z-index:0;height:32px;box-sizing:border-box}.rte-segment[data-compact-spacing=true]{padding:0 8px;height:24px}.rte-segment[data-compact-spacing=true] .rte-segment-content .rte-segment-label{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}.rte-segment:focus-visible{outline:1px solid var(--border-inverse);outline-offset:0px}.rte-segment.selected{transition:color .2s ease-out;color:var(--content-brand-default)}.rte-segment.selected:focus-visible{outline:1px solid var(--border-brand-focused);outline-offset:-2px}.rte-segment:hover:not(.selected){background:var(--background-brand-hover);cursor:pointer}.rte-segment .rte-segment-content{display:flex;align-items:center;justify-content:center;width:100%;overflow:hidden}.rte-segment .rte-segment-content .rte-segment-label{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;padding:0 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rte-segment .rte-selected-icon{min-width:24px;min-height:24px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2054
2265
|
}
|
|
2055
2266
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SegmentedControlComponent, decorators: [{
|
|
2056
2267
|
type: Component,
|
|
2057
|
-
args: [{ selector: "rte-segmented-control", imports: [CommonModule, IconComponent, BadgeComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div
|
|
2268
|
+
args: [{ selector: "rte-segmented-control", imports: [CommonModule, IconComponent, BadgeComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n *ngIf=\"isValidOptions()\"\n class=\"rte-segmented-control\"\n role=\"radiogroup\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.data-number-of-segments]=\"options().length\"\n [attr.data-compact-spacing]=\"compactSpacing()\"\n>\n <span\n class=\"rte-segment-selected-indicator\"\n [ngStyle]=\"segmentSelectedIndicatorStyle()\"\n [attr.data-compact-spacing]=\"compactSpacing()\"\n ></span>\n <ng-container *ngFor=\"let option of options(); let idx = index\">\n <div\n class=\"rte-segment-container\"\n [attr.data-position]=\"getSegmentPosition(idx)\"\n [attr.data-appearance]=\"appearance()\"\n [attr.data-compact-spacing]=\"compactSpacing()\"\n >\n <div\n #segment\n role=\"radio\"\n class=\"rte-segment\"\n tabindex=\"0\"\n [attr.data-id]=\"option.id\"\n [attr.data-segment-type]=\"option.icon ? 'icon' : 'label'\"\n [attr.data-compact-spacing]=\"compactSpacing()\"\n [class.selected]=\"isSegmentSelected(option.id)\"\n [attr.aria-checked]=\"isSegmentSelected(option.id)\"\n [attr.aria-label]=\"option.label\"\n (click)=\"selectSegment(option.id)\"\n (keydown)=\"handleKeyDown($event)\"\n (keyup)=\"handleKeyUp($event)\"\n >\n <rte-icon *ngIf=\"isSegmentSelected(option.id)\" name=\"check-small\" class=\"rte-selected-icon\" [size]=\"24\" />\n <div class=\"rte-segment-content\">\n <ng-container *ngIf=\"option.icon; else label\">\n <rte-icon\n [name]=\"option.icon\"\n [size]=\"compactSpacing() ? 20 : 24\"\n [appearance]=\"isSegmentSelected(option.id) ? 'filled' : 'outlined'\"\n ></rte-icon>\n </ng-container>\n <ng-template #label>\n <span class=\"rte-segment-label\">{{ option.label }}</span>\n </ng-template>\n </div>\n <rte-badge\n *ngIf=\"shouldDisplayBadge(option)\"\n [count]=\"option.badgeCount\"\n [badgeContent]=\"option.badgeContent!\"\n [icon]=\"option.badgeIcon!\"\n [badgeType]=\"option.badgeType!\"\n [simpleBadge]=\"true\"\n [badgeSize]=\"option.badgeSize!\"\n ></rte-badge>\n </div>\n </div>\n </ng-container>\n</div>\n", styles: [".rte-segmented-control{display:flex;min-width:168px;max-width:720px}.rte-segmented-control[data-number-of-segments=\"3\"]{min-width:256px}.rte-segmented-control[data-compact-spacing=true]{min-width:80px}.rte-segmented-control[data-compact-spacing=true][data-number-of-segments=\"3\"]{min-width:128px}.rte-segment-selected-indicator{position:absolute;top:4px;height:32px;background:var(--background-default);border-radius:999px;transition:left .2s ease-out,width .2s ease-out}.rte-segment-selected-indicator[data-compact-spacing=true]{height:24px}.rte-segment-container{display:flex;border-top:1px solid var(--border-inverse);border-bottom:1px solid var(--border-inverse);background:var(--background-brand-default);padding:4px 2px;align-items:center;flex:1 0 0;overflow:hidden;height:40px;box-sizing:border-box}.rte-segment-container[data-compact-spacing=true]{height:32px;padding:0 2px}.rte-segment-container[data-appearance=neutral]{border-top:1px solid var(--border-tertiary);border-bottom:1px solid var(--border-tertiary);background:var(--background-neutral-regular-default)}.rte-segment-container[data-appearance=neutral][data-position=left]{border-radius:999px 0 0 999px;border-left:1px solid var(--border-tertiary);padding-left:4px}.rte-segment-container[data-appearance=neutral][data-position=right]{border-radius:0 999px 999px 0;border-right:1px solid var(--border-tertiary);padding-right:4px}.rte-segment-container[data-appearance=neutral] .rte-segment-label,.rte-segment-container[data-appearance=neutral] .rte-segment{color:var(--content-secondary)}.rte-segment-container[data-appearance=neutral] .rte-segment.selected .rte-segment-content,.rte-segment-container[data-appearance=neutral] .rte-segment.selected .rte-segment-label,.rte-segment-container[data-appearance=neutral] .rte-segment.selected .rte-selected-icon{color:var(--content-primary)}.rte-segment-container[data-appearance=neutral] .rte-segment:hover:not(.selected){background:var(--background-neutral-regular-hover);cursor:pointer}.rte-segment-container[data-position=left]{border-radius:999px 0 0 999px;border-left:1px solid var(--border-inverse);padding-left:4px}.rte-segment-container[data-position=right]{border-radius:0 999px 999px 0;border-right:1px solid var(--border-inverse);padding-right:4px}.rte-segment{display:flex;padding:2px 8px;align-items:center;border-radius:999px;color:var(--content-primary-inverse);flex:1 1 auto;width:100%;z-index:0;height:32px;box-sizing:border-box}.rte-segment[data-compact-spacing=true]{padding:0 8px;height:24px}.rte-segment[data-compact-spacing=true] .rte-segment-content .rte-segment-label{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}.rte-segment:focus-visible{outline:1px solid var(--border-inverse);outline-offset:0px}.rte-segment.selected{transition:color .2s ease-out;color:var(--content-brand-default)}.rte-segment.selected:focus-visible{outline:1px solid var(--border-brand-focused);outline-offset:-2px}.rte-segment:hover:not(.selected){background:var(--background-brand-hover);cursor:pointer}.rte-segment .rte-segment-content{display:flex;align-items:center;justify-content:center;width:100%;overflow:hidden}.rte-segment .rte-segment-content .rte-segment-label{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;padding:0 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rte-segment .rte-selected-icon{min-width:24px;min-height:24px}\n"] }]
|
|
2058
2269
|
}] });
|
|
2059
2270
|
|
|
2060
2271
|
class BreadcrumbItemComponent {
|
|
@@ -3105,11 +3316,11 @@ class StepperComponent {
|
|
|
3105
3316
|
}
|
|
3106
3317
|
}
|
|
3107
3318
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3108
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: StepperComponent, isStandalone: true, selector: "rte-stepper", inputs: { steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: false, transformFunction: null }, activeStepId: { classPropertyName: "activeStepId", publicName: "activeStepId", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clickStep: "clickStep" }, ngImport: i0, template: "<nav aria-label=\"Stepper Navigation\" style=\"width: 100%; height: 100%\">\n <ol class=\"rte-stepper\" [attr.data-orientation]=\"orientation()\">\n <ng-container *ngFor=\"let step of steps(); let index = index\">\n <li\n #step\n class=\"rte-stepper-item\"\n [attr.data-completion-state]=\"step.completionState\"\n [attr.aria-current]=\"isStepActive(step.id) ? 'step' : undefined\"\n [attr.data-active]=\"isStepActive(step.id)\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-clickable]=\"isStepClickable(step)\"\n (keydown)=\"handleKeyDown($event)\"\n >\n <button\n class=\"rte-stepper-button\"\n type=\"button\"\n [attr.tabindex]=\"isStepActive(step.id) ? 0 : -1\"\n [attr.disabled]=\"isStepFocusable(step) ? undefined : true\"\n (click)=\"handleStepClick(step)\"\n >\n @if (step.completionState === \"complete\" && !isStepActive(step.id)) {\n <div class=\"rte-stepper-complete-indicator\">\n <rte-icon name=\"check\" aria-hidden=\"true\" [size]=\"iconSize['m']\" />\n </div>\n } @else {\n <div class=\"rte-stepper-number\" [attr.data-completion-state]=\"step.completionState\">\n <span>{{ index + 1 }}</span>\n </div>\n }\n <span class=\"rte-stepper-name\">{{ step.name }}</span>\n </button>\n </li>\n <ng-container *ngIf=\"index < steps().length - 1\">\n <div style=\"width: 100%; height: 100%\">\n <div\n class=\"rte-step-separator\"\n role=\"separator\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-complete]=\"step.completionState === 'complete'\"\n ></div>\n </div>\n </ng-container>\n </ng-container>\n </ol>\n</nav>\n", styles: [".rte-stepper{display:flex;flex-direction:row;gap:6px;align-items:start;padding:0;margin:0;width:auto}.rte-stepper[data-orientation=vertical]{flex-direction:column;height:100%}.rte-stepper .rte-stepper-item{display:flex;width:100%;flex:1 0 0}.rte-stepper .rte-stepper-item .rte-stepper-button{all:unset;display:flex;flex-direction:column;gap:12px;align-items:center}.rte-stepper .rte-stepper-item .rte-stepper-button:focus-visible .rte-stepper-number,.rte-stepper .rte-stepper-item .rte-stepper-button:focus-visible .rte-stepper-complete-indicator{outline:2px solid var(--border-brand-focused);outline-offset:4px}.rte-stepper .rte-stepper-item .rte-stepper-button .rte-stepper-complete-indicator{display:flex;justify-content:center;align-items:center;width:32px;height:32px;border-radius:999px;background-color:var(--background-brand-default);border:2px solid var(--border-brand-default);color:var(--content-primary-inverse)}.rte-stepper .rte-stepper-item .rte-stepper-button .rte-stepper-number{display:flex;justify-content:center;align-items:center;width:32px;height:32px;border-radius:999px;border:2px solid var(--border-secondary)}.rte-stepper .rte-stepper-item .rte-stepper-button .rte-stepper-number span{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;color:var(--content-tertiary);display:flex;justify-content:center;align-items:center}.rte-stepper .rte-stepper-item .rte-stepper-button .rte-stepper-name{font-family:Arial;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px;color:var(--content-tertiary);text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;position:relative}.rte-stepper .rte-stepper-item:hover[data-clickable=true][data-active=false]{cursor:pointer}.rte-stepper .rte-stepper-item:hover[data-clickable=true][data-active=false][data-completion-state=unvisited] .rte-stepper-number{border-color:var(--border-primary)}.rte-stepper .rte-stepper-item:hover[data-clickable=true][data-active=false][data-completion-state=unvisited] .rte-stepper-complete-indicator{background-color:var(--background-brand-hover);border:2px solid var(--background-brand-hover)}.rte-stepper .rte-stepper-item:hover[data-clickable=true][data-active=false][data-completion-state=incomplete] .rte-stepper-number span{background-color:var(--background-brand-hover)}.rte-stepper .rte-stepper-item:hover[data-clickable=true][data-active=false][data-completion-state=complete] .rte-stepper-complete-indicator{background-color:var(--background-brand-hover);border:2px solid var(--background-brand-hover)}.rte-stepper .rte-stepper-item[data-completion-state=incomplete][data-active=false] .rte-stepper-number{border:2px solid var(--border-brand-default)}.rte-stepper .rte-stepper-item[data-completion-state=incomplete][data-active=false] .rte-stepper-number span{color:var(--content-primary-inverse);border:solid 2px var(--brand-default);border-radius:999px;background-color:var(--background-brand-default);width:28px;height:28px}.rte-stepper .rte-stepper-item[data-completion-state=incomplete] .rte-stepper-name{font-family:Arial;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px}.rte-stepper .rte-stepper-item[data-active=true] .rte-stepper-button .rte-stepper-number{border:2px solid var(--border-brand-default)}.rte-stepper .rte-stepper-item[data-active=true] .rte-stepper-button .rte-stepper-number span{color:var(--content-brand-default)}.rte-stepper .rte-stepper-item[data-active=true] .rte-stepper-button .rte-stepper-name{font-family:Arial;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px;color:var(--content-primary)}.rte-stepper .rte-stepper-item[data-orientation=vertical],.rte-stepper .rte-stepper-item[data-orientation=vertical] .rte-stepper-button{flex-direction:row}.rte-stepper .rte-stepper-item[data-orientation=vertical] .rte-stepper-button .rte-stepper-name{text-align:left}.rte-stepper .rte-step-separator{width:100%;border-radius:999px;height:4px;margin-top:16px;background-color:var(--border-secondary);flex:1 1 auto}.rte-stepper .rte-step-separator[data-complete=true]{background-color:var(--border-brand-default)}.rte-stepper .rte-step-separator[data-orientation=vertical]{width:4px;height:100%;margin-left:16px;margin-top:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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 }); }
|
|
3319
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: StepperComponent, isStandalone: true, selector: "rte-stepper", inputs: { steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: false, transformFunction: null }, activeStepId: { classPropertyName: "activeStepId", publicName: "activeStepId", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clickStep: "clickStep" }, ngImport: i0, template: "<nav aria-label=\"Stepper Navigation\" style=\"width: 100%; height: 100%\">\n <ol class=\"rte-stepper\" [attr.data-orientation]=\"orientation()\">\n <ng-container *ngFor=\"let step of steps(); let index = index\">\n <li\n #step\n class=\"rte-stepper-item\"\n [attr.data-completion-state]=\"step.completionState\"\n [attr.aria-current]=\"isStepActive(step.id) ? 'step' : undefined\"\n [attr.data-active]=\"isStepActive(step.id)\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-clickable]=\"isStepClickable(step)\"\n (keydown)=\"handleKeyDown($event)\"\n >\n <button\n class=\"rte-stepper-button\"\n type=\"button\"\n [attr.tabindex]=\"isStepActive(step.id) ? 0 : -1\"\n [attr.disabled]=\"isStepFocusable(step) ? undefined : true\"\n (click)=\"handleStepClick(step)\"\n >\n @if (step.completionState === \"complete\" && !isStepActive(step.id)) {\n <div class=\"rte-stepper-complete-indicator\">\n <rte-icon name=\"check\" aria-hidden=\"true\" [size]=\"iconSize['m']\" />\n </div>\n } @else {\n <div class=\"rte-stepper-number\" [attr.data-completion-state]=\"step.completionState\">\n <span>{{ index + 1 }}</span>\n </div>\n }\n <span class=\"rte-stepper-name\">{{ step.name }}</span>\n </button>\n </li>\n <ng-container *ngIf=\"index < steps().length - 1\">\n <div style=\"width: 100%; height: 100%\">\n <div\n class=\"rte-step-separator\"\n role=\"separator\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-complete]=\"step.completionState === 'complete'\"\n ></div>\n </div>\n </ng-container>\n </ng-container>\n </ol>\n</nav>\n", styles: [".rte-stepper{display:flex;flex-direction:row;gap:6px;align-items:start;padding:0;margin:0;width:auto}.rte-stepper[data-orientation=vertical]{flex-direction:column;height:100%}.rte-stepper .rte-stepper-item{display:flex;width:100%;flex:1 0 0}.rte-stepper .rte-stepper-item .rte-stepper-button{all:unset;display:flex;flex-direction:column;gap:12px;align-items:center}.rte-stepper .rte-stepper-item .rte-stepper-button:focus-visible .rte-stepper-number,.rte-stepper .rte-stepper-item .rte-stepper-button:focus-visible .rte-stepper-complete-indicator{outline:2px solid var(--border-brand-focused);outline-offset:4px}.rte-stepper .rte-stepper-item .rte-stepper-button .rte-stepper-complete-indicator{display:flex;justify-content:center;align-items:center;width:32px;height:32px;border-radius:999px;background-color:var(--background-brand-default);border:2px solid var(--border-brand-default);color:var(--content-primary-inverse)}.rte-stepper .rte-stepper-item .rte-stepper-button .rte-stepper-number{display:flex;justify-content:center;align-items:center;width:32px;height:32px;border-radius:999px;border:2px solid var(--border-secondary)}.rte-stepper .rte-stepper-item .rte-stepper-button .rte-stepper-number span{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;color:var(--content-tertiary);display:flex;justify-content:center;align-items:center}.rte-stepper .rte-stepper-item .rte-stepper-button .rte-stepper-name{font-family:Arial;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px;color:var(--content-tertiary);text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;position:relative}.rte-stepper .rte-stepper-item:hover[data-clickable=true][data-active=false]{cursor:pointer}.rte-stepper .rte-stepper-item:hover[data-clickable=true][data-active=false] .rte-stepper-name{color:var(--content-secondary)}.rte-stepper .rte-stepper-item:hover[data-clickable=true][data-active=false][data-completion-state=unvisited] .rte-stepper-number{border-color:var(--border-primary)}.rte-stepper .rte-stepper-item:hover[data-clickable=true][data-active=false][data-completion-state=unvisited] .rte-stepper-complete-indicator{background-color:var(--background-brand-hover);border:2px solid var(--background-brand-hover)}.rte-stepper .rte-stepper-item:hover[data-clickable=true][data-active=false][data-completion-state=incomplete] .rte-stepper-number span{background-color:var(--background-brand-hover)}.rte-stepper .rte-stepper-item:hover[data-clickable=true][data-active=false][data-completion-state=complete] .rte-stepper-complete-indicator{background-color:var(--background-brand-hover);border:2px solid var(--background-brand-hover)}.rte-stepper .rte-stepper-item[data-completion-state=incomplete][data-active=false] .rte-stepper-number{border:2px solid var(--border-brand-default)}.rte-stepper .rte-stepper-item[data-completion-state=incomplete][data-active=false] .rte-stepper-number span{color:var(--content-primary-inverse);border:solid 2px var(--brand-default);border-radius:999px;background-color:var(--background-brand-default);width:28px;height:28px}.rte-stepper .rte-stepper-item[data-completion-state=incomplete] .rte-stepper-name{font-family:Arial;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px}.rte-stepper .rte-stepper-item[data-active=true] .rte-stepper-button .rte-stepper-number{border:2px solid var(--border-brand-default)}.rte-stepper .rte-stepper-item[data-active=true] .rte-stepper-button .rte-stepper-number span{color:var(--content-brand-default)}.rte-stepper .rte-stepper-item[data-active=true] .rte-stepper-button .rte-stepper-name{font-family:Arial;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px;color:var(--content-primary)}.rte-stepper .rte-stepper-item[data-orientation=vertical],.rte-stepper .rte-stepper-item[data-orientation=vertical] .rte-stepper-button{flex-direction:row}.rte-stepper .rte-stepper-item[data-orientation=vertical] .rte-stepper-button .rte-stepper-name{text-align:left}.rte-stepper .rte-step-separator{width:100%;border-radius:999px;height:4px;margin-top:16px;background-color:var(--border-secondary);flex:1 1 auto}.rte-stepper .rte-step-separator[data-complete=true]{background-color:var(--border-brand-default)}.rte-stepper .rte-step-separator[data-orientation=vertical]{width:4px;height:100%;margin-left:16px;margin-top:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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 }); }
|
|
3109
3320
|
}
|
|
3110
3321
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StepperComponent, decorators: [{
|
|
3111
3322
|
type: Component,
|
|
3112
|
-
args: [{ selector: "rte-stepper", imports: [CommonModule, IconComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav aria-label=\"Stepper Navigation\" style=\"width: 100%; height: 100%\">\n <ol class=\"rte-stepper\" [attr.data-orientation]=\"orientation()\">\n <ng-container *ngFor=\"let step of steps(); let index = index\">\n <li\n #step\n class=\"rte-stepper-item\"\n [attr.data-completion-state]=\"step.completionState\"\n [attr.aria-current]=\"isStepActive(step.id) ? 'step' : undefined\"\n [attr.data-active]=\"isStepActive(step.id)\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-clickable]=\"isStepClickable(step)\"\n (keydown)=\"handleKeyDown($event)\"\n >\n <button\n class=\"rte-stepper-button\"\n type=\"button\"\n [attr.tabindex]=\"isStepActive(step.id) ? 0 : -1\"\n [attr.disabled]=\"isStepFocusable(step) ? undefined : true\"\n (click)=\"handleStepClick(step)\"\n >\n @if (step.completionState === \"complete\" && !isStepActive(step.id)) {\n <div class=\"rte-stepper-complete-indicator\">\n <rte-icon name=\"check\" aria-hidden=\"true\" [size]=\"iconSize['m']\" />\n </div>\n } @else {\n <div class=\"rte-stepper-number\" [attr.data-completion-state]=\"step.completionState\">\n <span>{{ index + 1 }}</span>\n </div>\n }\n <span class=\"rte-stepper-name\">{{ step.name }}</span>\n </button>\n </li>\n <ng-container *ngIf=\"index < steps().length - 1\">\n <div style=\"width: 100%; height: 100%\">\n <div\n class=\"rte-step-separator\"\n role=\"separator\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-complete]=\"step.completionState === 'complete'\"\n ></div>\n </div>\n </ng-container>\n </ng-container>\n </ol>\n</nav>\n", styles: [".rte-stepper{display:flex;flex-direction:row;gap:6px;align-items:start;padding:0;margin:0;width:auto}.rte-stepper[data-orientation=vertical]{flex-direction:column;height:100%}.rte-stepper .rte-stepper-item{display:flex;width:100%;flex:1 0 0}.rte-stepper .rte-stepper-item .rte-stepper-button{all:unset;display:flex;flex-direction:column;gap:12px;align-items:center}.rte-stepper .rte-stepper-item .rte-stepper-button:focus-visible .rte-stepper-number,.rte-stepper .rte-stepper-item .rte-stepper-button:focus-visible .rte-stepper-complete-indicator{outline:2px solid var(--border-brand-focused);outline-offset:4px}.rte-stepper .rte-stepper-item .rte-stepper-button .rte-stepper-complete-indicator{display:flex;justify-content:center;align-items:center;width:32px;height:32px;border-radius:999px;background-color:var(--background-brand-default);border:2px solid var(--border-brand-default);color:var(--content-primary-inverse)}.rte-stepper .rte-stepper-item .rte-stepper-button .rte-stepper-number{display:flex;justify-content:center;align-items:center;width:32px;height:32px;border-radius:999px;border:2px solid var(--border-secondary)}.rte-stepper .rte-stepper-item .rte-stepper-button .rte-stepper-number span{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;color:var(--content-tertiary);display:flex;justify-content:center;align-items:center}.rte-stepper .rte-stepper-item .rte-stepper-button .rte-stepper-name{font-family:Arial;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px;color:var(--content-tertiary);text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;position:relative}.rte-stepper .rte-stepper-item:hover[data-clickable=true][data-active=false]{cursor:pointer}.rte-stepper .rte-stepper-item:hover[data-clickable=true][data-active=false][data-completion-state=unvisited] .rte-stepper-number{border-color:var(--border-primary)}.rte-stepper .rte-stepper-item:hover[data-clickable=true][data-active=false][data-completion-state=unvisited] .rte-stepper-complete-indicator{background-color:var(--background-brand-hover);border:2px solid var(--background-brand-hover)}.rte-stepper .rte-stepper-item:hover[data-clickable=true][data-active=false][data-completion-state=incomplete] .rte-stepper-number span{background-color:var(--background-brand-hover)}.rte-stepper .rte-stepper-item:hover[data-clickable=true][data-active=false][data-completion-state=complete] .rte-stepper-complete-indicator{background-color:var(--background-brand-hover);border:2px solid var(--background-brand-hover)}.rte-stepper .rte-stepper-item[data-completion-state=incomplete][data-active=false] .rte-stepper-number{border:2px solid var(--border-brand-default)}.rte-stepper .rte-stepper-item[data-completion-state=incomplete][data-active=false] .rte-stepper-number span{color:var(--content-primary-inverse);border:solid 2px var(--brand-default);border-radius:999px;background-color:var(--background-brand-default);width:28px;height:28px}.rte-stepper .rte-stepper-item[data-completion-state=incomplete] .rte-stepper-name{font-family:Arial;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px}.rte-stepper .rte-stepper-item[data-active=true] .rte-stepper-button .rte-stepper-number{border:2px solid var(--border-brand-default)}.rte-stepper .rte-stepper-item[data-active=true] .rte-stepper-button .rte-stepper-number span{color:var(--content-brand-default)}.rte-stepper .rte-stepper-item[data-active=true] .rte-stepper-button .rte-stepper-name{font-family:Arial;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px;color:var(--content-primary)}.rte-stepper .rte-stepper-item[data-orientation=vertical],.rte-stepper .rte-stepper-item[data-orientation=vertical] .rte-stepper-button{flex-direction:row}.rte-stepper .rte-stepper-item[data-orientation=vertical] .rte-stepper-button .rte-stepper-name{text-align:left}.rte-stepper .rte-step-separator{width:100%;border-radius:999px;height:4px;margin-top:16px;background-color:var(--border-secondary);flex:1 1 auto}.rte-stepper .rte-step-separator[data-complete=true]{background-color:var(--border-brand-default)}.rte-stepper .rte-step-separator[data-orientation=vertical]{width:4px;height:100%;margin-left:16px;margin-top:0}\n"] }]
|
|
3323
|
+
args: [{ selector: "rte-stepper", imports: [CommonModule, IconComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav aria-label=\"Stepper Navigation\" style=\"width: 100%; height: 100%\">\n <ol class=\"rte-stepper\" [attr.data-orientation]=\"orientation()\">\n <ng-container *ngFor=\"let step of steps(); let index = index\">\n <li\n #step\n class=\"rte-stepper-item\"\n [attr.data-completion-state]=\"step.completionState\"\n [attr.aria-current]=\"isStepActive(step.id) ? 'step' : undefined\"\n [attr.data-active]=\"isStepActive(step.id)\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-clickable]=\"isStepClickable(step)\"\n (keydown)=\"handleKeyDown($event)\"\n >\n <button\n class=\"rte-stepper-button\"\n type=\"button\"\n [attr.tabindex]=\"isStepActive(step.id) ? 0 : -1\"\n [attr.disabled]=\"isStepFocusable(step) ? undefined : true\"\n (click)=\"handleStepClick(step)\"\n >\n @if (step.completionState === \"complete\" && !isStepActive(step.id)) {\n <div class=\"rte-stepper-complete-indicator\">\n <rte-icon name=\"check\" aria-hidden=\"true\" [size]=\"iconSize['m']\" />\n </div>\n } @else {\n <div class=\"rte-stepper-number\" [attr.data-completion-state]=\"step.completionState\">\n <span>{{ index + 1 }}</span>\n </div>\n }\n <span class=\"rte-stepper-name\">{{ step.name }}</span>\n </button>\n </li>\n <ng-container *ngIf=\"index < steps().length - 1\">\n <div style=\"width: 100%; height: 100%\">\n <div\n class=\"rte-step-separator\"\n role=\"separator\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-complete]=\"step.completionState === 'complete'\"\n ></div>\n </div>\n </ng-container>\n </ng-container>\n </ol>\n</nav>\n", styles: [".rte-stepper{display:flex;flex-direction:row;gap:6px;align-items:start;padding:0;margin:0;width:auto}.rte-stepper[data-orientation=vertical]{flex-direction:column;height:100%}.rte-stepper .rte-stepper-item{display:flex;width:100%;flex:1 0 0}.rte-stepper .rte-stepper-item .rte-stepper-button{all:unset;display:flex;flex-direction:column;gap:12px;align-items:center}.rte-stepper .rte-stepper-item .rte-stepper-button:focus-visible .rte-stepper-number,.rte-stepper .rte-stepper-item .rte-stepper-button:focus-visible .rte-stepper-complete-indicator{outline:2px solid var(--border-brand-focused);outline-offset:4px}.rte-stepper .rte-stepper-item .rte-stepper-button .rte-stepper-complete-indicator{display:flex;justify-content:center;align-items:center;width:32px;height:32px;border-radius:999px;background-color:var(--background-brand-default);border:2px solid var(--border-brand-default);color:var(--content-primary-inverse)}.rte-stepper .rte-stepper-item .rte-stepper-button .rte-stepper-number{display:flex;justify-content:center;align-items:center;width:32px;height:32px;border-radius:999px;border:2px solid var(--border-secondary)}.rte-stepper .rte-stepper-item .rte-stepper-button .rte-stepper-number span{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;color:var(--content-tertiary);display:flex;justify-content:center;align-items:center}.rte-stepper .rte-stepper-item .rte-stepper-button .rte-stepper-name{font-family:Arial;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px;color:var(--content-tertiary);text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;position:relative}.rte-stepper .rte-stepper-item:hover[data-clickable=true][data-active=false]{cursor:pointer}.rte-stepper .rte-stepper-item:hover[data-clickable=true][data-active=false] .rte-stepper-name{color:var(--content-secondary)}.rte-stepper .rte-stepper-item:hover[data-clickable=true][data-active=false][data-completion-state=unvisited] .rte-stepper-number{border-color:var(--border-primary)}.rte-stepper .rte-stepper-item:hover[data-clickable=true][data-active=false][data-completion-state=unvisited] .rte-stepper-complete-indicator{background-color:var(--background-brand-hover);border:2px solid var(--background-brand-hover)}.rte-stepper .rte-stepper-item:hover[data-clickable=true][data-active=false][data-completion-state=incomplete] .rte-stepper-number span{background-color:var(--background-brand-hover)}.rte-stepper .rte-stepper-item:hover[data-clickable=true][data-active=false][data-completion-state=complete] .rte-stepper-complete-indicator{background-color:var(--background-brand-hover);border:2px solid var(--background-brand-hover)}.rte-stepper .rte-stepper-item[data-completion-state=incomplete][data-active=false] .rte-stepper-number{border:2px solid var(--border-brand-default)}.rte-stepper .rte-stepper-item[data-completion-state=incomplete][data-active=false] .rte-stepper-number span{color:var(--content-primary-inverse);border:solid 2px var(--brand-default);border-radius:999px;background-color:var(--background-brand-default);width:28px;height:28px}.rte-stepper .rte-stepper-item[data-completion-state=incomplete] .rte-stepper-name{font-family:Arial;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px}.rte-stepper .rte-stepper-item[data-active=true] .rte-stepper-button .rte-stepper-number{border:2px solid var(--border-brand-default)}.rte-stepper .rte-stepper-item[data-active=true] .rte-stepper-button .rte-stepper-number span{color:var(--content-brand-default)}.rte-stepper .rte-stepper-item[data-active=true] .rte-stepper-button .rte-stepper-name{font-family:Arial;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px;color:var(--content-primary)}.rte-stepper .rte-stepper-item[data-orientation=vertical],.rte-stepper .rte-stepper-item[data-orientation=vertical] .rte-stepper-button{flex-direction:row}.rte-stepper .rte-stepper-item[data-orientation=vertical] .rte-stepper-button .rte-stepper-name{text-align:left}.rte-stepper .rte-step-separator{width:100%;border-radius:999px;height:4px;margin-top:16px;background-color:var(--border-secondary);flex:1 1 auto}.rte-stepper .rte-step-separator[data-complete=true]{background-color:var(--border-brand-default)}.rte-stepper .rte-step-separator[data-orientation=vertical]{width:4px;height:100%;margin-left:16px;margin-top:0}\n"] }]
|
|
3113
3324
|
}] });
|
|
3114
3325
|
|
|
3115
3326
|
class ToastComponent {
|
|
@@ -3316,6 +3527,7 @@ class TagComponent {
|
|
|
3316
3527
|
this.label = input("");
|
|
3317
3528
|
this.showLeftIcon = input(false);
|
|
3318
3529
|
this.iconName = input();
|
|
3530
|
+
this.ariaLabel = input();
|
|
3319
3531
|
this.computedIconName = computed(() => {
|
|
3320
3532
|
if (this.tagType() === "status") {
|
|
3321
3533
|
const statusIconMap = {
|
|
@@ -3337,11 +3549,11 @@ class TagComponent {
|
|
|
3337
3549
|
});
|
|
3338
3550
|
}
|
|
3339
3551
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3340
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: TagComponent, isStandalone: true, selector: "rte-tag", inputs: { tagType: { classPropertyName: "tagType", publicName: "tagType", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, compactSpacing: { classPropertyName: "compactSpacing", publicName: "compactSpacing", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, showLeftIcon: { classPropertyName: "showLeftIcon", publicName: "showLeftIcon", isSignal: true, isRequired: false, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"rte-tag\"\n [attr.data-tag-type]=\"tagType()\"\n [attr.data-status]=\"status()\"\n [attr.data-color]=\"color()\"\n [attr.data-compact-spacing]=\"compactSpacing()\"\n>\n <ng-container *ngIf=\"isValidIconName() && (tagType() === 'status' || showLeftIcon())\">\n <rte-icon [name]=\"computedIconName()\" [size]=\"16\"></rte-icon>\n </ng-container>\n <ng-container *ngIf=\"label\">\n <
|
|
3552
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: TagComponent, isStandalone: true, selector: "rte-tag", inputs: { tagType: { classPropertyName: "tagType", publicName: "tagType", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, compactSpacing: { classPropertyName: "compactSpacing", publicName: "compactSpacing", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, showLeftIcon: { classPropertyName: "showLeftIcon", publicName: "showLeftIcon", isSignal: true, isRequired: false, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"rte-tag\"\n [attr.data-tag-type]=\"tagType()\"\n [attr.data-status]=\"status()\"\n [attr.data-color]=\"color()\"\n [attr.data-compact-spacing]=\"compactSpacing()\"\n [attr.aria-label]=\"ariaLabel()\"\n>\n <ng-container *ngIf=\"isValidIconName() && (tagType() === 'status' || showLeftIcon())\">\n <rte-icon [name]=\"computedIconName()\" [size]=\"16\"></rte-icon>\n </ng-container>\n <ng-container *ngIf=\"label\">\n <span class=\"tag-label\" [attr.data-compact-spacing]=\"compactSpacing()\">{{ label() }}</span>\n </ng-container>\n</div>\n", styles: [".rte-tag{height:32px;display:inline-flex;padding:4px 6px;justify-content:center;align-items:center;gap:0px;border-radius:4px;text-wrap:nowrap}.rte-tag[data-compact-spacing=true]{padding:0 6px;height:24px}.rte-tag .tag-label{padding:0 6px;font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Arial;font-weight:400;font-size:16px;line-height:24px;letter-spacing:0px;color:var(--content-status)}.rte-tag .tag-label[data-compact-spacing=true]{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}.rte-tag[data-tag-type=status][data-status=success],.rte-tag[data-tag-type=status][data-status=information],.rte-tag[data-tag-type=status][data-status=alert]{color:var(--content-primary-inverse)}.rte-tag[data-tag-type=status][data-status=success]{background-color:var(--background-success-default)}.rte-tag[data-tag-type=status][data-status=information]{background-color:var(--background-info-default)}.rte-tag[data-tag-type=status][data-status=warning]{background-color:var(--background-warning-default)}.rte-tag[data-tag-type=status][data-status=alert]{background-color:var(--background-danger-default)}.rte-tag[data-tag-type=decorative][data-color=brand]{background-color:var(--background-brand-default)}.rte-tag[data-tag-type=decorative][data-color=neutral]{background-color:var(--decorative-neutral)}.rte-tag[data-tag-type=decorative][data-color=azur]{background-color:var(--decorative-bleu-iceberg)}.rte-tag[data-tag-type=decorative][data-color=jade]{background-color:var(--decorative-vert-foret)}.rte-tag[data-tag-type=decorative][data-color=lavande]{background-color:var(--decorative-violet)}.rte-tag[data-tag-type=decorative][data-color=ciel]{background-color:var(--decorative-bleu-rte)}.rte-tag[data-tag-type=decorative][data-color=nuage]{background-color:var(--decorative-bleu-digital)}.rte-tag[data-tag-type=decorative][data-color=givre]{background-color:var(--decorative-marine)}.rte-tag[data-tag-type=decorative][data-color=brume]{background-color:var(--decorative-bleu-petrole)}.rte-tag[data-tag-type=decorative][data-color=glacier]{background-color:var(--decorative-bleu-cyan)}.rte-tag[data-tag-type=decorative][data-color=turquoise]{background-color:var(--decorative-vert)}.rte-tag[data-tag-type=decorative][data-color=anis]{background-color:var(--decorative-vert-indications)}.rte-tag[data-tag-type=decorative][data-color=menthe]{background-color:var(--decorative-vert-digital)}.rte-tag[data-tag-type=decorative][data-color=citronnelle]{background-color:var(--decorative-jaune)}.rte-tag[data-tag-type=decorative][data-color=sable]{background-color:var(--decorative-jaune-ocre)}.rte-tag[data-tag-type=decorative][data-color=abricot]{background-color:var(--decorative-jaune-indications)}.rte-tag[data-tag-type=decorative][data-color=coral]{background-color:var(--decorative-saumon)}.rte-tag[data-tag-type=decorative][data-color=rose]{background-color:var(--decorative-rose-digital)}.rte-tag[data-tag-type=decorative][data-color=petale]{background-color:var(--decorative-fuschia)}.rte-tag[data-tag-type=decorative][data-color=quartz]{background-color:var(--decorative-rouge-indication)}.rte-tag[data-tag-type=decorative][data-color=cendre]{background-color:var(--decorative-taupe)}.rte-tag[data-tag-type=decorative][data-color=brand],.rte-tag[data-tag-type=decorative][data-color=brand] .tag-label{color:var(--content-primary-inverse)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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 }); }
|
|
3341
3553
|
}
|
|
3342
3554
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TagComponent, decorators: [{
|
|
3343
3555
|
type: Component,
|
|
3344
|
-
args: [{ selector: "rte-tag", imports: [CommonModule, IconComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"rte-tag\"\n [attr.data-tag-type]=\"tagType()\"\n [attr.data-status]=\"status()\"\n [attr.data-color]=\"color()\"\n [attr.data-compact-spacing]=\"compactSpacing()\"\n>\n <ng-container *ngIf=\"isValidIconName() && (tagType() === 'status' || showLeftIcon())\">\n <rte-icon [name]=\"computedIconName()\" [size]=\"16\"></rte-icon>\n </ng-container>\n <ng-container *ngIf=\"label\">\n <
|
|
3556
|
+
args: [{ selector: "rte-tag", imports: [CommonModule, IconComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"rte-tag\"\n [attr.data-tag-type]=\"tagType()\"\n [attr.data-status]=\"status()\"\n [attr.data-color]=\"color()\"\n [attr.data-compact-spacing]=\"compactSpacing()\"\n [attr.aria-label]=\"ariaLabel()\"\n>\n <ng-container *ngIf=\"isValidIconName() && (tagType() === 'status' || showLeftIcon())\">\n <rte-icon [name]=\"computedIconName()\" [size]=\"16\"></rte-icon>\n </ng-container>\n <ng-container *ngIf=\"label\">\n <span class=\"tag-label\" [attr.data-compact-spacing]=\"compactSpacing()\">{{ label() }}</span>\n </ng-container>\n</div>\n", styles: [".rte-tag{height:32px;display:inline-flex;padding:4px 6px;justify-content:center;align-items:center;gap:0px;border-radius:4px;text-wrap:nowrap}.rte-tag[data-compact-spacing=true]{padding:0 6px;height:24px}.rte-tag .tag-label{padding:0 6px;font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Arial;font-weight:400;font-size:16px;line-height:24px;letter-spacing:0px;color:var(--content-status)}.rte-tag .tag-label[data-compact-spacing=true]{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}.rte-tag[data-tag-type=status][data-status=success],.rte-tag[data-tag-type=status][data-status=information],.rte-tag[data-tag-type=status][data-status=alert]{color:var(--content-primary-inverse)}.rte-tag[data-tag-type=status][data-status=success]{background-color:var(--background-success-default)}.rte-tag[data-tag-type=status][data-status=information]{background-color:var(--background-info-default)}.rte-tag[data-tag-type=status][data-status=warning]{background-color:var(--background-warning-default)}.rte-tag[data-tag-type=status][data-status=alert]{background-color:var(--background-danger-default)}.rte-tag[data-tag-type=decorative][data-color=brand]{background-color:var(--background-brand-default)}.rte-tag[data-tag-type=decorative][data-color=neutral]{background-color:var(--decorative-neutral)}.rte-tag[data-tag-type=decorative][data-color=azur]{background-color:var(--decorative-bleu-iceberg)}.rte-tag[data-tag-type=decorative][data-color=jade]{background-color:var(--decorative-vert-foret)}.rte-tag[data-tag-type=decorative][data-color=lavande]{background-color:var(--decorative-violet)}.rte-tag[data-tag-type=decorative][data-color=ciel]{background-color:var(--decorative-bleu-rte)}.rte-tag[data-tag-type=decorative][data-color=nuage]{background-color:var(--decorative-bleu-digital)}.rte-tag[data-tag-type=decorative][data-color=givre]{background-color:var(--decorative-marine)}.rte-tag[data-tag-type=decorative][data-color=brume]{background-color:var(--decorative-bleu-petrole)}.rte-tag[data-tag-type=decorative][data-color=glacier]{background-color:var(--decorative-bleu-cyan)}.rte-tag[data-tag-type=decorative][data-color=turquoise]{background-color:var(--decorative-vert)}.rte-tag[data-tag-type=decorative][data-color=anis]{background-color:var(--decorative-vert-indications)}.rte-tag[data-tag-type=decorative][data-color=menthe]{background-color:var(--decorative-vert-digital)}.rte-tag[data-tag-type=decorative][data-color=citronnelle]{background-color:var(--decorative-jaune)}.rte-tag[data-tag-type=decorative][data-color=sable]{background-color:var(--decorative-jaune-ocre)}.rte-tag[data-tag-type=decorative][data-color=abricot]{background-color:var(--decorative-jaune-indications)}.rte-tag[data-tag-type=decorative][data-color=coral]{background-color:var(--decorative-saumon)}.rte-tag[data-tag-type=decorative][data-color=rose]{background-color:var(--decorative-rose-digital)}.rte-tag[data-tag-type=decorative][data-color=petale]{background-color:var(--decorative-fuschia)}.rte-tag[data-tag-type=decorative][data-color=quartz]{background-color:var(--decorative-rouge-indication)}.rte-tag[data-tag-type=decorative][data-color=cendre]{background-color:var(--decorative-taupe)}.rte-tag[data-tag-type=decorative][data-color=brand],.rte-tag[data-tag-type=decorative][data-color=brand] .tag-label{color:var(--content-primary-inverse)}\n"] }]
|
|
3345
3557
|
}] });
|
|
3346
3558
|
|
|
3347
3559
|
class AssistiveTextComponent {
|
|
@@ -3622,11 +3834,11 @@ class TabItemComponent {
|
|
|
3622
3834
|
});
|
|
3623
3835
|
}
|
|
3624
3836
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TabItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3625
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.14", type: TabItemComponent, isStandalone: true, selector: "rte-tab-item", inputs: { direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: false, transformFunction: null }, compactSpacing: { classPropertyName: "compactSpacing", publicName: "compactSpacing", isSignal: true, isRequired: false, transformFunction: null }, isSelected: { classPropertyName: "isSelected", publicName: "isSelected", isSignal: true, isRequired: false, transformFunction: null }, handleKeydown: { classPropertyName: "handleKeydown", publicName: "handleKeydown", isSignal: true, isRequired: false, transformFunction: null }, inverted: { classPropertyName: "inverted", publicName: "inverted", isSignal: true, isRequired: false, transformFunction: null }, isHidden: { classPropertyName: "isHidden", publicName: "isHidden", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { click: "click" }, viewQueries: [{ propertyName: "tabItemRef", first: true, predicate: ["tabItem"], descendants: true, isSignal: true }], ngImport: i0, template: "<button\n #tabItem\n class=\"rte-tabitem\"\n role=\"tab\"\n [id]=\"option()?.id\"\n [attr.aria-selected]=\"isSelected()\"\n [attr.aria-controls]=\"option()?.panelId\"\n [tabIndex]=\"isSelected() ? 0 : -1\"\n [attr.data-selected]=\"isSelected()\"\n [attr.data-inverted]=\"inverted()\"\n [attr.data-compact-spacing]=\"compactSpacing()\"\n [attr.data-disabled]=\"option()?.disabled\"\n [attr.data-hidden]=\"isHidden()\"\n (click)=\"onClickTabItem($event, option()?.id || '')\"\n (mouseover)=\"handleMouseHover()\"\n (mouseout)=\"handleMouseOut()\"\n (keydown)=\"handleKeydown()\"\n>\n <rte-icon *ngIf=\"option()?.icon\" [name]=\"option()?.icon || ''\" [appearance]=\"isSelected() ? 'filled' : 'outlined'\" />\n <span *ngIf=\"option()?.label\">{{ option()?.label }}</span>\n <rte-badge\n *ngIf=\"displayBadge(option()!)\"\n [simpleBadge]=\"true\"\n [badgeContent]=\"option()?.badgeContent || 'empty'\"\n [badgeType]=\"option()?.badgeType || 'neutral'\"\n [icon]=\"option()?.badgeIcon || ''\"\n [count]=\"option()?.badgeCount\"\n />\n</button>\n<span\n #hoverIndicator\n class=\"rte-tab-hover-indicator\"\n [attr.data-disabled]=\"option()?.disabled\"\n [id]=\"'tab-hover-indicator' + option()?.id\"\n [ngStyle]=\"{\n width: hoverIndicatorWidth(),\n height: hoverIndicatorHeight(),\n left: hoverIndicatorLeft(),\n top: hoverIndicatorTop(),\n opacity: hoverIndicatorOpacity(),\n }\"\n></span>\n", styles: [":host{pointer-events:none;display:flex}.rte-tabitem{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;display:flex;padding:12px;justify-content:center;align-items:center;gap:12px;background:transparent;color:var(--content-
|
|
3837
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.14", type: TabItemComponent, isStandalone: true, selector: "rte-tab-item", inputs: { direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: false, transformFunction: null }, compactSpacing: { classPropertyName: "compactSpacing", publicName: "compactSpacing", isSignal: true, isRequired: false, transformFunction: null }, isSelected: { classPropertyName: "isSelected", publicName: "isSelected", isSignal: true, isRequired: false, transformFunction: null }, handleKeydown: { classPropertyName: "handleKeydown", publicName: "handleKeydown", isSignal: true, isRequired: false, transformFunction: null }, inverted: { classPropertyName: "inverted", publicName: "inverted", isSignal: true, isRequired: false, transformFunction: null }, isHidden: { classPropertyName: "isHidden", publicName: "isHidden", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { click: "click" }, viewQueries: [{ propertyName: "tabItemRef", first: true, predicate: ["tabItem"], descendants: true, isSignal: true }], ngImport: i0, template: "<button\n #tabItem\n class=\"rte-tabitem\"\n role=\"tab\"\n [id]=\"option()?.id\"\n [attr.aria-selected]=\"isSelected()\"\n [attr.aria-controls]=\"option()?.panelId\"\n [tabIndex]=\"isSelected() ? 0 : -1\"\n [attr.data-selected]=\"isSelected()\"\n [attr.data-inverted]=\"inverted()\"\n [attr.data-compact-spacing]=\"compactSpacing()\"\n [attr.data-disabled]=\"option()?.disabled\"\n [attr.data-hidden]=\"isHidden()\"\n (click)=\"onClickTabItem($event, option()?.id || '')\"\n (mouseover)=\"handleMouseHover()\"\n (mouseout)=\"handleMouseOut()\"\n (keydown)=\"handleKeydown()\"\n>\n <rte-icon *ngIf=\"option()?.icon\" [name]=\"option()?.icon || ''\" [appearance]=\"isSelected() ? 'filled' : 'outlined'\" />\n <span *ngIf=\"option()?.label\">{{ option()?.label }}</span>\n <rte-badge\n *ngIf=\"displayBadge(option()!)\"\n [simpleBadge]=\"true\"\n [badgeContent]=\"option()?.badgeContent || 'empty'\"\n [badgeType]=\"option()?.badgeType || 'neutral'\"\n [icon]=\"option()?.badgeIcon || ''\"\n [count]=\"option()?.badgeCount\"\n />\n</button>\n<span\n #hoverIndicator\n class=\"rte-tab-hover-indicator\"\n [attr.data-disabled]=\"option()?.disabled\"\n [id]=\"'tab-hover-indicator' + option()?.id\"\n [ngStyle]=\"{\n width: hoverIndicatorWidth(),\n height: hoverIndicatorHeight(),\n left: hoverIndicatorLeft(),\n top: hoverIndicatorTop(),\n opacity: hoverIndicatorOpacity(),\n }\"\n></span>\n", styles: [":host{pointer-events:none;display:flex}.rte-tabitem{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;display:flex;padding:12px;justify-content:center;align-items:center;gap:12px;background:transparent;color:var(--content-tertiary);cursor:pointer;border:none;text-align:left;flex-shrink:0;margin-left:2px;height:100%;pointer-events:auto}.rte-tabitem[data-inverted=true],.rte-tabitem[data-inverted=true]:hover,.rte-tabitem[data-inverted=true][data-selected=true]{color:var(--content-primary-inverse)}.rte-tabitem[data-direction=vertical]{flex-shrink:1;margin-left:0}.rte-tabitem[data-hidden=true]{visibility:hidden}.rte-tabitem:hover{color:var(--content-secondary)}.rte-tabitem[data-selected=true]{color:var(--content-primary)}.rte-tabitem[data-disabled=true]{color:var(--content-disabled);cursor:not-allowed}.rte-tabitem[data-compact-spacing=true]{padding:4px 12px}.rte-tabitem:focus-visible{z-index:1;outline:2px solid var(--border-brand-focused)}.rte-tab-hover-indicator{position:absolute;top:4px;height:2px;width:2px;background:var(--background-neutral-regular-hover);opacity:0;transition:left .2s ease,width .2s ease;z-index:10}.rte-tab-hover-indicator[data-disabled=true]{display:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3626
3838
|
}
|
|
3627
3839
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TabItemComponent, decorators: [{
|
|
3628
3840
|
type: Component,
|
|
3629
|
-
args: [{ selector: "rte-tab-item", imports: [CommonModule, IconComponent, BadgeComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n #tabItem\n class=\"rte-tabitem\"\n role=\"tab\"\n [id]=\"option()?.id\"\n [attr.aria-selected]=\"isSelected()\"\n [attr.aria-controls]=\"option()?.panelId\"\n [tabIndex]=\"isSelected() ? 0 : -1\"\n [attr.data-selected]=\"isSelected()\"\n [attr.data-inverted]=\"inverted()\"\n [attr.data-compact-spacing]=\"compactSpacing()\"\n [attr.data-disabled]=\"option()?.disabled\"\n [attr.data-hidden]=\"isHidden()\"\n (click)=\"onClickTabItem($event, option()?.id || '')\"\n (mouseover)=\"handleMouseHover()\"\n (mouseout)=\"handleMouseOut()\"\n (keydown)=\"handleKeydown()\"\n>\n <rte-icon *ngIf=\"option()?.icon\" [name]=\"option()?.icon || ''\" [appearance]=\"isSelected() ? 'filled' : 'outlined'\" />\n <span *ngIf=\"option()?.label\">{{ option()?.label }}</span>\n <rte-badge\n *ngIf=\"displayBadge(option()!)\"\n [simpleBadge]=\"true\"\n [badgeContent]=\"option()?.badgeContent || 'empty'\"\n [badgeType]=\"option()?.badgeType || 'neutral'\"\n [icon]=\"option()?.badgeIcon || ''\"\n [count]=\"option()?.badgeCount\"\n />\n</button>\n<span\n #hoverIndicator\n class=\"rte-tab-hover-indicator\"\n [attr.data-disabled]=\"option()?.disabled\"\n [id]=\"'tab-hover-indicator' + option()?.id\"\n [ngStyle]=\"{\n width: hoverIndicatorWidth(),\n height: hoverIndicatorHeight(),\n left: hoverIndicatorLeft(),\n top: hoverIndicatorTop(),\n opacity: hoverIndicatorOpacity(),\n }\"\n></span>\n", styles: [":host{pointer-events:none;display:flex}.rte-tabitem{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;display:flex;padding:12px;justify-content:center;align-items:center;gap:12px;background:transparent;color:var(--content-
|
|
3841
|
+
args: [{ selector: "rte-tab-item", imports: [CommonModule, IconComponent, BadgeComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n #tabItem\n class=\"rte-tabitem\"\n role=\"tab\"\n [id]=\"option()?.id\"\n [attr.aria-selected]=\"isSelected()\"\n [attr.aria-controls]=\"option()?.panelId\"\n [tabIndex]=\"isSelected() ? 0 : -1\"\n [attr.data-selected]=\"isSelected()\"\n [attr.data-inverted]=\"inverted()\"\n [attr.data-compact-spacing]=\"compactSpacing()\"\n [attr.data-disabled]=\"option()?.disabled\"\n [attr.data-hidden]=\"isHidden()\"\n (click)=\"onClickTabItem($event, option()?.id || '')\"\n (mouseover)=\"handleMouseHover()\"\n (mouseout)=\"handleMouseOut()\"\n (keydown)=\"handleKeydown()\"\n>\n <rte-icon *ngIf=\"option()?.icon\" [name]=\"option()?.icon || ''\" [appearance]=\"isSelected() ? 'filled' : 'outlined'\" />\n <span *ngIf=\"option()?.label\">{{ option()?.label }}</span>\n <rte-badge\n *ngIf=\"displayBadge(option()!)\"\n [simpleBadge]=\"true\"\n [badgeContent]=\"option()?.badgeContent || 'empty'\"\n [badgeType]=\"option()?.badgeType || 'neutral'\"\n [icon]=\"option()?.badgeIcon || ''\"\n [count]=\"option()?.badgeCount\"\n />\n</button>\n<span\n #hoverIndicator\n class=\"rte-tab-hover-indicator\"\n [attr.data-disabled]=\"option()?.disabled\"\n [id]=\"'tab-hover-indicator' + option()?.id\"\n [ngStyle]=\"{\n width: hoverIndicatorWidth(),\n height: hoverIndicatorHeight(),\n left: hoverIndicatorLeft(),\n top: hoverIndicatorTop(),\n opacity: hoverIndicatorOpacity(),\n }\"\n></span>\n", styles: [":host{pointer-events:none;display:flex}.rte-tabitem{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;display:flex;padding:12px;justify-content:center;align-items:center;gap:12px;background:transparent;color:var(--content-tertiary);cursor:pointer;border:none;text-align:left;flex-shrink:0;margin-left:2px;height:100%;pointer-events:auto}.rte-tabitem[data-inverted=true],.rte-tabitem[data-inverted=true]:hover,.rte-tabitem[data-inverted=true][data-selected=true]{color:var(--content-primary-inverse)}.rte-tabitem[data-direction=vertical]{flex-shrink:1;margin-left:0}.rte-tabitem[data-hidden=true]{visibility:hidden}.rte-tabitem:hover{color:var(--content-secondary)}.rte-tabitem[data-selected=true]{color:var(--content-primary)}.rte-tabitem[data-disabled=true]{color:var(--content-disabled);cursor:not-allowed}.rte-tabitem[data-compact-spacing=true]{padding:4px 12px}.rte-tabitem:focus-visible{z-index:1;outline:2px solid var(--border-brand-focused)}.rte-tab-hover-indicator{position:absolute;top:4px;height:2px;width:2px;background:var(--background-neutral-regular-hover);opacity:0;transition:left .2s ease,width .2s ease;z-index:10}.rte-tab-hover-indicator[data-disabled=true]{display:none}\n"] }]
|
|
3630
3842
|
}] });
|
|
3631
3843
|
|
|
3632
3844
|
class TabComponent {
|
|
@@ -3861,5 +4073,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
3861
4073
|
* Generated bundle index. Do not edit.
|
|
3862
4074
|
*/
|
|
3863
4075
|
|
|
3864
|
-
export { BadgeDirective, BannerComponent, BreadcrumbsComponent, ButtonComponent, CardComponent, CheckboxComponent, CheckboxGroupComponent, ChipComponent, ColDirective, DividerComponent, GridDirective, IconButtonComponent, IconButtonToggleComponent, IconComponent, LinkComponent, LoaderComponent, ModalDirective, ModalModule, ModalTriggerDirective, PopoverDirective, RadioButtonComponent, RadioButtonGroupComponent, SearchbarComponent, SegmentedControlComponent, SelectComponent, SideNavComponent, SplitButtonComponent, StepperComponent, SwitchComponent, TabComponent, TagComponent, TextInputComponent, TextareaComponent, ToastComponent, ToastService, TooltipDirective };
|
|
4076
|
+
export { BadgeDirective, BannerComponent, BaseSideNavComponent, BreadcrumbsComponent, ButtonComponent, CardComponent, CheckboxComponent, CheckboxGroupComponent, ChipComponent, ColDirective, DividerComponent, DropdownDirective, DropdownItemComponent, DropdownMenuComponent, DropdownMenuFooterDirective, DropdownMenuHeaderDirective, DropdownModule, DropdownTriggerDirective, GridDirective, IconButtonComponent, IconButtonToggleComponent, IconComponent, LinkComponent, LoaderComponent, ModalDirective, ModalModule, ModalTriggerDirective, PopoverDirective, RadioButtonComponent, RadioButtonGroupComponent, SearchbarComponent, SegmentedControlComponent, SelectComponent, SideNavComponent, SplitButtonComponent, StepperComponent, SwitchComponent, TabComponent, TagComponent, TextInputComponent, TextareaComponent, ToastComponent, ToastService, TooltipDirective };
|
|
3865
4077
|
//# sourceMappingURL=design-system-rte-angular.mjs.map
|