forty-cdk 0.34.0 → 0.36.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 (209) 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 +3326 -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 +603 -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 +1945 -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 +1478 -1564
  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 +605 -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/hover-card/README.md +23 -0
  129. package/input/README.md +1 -1
  130. package/menu/README.md +3 -1
  131. package/navigation-menu/README.md +19 -9
  132. package/number-input/README.md +1 -1
  133. package/package.json +7 -6
  134. package/separator/README.md +4 -4
  135. package/shared/README.md +80 -1
  136. package/slider/README.md +19 -12
  137. package/table/README.md +22 -20
  138. package/table-virtualization/README.md +29 -7
  139. package/toast/README.md +10 -7
  140. package/toolbar/README.md +4 -4
  141. package/tooltip/README.md +22 -1
  142. package/tree/README.md +44 -23
  143. package/types/forty-cdk-accordion.d.ts +210 -167
  144. package/types/forty-cdk-aspect-ratio.d.ts +23 -20
  145. package/types/forty-cdk-avatar.d.ts +73 -58
  146. package/types/forty-cdk-breadcrumbs.d.ts +43 -35
  147. package/types/forty-cdk-breakpoints.d.ts +42 -47
  148. package/types/forty-cdk-button.d.ts +47 -42
  149. package/types/forty-cdk-calendar.d.ts +712 -590
  150. package/types/forty-cdk-carousel.d.ts +497 -392
  151. package/types/forty-cdk-checkbox.d.ts +55 -46
  152. package/types/forty-cdk-combobox.d.ts +1254 -1059
  153. package/types/forty-cdk-context-menu.d.ts +322 -258
  154. package/types/forty-cdk-core-overlay.d.ts +2764 -2429
  155. package/types/forty-cdk-core.d.ts +2974 -2732
  156. package/types/forty-cdk-date-adapter.d.ts +195 -200
  157. package/types/forty-cdk-date-field.d.ts +472 -335
  158. package/types/forty-cdk-date-picker.d.ts +617 -475
  159. package/types/forty-cdk-defaults.d.ts +1495 -1251
  160. package/types/forty-cdk-dialog.d.ts +373 -338
  161. package/types/forty-cdk-disclosure.d.ts +78 -61
  162. package/types/forty-cdk-drag-drop.d.ts +570 -483
  163. package/types/forty-cdk-drawer.d.ts +717 -633
  164. package/types/forty-cdk-dropdown-menu.d.ts +236 -177
  165. package/types/forty-cdk-field.d.ts +194 -178
  166. package/types/forty-cdk-fieldset.d.ts +84 -83
  167. package/types/forty-cdk-file-upload.d.ts +152 -126
  168. package/types/forty-cdk-hover-card.d.ts +253 -210
  169. package/types/forty-cdk-input.d.ts +36 -36
  170. package/types/forty-cdk-internationalized-date.d.ts +81 -85
  171. package/types/forty-cdk-listbox.d.ts +570 -485
  172. package/types/forty-cdk-menu.d.ts +676 -543
  173. package/types/forty-cdk-menubar.d.ts +529 -462
  174. package/types/forty-cdk-meter.d.ts +130 -88
  175. package/types/forty-cdk-navigation-menu.d.ts +453 -379
  176. package/types/forty-cdk-number-input.d.ts +243 -199
  177. package/types/forty-cdk-otp-input.d.ts +194 -129
  178. package/types/forty-cdk-pagination.d.ts +239 -168
  179. package/types/forty-cdk-pane-resizer.d.ts +195 -133
  180. package/types/forty-cdk-popover.d.ts +381 -327
  181. package/types/forty-cdk-progress.d.ts +114 -87
  182. package/types/forty-cdk-radio-group.d.ts +189 -135
  183. package/types/forty-cdk-scroll-area.d.ts +329 -297
  184. package/types/forty-cdk-search.d.ts +103 -99
  185. package/types/forty-cdk-select.d.ts +874 -716
  186. package/types/forty-cdk-separator.d.ts +30 -22
  187. package/types/forty-cdk-shared.d.ts +4 -3
  188. package/types/forty-cdk-slider.d.ts +335 -278
  189. package/types/forty-cdk-stepper.d.ts +588 -505
  190. package/types/forty-cdk-switch.d.ts +26 -22
  191. package/types/forty-cdk-table-virtualization.d.ts +88 -70
  192. package/types/forty-cdk-table.d.ts +1970 -1356
  193. package/types/forty-cdk-tabs.d.ts +245 -191
  194. package/types/forty-cdk-testing.d.ts +38 -46
  195. package/types/forty-cdk-time-field.d.ts +508 -366
  196. package/types/forty-cdk-time-picker.d.ts +552 -432
  197. package/types/forty-cdk-toast.d.ts +654 -481
  198. package/types/forty-cdk-toggle.d.ts +212 -167
  199. package/types/forty-cdk-toolbar.d.ts +188 -142
  200. package/types/forty-cdk-tooltip.d.ts +309 -257
  201. package/types/forty-cdk-tree.d.ts +797 -650
  202. package/types/forty-cdk-virtual-reorder.d.ts +36 -27
  203. package/types/forty-cdk-virtualization.d.ts +295 -218
  204. package/types/forty-cdk-visually-hidden.d.ts +2 -1
  205. package/types/forty-cdk.d.ts +1 -2
  206. package/virtualization/README.md +20 -11
  207. package/fesm2022/forty-cdk-shared.mjs.map +0 -1
  208. package/fesm2022/forty-cdk-visually-hidden.mjs.map +0 -1
  209. 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