@koobiq/components 20.1.0 → 20.3.0

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 (249) hide show
  1. package/accordion/_accordion-theme.scss +6 -2
  2. package/accordion/accordion-tokens.scss +3 -0
  3. package/accordion/{accordion-trigger.component.scss → accordion-trigger.scss} +10 -0
  4. package/accordion/accordion.scss +71 -0
  5. package/accordion/index.d.ts +264 -121
  6. package/actions-panel/index.d.ts +25 -13
  7. package/alert/_alert-theme.scss +14 -0
  8. package/alert/alert.component.scss +24 -13
  9. package/alert/index.d.ts +63 -29
  10. package/app-switcher/app-switcher-dropdown-app.scss +7 -5
  11. package/app-switcher/app-switcher-dropdown-site.scss +6 -4
  12. package/app-switcher/index.d.ts +41 -4
  13. package/app-switcher/kbq-app-switcher-list-item.scss +6 -8
  14. package/autocomplete/autocomplete.scss +2 -1
  15. package/autocomplete/index.d.ts +58 -37
  16. package/badge/index.d.ts +2 -3
  17. package/breadcrumbs/index.d.ts +1 -1
  18. package/button/index.d.ts +2 -2
  19. package/button-toggle/button-toggle-tokens.scss +2 -0
  20. package/button-toggle/button-toggle.scss +9 -0
  21. package/button-toggle/index.d.ts +5 -0
  22. package/checkbox/index.d.ts +33 -29
  23. package/clamped-text/index.d.ts +3 -2
  24. package/code-block/index.d.ts +24 -19
  25. package/content-panel/index.d.ts +1 -1
  26. package/core/index.d.ts +1217 -186
  27. package/core/option/_action-container-mixins.scss +28 -0
  28. package/core/option/_option-theme.scss +24 -0
  29. package/core/option/action.scss +7 -0
  30. package/core/styles/_core.scss +2 -0
  31. package/core/styles/_koobiq-theme.scss +2 -0
  32. package/core/styles/_tokens.scss +1 -0
  33. package/core/styles/common/_animation.scss +31 -24
  34. package/core/styles/common/_connected-overlay.scss +39 -0
  35. package/core/styles/common/_select.scss +19 -2
  36. package/core/styles/common/_tokens.scss +0 -9
  37. package/core/styles/theming/_index.scss +0 -1
  38. package/core/styles/theming/_theming.scss +34 -5
  39. package/datepicker/index.d.ts +46 -15
  40. package/dl/dl.scss +26 -0
  41. package/dl/index.d.ts +8 -1
  42. package/dropdown/_dropdown-theme.scss +28 -2
  43. package/dropdown/dropdown-item.scss +29 -0
  44. package/dropdown/dropdown-tokens.scss +2 -1
  45. package/dropdown/dropdown.scss +16 -1
  46. package/dropdown/index.d.ts +331 -17
  47. package/dynamic-translation/index.d.ts +1 -1
  48. package/fesm2022/koobiq-components-accordion.mjs +480 -317
  49. package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
  50. package/fesm2022/koobiq-components-actions-panel.mjs +57 -46
  51. package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
  52. package/fesm2022/koobiq-components-alert.mjs +98 -58
  53. package/fesm2022/koobiq-components-alert.mjs.map +1 -1
  54. package/fesm2022/koobiq-components-app-switcher.mjs +233 -38
  55. package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
  56. package/fesm2022/koobiq-components-autocomplete.mjs +89 -52
  57. package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
  58. package/fesm2022/koobiq-components-badge.mjs +18 -17
  59. package/fesm2022/koobiq-components-badge.mjs.map +1 -1
  60. package/fesm2022/koobiq-components-breadcrumbs.mjs +25 -25
  61. package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
  62. package/fesm2022/koobiq-components-button-toggle.mjs +17 -12
  63. package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
  64. package/fesm2022/koobiq-components-button.mjs +25 -25
  65. package/fesm2022/koobiq-components-checkbox.mjs +69 -92
  66. package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
  67. package/fesm2022/koobiq-components-clamped-text.mjs +18 -13
  68. package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
  69. package/fesm2022/koobiq-components-code-block.mjs +56 -69
  70. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  71. package/fesm2022/koobiq-components-content-panel.mjs +29 -29
  72. package/fesm2022/koobiq-components-core.mjs +2485 -735
  73. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  74. package/fesm2022/koobiq-components-datepicker.mjs +168 -126
  75. package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
  76. package/fesm2022/koobiq-components-divider.mjs +7 -7
  77. package/fesm2022/koobiq-components-dl.mjs +23 -15
  78. package/fesm2022/koobiq-components-dl.mjs.map +1 -1
  79. package/fesm2022/koobiq-components-dropdown.mjs +814 -136
  80. package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
  81. package/fesm2022/koobiq-components-dynamic-translation.mjs +13 -13
  82. package/fesm2022/koobiq-components-ellipsis-center.mjs +7 -7
  83. package/fesm2022/koobiq-components-empty-state.mjs +19 -19
  84. package/fesm2022/koobiq-components-file-upload.mjs +74 -42
  85. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  86. package/fesm2022/koobiq-components-filter-bar.mjs +783 -199
  87. package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
  88. package/fesm2022/koobiq-components-flag.mjs +7 -7
  89. package/fesm2022/koobiq-components-form-field.mjs +350 -162
  90. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  91. package/fesm2022/koobiq-components-icon.mjs +52 -25
  92. package/fesm2022/koobiq-components-icon.mjs.map +1 -1
  93. package/fesm2022/koobiq-components-inline-edit.mjs +175 -28
  94. package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
  95. package/fesm2022/koobiq-components-input.mjs +41 -24
  96. package/fesm2022/koobiq-components-input.mjs.map +1 -1
  97. package/fesm2022/koobiq-components-link.mjs +8 -8
  98. package/fesm2022/koobiq-components-list.mjs +657 -143
  99. package/fesm2022/koobiq-components-list.mjs.map +1 -1
  100. package/fesm2022/koobiq-components-loader-overlay.mjs +16 -16
  101. package/fesm2022/koobiq-components-markdown.mjs +14 -11
  102. package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
  103. package/fesm2022/koobiq-components-modal.mjs +59 -35
  104. package/fesm2022/koobiq-components-modal.mjs.map +1 -1
  105. package/fesm2022/koobiq-components-navbar.mjs +177 -67
  106. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  107. package/fesm2022/koobiq-components-notification-center.mjs +40 -24
  108. package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
  109. package/fesm2022/koobiq-components-overflow-items.mjs +16 -17
  110. package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
  111. package/fesm2022/koobiq-components-popover.mjs +31 -21
  112. package/fesm2022/koobiq-components-popover.mjs.map +1 -1
  113. package/fesm2022/koobiq-components-progress-bar.mjs +13 -13
  114. package/fesm2022/koobiq-components-progress-spinner.mjs +13 -13
  115. package/fesm2022/koobiq-components-radio.mjs +10 -10
  116. package/fesm2022/koobiq-components-resizer.mjs +33 -14
  117. package/fesm2022/koobiq-components-resizer.mjs.map +1 -1
  118. package/fesm2022/koobiq-components-scrollbar.mjs +10 -10
  119. package/fesm2022/koobiq-components-search-expandable.mjs +49 -14
  120. package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
  121. package/fesm2022/koobiq-components-select.mjs +450 -146
  122. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  123. package/fesm2022/koobiq-components-sidebar.mjs +14 -14
  124. package/fesm2022/koobiq-components-sidepanel.mjs +26 -26
  125. package/fesm2022/koobiq-components-skeleton.mjs +10 -10
  126. package/fesm2022/koobiq-components-split-button.mjs +10 -17
  127. package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
  128. package/fesm2022/koobiq-components-splitter.mjs +17 -17
  129. package/fesm2022/koobiq-components-table.mjs +15 -13
  130. package/fesm2022/koobiq-components-table.mjs.map +1 -1
  131. package/fesm2022/koobiq-components-tabs.mjs +80 -68
  132. package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
  133. package/fesm2022/koobiq-components-tags.mjs +283 -122
  134. package/fesm2022/koobiq-components-tags.mjs.map +1 -1
  135. package/fesm2022/koobiq-components-textarea.mjs +13 -8
  136. package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
  137. package/fesm2022/koobiq-components-time-range.mjs +29 -24
  138. package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
  139. package/fesm2022/koobiq-components-timepicker.mjs +61 -30
  140. package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
  141. package/fesm2022/koobiq-components-timezone.mjs +77 -42
  142. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  143. package/fesm2022/koobiq-components-title.mjs +7 -7
  144. package/fesm2022/koobiq-components-toast.mjs +51 -26
  145. package/fesm2022/koobiq-components-toast.mjs.map +1 -1
  146. package/fesm2022/koobiq-components-toggle.mjs +72 -64
  147. package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
  148. package/fesm2022/koobiq-components-tooltip.mjs +219 -28
  149. package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
  150. package/fesm2022/koobiq-components-top-bar.mjs +13 -13
  151. package/fesm2022/koobiq-components-tree-select.mjs +222 -80
  152. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  153. package/fesm2022/koobiq-components-tree.mjs +302 -81
  154. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  155. package/fesm2022/koobiq-components-username.mjs +27 -27
  156. package/file-upload/index.d.ts +25 -6
  157. package/file-upload/multiple-file-upload.component.scss +14 -0
  158. package/filter-bar/_filter-bar-theme.scss +0 -10
  159. package/filter-bar/filter-bar-tokens.scss +3 -0
  160. package/filter-bar/filters.scss +3 -2
  161. package/filter-bar/index.d.ts +281 -9
  162. package/filter-bar/pipes/base-pipe.scss +0 -11
  163. package/filter-bar/pipes/pipe-input.scss +10 -0
  164. package/filter-bar/pipes/pipe-multi-tree-select.scss +0 -6
  165. package/filter-bar/pipes/pipe-multiselect.scss +0 -6
  166. package/filter-bar/pipes/pipe-tree-select.scss +0 -6
  167. package/form-field/_form-field-theme.scss +76 -20
  168. package/form-field/fieldset.scss +10 -0
  169. package/form-field/form-field-tokens.scss +15 -1
  170. package/form-field/form-field.scss +15 -19
  171. package/form-field/index.d.ts +147 -65
  172. package/icon/icon-button.scss +3 -1
  173. package/icon/index.d.ts +45 -7
  174. package/inline-edit/index.d.ts +57 -4
  175. package/inline-edit/inline-edit.scss +10 -0
  176. package/input/index.d.ts +17 -2
  177. package/list/_list-theme.scss +42 -10
  178. package/list/index.d.ts +326 -79
  179. package/list/list-tokens.scss +43 -8
  180. package/list/list.scss +186 -12
  181. package/markdown/index.d.ts +1 -1
  182. package/modal/index.d.ts +21 -4
  183. package/modal/modal-tokens.scss +1 -1
  184. package/navbar/_navbar-item_vertical.scss +7 -5
  185. package/navbar/index.d.ts +54 -5
  186. package/navbar/navbar-brand.scss +23 -7
  187. package/navbar/vertical-navbar.scss +6 -0
  188. package/notification-center/index.d.ts +2 -1
  189. package/notification-center/notification-item.scss +6 -0
  190. package/package.json +3 -6
  191. package/popover/index.d.ts +2 -2
  192. package/prebuilt-themes/dark-theme.css +1 -1
  193. package/prebuilt-themes/light-theme.css +1 -1
  194. package/prebuilt-themes/theme.css +1 -1
  195. package/resizer/index.d.ts +12 -0
  196. package/schematics/collection.json +10 -0
  197. package/schematics/migrations/alert-signals/README.md +64 -0
  198. package/schematics/migrations/alert-signals/data.js +70 -0
  199. package/schematics/migrations/alert-signals/index.js +350 -0
  200. package/schematics/migrations/alert-signals/schema.json +20 -0
  201. package/schematics/migrations/autocomplete-panel-width-auto/README.md +68 -0
  202. package/schematics/migrations/autocomplete-panel-width-auto/index.js +70 -0
  203. package/schematics/migrations/autocomplete-panel-width-auto/schema.json +15 -0
  204. package/schematics/migrations/deprecated-icons/README.md +29 -4
  205. package/schematics/migrations/deprecated-icons/data.js +7 -0
  206. package/schematics/migrations/deprecated-icons/index.js +62 -35
  207. package/schematics/migrations/filter-bar-signals/README.md +1 -1
  208. package/schematics/migrations/new-icons-pack/README.md +37 -2
  209. package/schematics/migrations/new-icons-pack/data.js +8 -0
  210. package/schematics/migrations/new-icons-pack/index.js +144 -53
  211. package/schematics/migrations.json +11 -1
  212. package/schematics/ng-add/index.js +3 -3
  213. package/schematics/utils/angular-parsing.js +41 -14
  214. package/schematics/utils/ast.js +31 -0
  215. package/schematics/utils/icon-migration.js +530 -0
  216. package/schematics/utils/typescript.js +44 -0
  217. package/scrollbar/index.d.ts +1 -1
  218. package/search-expandable/index.d.ts +3 -0
  219. package/select/index.d.ts +212 -40
  220. package/select/select-tokens.scss +0 -1
  221. package/select/select.scss +0 -2
  222. package/splitter/index.d.ts +1 -1
  223. package/table/_table-theme.scss +4 -0
  224. package/table/index.d.ts +2 -1
  225. package/table/table.scss +8 -0
  226. package/tabs/_tabs-common.scss +60 -31
  227. package/tabs/_tabs-theme.scss +12 -0
  228. package/tabs/index.d.ts +2 -2
  229. package/tabs/tab-header.scss +14 -0
  230. package/tabs/tab-nav-bar.scss +4 -0
  231. package/tabs/tabs-tokens.scss +1 -0
  232. package/tags/index.d.ts +128 -29
  233. package/textarea/index.d.ts +5 -0
  234. package/time-range/index.d.ts +1 -1
  235. package/timepicker/index.d.ts +4 -0
  236. package/timezone/index.d.ts +10 -8
  237. package/toast/index.d.ts +26 -3
  238. package/toggle/index.d.ts +34 -14
  239. package/tooltip/index.d.ts +119 -7
  240. package/tree/_tree-theme.scss +25 -5
  241. package/tree/index.d.ts +71 -3
  242. package/tree/tree-option.scss +2 -8
  243. package/tree-select/_tree-select-theme.scss +22 -0
  244. package/tree-select/index.d.ts +127 -36
  245. package/accordion/accordion.component.scss +0 -50
  246. package/core/styles/_tokens.kbq.import.scss +0 -4
  247. package/core/styles/theming/_components-theming.scss +0 -1927
  248. package/filter-bar/pipes/pipe-select.scss +0 -5
  249. package/overflow-items/overflow-items.scss +0 -20
