@radix-ng/primitives 0.5.0 → 0.7.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 (183) hide show
  1. package/alert-dialog/README.md +1 -0
  2. package/alert-dialog/index.d.ts +6 -0
  3. package/alert-dialog/src/alert-dialog-cancel.directive.d.ts +7 -0
  4. package/alert-dialog/src/alert-dialog-content.directive.d.ts +8 -0
  5. package/alert-dialog/src/alert-dialog-root.directive.d.ts +9 -0
  6. package/alert-dialog/src/alert-dialog-title.directive.d.ts +5 -0
  7. package/alert-dialog/src/alert-dialog-trigger.directive.d.ts +7 -0
  8. package/alert-dialog/src/alert-dialog.service.d.ts +14 -0
  9. package/avatar/index.d.ts +3 -1
  10. package/avatar/src/avatar-fallback.directive.d.ts +10 -17
  11. package/avatar/src/avatar-image.directive.d.ts +10 -11
  12. package/avatar/src/avatar-root.directive.d.ts +21 -0
  13. package/avatar/src/avatar.config.d.ts +3 -2
  14. package/checkbox/src/checkbox.directive.d.ts +5 -3
  15. package/collapsible/README.md +1 -0
  16. package/collapsible/index.d.ts +3 -0
  17. package/collapsible/src/collapsible-content.directive.d.ts +11 -0
  18. package/collapsible/src/collapsible-root.directive.d.ts +52 -0
  19. package/collapsible/src/collapsible-trigger.directive.d.ts +26 -0
  20. package/esm2022/alert-dialog/index.mjs +7 -0
  21. package/esm2022/alert-dialog/radix-ng-primitives-alert-dialog.mjs +5 -0
  22. package/esm2022/alert-dialog/src/alert-dialog-cancel.directive.mjs +24 -0
  23. package/esm2022/alert-dialog/src/alert-dialog-content.directive.mjs +26 -0
  24. package/esm2022/alert-dialog/src/alert-dialog-root.directive.mjs +24 -0
  25. package/esm2022/alert-dialog/src/alert-dialog-title.directive.mjs +14 -0
  26. package/esm2022/alert-dialog/src/alert-dialog-trigger.directive.mjs +24 -0
  27. package/esm2022/alert-dialog/src/alert-dialog.service.mjs +45 -0
  28. package/esm2022/avatar/index.mjs +2 -2
  29. package/esm2022/avatar/src/avatar-fallback.directive.mjs +23 -30
  30. package/esm2022/avatar/src/avatar-image.directive.mjs +29 -31
  31. package/esm2022/avatar/src/avatar-root.directive.mjs +38 -0
  32. package/esm2022/avatar/src/avatar.config.mjs +2 -2
  33. package/esm2022/checkbox/src/checkbox-indicator.directive.mjs +3 -3
  34. package/esm2022/checkbox/src/checkbox.directive.mjs +16 -6
  35. package/esm2022/collapsible/index.mjs +4 -0
  36. package/esm2022/collapsible/radix-ng-primitives-collapsible.mjs +5 -0
  37. package/esm2022/collapsible/src/collapsible-content.directive.mjs +26 -0
  38. package/esm2022/collapsible/src/collapsible-root.directive.mjs +114 -0
  39. package/esm2022/collapsible/src/collapsible-trigger.directive.mjs +49 -0
  40. package/esm2022/label/index.mjs +2 -2
  41. package/esm2022/label/src/label-root.directive.mjs +48 -0
  42. package/esm2022/progress/index.mjs +2 -2
  43. package/esm2022/progress/src/progress-indicator.directive.mjs +11 -10
  44. package/esm2022/progress/src/progress-root.directive.mjs +71 -0
  45. package/esm2022/radio/index.mjs +2 -4
  46. package/esm2022/radio/src/radio-indicator.directive.mjs +8 -13
  47. package/esm2022/radio/src/radio-item.directive.mjs +27 -42
  48. package/esm2022/radio/src/radio-root.directive.mjs +104 -0
  49. package/esm2022/roving-focus/index.mjs +1 -3
  50. package/esm2022/roving-focus/src/roving-focus-group.directive.mjs +9 -16
  51. package/esm2022/roving-focus/src/roving-focus-item.directive.mjs +21 -26
  52. package/esm2022/separator/src/separator.directive.mjs +12 -17
  53. package/esm2022/switch/index.mjs +3 -3
  54. package/esm2022/switch/src/switch-input.directive.mjs +30 -0
  55. package/esm2022/switch/src/switch-root.directive.mjs +71 -0
  56. package/esm2022/switch/src/switch-thumb.directive.mjs +10 -12
  57. package/esm2022/toggle/index.mjs +2 -2
  58. package/esm2022/toggle/src/toggle-root.directive.mjs +49 -0
  59. package/esm2022/toggle-group/src/toggle-group-button.directive.mjs +9 -14
  60. package/esm2022/toggle-group/src/toggle-group-multi.directive.mjs +4 -4
  61. package/esm2022/toggle-group/src/toggle-group.directive.mjs +9 -12
  62. package/fesm2022/radix-ng-primitives-alert-dialog.mjs +150 -0
  63. package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +1 -0
  64. package/fesm2022/radix-ng-primitives-avatar.mjs +79 -90
  65. package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
  66. package/fesm2022/radix-ng-primitives-checkbox.mjs +18 -8
  67. package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
  68. package/fesm2022/radix-ng-primitives-collapsible.mjs +190 -0
  69. package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -0
  70. package/fesm2022/radix-ng-primitives-label.mjs +20 -32
  71. package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
  72. package/fesm2022/radix-ng-primitives-progress.mjs +55 -49
  73. package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
  74. package/fesm2022/radix-ng-primitives-radio.mjs +69 -101
  75. package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
  76. package/fesm2022/radix-ng-primitives-roving-focus.mjs +19 -42
  77. package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
  78. package/fesm2022/radix-ng-primitives-separator.mjs +12 -17
  79. package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
  80. package/fesm2022/radix-ng-primitives-switch.mjs +77 -110
  81. package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
  82. package/fesm2022/radix-ng-primitives-toggle-group.mjs +19 -27
  83. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
  84. package/fesm2022/radix-ng-primitives-toggle.mjs +16 -32
  85. package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
  86. package/label/index.d.ts +1 -1
  87. package/label/src/label-root.directive.d.ts +13 -0
  88. package/package.json +14 -21
  89. package/progress/index.d.ts +2 -1
  90. package/progress/src/progress-indicator.directive.d.ts +2 -2
  91. package/progress/src/progress-root.directive.d.ts +29 -0
  92. package/radio/index.d.ts +1 -3
  93. package/radio/src/radio-indicator.directive.d.ts +3 -9
  94. package/radio/src/radio-item.directive.d.ts +9 -28
  95. package/radio/src/{radio-group.directive.d.ts → radio-root.directive.d.ts} +24 -17
  96. package/roving-focus/index.d.ts +0 -2
  97. package/roving-focus/src/roving-focus-group.directive.d.ts +4 -6
  98. package/roving-focus/src/roving-focus-item.directive.d.ts +6 -8
  99. package/separator/src/separator.directive.d.ts +14 -8
  100. package/switch/index.d.ts +3 -2
  101. package/switch/src/switch-input.directive.d.ts +6 -0
  102. package/switch/src/switch-root.directive.d.ts +34 -0
  103. package/switch/src/switch-thumb.directive.d.ts +2 -5
  104. package/toggle/index.d.ts +2 -1
  105. package/toggle/src/toggle-root.directive.d.ts +32 -0
  106. package/toggle-group/src/toggle-group-button.directive.d.ts +1 -4
  107. package/toggle-group/src/toggle-group-multi.directive.d.ts +1 -1
  108. package/toggle-group/src/toggle-group.directive.d.ts +2 -2
  109. package/accordion/README.md +0 -3
  110. package/accordion/index.d.ts +0 -7
  111. package/accordion/src/accordion/accordion.directive.d.ts +0 -64
  112. package/accordion/src/accordion/accordion.token.d.ts +0 -4
  113. package/accordion/src/accordion-content/accordion-content.directive.d.ts +0 -44
  114. package/accordion/src/accordion-header/accordion-header.directive.d.ts +0 -6
  115. package/accordion/src/accordion-item/accordion-item.directive.d.ts +0 -42
  116. package/accordion/src/accordion-item/accordion-item.token.d.ts +0 -4
  117. package/accordion/src/accordion-state.directive.d.ts +0 -28
  118. package/accordion/src/accordion-trigger/accordion-trigger.directive.d.ts +0 -23
  119. package/accordion/src/accordion.config.d.ts +0 -25
  120. package/avatar/src/avatar.directive.d.ts +0 -22
  121. package/avatar/src/avatar.token.d.ts +0 -4
  122. package/esm2022/accordion/index.mjs +0 -8
  123. package/esm2022/accordion/radix-ng-primitives-accordion.mjs +0 -5
  124. package/esm2022/accordion/src/accordion/accordion.directive.mjs +0 -108
  125. package/esm2022/accordion/src/accordion/accordion.token.mjs +0 -6
  126. package/esm2022/accordion/src/accordion-content/accordion-content.directive.mjs +0 -75
  127. package/esm2022/accordion/src/accordion-header/accordion-header.directive.mjs +0 -17
  128. package/esm2022/accordion/src/accordion-item/accordion-item.directive.mjs +0 -81
  129. package/esm2022/accordion/src/accordion-item/accordion-item.token.mjs +0 -6
  130. package/esm2022/accordion/src/accordion-state.directive.mjs +0 -49
  131. package/esm2022/accordion/src/accordion-trigger/accordion-trigger.directive.mjs +0 -49
  132. package/esm2022/accordion/src/accordion.config.mjs +0 -27
  133. package/esm2022/avatar/src/avatar.directive.mjs +0 -38
  134. package/esm2022/avatar/src/avatar.token.mjs +0 -6
  135. package/esm2022/label/src/label.directive.mjs +0 -60
  136. package/esm2022/overlay/index.mjs +0 -5
  137. package/esm2022/overlay/radix-ng-primitives-overlay.mjs +0 -5
  138. package/esm2022/overlay/src/overlay-arrow.directive.mjs +0 -59
  139. package/esm2022/overlay/src/overlay-arrow.token.mjs +0 -3
  140. package/esm2022/overlay/src/overlay-trigger.directive.mjs +0 -279
  141. package/esm2022/overlay/src/overlay-trigger.token.mjs +0 -9
  142. package/esm2022/overlay/src/overlay.directive.mjs +0 -51
  143. package/esm2022/overlay/src/overlay.token.mjs +0 -3
  144. package/esm2022/progress/src/progress.directive.mjs +0 -62
  145. package/esm2022/progress/src/progress.token.mjs +0 -6
  146. package/esm2022/radio/src/radio-group.directive.mjs +0 -108
  147. package/esm2022/radio/src/radio-group.token.mjs +0 -6
  148. package/esm2022/radio/src/radio-item.token.mjs +0 -6
  149. package/esm2022/roving-focus/src/roving-focus-group.token.mjs +0 -9
  150. package/esm2022/roving-focus/src/roving-focus-item.token.mjs +0 -6
  151. package/esm2022/switch/src/switch.directive.mjs +0 -125
  152. package/esm2022/switch/src/switch.token.mjs +0 -6
  153. package/esm2022/toggle/src/toggle.directive.mjs +0 -65
  154. package/esm2022/visually-hidden/index.mjs +0 -2
  155. package/esm2022/visually-hidden/radix-ng-primitives-visually-hidden.mjs +0 -5
  156. package/esm2022/visually-hidden/src/visually-hidden.directive.mjs +0 -42
  157. package/fesm2022/radix-ng-primitives-accordion.mjs +0 -394
  158. package/fesm2022/radix-ng-primitives-accordion.mjs.map +0 -1
  159. package/fesm2022/radix-ng-primitives-overlay.mjs +0 -399
  160. package/fesm2022/radix-ng-primitives-overlay.mjs.map +0 -1
  161. package/fesm2022/radix-ng-primitives-visually-hidden.mjs +0 -49
  162. package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +0 -1
  163. package/label/src/label.directive.d.ts +0 -19
  164. package/overlay/README.md +0 -1
  165. package/overlay/index.d.ts +0 -4
  166. package/overlay/src/overlay-arrow.directive.d.ts +0 -29
  167. package/overlay/src/overlay-arrow.token.d.ts +0 -3
  168. package/overlay/src/overlay-trigger.directive.d.ts +0 -163
  169. package/overlay/src/overlay-trigger.token.d.ts +0 -7
  170. package/overlay/src/overlay.directive.d.ts +0 -29
  171. package/overlay/src/overlay.token.d.ts +0 -3
  172. package/progress/src/progress.directive.d.ts +0 -26
  173. package/progress/src/progress.token.d.ts +0 -4
  174. package/radio/src/radio-group.token.d.ts +0 -4
  175. package/radio/src/radio-item.token.d.ts +0 -4
  176. package/roving-focus/src/roving-focus-group.token.d.ts +0 -7
  177. package/roving-focus/src/roving-focus-item.token.d.ts +0 -4
  178. package/switch/src/switch.directive.d.ts +0 -73
  179. package/switch/src/switch.token.d.ts +0 -4
  180. package/toggle/src/toggle.directive.d.ts +0 -30
  181. package/visually-hidden/README.md +0 -3
  182. package/visually-hidden/index.d.ts +0 -1
  183. package/visually-hidden/src/visually-hidden.directive.d.ts +0 -11
