forty-cdk 0.34.0 → 0.35.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 (206) hide show
  1. package/README.md +4 -3
  2. package/calendar/README.md +2 -2
  3. package/carousel/README.md +11 -6
  4. package/checkbox/README.md +17 -2
  5. package/fesm2022/forty-cdk-accordion.mjs +502 -378
  6. package/fesm2022/forty-cdk-accordion.mjs.map +1 -1
  7. package/fesm2022/forty-cdk-aspect-ratio.mjs +61 -69
  8. package/fesm2022/forty-cdk-aspect-ratio.mjs.map +1 -1
  9. package/fesm2022/forty-cdk-avatar.mjs +314 -350
  10. package/fesm2022/forty-cdk-avatar.mjs.map +1 -1
  11. package/fesm2022/forty-cdk-breadcrumbs.mjs +152 -119
  12. package/fesm2022/forty-cdk-breadcrumbs.mjs.map +1 -1
  13. package/fesm2022/forty-cdk-breakpoints.mjs +44 -80
  14. package/fesm2022/forty-cdk-breakpoints.mjs.map +1 -1
  15. package/fesm2022/forty-cdk-button.mjs +235 -337
  16. package/fesm2022/forty-cdk-button.mjs.map +1 -1
  17. package/fesm2022/forty-cdk-calendar.mjs +2087 -1950
  18. package/fesm2022/forty-cdk-calendar.mjs.map +1 -1
  19. package/fesm2022/forty-cdk-carousel.mjs +1246 -1031
  20. package/fesm2022/forty-cdk-carousel.mjs.map +1 -1
  21. package/fesm2022/forty-cdk-checkbox.mjs +233 -241
  22. package/fesm2022/forty-cdk-checkbox.mjs.map +1 -1
  23. package/fesm2022/forty-cdk-combobox.mjs +2862 -3190
  24. package/fesm2022/forty-cdk-combobox.mjs.map +1 -1
  25. package/fesm2022/forty-cdk-context-menu.mjs +532 -530
  26. package/fesm2022/forty-cdk-context-menu.mjs.map +1 -1
  27. package/fesm2022/forty-cdk-core-overlay.mjs +3307 -5194
  28. package/fesm2022/forty-cdk-core-overlay.mjs.map +1 -1
  29. package/fesm2022/forty-cdk-core.mjs +4453 -8427
  30. package/fesm2022/forty-cdk-core.mjs.map +1 -1
  31. package/fesm2022/forty-cdk-date-adapter.mjs +129 -175
  32. package/fesm2022/forty-cdk-date-adapter.mjs.map +1 -1
  33. package/fesm2022/forty-cdk-date-field.mjs +1114 -1086
  34. package/fesm2022/forty-cdk-date-field.mjs.map +1 -1
  35. package/fesm2022/forty-cdk-date-picker.mjs +1390 -1548
  36. package/fesm2022/forty-cdk-date-picker.mjs.map +1 -1
  37. package/fesm2022/forty-cdk-defaults.mjs +537 -1359
  38. package/fesm2022/forty-cdk-defaults.mjs.map +1 -1
  39. package/fesm2022/forty-cdk-dialog.mjs +901 -694
  40. package/fesm2022/forty-cdk-dialog.mjs.map +1 -1
  41. package/fesm2022/forty-cdk-disclosure.mjs +254 -182
  42. package/fesm2022/forty-cdk-disclosure.mjs.map +1 -1
  43. package/fesm2022/forty-cdk-drag-drop.mjs +1776 -1768
  44. package/fesm2022/forty-cdk-drag-drop.mjs.map +1 -1
  45. package/fesm2022/forty-cdk-drawer.mjs +1835 -2105
  46. package/fesm2022/forty-cdk-drawer.mjs.map +1 -1
  47. package/fesm2022/forty-cdk-dropdown-menu.mjs +451 -375
  48. package/fesm2022/forty-cdk-dropdown-menu.mjs.map +1 -1
  49. package/fesm2022/forty-cdk-field.mjs +563 -669
  50. package/fesm2022/forty-cdk-field.mjs.map +1 -1
  51. package/fesm2022/forty-cdk-fieldset.mjs +162 -203
  52. package/fesm2022/forty-cdk-fieldset.mjs.map +1 -1
  53. package/fesm2022/forty-cdk-file-upload.mjs +383 -316
  54. package/fesm2022/forty-cdk-file-upload.mjs.map +1 -1
  55. package/fesm2022/forty-cdk-hover-card.mjs +600 -612
  56. package/fesm2022/forty-cdk-hover-card.mjs.map +1 -1
  57. package/fesm2022/forty-cdk-input.mjs +230 -277
  58. package/fesm2022/forty-cdk-input.mjs.map +1 -1
  59. package/fesm2022/forty-cdk-internationalized-date.mjs +183 -247
  60. package/fesm2022/forty-cdk-internationalized-date.mjs.map +1 -1
  61. package/fesm2022/forty-cdk-listbox.mjs +1486 -1586
  62. package/fesm2022/forty-cdk-listbox.mjs.map +1 -1
  63. package/fesm2022/forty-cdk-menu.mjs +1924 -1744
  64. package/fesm2022/forty-cdk-menu.mjs.map +1 -1
  65. package/fesm2022/forty-cdk-menubar.mjs +789 -910
  66. package/fesm2022/forty-cdk-menubar.mjs.map +1 -1
  67. package/fesm2022/forty-cdk-meter.mjs +312 -210
  68. package/fesm2022/forty-cdk-meter.mjs.map +1 -1
  69. package/fesm2022/forty-cdk-navigation-menu.mjs +1231 -1325
  70. package/fesm2022/forty-cdk-navigation-menu.mjs.map +1 -1
  71. package/fesm2022/forty-cdk-number-input.mjs +694 -843
  72. package/fesm2022/forty-cdk-number-input.mjs.map +1 -1
  73. package/fesm2022/forty-cdk-otp-input.mjs +554 -561
  74. package/fesm2022/forty-cdk-otp-input.mjs.map +1 -1
  75. package/fesm2022/forty-cdk-pagination.mjs +493 -362
  76. package/fesm2022/forty-cdk-pagination.mjs.map +1 -1
  77. package/fesm2022/forty-cdk-pane-resizer.mjs +470 -416
  78. package/fesm2022/forty-cdk-pane-resizer.mjs.map +1 -1
  79. package/fesm2022/forty-cdk-popover.mjs +846 -720
  80. package/fesm2022/forty-cdk-popover.mjs.map +1 -1
  81. package/fesm2022/forty-cdk-progress.mjs +265 -223
  82. package/fesm2022/forty-cdk-progress.mjs.map +1 -1
  83. package/fesm2022/forty-cdk-radio-group.mjs +468 -431
  84. package/fesm2022/forty-cdk-radio-group.mjs.map +1 -1
  85. package/fesm2022/forty-cdk-scroll-area.mjs +860 -934
  86. package/fesm2022/forty-cdk-scroll-area.mjs.map +1 -1
  87. package/fesm2022/forty-cdk-search.mjs +281 -328
  88. package/fesm2022/forty-cdk-search.mjs.map +1 -1
  89. package/fesm2022/forty-cdk-select.mjs +1872 -1874
  90. package/fesm2022/forty-cdk-select.mjs.map +1 -1
  91. package/fesm2022/forty-cdk-separator.mjs +92 -67
  92. package/fesm2022/forty-cdk-separator.mjs.map +1 -1
  93. package/fesm2022/forty-cdk-shared.mjs +4 -8
  94. package/fesm2022/forty-cdk-slider.mjs +881 -877
  95. package/fesm2022/forty-cdk-slider.mjs.map +1 -1
  96. package/fesm2022/forty-cdk-stepper.mjs +1160 -919
  97. package/fesm2022/forty-cdk-stepper.mjs.map +1 -1
  98. package/fesm2022/forty-cdk-switch.mjs +140 -146
  99. package/fesm2022/forty-cdk-switch.mjs.map +1 -1
  100. package/fesm2022/forty-cdk-table-virtualization.mjs +258 -375
  101. package/fesm2022/forty-cdk-table-virtualization.mjs.map +1 -1
  102. package/fesm2022/forty-cdk-table.mjs +4718 -4851
  103. package/fesm2022/forty-cdk-table.mjs.map +1 -1
  104. package/fesm2022/forty-cdk-tabs.mjs +566 -403
  105. package/fesm2022/forty-cdk-tabs.mjs.map +1 -1
  106. package/fesm2022/forty-cdk-testing.mjs +233 -385
  107. package/fesm2022/forty-cdk-testing.mjs.map +1 -1
  108. package/fesm2022/forty-cdk-time-field.mjs +1148 -1143
  109. package/fesm2022/forty-cdk-time-field.mjs.map +1 -1
  110. package/fesm2022/forty-cdk-time-picker.mjs +1303 -1190
  111. package/fesm2022/forty-cdk-time-picker.mjs.map +1 -1
  112. package/fesm2022/forty-cdk-toast.mjs +1473 -1562
  113. package/fesm2022/forty-cdk-toast.mjs.map +1 -1
  114. package/fesm2022/forty-cdk-toggle.mjs +555 -536
  115. package/fesm2022/forty-cdk-toggle.mjs.map +1 -1
  116. package/fesm2022/forty-cdk-toolbar.mjs +503 -388
  117. package/fesm2022/forty-cdk-toolbar.mjs.map +1 -1
  118. package/fesm2022/forty-cdk-tooltip.mjs +602 -600
  119. package/fesm2022/forty-cdk-tooltip.mjs.map +1 -1
  120. package/fesm2022/forty-cdk-tree.mjs +2427 -2644
  121. package/fesm2022/forty-cdk-tree.mjs.map +1 -1
  122. package/fesm2022/forty-cdk-virtual-reorder.mjs +399 -487
  123. package/fesm2022/forty-cdk-virtual-reorder.mjs.map +1 -1
  124. package/fesm2022/forty-cdk-virtualization.mjs +552 -603
  125. package/fesm2022/forty-cdk-virtualization.mjs.map +1 -1
  126. package/fesm2022/forty-cdk-visually-hidden.mjs +1 -6
  127. package/fesm2022/forty-cdk.mjs +0 -4
  128. package/input/README.md +1 -1
  129. package/navigation-menu/README.md +19 -9
  130. package/number-input/README.md +1 -1
  131. package/package.json +7 -6
  132. package/separator/README.md +4 -4
  133. package/shared/README.md +80 -1
  134. package/slider/README.md +19 -12
  135. package/table/README.md +22 -20
  136. package/table-virtualization/README.md +29 -7
  137. package/toast/README.md +2 -1
  138. package/toolbar/README.md +4 -4
  139. package/tree/README.md +44 -23
  140. package/types/forty-cdk-accordion.d.ts +210 -167
  141. package/types/forty-cdk-aspect-ratio.d.ts +23 -20
  142. package/types/forty-cdk-avatar.d.ts +73 -58
  143. package/types/forty-cdk-breadcrumbs.d.ts +43 -35
  144. package/types/forty-cdk-breakpoints.d.ts +42 -47
  145. package/types/forty-cdk-button.d.ts +47 -42
  146. package/types/forty-cdk-calendar.d.ts +712 -590
  147. package/types/forty-cdk-carousel.d.ts +497 -392
  148. package/types/forty-cdk-checkbox.d.ts +55 -46
  149. package/types/forty-cdk-combobox.d.ts +1254 -1059
  150. package/types/forty-cdk-context-menu.d.ts +322 -258
  151. package/types/forty-cdk-core-overlay.d.ts +2758 -2429
  152. package/types/forty-cdk-core.d.ts +2974 -2732
  153. package/types/forty-cdk-date-adapter.d.ts +195 -200
  154. package/types/forty-cdk-date-field.d.ts +472 -335
  155. package/types/forty-cdk-date-picker.d.ts +617 -475
  156. package/types/forty-cdk-defaults.d.ts +1495 -1251
  157. package/types/forty-cdk-dialog.d.ts +367 -338
  158. package/types/forty-cdk-disclosure.d.ts +78 -61
  159. package/types/forty-cdk-drag-drop.d.ts +570 -483
  160. package/types/forty-cdk-drawer.d.ts +711 -633
  161. package/types/forty-cdk-dropdown-menu.d.ts +236 -177
  162. package/types/forty-cdk-field.d.ts +194 -178
  163. package/types/forty-cdk-fieldset.d.ts +84 -83
  164. package/types/forty-cdk-file-upload.d.ts +152 -126
  165. package/types/forty-cdk-hover-card.d.ts +245 -210
  166. package/types/forty-cdk-input.d.ts +36 -36
  167. package/types/forty-cdk-internationalized-date.d.ts +81 -85
  168. package/types/forty-cdk-listbox.d.ts +570 -485
  169. package/types/forty-cdk-menu.d.ts +673 -543
  170. package/types/forty-cdk-menubar.d.ts +529 -462
  171. package/types/forty-cdk-meter.d.ts +130 -88
  172. package/types/forty-cdk-navigation-menu.d.ts +453 -379
  173. package/types/forty-cdk-number-input.d.ts +243 -199
  174. package/types/forty-cdk-otp-input.d.ts +194 -129
  175. package/types/forty-cdk-pagination.d.ts +239 -168
  176. package/types/forty-cdk-pane-resizer.d.ts +195 -133
  177. package/types/forty-cdk-popover.d.ts +381 -327
  178. package/types/forty-cdk-progress.d.ts +114 -87
  179. package/types/forty-cdk-radio-group.d.ts +189 -135
  180. package/types/forty-cdk-scroll-area.d.ts +329 -297
  181. package/types/forty-cdk-search.d.ts +103 -99
  182. package/types/forty-cdk-select.d.ts +874 -716
  183. package/types/forty-cdk-separator.d.ts +30 -22
  184. package/types/forty-cdk-shared.d.ts +4 -3
  185. package/types/forty-cdk-slider.d.ts +335 -278
  186. package/types/forty-cdk-stepper.d.ts +588 -505
  187. package/types/forty-cdk-switch.d.ts +26 -22
  188. package/types/forty-cdk-table-virtualization.d.ts +88 -70
  189. package/types/forty-cdk-table.d.ts +1970 -1356
  190. package/types/forty-cdk-tabs.d.ts +245 -191
  191. package/types/forty-cdk-testing.d.ts +38 -46
  192. package/types/forty-cdk-time-field.d.ts +508 -366
  193. package/types/forty-cdk-time-picker.d.ts +552 -432
  194. package/types/forty-cdk-toast.d.ts +643 -479
  195. package/types/forty-cdk-toggle.d.ts +212 -167
  196. package/types/forty-cdk-toolbar.d.ts +188 -142
  197. package/types/forty-cdk-tooltip.d.ts +301 -257
  198. package/types/forty-cdk-tree.d.ts +797 -650
  199. package/types/forty-cdk-virtual-reorder.d.ts +36 -27
  200. package/types/forty-cdk-virtualization.d.ts +295 -218
  201. package/types/forty-cdk-visually-hidden.d.ts +2 -1
  202. package/types/forty-cdk.d.ts +1 -2
  203. package/virtualization/README.md +20 -11
  204. package/fesm2022/forty-cdk-shared.mjs.map +0 -1
  205. package/fesm2022/forty-cdk-visually-hidden.mjs.map +0 -1
  206. package/fesm2022/forty-cdk.mjs.map +0 -1
