@radix-ng/primitives 0.39.2 → 0.39.4

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 (29) hide show
  1. package/core/index.d.ts +2 -0
  2. package/core/src/accessor/control-value-accessor.d.ts +1 -1
  3. package/core/src/is-equal.d.ts +7 -0
  4. package/core/src/isValueEqualOrExist.d.ts +10 -0
  5. package/core/src/serialize.d.ts +11 -0
  6. package/core/src/types.d.ts +1 -0
  7. package/fesm2022/radix-ng-primitives-collapsible.mjs +3 -0
  8. package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
  9. package/fesm2022/radix-ng-primitives-core.mjs +220 -1
  10. package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
  11. package/fesm2022/radix-ng-primitives-hover-card.mjs +75 -36
  12. package/fesm2022/radix-ng-primitives-hover-card.mjs.map +1 -1
  13. package/fesm2022/radix-ng-primitives-slider.mjs +1 -1
  14. package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
  15. package/fesm2022/radix-ng-primitives-switch.mjs +10 -3
  16. package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
  17. package/fesm2022/radix-ng-primitives-toggle-group.mjs +17 -10
  18. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
  19. package/fesm2022/radix-ng-primitives-toggle.mjs +25 -38
  20. package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
  21. package/hover-card/src/hover-card-arrow.directive.d.ts +9 -4
  22. package/hover-card/src/hover-card-content.directive.d.ts +36 -16
  23. package/hover-card/src/hover-card-root.directive.d.ts +34 -20
  24. package/package.json +1 -1
  25. package/popover/src/popover-root.directive.d.ts +4 -4
  26. package/toggle/src/toggle.directive.d.ts +10 -22
  27. package/toggle-group/src/toggle-group.directive.d.ts +6 -5
  28. package/toggle-group/src/toggle-group.token.d.ts +1 -0
  29. package/tooltip/src/tooltip-root.directive.d.ts +4 -4
@@ -1,8 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, input, booleanAttribute, model, computed, output, signal } from '@angular/core';
2
+ import { Directive, inject, input, booleanAttribute, model } from '@angular/core';
3
3
  import * as i1 from '@radix-ng/primitives/visually-hidden';
4
4
  import { RdxVisuallyHiddenInputDirective } from '@radix-ng/primitives/visually-hidden';
5
- import { provideValueAccessor } from '@radix-ng/primitives/core';
5
+ import { outputFromObservable, outputToObservable } from '@angular/core/rxjs-interop';
6
+ import * as i1$1 from '@radix-ng/primitives/core';
7
+ import { RdxControlValueAccessor } from '@radix-ng/primitives/core';
6
8
 
7
9
  class RdxToggleVisuallyHiddenInputDirective {
8
10
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: RdxToggleVisuallyHiddenInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
@@ -30,6 +32,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
30
32
  */
31
33
  class RdxToggleDirective {
32
34
  constructor() {
35
+ /**
36
+ * @ignore
37
+ */
38
+ this.cva = inject(RdxControlValueAccessor);
33
39
  /**
34
40
  * The pressed state of the toggle when it is initially rendered.
35
41
  * Use when you do not need to control its pressed state.
@@ -50,60 +56,41 @@ class RdxToggleDirective {
50
56
  * @group Props
51
57
  */
52
58
  this.disabled = input(false, { transform: booleanAttribute });
53
- /** @ignore */
54
- this.disabledModel = model(this.disabled());
55
- /** @ignore */
56
- this.disabledState = computed(() => this.disabled() || this.disabledModel() || this.accessorDisabled());
57
- this.dataState = computed(() => {
58
- return this.pressed() ? 'on' : 'off';
59
- });
60
59
  /**
61
60
  * Event handler called when the pressed state of the toggle changes.
62
61
  *
63
62
  * @group Emits
64
63
  */
65
- this.onPressedChange = output();
66
- this.accessorDisabled = signal(false);
67
- this.onChange = () => { };
64
+ this.onPressedChange = outputFromObservable(outputToObservable(this.cva.valueChange));
68
65
  }
69
- togglePressed() {
66
+ onClick() {
70
67
  if (!this.disabled()) {
71
68
  this.pressed.set(!this.pressed());
72
- this.onChange(this.pressed());
73
- this.onPressedChange.emit(this.pressed());
69
+ this.cva.writeValue(this.pressed());
70
+ this.cva.setValue(this.pressed());
74
71
  }
75
72
  }
76
- /** @ignore */
77
- writeValue(value) {
78
- this.pressed.set(value);
79
- }
80
- /** @ignore */
81
- registerOnChange(fn) {
82
- this.onChange = fn;
83
- }
84
- /** @ignore */
85
- registerOnTouched(fn) {
86
- this.onTouched = fn;
87
- }
88
- /** @ignore */
89
- setDisabledState(isDisabled) {
90
- this.accessorDisabled.set(isDisabled);
91
- }
92
73
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: RdxToggleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
93
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.4", type: RdxToggleDirective, isStandalone: true, selector: "[rdxToggle]", inputs: { defaultPressed: { classPropertyName: "defaultPressed", publicName: "defaultPressed", isSignal: true, isRequired: false, transformFunction: null }, pressed: { classPropertyName: "pressed", publicName: "pressed", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, disabledModel: { classPropertyName: "disabledModel", publicName: "disabledModel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pressed: "pressedChange", disabledModel: "disabledModelChange", onPressedChange: "onPressedChange" }, host: { listeners: { "click": "togglePressed()" }, properties: { "attr.aria-pressed": "pressed()", "attr.data-state": "dataState()", "attr.data-disabled": "disabledState() ? \"\" : undefined", "disabled": "disabledState()" } }, providers: [provideValueAccessor(RdxToggleDirective)], exportAs: ["rdxToggle"], ngImport: i0 }); }
74
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.4", type: RdxToggleDirective, isStandalone: true, selector: "[rdxToggle]", inputs: { defaultPressed: { classPropertyName: "defaultPressed", publicName: "defaultPressed", isSignal: true, isRequired: false, transformFunction: null }, pressed: { classPropertyName: "pressed", publicName: "pressed", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pressed: "pressedChange", onPressedChange: "onPressedChange" }, host: { attributes: { "type": "button" }, listeners: { "click": "onClick()" }, properties: { "attr.aria-pressed": "cva.value()", "attr.data-state": "cva.value() ? \"on\" : \"off\"", "attr.data-disabled": "cva.disabled() ? \"\" : undefined", "disabled": "cva.disabled()" } }, exportAs: ["rdxToggle"], hostDirectives: [{ directive: i1$1.RdxControlValueAccessor, inputs: ["value", "pressed", "disabled", "disabled"] }], ngImport: i0 }); }
94
75
  }
