@koobiq/components 19.8.6 → 19.8.8

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 (51) hide show
  1. package/app-switcher/app-switcher.d.ts +9 -2
  2. package/core/styles/common/_select.scss +4 -1
  3. package/ellipsis-center/ellipsis-center.directive.d.ts +5 -0
  4. package/fesm2022/koobiq-components-app-switcher.mjs +2 -2
  5. package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
  6. package/fesm2022/koobiq-components-core.mjs +11 -4
  7. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  8. package/fesm2022/koobiq-components-ellipsis-center.mjs +6 -1
  9. package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
  10. package/fesm2022/koobiq-components-form-field.mjs +25 -4
  11. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  12. package/fesm2022/koobiq-components-loader-overlay.mjs +6 -2
  13. package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
  14. package/fesm2022/koobiq-components-navbar.mjs +44 -12
  15. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  16. package/fesm2022/koobiq-components-notification-center.mjs +2 -2
  17. package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
  18. package/fesm2022/koobiq-components-popover.mjs +4 -1
  19. package/fesm2022/koobiq-components-popover.mjs.map +1 -1
  20. package/fesm2022/koobiq-components-search-expandable.mjs +2 -1
  21. package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
  22. package/fesm2022/koobiq-components-select.mjs +50 -13
  23. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  24. package/fesm2022/koobiq-components-time-range.mjs +20 -2
  25. package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
  26. package/fesm2022/koobiq-components-timezone.mjs +9 -4
  27. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  28. package/fesm2022/koobiq-components-title.mjs +9 -4
  29. package/fesm2022/koobiq-components-title.mjs.map +1 -1
  30. package/fesm2022/koobiq-components-toast.mjs +26 -25
  31. package/fesm2022/koobiq-components-toast.mjs.map +1 -1
  32. package/fesm2022/koobiq-components-tooltip.mjs +42 -5
  33. package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
  34. package/fesm2022/koobiq-components-tree-select.mjs +22 -4
  35. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  36. package/form-field/form-field-control.d.ts +10 -0
  37. package/form-field/form-field.d.ts +17 -0
  38. package/navbar/navbar-brand.component.d.ts +1 -0
  39. package/navbar/navbar-brand.scss +12 -5
  40. package/navbar/navbar-item.component.d.ts +18 -1
  41. package/notification-center/notification-item.scss +4 -1
  42. package/package.json +4 -4
  43. package/schematics/ng-add/index.js +2 -2
  44. package/select/select-option.directive.d.ts +5 -0
  45. package/select/select.component.d.ts +22 -0
  46. package/time-range/time-range-title-as-form-field.d.ts +11 -0
  47. package/timezone/timezone-option.directive.d.ts +5 -0
  48. package/title/title.directive.d.ts +5 -0
  49. package/toast/toast-container.component.d.ts +8 -19
  50. package/tooltip/tooltip.component.d.ts +25 -1
  51. package/tree-select/tree-select.component.d.ts +15 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koobiq/components",
3
- "version": "19.8.6",
3
+ "version": "19.8.8",
4
4
  "description": "koobiq",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,9 +25,9 @@
25
25
  "@angular/cdk": ">=19.0.0",
26
26
  "@angular/core": ">=19.0.0",
27
27
  "@angular/forms": ">=19.0.0",
28
- "@koobiq/cdk": "19.8.6",
29
- "@koobiq/angular-moment-adapter": "19.8.6",
30
- "@koobiq/angular-luxon-adapter": "19.8.6",
28
+ "@koobiq/cdk": "19.8.8",
29
+ "@koobiq/angular-moment-adapter": "19.8.8",
30
+ "@koobiq/angular-luxon-adapter": "19.8.8",
31
31
  "@koobiq/date-formatter": "^3.2.3",
32
32
  "@koobiq/icons": "^11.1.3",
33
33
  "@koobiq/design-tokens": "^3.14.0"
@@ -27,8 +27,8 @@ function ngAdd(options) {
27
27
  }
28
28
  // Installing dependencies
29
29
  utils_packageConfig.addPackageToPackageJson(tree, '@angular/cdk', "^19.2.19");