package/README.md CHANGED
@@ -20,14 +20,15 @@ npm install forty-cdk
20
20
 
21
21
  Required:
22
22
 
23
- - `@angular/common` `^22.0.1`
24
- - `@angular/core` `^22.0.1`
23
+ - `@angular/common` `^22.1.0`
24
+ - `@angular/core` `^22.1.0`
25
+ - `@angular/platform-browser` `^22.1.0`, already installed by every Angular browser or server app
25
26
 
26
27
  Optional — install only if you use the matching entry point / primitives:
27
28
 
28
29
  | Peer | Needed by |
29
30
  | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
30
- | `@angular/forms` `^22.0.1` | Form-control primitives (`Switch`, `Checkbox`, `RadioGroup`, `Listbox`, `Select`, `Slider`, `Combobox`, …). They implement `FormValueControl` / `FormCheckboxControl` from `@angular/forms/signals` for `[formField]` auto-wiring. The contract is type-only, so the published bundle never references the package — consumers using only non-form primitives can skip it. |
31
+ | `@angular/forms` `^22.1.0` | Form-control primitives (`Switch`, `Checkbox`, `RadioGroup`, `Listbox`, `Select`, `Slider`, `Combobox`, …). They implement `FormValueControl` / `FormCheckboxControl` from `@angular/forms/signals` for `[formField]` auto-wiring. The contract is type-only, so the published bundle never references the package — consumers using only non-form primitives can skip it. |
31
32
  | `@internationalized/date` `^3.0.0` | The `forty-cdk/internationalized-date` entry point (`InternationalizedDateAdapter`, `InternationalizedDateTimeAdapter`). The date/time primitives themselves depend only on the abstract `DateAdapter` contract from `forty-cdk/date-adapter` — install this peer only when you import that entry point. |
