@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/icon/index.d.ts CHANGED
@@ -1,11 +1,32 @@
1
1
  import * as i0 from '@angular/core';
2
- import { AfterContentInit, OnChanges, ElementRef, ChangeDetectorRef, DestroyRef, SimpleChanges, AfterViewInit, OnDestroy, InjectionToken, Provider } from '@angular/core';
2
+ import { InjectionToken, Provider, AfterContentInit, OnChanges, ElementRef, ChangeDetectorRef, DestroyRef, SimpleChanges, AfterViewInit, OnDestroy } from '@angular/core';
3
3
  import { FocusMonitor } from '@angular/cdk/a11y';
4
- import * as _koobiq_components_core from '@koobiq/components/core';
5
- import { KbqColorDirective } from '@koobiq/components/core';
6
4
  import { Observable, ReplaySubject } from 'rxjs';
5
+ import { KbqColorDirective } from '@koobiq/components/core';
7
6
  import { SafeResourceUrl, SafeHtml } from '@angular/platform-browser';
8
7
 
8
+ /**
9
+ * Narrow contract that lets `KbqIcon` react to a host's error state (e.g. `autoColor`) without
10
+ * depending on the host's concrete class.
11
+ * @docs-private
12
+ */
13
+ interface KbqIconErrorStateContext {
14
+ /** Whether the host is currently in an error state. */
15
+ readonly errorState: boolean;
16
+ /** Emits whenever the host's state changes, prompting `KbqIcon` to re-check `errorState`. */
17
+ readonly stateChanges: Observable<void>;
18
+ }
19
+ /**
20
+ * Injection token used by `KbqIcon` to look up its `KbqIconErrorStateContext`.
21
+ * @docs-private
22
+ */
23
+ declare const KBQ_ICON_ERROR_STATE_CONTEXT: InjectionToken<KbqIconErrorStateContext>;
24
+ /**
25
+ * Utility provider for `KBQ_ICON_ERROR_STATE_CONTEXT`, built from a factory that resolves the current host's `KbqIconErrorStateContext`.
26
+ * @docs-private
27
+ */
28
+ declare const kbqIconErrorStateContextFactoryProvider: (factory: () => KbqIconErrorStateContext) => Provider;
29
+
9
30
  interface KbqIconOptions {
10
31
  viewBox?: string;
11
32
  withCredentials?: boolean;
@@ -56,7 +77,11 @@ declare class KbqIconRegistry {
56
77
 
57
78
  declare class KbqIcon extends KbqColorDirective implements AfterContentInit, OnChanges {
58
79
  readonly elementRef: ElementRef<HTMLElement>;
59
- protected readonly formField: _koobiq_components_core.KbqFormFieldRef | null;
80
+ /**
81
+ * Host providing error state for `autoColor`, when the icon sits inside one (e.g. a form field).
82
+ * @docs-private
83
+ */
84
+ protected readonly errorStateContext: KbqIconErrorStateContext | null;
60
85
  protected readonly changeDetectorRef: ChangeDetectorRef;
61
86
  protected readonly registry: KbqIconRegistry | null;
62
87
  protected readonly destroyRef: DestroyRef;
@@ -83,9 +108,22 @@ declare class KbqIcon extends KbqColorDirective implements AfterContentInit, OnC
83
108
  static ɵcmp: i0.ɵɵComponentDeclaration<KbqIcon, "[kbq-icon]", never, { "small": { "alias": "small"; "required": false; "isSignal": true; }; "autoColor": { "alias": "autoColor"; "required": false; }; "iconName": { "alias": "kbq-icon"; "required": false; }; }, {}, never, ["*"], true, never>;
84
109
  }
85
110
 
111
+ /**
112
+ * Size options for `KbqIconButton`.
113
+ * - `compact`: 16px icon with padding, 24×24px container.
114
+ * - `normal`: 24px icon, no padding.
115
+ */
116
+ type KbqIconButtonSize = 'compact' | 'normal';
86
117
  declare class KbqIconButton extends KbqIcon implements AfterViewInit, OnDestroy {
87
118
  protected readonly focusMonitor: FocusMonitor;
119
+ /** Size of the icon button. */
120
+ readonly size: i0.InputSignal<KbqIconButtonSize>;
121
+ /**
122
+ * @deprecated Use `size` input instead. Will be removed in the next major release (#DS-5338).
123
+ */
88
124
  readonly small: i0.InputSignal<boolean>;
125
+ /** @docs-private */
126
+ protected readonly isCompact: i0.Signal<boolean>;
89
127
  /** Name of an icon within a @koobiq/icons. */
90
128
  iconName: string;
91
129
  get tabindex(): any;
@@ -104,7 +142,7 @@ declare class KbqIconButton extends KbqIcon implements AfterViewInit, OnDestroy
104
142
  private runFocusMonitor;
105
143
  private stopFocusMonitor;
106
144
  static ɵfac: i0.ɵɵFactoryDeclaration<KbqIconButton, never>;
107
- static ɵcmp: i0.ɵɵComponentDeclaration<KbqIconButton, "[kbq-icon-button]", never, { "small": { "alias": "small"; "required": false; "isSignal": true; }; "iconName": { "alias": "kbq-icon-button"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, ["*"], true, never>;
145
+ static ɵcmp: i0.ɵɵComponentDeclaration<KbqIconButton, "[kbq-icon-button]", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "small": { "alias": "small"; "required": false; "isSignal": true; }; "iconName": { "alias": "kbq-icon-button"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, ["*"], true, never>;
108
146
  static ngAcceptInputType_disabled: unknown;
109
147
  }
110
148
 
@@ -158,5 +196,5 @@ declare class KbqIconModule {
158
196
  static ɵinj: i0.ɵɵInjectorDeclaration<KbqIconModule>;
159
197
  }
160
198
 
161
- export { KBQ_ICONS_CONFIG, KBQ_ICON_RESOLVER, KbqIcon, KbqIconButton, KbqIconItem, KbqIconModule, KbqIconRegistry, kbqIconsDictProvider, kbqIconsProvider, kbqIconsResolverProvider };
162
- export type { KbqIconOptions, KbqIconResolver, KbqIconsConfig };
199
+ export { KBQ_ICONS_CONFIG, KBQ_ICON_ERROR_STATE_CONTEXT, KBQ_ICON_RESOLVER, KbqIcon, KbqIconButton, KbqIconItem, KbqIconModule, KbqIconRegistry, kbqIconErrorStateContextFactoryProvider, kbqIconsDictProvider, kbqIconsProvider, kbqIconsResolverProvider };
200
+ export type { KbqIconButtonSize, KbqIconErrorStateContext, KbqIconOptions, KbqIconResolver, KbqIconsConfig };
@@ -1,9 +1,10 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { ElementRef, TemplateRef } from '@angular/core';
3
- import { CdkConnectedOverlay, ScrollStrategy } from '@angular/cdk/overlay';
4
- import { PopUpPlacements, KbqComponentColors } from '@koobiq/components/core';
3
+ import { ScrollStrategy, CdkConnectedOverlay } from '@angular/cdk/overlay';
4
+ import { KbqConnectedOverlayOriginProvider, PopUpPlacements, KbqComponentColors } from '@koobiq/components/core';
5
5
  import { KbqDropdownTrigger } from '@koobiq/components/dropdown';
6
6
  import { KbqLabel, KbqFormField } from '@koobiq/components/form-field';
7
+ import { KbqSelect } from '@koobiq/components/select';
7
8
  import { KbqTooltipTrigger } from '@koobiq/components/tooltip';
8
9
  import * as i1 from '@angular/cdk/a11y';
9
10
 
@@ -37,11 +38,24 @@ declare class KbqInlineEditMenu {
37
38
  * This component is projecting edit/view mode templates and adds keyboard/pointer handlers.
38
39
  * Edit mode opens in a positioned overlay that matches the view mode width or can be customized.
39
40
  */
40
- declare class KbqInlineEdit {
41
+ declare class KbqInlineEdit implements KbqConnectedOverlayOriginProvider {
41
42
  private readonly overlay;
42
43
  private readonly document;
44
+ private readonly window;
43
45
  private readonly resizeObserver;
44
46
  protected readonly elementRef: ElementRef<HTMLElement>;
47
+ private readonly ngZone;
48
+ private readonly scrollDispatcher;
49
+ /**
50
+ * The validation tooltip is anchored inside the edit-mode overlay — an overlay inside another
51
+ * overlay. Its default `close()` scroll strategy would close it the moment either overlay's
52
+ * origin scrolls (including the programmatic scroll `showValidationTooltip()` uses to bring an
53
+ * invalid control into view), so it's overridden to `reposition()` here — passed directly as a
54
+ * per-instance override to this tooltip's `[kbqTooltipScrollStrategy]` input, rather than a DI
55
+ * override, so it doesn't leak into any `kbqTooltip` in projected content.
56
+ * @docs-private
57
+ */
58
+ protected readonly validationTooltipScrollStrategy: () => ScrollStrategy;
45
59
  /**
46
60
  * Whether to show save/cancel action buttons in edit mode.
47
61
  * @default false
@@ -94,6 +108,14 @@ declare class KbqInlineEdit {
94
108
  /** @docs-private */
95
109
  protected readonly formFieldRefList: _angular_core.Signal<readonly KbqFormField[]>;
96
110
  /** @docs-private */
111
+ protected readonly selectRef: _angular_core.Signal<KbqSelect | undefined>;
112
+ /**
113
+ * Whether edit mode contains a single-value select. When true, edit mode shows only the
114
+ * dropdown panel instead of a bordered field - see the "Select-style editor" example.
115
+ * @docs-private
116
+ */
117
+ protected readonly isSingleSelect: _angular_core.Signal<boolean>;
118
+ /** @docs-private */
97
119
  protected overlayOrigin: HTMLElement;
98
120
  /** @docs-private */
99
121
  protected readonly tooltipTrigger: _angular_core.Signal<KbqTooltipTrigger>;
@@ -126,15 +148,46 @@ declare class KbqInlineEdit {
126
148
  /** @docs-private */
127
149
  protected readonly colors: typeof KbqComponentColors;
128
150
  private initialValue;
151
+ /** Handle for an in-flight `showValidationTooltip()` scroll/settle request, if any. */
152
+ private validationTooltipScrollHandle;
129
153
  constructor();
130
154
  /** Manually switch mode */
131
155
  toggleMode(): void;
156
+ /**
157
+ * Implements `KbqConnectedOverlayOriginProvider`, letting a nested `KbqFormField`'s control
158
+ * anchor its overlay to this element instead of the form-field's own container.
159
+ * When no override is needed, the form-field falls back to its default.
160
+ * @docs-private
161
+ */
162
+ getConnectedOverlayOrigin(): ElementRef | undefined;
163
+ /** Saves the current value and returns to view mode, running the same validation as a normal save. */
164
+ commit(): void;
132
165
  /** @docs-private */
133
166
  protected onClick(event: Event): void;
134
167
  /** @docs-private */
135
168
  protected onAttach(): void;
136
169
  /** @docs-private */
137
170
  protected save($event?: Event): void;
171
+ /**
172
+ * Whether `overlayOrigin` is fully within the viewport and every registered `CdkScrollable`
173
+ * ancestor between it and the viewport. Ancestors without the `CdkScrollable` directive aren't
174
+ * visible to `ScrollDispatcher` and aren't checked — same limitation as the rest of overlay
175
+ * positioning.
176
+ */
177
+ private isOverlayOriginFullyVisible;
178
+ /**
179
+ * Shows the validation tooltip, scrolling the invalid control into view first if it isn't fully visible.
180
+ *
181
+ * `scrollIntoView({ behavior: 'smooth' })` finishes asynchronously — for a long scroll distance it can take
182
+ * a while — so showing the tooltip right away would anchor its overlay to a stale, pre-scroll position.
183
+ * `scrollend` reports when the scroll actually completes; the timeout is a fallback for browsers without
184
+ * `scrollend` support and cases where nothing ends up scrolling.
185
+ *
186
+ * TODO(DS-5420): "scroll an element into view, then act once settled" isn't inline-edit-specific — worth
187
+ * extracting into `packages/components/core` in a follow-up. Kept local to this fix for now.
188
+ */
189
+ private showValidationTooltip;
190
+ private showValidationTooltipIfStillInvalid;
138
191
  /** @docs-private */
139
192
  protected cancel(): void;
140
193
  /** @docs-private */
@@ -163,7 +216,7 @@ declare class KbqInlineEdit {
163
216
  private getInputNativeElement;
164
217
  private markAllAsTouched;
165
218
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<KbqInlineEdit, never>;
166
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<KbqInlineEdit, "kbq-inline-edit", ["kbqInlineEdit"], { "showActions": { "alias": "showActions"; "required": false; "isSignal": true; }; "showTooltipOnError": { "alias": "showTooltipOnError"; "required": false; "isSignal": true; }; "validationTooltip": { "alias": "validationTooltip"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "editModeWidth": { "alias": "editModeWidth"; "required": false; "isSignal": true; }; "tooltipPlacement": { "alias": "tooltipPlacement"; "required": false; "isSignal": true; }; "overlayPanelClass": { "alias": "overlayPanelClass"; "required": false; "isSignal": true; }; "getValueHandler": { "alias": "getValueHandler"; "required": false; "isSignal": true; }; "setValueHandler": { "alias": "setValueHandler"; "required": false; "isSignal": true; }; "canSaveOnEnter": { "alias": "canSaveOnEnter"; "required": false; "isSignal": true; }; "interactiveSelectors": { "alias": "interactiveSelectors"; "required": false; "isSignal": true; }; }, { "saved": "saved"; "canceled": "canceled"; "modeChange": "modeChange"; }, ["menu", "label", "formFieldRefList"], ["kbq-label", "[kbqInlineEditViewMode]", "[kbqInlineEditMenu]", "[kbqInlineEditEditMode]"], true, [{ directive: typeof i1.CdkMonitorFocus; inputs: {}; outputs: {}; }]>;
219
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<KbqInlineEdit, "kbq-inline-edit", ["kbqInlineEdit"], { "showActions": { "alias": "showActions"; "required": false; "isSignal": true; }; "showTooltipOnError": { "alias": "showTooltipOnError"; "required": false; "isSignal": true; }; "validationTooltip": { "alias": "validationTooltip"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "editModeWidth": { "alias": "editModeWidth"; "required": false; "isSignal": true; }; "tooltipPlacement": { "alias": "tooltipPlacement"; "required": false; "isSignal": true; }; "overlayPanelClass": { "alias": "overlayPanelClass"; "required": false; "isSignal": true; }; "getValueHandler": { "alias": "getValueHandler"; "required": false; "isSignal": true; }; "setValueHandler": { "alias": "setValueHandler"; "required": false; "isSignal": true; }; "canSaveOnEnter": { "alias": "canSaveOnEnter"; "required": false; "isSignal": true; }; "interactiveSelectors": { "alias": "interactiveSelectors"; "required": false; "isSignal": true; }; }, { "saved": "saved"; "canceled": "canceled"; "modeChange": "modeChange"; }, ["menu", "label", "formFieldRefList", "selectRef"], ["kbq-label", "[kbqInlineEditViewMode]", "[kbqInlineEditMenu]", "[kbqInlineEditEditMode]"], true, [{ directive: typeof i1.CdkMonitorFocus; inputs: {}; outputs: {}; }]>;
167
220
  }
168
221
 
169
222
  declare class KbqInlineEditModule {
@@ -125,6 +125,12 @@
125
125
  }
126
126
  }
127
127
 
128
+ // Select-style editor: edit mode shows only the dropdown, not a bordered field, so the view
129
+ // text keeps showing through and just gets the "active" look instead.
130
+ &.kbq-inline-edit_select.kbq-inline-edit_edit {
131
+ --kbq-inline-edit-background: var(--kbq-states-background-transparent-active);
132
+ }
133
+
128
134
  &:hover,
129
135
  &.cdk-keyboard-focused,
130
136
  &.kbq-inline-edit_anchor-focused {
@@ -187,6 +193,10 @@
187
193
  padding: var(--kbq-size-xxs) var(--kbq-size-s) var(--kbq-size-s);
188
194
  }
189
195
 
196
+ &.kbq-inline-edit__panel_select .kbq-inline-edit__control-container {
197
+ display: none;
198
+ }
199
+
190
200
  .kbq-inline-edit__control-container,
191
201
  .kbq-inline-edit__action-button {
192
202
  box-shadow: var(--kbq-shadow-popup);
package/input/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnDestroy, EventEmitter, OnChanges, DoCheck, ElementRef, Provider, SimpleChanges, InjectionToken } from '@angular/core';
2
+ import { OnDestroy, EventEmitter, OnChanges, DoCheck, ElementRef, SimpleChanges, Provider, InjectionToken } from '@angular/core';
3
3
  import * as i2 from '@angular/forms';
4
4
  import { ControlValueAccessor, NgControl, NgForm, FormGroupDirective, Validator, AbstractControl, ValidationErrors } from '@angular/forms';
5
5
  import { KbqNumberInputLocaleConfig, CanUpdateErrorState, ErrorStateMatcher } from '@koobiq/components/core';
@@ -38,7 +38,11 @@ declare class KbqNumberInput implements KbqFormFieldControl<any>, ControlValueAc
38
38
  empty: boolean;
39
39
  required: boolean;
40
40
  errorState: boolean;
41
- controlType?: string | undefined;
41
+ /**
42
+ * Implemented as part of KbqFormFieldControl.
43
+ * @docs-private
44
+ */
45
+ controlType: string;
42
46
  /**
43
47
  * Allows input and pasting of integers only.
44
48
  */
@@ -114,6 +118,11 @@ declare class KbqInput implements KbqFormFieldControl<any>, OnChanges, OnDestroy
114
118
  * @docs-private
115
119
  */
116
120
  focused: boolean;
121
+ /**
122
+ * Implemented as part of KbqFormFieldControl.
123
+ * @docs-private
124
+ */
125
+ readonly autofilled: i0.Signal<boolean>;
117
126
  /**
118
127
  * Implemented as part of KbqFormFieldControl.
119
128
  * @docs-private
@@ -248,6 +257,11 @@ declare class KbqInputPassword implements KbqFormFieldControl<any>, OnChanges, O
248
257
  * @docs-private
249
258
  */
250
259
  focused: boolean;
260
+ /**
261
+ * Implemented as part of KbqFormFieldControl.
262
+ * @docs-private
263
+ */
264
+ readonly autofilled: i0.Signal<boolean>;
251
265
  /**
252
266
  * Implemented as part of KbqFormFieldControl.
253
267
  * @docs-private
@@ -306,6 +320,7 @@ declare class KbqInputPassword implements KbqFormFieldControl<any>, OnChanges, O
306
320
  ngDoCheck(): void;
307
321
  updateErrorState(): void;
308
322
  checkRules(): void;
323
+ /** Toggles the native input type between password and text. */
309
324
  toggleType(): void;
310
325
  /** Focuses the input. */
311
326
  focus(): void;
@@ -1,27 +1,40 @@
1
1
  @use '../core/styles/common/tokens';
2
2
 
3
+ /// Emits the five themed colors of a list option for a single visual state.
4
+ ///
5
+ /// Every color falls back to the matching `default`-state token: a state that only redefines the
6
+ /// background then keeps the base text/icon/caption colors instead of resolving to an undefined
7
+ /// `var()` — which, for inherited properties such as `color`, silently degrades to `inherit`.
3
8
  @mixin _kbq-list-item($state-name) {
4
- --kbq-option-background: var(--kbq-list-#{$state-name}-container-background);
9
+ --kbq-option-background: var(--kbq-list-#{$state-name}-container-background, transparent);
5
10
 
6
- background: var(--kbq-list-#{$state-name}-container-background);
11
+ background: var(--kbq-list-#{$state-name}-container-background, transparent);
7
12
 
8
13
  .kbq-list-text {
9
- color: var(--kbq-list-#{$state-name}-text-color);
14
+ color: var(--kbq-list-#{$state-name}-text-color, var(--kbq-list-default-text-color));
10
15
  }
11
16
 
12
17
  .kbq-icon.kbq-empty {
13
- color: var(--kbq-list-#{$state-name}-icon-color);
18
+ color: var(--kbq-list-#{$state-name}-icon-color, var(--kbq-list-default-icon-color));
14
19
  }
15
20
 
16
21
  .kbq-option-action .kbq-icon.kbq-empty {
17
- color: var(--kbq-list-#{$state-name}-icon-button-color);
22
+ color: var(--kbq-list-#{$state-name}-icon-button-color, var(--kbq-list-default-icon-button-color));
18
23
  }
19
24
 
20
25
  .kbq-list-option-caption {
21
- color: var(--kbq-list-#{$state-name}-caption-color);
26
+ color: var(--kbq-list-#{$state-name}-caption-color, var(--kbq-list-default-caption-color));
22
27
  }
23
28
  }
24
29
 
30
+ /// Emits the background-only `:active` treatment. The active states deliberately reuse the colors of
31
+ /// the state they sit on top of (default / selected), so only the background token is redefined.
32
+ @mixin _kbq-list-item-active($state-name) {
33
+ --kbq-option-background: var(--kbq-list-#{$state-name}-container-background);
34
+
35
+ background: var(--kbq-list-#{$state-name}-container-background);
36
+ }
37
+
25
38
  @mixin kbq-list-theme() {
26
39
  .kbq-list-option {
27
40
  @include _kbq-list-item(default);
@@ -34,7 +47,7 @@
34
47
 
35
48
  &.kbq-active:not(.kbq-disabled),
36
49
  &:active:not(.kbq-disabled) {
37
- @include _kbq-list-item(states-active);
50
+ @include _kbq-list-item-active(states-active);
38
51
  }
39
52
 
40
53
  &.kbq-selected:not(.kbq-disabled) {
@@ -47,13 +60,19 @@
47
60
 
48
61
  &.kbq-active,
49
62
  &:active {
50
- @include _kbq-list-item(states-selected-active);
63
+ @include _kbq-list-item-active(states-selected-active);
51
64
  }
52
65
  }
53
66
 
54
67
  &.kbq-disabled {
55
68
  @include _kbq-list-item(states-disabled);
56
69
  }
70
+
71
+ &.kbq-selected.kbq-disabled {
72
+ --kbq-option-background: var(--kbq-list-states-selected-container-background);
73
+
74
+ background: var(--kbq-list-states-selected-container-background);
75
+ }
57
76
  }
58
77
 
59
78
  .kbq-list-option.kbq-list-option_multiple {
@@ -67,9 +86,15 @@
67
86
 
68
87
  &.kbq-active,
69
88
  &:active {
70
- @include _kbq-list-item(multiple-states-selected-active);
89
+ @include _kbq-list-item-active(multiple-states-selected-active);
71
90
  }
72
91
  }
92
+
93
+ &.kbq-selected.kbq-disabled {
94
+ --kbq-option-background: var(--kbq-list-multiple-states-selected-container-background);
95
+
96
+ background: var(--kbq-list-multiple-states-selected-container-background);
97
+ }
73
98
  }
74
99
 
75
100
  .kbq-list-selection.cdk-keyboard-focused {
@@ -80,8 +105,11 @@
80
105
  }
81
106
 
82
107
  @mixin kbq-list-typography() {
108
+ // The drag preview sits in `<body>`, outside every `.kbq-list*` selector, so it has to be named
109
+ // here as well or it would fall back to the page's own type.
83
110
  .kbq-list-item,
84
- .kbq-list-option {
111
+ .kbq-list-option,
112
+ .kbq-list-drag-preview_text {
85
113
  @include tokens.kbq-typography-level-to-styles-css-variables(typography, text-normal);
86
114
 
87
115
  .kbq-list-text {
@@ -89,5 +117,9 @@
89
117
  @include tokens.kbq-typography-level-to-styles-css-variables(typography, text-compact);
90
118
  }
91
119
  }
120
+
121
+ .kbq-list-drag-preview__caption {
122
+ @include tokens.kbq-typography-level-to-styles-css-variables(typography, text-compact);
123
+ }
92
124
  }
93
125
  }