@koobiq/components 19.8.5 → 19.8.6

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 (193) hide show
  1. package/accordion/accordion-content.directive.d.ts +23 -3
  2. package/accordion/accordion-trigger.component.d.ts +1 -0
  3. package/accordion/accordion.component.scss +4 -1
  4. package/alert/alert-tokens.scss +4 -4
  5. package/autocomplete/autocomplete-trigger.directive.d.ts +10 -5
  6. package/breadcrumbs/breadcrumbs.d.ts +2 -0
  7. package/breadcrumbs/breadcrumbs.scss +4 -0
  8. package/button/button-group.scss +42 -2
  9. package/button-toggle/button-toggle-tokens.scss +16 -0
  10. package/button-toggle/button-toggle.component.d.ts +3 -1
  11. package/button-toggle/button-toggle.scss +105 -1
  12. package/checkbox/checkbox.scss +5 -4
  13. package/clamped-text/clamped-text.d.ts +1 -0
  14. package/core/form-field/field-sizing-content.d.ts +0 -1
  15. package/core/form-field/form-field-ref.d.ts +1 -0
  16. package/core/form-field/index.d.ts +1 -0
  17. package/core/form-field/text-field-selection.d.ts +18 -0
  18. package/core/form-field/text-ruler.d.ts +16 -0
  19. package/core/navbar/rectangle-item.d.ts +8 -0
  20. package/core/option/_action-container-mixins.scss +28 -0
  21. package/core/option/_option-theme.scss +8 -0
  22. package/core/option/action.d.ts +9 -0
  23. package/core/option/action.scss +7 -0
  24. package/core/option/option.d.ts +10 -6
  25. package/core/pop-up/pop-up-trigger.d.ts +6 -0
  26. package/core/select/constants.d.ts +8 -1
  27. package/core/services/measure-scrollbar.service.d.ts +1 -0
  28. package/core/styles/common/_animation.scss +35 -24
  29. package/core/styles/common/_select.scss +17 -2
  30. package/core/styles/theming/_scrollbar-theme.scss +4 -0
  31. package/core/styles/typography/_typography.scss +8 -0
  32. package/core/utils/dom.d.ts +12 -0
  33. package/datepicker/datepicker-input.directive.d.ts +20 -5
  34. package/datepicker/datepicker.component.d.ts +4 -1
  35. package/dl/dl.component.d.ts +1 -0
  36. package/dl/dl.scss +10 -0
  37. package/dropdown/dropdown-item.component.d.ts +10 -2
  38. package/dropdown/dropdown-item.scss +16 -0
  39. package/dropdown/dropdown-trigger.directive.d.ts +6 -1
  40. package/dropdown/dropdown.component.d.ts +6 -1
  41. package/dropdown/dropdown.module.d.ts +1 -1
  42. package/dropdown/dropdown.scss +18 -3
  43. package/ellipsis-center/ellipsis-center.directive.d.ts +35 -2
  44. package/fesm2022/koobiq-components-accordion.mjs +104 -16
  45. package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
  46. package/fesm2022/koobiq-components-alert.mjs +2 -2
  47. package/fesm2022/koobiq-components-app-switcher.mjs +6 -6
  48. package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
  49. package/fesm2022/koobiq-components-autocomplete.mjs +21 -9
  50. package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
  51. package/fesm2022/koobiq-components-breadcrumbs.mjs +10 -5
  52. package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
  53. package/fesm2022/koobiq-components-button-toggle.mjs +8 -5
  54. package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
  55. package/fesm2022/koobiq-components-button.mjs +4 -4
  56. package/fesm2022/koobiq-components-button.mjs.map +1 -1
  57. package/fesm2022/koobiq-components-checkbox.mjs +2 -2
  58. package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
  59. package/fesm2022/koobiq-components-clamped-text.mjs +4 -0
  60. package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
  61. package/fesm2022/koobiq-components-code-block.mjs +14 -5
  62. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  63. package/fesm2022/koobiq-components-content-panel.mjs +5 -4
  64. package/fesm2022/koobiq-components-content-panel.mjs.map +1 -1
  65. package/fesm2022/koobiq-components-core.mjs +234 -64
  66. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  67. package/fesm2022/koobiq-components-datepicker.mjs +73 -49
  68. package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
  69. package/fesm2022/koobiq-components-dl.mjs +5 -4
  70. package/fesm2022/koobiq-components-dl.mjs.map +1 -1
  71. package/fesm2022/koobiq-components-dropdown.mjs +65 -22
  72. package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
  73. package/fesm2022/koobiq-components-ellipsis-center.mjs +77 -22
  74. package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
  75. package/fesm2022/koobiq-components-file-upload.mjs +12 -12
  76. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  77. package/fesm2022/koobiq-components-filter-bar.mjs +152 -46
  78. package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
  79. package/fesm2022/koobiq-components-form-field.mjs +2 -2
  80. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  81. package/fesm2022/koobiq-components-icon.mjs +1 -1
  82. package/fesm2022/koobiq-components-icon.mjs.map +1 -1
  83. package/fesm2022/koobiq-components-inline-edit.mjs +26 -5
  84. package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
  85. package/fesm2022/koobiq-components-list.mjs +12 -22
  86. package/fesm2022/koobiq-components-list.mjs.map +1 -1
  87. package/fesm2022/koobiq-components-markdown.mjs +4 -1
  88. package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
  89. package/fesm2022/koobiq-components-modal.mjs +53 -12
  90. package/fesm2022/koobiq-components-modal.mjs.map +1 -1
  91. package/fesm2022/koobiq-components-navbar.mjs +29 -13
  92. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  93. package/fesm2022/koobiq-components-notification-center.mjs +45 -7
  94. package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
  95. package/fesm2022/koobiq-components-overflow-items.mjs +4 -0
  96. package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
  97. package/fesm2022/koobiq-components-popover.mjs +35 -18
  98. package/fesm2022/koobiq-components-popover.mjs.map +1 -1
  99. package/fesm2022/koobiq-components-radio.mjs +3 -7
  100. package/fesm2022/koobiq-components-radio.mjs.map +1 -1
  101. package/fesm2022/koobiq-components-resizer.mjs +23 -4
  102. package/fesm2022/koobiq-components-resizer.mjs.map +1 -1
  103. package/fesm2022/koobiq-components-select.mjs +126 -29
  104. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  105. package/fesm2022/koobiq-components-sidebar.mjs +10 -0
  106. package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
  107. package/fesm2022/koobiq-components-sidepanel.mjs +34 -10
  108. package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
  109. package/fesm2022/koobiq-components-splitter.mjs +4 -0
  110. package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
  111. package/fesm2022/koobiq-components-tabs.mjs +27 -7
  112. package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
  113. package/fesm2022/koobiq-components-tags.mjs +3 -1
  114. package/fesm2022/koobiq-components-tags.mjs.map +1 -1
  115. package/fesm2022/koobiq-components-textarea.mjs +7 -14
  116. package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
  117. package/fesm2022/koobiq-components-timepicker.mjs +44 -19
  118. package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
  119. package/fesm2022/koobiq-components-timezone.mjs +10 -4
  120. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  121. package/fesm2022/koobiq-components-title.mjs +41 -3
  122. package/fesm2022/koobiq-components-title.mjs.map +1 -1
  123. package/fesm2022/koobiq-components-toast.mjs +31 -3
  124. package/fesm2022/koobiq-components-toast.mjs.map +1 -1
  125. package/fesm2022/koobiq-components-toggle.mjs +2 -2
  126. package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
  127. package/fesm2022/koobiq-components-tooltip.mjs +4 -1
  128. package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
  129. package/fesm2022/koobiq-components-tree-select.mjs +36 -12
  130. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  131. package/fesm2022/koobiq-components-tree.mjs +41 -37
  132. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  133. package/fesm2022/koobiq-components-username.mjs +2 -2
  134. package/fesm2022/koobiq-components-username.mjs.map +1 -1
  135. package/file-upload/dropzone.d.ts +0 -1
  136. package/file-upload/file-upload.scss +11 -0
  137. package/file-upload/multiple-file-upload.component.scss +29 -3
  138. package/file-upload/primitives/file-picker.d.ts +1 -1
  139. package/file-upload/single-file-upload.component.scss +10 -2
  140. package/filter-bar/filter-bar.d.ts +1 -1
  141. package/filter-bar/pipes/base-pipe.d.ts +31 -0
  142. package/filter-bar/pipes/pipe-date.d.ts +1 -1
  143. package/filter-bar/pipes/pipe-datetime.d.ts +1 -1
  144. package/form-field/fieldset.scss +10 -0
  145. package/inline-edit/inline-edit.d.ts +5 -0
  146. package/inline-edit/inline-edit.scss +7 -7
  147. package/link/_link-theme.scss +50 -15
  148. package/list/_list-theme.scss +12 -0
  149. package/list/list-selection.component.d.ts +1 -0
  150. package/list/list.scss +2 -9
  151. package/modal/modal-tokens.scss +1 -1
  152. package/modal/modal.component.d.ts +9 -1
  153. package/modal/modal.directive.d.ts +11 -0
  154. package/modal/modal.type.d.ts +7 -0
  155. package/navbar/_navbar-item_horizontal.scss +5 -0
  156. package/navbar/_navbar-item_vertical.scss +7 -5
  157. package/navbar/navbar-item.component.d.ts +15 -0
  158. package/navbar/navbar.component.d.ts +1 -0
  159. package/navbar/vertical-navbar.scss +6 -0
  160. package/notification-center/notification-center.d.ts +13 -1
  161. package/notification-center/notification-center.scss +12 -0
  162. package/notification-center/notification-item.scss +6 -0
  163. package/overflow-items/overflow-items.d.ts +1 -0
  164. package/package.json +4 -4
  165. package/prebuilt-themes/dark-theme.css +1 -1
  166. package/prebuilt-themes/light-theme.css +1 -1
  167. package/prebuilt-themes/theme.css +1 -1
  168. package/radio/radio.component.d.ts +1 -5
  169. package/radio/radio.scss +18 -4
  170. package/resizer/resizer.d.ts +12 -0
  171. package/schematics/ng-add/index.js +2 -2
  172. package/select/select-option.directive.d.ts +1 -0
  173. package/select/select.component.d.ts +29 -4
  174. package/sidebar/sidebar.component.d.ts +3 -0
  175. package/sidepanel/sidepanel-directives.d.ts +2 -0
  176. package/sidepanel/sidepanel.service.d.ts +8 -0
  177. package/splitter/splitter.component.d.ts +1 -0
  178. package/tabs/tab-body.component.d.ts +2 -0
  179. package/tabs/tab-header.component.d.ts +1 -0
  180. package/tabs/tab-header.scss +1 -0
  181. package/tabs/tab-nav-bar.d.ts +1 -0
  182. package/tabs/tabs-tokens.scss +1 -1
  183. package/textarea/textarea.component.d.ts +0 -1
  184. package/timepicker/timepicker.directive.d.ts +3 -0
  185. package/timezone/timezone-option.directive.d.ts +1 -0
  186. package/title/title.directive.d.ts +21 -0
  187. package/toast/toast-container.component.d.ts +25 -0
  188. package/tree/_tree-theme.scss +5 -11
  189. package/tree/toggle.scss +4 -0
  190. package/tree/tree-option.component.d.ts +3 -0
  191. package/tree/tree-option.scss +2 -12
  192. package/tree/tree-selection.component.d.ts +1 -0
  193. package/tree-select/tree-select.component.d.ts +9 -2
