@4sh/ui-kit 0.10.0 → 0.11.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.
@@ -1,8 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, numberAttribute, output, viewChild, computed, forwardRef, Component } from '@angular/core';
2
+ import { input, numberAttribute, booleanAttribute, output, contentChild, viewChild, computed, forwardRef, Component } from '@angular/core';
3
+ import { NgTemplateOutlet } from '@angular/common';
3
4
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
4
5
  import { BaseFormField, startOfDay, toIsoTime, toIsoDateTime, toIsoDate, parseIsoTime, parseIsoDateTime, parseIsoDate } from '@4sh/ui-kit/forms';
5
6
  import { UiField } from '@4sh/ui-kit/forms/ui-field';
7
+ import { UiIcon } from '@4sh/ui-kit/base/ui-icon';
6
8
 
7
9
  /** `mode` → the native `type` that draws the OS picker. */
8
10
  const NATIVE_TYPE = {
@@ -59,15 +61,47 @@ class UiInputDate extends BaseFormField {
59
61
  * an hour; the browser's own default is `60`, i.e. whole minutes).
60
62
  */
61
63
  this.step = input(undefined, { ...(ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {}), transform: numberAttribute });
64
+ this.icon = input(/* @ts-ignore */
65
+ ...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
66
+ this.showIcon = input(true, { ...(ngDevMode ? { debugName: "showIcon" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
67
+ /** Accessible name of the picker button. Defaults per {@link mode}. */
68
+ this.iconAriaLabel = input(/* @ts-ignore */
69
+ ...(ngDevMode ? [undefined, { debugName: "iconAriaLabel" }] : /* istanbul ignore next */ []));
70
+ /** Custom icon, as an input: same context as `ui-input`'s / `ui-datepicker`'s. */
71
+ this.iconTemplate = input(/* @ts-ignore */
72
+ ...(ngDevMode ? [undefined, { debugName: "iconTemplate" }] : /* istanbul ignore next */ []));
62
73
  /** Emitted when the browser commits a value — never mid-entry. */
63
74
  this.valueChange = output();
64
75
  /** Emitted when the field receives focus. */
65
76
  this.inputFocus = output();
66
77
  /** Emitted when the field loses focus. */
67
78
  this.inputBlur = output();
79
+ /** Custom icon: `<ng-template #icon let-name let-size="size">`. */
80
+ this.iconTemplateContent = contentChild('icon', /* @ts-ignore */
81
+ ...(ngDevMode ? [{ debugName: "iconTemplateContent" }] : /* istanbul ignore next */ []));
68
82
  /** @ignore */
69
83
  this.inputEl = viewChild.required('inputEl', /* @ts-ignore */
70
84
  ...(ngDevMode ? [{ debugName: "inputEl" }] : /* istanbul ignore next */ []));
85
+ /** @ignore Icon size aligned with the field size, same pairing as `ui-input`. */
86
+ this.iconSize = computed(() => (this.size() === 'small' ? 'sm' : 'md'), /* @ts-ignore */
87
+ ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
88
+ /** @ignore Calendar, or clock when the field only carries a time. */
89
+ this.resolvedIcon = computed(() => this.icon() ?? (this.mode() === 'time' ? 'clock' : 'calendar'), /* @ts-ignore */
90
+ ...(ngDevMode ? [{ debugName: "resolvedIcon" }] : /* istanbul ignore next */ []));
91
+ /** @ignore */
92
+ this.resolvedIconAriaLabel = computed(() => this.iconAriaLabel() ??
93
+ (this.mode() === 'time' ? "Ouvrir le sélecteur d'heure" : 'Ouvrir le calendrier'), /* @ts-ignore */
94
+ ...(ngDevMode ? [{ debugName: "resolvedIconAriaLabel" }] : /* istanbul ignore next */ []));
95
+ /** @ignore Input wins over the projected `#icon` template. */
96
+ this.resolvedIconTemplate = computed(() => this.iconTemplate() ?? this.iconTemplateContent(), /* @ts-ignore */
97
+ ...(ngDevMode ? [{ debugName: "resolvedIconTemplate" }] : /* istanbul ignore next */ []));
98
+ /** @ignore */
99
+ this.iconContext = computed(() => ({
100
+ $implicit: this.resolvedIcon(),
101
+ size: this.iconSize(),
102
+ disabled: this.isDisabled(),
103
+ }), /* @ts-ignore */
104
+ ...(ngDevMode ? [{ debugName: "iconContext" }] : /* istanbul ignore next */ []));
71
105
  /** @ignore The native `type` the OS picker hangs off. */
72
106
  this.nativeType = computed(() => NATIVE_TYPE[this.mode()], /* @ts-ignore */
73
107
  ...(ngDevMode ? [{ debugName: "nativeType" }] : /* istanbul ignore next */ []));
@@ -95,6 +129,18 @@ class UiInputDate extends BaseFormField {
95
129
  focus(options) {
96
130
  this.inputEl().nativeElement.focus(options);
97
131
  }
132
+ openPicker() {
133
+ if (this.isDisabled() || this.readonly())
134
+ return;
135
+ const el = this.inputEl().nativeElement;
136
+ el.focus();
137
+ try {
138
+ el.showPicker();
139
+ }
140
+ catch {
141
+ /* no picker to show */
142
+ }
143
+ }
98
144
  /** Native `<input>` element, for a composite host that needs direct DOM access. */
99
145
  nativeInputElement() {
100
146
  return this.inputEl().nativeElement;
@@ -156,16 +202,16 @@ class UiInputDate extends BaseFormField {
156
202
  return bound instanceof Date ? this.toNative(bound) : bound;
157
203
  }
158
204
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiInputDate, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
159
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.5", type: UiInputDate, isStandalone: true, selector: "ui-input-date", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, valueType: { classPropertyName: "valueType", publicName: "valueType", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", inputFocus: "inputFocus", inputBlur: "inputBlur" }, providers: [
205
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: UiInputDate, isStandalone: true, selector: "ui-input-date", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, valueType: { classPropertyName: "valueType", publicName: "valueType", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, iconAriaLabel: { classPropertyName: "iconAriaLabel", publicName: "iconAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, iconTemplate: { classPropertyName: "iconTemplate", publicName: "iconTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", inputFocus: "inputFocus", inputBlur: "inputBlur" }, providers: [
160
206
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputDate), multi: true },
161
- ], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"true\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n>\n <!-- `filled` is hard-coded above, and it is not a shortcut: the browser draws its own\n `jj/mm/aaaa` template in the box, so this field is never visually empty. A floating\n label at rest would sit on top of that template. -->\n <input\n #inputEl\n class=\"ui-input-date-native\"\n [class._small]=\"size() === 'small'\"\n [type]=\"nativeType()\"\n [id]=\"resolvedId()\"\n [value]=\"nativeValue()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.min]=\"nativeMin()\"\n [attr.max]=\"nativeMax()\"\n [attr.step]=\"step() ?? null\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"resolvedAriaDescribedBy()\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (change)=\"onNativeChange()\"\n (focus)=\"inputFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n />\n</ui-field>\n", styles: [".ui-input-date-native{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--ui-form-field-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);color:var(--ui-form-field-color, var(--form-high-content-default))}.ui-input-date-native:first-child{padding-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-date-native:last-child{padding-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-date-native{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-date-native::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-input-date-native:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-input-date-native._small{font-size:var(--ui-input-date-font-size-small, var(--size-typography-text-md))}.ui-input-date-native{-webkit-appearance:none;appearance:none}.ui-input-date-native::-webkit-date-and-time-value{text-align:left;margin:0}.ui-input-date-native::-webkit-calendar-picker-indicator{cursor:pointer}:host-context([data-theme=dark]) .ui-input-date-native{color-scheme:dark}\n"], dependencies: [{ kind: "component", type: UiField, selector: "ui-field", inputs: ["label", "for", "required", "size", "level", "floatLabel", "filled", "disabled", "readonly", "multiline", "autoHeight", "message", "messageId", "showMessageIcon", "messageIcon", "hasFooter", "hasPrefix"] }] }); }
207
+ ], queries: [{ propertyName: "iconTemplateContent", first: true, predicate: ["icon"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"true\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n>\n <!-- `filled` is hard-coded above, and it is not a shortcut: the browser draws its own\n `jj/mm/aaaa` template in the box, so this field is never visually empty. A floating\n label at rest would sit on top of that template. -->\n <input\n #inputEl\n class=\"ui-input-date-native\"\n [class._small]=\"size() === 'small'\"\n [type]=\"nativeType()\"\n [id]=\"resolvedId()\"\n [value]=\"nativeValue()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.min]=\"nativeMin()\"\n [attr.max]=\"nativeMax()\"\n [attr.step]=\"step() ?? null\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"resolvedAriaDescribedBy()\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (change)=\"onNativeChange()\"\n (focus)=\"inputFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n />\n\n @if (showIcon()) {\n <button\n uiFieldSuffix\n type=\"button\"\n tabindex=\"-1\"\n class=\"ui-input-date-action\"\n [attr.aria-label]=\"resolvedIconAriaLabel()\"\n [disabled]=\"isDisabled()\"\n (click)=\"openPicker()\"\n >\n @if (resolvedIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"iconContext()\" />\n } @else {\n <ui-icon [name]=\"resolvedIcon()\" [size]=\"iconSize()\" />\n }\n </button>\n }\n</ui-field>\n", styles: [".ui-input-date-native{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--ui-form-field-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);color:var(--ui-form-field-color, var(--form-high-content-default))}.ui-input-date-native:first-child{padding-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-date-native:last-child{padding-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-date-native{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-date-native::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-input-date-native:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-input-date-native._small{font-size:var(--ui-input-date-font-size-small, var(--size-typography-text-md))}.ui-input-date-native{-webkit-appearance:none;appearance:none}.ui-input-date-native::-webkit-date-and-time-value{text-align:left;margin:0}.ui-input-date-native::-webkit-calendar-picker-indicator{display:none}.ui-input-date-native{margin-inline-end:-2.5rem;clip-path:inset(0 2.5rem 0 0)}.ui-input-date-action{display:flex;align-items:center;justify-content:center;align-self:stretch;aspect-ratio:1;flex-shrink:0;padding:0;border:none;background:none;border-radius:0 calc(var(--ui-form-field-radius, var(--radius-sm)) - var(--ui-control-stroke-width, var(--stroke-default))) calc(var(--ui-form-field-radius, var(--radius-sm)) - var(--ui-control-stroke-width, var(--stroke-default))) 0;color:var(--ui-form-field-action-color, var(--form-low-content-default));cursor:pointer;transition:color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-input-date-action:hover:not(:disabled){color:var(--ui-form-field-action-color-hover, var(--form-high-content-hover));background-color:var(--ui-form-field-action-surface-hover, var(--form-high-surface-hover))}.ui-input-date-action:focus-visible{outline:none;color:var(--ui-form-field-action-color-focus, var(--form-high-content-focused));background-color:var(--ui-form-field-action-surface-focus, var(--form-high-surface-focused))}.ui-input-date-action:disabled{cursor:not-allowed;color:var(--ui-form-field-action-color-disabled, var(--form-high-content-disabled))}:host-context([dir=rtl]) .ui-input-date-native{clip-path:inset(0 0 0 2.5rem)}:host-context([data-theme=dark]) .ui-input-date-native{color-scheme:dark}\n"], dependencies: [{ kind: "component", type: UiField, selector: "ui-field", inputs: ["label", "for", "required", "size", "level", "floatLabel", "filled", "disabled", "readonly", "multiline", "autoHeight", "message", "messageId", "showMessageIcon", "messageIcon", "hasFooter", "hasPrefix"] }, { kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
162
208
  }
163
209
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiInputDate, decorators: [{
164
210
  type: Component,
165
- args: [{ selector: 'ui-input-date', imports: [UiField], providers: [
211
+ args: [{ selector: 'ui-input-date', imports: [UiField, UiIcon, NgTemplateOutlet], providers: [
166
212
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputDate), multi: true },
167
- ], template: "<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"true\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n>\n <!-- `filled` is hard-coded above, and it is not a shortcut: the browser draws its own\n `jj/mm/aaaa` template in the box, so this field is never visually empty. A floating\n label at rest would sit on top of that template. -->\n <input\n #inputEl\n class=\"ui-input-date-native\"\n [class._small]=\"size() === 'small'\"\n [type]=\"nativeType()\"\n [id]=\"resolvedId()\"\n [value]=\"nativeValue()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.min]=\"nativeMin()\"\n [attr.max]=\"nativeMax()\"\n [attr.step]=\"step() ?? null\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"resolvedAriaDescribedBy()\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (change)=\"onNativeChange()\"\n (focus)=\"inputFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n />\n</ui-field>\n", styles: [".ui-input-date-native{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--ui-form-field-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);color:var(--ui-form-field-color, var(--form-high-content-default))}.ui-input-date-native:first-child{padding-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-date-native:last-child{padding-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-date-native{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-date-native::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-input-date-native:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-input-date-native._small{font-size:var(--ui-input-date-font-size-small, var(--size-typography-text-md))}.ui-input-date-native{-webkit-appearance:none;appearance:none}.ui-input-date-native::-webkit-date-and-time-value{text-align:left;margin:0}.ui-input-date-native::-webkit-calendar-picker-indicator{cursor:pointer}:host-context([data-theme=dark]) .ui-input-date-native{color-scheme:dark}\n"] }]
168
- }], propDecorators: { mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], valueType: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueType", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], inputFocus: [{ type: i0.Output, args: ["inputFocus"] }], inputBlur: [{ type: i0.Output, args: ["inputBlur"] }], inputEl: [{ type: i0.ViewChild, args: ['inputEl', { isSignal: true }] }] } });
213
+ ], template: "<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"true\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n>\n <!-- `filled` is hard-coded above, and it is not a shortcut: the browser draws its own\n `jj/mm/aaaa` template in the box, so this field is never visually empty. A floating\n label at rest would sit on top of that template. -->\n <input\n #inputEl\n class=\"ui-input-date-native\"\n [class._small]=\"size() === 'small'\"\n [type]=\"nativeType()\"\n [id]=\"resolvedId()\"\n [value]=\"nativeValue()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.min]=\"nativeMin()\"\n [attr.max]=\"nativeMax()\"\n [attr.step]=\"step() ?? null\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"resolvedAriaDescribedBy()\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (change)=\"onNativeChange()\"\n (focus)=\"inputFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n />\n\n @if (showIcon()) {\n <button\n uiFieldSuffix\n type=\"button\"\n tabindex=\"-1\"\n class=\"ui-input-date-action\"\n [attr.aria-label]=\"resolvedIconAriaLabel()\"\n [disabled]=\"isDisabled()\"\n (click)=\"openPicker()\"\n >\n @if (resolvedIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"iconContext()\" />\n } @else {\n <ui-icon [name]=\"resolvedIcon()\" [size]=\"iconSize()\" />\n }\n </button>\n }\n</ui-field>\n", styles: [".ui-input-date-native{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--ui-form-field-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);color:var(--ui-form-field-color, var(--form-high-content-default))}.ui-input-date-native:first-child{padding-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-date-native:last-child{padding-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-date-native{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-date-native::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-input-date-native:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-input-date-native._small{font-size:var(--ui-input-date-font-size-small, var(--size-typography-text-md))}.ui-input-date-native{-webkit-appearance:none;appearance:none}.ui-input-date-native::-webkit-date-and-time-value{text-align:left;margin:0}.ui-input-date-native::-webkit-calendar-picker-indicator{display:none}.ui-input-date-native{margin-inline-end:-2.5rem;clip-path:inset(0 2.5rem 0 0)}.ui-input-date-action{display:flex;align-items:center;justify-content:center;align-self:stretch;aspect-ratio:1;flex-shrink:0;padding:0;border:none;background:none;border-radius:0 calc(var(--ui-form-field-radius, var(--radius-sm)) - var(--ui-control-stroke-width, var(--stroke-default))) calc(var(--ui-form-field-radius, var(--radius-sm)) - var(--ui-control-stroke-width, var(--stroke-default))) 0;color:var(--ui-form-field-action-color, var(--form-low-content-default));cursor:pointer;transition:color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-input-date-action:hover:not(:disabled){color:var(--ui-form-field-action-color-hover, var(--form-high-content-hover));background-color:var(--ui-form-field-action-surface-hover, var(--form-high-surface-hover))}.ui-input-date-action:focus-visible{outline:none;color:var(--ui-form-field-action-color-focus, var(--form-high-content-focused));background-color:var(--ui-form-field-action-surface-focus, var(--form-high-surface-focused))}.ui-input-date-action:disabled{cursor:not-allowed;color:var(--ui-form-field-action-color-disabled, var(--form-high-content-disabled))}:host-context([dir=rtl]) .ui-input-date-native{clip-path:inset(0 0 0 2.5rem)}:host-context([data-theme=dark]) .ui-input-date-native{color-scheme:dark}\n"] }]
214
+ }], propDecorators: { mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], valueType: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueType", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], iconAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconAriaLabel", required: false }] }], iconTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconTemplate", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], inputFocus: [{ type: i0.Output, args: ["inputFocus"] }], inputBlur: [{ type: i0.Output, args: ["inputBlur"] }], iconTemplateContent: [{ type: i0.ContentChild, args: ['icon', { isSignal: true }] }], inputEl: [{ type: i0.ViewChild, args: ['inputEl', { isSignal: true }] }] } });
169
215
 
170
216
  /*
171
217
  * Public API Surface of ui-kit/ui-input-date
@@ -1 +1 @@
1
- {"version":3,"file":"4sh-ui-kit-forms-ui-input-date.mjs","sources":["../../../projects/ui-kit/forms/ui-input-date/src/lib/ui-input-date.ts","../../../projects/ui-kit/forms/ui-input-date/src/lib/ui-input-date.html","../../../projects/ui-kit/forms/ui-input-date/src/public-api.ts","../../../projects/ui-kit/forms/ui-input-date/src/4sh-ui-kit-forms-ui-input-date.ts"],"sourcesContent":["import {\n Component,\n computed,\n ElementRef,\n forwardRef,\n input,\n numberAttribute,\n output,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {\n BaseFormField,\n parseIsoDate,\n parseIsoDateTime,\n parseIsoTime,\n startOfDay,\n toIsoDate,\n toIsoDateTime,\n toIsoTime,\n} from '@4sh/ui-kit/forms';\nimport { UiField } from '@4sh/ui-kit/forms/ui-field';\n\n/** Granularity of the field — picks which native control the browser renders. */\nexport type InputDateMode = 'date' | 'time' | 'datetime';\n\n/**\n * Shape of the emitted value. **Identical to `ui-datepicker`'s**, so a host can swap one for\n * the other (native picker on mobile, overlay on desktop) without converting anything.\n */\nexport type InputDateValueType = 'date' | 'iso';\n\n/** Value carried by the field, whichever `valueType` is in force. */\nexport type InputDateValue = Date | string | null;\n\n/** `mode` → the native `type` that draws the OS picker. */\nconst NATIVE_TYPE: Record<InputDateMode, string> = {\n date: 'date',\n time: 'time',\n datetime: 'datetime-local',\n};\n\n/**\n * ui-input-date — **native** date/time field on the `ui-field` shell (label + box + helper).\n *\n * The picker belongs to the OS: the system wheel on mobile — which no overlay matches —\n * and the browser's own calendar on desktop. That is the whole reason this component\n * exists next to [`ui-datepicker`](../ui-datepicker), which owns the opposite trade: a\n * calendar carried by the design system, with ranges, multi-month and inline modes.\n *\n * It is a sibling of `ui-input`, not a variant of it: three things a text field cannot do\n * are settled here.\n *\n * 1. **The value is a date, not a string.** `valueType` commits to `Date` or to an ISO\n * string, exactly as `ui-datepicker` does — that alignment is what lets a host branch\n * between the two on viewport without converting anything.\n * 2. **It emits on `change`, never on `input`.** A native temporal control blanks its own\n * value while the entry is incomplete, so an `input`-driven field fires a burst of\n * empty values as the user types — indistinguishable from clearing the field, and quite\n * visible on an autosave or a dependent control.\n * 3. **The label stays raised.** The browser draws its own `jj/mm/aaaa` template in the\n * box, so a floating label at rest would land on top of it.\n *\n * No `placeholder`: the browser ignores it on these types, that template holding the spot.\n *\n * Standalone, `[(ngModel)]` or reactive forms (ControlValueAccessor via BaseFormField).\n */\n@Component({\n selector: 'ui-input-date',\n imports: [UiField],\n templateUrl: './ui-input-date.html',\n styleUrl: './ui-input-date.scss',\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputDate), multi: true },\n ],\n})\nexport class UiInputDate extends BaseFormField<InputDateValue> {\n /** Granularity: a day, a time of day, or both. */\n mode = input<InputDateMode>('date');\n /**\n * Shape of the emitted value: `'date'` (a plain `Date`) or `'iso'` (`yyyy-MM-dd`, or\n * `yyyy-MM-ddTHH:mm` as soon as a time is part of it). Incoming values are accepted in\n * **either** shape whatever this says — only the emitted side commits.\n */\n valueType = input<InputDateValueType>('date');\n /** Earliest accepted value, as a `Date` or in the ISO shape of the current `mode`. */\n min = input<Date | string>();\n /** Latest accepted value, same two shapes as {@link min}. */\n max = input<Date | string>();\n /**\n * Native `step`: days on `date`, **seconds** on `time` / `datetime` (`900` = quarters of\n * an hour; the browser's own default is `60`, i.e. whole minutes).\n */\n step = input<number, unknown>(undefined, { transform: numberAttribute });\n\n /** Emitted when the browser commits a value — never mid-entry. */\n valueChange = output<InputDateValue>();\n /** Emitted when the field receives focus. */\n inputFocus = output<FocusEvent>();\n /** Emitted when the field loses focus. */\n inputBlur = output<FocusEvent>();\n\n /** @ignore */\n private readonly inputEl = viewChild.required<ElementRef<HTMLInputElement>>('inputEl');\n\n /** @ignore The native `type` the OS picker hangs off. */\n protected readonly nativeType = computed(() => NATIVE_TYPE[this.mode()]);\n /** @ignore Whether the value carries a time — decides both serializers. */\n private readonly hasTimeComponent = computed(() => this.mode() !== 'date');\n\n /** @ignore Model → the string the native control reads, `''` when there is no value. */\n protected readonly nativeValue = computed(() => {\n const date = this.parseValue(this.modelValue() ?? null);\n return date ? this.toNative(date) : '';\n });\n /** @ignore Bounds go through the same serializer as the value: a caller may hand a `Date`\n * or an already-native string, the attribute only ever sees the latter. */\n protected readonly nativeMin = computed(() => this.toNativeBound(this.min()));\n /** @ignore */\n protected readonly nativeMax = computed(() => this.toNativeBound(this.max()));\n\n /** @ignore Full `aria-describedby`: the message id, only when a message is rendered. */\n protected readonly resolvedAriaDescribedBy = computed(() =>\n this.displayMessage() ? this.messageId() : null,\n );\n\n /** Focuses the field. */\n focus(options?: FocusOptions): void {\n this.inputEl().nativeElement.focus(options);\n }\n\n /** Native `<input>` element, for a composite host that needs direct DOM access. */\n nativeInputElement(): HTMLInputElement {\n return this.inputEl().nativeElement;\n }\n\n /** @ignore */\n protected override uidPrefix(): string {\n return 'ui-input-date';\n }\n\n /**\n * @ignore The browser committed a value — a complete one, or an empty one because the\n * field was cleared. This is the only place a value leaves the component: `input` fires\n * on every keystroke with the blanks in between, and is deliberately not listened to.\n */\n protected onNativeChange(): void {\n const raw = this.inputEl().nativeElement.value;\n const date = raw ? this.fromNative(raw) : null;\n const value = date ? this.serializeValue(date) : null;\n this.modelValue.set(value);\n this.emitChange(value);\n this.valueChange.emit(value);\n }\n\n /** @ignore */\n protected onBlur(event: FocusEvent): void {\n this.emitTouch();\n this.inputBlur.emit(event);\n }\n\n /** @ignore Internal `Date` → the shape `valueType` commits to. Mirrors `ui-datepicker`'s\n * own `serializeValue`, down to the fresh instance: the caller never gets a reference it\n * could mutate behind our back. */\n private serializeValue(date: Date): InputDateValue {\n if (this.valueType() === 'iso') return this.toNative(date);\n return this.hasTimeComponent() ? new Date(date) : startOfDay(date);\n }\n\n /** @ignore Incoming value, `Date` or ISO string, auto-detected — cloned when already a\n * `Date`, symmetric with {@link serializeValue}. */\n private parseValue(value: InputDateValue | undefined): Date | null {\n if (value === undefined || value === null || value === '') return null;\n return value instanceof Date ? new Date(value) : this.fromNative(value);\n }\n\n /** @ignore `Date` → the exact string the native control of this `mode` accepts. */\n private toNative(date: Date): string {\n if (this.mode() === 'time') return toIsoTime(date);\n return this.hasTimeComponent() ? toIsoDateTime(date) : toIsoDate(date);\n }\n\n /** @ignore The reverse. `null` on anything malformed — a bad value degrades to \"no value\"\n * rather than throwing, the browser being the one that produced it. */\n private fromNative(value: string): Date | null {\n if (this.mode() === 'time') return parseIsoTime(value);\n return this.hasTimeComponent() ? parseIsoDateTime(value) : parseIsoDate(value);\n }\n\n /** @ignore A bound is optional, and a string one is already native. */\n private toNativeBound(bound: Date | string | undefined): string | null {\n if (!bound) return null;\n return bound instanceof Date ? this.toNative(bound) : bound;\n }\n}\n","<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"true\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n>\n <!-- `filled` is hard-coded above, and it is not a shortcut: the browser draws its own\n `jj/mm/aaaa` template in the box, so this field is never visually empty. A floating\n label at rest would sit on top of that template. -->\n <input\n #inputEl\n class=\"ui-input-date-native\"\n [class._small]=\"size() === 'small'\"\n [type]=\"nativeType()\"\n [id]=\"resolvedId()\"\n [value]=\"nativeValue()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.min]=\"nativeMin()\"\n [attr.max]=\"nativeMax()\"\n [attr.step]=\"step() ?? null\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"resolvedAriaDescribedBy()\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (change)=\"onNativeChange()\"\n (focus)=\"inputFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n />\n</ui-field>\n","/*\n * Public API Surface of ui-kit/ui-input-date\n */\n\nexport * from './lib/ui-input-date';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAmCA;AACA,MAAM,WAAW,GAAkC;AACjD,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,QAAQ,EAAE,gBAAgB;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;AAUG,MAAO,WAAY,SAAQ,aAA6B,CAAA;AAT9D,IAAA,WAAA,GAAA;;;QAWE,IAAA,CAAA,IAAI,GAAG,KAAK,CAAgB,MAAM;iFAAC;AACnC;;;;AAIG;QACH,IAAA,CAAA,SAAS,GAAG,KAAK,CAAqB,MAAM;sFAAC;;AAE7C,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK;2FAAiB;;AAE5B,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK;2FAAiB;AAC5B;;;AAGG;QACH,IAAA,CAAA,IAAI,GAAG,KAAK,CAAkB,SAAS,4EAAI,SAAS,EAAE,eAAe,EAAA,CAAG;;QAGxE,IAAA,CAAA,WAAW,GAAG,MAAM,EAAkB;;QAEtC,IAAA,CAAA,UAAU,GAAG,MAAM,EAAc;;QAEjC,IAAA,CAAA,SAAS,GAAG,MAAM,EAAc;;AAGf,QAAA,IAAA,CAAA,OAAO,GAAG,SAAS,CAAC,QAAQ,CAA+B,SAAS;oFAAC;;AAGnE,QAAA,IAAA,CAAA,UAAU,GAAG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AAiB,EAAE,WAAW,EAAE,UAAU,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;AACxF,qBAAA,EAAA,QAAA,EAAA,48CAAA,EAAA,MAAA,EAAA,CAAA,6vCAAA,CAAA,EAAA;8qBA6B2E,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEvGvF;;AAEG;;ACFH;;AAEG;;"}
1
+ {"version":3,"file":"4sh-ui-kit-forms-ui-input-date.mjs","sources":["../../../projects/ui-kit/forms/ui-input-date/src/lib/ui-input-date.ts","../../../projects/ui-kit/forms/ui-input-date/src/lib/ui-input-date.html","../../../projects/ui-kit/forms/ui-input-date/src/public-api.ts","../../../projects/ui-kit/forms/ui-input-date/src/4sh-ui-kit-forms-ui-input-date.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n contentChild,\n ElementRef,\n forwardRef,\n input,\n numberAttribute,\n output,\n TemplateRef,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {\n BaseFormField,\n parseIsoDate,\n parseIsoDateTime,\n parseIsoTime,\n startOfDay,\n toIsoDate,\n toIsoDateTime,\n toIsoTime,\n} from '@4sh/ui-kit/forms';\nimport { UiField } from '@4sh/ui-kit/forms/ui-field';\nimport type { UiInputIconContext } from '@4sh/ui-kit/forms/ui-input';\nimport { UiIcon, type UiIconSize } from '@4sh/ui-kit/base/ui-icon';\n\n/** Granularity of the field — picks which native control the browser renders. */\nexport type InputDateMode = 'date' | 'time' | 'datetime';\n\n/**\n * Shape of the emitted value. **Identical to `ui-datepicker`'s**, so a host can swap one for\n * the other (native picker on mobile, overlay on desktop) without converting anything.\n */\nexport type InputDateValueType = 'date' | 'iso';\n\n/** Value carried by the field, whichever `valueType` is in force. */\nexport type InputDateValue = Date | string | null;\n\n/** `mode` → the native `type` that draws the OS picker. */\nconst NATIVE_TYPE: Record<InputDateMode, string> = {\n date: 'date',\n time: 'time',\n datetime: 'datetime-local',\n};\n\n/**\n * ui-input-date — **native** date/time field on the `ui-field` shell (label + box + helper).\n *\n * The picker belongs to the OS: the system wheel on mobile — which no overlay matches —\n * and the browser's own calendar on desktop. That is the whole reason this component\n * exists next to [`ui-datepicker`](../ui-datepicker), which owns the opposite trade: a\n * calendar carried by the design system, with ranges, multi-month and inline modes.\n *\n * It is a sibling of `ui-input`, not a variant of it: three things a text field cannot do\n * are settled here.\n *\n * 1. **The value is a date, not a string.** `valueType` commits to `Date` or to an ISO\n * string, exactly as `ui-datepicker` does — that alignment is what lets a host branch\n * between the two on viewport without converting anything.\n * 2. **It emits on `change`, never on `input`.** A native temporal control blanks its own\n * value while the entry is incomplete, so an `input`-driven field fires a burst of\n * empty values as the user types — indistinguishable from clearing the field, and quite\n * visible on an autosave or a dependent control.\n * 3. **The label stays raised.** The browser draws its own `jj/mm/aaaa` template in the\n * box, so a floating label at rest would land on top of it.\n *\n * No `placeholder`: the browser ignores it on these types, that template holding the spot.\n *\n * Standalone, `[(ngModel)]` or reactive forms (ControlValueAccessor via BaseFormField).\n */\n@Component({\n selector: 'ui-input-date',\n imports: [UiField, UiIcon, NgTemplateOutlet],\n templateUrl: './ui-input-date.html',\n styleUrl: './ui-input-date.scss',\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputDate), multi: true },\n ],\n})\nexport class UiInputDate extends BaseFormField<InputDateValue> {\n /** Granularity: a day, a time of day, or both. */\n mode = input<InputDateMode>('date');\n /**\n * Shape of the emitted value: `'date'` (a plain `Date`) or `'iso'` (`yyyy-MM-dd`, or\n * `yyyy-MM-ddTHH:mm` as soon as a time is part of it). Incoming values are accepted in\n * **either** shape whatever this says — only the emitted side commits.\n */\n valueType = input<InputDateValueType>('date');\n /** Earliest accepted value, as a `Date` or in the ISO shape of the current `mode`. */\n min = input<Date | string>();\n /** Latest accepted value, same two shapes as {@link min}. */\n max = input<Date | string>();\n /**\n * Native `step`: days on `date`, **seconds** on `time` / `datetime` (`900` = quarters of\n * an hour; the browser's own default is `60`, i.e. whole minutes).\n */\n step = input<number, unknown>(undefined, { transform: numberAttribute });\n\n icon = input<string>();\n showIcon = input(true, { transform: booleanAttribute });\n /** Accessible name of the picker button. Defaults per {@link mode}. */\n iconAriaLabel = input<string>();\n /** Custom icon, as an input: same context as `ui-input`'s / `ui-datepicker`'s. */\n iconTemplate = input<TemplateRef<UiInputIconContext>>();\n\n /** Emitted when the browser commits a value — never mid-entry. */\n valueChange = output<InputDateValue>();\n /** Emitted when the field receives focus. */\n inputFocus = output<FocusEvent>();\n /** Emitted when the field loses focus. */\n inputBlur = output<FocusEvent>();\n\n /** Custom icon: `<ng-template #icon let-name let-size=\"size\">`. */\n private readonly iconTemplateContent = contentChild<TemplateRef<UiInputIconContext>>('icon');\n\n /** @ignore */\n private readonly inputEl = viewChild.required<ElementRef<HTMLInputElement>>('inputEl');\n\n /** @ignore Icon size aligned with the field size, same pairing as `ui-input`. */\n protected readonly iconSize = computed<UiIconSize>(() => (this.size() === 'small' ? 'sm' : 'md'));\n /** @ignore Calendar, or clock when the field only carries a time. */\n protected readonly resolvedIcon = computed(\n () => this.icon() ?? (this.mode() === 'time' ? 'clock' : 'calendar'),\n );\n /** @ignore */\n protected readonly resolvedIconAriaLabel = computed(\n () =>\n this.iconAriaLabel() ??\n (this.mode() === 'time' ? \"Ouvrir le sélecteur d'heure\" : 'Ouvrir le calendrier'),\n );\n /** @ignore Input wins over the projected `#icon` template. */\n protected readonly resolvedIconTemplate = computed(\n () => this.iconTemplate() ?? this.iconTemplateContent(),\n );\n /** @ignore */\n protected readonly iconContext = computed<UiInputIconContext>(() => ({\n $implicit: this.resolvedIcon(),\n size: this.iconSize(),\n disabled: this.isDisabled(),\n }));\n\n /** @ignore The native `type` the OS picker hangs off. */\n protected readonly nativeType = computed(() => NATIVE_TYPE[this.mode()]);\n /** @ignore Whether the value carries a time — decides both serializers. */\n private readonly hasTimeComponent = computed(() => this.mode() !== 'date');\n\n /** @ignore Model → the string the native control reads, `''` when there is no value. */\n protected readonly nativeValue = computed(() => {\n const date = this.parseValue(this.modelValue() ?? null);\n return date ? this.toNative(date) : '';\n });\n /** @ignore Bounds go through the same serializer as the value: a caller may hand a `Date`\n * or an already-native string, the attribute only ever sees the latter. */\n protected readonly nativeMin = computed(() => this.toNativeBound(this.min()));\n /** @ignore */\n protected readonly nativeMax = computed(() => this.toNativeBound(this.max()));\n\n /** @ignore Full `aria-describedby`: the message id, only when a message is rendered. */\n protected readonly resolvedAriaDescribedBy = computed(() =>\n this.displayMessage() ? this.messageId() : null,\n );\n\n /** Focuses the field. */\n focus(options?: FocusOptions): void {\n this.inputEl().nativeElement.focus(options);\n }\n\n openPicker(): void {\n if (this.isDisabled() || this.readonly()) return;\n const el = this.inputEl().nativeElement;\n el.focus();\n try {\n el.showPicker();\n } catch {\n /* no picker to show */\n }\n }\n\n /** Native `<input>` element, for a composite host that needs direct DOM access. */\n nativeInputElement(): HTMLInputElement {\n return this.inputEl().nativeElement;\n }\n\n /** @ignore */\n protected override uidPrefix(): string {\n return 'ui-input-date';\n }\n\n /**\n * @ignore The browser committed a value — a complete one, or an empty one because the\n * field was cleared. This is the only place a value leaves the component: `input` fires\n * on every keystroke with the blanks in between, and is deliberately not listened to.\n */\n protected onNativeChange(): void {\n const raw = this.inputEl().nativeElement.value;\n const date = raw ? this.fromNative(raw) : null;\n const value = date ? this.serializeValue(date) : null;\n this.modelValue.set(value);\n this.emitChange(value);\n this.valueChange.emit(value);\n }\n\n /** @ignore */\n protected onBlur(event: FocusEvent): void {\n this.emitTouch();\n this.inputBlur.emit(event);\n }\n\n /** @ignore Internal `Date` → the shape `valueType` commits to. Mirrors `ui-datepicker`'s\n * own `serializeValue`, down to the fresh instance: the caller never gets a reference it\n * could mutate behind our back. */\n private serializeValue(date: Date): InputDateValue {\n if (this.valueType() === 'iso') return this.toNative(date);\n return this.hasTimeComponent() ? new Date(date) : startOfDay(date);\n }\n\n /** @ignore Incoming value, `Date` or ISO string, auto-detected — cloned when already a\n * `Date`, symmetric with {@link serializeValue}. */\n private parseValue(value: InputDateValue | undefined): Date | null {\n if (value === undefined || value === null || value === '') return null;\n return value instanceof Date ? new Date(value) : this.fromNative(value);\n }\n\n /** @ignore `Date` → the exact string the native control of this `mode` accepts. */\n private toNative(date: Date): string {\n if (this.mode() === 'time') return toIsoTime(date);\n return this.hasTimeComponent() ? toIsoDateTime(date) : toIsoDate(date);\n }\n\n /** @ignore The reverse. `null` on anything malformed — a bad value degrades to \"no value\"\n * rather than throwing, the browser being the one that produced it. */\n private fromNative(value: string): Date | null {\n if (this.mode() === 'time') return parseIsoTime(value);\n return this.hasTimeComponent() ? parseIsoDateTime(value) : parseIsoDate(value);\n }\n\n /** @ignore A bound is optional, and a string one is already native. */\n private toNativeBound(bound: Date | string | undefined): string | null {\n if (!bound) return null;\n return bound instanceof Date ? this.toNative(bound) : bound;\n }\n}\n","<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"true\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n>\n <!-- `filled` is hard-coded above, and it is not a shortcut: the browser draws its own\n `jj/mm/aaaa` template in the box, so this field is never visually empty. A floating\n label at rest would sit on top of that template. -->\n <input\n #inputEl\n class=\"ui-input-date-native\"\n [class._small]=\"size() === 'small'\"\n [type]=\"nativeType()\"\n [id]=\"resolvedId()\"\n [value]=\"nativeValue()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.min]=\"nativeMin()\"\n [attr.max]=\"nativeMax()\"\n [attr.step]=\"step() ?? null\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"resolvedAriaDescribedBy()\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (change)=\"onNativeChange()\"\n (focus)=\"inputFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n />\n\n @if (showIcon()) {\n <button\n uiFieldSuffix\n type=\"button\"\n tabindex=\"-1\"\n class=\"ui-input-date-action\"\n [attr.aria-label]=\"resolvedIconAriaLabel()\"\n [disabled]=\"isDisabled()\"\n (click)=\"openPicker()\"\n >\n @if (resolvedIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"iconContext()\" />\n } @else {\n <ui-icon [name]=\"resolvedIcon()\" [size]=\"iconSize()\" />\n }\n </button>\n }\n</ui-field>\n","/*\n * Public API Surface of ui-kit/ui-input-date\n */\n\nexport * from './lib/ui-input-date';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAyCA;AACA,MAAM,WAAW,GAAkC;AACjD,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,QAAQ,EAAE,gBAAgB;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;AAUG,MAAO,WAAY,SAAQ,aAA6B,CAAA;AAT9D,IAAA,WAAA,GAAA;;;QAWE,IAAA,CAAA,IAAI,GAAG,KAAK,CAAgB,MAAM;iFAAC;AACnC;;;;AAIG;QACH,IAAA,CAAA,SAAS,GAAG,KAAK,CAAqB,MAAM;sFAAC;;AAE7C,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK;2FAAiB;;AAE5B,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK;2FAAiB;AAC5B;;;AAGG;QACH,IAAA,CAAA,IAAI,GA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M,iEAGf,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEvHvF;;AAEG;;ACFH;;AAEG;;"}
@@ -138,14 +138,14 @@ class UiAlert {
138
138
  this.closed.emit();
139
139
  }
140
140
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiAlert, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
141
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: UiAlert, isStandalone: true, selector: "ui-alert", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, subLevel: { classPropertyName: "subLevel", publicName: "subLevel", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, closeIcon: { classPropertyName: "closeIcon", publicName: "closeIcon", isSignal: true, isRequired: false, transformFunction: null }, closeAriaLabel: { classPropertyName: "closeAriaLabel", publicName: "closeAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, life: { classPropertyName: "life", publicName: "life", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "style.display": "dismissed() ? 'none' : 'block'", "style.width": "'100%'" } }, ngImport: i0, template: "@if (!dismissed()) {\n <div\n [class]=\"classes()\"\n role=\"alert\"\n aria-atomic=\"true\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n >\n @if (iconName(); as name) {\n <span class=\"ui-alert-icon\">\n <ui-icon [name]=\"name\" [size]=\"iconSize()\" />\n </span>\n }\n\n <div class=\"ui-alert-content\">\n @if (title(); as t) {\n <span class=\"ui-alert-title\">{{ t }}</span>\n }\n @if (text(); as txt) {\n <span class=\"ui-alert-text\">{{ txt }}</span>\n }\n <ng-content />\n </div>\n\n @if (closable()) {\n <button\n type=\"button\"\n class=\"ui-alert-close\"\n [attr.aria-label]=\"closeAriaLabel()\"\n (click)=\"onClose()\"\n >\n <ui-icon [name]=\"closeIcon()\" [size]=\"closeIconSize()\" />\n </button>\n }\n </div>\n}\n", styles: [".ui-alert{display:flex;align-items:flex-start;gap:var(--ui-alert-gap, var(--units-sm));box-sizing:border-box;width:100%;padding:var(--ui-alert-padding-y, var(--units-sm)) var(--ui-alert-padding-x, var(--units-md));border:var(--ui-alert-stroke-width, var(--stroke-default)) solid transparent;border-radius:var(--ui-alert-radius, var(--radius-default));background-color:var(--ui-alert-surface, var(--informative-defaulthigh-surface-default));color:var(--ui-alert-color, var(--informative-defaulthigh-content-default));font-family:var(--ui-alert-font-family, var(--fontfamily-base));min-height:var(--ui-alert-min-height, 3.5rem)}.ui-alert .ui-alert-title{font-size:var(--ui-alert-title-font-size, var(--size-typography-title-sm))}.ui-alert .ui-alert-text{font-size:var(--ui-alert-text-font-size, var(--size-typography-text-md))}.ui-alert-icon{flex:0 0 auto;display:flex;align-items:center;padding-top:var(--ui-alert-icon-padding-top, var(--units-2xs));line-height:0}.ui-alert-content{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:var(--ui-alert-content-gap, var(--units-2xs));padding-right:var(--ui-alert-content-padding-right, var(--units-sm))}.ui-alert-title{font-family:var(--ui-alert-title-font-family, var(--fontfamily-title));font-weight:var(--ui-alert-title-weight, var(--weight-bold));line-height:1.3;overflow-wrap:break-word}.ui-alert-text{font-weight:var(--ui-alert-text-weight, var(--weight-light));line-height:1.3;overflow-wrap:break-word}.ui-alert-close{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:var(--ui-alert-close-radius, var(--radius-xs));background:transparent;color:inherit;line-height:0;cursor:pointer;opacity:var(--ui-alert-close-opacity, .7);transition:opacity var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms)}.ui-alert-close:hover{opacity:1}.ui-alert-close:focus-visible{outline:var(--ui-alert-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) solid currentColor;outline-offset:var(--ui-alert-focus-ring-offset, .125rem);opacity:1}@media(prefers-reduced-motion:reduce){.ui-alert-close{transition-duration:.01ms}}:root[data-motion=off] .ui-alert-close{transition-duration:.01ms}.ui-alert._large{min-height:var(--ui-alert-min-height-large, 4.125rem)}.ui-alert._large .ui-alert-title{font-size:var(--ui-alert-title-font-size-large, var(--size-typography-title-md))}.ui-alert._large .ui-alert-text{font-size:var(--ui-alert-text-font-size-large, var(--size-typography-text-lg))}.ui-alert._title-only{min-height:auto;align-items:center}.ui-alert._title-only .ui-alert-icon{padding-top:0}.ui-alert._default._high{background-color:var(--ui-alert-surface, var(--informative-defaulthigh-surface-default));color:var(--ui-alert-color, var(--informative-defaulthigh-content-default));border-color:var(--ui-alert-stroke, var(--informative-defaulthigh-stroke-default))}.ui-alert._default._low{background-color:var(--ui-alert-surface, var(--informative-defaultlow-surface-default));color:var(--ui-alert-color, var(--informative-defaultlow-content-default));border-color:var(--ui-alert-stroke, var(--informative-defaultlow-stroke-default))}.ui-alert._highlight._high{background-color:var(--ui-alert-surface, var(--informative-highlighthigh-surface-default));color:var(--ui-alert-color, var(--informative-highlighthigh-content-default));border-color:var(--ui-alert-stroke, var(--informative-highlighthigh-stroke-default))}.ui-alert._highlight._low{background-color:var(--ui-alert-surface, var(--informative-highlightlow-surface-default));color:var(--ui-alert-color, var(--informative-highlightlow-content-default));border-color:var(--ui-alert-stroke, var(--informative-highlightlow-stroke-default))}.ui-alert._success._high{background-color:var(--ui-alert-surface, var(--informative-successhigh-surface-default));color:var(--ui-alert-color, var(--informative-successhigh-content-default));border-color:var(--ui-alert-stroke, var(--informative-successhigh-stroke-default))}.ui-alert._success._low{background-color:var(--ui-alert-surface, var(--informative-successlow-surface-default));color:var(--ui-alert-color, var(--informative-successlow-content-default));border-color:var(--ui-alert-stroke, var(--informative-successlow-stroke-default))}.ui-alert._warning._high{background-color:var(--ui-alert-surface, var(--informative-warninghigh-surface-default));color:var(--ui-alert-color, var(--informative-warninghigh-content-default));border-color:var(--ui-alert-stroke, var(--informative-warninghigh-stroke-default))}.ui-alert._warning._low{background-color:var(--ui-alert-surface, var(--informative-warninglow-surface-default));color:var(--ui-alert-color, var(--informative-warninglow-content-default));border-color:var(--ui-alert-stroke, var(--informative-warninglow-stroke-default))}.ui-alert._error._high{background-color:var(--ui-alert-surface, var(--informative-errorhigh-surface-default));color:var(--ui-alert-color, var(--informative-errorhigh-content-default));border-color:var(--ui-alert-stroke, var(--informative-errorhigh-stroke-default))}.ui-alert._error._low{background-color:var(--ui-alert-surface, var(--informative-errorlow-surface-default));color:var(--ui-alert-color, var(--informative-errorlow-content-default));border-color:var(--ui-alert-stroke, var(--informative-errorlow-stroke-default))}\n"], dependencies: [{ kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }] }); }
141
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: UiAlert, isStandalone: true, selector: "ui-alert", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, subLevel: { classPropertyName: "subLevel", publicName: "subLevel", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, closeIcon: { classPropertyName: "closeIcon", publicName: "closeIcon", isSignal: true, isRequired: false, transformFunction: null }, closeAriaLabel: { classPropertyName: "closeAriaLabel", publicName: "closeAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, life: { classPropertyName: "life", publicName: "life", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "style.display": "dismissed() ? 'none' : 'block'", "style.width": "'100%'" } }, ngImport: i0, template: "@if (!dismissed()) {\n <div\n [class]=\"classes()\"\n role=\"alert\"\n aria-atomic=\"true\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n >\n @if (iconName(); as name) {\n <span class=\"ui-alert-icon\">\n <ui-icon [name]=\"name\" [size]=\"iconSize()\" />\n </span>\n }\n\n <div class=\"ui-alert-content\">\n @if (title(); as t) {\n <span class=\"ui-alert-title\">{{ t }}</span>\n }\n @if (text(); as txt) {\n <span class=\"ui-alert-text\">{{ txt }}</span>\n }\n <ng-content />\n </div>\n\n @if (closable()) {\n <button\n type=\"button\"\n class=\"ui-alert-close\"\n [attr.aria-label]=\"closeAriaLabel()\"\n (click)=\"onClose()\"\n >\n <ui-icon [name]=\"closeIcon()\" [size]=\"closeIconSize()\" />\n </button>\n }\n </div>\n}\n", styles: [".ui-alert{display:flex;align-items:var(--ui-alert-align, flex-start);gap:var(--ui-alert-gap, var(--units-sm));box-sizing:border-box;width:100%;padding:var(--ui-alert-padding-y, var(--units-sm)) var(--ui-alert-padding-x, var(--units-md));border:var(--ui-alert-stroke-width, var(--stroke-default)) solid transparent;border-radius:var(--ui-alert-radius, var(--radius-default));background-color:var(--ui-alert-surface, var(--informative-defaulthigh-surface-default));color:var(--ui-alert-color, var(--informative-defaulthigh-content-default));font-family:var(--ui-alert-font-family, var(--fontfamily-base));min-height:var(--ui-alert-min-height, 3.5rem)}.ui-alert .ui-alert-title{font-size:var(--ui-alert-title-font-size, var(--size-typography-title-sm))}.ui-alert .ui-alert-text{font-size:var(--ui-alert-text-font-size, var(--size-typography-text-md))}.ui-alert-icon{flex:0 0 auto;display:flex;align-items:center;align-self:var(--ui-alert-icon-align, auto);padding-top:var(--ui-alert-icon-padding-top, var(--units-2xs));line-height:0}.ui-alert-content{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:var(--ui-alert-content-gap, var(--units-2xs));padding-right:var(--ui-alert-content-padding-right, var(--units-sm))}.ui-alert-title{font-family:var(--ui-alert-title-font-family, var(--fontfamily-title));font-weight:var(--ui-alert-title-weight, var(--weight-bold));line-height:1.3;overflow-wrap:break-word}.ui-alert-text{font-weight:var(--ui-alert-text-weight, var(--weight-light));line-height:1.3;overflow-wrap:break-word}.ui-alert-close{flex:0 0 auto;display:inline-flex;align-items:center;align-self:var(--ui-alert-close-align, auto);justify-content:center;padding:0;border:0;border-radius:var(--ui-alert-close-radius, var(--radius-xs));background:transparent;color:inherit;line-height:0;cursor:pointer;opacity:var(--ui-alert-close-opacity, .7);transition:opacity var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms)}.ui-alert-close:hover{opacity:1}.ui-alert-close:focus-visible{outline:var(--ui-alert-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) solid currentColor;outline-offset:var(--ui-alert-focus-ring-offset, .125rem);opacity:1}@media(prefers-reduced-motion:reduce){.ui-alert-close{transition-duration:.01ms}}:root[data-motion=off] .ui-alert-close{transition-duration:.01ms}.ui-alert._large{min-height:var(--ui-alert-min-height-large, 4.125rem)}.ui-alert._large .ui-alert-title{font-size:var(--ui-alert-title-font-size-large, var(--size-typography-title-md))}.ui-alert._large .ui-alert-text{font-size:var(--ui-alert-text-font-size-large, var(--size-typography-text-lg))}.ui-alert._title-only{min-height:auto;align-items:center}.ui-alert._title-only .ui-alert-icon{padding-top:0}.ui-alert._default._high{background-color:var(--ui-alert-surface, var(--informative-defaulthigh-surface-default));color:var(--ui-alert-color, var(--informative-defaulthigh-content-default));border-color:var(--ui-alert-stroke, var(--informative-defaulthigh-stroke-default))}.ui-alert._default._low{background-color:var(--ui-alert-surface, var(--informative-defaultlow-surface-default));color:var(--ui-alert-color, var(--informative-defaultlow-content-default));border-color:var(--ui-alert-stroke, var(--informative-defaultlow-stroke-default))}.ui-alert._highlight._high{background-color:var(--ui-alert-surface, var(--informative-highlighthigh-surface-default));color:var(--ui-alert-color, var(--informative-highlighthigh-content-default));border-color:var(--ui-alert-stroke, var(--informative-highlighthigh-stroke-default))}.ui-alert._highlight._low{background-color:var(--ui-alert-surface, var(--informative-highlightlow-surface-default));color:var(--ui-alert-color, var(--informative-highlightlow-content-default));border-color:var(--ui-alert-stroke, var(--informative-highlightlow-stroke-default))}.ui-alert._success._high{background-color:var(--ui-alert-surface, var(--informative-successhigh-surface-default));color:var(--ui-alert-color, var(--informative-successhigh-content-default));border-color:var(--ui-alert-stroke, var(--informative-successhigh-stroke-default))}.ui-alert._success._low{background-color:var(--ui-alert-surface, var(--informative-successlow-surface-default));color:var(--ui-alert-color, var(--informative-successlow-content-default));border-color:var(--ui-alert-stroke, var(--informative-successlow-stroke-default))}.ui-alert._warning._high{background-color:var(--ui-alert-surface, var(--informative-warninghigh-surface-default));color:var(--ui-alert-color, var(--informative-warninghigh-content-default));border-color:var(--ui-alert-stroke, var(--informative-warninghigh-stroke-default))}.ui-alert._warning._low{background-color:var(--ui-alert-surface, var(--informative-warninglow-surface-default));color:var(--ui-alert-color, var(--informative-warninglow-content-default));border-color:var(--ui-alert-stroke, var(--informative-warninglow-stroke-default))}.ui-alert._error._high{background-color:var(--ui-alert-surface, var(--informative-errorhigh-surface-default));color:var(--ui-alert-color, var(--informative-errorhigh-content-default));border-color:var(--ui-alert-stroke, var(--informative-errorhigh-stroke-default))}.ui-alert._error._low{background-color:var(--ui-alert-surface, var(--informative-errorlow-surface-default));color:var(--ui-alert-color, var(--informative-errorlow-content-default));border-color:var(--ui-alert-stroke, var(--informative-errorlow-stroke-default))}\n"], dependencies: [{ kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }] }); }
142
142
  }
143
143
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiAlert, decorators: [{
144
144
  type: Component,
145
145
  args: [{ selector: 'ui-alert', imports: [UiIcon], host: {
146
146
  '[style.display]': "dismissed() ? 'none' : 'block'",
147
147
  '[style.width]': "'100%'",
148
- }, template: "@if (!dismissed()) {\n <div\n [class]=\"classes()\"\n role=\"alert\"\n aria-atomic=\"true\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n >\n @if (iconName(); as name) {\n <span class=\"ui-alert-icon\">\n <ui-icon [name]=\"name\" [size]=\"iconSize()\" />\n </span>\n }\n\n <div class=\"ui-alert-content\">\n @if (title(); as t) {\n <span class=\"ui-alert-title\">{{ t }}</span>\n }\n @if (text(); as txt) {\n <span class=\"ui-alert-text\">{{ txt }}</span>\n }\n <ng-content />\n </div>\n\n @if (closable()) {\n <button\n type=\"button\"\n class=\"ui-alert-close\"\n [attr.aria-label]=\"closeAriaLabel()\"\n (click)=\"onClose()\"\n >\n <ui-icon [name]=\"closeIcon()\" [size]=\"closeIconSize()\" />\n </button>\n }\n </div>\n}\n", styles: [".ui-alert{display:flex;align-items:flex-start;gap:var(--ui-alert-gap, var(--units-sm));box-sizing:border-box;width:100%;padding:var(--ui-alert-padding-y, var(--units-sm)) var(--ui-alert-padding-x, var(--units-md));border:var(--ui-alert-stroke-width, var(--stroke-default)) solid transparent;border-radius:var(--ui-alert-radius, var(--radius-default));background-color:var(--ui-alert-surface, var(--informative-defaulthigh-surface-default));color:var(--ui-alert-color, var(--informative-defaulthigh-content-default));font-family:var(--ui-alert-font-family, var(--fontfamily-base));min-height:var(--ui-alert-min-height, 3.5rem)}.ui-alert .ui-alert-title{font-size:var(--ui-alert-title-font-size, var(--size-typography-title-sm))}.ui-alert .ui-alert-text{font-size:var(--ui-alert-text-font-size, var(--size-typography-text-md))}.ui-alert-icon{flex:0 0 auto;display:flex;align-items:center;padding-top:var(--ui-alert-icon-padding-top, var(--units-2xs));line-height:0}.ui-alert-content{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:var(--ui-alert-content-gap, var(--units-2xs));padding-right:var(--ui-alert-content-padding-right, var(--units-sm))}.ui-alert-title{font-family:var(--ui-alert-title-font-family, var(--fontfamily-title));font-weight:var(--ui-alert-title-weight, var(--weight-bold));line-height:1.3;overflow-wrap:break-word}.ui-alert-text{font-weight:var(--ui-alert-text-weight, var(--weight-light));line-height:1.3;overflow-wrap:break-word}.ui-alert-close{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:var(--ui-alert-close-radius, var(--radius-xs));background:transparent;color:inherit;line-height:0;cursor:pointer;opacity:var(--ui-alert-close-opacity, .7);transition:opacity var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms)}.ui-alert-close:hover{opacity:1}.ui-alert-close:focus-visible{outline:var(--ui-alert-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) solid currentColor;outline-offset:var(--ui-alert-focus-ring-offset, .125rem);opacity:1}@media(prefers-reduced-motion:reduce){.ui-alert-close{transition-duration:.01ms}}:root[data-motion=off] .ui-alert-close{transition-duration:.01ms}.ui-alert._large{min-height:var(--ui-alert-min-height-large, 4.125rem)}.ui-alert._large .ui-alert-title{font-size:var(--ui-alert-title-font-size-large, var(--size-typography-title-md))}.ui-alert._large .ui-alert-text{font-size:var(--ui-alert-text-font-size-large, var(--size-typography-text-lg))}.ui-alert._title-only{min-height:auto;align-items:center}.ui-alert._title-only .ui-alert-icon{padding-top:0}.ui-alert._default._high{background-color:var(--ui-alert-surface, var(--informative-defaulthigh-surface-default));color:var(--ui-alert-color, var(--informative-defaulthigh-content-default));border-color:var(--ui-alert-stroke, var(--informative-defaulthigh-stroke-default))}.ui-alert._default._low{background-color:var(--ui-alert-surface, var(--informative-defaultlow-surface-default));color:var(--ui-alert-color, var(--informative-defaultlow-content-default));border-color:var(--ui-alert-stroke, var(--informative-defaultlow-stroke-default))}.ui-alert._highlight._high{background-color:var(--ui-alert-surface, var(--informative-highlighthigh-surface-default));color:var(--ui-alert-color, var(--informative-highlighthigh-content-default));border-color:var(--ui-alert-stroke, var(--informative-highlighthigh-stroke-default))}.ui-alert._highlight._low{background-color:var(--ui-alert-surface, var(--informative-highlightlow-surface-default));color:var(--ui-alert-color, var(--informative-highlightlow-content-default));border-color:var(--ui-alert-stroke, var(--informative-highlightlow-stroke-default))}.ui-alert._success._high{background-color:var(--ui-alert-surface, var(--informative-successhigh-surface-default));color:var(--ui-alert-color, var(--informative-successhigh-content-default));border-color:var(--ui-alert-stroke, var(--informative-successhigh-stroke-default))}.ui-alert._success._low{background-color:var(--ui-alert-surface, var(--informative-successlow-surface-default));color:var(--ui-alert-color, var(--informative-successlow-content-default));border-color:var(--ui-alert-stroke, var(--informative-successlow-stroke-default))}.ui-alert._warning._high{background-color:var(--ui-alert-surface, var(--informative-warninghigh-surface-default));color:var(--ui-alert-color, var(--informative-warninghigh-content-default));border-color:var(--ui-alert-stroke, var(--informative-warninghigh-stroke-default))}.ui-alert._warning._low{background-color:var(--ui-alert-surface, var(--informative-warninglow-surface-default));color:var(--ui-alert-color, var(--informative-warninglow-content-default));border-color:var(--ui-alert-stroke, var(--informative-warninglow-stroke-default))}.ui-alert._error._high{background-color:var(--ui-alert-surface, var(--informative-errorhigh-surface-default));color:var(--ui-alert-color, var(--informative-errorhigh-content-default));border-color:var(--ui-alert-stroke, var(--informative-errorhigh-stroke-default))}.ui-alert._error._low{background-color:var(--ui-alert-surface, var(--informative-errorlow-surface-default));color:var(--ui-alert-color, var(--informative-errorlow-content-default));border-color:var(--ui-alert-stroke, var(--informative-errorlow-stroke-default))}\n"] }]
148
+ }, template: "@if (!dismissed()) {\n <div\n [class]=\"classes()\"\n role=\"alert\"\n aria-atomic=\"true\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n >\n @if (iconName(); as name) {\n <span class=\"ui-alert-icon\">\n <ui-icon [name]=\"name\" [size]=\"iconSize()\" />\n </span>\n }\n\n <div class=\"ui-alert-content\">\n @if (title(); as t) {\n <span class=\"ui-alert-title\">{{ t }}</span>\n }\n @if (text(); as txt) {\n <span class=\"ui-alert-text\">{{ txt }}</span>\n }\n <ng-content />\n </div>\n\n @if (closable()) {\n <button\n type=\"button\"\n class=\"ui-alert-close\"\n [attr.aria-label]=\"closeAriaLabel()\"\n (click)=\"onClose()\"\n >\n <ui-icon [name]=\"closeIcon()\" [size]=\"closeIconSize()\" />\n </button>\n }\n </div>\n}\n", styles: [".ui-alert{display:flex;align-items:var(--ui-alert-align, flex-start);gap:var(--ui-alert-gap, var(--units-sm));box-sizing:border-box;width:100%;padding:var(--ui-alert-padding-y, var(--units-sm)) var(--ui-alert-padding-x, var(--units-md));border:var(--ui-alert-stroke-width, var(--stroke-default)) solid transparent;border-radius:var(--ui-alert-radius, var(--radius-default));background-color:var(--ui-alert-surface, var(--informative-defaulthigh-surface-default));color:var(--ui-alert-color, var(--informative-defaulthigh-content-default));font-family:var(--ui-alert-font-family, var(--fontfamily-base));min-height:var(--ui-alert-min-height, 3.5rem)}.ui-alert .ui-alert-title{font-size:var(--ui-alert-title-font-size, var(--size-typography-title-sm))}.ui-alert .ui-alert-text{font-size:var(--ui-alert-text-font-size, var(--size-typography-text-md))}.ui-alert-icon{flex:0 0 auto;display:flex;align-items:center;align-self:var(--ui-alert-icon-align, auto);padding-top:var(--ui-alert-icon-padding-top, var(--units-2xs));line-height:0}.ui-alert-content{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:var(--ui-alert-content-gap, var(--units-2xs));padding-right:var(--ui-alert-content-padding-right, var(--units-sm))}.ui-alert-title{font-family:var(--ui-alert-title-font-family, var(--fontfamily-title));font-weight:var(--ui-alert-title-weight, var(--weight-bold));line-height:1.3;overflow-wrap:break-word}.ui-alert-text{font-weight:var(--ui-alert-text-weight, var(--weight-light));line-height:1.3;overflow-wrap:break-word}.ui-alert-close{flex:0 0 auto;display:inline-flex;align-items:center;align-self:var(--ui-alert-close-align, auto);justify-content:center;padding:0;border:0;border-radius:var(--ui-alert-close-radius, var(--radius-xs));background:transparent;color:inherit;line-height:0;cursor:pointer;opacity:var(--ui-alert-close-opacity, .7);transition:opacity var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms)}.ui-alert-close:hover{opacity:1}.ui-alert-close:focus-visible{outline:var(--ui-alert-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) solid currentColor;outline-offset:var(--ui-alert-focus-ring-offset, .125rem);opacity:1}@media(prefers-reduced-motion:reduce){.ui-alert-close{transition-duration:.01ms}}:root[data-motion=off] .ui-alert-close{transition-duration:.01ms}.ui-alert._large{min-height:var(--ui-alert-min-height-large, 4.125rem)}.ui-alert._large .ui-alert-title{font-size:var(--ui-alert-title-font-size-large, var(--size-typography-title-md))}.ui-alert._large .ui-alert-text{font-size:var(--ui-alert-text-font-size-large, var(--size-typography-text-lg))}.ui-alert._title-only{min-height:auto;align-items:center}.ui-alert._title-only .ui-alert-icon{padding-top:0}.ui-alert._default._high{background-color:var(--ui-alert-surface, var(--informative-defaulthigh-surface-default));color:var(--ui-alert-color, var(--informative-defaulthigh-content-default));border-color:var(--ui-alert-stroke, var(--informative-defaulthigh-stroke-default))}.ui-alert._default._low{background-color:var(--ui-alert-surface, var(--informative-defaultlow-surface-default));color:var(--ui-alert-color, var(--informative-defaultlow-content-default));border-color:var(--ui-alert-stroke, var(--informative-defaultlow-stroke-default))}.ui-alert._highlight._high{background-color:var(--ui-alert-surface, var(--informative-highlighthigh-surface-default));color:var(--ui-alert-color, var(--informative-highlighthigh-content-default));border-color:var(--ui-alert-stroke, var(--informative-highlighthigh-stroke-default))}.ui-alert._highlight._low{background-color:var(--ui-alert-surface, var(--informative-highlightlow-surface-default));color:var(--ui-alert-color, var(--informative-highlightlow-content-default));border-color:var(--ui-alert-stroke, var(--informative-highlightlow-stroke-default))}.ui-alert._success._high{background-color:var(--ui-alert-surface, var(--informative-successhigh-surface-default));color:var(--ui-alert-color, var(--informative-successhigh-content-default));border-color:var(--ui-alert-stroke, var(--informative-successhigh-stroke-default))}.ui-alert._success._low{background-color:var(--ui-alert-surface, var(--informative-successlow-surface-default));color:var(--ui-alert-color, var(--informative-successlow-content-default));border-color:var(--ui-alert-stroke, var(--informative-successlow-stroke-default))}.ui-alert._warning._high{background-color:var(--ui-alert-surface, var(--informative-warninghigh-surface-default));color:var(--ui-alert-color, var(--informative-warninghigh-content-default));border-color:var(--ui-alert-stroke, var(--informative-warninghigh-stroke-default))}.ui-alert._warning._low{background-color:var(--ui-alert-surface, var(--informative-warninglow-surface-default));color:var(--ui-alert-color, var(--informative-warninglow-content-default));border-color:var(--ui-alert-stroke, var(--informative-warninglow-stroke-default))}.ui-alert._error._high{background-color:var(--ui-alert-surface, var(--informative-errorhigh-surface-default));color:var(--ui-alert-color, var(--informative-errorhigh-content-default));border-color:var(--ui-alert-stroke, var(--informative-errorhigh-stroke-default))}.ui-alert._error._low{background-color:var(--ui-alert-surface, var(--informative-errorlow-surface-default));color:var(--ui-alert-color, var(--informative-errorlow-content-default));border-color:var(--ui-alert-stroke, var(--informative-errorlow-stroke-default))}\n"] }]
149
149
  }], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], subLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "subLevel", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], closeIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeIcon", required: false }] }], closeAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeAriaLabel", required: false }] }], life: [{ type: i0.Input, args: [{ isSignal: true, alias: "life", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
150
150
 
151
151
  /*
@@ -1 +1 @@
1
- {"version":3,"file":"4sh-ui-kit-informative-ui-alert.mjs","sources":["../../../projects/ui-kit/informative/ui-alert/src/lib/ui-alert.types.ts","../../../projects/ui-kit/informative/ui-alert/src/lib/ui-alert.ts","../../../projects/ui-kit/informative/ui-alert/src/lib/ui-alert.html","../../../projects/ui-kit/informative/ui-alert/src/public-api.ts","../../../projects/ui-kit/informative/ui-alert/src/4sh-ui-kit-informative-ui-alert.ts"],"sourcesContent":["import { UiFeedbackLevel } from '@4sh/ui-kit/types';\n\n/** Rendered scale of an alert. `default` = base, `large` = comfortable. */\nexport type UiAlertSize = 'default' | 'large';\n\n/**\n * Default leading icon per semantic level (FontAwesome names, from the Figma\n * source). Overridable per instance through the `icon` input.\n */\nexport const UI_ALERT_DEFAULT_ICONS: Record<UiFeedbackLevel, string> = {\n default: 'info-circle',\n highlight: 'info-circle',\n success: 'check',\n warning: 'warning',\n error: 'times',\n};\n","import {\n afterNextRender,\n booleanAttribute,\n Component,\n computed,\n DestroyRef,\n inject,\n input,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport { UiIcon } from '@4sh/ui-kit/base/ui-icon';\nimport { UiFeedbackLevel, UiSubLevel } from '@4sh/ui-kit/types';\nimport { UI_ALERT_DEFAULT_ICONS, UiAlertSize } from './ui-alert.types';\n\n/**\n * ui-alert — inline message for informational, success, warning or error feedback.\n *\n * Headless & fully token-driven (the `informative` category): surface, content\n * and stroke all come from `--informative-{level}{sub}-*`. It renders the Figma\n * anatomy (leading icon · title/text · dismiss button) and projects `<ng-content>`\n * in the content region for custom bodies or action buttons.\n *\n * The root carries `role=\"alert\"` (implicit `aria-live=\"assertive\"` +\n * `aria-atomic=\"true\"`), so screen readers announce it as soon as it appears —\n * ideal for form validation summaries or transient status banners. Set `life`\n * to auto-dismiss after a delay; the alert hides itself and emits `closed`.\n *\n * Unlike {@link UiToast} (a floating, service-driven notification), `ui-alert`\n * is a plain inline block — drop it in the page flow, a form, or a `@for` loop.\n *\n * @example\n * ```html\n * <ui-alert level=\"error\" title=\"Erreur\" text=\"Le formulaire est invalide.\" />\n * <ui-alert level=\"success\" text=\"Enregistré.\" [life]=\"4000\" (closed)=\"onClose()\" />\n * ```\n */\n@Component({\n selector: 'ui-alert',\n imports: [UiIcon],\n templateUrl: './ui-alert.html',\n styleUrl: './ui-alert.scss',\n host: {\n '[style.display]': \"dismissed() ? 'none' : 'block'\",\n '[style.width]': \"'100%'\",\n },\n})\nexport class UiAlert {\n private readonly destroyRef = inject(DestroyRef);\n\n /** Bold heading line. */\n title = input<string>();\n /** Supporting body line. */\n text = input<string>();\n /** Semantic level — colours + default icon. */\n level = input<UiFeedbackLevel>('default');\n /** Hierarchical intensity (`high` = solid, `low` = subtle). */\n subLevel = input<UiSubLevel>('high');\n /** Rendered scale (`default` | `large`). */\n size = input<UiAlertSize>('default');\n /**\n * Leading icon: a FontAwesome name to override the level default, `false`\n * to hide it, or `true` (default) for the level's default icon.\n */\n icon = input<string | boolean>(true);\n /** Show the dismiss button (default `true`). */\n closable = input(true, { transform: booleanAttribute });\n /** FontAwesome name of the dismiss icon. */\n closeIcon = input<string>('times-circle');\n /** Accessible label of the dismiss button. */\n closeAriaLabel = input<string>('Fermer');\n /** Auto-dismiss delay in ms. `0` (default) never auto-dismisses. */\n life = input(0, { transform: numberAttribute });\n /** Accessible label of the alert region (screen readers). */\n ariaLabel = input<string>();\n /** id of the element labelling the alert region. */\n ariaLabelledBy = input<string>();\n /** Extra class(es) merged onto the alert root. */\n styleClass = input<string>();\n\n /** Emitted when the alert is dismissed (close button or `life` expiry). */\n closed = output<void>();\n\n /** @ignore Hidden after a dismiss so the close button works standalone. */\n protected readonly dismissed = signal(false);\n\n /** @ignore Resolved leading icon name (null when hidden). */\n protected readonly iconName = computed<string | null>(() => {\n const icon = this.icon();\n if (icon === false) return null;\n if (typeof icon === 'string') return icon;\n return UI_ALERT_DEFAULT_ICONS[this.level()];\n });\n\n /** @ignore Leading icon size follows the alert size (Figma). */\n protected readonly iconSize = computed(() => (this.size() === 'large' ? 'default' : 'md'));\n\n /** @ignore Dismiss icon size follows the alert size (Figma). */\n protected readonly closeIconSize = computed(() => (this.size() === 'large' ? 'md' : 'sm'));\n\n /** @ignore Alert has only a title (no text, no projected content). */\n protected readonly isTitleOnly = computed(() => !!this.title() && !this.text());\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-alert', `_${this.level()}`, `_${this.subLevel()}`];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.isTitleOnly()) c.push('_title-only');\n const sc = this.styleClass();\n if (sc) c.push(sc);\n return c.join(' ');\n });\n\n constructor() {\n // Auto-dismiss timer (browser only). setTimeout — not rAF — so it still\n // fires in a throttled/background tab. Cleared if destroyed first.\n afterNextRender(() => {\n const life = this.life();\n if (life > 0) {\n const id = setTimeout(() => this.dismiss(), life);\n this.destroyRef.onDestroy(() => clearTimeout(id));\n }\n });\n }\n\n /** @ignore */\n protected onClose(): void {\n this.dismiss();\n }\n\n /** @ignore Hide the alert and notify the parent. */\n private dismiss(): void {\n if (this.dismissed()) return;\n this.dismissed.set(true);\n this.closed.emit();\n }\n}\n","@if (!dismissed()) {\n <div\n [class]=\"classes()\"\n role=\"alert\"\n aria-atomic=\"true\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n >\n @if (iconName(); as name) {\n <span class=\"ui-alert-icon\">\n <ui-icon [name]=\"name\" [size]=\"iconSize()\" />\n </span>\n }\n\n <div class=\"ui-alert-content\">\n @if (title(); as t) {\n <span class=\"ui-alert-title\">{{ t }}</span>\n }\n @if (text(); as txt) {\n <span class=\"ui-alert-text\">{{ txt }}</span>\n }\n <ng-content />\n </div>\n\n @if (closable()) {\n <button\n type=\"button\"\n class=\"ui-alert-close\"\n [attr.aria-label]=\"closeAriaLabel()\"\n (click)=\"onClose()\"\n >\n <ui-icon [name]=\"closeIcon()\" [size]=\"closeIconSize()\" />\n </button>\n }\n </div>\n}\n","/*\n * Public API Surface of ui-kit/ui-alert\n */\n\nexport * from './lib/ui-alert';\nexport * from './lib/ui-alert.types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAKA;;;AAGG;AACI,MAAM,sBAAsB,GAAoC;AACrE,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,SAAS,EAAE,aAAa;AACxB,IAAA,OAAO,EAAE,OAAO;AAChB,IAAA,OAAO,EAAE,SAAS;AACl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AAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,gCAAA,EAAA,aAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EChDpB,44BAoCA,EAAA,MAAA,EAAA,CAAA,+yKAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDIY,MAAM,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,YAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAQL,OAAO,EAAA,UAAA,EAAA,CAAA;kBAVnB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,EAAA,OAAA,EACX,CAAC,MAAM,CAAC,EAAA,IAAA,EAGX;AACJ,wBAAA,iBAAiB,EAAE,gCAAgC;AACnD,wBAAA,eAAe,EAAE,QAAQ;AAC1B,qBAAA,EAAA,QAAA,EAAA,44BAAA,EAAA,MAAA,EAAA,CAAA,+yKAAA,CAAA,EAAA;;;AE9CH;;AAEG;;ACFH;;AAEG;;"}
1
+ {"version":3,"file":"4sh-ui-kit-informative-ui-alert.mjs","sources":["../../../projects/ui-kit/informative/ui-alert/src/lib/ui-alert.types.ts","../../../projects/ui-kit/informative/ui-alert/src/lib/ui-alert.ts","../../../projects/ui-kit/informative/ui-alert/src/lib/ui-alert.html","../../../projects/ui-kit/informative/ui-alert/src/public-api.ts","../../../projects/ui-kit/informative/ui-alert/src/4sh-ui-kit-informative-ui-alert.ts"],"sourcesContent":["import { UiFeedbackLevel } from '@4sh/ui-kit/types';\n\n/** Rendered scale of an alert. `default` = base, `large` = comfortable. */\nexport type UiAlertSize = 'default' | 'large';\n\n/**\n * Default leading icon per semantic level (FontAwesome names, from the Figma\n * source). Overridable per instance through the `icon` input.\n */\nexport const UI_ALERT_DEFAULT_ICONS: Record<UiFeedbackLevel, string> = {\n default: 'info-circle',\n highlight: 'info-circle',\n success: 'check',\n warning: 'warning',\n error: 'times',\n};\n","import {\n afterNextRender,\n booleanAttribute,\n Component,\n computed,\n DestroyRef,\n inject,\n input,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport { UiIcon } from '@4sh/ui-kit/base/ui-icon';\nimport { UiFeedbackLevel, UiSubLevel } from '@4sh/ui-kit/types';\nimport { UI_ALERT_DEFAULT_ICONS, UiAlertSize } from './ui-alert.types';\n\n/**\n * ui-alert — inline message for informational, success, warning or error feedback.\n *\n * Headless & fully token-driven (the `informative` category): surface, content\n * and stroke all come from `--informative-{level}{sub}-*`. It renders the Figma\n * anatomy (leading icon · title/text · dismiss button) and projects `<ng-content>`\n * in the content region for custom bodies or action buttons.\n *\n * The root carries `role=\"alert\"` (implicit `aria-live=\"assertive\"` +\n * `aria-atomic=\"true\"`), so screen readers announce it as soon as it appears —\n * ideal for form validation summaries or transient status banners. Set `life`\n * to auto-dismiss after a delay; the alert hides itself and emits `closed`.\n *\n * Unlike {@link UiToast} (a floating, service-driven notification), `ui-alert`\n * is a plain inline block — drop it in the page flow, a form, or a `@for` loop.\n *\n * @example\n * ```html\n * <ui-alert level=\"error\" title=\"Erreur\" text=\"Le formulaire est invalide.\" />\n * <ui-alert level=\"success\" text=\"Enregistré.\" [life]=\"4000\" (closed)=\"onClose()\" />\n * ```\n */\n@Component({\n selector: 'ui-alert',\n imports: [UiIcon],\n templateUrl: './ui-alert.html',\n styleUrl: './ui-alert.scss',\n host: {\n '[style.display]': \"dismissed() ? 'none' : 'block'\",\n '[style.width]': \"'100%'\",\n },\n})\nexport class UiAlert {\n private readonly destroyRef = inject(DestroyRef);\n\n /** Bold heading line. */\n title = input<string>();\n /** Supporting body line. */\n text = input<string>();\n /** Semantic level — colours + default icon. */\n level = input<UiFeedbackLevel>('default');\n /** Hierarchical intensity (`high` = solid, `low` = subtle). */\n subLevel = input<UiSubLevel>('high');\n /** Rendered scale (`default` | `large`). */\n size = input<UiAlertSize>('default');\n /**\n * Leading icon: a FontAwesome name to override the level default, `false`\n * to hide it, or `true` (default) for the level's default icon.\n */\n icon = input<string | boolean>(true);\n /** Show the dismiss button (default `true`). */\n closable = input(true, { transform: booleanAttribute });\n /** FontAwesome name of the dismiss icon. */\n closeIcon = input<string>('times-circle');\n /** Accessible label of the dismiss button. */\n closeAriaLabel = input<string>('Fermer');\n /** Auto-dismiss delay in ms. `0` (default) never auto-dismisses. */\n life = input(0, { transform: numberAttribute });\n /** Accessible label of the alert region (screen readers). */\n ariaLabel = input<string>();\n /** id of the element labelling the alert region. */\n ariaLabelledBy = input<string>();\n /** Extra class(es) merged onto the alert root. */\n styleClass = input<string>();\n\n /** Emitted when the alert is dismissed (close button or `life` expiry). */\n closed = output<void>();\n\n /** @ignore Hidden after a dismiss so the close button works standalone. */\n protected readonly dismissed = signal(false);\n\n /** @ignore Resolved leading icon name (null when hidden). */\n protected readonly iconName = computed<string | null>(() => {\n const icon = this.icon();\n if (icon === false) return null;\n if (typeof icon === 'string') return icon;\n return UI_ALERT_DEFAULT_ICONS[this.level()];\n });\n\n /** @ignore Leading icon size follows the alert size (Figma). */\n protected readonly iconSize = computed(() => (this.size() === 'large' ? 'default' : 'md'));\n\n /** @ignore Dismiss icon size follows the alert size (Figma). */\n protected readonly closeIconSize = computed(() => (this.size() === 'large' ? 'md' : 'sm'));\n\n /** @ignore Alert has only a title (no text, no projected content). */\n protected readonly isTitleOnly = computed(() => !!this.title() && !this.text());\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-alert', `_${this.level()}`, `_${this.subLevel()}`];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.isTitleOnly()) c.push('_title-only');\n const sc = this.styleClass();\n if (sc) c.push(sc);\n return c.join(' ');\n });\n\n constructor() {\n // Auto-dismiss timer (browser only). setTimeout — not rAF — so it still\n // fires in a throttled/background tab. Cleared if destroyed first.\n afterNextRender(() => {\n const life = this.life();\n if (life > 0) {\n const id = setTimeout(() => this.dismiss(), life);\n this.destroyRef.onDestroy(() => clearTimeout(id));\n }\n });\n }\n\n /** @ignore */\n protected onClose(): void {\n this.dismiss();\n }\n\n /** @ignore Hide the alert and notify the parent. */\n private dismiss(): void {\n if (this.dismissed()) return;\n this.dismissed.set(true);\n this.closed.emit();\n }\n}\n","@if (!dismissed()) {\n <div\n [class]=\"classes()\"\n role=\"alert\"\n aria-atomic=\"true\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n >\n @if (iconName(); as name) {\n <span class=\"ui-alert-icon\">\n <ui-icon [name]=\"name\" [size]=\"iconSize()\" />\n </span>\n }\n\n <div class=\"ui-alert-content\">\n @if (title(); as t) {\n <span class=\"ui-alert-title\">{{ t }}</span>\n }\n @if (text(); as txt) {\n <span class=\"ui-alert-text\">{{ txt }}</span>\n }\n <ng-content />\n </div>\n\n @if (closable()) {\n <button\n type=\"button\"\n class=\"ui-alert-close\"\n [attr.aria-label]=\"closeAriaLabel()\"\n (click)=\"onClose()\"\n >\n <ui-icon [name]=\"closeIcon()\" [size]=\"closeIconSize()\" />\n </button>\n }\n </div>\n}\n","/*\n * Public API Surface of ui-kit/ui-alert\n */\n\nexport * from './lib/ui-alert';\nexport * from './lib/ui-alert.types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAKA;;;AAGG;AACI,MAAM,sBAAsB,GAAoC;AACrE,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,SAAS,EAAE,aAAa;AACxB,IAAA,OAAO,EAAE,O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EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,gCAAA,EAAA,aAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EChDpB,44BAoCA,EAAA,MAAA,EAAA,CAAA,+5KAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDIY,MAAM,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,YAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAQL,OAAO,EAAA,UAAA,EAAA,CAAA;kBAVnB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,EAAA,OAAA,EACX,CAAC,MAAM,CAAC,EAAA,IAAA,EAGX;AACJ,wBAAA,iBAAiB,EAAE,gCAAgC;AACnD,wBAAA,eAAe,EAAE,QAAQ;AAC1B,qBAAA,EAAA,QAAA,EAAA,44BAAA,EAAA,MAAA,EAAA,CAAA,+5KAAA,CAAA,EAAA;;;AE9CH;;AAEG;;ACFH;;AAEG;;"}
@@ -108,7 +108,7 @@ class UiToast {
108
108
  this.closed.emit(event);
109
109
  }
110
110
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiToast, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
111
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: UiToast, isStandalone: true, selector: "ui-toast", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, subLevel: { classPropertyName: "subLevel", publicName: "subLevel", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, closeIcon: { classPropertyName: "closeIcon", publicName: "closeIcon", isSignal: true, isRequired: false, transformFunction: null }, closeAriaLabel: { classPropertyName: "closeAriaLabel", publicName: "closeAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "style.display": "'inline-flex'", "style.maxWidth": "'100%'" } }, ngImport: i0, template: "<div [class]=\"classes()\" [attr.role]=\"role()\" [attr.aria-live]=\"ariaLive()\" aria-atomic=\"true\">\n @if (iconName(); as name) {\n <span class=\"ui-toast-icon\">\n <ui-icon [name]=\"name\" size=\"md\" />\n </span>\n }\n\n <div class=\"ui-toast-content\">\n @if (title(); as t) {\n <span class=\"ui-toast-title\">{{ t }}</span>\n }\n @if (text(); as txt) {\n <span class=\"ui-toast-text\">{{ txt }}</span>\n }\n <ng-content />\n </div>\n\n @if (closable()) {\n <button\n type=\"button\"\n class=\"ui-toast-close\"\n [attr.aria-label]=\"closeAriaLabel()\"\n (click)=\"onClose($event)\"\n >\n <ui-icon [name]=\"closeIcon()\" size=\"sm\" />\n </button>\n }\n</div>\n", styles: [".ui-toast{display:inline-flex;align-items:flex-start;gap:var(--units-sm);box-sizing:border-box;width:auto;max-width:100%;padding:var(--units-sm) var(--units-md);border:var(--stroke-default) solid transparent;border-radius:var(--radius-default);background-color:var(--ui-toast-surface, var(--informative-defaulthigh-surface-default));color:var(--ui-toast-color, var(--informative-defaulthigh-content-default));box-shadow:var(--shadow-default-md);font-family:var(--ui-toast-font-family, var(--fontfamily-base))}.ui-toast._expanded{display:flex;width:100%}.ui-toast-icon{flex:0 0 auto;display:flex;align-items:center;padding-top:var(--units-2xs);line-height:0}.ui-toast-content{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:var(--units-2xs);padding-right:var(--units-sm)}.ui-toast-title{font-family:var(--ui-toast-title-font-family, var(--fontfamily-title));font-weight:var(--ui-toast-title-weight, var(--weight-bold));font-size:var(--size-typography-title-sm);line-height:1.3;overflow-wrap:break-word}.ui-toast-text{font-weight:var(--ui-toast-text-weight, var(--weight-light));font-size:var(--size-typography-text-md);line-height:1.3;overflow-wrap:break-word}.ui-toast-close{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:var(--radius-xs);background:transparent;color:inherit;line-height:0;cursor:pointer;opacity:.7;transition:opacity var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms)}.ui-toast-close:hover{opacity:1}.ui-toast-close:focus-visible{outline:var(--ui-toast-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) solid currentColor;outline-offset:.125rem;opacity:1}@media(prefers-reduced-motion:reduce){.ui-toast-close{transition-duration:.01ms}}:root[data-motion=off] .ui-toast-close{transition-duration:.01ms}.ui-toast._default._high{background-color:var(--ui-toast-surface, var(--informative-defaulthigh-surface-default));color:var(--ui-toast-color, var(--informative-defaulthigh-content-default));border-color:var(--ui-toast-stroke, var(--informative-defaulthigh-stroke-default))}.ui-toast._default._low{background-color:var(--ui-toast-surface, var(--informative-defaultlow-surface-default));color:var(--ui-toast-color, var(--informative-defaultlow-content-default));border-color:var(--ui-toast-stroke, var(--informative-defaultlow-stroke-default))}.ui-toast._highlight._high{background-color:var(--ui-toast-surface, var(--informative-highlighthigh-surface-default));color:var(--ui-toast-color, var(--informative-highlighthigh-content-default));border-color:var(--ui-toast-stroke, var(--informative-highlighthigh-stroke-default))}.ui-toast._highlight._low{background-color:var(--ui-toast-surface, var(--informative-highlightlow-surface-default));color:var(--ui-toast-color, var(--informative-highlightlow-content-default));border-color:var(--ui-toast-stroke, var(--informative-highlightlow-stroke-default))}.ui-toast._success._high{background-color:var(--ui-toast-surface, var(--informative-successhigh-surface-default));color:var(--ui-toast-color, var(--informative-successhigh-content-default));border-color:var(--ui-toast-stroke, var(--informative-successhigh-stroke-default))}.ui-toast._success._low{background-color:var(--ui-toast-surface, var(--informative-successlow-surface-default));color:var(--ui-toast-color, var(--informative-successlow-content-default));border-color:var(--ui-toast-stroke, var(--informative-successlow-stroke-default))}.ui-toast._warning._high{background-color:var(--ui-toast-surface, var(--informative-warninghigh-surface-default));color:var(--ui-toast-color, var(--informative-warninghigh-content-default));border-color:var(--ui-toast-stroke, var(--informative-warninghigh-stroke-default))}.ui-toast._warning._low{background-color:var(--ui-toast-surface, var(--informative-warninglow-surface-default));color:var(--ui-toast-color, var(--informative-warninglow-content-default));border-color:var(--ui-toast-stroke, var(--informative-warninglow-stroke-default))}.ui-toast._error._high{background-color:var(--ui-toast-surface, var(--informative-errorhigh-surface-default));color:var(--ui-toast-color, var(--informative-errorhigh-content-default));border-color:var(--ui-toast-stroke, var(--informative-errorhigh-stroke-default))}.ui-toast._error._low{background-color:var(--ui-toast-surface, var(--informative-errorlow-surface-default));color:var(--ui-toast-color, var(--informative-errorlow-content-default));border-color:var(--ui-toast-stroke, var(--informative-errorlow-stroke-default))}\n"], dependencies: [{ kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }] }); }
111
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: UiToast, isStandalone: true, selector: "ui-toast", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, subLevel: { classPropertyName: "subLevel", publicName: "subLevel", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, closeIcon: { classPropertyName: "closeIcon", publicName: "closeIcon", isSignal: true, isRequired: false, transformFunction: null }, closeAriaLabel: { classPropertyName: "closeAriaLabel", publicName: "closeAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "style.display": "'inline-flex'", "style.maxWidth": "'100%'" } }, ngImport: i0, template: "<div [class]=\"classes()\" [attr.role]=\"role()\" [attr.aria-live]=\"ariaLive()\" aria-atomic=\"true\">\n @if (iconName(); as name) {\n <span class=\"ui-toast-icon\">\n <ui-icon [name]=\"name\" size=\"md\" />\n </span>\n }\n\n <div class=\"ui-toast-content\">\n @if (title(); as t) {\n <span class=\"ui-toast-title\">{{ t }}</span>\n }\n @if (text(); as txt) {\n <span class=\"ui-toast-text\">{{ txt }}</span>\n }\n <ng-content />\n </div>\n\n @if (closable()) {\n <button\n type=\"button\"\n class=\"ui-toast-close\"\n [attr.aria-label]=\"closeAriaLabel()\"\n (click)=\"onClose($event)\"\n >\n <ui-icon [name]=\"closeIcon()\" size=\"sm\" />\n </button>\n }\n</div>\n", styles: [".ui-toast{display:inline-flex;align-items:var(--ui-toast-align, flex-start);gap:var(--units-sm);box-sizing:border-box;width:auto;max-width:100%;padding:var(--units-sm) var(--units-md);border:var(--stroke-default) solid transparent;border-radius:var(--radius-default);background-color:var(--ui-toast-surface, var(--informative-defaulthigh-surface-default));color:var(--ui-toast-color, var(--informative-defaulthigh-content-default));box-shadow:var(--shadow-default-md);font-family:var(--ui-toast-font-family, var(--fontfamily-base))}.ui-toast._expanded{display:flex;width:100%}.ui-toast-icon{flex:0 0 auto;display:flex;align-items:center;align-self:var(--ui-toast-icon-align, auto);padding-top:var(--ui-toast-icon-padding-top, var(--units-2xs));line-height:0}.ui-toast-content{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:var(--units-2xs);padding-right:var(--units-sm)}.ui-toast-title{font-family:var(--ui-toast-title-font-family, var(--fontfamily-title));font-weight:var(--ui-toast-title-weight, var(--weight-bold));font-size:var(--size-typography-title-sm);line-height:1.3;overflow-wrap:break-word}.ui-toast-text{font-weight:var(--ui-toast-text-weight, var(--weight-light));font-size:var(--size-typography-text-md);line-height:1.3;overflow-wrap:break-word}.ui-toast-close{flex:0 0 auto;display:inline-flex;align-items:center;align-self:var(--ui-toast-close-align, auto);justify-content:center;padding:0;border:0;border-radius:var(--radius-xs);background:transparent;color:inherit;line-height:0;cursor:pointer;opacity:.7;transition:opacity var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms)}.ui-toast-close:hover{opacity:1}.ui-toast-close:focus-visible{outline:var(--ui-toast-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) solid currentColor;outline-offset:.125rem;opacity:1}@media(prefers-reduced-motion:reduce){.ui-toast-close{transition-duration:.01ms}}:root[data-motion=off] .ui-toast-close{transition-duration:.01ms}.ui-toast._default._high{background-color:var(--ui-toast-surface, var(--informative-defaulthigh-surface-default));color:var(--ui-toast-color, var(--informative-defaulthigh-content-default));border-color:var(--ui-toast-stroke, var(--informative-defaulthigh-stroke-default))}.ui-toast._default._low{background-color:var(--ui-toast-surface, var(--informative-defaultlow-surface-default));color:var(--ui-toast-color, var(--informative-defaultlow-content-default));border-color:var(--ui-toast-stroke, var(--informative-defaultlow-stroke-default))}.ui-toast._highlight._high{background-color:var(--ui-toast-surface, var(--informative-highlighthigh-surface-default));color:var(--ui-toast-color, var(--informative-highlighthigh-content-default));border-color:var(--ui-toast-stroke, var(--informative-highlighthigh-stroke-default))}.ui-toast._highlight._low{background-color:var(--ui-toast-surface, var(--informative-highlightlow-surface-default));color:var(--ui-toast-color, var(--informative-highlightlow-content-default));border-color:var(--ui-toast-stroke, var(--informative-highlightlow-stroke-default))}.ui-toast._success._high{background-color:var(--ui-toast-surface, var(--informative-successhigh-surface-default));color:var(--ui-toast-color, var(--informative-successhigh-content-default));border-color:var(--ui-toast-stroke, var(--informative-successhigh-stroke-default))}.ui-toast._success._low{background-color:var(--ui-toast-surface, var(--informative-successlow-surface-default));color:var(--ui-toast-color, var(--informative-successlow-content-default));border-color:var(--ui-toast-stroke, var(--informative-successlow-stroke-default))}.ui-toast._warning._high{background-color:var(--ui-toast-surface, var(--informative-warninghigh-surface-default));color:var(--ui-toast-color, var(--informative-warninghigh-content-default));border-color:var(--ui-toast-stroke, var(--informative-warninghigh-stroke-default))}.ui-toast._warning._low{background-color:var(--ui-toast-surface, var(--informative-warninglow-surface-default));color:var(--ui-toast-color, var(--informative-warninglow-content-default));border-color:var(--ui-toast-stroke, var(--informative-warninglow-stroke-default))}.ui-toast._error._high{background-color:var(--ui-toast-surface, var(--informative-errorhigh-surface-default));color:var(--ui-toast-color, var(--informative-errorhigh-content-default));border-color:var(--ui-toast-stroke, var(--informative-errorhigh-stroke-default))}.ui-toast._error._low{background-color:var(--ui-toast-surface, var(--informative-errorlow-surface-default));color:var(--ui-toast-color, var(--informative-errorlow-content-default));border-color:var(--ui-toast-stroke, var(--informative-errorlow-stroke-default))}\n"], dependencies: [{ kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }] }); }
112
112
  }
113
113
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiToast, decorators: [{
114
114
  type: Component,
@@ -116,7 +116,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
116
116
  // Hug content by default; the container makes it fill the region in banner mode.
117
117
  '[style.display]': "'inline-flex'",
118
118
  '[style.maxWidth]': "'100%'",
119
- }, template: "<div [class]=\"classes()\" [attr.role]=\"role()\" [attr.aria-live]=\"ariaLive()\" aria-atomic=\"true\">\n @if (iconName(); as name) {\n <span class=\"ui-toast-icon\">\n <ui-icon [name]=\"name\" size=\"md\" />\n </span>\n }\n\n <div class=\"ui-toast-content\">\n @if (title(); as t) {\n <span class=\"ui-toast-title\">{{ t }}</span>\n }\n @if (text(); as txt) {\n <span class=\"ui-toast-text\">{{ txt }}</span>\n }\n <ng-content />\n </div>\n\n @if (closable()) {\n <button\n type=\"button\"\n class=\"ui-toast-close\"\n [attr.aria-label]=\"closeAriaLabel()\"\n (click)=\"onClose($event)\"\n >\n <ui-icon [name]=\"closeIcon()\" size=\"sm\" />\n </button>\n }\n</div>\n", styles: [".ui-toast{display:inline-flex;align-items:flex-start;gap:var(--units-sm);box-sizing:border-box;width:auto;max-width:100%;padding:var(--units-sm) var(--units-md);border:var(--stroke-default) solid transparent;border-radius:var(--radius-default);background-color:var(--ui-toast-surface, var(--informative-defaulthigh-surface-default));color:var(--ui-toast-color, var(--informative-defaulthigh-content-default));box-shadow:var(--shadow-default-md);font-family:var(--ui-toast-font-family, var(--fontfamily-base))}.ui-toast._expanded{display:flex;width:100%}.ui-toast-icon{flex:0 0 auto;display:flex;align-items:center;padding-top:var(--units-2xs);line-height:0}.ui-toast-content{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:var(--units-2xs);padding-right:var(--units-sm)}.ui-toast-title{font-family:var(--ui-toast-title-font-family, var(--fontfamily-title));font-weight:var(--ui-toast-title-weight, var(--weight-bold));font-size:var(--size-typography-title-sm);line-height:1.3;overflow-wrap:break-word}.ui-toast-text{font-weight:var(--ui-toast-text-weight, var(--weight-light));font-size:var(--size-typography-text-md);line-height:1.3;overflow-wrap:break-word}.ui-toast-close{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:var(--radius-xs);background:transparent;color:inherit;line-height:0;cursor:pointer;opacity:.7;transition:opacity var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms)}.ui-toast-close:hover{opacity:1}.ui-toast-close:focus-visible{outline:var(--ui-toast-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) solid currentColor;outline-offset:.125rem;opacity:1}@media(prefers-reduced-motion:reduce){.ui-toast-close{transition-duration:.01ms}}:root[data-motion=off] .ui-toast-close{transition-duration:.01ms}.ui-toast._default._high{background-color:var(--ui-toast-surface, var(--informative-defaulthigh-surface-default));color:var(--ui-toast-color, var(--informative-defaulthigh-content-default));border-color:var(--ui-toast-stroke, var(--informative-defaulthigh-stroke-default))}.ui-toast._default._low{background-color:var(--ui-toast-surface, var(--informative-defaultlow-surface-default));color:var(--ui-toast-color, var(--informative-defaultlow-content-default));border-color:var(--ui-toast-stroke, var(--informative-defaultlow-stroke-default))}.ui-toast._highlight._high{background-color:var(--ui-toast-surface, var(--informative-highlighthigh-surface-default));color:var(--ui-toast-color, var(--informative-highlighthigh-content-default));border-color:var(--ui-toast-stroke, var(--informative-highlighthigh-stroke-default))}.ui-toast._highlight._low{background-color:var(--ui-toast-surface, var(--informative-highlightlow-surface-default));color:var(--ui-toast-color, var(--informative-highlightlow-content-default));border-color:var(--ui-toast-stroke, var(--informative-highlightlow-stroke-default))}.ui-toast._success._high{background-color:var(--ui-toast-surface, var(--informative-successhigh-surface-default));color:var(--ui-toast-color, var(--informative-successhigh-content-default));border-color:var(--ui-toast-stroke, var(--informative-successhigh-stroke-default))}.ui-toast._success._low{background-color:var(--ui-toast-surface, var(--informative-successlow-surface-default));color:var(--ui-toast-color, var(--informative-successlow-content-default));border-color:var(--ui-toast-stroke, var(--informative-successlow-stroke-default))}.ui-toast._warning._high{background-color:var(--ui-toast-surface, var(--informative-warninghigh-surface-default));color:var(--ui-toast-color, var(--informative-warninghigh-content-default));border-color:var(--ui-toast-stroke, var(--informative-warninghigh-stroke-default))}.ui-toast._warning._low{background-color:var(--ui-toast-surface, var(--informative-warninglow-surface-default));color:var(--ui-toast-color, var(--informative-warninglow-content-default));border-color:var(--ui-toast-stroke, var(--informative-warninglow-stroke-default))}.ui-toast._error._high{background-color:var(--ui-toast-surface, var(--informative-errorhigh-surface-default));color:var(--ui-toast-color, var(--informative-errorhigh-content-default));border-color:var(--ui-toast-stroke, var(--informative-errorhigh-stroke-default))}.ui-toast._error._low{background-color:var(--ui-toast-surface, var(--informative-errorlow-surface-default));color:var(--ui-toast-color, var(--informative-errorlow-content-default));border-color:var(--ui-toast-stroke, var(--informative-errorlow-stroke-default))}\n"] }]
119
+ }, template: "<div [class]=\"classes()\" [attr.role]=\"role()\" [attr.aria-live]=\"ariaLive()\" aria-atomic=\"true\">\n @if (iconName(); as name) {\n <span class=\"ui-toast-icon\">\n <ui-icon [name]=\"name\" size=\"md\" />\n </span>\n }\n\n <div class=\"ui-toast-content\">\n @if (title(); as t) {\n <span class=\"ui-toast-title\">{{ t }}</span>\n }\n @if (text(); as txt) {\n <span class=\"ui-toast-text\">{{ txt }}</span>\n }\n <ng-content />\n </div>\n\n @if (closable()) {\n <button\n type=\"button\"\n class=\"ui-toast-close\"\n [attr.aria-label]=\"closeAriaLabel()\"\n (click)=\"onClose($event)\"\n >\n <ui-icon [name]=\"closeIcon()\" size=\"sm\" />\n </button>\n }\n</div>\n", styles: [".ui-toast{display:inline-flex;align-items:var(--ui-toast-align, flex-start);gap:var(--units-sm);box-sizing:border-box;width:auto;max-width:100%;padding:var(--units-sm) var(--units-md);border:var(--stroke-default) solid transparent;border-radius:var(--radius-default);background-color:var(--ui-toast-surface, var(--informative-defaulthigh-surface-default));color:var(--ui-toast-color, var(--informative-defaulthigh-content-default));box-shadow:var(--shadow-default-md);font-family:var(--ui-toast-font-family, var(--fontfamily-base))}.ui-toast._expanded{display:flex;width:100%}.ui-toast-icon{flex:0 0 auto;display:flex;align-items:center;align-self:var(--ui-toast-icon-align, auto);padding-top:var(--ui-toast-icon-padding-top, var(--units-2xs));line-height:0}.ui-toast-content{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:var(--units-2xs);padding-right:var(--units-sm)}.ui-toast-title{font-family:var(--ui-toast-title-font-family, var(--fontfamily-title));font-weight:var(--ui-toast-title-weight, var(--weight-bold));font-size:var(--size-typography-title-sm);line-height:1.3;overflow-wrap:break-word}.ui-toast-text{font-weight:var(--ui-toast-text-weight, var(--weight-light));font-size:var(--size-typography-text-md);line-height:1.3;overflow-wrap:break-word}.ui-toast-close{flex:0 0 auto;display:inline-flex;align-items:center;align-self:var(--ui-toast-close-align, auto);justify-content:center;padding:0;border:0;border-radius:var(--radius-xs);background:transparent;color:inherit;line-height:0;cursor:pointer;opacity:.7;transition:opacity var(--ui-motion-duration, var(--transition-default)) var(--ui-motion-easing, var(--transition-easeinout)) var(--ui-motion-delay, 0ms)}.ui-toast-close:hover{opacity:1}.ui-toast-close:focus-visible{outline:var(--ui-toast-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) solid currentColor;outline-offset:.125rem;opacity:1}@media(prefers-reduced-motion:reduce){.ui-toast-close{transition-duration:.01ms}}:root[data-motion=off] .ui-toast-close{transition-duration:.01ms}.ui-toast._default._high{background-color:var(--ui-toast-surface, var(--informative-defaulthigh-surface-default));color:var(--ui-toast-color, var(--informative-defaulthigh-content-default));border-color:var(--ui-toast-stroke, var(--informative-defaulthigh-stroke-default))}.ui-toast._default._low{background-color:var(--ui-toast-surface, var(--informative-defaultlow-surface-default));color:var(--ui-toast-color, var(--informative-defaultlow-content-default));border-color:var(--ui-toast-stroke, var(--informative-defaultlow-stroke-default))}.ui-toast._highlight._high{background-color:var(--ui-toast-surface, var(--informative-highlighthigh-surface-default));color:var(--ui-toast-color, var(--informative-highlighthigh-content-default));border-color:var(--ui-toast-stroke, var(--informative-highlighthigh-stroke-default))}.ui-toast._highlight._low{background-color:var(--ui-toast-surface, var(--informative-highlightlow-surface-default));color:var(--ui-toast-color, var(--informative-highlightlow-content-default));border-color:var(--ui-toast-stroke, var(--informative-highlightlow-stroke-default))}.ui-toast._success._high{background-color:var(--ui-toast-surface, var(--informative-successhigh-surface-default));color:var(--ui-toast-color, var(--informative-successhigh-content-default));border-color:var(--ui-toast-stroke, var(--informative-successhigh-stroke-default))}.ui-toast._success._low{background-color:var(--ui-toast-surface, var(--informative-successlow-surface-default));color:var(--ui-toast-color, var(--informative-successlow-content-default));border-color:var(--ui-toast-stroke, var(--informative-successlow-stroke-default))}.ui-toast._warning._high{background-color:var(--ui-toast-surface, var(--informative-warninghigh-surface-default));color:var(--ui-toast-color, var(--informative-warninghigh-content-default));border-color:var(--ui-toast-stroke, var(--informative-warninghigh-stroke-default))}.ui-toast._warning._low{background-color:var(--ui-toast-surface, var(--informative-warninglow-surface-default));color:var(--ui-toast-color, var(--informative-warninglow-content-default));border-color:var(--ui-toast-stroke, var(--informative-warninglow-stroke-default))}.ui-toast._error._high{background-color:var(--ui-toast-surface, var(--informative-errorhigh-surface-default));color:var(--ui-toast-color, var(--informative-errorhigh-content-default));border-color:var(--ui-toast-stroke, var(--informative-errorhigh-stroke-default))}.ui-toast._error._low{background-color:var(--ui-toast-surface, var(--informative-errorlow-surface-default));color:var(--ui-toast-color, var(--informative-errorlow-content-default));border-color:var(--ui-toast-stroke, var(--informative-errorlow-stroke-default))}\n"] }]
120
120
  }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], subLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "subLevel", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], closeIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeIcon", required: false }] }], closeAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeAriaLabel", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
121
121
 
122
122
  /** Process-wide counter guaranteeing unique auto-generated toast ids. */