@radix-ng/primitives 0.15.0 → 0.17.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/aspect-ratio/src/aspect-ratio.directive.d.ts +2 -0
- package/checkbox/src/checkbox-input.directive.d.ts +2 -1
- package/compodoc/documentation.json +2755 -1148
- package/core/index.d.ts +1 -0
- package/core/src/is-inside-form.d.ts +2 -0
- package/dialog/src/dialog.config.d.ts +1 -1
- package/esm2022/accordion/index.mjs +5 -5
- package/esm2022/accordion/src/accordion-content.directive.mjs +4 -4
- package/esm2022/accordion/src/accordion-header.directive.mjs +4 -4
- package/esm2022/accordion/src/accordion-item.directive.mjs +4 -4
- package/esm2022/accordion/src/accordion-root.directive.mjs +4 -4
- package/esm2022/accordion/src/accordion-trigger.directive.mjs +4 -4
- package/esm2022/alert-dialog/index.mjs +5 -5
- package/esm2022/alert-dialog/src/alert-dialog-cancel.directive.mjs +4 -4
- package/esm2022/alert-dialog/src/alert-dialog-content.directive.mjs +4 -4
- package/esm2022/alert-dialog/src/alert-dialog-root.directive.mjs +4 -4
- package/esm2022/alert-dialog/src/alert-dialog-title.directive.mjs +4 -4
- package/esm2022/alert-dialog/src/alert-dialog-trigger.directive.mjs +4 -4
- package/esm2022/alert-dialog/src/alert-dialog.service.mjs +4 -4
- package/esm2022/aspect-ratio/src/aspect-ratio.directive.mjs +6 -4
- package/esm2022/avatar/src/avatar-fallback.directive.mjs +4 -4
- package/esm2022/avatar/src/avatar-image.directive.mjs +5 -4
- package/esm2022/avatar/src/avatar-root.directive.mjs +4 -4
- package/esm2022/checkbox/src/checkbox-button.directive.mjs +4 -4
- package/esm2022/checkbox/src/checkbox-indicator.directive.mjs +4 -4
- package/esm2022/checkbox/src/checkbox-input.directive.mjs +7 -4
- package/esm2022/checkbox/src/checkbox.directive.mjs +4 -4
- package/esm2022/collapsible/src/collapsible-content.directive.mjs +4 -4
- package/esm2022/collapsible/src/collapsible-root.directive.mjs +4 -4
- package/esm2022/collapsible/src/collapsible-trigger.directive.mjs +4 -4
- package/esm2022/context-menu/index.mjs +5 -5
- package/esm2022/context-menu/src/context-menu-content.directive.mjs +4 -4
- package/esm2022/context-menu/src/context-menu-item-checkbox.directive.mjs +4 -4
- package/esm2022/context-menu/src/context-menu-item-indicator.directive.mjs +4 -4
- package/esm2022/context-menu/src/context-menu-item-radio-group.directive.mjs +4 -4
- package/esm2022/context-menu/src/context-menu-item-radio.directive.mjs +4 -4
- package/esm2022/context-menu/src/context-menu-item-selectable.mjs +4 -4
- package/esm2022/context-menu/src/context-menu-item.directive.mjs +4 -4
- package/esm2022/context-menu/src/context-menu-label.directive.mjs +4 -4
- package/esm2022/context-menu/src/context-menu-separator.directive.mjs +4 -4
- package/esm2022/context-menu/src/context-menu-trigger.directive.mjs +4 -4
- package/esm2022/core/index.mjs +2 -1
- package/esm2022/core/src/auto-focus.directive.mjs +4 -4
- package/esm2022/core/src/is-inside-form.mjs +7 -0
- package/esm2022/dialog/index.mjs +5 -5
- package/esm2022/dialog/src/dialog-close.directive.mjs +4 -4
- package/esm2022/dialog/src/dialog-content.directive.mjs +4 -4
- package/esm2022/dialog/src/dialog-description.directive.mjs +4 -4
- package/esm2022/dialog/src/dialog-dismiss.directive.mjs +4 -4
- package/esm2022/dialog/src/dialog-title.directive.mjs +4 -4
- package/esm2022/dialog/src/dialog-trigger.directive.mjs +4 -4
- package/esm2022/dialog/src/dialog.config.mjs +1 -1
- package/esm2022/dialog/src/dialog.service.mjs +4 -4
- package/esm2022/dropdown-menu/index.mjs +5 -5
- package/esm2022/dropdown-menu/src/dropdown-menu-content.directive.mjs +4 -4
- package/esm2022/dropdown-menu/src/dropdown-menu-item-checkbox.directive.mjs +4 -4
- package/esm2022/dropdown-menu/src/dropdown-menu-item-indicator.directive.mjs +4 -4
- package/esm2022/dropdown-menu/src/dropdown-menu-item-radio-group.directive.mjs +4 -4
- package/esm2022/dropdown-menu/src/dropdown-menu-item-radio.directive.mjs +4 -4
- package/esm2022/dropdown-menu/src/dropdown-menu-item-selectable.mjs +4 -4
- package/esm2022/dropdown-menu/src/dropdown-menu-item.directive.mjs +4 -4
- package/esm2022/dropdown-menu/src/dropdown-menu-label.directive.mjs +4 -4
- package/esm2022/dropdown-menu/src/dropdown-menu-separator.directive.mjs +4 -4
- package/esm2022/dropdown-menu/src/dropdown-menu-trigger.directive.mjs +4 -4
- package/esm2022/label/src/label.directive.mjs +4 -4
- package/esm2022/menu/index.mjs +5 -5
- package/esm2022/menu/src/menu-content.directive.mjs +4 -4
- package/esm2022/menu/src/menu-directive.mjs +4 -4
- package/esm2022/menu/src/menu-group.directive.mjs +4 -4
- package/esm2022/menu/src/menu-item.directive.mjs +4 -4
- package/esm2022/menu/src/menu-label.directive.mjs +4 -4
- package/esm2022/menu/src/menu-separator.directive.mjs +4 -4
- package/esm2022/menubar/index.mjs +5 -5
- package/esm2022/menubar/src/menubar-content.directive.mjs +4 -4
- package/esm2022/menubar/src/menubar-item-checkbox.directive.mjs +4 -4
- package/esm2022/menubar/src/menubar-item-indicator.directive.mjs +4 -4
- package/esm2022/menubar/src/menubar-item-radio.directive.mjs +4 -4
- package/esm2022/menubar/src/menubar-item.directive.mjs +4 -4
- package/esm2022/menubar/src/menubar-radio-group.directive.mjs +4 -4
- package/esm2022/menubar/src/menubar-root.directive.mjs +4 -4
- package/esm2022/menubar/src/menubar-separator.directive.mjs +4 -4
- package/esm2022/menubar/src/menubar-trigger.directive.mjs +4 -4
- package/esm2022/progress/index.mjs +5 -5
- package/esm2022/progress/src/progress-indicator.directive.mjs +4 -4
- package/esm2022/progress/src/progress-root.directive.mjs +4 -4
- package/esm2022/radio/src/radio-indicator.directive.mjs +4 -4
- package/esm2022/radio/src/radio-item.directive.mjs +4 -4
- package/esm2022/radio/src/radio-root.directive.mjs +4 -4
- package/esm2022/select/index.mjs +65 -0
- package/esm2022/select/radix-ng-primitives-select.mjs +5 -0
- package/esm2022/select/src/select-content.directive.mjs +53 -0
- package/esm2022/select/src/select-group.directive.mjs +18 -0
- package/esm2022/select/src/select-icon.directive.mjs +18 -0
- package/esm2022/select/src/select-item-indicator.directive.mjs +23 -0
- package/esm2022/select/src/select-item.directive.mjs +116 -0
- package/esm2022/select/src/select-label.directive.mjs +15 -0
- package/esm2022/select/src/select-separator.directive.mjs +18 -0
- package/esm2022/select/src/select-trigger.directive.mjs +38 -0
- package/esm2022/select/src/select-value.directive.mjs +26 -0
- package/esm2022/select/src/select.component.mjs +233 -0
- package/esm2022/separator/src/separator.directive.mjs +8 -4
- package/esm2022/switch/index.mjs +5 -5
- package/esm2022/switch/src/switch-input.directive.mjs +4 -4
- package/esm2022/switch/src/switch-root.directive.mjs +4 -4
- package/esm2022/switch/src/switch-thumb.directive.mjs +4 -4
- package/esm2022/tabs/index.mjs +5 -5
- package/esm2022/tabs/src/tabs-content.directive.mjs +4 -4
- package/esm2022/tabs/src/tabs-context.service.mjs +4 -4
- package/esm2022/tabs/src/tabs-list.directive.mjs +4 -4
- package/esm2022/tabs/src/tabs-root.directive.mjs +4 -4
- package/esm2022/tabs/src/tabs-trigger.directive.mjs +4 -4
- package/esm2022/toggle/index.mjs +2 -1
- package/esm2022/toggle/src/toggle-input.directive.mjs +29 -0
- package/esm2022/toggle/src/toggle.directive.mjs +4 -5
- package/esm2022/toggle-group/src/toggle-group-item.directive.mjs +4 -4
- package/esm2022/toggle-group/src/toggle-group-multiple.directive.mjs +4 -4
- package/esm2022/toggle-group/src/toggle-group.directive.mjs +4 -4
- package/esm2022/visually-hidden/src/visually-hidden-input-bubble.directive.mjs +4 -4
- package/esm2022/visually-hidden/src/visually-hidden-input.directive.mjs +5 -5
- package/esm2022/visually-hidden/src/visually-hidden.directive.mjs +4 -4
- package/fesm2022/radix-ng-primitives-accordion.mjs +19 -19
- package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs +22 -22
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs +5 -3
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-avatar.mjs +10 -9
- package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-checkbox.mjs +15 -12
- package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collapsible.mjs +9 -9
- package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-context-menu.mjs +34 -34
- package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-core.mjs +11 -4
- package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dialog.mjs +25 -25
- package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +34 -34
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-label.mjs +3 -3
- package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menu.mjs +22 -22
- package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menubar.mjs +31 -31
- package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-progress.mjs +10 -10
- package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-radio.mjs +9 -9
- package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-select.mjs +576 -0
- package/fesm2022/radix-ng-primitives-select.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-separator.mjs +7 -3
- package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-switch.mjs +13 -13
- package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tabs.mjs +19 -19
- package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +9 -9
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle.mjs +32 -6
- package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs +10 -10
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
- package/package.json +7 -1
- package/select/README.md +1 -0
- package/select/index.d.ts +26 -0
- package/select/src/select-content.directive.d.ts +20 -0
- package/select/src/select-group.directive.d.ts +5 -0
- package/select/src/select-icon.directive.d.ts +5 -0
- package/select/src/select-item-indicator.directive.d.ts +7 -0
- package/select/src/select-item.directive.d.ts +47 -0
- package/select/src/select-label.directive.d.ts +5 -0
- package/select/src/select-separator.directive.d.ts +5 -0
- package/select/src/select-trigger.directive.d.ts +11 -0
- package/select/src/select-value.directive.d.ts +8 -0
- package/select/src/select.component.d.ts +81 -0
- package/separator/src/separator.directive.d.ts +4 -0
- package/toggle/index.d.ts +1 -0
- package/toggle/src/toggle-input.directive.d.ts +6 -0
- package/visually-hidden/src/visually-hidden-input.directive.d.ts +1 -1
@@ -1,5 +1,32 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { input, booleanAttribute, model, output
|
2
|
+
import { Directive, input, booleanAttribute, model, output } from '@angular/core';
|
3
|
+
import * as i1 from '@radix-ng/primitives/visually-hidden';
|
4
|
+
import { RdxVisuallyHiddenInputDirective } from '@radix-ng/primitives/visually-hidden';
|
5
|
+
|
6
|
+
class RdxToggleInputDirective {
|
7
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxToggleInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
8
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.11", type: RdxToggleInputDirective, isStandalone: true, selector: "[rdxToggleInput]", host: { attributes: { "type": "checkbox" } }, exportAs: ["rdxToggleInput"], hostDirectives: [{ directive: i1.RdxVisuallyHiddenInputDirective, inputs: ["name", "name", "required", "required"] }], ngImport: i0 }); }
|
9
|
+
}
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxToggleInputDirective, decorators: [{
|
11
|
+
type: Directive,
|
12
|
+
args: [{
|
13
|
+
selector: '[rdxToggleInput]',
|
14
|
+
exportAs: 'rdxToggleInput',
|
15
|
+
standalone: true,
|
16
|
+
hostDirectives: [
|
17
|
+
{
|
18
|
+
directive: RdxVisuallyHiddenInputDirective,
|
19
|
+
inputs: [
|
20
|
+
'name',
|
21
|
+
'required'
|
22
|
+
]
|
23
|
+
}
|
24
|
+
],
|
25
|
+
host: {
|
26
|
+
type: 'checkbox'
|
27
|
+
}
|
28
|
+
}]
|
29
|
+
}] });
|
3
30
|
|
4
31
|
class RdxToggleDirective {
|
5
32
|
constructor() {
|
@@ -28,17 +55,16 @@ class RdxToggleDirective {
|
|
28
55
|
this.onPressedChange.emit(this.pressed());
|
29
56
|
}
|
30
57
|
}
|
31
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
32
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
58
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxToggleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
59
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.11", 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: { listeners: { "click": "toggle()" }, properties: { "attr.aria-pressed": "pressed()", "attr.data-state": "pressed() ? \"on\" : \"off\"", "attr.data-disabled": "disabled()", "disabled": "disabled()" } }, exportAs: ["rdxToggle"], ngImport: i0 }); }
|
33
60
|
}
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxToggleDirective, decorators: [{
|
35
62
|
type: Directive,
|
36
63
|
args: [{
|
37
64
|
selector: '[rdxToggle]',
|
38
65
|
exportAs: 'rdxToggle',
|
39
66
|
standalone: true,
|
40
67
|
host: {
|
41
|
-
type: 'button',
|
42
68
|
'[attr.aria-pressed]': 'pressed()',
|
43
69
|
'[attr.data-state]': 'pressed() ? "on" : "off"',
|
44
70
|
'[attr.data-disabled]': 'disabled()',
|
@@ -52,5 +78,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImpor
|
|
52
78
|
* Generated bundle index. Do not edit.
|
53
79
|
*/
|
54
80
|
|
55
|
-
export { RdxToggleDirective };
|
81
|
+
export { RdxToggleDirective, RdxToggleInputDirective };
|
56
82
|
//# sourceMappingURL=radix-ng-primitives-toggle.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"radix-ng-primitives-toggle.mjs","sources":["../../../packages/primitives/toggle/src/toggle.directive.ts","../../../packages/primitives/toggle/radix-ng-primitives-toggle.ts"],"sourcesContent":["import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, model, output, OutputEmitterRef } from '@angular/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\n@Directive({\n selector: '[rdxToggle]',\n exportAs: 'rdxToggle',\n standalone: true,\n host: {\n
|
1
|
+
{"version":3,"file":"radix-ng-primitives-toggle.mjs","sources":["../../../packages/primitives/toggle/src/toggle-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: '[rdxToggleInput]',\n exportAs: 'rdxToggleInput',\n standalone: true,\n hostDirectives: [\n {\n directive: RdxVisuallyHiddenInputDirective,\n inputs: [\n 'name',\n 'required'\n ]\n }\n ],\n host: {\n type: 'checkbox'\n }\n})\nexport class RdxToggleInputDirective {}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, model, output, OutputEmitterRef } from '@angular/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\n@Directive({\n selector: '[rdxToggle]',\n exportAs: 'rdxToggle',\n standalone: true,\n host: {\n '[attr.aria-pressed]': 'pressed()',\n '[attr.data-state]': 'pressed() ? \"on\" : \"off\"',\n '[attr.data-disabled]': 'disabled()',\n '[disabled]': 'disabled()',\n\n '(click)': 'toggle()'\n }\n})\nexport class RdxToggleDirective {\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 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 readonly pressed = model<boolean>(this.defaultPressed());\n\n /**\n * When true, prevents the user from interacting with the toggle.\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 readonly onPressedChange = output<boolean>();\n\n protected toggle(): void {\n if (!this.disabled()) {\n this.pressed.set(!this.pressed());\n this.onPressedChange.emit(this.pressed());\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAoBa,uBAAuB,CAAA;+GAAvB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,UAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,+BAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAjBnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,QAAQ,EAAE,gBAAg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EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,OAAA,EAAA,eAAA,EAAA,eAAA,EAAA,iBAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,UAAA,EAAA,EAAA,UAAA,EAAA,EAAA,mBAAA,EAAA,WAAA,EAAA,iBAAA,EAAA,8BAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAb9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACF,wBAAA,qBAAqB,EAAE,WAAW;AAClC,wBAAA,mBAAmB,EAAE,0BAA0B;AAC/C,wBAAA,sBAAsB,EAAE,YAAY;AACpC,wBAAA,YAAY,EAAE,YAAY;AAE1B,wBAAA,SAAS,EAAE;AACd;AACJ,iBAAA;;;ACxCD;;AAEG;;;;"}
|
@@ -14,10 +14,10 @@ class RdxVisuallyHiddenDirective {
|
|
14
14
|
constructor() {
|
15
15
|
this.feature = input('focusable');
|
16
16
|
}
|
17
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
18
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
17
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxVisuallyHiddenDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
18
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.11", type: RdxVisuallyHiddenDirective, isStandalone: true, selector: "[rdxVisuallyHidden]", inputs: { feature: { classPropertyName: "feature", publicName: "feature", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-hidden": "feature() === \"focusable\" ? \"true\" : null", "hidden": "feature() === \"fully-hidden\" ? true : null", "attr.tabindex": "feature() === \"fully-hidden\" ? \"-1\" : null", "style.position": "\"absolute\"", "style.border": "\"0\"", "style.width": "\"1px\"", "style.display": "feature() === \"focusable\" ? \"inline-block\" : \"none\"", "style.height": "\"1px\"", "style.padding": "\"0\"", "style.margin": "\"-1px\"", "style.overflow": "\"hidden\"", "style.clip": "\"rect(0, 0, 0, 0)\"", "style.white-space": "\"nowrap\"", "style.word-wrap": "\"normal\"" } }, ngImport: i0 }); }
|
19
19
|
}
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxVisuallyHiddenDirective, decorators: [{
|
21
21
|
type: Directive,
|
22
22
|
args: [{
|
23
23
|
selector: '[rdxVisuallyHidden]',
|
@@ -91,10 +91,10 @@ class RdxVisuallyHiddenInputBubbleDirective {
|
|
91
91
|
this.inputElement.dispatchEvent(inputEvent);
|
92
92
|
this.inputElement.dispatchEvent(changeEvent);
|
93
93
|
}
|
94
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
95
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
94
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxVisuallyHiddenInputBubbleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
95
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.11", type: RdxVisuallyHiddenInputBubbleDirective, isStandalone: true, selector: "[rdxVisuallyHiddenInputBubble]", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, feature: { classPropertyName: "feature", publicName: "feature", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "change": "onChange()" }, properties: { "attr.name": "name()", "attr.required": "required()", "attr.disabled": "disabled()", "attr.checked": "checked()", "value": "value()" } }, hostDirectives: [{ directive: RdxVisuallyHiddenDirective, inputs: ["feature", "feature"] }], ngImport: i0 }); }
|
96
96
|
}
|
97
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
97
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxVisuallyHiddenInputBubbleDirective, decorators: [{
|
98
98
|
type: Directive,
|
99
99
|
args: [{
|
100
100
|
selector: '[rdxVisuallyHiddenInputBubble]',
|
@@ -116,7 +116,7 @@ class RdxVisuallyHiddenInputDirective {
|
|
116
116
|
constructor() {
|
117
117
|
this.elementRef = inject(ElementRef);
|
118
118
|
this.name = input('');
|
119
|
-
this.value = input(
|
119
|
+
this.value = input();
|
120
120
|
this.checked = input(undefined);
|
121
121
|
this.required = input(undefined);
|
122
122
|
this.disabled = input(undefined);
|
@@ -157,10 +157,10 @@ class RdxVisuallyHiddenInputDirective {
|
|
157
157
|
inputElement.setAttribute('value', parsed.value);
|
158
158
|
});
|
159
159
|
}
|
160
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
161
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
160
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxVisuallyHiddenInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
161
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.11", type: RdxVisuallyHiddenInputDirective, isStandalone: true, selector: "[rdxVisuallyHiddenInput]", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, feature: { classPropertyName: "feature", publicName: "feature", isSignal: true, isRequired: false, transformFunction: null } }, hostDirectives: [{ directive: RdxVisuallyHiddenInputBubbleDirective, inputs: ["feature", "feature", "name", "name", "value", "value", "checked", "checked", "disabled", "disabled", "required", "required"] }], ngImport: i0 }); }
|
162
162
|
}
|
163
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxVisuallyHiddenInputDirective, decorators: [{
|
164
164
|
type: Directive,
|
165
165
|
args: [{
|
166
166
|
selector: '[rdxVisuallyHiddenInput]',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"radix-ng-primitives-visually-hidden.mjs","sources":["../../../packages/primitives/visually-hidden/src/visually-hidden.directive.ts","../../../packages/primitives/visually-hidden/src/visually-hidden-input-bubble.directive.ts","../../../packages/primitives/visually-hidden/src/visually-hidden-input.directive.ts","../../../packages/primitives/visually-hidden/radix-ng-primitives-visually-hidden.ts"],"sourcesContent":["import { Directive, input } from '@angular/core';\n\n/**\n *\n * <span rdxVisuallyHidden [feature]=\"'fully-hidden'\">\n * <ng-content></ng-content>\n * </span>\n *\n * <button (click)=\"directiveInstance.feature.set('focusable')\">Make Focusable</button>\n * <button (click)=\"directiveInstance.feature.set('fully-hidden')\">Hide</button>\n */\n@Directive({\n selector: '[rdxVisuallyHidden]',\n standalone: true,\n host: {\n '[attr.aria-hidden]': 'feature() === \"focusable\" ? \"true\" : null',\n '[hidden]': 'feature() === \"fully-hidden\" ? true : null',\n '[attr.tabindex]': 'feature() === \"fully-hidden\" ? \"-1\" : null',\n '[style.position]': '\"absolute\"',\n '[style.border]': '\"0\"',\n '[style.width]': '\"1px\"',\n '[style.display]': 'feature() === \"focusable\" ? \"inline-block\" : \"none\"',\n '[style.height]': '\"1px\"',\n '[style.padding]': '\"0\"',\n '[style.margin]': '\"-1px\"',\n '[style.overflow]': '\"hidden\"',\n '[style.clip]': '\"rect(0, 0, 0, 0)\"',\n '[style.white-space]': '\"nowrap\"',\n '[style.word-wrap]': '\"normal\"'\n }\n})\nexport class RdxVisuallyHiddenDirective {\n readonly feature = input<'focusable' | 'fully-hidden'>('focusable');\n}\n","import { Directive, effect, ElementRef, inject, input } from '@angular/core';\nimport { RdxVisuallyHiddenDirective } from './visually-hidden.directive';\n\n/**\n *\n */\n@Directive({\n selector: '[rdxVisuallyHiddenInputBubble]',\n standalone: true,\n hostDirectives: [{ directive: RdxVisuallyHiddenDirective, inputs: ['feature: feature'] }],\n host: {\n '[attr.name]': 'name()',\n '[attr.required]': 'required()',\n '[attr.disabled]': 'disabled()',\n '[attr.checked]': 'checked()',\n '[value]': 'value()',\n '(change)': 'onChange()'\n }\n})\nexport class RdxVisuallyHiddenInputBubbleDirective<T> {\n private readonly elementRef = inject(ElementRef);\n\n readonly name = input<string>('');\n readonly value = input<T | null>(null);\n readonly checked = input<boolean | undefined>(undefined);\n readonly required = input<boolean | undefined>(undefined);\n readonly disabled = input<boolean | undefined>(undefined);\n readonly feature = input<string>('fully-hidden');\n\n constructor() {\n effect(() => {\n this.updateInputValue();\n });\n }\n\n protected onChange() {\n this.updateInputValue();\n }\n\n private updateInputValue() {\n let valueChanged = false;\n let checkedChanged = false;\n\n // Check if the value has changed before applying the update\n const currentValue = this.inputElement.value;\n const newValue = String(this.value());\n\n if (currentValue !== newValue) {\n this.inputElement.value = newValue;\n valueChanged = true;\n }\n\n if (this.inputElement.type === 'checkbox' || this.inputElement.type === 'radio') {\n const currentChecked = this.inputElement.checked;\n const newChecked = !!this.checked();\n\n if (currentChecked !== newChecked) {\n this.inputElement.checked = newChecked;\n checkedChanged = true;\n }\n }\n\n if (valueChanged || checkedChanged) {\n this.dispatchInputEvents();\n }\n }\n\n private get inputElement() {\n return this.elementRef.nativeElement;\n }\n\n private dispatchInputEvents() {\n const inputEvent = new Event('input', { bubbles: true });\n const changeEvent = new Event('change', { bubbles: true });\n\n this.inputElement.dispatchEvent(inputEvent);\n this.inputElement.dispatchEvent(changeEvent);\n }\n}\n","// Implementation from https://github.com/unovue/radix-vue\n\nimport { Directive, ElementRef, OnInit, computed, inject, input } from '@angular/core';\nimport { RdxVisuallyHiddenInputBubbleDirective } from './visually-hidden-input-bubble.directive';\n\n@Directive({\n selector: '[rdxVisuallyHiddenInput]',\n standalone: true,\n hostDirectives: [\n {\n directive: RdxVisuallyHiddenInputBubbleDirective,\n inputs: [\n 'feature: feature',\n 'name: name ',\n 'value: value',\n 'checked: checked',\n 'disabled: disabled',\n 'required: required'\n ]\n }\n ]\n})\nexport class RdxVisuallyHiddenInputDirective<T> implements OnInit {\n private readonly elementRef = inject(ElementRef);\n\n readonly name = input<string>('');\n readonly value = input<T | null>(null);\n readonly checked = input<boolean | undefined>(undefined);\n readonly required = input<boolean | undefined>(undefined);\n readonly disabled = input<boolean | undefined>(undefined);\n readonly feature = input<'focusable' | 'fully-hidden'>('fully-hidden');\n\n readonly parsedValue = computed<{ name: string; value: any }[]>(() => {\n const value = this.value();\n const name = this.name();\n\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n return [{ name, value }];\n }\n\n if (Array.isArray(value)) {\n return value.flatMap((obj, index) => {\n if (typeof obj === 'object') {\n return Object.entries(obj).map(([key, val]) => ({\n name: `[${name}][${index}][${key}]`,\n value: val\n }));\n } else {\n return { name: `[${name}][${index}]`, value: obj };\n }\n });\n }\n\n if (value !== null && typeof value === 'object') {\n return Object.entries(value).map(([key, val]) => ({\n name: `[${name}][${key}]`,\n value: val\n }));\n }\n\n return [];\n });\n\n ngOnInit() {\n const parsedValues = this.parsedValue();\n\n parsedValues.forEach((parsed) => {\n const inputElement = this.elementRef.nativeElement;\n inputElement.setAttribute('name', parsed.name);\n inputElement.setAttribute('value', parsed.value);\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.RdxVisuallyHiddenDirective","i1.RdxVisuallyHiddenInputBubbleDirective"],"mappings":";;;AAEA;;;;;;;;AAQG;MAqBU,0BAA0B,CAAA;AApBvC,IAAA,WAAA,GAAA;AAqBa,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAA+B,WAAW,CAAC,CAAC;AACvE,KAAA;8GAFY,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAA1B,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA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EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAAC,qCAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,EAAA,MAAA,EAAA,OAAA,EAAA,OAAA,EAAA,SAAA,EAAA,SAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAA/B,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAjB3C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,0BAA0B;AACpC,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,cAAc,EAAE;AACZ,wBAAA;AACI,4BAAA,SAAS,EAAE,qCAAqC;AAChD,4BAAA,MAAM,EAAE;gCACJ,kBAAkB;gCAClB,aAAa;gCACb,cAAc;gCACd,kBAAkB;gCAClB,oBAAoB;gCACpB,oBAAoB;AACvB,6BAAA;AACJ,yBAAA;AACJ,qBAAA;AACJ,iBAAA,CAAA;;;ACrBD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"radix-ng-primitives-visually-hidden.mjs","sources":["../../../packages/primitives/visually-hidden/src/visually-hidden.directive.ts","../../../packages/primitives/visually-hidden/src/visually-hidden-input-bubble.directive.ts","../../../packages/primitives/visually-hidden/src/visually-hidden-input.directive.ts","../../../packages/primitives/visually-hidden/radix-ng-primitives-visually-hidden.ts"],"sourcesContent":["import { Directive, input } from '@angular/core';\n\n/**\n *\n * <span rdxVisuallyHidden [feature]=\"'fully-hidden'\">\n * <ng-content></ng-content>\n * </span>\n *\n * <button (click)=\"directiveInstance.feature.set('focusable')\">Make Focusable</button>\n * <button (click)=\"directiveInstance.feature.set('fully-hidden')\">Hide</button>\n */\n@Directive({\n selector: '[rdxVisuallyHidden]',\n standalone: true,\n host: {\n '[attr.aria-hidden]': 'feature() === \"focusable\" ? \"true\" : null',\n '[hidden]': 'feature() === \"fully-hidden\" ? true : null',\n '[attr.tabindex]': 'feature() === \"fully-hidden\" ? \"-1\" : null',\n '[style.position]': '\"absolute\"',\n '[style.border]': '\"0\"',\n '[style.width]': '\"1px\"',\n '[style.display]': 'feature() === \"focusable\" ? \"inline-block\" : \"none\"',\n '[style.height]': '\"1px\"',\n '[style.padding]': '\"0\"',\n '[style.margin]': '\"-1px\"',\n '[style.overflow]': '\"hidden\"',\n '[style.clip]': '\"rect(0, 0, 0, 0)\"',\n '[style.white-space]': '\"nowrap\"',\n '[style.word-wrap]': '\"normal\"'\n }\n})\nexport class RdxVisuallyHiddenDirective {\n readonly feature = input<'focusable' | 'fully-hidden'>('focusable');\n}\n","import { Directive, effect, ElementRef, inject, input } from '@angular/core';\nimport { RdxVisuallyHiddenDirective } from './visually-hidden.directive';\n\n/**\n *\n */\n@Directive({\n selector: '[rdxVisuallyHiddenInputBubble]',\n standalone: true,\n hostDirectives: [{ directive: RdxVisuallyHiddenDirective, inputs: ['feature: feature'] }],\n host: {\n '[attr.name]': 'name()',\n '[attr.required]': 'required()',\n '[attr.disabled]': 'disabled()',\n '[attr.checked]': 'checked()',\n '[value]': 'value()',\n '(change)': 'onChange()'\n }\n})\nexport class RdxVisuallyHiddenInputBubbleDirective<T> {\n private readonly elementRef = inject(ElementRef);\n\n readonly name = input<string>('');\n readonly value = input<T | null>(null);\n readonly checked = input<boolean | undefined>(undefined);\n readonly required = input<boolean | undefined>(undefined);\n readonly disabled = input<boolean | undefined>(undefined);\n readonly feature = input<string>('fully-hidden');\n\n constructor() {\n effect(() => {\n this.updateInputValue();\n });\n }\n\n protected onChange() {\n this.updateInputValue();\n }\n\n private updateInputValue() {\n let valueChanged = false;\n let checkedChanged = false;\n\n // Check if the value has changed before applying the update\n const currentValue = this.inputElement.value;\n const newValue = String(this.value());\n\n if (currentValue !== newValue) {\n this.inputElement.value = newValue;\n valueChanged = true;\n }\n\n if (this.inputElement.type === 'checkbox' || this.inputElement.type === 'radio') {\n const currentChecked = this.inputElement.checked;\n const newChecked = !!this.checked();\n\n if (currentChecked !== newChecked) {\n this.inputElement.checked = newChecked;\n checkedChanged = true;\n }\n }\n\n if (valueChanged || checkedChanged) {\n this.dispatchInputEvents();\n }\n }\n\n private get inputElement() {\n return this.elementRef.nativeElement;\n }\n\n private dispatchInputEvents() {\n const inputEvent = new Event('input', { bubbles: true });\n const changeEvent = new Event('change', { bubbles: true });\n\n this.inputElement.dispatchEvent(inputEvent);\n this.inputElement.dispatchEvent(changeEvent);\n }\n}\n","// Implementation from https://github.com/unovue/radix-vue\n\nimport { Directive, ElementRef, OnInit, computed, inject, input } from '@angular/core';\nimport { RdxVisuallyHiddenInputBubbleDirective } from './visually-hidden-input-bubble.directive';\n\n@Directive({\n selector: '[rdxVisuallyHiddenInput]',\n standalone: true,\n hostDirectives: [\n {\n directive: RdxVisuallyHiddenInputBubbleDirective,\n inputs: [\n 'feature: feature',\n 'name: name ',\n 'value: value',\n 'checked: checked',\n 'disabled: disabled',\n 'required: required'\n ]\n }\n ]\n})\nexport class RdxVisuallyHiddenInputDirective<T> implements OnInit {\n private readonly elementRef = inject(ElementRef);\n\n readonly name = input<string>('');\n readonly value = input<T | string>();\n readonly checked = input<boolean | undefined>(undefined);\n readonly required = input<boolean | undefined>(undefined);\n readonly disabled = input<boolean | undefined>(undefined);\n readonly feature = input<'focusable' | 'fully-hidden'>('fully-hidden');\n\n readonly parsedValue = computed<{ name: string; value: any }[]>(() => {\n const value = this.value();\n const name = this.name();\n\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n return [{ name, value }];\n }\n\n if (Array.isArray(value)) {\n return value.flatMap((obj, index) => {\n if (typeof obj === 'object') {\n return Object.entries(obj).map(([key, val]) => ({\n name: `[${name}][${index}][${key}]`,\n value: val\n }));\n } else {\n return { name: `[${name}][${index}]`, value: obj };\n }\n });\n }\n\n if (value !== null && typeof value === 'object') {\n return Object.entries(value).map(([key, val]) => ({\n name: `[${name}][${key}]`,\n value: val\n }));\n }\n\n return [];\n });\n\n ngOnInit() {\n const parsedValues = this.parsedValue();\n\n parsedValues.forEach((parsed) => {\n const inputElement = this.elementRef.nativeElement;\n inputElement.setAttribute('name', parsed.name);\n inputElement.setAttribute('value', parsed.value);\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.RdxVisuallyHiddenDirective","i1.RdxVisuallyHiddenInputBubbleDirective"],"mappings":";;;AAEA;;;;;;;;AAQG;MAqBU,0BAA0B,CAAA;AApBvC,IAAA,WAAA,GAAA;AAqBa,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAA+B,WAAW,CAAC;AACtE;+GAFY,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAA1B,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,kBAAA,EAAA,+CAAA,EAAA,QAAA,EAAA,8CAAA,EAAA,eAAA,EAAA,gDAAA,EAAA,gBAAA,EAAA,cAAA,EAAA,cAAA,EAAA,OAAA,EAAA,aAAA,EAAA,SAAA,EAAA,eAAA,EAAA,2DAAA,EAAA,cAAA,EAAA,SAAA,EAAA,eAAA,EAAA,OAAA,EAAA,cAAA,EAAA,UAAA,EAAA,gBAAA,EAAA,YAAA,EAAA,YAAA,EAAA,sBAAA,EAAA,mBAAA,EAAA,YAAA,EAAA,iBAAA,EAAA,YAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAA1B,0BAA0B,EAAA,UAAA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A,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAAC,qCAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,EAAA,MAAA,EAAA,OAAA,EAAA,OAAA,EAAA,SAAA,EAAA,SAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAA/B,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAjB3C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,0BAA0B;AACpC,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,cAAc,EAAE;AACZ,wBAAA;AACI,4BAAA,SAAS,EAAE,qCAAqC;AAChD,4BAAA,MAAM,EAAE;gCACJ,kBAAkB;gCAClB,aAAa;gCACb,cAAc;gCACd,kBAAkB;gCAClB,oBAAoB;gCACpB;AACH;AACJ;AACJ;AACJ,iBAAA;;;ACrBD;;AAEG;;;;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@radix-ng/primitives",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.17.0",
|
4
4
|
"license": "MIT",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -127,6 +127,12 @@
|
|
127
127
|
"esm": "./esm2022/radio/radix-ng-primitives-radio.mjs",
|
128
128
|
"default": "./fesm2022/radix-ng-primitives-radio.mjs"
|
129
129
|
},
|
130
|
+
"./select": {
|
131
|
+
"types": "./select/index.d.ts",
|
132
|
+
"esm2022": "./esm2022/select/radix-ng-primitives-select.mjs",
|
133
|
+
"esm": "./esm2022/select/radix-ng-primitives-select.mjs",
|
134
|
+
"default": "./fesm2022/radix-ng-primitives-select.mjs"
|
135
|
+
},
|
130
136
|
"./separator": {
|
131
137
|
"types": "./separator/index.d.ts",
|
132
138
|
"esm2022": "./esm2022/separator/radix-ng-primitives-separator.mjs",
|
package/select/README.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# @radix-ng/primitives/select
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "./src/select-content.directive";
|
3
|
+
import * as i2 from "./src/select-group.directive";
|
4
|
+
import * as i3 from "./src/select-item.directive";
|
5
|
+
import * as i4 from "./src/select-item-indicator.directive";
|
6
|
+
import * as i5 from "./src/select-label.directive";
|
7
|
+
import * as i6 from "./src/select.component";
|
8
|
+
import * as i7 from "./src/select-separator.directive";
|
9
|
+
import * as i8 from "./src/select-trigger.directive";
|
10
|
+
import * as i9 from "./src/select-value.directive";
|
11
|
+
import * as i10 from "./src/select-icon.directive";
|
12
|
+
export * from './src/select-content.directive';
|
13
|
+
export * from './src/select-group.directive';
|
14
|
+
export * from './src/select-icon.directive';
|
15
|
+
export * from './src/select-item-indicator.directive';
|
16
|
+
export * from './src/select-item.directive';
|
17
|
+
export * from './src/select-label.directive';
|
18
|
+
export * from './src/select-separator.directive';
|
19
|
+
export * from './src/select-trigger.directive';
|
20
|
+
export * from './src/select-value.directive';
|
21
|
+
export * from './src/select.component';
|
22
|
+
export declare class RdxSelectModule {
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxSelectModule, never>;
|
24
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<RdxSelectModule, never, [typeof i1.RdxSelectContentDirective, typeof i2.RdxSelectGroupDirective, typeof i3.RdxSelectItemDirective, typeof i4.RdxSelectItemIndicatorDirective, typeof i5.RdxSelectLabelDirective, typeof i6.RdxSelectComponent, typeof i7.RdxSelectSeparatorDirective, typeof i8.RdxSelectTriggerDirective, typeof i9.RdxSelectValueDirective, typeof i10.RdxSelectIconDirective], [typeof i1.RdxSelectContentDirective, typeof i2.RdxSelectGroupDirective, typeof i3.RdxSelectItemDirective, typeof i4.RdxSelectItemIndicatorDirective, typeof i5.RdxSelectLabelDirective, typeof i6.RdxSelectComponent, typeof i7.RdxSelectSeparatorDirective, typeof i8.RdxSelectTriggerDirective, typeof i9.RdxSelectValueDirective, typeof i10.RdxSelectIconDirective]>;
|
25
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<RdxSelectModule>;
|
26
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
|
2
|
+
import { Directionality } from '@angular/cdk/bidi';
|
3
|
+
import { AfterContentInit, DestroyRef, QueryList } from '@angular/core';
|
4
|
+
import { Subject } from 'rxjs';
|
5
|
+
import { RdxSelectItemDirective } from './select-item.directive';
|
6
|
+
import { RdxSelectComponent } from './select.component';
|
7
|
+
import * as i0 from "@angular/core";
|
8
|
+
export declare class RdxSelectContentDirective implements AfterContentInit {
|
9
|
+
protected readonly destroyRef: DestroyRef;
|
10
|
+
protected readonly dir: Directionality | null;
|
11
|
+
protected select: RdxSelectComponent;
|
12
|
+
readonly highlighted: Subject<RdxSelectItemDirective>;
|
13
|
+
keyManager: ActiveDescendantKeyManager<RdxSelectItemDirective>;
|
14
|
+
options: QueryList<RdxSelectItemDirective>;
|
15
|
+
constructor();
|
16
|
+
initKeyManager(): ActiveDescendantKeyManager<RdxSelectItemDirective>;
|
17
|
+
ngAfterContentInit(): void;
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxSelectContentDirective, never>;
|
19
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxSelectContentDirective, "[rdxSelectContent]", ["rdxSelectContent"], {}, {}, ["options"], never, true, never>;
|
20
|
+
}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
export declare class RdxSelectGroupDirective {
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxSelectGroupDirective, never>;
|
4
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxSelectGroupDirective, "[rdxSelectGroup]", ["rdxSelectGroup"], {}, {}, never, never, true, never>;
|
5
|
+
}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
export declare class RdxSelectIconDirective {
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxSelectIconDirective, never>;
|
4
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxSelectIconDirective, "[rdxSelectIcon]", ["rdxSelectIcon"], {}, {}, never, never, true, never>;
|
5
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { RdxSelectItemDirective } from './select-item.directive';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare class RdxSelectItemIndicatorDirective {
|
4
|
+
protected item: RdxSelectItemDirective;
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxSelectItemIndicatorDirective, never>;
|
6
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxSelectItemIndicatorDirective, "[rdxSelectItemIndicator]", ["rdxSelectItemIndicator"], {}, {}, never, never, true, never>;
|
7
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import { Highlightable } from '@angular/cdk/a11y';
|
2
|
+
import { EventEmitter } from '@angular/core';
|
3
|
+
import { RdxSelectContentDirective } from './select-content.directive';
|
4
|
+
import { RdxSelectComponent } from './select.component';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
export declare class RdxSelectItemChange<T = RdxSelectItemDirective> {
|
7
|
+
source: T;
|
8
|
+
constructor(source: T);
|
9
|
+
}
|
10
|
+
export declare class RdxSelectItemDirective implements Highlightable {
|
11
|
+
protected readonly select: RdxSelectComponent;
|
12
|
+
protected readonly content: RdxSelectContentDirective;
|
13
|
+
readonly onSelectionChange: EventEmitter<RdxSelectItemChange<RdxSelectItemDirective>>;
|
14
|
+
protected readonly nativeElement: any;
|
15
|
+
highlighted: boolean;
|
16
|
+
selected: boolean;
|
17
|
+
get dataState(): string;
|
18
|
+
/**
|
19
|
+
* The unique SelectItem id.
|
20
|
+
* @ignore
|
21
|
+
*/
|
22
|
+
readonly id: string;
|
23
|
+
set value(value: string);
|
24
|
+
get value(): string;
|
25
|
+
private _value?;
|
26
|
+
textValue: string | null;
|
27
|
+
/** Whether the SelectItem is disabled. */
|
28
|
+
set disabled(value: boolean);
|
29
|
+
get disabled(): boolean;
|
30
|
+
private _disabled;
|
31
|
+
get viewValue(): string;
|
32
|
+
constructor();
|
33
|
+
/** Gets the label to be used when determining whether the option should be focused. */
|
34
|
+
getLabel(): string;
|
35
|
+
/**
|
36
|
+
* `Selects the option while indicating the selection came from the user. Used to
|
37
|
+
* determine if the select's view -> model callback should be invoked.`
|
38
|
+
*/
|
39
|
+
selectViaInteraction(): void;
|
40
|
+
handleKeydown(event: KeyboardEvent): void;
|
41
|
+
setActiveStyles(): void;
|
42
|
+
setInactiveStyles(): void;
|
43
|
+
protected onPointerMove(): void;
|
44
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxSelectItemDirective, never>;
|
45
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxSelectItemDirective, "[rdxSelectItem]", ["rdxSelectItem"], { "value": { "alias": "value"; "required": false; }; "textValue": { "alias": "textValue"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
|
46
|
+
static ngAcceptInputType_disabled: unknown;
|
47
|
+
}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
export declare class RdxSelectLabelDirective {
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxSelectLabelDirective, never>;
|
4
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxSelectLabelDirective, "[rdxSelectLabel]", ["rdxSelectLabel"], {}, {}, never, never, true, never>;
|
5
|
+
}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
export declare class RdxSelectSeparatorDirective {
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxSelectSeparatorDirective, never>;
|
4
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxSelectSeparatorDirective, "[rdxSelectSeparator]", ["rdxSelectSeparator"], {}, {}, never, never, true, never>;
|
5
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { RdxSelectValueDirective } from './select-value.directive';
|
2
|
+
import { RdxSelectComponent } from './select.component';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare class RdxSelectTriggerDirective {
|
5
|
+
protected nativeElement: any;
|
6
|
+
protected select: RdxSelectComponent;
|
7
|
+
protected value: RdxSelectValueDirective;
|
8
|
+
focus(): void;
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxSelectTriggerDirective, never>;
|
10
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxSelectTriggerDirective, "[rdxSelectTrigger]", never, {}, {}, ["value"], never, true, never>;
|
11
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { RdxSelectComponent } from './select.component';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare class RdxSelectValueDirective {
|
4
|
+
select: RdxSelectComponent;
|
5
|
+
placeholder: string;
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxSelectValueDirective, never>;
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RdxSelectValueDirective, "[rdxSelectValue]", ["rdxSelectValue"], { "placeholder": { "alias": "placeholder"; "required": false; }; }, {}, never, never, true, never>;
|
8
|
+
}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
|
2
|
+
import { Directionality } from '@angular/cdk/bidi';
|
3
|
+
import { SelectionModel } from '@angular/cdk/collections';
|
4
|
+
import { CdkConnectedOverlay, ConnectedPosition, Overlay } from '@angular/cdk/overlay';
|
5
|
+
import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, OnInit, QueryList } from '@angular/core';
|
6
|
+
import { Observable } from 'rxjs';
|
7
|
+
import { RdxSelectContentDirective } from './select-content.directive';
|
8
|
+
import { RdxSelectItemChange, RdxSelectItemDirective } from './select-item.directive';
|
9
|
+
import { RdxSelectTriggerDirective } from './select-trigger.directive';
|
10
|
+
import * as i0 from "@angular/core";
|
11
|
+
export declare class RdxSelectComponent implements OnInit, AfterContentInit {
|
12
|
+
protected overlay: Overlay;
|
13
|
+
protected elementRef: ElementRef<any>;
|
14
|
+
protected changeDetectorRef: ChangeDetectorRef;
|
15
|
+
private readonly destroyRef;
|
16
|
+
private readonly ngZone;
|
17
|
+
protected trigger: RdxSelectTriggerDirective;
|
18
|
+
protected content: RdxSelectContentDirective;
|
19
|
+
items: QueryList<RdxSelectItemDirective>;
|
20
|
+
overlayDir: CdkConnectedOverlay;
|
21
|
+
/** Deals with the selection logic. */
|
22
|
+
selectionModel: SelectionModel<RdxSelectItemDirective>;
|
23
|
+
/**
|
24
|
+
* This position config ensures that the top "start" corner of the overlay
|
25
|
+
* is aligned with the top "start" of the origin by default (overlapping
|
26
|
+
* the trigger completely). If the panel cannot fit below the trigger, it
|
27
|
+
* will fall back to a position above the trigger.
|
28
|
+
*/
|
29
|
+
positions: ConnectedPosition[];
|
30
|
+
private closeSubscription;
|
31
|
+
/**
|
32
|
+
* @ignore
|
33
|
+
*/
|
34
|
+
readonly dir: Directionality | null;
|
35
|
+
/**
|
36
|
+
* @ignore
|
37
|
+
*/
|
38
|
+
protected keyManager: ActiveDescendantKeyManager<RdxSelectItemDirective>;
|
39
|
+
/**
|
40
|
+
* @ignore
|
41
|
+
*/
|
42
|
+
readonly id: string;
|
43
|
+
defaultValue: string;
|
44
|
+
name: string;
|
45
|
+
defaultOpen: boolean;
|
46
|
+
open: boolean;
|
47
|
+
/** Whether the Select is disabled. */
|
48
|
+
disabled: boolean;
|
49
|
+
required: boolean;
|
50
|
+
/**
|
51
|
+
* The controlled value of the item to expand
|
52
|
+
*/
|
53
|
+
set value(value: string);
|
54
|
+
get value(): string | null;
|
55
|
+
private _value?;
|
56
|
+
readonly onValueChange: EventEmitter<string>;
|
57
|
+
readonly onOpenChange: EventEmitter<boolean>;
|
58
|
+
readonly optionSelectionChanges: Observable<RdxSelectItemChange>;
|
59
|
+
get selected(): string | null;
|
60
|
+
ngOnInit(): void;
|
61
|
+
ngAfterContentInit(): void;
|
62
|
+
/**
|
63
|
+
* Callback that is invoked when the overlay panel has been attached.
|
64
|
+
*/
|
65
|
+
onAttached(): void;
|
66
|
+
onDetach(): void;
|
67
|
+
/** Toggles the overlay panel open or closed. */
|
68
|
+
toggle(): void;
|
69
|
+
openPanel(): void;
|
70
|
+
close(): void;
|
71
|
+
updateActiveItem(item: RdxSelectItemDirective): void;
|
72
|
+
private selectDefaultValue;
|
73
|
+
private selectValue;
|
74
|
+
private closingActions;
|
75
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxSelectComponent, never>;
|
76
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RdxSelectComponent, "[rdxSelect]", never, { "defaultValue": { "alias": "defaultValue"; "required": false; }; "name": { "alias": "name"; "required": false; }; "defaultOpen": { "alias": "defaultOpen"; "required": false; }; "open": { "alias": "open"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "onValueChange": "onValueChange"; "onOpenChange": "onOpenChange"; }, ["trigger", "content", "items"], ["[rdxSelectTrigger]", "[rdxSelectContent]"], true, never>;
|
77
|
+
static ngAcceptInputType_defaultOpen: unknown;
|
78
|
+
static ngAcceptInputType_open: unknown;
|
79
|
+
static ngAcceptInputType_disabled: unknown;
|
80
|
+
static ngAcceptInputType_required: unknown;
|
81
|
+
}
|
@@ -32,12 +32,16 @@ export declare class RdxSeparatorRootDirective {
|
|
32
32
|
/**
|
33
33
|
* Computes the `role` attribute for the separator. If `decorative` is true,
|
34
34
|
* the role is set to "none", otherwise it is "separator".
|
35
|
+
*
|
36
|
+
* @ignore
|
35
37
|
*/
|
36
38
|
protected readonly computedRole: import("@angular/core").Signal<"none" | "separator">;
|
37
39
|
/**
|
38
40
|
* Computes the `aria-orientation` attribute. It is set to "vertical" only if
|
39
41
|
* the separator is not decorative and the orientation is set to "vertical".
|
40
42
|
* For horizontal orientation, the attribute is omitted.
|
43
|
+
*
|
44
|
+
* @ignore
|
41
45
|
*/
|
42
46
|
protected readonly computedAriaOrientation: import("@angular/core").Signal<"vertical" | null>;
|
43
47
|
static ɵfac: i0.ɵɵFactoryDeclaration<RdxSeparatorRootDirective, never>;
|
package/toggle/index.d.ts
CHANGED
@@ -0,0 +1,6 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "@radix-ng/primitives/visually-hidden";
|
3
|
+
export declare class RdxToggleInputDirective {
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxToggleInputDirective, never>;
|
5
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxToggleInputDirective, "[rdxToggleInput]", ["rdxToggleInput"], {}, {}, never, never, true, [{ directive: typeof i1.RdxVisuallyHiddenInputDirective; inputs: { "name": "name"; "required": "required"; }; outputs: {}; }]>;
|
6
|
+
}
|
@@ -4,7 +4,7 @@ import * as i1 from "./visually-hidden-input-bubble.directive";
|
|
4
4
|
export declare class RdxVisuallyHiddenInputDirective<T> implements OnInit {
|
5
5
|
private readonly elementRef;
|
6
6
|
readonly name: import("@angular/core").InputSignal<string>;
|
7
|
-
readonly value: import("@angular/core").InputSignal<T |
|
7
|
+
readonly value: import("@angular/core").InputSignal<string | T | undefined>;
|
8
8
|
readonly checked: import("@angular/core").InputSignal<boolean | undefined>;
|
9
9
|
readonly required: import("@angular/core").InputSignal<boolean | undefined>;
|
10
10
|
readonly disabled: import("@angular/core").InputSignal<boolean | undefined>;
|