ecabs-components 1.1.90 → 1.1.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/esm2022/lib/base/consts/badge.consts.mjs +2 -0
- package/esm2022/lib/base/consts/icon.consts.mjs +2 -0
- package/esm2022/lib/base/consts/status-badge.consts.mjs +53 -0
- package/esm2022/lib/base/directives/action-menu-trigger.directive.mjs +17 -0
- package/esm2022/lib/base/directives/badge.directive.mjs +106 -0
- package/esm2022/lib/base/directives/badge.directive.module.mjs +18 -0
- package/esm2022/lib/base/directives/tooltip-if-truncated.directive.module.mjs +6 -5
- package/esm2022/lib/base/models/action-menu.models.mjs +2 -0
- package/esm2022/lib/base/models/select.models.mjs +1 -1
- package/esm2022/lib/base/pipes/status-badge-variant.pipe.mjs +17 -0
- package/esm2022/lib/base/utils/icon.utils.mjs +4 -0
- package/esm2022/lib/base/utils/select.utils.mjs +3 -4
- package/esm2022/lib/ecabs-action-menu/ecabs-action-menu.component.mjs +79 -0
- package/esm2022/lib/ecabs-action-menu/ecabs-action-menu.module.mjs +37 -0
- package/esm2022/lib/ecabs-badge/ecabs-badge.component.mjs +74 -0
- package/esm2022/lib/ecabs-badge/ecabs-badge.module.mjs +46 -0
- package/esm2022/lib/ecabs-button-toggle/ecabs-button-toggle.component.mjs +2 -2
- package/esm2022/lib/ecabs-checkbox-toggle/ecabs-checkbox-toggle.component.mjs +2 -2
- package/esm2022/lib/ecabs-checkbox-v2/ecabs-checkbox-v2.component.mjs +2 -2
- package/esm2022/lib/ecabs-date-range-picker/ecabs-date-range-picker.component.mjs +2 -2
- package/esm2022/lib/ecabs-dialog-message/ecabs-dialog-message.component.mjs +2 -2
- package/esm2022/lib/ecabs-increment/ecabs-increment.component.mjs +2 -2
- package/esm2022/lib/ecabs-language-selector/ecabs-language-selector.component.mjs +2 -2
- package/esm2022/lib/ecabs-multiple-dates-picker/ecabs-multiple-dates-picker.component.mjs +2 -2
- package/esm2022/lib/ecabs-note/ecabs-note.component.mjs +2 -2
- package/esm2022/lib/ecabs-picker-header/ecabs-picker-header.component.mjs +2 -2
- package/esm2022/lib/ecabs-table/ecabs-table-filter-wrapper/ecabs-table-filter-wrapper.component.mjs +2 -2
- package/esm2022/public-api.mjs +14 -1
- package/fesm2022/ecabs-components.mjs +476 -78
- package/fesm2022/ecabs-components.mjs.map +1 -1
- package/lib/base/consts/badge.consts.d.ts +5 -0
- package/lib/base/consts/icon.consts.d.ts +1 -0
- package/lib/base/consts/status-badge.consts.d.ts +3 -0
- package/lib/base/directives/action-menu-trigger.directive.d.ts +8 -0
- package/lib/base/directives/badge.directive.d.ts +26 -0
- package/lib/base/directives/badge.directive.module.d.ts +8 -0
- package/lib/base/directives/tooltip-if-truncated.directive.module.d.ts +2 -1
- package/lib/base/models/action-menu.models.d.ts +13 -0
- package/lib/base/models/select.models.d.ts +1 -1
- package/lib/base/pipes/status-badge-variant.pipe.d.ts +8 -0
- package/lib/base/utils/icon.utils.d.ts +2 -0
- package/lib/ecabs-action-menu/ecabs-action-menu.component.d.ts +26 -0
- package/lib/ecabs-action-menu/ecabs-action-menu.module.d.ts +13 -0
- package/lib/ecabs-badge/ecabs-badge.component.d.ts +41 -0
- package/lib/ecabs-badge/ecabs-badge.module.d.ts +13 -0
- package/package.json +1 -1
- package/public-api.d.ts +13 -0
- package/src/assets/styles/material/overrides/_badge.scss +120 -0
- package/src/assets/styles/material/overrides/_menu.scss +50 -2
- package/src/assets/styles/material/overrides/index.scss +1 -0
- package/src/assets/styles/scss/modules/_badge.scss +128 -0
- package/src/assets/styles/scss/modules/_button.scss +1 -0
- package/src/assets/styles/scss/modules/_menu.scss +48 -0
- package/src/assets/styles/scss/modules/index.scss +2 -0
- package/src/assets/styles/scss/utilities/_colors.scss +6 -0
- package/src/assets/styles/scss/utilities/_mixins.scss +7 -0
- 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,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[];
|
|
@@ -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,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
|
+
}
|
package/package.json
CHANGED
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';
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
$badge-sizes: small, medium, large;
|
|
2
|
+
$badge-variants: default, success, warning, danger, info;
|
|
3
|
+
|
|
4
|
+
.mat-icon {
|
|
5
|
+
&.badge__icon,
|
|
6
|
+
.badge__icon--slot > & {
|
|
7
|
+
width: var(--badge-icon-size);
|
|
8
|
+
height: var(--badge-icon-size);
|
|
9
|
+
font-size: var(--badge-icon-size);
|
|
10
|
+
line-height: var(--badge-icon-size);
|
|
11
|
+
|
|
12
|
+
&:hover {
|
|
13
|
+
color: inherit;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.mdc-evolution-chip.mat-mdc-chip.badge {
|
|
19
|
+
@extend .badge;
|
|
20
|
+
|
|
21
|
+
--mdc-chip-container-height: auto;
|
|
22
|
+
--mdc-chip-with-avatar-avatar-size: var(--badge-icon-size);
|
|
23
|
+
|
|
24
|
+
min-width: 0;
|
|
25
|
+
width: auto;
|
|
26
|
+
justify-content: flex-start;
|
|
27
|
+
|
|
28
|
+
@each $size in $badge-sizes {
|
|
29
|
+
&.badge--#{$size} {
|
|
30
|
+
@extend .badge--#{$size};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@each $variant in $badge-variants {
|
|
35
|
+
&.badge--#{$variant} {
|
|
36
|
+
@extend .badge--#{$variant};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&.badge--interactive {
|
|
41
|
+
@extend .badge--interactive;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:hover {
|
|
45
|
+
border-color: var(--badge-border-color, transparent);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.mdc-evolution-chip__cell--primary,
|
|
49
|
+
.mdc-evolution-chip__action--primary {
|
|
50
|
+
min-width: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.mdc-evolution-chip__action--primary {
|
|
54
|
+
padding: 0;
|
|
55
|
+
gap: var(--badge-gap);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.mdc-evolution-chip__graphic {
|
|
59
|
+
flex: none;
|
|
60
|
+
padding: 0;
|
|
61
|
+
width: auto;
|
|
62
|
+
|
|
63
|
+
> * {
|
|
64
|
+
width: var(--badge-icon-size);
|
|
65
|
+
height: var(--badge-icon-size);
|
|
66
|
+
font-size: var(--badge-icon-size);
|
|
67
|
+
line-height: var(--badge-icon-size);
|
|
68
|
+
color: inherit;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// #Trailing icon
|
|
73
|
+
&.mdc-evolution-chip--with-trailing-action {
|
|
74
|
+
--badge-trailing-allowance: calc(var(--badge-icon-size) + var(--badge-gap));
|
|
75
|
+
|
|
76
|
+
max-width: calc(
|
|
77
|
+
var(--badge-max-width, 100% - var(--badge-trailing-allowance)) +
|
|
78
|
+
var(--badge-trailing-allowance)
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
.mdc-evolution-chip__graphic {
|
|
82
|
+
padding: 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.mdc-evolution-chip__icon--trailing {
|
|
86
|
+
width: var(--badge-icon-size);
|
|
87
|
+
height: var(--badge-icon-size);
|
|
88
|
+
padding: 0;
|
|
89
|
+
|
|
90
|
+
font-size: var(--badge-icon-size);
|
|
91
|
+
line-height: var(--badge-icon-size);
|
|
92
|
+
color: inherit;
|
|
93
|
+
|
|
94
|
+
transition: transform 150ms ease;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&[aria-expanded='true'] .mdc-evolution-chip__icon--trailing {
|
|
99
|
+
transform: rotate(180deg);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&,
|
|
103
|
+
.mdc-evolution-chip__action {
|
|
104
|
+
cursor: inherit;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&.badge--no-ripple:hover .mat-mdc-chip-focus-overlay {
|
|
108
|
+
opacity: 0;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
.mdc-evolution-chip__text-label {
|
|
113
|
+
@extend .badge__label;
|
|
114
|
+
|
|
115
|
+
font-family: inherit;
|
|
116
|
+
font-size: inherit;
|
|
117
|
+
font-weight: inherit;
|
|
118
|
+
letter-spacing: inherit;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -3,8 +3,56 @@
|
|
|
3
3
|
box-shadow: $box-shadow-default;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
&.
|
|
7
|
-
min-width: 180px;
|
|
6
|
+
&.action-menu-panel {
|
|
7
|
+
min-width: var(--action-menu-min-width, 180px);
|
|
8
|
+
|
|
9
|
+
&.action-menu-panel--compact {
|
|
10
|
+
--action-menu-min-width: #{calc-rem(120px)};
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* Material's menu styles are injected at runtime, so they land after this
|
|
16
|
+
stylesheet and win every tie. The selectors below are deliberately one class
|
|
17
|
+
heavier than the Material rules they counter. */
|
|
18
|
+
.mat-mdc-icon-button {
|
|
19
|
+
.mat-icon.action-menu__trigger-icon {
|
|
20
|
+
width: var(--action-menu-trigger-icon-size);
|
|
21
|
+
height: var(--action-menu-trigger-icon-size);
|
|
22
|
+
font-size: var(--action-menu-trigger-icon-size);
|
|
23
|
+
line-height: var(--action-menu-trigger-icon-size);
|
|
24
|
+
color: var(--action-menu-trigger-icon-color);
|
|
25
|
+
|
|
26
|
+
&:hover {
|
|
27
|
+
color: var(--action-menu-trigger-icon-color-hover);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:hover .mat-icon.action-menu__trigger-icon {
|
|
32
|
+
color: var(--action-menu-trigger-icon-color-hover);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.mat-mdc-menu-item {
|
|
37
|
+
&.action-menu-item {
|
|
38
|
+
color: var(--action-menu-item-color);
|
|
39
|
+
|
|
40
|
+
.mat-icon.action-menu-item__icon {
|
|
41
|
+
margin-right: var(--action-menu-item-icon-gap);
|
|
42
|
+
width: var(--action-menu-item-icon-size);
|
|
43
|
+
height: var(--action-menu-item-icon-size);
|
|
44
|
+
font-size: var(--action-menu-item-icon-size);
|
|
45
|
+
line-height: var(--action-menu-item-icon-size);
|
|
46
|
+
color: inherit;
|
|
47
|
+
|
|
48
|
+
&:hover {
|
|
49
|
+
color: inherit;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&.action-menu-item--destructive:not([disabled]):hover {
|
|
54
|
+
background-color: var(--color-error-opacity);
|
|
55
|
+
}
|
|
8
56
|
}
|
|
9
57
|
}
|
|
10
58
|
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
.badge {
|
|
2
|
+
--badge-gap: 0.25rem;
|
|
3
|
+
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: var(--badge-gap);
|
|
7
|
+
|
|
8
|
+
max-width: var(--badge-max-width, 100%);
|
|
9
|
+
border: 1px solid var(--badge-border-color, transparent);
|
|
10
|
+
border-radius: $border-radius-base;
|
|
11
|
+
font-weight: $font-weight-medium;
|
|
12
|
+
line-height: 1;
|
|
13
|
+
white-space: nowrap;
|
|
14
|
+
|
|
15
|
+
@include e(icon) {
|
|
16
|
+
color: inherit;
|
|
17
|
+
flex: none;
|
|
18
|
+
|
|
19
|
+
width: var(--badge-icon-size);
|
|
20
|
+
height: var(--badge-icon-size);
|
|
21
|
+
font-size: var(--badge-icon-size);
|
|
22
|
+
line-height: var(--badge-icon-size);
|
|
23
|
+
|
|
24
|
+
@include m(slot) {
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
|
|
29
|
+
&:empty {
|
|
30
|
+
display: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
> * {
|
|
34
|
+
width: var(--badge-icon-size);
|
|
35
|
+
height: var(--badge-icon-size);
|
|
36
|
+
font-size: var(--badge-icon-size);
|
|
37
|
+
line-height: var(--badge-icon-size);
|
|
38
|
+
color: inherit;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@include e(label) {
|
|
44
|
+
display: block;
|
|
45
|
+
min-width: 0;
|
|
46
|
+
overflow: hidden;
|
|
47
|
+
text-overflow: ellipsis;
|
|
48
|
+
|
|
49
|
+
line-height: calc(4 / 3);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* #Sizes */
|
|
53
|
+
@include m(small) {
|
|
54
|
+
@include badge-size(1px, 6px, $font-size-xs, 12px);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@include m(medium) {
|
|
58
|
+
@include badge-size(3px, 8px, $font-size-xs, 12px);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@include m(large) {
|
|
62
|
+
@include badge-size(6px, 12px, $font-size-md, 16px);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* #Variants */
|
|
66
|
+
@include m(default) {
|
|
67
|
+
background-color: var(--color-gray-100);
|
|
68
|
+
color: var(--color-gray-600);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@include m(success) {
|
|
72
|
+
background-color: var(--color-success--opacity);
|
|
73
|
+
color: var(--color-success);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@include m(warning) {
|
|
77
|
+
background-color: var(--color-warning-opacity);
|
|
78
|
+
color: var(--color-warning);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@include m(danger) {
|
|
82
|
+
background-color: var(--color-error-opacity);
|
|
83
|
+
color: var(--color-error);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@include m(info) {
|
|
87
|
+
background-color: rgba(var(--color-info-rgb), 0.06);
|
|
88
|
+
color: var(--color-info);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@include m(bordered) {
|
|
92
|
+
&.badge--default {
|
|
93
|
+
--badge-border-color: var(--color-default-border);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&.badge--success {
|
|
97
|
+
--badge-border-color: var(--color-success-border);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&.badge--warning {
|
|
101
|
+
--badge-border-color: var(--color-warning-border);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&.badge--danger {
|
|
105
|
+
--badge-border-color: var(--color-error-border);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&.badge--info {
|
|
109
|
+
--badge-border-color: var(--color-info-border);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* #Interactive */
|
|
114
|
+
// A badge that can be clicked: a status label that opens a menu
|
|
115
|
+
@include m(interactive) {
|
|
116
|
+
cursor: pointer;
|
|
117
|
+
|
|
118
|
+
// Inset, so the ring is drawn inside the badge's own border box. An outset
|
|
119
|
+
// ring needs 4px of clear space on every side and gets shaved by any
|
|
120
|
+
// ancestor that clips, which in a table cell is routine: the badge sits
|
|
121
|
+
// flush against the cell's padding edge. Negative offset makes it immune to
|
|
122
|
+
// that everywhere instead of per container.
|
|
123
|
+
&:focus-visible {
|
|
124
|
+
outline: 2px solid var(--color-info);
|
|
125
|
+
outline-offset: -2px;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
.action-menu {
|
|
2
|
+
@include e(trigger) {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@include e(trigger-icon) {
|
|
9
|
+
--action-menu-trigger-icon-size: #{calc-rem(16px)};
|
|
10
|
+
--action-menu-trigger-icon-color: var(--color-gray-400);
|
|
11
|
+
--action-menu-trigger-icon-color-hover: var(--color-brand-dark);
|
|
12
|
+
|
|
13
|
+
width: var(--action-menu-trigger-icon-size);
|
|
14
|
+
height: var(--action-menu-trigger-icon-size);
|
|
15
|
+
font-size: var(--action-menu-trigger-icon-size);
|
|
16
|
+
line-height: var(--action-menu-trigger-icon-size);
|
|
17
|
+
color: var(--action-menu-trigger-icon-color);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.action-menu-item {
|
|
22
|
+
--action-menu-item-color: var(--color-gray-700);
|
|
23
|
+
--action-menu-item-icon-size: #{calc-rem(16px)};
|
|
24
|
+
--action-menu-item-icon-gap: #{calc-rem(8px)};
|
|
25
|
+
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
color: var(--action-menu-item-color);
|
|
29
|
+
|
|
30
|
+
@include m(destructive) {
|
|
31
|
+
--action-menu-item-color: var(--color-error);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@include e(icon) {
|
|
35
|
+
flex: none;
|
|
36
|
+
|
|
37
|
+
margin-right: var(--action-menu-item-icon-gap);
|
|
38
|
+
width: var(--action-menu-item-icon-size);
|
|
39
|
+
height: var(--action-menu-item-icon-size);
|
|
40
|
+
font-size: var(--action-menu-item-icon-size);
|
|
41
|
+
line-height: var(--action-menu-item-icon-size);
|
|
42
|
+
color: inherit;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@include e(label) {
|
|
46
|
+
@include fontSize($font-size-md);
|
|
47
|
+
}
|
|
48
|
+
}
|