@joanroucoux/cairn-ui 0.1.0 → 0.1.2

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, computed, Component, output, inject, ElementRef, effect, afterRenderEffect, Directive, model, viewChildren, booleanAttribute } from '@angular/core';
2
+ import { input, computed, Component, InjectionToken, output, inject, ElementRef, effect, contentChild, afterRenderEffect, forwardRef, Directive, model, viewChildren, booleanAttribute } from '@angular/core';
3
3
 
4
4
  /** Available avatar sizes. `AvatarSize` is derived from this tuple. */
5
5
  const AVATAR_SIZES = ['sm', 'md'];
@@ -23,10 +23,10 @@ class UiAvatar {
23
23
  ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
24
24
  classes = computed(() => `${BASE_CLASSES$4} ${SIZE_CLASSES$1[this.size()]}`, /* @ts-ignore */
25
25
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
26
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiAvatar, deps: [], target: i0.ɵɵFactoryTarget.Component });
27
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: UiAvatar, isStandalone: true, selector: "ui-avatar", inputs: { initials: { classPropertyName: "initials", publicName: "initials", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "img" }, properties: { "attr.aria-label": "label()", "class": "classes()" } }, ngImport: i0, template: '<span aria-hidden="true">{{ initials() }}</span>', isInline: true });
26
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiAvatar, deps: [], target: i0.ɵɵFactoryTarget.Component });
27
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: UiAvatar, isStandalone: true, selector: "ui-avatar", inputs: { initials: { classPropertyName: "initials", publicName: "initials", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "img" }, properties: { "attr.aria-label": "label()", "class": "classes()" } }, ngImport: i0, template: '<span aria-hidden="true">{{ initials() }}</span>', isInline: true });
28
28
  }
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiAvatar, decorators: [{
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiAvatar, decorators: [{
30
30
  type: Component,
31
31
  args: [{
32
32
  selector: 'ui-avatar',
@@ -59,10 +59,10 @@ class UiBadge {
59
59
  ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
60
60
  classes = computed(() => `${BASE_CLASSES$3} ${VARIANT_CLASSES$2[this.variant()]}`, /* @ts-ignore */
61
61
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
62
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiBadge, deps: [], target: i0.ɵɵFactoryTarget.Component });
63
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: UiBadge, isStandalone: true, selector: "ui-badge", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: '<ng-content />', isInline: true });
62
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiBadge, deps: [], target: i0.ɵɵFactoryTarget.Component });
63
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: UiBadge, isStandalone: true, selector: "ui-badge", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: '<ng-content />', isInline: true });
64
64
  }
65
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiBadge, decorators: [{
65
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiBadge, decorators: [{
66
66
  type: Component,
67
67
  args: [{
68
68
  selector: 'ui-badge',
@@ -112,10 +112,10 @@ class UiButton {
112
112
  ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
113
113
  classes = computed(() => `${BASE_CLASSES$2} ${VARIANT_CLASSES$1[this.variant()]} ${SIZE_CLASSES[this.size()]}`, /* @ts-ignore */
114
114
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
115
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
116
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: UiButton, isStandalone: true, selector: "button[ui-button], a[ui-button]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: '<ng-content />', isInline: true });
115
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
116
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: UiButton, isStandalone: true, selector: "button[ui-button], a[ui-button]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: '<ng-content />', isInline: true });
117
117
  }
118
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiButton, decorators: [{
118
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiButton, decorators: [{
119
119
  type: Component,
120
120
  args: [{
121
121
  selector: 'button[ui-button], a[ui-button]',
@@ -153,10 +153,10 @@ class UiCard {
153
153
  ...(ngDevMode ? [{ debugName: "padding" }] : /* istanbul ignore next */ []));
154
154
  classes = computed(() => `${BASE_CLASSES$1} ${VARIANT_CLASSES[this.variant()]} ${PADDING_CLASSES[this.padding()]}`, /* @ts-ignore */
155
155
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
156
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
157
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: UiCard, isStandalone: true, selector: "ui-card", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: '<ng-content />', isInline: true });
156
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
157
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: UiCard, isStandalone: true, selector: "ui-card", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: '<ng-content />', isInline: true });
158
158
  }
159
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiCard, decorators: [{
159
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiCard, decorators: [{
160
160
  type: Component,
161
161
  args: [{
162
162
  selector: 'ui-card',
@@ -167,6 +167,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
167
167
  }]
168
168
  }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], padding: [{ type: i0.Input, args: [{ isSignal: true, alias: "padding", required: false }] }] } });
169
169
 
170
+ /**
171
+ * Resolves to the styled control projected into a field.
172
+ *
173
+ * Angular's `[formField]` directive fills any input named `errors` or `touched` on the directives
174
+ * sitting on its host element, so a control declaring them receives its own validation state with
175
+ * nothing written at the call site. This token is how the field finds whichever control was
176
+ * projected into it.
177
+ */
178
+ const UI_CONTROL = new InjectionToken('UI_CONTROL');
179
+
170
180
  /** Available delta emphases. `DeltaEmphasis` is derived from this tuple. */
171
181
  const DELTA_EMPHASES = ['text', 'pill'];
172
182
  const BASE_CLASSES = 'inline-flex items-center gap-1 font-semibold tabular-nums';
@@ -217,8 +227,8 @@ class UiDelta {
217
227
  return `${BASE_CLASSES} ${TEXT_CLASSES[sign]} ${background}`;
218
228
  }, /* @ts-ignore */
219
229
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
220
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiDelta, deps: [], target: i0.ɵɵFactoryTarget.Component });
221
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: UiDelta, isStandalone: true, selector: "ui-delta", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, unknownLabel: { classPropertyName: "unknownLabel", publicName: "unknownLabel", isSignal: true, isRequired: true, transformFunction: null }, emphasis: { classPropertyName: "emphasis", publicName: "emphasis", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `
230
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiDelta, deps: [], target: i0.ɵɵFactoryTarget.Component });
231
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: UiDelta, isStandalone: true, selector: "ui-delta", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, unknownLabel: { classPropertyName: "unknownLabel", publicName: "unknownLabel", isSignal: true, isRequired: true, transformFunction: null }, emphasis: { classPropertyName: "emphasis", publicName: "emphasis", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `
222
232
  @if (sign() === 'unknown') {
223
233
  <span aria-hidden="true">&mdash;</span>
224
234
  <span class="sr-only">{{ unknownLabel() }}</span>
@@ -227,7 +237,7 @@ class UiDelta {
227
237
  }
228
238
  `, isInline: true });
229
239
  }
230
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiDelta, decorators: [{
240
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiDelta, decorators: [{
231
241
  type: Component,
232
242
  args: [{
233
243
  selector: 'ui-delta',
@@ -277,7 +287,7 @@ class UiDialog {
277
287
  dismissed = output();
278
288
  headingId = nextId$1();
279
289
  descriptionId = `${this.headingId}-description`;
280
- classes = computed(() => `w-full ${WIDTH_CLASSES[this.width()]} rounded-xl border border-(--border) bg-(--card) p-6 text-(--foreground) backdrop:bg-black/60`, /* @ts-ignore */
290
+ classes = computed(() => `w-full m-auto ${WIDTH_CLASSES[this.width()]} rounded-xl border border-(--border) bg-(--card) p-6 text-(--foreground) backdrop:bg-black/60`, /* @ts-ignore */
281
291
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
282
292
  #host = inject(ElementRef);
283
293
  constructor() {
@@ -298,8 +308,8 @@ class UiDialog {
298
308
  this.dismissed.emit();
299
309
  }
300
310
  }
301
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
302
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: UiDialog, isStandalone: true, selector: "ui-dialog", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dismissed: "dismissed" }, ngImport: i0, template: `
311
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
312
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: UiDialog, isStandalone: true, selector: "ui-dialog", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dismissed: "dismissed" }, ngImport: i0, template: `
303
313
  <dialog
304
314
  [attr.aria-describedby]="description() ? descriptionId : null"
305
315
  [attr.aria-labelledby]="headingId"
@@ -323,7 +333,7 @@ class UiDialog {
323
333
  </dialog>
324
334
  `, isInline: true });
325
335
  }
326
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiDialog, decorators: [{
336
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiDialog, decorators: [{
327
337
  type: Component,
328
338
  args: [{
329
339
  selector: 'ui-dialog',
@@ -361,9 +371,17 @@ const nextId = (() => {
361
371
  * Label, control, hint and error as one unit. The control stays a plain native element:
362
372
  * the field finds it in its own projected content and wires the ARIA attributes onto it.
363
373
  *
374
+ * The message comes from the caller's `error`, or, where none is set, from the projected control's
375
+ * own validation state once it is touched.
376
+ *
364
377
  * @example
365
378
  * <ui-field label="Quantity" hint="Leave empty if unknown">
366
- * <input uiInput type="number" />
379
+ * <input uiInput type="number" [formField]="form.quantity" />
380
+ * </ui-field>
381
+ *
382
+ * @example
383
+ * <ui-field label="ISIN or name" [error]="blank() ? 'Enter an ISIN' : undefined">
384
+ * <input uiInput type="search" />
367
385
  * </ui-field>
368
386
  */
369
387
  class UiField {
@@ -377,6 +395,24 @@ class UiField {
377
395
  hintId = `${this.#id}-hint`;
378
396
  errorId = `${this.#id}-error`;
379
397
  #host = inject(ElementRef);
398
+ control = contentChild(UI_CONTROL, /* @ts-ignore */
399
+ ...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
400
+ /**
401
+ * The caller's own `error` wins: it is the only way to report something the control does not
402
+ * know about, such as a search box refusing an empty query.
403
+ */
404
+ message = computed(() => {
405
+ const explicit = this.error();
406
+ if (explicit) {
407
+ return explicit;
408
+ }
409
+ const control = this.control();
410
+ if (!control?.touched()) {
411
+ return undefined;
412
+ }
413
+ return control.errors().find((error) => error.message)?.message;
414
+ }, /* @ts-ignore */
415
+ ...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
380
416
  constructor() {
381
417
  afterRenderEffect(() => {
382
418
  // querySelector, not viewChild.required, so the "no control found" guard below stays reachable and testable.
@@ -386,14 +422,14 @@ class UiField {
386
422
  }
387
423
  control.id ||= this.#id;
388
424
  this.#host.nativeElement.querySelector('label').htmlFor = control.id;
389
- const describedBy = [this.hint() ? this.hintId : null, this.error() ? this.errorId : null].filter(Boolean);
425
+ const describedBy = [this.hint() ? this.hintId : null, this.message() ? this.errorId : null].filter(Boolean);
390
426
  if (describedBy.length > 0) {
391
427
  control.setAttribute('aria-describedby', describedBy.join(' '));
392
428
  }
393
429
  else {
394
430
  control.removeAttribute('aria-describedby');
395
431
  }
396
- if (this.error()) {
432
+ if (this.message()) {
397
433
  control.setAttribute('aria-invalid', 'true');
398
434
  }
399
435
  else {
@@ -401,8 +437,8 @@ class UiField {
401
437
  }
402
438
  });
403
439
  }
404
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiField, deps: [], target: i0.ɵɵFactoryTarget.Component });
405
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: UiField, isStandalone: true, selector: "ui-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
440
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiField, deps: [], target: i0.ɵɵFactoryTarget.Component });
441
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: UiField, isStandalone: true, selector: "ui-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "control", first: true, predicate: UI_CONTROL, descendants: true, isSignal: true }], ngImport: i0, template: `
406
442
  <div class="flex flex-col gap-1.5">
407
443
  <!-- eslint-disable-next-line @angular-eslint/template/label-has-associated-control -- htmlFor is wired at runtime, once the projected control's id is known -->
408
444
  <label class="text-[13px] font-medium text-(--foreground)">{{ label() }}</label>
@@ -413,13 +449,15 @@ class UiField {
413
449
  <span class="text-[11.5px] text-(--subtle-foreground)" [id]="hintId">{{ hint() }}</span>
414
450
  }
415
451
 
416
- @if (error()) {
417
- <p class="text-[11.5px] text-(--negative)" role="alert" [id]="errorId">{{ error() }}</p>
418
- }
452
+ <div class="min-h-[1lh] text-[11.5px]">
453
+ @if (message()) {
454
+ <p class="text-(--negative)" role="alert" [id]="errorId">{{ message() }}</p>
455
+ }
456
+ </div>
419
457
  </div>
420
458
  `, isInline: true });
421
459
  }
422
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiField, decorators: [{
460
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiField, decorators: [{
423
461
  type: Component,
424
462
  args: [{
425
463
  selector: 'ui-field',
@@ -434,17 +472,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
434
472
  <span class="text-[11.5px] text-(--subtle-foreground)" [id]="hintId">{{ hint() }}</span>
435
473
  }
436
474
 
437
- @if (error()) {
438
- <p class="text-[11.5px] text-(--negative)" role="alert" [id]="errorId">{{ error() }}</p>
439
- }
475
+ <div class="min-h-[1lh] text-[11.5px]">
476
+ @if (message()) {
477
+ <p class="text-(--negative)" role="alert" [id]="errorId">{{ message() }}</p>
478
+ }
479
+ </div>
440
480
  </div>
441
481
  `,
442
482
  }]
443
- }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }] } });
483
+ }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], control: [{ type: i0.ContentChild, args: [i0.forwardRef(() => UI_CONTROL), { isSignal: true }] }] } });
444
484
 
445
485
  /** Available control sizes. `md` is the 44px touch target. */
446
486
  const CONTROL_SIZES = ['sm', 'md'];
447
- const CONTROL_BASE_CLASSES = 'w-full rounded-md border border-(--border) bg-transparent px-3 text-sm text-(--foreground) transition-colors placeholder:text-(--muted-foreground) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring) disabled:cursor-not-allowed disabled:opacity-50';
487
+ const CONTROL_BASE_CLASSES = 'w-full rounded-md border border-(--border) bg-transparent px-3 text-sm text-(--foreground) transition-colors placeholder:text-(--muted-foreground) enabled:hover:outline-2 enabled:hover:outline-offset-2 enabled:hover:outline-(--ring) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring) disabled:cursor-not-allowed disabled:opacity-50';
448
488
  const CONTROL_SIZE_CLASSES = {
449
489
  sm: 'h-9',
450
490
  md: 'h-11',
@@ -454,47 +494,63 @@ const CONTROL_SIZE_CLASSES = {
454
494
  * stays a plain <input>: every forms flavor (ngModel, reactive, signal forms)
455
495
  * and every native attribute keep working without any plumbing.
456
496
  *
497
+ * Declares the `errors` and `touched` inputs Angular's `[formField]` fills, so a `ui-field` around
498
+ * it can show the message without any binding here.
499
+ *
457
500
  * @example
458
501
  * <input uiInput type="email" placeholder="you@example.com" />
459
502
  */
460
503
  class UiInput {
461
504
  size = input('md', /* @ts-ignore */
462
505
  ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
506
+ errors = input([], /* @ts-ignore */
507
+ ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
508
+ touched = input(false, /* @ts-ignore */
509
+ ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
463
510
  classes = computed(() => `${CONTROL_BASE_CLASSES} ${CONTROL_SIZE_CLASSES[this.size()]}`, /* @ts-ignore */
464
511
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
465
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
466
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: UiInput, isStandalone: true, selector: "input[uiInput]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0 });
512
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
513
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.4", type: UiInput, isStandalone: true, selector: "input[uiInput]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, providers: [{ provide: UI_CONTROL, useExisting: forwardRef(() => UiInput) }], ngImport: i0 });
467
514
  }
468
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiInput, decorators: [{
515
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiInput, decorators: [{
469
516
  type: Directive,
470
517
  args: [{
471
518
  selector: 'input[uiInput]',
472
519
  host: {
473
520
  '[class]': 'classes()',
474
521
  },
522
+ providers: [{ provide: UI_CONTROL, useExisting: forwardRef(() => UiInput) }],
475
523
  }]
476
- }], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
524
+ }], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }] } });
477
525
  /**
478
526
  * Styled native textarea. Lives beside the input because it shares every one of its
479
527
  * classes; it takes no size, since a textarea grows from a floor instead of sitting
480
528
  * at a fixed height.
481
529
  *
530
+ * Declares the `errors` and `touched` inputs Angular's `[formField]` fills, so a `ui-field` around
531
+ * it can show the message without any binding here.
532
+ *
482
533
  * @example
483
534
  * <textarea uiTextarea maxlength="280"></textarea>
484
535
  */
