@hyalo/angular 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.
Files changed (83) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/LICENSE +21 -0
  3. package/README.md +32 -3
  4. package/fesm2022/hyalo-angular-accordion.mjs +230 -0
  5. package/fesm2022/hyalo-angular-accordion.mjs.map +1 -0
  6. package/fesm2022/hyalo-angular-button.mjs +203 -0
  7. package/fesm2022/hyalo-angular-button.mjs.map +1 -0
  8. package/fesm2022/hyalo-angular-card.mjs +221 -0
  9. package/fesm2022/hyalo-angular-card.mjs.map +1 -0
  10. package/fesm2022/hyalo-angular-choice.mjs +788 -0
  11. package/fesm2022/hyalo-angular-choice.mjs.map +1 -0
  12. package/fesm2022/hyalo-angular-dialog.mjs +571 -0
  13. package/fesm2022/hyalo-angular-dialog.mjs.map +1 -0
  14. package/fesm2022/hyalo-angular-field.mjs +312 -0
  15. package/fesm2022/hyalo-angular-field.mjs.map +1 -0
  16. package/fesm2022/hyalo-angular-icon.mjs +343 -0
  17. package/fesm2022/hyalo-angular-icon.mjs.map +1 -0
  18. package/fesm2022/hyalo-angular-interaction.mjs +455 -0
  19. package/fesm2022/hyalo-angular-interaction.mjs.map +1 -0
  20. package/fesm2022/hyalo-angular-navbar.mjs +343 -0
  21. package/fesm2022/hyalo-angular-navbar.mjs.map +1 -0
  22. package/fesm2022/hyalo-angular-overlay.mjs +94 -0
  23. package/fesm2022/hyalo-angular-overlay.mjs.map +1 -0
  24. package/fesm2022/hyalo-angular-popover-overlay-kit-6wPwnxln.mjs +3 -0
  25. package/fesm2022/hyalo-angular-popover.mjs +487 -0
  26. package/fesm2022/hyalo-angular-popover.mjs.map +1 -0
  27. package/fesm2022/hyalo-angular-segmented.mjs +223 -0
  28. package/fesm2022/hyalo-angular-segmented.mjs.map +1 -0
  29. package/fesm2022/hyalo-angular-select.mjs +464 -0
  30. package/fesm2022/hyalo-angular-select.mjs.map +1 -0
  31. package/fesm2022/hyalo-angular-tabs.mjs +324 -0
  32. package/fesm2022/hyalo-angular-tabs.mjs.map +1 -0
  33. package/fesm2022/hyalo-angular-theme.mjs +94 -0
  34. package/fesm2022/hyalo-angular-theme.mjs.map +1 -0
  35. package/fesm2022/hyalo-angular-toast.mjs +322 -0
  36. package/fesm2022/hyalo-angular-toast.mjs.map +1 -0
  37. package/fesm2022/hyalo-angular.mjs +473 -0
  38. package/fesm2022/hyalo-angular.mjs.map +1 -0
  39. package/package.json +133 -3
  40. package/styles/hyalo-core.css +25 -0
  41. package/styles/hyalo.css +17 -0
  42. package/styles/overlays/dialog.css +9 -0
  43. package/styles/overlays/popover.css +9 -0
  44. package/styles/overlays/select.css +9 -0
  45. package/styles/overlays/toast.css +8 -0
  46. package/styles/palettes/aurora.css +47 -0
  47. package/styles/palettes/ember.css +47 -0
  48. package/styles/palettes/graphite.css +47 -0
  49. package/styles/palettes/ocean.css +47 -0
  50. package/styles/palettes/orchid.css +47 -0
  51. package/styles/palettes/rose.css +47 -0
  52. package/styles/parts/card.css +49 -0
  53. package/styles/parts/dialog.css +116 -0
  54. package/styles/parts/drawer.css +124 -0
  55. package/styles/parts/field.css +36 -0
  56. package/styles/parts/glass.css +137 -0
  57. package/styles/parts/motion.css +82 -0
  58. package/styles/parts/navbar.css +55 -0
  59. package/styles/parts/popover.css +27 -0
  60. package/styles/parts/presence.css +55 -0
  61. package/styles/parts/reset.css +42 -0
  62. package/styles/parts/select.css +46 -0
  63. package/styles/parts/themes.css +105 -0
  64. package/styles/parts/toast.css +128 -0
  65. package/styles/parts/tokens.css +151 -0
  66. package/styles/parts/typography.css +64 -0
  67. package/types/hyalo-angular-accordion.d.ts +74 -0
  68. package/types/hyalo-angular-button.d.ts +88 -0
  69. package/types/hyalo-angular-card.d.ts +61 -0
  70. package/types/hyalo-angular-choice.d.ts +259 -0
  71. package/types/hyalo-angular-dialog.d.ts +170 -0
  72. package/types/hyalo-angular-field.d.ts +135 -0
  73. package/types/hyalo-angular-icon.d.ts +122 -0
  74. package/types/hyalo-angular-interaction.d.ts +131 -0
  75. package/types/hyalo-angular-navbar.d.ts +110 -0
  76. package/types/hyalo-angular-overlay.d.ts +31 -0
  77. package/types/hyalo-angular-popover.d.ts +142 -0
  78. package/types/hyalo-angular-segmented.d.ts +79 -0
  79. package/types/hyalo-angular-select.d.ts +130 -0
  80. package/types/hyalo-angular-tabs.d.ts +102 -0
  81. package/types/hyalo-angular-theme.d.ts +46 -0
  82. package/types/hyalo-angular-toast.d.ts +79 -0
  83. package/types/hyalo-angular.d.ts +345 -0
