@radix-ng/primitives 0.51.0 → 1.0.0-beta.1

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 (186) hide show
  1. package/fesm2022/radix-ng-primitives-accordion.mjs +105 -38
  2. package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
  3. package/fesm2022/radix-ng-primitives-alert-dialog.mjs +221 -129
  4. package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +1 -1
  5. package/fesm2022/radix-ng-primitives-arrow.mjs +20 -4
  6. package/fesm2022/radix-ng-primitives-arrow.mjs.map +1 -1
  7. package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
  8. package/fesm2022/radix-ng-primitives-avatar.mjs +54 -61
  9. package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
  10. package/fesm2022/radix-ng-primitives-button.mjs +123 -0
  11. package/fesm2022/radix-ng-primitives-button.mjs.map +1 -0
  12. package/fesm2022/radix-ng-primitives-calendar.mjs +95 -83
  13. package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
  14. package/fesm2022/radix-ng-primitives-checkbox.mjs +378 -54
  15. package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
  16. package/fesm2022/radix-ng-primitives-collapsible.mjs +182 -81
  17. package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
  18. package/fesm2022/radix-ng-primitives-collection.mjs +40 -57
  19. package/fesm2022/radix-ng-primitives-collection.mjs.map +1 -1
  20. package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
  21. package/fesm2022/radix-ng-primitives-context-menu.mjs +140 -424
  22. package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
  23. package/fesm2022/radix-ng-primitives-core.mjs +845 -744
  24. package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
  25. package/fesm2022/radix-ng-primitives-cropper.mjs +288 -308
  26. package/fesm2022/radix-ng-primitives-cropper.mjs.map +1 -1
  27. package/fesm2022/radix-ng-primitives-date-field.mjs +104 -58
  28. package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
  29. package/fesm2022/radix-ng-primitives-dialog.mjs +655 -327
  30. package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
  31. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +70 -46
  32. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -1
  33. package/fesm2022/radix-ng-primitives-drawer.mjs +960 -0
  34. package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -0
  35. package/fesm2022/radix-ng-primitives-editable.mjs +304 -23
  36. package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
  37. package/fesm2022/radix-ng-primitives-field.mjs +363 -0
  38. package/fesm2022/radix-ng-primitives-field.mjs.map +1 -0
  39. package/fesm2022/radix-ng-primitives-fieldset.mjs +79 -0
  40. package/fesm2022/radix-ng-primitives-fieldset.mjs.map +1 -0
  41. package/fesm2022/radix-ng-primitives-focus-scope.mjs +23 -8
  42. package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
  43. package/fesm2022/radix-ng-primitives-input.mjs +172 -0
  44. package/fesm2022/radix-ng-primitives-input.mjs.map +1 -0
  45. package/fesm2022/radix-ng-primitives-label.mjs +6 -6
  46. package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
  47. package/fesm2022/radix-ng-primitives-menu.mjs +1907 -363
  48. package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
  49. package/fesm2022/radix-ng-primitives-menubar.mjs +290 -162
  50. package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
  51. package/fesm2022/radix-ng-primitives-meter.mjs +271 -0
  52. package/fesm2022/radix-ng-primitives-meter.mjs.map +1 -0
  53. package/fesm2022/radix-ng-primitives-navigation-menu.mjs +1052 -1553
  54. package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
  55. package/fesm2022/radix-ng-primitives-number-field.mjs +1102 -367
  56. package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
  57. package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -1
  58. package/fesm2022/radix-ng-primitives-popover.mjs +978 -989
  59. package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
  60. package/fesm2022/radix-ng-primitives-popper.mjs +111 -44
  61. package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
  62. package/fesm2022/radix-ng-primitives-portal.mjs +34 -10
  63. package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
  64. package/fesm2022/radix-ng-primitives-presence.mjs +134 -246
  65. package/fesm2022/radix-ng-primitives-presence.mjs.map +1 -1
  66. package/fesm2022/radix-ng-primitives-preview-card.mjs +997 -0
  67. package/fesm2022/radix-ng-primitives-preview-card.mjs.map +1 -0
  68. package/fesm2022/radix-ng-primitives-progress.mjs +223 -84
  69. package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
  70. package/fesm2022/radix-ng-primitives-radio.mjs +191 -51
  71. package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
  72. package/fesm2022/radix-ng-primitives-roving-focus.mjs +96 -50
  73. package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
  74. package/fesm2022/radix-ng-primitives-scroll-area.mjs +923 -0
  75. package/fesm2022/radix-ng-primitives-scroll-area.mjs.map +1 -0
  76. package/fesm2022/radix-ng-primitives-select.mjs +791 -509
  77. package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
  78. package/fesm2022/radix-ng-primitives-separator.mjs +12 -35
  79. package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
  80. package/fesm2022/radix-ng-primitives-slider.mjs +969 -717
  81. package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
  82. package/fesm2022/radix-ng-primitives-stepper.mjs +15 -19
  83. package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
  84. package/fesm2022/radix-ng-primitives-switch.mjs +125 -113
  85. package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
  86. package/fesm2022/radix-ng-primitives-tabs.mjs +390 -108
  87. package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
  88. package/fesm2022/radix-ng-primitives-time-field.mjs +55 -46
  89. package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
  90. package/fesm2022/radix-ng-primitives-toast.mjs +839 -0
  91. package/fesm2022/radix-ng-primitives-toast.mjs.map +1 -0
  92. package/fesm2022/radix-ng-primitives-toggle-group.mjs +121 -247
  93. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
  94. package/fesm2022/radix-ng-primitives-toggle.mjs +98 -61
  95. package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
  96. package/fesm2022/radix-ng-primitives-toolbar.mjs +303 -92
  97. package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
  98. package/fesm2022/radix-ng-primitives-tooltip.mjs +699 -1072
  99. package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
  100. package/fesm2022/radix-ng-primitives-visually-hidden.mjs +25 -66
  101. package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
  102. package/meter/README.md +3 -0
  103. package/navigation-menu/README.md +2 -1
  104. package/package.json +39 -18
  105. package/portal/README.md +2 -0
  106. package/preview-card/README.md +3 -0
  107. package/schematics/collection.json +1 -0
  108. package/schematics/ng-add/index.d.ts +3 -2
  109. package/schematics/ng-add/index.js +62 -31
  110. package/schematics/ng-add/index.js.map +1 -1
  111. package/schematics/ng-add/package-config.d.ts +4 -2
  112. package/schematics/ng-add/package-config.js +10 -2
  113. package/schematics/ng-add/package-config.js.map +1 -1
  114. package/schematics/ng-add/schema.d.ts +3 -0
  115. package/schematics/ng-add/schema.js +3 -0
  116. package/schematics/ng-add/schema.js.map +1 -0
  117. package/schematics/ng-add/schema.json +14 -0
  118. package/select/README.md +2 -0
  119. package/types/radix-ng-primitives-accordion.d.ts +51 -16
  120. package/types/radix-ng-primitives-alert-dialog.d.ts +95 -38
  121. package/types/radix-ng-primitives-arrow.d.ts +1 -1
  122. package/types/radix-ng-primitives-aspect-ratio.d.ts +1 -1
  123. package/types/radix-ng-primitives-avatar.d.ts +7 -11
  124. package/types/radix-ng-primitives-button.d.ts +73 -0
  125. package/types/radix-ng-primitives-calendar.d.ts +39 -20
  126. package/types/radix-ng-primitives-checkbox.d.ts +204 -35
  127. package/types/radix-ng-primitives-collapsible.d.ts +114 -40
  128. package/types/radix-ng-primitives-collection.d.ts +38 -34
  129. package/types/radix-ng-primitives-config.d.ts +1 -1
  130. package/types/radix-ng-primitives-context-menu.d.ts +61 -116
  131. package/types/radix-ng-primitives-core.d.ts +345 -235
  132. package/types/radix-ng-primitives-cropper.d.ts +89 -56
  133. package/types/radix-ng-primitives-date-field.d.ts +49 -28
  134. package/types/radix-ng-primitives-dialog.d.ts +283 -165
  135. package/types/radix-ng-primitives-dismissable-layer.d.ts +15 -7
  136. package/types/radix-ng-primitives-drawer.d.ts +426 -0
  137. package/types/radix-ng-primitives-editable.d.ts +91 -14
  138. package/types/radix-ng-primitives-field.d.ts +374 -0
  139. package/types/radix-ng-primitives-fieldset.d.ts +49 -0
  140. package/types/radix-ng-primitives-focus-scope.d.ts +15 -6
  141. package/types/radix-ng-primitives-input.d.ts +87 -0
  142. package/types/radix-ng-primitives-label.d.ts +0 -1
  143. package/types/radix-ng-primitives-menu.d.ts +584 -99
  144. package/types/radix-ng-primitives-menubar.d.ts +61 -50
  145. package/types/radix-ng-primitives-meter.d.ts +194 -0
  146. package/types/radix-ng-primitives-navigation-menu.d.ts +422 -340
  147. package/types/radix-ng-primitives-number-field.d.ts +405 -145
  148. package/types/radix-ng-primitives-pagination.d.ts +2 -2
  149. package/types/radix-ng-primitives-popover.d.ts +366 -351
  150. package/types/radix-ng-primitives-popper.d.ts +68 -11
  151. package/types/radix-ng-primitives-portal.d.ts +14 -6
  152. package/types/radix-ng-primitives-presence.d.ts +28 -76
  153. package/types/radix-ng-primitives-preview-card.d.ts +359 -0
  154. package/types/radix-ng-primitives-progress.d.ts +175 -48
  155. package/types/radix-ng-primitives-radio.d.ts +55 -25
  156. package/types/radix-ng-primitives-roving-focus.d.ts +33 -23
  157. package/types/radix-ng-primitives-scroll-area.d.ts +253 -0
  158. package/types/radix-ng-primitives-select.d.ts +475 -177
  159. package/types/radix-ng-primitives-separator.d.ts +7 -32
  160. package/types/radix-ng-primitives-slider.d.ts +315 -201
  161. package/types/radix-ng-primitives-stepper.d.ts +5 -7
  162. package/types/radix-ng-primitives-switch.d.ts +86 -71
  163. package/types/radix-ng-primitives-tabs.d.ts +213 -79
  164. package/types/radix-ng-primitives-time-field.d.ts +42 -27
  165. package/types/radix-ng-primitives-toast.d.ts +378 -0
  166. package/types/radix-ng-primitives-toggle-group.d.ts +86 -164
  167. package/types/radix-ng-primitives-toggle.d.ts +43 -53
  168. package/types/radix-ng-primitives-toolbar.d.ts +164 -38
  169. package/types/radix-ng-primitives-tooltip.d.ts +348 -384
  170. package/types/radix-ng-primitives-visually-hidden.d.ts +19 -19
  171. package/dropdown-menu/README.md +0 -1
  172. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +0 -581
  173. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +0 -1
  174. package/fesm2022/radix-ng-primitives-hover-card.mjs +0 -1238
  175. package/fesm2022/radix-ng-primitives-hover-card.mjs.map +0 -1
  176. package/fesm2022/radix-ng-primitives-select2.mjs +0 -897
  177. package/fesm2022/radix-ng-primitives-select2.mjs.map +0 -1
  178. package/fesm2022/radix-ng-primitives-tooltip2.mjs +0 -735
  179. package/fesm2022/radix-ng-primitives-tooltip2.mjs.map +0 -1
  180. package/hover-card/README.md +0 -3
  181. package/select2/README.md +0 -3
  182. package/tooltip2/README.md +0 -3
  183. package/types/radix-ng-primitives-dropdown-menu.d.ts +0 -171
  184. package/types/radix-ng-primitives-hover-card.d.ts +0 -471
  185. package/types/radix-ng-primitives-select2.d.ts +0 -511
  186. package/types/radix-ng-primitives-tooltip2.d.ts +0 -325
