@coreui/angular 5.7.37 → 5.7.38

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.38",
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.38",
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
  */
@@ -2855,15 +2894,6 @@ export declare class ContainerComponent {
2855
2894
  }, {}, never, ["*"], true, never>;
2856
2895
  }
2857
2896
  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
2897
  type ColOffsetType = number | {
2868
2898
  xs?: number;
2869
2899
  sm?: number;
@@ -2990,14 +3020,6 @@ export declare class ColComponent extends ColDirective {
2990
3020
  static ɵcmp: i0.ɵɵComponentDeclaration<ColComponent, "c-col", never, {}, {}, never, ["*"], true, never>;
2991
3021
  }
2992
3022
  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
3023
  export declare class RowDirective {
3002
3024
  /**
3003
3025
  * The number of columns/offset/order on extra small devices (<576px).
@@ -3872,11 +3894,11 @@ export declare class ModalComponent implements OnInit, OnDestroy, AfterViewInit
3872
3894
  */
3873
3895
  readonly keyboard: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
3874
3896
  /**
3875
- * HTML id attribute, required for programmatic visibility change.
3897
+ * HTML id attribute, used to toggle the modal by id. Without it, the `id` property holds a generated id that is not rendered.
3876
3898
  * @returns string
3877
3899
  */
3878
3900
  readonly attrId: import("@angular/core").InputSignal<string | undefined>;
3879
- get id(): string | undefined;
3901
+ get id(): string;
3880
3902
  /**
3881
3903
  * Generates modal using a portal
3882
3904
  * @since 5.7.20
@@ -4028,7 +4050,26 @@ interface IModalAction {
4028
4050
  export declare class ModalService {
4029
4051
  #private;
4030
4052
  readonly modalState$: import("rxjs").Observable<any>;
4053
+ /** Emits once a modal has opened through `toggle()`; the other visible modals close on it. */
4054
+ readonly opened$: import("rxjs").Observable<{
4055
+ modal: ModalComponent;
4056
+ focusFallback: (HTMLElement | null)[];
4057
+ }>;
4031
4058
  toggle(action: IModalAction): void;
4059
+ announceOpened(modal: ModalComponent, focusFallback: (HTMLElement | null)[]): void;
4060
+ /**
4061
+ * Adds the `modal-open` class to the body on behalf of a modal; the class stays while any modal holds it.
4062
+ * @since 5.7.38
4063
+ * @param modal the open modal
4064
+ */
4065
+ addOpenClass(modal: ModalComponent): void;
4066
+ /**
4067
+ * Releases the `modal-open` class held by a modal; the body loses it once no modal holds it.
4068
+ * Does nothing for a modal that holds no class.
4069
+ * @since 5.7.38
4070
+ * @param modal the modal that added the class
4071
+ */
4072
+ removeOpenClass(modal: ModalComponent): void;
4032
4073
  static ɵfac: i0.ɵɵFactoryDeclaration<ModalService, never>;
4033
4074
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
4034
4075
  }
@@ -4096,7 +4137,7 @@ export declare class OffcanvasComponent implements OnInit, OnDestroy {
4096
4137
  */
4097
4138
  readonly ariaModal: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
4098
4139
  /**
4099
- * Allow body scrolling while offcanvas is visible.
4140
+ * Allow body scrolling while the offcanvas is open. Changes apply while it is open.
4100
4141
  * @returns boolean
4101
4142
  * @default false
4102
4143
  */
@@ -4119,6 +4160,7 @@ export declare class OffcanvasComponent implements OnInit, OnDestroy {
4119
4160
  readonly visibleChange: import("@angular/core").OutputEmitterRef<boolean>;
4120
4161
  readonly hostClasses: import("@angular/core").Signal<Record<string, boolean>>;
4121
4162
  readonly ariaHidden: import("@angular/core").Signal<true | null>;
4163
+ protected readonly hostInert: import("@angular/core").Signal<true | null>;
4122
4164
  get tabIndex(): string | null;
4123
4165
  get show(): boolean;
4124
4166
  set show(value: boolean);
@@ -4443,7 +4485,7 @@ export declare class PopoverComponent implements OnDestroy {
4443
4485
  };
4444
4486
  }, {}, never, never, true, never>;
4445
4487
  }
4446
- export declare class PopoverDirective implements OnDestroy, OnInit, AfterViewInit {
4488
+ export declare class PopoverDirective implements OnDestroy, OnInit, AfterViewChecked, AfterViewInit {
4447
4489
  #private;
4448
4490
  /**
4449
4491
  * Content of popover
@@ -4487,17 +4529,16 @@ export declare class PopoverDirective implements OnDestroy, OnInit, AfterViewIni
4487
4529
  readonly visible: import("@angular/core").ModelSignal<boolean>;
4488
4530
  get ariaDescribedBy(): string | null;
4489
4531
  private tooltip;
4490
- private tooltipId;
4491
4532
  private tooltipRef;
4492
- private popperInstance;
4533
+ private popperInstance?;
4493
4534
  private _popperOptions;
4535
+ ngAfterViewChecked(): void;
4494
4536
  ngAfterViewInit(): void;
4495
4537
  ngOnDestroy(): void;
4496
4538
  ngOnInit(): void;
4497
4539
  private setListeners;
4498
4540
  private clearListeners;
4499
4541
  private intersectionServiceSubscribe;
4500
- private getUID;
4501
4542
  private createTooltipElement;
4502
4543
  private destroyTooltipElement;
4503
4544
  private addTooltipElement;
@@ -4815,16 +4856,6 @@ type SearchButtonShortcut = {
4815
4856
  };
4816
4857
  shortcut: string;
4817
4858
  };
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
4859
  interface IIntersectionObserverInit {
4829
4860
  root?: Element | null;
4830
4861
  rootMargin?: string;
@@ -4910,6 +4941,12 @@ export declare class ColorModeService {
4910
4941
  }
4911
4942
  export declare class UIDService {
4912
4943
  #private;
4944
+ /**
4945
+ * Returns an id no other call on this service instance returns, skipping ids already in the document.
4946
+ * The random infix, drawn once per instance, keeps it apart from other instances, applications and page ids.
4947
+ * @param prefix id prefix
4948
+ * @returns `${prefix}-${infix}-${count}`
4949
+ */
4913
4950
  getUID(prefix?: string): string;
4914
4951
  static ɵfac: i0.ɵɵFactoryDeclaration<UIDService, never>;
4915
4952
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
@@ -5219,14 +5256,6 @@ interface INavData {
5219
5256
  wrapper?: INavWrapper;
5220
5257
  linkProps?: INavLinkProps$1;
5221
5258
  }
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
5259
  export declare class SidebarNavHelper {
5231
5260
  itemType(item: INavData): string;
5232
5261
  isActive(router: any, item: INavData): boolean;
@@ -6435,7 +6464,7 @@ export declare class TooltipComponent implements OnDestroy {
6435
6464
  };
6436
6465
  }, {}, never, never, true, never>;
6437
6466
  }
6438
- export declare class TooltipDirective implements OnDestroy, OnInit, AfterViewInit {
6467
+ export declare class TooltipDirective implements OnDestroy, OnInit, AfterViewChecked, AfterViewInit {
6439
6468
  #private;
6440
6469
  /**
6441
6470
  * Content of tooltip
@@ -6479,17 +6508,16 @@ export declare class TooltipDirective implements OnDestroy, OnInit, AfterViewIni
6479
6508
  readonly visible: import("@angular/core").ModelSignal<boolean>;
6480
6509
  get ariaDescribedBy(): string | null;
6481
6510
  private tooltip;
6482
- private tooltipId;
6483
6511
  private tooltipRef;
6484
- private popperInstance;
6512
+ private popperInstance?;
6485
6513
  private _popperOptions;
6514
+ ngAfterViewChecked(): void;
6486
6515
  ngAfterViewInit(): void;
6487
6516
  ngOnDestroy(): void;
6488
6517
  ngOnInit(): void;
6489
6518
  private setListeners;
6490
6519
  private clearListeners;
6491
6520
  private intersectionServiceSubscribe;
6492
- private getUID;
6493
6521
  private createTooltipElement;
6494
6522
  private destroyTooltipElement;
6495
6523
  private addTooltipElement;
@@ -6800,7 +6828,7 @@ export declare class WidgetStatCComponent extends CardComponent {
6800
6828
  "required": false;
6801
6829
  "isSignal": true;
6802
6830
  };
6803
- }, {}, ["contentTemplates"], ["*"], true, never>;
6831
+ }, {}, ["contentTemplates"], never, true, never>;
6804
6832
  }
6805
6833
  type WidgetStatDValue = {
6806
6834
  title?: string;
@@ -6894,7 +6922,7 @@ export declare class WidgetStatFComponent extends CardComponent {
6894
6922
  readonly titleClasses: import("@angular/core").Signal<Record<string, boolean>>;
6895
6923
  readonly valueClasses: import("@angular/core").Signal<Record<string, boolean>>;
6896
6924
  static ɵfac: i0.ɵɵFactoryDeclaration<WidgetStatFComponent, never>;
6897
- static ɵcmp: i0.ɵɵComponentDeclaration<WidgetStatFComponent, "c-widget-stat-f", ["cWidgetStatB"], {
6925
+ static ɵcmp: i0.ɵɵComponentDeclaration<WidgetStatFComponent, "c-widget-stat-f", ["cWidgetStatF", "cWidgetStatB"], {
6898
6926
  "footer": {
6899
6927
  "alias": "footer";
6900
6928
  "required": false;