@joanroucoux/cairn-ui 0.9.2 → 0.10.1

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.
Files changed (75) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +2 -0
  3. package/fesm2022/joanroucoux-cairn-ui-action-bar.mjs +3 -3
  4. package/fesm2022/joanroucoux-cairn-ui-alert.mjs +3 -3
  5. package/fesm2022/joanroucoux-cairn-ui-amount.mjs +3 -3
  6. package/fesm2022/joanroucoux-cairn-ui-async.mjs +3 -3
  7. package/fesm2022/joanroucoux-cairn-ui-async.mjs.map +1 -1
  8. package/fesm2022/joanroucoux-cairn-ui-avatar.mjs +6 -6
  9. package/fesm2022/joanroucoux-cairn-ui-back-link.mjs +3 -3
  10. package/fesm2022/joanroucoux-cairn-ui-badge.mjs +3 -3
  11. package/fesm2022/joanroucoux-cairn-ui-button.mjs +3 -3
  12. package/fesm2022/joanroucoux-cairn-ui-card.mjs +3 -3
  13. package/fesm2022/joanroucoux-cairn-ui-choice-chips.mjs +3 -3
  14. package/fesm2022/joanroucoux-cairn-ui-choice-chips.mjs.map +1 -1
  15. package/fesm2022/joanroucoux-cairn-ui-delta.mjs +3 -3
  16. package/fesm2022/joanroucoux-cairn-ui-dialog.mjs +3 -3
  17. package/fesm2022/joanroucoux-cairn-ui-dialog.mjs.map +1 -1
  18. package/fesm2022/joanroucoux-cairn-ui-donut.mjs +7 -7
  19. package/fesm2022/joanroucoux-cairn-ui-donut.mjs.map +1 -1
  20. package/fesm2022/joanroucoux-cairn-ui-drawer.mjs +3 -3
  21. package/fesm2022/joanroucoux-cairn-ui-drawer.mjs.map +1 -1
  22. package/fesm2022/joanroucoux-cairn-ui-empty.mjs +3 -3
  23. package/fesm2022/joanroucoux-cairn-ui-empty.mjs.map +1 -1
  24. package/fesm2022/joanroucoux-cairn-ui-external-link.mjs +3 -3
  25. package/fesm2022/joanroucoux-cairn-ui-fact.mjs +6 -6
  26. package/fesm2022/joanroucoux-cairn-ui-fact.mjs.map +1 -1
  27. package/fesm2022/joanroucoux-cairn-ui-field.mjs +9 -9
  28. package/fesm2022/joanroucoux-cairn-ui-filter-chips.mjs +3 -3
  29. package/fesm2022/joanroucoux-cairn-ui-group-header.mjs +3 -3
  30. package/fesm2022/joanroucoux-cairn-ui-group-header.mjs.map +1 -1
  31. package/fesm2022/joanroucoux-cairn-ui-icon-toggle.mjs +43 -0
  32. package/fesm2022/joanroucoux-cairn-ui-icon-toggle.mjs.map +1 -0
  33. package/fesm2022/joanroucoux-cairn-ui-input.mjs +6 -6
  34. package/fesm2022/joanroucoux-cairn-ui-input.mjs.map +1 -1
  35. package/fesm2022/joanroucoux-cairn-ui-line-chart.mjs +3 -3
  36. package/fesm2022/joanroucoux-cairn-ui-menu.mjs +17 -10
  37. package/fesm2022/joanroucoux-cairn-ui-menu.mjs.map +1 -1
  38. package/fesm2022/joanroucoux-cairn-ui-meter.mjs +3 -3
  39. package/fesm2022/joanroucoux-cairn-ui-motion.mjs +12 -12
  40. package/fesm2022/joanroucoux-cairn-ui-nav-item.mjs +3 -3
  41. package/fesm2022/joanroucoux-cairn-ui-result-group.mjs +3 -3
  42. package/fesm2022/joanroucoux-cairn-ui-result-group.mjs.map +1 -1
  43. package/fesm2022/joanroucoux-cairn-ui-row.mjs +15 -15
  44. package/fesm2022/joanroucoux-cairn-ui-row.mjs.map +1 -1
  45. package/fesm2022/joanroucoux-cairn-ui-segmented.mjs +3 -3
  46. package/fesm2022/joanroucoux-cairn-ui-select-pill.mjs +3 -3
  47. package/fesm2022/joanroucoux-cairn-ui-select.mjs +3 -3
  48. package/fesm2022/joanroucoux-cairn-ui-skeleton.mjs +3 -3
  49. package/fesm2022/joanroucoux-cairn-ui-stale-link.mjs +3 -3
  50. package/fesm2022/joanroucoux-cairn-ui-stale-link.mjs.map +1 -1
  51. package/fesm2022/joanroucoux-cairn-ui-stat.mjs +3 -3
  52. package/fesm2022/joanroucoux-cairn-ui-switch.mjs +3 -3
  53. package/fesm2022/joanroucoux-cairn-ui-tab-bar.mjs +6 -6
  54. package/fesm2022/joanroucoux-cairn-ui-table.mjs +27 -27
  55. package/fesm2022/joanroucoux-cairn-ui-table.mjs.map +1 -1
  56. package/fesm2022/joanroucoux-cairn-ui-toast.mjs +7 -7
  57. package/fesm2022/joanroucoux-cairn-ui-toast.mjs.map +1 -1
  58. package/mcp-manifest.json +1 -0
  59. package/package.json +9 -2
  60. package/types/joanroucoux-cairn-ui-async.d.ts +3 -3
  61. package/types/joanroucoux-cairn-ui-choice-chips.d.ts +2 -2
  62. package/types/joanroucoux-cairn-ui-dialog.d.ts +3 -0
  63. package/types/joanroucoux-cairn-ui-donut.d.ts +1 -1
  64. package/types/joanroucoux-cairn-ui-drawer.d.ts +1 -1
  65. package/types/joanroucoux-cairn-ui-empty.d.ts +3 -3
  66. package/types/joanroucoux-cairn-ui-fact.d.ts +1 -1
  67. package/types/joanroucoux-cairn-ui-group-header.d.ts +1 -1
  68. package/types/joanroucoux-cairn-ui-icon-toggle.d.ts +13 -0
  69. package/types/joanroucoux-cairn-ui-input.d.ts +3 -0
  70. package/types/joanroucoux-cairn-ui-menu.d.ts +3 -3
  71. package/types/joanroucoux-cairn-ui-result-group.d.ts +3 -3
  72. package/types/joanroucoux-cairn-ui-row.d.ts +1 -1
  73. package/types/joanroucoux-cairn-ui-stale-link.d.ts +2 -2
  74. package/types/joanroucoux-cairn-ui-table.d.ts +16 -6
  75. package/types/joanroucoux-cairn-ui-toast.d.ts +3 -3
