@atelier-ui/angular 0.3.8 → 0.3.10

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,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, computed, inject, ElementRef, DestroyRef, afterNextRender, ViewEncapsulation, ChangeDetectionStrategy, Component, model, viewChild, effect, InjectionToken, signal, output, Injector, viewChildren, Directive, Injectable, untracked, contentChildren } from '@angular/core';
2
+ import { input, computed, inject, ElementRef, DestroyRef, afterNextRender, ViewEncapsulation, ChangeDetectionStrategy, Component, model, viewChild, effect, InjectionToken, signal, output, Injector, viewChildren, Directive, Injectable, untracked, contentChildren, booleanAttribute } from '@angular/core';
3
3
  import * as i1 from '@angular/cdk/text-field';
4
4
  import { TextFieldModule } from '@angular/cdk/text-field';
5
5
  import * as i1$1 from '@angular/cdk/a11y';
@@ -304,10 +304,16 @@ const ATL_ICON_GEOMETRY = {
304
304
  * ```
305
305
  */
306
306
  class AtlIcon {
307
+ /** The icon to render. Required. */
307
308
  name = input.required(/* @ts-ignore */
308
309
  ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
310
+ /** Icon size: `sm` 16px, `md` 20px, `lg` 24px. The same 24-unit geometry is scaled. */
309
311
  size = input('md', /* @ts-ignore */
310
312
  ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
313
+ /**
314
+ * Accessible label. When provided, the icon is announced as an image with
315
+ * this label. When omitted, the icon is hidden from assistive tech.
316
+ */
311
317
  label = input(/* @ts-ignore */
312
318
  ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
313
319
  viewBox = ATL_ICON_VIEWBOX;
@@ -893,8 +899,17 @@ class AtlCheckbox {
893
899
  /** Validation errors from the form system. Bound by [formField] directive. */
894
900
  errors = input([], /* @ts-ignore */
895
901
  ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
902
+ /**
903
+ * Explicit id for the native input. Wins over the generated id — set this
904
+ * when something outside the component (an external `<label for>`, or
905
+ * `aria-describedby` from elsewhere on the page) needs a stable id to point at.
906
+ */
907
+ id = input('', /* @ts-ignore */
908
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
909
+ generatedId = `atl-checkbox-${nextId$b++}`;
896
910
  /** @internal */
897
- inputId = `atl-checkbox-${nextId$b++}`;
911
+ inputId = computed(() => this.id() || this.generatedId, /* @ts-ignore */
912
+ ...(ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []));
898
913
  /** @internal */
899
914
  errorId = `atl-checkbox-errors-${nextId$b++}`;
900
915
  /** @internal */
@@ -938,12 +953,12 @@ class AtlCheckbox {
938
953
  this.checked.set(target.checked);
939
954
  }
940
955
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AtlCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Component });
941
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: AtlCheckbox, isStandalone: true, selector: "atl-checkbox", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", touched: "touchedChange" }, host: { properties: { "class": "hostClasses()" }, classAttribute: "atl-checkbox" }, viewQueries: [{ propertyName: "nativeInput", first: true, predicate: ["nativeInput"], descendants: true, isSignal: true }], ngImport: i0, template: `
942
- <label [attr.for]="inputId">
956
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: AtlCheckbox, isStandalone: true, selector: "atl-checkbox", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", touched: "touchedChange" }, host: { properties: { "attr.id": "null", "class": "hostClasses()" }, classAttribute: "atl-checkbox" }, viewQueries: [{ propertyName: "nativeInput", first: true, predicate: ["nativeInput"], descendants: true, isSignal: true }], ngImport: i0, template: `
957
+ <label [attr.for]="inputId()">
943
958
  <input
944
959
  #nativeInput
945
960
  type="checkbox"
946
- [id]="inputId"
961
+ [id]="inputId()"
947
962
  [checked]="checked()"
948
963
  (change)="onChange($event)"
949
964
  (blur)="touched.set(true)"
@@ -967,11 +982,11 @@ class AtlCheckbox {
967
982
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AtlCheckbox, decorators: [{
968
983
  type: Component,
969
984
  args: [{ selector: 'atl-checkbox', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
970
- <label [attr.for]="inputId">
985
+ <label [attr.for]="inputId()">
971
986
  <input
972
987
  #nativeInput
973
988
  type="checkbox"
974
- [id]="inputId"
989
+ [id]="inputId()"
975
990
  [checked]="checked()"
976
991
  (change)="onChange($event)"
977
992
  (blur)="touched.set(true)"
@@ -992,9 +1007,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
992
1007
  }
993
1008
  `, encapsulation: ViewEncapsulation.None, host: {
994
1009
  class: 'atl-checkbox',
1010
+ // `id` is an input: a static id="…" would otherwise stay on the host and
1011
+ // duplicate the native input's id (host-attr-guard, ADR-0091).
1012
+ '[attr.id]': 'null',
995
1013
  '[class]': 'hostClasses()',
996
1014
  }, styles: [".atl-checkbox,.atl-checkbox *{box-sizing:border-box}.atl-checkbox{display:block;font-family:var(--ui-font-family);font-size:var(--ui-font-size-md);line-height:var(--ui-line-height-tight)}.atl-checkbox>label{display:inline-flex;align-items:center;gap:var(--ui-spacing-3);cursor:pointer;-webkit-user-select:none;user-select:none;color:var(--ui-color-text);min-height:var(--ui-row-height-sm);padding-block:0;line-height:var(--ui-line-height-tight)}.atl-checkbox>label>input[type=checkbox]{appearance:none;-webkit-appearance:none;flex-shrink:0;margin:0;width:1.25rem;height:1.25rem;border:var(--ui-border-width-thick) solid var(--ui-color-border-strong);border-radius:var(--ui-radius-sm);background-color:var(--ui-color-input-bg);cursor:pointer;position:relative;transition:border-color var(--ui-transition-fast),background-color var(--ui-transition-fast),box-shadow var(--ui-transition-fast);outline:none}.atl-checkbox>label>input[type=checkbox]:hover:not(:disabled){border-color:var(--ui-color-primary);background-color:var(--ui-color-primary-light)}.atl-checkbox>label>input[type=checkbox]:focus-visible{box-shadow:var(--ui-focus-ring);border-color:var(--ui-color-primary)}.atl-checkbox>label>input[type=checkbox]:checked{background-color:var(--ui-color-primary);border-color:var(--ui-color-primary)}.atl-checkbox>label>input[type=checkbox]:checked:after{content:\"\";position:absolute;inset:0;margin:auto;width:.35rem;height:.6rem;border:var(--ui-border-width-thick) solid var(--ui-color-text-on-primary);border-top:none;border-left:none;transform:rotate(45deg) translate(-1px,-1px);animation:atl-checkbox-check-pop var(--ui-duration-normal) var(--ui-ease-spring)}.atl-checkbox>label>input[type=checkbox]:indeterminate{background-color:var(--ui-color-primary);border-color:var(--ui-color-primary)}.atl-checkbox>label>input[type=checkbox]:indeterminate:after{content:\"\";position:absolute;inset:0;margin:auto;width:.5rem;height:2px;background-color:var(--ui-color-text-on-primary);animation:atl-checkbox-check-pop var(--ui-duration-normal) var(--ui-ease-spring)}.atl-checkbox.is-invalid>label>input[type=checkbox]{border-color:var(--ui-color-input-border-invalid)}.atl-checkbox.is-invalid>label>input[type=checkbox]:hover:not(:disabled){border-color:var(--ui-color-input-border-invalid)}.atl-checkbox.is-invalid>label>input[type=checkbox]:focus-visible{border-color:var(--ui-color-input-border-invalid);box-shadow:var(--ui-focus-ring-danger)}.atl-checkbox.is-disabled{opacity:var(--ui-opacity-disabled);cursor:not-allowed}.atl-checkbox.is-disabled>label{cursor:not-allowed}.atl-checkbox.is-disabled>label>input[type=checkbox]{cursor:not-allowed}.atl-checkbox>.errors{margin-top:var(--ui-spacing-2)}.atl-checkbox>.errors>.error-message{margin:0;font-size:var(--ui-font-size-sm);color:var(--ui-color-error-text);line-height:var(--ui-line-height-normal)}@keyframes atl-checkbox-check-pop{0%{transform:rotate(45deg) translate(-1px,-1px) scale(0)}60%{transform:rotate(45deg) translate(-1px,-1px) scale(1.15)}to{transform:rotate(45deg) translate(-1px,-1px) scale(1)}}\n"] }]
997
- }], ctorParameters: () => [], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], nativeInput: [{ type: i0.ViewChild, args: ['nativeInput', { isSignal: true }] }] } });
1015
+ }], ctorParameters: () => [], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], nativeInput: [{ type: i0.ViewChild, args: ['nativeInput', { isSignal: true }] }] } });
998
1016
 
999
1017
  const ATL_RADIO_GROUP = new InjectionToken('ATL_RADIO_GROUP');
1000
1018
 
@@ -1302,8 +1320,17 @@ class AtlToggle {
1302
1320
  /** Validation errors from the form system. Bound by [formField] directive. */
1303
1321
  errors = input([], /* @ts-ignore */
1304
1322
  ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
1323
+ /**
1324
+ * Explicit id for the native input. Wins over the generated id — set this
1325
+ * when something outside the component (an external `<label for>`, or
1326
+ * `aria-describedby` from elsewhere on the page) needs a stable id to point at.
1327
+ */
1328
+ id = input('', /* @ts-ignore */
1329
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
1330
+ generatedId = `atl-toggle-${nextId$8++}`;
1305
1331
  /** @internal */
1306
- inputId = `atl-toggle-${nextId$8++}`;
1332
+ inputId = computed(() => this.id() || this.generatedId, /* @ts-ignore */
1333
+ ...(ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []));
1307
1334
  /** @internal */
1308
1335
  errorId = `atl-toggle-errors-${nextId$8++}`;
1309
1336
  /** @internal */
@@ -1336,12 +1363,12 @@ class AtlToggle {
1336
1363
  this.checked.set(target.checked);
1337
1364
  }
1338
1365
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AtlToggle, deps: [], target: i0.ɵɵFactoryTarget.Component });
1339
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: AtlToggle, isStandalone: true, selector: "atl-toggle", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", touched: "touchedChange" }, host: { properties: { "class": "hostClasses()" }, classAttribute: "atl-toggle" }, ngImport: i0, template: `
1340
- <label [attr.for]="inputId">
1366
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: AtlToggle, isStandalone: true, selector: "atl-toggle", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", touched: "touchedChange" }, host: { properties: { "attr.id": "null", "class": "hostClasses()" }, classAttribute: "atl-toggle" }, ngImport: i0, template: `
1367
+ <label [attr.for]="inputId()">
1341
1368
  <input
1342
1369
  type="checkbox"
1343
1370
  role="switch"
1344
- [id]="inputId"
1371
+ [id]="inputId()"
1345
1372
  [checked]="checked()"
1346
1373
  (change)="onChange($event)"
1347
1374
  (blur)="touched.set(true)"
@@ -1369,11 +1396,11 @@ class AtlToggle {
1369
1396
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AtlToggle, decorators: [{
1370
1397
  type: Component,
1371
1398
  args: [{ selector: 'atl-toggle', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
1372
- <label [attr.for]="inputId">
1399
+ <label [attr.for]="inputId()">
1373
1400
  <input
1374
1401
  type="checkbox"
1375
1402
  role="switch"
1376
- [id]="inputId"
1403
+ [id]="inputId()"
1377
1404
  [checked]="checked()"
1378
1405
  (change)="onChange($event)"
1379
1406
  (blur)="touched.set(true)"
@@ -1398,9 +1425,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
1398
1425
  }
1399
1426
  `, encapsulation: ViewEncapsulation.None, host: {
1400
1427
  class: 'atl-toggle',
1428
+ // `id` is an input: a static id="…" would otherwise stay on the host and
1429
+ // duplicate the native input's id (host-attr-guard, ADR-0091).
1430
+ '[attr.id]': 'null',
1401
1431
  '[class]': 'hostClasses()',
1402
1432
  }, styles: [".atl-toggle,.atl-toggle *{box-sizing:border-box}.atl-toggle{display:block;font-family:var(--ui-font-family);font-size:var(--ui-font-size-md);line-height:var(--ui-line-height-tight)}.atl-toggle>label{display:inline-flex;align-items:center;gap:var(--ui-spacing-3);cursor:pointer;-webkit-user-select:none;user-select:none;color:var(--ui-color-text);min-height:var(--ui-row-height-sm);padding-block:0;line-height:var(--ui-line-height-tight)}.atl-toggle>label>input[type=checkbox]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.atl-toggle>label>.track{position:relative;display:inline-flex;align-items:center;flex-shrink:0;width:2.75rem;height:1.5rem;border-radius:var(--ui-radius-full);border:var(--ui-border-width) solid var(--ui-color-border-strong);background-color:var(--ui-color-input-bg);transition:background-color var(--ui-transition-fast),border-color var(--ui-transition-fast),box-shadow var(--ui-transition-fast);cursor:pointer}.atl-toggle>label>.track>.thumb{position:absolute;left:.125rem;width:1.125rem;height:1.125rem;border-radius:var(--ui-radius-full);background-color:var(--ui-color-border-strong);box-shadow:var(--ui-shadow-xs);transition:transform var(--ui-transition-normal) var(--ui-ease-out),background-color var(--ui-transition-fast)}.atl-toggle>label:hover:not(:has(>input:disabled))>.track{border-color:var(--ui-color-primary)}.atl-toggle>label>input[type=checkbox]:focus-visible+.track{box-shadow:var(--ui-focus-ring);border-color:var(--ui-color-primary)}.atl-toggle.is-checked>label>.track{background-color:var(--ui-color-primary);border-color:var(--ui-color-primary)}.atl-toggle.is-checked>label>.track>.thumb{transform:translate(1.25rem);background-color:var(--ui-color-text-on-primary)}.atl-toggle.is-invalid>label>.track{border-color:var(--ui-color-input-border-invalid)}.atl-toggle.is-invalid>label>input[type=checkbox]:focus-visible+.track{border-color:var(--ui-color-input-border-invalid);box-shadow:var(--ui-focus-ring-danger)}.atl-toggle.is-disabled{opacity:var(--ui-opacity-disabled);cursor:not-allowed}.atl-toggle.is-disabled>label{cursor:not-allowed}.atl-toggle.is-disabled>label>.track{cursor:not-allowed}.atl-toggle>.errors{margin-top:var(--ui-spacing-2)}.atl-toggle>.errors>.error-message{margin:0;font-size:var(--ui-font-size-sm);color:var(--ui-color-error-text);line-height:var(--ui-line-height-normal)}\n"] }]
1403
- }], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }] } });
1433
+ }], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }] } });
1404
1434
 
1405
1435
  /**
1406
1436
  * Inline notification banner with semantic color variants and optional dismiss button.
@@ -3943,7 +3973,10 @@ const ATL_BREADCRUMBS = new InjectionToken('ATL_BREADCRUMBS');
3943
3973
 
3944
3974
  /**
3945
3975
  * Accessible breadcrumb navigation. Wrap `atl-breadcrumb-item` elements inside.
3946
- * The last item is automatically marked as the current page.
3976
+ * The last item is automatically marked as the current page, unless an item sets
3977
+ * `current` itself. If any item does, only explicit values count: `[current]="true"`
3978
+ * on the item that is the page, or `[current]="false"` for a trail with no current
3979
+ * page.
3947
3980
  *
3948
3981
  * Usage:
3949
3982
  * ```html
@@ -3955,37 +3988,42 @@ const ATL_BREADCRUMBS = new InjectionToken('ATL_BREADCRUMBS');
3955
3988
  * ```
3956
3989
  */
3957
3990
  class AtlBreadcrumbs {
3991
+ /** Separator character shown between breadcrumb items. Default `/`. */
3958
3992
  separator = input('/', /* @ts-ignore */
3959
3993
  ...(ngDevMode ? [{ debugName: "separator" }] : /* istanbul ignore next */ []));
3960
3994
  separatorCssVar = computed(() => `'${this.separator()}'`, /* @ts-ignore */
3961
3995
  ...(ngDevMode ? [{ debugName: "separatorCssVar" }] : /* istanbul ignore next */ []));
3962
- _itemIds = signal([], /* @ts-ignore */
3963
- ...(ngDevMode ? [{ debugName: "_itemIds" }] : /* istanbul ignore next */ []));
3996
+ _items = signal([], /* @ts-ignore */
3997
+ ...(ngDevMode ? [{ debugName: "_items" }] : /* istanbul ignore next */ []));
3964
3998
  _nextId = 0;
3965
3999
  /** @internal — used by AtlBreadcrumbItem via ATL_BREADCRUMBS token */
3966
4000
  lastItemId = computed(() => {
3967
- const ids = this._itemIds();
3968
- return ids.length > 0 ? ids[ids.length - 1] : -1;
4001
+ const items = this._items();
4002
+ return items.length > 0 ? items[items.length - 1].id : -1;
3969
4003
  }, /* @ts-ignore */
3970
4004
  ...(ngDevMode ? [{ debugName: "lastItemId" }] : /* istanbul ignore next */ []));
3971
4005
  /** @internal */
3972
- registerItem() {
4006
+ hasExplicitCurrent = computed(() => this._items().some((item) => item.explicit() !== undefined), /* @ts-ignore */
4007
+ ...(ngDevMode ? [{ debugName: "hasExplicitCurrent" }] : /* istanbul ignore next */ []));
4008
+ /** @internal */
4009
+ registerItem(explicit) {
3973
4010
  const id = this._nextId++;
3974
- this._itemIds.update((ids) => [...ids, id]);
4011
+ this._items.update((items) => [...items, { id, explicit }]);
3975
4012
  return id;
3976
4013
  }
3977
4014
  /** @internal */
3978
4015
  unregisterItem(id) {
3979
- this._itemIds.update((ids) => ids.filter((i) => i !== id));
4016
+ this._items.update((items) => items.filter((i) => i.id !== id));
3980
4017
  }
3981
4018
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AtlBreadcrumbs, deps: [], target: i0.ɵɵFactoryTarget.Component });
3982
4019
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", type: AtlBreadcrumbs, isStandalone: true, selector: "atl-breadcrumbs", inputs: { separator: { classPropertyName: "separator", publicName: "separator", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.--atl-separator": "separatorCssVar()" }, classAttribute: "atl-breadcrumbs" }, providers: [
3983
4020
  {
3984
4021
  provide: ATL_BREADCRUMBS,
3985
4022
  useFactory: (bc) => ({
3986
- registerItem: () => bc.registerItem(),
4023
+ registerItem: (explicit) => bc.registerItem(explicit),
3987
4024
  unregisterItem: (id) => bc.unregisterItem(id),
3988
4025
  lastItemId: bc.lastItemId,
4026
+ hasExplicitCurrent: bc.hasExplicitCurrent,
3989
4027
  }),
3990
4028
  deps: [AtlBreadcrumbs],
3991
4029
  },
@@ -4003,9 +4041,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
4003
4041
  {
4004
4042
  provide: ATL_BREADCRUMBS,
4005
4043
  useFactory: (bc) => ({
4006
- registerItem: () => bc.registerItem(),
4044
+ registerItem: (explicit) => bc.registerItem(explicit),
4007
4045
  unregisterItem: (id) => bc.unregisterItem(id),
4008
4046
  lastItemId: bc.lastItemId,
4047
+ hasExplicitCurrent: bc.hasExplicitCurrent,
4009
4048
  }),
4010
4049
  deps: [AtlBreadcrumbs],
4011
4050
  },
@@ -4022,19 +4061,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
4022
4061
  }], propDecorators: { separator: [{ type: i0.Input, args: [{ isSignal: true, alias: "separator", required: false }] }] } });
4023
4062
  /**
4024
4063
  * A single breadcrumb step. The last item is automatically treated as
4025
- * `aria-current="page"` and rendered as plain text (no link).
4064
+ * `aria-current="page"` and rendered as plain text (no link), unless `current`
4065
+ * is set on any item (see `AtlBreadcrumbs`).
4026
4066
  */
4027
4067
  class AtlBreadcrumbItem {
4028
- /** Optional href for navigation. Ignored on the last (current) item. */
4068
+ /** Optional href for navigation. Ignored on the current item. */
4029
4069
  href = input('', /* @ts-ignore */
4030
4070
  ...(ngDevMode ? [{ debugName: "href" }] : /* istanbul ignore next */ []));
4071
+ /**
4072
+ * Whether this is the current page. Leave it unset and the last item is the
4073
+ * current page; set it on any item and only explicit values count.
4074
+ */
4075
+ current = input(undefined, { ...(ngDevMode ? { debugName: "current" } : /* istanbul ignore next */ {}), transform: (value) => value === undefined ? undefined : booleanAttribute(value) });
4031
4076
  context = inject(ATL_BREADCRUMBS);
4032
4077
  myIndex = signal(-1, /* @ts-ignore */
4033
4078
  ...(ngDevMode ? [{ debugName: "myIndex" }] : /* istanbul ignore next */ []));
4034
- isCurrent = computed(() => this.myIndex() >= 0 && this.myIndex() === this.context.lastItemId(), /* @ts-ignore */
4079
+ isCurrent = computed(() => {
4080
+ if (this.context.hasExplicitCurrent())
4081
+ return this.current() === true;
4082
+ return this.myIndex() >= 0 && this.myIndex() === this.context.lastItemId();
4083
+ }, /* @ts-ignore */
4035
4084
  ...(ngDevMode ? [{ debugName: "isCurrent" }] : /* istanbul ignore next */ []));
4036
4085
  ngOnInit() {
4037
- this.myIndex.set(this.context.registerItem());
4086
+ this.myIndex.set(this.context.registerItem(this.current));
4038
4087
  }
4039
4088
  ngOnDestroy() {
4040
4089
  if (this.myIndex() >= 0) {
@@ -4042,7 +4091,7 @@ class AtlBreadcrumbItem {
4042
4091
  }
4043
4092
  }
4044
4093
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AtlBreadcrumbItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
4045
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: AtlBreadcrumbItem, isStandalone: true, selector: "atl-breadcrumb-item", inputs: { href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "listitem" }, properties: { "class.is-current": "isCurrent()" }, classAttribute: "atl-breadcrumb-item" }, ngImport: i0, template: `
4094
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: AtlBreadcrumbItem, isStandalone: true, selector: "atl-breadcrumb-item", inputs: { href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, current: { classPropertyName: "current", publicName: "current", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "listitem" }, properties: { "class.is-current": "isCurrent()" }, classAttribute: "atl-breadcrumb-item" }, ngImport: i0, template: `
4046
4095
  <ng-template #label><ng-content /></ng-template>
4047
4096
  @if (href() && !isCurrent()) {
4048
4097
  <a class="breadcrumb-link" [attr.href]="href()">
@@ -4081,7 +4130,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
4081
4130
  role: 'listitem',
4082
4131
  '[class.is-current]': 'isCurrent()',
4083
4132
  }, styles: [":is(.atl-breadcrumb-item,.atl-breadcrumbs),:is(.atl-breadcrumb-item,.atl-breadcrumbs) *{box-sizing:border-box}.atl-breadcrumbs{display:block;font-family:var(--ui-font-family);line-height:var(--ui-line-height-tight)}.atl-breadcrumbs>.breadcrumbs-list,.atl-breadcrumbs>nav>.breadcrumbs-list{display:flex;flex-wrap:wrap;align-items:center;gap:0;list-style:none;margin:0;padding:0;font-size:var(--ui-font-size-sm);color:var(--ui-color-text-muted)}.atl-breadcrumb-item{display:flex;align-items:center}.atl-breadcrumb-item:after{content:var(--atl-separator, \"/\") / \"\";margin:0 var(--ui-spacing-2);color:var(--ui-color-border-hover);font-size:var(--ui-font-size-md);line-height:1}.atl-breadcrumb-item.is-current:after{display:none}.atl-breadcrumb-item>.breadcrumb-link{color:var(--ui-color-text-muted);text-decoration:none;border-radius:var(--ui-radius-sm);padding:var(--ui-spacing-1) var(--ui-spacing-2);margin:calc(var(--ui-spacing-1) * -1) calc(var(--ui-spacing-2) * -1);transition:color var(--ui-transition-fast),background-color var(--ui-transition-fast)}.atl-breadcrumb-item>.breadcrumb-link:hover{color:var(--ui-color-text);background-color:var(--ui-color-surface-sunken)}.atl-breadcrumb-item>.breadcrumb-link:focus-visible{outline:none;box-shadow:var(--ui-focus-ring)}.atl-breadcrumb-item>.breadcrumb-text{color:var(--ui-color-text-muted)}.atl-breadcrumb-item>.breadcrumb-current{color:var(--ui-color-text);font-weight:var(--ui-font-weight-semibold)}\n"] }]
4084
- }], propDecorators: { href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }] } });
4133
+ }], propDecorators: { href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], current: [{ type: i0.Input, args: [{ isSignal: true, alias: "current", required: false }] }] } });
4085
4134
 
4086
4135
  /**
4087
4136
  * Pagination control for navigating multi-page content.
@@ -4092,7 +4141,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
4092
4141
  * ```
4093
4142
  */
4094
4143
  class AtlPagination {
4095
- /** Current page (1-based). Supports two-way binding: [(page)]="currentPage". */
4144
+ /**
4145
+ * Current page (1-based). Two-way: `[(page)]="currentPage"`. The component owns the
4146
+ * state, so it also works unbound or with `[page]` plus `(pageChange)`. React and Vue
4147
+ * are controlled instead: they keep no page state and expect the new page fed back in.
4148
+ */
4096
4149
  page = model(1, /* @ts-ignore */
4097
4150
  ...(ngDevMode ? [{ debugName: "page" }] : /* istanbul ignore next */ []));
4098
4151
  /** Total number of pages. */
@@ -4745,7 +4798,7 @@ class AtlTr {
4745
4798
  }
4746
4799
  <ng-content />
4747
4800
  </tr>
4748
- `, isInline: true, styles: [":is(.atl-table,.atl-table-wrapper,.atl-tbody-empty-cell,.atl-th-sort-asc-arrow,.atl-th-sort-btn,.atl-th-sort-desc-arrow,.atl-th-sort-icon,.atl-tr-select-cell),:is(.atl-table,.atl-table-wrapper,.atl-tbody-empty-cell,.atl-th-sort-asc-arrow,.atl-th-sort-btn,.atl-th-sort-desc-arrow,.atl-th-sort-icon,.atl-tr-select-cell) *{box-sizing:border-box}.atl-table{display:block;font-family:var(--ui-font-family);line-height:var(--ui-line-height-tight);color:var(--ui-color-text)}.atl-table-wrapper{width:100%;overflow-x:auto}.atl-table table{width:100%;border-collapse:collapse}.atl-table thead th{font-size:var(--ui-font-size-xs);font-weight:var(--ui-font-weight-semibold);color:var(--ui-color-text-muted);letter-spacing:var(--ui-letter-spacing-wide);text-transform:uppercase;border-bottom:var(--ui-border-width-thick) solid var(--ui-color-border);background-color:var(--ui-color-surface);height:var(--ui-row-height-md);padding-block:0;padding-inline:var(--ui-spacing-4);line-height:var(--ui-line-height-tight);text-align:start;white-space:nowrap}.atl-table tbody td{border-bottom:var(--ui-border-width) solid var(--ui-color-border);height:var(--ui-row-height-md);padding-block:0;padding-inline:var(--ui-spacing-4);line-height:var(--ui-line-height-tight);vertical-align:middle;background-color:var(--ui-color-surface);transition:background-color var(--ui-transition-fast)}.atl-table.size-sm thead th,.atl-table.size-sm tbody td{height:var(--ui-row-height-sm);padding-inline:var(--ui-spacing-3);font-size:var(--ui-font-size-xs)}.atl-table.size-md thead th,.atl-table.size-md tbody td{height:var(--ui-row-height-md);padding-inline:var(--ui-spacing-4);font-size:var(--ui-font-size-sm)}.atl-table.size-lg thead th,.atl-table.size-lg tbody td{height:var(--ui-row-height-lg);padding-inline:var(--ui-spacing-6);font-size:var(--ui-font-size-md)}.atl-table.variant-striped tbody tr:nth-child(2n) td{background-color:var(--ui-color-surface-sunken)}.atl-table.variant-bordered thead th,.atl-table.variant-bordered tbody td{border:var(--ui-border-width) solid var(--ui-color-border)}.atl-table th.align-start,.atl-table td.align-start{text-align:start}.atl-table th.align-center,.atl-table td.align-center{text-align:center}.atl-table th.align-end,.atl-table td.align-end{text-align:end}.atl-table tbody tr:hover td{background-color:var(--ui-color-surface-sunken)}.atl-table tbody tr.is-selected td,.atl-table tbody tr.is-selected:hover td{background-color:var(--ui-color-primary-light)}.atl-tr-select-cell{width:2.75rem;text-align:center}.atl-tr-select-cell .atl-checkbox label{justify-content:center}.atl-table.is-sticky-header thead th{position:sticky;top:0;z-index:1;box-shadow:0 1px 0 0 var(--ui-color-border)}.atl-th-sort-btn{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:var(--ui-spacing-2);cursor:pointer;font:inherit;color:inherit;font-weight:inherit;width:100%}.atl-th-sort-btn:focus-visible{outline:none;box-shadow:var(--ui-focus-ring);border-radius:var(--ui-radius-sm)}.atl-th-sort-icon{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;flex-shrink:0}.atl-table .atl-th-sort-icon .atl-icon{width:.625rem;height:.5rem}.atl-th-sort-asc-arrow,.atl-th-sort-desc-arrow{opacity:.25;transition:opacity var(--ui-transition-fast)}.atl-table th.is-sorted .atl-th-sort-icon{color:var(--ui-color-primary)}.atl-table th.sort-asc .atl-th-sort-asc-arrow,.atl-table th.sort-desc .atl-th-sort-desc-arrow{opacity:1}.atl-tbody-empty-cell{text-align:center;padding:var(--ui-spacing-12) var(--ui-spacing-4)!important;color:var(--ui-color-text-muted);font-size:var(--ui-font-size-md);background-color:var(--ui-color-surface)!important}\n"], dependencies: [{ kind: "component", type: AtlCheckbox, selector: "atl-checkbox", inputs: ["checked", "touched", "indeterminate", "disabled", "invalid", "required", "name", "errors"], outputs: ["checkedChange", "touchedChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
4801
+ `, isInline: true, styles: [":is(.atl-table,.atl-table-wrapper,.atl-tbody-empty-cell,.atl-th-sort-asc-arrow,.atl-th-sort-btn,.atl-th-sort-desc-arrow,.atl-th-sort-icon,.atl-tr-select-cell),:is(.atl-table,.atl-table-wrapper,.atl-tbody-empty-cell,.atl-th-sort-asc-arrow,.atl-th-sort-btn,.atl-th-sort-desc-arrow,.atl-th-sort-icon,.atl-tr-select-cell) *{box-sizing:border-box}.atl-table{display:block;font-family:var(--ui-font-family);line-height:var(--ui-line-height-tight);color:var(--ui-color-text)}.atl-table-wrapper{width:100%;overflow-x:auto}.atl-table table{width:100%;border-collapse:collapse}.atl-table thead th{font-size:var(--ui-font-size-xs);font-weight:var(--ui-font-weight-semibold);color:var(--ui-color-text-muted);letter-spacing:var(--ui-letter-spacing-wide);text-transform:uppercase;border-bottom:var(--ui-border-width-thick) solid var(--ui-color-border);background-color:var(--ui-color-surface);height:var(--ui-row-height-md);padding-block:0;padding-inline:var(--ui-spacing-4);line-height:var(--ui-line-height-tight);text-align:start;white-space:nowrap}.atl-table tbody td{border-bottom:var(--ui-border-width) solid var(--ui-color-border);height:var(--ui-row-height-md);padding-block:0;padding-inline:var(--ui-spacing-4);line-height:var(--ui-line-height-tight);vertical-align:middle;background-color:var(--ui-color-surface);transition:background-color var(--ui-transition-fast)}.atl-table.size-sm thead th,.atl-table.size-sm tbody td{height:var(--ui-row-height-sm);padding-inline:var(--ui-spacing-3);font-size:var(--ui-font-size-xs)}.atl-table.size-md thead th,.atl-table.size-md tbody td{height:var(--ui-row-height-md);padding-inline:var(--ui-spacing-4);font-size:var(--ui-font-size-sm)}.atl-table.size-lg thead th,.atl-table.size-lg tbody td{height:var(--ui-row-height-lg);padding-inline:var(--ui-spacing-6);font-size:var(--ui-font-size-md)}.atl-table.variant-striped tbody tr:nth-child(2n) td{background-color:var(--ui-color-surface-sunken)}.atl-table.variant-bordered thead th,.atl-table.variant-bordered tbody td{border:var(--ui-border-width) solid var(--ui-color-border)}.atl-table th.align-start,.atl-table td.align-start{text-align:start}.atl-table th.align-center,.atl-table td.align-center{text-align:center}.atl-table th.align-end,.atl-table td.align-end{text-align:end}.atl-table tbody tr:hover td{background-color:var(--ui-color-surface-sunken)}.atl-table tbody tr.is-selected td,.atl-table tbody tr.is-selected:hover td{background-color:var(--ui-color-primary-light)}.atl-tr-select-cell{width:2.75rem;text-align:center}.atl-tr-select-cell .atl-checkbox label{justify-content:center}.atl-table.is-sticky-header thead th{position:sticky;top:0;z-index:1;box-shadow:0 1px 0 0 var(--ui-color-border)}.atl-th-sort-btn{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:var(--ui-spacing-2);cursor:pointer;font:inherit;color:inherit;font-weight:inherit;width:100%}.atl-th-sort-btn:focus-visible{outline:none;box-shadow:var(--ui-focus-ring);border-radius:var(--ui-radius-sm)}.atl-th-sort-icon{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;flex-shrink:0}.atl-table .atl-th-sort-icon .atl-icon{width:.625rem;height:.5rem}.atl-th-sort-asc-arrow,.atl-th-sort-desc-arrow{opacity:.25;transition:opacity var(--ui-transition-fast)}.atl-table th.is-sorted .atl-th-sort-icon{color:var(--ui-color-primary)}.atl-table th.sort-asc .atl-th-sort-asc-arrow,.atl-table th.sort-desc .atl-th-sort-desc-arrow{opacity:1}.atl-tbody-empty-cell{text-align:center;padding:var(--ui-spacing-12) var(--ui-spacing-4)!important;color:var(--ui-color-text-muted);font-size:var(--ui-font-size-md);background-color:var(--ui-color-surface)!important}\n"], dependencies: [{ kind: "component", type: AtlCheckbox, selector: "atl-checkbox", inputs: ["checked", "touched", "indeterminate", "disabled", "invalid", "required", "name", "errors", "id"], outputs: ["checkedChange", "touchedChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
4749
4802
  }
4750
4803
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AtlTr, decorators: [{
4751
4804
  type: Component,
@@ -4931,7 +4984,9 @@ class AtlStepper {
4931
4984
  orientation = input('horizontal', /* @ts-ignore */
4932
4985
  ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
4933
4986
  /**
4934
- * When true, users can only navigate to completed steps or the next pending step.
4987
+ * When true, a step can be reached only once every step before it is completed or
4988
+ * `optional`: the user can go to completed steps and the next pending one, and can
4989
+ * pass over optional steps. React and Vue behave the same.
4935
4990
  * Use `goTo()` / `next()` in your step content to advance programmatically.
4936
4991
  */
4937
4992
  linear = input(false, /* @ts-ignore */