@@ -1,163 +0,0 @@
1
- import { StaticProvider, TemplateRef } from '@angular/core';
2
- import { Placement } from '@floating-ui/dom';
3
- import type { RdxOverlayArrowDirective } from './overlay-arrow.directive';
4
- import type { RdxOverlayDirective } from './overlay.directive';
5
- import * as i0 from "@angular/core";
6
- export declare class RdxOverlayTriggerDirective {
7
- /**
8
- * Access the application ref
9
- */
10
- private readonly appRef;
11
- /**
12
- * Access the component factory resolver
13
- */
14
- private readonly componentFactoryResolver;
15
- /**
16
- * Access the injector
17
- */
18
- private readonly injector;
19
- /**
20
- * Access the trigger element
21
- */
22
- private readonly trigger;
23
- /**
24
- * Access the view container
25
- */
26
- private readonly viewContainer;
27
- /**
28
- * Define the overlay to display when the trigger is activated.
29
- */
30
- templateRef: TemplateRef<void>;
31
- /**
32
- * Define if the trigger should be disabled.
33
- * @default false
34
- */
35
- disabled: boolean;
36
- /**
37
- * Define the placement of the overlay relative to the trigger.
38
- * @default 'bottom'
39
- */
40
- placement: Placement;
41
- /**
42
- * Define the offset of the overlay relative to the trigger.
43
- * @default 4
44
- */
45
- offset: number;
46
- /**
47
- * Define the delay before the overlay is displayed.
48
- * @default 0
49
- */
50
- showDelay: number;
51
- /**
52
- * Define the delay before the overlay is hidden.
53
- * @default 0
54
- */
55
- hideDelay: number;
56
- /**
57
- * Define whether the overlay should shift when the overlay is near the edge of the viewport.
58
- * @default true
59
- */
60
- shift: boolean;
61
- /**
62
- * Define whether the overlay should flip when there is not enough space for the overlay.
63
- * @default true
64
- */
65
- flip: boolean;
66
- /**
67
- * Define the container in to which the overlay should be attached.
68
- * @default document.body
69
- */
70
- container: HTMLElement;
71
- /**
72
- * Store the overlay content instance.
73
- */
74
- private overlay;
75
- /**
76
- * Store the overlay arrow instance.
77
- */
78
- private arrow;
79
- /**
80
- * Store the view ref
81
- */
82
- private viewRef;
83
- /**
84
- * Store the show delay timeout
85
- */
86
- private showDelayTimeout;
87
- /**
88
- * Store the hide delay timeout
89
- */
90
- private hideDelayTimeout;
91
- /**
92
- * Store the dispose function
93
- */
94
- private dispose?;
95
- /**
96
- * Store additional providers to register on the overlay.
97
- */
98
- private readonly providers;
99
- /**
100
- * Determine the state of the overlay.
101
- */
102
- private get isOpen();
103
- /**
104
- * Determine the state of the overlay.
105
- */
106
- protected get state(): 'closed' | 'opening' | 'open' | 'closing';
107
- /**
108
- * Create the overlay.
109
- */
110
- private createOverlay;
111
- /**
112
- * Update the overlay position.
113
- */
114
- private updateOverlayPosition;
115
- /**
116
- * Destroy the overlay.
117
- */
118
- private destroyOverlay;
119
- /**
120
- * Show the overlay.
121
- */
122
- show(): void;
123
- /**
124
- * Hide the overlay.
125
- */
126
- hide(): void;
127
- /**
128
- * Register the overlay.
129
- * @param overlay The overlay to register.
130
- * @internal
131
- */
132
- registerOverlay(overlay: RdxOverlayDirective): void;
133
- /**
134
- * Unregister the overlay.
135
- * @internal
136
- */
137
- unregisterOverlay(): void;
138
- /**
139
- * Register the arrow.
140
- * @param arrow The arrow to register.
141
- * @internal
142
- */
143
- registerArrow(arrow: RdxOverlayArrowDirective): void;
144
- /**
145
- * Unregister the arrow.
146
- * @internal
147
- */
148
- unregisterArrow(): void;
149
- /**
150
- * Register a provider on the overlay.
151
- * @param provider The provider to register.
152
- * @internal
153
- */
154
- registerProvider(provider: StaticProvider): void;
155
- static ɵfac: i0.ɵɵFactoryDeclaration<RdxOverlayTriggerDirective, never>;
156
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxOverlayTriggerDirective, "[rdxOverlayTrigger]", ["rdxOverlayTrigger"], { "templateRef": { "alias": "rdxOverlayTrigger"; "required": true; }; "disabled": { "alias": "rdxOverlayDisabled"; "required": false; }; "placement": { "alias": "rdxOverlayPlacement"; "required": false; }; "offset": { "alias": "rdxOverlayOffset"; "required": false; }; "showDelay": { "alias": "rdxOverlayShowDelay"; "required": false; }; "hideDelay": { "alias": "rdxOverlayHideDelay"; "required": false; }; "shift": { "alias": "rdxOverlayShift"; "required": false; }; "flip": { "alias": "rdxOverlayFlip"; "required": false; }; "container": { "alias": "rdxOverlayContainer"; "required": false; }; }, {}, never, never, true, never>;
157
- static ngAcceptInputType_disabled: unknown;
158
- static ngAcceptInputType_offset: unknown;
159
- static ngAcceptInputType_showDelay: unknown;
160
- static ngAcceptInputType_hideDelay: unknown;
161
- static ngAcceptInputType_shift: unknown;
162
- static ngAcceptInputType_flip: unknown;
163
- }
@@ -1,7 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import type { RdxOverlayTriggerDirective } from './overlay-trigger.directive';
3
- export declare const RdxOverlayTriggerToken: InjectionToken<RdxOverlayTriggerDirective>;
4
- /**
5
- * Inject the overlay trigger directive
6
- */
7
- export declare function injectOverlayTrigger(): RdxOverlayTriggerDirective;
@@ -1,29 +0,0 @@
1
- import { OnDestroy, OnInit } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class RdxOverlayDirective implements OnInit, OnDestroy {
4
- /**
5
- * Access the overlay element
6
- */
7
- private readonly elementRef;
8
- /**
9
- * Access the overlay trigger
10
- */
11
- private readonly overlayTrigger;
12
- /**
13
- * Register the overlay on init
14
- */
15
- ngOnInit(): void;
16
- /**
17
- * Unregister the overlay on destroy
18
- */
19
- ngOnDestroy(): void;
20
- /**
21
- * Set the position of the overlay
22
- * @param x The x position
23
- * @param y The y position
24
- * @internal
25
- */
26
- setPosition(x?: number, y?: number): void;
27
- static ɵfac: i0.ɵɵFactoryDeclaration<RdxOverlayDirective, never>;
28
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxOverlayDirective, "[rdxOverlay]", never, {}, {}, never, never, true, never>;
29
- }
@@ -1,3 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import type { RdxOverlayDirective } from './overlay.directive';
3
- export declare const RdxOverlayToken: InjectionToken<RdxOverlayDirective>;
@@ -1,26 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class RdxProgressDirective {
3
- /**
4
- * Define the progress value.
5
- */
6
- value: number;
7
- /**
8
- * Define the progress max value.
9
- * @default 100
10
- */
11
- max: number;
12
- /**
13
- * Define a function that returns the progress value label.
14
- */
15
- valueLabel: (value: number, max: number) => string;
16
- /**
17
- * Get the state of the progress bar.
18
- * @returns 'indeterminate' | 'loading' | 'complete'
19
- * @internal
20
- */
21
- get state(): 'indeterminate' | 'loading' | 'complete';
22
- static ɵfac: i0.ɵɵFactoryDeclaration<RdxProgressDirective, never>;
23
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxProgressDirective, "[rdxProgress]", never, { "value": { "alias": "rdxProgressValue"; "required": false; }; "max": { "alias": "rdxProgressMax"; "required": false; }; "valueLabel": { "alias": "rdxProgressValueLabel"; "required": false; }; }, {}, never, never, true, never>;
24
- static ngAcceptInputType_value: unknown;
25
- static ngAcceptInputType_max: unknown;
26
- }
@@ -1,4 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import type { RdxProgressDirective } from './progress.directive';
3
- export declare const RdxProgressToken: InjectionToken<RdxProgressDirective>;
4
- export declare function injectProgress(): RdxProgressDirective;
@@ -1,4 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import type { RdxRadioGroupDirective } from './radio-group.directive';
3
- export declare const RdxRadioGroupToken: InjectionToken<RdxRadioGroupDirective>;
4
- export declare function injectRadioGroup(): RdxRadioGroupDirective;
@@ -1,4 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import type { RdxRadioItemDirective } from './radio-item.directive';
3
- export declare const RdxRadioItemToken: InjectionToken<RdxRadioItemDirective>;
4
- export declare function injectRadioItem(): RdxRadioItemDirective;
@@ -1,7 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import type { RdxRovingFocusGroupDirective } from './roving-focus-group.directive';
3
- export declare const RdxRovingFocusGroupToken: InjectionToken<RdxRovingFocusGroupDirective>;
4
- /**
5
- * Inject the roving focus directive instance.
6
- */
7
- export declare function injectRovingFocusGroup(): RdxRovingFocusGroupDirective;
@@ -1,4 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import type { RdxRovingFocusItemDirective } from './roving-focus-item.directive';
3
- export declare const RdxRovingFocusItemToken: InjectionToken<RdxRovingFocusItemDirective>;
4
- export declare function injectRovingFocusItem(): RdxRovingFocusItemDirective;
@@ -1,73 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import { ControlValueAccessor } from '@angular/forms';
3
- import * as i0 from "@angular/core";
4
- export declare class RdxSwitchDirective implements ControlValueAccessor {
5
- /**
6
- * Access the element ref.
7
- */
8
- private readonly elementRef;
9
- /**
10
- * Determine if the switch is a button
11
- */
12
- protected isButton: boolean;
13
- /**
14
- * Determine if the switch is checked.
15
- * The controlled state of the switch.
16
- * @default false
17
- */
18
- checked: boolean;
19
- /**
20
- * Determine if the switch is disabled.
21
- * When true, prevents the user from interacting with the switch.
22
- * @default false
23
- */
24
- disabled: boolean;
25
- /**
26
- * Event emitted when the checked state changes.
27
- */
28
- readonly checkedChange: EventEmitter<boolean>;
29
- /**
30
- * Store the onChange callback.
31
- */
32
- private onChange?;
33
- /**
34
- * Store the onTouched callback.
35
- */
36
- protected onTouched?: () => void;
37
- /**
38
- * Register the onChange callback.
39
- * @param fn The onChange callback.
40
- * @internal
41
- */
42
- registerOnChange(fn: (checked: boolean) => void): void;
43
- /**
44
- * Register the onTouched callback.
45
- * @param fn The onTouched callback.
46
- * @internal
47
- */
48
- registerOnTouched(fn: () => void): void;
49
- /**
50
- * Write the value to the checked state.
51
- * @param checked The checked state.
52
- * @internal
53
- */
54
- writeValue(checked: boolean): void;
55
- /**
56
- * Set the disabled state.
57
- * @param isDisabled The disabled state.
58
- * @internal
59
- */
60
- setDisabledState(isDisabled: boolean): void;
61
- /**
62
- * Toggle the checked state.
63
- */
64
- toggle(): void;
65
- /**
66
- * Handle the keydown event.
67
- */
68
- protected onKeyDown(): void;
69
- static ɵfac: i0.ɵɵFactoryDeclaration<RdxSwitchDirective, never>;
70
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxSwitchDirective, "[rdxSwitch]", never, { "checked": { "alias": "checked"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "checkedChange": "checkedChange"; }, never, never, true, never>;
71
- static ngAcceptInputType_checked: unknown;
72
- static ngAcceptInputType_disabled: unknown;
73
- }
@@ -1,4 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import type { RdxSwitchDirective } from './switch.directive';
3
- export declare const RdxSwitchToken: InjectionToken<RdxSwitchDirective>;
4
- export declare function injectSwitch(): RdxSwitchDirective;
@@ -1,30 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class RdxToggleDirective {
4
- /**
5
- * Whether the toggle is pressed.
6
- * @default false
7
- */
8
- pressed: boolean;
9
- /**
10
- * Whether the toggle is disabled.
11
- * @default false
12
- */
13
- disabled: boolean;
14
- /**
15
- * Determine element id
16
- */
17
- id: string;
18
- /**
19
- * Event emitted when the toggle is pressed.
20
- */
21
- readonly pressedChange: EventEmitter<boolean>;
22
- /**
23
- * Toggle the pressed state.
24
- */
25
- toggle(): void;
26
- static ɵfac: i0.ɵɵFactoryDeclaration<RdxToggleDirective, never>;
27
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxToggleDirective, "button[rdxToggle]", never, { "pressed": { "alias": "rdxTogglePressed"; "required": false; }; "disabled": { "alias": "rdxToggleDisabled"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, { "pressedChange": "rdxToggleOnPressedChange"; }, never, never, true, never>;
28
- static ngAcceptInputType_pressed: unknown;
29
- static ngAcceptInputType_disabled: unknown;
30
- }
@@ -1,3 +0,0 @@
1
- # @radix-ng/primitives/visually-hidden
2
-
3
- Secondary entry point of `@radix-ng/primitives`. It can be used by importing from `@radix-ng/primitives/visually-hidden`.
@@ -1 +0,0 @@
1
- export * from './src/visually-hidden.directive';
@@ -1,11 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class RdxVisuallyHiddenDirective implements OnInit {
4
- /**
5
- * Access the element.
6
- */
7
- private readonly element;
8
- ngOnInit(): void;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<RdxVisuallyHiddenDirective, never>;
10
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxVisuallyHiddenDirective, "[rdxVisuallyHidden]", never, {}, {}, never, never, true, never>;
11
- }