@indigina/ui-kit 1.1.108 → 1.1.110

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class KitDialogComponent {
3
3
  static ɵfac: i0.ɵɵFactoryDeclaration<KitDialogComponent, never>;
4
- static ɵcmp: i0.ɵɵComponentDeclaration<KitDialogComponent, "kit-dialog", never, {}, {}, never, never, false, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<KitDialogComponent, "kit-dialog", never, {}, {}, never, never, true, never>;
5
5
  }
@@ -1,17 +1,13 @@
1
- import { EventEmitter, Type } from '@angular/core';
2
- import { DialogRef, DialogService } from '@progress/kendo-angular-dialog';
1
+ import { DialogRef, DialogService, DialogSettings } from '@progress/kendo-angular-dialog';
3
2
  import * as i0 from "@angular/core";
4
- export interface KitDialog<C> {
5
- title: string;
6
- component: Type<C>;
7
- }
8
3
  export declare class KitDialogService {
9
- private dialogService;
10
- opened: EventEmitter<DialogRef>;
11
- closed: EventEmitter<DialogRef>;
12
- dialogRef: DialogRef | null;
4
+ private readonly dialogService;
5
+ private readonly _dialogRef;
6
+ get isDialogOpen(): boolean;
7
+ get dialogInstance(): DialogRef['content']['instance'] | null;
8
+ get dialogRef(): DialogRef | null;
13
9
  constructor(dialogService: DialogService);
14
- openDialog<C>(dialog: KitDialog<C>): void;
10
+ openDialog(settings: DialogSettings): void;
15
11
  closeDialog(): void;
16
12
  static ɵfac: i0.ɵɵFactoryDeclaration<KitDialogService, never>;
17
13
  static ɵprov: i0.ɵɵInjectableDeclaration<KitDialogService>;
@@ -1,5 +1,5 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class KitDialogActionsComponent {
3
3
  static ɵfac: i0.ɵɵFactoryDeclaration<KitDialogActionsComponent, never>;
4
- static ɵcmp: i0.ɵɵComponentDeclaration<KitDialogActionsComponent, "kit-dialog-actions", never, {}, {}, never, ["*"], false, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<KitDialogActionsComponent, "kit-dialog-actions", never, {}, {}, never, ["*"], true, never>;
5
5
  }
@@ -1,43 +1,40 @@
1
- import { ElementRef, EventEmitter, OnInit, WritableSignal } from '@angular/core';
2
- import { KitPopupAlign, KitPopupAlignHorizontal, KitPopupPositionMode } from './kit-popup.model';
1
+ import { ElementRef, InputSignal, OutputEmitterRef, TemplateRef } from '@angular/core';
2
+ import { PopupSettings, PopupService } from '@progress/kendo-angular-popup';
3
3
  import { KitButtonKind, KitButtonType } from '../kit-button/kit-button.const';
4
+ import { KitPopupPositionMode } from './kit-popup.model';
4
5
  import * as i0 from "@angular/core";
5
- export declare class KitPopupComponent implements OnInit {
6
- private elementRef;
7
- /**
8
- * Specifies the element that will be used as an anchor. The Popup opens next to that element
9
- */
10
- anchor?: ElementRef | HTMLElement | null;
11
- /**
12
- * Defines whether to close popup when the user clicks outside its boundaries
13
- */
14
- closeOnOutsideClick: boolean;
15
- /**
16
- * Defines the horizontal position of the anchor element
17
- */
18
- anchorHorizontalAlign: KitPopupAlignHorizontal;
19
- /**
20
- * Defines the horizontal position of the popup
21
- */
22
- popupHorizontalAlign: KitPopupAlignHorizontal;
23
- showFooter: boolean;
24
- cancelButtonLabel: string;
25
- applyButtonLabel: string;
26
- isApplyButtonDisabled: boolean;
27
- positionMode: KitPopupPositionMode;
28
- cancel: EventEmitter<void>;
29
- apply: EventEmitter<void>;
30
- readonly visible: WritableSignal<boolean>;
31
- readonly anchorAlign: KitPopupAlign;
32
- readonly popupAlign: KitPopupAlign;
6
+ export declare class KitPopupComponent {
7
+ private readonly popupService;
8
+ popupTemplate: TemplateRef<unknown>;
9
+ readonly anchor: InputSignal<ElementRef | HTMLElement>;
10
+ readonly content: InputSignal<TemplateRef<unknown>>;
11
+ readonly closeOnOutsideClick: InputSignal<boolean>;
12
+ readonly showFooter: InputSignal<boolean>;
13
+ readonly cancelButtonLabel: InputSignal<string>;
14
+ readonly applyButtonLabel: InputSignal<string>;
15
+ readonly isApplyButtonDisabled: InputSignal<boolean>;
16
+ readonly positionMode: InputSignal<KitPopupPositionMode>;
17
+ readonly popupClass: InputSignal<string>;
18
+ readonly closePopupOnCancel: InputSignal<boolean>;
19
+ readonly onCancel: OutputEmitterRef<void>;
20
+ readonly onApply: OutputEmitterRef<void>;
21
+ readonly onOpen: OutputEmitterRef<void>;
22
+ readonly onClose: OutputEmitterRef<void>;
33
23
  readonly kitButtonKind: typeof KitButtonKind;
34
24
  readonly kitButtonType: typeof KitButtonType;
35
- constructor(elementRef: ElementRef);
25
+ private popupRef;
26
+ private readonly destroy$;
27
+ get popupHTMLElement(): HTMLElement | null;
28
+ get isPopupOpen(): boolean;
29
+ get anchorElement(): HTMLElement;
30
+ constructor(popupService: PopupService);
36
31
  documentClick(event: Event): void;
37
32
  ngOnInit(): void;
38
- get anchorElement(): HTMLElement;
39
- toggle(): void;
40
- hide(): void;
33
+ ngOnDestroy(): void;
34
+ toggle(options?: PopupSettings): void;
35
+ close(): void;
36
+ cancel(): void;
37
+ apply(): void;
41
38
  static ɵfac: i0.ɵɵFactoryDeclaration<KitPopupComponent, never>;
42
- static ɵcmp: i0.ɵɵComponentDeclaration<KitPopupComponent, "kit-popup", never, { "anchor": { "alias": "anchor"; "required": false; }; "closeOnOutsideClick": { "alias": "closeOnOutsideClick"; "required": false; }; "anchorHorizontalAlign": { "alias": "anchorHorizontalAlign"; "required": false; }; "popupHorizontalAlign": { "alias": "popupHorizontalAlign"; "required": false; }; "showFooter": { "alias": "showFooter"; "required": false; }; "cancelButtonLabel": { "alias": "cancelButtonLabel"; "required": false; }; "applyButtonLabel": { "alias": "applyButtonLabel"; "required": false; }; "isApplyButtonDisabled": { "alias": "isApplyButtonDisabled"; "required": false; }; "positionMode": { "alias": "positionMode"; "required": false; }; }, { "cancel": "cancel"; "apply": "apply"; }, never, ["*"], true, never>;
39
+ static ɵcmp: i0.ɵɵComponentDeclaration<KitPopupComponent, "kit-popup", never, { "anchor": { "alias": "anchor"; "required": true; "isSignal": true; }; "content": { "alias": "content"; "required": true; "isSignal": true; }; "closeOnOutsideClick": { "alias": "closeOnOutsideClick"; "required": false; "isSignal": true; }; "showFooter": { "alias": "showFooter"; "required": false; "isSignal": true; }; "cancelButtonLabel": { "alias": "cancelButtonLabel"; "required": false; "isSignal": true; }; "applyButtonLabel": { "alias": "applyButtonLabel"; "required": false; "isSignal": true; }; "isApplyButtonDisabled": { "alias": "isApplyButtonDisabled"; "required": false; "isSignal": true; }; "positionMode": { "alias": "positionMode"; "required": false; "isSignal": true; }; "popupClass": { "alias": "popupClass"; "required": false; "isSignal": true; }; "closePopupOnCancel": { "alias": "closePopupOnCancel"; "required": false; "isSignal": true; }; }, { "onCancel": "onCancel"; "onApply": "onApply"; "onOpen": "onOpen"; "onClose": "onClose"; }, never, never, true, never>;
43
40
  }
@@ -21,12 +21,13 @@ export declare class KitProfileMenuComponent {
21
21
  * Defines the image source of the avatar
22
22
  */
23
23
  avatarImageSrc?: string;
24
- userMenu: KitPopupComponent;
24
+ popup: KitPopupComponent;
25
25
  readonly KitAvatarSize: typeof KitAvatarSize;
26
26
  readonly KitSvgIcon: typeof KitSvgIcon;
27
27
  readonly KitPopupAlignHorizontal: typeof KitPopupAlignHorizontal;
28
28
  readonly KitSvgIconType: typeof KitSvgIconType;
29
29
  onClick(item: KitProfileMenuItem): void;
30
+ toggle(): void;
30
31
  static ɵfac: i0.ɵɵFactoryDeclaration<KitProfileMenuComponent, never>;
31
32
  static ɵcmp: i0.ɵɵComponentDeclaration<KitProfileMenuComponent, "kit-profile-menu", never, { "menuItems": { "alias": "menuItems"; "required": false; }; "userName": { "alias": "userName"; "required": false; }; "companyName": { "alias": "companyName"; "required": false; }; "avatarImageSrc": { "alias": "avatarImageSrc"; "required": false; }; }, {}, never, never, true, never>;
32
33
  }
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "components",
8
8
  "shared"
9
9
  ],
10
- "version": "1.1.108",
10
+ "version": "1.1.110",
11
11
  "peerDependencies": {
12
12
  "@angular/common": "^19.1.4",
13
13
  "@angular/core": "^19.1.4"
package/public-api.d.ts CHANGED
@@ -77,10 +77,9 @@ export { KitNavigationTabsModule } from './lib/components/kit-navigation-tabs/ki
77
77
  export { KitNavigationTabsItem, KitNavigationTabsItemLink } from './lib/components/kit-navigation-tabs/kit-navigation-tabs.model';
78
78
  export { KitNavigationTabsType } from './lib/components/kit-navigation-tabs/kit-navigation-tabs.const';
79
79
  export { KitDialogComponent } from './lib/components/kit-dialog/kit-dialog.component';
80
- export { KitDialogModule } from './lib/components/kit-dialog/kit-dialog.module';
81
- export { KitDialog, KitDialogService } from './lib/components/kit-dialog/kit-dialog.service';
80
+ export { KitDialogService } from './lib/components/kit-dialog/kit-dialog.service';
82
81
  export { KitDialogActionsComponent } from './lib/components/kit-dialog-actions/kit-dialog-actions.component';
83
- export { KitDialogActionsModule } from './lib/components/kit-dialog-actions/kit-dialog-actions.module';
82
+ export { DialogRef, DialogContentBase, DialogAction, DialogCloseResult, DialogResult } from '@progress/kendo-angular-dialog';
84
83
  export { KitTimepickerComponent } from './lib/components/kit-timepicker/kit-timepicker.component';
85
84
  export { KitTimepickerModule } from './lib/components/kit-timepicker/kit-timepicker.module';
86
85
  export { KitSkeletonComponent, KitSkeletonShape, KitSkeletonAnimation } from './lib/components/kit-skeleton/kit-skeleton.component';
@@ -0,0 +1,255 @@
1
+ @mixin setIconColor($color) {
2
+ &.fill {
3
+ fill: $color;
4
+ stroke: none;
5
+ }
6
+
7
+ &.stroke {
8
+ stroke: $color;
9
+ fill: none;
10
+ }
11
+ }
12
+
13
+ @mixin styles {
14
+ .k-button-text {
15
+ display: flex;
16
+ align-items: center;
17
+ gap: 8px;
18
+ }
19
+
20
+ .kit-button-icon {
21
+ display: block;
22
+ }
23
+
24
+ .k-button {
25
+ font-weight: 400;
26
+ border: 1px solid transparent;
27
+ transition: none;
28
+
29
+ &:focus {
30
+ box-shadow: none;
31
+ }
32
+
33
+ &:disabled {
34
+ color: var(--ui-kit-color-grey-12);
35
+ border: 1px solid var(--ui-kit-color-grey-11);
36
+ background: var(--ui-kit-color-grey-13);
37
+
38
+ .kit-button-icon {
39
+ @include setIconColor(var(--ui-kit-color-grey-12));
40
+ }
41
+ }
42
+ }
43
+
44
+ .primary {
45
+ color: var(--ui-kit-color-white);
46
+ background: var(--ui-kit-color-main);
47
+
48
+ &:hover {
49
+ background: var(--ui-kit-color-hover);
50
+ }
51
+
52
+ &.active,
53
+ &:active {
54
+ background: var(--ui-kit-color-main);
55
+ }
56
+
57
+ .kit-button-icon {
58
+ @include setIconColor(var(--ui-kit-color-white));
59
+ }
60
+ }
61
+
62
+ .ghost {
63
+ color: var(--ui-kit-color-grey-10);
64
+ border-color: var(--ui-kit-color-grey-11);
65
+ background: var(--ui-kit-color-white);
66
+
67
+ &:hover {
68
+ color: var(--ui-kit-color-hover);
69
+ border-color: var(--ui-kit-color-hover);
70
+
71
+ .kit-button-icon {
72
+ @include setIconColor(var(--ui-kit-color-hover));
73
+ }
74
+ }
75
+
76
+ &.active,
77
+ &:active {
78
+ color: var(--ui-kit-color-main);
79
+ border-color: var(--ui-kit-color-main);
80
+ background: var(--ui-kit-color-background);
81
+
82
+ .kit-button-icon {
83
+ @include setIconColor(var(--ui-kit-color-main));
84
+ }
85
+ }
86
+
87
+ .kit-button-icon {
88
+ @include setIconColor(var(--ui-kit-color-grey-10));
89
+ }
90
+ }
91
+
92
+ .text {
93
+ color: var(--ui-kit-color-grey-10);
94
+ background: none;
95
+
96
+ &:disabled {
97
+ border: none;
98
+ background: none;
99
+ }
100
+
101
+ &:hover,
102
+ &.active,
103
+ &:active {
104
+ background: var(--ui-kit-color-grey-13);
105
+ }
106
+
107
+ &:hover {
108
+ color: var(--ui-kit-color-hover);
109
+
110
+ .kit-button-icon {
111
+ @include setIconColor(var(--ui-kit-color-hover));
112
+ }
113
+ }
114
+
115
+ &.active,
116
+ &:active {
117
+ color: var(--ui-kit-color-main);
118
+
119
+ .kit-button-icon {
120
+ @include setIconColor(var(--ui-kit-color-main));
121
+ }
122
+ }
123
+
124
+ .kit-button-icon {
125
+ @include setIconColor(var(--ui-kit-color-grey-10));
126
+ }
127
+ }
128
+
129
+ .link {
130
+ color: var(--ui-kit-color-main);
131
+ background: none;
132
+
133
+ &:disabled {
134
+ border: none;
135
+ background: none;
136
+ }
137
+
138
+ &:hover {
139
+ color: var(--ui-kit-color-hover);
140
+
141
+ .kit-button-icon {
142
+ @include setIconColor(var(--ui-kit-color-hover));
143
+ }
144
+ }
145
+
146
+ &.active,
147
+ &:active {
148
+ color: var(--ui-kit-color-main);
149
+
150
+ .kit-button-icon {
151
+ @include setIconColor(var(--ui-kit-color-main));
152
+ }
153
+ }
154
+
155
+ .kit-button-icon {
156
+ @include setIconColor(var(--ui-kit-color-main));
157
+ }
158
+ }
159
+
160
+ .dashed {
161
+ color: var(--ui-kit-color-main);
162
+ border-color: var(--ui-kit-color-main);
163
+ border-style: dashed;
164
+ background: var(--ui-kit-color-white);
165
+
166
+ &:disabled {
167
+ border-style: dashed;
168
+ }
169
+
170
+ &:hover {
171
+ color: var(--ui-kit-color-hover);
172
+ border-color: var(--ui-kit-color-hover);
173
+
174
+ .kit-button-icon {
175
+ @include setIconColor(var(--ui-kit-color-hover));
176
+ }
177
+ }
178
+
179
+ &.active,
180
+ &:active {
181
+ color: var(--ui-kit-color-main);
182
+ border-color: var(--ui-kit-color-main);
183
+
184
+ .kit-button-icon {
185
+ @include setIconColor(var(--ui-kit-color-main));
186
+ }
187
+ }
188
+
189
+ .kit-button-icon {
190
+ @include setIconColor(var(--ui-kit-color-main));
191
+ }
192
+ }
193
+
194
+ .large {
195
+ padding: 0 16px;
196
+ height: 40px;
197
+ font-size: 16px;
198
+ border-radius: 8px;
199
+
200
+ .kit-button-icon {
201
+ width: 18px;
202
+ height: 18px;
203
+ }
204
+ }
205
+
206
+ .medium {
207
+ padding: 0 16px;
208
+ height: 32px;
209
+ font-size: 14px;
210
+ border-radius: 6px;
211
+
212
+ .kit-button-icon {
213
+ width: 16px;
214
+ height: 16px;
215
+ }
216
+ }
217
+
218
+ .small {
219
+ padding: 0 8px;
220
+ height: 24px;
221
+ font-size: 14px;
222
+ border-radius: 4px;
223
+
224
+ .kit-button-icon {
225
+ width: 14px;
226
+ height: 14px;
227
+ }
228
+ }
229
+
230
+ .leading {
231
+ .k-button-text {
232
+ flex-direction: row-reverse;
233
+ }
234
+ }
235
+
236
+ .trailing {
237
+ .k-button-text {
238
+ flex-direction: row;
239
+ }
240
+ }
241
+
242
+ .no-label {
243
+ &.large {
244
+ padding: 0 11px;
245
+ }
246
+
247
+ &.medium {
248
+ padding: 0 8px;
249
+ }
250
+
251
+ &.small {
252
+ padding: 0 6px;
253
+ }
254
+ }
255
+ }
@@ -1,9 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./kit-dialog.component";
3
- import * as i2 from "@progress/kendo-angular-dialog";
4
- import * as i3 from "@progress/kendo-angular-buttons";
5
- export declare class KitDialogModule {
6
- static ɵfac: i0.ɵɵFactoryDeclaration<KitDialogModule, never>;
7
- static ɵmod: i0.ɵɵNgModuleDeclaration<KitDialogModule, [typeof i1.KitDialogComponent], [typeof i2.DialogModule, typeof i3.ButtonModule], [typeof i1.KitDialogComponent]>;
8
- static ɵinj: i0.ɵɵInjectorDeclaration<KitDialogModule>;
9
- }
@@ -1,8 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./kit-dialog-actions.component";
3
- import * as i2 from "@progress/kendo-angular-dialog";
4
- export declare class KitDialogActionsModule {
5
- static ɵfac: i0.ɵɵFactoryDeclaration<KitDialogActionsModule, never>;
6
- static ɵmod: i0.ɵɵNgModuleDeclaration<KitDialogActionsModule, [typeof i1.KitDialogActionsComponent], [typeof i2.WindowModule], [typeof i1.KitDialogActionsComponent]>;
7
- static ɵinj: i0.ɵɵInjectorDeclaration<KitDialogActionsModule>;
8
- }