@radix-ng/primitives 0.26.0 → 0.28.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.
- package/collapsible/src/collapsible-content.directive.d.ts +1 -1
- package/collapsible/src/collapsible-root.directive.d.ts +11 -11
- package/compodoc/documentation.json +13169 -6206
- package/dialog/src/dialog-close.directive.d.ts +1 -1
- package/fesm2022/radix-ng-primitives-collapsible.mjs +20 -27
- package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-core.mjs +1 -1
- package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dialog.mjs +2 -3
- package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-hover-card.mjs +1213 -0
- package/fesm2022/radix-ng-primitives-hover-card.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-popover.mjs +1 -3
- package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-presence.mjs +250 -0
- package/fesm2022/radix-ng-primitives-presence.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +72 -336
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle.mjs +15 -2
- package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tooltip.mjs +23 -5
- package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
- package/hover-card/README.md +3 -0
- package/hover-card/index.d.ts +20 -0
- package/hover-card/src/hover-card-anchor.directive.d.ts +28 -0
- package/hover-card/src/hover-card-anchor.token.d.ts +3 -0
- package/hover-card/src/hover-card-arrow.directive.d.ts +40 -0
- package/hover-card/src/hover-card-arrow.token.d.ts +3 -0
- package/hover-card/src/hover-card-close.directive.d.ts +18 -0
- package/hover-card/src/hover-card-close.token.d.ts +3 -0
- package/hover-card/src/hover-card-content-attributes.component.d.ts +25 -0
- package/hover-card/src/hover-card-content-attributes.token.d.ts +3 -0
- package/hover-card/src/hover-card-content.directive.d.ts +104 -0
- package/hover-card/src/hover-card-root.directive.d.ts +168 -0
- package/hover-card/src/hover-card-root.inject.d.ts +3 -0
- package/hover-card/src/hover-card-trigger.directive.d.ts +26 -0
- package/hover-card/src/hover-card.types.d.ts +18 -0
- package/hover-card/src/utils/cdk-event.service.d.ts +30 -0
- package/hover-card/src/utils/constants.d.ts +1 -0
- package/hover-card/src/utils/types.d.ts +7 -0
- package/package.json +9 -1
- package/popover/src/popover-root.directive.d.ts +4 -4
- package/popover/src/popover-trigger.directive.d.ts +1 -1
- package/presence/index.d.ts +4 -0
- package/presence/src/presence.d.ts +42 -0
- package/presence/src/transitions/transition.collapse.d.ts +15 -0
- package/presence/src/transitions/transition.toast.d.ts +3 -0
- package/presence/src/types.d.ts +15 -0
- package/presence/src/utils.d.ts +42 -0
- package/toggle/src/toggle.directive.d.ts +14 -1
- package/toggle-group/index.d.ts +0 -1
- package/toggle-group/src/toggle-group-item.directive.d.ts +13 -27
- package/toggle-group/src/toggle-group-item.token.d.ts +1 -0
- package/toggle-group/src/toggle-group.directive.d.ts +17 -45
- package/toggle-group/src/toggle-group.token.d.ts +2 -3
- package/tooltip/src/tooltip-content-attributes.component.d.ts +8 -0
- package/tooltip/src/tooltip-root.directive.d.ts +4 -4
- package/toggle-group/src/toggle-group-multiple.directive.d.ts +0 -99
@@ -0,0 +1,15 @@
|
|
1
|
+
import { Subject } from 'rxjs';
|
2
|
+
type TransitionOptions<T> = {
|
3
|
+
context?: T;
|
4
|
+
animation: boolean;
|
5
|
+
state?: 'continue' | 'stop';
|
6
|
+
transitionTimerDelayMs?: number;
|
7
|
+
};
|
8
|
+
type TransitionContext<T> = {
|
9
|
+
transition$: Subject<any>;
|
10
|
+
complete: () => void;
|
11
|
+
context: T;
|
12
|
+
};
|
13
|
+
type TransitionStartFn<T = any> = (element: HTMLElement, animation: boolean, context: T) => TransitionEndFn | void;
|
14
|
+
type TransitionEndFn = () => void;
|
15
|
+
export { TransitionContext, TransitionEndFn, TransitionOptions, TransitionStartFn };
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { NgZone } from '@angular/core';
|
2
|
+
import { Observable } from 'rxjs';
|
3
|
+
/**
|
4
|
+
* Ensures that the observable stream runs inside Angular's NgZone.
|
5
|
+
*
|
6
|
+
* This function is a higher-order function that takes an observable stream as input and ensures
|
7
|
+
* that all emissions, errors, and completion notifications are run inside Angular's NgZone. This
|
8
|
+
* is particularly useful for ensuring that change detection is triggered properly in Angular
|
9
|
+
* applications.
|
10
|
+
*
|
11
|
+
* @template T - The type of the items emitted by the observable.
|
12
|
+
* @param {NgZone} zone - The Angular zone to control the change detection context.
|
13
|
+
* @returns {(source: Observable<T>) => Observable<T>} - A function that takes an observable as input
|
14
|
+
* and returns an observable that runs inside Angular's NgZone.
|
15
|
+
*
|
16
|
+
* Example usage:
|
17
|
+
*
|
18
|
+
* const source$ = of('some value');
|
19
|
+
* const zoned$ = source$.pipe(runInZone(zone));
|
20
|
+
* zoned$.subscribe(value => {
|
21
|
+
* console.log('Value:', value);
|
22
|
+
* });
|
23
|
+
*/
|
24
|
+
declare function runInZone<T>(zone: NgZone): (source: Observable<T>) => Observable<T>;
|
25
|
+
/**
|
26
|
+
* Calculates the total transition duration in milliseconds for a given HTML element.
|
27
|
+
*
|
28
|
+
* This function retrieves the computed style of the specified element and extracts the
|
29
|
+
* transition duration and delay properties. It then converts these values from seconds
|
30
|
+
* to milliseconds and returns their sum, representing the total transition duration.
|
31
|
+
*
|
32
|
+
* @param {HTMLElement} element - The HTML element for which to calculate the transition duration.
|
33
|
+
* @returns {number} - The total transition duration in milliseconds.
|
34
|
+
*
|
35
|
+
* Example usage:
|
36
|
+
*
|
37
|
+
* const durationMs = getTransitionDurationMs(element);
|
38
|
+
* console.log(`Transition duration: ${durationMs} ms`);
|
39
|
+
*/
|
40
|
+
declare function getTransitionDurationMs(element: HTMLElement): number;
|
41
|
+
export { getTransitionDurationMs, runInZone };
|
42
|
+
export declare function triggerReflow(element: HTMLElement): DOMRect;
|
@@ -25,26 +25,39 @@ export interface ToggleProps {
|
|
25
25
|
}
|
26
26
|
export type DataState = 'on' | 'off';
|
27
27
|
export declare const TOGGLE_VALUE_ACCESSOR: any;
|
28
|
+
/**
|
29
|
+
* @group Components
|
30
|
+
*/
|
28
31
|
export declare class RdxToggleDirective implements ControlValueAccessor {
|
29
32
|
/**
|
30
33
|
* The pressed state of the toggle when it is initially rendered.
|
31
34
|
* Use when you do not need to control its pressed state.
|
35
|
+
*
|
36
|
+
* @group Props
|
32
37
|
*/
|
33
38
|
readonly defaultPressed: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
|
34
39
|
/**
|
35
40
|
* The controlled pressed state of the toggle.
|
36
41
|
* Must be used in conjunction with `onPressedChange`.
|
42
|
+
*
|
43
|
+
* @group Props
|
37
44
|
*/
|
38
45
|
readonly pressed: import("@angular/core").ModelSignal<boolean>;
|
39
46
|
/**
|
40
47
|
* When true, prevents the user from interacting with the toggle.
|
48
|
+
*
|
49
|
+
* @group Props
|
41
50
|
*/
|
42
51
|
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
|
43
52
|
/** @ignore */
|
53
|
+
readonly disabledModel: import("@angular/core").ModelSignal<boolean>;
|
54
|
+
/** @ignore */
|
44
55
|
readonly disabledState: import("@angular/core").Signal<boolean>;
|
45
56
|
protected readonly dataState: import("@angular/core").Signal<DataState>;
|
46
57
|
/**
|
47
58
|
* Event handler called when the pressed state of the toggle changes.
|
59
|
+
*
|
60
|
+
* @group Emits
|
48
61
|
*/
|
49
62
|
readonly onPressedChange: OutputEmitterRef<boolean>;
|
50
63
|
protected togglePressed(): void;
|
@@ -61,5 +74,5 @@ export declare class RdxToggleDirective implements ControlValueAccessor {
|
|
61
74
|
/** @ignore */
|
62
75
|
setDisabledState(isDisabled: boolean): void;
|
63
76
|
static ɵfac: i0.ɵɵFactoryDeclaration<RdxToggleDirective, 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, never>;
|
77
|
+
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>;
|
65
78
|
}
|
package/toggle-group/index.d.ts
CHANGED
@@ -1,45 +1,31 @@
|
|
1
|
-
import {
|
2
|
-
import { OnChanges, SimpleChanges } from '@angular/core';
|
1
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
3
2
|
import * as i0 from "@angular/core";
|
4
|
-
|
3
|
+
import * as i1 from "@radix-ng/primitives/roving-focus";
|
4
|
+
import * as i2 from "@radix-ng/primitives/toggle";
|
5
|
+
export declare class RdxToggleGroupItemDirective {
|
6
|
+
private readonly rdxToggleDirective;
|
7
|
+
private readonly rdxRovingFocusItemDirective;
|
5
8
|
/**
|
6
9
|
* Access the toggle group.
|
7
10
|
* @ignore
|
8
11
|
*/
|
9
|
-
protected readonly
|
10
|
-
private readonly elementRef;
|
12
|
+
protected readonly rootContext: import("@radix-ng/primitives/toggle-group").RdxToggleGroupDirective;
|
11
13
|
/**
|
12
14
|
* The value of this toggle button.
|
13
15
|
*/
|
14
|
-
value: string
|
16
|
+
readonly value: import("@angular/core").InputSignal<string>;
|
15
17
|
/**
|
16
18
|
* Whether this toggle button is disabled.
|
17
19
|
* @default false
|
18
20
|
*/
|
19
|
-
disabled: boolean
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
protected get checked(): boolean;
|
24
|
-
/**
|
25
|
-
* @ignore
|
26
|
-
*/
|
27
|
-
ngOnChanges(changes: SimpleChanges): void;
|
28
|
-
/**
|
29
|
-
* @ignore
|
30
|
-
*/
|
31
|
-
focus(): void;
|
21
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
|
22
|
+
private readonly isPressed;
|
23
|
+
private readonly isDisabled;
|
24
|
+
constructor();
|
32
25
|
/**
|
33
26
|
* @ignore
|
34
27
|
*/
|
35
28
|
toggle(): void;
|
36
|
-
/**
|
37
|
-
* Ensure the disabled state is propagated to the roving focus item.
|
38
|
-
* @internal
|
39
|
-
* @ignore
|
40
|
-
*/
|
41
|
-
updateDisabled(): void;
|
42
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<RdxToggleGroupItemDirective, never>;
|
43
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxToggleGroupItemDirective, "[rdxToggleGroupItem]", ["rdxToggleGroupItem"], { "value": { "alias": "value"; "required": true; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true,
|
44
|
-
static ngAcceptInputType_disabled: unknown;
|
30
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxToggleGroupItemDirective, "[rdxToggleGroupItem]", ["rdxToggleGroupItem"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.RdxRovingFocusItemDirective; inputs: { "focusable": "focusable"; "active": "active"; "allowShiftKey": "allowShiftKey"; }; outputs: {}; }, { directive: typeof i2.RdxToggleDirective; inputs: { "pressed": "pressed"; "disabled": "disabled"; }; outputs: {}; }]>;
|
45
31
|
}
|
@@ -1,3 +1,4 @@
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
2
2
|
import type { RdxToggleGroupItemDirective } from './toggle-group-item.directive';
|
3
3
|
export declare const RdxToggleGroupItemToken: InjectionToken<RdxToggleGroupItemDirective>;
|
4
|
+
export declare function injectToggleGroupItem(): RdxToggleGroupItemDirective;
|
@@ -1,39 +1,23 @@
|
|
1
|
-
import {
|
1
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
3
|
-
import type { RdxToggleGroupItemDirective } from './toggle-group-item.directive';
|
4
3
|
import * as i0 from "@angular/core";
|
5
|
-
|
4
|
+
import * as i1 from "@radix-ng/primitives/roving-focus";
|
5
|
+
export declare class RdxToggleGroupDirective implements ControlValueAccessor {
|
6
6
|
/**
|
7
|
-
*
|
7
|
+
* @ignore
|
8
8
|
*/
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
* @default 'horizontal'
|
13
|
-
*/
|
14
|
-
orientation: 'horizontal' | 'vertical';
|
9
|
+
readonly id: string;
|
10
|
+
readonly value: import("@angular/core").ModelSignal<string | string[] | undefined>;
|
11
|
+
readonly type: import("@angular/core").InputSignal<"single" | "multiple">;
|
15
12
|
/**
|
16
13
|
* Whether the toggle group is disabled.
|
17
14
|
* @default false
|
18
15
|
*/
|
19
|
-
disabled: boolean
|
20
|
-
/**
|
21
|
-
* Whether the toggle group roving focus should wrap.
|
22
|
-
* @default true
|
23
|
-
*/
|
24
|
-
wrap: boolean;
|
16
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
|
25
17
|
/**
|
26
18
|
* Event emitted when the selected toggle button changes.
|
27
19
|
*/
|
28
|
-
readonly
|
29
|
-
/**
|
30
|
-
* Access the buttons in the toggle group.
|
31
|
-
*/
|
32
|
-
protected buttons?: QueryList<RdxToggleGroupItemDirective>;
|
33
|
-
/**
|
34
|
-
* FocusKeyManager to manage keyboard interactions.
|
35
|
-
*/
|
36
|
-
private keyManager;
|
20
|
+
readonly onValueChange: import("@angular/core").OutputEmitterRef<string | string[] | undefined>;
|
37
21
|
/**
|
38
22
|
* The value change callback.
|
39
23
|
*/
|
@@ -42,49 +26,37 @@ export declare class RdxToggleGroupDirective implements OnChanges, AfterContentI
|
|
42
26
|
* onTouch function registered via registerOnTouch (ControlValueAccessor).
|
43
27
|
*/
|
44
28
|
protected onTouched?: () => void;
|
45
|
-
ngOnChanges(changes: SimpleChanges): void;
|
46
|
-
ngAfterContentInit(): void;
|
47
|
-
protected onFocusIn(): void;
|
48
|
-
protected handleKeydown(event: KeyboardEvent): void;
|
49
|
-
/**
|
50
|
-
* Determine if a value is selected.
|
51
|
-
* @param value The value to check.
|
52
|
-
* @returns Whether the value is selected.
|
53
|
-
* @internal
|
54
|
-
*/
|
55
|
-
isSelected(value: string): boolean;
|
56
29
|
/**
|
57
30
|
* Toggle a value.
|
58
31
|
* @param value The value to toggle.
|
59
|
-
* @
|
32
|
+
* @ignore
|
60
33
|
*/
|
61
34
|
toggle(value: string): void;
|
62
35
|
/**
|
63
36
|
* Select a value from Angular forms.
|
64
37
|
* @param value The value to select.
|
65
|
-
* @
|
38
|
+
* @ignore
|
66
39
|
*/
|
67
40
|
writeValue(value: string): void;
|
68
41
|
/**
|
69
42
|
* Register a callback to be called when the value changes.
|
70
43
|
* @param fn The callback to register.
|
71
|
-
* @
|
44
|
+
* @ignore
|
72
45
|
*/
|
73
|
-
registerOnChange(fn: (value: string |
|
46
|
+
registerOnChange(fn: (value: string | string[] | undefined) => void): void;
|
74
47
|
/**
|
75
48
|
* Register a callback to be called when the toggle group is touched.
|
76
49
|
* @param fn The callback to register.
|
77
|
-
* @
|
50
|
+
* @ignore
|
78
51
|
*/
|
79
52
|
registerOnTouched(fn: () => void): void;
|
53
|
+
private readonly accessorDisabled;
|
80
54
|
/**
|
81
55
|
* Set the disabled state of the toggle group.
|
82
56
|
* @param isDisabled Whether the toggle group is disabled.
|
83
|
-
* @
|
57
|
+
* @ignore
|
84
58
|
*/
|
85
59
|
setDisabledState(isDisabled: boolean): void;
|
86
60
|
static ɵfac: i0.ɵɵFactoryDeclaration<RdxToggleGroupDirective, never>;
|
87
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxToggleGroupDirective, "[rdxToggleGroup]", ["rdxToggleGroup"], { "value": { "alias": "value"; "required": false; }; "
|
88
|
-
static ngAcceptInputType_disabled: unknown;
|
89
|
-
static ngAcceptInputType_wrap: unknown;
|
61
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxToggleGroupDirective, "[rdxToggleGroup]", ["rdxToggleGroup"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "onValueChange": "onValueChange"; }, never, never, true, [{ directive: typeof i1.RdxRovingFocusGroupDirective; inputs: { "dir": "dir"; "orientation": "orientation"; "loop": "loop"; }; outputs: {}; }]>;
|
90
62
|
}
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
2
|
-
import type { RdxToggleGroupMultipleDirective } from './toggle-group-multiple.directive';
|
3
2
|
import type { RdxToggleGroupDirective } from './toggle-group.directive';
|
4
|
-
export declare const RdxToggleGroupToken: InjectionToken<RdxToggleGroupDirective
|
5
|
-
export declare function injectToggleGroup(): RdxToggleGroupDirective
|
3
|
+
export declare const RdxToggleGroupToken: InjectionToken<RdxToggleGroupDirective>;
|
4
|
+
export declare function injectToggleGroup(): RdxToggleGroupDirective;
|
@@ -11,6 +11,14 @@ export declare class RdxTooltipContentAttributesComponent {
|
|
11
11
|
/** @ignore */
|
12
12
|
protected onAnimationEnd(_: AnimationEvent): void;
|
13
13
|
/** @ignore */
|
14
|
+
protected pointerenter(): void;
|
15
|
+
/** @ignore */
|
16
|
+
protected pointerleave(): void;
|
17
|
+
/** @ignore */
|
18
|
+
protected focus(): void;
|
19
|
+
/** @ignore */
|
20
|
+
protected blur(): void;
|
21
|
+
/** @ignore */
|
14
22
|
private canAnimate;
|
15
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<RdxTooltipContentAttributesComponent, never>;
|
16
24
|
static ɵcmp: i0.ɵɵComponentDeclaration<RdxTooltipContentAttributesComponent, "[rdxTooltipContentAttributes]", never, {}, {}, never, ["*"], true, never>;
|
@@ -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
|
-
"__#
|
82
|
+
"__#11176@#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
|
-
"__#
|
94
|
-
"__#
|
95
|
-
"__#
|
93
|
+
"__#11176@#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
|
+
"__#11176@#registerOnDestroyCallbacks"(): void;
|
95
|
+
"__#11176@#listenToClickDomRootEvent"(): void;
|
96
96
|
} | null;
|
97
97
|
/** @ignore */
|
98
98
|
readonly destroyRef: DestroyRef;
|
@@ -1,99 +0,0 @@
|
|
1
|
-
import { AfterContentInit, EventEmitter, OnChanges, QueryList, SimpleChanges } from '@angular/core';
|
2
|
-
import { ControlValueAccessor } from '@angular/forms';
|
3
|
-
import type { RdxToggleGroupItemDirective } from './toggle-group-item.directive';
|
4
|
-
import * as i0 from "@angular/core";
|
5
|
-
export declare class RdxToggleGroupMultipleDirective implements OnChanges, AfterContentInit, ControlValueAccessor {
|
6
|
-
/**
|
7
|
-
* The selected toggle button.
|
8
|
-
*/
|
9
|
-
value: ReadonlyArray<string>;
|
10
|
-
/**
|
11
|
-
* The orientation of the toggle group.
|
12
|
-
* @default 'horizontal'
|
13
|
-
*/
|
14
|
-
orientation: 'horizontal' | 'vertical';
|
15
|
-
/**
|
16
|
-
* Whether the toggle group is disabled.
|
17
|
-
* @default false
|
18
|
-
*/
|
19
|
-
disabled: boolean;
|
20
|
-
/**
|
21
|
-
* Whether the toggle group roving focus should wrap.
|
22
|
-
* @default true
|
23
|
-
*/
|
24
|
-
wrap: boolean;
|
25
|
-
/**
|
26
|
-
* Event emitted when the selected toggle button changes.
|
27
|
-
*/
|
28
|
-
readonly valueChange: EventEmitter<readonly string[]>;
|
29
|
-
/**
|
30
|
-
* Access the buttons in the toggle group.
|
31
|
-
* @ignore
|
32
|
-
*/
|
33
|
-
protected buttons?: QueryList<RdxToggleGroupItemDirective>;
|
34
|
-
/**
|
35
|
-
* FocusKeyManager to manage keyboard interactions.
|
36
|
-
*/
|
37
|
-
private keyManager;
|
38
|
-
/**
|
39
|
-
* The value change callback.
|
40
|
-
* @ignore
|
41
|
-
*/
|
42
|
-
private onChange?;
|
43
|
-
/**
|
44
|
-
* onTouch function registered via registerOnTouch (ControlValueAccessor).
|
45
|
-
* @ignore
|
46
|
-
*/
|
47
|
-
protected onTouched?: () => void;
|
48
|
-
/**
|
49
|
-
* @ignore
|
50
|
-
*/
|
51
|
-
ngOnChanges(changes: SimpleChanges): void;
|
52
|
-
/**
|
53
|
-
* @ignore
|
54
|
-
*/
|
55
|
-
ngAfterContentInit(): void;
|
56
|
-
protected onFocusIn(): void;
|
57
|
-
protected handleKeydown(event: KeyboardEvent): void;
|
58
|
-
/**
|
59
|
-
* Determine if a value is selected.
|
60
|
-
* @param value The value to check.
|
61
|
-
* @returns Whether the value is selected.
|
62
|
-
* @ignore
|
63
|
-
*/
|
64
|
-
isSelected(value: string): boolean;
|
65
|
-
/**
|
66
|
-
* Toggle a value.
|
67
|
-
* @param value The value to toggle.
|
68
|
-
* @ignore
|
69
|
-
*/
|
70
|
-
toggle(value: string): void;
|
71
|
-
/**
|
72
|
-
* Select a value from Angular forms.
|
73
|
-
* @param value The value to select.
|
74
|
-
* @ignore
|
75
|
-
*/
|
76
|
-
writeValue(value: ReadonlyArray<string>): void;
|
77
|
-
/**
|
78
|
-
* Register a callback to be called when the value changes.
|
79
|
-
* @param fn The callback to register.
|
80
|
-
* @ignore
|
81
|
-
*/
|
82
|
-
registerOnChange(fn: (value: ReadonlyArray<string>) => void): void;
|
83
|
-
/**
|
84
|
-
* Register a callback to be called when the toggle group is touched.
|
85
|
-
* @param fn The callback to register.
|
86
|
-
* @ignore
|
87
|
-
*/
|
88
|
-
registerOnTouched(fn: () => void): void;
|
89
|
-
/**
|
90
|
-
* Set the disabled state of the toggle group.
|
91
|
-
* @param isDisabled Whether the toggle group is disabled.
|
92
|
-
* @ignore
|
93
|
-
*/
|
94
|
-
setDisabledState(isDisabled: boolean): void;
|
95
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RdxToggleGroupMultipleDirective, never>;
|
96
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxToggleGroupMultipleDirective, "[rdxToggleGroupMultiple]", ["rdxToggleGroupMultiple"], { "value": { "alias": "value"; "required": false; }; "orientation": { "alias": "orientation"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "wrap": { "alias": "wrap"; "required": false; }; "valueChange": { "alias": "valueChange"; "required": false; }; }, {}, ["buttons"], never, true, never>;
|
97
|
-
static ngAcceptInputType_disabled: unknown;
|
98
|
-
static ngAcceptInputType_wrap: unknown;
|
99
|
-
}
|