@thalassic/ui 0.14.1 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/thalassic-ui.mjs +269 -246
- package/fesm2022/thalassic-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/thalassic-ui.d.ts +239 -229
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import { LocationStrategy, NgTemplateOutlet } from '@angular/common';
|
|
4
|
-
import { RouterLink, Router } from '@angular/router';
|
|
2
|
+
import { model, input, booleanAttribute, computed, Directive, InjectionToken, inject, ViewContainerRef, DestroyRef, signal, viewChild, Component, contentChild, effect, forwardRef, Injectable, output, viewChildren, numberAttribute, contentChildren, isDevMode, TemplateRef, ElementRef, Renderer2, makeEnvironmentProviders } from '@angular/core';
|
|
5
3
|
import { Overlay } from '@angular/cdk/overlay';
|
|
6
4
|
import { TemplatePortal, CdkPortalOutlet, ComponentPortal } from '@angular/cdk/portal';
|
|
7
5
|
import { takeUntilDestroyed, rxResource, toObservable } from '@angular/core/rxjs-interop';
|
|
8
6
|
import { filter, throwError, map, shareReplay } from 'rxjs';
|
|
7
|
+
import { LocationStrategy, NgTemplateOutlet } from '@angular/common';
|
|
8
|
+
import { RouterLink, Router } from '@angular/router';
|
|
9
9
|
import { CdkDialogContainer, DialogRef, Dialog as Dialog$1 } from '@angular/cdk/dialog';
|
|
10
10
|
import { format, startOfMonth, endOfMonth, eachDayOfInterval, endOfWeek, startOfWeek, subMonths, addMonths, isSameDay, isSameMonth, isToday, setMonth, subYears, addYears, getYear, getMonth, getHours, getMinutes, startOfDay, setHours, setMinutes, setYear } from 'date-fns';
|
|
11
11
|
import { HttpClient } from '@angular/common/http';
|
|
@@ -13,243 +13,6 @@ import { DomSanitizer } from '@angular/platform-browser';
|
|
|
13
13
|
import { CdkTable, CdkHeaderCell, CdkCell, CdkCellDef, CdkHeaderCellDef, CdkColumnDef, CdkHeaderRow, CdkHeaderRowDef, CdkRow, CdkRowDef } from '@angular/cdk/table';
|
|
14
14
|
import { deepMerge } from '@thalassic/core';
|
|
15
15
|
|
|
16
|
-
const DEFAULT_ALERT_CONFIG = {
|
|
17
|
-
color: 'primary',
|
|
18
|
-
label: {
|
|
19
|
-
primary: '',
|
|
20
|
-
secondary: '',
|
|
21
|
-
tertiary: '',
|
|
22
|
-
success: 'TIP: ',
|
|
23
|
-
info: 'INFO: ',
|
|
24
|
-
warning: 'WARNING: ',
|
|
25
|
-
danger: 'IMPORTANT: ',
|
|
26
|
-
},
|
|
27
|
-
hideLabel: false,
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const ALERT_CONFIG = new InjectionToken('ALERT_CONFIG', {
|
|
31
|
-
factory: () => DEFAULT_ALERT_CONFIG,
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
class Alert {
|
|
35
|
-
_config = inject(ALERT_CONFIG);
|
|
36
|
-
color = input(this._config.color, ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
37
|
-
label = input(typeof this._config.label === 'string' ? this._config.label : null, ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
38
|
-
hideLabel = input(this._config.hideLabel, { ...(ngDevMode ? { debugName: "hideLabel" } : {}), transform: booleanAttribute });
|
|
39
|
-
displayLabel = computed(() => {
|
|
40
|
-
const label = this.label();
|
|
41
|
-
if (label)
|
|
42
|
-
return label;
|
|
43
|
-
if (typeof this._config.label === 'object') {
|
|
44
|
-
return this._config.label[this.color()];
|
|
45
|
-
}
|
|
46
|
-
return '';
|
|
47
|
-
}, ...(ngDevMode ? [{ debugName: "displayLabel" }] : []));
|
|
48
|
-
hostClasses = computed(() => {
|
|
49
|
-
const className = 'tls-alert';
|
|
50
|
-
const array = [className];
|
|
51
|
-
array.push(`${className}--${this.color()}`);
|
|
52
|
-
return array;
|
|
53
|
-
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : []));
|
|
54
|
-
hostRole = computed(() => {
|
|
55
|
-
const urgent = ['danger', 'warning'];
|
|
56
|
-
return urgent.includes(this.color()) ? 'alert' : 'note';
|
|
57
|
-
}, ...(ngDevMode ? [{ debugName: "hostRole" }] : []));
|
|
58
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Alert, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
59
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: Alert, isStandalone: true, selector: "tls-alert", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hideLabel: { classPropertyName: "hideLabel", publicName: "hideLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()", "attr.role": "hostRole()", "attr.aria-label": "hideLabel() ? displayLabel() : null" } }, ngImport: i0, template: "<div class=\"tls-alert-icon\"></div>\n<div class=\"tls-alert-body\">\n @if (!hideLabel()) {\n <span class=\"tls-alert-body__label\">{{ displayLabel() }}</span>\n }\n <span class=\"tls-alert-body__content\">\n <ng-content></ng-content>\n </span>\n</div>\n" });
|
|
60
|
-
}
|
|
61
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Alert, decorators: [{
|
|
62
|
-
type: Component,
|
|
63
|
-
args: [{ selector: 'tls-alert', imports: [], host: {
|
|
64
|
-
'[class]': 'hostClasses()',
|
|
65
|
-
'[attr.role]': 'hostRole()',
|
|
66
|
-
'[attr.aria-label]': 'hideLabel() ? displayLabel() : null',
|
|
67
|
-
}, template: "<div class=\"tls-alert-icon\"></div>\n<div class=\"tls-alert-body\">\n @if (!hideLabel()) {\n <span class=\"tls-alert-body__label\">{{ displayLabel() }}</span>\n }\n <span class=\"tls-alert-body__content\">\n <ng-content></ng-content>\n </span>\n</div>\n" }]
|
|
68
|
-
}], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hideLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideLabel", required: false }] }] } });
|
|
69
|
-
|
|
70
|
-
const DEFAULT_BUTTON_CONFIG = {
|
|
71
|
-
color: 'primary',
|
|
72
|
-
variant: 'filled',
|
|
73
|
-
size: 'md',
|
|
74
|
-
type: 'button',
|
|
75
|
-
fluid: false,
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
const BUTTON_CONFIG = new InjectionToken('BUTTON_CONFIG', {
|
|
79
|
-
factory: () => DEFAULT_BUTTON_CONFIG,
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
class ButtonBase {
|
|
83
|
-
// Injections
|
|
84
|
-
_config = inject(BUTTON_CONFIG);
|
|
85
|
-
APPLY_HOST_CLASSES = true;
|
|
86
|
-
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
87
|
-
icon = input(false, { ...(ngDevMode ? { debugName: "icon" } : {}), transform: booleanAttribute });
|
|
88
|
-
color = input(this._config.color, ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
89
|
-
variant = input(this._config.variant, ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
90
|
-
size = input(this._config.size, ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
91
|
-
rounded = input(false, { ...(ngDevMode ? { debugName: "rounded" } : {}), transform: booleanAttribute });
|
|
92
|
-
/** Whether the button stretches to fill its container's width. */
|
|
93
|
-
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : {}), transform: booleanAttribute });
|
|
94
|
-
classes = computed(() => {
|
|
95
|
-
const className = 'tls-button';
|
|
96
|
-
const array = [className];
|
|
97
|
-
array.push(`${className}--${this.color()}`);
|
|
98
|
-
array.push(`${className}--${this.variant()}`);
|
|
99
|
-
array.push(`${className}--${this.size()}`);
|
|
100
|
-
if (this.disabled())
|
|
101
|
-
array.push(`${className}--disabled`);
|
|
102
|
-
if (this.icon())
|
|
103
|
-
array.push(`${className}--icon-only`);
|
|
104
|
-
if (this.fluid())
|
|
105
|
-
array.push(`${className}--fluid`);
|
|
106
|
-
if (this.rounded())
|
|
107
|
-
array.push(`${className}--rounded`);
|
|
108
|
-
return array;
|
|
109
|
-
}, ...(ngDevMode ? [{ debugName: "classes" }] : []));
|
|
110
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ButtonBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
111
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.1", type: ButtonBase, isStandalone: true, inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "APPLY_HOST_CLASSES ? classes() : null" } }, ngImport: i0 });
|
|
112
|
-
}
|
|
113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ButtonBase, decorators: [{
|
|
114
|
-
type: Directive,
|
|
115
|
-
args: [{
|
|
116
|
-
host: {
|
|
117
|
-
'[class]': 'APPLY_HOST_CLASSES ? classes() : null',
|
|
118
|
-
},
|
|
119
|
-
}]
|
|
120
|
-
}], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }] } });
|
|
121
|
-
|
|
122
|
-
class Button extends ButtonBase {
|
|
123
|
-
// Injections
|
|
124
|
-
_routerLink = inject(RouterLink, { optional: true });
|
|
125
|
-
_router = inject(Router, { optional: true });
|
|
126
|
-
_locationStrategy = inject(LocationStrategy, { optional: true });
|
|
127
|
-
APPLY_HOST_CLASSES = false;
|
|
128
|
-
// Inputs
|
|
129
|
-
/** The text label displayed inside the button. Takes priority over projected content. */
|
|
130
|
-
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
131
|
-
type = input(this._config.type, ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
132
|
-
/** An optional URL that causes the button to render as an anchor link. */
|
|
133
|
-
href = input(null, ...(ngDevMode ? [{ debugName: "href" }] : []));
|
|
134
|
-
tabindex = input('0', ...(ngDevMode ? [{ debugName: "tabindex" }] : []));
|
|
135
|
-
// Computed
|
|
136
|
-
isLink = computed(() => Boolean(this._routerLink || this.href()), ...(ngDevMode ? [{ debugName: "isLink" }] : []));
|
|
137
|
-
/**
|
|
138
|
-
* Resolved URL placed on the inner anchor so the browser treats it as a real link
|
|
139
|
-
* (enables "Open in new tab", middle-click, status-bar preview, etc.). An explicit
|
|
140
|
-
* `href` wins; otherwise the URL is derived from the host `routerLink`.
|
|
141
|
-
*/
|
|
142
|
-
linkHref = computed(() => {
|
|
143
|
-
if (this.disabled())
|
|
144
|
-
return null;
|
|
145
|
-
const explicitHref = this.href();
|
|
146
|
-
if (explicitHref)
|
|
147
|
-
return explicitHref;
|
|
148
|
-
const urlTree = this._routerLink?.urlTree;
|
|
149
|
-
if (!urlTree || !this._router)
|
|
150
|
-
return null;
|
|
151
|
-
const serialized = this._router.serializeUrl(urlTree);
|
|
152
|
-
return this._locationStrategy?.prepareExternalUrl(serialized) ?? serialized;
|
|
153
|
-
}, ...(ngDevMode ? [{ debugName: "linkHref" }] : []));
|
|
154
|
-
// Protected methods
|
|
155
|
-
/**
|
|
156
|
-
* Keeps navigation correct when the host carries a `routerLink` while the inner anchor
|
|
157
|
-
* exposes a real `href`:
|
|
158
|
-
* - modified / non-primary clicks bubble to the browser so it can open a new tab, and
|
|
159
|
-
* are stopped from reaching the host RouterLink to avoid a duplicate in-app navigation;
|
|
160
|
-
* - a plain left click defers to the host RouterLink for SPA navigation, so the anchor's
|
|
161
|
-
* own full-page navigation is prevented.
|
|
162
|
-
*/
|
|
163
|
-
onLinkClick(event) {
|
|
164
|
-
if (this.disabled()) {
|
|
165
|
-
event.preventDefault();
|
|
166
|
-
event.stopPropagation();
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
// Pure href links (no routerLink) navigate natively — nothing to coordinate.
|
|
170
|
-
if (!this._routerLink)
|
|
171
|
-
return;
|
|
172
|
-
if (event.button !== 0 || event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) {
|
|
173
|
-
event.stopPropagation();
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
event.preventDefault();
|
|
177
|
-
}
|
|
178
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Button, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
179
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: Button, isStandalone: true, selector: "tls-button", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "tabindex": "-1" } }, usesInheritance: true, ngImport: i0, template: "@if (isLink()) {\n <a\n role=\"link\"\n [class]=\"classes()\"\n [attr.href]=\"linkHref()\"\n [tabindex]=\"tabindex()\"\n [attr.aria-disabled]=\"disabled()\"\n (click)=\"onLinkClick($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"contentTemplate\"></ng-container>\n </a>\n} @else {\n <button\n role=\"button\"\n [class]=\"classes()\"\n [type]=\"type()\"\n [tabindex]=\"tabindex()\"\n [disabled]=\"disabled()\"\n [attr.aria-disabled]=\"disabled()\"\n >\n <ng-container [ngTemplateOutlet]=\"contentTemplate\"></ng-container>\n </button>\n}\n\n<!-- Content -->\n<ng-template #contentTemplate>\n @if (label() && !icon()) {\n {{ label() }}\n } @else {\n <ng-container *ngTemplateOutlet=\"projectedContentTemplate\"></ng-container>\n }\n</ng-template>\n\n<ng-template #projectedContentTemplate>\n <ng-content></ng-content>\n</ng-template>\n", styles: [":host{width:fit-content;display:inline-block}:host:focus-visible{outline:none}:host:has(.tls-button.tls-button--fluid){width:100%}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
180
|
-
}
|
|
181
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Button, decorators: [{
|
|
182
|
-
type: Component,
|
|
183
|
-
args: [{ selector: 'tls-button', imports: [NgTemplateOutlet], host: {
|
|
184
|
-
'[tabindex]': '-1',
|
|
185
|
-
}, template: "@if (isLink()) {\n <a\n role=\"link\"\n [class]=\"classes()\"\n [attr.href]=\"linkHref()\"\n [tabindex]=\"tabindex()\"\n [attr.aria-disabled]=\"disabled()\"\n (click)=\"onLinkClick($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"contentTemplate\"></ng-container>\n </a>\n} @else {\n <button\n role=\"button\"\n [class]=\"classes()\"\n [type]=\"type()\"\n [tabindex]=\"tabindex()\"\n [disabled]=\"disabled()\"\n [attr.aria-disabled]=\"disabled()\"\n >\n <ng-container [ngTemplateOutlet]=\"contentTemplate\"></ng-container>\n </button>\n}\n\n<!-- Content -->\n<ng-template #contentTemplate>\n @if (label() && !icon()) {\n {{ label() }}\n } @else {\n <ng-container *ngTemplateOutlet=\"projectedContentTemplate\"></ng-container>\n }\n</ng-template>\n\n<ng-template #projectedContentTemplate>\n <ng-content></ng-content>\n</ng-template>\n", styles: [":host{width:fit-content;display:inline-block}:host:focus-visible{outline:none}:host:has(.tls-button.tls-button--fluid){width:100%}\n"] }]
|
|
186
|
-
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }] } });
|
|
187
|
-
|
|
188
|
-
class ButtonDirective extends ButtonBase {
|
|
189
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ButtonDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
190
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.1", type: ButtonDirective, isStandalone: true, selector: "[tlsButton]", usesInheritance: true, ngImport: i0 });
|
|
191
|
-
}
|
|
192
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ButtonDirective, decorators: [{
|
|
193
|
-
type: Directive,
|
|
194
|
-
args: [{
|
|
195
|
-
selector: '[tlsButton]',
|
|
196
|
-
}]
|
|
197
|
-
}] });
|
|
198
|
-
|
|
199
|
-
const DEFAULT_CHIP_CONFIG = {
|
|
200
|
-
color: 'primary',
|
|
201
|
-
variant: 'filled',
|
|
202
|
-
size: 'md',
|
|
203
|
-
};
|
|
204
|
-
|
|
205
|
-
const CHIP_CONFIG = new InjectionToken('CHIP_CONFIG', {
|
|
206
|
-
factory: () => DEFAULT_CHIP_CONFIG,
|
|
207
|
-
});
|
|
208
|
-
|
|
209
|
-
class Chip {
|
|
210
|
-
_config = inject(CHIP_CONFIG);
|
|
211
|
-
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
212
|
-
color = input(this._config.color, ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
213
|
-
variant = input(this._config.variant, ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
214
|
-
size = input(this._config.size, ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
215
|
-
rounded = input(false, { ...(ngDevMode ? { debugName: "rounded" } : {}), transform: booleanAttribute });
|
|
216
|
-
icon = input(false, { ...(ngDevMode ? { debugName: "icon" } : {}), transform: booleanAttribute });
|
|
217
|
-
fluid = input(false, { ...(ngDevMode ? { debugName: "fluid" } : {}), transform: booleanAttribute });
|
|
218
|
-
context = signal({
|
|
219
|
-
checked: false,
|
|
220
|
-
disabled: false,
|
|
221
|
-
readonly: false,
|
|
222
|
-
touched: false,
|
|
223
|
-
dirty: false,
|
|
224
|
-
invalid: false,
|
|
225
|
-
pending: false,
|
|
226
|
-
}, ...(ngDevMode ? [{ debugName: "context" }] : []));
|
|
227
|
-
startIconTemplate = contentChild('startIcon', ...(ngDevMode ? [{ debugName: "startIconTemplate" }] : []));
|
|
228
|
-
endIconTemplate = contentChild('endIcon', ...(ngDevMode ? [{ debugName: "endIconTemplate" }] : []));
|
|
229
|
-
classes = computed(() => {
|
|
230
|
-
const className = 'tls-chip';
|
|
231
|
-
const array = [className];
|
|
232
|
-
array.push(`${className}--${this.color()}`);
|
|
233
|
-
array.push(`${className}--${this.variant()}`);
|
|
234
|
-
array.push(`${className}--${this.size()}`);
|
|
235
|
-
if (this.rounded())
|
|
236
|
-
array.push(`${className}--rounded`);
|
|
237
|
-
if (this.icon())
|
|
238
|
-
array.push(`${className}--icon`);
|
|
239
|
-
if (this.fluid())
|
|
240
|
-
array.push(`${className}--fluid`);
|
|
241
|
-
return array;
|
|
242
|
-
}, ...(ngDevMode ? [{ debugName: "classes" }] : []));
|
|
243
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Chip, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
244
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: Chip, isStandalone: true, selector: "tls-chip", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, queries: [{ propertyName: "startIconTemplate", first: true, predicate: ["startIcon"], descendants: true, isSignal: true }, { propertyName: "endIconTemplate", first: true, predicate: ["endIcon"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (startIconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: context() }\" />\n}\n\n@if (label()) {\n {{ label() }}\n} @else {\n <ng-content></ng-content>\n}\n\n@if (endIconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: context() }\" />\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
245
|
-
}
|
|
246
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Chip, decorators: [{
|
|
247
|
-
type: Component,
|
|
248
|
-
args: [{ selector: 'tls-chip', imports: [NgTemplateOutlet], host: {
|
|
249
|
-
'[class]': 'classes()',
|
|
250
|
-
}, template: "@if (startIconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: context() }\" />\n}\n\n@if (label()) {\n {{ label() }}\n} @else {\n <ng-content></ng-content>\n}\n\n@if (endIconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: context() }\" />\n}\n" }]
|
|
251
|
-
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], startIconTemplate: [{ type: i0.ContentChild, args: ['startIcon', { isSignal: true }] }], endIconTemplate: [{ type: i0.ContentChild, args: ['endIcon', { isSignal: true }] }] } });
|
|
252
|
-
|
|
253
16
|
class FormControl {
|
|
254
17
|
// Models
|
|
255
18
|
touched = model(false, ...(ngDevMode ? [{ debugName: "touched" }] : []));
|
|
@@ -337,6 +100,14 @@ function normalizeOptions(options, keys) {
|
|
|
337
100
|
* Subclasses provide the visual shell and own the `multiple` and `unselectable`
|
|
338
101
|
* inputs (defaults differ per component), while this base owns the selection
|
|
339
102
|
* state machine: value model, option normalization, and the toggle logic.
|
|
103
|
+
*
|
|
104
|
+
* `value` is ALWAYS an array, regardless of `multiple`. In single mode
|
|
105
|
+
* (`multiple = false`) it holds 0 or 1 items — read the selection as
|
|
106
|
+
* `value()[0]`. In multiple mode it holds every selected value. This is a
|
|
107
|
+
* deliberate, strongly-typed contract: unlike Select/MultiSelect (which split
|
|
108
|
+
* scalar `V | null` vs array `V[]` into two components), this family stays a
|
|
109
|
+
* single unified component and keeps one `V[]` type rather than loosening it to
|
|
110
|
+
* a runtime-dependent `V | V[]`.
|
|
340
111
|
*/
|
|
341
112
|
class SelectionGroup extends ValueFormControl {
|
|
342
113
|
value = model([], ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
@@ -674,6 +445,243 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
674
445
|
|
|
675
446
|
// Form control base classes
|
|
676
447
|
|
|
448
|
+
const DEFAULT_ALERT_CONFIG = {
|
|
449
|
+
color: 'primary',
|
|
450
|
+
label: {
|
|
451
|
+
primary: '',
|
|
452
|
+
secondary: '',
|
|
453
|
+
tertiary: '',
|
|
454
|
+
success: 'TIP: ',
|
|
455
|
+
info: 'INFO: ',
|
|
456
|
+
warning: 'WARNING: ',
|
|
457
|
+
danger: 'IMPORTANT: ',
|
|
458
|
+
},
|
|
459
|
+
hideLabel: false,
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
const ALERT_CONFIG = new InjectionToken('ALERT_CONFIG', {
|
|
463
|
+
factory: () => DEFAULT_ALERT_CONFIG,
|
|
464
|
+
});
|
|
465
|
+
|
|
466
|
+
class Alert {
|
|
467
|
+
_config = inject(ALERT_CONFIG);
|
|
468
|
+
color = input(this._config.color, ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
469
|
+
label = input(typeof this._config.label === 'string' ? this._config.label : null, ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
470
|
+
hideLabel = input(this._config.hideLabel, { ...(ngDevMode ? { debugName: "hideLabel" } : {}), transform: booleanAttribute });
|
|
471
|
+
displayLabel = computed(() => {
|
|
472
|
+
const label = this.label();
|
|
473
|
+
if (label)
|
|
474
|
+
return label;
|
|
475
|
+
if (typeof this._config.label === 'object') {
|
|
476
|
+
return this._config.label[this.color()];
|
|
477
|
+
}
|
|
478
|
+
return '';
|
|
479
|
+
}, ...(ngDevMode ? [{ debugName: "displayLabel" }] : []));
|
|
480
|
+
hostClasses = computed(() => {
|
|
481
|
+
const className = 'tls-alert';
|
|
482
|
+
const array = [className];
|
|
483
|
+
array.push(`${className}--${this.color()}`);
|
|
484
|
+
return array;
|
|
485
|
+
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : []));
|
|
486
|
+
hostRole = computed(() => {
|
|
487
|
+
const urgent = ['danger', 'warning'];
|
|
488
|
+
return urgent.includes(this.color()) ? 'alert' : 'note';
|
|
489
|
+
}, ...(ngDevMode ? [{ debugName: "hostRole" }] : []));
|
|
490
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Alert, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
491
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: Alert, isStandalone: true, selector: "tls-alert", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hideLabel: { classPropertyName: "hideLabel", publicName: "hideLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()", "attr.role": "hostRole()", "attr.aria-label": "hideLabel() ? displayLabel() : null" } }, ngImport: i0, template: "<div class=\"tls-alert-icon\"></div>\n<div class=\"tls-alert-body\">\n @if (!hideLabel()) {\n <span class=\"tls-alert-body__label\">{{ displayLabel() }}</span>\n }\n <span class=\"tls-alert-body__content\">\n <ng-content></ng-content>\n </span>\n</div>\n" });
|
|
492
|
+
}
|
|
493
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Alert, decorators: [{
|
|
494
|
+
type: Component,
|
|
495
|
+
args: [{ selector: 'tls-alert', imports: [], host: {
|
|
496
|
+
'[class]': 'hostClasses()',
|
|
497
|
+
'[attr.role]': 'hostRole()',
|
|
498
|
+
'[attr.aria-label]': 'hideLabel() ? displayLabel() : null',
|
|
499
|
+
}, template: "<div class=\"tls-alert-icon\"></div>\n<div class=\"tls-alert-body\">\n @if (!hideLabel()) {\n <span class=\"tls-alert-body__label\">{{ displayLabel() }}</span>\n }\n <span class=\"tls-alert-body__content\">\n <ng-content></ng-content>\n </span>\n</div>\n" }]
|
|
500
|
+
}], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hideLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideLabel", required: false }] }] } });
|
|
501
|
+
|
|
502
|
+
const DEFAULT_BUTTON_CONFIG = {
|
|
503
|
+
color: 'primary',
|
|
504
|
+
variant: 'filled',
|
|
505
|
+
size: 'md',
|
|
506
|
+
type: 'button',
|
|
507
|
+
fluid: false,
|
|
508
|
+
};
|
|
509
|
+
|
|
510
|
+
const BUTTON_CONFIG = new InjectionToken('BUTTON_CONFIG', {
|
|
511
|
+
factory: () => DEFAULT_BUTTON_CONFIG,
|
|
512
|
+
});
|
|
513
|
+
|
|
514
|
+
class ButtonBase {
|
|
515
|
+
// Injections
|
|
516
|
+
_config = inject(BUTTON_CONFIG);
|
|
517
|
+
APPLY_HOST_CLASSES = true;
|
|
518
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
519
|
+
icon = input(false, { ...(ngDevMode ? { debugName: "icon" } : {}), transform: booleanAttribute });
|
|
520
|
+
color = input(this._config.color, ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
521
|
+
variant = input(this._config.variant, ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
522
|
+
size = input(this._config.size, ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
523
|
+
rounded = input(false, { ...(ngDevMode ? { debugName: "rounded" } : {}), transform: booleanAttribute });
|
|
524
|
+
/** Whether the button stretches to fill its container's width. */
|
|
525
|
+
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : {}), transform: booleanAttribute });
|
|
526
|
+
classes = computed(() => {
|
|
527
|
+
const className = 'tls-button';
|
|
528
|
+
const array = [className];
|
|
529
|
+
array.push(`${className}--${this.color()}`);
|
|
530
|
+
array.push(`${className}--${this.variant()}`);
|
|
531
|
+
array.push(`${className}--${this.size()}`);
|
|
532
|
+
if (this.disabled())
|
|
533
|
+
array.push(`${className}--disabled`);
|
|
534
|
+
if (this.icon())
|
|
535
|
+
array.push(`${className}--icon-only`);
|
|
536
|
+
if (this.fluid())
|
|
537
|
+
array.push(`${className}--fluid`);
|
|
538
|
+
if (this.rounded())
|
|
539
|
+
array.push(`${className}--rounded`);
|
|
540
|
+
return array;
|
|
541
|
+
}, ...(ngDevMode ? [{ debugName: "classes" }] : []));
|
|
542
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ButtonBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
543
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.1", type: ButtonBase, isStandalone: true, inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "APPLY_HOST_CLASSES ? classes() : null" } }, ngImport: i0 });
|
|
544
|
+
}
|
|
545
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ButtonBase, decorators: [{
|
|
546
|
+
type: Directive,
|
|
547
|
+
args: [{
|
|
548
|
+
host: {
|
|
549
|
+
'[class]': 'APPLY_HOST_CLASSES ? classes() : null',
|
|
550
|
+
},
|
|
551
|
+
}]
|
|
552
|
+
}], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }] } });
|
|
553
|
+
|
|
554
|
+
class Button extends ButtonBase {
|
|
555
|
+
// Injections
|
|
556
|
+
_routerLink = inject(RouterLink, { optional: true });
|
|
557
|
+
_router = inject(Router, { optional: true });
|
|
558
|
+
_locationStrategy = inject(LocationStrategy, { optional: true });
|
|
559
|
+
APPLY_HOST_CLASSES = false;
|
|
560
|
+
// Inputs
|
|
561
|
+
/** The text label displayed inside the button. Takes priority over projected content. */
|
|
562
|
+
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
563
|
+
type = input(this._config.type, ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
564
|
+
/** An optional URL that causes the button to render as an anchor link. */
|
|
565
|
+
href = input(null, ...(ngDevMode ? [{ debugName: "href" }] : []));
|
|
566
|
+
tabindex = input('0', ...(ngDevMode ? [{ debugName: "tabindex" }] : []));
|
|
567
|
+
// Computed
|
|
568
|
+
isLink = computed(() => Boolean(this._routerLink || this.href()), ...(ngDevMode ? [{ debugName: "isLink" }] : []));
|
|
569
|
+
/**
|
|
570
|
+
* Resolved URL placed on the inner anchor so the browser treats it as a real link
|
|
571
|
+
* (enables "Open in new tab", middle-click, status-bar preview, etc.). An explicit
|
|
572
|
+
* `href` wins; otherwise the URL is derived from the host `routerLink`.
|
|
573
|
+
*/
|
|
574
|
+
linkHref = computed(() => {
|
|
575
|
+
if (this.disabled())
|
|
576
|
+
return null;
|
|
577
|
+
const explicitHref = this.href();
|
|
578
|
+
if (explicitHref)
|
|
579
|
+
return explicitHref;
|
|
580
|
+
const urlTree = this._routerLink?.urlTree;
|
|
581
|
+
if (!urlTree || !this._router)
|
|
582
|
+
return null;
|
|
583
|
+
const serialized = this._router.serializeUrl(urlTree);
|
|
584
|
+
return this._locationStrategy?.prepareExternalUrl(serialized) ?? serialized;
|
|
585
|
+
}, ...(ngDevMode ? [{ debugName: "linkHref" }] : []));
|
|
586
|
+
// Protected methods
|
|
587
|
+
/**
|
|
588
|
+
* Keeps navigation correct when the host carries a `routerLink` while the inner anchor
|
|
589
|
+
* exposes a real `href`:
|
|
590
|
+
* - modified / non-primary clicks bubble to the browser so it can open a new tab, and
|
|
591
|
+
* are stopped from reaching the host RouterLink to avoid a duplicate in-app navigation;
|
|
592
|
+
* - a plain left click defers to the host RouterLink for SPA navigation, so the anchor's
|
|
593
|
+
* own full-page navigation is prevented.
|
|
594
|
+
*/
|
|
595
|
+
onLinkClick(event) {
|
|
596
|
+
if (this.disabled()) {
|
|
597
|
+
event.preventDefault();
|
|
598
|
+
event.stopPropagation();
|
|
599
|
+
return;
|
|
600
|
+
}
|
|
601
|
+
// Pure href links (no routerLink) navigate natively — nothing to coordinate.
|
|
602
|
+
if (!this._routerLink)
|
|
603
|
+
return;
|
|
604
|
+
if (event.button !== 0 || event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) {
|
|
605
|
+
event.stopPropagation();
|
|
606
|
+
return;
|
|
607
|
+
}
|
|
608
|
+
event.preventDefault();
|
|
609
|
+
}
|
|
610
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Button, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
611
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: Button, isStandalone: true, selector: "tls-button", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "tabindex": "-1" } }, usesInheritance: true, ngImport: i0, template: "@if (isLink()) {\n <a\n role=\"link\"\n [class]=\"classes()\"\n [attr.href]=\"linkHref()\"\n [tabindex]=\"tabindex()\"\n [attr.aria-disabled]=\"disabled()\"\n (click)=\"onLinkClick($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"contentTemplate\"></ng-container>\n </a>\n} @else {\n <button\n role=\"button\"\n [class]=\"classes()\"\n [type]=\"type()\"\n [tabindex]=\"tabindex()\"\n [disabled]=\"disabled()\"\n [attr.aria-disabled]=\"disabled()\"\n >\n <ng-container [ngTemplateOutlet]=\"contentTemplate\"></ng-container>\n </button>\n}\n\n<!-- Content -->\n<ng-template #contentTemplate>\n @if (label() && !icon()) {\n {{ label() }}\n } @else {\n <ng-container *ngTemplateOutlet=\"projectedContentTemplate\"></ng-container>\n }\n</ng-template>\n\n<ng-template #projectedContentTemplate>\n <ng-content></ng-content>\n</ng-template>\n", styles: [":host{width:fit-content;display:inline-block}:host:focus-visible{outline:none}:host:has(.tls-button.tls-button--fluid){width:100%}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
612
|
+
}
|
|
613
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Button, decorators: [{
|
|
614
|
+
type: Component,
|
|
615
|
+
args: [{ selector: 'tls-button', imports: [NgTemplateOutlet], host: {
|
|
616
|
+
'[tabindex]': '-1',
|
|
617
|
+
}, template: "@if (isLink()) {\n <a\n role=\"link\"\n [class]=\"classes()\"\n [attr.href]=\"linkHref()\"\n [tabindex]=\"tabindex()\"\n [attr.aria-disabled]=\"disabled()\"\n (click)=\"onLinkClick($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"contentTemplate\"></ng-container>\n </a>\n} @else {\n <button\n role=\"button\"\n [class]=\"classes()\"\n [type]=\"type()\"\n [tabindex]=\"tabindex()\"\n [disabled]=\"disabled()\"\n [attr.aria-disabled]=\"disabled()\"\n >\n <ng-container [ngTemplateOutlet]=\"contentTemplate\"></ng-container>\n </button>\n}\n\n<!-- Content -->\n<ng-template #contentTemplate>\n @if (label() && !icon()) {\n {{ label() }}\n } @else {\n <ng-container *ngTemplateOutlet=\"projectedContentTemplate\"></ng-container>\n }\n</ng-template>\n\n<ng-template #projectedContentTemplate>\n <ng-content></ng-content>\n</ng-template>\n", styles: [":host{width:fit-content;display:inline-block}:host:focus-visible{outline:none}:host:has(.tls-button.tls-button--fluid){width:100%}\n"] }]
|
|
618
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }] } });
|
|
619
|
+
|
|
620
|
+
class ButtonDirective extends ButtonBase {
|
|
621
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ButtonDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
622
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.1", type: ButtonDirective, isStandalone: true, selector: "[tlsButton]", usesInheritance: true, ngImport: i0 });
|
|
623
|
+
}
|
|
624
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ButtonDirective, decorators: [{
|
|
625
|
+
type: Directive,
|
|
626
|
+
args: [{
|
|
627
|
+
selector: '[tlsButton]',
|
|
628
|
+
}]
|
|
629
|
+
}] });
|
|
630
|
+
|
|
631
|
+
const DEFAULT_CHIP_CONFIG = {
|
|
632
|
+
color: 'primary',
|
|
633
|
+
variant: 'filled',
|
|
634
|
+
size: 'md',
|
|
635
|
+
};
|
|
636
|
+
|
|
637
|
+
const CHIP_CONFIG = new InjectionToken('CHIP_CONFIG', {
|
|
638
|
+
factory: () => DEFAULT_CHIP_CONFIG,
|
|
639
|
+
});
|
|
640
|
+
|
|
641
|
+
class Chip {
|
|
642
|
+
_config = inject(CHIP_CONFIG);
|
|
643
|
+
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
644
|
+
color = input(this._config.color, ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
645
|
+
variant = input(this._config.variant, ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
646
|
+
size = input(this._config.size, ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
647
|
+
rounded = input(false, { ...(ngDevMode ? { debugName: "rounded" } : {}), transform: booleanAttribute });
|
|
648
|
+
icon = input(false, { ...(ngDevMode ? { debugName: "icon" } : {}), transform: booleanAttribute });
|
|
649
|
+
fluid = input(false, { ...(ngDevMode ? { debugName: "fluid" } : {}), transform: booleanAttribute });
|
|
650
|
+
context = signal({
|
|
651
|
+
checked: false,
|
|
652
|
+
disabled: false,
|
|
653
|
+
readonly: false,
|
|
654
|
+
touched: false,
|
|
655
|
+
dirty: false,
|
|
656
|
+
invalid: false,
|
|
657
|
+
pending: false,
|
|
658
|
+
}, ...(ngDevMode ? [{ debugName: "context" }] : []));
|
|
659
|
+
startIconTemplate = contentChild('startIcon', ...(ngDevMode ? [{ debugName: "startIconTemplate" }] : []));
|
|
660
|
+
endIconTemplate = contentChild('endIcon', ...(ngDevMode ? [{ debugName: "endIconTemplate" }] : []));
|
|
661
|
+
classes = computed(() => {
|
|
662
|
+
const className = 'tls-chip';
|
|
663
|
+
const array = [className];
|
|
664
|
+
array.push(`${className}--${this.color()}`);
|
|
665
|
+
array.push(`${className}--${this.variant()}`);
|
|
666
|
+
array.push(`${className}--${this.size()}`);
|
|
667
|
+
if (this.rounded())
|
|
668
|
+
array.push(`${className}--rounded`);
|
|
669
|
+
if (this.icon())
|
|
670
|
+
array.push(`${className}--icon`);
|
|
671
|
+
if (this.fluid())
|
|
672
|
+
array.push(`${className}--fluid`);
|
|
673
|
+
return array;
|
|
674
|
+
}, ...(ngDevMode ? [{ debugName: "classes" }] : []));
|
|
675
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Chip, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
676
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: Chip, isStandalone: true, selector: "tls-chip", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, queries: [{ propertyName: "startIconTemplate", first: true, predicate: ["startIcon"], descendants: true, isSignal: true }, { propertyName: "endIconTemplate", first: true, predicate: ["endIcon"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (startIconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: context() }\" />\n}\n\n@if (label()) {\n {{ label() }}\n} @else {\n <ng-content></ng-content>\n}\n\n@if (endIconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: context() }\" />\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
677
|
+
}
|
|
678
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Chip, decorators: [{
|
|
679
|
+
type: Component,
|
|
680
|
+
args: [{ selector: 'tls-chip', imports: [NgTemplateOutlet], host: {
|
|
681
|
+
'[class]': 'classes()',
|
|
682
|
+
}, template: "@if (startIconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: context() }\" />\n}\n\n@if (label()) {\n {{ label() }}\n} @else {\n <ng-content></ng-content>\n}\n\n@if (endIconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: context() }\" />\n}\n" }]
|
|
683
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], startIconTemplate: [{ type: i0.ContentChild, args: ['startIcon', { isSignal: true }] }], endIconTemplate: [{ type: i0.ContentChild, args: ['endIcon', { isSignal: true }] }] } });
|
|
684
|
+
|
|
677
685
|
const DEFAULT_CHIP_CONTROL_CONFIG = {
|
|
678
686
|
checkedColor: undefined,
|
|
679
687
|
checkedVariant: undefined,
|
|
@@ -1561,7 +1569,7 @@ const DEFAULT_CHIP_GROUP_CONFIG = {
|
|
|
1561
1569
|
variant: 'outlined',
|
|
1562
1570
|
checkedVariant: undefined,
|
|
1563
1571
|
orientation: 'horizontal',
|
|
1564
|
-
multiple:
|
|
1572
|
+
multiple: false,
|
|
1565
1573
|
unselectable: false,
|
|
1566
1574
|
rounded: false,
|
|
1567
1575
|
fluid: false,
|
|
@@ -1571,6 +1579,10 @@ const CHIP_GROUP_CONFIG = new InjectionToken('CHIP_GROUP_CONFIG', {
|
|
|
1571
1579
|
factory: () => DEFAULT_CHIP_GROUP_CONFIG,
|
|
1572
1580
|
});
|
|
1573
1581
|
|
|
1582
|
+
/**
|
|
1583
|
+
* `value` is always an array — in single mode (`multiple = false`) it holds 0 or
|
|
1584
|
+
* 1 items, read it as `value()[0]`. See {@link SelectionGroup} for the contract.
|
|
1585
|
+
*/
|
|
1574
1586
|
class ChipGroup extends SelectionGroup {
|
|
1575
1587
|
_config = inject(CHIP_GROUP_CONFIG);
|
|
1576
1588
|
CLASS_NAME = 'tls-chip-group';
|
|
@@ -2354,6 +2366,10 @@ const TOGGLE_GROUP_CONFIG = new InjectionToken('TOGGLE_GROUP_CONFIG', {
|
|
|
2354
2366
|
factory: () => DEFAULT_TOGGLE_GROUP_CONFIG,
|
|
2355
2367
|
});
|
|
2356
2368
|
|
|
2369
|
+
/**
|
|
2370
|
+
* `value` is always an array — in single mode (`multiple = false`) it holds 0 or
|
|
2371
|
+
* 1 items, read it as `value()[0]`. See {@link SelectionGroup} for the contract.
|
|
2372
|
+
*/
|
|
2357
2373
|
class ToggleGroup extends SelectionGroup {
|
|
2358
2374
|
_config = inject(TOGGLE_GROUP_CONFIG);
|
|
2359
2375
|
CLASS_NAME = 'tls-toggle-group';
|
|
@@ -2656,11 +2672,11 @@ class Menu {
|
|
|
2656
2672
|
this.close();
|
|
2657
2673
|
}
|
|
2658
2674
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Menu, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2659
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: Menu, isStandalone: true, selector: "tls-menu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "_customItems", predicate: MenuItemComponent, isSignal: true }, { propertyName: "itemTemplate", first: true, predicate: ["itemTemplate"], descendants: true, isSignal: true }, { propertyName: "labelTemplate", first: true, predicate: ["labelTemplate"], descendants: true, isSignal: true }, { propertyName: "dividerTemplate", first: true, predicate: ["dividerTemplate"], descendants: true, isSignal: true }, { propertyName: "iconTemplate", first: true, predicate: ["iconTemplate"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "_panelRef", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #panel>\n <div\n class=\"tls-menu\"\n [id]=\"id\"\n role=\"menu\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n >\n @for (item of items(); track $index) {\n @switch (item.type) {\n @case ('item') {\n @let actionItem = item;\n @if (itemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: actionItem }\" />\n } @else {\n <button\n role=\"menuitem\"\n class=\"tls-menu__item\"\n [disabled]=\"actionItem.disabled ?? false\"\n (click)=\"onItemClick(actionItem)\"\n >\n @if (actionItem.icon) {\n
|
|
2675
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: Menu, isStandalone: true, selector: "tls-menu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "_customItems", predicate: MenuItemComponent, isSignal: true }, { propertyName: "itemTemplate", first: true, predicate: ["itemTemplate"], descendants: true, isSignal: true }, { propertyName: "labelTemplate", first: true, predicate: ["labelTemplate"], descendants: true, isSignal: true }, { propertyName: "dividerTemplate", first: true, predicate: ["dividerTemplate"], descendants: true, isSignal: true }, { propertyName: "iconTemplate", first: true, predicate: ["iconTemplate"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "_panelRef", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #panel>\n <div\n class=\"tls-menu\"\n [id]=\"id\"\n role=\"menu\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n >\n @for (item of items(); track $index) {\n @switch (item.type) {\n @case ('item') {\n @let actionItem = item;\n @if (itemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: actionItem }\" />\n } @else if (actionItem.link) {\n <a\n role=\"menuitem\"\n class=\"tls-menu__item\"\n [routerLink]=\"actionItem.link\"\n [class.tls-menu__item--disabled]=\"actionItem.disabled ?? false\"\n (click)=\"onItemClick(actionItem)\"\n >\n <ng-container [ngTemplateOutlet]=\"actionItemContent\" [ngTemplateOutletContext]=\"{ $implicit: actionItem }\" />\n </a>\n } @else {\n <button\n role=\"menuitem\"\n class=\"tls-menu__item\"\n [disabled]=\"actionItem.disabled ?? false\"\n (click)=\"onItemClick(actionItem)\"\n >\n <ng-container [ngTemplateOutlet]=\"actionItemContent\" [ngTemplateOutletContext]=\"{ $implicit: actionItem }\" />\n </button>\n }\n\n <ng-template #actionItemContent let-actionItem>\n @if (actionItem.icon) {\n @if (iconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: actionItem.icon, data: actionItem }\" />\n } @else {\n <tls-icon class=\"tls-menu__item-icon\" [iconSrc]=\"actionItem.icon\" />\n }\n }\n <span class=\"tls-menu__item-label\">{{ actionItem.label }}</span>\n @if (actionItem.shortcut) {\n <kbd class=\"tls-menu__item-shortcut\">{{ actionItem.shortcut }}</kbd>\n }\n </ng-template>\n }\n @case ('label') {\n @let labelItem = item;\n @if (labelTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: labelItem }\" />\n } @else {\n <span class=\"tls-menu__label\" aria-hidden=\"true\">{{ labelItem.label }}</span>\n }\n }\n @case ('divider') {\n @if (dividerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n } @else {\n <hr class=\"tls-menu__divider\" role=\"separator\" aria-hidden=\"true\" />\n }\n }\n @case ('custom') {\n @if (customTemplates().get(item.key); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" />\n }\n }\n }\n }\n </div>\n</ng-template>\n\n@if (inline()) {\n <ng-container [ngTemplateOutlet]=\"panel\" />\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: Icon, selector: "tls-icon", inputs: ["iconSrc", "alt", "allowedSources"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
|
|
2660
2676
|
}
|
|
2661
2677
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Menu, decorators: [{
|
|
2662
2678
|
type: Component,
|
|
2663
|
-
args: [{ selector: 'tls-menu', imports: [NgTemplateOutlet, Icon], template: "<ng-template #panel>\n <div\n class=\"tls-menu\"\n [id]=\"id\"\n role=\"menu\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n >\n @for (item of items(); track $index) {\n @switch (item.type) {\n @case ('item') {\n @let actionItem = item;\n @if (itemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: actionItem }\" />\n } @else {\n <button\n role=\"menuitem\"\n class=\"tls-menu__item\"\n [disabled]=\"actionItem.disabled ?? false\"\n (click)=\"onItemClick(actionItem)\"\n >\n @if (actionItem.icon) {\n
|
|
2679
|
+
args: [{ selector: 'tls-menu', imports: [NgTemplateOutlet, Icon, RouterLink], template: "<ng-template #panel>\n <div\n class=\"tls-menu\"\n [id]=\"id\"\n role=\"menu\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n >\n @for (item of items(); track $index) {\n @switch (item.type) {\n @case ('item') {\n @let actionItem = item;\n @if (itemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: actionItem }\" />\n } @else if (actionItem.link) {\n <a\n role=\"menuitem\"\n class=\"tls-menu__item\"\n [routerLink]=\"actionItem.link\"\n [class.tls-menu__item--disabled]=\"actionItem.disabled ?? false\"\n (click)=\"onItemClick(actionItem)\"\n >\n <ng-container [ngTemplateOutlet]=\"actionItemContent\" [ngTemplateOutletContext]=\"{ $implicit: actionItem }\" />\n </a>\n } @else {\n <button\n role=\"menuitem\"\n class=\"tls-menu__item\"\n [disabled]=\"actionItem.disabled ?? false\"\n (click)=\"onItemClick(actionItem)\"\n >\n <ng-container [ngTemplateOutlet]=\"actionItemContent\" [ngTemplateOutletContext]=\"{ $implicit: actionItem }\" />\n </button>\n }\n\n <ng-template #actionItemContent let-actionItem>\n @if (actionItem.icon) {\n @if (iconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: actionItem.icon, data: actionItem }\" />\n } @else {\n <tls-icon class=\"tls-menu__item-icon\" [iconSrc]=\"actionItem.icon\" />\n }\n }\n <span class=\"tls-menu__item-label\">{{ actionItem.label }}</span>\n @if (actionItem.shortcut) {\n <kbd class=\"tls-menu__item-shortcut\">{{ actionItem.shortcut }}</kbd>\n }\n </ng-template>\n }\n @case ('label') {\n @let labelItem = item;\n @if (labelTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: labelItem }\" />\n } @else {\n <span class=\"tls-menu__label\" aria-hidden=\"true\">{{ labelItem.label }}</span>\n }\n }\n @case ('divider') {\n @if (dividerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n } @else {\n <hr class=\"tls-menu__divider\" role=\"separator\" aria-hidden=\"true\" />\n }\n }\n @case ('custom') {\n @if (customTemplates().get(item.key); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" />\n }\n }\n }\n }\n </div>\n</ng-template>\n\n@if (inline()) {\n <ng-container [ngTemplateOutlet]=\"panel\" />\n}\n" }]
|
|
2664
2680
|
}], ctorParameters: () => [], propDecorators: { _panelRef: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], _customItems: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => MenuItemComponent), { isSignal: true }] }], itemTemplate: [{ type: i0.ContentChild, args: ['itemTemplate', { isSignal: true }] }], labelTemplate: [{ type: i0.ContentChild, args: ['labelTemplate', { isSignal: true }] }], dividerTemplate: [{ type: i0.ContentChild, args: ['dividerTemplate', { isSignal: true }] }], iconTemplate: [{ type: i0.ContentChild, args: ['iconTemplate', { isSignal: true }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], offset: [{ type: i0.Input, args: [{ isSignal: true, alias: "offset", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }] } });
|
|
2665
2681
|
|
|
2666
2682
|
class MenuTriggerDirective {
|
|
@@ -2831,12 +2847,19 @@ class Skeleton {
|
|
|
2831
2847
|
const rounded = this.rounded();
|
|
2832
2848
|
const radius = this.radius();
|
|
2833
2849
|
return {
|
|
2834
|
-
'--tls-skeleton-width': width
|
|
2835
|
-
'--tls-skeleton-height': height
|
|
2850
|
+
'--tls-skeleton-width': this.resolveDimension(width),
|
|
2851
|
+
'--tls-skeleton-height': this.resolveDimension(height),
|
|
2836
2852
|
'--tls-skeleton-radius': rounded ? '50%' : `${radius}px`,
|
|
2837
2853
|
'--tls-skeleton-duration': `${this.duration()}ms`,
|
|
2838
2854
|
};
|
|
2839
2855
|
}, ...(ngDevMode ? [{ debugName: "hostStyles" }] : []));
|
|
2856
|
+
resolveDimension(value) {
|
|
2857
|
+
if (value === null)
|
|
2858
|
+
return '100%';
|
|
2859
|
+
if (typeof value === 'string')
|
|
2860
|
+
return value;
|
|
2861
|
+
return `${value}px`;
|
|
2862
|
+
}
|
|
2840
2863
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Skeleton, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2841
2864
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.1", type: Skeleton, isStandalone: true, selector: "tls-skeleton", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, radius: { classPropertyName: "radius", publicName: "radius", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, animate: { classPropertyName: "animate", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-hidden": "true" }, properties: { "class": "hostClasses()", "style": "hostStyles()" } }, ngImport: i0, template: '', isInline: true });
|
|
2842
2865
|
}
|
|
@@ -3500,5 +3523,5 @@ const provideThalassicUIConfig = (config) => {
|
|
|
3500
3523
|
* Generated bundle index. Do not edit.
|
|
3501
3524
|
*/
|
|
3502
3525
|
|
|
3503
|
-
export { ALERT_CONFIG, Alert, BUTTON_CONFIG, Button, ButtonDirective, CHECKBOX_CONFIG, CHIP_CONFIG, CHIP_CONTROL_CONFIG, CHIP_GROUP_CONFIG, CHIP_INPUT_CONFIG, Checkbox, Chip, ChipControl, ChipGroup, ChipInput, ContextMenuDirective, DATE_TIME_PICKER_CONFIG, DEFAULT_ALERT_CONFIG, DEFAULT_BUTTON_CONFIG, DEFAULT_CHECKBOX_CONFIG, DEFAULT_CHIP_CONFIG, DEFAULT_CHIP_CONTROL_CONFIG, DEFAULT_CHIP_GROUP_CONFIG, DEFAULT_CHIP_INPUT_CONFIG, DEFAULT_DATE_TIME_PICKER_CONFIG, DEFAULT_DIALOG_CONFIG, DEFAULT_DIVIDER_CONFIG, DEFAULT_FILE_UPLOADER_CONFIG, DEFAULT_FORM_CONTROL_GROUP_CONFIG, DEFAULT_FORM_ITEM_CONFIG, DEFAULT_ICON_CONFIG, DEFAULT_INPUT_CONFIG, DEFAULT_LOADER_CONFIG, DEFAULT_MENU_CONFIG, DEFAULT_MULTI_SELECT_CONFIG, DEFAULT_PAGINATION_CONFIG, DEFAULT_PASSWORD_CONFIG, DEFAULT_PIN_INPUT_CONFIG, DEFAULT_POPOVER_CONFIG, DEFAULT_RADIO_BUTTON_CONFIG, DEFAULT_SELECT_CONFIG, DEFAULT_SKELETON_CONFIG, DEFAULT_STEPPER_CONFIG, DEFAULT_STEP_CONFIG, DEFAULT_SWITCH_CONFIG, DEFAULT_TABLE_CONFIG, DEFAULT_TABS_CONFIG, DEFAULT_TEXTAREA_CONFIG, DEFAULT_TOGGLE_GROUP_CONFIG, DEFAULT_TOOLTIP_CONFIG, DIALOG_CONFIG, DIVIDER_CONFIG, DateTimePicker, Dialog, DialogService, Divider, FILE_UPLOADER_CONFIG, FORM_CONTROL_GROUP_CONFIG, FORM_ITEM_CONFIG, FileUploader, FormControlAddon, FormControlGroup, FormItem, ICON_CONFIG, INPUT_CONFIG, Icon, Input, InputDirective, LOADER_CONFIG, Loader, MENU_CONFIG, MULTI_SELECT_CONFIG, Menu, MenuItemComponent, MenuTriggerDirective, MultiSelect, PAGINATION_CONFIG, PASSWORD_CONFIG, PIN_INPUT_CONFIG, POPOVER_CONFIG, Pagination, Password, PinInput, Popover, RADIO_BUTTON_CONFIG, RadioButton, SELECT_CONFIG, SKELETON_CONFIG, STEPPER_CONFIG, SWITCH_CONFIG, Select, Skeleton, Step, Stepper, Switch, TABLE_CONFIG, TABS_CONFIG, TEXTAREA_CONFIG, TOGGLE_GROUP_CONFIG, TOOLTIP_CONFIG, Tab, Table, TableColumn, Tabs, Textarea, ToggleGroup, TooltipDirective, provideThalassicUIConfig };
|
|
3526
|
+
export { ALERT_CONFIG, Alert, BUTTON_CONFIG, Button, ButtonDirective, CHECKBOX_CONFIG, CHIP_CONFIG, CHIP_CONTROL_CONFIG, CHIP_GROUP_CONFIG, CHIP_INPUT_CONFIG, Checkbox, CheckboxFormControl, Chip, ChipControl, ChipGroup, ChipInput, ContextMenuDirective, DATE_TIME_PICKER_CONFIG, DEFAULT_ALERT_CONFIG, DEFAULT_BUTTON_CONFIG, DEFAULT_CHECKBOX_CONFIG, DEFAULT_CHIP_CONFIG, DEFAULT_CHIP_CONTROL_CONFIG, DEFAULT_CHIP_GROUP_CONFIG, DEFAULT_CHIP_INPUT_CONFIG, DEFAULT_DATE_TIME_PICKER_CONFIG, DEFAULT_DIALOG_CONFIG, DEFAULT_DIVIDER_CONFIG, DEFAULT_FILE_UPLOADER_CONFIG, DEFAULT_FORM_CONTROL_GROUP_CONFIG, DEFAULT_FORM_ITEM_CONFIG, DEFAULT_ICON_CONFIG, DEFAULT_INPUT_CONFIG, DEFAULT_LOADER_CONFIG, DEFAULT_MENU_CONFIG, DEFAULT_MULTI_SELECT_CONFIG, DEFAULT_PAGINATION_CONFIG, DEFAULT_PASSWORD_CONFIG, DEFAULT_PIN_INPUT_CONFIG, DEFAULT_POPOVER_CONFIG, DEFAULT_RADIO_BUTTON_CONFIG, DEFAULT_SELECT_CONFIG, DEFAULT_SKELETON_CONFIG, DEFAULT_STEPPER_CONFIG, DEFAULT_STEP_CONFIG, DEFAULT_SWITCH_CONFIG, DEFAULT_TABLE_CONFIG, DEFAULT_TABS_CONFIG, DEFAULT_TEXTAREA_CONFIG, DEFAULT_TOGGLE_GROUP_CONFIG, DEFAULT_TOOLTIP_CONFIG, DIALOG_CONFIG, DIVIDER_CONFIG, DateTimePicker, Dialog, DialogService, Divider, FILE_UPLOADER_CONFIG, FORM_CONTROL_GROUP_CONFIG, FORM_ITEM_CONFIG, FileUploader, FormControl, FormControlAddon, FormControlGroup, FormItem, ICON_CONFIG, INPUT_CONFIG, Icon, Input, InputDirective, LOADER_CONFIG, Loader, MENU_CONFIG, MULTI_SELECT_CONFIG, Menu, MenuItemComponent, MenuTriggerDirective, MultiSelect, PAGINATION_CONFIG, PASSWORD_CONFIG, PIN_INPUT_CONFIG, POPOVER_CONFIG, Pagination, Password, PinInput, Popover, RADIO_BUTTON_CONFIG, RadioButton, SELECT_CONFIG, SKELETON_CONFIG, STEPPER_CONFIG, SWITCH_CONFIG, Select, Skeleton, Step, Stepper, Switch, TABLE_CONFIG, TABS_CONFIG, TEXTAREA_CONFIG, TOGGLE_GROUP_CONFIG, TOOLTIP_CONFIG, Tab, Table, TableColumn, Tabs, Textarea, ToggleGroup, TooltipDirective, ValueFormControl, provideThalassicUIConfig };
|
|
3504
3527
|
//# sourceMappingURL=thalassic-ui.mjs.map
|