ecabs-components 2.0.0-alpha.7 → 2.0.0-alpha.9

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.
Files changed (59) hide show
  1. package/README.md +33 -0
  2. package/fesm2022/ecabs-components.mjs +559 -115
  3. package/fesm2022/ecabs-components.mjs.map +1 -1
  4. package/lib/base/consts/badge.consts.d.ts +5 -0
  5. package/lib/base/consts/icon.consts.d.ts +1 -0
  6. package/lib/base/consts/status-badge.consts.d.ts +3 -0
  7. package/lib/base/directives/action-menu-trigger.directive.d.ts +8 -0
  8. package/lib/base/directives/badge.directive.d.ts +26 -0
  9. package/lib/base/directives/badge.directive.module.d.ts +8 -0
  10. package/lib/base/directives/tooltip-if-truncated.directive.module.d.ts +2 -1
  11. package/lib/base/models/action-menu.models.d.ts +13 -0
  12. package/lib/base/models/select.models.d.ts +1 -1
  13. package/lib/base/pipes/status-badge-variant.pipe.d.ts +8 -0
  14. package/lib/base/utils/icon.utils.d.ts +2 -0
  15. package/lib/ecabs-action-menu/ecabs-action-menu.component.d.ts +26 -0
  16. package/lib/ecabs-action-menu/ecabs-action-menu.module.d.ts +13 -0
  17. package/lib/ecabs-badge/ecabs-badge.component.d.ts +41 -0
  18. package/lib/ecabs-badge/ecabs-badge.module.d.ts +13 -0
  19. package/lib/ecabs-base-phone-input/ecabs-base-phone.component.d.ts +11 -7
  20. package/lib/ecabs-expansion-panel/ecabs-expansion-panel.component.d.ts +3 -2
  21. package/lib/ecabs-expansion-panel/ecabs-expansion-panel.module.d.ts +3 -3
  22. package/lib/ecabs-phone/ecabs-phone.component.d.ts +1 -0
  23. package/package.json +1 -1
  24. package/public-api.d.ts +13 -0
  25. package/src/assets/styles/material/_theme.scss +2 -2
  26. package/src/assets/styles/material/overrides/_autocomplete.scss +1 -1
  27. package/src/assets/styles/material/overrides/_badge.scss +122 -0
  28. package/src/assets/styles/material/overrides/_button.scss +1 -1
  29. package/src/assets/styles/material/overrides/_card.scss +1 -1
  30. package/src/assets/styles/material/overrides/_chip.scss +1 -2
  31. package/src/assets/styles/material/overrides/_datepicker.scss +0 -1
  32. package/src/assets/styles/material/overrides/_dialog.scss +1 -1
  33. package/src/assets/styles/material/overrides/_divider.scss +1 -1
  34. package/src/assets/styles/material/overrides/_expansion.scss +43 -1
  35. package/src/assets/styles/material/overrides/_form.scss +1 -2
  36. package/src/assets/styles/material/overrides/_icon.scss +1 -1
  37. package/src/assets/styles/material/overrides/_menu.scss +51 -2
  38. package/src/assets/styles/material/overrides/_paginator.scss +0 -1
  39. package/src/assets/styles/material/overrides/_phone.scss +7 -9
  40. package/src/assets/styles/material/overrides/_progress.scss +0 -1
  41. package/src/assets/styles/material/overrides/_select.scss +3 -7
  42. package/src/assets/styles/material/overrides/_tab.scss +1 -1
  43. package/src/assets/styles/material/overrides/_table.scss +1 -2
  44. package/src/assets/styles/material/overrides/_toaster.scss +1 -1
  45. package/src/assets/styles/material/overrides/_tooltip.scss +1 -1
  46. package/src/assets/styles/material/overrides/index.scss +23 -22
  47. package/src/assets/styles/scss/base/index.scss +2 -2
  48. package/src/assets/styles/scss/modules/_badge.scss +132 -0
  49. package/src/assets/styles/scss/modules/_button.scss +1 -0
  50. package/src/assets/styles/scss/modules/_datepicker.scss +0 -1
  51. package/src/assets/styles/scss/modules/_map.scss +0 -1
  52. package/src/assets/styles/scss/modules/_menu.scss +52 -0
  53. package/src/assets/styles/scss/modules/_phone.scss +1 -4
  54. package/src/assets/styles/scss/modules/index.scss +25 -23
  55. package/src/assets/styles/scss/utilities/_colors.scss +6 -0
  56. package/src/assets/styles/scss/utilities/_mixins.scss +7 -0
  57. package/src/assets/styles/scss/utilities/index.scss +6 -6
  58. package/src/assets/styles/styles.scss +4 -4
  59. package/src/assets/styles/tailwind/index.scss +1 -1
