@tolle_/tolle-ui 18.2.29 → 18.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 (294) hide show
  1. package/esm2022/lib/accordion-item.component.mjs +5 -11
  2. package/esm2022/lib/accordion.component.mjs +4 -9
  3. package/esm2022/lib/alert-dialog-dynamic.component.mjs +12 -12
  4. package/esm2022/lib/alert-dialog.component.mjs +82 -64
  5. package/esm2022/lib/alert-dialog.service.mjs +38 -6
  6. package/esm2022/lib/alert.component.mjs +5 -11
  7. package/esm2022/lib/aspect-ratio.component.mjs +119 -0
  8. package/esm2022/lib/attachment.component.mjs +334 -0
  9. package/esm2022/lib/avatar-fallback.component.mjs +3 -3
  10. package/esm2022/lib/avatar.component.mjs +4 -9
  11. package/esm2022/lib/badge.component.mjs +4 -9
  12. package/esm2022/lib/breadcrumb-item.component.mjs +3 -3
  13. package/esm2022/lib/breadcrumb-link.component.mjs +3 -3
  14. package/esm2022/lib/breadcrumb-separator.component.mjs +3 -3
  15. package/esm2022/lib/breadcrumb.component.mjs +3 -3
  16. package/esm2022/lib/bubble.component.mjs +301 -0
  17. package/esm2022/lib/button.component.mjs +5 -11
  18. package/esm2022/lib/calendar.component.mjs +5 -11
  19. package/esm2022/lib/card.component.mjs +14 -43
  20. package/esm2022/lib/carousel/carousel.component.mjs +5 -12
  21. package/esm2022/lib/chain-of-thought.component.mjs +380 -0
  22. package/esm2022/lib/chart-pie.component.mjs +386 -0
  23. package/esm2022/lib/chart.component.mjs +1146 -0
  24. package/esm2022/lib/chart.service.mjs +555 -0
  25. package/esm2022/lib/checkbox.component.mjs +5 -11
  26. package/esm2022/lib/checkpoint.component.mjs +134 -0
  27. package/esm2022/lib/collapsible.component.mjs +4 -11
  28. package/esm2022/lib/combobox.component.mjs +372 -0
  29. package/esm2022/lib/command-dialog.component.mjs +164 -0
  30. package/esm2022/lib/command.component.mjs +514 -0
  31. package/esm2022/lib/command.service.mjs +130 -0
  32. package/esm2022/lib/confirmation.component.mjs +219 -0
  33. package/esm2022/lib/context-menu-trigger.directive.mjs +36 -0
  34. package/esm2022/lib/context-menu.component.mjs +460 -0
  35. package/esm2022/lib/context-menu.service.mjs +125 -0
  36. package/esm2022/lib/context.component.mjs +377 -0
  37. package/esm2022/lib/conversation.component.mjs +442 -0
  38. package/esm2022/lib/country-selector.component.mjs +5 -11
  39. package/esm2022/lib/data-table.component.mjs +59 -12
  40. package/esm2022/lib/date-picker.component.mjs +251 -198
  41. package/esm2022/lib/date-range-picker.component.mjs +224 -116
  42. package/esm2022/lib/date-time-picker.component.mjs +506 -0
  43. package/esm2022/lib/direction.component.mjs +79 -0
  44. package/esm2022/lib/dropdown-item.component.mjs +3 -3
  45. package/esm2022/lib/dropdown-label.component.mjs +3 -3
  46. package/esm2022/lib/dropdown-menu.component.mjs +3 -3
  47. package/esm2022/lib/dropdown-separator.component.mjs +3 -3
  48. package/esm2022/lib/dropdown-trigger.directive.mjs +6 -4
  49. package/esm2022/lib/empty-state.component.mjs +4 -9
  50. package/esm2022/lib/field.component.mjs +394 -0
  51. package/esm2022/lib/hover-card.component.mjs +6 -16
  52. package/esm2022/lib/inline-citation.component.mjs +263 -0
  53. package/esm2022/lib/input-group.component.mjs +418 -0
  54. package/esm2022/lib/input.component.mjs +5 -11
  55. package/esm2022/lib/item.component.mjs +243 -0
  56. package/esm2022/lib/kbd.component.mjs +82 -0
  57. package/esm2022/lib/label.component.mjs +4 -9
  58. package/esm2022/lib/marker.component.mjs +135 -0
  59. package/esm2022/lib/masked-input.component.mjs +5 -11
  60. package/esm2022/lib/menubar.component.mjs +683 -0
  61. package/esm2022/lib/message-scroller.component.mjs +353 -0
  62. package/esm2022/lib/message-scroller.service.mjs +157 -0
  63. package/esm2022/lib/message.component.mjs +228 -0
  64. package/esm2022/lib/modal-ref.mjs +36 -7
  65. package/esm2022/lib/modal.component.mjs +42 -28
  66. package/esm2022/lib/modal.mjs +2 -29
  67. package/esm2022/lib/modal.service.mjs +26 -4
  68. package/esm2022/lib/model-selector.component.mjs +310 -0
  69. package/esm2022/lib/multi-select.component.mjs +155 -72
  70. package/esm2022/lib/native-select.component.mjs +201 -0
  71. package/esm2022/lib/navigation-menu.component.mjs +642 -0
  72. package/esm2022/lib/otp-group.component.mjs +3 -3
  73. package/esm2022/lib/otp-slot.component.mjs +4 -9
  74. package/esm2022/lib/otp.component.mjs +5 -11
  75. package/esm2022/lib/pagination.component.mjs +7 -10
  76. package/esm2022/lib/plan.component.mjs +335 -0
  77. package/esm2022/lib/popover-content.component.mjs +4 -9
  78. package/esm2022/lib/popover.component.mjs +15 -13
  79. package/esm2022/lib/progress.component.mjs +4 -9
  80. package/esm2022/lib/prompt-input.component.mjs +526 -0
  81. package/esm2022/lib/queue.component.mjs +280 -0
  82. package/esm2022/lib/radio-group.component.mjs +6 -13
  83. package/esm2022/lib/radio-item.component.mjs +4 -9
  84. package/esm2022/lib/range-calendar.component.mjs +5 -11
  85. package/esm2022/lib/reasoning.component.mjs +335 -0
  86. package/esm2022/lib/resizable-panel.component.mjs +5 -5
  87. package/esm2022/lib/resizable.component.mjs +219 -0
  88. package/esm2022/lib/segment.component.mjs +19 -9
  89. package/esm2022/lib/select-group.component.mjs +4 -8
  90. package/esm2022/lib/select-item.component.mjs +4 -9
  91. package/esm2022/lib/select-separator.component.mjs +4 -8
  92. package/esm2022/lib/select.component.mjs +133 -49
  93. package/esm2022/lib/separator.component.mjs +4 -9
  94. package/esm2022/lib/sheet.component.mjs +38 -56
  95. package/esm2022/lib/shimmer.component.mjs +84 -0
  96. package/esm2022/lib/sidebar.component.mjs +11 -1
  97. package/esm2022/lib/skeleton.component.mjs +4 -9
  98. package/esm2022/lib/sources.component.mjs +452 -0
  99. package/esm2022/lib/spinner.component.mjs +68 -0
  100. package/esm2022/lib/suggestion.component.mjs +207 -0
  101. package/esm2022/lib/switch.component.mjs +5 -11
  102. package/esm2022/lib/table.component.mjs +213 -0
  103. package/esm2022/lib/tabs.component.mjs +4 -11
  104. package/esm2022/lib/tag-input.component.mjs +5 -11
  105. package/esm2022/lib/task.component.mjs +359 -0
  106. package/esm2022/lib/textarea.component.mjs +5 -11
  107. package/esm2022/lib/theme.service.mjs +17 -6
  108. package/esm2022/lib/time-picker.component.mjs +923 -0
  109. package/esm2022/lib/toast.service.mjs +3 -2
  110. package/esm2022/lib/toaster.component.mjs +76 -39
  111. package/esm2022/lib/toggle-group.component.mjs +4 -9
  112. package/esm2022/lib/toggle.component.mjs +5 -11
  113. package/esm2022/lib/tool.component.mjs +462 -0
  114. package/esm2022/lib/typography.component.mjs +83 -0
  115. package/esm2022/lib/utils/color.mjs +140 -19
  116. package/esm2022/public-api.mjs +61 -1
  117. package/fesm2022/tolle-ui.mjs +16642 -1105
  118. package/fesm2022/tolle-ui.mjs.map +1 -1
  119. package/lib/alert-dialog-dynamic.component.d.ts +5 -0
  120. package/lib/alert-dialog.component.d.ts +23 -2
  121. package/lib/aspect-ratio.component.d.ts +20 -0
  122. package/lib/attachment.component.d.ts +101 -0
  123. package/lib/bubble.component.d.ts +112 -0
  124. package/lib/chain-of-thought.component.d.ts +166 -0
  125. package/lib/chart-pie.component.d.ts +108 -0
  126. package/lib/chart.component.d.ts +369 -0
  127. package/lib/chart.service.d.ts +222 -0
  128. package/lib/checkpoint.component.d.ts +51 -0
  129. package/lib/combobox.component.d.ts +90 -0
  130. package/lib/command-dialog.component.d.ts +53 -0
  131. package/lib/command.component.d.ts +189 -0
  132. package/lib/command.service.d.ts +67 -0
  133. package/lib/confirmation.component.d.ts +70 -0
  134. package/lib/context-menu-trigger.directive.d.ts +12 -0
  135. package/lib/context-menu.component.d.ts +41 -0
  136. package/lib/context-menu.service.d.ts +38 -0
  137. package/lib/context.component.d.ts +134 -0
  138. package/lib/conversation.component.d.ts +165 -0
  139. package/lib/data-table.component.d.ts +26 -1
  140. package/lib/date-picker.component.d.ts +72 -11
  141. package/lib/date-range-picker.component.d.ts +63 -6
  142. package/lib/date-time-picker.component.d.ts +119 -0
  143. package/lib/direction.component.d.ts +45 -0
  144. package/lib/field.component.d.ts +201 -0
  145. package/lib/inline-citation.component.d.ts +103 -0
  146. package/lib/input-group.component.d.ts +150 -0
  147. package/lib/item.component.d.ts +154 -0
  148. package/lib/kbd.component.d.ts +50 -0
  149. package/lib/marker.component.d.ts +58 -0
  150. package/lib/menubar.component.d.ts +247 -0
  151. package/lib/message-scroller.component.d.ts +159 -0
  152. package/lib/message-scroller.service.d.ts +73 -0
  153. package/lib/message.component.d.ts +128 -0
  154. package/lib/modal-ref.d.ts +6 -1
  155. package/lib/modal.component.d.ts +7 -4
  156. package/lib/modal.d.ts +9 -3
  157. package/lib/model-selector.component.d.ts +103 -0
  158. package/lib/multi-select.component.d.ts +66 -14
  159. package/lib/native-select.component.d.ts +57 -0
  160. package/lib/navigation-menu.component.d.ts +230 -0
  161. package/lib/plan.component.d.ts +120 -0
  162. package/lib/popover.component.d.ts +1 -0
  163. package/lib/prompt-input.component.d.ts +194 -0
  164. package/lib/queue.component.d.ts +106 -0
  165. package/lib/reasoning.component.d.ts +127 -0
  166. package/lib/resizable.component.d.ts +43 -0
  167. package/lib/segment.component.d.ts +13 -3
  168. package/lib/select.component.d.ts +37 -5
  169. package/lib/sheet.component.d.ts +3 -0
  170. package/lib/shimmer.component.d.ts +38 -0
  171. package/lib/sidebar.component.d.ts +2 -0
  172. package/lib/sources.component.d.ts +156 -0
  173. package/lib/spinner.component.d.ts +29 -0
  174. package/lib/suggestion.component.d.ts +96 -0
  175. package/lib/table.component.d.ts +106 -0
  176. package/lib/task.component.d.ts +151 -0
  177. package/lib/theme.service.d.ts +9 -0
  178. package/lib/time-picker.component.d.ts +243 -0
  179. package/lib/toast.service.d.ts +3 -1
  180. package/lib/toaster.component.d.ts +26 -9
  181. package/lib/tool.component.d.ts +158 -0
  182. package/lib/typography.component.d.ts +32 -0
  183. package/lib/utils/color.d.ts +19 -5
  184. package/package.json +3 -2
  185. package/preset.js +7 -1
  186. package/public-api.d.ts +50 -0
  187. package/registry/docs-content.json +8480 -1542
  188. package/registry/llms-full.txt +2679 -319
  189. package/registry/llms.txt +43 -4
  190. package/registry/manifest.json +9090 -1742
  191. package/registry/r/accordion-item.json +1 -1
  192. package/registry/r/accordion.json +1 -1
  193. package/registry/r/alert-dialog-dynamic.json +1 -1
  194. package/registry/r/alert-dialog.json +1 -1
  195. package/registry/r/alert.json +1 -1
  196. package/registry/r/attachment.json +23 -0
  197. package/registry/r/avatar-fallback.json +1 -1
  198. package/registry/r/avatar.json +1 -1
  199. package/registry/r/badge.json +1 -1
  200. package/registry/r/breadcrumb-item.json +1 -1
  201. package/registry/r/breadcrumb-link.json +1 -1
  202. package/registry/r/breadcrumb-separator.json +1 -1
  203. package/registry/r/breadcrumb.json +1 -1
  204. package/registry/r/bubble.json +23 -0
  205. package/registry/r/button.json +1 -1
  206. package/registry/r/calendar.json +1 -1
  207. package/registry/r/card.json +1 -1
  208. package/registry/r/carousel.json +1 -1
  209. package/registry/r/chain-of-thought.json +23 -0
  210. package/registry/r/chart-pie.json +30 -0
  211. package/registry/r/chart.json +28 -0
  212. package/registry/r/checkbox.json +1 -1
  213. package/registry/r/checkpoint.json +23 -0
  214. package/registry/r/collapsible.json +1 -1
  215. package/registry/r/combobox.json +31 -0
  216. package/registry/r/command-dialog.json +21 -0
  217. package/registry/r/command.json +26 -0
  218. package/registry/r/confirmation.json +23 -0
  219. package/registry/r/context-menu-trigger.json +1 -1
  220. package/registry/r/context-menu.json +1 -1
  221. package/registry/r/context.json +26 -0
  222. package/registry/r/conversation.json +23 -0
  223. package/registry/r/country-selector.json +1 -1
  224. package/registry/r/data-table.json +1 -1
  225. package/registry/r/date-picker.json +4 -4
  226. package/registry/r/date-range-picker.json +3 -3
  227. package/registry/r/date-time-picker.json +28 -0
  228. package/registry/r/direction.json +16 -0
  229. package/registry/r/dropdown-item.json +1 -1
  230. package/registry/r/dropdown-label.json +1 -1
  231. package/registry/r/dropdown-menu.json +1 -1
  232. package/registry/r/dropdown-separator.json +1 -1
  233. package/registry/r/dropdown-trigger.json +1 -1
  234. package/registry/r/empty-state.json +1 -1
  235. package/registry/r/field.json +23 -0
  236. package/registry/r/hover-card.json +1 -1
  237. package/registry/r/inline-citation.json +26 -0
  238. package/registry/r/input-group.json +23 -0
  239. package/registry/r/input.json +1 -1
  240. package/registry/r/item.json +23 -0
  241. package/registry/r/kbd.json +23 -0
  242. package/registry/r/label.json +1 -1
  243. package/registry/r/marker.json +23 -0
  244. package/registry/r/masked-input.json +1 -1
  245. package/registry/r/menubar.json +24 -0
  246. package/registry/r/message-scroller.json +26 -0
  247. package/registry/r/message.json +23 -0
  248. package/registry/r/modal.json +3 -3
  249. package/registry/r/model-selector.json +32 -0
  250. package/registry/r/multi-select.json +2 -2
  251. package/registry/r/native-select.json +23 -0
  252. package/registry/r/navigation-menu.json +24 -0
  253. package/registry/r/otp-group.json +1 -1
  254. package/registry/r/otp-slot.json +1 -1
  255. package/registry/r/otp.json +1 -1
  256. package/registry/r/pagination.json +3 -2
  257. package/registry/r/plan.json +23 -0
  258. package/registry/r/popover-content.json +1 -1
  259. package/registry/r/popover.json +1 -1
  260. package/registry/r/progress.json +1 -1
  261. package/registry/r/prompt-input.json +23 -0
  262. package/registry/r/queue.json +23 -0
  263. package/registry/r/radio-group.json +1 -1
  264. package/registry/r/radio-item.json +1 -1
  265. package/registry/r/range-calendar.json +1 -1
  266. package/registry/r/reasoning.json +23 -0
  267. package/registry/r/resizable-panel.json +1 -1
  268. package/registry/r/segment.json +1 -1
  269. package/registry/r/select-group.json +1 -1
  270. package/registry/r/select-item.json +1 -1
  271. package/registry/r/select-separator.json +1 -1
  272. package/registry/r/select.json +4 -3
  273. package/registry/r/separator.json +1 -1
  274. package/registry/r/sheet.json +1 -1
  275. package/registry/r/shimmer.json +23 -0
  276. package/registry/r/sidebar.json +1 -1
  277. package/registry/r/skeleton.json +1 -1
  278. package/registry/r/sources.json +23 -0
  279. package/registry/r/spinner.json +23 -0
  280. package/registry/r/suggestion.json +23 -0
  281. package/registry/r/switch.json +1 -1
  282. package/registry/r/table.json +21 -0
  283. package/registry/r/tabs.json +1 -1
  284. package/registry/r/tag-input.json +1 -1
  285. package/registry/r/task.json +23 -0
  286. package/registry/r/textarea.json +1 -1
  287. package/registry/r/time-picker.json +24 -0
  288. package/registry/r/toaster.json +2 -2
  289. package/registry/r/toggle-group.json +1 -1
  290. package/registry/r/toggle.json +1 -1
  291. package/registry/r/tool.json +23 -0
  292. package/registry/r/typography.json +23 -0
  293. package/registry/registry.json +915 -22
  294. package/theme.css +121 -8
