@thalassic/ui 0.3.1 → 0.4.1
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 +132 -153
- package/fesm2022/thalassic-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/thalassic-ui.d.ts +15 -30
- package/features/button/button.scss +0 -15
- package/features/divider/divider.scss +0 -91
- package/features/form/checkbox/checkbox.scss +0 -95
- package/features/form/input/input.scss +0 -9
- package/features/form/password/password.scss +0 -25
- package/features/form/radio-button/radio-button.scss +0 -103
- package/features/form/switch/switch-color.scss +0 -36
- package/features/form/switch/switch.scss +0 -82
- package/features/form-item/form-item.scss +0 -79
- package/features/icon/icon.scss +0 -15
- package/styles/components/_index.scss +0 -2
- package/styles/components/button/_button-appearance.scss +0 -136
- package/styles/components/button/_button-color.scss +0 -41
- package/styles/components/button/_button-size.scss +0 -52
- package/styles/components/button/_button.scss +0 -53
- package/styles/components/button/_index.scss +0 -4
- package/styles/components/form/_form-control-addon.scss +0 -2
- package/styles/components/form/_form-control-group-size.scss +0 -46
- package/styles/components/form/_form-control-group.scss +0 -58
- package/styles/components/form/_form-control-size.scss +0 -46
- package/styles/components/form/_form-control.scss +0 -45
- package/styles/components/form/_index.scss +0 -5
- package/styles/index.scss +0 -1
- package/styles/mixins/_index.scss +0 -1
- package/styles/mixins/focus-ring.scss +0 -4
|
@@ -1,104 +1,15 @@
|
|
|
1
1
|
import { NgTemplateOutlet, isPlatformBrowser } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, inject,
|
|
3
|
+
import { InjectionToken, inject, input, booleanAttribute, computed, Directive, Component, model, contentChild, forwardRef, Injectable, DOCUMENT, RendererFactory2, PLATFORM_ID, signal, effect, makeEnvironmentProviders, provideEnvironmentInitializer } from '@angular/core';
|
|
4
4
|
import { RouterLink } from '@angular/router';
|
|
5
5
|
import { rxResource } from '@angular/core/rxjs-interop';
|
|
6
6
|
import { HttpClient } from '@angular/common/http';
|
|
7
7
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
8
8
|
import { throwError, map, shareReplay } from 'rxjs';
|
|
9
9
|
|
|
10
|
-
const DEFAULT_ICON_CONFIG = {
|
|
11
|
-
allowedSources: [],
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const ICON_CONFIG = new InjectionToken('ICON_CONFIG', {
|
|
15
|
-
factory: () => DEFAULT_ICON_CONFIG,
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
class IconService {
|
|
19
|
-
_http = inject(HttpClient);
|
|
20
|
-
_sanitizer = inject(DomSanitizer);
|
|
21
|
-
_cache = new Map();
|
|
22
|
-
getSvgContent(url, allowedSources) {
|
|
23
|
-
if (allowedSources.length > 0 && !this._isUrlAllowed(url, allowedSources)) {
|
|
24
|
-
return throwError(() => new Error('SVG URL not from trusted source'));
|
|
25
|
-
}
|
|
26
|
-
const cache = this._cache.get(url);
|
|
27
|
-
if (!cache) {
|
|
28
|
-
const svg$ = this._http.get(url, { responseType: 'text' }).pipe(map(svg => this._sanitizeSvg(svg)), shareReplay(1));
|
|
29
|
-
this._cache.set(url, svg$);
|
|
30
|
-
return svg$;
|
|
31
|
-
}
|
|
32
|
-
return cache;
|
|
33
|
-
}
|
|
34
|
-
// Private methods
|
|
35
|
-
_isUrlAllowed(url, allowedSource) {
|
|
36
|
-
return allowedSource.some(source => url.startsWith(source));
|
|
37
|
-
}
|
|
38
|
-
_sanitizeSvg(svg) {
|
|
39
|
-
const safeSvg = this._makeSafe(svg);
|
|
40
|
-
return this._sanitizer.bypassSecurityTrustHtml(safeSvg);
|
|
41
|
-
}
|
|
42
|
-
_makeSafe(svg) {
|
|
43
|
-
return (svg
|
|
44
|
-
// Remove script tags
|
|
45
|
-
.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '')
|
|
46
|
-
// Remove event handlers (onclick, onload, onmouseover, etc.)
|
|
47
|
-
.replace(/on\w+\s*=\s*["'][^"']*["']/gi, '')
|
|
48
|
-
// Remove external xlink:href (keep internal references starting with #)
|
|
49
|
-
.replace(/xlink:href\s*=\s*["'](?!#)[^"']*["']/gi, '')
|
|
50
|
-
// Remove external href in <use>, <image>, <a> tags (keep internal #refs)
|
|
51
|
-
.replace(/href\s*=\s*["'](?!#)[^"']*["']/gi, '')
|
|
52
|
-
// Remove data URIs with HTML content
|
|
53
|
-
.replace(/href\s*=\s*["']data:text\/html[^"']*["']/gi, '')
|
|
54
|
-
.replace(/src\s*=\s*["']data:text\/html[^"']*["']/gi, '')
|
|
55
|
-
// Remove javascript: protocol
|
|
56
|
-
.replace(/javascript:/gi, '')
|
|
57
|
-
// Remove import statements in style
|
|
58
|
-
.replace(/@import/gi, ''));
|
|
59
|
-
}
|
|
60
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: IconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
61
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: IconService, providedIn: 'root' });
|
|
62
|
-
}
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: IconService, decorators: [{
|
|
64
|
-
type: Injectable,
|
|
65
|
-
args: [{ providedIn: 'root' }]
|
|
66
|
-
}] });
|
|
67
|
-
|
|
68
|
-
class Icon {
|
|
69
|
-
// Injections
|
|
70
|
-
_iconService = inject(IconService);
|
|
71
|
-
_config = inject(ICON_CONFIG);
|
|
72
|
-
// Inputs
|
|
73
|
-
iconSrc = input.required(...(ngDevMode ? [{ debugName: "iconSrc" }] : []));
|
|
74
|
-
alt = input('', ...(ngDevMode ? [{ debugName: "alt" }] : []));
|
|
75
|
-
allowedSources = input(this._config.allowedSources, ...(ngDevMode ? [{ debugName: "allowedSources" }] : []));
|
|
76
|
-
isSvg = computed(() => {
|
|
77
|
-
return this.iconSrc().endsWith('.svg');
|
|
78
|
-
}, ...(ngDevMode ? [{ debugName: "isSvg" }] : []));
|
|
79
|
-
_svgContentResource = rxResource({
|
|
80
|
-
defaultValue: '',
|
|
81
|
-
params: () => ({
|
|
82
|
-
iconSrc: this.iconSrc(),
|
|
83
|
-
allowedSources: this.allowedSources(),
|
|
84
|
-
}),
|
|
85
|
-
stream: params => this._iconService.getSvgContent(params.params.iconSrc, params.params.allowedSources),
|
|
86
|
-
});
|
|
87
|
-
// Accessors
|
|
88
|
-
get svgContent() {
|
|
89
|
-
return this._svgContentResource.value.asReadonly();
|
|
90
|
-
}
|
|
91
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Icon, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
92
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: Icon, isStandalone: true, selector: "tls-icon", inputs: { iconSrc: { classPropertyName: "iconSrc", publicName: "iconSrc", isSignal: true, isRequired: true, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, allowedSources: { classPropertyName: "allowedSources", publicName: "allowedSources", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (isSvg() && iconSrc()) {\n <span [innerHTML]=\"svgContent()\" class=\"tls-svg-icon\"></span>\n} @else if (iconSrc()) {\n <img [src]=\"iconSrc()\" [alt]=\"alt()\" class=\"tls-img-icon\" />\n} @else {\n {{ iconSrc() }}\n}\n", styles: [":host{width:auto;height:auto;min-width:auto;min-height:auto;display:inline-block;color:inherit}:host .tls-svg-icon{color:inherit}\n"] });
|
|
93
|
-
}
|
|
94
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Icon, decorators: [{
|
|
95
|
-
type: Component,
|
|
96
|
-
args: [{ selector: 'tls-icon', imports: [], template: "@if (isSvg() && iconSrc()) {\n <span [innerHTML]=\"svgContent()\" class=\"tls-svg-icon\"></span>\n} @else if (iconSrc()) {\n <img [src]=\"iconSrc()\" [alt]=\"alt()\" class=\"tls-img-icon\" />\n} @else {\n {{ iconSrc() }}\n}\n", styles: [":host{width:auto;height:auto;min-width:auto;min-height:auto;display:inline-block;color:inherit}:host .tls-svg-icon{color:inherit}\n"] }]
|
|
97
|
-
}], propDecorators: { iconSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSrc", required: true }] }], alt: [{ type: i0.Input, args: [{ isSignal: true, alias: "alt", required: false }] }], allowedSources: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowedSources", required: false }] }] } });
|
|
98
|
-
|
|
99
10
|
const DEFAULT_BUTTON_CONFIG = {
|
|
100
11
|
color: 'primary',
|
|
101
|
-
|
|
12
|
+
variant: 'filled',
|
|
102
13
|
size: 'md',
|
|
103
14
|
type: 'button',
|
|
104
15
|
fluid: false,
|
|
@@ -113,8 +24,9 @@ class ButtonBase {
|
|
|
113
24
|
_config = inject(BUTTON_CONFIG);
|
|
114
25
|
APPLY_HOST_CLASSES = true;
|
|
115
26
|
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
27
|
+
icon = input(false, { ...(ngDevMode ? { debugName: "icon" } : {}), transform: booleanAttribute });
|
|
116
28
|
color = input(this._config.color, ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
117
|
-
|
|
29
|
+
variant = input(this._config.variant, ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
118
30
|
size = input(this._config.size, ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
119
31
|
/** Whether the button stretches to fill its container's width. */
|
|
120
32
|
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : {}), transform: booleanAttribute });
|
|
@@ -122,7 +34,7 @@ class ButtonBase {
|
|
|
122
34
|
const className = 'tls-button';
|
|
123
35
|
const array = [className];
|
|
124
36
|
array.push(`${className}--${this.color()}`);
|
|
125
|
-
array.push(`${className}--${this.
|
|
37
|
+
array.push(`${className}--${this.variant()}`);
|
|
126
38
|
array.push(`${className}--${this.size()}`);
|
|
127
39
|
if (this.disabled())
|
|
128
40
|
array.push(`${className}--disabled`);
|
|
@@ -133,7 +45,7 @@ class ButtonBase {
|
|
|
133
45
|
return array;
|
|
134
46
|
}, ...(ngDevMode ? [{ debugName: "classes" }] : []));
|
|
135
47
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ButtonBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
136
|
-
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 }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null },
|
|
48
|
+
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 }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "APPLY_HOST_CLASSES ? classes() : null" } }, ngImport: i0 });
|
|
137
49
|
}
|
|
138
50
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ButtonBase, decorators: [{
|
|
139
51
|
type: Directive,
|
|
@@ -142,7 +54,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
142
54
|
'[class]': 'APPLY_HOST_CLASSES ? classes() : null',
|
|
143
55
|
},
|
|
144
56
|
}]
|
|
145
|
-
}], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }],
|
|
57
|
+
}], 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 }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }] } });
|
|
146
58
|
|
|
147
59
|
class Button extends ButtonBase {
|
|
148
60
|
// Injections
|
|
@@ -152,53 +64,31 @@ class Button extends ButtonBase {
|
|
|
152
64
|
/** The text label displayed inside the button. Takes priority over projected content. */
|
|
153
65
|
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
154
66
|
type = input(this._config.type, ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
155
|
-
/**
|
|
156
|
-
* Icon to display on the button. Accepts:
|
|
157
|
-
* - A string icon name to render a specific icon.
|
|
158
|
-
* - An empty string or boolean `true` to render an icon-only button (using a projected icon).
|
|
159
|
-
* - `false` to render no icon.
|
|
160
|
-
*/
|
|
161
|
-
icon = input(false, { ...(ngDevMode ? { debugName: "icon" } : {}), transform: (value) => {
|
|
162
|
-
if (typeof value === 'string' && value === '')
|
|
163
|
-
return true;
|
|
164
|
-
else if (typeof value === 'string')
|
|
165
|
-
return value;
|
|
166
|
-
else
|
|
167
|
-
return booleanAttribute(value);
|
|
168
|
-
} });
|
|
169
67
|
/** An optional URL that causes the button to render as an anchor link. */
|
|
170
68
|
href = input(null, ...(ngDevMode ? [{ debugName: "href" }] : []));
|
|
171
69
|
tabindex = input('0', ...(ngDevMode ? [{ debugName: "tabindex" }] : []));
|
|
172
70
|
// Computed
|
|
173
71
|
isLink = computed(() => Boolean(this._routerLink || this.href()), ...(ngDevMode ? [{ debugName: "isLink" }] : []));
|
|
174
|
-
isIconString = computed(() => typeof this.icon() === 'string', ...(ngDevMode ? [{ debugName: "isIconString" }] : []));
|
|
175
|
-
String = String;
|
|
176
72
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Button, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
177
|
-
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 },
|
|
73
|
+
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]=\"href()\"\n [tabindex]=\"tabindex()\"\n [attr.aria-disabled]=\"disabled()\"\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"] }] });
|
|
178
74
|
}
|
|
179
75
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Button, decorators: [{
|
|
180
76
|
type: Component,
|
|
181
|
-
args: [{ selector: 'tls-button', imports: [
|
|
77
|
+
args: [{ selector: 'tls-button', imports: [NgTemplateOutlet], host: {
|
|
182
78
|
'[tabindex]': '-1',
|
|
183
|
-
}, template: "@if (isLink()) {\n <a\n role=\"link\"\n [class]=\"classes()\"\n [attr.href]=\"href()\"\n [tabindex]=\"tabindex()\"\n [attr.aria-disabled]=\"disabled()\"\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 (
|
|
184
|
-
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }],
|
|
79
|
+
}, template: "@if (isLink()) {\n <a\n role=\"link\"\n [class]=\"classes()\"\n [attr.href]=\"href()\"\n [tabindex]=\"tabindex()\"\n [attr.aria-disabled]=\"disabled()\"\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"] }]
|
|
80
|
+
}], 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 }] }] } });
|
|
185
81
|
|
|
186
82
|
class ButtonDirective extends ButtonBase {
|
|
187
|
-
/**
|
|
188
|
-
* Whether the button is in icon-only mode (uses a projected icon).
|
|
189
|
-
* - `true` to render an icon-only button.
|
|
190
|
-
* - `false` (default) to render a standard button with no icon-only styling.
|
|
191
|
-
*/
|
|
192
|
-
icon = input(false, { ...(ngDevMode ? { debugName: "icon" } : {}), transform: booleanAttribute });
|
|
193
83
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ButtonDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
194
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
84
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.1", type: ButtonDirective, isStandalone: true, selector: "[tlsButton]", usesInheritance: true, ngImport: i0 });
|
|
195
85
|
}
|
|
196
86
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ButtonDirective, decorators: [{
|
|
197
87
|
type: Directive,
|
|
198
88
|
args: [{
|
|
199
89
|
selector: '[tlsButton]',
|
|
200
90
|
}]
|
|
201
|
-
}]
|
|
91
|
+
}] });
|
|
202
92
|
|
|
203
93
|
const DEFAULT_DIVIDER_CONFIG = {
|
|
204
94
|
orientation: 'horizontal',
|
|
@@ -228,7 +118,7 @@ class Divider {
|
|
|
228
118
|
return array;
|
|
229
119
|
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : []));
|
|
230
120
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Divider, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
231
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.1", type: Divider, isStandalone: true, selector: "tls-divider", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, flush: { classPropertyName: "flush", publicName: "flush", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "separator" }, properties: { "aria-orientation": "orientation()", "class": "hostClasses()" } }, ngImport: i0, template: "<span class=\"tls-divider-line tls-divider-line--start\"></span>\n<div class=\"tls-divider-content\">\n <ng-content></ng-content>\n</div>\n<span class=\"tls-divider-line tls-divider-line--end\"></span>\n"
|
|
121
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.1", type: Divider, isStandalone: true, selector: "tls-divider", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, flush: { classPropertyName: "flush", publicName: "flush", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "separator" }, properties: { "aria-orientation": "orientation()", "class": "hostClasses()" } }, ngImport: i0, template: "<span class=\"tls-divider-line tls-divider-line--start\"></span>\n<div class=\"tls-divider-content\">\n <ng-content></ng-content>\n</div>\n<span class=\"tls-divider-line tls-divider-line--end\"></span>\n" });
|
|
232
122
|
}
|
|
233
123
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Divider, decorators: [{
|
|
234
124
|
type: Component,
|
|
@@ -236,7 +126,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
236
126
|
role: 'separator',
|
|
237
127
|
'[aria-orientation]': 'orientation()',
|
|
238
128
|
'[class]': 'hostClasses()',
|
|
239
|
-
}, template: "<span class=\"tls-divider-line tls-divider-line--start\"></span>\n<div class=\"tls-divider-content\">\n <ng-content></ng-content>\n</div>\n<span class=\"tls-divider-line tls-divider-line--end\"></span>\n"
|
|
129
|
+
}, template: "<span class=\"tls-divider-line tls-divider-line--start\"></span>\n<div class=\"tls-divider-content\">\n <ng-content></ng-content>\n</div>\n<span class=\"tls-divider-line tls-divider-line--end\"></span>\n" }]
|
|
240
130
|
}], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], flush: [{ type: i0.Input, args: [{ isSignal: true, alias: "flush", required: false }] }] } });
|
|
241
131
|
|
|
242
132
|
const DEFAULT_FORM_ITEM_ERROR_MESSAGES = {
|
|
@@ -347,7 +237,7 @@ class FormItem {
|
|
|
347
237
|
isRequired = computed(() => {
|
|
348
238
|
return Boolean(this.control()?.required());
|
|
349
239
|
}, ...(ngDevMode ? [{ debugName: "isRequired" }] : []));
|
|
350
|
-
|
|
240
|
+
hostClasses = computed(() => {
|
|
351
241
|
const className = 'tls-form-item';
|
|
352
242
|
const array = [className];
|
|
353
243
|
if (this.isInvalid())
|
|
@@ -357,7 +247,7 @@ class FormItem {
|
|
|
357
247
|
if (this.reserveErrorSpace())
|
|
358
248
|
array.push(`${className}--error-space-reserved`);
|
|
359
249
|
return array;
|
|
360
|
-
}, ...(ngDevMode ? [{ debugName: "
|
|
250
|
+
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : []));
|
|
361
251
|
errorMessages = computed(() => {
|
|
362
252
|
const errors = this.control()?.errors();
|
|
363
253
|
if (errors)
|
|
@@ -383,11 +273,11 @@ class FormItem {
|
|
|
383
273
|
return array;
|
|
384
274
|
}
|
|
385
275
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: FormItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
386
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: FormItem, isStandalone: true, selector: "tls-form-item", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, reserveErrorSpace: { classPropertyName: "reserveErrorSpace", publicName: "reserveErrorSpace", isSignal: true, isRequired: false, transformFunction: null }, displayErrors: { classPropertyName: "displayErrors", publicName: "displayErrors", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "
|
|
276
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: FormItem, isStandalone: true, selector: "tls-form-item", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, reserveErrorSpace: { classPropertyName: "reserveErrorSpace", publicName: "reserveErrorSpace", isSignal: true, isRequired: false, transformFunction: null }, displayErrors: { classPropertyName: "displayErrors", publicName: "displayErrors", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()" } }, queries: [{ propertyName: "control", first: true, predicate: FORM_CONTROL, descendants: true, isSignal: true }], ngImport: i0, template: "<label for=\"\" class=\"form-item-label\">\n <span class=\"form-item-label__text\">{{ label() }}</span>\n <span class=\"form-item-label__required\">*</span>\n</label>\n<div class=\"form-item-control\">\n <ng-content></ng-content>\n</div>\n@if (displayErrors()) {\n <small class=\"form-item-error\">\n @if (isInvalid()) {\n <span class=\"form-item-error__text\">\n {{ firstErrorMessage() }}\n </span>\n }\n </small>\n}\n" });
|
|
387
277
|
}
|
|
388
278
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: FormItem, decorators: [{
|
|
389
279
|
type: Component,
|
|
390
|
-
args: [{ selector: 'tls-form-item', imports: [], host: { '[class]': '
|
|
280
|
+
args: [{ selector: 'tls-form-item', imports: [], host: { '[class]': 'hostClasses()' }, template: "<label for=\"\" class=\"form-item-label\">\n <span class=\"form-item-label__text\">{{ label() }}</span>\n <span class=\"form-item-label__required\">*</span>\n</label>\n<div class=\"form-item-control\">\n <ng-content></ng-content>\n</div>\n@if (displayErrors()) {\n <small class=\"form-item-error\">\n @if (isInvalid()) {\n <span class=\"form-item-error__text\">\n {{ firstErrorMessage() }}\n </span>\n }\n </small>\n}\n" }]
|
|
391
281
|
}], propDecorators: { control: [{ type: i0.ContentChild, args: [i0.forwardRef(() => FORM_CONTROL), { isSignal: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], reserveErrorSpace: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveErrorSpace", required: false }] }], displayErrors: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayErrors", required: false }] }] } });
|
|
392
282
|
|
|
393
283
|
const DEFAULT_CHECKBOX_CONFIG = {};
|
|
@@ -403,13 +293,13 @@ class Checkbox extends CheckboxFormControl {
|
|
|
403
293
|
checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : []));
|
|
404
294
|
inputId = input(...(ngDevMode ? [undefined, { debugName: "inputId" }] : []));
|
|
405
295
|
tabindex = input(0, ...(ngDevMode ? [{ debugName: "tabindex" }] : []));
|
|
406
|
-
|
|
296
|
+
hostClasses = computed(() => {
|
|
407
297
|
const className = this.CLASS_NAME;
|
|
408
298
|
const array = [className];
|
|
409
299
|
if (this.indeterminate())
|
|
410
300
|
array.push(`${className}--indeterminate`);
|
|
411
301
|
return array.concat(this.controlClasses());
|
|
412
|
-
}, ...(ngDevMode ? [{ debugName: "
|
|
302
|
+
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : []));
|
|
413
303
|
// Protected methods
|
|
414
304
|
toggle() {
|
|
415
305
|
if (this.notInteractive())
|
|
@@ -421,15 +311,15 @@ class Checkbox extends CheckboxFormControl {
|
|
|
421
311
|
this.toggle();
|
|
422
312
|
}
|
|
423
313
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Checkbox, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
424
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: Checkbox, isStandalone: true, selector: "tls-checkbox", inputs: { indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { indeterminate: "indeterminateChange", checked: "checkedChange" }, host: { attributes: { "role": "checkbox" }, properties: { "class": "
|
|
314
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: Checkbox, isStandalone: true, selector: "tls-checkbox", inputs: { indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { indeterminate: "indeterminateChange", checked: "checkedChange" }, host: { attributes: { "role": "checkbox" }, properties: { "class": "hostClasses()", "tabindex": "-1" } }, usesInheritance: true, ngImport: i0, template: "<input\n type=\"checkbox\"\n class=\"tls-checkbox-input\"\n [id]=\"inputId()\"\n [name]=\"name()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [checked]=\"checked()\"\n (click)=\"toggle()\"\n (blur)=\"touched.set(true)\"\n (keydown.space)=\"onKeyboardToggle($event)\"\n (keydown.enter)=\"onKeyboardToggle($event)\"\n/>\n<div class=\"tls-checkbox-icon\">\n @if (indeterminate()) {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"20px\"\n viewBox=\"0 -960 960 960\"\n width=\"20px\"\n fill=\"currentColor\"\n >\n <path d=\"M288-444v-72h384v72H288Z\" />\n </svg>\n } @else {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"20px\"\n viewBox=\"0 -960 960 960\"\n width=\"20px\"\n fill=\"currentColor\"\n >\n <path d=\"M400-301 240-461l51-51 109 109 269-269 51 51-320 320Z\" />\n </svg>\n }\n</div>\n" });
|
|
425
315
|
}
|
|
426
316
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Checkbox, decorators: [{
|
|
427
317
|
type: Component,
|
|
428
318
|
args: [{ selector: 'tls-checkbox', imports: [], host: {
|
|
429
319
|
role: 'checkbox',
|
|
430
|
-
'[class]': '
|
|
320
|
+
'[class]': 'hostClasses()',
|
|
431
321
|
'[tabindex]': '-1',
|
|
432
|
-
}, template: "<input\n type=\"checkbox\"\n class=\"tls-checkbox-input\"\n [id]=\"inputId()\"\n [name]=\"name()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [checked]=\"checked()\"\n (click)=\"toggle()\"\n (blur)=\"touched.set(true)\"\n (keydown.space)=\"onKeyboardToggle($event)\"\n (keydown.enter)=\"onKeyboardToggle($event)\"\n/>\n<div class=\"tls-checkbox-icon\">\n @if (indeterminate()) {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"20px\"\n viewBox=\"0 -960 960 960\"\n width=\"20px\"\n fill=\"currentColor\"\n >\n <path d=\"M288-444v-72h384v72H288Z\" />\n </svg>\n } @else {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"20px\"\n viewBox=\"0 -960 960 960\"\n width=\"20px\"\n fill=\"currentColor\"\n >\n <path d=\"M400-301 240-461l51-51 109 109 269-269 51 51-320 320Z\" />\n </svg>\n }\n</div>\n"
|
|
322
|
+
}, template: "<input\n type=\"checkbox\"\n class=\"tls-checkbox-input\"\n [id]=\"inputId()\"\n [name]=\"name()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [checked]=\"checked()\"\n (click)=\"toggle()\"\n (blur)=\"touched.set(true)\"\n (keydown.space)=\"onKeyboardToggle($event)\"\n (keydown.enter)=\"onKeyboardToggle($event)\"\n/>\n<div class=\"tls-checkbox-icon\">\n @if (indeterminate()) {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"20px\"\n viewBox=\"0 -960 960 960\"\n width=\"20px\"\n fill=\"currentColor\"\n >\n <path d=\"M288-444v-72h384v72H288Z\" />\n </svg>\n } @else {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"20px\"\n viewBox=\"0 -960 960 960\"\n width=\"20px\"\n fill=\"currentColor\"\n >\n <path d=\"M400-301 240-461l51-51 109 109 269-269 51 51-320 320Z\" />\n </svg>\n }\n</div>\n" }]
|
|
433
323
|
}], propDecorators: { indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }, { type: i0.Output, args: ["indeterminateChange"] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }] } });
|
|
434
324
|
|
|
435
325
|
const DEFAULT_INPUT_CONFIG = {
|
|
@@ -479,23 +369,23 @@ class InputDirective {
|
|
|
479
369
|
_config = inject(INPUT_CONFIG);
|
|
480
370
|
size = input(this._config.size, ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
481
371
|
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : {}), transform: booleanAttribute });
|
|
482
|
-
|
|
372
|
+
hostClasses = computed(() => {
|
|
483
373
|
const className = 'tls-form-control';
|
|
484
374
|
const array = [className];
|
|
485
375
|
array.push(`${className}--${this.size()}`);
|
|
486
376
|
if (this.fluid())
|
|
487
377
|
array.push(`${className}--fluid`);
|
|
488
378
|
return array;
|
|
489
|
-
}, ...(ngDevMode ? [{ debugName: "
|
|
379
|
+
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : []));
|
|
490
380
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
491
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.1", type: InputDirective, isStandalone: true, selector: "[tlsInput]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "
|
|
381
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.1", type: InputDirective, isStandalone: true, selector: "[tlsInput]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()" } }, ngImport: i0 });
|
|
492
382
|
}
|
|
493
383
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InputDirective, decorators: [{
|
|
494
384
|
type: Directive,
|
|
495
385
|
args: [{
|
|
496
386
|
selector: '[tlsInput]',
|
|
497
387
|
host: {
|
|
498
|
-
'[class]': '
|
|
388
|
+
'[class]': 'hostClasses()',
|
|
499
389
|
},
|
|
500
390
|
}]
|
|
501
391
|
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }] } });
|
|
@@ -518,14 +408,14 @@ class Password extends ValueFormControl {
|
|
|
518
408
|
placeholder = input(this._config.placeholder, ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
519
409
|
size = input(this._config.size, ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
520
410
|
fluid = input(this._config.fluid, { ...(ngDevMode ? { debugName: "fluid" } : {}), transform: booleanAttribute });
|
|
521
|
-
|
|
411
|
+
hostClasses = computed(() => {
|
|
522
412
|
const className = 'tls-form-control-group';
|
|
523
413
|
const array = [className];
|
|
524
414
|
array.push(`${className}--${this.size()}`);
|
|
525
415
|
if (this.fluid())
|
|
526
416
|
array.push(`${className}--fluid`);
|
|
527
417
|
return array;
|
|
528
|
-
}, ...(ngDevMode ? [{ debugName: "
|
|
418
|
+
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : []));
|
|
529
419
|
type = computed(() => (this.visible() ? 'text' : 'password'), ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
530
420
|
// Protected methods
|
|
531
421
|
onInput(event) {
|
|
@@ -538,13 +428,13 @@ class Password extends ValueFormControl {
|
|
|
538
428
|
this.visible.update(prev => !prev);
|
|
539
429
|
}
|
|
540
430
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Password, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
541
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.1", type: Password, isStandalone: true, selector: "tls-password", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", visible: "visibleChange" }, host: { properties: { "class": "
|
|
431
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.1", type: Password, isStandalone: true, selector: "tls-password", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", visible: "visibleChange" }, host: { properties: { "class": "hostClasses()" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Password) }], usesInheritance: true, ngImport: i0, template: "<input\n [type]=\"type()\"\n [name]=\"name()\"\n [class]=\"controlClasses()\"\n [attr.id]=\"inputId()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [value]=\"value()\"\n (input)=\"onInput($event)\"\n (blur)=\"touched.set(true)\"\n/>\n<button class=\"tls-password-toggle tls-form-control-addon\" type=\"button\" (click)=\"toggle()\">\n <span class=\"tls-password-toggle__item\" [class.tls-password-toggle__item--hidden]=\"visible()\">\n <span class=\"text-label-md\">Show</span>\n </span>\n <span class=\"tls-password-toggle__item\" [class.tls-password-toggle__item--hidden]=\"!visible()\">\n <span class=\"text-label-md\">Hide</span>\n </span>\n</button>\n", styles: [":host{display:inline-flex}:host .tls-password-toggle{display:grid;align-items:center}:host .tls-password-toggle__item{grid-area:1/1;text-align:center}:host .tls-password-toggle__item--hidden{visibility:hidden}\n"] });
|
|
542
432
|
}
|
|
543
433
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Password, decorators: [{
|
|
544
434
|
type: Component,
|
|
545
435
|
args: [{ selector: 'tls-password', host: {
|
|
546
|
-
'[class]': '
|
|
547
|
-
}, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Password) }], template: "<input\n [type]=\"type()\"\n [name]=\"name()\"\n [class]=\"controlClasses()\"\n [attr.id]=\"inputId()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [value]=\"value()\"\n (input)=\"onInput($event)\"\n (blur)=\"touched.set(true)\"\n/>\n<button class=\"tls-password-toggle tls-form-control-addon\" (click)=\"toggle()\">\n <span class=\"tls-password-toggle__item\" [class.tls-password-toggle__item--hidden]=\"visible()\">\n <span class=\"text-label-md\">Show</span>\n </span>\n <span class=\"tls-password-toggle__item\" [class.tls-password-toggle__item--hidden]=\"!visible()\">\n <span class=\"text-label-md\">Hide</span>\n </span>\n</button>\n", styles: [":host{display:inline-flex}:host .tls-password-toggle{display:grid;align-items:center}:host .tls-password-
|
|
436
|
+
'[class]': 'hostClasses()',
|
|
437
|
+
}, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Password) }], template: "<input\n [type]=\"type()\"\n [name]=\"name()\"\n [class]=\"controlClasses()\"\n [attr.id]=\"inputId()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [value]=\"value()\"\n (input)=\"onInput($event)\"\n (blur)=\"touched.set(true)\"\n/>\n<button class=\"tls-password-toggle tls-form-control-addon\" type=\"button\" (click)=\"toggle()\">\n <span class=\"tls-password-toggle__item\" [class.tls-password-toggle__item--hidden]=\"visible()\">\n <span class=\"text-label-md\">Show</span>\n </span>\n <span class=\"tls-password-toggle__item\" [class.tls-password-toggle__item--hidden]=\"!visible()\">\n <span class=\"text-label-md\">Hide</span>\n </span>\n</button>\n", styles: [":host{display:inline-flex}:host .tls-password-toggle{display:grid;align-items:center}:host .tls-password-toggle__item{grid-area:1/1;text-align:center}:host .tls-password-toggle__item--hidden{visibility:hidden}\n"] }]
|
|
548
438
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }, { type: i0.Output, args: ["visibleChange"] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }] } });
|
|
549
439
|
|
|
550
440
|
const DEFAULT_RADIO_BUTTON_CONFIG = {};
|
|
@@ -561,13 +451,13 @@ class RadioButton extends ValueFormControl {
|
|
|
561
451
|
inputId = input(...(ngDevMode ? [undefined, { debugName: "inputId" }] : []));
|
|
562
452
|
tabindex = input(0, ...(ngDevMode ? [{ debugName: "tabindex" }] : []));
|
|
563
453
|
checked = computed(() => this.radioValue() === this.value(), ...(ngDevMode ? [{ debugName: "checked" }] : []));
|
|
564
|
-
|
|
454
|
+
hostClasses = computed(() => {
|
|
565
455
|
const className = this.CLASS_NAME;
|
|
566
456
|
const array = [className];
|
|
567
457
|
if (this.checked())
|
|
568
458
|
array.push(`${className}--checked`);
|
|
569
459
|
return array.concat(this.controlClasses());
|
|
570
|
-
}, ...(ngDevMode ? [{ debugName: "
|
|
460
|
+
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : []));
|
|
571
461
|
// Protected methods
|
|
572
462
|
check() {
|
|
573
463
|
if (this.notInteractive())
|
|
@@ -575,14 +465,14 @@ class RadioButton extends ValueFormControl {
|
|
|
575
465
|
this.value.set(this.radioValue());
|
|
576
466
|
}
|
|
577
467
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: RadioButton, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
578
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.1", type: RadioButton, isStandalone: true, selector: "tls-radio-button", inputs: { radioValue: { classPropertyName: "radioValue", publicName: "radioValue", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class": "
|
|
468
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.1", type: RadioButton, isStandalone: true, selector: "tls-radio-button", inputs: { radioValue: { classPropertyName: "radioValue", publicName: "radioValue", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class": "hostClasses()", "tabindex": "-1" } }, usesInheritance: true, ngImport: i0, template: "<input\n type=\"radio\"\n class=\"tls-radio-button-input\"\n [id]=\"inputId()\"\n [name]=\"name()\"\n [tabindex]=\"tabindex()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [checked]=\"checked()\"\n [value]=\"radioValue()\"\n (change)=\"check()\"\n (blur)=\"touched.set(true)\"\n/>\n<div class=\"tls-radio-button-circle\"></div>\n" });
|
|
579
469
|
}
|
|
580
470
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: RadioButton, decorators: [{
|
|
581
471
|
type: Component,
|
|
582
472
|
args: [{ selector: 'tls-radio-button', imports: [], host: {
|
|
583
|
-
'[class]': '
|
|
473
|
+
'[class]': 'hostClasses()',
|
|
584
474
|
'[tabindex]': '-1',
|
|
585
|
-
}, template: "<input\n type=\"radio\"\n class=\"tls-radio-button-input\"\n [id]=\"inputId()\"\n [name]=\"name()\"\n [tabindex]=\"tabindex()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [checked]=\"checked()\"\n [value]=\"radioValue()\"\n (change)=\"check()\"\n (blur)=\"touched.set(true)\"\n/>\n<div class=\"tls-radio-button-circle\"></div>\n"
|
|
475
|
+
}, template: "<input\n type=\"radio\"\n class=\"tls-radio-button-input\"\n [id]=\"inputId()\"\n [name]=\"name()\"\n [tabindex]=\"tabindex()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [checked]=\"checked()\"\n [value]=\"radioValue()\"\n (change)=\"check()\"\n (blur)=\"touched.set(true)\"\n/>\n<div class=\"tls-radio-button-circle\"></div>\n" }]
|
|
586
476
|
}], propDecorators: { radioValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "radioValue", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }] } });
|
|
587
477
|
|
|
588
478
|
const DEFAULT_SWITCH_CONFIG = {
|
|
@@ -600,12 +490,12 @@ class Switch extends CheckboxFormControl {
|
|
|
600
490
|
inputId = input(...(ngDevMode ? [undefined, { debugName: "inputId" }] : []));
|
|
601
491
|
color = input(this._config.color, ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
602
492
|
tabindex = input(0, ...(ngDevMode ? [{ debugName: "tabindex" }] : []));
|
|
603
|
-
|
|
493
|
+
hostClasses = computed(() => {
|
|
604
494
|
const className = this.CLASS_NAME;
|
|
605
495
|
const array = [className];
|
|
606
496
|
array.push(`${className}--${this.color()}`);
|
|
607
497
|
return array.concat(this.controlClasses());
|
|
608
|
-
}, ...(ngDevMode ? [{ debugName: "
|
|
498
|
+
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : []));
|
|
609
499
|
// Protected methods
|
|
610
500
|
toggle() {
|
|
611
501
|
if (this.notInteractive())
|
|
@@ -617,13 +507,13 @@ class Switch extends CheckboxFormControl {
|
|
|
617
507
|
this.toggle();
|
|
618
508
|
}
|
|
619
509
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Switch, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
620
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.1", type: Switch, isStandalone: true, selector: "tls-switch", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, host: { attributes: { "role": "switch" }, listeners: { "click": "toggle()", "blur": "touched.set(true)", "keydown.space": "onKeyboardToggle($event)", "keydown.enter": "onKeyboardToggle($event)" }, properties: { "class": "
|
|
510
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.1", type: Switch, isStandalone: true, selector: "tls-switch", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, host: { attributes: { "role": "switch" }, listeners: { "click": "toggle()", "blur": "touched.set(true)", "keydown.space": "onKeyboardToggle($event)", "keydown.enter": "onKeyboardToggle($event)" }, properties: { "class": "hostClasses()", "tabindex": "disabled() ? -1 : tabindex()", "attr.aria-checked": "checked()", "attr.aria-disabled": "disabled()", "attr.aria-readonly": "readonly()" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Switch) }], usesInheritance: true, ngImport: i0, template: "<input\n type=\"checkbox\"\n class=\"tls-switch-input\"\n [id]=\"inputId()\"\n [name]=\"name()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [checked]=\"checked()\"\n/>\n<div class=\"tls-switch-handle\"></div>\n" });
|
|
621
511
|
}
|
|
622
512
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Switch, decorators: [{
|
|
623
513
|
type: Component,
|
|
624
514
|
args: [{ selector: 'tls-switch', host: {
|
|
625
515
|
role: 'switch',
|
|
626
|
-
'[class]': '
|
|
516
|
+
'[class]': 'hostClasses()',
|
|
627
517
|
'[tabindex]': 'disabled() ? -1 : tabindex()',
|
|
628
518
|
'[attr.aria-checked]': 'checked()',
|
|
629
519
|
'[attr.aria-disabled]': 'disabled()',
|
|
@@ -632,9 +522,98 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
632
522
|
'(blur)': 'touched.set(true)',
|
|
633
523
|
'(keydown.space)': 'onKeyboardToggle($event)',
|
|
634
524
|
'(keydown.enter)': 'onKeyboardToggle($event)',
|
|
635
|
-
}, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Switch) }], template: "<input\n type=\"checkbox\"\n class=\"tls-switch-input\"\n [id]=\"inputId()\"\n [name]=\"name()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [checked]=\"checked()\"\n/>\n<div class=\"tls-switch-handle\"></div>\n"
|
|
525
|
+
}, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Switch) }], template: "<input\n type=\"checkbox\"\n class=\"tls-switch-input\"\n [id]=\"inputId()\"\n [name]=\"name()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [checked]=\"checked()\"\n/>\n<div class=\"tls-switch-handle\"></div>\n" }]
|
|
636
526
|
}], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }] } });
|
|
637
527
|
|
|
528
|
+
class IconService {
|
|
529
|
+
_http = inject(HttpClient);
|
|
530
|
+
_sanitizer = inject(DomSanitizer);
|
|
531
|
+
_cache = new Map();
|
|
532
|
+
getSvgContent(url, allowedSources) {
|
|
533
|
+
if (allowedSources.length > 0 && !this._isUrlAllowed(url, allowedSources)) {
|
|
534
|
+
return throwError(() => new Error('SVG URL not from trusted source'));
|
|
535
|
+
}
|
|
536
|
+
const cache = this._cache.get(url);
|
|
537
|
+
if (!cache) {
|
|
538
|
+
const svg$ = this._http.get(url, { responseType: 'text' }).pipe(map(svg => this._sanitizeSvg(svg)), shareReplay(1));
|
|
539
|
+
this._cache.set(url, svg$);
|
|
540
|
+
return svg$;
|
|
541
|
+
}
|
|
542
|
+
return cache;
|
|
543
|
+
}
|
|
544
|
+
// Private methods
|
|
545
|
+
_isUrlAllowed(url, allowedSource) {
|
|
546
|
+
return allowedSource.some(source => url.startsWith(source));
|
|
547
|
+
}
|
|
548
|
+
_sanitizeSvg(svg) {
|
|
549
|
+
const safeSvg = this._makeSafe(svg);
|
|
550
|
+
return this._sanitizer.bypassSecurityTrustHtml(safeSvg);
|
|
551
|
+
}
|
|
552
|
+
_makeSafe(svg) {
|
|
553
|
+
return (svg
|
|
554
|
+
// Remove script tags
|
|
555
|
+
.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '')
|
|
556
|
+
// Remove event handlers (onclick, onload, onmouseover, etc.)
|
|
557
|
+
.replace(/on\w+\s*=\s*["'][^"']*["']/gi, '')
|
|
558
|
+
// Remove external xlink:href (keep internal references starting with #)
|
|
559
|
+
.replace(/xlink:href\s*=\s*["'](?!#)[^"']*["']/gi, '')
|
|
560
|
+
// Remove external href in <use>, <image>, <a> tags (keep internal #refs)
|
|
561
|
+
.replace(/href\s*=\s*["'](?!#)[^"']*["']/gi, '')
|
|
562
|
+
// Remove data URIs with HTML content
|
|
563
|
+
.replace(/href\s*=\s*["']data:text\/html[^"']*["']/gi, '')
|
|
564
|
+
.replace(/src\s*=\s*["']data:text\/html[^"']*["']/gi, '')
|
|
565
|
+
// Remove javascript: protocol
|
|
566
|
+
.replace(/javascript:/gi, '')
|
|
567
|
+
// Remove import statements in style
|
|
568
|
+
.replace(/@import/gi, ''));
|
|
569
|
+
}
|
|
570
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: IconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
571
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: IconService, providedIn: 'root' });
|
|
572
|
+
}
|
|
573
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: IconService, decorators: [{
|
|
574
|
+
type: Injectable,
|
|
575
|
+
args: [{ providedIn: 'root' }]
|
|
576
|
+
}] });
|
|
577
|
+
|
|
578
|
+
const DEFAULT_ICON_CONFIG = {
|
|
579
|
+
allowedSources: [],
|
|
580
|
+
};
|
|
581
|
+
|
|
582
|
+
const ICON_CONFIG = new InjectionToken('ICON_CONFIG', {
|
|
583
|
+
factory: () => DEFAULT_ICON_CONFIG,
|
|
584
|
+
});
|
|
585
|
+
|
|
586
|
+
class Icon {
|
|
587
|
+
// Injections
|
|
588
|
+
_iconService = inject(IconService);
|
|
589
|
+
_config = inject(ICON_CONFIG);
|
|
590
|
+
// Inputs
|
|
591
|
+
iconSrc = input.required(...(ngDevMode ? [{ debugName: "iconSrc" }] : []));
|
|
592
|
+
alt = input('', ...(ngDevMode ? [{ debugName: "alt" }] : []));
|
|
593
|
+
allowedSources = input(this._config.allowedSources, ...(ngDevMode ? [{ debugName: "allowedSources" }] : []));
|
|
594
|
+
isSvg = computed(() => {
|
|
595
|
+
return this.iconSrc().endsWith('.svg');
|
|
596
|
+
}, ...(ngDevMode ? [{ debugName: "isSvg" }] : []));
|
|
597
|
+
_svgContentResource = rxResource({
|
|
598
|
+
defaultValue: '',
|
|
599
|
+
params: () => ({
|
|
600
|
+
iconSrc: this.iconSrc(),
|
|
601
|
+
allowedSources: this.allowedSources(),
|
|
602
|
+
}),
|
|
603
|
+
stream: params => this._iconService.getSvgContent(params.params.iconSrc, params.params.allowedSources),
|
|
604
|
+
});
|
|
605
|
+
// Accessors
|
|
606
|
+
get svgContent() {
|
|
607
|
+
return this._svgContentResource.value.asReadonly();
|
|
608
|
+
}
|
|
609
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Icon, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
610
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: Icon, isStandalone: true, selector: "tls-icon", inputs: { iconSrc: { classPropertyName: "iconSrc", publicName: "iconSrc", isSignal: true, isRequired: true, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, allowedSources: { classPropertyName: "allowedSources", publicName: "allowedSources", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "tls-icon" }, ngImport: i0, template: "@if (isSvg() && iconSrc()) {\n <span [innerHTML]=\"svgContent()\" class=\"tls-svg-icon\"></span>\n} @else if (iconSrc()) {\n <img [src]=\"iconSrc()\" [alt]=\"alt()\" class=\"tls-img-icon\" />\n} @else {\n {{ iconSrc() }}\n}\n" });
|
|
611
|
+
}
|
|
612
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Icon, decorators: [{
|
|
613
|
+
type: Component,
|
|
614
|
+
args: [{ selector: 'tls-icon', imports: [], host: { class: 'tls-icon' }, template: "@if (isSvg() && iconSrc()) {\n <span [innerHTML]=\"svgContent()\" class=\"tls-svg-icon\"></span>\n} @else if (iconSrc()) {\n <img [src]=\"iconSrc()\" [alt]=\"alt()\" class=\"tls-img-icon\" />\n} @else {\n {{ iconSrc() }}\n}\n" }]
|
|
615
|
+
}], propDecorators: { iconSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSrc", required: true }] }], alt: [{ type: i0.Input, args: [{ isSignal: true, alias: "alt", required: false }] }], allowedSources: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowedSources", required: false }] }] } });
|
|
616
|
+
|
|
638
617
|
const LIGHT_THEME_CLASS = 'tls-light';
|
|
639
618
|
const DARK_THEME_CLASS = 'tls-dark';
|
|
640
619
|
|