ngx-kit 6.0.2 → 6.2.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.
Files changed (51) hide show
  1. package/README.md +3 -3
  2. package/angle-selector/README.md +34 -34
  3. package/box-shadow/README.md +33 -33
  4. package/color-picker/README.md +49 -49
  5. package/data-table/README.md +113 -113
  6. package/date-picker/README.md +69 -69
  7. package/dialog/README.md +92 -92
  8. package/drawer-menu/README.md +77 -77
  9. package/dropzone/README.md +422 -60
  10. package/fesm2022/ngx-kit-angle-selector.mjs +2 -2
  11. package/fesm2022/ngx-kit-angle-selector.mjs.map +1 -1
  12. package/fesm2022/ngx-kit-box-shadow.mjs +2 -2
  13. package/fesm2022/ngx-kit-box-shadow.mjs.map +1 -1
  14. package/fesm2022/ngx-kit-color-picker.mjs +4 -4
  15. package/fesm2022/ngx-kit-color-picker.mjs.map +1 -1
  16. package/fesm2022/ngx-kit-data-table.mjs +2 -2
  17. package/fesm2022/ngx-kit-data-table.mjs.map +1 -1
  18. package/fesm2022/ngx-kit-date-picker.mjs +1322 -200
  19. package/fesm2022/ngx-kit-date-picker.mjs.map +1 -1
  20. package/fesm2022/ngx-kit-dialog.mjs +2 -2
  21. package/fesm2022/ngx-kit-dialog.mjs.map +1 -1
  22. package/fesm2022/ngx-kit-drawer-menu.mjs +2 -2
  23. package/fesm2022/ngx-kit-drawer-menu.mjs.map +1 -1
  24. package/fesm2022/ngx-kit-dropzone.mjs +273 -28
  25. package/fesm2022/ngx-kit-dropzone.mjs.map +1 -1
  26. package/fesm2022/ngx-kit-form-field.mjs.map +1 -1
  27. package/fesm2022/ngx-kit-gallery.mjs +2 -2
  28. package/fesm2022/ngx-kit-gallery.mjs.map +1 -1
  29. package/fesm2022/ngx-kit-gradient-picker.mjs.map +1 -1
  30. package/fesm2022/ngx-kit-image-editor.mjs +101 -14
  31. package/fesm2022/ngx-kit-image-editor.mjs.map +1 -1
  32. package/fesm2022/ngx-kit-menu.mjs +8 -8
  33. package/fesm2022/ngx-kit-menu.mjs.map +1 -1
  34. package/fesm2022/ngx-kit-message.mjs +5 -0
  35. package/fesm2022/ngx-kit-message.mjs.map +1 -1
  36. package/fesm2022/ngx-kit-notify.mjs.map +1 -1
  37. package/fesm2022/ngx-kit-shared.mjs +2 -2
  38. package/fesm2022/ngx-kit-shared.mjs.map +1 -1
  39. package/fesm2022/ngx-kit-time-picker.mjs +2 -2
  40. package/fesm2022/ngx-kit-time-picker.mjs.map +1 -1
  41. package/gallery/README.md +71 -71
  42. package/gradient-picker/README.md +41 -41
  43. package/menu/README.md +85 -85
  44. package/message/README.md +70 -70
  45. package/notify/README.md +58 -58
  46. package/package.json +1 -1
  47. package/shared/README.md +117 -117
  48. package/time-picker/README.md +95 -95
  49. package/types/ngx-kit-date-picker.d.ts +302 -36
  50. package/types/ngx-kit-dropzone.d.ts +129 -18
  51. package/types/ngx-kit-image-editor.d.ts +50 -5