@@ -1,195 +1,117 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { InjectionToken } from '@angular/core';
3
- import * as _radix_ng_primitives_toggle_group from '@radix-ng/primitives/toggle-group';
4
- import { BooleanInput } from '@angular/cdk/coercion';
2
+ import { Signal } from '@angular/core';
3
+ import * as _radix_ng_primitives_core from '@radix-ng/primitives/core';
4
+ import { DataOrientation, BooleanInput } from '@radix-ng/primitives/core';
5
5
  import * as i1 from '@radix-ng/primitives/roving-focus';
6
- import * as i2 from '@radix-ng/primitives/toggle';
6
+ import { Direction } from '@radix-ng/primitives/roving-focus';
7
7
  import { ControlValueAccessor } from '@angular/forms';
8
- import { AcceptableValue } from '@radix-ng/primitives/core';
9
8
 
10
9
  /**
11
- * @group Components
10
+ * Shared state a {@link RdxToggle} reads when it participates in a toggle group.
12
11
  */
13
- declare class RdxToggleGroupItemDirective {
14
- private readonly rdxToggleDirective;
15
- private readonly rdxRovingFocusItemDirective;
16
- /**
17
- * Access the toggle group.
18
- * @ignore
19
- */
20
- protected readonly rootContext: _radix_ng_primitives_toggle_group.IRdxToggleGroup;
21
- /**
22
- * The value of this toggle button.
23
- *
24
- * @group Props
25
- */
26
- readonly value: _angular_core.InputSignal<string>;
27
- /**
28
- * Whether this toggle button is disabled.
29
- * @defaultValue false
30
- * @group Props
31
- */
32
- readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
33
- private readonly isPressed;
34
- private readonly isDisabled;
35
- constructor();
36
- /**
37
- * @ignore
38
- */
39
- toggle(): void;
40
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToggleGroupItemDirective, never>;
41
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxToggleGroupItemDirective, "[rdxToggleGroupItem]", ["rdxToggleGroupItem"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.RdxRovingFocusItemDirective; inputs: { "focusable": "focusable"; "active": "active"; "allowShiftKey": "allowShiftKey"; }; outputs: {}; }, { directive: typeof i2.RdxToggleDirective; inputs: { "pressed": "pressed"; "disabled": "disabled"; }; outputs: {}; }]>;
12
+ interface RdxToggleGroupContext {
13
+ /** The currently pressed values. */
14
+ readonly value: Signal<string[]>;
15
+ /** Whether the whole group is disabled. */
16
+ readonly disabled: Signal<boolean>;
17
+ /** Whether more than one item can be pressed at a time. */
18
+ readonly multiple: Signal<boolean>;
19
+ /** The orientation of the group. */
20
+ readonly orientation: Signal<DataOrientation>;
21
+ /** Toggle the pressed state of `value` within the group. */
22
+ toggle(value: string): void;
42
23
  }