485
536
  class UiTextarea {
486
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiTextarea, deps: [], target: i0.ɵɵFactoryTarget.Directive });
487
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: UiTextarea, isStandalone: true, selector: "textarea[uiTextarea]", host: { classAttribute: "w-full rounded-md border border-(--border) bg-transparent px-3 text-sm text-(--foreground) transition-colors placeholder:text-(--muted-foreground) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring) disabled:cursor-not-allowed disabled:opacity-50 min-h-24 py-2" }, ngImport: i0 });
537
+ errors = input([], /* @ts-ignore */
538
+ ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
539
+ touched = input(false, /* @ts-ignore */
540
+ ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
541
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiTextarea, deps: [], target: i0.ɵɵFactoryTarget.Directive });
542
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.4", type: UiTextarea, isStandalone: true, selector: "textarea[uiTextarea]", inputs: { errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "w-full rounded-md border border-(--border) bg-transparent px-3 text-sm text-(--foreground) transition-colors placeholder:text-(--muted-foreground) enabled:hover:outline-2 enabled:hover:outline-offset-2 enabled:hover:outline-(--ring) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring) disabled:cursor-not-allowed disabled:opacity-50 min-h-24 py-2" }, providers: [{ provide: UI_CONTROL, useExisting: forwardRef(() => UiTextarea) }], ngImport: i0 });
488
543
  }
489
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiTextarea, decorators: [{
544
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiTextarea, decorators: [{
490
545
  type: Directive,
491
546
  args: [{
492
547
  selector: 'textarea[uiTextarea]',
493
548
  host: {
494
549
  class: `${CONTROL_BASE_CLASSES} min-h-24 py-2`,
495
550
  },
551
+ providers: [{ provide: UI_CONTROL, useExisting: forwardRef(() => UiTextarea) }],
496
552
  }]
497
- }] });
553
+ }], propDecorators: { errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }] } });
498
554
 
499
555
  /** Ramp step used to paint the fill. `MeterTone` is derived from this tuple. */
500
556
  const METER_TONES = [1, 2, 3, 4, 5, 6];
@@ -526,8 +582,8 @@ class UiMeter {
526
582
  ...(ngDevMode ? [{ debugName: "percent" }] : /* istanbul ignore next */ []));
527
583
  fillClasses = computed(() => `h-full rounded-sm ${TONE_CLASSES[this.tone()]}`, /* @ts-ignore */
528
584
  ...(ngDevMode ? [{ debugName: "fillClasses" }] : /* istanbul ignore next */ []));
529
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiMeter, deps: [], target: i0.ɵɵFactoryTarget.Component });
530
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: UiMeter, isStandalone: true, selector: "ui-meter", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, valueText: { classPropertyName: "valueText", publicName: "valueText", isSignal: true, isRequired: true, transformFunction: null }, tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
585
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiMeter, deps: [], target: i0.ɵɵFactoryTarget.Component });
586
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: UiMeter, isStandalone: true, selector: "ui-meter", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, valueText: { classPropertyName: "valueText", publicName: "valueText", isSignal: true, isRequired: true, transformFunction: null }, tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
531
587
  <div
532
588
  class="h-2.5 w-full overflow-hidden rounded-sm bg-(--elevated)"
533
589
  role="meter"
@@ -541,7 +597,7 @@ class UiMeter {
541
597
  </div>
542
598
  `, isInline: true });
543
599
  }
544
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiMeter, decorators: [{
600
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiMeter, decorators: [{
545
601
  type: Component,
546
602
  args: [{
547
603
  selector: 'ui-meter',
@@ -603,8 +659,8 @@ class UiSegmented {
603
659
  this.value.set(next.value);
604
660
  this.radios()[nextIndex]?.nativeElement.focus();
605
661
  }
606
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiSegmented, deps: [], target: i0.ɵɵFactoryTarget.Component });
607
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: UiSegmented, isStandalone: true, selector: "ui-segmented", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { value: "valueChange" }, viewQueries: [{ propertyName: "radios", predicate: ["radio"], descendants: true, isSignal: true }], ngImport: i0, template: `
662
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiSegmented, deps: [], target: i0.ɵɵFactoryTarget.Component });
663
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: UiSegmented, isStandalone: true, selector: "ui-segmented", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { value: "valueChange" }, viewQueries: [{ propertyName: "radios", predicate: ["radio"], descendants: true, isSignal: true }], ngImport: i0, template: `
608
664
  <div class="flex gap-1" role="radiogroup" [attr.aria-label]="label()">
609
665
  @for (option of options(); track option.value) {
610
666
  <button
@@ -623,7 +679,7 @@ class UiSegmented {
623
679
  </div>
624
680
  `, isInline: true });
625
681
  }
626
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiSegmented, decorators: [{
682
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiSegmented, decorators: [{
627
683
  type: Component,
628
684
  args: [{
629
685
  selector: 'ui-segmented',
@@ -648,10 +704,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
648
704
  }]
649
705
  }], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }, { type: i0.Output, args: ["valueChange"] }], radios: [{ type: i0.ViewChildren, args: ['radio', { isSignal: true }] }] } });
650
706
 
651
- const SELECT_CLASSES = 'bg-(--elevated) pr-8';
707
+ const SELECT_CLASSES = 'cursor-pointer pr-8';
708
+ // Spelled out prefix included: Tailwind scans for literal strings, so a prefix applied in code
709
+ // emits nothing. Dropping `supports` leaves Firefox the padding of a chevron it does not lay out.
710
+ const PICKER_CLASSES = [
711
+ 'pointer-fine:supports-[appearance:base-select]:[appearance:base-select]',
712
+ 'pointer-fine:supports-[appearance:base-select]:items-center',
713
+ 'pointer-fine:supports-[appearance:base-select]:pr-3',
714
+ 'pointer-fine:supports-[appearance:base-select]:[&_option]:cursor-pointer',
715
+ 'pointer-fine:supports-[appearance:base-select]:[&_option]:rounded-md',
716
+ 'pointer-fine:supports-[appearance:base-select]:[&_option]:px-2.5',
717
+ 'pointer-fine:supports-[appearance:base-select]:[&_option]:py-2',
718
+ 'pointer-fine:supports-[appearance:base-select]:[&_option:hover]:bg-(--soft)',
719
+ 'pointer-fine:supports-[appearance:base-select]:[&_option:focus]:bg-(--soft)',
720
+ 'pointer-fine:supports-[appearance:base-select]:[&_option:checked]:font-medium',
721
+ '[&::picker-icon]:text-[11px]',
722
+ '[&::picker-icon]:text-(--muted-foreground)',
723
+ '[&::picker(select)]:[appearance:base-select]',
724
+ '[&::picker(select)]:my-1.5',
725
+ '[&::picker(select)]:rounded-lg',
726
+ '[&::picker(select)]:border',
727
+ '[&::picker(select)]:border-(--border)',
728
+ '[&::picker(select)]:bg-(--card)',
729
+ '[&::picker(select)]:[position-try-fallbacks:none]',
730
+ '[&::picker(select)]:overflow-y-auto',
731
+ '[&::picker(select)]:p-1',
732
+ '[&::picker(select)]:text-(--card-foreground)',
733
+ ].join(' ');
652
734
  /**
653
- * Styled native select. Deliberately keeps the platform's own chevron and picker:
654
- * they are what makes the control usable on a phone.
735
+ * Styled native select, drop-down list included where the browser allows it. It stays a native
736
+ * `<select>`: keyboard, typeahead and semantics come from the platform, not from a rebuilt listbox.
737
+ *
738
+ * Declares the `errors` and `touched` inputs Angular's `[formField]` fills, so a `ui-field` around
739
+ * it can show the message without any binding here.
655
740
  *
656
741
  * @example
657
742
  * <select uiSelect><option value="pea">PEA</option></select>
@@ -659,20 +744,25 @@ const SELECT_CLASSES = 'bg-(--elevated) pr-8';
659
744
  class UiSelect {
660
745
  size = input('md', /* @ts-ignore */
661
746
  ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
662
- classes = computed(() => `${CONTROL_BASE_CLASSES} ${SELECT_CLASSES} ${CONTROL_SIZE_CLASSES[this.size()]}`, /* @ts-ignore */
747
+ errors = input([], /* @ts-ignore */
748
+ ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
749
+ touched = input(false, /* @ts-ignore */
750
+ ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
751
+ classes = computed(() => `${CONTROL_BASE_CLASSES} ${SELECT_CLASSES} ${PICKER_CLASSES} ${CONTROL_SIZE_CLASSES[this.size()]}`, /* @ts-ignore */
663
752
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
664
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiSelect, deps: [], target: i0.ɵɵFactoryTarget.Directive });
665
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: UiSelect, isStandalone: true, selector: "select[uiSelect]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0 });
753
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiSelect, deps: [], target: i0.ɵɵFactoryTarget.Directive });
754
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.4", type: UiSelect, isStandalone: true, selector: "select[uiSelect]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, providers: [{ provide: UI_CONTROL, useExisting: forwardRef(() => UiSelect) }], ngImport: i0 });
666
755
  }