30
- utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/cdk', "^19.8.6");
31
- utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/angular-luxon-adapter', "^19.8.6");
30
+ utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/cdk', "^19.8.8");
31
+ utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/angular-luxon-adapter', "^19.8.8");
32
32
  utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/date-formatter', "^3.5.1");
33
33
  utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/date-adapter', "^3.5.1");
34
34
  utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/icons', "^11.5.0");
@@ -2,6 +2,11 @@ import { AfterViewInit, OnDestroy } from '@angular/core';
2
2
  import { KbqTooltipTrigger } from '@koobiq/components/tooltip';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class KbqOptionTooltip extends KbqTooltipTrigger implements AfterViewInit, OnDestroy {
5
+ /**
6
+ * The hint repeats text the option had to clip, so `kbqTooltipDisabled="false"` cannot conjure one for an
7
+ * option that fits.
8
+ * @docs-private */
9
+ protected readonly derivedDisabledWins = true;
5
10
  private readonly option;
6
11
  private readonly resizeObserver;
7
12
  private readonly contentObserver;
@@ -112,6 +112,13 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
112
112
  readonly stateChanges: Subject<void>;
113
113
  /** A name for this control that can be used by `kbq-form-field`. */
114
114
  controlType: string;
115
+ /**
116
+ * A `kbq-select` is not a native labelable element, so the form-field's `<label for>` cannot
117
+ * associate with it. The select is named through `aria-labelledby` instead.
118
+ */
119
+ readonly isNativeLabelSupported = false;
120
+ /** `aria-labelledby` set on the host by the consumer, which outranks the form-field caption. */
121
+ private readonly ariaLabelledbyAttribute;
115
122
  hiddenItems: number;
116
123
  /** The last measured value for the trigger's client bounding rect. */
117
124
  triggerRect: DOMRect;
@@ -350,6 +357,14 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
350
357
  get isEmptySearchResult(): boolean;
351
358
  /** Whether the cleaner (clear button) should be shown. */
352
359
  get canShowCleaner(): boolean;
360
+ /**
361
+ * Id of the `kbq-form-field` caption naming this select, when it has one.
362
+ *
363
+ * A `<label for>` does not associate with a custom element, so the relationship is expressed the
364
+ * other way around — from the control to the label.
365
+ * @docs-private
366
+ */
367
+ protected get ariaLabelledby(): string | null;
353
368
  /** Returns the currently selected option(s). Single value or array for multiple selection. */
354
369
  get selected(): KbqOptionBase | KbqOptionBase[];
355
370
  /** Returns the display value for the trigger element. */
@@ -364,6 +379,12 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
364
379
  get firstSelected(): KbqOptionBase | null;
365
380
  /** Whether the first selected option is filtered (not visible in the list). */
366
381
  get firstFiltered(): boolean;
382
+ /**
383
+ * Whether the legacy `KbqValidateDirective` marks this control. The class it writes never changes
384
+ * after the host is created, so it is probed once instead of on every change detection pass.
385
+ */
386
+ private hasLegacyValidateDirective;
387
+ private readonly invalidState;
367
388
  /** @docs-private */
368
389
  get colorForState(): KbqComponentColors;
369
390
  /** Whether multiple choice is enabled. True if multiple or multiline mode is active. */
@@ -398,6 +419,7 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
398
419
  ngOnDestroy(): void;
399
420
  /** Updates the error state based on the error state matcher. */
400
421
  updateErrorState(): void;
422
+ private syncInvalidState;
401
423
  /**
402
424
  * Formats the hidden items text with the number of hidden items.
403
425
  * @param hiddenItemsText Template string with {{ number }} placeholder.
@@ -10,9 +10,12 @@ export declare class KbqTimeRangeTitlePlaceholder {
10
10
  /** Component simulates `KbqFormFieldControl` allowing to provide custom content inside `KbqFormField` */
11
11
  export declare class KbqTimeRangeTitleAsControl implements KbqFormFieldControl<any> {
12
12
  private timeRange;
13
+ private readonly parentFormField;
13
14
  /** @docs-private */
14
15
  controlType: string;
15
16
  /** @docs-private */
17
+ readonly isNativeLabelSupported = false;
18
+ /** @docs-private */
16
19
  stateChanges: Observable<void>;
17
20
  /** @docs-private */
18
21
  ngControl: NgControl | null;
@@ -36,6 +39,14 @@ export declare class KbqTimeRangeTitleAsControl implements KbqFormFieldControl<a
36
39
  onContainerClick(_event: MouseEvent): void;
37
40
  /** @docs-private */
38
41
  focus(_options?: FocusOptions): void;
42
+ /**
43
+ * Id of the `kbq-form-field` caption naming this control, when it has one.
44
+ *
45
+ * A `<label for>` does not associate with a custom element, so the relationship is expressed the
46
+ * other way around — from the control to the label.
47
+ * @docs-private
48
+ */
49
+ protected get ariaLabelledby(): string | null;
39
50
  static ɵfac: i0.ɵɵFactoryDeclaration<KbqTimeRangeTitleAsControl, never>;
40
51
  static ɵcmp: i0.ɵɵComponentDeclaration<KbqTimeRangeTitleAsControl, "kbq-time-range-title-as-control", never, {}, {}, never, ["*"], true, never>;
41
52
  }
@@ -3,6 +3,11 @@ import { KbqTooltipTrigger } from '@koobiq/components/tooltip';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare const TOOLTIP_VISIBLE_ROWS_COUNT = 3;
5
5
  export declare class KbqTimezoneOptionTooltip extends KbqTooltipTrigger implements AfterViewInit, OnDestroy {
6
+ /**
7
+ * The hint shows rows the option had to clip, so `kbqTooltipDisabled="false"` cannot conjure one for an
8
+ * option that fits.
9
+ * @docs-private */
10
+ protected readonly derivedDisabledWins = true;
6
11
  private readonly option;
7
12
  private readonly changeDetectorRef;
8
13
  private readonly resizeObserver;
@@ -5,6 +5,11 @@ import { Subject } from 'rxjs';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class KbqTitleDirective extends KbqTooltipTrigger implements AfterViewInit, OnDestroy {
7
7
  private componentInstance?;
8
+ /**
9
+ * The hint repeats text the host had to clip, so `kbqTooltipDisabled="false"` cannot conjure one for a
10
+ * fully visible title.
11
+ * @docs-private */
12
+ protected readonly derivedDisabledWins = true;
8
13
  private readonly nativeElement;
9
14
  /** SSR-safe window reference used for `getComputedStyle` reads. */
10
15
  private readonly window;
@@ -1,6 +1,5 @@
1
1
  import { CdkScrollable, ScrollDispatcher } from '@angular/cdk/overlay';
2
2
  import { ChangeDetectorRef, ComponentRef, ElementRef, EmbeddedViewRef, Injector, NgZone, TemplateRef, ViewContainerRef, ViewRef } from '@angular/core';
3
- import { Observable } from 'rxjs';
4
3
  import { KbqToastService } from './toast.service';
5
4
  import { KbqToastData } from './toast.type';
6
5
  import * as i0 from "@angular/core";
@@ -9,34 +8,24 @@ export declare class KbqToastContainerComponent extends CdkScrollable {
9
8
  private changeDetectorRef;
10
9
  readonly service: KbqToastService;
11
10
  viewContainer: ViewContainerRef;
12
- /**
13
- * Emits while the stack re-lays-out. Toasts are ordinary flow children, so removing one slides the
14
- * rest for as long as its height animates — and an overlay opened from inside a toast is anchored to
15
- * a trigger that is moving. CDK only re-measures the origin on a scroll or a viewport resize, so the
16
- * stack has to say when it moved.
17
- *
18
- * The container's own box tracks the reflow exactly: continuously while a leaving toast animates its
19
- * height away, and once for a removal that is not animated at all, such as a template toast.
20
- */
21
- private readonly reflowed;
11
+ private readonly overlayKeyboardDispatcher;
22
12
  constructor(injector: Injector, changeDetectorRef: ChangeDetectorRef, service: KbqToastService, elementRef: ElementRef<HTMLElement>, scrollDispatcher: ScrollDispatcher, ngZone: NgZone);
23
- /**
24
- * `ScrollDispatcher` subscribes to this method when the container registers itself, so merging the
25
- * reflow signal in re-broadcasts it to every overlay that repositions on scroll — which is what
26
- * `kbq-select` and the dropdown trigger do by default.
27
- */
28
- elementScrolled(): Observable<Event>;
29
13
  createToast<C>(data: KbqToastData, componentType: any, onTop: boolean): ComponentRef<C>;
30
14
  createTemplate<C>(data: KbqToastData, template: TemplateRef<any>, onTop: boolean): EmbeddedViewRef<C>;
31
15
  remove(viewRef: ViewRef): void;
32
16
  getInjector(data: KbqToastData): Injector;
17
+ /**
18
+ * Re-applies the position of every overlay anchored to an element; one whose origin has not moved stays where it
19
+ * is. CDK keeps no public registry of attached overlays, but its keyboard dispatcher tracks each of them.
20
+ */
21
+ private repositionConnectedOverlays;
33
22
  /**
34
23
  * Fakes a scroll on the container so that overlays anchored inside a toast are repositioned by their
35
24
  * `RepositionScrollStrategy` when the stack shifts.
36
25
  *
37
- * @deprecated The container reports its own reflow through `elementScrolled()`, so nothing calls this.
26
+ * @deprecated The container repositions the overlays anchored inside it on its own, so nothing calls this.
38
27
  * It is kept only for callers that already hold a container reference — the instance created by
39
- * `KbqToastService` is not exposed.
28
+ * `KbqToastService` is not exposed. The fake scroll also closes every close-on-scroll overlay of the app.
40
29
  */
41
30
  dispatchScrollEvent: () => void;
42
31
  static ɵfac: i0.ɵɵFactoryDeclaration<KbqToastContainerComponent, never>;
@@ -1,4 +1,5 @@
1
1
  import { FocusMonitor } from '@angular/cdk/a11y';
2
+ import { BooleanInput } from '@angular/cdk/coercion';
2
3
  import { Overlay, OverlayConfig, ScrollStrategy } from '@angular/cdk/overlay';
3
4
  import { AfterViewInit, ElementRef, EventEmitter, InjectionToken, OnDestroy, Renderer2, TemplateRef, Type, WritableSignal } from '@angular/core';
4
5
  import { KbqComponentColors, KbqParentPopup, KbqPopUp, KbqPopUpPlacementValues, KbqPopUpTrigger } from '@koobiq/components/core';
@@ -78,8 +79,24 @@ export declare class KbqTooltipTrigger extends KbqPopUpTrigger<KbqTooltipCompone
78
79
  set tooltipPlacementPriority(value: string | string[] | null);
79
80
  get content(): string | TemplateRef<any>;
80
81
  set content(content: string | TemplateRef<any>);
82
+ /**
83
+ * Input (`kbqTooltipDisabled`) controlling whether the tooltip is disabled; setting it to `true` hides it.
84
+ * `undefined` leaves the decision to the trigger, like an unset input.
85
+ *
86
+ * Reads back the *effective* state, which for triggers that derive one of their own (see
87
+ * `derivedDisabledWins`) is not necessarily the value that was written.
88
+ */
81
89
  get disabled(): boolean;
82
- set disabled(value: boolean);
90
+ set disabled(value: BooleanInput);
91
+ /**
92
+ * Whether the state this trigger derives means *there is nothing to show*, so an explicit
93
+ * `kbqTooltipDisabled="false"` cannot override it, as for a hint that repeats text the host never clipped.
94
+ * Otherwise the explicit value wins in both directions, so `false` on a wrapped control that is not disabled
95
+ * still asks for a tooltip.
96
+ * @docs-private */
97
+ protected readonly derivedDisabledWins: boolean;
98
+ private explicitlyDisabled;
99
+ private derivedDisabled;
83
100
  enterDelay: number;
84
101
  leaveDelay: number;
85
102
  get trigger(): string;
@@ -121,6 +138,13 @@ export declare class KbqTooltipTrigger extends KbqPopUpTrigger<KbqTooltipCompone
121
138
  getOverlayHandleComponentType(): Type<KbqTooltipComponent>;
122
139
  updateClassMap(newPlacement?: string): void;
123
140
  protected applyRelativeToPointer(): void;
141
+ /**
142
+ * Records the state this trigger derives from what it renders — the wrapped control being disabled, text
143
+ * overflow in `KbqTitleDirective` and the option tooltips — without overwriting `kbqTooltipDisabled`.
144
+ * @docs-private */
145
+ protected setDerivedDisabled(value: boolean): void;
146
+ private applyDisabled;
147
+ private foldDisabled;
124
148
  static ɵfac: i0.ɵɵFactoryDeclaration<KbqTooltipTrigger, never>;
125
149
  static ɵdir: i0.ɵɵDirectiveDeclaration<KbqTooltipTrigger, "[kbqTooltip]", ["kbqTooltip"], { "forDisabledComponent": { "alias": "forDisabledComponent"; "required": false; "isSignal": true; }; "ignoreTooltipPointerEvents": { "alias": "ignoreTooltipPointerEvents"; "required": false; "isSignal": true; }; "hideWithTimeout": { "alias": "hideWithTimeout"; "required": false; }; "tooltipVisible": { "alias": "kbqVisible"; "required": false; }; "tooltipPlacement": { "alias": "kbqPlacement"; "required": false; }; "relativeToPointer": { "alias": "kbqRelativeToPointer"; "required": false; }; "tooltipPlacementPriority": { "alias": "kbqPlacementPriority"; "required": false; }; "content": { "alias": "kbqTooltip"; "required": false; }; "disabled": { "alias": "kbqTooltipDisabled"; "required": false; }; "enterDelay": { "alias": "kbqEnterDelay"; "required": false; }; "leaveDelay": { "alias": "kbqLeaveDelay"; "required": false; }; "trigger": { "alias": "kbqTrigger"; "required": false; }; "customClass": { "alias": "kbqTooltipClass"; "required": false; }; "context": { "alias": "kbqTooltipContext"; "required": false; }; "color": { "alias": "kbqTooltipColor"; "required": false; }; "arrow": { "alias": "kbqTooltipArrow"; "required": false; }; "offset": { "alias": "kbqTooltipOffset"; "required": false; }; }, { "placementChange": "kbqPlacementChange"; "visibleChange": "kbqVisibleChange"; }, never, never, true, never>;
126
150
  static ngAcceptInputType_hideWithTimeout: unknown;
@@ -93,6 +93,13 @@ export declare class KbqTreeSelect extends KbqAbstractSelect implements AfterCon
93
93
  readonly stateChanges: Subject<void>;
94
94
  /** A name for this control that can be used by `kbq-form-field`. */
95
95
  controlType: string;
96
+ /**
97
+ * A `kbq-tree-select` is not a native labelable element, so the form-field's `<label for>` cannot
98
+ * associate with it. The control is named through `aria-labelledby` instead.
99
+ */
100
+ readonly isNativeLabelSupported = false;
101
+ /** `aria-labelledby` set on the host by the consumer, which outranks the form-field caption. */
102
+ private readonly ariaLabelledbyAttribute;
96
103
  hiddenItems: number;
97
104
  /** The last measured value for the trigger's client bounding rect. */
98
105
  triggerRect: DOMRect;
@@ -236,6 +243,14 @@ export declare class KbqTreeSelect extends KbqAbstractSelect implements AfterCon
236
243
  private _searchMinOptionsThreshold;
237
244
  get panelOpen(): boolean;
238
245
  get canShowCleaner(): boolean;
246
+ /**
247
+ * Id of the `kbq-form-field` caption naming this control, when it has one.
248
+ *
249
+ * A `<label for>` does not associate with a custom element, so the relationship is expressed the
250
+ * other way around — from the control to the label.
251
+ * @docs-private
252
+ */
253
+ protected get ariaLabelledby(): string | null;
239
254
  /** @docs-private */
240
255
  get colorForState(): KbqComponentColors;
241
256
  isEmptySearchResult: boolean;