@@ -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.5");
31
- utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/angular-luxon-adapter', "^19.8.5");
30
+ utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/cdk', "^19.8.6");
31
+ utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/angular-luxon-adapter', "^19.8.6");
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");
@@ -5,6 +5,7 @@ export declare class KbqOptionTooltip extends KbqTooltipTrigger implements After
5
5
  private readonly option;
6
6
  private readonly resizeObserver;
7
7
  private readonly contentObserver;
8
+ private readonly isBrowser;
8
9
  private readonly debounceInterval;
9
10
  private resizeSubscription;
10
11
  private contentObserverSubscription;
@@ -121,6 +121,12 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
121
121
  selectionModel: SelectionModel<KbqOptionBase>;
122
122
  /** Previously selected options before the current selection was made. */
123
123
  previousSelectionModelSelected: KbqOptionBase[];
124
+ /**
125
+ * Detached copies of the selected options, captured while the option was still rendered.
126
+ * `cdk-virtual-scroll` recycles option views, so a `KbqOption` kept in `selectionModel` can
127
+ * silently start carrying another item's value and label — the copy preserves the original ones.
128
+ */
129
+ private readonly selectedOptionCopies;
124
130
  /** Manages keyboard events for options in the panel. */
125
131
  keyManager: ActiveDescendantKeyManager<KbqOption>;
