@spartan-ng/brain 0.0.1-alpha.563 → 0.0.1-alpha.564

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 (272) hide show
  1. package/accordion/index.d.ts +125 -10
  2. package/alert-dialog/index.d.ts +40 -13
  3. package/autocomplete/index.d.ts +113 -15
  4. package/avatar/index.d.ts +40 -8
  5. package/button/index.d.ts +15 -3
  6. package/calendar/index.d.ts +465 -29
  7. package/checkbox/index.d.ts +156 -3
  8. package/collapsible/index.d.ts +70 -8
  9. package/command/index.d.ts +147 -16
  10. package/core/index.d.ts +153 -11
  11. package/date-time/index.d.ts +321 -3
  12. package/date-time-luxon/index.d.ts +32 -1
  13. package/dialog/index.d.ts +225 -21
  14. package/fesm2022/spartan-ng-brain-accordion.mjs +12 -12
  15. package/fesm2022/spartan-ng-brain-accordion.mjs.map +1 -1
  16. package/fesm2022/spartan-ng-brain-alert-dialog.mjs +18 -18
  17. package/fesm2022/spartan-ng-brain-alert-dialog.mjs.map +1 -1
  18. package/fesm2022/spartan-ng-brain-autocomplete.mjs +18 -18
  19. package/fesm2022/spartan-ng-brain-autocomplete.mjs.map +1 -1
  20. package/fesm2022/spartan-ng-brain-avatar.mjs +12 -12
  21. package/fesm2022/spartan-ng-brain-avatar.mjs.map +1 -1
  22. package/fesm2022/spartan-ng-brain-button.mjs +3 -3
  23. package/fesm2022/spartan-ng-brain-button.mjs.map +1 -1
  24. package/fesm2022/spartan-ng-brain-calendar.mjs +42 -42
  25. package/fesm2022/spartan-ng-brain-calendar.mjs.map +1 -1
  26. package/fesm2022/spartan-ng-brain-checkbox.mjs +5 -5
  27. package/fesm2022/spartan-ng-brain-checkbox.mjs.map +1 -1
  28. package/fesm2022/spartan-ng-brain-collapsible.mjs +9 -9
  29. package/fesm2022/spartan-ng-brain-collapsible.mjs.map +1 -1
  30. package/fesm2022/spartan-ng-brain-command.mjs +29 -34
  31. package/fesm2022/spartan-ng-brain-command.mjs.map +1 -1
  32. package/fesm2022/spartan-ng-brain-core.mjs.map +1 -1
  33. package/fesm2022/spartan-ng-brain-date-time-luxon.mjs.map +1 -1
  34. package/fesm2022/spartan-ng-brain-date-time.mjs.map +1 -1
  35. package/fesm2022/spartan-ng-brain-dialog.mjs +24 -24
  36. package/fesm2022/spartan-ng-brain-dialog.mjs.map +1 -1
  37. package/fesm2022/spartan-ng-brain-form-field.mjs +3 -3
  38. package/fesm2022/spartan-ng-brain-form-field.mjs.map +1 -1
  39. package/fesm2022/spartan-ng-brain-forms.mjs +6 -6
  40. package/fesm2022/spartan-ng-brain-forms.mjs.map +1 -1
  41. package/fesm2022/spartan-ng-brain-hover-card.mjs +12 -12
  42. package/fesm2022/spartan-ng-brain-hover-card.mjs.map +1 -1
  43. package/fesm2022/spartan-ng-brain-input-otp.mjs +6 -6
  44. package/fesm2022/spartan-ng-brain-input-otp.mjs.map +1 -1
  45. package/fesm2022/spartan-ng-brain-label.mjs +3 -3
  46. package/fesm2022/spartan-ng-brain-label.mjs.map +1 -1
  47. package/fesm2022/spartan-ng-brain-menu.mjs +24 -24
  48. package/fesm2022/spartan-ng-brain-menu.mjs.map +1 -1
  49. package/fesm2022/spartan-ng-brain-navigation-menu.mjs +21 -21
  50. package/fesm2022/spartan-ng-brain-navigation-menu.mjs.map +1 -1
  51. package/fesm2022/spartan-ng-brain-popover.mjs +12 -12
  52. package/fesm2022/spartan-ng-brain-popover.mjs.map +1 -1
  53. package/fesm2022/spartan-ng-brain-progress.mjs +6 -6
  54. package/fesm2022/spartan-ng-brain-progress.mjs.map +1 -1
  55. package/fesm2022/spartan-ng-brain-radio-group.mjs +6 -6
  56. package/fesm2022/spartan-ng-brain-radio-group.mjs.map +1 -1
  57. package/fesm2022/spartan-ng-brain-resizable.mjs +10 -11
  58. package/fesm2022/spartan-ng-brain-resizable.mjs.map +1 -1
  59. package/fesm2022/spartan-ng-brain-select.mjs +33 -33
  60. package/fesm2022/spartan-ng-brain-select.mjs.map +1 -1
  61. package/fesm2022/spartan-ng-brain-separator.mjs +3 -3
  62. package/fesm2022/spartan-ng-brain-separator.mjs.map +1 -1
  63. package/fesm2022/spartan-ng-brain-sheet.mjs +21 -21
  64. package/fesm2022/spartan-ng-brain-sheet.mjs.map +1 -1
  65. package/fesm2022/spartan-ng-brain-slider.mjs +17 -17
  66. package/fesm2022/spartan-ng-brain-slider.mjs.map +1 -1
  67. package/fesm2022/spartan-ng-brain-switch.mjs +8 -8
  68. package/fesm2022/spartan-ng-brain-switch.mjs.map +1 -1
  69. package/fesm2022/spartan-ng-brain-tabs.mjs +15 -15
  70. package/fesm2022/spartan-ng-brain-tabs.mjs.map +1 -1
  71. package/fesm2022/spartan-ng-brain-toggle-group.mjs +6 -6
  72. package/fesm2022/spartan-ng-brain-toggle-group.mjs.map +1 -1
  73. package/fesm2022/spartan-ng-brain-toggle.mjs +3 -3
  74. package/fesm2022/spartan-ng-brain-toggle.mjs.map +1 -1
  75. package/fesm2022/spartan-ng-brain-tooltip.mjs +14 -14
  76. package/fesm2022/spartan-ng-brain-tooltip.mjs.map +1 -1
  77. package/fesm2022/spartan-ng-brain.mjs.map +1 -1
  78. package/form-field/index.d.ts +14 -1
  79. package/forms/index.d.ts +35 -3
  80. package/hover-card/index.d.ts +86 -5
  81. package/index.d.ts +2 -2
  82. package/input-otp/index.d.ts +82 -5
  83. package/label/index.d.ts +20 -3
  84. package/menu/index.d.ts +79 -17
  85. package/navigation-menu/index.d.ts +185 -13
  86. package/package.json +24 -24
  87. package/popover/index.d.ts +39 -9
  88. package/progress/index.d.ts +39 -6
  89. package/radio-group/index.d.ts +124 -6
  90. package/resizable/index.d.ts +103 -3
  91. package/select/index.d.ts +217 -21
  92. package/separator/index.d.ts +27 -4
  93. package/sheet/index.d.ts +51 -15
  94. package/slider/index.d.ts +100 -12
  95. package/switch/index.d.ts +141 -5
  96. package/tabs/index.d.ts +276 -10
  97. package/toggle/index.d.ts +30 -3
  98. package/toggle-group/index.d.ts +108 -6
  99. package/tooltip/index.d.ts +261 -10
  100. package/accordion/lib/brn-accordion-content.d.ts +0 -20
  101. package/accordion/lib/brn-accordion-item.d.ts +0 -28
  102. package/accordion/lib/brn-accordion-token.d.ts +0 -19
  103. package/accordion/lib/brn-accordion-trigger.d.ts +0 -16
  104. package/accordion/lib/brn-accordion.d.ts +0 -39
  105. package/alert-dialog/lib/brn-alert-dialog-content.d.ts +0 -6
  106. package/alert-dialog/lib/brn-alert-dialog-description.d.ts +0 -6
  107. package/alert-dialog/lib/brn-alert-dialog-overlay.d.ts +0 -6
  108. package/alert-dialog/lib/brn-alert-dialog-title.d.ts +0 -6
  109. package/alert-dialog/lib/brn-alert-dialog-trigger.d.ts +0 -10
  110. package/alert-dialog/lib/brn-alert-dialog.d.ts +0 -7
  111. package/autocomplete/lib/brn-autocomplete-empty.d.ts +0 -11
  112. package/autocomplete/lib/brn-autocomplete-group.d.ts +0 -8
  113. package/autocomplete/lib/brn-autocomplete-item.d.ts +0 -32
  114. package/autocomplete/lib/brn-autocomplete-item.token.d.ts +0 -4
  115. package/autocomplete/lib/brn-autocomplete-list.d.ts +0 -8
  116. package/autocomplete/lib/brn-autocomplete-search-input.d.ts +0 -13
  117. package/autocomplete/lib/brn-autocomplete.d.ts +0 -30
  118. package/autocomplete/lib/brn-autocomplete.token.d.ts +0 -5
  119. package/avatar/lib/brn-avatar.d.ts +0 -7
  120. package/avatar/lib/fallback/brn-avatar-fallback.d.ts +0 -9
  121. package/avatar/lib/fallback/index.d.ts +0 -1
  122. package/avatar/lib/image/brn-avatar-image.d.ts +0 -9
  123. package/avatar/lib/image/index.d.ts +0 -1
  124. package/avatar/lib/util/hex-color-for.d.ts +0 -1
  125. package/avatar/lib/util/index.d.ts +0 -3
  126. package/avatar/lib/util/initials.pipe.d.ts +0 -7
  127. package/avatar/lib/util/is-bright.d.ts +0 -1
  128. package/button/lib/brn-button.d.ts +0 -10
  129. package/calendar/lib/brn-calendar-cell-button.d.ts +0 -62
  130. package/calendar/lib/brn-calendar-cell.d.ts +0 -5
  131. package/calendar/lib/brn-calendar-grid.d.ts +0 -7
  132. package/calendar/lib/brn-calendar-header.d.ts +0 -7
  133. package/calendar/lib/brn-calendar-month-select.d.ts +0 -17
  134. package/calendar/lib/brn-calendar-next-button.d.ts +0 -13
  135. package/calendar/lib/brn-calendar-previous-button.d.ts +0 -13
  136. package/calendar/lib/brn-calendar-week.d.ts +0 -25
  137. package/calendar/lib/brn-calendar-weekday.d.ts +0 -28
  138. package/calendar/lib/brn-calendar-year-select.d.ts +0 -16
  139. package/calendar/lib/brn-calendar.d.ts +0 -74
  140. package/calendar/lib/brn-calendar.token.d.ts +0 -22
  141. package/calendar/lib/i18n/calendar-i18n.d.ts +0 -32
  142. package/calendar/lib/mode/brn-calendar-multiple.d.ts +0 -77
  143. package/calendar/lib/mode/brn-calendar-range.d.ts +0 -79
  144. package/checkbox/lib/brn-checkbox.d.ts +0 -151
  145. package/collapsible/lib/brn-collapsible-content.d.ts +0 -15
  146. package/collapsible/lib/brn-collapsible-token.d.ts +0 -16
  147. package/collapsible/lib/brn-collapsible-trigger.d.ts +0 -9
  148. package/collapsible/lib/brn-collapsible.d.ts +0 -24
  149. package/command/lib/brn-command-empty.d.ts +0 -11
  150. package/command/lib/brn-command-group.d.ts +0 -12
  151. package/command/lib/brn-command-item.d.ts +0 -42
  152. package/command/lib/brn-command-item.token.d.ts +0 -4
  153. package/command/lib/brn-command-list.d.ts +0 -8
  154. package/command/lib/brn-command-search-input.d.ts +0 -24
  155. package/command/lib/brn-command-search-input.token.d.ts +0 -4
  156. package/command/lib/brn-command.d.ts +0 -29
  157. package/command/lib/brn-command.token.d.ts +0 -11
  158. package/core/helpers/computed-previous.d.ts +0 -36
  159. package/core/helpers/create-hover-observable.d.ts +0 -7
  160. package/core/helpers/create-injection-token.d.ts +0 -20
  161. package/core/helpers/custom-element-class-settable.d.ts +0 -12
  162. package/core/helpers/debounced-signal.d.ts +0 -9
  163. package/core/helpers/dev-mode.d.ts +0 -5
  164. package/core/helpers/exposes-side.d.ts +0 -13
  165. package/core/helpers/exposes-state.d.ts +0 -13
  166. package/core/helpers/measure-dimensions.d.ts +0 -5
  167. package/core/helpers/table-classes-settable.d.ts +0 -16
  168. package/core/helpers/wait-for-element-animations.d.ts +0 -5
  169. package/core/helpers/zone-free.d.ts +0 -10
  170. package/date-time/lib/date-adapter.d.ts +0 -186
  171. package/date-time/lib/native-date-adapter.d.ts +0 -103
  172. package/date-time/lib/utc-date-adapter.d.ts +0 -28
  173. package/date-time-luxon/lib/date-adapter.d.ts +0 -29
  174. package/dialog/lib/brn-dialog-close.d.ts +0 -8
  175. package/dialog/lib/brn-dialog-content.d.ts +0 -12
  176. package/dialog/lib/brn-dialog-description.d.ts +0 -8
  177. package/dialog/lib/brn-dialog-options.d.ts +0 -26
  178. package/dialog/lib/brn-dialog-overlay.d.ts +0 -9
  179. package/dialog/lib/brn-dialog-ref.d.ts +0 -24
  180. package/dialog/lib/brn-dialog-state.d.ts +0 -1
  181. package/dialog/lib/brn-dialog-title.d.ts +0 -8
  182. package/dialog/lib/brn-dialog-token.d.ts +0 -29
  183. package/dialog/lib/brn-dialog-trigger.d.ts +0 -18
  184. package/dialog/lib/brn-dialog-utils.d.ts +0 -1
  185. package/dialog/lib/brn-dialog.d.ts +0 -61
  186. package/dialog/lib/brn-dialog.service.d.ts +0 -23
  187. package/form-field/lib/brn-form-field-control.d.ts +0 -11
  188. package/forms/lib/control-value-accessor.d.ts +0 -2
  189. package/forms/lib/error-options.d.ts +0 -14
  190. package/forms/lib/error-state-tracker.d.ts +0 -15
  191. package/hover-card/lib/brn-hover-card-content.service.d.ts +0 -72
  192. package/hover-card/lib/brn-hover-card.d.ts +0 -9
  193. package/input-otp/lib/brn-input-otp-slot.d.ts +0 -15
  194. package/input-otp/lib/brn-input-otp.d.ts +0 -61
  195. package/input-otp/lib/brn-input-otp.token.d.ts +0 -5
  196. package/label/lib/brn-label.d.ts +0 -15
  197. package/menu/lib/brn-context-menu-trigger.d.ts +0 -14
  198. package/menu/lib/brn-menu-align.d.ts +0 -4
  199. package/menu/lib/brn-menu-bar.d.ts +0 -6
  200. package/menu/lib/brn-menu-group.d.ts +0 -6
  201. package/menu/lib/brn-menu-item-checkbox.d.ts +0 -11
  202. package/menu/lib/brn-menu-item-radio.d.ts +0 -11
  203. package/menu/lib/brn-menu-item.d.ts +0 -10
  204. package/menu/lib/brn-menu-trigger.d.ts +0 -11
  205. package/menu/lib/brn-menu.d.ts +0 -11
  206. package/navigation-menu/lib/brn-navigation-menu-content.d.ts +0 -22
  207. package/navigation-menu/lib/brn-navigation-menu-content.service.d.ts +0 -44
  208. package/navigation-menu/lib/brn-navigation-menu-item-focusable.token.d.ts +0 -4
  209. package/navigation-menu/lib/brn-navigation-menu-item.d.ts +0 -23
  210. package/navigation-menu/lib/brn-navigation-menu-item.token.d.ts +0 -5
  211. package/navigation-menu/lib/brn-navigation-menu-link.d.ts +0 -22
  212. package/navigation-menu/lib/brn-navigation-menu-list.d.ts +0 -7
  213. package/navigation-menu/lib/brn-navigation-menu-trigger.d.ts +0 -44
  214. package/navigation-menu/lib/brn-navigation-menu.d.ts +0 -61
  215. package/navigation-menu/lib/brn-navigation-menu.token.d.ts +0 -5
  216. package/navigation-menu/lib/brn-parent-nav-menu.token.d.ts +0 -8
  217. package/popover/lib/brn-popover-close.d.ts +0 -6
  218. package/popover/lib/brn-popover-content.d.ts +0 -6
  219. package/popover/lib/brn-popover-trigger.d.ts +0 -10
  220. package/popover/lib/brn-popover.d.ts +0 -15
  221. package/progress/lib/brn-progress-indicator.d.ts +0 -6
  222. package/progress/lib/brn-progress.d.ts +0 -24
  223. package/progress/lib/brn-progress.token.d.ts +0 -4
  224. package/radio-group/lib/brn-radio-group.d.ts +0 -59
  225. package/radio-group/lib/brn-radio-group.token.d.ts +0 -4
  226. package/radio-group/lib/brn-radio.d.ts +0 -58
  227. package/resizable/lib/brn-resizable-group.d.ts +0 -37
  228. package/resizable/lib/brn-resizable-handle.d.ts +0 -26
  229. package/resizable/lib/brn-resizable-panel.d.ts +0 -39
  230. package/select/lib/brn-select-content.d.ts +0 -48
  231. package/select/lib/brn-select-content.token.d.ts +0 -4
  232. package/select/lib/brn-select-group.d.ts +0 -6
  233. package/select/lib/brn-select-label.d.ts +0 -9
  234. package/select/lib/brn-select-option.d.ts +0 -25
  235. package/select/lib/brn-select-placeholder.d.ts +0 -8
  236. package/select/lib/brn-select-trigger.d.ts +0 -24
  237. package/select/lib/brn-select-value-template.d.ts +0 -11
  238. package/select/lib/brn-select-value.d.ts +0 -18
  239. package/select/lib/brn-select.d.ts +0 -69
  240. package/select/lib/brn-select.token.d.ts +0 -4
  241. package/separator/lib/brn-separator.d.ts +0 -14
  242. package/separator/lib/brn-separator.token.d.ts +0 -7
  243. package/sheet/lib/brn-sheet-close.d.ts +0 -6
  244. package/sheet/lib/brn-sheet-content.d.ts +0 -8
  245. package/sheet/lib/brn-sheet-description.d.ts +0 -6
  246. package/sheet/lib/brn-sheet-overlay.d.ts +0 -6
  247. package/sheet/lib/brn-sheet-title.d.ts +0 -6
  248. package/sheet/lib/brn-sheet-trigger.d.ts +0 -10
  249. package/sheet/lib/brn-sheet.d.ts +0 -10
  250. package/slider/lib/brn-slider-range.d.ts +0 -7
  251. package/slider/lib/brn-slider-thumb.d.ts +0 -24
  252. package/slider/lib/brn-slider-tick.d.ts +0 -12
  253. package/slider/lib/brn-slider-track.d.ts +0 -12
  254. package/slider/lib/brn-slider-track.token.d.ts +0 -5
  255. package/slider/lib/brn-slider.d.ts +0 -39
  256. package/slider/lib/brn-slider.token.d.ts +0 -4
  257. package/switch/lib/brn-switch-thumb.d.ts +0 -5
  258. package/switch/lib/brn-switch.d.ts +0 -131
  259. package/tabs/lib/brn-tabs-content.d.ts +0 -15
  260. package/tabs/lib/brn-tabs-list.d.ts +0 -17
  261. package/tabs/lib/brn-tabs-paginated-list.d.ts +0 -196
  262. package/tabs/lib/brn-tabs-trigger.d.ts +0 -21
  263. package/tabs/lib/brn-tabs.d.ts +0 -38
  264. package/toggle/lib/brn-toggle.d.ts +0 -25
  265. package/toggle-group/lib/brn-toggle-group.d.ts +0 -68
  266. package/toggle-group/lib/brn-toggle-group.token.d.ts +0 -4
  267. package/toggle-group/lib/brn-toggle-item.d.ts +0 -31
  268. package/tooltip/lib/brn-tooltip-content-template.d.ts +0 -8
  269. package/tooltip/lib/brn-tooltip-content.d.ts +0 -73
  270. package/tooltip/lib/brn-tooltip-trigger.d.ts +0 -141
  271. package/tooltip/lib/brn-tooltip.d.ts +0 -7
  272. package/tooltip/lib/brn-tooltip.token.d.ts +0 -28
