@thalassic/ui 22.17.0 → 22.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15,7 +15,6 @@ import { ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
|
|
|
15
15
|
import { filter as filter$1 } from 'rxjs/operators';
|
|
16
16
|
import { CdkDialogContainer, DialogRef as DialogRef$1, Dialog as Dialog$1 } from '@angular/cdk/dialog';
|
|
17
17
|
import { Directionality } from '@angular/cdk/bidi';
|
|
18
|
-
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
|
|
19
18
|
import { Menu as Menu$1, MenuItem } from '@angular/aria/menu';
|
|
20
19
|
import * as i1 from '@angular/aria/tabs';
|
|
21
20
|
import { TabPanel, TabList, Tab as Tab$1, Tabs as Tabs$1, TabContent } from '@angular/aria/tabs';
|
|
@@ -457,6 +456,9 @@ const OVERLAY_POSITION_MAP = {
|
|
|
457
456
|
},
|
|
458
457
|
};
|
|
459
458
|
|
|
459
|
+
/** Every step of the theme radius scale, used to tell a token apart from a raw CSS length. */
|
|
460
|
+
const RADIUS_TOKENS = ['sm', 'md', 'lg', 'xl', '2xl', '3xl'];
|
|
461
|
+
|
|
460
462
|
const buildOverlayPositions = (position, offset) => {
|
|
461
463
|
const preferred = OVERLAY_POSITION_MAP[position];
|
|
462
464
|
const rest = Object.values(OVERLAY_POSITION_MAP).filter(p => p !== preferred);
|
|
@@ -7130,23 +7132,25 @@ class Textarea extends ValueFormControl {
|
|
|
7130
7132
|
array.push(`${this.CLASS_NAME}--${this.size()}`);
|
|
7131
7133
|
if (this.fluid())
|
|
7132
7134
|
array.push(`${this.CLASS_NAME}--fluid`);
|
|
7135
|
+
if (this.autosize()) {
|
|
7136
|
+
array.push(`${this.CLASS_NAME}--autosize`);
|
|
7137
|
+
if (this.maxRows() > 0)
|
|
7138
|
+
array.push(`${this.CLASS_NAME}--autosize-capped`);
|
|
7139
|
+
}
|
|
7133
7140
|
return array.concat(this.controlClasses());
|
|
7134
7141
|
}, /* @ts-ignore */
|
|
7135
7142
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
7136
|
-
// Autosize owns the height, so the manual resize handle is suppressed.
|
|
7137
|
-
effectiveResize = computed(() => this.autosize() ? 'none' : this.resize(), /* @ts-ignore */
|
|
7138
|
-
...(ngDevMode ? [{ debugName: "effectiveResize" }] : /* istanbul ignore next */ []));
|
|
7139
7143
|
// Protected methods
|
|
7140
7144
|
onInput(event) {
|
|
7141
7145
|
const target = event.target;
|
|
7142
7146
|
this.value.set(target.value);
|
|
7143
7147
|
}
|
|
7144
7148
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Textarea, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7145
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Textarea, isStandalone: true, selector: "tls-textarea", inputs: { value: { classPropertyName: "value", publicName: "value", 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 }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, resize: { classPropertyName: "resize", publicName: "resize", isSignal: true, isRequired: false, transformFunction: null }, autosize: { classPropertyName: "autosize", publicName: "autosize", isSignal: true, isRequired: false, transformFunction: null }, maxRows: { classPropertyName: "maxRows", publicName: "maxRows", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { classAttribute: "tls-textarea" }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Textarea) }], usesInheritance: true, ngImport: i0, template: "<textarea\n [name]=\"name()\"\n [class]=\"classes()\"\n [attr.id]=\"effectiveInputId()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-busy]=\"pending() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [rows]=\"rows()\"\n [style
|
|
7149
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Textarea, isStandalone: true, selector: "tls-textarea", inputs: { value: { classPropertyName: "value", publicName: "value", 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 }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, resize: { classPropertyName: "resize", publicName: "resize", isSignal: true, isRequired: false, transformFunction: null }, autosize: { classPropertyName: "autosize", publicName: "autosize", isSignal: true, isRequired: false, transformFunction: null }, maxRows: { classPropertyName: "maxRows", publicName: "maxRows", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { classAttribute: "tls-textarea" }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Textarea) }], usesInheritance: true, ngImport: i0, template: "<textarea\n [name]=\"name()\"\n [class]=\"classes()\"\n [attr.id]=\"effectiveInputId()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-busy]=\"pending() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [rows]=\"rows()\"\n [style.--tls-textarea-rows]=\"rows()\"\n [style.--tls-textarea-max-rows]=\"maxRows()\"\n [style.--tls-textarea-resize]=\"resize()\"\n [value]=\"value()\"\n (input)=\"onInput($event)\"\n (blur)=\"touched.set(true)\"\n></textarea>\n@if (pending()) {\n <tls-loader class=\"tls-form-control__spinner\" size=\"xs\" aria-hidden=\"true\" />\n}\n", styles: [":host{--tls-textarea-width: 200px;position:relative;display:inline-block;width:var(--tls-textarea-width)}:host .tls-form-control{width:100%}:host .tls-form-control__spinner{position:absolute;inset-block-start:var(--spacing-2);inset-inline-end:var(--spacing-3);pointer-events:none}:host .tls-form-control--pending{padding-inline-end:var(--spacing-8)}:host:has(.tls-form-control--fluid){--tls-textarea-width: 100%}\n"], dependencies: [{ kind: "component", type: Loader, selector: "tls-loader", inputs: ["size", "width", "widthRatio", "ariaLabel"] }] });
|
|
7146
7150
|
}
|
|
7147
7151
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Textarea, decorators: [{
|
|
7148
7152
|
type: Component,
|
|
7149
|
-
args: [{ selector: 'tls-textarea', imports: [
|
|
7153
|
+
args: [{ selector: 'tls-textarea', imports: [Loader], host: { class: 'tls-textarea' }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => Textarea) }], template: "<textarea\n [name]=\"name()\"\n [class]=\"classes()\"\n [attr.id]=\"effectiveInputId()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-busy]=\"pending() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [rows]=\"rows()\"\n [style.--tls-textarea-rows]=\"rows()\"\n [style.--tls-textarea-max-rows]=\"maxRows()\"\n [style.--tls-textarea-resize]=\"resize()\"\n [value]=\"value()\"\n (input)=\"onInput($event)\"\n (blur)=\"touched.set(true)\"\n></textarea>\n@if (pending()) {\n <tls-loader class=\"tls-form-control__spinner\" size=\"xs\" aria-hidden=\"true\" />\n}\n", styles: [":host{--tls-textarea-width: 200px;position:relative;display:inline-block;width:var(--tls-textarea-width)}:host .tls-form-control{width:100%}:host .tls-form-control__spinner{position:absolute;inset-block-start:var(--spacing-2);inset-inline-end:var(--spacing-3);pointer-events:none}:host .tls-form-control--pending{padding-inline-end:var(--spacing-8)}:host:has(.tls-form-control--fluid){--tls-textarea-width: 100%}\n"] }]
|
|
7150
7154
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], 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 }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], resize: [{ type: i0.Input, args: [{ isSignal: true, alias: "resize", required: false }] }], autosize: [{ type: i0.Input, args: [{ isSignal: true, alias: "autosize", required: false }] }], maxRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxRows", required: false }] }] } });
|
|
7151
7155
|
|
|
7152
7156
|
const DEFAULT_TOGGLE_BUTTON_CONFIG = {
|
|
@@ -8330,7 +8334,7 @@ class Skeleton {
|
|
|
8330
8334
|
return {
|
|
8331
8335
|
'--tls-skeleton-width': this._resolveDimension(width),
|
|
8332
8336
|
'--tls-skeleton-height': this._resolveDimension(height),
|
|
8333
|
-
'--tls-skeleton-radius': this.rounded() ? '50%' :
|
|
8337
|
+
'--tls-skeleton-radius': this.rounded() ? '50%' : this._resolveRadius(this.radius()),
|
|
8334
8338
|
'--tls-skeleton-duration': `${this.duration()}ms`,
|
|
8335
8339
|
};
|
|
8336
8340
|
}, /* @ts-ignore */
|
|
@@ -8343,6 +8347,13 @@ class Skeleton {
|
|
|
8343
8347
|
return value;
|
|
8344
8348
|
return `${value}px`;
|
|
8345
8349
|
}
|
|
8350
|
+
_resolveRadius(value) {
|
|
8351
|
+
if (typeof value === 'number')
|
|
8352
|
+
return `${value}px`;
|
|
8353
|
+
if (RADIUS_TOKENS.some(token => token === value))
|
|
8354
|
+
return `var(--radius-${value})`;
|
|
8355
|
+
return value;
|
|
8356
|
+
}
|
|
8346
8357
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Skeleton, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8347
8358
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", 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 });
|
|
8348
8359
|
}
|