package/dialog/README.md CHANGED
@@ -1,92 +1,92 @@
1
- # ngx-kit/dialog
2
-
3
- Modal/dialog built on the browser's native `<dialog>` — no manual overlay, no third-party library.
4
-
5
- ## Install
6
-
7
- ```bash
8
- npm install ngx-kit
9
- ```
10
-
11
- ## Setup
12
-
13
- ```ts
14
- // app.config.ts
15
- import { ApplicationConfig, importProvidersFrom } from '@angular/core';
16
- import { NgxDialogModule } from 'ngx-kit/dialog';
17
-
18
- export const appConfig: ApplicationConfig = {
19
- providers: [importProvidersFrom(NgxDialogModule)],
20
- };
21
- ```
22
-
23
- ## Opening a dialog
24
-
25
- With the static API (no manual service injection needed):
26
-
27
- ```ts
28
- import { Dialog } from 'ngx-kit/dialog';
29
-
30
- const ref = Dialog.open(MyDialogComponent, {
31
- data: { userId: 42 },
32
- width: '480px',
33
- allowCloseOnOutsideClick: true,
34
- header: { enable: true, title: 'Edit user', showCloseButton: true },
35
- });
36
-
37
- ref.afterClosed.subscribe((result) => console.log('Result:', result));
38
- ```
39
-
40
- Inside the dialog's component:
41
-
42
- ```ts
43
- @Component({ ... })
44
- export class MyDialogComponent {
45
- private ref = inject(NgxDialogRef);
46
- data = inject(NGX_DIALOG_DATA); // the data passed via config.data
47
-
48
- save() {
49
- this.ref.close({ saved: true });
50
- }
51
- }
52
- ```
53
-
54
- ### Layout directives inside a dialog
55
-
56
- ```html
57
- <div *ngxDialogHeader>Custom title</div>
58
- <div *ngxDialogBody>Main content</div>
59
- <div *ngxDialogFooter>
60
- <button (click)="save()">Save</button>
61
- </div>
62
- ```
63
-
64
- ## API
65
-
66
- ### `Dialog.open<T>(component, config?)`
67
-
68
- | `config` field | Type | Default | Description |
69
- | --- | --- | --- | --- |
70
- | `data` | `T` | `{}` | Data passed to the component inside the dialog |
71
- | `allowCloseOnOutsideClick` | `boolean` | `false` | Close when clicking the backdrop |
72
- | `containerClass` | `string` | `'ngx-kit'` | Extra class on the container |
73
- | `header.enable` / `header.title` / `header.showCloseButton` | | | Default header settings |
74
- | `footer.enable` | `boolean` | | Show the default footer |
75
- | `width` / `minWidth` / `maxWidth` | `string` | | Horizontal sizing |
76
- | `height` / `minHeight` / `maxHeight` | `string` | | Vertical sizing |
77
- | `injector` | `Injector` | | Custom injector for the inner component |
78
-
79
- ### `NgxDialogRef`
80
-
81
- | Member | Description |
82
- | --- | --- |
83
- | `close(result?)` | Closes the dialog, optionally passing back a result |
84
- | `afterClosed: Observable<any>` | Emits `result` after the dialog closes |
85
-
86
- ## SSR note
87
-
88
- `Dialog.open(...)` is a static/global API that's perfectly safe for a typical browser app. If you're using Angular SSR, this static instance is shared across concurrent server requests — instead of the static API, inject `NgxOverlayService` directly (which is per-injector/per-request safe).
89
-
90
- ## Dark mode and RTL
91
-
92
- Supported automatically (`light-dark()` + CSS logical properties).
1
+ # ngx-kit/dialog
2
+
3
+ Modal/dialog built on the browser's native `<dialog>` — no manual overlay, no third-party library.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install ngx-kit
9
+ ```
10
+
11
+ ## Setup
12
+
13
+ ```ts
14
+ // app.config.ts
15
+ import { ApplicationConfig, importProvidersFrom } from '@angular/core';
16
+ import { NgxDialogModule } from 'ngx-kit/dialog';
17
+
18
+ export const appConfig: ApplicationConfig = {
19
+ providers: [importProvidersFrom(NgxDialogModule)],
20
+ };
21
+ ```
22
+
23
+ ## Opening a dialog
24
+
25
+ With the static API (no manual service injection needed):
26
+
27
+ ```ts
28
+ import { Dialog } from 'ngx-kit/dialog';
29
+
30
+ const ref = Dialog.open(MyDialogComponent, {
31
+ data: { userId: 42 },
32
+ width: '480px',
33
+ allowCloseOnOutsideClick: true,
34
+ header: { enable: true, title: 'Edit user', showCloseButton: true },
35
+ });
36
+
37
+ ref.afterClosed.subscribe((result) => console.log('Result:', result));
38
+ ```
39
+
40
+ Inside the dialog's component:
41
+
42
+ ```ts
43
+ @Component({ ... })
44
+ export class MyDialogComponent {
45
+ private ref = inject(NgxDialogRef);
46
+ data = inject(NGX_DIALOG_DATA); // the data passed via config.data
47
+
48
+ save() {
49
+ this.ref.close({ saved: true });
50
+ }
51
+ }
52
+ ```
53
+
54
+ ### Layout directives inside a dialog
55
+
56
+ ```html
57
+ <div *ngxDialogHeader>Custom title</div>
58
+ <div *ngxDialogBody>Main content</div>
59
+ <div *ngxDialogFooter>
60
+ <button (click)="save()">Save</button>
61
+ </div>
62
+ ```
63
+
64
+ ## API
65
+
66
+ ### `Dialog.open<T>(component, config?)`
67
+
68
+ | `config` field | Type | Default | Description |
69
+ | --- | --- | --- | --- |
70
+ | `data` | `T` | `{}` | Data passed to the component inside the dialog |
71
+ | `allowCloseOnOutsideClick` | `boolean` | `false` | Close when clicking the backdrop |
72
+ | `containerClass` | `string` | `'ngx-kit'` | Extra class on the container |
73
+ | `header.enable` / `header.title` / `header.showCloseButton` | | | Default header settings |
74
+ | `footer.enable` | `boolean` | | Show the default footer |
75
+ | `width` / `minWidth` / `maxWidth` | `string` | | Horizontal sizing |
76
+ | `height` / `minHeight` / `maxHeight` | `string` | | Vertical sizing |
77
+ | `injector` | `Injector` | | Custom injector for the inner component |
78
+
79
+ ### `NgxDialogRef`
80
+
81
+ | Member | Description |
82
+ | --- | --- |
83
+ | `close(result?)` | Closes the dialog, optionally passing back a result |
84
+ | `afterClosed: Observable<any>` | Emits `result` after the dialog closes |
85
+
86
+ ## SSR note
87
+
88
+ `Dialog.open(...)` is a static/global API that's perfectly safe for a typical browser app. If you're using Angular SSR, this static instance is shared across concurrent server requests — instead of the static API, inject `NgxOverlayService` directly (which is per-injector/per-request safe).
89
+
90
+ ## Dark mode and RTL
91
+
92
+ Supported automatically (`light-dark()` + CSS logical properties).
@@ -1,77 +1,77 @@
1
- # ngx-kit/drawer-menu
2
-
3
- A side drawer menu with 7 different opening/closing effects (from simple to 3D/jelly), 3 behaviors for the page content (overlay/push/reveal), and a responsive default open/closed state based on screen size.
4
-
5
- ## Install
6
-
7
- ```bash
8
- npm install ngx-kit
9
- ```
10
-
11
- ## Basic usage
12
-
13
- ```html
14
- <ngx-drawer-menu
15
- side="start"
16
- effect="jelly"
17
- contentBehavior="push"
18
- [width]="280"
19
- [openOnDesktop]="true"
20
- [openOnMobile]="false"
21
- [(open)]="isOpen"
22
- >
23
- <div drawerContent>
24
- <!-- menu content -->
25
- <a routerLink="/home">Home</a>
26
- <a routerLink="/settings">Settings</a>
27
- </div>
28
-
29
- <!-- main page content (default, no select) -->
30
- <router-outlet />
31
- </ngx-drawer-menu>
32
- ```
33
-
34
- ## API
35
-
36
- | Input | Type | Default | Description |
37
- | --- | --- | --- | --- |
38
- | `side` | `'start' \| 'end'` | `'start'` | Logical — automatically flips under RTL |
39
- | `effect` | `'slide' \| 'curtain' \| 'jelly' \| 'pull' \| 'rotate3d' \| 'flip3d' \| 'scale'` | `'slide'` | The panel's own open/close effect (described below) |
40
- | `contentBehavior` | `'overlay' \| 'push' \| 'reveal'` | `'overlay'` | How the main page content behaves |
41
- | `width` | `number` | `280` | Panel width in pixels |
42
- | `swipeEnabled` | `boolean` | `true` | Open by swiping from the screen edge |
43
- | `swipeEdgeSize` | `number` | `24` | Width of the invisible edge zone that a swipe can start from |
44
- | `backdropClose` | `boolean` | `true` | Close on backdrop click (or dimming the content in push/reveal) |
45
- | `curtainStrips` | `number` | `7` | Only for `effect="curtain"` |
46
- | `open` | `boolean` (model, two-way) | `false` | Controllable via `[(open)]` |
47
- | `respondToViewport` | `boolean` | `true` | Crossing `mobileBreakpoint` **live** (not just on first load) syncs `open` with `openOnDesktop`/`openOnMobile` |
48
- | `openOnDesktop` / `openOnMobile` | `boolean` | `true` / `false` | |
49
- | `mobileBreakpoint` | `number` | `768` | |
50
-
51
- ### Effects (`effect`)
52
-
53
- | Value | Description |
54
- | --- | --- |
55
- | `slide` | Classic simple slide |
56
- | `curtain` | Several same-colored vertical strips that collapse with a staggered delay, revealing the content |
57
- | `jelly` | A multi-stage spring oscillation that settles down (inspired by the [Jelly Slide Menu](https://dribbble.com/shots/2307371) effect) |
58
- | `pull` | A single rubber-band stretch |
59
- | `rotate3d` | A 3D rotation around a hinge, like a door opening |
60
- | `flip3d` | Flips with depth on the Z axis, like a book cover |
61
- | `scale` | Zooms in from the center with a fade |
62
-
63
- ### Content behavior (`contentBehavior`)
64
-
65
- | Value | Description |
66
- | --- | --- |
67
- | `overlay` | Content stays in place, the drawer floats over it (with a backdrop) |
68
- | `push` | Content is pushed aside by the drawer's width |
69
- | `reveal` | Content shrinks/recedes slightly, as if the drawer is revealed behind it (the iOS effect) |
70
-
71
- ## Architecture note: embedding inside a bounded area
72
-
73
- By default, the drawer takes up the full height of the nearest positioned ancestor (which is what you want for a full app shell). If you want to embed it inside a bounded card/area (not the whole page), just give that container `position: relative` and a defined height — the drawer will automatically confine itself to that box (thanks to the `perspective` it uses for 3D effects, which per the CSS spec creates a containing block for `position:fixed` descendants).
74
-
75
- ## Dark mode and RTL
76
-
77
- Supported automatically; drag math (which, unlike CSS logical properties, needs the real physical direction) uses the shared `DirectionService`, so it works correctly even with a live `dir` change.
1
+ # ngx-kit/drawer-menu
2
+
3
+ A side drawer menu with 7 different opening/closing effects (from simple to 3D/jelly), 3 behaviors for the page content (overlay/push/reveal), and a responsive default open/closed state based on screen size.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install ngx-kit
9
+ ```
10
+
11
+ ## Basic usage
12
+
13
+ ```html
14
+ <ngx-drawer-menu
15
+ side="start"
16
+ effect="jelly"
17
+ contentBehavior="push"
18
+ [width]="280"
19
+ [openOnDesktop]="true"
20
+ [openOnMobile]="false"
21
+ [(open)]="isOpen"
22
+ >
23
+ <div drawerContent>
24
+ <!-- menu content -->
25
+ <a routerLink="/home">Home</a>
26
+ <a routerLink="/settings">Settings</a>
27
+ </div>
28
+
29
+ <!-- main page content (default, no select) -->
30
+ <router-outlet />
31
+ </ngx-drawer-menu>
32
+ ```
33
+
34
+ ## API
35
+
36
+ | Input | Type | Default | Description |
37
+ | --- | --- | --- | --- |
38
+ | `side` | `'start' \| 'end'` | `'start'` | Logical — automatically flips under RTL |
39
+ | `effect` | `'slide' \| 'curtain' \| 'jelly' \| 'pull' \| 'rotate3d' \| 'flip3d' \| 'scale'` | `'slide'` | The panel's own open/close effect (described below) |
40
+ | `contentBehavior` | `'overlay' \| 'push' \| 'reveal'` | `'overlay'` | How the main page content behaves |
41
+ | `width` | `number` | `280` | Panel width in pixels |
42
+ | `swipeEnabled` | `boolean` | `true` | Open by swiping from the screen edge |
43
+ | `swipeEdgeSize` | `number` | `24` | Width of the invisible edge zone that a swipe can start from |
44
+ | `backdropClose` | `boolean` | `true` | Close on backdrop click (or dimming the content in push/reveal) |
45
+ | `curtainStrips` | `number` | `7` | Only for `effect="curtain"` |
46
+ | `open` | `boolean` (model, two-way) | `false` | Controllable via `[(open)]` |
47
+ | `respondToViewport` | `boolean` | `true` | Crossing `mobileBreakpoint` **live** (not just on first load) syncs `open` with `openOnDesktop`/`openOnMobile` |
48
+ | `openOnDesktop` / `openOnMobile` | `boolean` | `true` / `false` | |
49
+ | `mobileBreakpoint` | `number` | `768` | |
50
+
51
+ ### Effects (`effect`)
52
+
53
+ | Value | Description |
54
+ | --- | --- |
55
+ | `slide` | Classic simple slide |
56
+ | `curtain` | Several same-colored vertical strips that collapse with a staggered delay, revealing the content |
57
+ | `jelly` | A multi-stage spring oscillation that settles down (inspired by the [Jelly Slide Menu](https://dribbble.com/shots/2307371) effect) |
58
+ | `pull` | A single rubber-band stretch |
59
+ | `rotate3d` | A 3D rotation around a hinge, like a door opening |
60
+ | `flip3d` | Flips with depth on the Z axis, like a book cover |
61
+ | `scale` | Zooms in from the center with a fade |
62
+
63
+ ### Content behavior (`contentBehavior`)
64
+
65
+ | Value | Description |
66
+ | --- | --- |
67
+ | `overlay` | Content stays in place, the drawer floats over it (with a backdrop) |
68
+ | `push` | Content is pushed aside by the drawer's width |
69
+ | `reveal` | Content shrinks/recedes slightly, as if the drawer is revealed behind it (the iOS effect) |
70
+
71
+ ## Architecture note: embedding inside a bounded area
72
+
73
+ By default, the drawer takes up the full height of the nearest positioned ancestor (which is what you want for a full app shell). If you want to embed it inside a bounded card/area (not the whole page), just give that container `position: relative` and a defined height — the drawer will automatically confine itself to that box (thanks to the `perspective` it uses for 3D effects, which per the CSS spec creates a containing block for `position:fixed` descendants).
74
+
75
+ ## Dark mode and RTL
76
+
77
+ Supported automatically; drag math (which, unlike CSS logical properties, needs the real physical direction) uses the shared `DirectionService`, so it works correctly even with a live `dir` change.