@radix-ng/primitives 0.16.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/checkbox/src/checkbox-input.directive.d.ts +2 -1
- package/compodoc/documentation.json +3032 -1690
- package/esm2022/accordion/index.mjs +4 -4
- package/esm2022/accordion/src/accordion-content.directive.mjs +3 -3
- package/esm2022/accordion/src/accordion-header.directive.mjs +3 -3
- package/esm2022/accordion/src/accordion-item.directive.mjs +3 -3
- package/esm2022/accordion/src/accordion-root.directive.mjs +3 -3
- package/esm2022/accordion/src/accordion-trigger.directive.mjs +3 -3
- package/esm2022/alert-dialog/index.mjs +4 -4
- package/esm2022/alert-dialog/src/alert-dialog-cancel.directive.mjs +3 -3
- package/esm2022/alert-dialog/src/alert-dialog-content.directive.mjs +3 -3
- package/esm2022/alert-dialog/src/alert-dialog-root.directive.mjs +3 -3
- package/esm2022/alert-dialog/src/alert-dialog-title.directive.mjs +3 -3
- package/esm2022/alert-dialog/src/alert-dialog-trigger.directive.mjs +3 -3
- package/esm2022/alert-dialog/src/alert-dialog.service.mjs +3 -3
- package/esm2022/aspect-ratio/src/aspect-ratio.directive.mjs +3 -3
- package/esm2022/avatar/src/avatar-fallback.directive.mjs +3 -3
- package/esm2022/avatar/src/avatar-image.directive.mjs +3 -3
- package/esm2022/avatar/src/avatar-root.directive.mjs +3 -3
- package/esm2022/checkbox/src/checkbox-button.directive.mjs +3 -3
- package/esm2022/checkbox/src/checkbox-indicator.directive.mjs +3 -3
- package/esm2022/checkbox/src/checkbox-input.directive.mjs +7 -4
- package/esm2022/checkbox/src/checkbox.directive.mjs +3 -3
- package/esm2022/collapsible/src/collapsible-content.directive.mjs +3 -3
- package/esm2022/collapsible/src/collapsible-root.directive.mjs +3 -3
- package/esm2022/collapsible/src/collapsible-trigger.directive.mjs +3 -3
- package/esm2022/context-menu/index.mjs +4 -4
- package/esm2022/context-menu/src/context-menu-content.directive.mjs +3 -3
- package/esm2022/context-menu/src/context-menu-item-checkbox.directive.mjs +3 -3
- package/esm2022/context-menu/src/context-menu-item-indicator.directive.mjs +3 -3
- package/esm2022/context-menu/src/context-menu-item-radio-group.directive.mjs +3 -3
- package/esm2022/context-menu/src/context-menu-item-radio.directive.mjs +3 -3
- package/esm2022/context-menu/src/context-menu-item-selectable.mjs +3 -3
- package/esm2022/context-menu/src/context-menu-item.directive.mjs +3 -3
- package/esm2022/context-menu/src/context-menu-label.directive.mjs +3 -3
- package/esm2022/context-menu/src/context-menu-separator.directive.mjs +3 -3
- package/esm2022/context-menu/src/context-menu-trigger.directive.mjs +3 -3
- package/esm2022/core/src/auto-focus.directive.mjs +3 -3
- package/esm2022/dialog/index.mjs +4 -4
- package/esm2022/dialog/src/dialog-close.directive.mjs +3 -3
- package/esm2022/dialog/src/dialog-content.directive.mjs +3 -3
- package/esm2022/dialog/src/dialog-description.directive.mjs +3 -3
- package/esm2022/dialog/src/dialog-dismiss.directive.mjs +3 -3
- package/esm2022/dialog/src/dialog-title.directive.mjs +3 -3
- package/esm2022/dialog/src/dialog-trigger.directive.mjs +3 -3
- package/esm2022/dialog/src/dialog.service.mjs +3 -3
- package/esm2022/dropdown-menu/index.mjs +4 -4
- package/esm2022/dropdown-menu/src/dropdown-menu-content.directive.mjs +3 -3
- package/esm2022/dropdown-menu/src/dropdown-menu-item-checkbox.directive.mjs +3 -3
- package/esm2022/dropdown-menu/src/dropdown-menu-item-indicator.directive.mjs +3 -3
- package/esm2022/dropdown-menu/src/dropdown-menu-item-radio-group.directive.mjs +3 -3
- package/esm2022/dropdown-menu/src/dropdown-menu-item-radio.directive.mjs +3 -3
- package/esm2022/dropdown-menu/src/dropdown-menu-item-selectable.mjs +3 -3
- package/esm2022/dropdown-menu/src/dropdown-menu-item.directive.mjs +3 -3
- package/esm2022/dropdown-menu/src/dropdown-menu-label.directive.mjs +3 -3
- package/esm2022/dropdown-menu/src/dropdown-menu-separator.directive.mjs +3 -3
- package/esm2022/dropdown-menu/src/dropdown-menu-trigger.directive.mjs +3 -3
- package/esm2022/label/src/label.directive.mjs +3 -3
- package/esm2022/menu/index.mjs +4 -4
- package/esm2022/menu/src/menu-content.directive.mjs +3 -3
- package/esm2022/menu/src/menu-directive.mjs +3 -3
- package/esm2022/menu/src/menu-group.directive.mjs +3 -3
- package/esm2022/menu/src/menu-item.directive.mjs +3 -3
- package/esm2022/menu/src/menu-label.directive.mjs +3 -3
- package/esm2022/menu/src/menu-separator.directive.mjs +3 -3
- package/esm2022/menubar/index.mjs +4 -4
- package/esm2022/menubar/src/menubar-content.directive.mjs +3 -3
- package/esm2022/menubar/src/menubar-item-checkbox.directive.mjs +3 -3
- package/esm2022/menubar/src/menubar-item-indicator.directive.mjs +3 -3
- package/esm2022/menubar/src/menubar-item-radio.directive.mjs +3 -3
- package/esm2022/menubar/src/menubar-item.directive.mjs +3 -3
- package/esm2022/menubar/src/menubar-radio-group.directive.mjs +3 -3
- package/esm2022/menubar/src/menubar-root.directive.mjs +3 -3
- package/esm2022/menubar/src/menubar-separator.directive.mjs +3 -3
- package/esm2022/menubar/src/menubar-trigger.directive.mjs +3 -3
- package/esm2022/progress/index.mjs +4 -4
- package/esm2022/progress/src/progress-indicator.directive.mjs +3 -3
- package/esm2022/progress/src/progress-root.directive.mjs +3 -3
- package/esm2022/radio/src/radio-indicator.directive.mjs +3 -3
- package/esm2022/radio/src/radio-item.directive.mjs +3 -3
- package/esm2022/radio/src/radio-root.directive.mjs +3 -3
- 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 +3 -3
- package/esm2022/switch/index.mjs +4 -4
- package/esm2022/switch/src/switch-input.directive.mjs +3 -3
- package/esm2022/switch/src/switch-root.directive.mjs +3 -3
- package/esm2022/switch/src/switch-thumb.directive.mjs +3 -3
- package/esm2022/tabs/index.mjs +4 -4
- package/esm2022/tabs/src/tabs-content.directive.mjs +3 -3
- package/esm2022/tabs/src/tabs-context.service.mjs +3 -3
- package/esm2022/tabs/src/tabs-list.directive.mjs +3 -3
- package/esm2022/tabs/src/tabs-root.directive.mjs +3 -3
- package/esm2022/tabs/src/tabs-trigger.directive.mjs +3 -3
- package/esm2022/toggle/src/toggle-input.directive.mjs +3 -3
- package/esm2022/toggle/src/toggle.directive.mjs +3 -3
- package/esm2022/toggle-group/src/toggle-group-item.directive.mjs +3 -3
- package/esm2022/toggle-group/src/toggle-group-multiple.directive.mjs +3 -3
- package/esm2022/toggle-group/src/toggle-group.directive.mjs +3 -3
- package/esm2022/visually-hidden/src/visually-hidden-input-bubble.directive.mjs +3 -3
- package/esm2022/visually-hidden/src/visually-hidden-input.directive.mjs +3 -3
- package/esm2022/visually-hidden/src/visually-hidden.directive.mjs +3 -3
- package/fesm2022/radix-ng-primitives-accordion.mjs +19 -19
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs +22 -22
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs +3 -3
- package/fesm2022/radix-ng-primitives-avatar.mjs +9 -9
- 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-context-menu.mjs +34 -34
- package/fesm2022/radix-ng-primitives-core.mjs +3 -3
- package/fesm2022/radix-ng-primitives-dialog.mjs +25 -25
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +34 -34
- package/fesm2022/radix-ng-primitives-label.mjs +3 -3
- package/fesm2022/radix-ng-primitives-menu.mjs +22 -22
- package/fesm2022/radix-ng-primitives-menubar.mjs +31 -31
- package/fesm2022/radix-ng-primitives-progress.mjs +10 -10
- package/fesm2022/radix-ng-primitives-radio.mjs +9 -9
- 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 +3 -3
- package/fesm2022/radix-ng-primitives-switch.mjs +13 -13
- package/fesm2022/radix-ng-primitives-tabs.mjs +19 -19
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +9 -9
- package/fesm2022/radix-ng-primitives-toggle.mjs +6 -6
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs +9 -9
- 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
@@ -42,10 +42,10 @@ class RdxRadioItemDirective {
|
|
42
42
|
_onBlur() {
|
43
43
|
this.radioGroup.onTouched?.();
|
44
44
|
}
|
45
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
46
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.
|
45
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxRadioItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
46
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.11", type: RdxRadioItemDirective, isStandalone: true, selector: "[rdxRadioItem]", inputs: { id: "id", value: "value", disabled: ["disabled", "disabled", booleanAttribute] }, host: { attributes: { "type": "button", "role": "radio" }, listeners: { "click": "_onClick()", "blur": "_onBlur()" }, properties: { "attr.id": "id", "attr.aria-checked": "checked", "attr.data-disabled": "disabled ? \"\" : null", "attr.data-state": "checked ? \"checked\" : \"unchecked\"", "attr.tabindex": "tabIndex" } }, providers: [{ provide: RdxRadioItemToken, useExisting: RdxRadioItemDirective }], exportAs: ["rdxRadioItem"], ngImport: i0 }); }
|
47
47
|
}
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxRadioItemDirective, decorators: [{
|
49
49
|
type: Directive,
|
50
50
|
args: [{
|
51
51
|
selector: '[rdxRadioItem]',
|
@@ -218,13 +218,13 @@ class RdxRadioGroupDirective {
|
|
218
218
|
this.radioItems.first.focus();
|
219
219
|
}
|
220
220
|
}
|
221
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
222
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.
|
221
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxRadioGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
222
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.11", type: RdxRadioGroupDirective, isStandalone: true, selector: "[rdxRadioRoot]", inputs: { value: "value", disabled: ["disabled", "disabled", booleanAttribute], dir: "dir", defaultValue: "defaultValue" }, outputs: { onValueChange: "onValueChange" }, host: { attributes: { "role": "radiogroup" }, listeners: { "keydown": "onKeydown($event)", "focusin": "onFocusin($event)" }, properties: { "attr.aria-orientation": "_orientation", "attr.data-disabled": "disabled ? \"\" : null", "attr.tabindex": "-1", "attr.dir": "dir" } }, providers: [
|
223
223
|
{ provide: RDX_RADIO_GROUP, useExisting: RdxRadioGroupDirective },
|
224
224
|
{ provide: NG_VALUE_ACCESSOR, useExisting: RdxRadioGroupDirective, multi: true }
|
225
225
|
], queries: [{ propertyName: "radioItems", predicate: RdxRadioItemDirective, descendants: true }], exportAs: ["rdxRadioRoot"], ngImport: i0 }); }
|
226
226
|
}
|
227
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxRadioGroupDirective, decorators: [{
|
228
228
|
type: Directive,
|
229
229
|
args: [{
|
230
230
|
selector: '[rdxRadioRoot]',
|
@@ -265,10 +265,10 @@ class RdxRadioIndicatorDirective {
|
|
265
265
|
this.radioGroup = inject(RDX_RADIO_GROUP);
|
266
266
|
this.radioItem = inject(RdxRadioItemDirective);
|
267
267
|
}
|
268
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
269
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.
|
268
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxRadioIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
269
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.11", type: RdxRadioIndicatorDirective, isStandalone: true, selector: "[rdxRadioIndicator]", host: { properties: { "attr.data-state": "radioItem.checked ? \"checked\" : \"unchecked\"", "attr.data-disabled": "radioItem.disabled ? \"\" : null" } }, exportAs: ["rdxRadioIndicator"], ngImport: i0 }); }
|
270
270
|
}
|
271
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxRadioIndicatorDirective, decorators: [{
|
272
272
|
type: Directive,
|
273
273
|
args: [{
|
274
274
|
selector: '[rdxRadioIndicator]',
|
@@ -0,0 +1,576 @@
|
|
1
|
+
import * as i0 from '@angular/core';
|
2
|
+
import { inject, Component, Input, ElementRef, Directive, ContentChild, ChangeDetectorRef, DestroyRef, NgZone, EventEmitter, booleanAttribute, ContentChildren, ViewChild, Output, NgModule } from '@angular/core';
|
3
|
+
import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
|
4
|
+
import { Directionality } from '@angular/cdk/bidi';
|
5
|
+
import { Subscription, defer, merge, take, switchMap, delay, Subject, startWith, pairwise } from 'rxjs';
|
6
|
+
import { ENTER, SPACE } from '@angular/cdk/keycodes';
|
7
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
8
|
+
import { SelectionModel } from '@angular/cdk/collections';
|
9
|
+
import * as i1 from '@angular/cdk/overlay';
|
10
|
+
import { Overlay, CdkConnectedOverlay, OverlayModule } from '@angular/cdk/overlay';
|
11
|
+
|
12
|
+
class RdxSelectValueDirective {
|
13
|
+
constructor() {
|
14
|
+
this.select = inject(RdxSelectComponent);
|
15
|
+
}
|
16
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectValueDirective, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
17
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.11", type: RdxSelectValueDirective, isStandalone: true, selector: "[rdxSelectValue]", inputs: { placeholder: "placeholder" }, exportAs: ["rdxSelectValue"], ngImport: i0, template: `
|
18
|
+
{{ select.selectionModel.isEmpty() ? placeholder : select.selected }}
|
19
|
+
`, isInline: true }); }
|
20
|
+
}
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectValueDirective, decorators: [{
|
22
|
+
type: Component,
|
23
|
+
args: [{
|
24
|
+
selector: '[rdxSelectValue]',
|
25
|
+
standalone: true,
|
26
|
+
exportAs: 'rdxSelectValue',
|
27
|
+
template: `
|
28
|
+
{{ select.selectionModel.isEmpty() ? placeholder : select.selected }}
|
29
|
+
`
|
30
|
+
}]
|
31
|
+
}], propDecorators: { placeholder: [{
|
32
|
+
type: Input
|
33
|
+
}] } });
|
34
|
+
|
35
|
+
class RdxSelectTriggerDirective {
|
36
|
+
constructor() {
|
37
|
+
this.nativeElement = inject(ElementRef).nativeElement;
|
38
|
+
this.select = inject(RdxSelectComponent);
|
39
|
+
}
|
40
|
+
focus() {
|
41
|
+
this.nativeElement.focus();
|
42
|
+
}
|
43
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
44
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.11", type: RdxSelectTriggerDirective, isStandalone: true, selector: "[rdxSelectTrigger]", host: { properties: { "attr.type": "\"button\"", "attr.role": "\"combobox\"", "attr.aria-autocomplete": "\"none\"", "attr.dir": "select.dir", "attr.aria-expanded": "select.open", "attr.aria-required": "select.required", "attr.disabled": "select.disabled ? \"\" : null", "attr.data-disabled": "select.disabled ? \"\" : null", "attr.data-state": "select.open ? 'open': 'closed'", "attr.data-placeholder": "value.placeholder || null" } }, queries: [{ propertyName: "value", first: true, predicate: RdxSelectValueDirective, descendants: true }], ngImport: i0 }); }
|
45
|
+
}
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectTriggerDirective, decorators: [{
|
47
|
+
type: Directive,
|
48
|
+
args: [{
|
49
|
+
selector: '[rdxSelectTrigger]',
|
50
|
+
standalone: true,
|
51
|
+
host: {
|
52
|
+
'[attr.type]': '"button"',
|
53
|
+
'[attr.role]': '"combobox"',
|
54
|
+
'[attr.aria-autocomplete]': '"none"',
|
55
|
+
'[attr.dir]': 'select.dir',
|
56
|
+
'[attr.aria-expanded]': 'select.open',
|
57
|
+
'[attr.aria-required]': 'select.required',
|
58
|
+
'[attr.disabled]': 'select.disabled ? "" : null',
|
59
|
+
'[attr.data-disabled]': 'select.disabled ? "" : null',
|
60
|
+
'[attr.data-state]': "select.open ? 'open': 'closed'",
|
61
|
+
'[attr.data-placeholder]': 'value.placeholder || null'
|
62
|
+
}
|
63
|
+
}]
|
64
|
+
}], propDecorators: { value: [{
|
65
|
+
type: ContentChild,
|
66
|
+
args: [RdxSelectValueDirective]
|
67
|
+
}] } });
|
68
|
+
|
69
|
+
let nextId$1 = 0;
|
70
|
+
class RdxSelectComponent {
|
71
|
+
constructor() {
|
72
|
+
this.overlay = inject(Overlay);
|
73
|
+
this.elementRef = inject(ElementRef);
|
74
|
+
this.changeDetectorRef = inject(ChangeDetectorRef);
|
75
|
+
this.destroyRef = inject(DestroyRef);
|
76
|
+
this.ngZone = inject(NgZone);
|
77
|
+
/**
|
78
|
+
* This position config ensures that the top "start" corner of the overlay
|
79
|
+
* is aligned with the top "start" of the origin by default (overlapping
|
80
|
+
* the trigger completely). If the panel cannot fit below the trigger, it
|
81
|
+
* will fall back to a position above the trigger.
|
82
|
+
*/
|
83
|
+
this.positions = [
|
84
|
+
{
|
85
|
+
originX: 'start',
|
86
|
+
originY: 'bottom',
|
87
|
+
overlayX: 'start',
|
88
|
+
overlayY: 'top'
|
89
|
+
},
|
90
|
+
{
|
91
|
+
originX: 'start',
|
92
|
+
originY: 'top',
|
93
|
+
overlayX: 'start',
|
94
|
+
overlayY: 'bottom'
|
95
|
+
}
|
96
|
+
];
|
97
|
+
this.closeSubscription = Subscription.EMPTY;
|
98
|
+
/**
|
99
|
+
* @ignore
|
100
|
+
*/
|
101
|
+
this.dir = inject(Directionality, { optional: true });
|
102
|
+
/**
|
103
|
+
* @ignore
|
104
|
+
*/
|
105
|
+
this.id = `rdx-select-${nextId$1++}`;
|
106
|
+
this.onValueChange = new EventEmitter();
|
107
|
+
this.onOpenChange = new EventEmitter();
|
108
|
+
this.optionSelectionChanges = defer(() => {
|
109
|
+
if (this.content.options) {
|
110
|
+
return merge(...this.content.options.map((option) => option.onSelectionChange));
|
111
|
+
}
|
112
|
+
return this.ngZone.onStable.asObservable().pipe(take(1), switchMap(() => this.optionSelectionChanges));
|
113
|
+
});
|
114
|
+
}
|
115
|
+
/**
|
116
|
+
* The controlled value of the item to expand
|
117
|
+
*/
|
118
|
+
set value(value) {
|
119
|
+
if (this._value !== value) {
|
120
|
+
this._value = value;
|
121
|
+
this.selectValue(value);
|
122
|
+
this.changeDetectorRef.markForCheck();
|
123
|
+
}
|
124
|
+
}
|
125
|
+
get value() {
|
126
|
+
return this._value ?? this.defaultValue;
|
127
|
+
}
|
128
|
+
get selected() {
|
129
|
+
return this.selectionModel.selected[0].viewValue || null;
|
130
|
+
}
|
131
|
+
ngOnInit() {
|
132
|
+
this.selectionModel = new SelectionModel();
|
133
|
+
this.selectionModel.changed.subscribe((changes) => {
|
134
|
+
if (changes.added.length) {
|
135
|
+
this.onValueChange.emit(this.selectionModel.selected[0].value);
|
136
|
+
}
|
137
|
+
if (changes.removed.length) {
|
138
|
+
changes.removed.forEach((item) => (item.selected = false));
|
139
|
+
}
|
140
|
+
});
|
141
|
+
}
|
142
|
+
ngAfterContentInit() {
|
143
|
+
this.selectDefaultValue();
|
144
|
+
this.optionSelectionChanges.subscribe((event) => {
|
145
|
+
this.selectionModel.clear();
|
146
|
+
this.selectionModel.select(event.source);
|
147
|
+
this.close();
|
148
|
+
this.trigger.focus();
|
149
|
+
});
|
150
|
+
this.content.keyManager.tabOut.subscribe(() => {
|
151
|
+
if (this.open)
|
152
|
+
this.close();
|
153
|
+
});
|
154
|
+
if (this.defaultOpen) {
|
155
|
+
this.openPanel();
|
156
|
+
}
|
157
|
+
}
|
158
|
+
/**
|
159
|
+
* Callback that is invoked when the overlay panel has been attached.
|
160
|
+
*/
|
161
|
+
onAttached() {
|
162
|
+
this.closeSubscription = this.closingActions()
|
163
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
164
|
+
.pipe(delay(0))
|
165
|
+
.subscribe(() => this.close());
|
166
|
+
}
|
167
|
+
onDetach() {
|
168
|
+
this.close();
|
169
|
+
this.closeSubscription.unsubscribe();
|
170
|
+
}
|
171
|
+
/** Toggles the overlay panel open or closed. */
|
172
|
+
toggle() {
|
173
|
+
if (this.open) {
|
174
|
+
this.close();
|
175
|
+
}
|
176
|
+
else {
|
177
|
+
this.openPanel();
|
178
|
+
}
|
179
|
+
}
|
180
|
+
openPanel() {
|
181
|
+
this.open = true;
|
182
|
+
this.onOpenChange.emit(this.open);
|
183
|
+
}
|
184
|
+
close() {
|
185
|
+
this.open = false;
|
186
|
+
this.onOpenChange.emit(this.open);
|
187
|
+
}
|
188
|
+
updateActiveItem(item) {
|
189
|
+
this.content.keyManager.updateActiveItem(item);
|
190
|
+
}
|
191
|
+
selectDefaultValue() {
|
192
|
+
if (!this.defaultValue)
|
193
|
+
return;
|
194
|
+
this.selectValue(this.defaultValue);
|
195
|
+
}
|
196
|
+
selectValue(value) {
|
197
|
+
const option = this.content?.options.find((option) => option.value === value);
|
198
|
+
if (option) {
|
199
|
+
option.selected = true;
|
200
|
+
option.highlighted = true;
|
201
|
+
this.selectionModel.select(option);
|
202
|
+
this.updateActiveItem(option);
|
203
|
+
}
|
204
|
+
}
|
205
|
+
closingActions() {
|
206
|
+
return merge(this.overlayDir.overlayRef.outsidePointerEvents(), this.overlayDir.overlayRef.detachments());
|
207
|
+
}
|
208
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
209
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.11", type: RdxSelectComponent, isStandalone: true, selector: "[rdxSelect]", inputs: { defaultValue: "defaultValue", name: "name", defaultOpen: ["defaultOpen", "defaultOpen", booleanAttribute], open: ["open", "open", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute], required: ["required", "required", booleanAttribute], value: "value" }, outputs: { onValueChange: "onValueChange", onOpenChange: "onOpenChange" }, host: { listeners: { "click": "toggle()", "keydown": "content.keyManager.onKeydown($event)" } }, queries: [{ propertyName: "trigger", first: true, predicate: RdxSelectTriggerDirective, descendants: true }, { propertyName: "content", first: true, predicate: RdxSelectContentDirective, descendants: true }, { propertyName: "items", predicate: RdxSelectItemDirective, descendants: true }], viewQueries: [{ propertyName: "overlayDir", first: true, predicate: CdkConnectedOverlay, descendants: true }], ngImport: i0, template: `
|
210
|
+
<ng-content select="[rdxSelectTrigger]" />
|
211
|
+
|
212
|
+
<ng-template
|
213
|
+
[cdkConnectedOverlayOpen]="open"
|
214
|
+
[cdkConnectedOverlayOrigin]="elementRef"
|
215
|
+
[cdkConnectedOverlayPositions]="positions"
|
216
|
+
[cdkConnectedOverlayScrollStrategy]="overlay.scrollStrategies.reposition()"
|
217
|
+
(attach)="onAttached()"
|
218
|
+
(backdropClick)="close()"
|
219
|
+
(detach)="onDetach()"
|
220
|
+
cdkConnectedOverlay
|
221
|
+
>
|
222
|
+
<ng-content select="[rdxSelectContent]" />
|
223
|
+
</ng-template>
|
224
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }] }); }
|
225
|
+
}
|
226
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectComponent, decorators: [{
|
227
|
+
type: Component,
|
228
|
+
args: [{
|
229
|
+
standalone: true,
|
230
|
+
selector: '[rdxSelect]',
|
231
|
+
template: `
|
232
|
+
<ng-content select="[rdxSelectTrigger]" />
|
233
|
+
|
234
|
+
<ng-template
|
235
|
+
[cdkConnectedOverlayOpen]="open"
|
236
|
+
[cdkConnectedOverlayOrigin]="elementRef"
|
237
|
+
[cdkConnectedOverlayPositions]="positions"
|
238
|
+
[cdkConnectedOverlayScrollStrategy]="overlay.scrollStrategies.reposition()"
|
239
|
+
(attach)="onAttached()"
|
240
|
+
(backdropClick)="close()"
|
241
|
+
(detach)="onDetach()"
|
242
|
+
cdkConnectedOverlay
|
243
|
+
>
|
244
|
+
<ng-content select="[rdxSelectContent]" />
|
245
|
+
</ng-template>
|
246
|
+
`,
|
247
|
+
host: {
|
248
|
+
'(click)': 'toggle()',
|
249
|
+
'(keydown)': 'content.keyManager.onKeydown($event)'
|
250
|
+
},
|
251
|
+
imports: [
|
252
|
+
OverlayModule
|
253
|
+
]
|
254
|
+
}]
|
255
|
+
}], propDecorators: { trigger: [{
|
256
|
+
type: ContentChild,
|
257
|
+
args: [RdxSelectTriggerDirective]
|
258
|
+
}], content: [{
|
259
|
+
type: ContentChild,
|
260
|
+
args: [RdxSelectContentDirective]
|
261
|
+
}], items: [{
|
262
|
+
type: ContentChildren,
|
263
|
+
args: [RdxSelectItemDirective, { descendants: true }]
|
264
|
+
}], overlayDir: [{
|
265
|
+
type: ViewChild,
|
266
|
+
args: [CdkConnectedOverlay, { static: false }]
|
267
|
+
}], defaultValue: [{
|
268
|
+
type: Input
|
269
|
+
}], name: [{
|
270
|
+
type: Input
|
271
|
+
}], defaultOpen: [{
|
272
|
+
type: Input,
|
273
|
+
args: [{ transform: booleanAttribute }]
|
274
|
+
}], open: [{
|
275
|
+
type: Input,
|
276
|
+
args: [{ transform: booleanAttribute }]
|
277
|
+
}], disabled: [{
|
278
|
+
type: Input,
|
279
|
+
args: [{ transform: booleanAttribute }]
|
280
|
+
}], required: [{
|
281
|
+
type: Input,
|
282
|
+
args: [{ transform: booleanAttribute }]
|
283
|
+
}], value: [{
|
284
|
+
type: Input
|
285
|
+
}], onValueChange: [{
|
286
|
+
type: Output
|
287
|
+
}], onOpenChange: [{
|
288
|
+
type: Output
|
289
|
+
}] } });
|
290
|
+
|
291
|
+
let nextId = 0;
|
292
|
+
class RdxSelectItemChange {
|
293
|
+
constructor(source) {
|
294
|
+
this.source = source;
|
295
|
+
}
|
296
|
+
}
|
297
|
+
class RdxSelectItemDirective {
|
298
|
+
get dataState() {
|
299
|
+
return this.selected ? 'checked' : 'unchecked';
|
300
|
+
}
|
301
|
+
set value(value) {
|
302
|
+
this._value = value;
|
303
|
+
}
|
304
|
+
get value() {
|
305
|
+
return this._value || this.id;
|
306
|
+
}
|
307
|
+
/** Whether the SelectItem is disabled. */
|
308
|
+
set disabled(value) {
|
309
|
+
this._disabled = value;
|
310
|
+
}
|
311
|
+
get disabled() {
|
312
|
+
return this._disabled;
|
313
|
+
}
|
314
|
+
get viewValue() {
|
315
|
+
return this.textValue ?? this.nativeElement.textContent;
|
316
|
+
}
|
317
|
+
constructor() {
|
318
|
+
this.select = inject(RdxSelectComponent);
|
319
|
+
this.content = inject(RdxSelectContentDirective);
|
320
|
+
this.onSelectionChange = new EventEmitter();
|
321
|
+
this.nativeElement = inject(ElementRef).nativeElement;
|
322
|
+
this.highlighted = false;
|
323
|
+
/**
|
324
|
+
* The unique SelectItem id.
|
325
|
+
* @ignore
|
326
|
+
*/
|
327
|
+
this.id = `rdx-select-item-${nextId++}`;
|
328
|
+
this.textValue = null;
|
329
|
+
this.content.highlighted.pipe(takeUntilDestroyed()).subscribe((value) => {
|
330
|
+
if (value !== this) {
|
331
|
+
this.highlighted = false;
|
332
|
+
}
|
333
|
+
});
|
334
|
+
}
|
335
|
+
/** Gets the label to be used when determining whether the option should be focused. */
|
336
|
+
getLabel() {
|
337
|
+
return this.viewValue;
|
338
|
+
}
|
339
|
+
/**
|
340
|
+
* `Selects the option while indicating the selection came from the user. Used to
|
341
|
+
* determine if the select's view -> model callback should be invoked.`
|
342
|
+
*/
|
343
|
+
selectViaInteraction() {
|
344
|
+
if (!this.disabled) {
|
345
|
+
this.selected = true;
|
346
|
+
this.onSelectionChange.emit(new RdxSelectItemChange(this));
|
347
|
+
}
|
348
|
+
}
|
349
|
+
handleKeydown(event) {
|
350
|
+
if (event.keyCode === ENTER || event.keyCode === SPACE) {
|
351
|
+
this.selectViaInteraction();
|
352
|
+
// Prevent the page from scrolling down and form submits.
|
353
|
+
event.preventDefault();
|
354
|
+
event.stopPropagation();
|
355
|
+
}
|
356
|
+
}
|
357
|
+
setActiveStyles() {
|
358
|
+
this.highlighted = true;
|
359
|
+
this.nativeElement.focus({ preventScroll: true });
|
360
|
+
}
|
361
|
+
setInactiveStyles() {
|
362
|
+
this.highlighted = false;
|
363
|
+
}
|
364
|
+
onPointerMove() {
|
365
|
+
if (!this.highlighted) {
|
366
|
+
this.nativeElement.focus({ preventScroll: true });
|
367
|
+
this.select.updateActiveItem(this);
|
368
|
+
}
|
369
|
+
}
|
370
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
371
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.11", type: RdxSelectItemDirective, isStandalone: true, selector: "[rdxSelectItem]", inputs: { value: "value", textValue: "textValue", disabled: ["disabled", "disabled", booleanAttribute] }, host: { listeners: { "focus": "content.highlighted.next(this)", "click": "selectViaInteraction()", "keydown": "handleKeydown($event)", "pointermove": "onPointerMove()" }, properties: { "attr.role": "\"option\"", "attr.data-state": "dataState", "attr.aria-selected": "selected", "attr.data-disabled": "disabled || null", "attr.data-highlighted": "highlighted || null", "attr.tabindex": "-1" } }, exportAs: ["rdxSelectItem"], ngImport: i0 }); }
|
372
|
+
}
|
373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectItemDirective, decorators: [{
|
374
|
+
type: Directive,
|
375
|
+
args: [{
|
376
|
+
selector: '[rdxSelectItem]',
|
377
|
+
standalone: true,
|
378
|
+
exportAs: 'rdxSelectItem',
|
379
|
+
host: {
|
380
|
+
'[attr.role]': '"option"',
|
381
|
+
'[attr.data-state]': 'dataState',
|
382
|
+
'[attr.aria-selected]': 'selected',
|
383
|
+
'[attr.data-disabled]': 'disabled || null',
|
384
|
+
'[attr.data-highlighted]': 'highlighted || null',
|
385
|
+
'[attr.tabindex]': '-1',
|
386
|
+
'(focus)': 'content.highlighted.next(this)',
|
387
|
+
'(click)': 'selectViaInteraction()',
|
388
|
+
'(keydown)': 'handleKeydown($event)',
|
389
|
+
'(pointermove)': 'onPointerMove()'
|
390
|
+
}
|
391
|
+
}]
|
392
|
+
}], ctorParameters: () => [], propDecorators: { value: [{
|
393
|
+
type: Input
|
394
|
+
}], textValue: [{
|
395
|
+
type: Input
|
396
|
+
}], disabled: [{
|
397
|
+
type: Input,
|
398
|
+
args: [{ transform: booleanAttribute }]
|
399
|
+
}] } });
|
400
|
+
|
401
|
+
class RdxSelectContentDirective {
|
402
|
+
constructor() {
|
403
|
+
this.destroyRef = inject(DestroyRef);
|
404
|
+
this.dir = inject(Directionality, { optional: true });
|
405
|
+
this.select = inject(RdxSelectComponent);
|
406
|
+
this.highlighted = new Subject();
|
407
|
+
this.highlighted.pipe(startWith(null), pairwise()).subscribe(([prev, item]) => {
|
408
|
+
if (prev) {
|
409
|
+
prev.highlighted = false;
|
410
|
+
}
|
411
|
+
if (item) {
|
412
|
+
item.highlighted = true;
|
413
|
+
}
|
414
|
+
});
|
415
|
+
}
|
416
|
+
initKeyManager() {
|
417
|
+
return new ActiveDescendantKeyManager(this.options)
|
418
|
+
.withTypeAhead()
|
419
|
+
.withVerticalOrientation()
|
420
|
+
.withHorizontalOrientation(this.dir?.value ?? 'ltr');
|
421
|
+
}
|
422
|
+
ngAfterContentInit() {
|
423
|
+
this.keyManager = this.initKeyManager();
|
424
|
+
}
|
425
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
426
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.11", type: RdxSelectContentDirective, isStandalone: true, selector: "[rdxSelectContent]", host: { listeners: { "keydown": "keyManager.onKeydown($event)" }, properties: { "attr.role": "\"listbox\"", "attr.data-state": "select.open ? 'open': 'closed'", "attr.data-side": "true", "attr.data-align": "true" } }, queries: [{ propertyName: "options", predicate: RdxSelectItemDirective, descendants: true }], exportAs: ["rdxSelectContent"], ngImport: i0 }); }
|
427
|
+
}
|
428
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectContentDirective, decorators: [{
|
429
|
+
type: Directive,
|
430
|
+
args: [{
|
431
|
+
selector: '[rdxSelectContent]',
|
432
|
+
standalone: true,
|
433
|
+
exportAs: 'rdxSelectContent',
|
434
|
+
host: {
|
435
|
+
'[attr.role]': '"listbox"',
|
436
|
+
'[attr.data-state]': "select.open ? 'open': 'closed'",
|
437
|
+
'[attr.data-side]': 'true',
|
438
|
+
'[attr.data-align]': 'true',
|
439
|
+
'(keydown)': 'keyManager.onKeydown($event)'
|
440
|
+
}
|
441
|
+
}]
|
442
|
+
}], ctorParameters: () => [], propDecorators: { options: [{
|
443
|
+
type: ContentChildren,
|
444
|
+
args: [RdxSelectItemDirective, { descendants: true }]
|
445
|
+
}] } });
|
446
|
+
|
447
|
+
class RdxSelectGroupDirective {
|
448
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
449
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.11", type: RdxSelectGroupDirective, isStandalone: true, selector: "[rdxSelectGroup]", host: { properties: { "attr.role": "\"group\"" } }, exportAs: ["rdxSelectGroup"], ngImport: i0 }); }
|
450
|
+
}
|
451
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectGroupDirective, decorators: [{
|
452
|
+
type: Directive,
|
453
|
+
args: [{
|
454
|
+
selector: '[rdxSelectGroup]',
|
455
|
+
standalone: true,
|
456
|
+
exportAs: 'rdxSelectGroup',
|
457
|
+
host: {
|
458
|
+
'[attr.role]': '"group"'
|
459
|
+
}
|
460
|
+
}]
|
461
|
+
}] });
|
462
|
+
|
463
|
+
class RdxSelectIconDirective {
|
464
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
465
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.11", type: RdxSelectIconDirective, isStandalone: true, selector: "[rdxSelectIcon]", host: { properties: { "attr.aria-hidden": "true" } }, exportAs: ["rdxSelectIcon"], ngImport: i0 }); }
|
466
|
+
}
|
467
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectIconDirective, decorators: [{
|
468
|
+
type: Directive,
|
469
|
+
args: [{
|
470
|
+
selector: '[rdxSelectIcon]',
|
471
|
+
standalone: true,
|
472
|
+
exportAs: 'rdxSelectIcon',
|
473
|
+
host: {
|
474
|
+
'[attr.aria-hidden]': 'true'
|
475
|
+
}
|
476
|
+
}]
|
477
|
+
}] });
|
478
|
+
|
479
|
+
class RdxSelectItemIndicatorDirective {
|
480
|
+
constructor() {
|
481
|
+
this.item = inject(RdxSelectItemDirective);
|
482
|
+
}
|
483
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectItemIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
484
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.11", type: RdxSelectItemIndicatorDirective, isStandalone: true, selector: "[rdxSelectItemIndicator]", host: { properties: { "attr.aria-hidden": "true", "style.display": "item.selected ? \"\" : \"none\"" } }, exportAs: ["rdxSelectItemIndicator"], ngImport: i0 }); }
|
485
|
+
}
|
486
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectItemIndicatorDirective, decorators: [{
|
487
|
+
type: Directive,
|
488
|
+
args: [{
|
489
|
+
selector: '[rdxSelectItemIndicator]',
|
490
|
+
standalone: true,
|
491
|
+
exportAs: 'rdxSelectItemIndicator',
|
492
|
+
host: {
|
493
|
+
'[attr.aria-hidden]': 'true',
|
494
|
+
'[style.display]': 'item.selected ? "" : "none"'
|
495
|
+
}
|
496
|
+
}]
|
497
|
+
}] });
|
498
|
+
|
499
|
+
class RdxSelectLabelDirective {
|
500
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
501
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.11", type: RdxSelectLabelDirective, isStandalone: true, selector: "[rdxSelectLabel]", exportAs: ["rdxSelectLabel"], ngImport: i0 }); }
|
502
|
+
}
|
503
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectLabelDirective, decorators: [{
|
504
|
+
type: Directive,
|
505
|
+
args: [{
|
506
|
+
selector: '[rdxSelectLabel]',
|
507
|
+
standalone: true,
|
508
|
+
exportAs: 'rdxSelectLabel'
|
509
|
+
}]
|
510
|
+
}] });
|
511
|
+
|
512
|
+
class RdxSelectSeparatorDirective {
|
513
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectSeparatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
514
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.11", type: RdxSelectSeparatorDirective, isStandalone: true, selector: "[rdxSelectSeparator]", host: { properties: { "attr.aria-hidden": "true" } }, exportAs: ["rdxSelectSeparator"], ngImport: i0 }); }
|
515
|
+
}
|
516
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectSeparatorDirective, decorators: [{
|
517
|
+
type: Directive,
|
518
|
+
args: [{
|
519
|
+
selector: '[rdxSelectSeparator]',
|
520
|
+
standalone: true,
|
521
|
+
exportAs: 'rdxSelectSeparator',
|
522
|
+
host: {
|
523
|
+
'[attr.aria-hidden]': 'true'
|
524
|
+
}
|
525
|
+
}]
|
526
|
+
}] });
|
527
|
+
|
528
|
+
const _imports = [
|
529
|
+
RdxSelectContentDirective,
|
530
|
+
RdxSelectGroupDirective,
|
531
|
+
RdxSelectItemDirective,
|
532
|
+
RdxSelectItemIndicatorDirective,
|
533
|
+
RdxSelectLabelDirective,
|
534
|
+
RdxSelectComponent,
|
535
|
+
RdxSelectSeparatorDirective,
|
536
|
+
RdxSelectTriggerDirective,
|
537
|
+
RdxSelectValueDirective,
|
538
|
+
RdxSelectIconDirective
|
539
|
+
];
|
540
|
+
class RdxSelectModule {
|
541
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
542
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectModule, imports: [RdxSelectContentDirective,
|
543
|
+
RdxSelectGroupDirective,
|
544
|
+
RdxSelectItemDirective,
|
545
|
+
RdxSelectItemIndicatorDirective,
|
546
|
+
RdxSelectLabelDirective,
|
547
|
+
RdxSelectComponent,
|
548
|
+
RdxSelectSeparatorDirective,
|
549
|
+
RdxSelectTriggerDirective,
|
550
|
+
RdxSelectValueDirective,
|
551
|
+
RdxSelectIconDirective], exports: [RdxSelectContentDirective,
|
552
|
+
RdxSelectGroupDirective,
|
553
|
+
RdxSelectItemDirective,
|
554
|
+
RdxSelectItemIndicatorDirective,
|
555
|
+
RdxSelectLabelDirective,
|
556
|
+
RdxSelectComponent,
|
557
|
+
RdxSelectSeparatorDirective,
|
558
|
+
RdxSelectTriggerDirective,
|
559
|
+
RdxSelectValueDirective,
|
560
|
+
RdxSelectIconDirective] }); }
|
561
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectModule, imports: [RdxSelectComponent] }); }
|
562
|
+
}
|
563
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSelectModule, decorators: [{
|
564
|
+
type: NgModule,
|
565
|
+
args: [{
|
566
|
+
imports: [..._imports],
|
567
|
+
exports: [..._imports]
|
568
|
+
}]
|
569
|
+
}] });
|
570
|
+
|
571
|
+
/**
|
572
|
+
* Generated bundle index. Do not edit.
|
573
|
+
*/
|
574
|
+
|
575
|
+
export { RdxSelectComponent, RdxSelectContentDirective, RdxSelectGroupDirective, RdxSelectIconDirective, RdxSelectItemChange, RdxSelectItemDirective, RdxSelectItemIndicatorDirective, RdxSelectLabelDirective, RdxSelectModule, RdxSelectSeparatorDirective, RdxSelectTriggerDirective, RdxSelectValueDirective };
|
576
|
+
//# sourceMappingURL=radix-ng-primitives-select.mjs.map
|