@doku-com/tala 1.0.0-alpha.6 → 1.0.0-alpha.7

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,13 +1,51 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, signal, forwardRef, inject, ElementRef, HostListener, Directive } from '@angular/core';
3
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
2
+ import { input, output, signal, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, inject, ElementRef, InjectionToken, contentChild, TemplateRef, Directive, model, HostListener } from '@angular/core';
3
+ import { NgTemplateOutlet } from '@angular/common';
4
+
5
+ class TalaAlert {
6
+ variant = input('info', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
7
+ type = input('inline', ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
8
+ title = input('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
9
+ message = input('', ...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
10
+ dismissible = input(false, ...(ngDevMode ? [{ debugName: "dismissible" }] : /* istanbul ignore next */ []));
11
+ action = input('none', ...(ngDevMode ? [{ debugName: "action" }] : /* istanbul ignore next */ []));
12
+ actionLabel = input('Action label', ...(ngDevMode ? [{ debugName: "actionLabel" }] : /* istanbul ignore next */ []));
13
+ actionClick = output();
14
+ dismissed = output();
15
+ _dismissed = signal(false, ...(ngDevMode ? [{ debugName: "_dismissed" }] : /* istanbul ignore next */ []));
16
+ hostClasses = computed(() => ['tala-alert', `tala-alert--${this.variant()}`, `tala-alert--${this.type()}`].filter(Boolean).join(' '), ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
17
+ _onActionClick() {
18
+ this.actionClick.emit();
19
+ }
20
+ _onDismiss() {
21
+ this._dismissed.set(true);
22
+ this.dismissed.emit();
23
+ }
24
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TalaAlert, deps: [], target: i0.ɵɵFactoryTarget.Component });
25
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: TalaAlert, isStandalone: true, selector: "tala-alert", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: false, transformFunction: null }, actionLabel: { classPropertyName: "actionLabel", publicName: "actionLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionClick: "actionClick", dismissed: "dismissed" }, host: { properties: { "class": "hostClasses()", "attr.role": "variant() === 'danger' || variant() === 'warning' ? 'alert' : 'status'", "attr.aria-atomic": "'true'", "style.display": "_dismissed() ? 'none' : null" } }, ngImport: i0, template: "<span class=\"tala-alert__icon\" aria-hidden=\"true\">\n @switch (variant()) {\n @case ('success') {\n <svg viewBox=\"0 0 24 24\" fill=\"none\">\n <circle cx=\"12\" cy=\"12\" r=\"10\" fill=\"currentColor\" />\n <path\n d=\"M8 12.5l2.5 2.5L16 9.5\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n }\n @case ('warning') {\n <svg viewBox=\"0 0 24 24\" fill=\"none\">\n <path d=\"M12 2.5 L22.5 21 H1.5 Z\" fill=\"currentColor\" stroke-linejoin=\"round\" />\n <rect x=\"11\" y=\"9\" width=\"2\" height=\"6\" rx=\"1\" fill=\"white\" />\n <rect x=\"11\" y=\"16.5\" width=\"2\" height=\"2\" rx=\"1\" fill=\"white\" />\n </svg>\n }\n @case ('danger') {\n <svg viewBox=\"0 0 24 24\" fill=\"none\">\n <circle cx=\"12\" cy=\"12\" r=\"10\" fill=\"currentColor\" />\n <path d=\"M9 9l6 6M15 9l-6 6\" stroke=\"white\" stroke-width=\"2\" stroke-linecap=\"round\" />\n </svg>\n }\n @default {\n <svg viewBox=\"0 0 24 24\" fill=\"none\">\n <circle cx=\"12\" cy=\"12\" r=\"10\" fill=\"currentColor\" />\n <rect x=\"11\" y=\"10\" width=\"2\" height=\"7\" rx=\"1\" fill=\"white\" />\n <rect x=\"11\" y=\"6.5\" width=\"2\" height=\"2\" rx=\"1\" fill=\"white\" />\n </svg>\n }\n }\n</span>\n\n<div class=\"tala-alert__content\">\n @if (title()) {\n <p class=\"tala-alert__title\">{{ title() }}</p>\n }\n @if (message()) {\n <p class=\"tala-alert__message\">{{ message() }}</p>\n }\n @switch (action()) {\n @case ('label') {\n <div>\n <button type=\"button\" class=\"tala-alert__action\" (click)=\"_onActionClick()\">\n {{ actionLabel() }} \u2192\n </button>\n </div>\n }\n @case ('custom') {\n <div class=\"tala-alert__actions\">\n <ng-content></ng-content>\n </div>\n }\n }\n</div>\n\n@if (dismissible()) {\n <button type=\"button\" class=\"tala-alert__close\" aria-label=\"Dismiss alert\" (click)=\"_onDismiss()\">\n <svg\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n aria-hidden=\"true\"\n >\n <line x1=\"4\" y1=\"4\" x2=\"12\" y2=\"12\" />\n <line x1=\"12\" y1=\"4\" x2=\"4\" y2=\"12\" />\n </svg>\n </button>\n}\n", styles: ["tala-alert{--tala-alert-bg: var(--tala-sys-color-feedback-info-bg);--tala-alert-border-color: var(--tala-sys-color-feedback-info-border);--tala-alert-accent-color: var(--tala-sys-color-feedback-info-text);--tala-alert-body-color: var(--tala-sys-color-text-secondary);--tala-alert-icon-size: 20px;--tala-alert-close-size: 14px;--tala-alert-gap: 12px;--tala-alert-radius: var(--tala-ref-radius-lg);--tala-alert-padding-x: 16px;--tala-alert-padding-y: 14px;display:flex;align-items:flex-start;gap:var(--tala-alert-gap);padding:var(--tala-alert-padding-y) var(--tala-alert-padding-x);background-color:var(--tala-alert-bg);border:1px solid var(--tala-alert-border-color);border-radius:var(--tala-alert-radius);box-sizing:border-box}.tala-alert__icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--tala-alert-icon-size);height:var(--tala-alert-icon-size);color:var(--tala-alert-accent-color)}.tala-alert__icon svg{width:100%;height:100%}.tala-alert__content{display:flex;flex:1 0 0;min-width:0;flex-direction:column;gap:4px}.tala-alert__title{margin:0;font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:600;color:var(--tala-alert-accent-color)}.tala-alert__message{margin:0;font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:400;color:var(--tala-alert-body-color)}.tala-alert__action{display:inline-flex;align-items:center;gap:4px;padding:0;border:none;background:transparent;font-family:var(--tala-ref-type-family-inter);font-size:12px;line-height:16px;font-weight:500;color:var(--tala-alert-accent-color);cursor:pointer}.tala-alert__action:hover{text-decoration:underline}.tala-alert__actions{display:flex;align-items:center;gap:8px}.tala-alert__close{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--tala-alert-close-size);height:var(--tala-alert-close-size);padding:0;border:none;background:transparent;color:var(--tala-alert-accent-color);opacity:.7;cursor:pointer}.tala-alert__close svg{width:100%;height:100%}.tala-alert__close:hover{opacity:1}tala-alert.tala-alert--success{--tala-alert-bg: var(--tala-sys-color-feedback-success-bg);--tala-alert-border-color: var(--tala-sys-color-feedback-success-border);--tala-alert-accent-color: var(--tala-sys-color-feedback-success-text)}tala-alert.tala-alert--warning{--tala-alert-bg: var(--tala-sys-color-feedback-warning-bg);--tala-alert-border-color: var(--tala-sys-color-feedback-warning-border);--tala-alert-accent-color: var(--tala-sys-color-feedback-warning-text)}tala-alert.tala-alert--danger{--tala-alert-bg: var(--tala-sys-color-feedback-danger-bg);--tala-alert-border-color: var(--tala-sys-color-feedback-danger-border);--tala-alert-accent-color: var(--tala-sys-color-feedback-danger-text)}tala-alert.tala-alert--info{--tala-alert-bg: var(--tala-sys-color-feedback-info-bg);--tala-alert-border-color: var(--tala-sys-color-feedback-info-border);--tala-alert-accent-color: var(--tala-sys-color-feedback-info-text)}tala-alert.tala-alert--banner{--tala-alert-radius: 0;--tala-alert-padding-y: 10px;border-width:0 0 2px 0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
26
+ }
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TalaAlert, decorators: [{
28
+ type: Component,
29
+ args: [{ selector: 'tala-alert', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
30
+ '[class]': 'hostClasses()',
31
+ '[attr.role]': "variant() === 'danger' || variant() === 'warning' ? 'alert' : 'status'",
32
+ '[attr.aria-atomic]': "'true'",
33
+ '[style.display]': "_dismissed() ? 'none' : null",
34
+ }, template: "<span class=\"tala-alert__icon\" aria-hidden=\"true\">\n @switch (variant()) {\n @case ('success') {\n <svg viewBox=\"0 0 24 24\" fill=\"none\">\n <circle cx=\"12\" cy=\"12\" r=\"10\" fill=\"currentColor\" />\n <path\n d=\"M8 12.5l2.5 2.5L16 9.5\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n }\n @case ('warning') {\n <svg viewBox=\"0 0 24 24\" fill=\"none\">\n <path d=\"M12 2.5 L22.5 21 H1.5 Z\" fill=\"currentColor\" stroke-linejoin=\"round\" />\n <rect x=\"11\" y=\"9\" width=\"2\" height=\"6\" rx=\"1\" fill=\"white\" />\n <rect x=\"11\" y=\"16.5\" width=\"2\" height=\"2\" rx=\"1\" fill=\"white\" />\n </svg>\n }\n @case ('danger') {\n <svg viewBox=\"0 0 24 24\" fill=\"none\">\n <circle cx=\"12\" cy=\"12\" r=\"10\" fill=\"currentColor\" />\n <path d=\"M9 9l6 6M15 9l-6 6\" stroke=\"white\" stroke-width=\"2\" stroke-linecap=\"round\" />\n </svg>\n }\n @default {\n <svg viewBox=\"0 0 24 24\" fill=\"none\">\n <circle cx=\"12\" cy=\"12\" r=\"10\" fill=\"currentColor\" />\n <rect x=\"11\" y=\"10\" width=\"2\" height=\"7\" rx=\"1\" fill=\"white\" />\n <rect x=\"11\" y=\"6.5\" width=\"2\" height=\"2\" rx=\"1\" fill=\"white\" />\n </svg>\n }\n }\n</span>\n\n<div class=\"tala-alert__content\">\n @if (title()) {\n <p class=\"tala-alert__title\">{{ title() }}</p>\n }\n @if (message()) {\n <p class=\"tala-alert__message\">{{ message() }}</p>\n }\n @switch (action()) {\n @case ('label') {\n <div>\n <button type=\"button\" class=\"tala-alert__action\" (click)=\"_onActionClick()\">\n {{ actionLabel() }} \u2192\n </button>\n </div>\n }\n @case ('custom') {\n <div class=\"tala-alert__actions\">\n <ng-content></ng-content>\n </div>\n }\n }\n</div>\n\n@if (dismissible()) {\n <button type=\"button\" class=\"tala-alert__close\" aria-label=\"Dismiss alert\" (click)=\"_onDismiss()\">\n <svg\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n aria-hidden=\"true\"\n >\n <line x1=\"4\" y1=\"4\" x2=\"12\" y2=\"12\" />\n <line x1=\"12\" y1=\"4\" x2=\"4\" y2=\"12\" />\n </svg>\n </button>\n}\n", styles: ["tala-alert{--tala-alert-bg: var(--tala-sys-color-feedback-info-bg);--tala-alert-border-color: var(--tala-sys-color-feedback-info-border);--tala-alert-accent-color: var(--tala-sys-color-feedback-info-text);--tala-alert-body-color: var(--tala-sys-color-text-secondary);--tala-alert-icon-size: 20px;--tala-alert-close-size: 14px;--tala-alert-gap: 12px;--tala-alert-radius: var(--tala-ref-radius-lg);--tala-alert-padding-x: 16px;--tala-alert-padding-y: 14px;display:flex;align-items:flex-start;gap:var(--tala-alert-gap);padding:var(--tala-alert-padding-y) var(--tala-alert-padding-x);background-color:var(--tala-alert-bg);border:1px solid var(--tala-alert-border-color);border-radius:var(--tala-alert-radius);box-sizing:border-box}.tala-alert__icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--tala-alert-icon-size);height:var(--tala-alert-icon-size);color:var(--tala-alert-accent-color)}.tala-alert__icon svg{width:100%;height:100%}.tala-alert__content{display:flex;flex:1 0 0;min-width:0;flex-direction:column;gap:4px}.tala-alert__title{margin:0;font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:600;color:var(--tala-alert-accent-color)}.tala-alert__message{margin:0;font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:400;color:var(--tala-alert-body-color)}.tala-alert__action{display:inline-flex;align-items:center;gap:4px;padding:0;border:none;background:transparent;font-family:var(--tala-ref-type-family-inter);font-size:12px;line-height:16px;font-weight:500;color:var(--tala-alert-accent-color);cursor:pointer}.tala-alert__action:hover{text-decoration:underline}.tala-alert__actions{display:flex;align-items:center;gap:8px}.tala-alert__close{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--tala-alert-close-size);height:var(--tala-alert-close-size);padding:0;border:none;background:transparent;color:var(--tala-alert-accent-color);opacity:.7;cursor:pointer}.tala-alert__close svg{width:100%;height:100%}.tala-alert__close:hover{opacity:1}tala-alert.tala-alert--success{--tala-alert-bg: var(--tala-sys-color-feedback-success-bg);--tala-alert-border-color: var(--tala-sys-color-feedback-success-border);--tala-alert-accent-color: var(--tala-sys-color-feedback-success-text)}tala-alert.tala-alert--warning{--tala-alert-bg: var(--tala-sys-color-feedback-warning-bg);--tala-alert-border-color: var(--tala-sys-color-feedback-warning-border);--tala-alert-accent-color: var(--tala-sys-color-feedback-warning-text)}tala-alert.tala-alert--danger{--tala-alert-bg: var(--tala-sys-color-feedback-danger-bg);--tala-alert-border-color: var(--tala-sys-color-feedback-danger-border);--tala-alert-accent-color: var(--tala-sys-color-feedback-danger-text)}tala-alert.tala-alert--info{--tala-alert-bg: var(--tala-sys-color-feedback-info-bg);--tala-alert-border-color: var(--tala-sys-color-feedback-info-border);--tala-alert-accent-color: var(--tala-sys-color-feedback-info-text)}tala-alert.tala-alert--banner{--tala-alert-radius: 0;--tala-alert-padding-y: 10px;border-width:0 0 2px 0}\n"] }]
35
+ }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], action: [{ type: i0.Input, args: [{ isSignal: true, alias: "action", required: false }] }], actionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionLabel", required: false }] }], actionClick: [{ type: i0.Output, args: ["actionClick"] }], dismissed: [{ type: i0.Output, args: ["dismissed"] }] } });
4
36
 
5
37
  class TalaAvatar {
38
+ /** Accessible display name used for initials and the generated aria label. */
6
39
  name = input('', ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
40
+ /** Visual size of the avatar. */
7
41
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
42
+ /** Outer shape of the avatar container. */
8
43
  shape = input('circle', ...(ngDevMode ? [{ debugName: "shape" }] : /* istanbul ignore next */ []));
44
+ /** Optional presence indicator shown on the avatar. */
9
45
  status = input('none', ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
46
+ /** Optional notification badge count. Values above 99 render as `99+`. */
10
47
  badgeCount = input(0, ...(ngDevMode ? [{ debugName: "badgeCount" }] : /* istanbul ignore next */ []));
48
+ /** Image URL. When omitted, the component falls back to generated initials. */
11
49
  src = input('', ...(ngDevMode ? [{ debugName: "src" }] : /* istanbul ignore next */ []));
12
50
  initials = computed(() => this.getInitials(this.name()), ...(ngDevMode ? [{ debugName: "initials" }] : /* istanbul ignore next */ []));
13
51
  bgColor = computed(() => this.src()
@@ -61,128 +99,220 @@ class TalaAvatar {
61
99
  return words[0].slice(0, 2).toUpperCase();
62
100
  return (words[0][0] + words[words.length - 1][0]).toUpperCase();
63
101
  }
64
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: TalaAvatar, deps: [], target: i0.ɵɵFactoryTarget.Component });
65
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.13", type: TalaAvatar, isStandalone: true, selector: "tala-avatar", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, badgeCount: { classPropertyName: "badgeCount", publicName: "badgeCount", isSignal: true, isRequired: false, transformFunction: null }, src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()", "style.background-color": "bgColor()", "attr.role": "\"img\"", "attr.aria-label": "ariaLabel()" } }, ngImport: i0, template: "@if (src()) {\n <img class=\"tala-avatar__image\" [src]=\"src()\" [alt]=\"name()\" />\n} @else {\n <span class=\"tala-avatar__initials\">{{ initials() }}</span>\n}\n\n@if (hasStatus()) {\n <span [class]=\"'tala-avatar__status tala-avatar__status--' + status()\" role=\"presentation\"></span>\n}\n\n@if (hasBadge()) {\n <span class=\"tala-avatar__badge\" aria-hidden=\"true\">\n {{ displayBadge() }}\n </span>\n}\n", styles: ["tala-avatar{--tala-avatar-border-color: var(--tala-sys-color-outline-default);--tala-avatar-initials-color: var(--tala-sys-color-text-inverse);--tala-avatar-status-ring-width: 2px;--tala-avatar-status-ring-color: var(--tala-sys-color-surface-default);--tala-avatar-status-online-color: var(--tala-ref-color-green-40);--tala-avatar-status-offline-color: var(--tala-ref-color-neutral-40);--tala-avatar-status-busy-color: var(--tala-ref-color-red-50);--tala-avatar-status-away-color: var(--tala-ref-color-amber-30);--tala-avatar-badge-bg: var(--tala-sys-color-brand);--tala-avatar-badge-color: var(--tala-sys-color-text-inverse);--tala-avatar-badge-ring-width: 2px;--tala-avatar-badge-ring-color: var(--tala-sys-color-surface-default);display:inline-flex;align-items:center;justify-content:center;position:relative;flex-shrink:0;border:1px solid var(--tala-avatar-border-color);overflow:visible;-webkit-user-select:none;user-select:none}.tala-avatar__initials{font-family:var(--tala-ref-type-family-inter);font-weight:500;color:var(--tala-avatar-initials-color);line-height:1;letter-spacing:0px}tala-avatar.tala-avatar--image{overflow:hidden}.tala-avatar__image{width:100%;height:100%;object-fit:cover;display:block}tala-avatar.tala-avatar--xs{--tala-avatar-status-ring-width: 1.5px;--tala-avatar-badge-ring-width: 1.5px;width:24px;height:24px}tala-avatar.tala-avatar--xs .tala-avatar__initials{font-size:9px}tala-avatar.tala-avatar--xs .tala-avatar__status{width:6px;height:6px;bottom:-1px;right:-1px}tala-avatar.tala-avatar--xs .tala-avatar__badge{width:8px;height:8px;top:-5.4px;right:-3.4px;font-size:5px}tala-avatar.tala-avatar--sm{--tala-avatar-status-ring-width: 1.5px;--tala-avatar-badge-ring-width: 1.5px;width:32px;height:32px}tala-avatar.tala-avatar--sm .tala-avatar__initials{font-size:11px;line-height:14px}tala-avatar.tala-avatar--sm .tala-avatar__status{width:7px;height:7px;bottom:-1px;right:-1px}tala-avatar.tala-avatar--sm .tala-avatar__badge{width:10px;height:10px;top:-6.5px;right:-4.5px;font-size:6px}tala-avatar.tala-avatar--md{width:40px;height:40px}tala-avatar.tala-avatar--md .tala-avatar__initials{font-size:14px;line-height:20px}tala-avatar.tala-avatar--md .tala-avatar__status{width:8px;height:8px;bottom:-1.5px;right:-1.5px}tala-avatar.tala-avatar--md .tala-avatar__badge{min-width:12px;height:12px;top:-7.6px;right:-5.6px;font-size:7px}tala-avatar.tala-avatar--lg{width:48px;height:48px}tala-avatar.tala-avatar--lg .tala-avatar__initials{font-size:16px;line-height:20px}tala-avatar.tala-avatar--lg .tala-avatar__status{width:10px;height:10px;bottom:-2px;right:-2px}tala-avatar.tala-avatar--lg .tala-avatar__badge{min-width:14px;height:14px;top:-8.7px;right:-6.7px;font-size:8px}tala-avatar.tala-avatar--xl{width:64px;height:64px}tala-avatar.tala-avatar--xl .tala-avatar__initials{font-size:22px;line-height:normal}tala-avatar.tala-avatar--xl .tala-avatar__status{width:12px;height:12px;bottom:-2.5px;right:-2.5px}tala-avatar.tala-avatar--xl .tala-avatar__badge{min-width:16px;height:16px;top:-9.8px;right:-7.8px;font-size:9px}tala-avatar.tala-avatar--circle{border-radius:var(--tala-ref-radius-full)}tala-avatar.tala-avatar--square.tala-avatar--xs{border-radius:var(--tala-ref-radius-sm)}tala-avatar.tala-avatar--square.tala-avatar--sm{border-radius:var(--tala-ref-radius-md)}tala-avatar.tala-avatar--square.tala-avatar--md,tala-avatar.tala-avatar--square.tala-avatar--lg{border-radius:var(--tala-ref-radius-lg)}tala-avatar.tala-avatar--square.tala-avatar--xl{border-radius:var(--tala-ref-radius-xl)}.tala-avatar__status{position:absolute;border-radius:var(--tala-ref-radius-full);box-shadow:0 0 0 var(--tala-avatar-status-ring-width) var(--tala-avatar-status-ring-color);pointer-events:none}.tala-avatar__status--online{background-color:var(--tala-avatar-status-online-color)}.tala-avatar__status--offline{background-color:var(--tala-avatar-status-offline-color)}.tala-avatar__status--busy{background-color:var(--tala-avatar-status-busy-color)}.tala-avatar__status--away{background-color:var(--tala-avatar-status-away-color)}.tala-avatar__badge{position:absolute;background-color:var(--tala-avatar-badge-bg);color:var(--tala-avatar-badge-color);border-radius:var(--tala-ref-radius-full);font-family:var(--tala-ref-type-family-inter);font-weight:500;box-shadow:0 0 0 var(--tala-avatar-badge-ring-width) var(--tala-avatar-badge-ring-color);display:flex;align-items:center;justify-content:center;padding:0 2px;pointer-events:none;white-space:nowrap;line-height:1}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
102
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TalaAvatar, deps: [], target: i0.ɵɵFactoryTarget.Component });
103
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: TalaAvatar, isStandalone: true, selector: "tala-avatar", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, badgeCount: { classPropertyName: "badgeCount", publicName: "badgeCount", isSignal: true, isRequired: false, transformFunction: null }, src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()", "style.background-color": "bgColor()", "attr.role": "\"img\"", "attr.aria-label": "ariaLabel()" } }, ngImport: i0, template: "@if (src()) {\n <img class=\"tala-avatar__image\" [src]=\"src()\" [alt]=\"name()\" />\n} @else {\n <span class=\"tala-avatar__initials\">{{ initials() }}</span>\n}\n\n@if (hasStatus()) {\n <span [class]=\"'tala-avatar__status tala-avatar__status--' + status()\" role=\"presentation\"></span>\n}\n\n@if (hasBadge()) {\n <span class=\"tala-avatar__badge\" aria-hidden=\"true\">\n {{ displayBadge() }}\n </span>\n}\n", styles: ["tala-avatar{--tala-avatar-border-color: var(--tala-sys-color-border-default);--tala-avatar-initials-color: var(--tala-sys-color-text-inverse);--tala-avatar-status-ring-width: 2px;--tala-avatar-status-ring-color: var(--tala-sys-color-surface-default);--tala-avatar-status-online-color: var(--tala-ref-color-green-40);--tala-avatar-status-offline-color: var(--tala-ref-color-neutral-40);--tala-avatar-status-busy-color: var(--tala-ref-color-red-50);--tala-avatar-status-away-color: var(--tala-ref-color-amber-30);--tala-avatar-badge-bg: var(--tala-sys-color-action-accent-bg);--tala-avatar-badge-color: var(--tala-sys-color-text-inverse);--tala-avatar-badge-ring-width: 2px;--tala-avatar-badge-ring-color: var(--tala-sys-color-surface-default);display:inline-flex;align-items:center;justify-content:center;position:relative;flex-shrink:0;border:1px solid var(--tala-avatar-border-color);overflow:visible;-webkit-user-select:none;user-select:none}.tala-avatar__initials{font-family:var(--tala-ref-type-family-inter);font-weight:500;color:var(--tala-avatar-initials-color);line-height:1;letter-spacing:0px}tala-avatar.tala-avatar--image{overflow:hidden}.tala-avatar__image{width:100%;height:100%;object-fit:cover;display:block}tala-avatar.tala-avatar--xs{--tala-avatar-status-ring-width: 1.5px;--tala-avatar-badge-ring-width: 1.5px;width:24px;height:24px}tala-avatar.tala-avatar--xs .tala-avatar__initials{font-size:9px}tala-avatar.tala-avatar--xs .tala-avatar__status{width:6px;height:6px;bottom:-1px;right:-1px}tala-avatar.tala-avatar--xs .tala-avatar__badge{width:8px;height:8px;top:-5.4px;right:-3.4px;font-size:5px}tala-avatar.tala-avatar--sm{--tala-avatar-status-ring-width: 1.5px;--tala-avatar-badge-ring-width: 1.5px;width:32px;height:32px}tala-avatar.tala-avatar--sm .tala-avatar__initials{font-size:11px;line-height:14px}tala-avatar.tala-avatar--sm .tala-avatar__status{width:7px;height:7px;bottom:-1px;right:-1px}tala-avatar.tala-avatar--sm .tala-avatar__badge{width:10px;height:10px;top:-6.5px;right:-4.5px;font-size:6px}tala-avatar.tala-avatar--md{width:40px;height:40px}tala-avatar.tala-avatar--md .tala-avatar__initials{font-size:14px;line-height:20px}tala-avatar.tala-avatar--md .tala-avatar__status{width:8px;height:8px;bottom:-1.5px;right:-1.5px}tala-avatar.tala-avatar--md .tala-avatar__badge{min-width:12px;height:12px;top:-7.6px;right:-5.6px;font-size:7px}tala-avatar.tala-avatar--lg{width:48px;height:48px}tala-avatar.tala-avatar--lg .tala-avatar__initials{font-size:16px;line-height:20px}tala-avatar.tala-avatar--lg .tala-avatar__status{width:10px;height:10px;bottom:-2px;right:-2px}tala-avatar.tala-avatar--lg .tala-avatar__badge{min-width:14px;height:14px;top:-8.7px;right:-6.7px;font-size:8px}tala-avatar.tala-avatar--xl{width:64px;height:64px}tala-avatar.tala-avatar--xl .tala-avatar__initials{font-size:22px;line-height:normal}tala-avatar.tala-avatar--xl .tala-avatar__status{width:12px;height:12px;bottom:-2.5px;right:-2.5px}tala-avatar.tala-avatar--xl .tala-avatar__badge{min-width:16px;height:16px;top:-9.8px;right:-7.8px;font-size:9px}tala-avatar.tala-avatar--circle{border-radius:var(--tala-ref-radius-full)}tala-avatar.tala-avatar--circle .tala-avatar__status{transform:translate(35%,35%)}tala-avatar.tala-avatar--square.tala-avatar--xs{border-radius:var(--tala-ref-radius-sm)}tala-avatar.tala-avatar--square.tala-avatar--sm{border-radius:var(--tala-ref-radius-md)}tala-avatar.tala-avatar--square.tala-avatar--md,tala-avatar.tala-avatar--square.tala-avatar--lg{border-radius:var(--tala-ref-radius-lg)}tala-avatar.tala-avatar--square.tala-avatar--xl{border-radius:var(--tala-ref-radius-xl)}.tala-avatar__status{position:absolute;border-radius:var(--tala-ref-radius-full);box-shadow:0 0 0 var(--tala-avatar-status-ring-width) var(--tala-avatar-status-ring-color);pointer-events:none}.tala-avatar__status--online{background-color:var(--tala-avatar-status-online-color)}.tala-avatar__status--offline{background-color:var(--tala-avatar-status-offline-color)}.tala-avatar__status--busy{background-color:var(--tala-avatar-status-busy-color)}.tala-avatar__status--away{background-color:var(--tala-avatar-status-away-color)}.tala-avatar__badge{position:absolute;background-color:var(--tala-avatar-badge-bg);color:var(--tala-avatar-badge-color);border-radius:var(--tala-ref-radius-full);font-family:var(--tala-ref-type-family-inter);font-weight:500;box-shadow:0 0 0 var(--tala-avatar-badge-ring-width) var(--tala-avatar-badge-ring-color);display:flex;align-items:center;justify-content:center;padding:0 2px;pointer-events:none;white-space:nowrap;line-height:1}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
66
104
  }
