@byuhbll/components 4.3.1 → 4.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.
@@ -0,0 +1,44 @@
1
+ import { EventEmitter, SimpleChanges, OnInit, OnChanges, OnDestroy } from '@angular/core';
2
+ import { Status } from '../status-button/status-button.component';
3
+ import * as i0 from "@angular/core";
4
+ export type SnackbarPurpose = 'default' | 'info' | 'success' | 'error' | 'warning';
5
+ export declare class SnackbarComponent implements OnInit, OnChanges, OnDestroy {
6
+ purpose: SnackbarPurpose;
7
+ title: string;
8
+ description: string;
9
+ fieldPlaceholder: string;
10
+ titleIcon: string;
11
+ buttonLabel: string;
12
+ showTitle: boolean;
13
+ showTitleIcon: boolean;
14
+ showClose: boolean;
15
+ showProgressBar: boolean;
16
+ showField: boolean;
17
+ showButton: boolean;
18
+ autoDismiss: boolean;
19
+ visible: boolean;
20
+ progressMs: number;
21
+ y: number;
22
+ closed: EventEmitter<void>;
23
+ visibleChange: EventEmitter<boolean>;
24
+ isOpen: boolean;
25
+ private dismissTimer?;
26
+ private readonly EXIT_MS;
27
+ ngOnInit(): void;
28
+ ngOnChanges(changes: SimpleChanges): void;
29
+ ngOnDestroy(): void;
30
+ close(): void;
31
+ get status(): Status;
32
+ private startDismissTimer;
33
+ private clearDismissTimer;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarComponent, never>;
35
+ 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; }; "buttonLabel": { "alias": "buttonLabel"; "required": false; }; "showTitle": { "alias": "showTitle"; "required": false; }; "showTitleIcon": { "alias": "showTitleIcon"; "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; }; }, { "closed": "closed"; "visibleChange": "visibleChange"; }, never, never, true, never>;
36
+ static ngAcceptInputType_showTitle: unknown;
37
+ static ngAcceptInputType_showTitleIcon: unknown;
38
+ static ngAcceptInputType_showClose: unknown;
39
+ static ngAcceptInputType_showProgressBar: unknown;
40
+ static ngAcceptInputType_showField: unknown;
41
+ static ngAcceptInputType_showButton: unknown;
42
+ static ngAcceptInputType_autoDismiss: unknown;
43
+ static ngAcceptInputType_visible: unknown;
44
+ }
@@ -0,0 +1,37 @@
1
+ import { ApplicationRef, EnvironmentInjector } from '@angular/core';
2
+ import { SnackbarPurpose } from './snackbar.component';
3
+ import * as i0 from "@angular/core";
4
+ export interface SnackbarOptions {
5
+ purpose?: SnackbarPurpose;
6
+ title?: string;
7
+ description?: string;
8
+ titleIcon?: string;
9
+ fieldPlaceholder?: string;
10
+ showTitle?: boolean;
11
+ showTitleIcon?: boolean;
12
+ showClose?: boolean;
13
+ showProgressBar?: boolean;
14
+ showField?: boolean;
15
+ showButton?: boolean;
16
+ progressMs?: number;
17
+ autoDismiss?: boolean;
18
+ y?: number;
19
+ right?: number;
20
+ zIndex?: number;
21
+ }
22
+ export declare class SnackbarService {
23
+ private appRef;
24
+ private env;
25
+ constructor(appRef: ApplicationRef, env: EnvironmentInjector);
26
+ /**
27
+ * This open method is what consuming code will use to create a snackbar
28
+ * @param snackbarOptions interface found above
29
+ * @param anchor HTML Element, optional. The snackbar's entrance and exit animations will happen on this element's Y axis (px)
30
+ * @returns void.
31
+ */
32
+ open(snackbarOptions?: SnackbarOptions, anchor?: HTMLElement): {
33
+ close: () => void;
34
+ };
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarService, never>;
36
+ static ɵprov: i0.ɵɵInjectableDeclaration<SnackbarService>;
37
+ }
@@ -0,0 +1,38 @@
1
+ import * as i0 from "@angular/core";
2
+ export type Status = 'success' | 'info' | 'warning' | 'error' | 'disabled';
3
+ /**
4
+ * A button that indicates status with color and icon.
5
+ * Status can be one of: 'success', 'info', 'warning', 'error', or 'disabled'.
6
+ * Each status has a default left icon, but a custom left icon can be provided.
7
+ * A right icon can also be provided, defaulting to 'chevron_right'.
8
+ * The left and right icons can be hidden with the `hideLeftIcon` and `hideRightIcon` boolean inputs.
9
+ * A label input is required.
10
+ */
11
+ export declare class StatusButtonComponent {
12
+ private _status;
13
+ private _leftIcon;
14
+ private _rightIcon;
15
+ private _hideLeftIcon;
16
+ private _hideRightIcon;
17
+ private _clearVariant;
18
+ label: string;
19
+ set status(value: 'success' | 'info' | 'warning' | 'error' | 'disabled');
20
+ get status(): 'success' | 'info' | 'warning' | 'error' | 'disabled';
21
+ set leftIcon(value: string);
22
+ get leftIcon(): string;
23
+ set rightIcon(value: string);
24
+ get rightIcon(): string;
25
+ set hideLeftIcon(value: boolean);
26
+ get hideLeftIcon(): boolean;
27
+ set hideRightIcon(value: boolean);
28
+ get hideRightIcon(): boolean;
29
+ set clearVariant(value: boolean);
30
+ get clearVariant(): boolean;
31
+ /** helper for default left icons */
32
+ private getDefaultLeftIcon;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<StatusButtonComponent, never>;
34
+ 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>;
35
+ static ngAcceptInputType_hideLeftIcon: unknown;
36
+ static ngAcceptInputType_hideRightIcon: unknown;
37
+ static ngAcceptInputType_clearVariant: unknown;
38
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byuhbll/components",
3
- "version": "4.3.1",
3
+ "version": "4.4.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.0.0",
6
6
  "@angular/core": "^18.0.0"
package/public-api.d.ts CHANGED
@@ -8,5 +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';
15
+ export * from './lib/status-button/status-button.component';
@@ -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