@radix-ng/primitives 0.44.0 → 0.51.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/collection/README.md +1 -0
- package/fesm2022/radix-ng-primitives-accordion.mjs +41 -40
- 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-arrow.mjs +6 -6
- package/fesm2022/radix-ng-primitives-arrow.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs +6 -6
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-avatar.mjs +22 -22
- package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-calendar.mjs +104 -103
- package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-checkbox.mjs +51 -41
- package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collapsible.mjs +28 -28
- package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collection.mjs +89 -0
- package/fesm2022/radix-ng-primitives-collection.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-config.mjs +5 -5
- package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-context-menu.mjs +36 -36
- package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-core.mjs +33 -24
- package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-cropper.mjs +54 -53
- package/fesm2022/radix-ng-primitives-cropper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-date-field.mjs +48 -47
- package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dialog.mjs +34 -34
- package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +31 -33
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +41 -43
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-editable.mjs +20 -20
- package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-focus-guards.mjs +3 -3
- package/fesm2022/radix-ng-primitives-focus-guards.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-focus-scope.mjs +7 -7
- package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-hover-card.mjs +69 -77
- package/fesm2022/radix-ng-primitives-hover-card.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-label.mjs +7 -7
- package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menu.mjs +65 -70
- 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-navigation-menu.mjs +113 -105
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-number-field.mjs +48 -47
- package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-pagination.mjs +51 -51
- package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popover.mjs +67 -71
- package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popper.mjs +61 -56
- package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-portal.mjs +7 -7
- package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-presence.mjs +4 -4
- package/fesm2022/radix-ng-primitives-presence.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-progress.mjs +16 -16
- package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-radio.mjs +38 -37
- package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-roving-focus.mjs +38 -34
- package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-select.mjs +41 -43
- package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-select2.mjs +897 -0
- package/fesm2022/radix-ng-primitives-select2.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-separator.mjs +11 -17
- package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-slider.mjs +88 -84
- package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-stepper.mjs +55 -53
- package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-switch.mjs +22 -30
- package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tabs.mjs +38 -38
- package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-time-field.mjs +63 -78
- package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +24 -24
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle.mjs +11 -11
- package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toolbar.mjs +31 -29
- package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tooltip.mjs +69 -77
- package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tooltip2.mjs +57 -62
- package/fesm2022/radix-ng-primitives-tooltip2.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs +31 -31
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives.mjs.map +1 -1
- package/package.json +60 -51
- package/select2/README.md +3 -0
- package/{accordion/index.d.ts → types/radix-ng-primitives-accordion.d.ts} +61 -60
- package/{calendar/index.d.ts → types/radix-ng-primitives-calendar.d.ts} +1 -1
- package/{checkbox/index.d.ts → types/radix-ng-primitives-checkbox.d.ts} +33 -29
- package/{collapsible/index.d.ts → types/radix-ng-primitives-collapsible.d.ts} +20 -19
- package/types/radix-ng-primitives-collection.d.ts +40 -0
- package/{core/index.d.ts → types/radix-ng-primitives-core.d.ts} +6 -2
- package/{cropper/index.d.ts → types/radix-ng-primitives-cropper.d.ts} +4 -3
- package/{date-field/index.d.ts → types/radix-ng-primitives-date-field.d.ts} +4 -4
- package/{dialog/index.d.ts → types/radix-ng-primitives-dialog.d.ts} +2 -1
- package/{hover-card/index.d.ts → types/radix-ng-primitives-hover-card.d.ts} +3 -4
- package/{menu/index.d.ts → types/radix-ng-primitives-menu.d.ts} +1 -1
- package/{navigation-menu/index.d.ts → types/radix-ng-primitives-navigation-menu.d.ts} +47 -46
- package/{number-field/index.d.ts → types/radix-ng-primitives-number-field.d.ts} +13 -12
- package/{popover/index.d.ts → types/radix-ng-primitives-popover.d.ts} +3 -4
- package/{popper/index.d.ts → types/radix-ng-primitives-popper.d.ts} +1 -0
- package/{progress/index.d.ts → types/radix-ng-primitives-progress.d.ts} +2 -1
- package/{radio/index.d.ts → types/radix-ng-primitives-radio.d.ts} +1 -1
- package/{roving-focus/index.d.ts → types/radix-ng-primitives-roving-focus.d.ts} +8 -6
- package/types/radix-ng-primitives-select2.d.ts +511 -0
- package/{slider/index.d.ts → types/radix-ng-primitives-slider.d.ts} +4 -4
- package/{stepper/index.d.ts → types/radix-ng-primitives-stepper.d.ts} +17 -16
- package/{switch/index.d.ts → types/radix-ng-primitives-switch.d.ts} +3 -2
- package/{tabs/index.d.ts → types/radix-ng-primitives-tabs.d.ts} +7 -6
- package/{time-field/index.d.ts → types/radix-ng-primitives-time-field.d.ts} +4 -4
- package/{toggle-group/index.d.ts → types/radix-ng-primitives-toggle-group.d.ts} +12 -11
- package/{tooltip/index.d.ts → types/radix-ng-primitives-tooltip.d.ts} +3 -4
- package/{tooltip2/index.d.ts → types/radix-ng-primitives-tooltip2.d.ts} +4 -4
- /package/{alert-dialog/index.d.ts → types/radix-ng-primitives-alert-dialog.d.ts} +0 -0
- /package/{arrow/index.d.ts → types/radix-ng-primitives-arrow.d.ts} +0 -0
- /package/{aspect-ratio/index.d.ts → types/radix-ng-primitives-aspect-ratio.d.ts} +0 -0
- /package/{avatar/index.d.ts → types/radix-ng-primitives-avatar.d.ts} +0 -0
- /package/{config/index.d.ts → types/radix-ng-primitives-config.d.ts} +0 -0
- /package/{context-menu/index.d.ts → types/radix-ng-primitives-context-menu.d.ts} +0 -0
- /package/{dismissable-layer/index.d.ts → types/radix-ng-primitives-dismissable-layer.d.ts} +0 -0
- /package/{dropdown-menu/index.d.ts → types/radix-ng-primitives-dropdown-menu.d.ts} +0 -0
- /package/{editable/index.d.ts → types/radix-ng-primitives-editable.d.ts} +0 -0
- /package/{focus-guards/index.d.ts → types/radix-ng-primitives-focus-guards.d.ts} +0 -0
- /package/{focus-scope/index.d.ts → types/radix-ng-primitives-focus-scope.d.ts} +0 -0
- /package/{label/index.d.ts → types/radix-ng-primitives-label.d.ts} +0 -0
- /package/{menubar/index.d.ts → types/radix-ng-primitives-menubar.d.ts} +0 -0
- /package/{pagination/index.d.ts → types/radix-ng-primitives-pagination.d.ts} +0 -0
- /package/{portal/index.d.ts → types/radix-ng-primitives-portal.d.ts} +0 -0
- /package/{presence/index.d.ts → types/radix-ng-primitives-presence.d.ts} +0 -0
- /package/{select/index.d.ts → types/radix-ng-primitives-select.d.ts} +0 -0
- /package/{separator/index.d.ts → types/radix-ng-primitives-separator.d.ts} +0 -0
- /package/{toggle/index.d.ts → types/radix-ng-primitives-toggle.d.ts} +0 -0
- /package/{toolbar/index.d.ts → types/radix-ng-primitives-toolbar.d.ts} +0 -0
- /package/{visually-hidden/index.d.ts → types/radix-ng-primitives-visually-hidden.d.ts} +0 -0
- /package/{index.d.ts → types/radix-ng-primitives.d.ts} +0 -0
|
@@ -26,52 +26,44 @@ const rootContext = () => {
|
|
|
26
26
|
class RdxSwitchRootDirective {
|
|
27
27
|
constructor() {
|
|
28
28
|
this.cva = injectControlValueAccessor();
|
|
29
|
-
this.id = input(inject(_IdGenerator).getId('rdx-switch-'), ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
29
|
+
this.id = input(inject(_IdGenerator).getId('rdx-switch-'), ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
30
30
|
/**
|
|
31
31
|
* When true, indicates that the user must check the switch before the owning form can be submitted.
|
|
32
32
|
*
|
|
33
33
|
* @default false
|
|
34
34
|
* @group Props
|
|
35
35
|
*/
|
|
36
|
-
this.required = input(false, ...(ngDevMode ?
|
|
37
|
-
transform: booleanAttribute
|
|
38
|
-
}]));
|
|
36
|
+
this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
39
37
|
/**
|
|
40
38
|
* Establishes relationships between the component and label(s) where its value should be one or more element IDs.
|
|
41
39
|
* @default null
|
|
42
40
|
* @group Props
|
|
43
41
|
*/
|
|
44
|
-
this.ariaLabelledBy = input(undefined, ...(ngDevMode ?
|
|
45
|
-
alias: 'aria-labelledby'
|
|
46
|
-
}]));
|
|
42
|
+
this.ariaLabelledBy = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
|
|
47
43
|
/**
|
|
48
44
|
* Used to define a string that autocomplete attribute the current element.
|
|
49
45
|
* @default null
|
|
50
46
|
* @group Props
|
|
51
47
|
*/
|
|
52
|
-
this.ariaLabel = input(undefined, ...(ngDevMode ?
|
|
53
|
-
alias: 'aria-label'
|
|
54
|
-
}]));
|
|
48
|
+
this.ariaLabel = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
|
|
55
49
|
/**
|
|
56
50
|
* The state of the switch when it is initially rendered. Use when you do not need to control its state.
|
|
57
51
|
* @default false
|
|
58
52
|
* @group Props
|
|
59
53
|
*/
|
|
60
|
-
this.defaultChecked = input(false, ...(ngDevMode ?
|
|
54
|
+
this.defaultChecked = input(false, { ...(ngDevMode ? { debugName: "defaultChecked" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
61
55
|
/**
|
|
62
56
|
* The controlled state of the switch. Must be used in conjunction with onCheckedChange.
|
|
63
57
|
* @defaultValue false
|
|
64
58
|
* @group Props
|
|
65
59
|
*/
|
|
66
|
-
this.checked = model(this.defaultChecked(), ...(ngDevMode ? [{ debugName: "checked" }] : []));
|
|
60
|
+
this.checked = model(this.defaultChecked(), ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
67
61
|
/**
|
|
68
62
|
* When `true`, prevents the user from interacting with the switch.
|
|
69
63
|
* @default false
|
|
70
64
|
* @group Props
|
|
71
65
|
*/
|
|
72
|
-
this.disabled = input(false, ...(ngDevMode ?
|
|
73
|
-
transform: booleanAttribute
|
|
74
|
-
}]));
|
|
66
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
75
67
|
/**
|
|
76
68
|
* Event handler called when the state of the switch changes.
|
|
77
69
|
*
|
|
@@ -91,10 +83,10 @@ class RdxSwitchRootDirective {
|
|
|
91
83
|
this.cva.setValue(this.checked());
|
|
92
84
|
}
|
|
93
85
|
}
|
|
94
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
95
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
86
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
87
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxSwitchRootDirective, isStandalone: true, selector: "button[rdxSwitchRoot]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, defaultChecked: { classPropertyName: "defaultChecked", publicName: "defaultChecked", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", onCheckedChange: "onCheckedChange" }, host: { attributes: { "role": "switch", "type": "button" }, listeners: { "click": "toggle()", "keydown.enter": "$event.preventDefault()" }, properties: { "id": "id()", "attr.aria-checked": "cva.value()", "attr.aria-required": "required()", "attr.data-state": "cva.value() ? \"checked\" : \"unchecked\"", "attr.data-disabled": "cva.disabled() ? \"true\" : undefined", "attr.disabled": "cva.disabled() ? cva.disabled() : undefined", "attr.value": "cva.value()" } }, providers: [provideSwitchRootContext(rootContext)], exportAs: ["rdxSwitchRoot"], hostDirectives: [{ directive: i1.RdxControlValueAccessor, inputs: ["value", "checked", "disabled", "disabled"] }], ngImport: i0 }); }
|
|
96
88
|
}
|
|
97
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchRootDirective, decorators: [{
|
|
98
90
|
type: Directive,
|
|
99
91
|
args: [{
|
|
100
92
|
selector: 'button[rdxSwitchRoot]',
|
|
@@ -115,12 +107,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
115
107
|
'[attr.data-state]': 'cva.value() ? "checked" : "unchecked"',
|
|
116
108
|
'[attr.data-disabled]': 'cva.disabled() ? "true" : undefined',
|
|
117
109
|
'[attr.disabled]': 'cva.disabled() ? cva.disabled() : undefined',
|
|
118
|
-
'[value]': 'cva.value()',
|
|
110
|
+
'[attr.value]': 'cva.value()',
|
|
119
111
|
'(click)': 'toggle()',
|
|
120
112
|
'(keydown.enter)': '$event.preventDefault()'
|
|
121
113
|
}
|
|
122
114
|
}]
|
|
123
|
-
}] });
|
|
115
|
+
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], defaultChecked: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultChecked", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], onCheckedChange: [{ type: i0.Output, args: ["onCheckedChange"] }] } });
|
|
124
116
|
|
|
125
117
|
/**
|
|
126
118
|
* @group Components
|
|
@@ -133,10 +125,10 @@ class RdxSwitchInputDirective {
|
|
|
133
125
|
onBlur() {
|
|
134
126
|
this.rootContext?.markAsTouched();
|
|
135
127
|
}
|
|
136
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
137
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
128
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
129
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxSwitchInputDirective, isStandalone: true, selector: "input[rdxSwitchInput]", host: { attributes: { "type": "checkbox", "tabindex": "-1" }, listeners: { "blur": "onBlur()" }, properties: { "attr.defaultChecked": "rootContext.checked()", "attr.aria-checked": "rootContext.checked()", "attr.aria-hidden": "true", "attr.aria-label": "rootContext.ariaLabel()", "attr.aria-labelledby": "rootContext.ariaLabelledBy()", "attr.aria-required": "rootContext.required()", "attr.data-state": "rootContext.checked() ? \"checked\" : \"unchecked\"", "attr.data-disabled": "rootContext.disabled() ? \"true\" : null", "attr.disabled": "rootContext.disabled() ? rootContext.disabled() : undefined", "attr.value": "rootContext.checked() ? \"on\" : \"off\"" }, styleAttribute: "transform: translateX(-100%); position: absolute; overflow: hidden; pointerEvents: none; opacity: 0; margin: 0;" }, exportAs: ["rdxSwitchInput"], ngImport: i0 }); }
|
|
138
130
|
}
|
|
139
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchInputDirective, decorators: [{
|
|
140
132
|
type: Directive,
|
|
141
133
|
args: [{
|
|
142
134
|
selector: 'input[rdxSwitchInput]',
|
|
@@ -167,10 +159,10 @@ class RdxSwitchThumbDirective {
|
|
|
167
159
|
constructor() {
|
|
168
160
|
this.rootContext = injectSwitchRootContext();
|
|
169
161
|
}
|
|
170
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
171
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
162
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchThumbDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
163
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxSwitchThumbDirective, isStandalone: true, selector: "span[rdxSwitchThumb]", host: { properties: { "attr.data-disabled": "rootContext?.disabled() ? \"\" : undefined", "attr.data-state": "rootContext?.checked() ? \"checked\" : \"unchecked\"" } }, exportAs: ["rdxSwitchThumb"], ngImport: i0 }); }
|
|
172
164
|
}
|
|
173
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchThumbDirective, decorators: [{
|
|
174
166
|
type: Directive,
|
|
175
167
|
args: [{
|
|
176
168
|
selector: 'span[rdxSwitchThumb]',
|
|
@@ -184,11 +176,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
184
176
|
|
|
185
177
|
const switchImports = [RdxSwitchRootDirective, RdxSwitchInputDirective, RdxSwitchThumbDirective];
|
|
186
178
|
class RdxSwitchModule {
|
|
187
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
188
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
189
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
179
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
180
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchModule, imports: [RdxSwitchRootDirective, RdxSwitchInputDirective, RdxSwitchThumbDirective], exports: [RdxSwitchRootDirective, RdxSwitchInputDirective, RdxSwitchThumbDirective] }); }
|
|
181
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchModule }); }
|
|
190
182
|
}
|
|
191
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
183
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchModule, decorators: [{
|
|
192
184
|
type: NgModule,
|
|
193
185
|
args: [{
|
|
194
186
|
imports: [...switchImports],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radix-ng-primitives-switch.mjs","sources":["../tmp-esm2022/switch/src/switch-root.directive.js","../tmp-esm2022/switch/src/switch-input.directive.js","../tmp-esm2022/switch/src/switch-thumb.directive.js","../tmp-esm2022/switch/index.js","../tmp-esm2022/switch/radix-ng-primitives-switch.js"],"sourcesContent":["import { _IdGenerator } from '@angular/cdk/a11y';\nimport { booleanAttribute, Directive, inject, input, model } from '@angular/core';\nimport { outputFromObservable, outputToObservable } from '@angular/core/rxjs-interop';\nimport { createContext, injectControlValueAccessor, RdxControlValueAccessor } from '@radix-ng/primitives/core';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"@radix-ng/primitives/core\";\nexport const [injectSwitchRootContext, provideSwitchRootContext] = createContext('Switch');\nconst rootContext = () => {\n const instance = inject(RdxSwitchRootDirective);\n const cva = injectControlValueAccessor();\n return {\n required: instance.required,\n value: instance.checked,\n checked: cva.value,\n disabled: cva.disabled,\n ariaLabel: instance.ariaLabel,\n ariaLabelledBy: instance.ariaLabelledBy,\n markAsTouched: () => cva.markAsTouched(),\n toggle: () => instance.toggle()\n };\n};\n/**\n * @group Components\n */\nexport class RdxSwitchRootDirective {\n constructor() {\n this.cva = injectControlValueAccessor();\n this.id = input(inject(_IdGenerator).getId('rdx-switch-'), ...(ngDevMode ? [{ debugName: \"id\" }] : []));\n /**\n * When true, indicates that the user must check the switch before the owning form can be submitted.\n *\n * @default false\n * @group Props\n */\n this.required = input(false, ...(ngDevMode ? [{ debugName: \"required\", transform: booleanAttribute }] : [{\n transform: booleanAttribute\n }]));\n /**\n * Establishes relationships between the component and label(s) where its value should be one or more element IDs.\n * @default null\n * @group Props\n */\n this.ariaLabelledBy = input(undefined, ...(ngDevMode ? [{ debugName: \"ariaLabelledBy\", alias: 'aria-labelledby' }] : [{\n alias: 'aria-labelledby'\n }]));\n /**\n * Used to define a string that autocomplete attribute the current element.\n * @default null\n * @group Props\n */\n this.ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: \"ariaLabel\", alias: 'aria-label' }] : [{\n alias: 'aria-label'\n }]));\n /**\n * The state of the switch when it is initially rendered. Use when you do not need to control its state.\n * @default false\n * @group Props\n */\n this.defaultChecked = input(false, ...(ngDevMode ? [{ debugName: \"defaultChecked\", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));\n /**\n * The controlled state of the switch. Must be used in conjunction with onCheckedChange.\n * @defaultValue false\n * @group Props\n */\n this.checked = model(this.defaultChecked(), ...(ngDevMode ? [{ debugName: \"checked\" }] : []));\n /**\n * When `true`, prevents the user from interacting with the switch.\n * @default false\n * @group Props\n */\n this.disabled = input(false, ...(ngDevMode ? [{ debugName: \"disabled\", transform: booleanAttribute }] : [{\n transform: booleanAttribute\n }]));\n /**\n * Event handler called when the state of the switch changes.\n *\n * @param {boolean} value - Boolean value indicates that the option is changed.\n * @group Emits\n */\n this.onCheckedChange = outputFromObservable(outputToObservable(this.cva.valueChange));\n }\n /**\n * Toggles the checked state of the switch.\n * If the switch is disabled, the function returns early.\n * @ignore\n */\n toggle() {\n if (!this.disabled()) {\n this.checked.set(!this.checked());\n this.cva.setValue(this.checked());\n }\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.3.3\", ngImport: i0, type: RdxSwitchRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }\n static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"17.1.0\", version: \"20.3.3\", type: RdxSwitchRootDirective, isStandalone: true, selector: \"button[rdxSwitchRoot]\", inputs: { id: { classPropertyName: \"id\", publicName: \"id\", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: \"required\", publicName: \"required\", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: \"ariaLabelledBy\", publicName: \"aria-labelledby\", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: \"ariaLabel\", publicName: \"aria-label\", isSignal: true, isRequired: false, transformFunction: null }, defaultChecked: { classPropertyName: \"defaultChecked\", publicName: \"defaultChecked\", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: \"checked\", publicName: \"checked\", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: \"disabled\", publicName: \"disabled\", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: \"checkedChange\", onCheckedChange: \"onCheckedChange\" }, host: { attributes: { \"role\": \"switch\", \"type\": \"button\" }, listeners: { \"click\": \"toggle()\", \"keydown.enter\": \"$event.preventDefault()\" }, properties: { \"id\": \"id()\", \"attr.aria-checked\": \"cva.value()\", \"attr.aria-required\": \"required()\", \"attr.data-state\": \"cva.value() ? \\\"checked\\\" : \\\"unchecked\\\"\", \"attr.data-disabled\": \"cva.disabled() ? \\\"true\\\" : undefined\", \"attr.disabled\": \"cva.disabled() ? cva.disabled() : undefined\", \"value\": \"cva.value()\" } }, providers: [provideSwitchRootContext(rootContext)], exportAs: [\"rdxSwitchRoot\"], hostDirectives: [{ directive: i1.RdxControlValueAccessor, inputs: [\"value\", \"checked\", \"disabled\", \"disabled\"] }], ngImport: i0 }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.3.3\", ngImport: i0, type: RdxSwitchRootDirective, decorators: [{\n type: Directive,\n args: [{\n selector: 'button[rdxSwitchRoot]',\n exportAs: 'rdxSwitchRoot',\n providers: [provideSwitchRootContext(rootContext)],\n hostDirectives: [\n {\n directive: RdxControlValueAccessor,\n inputs: ['value: checked', 'disabled']\n }\n ],\n host: {\n role: 'switch',\n type: 'button',\n '[id]': 'id()',\n '[attr.aria-checked]': 'cva.value()',\n '[attr.aria-required]': 'required()',\n '[attr.data-state]': 'cva.value() ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'cva.disabled() ? \"true\" : undefined',\n '[attr.disabled]': 'cva.disabled() ? cva.disabled() : undefined',\n '[value]': 'cva.value()',\n '(click)': 'toggle()',\n '(keydown.enter)': '$event.preventDefault()'\n }\n }]\n }] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3dpdGNoLXJvb3QuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvcHJpbWl0aXZlcy9zd2l0Y2gvc3JjL3N3aXRjaC1yb290LmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFFakQsT0FBTyxFQUNILGdCQUFnQixFQUNoQixTQUFTLEVBQ1QsTUFBTSxFQUNOLEtBQUssRUFHTCxLQUFLLEVBRVIsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxF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R0cmlidXRlXG4gICAgfSk7XG5cbiAgICAvKipcbiAgICAgKiBFdmVudCBoYW5kbGVyIGNhbGxlZCB3aGVuIHRoZSBzdGF0ZSBvZiB0aGUgc3dpdGNoIGNoYW5nZXMuXG4gICAgICpcbiAgICAgKiBAcGFyYW0ge2Jvb2xlYW59IHZhbHVlIC0gQm9vbGVhbiB2YWx1ZSBpbmRpY2F0ZXMgdGhhdCB0aGUgb3B0aW9uIGlzIGNoYW5nZWQuXG4gICAgICogQGdyb3VwIEVtaXRzXG4gICAgICovXG4gICAgcmVhZG9ubHkgb25DaGVja2VkQ2hhbmdlID0gb3V0cHV0RnJvbU9ic2VydmFibGUob3V0cHV0VG9PYnNlcnZhYmxlKHRoaXMuY3ZhLnZhbHVlQ2hhbmdlKSk7XG5cbiAgICAvKipcbiAgICAgKiBUb2dnbGVzIHRoZSBjaGVja2VkIHN0YXRlIG9mIHRoZSBzd2l0Y2guXG4gICAgICogSWYgdGhlIHN3aXRjaCBpcyBkaXNhYmxlZCwgdGhlIGZ1bmN0aW9uIHJldHVybnMgZWFybHkuXG4gICAgICogQGlnbm9yZVxuICAgICAqL1xuICAgIHRvZ2dsZSgpOiB2b2lkIHtcbiAgICAgICAgaWYgKCF0aGlzLmRpc2FibGVkKCkpIHtcbiAgICAgICAgICAgIHRoaXMuY2hlY2tlZC5zZXQoIXRoaXMuY2hlY2tlZCgpKTtcbiAgICAgICAgICAgIHRoaXMuY3ZhLnNldFZhbHVlKHRoaXMuY2hlY2tlZCgpKTtcbiAgICAgICAgfVxuICAgIH1cbn1cbiJdfQ==","import { Directive } from '@angular/core';\nimport { injectSwitchRootContext } from './switch-root.directive';\nimport * as i0 from \"@angular/core\";\n/**\n * @group Components\n */\nexport class RdxSwitchInputDirective {\n constructor() {\n this.rootContext = injectSwitchRootContext();\n }\n /** @ignore */\n onBlur() {\n this.rootContext?.markAsTouched();\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.3.3\", ngImport: i0, type: RdxSwitchInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }\n static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"20.3.3\", type: RdxSwitchInputDirective, isStandalone: true, selector: \"input[rdxSwitchInput]\", host: { attributes: { \"type\": \"checkbox\", \"tabindex\": \"-1\" }, listeners: { \"blur\": \"onBlur()\" }, properties: { \"attr.defaultChecked\": \"rootContext.checked()\", \"attr.aria-checked\": \"rootContext.checked()\", \"attr.aria-hidden\": \"true\", \"attr.aria-label\": \"rootContext.ariaLabel()\", \"attr.aria-labelledby\": \"rootContext.ariaLabelledBy()\", \"attr.aria-required\": \"rootContext.required()\", \"attr.data-state\": \"rootContext.checked() ? \\\"checked\\\" : \\\"unchecked\\\"\", \"attr.data-disabled\": \"rootContext.disabled() ? \\\"true\\\" : null\", \"attr.disabled\": \"rootContext.disabled() ? rootContext.disabled() : undefined\", \"attr.value\": \"rootContext.checked() ? \\\"on\\\" : \\\"off\\\"\" }, styleAttribute: \"transform: translateX(-100%); position: absolute; overflow: hidden; pointerEvents: none; opacity: 0; margin: 0;\" }, exportAs: [\"rdxSwitchInput\"], ngImport: i0 }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.3.3\", ngImport: i0, type: RdxSwitchInputDirective, decorators: [{\n type: Directive,\n args: [{\n selector: 'input[rdxSwitchInput]',\n exportAs: 'rdxSwitchInput',\n host: {\n type: 'checkbox',\n tabindex: '-1',\n '[attr.defaultChecked]': 'rootContext.checked()',\n '[attr.aria-checked]': 'rootContext.checked()',\n '[attr.aria-hidden]': 'true',\n '[attr.aria-label]': 'rootContext.ariaLabel()',\n '[attr.aria-labelledby]': 'rootContext.ariaLabelledBy()',\n '[attr.aria-required]': 'rootContext.required()',\n '[attr.data-state]': 'rootContext.checked() ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'rootContext.disabled() ? \"true\" : null',\n '[attr.disabled]': 'rootContext.disabled() ? rootContext.disabled() : undefined',\n '[attr.value]': 'rootContext.checked() ? \"on\" : \"off\"',\n style: 'transform: translateX(-100%); position: absolute; overflow: hidden; pointerEvents: none; opacity: 0; margin: 0;',\n '(blur)': 'onBlur()'\n }\n }]\n }] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3dpdGNoLWlucHV0LmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3ByaW1pdGl2ZXMvc3dpdGNoL3NyYy9zd2l0Y2gtaW5wdXQuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDMUMsT0FBTyxFQUFFLHVCQUF1QixFQUFFLE1BQU0seUJBQXlCLENBQUM7O0FBRWxFOztHQUVHO0FBc0JILE1BQU0sT0FBTyx1QkFBdUI7SUFyQnBDO1FBc0J1QixnQkFBVyxHQUFHLHVCQUF1QixFQUFHLENBQUM7S0FNL0Q7SUFKRyxjQUFjO0lBQ0osTUFBTTtRQUNaLElBQUksQ0FBQyxXQUFXLEVBQUUsYUFBYSxFQUFFLENBQUM7SUFDdEMsQ0FBQzs4R0FOUSx1QkFBdUI7a0dBQXZCLHVCQUF1Qjs7MkZBQXZCLHVCQUF1QjtrQkFyQm5DLFNBQVM7bUJBQUM7b0JBQ1AsUUFBUSxFQUFFLHVCQUF1QjtvQkFDakMsUUFBUSxFQUFFLGdCQUFnQjtvQkFDMUIsSUFBSSxFQUFFO3dCQUNGLElBQUksRUFBRSxVQUFVO3dCQUNoQixRQUFRLEVBQUUsSUFBSTt3QkFDZCx1QkFBdUIsRUFBRSx1QkFBdUI7d0JBQ2hELHFCQUFxQixFQUFFLHVCQUF1Qjt3QkFDOUMsb0JBQW9CLEVBQUUsTUFB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itchRootContext } from './switch-root.directive';\nimport * as i0 from \"@angular/core\";\n/**\n * @group Components\n */\nexport class RdxSwitchThumbDirective {\n constructor() {\n this.rootContext = injectSwitchRootContext();\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.3.3\", ngImport: i0, type: RdxSwitchThumbDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }\n static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"20.3.3\", type: RdxSwitchThumbDirective, isStandalone: true, selector: \"span[rdxSwitchThumb]\", host: { properties: { \"attr.data-disabled\": \"rootContext?.disabled() ? \\\"\\\" : undefined\", \"attr.data-state\": \"rootContext?.checked() ? \\\"checked\\\" : \\\"unchecked\\\"\" } }, exportAs: [\"rdxSwitchThumb\"], ngImport: i0 }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.3.3\", ngImport: i0, type: RdxSwitchThumbDirective, decorators: [{\n type: Directive,\n args: [{\n selector: 'span[rdxSwitchThumb]',\n exportAs: 'rdxSwitchThumb',\n host: {\n '[attr.data-disabled]': 'rootContext?.disabled() ? \"\" : undefined',\n '[attr.data-state]': 'rootContext?.checked() ? \"checked\" : \"unchecked\"'\n }\n }]\n }] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3dpdGNoLXRodW1iLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3ByaW1pdGl2ZXMvc3dpdGNoL3NyYy9zd2l0Y2gtdGh1bWIuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDMUMsT0FBTyxFQUFFLHVCQUF1QixFQUFFLE1BQU0seUJBQXlCLEN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dpdGNoUm9vdENvbnRleHQoKTtcbn1cbiJdfQ==","import { NgModule } from '@angular/core';\nimport { RdxSwitchInputDirective } from './src/switch-input.directive';\nimport { RdxSwitchRootDirective } from './src/switch-root.directive';\nimport { RdxSwitchThumbDirective } from './src/switch-thumb.directive';\nimport * as i0 from \"@angular/core\";\nexport * from './src/switch-input.directive';\nexport * from './src/switch-root.directive';\nexport * from './src/switch-thumb.directive';\nconst switchImports = [RdxSwitchRootDirective, RdxSwitchInputDirective, RdxSwitchThumbDirective];\nexport class RdxSwitchModule {\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.3.3\", ngImport: i0, type: RdxSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }\n static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"20.3.3\", ngImport: i0, type: RdxSwitchModule, imports: [RdxSwitchRootDirective, RdxSwitchInputDirective, RdxSwitchThumbDirective], exports: [RdxSwitchRootDirective, RdxSwitchInputDirective, RdxSwitchThumbDirective] }); }\n static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"20.3.3\", ngImport: i0, type: RdxSwitchModule }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.3.3\", ngImport: i0, type: RdxSwitchModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [...switchImports],\n exports: [...switchImports]\n }]\n }] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wYWNrYWdlcy9wcmltaXRpdmVzL3N3aXRjaC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSx1QkF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c3JjL3N3aXRjaC1pbnB1dC5kaXJlY3RpdmUnO1xuZXhwb3J0ICogZnJvbSAnLi9zcmMvc3dpdGNoLXJvb3QuZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vc3JjL3N3aXRjaC10aHVtYi5kaXJlY3RpdmUnO1xuXG5jb25zdCBzd2l0Y2hJbXBvcnRzID0gW1JkeFN3aXRjaFJvb3REaXJlY3RpdmUsIFJkeFN3aXRjaElucHV0RGlyZWN0aXZlLCBSZHhTd2l0Y2hUaHVtYkRpcmVjdGl2ZV07XG5cbkBOZ01vZHVsZSh7XG4gICAgaW1wb3J0czogWy4uLnN3aXRjaEltcG9ydHNdLFxuICAgIGV4cG9ydHM6IFsuLi5zd2l0Y2hJbXBvcnRzXVxufSlcbmV4cG9ydCBjbGFzcyBSZHhTd2l0Y2hNb2R1bGUge31cbiJdfQ==","/**\n * Generated bundle index. Do not edit.\n */\nexport * from './index';\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmFkaXgtbmctcHJpbWl0aXZlcy1zd2l0Y2guanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wYWNrYWdlcy9wcmltaXRpdmVzL3N3aXRjaC9yYWRpeC1uZy1wcmltaXRpdmVzLXN3aXRjaC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ=="],"names":[],"mappings":";;;;;;;AAMY,MAAC,CAAC,uBAAuB,EAAE,wBAAwB,CAAC,GAAG,aAAa,CAAC,QAAQ;AACzF,MAAM,WAAW,GAAG,MAAM;AAC1B,IAAI,MAAM,QAAQ,GA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EAAE,CAAC,sBAAsB,EAAE,uBAAuB,EAAE,uBAAuB,CAAC,EAAE,CAAC,CAAC;AAC5S,IAAI,SAAS,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,mBAAmB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC;AAClI;AACA,EAAE,CAAC,wBAAwB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC;AACzH,YAAY,IAAI,EAAE,QAAQ;AAC1B,YAAY,IAAI,EAAE,CAAC;AACnB,oBAAoB,OAAO,EAAE,CAAC,GAAG,aAAa,CAAC;AAC/C,oBAAoB,OAAO,EAAE,CAAC,GAAG,aAAa;AAC9C,iBAAiB;AACjB,SAAS,CAAC,EAAE,CAAC;;ACpBb;AACA;AACA;;;;"}
|
|
1
|
+
{"version":3,"file":"radix-ng-primitives-switch.mjs","sources":["../../../packages/primitives/switch/src/switch-root.directive.ts","../../../packages/primitives/switch/src/switch-input.directive.ts","../../../packages/primitives/switch/src/switch-thumb.directive.ts","../../../packages/primitives/switch/index.ts","../../../packages/primitives/switch/radix-ng-primitives-switch.ts"],"sourcesContent":["import { _IdGenerator } from '@angular/cdk/a11y';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n Directive,\n inject,\n input,\n InputSignal,\n InputSignalWithTransform,\n model,\n Signal\n} from '@angular/core';\nimport { outputFromObservable, outputToObservable } from '@angular/core/rxjs-interop';\nimport { createContext, injectControlValueAccessor, RdxControlValueAccessor } from '@radix-ng/primitives/core';\n\nexport interface SwitchContext {\n required: InputSignalWithTransform<boolean, BooleanInput>;\n checked: Signal<boolean | undefined>;\n disabled: Signal<boolean | undefined>;\n ariaLabel: InputSignal<string | undefined>;\n ariaLabelledBy: InputSignal<string | undefined>;\n markAsTouched: () => void;\n toggle: () => void;\n}\n\nexport const [injectSwitchRootContext, provideSwitchRootContext] = createContext<SwitchContext>('Switch');\n\nconst rootContext = () => {\n const instance = inject(RdxSwitchRootDirective);\n const cva = injectControlValueAccessor<boolean | undefined>();\n\n return {\n required: instance.required,\n value: instance.checked,\n checked: cva.value,\n disabled: cva.disabled,\n ariaLabel: instance.ariaLabel,\n ariaLabelledBy: instance.ariaLabelledBy,\n markAsTouched: () => cva.markAsTouched(),\n toggle: () => instance.toggle()\n };\n};\n\n/**\n * @group Components\n */\n@Directive({\n selector: 'button[rdxSwitchRoot]',\n exportAs: 'rdxSwitchRoot',\n providers: [provideSwitchRootContext(rootContext)],\n hostDirectives: [\n {\n directive: RdxControlValueAccessor,\n inputs: ['value: checked', 'disabled']\n }\n ],\n host: {\n role: 'switch',\n type: 'button',\n '[id]': 'id()',\n '[attr.aria-checked]': 'cva.value()',\n '[attr.aria-required]': 'required()',\n '[attr.data-state]': 'cva.value() ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'cva.disabled() ? \"true\" : undefined',\n '[attr.disabled]': 'cva.disabled() ? cva.disabled() : undefined',\n '[attr.value]': 'cva.value()',\n\n '(click)': 'toggle()',\n '(keydown.enter)': '$event.preventDefault()'\n }\n})\nexport class RdxSwitchRootDirective {\n protected readonly cva = injectControlValueAccessor<boolean | undefined>();\n\n readonly id = input<string>(inject(_IdGenerator).getId('rdx-switch-'));\n\n /**\n * When true, indicates that the user must check the switch before the owning form can be submitted.\n *\n * @default false\n * @group Props\n */\n readonly required = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute\n });\n\n /**\n * Establishes relationships between the component and label(s) where its value should be one or more element IDs.\n * @default null\n * @group Props\n */\n readonly ariaLabelledBy = input<string | undefined>(undefined, {\n alias: 'aria-labelledby'\n });\n\n /**\n * Used to define a string that autocomplete attribute the current element.\n * @default null\n * @group Props\n */\n readonly ariaLabel = input<string | undefined>(undefined, {\n alias: 'aria-label'\n });\n\n /**\n * The state of the switch when it is initially rendered. Use when you do not need to control its state.\n * @default false\n * @group Props\n */\n readonly defaultChecked = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * The controlled state of the switch. Must be used in conjunction with onCheckedChange.\n * @defaultValue false\n * @group Props\n */\n readonly checked = model<boolean>(this.defaultChecked());\n\n /**\n * When `true`, prevents the user from interacting with the switch.\n * @default false\n * @group Props\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute\n });\n\n /**\n * Event handler called when the state of the switch changes.\n *\n * @param {boolean} value - Boolean value indicates that the option is changed.\n * @group Emits\n */\n readonly onCheckedChange = outputFromObservable(outputToObservable(this.cva.valueChange));\n\n /**\n * Toggles the checked state of the switch.\n * If the switch is disabled, the function returns early.\n * @ignore\n */\n toggle(): void {\n if (!this.disabled()) {\n this.checked.set(!this.checked());\n this.cva.setValue(this.checked());\n }\n }\n}\n","import { Directive } from '@angular/core';\nimport { injectSwitchRootContext } from './switch-root.directive';\n\n/**\n * @group Components\n */\n@Directive({\n selector: 'input[rdxSwitchInput]',\n exportAs: 'rdxSwitchInput',\n host: {\n type: 'checkbox',\n tabindex: '-1',\n '[attr.defaultChecked]': 'rootContext.checked()',\n '[attr.aria-checked]': 'rootContext.checked()',\n '[attr.aria-hidden]': 'true',\n '[attr.aria-label]': 'rootContext.ariaLabel()',\n '[attr.aria-labelledby]': 'rootContext.ariaLabelledBy()',\n '[attr.aria-required]': 'rootContext.required()',\n '[attr.data-state]': 'rootContext.checked() ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'rootContext.disabled() ? \"true\" : null',\n '[attr.disabled]': 'rootContext.disabled() ? rootContext.disabled() : undefined',\n '[attr.value]': 'rootContext.checked() ? \"on\" : \"off\"',\n style: 'transform: translateX(-100%); position: absolute; overflow: hidden; pointerEvents: none; opacity: 0; margin: 0;',\n\n '(blur)': 'onBlur()'\n }\n})\nexport class RdxSwitchInputDirective {\n protected readonly rootContext = injectSwitchRootContext()!;\n\n /** @ignore */\n protected onBlur() {\n this.rootContext?.markAsTouched();\n }\n}\n","import { Directive } from '@angular/core';\nimport { injectSwitchRootContext } from './switch-root.directive';\n\n/**\n * @group Components\n */\n@Directive({\n selector: 'span[rdxSwitchThumb]',\n exportAs: 'rdxSwitchThumb',\n host: {\n '[attr.data-disabled]': 'rootContext?.disabled() ? \"\" : undefined',\n '[attr.data-state]': 'rootContext?.checked() ? \"checked\" : \"unchecked\"'\n }\n})\nexport class RdxSwitchThumbDirective {\n protected readonly rootContext = injectSwitchRootContext();\n}\n","import { NgModule } from '@angular/core';\nimport { RdxSwitchInputDirective } from './src/switch-input.directive';\nimport { RdxSwitchRootDirective } from './src/switch-root.directive';\nimport { RdxSwitchThumbDirective } from './src/switch-thumb.directive';\n\nexport * from './src/switch-input.directive';\nexport * from './src/switch-root.directive';\nexport * from './src/switch-thumb.directive';\n\nconst switchImports = [RdxSwitchRootDirective, RdxSwitchInputDirective, RdxSwitchThumbDirective];\n\n@NgModule({\n imports: [...switchImports],\n exports: [...switchImports]\n})\nexport class RdxSwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAyBO,MAAM,CAAC,uBAAuB,EAAE,wBAAwB,CAAC,GAAG,aAAa,CAAgB,QAAQ;AAExG,MAAM,WAAW,GAAG,MAAK;AACrB,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,sBAAsB,CAAC;AAC/C,IAAA,MAAM,GAAG,GAAG,0BAA0B,EAAuB;IAE7D,OAAO;QACH,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,KAAK,EAAE,QAAQ,CAAC,OAAO;QACvB,OAAO,EAAE,GAAG,CAAC,KAAK;QAClB,QAAQ,EAAE,GAAG,CAAC,QAAQ;QACtB,SAAS,EAAE,QAAQ,CAAC,SAAS;QAC7B,cAAc,EAAE,QAAQ,CAAC,cAAc;AACvC,QAAA,a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;;ACJD,MAAM,aAAa,GAAG,CAAC,sBAAsB,EAAE,uBAAuB,EAAE,uBAAuB,CAAC;MAMnF,eAAe,CAAA;8GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAf,eAAe,EAAA,OAAA,EAAA,CANL,sBAAsB,EAAE,uBAAuB,EAAE,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAAxE,sBAAsB,EAAE,uBAAuB,EAAE,uBAAuB,CAAA,EAAA,CAAA,CAAA;+GAMlF,eAAe,EAAA,CAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,GAAG,aAAa,CAAC;AAC3B,oBAAA,OAAO,EAAE,CAAC,GAAG,aAAa;AAC7B,iBAAA;;;ACdD;;AAEG;;;;"}
|
|
@@ -10,17 +10,17 @@ class RdxTabsRootDirective {
|
|
|
10
10
|
/**
|
|
11
11
|
* The controlled value of the tab to activate. Should be used in conjunction with `onValueChange`.
|
|
12
12
|
*/
|
|
13
|
-
this.value = model(...(ngDevMode ? [undefined, { debugName: "value" }] : []));
|
|
14
|
-
this.defaultValue = input(...(ngDevMode ? [undefined, { debugName: "defaultValue" }] : []));
|
|
13
|
+
this.value = model(...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
|
|
14
|
+
this.defaultValue = input(...(ngDevMode ? [undefined, { debugName: "defaultValue" }] : /* istanbul ignore next */ []));
|
|
15
15
|
/**
|
|
16
16
|
* When automatic, tabs are activated when receiving focus. When manual, tabs are activated when clicked.
|
|
17
17
|
*/
|
|
18
|
-
this.activationMode = input('automatic', ...(ngDevMode ? [{ debugName: "activationMode" }] : []));
|
|
18
|
+
this.activationMode = input('automatic', ...(ngDevMode ? [{ debugName: "activationMode" }] : /* istanbul ignore next */ []));
|
|
19
19
|
/**
|
|
20
20
|
* The orientation of the component.
|
|
21
21
|
*/
|
|
22
|
-
this.orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : []));
|
|
23
|
-
this.dir = input('ltr', ...(ngDevMode ? [{ debugName: "dir" }] : []));
|
|
22
|
+
this.orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
23
|
+
this.dir = input('ltr', ...(ngDevMode ? [{ debugName: "dir" }] : /* istanbul ignore next */ []));
|
|
24
24
|
/**
|
|
25
25
|
* Event handler called when the value changes.
|
|
26
26
|
*/
|
|
@@ -39,10 +39,10 @@ class RdxTabsRootDirective {
|
|
|
39
39
|
getBaseId() {
|
|
40
40
|
return `tabs-${Math.random().toString(36).substr(2, 9)}`;
|
|
41
41
|
}
|
|
42
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
43
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
42
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxTabsRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
43
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxTabsRootDirective, isStandalone: true, selector: "[rdxTabsRoot]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, activationMode: { classPropertyName: "activationMode", publicName: "activationMode", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, dir: { classPropertyName: "dir", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", onValueChange: "onValueChange" }, host: { properties: { "attr.data-orientation": "orientation()", "attr.dir": "dir()" } }, providers: [provideToken(RDX_TABS_ROOT_TOKEN, RdxTabsRootDirective)], ngImport: i0 }); }
|
|
44
44
|
}
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxTabsRootDirective, decorators: [{
|
|
46
46
|
type: Directive,
|
|
47
47
|
args: [{
|
|
48
48
|
selector: '[rdxTabsRoot]',
|
|
@@ -52,7 +52,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
52
52
|
'[attr.dir]': 'dir()'
|
|
53
53
|
}
|
|
54
54
|
}]
|
|
55
|
-
}] });
|
|
55
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], activationMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "activationMode", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], dir: [{ type: i0.Input, args: [{ isSignal: true, alias: "dir", required: false }] }], onValueChange: [{ type: i0.Output, args: ["onValueChange"] }] } });
|
|
56
56
|
|
|
57
57
|
function makeTriggerId(baseId, value) {
|
|
58
58
|
return `${baseId}-trigger-${value}`;
|
|
@@ -67,15 +67,15 @@ class RdxTabsContentDirective {
|
|
|
67
67
|
/**
|
|
68
68
|
* A unique value that associates the content with a trigger.
|
|
69
69
|
*/
|
|
70
|
-
this.value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
71
|
-
this.contentId = computed(() => makeContentId(this.tabsContext.getBaseId(), this.value()), ...(ngDevMode ? [{ debugName: "contentId" }] : []));
|
|
72
|
-
this.triggerId = computed(() => makeTriggerId(this.tabsContext.getBaseId(), this.value()), ...(ngDevMode ? [{ debugName: "triggerId" }] : []));
|
|
73
|
-
this.selected = computed(() => this.tabsContext.value() === this.value(), ...(ngDevMode ? [{ debugName: "selected" }] : []));
|
|
70
|
+
this.value = input.required(...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
71
|
+
this.contentId = computed(() => makeContentId(this.tabsContext.getBaseId(), this.value()), ...(ngDevMode ? [{ debugName: "contentId" }] : /* istanbul ignore next */ []));
|
|
72
|
+
this.triggerId = computed(() => makeTriggerId(this.tabsContext.getBaseId(), this.value()), ...(ngDevMode ? [{ debugName: "triggerId" }] : /* istanbul ignore next */ []));
|
|
73
|
+
this.selected = computed(() => this.tabsContext.value() === this.value(), ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
|
|
74
74
|
}
|
|
75
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
76
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
75
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxTabsContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
76
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxTabsContentDirective, isStandalone: true, selector: "[rdxTabsContent]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "role": "tabpanel", "tabindex": "0" }, properties: { "id": "contentId()", "attr.aria-labelledby": "triggerId()", "attr.data-state": "selected() ? \"active\" : \"inactive\"", "attr.data-orientation": "tabsContext.orientation()", "hidden": "!selected()" } }, ngImport: i0 }); }
|
|
77
77
|
}
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxTabsContentDirective, decorators: [{
|
|
79
79
|
type: Directive,
|
|
80
80
|
args: [{
|
|
81
81
|
selector: '[rdxTabsContent]',
|
|
@@ -89,16 +89,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
89
89
|
'[hidden]': '!selected()'
|
|
90
90
|
}
|
|
91
91
|
}]
|
|
92
|
-
}] });
|
|
92
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }] } });
|
|
93
93
|
|
|
94
94
|
class RdxTabsListDirective {
|
|
95
95
|
constructor() {
|
|
96
96
|
this.tabsContext = inject(RDX_TABS_ROOT_TOKEN);
|
|
97
97
|
}
|
|
98
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
99
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
98
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxTabsListDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
99
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxTabsListDirective, isStandalone: true, selector: "[rdxTabsList]", host: { attributes: { "role": "tablist" }, properties: { "attr.aria-orientation": "tabsContext.orientation()", "attr.data-orientation": "tabsContext.orientation()" } }, hostDirectives: [{ directive: i1.RdxRovingFocusGroupDirective, inputs: ["dir", "dir", "orientation", "orientation", "loop", "loop"] }], ngImport: i0 }); }
|
|
100
100
|
}
|
|
101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxTabsListDirective, decorators: [{
|
|
102
102
|
type: Directive,
|
|
103
103
|
args: [{
|
|
104
104
|
selector: '[rdxTabsList]',
|
|
@@ -118,22 +118,21 @@ class RdxTabsTriggerDirective {
|
|
|
118
118
|
/**
|
|
119
119
|
* A unique value that associates the trigger with a content.
|
|
120
120
|
*/
|
|
121
|
-
this.value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
121
|
+
this.value = input.required(...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
122
122
|
/**
|
|
123
123
|
* When true, prevents the user from interacting with the tab.
|
|
124
124
|
*/
|
|
125
|
-
this.disabled = input(false, ...(ngDevMode ?
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
this.
|
|
129
|
-
this.triggerId = computed(() => makeTriggerId(this.tabsContext.getBaseId(), this.value()), ...(ngDevMode ? [{ debugName: "triggerId" }] : []));
|
|
130
|
-
this.isSelected = computed(() => this.tabsContext.value() === this.value(), ...(ngDevMode ? [{ debugName: "isSelected" }] : []));
|
|
125
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
126
|
+
this.contentId = computed(() => makeContentId(this.tabsContext.getBaseId(), this.value()), ...(ngDevMode ? [{ debugName: "contentId" }] : /* istanbul ignore next */ []));
|
|
127
|
+
this.triggerId = computed(() => makeTriggerId(this.tabsContext.getBaseId(), this.value()), ...(ngDevMode ? [{ debugName: "triggerId" }] : /* istanbul ignore next */ []));
|
|
128
|
+
this.isSelected = computed(() => this.tabsContext.value() === this.value(), ...(ngDevMode ? [{ debugName: "isSelected" }] : /* istanbul ignore next */ []));
|
|
131
129
|
effect(() => this.rdxRovingFocusItemDirective.setActive(this.isSelected()));
|
|
132
130
|
}
|
|
133
131
|
onMouseDown(event) {
|
|
132
|
+
const mouseEvent = event;
|
|
134
133
|
// only call handler if it's the left button (mousedown gets triggered by all mouse buttons)
|
|
135
134
|
// but not when the control key is pressed (avoiding MacOS right click)
|
|
136
|
-
if (!this.disabled() &&
|
|
135
|
+
if (!this.disabled() && mouseEvent.button === 0 && !mouseEvent.ctrlKey) {
|
|
137
136
|
this.tabsContext?.select(this.value());
|
|
138
137
|
}
|
|
139
138
|
else {
|
|
@@ -142,7 +141,8 @@ class RdxTabsTriggerDirective {
|
|
|
142
141
|
}
|
|
143
142
|
}
|
|
144
143
|
onKeyDown(event) {
|
|
145
|
-
|
|
144
|
+
const keyEvent = event;
|
|
145
|
+
if ([' ', 'Enter'].includes(keyEvent.key)) {
|
|
146
146
|
this.tabsContext?.select(this.value());
|
|
147
147
|
}
|
|
148
148
|
}
|
|
@@ -152,10 +152,10 @@ class RdxTabsTriggerDirective {
|
|
|
152
152
|
this.tabsContext?.select(this.value());
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
156
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
155
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxTabsTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
156
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxTabsTriggerDirective, isStandalone: true, selector: "[rdxTabsTrigger]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button", "role": "tab" }, listeners: { "mousedown": "onMouseDown($event)", "keydown": "onKeyDown($event)", "focus": "onFocus()" }, properties: { "id": "triggerId()", "attr.aria-selected": "isSelected()", "attr.aria-controls": "contentId()", "attr.data-disabled": "disabled() ? '' : undefined", "attr.disabled": "disabled() ? \"\" : undefined", "attr.data-state": "isSelected() ? 'active' : 'inactive'", "attr.data-orientation": "tabsContext.orientation()" } }, hostDirectives: [{ directive: i1.RdxRovingFocusItemDirective, inputs: ["focusable", "focusable", "active", "active", "allowShiftKey", "allowShiftKey"] }], ngImport: i0 }); }
|
|
157
157
|
}
|
|
158
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
158
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxTabsTriggerDirective, decorators: [{
|
|
159
159
|
type: Directive,
|
|
160
160
|
args: [{
|
|
161
161
|
selector: '[rdxTabsTrigger]',
|
|
@@ -172,7 +172,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
172
172
|
'[attr.aria-selected]': 'isSelected()',
|
|
173
173
|
'[attr.aria-controls]': 'contentId()',
|
|
174
174
|
'[attr.data-disabled]': "disabled() ? '' : undefined",
|
|
175
|
-
'[disabled]': 'disabled()',
|
|
175
|
+
'[attr.disabled]': 'disabled() ? "" : undefined',
|
|
176
176
|
'[attr.data-state]': "isSelected() ? 'active' : 'inactive'",
|
|
177
177
|
'[attr.data-orientation]': 'tabsContext.orientation()',
|
|
178
178
|
'(mousedown)': 'onMouseDown($event)',
|
|
@@ -180,15 +180,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
180
180
|
'(focus)': 'onFocus()'
|
|
181
181
|
}
|
|
182
182
|
}]
|
|
183
|
-
}], ctorParameters: () => [] });
|
|
183
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
184
184
|
|
|
185
185
|
const tabsImports = [RdxTabsRootDirective, RdxTabsContentDirective, RdxTabsListDirective, RdxTabsTriggerDirective];
|
|
186
186
|
class RdxTabsModule {
|
|
187
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
188
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
189
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
187
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
188
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: RdxTabsModule, imports: [RdxTabsRootDirective, RdxTabsContentDirective, RdxTabsListDirective, RdxTabsTriggerDirective], exports: [RdxTabsRootDirective, RdxTabsContentDirective, RdxTabsListDirective, RdxTabsTriggerDirective] }); }
|
|
189
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxTabsModule }); }
|
|
190
190
|
}
|
|
191
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxTabsModule, decorators: [{
|
|
192
192
|
type: NgModule,
|
|
193
193
|
args: [{
|
|
194
194
|
imports: [...tabsImports],
|