@cute-widgets/base 20.0.3 → 20.0.5

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 (72) hide show
  1. package/CHANGELOG.md +31 -4
  2. package/abstract/index.d.ts +13 -4
  3. package/button/index.d.ts +47 -24
  4. package/button-toggle/index.d.ts +8 -4
  5. package/card/index.d.ts +9 -6
  6. package/collapse/index.d.ts +49 -48
  7. package/core/directives/index.d.ts +1 -31
  8. package/core/index.d.ts +41 -28
  9. package/core/interfaces/index.d.ts +1 -1
  10. package/core/layout/index.d.ts +40 -27
  11. package/core/nav/index.d.ts +1 -2
  12. package/dialog/index.d.ts +81 -57
  13. package/expansion/index.d.ts +5 -18
  14. package/fesm2022/cute-widgets-base-abstract.mjs +13 -8
  15. package/fesm2022/cute-widgets-base-abstract.mjs.map +1 -1
  16. package/fesm2022/cute-widgets-base-button-toggle.mjs +36 -29
  17. package/fesm2022/cute-widgets-base-button-toggle.mjs.map +1 -1
  18. package/fesm2022/cute-widgets-base-button.mjs +169 -104
  19. package/fesm2022/cute-widgets-base-button.mjs.map +1 -1
  20. package/fesm2022/cute-widgets-base-card.mjs +46 -29
  21. package/fesm2022/cute-widgets-base-card.mjs.map +1 -1
  22. package/fesm2022/cute-widgets-base-chips.mjs +6 -18
  23. package/fesm2022/cute-widgets-base-chips.mjs.map +1 -1
  24. package/fesm2022/cute-widgets-base-collapse.mjs +114 -126
  25. package/fesm2022/cute-widgets-base-collapse.mjs.map +1 -1
  26. package/fesm2022/cute-widgets-base-core-directives.mjs +4 -72
  27. package/fesm2022/cute-widgets-base-core-directives.mjs.map +1 -1
  28. package/fesm2022/cute-widgets-base-core-interfaces.mjs.map +1 -1
  29. package/fesm2022/cute-widgets-base-core-layout.mjs +76 -40
  30. package/fesm2022/cute-widgets-base-core-layout.mjs.map +1 -1
  31. package/fesm2022/cute-widgets-base-core-nav.mjs +1 -2
  32. package/fesm2022/cute-widgets-base-core-nav.mjs.map +1 -1
  33. package/fesm2022/cute-widgets-base-core-theming.mjs +1 -1
  34. package/fesm2022/cute-widgets-base-core-theming.mjs.map +1 -1
  35. package/fesm2022/cute-widgets-base-core.mjs +77 -41
  36. package/fesm2022/cute-widgets-base-core.mjs.map +1 -1
  37. package/fesm2022/cute-widgets-base-dialog.mjs +152 -117
  38. package/fesm2022/cute-widgets-base-dialog.mjs.map +1 -1
  39. package/fesm2022/cute-widgets-base-expansion.mjs +19 -13
  40. package/fesm2022/cute-widgets-base-expansion.mjs.map +1 -1
  41. package/fesm2022/cute-widgets-base-list.mjs +2 -2
  42. package/fesm2022/cute-widgets-base-list.mjs.map +1 -1
  43. package/fesm2022/cute-widgets-base-menu.mjs +5 -27
  44. package/fesm2022/cute-widgets-base-menu.mjs.map +1 -1
  45. package/fesm2022/cute-widgets-base-navbar.mjs +88 -42
  46. package/fesm2022/cute-widgets-base-navbar.mjs.map +1 -1
  47. package/fesm2022/cute-widgets-base-paginator.mjs +13 -11
  48. package/fesm2022/cute-widgets-base-paginator.mjs.map +1 -1
  49. package/fesm2022/cute-widgets-base-radio.mjs +1 -2
  50. package/fesm2022/cute-widgets-base-radio.mjs.map +1 -1
  51. package/fesm2022/cute-widgets-base-select.mjs +2 -2
  52. package/fesm2022/cute-widgets-base-select.mjs.map +1 -1
  53. package/fesm2022/cute-widgets-base-sidenav.mjs +31 -30
  54. package/fesm2022/cute-widgets-base-sidenav.mjs.map +1 -1
  55. package/fesm2022/cute-widgets-base-snack-bar.mjs +2 -2
  56. package/fesm2022/cute-widgets-base-snack-bar.mjs.map +1 -1
  57. package/fesm2022/cute-widgets-base-sort.mjs +60 -257
  58. package/fesm2022/cute-widgets-base-sort.mjs.map +1 -1
  59. package/fesm2022/cute-widgets-base-table.mjs +6 -3
  60. package/fesm2022/cute-widgets-base-table.mjs.map +1 -1
  61. package/fesm2022/cute-widgets-base-tabs.mjs +86 -61
  62. package/fesm2022/cute-widgets-base-tabs.mjs.map +1 -1
  63. package/fesm2022/cute-widgets-base.mjs +3 -1
  64. package/fesm2022/cute-widgets-base.mjs.map +1 -1
  65. package/navbar/index.d.ts +30 -9
  66. package/package.json +6 -5
  67. package/paginator/index.d.ts +6 -17
  68. package/radio/index.d.ts +0 -1
  69. package/sidenav/index.d.ts +1 -2
  70. package/sort/index.d.ts +22 -135
  71. package/table/index.d.ts +8 -8
  72. package/tabs/index.d.ts +35 -14
@@ -7,21 +7,28 @@
7
7
  * that can be found at http://www.apache.org/licenses/LICENSE-2.0
8
8
  */
9
9
  /**
10
- * Bootstrap media-queries, or `breakpoints`.
11
- * PascalCase is being used as Breakpoints is used like an enum.
10
+ * Bootstrap media queries, or `breakpoints`.
12
11
  */
