@radix-ng/primitives 0.50.0 → 1.0.0-beta.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 (207) hide show
  1. package/collection/README.md +1 -0
  2. package/fesm2022/radix-ng-primitives-accordion.mjs +134 -66
  3. package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
  4. package/fesm2022/radix-ng-primitives-alert-dialog.mjs +224 -132
  5. package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +1 -1
  6. package/fesm2022/radix-ng-primitives-arrow.mjs +26 -10
  7. package/fesm2022/radix-ng-primitives-arrow.mjs.map +1 -1
  8. package/fesm2022/radix-ng-primitives-aspect-ratio.mjs +6 -6
  9. package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
  10. package/fesm2022/radix-ng-primitives-avatar.mjs +68 -75
  11. package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
  12. package/fesm2022/radix-ng-primitives-button.mjs +123 -0
  13. package/fesm2022/radix-ng-primitives-button.mjs.map +1 -0
  14. package/fesm2022/radix-ng-primitives-calendar.mjs +104 -103
  15. package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
  16. package/fesm2022/radix-ng-primitives-checkbox.mjs +414 -80
  17. package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
  18. package/fesm2022/radix-ng-primitives-collapsible.mjs +193 -92
  19. package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
  20. package/fesm2022/radix-ng-primitives-collection.mjs +72 -0
  21. package/fesm2022/radix-ng-primitives-collection.mjs.map +1 -0
  22. package/fesm2022/radix-ng-primitives-config.mjs +5 -5
  23. package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
  24. package/fesm2022/radix-ng-primitives-context-menu.mjs +143 -427
  25. package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
  26. package/fesm2022/radix-ng-primitives-core.mjs +757 -757
  27. package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
  28. package/fesm2022/radix-ng-primitives-cropper.mjs +55 -53
  29. package/fesm2022/radix-ng-primitives-cropper.mjs.map +1 -1
  30. package/fesm2022/radix-ng-primitives-date-field.mjs +93 -86
  31. package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
  32. package/fesm2022/radix-ng-primitives-dialog.mjs +658 -330
  33. package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
  34. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +98 -76
  35. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -1
  36. package/fesm2022/radix-ng-primitives-drawer.mjs +1059 -0
  37. package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -0
  38. package/fesm2022/radix-ng-primitives-editable.mjs +20 -20
  39. package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
  40. package/fesm2022/radix-ng-primitives-field.mjs +363 -0
  41. package/fesm2022/radix-ng-primitives-field.mjs.map +1 -0
  42. package/fesm2022/radix-ng-primitives-fieldset.mjs +79 -0
  43. package/fesm2022/radix-ng-primitives-fieldset.mjs.map +1 -0
  44. package/fesm2022/radix-ng-primitives-focus-guards.mjs +3 -3
  45. package/fesm2022/radix-ng-primitives-focus-guards.mjs.map +1 -1
  46. package/fesm2022/radix-ng-primitives-focus-scope.mjs +29 -14
  47. package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
  48. package/fesm2022/radix-ng-primitives-input.mjs +172 -0
  49. package/fesm2022/radix-ng-primitives-input.mjs.map +1 -0
  50. package/fesm2022/radix-ng-primitives-label.mjs +11 -11
  51. package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
  52. package/fesm2022/radix-ng-primitives-menu.mjs +1484 -353
  53. package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
  54. package/fesm2022/radix-ng-primitives-menubar.mjs +290 -162
  55. package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
  56. package/fesm2022/radix-ng-primitives-meter.mjs +271 -0
  57. package/fesm2022/radix-ng-primitives-meter.mjs.map +1 -0
  58. package/fesm2022/radix-ng-primitives-navigation-menu.mjs +1060 -1553
  59. package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
  60. package/fesm2022/radix-ng-primitives-number-field.mjs +1102 -366
  61. package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
  62. package/fesm2022/radix-ng-primitives-pagination.mjs +51 -51
  63. package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -1
  64. package/fesm2022/radix-ng-primitives-popover.mjs +980 -995
  65. package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
  66. package/fesm2022/radix-ng-primitives-popper.mjs +137 -82
  67. package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
  68. package/fesm2022/radix-ng-primitives-portal.mjs +40 -16
  69. package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
  70. package/fesm2022/radix-ng-primitives-presence.mjs +134 -246
  71. package/fesm2022/radix-ng-primitives-presence.mjs.map +1 -1
  72. package/fesm2022/radix-ng-primitives-preview-card.mjs +997 -0
  73. package/fesm2022/radix-ng-primitives-preview-card.mjs.map +1 -0
  74. package/fesm2022/radix-ng-primitives-progress.mjs +231 -92
  75. package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
  76. package/fesm2022/radix-ng-primitives-radio.mjs +211 -70
  77. package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
  78. package/fesm2022/radix-ng-primitives-roving-focus.mjs +127 -77
  79. package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
  80. package/fesm2022/radix-ng-primitives-select.mjs +791 -511
  81. package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
  82. package/fesm2022/radix-ng-primitives-separator.mjs +16 -45
  83. package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
  84. package/fesm2022/radix-ng-primitives-slider.mjs +976 -720
  85. package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
  86. package/fesm2022/radix-ng-primitives-stepper.mjs +69 -71
  87. package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
  88. package/fesm2022/radix-ng-primitives-switch.mjs +128 -124
  89. package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
  90. package/fesm2022/radix-ng-primitives-tabs.mjs +388 -115
  91. package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
  92. package/fesm2022/radix-ng-primitives-time-field.mjs +111 -117
  93. package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
  94. package/fesm2022/radix-ng-primitives-toggle-group.mjs +122 -248
  95. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
  96. package/fesm2022/radix-ng-primitives-toggle.mjs +99 -62
  97. package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
  98. package/fesm2022/radix-ng-primitives-toolbar.mjs +307 -94
  99. package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
  100. package/fesm2022/radix-ng-primitives-tooltip.mjs +690 -1079
  101. package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
  102. package/fesm2022/radix-ng-primitives-visually-hidden.mjs +46 -87
  103. package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
  104. package/fesm2022/radix-ng-primitives.mjs.map +1 -1
  105. package/meter/README.md +3 -0
  106. package/navigation-menu/README.md +2 -1
  107. package/package.json +85 -63
  108. package/portal/README.md +2 -0
  109. package/preview-card/README.md +3 -0
  110. package/schematics/collection.json +1 -0
  111. package/schematics/ng-add/index.d.ts +3 -2
  112. package/schematics/ng-add/index.js +62 -31
  113. package/schematics/ng-add/index.js.map +1 -1
  114. package/schematics/ng-add/package-config.d.ts +4 -2
  115. package/schematics/ng-add/package-config.js +10 -2
  116. package/schematics/ng-add/package-config.js.map +1 -1
  117. package/schematics/ng-add/schema.d.ts +3 -0
  118. package/schematics/ng-add/schema.js +3 -0
  119. package/schematics/ng-add/schema.js.map +1 -0
  120. package/schematics/ng-add/schema.json +14 -0
  121. package/select/README.md +2 -0
  122. package/{accordion/index.d.ts → types/radix-ng-primitives-accordion.d.ts} +102 -67
  123. package/types/radix-ng-primitives-alert-dialog.d.ts +114 -0
  124. package/{arrow/index.d.ts → types/radix-ng-primitives-arrow.d.ts} +1 -1
  125. package/{aspect-ratio/index.d.ts → types/radix-ng-primitives-aspect-ratio.d.ts} +1 -1
  126. package/{avatar/index.d.ts → types/radix-ng-primitives-avatar.d.ts} +7 -11
  127. package/types/radix-ng-primitives-button.d.ts +73 -0
  128. package/{calendar/index.d.ts → types/radix-ng-primitives-calendar.d.ts} +2 -3
  129. package/types/radix-ng-primitives-checkbox.d.ts +337 -0
  130. package/types/radix-ng-primitives-collapsible.d.ts +159 -0
  131. package/types/radix-ng-primitives-collection.d.ts +44 -0
  132. package/{config/index.d.ts → types/radix-ng-primitives-config.d.ts} +1 -1
  133. package/types/radix-ng-primitives-context-menu.d.ts +73 -0
  134. package/{core/index.d.ts → types/radix-ng-primitives-core.d.ts} +311 -236
  135. package/{cropper/index.d.ts → types/radix-ng-primitives-cropper.d.ts} +6 -5
  136. package/{date-field/index.d.ts → types/radix-ng-primitives-date-field.d.ts} +42 -27
  137. package/types/radix-ng-primitives-dialog.d.ts +323 -0
  138. package/{dismissable-layer/index.d.ts → types/radix-ng-primitives-dismissable-layer.d.ts} +15 -7
  139. package/types/radix-ng-primitives-drawer.d.ts +448 -0
  140. package/{editable/index.d.ts → types/radix-ng-primitives-editable.d.ts} +1 -1
  141. package/types/radix-ng-primitives-field.d.ts +373 -0
  142. package/types/radix-ng-primitives-fieldset.d.ts +48 -0
  143. package/{focus-scope/index.d.ts → types/radix-ng-primitives-focus-scope.d.ts} +13 -5
  144. package/types/radix-ng-primitives-input.d.ts +87 -0
  145. package/{label/index.d.ts → types/radix-ng-primitives-label.d.ts} +0 -1
  146. package/types/radix-ng-primitives-menu.d.ts +612 -0
  147. package/types/radix-ng-primitives-menubar.d.ts +66 -0
  148. package/types/radix-ng-primitives-meter.d.ts +193 -0
  149. package/types/radix-ng-primitives-navigation-menu.d.ts +488 -0
  150. package/types/radix-ng-primitives-number-field.d.ts +464 -0
  151. package/{pagination/index.d.ts → types/radix-ng-primitives-pagination.d.ts} +2 -2
  152. package/types/radix-ng-primitives-popover.d.ts +416 -0
  153. package/{popper/index.d.ts → types/radix-ng-primitives-popper.d.ts} +50 -9
  154. package/types/radix-ng-primitives-portal.d.ts +30 -0
  155. package/types/radix-ng-primitives-presence.d.ts +55 -0
  156. package/types/radix-ng-primitives-preview-card.d.ts +359 -0
  157. package/types/radix-ng-primitives-progress.d.ts +206 -0
  158. package/{radio/index.d.ts → types/radix-ng-primitives-radio.d.ts} +56 -26
  159. package/{roving-focus/index.d.ts → types/radix-ng-primitives-roving-focus.d.ts} +38 -27
  160. package/types/radix-ng-primitives-select.d.ts +512 -0
  161. package/types/radix-ng-primitives-separator.d.ts +38 -0
  162. package/types/radix-ng-primitives-slider.d.ts +377 -0
  163. package/{stepper/index.d.ts → types/radix-ng-primitives-stepper.d.ts} +21 -22
  164. package/types/radix-ng-primitives-switch.d.ts +121 -0
  165. package/types/radix-ng-primitives-tabs.d.ts +247 -0
  166. package/{time-field/index.d.ts → types/radix-ng-primitives-time-field.d.ts} +46 -31
  167. package/types/radix-ng-primitives-toggle-group.d.ts +116 -0
  168. package/types/radix-ng-primitives-toggle.d.ts +65 -0
  169. package/types/radix-ng-primitives-toolbar.d.ts +180 -0
  170. package/types/radix-ng-primitives-tooltip.d.ts +395 -0
  171. package/{visually-hidden/index.d.ts → types/radix-ng-primitives-visually-hidden.d.ts} +19 -19
  172. package/alert-dialog/index.d.ts +0 -57
  173. package/checkbox/index.d.ts +0 -164
  174. package/collapsible/index.d.ts +0 -85
  175. package/context-menu/index.d.ts +0 -129
  176. package/dialog/index.d.ts +0 -205
  177. package/dropdown-menu/README.md +0 -1
  178. package/dropdown-menu/index.d.ts +0 -171
  179. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +0 -583
  180. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +0 -1
  181. package/fesm2022/radix-ng-primitives-hover-card.mjs +0 -1246
  182. package/fesm2022/radix-ng-primitives-hover-card.mjs.map +0 -1
  183. package/fesm2022/radix-ng-primitives-tooltip2.mjs +0 -740
  184. package/fesm2022/radix-ng-primitives-tooltip2.mjs.map +0 -1
  185. package/hover-card/README.md +0 -3
  186. package/hover-card/index.d.ts +0 -472
  187. package/menu/index.d.ts +0 -139
  188. package/menubar/index.d.ts +0 -56
  189. package/navigation-menu/index.d.ts +0 -405
  190. package/number-field/index.d.ts +0 -203
  191. package/popover/index.d.ts +0 -403
  192. package/portal/index.d.ts +0 -22
  193. package/presence/index.d.ts +0 -103
  194. package/progress/index.d.ts +0 -79
  195. package/select/index.d.ts +0 -214
  196. package/separator/index.d.ts +0 -63
  197. package/slider/index.d.ts +0 -263
  198. package/switch/index.d.ts +0 -105
  199. package/tabs/index.d.ts +0 -112
  200. package/toggle/index.d.ts +0 -75
  201. package/toggle-group/index.d.ts +0 -194
  202. package/toolbar/index.d.ts +0 -55
  203. package/tooltip/index.d.ts +0 -433
  204. package/tooltip2/README.md +0 -3
  205. package/tooltip2/index.d.ts +0 -325
  206. /package/{focus-guards/index.d.ts → types/radix-ng-primitives-focus-guards.d.ts} +0 -0
  207. /package/{index.d.ts → types/radix-ng-primitives.d.ts} +0 -0
