@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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atelier-ui/angular",
3
- "version": "0.3.8",
3
+ "version": "0.3.10",
4
4
  "description": "Atelier component library for Angular — LLM-optimised, accessible, design-token-driven",
5
5
  "keywords": [
6
6
  "angular",
@@ -18,6 +18,18 @@ import * as i1$1 from '@angular/cdk/menu';
18
18
  */
19
19
  type AtlButtonVariant = 'primary' | 'secondary' | 'outline' | 'danger';
20
20
  type AtlButtonSize = 'sm' | 'md' | 'lg';
21
+ /**
22
+ * One validation error. Structurally the same as Angular Signal Forms'
23
+ * `ValidationError` (`kind` plus an optional `message`), so Angular's
24
+ * `[formField]` binding passes its errors straight through, and React and Vue
25
+ * consumers can build the same shape by hand.
26
+ */
27
+ interface AtlErrorItem {
28
+ /** Identifies the kind of error, e.g. `'required'`. */
29
+ readonly kind: string;
30
+ /** Human readable message, rendered under the field. */
31
+ readonly message?: string;
32
+ }
21
33
  interface AtlComboboxOption {
22
34
  value: string;
23
35
  label: string;
@@ -191,8 +203,14 @@ interface AtlIconGeometry {
191
203
  * ```
192
204
  */
193
205
  declare class AtlIcon {
206
+ /** The icon to render. Required. */
194
207
  readonly name: _angular_core.InputSignal<AtlIconName>;
208
+ /** Icon size: `sm` 16px, `md` 20px, `lg` 24px. The same 24-unit geometry is scaled. */
195
209
  readonly size: _angular_core.InputSignal<AtlIconSize>;
210
+ /**
211
+ * Accessible label. When provided, the icon is announced as an image with
212
+ * this label. When omitted, the icon is hidden from assistive tech.
213
+ */
196
214
  readonly label: _angular_core.InputSignal<string | undefined>;
197
215
  protected readonly viewBox = "0 0 24 24";
198
216
  protected readonly strokeWidth = 2;
@@ -412,8 +430,15 @@ declare class AtlCheckbox implements FormCheckboxControl {
412
430
  readonly name: _angular_core.InputSignal<string>;
413
431
  /** Validation errors from the form system. Bound by [formField] directive. */
414
432
  readonly errors: _angular_core.InputSignal<readonly WithOptionalFieldTree<ValidationError>[]>;
433
+ /**
434
+ * Explicit id for the native input. Wins over the generated id — set this
435
+ * when something outside the component (an external `<label for>`, or
436
+ * `aria-describedby` from elsewhere on the page) needs a stable id to point at.
437
+ */
438
+ readonly id: _angular_core.InputSignal<string>;
439
+ private readonly generatedId;
415
440
  /** @internal */
416
- protected readonly inputId: string;
441
+ protected readonly inputId: _angular_core.Signal<string>;
417
442
  /** @internal */
418
443
  protected readonly errorId: string;
419
444
  /** @internal */
@@ -433,7 +458,7 @@ declare class AtlCheckbox implements FormCheckboxControl {
433
458
  /** @internal */
434
459
  protected onChange(event: Event): void;
435
460
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AtlCheckbox, never>;
436
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AtlCheckbox, "atl-checkbox", never, { "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "errors": { "alias": "errors"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "touched": "touchedChange"; }, never, ["*"], true, never>;
461
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AtlCheckbox, "atl-checkbox", never, { "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "errors": { "alias": "errors"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "touched": "touchedChange"; }, never, ["*"], true, never>;
437
462
  }
438
463
 
439
464
  /** @internal — shape required by AtlRadioGroup's FocusKeyManager */
@@ -602,8 +627,15 @@ declare class AtlToggle implements FormCheckboxControl {
602
627
  readonly name: _angular_core.InputSignal<string>;
603
628
  /** Validation errors from the form system. Bound by [formField] directive. */
604
629
  readonly errors: _angular_core.InputSignal<readonly WithOptionalFieldTree<ValidationError>[]>;
630
+ /**
631
+ * Explicit id for the native input. Wins over the generated id — set this
632
+ * when something outside the component (an external `<label for>`, or
633
+ * `aria-describedby` from elsewhere on the page) needs a stable id to point at.
634
+ */
635
+ readonly id: _angular_core.InputSignal<string>;
636
+ private readonly generatedId;
605
637
  /** @internal */
606
- protected readonly inputId: string;
638
+ protected readonly inputId: _angular_core.Signal<string>;
607
639
  /** @internal */
608
640
  protected readonly errorId: string;
609
641
  /** @internal */
@@ -620,7 +652,7 @@ declare class AtlToggle implements FormCheckboxControl {
620
652
  /** @internal */
621
653
  protected onChange(event: Event): void;
622
654
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AtlToggle, never>;
623
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AtlToggle, "atl-toggle", never, { "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "errors": { "alias": "errors"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "touched": "touchedChange"; }, never, ["*"], true, never>;
655
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AtlToggle, "atl-toggle", never, { "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "errors": { "alias": "errors"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "touched": "touchedChange"; }, never, ["*"], true, never>;
624
656
  }
625
657
 
626
658
  declare class AtlAlert {
@@ -1482,7 +1514,10 @@ declare class AtlProgress {
1482
1514
 
1483
1515
  /**
1484
1516
  * Accessible breadcrumb navigation. Wrap `atl-breadcrumb-item` elements inside.
1485
- * The last item is automatically marked as the current page.
1517
+ * The last item is automatically marked as the current page, unless an item sets
1518
+ * `current` itself. If any item does, only explicit values count: `[current]="true"`
1519
+ * on the item that is the page, or `[current]="false"` for a trail with no current
1520
+ * page.
1486
1521
  *
1487
1522
  * Usage:
1488
1523
  * ```html
@@ -1494,14 +1529,17 @@ declare class AtlProgress {
1494
1529
  * ```
1495
1530
  */
1496
1531
  declare class AtlBreadcrumbs {
1532
+ /** Separator character shown between breadcrumb items. Default `/`. */
1497
1533
  readonly separator: _angular_core.InputSignal<string | undefined>;
1498
- protected readonly separatorCssVar: _angular_core.Signal<string>;
1499
- private readonly _itemIds;
1534
+ protected readonly separatorCssVar: Signal<string>;
1535
+ private readonly _items;
1500
1536
  private _nextId;
1501
1537
  /** @internal — used by AtlBreadcrumbItem via ATL_BREADCRUMBS token */
1502
- readonly lastItemId: _angular_core.Signal<number>;
1538
+ readonly lastItemId: Signal<number>;
1503
1539
  /** @internal */
1504
- registerItem(): number;
1540
+ readonly hasExplicitCurrent: Signal<boolean>;
1541
+ /** @internal */
1542
+ registerItem(explicit: Signal<boolean | undefined>): number;
1505
1543
  /** @internal */
1506
1544
  unregisterItem(id: number): void;
1507
1545
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AtlBreadcrumbs, never>;
@@ -1509,24 +1547,33 @@ declare class AtlBreadcrumbs {
1509
1547
  }
1510
1548
  /**
1511
1549
  * A single breadcrumb step. The last item is automatically treated as
1512
- * `aria-current="page"` and rendered as plain text (no link).
1550
+ * `aria-current="page"` and rendered as plain text (no link), unless `current`
1551
+ * is set on any item (see `AtlBreadcrumbs`).
1513
1552
  */
1514
1553
  declare class AtlBreadcrumbItem implements OnInit, OnDestroy {
1515
- /** Optional href for navigation. Ignored on the last (current) item. */
1554
+ /** Optional href for navigation. Ignored on the current item. */
1516
1555
  readonly href: _angular_core.InputSignal<string>;
1556
+ /**
1557
+ * Whether this is the current page. Leave it unset and the last item is the
1558
+ * current page; set it on any item and only explicit values count.
1559
+ */
1560
+ readonly current: _angular_core.InputSignalWithTransform<boolean | undefined, string | boolean | undefined>;
1517
1561
  private readonly context;
1518
1562
  private readonly myIndex;
1519
- protected readonly isCurrent: _angular_core.Signal<boolean>;
1563
+ protected readonly isCurrent: Signal<boolean>;
1520
1564
  ngOnInit(): void;
1521
1565
  ngOnDestroy(): void;
1522
1566
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AtlBreadcrumbItem, never>;
1523
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AtlBreadcrumbItem, "atl-breadcrumb-item", never, { "href": { "alias": "href"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
1567
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AtlBreadcrumbItem, "atl-breadcrumb-item", never, { "href": { "alias": "href"; "required": false; "isSignal": true; }; "current": { "alias": "current"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
1524
1568
  }
1525
1569
 
1526
1570
  interface AtlBreadcrumbsContext {
1527
- registerItem(): number;
1571
+ /** Registers an item with the signal holding its explicit `current`, if any. */
1572
+ registerItem(explicit: Signal<boolean | undefined>): number;
1528
1573
  unregisterItem(id: number): void;
1529
1574
  readonly lastItemId: Signal<number>;
1575
+ /** Whether any registered item set `current` itself; if so the last-item default is off. */
1576
+ readonly hasExplicitCurrent: Signal<boolean>;
1530
1577
  }
1531
1578
  declare const ATL_BREADCRUMBS: InjectionToken<AtlBreadcrumbsContext>;
1532
1579
 
@@ -1546,7 +1593,11 @@ type PageItem = {
1546
1593
  * ```
1547
1594
  */
1548
1595
  declare class AtlPagination {
1549
- /** Current page (1-based). Supports two-way binding: [(page)]="currentPage". */
1596
+ /**
1597
+ * Current page (1-based). Two-way: `[(page)]="currentPage"`. The component owns the
1598
+ * state, so it also works unbound or with `[page]` plus `(pageChange)`. React and Vue
1599
+ * are controlled instead: they keep no page state and expect the new page fed back in.
1600
+ */
1550
1601
  readonly page: _angular_core.ModelSignal<number>;
1551
1602
  /** Total number of pages. */
1552
1603
  readonly pageCount: _angular_core.InputSignal<number>;
@@ -1843,7 +1894,9 @@ declare class AtlStepper implements AtlStepperContext {
1843
1894
  /** Layout orientation. */
1844
1895
  readonly orientation: _angular_core.InputSignal<"horizontal" | "vertical">;
1845
1896
  /**
1846
- * When true, users can only navigate to completed steps or the next pending step.
1897
+ * When true, a step can be reached only once every step before it is completed or
1898
+ * `optional`: the user can go to completed steps and the next pending one, and can
1899
+ * pass over optional steps. React and Vue behave the same.
1847
1900
  * Use `goTo()` / `next()` in your step content to advance programmatically.
1848
1901
  */
1849
1902
  readonly linear: _angular_core.InputSignal<boolean>;
@@ -2119,4 +2172,4 @@ interface AtlChatContext {
2119
2172
  declare const ATL_CHAT: InjectionToken<AtlChatContext>;
2120
2173
 
2121
2174
  export { ATL_ACCORDION_GROUP, ATL_BREADCRUMBS, ATL_CHAT, ATL_DIALOG, ATL_DRAWER, ATL_RADIO_GROUP, ATL_SELECT, ATL_STEPPER, ATL_TABLE, ATL_TAB_GROUP, AtlAccordionGroup, AtlAccordionHeader, AtlAccordionItem, AtlAlert, AtlAvatar, AtlAvatarGroup, AtlBadge, AtlBreadcrumbItem, AtlBreadcrumbs, AtlButton, AtlCard, AtlCardContent, AtlCardFooter, AtlCardHeader, AtlChat, AtlChatHeader, AtlChatInput, AtlChatMessage, AtlChatMessages, AtlChatSuggestion, AtlChatTyping, AtlCheckbox, AtlCodeBlock, AtlCombobox, AtlDialog, AtlDialogContent, AtlDialogFooter, AtlDialogHeader, AtlDrawer, AtlDrawerContent, AtlDrawerFooter, AtlDrawerHeader, AtlIcon, AtlInput, AtlMenu, AtlMenuItem, AtlMenuSeparator, AtlMenuTrigger, AtlOption, AtlPagination, AtlProgress, AtlRadio, AtlRadioGroup, AtlSelect, AtlSkeleton, AtlStep, AtlStepper, AtlTab, AtlTabGroup, AtlTable, AtlTbody, AtlTd, AtlTextarea, AtlTh, AtlThead, AtlToast, AtlToastContainer, AtlToastService, AtlToggle, AtlTooltip, AtlTr };
2122
- export type { AtlAccordionGroupContext, AtlBreadcrumbsContext, AtlChatContext, AtlDialogContext, AtlDrawerContext, AtlRadioGroupContext, AtlSelectContext, AtlSortDirection, AtlStepperContext, AtlTabGroupContext, AtlTableContext, PageItem, StepInfo, TabInfo, ToastData, ToastOptions };
2175
+ export type { AtlAccordionGroupContext, AtlBreadcrumbsContext, AtlChatContext, AtlDialogContext, AtlDrawerContext, AtlErrorItem, AtlRadioGroupContext, AtlSelectContext, AtlSortDirection, AtlStepperContext, AtlTabGroupContext, AtlTableContext, PageItem, StepInfo, TabInfo, ToastData, ToastOptions };