13
12
  declare const bsBreakpoints: {
14
- SmallAndDown: string;
15
- MediumAndDown: string;
16
- LargeAndDown: string;
17
- XLargeAndDown: string;
18
- XXLargeAndDown: string;
19
- XSmall: string;
20
- Small: string;
21
- Medium: string;
22
- Large: string;
23
- XLarge: string;
24
- XXLarge: string;
13
+ query: {
14
+ SmallAndDown: string;
15
+ MediumAndDown: string;
16
+ LargeAndDown: string;
17
+ XLargeAndDown: string;
18
+ XXLargeAndDown: string;
19
+ XSmall: string;
20
+ Small: string;
21
+ Medium: string;
22
+ Large: string;
23
+ XLarge: string;
24
+ XXLarge: string;
25
+ readonly xs: string;
26
+ readonly sm: string;
27
+ readonly md: string;
28
+ readonly lg: string;
29
+ readonly xl: string;
30
+ readonly xxl: string;
31
+ };
25
32
  readonly grid: {
26
33
  xs: number;
27
34
  sm: number;
@@ -30,24 +37,30 @@ declare const bsBreakpoints: {
30
37
  xl: number;
31
38
  xxl: number;
32
39
  };
33
- readonly xs: string;
34
- readonly sm: string;
35
- readonly md: string;
36
- readonly lg: string;
37
- readonly xl: string;
38
- readonly xxl: string;
39
- /**
40
- * Gets the object's property name of the media-query by its value
41
- * @param query The media-query text
42
- * @returns The property name of the media-query or _undefined_ if it was not found
43
- */
44
- getQueryName(query: string): string | undefined;
45
40
  /**
46
41
  * Gets the breakpoint label by Bootstrap's breakpoint abbreviation
47
- * @param code Bootstrap's breakpoint abbreviation
48
- * @returns More descriptive text of the abbreviation
42
+ * @param code Bootstrap's breakpoint abbreviation.
43
+ * @returns More descriptive text of the abbreviation.
49
44
  */
50
45
  getLabel(code: string): string;
46
+ /**
47
+ * Returns the media query string for the specified breakpoint symbol.
48
+ * @param code Bootstrap's breakpoint abbreviation.
49
+ * @returns Media query string or _undefined_ if the code has an unknown value.
50
+ */
51
+ getMediaQuery(code: string): string | undefined;
52
+ /**
53
+ * Returns the media query string array for the specified breakpoint one or more symbols.
54
+ * @param codes Bootstrap's breakpoint abbreviation list.
55
+ * @returns Media query string array for each specified code of breakpoint.
56
+ */
57
+ getMediaQueries(codes: string | string[]): string[];
58
+ /**
59
+ * Gets the name of the media-query by its value.
60
+ * @param query The media-query text.
61
+ * @returns The name of the media-query or _undefined_ if it was not found.
62
+ */
63
+ getQueryName(query: string): string | undefined;
51
64
  };
52
65
 
53
66
  export { bsBreakpoints };
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { NgZone, ViewContainerRef, InjectionToken, DestroyRef, QueryList, EventEmitter, TemplateRef, OnDestroy } from '@angular/core';
2
+ import { NgZone, ViewContainerRef, InjectionToken, QueryList, EventEmitter, TemplateRef, OnDestroy } from '@angular/core';
3
3
  import { ListKeyManager, FocusOrigin } from '@angular/cdk/a11y';
4
4
  import { Directionality } from '@angular/cdk/bidi';
5
5
  import { CuteFocusableControl, CuteLayoutControl } from '@cute-widgets/base/abstract';
@@ -170,7 +170,6 @@ declare class CuteNavChangingEvent extends Event {
170
170
  * ```
171
171
  */
172
172
  declare class CuteNav extends CuteLayoutControl {
173
- protected _destroyRef: DestroyRef;
174
173
  protected _dir: Directionality;
175
174
  protected _keyManager: ListKeyManager<CuteNavLink> | undefined;
176
175
  private _oldFocusLink;
package/dialog/index.d.ts CHANGED
@@ -1,27 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
- import { ViewContainerRef, Injector, OnDestroy, EventEmitter, ComponentRef, OnInit, TemplateRef, InjectionToken, OnChanges, ElementRef, SimpleChanges } from '@angular/core';
3
- import { HorizontalEdge, LayoutBreakpoint } from '@cute-widgets/base/core/types';
2
+ import { ViewContainerRef, Injector, OnDestroy, EventEmitter, ComponentRef, OnInit, OnChanges, SimpleChanges, InjectionToken, TemplateRef } from '@angular/core';
4
3
  import { DragAxis, CdkDrag } from '@angular/cdk/drag-drop';
5
4
  import { Direction } from '@angular/cdk/bidi';
6
5
  import { ScrollStrategy, OverlayRef, ComponentType } from '@angular/cdk/overlay';
6
+ import { LayoutBreakpoint, HorizontalEdge } from '@cute-widgets/base/core/types';
7
7
  import { DialogConfig, CdkDialogContainer, DialogRef, Dialog } from '@angular/cdk/dialog';
8
8
  import { ComponentPortal } from '@angular/cdk/portal';
9
9
  import { FocusOrigin } from '@angular/cdk/a11y';
10
10
  import { Observable, Subject } from 'rxjs';
11
11
  import * as i1 from '@angular/common';
12
12
 
13
- declare class CuteDialogBody {
14
- static ɵfac: i0.ɵɵFactoryDeclaration<CuteDialogBody, never>;
15
- static ɵdir: i0.ɵɵDirectiveDeclaration<CuteDialogBody, "cute-dialog-body, [cute-dialog-body], [cuteDialogBody], cute-dialog-content, [cute-dialog-content], [cuteDialogContent] ", ["cuteDialogBody"], {}, {}, never, never, true, never>;
16
- }
17
-
18
- declare class CuteDialogFooter {
19
- /** Horizontal alignment of the footer's content */
20
- align: HorizontalEdge | 'center';
21
- static ɵfac: i0.ɵɵFactoryDeclaration<CuteDialogFooter, never>;
22
- static ɵdir: i0.ɵɵDirectiveDeclaration<CuteDialogFooter, "cute-dialog-footer, [cute-dialog-footer], [cuteDialogFooter], cute-dialog-actions, [cute-dialog-actions], [cuteDialogActions] ", ["cuteDialogFooter", "cuteDialogActions"], { "align": { "alias": "align"; "required": false; }; }, {}, never, never, true, never>;
23
- }
24
-
25
13
  /**
26
14
  * @license Apache-2.0
27
15
  *
@@ -89,7 +77,7 @@ declare class CuteDialogConfig<D = any> {
89
77
  minWidth?: number | string;
90
78
  /** Min-height of the dialog. If a number is provided, assumes pixel units. */
91
79
  minHeight?: number | string;
92
- /** Max-width of the dialog. If a number is provided, assumes pixel units. Defaults to 80vw. */
80
+ /** Max-width of the dialog. If a number is provided, assumes pixel units. */
93
81
  maxWidth?: number | string;
94
82
  /** Max-height of the dialog. If a number is provided, assumes pixel units. */
95
83
  maxHeight?: number | string;
@@ -253,12 +241,6 @@ declare class CuteDialogHeader implements OnInit {
253
241
  static ngAcceptInputType_draggable: unknown;
254
242
  }
255
243
 
256
- declare class CuteDialogTitle {
257
- id: unknown;
258
- static ɵfac: i0.ɵɵFactoryDeclaration<CuteDialogTitle, never>;
259
- static ɵdir: i0.ɵɵDirectiveDeclaration<CuteDialogTitle, "[cute-dialog-title], [cuteDialogTitle]", ["cuteDialogTitle"], { "id": { "alias": "id"; "required": false; }; }, {}, never, never, true, never>;
260
- }
261
-
262
244
  /**
263
245
  * @license Apache-2.0
264
246
  *
@@ -283,7 +265,7 @@ declare enum CuteDialogState {
283
265
  declare class CuteDialogRef<T, R = any> {
284
266
  private _ref;
285
267
  private _config;
286
- protected _containerInstance: CuteDialogContainer;
268
+ _containerInstance: CuteDialogContainer;
287
269
  /** The instance of component opened into the dialog. */
288
270
  componentInstance: T | undefined;
289
271
  /**
@@ -365,6 +347,82 @@ declare class CuteDialogRef<T, R = any> {
365
347
  */
366
348
  declare function _closeDialogVia<R>(ref: CuteDialogRef<R>, interactionType: FocusOrigin, result?: R): void;
367
349
 
350
+ /**
351
+ * @license Apache-2.0
352
+ *
353
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
354
+ *
355
+ * You may not use this file except in compliance with the License
356
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
357
+ *
358
+ * This code is a modification of the `@angular/material` original
359
+ * code licensed under MIT-style License (https://angular.dev/license).
360
+ */
361
+
362
+ /**
363
+ * Button that will close the current dialog.
364
+ */
365
+ declare class CuteDialogClose implements OnInit, OnChanges {
366
+ dialogRef: CuteDialogRef<any, any>;
367
+ private _elementRef;
368
+ private _dialog;
369
+ /** Screen-reader label for the button. */
370
+ ariaLabel: string | undefined;
371
+ /** Default to "button" to prevent accidental form submits. */
372
+ type: 'submit' | 'button' | 'reset';
373
+ /** Dialog close input. */
374
+ dialogResult: any;
375
+ _cuteDialogClose: any;
376
+ constructor(...args: unknown[]);
377
+ ngOnInit(): void;
378
+ ngOnChanges(changes: SimpleChanges): void;
379
+ protected _onButtonClick(event: MouseEvent): void;
380
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteDialogClose, never>;
381
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteDialogClose, "[cute-dialog-close], [cuteDialogClose]", ["cuteDialogClose"], { "ariaLabel": { "alias": "aria-label"; "required": false; }; "type": { "alias": "type"; "required": false; }; "dialogResult": { "alias": "cute-dialog-close"; "required": false; }; "_cuteDialogClose": { "alias": "cuteDialogClose"; "required": false; }; }, {}, never, never, true, never>;
382
+ }
383
+ declare abstract class CuteDialogLayoutSection implements OnInit, OnDestroy {
384
+ protected _dialogRef: CuteDialogRef<any, any>;
385
+ private _elementRef;
386
+ private _dialog;
387
+ protected abstract _onAdd(): void;
388
+ protected abstract _onRemove(): void;
389
+ ngOnInit(): void;
390
+ ngOnDestroy(): void;
391
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteDialogLayoutSection, never>;
392
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteDialogLayoutSection, never, never, {}, {}, never, never, true, never>;
393
+ }
394
+ /**
395
+ * Title of a dialog element. Stays fixed to the top of the dialog when scrolling.
396
+ */
397
+ declare class CuteDialogTitle extends CuteDialogLayoutSection {
398
+ protected _header: CuteDialogHeader | null;
399
+ id: string;
400
+ constructor();
401
+ protected _onAdd(): void;
402
+ protected _onRemove(): void;
403
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteDialogTitle, never>;
404
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteDialogTitle, "[cute-dialog-title], [cuteDialogTitle]", ["cuteDialogTitle"], { "id": { "alias": "id"; "required": false; }; }, {}, never, never, true, never>;
405
+ }
406
+ /**
407
+ * Scrollable content container of a dialog.
408
+ */
409
+ declare class CuteDialogBody {
410
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteDialogBody, never>;
411
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteDialogBody, "cute-dialog-body, [cute-dialog-body], [cuteDialogBody], cute-dialog-content, [cute-dialog-content], [cuteDialogContent] ", ["cuteDialogBody"], {}, {}, never, never, true, never>;
412
+ }
413
+ /**
414
+ * Container for the bottom action buttons in a dialog.
415
+ * Stays fixed to the bottom when scrolling.
416
+ */
417
+ declare class CuteDialogFooter extends CuteDialogLayoutSection {
418
+ /** Horizontal alignment of the footer's content */
419
+ align: HorizontalEdge | 'center';
420
+ protected _onAdd(): void;
421
+ protected _onRemove(): void;
422
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteDialogFooter, never>;
423
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteDialogFooter, "cute-dialog-footer, [cute-dialog-footer], [cuteDialogFooter], cute-dialog-actions, [cute-dialog-actions], [cuteDialogActions] ", ["cuteDialogFooter", "cuteDialogActions"], { "align": { "alias": "align"; "required": false; }; }, {}, never, never, true, never>;
424
+ }
425
+
368
426
  /**
369
427
  * @license Apache-2.0
370
428
  *
@@ -440,45 +498,11 @@ declare class CuteDialog implements OnDestroy {
440
498
  static ɵprov: i0.ɵɵInjectableDeclaration<CuteDialog>;
441
499
  }
442
500
 
443
- /**
444
- * @license Apache-2.0
445
- *
446
- * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
447
- *
448
- * You may not use this file except in compliance with the License
449
- * that can be found at http://www.apache.org/licenses/LICENSE-2.0
450
- *
451
- * This code is a modification of the `@angular/material` original
452
- * code licensed under MIT-style License (https://angular.dev/license).
453
- */
454
-
455
- /**
456
- * Button that will close the current dialog.
457
- */
458
- declare class CuteDialogClose implements OnInit, OnChanges {
459
- dialogRef: CuteDialogRef<any>;
460
- private _elementRef;
461
- private _dialog;
462
- /** Screen-reader label for the button. */
463
- ariaLabel: string | undefined;
464
- /** Default to "button" to prevent accidental form submits. */
465
- type: 'submit' | 'button' | 'reset';
466
- /** Dialog close input. */
467
- dialogResult: any;
468
- _cuteDialogClose: any;
469
- constructor(dialogRef: CuteDialogRef<any>, _elementRef: ElementRef<HTMLElement>, _dialog: CuteDialog);
470
- ngOnInit(): void;
471
- ngOnChanges(changes: SimpleChanges): void;
472
- protected _onButtonClick(event: MouseEvent): void;
473
- static ɵfac: i0.ɵɵFactoryDeclaration<CuteDialogClose, [{ optional: true; }, null, null]>;
474
- static ɵdir: i0.ɵɵDirectiveDeclaration<CuteDialogClose, "[cute-dialog-close], [cuteDialogClose]", ["cuteDialogClose"], { "ariaLabel": { "alias": "aria-label"; "required": false; }; "type": { "alias": "type"; "required": false; }; "dialogResult": { "alias": "cute-dialog-close"; "required": false; }; "_cuteDialogClose": { "alias": "cuteDialogClose"; "required": false; }; }, {}, never, never, true, never>;
475
- }
476
-
477
501
  declare class CuteDialogModule {
478
502
  static ɵfac: i0.ɵɵFactoryDeclaration<CuteDialogModule, never>;
479
503
  static ɵmod: i0.ɵɵNgModuleDeclaration<CuteDialogModule, never, [typeof i1.CommonModule, typeof CuteDialogBody, typeof CuteDialogClose, typeof CuteDialogFooter, typeof CuteDialogHeader, typeof CuteDialogTitle, typeof CuteDialogContainer], [typeof CuteDialogBody, typeof CuteDialogClose, typeof CuteDialogFooter, typeof CuteDialogHeader, typeof CuteDialogTitle, typeof CuteDialogContainer]>;
480
504
  static ɵinj: i0.ɵɵInjectorDeclaration<CuteDialogModule>;
481
505
  }
482
506
 
483
- export { CUTE_DIALOG_DATA, CUTE_DIALOG_DEFAULT_OPTIONS, CUTE_DIALOG_SCROLL_STRATEGY, CuteDialog, CuteDialogBody, CuteDialogClose, CuteDialogConfig, CuteDialogContainer, CuteDialogFooter, CuteDialogHeader, CuteDialogModule, CuteDialogRef, CuteDialogState, CuteDialogTitle, _closeDialogVia };
507
+ export { CUTE_DIALOG_DATA, CUTE_DIALOG_DEFAULT_OPTIONS, CUTE_DIALOG_SCROLL_STRATEGY, CuteDialog, CuteDialogBody, CuteDialogClose, CuteDialogConfig, CuteDialogContainer, CuteDialogFooter, CuteDialogHeader, CuteDialogLayoutSection, CuteDialogModule, CuteDialogRef, CuteDialogState, CuteDialogTitle, _closeDialogVia };
484
508
  export type { AutoFocusTarget, DialogFullScreenStrategy, DialogPosition, DialogRole };
@@ -1,11 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { TemplateRef, AfterContentInit, OnChanges, OnDestroy, EventEmitter, SimpleChanges, ElementRef, InjectionToken, AfterViewInit, QueryList } from '@angular/core';
2
+ import { TemplateRef, AfterContentInit, OnChanges, OnDestroy, EventEmitter, SimpleChanges, ElementRef, InjectionToken, QueryList } from '@angular/core';
3
3
  import { CdkAccordion, CdkAccordionItem } from '@angular/cdk/accordion';
4
4
  import { FocusableOption, FocusOrigin } from '@angular/cdk/a11y';
5
5
  import { BooleanInput } from '@angular/cdk/coercion';
6
6
  import { TemplatePortal } from '@angular/cdk/portal';
7
7
  import { Subject } from 'rxjs';
8
- import { Expandable } from '@cute-widgets/base/abstract';
8
+ import { Expandable, CuteLayoutControl } from '@cute-widgets/base/abstract';
9
9
  import * as i1 from '@angular/common';
10
10
 
11
11
  /**
@@ -177,23 +177,9 @@ declare class CuteExpansionPanel extends CdkAccordionItem implements CuteExpansi
177
177
  static ɵcmp: i0.ɵɵComponentDeclaration<CuteExpansionPanel, "cute-expansion-panel", ["cuteExpansionPanel"], { "hideToggle": { "alias": "hideToggle"; "required": false; }; "togglePosition": { "alias": "togglePosition"; "required": false; }; }, { "afterExpand": "afterExpand"; "afterCollapse": "afterCollapse"; }, ["_lazyContent"], ["cute-expansion-panel-header", "*", "cute-action-row"], true, never>;
178
178
  }
179
179
 
180
- /**
181
- * @license Apache-2.0
182
- *
183
- * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
184
- *
185
- * You may not use this file except in compliance with the License
186
- * that can be found at http://www.apache.org/licenses/LICENSE-2.0
187
- *
188
- * This code is a modification of the `@angular/material` original
189
- * code licensed under MIT-style License (https://angular.dev/license).
190
- */
191
-
192
- declare class CuteExpansionPanelHeader implements AfterViewInit, OnDestroy, FocusableOption {
180
+ declare class CuteExpansionPanelHeader extends CuteLayoutControl implements FocusableOption {
193
181
  readonly panel: CuteExpansionPanel;
194
- private _element;
195
182
  private _focusMonitor;
196
- private _changeDetectorRef;
197
183
  private _parentChangeSubscription;
198
184
  constructor(...args: unknown[]);
199
185
  /** Height of the header while the panel is expanded. */
@@ -202,8 +188,9 @@ declare class CuteExpansionPanelHeader implements AfterViewInit, OnDestroy, Focu
202
188
  collapsedHeight: string | undefined;
203
189
  /** Tab index of the header. */
204
190
  tabIndex: number;
191
+ protected generateId(): string;
205
192
  /** Whether the associated panel is disabled. Implemented as a part of `FocusableOption`. */
206
- get disabled(): boolean;
193
+ protected getDisabledState(): boolean;
207
194
  /** Toggles the expanded state of the panel. */
208
195
  protected _toggle(): void;
209
196
  /** Gets whether the panel is expanded. */
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, isDevMode, inject, ElementRef, ChangeDetectorRef, Renderer2, booleanAttribute, Input, Directive, numberAttribute, EventEmitter, Output, HostBinding } from '@angular/core';
2
+ import { InjectionToken, isDevMode, inject, ElementRef, ChangeDetectorRef, Renderer2, DestroyRef, booleanAttribute, Input, Directive, numberAttribute, EventEmitter, Output, HostBinding } from '@angular/core';
3
3
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
4
4
  import { Observable, Subject } from 'rxjs';
5
5
  import { FocusMonitor } from '@angular/cdk/a11y';
@@ -59,7 +59,7 @@ class CuteBaseControl {
59
59
  ;
60
60
  set id(value) { this._id = value; }
61
61
  /** Theme color palette for the component. */
62
- get color() { return this._color ?? this.defaultColor; }
62
+ get color() { return this._color ?? this.defaultColor ?? this.owner?.color; }
63
63
  set color(value) { this.setColor(value); }
64
64
  /**
65
65
  * Makes the host element not mutable, focusable, or even submitted with the form
@@ -86,6 +86,7 @@ class CuteBaseControl {
86
86
  this._elementRef = inject(ElementRef);
87
87
  this._changeDetectorRef = inject(ChangeDetectorRef);
88
88
  this._renderer = inject(Renderer2);
89
+ this._destroyRef = inject(DestroyRef);
89
90
  /** Owner widget */
90
91
  this.owner = inject(CUTE_WIDGET, { skipSelf: true, optional: true });
91
92
  /**
@@ -246,6 +247,10 @@ class CuteBaseControl {
246
247
  markForCheck() {
247
248
  this._changeDetectorRef.markForCheck();
248
249
  }
250
+ /** Checks this view and its children. */
251
+ detectChanges() {
252
+ this._changeDetectorRef.detectChanges();
253
+ }
249
254
  /** Toggles the `disabled` state of the component */
250
255
  toggleDisabled() {
251
256
  this.disabled = !this.disabled;
@@ -498,18 +503,18 @@ class CuteLayoutControl extends CuteBaseControl {
498
503
  super.ngOnChanges(changes);
499
504
  const change = changes["breakpoint"];
500
505
  if (change) {
501
- this._subscription?.unsubscribe();
502
- if (change.currentValue) { // && (change.currentValue !== change.previousValue)) {
503
- const bpName = bsBreakpoints.getLabel(change.currentValue);
504
- this._subscription = this.breakpointObserver
505
- .observe(bsBreakpoints[bpName + "AndDown"])
506
+ this._bpSubscription?.unsubscribe();
507
+ if (change.currentValue) {
508
+ const queries = bsBreakpoints.getMediaQueries(change.currentValue);
509
+ this._bpSubscription = this.breakpointObserver
510
+ .observe(queries)
506
511
  .subscribe(state => this.breakpointState.emit(state));
507
512
  }
508
513
  }
509
514
  }
510
515
  ngOnDestroy() {
511
516
  super.ngOnDestroy();
512
- this._subscription?.unsubscribe();
517
+ this._bpSubscription?.unsubscribe();
513
518
  }
514
519
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteLayoutControl, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
515
520
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.15", type: CuteLayoutControl, isStandalone: true, inputs: { clearfix: ["clearfix", "clearfix", booleanAttribute], breakpoint: "breakpoint" }, outputs: { breakpointState: "breakpointState" }, host: { properties: { "class.clearfix": "clearfix", "attr.tabindex": "-1", "attr.aria-label": "ariaLabel || null", "attr.aria-labelledby": "ariaLabelledby || null", "attr.aria-describedby": "ariaDescribedby || null", "attr.role": "role || null", "attr.id": "id || null", "class": "this.classList" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
@@ -1 +1 @@
1
- {"version":3,"file":"cute-widgets-base-abstract.mjs","sources":["../../../../projects/cute-widgets/base/abstract/src/base-control.directive.ts","../../../../projects/cute-widgets/base/abstract/src/focusable-control.directive.ts","../../../../projects/cute-widgets/base/abstract/src/input-control.directive.ts","../../../../projects/cute-widgets/base/abstract/src/input-dropdown-control.directive.ts","../../../../projects/cute-widgets/base/abstract/src/layout-control.directive.ts","../../../../projects/cute-widgets/base/abstract/cute-widgets-base-abstract.ts"],"sourcesContent":["/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {\r\n Directive,\r\n ChangeDetectorRef,\r\n ElementRef,\r\n inject,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n SimpleChanges,\r\n Renderer2, AfterViewInit, OnInit, AfterContentInit, booleanAttribute, isDevMode, InjectionToken,\r\n} from '@angular/core';\r\nimport {BooleanInput, coerceBooleanProperty} from \"@angular/cdk/coercion\";\r\nimport {Observable, Subscriber} from \"rxjs\";\r\nimport {RichThemeColor} from \"@cute-widgets/base/core\";\r\n\r\nexport interface ThematicControl {\r\n /** Theme color palette for the component. */\r\n color: RichThemeColor | undefined;\r\n /** Adds a linear gradient as background image to the backgrounds. */\r\n gradientFill: boolean;\r\n /** Default color to fall back to if no value is set. */\r\n defaultColor: RichThemeColor | undefined;\r\n}\r\n\r\nexport interface CuteWidget extends ThematicControl {\r\n id: string | undefined;\r\n role: string | undefined;\r\n element: Readonly<ElementRef<HTMLElement>>;\r\n owner: CuteWidget | null;\r\n disabled: boolean;\r\n tag: any;\r\n enable(): void;\r\n disable(): void;\r\n toggleDisabled(): void;\r\n hasClass(name: string): boolean;\r\n toggleClass(name: string, force?: boolean): boolean;\r\n getAttribute(name: string): string | null;\r\n setAttribute(name: string, value: string, namespace?: string | null | undefined): void;\r\n hasAttributes(...attributes: string[]): boolean;\r\n markForCheck(): void;\r\n}\r\n\r\n/** Widget's injection token */\r\nexport const CUTE_WIDGET = new InjectionToken<CuteWidget>(\"CUTE-WIDGET\");\r\n\r\n/**\r\n * This widget base class and each of its descendant should be used as a parent for classes decorated with `@Component`.\r\n * Attribute directives should not extend this class and its descendants to avoid property value conflicts.\r\n */\r\n@Directive({\r\n host: {\r\n 'class': 'cute-widget',\r\n '[class.cute-thematic-widget]': 'color',\r\n '[class.bg-gradient]': 'gradientFill',\r\n },\r\n providers: [{provide: CUTE_WIDGET, useExisting: CuteBaseControl}]\r\n})\r\nexport abstract class CuteBaseControl\r\n implements CuteWidget, OnInit, AfterViewInit, AfterContentInit, OnChanges, OnDestroy\r\n{\r\n private readonly _uniqueId: string | undefined;\r\n\r\n protected readonly _elementRef: ElementRef<HTMLElement> = inject(ElementRef);\r\n protected readonly _changeDetectorRef: ChangeDetectorRef = inject(ChangeDetectorRef);\r\n protected readonly _renderer: Renderer2 = inject(Renderer2);\r\n\r\n /** Owner widget */\r\n readonly owner = inject(CUTE_WIDGET, {skipSelf: true, optional: true})\r\n\r\n /**\r\n * A list of subscribers that subscribed before the directive was initialized.\r\n * Should be notified during markInitialized.\r\n * Set to null after pending subscribers are notified, and should\r\n * not expect to be populated after.\r\n */\r\n private _pendingSubscribers: Subscriber<void>[] | null = [];\r\n\r\n protected get _nativeElement(): HTMLElement {\r\n return this._elementRef.nativeElement;\r\n }\r\n\r\n /**\r\n * Marks the state as initialized and notifies pending subscribers. Should be called at the end\r\n * of ngOnInit.\r\n */\r\n protected _markInitialized(): void {\r\n if (this.isInitialized && isDevMode()) {\r\n throw Error('CuteBaseControl error:/r/n'\r\n +'This directive has already been marked as initialized and '\r\n +'should not be called twice.',\r\n );\r\n }\r\n\r\n this._isInitialized = true;\r\n\r\n if (this._pendingSubscribers != null) {\r\n this._pendingSubscribers.forEach(this._notifySubscriber);\r\n this._pendingSubscribers = null;\r\n }\r\n }\r\n\r\n /** Emits and completes the subscriber stream (should only emit once). */\r\n private _notifySubscriber(subscriber: Subscriber<void>): void {\r\n subscriber.next();\r\n subscriber.complete();\r\n }\r\n\r\n /**\r\n * Observable stream that emits when the directive initializes. If already initialized, the\r\n * subscriber is stored to be notified once _markInitialized is called.\r\n */\r\n readonly initialized$:Observable<void> = new Observable<void>(subscriber => {\r\n // If initialized, immediately notify the subscriber. Otherwise, store the subscriber to notify\r\n // when _markInitialized is called.\r\n if (this.isInitialized) {\r\n this._notifySubscriber(subscriber);\r\n } else {\r\n this._pendingSubscribers!.push(subscriber);\r\n }\r\n });\r\n\r\n /** Whether this directive has been marked as initialized. */\r\n get isInitialized(): boolean {\r\n return this._isInitialized;\r\n }\r\n private _isInitialized: boolean = false;\r\n\r\n /** Gets a reference to the `ElementRef` object */\r\n get element(): Readonly<ElementRef<HTMLElement>> {\r\n return this._elementRef;\r\n }\r\n\r\n /** The element's identifier */\r\n @Input()\r\n get id(): string|undefined {return this._id};\r\n set id(value: string|undefined) {this._id = value;}\r\n private _id: string | undefined;\r\n\r\n /** Default color, which is set when no value is set to the `color` property */\r\n @Input() defaultColor: RichThemeColor | undefined;\r\n\r\n /** Theme color palette for the component. */\r\n @Input()\r\n get color(): RichThemeColor|undefined { return this._color ?? this.defaultColor; }\r\n set color(value: RichThemeColor|undefined) { this.setColor(value); }\r\n private _color: RichThemeColor | undefined;\r\n\r\n /** Adds a linear gradient as a background image to the backgrounds */\r\n @Input({transform: booleanAttribute})\r\n gradientFill: boolean = false;\r\n\r\n /**\r\n * Makes the host element not mutable, focusable, or even submitted with the form\r\n */\r\n @Input({transform: booleanAttribute})\r\n get disabled(): boolean { return this.getDisabledState(); }\r\n set disabled(value: BooleanInput) {\r\n if (coerceBooleanProperty(value) !== this._disabled) {\r\n this.setDisabledState(value);\r\n }\r\n }\r\n private _disabled: boolean = false;\r\n\r\n /**\r\n * Attached to the aria-label attribute of the host element.In most cases, aria-labelledby will\r\n * take precedence so this may be omitted.\r\n */\r\n @Input('aria-label')\r\n ariaLabel: string | null = null;\r\n /**\r\n * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element\r\n */\r\n @Input('aria-labelledby')\r\n ariaLabelledby: string | null = null;\r\n /**\r\n * The 'aria-describedby' attribute is read after the element's label and field type.\r\n */\r\n @Input('aria-describedby')\r\n ariaDescribedby: string | null = null;\r\n /**\r\n * The 'aria-description' attribute for the content of the element.\r\n */\r\n @Input('aria-description')\r\n ariaDescription: string | null = null;\r\n /**\r\n * Provides semantic meaning to content, allowing screen readers and other tools to present and\r\n * support interaction with an object\r\n */\r\n @Input()\r\n get role(): string | undefined {return this._role;}\r\n set role(value: string|undefined) {\r\n this._role = (typeof value == \"string\" ? value.trim().toLowerCase() : \"\") || undefined;\r\n }\r\n private _role: string | undefined;\r\n\r\n /** Any arbitrary user data */\r\n @Input()\r\n tag: any;\r\n\r\n /** Returns the unique id for the visual hidden input control */\r\n protected get inputId(): string {\r\n return `${this.id || this._uniqueId}-input`;\r\n }\r\n\r\n protected constructor() {\r\n const generatedId = this.generateId().trim();\r\n if (generatedId.length > 0) {\r\n this._id = this._uniqueId = generatedId;\r\n }\r\n }\r\n\r\n /**\r\n * Sets the type of mouse cursor using a keyword, or load a specific icon to use.\r\n * @param cursor A mouse cursor keyword or icon\r\n * @returns The current mouse cursor\r\n */\r\n // async setCursor(cursor: MouseCursor|string): Promise<MouseCursor|string> {\r\n // const oldCursor = <MouseCursor> getComputedStyle(this._nativeElement).cursor;\r\n // this._nativeElement.style.cursor = cursor;\r\n // await yieldToMain();\r\n // return oldCursor;\r\n // }\r\n\r\n /**\r\n * Whether the option is disabled. Can be overridden in descendant classes\r\n * @returns Current disabled state\r\n */\r\n protected getDisabledState(): boolean {\r\n return this._disabled;\r\n }\r\n\r\n /**\r\n * Changes the `disabled` status of the component. Can be overridden in descendant classes\r\n * @param newState New boolean for `disabled` state\r\n * @param emitEvent Emit state change event\r\n * @returns Change result\r\n */\r\n protected setDisabledState(newState: BooleanInput, emitEvent?: boolean): boolean {\r\n const coercedState = coerceBooleanProperty(newState);\r\n if (coercedState !== this.disabled) {\r\n this._disabled = coercedState;\r\n Promise.resolve().then(()=>this.markForCheck());\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Sets a new color value. Can be overridden in descendant classes.\r\n * @param value New `ThemeColor` value\r\n * @returns Old color value\r\n */\r\n protected setColor(value: RichThemeColor | undefined): RichThemeColor | undefined {\r\n const oldColor = this._color;\r\n if (oldColor !== value) {\r\n this._color = value;\r\n this.markForCheck();\r\n }\r\n return oldColor;\r\n }\r\n\r\n /**\r\n * Returns an element's unique identifier that, if not empty, is assigned to `id` property as a default value.\r\n * Must be overridden in the descendant classes.\r\n * @abstract\r\n */\r\n protected abstract generateId(): string;\r\n\r\n /** Returns the root owner widget if it exists */\r\n getRootOwner(): CuteWidget | null {\r\n let root = this.owner;\r\n while (root) {\r\n root = root.owner;\r\n }\r\n return root;\r\n }\r\n\r\n /** Sets a property on a target element using the current Renderer implementation. */\r\n setProperty(key: string, value: unknown): void {\r\n this._renderer.setProperty(this._nativeElement, key, value);\r\n }\r\n /** Returns the value of a specified attribute on the component's host element. */\r\n getAttribute(name: string): string | null {\r\n return this._nativeElement.getAttribute(name);\r\n }\r\n /** Sets the value of an attribute on the component's host element */\r\n setAttribute(name: string, value: string, namespace?: string | null | undefined): void {\r\n this._renderer.setAttribute(this._nativeElement, name, value, namespace);\r\n }\r\n /** Gets whether the component has one of the given attributes. */\r\n hasAttributes(...attributes: string[]): boolean {\r\n return attributes.some(attribute => this._nativeElement.hasAttribute(attribute));\r\n }\r\n /** Adds a class to an element in the DOM. */\r\n addClass(name: string): void {\r\n this._renderer.addClass(this._nativeElement, name);\r\n }\r\n /** Removes a class from an element in the DOM. */\r\n removeClass(name: string): void {\r\n this._renderer.removeClass(this._nativeElement, name);\r\n }\r\n /** Returns a boolean value — _true_ if the element's class list contains the given token, otherwise _false_. */\r\n hasClass(name: string): boolean {\r\n return this._nativeElement.classList.contains(name);\r\n }\r\n /**\r\n * Adds a CSS class if it is not in the element's class list, otherwise remove it\r\n * @param name CSS class name\r\n * @param force If included, turns the toggle into a one way-only operation. If set to _false_, then the class name will only be removed, but not added. If set to _true_, then the class name will only be added, but not removed.\r\n */\r\n toggleClass(name: string, force?: boolean): boolean {\r\n return this._nativeElement.classList.toggle(name, force);\r\n }\r\n /**\r\n * Returns a boolean value indicating whether a _node_ is a descendant of the current node\r\n * @param node HTML element reference to test\r\n * @returns A boolean value that is `true` if _node_ is contained in the current node, `false` if not.\r\n * If the _node_ parameter is `null`, contains() always returns `false`.\r\n */\r\n contains(node: HTMLElement): boolean {\r\n return this._nativeElement.contains(node);\r\n }\r\n\r\n /** Enables the user interaction */\r\n enable(): void {\r\n this.disabled = false;\r\n }\r\n\r\n /** Disables the user interaction */\r\n disable(): void {\r\n this.disabled = true;\r\n }\r\n\r\n /** Explicitly marks the view as changed so that it can be checked again. */\r\n markForCheck(): void {\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n\r\n /** Toggles the `disabled` state of the component */\r\n toggleDisabled(): void {\r\n this.disabled = !this.disabled;\r\n }\r\n\r\n ngOnInit() {\r\n this._markInitialized();\r\n }\r\n\r\n ngAfterViewInit() {\r\n }\r\n\r\n ngAfterContentInit() {\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n }\r\n\r\n ngOnDestroy(): void {\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {Directive, EventEmitter, inject, Input, numberAttribute, Output} from '@angular/core';\r\nimport {FocusableOption, FocusMonitor, FocusOrigin, ListKeyManagerOption} from \"@angular/cdk/a11y\";\r\nimport {CuteBaseControl} from './base-control.directive';\r\nimport {RippleManager} from \"@cute-widgets/base/core/ripple\";\r\n\r\nfunction transformTabIndex(value: unknown): number | undefined {\r\n return value == null ? undefined : numberAttribute(value);\r\n}\r\n\r\n@Directive()\r\nexport abstract class CuteFocusableControl extends CuteBaseControl\r\n implements FocusableOption, ListKeyManagerOption\r\n{\r\n // If necessary, the `monitor` method should be called from descendant classes in one of the\r\n // directive/component's life circle methods\r\n protected readonly _focusMonitor: FocusMonitor = inject(FocusMonitor);\r\n\r\n /**\r\n * Allows making HTML elements un/focusable (usually with the Tab key, hence the name) and\r\n * determines their relative ordering for sequential focus navigation.\r\n */\r\n @Input({transform: transformTabIndex})\r\n get tabIndex(): number | undefined { return this._tabIndex; }\r\n set tabIndex(value: number | undefined) {\r\n if (value !== this._tabIndex) {\r\n this._tabIndex = value;\r\n if (this.isInitialized) {\r\n this.tabIndexChange.emit();\r\n }\r\n }\r\n }\r\n private _tabIndex: number | undefined;\r\n\r\n @Output() tabIndexChange = new EventEmitter<void>();\r\n\r\n protected constructor() {\r\n super();\r\n const tabInd = this.getAttribute(\"tabindex\");\r\n if (tabInd) {\r\n this.tabIndex = numberAttribute(tabInd, 0);\r\n }\r\n }\r\n\r\n /** Set focus on this component */\r\n focus(origin?: FocusOrigin, options?: FocusOptions): void {\r\n if (origin) {\r\n this._focusMonitor.focusVia(this._elementRef.nativeElement, origin, options);\r\n } else if (options && !Array.isArray(options)) {\r\n this._nativeElement.focus(options);\r\n } else {\r\n this._nativeElement.focus();\r\n }\r\n }\r\n\r\n /** Gets the current label of the component. Part of `ListKeyManagerOption` interface. */\r\n getLabel(): string {\r\n return (this._nativeElement.textContent||\"\").trim();\r\n }\r\n\r\n override ngOnDestroy() {\r\n super.ngOnDestroy();\r\n this._focusMonitor.stopMonitoring(this._elementRef);\r\n RippleManager.removeRipple(this._nativeElement);\r\n }\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {booleanAttribute, Directive, Input} from '@angular/core';\r\nimport {ControlValueAccessor} from \"@angular/forms\";\r\nimport {BooleanInput, coerceBooleanProperty} from \"@angular/cdk/coercion\";\r\nimport {Subject} from \"rxjs\";\r\nimport {CuteFocusableControl} from './focusable-control.directive';\r\n\r\n@Directive()\r\nexport abstract class CuteInputControl extends CuteFocusableControl implements ControlValueAccessor {\r\n\r\n private _isTouched: boolean = false;\r\n\r\n /**\r\n * Emits whenever the component state changes and should cause the parent\r\n * form-field to update. Implemented as part of `CuteFormFieldControl`.\r\n */\r\n readonly stateChanges = new Subject<void>();\r\n\r\n protected _onChange: (value: unknown) => void = () => {};\r\n protected _onTouched: Function = ()=>{};\r\n\r\n /** The value attribute of the native input element */\r\n abstract value: any;\r\n\r\n /** Name value will be applied to the input element if present */\r\n @Input()\r\n name: string | null = null;\r\n\r\n /** Whether the element's value input is required. */\r\n @Input({transform: booleanAttribute})\r\n get required(): boolean {return this._required ?? false;}\r\n set required(newValue: BooleanInput) {\r\n this._required = coerceBooleanProperty(newValue);\r\n this.stateChanges.next();\r\n }\r\n private _required: boolean | undefined;\r\n\r\n override get id(): string|undefined {return super.id;}\r\n override set id(value: string|undefined) {\r\n if (value !== super.id) {\r\n super.id = value;\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n protected constructor() { super(); }\r\n\r\n /* ControlValueAccessor interface */\r\n //++\r\n registerOnChange(fn: (value: any) => void): void {\r\n this._onChange = fn;\r\n }\r\n registerOnTouched(fn: () => void): void {\r\n this._onTouched = fn;\r\n }\r\n override setDisabledState(isDisabled: BooleanInput, emitEvent: boolean = true): boolean {\r\n const changed = super.setDisabledState(isDisabled, emitEvent);\r\n if (changed && emitEvent) {\r\n this.stateChanges.next();\r\n }\r\n return changed;\r\n }\r\n abstract writeValue(obj: any): void;\r\n //--\r\n\r\n /**\r\n * Mark widget gets a touched state\r\n * @protected\r\n */\r\n protected markAsTouched() {\r\n if (!this._isTouched) {\r\n this._onTouched();\r\n this._isTouched = true;\r\n }\r\n }\r\n\r\n override ngOnDestroy() {\r\n super.ngOnDestroy();\r\n\r\n this.stateChanges.complete();\r\n }\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {Directive, Input} from \"@angular/core\";\r\nimport {CuteInputControl} from \"./input-control.directive\";\r\nimport {Expandable} from \"./expandable.interface\";\r\n\r\n@Directive()\r\nexport abstract class CuteInputDropdownControl extends CuteInputControl implements Expandable {\r\n\r\n @Input()\r\n withShadow: boolean = false;\r\n\r\n protected constructor() {\r\n super();\r\n }\r\n\r\n /** Expandable interface */\r\n abstract open(): void;\r\n abstract close(): void;\r\n abstract toggle(): void;\r\n\r\n abstract get expanded(): boolean;\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {\r\n booleanAttribute,\r\n Directive,\r\n EventEmitter,\r\n HostBinding,\r\n inject,\r\n Input,\r\n Output,\r\n SimpleChanges\r\n} from \"@angular/core\";\r\nimport {CuteBaseControl} from \"./base-control.directive\";\r\nimport {bsBreakpoints, LayoutBreakpoint, toBgCssClass} from \"@cute-widgets/base/core\";\r\nimport {BreakpointObserver, BreakpointState} from '@angular/cdk/layout';\r\nimport {Subscription} from 'rxjs';\r\n\r\n@Directive({\r\n host: {\r\n '[class.clearfix]': 'clearfix',\r\n '[attr.tabindex]': '-1',\r\n '[attr.aria-label]': 'ariaLabel || null',\r\n '[attr.aria-labelledby]': 'ariaLabelledby || null',\r\n '[attr.aria-describedby]': 'ariaDescribedby || null',\r\n '[attr.role]': 'role || null',\r\n '[attr.id]': 'id || null',\r\n }\r\n})\r\nexport abstract class CuteLayoutControl extends CuteBaseControl {\r\n protected breakpointObserver = inject(BreakpointObserver);\r\n private _subscription: Subscription | undefined;\r\n\r\n /** Returns CSS-class list */\r\n @HostBinding(\"class\")\r\n protected get classList(): string {\r\n // We interpret `color` value as a background color of the container\r\n return this.color ? toBgCssClass(this.color) : \"\";\r\n }\r\n\r\n /** Clears floated content within a container */\r\n @Input({transform: booleanAttribute}) clearfix: boolean = false;\r\n\r\n /** Symbolic name of the screen minimum width which determines how the responsive layout behaves across device or viewport sizes. */\r\n @Input() breakpoint: LayoutBreakpoint | undefined;\r\n\r\n /** Event that is raised when the width of viewport is changed and crosses the size of `breakpoint`'s value. */\r\n @Output() breakpointState = new EventEmitter<BreakpointState>();\r\n\r\n override ngOnChanges(changes: SimpleChanges) {\r\n super.ngOnChanges(changes);\r\n\r\n const change = changes[\"breakpoint\"];\r\n if (change) {\r\n\r\n this._subscription?.unsubscribe();\r\n\r\n if (change.currentValue) { // && (change.currentValue !== change.previousValue)) {\r\n const bpName = bsBreakpoints.getLabel(change.currentValue);\r\n this._subscription = this.breakpointObserver\r\n .observe((bsBreakpoints as any)[bpName+\"AndDown\"])\r\n .subscribe(state => this.breakpointState.emit(state));\r\n }\r\n }\r\n }\r\n\r\n override ngOnDestroy() {\r\n super.ngOnDestroy();\r\n\r\n this._subscription?.unsubscribe();\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;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AEG;;;;"}
1
+ {"version":3,"file":"cute-widgets-base-abstract.mjs","sources":["../../../../projects/cute-widgets/base/abstract/src/base-control.directive.ts","../../../../projects/cute-widgets/base/abstract/src/focusable-control.directive.ts","../../../../projects/cute-widgets/base/abstract/src/input-control.directive.ts","../../../../projects/cute-widgets/base/abstract/src/input-dropdown-control.directive.ts","../../../../projects/cute-widgets/base/abstract/src/layout-control.directive.ts","../../../../projects/cute-widgets/base/abstract/cute-widgets-base-abstract.ts"],"sourcesContent":["/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {\r\n Directive,\r\n ChangeDetectorRef,\r\n ElementRef,\r\n inject,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n SimpleChanges,\r\n Renderer2, AfterViewInit, OnInit, AfterContentInit, booleanAttribute, isDevMode, InjectionToken, DestroyRef,\r\n} from '@angular/core';\r\nimport {BooleanInput, coerceBooleanProperty} from \"@angular/cdk/coercion\";\r\nimport {Observable, Subscriber} from \"rxjs\";\r\nimport {RichThemeColor} from \"@cute-widgets/base/core\";\r\n\r\nexport interface ThematicControl {\r\n /** Theme color palette for the component. */\r\n color: RichThemeColor | undefined;\r\n /** Adds a linear gradient as background image to the backgrounds. */\r\n gradientFill: boolean;\r\n /** Default color to fall back to if no value is set. */\r\n defaultColor: RichThemeColor | undefined;\r\n}\r\n\r\nexport interface CuteWidget extends ThematicControl {\r\n id: string | undefined;\r\n role: string | undefined;\r\n element: Readonly<ElementRef<HTMLElement>>;\r\n owner: CuteWidget | null;\r\n disabled: boolean;\r\n tag: any;\r\n enable(): void;\r\n disable(): void;\r\n toggleDisabled(): void;\r\n hasClass(name: string): boolean;\r\n toggleClass(name: string, force?: boolean): boolean;\r\n getAttribute(name: string): string | null;\r\n setAttribute(name: string, value: string, namespace?: string | null | undefined): void;\r\n hasAttributes(...attributes: string[]): boolean;\r\n markForCheck(): void;\r\n}\r\n\r\n/** Widget's injection token */\r\nexport const CUTE_WIDGET = new InjectionToken<CuteWidget>(\"CUTE-WIDGET\");\r\n\r\n/**\r\n * This widget base class and each of its descendant should be used as a parent for classes decorated with `@Component`.\r\n * Attribute directives should not extend this class and its descendants to avoid property value conflicts.\r\n */\r\n@Directive({\r\n host: {\r\n 'class': 'cute-widget',\r\n '[class.cute-thematic-widget]': 'color',\r\n '[class.bg-gradient]': 'gradientFill',\r\n },\r\n providers: [{provide: CUTE_WIDGET, useExisting: CuteBaseControl}]\r\n})\r\nexport abstract class CuteBaseControl\r\n implements CuteWidget, OnInit, AfterViewInit, AfterContentInit, OnChanges, OnDestroy\r\n{\r\n private readonly _uniqueId: string | undefined;\r\n\r\n protected readonly _elementRef: ElementRef<HTMLElement> = inject(ElementRef);\r\n protected readonly _changeDetectorRef: ChangeDetectorRef = inject(ChangeDetectorRef);\r\n protected readonly _renderer: Renderer2 = inject(Renderer2);\r\n protected readonly _destroyRef: DestroyRef = inject(DestroyRef);\r\n\r\n /** Owner widget */\r\n readonly owner = inject(CUTE_WIDGET, {skipSelf: true, optional: true})\r\n\r\n /**\r\n * A list of subscribers that subscribed before the directive was initialized.\r\n * Should be notified during markInitialized.\r\n * Set to null after pending subscribers are notified, and should\r\n * not expect to be populated after.\r\n */\r\n private _pendingSubscribers: Subscriber<void>[] | null = [];\r\n\r\n protected get _nativeElement(): HTMLElement {\r\n return this._elementRef.nativeElement;\r\n }\r\n\r\n /**\r\n * Marks the state as initialized and notifies pending subscribers. Should be called at the end\r\n * of ngOnInit.\r\n */\r\n protected _markInitialized(): void {\r\n if (this.isInitialized && isDevMode()) {\r\n throw Error('CuteBaseControl error:/r/n'\r\n +'This directive has already been marked as initialized and '\r\n +'should not be called twice.',\r\n );\r\n }\r\n\r\n this._isInitialized = true;\r\n\r\n if (this._pendingSubscribers != null) {\r\n this._pendingSubscribers.forEach(this._notifySubscriber);\r\n this._pendingSubscribers = null;\r\n }\r\n }\r\n\r\n /** Emits and completes the subscriber stream (should only emit once). */\r\n private _notifySubscriber(subscriber: Subscriber<void>): void {\r\n subscriber.next();\r\n subscriber.complete();\r\n }\r\n\r\n /**\r\n * Observable stream that emits when the directive initializes. If already initialized, the\r\n * subscriber is stored to be notified once _markInitialized is called.\r\n */\r\n readonly initialized$:Observable<void> = new Observable<void>(subscriber => {\r\n // If initialized, immediately notify the subscriber. Otherwise, store the subscriber to notify\r\n // when _markInitialized is called.\r\n if (this.isInitialized) {\r\n this._notifySubscriber(subscriber);\r\n } else {\r\n this._pendingSubscribers!.push(subscriber);\r\n }\r\n });\r\n\r\n /** Whether this directive has been marked as initialized. */\r\n get isInitialized(): boolean {\r\n return this._isInitialized;\r\n }\r\n private _isInitialized: boolean = false;\r\n\r\n /** Gets a reference to the `ElementRef` object */\r\n get element(): Readonly<ElementRef<HTMLElement>> {\r\n return this._elementRef;\r\n }\r\n\r\n /** The element's identifier */\r\n @Input()\r\n get id(): string|undefined {return this._id};\r\n set id(value: string|undefined) {this._id = value;}\r\n private _id: string | undefined;\r\n\r\n /** Default color, which is set when no value is set to the `color` property */\r\n @Input() defaultColor: RichThemeColor | undefined;\r\n\r\n /** Theme color palette for the component. */\r\n @Input()\r\n get color(): RichThemeColor|undefined { return this._color ?? this.defaultColor ?? this.owner?.color; }\r\n set color(value: RichThemeColor|undefined) { this.setColor(value); }\r\n private _color: RichThemeColor | undefined;\r\n\r\n /** Adds a linear gradient as a background image to the backgrounds */\r\n @Input({transform: booleanAttribute})\r\n gradientFill: boolean = false;\r\n\r\n /**\r\n * Makes the host element not mutable, focusable, or even submitted with the form\r\n */\r\n @Input({transform: booleanAttribute})\r\n get disabled(): boolean { return this.getDisabledState(); }\r\n set disabled(value: BooleanInput) {\r\n if (coerceBooleanProperty(value) !== this._disabled) {\r\n this.setDisabledState(value);\r\n }\r\n }\r\n private _disabled: boolean = false;\r\n\r\n /**\r\n * Attached to the aria-label attribute of the host element.In most cases, aria-labelledby will\r\n * take precedence so this may be omitted.\r\n */\r\n @Input('aria-label')\r\n ariaLabel: string | null = null;\r\n /**\r\n * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element\r\n */\r\n @Input('aria-labelledby')\r\n ariaLabelledby: string | null = null;\r\n /**\r\n * The 'aria-describedby' attribute is read after the element's label and field type.\r\n */\r\n @Input('aria-describedby')\r\n ariaDescribedby: string | null = null;\r\n /**\r\n * The 'aria-description' attribute for the content of the element.\r\n */\r\n @Input('aria-description')\r\n ariaDescription: string | null = null;\r\n /**\r\n * Provides semantic meaning to content, allowing screen readers and other tools to present and\r\n * support interaction with an object\r\n */\r\n @Input()\r\n get role(): string | undefined {return this._role;}\r\n set role(value: string|undefined) {\r\n this._role = (typeof value == \"string\" ? value.trim().toLowerCase() : \"\") || undefined;\r\n }\r\n private _role: string | undefined;\r\n\r\n /** Any arbitrary user data */\r\n @Input()\r\n tag: any;\r\n\r\n /** Returns the unique id for the visual hidden input control */\r\n protected get inputId(): string {\r\n return `${this.id || this._uniqueId}-input`;\r\n }\r\n\r\n protected constructor() {\r\n const generatedId = this.generateId().trim();\r\n if (generatedId.length > 0) {\r\n this._id = this._uniqueId = generatedId;\r\n }\r\n }\r\n\r\n /**\r\n * Sets the type of mouse cursor using a keyword, or load a specific icon to use.\r\n * @param cursor A mouse cursor keyword or icon\r\n * @returns The current mouse cursor\r\n */\r\n // async setCursor(cursor: MouseCursor|string): Promise<MouseCursor|string> {\r\n // const oldCursor = <MouseCursor> getComputedStyle(this._nativeElement).cursor;\r\n // this._nativeElement.style.cursor = cursor;\r\n // await yieldToMain();\r\n // return oldCursor;\r\n // }\r\n\r\n /**\r\n * Whether the option is disabled. Can be overridden in descendant classes\r\n * @returns Current disabled state\r\n */\r\n protected getDisabledState(): boolean {\r\n return this._disabled;\r\n }\r\n\r\n /**\r\n * Changes the `disabled` status of the component. Can be overridden in descendant classes\r\n * @param newState New boolean for `disabled` state\r\n * @param emitEvent Emit state change event\r\n * @returns Change result\r\n */\r\n protected setDisabledState(newState: BooleanInput, emitEvent?: boolean): boolean {\r\n const coercedState = coerceBooleanProperty(newState);\r\n if (coercedState !== this.disabled) {\r\n this._disabled = coercedState;\r\n Promise.resolve().then(()=>this.markForCheck());\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Sets a new color value. Can be overridden in descendant classes.\r\n * @param value New `ThemeColor` value\r\n * @returns Old color value\r\n */\r\n protected setColor(value: RichThemeColor | undefined): RichThemeColor | undefined {\r\n const oldColor = this._color;\r\n if (oldColor !== value) {\r\n this._color = value;\r\n this.markForCheck();\r\n }\r\n return oldColor;\r\n }\r\n\r\n /**\r\n * Returns an element's unique identifier that, if not empty, is assigned to `id` property as a default value.\r\n * Must be overridden in the descendant classes.\r\n * @abstract\r\n */\r\n protected abstract generateId(): string;\r\n\r\n /** Returns the root owner widget if it exists */\r\n getRootOwner(): CuteWidget | null {\r\n let root = this.owner;\r\n while (root) {\r\n root = root.owner;\r\n }\r\n return root;\r\n }\r\n\r\n /** Sets a property on a target element using the current Renderer implementation. */\r\n setProperty(key: string, value: unknown): void {\r\n this._renderer.setProperty(this._nativeElement, key, value);\r\n }\r\n /** Returns the value of a specified attribute on the component's host element. */\r\n getAttribute(name: string): string | null {\r\n return this._nativeElement.getAttribute(name);\r\n }\r\n /** Sets the value of an attribute on the component's host element */\r\n setAttribute(name: string, value: string, namespace?: string | null | undefined): void {\r\n this._renderer.setAttribute(this._nativeElement, name, value, namespace);\r\n }\r\n /** Gets whether the component has one of the given attributes. */\r\n hasAttributes(...attributes: string[]): boolean {\r\n return attributes.some(attribute => this._nativeElement.hasAttribute(attribute));\r\n }\r\n /** Adds a class to an element in the DOM. */\r\n addClass(name: string): void {\r\n this._renderer.addClass(this._nativeElement, name);\r\n }\r\n /** Removes a class from an element in the DOM. */\r\n removeClass(name: string): void {\r\n this._renderer.removeClass(this._nativeElement, name);\r\n }\r\n /** Returns a boolean value — _true_ if the element's class list contains the given token, otherwise _false_. */\r\n hasClass(name: string): boolean {\r\n return this._nativeElement.classList.contains(name);\r\n }\r\n /**\r\n * Adds a CSS class if it is not in the element's class list, otherwise remove it\r\n * @param name CSS class name\r\n * @param force If included, turns the toggle into a one way-only operation. If set to _false_, then the class name will only be removed, but not added. If set to _true_, then the class name will only be added, but not removed.\r\n */\r\n toggleClass(name: string, force?: boolean): boolean {\r\n return this._nativeElement.classList.toggle(name, force);\r\n }\r\n /**\r\n * Returns a boolean value indicating whether a _node_ is a descendant of the current node\r\n * @param node HTML element reference to test\r\n * @returns A boolean value that is `true` if _node_ is contained in the current node, `false` if not.\r\n * If the _node_ parameter is `null`, contains() always returns `false`.\r\n */\r\n contains(node: HTMLElement): boolean {\r\n return this._nativeElement.contains(node);\r\n }\r\n\r\n /** Enables the user interaction */\r\n enable(): void {\r\n this.disabled = false;\r\n }\r\n\r\n /** Disables the user interaction */\r\n disable(): void {\r\n this.disabled = true;\r\n }\r\n\r\n /** Explicitly marks the view as changed so that it can be checked again. */\r\n markForCheck(): void {\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n \r\n /** Checks this view and its children. */\r\n detectChanges(): void {\r\n this._changeDetectorRef.detectChanges();\r\n }\r\n\r\n /** Toggles the `disabled` state of the component */\r\n toggleDisabled(): void {\r\n this.disabled = !this.disabled;\r\n }\r\n\r\n ngOnInit() {\r\n this._markInitialized();\r\n }\r\n\r\n ngAfterViewInit() {\r\n }\r\n\r\n ngAfterContentInit() {\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n }\r\n\r\n ngOnDestroy(): void {\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {Directive, EventEmitter, inject, Input, numberAttribute, Output} from '@angular/core';\r\nimport {FocusableOption, FocusMonitor, FocusOrigin, ListKeyManagerOption} from \"@angular/cdk/a11y\";\r\nimport {CuteBaseControl} from './base-control.directive';\r\nimport {RippleManager} from \"@cute-widgets/base/core/ripple\";\r\n\r\nfunction transformTabIndex(value: unknown): number | undefined {\r\n return value == null ? undefined : numberAttribute(value);\r\n}\r\n\r\n@Directive()\r\nexport abstract class CuteFocusableControl extends CuteBaseControl\r\n implements FocusableOption, ListKeyManagerOption\r\n{\r\n // If necessary, the `monitor` method should be called from descendant classes in one of the\r\n // directive/component's life circle methods\r\n protected readonly _focusMonitor: FocusMonitor = inject(FocusMonitor);\r\n\r\n /**\r\n * Allows making HTML elements un/focusable (usually with the Tab key, hence the name) and\r\n * determines their relative ordering for sequential focus navigation.\r\n */\r\n @Input({transform: transformTabIndex})\r\n get tabIndex(): number | undefined { return this._tabIndex; }\r\n set tabIndex(value: number | undefined) {\r\n if (value !== this._tabIndex) {\r\n this._tabIndex = value;\r\n if (this.isInitialized) {\r\n this.tabIndexChange.emit();\r\n }\r\n }\r\n }\r\n private _tabIndex: number | undefined;\r\n\r\n @Output() tabIndexChange = new EventEmitter<void>();\r\n\r\n protected constructor() {\r\n super();\r\n const tabInd = this.getAttribute(\"tabindex\");\r\n if (tabInd) {\r\n this.tabIndex = numberAttribute(tabInd, 0);\r\n }\r\n }\r\n\r\n /** Set focus on this component */\r\n focus(origin?: FocusOrigin, options?: FocusOptions): void {\r\n if (origin) {\r\n this._focusMonitor.focusVia(this._elementRef.nativeElement, origin, options);\r\n } else if (options && !Array.isArray(options)) {\r\n this._nativeElement.focus(options);\r\n } else {\r\n this._nativeElement.focus();\r\n }\r\n }\r\n\r\n /** Gets the current label of the component. Part of `ListKeyManagerOption` interface. */\r\n getLabel(): string {\r\n return (this._nativeElement.textContent||\"\").trim();\r\n }\r\n\r\n override ngOnDestroy() {\r\n super.ngOnDestroy();\r\n this._focusMonitor.stopMonitoring(this._elementRef);\r\n RippleManager.removeRipple(this._nativeElement);\r\n }\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {booleanAttribute, Directive, Input} from '@angular/core';\r\nimport {ControlValueAccessor} from \"@angular/forms\";\r\nimport {BooleanInput, coerceBooleanProperty} from \"@angular/cdk/coercion\";\r\nimport {Subject} from \"rxjs\";\r\nimport {CuteFocusableControl} from './focusable-control.directive';\r\n\r\n@Directive()\r\nexport abstract class CuteInputControl extends CuteFocusableControl implements ControlValueAccessor {\r\n\r\n private _isTouched: boolean = false;\r\n\r\n /**\r\n * Emits whenever the component state changes and should cause the parent\r\n * form-field to update. Implemented as part of `CuteFormFieldControl`.\r\n */\r\n readonly stateChanges = new Subject<void>();\r\n\r\n protected _onChange: (value: unknown) => void = () => {};\r\n protected _onTouched: Function = ()=>{};\r\n\r\n /** The value attribute of the native input element */\r\n abstract value: any;\r\n\r\n /** Name value will be applied to the input element if present */\r\n @Input()\r\n name: string | null = null;\r\n\r\n /** Whether the element's value input is required. */\r\n @Input({transform: booleanAttribute})\r\n get required(): boolean {return this._required ?? false;}\r\n set required(newValue: BooleanInput) {\r\n this._required = coerceBooleanProperty(newValue);\r\n this.stateChanges.next();\r\n }\r\n private _required: boolean | undefined;\r\n\r\n override get id(): string|undefined {return super.id;}\r\n override set id(value: string|undefined) {\r\n if (value !== super.id) {\r\n super.id = value;\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n protected constructor() { super(); }\r\n\r\n /* ControlValueAccessor interface */\r\n //++\r\n registerOnChange(fn: (value: any) => void): void {\r\n this._onChange = fn;\r\n }\r\n registerOnTouched(fn: () => void): void {\r\n this._onTouched = fn;\r\n }\r\n override setDisabledState(isDisabled: BooleanInput, emitEvent: boolean = true): boolean {\r\n const changed = super.setDisabledState(isDisabled, emitEvent);\r\n if (changed && emitEvent) {\r\n this.stateChanges.next();\r\n }\r\n return changed;\r\n }\r\n abstract writeValue(obj: any): void;\r\n //--\r\n\r\n /**\r\n * Mark widget gets a touched state\r\n * @protected\r\n */\r\n protected markAsTouched() {\r\n if (!this._isTouched) {\r\n this._onTouched();\r\n this._isTouched = true;\r\n }\r\n }\r\n\r\n override ngOnDestroy() {\r\n super.ngOnDestroy();\r\n\r\n this.stateChanges.complete();\r\n }\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {Directive, Input} from \"@angular/core\";\r\nimport {CuteInputControl} from \"./input-control.directive\";\r\nimport {Expandable} from \"./expandable.interface\";\r\n\r\n@Directive()\r\nexport abstract class CuteInputDropdownControl extends CuteInputControl implements Expandable {\r\n\r\n @Input()\r\n withShadow: boolean = false;\r\n\r\n protected constructor() {\r\n super();\r\n }\r\n\r\n /** Expandable interface */\r\n abstract open(): void;\r\n abstract close(): void;\r\n abstract toggle(): void;\r\n\r\n abstract get expanded(): boolean;\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {\r\n booleanAttribute,\r\n Directive,\r\n EventEmitter,\r\n HostBinding,\r\n inject,\r\n Input,\r\n Output,\r\n SimpleChanges\r\n} from \"@angular/core\";\r\nimport {CuteBaseControl} from \"./base-control.directive\";\r\nimport {bsBreakpoints, LayoutBreakpoint, toBgCssClass} from \"@cute-widgets/base/core\";\r\nimport {BreakpointObserver, BreakpointState} from '@angular/cdk/layout';\r\nimport {Subscription} from 'rxjs';\r\n\r\n@Directive({\r\n host: {\r\n '[class.clearfix]': 'clearfix',\r\n '[attr.tabindex]': '-1',\r\n '[attr.aria-label]': 'ariaLabel || null',\r\n '[attr.aria-labelledby]': 'ariaLabelledby || null',\r\n '[attr.aria-describedby]': 'ariaDescribedby || null',\r\n '[attr.role]': 'role || null',\r\n '[attr.id]': 'id || null',\r\n }\r\n})\r\nexport abstract class CuteLayoutControl extends CuteBaseControl {\r\n protected breakpointObserver = inject(BreakpointObserver);\r\n private _bpSubscription: Subscription | undefined;\r\n\r\n /** Returns CSS-class list */\r\n @HostBinding(\"class\")\r\n protected get classList(): string {\r\n // We interpret `color` value as a background color of the container\r\n return this.color ? toBgCssClass(this.color) : \"\";\r\n }\r\n\r\n /** Clears floated content within a container */\r\n @Input({transform: booleanAttribute}) clearfix: boolean = false;\r\n\r\n /** Symbolic name of the screen minimum width which determines how the responsive layout behaves across device or viewport sizes. */\r\n @Input() breakpoint: LayoutBreakpoint | LayoutBreakpoint[] | undefined;\r\n\r\n /** Event that is raised when the width of viewport is changed and crosses the size of `breakpoint`'s value. */\r\n @Output() breakpointState = new EventEmitter<BreakpointState>();\r\n\r\n override ngOnChanges(changes: SimpleChanges) {\r\n super.ngOnChanges(changes);\r\n\r\n const change = changes[\"breakpoint\"];\r\n if (change) {\r\n\r\n this._bpSubscription?.unsubscribe();\r\n\r\n if (change.currentValue) {\r\n const queries = bsBreakpoints.getMediaQueries(change.currentValue);\r\n\r\n this._bpSubscription = this.breakpointObserver\r\n .observe( queries )\r\n .subscribe(state => this.breakpointState.emit(state));\r\n }\r\n }\r\n }\r\n\r\n override ngOnDestroy() {\r\n super.ngOnDestroy();\r\n\r\n this._bpSubscription?.unsubscribe();\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;AAOG;AA2CH;MACa,WAAW,GAAG,IAAI,cAAc,CAAa,aAAa;AAEvE;;;AAGG;MASmB,eAAe,CAAA;AAqBnC,IAAA,IAAc,cAAc,GAAA;AAC1B,QAAA,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa;IACvC;AAEA;;;AAGG;IACO,gBAAgB,GAAA;AACxB,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