@radix-ng/primitives 0.4.0 → 0.6.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/alert-dialog/README.md +1 -0
- package/alert-dialog/index.d.ts +6 -0
- package/alert-dialog/src/alert-dialog-cancel.directive.d.ts +7 -0
- package/alert-dialog/src/alert-dialog-content.directive.d.ts +8 -0
- package/alert-dialog/src/alert-dialog-root.directive.d.ts +9 -0
- package/alert-dialog/src/alert-dialog-title.directive.d.ts +5 -0
- package/alert-dialog/src/alert-dialog-trigger.directive.d.ts +7 -0
- package/alert-dialog/src/alert-dialog.service.d.ts +14 -0
- package/avatar/index.d.ts +3 -1
- package/avatar/src/avatar-fallback.directive.d.ts +10 -17
- package/avatar/src/avatar-image.directive.d.ts +10 -11
- package/avatar/src/avatar-root.directive.d.ts +21 -0
- package/avatar/src/avatar.config.d.ts +3 -2
- package/checkbox/src/checkbox.directive.d.ts +2 -1
- package/collapsible/README.md +1 -0
- package/collapsible/index.d.ts +3 -0
- package/collapsible/src/collapsible-content.directive.d.ts +11 -0
- package/collapsible/src/collapsible-root.directive.d.ts +52 -0
- package/collapsible/src/collapsible-trigger.directive.d.ts +26 -0
- package/esm2022/alert-dialog/index.mjs +7 -0
- package/esm2022/alert-dialog/radix-ng-primitives-alert-dialog.mjs +5 -0
- package/esm2022/alert-dialog/src/alert-dialog-cancel.directive.mjs +24 -0
- package/esm2022/alert-dialog/src/alert-dialog-content.directive.mjs +26 -0
- package/esm2022/alert-dialog/src/alert-dialog-root.directive.mjs +24 -0
- package/esm2022/alert-dialog/src/alert-dialog-title.directive.mjs +14 -0
- package/esm2022/alert-dialog/src/alert-dialog-trigger.directive.mjs +24 -0
- package/esm2022/alert-dialog/src/alert-dialog.service.mjs +45 -0
- package/esm2022/avatar/index.mjs +2 -2
- package/esm2022/avatar/src/avatar-fallback.directive.mjs +23 -30
- package/esm2022/avatar/src/avatar-image.directive.mjs +29 -31
- package/esm2022/avatar/src/avatar-root.directive.mjs +38 -0
- package/esm2022/avatar/src/avatar.config.mjs +2 -2
- package/esm2022/checkbox/src/checkbox-indicator.directive.mjs +4 -4
- package/esm2022/checkbox/src/checkbox.directive.mjs +4 -4
- package/esm2022/collapsible/index.mjs +4 -0
- package/esm2022/collapsible/radix-ng-primitives-collapsible.mjs +5 -0
- package/esm2022/collapsible/src/collapsible-content.directive.mjs +26 -0
- package/esm2022/collapsible/src/collapsible-root.directive.mjs +114 -0
- package/esm2022/collapsible/src/collapsible-trigger.directive.mjs +49 -0
- package/esm2022/label/index.mjs +2 -2
- package/esm2022/label/src/label-root.directive.mjs +48 -0
- package/esm2022/progress/index.mjs +2 -2
- package/esm2022/progress/src/progress-indicator.directive.mjs +11 -10
- package/esm2022/progress/src/progress-root.directive.mjs +71 -0
- package/esm2022/radio/index.mjs +2 -4
- package/esm2022/radio/src/radio-indicator.directive.mjs +8 -13
- package/esm2022/radio/src/radio-item.directive.mjs +27 -42
- package/esm2022/radio/src/radio-root.directive.mjs +106 -0
- package/esm2022/roving-focus/index.mjs +1 -3
- package/esm2022/roving-focus/src/roving-focus-group.directive.mjs +12 -18
- package/esm2022/roving-focus/src/roving-focus-item.directive.mjs +21 -26
- package/esm2022/separator/src/separator.directive.mjs +12 -17
- package/esm2022/switch/index.mjs +2 -3
- package/esm2022/switch/src/switch-root.directive.mjs +74 -0
- package/esm2022/switch/src/switch-thumb.directive.mjs +10 -12
- package/esm2022/toggle/index.mjs +2 -2
- package/esm2022/toggle/src/toggle-root.directive.mjs +51 -0
- package/esm2022/toggle-group/index.mjs +6 -0
- package/esm2022/toggle-group/radix-ng-primitives-toggle-group.mjs +5 -0
- package/esm2022/toggle-group/src/toggle-group-button.directive.mjs +79 -0
- package/esm2022/toggle-group/src/toggle-group-button.token.mjs +6 -0
- package/esm2022/toggle-group/src/toggle-group-multi.directive.mjs +159 -0
- package/esm2022/toggle-group/src/toggle-group.directive.mjs +157 -0
- package/esm2022/toggle-group/src/toggle-group.token.mjs +6 -0
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs +150 -0
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-avatar.mjs +79 -90
- package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-checkbox.mjs +6 -6
- package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collapsible.mjs +190 -0
- package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-label.mjs +20 -18
- package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-progress.mjs +55 -49
- package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-radio.mjs +70 -100
- package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-roving-focus.mjs +22 -44
- package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-separator.mjs +12 -17
- package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-switch.mjs +49 -106
- package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +397 -0
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-toggle.mjs +15 -29
- package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
- package/label/index.d.ts +1 -1
- package/label/src/label-root.directive.d.ts +13 -0
- package/package.json +18 -19
- package/progress/index.d.ts +2 -1
- package/progress/src/progress-indicator.directive.d.ts +2 -2
- package/progress/src/progress-root.directive.d.ts +29 -0
- package/radio/index.d.ts +1 -3
- package/radio/src/radio-indicator.directive.d.ts +3 -9
- package/radio/src/radio-item.directive.d.ts +9 -28
- package/radio/src/{radio-group.directive.d.ts → radio-root.directive.d.ts} +24 -16
- package/roving-focus/index.d.ts +0 -2
- package/roving-focus/src/roving-focus-group.directive.d.ts +5 -7
- package/roving-focus/src/roving-focus-item.directive.d.ts +6 -8
- package/separator/src/separator.directive.d.ts +14 -8
- package/switch/index.d.ts +2 -2
- package/switch/src/switch-root.directive.d.ts +35 -0
- package/switch/src/switch-thumb.directive.d.ts +2 -5
- package/toggle/index.d.ts +2 -1
- package/toggle/src/toggle-root.directive.d.ts +32 -0
- package/toggle-group/README.md +3 -0
- package/toggle-group/index.d.ts +5 -0
- package/toggle-group/src/toggle-group-button.directive.d.ts +39 -0
- package/toggle-group/src/toggle-group-button.token.d.ts +4 -0
- package/toggle-group/src/toggle-group-multi.directive.d.ts +90 -0
- package/toggle-group/src/toggle-group.directive.d.ts +90 -0
- package/toggle-group/src/toggle-group.token.d.ts +5 -0
- package/avatar/src/avatar.directive.d.ts +0 -22
- package/avatar/src/avatar.token.d.ts +0 -4
- package/esm2022/avatar/src/avatar.directive.mjs +0 -38
- package/esm2022/avatar/src/avatar.token.mjs +0 -6
- package/esm2022/label/src/label.directive.mjs +0 -46
- package/esm2022/overlay/index.mjs +0 -5
- package/esm2022/overlay/radix-ng-primitives-overlay.mjs +0 -5
- package/esm2022/overlay/src/overlay-arrow.directive.mjs +0 -59
- package/esm2022/overlay/src/overlay-arrow.token.mjs +0 -3
- package/esm2022/overlay/src/overlay-trigger.directive.mjs +0 -279
- package/esm2022/overlay/src/overlay-trigger.token.mjs +0 -9
- package/esm2022/overlay/src/overlay.directive.mjs +0 -51
- package/esm2022/overlay/src/overlay.token.mjs +0 -3
- package/esm2022/progress/src/progress.directive.mjs +0 -62
- package/esm2022/progress/src/progress.token.mjs +0 -6
- package/esm2022/radio/src/radio-group.directive.mjs +0 -108
- package/esm2022/radio/src/radio-group.token.mjs +0 -6
- package/esm2022/radio/src/radio-item.token.mjs +0 -6
- package/esm2022/roving-focus/src/roving-focus-group.token.mjs +0 -9
- package/esm2022/roving-focus/src/roving-focus-item.token.mjs +0 -6
- package/esm2022/switch/src/switch.directive.mjs +0 -125
- package/esm2022/switch/src/switch.token.mjs +0 -6
- package/esm2022/toggle/src/toggle.directive.mjs +0 -65
- package/esm2022/tooltip/index.mjs +0 -5
- package/esm2022/tooltip/radix-ng-primitives-tooltip.mjs +0 -5
- package/esm2022/tooltip/src/tooltip-arrow.directive.mjs +0 -17
- package/esm2022/tooltip/src/tooltip-trigger.directive.mjs +0 -148
- package/esm2022/tooltip/src/tooltip-trigger.token.mjs +0 -6
- package/esm2022/tooltip/src/tooltip.config.mjs +0 -31
- package/esm2022/tooltip/src/tooltip.directive.mjs +0 -46
- package/esm2022/visually-hidden/index.mjs +0 -2
- package/esm2022/visually-hidden/radix-ng-primitives-visually-hidden.mjs +0 -5
- package/esm2022/visually-hidden/src/visually-hidden.directive.mjs +0 -42
- package/fesm2022/radix-ng-primitives-overlay.mjs +0 -399
- package/fesm2022/radix-ng-primitives-overlay.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-tooltip.mjs +0 -242
- package/fesm2022/radix-ng-primitives-tooltip.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs +0 -49
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +0 -1
- package/label/src/label.directive.d.ts +0 -14
- package/overlay/README.md +0 -1
- package/overlay/index.d.ts +0 -4
- package/overlay/src/overlay-arrow.directive.d.ts +0 -29
- package/overlay/src/overlay-arrow.token.d.ts +0 -3
- package/overlay/src/overlay-trigger.directive.d.ts +0 -163
- package/overlay/src/overlay-trigger.token.d.ts +0 -7
- package/overlay/src/overlay.directive.d.ts +0 -29
- package/overlay/src/overlay.token.d.ts +0 -3
- package/progress/src/progress.directive.d.ts +0 -26
- package/progress/src/progress.token.d.ts +0 -4
- package/radio/src/radio-group.token.d.ts +0 -4
- package/radio/src/radio-item.token.d.ts +0 -4
- package/roving-focus/src/roving-focus-group.token.d.ts +0 -7
- package/roving-focus/src/roving-focus-item.token.d.ts +0 -4
- package/switch/src/switch.directive.d.ts +0 -73
- package/switch/src/switch.token.d.ts +0 -4
- package/toggle/src/toggle.directive.d.ts +0 -30
- package/tooltip/README.md +0 -1
- package/tooltip/index.d.ts +0 -4
- package/tooltip/src/tooltip-arrow.directive.d.ts +0 -6
- package/tooltip/src/tooltip-trigger.directive.d.ts +0 -79
- package/tooltip/src/tooltip-trigger.token.d.ts +0 -4
- package/tooltip/src/tooltip.config.d.ts +0 -46
- package/tooltip/src/tooltip.directive.d.ts +0 -17
- package/visually-hidden/README.md +0 -3
- package/visually-hidden/index.d.ts +0 -1
- package/visually-hidden/src/visually-hidden.directive.d.ts +0 -11
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@radix-ng/primitives",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.6.0",
|
4
4
|
"license": "MIT",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -22,7 +22,6 @@
|
|
22
22
|
"@angular/cdk": "^17.0.0"
|
23
23
|
},
|
24
24
|
"dependencies": {
|
25
|
-
"@floating-ui/dom": "^1.6.3",
|
26
25
|
"tslib": "^2.3.0"
|
27
26
|
},
|
28
27
|
"sideEffects": false,
|
@@ -38,6 +37,12 @@
|
|
38
37
|
"esm": "./esm2022/radix-ng-primitives.mjs",
|
39
38
|
"default": "./fesm2022/radix-ng-primitives.mjs"
|
40
39
|
},
|
40
|
+
"./alert-dialog": {
|
41
|
+
"types": "./alert-dialog/index.d.ts",
|
42
|
+
"esm2022": "./esm2022/alert-dialog/radix-ng-primitives-alert-dialog.mjs",
|
43
|
+
"esm": "./esm2022/alert-dialog/radix-ng-primitives-alert-dialog.mjs",
|
44
|
+
"default": "./fesm2022/radix-ng-primitives-alert-dialog.mjs"
|
45
|
+
},
|
41
46
|
"./avatar": {
|
42
47
|
"types": "./avatar/index.d.ts",
|
43
48
|
"esm2022": "./esm2022/avatar/radix-ng-primitives-avatar.mjs",
|
@@ -50,18 +55,18 @@
|
|
50
55
|
"esm": "./esm2022/checkbox/radix-ng-primitives-checkbox.mjs",
|
51
56
|
"default": "./fesm2022/radix-ng-primitives-checkbox.mjs"
|
52
57
|
},
|
58
|
+
"./collapsible": {
|
59
|
+
"types": "./collapsible/index.d.ts",
|
60
|
+
"esm2022": "./esm2022/collapsible/radix-ng-primitives-collapsible.mjs",
|
61
|
+
"esm": "./esm2022/collapsible/radix-ng-primitives-collapsible.mjs",
|
62
|
+
"default": "./fesm2022/radix-ng-primitives-collapsible.mjs"
|
63
|
+
},
|
53
64
|
"./label": {
|
54
65
|
"types": "./label/index.d.ts",
|
55
66
|
"esm2022": "./esm2022/label/radix-ng-primitives-label.mjs",
|
56
67
|
"esm": "./esm2022/label/radix-ng-primitives-label.mjs",
|
57
68
|
"default": "./fesm2022/radix-ng-primitives-label.mjs"
|
58
69
|
},
|
59
|
-
"./overlay": {
|
60
|
-
"types": "./overlay/index.d.ts",
|
61
|
-
"esm2022": "./esm2022/overlay/radix-ng-primitives-overlay.mjs",
|
62
|
-
"esm": "./esm2022/overlay/radix-ng-primitives-overlay.mjs",
|
63
|
-
"default": "./fesm2022/radix-ng-primitives-overlay.mjs"
|
64
|
-
},
|
65
70
|
"./progress": {
|
66
71
|
"types": "./progress/index.d.ts",
|
67
72
|
"esm2022": "./esm2022/progress/radix-ng-primitives-progress.mjs",
|
@@ -98,17 +103,11 @@
|
|
98
103
|
"esm": "./esm2022/toggle/radix-ng-primitives-toggle.mjs",
|
99
104
|
"default": "./fesm2022/radix-ng-primitives-toggle.mjs"
|
100
105
|
},
|
101
|
-
"./
|
102
|
-
"types": "./
|
103
|
-
"esm2022": "./esm2022/
|
104
|
-
"esm": "./esm2022/
|
105
|
-
"default": "./fesm2022/radix-ng-primitives-
|
106
|
-
},
|
107
|
-
"./visually-hidden": {
|
108
|
-
"types": "./visually-hidden/index.d.ts",
|
109
|
-
"esm2022": "./esm2022/visually-hidden/radix-ng-primitives-visually-hidden.mjs",
|
110
|
-
"esm": "./esm2022/visually-hidden/radix-ng-primitives-visually-hidden.mjs",
|
111
|
-
"default": "./fesm2022/radix-ng-primitives-visually-hidden.mjs"
|
106
|
+
"./toggle-group": {
|
107
|
+
"types": "./toggle-group/index.d.ts",
|
108
|
+
"esm2022": "./esm2022/toggle-group/radix-ng-primitives-toggle-group.mjs",
|
109
|
+
"esm": "./esm2022/toggle-group/radix-ng-primitives-toggle-group.mjs",
|
110
|
+
"default": "./fesm2022/radix-ng-primitives-toggle-group.mjs"
|
112
111
|
}
|
113
112
|
}
|
114
113
|
}
|
package/progress/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as i0 from "@angular/core";
|
2
2
|
export declare class RdxProgressIndicatorDirective {
|
3
|
-
|
3
|
+
readonly _progress: import("./progress-root.directive").RdxProgressRootDirective;
|
4
4
|
static ɵfac: i0.ɵɵFactoryDeclaration<RdxProgressIndicatorDirective, never>;
|
5
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxProgressIndicatorDirective, "[
|
5
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxProgressIndicatorDirective, "div[ProgressIndicator]", ["ProgressIndicator"], {}, {}, never, never, true, never>;
|
6
6
|
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
export declare function injectProgress(): RdxProgressRootDirective;
|
3
|
+
export type ProgressState = 'indeterminate' | 'loading' | 'complete';
|
4
|
+
export interface ProgressProps {
|
5
|
+
value?: number | null | undefined;
|
6
|
+
max?: number;
|
7
|
+
getValueLabel?: string;
|
8
|
+
}
|
9
|
+
export declare class RdxProgressRootDirective implements ProgressProps {
|
10
|
+
id: string;
|
11
|
+
value: number;
|
12
|
+
/**
|
13
|
+
* @default 100
|
14
|
+
*/
|
15
|
+
max: number;
|
16
|
+
valueLabel: (value: number, max: number) => string;
|
17
|
+
/**
|
18
|
+
* Get the state of the progress bar.
|
19
|
+
* @returns 'indeterminate' | 'loading' | 'complete'
|
20
|
+
* @internal
|
21
|
+
*/
|
22
|
+
get state(): ProgressState;
|
23
|
+
private getProgressState;
|
24
|
+
private defaultGetValueLabel;
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxProgressRootDirective, never>;
|
26
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxProgressRootDirective, "div[ProgressRoot]", ["ProgressRoot"], { "id": { "alias": "id"; "required": false; }; "value": { "alias": "rdxValue"; "required": false; }; "max": { "alias": "rdxMax"; "required": false; }; "valueLabel": { "alias": "rdxValueLabel"; "required": false; }; }, {}, never, never, true, never>;
|
27
|
+
static ngAcceptInputType_value: unknown;
|
28
|
+
static ngAcceptInputType_max: unknown;
|
29
|
+
}
|
package/radio/index.d.ts
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
export * from './src/radio-
|
2
|
-
export * from './src/radio-group.token';
|
1
|
+
export * from './src/radio-root.directive';
|
3
2
|
export * from './src/radio-indicator.directive';
|
4
3
|
export * from './src/radio-item.directive';
|
5
|
-
export * from './src/radio-item.token';
|
@@ -1,13 +1,7 @@
|
|
1
1
|
import * as i0 from "@angular/core";
|
2
2
|
export declare class RdxRadioIndicatorDirective {
|
3
|
-
|
4
|
-
|
5
|
-
*/
|
6
|
-
protected readonly radioGroup: import("@radix-ng/primitives/radio").RdxRadioGroupDirective;
|
7
|
-
/**
|
8
|
-
* Access the radio group item.
|
9
|
-
*/
|
10
|
-
protected readonly radioItem: import("@radix-ng/primitives/radio").RdxRadioItemDirective;
|
3
|
+
protected readonly radioGroup: import("./radio-root.directive").RdxRadioGroupDirective;
|
4
|
+
protected readonly radioItem: import("./radio-item.directive").RdxRadioItemDirective;
|
11
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<RdxRadioIndicatorDirective, never>;
|
12
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxRadioIndicatorDirective, "[
|
6
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxRadioIndicatorDirective, "[RadioIndicator]", ["RadioIndicator"], {}, {}, never, never, true, never>;
|
13
7
|
}
|
@@ -1,36 +1,17 @@
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
1
2
|
import * as i0 from "@angular/core";
|
2
3
|
import * as i1 from "@radix-ng/primitives/roving-focus";
|
4
|
+
export declare const RdxRadioItemToken: InjectionToken<RdxRadioItemDirective>;
|
5
|
+
export declare function injectRadioItem(): RdxRadioItemDirective;
|
3
6
|
export declare class RdxRadioItemDirective {
|
4
|
-
|
5
|
-
|
6
|
-
*/
|
7
|
-
protected readonly radioGroup: import("@radix-ng/primitives/radio").RdxRadioGroupDirective;
|
8
|
-
/**
|
9
|
-
* The value of the radio item.
|
10
|
-
*/
|
7
|
+
protected readonly radioGroup: import("./radio-root.directive").RdxRadioGroupDirective;
|
8
|
+
id: string;
|
11
9
|
value: string;
|
12
|
-
/**
|
13
|
-
* Whether the radio item is disabled.
|
14
|
-
* @default false
|
15
|
-
*/
|
16
10
|
disabled: boolean;
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
* @internal
|
21
|
-
*/
|
22
|
-
protected onKeydown(event: KeyboardEvent): void;
|
23
|
-
/**
|
24
|
-
* When the item receives focus, select it.
|
25
|
-
* @internal
|
26
|
-
*/
|
27
|
-
protected onFocus(): void;
|
28
|
-
/**
|
29
|
-
* When the item receives a click, select it.
|
30
|
-
* @internal
|
31
|
-
*/
|
32
|
-
protected onClick(): void;
|
11
|
+
_onKeydown(event: KeyboardEvent): void;
|
12
|
+
_onFocus(): void;
|
13
|
+
_onClick(): void;
|
33
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<RdxRadioItemDirective, never>;
|
34
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxRadioItemDirective, "
|
15
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxRadioItemDirective, "[RadioItem]", ["RadioItem"], { "id": { "alias": "id"; "required": false; }; "value": { "alias": "value"; "required": true; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.RdxRovingFocusItemDirective; inputs: {}; outputs: {}; }]>;
|
35
16
|
static ngAcceptInputType_disabled: unknown;
|
36
17
|
}
|
@@ -1,25 +1,32 @@
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
1
|
+
import { ChangeDetectorRef, EventEmitter, InjectionToken } from '@angular/core';
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
3
3
|
import * as i0 from "@angular/core";
|
4
4
|
import * as i1 from "@radix-ng/primitives/roving-focus";
|
5
|
-
export declare
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
export declare const RdxRadioGroupToken: InjectionToken<RdxRadioGroupDirective>;
|
6
|
+
export declare function injectRadioGroup(): RdxRadioGroupDirective;
|
7
|
+
interface RadioGroupProps {
|
8
|
+
name?: string;
|
9
|
+
disabled?: boolean;
|
10
|
+
defaultValue?: string;
|
11
|
+
value?: string;
|
12
|
+
onValueChange?: EventEmitter<string>;
|
13
|
+
}
|
14
|
+
export declare class RdxRadioGroupDirective implements RadioGroupProps, ControlValueAccessor {
|
15
|
+
private readonly changeDetector;
|
9
16
|
value?: string;
|
10
|
-
/**
|
11
|
-
* Whether the radio group is disabled.
|
12
|
-
*/
|
13
17
|
disabled: boolean;
|
14
18
|
/**
|
15
|
-
* The orientation of the radio group.
|
16
|
-
*
|
19
|
+
* The orientation of the radio group only vertical.
|
20
|
+
* Horizontal radio buttons can sometimes be challenging to scan and localize.
|
21
|
+
* The horizontal arrangement of radio buttons may also lead to difficulties in determining which
|
22
|
+
* label corresponds to which button: whether the label is above or below the button.
|
23
|
+
* @default 'vertical'
|
17
24
|
*/
|
18
|
-
|
25
|
+
readonly _orientation = "vertical";
|
19
26
|
/**
|
20
27
|
* Event emitted when the value of the radio group changes.
|
21
28
|
*/
|
22
|
-
readonly
|
29
|
+
readonly onValueChange: EventEmitter<string>;
|
23
30
|
/**
|
24
31
|
* The callback function to call when the value of the radio group changes.
|
25
32
|
* @internal
|
@@ -30,6 +37,7 @@ export declare class RdxRadioGroupDirective implements ControlValueAccessor {
|
|
30
37
|
* @internal
|
31
38
|
*/
|
32
39
|
private onTouched?;
|
40
|
+
constructor(changeDetector: ChangeDetectorRef);
|
33
41
|
/**
|
34
42
|
* Select a radio item.
|
35
43
|
* @param value The value of the radio item to select.
|
@@ -55,11 +63,11 @@ export declare class RdxRadioGroupDirective implements ControlValueAccessor {
|
|
55
63
|
*/
|
56
64
|
setDisabledState(isDisabled: boolean): void;
|
57
65
|
/**
|
58
|
-
* When focus leaves the radio group
|
59
|
-
* @internal
|
66
|
+
* When focus leaves the radio group.
|
60
67
|
*/
|
61
|
-
|
68
|
+
_onFocusout(): void;
|
62
69
|
static ɵfac: i0.ɵɵFactoryDeclaration<RdxRadioGroupDirective, never>;
|
63
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxRadioGroupDirective, "[
|
70
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxRadioGroupDirective, "div[RadioRoot]", ["RadioRoot"], { "value": { "alias": "rdxValue"; "required": false; }; "disabled": { "alias": "rdxDisabled"; "required": false; }; }, { "onValueChange": "rdxOnValueChange"; }, never, never, true, [{ directive: typeof i1.RdxRovingFocusGroupDirective; inputs: {}; outputs: {}; }]>;
|
64
71
|
static ngAcceptInputType_disabled: unknown;
|
65
72
|
}
|
73
|
+
export {};
|
package/roving-focus/index.d.ts
CHANGED
@@ -2,6 +2,8 @@ import { FocusKeyManager } from '@angular/cdk/a11y';
|
|
2
2
|
import { OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
3
3
|
import type { RdxRovingFocusItemDirective } from './roving-focus-item.directive';
|
4
4
|
import * as i0 from "@angular/core";
|
5
|
+
export type Orientation = 'horizontal' | 'vertical';
|
6
|
+
export declare function injectRovingFocusGroup(): RdxRovingFocusGroupDirective;
|
5
7
|
export declare class RdxRovingFocusGroupDirective implements OnInit, OnChanges, OnDestroy {
|
6
8
|
private readonly directionality;
|
7
9
|
private readonly destroyRef;
|
@@ -10,16 +12,12 @@ export declare class RdxRovingFocusGroupDirective implements OnInit, OnChanges,
|
|
10
12
|
* We don't use ContentChildren as dynamically added items may not be in the correct order.
|
11
13
|
*/
|
12
14
|
private readonly items;
|
13
|
-
/**
|
14
|
-
* Create the focus key manager instance.
|
15
|
-
* @internal
|
16
|
-
*/
|
17
15
|
readonly keyManager: FocusKeyManager<RdxRovingFocusItemDirective>;
|
18
16
|
/**
|
19
17
|
* Determine the orientation of the roving focus group.
|
20
18
|
* @default vertical
|
21
19
|
*/
|
22
|
-
orientation:
|
20
|
+
orientation: Orientation;
|
23
21
|
/**
|
24
22
|
* Determine if focus should wrap when the end or beginning is reached.
|
25
23
|
* @default true
|
@@ -48,8 +46,8 @@ export declare class RdxRovingFocusGroupDirective implements OnInit, OnChanges,
|
|
48
46
|
* Set the orientation of the roving focus group.
|
49
47
|
* @param orientation The orientation of the roving focus group.
|
50
48
|
*/
|
51
|
-
setOrientation(orientation:
|
49
|
+
setOrientation(orientation: Orientation): void;
|
52
50
|
static ɵfac: i0.ɵɵFactoryDeclaration<RdxRovingFocusGroupDirective, never>;
|
53
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxRovingFocusGroupDirective, "[rdxRovingFocusGroup]", never, { "orientation": { "alias": "
|
51
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxRovingFocusGroupDirective, "[rdxRovingFocusGroup]", never, { "orientation": { "alias": "rdxRovingFocusGroupOrientation"; "required": false; }; "wrap": { "alias": "rdxRovingFocusGroupWrap"; "required": false; }; }, {}, never, never, true, never>;
|
54
52
|
static ngAcceptInputType_wrap: unknown;
|
55
53
|
}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { FocusableOption } from '@angular/cdk/a11y';
|
2
2
|
import { OnDestroy, OnInit } from '@angular/core';
|
3
3
|
import * as i0 from "@angular/core";
|
4
|
+
export declare function injectRovingFocusItem(): RdxRovingFocusItemDirective;
|
4
5
|
export declare class RdxRovingFocusItemDirective implements OnInit, OnDestroy, FocusableOption {
|
5
6
|
/**
|
6
7
|
* Access the group the roving focus item belongs to.
|
@@ -26,22 +27,19 @@ export declare class RdxRovingFocusItemDirective implements OnInit, OnDestroy, F
|
|
26
27
|
* Define if the item is disabled.
|
27
28
|
*/
|
28
29
|
disabled: boolean;
|
29
|
-
/**
|
30
|
-
* Derive the tabindex of the roving focus item.
|
31
|
-
* @internal
|
32
|
-
*/
|
33
|
-
get tabindex(): number;
|
34
30
|
ngOnInit(): void;
|
35
31
|
ngOnDestroy(): void;
|
36
32
|
/**
|
37
33
|
* Handle key events on the roving focus item.
|
38
34
|
* @param event The key event.
|
39
|
-
* @internal
|
40
35
|
*/
|
41
|
-
|
36
|
+
_onKeydown(event: KeyboardEvent): void;
|
37
|
+
/**
|
38
|
+
* Derive the tabindex of the roving focus item.
|
39
|
+
*/
|
40
|
+
_tabindex(): number;
|
42
41
|
/**
|
43
42
|
* Focus the roving focus item.
|
44
|
-
* @param origin The origin of the focus request.
|
45
43
|
* @internal
|
46
44
|
*/
|
47
45
|
focus(): void;
|
@@ -1,16 +1,22 @@
|
|
1
1
|
import * as i0 from "@angular/core";
|
2
|
-
|
2
|
+
declare const ORIENTATIONS: readonly ["horizontal", "vertical"];
|
3
|
+
export type Orientation = (typeof ORIENTATIONS)[number];
|
4
|
+
export interface SeparatorProps {
|
3
5
|
/**
|
4
|
-
*
|
5
|
-
* @default 'horizontal'
|
6
|
+
* Either `vertical` or `horizontal`. Defaults to `horizontal`.
|
6
7
|
*/
|
7
|
-
orientation
|
8
|
+
orientation?: Orientation;
|
8
9
|
/**
|
9
|
-
* Whether the
|
10
|
-
*
|
10
|
+
* Whether the component is purely decorative. When true, accessibility-related attributes
|
11
|
+
* are updated so that the rendered element is removed from the accessibility tree.
|
11
12
|
*/
|
13
|
+
decorative?: boolean;
|
14
|
+
}
|
15
|
+
export declare class RdxSeparatorRootDirective implements SeparatorProps {
|
16
|
+
orientation: Orientation;
|
12
17
|
decorative: boolean;
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
14
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxSeparatorRootDirective, never>;
|
19
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxSeparatorRootDirective, "div[SeparatorRoot]", never, { "orientation": { "alias": "rdxOrientation"; "required": false; }; "decorative": { "alias": "rdxDecorative"; "required": false; }; }, {}, never, never, true, never>;
|
15
20
|
static ngAcceptInputType_decorative: unknown;
|
16
21
|
}
|
22
|
+
export {};
|
package/switch/index.d.ts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
export * from './src/switch-thumb.directive';
|
2
|
-
export * from './src/switch.directive';
|
3
|
-
export
|
2
|
+
export * from './src/switch-root.directive';
|
3
|
+
export type { SwitchProps } from './src/switch-root.directive';
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import { EventEmitter, InjectionToken } from '@angular/core';
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare const RdxSwitchToken: InjectionToken<RdxSwitchRootDirective>;
|
5
|
+
export declare function injectSwitch(): RdxSwitchRootDirective;
|
6
|
+
export interface SwitchProps {
|
7
|
+
checked?: boolean;
|
8
|
+
defaultChecked?: boolean;
|
9
|
+
required?: boolean;
|
10
|
+
onCheckedChange?: EventEmitter<boolean>;
|
11
|
+
}
|
12
|
+
export declare class RdxSwitchRootDirective implements SwitchProps, ControlValueAccessor {
|
13
|
+
required: boolean;
|
14
|
+
checked: boolean;
|
15
|
+
disabled: boolean;
|
16
|
+
readonly onCheckedChange: EventEmitter<boolean>;
|
17
|
+
/**
|
18
|
+
* The method to be called in order to update ngModel.
|
19
|
+
*/
|
20
|
+
_onChange?: (checked: boolean) => void;
|
21
|
+
/**
|
22
|
+
* onTouch function registered via registerOnTouch (ControlValueAccessor).
|
23
|
+
*/
|
24
|
+
_onTouched?: () => void;
|
25
|
+
registerOnChange(fn: (checked: boolean) => void): void;
|
26
|
+
registerOnTouched(fn: () => void): void;
|
27
|
+
writeValue(checked: boolean): void;
|
28
|
+
setDisabledState(isDisabled: boolean): void;
|
29
|
+
_toggle(): void;
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxSwitchRootDirective, never>;
|
31
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxSwitchRootDirective, "button[SwitchRoot]", ["SwitchRoot"], { "required": { "alias": "required"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "onCheckedChange": "onCheckedChange"; }, never, never, true, never>;
|
32
|
+
static ngAcceptInputType_required: unknown;
|
33
|
+
static ngAcceptInputType_checked: unknown;
|
34
|
+
static ngAcceptInputType_disabled: unknown;
|
35
|
+
}
|
@@ -1,9 +1,6 @@
|
|
1
1
|
import * as i0 from "@angular/core";
|
2
2
|
export declare class RdxSwitchThumbDirective {
|
3
|
-
|
4
|
-
* Access the switch directive.
|
5
|
-
*/
|
6
|
-
protected readonly switch: import("@radix-ng/primitives/switch").RdxSwitchDirective;
|
3
|
+
protected readonly switchRoot: import("./switch-root.directive").RdxSwitchRootDirective;
|
7
4
|
static ɵfac: i0.ɵɵFactoryDeclaration<RdxSwitchThumbDirective, never>;
|
8
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxSwitchThumbDirective, "[
|
5
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxSwitchThumbDirective, "span[SwitchThumb]", ["SwitchThumb"], {}, {}, never, never, true, never>;
|
9
6
|
}
|
package/toggle/index.d.ts
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
export * from './src/toggle.directive';
|
1
|
+
export * from './src/toggle-root.directive';
|
2
|
+
export type { ToggleProps } from './src/toggle-root.directive';
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export interface ToggleProps {
|
4
|
+
/**
|
5
|
+
* The controlled state of the toggle.
|
6
|
+
*/
|
7
|
+
pressed?: boolean;
|
8
|
+
/**
|
9
|
+
* The state of the toggle when initially rendered. Use `defaultPressed`
|
10
|
+
* if you do not need to control the state of the toggle.
|
11
|
+
* @defaultValue false
|
12
|
+
*/
|
13
|
+
defaultPressed?: boolean;
|
14
|
+
/**
|
15
|
+
* The callback that fires when the state of the toggle changes.
|
16
|
+
*/
|
17
|
+
onPressedChange?: EventEmitter<boolean>;
|
18
|
+
}
|
19
|
+
export declare class RdxToggleRootDirective implements ToggleProps {
|
20
|
+
pressed: boolean;
|
21
|
+
disabled: boolean;
|
22
|
+
id: string;
|
23
|
+
/**
|
24
|
+
* Event emitted when the toggle is pressed.
|
25
|
+
*/
|
26
|
+
readonly onPressedChange: EventEmitter<boolean>;
|
27
|
+
_toggle(event: MouseEvent): void;
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxToggleRootDirective, never>;
|
29
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxToggleRootDirective, "button[ToggleRoot]", ["ToggleRoot"], { "pressed": { "alias": "rdxTogglePressed"; "required": false; }; "disabled": { "alias": "rdxToggleDisabled"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, { "onPressedChange": "rdxToggleOnPressedChange"; }, never, never, true, never>;
|
30
|
+
static ngAcceptInputType_pressed: unknown;
|
31
|
+
static ngAcceptInputType_disabled: unknown;
|
32
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
import * as i1 from "@radix-ng/primitives/roving-focus";
|
4
|
+
export declare class RdxToggleGroupButtonDirective implements OnChanges {
|
5
|
+
/**
|
6
|
+
* Access the toggle group.
|
7
|
+
*/
|
8
|
+
protected readonly toggleGroup: import("@radix-ng/primitives/toggle-group").RdxToggleGroupDirective | import("@radix-ng/primitives/toggle-group").RdxToggleGroupMultiDirective;
|
9
|
+
/**
|
10
|
+
* Access the roving focus item.
|
11
|
+
*/
|
12
|
+
private readonly rovingFocusItem;
|
13
|
+
/**
|
14
|
+
* The value of this toggle button.
|
15
|
+
*/
|
16
|
+
value: string;
|
17
|
+
/**
|
18
|
+
* Whether this toggle button is disabled.
|
19
|
+
* @default false
|
20
|
+
*/
|
21
|
+
disabled: boolean;
|
22
|
+
/**
|
23
|
+
* Whether this toggle button is checked.
|
24
|
+
*/
|
25
|
+
protected get checked(): boolean;
|
26
|
+
ngOnChanges(changes: SimpleChanges): void;
|
27
|
+
/**
|
28
|
+
* Toggle this toggle button.
|
29
|
+
*/
|
30
|
+
toggle(): void;
|
31
|
+
/**
|
32
|
+
* Ensure the disabled state is propagated to the roving focus item.
|
33
|
+
* @internal
|
34
|
+
*/
|
35
|
+
updateDisabled(): void;
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxToggleGroupButtonDirective, never>;
|
37
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxToggleGroupButtonDirective, "button[rdxToggleGroupButton]", never, { "value": { "alias": "rdxToggleGroupButtonValue"; "required": true; }; "disabled": { "alias": "rdxToggleGroupButtonDisabled"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.RdxRovingFocusItemDirective; inputs: {}; outputs: {}; }]>;
|
38
|
+
static ngAcceptInputType_disabled: unknown;
|
39
|
+
}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
2
|
+
import type { RdxToggleGroupButtonDirective } from './toggle-group-button.directive';
|
3
|
+
export declare const RdxToggleGroupButtonToken: InjectionToken<RdxToggleGroupButtonDirective>;
|
4
|
+
export declare function injectToggleGroupButton(): RdxToggleGroupButtonDirective;
|
@@ -0,0 +1,90 @@
|
|
1
|
+
import { AfterContentInit, EventEmitter, OnChanges, OnInit, QueryList, SimpleChanges } from '@angular/core';
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
3
|
+
import type { RdxToggleGroupButtonDirective } from './toggle-group-button.directive';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
import * as i1 from "@radix-ng/primitives/roving-focus";
|
6
|
+
export declare class RdxToggleGroupMultiDirective implements OnInit, OnChanges, AfterContentInit, ControlValueAccessor {
|
7
|
+
/**
|
8
|
+
* Access the roving focus group
|
9
|
+
*/
|
10
|
+
private readonly rovingFocusGroup;
|
11
|
+
/**
|
12
|
+
* The selected toggle button.
|
13
|
+
*/
|
14
|
+
value: ReadonlyArray<string>;
|
15
|
+
/**
|
16
|
+
* The orientation of the toggle group.
|
17
|
+
* @default 'horizontal'
|
18
|
+
*/
|
19
|
+
orientation: 'horizontal' | 'vertical';
|
20
|
+
/**
|
21
|
+
* Whether the toggle group is disabled.
|
22
|
+
* @default false
|
23
|
+
*/
|
24
|
+
disabled: boolean;
|
25
|
+
/**
|
26
|
+
* Whether the toggle group roving focus should wrap.
|
27
|
+
* @default true
|
28
|
+
*/
|
29
|
+
wrap: boolean;
|
30
|
+
/**
|
31
|
+
* Event emitted when the selected toggle button changes.
|
32
|
+
*/
|
33
|
+
readonly valueChange: EventEmitter<readonly string[]>;
|
34
|
+
/**
|
35
|
+
* Access the buttons in the toggle group.
|
36
|
+
*/
|
37
|
+
protected buttons?: QueryList<RdxToggleGroupButtonDirective>;
|
38
|
+
/**
|
39
|
+
* The value change callback.
|
40
|
+
*/
|
41
|
+
private onChange?;
|
42
|
+
/**
|
43
|
+
* onTouch function registered via registerOnTouch (ControlValueAccessor).
|
44
|
+
*/
|
45
|
+
protected onTouched?: () => void;
|
46
|
+
ngOnInit(): void;
|
47
|
+
ngOnChanges(changes: SimpleChanges): void;
|
48
|
+
ngAfterContentInit(): 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
|
+
/**
|
57
|
+
* Toggle a value.
|
58
|
+
* @param value The value to toggle.
|
59
|
+
* @internal
|
60
|
+
*/
|
61
|
+
toggle(value: string): void;
|
62
|
+
/**
|
63
|
+
* Select a value from Angular forms.
|
64
|
+
* @param value The value to select.
|
65
|
+
* @internal
|
66
|
+
*/
|
67
|
+
writeValue(value: ReadonlyArray<string>): void;
|
68
|
+
/**
|
69
|
+
* Register a callback to be called when the value changes.
|
70
|
+
* @param fn The callback to register.
|
71
|
+
* @internal
|
72
|
+
*/
|
73
|
+
registerOnChange(fn: (value: ReadonlyArray<string>) => void): void;
|
74
|
+
/**
|
75
|
+
* Register a callback to be called when the toggle group is touched.
|
76
|
+
* @param fn The callback to register.
|
77
|
+
* @internal
|
78
|
+
*/
|
79
|
+
registerOnTouched(fn: () => void): void;
|
80
|
+
/**
|
81
|
+
* Set the disabled state of the toggle group.
|
82
|
+
* @param isDisabled Whether the toggle group is disabled.
|
83
|
+
* @internal
|
84
|
+
*/
|
85
|
+
setDisabledState(isDisabled: boolean): void;
|
86
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxToggleGroupMultiDirective, never>;
|
87
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxToggleGroupMultiDirective, "[rdxToggleGroupMulti]", never, { "value": { "alias": "rdxToggleGroupMultiValue"; "required": false; }; "orientation": { "alias": "rdxToggleGroupMultiOrientation"; "required": false; }; "disabled": { "alias": "rdxToggleGroupMultiDisabled"; "required": false; }; "wrap": { "alias": "rdxToggleGroupMultiWrap"; "required": false; }; "valueChange": { "alias": "rdxToggleGroupMultiValueChange"; "required": false; }; }, {}, ["buttons"], never, true, [{ directive: typeof i1.RdxRovingFocusGroupDirective; inputs: { "rdxRovingFocusGroupWrap": "wrap"; "rdxRovingFocusGroupOrientation": "orientation"; }; outputs: {}; }]>;
|
88
|
+
static ngAcceptInputType_disabled: unknown;
|
89
|
+
static ngAcceptInputType_wrap: unknown;
|
90
|
+
}
|