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

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 +9 -9
  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
@@ -1,24 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class BrnSliderThumb {
3
- protected readonly _slider: import("@spartan-ng/brain/slider").BrnSlider;
4
- private readonly _document;
5
- private readonly _elementRef;
6
- private readonly _platform;
7
- /**
8
- * Offsets the thumb centre point while sliding to ensure it remains
9
- * within the bounds of the slider when reaching the edges.
10
- * Based on https://github.com/radix-ui/primitives/blob/main/packages/react/slider/src/slider.tsx
11
- */
12
- protected readonly _thumbOffset: import("@angular/core").Signal<string>;
13
- constructor();
14
- /** @internal */
15
- private dragThumb;
16
- /**
17
- * Handle keyboard events.
18
- * @param event
19
- */
20
- protected handleKeydown(event: KeyboardEvent): void;
21
- private linearScale;
22
- static ɵfac: i0.ɵɵFactoryDeclaration<BrnSliderThumb, never>;
23
- static ɵdir: i0.ɵɵDirectiveDeclaration<BrnSliderThumb, "[brnSliderThumb]", never, {}, {}, never, never, true, never>;
24
- }
@@ -1,12 +0,0 @@
1
- import { type OnDestroy } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class BrnSliderTick implements OnDestroy {
4
- private readonly _slider;
5
- private readonly _templateRef;
6
- private readonly _viewContainer;
7
- private _ticks;
8
- constructor();
9
- ngOnDestroy(): void;
10
- static ɵfac: i0.ɵɵFactoryDeclaration<BrnSliderTick, never>;
11
- static ɵdir: i0.ɵɵDirectiveDeclaration<BrnSliderTick, "[brnSliderTick]", never, {}, {}, never, never, true, never>;
12
- }
@@ -1,12 +0,0 @@
1
- import { ElementRef } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class BrnSliderTrack {
4
- /** Access the slider */
5
- protected readonly _slider: import("@spartan-ng/brain/slider").BrnSlider;
6
- /** @internal Access the slider track */
7
- readonly elementRef: ElementRef<HTMLElement>;
8
- constructor();
9
- protected moveThumbToPoint(event: MouseEvent): void;
10
- static ɵfac: i0.ɵɵFactoryDeclaration<BrnSliderTrack, never>;
11
- static ɵdir: i0.ɵɵDirectiveDeclaration<BrnSliderTrack, "[brnSliderTrack]", never, {}, {}, never, never, true, never>;
12
- }
@@ -1,5 +0,0 @@
1
- import { type ExistingProvider, InjectionToken, type Type } from '@angular/core';
2
- import type { BrnSliderTrack } from './brn-slider-track';
3
- export declare const BrnSliderTrackToken: InjectionToken<BrnSliderTrack>;
4
- export declare function provideBrnSliderTrack(slider: Type<BrnSliderTrack>): ExistingProvider;
5
- export declare function injectBrnSliderTrack(): BrnSliderTrack;
@@ -1,39 +0,0 @@
1
- import type { BooleanInput, NumberInput } from '@angular/cdk/coercion';
2
- import { type OnInit } from '@angular/core';
3
- import { type ControlValueAccessor } from '@angular/forms';
4
- import type { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';
5
- import type { BrnSliderTrack } from './brn-slider-track';
6
- import * as i0 from "@angular/core";
7
- export declare class BrnSlider implements ControlValueAccessor, OnInit {
8
- private readonly _changeDetectorRef;
9
- private readonly _elementRef;
10
- readonly value: import("@angular/core").ModelSignal<number>;
11
- /** Emits when the value changes. */
12
- readonly valueChange: import("@angular/core").OutputEmitterRef<number>;
13
- readonly min: import("@angular/core").InputSignalWithTransform<number, NumberInput>;
14
- readonly max: import("@angular/core").InputSignalWithTransform<number, NumberInput>;
15
- readonly step: import("@angular/core").InputSignalWithTransform<number, NumberInput>;
16
- readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
17
- /** Whether we should show tick marks */
18
- readonly showTicks: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
19
- /** @internal */
20
- readonly ticks: import("@angular/core").Signal<any[]>;
21
- /** @internal */
22
- readonly mutableDisabled: import("@angular/core").WritableSignal<boolean>;
23
- /** @internal */
24
- readonly percentage: import("@angular/core").Signal<number>;
25
- /** @internal Store the on change callback */
26
- protected _onChange?: ChangeFn<number>;
27
- /** @internal Store the on touched callback */
28
- protected _onTouched?: TouchFn;
29
- /** @internal Store the track */
30
- readonly track: import("@angular/core").WritableSignal<BrnSliderTrack | null>;
31
- ngOnInit(): void;
32
- registerOnChange(fn: (value: number) => void): void;
33
- registerOnTouched(fn: () => void): void;
34
- setDisabledState(isDisabled: boolean): void;
35
- writeValue(value: number): void;
36
- setValue(value: number): void;
37
- static ɵfac: i0.ɵɵFactoryDeclaration<BrnSlider, never>;
38
- static ɵdir: i0.ɵɵDirectiveDeclaration<BrnSlider, "[brnSlider]", ["brnSlider"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "showTicks": { "alias": "showTicks"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "valueChange": "valueChange"; }, never, never, true, never>;
39
- }
@@ -1,4 +0,0 @@
1
- import { type ExistingProvider, type Type } from '@angular/core';
2
- import type { BrnSlider } from './brn-slider';
3
- export declare function provideBrnSlider(slider: Type<BrnSlider>): ExistingProvider;
4
- export declare function injectBrnSlider(): BrnSlider;
@@ -1,5 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class BrnSwitchThumb {
3
- static ɵfac: i0.ɵɵFactoryDeclaration<BrnSwitchThumb, never>;
4
- static ɵcmp: i0.ɵɵComponentDeclaration<BrnSwitchThumb, "brn-switch-thumb", never, {}, {}, never, never, true, never>;
5
- }
@@ -1,131 +0,0 @@
1
- import type { BooleanInput } from '@angular/cdk/coercion';
2
- import { type AfterContentInit, ElementRef, type OnDestroy } from '@angular/core';
3
- import { type ControlValueAccessor } from '@angular/forms';
4
- import type { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';
5
- import * as i0 from "@angular/core";
6
- export declare const BRN_SWITCH_VALUE_ACCESSOR: {
7
- provide: import("@angular/core").InjectionToken<readonly ControlValueAccessor[]>;
8
- useExisting: import("@angular/core").Type<any>;
9
- multi: boolean;
10
- };
11
- export declare class BrnSwitch implements AfterContentInit, OnDestroy, ControlValueAccessor {
12
- private readonly _destroyRef;
13
- private readonly _renderer;
14
- private readonly _isBrowser;
15
- private readonly _elementRef;
16
- private readonly _focusMonitor;
17
- private readonly _cdr;
18
- private readonly _document;
19
- protected readonly _focusVisible: import("@angular/core").WritableSignal<boolean>;
20
- protected readonly _focused: import("@angular/core").WritableSignal<boolean>;
21
- /**
22
- * Whether switch is checked/toggled on.
23
- * Can be bound with [(checked)] for two-way binding.
24
- */
25
- readonly checked: import("@angular/core").ModelSignal<boolean>;
26
- /** Emits when checked state changes. */
27
- readonly checkedChange: import("@angular/core").OutputEmitterRef<boolean>;
28
- /**
29
- * Unique identifier for switch component.
30
- * When provided, inner button gets ID without '-switch' suffix.
31
- * Auto-generates ID if not provided.
32
- */
33
- readonly id: import("@angular/core").InputSignal<string | null>;
34
- /**
35
- * Form control name for switch.
36
- * When provided, inner button gets name without '-switch' suffix.
37
- */
38
- readonly name: import("@angular/core").InputSignal<string | null>;
39
- /**
40
- * CSS classes applied to inner button element.
41
- */
42
- readonly class: import("@angular/core").InputSignal<string | null>;
43
- /**
44
- * Accessibility label for screen readers.
45
- * Use when no visible label exists.
46
- */
47
- readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
48
- /**
49
- * ID of element that labels this switch for accessibility.
50
- * Auto-set when switch is inside label element.
51
- */
52
- readonly ariaLabelledby: import("@angular/core").InputSignal<string | null>;
53
- readonly mutableAriaLabelledby: import("@angular/core").WritableSignal<string | null>;
54
- /**
55
- * ID of element that describes this switch for accessibility.
56
- */
57
- readonly ariaDescribedby: import("@angular/core").InputSignal<string | null>;
58
- /**
59
- * Whether switch is required in a form.
60
- */
61
- readonly required: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
62
- /**
63
- * Whether switch is disabled.
64
- * Disabled switches cannot be toggled and indicate disabled state with data attribute.
65
- */
66
- readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
67
- /**
68
- * Keyboard tab order for switch.
69
- * @default 0
70
- */
71
- readonly tabIndex: import("@angular/core").InputSignal<number>;
72
- /**
73
- * Event emitted when switch is blurred (loses focus).
74
- * Used for form validation.
75
- */
76
- readonly touched: import("@angular/core").OutputEmitterRef<void>;
77
- protected _onChange: ChangeFn<boolean>;
78
- private _onTouched;
79
- readonly switch: import("@angular/core").Signal<ElementRef<HTMLInputElement>>;
80
- protected readonly _state: import("@angular/core").Signal<{
81
- disabled: import("@angular/core").WritableSignal<boolean>;
82
- name: string | null;
83
- id: string | null;
84
- }>;
85
- constructor();
86
- /**
87
- * Toggles switch between checked/unchecked states.
88
- * Does nothing if switch is disabled.
89
- */
90
- protected toggle(): void;
91
- ngAfterContentInit(): void;
92
- ngOnDestroy(): void;
93
- /**
94
- * Gets proper ID for inner button element.
95
- * Removes '-switch' suffix if present in container ID.
96
- *
97
- * @param idPassedToContainer - ID applied to container element
98
- * @returns ID to use for inner button or null
99
- */
100
- protected getSwitchButtonId(idPassedToContainer: string | null | undefined): string | null;
101
- /**
102
- * Updates internal state when control value changes from outside.
103
- * Part of ControlValueAccessor interface.
104
- *
105
- * @param value - New checked state
106
- */
107
- writeValue(value: boolean): void;
108
- /**
109
- * Registers callback for value changes.
110
- * Part of ControlValueAccessor interface.
111
- *
112
- * @param fn - Function to call when value changes
113
- */
114
- registerOnChange(fn: ChangeFn<boolean>): void;
115
- /**
116
- * Registers callback for touched events.
117
- * Part of ControlValueAccessor interface.
118
- *
119
- * @param fn - Function to call when control is touched
120
- */
121
- registerOnTouched(fn: TouchFn): void;
122
- /**
123
- * Updates disabled state from form control.
124
- * Part of ControlValueAccessor interface.
125
- *
126
- * @param isDisabled - Whether switch should be disabled
127
- */
128
- setDisabledState(isDisabled: boolean): void;
129
- static ɵfac: i0.ɵɵFactoryDeclaration<BrnSwitch, never>;
130
- static ɵcmp: i0.ɵɵComponentDeclaration<BrnSwitch, "brn-switch", never, { "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "ariaDescribedby": { "alias": "aria-describedby"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "checkedChange": "checkedChange"; "touched": "touched"; }, never, ["brn-switch-thumb"], true, never>;
131
- }
@@ -1,15 +0,0 @@
1
- import { type OnDestroy } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class BrnTabsContent implements OnDestroy {
4
- private readonly _root;
5
- private readonly _elementRef;
6
- readonly contentFor: import("@angular/core").InputSignal<string>;
7
- protected readonly _isSelected: import("@angular/core").Signal<boolean>;
8
- protected readonly _contentId: import("@angular/core").Signal<string>;
9
- protected readonly _labelId: import("@angular/core").Signal<string>;
10
- constructor();
11
- focus(): void;
12
- ngOnDestroy(): void;
13
- static ɵfac: i0.ɵɵFactoryDeclaration<BrnTabsContent, never>;
14
- static ɵdir: i0.ɵɵDirectiveDeclaration<BrnTabsContent, "[brnTabsContent]", ["brnTabsContent"], { "contentFor": { "alias": "brnTabsContent"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
15
- }
@@ -1,17 +0,0 @@
1
- import { type AfterContentInit } from '@angular/core';
2
- import { BrnTabsTrigger } from './brn-tabs-trigger';
3
- import * as i0 from "@angular/core";
4
- export declare class BrnTabsList implements AfterContentInit {
5
- private readonly _root;
6
- protected readonly _orientation: import("@angular/core").InputSignal<import("./brn-tabs").BrnTabsOrientation>;
7
- private readonly _direction;
8
- private readonly _activeTab;
9
- private readonly _tabs;
10
- private readonly _elementRef;
11
- private readonly _keyDownListener;
12
- private _keyManager?;
13
- readonly triggers: import("@angular/core").Signal<readonly BrnTabsTrigger[]>;
14
- ngAfterContentInit(): void;
15
- static ɵfac: i0.ɵɵFactoryDeclaration<BrnTabsList, never>;
16
- static ɵdir: i0.ɵɵDirectiveDeclaration<BrnTabsList, "[brnTabsList]", ["brnTabsList"], {}, {}, ["triggers"], never, true, never>;
17
- }
@@ -1,196 +0,0 @@
1
- /**
2
- * We are building on shoulders of giants here and adapt the implementation provided by the incredible Angular
3
- * team: https://github.com/angular/components/blob/main/src/material/tabs/paginated-tab-header.ts
4
- * Check them out! Give them a try! Leave a star! Their work is incredible!
5
- */
6
- /**
7
- * @license
8
- * Copyright Google LLC All Rights Reserved.
9
- *
10
- * Use of this source code is governed by an MIT-style license that can be
11
- * found in the LICENSE file at https://angular.io/license
12
- */
13
- import { type FocusableOption } from '@angular/cdk/a11y';
14
- import { type Direction } from '@angular/cdk/bidi';
15
- import { type AfterContentChecked, type AfterContentInit, type AfterViewInit, ChangeDetectorRef, ElementRef, type OnDestroy, type Signal } from '@angular/core';
16
- import { Observable, Subject } from 'rxjs';
17
- import * as i0 from "@angular/core";
18
- /**
19
- * The directions that scrolling can go in when the header's tabs exceed the header width. 'After'
20
- * will scroll the header towards the end of the tabs list and 'before' will scroll towards the
21
- * beginning of the list.
22
- */
23
- export type ScrollDirection = 'after' | 'before';
24
- /** Item inside a paginated tab header. */
25
- export type BrnPaginatedTabHeaderItem = FocusableOption & {
26
- elementRef: ElementRef;
27
- };
28
- /**
29
- * Base class for a tab header that supported pagination.
30
- * @docs-private
31
- */
32
- export declare abstract class BrnTabsPaginatedList implements AfterContentChecked, AfterContentInit, AfterViewInit, OnDestroy {
33
- abstract items: Signal<ReadonlyArray<BrnPaginatedTabHeaderItem>>;
34
- abstract itemsChanges: Observable<ReadonlyArray<BrnPaginatedTabHeaderItem>>;
35
- abstract tabListContainer: Signal<ElementRef<HTMLElement>>;
36
- abstract tabList: Signal<ElementRef<HTMLElement>>;
37
- abstract tabListInner: Signal<ElementRef<HTMLElement>>;
38
- abstract nextPaginator: Signal<ElementRef<HTMLElement>>;
39
- abstract previousPaginator: Signal<ElementRef<HTMLElement>>;
40
- /** The distance in pixels that the tab labels should be translated to the left. */
41
- private _scrollDistance;
42
- /** Whether the header should scroll to the selected index after the view has been checked. */
43
- private _selectedIndexChanged;
44
- private readonly _root;
45
- private readonly _activeTab;
46
- private readonly _tabs;
47
- /** Emits when the component is destroyed. */
48
- protected readonly _destroyed: Subject<void>;
49
- /** Whether the controls for pagination should be displayed */
50
- readonly showPaginationControls: import("@angular/core").WritableSignal<boolean>;
51
- /** Whether the tab list can be scrolled more towards the end of the tab label list. */
52
- disableScrollAfter: boolean;
53
- /** Whether the tab list can be scrolled more towards the beginning of the tab label list. */
54
- disableScrollBefore: boolean;
55
- /**
56
- * The number of tab labels that are displayed on the header. When this changes, the header
57
- * should re-evaluate the scroll position.
58
- */
59
- private _tabLabelCount;
60
- /** Whether the scroll distance has changed and should be applied after the view is checked. */
61
- private _scrollDistanceChanged;
62
- /** Used to manage focus between the tabs. */
63
- private _keyManager;
64
- /** Cached text content of the header. */
65
- private _currentTextContent;
66
- /** Stream that will stop the automated scrolling. */
67
- private readonly _stopScrolling;
68
- /**
69
- * Whether pagination should be disabled. This can be used to avoid unnecessary
70
- * layout recalculations if it's known that pagination won't be required.
71
- */
72
- readonly disablePagination: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
73
- /** The index of the active tab. */
74
- private readonly _selectedIndex;
75
- /** Event emitted when the option is selected. */
76
- readonly selectFocusedIndex: import("@angular/core").OutputEmitterRef<number>;
77
- /** Event emitted when a label is focused. */
78
- readonly indexFocused: import("@angular/core").OutputEmitterRef<number>;
79
- private readonly _sharedResizeObserver;
80
- private readonly _injector;
81
- protected _elementRef: ElementRef<HTMLElement>;
82
- protected _changeDetectorRef: ChangeDetectorRef;
83
- private readonly _viewportRuler;
84
- private readonly _dir;
85
- private readonly _ngZone;
86
- private readonly _platform;
87
- readonly animationMode: "NoopAnimations" | "BrowserAnimations" | null;
88
- constructor();
89
- /** Called when the user has selected an item via the keyboard. */
90
- protected abstract _itemSelected(event: KeyboardEvent): void;
91
- ngAfterViewInit(): void;
92
- ngAfterContentInit(): void;
93
- /** Sends any changes that could affect the layout of the items. */
94
- private _itemsResized;
95
- ngAfterContentChecked(): void;
96
- ngOnDestroy(): void;
97
- /** Handles keyboard events on the header. */
98
- _handleKeydown(event: KeyboardEvent): void;
99
- /**
100
- * Callback for when the MutationObserver detects that the content has changed.
101
- */
102
- _onContentChanges(): void;
103
- /**
104
- * Updates the view whether pagination should be enabled or not.
105
- *
106
- * WARNING: Calling this method can be very costly in terms of performance. It should be called
107
- * as infrequently as possible from outside of the Tabs component as it causes a reflow of the
108
- * page.
109
- */
110
- updatePagination(): void;
111
- /** Tracks which element has focus; used for keyboard navigation */
112
- get focusIndex(): number;
113
- /** When the focus index is set, we must manually send focus to the correct label */
114
- set focusIndex(value: number);
115
- /**
116
- * Determines if an index is valid. If the tabs are not ready yet, we assume that the user is
117
- * providing a valid index and return true.
118
- */
119
- _isValidIndex(index: number): boolean;
120
- /**
121
- * Sets focus on the HTML element for the label wrapper and scrolls it into the view if
122
- * scrolling is enabled.
123
- */
124
- _setTabFocus(tabIndex: number): void;
125
- /** The layout direction of the containing app. */
126
- _getLayoutDirection(): Direction;
127
- /** Performs the CSS transformation on the tab list that will cause the list to scroll. */
128
- _updateTabScrollPosition(): void;
129
- /** Sets the distance in pixels that the tab header should be transformed in the X-axis. */
130
- get scrollDistance(): number;
131
- set scrollDistance(value: number);
132
- /**
133
- * Moves the tab list in the 'before' or 'after' direction (towards the beginning of the list or
134
- * the end of the list, respectively). The distance to scroll is computed to be a third of the
135
- * length of the tab list view window.
136
- *
137
- * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
138
- * should be called sparingly.
139
- */
140
- _scrollHeader(direction: ScrollDirection): {
141
- maxScrollDistance: number;
142
- distance: number;
143
- };
144
- /** Handles click events on the pagination arrows. */
145
- _handlePaginatorClick(direction: ScrollDirection): void;
146
- /**
147
- * Moves the tab list such that the desired tab label (marked by index) is moved into view.
148
- *
149
- * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
150
- * should be called sparingly.
151
- */
152
- _scrollToLabel(labelIndex: number): void;
153
- /**
154
- * Evaluate whether the pagination controls should be displayed. If the scroll width of the
155
- * tab list is wider than the size of the header container, then the pagination controls should
156
- * be shown.
157
- *
158
- * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
159
- * should be called sparingly.
160
- */
161
- _checkPaginationEnabled(): void;
162
- /**
163
- * Evaluate whether the before and after controls should be enabled or disabled.
164
- * If the header is at the beginning of the list (scroll distance is equal to 0) then disable the
165
- * before button. If the header is at the end of the list (scroll distance is equal to the
166
- * maximum distance we can scroll), then disable the after button.
167
- *
168
- * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
169
- * should be called sparingly.
170
- */
171
- _checkScrollingControls(): void;
172
- /**
173
- * Determines what is the maximum length in pixels that can be set for the scroll distance. This
174
- * is equal to the difference in width between the tab list container and tab header container.
175
- *
176
- * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
177
- * should be called sparingly.
178
- */
179
- _getMaxScrollDistance(): number;
180
- /** Stops the currently-running paginator interval. */
181
- _stopInterval(): void;
182
- /**
183
- * Handles the user pressing down on one of the paginators.
184
- * Starts scrolling the header after a certain amount of time.
185
- * @param direction In which direction the paginator should be scrolled.
186
- */
187
- _handlePaginatorPress(direction: ScrollDirection, mouseEvent?: MouseEvent): void;
188
- /**
189
- * Scrolls the header to a given position.
190
- * @param position Position to which to scroll.
191
- * @returns Information on the current scroll distance and the maximum.
192
- */
193
- private _scrollTo;
194
- static ɵfac: i0.ɵɵFactoryDeclaration<BrnTabsPaginatedList, never>;
195
- static ɵdir: i0.ɵɵDirectiveDeclaration<BrnTabsPaginatedList, never, never, { "disablePagination": { "alias": "disablePagination"; "required": false; "isSignal": true; }; }, { "selectFocusedIndex": "selectFocusedIndex"; "indexFocused": "indexFocused"; }, never, never, true, never>;
196
- }
@@ -1,21 +0,0 @@
1
- import type { BooleanInput } from '@angular/cdk/coercion';
2
- import { ElementRef, type OnDestroy } from '@angular/core';
3
- import * as i0 from "@angular/core";
4
- export declare class BrnTabsTrigger implements OnDestroy {
5
- readonly elementRef: ElementRef<any>;
6
- private readonly _root;
7
- protected readonly _orientation: import("@angular/core").InputSignal<import("./brn-tabs").BrnTabsOrientation>;
8
- readonly triggerFor: import("@angular/core").InputSignal<string>;
9
- readonly selected: import("@angular/core").Signal<boolean>;
10
- protected readonly _contentId: import("@angular/core").Signal<string>;
11
- protected readonly _labelId: import("@angular/core").Signal<string>;
12
- readonly _disabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
13
- get disabled(): boolean;
14
- constructor();
15
- focus(): void;
16
- activate(): void;
17
- get key(): string | undefined;
18
- ngOnDestroy(): void;
19
- static ɵfac: i0.ɵɵFactoryDeclaration<BrnTabsTrigger, never>;
20
- static ɵdir: i0.ɵɵDirectiveDeclaration<BrnTabsTrigger, "button[brnTabsTrigger]", ["brnTabsTrigger"], { "triggerFor": { "alias": "brnTabsTrigger"; "required": true; "isSignal": true; }; "_disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
21
- }
@@ -1,38 +0,0 @@
1
- import type { BrnTabsContent } from './brn-tabs-content';
2
- import type { BrnTabsTrigger } from './brn-tabs-trigger';
3
- import * as i0 from "@angular/core";
4
- export type BrnTabsOrientation = 'horizontal' | 'vertical';
5
- export type BrnTabsDirection = 'ltr' | 'rtl';
6
- export type BrnActivationMode = 'automatic' | 'manual';
7
- export type TabEntry = {
8
- trigger: BrnTabsTrigger;
9
- content: BrnTabsContent;
10
- };
11
- export declare class BrnTabs {
12
- readonly orientation: import("@angular/core").InputSignal<BrnTabsOrientation>;
13
- /** internal **/
14
- $orientation: import("@angular/core").InputSignal<BrnTabsOrientation>;
15
- readonly direction: import("@angular/core").InputSignal<BrnTabsDirection>;
16
- /** internal **/
17
- $direction: import("@angular/core").InputSignal<BrnTabsDirection>;
18
- readonly activeTab: import("@angular/core").ModelSignal<string | undefined>;
19
- /** internal **/
20
- $activeTab: import("@angular/core").Signal<string | undefined>;
21
- readonly activationMode: import("@angular/core").InputSignal<BrnActivationMode>;
22
- /** internal **/
23
- $activationMode: import("@angular/core").InputSignal<BrnActivationMode>;
24
- readonly tabActivated: import("@angular/core").OutputEmitterRef<string>;
25
- private readonly _tabs;
26
- readonly $tabs: import("@angular/core").Signal<{
27
- [key: string]: TabEntry;
28
- }>;
29
- registerTrigger(key: string, trigger: BrnTabsTrigger): void;
30
- registerContent(key: string, content: BrnTabsContent): void;
31
- unregisterTrigger(key: string): void;
32
- unregisterContent(key: string): void;
33
- private updateEntry;
34
- emitTabActivated(key: string): void;
35
- setActiveTab(key: string): void;
36
- static ɵfac: i0.ɵɵFactoryDeclaration<BrnTabs, never>;
37
- static ɵdir: i0.ɵɵ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>;
38
- }
@@ -1,25 +0,0 @@
1
- import type { BooleanInput } from '@angular/cdk/coercion';
2
- import * as i0 from "@angular/core";
3
- export declare class BrnToggle<T> {
4
- private static _uniqueId;
5
- /** The id of the toggle. */
6
- readonly id: import("@angular/core").InputSignal<string>;
7
- /** The value this toggle represents. */
8
- readonly value: import("@angular/core").InputSignal<T | undefined>;
9
- /** Whether the toggle is disabled. */
10
- readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
11
- /** The current state of the toggle when not used in a group. */
12
- readonly state: import("@angular/core").ModelSignal<"on" | "off">;
13
- /** The type of the button. */
14
- readonly type: import("@angular/core").InputSignal<"button" | "submit" | "reset">;
15
- /**
16
- * Accessibility label for screen readers.
17
- * Use when no visible label exists.
18
- */
19
- readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
20
- /** Whether the toggle is in the on state. */
21
- protected readonly _isOn: import("@angular/core").Signal<boolean>;
22
- toggle(): void;
23
- static ɵfac: i0.ɵɵFactoryDeclaration<BrnToggle<any>, never>;
24
- static ɵdir: i0.ɵɵ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>;
25
- }
@@ -1,68 +0,0 @@
1
- import type { BooleanInput } from '@angular/cdk/coercion';
2
- import { type ControlValueAccessor } from '@angular/forms';
3
- import type { BrnToggleGroupItem } from './brn-toggle-item';
4
- import * as i0 from "@angular/core";
5
- export declare const BRN_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR: {
6
- provide: import("@angular/core").InjectionToken<readonly ControlValueAccessor[]>;
7
- useExisting: import("@angular/core").Type<any>;
8
- multi: boolean;
9
- };
10
- export declare class BrnButtonToggleChange<T = unknown> {
11
- source: BrnToggleGroupItem<T>;
12
- value: ToggleValue<T>;
13
- constructor(source: BrnToggleGroupItem<T>, value: ToggleValue<T>);
14
- }
15
- export declare class BrnToggleGroup<T = unknown> implements ControlValueAccessor {
16
- /** The type of the toggle group. */
17
- readonly type: import("@angular/core").InputSignal<ToggleType>;
18
- /** Whether the toggle group allows multiple selections. */
19
- protected readonly _multiple: import("@angular/core").Signal<boolean>;
20
- /** Value of the toggle group. */
21
- readonly value: import("@angular/core").ModelSignal<ToggleValue<T>>;
22
- /** Emits when the value changes. */
23
- readonly valueChange: import("@angular/core").OutputEmitterRef<ToggleValue<T>>;
24
- /** Whether no button toggles need to be selected. */
25
- readonly nullable: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
26
- /** Whether the button toggle group is disabled. */
27
- readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
28
- /** The disabled state. */
29
- readonly disabledState: import("@angular/core").WritableSignal<boolean>;
30
- /** Emit event when the group value changes. */
31
- readonly change: import("@angular/core").OutputEmitterRef<BrnButtonToggleChange<T>>;
32
- /**
33
- * The method to be called in order to update ngModel.
34
- */
35
- private _onChange;
36
- /** onTouch function registered via registerOnTouch (ControlValueAccessor). */
37
- protected onTouched: () => void;
38
- writeValue(value: ToggleValue<T>): void;
39
- registerOnChange(fn: (value: ToggleValue<T>) => void): void;
40
- registerOnTouched(fn: () => void): void;
41
- setDisabledState(isDisabled: boolean): void;
42
- /**
43
- * @internal
44
- * Determines whether a value can be set on the group.
45
- */
46
- canDeselect(value: ToggleValue<T>): boolean;
47
- /**
48
- * @internal
49
- * Selects a value.
50
- */
51
- select(value: T, source: BrnToggleGroupItem<T>): void;
52
- /**
53
- * @internal
54
- * Deselects a value.
55
- */
56
- deselect(value: T, source: BrnToggleGroupItem<T>): void;
57
- /**
58
- * @internal
59
- * Determines whether a value is selected.
60
- */
61
- isSelected(value: T): boolean;
62
- /** Update the value of the group */
63
- private emitSelectionChange;
64
- static ɵfac: i0.ɵɵFactoryDeclaration<BrnToggleGroup<any>, never>;
65
- static ɵdir: i0.ɵɵ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>;
66
- }
67
- export type ToggleValue<T> = T | T[] | null | undefined;
68
- export type ToggleType = 'single' | 'multiple';
@@ -1,4 +0,0 @@
1
- import { type ExistingProvider, type Type } from '@angular/core';
2
- import type { BrnToggleGroup } from './brn-toggle-group';
3
- export declare function injectBrnToggleGroup<T>(): BrnToggleGroup<T> | null;
4
- export declare function provideBrnToggleGroup<T>(value: Type<BrnToggleGroup<T>>): ExistingProvider;