package/tabs/index.d.ts DELETED
@@ -1,112 +0,0 @@
1
- import * as _angular_core from '@angular/core';
2
- import { OnInit, InjectionToken, InputSignalWithTransform } from '@angular/core';
3
- import * as i1 from '@radix-ng/primitives/roving-focus';
4
- import { BooleanInput } from '@angular/cdk/coercion';
5
-
6
- interface TabsProps {
7
- /** The value for the selected tab, if controlled */
8
- value?: string;
9
- /** The value of the tab to select by default, if uncontrolled */
10
- defaultValue?: string;
11
- /** A function called when a new tab is selected */
12
- onValueChange?: (value: string) => void;
13
- /**
14
- * The orientation the tabs are layed out.
15
- * Mainly so arrow navigation is done accordingly (left & right vs. up & down)
16
- * @defaultValue horizontal
17
- */
18
- orientation?: string;
19
- /**
20
- * The direction of navigation between toolbar items.
21
- */
22
- dir?: string;
23
- /**
24
- * Whether a tab is activated automatically or manually.
25
- * @defaultValue automatic
26
- * */
27
- activationMode?: 'automatic' | 'manual';
28
- }
29
- type DataOrientation = 'vertical' | 'horizontal';
30
- declare const RDX_TABS_ROOT_TOKEN: InjectionToken<RdxTabsRootDirective>;
31
- declare class RdxTabsRootDirective implements OnInit {
32
- /**
33
- * The controlled value of the tab to activate. Should be used in conjunction with `onValueChange`.
34
- */
35
- readonly value: _angular_core.ModelSignal<string | undefined>;
36
- readonly defaultValue: _angular_core.InputSignal<string | undefined>;
37
- /**
38
- * When automatic, tabs are activated when receiving focus. When manual, tabs are activated when clicked.
39
- */
40
- readonly activationMode: _angular_core.InputSignal<"automatic" | "manual">;
41
- /**
42
- * The orientation of the component.
43
- */
44
- readonly orientation: _angular_core.InputSignal<DataOrientation>;
45
- readonly dir: _angular_core.InputSignal<string>;
46
- /**
47
- * Event handler called when the value changes.
48
- */
49
- readonly onValueChange: _angular_core.OutputEmitterRef<string>;
50
- ngOnInit(): void;
51
- select(value: string): void;
52
- /** @ignore */
53
- getBaseId(): string;
54
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxTabsRootDirective, never>;
55
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxTabsRootDirective, "[rdxTabsRoot]", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "activationMode": { "alias": "activationMode"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "dir": { "alias": "dir"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "onValueChange": "onValueChange"; }, never, never, true, never>;
56
- }
57
-
58
- declare class RdxTabsContentDirective {
59
- protected readonly tabsContext: RdxTabsRootDirective;
60
- /**
61
- * A unique value that associates the content with a trigger.
62
- */
63
- readonly value: _angular_core.InputSignal<string>;
64
- protected readonly contentId: _angular_core.Signal<string>;
65
- protected readonly triggerId: _angular_core.Signal<string>;
66
- protected readonly selected: _angular_core.Signal<boolean>;
67
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxTabsContentDirective, never>;
68
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxTabsContentDirective, "[rdxTabsContent]", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
69
- }
70
-
71
- interface TabsListProps {
72
- loop?: boolean;
73
- }
74
- declare class RdxTabsListDirective {
75
- protected readonly tabsContext: RdxTabsRootDirective;
76
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxTabsListDirective, never>;
77
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxTabsListDirective, "[rdxTabsList]", never, {}, {}, never, never, true, [{ directive: typeof i1.RdxRovingFocusGroupDirective; inputs: { "dir": "dir"; "orientation": "orientation"; "loop": "loop"; }; outputs: {}; }]>;
78
- }
79
-
80
- interface TabsTriggerProps {
81
- disabled: InputSignalWithTransform<boolean, BooleanInput>;
82
- }
83
- declare class RdxTabsTriggerDirective implements TabsTriggerProps {
84
- private readonly rdxRovingFocusItemDirective;
85
- protected readonly tabsContext: RdxTabsRootDirective;
86
- /**
87
- * A unique value that associates the trigger with a content.
88
- */
89
- readonly value: _angular_core.InputSignal<string>;
90
- /**
91
- * When true, prevents the user from interacting with the tab.
92
- */
93
- readonly disabled: InputSignalWithTransform<boolean, BooleanInput>;
94
- protected readonly contentId: _angular_core.Signal<string>;
95
- protected readonly triggerId: _angular_core.Signal<string>;
96
- protected readonly isSelected: _angular_core.Signal<boolean>;
97
- constructor();
98
- protected onMouseDown(event: MouseEvent): void;
99
- protected onKeyDown(event: KeyboardEvent): void;
100
- protected onFocus(): void;
101
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxTabsTriggerDirective, never>;
102
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxTabsTriggerDirective, "[rdxTabsTrigger]", never, { "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: {}; }]>;
103
- }
104
-
105
- declare class RdxTabsModule {
106
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxTabsModule, never>;
107
- static ɵmod: _angular_core.ɵɵNgModuleDeclaration<RdxTabsModule, never, [typeof RdxTabsRootDirective, typeof RdxTabsContentDirective, typeof RdxTabsListDirective, typeof RdxTabsTriggerDirective], [typeof RdxTabsRootDirective, typeof RdxTabsContentDirective, typeof RdxTabsListDirective, typeof RdxTabsTriggerDirective]>;
108
- static ɵinj: _angular_core.ɵɵInjectorDeclaration<RdxTabsModule>;
109
- }
110
-
111
- export { RDX_TABS_ROOT_TOKEN, RdxTabsContentDirective, RdxTabsListDirective, RdxTabsModule, RdxTabsRootDirective, RdxTabsTriggerDirective };
112
- export type { DataOrientation, TabsListProps, TabsProps };
package/toggle/index.d.ts DELETED
@@ -1,75 +0,0 @@
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';
7
-
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
- /**
36
- * @group Components
37
- */
38
- declare class RdxToggleDirective {
39
- /**
40
- * @ignore
41
- */
42
- readonly cva: RdxControlValueAccessor<any>;
43
- /**
44
- * The pressed state of the toggle when it is initially rendered.
45
- * Use when you do not need to control its pressed state.
46
- *
47
- * @group Props
48
- */
49
- readonly defaultPressed: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
50
- /**
51
- * The controlled pressed state of the toggle.
52
- * Must be used in conjunction with `onPressedChange`.
53
- *
54
- * @group Props
55
- */
56
- readonly pressed: _angular_core.ModelSignal<boolean>;
57
- /**
58
- * When true, prevents the user from interacting with the toggle.
59
- *
60
- * @group Props
61
- */
62
- readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
63
- /**
64
- * Event handler called when the pressed state of the toggle changes.
65
- *
66
- * @group Emits
67
- */
68
- readonly onPressedChange: _angular_core.OutputRef<any>;
69
- 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: {}; }]>;
72
- }
73
-
74
- export { RdxToggleDirective, RdxToggleVisuallyHiddenInputDirective };
75
- export type { DataState, ToggleProps };
@@ -1,194 +0,0 @@
1
- import * as _angular_core from '@angular/core';
2
- import { InjectionToken } from '@angular/core';
3
- import { BooleanInput } from '@angular/cdk/coercion';
4
- import * as i1 from '@radix-ng/primitives/roving-focus';
5
- import * as i2 from '@radix-ng/primitives/toggle';
6
- import { ControlValueAccessor } from '@angular/forms';
7
- import { AcceptableValue } from '@radix-ng/primitives/core';
8
-
9
- interface IRdxToggleGroup {
10
- toggle(value: string): void;
11
- disabled: any;
12
- value: any;
13
- type: any;
14
- accessorDisabled: any;
15
- }
16
- declare const RdxToggleGroupToken: InjectionToken<IRdxToggleGroup>;
17
- declare function injectToggleGroup(): IRdxToggleGroup;
18
-
19
- /**
20
- * @group Components
21
- */
22
- declare class RdxToggleGroupItemDirective {
23
- private readonly rdxToggleDirective;
24
- private readonly rdxRovingFocusItemDirective;
25
- /**
26
- * Access the toggle group.
27
- * @ignore
28
- */
29
- protected readonly rootContext: IRdxToggleGroup;
30
- /**
31
- * The value of this toggle button.
32
- *
33
- * @group Props
34
- */
35
- readonly value: _angular_core.InputSignal<string>;
36
- /**
37
- * Whether this toggle button is disabled.
38
- * @defaultValue false
39
- * @group Props
40
- */
41
- readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
42
- private readonly isPressed;
43
- private readonly isDisabled;
44
- constructor();
45
- /**
46
- * @ignore
47
- */
48
- toggle(): void;
49
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToggleGroupItemDirective, never>;
50
- 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: {}; }]>;
51
- }
52
-
53
- declare const RdxToggleGroupItemToken: InjectionToken<RdxToggleGroupItemDirective>;
54
- declare function injectToggleGroupItem(): RdxToggleGroupItemDirective;
55
-
56
- declare class RdxToggleGroupWithoutFocusDirective implements ControlValueAccessor {
57
- /**
58
- * @ignore
59
- */
60
- readonly id: string;
61
- /**
62
- * @group Props
63
- */
64
- readonly value: _angular_core.ModelSignal<string | string[] | undefined>;
65
- /**
66
- * @group Props
67
- */
68
- readonly type: _angular_core.InputSignal<"single" | "multiple">;
69
- /**
70
- * Whether the toggle group is disabled.
71
- * @defaultValue false
72
- * @group Props
73
- */
74
- readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
75
- /**
76
- * Event emitted when the selected toggle button changes.
77
- * @group Emits
78
- */
79
- readonly onValueChange: _angular_core.OutputEmitterRef<string | string[] | undefined>;
80
- /**
81
- * The value change callback.
82
- */
83
- private onChange?;
84
- /**
85
- * onTouch function registered via registerOnTouch (ControlValueAccessor).
86
- */
87
- protected onTouched?: () => void;
88
- /**
89
- * Toggle a value.
90
- * @param value The value to toggle.
91
- * @ignore
92
- */
93
- toggle(value: string): void;
94
- /**
95
- * Select a value from Angular forms.
96
- * @param value The value to select.
97
- * @ignore
98
- */
99
- writeValue(value: string): void;
100
- /**
101
- * Register a callback to be called when the value changes.
102
- * @param fn The callback to register.
103
- * @ignore
104
- */
105
- registerOnChange(fn: (value: string | string[] | undefined) => void): void;
106
- /**
107
- * Register a callback to be called when the toggle group is touched.
108
- * @param fn The callback to register.
109
- * @ignore
110
- */
111
- registerOnTouched(fn: () => void): void;
112
- private readonly accessorDisabled;
113
- /**
114
- * Set the disabled state of the toggle group.
115
- * @param isDisabled Whether the toggle group is disabled.
116
- * @ignore
117
- */
118
- setDisabledState(isDisabled: boolean): void;
119
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToggleGroupWithoutFocusDirective, never>;
120
- 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>;
121
- }
122
-
123
- /**
124
- * @group Components
125
- */
126
- declare class RdxToggleGroupDirective implements ControlValueAccessor {
127
- /**
128
- * @ignore
129
- */
130
- readonly id: string;
131
- /**
132
- * @group Props
133
- */
134
- readonly value: _angular_core.ModelSignal<AcceptableValue | AcceptableValue[] | undefined>;
135
- /**
136
- * @group Props
137
- */
138
- readonly type: _angular_core.InputSignal<"single" | "multiple">;
139
- /**
140
- * Whether the toggle group is disabled.
141
- * @defaultValue false
142
- * @group Props
143
- */
144
- readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
145
- /**
146
- * Event emitted when the selected toggle button changes.
147
- * @group Emits
148
- */
149
- readonly onValueChange: _angular_core.OutputEmitterRef<AcceptableValue | AcceptableValue[] | undefined>;
150
- /**
151
- * The value change callback.
152
- */
153
- private onChange?;
154
- /**
155
- * onTouch function registered via registerOnTouch (ControlValueAccessor).
156
- */
157
- protected onTouched?: () => void;
158
- /**
159
- * Toggle a value.
160
- * @param value The value to toggle.
161
- * @ignore
162
- */
163
- toggle(value: AcceptableValue): void;
164
- /**
165
- * Select a value from Angular forms.
166
- * @param value The value to select.
167
- * @ignore
168
- */
169
- writeValue(value: string): void;
170
- /**
171
- * Register a callback to be called when the value changes.
172
- * @param fn The callback to register.
173
- * @ignore
174
- */
175
- registerOnChange(fn: (value: AcceptableValue | AcceptableValue[] | undefined) => void): void;
176
- /**
177
- * Register a callback to be called when the toggle group is touched.
178
- * @param fn The callback to register.
179
- * @ignore
180
- */
181
- registerOnTouched(fn: () => void): void;
182
- readonly accessorDisabled: _angular_core.WritableSignal<boolean>;
183
- /**
184
- * Set the disabled state of the toggle group.
185
- * @param isDisabled Whether the toggle group is disabled.
186
- * @ignore
187
- */
188
- setDisabledState(isDisabled: boolean): void;
189
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxToggleGroupDirective, never>;
190
- 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: {}; }]>;
191
- }
192
-
193
- export { RdxToggleGroupDirective, RdxToggleGroupItemDirective, RdxToggleGroupItemToken, RdxToggleGroupToken, RdxToggleGroupWithoutFocusDirective, injectToggleGroup, injectToggleGroupItem };
194
- export type { IRdxToggleGroup };
@@ -1,55 +0,0 @@
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';
7
-
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: {}; }]>;
13
- }
14
-
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: {}; }]>;
22
- }
23
-
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: {}; }]>;
28
- }
29
-
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: {}; }]>;
33
- }
34
-
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: {}; }]>;
38
- }
39
-
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: {}; }]>;
43
- }
44
-
45
- declare const RDX_TOOLBAR_ROOT_TOKEN: InjectionToken<RdxToolbarRootDirective>;
46
- declare function injectRootContext(): RdxToolbarRootDirective;
47
- declare function provideRootContext(): Provider;
48
-
49
- 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>;
53
- }
54
-
55
- export { RDX_TOOLBAR_ROOT_TOKEN, RdxToolbarButtonDirective, RdxToolbarLinkDirective, RdxToolbarModule, RdxToolbarRootDirective, RdxToolbarSeparatorDirective, RdxToolbarToggleGroupDirective, RdxToolbarToggleItemDirective, injectRootContext, provideRootContext };