24
+ declare const injectToggleGroupContext: _radix_ng_primitives_core.InjectContext<RdxToggleGroupContext>;
25
+ declare const provideToggleGroupContext: (useFactory: () => RdxToggleGroupContext) => _angular_core.Provider;
43
26
 
44
- declare const RdxToggleGroupItemToken: InjectionToken<RdxToggleGroupItemDirective>;
45
- declare function injectToggleGroupItem(): RdxToggleGroupItemDirective;
46
-
47
- declare class RdxToggleGroupWithoutFocusDirective implements ControlValueAccessor {
48
- /**
49
- * @ignore
50
- */
51
- readonly id: string;
27
+ /** Builds the shared context a {@link RdxToggle} reads when it belongs to this group. */
28
+ declare function toggleGroupContext(instance: RdxToggleGroupBase): RdxToggleGroupContext;
29
+ /**
30
+ * Shared state and behavior for the toggle group. Concrete directives add the roving-focus group
31
+ * ({@link RdxToggleGroup}) or omit it when an ancestor already owns focus, e.g. a toolbar
32
+ * ({@link RdxToggleGroupWithoutFocus}).
33
+ */
34
+ declare abstract class RdxToggleGroupBase implements ControlValueAccessor {
52
35
  /**
53
- * @group Props
36
+ * The pressed values. Always an array — a single value is `[value]`. Use with `(onValueChange)`
37
+ * for controlled state.
54
38
  */
55
- readonly value: _angular_core.ModelSignal<string | string[] | undefined>;
39
+ readonly value: _angular_core.ModelSignal<string[] | undefined>;
40
+ /** The values pressed when the group is initially rendered (uncontrolled). */
41
+ readonly defaultValue: _angular_core.InputSignal<string[] | undefined>;
56
42
  /**
57
- * @group Props
43
+ * Whether multiple items can be pressed at the same time.
44
+ *
45
+ * @default false
58
46
  */
59
- readonly type: _angular_core.InputSignal<"single" | "multiple">;
47
+ readonly multiple: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
60
48
  /**
61
- * Whether the toggle group is disabled.
62
- * @defaultValue false
63
- * @group Props
49
+ * Whether the whole group is disabled.
50
+ *
51
+ * @default false
64
52
  */
65
53
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
66
54
  /**
67
- * Event emitted when the selected toggle button changes.
68
- * @group Emits
69
- */
70
- readonly onValueChange: _angular_core.OutputEmitterRef<string | string[] | undefined>;
71
- /**
72
- * The value change callback.
73
- */
55
+ * The orientation of the group, controlling arrow-key navigation.
56
+ *
57
+ * @default 'horizontal'
58
+ */
59
+ readonly orientation: _angular_core.InputSignal<DataOrientation>;
60
+ /** Event emitted when the pressed values change. */
61
+ readonly onValueChange: _angular_core.OutputEmitterRef<string[]>;
62
+ /** @ignore */
63
+ readonly pressedValues: _angular_core.Signal<string[]>;
64
+ protected readonly accessorDisabled: _angular_core.WritableSignal<boolean>;
65
+ /** @ignore */
66
+ readonly isDisabled: _angular_core.Signal<boolean>;
74
67
  private onChange?;
75
- /**
76
- * onTouch function registered via registerOnTouch (ControlValueAccessor).
77
- */
78
68
  protected onTouched?: () => void;
79
- /**
80
- * Toggle a value.
81
- * @param value The value to toggle.
82
- * @ignore
83
- */
69
+ constructor();
70
+ /** @ignore */
84
71
  toggle(value: string): void;
85
- /**
86
- * Select a value from Angular forms.
87
- * @param value The value to select.
88
- * @ignore
89
- */
90
- writeValue(value: string): void;
91
- /**
92
- * Register a callback to be called when the value changes.
93
- * @param fn The callback to register.
94
- * @ignore
95
- */
96
- registerOnChange(fn: (value: string | string[] | undefined) => void): void;
97
- /**
98
- * Register a callback to be called when the toggle group is touched.
99
- * @param fn The callback to register.
100
- * @ignore
101
- */
72
+ /** @ignore */
73
+ writeValue(value: string[] | string | null): void;
74
+ /** @ignore */
75
+ registerOnChange(fn: (value: string[]) => void): void;
76
+ /** @ignore */
102
77
  registerOnTouched(fn: () => void): void;
103
- private readonly accessorDisabled;
104
- /**
105
- * Set the disabled state of the toggle group.
106
- * @param isDisabled Whether the toggle group is disabled.
107
- * @ignore
108
- */
78
+ /** @ignore */
109
79
  setDisabledState(isDisabled: boolean): void;
110
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToggleGroupWithoutFocusDirective, never>;
111
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxToggleGroupWithoutFocusDirective, "[rdxToggleGroupWithoutFocus]", ["rdxToggleGroupWithoutFocus"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "onValueChange": "onValueChange"; }, never, never, true, never>;
80
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToggleGroupBase, never>;
81
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxToggleGroupBase, never, never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "onValueChange": "onValueChange"; }, never, never, true, never>;
112
82
  }
