@tekus/design-system 5.23.0 → 5.25.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 (71) hide show
  1. package/fesm2022/tekus-design-system-components-autocomplete.mjs +24 -17
  2. package/fesm2022/tekus-design-system-components-autocomplete.mjs.map +1 -1
  3. package/fesm2022/tekus-design-system-components-badge.mjs +3 -3
  4. package/fesm2022/tekus-design-system-components-badge.mjs.map +1 -1
  5. package/fesm2022/tekus-design-system-components-button.mjs +48 -31
  6. package/fesm2022/tekus-design-system-components-button.mjs.map +1 -1
  7. package/fesm2022/tekus-design-system-components-checkbox.mjs +13 -16
  8. package/fesm2022/tekus-design-system-components-checkbox.mjs.map +1 -1
  9. package/fesm2022/tekus-design-system-components-date-picker.mjs +61 -20
  10. package/fesm2022/tekus-design-system-components-date-picker.mjs.map +1 -1
  11. package/fesm2022/tekus-design-system-components-drawer.mjs +42 -26
  12. package/fesm2022/tekus-design-system-components-drawer.mjs.map +1 -1
  13. package/fesm2022/tekus-design-system-components-fallback-view.mjs +18 -38
  14. package/fesm2022/tekus-design-system-components-fallback-view.mjs.map +1 -1
  15. package/fesm2022/tekus-design-system-components-icon.mjs +11 -17
  16. package/fesm2022/tekus-design-system-components-icon.mjs.map +1 -1
  17. package/fesm2022/tekus-design-system-components-input-number.mjs +15 -14
  18. package/fesm2022/tekus-design-system-components-input-number.mjs.map +1 -1
  19. package/fesm2022/tekus-design-system-components-input-text.mjs +19 -21
  20. package/fesm2022/tekus-design-system-components-input-text.mjs.map +1 -1
  21. package/fesm2022/tekus-design-system-components-modal.mjs +40 -25
  22. package/fesm2022/tekus-design-system-components-modal.mjs.map +1 -1
  23. package/fesm2022/tekus-design-system-components-multiselect.mjs +3 -3
  24. package/fesm2022/tekus-design-system-components-multiselect.mjs.map +1 -1
  25. package/fesm2022/tekus-design-system-components-pagination.mjs +3 -3
  26. package/fesm2022/tekus-design-system-components-pagination.mjs.map +1 -1
  27. package/fesm2022/tekus-design-system-components-panel.mjs +21 -30
  28. package/fesm2022/tekus-design-system-components-panel.mjs.map +1 -1
  29. package/fesm2022/tekus-design-system-components-radio-button.mjs +14 -16
  30. package/fesm2022/tekus-design-system-components-radio-button.mjs.map +1 -1
  31. package/fesm2022/tekus-design-system-components-select.mjs +13 -11
  32. package/fesm2022/tekus-design-system-components-select.mjs.map +1 -1
  33. package/fesm2022/tekus-design-system-components-table.mjs +27 -23
  34. package/fesm2022/tekus-design-system-components-table.mjs.map +1 -1
  35. package/fesm2022/tekus-design-system-components-tabs.mjs +3 -3
  36. package/fesm2022/tekus-design-system-components-tabs.mjs.map +1 -1
  37. package/fesm2022/tekus-design-system-components-tag.mjs +3 -3
  38. package/fesm2022/tekus-design-system-components-tag.mjs.map +1 -1
  39. package/fesm2022/tekus-design-system-components-textarea.mjs +15 -14
  40. package/fesm2022/tekus-design-system-components-textarea.mjs.map +1 -1
  41. package/fesm2022/tekus-design-system-components-toolbar.mjs +3 -3
  42. package/fesm2022/tekus-design-system-components-toolbar.mjs.map +1 -1
  43. package/fesm2022/tekus-design-system-components-tooltip.mjs +3 -3
  44. package/fesm2022/tekus-design-system-components-tooltip.mjs.map +1 -1
  45. package/fesm2022/tekus-design-system-components-topbar.mjs +3 -3
  46. package/fesm2022/tekus-design-system-components-topbar.mjs.map +1 -1
  47. package/fesm2022/tekus-design-system-core-types.mjs +76 -2
  48. package/fesm2022/tekus-design-system-core-types.mjs.map +1 -1
  49. package/fesm2022/tekus-design-system-core.mjs +76 -2
  50. package/fesm2022/tekus-design-system-core.mjs.map +1 -1
  51. package/fesm2022/tekus-design-system-directives-gird-item.mjs +19 -24
  52. package/fesm2022/tekus-design-system-directives-gird-item.mjs.map +1 -1
  53. package/package.json +2 -2
  54. package/types/tekus-design-system-components-autocomplete.d.ts +10 -2
  55. package/types/tekus-design-system-components-button.d.ts +15 -19
  56. package/types/tekus-design-system-components-checkbox.d.ts +3 -8
  57. package/types/tekus-design-system-components-date-picker.d.ts +33 -7
  58. package/types/tekus-design-system-components-drawer.d.ts +14 -9
  59. package/types/tekus-design-system-components-fallback-view.d.ts +17 -18
  60. package/types/tekus-design-system-components-icon.d.ts +7 -16
  61. package/types/tekus-design-system-components-input-number.d.ts +3 -4
  62. package/types/tekus-design-system-components-input-text.d.ts +4 -10
  63. package/types/tekus-design-system-components-modal.d.ts +14 -12
  64. package/types/tekus-design-system-components-panel.d.ts +10 -18
  65. package/types/tekus-design-system-components-radio-button.d.ts +3 -7
  66. package/types/tekus-design-system-components-select.d.ts +14 -1
  67. package/types/tekus-design-system-components-table.d.ts +5 -5
  68. package/types/tekus-design-system-components-textarea.d.ts +3 -4
  69. package/types/tekus-design-system-core-types.d.ts +45 -1
  70. package/types/tekus-design-system-core.d.ts +45 -1
  71. package/types/tekus-design-system-directives-gird-item.d.ts +5 -5
