@raqm/ui 0.0.0-stage → 0.1.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/CHANGELOG.md +12 -0
- package/LICENSE +21 -0
- package/NOTICE.md +28 -0
- package/README.md +125 -3
- package/combobox/README.md +17 -0
- package/fesm2022/raqm-ui-accordion.mjs +414 -0
- package/fesm2022/raqm-ui-accordion.mjs.map +1 -0
- package/fesm2022/raqm-ui-alert-dialog.mjs +457 -0
- package/fesm2022/raqm-ui-alert-dialog.mjs.map +1 -0
- package/fesm2022/raqm-ui-alert.mjs +195 -0
- package/fesm2022/raqm-ui-alert.mjs.map +1 -0
- package/fesm2022/raqm-ui-aspect-ratio.mjs +66 -0
- package/fesm2022/raqm-ui-aspect-ratio.mjs.map +1 -0
- package/fesm2022/raqm-ui-attachment.mjs +435 -0
- package/fesm2022/raqm-ui-attachment.mjs.map +1 -0
- package/fesm2022/raqm-ui-avatar.mjs +337 -0
- package/fesm2022/raqm-ui-avatar.mjs.map +1 -0
- package/fesm2022/raqm-ui-badge.mjs +68 -0
- package/fesm2022/raqm-ui-badge.mjs.map +1 -0
- package/fesm2022/raqm-ui-breadcrumb.mjs +309 -0
- package/fesm2022/raqm-ui-breadcrumb.mjs.map +1 -0
- package/fesm2022/raqm-ui-button-group.mjs +138 -0
- package/fesm2022/raqm-ui-button-group.mjs.map +1 -0
- package/fesm2022/raqm-ui-button.mjs +295 -0
- package/fesm2022/raqm-ui-button.mjs.map +1 -0
- package/fesm2022/raqm-ui-calendar.mjs +1394 -0
- package/fesm2022/raqm-ui-calendar.mjs.map +1 -0
- package/fesm2022/raqm-ui-card.mjs +331 -0
- package/fesm2022/raqm-ui-card.mjs.map +1 -0
- package/fesm2022/raqm-ui-carousel.mjs +410 -0
- package/fesm2022/raqm-ui-carousel.mjs.map +1 -0
- package/fesm2022/raqm-ui-checkbox.mjs +86 -0
- package/fesm2022/raqm-ui-checkbox.mjs.map +1 -0
- package/fesm2022/raqm-ui-collapsible.mjs +266 -0
- package/fesm2022/raqm-ui-collapsible.mjs.map +1 -0
- package/fesm2022/raqm-ui-combobox.mjs +1584 -0
- package/fesm2022/raqm-ui-combobox.mjs.map +1 -0
- package/fesm2022/raqm-ui-command.mjs +1210 -0
- package/fesm2022/raqm-ui-command.mjs.map +1 -0
- package/fesm2022/raqm-ui-context-menu.mjs +723 -0
- package/fesm2022/raqm-ui-context-menu.mjs.map +1 -0
- package/fesm2022/raqm-ui-dialog.mjs +1214 -0
- package/fesm2022/raqm-ui-dialog.mjs.map +1 -0
- package/fesm2022/raqm-ui-drawer.mjs +687 -0
- package/fesm2022/raqm-ui-drawer.mjs.map +1 -0
- package/fesm2022/raqm-ui-dropdown-menu.mjs +1168 -0
- package/fesm2022/raqm-ui-dropdown-menu.mjs.map +1 -0
- package/fesm2022/raqm-ui-empty.mjs +272 -0
- package/fesm2022/raqm-ui-empty.mjs.map +1 -0
- package/fesm2022/raqm-ui-field.mjs +517 -0
- package/fesm2022/raqm-ui-field.mjs.map +1 -0
- package/fesm2022/raqm-ui-hover-card.mjs +828 -0
- package/fesm2022/raqm-ui-hover-card.mjs.map +1 -0
- package/fesm2022/raqm-ui-input-group.mjs +270 -0
- package/fesm2022/raqm-ui-input-group.mjs.map +1 -0
- package/fesm2022/raqm-ui-input-otp.mjs +788 -0
- package/fesm2022/raqm-ui-input-otp.mjs.map +1 -0
- package/fesm2022/raqm-ui-input.mjs +73 -0
- package/fesm2022/raqm-ui-input.mjs.map +1 -0
- package/fesm2022/raqm-ui-item.mjs +495 -0
- package/fesm2022/raqm-ui-item.mjs.map +1 -0
- package/fesm2022/raqm-ui-kbd.mjs +80 -0
- package/fesm2022/raqm-ui-kbd.mjs.map +1 -0
- package/fesm2022/raqm-ui-label.mjs +44 -0
- package/fesm2022/raqm-ui-label.mjs.map +1 -0
- package/fesm2022/raqm-ui-menubar.mjs +536 -0
- package/fesm2022/raqm-ui-menubar.mjs.map +1 -0
- package/fesm2022/raqm-ui-native-select.mjs +131 -0
- package/fesm2022/raqm-ui-native-select.mjs.map +1 -0
- package/fesm2022/raqm-ui-navigation-menu.mjs +1399 -0
- package/fesm2022/raqm-ui-navigation-menu.mjs.map +1 -0
- package/fesm2022/raqm-ui-overlay-internal.mjs +185 -0
- package/fesm2022/raqm-ui-overlay-internal.mjs.map +1 -0
- package/fesm2022/raqm-ui-pagination.mjs +440 -0
- package/fesm2022/raqm-ui-pagination.mjs.map +1 -0
- package/fesm2022/raqm-ui-popover.mjs +1495 -0
- package/fesm2022/raqm-ui-popover.mjs.map +1 -0
- package/fesm2022/raqm-ui-progress.mjs +369 -0
- package/fesm2022/raqm-ui-progress.mjs.map +1 -0
- package/fesm2022/raqm-ui-questionnaire.mjs +1005 -0
- package/fesm2022/raqm-ui-questionnaire.mjs.map +1 -0
- package/fesm2022/raqm-ui-radio-group.mjs +151 -0
- package/fesm2022/raqm-ui-radio-group.mjs.map +1 -0
- package/fesm2022/raqm-ui-resizable.mjs +439 -0
- package/fesm2022/raqm-ui-resizable.mjs.map +1 -0
- package/fesm2022/raqm-ui-scroll-area.mjs +510 -0
- package/fesm2022/raqm-ui-scroll-area.mjs.map +1 -0
- package/fesm2022/raqm-ui-select.mjs +1073 -0
- package/fesm2022/raqm-ui-select.mjs.map +1 -0
- package/fesm2022/raqm-ui-separator.mjs +103 -0
- package/fesm2022/raqm-ui-separator.mjs.map +1 -0
- package/fesm2022/raqm-ui-sheet.mjs +411 -0
- package/fesm2022/raqm-ui-sheet.mjs.map +1 -0
- package/fesm2022/raqm-ui-sidebar.mjs +1784 -0
- package/fesm2022/raqm-ui-sidebar.mjs.map +1 -0
- package/fesm2022/raqm-ui-skeleton.mjs +50 -0
- package/fesm2022/raqm-ui-skeleton.mjs.map +1 -0
- package/fesm2022/raqm-ui-slider.mjs +609 -0
- package/fesm2022/raqm-ui-slider.mjs.map +1 -0
- package/fesm2022/raqm-ui-spinner.mjs +137 -0
- package/fesm2022/raqm-ui-spinner.mjs.map +1 -0
- package/fesm2022/raqm-ui-switch.mjs +109 -0
- package/fesm2022/raqm-ui-switch.mjs.map +1 -0
- package/fesm2022/raqm-ui-table.mjs +271 -0
- package/fesm2022/raqm-ui-table.mjs.map +1 -0
- package/fesm2022/raqm-ui-tabs.mjs +536 -0
- package/fesm2022/raqm-ui-tabs.mjs.map +1 -0
- package/fesm2022/raqm-ui-textarea.mjs +37 -0
- package/fesm2022/raqm-ui-textarea.mjs.map +1 -0
- package/fesm2022/raqm-ui-toast.mjs +918 -0
- package/fesm2022/raqm-ui-toast.mjs.map +1 -0
- package/fesm2022/raqm-ui-toggle-group.mjs +462 -0
- package/fesm2022/raqm-ui-toggle-group.mjs.map +1 -0
- package/fesm2022/raqm-ui-toggle.mjs +158 -0
- package/fesm2022/raqm-ui-toggle.mjs.map +1 -0
- package/fesm2022/raqm-ui-tooltip.mjs +1226 -0
- package/fesm2022/raqm-ui-tooltip.mjs.map +1 -0
- package/fesm2022/raqm-ui.mjs +50 -0
- package/input-otp/README.md +12 -0
- package/package.json +275 -3
- package/styles/theme.css +4322 -0
- package/types/raqm-ui-accordion.d.ts +124 -0
- package/types/raqm-ui-alert-dialog.d.ts +81 -0
- package/types/raqm-ui-alert.d.ts +29 -0
- package/types/raqm-ui-aspect-ratio.d.ts +13 -0
- package/types/raqm-ui-attachment.d.ts +72 -0
- package/types/raqm-ui-avatar.d.ts +67 -0
- package/types/raqm-ui-badge.d.ts +20 -0
- package/types/raqm-ui-breadcrumb.d.ts +35 -0
- package/types/raqm-ui-button-group.d.ts +27 -0
- package/types/raqm-ui-button.d.ts +80 -0
- package/types/raqm-ui-calendar.d.ts +359 -0
- package/types/raqm-ui-card.d.ts +34 -0
- package/types/raqm-ui-carousel.d.ts +81 -0
- package/types/raqm-ui-checkbox.d.ts +24 -0
- package/types/raqm-ui-collapsible.d.ts +72 -0
- package/types/raqm-ui-combobox.d.ts +405 -0
- package/types/raqm-ui-command.d.ts +256 -0
- package/types/raqm-ui-context-menu.d.ts +196 -0
- package/types/raqm-ui-dialog.d.ts +232 -0
- package/types/raqm-ui-drawer.d.ts +121 -0
- package/types/raqm-ui-dropdown-menu.d.ts +319 -0
- package/types/raqm-ui-empty.d.ts +35 -0
- package/types/raqm-ui-field.d.ts +88 -0
- package/types/raqm-ui-hover-card.d.ts +139 -0
- package/types/raqm-ui-input-group.d.ts +45 -0
- package/types/raqm-ui-input-otp.d.ts +197 -0
- package/types/raqm-ui-input.d.ts +16 -0
- package/types/raqm-ui-item.d.ts +71 -0
- package/types/raqm-ui-kbd.d.ts +12 -0
- package/types/raqm-ui-label.d.ts +6 -0
- package/types/raqm-ui-menubar.d.ts +159 -0
- package/types/raqm-ui-native-select.d.ts +23 -0
- package/types/raqm-ui-navigation-menu.d.ts +230 -0
- package/types/raqm-ui-overlay-internal.d.ts +5 -0
- package/types/raqm-ui-pagination.d.ts +84 -0
- package/types/raqm-ui-popover.d.ts +235 -0
- package/types/raqm-ui-progress.d.ts +79 -0
- package/types/raqm-ui-questionnaire.d.ts +217 -0
- package/types/raqm-ui-radio-group.d.ts +48 -0
- package/types/raqm-ui-resizable.d.ts +98 -0
- package/types/raqm-ui-scroll-area.d.ts +132 -0
- package/types/raqm-ui-select.d.ts +205 -0
- package/types/raqm-ui-separator.d.ts +21 -0
- package/types/raqm-ui-sheet.d.ts +79 -0
- package/types/raqm-ui-sidebar.d.ts +285 -0
- package/types/raqm-ui-skeleton.d.ts +6 -0
- package/types/raqm-ui-slider.d.ts +129 -0
- package/types/raqm-ui-spinner.d.ts +32 -0
- package/types/raqm-ui-switch.d.ts +32 -0
- package/types/raqm-ui-table.d.ts +36 -0
- package/types/raqm-ui-tabs.d.ts +154 -0
- package/types/raqm-ui-textarea.d.ts +6 -0
- package/types/raqm-ui-toast.d.ts +190 -0
- package/types/raqm-ui-toggle-group.d.ts +167 -0
- package/types/raqm-ui-toggle.d.ts +42 -0
- package/types/raqm-ui-tooltip.d.ts +207 -0
- package/types/raqm-ui.d.ts +50 -0
|
@@ -0,0 +1,1073 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, ElementRef, Injector, TemplateRef, ViewContainerRef, booleanAttribute, computed, effect, forwardRef, inject, input, isDevMode, linkedSignal, output, signal, untracked, viewChild } from "@angular/core";
|
|
3
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
4
|
+
import { NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
5
|
+
import { Directionality } from "@angular/cdk/bidi";
|
|
6
|
+
import { Overlay, ViewportRuler } from "@angular/cdk/overlay";
|
|
7
|
+
import { ActiveDescendantKeyManager } from "@angular/cdk/a11y";
|
|
8
|
+
import { TemplatePortal } from "@angular/cdk/portal";
|
|
9
|
+
import { registerOverlayOwnership } from "@raqm/ui/overlay-internal";
|
|
10
|
+
function isSelectGroup(entry) {
|
|
11
|
+
return Array.isArray(entry.options);
|
|
12
|
+
}
|
|
13
|
+
function normalizeValue(value) {
|
|
14
|
+
return typeof value === "string" ? value : null;
|
|
15
|
+
}
|
|
16
|
+
function resolveSelectDirection(dir, element, directionality) {
|
|
17
|
+
const explicit = dir;
|
|
18
|
+
if (explicit === "ltr" || explicit === "rtl") return explicit;
|
|
19
|
+
if (getComputedStyle(element).direction === "rtl") return "rtl";
|
|
20
|
+
return directionality?.value ?? "ltr";
|
|
21
|
+
}
|
|
22
|
+
var RaqmSelectOptionRef = class {
|
|
23
|
+
view;
|
|
24
|
+
activate;
|
|
25
|
+
constructor(view, activate) {
|
|
26
|
+
this.view = view;
|
|
27
|
+
this.activate = activate;
|
|
28
|
+
}
|
|
29
|
+
get disabled() {
|
|
30
|
+
return this.view.option.disabled === true;
|
|
31
|
+
}
|
|
32
|
+
getLabel() {
|
|
33
|
+
return this.view.option.label;
|
|
34
|
+
}
|
|
35
|
+
setActiveStyles() {
|
|
36
|
+
this.activate(this);
|
|
37
|
+
}
|
|
38
|
+
setInactiveStyles() {}
|
|
39
|
+
};
|
|
40
|
+
var RaqmSelectControl = class {
|
|
41
|
+
host;
|
|
42
|
+
onChange;
|
|
43
|
+
onTouched;
|
|
44
|
+
constructor(host) {
|
|
45
|
+
this.host = host;
|
|
46
|
+
}
|
|
47
|
+
writeValue(value) {
|
|
48
|
+
this.host.setSelected(normalizeValue(value));
|
|
49
|
+
}
|
|
50
|
+
registerOnChange(fn) {
|
|
51
|
+
this.onChange = fn;
|
|
52
|
+
}
|
|
53
|
+
registerOnTouched(fn) {
|
|
54
|
+
this.onTouched = fn;
|
|
55
|
+
}
|
|
56
|
+
setDisabledState(isDisabled) {
|
|
57
|
+
this.host.setCvaDisabled(isDisabled);
|
|
58
|
+
if (isDisabled) this.host.close(false);
|
|
59
|
+
}
|
|
60
|
+
onOptionClick(option) {
|
|
61
|
+
if (option.disabled === true) return;
|
|
62
|
+
this.commitSelection(option.value);
|
|
63
|
+
}
|
|
64
|
+
commitSelection(value) {
|
|
65
|
+
if (this.host.effectiveDisabled()) return;
|
|
66
|
+
if (this.host.selected() === value) {
|
|
67
|
+
this.host.close(true);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
this.host.setSelected(value);
|
|
71
|
+
this.onChange?.(value);
|
|
72
|
+
this.host.emit(value);
|
|
73
|
+
this.host.close(true);
|
|
74
|
+
}
|
|
75
|
+
markTouched() {
|
|
76
|
+
this.onTouched?.();
|
|
77
|
+
}
|
|
78
|
+
reportDuplicateValues() {
|
|
79
|
+
if (!isDevMode()) return;
|
|
80
|
+
const seen = /* @__PURE__ */ new Set();
|
|
81
|
+
const duplicates = /* @__PURE__ */ new Set();
|
|
82
|
+
for (const view of this.host.optionViews()) {
|
|
83
|
+
const value = view.option.value;
|
|
84
|
+
if (seen.has(value)) duplicates.add(value);
|
|
85
|
+
else seen.add(value);
|
|
86
|
+
}
|
|
87
|
+
if (duplicates.size > 0) console.error(`[raqm-select] Duplicate option value(s) ${[...duplicates].map((value) => JSON.stringify(value)).join(", ")}; Select option values must be unique.`);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
function connectSelectEffects(host) {
|
|
91
|
+
effect(() => host.reportDuplicateValues());
|
|
92
|
+
effect(() => host.reactToAlignmentChange());
|
|
93
|
+
effect(() => {
|
|
94
|
+
if (host.effectiveDisabled() && host.open()) untracked(() => host.close(false));
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
var RaqmSelectKeyboard = class {
|
|
98
|
+
injector;
|
|
99
|
+
host;
|
|
100
|
+
keyManager;
|
|
101
|
+
constructor(injector, host) {
|
|
102
|
+
this.injector = injector;
|
|
103
|
+
this.host = host;
|
|
104
|
+
}
|
|
105
|
+
init() {
|
|
106
|
+
this.keyManager = new ActiveDescendantKeyManager(this.host.optionRefs(), this.injector).withWrap(false).withVerticalOrientation(true).withHomeAndEnd(true).withTypeAhead();
|
|
107
|
+
}
|
|
108
|
+
destroy() {
|
|
109
|
+
this.keyManager?.destroy();
|
|
110
|
+
}
|
|
111
|
+
onTriggerKeydown(event) {
|
|
112
|
+
if (!this.host.open()) {
|
|
113
|
+
if (event.key === "ArrowDown" || event.key === "ArrowUp" || event.key === "Enter" || event.key === " ") {
|
|
114
|
+
event.preventDefault();
|
|
115
|
+
this.host.openPopup();
|
|
116
|
+
}
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
switch (event.key) {
|
|
120
|
+
case "Escape":
|
|
121
|
+
event.preventDefault();
|
|
122
|
+
this.host.close(true);
|
|
123
|
+
return;
|
|
124
|
+
case "Tab":
|
|
125
|
+
this.host.close(true);
|
|
126
|
+
return;
|
|
127
|
+
case "Enter":
|
|
128
|
+
case " ":
|
|
129
|
+
event.preventDefault();
|
|
130
|
+
this.commitActiveOption();
|
|
131
|
+
return;
|
|
132
|
+
default: this.keyManager?.onKeydown(event);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
onTriggerBlur(event) {
|
|
136
|
+
const next = event.relatedTarget;
|
|
137
|
+
const overlayElement = this.host.overlayRef()?.overlayElement;
|
|
138
|
+
if (next && (this.host.element().contains(next) || overlayElement?.contains(next) === true)) return;
|
|
139
|
+
if (this.host.open()) this.host.close(true);
|
|
140
|
+
else this.host.markTouched();
|
|
141
|
+
}
|
|
142
|
+
onOptionPointerMove(view) {
|
|
143
|
+
if (view.option.disabled === true) return;
|
|
144
|
+
if (this.host.activeId() === view.id) return;
|
|
145
|
+
const index = this.host.optionViews().findIndex((candidate) => candidate.id === view.id);
|
|
146
|
+
if (index === -1) return;
|
|
147
|
+
this.keyManager?.setActiveItem(index);
|
|
148
|
+
}
|
|
149
|
+
onOptionPointerLeave(event) {
|
|
150
|
+
if (event.pointerType === "touch") return;
|
|
151
|
+
const related = event.relatedTarget;
|
|
152
|
+
if (related instanceof Element && related.closest(".raqm-select-option")) return;
|
|
153
|
+
this.resetActive();
|
|
154
|
+
}
|
|
155
|
+
resetActive() {
|
|
156
|
+
this.keyManager?.setActiveItem(-1);
|
|
157
|
+
this.host.setActiveId(null);
|
|
158
|
+
}
|
|
159
|
+
commitActiveOption() {
|
|
160
|
+
const active = this.keyManager?.activeItem;
|
|
161
|
+
if (!active || active.disabled) return;
|
|
162
|
+
this.host.commitSelection(active.view.option.value);
|
|
163
|
+
}
|
|
164
|
+
setInitialActive() {
|
|
165
|
+
const views = this.host.optionViews();
|
|
166
|
+
if (views.length === 0) return;
|
|
167
|
+
const selected = this.host.selected();
|
|
168
|
+
let index = views.findIndex((view) => view.option.value === selected && view.option.disabled !== true);
|
|
169
|
+
if (index === -1) index = views.findIndex((view) => view.option.disabled !== true);
|
|
170
|
+
if (index === -1) return;
|
|
171
|
+
this.keyManager?.setActiveItem(index);
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
var RaqmSelectOverlay = class {
|
|
175
|
+
overlay;
|
|
176
|
+
viewContainerRef;
|
|
177
|
+
position;
|
|
178
|
+
scrolling;
|
|
179
|
+
host;
|
|
180
|
+
overlayRef;
|
|
181
|
+
scrollStrategy;
|
|
182
|
+
overlaySubscription;
|
|
183
|
+
overlayDetachSubscription;
|
|
184
|
+
constructor(overlay, viewContainerRef, position, scrolling, host) {
|
|
185
|
+
this.overlay = overlay;
|
|
186
|
+
this.viewContainerRef = viewContainerRef;
|
|
187
|
+
this.position = position;
|
|
188
|
+
this.scrolling = scrolling;
|
|
189
|
+
this.host = host;
|
|
190
|
+
}
|
|
191
|
+
get ref() {
|
|
192
|
+
return this.overlayRef;
|
|
193
|
+
}
|
|
194
|
+
openPopup() {
|
|
195
|
+
if (this.host.open() || this.host.effectiveDisabled()) return;
|
|
196
|
+
this.position.resetDeactivation();
|
|
197
|
+
const trigger = this.host.trigger();
|
|
198
|
+
const direction = this.host.direction();
|
|
199
|
+
this.host.setOverlayDir(direction);
|
|
200
|
+
const aligned = this.host.alignItemWithTrigger();
|
|
201
|
+
const strategy = this.overlay.position().flexibleConnectedTo(trigger);
|
|
202
|
+
this.position.configureStrategy(strategy, aligned);
|
|
203
|
+
const config = {
|
|
204
|
+
positionStrategy: strategy,
|
|
205
|
+
scrollStrategy: this.overlay.scrollStrategies.block(),
|
|
206
|
+
hasBackdrop: true,
|
|
207
|
+
backdropClass: "cdk-overlay-transparent-backdrop",
|
|
208
|
+
panelClass: "raqm-select-overlay-pane",
|
|
209
|
+
disposeOnNavigation: true,
|
|
210
|
+
width: trigger.getBoundingClientRect().width,
|
|
211
|
+
direction
|
|
212
|
+
};
|
|
213
|
+
this.position.bind(strategy, aligned);
|
|
214
|
+
this.scrollStrategy = config.scrollStrategy;
|
|
215
|
+
this.overlayRef = this.overlay.create(config);
|
|
216
|
+
registerOverlayOwnership(trigger, this.overlayRef);
|
|
217
|
+
this.overlayRef.attach(new TemplatePortal(this.host.popupTemplate(), this.viewContainerRef));
|
|
218
|
+
this.host.setOpen(true);
|
|
219
|
+
this.host.setActiveId(null);
|
|
220
|
+
if (aligned) this.position.boundPopupHeight();
|
|
221
|
+
this.host.setInitialActive();
|
|
222
|
+
this.scrolling.attach();
|
|
223
|
+
this.scrolling.updateAffordances();
|
|
224
|
+
if (aligned) this.position.alignPopup();
|
|
225
|
+
this.overlaySubscription = this.overlayRef.backdropClick().subscribe(() => this.close(true));
|
|
226
|
+
this.overlayDetachSubscription = this.overlayRef.detachments().subscribe(() => this.handleOverlayDetached());
|
|
227
|
+
}
|
|
228
|
+
close(touched) {
|
|
229
|
+
this.destroyOverlay();
|
|
230
|
+
if (touched) this.host.markTouched();
|
|
231
|
+
}
|
|
232
|
+
destroy() {
|
|
233
|
+
this.destroyOverlay();
|
|
234
|
+
}
|
|
235
|
+
destroyOverlay() {
|
|
236
|
+
const overlayRef = this.overlayRef;
|
|
237
|
+
this.overlaySubscription?.unsubscribe();
|
|
238
|
+
this.overlaySubscription = void 0;
|
|
239
|
+
this.overlayDetachSubscription?.unsubscribe();
|
|
240
|
+
this.overlayDetachSubscription = void 0;
|
|
241
|
+
this.releaseOverlayTracking();
|
|
242
|
+
this.overlayRef = void 0;
|
|
243
|
+
this.position.resetAfterClose();
|
|
244
|
+
this.host.setOpen(false);
|
|
245
|
+
this.host.setActiveId(null);
|
|
246
|
+
this.host.setCanScrollUp(false);
|
|
247
|
+
this.host.setCanScrollDown(false);
|
|
248
|
+
overlayRef?.dispose();
|
|
249
|
+
}
|
|
250
|
+
handleOverlayDetached() {
|
|
251
|
+
this.overlaySubscription?.unsubscribe();
|
|
252
|
+
this.overlaySubscription = void 0;
|
|
253
|
+
this.overlayDetachSubscription?.unsubscribe();
|
|
254
|
+
this.overlayDetachSubscription = void 0;
|
|
255
|
+
this.releaseOverlayTracking();
|
|
256
|
+
this.overlayRef = void 0;
|
|
257
|
+
this.position.resetAfterDetach();
|
|
258
|
+
this.host.setOpen(false);
|
|
259
|
+
this.host.setActiveId(null);
|
|
260
|
+
this.host.setCanScrollUp(false);
|
|
261
|
+
this.host.setCanScrollDown(false);
|
|
262
|
+
}
|
|
263
|
+
releaseOverlayTracking() {
|
|
264
|
+
this.scrolling.release();
|
|
265
|
+
this.scrollStrategy?.disable();
|
|
266
|
+
this.scrollStrategy = void 0;
|
|
267
|
+
this.position.releaseSubscription();
|
|
268
|
+
const popupElement = this.overlayRef?.overlayElement.querySelector(".raqm-select-popup");
|
|
269
|
+
if (popupElement) popupElement.style.maxHeight = "";
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
var RaqmSelectPosition = class {
|
|
273
|
+
viewportRuler;
|
|
274
|
+
host;
|
|
275
|
+
positionStrategy;
|
|
276
|
+
positionSubscription;
|
|
277
|
+
appliedAligned;
|
|
278
|
+
alignmentDeactivated = false;
|
|
279
|
+
constructor(viewportRuler, host) {
|
|
280
|
+
this.viewportRuler = viewportRuler;
|
|
281
|
+
this.host = host;
|
|
282
|
+
}
|
|
283
|
+
resetDeactivation() {
|
|
284
|
+
this.alignmentDeactivated = false;
|
|
285
|
+
}
|
|
286
|
+
positionsFor(aligned) {
|
|
287
|
+
if (aligned) return [{
|
|
288
|
+
originX: "start",
|
|
289
|
+
originY: "top",
|
|
290
|
+
overlayX: "start",
|
|
291
|
+
overlayY: "top"
|
|
292
|
+
}];
|
|
293
|
+
return [{
|
|
294
|
+
originX: "start",
|
|
295
|
+
originY: "bottom",
|
|
296
|
+
overlayX: "start",
|
|
297
|
+
overlayY: "top",
|
|
298
|
+
offsetY: 4
|
|
299
|
+
}, {
|
|
300
|
+
originX: "start",
|
|
301
|
+
originY: "top",
|
|
302
|
+
overlayX: "start",
|
|
303
|
+
overlayY: "bottom",
|
|
304
|
+
offsetY: -4
|
|
305
|
+
}];
|
|
306
|
+
}
|
|
307
|
+
configureStrategy(strategy, aligned) {
|
|
308
|
+
strategy.withPositions(this.positionsFor(aligned)).withFlexibleDimensions(!aligned).withGrowAfterOpen(!aligned).withPush(!aligned).withViewportMargin(10);
|
|
309
|
+
}
|
|
310
|
+
bind(strategy, aligned) {
|
|
311
|
+
this.positionStrategy = strategy;
|
|
312
|
+
this.appliedAligned = aligned;
|
|
313
|
+
this.host.setAlignmentSide(aligned ? "none" : "bottom");
|
|
314
|
+
this.positionSubscription = strategy.positionChanges.subscribe((change) => {
|
|
315
|
+
if (this.appliedAligned === false) this.host.setAlignmentSide(change.connectionPair.originY === "bottom" ? "bottom" : "top");
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
releaseSubscription() {
|
|
319
|
+
this.positionSubscription?.unsubscribe();
|
|
320
|
+
this.positionSubscription = void 0;
|
|
321
|
+
}
|
|
322
|
+
resetAfterClose() {
|
|
323
|
+
this.positionStrategy = void 0;
|
|
324
|
+
this.appliedAligned = void 0;
|
|
325
|
+
this.alignmentDeactivated = false;
|
|
326
|
+
}
|
|
327
|
+
resetAfterDetach() {
|
|
328
|
+
this.positionStrategy = void 0;
|
|
329
|
+
this.appliedAligned = void 0;
|
|
330
|
+
}
|
|
331
|
+
reactToAlignmentChange() {
|
|
332
|
+
const aligned = this.host.alignItemWithTrigger();
|
|
333
|
+
if (!this.host.open() || aligned === this.appliedAligned) return;
|
|
334
|
+
untracked(() => this.applyAlignmentMode(aligned));
|
|
335
|
+
}
|
|
336
|
+
applyAlignmentMode(aligned) {
|
|
337
|
+
const overlayRef = this.host.overlayRef();
|
|
338
|
+
const strategy = this.positionStrategy;
|
|
339
|
+
if (!overlayRef || !strategy) return;
|
|
340
|
+
const popupElement = overlayRef.overlayElement.querySelector(".raqm-select-popup");
|
|
341
|
+
this.configureStrategy(strategy, aligned);
|
|
342
|
+
this.appliedAligned = aligned;
|
|
343
|
+
if (aligned) {
|
|
344
|
+
this.host.setAlignmentSide("none");
|
|
345
|
+
this.alignmentDeactivated = false;
|
|
346
|
+
this.boundPopupHeight();
|
|
347
|
+
this.alignPopup();
|
|
348
|
+
} else {
|
|
349
|
+
strategy.withDefaultOffsetY(0);
|
|
350
|
+
if (popupElement) popupElement.style.maxHeight = "";
|
|
351
|
+
overlayRef.updatePosition();
|
|
352
|
+
}
|
|
353
|
+
this.host.updateScrollAffordances();
|
|
354
|
+
}
|
|
355
|
+
alignPopup() {
|
|
356
|
+
const overlayRef = this.host.overlayRef();
|
|
357
|
+
const strategy = this.positionStrategy;
|
|
358
|
+
if (!overlayRef || !strategy || !this.host.alignItemWithTrigger() || this.alignmentDeactivated) return;
|
|
359
|
+
const triggerElement = this.host.trigger();
|
|
360
|
+
const popupElement = overlayRef.overlayElement.querySelector(".raqm-select-popup");
|
|
361
|
+
const activeId = this.host.activeId();
|
|
362
|
+
const rowElement = activeId ? overlayRef.overlayElement.querySelector(`[id="${activeId}"]`) : null;
|
|
363
|
+
if (!popupElement || !rowElement) {
|
|
364
|
+
overlayRef.updatePosition();
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
const viewport = this.viewportRuler.getViewportSize();
|
|
368
|
+
const triggerRect = triggerElement.getBoundingClientRect();
|
|
369
|
+
const rowCenterInPopup = rowElement.offsetTop - popupElement.scrollTop + rowElement.offsetHeight / 2;
|
|
370
|
+
const desired = triggerRect.height / 2 - rowCenterInPopup;
|
|
371
|
+
const boundaryTop = 10;
|
|
372
|
+
const boundaryBottom = viewport.height - 10;
|
|
373
|
+
const alignedTop = triggerRect.top + desired;
|
|
374
|
+
let offset = desired;
|
|
375
|
+
let height = popupElement.getBoundingClientRect().height;
|
|
376
|
+
let heightReduced = false;
|
|
377
|
+
const bottomOverflow = alignedTop + height - boundaryBottom;
|
|
378
|
+
if (bottomOverflow > 0) {
|
|
379
|
+
height = Math.max(0, height - bottomOverflow);
|
|
380
|
+
popupElement.style.maxHeight = `${height}px`;
|
|
381
|
+
heightReduced = true;
|
|
382
|
+
}
|
|
383
|
+
const shift = boundaryTop - alignedTop;
|
|
384
|
+
if (shift > 0) {
|
|
385
|
+
offset += shift;
|
|
386
|
+
height = Math.max(0, height - shift);
|
|
387
|
+
popupElement.style.maxHeight = `${height}px`;
|
|
388
|
+
heightReduced = true;
|
|
389
|
+
}
|
|
390
|
+
if (this.shouldDeactivateAlignment(triggerRect, height, viewport.height)) {
|
|
391
|
+
this.deactivateAlignment();
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
394
|
+
strategy.withDefaultOffsetY(offset);
|
|
395
|
+
overlayRef.updatePosition();
|
|
396
|
+
if (heightReduced) this.host.updateScrollAffordances();
|
|
397
|
+
}
|
|
398
|
+
boundPopupHeight() {
|
|
399
|
+
const popupElement = this.host.overlayRef()?.overlayElement.querySelector(".raqm-select-popup");
|
|
400
|
+
if (!popupElement) return;
|
|
401
|
+
const triggerRect = this.host.trigger().getBoundingClientRect();
|
|
402
|
+
const viewport = this.viewportRuler.getViewportSize();
|
|
403
|
+
const spaceAbove = triggerRect.top - 9;
|
|
404
|
+
const spaceBelow = viewport.height - triggerRect.bottom - 9;
|
|
405
|
+
popupElement.style.maxHeight = `${Math.max(0, Math.max(spaceAbove, spaceBelow))}px`;
|
|
406
|
+
}
|
|
407
|
+
shouldDeactivateAlignment(triggerRect, height, viewportHeight) {
|
|
408
|
+
const triggerCollisionThreshold = 20;
|
|
409
|
+
const boundaryHeight = viewportHeight - 20;
|
|
410
|
+
const minimumAlignedHeight = 100;
|
|
411
|
+
const contentHeight = this.host.popupScrollElement()?.scrollHeight ?? 0;
|
|
412
|
+
return triggerRect.top < triggerCollisionThreshold || triggerRect.bottom > boundaryHeight - triggerCollisionThreshold || Math.ceil(height) + 1 < Math.min(contentHeight, minimumAlignedHeight);
|
|
413
|
+
}
|
|
414
|
+
deactivateAlignment() {
|
|
415
|
+
const overlayRef = this.host.overlayRef();
|
|
416
|
+
const strategy = this.positionStrategy;
|
|
417
|
+
if (!overlayRef || !strategy) return;
|
|
418
|
+
this.alignmentDeactivated = true;
|
|
419
|
+
this.appliedAligned = false;
|
|
420
|
+
const popupElement = overlayRef.overlayElement.querySelector(".raqm-select-popup");
|
|
421
|
+
if (popupElement) popupElement.style.maxHeight = "";
|
|
422
|
+
strategy.withDefaultOffsetY(0);
|
|
423
|
+
this.configureStrategy(strategy, false);
|
|
424
|
+
overlayRef.updatePosition();
|
|
425
|
+
this.host.updateScrollAffordances();
|
|
426
|
+
}
|
|
427
|
+
};
|
|
428
|
+
var RaqmSelectScrolling = class {
|
|
429
|
+
viewportRuler;
|
|
430
|
+
host;
|
|
431
|
+
autoScrollTimer;
|
|
432
|
+
autoScrollDirection = null;
|
|
433
|
+
scrollCleanup;
|
|
434
|
+
viewportSubscription;
|
|
435
|
+
constructor(viewportRuler, host) {
|
|
436
|
+
this.viewportRuler = viewportRuler;
|
|
437
|
+
this.host = host;
|
|
438
|
+
}
|
|
439
|
+
scrollOptionIntoView(id) {
|
|
440
|
+
const overlayRef = this.host.overlayRef();
|
|
441
|
+
if (!overlayRef || !id) return;
|
|
442
|
+
const popupElement = overlayRef.overlayElement.querySelector(".raqm-select-popup");
|
|
443
|
+
const rowElement = overlayRef.overlayElement.querySelector(`[id="${id}"]`);
|
|
444
|
+
if (!popupElement || !rowElement) return;
|
|
445
|
+
const rowTop = rowElement.offsetTop;
|
|
446
|
+
const rowBottom = rowTop + rowElement.offsetHeight;
|
|
447
|
+
const viewTop = popupElement.scrollTop;
|
|
448
|
+
const viewBottom = viewTop + popupElement.clientHeight;
|
|
449
|
+
if (rowTop < viewTop) popupElement.scrollTop = rowTop;
|
|
450
|
+
else if (rowBottom > viewBottom) popupElement.scrollTop = rowBottom - popupElement.clientHeight;
|
|
451
|
+
}
|
|
452
|
+
attach() {
|
|
453
|
+
const popupElement = this.host.overlayRef()?.overlayElement.querySelector(".raqm-select-popup");
|
|
454
|
+
if (popupElement) {
|
|
455
|
+
const handler = () => this.updateAffordances();
|
|
456
|
+
popupElement.addEventListener("scroll", handler, { passive: true });
|
|
457
|
+
this.scrollCleanup = () => popupElement.removeEventListener("scroll", handler);
|
|
458
|
+
}
|
|
459
|
+
this.viewportSubscription = this.viewportRuler.change().subscribe(() => this.updateAffordances());
|
|
460
|
+
}
|
|
461
|
+
release() {
|
|
462
|
+
this.stopAutoScroll();
|
|
463
|
+
this.scrollCleanup?.();
|
|
464
|
+
this.scrollCleanup = void 0;
|
|
465
|
+
this.viewportSubscription?.unsubscribe();
|
|
466
|
+
this.viewportSubscription = void 0;
|
|
467
|
+
}
|
|
468
|
+
updateAffordances() {
|
|
469
|
+
const popupElement = this.host.overlayRef()?.overlayElement.querySelector(".raqm-select-popup");
|
|
470
|
+
if (!popupElement) {
|
|
471
|
+
this.host.setCanScrollUp(false);
|
|
472
|
+
this.host.setCanScrollDown(false);
|
|
473
|
+
return;
|
|
474
|
+
}
|
|
475
|
+
const { scrollTop, clientHeight, scrollHeight } = popupElement;
|
|
476
|
+
this.host.setCanScrollUp(scrollTop > 0);
|
|
477
|
+
this.host.setCanScrollDown(scrollTop + clientHeight < scrollHeight - 1);
|
|
478
|
+
}
|
|
479
|
+
scrollByStep(direction) {
|
|
480
|
+
const popupElement = this.host.overlayRef()?.overlayElement.querySelector(".raqm-select-popup");
|
|
481
|
+
if (!popupElement) return;
|
|
482
|
+
popupElement.scrollTop += direction === "up" ? -120 : 120;
|
|
483
|
+
this.updateAffordances();
|
|
484
|
+
}
|
|
485
|
+
popupScrollElement() {
|
|
486
|
+
return this.host.overlayRef()?.overlayElement.querySelector(".raqm-select-popup") ?? null;
|
|
487
|
+
}
|
|
488
|
+
normalizeScrollOffset(value, max) {
|
|
489
|
+
if (max <= 0) return 0;
|
|
490
|
+
const clamped = Math.max(0, Math.min(value, max));
|
|
491
|
+
const withinStart = clamped <= 1;
|
|
492
|
+
const withinEnd = max - clamped <= 1;
|
|
493
|
+
if (withinStart && withinEnd) return clamped <= max - clamped ? 0 : max;
|
|
494
|
+
if (withinStart) return 0;
|
|
495
|
+
if (withinEnd) return max;
|
|
496
|
+
return clamped;
|
|
497
|
+
}
|
|
498
|
+
scrollArrowStep(direction) {
|
|
499
|
+
this.host.resetActive();
|
|
500
|
+
const popupElement = this.popupScrollElement();
|
|
501
|
+
if (!popupElement) {
|
|
502
|
+
this.stopAutoScroll();
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
505
|
+
const isUp = direction === "up";
|
|
506
|
+
const arrowHeight = (this.host.overlayRef()?.overlayElement.querySelector(isUp ? ".raqm-select-scroll-button--up" : ".raqm-select-scroll-button--down"))?.offsetHeight ?? 0;
|
|
507
|
+
const rows = Array.from(popupElement.querySelectorAll(".raqm-select-option"));
|
|
508
|
+
const maxScrollTop = Math.max(0, popupElement.scrollHeight - popupElement.clientHeight);
|
|
509
|
+
const scrollTop = this.normalizeScrollOffset(popupElement.scrollTop, maxScrollTop);
|
|
510
|
+
if (scrollTop !== popupElement.scrollTop) popupElement.scrollTop = scrollTop;
|
|
511
|
+
if (scrollTop === (isUp ? 0 : maxScrollTop)) {
|
|
512
|
+
this.stopAutoScroll();
|
|
513
|
+
this.updateAffordances();
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
let target = maxScrollTop;
|
|
517
|
+
if (rows.length > 0) {
|
|
518
|
+
if (isUp) {
|
|
519
|
+
let firstVisibleIndex = 0;
|
|
520
|
+
const visibleTop = scrollTop + arrowHeight - 1;
|
|
521
|
+
for (let i = 0; i < rows.length; i += 1) if (rows[i].offsetTop >= visibleTop) {
|
|
522
|
+
firstVisibleIndex = i;
|
|
523
|
+
break;
|
|
524
|
+
}
|
|
525
|
+
const targetIndex = Math.max(0, firstVisibleIndex - 1);
|
|
526
|
+
const targetRow = rows[targetIndex];
|
|
527
|
+
target = targetIndex < firstVisibleIndex && targetRow ? targetRow.offsetTop - arrowHeight : 0;
|
|
528
|
+
} else {
|
|
529
|
+
let lastVisibleIndex = rows.length - 1;
|
|
530
|
+
const visibleBottom = scrollTop + popupElement.clientHeight - arrowHeight + 1;
|
|
531
|
+
for (let i = 0; i < rows.length; i += 1) if (rows[i].offsetTop + rows[i].offsetHeight > visibleBottom) {
|
|
532
|
+
lastVisibleIndex = Math.max(0, i - 1);
|
|
533
|
+
break;
|
|
534
|
+
}
|
|
535
|
+
const targetIndex = Math.min(rows.length - 1, lastVisibleIndex + 1);
|
|
536
|
+
const targetRow = rows[targetIndex];
|
|
537
|
+
target = targetIndex > lastVisibleIndex && targetRow ? targetRow.offsetTop + targetRow.offsetHeight - popupElement.clientHeight + arrowHeight : maxScrollTop;
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
const nextScrollTop = this.normalizeScrollOffset(target, maxScrollTop);
|
|
541
|
+
if (Math.abs(popupElement.scrollTop - nextScrollTop) > 1) popupElement.scrollTop = nextScrollTop;
|
|
542
|
+
this.updateAffordances();
|
|
543
|
+
}
|
|
544
|
+
startAutoScroll(direction) {
|
|
545
|
+
if (this.autoScrollDirection === direction) return;
|
|
546
|
+
this.stopAutoScroll();
|
|
547
|
+
this.autoScrollDirection = direction;
|
|
548
|
+
this.host.resetActive();
|
|
549
|
+
this.autoScrollTimer = setInterval(() => {
|
|
550
|
+
this.scrollArrowStep(direction);
|
|
551
|
+
}, 40);
|
|
552
|
+
}
|
|
553
|
+
stopAutoScroll() {
|
|
554
|
+
if (this.autoScrollTimer !== void 0) {
|
|
555
|
+
clearInterval(this.autoScrollTimer);
|
|
556
|
+
this.autoScrollTimer = void 0;
|
|
557
|
+
}
|
|
558
|
+
this.autoScrollDirection = null;
|
|
559
|
+
}
|
|
560
|
+
};
|
|
561
|
+
var RaqmSelectViewState = class {
|
|
562
|
+
host;
|
|
563
|
+
cvaDisabled = signal(false, ...ngDevMode ? [{ debugName: "cvaDisabled" }] : /* istanbul ignore next */ []);
|
|
564
|
+
open = signal(false, ...ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []);
|
|
565
|
+
activeId = signal(null, ...ngDevMode ? [{ debugName: "activeId" }] : /* istanbul ignore next */ []);
|
|
566
|
+
overlayDir = signal("ltr", ...ngDevMode ? [{ debugName: "overlayDir" }] : /* istanbul ignore next */ []);
|
|
567
|
+
canScrollUp = signal(false, ...ngDevMode ? [{ debugName: "canScrollUp" }] : /* istanbul ignore next */ []);
|
|
568
|
+
canScrollDown = signal(false, ...ngDevMode ? [{ debugName: "canScrollDown" }] : /* istanbul ignore next */ []);
|
|
569
|
+
alignmentSide = signal("none", ...ngDevMode ? [{ debugName: "alignmentSide" }] : /* istanbul ignore next */ []);
|
|
570
|
+
resolvedInputId = computed(() => this.host.inputId() || this.host.autoId, ...ngDevMode ? [{ debugName: "resolvedInputId" }] : /* istanbul ignore next */ []);
|
|
571
|
+
labelId = computed(() => `${this.resolvedInputId()}-label`, ...ngDevMode ? [{ debugName: "labelId" }] : /* istanbul ignore next */ []);
|
|
572
|
+
listboxId = computed(() => `${this.resolvedInputId()}-listbox`, ...ngDevMode ? [{ debugName: "listboxId" }] : /* istanbul ignore next */ []);
|
|
573
|
+
chunks = computed(() => {
|
|
574
|
+
const baseId = this.resolvedInputId();
|
|
575
|
+
const chunks = [];
|
|
576
|
+
let optionIndex = 0;
|
|
577
|
+
let chunkIndex = 0;
|
|
578
|
+
let loose = null;
|
|
579
|
+
const nextView = (option) => {
|
|
580
|
+
const view = {
|
|
581
|
+
option,
|
|
582
|
+
id: `${baseId}-option-${optionIndex}`,
|
|
583
|
+
index: optionIndex
|
|
584
|
+
};
|
|
585
|
+
optionIndex++;
|
|
586
|
+
return view;
|
|
587
|
+
};
|
|
588
|
+
for (const entry of this.host.items()) {
|
|
589
|
+
if (isSelectGroup(entry)) {
|
|
590
|
+
loose = null;
|
|
591
|
+
chunks.push({
|
|
592
|
+
key: `${baseId}-group-${chunkIndex}`,
|
|
593
|
+
label: entry.label,
|
|
594
|
+
labelId: `${baseId}-group-label-${chunkIndex}`,
|
|
595
|
+
separatorBefore: entry.separatorBefore === true,
|
|
596
|
+
options: entry.options.map(nextView)
|
|
597
|
+
});
|
|
598
|
+
chunkIndex++;
|
|
599
|
+
continue;
|
|
600
|
+
}
|
|
601
|
+
if (loose === null) {
|
|
602
|
+
loose = {
|
|
603
|
+
key: `${baseId}-loose-${chunkIndex}`,
|
|
604
|
+
label: null,
|
|
605
|
+
labelId: null,
|
|
606
|
+
separatorBefore: false,
|
|
607
|
+
options: []
|
|
608
|
+
};
|
|
609
|
+
chunks.push(loose);
|
|
610
|
+
chunkIndex++;
|
|
611
|
+
}
|
|
612
|
+
loose.options.push(nextView(entry));
|
|
613
|
+
}
|
|
614
|
+
return chunks;
|
|
615
|
+
}, ...ngDevMode ? [{ debugName: "chunks" }] : /* istanbul ignore next */ []);
|
|
616
|
+
optionViews = computed(() => this.chunks().flatMap((chunk) => chunk.options), ...ngDevMode ? [{ debugName: "optionViews" }] : /* istanbul ignore next */ []);
|
|
617
|
+
optionRefs = computed(() => this.optionViews().map((view) => new RaqmSelectOptionRef(view, (ref) => {
|
|
618
|
+
this.activeId.set(ref.view.id);
|
|
619
|
+
this.host.scrollOptionIntoView(ref.view.id);
|
|
620
|
+
})), ...ngDevMode ? [{ debugName: "optionRefs" }] : /* istanbul ignore next */ []);
|
|
621
|
+
selectedLabel = computed(() => {
|
|
622
|
+
const value = this.host.selected();
|
|
623
|
+
const match = this.optionViews().find((view) => view.option.value === value);
|
|
624
|
+
return match ? match.option.triggerLabel ?? match.option.label : null;
|
|
625
|
+
}, ...ngDevMode ? [{ debugName: "selectedLabel" }] : /* istanbul ignore next */ []);
|
|
626
|
+
constructor(host) {
|
|
627
|
+
this.host = host;
|
|
628
|
+
}
|
|
629
|
+
};
|
|
630
|
+
let nextSelectId = 0;
|
|
631
|
+
var RaqmSelect = class RaqmSelect {
|
|
632
|
+
host = inject(ElementRef);
|
|
633
|
+
overlay = inject(Overlay);
|
|
634
|
+
viewportRuler = inject(ViewportRuler);
|
|
635
|
+
directionality = inject(Directionality, { optional: true });
|
|
636
|
+
viewContainerRef = inject(ViewContainerRef);
|
|
637
|
+
triggerRef = viewChild.required("trigger", ...ngDevMode ? [{ debugName: "triggerRef" }] : /* istanbul ignore next */ []);
|
|
638
|
+
popupTemplate = viewChild.required("popup", {
|
|
639
|
+
...ngDevMode ? { debugName: "popupTemplate" } : /* istanbul ignore next */ {},
|
|
640
|
+
read: TemplateRef
|
|
641
|
+
});
|
|
642
|
+
autoId = `raqm-select-${++nextSelectId}`;
|
|
643
|
+
injector = inject(Injector);
|
|
644
|
+
items = input.required(...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
645
|
+
value = input(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
646
|
+
valueChange = output();
|
|
647
|
+
disabled = input(false, {
|
|
648
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
649
|
+
transform: booleanAttribute
|
|
650
|
+
});
|
|
651
|
+
placeholder = input(null, ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
652
|
+
alignItemWithTrigger = input(true, {
|
|
653
|
+
...ngDevMode ? { debugName: "alignItemWithTrigger" } : /* istanbul ignore next */ {},
|
|
654
|
+
transform: booleanAttribute
|
|
655
|
+
});
|
|
656
|
+
dir = input(void 0, ...ngDevMode ? [{ debugName: "dir" }] : /* istanbul ignore next */ []);
|
|
657
|
+
inputId = input("", ...ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []);
|
|
658
|
+
label = input(void 0, ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
659
|
+
labelledBy = input(void 0, ...ngDevMode ? [{ debugName: "labelledBy" }] : /* istanbul ignore next */ []);
|
|
660
|
+
describedBy = input(void 0, ...ngDevMode ? [{ debugName: "describedBy" }] : /* istanbul ignore next */ []);
|
|
661
|
+
invalid = input(false, {
|
|
662
|
+
...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
|
|
663
|
+
transform: booleanAttribute
|
|
664
|
+
});
|
|
665
|
+
selected = linkedSignal(() => this.value(), ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
|
|
666
|
+
state = new RaqmSelectViewState({
|
|
667
|
+
items: () => this.items(),
|
|
668
|
+
inputId: () => this.inputId(),
|
|
669
|
+
autoId: this.autoId,
|
|
670
|
+
selected: () => this.selected(),
|
|
671
|
+
scrollOptionIntoView: (id) => this.scrolling.scrollOptionIntoView(id)
|
|
672
|
+
});
|
|
673
|
+
resolvedInputId = this.state.resolvedInputId;
|
|
674
|
+
labelId = this.state.labelId;
|
|
675
|
+
listboxId = this.state.listboxId;
|
|
676
|
+
chunks = this.state.chunks;
|
|
677
|
+
selectedLabel = this.state.selectedLabel;
|
|
678
|
+
effectiveDisabled = computed(() => this.disabled() || this.state.cvaDisabled(), ...ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []);
|
|
679
|
+
open = this.state.open;
|
|
680
|
+
activeId = this.state.activeId;
|
|
681
|
+
overlayDir = this.state.overlayDir;
|
|
682
|
+
canScrollUp = this.state.canScrollUp;
|
|
683
|
+
canScrollDown = this.state.canScrollDown;
|
|
684
|
+
alignmentSide = this.state.alignmentSide;
|
|
685
|
+
control = new RaqmSelectControl({
|
|
686
|
+
effectiveDisabled: () => this.effectiveDisabled(),
|
|
687
|
+
selected: () => this.selected(),
|
|
688
|
+
setSelected: (value) => this.selected.set(value),
|
|
689
|
+
emit: (value) => this.valueChange.emit(value),
|
|
690
|
+
close: (touched) => this.layer.close(touched),
|
|
691
|
+
setCvaDisabled: (value) => this.state.cvaDisabled.set(value),
|
|
692
|
+
optionViews: () => this.state.optionViews()
|
|
693
|
+
});
|
|
694
|
+
position = new RaqmSelectPosition(this.viewportRuler, {
|
|
695
|
+
overlayRef: () => this.layer.ref,
|
|
696
|
+
trigger: () => this.triggerRef().nativeElement,
|
|
697
|
+
activeId: () => this.state.activeId(),
|
|
698
|
+
alignItemWithTrigger: () => this.alignItemWithTrigger(),
|
|
699
|
+
open: () => this.state.open(),
|
|
700
|
+
setAlignmentSide: (side) => this.state.alignmentSide.set(side),
|
|
701
|
+
updateScrollAffordances: () => this.scrolling.updateAffordances(),
|
|
702
|
+
popupScrollElement: () => this.scrolling.popupScrollElement()
|
|
703
|
+
});
|
|
704
|
+
scrolling = new RaqmSelectScrolling(this.viewportRuler, {
|
|
705
|
+
overlayRef: () => this.layer.ref,
|
|
706
|
+
resetActive: () => this.keyboard.resetActive(),
|
|
707
|
+
setCanScrollUp: (value) => this.state.canScrollUp.set(value),
|
|
708
|
+
setCanScrollDown: (value) => this.state.canScrollDown.set(value)
|
|
709
|
+
});
|
|
710
|
+
layer = new RaqmSelectOverlay(this.overlay, this.viewContainerRef, this.position, this.scrolling, {
|
|
711
|
+
open: () => this.state.open(),
|
|
712
|
+
effectiveDisabled: () => this.effectiveDisabled(),
|
|
713
|
+
trigger: () => this.triggerRef().nativeElement,
|
|
714
|
+
popupTemplate: () => this.popupTemplate(),
|
|
715
|
+
direction: () => resolveSelectDirection(this.dir(), this.host.nativeElement, this.directionality),
|
|
716
|
+
alignItemWithTrigger: () => this.alignItemWithTrigger(),
|
|
717
|
+
setOpen: (value) => this.state.open.set(value),
|
|
718
|
+
setActiveId: (id) => this.state.activeId.set(id),
|
|
719
|
+
setOverlayDir: (dir) => this.state.overlayDir.set(dir),
|
|
720
|
+
setInitialActive: () => this.keyboard.setInitialActive(),
|
|
721
|
+
markTouched: () => this.control.markTouched(),
|
|
722
|
+
setCanScrollUp: (value) => this.state.canScrollUp.set(value),
|
|
723
|
+
setCanScrollDown: (value) => this.state.canScrollDown.set(value)
|
|
724
|
+
});
|
|
725
|
+
keyboard = new RaqmSelectKeyboard(this.injector, {
|
|
726
|
+
optionRefs: () => this.state.optionRefs,
|
|
727
|
+
optionViews: () => this.state.optionViews(),
|
|
728
|
+
selected: () => this.selected(),
|
|
729
|
+
activeId: () => this.state.activeId(),
|
|
730
|
+
open: () => this.state.open(),
|
|
731
|
+
element: () => this.host.nativeElement,
|
|
732
|
+
overlayRef: () => this.layer.ref,
|
|
733
|
+
openPopup: () => this.layer.openPopup(),
|
|
734
|
+
close: (touched) => this.layer.close(touched),
|
|
735
|
+
markTouched: () => this.control.markTouched(),
|
|
736
|
+
commitSelection: (value) => this.control.commitSelection(value),
|
|
737
|
+
setActiveId: (id) => this.state.activeId.set(id)
|
|
738
|
+
});
|
|
739
|
+
constructor() {
|
|
740
|
+
connectSelectEffects({
|
|
741
|
+
reportDuplicateValues: () => this.control.reportDuplicateValues(),
|
|
742
|
+
reactToAlignmentChange: () => this.position.reactToAlignmentChange(),
|
|
743
|
+
effectiveDisabled: () => this.effectiveDisabled(),
|
|
744
|
+
open: () => this.state.open(),
|
|
745
|
+
close: (touched) => this.layer.close(touched)
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
ngOnInit() {
|
|
749
|
+
this.keyboard.init();
|
|
750
|
+
}
|
|
751
|
+
ngOnDestroy() {
|
|
752
|
+
this.keyboard.destroy();
|
|
753
|
+
this.layer.destroy();
|
|
754
|
+
}
|
|
755
|
+
writeValue(value) {
|
|
756
|
+
this.control.writeValue(value);
|
|
757
|
+
}
|
|
758
|
+
registerOnChange(fn) {
|
|
759
|
+
this.control.registerOnChange(fn);
|
|
760
|
+
}
|
|
761
|
+
registerOnTouched(fn) {
|
|
762
|
+
this.control.registerOnTouched(fn);
|
|
763
|
+
}
|
|
764
|
+
setDisabledState(isDisabled) {
|
|
765
|
+
this.control.setDisabledState(isDisabled);
|
|
766
|
+
}
|
|
767
|
+
toggle() {
|
|
768
|
+
if (this.open()) this.close(true);
|
|
769
|
+
else this.openPopup();
|
|
770
|
+
}
|
|
771
|
+
onTriggerKeydown(event) {
|
|
772
|
+
this.keyboard.onTriggerKeydown(event);
|
|
773
|
+
}
|
|
774
|
+
onTriggerBlur(event) {
|
|
775
|
+
this.keyboard.onTriggerBlur(event);
|
|
776
|
+
}
|
|
777
|
+
onOptionClick(option) {
|
|
778
|
+
this.control.onOptionClick(option);
|
|
779
|
+
}
|
|
780
|
+
onOptionPointerMove(view) {
|
|
781
|
+
this.keyboard.onOptionPointerMove(view);
|
|
782
|
+
}
|
|
783
|
+
onOptionPointerLeave(event) {
|
|
784
|
+
this.keyboard.onOptionPointerLeave(event);
|
|
785
|
+
}
|
|
786
|
+
scrollByStep(direction) {
|
|
787
|
+
this.scrolling.scrollByStep(direction);
|
|
788
|
+
}
|
|
789
|
+
startAutoScroll(direction) {
|
|
790
|
+
this.scrolling.startAutoScroll(direction);
|
|
791
|
+
}
|
|
792
|
+
stopAutoScroll() {
|
|
793
|
+
this.scrolling.stopAutoScroll();
|
|
794
|
+
}
|
|
795
|
+
openPopup() {
|
|
796
|
+
this.layer.openPopup();
|
|
797
|
+
}
|
|
798
|
+
close(touched) {
|
|
799
|
+
this.layer.close(touched);
|
|
800
|
+
}
|
|
801
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
802
|
+
minVersion: "12.0.0",
|
|
803
|
+
version: "22.2.2",
|
|
804
|
+
ngImport: i0,
|
|
805
|
+
type: RaqmSelect,
|
|
806
|
+
deps: [],
|
|
807
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
808
|
+
});
|
|
809
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
810
|
+
minVersion: "17.0.0",
|
|
811
|
+
version: "22.2.2",
|
|
812
|
+
type: RaqmSelect,
|
|
813
|
+
isStandalone: true,
|
|
814
|
+
selector: "raqm-select",
|
|
815
|
+
inputs: {
|
|
816
|
+
items: {
|
|
817
|
+
classPropertyName: "items",
|
|
818
|
+
publicName: "items",
|
|
819
|
+
isSignal: true,
|
|
820
|
+
isRequired: true,
|
|
821
|
+
transformFunction: null
|
|
822
|
+
},
|
|
823
|
+
value: {
|
|
824
|
+
classPropertyName: "value",
|
|
825
|
+
publicName: "value",
|
|
826
|
+
isSignal: true,
|
|
827
|
+
isRequired: false,
|
|
828
|
+
transformFunction: null
|
|
829
|
+
},
|
|
830
|
+
disabled: {
|
|
831
|
+
classPropertyName: "disabled",
|
|
832
|
+
publicName: "disabled",
|
|
833
|
+
isSignal: true,
|
|
834
|
+
isRequired: false,
|
|
835
|
+
transformFunction: null
|
|
836
|
+
},
|
|
837
|
+
placeholder: {
|
|
838
|
+
classPropertyName: "placeholder",
|
|
839
|
+
publicName: "placeholder",
|
|
840
|
+
isSignal: true,
|
|
841
|
+
isRequired: false,
|
|
842
|
+
transformFunction: null
|
|
843
|
+
},
|
|
844
|
+
alignItemWithTrigger: {
|
|
845
|
+
classPropertyName: "alignItemWithTrigger",
|
|
846
|
+
publicName: "alignItemWithTrigger",
|
|
847
|
+
isSignal: true,
|
|
848
|
+
isRequired: false,
|
|
849
|
+
transformFunction: null
|
|
850
|
+
},
|
|
851
|
+
dir: {
|
|
852
|
+
classPropertyName: "dir",
|
|
853
|
+
publicName: "dir",
|
|
854
|
+
isSignal: true,
|
|
855
|
+
isRequired: false,
|
|
856
|
+
transformFunction: null
|
|
857
|
+
},
|
|
858
|
+
inputId: {
|
|
859
|
+
classPropertyName: "inputId",
|
|
860
|
+
publicName: "inputId",
|
|
861
|
+
isSignal: true,
|
|
862
|
+
isRequired: false,
|
|
863
|
+
transformFunction: null
|
|
864
|
+
},
|
|
865
|
+
label: {
|
|
866
|
+
classPropertyName: "label",
|
|
867
|
+
publicName: "label",
|
|
868
|
+
isSignal: true,
|
|
869
|
+
isRequired: false,
|
|
870
|
+
transformFunction: null
|
|
871
|
+
},
|
|
872
|
+
labelledBy: {
|
|
873
|
+
classPropertyName: "labelledBy",
|
|
874
|
+
publicName: "labelledBy",
|
|
875
|
+
isSignal: true,
|
|
876
|
+
isRequired: false,
|
|
877
|
+
transformFunction: null
|
|
878
|
+
},
|
|
879
|
+
describedBy: {
|
|
880
|
+
classPropertyName: "describedBy",
|
|
881
|
+
publicName: "describedBy",
|
|
882
|
+
isSignal: true,
|
|
883
|
+
isRequired: false,
|
|
884
|
+
transformFunction: null
|
|
885
|
+
},
|
|
886
|
+
invalid: {
|
|
887
|
+
classPropertyName: "invalid",
|
|
888
|
+
publicName: "invalid",
|
|
889
|
+
isSignal: true,
|
|
890
|
+
isRequired: false,
|
|
891
|
+
transformFunction: null
|
|
892
|
+
}
|
|
893
|
+
},
|
|
894
|
+
outputs: { valueChange: "valueChange" },
|
|
895
|
+
host: {
|
|
896
|
+
properties: {
|
|
897
|
+
"attr.data-raqm-disabled": "effectiveDisabled() ? \"true\" : null",
|
|
898
|
+
"attr.data-raqm-invalid": "invalid() ? \"true\" : null",
|
|
899
|
+
"attr.data-raqm-open": "open() ? \"true\" : null"
|
|
900
|
+
},
|
|
901
|
+
classAttribute: "raqm-select"
|
|
902
|
+
},
|
|
903
|
+
providers: [{
|
|
904
|
+
provide: NG_VALUE_ACCESSOR,
|
|
905
|
+
useExisting: forwardRef(() => RaqmSelect),
|
|
906
|
+
multi: true
|
|
907
|
+
}],
|
|
908
|
+
viewQueries: [{
|
|
909
|
+
propertyName: "triggerRef",
|
|
910
|
+
first: true,
|
|
911
|
+
predicate: ["trigger"],
|
|
912
|
+
descendants: true,
|
|
913
|
+
isSignal: true
|
|
914
|
+
}, {
|
|
915
|
+
propertyName: "popupTemplate",
|
|
916
|
+
first: true,
|
|
917
|
+
predicate: ["popup"],
|
|
918
|
+
descendants: true,
|
|
919
|
+
read: TemplateRef,
|
|
920
|
+
isSignal: true
|
|
921
|
+
}],
|
|
922
|
+
ngImport: i0,
|
|
923
|
+
template: "@if (label(); as labelText) {\r\n <!-- `for` targets the real trigger button, not the custom-element host. -->\r\n <label class=\"raqm-select-label\" [attr.for]=\"resolvedInputId()\" [attr.id]=\"labelId()\">\r\n {{ labelText }}\r\n </label>\r\n}\r\n\r\n<!-- The control: a native button with combobox semantics and the single tab stop. -->\r\n<button\r\n #trigger\r\n type=\"button\"\r\n class=\"raqm-select-trigger\"\r\n role=\"combobox\"\r\n aria-haspopup=\"listbox\"\r\n [attr.id]=\"resolvedInputId()\"\r\n [attr.aria-expanded]=\"open()\"\r\n [attr.aria-controls]=\"open() ? listboxId() : null\"\r\n [attr.aria-activedescendant]=\"open() ? activeId() : null\"\r\n [attr.aria-labelledby]=\"labelledBy() ?? null\"\r\n [attr.aria-describedby]=\"describedBy() ?? null\"\r\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\r\n [attr.data-raqm-placeholder]=\"selectedLabel() === null ? '' : null\"\r\n [disabled]=\"effectiveDisabled()\"\r\n (click)=\"toggle()\"\r\n (keydown)=\"onTriggerKeydown($event)\"\r\n (blur)=\"onTriggerBlur($event)\"\r\n>\r\n <span class=\"raqm-select-value\">{{ selectedLabel() ?? placeholder() }}</span>\r\n\r\n <svg\r\n class=\"raqm-select-trigger-icon\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n aria-hidden=\"true\"\r\n focusable=\"false\"\r\n >\r\n <path d=\"m6 9 6 6 6-6\" />\r\n </svg>\r\n</button>\r\n\r\n<!-- Instantiated into a CDK overlay; its nodes come from this view, so component styles apply. -->\r\n<ng-template #popup>\r\n <div\r\n class=\"raqm-select-popup\"\r\n [attr.dir]=\"overlayDir()\"\r\n [attr.data-raqm-align]=\"alignItemWithTrigger()\"\r\n [attr.data-raqm-side]=\"alignmentSide()\"\r\n (mousedown)=\"$event.preventDefault()\"\r\n >\r\n <!-- Pointer-only affordance; `visibility` keeps the layout and measure stable. -->\r\n <div\r\n class=\"raqm-select-scroll-button raqm-select-scroll-button--up\"\r\n [class.raqm-select-scroll-button--hidden]=\"!canScrollUp()\"\r\n aria-hidden=\"true\"\r\n (pointermove)=\"startAutoScroll('up')\"\r\n (pointerleave)=\"stopAutoScroll()\"\r\n (click)=\"scrollByStep('up')\"\r\n >\r\n <svg\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n aria-hidden=\"true\"\r\n focusable=\"false\"\r\n >\r\n <path d=\"m18 15-6-6-6 6\" />\r\n </svg>\r\n </div>\r\n\r\n <div\r\n class=\"raqm-select-list\"\r\n role=\"listbox\"\r\n [attr.id]=\"listboxId()\"\r\n [attr.aria-labelledby]=\"label() ? labelId() : (labelledBy() ?? null)\"\r\n >\r\n <!-- One row shared by grouped and loose chunks, so loose options are direct listbox children. -->\r\n <ng-template #optionList let-options>\r\n @for (view of options; track view.id) {\r\n <div\r\n class=\"raqm-select-option\"\r\n role=\"option\"\r\n [id]=\"view.id\"\r\n [attr.aria-selected]=\"selected() === view.option.value\"\r\n [attr.aria-disabled]=\"view.option.disabled ? 'true' : null\"\r\n [class.raqm-select-option--active]=\"view.id === activeId()\"\r\n [attr.data-raqm-highlighted]=\"view.id === activeId() ? '' : null\"\r\n (pointermove)=\"onOptionPointerMove(view)\"\r\n (pointerleave)=\"onOptionPointerLeave($event)\"\r\n (click)=\"onOptionClick(view.option)\"\r\n >\r\n <span class=\"raqm-select-item-indicator\" aria-hidden=\"true\">\r\n <svg\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n focusable=\"false\"\r\n >\r\n <path d=\"M20 6 9 17l-5-5\" />\r\n </svg>\r\n </span>\r\n <span class=\"raqm-select-item-text\">{{ view.option.label }}</span>\r\n </div>\r\n }\r\n </ng-template>\r\n\r\n @for (chunk of chunks(); track chunk.key) {\r\n @if (chunk.separatorBefore) {\r\n <!-- Decorative, non-focusable separator. -->\r\n <div class=\"raqm-select-separator\" role=\"separator\" aria-orientation=\"horizontal\"></div>\r\n }\r\n @if (chunk.label; as groupLabel) {\r\n <!-- A labelled explicit group. -->\r\n <div class=\"raqm-select-group\" role=\"group\" [attr.aria-labelledby]=\"chunk.labelId\">\r\n <div class=\"raqm-select-group-label\" [attr.id]=\"chunk.labelId\">\r\n {{ groupLabel }}\r\n </div>\r\n <ng-container\r\n [ngTemplateOutlet]=\"optionList\"\r\n [ngTemplateOutletContext]=\"{ $implicit: chunk.options }\"\r\n />\r\n </div>\r\n } @else {\r\n <!-- A loose run keeps the same unnamed `role=\"group\"` padding, which sets the popup height. -->\r\n <div class=\"raqm-select-group\" role=\"group\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"optionList\"\r\n [ngTemplateOutletContext]=\"{ $implicit: chunk.options }\"\r\n />\r\n </div>\r\n }\r\n }\r\n </div>\r\n\r\n <!-- Pointer-only, non-focusable affordance; see the note above. -->\r\n <div\r\n class=\"raqm-select-scroll-button raqm-select-scroll-button--down\"\r\n [class.raqm-select-scroll-button--hidden]=\"!canScrollDown()\"\r\n aria-hidden=\"true\"\r\n (pointermove)=\"startAutoScroll('down')\"\r\n (pointerleave)=\"stopAutoScroll()\"\r\n (click)=\"scrollByStep('down')\"\r\n >\r\n <svg\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n aria-hidden=\"true\"\r\n focusable=\"false\"\r\n >\r\n <path d=\"m6 9 6 6 6-6\" />\r\n </svg>\r\n </div>\r\n </div>\r\n</ng-template>\r\n",
|
|
924
|
+
styles: [":host{display:inline-block;max-inline-size:100%}.raqm-select-label{display:block;margin-block-end:calc(var(--raqm-spacing) * 1.5);font-size:var(--raqm-font-size-sm);font-weight:var(--raqm-font-weight-medium);color:var(--raqm-foreground)}.raqm-select-trigger{display:inline-flex;align-items:center;justify-content:space-between;white-space:nowrap;outline:none;box-sizing:border-box;inline-size:100%;gap:calc(var(--raqm-spacing) * 1.5);border-radius:var(--raqm-radius-lg);border:1px solid var(--raqm-input);padding-block:calc(var(--raqm-spacing) * 2);padding-inline-start:calc(var(--raqm-spacing) * 2.5);padding-inline-end:calc(var(--raqm-spacing) * 2);font-size:var(--raqm-font-size-sm);block-size:calc(var(--raqm-spacing) * 8);background-color:var(--raqm-control-bg);color:inherit;transition:color var(--raqm-duration-base) var(--raqm-ease-standard),background-color var(--raqm-duration-base) var(--raqm-ease-standard),border-color var(--raqm-duration-base) var(--raqm-ease-standard),box-shadow var(--raqm-duration-base) var(--raqm-ease-standard);-webkit-user-select:none;user-select:none}.raqm-select-trigger:disabled{cursor:not-allowed;opacity:var(--raqm-disabled-opacity)}.raqm-select-trigger:not(:disabled):hover{background-color:color-mix(in oklch,var(--raqm-input) var(--raqm-control-hover-alpha, 0%),transparent)}.raqm-select-trigger:focus-visible{border-color:var(--raqm-ring);box-shadow:0 0 0 var(--raqm-focus-ring-width) var(--raqm-focus-ring-color)}.raqm-select-trigger[aria-invalid=true]{border-color:var(--raqm-invalid-border);box-shadow:0 0 0 var(--raqm-focus-ring-width) var(--raqm-invalid-ring)}.raqm-select-trigger[data-raqm-placeholder] .raqm-select-value{color:var(--raqm-muted-foreground)}.raqm-select-value{display:flex;flex:1 1 auto;text-align:start;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.raqm-select-trigger svg:not([class*=size-]){inline-size:calc(var(--raqm-spacing) * 4);block-size:calc(var(--raqm-spacing) * 4);pointer-events:none;flex-shrink:0}.raqm-select-trigger-icon{color:var(--raqm-muted-foreground)}.raqm-select-popup{box-sizing:border-box;position:relative;inline-size:100%;overflow-x:hidden;overflow-y:auto;scrollbar-width:none}.raqm-select-popup::-webkit-scrollbar{display:none}.raqm-select-popup{background-color:color-mix(in oklch,var(--raqm-popover) 70%,transparent);color:var(--raqm-popover-foreground);border-radius:var(--raqm-radius-lg);min-inline-size:calc(var(--raqm-spacing) * 36);box-shadow:var(--raqm-shadow-md),0 0 0 1px color-mix(in oklch,var(--raqm-foreground) 10%,transparent)}.raqm-select-popup:before{content:\"\";position:absolute;inset:0;z-index:-1;border-radius:inherit;pointer-events:none;backdrop-filter:blur(40px) saturate(150%);-webkit-backdrop-filter:blur(40px) saturate(150%)}.raqm-select-group{padding:var(--raqm-spacing);scroll-margin-block:var(--raqm-spacing)}.raqm-select-group-label{color:var(--raqm-muted-foreground);padding-inline:calc(var(--raqm-spacing) * 1.5);padding-block:var(--raqm-spacing);font-size:var(--raqm-font-size-xs);line-height:calc(var(--raqm-spacing) * 4)}.raqm-select-option{position:relative;display:flex;inline-size:100%;align-items:center;cursor:default;outline:none;-webkit-user-select:none;user-select:none;box-sizing:border-box;gap:calc(var(--raqm-spacing) * 1.5);border-radius:var(--raqm-radius-md);padding-block:var(--raqm-spacing);padding-inline-start:calc(var(--raqm-spacing) * 1.5);padding-inline-end:calc(var(--raqm-spacing) * 8);font-size:var(--raqm-font-size-sm);line-height:calc(var(--raqm-spacing) * 5)}.raqm-select-option[aria-disabled=true]{pointer-events:none;opacity:var(--raqm-disabled-opacity)}.raqm-select-option--active,.raqm-select-option[data-raqm-highlighted]{background-color:color-mix(in oklch,var(--raqm-foreground) 10%,transparent);color:var(--raqm-accent-foreground)}.raqm-select-item-indicator{position:absolute;inset-inline-end:calc(var(--raqm-spacing) * 2);display:flex;inline-size:calc(var(--raqm-spacing) * 4);block-size:calc(var(--raqm-spacing) * 4);align-items:center;justify-content:center;pointer-events:none;visibility:hidden}.raqm-select-option[aria-selected=true] .raqm-select-item-indicator{visibility:visible}.raqm-select-item-indicator svg{inline-size:100%;block-size:100%}.raqm-select-item-text{display:flex;flex:1 1 auto;gap:calc(var(--raqm-spacing) * 2);white-space:nowrap}.raqm-select-separator{background-color:color-mix(in oklch,var(--raqm-foreground) 5%,transparent);block-size:1px;margin-inline:calc(var(--raqm-spacing) * -1);margin-block:var(--raqm-spacing)}@media(forced-colors:active){.raqm-select-trigger:focus-visible{outline:2px solid Highlight;outline-offset:2px}.raqm-select-popup{border:1px solid CanvasText}.raqm-select-option--active,.raqm-select-option[data-raqm-highlighted]{background-color:Highlight;color:HighlightText;outline:1px solid HighlightText}}.raqm-select-scroll-button{position:sticky;z-index:10;display:flex;align-items:center;justify-content:center;box-sizing:border-box;inline-size:100%;padding-block:var(--raqm-spacing);background-color:var(--raqm-popover);cursor:default}.raqm-select-scroll-button--up{inset-block-start:0;margin-block-end:calc(var(--raqm-spacing) * -6)}.raqm-select-scroll-button--down{inset-block-end:0;margin-block-start:calc(var(--raqm-spacing) * -6)}.raqm-select-scroll-button--hidden{visibility:hidden;pointer-events:none}.raqm-select-scroll-button svg:not([class*=size-]){inline-size:calc(var(--raqm-spacing) * 4);block-size:calc(var(--raqm-spacing) * 4);pointer-events:none;flex-shrink:0}\n"],
|
|
925
|
+
dependencies: [{
|
|
926
|
+
kind: "directive",
|
|
927
|
+
type: NgTemplateOutlet,
|
|
928
|
+
selector: "[ngTemplateOutlet]",
|
|
929
|
+
inputs: [
|
|
930
|
+
"ngTemplateOutletContext",
|
|
931
|
+
"ngTemplateOutlet",
|
|
932
|
+
"ngTemplateOutletInjector"
|
|
933
|
+
]
|
|
934
|
+
}],
|
|
935
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
936
|
+
});
|
|
937
|
+
};
|
|
938
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
939
|
+
minVersion: "12.0.0",
|
|
940
|
+
version: "22.2.2",
|
|
941
|
+
ngImport: i0,
|
|
942
|
+
type: RaqmSelect,
|
|
943
|
+
decorators: [{
|
|
944
|
+
type: Component,
|
|
945
|
+
args: [{
|
|
946
|
+
selector: "raqm-select",
|
|
947
|
+
imports: [NgTemplateOutlet],
|
|
948
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
949
|
+
providers: [{
|
|
950
|
+
provide: NG_VALUE_ACCESSOR,
|
|
951
|
+
useExisting: forwardRef(() => RaqmSelect),
|
|
952
|
+
multi: true
|
|
953
|
+
}],
|
|
954
|
+
host: {
|
|
955
|
+
class: "raqm-select",
|
|
956
|
+
"[attr.data-raqm-disabled]": "effectiveDisabled() ? \"true\" : null",
|
|
957
|
+
"[attr.data-raqm-invalid]": "invalid() ? \"true\" : null",
|
|
958
|
+
"[attr.data-raqm-open]": "open() ? \"true\" : null"
|
|
959
|
+
},
|
|
960
|
+
template: "@if (label(); as labelText) {\r\n <!-- `for` targets the real trigger button, not the custom-element host. -->\r\n <label class=\"raqm-select-label\" [attr.for]=\"resolvedInputId()\" [attr.id]=\"labelId()\">\r\n {{ labelText }}\r\n </label>\r\n}\r\n\r\n<!-- The control: a native button with combobox semantics and the single tab stop. -->\r\n<button\r\n #trigger\r\n type=\"button\"\r\n class=\"raqm-select-trigger\"\r\n role=\"combobox\"\r\n aria-haspopup=\"listbox\"\r\n [attr.id]=\"resolvedInputId()\"\r\n [attr.aria-expanded]=\"open()\"\r\n [attr.aria-controls]=\"open() ? listboxId() : null\"\r\n [attr.aria-activedescendant]=\"open() ? activeId() : null\"\r\n [attr.aria-labelledby]=\"labelledBy() ?? null\"\r\n [attr.aria-describedby]=\"describedBy() ?? null\"\r\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\r\n [attr.data-raqm-placeholder]=\"selectedLabel() === null ? '' : null\"\r\n [disabled]=\"effectiveDisabled()\"\r\n (click)=\"toggle()\"\r\n (keydown)=\"onTriggerKeydown($event)\"\r\n (blur)=\"onTriggerBlur($event)\"\r\n>\r\n <span class=\"raqm-select-value\">{{ selectedLabel() ?? placeholder() }}</span>\r\n\r\n <svg\r\n class=\"raqm-select-trigger-icon\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n aria-hidden=\"true\"\r\n focusable=\"false\"\r\n >\r\n <path d=\"m6 9 6 6 6-6\" />\r\n </svg>\r\n</button>\r\n\r\n<!-- Instantiated into a CDK overlay; its nodes come from this view, so component styles apply. -->\r\n<ng-template #popup>\r\n <div\r\n class=\"raqm-select-popup\"\r\n [attr.dir]=\"overlayDir()\"\r\n [attr.data-raqm-align]=\"alignItemWithTrigger()\"\r\n [attr.data-raqm-side]=\"alignmentSide()\"\r\n (mousedown)=\"$event.preventDefault()\"\r\n >\r\n <!-- Pointer-only affordance; `visibility` keeps the layout and measure stable. -->\r\n <div\r\n class=\"raqm-select-scroll-button raqm-select-scroll-button--up\"\r\n [class.raqm-select-scroll-button--hidden]=\"!canScrollUp()\"\r\n aria-hidden=\"true\"\r\n (pointermove)=\"startAutoScroll('up')\"\r\n (pointerleave)=\"stopAutoScroll()\"\r\n (click)=\"scrollByStep('up')\"\r\n >\r\n <svg\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n aria-hidden=\"true\"\r\n focusable=\"false\"\r\n >\r\n <path d=\"m18 15-6-6-6 6\" />\r\n </svg>\r\n </div>\r\n\r\n <div\r\n class=\"raqm-select-list\"\r\n role=\"listbox\"\r\n [attr.id]=\"listboxId()\"\r\n [attr.aria-labelledby]=\"label() ? labelId() : (labelledBy() ?? null)\"\r\n >\r\n <!-- One row shared by grouped and loose chunks, so loose options are direct listbox children. -->\r\n <ng-template #optionList let-options>\r\n @for (view of options; track view.id) {\r\n <div\r\n class=\"raqm-select-option\"\r\n role=\"option\"\r\n [id]=\"view.id\"\r\n [attr.aria-selected]=\"selected() === view.option.value\"\r\n [attr.aria-disabled]=\"view.option.disabled ? 'true' : null\"\r\n [class.raqm-select-option--active]=\"view.id === activeId()\"\r\n [attr.data-raqm-highlighted]=\"view.id === activeId() ? '' : null\"\r\n (pointermove)=\"onOptionPointerMove(view)\"\r\n (pointerleave)=\"onOptionPointerLeave($event)\"\r\n (click)=\"onOptionClick(view.option)\"\r\n >\r\n <span class=\"raqm-select-item-indicator\" aria-hidden=\"true\">\r\n <svg\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n focusable=\"false\"\r\n >\r\n <path d=\"M20 6 9 17l-5-5\" />\r\n </svg>\r\n </span>\r\n <span class=\"raqm-select-item-text\">{{ view.option.label }}</span>\r\n </div>\r\n }\r\n </ng-template>\r\n\r\n @for (chunk of chunks(); track chunk.key) {\r\n @if (chunk.separatorBefore) {\r\n <!-- Decorative, non-focusable separator. -->\r\n <div class=\"raqm-select-separator\" role=\"separator\" aria-orientation=\"horizontal\"></div>\r\n }\r\n @if (chunk.label; as groupLabel) {\r\n <!-- A labelled explicit group. -->\r\n <div class=\"raqm-select-group\" role=\"group\" [attr.aria-labelledby]=\"chunk.labelId\">\r\n <div class=\"raqm-select-group-label\" [attr.id]=\"chunk.labelId\">\r\n {{ groupLabel }}\r\n </div>\r\n <ng-container\r\n [ngTemplateOutlet]=\"optionList\"\r\n [ngTemplateOutletContext]=\"{ $implicit: chunk.options }\"\r\n />\r\n </div>\r\n } @else {\r\n <!-- A loose run keeps the same unnamed `role=\"group\"` padding, which sets the popup height. -->\r\n <div class=\"raqm-select-group\" role=\"group\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"optionList\"\r\n [ngTemplateOutletContext]=\"{ $implicit: chunk.options }\"\r\n />\r\n </div>\r\n }\r\n }\r\n </div>\r\n\r\n <!-- Pointer-only, non-focusable affordance; see the note above. -->\r\n <div\r\n class=\"raqm-select-scroll-button raqm-select-scroll-button--down\"\r\n [class.raqm-select-scroll-button--hidden]=\"!canScrollDown()\"\r\n aria-hidden=\"true\"\r\n (pointermove)=\"startAutoScroll('down')\"\r\n (pointerleave)=\"stopAutoScroll()\"\r\n (click)=\"scrollByStep('down')\"\r\n >\r\n <svg\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n aria-hidden=\"true\"\r\n focusable=\"false\"\r\n >\r\n <path d=\"m6 9 6 6 6-6\" />\r\n </svg>\r\n </div>\r\n </div>\r\n</ng-template>\r\n",
|
|
961
|
+
styles: [":host{display:inline-block;max-inline-size:100%}.raqm-select-label{display:block;margin-block-end:calc(var(--raqm-spacing) * 1.5);font-size:var(--raqm-font-size-sm);font-weight:var(--raqm-font-weight-medium);color:var(--raqm-foreground)}.raqm-select-trigger{display:inline-flex;align-items:center;justify-content:space-between;white-space:nowrap;outline:none;box-sizing:border-box;inline-size:100%;gap:calc(var(--raqm-spacing) * 1.5);border-radius:var(--raqm-radius-lg);border:1px solid var(--raqm-input);padding-block:calc(var(--raqm-spacing) * 2);padding-inline-start:calc(var(--raqm-spacing) * 2.5);padding-inline-end:calc(var(--raqm-spacing) * 2);font-size:var(--raqm-font-size-sm);block-size:calc(var(--raqm-spacing) * 8);background-color:var(--raqm-control-bg);color:inherit;transition:color var(--raqm-duration-base) var(--raqm-ease-standard),background-color var(--raqm-duration-base) var(--raqm-ease-standard),border-color var(--raqm-duration-base) var(--raqm-ease-standard),box-shadow var(--raqm-duration-base) var(--raqm-ease-standard);-webkit-user-select:none;user-select:none}.raqm-select-trigger:disabled{cursor:not-allowed;opacity:var(--raqm-disabled-opacity)}.raqm-select-trigger:not(:disabled):hover{background-color:color-mix(in oklch,var(--raqm-input) var(--raqm-control-hover-alpha, 0%),transparent)}.raqm-select-trigger:focus-visible{border-color:var(--raqm-ring);box-shadow:0 0 0 var(--raqm-focus-ring-width) var(--raqm-focus-ring-color)}.raqm-select-trigger[aria-invalid=true]{border-color:var(--raqm-invalid-border);box-shadow:0 0 0 var(--raqm-focus-ring-width) var(--raqm-invalid-ring)}.raqm-select-trigger[data-raqm-placeholder] .raqm-select-value{color:var(--raqm-muted-foreground)}.raqm-select-value{display:flex;flex:1 1 auto;text-align:start;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.raqm-select-trigger svg:not([class*=size-]){inline-size:calc(var(--raqm-spacing) * 4);block-size:calc(var(--raqm-spacing) * 4);pointer-events:none;flex-shrink:0}.raqm-select-trigger-icon{color:var(--raqm-muted-foreground)}.raqm-select-popup{box-sizing:border-box;position:relative;inline-size:100%;overflow-x:hidden;overflow-y:auto;scrollbar-width:none}.raqm-select-popup::-webkit-scrollbar{display:none}.raqm-select-popup{background-color:color-mix(in oklch,var(--raqm-popover) 70%,transparent);color:var(--raqm-popover-foreground);border-radius:var(--raqm-radius-lg);min-inline-size:calc(var(--raqm-spacing) * 36);box-shadow:var(--raqm-shadow-md),0 0 0 1px color-mix(in oklch,var(--raqm-foreground) 10%,transparent)}.raqm-select-popup:before{content:\"\";position:absolute;inset:0;z-index:-1;border-radius:inherit;pointer-events:none;backdrop-filter:blur(40px) saturate(150%);-webkit-backdrop-filter:blur(40px) saturate(150%)}.raqm-select-group{padding:var(--raqm-spacing);scroll-margin-block:var(--raqm-spacing)}.raqm-select-group-label{color:var(--raqm-muted-foreground);padding-inline:calc(var(--raqm-spacing) * 1.5);padding-block:var(--raqm-spacing);font-size:var(--raqm-font-size-xs);line-height:calc(var(--raqm-spacing) * 4)}.raqm-select-option{position:relative;display:flex;inline-size:100%;align-items:center;cursor:default;outline:none;-webkit-user-select:none;user-select:none;box-sizing:border-box;gap:calc(var(--raqm-spacing) * 1.5);border-radius:var(--raqm-radius-md);padding-block:var(--raqm-spacing);padding-inline-start:calc(var(--raqm-spacing) * 1.5);padding-inline-end:calc(var(--raqm-spacing) * 8);font-size:var(--raqm-font-size-sm);line-height:calc(var(--raqm-spacing) * 5)}.raqm-select-option[aria-disabled=true]{pointer-events:none;opacity:var(--raqm-disabled-opacity)}.raqm-select-option--active,.raqm-select-option[data-raqm-highlighted]{background-color:color-mix(in oklch,var(--raqm-foreground) 10%,transparent);color:var(--raqm-accent-foreground)}.raqm-select-item-indicator{position:absolute;inset-inline-end:calc(var(--raqm-spacing) * 2);display:flex;inline-size:calc(var(--raqm-spacing) * 4);block-size:calc(var(--raqm-spacing) * 4);align-items:center;justify-content:center;pointer-events:none;visibility:hidden}.raqm-select-option[aria-selected=true] .raqm-select-item-indicator{visibility:visible}.raqm-select-item-indicator svg{inline-size:100%;block-size:100%}.raqm-select-item-text{display:flex;flex:1 1 auto;gap:calc(var(--raqm-spacing) * 2);white-space:nowrap}.raqm-select-separator{background-color:color-mix(in oklch,var(--raqm-foreground) 5%,transparent);block-size:1px;margin-inline:calc(var(--raqm-spacing) * -1);margin-block:var(--raqm-spacing)}@media(forced-colors:active){.raqm-select-trigger:focus-visible{outline:2px solid Highlight;outline-offset:2px}.raqm-select-popup{border:1px solid CanvasText}.raqm-select-option--active,.raqm-select-option[data-raqm-highlighted]{background-color:Highlight;color:HighlightText;outline:1px solid HighlightText}}.raqm-select-scroll-button{position:sticky;z-index:10;display:flex;align-items:center;justify-content:center;box-sizing:border-box;inline-size:100%;padding-block:var(--raqm-spacing);background-color:var(--raqm-popover);cursor:default}.raqm-select-scroll-button--up{inset-block-start:0;margin-block-end:calc(var(--raqm-spacing) * -6)}.raqm-select-scroll-button--down{inset-block-end:0;margin-block-start:calc(var(--raqm-spacing) * -6)}.raqm-select-scroll-button--hidden{visibility:hidden;pointer-events:none}.raqm-select-scroll-button svg:not([class*=size-]){inline-size:calc(var(--raqm-spacing) * 4);block-size:calc(var(--raqm-spacing) * 4);pointer-events:none;flex-shrink:0}\n"]
|
|
962
|
+
}]
|
|
963
|
+
}],
|
|
964
|
+
ctorParameters: () => [],
|
|
965
|
+
propDecorators: {
|
|
966
|
+
triggerRef: [{
|
|
967
|
+
type: i0.ViewChild,
|
|
968
|
+
args: ["trigger", { isSignal: true }]
|
|
969
|
+
}],
|
|
970
|
+
popupTemplate: [{
|
|
971
|
+
type: i0.ViewChild,
|
|
972
|
+
args: ["popup", {
|
|
973
|
+
read: TemplateRef,
|
|
974
|
+
isSignal: true
|
|
975
|
+
}]
|
|
976
|
+
}],
|
|
977
|
+
items: [{
|
|
978
|
+
type: i0.Input,
|
|
979
|
+
args: [{
|
|
980
|
+
isSignal: true,
|
|
981
|
+
alias: "items",
|
|
982
|
+
required: true
|
|
983
|
+
}]
|
|
984
|
+
}],
|
|
985
|
+
value: [{
|
|
986
|
+
type: i0.Input,
|
|
987
|
+
args: [{
|
|
988
|
+
isSignal: true,
|
|
989
|
+
alias: "value",
|
|
990
|
+
required: false
|
|
991
|
+
}]
|
|
992
|
+
}],
|
|
993
|
+
valueChange: [{
|
|
994
|
+
type: i0.Output,
|
|
995
|
+
args: ["valueChange"]
|
|
996
|
+
}],
|
|
997
|
+
disabled: [{
|
|
998
|
+
type: i0.Input,
|
|
999
|
+
args: [{
|
|
1000
|
+
isSignal: true,
|
|
1001
|
+
alias: "disabled",
|
|
1002
|
+
required: false
|
|
1003
|
+
}]
|
|
1004
|
+
}],
|
|
1005
|
+
placeholder: [{
|
|
1006
|
+
type: i0.Input,
|
|
1007
|
+
args: [{
|
|
1008
|
+
isSignal: true,
|
|
1009
|
+
alias: "placeholder",
|
|
1010
|
+
required: false
|
|
1011
|
+
}]
|
|
1012
|
+
}],
|
|
1013
|
+
alignItemWithTrigger: [{
|
|
1014
|
+
type: i0.Input,
|
|
1015
|
+
args: [{
|
|
1016
|
+
isSignal: true,
|
|
1017
|
+
alias: "alignItemWithTrigger",
|
|
1018
|
+
required: false
|
|
1019
|
+
}]
|
|
1020
|
+
}],
|
|
1021
|
+
dir: [{
|
|
1022
|
+
type: i0.Input,
|
|
1023
|
+
args: [{
|
|
1024
|
+
isSignal: true,
|
|
1025
|
+
alias: "dir",
|
|
1026
|
+
required: false
|
|
1027
|
+
}]
|
|
1028
|
+
}],
|
|
1029
|
+
inputId: [{
|
|
1030
|
+
type: i0.Input,
|
|
1031
|
+
args: [{
|
|
1032
|
+
isSignal: true,
|
|
1033
|
+
alias: "inputId",
|
|
1034
|
+
required: false
|
|
1035
|
+
}]
|
|
1036
|
+
}],
|
|
1037
|
+
label: [{
|
|
1038
|
+
type: i0.Input,
|
|
1039
|
+
args: [{
|
|
1040
|
+
isSignal: true,
|
|
1041
|
+
alias: "label",
|
|
1042
|
+
required: false
|
|
1043
|
+
}]
|
|
1044
|
+
}],
|
|
1045
|
+
labelledBy: [{
|
|
1046
|
+
type: i0.Input,
|
|
1047
|
+
args: [{
|
|
1048
|
+
isSignal: true,
|
|
1049
|
+
alias: "labelledBy",
|
|
1050
|
+
required: false
|
|
1051
|
+
}]
|
|
1052
|
+
}],
|
|
1053
|
+
describedBy: [{
|
|
1054
|
+
type: i0.Input,
|
|
1055
|
+
args: [{
|
|
1056
|
+
isSignal: true,
|
|
1057
|
+
alias: "describedBy",
|
|
1058
|
+
required: false
|
|
1059
|
+
}]
|
|
1060
|
+
}],
|
|
1061
|
+
invalid: [{
|
|
1062
|
+
type: i0.Input,
|
|
1063
|
+
args: [{
|
|
1064
|
+
isSignal: true,
|
|
1065
|
+
alias: "invalid",
|
|
1066
|
+
required: false
|
|
1067
|
+
}]
|
|
1068
|
+
}]
|
|
1069
|
+
}
|
|
1070
|
+
});
|
|
1071
|
+
export { RaqmSelect };
|
|
1072
|
+
|
|
1073
|
+
//# sourceMappingURL=raqm-ui-select.mjs.map
|