@@ -0,0 +1,464 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, booleanAttribute, computed, effect, inject, input, model, output, signal, untracked, viewChild } from "@angular/core";
3
+ import { Combobox, ComboboxPopup, ComboboxWidget } from "@angular/aria/combobox";
4
+ import { Listbox, Option } from "@angular/aria/listbox";
5
+ import { CdkConnectedOverlay, CdkOverlayOrigin } from "@angular/cdk/overlay";
6
+ import { HyFidelity, injectId } from "@hyalo/angular";
7
+ import { HyIcon } from "@hyalo/angular/icon";
8
+ import { HY_FIELD } from "@hyalo/angular/field";
9
+ import { hyDropdownPositions, ɵHyPresence } from "@hyalo/angular/overlay";
10
+ var HySelect = class HySelect {
11
+ fidelity = inject(HyFidelity);
12
+ field = inject(HY_FIELD, { optional: true });
13
+ trigger = viewChild("trigger", ...ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []);
14
+ overlay = viewChild(CdkConnectedOverlay, ...ngDevMode ? [{ debugName: "overlay" }] : /* istanbul ignore next */ []);
15
+ presence = new ɵHyPresence();
16
+ options = input.required(...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
17
+ value = model(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
18
+ placeholder = input("Select", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
19
+ disabled = input(false, {
20
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
21
+ transform: booleanAttribute
22
+ });
23
+ required = input(false, {
24
+ ...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
25
+ transform: booleanAttribute
26
+ });
27
+ invalid = input(false, {
28
+ ...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
29
+ transform: booleanAttribute
30
+ });
31
+ errors = input([], ...ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []);
32
+ touched = input(false, {
33
+ ...ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {},
34
+ transform: booleanAttribute
35
+ });
36
+ native = input(false, {
37
+ ...ngDevMode ? { debugName: "native" } : /* istanbul ignore next */ {},
38
+ transform: booleanAttribute
39
+ });
40
+ touch = output();
41
+ labelable = true;
42
+ id = signal(injectId("select")).asReadonly();
43
+ errorMessage = computed(() => {
44
+ const first = this.errors()[0];
45
+ return first ? first.message ?? first.kind : void 0;
46
+ }, ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
47
+ expanded = signal(false, ...ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []);
48
+ rendered = signal(false, ...ngDevMode ? [{ debugName: "rendered" }] : /* istanbul ignore next */ []);
49
+ positions = hyDropdownPositions();
50
+ panelWidth = signal(0, ...ngDevMode ? [{ debugName: "panelWidth" }] : /* istanbul ignore next */ []);
51
+ useNative = computed(() => this.native() || this.fidelity.tier() === "low", ...ngDevMode ? [{ debugName: "useNative" }] : /* istanbul ignore next */ []);
52
+ selectedOption = computed(() => this.options().find((o) => o.value === this.value()), ...ngDevMode ? [{ debugName: "selectedOption" }] : /* istanbul ignore next */ []);
53
+ listValue = computed(() => {
54
+ const v = this.value();
55
+ return v === void 0 ? [] : [v];
56
+ }, ...ngDevMode ? [{ debugName: "listValue" }] : /* istanbul ignore next */ []);
57
+ showsError = computed(() => this.field ? this.field.errorShown() : this.invalid() && this.touched(), ...ngDevMode ? [{ debugName: "showsError" }] : /* istanbul ignore next */ []);
58
+ constructor() {
59
+ effect(() => {
60
+ const open = this.expanded();
61
+ untracked(() => {
62
+ const panel = this.panelElement();
63
+ if (open) {
64
+ if (panel && this.presence.leaving) this.presence.enter(panel);
65
+ this.rendered.set(true);
66
+ } else if (panel) this.presence.leave(panel, () => this.rendered.set(false));
67
+ else this.rendered.set(false);
68
+ });
69
+ });
70
+ this.field?.register({
71
+ id: this.id,
72
+ invalid: computed(() => this.invalid() && this.touched()),
73
+ errorMessage: this.errorMessage,
74
+ required: this.required,
75
+ disabled: this.disabled,
76
+ labelable: true
77
+ });
78
+ }
79
+ setExpanded(open) {
80
+ if (open) this.panelWidth.set(this.trigger()?.nativeElement.offsetWidth ?? 0);
81
+ this.expanded.set(open);
82
+ }
83
+ onAttach() {
84
+ const panel = this.panelElement();
85
+ if (panel) this.presence.enter(panel);
86
+ }
87
+ panelElement() {
88
+ return this.overlay()?.overlayRef?.overlayElement.querySelector(".hy-select__panel") ?? null;
89
+ }
90
+ pick(values) {
91
+ const next = values[values.length - 1];
92
+ if (next === void 0 || next === this.value()) return;
93
+ this.value.set(next);
94
+ this.close();
95
+ }
96
+ onPanelClick(event) {
97
+ const option = event.target?.closest("[role=\"option\"]");
98
+ if (option && option.getAttribute("aria-disabled") !== "true") this.close();
99
+ }
100
+ close() {
101
+ this.expanded.set(false);
102
+ this.trigger()?.nativeElement.focus();
103
+ }
104
+ pickNative(event) {
105
+ const index = Number(event.target.value);
106
+ const option = this.options()[index];
107
+ if (option) this.value.set(option.value);
108
+ }
109
+ indexOf(value) {
110
+ return this.options().findIndex((o) => o.value === value);
111
+ }
112
+ static ɵfac = i0.ɵɵngDeclareFactory({
113
+ minVersion: "12.0.0",
114
+ version: "22.2.3",
115
+ ngImport: i0,
116
+ type: HySelect,
117
+ deps: [],
118
+ target: i0.ɵɵFactoryTarget.Component
119
+ });
120
+ static ɵcmp = i0.ɵɵngDeclareComponent({
121
+ minVersion: "17.0.0",
122
+ version: "22.2.3",
123
+ type: HySelect,
124
+ isStandalone: true,
125
+ selector: "hy-select",
126
+ inputs: {
127
+ options: {
128
+ classPropertyName: "options",
129
+ publicName: "options",
130
+ isSignal: true,
131
+ isRequired: true,
132
+ transformFunction: null
133
+ },
134
+ value: {
135
+ classPropertyName: "value",
136
+ publicName: "value",
137
+ isSignal: true,
138
+ isRequired: false,
139
+ transformFunction: null
140
+ },
141
+ placeholder: {
142
+ classPropertyName: "placeholder",
143
+ publicName: "placeholder",
144
+ isSignal: true,
145
+ isRequired: false,
146
+ transformFunction: null
147
+ },
148
+ disabled: {
149
+ classPropertyName: "disabled",
150
+ publicName: "disabled",
151
+ isSignal: true,
152
+ isRequired: false,
153
+ transformFunction: null
154
+ },
155
+ required: {
156
+ classPropertyName: "required",
157
+ publicName: "required",
158
+ isSignal: true,
159
+ isRequired: false,
160
+ transformFunction: null
161
+ },
162
+ invalid: {
163
+ classPropertyName: "invalid",
164
+ publicName: "invalid",
165
+ isSignal: true,
166
+ isRequired: false,
167
+ transformFunction: null
168
+ },
169
+ errors: {
170
+ classPropertyName: "errors",
171
+ publicName: "errors",
172
+ isSignal: true,
173
+ isRequired: false,
174
+ transformFunction: null
175
+ },
176
+ touched: {
177
+ classPropertyName: "touched",
178
+ publicName: "touched",
179
+ isSignal: true,
180
+ isRequired: false,
181
+ transformFunction: null
182
+ },
183
+ native: {
184
+ classPropertyName: "native",
185
+ publicName: "native",
186
+ isSignal: true,
187
+ isRequired: false,
188
+ transformFunction: null
189
+ }
190
+ },
191
+ outputs: {
192
+ value: "valueChange",
193
+ touch: "touch"
194
+ },
195
+ host: {
196
+ properties: { "attr.data-native": "useNative() || null" },
197
+ classAttribute: "hy-select"
198
+ },
199
+ viewQueries: [{
200
+ propertyName: "trigger",
201
+ first: true,
202
+ predicate: ["trigger"],
203
+ descendants: true,
204
+ isSignal: true
205
+ }, {
206
+ propertyName: "overlay",
207
+ first: true,
208
+ predicate: CdkConnectedOverlay,
209
+ descendants: true,
210
+ isSignal: true
211
+ }],
212
+ ngImport: i0,
213
+ template: "@if (useNative()) {\r\n <select\r\n class=\"hy-select__native\"\r\n [id]=\"id()\"\r\n [disabled]=\"disabled()\"\r\n [required]=\"required()\"\r\n [attr.aria-describedby]=\"field?.describedBy() ?? null\"\r\n [attr.aria-invalid]=\"showsError() || null\"\r\n (change)=\"pickNative($event)\"\r\n (blur)=\"touch.emit()\"\r\n >\r\n @if (!selectedOption()) {\r\n <option value=\"\" disabled selected>{{ placeholder() }}</option>\r\n }\r\n @for (option of options(); track $index) {\r\n <option [value]=\"$index\" [selected]=\"option.value === value()\" [disabled]=\"!!option.disabled\">\r\n {{ option.label }}\r\n </option>\r\n }\r\n </select>\r\n <hy-icon class=\"hy-select__chevron\" name=\"chevron-down\" />\r\n} @else {\r\n <button\r\n #trigger\r\n type=\"button\"\r\n ngCombobox\r\n #combobox=\"ngCombobox\"\r\n cdkOverlayOrigin\r\n #origin=\"cdkOverlayOrigin\"\r\n class=\"hy-select__trigger\"\r\n [id]=\"id()\"\r\n [disabled]=\"disabled()\"\r\n [expanded]=\"expanded()\"\r\n (expandedChange)=\"setExpanded($event)\"\r\n [attr.aria-labelledby]=\"field ? field.labelId + ' ' + id() : null\"\r\n [attr.aria-describedby]=\"field?.describedBy() ?? null\"\r\n [attr.aria-invalid]=\"showsError() || null\"\r\n [attr.aria-required]=\"required() || null\"\r\n (blur)=\"touch.emit()\"\r\n >\r\n <span class=\"hy-select__value\" [class.hy-select__placeholder]=\"!selectedOption()\">\r\n {{ selectedOption()?.label ?? placeholder() }}\r\n </span>\r\n <hy-icon class=\"hy-select__chevron\" name=\"chevron-down\" />\r\n </button>\r\n\r\n <ng-template ngComboboxPopup [combobox]=\"combobox\">\r\n <ng-template\r\n cdkConnectedOverlay\r\n [cdkConnectedOverlayOrigin]=\"origin\"\r\n [cdkConnectedOverlayOpen]=\"rendered()\"\r\n [cdkConnectedOverlayPositions]=\"positions\"\r\n [cdkConnectedOverlayMinWidth]=\"panelWidth()\"\r\n cdkConnectedOverlayPanelClass=\"hy-select-overlay\"\r\n cdkConnectedOverlayTransformOriginOn=\".hy-select__panel\"\r\n (attach)=\"onAttach()\"\r\n (overlayOutsideClick)=\"expanded.set(false)\"\r\n >\r\n <!-- Focus stays on the trigger; Aria relays keys here and manages tabindex. -->\r\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\r\n <div\r\n ngComboboxWidget\r\n ngListbox\r\n #listbox=\"ngListbox\"\r\n class=\"hy-select__panel hy-glass\"\r\n data-material=\"frosted\"\r\n focusMode=\"activedescendant\"\r\n selectionMode=\"explicit\"\r\n [activeDescendant]=\"listbox.activeDescendant()\"\r\n [value]=\"listValue()\"\r\n (valueChange)=\"pick($event)\"\r\n (click)=\"onPanelClick($event)\"\r\n (keydown.enter)=\"close()\"\r\n (keydown.space)=\"close()\"\r\n >\r\n @for (option of options(); track $index) {\r\n <div\r\n ngOption\r\n class=\"hy-select__option\"\r\n [value]=\"option.value\"\r\n [label]=\"option.label\"\r\n [disabled]=\"!!option.disabled\"\r\n >\r\n <span>{{ option.label }}</span>\r\n <hy-icon class=\"hy-select__check\" name=\"check\" />\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n </ng-template>\r\n}\r\n",
214
+ styles: [":host{position:relative;display:flex;align-items:center;flex:1;min-inline-size:0;align-self:stretch}.hy-select__trigger,.hy-select__native{flex:1;min-inline-size:0;align-self:stretch;display:flex;align-items:center;gap:var(--hy-space-2);padding:0;padding-inline-end:1.75rem;border:0;background:transparent;color:var(--hy-ink);font:inherit;text-align:start;cursor:pointer;appearance:none}.hy-select__trigger:focus-visible,.hy-select__native:focus-visible{outline:none}.hy-select__trigger:disabled,.hy-select__native:disabled{cursor:not-allowed}.hy-select__value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hy-select__placeholder{color:var(--hy-ink-3)}.hy-select__chevron{position:absolute;inset-inline-end:0;color:var(--hy-ink-3);pointer-events:none;transition:rotate var(--hy-dur-settle) var(--hy-ease-out)}.hy-select__trigger[aria-expanded=true] .hy-select__chevron{rotate:180deg}\n"],
215
+ dependencies: [
216
+ {
217
+ kind: "directive",
218
+ type: Combobox,
219
+ selector: "[ngCombobox]",
220
+ inputs: [
221
+ "disabled",
222
+ "readonly",
223
+ "softDisabled",
224
+ "alwaysExpanded",
225
+ "tabindex",
226
+ "expanded",
227
+ "value",
228
+ "inlineSuggestion"
229
+ ],
230
+ outputs: ["expandedChange", "valueChange"],
231
+ exportAs: ["ngCombobox"]
232
+ },
233
+ {
234
+ kind: "directive",
235
+ type: ComboboxPopup,
236
+ selector: "ng-template[ngComboboxPopup]",
237
+ inputs: ["combobox", "popupType"],
238
+ exportAs: ["ngComboboxPopup"]
239
+ },
240
+ {
241
+ kind: "directive",
242
+ type: ComboboxWidget,
243
+ selector: "[ngComboboxWidget]",
244
+ inputs: ["activeDescendant"],
245
+ exportAs: ["ngComboboxWidget"]
246
+ },
247
+ {
248
+ kind: "directive",
249
+ type: Listbox,
250
+ selector: "[ngListbox]",
251
+ inputs: [
252
+ "id",
253
+ "orientation",
254
+ "multi",
255
+ "wrap",
256
+ "softDisabled",
257
+ "focusMode",
258
+ "selectionMode",
259
+ "typeaheadDelay",
260
+ "disabled",
261
+ "readonly",
262
+ "tabindex",
263
+ "value"
264
+ ],
265
+ outputs: ["valueChange"],
266
+ exportAs: ["ngListbox"]
267
+ },
268
+ {
269
+ kind: "directive",
270
+ type: Option,
271
+ selector: "[ngOption]",
272
+ inputs: [
273
+ "id",
274
+ "value",
275
+ "disabled",
276
+ "label"
277
+ ],
278
+ exportAs: ["ngOption"]
279
+ },
280
+ {
281
+ kind: "directive",
282
+ type: CdkConnectedOverlay,
283
+ selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]",
284
+ inputs: [
285
+ "cdkConnectedOverlayOrigin",
286
+ "cdkConnectedOverlayPositions",
287
+ "cdkConnectedOverlayPositionStrategy",
288
+ "cdkConnectedOverlayOffsetX",
289
+ "cdkConnectedOverlayOffsetY",
290
+ "cdkConnectedOverlayWidth",
291
+ "cdkConnectedOverlayHeight",
292
+ "cdkConnectedOverlayMinWidth",
293
+ "cdkConnectedOverlayMinHeight",
294
+ "cdkConnectedOverlayBackdropClass",
295
+ "cdkConnectedOverlayPanelClass",
296
+ "cdkConnectedOverlayViewportMargin",
297
+ "cdkConnectedOverlayScrollStrategy",
298
+ "cdkConnectedOverlayOpen",
299
+ "cdkConnectedOverlayDisableClose",
300
+ "cdkConnectedOverlayTransformOriginOn",
301
+ "cdkConnectedOverlayHasBackdrop",
302
+ "cdkConnectedOverlayLockPosition",
303
+ "cdkConnectedOverlayFlexibleDimensions",
304
+ "cdkConnectedOverlayGrowAfterOpen",
305
+ "cdkConnectedOverlayPush",
306
+ "cdkConnectedOverlayDisposeOnNavigation",
307
+ "cdkConnectedOverlayUsePopover",
308
+ "cdkConnectedOverlayMatchWidth",
309
+ "cdkConnectedOverlay"
310
+ ],
311
+ outputs: [
312
+ "backdropClick",
313
+ "positionChange",
314
+ "attach",
315
+ "detach",
316
+ "overlayKeydown",
317
+ "overlayOutsideClick"
318
+ ],
319
+ exportAs: ["cdkConnectedOverlay"]
320
+ },
321
+ {
322
+ kind: "directive",
323
+ type: CdkOverlayOrigin,
324
+ selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]",
325
+ exportAs: ["cdkOverlayOrigin"]
326
+ },
327
+ {
328
+ kind: "component",
329
+ type: HyIcon,
330
+ selector: "hy-icon",
331
+ inputs: [
332
+ "name",
333
+ "icon",
334
+ "label",
335
+ "size",
336
+ "strokeWidth"
337
+ ]
338
+ }
339
+ ],
340
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
341
+ });
342
+ };
343
+ i0.ɵɵngDeclareClassMetadata({
344
+ minVersion: "12.0.0",
345
+ version: "22.2.3",
346
+ ngImport: i0,
347
+ type: HySelect,
348
+ decorators: [{
349
+ type: Component,
350
+ args: [{
351
+ selector: "hy-select",
352
+ imports: [
353
+ Combobox,
354
+ ComboboxPopup,
355
+ ComboboxWidget,
356
+ Listbox,
357
+ Option,
358
+ CdkConnectedOverlay,
359
+ CdkOverlayOrigin,
360
+ HyIcon
361
+ ],
362
+ changeDetection: ChangeDetectionStrategy.OnPush,
363
+ host: {
364
+ class: "hy-select",
365
+ "[attr.data-native]": "useNative() || null"
366
+ },
367
+ template: "@if (useNative()) {\r\n <select\r\n class=\"hy-select__native\"\r\n [id]=\"id()\"\r\n [disabled]=\"disabled()\"\r\n [required]=\"required()\"\r\n [attr.aria-describedby]=\"field?.describedBy() ?? null\"\r\n [attr.aria-invalid]=\"showsError() || null\"\r\n (change)=\"pickNative($event)\"\r\n (blur)=\"touch.emit()\"\r\n >\r\n @if (!selectedOption()) {\r\n <option value=\"\" disabled selected>{{ placeholder() }}</option>\r\n }\r\n @for (option of options(); track $index) {\r\n <option [value]=\"$index\" [selected]=\"option.value === value()\" [disabled]=\"!!option.disabled\">\r\n {{ option.label }}\r\n </option>\r\n }\r\n </select>\r\n <hy-icon class=\"hy-select__chevron\" name=\"chevron-down\" />\r\n} @else {\r\n <button\r\n #trigger\r\n type=\"button\"\r\n ngCombobox\r\n #combobox=\"ngCombobox\"\r\n cdkOverlayOrigin\r\n #origin=\"cdkOverlayOrigin\"\r\n class=\"hy-select__trigger\"\r\n [id]=\"id()\"\r\n [disabled]=\"disabled()\"\r\n [expanded]=\"expanded()\"\r\n (expandedChange)=\"setExpanded($event)\"\r\n [attr.aria-labelledby]=\"field ? field.labelId + ' ' + id() : null\"\r\n [attr.aria-describedby]=\"field?.describedBy() ?? null\"\r\n [attr.aria-invalid]=\"showsError() || null\"\r\n [attr.aria-required]=\"required() || null\"\r\n (blur)=\"touch.emit()\"\r\n >\r\n <span class=\"hy-select__value\" [class.hy-select__placeholder]=\"!selectedOption()\">\r\n {{ selectedOption()?.label ?? placeholder() }}\r\n </span>\r\n <hy-icon class=\"hy-select__chevron\" name=\"chevron-down\" />\r\n </button>\r\n\r\n <ng-template ngComboboxPopup [combobox]=\"combobox\">\r\n <ng-template\r\n cdkConnectedOverlay\r\n [cdkConnectedOverlayOrigin]=\"origin\"\r\n [cdkConnectedOverlayOpen]=\"rendered()\"\r\n [cdkConnectedOverlayPositions]=\"positions\"\r\n [cdkConnectedOverlayMinWidth]=\"panelWidth()\"\r\n cdkConnectedOverlayPanelClass=\"hy-select-overlay\"\r\n cdkConnectedOverlayTransformOriginOn=\".hy-select__panel\"\r\n (attach)=\"onAttach()\"\r\n (overlayOutsideClick)=\"expanded.set(false)\"\r\n >\r\n <!-- Focus stays on the trigger; Aria relays keys here and manages tabindex. -->\r\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\r\n <div\r\n ngComboboxWidget\r\n ngListbox\r\n #listbox=\"ngListbox\"\r\n class=\"hy-select__panel hy-glass\"\r\n data-material=\"frosted\"\r\n focusMode=\"activedescendant\"\r\n selectionMode=\"explicit\"\r\n [activeDescendant]=\"listbox.activeDescendant()\"\r\n [value]=\"listValue()\"\r\n (valueChange)=\"pick($event)\"\r\n (click)=\"onPanelClick($event)\"\r\n (keydown.enter)=\"close()\"\r\n (keydown.space)=\"close()\"\r\n >\r\n @for (option of options(); track $index) {\r\n <div\r\n ngOption\r\n class=\"hy-select__option\"\r\n [value]=\"option.value\"\r\n [label]=\"option.label\"\r\n [disabled]=\"!!option.disabled\"\r\n >\r\n <span>{{ option.label }}</span>\r\n <hy-icon class=\"hy-select__check\" name=\"check\" />\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n </ng-template>\r\n}\r\n",
368
+ styles: [":host{position:relative;display:flex;align-items:center;flex:1;min-inline-size:0;align-self:stretch}.hy-select__trigger,.hy-select__native{flex:1;min-inline-size:0;align-self:stretch;display:flex;align-items:center;gap:var(--hy-space-2);padding:0;padding-inline-end:1.75rem;border:0;background:transparent;color:var(--hy-ink);font:inherit;text-align:start;cursor:pointer;appearance:none}.hy-select__trigger:focus-visible,.hy-select__native:focus-visible{outline:none}.hy-select__trigger:disabled,.hy-select__native:disabled{cursor:not-allowed}.hy-select__value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hy-select__placeholder{color:var(--hy-ink-3)}.hy-select__chevron{position:absolute;inset-inline-end:0;color:var(--hy-ink-3);pointer-events:none;transition:rotate var(--hy-dur-settle) var(--hy-ease-out)}.hy-select__trigger[aria-expanded=true] .hy-select__chevron{rotate:180deg}\n"]
369
+ }]
370
+ }],
371
+ ctorParameters: () => [],
372
+ propDecorators: {
373
+ trigger: [{
374
+ type: i0.ViewChild,
375
+ args: ["trigger", { isSignal: true }]
376
+ }],
377
+ overlay: [{
378
+ type: i0.ViewChild,
379
+ args: [i0.forwardRef(() => CdkConnectedOverlay), { isSignal: true }]
380
+ }],
381
+ options: [{
382
+ type: i0.Input,
383
+ args: [{
384
+ isSignal: true,
385
+ alias: "options",
386
+ required: true
387
+ }]
388
+ }],
389
+ value: [{
390
+ type: i0.Input,
391
+ args: [{
392
+ isSignal: true,
393
+ alias: "value",
394
+ required: false
395
+ }]
396
+ }, {
397
+ type: i0.Output,
398
+ args: ["valueChange"]
399
+ }],
400
+ placeholder: [{
401
+ type: i0.Input,
402
+ args: [{
403
+ isSignal: true,
404
+ alias: "placeholder",
405
+ required: false
406
+ }]
407
+ }],
408
+ disabled: [{
409
+ type: i0.Input,
410
+ args: [{
411
+ isSignal: true,
412
+ alias: "disabled",
413
+ required: false
414
+ }]
415
+ }],
416
+ required: [{
417
+ type: i0.Input,
418
+ args: [{
419
+ isSignal: true,
420
+ alias: "required",
421
+ required: false
422
+ }]
423
+ }],
424
+ invalid: [{
425
+ type: i0.Input,
426
+ args: [{
427
+ isSignal: true,
428
+ alias: "invalid",
429
+ required: false
430
+ }]
431
+ }],
432
+ errors: [{
433
+ type: i0.Input,
434
+ args: [{
435
+ isSignal: true,
436
+ alias: "errors",
437
+ required: false
438
+ }]
439
+ }],
440
+ touched: [{
441
+ type: i0.Input,
442
+ args: [{
443
+ isSignal: true,
444
+ alias: "touched",
445
+ required: false
446
+ }]
447
+ }],
448
+ native: [{
449
+ type: i0.Input,
450
+ args: [{
451
+ isSignal: true,
452
+ alias: "native",
453
+ required: false
454
+ }]
455
+ }],
456
+ touch: [{
457
+ type: i0.Output,
458
+ args: ["touch"]
459
+ }]
460
+ }
461
+ });
462
+ export { HySelect };
463
+
464
+ //# sourceMappingURL=hyalo-angular-select.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hyalo-angular-select.mjs","names":["HyPresence"],"sources":["../../../projects/hyalo/select/select.ts","../../../projects/hyalo/select/select.html"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n booleanAttribute,\r\n computed,\r\n effect,\r\n inject,\r\n input,\r\n model,\r\n output,\r\n signal,\r\n untracked,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { Combobox, ComboboxPopup, ComboboxWidget } from '@angular/aria/combobox';\r\nimport { Listbox, Option } from '@angular/aria/listbox';\r\nimport { CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';\r\nimport type { FormValueControl } from '@angular/forms/signals';\r\nimport { HyFidelity, injectId } from '@hyalo/angular';\r\nimport { HyIcon } from '@hyalo/angular/icon';\r\nimport { HY_FIELD, type HyFieldControl } from '@hyalo/angular/field';\r\nimport { hyDropdownPositions, ɵHyPresence as HyPresence } from '@hyalo/angular/overlay';\r\n\r\n/** One choice in a select. */\r\nexport interface HySelectOption<T> {\r\n readonly value: T;\r\n readonly label: string;\r\n readonly disabled?: boolean;\r\n}\r\n\r\n/**\r\n * A single-choice select with a glass dropdown, built on Angular Aria's\r\n * combobox and listbox patterns.\r\n *\r\n * ```html\r\n * <hy-field label=\"Strap\">\r\n * <hy-select [options]=\"straps\" [formField]=\"form.strap\" placeholder=\"Choose a strap\" />\r\n * </hy-field>\r\n * ```\r\n *\r\n * Focus stays on the trigger while the list is open, and options are\r\n * announced through `aria-activedescendant`. Arrow keys move, Enter or\r\n * Space picks, Escape closes, and typing jumps to a matching option.\r\n *\r\n * On the low fidelity tier, or with `native`, it renders a real `<select>`\r\n * instead. That gives the platform picker on phones and costs nothing.\r\n */\r\n@Component({\r\n selector: 'hy-select',\r\n imports: [\r\n Combobox,\r\n ComboboxPopup,\r\n ComboboxWidget,\r\n Listbox,\r\n Option,\r\n CdkConnectedOverlay,\r\n CdkOverlayOrigin,\r\n HyIcon,\r\n ],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'hy-select',\r\n '[attr.data-native]': 'useNative() || null',\r\n },\r\n templateUrl: './select.html',\r\n styleUrl: './select.css',\r\n})\r\nexport class HySelect<T> implements FormValueControl<T | undefined>, HyFieldControl {\r\n private readonly fidelity = inject(HyFidelity);\r\n protected readonly field = inject(HY_FIELD, { optional: true });\r\n private readonly trigger = viewChild<ElementRef<HTMLElement>>('trigger');\r\n private readonly overlay = viewChild(CdkConnectedOverlay);\r\n private readonly presence = new HyPresence();\r\n\r\n /** The choices. */\r\n readonly options = input.required<readonly HySelectOption<T>[]>();\r\n /** Selected value. Two-way bindable and works with `[formField]`. */\r\n readonly value = model<T | undefined>(undefined);\r\n /** Text shown while nothing is selected. */\r\n readonly placeholder = input('Select');\r\n /** Disables the select. Set automatically by Signal Forms. */\r\n readonly disabled = input(false, { transform: booleanAttribute });\r\n /** Marks the field as required. Set automatically by Signal Forms. */\r\n readonly required = input(false, { transform: booleanAttribute });\r\n /** Set by Signal Forms. */\r\n readonly invalid = input(false, { transform: booleanAttribute });\r\n /** Set by Signal Forms. Only the first message is shown. */\r\n readonly errors = input<readonly { readonly kind: string; readonly message?: string }[]>([]);\r\n /** Set by Signal Forms. Errors show only after the field is touched. */\r\n readonly touched = input(false, { transform: booleanAttribute });\r\n /** Always render a native `<select>`. */\r\n readonly native = input(false, { transform: booleanAttribute });\r\n /** Emits when the control loses focus, so forms can mark it touched. */\r\n readonly touch = output<void>();\r\n\r\n readonly labelable = true;\r\n readonly id = signal(injectId('select')).asReadonly();\r\n readonly errorMessage = computed(() => {\r\n const first = this.errors()[0];\r\n return first ? (first.message ?? first.kind) : undefined;\r\n });\r\n\r\n protected readonly expanded = signal(false);\r\n /** Stays true while the panel fades out after `expanded` turns false. */\r\n protected readonly rendered = signal(false);\r\n protected readonly positions = hyDropdownPositions();\r\n protected readonly panelWidth = signal(0);\r\n protected readonly useNative = computed(() => this.native() || this.fidelity.tier() === 'low');\r\n protected readonly selectedOption = computed(() =>\r\n this.options().find((o) => o.value === this.value()),\r\n );\r\n protected readonly listValue = computed(() => {\r\n const v = this.value();\r\n return v === undefined ? [] : [v];\r\n });\r\n protected readonly showsError = computed(() =>\r\n this.field ? this.field.errorShown() : this.invalid() && this.touched(),\r\n );\r\n\r\n constructor() {\r\n effect(() => {\r\n const open = this.expanded();\r\n untracked(() => {\r\n const panel = this.panelElement();\r\n if (open) {\r\n // Reopened while fading out: turn the exit around.\r\n if (panel && this.presence.leaving) this.presence.enter(panel);\r\n this.rendered.set(true);\r\n } else if (panel) {\r\n this.presence.leave(panel, () => this.rendered.set(false));\r\n } else {\r\n this.rendered.set(false);\r\n }\r\n });\r\n });\r\n this.field?.register({\r\n id: this.id,\r\n invalid: computed(() => this.invalid() && this.touched()),\r\n errorMessage: this.errorMessage,\r\n required: this.required,\r\n disabled: this.disabled,\r\n labelable: true,\r\n });\r\n }\r\n\r\n protected setExpanded(open: boolean): void {\r\n if (open) this.panelWidth.set(this.trigger()?.nativeElement.offsetWidth ?? 0);\r\n this.expanded.set(open);\r\n }\r\n\r\n /** Runs when the overlay attaches a fresh panel. */\r\n protected onAttach(): void {\r\n const panel = this.panelElement();\r\n if (panel) this.presence.enter(panel);\r\n }\r\n\r\n private panelElement(): HTMLElement | null {\r\n return (\r\n this.overlay()?.overlayRef?.overlayElement.querySelector<HTMLElement>('.hy-select__panel') ??\r\n null\r\n );\r\n }\r\n\r\n protected pick(values: readonly T[]): void {\r\n const next = values[values.length - 1];\r\n if (next === undefined || next === this.value()) return;\r\n this.value.set(next);\r\n this.close();\r\n }\r\n\r\n /** Closes after a click on an option, including the one already selected. */\r\n protected onPanelClick(event: MouseEvent): void {\r\n const option = (event.target as Element | null)?.closest('[role=\"option\"]');\r\n if (option && option.getAttribute('aria-disabled') !== 'true') this.close();\r\n }\r\n\r\n protected close(): void {\r\n this.expanded.set(false);\r\n this.trigger()?.nativeElement.focus();\r\n }\r\n\r\n protected pickNative(event: Event): void {\r\n const index = Number((event.target as HTMLSelectElement).value);\r\n const option = this.options()[index];\r\n if (option) this.value.set(option.value);\r\n }\r\n\r\n protected indexOf(value: T | undefined): number {\r\n return this.options().findIndex((o) => o.value === value);\r\n }\r\n}\r\n","@if (useNative()) {\r\n <select\r\n class=\"hy-select__native\"\r\n [id]=\"id()\"\r\n [disabled]=\"disabled()\"\r\n [required]=\"required()\"\r\n [attr.aria-describedby]=\"field?.describedBy() ?? null\"\r\n [attr.aria-invalid]=\"showsError() || null\"\r\n (change)=\"pickNative($event)\"\r\n (blur)=\"touch.emit()\"\r\n >\r\n @if (!selectedOption()) {\r\n <option value=\"\" disabled selected>{{ placeholder() }}</option>\r\n }\r\n @for (option of options(); track $index) {\r\n <option [value]=\"$index\" [selected]=\"option.value === value()\" [disabled]=\"!!option.disabled\">\r\n {{ option.label }}\r\n </option>\r\n }\r\n </select>\r\n <hy-icon class=\"hy-select__chevron\" name=\"chevron-down\" />\r\n} @else {\r\n <button\r\n #trigger\r\n type=\"button\"\r\n ngCombobox\r\n #combobox=\"ngCombobox\"\r\n cdkOverlayOrigin\r\n #origin=\"cdkOverlayOrigin\"\r\n class=\"hy-select__trigger\"\r\n [id]=\"id()\"\r\n [disabled]=\"disabled()\"\r\n [expanded]=\"expanded()\"\r\n (expandedChange)=\"setExpanded($event)\"\r\n [attr.aria-labelledby]=\"field ? field.labelId + ' ' + id() : null\"\r\n [attr.aria-describedby]=\"field?.describedBy() ?? null\"\r\n [attr.aria-invalid]=\"showsError() || null\"\r\n [attr.aria-required]=\"required() || null\"\r\n (blur)=\"touch.emit()\"\r\n >\r\n <span class=\"hy-select__value\" [class.hy-select__placeholder]=\"!selectedOption()\">\r\n {{ selectedOption()?.label ?? placeholder() }}\r\n </span>\r\n <hy-icon class=\"hy-select__chevron\" name=\"chevron-down\" />\r\n </button>\r\n\r\n <ng-template ngComboboxPopup [combobox]=\"combobox\">\r\n <ng-template\r\n cdkConnectedOverlay\r\n [cdkConnectedOverlayOrigin]=\"origin\"\r\n [cdkConnectedOverlayOpen]=\"rendered()\"\r\n [cdkConnectedOverlayPositions]=\"positions\"\r\n [cdkConnectedOverlayMinWidth]=\"panelWidth()\"\r\n cdkConnectedOverlayPanelClass=\"hy-select-overlay\"\r\n cdkConnectedOverlayTransformOriginOn=\".hy-select__panel\"\r\n (attach)=\"onAttach()\"\r\n (overlayOutsideClick)=\"expanded.set(false)\"\r\n >\r\n <!-- Focus stays on the trigger; Aria relays keys here and manages tabindex. -->\r\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\r\n <div\r\n ngComboboxWidget\r\n ngListbox\r\n #listbox=\"ngListbox\"\r\n class=\"hy-select__panel hy-glass\"\r\n data-material=\"frosted\"\r\n focusMode=\"activedescendant\"\r\n selectionMode=\"explicit\"\r\n [activeDescendant]=\"listbox.activeDescendant()\"\r\n [value]=\"listValue()\"\r\n (valueChange)=\"pick($event)\"\r\n (click)=\"onPanelClick($event)\"\r\n (keydown.enter)=\"close()\"\r\n (keydown.space)=\"close()\"\r\n >\r\n @for (option of options(); track $index) {\r\n <div\r\n ngOption\r\n class=\"hy-select__option\"\r\n [value]=\"option.value\"\r\n [label]=\"option.label\"\r\n [disabled]=\"!!option.disabled\"\r\n >\r\n <span>{{ option.label }}</span>\r\n <hy-icon class=\"hy-select__check\" name=\"check\" />\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n </ng-template>\r\n}\r\n"],"mappings":";;;;;;;;;AAoEA,IAAa,WAAb,MAAa,SAAQ;CACF,WAAW,OAAO,UAAU;CAC1B,QAAQ,OAAO,UAAU,EAAE,UAAU,KAAI,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