package/list/index.d.ts CHANGED
@@ -1,24 +1,27 @@
1
- import * as i0 from '@angular/core';
2
- import { OnDestroy, OnInit, AfterContentInit, AfterViewInit, QueryList, EventEmitter, ElementRef } from '@angular/core';
3
- import * as i1 from '@angular/cdk/a11y';
1
+ import * as _angular_core from '@angular/core';
2
+ import { Provider, AfterContentInit, AfterViewInit, OnDestroy, OnInit, ElementRef, QueryList, EventEmitter } from '@angular/core';
3
+ import * as i1$1 from '@angular/cdk/a11y';
4
4
  import { FocusMonitor } from '@angular/cdk/a11y';
5
+ import { BooleanInput } from '@angular/cdk/coercion';
5
6
  import { SelectionModel } from '@angular/cdk/collections';
7
+ import * as i1 from '@angular/cdk/drag-drop';
8
+ import { CdkDragDrop } from '@angular/cdk/drag-drop';
6
9
  import { ControlValueAccessor } from '@angular/forms';
7
- import * as i2 from '@koobiq/components/core';
8
- import { IFocusableOption, KbqTitleTextRef, FocusKeyManager, MultipleMode, KbqOptgroup, KbqOptionActionComponent, KbqPseudoCheckbox, KbqLine } from '@koobiq/components/core';
10
+ import * as i3 from '@koobiq/components/core';
11
+ import { FocusKeyManager, IFocusableOption, KbqTitleTextRef, KbqOptgroup, KbqOptionActionComponent, KbqPseudoCheckbox, MultipleMode, KbqLine } from '@koobiq/components/core';
9
12
  import { KbqDropdownTrigger } from '@koobiq/components/dropdown';