@@ -6,14 +6,14 @@ type AsyncState = (typeof ASYNC_STATES)[number];
6
6
  /** Looks of the error block. */
7
7
  export declare const ASYNC_VARIANTS: readonly ["elevated", "plain", "emphasis", "inline"];
8
8
  type AsyncVariant = (typeof ASYNC_VARIANTS)[number];
9
- /** Alignments of the error block; `auto` is centred from 64rem. */
9
+ /** Alignments of the error block; `auto` is centered from 64rem. */
10
10
  export declare const ASYNC_ALIGNS: readonly ["start", "center", "auto"];
11
11
  type AsyncAlign = (typeof ASYNC_ALIGNS)[number];
12
12
  /**
13
13
  * The three states of a block that depends on a service call, next to the ready content.
14
14
  *
15
15
  * @example
16
- * <ui-async [state]="totalState()" errorTitle="Total could not be loaded" errorMessage="The server did not answer." retryLabel="Retry" (retry)="reload()">
16
+ * <ui-async [state]="totalState()" errorTitle="The total couldn’t be loaded" errorMessage="The server didn’t respond." retryLabel="Try again" (retry)="reload()">
17
17
  * <span asyncLoading><ui-skeleton shape="figure" /></span>
18
18
  * <span asyncEmpty>Add a holding to see your total.</span>
19
19
  * <span>{{ total() }}</span>
@@ -25,7 +25,7 @@ export declare class UiAsync {
25
25
  readonly errorTitle: import("@angular/core").InputSignal<string | undefined>;
26
26
  readonly errorMessage: import("@angular/core").InputSignal<string | undefined>;
27
27
  readonly retryLabel: import("@angular/core").InputSignal<string | undefined>;
28
- /** Draws the rotate icon in the retry button. Only the `inline` variant honours `false`. */
28
+ /** Draws the rotate icon in the retry button. Only the `inline` variant honors `false`. */
29
29
  readonly retryIcon: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