126
132
  /** The value of the select panel's transform-origin property for animations. */
@@ -366,7 +372,7 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
366
372
  private closeSubscription;
367
373
  /** Subscription to the options panel scroll event used by `scrolledToBottom`. */
368
374
  private scrollSubscription;
369
- /** The scroll position of the overlay panel, calculated to center the selected option. */
375
+ /** The scroll offset the panel is restored to when it attaches — the list always opens at the top. */
370
376
  private scrollTop;
371
377
  /** Unique id for this input. Auto-incremented for each instance. */
372
378
  private readonly uid;
@@ -543,6 +549,12 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
543
549
  private getTotalItemsWidthInMatcher;
544
550
  /**
545
551
  * Calculates the width of a single item including margins.
552
+ *
553
+ * The elements measured here are `kbq-tag`s, which are `border-box` and carry horizontal
554
+ * padding. `getComputedStyle().width` resolves to the used content-box width whatever
555
+ * `box-sizing` says, so it dropped that padding from every tag and the matcher believed more
556
+ * tags fit than actually do. `getBoundingClientRect()` is always the border box — the same fix
557
+ * `kbqGetPanelWidthOrigin()` carries for the dropdown trigger.
546
558
  * @param element The DOM element to measure.
547
559
  * @returns Total width including margins and gap.
548
560
  */
