forty-cdk 0.2.0 → 0.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 (220) hide show
  1. package/accordion/README.md +122 -0
  2. package/aspect-ratio/README.md +76 -0
  3. package/avatar/README.md +100 -0
  4. package/breadcrumbs/README.md +49 -0
  5. package/breakpoints/README.md +81 -0
  6. package/button/README.md +49 -0
  7. package/calendar/README.md +458 -0
  8. package/carousel/README.md +358 -0
  9. package/checkbox/README.md +146 -0
  10. package/combobox/README.md +535 -0
  11. package/context-menu/README.md +139 -0
  12. package/date-field/README.md +184 -0
  13. package/date-picker/README.md +338 -0
  14. package/dialog/README.md +388 -0
  15. package/disclosure/README.md +114 -0
  16. package/drag-drop/README.md +359 -0
  17. package/drawer/README.md +560 -0
  18. package/dropdown-menu/README.md +176 -0
  19. package/fesm2022/forty-cdk-accordion.mjs +348 -0
  20. package/fesm2022/forty-cdk-accordion.mjs.map +1 -0
  21. package/fesm2022/forty-cdk-aspect-ratio.mjs +74 -0
  22. package/fesm2022/forty-cdk-aspect-ratio.mjs.map +1 -0
  23. package/fesm2022/forty-cdk-avatar.mjs +308 -0
  24. package/fesm2022/forty-cdk-avatar.mjs.map +1 -0
  25. package/fesm2022/forty-cdk-breadcrumbs.mjs +125 -0
  26. package/fesm2022/forty-cdk-breadcrumbs.mjs.map +1 -0
  27. package/fesm2022/forty-cdk-breakpoints.mjs +117 -0
  28. package/fesm2022/forty-cdk-breakpoints.mjs.map +1 -0
  29. package/fesm2022/forty-cdk-button.mjs +134 -0
  30. package/fesm2022/forty-cdk-button.mjs.map +1 -0
  31. package/fesm2022/forty-cdk-calendar.mjs +2034 -0
  32. package/fesm2022/forty-cdk-calendar.mjs.map +1 -0
  33. package/fesm2022/forty-cdk-carousel.mjs +968 -0
  34. package/fesm2022/forty-cdk-carousel.mjs.map +1 -0
  35. package/fesm2022/forty-cdk-checkbox.mjs +226 -0
  36. package/fesm2022/forty-cdk-checkbox.mjs.map +1 -0
  37. package/fesm2022/forty-cdk-combobox.mjs +2596 -0
  38. package/fesm2022/forty-cdk-combobox.mjs.map +1 -0
  39. package/fesm2022/forty-cdk-context-menu.mjs +413 -0
  40. package/fesm2022/forty-cdk-context-menu.mjs.map +1 -0
  41. package/fesm2022/forty-cdk-core.mjs +9022 -0
  42. package/fesm2022/forty-cdk-core.mjs.map +1 -0
  43. package/fesm2022/forty-cdk-date-field.mjs +744 -0
  44. package/fesm2022/forty-cdk-date-field.mjs.map +1 -0
  45. package/fesm2022/forty-cdk-date-picker.mjs +1011 -0
  46. package/fesm2022/forty-cdk-date-picker.mjs.map +1 -0
  47. package/fesm2022/forty-cdk-dialog.mjs +707 -0
  48. package/fesm2022/forty-cdk-dialog.mjs.map +1 -0
  49. package/fesm2022/forty-cdk-disclosure.mjs +190 -0
  50. package/fesm2022/forty-cdk-disclosure.mjs.map +1 -0
  51. package/fesm2022/forty-cdk-drag-drop.mjs +1180 -0
  52. package/fesm2022/forty-cdk-drag-drop.mjs.map +1 -0
  53. package/fesm2022/forty-cdk-drawer.mjs +1641 -0
  54. package/fesm2022/forty-cdk-drawer.mjs.map +1 -0
  55. package/fesm2022/forty-cdk-dropdown-menu.mjs +350 -0
  56. package/fesm2022/forty-cdk-dropdown-menu.mjs.map +1 -0
  57. package/fesm2022/forty-cdk-field.mjs +425 -0
  58. package/fesm2022/forty-cdk-field.mjs.map +1 -0
  59. package/fesm2022/forty-cdk-fieldset.mjs +164 -0
  60. package/fesm2022/forty-cdk-fieldset.mjs.map +1 -0
  61. package/fesm2022/forty-cdk-file-upload.mjs +221 -0
  62. package/fesm2022/forty-cdk-file-upload.mjs.map +1 -0
  63. package/fesm2022/forty-cdk-hover-card.mjs +496 -0
  64. package/fesm2022/forty-cdk-hover-card.mjs.map +1 -0
  65. package/fesm2022/forty-cdk-input.mjs +274 -0
  66. package/fesm2022/forty-cdk-input.mjs.map +1 -0
  67. package/fesm2022/forty-cdk-internationalized-date.mjs +1 -1
  68. package/fesm2022/forty-cdk-internationalized-date.mjs.map +1 -1
  69. package/fesm2022/forty-cdk-listbox.mjs +1279 -0
  70. package/fesm2022/forty-cdk-listbox.mjs.map +1 -0
  71. package/fesm2022/forty-cdk-menu.mjs +1439 -0
  72. package/fesm2022/forty-cdk-menu.mjs.map +1 -0
  73. package/fesm2022/forty-cdk-menubar.mjs +787 -0
  74. package/fesm2022/forty-cdk-menubar.mjs.map +1 -0
  75. package/fesm2022/forty-cdk-meter.mjs +211 -0
  76. package/fesm2022/forty-cdk-meter.mjs.map +1 -0
  77. package/fesm2022/forty-cdk-navigation-menu.mjs +1145 -0
  78. package/fesm2022/forty-cdk-navigation-menu.mjs.map +1 -0
  79. package/fesm2022/forty-cdk-number-input.mjs +559 -0
  80. package/fesm2022/forty-cdk-number-input.mjs.map +1 -0
  81. package/fesm2022/forty-cdk-otp-input.mjs +527 -0
  82. package/fesm2022/forty-cdk-otp-input.mjs.map +1 -0
  83. package/fesm2022/forty-cdk-pagination.mjs +323 -0
  84. package/fesm2022/forty-cdk-pagination.mjs.map +1 -0
  85. package/fesm2022/forty-cdk-pane-resizer.mjs +297 -0
  86. package/fesm2022/forty-cdk-pane-resizer.mjs.map +1 -0
  87. package/fesm2022/forty-cdk-popover.mjs +698 -0
  88. package/fesm2022/forty-cdk-popover.mjs.map +1 -0
  89. package/fesm2022/forty-cdk-progress.mjs +226 -0
  90. package/fesm2022/forty-cdk-progress.mjs.map +1 -0
  91. package/fesm2022/forty-cdk-radio-group.mjs +378 -0
  92. package/fesm2022/forty-cdk-radio-group.mjs.map +1 -0
  93. package/fesm2022/forty-cdk-scroll-area.mjs +640 -0
  94. package/fesm2022/forty-cdk-scroll-area.mjs.map +1 -0
  95. package/fesm2022/forty-cdk-search.mjs +205 -0
  96. package/fesm2022/forty-cdk-search.mjs.map +1 -0
  97. package/fesm2022/forty-cdk-select.mjs +1661 -0
  98. package/fesm2022/forty-cdk-select.mjs.map +1 -0
  99. package/fesm2022/forty-cdk-separator.mjs +82 -0
  100. package/fesm2022/forty-cdk-separator.mjs.map +1 -0
  101. package/fesm2022/forty-cdk-signal-forms.mjs +97 -0
  102. package/fesm2022/forty-cdk-signal-forms.mjs.map +1 -0
  103. package/fesm2022/forty-cdk-slider.mjs +803 -0
  104. package/fesm2022/forty-cdk-slider.mjs.map +1 -0
  105. package/fesm2022/forty-cdk-stepper.mjs +886 -0
  106. package/fesm2022/forty-cdk-stepper.mjs.map +1 -0
  107. package/fesm2022/forty-cdk-switch.mjs +137 -0
  108. package/fesm2022/forty-cdk-switch.mjs.map +1 -0
  109. package/fesm2022/forty-cdk-table.mjs +1518 -0
  110. package/fesm2022/forty-cdk-table.mjs.map +1 -0
  111. package/fesm2022/forty-cdk-tabs.mjs +400 -0
  112. package/fesm2022/forty-cdk-tabs.mjs.map +1 -0
  113. package/fesm2022/forty-cdk-time-field.mjs +593 -0
  114. package/fesm2022/forty-cdk-time-field.mjs.map +1 -0
  115. package/fesm2022/forty-cdk-time-picker.mjs +1013 -0
  116. package/fesm2022/forty-cdk-time-picker.mjs.map +1 -0
  117. package/fesm2022/forty-cdk-toast.mjs +1153 -0
  118. package/fesm2022/forty-cdk-toast.mjs.map +1 -0
  119. package/fesm2022/forty-cdk-toggle.mjs +516 -0
  120. package/fesm2022/forty-cdk-toggle.mjs.map +1 -0
  121. package/fesm2022/forty-cdk-toolbar.mjs +374 -0
  122. package/fesm2022/forty-cdk-toolbar.mjs.map +1 -0
  123. package/fesm2022/forty-cdk-tooltip.mjs +672 -0
  124. package/fesm2022/forty-cdk-tooltip.mjs.map +1 -0
  125. package/fesm2022/forty-cdk-tree.mjs +2007 -0
  126. package/fesm2022/forty-cdk-tree.mjs.map +1 -0
  127. package/fesm2022/forty-cdk-virtualization.mjs +1 -1
  128. package/fesm2022/forty-cdk-virtualization.mjs.map +1 -1
  129. package/fesm2022/forty-cdk.mjs +0 -43310
  130. package/fesm2022/forty-cdk.mjs.map +1 -1
  131. package/field/README.md +97 -0
  132. package/fieldset/README.md +86 -0
  133. package/file-upload/README.md +73 -0
  134. package/hover-card/README.md +171 -0
  135. package/input/README.md +156 -0
  136. package/listbox/README.md +424 -0
  137. package/menu/README.md +181 -0
  138. package/menubar/README.md +140 -0
  139. package/meter/README.md +128 -0
  140. package/navigation-menu/README.md +253 -0
  141. package/number-input/README.md +171 -0
  142. package/otp-input/README.md +198 -0
  143. package/package.json +213 -1
  144. package/pagination/README.md +61 -0
  145. package/pane-resizer/README.md +136 -0
  146. package/popover/README.md +262 -0
  147. package/progress/README.md +115 -0
  148. package/radio-group/README.md +129 -0
  149. package/scroll-area/README.md +184 -0
  150. package/search/README.md +42 -0
  151. package/select/README.md +488 -0
  152. package/separator/README.md +84 -0
  153. package/signal-forms/README.md +72 -0
  154. package/slider/README.md +152 -0
  155. package/stepper/README.md +292 -0
  156. package/switch/README.md +116 -0
  157. package/table/README.md +769 -0
  158. package/tabs/README.md +130 -0
  159. package/time-field/README.md +157 -0
  160. package/time-picker/README.md +172 -0
  161. package/toast/README.md +398 -0
  162. package/toggle/README.md +224 -0
  163. package/toolbar/README.md +109 -0
  164. package/tooltip/README.md +274 -0
  165. package/tree/README.md +708 -0
  166. package/types/forty-cdk-accordion.d.ts +242 -0
  167. package/types/forty-cdk-aspect-ratio.d.ts +59 -0
  168. package/types/forty-cdk-avatar.d.ts +133 -0
  169. package/types/forty-cdk-breadcrumbs.d.ts +92 -0
  170. package/types/forty-cdk-breakpoints.d.ts +141 -0
  171. package/types/forty-cdk-button.d.ts +80 -0
  172. package/types/forty-cdk-calendar.d.ts +914 -0
  173. package/types/forty-cdk-carousel.d.ts +530 -0
  174. package/types/forty-cdk-checkbox.d.ts +141 -0
  175. package/types/forty-cdk-combobox.d.ts +1259 -0
  176. package/types/forty-cdk-context-menu.d.ts +313 -0
  177. package/types/forty-cdk-core.d.ts +5774 -0
  178. package/types/forty-cdk-date-field.d.ts +307 -0
  179. package/types/forty-cdk-date-picker.d.ts +622 -0
  180. package/types/forty-cdk-dialog.d.ts +546 -0
  181. package/types/forty-cdk-disclosure.d.ts +127 -0
  182. package/types/forty-cdk-drag-drop.d.ts +456 -0
  183. package/types/forty-cdk-drawer.d.ts +871 -0
  184. package/types/forty-cdk-dropdown-menu.d.ts +242 -0
  185. package/types/forty-cdk-field.d.ts +236 -0
  186. package/types/forty-cdk-fieldset.d.ts +119 -0
  187. package/types/forty-cdk-file-upload.d.ts +124 -0
  188. package/types/forty-cdk-hover-card.d.ts +320 -0
  189. package/types/forty-cdk-input.d.ts +169 -0
  190. package/types/forty-cdk-internationalized-date.d.ts +1 -1
  191. package/types/forty-cdk-listbox.d.ts +513 -0
  192. package/types/forty-cdk-menu.d.ts +629 -0
  193. package/types/forty-cdk-menubar.d.ts +451 -0
  194. package/types/forty-cdk-meter.d.ts +122 -0
  195. package/types/forty-cdk-navigation-menu.d.ts +514 -0
  196. package/types/forty-cdk-number-input.d.ts +319 -0
  197. package/types/forty-cdk-otp-input.d.ts +248 -0
  198. package/types/forty-cdk-pagination.d.ts +214 -0
  199. package/types/forty-cdk-pane-resizer.d.ts +145 -0
  200. package/types/forty-cdk-popover.d.ts +509 -0
  201. package/types/forty-cdk-progress.d.ts +143 -0
  202. package/types/forty-cdk-radio-group.d.ts +222 -0
  203. package/types/forty-cdk-scroll-area.d.ts +258 -0
  204. package/types/forty-cdk-search.d.ts +142 -0
  205. package/types/forty-cdk-select.d.ts +899 -0
  206. package/types/forty-cdk-separator.d.ts +59 -0
  207. package/types/forty-cdk-signal-forms.d.ts +58 -0
  208. package/types/forty-cdk-slider.d.ts +379 -0
  209. package/types/forty-cdk-stepper.d.ts +650 -0
  210. package/types/forty-cdk-switch.d.ts +87 -0
  211. package/types/forty-cdk-table.d.ts +723 -0
  212. package/types/forty-cdk-tabs.d.ts +235 -0
  213. package/types/forty-cdk-time-field.d.ts +307 -0
  214. package/types/forty-cdk-time-picker.d.ts +578 -0
  215. package/types/forty-cdk-toast.d.ts +598 -0
  216. package/types/forty-cdk-toggle.d.ts +310 -0
  217. package/types/forty-cdk-toolbar.d.ts +217 -0
  218. package/types/forty-cdk-tooltip.d.ts +436 -0
  219. package/types/forty-cdk-tree.d.ts +688 -0
  220. package/types/forty-cdk.d.ts +1 -19743
