@radix-ng/primitives 0.20.2 → 0.22.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 (82) hide show
  1. package/avatar/src/avatar-fallback.directive.d.ts +1 -1
  2. package/avatar/src/avatar-image.directive.d.ts +3 -3
  3. package/compodoc/documentation.json +6879 -2567
  4. package/core/index.d.ts +1 -0
  5. package/core/src/id-generator.d.ts +12 -0
  6. package/esm2022/avatar/src/avatar-fallback.directive.mjs +6 -8
  7. package/esm2022/avatar/src/avatar-image.directive.mjs +4 -3
  8. package/esm2022/core/index.mjs +2 -1
  9. package/esm2022/core/src/create-inject-context/index.mjs +2 -2
  10. package/esm2022/core/src/id-generator.mjs +43 -0
  11. package/esm2022/popover/index.mjs +14 -4
  12. package/esm2022/popover/src/popover-anchor.directive.mjs +70 -0
  13. package/esm2022/popover/src/popover-anchor.token.mjs +3 -0
  14. package/esm2022/popover/src/popover-arrow.directive.mjs +12 -7
  15. package/esm2022/popover/src/popover-close.directive.mjs +16 -4
  16. package/esm2022/popover/src/popover-close.token.mjs +3 -0
  17. package/esm2022/popover/src/popover-content-attributes.component.mjs +70 -0
  18. package/esm2022/popover/src/popover-content-attributes.token.mjs +3 -0
  19. package/esm2022/popover/src/popover-content.directive.mjs +120 -84
  20. package/esm2022/popover/src/popover-root.directive.mjs +232 -64
  21. package/esm2022/popover/src/popover-root.inject.mjs +4 -4
  22. package/esm2022/popover/src/popover-trigger.directive.mjs +5 -7
  23. package/esm2022/popover/src/popover.types.mjs +18 -1
  24. package/esm2022/popover/src/popover.utils.mjs +4 -6
  25. package/esm2022/switch/src/switch-input.directive.mjs +16 -7
  26. package/esm2022/switch/src/switch-root.directive.mjs +59 -14
  27. package/esm2022/switch/src/switch-thumb.directive.mjs +3 -3
  28. package/esm2022/tabs/index.mjs +3 -6
  29. package/esm2022/tabs/src/tabs-content.directive.mjs +14 -8
  30. package/esm2022/tabs/src/tabs-list.directive.mjs +9 -6
  31. package/esm2022/tabs/src/tabs-root.directive.mjs +40 -37
  32. package/esm2022/tabs/src/tabs-trigger.directive.mjs +43 -17
  33. package/esm2022/tabs/src/utils.mjs +7 -0
  34. package/esm2022/toggle/index.mjs +2 -2
  35. package/esm2022/toggle/src/toggle-visually-hidden-input.directive.mjs +31 -0
  36. package/esm2022/toggle/src/toggle.directive.mjs +39 -8
  37. package/esm2022/toggle-group/src/toggle-group-item.directive.mjs +4 -3
  38. package/fesm2022/radix-ng-primitives-avatar.mjs +8 -9
  39. package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
  40. package/fesm2022/radix-ng-primitives-core.mjs +44 -3
  41. package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
  42. package/fesm2022/radix-ng-primitives-popover.mjs +672 -303
  43. package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
  44. package/fesm2022/radix-ng-primitives-switch.mjs +76 -22
  45. package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
  46. package/fesm2022/radix-ng-primitives-tabs.mjs +109 -109
  47. package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
  48. package/fesm2022/radix-ng-primitives-toggle-group.mjs +3 -2
  49. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
  50. package/fesm2022/radix-ng-primitives-toggle.mjs +47 -15
  51. package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
  52. package/package.json +1 -1
  53. package/popover/index.d.ts +5 -1
  54. package/popover/src/popover-anchor.directive.d.ts +28 -0
  55. package/popover/src/popover-anchor.token.d.ts +3 -0
  56. package/popover/src/popover-arrow.directive.d.ts +8 -5
  57. package/popover/src/popover-close.directive.d.ts +1 -1
  58. package/popover/src/popover-close.token.d.ts +3 -0
  59. package/popover/src/popover-content-attributes.component.d.ts +17 -0
  60. package/popover/src/popover-content-attributes.token.d.ts +3 -0
  61. package/popover/src/popover-content.directive.d.ts +36 -23
  62. package/popover/src/popover-root.directive.d.ts +89 -18
  63. package/popover/src/popover-root.inject.d.ts +2 -1
  64. package/popover/src/popover-trigger.directive.d.ts +3 -5
  65. package/popover/src/popover.types.d.ts +14 -3
  66. package/switch/src/switch-input.directive.d.ts +2 -0
  67. package/switch/src/switch-root.directive.d.ts +33 -5
  68. package/tabs/index.d.ts +0 -1
  69. package/tabs/src/tabs-content.directive.d.ts +6 -1
  70. package/tabs/src/tabs-list.directive.d.ts +6 -2
  71. package/tabs/src/tabs-root.directive.d.ts +25 -9
  72. package/tabs/src/tabs-trigger.directive.d.ts +13 -3
  73. package/tabs/src/utils.d.ts +2 -0
  74. package/toggle/index.d.ts +2 -2
  75. package/toggle/src/toggle-visually-hidden-input.directive.d.ts +6 -0
  76. package/toggle/src/toggle.directive.d.ts +20 -2
  77. package/esm2022/popover/src/popover-root.token.mjs +0 -3
  78. package/esm2022/tabs/src/tabs-context.service.mjs +0 -43
  79. package/esm2022/toggle/src/toggle-input.directive.mjs +0 -30
  80. package/popover/src/popover-root.token.d.ts +0 -3
  81. package/tabs/src/tabs-context.service.d.ts +0 -22
  82. package/toggle/src/toggle-input.directive.d.ts +0 -6
@@ -1,23 +1,52 @@
1
- import { OnInit, ViewContainerRef } from '@angular/core';
1
+ import { BooleanInput } from '@angular/cdk/coercion';
2
+ import { DestroyRef, ViewContainerRef } from '@angular/core';
3
+ import { RdxPopoverAnchorDirective } from './popover-anchor.directive';
2
4
  import { RdxPopoverContentDirective } from './popover-content.directive';