667
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiSelect, decorators: [{
756
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiSelect, decorators: [{
668
757
  type: Directive,
669
758
  args: [{
670
759
  selector: 'select[uiSelect]',
671
760
  host: {
672
761
  '[class]': 'classes()',
673
762
  },
763
+ providers: [{ provide: UI_CONTROL, useExisting: forwardRef(() => UiSelect) }],
674
764
  }]
675
- }], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
765
+ }], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }] } });
676
766
 
677
767
  const LAST_LINE_WIDTH = '62%';
678
768
  /**
@@ -693,8 +783,8 @@ class UiSkeleton {
693
783
  return Array.from({ length: count }, (_, index) => (index === count - 1 && count > 1 ? LAST_LINE_WIDTH : '100%'));
694
784
  }, /* @ts-ignore */
695
785
  ...(ngDevMode ? [{ debugName: "bars" }] : /* istanbul ignore next */ []));
696
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiSkeleton, deps: [], target: i0.ɵɵFactoryTarget.Component });
697
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: UiSkeleton, isStandalone: true, selector: "ui-skeleton", inputs: { lines: { classPropertyName: "lines", publicName: "lines", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-hidden": "true" }, classAttribute: "flex flex-col gap-2" }, ngImport: i0, template: `
786
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiSkeleton, deps: [], target: i0.ɵɵFactoryTarget.Component });
787
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: UiSkeleton, isStandalone: true, selector: "ui-skeleton", inputs: { lines: { classPropertyName: "lines", publicName: "lines", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-hidden": "true" }, classAttribute: "flex flex-col gap-2" }, ngImport: i0, template: `
698
788
  @for (line of bars(); track $index) {
699
789
  <span
700
790
  class="block rounded bg-(--soft) motion-safe:animate-pulse"
@@ -704,7 +794,7 @@ class UiSkeleton {
704
794
  }
705
795
  `, isInline: true });
706
796
  }
707
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiSkeleton, decorators: [{
797
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiSkeleton, decorators: [{
708
798
  type: Component,
709
799
  args: [{
710
800
  selector: 'ui-skeleton',
@@ -736,10 +826,10 @@ const NUMERIC_CLASSES = 'text-right tabular-nums';
736
826
  const TEXTUAL_CLASSES = 'text-left';
737
827
  /** Styled native table. The rows and cells stay plain <tr> and <td>. */
738
828
  class UiTable {
739
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiTable, deps: [], target: i0.ɵɵFactoryTarget.Directive });
740
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: UiTable, isStandalone: true, selector: "table[uiTable]", host: { classAttribute: "w-full border-collapse" }, ngImport: i0 });
829
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiTable, deps: [], target: i0.ɵɵFactoryTarget.Directive });
830
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.4", type: UiTable, isStandalone: true, selector: "table[uiTable]", host: { classAttribute: "w-full border-collapse" }, ngImport: i0 });
741
831
  }
742
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiTable, decorators: [{
832
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiTable, decorators: [{
743
833
  type: Directive,
744
834
  args: [{
745
835
  selector: 'table[uiTable]',
@@ -762,10 +852,10 @@ class UiTh {
762
852
  ...(ngDevMode ? [{ debugName: "from" }] : /* istanbul ignore next */ []));
763
853
  classes = computed(() => cellClasses(TH_CLASSES, this.numeric(), this.from()), /* @ts-ignore */
764
854
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
765
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiTh, deps: [], target: i0.ɵɵFactoryTarget.Directive });
766
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: UiTh, isStandalone: true, selector: "th[uiTh]", inputs: { numeric: { classPropertyName: "numeric", publicName: "numeric", isSignal: true, isRequired: false, transformFunction: null }, from: { classPropertyName: "from", publicName: "from", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0 });
855
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiTh, deps: [], target: i0.ɵɵFactoryTarget.Directive });
856
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.4", type: UiTh, isStandalone: true, selector: "th[uiTh]", inputs: { numeric: { classPropertyName: "numeric", publicName: "numeric", isSignal: true, isRequired: false, transformFunction: null }, from: { classPropertyName: "from", publicName: "from", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0 });
767
857
  }
768
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiTh, decorators: [{
858
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiTh, decorators: [{
769
859
  type: Directive,
770
860
  args: [{
771
861
  selector: 'th[uiTh]',
@@ -781,10 +871,10 @@ class UiTd {
781
871
  ...(ngDevMode ? [{ debugName: "from" }] : /* istanbul ignore next */ []));
782
872
  classes = computed(() => cellClasses(TD_CLASSES, this.numeric(), this.from()), /* @ts-ignore */
783
873
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
784
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiTd, deps: [], target: i0.ɵɵFactoryTarget.Directive });
785
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: UiTd, isStandalone: true, selector: "td[uiTd]", inputs: { numeric: { classPropertyName: "numeric", publicName: "numeric", isSignal: true, isRequired: false, transformFunction: null }, from: { classPropertyName: "from", publicName: "from", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0 });
874
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiTd, deps: [], target: i0.ɵɵFactoryTarget.Directive });
875
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.4", type: UiTd, isStandalone: true, selector: "td[uiTd]", inputs: { numeric: { classPropertyName: "numeric", publicName: "numeric", isSignal: true, isRequired: false, transformFunction: null }, from: { classPropertyName: "from", publicName: "from", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0 });
786
876
  }
787
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UiTd, decorators: [{
877
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: UiTd, decorators: [{
788
878
  type: Directive,
789
879
  args: [{
790
880
  selector: 'td[uiTd]',
@@ -1 +1 @@
1
- {"version":3,"file":"joanroucoux-cairn-ui.mjs","sources":["../../../projects/ui/src/lib/avatar/avatar.ts","../../../projects/ui/src/lib/badge/badge.ts","../../../projects/ui/src/lib/button/button.ts","../../../projects/ui/src/lib/card/card.ts","../../../projects/ui/src/lib/delta/delta.ts","../../../projects/ui/src/lib/dialog/dialog.ts","../../../projects/ui/src/lib/field/field.ts","../../../projects/ui/src/lib/input/input.ts","../../../projects/ui/src/lib/meter/meter.ts","../../../projects/ui/src/lib/segmented/segmented.ts","../../../projects/ui/src/lib/select/select.ts","../../../projects/ui/src/lib/skeleton/skeleton.ts","../../../projects/ui/src/lib/table/table.ts","../../../projects/ui/src/public-api.ts","../../../projects/ui/src/joanroucoux-cairn-ui.ts"],"sourcesContent":["import { Component, computed, input } from '@angular/core';\n\n/** Available avatar sizes. `AvatarSize` is derived from this tuple. */\nexport const AVATAR_SIZES = ['sm', 'md'] as const;\nexport type AvatarSize = (typeof AVATAR_SIZES)[number];\n\nconst BASE_CLASSES =\n 'inline-flex items-center justify-center rounded-full border border-(--primary) bg-(--soft) font-semibold tabular-nums text-(--primary)';\n\nconst SIZE_CLASSES: Record<AvatarSize, string> = {\n sm: 'size-8 text-xs',\n md: 'size-11 text-sm',\n};\n\n/**\n * Initials in a disc, standing in for a person. Single-user application: there is exactly one.\n *\n * @example\n * <ui-avatar initials=\"JR\" label=\"My account\" />\n */\n@Component({\n selector: 'ui-avatar',\n template: '<span aria-hidden=\"true\">{{ initials() }}</span>',\n host: {\n role: 'img',\n '[attr.aria-label]': 'label()',\n '[class]': 'classes()',\n },\n})\nexport class UiAvatar {\n readonly initials = input.required<string>();\n readonly label = input.required<string>();\n readonly size = input<AvatarSize>('md');\n\n protected readonly classes = computed(() => `${BASE_CLASSES} ${SIZE_CLASSES[this.size()]}`);\n}\n","import { Component, computed, input } from '@angular/core';\n\n/** Available badge variants. `BadgeVariant` is derived from this tuple. */\nexport const BADGE_VARIANTS = ['primary', 'secondary', 'destructive', 'outline'] as const;\nexport type BadgeVariant = (typeof BADGE_VARIANTS)[number];\n\nconst BASE_CLASSES = 'inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium';\n\nconst VARIANT_CLASSES: Record<BadgeVariant, string> = {\n primary: 'bg-(--primary) text-(--primary-foreground)',\n secondary: 'bg-(--secondary) text-(--secondary-foreground)',\n destructive: 'bg-(--destructive) text-(--destructive-foreground)',\n outline: 'border border-(--border) text-(--foreground)',\n};\n\n/**\n * Small status descriptor for counts, states or labels.\n *\n * @example\n * <ui-badge variant=\"secondary\">Draft</ui-badge>\n */\n@Component({\n selector: 'ui-badge',\n template: '<ng-content />',\n host: {\n '[class]': 'classes()',\n },\n})\nexport class UiBadge {\n readonly variant = input<BadgeVariant>('primary');\n\n protected readonly classes = computed(() => `${BASE_CLASSES} ${VARIANT_CLASSES[this.variant()]}`);\n}\n","import { Component, computed, input } from '@angular/core';\n\n/** Available button variants. `ButtonVariant` is derived from this tuple. */\nexport const BUTTON_VARIANTS = ['primary', 'secondary', 'outline', 'destructive', 'ghost'] as const;\nexport type ButtonVariant = (typeof BUTTON_VARIANTS)[number];\n\n/** Available button sizes. `md` is the 44px touch target Cairn asks for everywhere. */\nexport const BUTTON_SIZES = ['sm', 'md', 'lg'] as const;\nexport type ButtonSize = (typeof BUTTON_SIZES)[number];\n\nconst BASE_CLASSES =\n // Tailwind's preflight sets buttons to cursor: default (matching the native element) since v3.4:\n // cursor-pointer restores the hand cursor consumers expect from a clickable control.\n 'inline-flex items-center justify-center gap-2 rounded-md font-medium transition-colors cursor-pointer focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring) disabled:pointer-events-none disabled:opacity-50';\n\nconst VARIANT_CLASSES: Record<ButtonVariant, string> = {\n primary:\n 'bg-(--primary) bg-linear-135 from-(--primary) to-(--primary-to) text-(--primary-foreground) hover:opacity-90',\n secondary: 'bg-(--secondary) text-(--secondary-foreground) hover:bg-(--secondary)/80',\n outline: 'border border-(--border) bg-transparent hover:bg-(--soft)',\n destructive: 'bg-(--destructive) text-(--destructive-foreground) hover:bg-(--destructive)/90',\n ghost: 'hover:bg-(--accent) hover:text-(--accent-foreground)',\n};\n\nconst SIZE_CLASSES: Record<ButtonSize, string> = {\n sm: 'h-9 px-3 text-[13px]',\n md: 'h-11 px-4 text-sm',\n lg: 'h-12 px-6 text-base',\n};\n\n/**\n * Styled native button. Applied as an attribute so the host keeps every native\n * button behavior (type, disabled, form submission, accessibility) for free.\n *\n * Also applies to an anchor, for the one case where the action really is a navigation:\n * a download the browser has to perform itself. The element stays a link, and so does\n * its role - never use this to make an ordinary link look like a form control.\n *\n * @example\n * <button ui-button variant=\"destructive\" size=\"sm\">Delete</button>\n * <a ui-button variant=\"outline\" href=\"/api/holdings/export\" download>Export</a>\n */\n@Component({\n selector: 'button[ui-button], a[ui-button]',\n template: '<ng-content />',\n host: {\n '[class]': 'classes()',\n },\n})\nexport class UiButton {\n readonly variant = input<ButtonVariant>('primary');\n readonly size = input<ButtonSize>('md');\n\n protected readonly classes = computed(\n () => `${BASE_CLASSES} ${VARIANT_CLASSES[this.variant()]} ${SIZE_CLASSES[this.size()]}`,\n );\n}\n","import { Component, computed, input } from '@angular/core';\n\n/** Available card variants. `CardVariant` is derived from this tuple. */\nexport const CARD_VARIANTS = ['default', 'elevated'] as const;\nexport type CardVariant = (typeof CARD_VARIANTS)[number];\n\n/** Available card paddings. `CardPadding` is derived from this tuple. */\nexport const CARD_PADDINGS = ['none', 'sm', 'md'] as const;\nexport type CardPadding = (typeof CARD_PADDINGS)[number];\n\nconst BASE_CLASSES = 'block rounded-xl border';\n\nconst VARIANT_CLASSES: Record<CardVariant, string> = {\n default: 'bg-(--card) border-(--border) text-(--card-foreground)',\n elevated: 'bg-(--elevated) border-(--hairline) text-(--foreground)',\n};\n\nconst PADDING_CLASSES: Record<CardPadding, string> = {\n none: 'p-0',\n sm: 'p-3',\n md: 'p-5',\n};\n\n/**\n * Surface that groups related content: a summary block, a table, a side panel.\n *\n * @example\n * <ui-card variant=\"elevated\" padding=\"sm\">Total</ui-card>\n */\n@Component({\n selector: 'ui-card',\n template: '<ng-content />',\n host: {\n '[class]': 'classes()',\n },\n})\nexport class UiCard {\n readonly variant = input<CardVariant>('default');\n readonly padding = input<CardPadding>('md');\n\n protected readonly classes = computed(\n () => `${BASE_CLASSES} ${VARIANT_CLASSES[this.variant()]} ${PADDING_CLASSES[this.padding()]}`,\n );\n}\n","import { Component, computed, input } from '@angular/core';\n\n/** Available delta emphases. `DeltaEmphasis` is derived from this tuple. */\nexport const DELTA_EMPHASES = ['text', 'pill'] as const;\nexport type DeltaEmphasis = (typeof DELTA_EMPHASES)[number];\n\nconst BASE_CLASSES = 'inline-flex items-center gap-1 font-semibold tabular-nums';\n\nconst PILL_CLASSES = 'rounded-md px-2.5 py-1';\n\ntype Sign = 'positive' | 'negative' | 'neutral' | 'unknown';\n\nconst TEXT_CLASSES: Record<Sign, string> = {\n positive: 'text-(--positive)',\n negative: 'text-(--negative)',\n neutral: 'text-(--muted-foreground)',\n unknown: 'text-(--subtle-foreground)',\n};\n\nconst PILL_BACKGROUND_CLASS = 'bg-(--muted)';\n\n/**\n * Signed amount whose sign carries meaning: a gain, a loss, or an unknown.\n *\n * A null value is not a zero: a holding with no cost basis exists, and showing 0 would falsely\n * claim a known gain of zero. Color never carries the sign on its own: the projected text must\n * already contain a + or a minus sign.\n *\n * @example\n * <ui-delta [value]=\"holding.dayChangeEur\" unknownLabel=\"Not available\">\n * {{ holding.dayChangeEur | signedMoney }}\n * </ui-delta>\n */\n@Component({\n selector: 'ui-delta',\n template: `\n @if (sign() === 'unknown') {\n <span aria-hidden=\"true\">&mdash;</span>\n <span class=\"sr-only\">{{ unknownLabel() }}</span>\n } @else {\n <ng-content />\n }\n `,\n host: {\n '[class]': 'classes()',\n },\n})\nexport class UiDelta {\n readonly value = input.required<number | null | undefined>();\n readonly unknownLabel = input.required<string>();\n readonly emphasis = input<DeltaEmphasis>('text');\n\n protected readonly sign = computed<Sign>(() => {\n const value = this.value();\n\n if (value === null || value === undefined) {\n return 'unknown';\n }\n if (value > 0) {\n return 'positive';\n }\n if (value < 0) {\n return 'negative';\n }\n return 'neutral';\n });\n\n protected readonly classes = computed(() => {\n const sign = this.sign();\n const background = this.emphasis() === 'pill' ? `${PILL_CLASSES} ${PILL_BACKGROUND_CLASS}` : 'bg-transparent';\n\n return `${BASE_CLASSES} ${TEXT_CLASSES[sign]} ${background}`;\n });\n}\n","import { Component, ElementRef, computed, effect, inject, input, output } from '@angular/core';\n\n/** Available dialog widths. `DialogWidth` is derived from this tuple. */\nexport const DIALOG_WIDTHS = ['md', 'lg'] as const;\nexport type DialogWidth = (typeof DIALOG_WIDTHS)[number];\n\nconst WIDTH_CLASSES: Record<DialogWidth, string> = {\n md: 'max-w-md',\n lg: 'max-w-lg',\n};\n\nconst nextId = (() => {\n let count = 0;\n\n return () => `ui-dialog-${++count}`;\n})();\n\n/**\n * Modal dialog on the native <dialog>: focus trap, focus return, Escape and the top layer\n * come from the platform. Two projection slots - the body, and [dialogActions] for the footer.\n *\n * @example\n * <ui-dialog heading=\"Delete this holding?\" [open]=\"confirming()\" (dismissed)=\"confirming.set(false)\">\n * <p>This cannot be undone.</p>\n * <button dialogActions ui-button variant=\"outline\" (click)=\"confirming.set(false)\">Cancel</button>\n * </ui-dialog>\n */\n@Component({\n selector: 'ui-dialog',\n template: `\n <dialog\n [attr.aria-describedby]=\"description() ? descriptionId : null\"\n [attr.aria-labelledby]=\"headingId\"\n [class]=\"classes()\"\n (close)=\"onNativeClose()\"\n >\n <h2 class=\"text-lg font-semibold tracking-tight\" [id]=\"headingId\">{{ heading() }}</h2>\n\n @if (description()) {\n <p class=\"mt-2 text-sm text-(--muted-foreground)\" [id]=\"descriptionId\">{{ description() }}</p>\n }\n\n <!-- empty:hidden keeps a body-less dialog from carrying the body's top margin. -->\n <div class=\"mt-4 flex flex-col gap-4 empty:hidden\">\n <ng-content />\n </div>\n\n <div class=\"mt-6 flex justify-end gap-3\">\n <ng-content select=\"[dialogActions]\" />\n </div>\n </dialog>\n `,\n})\nexport class UiDialog {\n readonly heading = input.required<string>();\n readonly description = input<string>();\n readonly width = input<DialogWidth>('lg');\n readonly open = input(false);\n readonly dismissed = output<void>();\n\n protected readonly headingId = nextId();\n protected readonly descriptionId = `${this.headingId}-description`;\n\n protected readonly classes = computed(\n () =>\n `w-full ${WIDTH_CLASSES[this.width()]} rounded-xl border border-(--border) bg-(--card) p-6 text-(--foreground) backdrop:bg-black/60`,\n );\n\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n constructor() {\n effect(() => {\n // viewChild.required can't target a #private field (NG1053); safe because the template has exactly one <dialog>.\n const dialog = this.#host.nativeElement.querySelector('dialog') as HTMLDialogElement;\n\n if (this.open() && !dialog.open) {\n dialog.showModal();\n } else if (!this.open() && dialog.open) {\n dialog.close();\n }\n });\n }\n\n protected onNativeClose(): void {\n // The owner already knows about a close it asked for; only a close it did not ask for is news.\n if (this.open()) {\n this.dismissed.emit();\n }\n }\n}\n","import { Component, ElementRef, afterRenderEffect, inject, input } from '@angular/core';\n\nconst nextId = (() => {\n let count = 0;\n\n return (): string => `ui-field-${++count}`;\n})();\n\n/**\n * Label, control, hint and error as one unit. The control stays a plain native element:\n * the field finds it in its own projected content and wires the ARIA attributes onto it.\n *\n * @example\n * <ui-field label=\"Quantity\" hint=\"Leave empty if unknown\">\n * <input uiInput type=\"number\" />\n * </ui-field>\n */\n@Component({\n selector: 'ui-field',\n template: `\n <div class=\"flex flex-col gap-1.5\">\n <!-- eslint-disable-next-line @angular-eslint/template/label-has-associated-control -- htmlFor is wired at runtime, once the projected control's id is known -->\n <label class=\"text-[13px] font-medium text-(--foreground)\">{{ label() }}</label>\n\n <ng-content />\n\n @if (hint()) {\n <span class=\"text-[11.5px] text-(--subtle-foreground)\" [id]=\"hintId\">{{ hint() }}</span>\n }\n\n @if (error()) {\n <p class=\"text-[11.5px] text-(--negative)\" role=\"alert\" [id]=\"errorId\">{{ error() }}</p>\n }\n </div>\n `,\n})\nexport class UiField {\n readonly label = input.required<string>();\n readonly hint = input<string>();\n readonly error = input<string>();\n\n readonly #id = nextId();\n protected readonly hintId = `${this.#id}-hint`;\n protected readonly errorId = `${this.#id}-error`;\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n constructor() {\n afterRenderEffect(() => {\n // querySelector, not viewChild.required, so the \"no control found\" guard below stays reachable and testable.\n const control = this.#host.nativeElement.querySelector<HTMLElement>('input, select, textarea');\n\n if (!control) {\n return;\n }\n\n control.id ||= this.#id;\n this.#host.nativeElement.querySelector('label')!.htmlFor = control.id;\n\n const describedBy = [this.hint() ? this.hintId : null, this.error() ? this.errorId : null].filter(Boolean);\n\n if (describedBy.length > 0) {\n control.setAttribute('aria-describedby', describedBy.join(' '));\n } else {\n control.removeAttribute('aria-describedby');\n }\n\n if (this.error()) {\n control.setAttribute('aria-invalid', 'true');\n } else {\n control.removeAttribute('aria-invalid');\n }\n });\n }\n}\n","import { Directive, computed, input } from '@angular/core';\n\n/** Available control sizes. `md` is the 44px touch target. */\nexport const CONTROL_SIZES = ['sm', 'md'] as const;\nexport type ControlSize = (typeof CONTROL_SIZES)[number];\n\nexport const CONTROL_BASE_CLASSES =\n 'w-full rounded-md border border-(--border) bg-transparent px-3 text-sm text-(--foreground) transition-colors placeholder:text-(--muted-foreground) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring) disabled:cursor-not-allowed disabled:opacity-50';\n\nexport const CONTROL_SIZE_CLASSES: Record<ControlSize, string> = {\n sm: 'h-9',\n md: 'h-11',\n};\n\n/**\n * Styled native text input. A directive (not a wrapper component) so the host\n * stays a plain <input>: every forms flavor (ngModel, reactive, signal forms)\n * and every native attribute keep working without any plumbing.\n *\n * @example\n * <input uiInput type=\"email\" placeholder=\"you@example.com\" />\n */\n@Directive({\n selector: 'input[uiInput]',\n host: {\n '[class]': 'classes()',\n },\n})\nexport class UiInput {\n readonly size = input<ControlSize>('md');\n\n protected readonly classes = computed(() => `${CONTROL_BASE_CLASSES} ${CONTROL_SIZE_CLASSES[this.size()]}`);\n}\n\n/**\n * Styled native textarea. Lives beside the input because it shares every one of its\n * classes; it takes no size, since a textarea grows from a floor instead of sitting\n * at a fixed height.\n *\n * @example\n * <textarea uiTextarea maxlength=\"280\"></textarea>\n */\n@Directive({\n selector: 'textarea[uiTextarea]',\n host: {\n class: `${CONTROL_BASE_CLASSES} min-h-24 py-2`,\n },\n})\nexport class UiTextarea {}\n","import { Component, computed, input } from '@angular/core';\n\n/** Ramp step used to paint the fill. `MeterTone` is derived from this tuple. */\nexport const METER_TONES = [1, 2, 3, 4, 5, 6] as const;\nexport type MeterTone = (typeof METER_TONES)[number];\n\nconst TONE_CLASSES: Record<MeterTone, string> = {\n 1: 'bg-(--ramp-1)',\n 2: 'bg-(--ramp-2)',\n 3: 'bg-(--ramp-3)',\n 4: 'bg-(--ramp-4)',\n 5: 'bg-(--ramp-5)',\n 6: 'bg-(--ramp-6)',\n};\n\n/**\n * Proportion of a whole, drawn as a single bar. One bar per category, never a stacked\n * strip: without hue to separate segments, length has to do the work alone.\n *\n * @example\n * <ui-meter [value]=\"0.463\" label=\"Funds\" valueText=\"46.3% - 128,656.00 EUR\" [tone]=\"1\" />\n */\n@Component({\n selector: 'ui-meter',\n template: `\n <div\n class=\"h-2.5 w-full overflow-hidden rounded-sm bg-(--elevated)\"\n role=\"meter\"\n [attr.aria-label]=\"label()\"\n [attr.aria-valuemax]=\"1\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuenow]=\"value()\"\n [attr.aria-valuetext]=\"valueText()\"\n >\n <div data-testid=\"meter-fill\" [class]=\"fillClasses()\" [style.width.%]=\"percent()\"></div>\n </div>\n `,\n})\nexport class UiMeter {\n readonly value = input.required<number>();\n readonly label = input.required<string>();\n readonly valueText = input.required<string>();\n readonly tone = input<MeterTone>(1);\n\n protected readonly percent = computed(() => Math.min(100, Math.max(0, this.value() * 100)));\n\n protected readonly fillClasses = computed(() => `h-full rounded-sm ${TONE_CLASSES[this.tone()]}`);\n}\n","import { Component, ElementRef, input, model, viewChildren } from '@angular/core';\n\nexport type SegmentedOption = {\n value: string;\n label: string;\n};\n\nconst OPTION_CLASSES =\n 'min-h-11 flex-1 cursor-pointer rounded-md px-3 text-xs font-medium transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring)';\n\nconst SELECTED_CLASSES = 'bg-(--primary) bg-linear-135 from-(--primary) to-(--primary-to) text-(--primary-foreground)';\n\nconst UNSELECTED_CLASSES = 'bg-(--elevated) text-(--muted-foreground) hover:text-(--foreground)';\n\n/**\n * Exclusive choice within a small, known set: a time range, a unit, a mode.\n *\n * @example\n * <ui-segmented [options]=\"ranges\" label=\"Time range\" [(value)]=\"range\" />\n */\n@Component({\n selector: 'ui-segmented',\n template: `\n <div class=\"flex gap-1\" role=\"radiogroup\" [attr.aria-label]=\"label()\">\n @for (option of options(); track option.value) {\n <button\n #radio\n role=\"radio\"\n type=\"button\"\n [attr.aria-checked]=\"option.value === value()\"\n [attr.tabindex]=\"tabIndexFor(option.value)\"\n [class]=\"optionClasses(option.value)\"\n (click)=\"select(option.value)\"\n (keydown)=\"onKeydown($event)\"\n >\n {{ option.label }}\n </button>\n }\n </div>\n `,\n})\nexport class UiSegmented {\n readonly options = input.required<SegmentedOption[]>();\n readonly label = input.required<string>();\n readonly value = model.required<string>();\n\n protected readonly radios = viewChildren<ElementRef<HTMLButtonElement>>('radio');\n\n protected optionClasses(optionValue: string): string {\n return `${OPTION_CLASSES} ${optionValue === this.value() ? SELECTED_CLASSES : UNSELECTED_CLASSES}`;\n }\n\n protected tabIndexFor(optionValue: string): number {\n const opts = this.options();\n const tabStopValue = opts.some((option) => option.value === this.value()) ? this.value() : opts[0]?.value;\n\n return optionValue === tabStopValue ? 0 : -1;\n }\n\n protected select(optionValue: string): void {\n this.value.set(optionValue);\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n const delta = { ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1 }[event.key];\n if (delta === undefined) {\n return;\n }\n event.preventDefault();\n\n const opts = this.options();\n const currentIndex = opts.findIndex((option) => option.value === this.value());\n const nextIndex = (currentIndex + delta + opts.length) % opts.length;\n const next = opts[nextIndex]!;\n\n this.value.set(next.value);\n this.radios()[nextIndex]?.nativeElement.focus();\n }\n}\n","import { Directive, computed, input } from '@angular/core';\n\nimport { CONTROL_BASE_CLASSES, CONTROL_SIZE_CLASSES, type ControlSize } from '../input/input';\n\nconst SELECT_CLASSES = 'bg-(--elevated) pr-8';\n\n/**\n * Styled native select. Deliberately keeps the platform's own chevron and picker:\n * they are what makes the control usable on a phone.\n *\n * @example\n * <select uiSelect><option value=\"pea\">PEA</option></select>\n */\n@Directive({\n selector: 'select[uiSelect]',\n host: {\n '[class]': 'classes()',\n },\n})\nexport class UiSelect {\n readonly size = input<ControlSize>('md');\n\n protected readonly classes = computed(\n () => `${CONTROL_BASE_CLASSES} ${SELECT_CLASSES} ${CONTROL_SIZE_CLASSES[this.size()]}`,\n );\n}\n","import { Component, computed, input } from '@angular/core';\n\nconst LAST_LINE_WIDTH = '62%';\n\n/**\n * Decorative placeholder for content that is still loading. Deliberately hidden from\n * assistive technology: the calling screen keeps its own role=\"status\" sentence.\n *\n * @example\n * <ui-skeleton [lines]=\"3\" />\n * <ui-skeleton [height]=\"196\" />\n */\n@Component({\n selector: 'ui-skeleton',\n template: `\n @for (line of bars(); track $index) {\n <span\n class=\"block rounded bg-(--soft) motion-safe:animate-pulse\"\n [style.height.px]=\"height()\"\n [style.width]=\"line\"\n ></span>\n }\n `,\n host: {\n 'aria-hidden': 'true',\n class: 'flex flex-col gap-2',\n },\n})\nexport class UiSkeleton {\n readonly lines = input(1);\n readonly height = input(12);\n\n protected readonly bars = computed(() => {\n const count = Math.max(1, this.lines());\n\n return Array.from({ length: count }, (_, index) => (index === count - 1 && count > 1 ? LAST_LINE_WIDTH : '100%'));\n });\n}\n","import { Directive, booleanAttribute, computed, input } from '@angular/core';\n\n/** Breakpoints a secondary column can be held back until. */\nexport const CELL_BREAKPOINTS = ['md', 'lg'] as const;\nexport type CellBreakpoint = (typeof CELL_BREAKPOINTS)[number];\n\nconst FROM_CLASSES: Record<CellBreakpoint, string> = {\n md: 'hidden md:table-cell',\n lg: 'hidden lg:table-cell',\n};\n\nconst TH_CLASSES =\n 'px-3 py-2 align-bottom text-[11px] font-medium uppercase tracking-[0.05em] text-(--subtle-foreground)';\nconst TD_CLASSES = 'border-t border-(--hairline) px-3 py-2.5 align-middle text-sm';\nconst NUMERIC_CLASSES = 'text-right tabular-nums';\nconst TEXTUAL_CLASSES = 'text-left';\n\n/** Styled native table. The rows and cells stay plain <tr> and <td>. */\n@Directive({\n selector: 'table[uiTable]',\n host: {\n class: 'w-full border-collapse',\n },\n})\nexport class UiTable {}\n\nconst cellClasses = (base: string, numeric: boolean, from: CellBreakpoint | null): string =>\n [base, numeric ? NUMERIC_CLASSES : TEXTUAL_CLASSES, from ? FROM_CLASSES[from] : ''].filter(Boolean).join(' ');\n\n/**\n * Column header. `numeric` right-aligns and lines the digits up; `from` holds a\n * secondary column back until the viewport is wide enough for it.\n *\n * @example\n * <th uiTh numeric from=\"md\">Prix de revient</th>\n */\n@Directive({\n selector: 'th[uiTh]',\n host: {\n '[class]': 'classes()',\n },\n})\nexport class UiTh {\n readonly numeric = input(false, { transform: booleanAttribute });\n readonly from = input<CellBreakpoint | null>(null);\n\n protected readonly classes = computed(() => cellClasses(TH_CLASSES, this.numeric(), this.from()));\n}\n\n/** Body cell. Same two inputs as `UiTh`, and they must be set on both to match. */\n@Directive({\n selector: 'td[uiTd]',\n host: {\n '[class]': 'classes()',\n },\n})\nexport class UiTd {\n readonly numeric = input(false, { transform: booleanAttribute });\n readonly from = input<CellBreakpoint | null>(null);\n\n protected readonly classes = computed(() => cellClasses(TD_CLASSES, this.numeric(), this.from()));\n}\n","/*\n * Public API surface of the ui library.\n */\n\nexport { AVATAR_SIZES, UiAvatar, type AvatarSize } from './lib/avatar/avatar';\nexport { BADGE_VARIANTS, UiBadge, type BadgeVariant } from './lib/badge/badge';\nexport { BUTTON_SIZES, BUTTON_VARIANTS, UiButton, type ButtonSize, type ButtonVariant } from './lib/button/button';\nexport { CARD_PADDINGS, CARD_VARIANTS, UiCard, type CardPadding, type CardVariant } from './lib/card/card';\nexport { DELTA_EMPHASES, UiDelta, type DeltaEmphasis } from './lib/delta/delta';\nexport { DIALOG_WIDTHS, UiDialog, type DialogWidth } from './lib/dialog/dialog';\nexport { UiField } from './lib/field/field';\nexport { CONTROL_SIZES, UiInput, UiTextarea, type ControlSize } from './lib/input/input';\nexport { METER_TONES, UiMeter, type MeterTone } from './lib/meter/meter';\nexport { UiSegmented, type SegmentedOption } from './lib/segmented/segmented';\nexport { UiSelect } from './lib/select/select';\nexport { UiSkeleton } from './lib/skeleton/skeleton';\nexport { CELL_BREAKPOINTS, UiTable, UiTd, UiTh, type CellBreakpoint } from './lib/table/table';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["BASE_CLASSES","SIZE_CLASSES","VARIANT_CLASSES","nextId"],"mappings":";;;AAEA;MACa,YAAY,GAAG,CAAC,IAAI,EAAE,IAAI;AAGvC,MAAMA,cAAY,GAChB,wIAAwI;AAE1I,MAAMC,cAAY,GAA+B;AAC/C,IAAA,EAAE,EAAE,gBAAgB;AACpB,IAAA,EAAE,EAAE,iBAAiB;CACtB;AAED;;;;;AAKG;MAUU,QAAQ,CAAA;IACV,QAAQ,GAAG,KAAK,CAAC,QAAQ;iFAAU;IACnC,KAAK,GAAG,KAAK,CAAC,QAAQ;8EAAU;IAChC,IAAI,GAAG,KAAK,CAAa,IAAI;6EAAC;AAEpB,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAA,EAAGD,cAAY,CAAA,CAAA,EAAIC,cAAY,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA,CAAE;gFAAC;uGALhF,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAR,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,QAAQ,0iBAPT,kDAAkD,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAOjD,QAAQ,EAAA,UAAA,EAAA,CAAA;kBATpB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,QAAQ,EAAE,kDA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AAS,EAAE,WAAW;AACvB,qBAAA;AACF,iBAAA;;;ACvDD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"joanroucoux-cairn-ui.mjs","sources":["../../../projects/ui/src/lib/avatar/avatar.ts","../../../projects/ui/src/lib/badge/badge.ts","../../../projects/ui/src/lib/button/button.ts","../../../projects/ui/src/lib/card/card.ts","../../../projects/ui/src/lib/control/control.ts","../../../projects/ui/src/lib/delta/delta.ts","../../../projects/ui/src/lib/dialog/dialog.ts","../../../projects/ui/src/lib/field/field.ts","../../../projects/ui/src/lib/input/input.ts","../../../projects/ui/src/lib/meter/meter.ts","../../../projects/ui/src/lib/segmented/segmented.ts","../../../projects/ui/src/lib/select/select.ts","../../../projects/ui/src/lib/skeleton/skeleton.ts","../../../projects/ui/src/lib/table/table.ts","../../../projects/ui/src/public-api.ts","../../../projects/ui/src/joanroucoux-cairn-ui.ts"],"sourcesContent":["import { Component, computed, input } from '@angular/core';\n\n/** Available avatar sizes. `AvatarSize` is derived from this tuple. */\nexport const AVATAR_SIZES = ['sm', 'md'] as const;\nexport type AvatarSize = (typeof AVATAR_SIZES)[number];\n\nconst BASE_CLASSES =\n 'inline-flex items-center justify-center rounded-full border border-(--primary) bg-(--soft) font-semibold tabular-nums text-(--primary)';\n\nconst SIZE_CLASSES: Record<AvatarSize, string> = {\n sm: 'size-8 text-xs',\n md: 'size-11 text-sm',\n};\n\n/**\n * Initials in a disc, standing in for a person. Single-user application: there is exactly one.\n *\n * @example\n * <ui-avatar initials=\"JR\" label=\"My account\" />\n */\n@Component({\n selector: 'ui-avatar',\n template: '<span aria-hidden=\"true\">{{ initials() }}</span>',\n host: {\n role: 'img',\n '[attr.aria-label]': 'label()',\n '[class]': 'classes()',\n },\n})\nexport class UiAvatar {\n readonly initials = input.required<string>();\n readonly label = input.required<string>();\n readonly size = input<AvatarSize>('md');\n\n protected readonly classes = computed(() => `${BASE_CLASSES} ${SIZE_CLASSES[this.size()]}`);\n}\n","import { Component, computed, input } from '@angular/core';\n\n/** Available badge variants. `BadgeVariant` is derived from this tuple. */\nexport const BADGE_VARIANTS = ['primary', 'secondary', 'destructive', 'outline'] as const;\nexport type BadgeVariant = (typeof BADGE_VARIANTS)[number];\n\nconst BASE_CLASSES = 'inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium';\n\nconst VARIANT_CLASSES: Record<BadgeVariant, string> = {\n primary: 'bg-(--primary) text-(--primary-foreground)',\n secondary: 'bg-(--secondary) text-(--secondary-foreground)',\n destructive: 'bg-(--destructive) text-(--destructive-foreground)',\n outline: 'border border-(--border) text-(--foreground)',\n};\n\n/**\n * Small status descriptor for counts, states or labels.\n *\n * @example\n * <ui-badge variant=\"secondary\">Draft</ui-badge>\n */\n@Component({\n selector: 'ui-badge',\n template: '<ng-content />',\n host: {\n '[class]': 'classes()',\n },\n})\nexport class UiBadge {\n readonly variant = input<BadgeVariant>('primary');\n\n protected readonly classes = computed(() => `${BASE_CLASSES} ${VARIANT_CLASSES[this.variant()]}`);\n}\n","import { Component, computed, input } from '@angular/core';\n\n/** Available button variants. `ButtonVariant` is derived from this tuple. */\nexport const BUTTON_VARIANTS = ['primary', 'secondary', 'outline', 'destructive', 'ghost'] as const;\nexport type ButtonVariant = (typeof BUTTON_VARIANTS)[number];\n\n/** Available button sizes. `md` is the 44px touch target Cairn asks for everywhere. */\nexport const BUTTON_SIZES = ['sm', 'md', 'lg'] as const;\nexport type ButtonSize = (typeof BUTTON_SIZES)[number];\n\nconst BASE_CLASSES =\n // Tailwind's preflight sets buttons to cursor: default (matching the native element) since v3.4:\n // cursor-pointer restores the hand cursor consumers expect from a clickable control.\n 'inline-flex items-center justify-center gap-2 rounded-md font-medium transition-colors cursor-pointer focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring) disabled:pointer-events-none disabled:opacity-50';\n\nconst VARIANT_CLASSES: Record<ButtonVariant, string> = {\n primary:\n 'bg-(--primary) bg-linear-135 from-(--primary) to-(--primary-to) text-(--primary-foreground) hover:opacity-90',\n secondary: 'bg-(--secondary) text-(--secondary-foreground) hover:bg-(--secondary)/80',\n outline: 'border border-(--border) bg-transparent hover:bg-(--soft)',\n destructive: 'bg-(--destructive) text-(--destructive-foreground) hover:bg-(--destructive)/90',\n ghost: 'hover:bg-(--accent) hover:text-(--accent-foreground)',\n};\n\nconst SIZE_CLASSES: Record<ButtonSize, string> = {\n sm: 'h-9 px-3 text-[13px]',\n md: 'h-11 px-4 text-sm',\n lg: 'h-12 px-6 text-base',\n};\n\n/**\n * Styled native button. Applied as an attribute so the host keeps every native\n * button behavior (type, disabled, form submission, accessibility) for free.\n *\n * Also applies to an anchor, for the one case where the action really is a navigation:\n * a download the browser has to perform itself. The element stays a link, and so does\n * its role - never use this to make an ordinary link look like a form control.\n *\n * @example\n * <button ui-button variant=\"destructive\" size=\"sm\">Delete</button>\n * <a ui-button variant=\"outline\" href=\"/api/holdings/export\" download>Export</a>\n */\n@Component({\n selector: 'button[ui-button], a[ui-button]',\n template: '<ng-content />',\n host: {\n '[class]': 'classes()',\n },\n})\nexport class UiButton {\n readonly variant = input<ButtonVariant>('primary');\n readonly size = input<ButtonSize>('md');\n\n protected readonly classes = computed(\n () => `${BASE_CLASSES} ${VARIANT_CLASSES[this.variant()]} ${SIZE_CLASSES[this.size()]}`,\n );\n}\n","import { Component, computed, input } from '@angular/core';\n\n/** Available card variants. `CardVariant` is derived from this tuple. */\nexport const CARD_VARIANTS = ['default', 'elevated'] as const;\nexport type CardVariant = (typeof CARD_VARIANTS)[number];\n\n/** Available card paddings. `CardPadding` is derived from this tuple. */\nexport const CARD_PADDINGS = ['none', 'sm', 'md'] as const;\nexport type CardPadding = (typeof CARD_PADDINGS)[number];\n\nconst BASE_CLASSES = 'block rounded-xl border';\n\nconst VARIANT_CLASSES: Record<CardVariant, string> = {\n default: 'bg-(--card) border-(--border) text-(--card-foreground)',\n elevated: 'bg-(--elevated) border-(--hairline) text-(--foreground)',\n};\n\nconst PADDING_CLASSES: Record<CardPadding, string> = {\n none: 'p-0',\n sm: 'p-3',\n md: 'p-5',\n};\n\n/**\n * Surface that groups related content: a summary block, a table, a side panel.\n *\n * @example\n * <ui-card variant=\"elevated\" padding=\"sm\">Total</ui-card>\n */\n@Component({\n selector: 'ui-card',\n template: '<ng-content />',\n host: {\n '[class]': 'classes()',\n },\n})\nexport class UiCard {\n readonly variant = input<CardVariant>('default');\n readonly padding = input<CardPadding>('md');\n\n protected readonly classes = computed(\n () => `${BASE_CLASSES} ${VARIANT_CLASSES[this.variant()]} ${PADDING_CLASSES[this.padding()]}`,\n );\n}\n","import { InjectionToken, type Signal } from '@angular/core';\n\n/**\n * The part of a validation error this library reads. Angular's own `ValidationError` satisfies it,\n * which is how a Signal Forms error reaches a field without this package depending on\n * `@angular/forms`.\n */\nexport type UiControlError = { readonly message?: string };\n\n/** What a styled control offers the field wrapped around it. */\nexport type UiControl = {\n readonly errors: Signal<readonly UiControlError[]>;\n readonly touched: Signal<boolean>;\n};\n\n/**\n * Resolves to the styled control projected into a field.\n *\n * Angular's `[formField]` directive fills any input named `errors` or `touched` on the directives\n * sitting on its host element, so a control declaring them receives its own validation state with\n * nothing written at the call site. This token is how the field finds whichever control was\n * projected into it.\n */\nexport const UI_CONTROL = new InjectionToken<UiControl>('UI_CONTROL');\n","import { Component, computed, input } from '@angular/core';\n\n/** Available delta emphases. `DeltaEmphasis` is derived from this tuple. */\nexport const DELTA_EMPHASES = ['text', 'pill'] as const;\nexport type DeltaEmphasis = (typeof DELTA_EMPHASES)[number];\n\nconst BASE_CLASSES = 'inline-flex items-center gap-1 font-semibold tabular-nums';\n\nconst PILL_CLASSES = 'rounded-md px-2.5 py-1';\n\ntype Sign = 'positive' | 'negative' | 'neutral' | 'unknown';\n\nconst TEXT_CLASSES: Record<Sign, string> = {\n positive: 'text-(--positive)',\n negative: 'text-(--negative)',\n neutral: 'text-(--muted-foreground)',\n unknown: 'text-(--subtle-foreground)',\n};\n\nconst PILL_BACKGROUND_CLASS = 'bg-(--muted)';\n\n/**\n * Signed amount whose sign carries meaning: a gain, a loss, or an unknown.\n *\n * A null value is not a zero: a holding with no cost basis exists, and showing 0 would falsely\n * claim a known gain of zero. Color never carries the sign on its own: the projected text must\n * already contain a + or a minus sign.\n *\n * @example\n * <ui-delta [value]=\"holding.dayChangeEur\" unknownLabel=\"Not available\">\n * {{ holding.dayChangeEur | signedMoney }}\n * </ui-delta>\n */\n@Component({\n selector: 'ui-delta',\n template: `\n @if (sign() === 'unknown') {\n <span aria-hidden=\"true\">&mdash;</span>\n <span class=\"sr-only\">{{ unknownLabel() }}</span>\n } @else {\n <ng-content />\n }\n `,\n host: {\n '[class]': 'classes()',\n },\n})\nexport class UiDelta {\n readonly value = input.required<number | null | undefined>();\n readonly unknownLabel = input.required<string>();\n readonly emphasis = input<DeltaEmphasis>('text');\n\n protected readonly sign = computed<Sign>(() => {\n const value = this.value();\n\n if (value === null || value === undefined) {\n return 'unknown';\n }\n if (value > 0) {\n return 'positive';\n }\n if (value < 0) {\n return 'negative';\n }\n return 'neutral';\n });\n\n protected readonly classes = computed(() => {\n const sign = this.sign();\n const background = this.emphasis() === 'pill' ? `${PILL_CLASSES} ${PILL_BACKGROUND_CLASS}` : 'bg-transparent';\n\n return `${BASE_CLASSES} ${TEXT_CLASSES[sign]} ${background}`;\n });\n}\n","import { Component, ElementRef, computed, effect, inject, input, output } from '@angular/core';\n\n/** Available dialog widths. `DialogWidth` is derived from this tuple. */\nexport const DIALOG_WIDTHS = ['md', 'lg'] as const;\nexport type DialogWidth = (typeof DIALOG_WIDTHS)[number];\n\nconst WIDTH_CLASSES: Record<DialogWidth, string> = {\n md: 'max-w-md',\n lg: 'max-w-lg',\n};\n\nconst nextId = (() => {\n let count = 0;\n\n return () => `ui-dialog-${++count}`;\n})();\n\n/**\n * Modal dialog on the native <dialog>: focus trap, focus return, Escape and the top layer\n * come from the platform. Two projection slots - the body, and [dialogActions] for the footer.\n *\n * @example\n * <ui-dialog heading=\"Delete this holding?\" [open]=\"confirming()\" (dismissed)=\"confirming.set(false)\">\n * <p>This cannot be undone.</p>\n * <button dialogActions ui-button variant=\"outline\" (click)=\"confirming.set(false)\">Cancel</button>\n * </ui-dialog>\n */\n@Component({\n selector: 'ui-dialog',\n template: `\n <dialog\n [attr.aria-describedby]=\"description() ? descriptionId : null\"\n [attr.aria-labelledby]=\"headingId\"\n [class]=\"classes()\"\n (close)=\"onNativeClose()\"\n >\n <h2 class=\"text-lg font-semibold tracking-tight\" [id]=\"headingId\">{{ heading() }}</h2>\n\n @if (description()) {\n <p class=\"mt-2 text-sm text-(--muted-foreground)\" [id]=\"descriptionId\">{{ description() }}</p>\n }\n\n <!-- empty:hidden keeps a body-less dialog from carrying the body's top margin. -->\n <div class=\"mt-4 flex flex-col gap-4 empty:hidden\">\n <ng-content />\n </div>\n\n <div class=\"mt-6 flex justify-end gap-3\">\n <ng-content select=\"[dialogActions]\" />\n </div>\n </dialog>\n `,\n})\nexport class UiDialog {\n readonly heading = input.required<string>();\n readonly description = input<string>();\n readonly width = input<DialogWidth>('lg');\n readonly open = input(false);\n readonly dismissed = output<void>();\n\n protected readonly headingId = nextId();\n protected readonly descriptionId = `${this.headingId}-description`;\n\n protected readonly classes = computed(\n () =>\n `w-full m-auto ${WIDTH_CLASSES[this.width()]} rounded-xl border border-(--border) bg-(--card) p-6 text-(--foreground) backdrop:bg-black/60`,\n );\n\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n constructor() {\n effect(() => {\n // viewChild.required can't target a #private field (NG1053); safe because the template has exactly one <dialog>.\n const dialog = this.#host.nativeElement.querySelector('dialog') as HTMLDialogElement;\n\n if (this.open() && !dialog.open) {\n dialog.showModal();\n } else if (!this.open() && dialog.open) {\n dialog.close();\n }\n });\n }\n\n protected onNativeClose(): void {\n // The owner already knows about a close it asked for; only a close it did not ask for is news.\n if (this.open()) {\n this.dismissed.emit();\n }\n }\n}\n","import { Component, ElementRef, afterRenderEffect, computed, contentChild, inject, input } from '@angular/core';\n\nimport { UI_CONTROL } from '../control/control';\n\nconst nextId = (() => {\n let count = 0;\n\n return (): string => `ui-field-${++count}`;\n})();\n\n/**\n * Label, control, hint and error as one unit. The control stays a plain native element:\n * the field finds it in its own projected content and wires the ARIA attributes onto it.\n *\n * The message comes from the caller's `error`, or, where none is set, from the projected control's\n * own validation state once it is touched.\n *\n * @example\n * <ui-field label=\"Quantity\" hint=\"Leave empty if unknown\">\n * <input uiInput type=\"number\" [formField]=\"form.quantity\" />\n * </ui-field>\n *\n * @example\n * <ui-field label=\"ISIN or name\" [error]=\"blank() ? 'Enter an ISIN' : undefined\">\n * <input uiInput type=\"search\" />\n * </ui-field>\n */\n@Component({\n selector: 'ui-field',\n template: `\n <div class=\"flex flex-col gap-1.5\">\n <!-- eslint-disable-next-line @angular-eslint/template/label-has-associated-control -- htmlFor is wired at runtime, once the projected control's id is known -->\n <label class=\"text-[13px] font-medium text-(--foreground)\">{{ label() }}</label>\n\n <ng-content />\n\n @if (hint()) {\n <span class=\"text-[11.5px] text-(--subtle-foreground)\" [id]=\"hintId\">{{ hint() }}</span>\n }\n\n <div class=\"min-h-[1lh] text-[11.5px]\">\n @if (message()) {\n <p class=\"text-(--negative)\" role=\"alert\" [id]=\"errorId\">{{ message() }}</p>\n }\n </div>\n </div>\n `,\n})\nexport class UiField {\n readonly label = input.required<string>();\n readonly hint = input<string>();\n readonly error = input<string>();\n\n readonly #id = nextId();\n protected readonly hintId = `${this.#id}-hint`;\n protected readonly errorId = `${this.#id}-error`;\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n protected readonly control = contentChild(UI_CONTROL);\n\n /**\n * The caller's own `error` wins: it is the only way to report something the control does not\n * know about, such as a search box refusing an empty query.\n */\n protected readonly message = computed(() => {\n const explicit = this.error();\n\n if (explicit) {\n return explicit;\n }\n\n const control = this.control();\n\n if (!control?.touched()) {\n return undefined;\n }\n\n return control.errors().find((error) => error.message)?.message;\n });\n\n constructor() {\n afterRenderEffect(() => {\n // querySelector, not viewChild.required, so the \"no control found\" guard below stays reachable and testable.\n const control = this.#host.nativeElement.querySelector<HTMLElement>('input, select, textarea');\n\n if (!control) {\n return;\n }\n\n control.id ||= this.#id;\n this.#host.nativeElement.querySelector('label')!.htmlFor = control.id;\n\n const describedBy = [this.hint() ? this.hintId : null, this.message() ? this.errorId : null].filter(Boolean);\n\n if (describedBy.length > 0) {\n control.setAttribute('aria-describedby', describedBy.join(' '));\n } else {\n control.removeAttribute('aria-describedby');\n }\n\n if (this.message()) {\n control.setAttribute('aria-invalid', 'true');\n } else {\n control.removeAttribute('aria-invalid');\n }\n });\n }\n}\n","import { Directive, computed, forwardRef, input } from '@angular/core';\n\nimport { UI_CONTROL, type UiControl, type UiControlError } from '../control/control';\n\n/** Available control sizes. `md` is the 44px touch target. */\nexport const CONTROL_SIZES = ['sm', 'md'] as const;\nexport type ControlSize = (typeof CONTROL_SIZES)[number];\n\nexport const CONTROL_BASE_CLASSES =\n 'w-full rounded-md border border-(--border) bg-transparent px-3 text-sm text-(--foreground) transition-colors placeholder:text-(--muted-foreground) enabled:hover:outline-2 enabled:hover:outline-offset-2 enabled:hover:outline-(--ring) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring) disabled:cursor-not-allowed disabled:opacity-50';\n\nexport const CONTROL_SIZE_CLASSES: Record<ControlSize, string> = {\n sm: 'h-9',\n md: 'h-11',\n};\n\n/**\n * Styled native text input. A directive (not a wrapper component) so the host\n * stays a plain <input>: every forms flavor (ngModel, reactive, signal forms)\n * and every native attribute keep working without any plumbing.\n *\n * Declares the `errors` and `touched` inputs Angular's `[formField]` fills, so a `ui-field` around\n * it can show the message without any binding here.\n *\n * @example\n * <input uiInput type=\"email\" placeholder=\"you@example.com\" />\n */\n@Directive({\n selector: 'input[uiInput]',\n host: {\n '[class]': 'classes()',\n },\n providers: [{ provide: UI_CONTROL, useExisting: forwardRef(() => UiInput) }],\n})\nexport class UiInput implements UiControl {\n readonly size = input<ControlSize>('md');\n readonly errors = input<readonly UiControlError[]>([]);\n readonly touched = input(false);\n\n protected readonly classes = computed(() => `${CONTROL_BASE_CLASSES} ${CONTROL_SIZE_CLASSES[this.size()]}`);\n}\n\n/**\n * Styled native textarea. Lives beside the input because it shares every one of its\n * classes; it takes no size, since a textarea grows from a floor instead of sitting\n * at a fixed height.\n *\n * Declares the `errors` and `touched` inputs Angular's `[formField]` fills, so a `ui-field` around\n * it can show the message without any binding here.\n *\n * @example\n * <textarea uiTextarea maxlength=\"280\"></textarea>\n */\n@Directive({\n selector: 'textarea[uiTextarea]',\n host: {\n class: `${CONTROL_BASE_CLASSES} min-h-24 py-2`,\n },\n providers: [{ provide: UI_CONTROL, useExisting: forwardRef(() => UiTextarea) }],\n})\nexport class UiTextarea implements UiControl {\n readonly errors = input<readonly UiControlError[]>([]);\n readonly touched = input(false);\n}\n","import { Component, computed, input } from '@angular/core';\n\n/** Ramp step used to paint the fill. `MeterTone` is derived from this tuple. */\nexport const METER_TONES = [1, 2, 3, 4, 5, 6] as const;\nexport type MeterTone = (typeof METER_TONES)[number];\n\nconst TONE_CLASSES: Record<MeterTone, string> = {\n 1: 'bg-(--ramp-1)',\n 2: 'bg-(--ramp-2)',\n 3: 'bg-(--ramp-3)',\n 4: 'bg-(--ramp-4)',\n 5: 'bg-(--ramp-5)',\n 6: 'bg-(--ramp-6)',\n};\n\n/**\n * Proportion of a whole, drawn as a single bar. One bar per category, never a stacked\n * strip: without hue to separate segments, length has to do the work alone.\n *\n * @example\n * <ui-meter [value]=\"0.463\" label=\"Funds\" valueText=\"46.3% - 128,656.00 EUR\" [tone]=\"1\" />\n */\n@Component({\n selector: 'ui-meter',\n template: `\n <div\n class=\"h-2.5 w-full overflow-hidden rounded-sm bg-(--elevated)\"\n role=\"meter\"\n [attr.aria-label]=\"label()\"\n [attr.aria-valuemax]=\"1\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuenow]=\"value()\"\n [attr.aria-valuetext]=\"valueText()\"\n >\n <div data-testid=\"meter-fill\" [class]=\"fillClasses()\" [style.width.%]=\"percent()\"></div>\n </div>\n `,\n})\nexport class UiMeter {\n readonly value = input.required<number>();\n readonly label = input.required<string>();\n readonly valueText = input.required<string>();\n readonly tone = input<MeterTone>(1);\n\n protected readonly percent = computed(() => Math.min(100, Math.max(0, this.value() * 100)));\n\n protected readonly fillClasses = computed(() => `h-full rounded-sm ${TONE_CLASSES[this.tone()]}`);\n}\n","import { Component, ElementRef, input, model, viewChildren } from '@angular/core';\n\nexport type SegmentedOption = {\n value: string;\n label: string;\n};\n\nconst OPTION_CLASSES =\n 'min-h-11 flex-1 cursor-pointer rounded-md px-3 text-xs font-medium transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring)';\n\nconst SELECTED_CLASSES = 'bg-(--primary) bg-linear-135 from-(--primary) to-(--primary-to) text-(--primary-foreground)';\n\nconst UNSELECTED_CLASSES = 'bg-(--elevated) text-(--muted-foreground) hover:text-(--foreground)';\n\n/**\n * Exclusive choice within a small, known set: a time range, a unit, a mode.\n *\n * @example\n * <ui-segmented [options]=\"ranges\" label=\"Time range\" [(value)]=\"range\" />\n */\n@Component({\n selector: 'ui-segmented',\n template: `\n <div class=\"flex gap-1\" role=\"radiogroup\" [attr.aria-label]=\"label()\">\n @for (option of options(); track option.value) {\n <button\n #radio\n role=\"radio\"\n type=\"button\"\n [attr.aria-checked]=\"option.value === value()\"\n [attr.tabindex]=\"tabIndexFor(option.value)\"\n [class]=\"optionClasses(option.value)\"\n (click)=\"select(option.value)\"\n (keydown)=\"onKeydown($event)\"\n >\n {{ option.label }}\n </button>\n }\n </div>\n `,\n})\nexport class UiSegmented {\n readonly options = input.required<SegmentedOption[]>();\n readonly label = input.required<string>();\n readonly value = model.required<string>();\n\n protected readonly radios = viewChildren<ElementRef<HTMLButtonElement>>('radio');\n\n protected optionClasses(optionValue: string): string {\n return `${OPTION_CLASSES} ${optionValue === this.value() ? SELECTED_CLASSES : UNSELECTED_CLASSES}`;\n }\n\n protected tabIndexFor(optionValue: string): number {\n const opts = this.options();\n const tabStopValue = opts.some((option) => option.value === this.value()) ? this.value() : opts[0]?.value;\n\n return optionValue === tabStopValue ? 0 : -1;\n }\n\n protected select(optionValue: string): void {\n this.value.set(optionValue);\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n const delta = { ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1 }[event.key];\n if (delta === undefined) {\n return;\n }\n event.preventDefault();\n\n const opts = this.options();\n const currentIndex = opts.findIndex((option) => option.value === this.value());\n const nextIndex = (currentIndex + delta + opts.length) % opts.length;\n const next = opts[nextIndex]!;\n\n this.value.set(next.value);\n this.radios()[nextIndex]?.nativeElement.focus();\n }\n}\n","import { Directive, computed, forwardRef, input } from '@angular/core';\n\nimport { UI_CONTROL, type UiControl, type UiControlError } from '../control/control';\nimport { CONTROL_BASE_CLASSES, CONTROL_SIZE_CLASSES, type ControlSize } from '../input/input';\n\nconst SELECT_CLASSES = 'cursor-pointer pr-8';\n\n// Spelled out prefix included: Tailwind scans for literal strings, so a prefix applied in code\n// emits nothing. Dropping `supports` leaves Firefox the padding of a chevron it does not lay out.\nconst PICKER_CLASSES = [\n 'pointer-fine:supports-[appearance:base-select]:[appearance:base-select]',\n 'pointer-fine:supports-[appearance:base-select]:items-center',\n 'pointer-fine:supports-[appearance:base-select]:pr-3',\n 'pointer-fine:supports-[appearance:base-select]:[&_option]:cursor-pointer',\n 'pointer-fine:supports-[appearance:base-select]:[&_option]:rounded-md',\n 'pointer-fine:supports-[appearance:base-select]:[&_option]:px-2.5',\n 'pointer-fine:supports-[appearance:base-select]:[&_option]:py-2',\n 'pointer-fine:supports-[appearance:base-select]:[&_option:hover]:bg-(--soft)',\n 'pointer-fine:supports-[appearance:base-select]:[&_option:focus]:bg-(--soft)',\n 'pointer-fine:supports-[appearance:base-select]:[&_option:checked]:font-medium',\n '[&::picker-icon]:text-[11px]',\n '[&::picker-icon]:text-(--muted-foreground)',\n '[&::picker(select)]:[appearance:base-select]',\n '[&::picker(select)]:my-1.5',\n '[&::picker(select)]:rounded-lg',\n '[&::picker(select)]:border',\n '[&::picker(select)]:border-(--border)',\n '[&::picker(select)]:bg-(--card)',\n '[&::picker(select)]:[position-try-fallbacks:none]',\n '[&::picker(select)]:overflow-y-auto',\n '[&::picker(select)]:p-1',\n '[&::picker(select)]:text-(--card-foreground)',\n].join(' ');\n\n/**\n * Styled native select, drop-down list included where the browser allows it. It stays a native\n * `<select>`: keyboard, typeahead and semantics come from the platform, not from a rebuilt listbox.\n *\n * Declares the `errors` and `touched` inputs Angular's `[formField]` fills, so a `ui-field` around\n * it can show the message without any binding here.\n *\n * @example\n * <select uiSelect><option value=\"pea\">PEA</option></select>\n */\n@Directive({\n selector: 'select[uiSelect]',\n host: {\n '[class]': 'classes()',\n },\n providers: [{ provide: UI_CONTROL, useExisting: forwardRef(() => UiSelect) }],\n})\nexport class UiSelect implements UiControl {\n readonly size = input<ControlSize>('md');\n readonly errors = input<readonly UiControlError[]>([]);\n readonly touched = input(false);\n\n protected readonly classes = computed(\n () => `${CONTROL_BASE_CLASSES} ${SELECT_CLASSES} ${PICKER_CLASSES} ${CONTROL_SIZE_CLASSES[this.size()]}`,\n );\n}\n","import { Component, computed, input } from '@angular/core';\n\nconst LAST_LINE_WIDTH = '62%';\n\n/**\n * Decorative placeholder for content that is still loading. Deliberately hidden from\n * assistive technology: the calling screen keeps its own role=\"status\" sentence.\n *\n * @example\n * <ui-skeleton [lines]=\"3\" />\n * <ui-skeleton [height]=\"196\" />\n */\n@Component({\n selector: 'ui-skeleton',\n template: `\n @for (line of bars(); track $index) {\n <span\n class=\"block rounded bg-(--soft) motion-safe:animate-pulse\"\n [style.height.px]=\"height()\"\n [style.width]=\"line\"\n ></span>\n }\n `,\n host: {\n 'aria-hidden': 'true',\n class: 'flex flex-col gap-2',\n },\n})\nexport class UiSkeleton {\n readonly lines = input(1);\n readonly height = input(12);\n\n protected readonly bars = computed(() => {\n const count = Math.max(1, this.lines());\n\n return Array.from({ length: count }, (_, index) => (index === count - 1 && count > 1 ? LAST_LINE_WIDTH : '100%'));\n });\n}\n","import { Directive, booleanAttribute, computed, input } from '@angular/core';\n\n/** Breakpoints a secondary column can be held back until. */\nexport const CELL_BREAKPOINTS = ['md', 'lg'] as const;\nexport type CellBreakpoint = (typeof CELL_BREAKPOINTS)[number];\n\nconst FROM_CLASSES: Record<CellBreakpoint, string> = {\n md: 'hidden md:table-cell',\n lg: 'hidden lg:table-cell',\n};\n\nconst TH_CLASSES =\n 'px-3 py-2 align-bottom text-[11px] font-medium uppercase tracking-[0.05em] text-(--subtle-foreground)';\nconst TD_CLASSES = 'border-t border-(--hairline) px-3 py-2.5 align-middle text-sm';\nconst NUMERIC_CLASSES = 'text-right tabular-nums';\nconst TEXTUAL_CLASSES = 'text-left';\n\n/** Styled native table. The rows and cells stay plain <tr> and <td>. */\n@Directive({\n selector: 'table[uiTable]',\n host: {\n class: 'w-full border-collapse',\n },\n})\nexport class UiTable {}\n\nconst cellClasses = (base: string, numeric: boolean, from: CellBreakpoint | null): string =>\n [base, numeric ? NUMERIC_CLASSES : TEXTUAL_CLASSES, from ? FROM_CLASSES[from] : ''].filter(Boolean).join(' ');\n\n/**\n * Column header. `numeric` right-aligns and lines the digits up; `from` holds a\n * secondary column back until the viewport is wide enough for it.\n *\n * @example\n * <th uiTh numeric from=\"md\">Prix de revient</th>\n */\n@Directive({\n selector: 'th[uiTh]',\n host: {\n '[class]': 'classes()',\n },\n})\nexport class UiTh {\n readonly numeric = input(false, { transform: booleanAttribute });\n readonly from = input<CellBreakpoint | null>(null);\n\n protected readonly classes = computed(() => cellClasses(TH_CLASSES, this.numeric(), this.from()));\n}\n\n/** Body cell. Same two inputs as `UiTh`, and they must be set on both to match. */\n@Directive({\n selector: 'td[uiTd]',\n host: {\n '[class]': 'classes()',\n },\n})\nexport class UiTd {\n readonly numeric = input(false, { transform: booleanAttribute });\n readonly from = input<CellBreakpoint | null>(null);\n\n protected readonly classes = computed(() => cellClasses(TD_CLASSES, this.numeric(), this.from()));\n}\n","/*\n * Public API surface of the ui library.\n */\n\nexport { AVATAR_SIZES, UiAvatar, type AvatarSize } from './lib/avatar/avatar';\nexport { BADGE_VARIANTS, UiBadge, type BadgeVariant } from './lib/badge/badge';\nexport { BUTTON_SIZES, BUTTON_VARIANTS, UiButton, type ButtonSize, type ButtonVariant } from './lib/button/button';\nexport { CARD_PADDINGS, CARD_VARIANTS, UiCard, type CardPadding, type CardVariant } from './lib/card/card';\nexport { type UiControlError } from './lib/control/control';\nexport { DELTA_EMPHASES, UiDelta, type DeltaEmphasis } from './lib/delta/delta';\nexport { DIALOG_WIDTHS, UiDialog, type DialogWidth } from './lib/dialog/dialog';\nexport { UiField } from './lib/field/field';\nexport { CONTROL_SIZES, UiInput, UiTextarea, type ControlSize } from './lib/input/input';\nexport { METER_TONES, UiMeter, type MeterTone } from './lib/meter/meter';\nexport { UiSegmented, type SegmentedOption } from './lib/segmented/segmented';\nexport { UiSelect } from './lib/select/select';\nexport { UiSkeleton } from './lib/skeleton/skeleton';\nexport { CELL_BREAKPOINTS, UiTable, UiTd, UiTh, type CellBreakpoint } from './lib/table/table';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["BASE_CLASSES","SIZE_CLASSES","VARIANT_CLASSES","nextId"],"mappings":";;;AAEA;MACa,YAAY,GAAG,CAAC,IAAI,EAAE,IAAI;AAGvC,MAAMA,cAAY,GAChB,wIAAwI;AAE1I,MAAMC,cAAY,GAA+B;AAC/C,IAAA,EAAE,EAAE,gBAAgB;AACpB,IAAA,EAAE,EAAE,iBAAiB;CACtB;AAED;;;;;AAKG;MAUU,QAAQ,CAAA;IACV,QAAQ,GAAG,KAAK,CAAC,QAAQ;iFAAU;IACnC,KAAK,GAAG,KAAK,CAAC,QAAQ;8EAAU;IAChC,IAAI,GAAG,KAAK,CAAa,IAAI;6EAAC;AAEpB,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,CA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ome, accessible Angular design system.",
5
5
  "keywords": [
6
6
  "angular",
@@ -1,5 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { ElementRef } from '@angular/core';
2
+ import { Signal, ElementRef } from '@angular/core';
3
3
 
4
4
  /** Available avatar sizes. `AvatarSize` is derived from this tuple. */
5
5
  declare const AVATAR_SIZES: readonly ["sm", "md"];
@@ -81,6 +81,20 @@ declare class UiCard {
81
81
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiCard, "ui-card", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "padding": { "alias": "padding"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
82
82
  }
83
83
 
84
+ /**
85
+ * The part of a validation error this library reads. Angular's own `ValidationError` satisfies it,
86
+ * which is how a Signal Forms error reaches a field without this package depending on
87
+ * `@angular/forms`.
88
+ */
89
+ type UiControlError = {
90
+ readonly message?: string;
91
+ };
92
+ /** What a styled control offers the field wrapped around it. */
93
+ type UiControl = {
94
+ readonly errors: Signal<readonly UiControlError[]>;
95
+ readonly touched: Signal<boolean>;
96
+ };
97
+
84
98
  /** Available delta emphases. `DeltaEmphasis` is derived from this tuple. */
85
99
  declare const DELTA_EMPHASES: readonly ["text", "pill"];
86
100
  type DeltaEmphasis = (typeof DELTA_EMPHASES)[number];
@@ -140,9 +154,17 @@ declare class UiDialog {
140
154
  * Label, control, hint and error as one unit. The control stays a plain native element:
141
155
  * the field finds it in its own projected content and wires the ARIA attributes onto it.
142
156
  *
157
+ * The message comes from the caller's `error`, or, where none is set, from the projected control's
158
+ * own validation state once it is touched.
159
+ *
143
160
  * @example
144
161
  * <ui-field label="Quantity" hint="Leave empty if unknown">
145
- * <input uiInput type="number" />
162
+ * <input uiInput type="number" [formField]="form.quantity" />
163
+ * </ui-field>
164
+ *
165
+ * @example
166
+ * <ui-field label="ISIN or name" [error]="blank() ? 'Enter an ISIN' : undefined">
167
+ * <input uiInput type="search" />
146
168
  * </ui-field>
147
169
  */
148
170
  declare class UiField {
@@ -152,9 +174,15 @@ declare class UiField {
152
174
  readonly error: _angular_core.InputSignal<string | undefined>;
153
175
  protected readonly hintId: string;
154
176
  protected readonly errorId: string;
177
+ protected readonly control: _angular_core.Signal<UiControl | undefined>;
178
+ /**
179
+ * The caller's own `error` wins: it is the only way to report something the control does not
180
+ * know about, such as a search box refusing an empty query.
181
+ */
182
+ protected readonly message: _angular_core.Signal<string | undefined>;
155
183
  constructor();
156
184
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiField, never>;
157
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiField, "ui-field", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
185
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiField, "ui-field", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; }, {}, ["control"], ["*"], true, never>;
158
186
  }
159
187
 
160
188
  /** Available control sizes. `md` is the 44px touch target. */
@@ -165,26 +193,36 @@ type ControlSize = (typeof CONTROL_SIZES)[number];
165
193
  * stays a plain <input>: every forms flavor (ngModel, reactive, signal forms)
166
194
  * and every native attribute keep working without any plumbing.
167
195
  *
196
+ * Declares the `errors` and `touched` inputs Angular's `[formField]` fills, so a `ui-field` around
197
+ * it can show the message without any binding here.
198
+ *
168
199
  * @example
169
200
  * <input uiInput type="email" placeholder="you@example.com" />
170
201
  */
171
- declare class UiInput {
202
+ declare class UiInput implements UiControl {
172
203
  readonly size: _angular_core.InputSignal<"sm" | "md">;
204
+ readonly errors: _angular_core.InputSignal<readonly UiControlError[]>;
205
+ readonly touched: _angular_core.InputSignal<boolean>;
173
206
  protected readonly classes: _angular_core.Signal<string>;
174
207
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiInput, never>;
175
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiInput, "input[uiInput]", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
208
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiInput, "input[uiInput]", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "errors": { "alias": "errors"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
176
209
  }
177
210
  /**
178
211
  * Styled native textarea. Lives beside the input because it shares every one of its
179
212
  * classes; it takes no size, since a textarea grows from a floor instead of sitting
180
213
  * at a fixed height.
181
214
  *
215
+ * Declares the `errors` and `touched` inputs Angular's `[formField]` fills, so a `ui-field` around
216
+ * it can show the message without any binding here.
217
+ *
182
218
  * @example
183
219
  * <textarea uiTextarea maxlength="280"></textarea>
184
220
  */
185
- declare class UiTextarea {
221
+ declare class UiTextarea implements UiControl {
222
+ readonly errors: _angular_core.InputSignal<readonly UiControlError[]>;
223
+ readonly touched: _angular_core.InputSignal<boolean>;
186
224
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiTextarea, never>;
187
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiTextarea, "textarea[uiTextarea]", never, {}, {}, never, never, true, never>;
225
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiTextarea, "textarea[uiTextarea]", never, { "errors": { "alias": "errors"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
188
226
  }
189
227
 
190
228
  /** Ramp step used to paint the fill. `MeterTone` is derived from this tuple. */
@@ -232,17 +270,22 @@ declare class UiSegmented {
232
270
  }
233
271
 
234
272
  /**
235
- * Styled native select. Deliberately keeps the platform's own chevron and picker:
236
- * they are what makes the control usable on a phone.
273
+ * Styled native select, drop-down list included where the browser allows it. It stays a native
274
+ * `<select>`: keyboard, typeahead and semantics come from the platform, not from a rebuilt listbox.
275
+ *
276
+ * Declares the `errors` and `touched` inputs Angular's `[formField]` fills, so a `ui-field` around
277
+ * it can show the message without any binding here.
237
278
  *
238
279
  * @example
239
280
  * <select uiSelect><option value="pea">PEA</option></select>
240
281
  */
241
- declare class UiSelect {
282
+ declare class UiSelect implements UiControl {
242
283
  readonly size: _angular_core.InputSignal<"sm" | "md">;
284
+ readonly errors: _angular_core.InputSignal<readonly UiControlError[]>;
285
+ readonly touched: _angular_core.InputSignal<boolean>;
243
286
  protected readonly classes: _angular_core.Signal<string>;
244
287
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiSelect, never>;
245
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiSelect, "select[uiSelect]", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
288
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiSelect, "select[uiSelect]", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "errors": { "alias": "errors"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
246
289
  }
247
290
 
248
291
  /**
@@ -293,4 +336,4 @@ declare class UiTd {
293
336
  }
294
337
 
295
338
  export { AVATAR_SIZES, BADGE_VARIANTS, BUTTON_SIZES, BUTTON_VARIANTS, CARD_PADDINGS, CARD_VARIANTS, CELL_BREAKPOINTS, CONTROL_SIZES, DELTA_EMPHASES, DIALOG_WIDTHS, METER_TONES, UiAvatar, UiBadge, UiButton, UiCard, UiDelta, UiDialog, UiField, UiInput, UiMeter, UiSegmented, UiSelect, UiSkeleton, UiTable, UiTd, UiTextarea, UiTh };
296
- export type { AvatarSize, BadgeVariant, ButtonSize, ButtonVariant, CardPadding, CardVariant, CellBreakpoint, ControlSize, DeltaEmphasis, DialogWidth, MeterTone, SegmentedOption };
339
+ export type { AvatarSize, BadgeVariant, ButtonSize, ButtonVariant, CardPadding, CardVariant, CellBreakpoint, ControlSize, DeltaEmphasis, DialogWidth, MeterTone, SegmentedOption, UiControlError };