@@ -0,0 +1,456 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { InjectionToken, Signal, TemplateRef, Provider } from '@angular/core';
3
+ import { WritingDirection, ListNavigationAction, DragPreview, RovingTabindex } from 'forty-cdk/core';
4
+
5
+ /** A registered draggable item, as seen by its drop list. */
6
+ interface ForDraggableHandle {
7
+ readonly host: HTMLElement;
8
+ /** The consumer-supplied data payload for this item. */
9
+ readonly data: Signal<unknown>;
10
+ /** Effective disabled (item's own `dragDisabled` OR the list being disabled). */
11
+ readonly disabled: Signal<boolean>;
12
+ }
13
+ /**
14
+ * Coordination contract owned by `ForDropList` and consumed by each `ForDraggable`. Also the
15
+ * public handle type used by `[connectedTo]` and the `dragDrop` event's
16
+ * `previousContainer` / `container` — advanced consumers may read `host` / `items`; the
17
+ * interaction methods exist for the directive pieces.
18
+ */
19
+ interface ForDropListContext {
20
+ readonly host: HTMLElement;
21
+ readonly orientation: Signal<'horizontal' | 'vertical' | 'mixed'>;
22
+ readonly dir: Signal<WritingDirection>;
23
+ /** Effective disabled of the whole list. */
24
+ readonly disabled: Signal<boolean>;
25
+ readonly items: Signal<readonly ForDraggableHandle[]>;
26
+ /** Insertion index this list is the current drop target at, else `null`. */
27
+ readonly dragOverIndex: Signal<number | null>;
28
+ setDragOver(index: number | null): void;
29
+ registerItem(handle: ForDraggableHandle): void;
30
+ unregisterItem(handle: ForDraggableHandle): void;
31
+ /** Roving tab-stop value for `el` before/after roving engages (mirror Listbox's pattern). */
32
+ itemTabindex(el: HTMLElement): -1 | 0 | null;
33
+ isFirstFocusableItem(el: HTMLElement): boolean;
34
+ isItemHighlighted(el: HTMLElement): boolean;
35
+ setActiveItem(el: HTMLElement): void;
36
+ /** Idle roving focus move from `el`. */
37
+ navigate(el: HTMLElement, action: ListNavigationAction): void;
38
+ /** Start a keyboard drag for `el`; returns its source index, or `-1` if it could not lift. */
39
+ lift(el: HTMLElement): number;
40
+ /** Whether `el` is the currently lifted item. */
41
+ isLifted(el: HTMLElement): boolean;
42
+ /** Step the logical drop target while lifted. */
43
+ moveLifted(action: ListNavigationAction): void;
44
+ /** Commit the current drag (emits `dragDrop` on the source list). No-op if nothing lifted. */
45
+ drop(): void;
46
+ /** Abort the current drag without emitting `dragDrop`. */
47
+ cancel(): void;
48
+ /**
49
+ * Begin a pointer drag for `el` at viewport point `point`. Sets up the same session state as a
50
+ * keyboard lift. `preview` is the floating element supplied by the draggable (a consumer
51
+ * `[forDragPreview]` template) — either a full {@link DragPreview} or the minimal
52
+ * `{ moveTo, destroy }` shape; when omitted, the list creates the default cloned preview.
53
+ * Returns the source index, or `-1` if it could not lift.
54
+ */
55
+ pointerLift(el: HTMLElement, point: {
56
+ x: number;
57
+ y: number;
58
+ }, preview?: DragPreview | {
59
+ moveTo(x: number, y: number): void;
60
+ destroy(): void;
61
+ } | null): number;
62
+ /** Update the live pointer drop target + preview position. No-op if nothing is lifted. */
63
+ pointerMove(point: {
64
+ x: number;
65
+ y: number;
66
+ }): void;
67
+ /**
68
+ * Register the rendered placeholder's root nodes with the source list so it can reposition
69
+ * them to the live drop index during a `liveSort` pointer drag. Pass `null` to clear. The
70
+ * list ignores the nodes when `liveSort` is off. Called by `ForDraggable`.
71
+ */
72
+ setLivePlaceholder(nodes: readonly Node[] | null): void;
73
+ }
74
+ declare const FOR_DRAG_DROP_CONTEXT: InjectionToken<ForDropListContext>;
75
+ /** Emitted by the **source** `ForDropList` on a committed drop (keyboard or pointer). */
76
+ interface ForDragDropEvent<T = unknown> {
77
+ readonly item: T;
78
+ readonly previousContainer: ForDropListContext;
79
+ readonly container: ForDropListContext;
80
+ readonly previousIndex: number;
81
+ readonly currentIndex: number;
82
+ }
83
+ /** Emitted by `ForDraggable` when a drag (keyboard or pointer) starts. */
84
+ interface ForDragStartEvent {
85
+ readonly source: ForDropListContext;
86
+ readonly index: number;
87
+ }
88
+ /** Emitted by `ForDraggable` when a drag ends (committed or cancelled). */
89
+ interface ForDragEndEvent {
90
+ /** `true` on a committed drop, `false` on cancel. */
91
+ readonly dropped: boolean;
92
+ }
93
+ /**
94
+ * Internal coordination surface a `ForDraggable` / `ForFreeDrag` exposes to its
95
+ * `[forDragHandle]` children.
96
+ */
97
+ interface ForDraggableContext {
98
+ /** Register a handle element; while any handle is registered, pointer drags may only start on one. */
99
+ registerHandle(el: HTMLElement): void;
100
+ unregisterHandle(el: HTMLElement): void;
101
+ }
102
+ declare const FOR_DRAGGABLE_CONTEXT: InjectionToken<ForDraggableContext>;
103
+
104
+ /**
105
+ * Optional DI seam overriding the fallback `orientation` of every `[forDropList]` in scope.
106
+ * `ForDropList`'s `orientation` input falls back to this token's value (`'vertical'` when the
107
+ * token is not provided); a consumer `orientation` binding always wins over it. Wrappers
108
+ * compose a horizontal list without leaking `orientation="horizontal"` boilerplate into the
109
+ * consumer's template — `ForTableColumnReorder` provides `'horizontal'` so column reordering
110
+ * resolves along the row axis out of the box.
111
+ */
112
+ declare const FOR_DROP_LIST_DEFAULT_ORIENTATION: InjectionToken<"horizontal" | "vertical" | "mixed">;
113
+ /**
114
+ * Root directive of the drag-drop primitive. Apply on any container element to
115
+ * create a reorderable list. Items inside are declared with `[forDraggable]`.
116
+ *
117
+ * Supports both keyboard dragging and pointer (mouse / touch / pen) dragging.
118
+ */
119
+ declare class ForDropList implements ForDropListContext {
120
+ #private;
121
+ /**
122
+ * Layout orientation of the list. Affects which arrow keys move focus and the lifted item, and
123
+ * how a pointer drag resolves the live drop index. Defaults to `'vertical'`, or to
124
+ * `FOR_DROP_LIST_DEFAULT_ORIENTATION` when an in-scope provider sets it (e.g.
125
+ * `ForTableColumnReorder` defaults it to `'horizontal'`).
126
+ *
127
+ * `'mixed'` is for wrapping grids (`flex-wrap` / CSS grid) of uniformly-sized items: the drop
128
+ * index is resolved in 2D so an item flowing across rows lands in the slot under the pointer's
129
+ * row and column, and every arrow key steps the lifted item linearly in DOM order. A `'mixed'`
130
+ * list that happens to render as a single row or single column resolves identically to
131
+ * `'horizontal'` / `'vertical'`.
132
+ */
133
+ readonly orientation: _angular_core.InputSignal<"horizontal" | "vertical" | "mixed">;
134
+ /**
135
+ * Writing direction. When unset (default `null`), the inherited ambient direction is
136
+ * resolved from the nearest ancestor carrying a `dir` attribute (or `<html dir>`),
137
+ * defaulting to `'ltr'`.
138
+ */
139
+ readonly _dirInput: _angular_core.InputSignal<WritingDirection | null>;
140
+ readonly dir: _angular_core.Signal<WritingDirection>;
141
+ /** When true, the entire list and all its items are disabled. */
142
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
143
+ /**
144
+ * Other lists this one can transfer items into. Union'd with any `[forDropListGroup]`
145
+ * members. Disabled lists are excluded from the effective connected set.
146
+ */
147
+ readonly connectedTo: _angular_core.InputSignal<readonly ForDropListContext[]>;
148
+ /**
149
+ * When true (the default), a pointer drag that nears the edge of the nearest scrollable
150
+ * container (the list, a scrollable ancestor, or the viewport) auto-scrolls it toward that
151
+ * edge so off-screen drop targets become reachable. Set `false` to opt out. Edge size and
152
+ * max speed are configured via `provideForDragDropDefaults`. Keyboard dragging is unaffected.
153
+ */
154
+ readonly autoScroll: _angular_core.InputSignalWithTransform<boolean, unknown>;
155
+ /**
156
+ * When true, the `[forDragPlaceholder]` follows the live resolved drop index during a
157
+ * **pointer** drag — within this list and across connected lists — so siblings part to
158
+ * reveal where the item will land. When false (the default), the placeholder stays in the
159
+ * dragged item's source slot (the #806 behaviour). Has no effect without a
160
+ * `[forDragPlaceholder]` template, and none on keyboard dragging.
161
+ *
162
+ * A `dragDisabled` sibling acts as a hard fence: the placeholder stops at the first
163
+ * pinned item instead of travelling past it. This is purely visual — the committed drop
164
+ * index emitted by `dragDrop` is resolved separately and unaffected.
165
+ */
166
+ readonly liveSort: _angular_core.InputSignalWithTransform<boolean, unknown>;
167
+ /**
168
+ * When true, a committed drop (keyboard or pointer) animates: displaced sibling items
169
+ * transition from their old positions to their new ones (FLIP), and — on a pointer drag — the
170
+ * floating preview settles into the final slot before it is removed. Opt-in and default off.
171
+ * Duration / easing are styled by the consumer via CSS on the published hooks
172
+ * (`[data-drag-animating]` on items, `[data-settling]` on the preview); the library imposes
173
+ * none. Fully skipped under `prefers-reduced-motion: reduce` (teardown stays instant).
174
+ */
175
+ readonly animateReorder: _angular_core.InputSignalWithTransform<boolean, unknown>;
176
+ /**
177
+ * Confine the pointer-drag preview within a boundary during a pointer drag. Accepts an
178
+ * `HTMLElement`, or a selector string resolved via `closest()` from the list host. `null`
179
+ * (the default) leaves the preview unbounded. Affects the visual preview only — the resolved
180
+ * drop index is unchanged. Has no effect on keyboard dragging (no floating preview).
181
+ */
182
+ readonly boundary: _angular_core.InputSignal<string | HTMLElement | null>;
183
+ /**
184
+ * Constrain pointer-drag preview movement to one axis. `'x'` keeps the preview at its lift-time
185
+ * `y` (horizontal movement); `'y'` keeps it at its lift-time `x` (vertical movement). `null`
186
+ * (the default) is free movement. Independent of `orientation` (which drives the drop index);
187
+ * this is a purely visual constraint, and has no effect on keyboard dragging.
188
+ */
189
+ readonly lockAxis: _angular_core.InputSignal<"x" | "y" | null>;
190
+ /**
191
+ * Emitted by the **source** list when a drop commits (keyboard or pointer) — whether
192
+ * the item stays in this list (reorder) or moves to a connected list (transfer). Apply
193
+ * `moveItemInArray` or `transferArrayItem` to your data signal inside the handler.
194
+ */
195
+ readonly dragDrop: _angular_core.OutputEmitterRef<ForDragDropEvent<unknown>>;
196
+ readonly host: HTMLElement;
197
+ /** Effective disabled — the list's own `disabled` input (fieldset wiring deferred to v2). */
198
+ readonly effectiveDisabled: _angular_core.Signal<boolean>;
199
+ readonly roving: RovingTabindex;
200
+ readonly items: _angular_core.Signal<readonly ForDraggableHandle[]>;
201
+ /** Insertion index this list is the current drop target at, else `null`. */
202
+ readonly dragOverIndex: _angular_core.Signal<number | null>;
203
+ /** `true` while a drag originating from this list is in progress. */
204
+ readonly isDragging: _angular_core.Signal<boolean>;
205
+ constructor();
206
+ registerItem(handle: ForDraggableHandle): void;
207
+ unregisterItem(handle: ForDraggableHandle): void;
208
+ itemTabindex(el: HTMLElement): -1 | 0 | null;
209
+ isFirstFocusableItem(el: HTMLElement): boolean;
210
+ isItemHighlighted(el: HTMLElement): boolean;
211
+ setActiveItem(el: HTMLElement): void;
212
+ navigate(el: HTMLElement, action: ListNavigationAction): void;
213
+ lift(el: HTMLElement): number;
214
+ pointerLift(el: HTMLElement, point: {
215
+ x: number;
216
+ y: number;
217
+ }, preview?: DragPreview | {
218
+ moveTo(x: number, y: number): void;
219
+ destroy(): void;
220
+ } | null): number;
221
+ pointerMove(point: {
222
+ x: number;
223
+ y: number;
224
+ }): void;
225
+ isLifted(el: HTMLElement): boolean;
226
+ moveLifted(action: ListNavigationAction): void;
227
+ drop(): void;
228
+ cancel(): void;
229
+ setDragOver(index: number | null): void;
230
+ setLivePlaceholder(nodes: readonly Node[] | null): void;
231
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForDropList, never>;
232
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForDropList, "[forDropList]", ["forDropList"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "_dirInput": { "alias": "dir"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "connectedTo": { "alias": "connectedTo"; "required": false; "isSignal": true; }; "autoScroll": { "alias": "autoScroll"; "required": false; "isSignal": true; }; "liveSort": { "alias": "liveSort"; "required": false; "isSignal": true; }; "animateReorder": { "alias": "animateReorder"; "required": false; "isSignal": true; }; "boundary": { "alias": "boundary"; "required": false; "isSignal": true; }; "lockAxis": { "alias": "lockAxis"; "required": false; "isSignal": true; }; }, { "dragDrop": "dragDrop"; }, never, never, true, never>;
233
+ }
234
+
235
+ /**
236
+ * Optional custom drag preview. Apply `[forDragPreview]` on an `<ng-template>` inside a
237
+ * `[forDraggable]`; its content renders as the floating element that follows the pointer during a
238
+ * pointer drag, replacing the default cloned preview. Has no effect on keyboard dragging.
239
+ */
240
+ declare class ForDragPreview {
241
+ /** The template rendered as the floating pointer-drag preview. */
242
+ readonly templateRef: TemplateRef<unknown>;
243
+ constructor();
244
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForDragPreview, never>;
245
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForDragPreview, "ng-template[forDragPreview]", ["forDragPreview"], {}, {}, never, never, true, never>;
246
+ }
247
+
248
+ /**
249
+ * Optional custom drag placeholder. Apply `[forDragPlaceholder]` on an `<ng-template>` inside a
250
+ * `[forDraggable]`; during a **pointer** drag the dragged item's host is hidden and this template
251
+ * renders in its slot, preserving the gap. Keyboard dragging keeps the default (the lifted item
252
+ * stays in place, reflecting `data-dragging`).
253
+ */
254
+ declare class ForDragPlaceholder {
255
+ /** The template rendered in the dragged item's slot during a pointer drag. */
256
+ readonly templateRef: TemplateRef<unknown>;
257
+ constructor();
258
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForDragPlaceholder, never>;
259
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForDragPlaceholder, "ng-template[forDragPlaceholder]", ["forDragPlaceholder"], {}, {}, never, never, true, never>;
260
+ }
261
+
262
+ /**
263
+ * Marks an element as a draggable item inside a `[forDropList]`. Handles
264
+ * keyboard and pointer interaction for lift, move, drop, and cancel.
265
+ */
266
+ declare class ForDraggable implements ForDraggableContext {
267
+ #private;
268
+ protected readonly previewTpl: _angular_core.Signal<ForDragPreview | undefined>;
269
+ protected readonly placeholderTpl: _angular_core.Signal<ForDragPlaceholder | undefined>;
270
+ /** `true` while a pointer-drag placeholder template occupies this item's slot (host hidden). */
271
+ protected readonly placeholderActive: _angular_core.WritableSignal<boolean>;
272
+ /** Data payload handed back in the `dragDrop` event when this item is dropped. */
273
+ readonly dragData: _angular_core.InputSignal<unknown>;
274
+ /**
275
+ * When true, this item cannot be lifted. The item remains focusable. It also acts as a
276
+ * hard fence for the `liveSort` placeholder: a sibling being dragged cannot move its
277
+ * placeholder across a pinned item (the committed drop index is unaffected).
278
+ */
279
+ readonly dragDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
280
+ /** Emitted when a drag (keyboard or pointer) starts from this item. */
281
+ readonly dragStart: _angular_core.OutputEmitterRef<ForDragStartEvent>;
282
+ /** Emitted when a drag originating from this item ends (committed or cancelled). */
283
+ readonly dragEnd: _angular_core.OutputEmitterRef<ForDragEndEvent>;
284
+ readonly effectiveDisabled: _angular_core.Signal<boolean>;
285
+ /** `true` when this item is the currently lifted draggable. Reflected as `data-dragging`. */
286
+ readonly lifted: _angular_core.Signal<boolean>;
287
+ /** `true` when this item is the roving-tabindex active candidate. */
288
+ protected readonly highlighted: _angular_core.Signal<boolean>;
289
+ /** `aria-roledescription` value from defaults. */
290
+ protected readonly roleDescription: _angular_core.Signal<string>;
291
+ protected readonly tabindex: _angular_core.Signal<0 | -1>;
292
+ protected readonly touchAction: _angular_core.Signal<"none" | null>;
293
+ constructor();
294
+ registerHandle(el: HTMLElement): void;
295
+ unregisterHandle(el: HTMLElement): void;
296
+ protected onNativeDragStart(event: Event): void;
297
+ protected onFocus(): void;
298
+ protected onBlur(): void;
299
+ protected onKeyDown(event: KeyboardEvent): void;
300
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForDraggable, never>;
301
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForDraggable, "[forDraggable]", ["forDraggable"], { "dragData": { "alias": "dragData"; "required": true; "isSignal": true; }; "dragDisabled": { "alias": "dragDisabled"; "required": false; "isSignal": true; }; }, { "dragStart": "dragStart"; "dragEnd": "dragEnd"; }, ["previewTpl", "placeholderTpl"], never, true, never>;
302
+ }
303
+
304
+ /**
305
+ * Standalone free-drag directive: repositions its host (or a resolved `rootElement`) by pointer
306
+ * drag via a CSS `transform: translate(...)`, with **no** `[forDropList]` dependency. Unlike
307
+ * `[forDraggable]`, it never commits a reorder — it only moves an arbitrary element around,
308
+ * optionally confined to a `boundary` and locked to one axis. Composes the shared
309
+ * `createPointerDragSession` transport and accepts `[forDragHandle]` children.
310
+ *
311
+ * Pointer-only: there is no WAI-ARIA APG pattern for "freely reposition an element", so this is
312
+ * a documented headless exception (see `.claude/rules/conventions.md`). It owns no role or ARIA
313
+ * state and must not destroy the moved element's semantics — the consumer keeps the moved
314
+ * element operable at its default position (e.g. a repositionable dialog stays usable by
315
+ * keyboard); dragging is a pointer convenience, not the only way to use it.
316
+ */
317
+ declare class ForFreeDrag implements ForDraggableContext {
318
+ #private;
319
+ /** When true, the element can't be dragged (it stays focusable; the transform doesn't change). */
320
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
321
+ /**
322
+ * The element actually moved: an `HTMLElement`, or a selector resolved via `closest()` from the
323
+ * host. `null` (the default) moves the host itself. Mirrors CDK's `cdkDragRootElement` — drag a
324
+ * child handle, move an ancestor (e.g. drag a whole dialog by its header).
325
+ */
326
+ readonly rootElement: _angular_core.InputSignal<string | HTMLElement | null>;
327
+ /**
328
+ * Confine movement within an `HTMLElement`, a `closest()` selector resolved from the host, or
329
+ * `null` (the default) for unbounded movement. Unlike `[forDropList]`'s boundary (which clamps a
330
+ * floating clone), this clamps the **real moved element** so its box stays fully inside.
331
+ */
332
+ readonly boundary: _angular_core.InputSignal<string | HTMLElement | null>;
333
+ /**
334
+ * Constrain movement to one axis. `'x'` pins the element at its lift-time `y` (horizontal-only);
335
+ * `'y'` pins it at its lift-time `x` (vertical-only). `null` (the default) is free.
336
+ */
337
+ readonly lockAxis: _angular_core.InputSignal<"x" | "y" | null>;
338
+ /** Two-way translate offset (px) from the element's natural position. Controllable / restorable. */
339
+ readonly position: _angular_core.ModelSignal<{
340
+ x: number;
341
+ y: number;
342
+ }>;
343
+ /** Emitted when a pointer drag starts, with the lift-time position. */
344
+ readonly dragStart: _angular_core.OutputEmitterRef<{
345
+ x: number;
346
+ y: number;
347
+ }>;
348
+ /**
349
+ * Emitted on every armed move with the live position. (Non-native verb — `dragMove`, not
350
+ * `drag` / `dragMoved` — so `@angular-eslint/no-output-native` stays clear.)
351
+ */
352
+ readonly dragMove: _angular_core.OutputEmitterRef<{
353
+ x: number;
354
+ y: number;
355
+ }>;
356
+ /** Emitted when the drag ends, with the final position. */
357
+ readonly dragEnd: _angular_core.OutputEmitterRef<{
358
+ x: number;
359
+ y: number;
360
+ }>;
361
+ /** True while a pointer drag is armed. Reflected as `data-dragging`. */
362
+ readonly dragging: _angular_core.Signal<boolean>;
363
+ protected readonly touchAction: _angular_core.Signal<"none" | null>;
364
+ constructor();
365
+ registerHandle(el: HTMLElement): void;
366
+ unregisterHandle(el: HTMLElement): void;
367
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForFreeDrag, never>;
368
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForFreeDrag, "[forFreeDrag]", ["forFreeDrag"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "rootElement": { "alias": "rootElement"; "required": false; "isSignal": true; }; "boundary": { "alias": "boundary"; "required": false; "isSignal": true; }; "lockAxis": { "alias": "lockAxis"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; }, { "position": "positionChange"; "dragStart": "dragStart"; "dragMove": "dragMove"; "dragEnd": "dragEnd"; }, never, never, true, never>;
369
+ }
370
+
371
+ /**
372
+ * Optional drag handle inside a `[forDraggable]`. When at least one handle is present on an item, a pointer
373
+ * drag may only start from within a handle (keyboard dragging is unaffected). Apply on a child element.
374
+ */
375
+ declare class ForDragHandle {
376
+ #private;
377
+ constructor();
378
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForDragHandle, never>;
379
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForDragHandle, "[forDragHandle]", ["forDragHandle"], {}, {}, never, never, true, never>;
380
+ }
381
+
382
+ declare const FOR_DROP_LIST_GROUP: InjectionToken<ForDropListGroup>;
383
+ /**
384
+ * Groups sibling `[forDropList]` elements so items can be transferred between
385
+ * them without hand-wiring `[connectedTo]` on each list. Every list nested
386
+ * under `[forDropListGroup]` automatically becomes a connected transfer target
387
+ * for every other member of the group.
388
+ */
389
+ declare class ForDropListGroup {
390
+ #private;
391
+ /** All registered drop lists in this group, in registration order. */
392
+ readonly members: Signal<readonly ForDropListContext[]>;
393
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForDropListGroup, never>;
394
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForDropListGroup, "[forDropListGroup]", ["forDropListGroup"], {}, {}, never, never, true, never>;
395
+ }
396
+
397
+ /**
398
+ * Returns a copy of `array` with the item at `from` moved to `to`. Indices are clamped to
399
+ * the array bounds; an out-of-range or no-op move returns a shallow copy unchanged.
400
+ */
401
+ declare function moveItemInArray<T>(array: readonly T[], from: number, to: number): T[];
402
+ /**
403
+ * Moves the item at `fromIndex` of `from` into `to` at `toIndex`, returning new arrays for
404
+ * both. Does not mutate the inputs. Indices are clamped (`toIndex` may equal `to.length`,
405
+ * i.e. append).
406
+ */
407
+ declare function transferArrayItem<T>(from: readonly T[], to: readonly T[], fromIndex: number, toIndex: number): {
408
+ from: T[];
409
+ to: T[];
410
+ };
411
+
412
+ /**
413
+ * Defaults inherited by descendant drag-drop lists in the surrounding injector
414
+ * scope. Configure with `provideForDragDropDefaults` either at the application
415
+ * root or in any component's `providers` array; partial overrides merge with
416
+ * the parent scope.
417
+ */
418
+ interface ForDragDropDefaults {
419
+ /**
420
+ * `aria-roledescription` applied to each draggable item. Empty string disables
421
+ * the attribute.
422
+ */
423
+ itemRoleDescription: string;
424
+ /**
425
+ * Announcement when an item is lifted. `index` and `total` describe the source
426
+ * list and are 1-based.
427
+ */
428
+ announceLift: (label: string, index: number, total: number) => string;
429
+ /**
430
+ * Announcement when the drop target position changes. `index` and `total`
431
+ * describe the target list and are 1-based.
432
+ */
433
+ announceMove: (label: string, index: number, total: number) => string;
434
+ /**
435
+ * Announcement on a committed drop. `index` and `total` describe the
436
+ * destination list and are 1-based.
437
+ */
438
+ announceDrop: (label: string, index: number, total: number) => string;
439
+ /** Announcement when a drag is cancelled. */
440
+ announceCancel: (label: string) => string;
441
+ /** Distance in px from a scroll edge that arms auto-scroll during a pointer drag. */
442
+ autoScrollEdgeSize: number;
443
+ /** Maximum scroll delta in px applied per animation frame while auto-scrolling. */
444
+ autoScrollMaxSpeed: number;
445
+ }
446
+ /** Token holding the resolved drag-drop defaults for the current scope. */
447
+ declare const FOR_DRAG_DROP_DEFAULTS: _angular_core.InjectionToken<ForDragDropDefaults>;
448
+ /**
449
+ * Configures forty-cdk drag-drop defaults for this injector scope. Partial
450
+ * overrides inherit unspecified keys from the parent scope (or library
451
+ * defaults at the root).
452
+ */
453
+ declare function provideForDragDropDefaults(defaults?: Partial<ForDragDropDefaults>): Provider[];
454
+
455
+ export { FOR_DRAGGABLE_CONTEXT, FOR_DRAG_DROP_CONTEXT, FOR_DRAG_DROP_DEFAULTS, FOR_DROP_LIST_DEFAULT_ORIENTATION, FOR_DROP_LIST_GROUP, ForDragHandle, ForDragPlaceholder, ForDragPreview, ForDraggable, ForDropList, ForDropListGroup, ForFreeDrag, moveItemInArray, provideForDragDropDefaults, transferArrayItem };
456
+ export type { ForDragDropDefaults, ForDragDropEvent, ForDragEndEvent, ForDragStartEvent, ForDraggableContext, ForDraggableHandle, ForDropListContext };