30
30
  readonly variant: import("@angular/core").InputSignal<"elevated" | "plain" | "emphasis" | "inline">;
31
31
  readonly align: import("@angular/core").InputSignal<"start" | "center" | "auto">;
@@ -10,10 +10,10 @@ type ChoiceChipOption = {
10
10
  * with `[formField]`.
11
11
  *
12
12
  * @example
13
- * <ui-choice-chips label="Envelope" [options]="envelopes" [(value)]="envelope" />
13
+ * <ui-choice-chips label="Wrapper" [options]="wrappers" [(value)]="wrapper" />
14
14
  *
15
15
  * @example
16
- * <ui-choice-chips label="Envelope" [options]="envelopes" [formField]="form.envelope" />
16
+ * <ui-choice-chips label="Wrapper" [options]="wrappers" [formField]="form.wrapper" />
17
17
  */
18
18
  export declare class UiChoiceChips implements UiControl {
19
19
  #private;
@@ -1,6 +1,7 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import { OutputEmitterRef, Signal } from "@angular/core";
3
3
  type SharedReason = 'escape' | 'backdrop' | 'cross' | 'programmatic';
4
+ /** @internal */
4
5
  type ModalCloseConfig<R extends string> = {
5
6
  readonly open: Signal<boolean>;
6
7
  readonly busy: Signal<boolean>;
@@ -14,6 +15,8 @@ type ModalCloseConfig<R extends string> = {
14
15
  * Escape and a press-and-release on the veil close it unless `busy`, `dismissed` reports a close the user asked for
15
16
  * and `closed` its reason once the exit transition has played. `opening` runs just before `showModal()`. Must be
16
17
  * created in an injection context.
18
+ *
19
+ * @internal Shared by `ui-dialog` and `ui-drawer`, not meant for applications.
17
20
  */
18
21
  export declare class ModalClose<R extends string> {
19
22
  #private;
@@ -29,7 +29,7 @@ declare function positionSlices(slices: RankedSlice[]): PositionedSlice[];
29
29
  * activating a legend row highlights its slice.
30
30
  *
31
31
  * @example
32
- * <ui-donut [slices]="byAssetClass()" label="Par classe d'actif" othersLabel="Autres" [valueFormat]="formatEur" [shareFormat]="formatShare" (sliceSelect)="goToHoldings($event)" />
32
+ * <ui-donut [slices]="byAssetClass()" label="By asset class" othersLabel="Other" [valueFormat]="formatEur" [shareFormat]="formatShare" (sliceSelect)="goToHoldings($event)" />
33
33
  */
34
34
  export declare class UiDonut {
35
35
  readonly slices: import("@angular/core").InputSignal<DonutSlice[]>;
@@ -10,7 +10,7 @@ type DrawerCloseReason = (typeof DRAWER_CLOSE_REASONS)[number];
10
10
  * With both, `label` names the panel and the heading stays its visible title.
11
11
  *
12
12
  * @example
13
- * <ui-drawer heading="Northwind Monde" closeLabel="Fermer le détail" [open]="open()" (dismissed)="open.set(false)">
13
+ * <ui-drawer heading="Northwind World" closeLabel="Close the detail" [open]="open()" (dismissed)="open.set(false)">
14
14
  * <p>Body</p>
15
15
  * </ui-drawer>
16
16
  */
@@ -1,10 +1,10 @@
1
1
  import * as i0 from "@angular/core";
2
2
  /**
3
- * Centred empty state: a title, a hint and an action slot, such as a search that matches nothing.
3
+ * Centered empty state: a title, a hint and an action slot, such as a search that matches nothing.
4
4
  *
5
5
  * @example
6
- * <ui-empty heading="Aucune ligne ne correspond à « zzz »" hint="La recherche porte sur le nom et l'ISIN.">
7
- * <button ui-button variant="outline" size="md" type="button">Ajouter une ligne</button>
6
+ * <ui-empty heading="No holding matches “zzz”" hint="Search covers the name and the ISIN.">
7
+ * <button ui-button variant="outline" size="md" type="button">Add a holding</button>
8
8
  * </ui-empty>
9
9
  */
10
10
  export declare class UiEmpty {
@@ -2,7 +2,7 @@ import * as i0 from "@angular/core";
2
2
  /** Available fact row sizes. */
3
3
  export declare const FACT_SIZES: readonly ["md", "sm", "auto", "recap"];
4
4
  type FactSize = (typeof FACT_SIZES)[number];
5
- /** Colour of the line under a fact value. `stale` flags an out-of-date figure. */
5
+ /** Color of the line under a fact value. `stale` flags an out-of-date figure. */
6
6
  export declare const FACT_SUB_TONES: readonly ["subtle", "stale"];
7
7
  type FactSubTone = (typeof FACT_SUB_TONES)[number];
8
8
  /**
@@ -8,7 +8,7 @@ import * as i0 from "@angular/core";
8
8
  * changes nothing (a filter holds the group open). `controls` is the id of the body it folds.
9
9
  *
10
10
  * @example
11
- * <ui-group-header name="Northwind PEA" meta="PEA · 3 lignes" collapsible [(expanded)]="open">
11
+ * <ui-group-header name="Northwind PEA" meta="PEA · 3 holdings" collapsible [(expanded)]="open">
12
12
  * <ui-amount [value]="total" />
13
13
  * </ui-group-header>
14
14
  */
@@ -0,0 +1,13 @@
1
+ import * as i0 from "@angular/core";
2
+ /**
3
+ * Round icon button that switches something on and off, such as the header eye that hides the amounts.
4
+ * The state lives in `aria-pressed`, which also draws the soft fill. Only the press scale transitions:
5
+ * the fill changes at once.
6
+ *
7
+ * @example
8
+ * <button uiIconToggle aria-label="Hide amounts" [attr.aria-pressed]="hidden"><svg>...</svg></button>
9
+ */
10
+ export declare class UiIconToggle {
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiIconToggle, never>;
12
+ static ɵdir: i0.ɵɵDirectiveDeclaration<UiIconToggle, "button[uiIconToggle]", never, {}, {}, never, never, true, never>;
13
+ }
@@ -3,10 +3,13 @@ import * as i0 from "@angular/core";
3
3
  /** Available control sizes. */
4
4
  export declare const CONTROL_SIZES: readonly ["sm", "md", "lg", "xl"];
5
5
  type ControlSize = (typeof CONTROL_SIZES)[number];
6
+ /** @internal Shared with `select` and `choice-chips`. */
6
7
  export declare const CONTROL_BASE_CLASSES = "w-full rounded-control px-3 text-body text-(--foreground) shadow-[inset_0_0_0_1px_var(--border)] placeholder:text-(--muted-foreground) focus-visible:shadow-[inset_0_0_0_2px_var(--ring)] aria-invalid:shadow-[inset_0_0_0_2px_var(--negative)] disabled:cursor-not-allowed disabled:opacity-50";
7
8
  export declare const CONTROL_SURFACES: readonly ["background", "card"];
8
9
  type ControlSurface = (typeof CONTROL_SURFACES)[number];
10
+ /** @internal Shared with `select` and `choice-chips`. */
9
11
  export declare const CONTROL_SURFACE_CLASSES: Record<ControlSurface, string>;
12
+ /** @internal Shared with `select` and `choice-chips`. */
10
13
  export declare const CONTROL_SIZE_CLASSES: Record<ControlSize, string>;
11
14
  /**
12
15
  * Styled native text input. The host stays a plain `<input>`, so every forms flavor and native
@@ -4,7 +4,7 @@ import * as i0 from "@angular/core";
4
4
  * choice (`menuitemradio`): the current one carries a check mark and `aria-checked="true"`.
5
5
  *
6
6
  * @example
7
- * <button uiMenuItem destructive (click)="remove()">Delete the line</button>
7
+ * <button uiMenuItem destructive (click)="remove()">Delete the holding</button>
8
8
  * <button uiMenuItem [checked]="account() === 'pea'" (click)="account.set('pea')">Northwind PEA</button>
9
9
  */
10
10
  export declare class UiMenuItem {
@@ -37,9 +37,9 @@ export declare class UiMenuItem {
37
37
  *
38
38
  * @example
39
39
  * <button ui-button size="icon" aria-label="More" [uiMenuTrigger]="menu">...</button>
40
- * <ui-menu #menu label="Line actions">
40
+ * <ui-menu #menu label="Holding actions">
41
41
  * <button uiMenuItem (click)="edit()">Edit</button>
42
- * <button uiMenuItem destructive (click)="remove()">Delete the line</button>
42
+ * <button uiMenuItem destructive (click)="remove()">Delete the holding</button>
43
43
  * </ui-menu>
44
44
  */
45
45
  export declare class UiMenu {
@@ -4,10 +4,10 @@ import * as i0 from "@angular/core";
4
4
  * message when it has nothing, or an inline error with a retry.
5
5
  *
6
6
  * @example
7
- * <ui-result-group label="Yahoo Finance" hint="cours en continu" [state]="state()"
8
- * errorMessage="Yahoo Finance n'a pas répondu." retryLabel="Réessayer" (retry)="search()">
7
+ * <ui-result-group label="Yahoo Finance" hint="live prices" [state]="state()"
8
+ * errorMessage="Yahoo Finance didn’t respond." retryLabel="Try again" (retry)="search()">
9
9
  * <button ui-row size="dense" type="button">...</button>
10
- * <span resultGroupMessage>Aucun résultat chez Yahoo Finance.</span>
10
+ * <span resultGroupMessage>No results from Yahoo Finance.</span>
11
11
  * </ui-result-group>
12
12
  */
13
13
  export declare class UiResultGroup {
@@ -109,7 +109,7 @@ export declare class UiListRow {
109
109
  *
110
110
  * @example
111
111
  * <div uiRowGroup>
112
- * <button ui-row type="button" trailing="chevron">Saisir à la main</button>
112
+ * <button ui-row type="button" trailing="chevron">Enter manually</button>
113
113
  * </div>
114
114
  */
115
115
  export declare class UiRowGroup {
@@ -4,11 +4,11 @@ export declare const STALE_LINK_SIZES: readonly ["caption", "label"];
4
4
  type StaleLinkSize = (typeof STALE_LINK_SIZES)[number];
5
5
  /**
6
6
  * Link in the stale tone, for a caption about data that is late or left out of a total, such as
7
- * "1 ligne sans cours, non comptée". `chevron` adds a trailing chevron, `size` is `caption` (the
7
+ * "1 holding without a price, not counted". `chevron` adds a trailing chevron, `size` is `caption` (the
8
8
  * default) or `label`.
9
9
  *
10
10
  * @example
11
- * <a uiStaleLink chevron size="label" routerLink="/holdings">1 cours en retard</a>
11
+ * <a uiStaleLink chevron size="label" routerLink="/holdings">1 stale price</a>
12
12
  */
13
13
  export declare class UiStaleLink {
14
14
  readonly chevron: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
@@ -139,7 +139,12 @@ export declare class UiTh {
139
139
  };
140
140
  }, {}, never, never, true, never>;
141
141
  }
142
- /** Body cell. Same inputs as `UiTh` bar `tall` and `width`, which must be set on both to match. */
142
+ /**
143
+ * Body cell. Same inputs as `UiTh` bar `tall` and `width`, which must be set on both to match.
144
+ *
145
+ * @example
146
+ * <td uiTd numeric secondary>12</td>
147
+ */
143
148
  export declare class UiTd {
144
149
  readonly numeric: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
145
150
  readonly primary: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
@@ -240,10 +245,10 @@ export declare class UiGroupCell {
240
245
  /**
241
246
  * Makes a link or button the way into its row: by default it stretches over the whole row, so the
242
247
  * row is one target. With `[stretch]="false"` only the name is the target. `current` marks the open
243
- * line. Other controls in the row need `uiRowAction` to stay clickable.
248
+ * holding. Other controls in the row need `uiRowAction` to stay clickable.
244
249
  *
245
250
  * @example
246
- * <td uiTd primary><a uiRowLink href="/lines/42">Ferrari</a></td>
251
+ * <td uiTd primary><a uiRowLink href="/holdings/42">Ferrari</a></td>
247
252
  * <td uiTd primary><a uiRowLink [stretch]="false" href="/accounts/3">Brokerage</a></td>
248
253
  */
249
254
  export declare class UiRowLink {
@@ -264,7 +269,12 @@ export declare class UiRowLink {
264
269
  };
265
270
  }, {}, never, never, true, never>;
266
271
  }
267
- /** A control in another cell of a stretched-link row: keeps it clickable above the row-wide link. */
272
+ /**
273
+ * A control in another cell of a stretched-link row: keeps it clickable above the row-wide link.
274
+ *
275
+ * @example
276
+ * <td uiTd><button uiRowAction type="button">Enter a price</button></td>
277
+ */
268
278
  export declare class UiRowAction {
269
279
  static ɵfac: i0.ɵɵFactoryDeclaration<UiRowAction, never>;
270
280
  static ɵdir: i0.ɵɵDirectiveDeclaration<UiRowAction, "[uiRowAction]", never, {}, {}, never, never, true, never>;
@@ -277,8 +287,8 @@ type SubTone = (typeof SUB_TONES)[number];
277
287
  * back by `secondary` columns.
278
288
  *
279
289
  * @example
280
- * <span uiCellSub narrow>10 × 421.26 € · cost 388.10 €</span>
281
- * <span uiCellSub tone="stale">Quote of 24/09</span>
290
+ * <span uiCellSub narrow>10 × 421,26 € · Avg. cost 388,10 €</span>
291
+ * <span uiCellSub tone="stale">Price as of 24/09</span>
282
292
  */
283
293
  export declare class UiCellSub {
284
294
  readonly narrow: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
@@ -13,8 +13,8 @@ type Toast = {
13
13
  * One-slot message queue read by `ui-toaster`: a confirmation that times out, or an error that stays until closed.
14
14
  *
15
15
  * @example
16
- * inject(UiToasts).show('Achat enregistré');
17
- * inject(UiToasts).showError("Échec de l'import");
16
+ * inject(UiToasts).show('Purchase recorded');
17
+ * inject(UiToasts).showError('Import failed');
18
18
  */
19
19
  export declare class UiToasts {
20
20
  private readonly current;
@@ -28,7 +28,7 @@ export declare class UiToasts {
28
28
  }
29
29
  /**
30
30
  * Message shown by `UiToasts`: one at a time, no action. A confirmation (`show`) is gone after `--toast-duration`;
31
- * an error (`showError`) stays until its cross is clicked. Centred at the bottom of the content area: from `64rem`
31
+ * an error (`showError`) stays until its cross is clicked. Centered at the bottom of the content area: from `64rem`
32
32
  * between `--sidebar-width` (0 when unset) and the right edge.
33
33
  * Place it once in the app shell.
34
34
  *