10
13
  import { KbqTooltipTrigger } from '@koobiq/components/tooltip';
11
- import { Observable, Subject } from 'rxjs';
12
- import * as i3 from '@koobiq/components/icon';
14
+ import { Subject, Observable } from 'rxjs';
15
+ import * as i4 from '@koobiq/components/icon';
13
16
 
14
- interface KbqOptionEvent {
15
- option: KbqListOption;
17
+ interface KbqOptionEvent<T = any> {
18
+ option: KbqListOption<T>;
16
19
  }
17
- declare const KBQ_SELECTION_LIST_VALUE_ACCESSOR: any;
18
- declare class KbqListSelectionChange {
19
- source: KbqListSelection;
20
- option: KbqListOption;
21
- constructor(source: KbqListSelection, option: KbqListOption);
20
+ declare const KBQ_SELECTION_LIST_VALUE_ACCESSOR: Provider;
21
+ declare class KbqListSelectionChange<T = any> {
22
+ source: KbqListSelection<T>;
23
+ option: KbqListOption<T>;
24
+ constructor(source: KbqListSelection<T>, option: KbqListOption<T>);
22
25
  }
23
26
  declare class KbqListSelectAllEvent<T> {
24
27
  source: KbqListSelection;
@@ -39,29 +42,105 @@ declare class KbqListCopyEvent<T> {
39
42
  event?: KeyboardEvent | undefined;
40
43
  constructor(source: KbqListSelection, option: T, event?: KeyboardEvent | undefined);
41
44
  }
42
- declare class KbqListSelection implements AfterContentInit, AfterViewInit, OnDestroy, ControlValueAccessor {
45
+ /**
46
+ * How the floating copy of an option is rendered while it is dragged.
47
+ *
48
+ * `text` shows a compact plate with the option's own text and nothing else, `full` a clone of the
49
+ * whole row.
50
+ */
51
+ type KbqListDragPreview = 'text' | 'full';
52
+ /**
53
+ * Whether a draggable option advertises with the cursor that the whole row can be picked up.
54
+ *
55
+ * `auto` leaves the row the cursor it would have anyway, `grab` turns the row into a visible handle.
56
+ * A projected `cdkDragHandle` takes the grab over either way.
57
+ */
58
+ type KbqListDragCursor = 'auto' | 'grab';
59
+ /** Event emitted when an option changes its position by dragging. */
60
+ type KbqListSelectionDroppedEvent = Pick<CdkDragDrop<KbqListSelection>, 'previousIndex' | 'currentIndex'> & {
61
+ /** Option that has been moved. */
62
+ option: KbqListOption;
63
+ /** List the option has been moved into. */
64
+ container: KbqListSelection;
65
+ /** List the option has been taken from. Equal to `container` when reordering within a single list. */
66
+ previousContainer: KbqListSelection;
67
+ /** Pointer event that ended the drag. */
68
+ event: MouseEvent | TouchEvent;
69
+ };
70
+ declare class KbqListSelection<T = any> implements AfterContentInit, AfterViewInit, OnDestroy, ControlValueAccessor {
43
71
  private elementRef;
44
72
  private changeDetectorRef;
45
73
  private clipboard;
46
74
  protected readonly focusMonitor: FocusMonitor;
47
- keyManager: FocusKeyManager<KbqListOption>;
48
- options: QueryList<KbqListOption>;
49
- readonly onSelectAll: i0.OutputEmitterRef<KbqListSelectAllEvent<KbqListOption>>;
50
- readonly onCopy: EventEmitter<KbqListCopyEvent<KbqListOption>>;
75
+ keyManager: FocusKeyManager<KbqListOption<T>>;
76
+ options: QueryList<KbqListOption<T>>;
77
+ readonly onSelectAll: _angular_core.OutputEmitterRef<KbqListSelectAllEvent<KbqListOption<T>>>;
78
+ /**
79
+ * Kept as a decorator `@Output()`/`EventEmitter` on purpose: `copyActiveOption` branches on
80
+ * `onCopy.observed` to decide between the consumer handler and the built-in clipboard copy.
81
+ * `output()` exposes no subscriber introspection, so migrating it would silently run both
82
+ * paths for every existing `(onCopy)` consumer. Mirrors `KbqTreeSelection.onCopy`.
83
+ */
84
+ readonly onCopy: EventEmitter<KbqListCopyEvent<KbqListOption<T>>>;
85
+ /**
86
+ * Whether clicking an option clears the rest of the selection.
87
+ * Stays an accessor input: the constructor turns it off for `multiple="checkbox"`, which a
88
+ * signal `input()` cannot do (inputs are read-only from inside the component).
89
+ */
51
90
  get autoSelect(): boolean;
52
91
  set autoSelect(value: boolean);
53
92
  private _autoSelect;
93
+ /**
94
+ * Whether the last selected option can be deselected.
95
+ * Stays an accessor input for the same reason as {@link autoSelect}.
96
+ */
54
97
  get noUnselectLast(): boolean;
55
98
  set noUnselectLast(value: boolean);
56
99
  private _noUnselectLast;
100
+ /**
101
+ * Whether options can be reordered by dragging them.
102
+ * Reordering never mutates the data — handle the `dropped` event and move the item yourself.
103
+ */
104
+ get draggable(): boolean;
105
+ set draggable(value: boolean);
106
+ private _draggable;
107
+ /**
108
+ * Lists that options of this list can be moved into. Accepts `KbqListSelection` instances or the
109
+ * `id` of another list. `cdkDropListGroup` on a common ancestor connects lists automatically.
110
+ */
111
+ readonly connectedTo: _angular_core.InputSignal<string | KbqListSelection<T> | readonly (string | KbqListSelection<T>)[]>;
112
+ /**
113
+ * What the option's floating copy looks like while it is dragged. Defaults to `text`: a compact
114
+ * plate carrying the option's label and caption, capped at a readable width. Use `full` to drag a
115
+ * clone of the whole row, checkbox, icons and action button included.
116
+ */
117
+ readonly dragPreview: _angular_core.InputSignal<KbqListDragPreview>;
118
+ /**
119
+ * Whether a draggable option shows the grab cursor over the whole row. Defaults to `auto`, which
120
+ * leaves the row the cursor it has anyway. Use `grab` where the whole row is meant to read as a
121
+ * handle. An option carrying a projected `cdkDragHandle` ignores this — the handle keeps the grab.
122
+ */
123
+ readonly dragCursor: _angular_core.InputSignal<KbqListDragCursor>;
124
+ /** Emits when an option changes its position by dragging. */
125
+ readonly dropped: _angular_core.OutputEmitterRef<KbqListSelectionDroppedEvent>;
57
126
  /** When `true`, a repeated Ctrl/Cmd+A deselects all options. Off by default (Ctrl+A only selects). */
58
- readonly selectAllToggle: i0.InputSignalWithTransform<boolean, unknown>;
127
+ readonly selectAllToggle: _angular_core.InputSignalWithTransform<boolean, unknown>;
59
128
  multipleMode: MultipleMode | null;
60
129
  get multiple(): boolean;
61
- readonly horizontal: i0.InputSignalWithTransform<boolean, unknown>;
62
- get tabIndex(): any;
63
- set tabIndex(value: any);
130
+ readonly horizontal: _angular_core.InputSignalWithTransform<boolean, unknown>;
131
+ /**
132
+ * Tab index of the list.
133
+ * Stays an accessor input: the getter is derived from {@link disabled} and the setter also
134
+ * records the user-provided value, which the roving focus logic restores after `tabOut`.
135
+ */
136
+ get tabIndex(): number;
137
+ set tabIndex(value: number);
64
138
  private _tabIndex;
139
+ /**
140
+ * Whether the list is disabled.
141
+ * Stays an accessor input: `setDisabledState` writes it from the `ControlValueAccessor`, which a
142
+ * signal `input()` cannot do.
143
+ */
65
144
  get disabled(): boolean;
66
145
  set disabled(value: boolean);
67
146
  private _disabled;
@@ -69,51 +148,80 @@ declare class KbqListSelection implements AfterContentInit, AfterViewInit, OnDes
69
148
  * Function used for comparing an option against the selected value when determining which
70
149
  * options should appear as selected. The first argument is the value of an options. The second
71
150
  * one is a value from the selected value. A boolean must be returned.
151
+ *
152
+ * Bind a stable reference — a field or a bound method. An expression that builds a new function on
153
+ * every change detection pass makes the list re-resolve every value against every option each pass.
72
154
  */
73
- readonly compareWith: i0.InputSignal<(o1: any, o2: any) => boolean>;
155
+ readonly compareWith: _angular_core.InputSignalWithTransform<(o1: T, o2: T) => boolean, (o1: T, o2: T) => boolean>;
74
156
  userTabIndex: number | null;
75
157
  get showCheckbox(): boolean;
76
- readonly selectionChange: i0.OutputEmitterRef<KbqListSelectionChange>;
77
- selectionModel: SelectionModel<KbqListOption>;
78
- get optionFocusChanges(): Observable<KbqOptionEvent>;
79
- get optionBlurChanges(): Observable<KbqOptionEvent>;
80
- _value: string[] | null;
158
+ readonly selectionChange: _angular_core.OutputEmitterRef<KbqListSelectionChange<T>>;
159
+ selectionModel: SelectionModel<KbqListOption<T>>;
160
+ get optionFocusChanges(): Observable<KbqOptionEvent<T>>;
161
+ get optionBlurChanges(): Observable<KbqOptionEvent<T>>;
162
+ _value: T[] | null;
81
163
  private readonly destroyRef;
82
164
  private readonly platform;
83
- private optionFocusSubscription;
84
- private optionBlurSubscription;
165
+ private readonly ngZone;
166
+ private readonly window;
167
+ private readonly dropList;
168
+ /**
169
+ * Distance from the list's content box to the gap the dragged option would land in, or `null`
170
+ * while no drag is hovering this list. Drives the insertion indicator.
171
+ */
172
+ protected readonly dropIndicatorOffset: _angular_core.WritableSignal<number | null>;
173
+ /** Gap the indicator currently marks, used as `currentIndex` when the drag is dropped here. */
174
+ private dropIndex;
175
+ private pendingMoveSubscription;
176
+ private hasWarnedOnDragContainer;
177
+ /** Whether a deferred {@link initializeSelection} pass is already queued for this microtask turn. */
178
+ private pendingSelectionInit;
179
+ /** Whether a form control has ever written to the list, i.e. whether {@link _value} speaks for a model. */
180
+ private hasWrittenValue;
85
181
  constructor();
86
182
  ngAfterContentInit(): void;
87
183
  ngAfterViewInit(): void;
88
184
  ngOnDestroy(): void;
89
185
  focus(): void;
186
+ /** Clears the active key-manager item (unless an option is still focused) and marks the list as touched. */
90
187
  blur(): void;
188
+ /** Selects every non-disabled option and reports the new value to the `ControlValueAccessor`. */
91
189
  selectAll(): void;
190
+ /** Deselects every option and reports the new value to the `ControlValueAccessor`. */
92
191
  deselectAll(): void;
93
192
  updateScrollSize(): void;
94
- setSelectedOptionsByClick(option: KbqListOption, shiftKey: boolean, ctrlKey: boolean): void;
95
- setSelectedOptionsByKey(option: KbqListOption, shiftKey: boolean, ctrlKey: boolean): void;
193
+ setSelectedOptionsByClick(option: KbqListOption<T>, shiftKey: boolean, ctrlKey: boolean): void;
194
+ setSelectedOptionsByKey(option: KbqListOption<T>, shiftKey: boolean, ctrlKey: boolean): void;
96
195
  selectActiveOptions(): void;
97
- writeValue(values: string[]): void;
98
- registerOnChange(fn: (value: any) => void): void;
196
+ writeValue(values: T[] | T | null): void;
197
+ registerOnChange(fn: (value: T[]) => void): void;
99
198
  registerOnTouched(fn: () => void): void;
100
199
  setDisabledState(isDisabled: boolean): void;
101
- getSelectedOptionValues(): string[];
200
+ /** Values of the currently selected options. */
201
+ getSelectedOptionValues(): T[];
102
202
  toggleFocusedOption(): void;
103
- canDeselectLast(listOption: KbqListOption): boolean;
104
- /** @docs-private */
203
+ /** Whether `listOption` is allowed to be deselected, given {@link noUnselectLast}. */
204
+ canDeselectLast(listOption: KbqListOption<T>): boolean;
205
+ /**
206
+ * Rendered height of the element, or 0 when it is not laid out (SSR, jsdom, `display: none`).
207
+ * @docs-private
208
+ */
105
209
  getHeight(): number;
106
210
  onTouched: () => void;
107
- removeOptionFromList(option: KbqListOption): void;
211
+ removeOptionFromList(option: KbqListOption<T>): void;
108
212
  /** Handles keydown events on the list. */
109
213
  onKeyDown(event: KeyboardEvent): void;
214
+ /** Whether the key just handled moved the active option, taking the list orientation into account. */
215
+ private isNavigationKey;
110
216
  reportValueChange(): void;
111
- emitChangeEvent(option: KbqListOption): void;
217
+ emitChangeEvent(option: KbqListOption<T>): void;
112
218
  private initializeSelection;
113
219
  protected updateTabIndex(): void;
114
220
  private onCopyDefaultHandler;
115
- private resetOptions;
116
- private dropSubscriptions;
221
+ /**
222
+ * Re-points the focus/blur streams at the current options every time the query list changes.
223
+ * `switchMap` tears down the previous `merge` for us, so no manual subscription bookkeeping.
224
+ */
117
225
  private listenToOptionsFocus;
118
226
  /** Checks whether any of the options is focused. */
119
227
  private hasFocusedOption;
@@ -126,104 +234,243 @@ declare class KbqListSelection implements AfterContentInit, AfterViewInit, OnDes
126
234
  */
127
235
  private isValidIndex;
128
236
  private getOptionIndex;
237
+ private setupDropListInitialProperties;
238
+ /**
239
+ * `CdkDropList` numbers only the options it has rendered, so inside a virtual scroll the indices
240
+ * `dropped` reports do not address the consumer's backing array and the move silently lands on the
241
+ * wrong item. Warn instead of letting it pass unnoticed.
242
+ */
243
+ private warnOnUnsupportedDragContainer;
244
+ /** Keeps the underlying CDK directives in sync with the resolved `draggable` state. */
245
+ private syncDraggableState;
246
+ private normalizeConnectedTo;
247
+ private resolveConnectedLists;
248
+ private resolveConnectedDropLists;
249
+ /**
250
+ * Tracks the dragged option and paints the insertion indicator in whichever list the pointer is
251
+ * over. Lists connected by `id` alone cannot be resolved to an instance, so they never light up.
252
+ *
253
+ * @docs-private
254
+ */
255
+ onOptionDragMoved(option: KbqListOption, pointer: {
256
+ x: number;
257
+ y: number;
258
+ }): void;
259
+ /**
260
+ * Drops the indicator in every list that could be showing one for this drag.
261
+ *
262
+ * @docs-private
263
+ */
264
+ clearDropIndicators(option: KbqListOption): void;
265
+ private clearDropIndicator;
266
+ private containsPoint;
267
+ /**
268
+ * Resolves the gap the pointer sits in and positions the indicator on it. Geometry is read on every
269
+ * move rather than cached at drag start: nothing in the list reflows while dragging, but CDK
270
+ * auto-scrolls near the edges, which would silently invalidate a cache.
271
+ */
272
+ private showDropIndicator;
273
+ /**
274
+ * Points the key manager at the option's new place, but only once the consumer has actually applied
275
+ * the move — the list never reorders its own content, so nothing happens if `dropped` is left
276
+ * unhandled. `setActiveItem` also re-anchors `previousActiveItemIndex`, which `options.changes`
277
+ * leaves behind on the slot the option came from and shift-range selection would extend from.
278
+ */
279
+ private followMovedOption;
129
280
  private onChange;
130
281
  /**
131
282
  * Function for handling the combination Ctrl + A (select all). By default, the internal handler is used,
132
283
  * which toggles the selection of all non-disabled options.
133
284
  */
134
- get selectAllHandler(): (event: KeyboardEvent, list: KbqListSelection) => void;
135
- set selectAllHandler(fn: (event: KeyboardEvent, list: KbqListSelection) => void);
285
+ get selectAllHandler(): (event: KeyboardEvent, list: KbqListSelection<T>) => void;
286
+ set selectAllHandler(fn: (event: KeyboardEvent, list: KbqListSelection<T>) => void);
136
287
  private _selectAllHandler;
137
288
  private copyActiveOption;
138
- static ɵfac: i0.ɵɵFactoryDeclaration<KbqListSelection, never>;
139
- static ɵcmp: i0.ɵɵComponentDeclaration<KbqListSelection, "kbq-list-selection", ["kbqListSelection"], { "autoSelect": { "alias": "autoSelect"; "required": false; }; "noUnselectLast": { "alias": "noUnselectLast"; "required": false; }; "selectAllToggle": { "alias": "selectAllToggle"; "required": false; "isSignal": true; }; "horizontal": { "alias": "horizontal"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; "isSignal": true; }; "selectAllHandler": { "alias": "selectAllHandler"; "required": false; }; }, { "onSelectAll": "onSelectAll"; "onCopy": "onCopy"; "selectionChange": "selectionChange"; }, ["options"], ["*"], true, never>;
289
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KbqListSelection<any>, never>;
290
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<KbqListSelection<any>, "kbq-list-selection", ["kbqListSelection"], { "autoSelect": { "alias": "autoSelect"; "required": false; }; "noUnselectLast": { "alias": "noUnselectLast"; "required": false; }; "draggable": { "alias": "draggable"; "required": false; }; "connectedTo": { "alias": "connectedTo"; "required": false; "isSignal": true; }; "dragPreview": { "alias": "dragPreview"; "required": false; "isSignal": true; }; "dragCursor": { "alias": "dragCursor"; "required": false; "isSignal": true; }; "selectAllToggle": { "alias": "selectAllToggle"; "required": false; "isSignal": true; }; "horizontal": { "alias": "horizontal"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; "isSignal": true; }; "selectAllHandler": { "alias": "selectAllHandler"; "required": false; }; }, { "onSelectAll": "onSelectAll"; "onCopy": "onCopy"; "dropped": "dropped"; "selectionChange": "selectionChange"; }, ["options"], ["*"], true, [{ directive: typeof i1.CdkDropList; inputs: { "id": "id"; }; outputs: {}; }]>;
291
+ static ngAcceptInputType_draggable: unknown;
140
292
  static ngAcceptInputType_disabled: unknown;
141
293
  }
294
+ /**
295
+ * Marker directive for the secondary line of a `kbq-list-option`.
296
+ *
297
+ * Purely a styling hook: it adds the `kbq-list-option-caption` class the list theme keys its
298
+ * muted caption typography and per-state colors off.
299
+ */
142
300
  declare class KbqListOptionCaption {
143
- static ɵfac: i0.ɵɵFactoryDeclaration<KbqListOptionCaption, never>;
144
- static ɵdir: i0.ɵɵDirectiveDeclaration<KbqListOptionCaption, "[kbq-list-option-caption]", never, {}, {}, never, never, true, never>;
301
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KbqListOptionCaption, never>;
302
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KbqListOptionCaption, "[kbq-list-option-caption]", never, {}, {}, never, never, true, never>;
145
303
  }
146
304
  /**
147
305
  * Component for list-options of selection-list. Each list-option can automatically
148
306
  * generate a checkbox and can put current item into the selectionModel of selection-list
149
307
  * if the current item is selected.
150
308
  */
151
- declare class KbqListOption implements OnDestroy, OnInit, IFocusableOption, KbqTitleTextRef {
309
+ declare class KbqListOption<T = any> implements OnDestroy, OnInit, IFocusableOption, KbqTitleTextRef {
152
310
  private elementRef;
153
311
  private changeDetector;
154
312
  private ngZone;
155
- listSelection: KbqListSelection;
313
+ private readonly drag;
314
+ private readonly destroyRef;
315
+ listSelection: KbqListSelection<T>;
156
316
  readonly group: KbqOptgroup | null;
157
317
  hasFocus: boolean;
158
318
  preventBlur: boolean;
159
- readonly onFocus: Subject<KbqOptionEvent>;
160
- readonly onBlur: Subject<KbqOptionEvent>;
161
- readonly actionButton: i0.Signal<KbqOptionActionComponent | undefined>;
319
+ readonly onFocus: Subject<KbqOptionEvent<T>>;
320
+ readonly onBlur: Subject<KbqOptionEvent<T>>;
321
+ readonly actionButton: _angular_core.Signal<KbqOptionActionComponent | undefined>;
162
322
  tooltipTrigger?: KbqTooltipTrigger;
163
323
  dropdownTrigger?: KbqDropdownTrigger;
164
- readonly pseudoCheckbox: i0.Signal<KbqPseudoCheckbox | undefined>;
165
- readonly text: i0.Signal<ElementRef<any>>;
324
+ readonly pseudoCheckbox: _angular_core.Signal<KbqPseudoCheckbox | undefined>;
325
+ /**
326
+ * Drag handles the consumer has projected into the option. Nothing else reads them — `CdkDrag`
327
+ * collects its own through DI — they only tell the option whether the whole row starts a drag.
328
+ */
329
+ private readonly dragHandles;
330
+ readonly text: _angular_core.Signal<ElementRef<any>>;
331
+ /**
332
+ * Not a duplicate of {@link text}: this is the `KbqTitleTextRef` property that `title.directive.ts`
333
+ * reads through `KBQ_TITLE_TEXT_REF`. The interface is a plain `ElementRef`, so it cannot become a
334
+ * signal query without breaking that contract — same class of constraint as #DS-5079.
335
+ */
166
336
  textElement: ElementRef;
167
- readonly checkboxPosition: i0.InputSignal<"before" | "after">;
337
+ readonly checkboxPosition: _angular_core.InputSignal<"before" | "after">;
168
338
  /**
169
339
  * This is set to true after the first OnChanges cycle so we don't clear the value of `selected`
170
340
  * in the first cycle.
171
341
  */
172
342
  private inputsInitialized;
173
- get value(): any;
174
- set value(newValue: any);
343
+ /**
344
+ * Value of the option, reported through the list's `ControlValueAccessor`.
345
+ * Stays an accessor input: the setter drops the selection when the value is replaced.
346
+ */
347
+ get value(): T;
348
+ set value(newValue: T);
175
349
  private _value;
176
- /** Whether list is disabled. */
350
+ /**
351
+ * Whether the option is disabled.
352
+ * Stays an accessor input: the getter also reports the disabled state inherited from the list
353
+ * and the option group, which a signal `input()` cannot express.
354
+ */
177
355
  get disabled(): boolean;
178
356
  set disabled(value: boolean);
179
357
  private _disabled;
180
- get showCheckbox(): any;
181
- set showCheckbox(value: any);
358
+ /**
359
+ * Whether the option can be reordered by dragging. Set it to `false` to pin a single option while
360
+ * the rest of the list stays draggable. Unrelated to `disabled`: the option keeps taking focus and
361
+ * selection.
362
+ *
363
+ * Stays an accessor input: the getter reports the resolved state, which the option can only narrow —
364
+ * the list gates its whole drop list, so an option cannot opt back in on its own.
365
+ */
366
+ get draggable(): boolean;
367
+ set draggable(value: boolean);
368
+ private _draggable;
369
+ /**
370
+ * Whether the option renders a pseudo-checkbox.
371
+ * Stays an accessor input: when unset the getter falls back to the list's own mode.
372
+ */
373
+ get showCheckbox(): boolean;
374
+ set showCheckbox(value: BooleanInput);
182
375
  private _showCheckbox;
376
+ /**
377
+ * Whether the option is selected.
378
+ * Stays an accessor input: the state lives in the list's `SelectionModel`, not on the option.
379
+ */
183
380
  get selected(): boolean;
184
381
  set selected(value: boolean);
185
382
  private _selected;
186
- get tabIndex(): any;
187
- get externalPseudoCheckbox(): boolean;
383
+ get tabIndex(): number | null;
384
+ protected get externalPseudoCheckbox(): boolean;
385
+ /**
386
+ * Whether the row itself advertises the grab. Gated on `draggable` so that a pinned option inside a
387
+ * `dragCursor="grab"` list does not promise a pick-up it would refuse. The handle case is left to
388
+ * CSS, which already hands the grab over to a projected `cdkDragHandle`.
389
+ */
390
+ protected get showsGrabCursor(): boolean;
391
+ constructor();
392
+ /**
393
+ * Keeps the underlying `CdkDrag` in sync with the resolved `draggable` state.
394
+ *
395
+ * @docs-private
396
+ */
397
+ syncDraggableState(): void;
188
398
  ngOnInit(): void;
189
399
  ngOnDestroy(): void;
400
+ /** Toggles the selected state of this option. */
190
401
  toggle(): void;
191
- getLabel(): any;
402
+ getLabel(): string;
403
+ /**
404
+ * Splits the option's text into the two lines the `text` drag preview shows. The caption is
405
+ * projected into the same container as the label, so the label is whatever that container holds
406
+ * apart from the caption — subtracting one string from the other would be guesswork.
407
+ *
408
+ * Taken off a clone rather than by walking the container's children, the way `KbqDropdownItem`
409
+ * drops icons out of its own label: `textContent` on an element skips the comment nodes Angular
410
+ * leaves behind for its anchors, while reading one of those nodes directly would hand back the
411
+ * anchor's name.
412
+ *
413
+ * Trimmed because `htmlWhitespaceSensitivity: 'ignore'` lets the indentation of the consumer's
414
+ * template into the projected text.
415
+ *
416
+ * @docs-private
417
+ */
418
+ getDragPreviewText(): {
419
+ label: string;
420
+ caption: string;
421
+ };
422
+ /** Sets the selected state directly on the list's `SelectionModel`, bypassing the `selected` input setter. */
192
423
  setSelected(selected: boolean): void;
193
- /** @docs-private */
424
+ /**
425
+ * Rendered height of the element, or 0 when it is not laid out (SSR, jsdom, `display: none`).
426
+ * @docs-private
427
+ */
194
428
  getHeight(): number;
195
429
  /** Handles click events on the list option. */
196
- handleClick($event: MouseEvent): void;
197
- onKeydown($event: any): void;
430
+ protected handleClick($event: MouseEvent): void;
431
+ /** Handles keydown events on the list option. */
432
+ protected onKeydown($event: KeyboardEvent): void;
433
+ /** Moves DOM focus to this option, unless it is disabled or already focused. */
198
434
  focus(): void;
435
+ /** Marks this option as blurred once the zone stabilizes, unless {@link preventBlur} is set. */
199
436
  blur(): void;
437
+ /** The option's host DOM element. */
200
438
  getHostElement(): HTMLElement;
201
- static ɵfac: i0.ɵɵFactoryDeclaration<KbqListOption, never>;
202
- static ɵcmp: i0.ɵɵComponentDeclaration<KbqListOption, "kbq-list-option", ["kbqListOption"], { "checkboxPosition": { "alias": "checkboxPosition"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "showCheckbox": { "alias": "showCheckbox"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; }, {}, ["actionButton", "pseudoCheckbox", "tooltipTrigger", "dropdownTrigger"], ["kbq-pseudo-checkbox", "[kbq-icon]", "*", "[kbq-list-option-caption]", "kbq-option-action"], true, never>;
439
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KbqListOption<any>, never>;
440
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<KbqListOption<any>, "kbq-list-option", ["kbqListOption"], { "checkboxPosition": { "alias": "checkboxPosition"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "draggable": { "alias": "draggable"; "required": false; }; "showCheckbox": { "alias": "showCheckbox"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; }, {}, ["actionButton", "pseudoCheckbox", "dragHandles", "tooltipTrigger", "dropdownTrigger"], ["kbq-pseudo-checkbox", "[kbq-icon]", "*", "[kbq-list-option-caption]", "kbq-option-action"], true, [{ directive: typeof i1.CdkDrag; inputs: {}; outputs: {}; }]>;
203
441
  static ngAcceptInputType_disabled: unknown;
442
+ static ngAcceptInputType_draggable: unknown;
204
443
  static ngAcceptInputType_selected: unknown;
205
444
  }
206
445
 
446
+ /**
447
+ * A plain, non-selectable list container.
448
+ *
449
+ * Intentionally carries no ARIA role: it is used both as a semantic list (consumers add
450
+ * `role="list"` themselves, as `kbq-file-upload` does) and as a purely visual grouping.
451
+ * For a selectable listbox use `kbq-list-selection` instead.
452
+ */
207
453
  declare class KbqList {
208
- static ɵfac: i0.ɵɵFactoryDeclaration<KbqList, never>;
209
- static ɵcmp: i0.ɵɵComponentDeclaration<KbqList, "kbq-list", never, {}, {}, never, ["*"], true, never>;
454
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KbqList, never>;
455
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<KbqList, "kbq-list", never, {}, {}, never, ["*"], true, never>;
210
456
  }
457
+ /** A single row of a `kbq-list`. Non-selectable — see `kbq-list-option` for the selectable variant. */
211
458
  declare class KbqListItem implements AfterContentInit {
212
459
  private elementRef;
213
460
  lines: QueryList<KbqLine>;
214
461
  ngAfterContentInit(): void;
215
- handleFocus(): void;
216
- handleBlur(): void;
217
462
  getHostElement(): HTMLElement;
218
- static ɵfac: i0.ɵɵFactoryDeclaration<KbqListItem, never>;
219
- static ɵcmp: i0.ɵɵComponentDeclaration<KbqListItem, "kbq-list-item, a[kbq-list-item]", never, {}, {}, ["lines"], ["[kbq-list-icon], [mcListIcon]", "[kbq-line], [mcLine]", "*"], true, never>;
463
+ protected handleFocus(): void;
464
+ protected handleBlur(): void;
465
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KbqListItem, never>;
466
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<KbqListItem, "kbq-list-item, a[kbq-list-item]", never, {}, {}, ["lines"], ["[kbq-list-icon], [mcListIcon]", "[kbq-line], [mcLine]", "*"], true, never>;
220
467
  }
221
468
 
222
469
  declare class KbqListModule {
223
- static ɵfac: i0.ɵɵFactoryDeclaration<KbqListModule, never>;
224
- static ɵmod: i0.ɵɵNgModuleDeclaration<KbqListModule, never, [typeof i1.A11yModule, typeof i2.KbqPseudoCheckboxModule, typeof i2.KbqLine, typeof i2.KbqOptionModule, typeof i2.KbqActionContainer, typeof i3.KbqIconModule, typeof KbqList, typeof KbqListSelection, typeof KbqListItem, typeof KbqListOption, typeof KbqListOptionCaption], [typeof KbqList, typeof KbqListSelection, typeof KbqListItem, typeof KbqListOption, typeof KbqListOptionCaption, typeof i2.KbqOptionModule]>;
225
- static ɵinj: i0.ɵɵInjectorDeclaration<KbqListModule>;
470
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KbqListModule, never>;
471
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<KbqListModule, never, [typeof i1$1.A11yModule, typeof i1.CdkDragHandle, typeof i3.KbqPseudoCheckboxModule, typeof i3.KbqLine, typeof i3.KbqOptionModule, typeof i3.KbqActionContainer, typeof i4.KbqIconModule, typeof KbqList, typeof KbqListSelection, typeof KbqListItem, typeof KbqListOption, typeof KbqListOptionCaption], [typeof i1.CdkDragHandle, typeof KbqList, typeof KbqListSelection, typeof KbqListItem, typeof KbqListOption, typeof KbqListOptionCaption, typeof i3.KbqOptionModule]>;
472
+ static ɵinj: _angular_core.ɵɵInjectorDeclaration<KbqListModule>;
226
473
  }
227
474
 
228
475
  export { KBQ_SELECTION_LIST_VALUE_ACCESSOR, KbqList, KbqListCopyEvent, KbqListItem, KbqListModule, KbqListOption, KbqListOptionCaption, KbqListSelectAllEvent, KbqListSelection, KbqListSelectionChange };
229
- export type { KbqOptionEvent };
476
+ export type { KbqListDragCursor, KbqListDragPreview, KbqListSelectionDroppedEvent, KbqOptionEvent };
@@ -9,11 +9,17 @@
9
9
  --kbq-list-states-hover-text-color: var(--kbq-foreground-contrast);
10
10
  --kbq-list-states-hover-icon-color: var(--kbq-icon-contrast);
11
11
  --kbq-list-states-hover-icon-button-color: var(--kbq-icon-contrast-fade);
12
+ --kbq-list-states-hover-caption-color: var(--kbq-foreground-contrast-secondary);
12
13
  --kbq-list-states-selected-container-background: var(--kbq-background-theme-less);
13
14
  --kbq-list-multiple-states-selected-container-background: var(--kbq-background-contrast-less);
14
15
  --kbq-list-states-selected-text-color: var(--kbq-foreground-contrast);
15
16
  --kbq-list-states-selected-icon-color: var(--kbq-icon-contrast);
16
17
  --kbq-list-states-selected-icon-button-color: var(--kbq-icon-contrast-fade);
18
+ --kbq-list-states-selected-caption-color: var(--kbq-foreground-contrast-secondary);
19
+ --kbq-list-multiple-states-selected-text-color: var(--kbq-foreground-contrast);
20
+ --kbq-list-multiple-states-selected-icon-color: var(--kbq-icon-contrast);
21
+ --kbq-list-multiple-states-selected-icon-button-color: var(--kbq-icon-contrast-fade);
22
+ --kbq-list-multiple-states-selected-caption-color: var(--kbq-foreground-contrast-secondary);
17
23
  --kbq-list-states-selected-hover-container-background: var(--kbq-states-background-theme-less-hover);
18
24
  --kbq-list-multiple-states-selected-hover-container-background: var(--kbq-states-background-contrast-less-hover);
19
25
  --kbq-list-states-selected-active-container-background: var(--kbq-states-background-theme-less-active);
@@ -21,28 +27,57 @@
21
27
  --kbq-list-states-selected-hover-text-color: var(--kbq-foreground-contrast);
22
28
  --kbq-list-states-selected-hover-icon-color: var(--kbq-icon-contrast);
23
29
  --kbq-list-states-selected-hover-icon-button-color: var(--kbq-icon-contrast-fade);
30
+ --kbq-list-states-selected-hover-caption-color: var(--kbq-foreground-contrast-secondary);
31
+ --kbq-list-multiple-states-selected-hover-text-color: var(--kbq-foreground-contrast);
32
+ --kbq-list-multiple-states-selected-hover-icon-color: var(--kbq-icon-contrast);
33
+ --kbq-list-multiple-states-selected-hover-icon-button-color: var(--kbq-icon-contrast-fade);
34
+ --kbq-list-multiple-states-selected-hover-caption-color: var(--kbq-foreground-contrast-secondary);
24
35
  --kbq-list-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);
25
36
  --kbq-list-states-disabled-container-background: transparent;
26
37
  --kbq-list-states-disabled-text-color: var(--kbq-states-foreground-disabled);
27
38
  --kbq-list-states-disabled-icon-color: var(--kbq-states-icon-disabled);
28
39
  --kbq-list-states-disabled-icon-button-color: var(--kbq-states-icon-disabled);
29
40
  --kbq-list-states-disabled-caption-color: var(--kbq-states-foreground-disabled);
41
+ // The dragged clone floats over the page, so unlike an option in place it needs an opaque surface.
42
+ --kbq-list-states-dragged-container-background: var(--kbq-background-card);
43
+ --kbq-list-states-dragged-container-shadow: var(--kbq-shadow-popup);
30
44
  }
31
45
 
32
46
  .kbq-list,
33
- .kbq-list-selection {
47
+ .kbq-list-selection,
48
+ // The drag preview is inserted into `<body>`, outside any list, so it has to carry the tokens
49
+ // itself — otherwise every themed color below resolves to nothing. Both shapes of it: the clone of
50
+ // the option, and the plate of its text.
51
+ .kbq-list-option.cdk-drag-preview,
52
+ .kbq-list-drag-preview_text {
53
+ /* SIZE TOKENS — consumed by `.kbq-list-item` / `.kbq-list-option` in list.scss */
34
54
  --kbq-list-size-container-padding-left: var(--kbq-size-m);
35
55
  --kbq-list-size-container-padding-right: var(--kbq-size-m);
36
- --kbq-list-size-container-padding-vertical: var(--kbq-size-xs);
56
+ --kbq-list-size-container-padding-vertical: var(--kbq-size-xxs);
37
57
  --kbq-list-size-container-content-gap-horizontal: var(--kbq-size-s);
38
58
  --kbq-list-size-container-content-gap-vertical: var(--kbq-size-3xs);
39
59
  --kbq-list-size-container-focus-outline-width: var(--kbq-size-3xs);
40
- --kbq-list-size-header-padding-top: var(--kbq-size-s);
41
- --kbq-list-size-header-padding-bottom: var(--kbq-size-xxs);
42
- --kbq-list-size-header-padding-horizontal: var(--kbq-size-m);
43
- --kbq-list-size-subheading-padding-top: var(--kbq-size-m);
44
- --kbq-list-size-subheading-padding-bottom: var(--kbq-size-xxs);
45
- --kbq-list-size-subheading-padding-horizontal: var(--kbq-size-m);
46
60
  /* THEME TOKENS */
47
61
  @include list-theme-tokens;
48
62
  }
63
+
64
+ // Declared here rather than in `list-theme-tokens`, which is also included by the option and dropdown
65
+ // token files: the insertion indicator only ever exists on `kbq-list-selection`. The colour still
66
+ // follows the theme, because the global token it points at does.
67
+ .kbq-list-selection {
68
+ --kbq-list-size-dragged-indicator-thickness: var(--kbq-size-3xs);
69
+ --kbq-list-states-dragged-indicator-color: var(--kbq-line-theme);
70
+ }
71
+
72
+ // Also kept out of `list-theme-tokens`: only the text preview has a width of its own to cap, and only
73
+ // it is meant to let through what it covers — the clone stays on the opaque surface declared above.
74
+ // Mixed rather than taken from `--kbq-background-overlay-inverse`, which reads as a scrim and turns
75
+ // black in the dark theme; the preview is a card that lets a little through, so the card is the base.
76
+ .kbq-list-drag-preview_text {
77
+ --kbq-list-size-drag-preview-max-width: 480px;
78
+ --kbq-list-states-drag-preview-background: color-mix(
79
+ in srgb,
80
+ var(--kbq-background-card) /* color-mix only allows percentage value */ calc(var(--kbq-opacity-overlay) * 100%),
81
+ transparent
82
+ );
83
+ }