@vsn-ux/ngx-gaia 0.6.0 → 0.6.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.
@@ -0,0 +1,12 @@
1
+ export * from './modal-ref';
2
+ export * from './modal.service';
3
+ export * from './modal.component';
4
+ export * from './modal-description.component';
5
+ export * from './modal-content.component';
6
+ export * from './modal-actions.component';
7
+ export * from './modal-header.component';
8
+ export * from './modal.module';
9
+ export * from './modal.directives';
10
+ export * from './modal-data.token';
11
+ export * from './modal.options';
12
+ export * from './modal-i18n.service';
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class GaModalActionsComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<GaModalActionsComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<GaModalActionsComponent, "ga-modal-actions", never, {}, {}, never, ["*"], true, never>;
5
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class GaModalContentComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<GaModalContentComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<GaModalContentComponent, "ga-modal-content", never, {}, {}, never, ["*"], true, never>;
5
+ }
@@ -0,0 +1,2 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ export declare const GA_MODAL_DATA: InjectionToken<any>;
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./modal.directives";
3
+ export declare class GaModalDescriptionComponent {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<GaModalDescriptionComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<GaModalDescriptionComponent, "ga-modal-description", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.GaModalDescriptionDirective; inputs: {}; outputs: {}; }]>;
6
+ }
@@ -0,0 +1,16 @@
1
+ import { GaModalRef } from './modal-ref';
2
+ import { GaModalI18n } from './modal-i18n.service';
3
+ import * as i0 from "@angular/core";
4
+ export declare class GaModalHeaderComponent {
5
+ protected readonly icons: {
6
+ X: import("lucide-angular").LucideIconData;
7
+ Info: import("lucide-angular").LucideIconData;
8
+ CircleCheck: import("lucide-angular").LucideIconData;
9
+ TriangleAlert: import("lucide-angular").LucideIconData;
10
+ OctagonAlert: import("lucide-angular").LucideIconData;
11
+ };
12
+ protected readonly modalRef: GaModalRef<any>;
13
+ protected readonly i18n: GaModalI18n;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<GaModalHeaderComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<GaModalHeaderComponent, "ga-modal-header", never, {}, {}, never, ["[gaModalTitle]", "ga-modal-description"], true, never>;
16
+ }
@@ -0,0 +1,14 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare function GA_MODAL_I18N_FACTORY(): GaModalI18nDefault;
3
+ export declare abstract class GaModalI18n {
4
+ abstract dismissLabel: string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<GaModalI18n, never>;
6
+ static ɵprov: i0.ɵɵInjectableDeclaration<GaModalI18n>;
7
+ }
8
+ export declare class GaModalI18nDefault extends GaModalI18n {
9
+ /** A label for the dismiss button */
10
+ dismissLabel: string;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<GaModalI18nDefault, never>;
12
+ static ɵprov: i0.ɵɵInjectableDeclaration<GaModalI18nDefault>;
13
+ }
14
+ export declare function provideGaModalI18n(value: GaModalI18n | (() => GaModalI18n)): import("@angular/core").EnvironmentProviders;
@@ -0,0 +1,4 @@
1
+ import { GaModalComponent } from './modal.component';
2
+ export declare class GaModalRef<C extends GaModalComponent<any, any>> {
3
+ instance: C;
4
+ }
@@ -0,0 +1,44 @@
1
+ import { Observable } from 'rxjs';
2
+ import { GaModalOptions } from './modal.options';
3
+ import * as i0 from "@angular/core";
4
+ export declare abstract class GaModalComponent<I = void, O = void> {
5
+ private readonly closeSubject;
6
+ private readonly overlayRef;
7
+ private readonly destroyRef;
8
+ private readonly router;
9
+ private readonly globalOptions;
10
+ protected readonly options: GaModalOptions & {
11
+ labelledBy?: string;
12
+ describedBy?: string;
13
+ };
14
+ protected readonly data: I;
15
+ protected readonly labelledBy: import("@angular/core").WritableSignal<string | null>;
16
+ protected readonly describedBy: import("@angular/core").WritableSignal<string | null>;
17
+ constructor();
18
+ close(result?: O): void;
19
+ afterClosed({ closeOnUnsubscribe }?: {
20
+ closeOnUnsubscribe: boolean;
21
+ }): Observable<O | undefined>;
22
+ /**
23
+ * "Soft close" hook which is called whenever the modal is being closed
24
+ * by "Escape" key or Backdrop click.
25
+ * Return true to permit closing. False - to refuse.
26
+ */
27
+ protected onSoftClose(): boolean | Observable<boolean>;
28
+ private softClose;
29
+ protected createOptions(options?: GaModalOptions & {
30
+ labelledBy?: string;
31
+ describedBy?: string;
32
+ }): {
33
+ size: import("@vsn-ux/ngx-gaia").GaModalSize;
34
+ type: import("@vsn-ux/ngx-gaia").GaModalType;
35
+ role: import("@vsn-ux/ngx-gaia").GaModalRole;
36
+ closeOnEscape: boolean;
37
+ closeOnOutsideClick: boolean;
38
+ closeOnNavigation: boolean;
39
+ labelledBy?: string;
40
+ describedBy?: string;
41
+ };
42
+ static ɵfac: i0.ɵɵFactoryDeclaration<GaModalComponent<any, any>, never>;
43
+ static ɵcmp: i0.ɵɵComponentDeclaration<GaModalComponent<any, any>, "ng-component", never, {}, {}, never, never, true, never>;
44
+ }
@@ -0,0 +1,29 @@
1
+ import { AfterViewInit, ElementRef, Renderer2 } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class GaModalCloseDirective {
4
+ private readonly modalRef;
5
+ readonly modalResult: import("@angular/core").InputSignal<any>;
6
+ onClick(): void;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<GaModalCloseDirective, never>;
8
+ static ɵdir: i0.ɵɵDirectiveDeclaration<GaModalCloseDirective, "[gaModalClose]", never, { "modalResult": { "alias": "modalResult"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
9
+ }
10
+ export declare class GaModalTitleDirective implements AfterViewInit {
11
+ private readonly renderer;
12
+ private readonly elementRef;
13
+ private readonly modalRef;
14
+ private readonly id;
15
+ constructor(id?: string);
16
+ ngAfterViewInit(): void;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<GaModalTitleDirective, [{ attribute: "id"; }]>;
18
+ static ɵdir: i0.ɵɵDirectiveDeclaration<GaModalTitleDirective, "[gaModalTitle]", never, {}, {}, never, never, true, never>;
19
+ }
20
+ export declare class GaModalDescriptionDirective implements AfterViewInit {
21
+ readonly renderer: Renderer2;
22
+ readonly elementRef: ElementRef<any>;
23
+ private readonly modalRef;
24
+ private readonly id;
25
+ constructor(id?: string);
26
+ ngAfterViewInit(): void;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<GaModalDescriptionDirective, [{ attribute: "id"; }]>;
28
+ static ɵdir: i0.ɵɵDirectiveDeclaration<GaModalDescriptionDirective, "[gaModalDescription]", never, {}, {}, never, never, true, never>;
29
+ }
@@ -0,0 +1,11 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./modal.directives";
3
+ import * as i2 from "./modal-description.component";
4
+ import * as i3 from "./modal-content.component";
5
+ import * as i4 from "./modal-actions.component";
6
+ import * as i5 from "./modal-header.component";
7
+ export declare class GaModalModule {
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<GaModalModule, never>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<GaModalModule, never, [typeof i1.GaModalCloseDirective, typeof i1.GaModalTitleDirective, typeof i1.GaModalDescriptionDirective, typeof i2.GaModalDescriptionComponent, typeof i3.GaModalContentComponent, typeof i4.GaModalActionsComponent, typeof i5.GaModalHeaderComponent], [typeof i1.GaModalCloseDirective, typeof i1.GaModalTitleDirective, typeof i1.GaModalDescriptionDirective, typeof i2.GaModalDescriptionComponent, typeof i3.GaModalContentComponent, typeof i4.GaModalActionsComponent, typeof i5.GaModalHeaderComponent]>;
10
+ static ɵinj: i0.ɵɵInjectorDeclaration<GaModalModule>;
11
+ }
@@ -0,0 +1,47 @@
1
+ import { Provider } from '@angular/core';
2
+ export type GaModalRole = 'dialog' | 'alertdialog';
3
+ export type GaModalSize = 'sm' | 'md' | 'lg';
4
+ export type GaModalType = 'none' | 'info' | 'danger' | 'warning' | 'success';
5
+ export declare class GaModalOptions {
6
+ /**
7
+ * Defines the predefined size of the modal.
8
+ *
9
+ * @default `md`
10
+ */
11
+ size?: GaModalSize;
12
+ /**
13
+ * Defines the type of the modal:
14
+ * - `none` for no icon.
15
+ * - `information` for info dialog.
16
+ * - `danger` for danger dialog.
17
+ * - `warning` for warning dialog.
18
+ * - `success` for success dialog.
19
+ */
20
+ type?: GaModalType;
21
+ /**
22
+ * The ARIA role of the dialog element.
23
+ *
24
+ * @default `dialog`
25
+ */
26
+ role?: GaModalRole;
27
+ /**
28
+ * Defines if the modal should be closed when the escape key is pressed.
29
+ *
30
+ * @default `true`
31
+ */
32
+ closeOnEscape?: boolean;
33
+ /**
34
+ * Defines if the modal should be closed when the backdrop is clicked.
35
+ *
36
+ * @default `true`
37
+ */
38
+ closeOnOutsideClick?: boolean;
39
+ /**
40
+ * Defines if the modal should be closed when the route changes.
41
+ *
42
+ * @default `true`
43
+ */
44
+ closeOnNavigation?: boolean;
45
+ }
46
+ export declare const DEFAULT_MODAL_OPTIONS: Required<GaModalOptions>;
47
+ export declare function provideGaModalOptions(options: GaModalOptions): Provider;
@@ -0,0 +1,25 @@
1
+ import { ComponentType } from '@angular/cdk/portal';
2
+ import { GaModalComponent } from './modal.component';
3
+ import { ExtractInput } from './modal.utils';
4
+ import * as i0 from "@angular/core";
5
+ export declare class GaModalService {
6
+ /** @ignore */
7
+ private overlay;
8
+ /** @ignore */
9
+ private injector;
10
+ /** @ignore */
11
+ private parentModalService;
12
+ /** @ignore */
13
+ private openModalsAtThisLevel;
14
+ get activeModals(): GaModalComponent<any, any>[];
15
+ open<C extends GaModalComponent<any, any>>(component: ComponentType<C>, ...args: ExtractInput<C> extends void ? [(undefined | null)?] : [ExtractInput<C>]): C;
16
+ closeAll(): void;
17
+ /** @ignore */
18
+ private attachContent;
19
+ /** @ignore */
20
+ private createOverlay;
21
+ /** @ignore */
22
+ private createInjector;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<GaModalService, never>;
24
+ static ɵprov: i0.ɵɵInjectableDeclaration<GaModalService>;
25
+ }
@@ -0,0 +1,3 @@
1
+ import { GaModalComponent } from './modal.component';
2
+ export type ExtractInput<C extends GaModalComponent<any>> = C extends GaModalComponent<infer I, any> ? I : never;
3
+ export type ExtractOutput<C extends GaModalComponent<any>> = C extends GaModalComponent<any, infer O> ? O : never;
@@ -5,6 +5,7 @@ export type GaTooltipDirection = 'start' | 'end' | 'center';
5
5
  export type GaTooltipPlacement = `${GaTooltipPosition}-${GaTooltipDirection}`;
6
6
  export type GaTooltipControlMode = 'hover' | 'click' | 'none';
7
7
  export declare class GaTooltipComponent {
8
+ readonly uniqueId: string;
8
9
  private mouseLeaveSubject;
9
10
  readonly afterMouseLeave: () => import("rxjs").Observable<void>;
10
11
  readonly mouseOver: import("@angular/core").WritableSignal<boolean>;
@@ -39,6 +39,7 @@ export declare class GaTooltipDirective {
39
39
  get offset(): number;
40
40
  set placement(value: GaTooltipPlacement);
41
41
  get placement(): GaTooltipPlacement;
42
+ get ariaDescribedBy(): string | null;
42
43
  ngOnDestroy(): void;
43
44
  show(): void;
44
45
  hide(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vsn-ux/ngx-gaia",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "^19.0.0",
6
6
  "@angular/common": "^19.0.0",
package/public-api.d.ts CHANGED
@@ -8,6 +8,7 @@ export * from './lib/icon/index';
8
8
  export * from './lib/input/index';
9
9
  export * from './lib/form-field/index';
10
10
  export * from './lib/menu/index';
11
+ export * from './lib/modal/index';
11
12
  export * from './lib/tooltip/index';
12
13
  export * from './lib/select/index';
13
14
  export * from './lib/spinner/index';