@doku-com/tala 1.0.0-alpha.1 → 1.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/doku-com-tala.mjs +319 -6
- package/fesm2022/doku-com-tala.mjs.map +1 -1
- package/llms.txt +241 -0
- package/package.json +1 -1
- package/styles/_color.scss +159 -112
- package/styles/_shadow.scss +5 -5
- package/types/doku-com-tala.d.ts +96 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, computed, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { input, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, signal, forwardRef, inject, ElementRef, HostListener } from '@angular/core';
|
|
3
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
4
|
|
|
4
5
|
class TalaAvatar {
|
|
5
6
|
name = input('', ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
@@ -61,7 +62,7 @@ class TalaAvatar {
|
|
|
61
62
|
return (words[0][0] + words[words.length - 1][0]).toUpperCase();
|
|
62
63
|
}
|
|
63
64
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: TalaAvatar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
64
|
-
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(--color-
|
|
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(--font-body);font-weight:var(--font-weight-medium);color:var(--tala-avatar-initials-color);line-height:1;letter-spacing:var(--letter-spacing-normal)}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:var(--font-size-11);line-height:var(--line-height-14)}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:var(--font-size-14);line-height:var(--line-height-20)}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:var(--font-size-16);line-height:var(--line-height-20)}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(--radius-full)}tala-avatar.tala-avatar--square.tala-avatar--xs{border-radius:var(--radius-sm)}tala-avatar.tala-avatar--square.tala-avatar--sm{border-radius:var(--radius-md)}tala-avatar.tala-avatar--square.tala-avatar--md,tala-avatar.tala-avatar--square.tala-avatar--lg{border-radius:var(--radius-lg)}tala-avatar.tala-avatar--square.tala-avatar--xl{border-radius:var(--radius-xl)}.tala-avatar__status{position:absolute;border-radius:var(--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(--radius-full);font-family:var(--font-body);font-weight:var(--font-weight-medium);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 });
|
|
65
66
|
}
|
|
66
67
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: TalaAvatar, decorators: [{
|
|
67
68
|
type: Component,
|
|
@@ -70,7 +71,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImpo
|
|
|
70
71
|
'[style.background-color]': 'bgColor()',
|
|
71
72
|
'[attr.role]': '"img"',
|
|
72
73
|
'[attr.aria-label]': 'ariaLabel()',
|
|
73
|
-
}, 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(--color-
|
|
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(--font-body);font-weight:var(--font-weight-medium);color:var(--tala-avatar-initials-color);line-height:1;letter-spacing:var(--letter-spacing-normal)}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:var(--font-size-11);line-height:var(--line-height-14)}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:var(--font-size-14);line-height:var(--line-height-20)}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:var(--font-size-16);line-height:var(--line-height-20)}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(--radius-full)}tala-avatar.tala-avatar--square.tala-avatar--xs{border-radius:var(--radius-sm)}tala-avatar.tala-avatar--square.tala-avatar--sm{border-radius:var(--radius-md)}tala-avatar.tala-avatar--square.tala-avatar--md,tala-avatar.tala-avatar--square.tala-avatar--lg{border-radius:var(--radius-lg)}tala-avatar.tala-avatar--square.tala-avatar--xl{border-radius:var(--radius-xl)}.tala-avatar__status{position:absolute;border-radius:var(--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(--radius-full);font-family:var(--font-body);font-weight:var(--font-weight-medium);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"] }]
|
|
74
75
|
}], 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 }] }] } });
|
|
75
76
|
|
|
76
77
|
class TalaAvatarGroup {
|
|
@@ -114,7 +115,7 @@ class TalaButton {
|
|
|
114
115
|
event.currentTarget.click();
|
|
115
116
|
}
|
|
116
117
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: TalaButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
117
|
-
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 }, 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": "_onClick($event)", "keydown.enter": "_onKeydown($event)", "keydown.space": "_onKeydown($event)" }, properties: { "class": "hostClasses()", "attr.role": "\"button\"", "attr.tabindex": "disabled() ? \"-1\" : \"0\"", "attr.aria-disabled": "disabled() || null", "attr.aria-busy": "loading() || null" } }, ngImport: i0, template: "@if (loading()) {\n <span class=\"tala-button__spinner\" aria-hidden=\"true\"></span>\n}\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(--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(--color-
|
|
118
|
+
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 }, 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": "_onClick($event)", "keydown.enter": "_onKeydown($event)", "keydown.space": "_onKeydown($event)" }, properties: { "class": "hostClasses()", "attr.role": "\"button\"", "attr.tabindex": "disabled() ? \"-1\" : \"0\"", "attr.aria-disabled": "disabled() || null", "attr.aria-busy": "loading() || null" } }, ngImport: i0, template: "@if (loading()) {\n <span class=\"tala-button__spinner\" aria-hidden=\"true\"></span>\n}\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-focus-ring-color: var(--tala-sys-color-outline-focus);--tala-button-height: 40px;--tala-button-padding-x: var(--space-4);--tala-button-gap: var(--space-2);--tala-button-font-size: var(--text-label-default-size);--tala-button-line-height: var(--text-label-default-height);--tala-button-border-radius: var(--radius-md);--tala-button-spinner-size: 16px;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(--font-body);font-size:var(--tala-button-font-size);line-height:var(--tala-button-line-height);font-weight:var(--font-weight-medium);letter-spacing:var(--letter-spacing-normal);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(.tala-button--disabled,.tala-button--loading){background-color:var(--tala-button-hover-bg);color:var(--tala-button-hover-color)}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(--space-2);--tala-button-gap: var(--space-1);--tala-button-font-size: var(--text-label-xsmall-size);--tala-button-line-height: var(--text-label-xsmall-height);--tala-button-border-radius: var(--radius-sm);--tala-button-spinner-size: 12px}tala-button.tala-button--sm{--tala-button-height: 32px;--tala-button-padding-x: var(--space-3);--tala-button-gap: var(--space-1);--tala-button-font-size: var(--text-label-small-size);--tala-button-line-height: var(--text-label-small-height);--tala-button-spinner-size: 14px}tala-button.tala-button--lg{--tala-button-height: 48px;--tala-button-padding-x: var(--space-5);--tala-button-font-size: var(--text-label-large-size);--tala-button-line-height: var(--text-label-large-height);--tala-button-border-radius: var(--radius-lg);--tala-button-spinner-size: 18px}tala-button.tala-button--disabled{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(--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 });
|
|
118
119
|
}
|
|
119
120
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: TalaButton, decorators: [{
|
|
120
121
|
type: Component,
|
|
@@ -127,9 +128,321 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImpo
|
|
|
127
128
|
'(click)': '_onClick($event)',
|
|
128
129
|
'(keydown.enter)': '_onKeydown($event)',
|
|
129
130
|
'(keydown.space)': '_onKeydown($event)',
|
|
130
|
-
}, template: "@if (loading()) {\n <span class=\"tala-button__spinner\" aria-hidden=\"true\"></span>\n}\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(--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(--color-
|
|
131
|
+
}, template: "@if (loading()) {\n <span class=\"tala-button__spinner\" aria-hidden=\"true\"></span>\n}\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-focus-ring-color: var(--tala-sys-color-outline-focus);--tala-button-height: 40px;--tala-button-padding-x: var(--space-4);--tala-button-gap: var(--space-2);--tala-button-font-size: var(--text-label-default-size);--tala-button-line-height: var(--text-label-default-height);--tala-button-border-radius: var(--radius-md);--tala-button-spinner-size: 16px;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(--font-body);font-size:var(--tala-button-font-size);line-height:var(--tala-button-line-height);font-weight:var(--font-weight-medium);letter-spacing:var(--letter-spacing-normal);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(.tala-button--disabled,.tala-button--loading){background-color:var(--tala-button-hover-bg);color:var(--tala-button-hover-color)}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(--space-2);--tala-button-gap: var(--space-1);--tala-button-font-size: var(--text-label-xsmall-size);--tala-button-line-height: var(--text-label-xsmall-height);--tala-button-border-radius: var(--radius-sm);--tala-button-spinner-size: 12px}tala-button.tala-button--sm{--tala-button-height: 32px;--tala-button-padding-x: var(--space-3);--tala-button-gap: var(--space-1);--tala-button-font-size: var(--text-label-small-size);--tala-button-line-height: var(--text-label-small-height);--tala-button-spinner-size: 14px}tala-button.tala-button--lg{--tala-button-height: 48px;--tala-button-padding-x: var(--space-5);--tala-button-font-size: var(--text-label-large-size);--tala-button-line-height: var(--text-label-large-height);--tala-button-border-radius: var(--radius-lg);--tala-button-spinner-size: 18px}tala-button.tala-button--disabled{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(--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"] }]
|
|
131
132
|
}], 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 }] }] } });
|
|
132
133
|
|
|
134
|
+
class TalaInput {
|
|
135
|
+
static _nextId = 0;
|
|
136
|
+
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
137
|
+
status = input('default', ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
|
|
138
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
139
|
+
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
140
|
+
helperText = input('', ...(ngDevMode ? [{ debugName: "helperText" }] : /* istanbul ignore next */ []));
|
|
141
|
+
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
142
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
143
|
+
readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
144
|
+
prefix = input('', ...(ngDevMode ? [{ debugName: "prefix" }] : /* istanbul ignore next */ []));
|
|
145
|
+
suffix = input('', ...(ngDevMode ? [{ debugName: "suffix" }] : /* istanbul ignore next */ []));
|
|
146
|
+
type = input('text', ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
147
|
+
name = input('', ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
148
|
+
_id = `tala-input-${++TalaInput._nextId}`;
|
|
149
|
+
_helperId = `${this._id}-helper`;
|
|
150
|
+
_value = signal('', ...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
|
|
151
|
+
_disabledByForm = signal(false, ...(ngDevMode ? [{ debugName: "_disabledByForm" }] : /* istanbul ignore next */ []));
|
|
152
|
+
_isDisabled = computed(() => this.disabled() || this._disabledByForm(), ...(ngDevMode ? [{ debugName: "_isDisabled" }] : /* istanbul ignore next */ []));
|
|
153
|
+
hostClasses = computed(() => [
|
|
154
|
+
'tala-input',
|
|
155
|
+
`tala-input--${this.size()}`,
|
|
156
|
+
`tala-input--${this.status()}`,
|
|
157
|
+
this._isDisabled() ? 'tala-input--disabled' : '',
|
|
158
|
+
this.readonly() ? 'tala-input--readonly' : '',
|
|
159
|
+
]
|
|
160
|
+
.filter(Boolean)
|
|
161
|
+
.join(' '), ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
162
|
+
_onChange = () => { };
|
|
163
|
+
_onTouched = () => { };
|
|
164
|
+
writeValue(value) {
|
|
165
|
+
this._value.set(value ?? '');
|
|
166
|
+
}
|
|
167
|
+
registerOnChange(fn) {
|
|
168
|
+
this._onChange = fn;
|
|
169
|
+
}
|
|
170
|
+
registerOnTouched(fn) {
|
|
171
|
+
this._onTouched = fn;
|
|
172
|
+
}
|
|
173
|
+
setDisabledState(isDisabled) {
|
|
174
|
+
this._disabledByForm.set(isDisabled);
|
|
175
|
+
}
|
|
176
|
+
_onInput(event) {
|
|
177
|
+
const value = event.target.value;
|
|
178
|
+
this._value.set(value);
|
|
179
|
+
this._onChange(value);
|
|
180
|
+
}
|
|
181
|
+
_onBlur() {
|
|
182
|
+
this._onTouched();
|
|
183
|
+
}
|
|
184
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: TalaInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
185
|
+
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: [
|
|
186
|
+
{
|
|
187
|
+
provide: NG_VALUE_ACCESSOR,
|
|
188
|
+
useExisting: forwardRef(() => TalaInput),
|
|
189
|
+
multi: true,
|
|
190
|
+
},
|
|
191
|
+
], 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(--radius-md);--tala-input-gap: var(--space-2);display:flex;flex-direction:column;gap:var(--space-1);box-sizing:border-box}.tala-input__label-row{display:flex;align-items:center;gap:var(--space-1);height:20px;overflow:hidden;white-space:nowrap}.tala-input__label{font-family:var(--font-body);font-size:var(--text-label-large-size);line-height:var(--text-label-large-height);font-weight:var(--font-weight-medium);color:var(--tala-input-label-color);cursor:pointer}.tala-input__required{font-family:var(--font-body);font-size:var(--text-label-large-size);line-height:var(--text-label-large-height);font-weight:var(--font-weight-medium);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(--font-body);font-size:var(--text-body-small-size);line-height:var(--text-body-small-height);font-weight:var(--font-weight-regular);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(--font-body);font-size:var(--text-body-small-size);line-height:var(--text-body-small-height);font-weight:var(--font-weight-regular);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(--font-body);font-size:var(--text-caption-large-size);line-height:var(--text-caption-large-height);font-weight:var(--font-weight-regular);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(--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 });
|
|
192
|
+
}
|
|
193
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: TalaInput, decorators: [{
|
|
194
|
+
type: Component,
|
|
195
|
+
args: [{ selector: 'tala-input', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
196
|
+
'[class]': 'hostClasses()',
|
|
197
|
+
}, providers: [
|
|
198
|
+
{
|
|
199
|
+
provide: NG_VALUE_ACCESSOR,
|
|
200
|
+
useExisting: forwardRef(() => TalaInput),
|
|
201
|
+
multi: true,
|
|
202
|
+
},
|
|
203
|
+
], 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(--radius-md);--tala-input-gap: var(--space-2);display:flex;flex-direction:column;gap:var(--space-1);box-sizing:border-box}.tala-input__label-row{display:flex;align-items:center;gap:var(--space-1);height:20px;overflow:hidden;white-space:nowrap}.tala-input__label{font-family:var(--font-body);font-size:var(--text-label-large-size);line-height:var(--text-label-large-height);font-weight:var(--font-weight-medium);color:var(--tala-input-label-color);cursor:pointer}.tala-input__required{font-family:var(--font-body);font-size:var(--text-label-large-size);line-height:var(--text-label-large-height);font-weight:var(--font-weight-medium);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(--font-body);font-size:var(--text-body-small-size);line-height:var(--text-body-small-height);font-weight:var(--font-weight-regular);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(--font-body);font-size:var(--text-body-small-size);line-height:var(--text-body-small-height);font-weight:var(--font-weight-regular);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(--font-body);font-size:var(--text-caption-large-size);line-height:var(--text-caption-large-height);font-weight:var(--font-weight-regular);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(--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"] }]
|
|
204
|
+
}], 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 }] }] } });
|
|
205
|
+
|
|
206
|
+
class TalaSelect {
|
|
207
|
+
static _nextId = 0;
|
|
208
|
+
_elementRef = inject(ElementRef);
|
|
209
|
+
type = input('single', ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
210
|
+
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
211
|
+
status = input('default', ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
|
|
212
|
+
options = input([], ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
213
|
+
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
214
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
215
|
+
helperText = input('', ...(ngDevMode ? [{ debugName: "helperText" }] : /* istanbul ignore next */ []));
|
|
216
|
+
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
217
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
218
|
+
loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
219
|
+
width = input('full', ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
|
|
220
|
+
_id = `tala-select-${++TalaSelect._nextId}`;
|
|
221
|
+
_helperId = `${this._id}-helper`;
|
|
222
|
+
_listboxId = `${this._id}-listbox`;
|
|
223
|
+
_isOpen = signal(false, ...(ngDevMode ? [{ debugName: "_isOpen" }] : /* istanbul ignore next */ []));
|
|
224
|
+
_value = signal('', ...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
|
|
225
|
+
_searchQuery = signal('', ...(ngDevMode ? [{ debugName: "_searchQuery" }] : /* istanbul ignore next */ []));
|
|
226
|
+
_focusedIndex = signal(-1, ...(ngDevMode ? [{ debugName: "_focusedIndex" }] : /* istanbul ignore next */ []));
|
|
227
|
+
_disabledByForm = signal(false, ...(ngDevMode ? [{ debugName: "_disabledByForm" }] : /* istanbul ignore next */ []));
|
|
228
|
+
_isDisabled = computed(() => this.disabled() || this._disabledByForm(), ...(ngDevMode ? [{ debugName: "_isDisabled" }] : /* istanbul ignore next */ []));
|
|
229
|
+
_hostWidth = computed(() => {
|
|
230
|
+
const w = this.width();
|
|
231
|
+
if (w === 'full')
|
|
232
|
+
return '100%';
|
|
233
|
+
if (w === 'auto')
|
|
234
|
+
return 'fit-content';
|
|
235
|
+
return w;
|
|
236
|
+
}, ...(ngDevMode ? [{ debugName: "_hostWidth" }] : /* istanbul ignore next */ []));
|
|
237
|
+
_filteredOptions = computed(() => {
|
|
238
|
+
const opts = this.options();
|
|
239
|
+
if (this.type() !== 'searchable')
|
|
240
|
+
return opts;
|
|
241
|
+
const q = this._searchQuery().toLowerCase().trim();
|
|
242
|
+
if (!q)
|
|
243
|
+
return opts;
|
|
244
|
+
return opts.filter((o) => o.label.toLowerCase().includes(q));
|
|
245
|
+
}, ...(ngDevMode ? [{ debugName: "_filteredOptions" }] : /* istanbul ignore next */ []));
|
|
246
|
+
_hasValue = computed(() => {
|
|
247
|
+
const v = this._value();
|
|
248
|
+
return Array.isArray(v) ? v.length > 0 : v !== '';
|
|
249
|
+
}, ...(ngDevMode ? [{ debugName: "_hasValue" }] : /* istanbul ignore next */ []));
|
|
250
|
+
_displayValue = computed(() => {
|
|
251
|
+
const v = this._value();
|
|
252
|
+
const opts = this.options();
|
|
253
|
+
if (this.type() === 'multi') {
|
|
254
|
+
return v.map((val) => opts.find((o) => o.value === val)?.label ?? val).join(', ');
|
|
255
|
+
}
|
|
256
|
+
return opts.find((o) => o.value === v)?.label ?? '';
|
|
257
|
+
}, ...(ngDevMode ? [{ debugName: "_displayValue" }] : /* istanbul ignore next */ []));
|
|
258
|
+
_selectedLabels = computed(() => {
|
|
259
|
+
const v = this._value();
|
|
260
|
+
const opts = this.options();
|
|
261
|
+
if (!Array.isArray(v))
|
|
262
|
+
return [];
|
|
263
|
+
return v.map((val) => ({ value: val, label: opts.find((o) => o.value === val)?.label ?? val }));
|
|
264
|
+
}, ...(ngDevMode ? [{ debugName: "_selectedLabels" }] : /* istanbul ignore next */ []));
|
|
265
|
+
hostClasses = computed(() => [
|
|
266
|
+
'tala-select',
|
|
267
|
+
`tala-select--${this.size()}`,
|
|
268
|
+
`tala-select--${this.status()}`,
|
|
269
|
+
this._isOpen() ? 'tala-select--open' : '',
|
|
270
|
+
this._isDisabled() ? 'tala-select--disabled' : '',
|
|
271
|
+
this.loading() ? 'tala-select--loading' : '',
|
|
272
|
+
]
|
|
273
|
+
.filter(Boolean)
|
|
274
|
+
.join(' '), ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
275
|
+
_onChange = () => { };
|
|
276
|
+
_onTouched = () => { };
|
|
277
|
+
_onDocumentClick(target) {
|
|
278
|
+
if (!this._elementRef.nativeElement.contains(target)) {
|
|
279
|
+
this._isOpen.set(false);
|
|
280
|
+
this._searchQuery.set('');
|
|
281
|
+
this._focusedIndex.set(-1);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
writeValue(value) {
|
|
285
|
+
if (this.type() === 'multi') {
|
|
286
|
+
this._value.set(Array.isArray(value) ? value : value ? [value] : []);
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
289
|
+
this._value.set(typeof value === 'string' ? value : '');
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
registerOnChange(fn) {
|
|
293
|
+
this._onChange = fn;
|
|
294
|
+
}
|
|
295
|
+
registerOnTouched(fn) {
|
|
296
|
+
this._onTouched = fn;
|
|
297
|
+
}
|
|
298
|
+
setDisabledState(isDisabled) {
|
|
299
|
+
this._disabledByForm.set(isDisabled);
|
|
300
|
+
}
|
|
301
|
+
_onTriggerClick(event) {
|
|
302
|
+
event.stopPropagation();
|
|
303
|
+
if (this._isDisabled() || this.loading())
|
|
304
|
+
return;
|
|
305
|
+
if (this._isOpen()) {
|
|
306
|
+
this._isOpen.set(false);
|
|
307
|
+
this._searchQuery.set('');
|
|
308
|
+
this._focusedIndex.set(-1);
|
|
309
|
+
}
|
|
310
|
+
else {
|
|
311
|
+
this._isOpen.set(true);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
_onTriggerKeydown(event) {
|
|
315
|
+
if (this._isDisabled() || this.loading())
|
|
316
|
+
return;
|
|
317
|
+
switch (event.key) {
|
|
318
|
+
case ' ':
|
|
319
|
+
case 'Enter':
|
|
320
|
+
event.preventDefault();
|
|
321
|
+
if (!this._isOpen()) {
|
|
322
|
+
this._isOpen.set(true);
|
|
323
|
+
}
|
|
324
|
+
else if (this._focusedIndex() >= 0) {
|
|
325
|
+
const opt = this._filteredOptions()[this._focusedIndex()];
|
|
326
|
+
if (opt && !opt.disabled)
|
|
327
|
+
this._selectOption(opt, event);
|
|
328
|
+
}
|
|
329
|
+
break;
|
|
330
|
+
case 'Escape':
|
|
331
|
+
event.preventDefault();
|
|
332
|
+
this._isOpen.set(false);
|
|
333
|
+
this._searchQuery.set('');
|
|
334
|
+
this._focusedIndex.set(-1);
|
|
335
|
+
break;
|
|
336
|
+
case 'ArrowDown':
|
|
337
|
+
event.preventDefault();
|
|
338
|
+
if (!this._isOpen()) {
|
|
339
|
+
this._isOpen.set(true);
|
|
340
|
+
}
|
|
341
|
+
else {
|
|
342
|
+
const max = this._filteredOptions().length - 1;
|
|
343
|
+
this._focusedIndex.update((i) => Math.min(i + 1, max));
|
|
344
|
+
}
|
|
345
|
+
break;
|
|
346
|
+
case 'ArrowUp':
|
|
347
|
+
event.preventDefault();
|
|
348
|
+
if (this._isOpen()) {
|
|
349
|
+
this._focusedIndex.update((i) => Math.max(i - 1, 0));
|
|
350
|
+
}
|
|
351
|
+
break;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
_selectOption(opt, event) {
|
|
355
|
+
event.stopPropagation();
|
|
356
|
+
if (opt.disabled)
|
|
357
|
+
return;
|
|
358
|
+
if (this.type() === 'multi') {
|
|
359
|
+
const current = this._value();
|
|
360
|
+
const idx = current.indexOf(opt.value);
|
|
361
|
+
const next = idx >= 0 ? current.filter((v) => v !== opt.value) : [...current, opt.value];
|
|
362
|
+
this._value.set(next);
|
|
363
|
+
this._onChange(next);
|
|
364
|
+
}
|
|
365
|
+
else {
|
|
366
|
+
this._value.set(opt.value);
|
|
367
|
+
this._onChange(opt.value);
|
|
368
|
+
this._isOpen.set(false);
|
|
369
|
+
this._searchQuery.set('');
|
|
370
|
+
this._focusedIndex.set(-1);
|
|
371
|
+
}
|
|
372
|
+
this._onTouched();
|
|
373
|
+
}
|
|
374
|
+
_removeChip(value, event) {
|
|
375
|
+
event.stopPropagation();
|
|
376
|
+
const current = this._value();
|
|
377
|
+
const next = current.filter((v) => v !== value);
|
|
378
|
+
this._value.set(next);
|
|
379
|
+
this._onChange(next);
|
|
380
|
+
this._onTouched();
|
|
381
|
+
}
|
|
382
|
+
_isSelected(value) {
|
|
383
|
+
const v = this._value();
|
|
384
|
+
return Array.isArray(v) ? v.includes(value) : v === value;
|
|
385
|
+
}
|
|
386
|
+
_onSearchInput(event) {
|
|
387
|
+
const input = event.target;
|
|
388
|
+
this._searchQuery.set(input.value);
|
|
389
|
+
this._focusedIndex.set(-1);
|
|
390
|
+
}
|
|
391
|
+
_onDropdownClick(event) {
|
|
392
|
+
event.stopPropagation();
|
|
393
|
+
}
|
|
394
|
+
_onSearchKeydown(event) {
|
|
395
|
+
switch (event.key) {
|
|
396
|
+
case 'ArrowDown':
|
|
397
|
+
event.preventDefault();
|
|
398
|
+
this._focusedIndex.update((i) => Math.min(i + 1, this._filteredOptions().length - 1));
|
|
399
|
+
break;
|
|
400
|
+
case 'ArrowUp':
|
|
401
|
+
event.preventDefault();
|
|
402
|
+
this._focusedIndex.update((i) => Math.max(i - 1, 0));
|
|
403
|
+
break;
|
|
404
|
+
case 'Enter':
|
|
405
|
+
event.preventDefault();
|
|
406
|
+
if (this._focusedIndex() >= 0) {
|
|
407
|
+
const opt = this._filteredOptions()[this._focusedIndex()];
|
|
408
|
+
if (opt && !opt.disabled)
|
|
409
|
+
this._selectOption(opt, event);
|
|
410
|
+
}
|
|
411
|
+
break;
|
|
412
|
+
case 'Escape':
|
|
413
|
+
event.preventDefault();
|
|
414
|
+
this._isOpen.set(false);
|
|
415
|
+
this._searchQuery.set('');
|
|
416
|
+
this._focusedIndex.set(-1);
|
|
417
|
+
break;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: TalaSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
421
|
+
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: [
|
|
422
|
+
{
|
|
423
|
+
provide: NG_VALUE_ACCESSOR,
|
|
424
|
+
useExisting: forwardRef(() => TalaSelect),
|
|
425
|
+
multi: true,
|
|
426
|
+
},
|
|
427
|
+
], 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(--space-2);--tala-select-icon-size: 16px;--tala-select-border-radius: var(--radius-md);position:relative;display:flex;flex-direction:column;gap:var(--space-1);box-sizing:border-box}.tala-select__label-row{display:flex;align-items:center;gap:var(--space-1);height:20px;overflow:hidden;white-space:nowrap}.tala-select__label{font-family:var(--font-body);font-size:var(--text-label-large-size);line-height:var(--text-label-large-height);font-weight:var(--font-weight-medium);color:var(--tala-select-label-color);cursor:pointer}.tala-select__required{font-family:var(--font-body);font-size:var(--text-label-large-size);line-height:var(--text-label-large-height);font-weight:var(--font-weight-medium);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(--space-1);flex-wrap:wrap;overflow:hidden}.tala-select__value{font-family:var(--font-body);font-size:var(--text-body-small-size);line-height:var(--text-body-small-height);font-weight:var(--font-weight-regular);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(--font-body);font-size:var(--text-body-small-size);line-height:var(--text-body-small-height);font-weight:var(--font-weight-regular);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(--shadow-md);max-height:240px;overflow-y:auto;z-index:1000;box-sizing:border-box;padding:var(--space-1) 0}.tala-select__option{display:flex;align-items:center;gap:var(--space-2);padding:8px var(--tala-select-padding-x);font-family:var(--font-body);font-size:var(--text-body-small-size);line-height:var(--text-body-small-height);font-weight:var(--font-weight-regular);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:var(--font-weight-medium)}.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(--font-body);font-size:var(--text-body-small-size);line-height:var(--text-body-small-height);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(--font-body);font-size:var(--text-caption-large-size);line-height:var(--text-caption-large-height);font-weight:var(--font-weight-regular);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(--font-body);font-size:var(--text-caption-large-size);line-height:var(--text-caption-large-height);font-weight:var(--font-weight-regular);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(--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 });
|
|
428
|
+
}
|
|
429
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: TalaSelect, decorators: [{
|
|
430
|
+
type: Component,
|
|
431
|
+
args: [{ selector: 'tala-select', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
432
|
+
'[class]': 'hostClasses()',
|
|
433
|
+
'[style.width]': '_hostWidth()',
|
|
434
|
+
}, providers: [
|
|
435
|
+
{
|
|
436
|
+
provide: NG_VALUE_ACCESSOR,
|
|
437
|
+
useExisting: forwardRef(() => TalaSelect),
|
|
438
|
+
multi: true,
|
|
439
|
+
},
|
|
440
|
+
], 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(--space-2);--tala-select-icon-size: 16px;--tala-select-border-radius: var(--radius-md);position:relative;display:flex;flex-direction:column;gap:var(--space-1);box-sizing:border-box}.tala-select__label-row{display:flex;align-items:center;gap:var(--space-1);height:20px;overflow:hidden;white-space:nowrap}.tala-select__label{font-family:var(--font-body);font-size:var(--text-label-large-size);line-height:var(--text-label-large-height);font-weight:var(--font-weight-medium);color:var(--tala-select-label-color);cursor:pointer}.tala-select__required{font-family:var(--font-body);font-size:var(--text-label-large-size);line-height:var(--text-label-large-height);font-weight:var(--font-weight-medium);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(--space-1);flex-wrap:wrap;overflow:hidden}.tala-select__value{font-family:var(--font-body);font-size:var(--text-body-small-size);line-height:var(--text-body-small-height);font-weight:var(--font-weight-regular);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(--font-body);font-size:var(--text-body-small-size);line-height:var(--text-body-small-height);font-weight:var(--font-weight-regular);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(--shadow-md);max-height:240px;overflow-y:auto;z-index:1000;box-sizing:border-box;padding:var(--space-1) 0}.tala-select__option{display:flex;align-items:center;gap:var(--space-2);padding:8px var(--tala-select-padding-x);font-family:var(--font-body);font-size:var(--text-body-small-size);line-height:var(--text-body-small-height);font-weight:var(--font-weight-regular);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:var(--font-weight-medium)}.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(--font-body);font-size:var(--text-body-small-size);line-height:var(--text-body-small-height);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(--font-body);font-size:var(--text-caption-large-size);line-height:var(--text-caption-large-height);font-weight:var(--font-weight-regular);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(--font-body);font-size:var(--text-caption-large-size);line-height:var(--text-caption-large-height);font-weight:var(--font-weight-regular);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(--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"] }]
|
|
441
|
+
}], 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: [{
|
|
442
|
+
type: HostListener,
|
|
443
|
+
args: ['document:click', ['$event.target']]
|
|
444
|
+
}] } });
|
|
445
|
+
|
|
133
446
|
/*
|
|
134
447
|
* Public API Surface of doku-tala
|
|
135
448
|
*/
|
|
@@ -138,5 +451,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImpo
|
|
|
138
451
|
* Generated bundle index. Do not edit.
|
|
139
452
|
*/
|
|
140
453
|
|
|
141
|
-
export { TalaAvatar, TalaAvatarGroup, TalaButton };
|
|
454
|
+
export { TalaAvatar, TalaAvatarGroup, TalaButton, TalaInput, TalaSelect };
|
|
142
455
|
//# sourceMappingURL=doku-com-tala.mjs.map
|