@@ -0,0 +1,5 @@
1
+ import { PhosphorIconWeight } from './icon.consts';
2
+ export declare type BadgeVariant = 'default' | 'success' | 'warning' | 'danger' | 'info';
3
+ export declare type BadgeSize = 'small' | 'medium' | 'large';
4
+ export declare type BadgeIconWeight = PhosphorIconWeight;
5
+ export declare const CHIP_LABEL_CLASS = "mdc-evolution-chip__text-label";
@@ -0,0 +1 @@
1
+ export declare type PhosphorIconWeight = 'regular' | 'bold' | 'fill' | 'light' | 'thin' | 'duotone';
@@ -0,0 +1,3 @@
1
+ import { BadgeVariant } from './badge.consts';
2
+ export declare const STATUS_BADGE_VARIANTS: Readonly<Record<string, BadgeVariant>>;
3
+ export declare const resolveStatusBadgeVariant: (status: string | null | undefined) => BadgeVariant;
@@ -0,0 +1,8 @@
1
+ import { TemplateRef } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class EcabsActionMenuTriggerDirective {
4
+ readonly templateRef: TemplateRef<void>;
5
+ constructor(templateRef: TemplateRef<void>);
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<EcabsActionMenuTriggerDirective, never>;
7
+ static ɵdir: i0.ɵɵDirectiveDeclaration<EcabsActionMenuTriggerDirective, "[ecabsActionMenuTrigger]", never, {}, {}, never, never, false, never>;
8
+ }
@@ -0,0 +1,26 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import { MatChip } from '@angular/material/chips';
3
+ import { MatMenuTrigger } from '@angular/material/menu';
4
+ import { BadgeSize, BadgeVariant } from '../consts/badge.consts';
5
+ import { EcabsTooltipIfTruncatedDirective } from './tooltip-if-truncated.directive';
6
+ import * as i0 from "@angular/core";
7
+ export declare class EcabsBadgeDirective {
8
+ private readonly elementRef;
9
+ private readonly chip?;
10
+ private readonly truncationTooltip?;
11
+ variant: BadgeVariant;
12
+ size: BadgeSize;
13
+ set bordered(value: boolean | string);
14
+ set disableRipple(value: boolean | string);
15
+ set interactive(value: boolean | string);
16
+ get badgeClasses(): string;
17
+ private hasBorder;
18
+ private rippleDisabled?;
19
+ private isInteractive;
20
+ private get noRipple();
21
+ private syncChip;
22
+ constructor(elementRef: ElementRef<HTMLElement>, menuTrigger?: MatMenuTrigger, chip?: MatChip, truncationTooltip?: EcabsTooltipIfTruncatedDirective);
23
+ onKeydown(event: KeyboardEvent): void;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<EcabsBadgeDirective, [null, { optional: true; self: true; }, { optional: true; }, { optional: true; }]>;
25
+ static ɵdir: i0.ɵɵDirectiveDeclaration<EcabsBadgeDirective, "[ecabsBadge]", never, { "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "bordered": { "alias": "bordered"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "interactive": { "alias": "interactive"; "required": false; }; }, {}, never, never, false, never>;
26
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./badge.directive";
3
+ import * as i2 from "@angular/common";
4
+ export declare class EcabsBadgeDirectiveModule {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<EcabsBadgeDirectiveModule, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDeclaration<EcabsBadgeDirectiveModule, [typeof i1.EcabsBadgeDirective], [typeof i2.CommonModule], [typeof i1.EcabsBadgeDirective]>;
7
+ static ɵinj: i0.ɵɵInjectorDeclaration<EcabsBadgeDirectiveModule>;
8
+ }
@@ -1,8 +1,9 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./tooltip-if-truncated.directive";
3
3
  import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/material/tooltip";
4
5
  export declare class EcabsTooltipIfTruncatedDirectiveModule {
5
6
  static ɵfac: i0.ɵɵFactoryDeclaration<EcabsTooltipIfTruncatedDirectiveModule, never>;
6
- static ɵmod: i0.ɵɵNgModuleDeclaration<EcabsTooltipIfTruncatedDirectiveModule, [typeof i1.EcabsTooltipIfTruncatedDirective], [typeof i2.CommonModule], [typeof i1.EcabsTooltipIfTruncatedDirective]>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<EcabsTooltipIfTruncatedDirectiveModule, [typeof i1.EcabsTooltipIfTruncatedDirective], [typeof i2.CommonModule, typeof i3.MatTooltipModule], [typeof i1.EcabsTooltipIfTruncatedDirective, typeof i3.MatTooltipModule]>;
7
8
  static ɵinj: i0.ɵɵInjectorDeclaration<EcabsTooltipIfTruncatedDirectiveModule>;
8
9
  }
@@ -0,0 +1,13 @@
1
+ import { PhosphorIconWeight } from '../consts/icon.consts';
2
+ export interface ActionMenuItem {
3
+ label: string;
4
+ icon?: string;
5
+ iconWeight?: PhosphorIconWeight;
6
+ isDestructive?: boolean;
7
+ action: () => void;
8
+ }
9
+ export interface ActionMenuEntry {
10
+ isVisible: boolean;
11
+ item: ActionMenuItem;
12
+ }
13
+ export type ActionMenuGroup = ActionMenuItem[];
@@ -1,4 +1,4 @@
1
- export type PhosphorIconWeight = 'regular' | 'bold' | 'fill' | 'light' | 'thin' | 'duotone';
1
+ import { PhosphorIconWeight } from '../consts/icon.consts';
2
2
  export interface SelectOption<T = unknown> {
3
3
  label: string;
4
4
  value: T;
@@ -0,0 +1,8 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { BadgeVariant } from '../consts/badge.consts';
3
+ import * as i0 from "@angular/core";
4
+ export declare class EcabsStatusBadgeVariantPipe implements PipeTransform {
5
+ transform(status: string | null | undefined): BadgeVariant;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<EcabsStatusBadgeVariantPipe, never>;
7
+ static ɵpipe: i0.ɵɵPipeDeclaration<EcabsStatusBadgeVariantPipe, "statusBadgeVariant", false>;
8
+ }
@@ -0,0 +1,2 @@
1
+ import { PhosphorIconWeight } from '../consts/icon.consts';
2
+ export declare function buildPhosphorSvgIcon(name: string | undefined | null, weight?: PhosphorIconWeight | null): string;
@@ -0,0 +1,26 @@
1
+ import { MatMenu, MenuPositionX } from '@angular/material/menu';
2
+ import { PhosphorIconWeight } from '../base/consts/icon.consts';
3
+ import { EcabsActionMenuTriggerDirective } from '../base/directives/action-menu-trigger.directive';
4
+ import { ActionMenuGroup, ActionMenuItem } from '../base/models/action-menu.models';
5
+ import * as i0 from "@angular/core";
6
+ export declare class EcabsActionMenuComponent {
7
+ groups: ActionMenuGroup[];
8
+ triggerIcon: string;
9
+ triggerIconWeight: PhosphorIconWeight;
10
+ triggerAriaLabel?: string;
11
+ xPosition: MenuPositionX;
12
+ menuClass: string;
13
+ triggerFocusable: boolean;
14
+ showTrigger: boolean;
15
+ readonly customTrigger?: EcabsActionMenuTriggerDirective;
16
+ readonly menu: MatMenu;
17
+ private readonly menuTrigger?;
18
+ get panelClass(): string;
19
+ get triggerSvgIcon(): string;
20
+ itemSvgIcon(item: ActionMenuItem): string;
21
+ triggerKeydown(event: Event): void;
22
+ trackByGroup(index: number): number;
23
+ trackByItem(_: number, item: ActionMenuItem): string;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<EcabsActionMenuComponent, never>;
25
+ static ɵcmp: i0.ɵɵComponentDeclaration<EcabsActionMenuComponent, "ecabs-action-menu", never, { "groups": { "alias": "groups"; "required": false; }; "triggerIcon": { "alias": "triggerIcon"; "required": false; }; "triggerIconWeight": { "alias": "triggerIconWeight"; "required": false; }; "triggerAriaLabel": { "alias": "triggerAriaLabel"; "required": false; }; "xPosition": { "alias": "xPosition"; "required": false; }; "menuClass": { "alias": "menuClass"; "required": false; }; "triggerFocusable": { "alias": "triggerFocusable"; "required": false; }; "showTrigger": { "alias": "showTrigger"; "required": false; }; }, {}, ["customTrigger"], never, false, never>;
26
+ }
@@ -0,0 +1,13 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./ecabs-action-menu.component";
3
+ import * as i2 from "../base/directives/action-menu-trigger.directive";
4
+ import * as i3 from "@angular/common";
5
+ import * as i4 from "@angular/material/button";
6
+ import * as i5 from "@angular/material/divider";
7
+ import * as i6 from "@angular/material/icon";
8
+ import * as i7 from "@angular/material/menu";
9
+ export declare class EcabsActionMenuModule {
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<EcabsActionMenuModule, never>;
11
+ static ɵmod: i0.ɵɵNgModuleDeclaration<EcabsActionMenuModule, [typeof i1.EcabsActionMenuComponent, typeof i2.EcabsActionMenuTriggerDirective], [typeof i3.CommonModule, typeof i4.MatButtonModule, typeof i5.MatDividerModule, typeof i6.MatIconModule, typeof i7.MatMenuModule], [typeof i1.EcabsActionMenuComponent, typeof i2.EcabsActionMenuTriggerDirective]>;
12
+ static ɵinj: i0.ɵɵInjectorDeclaration<EcabsActionMenuModule>;
13
+ }
@@ -0,0 +1,41 @@
1
+ import { BadgeIconWeight, BadgeSize, BadgeVariant } from '../base/consts/badge.consts';
2
+ import * as i0 from "@angular/core";
3
+ export declare class EcabsBadgeComponent {
4
+ variant: BadgeVariant;
5
+ size: BadgeSize;
6
+ set bordered(value: boolean | string);
7
+ hasBorder: boolean;
8
+ /**
9
+ * Icon name, resolved through whichever icon set the library is on (Phosphor
10
+ * today). Deliberately not named after the vendor so a future icon-set change
11
+ * does not ripple out to every call site.
12
+ */
13
+ icon?: string;
14
+ /**
15
+ * Defaults to `bold`: at badge icon sizes (12-18px) a `regular` stroke falls
16
+ * below one device pixel and antialiases into a ragged edge. `bold` also
17
+ * matches the ~26/256 ring thickness of the reference design.
18
+ */
19
+ iconWeight: BadgeIconWeight;
20
+ /**
21
+ * Material icon ligature, for the cases that need a Material glyph
22
+ * specifically. Used only when no `icon` is supplied.
23
+ */
24
+ materialIcon?: string;
25
+ /**
26
+ * Static so it resolves before the first change detection run, keeping the
27
+ * tooltip binding stable instead of changing after the view is checked.
28
+ */
29
+ private readonly labelRef?;
30
+ get svgIcon(): string;
31
+ /**
32
+ * Tooltip message for a clipped label. Read from the DOM rather than an input
33
+ * because the label is projected content. `ecabsTooltipIfTruncated` measures
34
+ * on mouseover, and that host listener also marks this view dirty, so the
35
+ * message is re-read on hover without any explicit change detection call.
36
+ * The directive suppresses the tooltip unless the text is actually clipped.
37
+ */
38
+ get labelText(): string;
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<EcabsBadgeComponent, never>;
40
+ static ɵcmp: i0.ɵɵComponentDeclaration<EcabsBadgeComponent, "ecabs-badge", never, { "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "bordered": { "alias": "bordered"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconWeight": { "alias": "iconWeight"; "required": false; }; "materialIcon": { "alias": "materialIcon"; "required": false; }; }, {}, never, ["[ecabsBadgeIcon]", "*"], false, never>;
41
+ }
@@ -0,0 +1,13 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./ecabs-badge.component";
3
+ import * as i2 from "../base/pipes/status-badge-variant.pipe";
4
+ import * as i3 from "@angular/common";
5
+ import * as i4 from "../base/directives/badge.directive.module";
6
+ import * as i5 from "@angular/material/icon";
7
+ import * as i6 from "@angular/material/tooltip";
8
+ import * as i7 from "../base/directives/tooltip-if-truncated.directive.module";
9
+ export declare class EcabsBadgeModule {
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<EcabsBadgeModule, never>;
11
+ static ɵmod: i0.ɵɵNgModuleDeclaration<EcabsBadgeModule, [typeof i1.EcabsBadgeComponent, typeof i2.EcabsStatusBadgeVariantPipe], [typeof i3.CommonModule, typeof i4.EcabsBadgeDirectiveModule, typeof i5.MatIconModule, typeof i6.MatTooltipModule, typeof i7.EcabsTooltipIfTruncatedDirectiveModule], [typeof i1.EcabsBadgeComponent, typeof i4.EcabsBadgeDirectiveModule, typeof i2.EcabsStatusBadgeVariantPipe, typeof i7.EcabsTooltipIfTruncatedDirectiveModule]>;
12
+ static ɵinj: i0.ɵɵInjectorDeclaration<EcabsBadgeModule>;
13
+ }
@@ -1,6 +1,6 @@
1
- import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
1
+ import { ChangeDetectorRef, DoCheck, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
2
  import { MatFormFieldControl } from '@angular/material/form-field';
3
- import { NgControl } from '@angular/forms';
3
+ import { FormGroupDirective, NgControl, NgForm } from '@angular/forms';
4
4
  import { CountryCode as CC, E164Number, NationalNumber, PhoneNumber } from 'libphonenumber-js';
5
5
  import { FocusMonitor } from '@angular/cdk/a11y';
6
6
  import { ErrorStateMatcher } from '@angular/material/core';
@@ -9,7 +9,7 @@ import { Subject } from 'rxjs';
9
9
  import { CountryCode } from '../base/consts/country-codes';
10
10
  import { Country, PhoneNumberFormat } from '../base/models/phone.models';
11
11
  import * as i0 from "@angular/core";
12
- export declare class EcabsBasePhoneComponent implements OnInit, OnDestroy, MatFormFieldControl<any> {
12
+ export declare class EcabsBasePhoneComponent implements OnInit, OnDestroy, DoCheck, MatFormFieldControl<any> {
13
13
  private changeDetectorRef;
14
14
  private countryCodeData;
15
15
  private fm;
@@ -21,7 +21,8 @@ export declare class EcabsBasePhoneComponent implements OnInit, OnDestroy, MatFo
21
21
  cssClass: string | undefined;
22
22
  name: string | undefined;
23
23
  onlyCountries: string[];
24
- errorStateMatcher: ErrorStateMatcher;
24
+ get errorStateMatcher(): ErrorStateMatcher;
25
+ set errorStateMatcher(value: ErrorStateMatcher);
25
26
  enableSearch: boolean;
26
27
  searchPlaceholder: string | undefined;
27
28
  describedBy: string;
@@ -60,8 +61,11 @@ export declare class EcabsBasePhoneComponent implements OnInit, OnDestroy, MatFo
60
61
  static getPhoneNumberPlaceHolder(countryISOCode: CC): string | undefined;
61
62
  onTouched: () => void;
62
63
  propagateChange: (_: unknown) => void;
63
- constructor(changeDetectorRef: ChangeDetectorRef, countryCodeData: CountryCode, fm: FocusMonitor, elRef: ElementRef<HTMLElement>, ngControl: NgControl);
64
- errorState: boolean;
64
+ private readonly _errorStateTracker;
65
+ constructor(changeDetectorRef: ChangeDetectorRef, countryCodeData: CountryCode, fm: FocusMonitor, elRef: ElementRef<HTMLElement>, defaultErrorStateMatcher: ErrorStateMatcher, ngControl: NgControl, parentForm: NgForm, parentFormGroup: FormGroupDirective);
66
+ get errorState(): boolean;
67
+ set errorState(value: boolean);
68
+ ngDoCheck(): void;
65
69
  controlType?: string;
66
70
  autofilled?: boolean;
67
71
  userAriaDescribedBy?: string;
@@ -85,6 +89,6 @@ export declare class EcabsBasePhoneComponent implements OnInit, OnDestroy, MatFo
85
89
  protected fetchCountryData(): void;
86
90
  private get formattedPhoneNumber();
87
91
  private formatAsYouTypeIfEnabled;
88
- static ɵfac: i0.ɵɵFactoryDeclaration<EcabsBasePhoneComponent, [null, null, null, null, { optional: true; self: true; }]>;
92
+ static ɵfac: i0.ɵɵFactoryDeclaration<EcabsBasePhoneComponent, [null, null, null, null, null, { optional: true; self: true; }, { optional: true; }, { optional: true; }]>;
89
93
  static ɵcmp: i0.ɵɵComponentDeclaration<EcabsBasePhoneComponent, "ecabs-base-phone", never, { "preferredCountries": { "alias": "preferredCountries"; "required": false; }; "enablePlaceholder": { "alias": "enablePlaceholder"; "required": false; }; "inputPlaceholder": { "alias": "inputPlaceholder"; "required": false; }; "cssClass": { "alias": "cssClass"; "required": false; }; "name": { "alias": "name"; "required": false; }; "onlyCountries": { "alias": "onlyCountries"; "required": false; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; "enableSearch": { "alias": "enableSearch"; "required": false; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; }; "describedBy": { "alias": "describedBy"; "required": false; }; "debounceTimeMs": { "alias": "debounceTimeMs"; "required": false; }; "format": { "alias": "format"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "countryChanged": "countryChanged"; }, never, never, false, never>;
90
94
  }
@@ -16,14 +16,15 @@ export declare class EcabsExpansionPanelComponent implements OnChanges {
16
16
  showCheckbox: boolean;
17
17
  showStatus: boolean;
18
18
  status: string;
19
- hideToggle: boolean;
19
+ collapsible: boolean;
20
20
  checked: EventEmitter<boolean>;
21
21
  opened: EventEmitter<void>;
22
22
  expansionPanel: MatExpansionPanel;
23
23
  toggle: boolean;
24
+ get statusLabel(): string;
24
25
  onOpened(): void;
25
26
  ngOnChanges(changes: SimpleChanges): void;
26
27
  toggleAction(event: Event): void;
27
28
  static ɵfac: i0.ɵɵFactoryDeclaration<EcabsExpansionPanelComponent, never>;
28
- static ɵcmp: i0.ɵɵComponentDeclaration<EcabsExpansionPanelComponent, "ecabs-expansion-panel", never, { "title": { "alias": "title"; "required": false; }; "description": { "alias": "description"; "required": false; }; "actionTitle": { "alias": "actionTitle"; "required": false; }; "index": { "alias": "index"; "required": false; }; "expanded": { "alias": "expanded"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "showErrorMessage": { "alias": "showErrorMessage"; "required": false; }; "closePanel": { "alias": "closePanel"; "required": false; }; "showIcon": { "alias": "showIcon"; "required": false; }; "iconName": { "alias": "iconName"; "required": false; }; "showCheckbox": { "alias": "showCheckbox"; "required": false; }; "showStatus": { "alias": "showStatus"; "required": false; }; "status": { "alias": "status"; "required": false; }; "hideToggle": { "alias": "hideToggle"; "required": false; }; }, { "checked": "checked"; "opened": "opened"; }, never, ["*"], false, never>;
29
+ static ɵcmp: i0.ɵɵComponentDeclaration<EcabsExpansionPanelComponent, "ecabs-expansion-panel", never, { "title": { "alias": "title"; "required": false; }; "description": { "alias": "description"; "required": false; }; "actionTitle": { "alias": "actionTitle"; "required": false; }; "index": { "alias": "index"; "required": false; }; "expanded": { "alias": "expanded"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "showErrorMessage": { "alias": "showErrorMessage"; "required": false; }; "closePanel": { "alias": "closePanel"; "required": false; }; "showIcon": { "alias": "showIcon"; "required": false; }; "iconName": { "alias": "iconName"; "required": false; }; "showCheckbox": { "alias": "showCheckbox"; "required": false; }; "showStatus": { "alias": "showStatus"; "required": false; }; "status": { "alias": "status"; "required": false; }; "collapsible": { "alias": "collapsible"; "required": false; }; }, { "checked": "checked"; "opened": "opened"; }, never, ["*"], false, never>;
29
30
  }
@@ -5,10 +5,10 @@ import * as i3 from "@angular/forms";
5
5
  import * as i4 from "@angular/material/button";
6
6
  import * as i5 from "@angular/material/expansion";
7
7
  import * as i6 from "@angular/material/icon";
8
- import * as i7 from "@angular/material/chips";
9
- import * as i8 from "../ecabs-checkbox-toggle/ecabs-checkbox-toggle.module";
8
+ import * as i7 from "../ecabs-checkbox-toggle/ecabs-checkbox-toggle.module";
9
+ import * as i8 from "../ecabs-badge/ecabs-badge.module";
10
10
  export declare class EcabsExpansionPanelModule {
11
11
  static ɵfac: i0.ɵɵFactoryDeclaration<EcabsExpansionPanelModule, never>;
12
- static ɵmod: i0.ɵɵNgModuleDeclaration<EcabsExpansionPanelModule, [typeof i1.EcabsExpansionPanelComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.MatButtonModule, typeof i5.MatExpansionModule, typeof i6.MatIconModule, typeof i7.MatChipsModule, typeof i8.EcabsCheckboxToggleModule], [typeof i1.EcabsExpansionPanelComponent]>;
12
+ static ɵmod: i0.ɵɵNgModuleDeclaration<EcabsExpansionPanelModule, [typeof i1.EcabsExpansionPanelComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.MatButtonModule, typeof i5.MatExpansionModule, typeof i6.MatIconModule, typeof i7.EcabsCheckboxToggleModule, typeof i8.EcabsBadgeModule], [typeof i1.EcabsExpansionPanelComponent]>;
13
13
  static ɵinj: i0.ɵɵInjectorDeclaration<EcabsExpansionPanelModule>;
14
14
  }
@@ -25,6 +25,7 @@ export declare class EcabsPhoneComponent extends EcabsElementBaseComponent imple
25
25
  set value(val: any);
26
26
  constructor(injector: Injector, ecabsComponentsService: EcabsComponentsService, destroyRef: DestroyRef);
27
27
  onInput(event: KeyboardEvent): void;
28
+ setDisabledState(isDisabled: boolean): void;
28
29
  ngOnInit(): void;
29
30
  ngAfterViewInit(): void;
30
31
  ngOnChanges(changes: SimpleChanges): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ecabs-components",
3
- "version": "2.0.0-alpha.7",
3
+ "version": "2.0.0-alpha.9",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^19.2.25",
6
6
  "@angular/common": "^19.2.25",
package/public-api.d.ts CHANGED
@@ -27,6 +27,7 @@ export * from './lib/base/models/header.models';
27
27
  export * from './lib/base/models/validation.models';
28
28
  export * from './lib/base/models/select.models';
29
29
  export * from './lib/base/models/waypoint.models';
30
+ export * from './lib/base/models/action-menu.models';
30
31
  export * from './lib/ecabs-checkbox-toggle/ecabs-checkbox-toggle.component';
31
32
  export * from './lib/ecabs-checkbox-toggle/ecabs-checkbox-toggle.module';
32
33
  export * from './lib/ecabs-checkbox-v2/ecabs-checkbox-v2.component';
@@ -63,6 +64,10 @@ export * from './lib/ecabs-table/ecabs-table.component';
63
64
  export * from './lib/ecabs-table/ecabs-table.module';
64
65
  export * from './lib/ecabs-note/ecabs-note.component';
65
66
  export * from './lib/ecabs-note/ecabs-note.module';
67
+ export * from './lib/ecabs-badge/ecabs-badge.component';
68
+ export * from './lib/ecabs-badge/ecabs-badge.module';
69
+ export * from './lib/ecabs-action-menu/ecabs-action-menu.component';
70
+ export * from './lib/ecabs-action-menu/ecabs-action-menu.module';
66
71
  export * from './lib/ecabs-hint/ecabs-hint.component';
67
72
  export * from './lib/ecabs-hint/ecabs-hint.module';
68
73
  export * from './lib/ecabs-dialog-confirm/ecabs-dialog-confirm.component';
@@ -105,6 +110,9 @@ export * from './lib/base/directives/digits-only.directive';
105
110
  export * from './lib/base/directives/digits-only.directive.module';
106
111
  export * from './lib/base/directives/show-on-truncated.directive';
107
112
  export * from './lib/base/directives/show-on-truncated.directive.module';
113
+ export * from './lib/base/directives/action-menu-trigger.directive';
114
+ export * from './lib/base/directives/badge.directive';
115
+ export * from './lib/base/directives/badge.directive.module';
108
116
  export * from './lib/ecabs-validation/ecabs-validation.module';
109
117
  export * from './lib/ecabs-validation/ecabs-validation.component';
110
118
  export * from './lib/ecabs-active-status-filter/ecabs-active-status-filter.component';
@@ -119,6 +127,7 @@ export * from './lib/ecabs-slider/ecabs-slider.module';
119
127
  export * from './lib/ecabs-base-phone-input/ecabs-base-phone.component';
120
128
  export * from './lib/ecabs-base-phone-input/ecabs-base-phone.module';
121
129
  export * from './lib/base/services/unsubscribe.service';
130
+ export * from './lib/base/pipes/status-badge-variant.pipe';
122
131
  export * from './lib/base/pipes/truncate.pipe';
123
132
  export * from './lib/base/pipes/separator-append.pipe';
124
133
  export * from './lib/base/pipes/phone-number-country-code.pipe';
@@ -138,7 +147,11 @@ export * from './lib/ecabs-multiple-dates-picker/ecabs-multiple-dates-picker.com
138
147
  export * from './lib/base/services/ecabs-date-picker-translations.service';
139
148
  export * from './lib/base/utils/object-utils';
140
149
  export * from './lib/base/utils/phone-number.utils';
150
+ export * from './lib/base/utils/icon.utils';
141
151
  export * from './lib/base/utils/select.utils';
152
+ export * from './lib/base/consts/badge.consts';
153
+ export * from './lib/base/consts/status-badge.consts';
154
+ export * from './lib/base/consts/icon.consts';
142
155
  export * from './lib/base/consts/buttons.consts';
143
156
  export * from './lib/base/adapters/date.adapter';
144
157
  export * from './lib/base/consts/waypoint.consts';
@@ -4,7 +4,7 @@
4
4
 
5
5
  // Plus imports for other components in your app.
6
6
  @use '../scss/utilities/index';
7
- @use 'overrides/index' as index2;
7
+ @use 'overrides/index' as overrides;
8
8
  @use "../scss/utilities/fonts";
9
9
 
10
10
 
@@ -73,7 +73,6 @@ $custom-typography: mat.m2-define-typography-config(
73
73
  $button: mat.m2-define-typography-level(
74
74
  fonts.$font-size-base,
75
75
  fonts.$base-line-height,
76
- fonts.$font-weight-semibold,
77
76
  $letter-spacing: normal,
78
77
  $font-family: fonts.$font-family-primary,
79
78
  ),
@@ -102,3 +101,4 @@ $cuorium-theme: mat.m2-define-light-theme((
102
101
  // Alternatively, you can import and @include the theme mixins for each component
103
102
  // that you are using.
104
103
  @include mat.all-component-themes($cuorium-theme);
104
+ @include mat.typography-hierarchy($cuorium-theme);
@@ -1,4 +1,4 @@
1
- @use "../../scss/modules/autocomplete";
1
+ @use "../../scss/modules/index";
2
2
  @use "../../scss/utilities/functions";
3
3
  @use "../../scss/utilities/variables";
4
4
 
@@ -0,0 +1,122 @@
1
+ @use "../../scss/modules/badge";
2
+
3
+ $badge-sizes: small, medium, large;
4
+ $badge-variants: default, success, warning, danger, info;
5
+
6
+ .mat-icon {
7
+ &.badge__icon,
8
+ .badge__icon--slot > & {
9
+ width: var(--badge-icon-size);
10
+ height: var(--badge-icon-size);
11
+ font-size: var(--badge-icon-size);
12
+ line-height: var(--badge-icon-size);
13
+
14
+ &:hover {
15
+ color: inherit;
16
+ }
17
+ }
18
+ }
19
+
20
+ .mdc-evolution-chip.mat-mdc-chip.badge {
21
+ @extend .badge;
22
+
23
+ --mdc-chip-container-height: auto;
24
+ --mdc-chip-with-avatar-avatar-size: var(--badge-icon-size);
25
+
26
+ min-width: 0;
27
+ width: auto;
28
+ justify-content: flex-start;
29
+
30
+ @each $size in $badge-sizes {
31
+ &.badge--#{$size} {
32
+ @extend .badge--#{$size};
33
+ }
34
+ }
35
+
36
+ @each $variant in $badge-variants {
37
+ &.badge--#{$variant} {
38
+ @extend .badge--#{$variant};
39
+ }
40
+ }
41
+
42
+ &.badge--interactive {
43
+ @extend .badge--interactive;
44
+ }
45
+
46
+ &:hover {
47
+ border-color: var(--badge-border-color, transparent);
48
+ }
49
+
50
+ .mdc-evolution-chip__cell--primary,
51
+ .mdc-evolution-chip__action--primary {
52
+ min-width: 0;
53
+ }
54
+
55
+ .mdc-evolution-chip__action--primary {
56
+ padding: 0;
57
+ gap: var(--badge-gap);
58
+ }
59
+
60
+ .mdc-evolution-chip__graphic {
61
+ flex: none;
62
+ padding: 0;
63
+ width: auto;
64
+
65
+ > * {
66
+ width: var(--badge-icon-size);
67
+ height: var(--badge-icon-size);
68
+ font-size: var(--badge-icon-size);
69
+ line-height: var(--badge-icon-size);
70
+ color: inherit;
71
+ }
72
+ }
73
+
74
+ // #Trailing icon
75
+ &.mdc-evolution-chip--with-trailing-action {
76
+ --badge-trailing-allowance: calc(var(--badge-icon-size) + var(--badge-gap));
77
+
78
+ max-width: calc(
79
+ var(--badge-max-width, 100% - var(--badge-trailing-allowance)) +
80
+ var(--badge-trailing-allowance)
81
+ );
82
+
83
+ .mdc-evolution-chip__graphic {
84
+ padding: 0;
85
+ }
86
+
87
+ .mdc-evolution-chip__icon--trailing {
88
+ width: var(--badge-icon-size);
89
+ height: var(--badge-icon-size);
90
+ padding: 0;
91
+
92
+ font-size: var(--badge-icon-size);
93
+ line-height: var(--badge-icon-size);
94
+ color: inherit;
95
+
96
+ transition: transform 150ms ease;
97
+ }
98
+ }
99
+
100
+ &[aria-expanded='true'] .mdc-evolution-chip__icon--trailing {
101
+ transform: rotate(180deg);
102
+ }
103
+
104
+ &,
105
+ .mdc-evolution-chip__action {
106
+ cursor: inherit;
107
+ }
108
+
109
+ &.badge--no-ripple:hover .mat-mdc-chip-focus-overlay {
110
+ opacity: 0;
111
+ }
112
+
113
+
114
+ .mdc-evolution-chip__text-label {
115
+ @extend .badge__label;
116
+
117
+ font-family: inherit;
118
+ font-size: inherit;
119
+ font-weight: inherit;
120
+ letter-spacing: inherit;
121
+ }
122
+ }
@@ -1,4 +1,4 @@
1
- @use "../../scss/modules/button";
1
+ @use "../../scss/modules/index";
2
2
  @use "../../scss/utilities/fonts";
3
3
 
4
4
  button,
@@ -1,4 +1,4 @@
1
- @use "../../scss/modules/card";
1
+ @use "../../scss/modules/index";
2
2
  @use "../../scss/utilities/functions";
3
3
 
4
4
  .mat-mdc-card {
@@ -1,5 +1,4 @@
1
- @use "../../scss/modules/statuses";
2
- @use "../../scss/modules/chip";
1
+ @use "../../scss/modules/index";
3
2
  @use "../../scss/utilities/helpers";
4
3
  @use "../../scss/utilities/fonts";
5
4
  @use "../../scss/utilities/functions";
@@ -1,5 +1,4 @@
1
1
  @use "../../scss/modules/datepicker";
2
- @use "../../scss/utilities/index";
3
2
  @use "../../scss/utilities/functions";
4
3
  @use "../../scss/utilities/mixins";
5
4
  @use "../../scss/utilities/variables";
@@ -1,4 +1,4 @@
1
- @use "../../scss/modules/dialog";
1
+ @use "../../scss/modules/index";
2
2
  @use "../../scss/utilities/functions";
3
3
 
4
4
  .mat-mdc-dialog-container {
@@ -1,4 +1,4 @@
1
- @use "../../scss/modules/divider";
1
+ @use "../../scss/modules/index";
2
2
  mat-divider {
3
3
  &.mat-divider {
4
4
  @extend .divider;
@@ -3,7 +3,18 @@
3
3
  @use "../../scss/utilities/mixins";
4
4
  @use "../../scss/utilities/variables";
5
5
 
6
- .example-headers-align .mat-expansion-panel-header-title {
6
+ ecabs-expansion-panel {
7
+ .mat-expansion-panel-header-description {
8
+ justify-content: flex-end;
9
+ align-items: center;
10
+ }
11
+
12
+ .mat-expansion-indicator::after {
13
+ border-color: var(--color-gray-500);
14
+ }
15
+ }
16
+
17
+ ecabs-expansion-panel .mat-expansion-panel-header-title {
7
18
  @include mixins.fontSize(fonts.$font-heading-xs);
8
19
 
9
20
  color: var(--color-brand-dark);
@@ -27,6 +38,37 @@
27
38
  .mat-expansion-panel-body {
28
39
  padding: functions.calc-rem(0 0 16 0);
29
40
  }
41
+
42
+ .ecabs-expansion-panel__heading {
43
+ box-sizing: border-box;
44
+ display: flex;
45
+ align-items: center;
46
+ height: var(--mat-expansion-header-expanded-state-height, #{functions.calc-rem(64)});
47
+ padding: functions.calc-rem(0 0 24 0);
48
+
49
+ // Matches the width the real header's content box gets once the toggle is accounted for.
50
+ .mat-content {
51
+ display: flex;
52
+ flex: 1;
53
+ flex-direction: row;
54
+ overflow: hidden;
55
+ margin-right: functions.calc-rem(8);
56
+ }
57
+
58
+ .mat-expansion-panel-header-title,
59
+ .mat-expansion-panel-header-description {
60
+ display: flex;
61
+ align-items: center;
62
+ flex-grow: 1;
63
+ flex-basis: 0;
64
+ margin-right: functions.calc-rem(16);
65
+ }
66
+
67
+ .mat-expansion-panel-header-description {
68
+ flex-grow: 2;
69
+ color: var(--mat-expansion-header-description-color);
70
+ }
71
+ }
30
72
  }
31
73
 
32
74
  .mat-expansion-panel:not([class*=mat-elevation-z]) {
@@ -1,6 +1,5 @@
1
- @use "../../scss/modules/form";
1
+ @use "../../scss/modules/index";
2
2
  @use "../../scss/utilities/helpers";
3
- @use "../../../styles/scss/utilities/index";
4
3
  @use "../../scss/utilities/fonts";
5
4
  @use "../../scss/utilities/mixins";
6
5