ngs-dialog 1.0.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.
- package/README.md +18 -0
- package/fesm2022/ngs-dialog.mjs +66 -0
- package/fesm2022/ngs-dialog.mjs.map +1 -0
- package/package.json +27 -0
- package/types/ngs-dialog.d.ts +33 -0
package/README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# 🪟 ngs-dialog
|
|
2
|
+
|
|
3
|
+
A lightweight, draggable, and fully customizable Angular dialog component built with modern signals and native CSS variables for effortless, zero-boilerplate theming.
|
|
4
|
+
|
|
5
|
+
## ✨ Features
|
|
6
|
+
|
|
7
|
+
- 🚀 **Modern Angular**: Built with Standalone components and modern Signals (`input()`, `contentChild()`).
|
|
8
|
+
- 🖱️ **Draggable**: Powered by `@angular/cdk/drag-drop` with an elegant, optional drag handle.
|
|
9
|
+
- 🎨 **Zero-Boilerplate Theming**: 100% customizable via native CSS Custom Properties. No `::ng-deep` or complex Sass overrides required.
|
|
10
|
+
- 📦 **Clean DOM**: Uses structural directives (`ng-template`) for content projection, giving you full control over your markup without extra wrapper elements.
|
|
11
|
+
- 🌗 **Flexible**: Built-in support for optional modal backdrops, responsive sizing, and clean separation of Header, Content, and Actions.
|
|
12
|
+
|
|
13
|
+
## 📦 Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install ngs-dialog
|
|
17
|
+
# or
|
|
18
|
+
yarn add ngs-dialog
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, TemplateRef, Directive, input, contentChild, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { CdkDrag, CdkDragHandle } from '@angular/cdk/drag-drop';
|
|
4
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
5
|
+
|
|
6
|
+
class NgsDialogHeader {
|
|
7
|
+
templateRef = inject((TemplateRef));
|
|
8
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: NgsDialogHeader, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
9
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: NgsDialogHeader, isStandalone: true, selector: "ng-template[ngsDialogHeader]", ngImport: i0 });
|
|
10
|
+
}
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: NgsDialogHeader, decorators: [{
|
|
12
|
+
type: Directive,
|
|
13
|
+
args: [{
|
|
14
|
+
selector: 'ng-template[ngsDialogHeader]',
|
|
15
|
+
}]
|
|
16
|
+
}] });
|
|
17
|
+
|
|
18
|
+
class NgsDialogContent {
|
|
19
|
+
templateRef = inject((TemplateRef));
|
|
20
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: NgsDialogContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
21
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: NgsDialogContent, isStandalone: true, selector: "ng-template[ngsDialogContent]", ngImport: i0 });
|
|
22
|
+
}
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: NgsDialogContent, decorators: [{
|
|
24
|
+
type: Directive,
|
|
25
|
+
args: [{
|
|
26
|
+
selector: 'ng-template[ngsDialogContent]',
|
|
27
|
+
}]
|
|
28
|
+
}] });
|
|
29
|
+
|
|
30
|
+
class NgsDialogAction {
|
|
31
|
+
templateRef = inject((TemplateRef));
|
|
32
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: NgsDialogAction, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
33
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: NgsDialogAction, isStandalone: true, selector: "ng-template[ngsDialogAction]", ngImport: i0 });
|
|
34
|
+
}
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: NgsDialogAction, decorators: [{
|
|
36
|
+
type: Directive,
|
|
37
|
+
args: [{
|
|
38
|
+
selector: 'ng-template[ngsDialogAction]',
|
|
39
|
+
}]
|
|
40
|
+
}] });
|
|
41
|
+
|
|
42
|
+
class NgsDialog {
|
|
43
|
+
showHandler = input(true, ...(ngDevMode ? [{ debugName: "showHandler" }] : /* istanbul ignore next */ []));
|
|
44
|
+
draggable = input(true, ...(ngDevMode ? [{ debugName: "draggable" }] : /* istanbul ignore next */ []));
|
|
45
|
+
hasBackDrop = input(false, ...(ngDevMode ? [{ debugName: "hasBackDrop" }] : /* istanbul ignore next */ []));
|
|
46
|
+
header = contentChild(NgsDialogHeader, ...(ngDevMode ? [{ debugName: "header" }] : /* istanbul ignore next */ []));
|
|
47
|
+
content = contentChild(NgsDialogContent, ...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
48
|
+
action = contentChild(NgsDialogAction, ...(ngDevMode ? [{ debugName: "action" }] : /* istanbul ignore next */ []));
|
|
49
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: NgsDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
50
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: NgsDialog, isStandalone: true, selector: "ngs-dialog", inputs: { showHandler: { classPropertyName: "showHandler", publicName: "showHandler", isSignal: true, isRequired: false, transformFunction: null }, draggable: { classPropertyName: "draggable", publicName: "draggable", isSignal: true, isRequired: false, transformFunction: null }, hasBackDrop: { classPropertyName: "hasBackDrop", publicName: "hasBackDrop", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "header", first: true, predicate: NgsDialogHeader, descendants: true, isSignal: true }, { propertyName: "content", first: true, predicate: NgsDialogContent, descendants: true, isSignal: true }, { propertyName: "action", first: true, predicate: NgsDialogAction, descendants: true, isSignal: true }], ngImport: i0, template: "@if(hasBackDrop()){\r\n <div class=\"ngs-dialog-backdrop\"></div>\r\n}\r\n\r\n<div class=\"ngs-dialog-wrapper\" [class.draggable]=\"draggable()\" cdkDrag [cdkDragDisabled]=\"!draggable()\" >\r\n <div class=\"ngs-dialog-handle\" cdkDragHandle aria-label=\"Drag dialog\">\r\n @if (showHandler()) {\r\n <ng-container [ngTemplateOutlet]=\"handlerIcon\"></ng-container>\r\n }\r\n @if (header()) {\r\n <div class=\"ngs-dialog-header\">\r\n <ng-container [ngTemplateOutlet]=\"header()!.templateRef\"></ng-container>\r\n </div>\r\n }\r\n </div>\r\n\r\n\r\n @if (content()) {\r\n <div class=\"ngs-dialog-content\">\r\n <ng-container [ngTemplateOutlet]=\"content()!.templateRef\"></ng-container>\r\n </div>\r\n }\r\n\r\n @if (action()) {\r\n <div class=\"ngs-dialog-action\">\r\n <ng-container [ngTemplateOutlet]=\"action()!.templateRef\"></ng-container>\r\n </div>\r\n }\r\n</div>\r\n\r\n\r\n<ng-template #handlerIcon>\r\n <svg width=\"24px\" fill=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path\r\n d=\"M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z\"></path>\r\n <path d=\"M0 0h24v24H0z\" fill=\"none\"></path>\r\n </svg>\r\n</ng-template>\r\n", styles: [":host{position:fixed;inset:0;display:flex;justify-content:center;align-items:center;z-index:var(--ngs-dialog-z-index, 1000);pointer-events:none}.ngs-dialog-backdrop{position:absolute;inset:0;background:var(--ngs-dialog-backdrop-bg, rgba(0, 0, 0, .5));pointer-events:auto;z-index:1}.draggable .ngs-dialog-handle{cursor:move}.draggable .ngs-dialog-handle:active{cursor:grabbing}.ngs-dialog-wrapper{pointer-events:auto;z-index:2;--ngs-dialog-bg: var(--ngs-theme-surface, #ffffff);--ngs-dialog-border: var(--ngs-theme-border, 1px solid #e0e0e0);--ngs-dialog-border-radius: var(--ngs-theme-radius, 8px);--ngs-dialog-shadow: var(--ngs-theme-shadow, 0 10px 25px rgba(0, 0, 0, .15));--ngs-dialog-width: var(--ngs-dialog-custom-width, 400px);--ngs-dialog-handle-color: var(--ngs-theme-text-secondary, #9e9e9e);--ngs-dialog-handle-hover-color: var(--ngs-theme-primary, #1976d2);background:var(--ngs-dialog-bg);border:var(--ngs-dialog-border);border-radius:var(--ngs-dialog-border-radius);box-shadow:var(--ngs-dialog-shadow);width:var(--ngs-dialog-width);max-width:90vw;max-height:90vh;overflow:hidden;display:flex;flex-direction:column}.ngs-dialog-handle{display:flex;justify-content:center;align-items:center;color:var(--ngs-dialog-handle-color);transition:color .2s ease}.ngs-dialog-handle svg:hover{color:var(--ngs-dialog-handle-hover-color)}.ngs-dialog-header{width:100%;padding:var(--ngs-dialog-section-padding, 16px 16px);font-weight:var(--ngs-dialog-header-font-weight, 600)}.ngs-dialog-content{padding:var(--ngs-dialog-section-padding, 16px 24px);flex:1;overflow-y:auto}.ngs-dialog-action{padding:var(--ngs-dialog-section-padding, 16px 24px);display:flex;justify-content:flex-end;gap:8px}\n"], dependencies: [{ kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
51
|
+
}
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: NgsDialog, decorators: [{
|
|
53
|
+
type: Component,
|
|
54
|
+
args: [{ selector: 'ngs-dialog', imports: [CdkDrag, CdkDragHandle, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if(hasBackDrop()){\r\n <div class=\"ngs-dialog-backdrop\"></div>\r\n}\r\n\r\n<div class=\"ngs-dialog-wrapper\" [class.draggable]=\"draggable()\" cdkDrag [cdkDragDisabled]=\"!draggable()\" >\r\n <div class=\"ngs-dialog-handle\" cdkDragHandle aria-label=\"Drag dialog\">\r\n @if (showHandler()) {\r\n <ng-container [ngTemplateOutlet]=\"handlerIcon\"></ng-container>\r\n }\r\n @if (header()) {\r\n <div class=\"ngs-dialog-header\">\r\n <ng-container [ngTemplateOutlet]=\"header()!.templateRef\"></ng-container>\r\n </div>\r\n }\r\n </div>\r\n\r\n\r\n @if (content()) {\r\n <div class=\"ngs-dialog-content\">\r\n <ng-container [ngTemplateOutlet]=\"content()!.templateRef\"></ng-container>\r\n </div>\r\n }\r\n\r\n @if (action()) {\r\n <div class=\"ngs-dialog-action\">\r\n <ng-container [ngTemplateOutlet]=\"action()!.templateRef\"></ng-container>\r\n </div>\r\n }\r\n</div>\r\n\r\n\r\n<ng-template #handlerIcon>\r\n <svg width=\"24px\" fill=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path\r\n d=\"M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z\"></path>\r\n <path d=\"M0 0h24v24H0z\" fill=\"none\"></path>\r\n </svg>\r\n</ng-template>\r\n", styles: [":host{position:fixed;inset:0;display:flex;justify-content:center;align-items:center;z-index:var(--ngs-dialog-z-index, 1000);pointer-events:none}.ngs-dialog-backdrop{position:absolute;inset:0;background:var(--ngs-dialog-backdrop-bg, rgba(0, 0, 0, .5));pointer-events:auto;z-index:1}.draggable .ngs-dialog-handle{cursor:move}.draggable .ngs-dialog-handle:active{cursor:grabbing}.ngs-dialog-wrapper{pointer-events:auto;z-index:2;--ngs-dialog-bg: var(--ngs-theme-surface, #ffffff);--ngs-dialog-border: var(--ngs-theme-border, 1px solid #e0e0e0);--ngs-dialog-border-radius: var(--ngs-theme-radius, 8px);--ngs-dialog-shadow: var(--ngs-theme-shadow, 0 10px 25px rgba(0, 0, 0, .15));--ngs-dialog-width: var(--ngs-dialog-custom-width, 400px);--ngs-dialog-handle-color: var(--ngs-theme-text-secondary, #9e9e9e);--ngs-dialog-handle-hover-color: var(--ngs-theme-primary, #1976d2);background:var(--ngs-dialog-bg);border:var(--ngs-dialog-border);border-radius:var(--ngs-dialog-border-radius);box-shadow:var(--ngs-dialog-shadow);width:var(--ngs-dialog-width);max-width:90vw;max-height:90vh;overflow:hidden;display:flex;flex-direction:column}.ngs-dialog-handle{display:flex;justify-content:center;align-items:center;color:var(--ngs-dialog-handle-color);transition:color .2s ease}.ngs-dialog-handle svg:hover{color:var(--ngs-dialog-handle-hover-color)}.ngs-dialog-header{width:100%;padding:var(--ngs-dialog-section-padding, 16px 16px);font-weight:var(--ngs-dialog-header-font-weight, 600)}.ngs-dialog-content{padding:var(--ngs-dialog-section-padding, 16px 24px);flex:1;overflow-y:auto}.ngs-dialog-action{padding:var(--ngs-dialog-section-padding, 16px 24px);display:flex;justify-content:flex-end;gap:8px}\n"] }]
|
|
55
|
+
}], propDecorators: { showHandler: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHandler", required: false }] }], draggable: [{ type: i0.Input, args: [{ isSignal: true, alias: "draggable", required: false }] }], hasBackDrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasBackDrop", required: false }] }], header: [{ type: i0.ContentChild, args: [i0.forwardRef(() => NgsDialogHeader), { isSignal: true }] }], content: [{ type: i0.ContentChild, args: [i0.forwardRef(() => NgsDialogContent), { isSignal: true }] }], action: [{ type: i0.ContentChild, args: [i0.forwardRef(() => NgsDialogAction), { isSignal: true }] }] } });
|
|
56
|
+
|
|
57
|
+
/*
|
|
58
|
+
* Public API Surface of ngs-dialog
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Generated bundle index. Do not edit.
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
export { NgsDialog, NgsDialogAction, NgsDialogContent, NgsDialogHeader };
|
|
66
|
+
//# sourceMappingURL=ngs-dialog.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngs-dialog.mjs","sources":["../../../projects/ngs-dialog/src/lib/ngs-dialog-header.ts","../../../projects/ngs-dialog/src/lib/ngs-dialog-content.ts","../../../projects/ngs-dialog/src/lib/ngs-dialog-action.ts","../../../projects/ngs-dialog/src/lib/ngs-dialog.ts","../../../projects/ngs-dialog/src/lib/ngs-dialog.html","../../../projects/ngs-dialog/src/public-api.ts","../../../projects/ngs-dialog/src/ngs-dialog.ts"],"sourcesContent":["import {Directive, inject, TemplateRef} from '@angular/core';\r\n\r\n@Directive({\r\n selector: 'ng-template[ngsDialogHeader]',\r\n})\r\nexport class NgsDialogHeader {\r\n templateRef = inject(TemplateRef<unknown>);\r\n}\r\n","import {Directive, ElementRef, inject, TemplateRef} from '@angular/core';\r\n\r\n@Directive({\r\n selector: 'ng-template[ngsDialogContent]',\r\n})\r\nexport class NgsDialogContent {\r\n\r\n templateRef = inject(TemplateRef<unknown>);\r\n}\r\n","import {Directive, inject, TemplateRef} from '@angular/core';\r\n\r\n@Directive({\r\n selector: 'ng-template[ngsDialogAction]',\r\n})\r\nexport class NgsDialogAction {\r\n\r\n templateRef = inject(TemplateRef<unknown>);\r\n}\r\n","import {ChangeDetectionStrategy, Component, contentChild, input} from '@angular/core';\r\nimport {CdkDrag, CdkDragHandle} from '@angular/cdk/drag-drop';\r\nimport {NgsDialogHeader} from './ngs-dialog-header';\r\nimport {NgsDialogContent} from './ngs-dialog-content';\r\nimport {NgsDialogAction} from './ngs-dialog-action';\r\nimport {NgTemplateOutlet} from '@angular/common';\r\n\r\n@Component({\r\n selector: 'ngs-dialog',\r\n imports: [CdkDrag, CdkDragHandle, NgTemplateOutlet],\r\n templateUrl: 'ngs-dialog.html',\r\n styleUrl: 'ngs-dialog.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class NgsDialog {\r\n showHandler = input<boolean>(true);\r\n draggable = input<boolean>(true);\r\n hasBackDrop = input<boolean>(false);\r\n header = contentChild<NgsDialogHeader>(NgsDialogHeader);\r\n content = contentChild<NgsDialogContent>(NgsDialogContent);\r\n action = contentChild<NgsDialogAction>(NgsDialogAction);\r\n}\r\n","@if(hasBackDrop()){\r\n <div class=\"ngs-dialog-backdrop\"></div>\r\n}\r\n\r\n<div class=\"ngs-dialog-wrapper\" [class.draggable]=\"draggable()\" cdkDrag [cdkDragDisabled]=\"!draggable()\" >\r\n <div class=\"ngs-dialog-handle\" cdkDragHandle aria-label=\"Drag dialog\">\r\n @if (showHandler()) {\r\n <ng-container [ngTemplateOutlet]=\"handlerIcon\"></ng-container>\r\n }\r\n @if (header()) {\r\n <div class=\"ngs-dialog-header\">\r\n <ng-container [ngTemplateOutlet]=\"header()!.templateRef\"></ng-container>\r\n </div>\r\n }\r\n </div>\r\n\r\n\r\n @if (content()) {\r\n <div class=\"ngs-dialog-content\">\r\n <ng-container [ngTemplateOutlet]=\"content()!.templateRef\"></ng-container>\r\n </div>\r\n }\r\n\r\n @if (action()) {\r\n <div class=\"ngs-dialog-action\">\r\n <ng-container [ngTemplateOutlet]=\"action()!.templateRef\"></ng-container>\r\n </div>\r\n }\r\n</div>\r\n\r\n\r\n<ng-template #handlerIcon>\r\n <svg width=\"24px\" fill=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path\r\n d=\"M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z\"></path>\r\n <path d=\"M0 0h24v24H0z\" fill=\"none\"></path>\r\n </svg>\r\n</ng-template>\r\n","/*\r\n * Public API Surface of ngs-dialog\r\n */\r\n\r\nexport * from './lib/ngs-dialog';\r\nexport * from './lib/ngs-dialog-header';\r\nexport * from './lib/ngs-dialog-action';\r\nexport * from './lib/ngs-dialog-content';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAKa,eAAe,CAAA;AAC1B,IAAA,WAAW,GAAG,MAAM,EAAC,WAAoB,EAAC;wGAD/B,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,8BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAH3B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,8BAA8B;AACzC,iBAAA;;;MCCY,gBAAgB,CAAA;AAE3B,IAAA,WAAW,GAAG,MAAM,EAAC,WAAoB,EAAC;wGAF/B,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,+BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,SAAS;AA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,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,aAAa,+FAAE,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAKvC,SAAS,EAAA,UAAA,EAAA,CAAA;kBAPrB,SAAS;+BACE,YAAY,EAAA,OAAA,EACb,CAAC,OAAO,EAAE,aAAa,EAAE,gBAAgB,CAAC,EAAA,eAAA,EAGlC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,2vCAAA,EAAA,MAAA,EAAA,CAAA,0pDAAA,CAAA,EAAA;yYAMR,eAAe,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MACb,gBAAgB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAClB,eAAe,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEpBxD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ngs-dialog",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A lightweight, draggable, and fully customizable Angular dialog component built with modern signals and native CSS variables.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"peerDependencies": {
|
|
7
|
+
"@angular/cdk": "^21.2.0",
|
|
8
|
+
"@angular/common": "^21.2.0",
|
|
9
|
+
"@angular/core": "^21.2.0"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"tslib": "^2.3.0"
|
|
13
|
+
},
|
|
14
|
+
"sideEffects": false,
|
|
15
|
+
"module": "fesm2022/ngs-dialog.mjs",
|
|
16
|
+
"typings": "types/ngs-dialog.d.ts",
|
|
17
|
+
"exports": {
|
|
18
|
+
"./package.json": {
|
|
19
|
+
"default": "./package.json"
|
|
20
|
+
},
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./types/ngs-dialog.d.ts",
|
|
23
|
+
"default": "./fesm2022/ngs-dialog.mjs"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"type": "module"
|
|
27
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
declare class NgsDialogHeader {
|
|
5
|
+
templateRef: TemplateRef<any>;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgsDialogHeader, never>;
|
|
7
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgsDialogHeader, "ng-template[ngsDialogHeader]", never, {}, {}, never, never, true, never>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare class NgsDialogContent {
|
|
11
|
+
templateRef: TemplateRef<any>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgsDialogContent, never>;
|
|
13
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgsDialogContent, "ng-template[ngsDialogContent]", never, {}, {}, never, never, true, never>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare class NgsDialogAction {
|
|
17
|
+
templateRef: TemplateRef<any>;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgsDialogAction, never>;
|
|
19
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgsDialogAction, "ng-template[ngsDialogAction]", never, {}, {}, never, never, true, never>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare class NgsDialog {
|
|
23
|
+
showHandler: i0.InputSignal<boolean>;
|
|
24
|
+
draggable: i0.InputSignal<boolean>;
|
|
25
|
+
hasBackDrop: i0.InputSignal<boolean>;
|
|
26
|
+
header: i0.Signal<NgsDialogHeader | undefined>;
|
|
27
|
+
content: i0.Signal<NgsDialogContent | undefined>;
|
|
28
|
+
action: i0.Signal<NgsDialogAction | undefined>;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgsDialog, never>;
|
|
30
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgsDialog, "ngs-dialog", never, { "showHandler": { "alias": "showHandler"; "required": false; "isSignal": true; }; "draggable": { "alias": "draggable"; "required": false; "isSignal": true; }; "hasBackDrop": { "alias": "hasBackDrop"; "required": false; "isSignal": true; }; }, {}, ["header", "content", "action"], never, true, never>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { NgsDialog, NgsDialogAction, NgsDialogContent, NgsDialogHeader };
|