@thalassic/ui 22.25.0 → 22.26.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.
|
@@ -12,13 +12,14 @@ import { AccordionGroup, AccordionTrigger, AccordionPanel, AccordionContent } fr
|
|
|
12
12
|
import { HttpClient } from '@angular/common/http';
|
|
13
13
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
14
14
|
import * as i1 from '@thalassic/core';
|
|
15
|
-
import { MOTION_ATTRIBUTE, SwipeDirective, MotionService, resolvePagingStep, resistPagingDrag, PanDirective, ViewportService, SWIPE_DEFAULT_MIN_VELOCITY, DRAG_DISMISS_RATIO, PAN_CONFIG, DRAG_DISMISS_POINTER_TYPES, DEFAULT_PAN_CONFIG,
|
|
15
|
+
import { MOTION_ATTRIBUTE, SwipeDirective, MotionService, resolvePagingStep, resistPagingDrag, PanDirective, ViewportService, SWIPE_DEFAULT_MIN_VELOCITY, DRAG_DISMISS_RATIO, PAN_CONFIG, DRAG_DISMISS_POINTER_TYPES, DEFAULT_PAN_CONFIG, deepMerge, HAPTIC_FEEDBACK } from '@thalassic/core';
|
|
16
16
|
import { Grid, GridRow, GridCell } from '@angular/aria/grid';
|
|
17
17
|
import { InputModalityDetector, ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
|
|
18
18
|
import { Directionality } from '@angular/cdk/bidi';
|
|
19
19
|
import { filter as filter$1 } from 'rxjs/operators';
|
|
20
20
|
import { CdkDialogContainer, DialogRef as DialogRef$1, Dialog as Dialog$1, DIALOG_DATA } from '@angular/cdk/dialog';
|
|
21
21
|
import { Menu as Menu$1, MenuItem } from '@angular/aria/menu';
|
|
22
|
+
import { FORM_FIELD } from '@angular/forms/signals';
|
|
22
23
|
import { Listbox, Option } from '@angular/aria/listbox';
|
|
23
24
|
import { coerceArray } from '@angular/cdk/coercion';
|
|
24
25
|
import * as i1$1 from '@angular/aria/tabs';
|
|
@@ -123,6 +124,11 @@ class FormControl {
|
|
|
123
124
|
...(ngDevMode ? [{ debugName: "formItemInputId" }] : /* istanbul ignore next */ []));
|
|
124
125
|
/** Whether this control has a single native labelable element that a `<label for>` can target. */
|
|
125
126
|
supportsLabelFor = false;
|
|
127
|
+
/**
|
|
128
|
+
* Whether every state of the control is itself an answer — on or off, chosen or not — so it can
|
|
129
|
+
* never be left unanswered, and an enclosing form item marks it neither optional nor otherwise.
|
|
130
|
+
*/
|
|
131
|
+
alwaysAnswered = false;
|
|
126
132
|
/** Combined `aria-describedby` value (consumer description + form-item hint and error), or null when empty. */
|
|
127
133
|
describedBy = computed(() => {
|
|
128
134
|
const ids = [];
|
|
@@ -273,6 +279,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
273
279
|
}] });
|
|
274
280
|
|
|
275
281
|
class CheckboxFormControl extends FormControl {
|
|
282
|
+
/** Unchecked is as much an answer as checked, so the control is never left unanswered. */
|
|
283
|
+
alwaysAnswered = true;
|
|
276
284
|
controlClasses = computed(() => {
|
|
277
285
|
const classes = this.baseControlClasses();
|
|
278
286
|
if (this.checked())
|
|
@@ -8218,6 +8226,12 @@ class FormItem {
|
|
|
8218
8226
|
_config = inject(FORM_ITEM_CONFIG);
|
|
8219
8227
|
control = contentChild(FORM_CONTROL, /* @ts-ignore */
|
|
8220
8228
|
...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
|
|
8229
|
+
/**
|
|
8230
|
+
* The signal-forms bindings among the projected content. A group can seat bound and unbound
|
|
8231
|
+
* controls side by side, so these are matched to the control by element rather than taken as
|
|
8232
|
+
* the control's own.
|
|
8233
|
+
*/
|
|
8234
|
+
_formFields = contentChildren(FORM_FIELD, { ...(ngDevMode ? { debugName: "_formFields" } : /* istanbul ignore next */ {}), descendants: true });
|
|
8221
8235
|
/**
|
|
8222
8236
|
* Content of the label, rendered inside the item's own `<label>` element so the `for` /
|
|
8223
8237
|
* `aria-labelledby` wiring is kept. Replaces the label text and the required / optional markers.
|
|
@@ -8254,6 +8268,7 @@ class FormItem {
|
|
|
8254
8268
|
...(ngDevMode ? [{ debugName: "displayErrors" }] : /* istanbul ignore next */ []));
|
|
8255
8269
|
showRequiredMarker = input(this._config.showRequiredMarker, /* @ts-ignore */
|
|
8256
8270
|
...(ngDevMode ? [{ debugName: "showRequiredMarker" }] : /* istanbul ignore next */ []));
|
|
8271
|
+
/** Text beside the label of a question that may be skipped; see `FormItemConfig.optionalText`. */
|
|
8257
8272
|
optionalText = input(this._config.optionalText, /* @ts-ignore */
|
|
8258
8273
|
...(ngDevMode ? [{ debugName: "optionalText" }] : /* istanbul ignore next */ []));
|
|
8259
8274
|
/**
|
|
@@ -8288,13 +8303,18 @@ class FormItem {
|
|
|
8288
8303
|
return this.showRequiredMarker() && control.required();
|
|
8289
8304
|
}, /* @ts-ignore */
|
|
8290
8305
|
...(ngDevMode ? [{ debugName: "showRequired" }] : /* istanbul ignore next */ []));
|
|
8306
|
+
/**
|
|
8307
|
+
* Whether the label carries the optional marker: only for a control that edits a form's field,
|
|
8308
|
+
* can be left unanswered, and is not required — a setting or a toggle has nothing to skip.
|
|
8309
|
+
*/
|
|
8291
8310
|
showOptional = computed(() => {
|
|
8292
8311
|
const control = this.control();
|
|
8293
|
-
if (!control)
|
|
8294
|
-
return false;
|
|
8295
|
-
if (!this.optionalText())
|
|
8312
|
+
if (!control || !this.optionalText() || control.alwaysAnswered)
|
|
8296
8313
|
return false;
|
|
8297
|
-
|
|
8314
|
+
// A control bound to a plain value is a setting, not a question to answer.
|
|
8315
|
+
const element = control.elementRef.nativeElement;
|
|
8316
|
+
const isFormField = this._formFields().some((formField) => formField.element === element);
|
|
8317
|
+
return isFormField && !control.required();
|
|
8298
8318
|
}, /* @ts-ignore */
|
|
8299
8319
|
...(ngDevMode ? [{ debugName: "showOptional" }] : /* istanbul ignore next */ []));
|
|
8300
8320
|
/** Whether a label is rendered, from either the `label` input or a custom label template. */
|
|
@@ -8403,12 +8423,29 @@ class FormItem {
|
|
|
8403
8423
|
return array;
|
|
8404
8424
|
}
|
|
8405
8425
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8406
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: FormItem, isStandalone: true, selector: "tls-form-item", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, spread: { classPropertyName: "spread", publicName: "spread", isSignal: true, isRequired: false, transformFunction: null }, reserveErrorSpace: { classPropertyName: "reserveErrorSpace", publicName: "reserveErrorSpace", isSignal: true, isRequired: false, transformFunction: null }, reserveLabelSpace: { classPropertyName: "reserveLabelSpace", publicName: "reserveLabelSpace", isSignal: true, isRequired: false, transformFunction: null }, displayErrors: { classPropertyName: "displayErrors", publicName: "displayErrors", isSignal: true, isRequired: false, transformFunction: null }, showRequiredMarker: { classPropertyName: "showRequiredMarker", publicName: "showRequiredMarker", isSignal: true, isRequired: false, transformFunction: null }, optionalText: { classPropertyName: "optionalText", publicName: "optionalText", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()" } }, queries: [{ propertyName: "control", first: true, predicate: FORM_CONTROL, descendants: true, isSignal: true }, { propertyName: "labelTemplate", first: true, predicate: ["labelTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"form-item-main\">\n @if (hasLabel() || reserveLabelSpace()) {\n <label class=\"form-item-label\" [id]=\"labelId\" [attr.for]=\"labelFor()\">\n @if (labelTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"labelContext()\" />\n } @else {\n <span class=\"form-item-label__text\">{{ label() }}</span>\n @if (showRequired()) {\n <span class=\"form-item-label__required\">*</span>\n } @else if (showOptional()) {\n <span class=\"form-item-label__optional\">{{ optionalText() }}</span>\n }\n }\n </label>\n }\n <div class=\"form-item-control\">\n <ng-content></ng-content>\n </div>\n</div>\n@if (reserveErrorSpace() || showError() || showHint() || hasCounter()) {\n <small class=\"form-item-footer\">\n @if (showError()) {\n <span class=\"form-item-error\">\n <span class=\"form-item-error__text\" [id]=\"errorId\">\n {{ firstErrorMessage() }}\n </span>\n </span>\n } @else if (showHint()) {\n <span class=\"form-item-hint\" [id]=\"hintId\">{{ hint() }}</span>\n }\n @if (hasCounter()) {\n <span\n class=\"form-item-counter\"\n [class.form-item-counter--over]=\"overLimit()\"\n >{{ characterCount() }}/{{ maxLength() }}</span>\n }\n </small>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
8426
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: FormItem, isStandalone: true, selector: "tls-form-item", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, spread: { classPropertyName: "spread", publicName: "spread", isSignal: true, isRequired: false, transformFunction: null }, reserveErrorSpace: { classPropertyName: "reserveErrorSpace", publicName: "reserveErrorSpace", isSignal: true, isRequired: false, transformFunction: null }, reserveLabelSpace: { classPropertyName: "reserveLabelSpace", publicName: "reserveLabelSpace", isSignal: true, isRequired: false, transformFunction: null }, displayErrors: { classPropertyName: "displayErrors", publicName: "displayErrors", isSignal: true, isRequired: false, transformFunction: null }, showRequiredMarker: { classPropertyName: "showRequiredMarker", publicName: "showRequiredMarker", isSignal: true, isRequired: false, transformFunction: null }, optionalText: { classPropertyName: "optionalText", publicName: "optionalText", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()" } }, queries: [{ propertyName: "control", first: true, predicate: FORM_CONTROL, descendants: true, isSignal: true }, { propertyName: "_formFields", predicate: FORM_FIELD, descendants: true, isSignal: true }, { propertyName: "labelTemplate", first: true, predicate: ["labelTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"form-item-main\">\n @if (hasLabel() || reserveLabelSpace()) {\n <label class=\"form-item-label\" [id]=\"labelId\" [attr.for]=\"labelFor()\">\n @if (labelTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"labelContext()\" />\n } @else {\n <span class=\"form-item-label__text\">{{ label() }}</span>\n @if (showRequired()) {\n <span class=\"form-item-label__required\">*</span>\n } @else if (showOptional()) {\n <span class=\"form-item-label__optional\">{{ optionalText() }}</span>\n }\n }\n </label>\n }\n <div class=\"form-item-control\">\n <ng-content></ng-content>\n </div>\n</div>\n@if (reserveErrorSpace() || showError() || showHint() || hasCounter()) {\n <small class=\"form-item-footer\">\n @if (showError()) {\n <span class=\"form-item-error\">\n <span class=\"form-item-error__text\" [id]=\"errorId\">\n {{ firstErrorMessage() }}\n </span>\n </span>\n } @else if (showHint()) {\n <span class=\"form-item-hint\" [id]=\"hintId\">{{ hint() }}</span>\n }\n @if (hasCounter()) {\n <span\n class=\"form-item-counter\"\n [class.form-item-counter--over]=\"overLimit()\"\n >{{ characterCount() }}/{{ maxLength() }}</span>\n }\n </small>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
8407
8427
|
}
|
|
8408
8428
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormItem, decorators: [{
|
|
8409
8429
|
type: Component,
|
|
8410
8430
|
args: [{ selector: 'tls-form-item', imports: [NgTemplateOutlet], host: { '[class]': 'hostClasses()' }, template: "<div class=\"form-item-main\">\n @if (hasLabel() || reserveLabelSpace()) {\n <label class=\"form-item-label\" [id]=\"labelId\" [attr.for]=\"labelFor()\">\n @if (labelTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"labelContext()\" />\n } @else {\n <span class=\"form-item-label__text\">{{ label() }}</span>\n @if (showRequired()) {\n <span class=\"form-item-label__required\">*</span>\n } @else if (showOptional()) {\n <span class=\"form-item-label__optional\">{{ optionalText() }}</span>\n }\n }\n </label>\n }\n <div class=\"form-item-control\">\n <ng-content></ng-content>\n </div>\n</div>\n@if (reserveErrorSpace() || showError() || showHint() || hasCounter()) {\n <small class=\"form-item-footer\">\n @if (showError()) {\n <span class=\"form-item-error\">\n <span class=\"form-item-error__text\" [id]=\"errorId\">\n {{ firstErrorMessage() }}\n </span>\n </span>\n } @else if (showHint()) {\n <span class=\"form-item-hint\" [id]=\"hintId\">{{ hint() }}</span>\n }\n @if (hasCounter()) {\n <span\n class=\"form-item-counter\"\n [class.form-item-counter--over]=\"overLimit()\"\n >{{ characterCount() }}/{{ maxLength() }}</span>\n }\n </small>\n}\n" }]
|
|
8411
|
-
}], ctorParameters: () => [], propDecorators: { control: [{ type: i0.ContentChild, args: [i0.forwardRef(() => FORM_CONTROL), { isSignal: true }] }], labelTemplate: [{ type: i0.ContentChild, args: ['labelTemplate', { isSignal: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], spread: [{ type: i0.Input, args: [{ isSignal: true, alias: "spread", required: false }] }], reserveErrorSpace: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveErrorSpace", required: false }] }], reserveLabelSpace: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveLabelSpace", required: false }] }], displayErrors: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayErrors", required: false }] }], showRequiredMarker: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRequiredMarker", required: false }] }], optionalText: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionalText", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }] } });
|
|
8431
|
+
}], ctorParameters: () => [], propDecorators: { control: [{ type: i0.ContentChild, args: [i0.forwardRef(() => FORM_CONTROL), { isSignal: true }] }], _formFields: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => FORM_FIELD), { ...{ descendants: true }, isSignal: true }] }], labelTemplate: [{ type: i0.ContentChild, args: ['labelTemplate', { isSignal: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], spread: [{ type: i0.Input, args: [{ isSignal: true, alias: "spread", required: false }] }], reserveErrorSpace: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveErrorSpace", required: false }] }], reserveLabelSpace: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveLabelSpace", required: false }] }], displayErrors: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayErrors", required: false }] }], showRequiredMarker: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRequiredMarker", required: false }] }], optionalText: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionalText", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }] } });
|
|
8432
|
+
|
|
8433
|
+
/**
|
|
8434
|
+
* Overrides the form item config for one part of the view tree: listed in a component's or a
|
|
8435
|
+
* directive's `providers`, it applies to every `tls-form-item` beneath it, on top of whatever
|
|
8436
|
+
* the surrounding scope configures — the app-wide `provideThalassicUIConfig`, or an enclosing
|
|
8437
|
+
* override. Keys set to `undefined` are cleared, so `{ optionalText: undefined }` drops the
|
|
8438
|
+
* optional marker from a form whose every field may be skipped.
|
|
8439
|
+
*
|
|
8440
|
+
* @example
|
|
8441
|
+
* // App-wide: formItem: { optionalText: '(optional)', reserveErrorSpace: false }
|
|
8442
|
+
* @Component({ providers: [provideFormItemConfig({ optionalText: undefined })] })
|
|
8443
|
+
* // Inside: no optional marker, and still no reserved error space.
|
|
8444
|
+
*/
|
|
8445
|
+
const provideFormItemConfig = (config) => ({
|
|
8446
|
+
provide: FORM_ITEM_CONFIG,
|
|
8447
|
+
useFactory: () => deepMerge(inject(FORM_ITEM_CONFIG, { skipSelf: true }), config),
|
|
8448
|
+
});
|
|
8412
8449
|
|
|
8413
8450
|
const DEFAULT_AUTOCOMPLETE_CONFIG = {
|
|
8414
8451
|
size: 'md',
|
|
@@ -8875,6 +8912,8 @@ class ColorRange extends ValueFormControl {
|
|
|
8875
8912
|
_config = inject(COLOR_RANGE_CONFIG);
|
|
8876
8913
|
CLASS_NAME = 'tls-color-range';
|
|
8877
8914
|
supportsLabelFor = true;
|
|
8915
|
+
/** A colour range always rests on some value along its scale, so the control is never left unanswered. */
|
|
8916
|
+
alwaysAnswered = true;
|
|
8878
8917
|
// Inputs
|
|
8879
8918
|
value = model(0, /* @ts-ignore */
|
|
8880
8919
|
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
@@ -11403,6 +11442,11 @@ class RadioButton extends ValueFormControl {
|
|
|
11403
11442
|
_config = inject(RADIO_BUTTON_CONFIG);
|
|
11404
11443
|
CLASS_NAME = 'tls-radio-button';
|
|
11405
11444
|
supportsLabelFor = true;
|
|
11445
|
+
/**
|
|
11446
|
+
* A radio button is one option of a question rather than the question, so its own label never
|
|
11447
|
+
* says whether the question may be skipped; that belongs to the label of the group.
|
|
11448
|
+
*/
|
|
11449
|
+
alwaysAnswered = true;
|
|
11406
11450
|
radioValue = input.required(/* @ts-ignore */
|
|
11407
11451
|
...(ngDevMode ? [{ debugName: "radioValue" }] : /* istanbul ignore next */ []));
|
|
11408
11452
|
value = model('', /* @ts-ignore */
|
|
@@ -11426,14 +11470,14 @@ class RadioButton extends ValueFormControl {
|
|
|
11426
11470
|
this.value.set(this.radioValue());
|
|
11427
11471
|
}
|
|
11428
11472
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: RadioButton, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
11429
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", 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 }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class": "hostClasses()", "tabindex": "-1" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => RadioButton) }], usesInheritance: true, ngImport: i0, template: "<input\n type=\"radio\"\n class=\"tls-radio-button-input\"\n [attr.id]=\"effectiveInputId()\"\n [name]=\"name()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-
|
|
11473
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", 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 }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class": "hostClasses()", "tabindex": "-1" } }, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => RadioButton) }], usesInheritance: true, ngImport: i0, template: "<!-- No aria-required here: a radio is one option, and whether the question must be answered is\n stated on its radiogroup, the only one of the two roles that supports it. -->\n<input\n type=\"radio\"\n class=\"tls-radio-button-input\"\n [attr.id]=\"effectiveInputId()\"\n [name]=\"name()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\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" });
|
|
11430
11474
|
}
|
|
11431
11475
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: RadioButton, decorators: [{
|
|
11432
11476
|
type: Component,
|
|
11433
11477
|
args: [{ selector: 'tls-radio-button', imports: [], host: {
|
|
11434
11478
|
'[class]': 'hostClasses()',
|
|
11435
11479
|
'[tabindex]': '-1',
|
|
11436
|
-
}, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => RadioButton) }], template: "<input\n type=\"radio\"\n class=\"tls-radio-button-input\"\n [attr.id]=\"effectiveInputId()\"\n [name]=\"name()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-
|
|
11480
|
+
}, providers: [{ provide: FORM_CONTROL, useExisting: forwardRef(() => RadioButton) }], template: "<!-- No aria-required here: a radio is one option, and whether the question must be answered is\n stated on its radiogroup, the only one of the two roles that supports it. -->\n<input\n type=\"radio\"\n class=\"tls-radio-button-input\"\n [attr.id]=\"effectiveInputId()\"\n [name]=\"name()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\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" }]
|
|
11437
11481
|
}], 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"] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }] } });
|
|
11438
11482
|
|
|
11439
11483
|
const DEFAULT_RATING_CONFIG = {
|
|
@@ -11850,6 +11894,8 @@ class Slider extends ValueFormControl {
|
|
|
11850
11894
|
_config = inject(SLIDER_CONFIG);
|
|
11851
11895
|
CLASS_NAME = 'tls-slider';
|
|
11852
11896
|
supportsLabelFor = true;
|
|
11897
|
+
/** A slider always rests on some value within its range, so the control is never left unanswered. */
|
|
11898
|
+
alwaysAnswered = true;
|
|
11853
11899
|
// Inputs
|
|
11854
11900
|
value = model(this._config.min, /* @ts-ignore */
|
|
11855
11901
|
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
@@ -17508,5 +17554,5 @@ const provideThalassicUIConfig = (config = {}) => {
|
|
|
17508
17554
|
* Generated bundle index. Do not edit.
|
|
17509
17555
|
*/
|
|
17510
17556
|
|
|
17511
|
-
export { ACCORDION_CONFIG, ACTIVITY_HEATMAP_CONFIG, ALERT_CONFIG, ALPHA_MAX, AUTOCOMPLETE_CONFIG, Accordion, AccordionItem, ActivityHeatmap, Alert, AlertIcon, Autocomplete, BADGE_CONFIG, BREADCRUMBS_CONFIG, BUTTON_CONFIG, Badge, Breadcrumbs, Button, ButtonDirective, CALENDAR_CONFIG, CAROUSEL_CONFIG, CHECKBOX_CONFIG, CHIP_CONFIG, CHIP_CONTROL_CONFIG, CHIP_GROUP_CONFIG, CHIP_INPUT_CONFIG, COLOR_INPUT_CONFIG, COLOR_PICKER_CONFIG, COLOR_PICKER_DEFAULT_VALUE, COLOR_RANGE_CONFIG, COLOR_SWATCH_PICKER_CONFIG, CONFIRM_CONFIG, Calendar, CalendarAgendaView, CalendarEventItem, CalendarMonthView, CalendarTimeGrid, Carousel, CarouselSlide, Checkbox, CheckboxFormControl, Chip, ChipControl, ChipGroup, ChipInput, ColorInput, ColorPicker, ColorRange, ColorSwatch, ColorSwatchPicker, Confirm, ConfirmPanel, ConfirmService, ContextMenuDirective, DATE_TIME_PICKER_CONFIG, DEFAULT_ACCORDION_CONFIG, DEFAULT_ACTIVITY_HEATMAP_CONFIG, DEFAULT_ALERT_CONFIG, DEFAULT_AUTOCOMPLETE_CONFIG, DEFAULT_BADGE_CONFIG, DEFAULT_BREADCRUMBS_CONFIG, DEFAULT_BUTTON_CONFIG, DEFAULT_CALENDAR_CONFIG, DEFAULT_CAROUSEL_CONFIG, DEFAULT_CHECKBOX_CONFIG, DEFAULT_CHIP_CONFIG, DEFAULT_CHIP_CONTROL_CONFIG, DEFAULT_CHIP_GROUP_CONFIG, DEFAULT_CHIP_INPUT_CONFIG, DEFAULT_COLOR_INPUT_CONFIG, DEFAULT_COLOR_PICKER_CONFIG, DEFAULT_COLOR_RANGE_CONFIG, DEFAULT_COLOR_SWATCH_PICKER_CONFIG, DEFAULT_CONFIRM_CONFIG, DEFAULT_DATE_TIME_PICKER_CONFIG, DEFAULT_DIALOG_CONFIG, DEFAULT_DIVIDER_CONFIG, DEFAULT_DRAWER_CONFIG, DEFAULT_FILE_INPUT_CONFIG, DEFAULT_FORM_CONTROL_CONFIG, DEFAULT_FORM_CONTROL_GROUP_CONFIG, DEFAULT_FORM_ITEM_CONFIG, DEFAULT_HIGHLIGHT_CONFIG, DEFAULT_ICONS, DEFAULT_ICON_CONFIG, DEFAULT_IMAGE_COMPARE_CONFIG, DEFAULT_IMAGE_PREVIEW_CONFIG, DEFAULT_INFINITE_SCROLL_CONFIG, DEFAULT_INPUT_CONFIG, DEFAULT_INPUT_NUMBER_CONFIG, DEFAULT_KBD_CONFIG, DEFAULT_LOADER_CONFIG, DEFAULT_MARK_CONFIG, DEFAULT_MENU_CONFIG, DEFAULT_MULTI_SELECT_CONFIG, DEFAULT_ODOMETER_CONFIG, DEFAULT_PAGINATION_CONFIG, DEFAULT_PAGINATION_QUERY_SYNC_CONFIG, DEFAULT_PASSWORD_CONFIG, DEFAULT_PIN_INPUT_CONFIG, DEFAULT_POPOVER_CONFIG, DEFAULT_PROGRESS_CONFIG, DEFAULT_RADIO_BUTTON_CONFIG, DEFAULT_RATING_CONFIG, DEFAULT_RIPPLE_CONFIG, DEFAULT_SELECT_CONFIG, DEFAULT_SKELETON_CONFIG, DEFAULT_SLIDER_CONFIG, DEFAULT_SPLITTER_CONFIG, DEFAULT_STEPPER_CONFIG, DEFAULT_STEPPER_LABELS, DEFAULT_STEP_CONFIG, DEFAULT_SWIPE_ACTIONS_CONFIG, DEFAULT_SWITCH_CONFIG, DEFAULT_TABLE_CONFIG, DEFAULT_TABS_CONFIG, DEFAULT_TABS_QUERY_SYNC_CONFIG, DEFAULT_TAB_NAV_CONFIG, DEFAULT_TEXTAREA_CONFIG, DEFAULT_TOAST_CONFIG, DEFAULT_TOGGLE_BUTTON_CONFIG, DEFAULT_TOGGLE_GROUP_CONFIG, DEFAULT_TOOLTIP_CONFIG, DEFAULT_TOOLTIP_CONTENT_ATTRIBUTE, DEFAULT_VIRTUAL_SCROLL_CONFIG, DIALOG_CONFIG, DIVIDER_CONFIG, DRAWER_CONFIG, DRAWER_OPENING, DRAWER_PANEL_CONFIG, DateTimePicker, Dialog, DialogBody, DialogFooter, DialogHeader, DialogRef, DialogService, DialogTitleDirective, Divider, Drawer, DrawerRef, DrawerService, DrawerSharedDirective, DrawerTriggerDirective, FILE_INPUT_CONFIG, FORMAT_CYCLE, FORM_CONTROL, FORM_CONTROL_CONFIG, FORM_CONTROL_GROUP_CONFIG, FORM_ITEM_CONFIG, FabMenu, FileDropTargetDirective, FileInput, FormControl, FormControlAddon, FormControlGroup, FormItem, HIGHLIGHT_CONFIG, HUE_MAX, Highlight, ICON_CONFIG, ICON_REGISTRY, IMAGE_COMPARE_CONFIG, IMAGE_PREVIEW_CONFIG, INFINITE_SCROLL_CONFIG, INPUT_CONFIG, INPUT_NUMBER_CONFIG, Icon, IconRegistry, IconService, ImageCompare, ImagePreview, ImagePreviewDirective, ImagePreviewGroupDirective, ImagePreviewRef, ImagePreviewService, InfiniteScroll, Input, InputDirective, InputNumber, KBD_CONFIG, Kbd, LOADER_CONFIG, Loader, MARK_CONFIG, MASK_TOKENS, MENU_CONFIG, MULTI_SELECT_CONFIG, Mark, MaskDirective, Menu, MenuItemComponent, MenuTriggerDirective, MultiSelect, ODOMETER_CONFIG, Odometer, PAGINATION_CONFIG, PAGINATION_QUERY_SYNC_CONFIG, PASSWORD_CONFIG, PIN_INPUT_CONFIG, POPOVER_CONFIG, POSITIONED_VALUES, PRESS_SCALE_PROPERTY, PROGRESS_CONFIG, Pagination, PaginationQuerySyncDirective, Password, PickerField, PinInput, Popover, Progress, RADIO_BUTTON_CONFIG, RATING_CONFIG, RIPPLE_ACTIVE_CLASS, RIPPLE_CONFIG, RIPPLE_DIAMETER_PROPERTY, RIPPLE_MOVE_SLOP_PX, RIPPLE_RELEASED_CLASS, RIPPLE_TOUCH_DELAY_MS, RIPPLE_X_PROPERTY, RIPPLE_Y_PROPERTY, RadioButton, Rating, RippleDirective, SELECT_CONFIG, SKELETON_CONFIG, SLIDER_CONFIG, SPLITTER_CONFIG, STEPPER_CONFIG, SV_KEYBOARD_STEP, SV_KEYBOARD_STEP_LARGE, SWIPE_ACTIONS_CONFIG, SWITCH_CONFIG, Select, Sheet, SheetHeaderDirective, Skeleton, Slider, Splitter, SplitterPanel, Step, Stepper, SwipeActions, Switch, TABLE_CONFIG, TABS_CONFIG, TABS_QUERY_SYNC_CONFIG, TAB_NAV_CONFIG, TEXTAREA_CONFIG, TOAST_CONFIG, TOGGLE_BUTTON_CONFIG, TOGGLE_GROUP_CONFIG, TOOLTIP_CONFIG, TOUCH_HANDOVER_WINDOW_MS, Tab, TabLinkDirective, TabNavDirective, Table, TableColumn, Tabs, TabsQuerySyncDirective, Textarea, Toast, ToastService, ToggleButton, ToggleGroup, TooltipDelegateDirective, TooltipDirective, TooltipTrigger, VIRTUAL_SCROLL_CONFIG, ValueFormControl, VirtualScroll, acceptsFile, aggregateActivityEntries, applyMask, buildActivityMonthSegments, buildActivityThresholds, canonicalHex, contrastForeground, formatHsl, formatRgb, hslToHsv, hsvToHsl, hsvToRgb, isTypeRejected, normalizeAccept, parseColor, provideThalassicIcons, provideThalassicUIConfig, relativeLuminance, resolveActivityLevel, rgbToHsv, rgbaToHex, toImagePreviewImage };
|
|
17557
|
+
export { ACCORDION_CONFIG, ACTIVITY_HEATMAP_CONFIG, ALERT_CONFIG, ALPHA_MAX, AUTOCOMPLETE_CONFIG, Accordion, AccordionItem, ActivityHeatmap, Alert, AlertIcon, Autocomplete, BADGE_CONFIG, BREADCRUMBS_CONFIG, BUTTON_CONFIG, Badge, Breadcrumbs, Button, ButtonDirective, CALENDAR_CONFIG, CAROUSEL_CONFIG, CHECKBOX_CONFIG, CHIP_CONFIG, CHIP_CONTROL_CONFIG, CHIP_GROUP_CONFIG, CHIP_INPUT_CONFIG, COLOR_INPUT_CONFIG, COLOR_PICKER_CONFIG, COLOR_PICKER_DEFAULT_VALUE, COLOR_RANGE_CONFIG, COLOR_SWATCH_PICKER_CONFIG, CONFIRM_CONFIG, Calendar, CalendarAgendaView, CalendarEventItem, CalendarMonthView, CalendarTimeGrid, Carousel, CarouselSlide, Checkbox, CheckboxFormControl, Chip, ChipControl, ChipGroup, ChipInput, ColorInput, ColorPicker, ColorRange, ColorSwatch, ColorSwatchPicker, Confirm, ConfirmPanel, ConfirmService, ContextMenuDirective, DATE_TIME_PICKER_CONFIG, DEFAULT_ACCORDION_CONFIG, DEFAULT_ACTIVITY_HEATMAP_CONFIG, DEFAULT_ALERT_CONFIG, DEFAULT_AUTOCOMPLETE_CONFIG, DEFAULT_BADGE_CONFIG, DEFAULT_BREADCRUMBS_CONFIG, DEFAULT_BUTTON_CONFIG, DEFAULT_CALENDAR_CONFIG, DEFAULT_CAROUSEL_CONFIG, DEFAULT_CHECKBOX_CONFIG, DEFAULT_CHIP_CONFIG, DEFAULT_CHIP_CONTROL_CONFIG, DEFAULT_CHIP_GROUP_CONFIG, DEFAULT_CHIP_INPUT_CONFIG, DEFAULT_COLOR_INPUT_CONFIG, DEFAULT_COLOR_PICKER_CONFIG, DEFAULT_COLOR_RANGE_CONFIG, DEFAULT_COLOR_SWATCH_PICKER_CONFIG, DEFAULT_CONFIRM_CONFIG, DEFAULT_DATE_TIME_PICKER_CONFIG, DEFAULT_DIALOG_CONFIG, DEFAULT_DIVIDER_CONFIG, DEFAULT_DRAWER_CONFIG, DEFAULT_FILE_INPUT_CONFIG, DEFAULT_FORM_CONTROL_CONFIG, DEFAULT_FORM_CONTROL_GROUP_CONFIG, DEFAULT_FORM_ITEM_CONFIG, DEFAULT_HIGHLIGHT_CONFIG, DEFAULT_ICONS, DEFAULT_ICON_CONFIG, DEFAULT_IMAGE_COMPARE_CONFIG, DEFAULT_IMAGE_PREVIEW_CONFIG, DEFAULT_INFINITE_SCROLL_CONFIG, DEFAULT_INPUT_CONFIG, DEFAULT_INPUT_NUMBER_CONFIG, DEFAULT_KBD_CONFIG, DEFAULT_LOADER_CONFIG, DEFAULT_MARK_CONFIG, DEFAULT_MENU_CONFIG, DEFAULT_MULTI_SELECT_CONFIG, DEFAULT_ODOMETER_CONFIG, DEFAULT_PAGINATION_CONFIG, DEFAULT_PAGINATION_QUERY_SYNC_CONFIG, DEFAULT_PASSWORD_CONFIG, DEFAULT_PIN_INPUT_CONFIG, DEFAULT_POPOVER_CONFIG, DEFAULT_PROGRESS_CONFIG, DEFAULT_RADIO_BUTTON_CONFIG, DEFAULT_RATING_CONFIG, DEFAULT_RIPPLE_CONFIG, DEFAULT_SELECT_CONFIG, DEFAULT_SKELETON_CONFIG, DEFAULT_SLIDER_CONFIG, DEFAULT_SPLITTER_CONFIG, DEFAULT_STEPPER_CONFIG, DEFAULT_STEPPER_LABELS, DEFAULT_STEP_CONFIG, DEFAULT_SWIPE_ACTIONS_CONFIG, DEFAULT_SWITCH_CONFIG, DEFAULT_TABLE_CONFIG, DEFAULT_TABS_CONFIG, DEFAULT_TABS_QUERY_SYNC_CONFIG, DEFAULT_TAB_NAV_CONFIG, DEFAULT_TEXTAREA_CONFIG, DEFAULT_TOAST_CONFIG, DEFAULT_TOGGLE_BUTTON_CONFIG, DEFAULT_TOGGLE_GROUP_CONFIG, DEFAULT_TOOLTIP_CONFIG, DEFAULT_TOOLTIP_CONTENT_ATTRIBUTE, DEFAULT_VIRTUAL_SCROLL_CONFIG, DIALOG_CONFIG, DIVIDER_CONFIG, DRAWER_CONFIG, DRAWER_OPENING, DRAWER_PANEL_CONFIG, DateTimePicker, Dialog, DialogBody, DialogFooter, DialogHeader, DialogRef, DialogService, DialogTitleDirective, Divider, Drawer, DrawerRef, DrawerService, DrawerSharedDirective, DrawerTriggerDirective, FILE_INPUT_CONFIG, FORMAT_CYCLE, FORM_CONTROL, FORM_CONTROL_CONFIG, FORM_CONTROL_GROUP_CONFIG, FORM_ITEM_CONFIG, FabMenu, FileDropTargetDirective, FileInput, FormControl, FormControlAddon, FormControlGroup, FormItem, HIGHLIGHT_CONFIG, HUE_MAX, Highlight, ICON_CONFIG, ICON_REGISTRY, IMAGE_COMPARE_CONFIG, IMAGE_PREVIEW_CONFIG, INFINITE_SCROLL_CONFIG, INPUT_CONFIG, INPUT_NUMBER_CONFIG, Icon, IconRegistry, IconService, ImageCompare, ImagePreview, ImagePreviewDirective, ImagePreviewGroupDirective, ImagePreviewRef, ImagePreviewService, InfiniteScroll, Input, InputDirective, InputNumber, KBD_CONFIG, Kbd, LOADER_CONFIG, Loader, MARK_CONFIG, MASK_TOKENS, MENU_CONFIG, MULTI_SELECT_CONFIG, Mark, MaskDirective, Menu, MenuItemComponent, MenuTriggerDirective, MultiSelect, ODOMETER_CONFIG, Odometer, PAGINATION_CONFIG, PAGINATION_QUERY_SYNC_CONFIG, PASSWORD_CONFIG, PIN_INPUT_CONFIG, POPOVER_CONFIG, POSITIONED_VALUES, PRESS_SCALE_PROPERTY, PROGRESS_CONFIG, Pagination, PaginationQuerySyncDirective, Password, PickerField, PinInput, Popover, Progress, RADIO_BUTTON_CONFIG, RATING_CONFIG, RIPPLE_ACTIVE_CLASS, RIPPLE_CONFIG, RIPPLE_DIAMETER_PROPERTY, RIPPLE_MOVE_SLOP_PX, RIPPLE_RELEASED_CLASS, RIPPLE_TOUCH_DELAY_MS, RIPPLE_X_PROPERTY, RIPPLE_Y_PROPERTY, RadioButton, Rating, RippleDirective, SELECT_CONFIG, SKELETON_CONFIG, SLIDER_CONFIG, SPLITTER_CONFIG, STEPPER_CONFIG, SV_KEYBOARD_STEP, SV_KEYBOARD_STEP_LARGE, SWIPE_ACTIONS_CONFIG, SWITCH_CONFIG, Select, Sheet, SheetHeaderDirective, Skeleton, Slider, Splitter, SplitterPanel, Step, Stepper, SwipeActions, Switch, TABLE_CONFIG, TABS_CONFIG, TABS_QUERY_SYNC_CONFIG, TAB_NAV_CONFIG, TEXTAREA_CONFIG, TOAST_CONFIG, TOGGLE_BUTTON_CONFIG, TOGGLE_GROUP_CONFIG, TOOLTIP_CONFIG, TOUCH_HANDOVER_WINDOW_MS, Tab, TabLinkDirective, TabNavDirective, Table, TableColumn, Tabs, TabsQuerySyncDirective, Textarea, Toast, ToastService, ToggleButton, ToggleGroup, TooltipDelegateDirective, TooltipDirective, TooltipTrigger, VIRTUAL_SCROLL_CONFIG, ValueFormControl, VirtualScroll, acceptsFile, aggregateActivityEntries, applyMask, buildActivityMonthSegments, buildActivityThresholds, canonicalHex, contrastForeground, formatHsl, formatRgb, hslToHsv, hsvToHsl, hsvToRgb, isTypeRejected, normalizeAccept, parseColor, provideFormItemConfig, provideThalassicIcons, provideThalassicUIConfig, relativeLuminance, resolveActivityLevel, rgbToHsv, rgbaToHex, toImagePreviewImage };
|
|
17512
17558
|
//# sourceMappingURL=thalassic-ui.mjs.map
|