@@ -1,9 +1,8 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { Type, OnDestroy, EventEmitter, ComponentRef } from '@angular/core';
2
+ import { Type, OnDestroy, ComponentRef } from '@angular/core';
3
3
  import { Variant } from '@tekus/design-system/components/button';
4
4
  import { SeverityType } from '@tekus/design-system/components/modal';
5
- import { TkCloseInterceptor } from '@tekus/design-system/core/types';
6
- import { Observable } from 'rxjs';
5
+ import { TkCloseInterceptor, TkDialogRef } from '@tekus/design-system/core/types';
7
6
 
8
7
  type DrawerSizeType = 'small' | 'large';
9
8
  interface DrawerHeaderAction {
@@ -60,8 +59,11 @@ interface DrawerConfig<T = unknown> {
60
59
  */
61
60
  declare class DrawerComponent<T = unknown> implements OnDestroy {
62
61
  private readonly elementRef;
62
+ private readonly injector;
63
63
  private readonly contentHost;
64
64
  private componentRef?;
65
+ /** The dialog ref associated with this drawer */
66
+ dialogRef: _angular_core.InputSignal<TkDialogRef<DrawerComponent<T>, unknown> | null>;
65
67
  /** The required title displayed at the top left of the drawer header */
66
68
  title: _angular_core.InputSignal<string>;
67
69
  /** The main content of the drawer. Can be a string or a Component Type. */
@@ -90,7 +92,7 @@ declare class DrawerComponent<T = unknown> implements OnDestroy {
90
92
  /** Whether the drawer content has a scrollbar */
91
93
  hasScroll: boolean;
92
94
  /** Emits when the drawer closes, passing the return value from header action or null */
93
- readonly onClose: EventEmitter<unknown>;
95
+ readonly closed: _angular_core.OutputEmitterRef<unknown>;
94
96
  private alreadyEmitted;
95
97
  private returnValueOnClose;
96
98
  constructor();
@@ -102,8 +104,11 @@ declare class DrawerComponent<T = unknown> implements OnDestroy {
102
104
  * Checks if the drawer content has a scrollbar and updates `hasScroll` state.
103
105
  */
104
106
  checkScroll(): void;
107
+ private wasOpened;
105
108
  /** Opens the drawer */
106
109
  open(): void;
110
+ /** Marks the drawer as shown to enable closure emission guards */
111
+ handleShow(): void;
107
112
  /**
108
113
  * @summary Main entry point for closure requests.
109
114
  * @returns true if closure was executed.
@@ -123,15 +128,15 @@ declare class DrawerComponent<T = unknown> implements OnDestroy {
123
128
  handleHeaderAction(action: (() => void) | undefined, returnValue: unknown): void;
124
129
  private resetClosureState;
125
130
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DrawerComponent<any>, never>;
126
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DrawerComponent<any>, "tk-drawer", never, { "title": { "alias": "title"; "required": true; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; "headerAction": { "alias": "headerAction"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "interceptor": { "alias": "interceptor"; "required": false; "isSignal": true; }; "isOpened": { "alias": "isOpened"; "required": false; "isSignal": true; }; }, { "isOpened": "isOpenedChange"; }, never, never, true, never>;
131
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DrawerComponent<any>, "tk-drawer", never, { "dialogRef": { "alias": "dialogRef"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": true; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; "headerAction": { "alias": "headerAction"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "interceptor": { "alias": "interceptor"; "required": false; "isSignal": true; }; "isOpened": { "alias": "isOpened"; "required": false; "isSignal": true; }; }, { "isOpened": "isOpenedChange"; "closed": "closed"; }, never, never, true, never>;
127
132
  }
128
133
 
129
134
  declare class DrawerService {
130
135
  private readonly appRef;
131
- private drawerRef;
132
- get _drawerRefForTesting(): ComponentRef<DrawerComponent<unknown>> | null;
133
- set _drawerRefForTesting(ref: ComponentRef<DrawerComponent<unknown>> | null);
134
- open(config: DrawerConfig): Observable<unknown>;
136
+ private dialogRef;
137
+ get drawerRefForTesting(): ComponentRef<DrawerComponent<unknown>> | null;
138
+ set drawerRefForTesting(ref: ComponentRef<DrawerComponent<unknown>> | null);
139
+ open<T = unknown, R = unknown>(config: DrawerConfig): TkDialogRef<DrawerComponent<T>, R>;
135
140
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DrawerService, never>;
136
141
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<DrawerService>;
137
142
  }
@@ -1,12 +1,11 @@
1
- import * as i0 from '@angular/core';
2
- import { EventEmitter } from '@angular/core';
1
+ import * as _angular_core from '@angular/core';
3
2
 
4
3
  type FallbackViewType = 'content' | 'section';
5
4
  /**
6
5
  * @component FallbackViewComponent
7
6
  * @description
8
7
  * A reusable component for displaying fallback or empty states such as
9
- * no results found”, error loading data”, or content not available”.
8
+ * "no results found", "error loading data", or "content not available".
10
9
  * It provides a consistent structure with support for an image, title,
11
10
  * message, and optional action buttons.
12
11
  *
@@ -68,9 +67,9 @@ declare class FallbackViewComponent {
68
67
  * - `'content'`: Standard size.
69
68
  * - `'section'`: A more compact version.
70
69
  *
71
- * @default `'default'`
70
+ * @default `'content'`
72
71
  */
73
- type: FallbackViewType;
72
+ type: _angular_core.InputSignal<FallbackViewType>;
74
73
  /**
75
74
  * @property {string} imageSrc
76
75
  * @description
@@ -78,12 +77,12 @@ declare class FallbackViewComponent {
78
77
  *
79
78
  * @default `''`
80
79
  */
81
- imageSrc: string;
80
+ imageSrc: _angular_core.InputSignal<string>;
82
81
  /**
83
82
  * @property {string} illustrationAlt
84
83
  * Descriptive alternative text for the image. Improves accessibility.
85
84
  */
86
- illustrationAlt: string;
85
+ illustrationAlt: _angular_core.InputSignal<string>;
87
86
  /**
88
87
  * @property {string} title
89
88
  * @description
@@ -91,7 +90,7 @@ declare class FallbackViewComponent {
91
90
  *
92
91
  * @default `''`
93
92
  */
94
- title: string;
93
+ title: _angular_core.InputSignal<string>;
95
94
  /**
96
95
  * @property {string} message
97
96
  * @description
@@ -99,7 +98,7 @@ declare class FallbackViewComponent {
99
98
  *
100
99
  * @default `''`
101
100
  */
102
- message: string;
101
+ message: _angular_core.InputSignal<string>;
103
102
  /**
104
103
  * @property {string} buttonLabel
105
104
  * @description
@@ -107,7 +106,7 @@ declare class FallbackViewComponent {
107
106
  *
108
107
  * @default `''`
109
108
  */
110
- buttonLabel: string;
109
+ buttonLabel: _angular_core.InputSignal<string>;
111
110
  /**
112
111
  * @property {string} linkLabel
113
112
  * @description
@@ -116,7 +115,7 @@ declare class FallbackViewComponent {
116
115
  *
117
116
  * @default `''`
118
117
  */
119
- linkLabel: string;
118
+ linkLabel: _angular_core.InputSignal<string>;
120
119
  /**
121
120
  * @property {boolean} buttonDisabled
122
121
  * @description
@@ -125,25 +124,25 @@ declare class FallbackViewComponent {
125
124
  *
126
125
  * @default false
127
126
  */
128
- buttonDisabled: boolean;
127
+ buttonDisabled: _angular_core.InputSignal<boolean>;
129
128
  /**
130
129
  * @event buttonAction
131
130
  * @description
132
131
  * Emits when the main action button is clicked. Listen to this event
133
132
  * to handle the primary call-to-action.
134
133
  */
135
- buttonAction: EventEmitter<void>;
134
+ buttonAction: _angular_core.OutputEmitterRef<void>;
136
135
  /**
137
136
  * @event linkAction
138
137
  * @description
139
138
  * Emits when the link-styled button is clicked. Use for secondary
140
139
  * or alternative actions.
141
140
  */
142
- linkAction: EventEmitter<void>;
141
+ linkAction: _angular_core.OutputEmitterRef<void>;
143
142
  /**
144
- * @method onButtonActionClick
143
+ * @method onButtonActionClick
145
144
  * @description
146
- * Internal handler that emits the `primaryAction` event when the
145
+ * Internal handler that emits the `buttonAction` event when the
147
146
  * main button is clicked.
148
147
  */
149
148
  onButtonActionClick(): void;
@@ -154,8 +153,8 @@ declare class FallbackViewComponent {
154
153
  * link button is clicked.
155
154
  */
156
155
  onLinkActionClick(): void;
157
- static ɵfac: i0.ɵɵFactoryDeclaration<FallbackViewComponent, never>;
158
- static ɵcmp: i0.ɵɵComponentDeclaration<FallbackViewComponent, "tk-fallback-view", never, { "type": { "alias": "type"; "required": false; }; "imageSrc": { "alias": "imageSrc"; "required": false; }; "illustrationAlt": { "alias": "illustrationAlt"; "required": false; }; "title": { "alias": "title"; "required": false; }; "message": { "alias": "message"; "required": false; }; "buttonLabel": { "alias": "buttonLabel"; "required": false; }; "linkLabel": { "alias": "linkLabel"; "required": false; }; "buttonDisabled": { "alias": "buttonDisabled"; "required": false; }; }, { "buttonAction": "buttonAction"; "linkAction": "linkAction"; }, never, ["[image]", "[title]", "[message]", "[actions]"], true, never>;
156
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<FallbackViewComponent, never>;
157
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<FallbackViewComponent, "tk-fallback-view", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "imageSrc": { "alias": "imageSrc"; "required": false; "isSignal": true; }; "illustrationAlt": { "alias": "illustrationAlt"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "buttonLabel": { "alias": "buttonLabel"; "required": false; "isSignal": true; }; "linkLabel": { "alias": "linkLabel"; "required": false; "isSignal": true; }; "buttonDisabled": { "alias": "buttonDisabled"; "required": false; "isSignal": true; }; }, { "buttonAction": "buttonAction"; "linkAction": "linkAction"; }, never, ["[image]", "[title]", "[message]", "[actions]"], true, never>;
159
158
  }
160
159
 
161
160
  export { FallbackViewComponent };
@@ -1,5 +1,4 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { OnDestroy, EffectRef } from '@angular/core';
3
2
  import { SafeHtml, DomSanitizer } from '@angular/platform-browser';
4
3
  import { SizeProp, IconProp } from '@fortawesome/fontawesome-svg-core';
5
4
 
@@ -30,31 +29,31 @@ type IconStylesGeneral = IconStylesLight | IconStylesSolid | IconStylesRegular |
30
29
  type IconColors = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | null;
31
30
 
32
31
  type SizeMap = SizeProp | 'md';
33
- declare class IconComponent implements OnDestroy {
32
+ declare class IconComponent {
34
33
  /**
35
34
  * The name of the icon to display.
36
35
  * This is a required field.
37
36
  * It should match one of the icons in the *IconCatalog*.
38
37
  */
39
- icon: _angular_core.ModelSignal<string>;
38
+ icon: _angular_core.InputSignal<string>;
40
39
  /**
41
40
  * The style of the icon to display.
42
41
  * This is an optional field.
43
42
  * It defaults to 'regular'.
44
43
  */
45
- styleIcon: _angular_core.ModelSignal<IconStylesGeneral>;
44
+ styleIcon: _angular_core.InputSignal<IconStylesGeneral>;
46
45
  /**
47
46
  * The color of the icon to display.
48
47
  */
49
- color: _angular_core.ModelSignal<IconColors | undefined>;
48
+ color: _angular_core.InputSignal<IconColors | undefined>;
50
49
  /**
51
50
  * The size of the icon to display.
52
51
  */
53
- size: _angular_core.ModelSignal<SizeMap | undefined>;
52
+ size: _angular_core.InputSignal<SizeMap | undefined>;
54
53
  /**
55
54
  * Whether the icon is disabled.
56
55
  */
57
- disabled: _angular_core.ModelSignal<boolean>;
56
+ disabled: _angular_core.InputSignal<boolean>;
58
57
  /**
59
58
  * The definition of the icon to display for Font Awesome.
60
59
  */
@@ -71,15 +70,7 @@ declare class IconComponent implements OnDestroy {
71
70
  * The size property to use for the icon.
72
71
  */
73
72
  sizeProp: _angular_core.Signal<SizeProp | null>;
74
- /**
75
- * The effect reference for the icon.
76
- */
77
- iconEffect: EffectRef;
78
73
  constructor();
79
- /**
80
- * Destroy icon effect
81
- */
82
- ngOnDestroy(): void;
83
74
  /**
84
75
  * Gets the icon to display.
85
76
  */
@@ -101,7 +92,7 @@ declare class IconComponent implements OnDestroy {
101
92
  */
102
93
  loadIconCustom(): void;
103
94
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<IconComponent, never>;
104
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<IconComponent, "tk-icon", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "styleIcon": { "alias": "styleIcon"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "icon": "iconChange"; "styleIcon": "styleIconChange"; "color": "colorChange"; "size": "sizeChange"; "disabled": "disabledChange"; }, never, never, true, never>;
95
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<IconComponent, "tk-icon", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "styleIcon": { "alias": "styleIcon"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
105
96
  }
106
97
 
107
98
  export { IconComponent };
@@ -1,9 +1,10 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { OnInit, OnDestroy } from '@angular/core';
2
+ import { OnInit } from '@angular/core';
3
3
  import { ControlValueAccessor, NgControl, FormControl } from '@angular/forms';
4
4
 
5
- declare class InputNumberComponent implements ControlValueAccessor, OnInit, OnDestroy {
5
+ declare class InputNumberComponent implements ControlValueAccessor, OnInit {
6
6
  readonly ngControl: NgControl | null;
7
+ private readonly destroyRef;
7
8
  constructor();
8
9
  /**
9
10
  * @property {ModelSignal<number | null>} value
@@ -54,9 +55,7 @@ declare class InputNumberComponent implements ControlValueAccessor, OnInit, OnDe
54
55
  onChange: (value: number | null) => void;
55
56
  onTouched: () => void;
56
57
  private isWriting;
57
- private readonly subscription;
58
58
  ngOnInit(): void;
59
- ngOnDestroy(): void;
60
59
  /**
61
60
  * @method writeValue
62
61
  * @description
@@ -1,10 +1,11 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { OnInit, OnDestroy } from '@angular/core';
2
+ import { OnInit } from '@angular/core';
3
3
  import { ControlValueAccessor, NgControl, FormControl } from '@angular/forms';
4
4
 
5
- declare class InputTextComponent implements ControlValueAccessor, OnInit, OnDestroy {
5
+ declare class InputTextComponent implements ControlValueAccessor, OnInit {
6
6
  readonly ngControl: NgControl | null;
7
- constructor();
7
+ private readonly destroyRef;
8
+ private readonly init;
8
9
  /**
9
10
  * @property {ModelSignal<string>} value
10
11
  * @description
@@ -57,11 +58,6 @@ declare class InputTextComponent implements ControlValueAccessor, OnInit, OnDest
57
58
  * Message to display when the control is invalid and touched.
58
59
  */
59
60
  errorMessage: _angular_core.InputSignal<string>;
60
- /**
61
- * @property {InputSignal<string>} hint
62
- * @description
63
- * Hint text to display below the input.
64
- */
65
61
  /**
66
62
  * @property {InputSignal<string>} hint
67
63
  * @description
@@ -85,9 +81,7 @@ declare class InputTextComponent implements ControlValueAccessor, OnInit, OnDest
85
81
  onChange: (value: string) => void;
86
82
  onTouched: () => void;
87
83
  private isWriting;
88
- private readonly subscription;
89
84
  ngOnInit(): void;
90
- ngOnDestroy(): void;
91
85
  /**
92
86
  * @method writeValue
93
87
  * @description
@@ -1,8 +1,7 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { Type, OnDestroy, EventEmitter, ComponentRef } from '@angular/core';
2
+ import { Type, OnDestroy, ComponentRef } from '@angular/core';
3
3
  import { Variant } from '@tekus/design-system/components/button';
4
- import { TkCloseInterceptor } from '@tekus/design-system/core/types';
5
- import { Observable } from 'rxjs';
4
+ import { TkCloseInterceptor, TkDialogRef } from '@tekus/design-system/core/types';
6
5
 
7
6
  type ModalSizeType = 'small' | 'large' | 'medium' | 'full';
8
7
  type SeverityType = 'primary' | 'secondary' | 'danger';
@@ -49,8 +48,11 @@ interface ModalConfig<T = unknown> {
49
48
  */
50
49
  declare class ModalComponent<T = unknown> implements OnDestroy {
51
50
  private readonly elementRef;
51
+ private readonly injector;
52
52
  private readonly contentHost;
53
53
  private componentRef?;
54
+ /** The dialog ref associated with this modal */
55
+ dialogRef: _angular_core.InputSignal<TkDialogRef<ModalComponent<T>, unknown> | null>;
54
56
  /** The title displayed at the top of the modal */
55
57
  title: _angular_core.InputSignal<string>;
56
58
  /** The main content of the modal. Can be a string or a Component Type. */
@@ -83,7 +85,7 @@ declare class ModalComponent<T = unknown> implements OnDestroy {
83
85
  /** Whether the modal content has a scrollbar */
84
86
  hasScroll: boolean;
85
87
  /** Emits when the modal closes, passing the return value from footer buttons or null */
86
- readonly onClose: EventEmitter<unknown>;
88
+ readonly closed: _angular_core.OutputEmitterRef<unknown>;
87
89
  private alreadyEmitted;
88
90
  private returnValueOnClose;
89
91
  constructor();
@@ -109,6 +111,7 @@ declare class ModalComponent<T = unknown> implements OnDestroy {
109
111
  * Checks if the modal content has a scrollbar and updates `hasScroll` state.
110
112
  */
111
113
  checkScroll(): void;
114
+ private wasOpened;
112
115
  /**
113
116
  * Opens the modal dialog.
114
117
  */
@@ -153,7 +156,7 @@ declare class ModalComponent<T = unknown> implements OnDestroy {
153
156
  */
154
157
  private resetClosureState;
155
158
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalComponent<any>, never>;
156
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ModalComponent<any>, "tk-modal", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; "footerButtons": { "alias": "footerButtons"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "closeOnOutsideClick": { "alias": "closeOnOutsideClick"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "interceptor": { "alias": "interceptor"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "isOpened": { "alias": "isOpened"; "required": false; "isSignal": true; }; }, { "isOpened": "isOpenedChange"; }, never, never, true, never>;
159
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ModalComponent<any>, "tk-modal", never, { "dialogRef": { "alias": "dialogRef"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; "footerButtons": { "alias": "footerButtons"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "closeOnOutsideClick": { "alias": "closeOnOutsideClick"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "interceptor": { "alias": "interceptor"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "isOpened": { "alias": "isOpened"; "required": false; "isSignal": true; }; }, { "isOpened": "isOpenedChange"; "closed": "closed"; }, never, never, true, never>;
157
160
  }
158
161
 
159
162
  /**
@@ -163,21 +166,20 @@ declare class ModalComponent<T = unknown> implements OnDestroy {
163
166
  * It handles component creation, attachment to the document body, and cleanup.
164
167
  */
165
168
  declare class ModalService {
166
- private readonly injector;
167
169
  private readonly appRef;
168
- /** Reference to the currently open modal component */
169
- private modalRef;
170
+ /** Reference to the currently open modal dialog ref */
171
+ private dialogRef;
170
172
  /** Internal getter for testing purposes */
171
- get _modalRefForTesting(): ComponentRef<ModalComponent> | null;
173
+ get modalRefForTesting(): ComponentRef<ModalComponent> | null;
172
174
  /** Internal setter for testing purposes */
173
- set _modalRefForTesting(ref: ComponentRef<ModalComponent> | null);
175
+ set modalRefForTesting(ref: ComponentRef<ModalComponent> | null);
174
176
  /**
175
177
  * Opens a modal dialog with the provided configuration.
176
178
  * Only one modal can be open at a time.
177
179
  * @param config Configuration object for the modal (title, content, buttons, etc.)
178
- * @returns An observable that emits the modal's return value when it closes.
180
+ * @returns A TkDialogRef for the opened modal.
179
181
  */
180
- open(config: ModalConfig): Observable<unknown>;
182
+ open<T = unknown, R = unknown>(config: ModalConfig): TkDialogRef<ModalComponent<T>, R>;
181
183
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalService, never>;
182
184
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<ModalService>;
183
185
  }
@@ -1,5 +1,4 @@
1
- import * as i0 from '@angular/core';
2
- import { EventEmitter } from '@angular/core';
1
+ import * as _angular_core from '@angular/core';
3
2
 
4
3
  /**
5
4
  * @component PanelComponent
@@ -15,7 +14,7 @@ import { EventEmitter } from '@angular/core';
15
14
  * <tk-panel
16
15
  * header="Panel Title"
17
16
  * [toggleable]="true"
18
- * [collapsed]="false">
17
+ * [(collapsed)]="isCollapsed">
19
18
  * <p>Panel content goes here</p>
20
19
  * </tk-panel>
21
20
  * ```
@@ -28,7 +27,7 @@ declare class PanelComponent {
28
27
  *
29
28
  * @default undefined
30
29
  */
31
- header?: string;
30
+ header: _angular_core.InputSignal<string | undefined>;
32
31
  /**
33
32
  * @property {boolean} toggleable
34
33
  * @description
@@ -36,23 +35,16 @@ declare class PanelComponent {
36
35
  *
37
36
  * @default false
38
37
  */
39
- toggleable: boolean;
38
+ toggleable: _angular_core.InputSignal<boolean>;
40
39
  /**
41
- * @property {boolean} collapsed
40
+ * @property {ModelSignal<boolean>} collapsed
42
41
  * @description
43
42
  * Defines whether the panel is collapsed or expanded.
44
- * Supports two-way binding.
43
+ * Supports two-way binding via [(collapsed)].
45
44
  *
46
45
  * @default false
47
46
  */
48
- collapsed: boolean;
49
- /**
50
- * @event collapsedChange
51
- * @description
52
- * Emits when the collapsed state changes.
53
- * Enables two-way binding with [(collapsed)].
54
- */
55
- collapsedChange: EventEmitter<boolean>;
47
+ collapsed: _angular_core.ModelSignal<boolean>;
56
48
  /**
57
49
  * @event toggled
58
50
  * @description
@@ -64,7 +56,7 @@ declare class PanelComponent {
64
56
  * <tk-panel (toggled)="handleToggle($event)"></tk-panel>
65
57
  * ```
66
58
  */
67
- toggled: EventEmitter<{
59
+ toggled: _angular_core.OutputEmitterRef<{
68
60
  collapsed: boolean;
69
61
  }>;
70
62
  /**
@@ -78,8 +70,8 @@ declare class PanelComponent {
78
70
  handleToggle(event: {
79
71
  collapsed: boolean | undefined;
80
72
  }): void;
81
- static ɵfac: i0.ɵɵFactoryDeclaration<PanelComponent, never>;
82
- static ɵcmp: i0.ɵɵComponentDeclaration<PanelComponent, "tk-panel", never, { "header": { "alias": "header"; "required": false; }; "toggleable": { "alias": "toggleable"; "required": false; }; "collapsed": { "alias": "collapsed"; "required": false; }; }, { "collapsedChange": "collapsedChange"; "toggled": "toggled"; }, never, ["*"], true, never>;
73
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PanelComponent, never>;
74
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PanelComponent, "tk-panel", never, { "header": { "alias": "header"; "required": false; "isSignal": true; }; "toggleable": { "alias": "toggleable"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; "toggled": "toggled"; }, never, ["*"], true, never>;
83
75
  }
84
76
 
85
77
  export { PanelComponent };
@@ -1,9 +1,10 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { OnInit, OnDestroy } from '@angular/core';
2
+ import { OnInit } from '@angular/core';
3
3
  import { ControlValueAccessor, NgControl, FormControl } from '@angular/forms';
4
4
 
5
- declare class RadioButtonComponent implements ControlValueAccessor, OnInit, OnDestroy {
5
+ declare class RadioButtonComponent implements ControlValueAccessor, OnInit {
6
6
  readonly ngControl: NgControl | null;
7
+ private readonly destroyRef;
7
8
  /**
8
9
  * Initialize the component and register it as a ControlValueAccessor.
9
10
  */
@@ -64,15 +65,10 @@ declare class RadioButtonComponent implements ControlValueAccessor, OnInit, OnDe
64
65
  get effectiveControl(): FormControl;
65
66
  onChange: (value: unknown) => void;
66
67
  onTouched: () => void;
67
- private readonly subscription;
68
68
  /**
69
69
  * Configure synchronization between the form control and component state.
70
70
  */
71
71
  ngOnInit(): void;
72
- /**
73
- * Clean up subscriptions.
74
- */
75
- ngOnDestroy(): void;
76
72
  /**
77
73
  * Implementation of ControlValueAccessor: Writes a new value from the form.
78
74
  */
@@ -94,7 +94,20 @@ declare class SelectComponent<T = unknown> implements ControlValueAccessor {
94
94
  modelChange: _angular_core.OutputEmitterRef<T | null>;
95
95
  private onChangeFn;
96
96
  private onTouchedFn;
97
- constructor();
97
+ private readonly init;
98
+ /**
99
+ * @effect disabled → internalDisabled
100
+ * @description
101
+ * Synchronizes the disabled input signal with the internal disabled state.
102
+ */
103
+ private readonly syncDisabled;
104
+ /**
105
+ * @effect model → internal value
106
+ * @description
107
+ * Synchronizes changes coming from the Signal `model()` back into the internal value.
108
+ * Ensures consistency between Angular Forms, PrimeNG UI events, and Signals.
109
+ */
110
+ private readonly syncModel;
98
111
  /**
99
112
  * @method writeValue
100
113
  * @description
@@ -34,12 +34,12 @@ declare class TableComponent<T = unknown> {
34
34
  */
35
35
  data: _angular_core.InputSignal<T[]>;
36
36
  /**
37
- * @property {ViewChild} tableRef
37
+ * @property {viewChild} tableRef
38
38
  * @description
39
39
  * Reference to the PrimeNG Table component instance.
40
40
  * Used to access table methods and properties directly.
41
41
  */
42
- tableRef: Table;
42
+ readonly tableRef: _angular_core.Signal<Table<any> | undefined>;
43
43
  /**
44
44
  * @property {InputSignal<TableColumn<T>[]>} columns
45
45
  * @description
@@ -74,9 +74,9 @@ declare class TableComponent<T = unknown> {
74
74
  * Property name to uniquely identify a row.
75
75
  */
76
76
  dataKey: _angular_core.InputSignal<string | undefined>;
77
- initialData: T[];
78
- internalData: T[];
79
- isSorted: boolean | null;
77
+ readonly initialData: _angular_core.WritableSignal<T[]>;
78
+ readonly internalData: _angular_core.WritableSignal<T[]>;
79
+ readonly isSorted: _angular_core.WritableSignal<boolean | null>;
80
80
  /**
81
81
  * @computed isAllSelected
82
82
  * @description
@@ -1,9 +1,10 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { OnInit, OnDestroy } from '@angular/core';
2
+ import { OnInit } from '@angular/core';
3
3
  import { ControlValueAccessor, FormControl } from '@angular/forms';
4
4
 
5
- declare class TextareaComponent implements ControlValueAccessor, OnInit, OnDestroy {
5
+ declare class TextareaComponent implements ControlValueAccessor, OnInit {
6
6
  private readonly ngControl;
7
+ private readonly destroyRef;
7
8
  constructor();
8
9
  /**
9
10
  * @property {ModelSignal<string>} value
@@ -73,9 +74,7 @@ declare class TextareaComponent implements ControlValueAccessor, OnInit, OnDestr
73
74
  private propagateChange;
74
75
  private propagateTouched;
75
76
  private syncingFromView;
76
- private readonly subscriptions;
77
77
  ngOnInit(): void;
78
- ngOnDestroy(): void;
79
78
  /**
80
79
  * @method writeValue
81
80
  * @description
@@ -1,6 +1,8 @@
1
1
  import { ValidatorFn } from '@angular/forms';
2
2
  import * as _angular_core from '@angular/core';
3
+ import { ComponentRef } from '@angular/core';
3
4
  import { Preset } from '@primeuix/themes/types';
5
+ import { PartialObserver, Subscription } from 'rxjs';
4
6
 
5
7
  interface Option {
6
8
  ViewValue: string;
@@ -178,5 +180,47 @@ interface TkCanClose {
178
180
  */
179
181
  type TkCloseInterceptor = () => boolean;
180
182
 
181
- export { Breakpoints, GapGutter, Gutter, PaddingGridContainer, TkPreset, provideTkTheme };
183
+ /**
184
+ * Reference to a dialog/drawer opened via a service.
185
+ * Supports both Observable-style subscription and Signal-based state.
186
+ */
187
+ declare class TkDialogRef<T, R = unknown> {
188
+ readonly componentRef: ComponentRef<T>;
189
+ private readonly closedSubject;
190
+ private readonly resultSignal;
191
+ private readonly isClosedSignal;
192
+ /**
193
+ * Signal that holds the result of the dialog after it closes.
194
+ */
195
+ readonly result: _angular_core.Signal<R | undefined>;
196
+ /**
197
+ * Signal that indicates if the dialog has been closed.
198
+ */
199
+ readonly isClosed: _angular_core.Signal<boolean>;
200
+ constructor(componentRef: ComponentRef<T>);
201
+ /**
202
+ * The instance of the component opened in the dialog.
203
+ */
204
+ get componentInstance(): T;
205
+ /**
206
+ * Closes the dialog, optionally passing a result back.
207
+ * Internal implementation calls the component's tryClose to respect guards.
208
+ */
209
+ close(result?: R): void;
210
+ /**
211
+ * Subscribes to the closure event.
212
+ * This maintains compatibility with existing service.open(...).subscribe() patterns
213
+ * using the modern RxJS signature.
214
+ */
215
+ subscribe(nextOrObserver?: ((value: R | undefined) => void) | PartialObserver<R | undefined>): Subscription;
216
+ /**
217
+ * Internal method to emit the result and update reactive state.
218
+ * Not intended for public use outside the opening service.
219
+ */
220
+ emitClose(result?: R): void;
221
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TkDialogRef<any, any>, never>;
222
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<TkDialogRef<any, any>>;
223
+ }
224
+
225
+ export { Breakpoints, GapGutter, Gutter, PaddingGridContainer, TkDialogRef, TkPreset, provideTkTheme };
182
226
  export type { AutoFillGridProps, ColumnRowSize, ComposeMinMax, ComposeSize, ContainerType, DropdownListItem, FixedGridProps, FontCSSProperties, GridColumns, GutterType, IllustrationConfig, Option, ThemeLogo, TkCanClose, TkCloseInterceptor, TypographyStyles, ValidatorWithMessage, VariantLogo };