67
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: TalaAvatar, decorators: [{
105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TalaAvatar, decorators: [{
68
106
  type: Component,
69
- args: [{ selector: 'tala-avatar', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
107
+ args: [{ selector: 'tala-avatar', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
70
108
  '[class]': 'hostClasses()',
71
109
  '[style.background-color]': 'bgColor()',
72
110
  '[attr.role]': '"img"',
73
111
  '[attr.aria-label]': 'ariaLabel()',
74
- }, template: "@if (src()) {\n <img class=\"tala-avatar__image\" [src]=\"src()\" [alt]=\"name()\" />\n} @else {\n <span class=\"tala-avatar__initials\">{{ initials() }}</span>\n}\n\n@if (hasStatus()) {\n <span [class]=\"'tala-avatar__status tala-avatar__status--' + status()\" role=\"presentation\"></span>\n}\n\n@if (hasBadge()) {\n <span class=\"tala-avatar__badge\" aria-hidden=\"true\">\n {{ displayBadge() }}\n </span>\n}\n", styles: ["tala-avatar{--tala-avatar-border-color: var(--tala-sys-color-outline-default);--tala-avatar-initials-color: var(--tala-sys-color-text-inverse);--tala-avatar-status-ring-width: 2px;--tala-avatar-status-ring-color: var(--tala-sys-color-surface-default);--tala-avatar-status-online-color: var(--tala-ref-color-green-40);--tala-avatar-status-offline-color: var(--tala-ref-color-neutral-40);--tala-avatar-status-busy-color: var(--tala-ref-color-red-50);--tala-avatar-status-away-color: var(--tala-ref-color-amber-30);--tala-avatar-badge-bg: var(--tala-sys-color-brand);--tala-avatar-badge-color: var(--tala-sys-color-text-inverse);--tala-avatar-badge-ring-width: 2px;--tala-avatar-badge-ring-color: var(--tala-sys-color-surface-default);display:inline-flex;align-items:center;justify-content:center;position:relative;flex-shrink:0;border:1px solid var(--tala-avatar-border-color);overflow:visible;-webkit-user-select:none;user-select:none}.tala-avatar__initials{font-family:var(--tala-ref-type-family-inter);font-weight:500;color:var(--tala-avatar-initials-color);line-height:1;letter-spacing:0px}tala-avatar.tala-avatar--image{overflow:hidden}.tala-avatar__image{width:100%;height:100%;object-fit:cover;display:block}tala-avatar.tala-avatar--xs{--tala-avatar-status-ring-width: 1.5px;--tala-avatar-badge-ring-width: 1.5px;width:24px;height:24px}tala-avatar.tala-avatar--xs .tala-avatar__initials{font-size:9px}tala-avatar.tala-avatar--xs .tala-avatar__status{width:6px;height:6px;bottom:-1px;right:-1px}tala-avatar.tala-avatar--xs .tala-avatar__badge{width:8px;height:8px;top:-5.4px;right:-3.4px;font-size:5px}tala-avatar.tala-avatar--sm{--tala-avatar-status-ring-width: 1.5px;--tala-avatar-badge-ring-width: 1.5px;width:32px;height:32px}tala-avatar.tala-avatar--sm .tala-avatar__initials{font-size:11px;line-height:14px}tala-avatar.tala-avatar--sm .tala-avatar__status{width:7px;height:7px;bottom:-1px;right:-1px}tala-avatar.tala-avatar--sm .tala-avatar__badge{width:10px;height:10px;top:-6.5px;right:-4.5px;font-size:6px}tala-avatar.tala-avatar--md{width:40px;height:40px}tala-avatar.tala-avatar--md .tala-avatar__initials{font-size:14px;line-height:20px}tala-avatar.tala-avatar--md .tala-avatar__status{width:8px;height:8px;bottom:-1.5px;right:-1.5px}tala-avatar.tala-avatar--md .tala-avatar__badge{min-width:12px;height:12px;top:-7.6px;right:-5.6px;font-size:7px}tala-avatar.tala-avatar--lg{width:48px;height:48px}tala-avatar.tala-avatar--lg .tala-avatar__initials{font-size:16px;line-height:20px}tala-avatar.tala-avatar--lg .tala-avatar__status{width:10px;height:10px;bottom:-2px;right:-2px}tala-avatar.tala-avatar--lg .tala-avatar__badge{min-width:14px;height:14px;top:-8.7px;right:-6.7px;font-size:8px}tala-avatar.tala-avatar--xl{width:64px;height:64px}tala-avatar.tala-avatar--xl .tala-avatar__initials{font-size:22px;line-height:normal}tala-avatar.tala-avatar--xl .tala-avatar__status{width:12px;height:12px;bottom:-2.5px;right:-2.5px}tala-avatar.tala-avatar--xl .tala-avatar__badge{min-width:16px;height:16px;top:-9.8px;right:-7.8px;font-size:9px}tala-avatar.tala-avatar--circle{border-radius:var(--tala-ref-radius-full)}tala-avatar.tala-avatar--square.tala-avatar--xs{border-radius:var(--tala-ref-radius-sm)}tala-avatar.tala-avatar--square.tala-avatar--sm{border-radius:var(--tala-ref-radius-md)}tala-avatar.tala-avatar--square.tala-avatar--md,tala-avatar.tala-avatar--square.tala-avatar--lg{border-radius:var(--tala-ref-radius-lg)}tala-avatar.tala-avatar--square.tala-avatar--xl{border-radius:var(--tala-ref-radius-xl)}.tala-avatar__status{position:absolute;border-radius:var(--tala-ref-radius-full);box-shadow:0 0 0 var(--tala-avatar-status-ring-width) var(--tala-avatar-status-ring-color);pointer-events:none}.tala-avatar__status--online{background-color:var(--tala-avatar-status-online-color)}.tala-avatar__status--offline{background-color:var(--tala-avatar-status-offline-color)}.tala-avatar__status--busy{background-color:var(--tala-avatar-status-busy-color)}.tala-avatar__status--away{background-color:var(--tala-avatar-status-away-color)}.tala-avatar__badge{position:absolute;background-color:var(--tala-avatar-badge-bg);color:var(--tala-avatar-badge-color);border-radius:var(--tala-ref-radius-full);font-family:var(--tala-ref-type-family-inter);font-weight:500;box-shadow:0 0 0 var(--tala-avatar-badge-ring-width) var(--tala-avatar-badge-ring-color);display:flex;align-items:center;justify-content:center;padding:0 2px;pointer-events:none;white-space:nowrap;line-height:1}\n"] }]
112
+ }, template: "@if (src()) {\n <img class=\"tala-avatar__image\" [src]=\"src()\" [alt]=\"name()\" />\n} @else {\n <span class=\"tala-avatar__initials\">{{ initials() }}</span>\n}\n\n@if (hasStatus()) {\n <span [class]=\"'tala-avatar__status tala-avatar__status--' + status()\" role=\"presentation\"></span>\n}\n\n@if (hasBadge()) {\n <span class=\"tala-avatar__badge\" aria-hidden=\"true\">\n {{ displayBadge() }}\n </span>\n}\n", styles: ["tala-avatar{--tala-avatar-border-color: var(--tala-sys-color-border-default);--tala-avatar-initials-color: var(--tala-sys-color-text-inverse);--tala-avatar-status-ring-width: 2px;--tala-avatar-status-ring-color: var(--tala-sys-color-surface-default);--tala-avatar-status-online-color: var(--tala-ref-color-green-40);--tala-avatar-status-offline-color: var(--tala-ref-color-neutral-40);--tala-avatar-status-busy-color: var(--tala-ref-color-red-50);--tala-avatar-status-away-color: var(--tala-ref-color-amber-30);--tala-avatar-badge-bg: var(--tala-sys-color-action-accent-bg);--tala-avatar-badge-color: var(--tala-sys-color-text-inverse);--tala-avatar-badge-ring-width: 2px;--tala-avatar-badge-ring-color: var(--tala-sys-color-surface-default);display:inline-flex;align-items:center;justify-content:center;position:relative;flex-shrink:0;border:1px solid var(--tala-avatar-border-color);overflow:visible;-webkit-user-select:none;user-select:none}.tala-avatar__initials{font-family:var(--tala-ref-type-family-inter);font-weight:500;color:var(--tala-avatar-initials-color);line-height:1;letter-spacing:0px}tala-avatar.tala-avatar--image{overflow:hidden}.tala-avatar__image{width:100%;height:100%;object-fit:cover;display:block}tala-avatar.tala-avatar--xs{--tala-avatar-status-ring-width: 1.5px;--tala-avatar-badge-ring-width: 1.5px;width:24px;height:24px}tala-avatar.tala-avatar--xs .tala-avatar__initials{font-size:9px}tala-avatar.tala-avatar--xs .tala-avatar__status{width:6px;height:6px;bottom:-1px;right:-1px}tala-avatar.tala-avatar--xs .tala-avatar__badge{width:8px;height:8px;top:-5.4px;right:-3.4px;font-size:5px}tala-avatar.tala-avatar--sm{--tala-avatar-status-ring-width: 1.5px;--tala-avatar-badge-ring-width: 1.5px;width:32px;height:32px}tala-avatar.tala-avatar--sm .tala-avatar__initials{font-size:11px;line-height:14px}tala-avatar.tala-avatar--sm .tala-avatar__status{width:7px;height:7px;bottom:-1px;right:-1px}tala-avatar.tala-avatar--sm .tala-avatar__badge{width:10px;height:10px;top:-6.5px;right:-4.5px;font-size:6px}tala-avatar.tala-avatar--md{width:40px;height:40px}tala-avatar.tala-avatar--md .tala-avatar__initials{font-size:14px;line-height:20px}tala-avatar.tala-avatar--md .tala-avatar__status{width:8px;height:8px;bottom:-1.5px;right:-1.5px}tala-avatar.tala-avatar--md .tala-avatar__badge{min-width:12px;height:12px;top:-7.6px;right:-5.6px;font-size:7px}tala-avatar.tala-avatar--lg{width:48px;height:48px}tala-avatar.tala-avatar--lg .tala-avatar__initials{font-size:16px;line-height:20px}tala-avatar.tala-avatar--lg .tala-avatar__status{width:10px;height:10px;bottom:-2px;right:-2px}tala-avatar.tala-avatar--lg .tala-avatar__badge{min-width:14px;height:14px;top:-8.7px;right:-6.7px;font-size:8px}tala-avatar.tala-avatar--xl{width:64px;height:64px}tala-avatar.tala-avatar--xl .tala-avatar__initials{font-size:22px;line-height:normal}tala-avatar.tala-avatar--xl .tala-avatar__status{width:12px;height:12px;bottom:-2.5px;right:-2.5px}tala-avatar.tala-avatar--xl .tala-avatar__badge{min-width:16px;height:16px;top:-9.8px;right:-7.8px;font-size:9px}tala-avatar.tala-avatar--circle{border-radius:var(--tala-ref-radius-full)}tala-avatar.tala-avatar--circle .tala-avatar__status{transform:translate(35%,35%)}tala-avatar.tala-avatar--square.tala-avatar--xs{border-radius:var(--tala-ref-radius-sm)}tala-avatar.tala-avatar--square.tala-avatar--sm{border-radius:var(--tala-ref-radius-md)}tala-avatar.tala-avatar--square.tala-avatar--md,tala-avatar.tala-avatar--square.tala-avatar--lg{border-radius:var(--tala-ref-radius-lg)}tala-avatar.tala-avatar--square.tala-avatar--xl{border-radius:var(--tala-ref-radius-xl)}.tala-avatar__status{position:absolute;border-radius:var(--tala-ref-radius-full);box-shadow:0 0 0 var(--tala-avatar-status-ring-width) var(--tala-avatar-status-ring-color);pointer-events:none}.tala-avatar__status--online{background-color:var(--tala-avatar-status-online-color)}.tala-avatar__status--offline{background-color:var(--tala-avatar-status-offline-color)}.tala-avatar__status--busy{background-color:var(--tala-avatar-status-busy-color)}.tala-avatar__status--away{background-color:var(--tala-avatar-status-away-color)}.tala-avatar__badge{position:absolute;background-color:var(--tala-avatar-badge-bg);color:var(--tala-avatar-badge-color);border-radius:var(--tala-ref-radius-full);font-family:var(--tala-ref-type-family-inter);font-weight:500;box-shadow:0 0 0 var(--tala-avatar-badge-ring-width) var(--tala-avatar-badge-ring-color);display:flex;align-items:center;justify-content:center;padding:0 2px;pointer-events:none;white-space:nowrap;line-height:1}\n"] }]
75
113
  }], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], badgeCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "badgeCount", required: false }] }], src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: false }] }] } });
76
114
 