@@ -0,0 +1,134 @@
1
+ import { OnChanges, OnDestroy, OnInit } from '@angular/core';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ import * as i0 from "@angular/core";
4
+ /** How close the context window is to being full. */
5
+ export type ContextLevel = 'normal' | 'warning' | 'critical';
6
+ /** Everything a `tolle-context` knows about the current window. */
7
+ export interface ContextUsage {
8
+ used: number;
9
+ total: number;
10
+ inputTokens: number | null;
11
+ outputTokens: number | null;
12
+ cost: number | null;
13
+ /** Fraction of the window consumed, clamped to 0–1. */
14
+ ratio: number;
15
+ level: ContextLevel;
16
+ }
17
+ declare const contextTriggerVariants: (props?: ({
18
+ level?: "warning" | "normal" | "critical" | null | undefined;
19
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
20
+ export type ContextProps = VariantProps<typeof contextTriggerVariants>;
21
+ /** Formats a raw token count as a short, readable string. */
22
+ export declare function formatTokens(value: number): string;
23
+ /**
24
+ * Publishes the parent `tolle-context`'s numbers to its OnPush trigger and
25
+ * content children, which receive none of it as their own inputs.
26
+ */
27
+ export declare class ContextService {
28
+ private readonly usageSource;
29
+ /** Emits the current context-window usage. */
30
+ readonly usage$: import("rxjs").Observable<ContextUsage>;
31
+ get usage(): ContextUsage;
32
+ setUsage(usage: ContextUsage): void;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<ContextService, never>;
34
+ static ɵprov: i0.ɵɵInjectableDeclaration<ContextService>;
35
+ }
36
+ /**
37
+ * A token / context-window usage indicator: a compact percentage and bar that
38
+ * shifts to the warning and destructive tokens as the window fills, with a
39
+ * hover breakdown of input, output and cost.
40
+ *
41
+ * ```html
42
+ * <tolle-context [used]="82000" [total]="128000" [inputTokens]="61000" [outputTokens]="21000" [cost]="0.42"></tolle-context>
43
+ * ```
44
+ * @new
45
+ */
46
+ export declare class ContextComponent implements OnInit, OnChanges, OnDestroy {
47
+ /** Tokens consumed so far. @default 0 */
48
+ used: number;
49
+ /** Size of the context window in tokens. @default 0 */
50
+ total: number;
51
+ /** Tokens spent on the prompt, shown in the breakdown. @default null */
52
+ inputTokens: number | null;
53
+ /** Tokens produced by the model, shown in the breakdown. @default null */
54
+ outputTokens: number | null;
55
+ /** Spend for this context, shown in the breakdown. @default null */
56
+ cost: number | null;
57
+ /** Ratio at or above which the indicator turns warning-coloured. @default 0.75 */
58
+ warningThreshold: number;
59
+ /** Ratio at or above which the indicator turns destructive-coloured. @default 0.9 */
60
+ criticalThreshold: number;
61
+ /** Side of the indicator the breakdown opens on. @default 'top' */
62
+ placement: 'top' | 'bottom' | 'left' | 'right';
63
+ /** Milliseconds to wait before opening the breakdown. @default 150 */
64
+ openDelay: number;
65
+ /** Milliseconds to wait before closing the breakdown. @default 200 */
66
+ closeDelay: number;
67
+ /** Extra Tailwind classes merged onto the indicator via `cn()` (last-wins). */
68
+ class: string;
69
+ private readonly service;
70
+ private readonly cdr;
71
+ private refreshTimer?;
72
+ ngOnInit(): void;
73
+ ngOnChanges(): void;
74
+ /** Fraction of the window consumed, clamped to 0–1. */
75
+ get ratio(): number;
76
+ /** Which colour band the current usage falls into. */
77
+ get level(): ContextLevel;
78
+ private push;
79
+ /**
80
+ * `tolle-hover-card` toggles its own visibility from a `setTimeout`, which
81
+ * never marks this OnPush view dirty — re-check once the delay has elapsed.
82
+ */
83
+ scheduleRefresh(delay: number): void;
84
+ ngOnDestroy(): void;
85
+ static ɵfac: i0.ɵɵFactoryDeclaration<ContextComponent, never>;
86
+ static ɵcmp: i0.ɵɵComponentDeclaration<ContextComponent, "tolle-context", never, { "used": { "alias": "used"; "required": false; }; "total": { "alias": "total"; "required": false; }; "inputTokens": { "alias": "inputTokens"; "required": false; }; "outputTokens": { "alias": "outputTokens"; "required": false; }; "cost": { "alias": "cost"; "required": false; }; "warningThreshold": { "alias": "warningThreshold"; "required": false; }; "criticalThreshold": { "alias": "criticalThreshold"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "openDelay": { "alias": "openDelay"; "required": false; }; "closeDelay": { "alias": "closeDelay"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, never, true, never>;
87
+ }
88
+ /** The always-visible part of a `tolle-context`: percentage plus usage bar. */
89
+ export declare class ContextTriggerComponent implements OnChanges, OnInit, OnDestroy {
90
+ /**
91
+ * Angular writes a bound `class` input through its styling path, which does
92
+ * not mark an OnPush component dirty — without this hook the component keeps
93
+ * rendering the class it was born with.
94
+ */
95
+ ngOnChanges(): void;
96
+ /** Extra Tailwind classes merged onto the trigger via `cn()` (last-wins). */
97
+ class: string;
98
+ private readonly service;
99
+ private readonly cdr;
100
+ private readonly sub;
101
+ usage: ContextUsage;
102
+ ngOnInit(): void;
103
+ ngOnDestroy(): void;
104
+ /** Usage as a whole percentage. */
105
+ get percent(): number;
106
+ get computedClass(): string;
107
+ get barClass(): string;
108
+ static ɵfac: i0.ɵɵFactoryDeclaration<ContextTriggerComponent, never>;
109
+ static ɵcmp: i0.ɵɵComponentDeclaration<ContextTriggerComponent, "tolle-context-trigger", never, { "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
110
+ }
111
+ /** The hover breakdown of a `tolle-context`: used, total, input, output, cost. */
112
+ export declare class ContextContentComponent implements OnChanges, OnInit, OnDestroy {
113
+ /**
114
+ * Angular writes a bound `class` input through its styling path, which does
115
+ * not mark an OnPush component dirty — without this hook the component keeps
116
+ * rendering the class it was born with.
117
+ */
118
+ ngOnChanges(): void;
119
+ /** Symbol prefixed to the cost figure. @default '$' */
120
+ currency: string;
121
+ /** Extra Tailwind classes merged onto the breakdown via `cn()` (last-wins). */
122
+ class: string;
123
+ private readonly service;
124
+ private readonly cdr;
125
+ private readonly sub;
126
+ usage: ContextUsage;
127
+ protected tokens: typeof formatTokens;
128
+ ngOnInit(): void;
129
+ ngOnDestroy(): void;
130
+ get computedClass(): string;
131
+ static ɵfac: i0.ɵɵFactoryDeclaration<ContextContentComponent, never>;
132
+ static ɵcmp: i0.ɵɵComponentDeclaration<ContextContentComponent, "tolle-context-content", never, { "currency": { "alias": "currency"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
133
+ }
134
+ export {};
@@ -0,0 +1,165 @@
1
+ import { AfterViewInit, EventEmitter, OnChanges, OnDestroy, OnInit } from '@angular/core';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Coordinates a `tolle-conversation` and its projected parts.
6
+ *
7
+ * The transcript owns the scroll position; the empty state and the
8
+ * "jump to latest" button are OnPush children that cannot read the parent's
9
+ * fields directly, so everything they need is published here as an observable.
10
+ *
11
+ * Provided on `ConversationComponent`, so each transcript gets its own instance.
12
+ */
13
+ export declare class ConversationService {
14
+ private readonly atBottomSource;
15
+ /** Emits whether the transcript is scrolled to (or near) the newest message. */
16
+ readonly atBottom$: import("rxjs").Observable<boolean>;
17
+ private readonly emptySource;
18
+ /** Emits whether the transcript has no messages yet. */
19
+ readonly empty$: import("rxjs").Observable<boolean>;
20
+ private readonly scrollRequestSource;
21
+ /** Emits when a child asks the transcript to scroll to the newest message. */
22
+ readonly scrollRequest$: import("rxjs").Observable<ScrollBehavior>;
23
+ /** True while the transcript is pinned to the bottom. */
24
+ get atBottom(): boolean;
25
+ /** True while the transcript is empty. */
26
+ get empty(): boolean;
27
+ setAtBottom(value: boolean): void;
28
+ setEmpty(value: boolean): void;
29
+ /** Asks the transcript to scroll to the newest message. */
30
+ requestScrollToBottom(behavior?: ScrollBehavior): void;
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConversationService, never>;
32
+ static ɵprov: i0.ɵɵInjectableDeclaration<ConversationService>;
33
+ }
34
+ declare const conversationVariants: (props?: ({
35
+ size?: "default" | "sm" | "lg" | "full" | null | undefined;
36
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
37
+ export type ConversationProps = VariantProps<typeof conversationVariants>;
38
+ /**
39
+ * A scrollable chat transcript. Announces new messages politely, keeps itself
40
+ * pinned to the newest message while the reader is already at the bottom, and
41
+ * hosts the empty state plus the floating "jump to latest" button.
42
+ *
43
+ * Compose it from `tolle-conversation-content`,
44
+ * `tolle-conversation-empty-state` and `tolle-conversation-scroll-button`.
45
+ * @new
46
+ */
47
+ export declare class ConversationComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {
48
+ private readonly cdr;
49
+ /** Height preset for the scroll region. @default 'default' */
50
+ size: ConversationProps['size'];
51
+ /** Keeps the newest message in view while the reader is already at the bottom. @default true */
52
+ autoScroll: boolean;
53
+ /** Set true before the first message so the empty state shows. @default false */
54
+ empty: boolean;
55
+ /** Distance from the bottom, in px, still counted as "at the bottom". @default 32 */
56
+ threshold: number;
57
+ /** Accessible name for the transcript. @default '' */
58
+ ariaLabel: string;
59
+ /** Extra Tailwind classes merged onto the transcript via `cn()` (last-wins). */
60
+ class: string;
61
+ /** Extra Tailwind classes merged onto the scrolling viewport via `cn()` (last-wins). */
62
+ viewportClass: string;
63
+ /** Emitted whenever the transcript becomes pinned to, or leaves, the bottom. */
64
+ atBottomChange: EventEmitter<boolean>;
65
+ private viewport?;
66
+ private readonly service;
67
+ private readonly subscriptions;
68
+ private observer?;
69
+ ngOnInit(): void;
70
+ ngOnChanges(): void;
71
+ ngAfterViewInit(): void;
72
+ ngOnDestroy(): void;
73
+ get computedClass(): string;
74
+ get viewportComputedClass(): string;
75
+ /** Scrolls the transcript to the newest message. */
76
+ scrollToBottom(behavior?: ScrollBehavior): void;
77
+ /** Recomputes whether the viewport is at the bottom and publishes the result. */
78
+ onScroll(): void;
79
+ private onContentChanged;
80
+ private measure;
81
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConversationComponent, never>;
82
+ static ɵcmp: i0.ɵɵComponentDeclaration<ConversationComponent, "tolle-conversation", never, { "size": { "alias": "size"; "required": false; }; "autoScroll": { "alias": "autoScroll"; "required": false; }; "empty": { "alias": "empty"; "required": false; }; "threshold": { "alias": "threshold"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "class": { "alias": "class"; "required": false; }; "viewportClass": { "alias": "viewportClass"; "required": false; }; }, { "atBottomChange": "atBottomChange"; }, never, ["*", "tolle-conversation-scroll-button"], true, never>;
83
+ }
84
+ /** Vertical stack of messages inside a `tolle-conversation`. */
85
+ export declare class ConversationContentComponent implements OnChanges {
86
+ private readonly cdr;
87
+ /**
88
+ * Angular writes a bound `class` input through its styling path, which does
89
+ * not mark an OnPush component dirty — without this hook the component keeps
90
+ * rendering the class it was born with.
91
+ */
92
+ ngOnChanges(): void;
93
+ /** Extra Tailwind classes merged onto the stack via `cn()` (last-wins). */
94
+ class: string;
95
+ get computedClass(): string;
96
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConversationContentComponent, never>;
97
+ static ɵcmp: i0.ɵɵComponentDeclaration<ConversationContentComponent, "tolle-conversation-content", never, { "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
98
+ }
99
+ /**
100
+ * Placeholder shown while a `tolle-conversation` has no messages. Renders
101
+ * nothing once the transcript reports content, so it can stay in the template.
102
+ */
103
+ export declare class ConversationEmptyStateComponent implements OnChanges, OnInit, OnDestroy {
104
+ /**
105
+ * Angular writes a bound `class` input through its styling path, which does
106
+ * not mark an OnPush component dirty — without this hook the component keeps
107
+ * rendering the class it was born with.
108
+ */
109
+ ngOnChanges(): void;
110
+ /** Remixicon class for the illustration. @default 'ri-chat-3-line' */
111
+ icon: string;
112
+ /** Headline shown above the description. @default 'No messages yet' */
113
+ title: string;
114
+ /** Supporting copy under the headline. @default 'Start the conversation by sending a message.' */
115
+ description: string;
116
+ /** Extra Tailwind classes merged onto the empty state via `cn()` (last-wins). */
117
+ class: string;
118
+ private readonly service;
119
+ private readonly cdr;
120
+ private readonly subscriptions;
121
+ visible: boolean;
122
+ ngOnInit(): void;
123
+ ngOnDestroy(): void;
124
+ get computedClass(): string;
125
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConversationEmptyStateComponent, never>;
126
+ static ɵcmp: i0.ɵɵComponentDeclaration<ConversationEmptyStateComponent, "tolle-conversation-empty-state", never, { "icon": { "alias": "icon"; "required": false; }; "title": { "alias": "title"; "required": false; }; "description": { "alias": "description"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
127
+ }
128
+ declare const conversationScrollButtonVariants: (props?: ({
129
+ variant?: "default" | "outline" | "secondary" | null | undefined;
130
+ size?: "default" | "sm" | "icon" | null | undefined;
131
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
132
+ export type ConversationScrollButtonProps = VariantProps<typeof conversationScrollButtonVariants>;
133
+ /**
134
+ * Floating "jump to latest" control. Appears only while the transcript is
135
+ * scrolled away from the newest message, and scrolls it back on click.
136
+ */
137
+ export declare class ConversationScrollButtonComponent implements OnChanges, OnInit, OnDestroy {
138
+ /**
139
+ * Angular writes a bound `class` input through its styling path, which does
140
+ * not mark an OnPush component dirty — without this hook the component keeps
141
+ * rendering the class it was born with.
142
+ */
143
+ ngOnChanges(): void;
144
+ /** Visual style of the button. @default 'outline' */
145
+ variant: ConversationScrollButtonProps['variant'];
146
+ /** Size of the button; 'icon' drops the text label. @default 'default' */
147
+ size: ConversationScrollButtonProps['size'];
148
+ /** Button text and accessible name. @default 'Jump to latest' */
149
+ label: string;
150
+ /** Extra Tailwind classes merged onto the button via `cn()` (last-wins). */
151
+ class: string;
152
+ /** Emitted when the reader jumps back to the newest message. */
153
+ jumped: EventEmitter<void>;
154
+ private readonly service;
155
+ private readonly cdr;
156
+ private readonly subscriptions;
157
+ visible: boolean;
158
+ ngOnInit(): void;
159
+ ngOnDestroy(): void;
160
+ get computedClass(): string;
161
+ onClick(): void;
162
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConversationScrollButtonComponent, never>;
163
+ static ɵcmp: i0.ɵɵComponentDeclaration<ConversationScrollButtonComponent, "tolle-conversation-scroll-button", never, { "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "label": { "alias": "label"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, { "jumped": "jumped"; }, never, never, true, never>;
164
+ }
165
+ export {};
@@ -20,6 +20,31 @@ export declare class DataTableComponent implements OnInit, OnChanges {
20
20
  stickyHeader: boolean;
21
21
  maxHeight?: string;
22
22
  bordered: boolean;
23
+ /** Background for the table surface, behind both header and rows. */
24
+ tableBackground: string;
25
+ /**
26
+ * Background for the header row. Must be opaque when `stickyHeader` is on,
27
+ * otherwise rows scroll visibly through the header — hence the default
28
+ * `bg-background` rather than transparent.
29
+ */
30
+ headerBackground: string;
31
+ /** Alternating row backgrounds. Applied to odd rows only. */
32
+ striped: boolean;
33
+ /** Background applied to odd rows when `striped` is on. */
34
+ stripeBackground: string;
35
+ /**
36
+ * Per-row background, resolved against the row's own data — e.g.
37
+ * `[rowBackground]="r => r.overdue ? 'bg-destructive/10' : ''"`.
38
+ * Takes precedence over `striped`.
39
+ */
40
+ rowBackground?: (row: any, index: number) => string;
41
+ /**
42
+ * A sticky header with no background lets rows scroll visibly through it, so
43
+ * fall back to an opaque default if a consumer clears `headerBackground`.
44
+ */
45
+ get resolvedHeaderBackground(): string;
46
+ /** Resolves the background for a body row: per-row callback wins over striping. */
47
+ getRowBackground(row: any, index: number): string;
23
48
  allowColumnHiding: boolean;
24
49
  showSettings: boolean;
25
50
  columnVisibility: Record<string, boolean>;
@@ -53,5 +78,5 @@ export declare class DataTableComponent implements OnInit, OnChanges {
53
78
  toggleRow(index: number): void;
54
79
  getTemplate(key: string): TolleCellDirective | undefined;
55
80
  static ɵfac: i0.ɵɵFactoryDeclaration<DataTableComponent, never>;
56
- static ɵcmp: i0.ɵɵComponentDeclaration<DataTableComponent, "tolle-data-table", never, { "data": { "alias": "data"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "paginate": { "alias": "paginate"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "expandable": { "alias": "expandable"; "required": false; }; "size": { "alias": "size"; "required": false; }; "stickyHeader": { "alias": "stickyHeader"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "bordered": { "alias": "bordered"; "required": false; }; "allowColumnHiding": { "alias": "allowColumnHiding"; "required": false; }; "showSettings": { "alias": "showSettings"; "required": false; }; "expandedTemplate": { "alias": "expandedTemplate"; "required": false; }; }, {}, ["cellTemplates"], never, true, never>;
81
+ static ɵcmp: i0.ɵɵComponentDeclaration<DataTableComponent, "tolle-data-table", never, { "data": { "alias": "data"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "paginate": { "alias": "paginate"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "expandable": { "alias": "expandable"; "required": false; }; "size": { "alias": "size"; "required": false; }; "stickyHeader": { "alias": "stickyHeader"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "bordered": { "alias": "bordered"; "required": false; }; "tableBackground": { "alias": "tableBackground"; "required": false; }; "headerBackground": { "alias": "headerBackground"; "required": false; }; "striped": { "alias": "striped"; "required": false; }; "stripeBackground": { "alias": "stripeBackground"; "required": false; }; "rowBackground": { "alias": "rowBackground"; "required": false; }; "allowColumnHiding": { "alias": "allowColumnHiding"; "required": false; }; "showSettings": { "alias": "showSettings"; "required": false; }; "expandedTemplate": { "alias": "expandedTemplate"; "required": false; }; }, {}, ["cellTemplates"], never, true, never>;
57
82
  }
@@ -1,43 +1,103 @@
1
- import { ElementRef, ChangeDetectorRef, OnDestroy } from '@angular/core';
1
+ import { EventEmitter, ElementRef, ChangeDetectorRef, OnDestroy, OnChanges } from '@angular/core';
2
2
  import { ControlValueAccessor } from '@angular/forms';
3
+ import { type VariantProps } from 'class-variance-authority';
3
4
  import { cn } from './utils/cn';
4
5
  import { CalendarMode } from './calendar.component';
5
6
  import * as i0 from "@angular/core";
6
- export declare class DatePickerComponent implements ControlValueAccessor, OnDestroy {
7
+ /**
8
+ * The trigger button — same shape as `tolle-date-time-picker`'s, so the two
9
+ * controls read as siblings: a bordered field that opens a floating panel,
10
+ * not a typeable text input.
11
+ */
12
+ declare const datePickerTriggerVariants: (props?: ({
13
+ size?: "default" | "xs" | "sm" | "lg" | null | undefined;
14
+ invalid?: boolean | null | undefined;
15
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
16
+ /** Variant props for the date picker. */
17
+ export type DatePickerProps = VariantProps<typeof datePickerTriggerVariants>;
18
+ /**
19
+ * A button trigger paired with a `tolle-calendar` in a floating panel.
20
+ *
21
+ * The value is a `Date` normalised to the start of its day — a calendar date
22
+ * has no time, and carrying one would make two selections of the same day
23
+ * compare unequal. `mode` switches the whole control between picking a day, a
24
+ * month or a year, taking the calendar's own quick-actions row with it.
25
+ *
26
+ * Implements `ControlValueAccessor`, so it works with `ngModel` and reactive
27
+ * forms. Use `tolle-date-range-picker` for a span and `tolle-date-time-picker`
28
+ * when a time is needed alongside — this trigger is deliberately the same
29
+ * shape as that one, not a typeable masked field.
30
+ */
31
+ export declare class DatePickerComponent implements OnChanges, ControlValueAccessor, OnDestroy {
7
32
  private cdr;
33
+ /**
34
+ * Angular writes a bound `class` input through its styling path, which does
35
+ * not mark an OnPush component dirty — without this hook the component keeps
36
+ * rendering the class it was born with.
37
+ */
38
+ ngOnChanges(): void;
39
+ /** Text shown on the trigger when no date is selected. @default 'Pick a date' */
8
40
  placeholder: string;
41
+ /** Disables the control. @default false */
9
42
  disabled: boolean;
43
+ /** Extra Tailwind classes merged onto the trigger via `cn()` (last-wins). @default '' */
10
44
  class: string;
45
+ /** Disables every day before today in the calendar. @default false */
11
46
  disablePastDates: boolean;
47
+ /** Shows the footer's Clear button. @default true */
12
48
  showClear: boolean;
49
+ /** Shows the panel's Clear / Done footer. @default true */
13
50
  showQuickActions: boolean;
51
+ /** Earliest selectable date; earlier days are disabled. */
14
52
  minDate?: Date;
53
+ /** Latest selectable date; later days are disabled. */
15
54
  maxDate?: Date;
55
+ /** Whether the control picks a day, a month or a year. @default 'date' */
16
56
  mode: CalendarMode;
57
+ /** Overrides how a month is labelled in the calendar header. */
17
58
  formatMonthFn?: (date: Date) => string;
59
+ /** Overrides how a year is labelled in the calendar header. */
18
60
  formatYearFn?: (date: Date) => string;
61
+ /** Overrides how the selected date is rendered on the trigger. */
19
62
  displayFormat?: (date: Date, mode: CalendarMode) => string;
63
+ /** Height and text size of the trigger. @default 'default' */
64
+ size: DatePickerProps['size'];
65
+ /** Applies the destructive border and focus ring. @default false */
66
+ invalid: boolean;
67
+ /** Accessible name when there is no associated visible label. @default '' */
68
+ ariaLabel: string;
69
+ /** Emitted with the chosen date, or `null` when the value is cleared. */
70
+ valueChange: EventEmitter<Date | null>;
71
+ /** Emitted when the calendar panel opens. */
72
+ opened: EventEmitter<void>;
73
+ /** Emitted when the calendar panel closes. */
74
+ closed: EventEmitter<void>;
20
75
  trigger: ElementRef;
21
76
  popover: ElementRef;
22
77
  value: Date | null;
23
- inputValue: string;
24
78
  isOpen: boolean;
25
79
  cleanupAutoUpdate?: () => void;
80
+ /** Footer buttons, styled exactly as the date-time picker's. */
81
+ readonly footerButtonClass: string;
82
+ /** Footer Clear — empties the value and leaves the panel open, like the reference. */
83
+ clearFromFooter(): void;
84
+ /** Footer Done — commits what is already selected and closes. */
85
+ done(): void;
26
86
  private _outsideClickHandler;
27
87
  constructor(cdr: ChangeDetectorRef);
28
- getMask(): string;
29
- getPlaceholder(): string;
30
- getFormatString(): string;
88
+ get computedTriggerClass(): string;
89
+ get displayValue(): string;
31
90
  formatDate(date: Date): string;
32
- parseDate(str: string): Date | null;
33
- onInputChange(str: string): void;
34
91
  onCalendarChange(date: Date | null): void;
35
- togglePopover(event: MouseEvent): void;
92
+ toggle(): void;
93
+ onTriggerKeyDown(event: KeyboardEvent): void;
36
94
  onEscape(): void;
37
95
  open(): void;
38
96
  close(): void;
39
- clear(event: MouseEvent): void;
97
+ /** Reports the current value to the form and to `valueChange`. */
98
+ private emit;
40
99
  private updatePosition;
100
+ private teardown;
41
101
  ngOnDestroy(): void;
42
102
  onChange: any;
43
103
  onTouched: any;
@@ -47,5 +107,6 @@ export declare class DatePickerComponent implements ControlValueAccessor, OnDest
47
107
  setDisabledState(isDisabled: boolean): void;
48
108
  protected cn: typeof cn;
49
109
  static ɵfac: i0.ɵɵFactoryDeclaration<DatePickerComponent, never>;
50
- static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerComponent, "tolle-date-picker", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "class": { "alias": "class"; "required": false; }; "disablePastDates": { "alias": "disablePastDates"; "required": false; }; "showClear": { "alias": "showClear"; "required": false; }; "showQuickActions": { "alias": "showQuickActions"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "formatMonthFn": { "alias": "formatMonthFn"; "required": false; }; "formatYearFn": { "alias": "formatYearFn"; "required": false; }; "displayFormat": { "alias": "displayFormat"; "required": false; }; }, {}, never, never, true, never>;
110
+ static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerComponent, "tolle-date-picker", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "class": { "alias": "class"; "required": false; }; "disablePastDates": { "alias": "disablePastDates"; "required": false; }; "showClear": { "alias": "showClear"; "required": false; }; "showQuickActions": { "alias": "showQuickActions"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "formatMonthFn": { "alias": "formatMonthFn"; "required": false; }; "formatYearFn": { "alias": "formatYearFn"; "required": false; }; "displayFormat": { "alias": "displayFormat"; "required": false; }; "size": { "alias": "size"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, { "valueChange": "valueChange"; "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
51
111
  }
112
+ export {};
@@ -1,32 +1,88 @@
1
- import { ElementRef, ChangeDetectorRef, OnDestroy } from '@angular/core';
1
+ import { EventEmitter, ElementRef, ChangeDetectorRef, OnDestroy, OnChanges } from '@angular/core';
2
2
  import { ControlValueAccessor } from '@angular/forms';
3
+ import { type VariantProps } from 'class-variance-authority';
3
4
  import { cn } from './utils/cn';
4
5
  import { DateRange } from './types/date-range';
5
6
  import * as i0 from "@angular/core";
6
- export declare class DateRangePickerComponent implements ControlValueAccessor, OnDestroy {
7
+ /**
8
+ * The trigger button — same shape as `tolle-date-time-picker`'s and
9
+ * `tolle-date-picker`'s, so all three read as one family: a bordered field
10
+ * that opens a floating panel, not a typeable text input.
11
+ */
12
+ declare const dateRangePickerTriggerVariants: (props?: ({
13
+ size?: "default" | "xs" | "sm" | "lg" | null | undefined;
14
+ invalid?: boolean | null | undefined;
15
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
16
+ /** Variant props for the date range picker. */
17
+ export type DateRangePickerProps = VariantProps<typeof dateRangePickerTriggerVariants>;
18
+ /**
19
+ * A button trigger paired with a `tolle-range-calendar` in a floating panel,
20
+ * for picking a start and an end date.
21
+ *
22
+ * The value is a `DateRange` — `{ start, end }` — and a half-made range is a
23
+ * legal intermediate state: picking a start emits `{ start, end: null }` and
24
+ * leaves the panel open, so a consumer can react to the first click. The panel
25
+ * only closes once both ends exist.
26
+ *
27
+ * Implements `ControlValueAccessor`, so it works with `ngModel` and reactive
28
+ * forms. Use `tolle-date-picker` for a single date — this trigger is
29
+ * deliberately the same shape as that one and as `tolle-date-time-picker`.
30
+ */
31
+ export declare class DateRangePickerComponent implements OnChanges, ControlValueAccessor, OnDestroy {
7
32
  private cdr;
33
+ /**
34
+ * Angular writes a bound `class` input through its styling path, which does
35
+ * not mark an OnPush component dirty — without this hook the component keeps
36
+ * rendering the class it was born with.
37
+ */
38
+ ngOnChanges(): void;
39
+ /** Disables the control. @default false */
8
40
  disabled: boolean;
41
+ /** Text shown on the trigger when no range is selected. @default 'Pick a date range' */
9
42
  placeholder: string;
43
+ /** Extra Tailwind classes merged onto the trigger via `cn()` (last-wins). @default '' */
10
44
  class: string;
45
+ /** Disables every day before today in the calendar. @default false */
11
46
  disablePastDates: boolean;
12
- size: 'xs' | 'sm' | 'default' | 'lg';
47
+ /** Height and text size of the trigger. @default 'default' */
48
+ size: DateRangePickerProps['size'];
13
49
  /** Consecutive months shown in the popover (e.g. `2` for a two-month picker). @default 1 */
14
50
  numberOfMonths: number;
51
+ /** Applies the destructive border and focus ring. @default false */
52
+ invalid: boolean;
53
+ /** Accessible name when there is no associated visible label. @default '' */
54
+ ariaLabel: string;
55
+ /** Emitted with the selected range, including the half-made `{ start, end: null }` state. */
56
+ valueChange: EventEmitter<DateRange>;
57
+ /** Emitted when the calendar panel opens. */
58
+ opened: EventEmitter<void>;
59
+ /** Emitted when the calendar panel closes. */
60
+ closed: EventEmitter<void>;
15
61
  trigger: ElementRef;
16
62
  popover: ElementRef;
17
63
  value: DateRange;
18
64
  isOpen: boolean;
19
65
  cleanupAutoUpdate?: () => void;
66
+ /** Footer buttons, styled exactly as the date-time picker's. */
67
+ readonly footerButtonClass: string;
68
+ /** Footer Clear — empties the range and leaves the panel open, like the reference. */
69
+ clearFromFooter(): void;
70
+ /** Footer Done — commits what is already selected and closes. */
71
+ done(): void;
20
72
  private _outsideClickHandler;
21
73
  constructor(cdr: ChangeDetectorRef);
74
+ get computedTriggerClass(): string;
22
75
  get displayValue(): string;
23
76
  onCalendarSelect(range: DateRange): void;
24
- togglePopover(event: MouseEvent): void;
77
+ toggle(): void;
78
+ onTriggerKeyDown(event: KeyboardEvent): void;
25
79
  onEscape(): void;
26
80
  open(): void;
27
81
  close(): void;
28
- clear(event: MouseEvent): void;
82
+ /** Reports the current range to the form and to `valueChange`. */
83
+ private emit;
29
84
  private updatePosition;
85
+ private teardown;
30
86
  ngOnDestroy(): void;
31
87
  onWindowResize(): void;
32
88
  onWindowScroll(): void;
@@ -38,5 +94,6 @@ export declare class DateRangePickerComponent implements ControlValueAccessor, O
38
94
  setDisabledState(isDisabled: boolean): void;
39
95
  protected cn: typeof cn;
40
96
  static ɵfac: i0.ɵɵFactoryDeclaration<DateRangePickerComponent, never>;
41
- static ɵcmp: i0.ɵɵComponentDeclaration<DateRangePickerComponent, "tolle-date-range-picker", never, { "disabled": { "alias": "disabled"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "class": { "alias": "class"; "required": false; }; "disablePastDates": { "alias": "disablePastDates"; "required": false; }; "size": { "alias": "size"; "required": false; }; "numberOfMonths": { "alias": "numberOfMonths"; "required": false; }; }, {}, never, never, true, never>;
97
+ static ɵcmp: i0.ɵɵComponentDeclaration<DateRangePickerComponent, "tolle-date-range-picker", never, { "disabled": { "alias": "disabled"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "class": { "alias": "class"; "required": false; }; "disablePastDates": { "alias": "disablePastDates"; "required": false; }; "size": { "alias": "size"; "required": false; }; "numberOfMonths": { "alias": "numberOfMonths"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, { "valueChange": "valueChange"; "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
42
98
  }
99
+ export {};