113
83
 
114
84
  /**
115
- * @group Components
85
+ * A set of two-state buttons that can be toggled on or off. Owns roving keyboard focus over its
86
+ * `[rdxToggle]` children.
87
+ *
88
+ * @see https://base-ui.com/react/components/toggle-group
116
89
  */
117
- declare class RdxToggleGroupDirective implements ControlValueAccessor {
118
- /**
119
- * @ignore
120
- */
121
- readonly id: string;
122
- /**
123
- * @group Props
124
- */
125
- readonly value: _angular_core.ModelSignal<AcceptableValue | AcceptableValue[] | undefined>;
126
- /**
127
- * @group Props
128
- */
129
- readonly type: _angular_core.InputSignal<"single" | "multiple">;
130
- /**
131
- * Whether the toggle group is disabled.
132
- * @defaultValue false
133
- * @group Props
134
- */
135
- readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
136
- /**
137
- * Event emitted when the selected toggle button changes.
138
- * @group Emits
139
- */
140
- readonly onValueChange: _angular_core.OutputEmitterRef<AcceptableValue | AcceptableValue[] | undefined>;
141
- /**
142
- * The value change callback.
143
- */
144
- private onChange?;
145
- /**
146
- * onTouch function registered via registerOnTouch (ControlValueAccessor).
147
- */
148
- protected onTouched?: () => void;
90
+ declare class RdxToggleGroup extends RdxToggleGroupBase {
91
+ /** Text direction for arrow-key navigation. */
92
+ readonly dir: _angular_core.InputSignal<Direction>;
149
93
  /**
150
- * Toggle a value.
151
- * @param value The value to toggle.
152
- * @ignore
153
- */
154
- toggle(value: AcceptableValue): void;
155
- /**
156
- * Select a value from Angular forms.
157
- * @param value The value to select.
158
- * @ignore
159
- */
160
- writeValue(value: string): void;
161
- /**
162
- * Register a callback to be called when the value changes.
163
- * @param fn The callback to register.
164
- * @ignore
165
- */
166
- registerOnChange(fn: (value: AcceptableValue | AcceptableValue[] | undefined) => void): void;
167
- /**
168
- * Register a callback to be called when the toggle group is touched.
169
- * @param fn The callback to register.
170
- * @ignore
171
- */
172
- registerOnTouched(fn: () => void): void;
173
- readonly accessorDisabled: _angular_core.WritableSignal<boolean>;
174
- /**
175
- * Set the disabled state of the toggle group.
176
- * @param isDisabled Whether the toggle group is disabled.
177
- * @ignore
94
+ * Whether keyboard navigation should loop from the last item back to the first.
95
+ *
96
+ * @default true
178
97
  */
179
- setDisabledState(isDisabled: boolean): void;
180
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToggleGroupDirective, never>;
181
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxToggleGroupDirective, "[rdxToggleGroup]", ["rdxToggleGroup"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "onValueChange": "onValueChange"; }, never, never, true, [{ directive: typeof i1.RdxRovingFocusGroupDirective; inputs: { "dir": "dir"; "orientation": "orientation"; "loop": "loop"; }; outputs: {}; }]>;
98
+ readonly loopFocus: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
99
+ private readonly rovingFocusGroup;
100
+ constructor();
101
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToggleGroup, never>;
102
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxToggleGroup, "[rdxToggleGroup]", ["rdxToggleGroup"], { "dir": { "alias": "dir"; "required": false; "isSignal": true; }; "loopFocus": { "alias": "loopFocus"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.RdxRovingFocusGroupDirective; inputs: {}; outputs: {}; }]>;
182
103
  }
183
104
 
184
- interface IRdxToggleGroup {
185
- toggle(value: string): void;
186
- disabled: any;
187
- value: any;
188
- type: any;
189
- accessorDisabled: any;
105
+ /**
106
+ * A toggle group that does NOT create its own roving-focus group, for use inside a container that
107
+ * already owns keyboard focus (e.g. a toolbar). The `[rdxToggle]` children register with the nearest
108
+ * ancestor roving-focus group instead. Mirrors Base UI's behavior of skipping its composite root
109
+ * when nested in a toolbar.
110
+ */
111
+ declare class RdxToggleGroupWithoutFocus extends RdxToggleGroupBase {
112
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToggleGroupWithoutFocus, never>;
113
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxToggleGroupWithoutFocus, "[rdxToggleGroupWithoutFocus]", ["rdxToggleGroupWithoutFocus"], {}, {}, never, never, true, never>;
190
114
  }
191
- declare const RdxToggleGroupToken: InjectionToken<IRdxToggleGroup>;
192
- declare function injectToggleGroup(): IRdxToggleGroup;
193
115
 
194
- export { RdxToggleGroupDirective, RdxToggleGroupItemDirective, RdxToggleGroupItemToken, RdxToggleGroupToken, RdxToggleGroupWithoutFocusDirective, injectToggleGroup, injectToggleGroupItem };
195
- export type { IRdxToggleGroup };
116
+ export { RdxToggleGroup, RdxToggleGroupBase, RdxToggleGroupWithoutFocus, injectToggleGroupContext, provideToggleGroupContext, toggleGroupContext };
117
+ export type { RdxToggleGroupContext };
@@ -1,75 +1,65 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { OutputEmitterRef } from '@angular/core';
3
- import * as i1 from '@radix-ng/primitives/visually-hidden';
4
- import { BooleanInput } from '@angular/cdk/coercion';
5
- import * as i1$1 from '@radix-ng/primitives/core';
6
- import { RdxControlValueAccessor } from '@radix-ng/primitives/core';
2
+ import { BooleanInput } from '@radix-ng/primitives/core';
3
+ import * as i1 from '@radix-ng/primitives/roving-focus';
4
+ import * as i1$1 from '@radix-ng/primitives/visually-hidden';
7
5
 
8
- declare class RdxToggleVisuallyHiddenInputDirective {
9
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToggleVisuallyHiddenInputDirective, never>;
10
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxToggleVisuallyHiddenInputDirective, "input[rdxToggleVisuallyHiddenInput]", ["rdxToggleVisuallyHiddenInput"], {}, {}, never, never, true, [{ directive: typeof i1.RdxVisuallyHiddenInputDirective; inputs: { "name": "name"; "required": "required"; "value": "value"; "disabled": "disabled"; }; outputs: {}; }]>;
11
- }
12
-
13
- interface ToggleProps {
14
- /**
15
- * The controlled state of the toggle.
16
- */
17
- pressed?: boolean;
18
- /**
19
- * The state of the toggle when initially rendered. Use `defaultPressed`
20
- * if you do not need to control the state of the toggle.
21
- * @defaultValue false
22
- */
23
- defaultPressed?: boolean;
24
- /**
25
- * The callback that fires when the state of the toggle changes.
26
- */
27
- onPressedChange?: OutputEmitterRef<boolean>;
28
- /**
29
- * Whether the toggle is disabled.
30
- * @defaultValue false
31
- */
32
- disabled?: boolean;
33
- }
34
- type DataState = 'on' | 'off';
35
6
  /**
36
- * @group Components
7
+ * A two-state button that can be either on (pressed) or off.
8
+ *
9
+ * Works standalone or as an item of a `[rdxToggleGroup]`: inside a group it derives its pressed
10
+ * state from the group's value (matched by `value`) and participates in the group's roving focus.
11
+ *
12
+ * @see https://base-ui.com/react/components/toggle
37
13
  */
38
- declare class RdxToggleDirective {
14
+ declare class RdxToggle {
15
+ private readonly group;
16
+ private readonly rovingItem;
39
17
  /**
40
- * @ignore
18
+ * A value identifying this toggle inside a `[rdxToggleGroup]`. Required when used in a group.
41
19
  */
42
- readonly cva: RdxControlValueAccessor<any>;
20
+ readonly value: _angular_core.InputSignal<string | undefined>;
43
21
  /**
44
- * The pressed state of the toggle when it is initially rendered.
45
- * Use when you do not need to control its pressed state.
22
+ * The pressed state when initially rendered (uncontrolled, standalone only).
46
23
  *
47
- * @group Props
24
+ * @default false
48
25
  */
49
26
  readonly defaultPressed: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
50
27
  /**
51
- * The controlled pressed state of the toggle.
52
- * Must be used in conjunction with `onPressedChange`.
53
- *
54
- * @group Props
28
+ * The controlled pressed state (standalone). Use with `(onPressedChange)` or two-way `[(pressed)]`.
55
29
  */
56
- readonly pressed: _angular_core.ModelSignal<boolean>;
30
+ readonly pressed: _angular_core.ModelSignal<boolean | undefined>;
57
31
  /**
58
- * When true, prevents the user from interacting with the toggle.
32
+ * Whether the toggle is disabled.
59
33
  *
60
- * @group Props
34
+ * @default false
61
35
  */
62
36
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
63
37
  /**
64
- * Event handler called when the pressed state of the toggle changes.
38
+ * Whether the host is a native `<button>`. When `false`, the toggle adds `role="button"` and
39
+ * handles Enter/Space itself.
65
40
  *
66
- * @group Emits
41
+ * @default true
67
42
  */
68
- readonly onPressedChange: _angular_core.OutputRef<any>;
43
+ readonly nativeButton: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
44
+ /** Event emitted when the pressed state changes (standalone). */
45
+ readonly onPressedChange: _angular_core.OutputEmitterRef<boolean>;
46
+ private readonly internalPressed;
47
+ /** @ignore Whether the toggle is currently pressed (from the group when grouped). */
48
+ readonly pressedState: _angular_core.Signal<boolean>;
49
+ /** @ignore */
50
+ readonly isDisabled: _angular_core.Signal<boolean>;
51
+ constructor();
52
+ /** @ignore */
69
53
  protected onClick(): void;
70
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToggleDirective, never>;
71
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxToggleDirective, "[rdxToggle]", ["rdxToggle"], { "defaultPressed": { "alias": "defaultPressed"; "required": false; "isSignal": true; }; "pressed": { "alias": "pressed"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "pressed": "pressedChange"; "onPressedChange": "onPressedChange"; }, never, never, true, [{ directive: typeof i1$1.RdxControlValueAccessor; inputs: { "value": "pressed"; "disabled": "disabled"; }; outputs: {}; }]>;
54
+ /** @ignore */
55
+ protected onKeyDown(event: KeyboardEvent): void;
56
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToggle, never>;
57
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxToggle, "[rdxToggle]", ["rdxToggle"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultPressed": { "alias": "defaultPressed"; "required": false; "isSignal": true; }; "pressed": { "alias": "pressed"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "nativeButton": { "alias": "nativeButton"; "required": false; "isSignal": true; }; }, { "pressed": "pressedChange"; "onPressedChange": "onPressedChange"; }, never, never, true, [{ directive: typeof i1.RdxRovingFocusItemDirective; inputs: {}; outputs: {}; }]>;
58
+ }
59
+
60
+ declare class RdxToggleVisuallyHiddenInputDirective {
61
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToggleVisuallyHiddenInputDirective, never>;
62
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxToggleVisuallyHiddenInputDirective, "input[rdxToggleVisuallyHiddenInput]", ["rdxToggleVisuallyHiddenInput"], {}, {}, never, never, true, [{ directive: typeof i1$1.RdxVisuallyHiddenInputBubbleDirective; inputs: { "name": "name"; "required": "required"; "value": "value"; "disabled": "disabled"; }; outputs: {}; }]>;
72
63
  }
73
64
 
74
- export { RdxToggleDirective, RdxToggleVisuallyHiddenInputDirective };
75
- export type { DataState, ToggleProps };
65
+ export { RdxToggle, RdxToggleVisuallyHiddenInputDirective };
@@ -1,55 +1,181 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, Provider } from '@angular/core';
3
- import * as i1 from '@radix-ng/primitives/roving-focus';
4
- import { BooleanInput } from '@angular/cdk/coercion';
5
- import * as i1$1 from '@radix-ng/primitives/toggle-group';
6
- import * as i1$2 from '@radix-ng/primitives/separator';
1
+ import * as _angular_core from '@angular/core';
2
+ import { Signal } from '@angular/core';
3
+ import * as i1 from '@radix-ng/primitives/separator';
4
+ import * as _radix_ng_primitives_core from '@radix-ng/primitives/core';
5
+ import { DataOrientation, BooleanInput } from '@radix-ng/primitives/core';
6
+ import * as i1$1 from '@radix-ng/primitives/roving-focus';
7
+ import { Direction } from '@radix-ng/primitives/roving-focus';
8
+ import * as _radix_ng_primitives_toolbar from '@radix-ng/primitives/toolbar';
7
9
 
8
- declare class RdxToolbarRootDirective {
9
- readonly orientation: i0.InputSignal<"horizontal" | "vertical">;
10
- readonly dir: i0.InputSignal<"ltr" | "rtl">;
11
- static ɵfac: i0.ɵɵFactoryDeclaration<RdxToolbarRootDirective, never>;
12
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxToolbarRootDirective, "[rdxToolbarRoot]", never, { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "dir": { "alias": "dir"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.RdxRovingFocusGroupDirective; inputs: { "dir": "dir"; "orientation": "orientation"; "loop": "loop"; }; outputs: {}; }]>;
10
+ /**
11
+ * A separator between toolbar items or groups.
12
+ *
13
+ * @see https://base-ui.com/react/components/toolbar
14
+ */
15
+ declare class RdxToolbarSeparator {
16
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToolbarSeparator, never>;
17
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxToolbarSeparator, "[rdxToolbarSeparator]", ["rdxToolbarSeparator"], {}, {}, never, never, true, [{ directive: typeof i1.RdxSeparatorRootDirective; inputs: { "orientation": "orientation"; }; outputs: {}; }]>;
13
18
  }
14
19
 
15
- declare class RdxToolbarButtonDirective {
16
- #private;
17
- private readonly rdxRovingFocusItemDirective;
18
- readonly disabled: i0.InputSignalWithTransform<boolean, BooleanInput>;
19
- private readonly isDisabled;
20
- static ɵfac: i0.ɵɵFactoryDeclaration<RdxToolbarButtonDirective, never>;
21
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxToolbarButtonDirective, "[rdxToolbarButton]", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.RdxRovingFocusItemDirective; inputs: { "focusable": "focusable"; }; outputs: {}; }]>;
20
+ /**
21
+ * A container for grouping a set of controls, such as buttons, toggle groups or menus.
22
+ * Owns roving keyboard focus over its items.
23
+ *
24
+ * @see https://base-ui.com/react/components/toolbar
25
+ */
26
+ declare class RdxToolbarRoot {
27
+ /**
28
+ * The orientation of the toolbar.
29
+ *
30
+ * @default 'horizontal'
31
+ */
32
+ readonly orientation: _angular_core.InputSignal<DataOrientation>;
33
+ /** Text direction for arrow-key navigation. */
34
+ readonly dir: _angular_core.InputSignal<Direction>;
35
+ /**
36
+ * Whether keyboard navigation should loop from the last item back to the first.
37
+ *
38
+ * @default true
39
+ */
40
+ readonly loopFocus: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
41
+ /**
42
+ * Whether the whole toolbar is disabled.
43
+ *
44
+ * @default false
45
+ */
46
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
47
+ private readonly rovingFocusGroup;
48
+ constructor();
49
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToolbarRoot, never>;
50
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxToolbarRoot, "[rdxToolbarRoot]", ["rdxToolbarRoot"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "dir": { "alias": "dir"; "required": false; "isSignal": true; }; "loopFocus": { "alias": "loopFocus"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1$1.RdxRovingFocusGroupDirective; inputs: {}; outputs: {}; }]>;
22
51
  }
23
52
 
24
- declare class RdxToolbarLinkDirective {
25
- onKeyDown($event: KeyboardEvent): void;
26
- static ɵfac: i0.ɵɵFactoryDeclaration<RdxToolbarLinkDirective, never>;
27
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxToolbarLinkDirective, "[rdxToolbarLink]", never, {}, {}, never, never, true, [{ directive: typeof i1.RdxRovingFocusItemDirective; inputs: { "focusable": "focusable"; }; outputs: {}; }]>;
53
+ /**
54
+ * A button within a toolbar.
55
+ *
56
+ * @see https://base-ui.com/react/components/toolbar
57
+ */
58
+ declare class RdxToolbarButton {
59
+ protected readonly rootContext: _radix_ng_primitives_toolbar.RdxToolbarRootContext;
60
+ private readonly groupContext;
61
+ private readonly rovingItem;
62
+ /**
63
+ * Whether the button is disabled.
64
+ *
65
+ * @default false
66
+ */
67
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
68
+ /**
69
+ * Whether the button stays focusable while disabled (so it remains discoverable for keyboard
70
+ * and screen-reader users).
71
+ *
72
+ * @default true
73
+ */
74
+ readonly focusableWhenDisabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
75
+ /**
76
+ * Whether the host is a native `<button>`. When `false`, adds `role="button"`.
77
+ *
78
+ * @default true
79
+ */
80
+ readonly nativeButton: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
81
+ /** @ignore Effective disabled state, combining the button, group and toolbar. */
82
+ readonly isDisabled: _angular_core.Signal<boolean>;
83
+ constructor();
84
+ /** @ignore */
85
+ protected onClick(event: Event): void;
86
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToolbarButton, never>;
87
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxToolbarButton, "[rdxToolbarButton]", ["rdxToolbarButton"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "focusableWhenDisabled": { "alias": "focusableWhenDisabled"; "required": false; "isSignal": true; }; "nativeButton": { "alias": "nativeButton"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1$1.RdxRovingFocusItemDirective; inputs: {}; outputs: {}; }]>;
28
88
  }
29
89
 
30
- declare class RdxToolbarToggleGroupDirective {
31
- static ɵfac: i0.ɵɵFactoryDeclaration<RdxToolbarToggleGroupDirective, never>;
32
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxToolbarToggleGroupDirective, "[rdxToolbarToggleGroup]", never, {}, {}, never, never, true, [{ directive: typeof i1$1.RdxToggleGroupWithoutFocusDirective; inputs: { "value": "value"; "type": "type"; "disabled": "disabled"; }; outputs: {}; }]>;
90
+ /**
91
+ * A link within a toolbar.
92
+ *
93
+ * @see https://base-ui.com/react/components/toolbar
94
+ */
95
+ declare class RdxToolbarLink {
96
+ protected readonly rootContext: _radix_ng_primitives_toolbar.RdxToolbarRootContext;
97
+ /** @ignore Space activates a link, matching native button behavior in a toolbar. */
98
+ protected onKeyDown(event: KeyboardEvent): void;
99
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToolbarLink, never>;
100
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxToolbarLink, "[rdxToolbarLink]", ["rdxToolbarLink"], {}, {}, never, never, true, [{ directive: typeof i1$1.RdxRovingFocusItemDirective; inputs: {}; outputs: {}; }]>;
33
101
  }
34
102
 
35
- declare class RdxToolbarToggleItemDirective {
36
- static ɵfac: i0.ɵɵFactoryDeclaration<RdxToolbarToggleItemDirective, never>;
37
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxToolbarToggleItemDirective, "[rdxToolbarToggleItem]", never, {}, {}, never, never, true, [{ directive: typeof i1$1.RdxToggleGroupItemDirective; inputs: { "value": "value"; "disabled": "disabled"; }; outputs: {}; }]>;
103
+ /**
104
+ * A native input within a toolbar. Participates in the toolbar's roving focus while keeping native
105
+ * text-editing: the arrow keys move the caret within the text and only move focus to the
106
+ * neighbouring toolbar item once the caret is at the corresponding edge (Base UI "composite" input).
107
+ *
108
+ * @see https://base-ui.com/react/components/toolbar
109
+ */
110
+ declare class RdxToolbarInput {
111
+ protected readonly rootContext: _radix_ng_primitives_toolbar.RdxToolbarRootContext;
112
+ private readonly groupContext;
113
+ private readonly rovingItem;
114
+ private readonly elementRef;
115
+ private readonly isBrowser;
116
+ /** The initial value of the uncontrolled input. */
117
+ readonly defaultValue: _angular_core.InputSignal<string | undefined>;
118
+ /**
119
+ * Whether the input is disabled.
120
+ *
121
+ * @default false
122
+ */
123
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
124
+ /**
125
+ * Whether the input stays focusable while disabled.
126
+ *
127
+ * @default true
128
+ */
129
+ readonly focusableWhenDisabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
130
+ /** @ignore */
131
+ readonly isDisabled: _angular_core.Signal<boolean>;
132
+ private appliedDefault;
133
+ constructor();
134
+ private handleCaretKeydown;
135
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToolbarInput, never>;
136
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxToolbarInput, "input[rdxToolbarInput]", ["rdxToolbarInput"], { "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "focusableWhenDisabled": { "alias": "focusableWhenDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1$1.RdxRovingFocusItemDirective; inputs: {}; outputs: {}; }]>;
38
137
  }
39
138
 
40
- declare class RdxToolbarSeparatorDirective {
41
- static ɵfac: i0.ɵɵFactoryDeclaration<RdxToolbarSeparatorDirective, never>;
42
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxToolbarSeparatorDirective, "[rdxToolbarSeparator]", never, {}, {}, never, never, true, [{ directive: typeof i1$2.RdxSeparatorRootDirective; inputs: { "orientation": "orientation"; "decorative": "decorative"; }; outputs: {}; }]>;
139
+ /**
140
+ * Groups several toolbar items together. Disabling the group disables all of its items.
141
+ *
142
+ * @see https://base-ui.com/react/components/toolbar
143
+ */
144
+ declare class RdxToolbarGroup {
145
+ protected readonly rootContext: _radix_ng_primitives_toolbar.RdxToolbarRootContext;
146
+ /**
147
+ * Whether the group is disabled.
148
+ *
149
+ * @default false
150
+ */
151
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
152
+ /** @ignore Effective disabled state, combining the group and the toolbar. */
153
+ readonly isDisabled: _angular_core.Signal<boolean>;
154
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToolbarGroup, never>;
155
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxToolbarGroup, "[rdxToolbarGroup]", ["rdxToolbarGroup"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
43
156
  }
44
157
 
45
- declare const RDX_TOOLBAR_ROOT_TOKEN: InjectionToken<RdxToolbarRootDirective>;
46
- declare function injectRootContext(): RdxToolbarRootDirective;
47
- declare function provideRootContext(): Provider;
158
+ interface RdxToolbarRootContext {
159
+ /** The orientation of the toolbar. */
160
+ readonly orientation: Signal<DataOrientation>;
161
+ /** Whether the whole toolbar is disabled. */
162
+ readonly disabled: Signal<boolean>;
163
+ }
164
+ declare const injectToolbarRootContext: _radix_ng_primitives_core.InjectContext<RdxToolbarRootContext>;
165
+ declare const provideToolbarRootContext: (useFactory: () => RdxToolbarRootContext) => _angular_core.Provider;
166
+ interface RdxToolbarGroupContext {
167
+ /** Whether the group (and therefore its items) is disabled. */
168
+ readonly disabled: Signal<boolean>;
169
+ }
170
+ declare const injectToolbarGroupContext: _radix_ng_primitives_core.InjectContext<RdxToolbarGroupContext>;
171
+ declare const provideToolbarGroupContext: (useFactory: () => RdxToolbarGroupContext) => _angular_core.Provider;
48
172
 
173
+ declare const toolbarImports: (typeof RdxToolbarSeparator)[];
49
174
  declare class RdxToolbarModule {
50
- static ɵfac: i0.ɵɵFactoryDeclaration<RdxToolbarModule, never>;
51
- static ɵmod: i0.ɵɵNgModuleDeclaration<RdxToolbarModule, never, [typeof RdxToolbarRootDirective, typeof RdxToolbarButtonDirective, typeof RdxToolbarLinkDirective, typeof RdxToolbarToggleGroupDirective, typeof RdxToolbarToggleItemDirective, typeof RdxToolbarSeparatorDirective], [typeof RdxToolbarRootDirective, typeof RdxToolbarButtonDirective, typeof RdxToolbarLinkDirective, typeof RdxToolbarToggleGroupDirective, typeof RdxToolbarToggleItemDirective, typeof RdxToolbarSeparatorDirective]>;
52
- static ɵinj: i0.ɵɵInjectorDeclaration<RdxToolbarModule>;
175
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToolbarModule, never>;
176
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<RdxToolbarModule, never, [typeof RdxToolbarRoot, typeof RdxToolbarButton, typeof RdxToolbarLink, typeof RdxToolbarInput, typeof RdxToolbarGroup, typeof RdxToolbarSeparator], [typeof RdxToolbarRoot, typeof RdxToolbarButton, typeof RdxToolbarLink, typeof RdxToolbarInput, typeof RdxToolbarGroup, typeof RdxToolbarSeparator]>;
177
+ static ɵinj: _angular_core.ɵɵInjectorDeclaration<RdxToolbarModule>;
53
178
  }
54
179
 
55
- export { RDX_TOOLBAR_ROOT_TOKEN, RdxToolbarButtonDirective, RdxToolbarLinkDirective, RdxToolbarModule, RdxToolbarRootDirective, RdxToolbarSeparatorDirective, RdxToolbarToggleGroupDirective, RdxToolbarToggleItemDirective, injectRootContext, provideRootContext };
180
+ export { RdxToolbarButton, RdxToolbarGroup, RdxToolbarInput, RdxToolbarLink, RdxToolbarModule, RdxToolbarRoot, RdxToolbarSeparator, injectToolbarGroupContext, injectToolbarRootContext, provideToolbarGroupContext, provideToolbarRootContext, toolbarImports };
181
+ export type { RdxToolbarGroupContext, RdxToolbarRootContext };