@@ -556,6 +568,8 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
556
568
  * Defers execution to avoid change detection errors.
557
569
  */
558
570
  private initializeSelection;
571
+ /** Whether the key manager has no active item, or its active item is missing from the current options list. */
572
+ private isActiveItemStale;
559
573
  /**
560
574
  * Sets the selected option based on a value.
561
575
  * If no option can be found with the designated value, the select trigger is cleared.
@@ -569,16 +583,28 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
569
583
  */
570
584
  private getCorrespondOption;
571
585
  /**
572
- * Finds and selects and option based on its value.
573
- * @returns Option that has the corresponding value.
586
+ * Finds and selects an option based on its value.
587
+ * @returns Option that has the corresponding value, when it is currently rendered.
574
588
  */
575
589
  private selectValue;
590
+ /**
591
+ * Builds a detached option for a value whose `KbqOption` is not rendered, or returns `undefined`
592
+ * when the value cannot be resolved and the consumer gave no way to render it.
593
+ */
594
+ private createVirtualOptionForValue;
576
595
  /**
577
596
  * Single entry point for building a `KbqVirtualOption` from a raw value.
578
597
  * Uses the consumer-provided `virtualOptionFactory` when set, otherwise
579
598
  * wraps the raw value with the select's current `disabled` state.
580
599
  */
581
600
  private createVirtualOption;
601
+ /**
602
+ * Remembers the value and the label of a selected option while its view is still live, so that the
603
+ * selection survives the view being recycled by `cdk-virtual-scroll` for another item.
604
+ */
605
+ private captureSelectedOptionCopy;
606
+ /** Copy of `option` when its view has been recycled for another item, otherwise `option` itself. */
607
+ private resolveSelectedOption;
582
608
  /** Sets up a key manager to listen to keyboard events on the overlay panel. */
583
609
  private initKeyManager;
584
610
  /** Drops current option subscriptions and IDs and resets from scratch. */
@@ -594,7 +620,6 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
594
620
  * the first item instead.
595
621
  */
596
622
  private highlightCorrectOption;
597
- /** Scrolls the active option into view. */
598
623
  private scrollActiveOptionIntoView;
599
624
  /** Gets how wide the overlay panel should be. */
600
625
  private getOverlayWidth;