95
76
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: RdxToggleDirective, decorators: [{
96
77
  type: Directive,
97
78
  args: [{
98
79
  selector: '[rdxToggle]',
99
80
  exportAs: 'rdxToggle',
100
- providers: [provideValueAccessor(RdxToggleDirective)],
81
+ hostDirectives: [
82
+ {
83
+ directive: RdxControlValueAccessor,
84
+ inputs: ['value: pressed', 'disabled']
85
+ }
86
+ ],
101
87
  host: {
102
- '[attr.aria-pressed]': 'pressed()',
103
- '[attr.data-state]': 'dataState()',
104
- '[attr.data-disabled]': 'disabledState() ? "" : undefined',
105
- '[disabled]': 'disabledState()',
106
- '(click)': 'togglePressed()'
88
+ type: 'button',
89
+ '[attr.aria-pressed]': 'cva.value()',
90
+ '[attr.data-state]': 'cva.value() ? "on" : "off"',
91
+ '[attr.data-disabled]': 'cva.disabled() ? "" : undefined',
92
+ '[disabled]': 'cva.disabled()',
93
+ '(click)': 'onClick()'
107
94
  }
108
95
  }]
109
96
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-toggle.mjs","sources":["../../../packages/primitives/toggle/src/toggle-visually-hidden-input.directive.ts","../../../packages/primitives/toggle/src/toggle.directive.ts","../../../packages/primitives/toggle/radix-ng-primitives-toggle.ts"],"sourcesContent":["import { Directive } from '@angular/core';\nimport { RdxVisuallyHiddenInputDirective } from '@radix-ng/primitives/visually-hidden';\n\n@Directive({\n selector: 'input[rdxToggleVisuallyHiddenInput]',\n exportAs: 'rdxToggleVisuallyHiddenInput',\n hostDirectives: [\n {\n directive: RdxVisuallyHiddenInputDirective,\n inputs: ['name', 'required', 'value', 'disabled']\n }\n ],\n host: {\n type: 'checkbox'\n }\n})\nexport class RdxToggleVisuallyHiddenInputDirective {}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, input, model, output, OutputEmitterRef, signal } from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport { provideValueAccessor } from '@radix-ng/primitives/core';\n\nexport interface ToggleProps {\n /**\n * The controlled state of the toggle.\n */\n pressed?: boolean;\n\n /**\n * The state of the toggle when initially rendered. Use `defaultPressed`\n * if you do not need to control the state of the toggle.\n * @defaultValue false\n */\n defaultPressed?: boolean;\n\n /**\n * The callback that fires when the state of the toggle changes.\n */\n onPressedChange?: OutputEmitterRef<boolean>;\n\n /**\n * Whether the toggle is disabled.\n * @defaultValue false\n */\n disabled?: boolean;\n}\n\nexport type DataState = 'on' | 'off';\n\n/**\n * @group Components\n */\n@Directive({\n selector: '[rdxToggle]',\n exportAs: 'rdxToggle',\n providers: [provideValueAccessor(RdxToggleDirective)],\n host: {\n '[attr.aria-pressed]': 'pressed()',\n '[attr.data-state]': 'dataState()',\n '[attr.data-disabled]': 'disabledState() ? \"\" : undefined',\n '[disabled]': 'disabledState()',\n\n '(click)': 'togglePressed()'\n }\n})\nexport class RdxToggleDirective implements ControlValueAccessor {\n /**\n * The pressed state of the toggle when it is initially rendered.\n * Use when you do not need to control its pressed state.\n *\n * @group Props\n */\n readonly defaultPressed = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * The controlled pressed state of the toggle.\n * Must be used in conjunction with `onPressedChange`.\n *\n * @group Props\n */\n readonly pressed = model<boolean>(this.defaultPressed());\n\n /**\n * When true, prevents the user from interacting with the toggle.\n *\n * @group Props\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** @ignore */\n readonly disabledModel = model<boolean>(this.disabled());\n\n /** @ignore */\n readonly disabledState = computed(() => this.disabled() || this.disabledModel() || this.accessorDisabled());\n\n protected readonly dataState = computed<DataState>(() => {\n return this.pressed() ? 'on' : 'off';\n });\n\n /**\n * Event handler called when the pressed state of the toggle changes.\n *\n * @group Emits\n */\n readonly onPressedChange = output<boolean>();\n\n protected togglePressed(): void {\n if (!this.disabled()) {\n this.pressed.set(!this.pressed());\n this.onChange(this.pressed());\n this.onPressedChange.emit(this.pressed());\n }\n }\n\n private readonly accessorDisabled = signal(false);\n\n private onChange: (value: any) => void = () => {};\n\n /** @ignore */\n onTouched: (() => void) | undefined;\n\n /** @ignore */\n writeValue(value: any): void {\n this.pressed.set(value);\n }\n\n /** @ignore */\n registerOnChange(fn: (value: any) => void): void {\n this.onChange = fn;\n }\n\n /** @ignore */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /** @ignore */\n setDisabledState(isDisabled: boolean): void {\n this.accessorDisabled.set(isDisabled);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAgBa,qCAAqC,CAAA;8GAArC,qCAAqC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAArC,qCAAqC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qCAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,UAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,8BAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,+BAAA,EAAA,MA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AA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAU5C,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAb9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,SAAS,EAAE,CAAC,oBAAoB,CAAA,kBAAA,CAAoB,CAAC;AACrD,oBAAA,IAAI,EAAE;AACF,wBAAA,qBAAqB,EAAE,WAAW;AAClC,wBAAA,mBAAmB,EAAE,aAAa;AAClC,wBAAA,sBAAsB,EAAE,kCAAkC;AAC1D,wBAAA,YAAY,EAAE,iBAAiB;AAE/B,wBAAA,SAAS,EAAE;AACd;AACJ,iBAAA;;;AC/CD;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-toggle.mjs","sources":["../../../packages/primitives/toggle/src/toggle-visually-hidden-input.directive.ts","../../../packages/primitives/toggle/src/toggle.directive.ts","../../../packages/primitives/toggle/radix-ng-primitives-toggle.ts"],"sourcesContent":["import { Directive } from '@angular/core';\nimport { RdxVisuallyHiddenInputDirective } from '@radix-ng/primitives/visually-hidden';\n\n@Directive({\n selector: 'input[rdxToggleVisuallyHiddenInput]',\n exportAs: 'rdxToggleVisuallyHiddenInput',\n hostDirectives: [\n {\n directive: RdxVisuallyHiddenInputDirective,\n inputs: ['name', 'required', 'value', 'disabled']\n }\n ],\n host: {\n type: 'checkbox'\n }\n})\nexport class RdxToggleVisuallyHiddenInputDirective {}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, inject, input, model, OutputEmitterRef } from '@angular/core';\nimport { outputFromObservable, outputToObservable } from '@angular/core/rxjs-interop';\nimport { RdxControlValueAccessor } from '@radix-ng/primitives/core';\n\nexport interface ToggleProps {\n /**\n * The controlled state of the toggle.\n */\n pressed?: boolean;\n\n /**\n * The state of the toggle when initially rendered. Use `defaultPressed`\n * if you do not need to control the state of the toggle.\n * @defaultValue false\n */\n defaultPressed?: boolean;\n\n /**\n * The callback that fires when the state of the toggle changes.\n */\n onPressedChange?: OutputEmitterRef<boolean>;\n\n /**\n * Whether the toggle is disabled.\n * @defaultValue false\n */\n disabled?: boolean;\n}\n\nexport type DataState = 'on' | 'off';\n\n/**\n * @group Components\n */\n@Directive({\n selector: '[rdxToggle]',\n exportAs: 'rdxToggle',\n hostDirectives: [\n {\n directive: RdxControlValueAccessor,\n inputs: ['value: pressed', 'disabled']\n }\n ],\n host: {\n type: 'button',\n '[attr.aria-pressed]': 'cva.value()',\n '[attr.data-state]': 'cva.value() ? \"on\" : \"off\"',\n '[attr.data-disabled]': 'cva.disabled() ? \"\" : undefined',\n '[disabled]': 'cva.disabled()',\n\n '(click)': 'onClick()'\n }\n})\nexport class RdxToggleDirective {\n /**\n * @ignore\n */\n readonly cva = inject(RdxControlValueAccessor);\n\n /**\n * The pressed state of the toggle when it is initially rendered.\n * Use when you do not need to control its pressed state.\n *\n * @group Props\n */\n readonly defaultPressed = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * The controlled pressed state of the toggle.\n * Must be used in conjunction with `onPressedChange`.\n *\n * @group Props\n */\n readonly pressed = model<boolean>(this.defaultPressed());\n\n /**\n * When true, prevents the user from interacting with the toggle.\n *\n * @group Props\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Event handler called when the pressed state of the toggle changes.\n *\n * @group Emits\n */\n readonly onPressedChange = outputFromObservable(outputToObservable(this.cva.valueChange));\n\n protected onClick(): void {\n if (!this.disabled()) {\n this.pressed.set(!this.pressed());\n this.cva.writeValue(this.pressed());\n this.cva.setValue(this.pressed());\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;MAgBa,qCAAqC,CAAA;8GAArC,qCAAqC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,E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AAA,SAAA,EAAA,EAAA,OAAA,EAAA,WAAA,EAAA,EAAA,UAAA,EAAA,EAAA,mBAAA,EAAA,aAAA,EAAA,iBAAA,EAAA,gCAAA,EAAA,oBAAA,EAAA,mCAAA,EAAA,UAAA,EAAA,gBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAAA,IAAA,CAAA,uBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAnB9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,cAAc,EAAE;AACZ,wBAAA;AACI,4BAAA,SAAS,EAAE,uBAAuB;AAClC,4BAAA,MAAM,EAAE,CAAC,gBAAgB,EAAE,UAAU;AACxC;AACJ,qBAAA;AACD,oBAAA,IAAI,EAAE;AACF,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,qBAAqB,EAAE,aAAa;AACpC,wBAAA,mBAAmB,EAAE,4BAA4B;AACjD,wBAAA,sBAAsB,EAAE,iCAAiC;AACzD,wBAAA,YAAY,EAAE,gBAAgB;AAE9B,wBAAA,SAAS,EAAE;AACd;AACJ,iBAAA;;;ACrDD;;AAEG;;;;"}
@@ -1,6 +1,9 @@
1
1
  import { NumberInput } from '@angular/cdk/coercion';
2
2
  import { ElementRef } from '@angular/core';
3
3
  import * as i0 from "@angular/core";
4
+ /**
5
+ * @group Components
6
+ */
4
7
  export declare class RdxHoverCardArrowDirective {
5
8
  /** @ignore */
6
9
  private readonly renderer;
@@ -9,13 +12,15 @@ export declare class RdxHoverCardArrowDirective {
9
12
  /** @ignore */
10
13
  readonly elementRef: ElementRef<any>;
11
14
  /**
12
- * @description The width of the arrow in pixels.
13
- * @default 10
15
+ * The width of the arrow in pixels.
16
+ * @group Props
17
+ * @defaultValue 10
14
18
  */
15
19
  readonly width: import("@angular/core").InputSignalWithTransform<number, NumberInput>;
16
20
  /**
17
- * @description The height of the arrow in pixels.
18
- * @default 5
21
+ * The height of the arrow in pixels.
22
+ * @group Props
23
+ * @defaultValue 5
19
24
  */
20
25
  readonly height: import("@angular/core").InputSignalWithTransform<number, NumberInput>;
21
26
  /** @ignore */
@@ -3,6 +3,9 @@ import { OnInit } from '@angular/core';
3
3
  import { RdxPositionAlign, RdxPositionSide } from '@radix-ng/primitives/core';
4
4
  import * as i0 from "@angular/core";
5
5
  import * as i1 from "@angular/cdk/overlay";
6
+ /**
7
+ * @group Components
8
+ */
6
9
  export declare class RdxHoverCardContentDirective implements OnInit {
7
10
  /** @ignore */
8
11
  private readonly rootDirective;
@@ -17,50 +20,67 @@ export declare class RdxHoverCardContentDirective implements OnInit {
17
20
  /** @ignore */
18
21
  readonly name: import("@angular/core").Signal<string>;
19
22
  /**
20
- * @description The preferred side of the trigger to render against when open. Will be reversed when collisions occur and avoidCollisions is enabled.
21
- * @default top
23
+ * The preferred side of the trigger to render against when open. Will be reversed when collisions occur and avoidCollisions is enabled.
24
+ * @group Props
25
+ * @defaultValue top
22
26
  */
23
27
  readonly side: import("@angular/core").InputSignal<RdxPositionSide>;
24
28
  /**
25
- * @description The distance in pixels from the trigger.
26
- * @default undefined
29
+ * The distance in pixels from the trigger.
30
+ * @group Props
31
+ * @defaultValue undefined
27
32
  */
28
33
  readonly sideOffset: import("@angular/core").InputSignalWithTransform<number, NumberInput>;
29
34
  /**
30
- * @description The preferred alignment against the trigger. May change when collisions occur.
31
- * @default center
35
+ * The preferred alignment against the trigger. May change when collisions occur.
36
+ * @group Props
37
+ * @defaultValue center
32
38
  */
33
39
  readonly align: import("@angular/core").InputSignal<RdxPositionAlign>;
34
40
  /**
35
- * @description An offset in pixels from the "start" or "end" alignment options.
36
- * @default undefined
41
+ * An offset in pixels from the "start" or "end" alignment options.
42
+ * @group Props
43
+ * @defaultValue undefined
37
44
  */
38
45
  readonly alignOffset: import("@angular/core").InputSignalWithTransform<number, NumberInput>;
39
46
  /**
40
- * @description Whether to add some alternate positions of the content.
41
- * @default false
47
+ * Whether to add some alternate positions of the content.
48
+ * @group Props
49
+ * @defaultValue false
42
50
  */
43
51
  readonly alternatePositionsDisabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
44
- /** @description Whether to prevent `onOverlayEscapeKeyDown` handler from calling. */
52
+ /**
53
+ * Whether to prevent `onOverlayEscapeKeyDown` handler from calling.
54
+ * @group Props
55
+ * @defaultValue false
56
+ */
45
57
  readonly onOverlayEscapeKeyDownDisabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
46
- /** @description Whether to prevent `onOverlayOutsideClick` handler from calling. */
58
+ /**
59
+ * Whether to prevent `onOverlayOutsideClick` handler from calling.
60
+ * @group Props
61
+ * @defaultValue false
62
+ */
47
63
  readonly onOverlayOutsideClickDisabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
48
64
  /**
49
- * @description Event handler called when the escape key is down.
65
+ * Event handler called when the escape key is down.
50
66
  * It can be prevented by setting `onOverlayEscapeKeyDownDisabled` input to `true`.
67
+ * @group Emits
51
68
  */
52
69
  readonly onOverlayEscapeKeyDown: import("@angular/core").OutputEmitterRef<KeyboardEvent>;
53
70
  /**
54
- * @description Event handler called when a pointer event occurs outside the bounds of the component.
71
+ * Event handler called when a pointer event occurs outside the bounds of the component.
55
72
  * It can be prevented by setting `onOverlayOutsideClickDisabled` input to `true`.
73
+ * @group Emits
56
74
  */
57
75
  readonly onOverlayOutsideClick: import("@angular/core").OutputEmitterRef<MouseEvent>;
58
76
  /**
59
- * @description Event handler called after the overlay is open
77
+ * Event handler called after the overlay is open
78
+ * @group Emits
60
79
  */
61
80
  readonly onOpen: import("@angular/core").OutputEmitterRef<void>;
62
81
  /**
63
- * @description Event handler called after the overlay is closed
82
+ * Event handler called after the overlay is closed
83
+ * @group Emits
64
84
  */
65
85
  readonly onClosed: import("@angular/core").OutputEmitterRef<void>;
66
86
  /** @ingore */
@@ -6,52 +6,66 @@ import { RdxHoverCardContentDirective } from './hover-card-content.directive';
6
6
  import { RdxHoverCardTriggerDirective } from './hover-card-trigger.directive';
7
7
  import { RdxHoverCardAction, RdxHoverCardAnimationStatus, RdxHoverCardAttachDetachEvent, RdxHoverCardState } from './hover-card.types';
8
8
  import * as i0 from "@angular/core";
9
+ /**
10
+ * @group Components
11
+ */
9
12
  export declare class RdxHoverCardRootDirective {
10
13
  /** @ignore */
11
14
  readonly uniqueId: import("@angular/core").WritableSignal<number>;
12
15
  /** @ignore */
13
16
  readonly name: import("@angular/core").Signal<string>;
14
17
  /**
15
- * @description The anchor directive that comes form outside the hover-card rootDirective
16
- * @default undefined
18
+ * The anchor directive that comes from outside the hover-card rootDirective
19
+ * @group Props
20
+ * @defaultValue undefined
17
21
  */
18
22
  readonly anchor: import("@angular/core").InputSignal<RdxHoverCardAnchorDirective | undefined>;
19
23
  /**
20
- * @description The open state of the hover-card when it is initially rendered. Use when you do not need to control its open state.
21
- * @default false
24
+ * The open state of the hover-card when it is initially rendered. Use when you do not need to control its open state.
25
+ * @group Props
26
+ * @defaultValue false
22
27
  */
23
28
  readonly defaultOpen: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
24
29
  /**
25
- * @description The controlled state of the hover-card. `open` input take precedence of `defaultOpen` input.
26
- * @default undefined
30
+ * The controlled state of the hover-card. `open` input takes precedence over `defaultOpen` input.
31
+ * @group Props
32
+ * @defaultValue undefined
27
33
  */
28
34
  readonly open: import("@angular/core").InputSignalWithTransform<boolean | undefined, BooleanInput>;
29
35
  /**
30
- * To customise the open delay for a specific hover-card.
36
+ * The delay in milliseconds before the hover-card opens.
37
+ * @group Props
38
+ * @defaultValue 500
31
39
  */
32
40
  readonly openDelay: import("@angular/core").InputSignalWithTransform<number, NumberInput>;
33
41
  /**
34
- * To customise the close delay for a specific hover-card.
42
+ * The delay in milliseconds before the hover-card closes.
43
+ * @group Props
44
+ * @defaultValue 200
35
45
  */
36
46
  readonly closeDelay: import("@angular/core").InputSignalWithTransform<number, NumberInput>;
37
47
  /**
38
- * @description Whether to control the state of the hover-card from external. Use in conjunction with `open` input.
39
- * @default undefined
48
+ * Whether to control the state of the hover-card from outside. Use in conjunction with `open` input.
49
+ * @group Props
50
+ * @defaultValue undefined
40
51
  */
41
52
  readonly externalControl: import("@angular/core").InputSignalWithTransform<boolean | undefined, BooleanInput>;
42
53
  /**
43
- * @description Whether to take into account CSS opening/closing animations.
44
- * @default false
54
+ * Whether to take into account CSS opening/closing animations.
55
+ * @group Props
56
+ * @defaultValue false
45
57
  */
46
58
  readonly cssAnimation: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
47
59
  /**
48
- * @description Whether to take into account CSS opening animations. `cssAnimation` input must be set to 'true'
49
- * @default false
60
+ * Whether to take into account CSS opening animations. `cssAnimation` input must be set to 'true'
61
+ * @group Props
62
+ * @defaultValue false
50
63
  */
51
64
  readonly cssOpeningAnimation: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
52
65
  /**
53
- * @description Whether to take into account CSS closing animations. `cssAnimation` input must be set to 'true'
54
- * @default false
66
+ * Whether to take into account CSS closing animations. `cssAnimation` input must be set to 'true'
67
+ * @group Props
68
+ * @defaultValue false
55
69
  */
56
70
  readonly cssClosingAnimation: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
57
71
  /** @ignore */
@@ -79,7 +93,7 @@ export declare class RdxHoverCardRootDirective {
79
93
  window: Window & typeof globalThis;
80
94
  primitiveConfigs?: import("./utils/types").PrimitiveConfigs;
81
95
  onDestroyCallbacks: Set<() => void>;
82
- "__#13531@#clickDomRootEventCallbacks": Set<(event: MouseEvent) => void>;
96
+ "__#14204@#clickDomRootEventCallbacks": Set<(event: MouseEvent) => void>;
83
97
  registerPrimitive<T extends object>(primitiveInstance: T): void;
84
98
  deregisterPrimitive<T extends object>(primitiveInstance: T): void;
85
99
  preventPrimitiveFromCdkEvent<T extends object>(primitiveInstance: T, eventType: import("./utils/types").EventType): void;
@@ -90,9 +104,9 @@ export declare class RdxHoverCardRootDirective {
90
104
  primitivePreventedFromCdkEvent<T extends object>(primitiveInstance: T, eventType: import("./utils/types").EventType): boolean | undefined;
91
105
  addClickDomRootEventCallback(callback: (event: MouseEvent) => void): void;
92
106
  removeClickDomRootEventCallback(callback: (event: MouseEvent) => void): boolean;
93
- "__#13531@#setPreventPrimitiveFromCdkEvent"<T extends object, R extends import("./utils/types").EventType, K extends import("./utils/types").PrimitiveConfig[`prevent${Capitalize<R>}`]>(primitiveInstance: T, eventType: R, value: K): void;
94
- "__#13531@#registerOnDestroyCallbacks"(): void;
95
- "__#13531@#listenToClickDomRootEvent"(): void;
107
+ "__#14204@#setPreventPrimitiveFromCdkEvent"<T extends object, R extends import("./utils/types").EventType, K extends import("./utils/types").PrimitiveConfig[`prevent${Capitalize<R>}`]>(primitiveInstance: T, eventType: R, value: K): void;
108
+ "__#14204@#registerOnDestroyCallbacks"(): void;
109
+ "__#14204@#listenToClickDomRootEvent"(): void;
96
110
  } | null;
97
111
  /** @ignore */
98
112
  readonly destroyRef: DestroyRef;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radix-ng/primitives",
3
- "version": "0.39.2",
3
+ "version": "0.39.4",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -70,7 +70,7 @@ export declare class RdxPopoverRootDirective {
70
70
  window: Window & typeof globalThis;
71
71
  primitiveConfigs?: import("./utils/types").PrimitiveConfigs;
72
72
  onDestroyCallbacks: Set<() => void>;
73
- "__#17916@#clickDomRootEventCallbacks": Set<(event: MouseEvent) => void>;
73
+ "__#18581@#clickDomRootEventCallbacks": Set<(event: MouseEvent) => void>;
74
74
  registerPrimitive<T extends object>(primitiveInstance: T): void;
75
75
  deregisterPrimitive<T extends object>(primitiveInstance: T): void;
76
76
  preventPrimitiveFromCdkEvent<T extends object>(primitiveInstance: T, eventType: import("./utils/types").EventType): void;
@@ -81,9 +81,9 @@ export declare class RdxPopoverRootDirective {
81
81
  primitivePreventedFromCdkEvent<T extends object>(primitiveInstance: T, eventType: import("./utils/types").EventType): boolean | undefined;
82
82
  addClickDomRootEventCallback(callback: (event: MouseEvent) => void): void;
83
83
  removeClickDomRootEventCallback(callback: (event: MouseEvent) => void): boolean;
84
- "__#17916@#setPreventPrimitiveFromCdkEvent"<T extends object, R extends import("./utils/types").EventType, K extends import("./utils/types").PrimitiveConfig[`prevent${Capitalize<R>}`]>(primitiveInstance: T, eventType: R, value: K): void;
85
- "__#17916@#registerOnDestroyCallbacks"(): void;
86
- "__#17916@#listenToClickDomRootEvent"(): void;
84
+ "__#18581@#setPreventPrimitiveFromCdkEvent"<T extends object, R extends import("./utils/types").EventType, K extends import("./utils/types").PrimitiveConfig[`prevent${Capitalize<R>}`]>(primitiveInstance: T, eventType: R, value: K): void;
85
+ "__#18581@#registerOnDestroyCallbacks"(): void;
86
+ "__#18581@#listenToClickDomRootEvent"(): void;
87
87
  } | null;
88
88
  /** @ignore */
89
89
  readonly destroyRef: DestroyRef;
@@ -1,7 +1,8 @@
1
1
  import { BooleanInput } from '@angular/cdk/coercion';
2
2
  import { OutputEmitterRef } from '@angular/core';
3
- import { ControlValueAccessor } from '@angular/forms';
3
+ import { RdxControlValueAccessor } from '@radix-ng/primitives/core';
4
4
  import * as i0 from "@angular/core";
5
+ import * as i1 from "@radix-ng/primitives/core";
5
6
  export interface ToggleProps {
6
7
  /**
7
8
  * The controlled state of the toggle.
@@ -27,7 +28,11 @@ export type DataState = 'on' | 'off';
27
28
  /**
28
29
  * @group Components
29
30
  */
30
- export declare class RdxToggleDirective implements ControlValueAccessor {
31
+ export declare class RdxToggleDirective {
32
+ /**
33
+ * @ignore
34
+ */
35
+ readonly cva: RdxControlValueAccessor<any>;
31
36
  /**
32
37
  * The pressed state of the toggle when it is initially rendered.
33
38
  * Use when you do not need to control its pressed state.
@@ -48,30 +53,13 @@ export declare class RdxToggleDirective implements ControlValueAccessor {
48
53
  * @group Props
49
54
  */
50
55
  readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
51
- /** @ignore */
52
- readonly disabledModel: import("@angular/core").ModelSignal<boolean>;
53
- /** @ignore */
54
- readonly disabledState: import("@angular/core").Signal<boolean>;
55
- protected readonly dataState: import("@angular/core").Signal<DataState>;
56
56
  /**
57
57
  * Event handler called when the pressed state of the toggle changes.
58
58
  *
59
59
  * @group Emits
60
60
  */
61
- readonly onPressedChange: OutputEmitterRef<boolean>;
62
- protected togglePressed(): void;
63
- private readonly accessorDisabled;
64
- private onChange;
65
- /** @ignore */
66
- onTouched: (() => void) | undefined;
67
- /** @ignore */
68
- writeValue(value: any): void;
69
- /** @ignore */
70
- registerOnChange(fn: (value: any) => void): void;
71
- /** @ignore */
72
- registerOnTouched(fn: () => void): void;
73
- /** @ignore */
74
- setDisabledState(isDisabled: boolean): void;
61
+ readonly onPressedChange: import("@angular/core").OutputRef<any>;
62
+ protected onClick(): void;
75
63
  static ɵfac: i0.ɵɵFactoryDeclaration<RdxToggleDirective, never>;
76
- 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; }; "disabledModel": { "alias": "disabledModel"; "required": false; "isSignal": true; }; }, { "pressed": "pressedChange"; "disabledModel": "disabledModelChange"; "onPressedChange": "onPressedChange"; }, never, never, true, never>;
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, [{ directive: typeof i1.RdxControlValueAccessor; inputs: { "value": "pressed"; "disabled": "disabled"; }; outputs: {}; }]>;
77
65
  }
@@ -1,5 +1,6 @@
1
1
  import { BooleanInput } from '@angular/cdk/coercion';
2
2
  import { ControlValueAccessor } from '@angular/forms';
3
+ import { AcceptableValue } from '@radix-ng/primitives/core';
3
4
  import * as i0 from "@angular/core";
4
5
  import * as i1 from "@radix-ng/primitives/roving-focus";
5
6
  /**
@@ -13,7 +14,7 @@ export declare class RdxToggleGroupDirective implements ControlValueAccessor {
13
14
  /**
14
15
  * @group Props
15
16
  */
16
- readonly value: import("@angular/core").ModelSignal<string | string[] | undefined>;
17
+ readonly value: import("@angular/core").ModelSignal<AcceptableValue | AcceptableValue[] | undefined>;
17
18
  /**
18
19
  * @group Props
19
20
  */
@@ -28,7 +29,7 @@ export declare class RdxToggleGroupDirective implements ControlValueAccessor {
28
29
  * Event emitted when the selected toggle button changes.
29
30
  * @group Emits
30
31
  */
31
- readonly onValueChange: import("@angular/core").OutputEmitterRef<string | string[] | undefined>;
32
+ readonly onValueChange: import("@angular/core").OutputEmitterRef<AcceptableValue | AcceptableValue[] | undefined>;
32
33
  /**
33
34
  * The value change callback.
34
35
  */
@@ -42,7 +43,7 @@ export declare class RdxToggleGroupDirective implements ControlValueAccessor {
42
43
  * @param value The value to toggle.
43
44
  * @ignore
44
45
  */
45
- toggle(value: string): void;
46
+ toggle(value: AcceptableValue): void;
46
47
  /**
47
48
  * Select a value from Angular forms.
48
49
  * @param value The value to select.
@@ -54,14 +55,14 @@ export declare class RdxToggleGroupDirective implements ControlValueAccessor {
54
55
  * @param fn The callback to register.
55
56
  * @ignore
56
57
  */
57
- registerOnChange(fn: (value: string | string[] | undefined) => void): void;
58
+ registerOnChange(fn: (value: AcceptableValue | AcceptableValue[] | undefined) => void): void;
58
59
  /**
59
60
  * Register a callback to be called when the toggle group is touched.
60
61
  * @param fn The callback to register.
61
62
  * @ignore
62
63
  */
63
64
  registerOnTouched(fn: () => void): void;
64
- private readonly accessorDisabled;
65
+ readonly accessorDisabled: import("@angular/core").WritableSignal<boolean>;
65
66
  /**
66
67
  * Set the disabled state of the toggle group.
67
68
  * @param isDisabled Whether the toggle group is disabled.
@@ -4,6 +4,7 @@ export interface IRdxToggleGroup {
4
4
  disabled: any;
5
5
  value: any;
6
6
  type: any;
7
+ accessorDisabled: any;
7
8
  }
8
9
  export declare const RdxToggleGroupToken: InjectionToken<IRdxToggleGroup>;
9
10
  export declare function injectToggleGroup(): IRdxToggleGroup;
@@ -79,7 +79,7 @@ export declare class RdxTooltipRootDirective {
79
79
  window: Window & typeof globalThis;
80
80
  primitiveConfigs?: import("./utils/types").PrimitiveConfigs;
81
81
  onDestroyCallbacks: Set<() => void>;
82
- "__#21763@#clickDomRootEventCallbacks": Set<(event: MouseEvent) => void>;
82
+ "__#22420@#clickDomRootEventCallbacks": Set<(event: MouseEvent) => void>;
83
83
  registerPrimitive<T extends object>(primitiveInstance: T): void;
84
84
  deregisterPrimitive<T extends object>(primitiveInstance: T): void;
85
85
  preventPrimitiveFromCdkEvent<T extends object>(primitiveInstance: T, eventType: import("./utils/types").EventType): void;
@@ -90,9 +90,9 @@ export declare class RdxTooltipRootDirective {
90
90
  primitivePreventedFromCdkEvent<T extends object>(primitiveInstance: T, eventType: import("./utils/types").EventType): boolean | undefined;
91
91
  addClickDomRootEventCallback(callback: (event: MouseEvent) => void): void;
92
92
  removeClickDomRootEventCallback(callback: (event: MouseEvent) => void): boolean;
93
- "__#21763@#setPreventPrimitiveFromCdkEvent"<T extends object, R extends import("./utils/types").EventType, K extends import("./utils/types").PrimitiveConfig[`prevent${Capitalize<R>}`]>(primitiveInstance: T, eventType: R, value: K): void;
94
- "__#21763@#registerOnDestroyCallbacks"(): void;
95
- "__#21763@#listenToClickDomRootEvent"(): void;
93
+ "__#22420@#setPreventPrimitiveFromCdkEvent"<T extends object, R extends import("./utils/types").EventType, K extends import("./utils/types").PrimitiveConfig[`prevent${Capitalize<R>}`]>(primitiveInstance: T, eventType: R, value: K): void;
94
+ "__#22420@#registerOnDestroyCallbacks"(): void;
95
+ "__#22420@#listenToClickDomRootEvent"(): void;
96
96
  } | null;
97
97
  /** @ignore */
98
98
  readonly destroyRef: DestroyRef;