package/tabs/index.d.ts CHANGED
@@ -1,10 +1,276 @@
1
- import { BrnTabs } from './lib/brn-tabs';
2
- import { BrnTabsContent } from './lib/brn-tabs-content';
3
- import { BrnTabsList } from './lib/brn-tabs-list';
4
- import { BrnTabsTrigger } from './lib/brn-tabs-trigger';
5
- export * from './lib/brn-tabs';
6
- export * from './lib/brn-tabs-content';
7
- export * from './lib/brn-tabs-list';
8
- export * from './lib/brn-tabs-paginated-list';
9
- export * from './lib/brn-tabs-trigger';
10
- export declare const BrnTabsImports: readonly [typeof BrnTabs, typeof BrnTabsList, typeof BrnTabsTrigger, typeof BrnTabsContent];
1
+ import * as _angular_core from '@angular/core';
2
+ import { OnDestroy, ElementRef, AfterContentInit, AfterContentChecked, AfterViewInit, Signal, ChangeDetectorRef } from '@angular/core';
3
+ import * as _spartan_ng_brain_tabs from '@spartan-ng/brain/tabs';
4
+ import { BooleanInput } from '@angular/cdk/coercion';
5
+ import { FocusableOption } from '@angular/cdk/a11y';
6
+ import { Direction } from '@angular/cdk/bidi';
7
+ import { Observable, Subject } from 'rxjs';
8
+
9
+ declare class BrnTabsContent implements OnDestroy {
10
+ private readonly _root;
11
+ private readonly _elementRef;
12
+ readonly contentFor: _angular_core.InputSignal<string>;
13
+ protected readonly _isSelected: _angular_core.Signal<boolean>;
14
+ protected readonly _contentId: _angular_core.Signal<string>;
15
+ protected readonly _labelId: _angular_core.Signal<string>;
16
+ constructor();
17
+ focus(): void;
18
+ ngOnDestroy(): void;
19
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnTabsContent, never>;
20
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnTabsContent, "[brnTabsContent]", ["brnTabsContent"], { "contentFor": { "alias": "brnTabsContent"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
21
+ }
22
+
23
+ declare class BrnTabsTrigger implements OnDestroy {
24
+ readonly elementRef: ElementRef<any>;
25
+ private readonly _root;
26
+ protected readonly _orientation: _angular_core.InputSignal<_spartan_ng_brain_tabs.BrnTabsOrientation>;
27
+ readonly triggerFor: _angular_core.InputSignal<string>;
28
+ readonly selected: _angular_core.Signal<boolean>;
29
+ protected readonly _contentId: _angular_core.Signal<string>;
30
+ protected readonly _labelId: _angular_core.Signal<string>;
31
+ readonly _disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
32
+ get disabled(): boolean;
33
+ constructor();
34
+ focus(): void;
35
+ activate(): void;
36
+ get key(): string | undefined;
37
+ ngOnDestroy(): void;
38
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnTabsTrigger, never>;
39
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnTabsTrigger, "button[brnTabsTrigger]", ["brnTabsTrigger"], { "triggerFor": { "alias": "brnTabsTrigger"; "required": true; "isSignal": true; }; "_disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
40
+ }
41
+
42
+ type BrnTabsOrientation = 'horizontal' | 'vertical';
43
+ type BrnTabsDirection = 'ltr' | 'rtl';
44
+ type BrnActivationMode = 'automatic' | 'manual';
45
+ type TabEntry = {
46
+ trigger: BrnTabsTrigger;
47
+ content: BrnTabsContent;
48
+ };
49
+ declare class BrnTabs {
50
+ readonly orientation: _angular_core.InputSignal<BrnTabsOrientation>;
51
+ /** internal **/
52
+ $orientation: _angular_core.InputSignal<BrnTabsOrientation>;
53
+ readonly direction: _angular_core.InputSignal<BrnTabsDirection>;
54
+ /** internal **/
55
+ $direction: _angular_core.InputSignal<BrnTabsDirection>;
56
+ readonly activeTab: _angular_core.ModelSignal<string | undefined>;
57
+ /** internal **/
58
+ $activeTab: _angular_core.Signal<string | undefined>;
59
+ readonly activationMode: _angular_core.InputSignal<BrnActivationMode>;
60
+ /** internal **/
61
+ $activationMode: _angular_core.InputSignal<BrnActivationMode>;
62
+ readonly tabActivated: _angular_core.OutputEmitterRef<string>;
63
+ private readonly _tabs;
64
+ readonly $tabs: _angular_core.Signal<{
65
+ [key: string]: TabEntry;
66
+ }>;
67
+ registerTrigger(key: string, trigger: BrnTabsTrigger): void;
68
+ registerContent(key: string, content: BrnTabsContent): void;
69
+ unregisterTrigger(key: string): void;
70
+ unregisterContent(key: string): void;
71
+ private updateEntry;
72
+ emitTabActivated(key: string): void;
73
+ setActiveTab(key: string): void;
74
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnTabs, never>;
75
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnTabs, "[brnTabs]", ["brnTabs"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "activeTab": { "alias": "brnTabs"; "required": false; "isSignal": true; }; "activationMode": { "alias": "activationMode"; "required": false; "isSignal": true; }; }, { "activeTab": "brnTabsChange"; "tabActivated": "tabActivated"; }, never, never, true, never>;
76
+ }
77
+
78
+ declare class BrnTabsList implements AfterContentInit {
79
+ private readonly _root;
80
+ protected readonly _orientation: _angular_core.InputSignal<_spartan_ng_brain_tabs.BrnTabsOrientation>;
81
+ private readonly _direction;
82
+ private readonly _activeTab;
83
+ private readonly _tabs;
84
+ private readonly _elementRef;
85
+ private readonly _keyDownListener;
86
+ private _keyManager?;
87
+ readonly triggers: _angular_core.Signal<readonly BrnTabsTrigger[]>;
88
+ ngAfterContentInit(): void;
89
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnTabsList, never>;
90
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnTabsList, "[brnTabsList]", ["brnTabsList"], {}, {}, ["triggers"], never, true, never>;
91
+ }
92
+
93
+ /**
94
+ * The directions that scrolling can go in when the header's tabs exceed the header width. 'After'
95
+ * will scroll the header towards the end of the tabs list and 'before' will scroll towards the
96
+ * beginning of the list.
97
+ */
98
+ type ScrollDirection = 'after' | 'before';
99
+ /** Item inside a paginated tab header. */
100
+ type BrnPaginatedTabHeaderItem = FocusableOption & {
101
+ elementRef: ElementRef;
102
+ };
103
+ /**
104
+ * Base class for a tab header that supported pagination.
105
+ * @docs-private
106
+ */
107
+ declare abstract class BrnTabsPaginatedList implements AfterContentChecked, AfterContentInit, AfterViewInit, OnDestroy {
108
+ abstract items: Signal<ReadonlyArray<BrnPaginatedTabHeaderItem>>;
109
+ abstract itemsChanges: Observable<ReadonlyArray<BrnPaginatedTabHeaderItem>>;
110
+ abstract tabListContainer: Signal<ElementRef<HTMLElement>>;
111
+ abstract tabList: Signal<ElementRef<HTMLElement>>;
112
+ abstract tabListInner: Signal<ElementRef<HTMLElement>>;
113
+ abstract nextPaginator: Signal<ElementRef<HTMLElement>>;
114
+ abstract previousPaginator: Signal<ElementRef<HTMLElement>>;
115
+ /** The distance in pixels that the tab labels should be translated to the left. */
116
+ private _scrollDistance;
117
+ /** Whether the header should scroll to the selected index after the view has been checked. */
118
+ private _selectedIndexChanged;
119
+ private readonly _root;
120
+ private readonly _activeTab;
121
+ private readonly _tabs;
122
+ /** Emits when the component is destroyed. */
123
+ protected readonly _destroyed: Subject<void>;
124
+ /** Whether the controls for pagination should be displayed */
125
+ readonly showPaginationControls: _angular_core.WritableSignal<boolean>;
126
+ /** Whether the tab list can be scrolled more towards the end of the tab label list. */
127
+ disableScrollAfter: boolean;
128
+ /** Whether the tab list can be scrolled more towards the beginning of the tab label list. */
129
+ disableScrollBefore: boolean;
130
+ /**
131
+ * The number of tab labels that are displayed on the header. When this changes, the header
132
+ * should re-evaluate the scroll position.
133
+ */
134
+ private _tabLabelCount;
135
+ /** Whether the scroll distance has changed and should be applied after the view is checked. */
136
+ private _scrollDistanceChanged;
137
+ /** Used to manage focus between the tabs. */
138
+ private _keyManager;
139
+ /** Cached text content of the header. */
140
+ private _currentTextContent;
141
+ /** Stream that will stop the automated scrolling. */
142
+ private readonly _stopScrolling;
143
+ /**
144
+ * Whether pagination should be disabled. This can be used to avoid unnecessary
145
+ * layout recalculations if it's known that pagination won't be required.
146
+ */
147
+ readonly disablePagination: _angular_core.InputSignalWithTransform<boolean, unknown>;
148
+ /** The index of the active tab. */
149
+ private readonly _selectedIndex;
150
+ /** Event emitted when the option is selected. */
151
+ readonly selectFocusedIndex: _angular_core.OutputEmitterRef<number>;
152
+ /** Event emitted when a label is focused. */
153
+ readonly indexFocused: _angular_core.OutputEmitterRef<number>;
154
+ private readonly _sharedResizeObserver;
155
+ private readonly _injector;
156
+ protected _elementRef: ElementRef<HTMLElement>;
157
+ protected _changeDetectorRef: ChangeDetectorRef;
158
+ private readonly _viewportRuler;
159
+ private readonly _dir;
160
+ private readonly _ngZone;
161
+ private readonly _platform;
162
+ readonly animationMode: "NoopAnimations" | "BrowserAnimations" | null;
163
+ constructor();
164
+ /** Called when the user has selected an item via the keyboard. */
165
+ protected abstract _itemSelected(event: KeyboardEvent): void;
166
+ ngAfterViewInit(): void;
167
+ ngAfterContentInit(): void;
168
+ /** Sends any changes that could affect the layout of the items. */
169
+ private _itemsResized;
170
+ ngAfterContentChecked(): void;
171
+ ngOnDestroy(): void;
172
+ /** Handles keyboard events on the header. */
173
+ _handleKeydown(event: KeyboardEvent): void;
174
+ /**
175
+ * Callback for when the MutationObserver detects that the content has changed.
176
+ */
177
+ _onContentChanges(): void;
178
+ /**
179
+ * Updates the view whether pagination should be enabled or not.
180
+ *
181
+ * WARNING: Calling this method can be very costly in terms of performance. It should be called
182
+ * as infrequently as possible from outside of the Tabs component as it causes a reflow of the
183
+ * page.
184
+ */
185
+ updatePagination(): void;
186
+ /** Tracks which element has focus; used for keyboard navigation */
187
+ get focusIndex(): number;
188
+ /** When the focus index is set, we must manually send focus to the correct label */
189
+ set focusIndex(value: number);
190
+ /**
191
+ * Determines if an index is valid. If the tabs are not ready yet, we assume that the user is
192
+ * providing a valid index and return true.
193
+ */
194
+ _isValidIndex(index: number): boolean;
195
+ /**
196
+ * Sets focus on the HTML element for the label wrapper and scrolls it into the view if
197
+ * scrolling is enabled.
198
+ */
199
+ _setTabFocus(tabIndex: number): void;
200
+ /** The layout direction of the containing app. */
201
+ _getLayoutDirection(): Direction;
202
+ /** Performs the CSS transformation on the tab list that will cause the list to scroll. */
203
+ _updateTabScrollPosition(): void;
204
+ /** Sets the distance in pixels that the tab header should be transformed in the X-axis. */
205
+ get scrollDistance(): number;
206
+ set scrollDistance(value: number);
207
+ /**
208
+ * Moves the tab list in the 'before' or 'after' direction (towards the beginning of the list or
209
+ * the end of the list, respectively). The distance to scroll is computed to be a third of the
210
+ * length of the tab list view window.
211
+ *
212
+ * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
213
+ * should be called sparingly.
214
+ */
215
+ _scrollHeader(direction: ScrollDirection): {
216
+ maxScrollDistance: number;
217
+ distance: number;
218
+ };
219
+ /** Handles click events on the pagination arrows. */
220
+ _handlePaginatorClick(direction: ScrollDirection): void;
221
+ /**
222
+ * Moves the tab list such that the desired tab label (marked by index) is moved into view.
223
+ *
224
+ * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
225
+ * should be called sparingly.
226
+ */
227
+ _scrollToLabel(labelIndex: number): void;
228
+ /**
229
+ * Evaluate whether the pagination controls should be displayed. If the scroll width of the
230
+ * tab list is wider than the size of the header container, then the pagination controls should
231
+ * be shown.
232
+ *
233
+ * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
234
+ * should be called sparingly.
235
+ */
236
+ _checkPaginationEnabled(): void;
237
+ /**
238
+ * Evaluate whether the before and after controls should be enabled or disabled.
239
+ * If the header is at the beginning of the list (scroll distance is equal to 0) then disable the
240
+ * before button. If the header is at the end of the list (scroll distance is equal to the
241
+ * maximum distance we can scroll), then disable the after button.
242
+ *
243
+ * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
244
+ * should be called sparingly.
245
+ */
246
+ _checkScrollingControls(): void;
247
+ /**
248
+ * Determines what is the maximum length in pixels that can be set for the scroll distance. This
249
+ * is equal to the difference in width between the tab list container and tab header container.
250
+ *
251
+ * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
252
+ * should be called sparingly.
253
+ */
254
+ _getMaxScrollDistance(): number;
255
+ /** Stops the currently-running paginator interval. */
256
+ _stopInterval(): void;
257
+ /**
258
+ * Handles the user pressing down on one of the paginators.
259
+ * Starts scrolling the header after a certain amount of time.
260
+ * @param direction In which direction the paginator should be scrolled.
261
+ */
262
+ _handlePaginatorPress(direction: ScrollDirection, mouseEvent?: MouseEvent): void;
263
+ /**
264
+ * Scrolls the header to a given position.
265
+ * @param position Position to which to scroll.
266
+ * @returns Information on the current scroll distance and the maximum.
267
+ */
268
+ private _scrollTo;
269
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnTabsPaginatedList, never>;
270
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnTabsPaginatedList, never, never, { "disablePagination": { "alias": "disablePagination"; "required": false; "isSignal": true; }; }, { "selectFocusedIndex": "selectFocusedIndex"; "indexFocused": "indexFocused"; }, never, never, true, never>;
271
+ }
272
+
273
+ declare const BrnTabsImports: readonly [typeof BrnTabs, typeof BrnTabsList, typeof BrnTabsTrigger, typeof BrnTabsContent];
274
+
275
+ export { BrnTabs, BrnTabsContent, BrnTabsImports, BrnTabsList, BrnTabsPaginatedList, BrnTabsTrigger };
276
+ export type { BrnActivationMode, BrnPaginatedTabHeaderItem, BrnTabsDirection, BrnTabsOrientation, ScrollDirection, TabEntry };
package/toggle/index.d.ts CHANGED
@@ -1,3 +1,30 @@
1
- import { BrnToggle } from './lib/brn-toggle';
2
- export * from './lib/brn-toggle';
3
- export declare const BrnToggleImports: readonly [typeof BrnToggle];
1
+ import * as _angular_core from '@angular/core';
2
+ import { BooleanInput } from '@angular/cdk/coercion';
3
+
4
+ declare class BrnToggle<T> {
5
+ private static _uniqueId;
6
+ /** The id of the toggle. */
7
+ readonly id: _angular_core.InputSignal<string>;
8
+ /** The value this toggle represents. */
9
+ readonly value: _angular_core.InputSignal<T | undefined>;
10
+ /** Whether the toggle is disabled. */
11
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
12
+ /** The current state of the toggle when not used in a group. */
13
+ readonly state: _angular_core.ModelSignal<"on" | "off">;
14
+ /** The type of the button. */
15
+ readonly type: _angular_core.InputSignal<"button" | "submit" | "reset">;
16
+ /**
17
+ * Accessibility label for screen readers.
18
+ * Use when no visible label exists.
19
+ */
20
+ readonly ariaLabel: _angular_core.InputSignal<string | null>;
21
+ /** Whether the toggle is in the on state. */
22
+ protected readonly _isOn: _angular_core.Signal<boolean>;
23
+ toggle(): void;
24
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnToggle<any>, never>;
25
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnToggle<any>, "button[brnToggle]", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; }, { "state": "stateChange"; }, never, never, true, never>;
26
+ }
27
+
28
+ declare const BrnToggleImports: readonly [typeof BrnToggle];
29
+
30
+ export { BrnToggle, BrnToggleImports };
@@ -1,6 +1,108 @@
1
- import { BrnToggleGroup } from './lib/brn-toggle-group';
2
- import { BrnToggleGroupItem } from './lib/brn-toggle-item';
3
- export * from './lib/brn-toggle-group';
4
- export * from './lib/brn-toggle-group.token';
5
- export * from './lib/brn-toggle-item';
6
- export declare const BrnToggleGroupImports: readonly [typeof BrnToggleGroup, typeof BrnToggleGroupItem];
1
+ import * as _angular_core from '@angular/core';
2
+ import { Type, ExistingProvider } from '@angular/core';
3
+ import { BooleanInput } from '@angular/cdk/coercion';
4
+ import { ControlValueAccessor } from '@angular/forms';
5
+ import * as _spartan_ng_brain_toggle_group from '@spartan-ng/brain/toggle-group';
6
+
7
+ declare class BrnToggleGroupItem<T> {
8
+ private static _uniqueId;
9
+ /** Access the toggle group if available. */
10
+ protected readonly _group: _spartan_ng_brain_toggle_group.BrnToggleGroup<T> | null;
11
+ /** The id of the toggle. */
12
+ readonly id: _angular_core.InputSignal<string>;
13
+ /** The value this toggle represents. */
14
+ readonly value: _angular_core.InputSignal<T | undefined>;
15
+ /** Whether the toggle is disabled. */
16
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
17
+ /** Whether the toggle is disabled either from itself or from the group. */
18
+ protected readonly _disabled: _angular_core.Signal<boolean | undefined>;
19
+ /** The current state of the toggle when not used in a group. */
20
+ readonly state: _angular_core.ModelSignal<"on" | "off">;
21
+ /** The type of the button. */
22
+ readonly type: _angular_core.InputSignal<"button" | "submit" | "reset">;
23
+ /**
24
+ * Accessibility label for screen readers.
25
+ * Use when no visible label exists.
26
+ */
27
+ readonly ariaLabel: _angular_core.InputSignal<string | null>;
28
+ /** Whether the toggle is in the on state. */
29
+ protected readonly _isOn: _angular_core.Signal<boolean>;
30
+ /** The current state that reflects the group state or the model state. */
31
+ protected readonly _state: _angular_core.Signal<"on" | "off">;
32
+ toggle(): void;
33
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnToggleGroupItem<any>, never>;
34
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnToggleGroupItem<any>, "button[brnToggleGroupItem]", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; }, { "state": "stateChange"; }, never, never, true, never>;
35
+ }
36
+
37
+ declare const BRN_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR: {
38
+ provide: _angular_core.InjectionToken<readonly ControlValueAccessor[]>;
39
+ useExisting: _angular_core.Type<any>;
40
+ multi: boolean;
41
+ };
42
+ declare class BrnButtonToggleChange<T = unknown> {
43
+ source: BrnToggleGroupItem<T>;
44
+ value: ToggleValue<T>;
45
+ constructor(source: BrnToggleGroupItem<T>, value: ToggleValue<T>);
46
+ }
47
+ declare class BrnToggleGroup<T = unknown> implements ControlValueAccessor {
48
+ /** The type of the toggle group. */
49
+ readonly type: _angular_core.InputSignal<ToggleType>;
50
+ /** Whether the toggle group allows multiple selections. */
51
+ protected readonly _multiple: _angular_core.Signal<boolean>;
52
+ /** Value of the toggle group. */
53
+ readonly value: _angular_core.ModelSignal<ToggleValue<T>>;
54
+ /** Emits when the value changes. */
55
+ readonly valueChange: _angular_core.OutputEmitterRef<ToggleValue<T>>;
56
+ /** Whether no button toggles need to be selected. */
57
+ readonly nullable: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
58
+ /** Whether the button toggle group is disabled. */
59
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
60
+ /** The disabled state. */
61
+ readonly disabledState: _angular_core.WritableSignal<boolean>;
62
+ /** Emit event when the group value changes. */
63
+ readonly change: _angular_core.OutputEmitterRef<BrnButtonToggleChange<T>>;
64
+ /**
65
+ * The method to be called in order to update ngModel.
66
+ */
67
+ private _onChange;
68
+ /** onTouch function registered via registerOnTouch (ControlValueAccessor). */
69
+ protected onTouched: () => void;
70
+ writeValue(value: ToggleValue<T>): void;
71
+ registerOnChange(fn: (value: ToggleValue<T>) => void): void;
72
+ registerOnTouched(fn: () => void): void;
73
+ setDisabledState(isDisabled: boolean): void;
74
+ /**
75
+ * @internal
76
+ * Determines whether a value can be set on the group.
77
+ */
78
+ canDeselect(value: ToggleValue<T>): boolean;
79
+ /**
80
+ * @internal
81
+ * Selects a value.
82
+ */
83
+ select(value: T, source: BrnToggleGroupItem<T>): void;
84
+ /**
85
+ * @internal
86
+ * Deselects a value.
87
+ */
88
+ deselect(value: T, source: BrnToggleGroupItem<T>): void;
89
+ /**
90
+ * @internal
91
+ * Determines whether a value is selected.
92
+ */
93
+ isSelected(value: T): boolean;
94
+ /** Update the value of the group */
95
+ private emitSelectionChange;
96
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnToggleGroup<any>, never>;
97
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnToggleGroup<any>, "[brnToggleGroup],brn-toggle-group", ["brnToggleGroup"], { "type": { "alias": "type"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "nullable": { "alias": "nullable"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "valueChange": "valueChange"; "change": "change"; }, never, never, true, never>;
98
+ }
99
+ type ToggleValue<T> = T | T[] | null | undefined;
100
+ type ToggleType = 'single' | 'multiple';
101
+
102
+ declare function injectBrnToggleGroup<T>(): BrnToggleGroup<T> | null;
103
+ declare function provideBrnToggleGroup<T>(value: Type<BrnToggleGroup<T>>): ExistingProvider;
104
+
105
+ declare const BrnToggleGroupImports: readonly [typeof BrnToggleGroup, typeof BrnToggleGroupItem];
106
+
107
+ export { BRN_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR, BrnButtonToggleChange, BrnToggleGroup, BrnToggleGroupImports, BrnToggleGroupItem, injectBrnToggleGroup, provideBrnToggleGroup };
108
+ export type { ToggleType, ToggleValue };