@@ -32,6 +32,9 @@ export declare class KbqSidebar implements OnDestroy, AfterContentInit {
32
32
  protected readonly document: Document;
33
33
  private readonly renderer;
34
34
  private readonly changeDetectorRef;
35
+ private readonly isBrowser;
36
+ /** Set once the view is torn down; the animation can still report done after that. */
37
+ private isDestroyed;
35
38
  get opened(): boolean;
36
39
  set opened(value: boolean);
37
40
  private _opened;
@@ -11,6 +11,7 @@ export declare class KbqSidepanelClose implements OnInit, OnChanges {
11
11
  private sidepanelService;
12
12
  sidepanelResult: any;
13
13
  kbqSidepanelClose: any;
14
+ private readonly renderer;
14
15
  constructor(sidepanelRef: KbqSidepanelRef, elementRef: ElementRef<HTMLElement>, sidepanelService: KbqSidepanelService);
15
16
  ngOnInit(): void;
16
17
  ngOnChanges(changes: SimpleChanges): void;
@@ -38,6 +39,7 @@ export declare class KbqSidepanelHeader {
38
39
  export declare class KbqSidepanelBody {
39
40
  private readonly sidepanelRef;
40
41
  private readonly elementRef;
42
+ constructor();
41
43
  /** @docs-private */
42
44
  protected checkOverflow(): void;
43
45
  static ɵfac: i0.ɵɵFactoryDeclaration<KbqSidepanelBody, never>;
@@ -47,6 +47,14 @@ export declare class KbqSidepanelService implements OnDestroy {
47
47
  private closeSidepanels;
48
48
  private getOpenedSidepanelsWithSamePosition;
49
49
  private updateAnimationState;
50
+ /**
51
+ * Moves a sidepanel into `state`, unless it is closing already.
52
+ *
53
+ * The exit animation is what disposes the overlay, so interrupting it with another state leaves the
54
+ * sidepanel in the DOM and in `openedSidepanels` for good — which is what closing a stack of them as
55
+ * a group used to do to the panels underneath.
56
+ */
57
+ private setAnimationState;
50
58
  /**
51
59
  * Removes a sidepanel from the array of open sidepanels.
52
60
  * @param sidepanelRef Sidepanel to be removed.
@@ -113,6 +113,7 @@ export declare class KbqSplitterAreaDirective implements AfterViewInit, OnDestro
113
113
  private splitter;
114
114
  readonly sizeChange: EventEmitter<number>;
115
115
  private readonly window;
116
+ private readonly platform;
116
117
  constructor(elementRef: ElementRef<HTMLElement>, renderer: Renderer2, splitter: KbqSplitterComponent);
117
118
  isResizing(): boolean;
118
119
  disableFlex(): void;
@@ -28,6 +28,8 @@ export type KbqTabBodyOriginState = 'left' | 'right';
28
28
  export declare class KbqTabBody implements OnInit, OnDestroy {
29
29
  private readonly elementRef;
30
30
  private readonly dir;
31
+ /** Set once the view is torn down; the animation callbacks can still fire after that. */
32
+ private isDestroyed;
31
33
  /** The shifted index position of the tab body, where zero represents the active center tab. */
32
34
  set position(position: number);
33
35
  /** Tab body position state. Used by the animation trigger for the current state. */
@@ -23,6 +23,7 @@ export declare class KbqTabHeader extends KbqPaginatedTabHeader {
23
23
  readonly tabList: ElementRef;
24
24
  readonly nextPaginator: ElementRef<HTMLElement>;
25
25
  readonly previousPaginator: ElementRef<HTMLElement>;
26
+ private readonly isBrowser;
26
27
  /** Width of the active tab, adjusted for icon-only tab margins. */
27
28
  protected get activeTabOffsetWidth(): number | undefined;
28
29
  /** Left offset of the active tab, adjusted for icon-only tab margins. */
@@ -8,6 +8,7 @@
8
8
  overflow: hidden;
9
9
  position: relative;
10
10
  flex-shrink: 0;
11
+ border-radius: var(--kbq-tabs-size-tab-stack-horizontal-border-radius);
11
12
  }
12
13
 
13
14
  .kbq-tab-list__content {
@@ -10,6 +10,7 @@ export declare class KbqTabNavBar extends KbqPaginatedTabHeader implements After
10
10
  readonly nextPaginator: ElementRef<HTMLElement>;
11
11
  readonly previousPaginator: ElementRef<HTMLElement>;
12
12
  readonly items: QueryList<KbqTabLink>;
13
+ private readonly isBrowser;
13
14
  /** Whether the nav bar background should be transparent. */
14
15
  transparent: boolean;
15
16
  onSurface: boolean;
@@ -5,7 +5,7 @@
5
5
  --kbq-tabs-size-tab-item-content-gap-horizontal: var(--kbq-size-xxs);
6
6
  --kbq-tabs-size-tab-item-border-radius: var(--kbq-size-s);
7
7
  --kbq-tabs-size-tab-item-focus-outline-width: var(--kbq-size-3xs);
8
- --kbq-tabs-size-tab-stack-horizontal-border-radius: var(--kbq-size-s);
8
+ --kbq-tabs-size-tab-stack-horizontal-border-radius: var(--kbq-size-border-radius);
9
9
  --kbq-tabs-size-tab-stack-vertical-content-gap-vertical: var(--kbq-size-s);
10
10
  /* THEME TOKENS */
11
11
  --kbq-tabs-tab-item-filled-on-background-default-background: transparent;
@@ -85,7 +85,6 @@ export declare class KbqTextarea implements KbqFormFieldControl<any>, OnInit, On
85
85
  private _id;
86
86
  private _required;
87
87
  private valueAccessor;
88
- private growSubscription;
89
88
  private lineHeight;
90
89
  private minHeight;
91
90
  private rowsCount;
@@ -123,6 +123,8 @@ export declare class KbqTimepicker<D> implements KbqFormFieldControl<D>, Control
123
123
  private formatUserInput;
124
124
  private replaceSymbols;
125
125
  private replaceNumbers;
126
+ /** Clamps a time part to the allowed maximum and trims it to two digits */
127
+ private normalizeTimePart;
126
128
  /** Checks whether the input is invalid based on the native validation. */
127
129
  private isBadInput;
128
130
  private spaceKeyHandler;
@@ -148,6 +150,7 @@ export declare class KbqTimepicker<D> implements KbqFormFieldControl<D>, Control
148
150
  private maxValidator;
149
151
  private getValidDateOrNull;
150
152
  private setViewValue;
153
+ private setSelection;
151
154
  private updateView;
152
155
  /** @docs-private */
153
156
  updateErrorState(): void;
@@ -7,6 +7,7 @@ export declare class KbqTimezoneOptionTooltip extends KbqTooltipTrigger implemen
7
7
  private readonly changeDetectorRef;
8
8
  private readonly resizeObserver;
9
9
  private readonly contentObserver;
10
+ private readonly platform;
10
11
  private readonly debounceInterval;
11
12
  private resizeSubscription;
12
13
  private contentObserverSubscription;
@@ -6,16 +6,37 @@ import * as i0 from "@angular/core";
6
6
  export declare class KbqTitleDirective extends KbqTooltipTrigger implements AfterViewInit, OnDestroy {
7
7
  private componentInstance?;
8
8
  private readonly nativeElement;
9
+ /** SSR-safe window reference used for `getComputedStyle` reads. */
10
+ private readonly window;
9
11
  private contentObserver;
10
12
  set trigger(value: string);
11
13
  get trigger(): string;
12
14
  get isOverflown(): boolean;
13
15
  get isHorizontalOverflown(): boolean;
14
16
  get isVerticalOverflown(): boolean;
17
+ /**
18
+ * Compares measured widths, treating only *visible* clipping as overflow. With `text-overflow: ellipsis`
19
+ * any positive difference counts (even a sub-pixel overflow shows `…`). With `text-overflow: clip` the
20
+ * widths are rounded to whole CSS pixels first — mirroring the integer `offsetWidth`/`scrollWidth` path —
21
+ * so an imperceptible sub-pixel clip is not treated as truncation.
22
+ * @docs-private */
23
+ private isWidthOverflown;
15
24
  get viewValue(): string;
16
25
  get parent(): HTMLElement;
17
26
  get child(): HTMLElement;
18
27
  get hasOnlyText(): boolean;
28
+ /**
29
+ * Whether the measured text truncates with an ellipsis on either the child text element or its
30
+ * wrapping container. Only then is a sub-pixel overflow actually visible (the trailing glyph is
31
+ * replaced by `…`); with the default `text-overflow: clip` a sub-pixel clip is imperceptible, so
32
+ * it must not be reported as truncation. Both elements are checked because `text-overflow` is not
33
+ * inherited and consumers place it differently: `KbqOption`/`KbqDropdownItem` style the measured
34
+ * `child`, whereas `KbqTreeOption` styles the `parent` container that wraps the child.
35
+ * @docs-private */
36
+ private get hasEllipsis();
37
+ /** Whether the element's computed `text-overflow` renders an ellipsis.
38
+ * @docs-private */
39
+ private elementHasEllipsis;
19
40
  readonly resizeStream: Subject<Event>;
20
41
  private readonly debounceInterval;
21
42
  private resizeSubscription;
@@ -1,5 +1,6 @@
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';
3
4
  import { KbqToastService } from './toast.service';
4
5
  import { KbqToastData } from './toast.type';
5
6
  import * as i0 from "@angular/core";
@@ -8,11 +9,35 @@ export declare class KbqToastContainerComponent extends CdkScrollable {
8
9
  private changeDetectorRef;
9
10
  readonly service: KbqToastService;
10
11
  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
22
  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>;
12
29
  createToast<C>(data: KbqToastData, componentType: any, onTop: boolean): ComponentRef<C>;
13
30
  createTemplate<C>(data: KbqToastData, template: TemplateRef<any>, onTop: boolean): EmbeddedViewRef<C>;
14
31
  remove(viewRef: ViewRef): void;
15
32
  getInjector(data: KbqToastData): Injector;
33
+ /**
34
+ * Fakes a scroll on the container so that overlays anchored inside a toast are repositioned by their
35
+ * `RepositionScrollStrategy` when the stack shifts.
36
+ *
37
+ * @deprecated The container reports its own reflow through `elementScrolled()`, so nothing calls this.
38
+ * It is kept only for callers that already hold a container reference — the instance created by
39
+ * `KbqToastService` is not exposed.
40
+ */
16
41
  dispatchScrollEvent: () => void;
17
42
  static ɵfac: i0.ɵɵFactoryDeclaration<KbqToastContainerComponent, never>;
18
43
  static ɵcmp: i0.ɵɵComponentDeclaration<KbqToastContainerComponent, "kbq-toast-container", never, {}, {}, never, never, true, never>;
@@ -11,11 +11,6 @@
11
11
  color: var(--kbq-tree-#{$state-name}-text-color);
12
12
  }
13
13
 
14
- .kbq-tree-node-toggle .kbq-icon.kbq-empty,
15
- .kbq-icon.kbq-empty.kbq-tree-node-toggle {
16
- color: var(--kbq-tree-#{$state-name}-tree-toggle-color);
17
- }
18
-
19
14
  .kbq-option-action .kbq-icon.kbq-empty {
20
15
  color: var(--kbq-tree-#{$state-name}-action-button-color);
21
16
  }
@@ -69,19 +64,18 @@
69
64
  &.kbq-disabled {
70
65
  @include kbq-tree-option(states-disabled);
71
66
 
72
- & .kbq-icon.kbq-empty {
67
+ & .kbq-icon.kbq-empty:not(.kbq-tree-node-toggle .kbq-icon) {
73
68
  color: var(--kbq-states-icon-disabled);
74
69
  }
75
70
  }
76
71
  }
77
72
 
78
- .cdk-keyboard-focused {
73
+ // Scoped to the tree's own focus-monitored host, matching `kbq-option-action-visibility`. A bare
74
+ // `.cdk-keyboard-focused` would also match an outer monitored ancestor (e.g. the tree-select panel),
75
+ // drawing the focus ring on a row whose action button stays correctly hidden.
76
+ .kbq-tree-selection.cdk-keyboard-focused {
79
77
  & .kbq-tree-option.kbq-focused:not(.kbq-action-button-focused) {
80
78
  border-color: var(--kbq-tree-states-focused-focus-outline-color);
81
-
82
- & .kbq-action-container {
83
- display: flex;
84
- }
85
79
  }
86
80
  }
87
81
  }
package/tree/toggle.scss CHANGED
@@ -27,6 +27,10 @@
27
27
 
28
28
  &[disabled] {
29
29
  cursor: default;
30
+
31
+ & .kbq-icon {
32
+ color: var(--kbq-tree-states-disabled-tree-toggle-color);
33
+ }
30
34
  }
31
35
  }
32
36
 
@@ -30,7 +30,10 @@ export declare class KbqTreeOption extends KbqTreeNode<KbqTreeOption> implements
30
30
  readonly onFocus: Subject<KbqTreeOptionEvent>;
31
31
  readonly onBlur: Subject<KbqTreeOptionEvent>;
32
32
  preventBlur: boolean;
33
+ /** Set once the option is destroyed; the tree can still emit a selection change for it after that. */
34
+ private isDestroyed;
33
35
  parentTextElement: ElementRef;
36
+ get textElement(): ElementRef;
34
37
  toggleElementDirective: KbqTreeNodeToggleBaseDirective<KbqTreeOption>;
35
38
  toggleElementComponent: KbqTreeNodeToggleBaseDirective<KbqTreeOption>;
36
39
  pseudoCheckbox: KbqPseudoCheckbox;
@@ -1,9 +1,11 @@
1
+ @use '../core/option/action-container-mixins' as action-container;
1
2
  @use '../core/styles/common';
2
3
  @use '../core/styles/common/tokens' as *;
3
4
  @use '../core/styles/common/vendor-prefixes';
4
5
 
5
6
  .kbq-tree-option {
6
7
  @include vendor-prefixes.user-select(none);
8
+ @include action-container.kbq-option-action-visibility('.kbq-tree-selection.cdk-keyboard-focused');
7
9
 
8
10
  position: relative;
9
11
 
@@ -57,20 +59,8 @@
57
59
  outline: none;
58
60
  }
59
61
 
60
- &.kbq-disabled .kbq-icon {
61
- cursor: default;
62
- }
63
-
64
62
  &:not(.kbq-disabled) {
65
63
  cursor: pointer;
66
-
67
- &:hover,
68
- &.kbq-hovered,
69
- &.kbq-action-button-focused {
70
- & .kbq-action-container {
71
- display: flex;
72
- }
73
- }
74
64
  }
75
65
 
76
66
  &:is(.kbq-checked, .kbq-selected, .kbq-focused):has(+ :is(.kbq-checked, .kbq-selected, .kbq-focused)) {
@@ -51,6 +51,7 @@ export declare class KbqTreeSelection extends KbqTreeBase<any> implements Contro
51
51
  private elementRef;
52
52
  private scheduler;
53
53
  private clipboard;
54
+ private readonly platform;
54
55
  protected readonly focusMonitor: FocusMonitor;
55
56
  /** Indicates whether this component is placed inside a KbqFormField component. */
56
57
  protected readonly inSelect: boolean;
@@ -125,6 +125,8 @@ export declare class KbqTreeSelect extends KbqAbstractSelect implements AfterCon
125
125
  */
126
126
  trigger: ElementRef;
127
127
  panel: ElementRef;
128
+ /** Scrollable option list inside the panel. */
129
+ protected optionsContainer: ElementRef<HTMLElement>;
128
130
  overlayDir: CdkConnectedOverlay;
129
131
  tags: QueryList<KbqTag>;
130
132
  cleaner: KbqCleaner;
@@ -241,7 +243,7 @@ export declare class KbqTreeSelect extends KbqAbstractSelect implements AfterCon
241
243
  private closeSubscription;
242
244
  private _panelOpen;
243
245
  private originalOnKeyDown;
244
- /** The scroll position of the overlay panel, calculated to center the selected option. */
246
+ /** The scroll offset the panel is restored to when it attaches — the list always opens at the top. */
245
247
  private scrollTop;
246
248
  /** Unique id for this input. */
247
249
  private readonly uid;
@@ -333,6 +335,12 @@ export declare class KbqTreeSelect extends KbqAbstractSelect implements AfterCon
333
335
  /** Gets how wide the overlay panel should be. */
334
336
  private getOverlayWidth;
335
337
  private buildTriggerClone;
338
+ /**
339
+ * Width of a single `kbq-tag` in the matcher, including margins and the inter-tag gap.
340
+ *
341
+ * Tags are `border-box` and carry horizontal padding, which `getComputedStyle().width` — always
342
+ * the used content-box width — leaves out. See the twin in `KbqSelect`.
343
+ */
336
344
  private getItemWidth;
337
345
  private refreshTriggerValues;
338
346
  /**
@@ -348,7 +356,6 @@ export declare class KbqTreeSelect extends KbqAbstractSelect implements AfterCon
348
356
  * the first item instead.
349
357
  */
350
358
  private highlightCorrectOption;
351
- /** Scrolls the active option into view. */
352
359
  private scrollActiveOptionIntoView;
353
360
  private subscribeOnSearchChanges;
354
361
  static ɵfac: i0.ɵɵFactoryDeclaration<KbqTreeSelect, [null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; host: true; }, { optional: true; self: true; }, { optional: true; }]>;