3
5
  import { RdxPopoverTriggerDirective } from './popover-trigger.directive';
4
- import { RdxPopoverState } from './popover.types';
6
+ import { RdxPopoverAnimationStatus, RdxPopoverAttachDetachEvent, RdxPopoverState } from './popover.types';
5
7
  import * as i0 from "@angular/core";
6
- export declare class RdxPopoverRootDirective implements OnInit {
8
+ export declare class RdxPopoverRootDirective {
9
+ /** @ignore */
7
10
  readonly uniqueId: import("@angular/core").WritableSignal<number>;
11
+ /** @ignore */
8
12
  readonly name: import("@angular/core").Signal<string>;
9
13
  /**
10
- * The open state of the popover when it is initially rendered. Use when you do not need to control its open state.
14
+ * @description The anchor directive that comes form outside the popover root
15
+ * @default undefined
16
+ */
17
+ readonly anchor: import("@angular/core").InputSignal<RdxPopoverAnchorDirective | undefined>;
18
+ /**
19
+ * @description The open state of the popover when it is initially rendered. Use when you do not need to control its open state.
20
+ * @default false
11
21
  */
12
22
  readonly defaultOpen: import("@angular/core").InputSignal<boolean>;
13
23
  /**
14
- * The controlled open state of the popover. Must be used in conjunction with onOpenChange.
24
+ * @description The controlled state of the popover. `open` input take precedence of `defaultOpen` input.
25
+ * @default undefined
15
26
  */
16
27
  readonly open: import("@angular/core").InputSignal<boolean | undefined>;
17
28
  /**
18
- * Event handler called when the open state of the popover changes.
29
+ * @description Whether to control the state of the popover from external. Use in conjunction with `open` input.
30
+ * @default undefined
31
+ */
32
+ readonly externalControl: import("@angular/core").InputSignal<boolean | undefined>;
33
+ /**
34
+ * @description Whether to take into account CSS opening/closing animations.
35
+ * @default false
36
+ */
37
+ readonly cssAnimation: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
38
+ /**
39
+ * @description Whether to take into account CSS opening animations. `cssAnimation` input must be set to 'true'
40
+ * @default false
41
+ */
42
+ readonly cssOpeningAnimation: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
43
+ /**
44
+ * @description Whether to take into account CSS closing animations. `cssAnimation` input must be set to 'true'
45
+ * @default false
19
46
  */
20
- readonly onOpenChange: import("@angular/core").OutputEmitterRef<boolean>;
47
+ readonly cssClosingAnimation: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
48
+ /** @ignore */
49
+ readonly cssAnimationStatus: import("@angular/core").WritableSignal<RdxPopoverAnimationStatus | null>;
21
50
  /** @ignore */
22
51
  readonly popoverContentDirective: import("@angular/core").Signal<RdxPopoverContentDirective>;
23
52
  /** @ignore */
@@ -25,20 +54,38 @@ export declare class RdxPopoverRootDirective implements OnInit {
25
54
  /** @ignore */
26
55
  readonly popoverArrowDirective: import("@angular/core").Signal<import("@radix-ng/primitives/popover").RdxPopoverArrowDirective | undefined>;
27
56
  /** @ignore */
57
+ readonly popoverCloseDirective: import("@angular/core").Signal<import("@radix-ng/primitives/popover").RdxPopoverCloseDirective | undefined>;
58
+ /** @ignore */
59
+ readonly popoverContentAttributesComponent: import("@angular/core").Signal<import("@radix-ng/primitives/popover").RdxPopoverContentAttributesComponent | undefined>;
60
+ /** @ignore */
61
+ private readonly internalPopoverAnchorDirective;
62
+ /** @ignore */
28
63
  readonly viewContainerRef: ViewContainerRef;
29
64
  /** @ignore */
30
- private readonly document;
65
+ readonly destroyRef: DestroyRef;
31
66
  /** @ignore */
32
- readonly isOpen: import("@angular/core").WritableSignal<boolean>;
67
+ readonly state: import("@angular/core").WritableSignal<RdxPopoverState>;
33
68
  /** @ignore */
34
- readonly state: import("@angular/core").Signal<RdxPopoverState>;
69
+ readonly attachDetachEvent: import("@angular/core").WritableSignal<RdxPopoverAttachDetachEvent>;
35
70
  /** @ignore */
36
- private isControlledExternally;
71
+ private isFirstDefaultOpen;
72
+ /** @ignore */
73
+ readonly popoverAnchorDirective: import("@angular/core").Signal<RdxPopoverAnchorDirective | undefined>;
37
74
  constructor();
38
75
  /** @ignore */
39
- ngOnInit(): void;
76
+ getAnimationParamsSnapshot(): {
77
+ cssAnimation: boolean;
78
+ cssOpeningAnimation: boolean;
79
+ cssClosingAnimation: boolean;
80
+ cssAnimationStatus: RdxPopoverAnimationStatus | null;
81
+ attachDetachEvent: RdxPopoverAttachDetachEvent;
82
+ state: RdxPopoverState;
83
+ canEmitOnOpenOrOnClosed: boolean;
84
+ };
85
+ /** @ignore */
86
+ controlledExternally(): import("@angular/core").InputSignal<boolean | undefined>;
40
87
  /** @ignore */
41
- controlledExternally(): import("@angular/core").Signal<boolean>;
88
+ firstDefaultOpen(): boolean;
42
89
  /** @ignore */
43
90
  handleOpen(): void;
44
91
  /** @ignore */
@@ -46,15 +93,39 @@ export declare class RdxPopoverRootDirective implements OnInit {
46
93
  /** @ignore */
47
94
  handleToggle(): void;
48
95
  /** @ignore */
49
- private setOpen;
96
+ isOpen(state?: RdxPopoverState): boolean;
97
+ /** @ignore */
98
+ private setState;
99
+ /** @ignore */
100
+ private openContent;
101
+ /** @ignore */
102
+ private closeContent;
103
+ /** @ignore */
104
+ private emitOnOpen;
105
+ /** @ignore */
106
+ private emitOnClosed;
50
107
  /** @ignore */
51
- private show;
108
+ private ifOpenOrCloseWithoutAnimations;
52
109
  /** @ignore */
53
- private hide;
110
+ private ifOpenOrCloseWithAnimations;
54
111
  /** @ignore */
55
- private onIsOpenChangeEffect;
112
+ private openOrClose;
113
+ /** @ignore */
114
+ private emitOnOpenOrOnClosed;
115
+ /** @ignore */
116
+ private canEmitOnOpenOrOnClosed;
117
+ /** @ignore */
118
+ private onStateChangeEffect;
119
+ /** @ignore */
120
+ private onCssAnimationStatusChangeChangeEffect;
121
+ /** @ignore */
122
+ private emitOpenOrClosedEventEffect;
56
123
  /** @ignore */
57
124
  private onOpenChangeEffect;
125
+ /** @ignore */
126
+ private onIsFirstDefaultOpenChangeEffect;
127
+ /** @ignore */
128
+ private onAnchorChangeEffect;
58
129
  static ɵfac: i0.ɵɵFactoryDeclaration<RdxPopoverRootDirective, never>;
59
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxPopoverRootDirective, "[rdxPopoverRoot]", ["rdxPopoverRoot"], { "defaultOpen": { "alias": "defaultOpen"; "required": false; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; }, { "onOpenChange": "onOpenChange"; }, ["popoverContentDirective", "popoverTriggerDirective", "popoverArrowDirective"], never, true, never>;
130
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxPopoverRootDirective, "[rdxPopoverRoot]", ["rdxPopoverRoot"], { "anchor": { "alias": "anchor"; "required": false; "isSignal": true; }; "defaultOpen": { "alias": "defaultOpen"; "required": false; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; "externalControl": { "alias": "externalControl"; "required": false; "isSignal": true; }; "cssAnimation": { "alias": "cssAnimation"; "required": false; "isSignal": true; }; "cssOpeningAnimation": { "alias": "cssOpeningAnimation"; "required": false; "isSignal": true; }; "cssClosingAnimation": { "alias": "cssClosingAnimation"; "required": false; "isSignal": true; }; }, {}, ["popoverContentDirective", "popoverTriggerDirective", "popoverArrowDirective", "popoverCloseDirective", "popoverContentAttributesComponent", "internalPopoverAnchorDirective"], never, true, never>;
60
131
  }
@@ -1,2 +1,3 @@
1
1
  import { RdxPopoverRootDirective } from './popover-root.directive';
2
- export declare function injectPopoverRoot(): RdxPopoverRootDirective;
2
+ export declare function injectPopoverRoot(optional?: false): RdxPopoverRootDirective;
3
+ export declare function injectPopoverRoot(optional: true): RdxPopoverRootDirective | null;
@@ -4,17 +4,15 @@ import * as i0 from "@angular/core";
4
4
  import * as i1 from "@angular/cdk/overlay";
5
5
  export declare class RdxPopoverTriggerDirective {
6
6
  /** @ignore */
7
- readonly popoverRoot: import("@radix-ng/primitives/popover").RdxPopoverRootDirective;
7
+ protected readonly popoverRoot: import("@radix-ng/primitives/popover").RdxPopoverRootDirective;
8
8
  /** @ignore */
9
- readonly elementRef: ElementRef<any>;
9
+ readonly elementRef: ElementRef<HTMLElement>;
10
10
  /** @ignore */
11
11
  readonly overlayOrigin: CdkOverlayOrigin;
12
12
  /** @ignore */
13
13
  readonly name: import("@angular/core").Signal<string>;
14
14
  /** @ignore */
15
- readonly controlsId: import("@angular/core").Signal<string>;
16
- /** @ignore */
17
- onClick(): void;
15
+ click(): void;
18
16
  static ɵfac: i0.ɵɵFactoryDeclaration<RdxPopoverTriggerDirective, never>;
19
17
  static ɵdir: i0.ɵɵDirectiveDeclaration<RdxPopoverTriggerDirective, "[rdxPopoverTrigger]", never, {}, {}, never, never, true, [{ directive: typeof i1.CdkOverlayOrigin; inputs: {}; outputs: {}; }]>;
20
18
  }
@@ -10,7 +10,20 @@ export declare enum RdxPopoverAlign {
10
10
  Center = "center",
11
11
  End = "end"
12
12
  }
13
- export type RdxPopoverState = 'open' | 'closed';
13
+ export declare enum RdxPopoverState {
14
+ OPEN = "open",
15
+ CLOSED = "closed"
16
+ }
17
+ export declare enum RdxPopoverAttachDetachEvent {
18
+ ATTACH = "attach",
19
+ DETACH = "detach"
20
+ }
21
+ export declare enum RdxPopoverAnimationStatus {
22
+ OPEN_STARTED = "open_started",
23
+ OPEN_ENDED = "open_ended",
24
+ CLOSED_STARTED = "closed_started",
25
+ CLOSED_ENDED = "closed_ended"
26
+ }
14
27
  export type RdxSideAndAlign = {
15
28
  side: RdxPopoverSide;
16
29
  align: RdxPopoverAlign;
@@ -27,8 +40,6 @@ export type RdxPopoverPositions = {
27
40
  export type RdxAllPossibleConnectedPositions = ReadonlyMap<`${RdxPopoverSide}|${RdxPopoverAlign}`, ConnectionPositionPair>;
28
41
  export type RdxArrowPositionParams = {
29
42
  top: string;
30
- bottom: string;
31
43
  left: string;
32
- right: string;
33
44
  transform: string;
34
45
  };
@@ -1,6 +1,8 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class RdxSwitchInputDirective {
3
3
  protected readonly switchRoot: import("./switch-root.directive").RdxSwitchRootDirective;
4
+ /** @ignore */
5
+ protected onBlur(): void;
4
6
  static ɵfac: i0.ɵɵFactoryDeclaration<RdxSwitchInputDirective, never>;
5
7
  static ɵdir: i0.ɵɵDirectiveDeclaration<RdxSwitchInputDirective, "input[rdxSwitchInput]", ["rdxSwitchInput"], {}, {}, never, never, true, never>;
6
8
  }
@@ -1,39 +1,67 @@
1
1
  import { BooleanInput } from '@angular/cdk/coercion';
2
2
  import { InjectionToken, InputSignalWithTransform, ModelSignal, OutputEmitterRef } from '@angular/core';
3
+ import { ControlValueAccessor } from '@angular/forms';
3
4
  import * as i0 from "@angular/core";
4
5
  export declare const RdxSwitchToken: InjectionToken<RdxSwitchRootDirective>;
5
6
  export declare function injectSwitch(): RdxSwitchRootDirective;
7
+ export declare const SWITCH_VALUE_ACCESSOR: any;
6
8
  export interface SwitchProps {
7
9
  checked?: ModelSignal<boolean>;
8
- defaultChecked?: boolean;
10
+ defaultChecked?: InputSignalWithTransform<boolean, BooleanInput>;
9
11
  required?: InputSignalWithTransform<boolean, BooleanInput>;
10
12
  onCheckedChange?: OutputEmitterRef<boolean>;
11
13
  }
12
- export declare class RdxSwitchRootDirective implements SwitchProps {
13
- readonly id: import("@angular/core").InputSignal<string>;
14
+ export declare class RdxSwitchRootDirective implements SwitchProps, ControlValueAccessor {
15
+ readonly id: import("@angular/core").InputSignal<string | null>;
14
16
  protected readonly elementId: import("@angular/core").Signal<string | null>;
17
+ readonly inputId: import("@angular/core").InputSignal<string | null>;
15
18
  /**
16
19
  * When true, indicates that the user must check the switch before the owning form can be submitted.
17
20
  */
18
21
  readonly required: InputSignalWithTransform<boolean, BooleanInput>;
22
+ readonly ariaLabelledBy: import("@angular/core").InputSignal<string | null>;
23
+ readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
19
24
  /**
20
25
  * The controlled state of the switch. Must be used in conjunction with onCheckedChange.
21
26
  */
22
27
  readonly checked: ModelSignal<boolean>;
28
+ readonly defaultChecked: InputSignalWithTransform<boolean, BooleanInput>;
29
+ /**
30
+ * The state of the switch.
31
+ * If `defaultChecked` is provided, it takes precedence over the `checked` state.
32
+ * @ignore
33
+ */
34
+ readonly checkedState: import("@angular/core").Signal<boolean>;
23
35
  /**
24
36
  * When true, prevents the user from interacting with the switch.
25
37
  */
26
38
  readonly disabled: InputSignalWithTransform<boolean, BooleanInput>;
39
+ /** @ignore */
27
40
  readonly disabledState: import("@angular/core").Signal<boolean>;
28
41
  /**
29
42
  * Event handler called when the state of the switch changes.
30
43
  */
31
44
  readonly onCheckedChange: OutputEmitterRef<boolean>;
45
+ private readonly defaultCheckedUsed;
46
+ constructor();
32
47
  /**
33
48
  * Toggles the checked state of the switch.
34
49
  * If the switch is disabled, the function returns early.
50
+ * @ignore
35
51
  */
36
- protected toggle(): void;
52
+ toggle(): void;
53
+ private readonly accessorDisabled;
54
+ private onChange;
55
+ /** @ignore */
56
+ onTouched: (() => void) | undefined;
57
+ /** @ignore */
58
+ writeValue(value: any): void;
59
+ /** @ignore */
60
+ registerOnChange(fn: (value: any) => void): void;
61
+ /** @ignore */
62
+ registerOnTouched(fn: () => void): void;
63
+ /** @ignore */
64
+ setDisabledState(isDisabled: boolean): void;
37
65
  static ɵfac: i0.ɵɵFactoryDeclaration<RdxSwitchRootDirective, never>;
38
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxSwitchRootDirective, "button[rdxSwitchRoot]", ["rdxSwitchRoot"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "onCheckedChange": "onCheckedChange"; }, never, never, true, never>;
66
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxSwitchRootDirective, "button[rdxSwitchRoot]", ["rdxSwitchRoot"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "defaultChecked": { "alias": "defaultChecked"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "onCheckedChange": "onCheckedChange"; }, never, never, true, never>;
39
67
  }
package/tabs/index.d.ts CHANGED
@@ -4,7 +4,6 @@ import * as i2 from "./src/tabs-content.directive";
4
4
  import * as i3 from "./src/tabs-list.directive";
5
5
  import * as i4 from "./src/tabs-trigger.directive";
6
6
  export * from './src/tabs-content.directive';
7
- export * from './src/tabs-context.service';
8
7
  export * from './src/tabs-list.directive';
9
8
  export * from './src/tabs-root.directive';
10
9
  export * from './src/tabs-trigger.directive';
@@ -1,7 +1,12 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class RdxTabsContentDirective {
3
- protected readonly tabsContext: import("./tabs-context.service").RdxTabsContextService;
3
+ protected readonly tabsContext: import("./tabs-root.directive").RdxTabsRootDirective;
4
+ /**
5
+ * A unique value that associates the content with a trigger.
6
+ */
4
7
  readonly value: import("@angular/core").InputSignal<string>;
8
+ protected readonly contentId: import("@angular/core").Signal<string>;
9
+ protected readonly triggerId: import("@angular/core").Signal<string>;
5
10
  protected readonly selected: import("@angular/core").Signal<boolean>;
6
11
  static ɵfac: i0.ɵɵFactoryDeclaration<RdxTabsContentDirective, never>;
7
12
  static ɵdir: i0.ɵɵDirectiveDeclaration<RdxTabsContentDirective, "[rdxTabsContent]", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
@@ -1,6 +1,10 @@
1
1
  import * as i0 from "@angular/core";
2
+ import * as i1 from "@radix-ng/primitives/roving-focus";
3
+ export interface TabsListProps {
4
+ loop?: boolean;
5
+ }
2
6
  export declare class RdxTabsListDirective {
3
- protected readonly tabsContext: import("./tabs-context.service").RdxTabsContextService;
7
+ protected readonly tabsContext: import("./tabs-root.directive").RdxTabsRootDirective;
4
8
  static ɵfac: i0.ɵɵFactoryDeclaration<RdxTabsListDirective, never>;
5
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxTabsListDirective, "[rdxTabsList]", never, {}, {}, never, never, true, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxTabsListDirective, "[rdxTabsList]", never, {}, {}, never, never, true, [{ directive: typeof i1.RdxRovingFocusGroupDirective; inputs: { "dir": "dir"; "orientation": "orientation"; "loop": "loop"; }; outputs: {}; }]>;
6
10
  }
@@ -1,4 +1,4 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
1
+ import { InjectionToken, OnInit } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  export interface TabsProps {
4
4
  /** The value for the selected tab, if controlled */
@@ -23,15 +23,31 @@ export interface TabsProps {
23
23
  * */
24
24
  activationMode?: 'automatic' | 'manual';
25
25
  }
26
+ export type DataOrientation = 'vertical' | 'horizontal';
27
+ export declare const RDX_TABS_ROOT_TOKEN: InjectionToken<RdxTabsRootDirective>;
26
28
  export declare class RdxTabsRootDirective implements OnInit {
27
- private readonly tabsContext;
28
- value?: string;
29
- defaultValue?: string;
30
- orientation: string;
31
- dir?: string;
32
- onValueChange: EventEmitter<string>;
33
- constructor();
29
+ /**
30
+ * The controlled value of the tab to activate. Should be used in conjunction with `onValueChange`.
31
+ */
32
+ readonly value: import("@angular/core").ModelSignal<string | undefined>;
33
+ readonly defaultValue: import("@angular/core").InputSignal<string | undefined>;
34
+ /**
35
+ * When automatic, tabs are activated when receiving focus. When manual, tabs are activated when clicked.
36
+ */
37
+ readonly activationMode: import("@angular/core").InputSignal<"automatic" | "manual">;
38
+ /**
39
+ * The orientation of the component.
40
+ */
41
+ readonly orientation: import("@angular/core").InputSignal<DataOrientation>;
42
+ readonly dir: import("@angular/core").InputSignal<string>;
43
+ /**
44
+ * Event handler called when the value changes.
45
+ */
46
+ readonly onValueChange: import("@angular/core").OutputEmitterRef<string>;
34
47
  ngOnInit(): void;
48
+ select(value: string): void;
49
+ /** @ignore */
50
+ getBaseId(): string;
35
51
  static ɵfac: i0.ɵɵFactoryDeclaration<RdxTabsRootDirective, never>;
36
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxTabsRootDirective, "[rdxTabsRoot]", never, { "value": { "alias": "value"; "required": false; }; "defaultValue": { "alias": "defaultValue"; "required": false; }; "orientation": { "alias": "orientation"; "required": false; }; "dir": { "alias": "dir"; "required": false; }; }, { "onValueChange": "onValueChange"; }, never, never, true, never>;
52
+ static ɵdir: i0.ɵɵ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>;
37
53
  }
@@ -1,19 +1,29 @@
1
1
  import { BooleanInput } from '@angular/cdk/coercion';
2
2
  import { InputSignalWithTransform } from '@angular/core';
3
3
  import * as i0 from "@angular/core";
4
+ import * as i1 from "@radix-ng/primitives/roving-focus";
4
5
  interface TabsTriggerProps {
5
6
  disabled: InputSignalWithTransform<boolean, BooleanInput>;
6
7
  }
7
8
  export declare class RdxTabsTriggerDirective implements TabsTriggerProps {
8
- protected readonly tabsContext: import("./tabs-context.service").RdxTabsContextService;
9
+ private readonly rdxRovingFocusItemDirective;
10
+ protected readonly tabsContext: import("./tabs-root.directive").RdxTabsRootDirective;
11
+ /**
12
+ * A unique value that associates the trigger with a content.
13
+ */
9
14
  readonly value: import("@angular/core").InputSignal<string>;
15
+ /**
16
+ * When true, prevents the user from interacting with the tab.
17
+ */
10
18
  readonly disabled: InputSignalWithTransform<boolean, BooleanInput>;
11
19
  protected readonly contentId: import("@angular/core").Signal<string>;
12
20
  protected readonly triggerId: import("@angular/core").Signal<string>;
13
- protected readonly selected: import("@angular/core").Signal<boolean>;
21
+ protected readonly isSelected: import("@angular/core").Signal<boolean>;
22
+ constructor();
14
23
  protected onMouseDown(event: MouseEvent): void;
15
24
  protected onKeyDown(event: KeyboardEvent): void;
25
+ protected onFocus(): void;
16
26
  static ɵfac: i0.ɵɵFactoryDeclaration<RdxTabsTriggerDirective, never>;
17
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxTabsTriggerDirective, "[rdxTabsTrigger]", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
27
+ static ɵdir: i0.ɵɵ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: {}; }]>;
18
28
  }
19
29
  export {};
@@ -0,0 +1,2 @@
1
+ export declare function makeTriggerId(baseId: string, value: string | number): string;
2
+ export declare function makeContentId(baseId: string, value: string | number): string;
package/toggle/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from './src/toggle-input.directive';
1
+ export * from './src/toggle-visually-hidden-input.directive';
2
2
  export * from './src/toggle.directive';
3
- export type { ToggleProps } from './src/toggle.directive';
3
+ export type { DataState, ToggleProps } from './src/toggle.directive';
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "@radix-ng/primitives/visually-hidden";
3
+ export declare class RdxToggleVisuallyHiddenInputDirective {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxToggleVisuallyHiddenInputDirective, never>;
5
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxToggleVisuallyHiddenInputDirective, "input[rdxToggleVisuallyHiddenInput]", ["rdxToggleVisuallyHiddenInput"], {}, {}, never, never, true, [{ directive: typeof i1.RdxVisuallyHiddenInputDirective; inputs: { "name": "name"; "required": "required"; "value": "value"; "disabled": "disabled"; }; outputs: {}; }]>;
6
+ }
@@ -1,5 +1,6 @@
1
1
  import { BooleanInput } from '@angular/cdk/coercion';
2
2
  import { OutputEmitterRef } from '@angular/core';
3
+ import { ControlValueAccessor } from '@angular/forms';
3
4
  import * as i0 from "@angular/core";
4
5
  export interface ToggleProps {
5
6
  /**
@@ -22,7 +23,9 @@ export interface ToggleProps {
22
23
  */
23
24
  disabled?: boolean;
24
25
  }
25
- export declare class RdxToggleDirective {
26
+ export type DataState = 'on' | 'off';
27
+ export declare const TOGGLE_VALUE_ACCESSOR: any;
28
+ export declare class RdxToggleDirective implements ControlValueAccessor {
26
29
  /**
27
30
  * The pressed state of the toggle when it is initially rendered.
28
31
  * Use when you do not need to control its pressed state.
@@ -37,11 +40,26 @@ export declare class RdxToggleDirective {
37
40
  * When true, prevents the user from interacting with the toggle.
38
41
  */
39
42
  readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
43
+ /** @ignore */
44
+ readonly disabledState: import("@angular/core").Signal<boolean>;
45
+ protected readonly dataState: import("@angular/core").Signal<DataState>;
40
46
  /**
41
47
  * Event handler called when the pressed state of the toggle changes.
42
48
  */
43
49
  readonly onPressedChange: OutputEmitterRef<boolean>;
44
- protected toggle(): void;
50
+ protected togglePressed(): void;
51
+ private readonly accessorDisabled;
52
+ private onChange;
53
+ /** @ignore */
54
+ onTouched: (() => void) | undefined;
55
+ /** @ignore */
56
+ writeValue(value: any): void;
57
+ /** @ignore */
58
+ registerOnChange(fn: (value: any) => void): void;
59
+ /** @ignore */
60
+ registerOnTouched(fn: () => void): void;
61
+ /** @ignore */
62
+ setDisabledState(isDisabled: boolean): void;
45
63
  static ɵfac: i0.ɵɵFactoryDeclaration<RdxToggleDirective, never>;
46
64
  static ɵdir: i0.ɵɵ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, never>;
47
65
  }
@@ -1,3 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- export const RdxPopoverRootToken = new InjectionToken('RdxPopoverRootToken');
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9wb3Zlci1yb290LnRva2VuLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvcHJpbWl0aXZlcy9wb3BvdmVyL3NyYy9wb3BvdmVyLXJvb3QudG9rZW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUcvQyxNQUFNLENBQUMsTUFBTSxtQkFBbUIsR0FBRyxJQUFJLGNBQWMsQ0FBMEIscUJBQXFCLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEluamVjdGlvblRva2VuIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBSZHhQb3BvdmVyUm9vdERpcmVjdGl2ZSB9IGZyb20gJy4vcG9wb3Zlci1yb290LmRpcmVjdGl2ZSc7XG5cbmV4cG9ydCBjb25zdCBSZHhQb3BvdmVyUm9vdFRva2VuID0gbmV3IEluamVjdGlvblRva2VuPFJkeFBvcG92ZXJSb290RGlyZWN0aXZlPignUmR4UG9wb3ZlclJvb3RUb2tlbicpO1xuIl19
@@ -1,43 +0,0 @@
1
- import { computed, Injectable, InjectionToken, signal } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export const TABS_CONTEXT_TOKEN = new InjectionToken('TabsContext');
4
- export class RdxTabsContextService {
5
- constructor() {
6
- this.baseId = this.generateId();
7
- this.value = signal(undefined);
8
- this.orientation = signal('horizontal');
9
- this.dir = signal(undefined);
10
- this.activationMode = signal('automatic');
11
- this.value$ = computed(() => this.value());
12
- this.orientation$ = computed(() => this.orientation());
13
- this.dir$ = computed(() => this.dir());
14
- this.activationMode$ = computed(() => this.activationMode());
15
- }
16
- setValue(value) {
17
- this.value.set(value);
18
- }
19
- setOrientation(orientation) {
20
- this.orientation.set(orientation);
21
- }
22
- setDir(dir) {
23
- this.dir.set(dir);
24
- }
25
- setActivationMode(mode) {
26
- this.activationMode.set(mode);
27
- }
28
- getBaseId() {
29
- return this.baseId;
30
- }
31
- generateId() {
32
- return `tabs-${Math.random().toString(36).substr(2, 9)}`;
33
- }
34
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxTabsContextService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
35
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxTabsContextService, providedIn: 'root' }); }
36
- }
37
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxTabsContextService, decorators: [{
38
- type: Injectable,
39
- args: [{
40
- providedIn: 'root'
41
- }]
42
- }] });
43
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFicy1jb250ZXh0LnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9wcmltaXRpdmVzL3RhYnMvc3JjL3RhYnMtY29udGV4dC5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsVUFBVSxFQUFFLGNBQWMsRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBRTdFLE1BQU0sQ0FBQyxNQUFNLGtCQUFrQixHQUFHLElBQUksY0FBYyxDQUF3QixhQUFhLENBQUMsQ0FBQztBQUszRixNQUFNLE9BQU8scUJBQXFCO0lBSGxDO1FBSVksV0FBTSxHQUFHLElBQUksQ0FBQyxVQUFVLEVBQUUsQ0FBQztRQUMzQixVQUFLLEdBQUcsTUFBTSxDQUFxQixTQUFTLENBQUMsQ0FBQztRQUM5QyxnQkFBVyxHQUFHLE1BQU0sQ0FBUyxZQUFZLENBQUMsQ0FBQztRQUMzQyxRQUFHLEdBQUcsTUFBTSxDQUFxQixTQUFTLENBQUMsQ0FBQztRQUM1QyxtQkFBYyxHQUFHLE1BQU0sQ0FBUyxXQUFXLENBQUMsQ0FBQztRQUU1QyxXQUFNLEdBQUcsUUFBUSxDQUFDLEdBQUcsRUFBRSxDQUFDLElBQUksQ0FBQyxLQUFLLEVBQUUsQ0FBQyxDQUFDO1FBQ3RDLGlCQUFZLEdBQUcsUUFBUSxDQUFDLEdBQUcsRUFBRSxDQUFDLElBQUksQ0FBQyxXQUFXLEVBQUUsQ0FBQyxDQUFDO1FBQ2xELFNBQUksR0FBRyxRQUFRLENBQUMsR0FBRyxFQUFFLENBQUMsSUFBSSxDQUFDLEdBQUcsRUFBRSxDQUFDLENBQUM7UUFDbEMsb0JBQWUsR0FBRyxRQUFRLENBQUMsR0FBRyxFQUFFLENBQUMsSUFBSSxDQUFDLGNBQWMsRUFBRSxDQUFDLENBQUM7S0F5QnBFO0lBdkJHLFFBQVEsQ0FBQyxLQUFhO1FBQ2xCLElBQUksQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxDQUFDO0lBQzFCLENBQUM7SUFFRCxjQUFjLENBQUMsV0FBbUI7UUFDOUIsSUFBSSxDQUFDLFdBQVcsQ0FBQyxHQUFHLENBQUMsV0FBVyxDQUFDLENBQUM7SUFDdEMsQ0FBQztJQUVELE1BQU0sQ0FBQyxHQUFXO1FBQ2QsSUFBSSxDQUFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUM7SUFDdEIsQ0FBQztJQUVELGlCQUFpQixDQUFDLElBQVk7UUFDMUIsSUFBSSxDQUFDLGNBQWMsQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDbEMsQ0FBQztJQUVELFNBQVM7UUFDTCxPQUFPLElBQUksQ0FBQyxNQUFNLENBQUM7SUFDdkIsQ0FBQztJQUVPLFVBQVU7UUFDZCxPQUFPLFFBQVEsSUFBSSxDQUFDLE1BQU0sRUFBRSxDQUFDLFFBQVEsQ0FBQyxFQUFFLENBQUMsQ0FBQyxNQUFNLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxFQUFFLENBQUM7SUFDN0QsQ0FBQzsrR0FsQ1EscUJBQXFCO21IQUFyQixxQkFBcUIsY0FGbEIsTUFBTTs7NEZBRVQscUJBQXFCO2tCQUhqQyxVQUFVO21CQUFDO29CQUNSLFVBQVUsRUFBRSxNQUFNO2lCQUNyQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNvbXB1dGVkLCBJbmplY3RhYmxlLCBJbmplY3Rpb25Ub2tlbiwgc2lnbmFsIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbmV4cG9ydCBjb25zdCBUQUJTX0NPTlRFWFRfVE9LRU4gPSBuZXcgSW5qZWN0aW9uVG9rZW48UmR4VGFic0NvbnRleHRTZXJ2aWNlPignVGFic0NvbnRleHQnKTtcblxuQEluamVjdGFibGUoe1xuICAgIHByb3ZpZGVkSW46ICdyb290J1xufSlcbmV4cG9ydCBjbGFzcyBSZHhUYWJzQ29udGV4dFNlcnZpY2Uge1xuICAgIHByaXZhdGUgYmFzZUlkID0gdGhpcy5nZW5lcmF0ZUlkKCk7XG4gICAgcHJpdmF0ZSB2YWx1ZSA9IHNpZ25hbDxzdHJpbmcgfCB1bmRlZmluZWQ+KHVuZGVmaW5lZCk7XG4gICAgcHJpdmF0ZSBvcmllbnRhdGlvbiA9IHNpZ25hbDxzdHJpbmc+KCdob3Jpem9udGFsJyk7XG4gICAgcHJpdmF0ZSBkaXIgPSBzaWduYWw8c3RyaW5nIHwgdW5kZWZpbmVkPih1bmRlZmluZWQpO1xuICAgIHByaXZhdGUgYWN0aXZhdGlvbk1vZGUgPSBzaWduYWw8c3RyaW5nPignYXV0b21hdGljJyk7XG5cbiAgICByZWFkb25seSB2YWx1ZSQgPSBjb21wdXRlZCgoKSA9PiB0aGlzLnZhbHVlKCkpO1xuICAgIHJlYWRvbmx5IG9yaWVudGF0aW9uJCA9IGNvbXB1dGVkKCgpID0+IHRoaXMub3JpZW50YXRpb24oKSk7XG4gICAgcmVhZG9ubHkgZGlyJCA9IGNvbXB1dGVkKCgpID0+IHRoaXMuZGlyKCkpO1xuICAgIHJlYWRvbmx5IGFjdGl2YXRpb25Nb2RlJCA9IGNvbXB1dGVkKCgpID0+IHRoaXMuYWN0aXZhdGlvbk1vZGUoKSk7XG5cbiAgICBzZXRWYWx1ZSh2YWx1ZTogc3RyaW5nKSB7XG4gICAgICAgIHRoaXMudmFsdWUuc2V0KHZhbHVlKTtcbiAgICB9XG5cbiAgICBzZXRPcmllbnRhdGlvbihvcmllbnRhdGlvbjogc3RyaW5nKSB7XG4gICAgICAgIHRoaXMub3JpZW50YXRpb24uc2V0KG9yaWVudGF0aW9uKTtcbiAgICB9XG5cbiAgICBzZXREaXIoZGlyOiBzdHJpbmcpIHtcbiAgICAgICAgdGhpcy5kaXIuc2V0KGRpcik7XG4gICAgfVxuXG4gICAgc2V0QWN0aXZhdGlvbk1vZGUobW9kZTogc3RyaW5nKSB7XG4gICAgICAgIHRoaXMuYWN0aXZhdGlvbk1vZGUuc2V0KG1vZGUpO1xuICAgIH1cblxuICAgIGdldEJhc2VJZCgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuYmFzZUlkO1xuICAgIH1cblxuICAgIHByaXZhdGUgZ2VuZXJhdGVJZCgpIHtcbiAgICAgICAgcmV0dXJuIGB0YWJzLSR7TWF0aC5yYW5kb20oKS50b1N0cmluZygzNikuc3Vic3RyKDIsIDkpfWA7XG4gICAgfVxufVxuIl19
@@ -1,30 +0,0 @@
1
- import { Directive } from '@angular/core';
2
- import { RdxVisuallyHiddenInputDirective } from '@radix-ng/primitives/visually-hidden';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "@radix-ng/primitives/visually-hidden";
5
- export class RdxToggleInputDirective {
6
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxToggleInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
7
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.11", type: RdxToggleInputDirective, isStandalone: true, selector: "[rdxToggleInput]", host: { attributes: { "type": "checkbox" } }, exportAs: ["rdxToggleInput"], hostDirectives: [{ directive: i1.RdxVisuallyHiddenInputDirective, inputs: ["name", "name", "required", "required", "value", "value"] }], ngImport: i0 }); }
8
- }
9
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxToggleInputDirective, decorators: [{
10
- type: Directive,
11
- args: [{
12
- selector: '[rdxToggleInput]',
13
- exportAs: 'rdxToggleInput',
14
- standalone: true,
15
- hostDirectives: [
16
- {
17
- directive: RdxVisuallyHiddenInputDirective,
18
- inputs: [
19
- 'name',
20
- 'required',
21
- 'value'
22
- ]
23
- }
24
- ],
25
- host: {
26
- type: 'checkbox'
27
- }
28
- }]
29
- }] });
30
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9nZ2xlLWlucHV0LmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3ByaW1pdGl2ZXMvdG9nZ2xlL3NyYy90b2dnbGUtaW5wdXQuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDMUMsT0FBTyxFQUFFLCtCQUErQixFQUFFLE1BQU0sc0NBQXNDLENBQUM7OztBQW9CdkYsTUFBTSxPQUFPLHVCQUF1QjsrR0FBdkIsdUJBQXVCO21HQUF2Qix1QkFBdUI7OzRGQUF2Qix1QkFBdUI7a0JBbEJuQyxTQUFTO21CQUFDO29CQUNQLFFBQVEsRUFBRSxrQkFBa0I7b0JBQzVCLFFBQVEsRUFBRSxnQkFBZ0I7b0JBQzFCLFVBQVUsRUFBRSxJQUFJO29CQUNoQixjQUFjLEVBQUU7d0JBQ1o7NEJBQ0ksU0FBUyxFQUFFLCtCQUErQjs0QkFDMUMsTUFBTSxFQUFFO2dDQUNKLE1BQU07Z0NBQ04sVUFBVTtnQ0FDVixPQUFPOzZCQUNWO3lCQUNKO3FCQUNKO29CQUNELElBQUksRUFBRTt3QkFDRixJQUFJLEVBQUUsVUFBVTtxQkFDbkI7aUJBQ0oiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBEaXJlY3RpdmUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IFJkeFZpc3VhbGx5SGlkZGVuSW5wdXREaXJlY3RpdmUgfSBmcm9tICdAcmFkaXgtbmcvcHJpbWl0aXZlcy92aXN1YWxseS1oaWRkZW4nO1xuXG5ARGlyZWN0aXZlKHtcbiAgICBzZWxlY3RvcjogJ1tyZHhUb2dnbGVJbnB1dF0nLFxuICAgIGV4cG9ydEFzOiAncmR4VG9nZ2xlSW5wdXQnLFxuICAgIHN0YW5kYWxvbmU6IHRydWUsXG4gICAgaG9zdERpcmVjdGl2ZXM6IFtcbiAgICAgICAge1xuICAgICAgICAgICAgZGlyZWN0aXZlOiBSZHhWaXN1YWxseUhpZGRlbklucHV0RGlyZWN0aXZlLFxuICAgICAgICAgICAgaW5wdXRzOiBbXG4gICAgICAgICAgICAgICAgJ25hbWUnLFxuICAgICAgICAgICAgICAgICdyZXF1aXJlZCcsXG4gICAgICAgICAgICAgICAgJ3ZhbHVlJ1xuICAgICAgICAgICAgXVxuICAgICAgICB9XG4gICAgXSxcbiAgICBob3N0OiB7XG4gICAgICAgIHR5cGU6ICdjaGVja2JveCdcbiAgICB9XG59KVxuZXhwb3J0IGNsYXNzIFJkeFRvZ2dsZUlucHV0RGlyZWN0aXZlIHt9XG4iXX0=
@@ -1,3 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import { RdxPopoverRootDirective } from './popover-root.directive';
3
- export declare const RdxPopoverRootToken: InjectionToken<RdxPopoverRootDirective>;
@@ -1,22 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare const TABS_CONTEXT_TOKEN: InjectionToken<RdxTabsContextService>;
4
- export declare class RdxTabsContextService {
5
- private baseId;
6
- private value;
7
- private orientation;
8
- private dir;
9
- private activationMode;
10
- readonly value$: import("@angular/core").Signal<string | undefined>;
11
- readonly orientation$: import("@angular/core").Signal<string>;
12
- readonly dir$: import("@angular/core").Signal<string | undefined>;
13
- readonly activationMode$: import("@angular/core").Signal<string>;
14
- setValue(value: string): void;
15
- setOrientation(orientation: string): void;
16
- setDir(dir: string): void;
17
- setActivationMode(mode: string): void;
18
- getBaseId(): string;
19
- private generateId;
20
- static ɵfac: i0.ɵɵFactoryDeclaration<RdxTabsContextService, never>;
21
- static ɵprov: i0.ɵɵInjectableDeclaration<RdxTabsContextService>;
22
- }
@@ -1,6 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "@radix-ng/primitives/visually-hidden";
3
- export declare class RdxToggleInputDirective {
4
- static ɵfac: i0.ɵɵFactoryDeclaration<RdxToggleInputDirective, never>;
5
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxToggleInputDirective, "[rdxToggleInput]", ["rdxToggleInput"], {}, {}, never, never, true, [{ directive: typeof i1.RdxVisuallyHiddenInputDirective; inputs: { "name": "name"; "required": "required"; "value": "value"; }; outputs: {}; }]>;
6
- }