@angular/cdk 21.2.0 → 21.2.2

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 (60) hide show
  1. package/fesm2022/_a11y-module-chunk.mjs +22 -22
  2. package/fesm2022/_a11y-module-chunk.mjs.map +1 -1
  3. package/fesm2022/_breakpoints-observer-chunk.mjs +6 -6
  4. package/fesm2022/_breakpoints-observer-chunk.mjs.map +1 -1
  5. package/fesm2022/_directionality-chunk.mjs +3 -3
  6. package/fesm2022/_directionality-chunk.mjs.map +1 -1
  7. package/fesm2022/_focus-monitor-chunk.mjs +9 -9
  8. package/fesm2022/_focus-monitor-chunk.mjs.map +1 -1
  9. package/fesm2022/_id-generator-chunk.mjs +3 -3
  10. package/fesm2022/_id-generator-chunk.mjs.map +1 -1
  11. package/fesm2022/_overlay-module-chunk.mjs +34 -34
  12. package/fesm2022/_overlay-module-chunk.mjs.map +1 -1
  13. package/fesm2022/_platform-chunk.mjs +3 -3
  14. package/fesm2022/_platform-chunk.mjs.map +1 -1
  15. package/fesm2022/_style-loader-chunk.mjs +3 -3
  16. package/fesm2022/_style-loader-chunk.mjs.map +1 -1
  17. package/fesm2022/_unique-selection-dispatcher-chunk.mjs +3 -3
  18. package/fesm2022/_unique-selection-dispatcher-chunk.mjs.map +1 -1
  19. package/fesm2022/a11y.mjs +9 -9
  20. package/fesm2022/a11y.mjs.map +1 -1
  21. package/fesm2022/accordion.mjs +10 -10
  22. package/fesm2022/accordion.mjs.map +1 -1
  23. package/fesm2022/bidi.mjs +7 -7
  24. package/fesm2022/cdk.mjs +1 -1
  25. package/fesm2022/cdk.mjs.map +1 -1
  26. package/fesm2022/clipboard.mjs +10 -10
  27. package/fesm2022/clipboard.mjs.map +1 -1
  28. package/fesm2022/dialog.mjs +11 -11
  29. package/fesm2022/dialog.mjs.map +1 -1
  30. package/fesm2022/drag-drop.mjs +31 -31
  31. package/fesm2022/drag-drop.mjs.map +1 -1
  32. package/fesm2022/layout.mjs +4 -4
  33. package/fesm2022/listbox.mjs +10 -10
  34. package/fesm2022/listbox.mjs.map +1 -1
  35. package/fesm2022/menu.mjs +49 -49
  36. package/fesm2022/menu.mjs.map +1 -1
  37. package/fesm2022/observers-private.mjs +3 -3
  38. package/fesm2022/observers-private.mjs.map +1 -1
  39. package/fesm2022/observers.mjs +13 -13
  40. package/fesm2022/observers.mjs.map +1 -1
  41. package/fesm2022/overlay.mjs +3 -3
  42. package/fesm2022/overlay.mjs.map +1 -1
  43. package/fesm2022/platform.mjs +4 -4
  44. package/fesm2022/portal.mjs +10 -10
  45. package/fesm2022/portal.mjs.map +1 -1
  46. package/fesm2022/private.mjs +3 -3
  47. package/fesm2022/private.mjs.map +1 -1
  48. package/fesm2022/scrolling.mjs +35 -35
  49. package/fesm2022/scrolling.mjs.map +1 -1
  50. package/fesm2022/stepper.mjs +22 -22
  51. package/fesm2022/stepper.mjs.map +1 -1
  52. package/fesm2022/table.mjs +78 -78
  53. package/fesm2022/table.mjs.map +1 -1
  54. package/fesm2022/text-field.mjs +16 -16
  55. package/fesm2022/text-field.mjs.map +1 -1
  56. package/fesm2022/tree.mjs +26 -26
  57. package/fesm2022/tree.mjs.map +1 -1
  58. package/package.json +1 -1
  59. package/schematics/ng-add/index.js +1 -1
  60. package/types/dialog.d.ts +12 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/cdk",
3
- "version": "21.2.0",
3
+ "version": "21.2.2",
4
4
  "description": "Angular Material Component Development Kit",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,6 +26,6 @@ function default_1() {
26
26
  // In order to align the CDK version with other Angular dependencies that are setup by
27
27
  // `@schematics/angular`, we use tilde instead of caret. This is default for Angular
28
28
  // dependencies in new CLI projects.
29
- return (0, utility_1.addDependency)('@angular/cdk', `~21.2.0`, { existing: utility_1.ExistingBehavior.Skip });
29
+ return (0, utility_1.addDependency)('@angular/cdk', `~21.2.2`, { existing: utility_1.ExistingBehavior.Skip });
30
30
  }
31
31
  //# sourceMappingURL=index.js.map
package/types/dialog.d.ts CHANGED
@@ -20,6 +20,15 @@ import './_style-loader-chunk.js';
20
20
 
21
21
  /** Options for where to set focus to automatically on dialog open */
22
22
  type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';
23
+ /**
24
+ * Value that determines the focus restoration behavior for a dialog.
25
+ * The values represent the following behaviors:
26
+ * - `boolean` - when true, will return focus to the element that was focused before the dialog
27
+ * was opened, otherwise won't restore focus at all.
28
+ * - `string` - focus will be restored to the first element that matches the CSS selector.
29
+ * - `HTMLElement` - focus will be restored to the specific element.
30
+ */
31
+ type RestoreFocusValue = boolean | string | HTMLElement;
23
32
  /** Valid ARIA roles for a dialog. */
24
33
  type DialogRole = 'dialog' | 'alertdialog';
25
34
  /** Component that can be used as the container for the dialog. */
@@ -92,15 +101,8 @@ declare class DialogConfig<D = unknown, R = unknown, C extends DialogContainer =
92
101
  * AutoFocusTarget instead.
93
102
  */
94
103
  autoFocus?: AutoFocusTarget | string | boolean;
95
- /**
96
- * Whether the dialog should restore focus to the previously-focused element upon closing.
97
- * Has the following behavior based on the type that is passed in:
98
- * - `boolean` - when true, will return focus to the element that was focused before the dialog
99
- * was opened, otherwise won't restore focus at all.
100
- * - `string` - focus will be restored to the first element that matches the CSS selector.
101
- * - `HTMLElement` - focus will be restored to the specific element.
102
- */
103
- restoreFocus?: boolean | string | HTMLElement;
104
+ /** Configures the focus restoration behavior. See `RestoreFocusValue` for more information. */
105
+ restoreFocus?: RestoreFocusValue;
104
106
  /**
105
107
  * Scroll strategy to be used for the dialog. This determines how
106
108
  * the dialog responds to scrolling underneath the panel element.
@@ -410,4 +412,4 @@ declare const DIALOG_DATA: InjectionToken<any>;
410
412
  declare const DEFAULT_DIALOG_CONFIG: InjectionToken<DialogConfig<unknown, unknown, _angular_cdk_portal.BasePortalOutlet>>;
411
413
 
412
414
  export { CdkDialogContainer, DEFAULT_DIALOG_CONFIG, DIALOG_DATA, DIALOG_SCROLL_STRATEGY, Dialog, DialogConfig, DialogModule, DialogRef, throwDialogContentAlreadyAttachedError, CdkPortalOutlet as ɵɵCdkPortalOutlet };
413
- export type { AutoFocusTarget, DialogCloseOptions, DialogContainer, DialogRole };
415
+ export type { AutoFocusTarget, DialogCloseOptions, DialogContainer, DialogRole, RestoreFocusValue };