115
+ /** Groups multiple avatars with shared sizing and overlapping layout styles. */
77
116
  class TalaAvatarGroup {
117
+ /** Shared avatar size applied to items inside the group. */
78
118
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
79
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: TalaAvatarGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
80
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.13", type: TalaAvatarGroup, isStandalone: true, selector: "tala-avatar-group", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "class": "\"tala-avatar-group--\" + size()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: ["tala-avatar-group{--tala-avatar-group-ring-width: 2px;--tala-avatar-group-ring-color: var(--color-surface-default);display:inline-flex;flex-direction:row;align-items:center}tala-avatar-group tala-avatar{box-shadow:0 0 0 var(--tala-avatar-group-ring-width) var(--tala-avatar-group-ring-color)}tala-avatar-group tala-avatar:not(:first-child){margin-left:var(--avatar-group-overlap)}.tala-avatar-group--xs{--avatar-group-overlap: -7px}.tala-avatar-group--sm{--avatar-group-overlap: -10px}.tala-avatar-group--md{--avatar-group-overlap: -12px}.tala-avatar-group--lg{--avatar-group-overlap: -14px}.tala-avatar-group--xl{--avatar-group-overlap: -19px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
119
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TalaAvatarGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
120
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: TalaAvatarGroup, isStandalone: true, selector: "tala-avatar-group", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "class": "\"tala-avatar-group--\" + size()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: ["tala-avatar-group{--tala-avatar-group-ring-width: 2px;--tala-avatar-group-ring-color: var(--tala-sys-color-surface-default);display:inline-flex;flex-direction:row;align-items:center}tala-avatar-group tala-avatar{box-shadow:0 0 0 var(--tala-avatar-group-ring-width) var(--tala-avatar-group-ring-color)}tala-avatar-group tala-avatar:not(:first-child){margin-left:var(--avatar-group-overlap)}.tala-avatar-group--xs{--avatar-group-overlap: -7px}.tala-avatar-group--sm{--avatar-group-overlap: -10px}.tala-avatar-group--md{--avatar-group-overlap: -12px}.tala-avatar-group--lg{--avatar-group-overlap: -14px}.tala-avatar-group--xl{--avatar-group-overlap: -19px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
81
121
  }
82
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: TalaAvatarGroup, decorators: [{
122
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TalaAvatarGroup, decorators: [{
83
123
  type: Component,
84
124
  args: [{ selector: 'tala-avatar-group', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: `<ng-content />`, host: {
85
125
  '[class]': '"tala-avatar-group--" + size()',
86
126
  role: 'group',
87
- }, styles: ["tala-avatar-group{--tala-avatar-group-ring-width: 2px;--tala-avatar-group-ring-color: var(--color-surface-default);display:inline-flex;flex-direction:row;align-items:center}tala-avatar-group tala-avatar{box-shadow:0 0 0 var(--tala-avatar-group-ring-width) var(--tala-avatar-group-ring-color)}tala-avatar-group tala-avatar:not(:first-child){margin-left:var(--avatar-group-overlap)}.tala-avatar-group--xs{--avatar-group-overlap: -7px}.tala-avatar-group--sm{--avatar-group-overlap: -10px}.tala-avatar-group--md{--avatar-group-overlap: -12px}.tala-avatar-group--lg{--avatar-group-overlap: -14px}.tala-avatar-group--xl{--avatar-group-overlap: -19px}\n"] }]
127
+ }, styles: ["tala-avatar-group{--tala-avatar-group-ring-width: 2px;--tala-avatar-group-ring-color: var(--tala-sys-color-surface-default);display:inline-flex;flex-direction:row;align-items:center}tala-avatar-group tala-avatar{box-shadow:0 0 0 var(--tala-avatar-group-ring-width) var(--tala-avatar-group-ring-color)}tala-avatar-group tala-avatar:not(:first-child){margin-left:var(--avatar-group-overlap)}.tala-avatar-group--xs{--avatar-group-overlap: -7px}.tala-avatar-group--sm{--avatar-group-overlap: -10px}.tala-avatar-group--md{--avatar-group-overlap: -12px}.tala-avatar-group--lg{--avatar-group-overlap: -14px}.tala-avatar-group--xl{--avatar-group-overlap: -19px}\n"] }]
88
128
  }], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
89
129
 
90
130
  class TalaButton {
131
+ el = inject((ElementRef));
132
+ /**
133
+ * Selects the button's visual treatment.
134
+ *
135
+ * @default 'primary'
136
+ */
91
137
  variant = input('primary', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
138
+ /**
139
+ * Controls the button's height and horizontal padding.
140
+ *
141
+ * @default 'md'
142
+ */
92
143
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
93
- type = input('button', ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
144
+ /**
145
+ * Disables interaction.
146
+ * Applies the native `disabled` attribute on `<button>` and `aria-disabled="true"` plus
147
+ * `tabindex="-1"` on `<a>`.
148
+ *
149
+ * @default false
150
+ */
94
151
  disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
152
+ /**
153
+ * Shows the loading state and blocks interaction.
154
+ * Adds `aria-busy="true"` and reuses disabled behavior while loading, including removing
155
+ * anchors from the tab order.
156
+ *
157
+ * @default false
158
+ */
95
159
  loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
160
+ /**
161
+ * Collapses horizontal padding for icon-only buttons.
162
+ * Provide an accessible name such as `aria-label` when no visible text is present.
163
+ *
164
+ * @default false
165
+ */
96
166
  iconOnly = input(false, ...(ngDevMode ? [{ debugName: "iconOnly" }] : /* istanbul ignore next */ []));
97
- hostClasses = computed(() => `tala-button--${this.variant()} tala-button--${this.size()}`, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
98
- innerClasses = computed(() => [
167
+ isButton = this.el.nativeElement.tagName.toLowerCase() === 'button';
168
+ hostClasses = computed(() => [
99
169
  'tala-button',
170
+ `tala-button--${this.variant()}`,
171
+ `tala-button--${this.size()}`,
100
172
  this.loading() ? 'tala-button--loading' : '',
101
173
  this.iconOnly() ? 'tala-button--icon-only' : '',
102
174
  ]
103
175
  .filter(Boolean)
104
- .join(' '), ...(ngDevMode ? [{ debugName: "innerClasses" }] : /* istanbul ignore next */ []));
105
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: TalaButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
106
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.13", type: TalaButton, isStandalone: true, selector: "tala-button", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()" } }, ngImport: i0, template: "<button\n [class]=\"innerClasses()\"\n [type]=\"type()\"\n [disabled]=\"disabled() || loading()\"\n [attr.aria-busy]=\"loading() || null\"\n>\n @if (loading()) {\n <span class=\"tala-button__spinner\" aria-hidden=\"true\"></span>\n }\n <ng-content select=\"[slot=prefix]\"></ng-content>\n <ng-content></ng-content>\n <ng-content select=\"[slot=suffix]\"></ng-content>\n</button>\n", styles: ["tala-button{display:contents;--tala-button-bg: transparent;--tala-button-color: var(--tala-sys-color-text-primary);--tala-button-border-color: transparent;--tala-button-hover-bg: var(--tala-button-bg);--tala-button-hover-color: var(--tala-button-color);--tala-button-focus-ring-color: var(--tala-sys-color-outline-focus);--tala-button-height: 40px;--tala-button-padding-x: var(--tala-ref-space-4);--tala-button-gap: var(--tala-ref-space-2);--tala-button-font-size: 13px;--tala-button-line-height: 18px;--tala-button-border-radius: var(--tala-ref-radius-md);--tala-button-spinner-size: 16px}tala-button.tala-button--primary{--tala-button-bg: var(--tala-sys-color-surface-inverse);--tala-button-color: var(--tala-sys-color-text-inverse);--tala-button-hover-bg: var(--tala-ref-color-neutral-90)}tala-button.tala-button--secondary{--tala-button-bg: var(--tala-sys-color-surface-default);--tala-button-color: var(--tala-sys-color-text-primary);--tala-button-border-color: var(--tala-sys-color-outline-default);--tala-button-hover-bg: var(--tala-ref-color-neutral-10)}tala-button.tala-button--ghost{--tala-button-color: var(--tala-sys-color-text-primary);--tala-button-hover-bg: var(--tala-ref-color-neutral-10)}tala-button.tala-button--accent{--tala-button-bg: var(--tala-sys-color-brand);--tala-button-color: var(--tala-sys-color-on-brand);--tala-button-hover-bg: var(--tala-sys-color-brand-hover)}tala-button.tala-button--danger{--tala-button-bg: var(--tala-sys-color-error);--tala-button-color: var(--tala-sys-color-on-error);--tala-button-hover-bg: var(--tala-sys-color-error-hover)}tala-button.tala-button--link{--tala-button-color: var(--tala-sys-color-text-link);--tala-button-hover-color: var(--tala-sys-color-brand-hover)}tala-button.tala-button--xs{--tala-button-height: 24px;--tala-button-padding-x: var(--tala-ref-space-2);--tala-button-gap: var(--tala-ref-space-1);--tala-button-font-size: 11px;--tala-button-line-height: 14px;--tala-button-border-radius: var(--tala-ref-radius-sm);--tala-button-spinner-size: 12px}tala-button.tala-button--sm{--tala-button-height: 32px;--tala-button-padding-x: var(--tala-ref-space-3);--tala-button-gap: var(--tala-ref-space-1);--tala-button-font-size: 12px;--tala-button-line-height: 16px;--tala-button-spinner-size: 14px}tala-button.tala-button--lg{--tala-button-height: 48px;--tala-button-padding-x: var(--tala-ref-space-5);--tala-button-font-size: 14px;--tala-button-line-height: 20px;--tala-button-border-radius: var(--tala-ref-radius-lg);--tala-button-spinner-size: 18px}.tala-button{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:var(--tala-button-gap);height:var(--tala-button-height);padding:0 var(--tala-button-padding-x);border:1px solid var(--tala-button-border-color);border-radius:var(--tala-button-border-radius);background-color:var(--tala-button-bg);color:var(--tala-button-color);font-family:var(--tala-ref-type-family-inter);font-size:var(--tala-button-font-size);line-height:var(--tala-button-line-height);font-weight:500;letter-spacing:0px;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;text-decoration:none;box-sizing:border-box;transition:background-color .15s ease,border-color .15s ease,color .15s ease}.tala-button:focus-visible{outline:2px solid var(--tala-button-focus-ring-color);outline-offset:2px}.tala-button.tala-button--icon-only{width:var(--tala-button-height);padding:0}.tala-button:hover:not(:disabled,.tala-button--loading){background-color:var(--tala-button-hover-bg);color:var(--tala-button-hover-color)}.tala-button:disabled:not(.tala-button--loading){opacity:.4;cursor:not-allowed;pointer-events:none}.tala-button--loading{cursor:wait;pointer-events:none}.tala-button__spinner{display:block;width:var(--tala-button-spinner-size);height:var(--tala-button-spinner-size);border-radius:var(--tala-ref-radius-full);border:1.5px solid currentColor;border-top-color:transparent;flex-shrink:0;animation:tala-button-spin .65s linear infinite}@keyframes tala-button-spin{to{transform:rotate(360deg)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
176
+ .join(' '), ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
177
+ onHostClick(event) {
178
+ if (!this.isButton && (this.disabled() || this.loading())) {
179
+ event.preventDefault();
180
+ }
181
+ }
182
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TalaButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
183
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: TalaButton, isStandalone: true, selector: "button[talaButton], a[talaButton]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onHostClick($event)" }, properties: { "class": "hostClasses()", "attr.disabled": "isButton && (disabled() || loading()) ? \"\" : null", "attr.aria-disabled": "!isButton && (disabled() || loading()) ? \"true\" : null", "attr.tabindex": "!isButton && (disabled() || loading()) ? \"-1\" : null", "attr.aria-busy": "loading() ? \"true\" : null" } }, ngImport: i0, template: "@if (loading()) {\n <span class=\"tala-button__spinner\" aria-hidden=\"true\"></span>\n}\n<ng-content select=\"[slot=prefix]\"></ng-content>\n<ng-content></ng-content>\n<ng-content select=\"[slot=suffix]\"></ng-content>\n", styles: [".tala-button{--tala-button-bg: transparent;--tala-button-color: var(--tala-sys-color-text-primary);--tala-button-border-color: transparent;--tala-button-hover-bg: var(--tala-button-bg);--tala-button-hover-color: var(--tala-button-color);--tala-button-active-bg: var(--tala-button-hover-bg);--tala-button-active-color: var(--tala-button-hover-color);--tala-button-focus-ring-color: var(--tala-sys-color-border-focus);--tala-button-focus-glow: none;--tala-button-height: 40px;--tala-button-padding-x: var(--tala-ref-space-4);--tala-button-gap: var(--tala-ref-space-2);--tala-button-font-size: 13px;--tala-button-line-height: 18px;--tala-button-border-radius: var(--tala-ref-radius-md);--tala-button-spinner-size: 16px;appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:var(--tala-button-gap);height:var(--tala-button-height);padding:0 var(--tala-button-padding-x);border:1px solid var(--tala-button-border-color);border-radius:var(--tala-button-border-radius);background-color:var(--tala-button-bg);color:var(--tala-button-color);font-family:var(--tala-ref-type-family-inter);font-size:var(--tala-button-font-size);line-height:var(--tala-button-line-height);font-weight:500;letter-spacing:0px;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;text-decoration:none;box-sizing:border-box;transition:background-color .15s ease,border-color .15s ease,color .15s ease}.tala-button:focus-visible{outline:2px solid var(--tala-button-focus-ring-color);outline-offset:2px;box-shadow:var(--tala-button-focus-glow)}.tala-button.tala-button--icon-only{width:var(--tala-button-height);padding:0}.tala-button.tala-button--primary{--tala-button-bg: var(--tala-sys-color-action-primary-bg);--tala-button-color: var(--tala-sys-color-action-primary-text);--tala-button-hover-bg: var(--tala-sys-color-action-primary-hover);--tala-button-active-bg: var(--tala-ref-color-neutral-80);--tala-button-focus-glow: 0 0 0 4px color-mix(in srgb, var(--tala-sys-color-action-primary-bg) 22%, transparent)}.tala-button.tala-button--secondary{--tala-button-bg: var(--tala-sys-color-action-secondary-bg);--tala-button-color: var(--tala-sys-color-action-secondary-text);--tala-button-border-color: var(--tala-sys-color-action-secondary-border);--tala-button-hover-bg: var(--tala-sys-color-action-secondary-hover);--tala-button-focus-glow: 0 0 0 4px color-mix(in srgb, var(--tala-ref-color-neutral-100) 15%, transparent)}.tala-button.tala-button--ghost{--tala-button-color: var(--tala-sys-color-text-primary);--tala-button-hover-bg: var(--tala-sys-color-action-ghost-hover);--tala-button-active-bg: var(--tala-sys-color-action-secondary-hover)}.tala-button.tala-button--ghost:focus-visible{border-color:var(--tala-sys-color-border-default)}.tala-button.tala-button--accent{--tala-button-bg: var(--tala-sys-color-action-accent-bg);--tala-button-color: var(--tala-sys-color-action-accent-text);--tala-button-hover-bg: var(--tala-ref-color-red-60);--tala-button-active-bg: var(--tala-ref-color-red-70)}.tala-button.tala-button--danger{--tala-button-bg: var(--tala-sys-color-action-danger-bg);--tala-button-color: var(--tala-sys-color-action-danger-text);--tala-button-hover-bg: var(--tala-ref-color-red-70);--tala-button-active-bg: var(--tala-ref-color-red-80);--tala-button-focus-glow: 0 0 0 4px color-mix(in srgb, var(--tala-sys-color-action-danger-bg) 25%, transparent)}.tala-button.tala-button--link{--tala-button-color: var(--tala-sys-color-text-link);--tala-button-hover-color: var(--tala-ref-color-red-60);--tala-button-active-color: var(--tala-ref-color-red-70)}.tala-button.tala-button--xs{--tala-button-height: 24px;--tala-button-padding-x: var(--tala-ref-space-2);--tala-button-gap: var(--tala-ref-space-1);--tala-button-font-size: 11px;--tala-button-line-height: 14px;--tala-button-border-radius: var(--tala-ref-radius-sm);--tala-button-spinner-size: 12px}.tala-button.tala-button--sm{--tala-button-height: 32px;--tala-button-padding-x: var(--tala-ref-space-3);--tala-button-gap: var(--tala-ref-space-1);--tala-button-font-size: 12px;--tala-button-line-height: 16px;--tala-button-spinner-size: 14px}.tala-button.tala-button--lg{--tala-button-height: 48px;--tala-button-padding-x: var(--tala-ref-space-5);--tala-button-font-size: 14px;--tala-button-line-height: 20px;--tala-button-border-radius: var(--tala-ref-radius-lg);--tala-button-spinner-size: 18px}.tala-button:hover:not(:disabled,[aria-disabled=true],.tala-button--loading){background-color:var(--tala-button-hover-bg);color:var(--tala-button-hover-color)}.tala-button:active:not(:disabled,[aria-disabled=true],.tala-button--loading){background-color:var(--tala-button-active-bg);color:var(--tala-button-active-color)}.tala-button:disabled:not(.tala-button--loading),.tala-button[aria-disabled=true]:not(.tala-button--loading){opacity:.4;cursor:not-allowed;pointer-events:none}.tala-button.tala-button--loading{cursor:wait;pointer-events:none}.tala-button__spinner{display:block;width:var(--tala-button-spinner-size);height:var(--tala-button-spinner-size);border-radius:var(--tala-ref-radius-full);border:1.5px solid currentColor;border-top-color:transparent;flex-shrink:0;animation:tala-button-spin .65s linear infinite}@keyframes tala-button-spin{to{transform:rotate(360deg)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
107
184
  }
108
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: TalaButton, decorators: [{
185
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TalaButton, decorators: [{
109
186
  type: Component,
110
- args: [{ selector: 'tala-button', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
187
+ args: [{ selector: 'button[talaButton], a[talaButton]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
111
188
  '[class]': 'hostClasses()',
112
- }, template: "<button\n [class]=\"innerClasses()\"\n [type]=\"type()\"\n [disabled]=\"disabled() || loading()\"\n [attr.aria-busy]=\"loading() || null\"\n>\n @if (loading()) {\n <span class=\"tala-button__spinner\" aria-hidden=\"true\"></span>\n }\n <ng-content select=\"[slot=prefix]\"></ng-content>\n <ng-content></ng-content>\n <ng-content select=\"[slot=suffix]\"></ng-content>\n</button>\n", styles: ["tala-button{display:contents;--tala-button-bg: transparent;--tala-button-color: var(--tala-sys-color-text-primary);--tala-button-border-color: transparent;--tala-button-hover-bg: var(--tala-button-bg);--tala-button-hover-color: var(--tala-button-color);--tala-button-focus-ring-color: var(--tala-sys-color-outline-focus);--tala-button-height: 40px;--tala-button-padding-x: var(--tala-ref-space-4);--tala-button-gap: var(--tala-ref-space-2);--tala-button-font-size: 13px;--tala-button-line-height: 18px;--tala-button-border-radius: var(--tala-ref-radius-md);--tala-button-spinner-size: 16px}tala-button.tala-button--primary{--tala-button-bg: var(--tala-sys-color-surface-inverse);--tala-button-color: var(--tala-sys-color-text-inverse);--tala-button-hover-bg: var(--tala-ref-color-neutral-90)}tala-button.tala-button--secondary{--tala-button-bg: var(--tala-sys-color-surface-default);--tala-button-color: var(--tala-sys-color-text-primary);--tala-button-border-color: var(--tala-sys-color-outline-default);--tala-button-hover-bg: var(--tala-ref-color-neutral-10)}tala-button.tala-button--ghost{--tala-button-color: var(--tala-sys-color-text-primary);--tala-button-hover-bg: var(--tala-ref-color-neutral-10)}tala-button.tala-button--accent{--tala-button-bg: var(--tala-sys-color-brand);--tala-button-color: var(--tala-sys-color-on-brand);--tala-button-hover-bg: var(--tala-sys-color-brand-hover)}tala-button.tala-button--danger{--tala-button-bg: var(--tala-sys-color-error);--tala-button-color: var(--tala-sys-color-on-error);--tala-button-hover-bg: var(--tala-sys-color-error-hover)}tala-button.tala-button--link{--tala-button-color: var(--tala-sys-color-text-link);--tala-button-hover-color: var(--tala-sys-color-brand-hover)}tala-button.tala-button--xs{--tala-button-height: 24px;--tala-button-padding-x: var(--tala-ref-space-2);--tala-button-gap: var(--tala-ref-space-1);--tala-button-font-size: 11px;--tala-button-line-height: 14px;--tala-button-border-radius: var(--tala-ref-radius-sm);--tala-button-spinner-size: 12px}tala-button.tala-button--sm{--tala-button-height: 32px;--tala-button-padding-x: var(--tala-ref-space-3);--tala-button-gap: var(--tala-ref-space-1);--tala-button-font-size: 12px;--tala-button-line-height: 16px;--tala-button-spinner-size: 14px}tala-button.tala-button--lg{--tala-button-height: 48px;--tala-button-padding-x: var(--tala-ref-space-5);--tala-button-font-size: 14px;--tala-button-line-height: 20px;--tala-button-border-radius: var(--tala-ref-radius-lg);--tala-button-spinner-size: 18px}.tala-button{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:var(--tala-button-gap);height:var(--tala-button-height);padding:0 var(--tala-button-padding-x);border:1px solid var(--tala-button-border-color);border-radius:var(--tala-button-border-radius);background-color:var(--tala-button-bg);color:var(--tala-button-color);font-family:var(--tala-ref-type-family-inter);font-size:var(--tala-button-font-size);line-height:var(--tala-button-line-height);font-weight:500;letter-spacing:0px;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;text-decoration:none;box-sizing:border-box;transition:background-color .15s ease,border-color .15s ease,color .15s ease}.tala-button:focus-visible{outline:2px solid var(--tala-button-focus-ring-color);outline-offset:2px}.tala-button.tala-button--icon-only{width:var(--tala-button-height);padding:0}.tala-button:hover:not(:disabled,.tala-button--loading){background-color:var(--tala-button-hover-bg);color:var(--tala-button-hover-color)}.tala-button:disabled:not(.tala-button--loading){opacity:.4;cursor:not-allowed;pointer-events:none}.tala-button--loading{cursor:wait;pointer-events:none}.tala-button__spinner{display:block;width:var(--tala-button-spinner-size);height:var(--tala-button-spinner-size);border-radius:var(--tala-ref-radius-full);border:1.5px solid currentColor;border-top-color:transparent;flex-shrink:0;animation:tala-button-spin .65s linear infinite}@keyframes tala-button-spin{to{transform:rotate(360deg)}}\n"] }]
113
- }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], iconOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOnly", required: false }] }] } });
189
+ '[attr.disabled]': 'isButton && (disabled() || loading()) ? "" : null',
190
+ '[attr.aria-disabled]': '!isButton && (disabled() || loading()) ? "true" : null',
191
+ '[attr.tabindex]': '!isButton && (disabled() || loading()) ? "-1" : null',
192
+ '[attr.aria-busy]': 'loading() ? "true" : null',
193
+ '(click)': 'onHostClick($event)',
194
+ }, template: "@if (loading()) {\n <span class=\"tala-button__spinner\" aria-hidden=\"true\"></span>\n}\n<ng-content select=\"[slot=prefix]\"></ng-content>\n<ng-content></ng-content>\n<ng-content select=\"[slot=suffix]\"></ng-content>\n", styles: [".tala-button{--tala-button-bg: transparent;--tala-button-color: var(--tala-sys-color-text-primary);--tala-button-border-color: transparent;--tala-button-hover-bg: var(--tala-button-bg);--tala-button-hover-color: var(--tala-button-color);--tala-button-active-bg: var(--tala-button-hover-bg);--tala-button-active-color: var(--tala-button-hover-color);--tala-button-focus-ring-color: var(--tala-sys-color-border-focus);--tala-button-focus-glow: none;--tala-button-height: 40px;--tala-button-padding-x: var(--tala-ref-space-4);--tala-button-gap: var(--tala-ref-space-2);--tala-button-font-size: 13px;--tala-button-line-height: 18px;--tala-button-border-radius: var(--tala-ref-radius-md);--tala-button-spinner-size: 16px;appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:var(--tala-button-gap);height:var(--tala-button-height);padding:0 var(--tala-button-padding-x);border:1px solid var(--tala-button-border-color);border-radius:var(--tala-button-border-radius);background-color:var(--tala-button-bg);color:var(--tala-button-color);font-family:var(--tala-ref-type-family-inter);font-size:var(--tala-button-font-size);line-height:var(--tala-button-line-height);font-weight:500;letter-spacing:0px;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;text-decoration:none;box-sizing:border-box;transition:background-color .15s ease,border-color .15s ease,color .15s ease}.tala-button:focus-visible{outline:2px solid var(--tala-button-focus-ring-color);outline-offset:2px;box-shadow:var(--tala-button-focus-glow)}.tala-button.tala-button--icon-only{width:var(--tala-button-height);padding:0}.tala-button.tala-button--primary{--tala-button-bg: var(--tala-sys-color-action-primary-bg);--tala-button-color: var(--tala-sys-color-action-primary-text);--tala-button-hover-bg: var(--tala-sys-color-action-primary-hover);--tala-button-active-bg: var(--tala-ref-color-neutral-80);--tala-button-focus-glow: 0 0 0 4px color-mix(in srgb, var(--tala-sys-color-action-primary-bg) 22%, transparent)}.tala-button.tala-button--secondary{--tala-button-bg: var(--tala-sys-color-action-secondary-bg);--tala-button-color: var(--tala-sys-color-action-secondary-text);--tala-button-border-color: var(--tala-sys-color-action-secondary-border);--tala-button-hover-bg: var(--tala-sys-color-action-secondary-hover);--tala-button-focus-glow: 0 0 0 4px color-mix(in srgb, var(--tala-ref-color-neutral-100) 15%, transparent)}.tala-button.tala-button--ghost{--tala-button-color: var(--tala-sys-color-text-primary);--tala-button-hover-bg: var(--tala-sys-color-action-ghost-hover);--tala-button-active-bg: var(--tala-sys-color-action-secondary-hover)}.tala-button.tala-button--ghost:focus-visible{border-color:var(--tala-sys-color-border-default)}.tala-button.tala-button--accent{--tala-button-bg: var(--tala-sys-color-action-accent-bg);--tala-button-color: var(--tala-sys-color-action-accent-text);--tala-button-hover-bg: var(--tala-ref-color-red-60);--tala-button-active-bg: var(--tala-ref-color-red-70)}.tala-button.tala-button--danger{--tala-button-bg: var(--tala-sys-color-action-danger-bg);--tala-button-color: var(--tala-sys-color-action-danger-text);--tala-button-hover-bg: var(--tala-ref-color-red-70);--tala-button-active-bg: var(--tala-ref-color-red-80);--tala-button-focus-glow: 0 0 0 4px color-mix(in srgb, var(--tala-sys-color-action-danger-bg) 25%, transparent)}.tala-button.tala-button--link{--tala-button-color: var(--tala-sys-color-text-link);--tala-button-hover-color: var(--tala-ref-color-red-60);--tala-button-active-color: var(--tala-ref-color-red-70)}.tala-button.tala-button--xs{--tala-button-height: 24px;--tala-button-padding-x: var(--tala-ref-space-2);--tala-button-gap: var(--tala-ref-space-1);--tala-button-font-size: 11px;--tala-button-line-height: 14px;--tala-button-border-radius: var(--tala-ref-radius-sm);--tala-button-spinner-size: 12px}.tala-button.tala-button--sm{--tala-button-height: 32px;--tala-button-padding-x: var(--tala-ref-space-3);--tala-button-gap: var(--tala-ref-space-1);--tala-button-font-size: 12px;--tala-button-line-height: 16px;--tala-button-spinner-size: 14px}.tala-button.tala-button--lg{--tala-button-height: 48px;--tala-button-padding-x: var(--tala-ref-space-5);--tala-button-font-size: 14px;--tala-button-line-height: 20px;--tala-button-border-radius: var(--tala-ref-radius-lg);--tala-button-spinner-size: 18px}.tala-button:hover:not(:disabled,[aria-disabled=true],.tala-button--loading){background-color:var(--tala-button-hover-bg);color:var(--tala-button-hover-color)}.tala-button:active:not(:disabled,[aria-disabled=true],.tala-button--loading){background-color:var(--tala-button-active-bg);color:var(--tala-button-active-color)}.tala-button:disabled:not(.tala-button--loading),.tala-button[aria-disabled=true]:not(.tala-button--loading){opacity:.4;cursor:not-allowed;pointer-events:none}.tala-button.tala-button--loading{cursor:wait;pointer-events:none}.tala-button__spinner{display:block;width:var(--tala-button-spinner-size);height:var(--tala-button-spinner-size);border-radius:var(--tala-ref-radius-full);border:1.5px solid currentColor;border-top-color:transparent;flex-shrink:0;animation:tala-button-spin .65s linear infinite}@keyframes tala-button-spin{to{transform:rotate(360deg)}}\n"] }]
195
+ }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], iconOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOnly", required: false }] }] } });
114
196
 
115
- class TalaInput {
197
+ const TALA_FORM_FIELD_CONTROL = new InjectionToken('TALA_FORM_FIELD_CONTROL');
198
+ const TALA_FORM_FIELD_HOST = new InjectionToken('TALA_FORM_FIELD_HOST');
199
+
200
+ class TalaFormField {
116
201
  static _nextId = 0;
117
- size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
118
- status = input('default', ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
119
- label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
120
- placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
121
- helperText = input('', ...(ngDevMode ? [{ debugName: "helperText" }] : /* istanbul ignore next */ []));
122
- required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
123
- disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
124
- readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
125
- prefix = input('', ...(ngDevMode ? [{ debugName: "prefix" }] : /* istanbul ignore next */ []));
126
- suffix = input('', ...(ngDevMode ? [{ debugName: "suffix" }] : /* istanbul ignore next */ []));
127
- type = input('text', ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
128
- name = input('', ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
129
- _id = `tala-input-${++TalaInput._nextId}`;
202
+ _id = `tala-form-field-${++TalaFormField._nextId}`;
130
203
  _helperId = `${this._id}-helper`;
131
- _value = signal('', ...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
132
- _disabledByForm = signal(false, ...(ngDevMode ? [{ debugName: "_disabledByForm" }] : /* istanbul ignore next */ []));
133
- _isDisabled = computed(() => this.disabled() || this._disabledByForm(), ...(ngDevMode ? [{ debugName: "_isDisabled" }] : /* istanbul ignore next */ []));
204
+ _control = contentChild(TALA_FORM_FIELD_CONTROL, ...(ngDevMode ? [{ debugName: "_control" }] : /* istanbul ignore next */ []));
205
+ _controlId = computed(() => this._control()?.id(), ...(ngDevMode ? [{ debugName: "_controlId" }] : /* istanbul ignore next */ []));
206
+ _status = computed(() => this._control()?.status() ?? 'default', ...(ngDevMode ? [{ debugName: "_status" }] : /* istanbul ignore next */ []));
207
+ _size = computed(() => this._control()?.size() ?? 'md', ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
208
+ _required = computed(() => this._control()?.required() ?? false, ...(ngDevMode ? [{ debugName: "_required" }] : /* istanbul ignore next */ []));
209
+ _isDisabled = computed(() => this._control()?.disabled() ?? false, ...(ngDevMode ? [{ debugName: "_isDisabled" }] : /* istanbul ignore next */ []));
210
+ _isReadonly = computed(() => this._control()?.readonly() ?? false, ...(ngDevMode ? [{ debugName: "_isReadonly" }] : /* istanbul ignore next */ []));
211
+ helperId = computed(() => this._helperId, ...(ngDevMode ? [{ debugName: "helperId" }] : /* istanbul ignore next */ []));
134
212
  hostClasses = computed(() => [
135
- 'tala-input',
136
- `tala-input--${this.size()}`,
137
- `tala-input--${this.status()}`,
138
- this._isDisabled() ? 'tala-input--disabled' : '',
139
- this.readonly() ? 'tala-input--readonly' : '',
213
+ 'tala-form-field',
214
+ `tala-form-field--${this._size()}`,
215
+ `tala-form-field--${this._status()}`,
216
+ this._isDisabled() ? 'tala-form-field--disabled' : '',
217
+ this._isReadonly() ? 'tala-form-field--readonly' : '',
140
218
  ]
141
219
  .filter(Boolean)
142
220
  .join(' '), ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
143
- _onChange = () => { };
144
- _onTouched = () => { };
145
- writeValue(value) {
146
- this._value.set(value ?? '');
147
- }
148
- registerOnChange(fn) {
149
- this._onChange = fn;
150
- }
151
- registerOnTouched(fn) {
152
- this._onTouched = fn;
153
- }
154
- setDisabledState(isDisabled) {
155
- this._disabledByForm.set(isDisabled);
156
- }
157
- _onInput(event) {
158
- const value = event.target.value;
159
- this._value.set(value);
160
- this._onChange(value);
161
- }
162
- _onBlur() {
163
- this._onTouched();
164
- }
165
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: TalaInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
166
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.13", type: TalaInput, isStandalone: true, selector: "tala-input", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, helperText: { classPropertyName: "helperText", publicName: "helperText", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()" } }, providers: [
221
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TalaFormField, deps: [], target: i0.ɵɵFactoryTarget.Component });
222
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: TalaFormField, isStandalone: true, selector: "tala-form-field", host: { properties: { "class": "hostClasses()" } }, providers: [
167
223
  {
168
- provide: NG_VALUE_ACCESSOR,
169
- useExisting: forwardRef(() => TalaInput),
170
- multi: true,
224
+ provide: TALA_FORM_FIELD_HOST,
225
+ useExisting: TalaFormField,
171
226
  },
172
- ], ngImport: i0, template: "@if (label()) {\n <div class=\"tala-input__label-row\">\n <label class=\"tala-input__label\" [attr.for]=\"_id\">{{ label() }}</label>\n @if (required()) {\n <span class=\"tala-input__required\" aria-hidden=\"true\">*</span>\n }\n </div>\n}\n\n<div\n class=\"tala-input__container\"\n [class.tala-input__container--has-prefix]=\"prefix()\"\n [class.tala-input__container--has-suffix]=\"suffix()\"\n>\n @if (prefix()) {\n <div class=\"tala-input__prefix\">{{ prefix() }}</div>\n }\n <ng-content select=\"[slot=leading-icon]\"></ng-content>\n <input\n class=\"tala-input__field\"\n [id]=\"_id\"\n [type]=\"type()\"\n [name]=\"name()\"\n [placeholder]=\"placeholder()\"\n [value]=\"_value()\"\n [disabled]=\"_isDisabled()\"\n [attr.readonly]=\"readonly() || null\"\n [required]=\"required()\"\n [attr.aria-invalid]=\"status() === 'error' || null\"\n [attr.aria-describedby]=\"helperText() && !_isDisabled() ? _helperId : null\"\n (input)=\"_onInput($event)\"\n (blur)=\"_onBlur()\"\n />\n <ng-content select=\"[slot=trailing-icon]\"></ng-content>\n @if (suffix()) {\n <div class=\"tala-input__suffix\">{{ suffix() }}</div>\n }\n</div>\n\n@if (helperText() && !_isDisabled()) {\n <div class=\"tala-input__helper-row\" [id]=\"_helperId\">\n <span class=\"tala-input__helper\">{{ helperText() }}</span>\n </div>\n}\n", styles: ["tala-input{--tala-input-bg: var(--tala-sys-color-surface-default);--tala-input-border-color: var(--tala-sys-color-outline-default);--tala-input-color: var(--tala-sys-color-text-primary);--tala-input-placeholder-color: var(--tala-sys-color-text-placeholder);--tala-input-label-color: var(--tala-sys-color-text-secondary);--tala-input-helper-color: var(--tala-sys-color-text-secondary);--tala-input-prefix-bg: var(--tala-sys-color-surface-sunken);--tala-input-prefix-color: var(--tala-sys-color-text-secondary);--tala-input-required-color: var(--tala-sys-color-brand);--tala-input-focus-ring: 0 0 0 3px rgba(9, 9, 13, .1);--tala-input-height: 40px;--tala-input-padding-x: 12px;--tala-input-icon-size: 16px;--tala-input-border-radius: var(--tala-ref-radius-md);--tala-input-gap: var(--tala-ref-space-2);display:flex;flex-direction:column;gap:var(--tala-ref-space-1);box-sizing:border-box}.tala-input__label-row{display:flex;align-items:center;gap:var(--tala-ref-space-1);height:20px;overflow:hidden;white-space:nowrap}.tala-input__label{font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:500;color:var(--tala-input-label-color);cursor:pointer}.tala-input__required{font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:500;color:var(--tala-input-required-color)}.tala-input__container{display:flex;align-items:center;gap:var(--tala-input-gap);height:var(--tala-input-height);padding:0 var(--tala-input-padding-x);border:1px solid var(--tala-input-border-color);border-radius:var(--tala-input-border-radius);background-color:var(--tala-input-bg);overflow:hidden;box-sizing:border-box;transition:border-color .15s ease,box-shadow .15s ease}.tala-input__container--has-prefix{padding-left:0}.tala-input__container--has-suffix{padding-right:0}tala-input:not(.tala-input--disabled,.tala-input--readonly) .tala-input__container:hover{border-color:var(--tala-sys-color-outline-strong)}tala-input:not(.tala-input--disabled) .tala-input__container:focus-within{border-color:var(--tala-sys-color-outline-focus);box-shadow:var(--tala-input-focus-ring)}.tala-input__field{flex:1 0 0;min-width:0;height:100%;padding:0;border:none;outline:none;background:transparent;font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:400;color:var(--tala-input-color);box-sizing:border-box}.tala-input__field::placeholder{color:var(--tala-input-placeholder-color)}.tala-input__field:disabled{cursor:not-allowed}.tala-input__prefix,.tala-input__suffix{display:flex;align-items:center;justify-content:center;align-self:stretch;padding:0 var(--tala-input-padding-x);background-color:var(--tala-input-prefix-bg);color:var(--tala-input-prefix-color);font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:400;white-space:nowrap;flex-shrink:0}.tala-input__prefix{border-right:1px solid var(--tala-input-border-color)}.tala-input__suffix{border-left:1px solid var(--tala-input-border-color)}tala-input [slot=leading-icon],tala-input [slot=trailing-icon]{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--tala-input-icon-size);height:var(--tala-input-icon-size);color:var(--tala-sys-color-text-tertiary)}tala-input [slot=leading-icon] svg,tala-input [slot=trailing-icon] svg{width:100%;height:100%}.tala-input__helper-row{display:flex;align-items:flex-start;min-height:16px}.tala-input__helper{font-family:var(--tala-ref-type-family-inter);font-size:12px;line-height:16px;font-weight:400;color:var(--tala-input-helper-color)}tala-input.tala-input--sm{--tala-input-height: 32px;--tala-input-padding-x: 10px;--tala-input-icon-size: 14px}tala-input.tala-input--lg{--tala-input-height: 48px;--tala-input-padding-x: 14px;--tala-input-icon-size: 18px;--tala-input-border-radius: var(--tala-ref-radius-lg)}tala-input.tala-input--error{--tala-input-border-color: var(--tala-sys-color-error-outline);--tala-input-helper-color: var(--tala-sys-color-error-text)}tala-input.tala-input--success{--tala-input-border-color: var(--tala-sys-color-success-outline);--tala-input-helper-color: var(--tala-sys-color-success-text)}tala-input.tala-input--warning{--tala-input-border-color: var(--tala-sys-color-warning-outline);--tala-input-helper-color: var(--tala-sys-color-warning-text)}tala-input.tala-input--disabled{--tala-input-bg: var(--tala-sys-color-surface-sunken);--tala-input-color: var(--tala-sys-color-text-disabled);--tala-input-placeholder-color: var(--tala-sys-color-text-disabled);--tala-input-label-color: var(--tala-sys-color-text-disabled);--tala-input-prefix-color: var(--tala-sys-color-text-disabled);pointer-events:none}tala-input.tala-input--readonly{--tala-input-bg: var(--tala-sys-color-surface-sunken)}tala-input.tala-input--readonly .tala-input__field{cursor:default}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
227
+ ], queries: [{ propertyName: "_control", first: true, predicate: TALA_FORM_FIELD_CONTROL, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"tala-form-field__label-row\">\n <label class=\"tala-form-field__label\" [attr.for]=\"_controlId()\">\n <ng-content select=\"[slot=label]\"></ng-content>\n </label>\n @if (_required()) {\n <span class=\"tala-form-field__required\" aria-hidden=\"true\">*</span>\n }\n</div>\n\n<div class=\"tala-form-field__container\">\n <div class=\"tala-form-field__prefix\">\n <ng-content select=\"[slot=prefix]\"></ng-content>\n </div>\n <ng-content select=\"[slot=leading-icon]\"></ng-content>\n <ng-content></ng-content>\n <ng-content select=\"[slot=trailing-icon]\"></ng-content>\n @if (_status() === 'error' || _status() === 'warning') {\n <svg\n class=\"tala-form-field__status-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n d=\"M12 2c5.523 0 10 4.477 10 10a10 10 0 0 1 -19.995 .324l-.005 -.324l.004 -.28c.148 -5.393 4.566 -9.72 9.996 -9.72zm.01 13l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-.01 -8a1 1 0 0 0 -.993 .883l-.007 .117v4l.007 .117a1 1 0 0 0 1.986 0l.007 -.117v-4l-.007 -.117a1 1 0 0 0 -.993 -.883z\"\n />\n </svg>\n }\n @if (_status() === 'success') {\n <svg\n class=\"tala-form-field__status-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n d=\"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z\"\n />\n </svg>\n }\n <div class=\"tala-form-field__suffix\">\n <ng-content select=\"[slot=suffix]\"></ng-content>\n </div>\n</div>\n\n<div class=\"tala-form-field__helper-row\" [id]=\"_helperId\">\n <span class=\"tala-form-field__helper\">\n <ng-content select=\"[slot=helper]\"></ng-content>\n </span>\n</div>\n", styles: ["tala-form-field{--tala-form-field-bg: var(--tala-sys-color-surface-default);--tala-form-field-border-color: var(--tala-sys-color-border-default);--tala-form-field-label-color: var(--tala-sys-color-text-secondary);--tala-form-field-helper-color: var(--tala-sys-color-text-secondary);--tala-form-field-prefix-bg: var(--tala-sys-color-surface-sunken);--tala-form-field-prefix-color: var(--tala-sys-color-text-secondary);--tala-form-field-required-color: var(--tala-sys-color-text-accent);--tala-form-field-focus-ring: 0 0 0 3px rgba(9, 9, 13, .1);--tala-form-field-height: 40px;--tala-form-field-padding-x: 12px;--tala-form-field-icon-size: 16px;--tala-form-field-border-radius: var(--tala-ref-radius-md);--tala-form-field-gap: var(--tala-ref-space-2);display:flex;flex-direction:column;gap:var(--tala-ref-space-1);box-sizing:border-box}.tala-form-field__label-row{display:flex;align-items:center;gap:var(--tala-ref-space-1);height:20px;overflow:hidden;white-space:nowrap}.tala-form-field__label-row:has(.tala-form-field__label:empty){display:none}.tala-form-field__label{font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:500;color:var(--tala-form-field-label-color);cursor:pointer}.tala-form-field__required{font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:500;color:var(--tala-form-field-required-color)}.tala-form-field__container{display:flex;align-items:center;gap:var(--tala-form-field-gap);height:var(--tala-form-field-height);padding:0 var(--tala-form-field-padding-x);border:1px solid var(--tala-form-field-border-color);border-radius:var(--tala-form-field-border-radius);background-color:var(--tala-form-field-bg);overflow:hidden;box-sizing:border-box;transition:border-color .15s ease,box-shadow .15s ease}.tala-form-field__container:has(.tala-form-field__prefix:not(:empty)){padding-left:0}.tala-form-field__container:has(.tala-form-field__suffix:not(:empty)){padding-right:0}tala-form-field:not(.tala-form-field--disabled,.tala-form-field--readonly) .tala-form-field__container:hover{border-color:var(--tala-sys-color-border-strong)}tala-form-field:not(.tala-form-field--disabled) .tala-form-field__container:focus-within{border-color:var(--tala-sys-color-border-focus);box-shadow:var(--tala-form-field-focus-ring)}.tala-form-field__prefix,.tala-form-field__suffix{display:flex;align-items:center;justify-content:center;align-self:stretch;padding:0 var(--tala-form-field-padding-x);background-color:var(--tala-form-field-prefix-bg);color:var(--tala-form-field-prefix-color);font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:400;white-space:nowrap;flex-shrink:0}.tala-form-field__prefix{border-right:1px solid var(--tala-form-field-border-color)}.tala-form-field__suffix{border-left:1px solid var(--tala-form-field-border-color)}.tala-form-field__prefix:empty,.tala-form-field__suffix:empty{display:none}tala-form-field [slot=leading-icon],tala-form-field [slot=trailing-icon]{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--tala-form-field-icon-size);height:var(--tala-form-field-icon-size);color:var(--tala-sys-color-text-tertiary)}tala-form-field [slot=leading-icon] svg,tala-form-field [slot=trailing-icon] svg{width:100%;height:100%}.tala-form-field__status-icon{flex-shrink:0;width:var(--tala-form-field-icon-size);height:var(--tala-form-field-icon-size);color:var(--tala-form-field-helper-color)}.tala-form-field__container:has(>[slot=trailing-icon]) .tala-form-field__status-icon{display:none}.tala-form-field__helper-row{display:flex;align-items:flex-start;min-height:16px}.tala-form-field__helper-row:has(.tala-form-field__helper:empty){display:none}.tala-form-field__helper{font-family:var(--tala-ref-type-family-inter);font-size:12px;line-height:16px;font-weight:400;color:var(--tala-form-field-helper-color)}tala-form-field.tala-form-field--sm{--tala-form-field-height: 32px;--tala-form-field-padding-x: 10px;--tala-form-field-icon-size: 14px}tala-form-field.tala-form-field--lg{--tala-form-field-height: 48px;--tala-form-field-padding-x: 14px;--tala-form-field-icon-size: 18px;--tala-form-field-border-radius: var(--tala-ref-radius-lg)}tala-form-field.tala-form-field--error{--tala-form-field-bg: var(--tala-sys-color-feedback-danger-bg);--tala-form-field-border-color: var(--tala-sys-color-border-error);--tala-form-field-helper-color: var(--tala-sys-color-feedback-danger-text)}tala-form-field.tala-form-field--success{--tala-form-field-bg: var(--tala-sys-color-feedback-success-bg);--tala-form-field-border-color: var(--tala-sys-color-feedback-success-border);--tala-form-field-helper-color: var(--tala-sys-color-feedback-success-text)}tala-form-field.tala-form-field--warning{--tala-form-field-bg: var(--tala-sys-color-feedback-warning-bg);--tala-form-field-border-color: var(--tala-sys-color-feedback-warning-border);--tala-form-field-helper-color: var(--tala-sys-color-feedback-warning-text)}tala-form-field.tala-form-field--disabled{--tala-form-field-bg: var(--tala-sys-color-surface-sunken);--tala-form-field-label-color: var(--tala-sys-color-text-disabled);--tala-form-field-prefix-color: var(--tala-sys-color-text-disabled);--tala-form-field-helper-color: var(--tala-sys-color-text-disabled);pointer-events:none}tala-form-field.tala-form-field--readonly{--tala-form-field-bg: var(--tala-sys-color-surface-sunken)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
173
228
  }
174
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: TalaInput, decorators: [{
229
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TalaFormField, decorators: [{
175
230
  type: Component,
176
- args: [{ selector: 'tala-input', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
231
+ args: [{ selector: 'tala-form-field', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
177
232
  '[class]': 'hostClasses()',
178
233
  }, providers: [
179
234
  {
180
- provide: NG_VALUE_ACCESSOR,
181
- useExisting: forwardRef(() => TalaInput),
182
- multi: true,
235
+ provide: TALA_FORM_FIELD_HOST,
236
+ useExisting: TalaFormField,
183
237
  },
184
- ], template: "@if (label()) {\n <div class=\"tala-input__label-row\">\n <label class=\"tala-input__label\" [attr.for]=\"_id\">{{ label() }}</label>\n @if (required()) {\n <span class=\"tala-input__required\" aria-hidden=\"true\">*</span>\n }\n </div>\n}\n\n<div\n class=\"tala-input__container\"\n [class.tala-input__container--has-prefix]=\"prefix()\"\n [class.tala-input__container--has-suffix]=\"suffix()\"\n>\n @if (prefix()) {\n <div class=\"tala-input__prefix\">{{ prefix() }}</div>\n }\n <ng-content select=\"[slot=leading-icon]\"></ng-content>\n <input\n class=\"tala-input__field\"\n [id]=\"_id\"\n [type]=\"type()\"\n [name]=\"name()\"\n [placeholder]=\"placeholder()\"\n [value]=\"_value()\"\n [disabled]=\"_isDisabled()\"\n [attr.readonly]=\"readonly() || null\"\n [required]=\"required()\"\n [attr.aria-invalid]=\"status() === 'error' || null\"\n [attr.aria-describedby]=\"helperText() && !_isDisabled() ? _helperId : null\"\n (input)=\"_onInput($event)\"\n (blur)=\"_onBlur()\"\n />\n <ng-content select=\"[slot=trailing-icon]\"></ng-content>\n @if (suffix()) {\n <div class=\"tala-input__suffix\">{{ suffix() }}</div>\n }\n</div>\n\n@if (helperText() && !_isDisabled()) {\n <div class=\"tala-input__helper-row\" [id]=\"_helperId\">\n <span class=\"tala-input__helper\">{{ helperText() }}</span>\n </div>\n}\n", styles: ["tala-input{--tala-input-bg: var(--tala-sys-color-surface-default);--tala-input-border-color: var(--tala-sys-color-outline-default);--tala-input-color: var(--tala-sys-color-text-primary);--tala-input-placeholder-color: var(--tala-sys-color-text-placeholder);--tala-input-label-color: var(--tala-sys-color-text-secondary);--tala-input-helper-color: var(--tala-sys-color-text-secondary);--tala-input-prefix-bg: var(--tala-sys-color-surface-sunken);--tala-input-prefix-color: var(--tala-sys-color-text-secondary);--tala-input-required-color: var(--tala-sys-color-brand);--tala-input-focus-ring: 0 0 0 3px rgba(9, 9, 13, .1);--tala-input-height: 40px;--tala-input-padding-x: 12px;--tala-input-icon-size: 16px;--tala-input-border-radius: var(--tala-ref-radius-md);--tala-input-gap: var(--tala-ref-space-2);display:flex;flex-direction:column;gap:var(--tala-ref-space-1);box-sizing:border-box}.tala-input__label-row{display:flex;align-items:center;gap:var(--tala-ref-space-1);height:20px;overflow:hidden;white-space:nowrap}.tala-input__label{font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:500;color:var(--tala-input-label-color);cursor:pointer}.tala-input__required{font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:500;color:var(--tala-input-required-color)}.tala-input__container{display:flex;align-items:center;gap:var(--tala-input-gap);height:var(--tala-input-height);padding:0 var(--tala-input-padding-x);border:1px solid var(--tala-input-border-color);border-radius:var(--tala-input-border-radius);background-color:var(--tala-input-bg);overflow:hidden;box-sizing:border-box;transition:border-color .15s ease,box-shadow .15s ease}.tala-input__container--has-prefix{padding-left:0}.tala-input__container--has-suffix{padding-right:0}tala-input:not(.tala-input--disabled,.tala-input--readonly) .tala-input__container:hover{border-color:var(--tala-sys-color-outline-strong)}tala-input:not(.tala-input--disabled) .tala-input__container:focus-within{border-color:var(--tala-sys-color-outline-focus);box-shadow:var(--tala-input-focus-ring)}.tala-input__field{flex:1 0 0;min-width:0;height:100%;padding:0;border:none;outline:none;background:transparent;font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:400;color:var(--tala-input-color);box-sizing:border-box}.tala-input__field::placeholder{color:var(--tala-input-placeholder-color)}.tala-input__field:disabled{cursor:not-allowed}.tala-input__prefix,.tala-input__suffix{display:flex;align-items:center;justify-content:center;align-self:stretch;padding:0 var(--tala-input-padding-x);background-color:var(--tala-input-prefix-bg);color:var(--tala-input-prefix-color);font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:400;white-space:nowrap;flex-shrink:0}.tala-input__prefix{border-right:1px solid var(--tala-input-border-color)}.tala-input__suffix{border-left:1px solid var(--tala-input-border-color)}tala-input [slot=leading-icon],tala-input [slot=trailing-icon]{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--tala-input-icon-size);height:var(--tala-input-icon-size);color:var(--tala-sys-color-text-tertiary)}tala-input [slot=leading-icon] svg,tala-input [slot=trailing-icon] svg{width:100%;height:100%}.tala-input__helper-row{display:flex;align-items:flex-start;min-height:16px}.tala-input__helper{font-family:var(--tala-ref-type-family-inter);font-size:12px;line-height:16px;font-weight:400;color:var(--tala-input-helper-color)}tala-input.tala-input--sm{--tala-input-height: 32px;--tala-input-padding-x: 10px;--tala-input-icon-size: 14px}tala-input.tala-input--lg{--tala-input-height: 48px;--tala-input-padding-x: 14px;--tala-input-icon-size: 18px;--tala-input-border-radius: var(--tala-ref-radius-lg)}tala-input.tala-input--error{--tala-input-border-color: var(--tala-sys-color-error-outline);--tala-input-helper-color: var(--tala-sys-color-error-text)}tala-input.tala-input--success{--tala-input-border-color: var(--tala-sys-color-success-outline);--tala-input-helper-color: var(--tala-sys-color-success-text)}tala-input.tala-input--warning{--tala-input-border-color: var(--tala-sys-color-warning-outline);--tala-input-helper-color: var(--tala-sys-color-warning-text)}tala-input.tala-input--disabled{--tala-input-bg: var(--tala-sys-color-surface-sunken);--tala-input-color: var(--tala-sys-color-text-disabled);--tala-input-placeholder-color: var(--tala-sys-color-text-disabled);--tala-input-label-color: var(--tala-sys-color-text-disabled);--tala-input-prefix-color: var(--tala-sys-color-text-disabled);pointer-events:none}tala-input.tala-input--readonly{--tala-input-bg: var(--tala-sys-color-surface-sunken)}tala-input.tala-input--readonly .tala-input__field{cursor:default}\n"] }]
185
- }], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], helperText: [{ type: i0.Input, args: [{ isSignal: true, alias: "helperText", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], suffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffix", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }] } });
238
+ ], template: "<div class=\"tala-form-field__label-row\">\n <label class=\"tala-form-field__label\" [attr.for]=\"_controlId()\">\n <ng-content select=\"[slot=label]\"></ng-content>\n </label>\n @if (_required()) {\n <span class=\"tala-form-field__required\" aria-hidden=\"true\">*</span>\n }\n</div>\n\n<div class=\"tala-form-field__container\">\n <div class=\"tala-form-field__prefix\">\n <ng-content select=\"[slot=prefix]\"></ng-content>\n </div>\n <ng-content select=\"[slot=leading-icon]\"></ng-content>\n <ng-content></ng-content>\n <ng-content select=\"[slot=trailing-icon]\"></ng-content>\n @if (_status() === 'error' || _status() === 'warning') {\n <svg\n class=\"tala-form-field__status-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n d=\"M12 2c5.523 0 10 4.477 10 10a10 10 0 0 1 -19.995 .324l-.005 -.324l.004 -.28c.148 -5.393 4.566 -9.72 9.996 -9.72zm.01 13l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-.01 -8a1 1 0 0 0 -.993 .883l-.007 .117v4l.007 .117a1 1 0 0 0 1.986 0l.007 -.117v-4l-.007 -.117a1 1 0 0 0 -.993 -.883z\"\n />\n </svg>\n }\n @if (_status() === 'success') {\n <svg\n class=\"tala-form-field__status-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n d=\"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z\"\n />\n </svg>\n }\n <div class=\"tala-form-field__suffix\">\n <ng-content select=\"[slot=suffix]\"></ng-content>\n </div>\n</div>\n\n<div class=\"tala-form-field__helper-row\" [id]=\"_helperId\">\n <span class=\"tala-form-field__helper\">\n <ng-content select=\"[slot=helper]\"></ng-content>\n </span>\n</div>\n", styles: ["tala-form-field{--tala-form-field-bg: var(--tala-sys-color-surface-default);--tala-form-field-border-color: var(--tala-sys-color-border-default);--tala-form-field-label-color: var(--tala-sys-color-text-secondary);--tala-form-field-helper-color: var(--tala-sys-color-text-secondary);--tala-form-field-prefix-bg: var(--tala-sys-color-surface-sunken);--tala-form-field-prefix-color: var(--tala-sys-color-text-secondary);--tala-form-field-required-color: var(--tala-sys-color-text-accent);--tala-form-field-focus-ring: 0 0 0 3px rgba(9, 9, 13, .1);--tala-form-field-height: 40px;--tala-form-field-padding-x: 12px;--tala-form-field-icon-size: 16px;--tala-form-field-border-radius: var(--tala-ref-radius-md);--tala-form-field-gap: var(--tala-ref-space-2);display:flex;flex-direction:column;gap:var(--tala-ref-space-1);box-sizing:border-box}.tala-form-field__label-row{display:flex;align-items:center;gap:var(--tala-ref-space-1);height:20px;overflow:hidden;white-space:nowrap}.tala-form-field__label-row:has(.tala-form-field__label:empty){display:none}.tala-form-field__label{font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:500;color:var(--tala-form-field-label-color);cursor:pointer}.tala-form-field__required{font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:500;color:var(--tala-form-field-required-color)}.tala-form-field__container{display:flex;align-items:center;gap:var(--tala-form-field-gap);height:var(--tala-form-field-height);padding:0 var(--tala-form-field-padding-x);border:1px solid var(--tala-form-field-border-color);border-radius:var(--tala-form-field-border-radius);background-color:var(--tala-form-field-bg);overflow:hidden;box-sizing:border-box;transition:border-color .15s ease,box-shadow .15s ease}.tala-form-field__container:has(.tala-form-field__prefix:not(:empty)){padding-left:0}.tala-form-field__container:has(.tala-form-field__suffix:not(:empty)){padding-right:0}tala-form-field:not(.tala-form-field--disabled,.tala-form-field--readonly) .tala-form-field__container:hover{border-color:var(--tala-sys-color-border-strong)}tala-form-field:not(.tala-form-field--disabled) .tala-form-field__container:focus-within{border-color:var(--tala-sys-color-border-focus);box-shadow:var(--tala-form-field-focus-ring)}.tala-form-field__prefix,.tala-form-field__suffix{display:flex;align-items:center;justify-content:center;align-self:stretch;padding:0 var(--tala-form-field-padding-x);background-color:var(--tala-form-field-prefix-bg);color:var(--tala-form-field-prefix-color);font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:400;white-space:nowrap;flex-shrink:0}.tala-form-field__prefix{border-right:1px solid var(--tala-form-field-border-color)}.tala-form-field__suffix{border-left:1px solid var(--tala-form-field-border-color)}.tala-form-field__prefix:empty,.tala-form-field__suffix:empty{display:none}tala-form-field [slot=leading-icon],tala-form-field [slot=trailing-icon]{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--tala-form-field-icon-size);height:var(--tala-form-field-icon-size);color:var(--tala-sys-color-text-tertiary)}tala-form-field [slot=leading-icon] svg,tala-form-field [slot=trailing-icon] svg{width:100%;height:100%}.tala-form-field__status-icon{flex-shrink:0;width:var(--tala-form-field-icon-size);height:var(--tala-form-field-icon-size);color:var(--tala-form-field-helper-color)}.tala-form-field__container:has(>[slot=trailing-icon]) .tala-form-field__status-icon{display:none}.tala-form-field__helper-row{display:flex;align-items:flex-start;min-height:16px}.tala-form-field__helper-row:has(.tala-form-field__helper:empty){display:none}.tala-form-field__helper{font-family:var(--tala-ref-type-family-inter);font-size:12px;line-height:16px;font-weight:400;color:var(--tala-form-field-helper-color)}tala-form-field.tala-form-field--sm{--tala-form-field-height: 32px;--tala-form-field-padding-x: 10px;--tala-form-field-icon-size: 14px}tala-form-field.tala-form-field--lg{--tala-form-field-height: 48px;--tala-form-field-padding-x: 14px;--tala-form-field-icon-size: 18px;--tala-form-field-border-radius: var(--tala-ref-radius-lg)}tala-form-field.tala-form-field--error{--tala-form-field-bg: var(--tala-sys-color-feedback-danger-bg);--tala-form-field-border-color: var(--tala-sys-color-border-error);--tala-form-field-helper-color: var(--tala-sys-color-feedback-danger-text)}tala-form-field.tala-form-field--success{--tala-form-field-bg: var(--tala-sys-color-feedback-success-bg);--tala-form-field-border-color: var(--tala-sys-color-feedback-success-border);--tala-form-field-helper-color: var(--tala-sys-color-feedback-success-text)}tala-form-field.tala-form-field--warning{--tala-form-field-bg: var(--tala-sys-color-feedback-warning-bg);--tala-form-field-border-color: var(--tala-sys-color-feedback-warning-border);--tala-form-field-helper-color: var(--tala-sys-color-feedback-warning-text)}tala-form-field.tala-form-field--disabled{--tala-form-field-bg: var(--tala-sys-color-surface-sunken);--tala-form-field-label-color: var(--tala-sys-color-text-disabled);--tala-form-field-prefix-color: var(--tala-sys-color-text-disabled);--tala-form-field-helper-color: var(--tala-sys-color-text-disabled);pointer-events:none}tala-form-field.tala-form-field--readonly{--tala-form-field-bg: var(--tala-sys-color-surface-sunken)}\n"] }]
239
+ }], propDecorators: { _control: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TALA_FORM_FIELD_CONTROL), { isSignal: true }] }] } });
240
+
241
+ class TalaInput {
242
+ static _nextId = 0;
243
+ // Required, not optional: `talaInput` is only ever used inside `tala-form-field`, so a missing
244
+ // provider here means it's used standalone — fail fast instead of degrading silently.
245
+ _field = inject(TALA_FORM_FIELD_HOST);
246
+ id = input(`tala-input-${++TalaInput._nextId}`, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
247
+ size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
248
+ status = input('default', ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
249
+ disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
250
+ readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
251
+ required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
252
+ _describedBy = computed(() => this._field.helperId(), ...(ngDevMode ? [{ debugName: "_describedBy" }] : /* istanbul ignore next */ []));
253
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TalaInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
254
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: TalaInput, isStandalone: true, selector: "input[talaInput]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.id": "id()", "disabled": "disabled()", "attr.readonly": "readonly() || null", "required": "required()", "attr.aria-invalid": "status() === \"error\" || null", "attr.aria-describedby": "_describedBy()" }, classAttribute: "tala-input-control" }, providers: [
255
+ {
256
+ provide: TALA_FORM_FIELD_CONTROL,
257
+ useExisting: TalaInput,
258
+ },
259
+ ], ngImport: i0, template: '', isInline: true, styles: [".tala-input-control{--tala-input-color: var(--tala-sys-color-text-primary);--tala-input-placeholder-color: var(--tala-sys-color-text-placeholder);flex:1 0 0;min-width:0;height:100%;padding:0;border:none;outline:none;background:transparent;font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:400;color:var(--tala-input-color);box-sizing:border-box}.tala-input-control::placeholder{color:var(--tala-input-placeholder-color)}.tala-input-control:disabled{cursor:not-allowed;color:var(--tala-sys-color-text-disabled)}.tala-input-control:disabled::placeholder{color:var(--tala-sys-color-text-disabled)}.tala-input-control:read-only{cursor:default}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
260
+ }
261
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TalaInput, decorators: [{
262
+ type: Component,
263
+ args: [{ selector: 'input[talaInput]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: '', host: {
264
+ class: 'tala-input-control',
265
+ '[attr.id]': 'id()',
266
+ '[disabled]': 'disabled()',
267
+ '[attr.readonly]': 'readonly() || null',
268
+ '[required]': 'required()',
269
+ '[attr.aria-invalid]': 'status() === "error" || null',
270
+ '[attr.aria-describedby]': '_describedBy()',
271
+ }, providers: [
272
+ {
273
+ provide: TALA_FORM_FIELD_CONTROL,
274
+ useExisting: TalaInput,
275
+ },
276
+ ], styles: [".tala-input-control{--tala-input-color: var(--tala-sys-color-text-primary);--tala-input-placeholder-color: var(--tala-sys-color-text-placeholder);flex:1 0 0;min-width:0;height:100%;padding:0;border:none;outline:none;background:transparent;font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:400;color:var(--tala-input-color);box-sizing:border-box}.tala-input-control::placeholder{color:var(--tala-input-placeholder-color)}.tala-input-control:disabled{cursor:not-allowed;color:var(--tala-sys-color-text-disabled)}.tala-input-control:disabled::placeholder{color:var(--tala-sys-color-text-disabled)}.tala-input-control:read-only{cursor:default}\n"] }]
277
+ }], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }] } });
278
+
279
+ /**
280
+ * Apply to an `ng-template` projected into `tala-select` to override how each
281
+ * option is rendered inside the dropdown list.
282
+ */
283
+ class TalaSelectOptionTemplate {
284
+ static ngTemplateContextGuard(_dir, ctx) {
285
+ return true;
286
+ }
287
+ templateRef = inject(TemplateRef);
288
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TalaSelectOptionTemplate, deps: [], target: i0.ɵɵFactoryTarget.Directive });
289
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.17", type: TalaSelectOptionTemplate, isStandalone: true, selector: "ng-template[talaSelectOption]", ngImport: i0 });
290
+ }
291
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TalaSelectOptionTemplate, decorators: [{
292
+ type: Directive,
293
+ args: [{
294
+ selector: 'ng-template[talaSelectOption]',
295
+ }]
296
+ }] });
297
+ /**
298
+ * Apply to an `ng-template` projected into `tala-select` to override how the
299
+ * chosen value is rendered — the trigger label for `single`/`searchable`, or
300
+ * each chip for `multi`.
301
+ */
302
+ class TalaSelectValueTemplate {
303
+ static ngTemplateContextGuard(_dir, ctx) {
304
+ return true;
305
+ }
306
+ templateRef = inject(TemplateRef);
307
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TalaSelectValueTemplate, deps: [], target: i0.ɵɵFactoryTarget.Directive });
308
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.17", type: TalaSelectValueTemplate, isStandalone: true, selector: "ng-template[talaSelectValue]", ngImport: i0 });
309
+ }
310
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TalaSelectValueTemplate, decorators: [{
311
+ type: Directive,
312
+ args: [{
313
+ selector: 'ng-template[talaSelectValue]',
314
+ }]
315
+ }] });
186
316
 