32
33
 
33
34
  ### Regular dependencies
@@ -446,7 +446,7 @@ The lower-level hooks (`visibleMonthNumber()`, `visibleYear()`, `monthOptions()`
446
446
  <h2 forCalendarHeading #h="forCalendarHeading" class="sr-only">{{ h.label() }}</h2>
447
447
  </header>
448
448
 
449
- @switch (cal.view()) { @case ('day') {
449
+ @let view = cal.view(); @switch (view) { @case ('day') {
450
450
  <table forCalendarGrid #grid="forCalendarGrid">
451
451
  <thead forCalendarGridHeader>
452
452
  <tr>
@@ -489,7 +489,7 @@ The lower-level hooks (`visibleMonthNumber()`, `visibleYear()`, `monthOptions()`
489
489
  }
490
490
  </tbody>
491
491
  </table>
492
- } }
492
+ } @default never; }
493
493
  </div>
494
494
  ```
495
495
 
@@ -57,7 +57,7 @@ Headless and styleless: it ships slide tracking, keyboard navigation, focus mana
57
57
 
58
58
  ## Examples
59
59
 
60
- Page through the slides with the buttons, the arrow keys or a drag. The root carries `data-orientation`, and `data-dragging` is on while a pointer holds the track.
60
+ Page through the slides with the buttons or with the arrow keys on the dots. The root carries `data-orientation`, and only the current dot is in the tab order however the slide was reached.
61
61
 
62
62
  ```ts
63
63
  import { ChangeDetectionStrategy, Component, signal } from '@angular/core';
@@ -144,7 +144,7 @@ interface Slide {
144
144
  <button
145
145
  forCarouselIndicator
146
146
  class="car-dot"
147
- [attr.aria-label]="'Go to slide ' + (i + 1)"
147
+ [ariaLabel]="'Go to slide ' + (i + 1)"
148
148
  ></button>
149
149
  }
150
150
  </div>
@@ -186,7 +186,7 @@ Set `slidesPerView` above `1` to show several slides at once. Each slide is `fle
186
186
 
187
187
  ### Autoplay with pause control
188
188
 
189
- With `autoplay` set, the slides advance every three seconds, unless your system asks for reduced motion, in which case they wait for the rotation control. Hover the carousel or move focus into it and rotation pauses until you leave; stop it with the control and it stays stopped through hover and focus until you start it again. [Autoplay](#autoplay) has the full pause rules and why the control must be the first focusable child.
189
+ With `autoplay` set, the slides advance every three seconds, unless your system asks for reduced motion, in which case they wait for the rotation control. Hover the carousel or move focus into it and rotation pauses until you leave; stop it with the control and it stays stopped through hover and focus until you start it again, and a Start from the control rotates straight away, with focus and the pointer still on it. [Autoplay](#autoplay) has the full pause rules and why the control must be the first focusable child.
190
190
 
191
191
  ### Pointer drag & touch swipe
192
192
 
@@ -238,8 +238,12 @@ focusable child** of the carousel to enable automatic slide rotation.
238
238
 
239
239
  **Behaviour:**
240
240
 
241
- - Rotation pauses on hover, on keyboard focus anywhere inside the carousel, and
242
- while the browser tab is backgrounded. It resumes when none of those hold.
241
+ - Rotation that started on its own (`autoplay`) pauses on hover, on keyboard
242
+ focus anywhere inside the carousel, and while the browser tab is backgrounded.
243
+ It resumes when none of those hold.
244
+ - An explicit user Start (clicking the rotation control or calling `play()`)
245
+ rotates even while focus or the pointer is inside the carousel, which is where
246
+ the user is when they press it. Only a backgrounded tab still pauses it.
243
247
  - An explicit user stop (clicking the rotation control or calling `pause()`) is
244
248
  **sticky**: hover-in/out and focus-in/out will not restart it. Only an explicit
245
249
  Start does.
@@ -461,7 +465,8 @@ Reflected on the `[forCarouselViewport]` host this directive is applied to:
461
465
  ## Keyboard
462
466
 
463
467
  Keyboard navigation lives on the indicator group. Only the current
464
- indicator is in the tab order. Arrow keys move focus and activate the target slide
468
+ indicator is in the tab order, including after prev / next, autoplay or a drag
469
+ moved the slide. Arrow keys move focus and activate the target slide
465
470
  automatically.
466
471
 
467
472
  | Key | Action |
@@ -63,6 +63,12 @@ A parent checkbox reflects `indeterminate` when only some children are selected.
63
63
  import { Component, computed, signal } from '@angular/core';
64
64
  import { ForCheckbox } from 'forty-cdk/checkbox';
65
65
 
66
+ interface Topping {
67
+ readonly id: number;
68
+ readonly label: string;
69
+ readonly selected: boolean;
70
+ }
71
+
66
72
  @Component({
67
73
  selector: 'demo-select-all',
68
74
  imports: [ForCheckbox],
@@ -80,7 +86,12 @@ import { ForCheckbox } from 'forty-cdk/checkbox';
80
86
  Select all toppings
81
87
  </button>
82
88
  @for (item of items(); track item.id) {
83
- <button forCheckbox class="cb-row" [(checked)]="item.selected">
89
+ <button
90
+ forCheckbox
91
+ class="cb-row"
92
+ [checked]="item.selected"
93
+ (checkedChange)="setItem(item.id, $event)"
94
+ >
84
95
  <span class="cb">
85
96
  <span class="cb-check" aria-hidden="true"></span>
86
97
  </span>
@@ -90,7 +101,7 @@ import { ForCheckbox } from 'forty-cdk/checkbox';
90
101
  `,
91
102
  })
92
103
  export class DemoSelectAll {
93
- readonly items = signal([
104
+ readonly items = signal<readonly Topping[]>([
94
105
  { id: 1, label: 'Mozzarella', selected: false },
95
106
  { id: 2, label: 'Mushrooms', selected: true },
96
107
  { id: 3, label: 'Pepperoni', selected: false },
@@ -106,6 +117,10 @@ export class DemoSelectAll {
106
117
  const next = !this.allChecked();
107
118
  this.items.update((list) => list.map((i) => ({ ...i, selected: next })));
108
119
  }
120
+
121
+ setItem(id: number, selected: boolean): void {
122
+ this.items.update((list) => list.map((i) => (i.id === id ? { ...i, selected } : i)));
123
+ }
109
124
  }
110
125
  ```
111
126