@coreui/angular 5.7.37 → 5.7.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coreui/angular",
3
- "version": "5.7.37",
3
+ "version": "5.7.40",
4
4
  "description": "CoreUI Components Library for Angular",
5
5
  "copyright": "Copyright 2026 creativeLabs Łukasz Holeczek",
6
6
  "license": "MIT",
@@ -28,8 +28,8 @@
28
28
  "@angular/common": "^22.2.0",
29
29
  "@angular/core": "^22.2.0",
30
30
  "@angular/router": "^22.2.0",
31
- "@coreui/coreui": "^5.9.0",
32
- "@coreui/icons-angular": "~5.7.37",
31
+ "@coreui/coreui": "^5.9.1",
32
+ "@coreui/icons-angular": "~5.7.40",
33
33
  "rxjs": "^7.8.2"
34
34
  },
35
35
  "repository": {
@@ -1,6 +1,6 @@
1
1
  import { IsActiveMatchOptions, NavigationEnd, Router, UrlTree } from "@angular/router";
2
2
  import * as i0 from "@angular/core";
3
- import { AfterContentChecked, AfterContentInit, AfterViewInit, AnimationCallbackEvent, ChangeDetectorRef, ComponentRef, DestroyRef, ElementRef, Injector, InputSignal, InputSignalWithTransform, ModuleWithProviders, NgModuleRef, OnChanges, OnDestroy, OnInit, PipeTransform, QueryList, Renderer2, SimpleChanges, TemplateRef, ViewContainerRef, WritableSignal } from "@angular/core";
3
+ import { AfterContentChecked, AfterContentInit, AfterViewChecked, AfterViewInit, AnimationCallbackEvent, ChangeDetectorRef, ComponentRef, DestroyRef, ElementRef, Injector, InputSignal, InputSignalWithTransform, ModuleWithProviders, NgModuleRef, OnChanges, OnDestroy, OnInit, PipeTransform, QueryList, Renderer2, SimpleChanges, TemplateRef, ViewContainerRef, WritableSignal } from "@angular/core";
4
4
  import { Observable, Subscription } from "rxjs";
5
5
  import { CdkTrapFocus, FocusOrigin, FocusableOption } from "@angular/cdk/a11y";
6
6
  import { Options, Placement } from "@popperjs/core";
@@ -102,12 +102,12 @@ export declare class TemplateIdDirective {
102
102
  export declare class ThemeDirective {
103
103
  #private;
104
104
  /**
105
- * Sets the `data-coreui-theme` attribute on the host element. Overridden by `dark`.
105
+ * Sets the `data-coreui-theme` attribute on the host element.
106
106
  * @returns 'dark' | 'light'
107
107
  */
108
108
  readonly colorScheme: import("@angular/core").InputSignal<"dark" | "light" | undefined>;
109
109
  /**
110
- * Applies the dark color scheme, regardless of `colorScheme`.
110
+ * Applies the dark color scheme. On `cTheme` it takes precedence over `colorScheme`.
111
111
  * @returns boolean
112
112
  * @default false
113
113
  */
@@ -536,9 +536,46 @@ export declare class BackdropService {
536
536
  readonly backdropClick$: import("rxjs").Observable<boolean>;
537
537
  activeBackdrop: any;
538
538
  scrollbarWidth: string;
539
- setBackdrop(type?: string): HTMLDivElement;
539
+ /**
540
+ * Returns the backdrop element of a type, shared by everyone who sets it; a fading backdrop of the type comes back.
541
+ * Pair every call with `clearBackdrop()`.
542
+ * @param type the backdrop type, rendered as the `<type>-backdrop` class
543
+ * @param fade fade the backdrop in and out, as the latest call asks; without it the backdrop shows at once and goes once released (since 5.7.38)
544
+ * @returns the backdrop element
545
+ */
546
+ setBackdrop(type?: string, fade?: boolean): HTMLDivElement;
547
+ /**
548
+ * Releases one use of a backdrop; the last release fades it out and removes it once its transition ends.
549
+ * A backdrop set again before its fade starts (a microtask after the last release) comes back without fading.
550
+ * Does nothing for an element the service does not hold in use.
551
+ * @param backdropElement the element `setBackdrop()` returned
552
+ * @returns `undefined`, to clear the caller's reference
553
+ */
540
554
  clearBackdrop(backdropElement: HTMLElement): any;
555
+ /**
556
+ * Locks page scrolling for an owner: hides the body overflow and pads the body by the scrollbar width.
557
+ * The lock stays while any owner holds it; locking twice for the same owner counts once.
558
+ * @since 5.7.38
559
+ * @param owner the component or object holding the lock
560
+ */
561
+ lockScroll(owner: object): void;
562
+ /**
563
+ * Releases the scroll lock of an owner; once the last owner releases it, the overflow and the padding property the lock set
564
+ * are removed (a page's own inline padding on that side, overwritten by the lock, is not restored).
565
+ * Does nothing for an owner that holds no lock.
566
+ * @since 5.7.38
567
+ * @param owner the component or object that locked scrolling
568
+ */
569
+ unlockScroll(owner: object): void;
570
+ /**
571
+ * Locks page scrolling on behalf of the service itself.
572
+ * @deprecated 5.7.38. Use `lockScroll(owner)` instead.
573
+ */
541
574
  hideScrollbar(): void;
575
+ /**
576
+ * Releases the lock taken by `hideScrollbar()`; locks of other owners stay.
577
+ * @deprecated 5.7.38. Use `unlockScroll(owner)` instead.
578
+ */
542
579
  resetScrollbar(): void;
543
580
  onClickHandler(): void;
544
581
  static ɵfac: i0.ɵɵFactoryDeclaration<BackdropService, never>;
@@ -2258,6 +2295,9 @@ export declare class DropdownComponent implements OnDestroy, OnInit {
2258
2295
  * - `false` only on the toggle button or an explicit hide/toggle call and not on the `Esc` key,
2259
2296
  * - `inside` only on a click inside the menu,
2260
2297
  * - `outside` only on a click outside it.
2298
+ *
2299
+ * A click on a form field or inside a form in the menu does not close it; `cDropdownClose` and
2300
+ * `cDropdownItem` close it from there, but not on a click on a field that takes typing or a choice inside the item.
2261
2301
  * @returns boolean | 'inside' | 'outside'
2262
2302
  * @default true
2263
2303
  */
@@ -2323,8 +2363,6 @@ export declare class DropdownComponent implements OnDestroy, OnInit {
2323
2363
  } | {
2324
2364
  display?: undefined;
2325
2365
  }>;
2326
- private clickedTarget;
2327
- onHostClick($event: MouseEvent): void;
2328
2366
  dropdownStateSubscribe(): void;
2329
2367
  toggleDropdown(): void;
2330
2368
  onClick(event: any): void;
@@ -2398,7 +2436,8 @@ export declare class DropdownItemDirective implements FocusableOption {
2398
2436
  */
2399
2437
  readonly active: import("@angular/core").InputSignal<boolean | undefined>;
2400
2438
  /**
2401
- * Configure dropdown-item close dropdown behavior.
2439
+ * Configure dropdown-item close dropdown behavior. The item does not close the dropdown on a click on a field inside
2440
+ * it that takes typing or a choice (input other than a button, select, textarea, contenteditable).
2402
2441
  * @returns boolean
2403
2442
  * @default true
2404
2443
  */
@@ -2623,7 +2662,9 @@ export declare class FormControlDirective implements OnInit {
2623
2662
  */
2624
2663
  readonly sizing: import("@angular/core").InputSignal<"" | "sm" | "lg" | undefined>;
2625
2664
  /**
2626
- * Set component validation state to valid.
2665
+ * Validation state: `true` valid, `false` invalid, which also sets `aria-invalid="true"`
2666
+ * (not on button-like, `color` and `hidden` inputs, where `aria-invalid` is left to the page), `undefined` none.
2667
+ * Do not bind `aria-invalid` on the same element as well.
2627
2668
  * @default undefined
2628
2669
  */
2629
2670
  readonly valid: import("@angular/core").InputSignal<boolean | undefined>;
@@ -2677,7 +2718,8 @@ export declare class FormCheckInputDirective {
2677
2718
  readonly indeterminateInput: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
2678
2719
  get indeterminate(): boolean;
2679
2720
  /**
2680
- * Set component validation state to valid.
2721
+ * Validation state: `true` valid, `false` invalid, which also sets `aria-invalid="true"`, `undefined` none.
2722
+ * Do not bind `aria-invalid` on the same element as well.
2681
2723
  * @default undefined
2682
2724
  */
2683
2725
  readonly valid: import("@angular/core").InputSignal<boolean | undefined>;
@@ -2772,13 +2814,15 @@ export declare class FormLabelDirective {
2772
2814
  }, {}, never, never, true, never>;
2773
2815
  }
2774
2816
  export declare class FormSelectDirective {
2817
+ #private;
2775
2818
  /**
2776
2819
  * Size the component small or large.
2777
2820
  * @default undefined
2778
2821
  */
2779
2822
  readonly sizing: import("@angular/core").InputSignal<"" | "sm" | "lg" | undefined>;
2780
2823
  /**
2781
- * Set component validation state to valid.
2824
+ * Validation state: `true` valid, `false` invalid, which also sets `aria-invalid="true"`, `undefined` none.
2825
+ * Do not bind `aria-invalid` on the same element as well.
2782
2826
  * @default undefined
2783
2827
  */
2784
2828
  readonly valid: import("@angular/core").InputSignal<boolean | undefined>;
@@ -2855,15 +2899,6 @@ export declare class ContainerComponent {
2855
2899
  }, {}, never, ["*"], true, never>;
2856
2900
  }
2857
2901
  type ColOrder = (number | 'first' | 'last');
2858
- type ColBreakpoint = (BooleanInput$1 | NumberInput$1);
2859
- interface ICol {
2860
- xs?: (BooleanInput$1 | NumberInput$1);
2861
- sm?: (BooleanInput$1 | NumberInput$1);
2862
- md?: (BooleanInput$1 | NumberInput$1);
2863
- lg?: (BooleanInput$1 | NumberInput$1);
2864
- xl?: (BooleanInput$1 | NumberInput$1);
2865
- xxl?: (BooleanInput$1 | NumberInput$1);
2866
- }
2867
2902
  type ColOffsetType = number | {
2868
2903
  xs?: number;
2869
2904
  sm?: number;
@@ -2990,14 +3025,6 @@ export declare class ColComponent extends ColDirective {
2990
3025
  static ɵcmp: i0.ɵɵComponentDeclaration<ColComponent, "c-col", never, {}, {}, never, ["*"], true, never>;
2991
3026
  }
2992
3027
  type NumberOfColumns = number | 'auto';
2993
- interface IRow {
2994
- xs?: NumberOfColumns;
2995
- sm?: NumberOfColumns;
2996
- md?: NumberOfColumns;
2997
- lg?: NumberOfColumns;
2998
- xl?: NumberOfColumns;
2999
- xxl?: NumberOfColumns;
3000
- }
3001
3028
  export declare class RowDirective {
3002
3029
  /**
3003
3030
  * The number of columns/offset/order on extra small devices (<576px).
@@ -3872,11 +3899,11 @@ export declare class ModalComponent implements OnInit, OnDestroy, AfterViewInit
3872
3899
  */
3873
3900
  readonly keyboard: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
3874
3901
  /**
3875
- * HTML id attribute, required for programmatic visibility change.
3902
+ * HTML id attribute, used to toggle the modal by id. Without it, the `id` property holds a generated id that is not rendered.
3876
3903
  * @returns string
3877
3904
  */
3878
3905
  readonly attrId: import("@angular/core").InputSignal<string | undefined>;
3879
- get id(): string | undefined;
3906
+ get id(): string;
3880
3907
  /**
3881
3908
  * Generates modal using a portal
3882
3909
  * @since 5.7.20
@@ -4028,7 +4055,26 @@ interface IModalAction {
4028
4055
  export declare class ModalService {
4029
4056
  #private;
4030
4057
  readonly modalState$: import("rxjs").Observable<any>;
4058
+ /** Emits once a modal has opened through `toggle()`; the other visible modals close on it. */
4059
+ readonly opened$: import("rxjs").Observable<{
4060
+ modal: ModalComponent;
4061
+ focusFallback: (HTMLElement | null)[];
4062
+ }>;
4031
4063
  toggle(action: IModalAction): void;
4064
+ announceOpened(modal: ModalComponent, focusFallback: (HTMLElement | null)[]): void;
4065
+ /**
4066
+ * Adds the `modal-open` class to the body on behalf of a modal; the class stays while any modal holds it.
4067
+ * @since 5.7.38
4068
+ * @param modal the open modal
4069
+ */
4070
+ addOpenClass(modal: ModalComponent): void;
4071
+ /**
4072
+ * Releases the `modal-open` class held by a modal; the body loses it once no modal holds it.
4073
+ * Does nothing for a modal that holds no class.
4074
+ * @since 5.7.38
4075
+ * @param modal the modal that added the class
4076
+ */
4077
+ removeOpenClass(modal: ModalComponent): void;
4032
4078
  static ɵfac: i0.ɵɵFactoryDeclaration<ModalService, never>;
4033
4079
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
4034
4080
  }
@@ -4096,7 +4142,7 @@ export declare class OffcanvasComponent implements OnInit, OnDestroy {
4096
4142
  */
4097
4143
  readonly ariaModal: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
4098
4144
  /**
4099
- * Allow body scrolling while offcanvas is visible.
4145
+ * Allow body scrolling while the offcanvas is open. Changes apply while it is open.
4100
4146
  * @returns boolean
4101
4147
  * @default false
4102
4148
  */
@@ -4119,6 +4165,7 @@ export declare class OffcanvasComponent implements OnInit, OnDestroy {
4119
4165
  readonly visibleChange: import("@angular/core").OutputEmitterRef<boolean>;
4120
4166
  readonly hostClasses: import("@angular/core").Signal<Record<string, boolean>>;
4121
4167
  readonly ariaHidden: import("@angular/core").Signal<true | null>;
4168
+ protected readonly hostInert: import("@angular/core").Signal<true | null>;
4122
4169
  get tabIndex(): string | null;
4123
4170
  get show(): boolean;
4124
4171
  set show(value: boolean);
@@ -4443,7 +4490,7 @@ export declare class PopoverComponent implements OnDestroy {
4443
4490
  };
4444
4491
  }, {}, never, never, true, never>;
4445
4492
  }
4446
- export declare class PopoverDirective implements OnDestroy, OnInit, AfterViewInit {
4493
+ export declare class PopoverDirective implements OnDestroy, OnInit, AfterViewChecked, AfterViewInit {
4447
4494
  #private;
4448
4495
  /**
4449
4496
  * Content of popover
@@ -4487,17 +4534,16 @@ export declare class PopoverDirective implements OnDestroy, OnInit, AfterViewIni
4487
4534
  readonly visible: import("@angular/core").ModelSignal<boolean>;
4488
4535
  get ariaDescribedBy(): string | null;
4489
4536
  private tooltip;
4490
- private tooltipId;
4491
4537
  private tooltipRef;
4492
- private popperInstance;
4538
+ private popperInstance?;
4493
4539
  private _popperOptions;
4540
+ ngAfterViewChecked(): void;
4494
4541
  ngAfterViewInit(): void;
4495
4542
  ngOnDestroy(): void;
4496
4543
  ngOnInit(): void;
4497
4544
  private setListeners;
4498
4545
  private clearListeners;
4499
4546
  private intersectionServiceSubscribe;
4500
- private getUID;
4501
4547
  private createTooltipElement;
4502
4548
  private destroyTooltipElement;
4503
4549
  private addTooltipElement;
@@ -4815,16 +4861,6 @@ type SearchButtonShortcut = {
4815
4861
  };
4816
4862
  shortcut: string;
4817
4863
  };
4818
- declare const normalizeKey: (key: string) => string;
4819
- declare const parseShortcut: (shortcut: string) => SearchButtonShortcut[];
4820
- declare const isMacOS: () => boolean;
4821
- declare const getPreferredShortcut: (shortcuts: SearchButtonShortcut[]) => SearchButtonShortcut;
4822
- declare const getKeyLabel: (key: string) => string;
4823
- declare const formatShortcutTokens: (shortcut: string) => string[];
4824
- declare const getPressedKeys: (event: KeyboardEvent) => Set<string>;
4825
- declare const isEditableTarget: (target: EventTarget | null) => boolean;
4826
- declare const shouldIgnoreShortcut: (event: KeyboardEvent) => boolean;
4827
- declare const matchesShortcut: (shortcut: SearchButtonShortcut, event: KeyboardEvent) => boolean;
4828
4864
  interface IIntersectionObserverInit {
4829
4865
  root?: Element | null;
4830
4866
  rootMargin?: string;
@@ -4910,6 +4946,12 @@ export declare class ColorModeService {
4910
4946
  }
4911
4947
  export declare class UIDService {
4912
4948
  #private;
4949
+ /**
4950
+ * Returns an id no other call on this service instance returns, skipping ids already in the document.
4951
+ * The random infix, drawn once per instance, keeps it apart from other instances, applications and page ids.
4952
+ * @param prefix id prefix
4953
+ * @returns `${prefix}-${infix}-${count}`
4954
+ */
4913
4955
  getUID(prefix?: string): string;
4914
4956
  static ɵfac: i0.ɵɵFactoryDeclaration<UIDService, never>;
4915
4957
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
@@ -5219,14 +5261,6 @@ interface INavData {
5219
5261
  wrapper?: INavWrapper;
5220
5262
  linkProps?: INavLinkProps$1;
5221
5263
  }
5222
- declare abstract class SidebarNavService {
5223
- /**
5224
- * Returns a sidebar-nav items config NavData
5225
- */
5226
- abstract getSidebarNavItemsConfig(): INavData[];
5227
- static ɵfac: i0.ɵɵFactoryDeclaration<SidebarNavService, never>;
5228
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
5229
- }
5230
5264
  export declare class SidebarNavHelper {
5231
5265
  itemType(item: INavData): string;
5232
5266
  isActive(router: any, item: INavData): boolean;
@@ -6435,7 +6469,7 @@ export declare class TooltipComponent implements OnDestroy {
6435
6469
  };
6436
6470
  }, {}, never, never, true, never>;
6437
6471
  }
6438
- export declare class TooltipDirective implements OnDestroy, OnInit, AfterViewInit {
6472
+ export declare class TooltipDirective implements OnDestroy, OnInit, AfterViewChecked, AfterViewInit {
6439
6473
  #private;
6440
6474
  /**
6441
6475
  * Content of tooltip
@@ -6479,17 +6513,16 @@ export declare class TooltipDirective implements OnDestroy, OnInit, AfterViewIni
6479
6513
  readonly visible: import("@angular/core").ModelSignal<boolean>;
6480
6514
  get ariaDescribedBy(): string | null;
6481
6515
  private tooltip;
6482
- private tooltipId;
6483
6516
  private tooltipRef;
6484
- private popperInstance;
6517
+ private popperInstance?;
6485
6518
  private _popperOptions;
6519
+ ngAfterViewChecked(): void;
6486
6520
  ngAfterViewInit(): void;
6487
6521
  ngOnDestroy(): void;
6488
6522
  ngOnInit(): void;
6489
6523
  private setListeners;
6490
6524
  private clearListeners;
6491
6525
  private intersectionServiceSubscribe;
6492
- private getUID;
6493
6526
  private createTooltipElement;
6494
6527
  private destroyTooltipElement;
6495
6528
  private addTooltipElement;
@@ -6800,7 +6833,7 @@ export declare class WidgetStatCComponent extends CardComponent {
6800
6833
  "required": false;
6801
6834
  "isSignal": true;
6802
6835
  };
6803
- }, {}, ["contentTemplates"], ["*"], true, never>;
6836
+ }, {}, ["contentTemplates"], never, true, never>;
6804
6837
  }
6805
6838
  type WidgetStatDValue = {
6806
6839
  title?: string;
@@ -6894,7 +6927,7 @@ export declare class WidgetStatFComponent extends CardComponent {
6894
6927
  readonly titleClasses: import("@angular/core").Signal<Record<string, boolean>>;
6895
6928
  readonly valueClasses: import("@angular/core").Signal<Record<string, boolean>>;
6896
6929
  static ɵfac: i0.ɵɵFactoryDeclaration<WidgetStatFComponent, never>;
6897
- static ɵcmp: i0.ɵɵComponentDeclaration<WidgetStatFComponent, "c-widget-stat-f", ["cWidgetStatB"], {
6930
+ static ɵcmp: i0.ɵɵComponentDeclaration<WidgetStatFComponent, "c-widget-stat-f", ["cWidgetStatF", "cWidgetStatB"], {
6898
6931
  "footer": {
6899
6932
  "alias": "footer";
6900
6933
  "required": false;