187
317
  class TalaSelect {
188
318
  static _nextId = 0;
@@ -198,15 +328,14 @@ class TalaSelect {
198
328
  disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
199
329
  loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
200
330
  width = input('full', ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
331
+ value = model('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
332
+ touched = model(false, ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
201
333
  _id = `tala-select-${++TalaSelect._nextId}`;
202
334
  _helperId = `${this._id}-helper`;
203
335
  _listboxId = `${this._id}-listbox`;
204
336
  _isOpen = signal(false, ...(ngDevMode ? [{ debugName: "_isOpen" }] : /* istanbul ignore next */ []));
205
- _value = signal('', ...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
206
337
  _searchQuery = signal('', ...(ngDevMode ? [{ debugName: "_searchQuery" }] : /* istanbul ignore next */ []));
207
338
  _focusedIndex = signal(-1, ...(ngDevMode ? [{ debugName: "_focusedIndex" }] : /* istanbul ignore next */ []));
208
- _disabledByForm = signal(false, ...(ngDevMode ? [{ debugName: "_disabledByForm" }] : /* istanbul ignore next */ []));
209
- _isDisabled = computed(() => this.disabled() || this._disabledByForm(), ...(ngDevMode ? [{ debugName: "_isDisabled" }] : /* istanbul ignore next */ []));
210
339
  _hostWidth = computed(() => {
211
340
  const w = this.width();
212
341
  if (w === 'full')
@@ -225,36 +354,43 @@ class TalaSelect {
225
354
  return opts.filter((o) => o.label.toLowerCase().includes(q));
226
355
  }, ...(ngDevMode ? [{ debugName: "_filteredOptions" }] : /* istanbul ignore next */ []));
227
356
  _hasValue = computed(() => {
228
- const v = this._value();
357
+ const v = this.value();
229
358
  return Array.isArray(v) ? v.length > 0 : v !== '';
230
359
  }, ...(ngDevMode ? [{ debugName: "_hasValue" }] : /* istanbul ignore next */ []));
231
360
  _displayValue = computed(() => {
232
- const v = this._value();
361
+ const v = this.value();
233
362
  const opts = this.options();
234
363
  if (this.type() === 'multi') {
235
364
  return v.map((val) => opts.find((o) => o.value === val)?.label ?? val).join(', ');
236
365
  }
237
366
  return opts.find((o) => o.value === v)?.label ?? '';
238
367
  }, ...(ngDevMode ? [{ debugName: "_displayValue" }] : /* istanbul ignore next */ []));
239
- _selectedLabels = computed(() => {
240
- const v = this._value();
368
+ _selectedOption = computed(() => {
369
+ const v = this.value();
370
+ if (Array.isArray(v) || !v)
371
+ return undefined;
372
+ const opts = this.options();
373
+ return opts.find((o) => o.value === v) ?? { value: v, label: v };
374
+ }, ...(ngDevMode ? [{ debugName: "_selectedOption" }] : /* istanbul ignore next */ []));
375
+ _selectedOptions = computed(() => {
376
+ const v = this.value();
241
377
  const opts = this.options();
242
378
  if (!Array.isArray(v))
243
379
  return [];
244
- return v.map((val) => ({ value: val, label: opts.find((o) => o.value === val)?.label ?? val }));
245
- }, ...(ngDevMode ? [{ debugName: "_selectedLabels" }] : /* istanbul ignore next */ []));
380
+ return v.map((val) => opts.find((o) => o.value === val) ?? { value: val, label: val });
381
+ }, ...(ngDevMode ? [{ debugName: "_selectedOptions" }] : /* istanbul ignore next */ []));
382
+ _optionTemplate = contentChild(TalaSelectOptionTemplate, ...(ngDevMode ? [{ debugName: "_optionTemplate" }] : /* istanbul ignore next */ []));
383
+ _valueTemplate = contentChild(TalaSelectValueTemplate, ...(ngDevMode ? [{ debugName: "_valueTemplate" }] : /* istanbul ignore next */ []));
246
384
  hostClasses = computed(() => [
247
385
  'tala-select',
248
386
  `tala-select--${this.size()}`,
249
387
  `tala-select--${this.status()}`,
250
388
  this._isOpen() ? 'tala-select--open' : '',
251
- this._isDisabled() ? 'tala-select--disabled' : '',
389
+ this.disabled() ? 'tala-select--disabled' : '',
252
390
  this.loading() ? 'tala-select--loading' : '',
253
391
  ]
254
392
  .filter(Boolean)
255
393
  .join(' '), ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
256
- _onChange = () => { };
257
- _onTouched = () => { };
258
394
  _onDocumentClick(target) {
259
395
  if (!this._elementRef.nativeElement.contains(target)) {
260
396
  this._isOpen.set(false);
@@ -262,26 +398,13 @@ class TalaSelect {
262
398
  this._focusedIndex.set(-1);
263
399
  }
264
400
  }
265
- writeValue(value) {
266
- if (this.type() === 'multi') {
267
- this._value.set(Array.isArray(value) ? value : value ? [value] : []);
268
- }
269
- else {
270
- this._value.set(typeof value === 'string' ? value : '');
271
- }
272
- }
273
- registerOnChange(fn) {
274
- this._onChange = fn;
275
- }
276
- registerOnTouched(fn) {
277
- this._onTouched = fn;
278
- }
279
- setDisabledState(isDisabled) {
280
- this._disabledByForm.set(isDisabled);
401
+ focus(options) {
402
+ const trigger = this._elementRef.nativeElement.querySelector('.tala-select__trigger');
403
+ trigger?.focus(options);
281
404
  }
282
405
  _onTriggerClick(event) {
283
406
  event.stopPropagation();
284
- if (this._isDisabled() || this.loading())
407
+ if (this.disabled() || this.loading())
285
408
  return;
286
409
  if (this._isOpen()) {
287
410
  this._isOpen.set(false);
@@ -293,7 +416,7 @@ class TalaSelect {
293
416
  }
294
417
  }
295
418
  _onTriggerKeydown(event) {
296
- if (this._isDisabled() || this.loading())
419
+ if (this.disabled() || this.loading())
297
420
  return;
298
421
  switch (event.key) {
299
422
  case ' ':
@@ -337,31 +460,28 @@ class TalaSelect {
337
460
  if (opt.disabled)
338
461
  return;
339
462
  if (this.type() === 'multi') {
340
- const current = this._value();
463
+ const current = this.value();
341
464
  const idx = current.indexOf(opt.value);
342
465
  const next = idx >= 0 ? current.filter((v) => v !== opt.value) : [...current, opt.value];
343
- this._value.set(next);
344
- this._onChange(next);
466
+ this.value.set(next);
345
467
  }
346
468
  else {
347
- this._value.set(opt.value);
348
- this._onChange(opt.value);
469
+ this.value.set(opt.value);
349
470
  this._isOpen.set(false);
350
471
  this._searchQuery.set('');
351
472
  this._focusedIndex.set(-1);
352
473
  }
353
- this._onTouched();
474
+ this.touched.set(true);
354
475
  }
355
476
  _removeChip(value, event) {
356
477
  event.stopPropagation();
357
- const current = this._value();
478
+ const current = this.value();
358
479
  const next = current.filter((v) => v !== value);
359
- this._value.set(next);
360
- this._onChange(next);
361
- this._onTouched();
480
+ this.value.set(next);
481
+ this.touched.set(true);
362
482
  }
363
483
  _isSelected(value) {
364
- const v = this._value();
484
+ const v = this.value();
365
485
  return Array.isArray(v) ? v.includes(value) : v === value;
366
486
  }
367
487
  _onSearchInput(event) {
@@ -398,65 +518,171 @@ class TalaSelect {
398
518
  break;
399
519
  }
400
520
  }
401
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: TalaSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
402
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.13", type: TalaSelect, isStandalone: true, selector: "tala-select", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, helperText: { classPropertyName: "helperText", publicName: "helperText", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:click": "_onDocumentClick($event.target)" }, properties: { "class": "hostClasses()", "style.width": "_hostWidth()" } }, providers: [
403
- {
404
- provide: NG_VALUE_ACCESSOR,
405
- useExisting: forwardRef(() => TalaSelect),
406
- multi: true,
407
- },
408
- ], ngImport: i0, template: "@if (label()) {\n <div class=\"tala-select__label-row\">\n <label class=\"tala-select__label\" [attr.for]=\"_id\">{{ label() }}</label>\n @if (required()) {\n <span class=\"tala-select__required\" aria-hidden=\"true\">*</span>\n }\n </div>\n}\n\n<div\n class=\"tala-select__trigger\"\n [id]=\"_id\"\n role=\"combobox\"\n tabindex=\"0\"\n [attr.aria-expanded]=\"_isOpen()\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"_listboxId\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-disabled]=\"_isDisabled() || null\"\n [attr.aria-invalid]=\"status() === 'error' || null\"\n [attr.aria-describedby]=\"helperText() && !_isDisabled() ? _helperId : null\"\n (click)=\"_onTriggerClick($event)\"\n (keydown)=\"_onTriggerKeydown($event)\"\n>\n <div class=\"tala-select__trigger-content\">\n @if (type() === 'multi' && _hasValue()) {\n <div class=\"tala-select__chips\">\n @for (chip of _selectedLabels(); track chip.value) {\n <span class=\"tala-select__chip\">\n {{ chip.label }}\n <button\n class=\"tala-select__chip-remove\"\n type=\"button\"\n aria-label=\"Remove {{ chip.label }}\"\n (click)=\"_removeChip(chip.value, $event)\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n >\n <line x1=\"4\" y1=\"4\" x2=\"12\" y2=\"12\" />\n <line x1=\"12\" y1=\"4\" x2=\"4\" y2=\"12\" />\n </svg>\n </button>\n </span>\n }\n </div>\n } @else if (type() === 'searchable' && _isOpen()) {\n <input\n class=\"tala-select__search\"\n type=\"text\"\n autocomplete=\"off\"\n [placeholder]=\"placeholder() || 'Search...'\"\n [value]=\"_searchQuery()\"\n (input)=\"_onSearchInput($event)\"\n (keydown)=\"_onSearchKeydown($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n } @else {\n <span class=\"tala-select__value\" [class.tala-select__value--placeholder]=\"!_hasValue()\">\n {{ _hasValue() ? _displayValue() : placeholder() }}\n </span>\n }\n </div>\n\n <span class=\"tala-select__trailing\">\n @if (loading()) {\n <svg\n class=\"tala-select__spinner\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\" />\n </svg>\n } @else {\n <svg\n class=\"tala-select__chevron\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M4 6l4 4 4-4\" />\n </svg>\n }\n </span>\n</div>\n\n@if (_isOpen() && !_isDisabled() && !loading()) {\n <div\n class=\"tala-select__dropdown\"\n role=\"listbox\"\n [id]=\"_listboxId\"\n [attr.aria-multiselectable]=\"type() === 'multi' || null\"\n (click)=\"_onDropdownClick($event)\"\n >\n @for (opt of _filteredOptions(); track opt.value; let i = $index) {\n <div\n class=\"tala-select__option\"\n [class.tala-select__option--selected]=\"_isSelected(opt.value)\"\n [class.tala-select__option--disabled]=\"opt.disabled\"\n [class.tala-select__option--focused]=\"_focusedIndex() === i\"\n role=\"option\"\n [attr.aria-selected]=\"_isSelected(opt.value)\"\n [attr.aria-disabled]=\"opt.disabled || null\"\n (click)=\"_selectOption(opt, $event)\"\n >\n @if (type() === 'multi') {\n <span class=\"tala-select__checkbox\" aria-hidden=\"true\">\n @if (_isSelected(opt.value)) {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\">\n <path d=\"M3 8.5L6.5 12 13 5\" />\n </svg>\n }\n </span>\n }\n <span class=\"tala-select__option-label\">{{ opt.label }}</span>\n @if (type() === 'single' && _isSelected(opt.value)) {\n <svg\n class=\"tala-select__option-check\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M3 8.5L6.5 12 13 5\" />\n </svg>\n }\n </div>\n } @empty {\n <div class=\"tala-select__empty\">No options found</div>\n }\n </div>\n}\n\n@if (helperText() && !_isDisabled()) {\n <div class=\"tala-select__helper-row\" [id]=\"_helperId\">\n <span class=\"tala-select__helper\">{{ helperText() }}</span>\n </div>\n}\n", styles: ["tala-select{--tala-select-bg: var(--tala-sys-color-surface-default);--tala-select-border-color: var(--tala-sys-color-outline-default);--tala-select-color: var(--tala-sys-color-text-primary);--tala-select-placeholder-color: var(--tala-sys-color-text-placeholder);--tala-select-label-color: var(--tala-sys-color-text-secondary);--tala-select-helper-color: var(--tala-sys-color-text-secondary);--tala-select-focus-ring: 0 0 0 3px rgba(9, 9, 13, .1);--tala-select-height: 40px;--tala-select-padding-x: 12px;--tala-select-gap: var(--tala-ref-space-2);--tala-select-icon-size: 16px;--tala-select-border-radius: var(--tala-ref-radius-md);position:relative;display:flex;flex-direction:column;gap:var(--tala-ref-space-1);box-sizing:border-box}.tala-select__label-row{display:flex;align-items:center;gap:var(--tala-ref-space-1);height:20px;overflow:hidden;white-space:nowrap}.tala-select__label{font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:500;color:var(--tala-select-label-color);cursor:pointer}.tala-select__required{font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:500;color:var(--tala-sys-color-brand)}.tala-select__trigger{display:flex;align-items:center;gap:var(--tala-select-gap);min-height:var(--tala-select-height);padding:4px var(--tala-select-padding-x);border:1px solid var(--tala-select-border-color);border-radius:var(--tala-select-border-radius);background-color:var(--tala-select-bg);overflow:hidden;box-sizing:border-box;cursor:pointer;outline:none;transition:border-color .15s ease,box-shadow .15s ease}.tala-select__trigger:focus-visible{border-color:var(--tala-sys-color-outline-focus);box-shadow:var(--tala-select-focus-ring)}tala-select:not(.tala-select--disabled,.tala-select--loading) .tala-select__trigger:hover{border-color:var(--tala-sys-color-outline-strong)}tala-select.tala-select--open .tala-select__trigger{border-color:var(--tala-sys-color-outline-focus);box-shadow:var(--tala-select-focus-ring)}.tala-select__trigger-content{flex:1 0 0;min-width:0;display:flex;align-items:center;gap:var(--tala-ref-space-1);flex-wrap:wrap;overflow:hidden}.tala-select__value{font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:400;color:var(--tala-select-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tala-select__value--placeholder{color:var(--tala-select-placeholder-color)}.tala-select__search{flex:1 0 0;min-width:0;border:none;outline:none;background:transparent;font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:400;color:var(--tala-select-color);padding:0;box-sizing:border-box}.tala-select__search::placeholder{color:var(--tala-select-placeholder-color)}.tala-select__trailing{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--tala-select-icon-size);height:var(--tala-select-icon-size);color:var(--tala-sys-color-text-tertiary)}.tala-select__chevron{width:100%;height:100%;transition:transform .15s ease}tala-select.tala-select--open .tala-select__chevron{transform:rotate(180deg)}@keyframes tala-spin{to{transform:rotate(360deg)}}.tala-select__spinner{width:100%;height:100%;animation:tala-spin .7s linear infinite;transform-origin:center}.tala-select__dropdown{position:absolute;top:calc(100% + 4px);left:0;right:0;background-color:var(--tala-sys-color-surface-raised);border:1px solid var(--tala-sys-color-outline-default);border-radius:var(--tala-select-border-radius);box-shadow:var(--tala-ref-shadow-md);max-height:240px;overflow-y:auto;z-index:1000;box-sizing:border-box;padding:var(--tala-ref-space-1) 0}.tala-select__option{display:flex;align-items:center;gap:var(--tala-ref-space-2);padding:8px var(--tala-select-padding-x);font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:400;color:var(--tala-select-color);cursor:pointer;transition:background-color .1s ease}.tala-select__option:hover,.tala-select__option--focused{background-color:var(--tala-sys-color-surface-sunken)}.tala-select__option--selected{color:var(--tala-sys-color-brand);font-weight:500}.tala-select__option--disabled{color:var(--tala-sys-color-text-disabled);cursor:not-allowed}.tala-select__option--disabled:hover{background-color:transparent}.tala-select__option-label{flex:1 0 0;min-width:0}.tala-select__option-check{flex-shrink:0;width:var(--tala-select-icon-size);height:var(--tala-select-icon-size);color:var(--tala-sys-color-brand)}.tala-select__checkbox{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:16px;height:16px;border:1.5px solid var(--tala-sys-color-outline-default);border-radius:4px;color:var(--tala-sys-color-brand);box-sizing:border-box;transition:background-color .1s ease,border-color .1s ease}.tala-select__checkbox svg{width:10px;height:10px;display:none}.tala-select__option--selected .tala-select__checkbox{background-color:var(--tala-sys-color-brand);border-color:var(--tala-sys-color-brand)}.tala-select__option--selected .tala-select__checkbox svg{display:block;color:#fff;stroke:#fff;fill:none;stroke-width:2}.tala-select__empty{padding:8px var(--tala-select-padding-x);font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;color:var(--tala-sys-color-text-tertiary);text-align:center}.tala-select__chips{display:flex;flex-wrap:wrap;gap:4px;padding:2px 0}.tala-select__chip{display:inline-flex;align-items:center;gap:4px;padding:0 6px;height:20px;background-color:var(--tala-sys-color-surface-sunken);border:1px solid var(--tala-sys-color-outline-default);border-radius:4px;font-family:var(--tala-ref-type-family-inter);font-size:12px;line-height:16px;font-weight:400;color:var(--tala-select-color);white-space:nowrap}.tala-select__chip-remove{display:flex;align-items:center;justify-content:center;width:12px;height:12px;padding:0;border:none;background:transparent;color:var(--tala-sys-color-text-tertiary);cursor:pointer;border-radius:2px;flex-shrink:0}.tala-select__chip-remove svg{width:8px;height:8px}.tala-select__chip-remove:hover{color:var(--tala-sys-color-text-primary)}.tala-select__helper-row{display:flex;align-items:flex-start;min-height:16px}.tala-select__helper{font-family:var(--tala-ref-type-family-inter);font-size:12px;line-height:16px;font-weight:400;color:var(--tala-select-helper-color)}tala-select.tala-select--sm{--tala-select-height: 32px;--tala-select-padding-x: 10px;--tala-select-gap: 6px;--tala-select-icon-size: 14px}tala-select.tala-select--lg{--tala-select-height: 48px;--tala-select-padding-x: 14px;--tala-select-icon-size: 18px;--tala-select-border-radius: var(--tala-ref-radius-lg)}tala-select.tala-select--error{--tala-select-bg: var(--tala-sys-color-error-surface);--tala-select-border-color: var(--tala-sys-color-error-outline);--tala-select-helper-color: var(--tala-sys-color-error-text)}tala-select.tala-select--success{--tala-select-bg: var(--tala-sys-color-success-surface);--tala-select-border-color: var(--tala-sys-color-success-outline);--tala-select-helper-color: var(--tala-sys-color-success-text)}tala-select.tala-select--disabled{--tala-select-bg: var(--tala-sys-color-surface-sunken);--tala-select-color: var(--tala-sys-color-text-disabled);--tala-select-placeholder-color: var(--tala-sys-color-text-disabled);--tala-select-label-color: var(--tala-sys-color-text-disabled);pointer-events:none}tala-select.tala-select--disabled .tala-select__trigger{cursor:not-allowed}tala-select.tala-select--loading .tala-select__trigger{cursor:wait;pointer-events:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
521
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TalaSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
522
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: TalaSelect, isStandalone: true, selector: "tala-select", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, helperText: { classPropertyName: "helperText", publicName: "helperText", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touched: "touchedChange" }, host: { listeners: { "document:click": "_onDocumentClick($event.target)" }, properties: { "class": "hostClasses()", "style.width": "_hostWidth()" } }, queries: [{ propertyName: "_optionTemplate", first: true, predicate: TalaSelectOptionTemplate, descendants: true, isSignal: true }, { propertyName: "_valueTemplate", first: true, predicate: TalaSelectValueTemplate, descendants: true, isSignal: true }], ngImport: i0, template: "@if (label()) {\n <div class=\"tala-select__label-row\">\n <label class=\"tala-select__label\" [attr.for]=\"_id\">{{ label() }}</label>\n @if (required()) {\n <span class=\"tala-select__required\" aria-hidden=\"true\">*</span>\n }\n </div>\n}\n\n<div\n class=\"tala-select__trigger\"\n [id]=\"_id\"\n role=\"combobox\"\n tabindex=\"0\"\n [attr.aria-expanded]=\"_isOpen()\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"_listboxId\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.aria-invalid]=\"status() === 'error' || null\"\n [attr.aria-describedby]=\"helperText() && !disabled() ? _helperId : null\"\n (click)=\"_onTriggerClick($event)\"\n (keydown)=\"_onTriggerKeydown($event)\"\n>\n <div class=\"tala-select__trigger-content\">\n @if (type() === 'multi' && _hasValue()) {\n <div class=\"tala-select__chips\">\n @for (chip of _selectedOptions(); track chip.value) {\n <span class=\"tala-select__chip\">\n @if (_valueTemplate(); as valueTpl) {\n <ng-container\n [ngTemplateOutlet]=\"valueTpl.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: chip }\"\n ></ng-container>\n } @else {\n {{ chip.label }}\n }\n <button\n class=\"tala-select__chip-remove\"\n type=\"button\"\n aria-label=\"Remove {{ chip.label }}\"\n (click)=\"_removeChip(chip.value, $event)\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n >\n <line x1=\"4\" y1=\"4\" x2=\"12\" y2=\"12\" />\n <line x1=\"12\" y1=\"4\" x2=\"4\" y2=\"12\" />\n </svg>\n </button>\n </span>\n }\n </div>\n } @else if (type() === 'searchable' && _isOpen()) {\n <input\n class=\"tala-select__search\"\n type=\"text\"\n autocomplete=\"off\"\n [placeholder]=\"placeholder() || 'Search...'\"\n [value]=\"_searchQuery()\"\n (input)=\"_onSearchInput($event)\"\n (keydown)=\"_onSearchKeydown($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n } @else {\n <span class=\"tala-select__value\" [class.tala-select__value--placeholder]=\"!_hasValue()\">\n @if (_hasValue()) {\n @if (_valueTemplate(); as valueTpl) {\n <ng-container\n [ngTemplateOutlet]=\"valueTpl.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: _selectedOption() }\"\n ></ng-container>\n } @else {\n {{ _displayValue() }}\n }\n } @else {\n {{ placeholder() }}\n }\n </span>\n }\n </div>\n\n <span class=\"tala-select__trailing\">\n @if (loading()) {\n <svg\n class=\"tala-select__spinner\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\" />\n </svg>\n } @else {\n <svg\n class=\"tala-select__chevron\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M4 6l4 4 4-4\" />\n </svg>\n }\n </span>\n</div>\n\n@if (_isOpen() && !disabled() && !loading()) {\n <div\n class=\"tala-select__dropdown\"\n role=\"listbox\"\n [id]=\"_listboxId\"\n [attr.aria-multiselectable]=\"type() === 'multi' || null\"\n (click)=\"_onDropdownClick($event)\"\n >\n @for (opt of _filteredOptions(); track opt.value; let i = $index) {\n <div\n class=\"tala-select__option\"\n [class.tala-select__option--selected]=\"_isSelected(opt.value)\"\n [class.tala-select__option--disabled]=\"opt.disabled\"\n [class.tala-select__option--focused]=\"_focusedIndex() === i\"\n role=\"option\"\n [attr.aria-selected]=\"_isSelected(opt.value)\"\n [attr.aria-disabled]=\"opt.disabled || null\"\n (click)=\"_selectOption(opt, $event)\"\n >\n @if (_optionTemplate(); as optionTpl) {\n <ng-container\n [ngTemplateOutlet]=\"optionTpl.templateRef\"\n [ngTemplateOutletContext]=\"{\n $implicit: opt,\n selected: _isSelected(opt.value),\n focused: _focusedIndex() === i,\n }\"\n ></ng-container>\n } @else {\n @if (type() === 'multi') {\n <span class=\"tala-select__checkbox\" aria-hidden=\"true\">\n @if (_isSelected(opt.value)) {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\">\n <path d=\"M3 8.5L6.5 12 13 5\" />\n </svg>\n }\n </span>\n }\n <span class=\"tala-select__option-label\">{{ opt.label }}</span>\n @if (type() === 'single' && _isSelected(opt.value)) {\n <svg\n class=\"tala-select__option-check\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M3 8.5L6.5 12 13 5\" />\n </svg>\n }\n }\n </div>\n } @empty {\n <div class=\"tala-select__empty\">No options found</div>\n }\n </div>\n}\n\n@if (helperText() && !disabled()) {\n <div class=\"tala-select__helper-row\" [id]=\"_helperId\">\n <span class=\"tala-select__helper\">{{ helperText() }}</span>\n </div>\n}\n", styles: ["tala-select{--tala-select-bg: var(--tala-sys-color-surface-default);--tala-select-border-color: var(--tala-sys-color-border-default);--tala-select-color: var(--tala-sys-color-text-primary);--tala-select-placeholder-color: var(--tala-sys-color-text-placeholder);--tala-select-label-color: var(--tala-sys-color-text-secondary);--tala-select-helper-color: var(--tala-sys-color-text-secondary);--tala-select-focus-ring: 0 0 0 3px rgba(9, 9, 13, .1);--tala-select-height: 40px;--tala-select-padding-x: 12px;--tala-select-gap: var(--tala-ref-space-2);--tala-select-icon-size: 16px;--tala-select-border-radius: var(--tala-ref-radius-md);position:relative;display:flex;flex-direction:column;gap:var(--tala-ref-space-1);box-sizing:border-box}.tala-select__label-row{display:flex;align-items:center;gap:var(--tala-ref-space-1);height:20px;overflow:hidden;white-space:nowrap}.tala-select__label{font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:500;color:var(--tala-select-label-color);cursor:pointer}.tala-select__required{font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:500;color:var(--tala-sys-color-text-accent)}.tala-select__trigger{display:flex;align-items:center;gap:var(--tala-select-gap);min-height:var(--tala-select-height);padding:4px var(--tala-select-padding-x);border:1px solid var(--tala-select-border-color);border-radius:var(--tala-select-border-radius);background-color:var(--tala-select-bg);overflow:hidden;box-sizing:border-box;cursor:pointer;outline:none;transition:border-color .15s ease,box-shadow .15s ease}.tala-select__trigger:focus-visible{border-color:var(--tala-sys-color-border-focus);box-shadow:var(--tala-select-focus-ring)}tala-select:not(.tala-select--disabled,.tala-select--loading) .tala-select__trigger:hover{border-color:var(--tala-sys-color-border-strong)}tala-select.tala-select--open .tala-select__trigger{border-color:var(--tala-sys-color-border-focus);box-shadow:var(--tala-select-focus-ring)}.tala-select__trigger-content{flex:1 0 0;min-width:0;display:flex;align-items:center;gap:var(--tala-ref-space-1);flex-wrap:wrap;overflow:hidden}.tala-select__value{font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:400;color:var(--tala-select-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tala-select__value--placeholder{color:var(--tala-select-placeholder-color)}.tala-select__search{flex:1 0 0;min-width:0;border:none;outline:none;background:transparent;font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:400;color:var(--tala-select-color);padding:0;box-sizing:border-box}.tala-select__search::placeholder{color:var(--tala-select-placeholder-color)}.tala-select__trailing{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--tala-select-icon-size);height:var(--tala-select-icon-size);color:var(--tala-sys-color-text-tertiary)}.tala-select__chevron{width:100%;height:100%;transition:transform .15s ease}tala-select.tala-select--open .tala-select__chevron{transform:rotate(180deg)}@keyframes tala-spin{to{transform:rotate(360deg)}}.tala-select__spinner{width:100%;height:100%;animation:tala-spin .7s linear infinite;transform-origin:center}.tala-select__dropdown{position:absolute;top:calc(100% + 4px);left:0;right:0;background-color:var(--tala-sys-color-surface-raised);border:1px solid var(--tala-sys-color-border-default);border-radius:var(--tala-select-border-radius);box-shadow:var(--tala-ref-shadow-md);max-height:240px;overflow-y:auto;z-index:1000;box-sizing:border-box;padding:var(--tala-ref-space-1) 0}.tala-select__option{display:flex;align-items:center;gap:var(--tala-ref-space-2);padding:8px var(--tala-select-padding-x);font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:400;color:var(--tala-select-color);cursor:pointer;transition:background-color .1s ease}.tala-select__option:hover,.tala-select__option--focused{background-color:var(--tala-sys-color-surface-sunken)}.tala-select__option--selected{color:var(--tala-sys-color-text-accent);font-weight:500}.tala-select__option--disabled{color:var(--tala-sys-color-text-disabled);cursor:not-allowed}.tala-select__option--disabled:hover{background-color:transparent}.tala-select__option-label{flex:1 0 0;min-width:0}.tala-select__option-check{flex-shrink:0;width:var(--tala-select-icon-size);height:var(--tala-select-icon-size);color:var(--tala-sys-color-text-accent)}.tala-select__checkbox{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:16px;height:16px;border:1.5px solid var(--tala-sys-color-border-default);border-radius:4px;color:var(--tala-sys-color-text-accent);box-sizing:border-box;transition:background-color .1s ease,border-color .1s ease}.tala-select__checkbox svg{width:10px;height:10px;display:none}.tala-select__option--selected .tala-select__checkbox{background-color:var(--tala-sys-color-text-accent);border-color:var(--tala-sys-color-text-accent)}.tala-select__option--selected .tala-select__checkbox svg{display:block;color:#fff;stroke:#fff;fill:none;stroke-width:2}.tala-select__empty{padding:8px var(--tala-select-padding-x);font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;color:var(--tala-sys-color-text-tertiary);text-align:center}.tala-select__chips{display:flex;flex-wrap:wrap;gap:4px;padding:2px 0}.tala-select__chip{display:inline-flex;align-items:center;gap:4px;padding:0 6px;height:20px;background-color:var(--tala-sys-color-surface-sunken);border:1px solid var(--tala-sys-color-border-default);border-radius:4px;font-family:var(--tala-ref-type-family-inter);font-size:12px;line-height:16px;font-weight:400;color:var(--tala-select-color);white-space:nowrap}.tala-select__chip-remove{display:flex;align-items:center;justify-content:center;width:12px;height:12px;padding:0;border:none;background:transparent;color:var(--tala-sys-color-text-tertiary);cursor:pointer;border-radius:2px;flex-shrink:0}.tala-select__chip-remove svg{width:8px;height:8px}.tala-select__chip-remove:hover{color:var(--tala-sys-color-text-primary)}.tala-select__helper-row{display:flex;align-items:flex-start;min-height:16px}.tala-select__helper{font-family:var(--tala-ref-type-family-inter);font-size:12px;line-height:16px;font-weight:400;color:var(--tala-select-helper-color)}tala-select.tala-select--sm{--tala-select-height: 32px;--tala-select-padding-x: 10px;--tala-select-gap: 6px;--tala-select-icon-size: 14px}tala-select.tala-select--lg{--tala-select-height: 48px;--tala-select-padding-x: 14px;--tala-select-icon-size: 18px;--tala-select-border-radius: var(--tala-ref-radius-lg)}tala-select.tala-select--error{--tala-select-bg: var(--tala-sys-color-feedback-danger-bg);--tala-select-border-color: var(--tala-sys-color-border-error);--tala-select-helper-color: var(--tala-sys-color-feedback-danger-text)}tala-select.tala-select--success{--tala-select-bg: var(--tala-sys-color-feedback-success-bg);--tala-select-border-color: var(--tala-sys-color-feedback-success-border);--tala-select-helper-color: var(--tala-sys-color-feedback-success-text)}tala-select.tala-select--disabled{--tala-select-bg: var(--tala-sys-color-surface-sunken);--tala-select-color: var(--tala-sys-color-text-disabled);--tala-select-placeholder-color: var(--tala-sys-color-text-disabled);--tala-select-label-color: var(--tala-sys-color-text-disabled);pointer-events:none}tala-select.tala-select--disabled .tala-select__trigger{cursor:not-allowed}tala-select.tala-select--loading .tala-select__trigger{cursor:wait;pointer-events:none}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
409
523
  }
410
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: TalaSelect, decorators: [{
524
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TalaSelect, decorators: [{
411
525
  type: Component,
412
- args: [{ selector: 'tala-select', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
526
+ args: [{ selector: 'tala-select', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [NgTemplateOutlet], host: {
413
527
  '[class]': 'hostClasses()',
414
528
  '[style.width]': '_hostWidth()',
415
- }, providers: [
416
- {
417
- provide: NG_VALUE_ACCESSOR,
418
- useExisting: forwardRef(() => TalaSelect),
419
- multi: true,
420
- },
421
- ], template: "@if (label()) {\n <div class=\"tala-select__label-row\">\n <label class=\"tala-select__label\" [attr.for]=\"_id\">{{ label() }}</label>\n @if (required()) {\n <span class=\"tala-select__required\" aria-hidden=\"true\">*</span>\n }\n </div>\n}\n\n<div\n class=\"tala-select__trigger\"\n [id]=\"_id\"\n role=\"combobox\"\n tabindex=\"0\"\n [attr.aria-expanded]=\"_isOpen()\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"_listboxId\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-disabled]=\"_isDisabled() || null\"\n [attr.aria-invalid]=\"status() === 'error' || null\"\n [attr.aria-describedby]=\"helperText() && !_isDisabled() ? _helperId : null\"\n (click)=\"_onTriggerClick($event)\"\n (keydown)=\"_onTriggerKeydown($event)\"\n>\n <div class=\"tala-select__trigger-content\">\n @if (type() === 'multi' && _hasValue()) {\n <div class=\"tala-select__chips\">\n @for (chip of _selectedLabels(); track chip.value) {\n <span class=\"tala-select__chip\">\n {{ chip.label }}\n <button\n class=\"tala-select__chip-remove\"\n type=\"button\"\n aria-label=\"Remove {{ chip.label }}\"\n (click)=\"_removeChip(chip.value, $event)\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n >\n <line x1=\"4\" y1=\"4\" x2=\"12\" y2=\"12\" />\n <line x1=\"12\" y1=\"4\" x2=\"4\" y2=\"12\" />\n </svg>\n </button>\n </span>\n }\n </div>\n } @else if (type() === 'searchable' && _isOpen()) {\n <input\n class=\"tala-select__search\"\n type=\"text\"\n autocomplete=\"off\"\n [placeholder]=\"placeholder() || 'Search...'\"\n [value]=\"_searchQuery()\"\n (input)=\"_onSearchInput($event)\"\n (keydown)=\"_onSearchKeydown($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n } @else {\n <span class=\"tala-select__value\" [class.tala-select__value--placeholder]=\"!_hasValue()\">\n {{ _hasValue() ? _displayValue() : placeholder() }}\n </span>\n }\n </div>\n\n <span class=\"tala-select__trailing\">\n @if (loading()) {\n <svg\n class=\"tala-select__spinner\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\" />\n </svg>\n } @else {\n <svg\n class=\"tala-select__chevron\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M4 6l4 4 4-4\" />\n </svg>\n }\n </span>\n</div>\n\n@if (_isOpen() && !_isDisabled() && !loading()) {\n <div\n class=\"tala-select__dropdown\"\n role=\"listbox\"\n [id]=\"_listboxId\"\n [attr.aria-multiselectable]=\"type() === 'multi' || null\"\n (click)=\"_onDropdownClick($event)\"\n >\n @for (opt of _filteredOptions(); track opt.value; let i = $index) {\n <div\n class=\"tala-select__option\"\n [class.tala-select__option--selected]=\"_isSelected(opt.value)\"\n [class.tala-select__option--disabled]=\"opt.disabled\"\n [class.tala-select__option--focused]=\"_focusedIndex() === i\"\n role=\"option\"\n [attr.aria-selected]=\"_isSelected(opt.value)\"\n [attr.aria-disabled]=\"opt.disabled || null\"\n (click)=\"_selectOption(opt, $event)\"\n >\n @if (type() === 'multi') {\n <span class=\"tala-select__checkbox\" aria-hidden=\"true\">\n @if (_isSelected(opt.value)) {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\">\n <path d=\"M3 8.5L6.5 12 13 5\" />\n </svg>\n }\n </span>\n }\n <span class=\"tala-select__option-label\">{{ opt.label }}</span>\n @if (type() === 'single' && _isSelected(opt.value)) {\n <svg\n class=\"tala-select__option-check\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M3 8.5L6.5 12 13 5\" />\n </svg>\n }\n </div>\n } @empty {\n <div class=\"tala-select__empty\">No options found</div>\n }\n </div>\n}\n\n@if (helperText() && !_isDisabled()) {\n <div class=\"tala-select__helper-row\" [id]=\"_helperId\">\n <span class=\"tala-select__helper\">{{ helperText() }}</span>\n </div>\n}\n", styles: ["tala-select{--tala-select-bg: var(--tala-sys-color-surface-default);--tala-select-border-color: var(--tala-sys-color-outline-default);--tala-select-color: var(--tala-sys-color-text-primary);--tala-select-placeholder-color: var(--tala-sys-color-text-placeholder);--tala-select-label-color: var(--tala-sys-color-text-secondary);--tala-select-helper-color: var(--tala-sys-color-text-secondary);--tala-select-focus-ring: 0 0 0 3px rgba(9, 9, 13, .1);--tala-select-height: 40px;--tala-select-padding-x: 12px;--tala-select-gap: var(--tala-ref-space-2);--tala-select-icon-size: 16px;--tala-select-border-radius: var(--tala-ref-radius-md);position:relative;display:flex;flex-direction:column;gap:var(--tala-ref-space-1);box-sizing:border-box}.tala-select__label-row{display:flex;align-items:center;gap:var(--tala-ref-space-1);height:20px;overflow:hidden;white-space:nowrap}.tala-select__label{font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:500;color:var(--tala-select-label-color);cursor:pointer}.tala-select__required{font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:500;color:var(--tala-sys-color-brand)}.tala-select__trigger{display:flex;align-items:center;gap:var(--tala-select-gap);min-height:var(--tala-select-height);padding:4px var(--tala-select-padding-x);border:1px solid var(--tala-select-border-color);border-radius:var(--tala-select-border-radius);background-color:var(--tala-select-bg);overflow:hidden;box-sizing:border-box;cursor:pointer;outline:none;transition:border-color .15s ease,box-shadow .15s ease}.tala-select__trigger:focus-visible{border-color:var(--tala-sys-color-outline-focus);box-shadow:var(--tala-select-focus-ring)}tala-select:not(.tala-select--disabled,.tala-select--loading) .tala-select__trigger:hover{border-color:var(--tala-sys-color-outline-strong)}tala-select.tala-select--open .tala-select__trigger{border-color:var(--tala-sys-color-outline-focus);box-shadow:var(--tala-select-focus-ring)}.tala-select__trigger-content{flex:1 0 0;min-width:0;display:flex;align-items:center;gap:var(--tala-ref-space-1);flex-wrap:wrap;overflow:hidden}.tala-select__value{font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:400;color:var(--tala-select-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tala-select__value--placeholder{color:var(--tala-select-placeholder-color)}.tala-select__search{flex:1 0 0;min-width:0;border:none;outline:none;background:transparent;font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:400;color:var(--tala-select-color);padding:0;box-sizing:border-box}.tala-select__search::placeholder{color:var(--tala-select-placeholder-color)}.tala-select__trailing{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--tala-select-icon-size);height:var(--tala-select-icon-size);color:var(--tala-sys-color-text-tertiary)}.tala-select__chevron{width:100%;height:100%;transition:transform .15s ease}tala-select.tala-select--open .tala-select__chevron{transform:rotate(180deg)}@keyframes tala-spin{to{transform:rotate(360deg)}}.tala-select__spinner{width:100%;height:100%;animation:tala-spin .7s linear infinite;transform-origin:center}.tala-select__dropdown{position:absolute;top:calc(100% + 4px);left:0;right:0;background-color:var(--tala-sys-color-surface-raised);border:1px solid var(--tala-sys-color-outline-default);border-radius:var(--tala-select-border-radius);box-shadow:var(--tala-ref-shadow-md);max-height:240px;overflow-y:auto;z-index:1000;box-sizing:border-box;padding:var(--tala-ref-space-1) 0}.tala-select__option{display:flex;align-items:center;gap:var(--tala-ref-space-2);padding:8px var(--tala-select-padding-x);font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:400;color:var(--tala-select-color);cursor:pointer;transition:background-color .1s ease}.tala-select__option:hover,.tala-select__option--focused{background-color:var(--tala-sys-color-surface-sunken)}.tala-select__option--selected{color:var(--tala-sys-color-brand);font-weight:500}.tala-select__option--disabled{color:var(--tala-sys-color-text-disabled);cursor:not-allowed}.tala-select__option--disabled:hover{background-color:transparent}.tala-select__option-label{flex:1 0 0;min-width:0}.tala-select__option-check{flex-shrink:0;width:var(--tala-select-icon-size);height:var(--tala-select-icon-size);color:var(--tala-sys-color-brand)}.tala-select__checkbox{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:16px;height:16px;border:1.5px solid var(--tala-sys-color-outline-default);border-radius:4px;color:var(--tala-sys-color-brand);box-sizing:border-box;transition:background-color .1s ease,border-color .1s ease}.tala-select__checkbox svg{width:10px;height:10px;display:none}.tala-select__option--selected .tala-select__checkbox{background-color:var(--tala-sys-color-brand);border-color:var(--tala-sys-color-brand)}.tala-select__option--selected .tala-select__checkbox svg{display:block;color:#fff;stroke:#fff;fill:none;stroke-width:2}.tala-select__empty{padding:8px var(--tala-select-padding-x);font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;color:var(--tala-sys-color-text-tertiary);text-align:center}.tala-select__chips{display:flex;flex-wrap:wrap;gap:4px;padding:2px 0}.tala-select__chip{display:inline-flex;align-items:center;gap:4px;padding:0 6px;height:20px;background-color:var(--tala-sys-color-surface-sunken);border:1px solid var(--tala-sys-color-outline-default);border-radius:4px;font-family:var(--tala-ref-type-family-inter);font-size:12px;line-height:16px;font-weight:400;color:var(--tala-select-color);white-space:nowrap}.tala-select__chip-remove{display:flex;align-items:center;justify-content:center;width:12px;height:12px;padding:0;border:none;background:transparent;color:var(--tala-sys-color-text-tertiary);cursor:pointer;border-radius:2px;flex-shrink:0}.tala-select__chip-remove svg{width:8px;height:8px}.tala-select__chip-remove:hover{color:var(--tala-sys-color-text-primary)}.tala-select__helper-row{display:flex;align-items:flex-start;min-height:16px}.tala-select__helper{font-family:var(--tala-ref-type-family-inter);font-size:12px;line-height:16px;font-weight:400;color:var(--tala-select-helper-color)}tala-select.tala-select--sm{--tala-select-height: 32px;--tala-select-padding-x: 10px;--tala-select-gap: 6px;--tala-select-icon-size: 14px}tala-select.tala-select--lg{--tala-select-height: 48px;--tala-select-padding-x: 14px;--tala-select-icon-size: 18px;--tala-select-border-radius: var(--tala-ref-radius-lg)}tala-select.tala-select--error{--tala-select-bg: var(--tala-sys-color-error-surface);--tala-select-border-color: var(--tala-sys-color-error-outline);--tala-select-helper-color: var(--tala-sys-color-error-text)}tala-select.tala-select--success{--tala-select-bg: var(--tala-sys-color-success-surface);--tala-select-border-color: var(--tala-sys-color-success-outline);--tala-select-helper-color: var(--tala-sys-color-success-text)}tala-select.tala-select--disabled{--tala-select-bg: var(--tala-sys-color-surface-sunken);--tala-select-color: var(--tala-sys-color-text-disabled);--tala-select-placeholder-color: var(--tala-sys-color-text-disabled);--tala-select-label-color: var(--tala-sys-color-text-disabled);pointer-events:none}tala-select.tala-select--disabled .tala-select__trigger{cursor:not-allowed}tala-select.tala-select--loading .tala-select__trigger{cursor:wait;pointer-events:none}\n"] }]
422
- }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], helperText: [{ type: i0.Input, args: [{ isSignal: true, alias: "helperText", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], _onDocumentClick: [{
529
+ }, template: "@if (label()) {\n <div class=\"tala-select__label-row\">\n <label class=\"tala-select__label\" [attr.for]=\"_id\">{{ label() }}</label>\n @if (required()) {\n <span class=\"tala-select__required\" aria-hidden=\"true\">*</span>\n }\n </div>\n}\n\n<div\n class=\"tala-select__trigger\"\n [id]=\"_id\"\n role=\"combobox\"\n tabindex=\"0\"\n [attr.aria-expanded]=\"_isOpen()\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"_listboxId\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.aria-invalid]=\"status() === 'error' || null\"\n [attr.aria-describedby]=\"helperText() && !disabled() ? _helperId : null\"\n (click)=\"_onTriggerClick($event)\"\n (keydown)=\"_onTriggerKeydown($event)\"\n>\n <div class=\"tala-select__trigger-content\">\n @if (type() === 'multi' && _hasValue()) {\n <div class=\"tala-select__chips\">\n @for (chip of _selectedOptions(); track chip.value) {\n <span class=\"tala-select__chip\">\n @if (_valueTemplate(); as valueTpl) {\n <ng-container\n [ngTemplateOutlet]=\"valueTpl.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: chip }\"\n ></ng-container>\n } @else {\n {{ chip.label }}\n }\n <button\n class=\"tala-select__chip-remove\"\n type=\"button\"\n aria-label=\"Remove {{ chip.label }}\"\n (click)=\"_removeChip(chip.value, $event)\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n >\n <line x1=\"4\" y1=\"4\" x2=\"12\" y2=\"12\" />\n <line x1=\"12\" y1=\"4\" x2=\"4\" y2=\"12\" />\n </svg>\n </button>\n </span>\n }\n </div>\n } @else if (type() === 'searchable' && _isOpen()) {\n <input\n class=\"tala-select__search\"\n type=\"text\"\n autocomplete=\"off\"\n [placeholder]=\"placeholder() || 'Search...'\"\n [value]=\"_searchQuery()\"\n (input)=\"_onSearchInput($event)\"\n (keydown)=\"_onSearchKeydown($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n } @else {\n <span class=\"tala-select__value\" [class.tala-select__value--placeholder]=\"!_hasValue()\">\n @if (_hasValue()) {\n @if (_valueTemplate(); as valueTpl) {\n <ng-container\n [ngTemplateOutlet]=\"valueTpl.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: _selectedOption() }\"\n ></ng-container>\n } @else {\n {{ _displayValue() }}\n }\n } @else {\n {{ placeholder() }}\n }\n </span>\n }\n </div>\n\n <span class=\"tala-select__trailing\">\n @if (loading()) {\n <svg\n class=\"tala-select__spinner\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\" />\n </svg>\n } @else {\n <svg\n class=\"tala-select__chevron\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M4 6l4 4 4-4\" />\n </svg>\n }\n </span>\n</div>\n\n@if (_isOpen() && !disabled() && !loading()) {\n <div\n class=\"tala-select__dropdown\"\n role=\"listbox\"\n [id]=\"_listboxId\"\n [attr.aria-multiselectable]=\"type() === 'multi' || null\"\n (click)=\"_onDropdownClick($event)\"\n >\n @for (opt of _filteredOptions(); track opt.value; let i = $index) {\n <div\n class=\"tala-select__option\"\n [class.tala-select__option--selected]=\"_isSelected(opt.value)\"\n [class.tala-select__option--disabled]=\"opt.disabled\"\n [class.tala-select__option--focused]=\"_focusedIndex() === i\"\n role=\"option\"\n [attr.aria-selected]=\"_isSelected(opt.value)\"\n [attr.aria-disabled]=\"opt.disabled || null\"\n (click)=\"_selectOption(opt, $event)\"\n >\n @if (_optionTemplate(); as optionTpl) {\n <ng-container\n [ngTemplateOutlet]=\"optionTpl.templateRef\"\n [ngTemplateOutletContext]=\"{\n $implicit: opt,\n selected: _isSelected(opt.value),\n focused: _focusedIndex() === i,\n }\"\n ></ng-container>\n } @else {\n @if (type() === 'multi') {\n <span class=\"tala-select__checkbox\" aria-hidden=\"true\">\n @if (_isSelected(opt.value)) {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\">\n <path d=\"M3 8.5L6.5 12 13 5\" />\n </svg>\n }\n </span>\n }\n <span class=\"tala-select__option-label\">{{ opt.label }}</span>\n @if (type() === 'single' && _isSelected(opt.value)) {\n <svg\n class=\"tala-select__option-check\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M3 8.5L6.5 12 13 5\" />\n </svg>\n }\n }\n </div>\n } @empty {\n <div class=\"tala-select__empty\">No options found</div>\n }\n </div>\n}\n\n@if (helperText() && !disabled()) {\n <div class=\"tala-select__helper-row\" [id]=\"_helperId\">\n <span class=\"tala-select__helper\">{{ helperText() }}</span>\n </div>\n}\n", styles: ["tala-select{--tala-select-bg: var(--tala-sys-color-surface-default);--tala-select-border-color: var(--tala-sys-color-border-default);--tala-select-color: var(--tala-sys-color-text-primary);--tala-select-placeholder-color: var(--tala-sys-color-text-placeholder);--tala-select-label-color: var(--tala-sys-color-text-secondary);--tala-select-helper-color: var(--tala-sys-color-text-secondary);--tala-select-focus-ring: 0 0 0 3px rgba(9, 9, 13, .1);--tala-select-height: 40px;--tala-select-padding-x: 12px;--tala-select-gap: var(--tala-ref-space-2);--tala-select-icon-size: 16px;--tala-select-border-radius: var(--tala-ref-radius-md);position:relative;display:flex;flex-direction:column;gap:var(--tala-ref-space-1);box-sizing:border-box}.tala-select__label-row{display:flex;align-items:center;gap:var(--tala-ref-space-1);height:20px;overflow:hidden;white-space:nowrap}.tala-select__label{font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:500;color:var(--tala-select-label-color);cursor:pointer}.tala-select__required{font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:500;color:var(--tala-sys-color-text-accent)}.tala-select__trigger{display:flex;align-items:center;gap:var(--tala-select-gap);min-height:var(--tala-select-height);padding:4px var(--tala-select-padding-x);border:1px solid var(--tala-select-border-color);border-radius:var(--tala-select-border-radius);background-color:var(--tala-select-bg);overflow:hidden;box-sizing:border-box;cursor:pointer;outline:none;transition:border-color .15s ease,box-shadow .15s ease}.tala-select__trigger:focus-visible{border-color:var(--tala-sys-color-border-focus);box-shadow:var(--tala-select-focus-ring)}tala-select:not(.tala-select--disabled,.tala-select--loading) .tala-select__trigger:hover{border-color:var(--tala-sys-color-border-strong)}tala-select.tala-select--open .tala-select__trigger{border-color:var(--tala-sys-color-border-focus);box-shadow:var(--tala-select-focus-ring)}.tala-select__trigger-content{flex:1 0 0;min-width:0;display:flex;align-items:center;gap:var(--tala-ref-space-1);flex-wrap:wrap;overflow:hidden}.tala-select__value{font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:400;color:var(--tala-select-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tala-select__value--placeholder{color:var(--tala-select-placeholder-color)}.tala-select__search{flex:1 0 0;min-width:0;border:none;outline:none;background:transparent;font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:400;color:var(--tala-select-color);padding:0;box-sizing:border-box}.tala-select__search::placeholder{color:var(--tala-select-placeholder-color)}.tala-select__trailing{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--tala-select-icon-size);height:var(--tala-select-icon-size);color:var(--tala-sys-color-text-tertiary)}.tala-select__chevron{width:100%;height:100%;transition:transform .15s ease}tala-select.tala-select--open .tala-select__chevron{transform:rotate(180deg)}@keyframes tala-spin{to{transform:rotate(360deg)}}.tala-select__spinner{width:100%;height:100%;animation:tala-spin .7s linear infinite;transform-origin:center}.tala-select__dropdown{position:absolute;top:calc(100% + 4px);left:0;right:0;background-color:var(--tala-sys-color-surface-raised);border:1px solid var(--tala-sys-color-border-default);border-radius:var(--tala-select-border-radius);box-shadow:var(--tala-ref-shadow-md);max-height:240px;overflow-y:auto;z-index:1000;box-sizing:border-box;padding:var(--tala-ref-space-1) 0}.tala-select__option{display:flex;align-items:center;gap:var(--tala-ref-space-2);padding:8px var(--tala-select-padding-x);font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;font-weight:400;color:var(--tala-select-color);cursor:pointer;transition:background-color .1s ease}.tala-select__option:hover,.tala-select__option--focused{background-color:var(--tala-sys-color-surface-sunken)}.tala-select__option--selected{color:var(--tala-sys-color-text-accent);font-weight:500}.tala-select__option--disabled{color:var(--tala-sys-color-text-disabled);cursor:not-allowed}.tala-select__option--disabled:hover{background-color:transparent}.tala-select__option-label{flex:1 0 0;min-width:0}.tala-select__option-check{flex-shrink:0;width:var(--tala-select-icon-size);height:var(--tala-select-icon-size);color:var(--tala-sys-color-text-accent)}.tala-select__checkbox{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:16px;height:16px;border:1.5px solid var(--tala-sys-color-border-default);border-radius:4px;color:var(--tala-sys-color-text-accent);box-sizing:border-box;transition:background-color .1s ease,border-color .1s ease}.tala-select__checkbox svg{width:10px;height:10px;display:none}.tala-select__option--selected .tala-select__checkbox{background-color:var(--tala-sys-color-text-accent);border-color:var(--tala-sys-color-text-accent)}.tala-select__option--selected .tala-select__checkbox svg{display:block;color:#fff;stroke:#fff;fill:none;stroke-width:2}.tala-select__empty{padding:8px var(--tala-select-padding-x);font-family:var(--tala-ref-type-family-inter);font-size:14px;line-height:20px;color:var(--tala-sys-color-text-tertiary);text-align:center}.tala-select__chips{display:flex;flex-wrap:wrap;gap:4px;padding:2px 0}.tala-select__chip{display:inline-flex;align-items:center;gap:4px;padding:0 6px;height:20px;background-color:var(--tala-sys-color-surface-sunken);border:1px solid var(--tala-sys-color-border-default);border-radius:4px;font-family:var(--tala-ref-type-family-inter);font-size:12px;line-height:16px;font-weight:400;color:var(--tala-select-color);white-space:nowrap}.tala-select__chip-remove{display:flex;align-items:center;justify-content:center;width:12px;height:12px;padding:0;border:none;background:transparent;color:var(--tala-sys-color-text-tertiary);cursor:pointer;border-radius:2px;flex-shrink:0}.tala-select__chip-remove svg{width:8px;height:8px}.tala-select__chip-remove:hover{color:var(--tala-sys-color-text-primary)}.tala-select__helper-row{display:flex;align-items:flex-start;min-height:16px}.tala-select__helper{font-family:var(--tala-ref-type-family-inter);font-size:12px;line-height:16px;font-weight:400;color:var(--tala-select-helper-color)}tala-select.tala-select--sm{--tala-select-height: 32px;--tala-select-padding-x: 10px;--tala-select-gap: 6px;--tala-select-icon-size: 14px}tala-select.tala-select--lg{--tala-select-height: 48px;--tala-select-padding-x: 14px;--tala-select-icon-size: 18px;--tala-select-border-radius: var(--tala-ref-radius-lg)}tala-select.tala-select--error{--tala-select-bg: var(--tala-sys-color-feedback-danger-bg);--tala-select-border-color: var(--tala-sys-color-border-error);--tala-select-helper-color: var(--tala-sys-color-feedback-danger-text)}tala-select.tala-select--success{--tala-select-bg: var(--tala-sys-color-feedback-success-bg);--tala-select-border-color: var(--tala-sys-color-feedback-success-border);--tala-select-helper-color: var(--tala-sys-color-feedback-success-text)}tala-select.tala-select--disabled{--tala-select-bg: var(--tala-sys-color-surface-sunken);--tala-select-color: var(--tala-sys-color-text-disabled);--tala-select-placeholder-color: var(--tala-sys-color-text-disabled);--tala-select-label-color: var(--tala-sys-color-text-disabled);pointer-events:none}tala-select.tala-select--disabled .tala-select__trigger{cursor:not-allowed}tala-select.tala-select--loading .tala-select__trigger{cursor:wait;pointer-events:none}\n"] }]
530
+ }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], helperText: [{ type: i0.Input, args: [{ isSignal: true, alias: "helperText", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], _optionTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TalaSelectOptionTemplate), { isSignal: true }] }], _valueTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TalaSelectValueTemplate), { isSignal: true }] }], _onDocumentClick: [{
423
531
  type: HostListener,
424
532
  args: ['document:click', ['$event.target']]
425
533
  }] } });
426
534
 
427
535
  class TalaText {
428
- talaText = input.required(...(ngDevMode ? [{ debugName: "talaText" }] : /* istanbul ignore next */ []));
429
- size = input('medium', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
430
- weight = input(...(ngDevMode ? [undefined, { debugName: "weight" }] : /* istanbul ignore next */ []));
536
+ /**
537
+ * Sets the text variant/semantic type.
538
+ * Determines the HTML semantics and typography styles applied to the element.
539
+ *
540
+ * @default 'body'
541
+ * @example
542
+ * // Heading variant
543
+ * <h1 talaText="h1">Heading 1</h1>
544
+ * // Body text with custom size
545
+ * <p talaText="body">Body text</p>
546
+ * // Code block
547
+ * <code talaText="code">const x = 42;</code>
548
+ */
549
+ talaText = input('body', ...(ngDevMode ? [{ debugName: "talaText" }] : /* istanbul ignore next */ []));
550
+ /**
551
+ * Controls the font size relative to the current variant.
552
+ * Size mapping varies by variant:
553
+ * - Ignored for headings (h1-h6), code, and documentation text
554
+ * - body: 'sm' | 'md' (default) | 'lg'
555
+ * - label: 'xs' | 'sm' | 'md' (default) | 'lg'
556
+ * - caption: 'sm' (default) | 'lg'
557
+ *
558
+ * @default 'md'
559
+ * @example
560
+ * <p talaText="body" [size]="'lg'">Large body text</p>
561
+ */
562
+ size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
563
+ /**
564
+ * Controls the font weight.
565
+ * Weight application varies by variant:
566
+ * - Ignored for headings (h1-h6), code, caption, and documentation text
567
+ * - For body/label: 'regular' (default) | 'medium' | 'semibold' | 'bold'
568
+ *
569
+ * @default 'regular'
570
+ * @example
571
+ * <p talaText="body" [weight]="'bold'">Bold body text</p>
572
+ */
573
+ weight = input('regular', ...(ngDevMode ? [{ debugName: "weight" }] : /* istanbul ignore next */ []));
574
+ normalizedVariant = computed(() => {
575
+ const value = this.talaText();
576
+ const normalized = typeof value === 'string' ? value.trim() : '';
577
+ switch (normalized) {
578
+ case 'h1':
579
+ case 'h2':
580
+ case 'h3':
581
+ case 'h4':
582
+ case 'h5':
583
+ case 'h6':
584
+ case 'body':
585
+ case 'label':
586
+ case 'caption':
587
+ case 'code':
588
+ case 'docTitle':
589
+ case 'docSection':
590
+ return normalized;
591
+ default:
592
+ return 'body';
593
+ }
594
+ }, ...(ngDevMode ? [{ debugName: "normalizedVariant" }] : /* istanbul ignore next */ []));
595
+ normalizedSize = computed(() => {
596
+ const value = this.size();
597
+ const normalized = typeof value === 'string' ? value.trim() : '';
598
+ switch (normalized) {
599
+ case 'xs':
600
+ case 'sm':
601
+ case 'md':
602
+ case 'lg':
603
+ return normalized;
604
+ default:
605
+ return 'md';
606
+ }
607
+ }, ...(ngDevMode ? [{ debugName: "normalizedSize" }] : /* istanbul ignore next */ []));
608
+ normalizedWeight = computed(() => {
609
+ const value = this.weight();
610
+ const normalized = typeof value === 'string' ? value.trim() : '';
611
+ switch (normalized) {
612
+ case 'regular':
613
+ case 'medium':
614
+ case 'semibold':
615
+ case 'bold':
616
+ return normalized;
617
+ default:
618
+ return 'regular';
619
+ }
620
+ }, ...(ngDevMode ? [{ debugName: "normalizedWeight" }] : /* istanbul ignore next */ []));
431
621
  classes = computed(() => [this.variantClass(), this.weightClass()].filter(Boolean).join(' '), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
432
622
  variantClass = computed(() => {
433
- const v = this.talaText();
623
+ const v = this.normalizedVariant();
434
624
  if (/^h[1-6]$/.test(v))
435
625
  return `tala-${v}`;
436
626
  if (v === 'code')
437
627
  return 'tala-code';
438
- // body / label / caption: 'medium' maps to the 'default' SCSS class
439
- const sizeKey = this.size() === 'medium' ? 'default' : this.size();
440
- return `tala-${v}-${sizeKey}`;
628
+ if (v === 'docTitle')
629
+ return 'tala-doc-title';
630
+ if (v === 'docSection')
631
+ return 'tala-doc-section';
632
+ if (v === 'body')
633
+ return `tala-body-${this.bodySizeKey()}`;
634
+ if (v === 'label')
635
+ return `tala-label-${this.labelSizeKey()}`;
636
+ return `tala-caption-${this.captionSizeKey()}`;
441
637
  }, ...(ngDevMode ? [{ debugName: "variantClass" }] : /* istanbul ignore next */ []));
442
638
  weightClass = computed(() => {
443
- const w = this.weight();
444
- const v = this.talaText();
445
- if (!w || /^h[1-6]$/.test(v) || v === 'code' || v === 'caption')
639
+ const w = this.normalizedWeight();
640
+ const v = this.normalizedVariant();
641
+ if (/^h[1-6]$/.test(v) ||
642
+ v === 'code' ||
643
+ v === 'caption' ||
644
+ v === 'docTitle' ||
645
+ v === 'docSection')
646
+ return '';
647
+ if (w === 'regular')
446
648
  return '';
649
+ if (v === 'label')
650
+ return w === 'semibold' ? `${this.variantClass()}--semibold` : '';
447
651
  return `${this.variantClass()}--${w}`;
448
652
  }, ...(ngDevMode ? [{ debugName: "weightClass" }] : /* istanbul ignore next */ []));
449
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: TalaText, deps: [], target: i0.ɵɵFactoryTarget.Directive });
450
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.13", type: TalaText, isStandalone: true, selector: "[talaText]", inputs: { talaText: { classPropertyName: "talaText", publicName: "talaText", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, weight: { classPropertyName: "weight", publicName: "weight", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0 });
653
+ bodySizeKey = computed(() => {
654
+ const s = this.normalizedSize();
655
+ if (s === 'lg')
656
+ return 'lg';
657
+ if (s === 'sm')
658
+ return 'sm';
659
+ return 'md';
660
+ }, ...(ngDevMode ? [{ debugName: "bodySizeKey" }] : /* istanbul ignore next */ []));
661
+ labelSizeKey = computed(() => {
662
+ const s = this.normalizedSize();
663
+ if (s === 'lg')
664
+ return 'lg';
665
+ if (s === 'sm')
666
+ return 'sm';
667
+ if (s === 'xs')
668
+ return 'xs';
669
+ return 'md';
670
+ }, ...(ngDevMode ? [{ debugName: "labelSizeKey" }] : /* istanbul ignore next */ []));
671
+ captionSizeKey = computed(() => {
672
+ const s = this.normalizedSize();
673
+ return s === 'lg' ? 'lg' : 'sm';
674
+ }, ...(ngDevMode ? [{ debugName: "captionSizeKey" }] : /* istanbul ignore next */ []));
675
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TalaText, deps: [], target: i0.ɵɵFactoryTarget.Component });
676
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: TalaText, isStandalone: true, selector: "[talaText]", inputs: { talaText: { classPropertyName: "talaText", publicName: "talaText", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, weight: { classPropertyName: "weight", publicName: "weight", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: '<ng-content />', isInline: true });
451
677
  }
452
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: TalaText, decorators: [{
453
- type: Directive,
678
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TalaText, decorators: [{
679
+ type: Component,
454
680
  args: [{
455
681
  selector: '[talaText]',
456
- standalone: true,
682
+ template: '<ng-content />',
457
683
  host: { '[class]': 'classes()' },
458
684
  }]
459
- }], propDecorators: { talaText: [{ type: i0.Input, args: [{ isSignal: true, alias: "talaText", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], weight: [{ type: i0.Input, args: [{ isSignal: true, alias: "weight", required: false }] }] } });
685
+ }], propDecorators: { talaText: [{ type: i0.Input, args: [{ isSignal: true, alias: "talaText", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], weight: [{ type: i0.Input, args: [{ isSignal: true, alias: "weight", required: false }] }] } });
460
686
 
461
687
  /*
462
688
  * Public API Surface of doku-tala
@@ -466,5 +692,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImpo
466
692
  * Generated bundle index. Do not edit.
467
693
  */
468
694
 
469
- export { TalaAvatar, TalaAvatarGroup, TalaButton, TalaInput, TalaSelect, TalaText };
695
+ export { TALA_FORM_FIELD_CONTROL, TALA_FORM_FIELD_HOST, TalaAlert, TalaAvatar, TalaAvatarGroup, TalaButton, TalaFormField, TalaInput, TalaSelect, TalaSelectOptionTemplate, TalaSelectValueTemplate, TalaText };
470
696
  //# sourceMappingURL=doku-com-tala.mjs.map