@byuhbll/components 4.3.2 → 4.4.1
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/snackbar/snackbar.component.mjs +151 -0
- package/esm2022/lib/snackbar/snackbar.service.mjs +90 -0
- package/esm2022/lib/status-button/status-button.component.mjs +13 -3
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/byuhbll-components.mjs +249 -5
- package/fesm2022/byuhbll-components.mjs.map +1 -1
- package/lib/snackbar/snackbar.component.d.ts +67 -0
- package/lib/snackbar/snackbar.service.d.ts +20 -0
- package/lib/status-button/status-button.component.d.ts +15 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
- package/styles/scss/_vars.scss +10 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { EventEmitter, SimpleChanges, OnInit, OnChanges, OnDestroy } from '@angular/core';
|
|
2
|
+
import { Status, StatusButtonInputs } from '../status-button/status-button.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export type SnackbarPurpose = 'default' | 'info' | 'success' | 'error' | 'warning';
|
|
5
|
+
export interface SnackbarInputs {
|
|
6
|
+
purpose?: SnackbarPurpose;
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
titleIcon?: string;
|
|
10
|
+
fieldPlaceholder?: string;
|
|
11
|
+
showTitle?: boolean;
|
|
12
|
+
showTitleIcon?: boolean;
|
|
13
|
+
titleIconFilled?: boolean;
|
|
14
|
+
showClose?: boolean;
|
|
15
|
+
showProgressBar?: boolean;
|
|
16
|
+
showField?: boolean;
|
|
17
|
+
showButton?: boolean;
|
|
18
|
+
progressMs?: number;
|
|
19
|
+
autoDismiss?: boolean;
|
|
20
|
+
y?: number;
|
|
21
|
+
right?: number;
|
|
22
|
+
zIndex?: number;
|
|
23
|
+
statusButtonInputs?: StatusButtonInputs;
|
|
24
|
+
}
|
|
25
|
+
export declare class SnackbarComponent implements OnInit, OnChanges, OnDestroy {
|
|
26
|
+
purpose: SnackbarPurpose;
|
|
27
|
+
title: string;
|
|
28
|
+
description: string;
|
|
29
|
+
fieldPlaceholder: string;
|
|
30
|
+
titleIcon: string;
|
|
31
|
+
showTitle: boolean;
|
|
32
|
+
showTitleIcon: boolean;
|
|
33
|
+
titleIconFilled: boolean;
|
|
34
|
+
showClose: boolean;
|
|
35
|
+
showProgressBar: boolean;
|
|
36
|
+
showField: boolean;
|
|
37
|
+
showButton: boolean;
|
|
38
|
+
autoDismiss: boolean;
|
|
39
|
+
visible: boolean;
|
|
40
|
+
progressMs: number;
|
|
41
|
+
y: number;
|
|
42
|
+
statusButtonInputs?: StatusButtonInputs;
|
|
43
|
+
closed: EventEmitter<void>;
|
|
44
|
+
visibleChange: EventEmitter<boolean>;
|
|
45
|
+
buttonClicked: EventEmitter<void>;
|
|
46
|
+
isOpen: boolean;
|
|
47
|
+
private dismissTimer?;
|
|
48
|
+
private readonly EXIT_MS;
|
|
49
|
+
ngOnInit(): void;
|
|
50
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
51
|
+
ngOnDestroy(): void;
|
|
52
|
+
close(emitButtonClicked?: boolean): void;
|
|
53
|
+
get status(): Status;
|
|
54
|
+
private startDismissTimer;
|
|
55
|
+
private clearDismissTimer;
|
|
56
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarComponent, never>;
|
|
57
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SnackbarComponent, "lib-snackbar", never, { "purpose": { "alias": "purpose"; "required": false; }; "title": { "alias": "title"; "required": false; }; "description": { "alias": "description"; "required": false; }; "fieldPlaceholder": { "alias": "fieldPlaceholder"; "required": false; }; "titleIcon": { "alias": "titleIcon"; "required": false; }; "showTitle": { "alias": "showTitle"; "required": false; }; "showTitleIcon": { "alias": "showTitleIcon"; "required": false; }; "titleIconFilled": { "alias": "titleIconFilled"; "required": false; }; "showClose": { "alias": "showClose"; "required": false; }; "showProgressBar": { "alias": "showProgressBar"; "required": false; }; "showField": { "alias": "showField"; "required": false; }; "showButton": { "alias": "showButton"; "required": false; }; "autoDismiss": { "alias": "autoDismiss"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "progressMs": { "alias": "progressMs"; "required": false; }; "y": { "alias": "y"; "required": false; }; "statusButtonInputs": { "alias": "statusButtonInputs"; "required": false; }; }, { "closed": "closed"; "visibleChange": "visibleChange"; "buttonClicked": "buttonClicked"; }, never, never, true, never>;
|
|
58
|
+
static ngAcceptInputType_showTitle: unknown;
|
|
59
|
+
static ngAcceptInputType_showTitleIcon: unknown;
|
|
60
|
+
static ngAcceptInputType_titleIconFilled: unknown;
|
|
61
|
+
static ngAcceptInputType_showClose: unknown;
|
|
62
|
+
static ngAcceptInputType_showProgressBar: unknown;
|
|
63
|
+
static ngAcceptInputType_showField: unknown;
|
|
64
|
+
static ngAcceptInputType_showButton: unknown;
|
|
65
|
+
static ngAcceptInputType_autoDismiss: unknown;
|
|
66
|
+
static ngAcceptInputType_visible: unknown;
|
|
67
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ApplicationRef, EnvironmentInjector } from '@angular/core';
|
|
2
|
+
import { SnackbarInputs } from './snackbar.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class SnackbarService {
|
|
5
|
+
private appRef;
|
|
6
|
+
private env;
|
|
7
|
+
constructor(appRef: ApplicationRef, env: EnvironmentInjector);
|
|
8
|
+
/**
|
|
9
|
+
* This open method is what consuming code will use to create a snackbar
|
|
10
|
+
* @param snackbarOptions interface
|
|
11
|
+
* @param anchor HTML Element, optional. The snackbar's entrance and exit animations will happen on this element's Y axis (px)
|
|
12
|
+
* @returns void.
|
|
13
|
+
*/
|
|
14
|
+
open(snackbarOptions?: SnackbarInputs, anchor?: HTMLElement): {
|
|
15
|
+
close: () => void;
|
|
16
|
+
buttonClicked: import("@angular/core").EventEmitter<void>;
|
|
17
|
+
};
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarService, never>;
|
|
19
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SnackbarService>;
|
|
20
|
+
}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
+
export type Status = 'success' | 'info' | 'warning' | 'error' | 'disabled';
|
|
3
|
+
export interface StatusButtonInputs {
|
|
4
|
+
label: string;
|
|
5
|
+
status?: Status;
|
|
6
|
+
leftIcon?: string;
|
|
7
|
+
rightIcon?: string;
|
|
8
|
+
hideLeftIcon?: boolean;
|
|
9
|
+
hideRightIcon?: boolean;
|
|
10
|
+
clearVariant?: boolean;
|
|
11
|
+
}
|
|
2
12
|
/**
|
|
3
13
|
* A button that indicates status with color and icon.
|
|
4
14
|
* Status can be one of: 'success', 'info', 'warning', 'error', or 'disabled'.
|
|
@@ -13,6 +23,7 @@ export declare class StatusButtonComponent {
|
|
|
13
23
|
private _rightIcon;
|
|
14
24
|
private _hideLeftIcon;
|
|
15
25
|
private _hideRightIcon;
|
|
26
|
+
private _clearVariant;
|
|
16
27
|
label: string;
|
|
17
28
|
set status(value: 'success' | 'info' | 'warning' | 'error' | 'disabled');
|
|
18
29
|
get status(): 'success' | 'info' | 'warning' | 'error' | 'disabled';
|
|
@@ -24,10 +35,13 @@ export declare class StatusButtonComponent {
|
|
|
24
35
|
get hideLeftIcon(): boolean;
|
|
25
36
|
set hideRightIcon(value: boolean);
|
|
26
37
|
get hideRightIcon(): boolean;
|
|
38
|
+
set clearVariant(value: boolean);
|
|
39
|
+
get clearVariant(): boolean;
|
|
27
40
|
/** helper for default left icons */
|
|
28
41
|
private getDefaultLeftIcon;
|
|
29
42
|
static ɵfac: i0.ɵɵFactoryDeclaration<StatusButtonComponent, never>;
|
|
30
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<StatusButtonComponent, "lib-status-button", never, { "label": { "alias": "label"; "required": true; }; "status": { "alias": "status"; "required": false; }; "leftIcon": { "alias": "leftIcon"; "required": false; }; "rightIcon": { "alias": "rightIcon"; "required": false; }; "hideLeftIcon": { "alias": "hideLeftIcon"; "required": false; }; "hideRightIcon": { "alias": "hideRightIcon"; "required": false; }; }, {}, never, never, true, never>;
|
|
43
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StatusButtonComponent, "lib-status-button", never, { "label": { "alias": "label"; "required": true; }; "status": { "alias": "status"; "required": false; }; "leftIcon": { "alias": "leftIcon"; "required": false; }; "rightIcon": { "alias": "rightIcon"; "required": false; }; "hideLeftIcon": { "alias": "hideLeftIcon"; "required": false; }; "hideRightIcon": { "alias": "hideRightIcon"; "required": false; }; "clearVariant": { "alias": "clearVariant"; "required": false; }; }, {}, never, never, true, never>;
|
|
31
44
|
static ngAcceptInputType_hideLeftIcon: unknown;
|
|
32
45
|
static ngAcceptInputType_hideRightIcon: unknown;
|
|
46
|
+
static ngAcceptInputType_clearVariant: unknown;
|
|
33
47
|
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export * from './lib/ss-search-bar/ss-search-bar.component';
|
|
|
8
8
|
export * from './lib/ss-search-bar/models/advanced-search.model';
|
|
9
9
|
export * from './lib/ss-search-bar/models/search-scope.model';
|
|
10
10
|
export * from './lib/ss-search-bar/models/search-config.model';
|
|
11
|
+
export * from './lib/snackbar/snackbar.service';
|
|
12
|
+
export * from './lib/snackbar/snackbar.component';
|
|
11
13
|
export { getUserStatusFromRoles } from './lib/contact-utils';
|
|
12
14
|
export { ADVANCED_SEARCH_QUALIFIER_MAP, ADVANCED_SEARCH_FIELD_MAP, ADVANCED_SEARCH_OPTIONS, } from './lib/ss-search-bar/constants';
|
|
13
15
|
export * from './lib/status-button/status-button.component';
|
package/styles/scss/_vars.scss
CHANGED
|
@@ -13,30 +13,40 @@ $color-gray-300: #8f8f8f;
|
|
|
13
13
|
$color-gray-200: #d0d0d0;
|
|
14
14
|
$color-gray-100: #e7e7e7;
|
|
15
15
|
$color-gray-50: #f9f9f9;
|
|
16
|
+
$gray-text-default: #333333;
|
|
17
|
+
$gray-accent-default: #555555;
|
|
16
18
|
// Greens
|
|
17
19
|
$color-green-500: #1d562e;
|
|
18
20
|
$color-green-400: #359351;
|
|
19
21
|
$color-green-300: #3ba35a;
|
|
20
22
|
$color-green-200: #9dd1ac;
|
|
21
23
|
$color-green-100: #ebf6ee;
|
|
24
|
+
$green-text-success: #20522e;
|
|
25
|
+
$green-accent-success: #2e7d3f;
|
|
22
26
|
// Teals
|
|
23
27
|
$color-teal-500: #26485f;
|
|
24
28
|
$color-teal-400: #3e7295;
|
|
25
29
|
$color-teal-300: #457fa6;
|
|
26
30
|
$color-teal-200: #a2bfd3;
|
|
27
31
|
$color-teal-100: #ecf2f6;
|
|
32
|
+
$teal-text-info: #24495c;
|
|
33
|
+
$teal-accent-info: #306a88;
|
|
28
34
|
// Reds
|
|
29
35
|
$color-red-500: #702121;
|
|
30
36
|
$color-red-400: #b33837;
|
|
31
37
|
$color-red-300: #c73e3d;
|
|
32
38
|
$color-red-200: #e39e9e;
|
|
33
39
|
$color-red-100: #f9ecec;
|
|
40
|
+
$red-text-error: #611a1a;
|
|
41
|
+
$red-accent-error: #912525;
|
|
34
42
|
// Yellows
|
|
35
43
|
$color-yellow-500: #635f04;
|
|
36
44
|
$color-yellow-400: #928c30;
|
|
37
45
|
$color-yellow-300: #d1c844;
|
|
38
46
|
$color-yellow-200: #e8e3a1;
|
|
39
47
|
$color-yellow-100: #faf9ec;
|
|
48
|
+
$yellow-text-warning: #514a18;
|
|
49
|
+
$yellow-accent-warning: #7a6f13;
|
|
40
50
|
// Purple
|
|
41
51
|
$color-purple: #b967c7;
|
|
42
52
|
|