@joanroucoux/cairn-ui 0.8.2 → 0.9.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.
Files changed (124) hide show
  1. package/CHANGELOG.md +99 -0
  2. package/fesm2022/joanroucoux-cairn-ui-action-bar.mjs +57 -53
  3. package/fesm2022/joanroucoux-cairn-ui-action-bar.mjs.map +1 -1
  4. package/fesm2022/joanroucoux-cairn-ui-alert.mjs +155 -47
  5. package/fesm2022/joanroucoux-cairn-ui-alert.mjs.map +1 -1
  6. package/fesm2022/joanroucoux-cairn-ui-amount.mjs +220 -110
  7. package/fesm2022/joanroucoux-cairn-ui-amount.mjs.map +1 -1
  8. package/fesm2022/joanroucoux-cairn-ui-async.mjs +392 -216
  9. package/fesm2022/joanroucoux-cairn-ui-async.mjs.map +1 -1
  10. package/fesm2022/joanroucoux-cairn-ui-avatar.mjs +145 -68
  11. package/fesm2022/joanroucoux-cairn-ui-avatar.mjs.map +1 -1
  12. package/fesm2022/joanroucoux-cairn-ui-back-link.mjs +87 -47
  13. package/fesm2022/joanroucoux-cairn-ui-back-link.mjs.map +1 -1
  14. package/fesm2022/joanroucoux-cairn-ui-badge.mjs +83 -43
  15. package/fesm2022/joanroucoux-cairn-ui-badge.mjs.map +1 -1
  16. package/fesm2022/joanroucoux-cairn-ui-button.mjs +184 -104
  17. package/fesm2022/joanroucoux-cairn-ui-button.mjs.map +1 -1
  18. package/fesm2022/joanroucoux-cairn-ui-card.mjs +232 -137
  19. package/fesm2022/joanroucoux-cairn-ui-card.mjs.map +1 -1
  20. package/fesm2022/joanroucoux-cairn-ui-choice-chips.mjs +298 -102
  21. package/fesm2022/joanroucoux-cairn-ui-choice-chips.mjs.map +1 -1
  22. package/fesm2022/joanroucoux-cairn-ui-control.mjs +4 -17
  23. package/fesm2022/joanroucoux-cairn-ui-control.mjs.map +1 -1
  24. package/fesm2022/joanroucoux-cairn-ui-delta.mjs +150 -83
  25. package/fesm2022/joanroucoux-cairn-ui-delta.mjs.map +1 -1
  26. package/fesm2022/joanroucoux-cairn-ui-dialog.mjs +508 -471
  27. package/fesm2022/joanroucoux-cairn-ui-dialog.mjs.map +1 -1
  28. package/fesm2022/joanroucoux-cairn-ui-donut.mjs +255 -157
  29. package/fesm2022/joanroucoux-cairn-ui-donut.mjs.map +1 -1
  30. package/fesm2022/joanroucoux-cairn-ui-drawer.mjs +303 -0
  31. package/fesm2022/joanroucoux-cairn-ui-drawer.mjs.map +1 -0
  32. package/fesm2022/joanroucoux-cairn-ui-empty.mjs +76 -35
  33. package/fesm2022/joanroucoux-cairn-ui-empty.mjs.map +1 -1
  34. package/fesm2022/joanroucoux-cairn-ui-external-link.mjs +40 -31
  35. package/fesm2022/joanroucoux-cairn-ui-external-link.mjs.map +1 -1
  36. package/fesm2022/joanroucoux-cairn-ui-fact.mjs +188 -79
  37. package/fesm2022/joanroucoux-cairn-ui-fact.mjs.map +1 -1
  38. package/fesm2022/joanroucoux-cairn-ui-field.mjs +309 -173
  39. package/fesm2022/joanroucoux-cairn-ui-field.mjs.map +1 -1
  40. package/fesm2022/joanroucoux-cairn-ui-filter-chips.mjs +165 -87
  41. package/fesm2022/joanroucoux-cairn-ui-filter-chips.mjs.map +1 -1
  42. package/fesm2022/joanroucoux-cairn-ui-group-header.mjs +269 -0
  43. package/fesm2022/joanroucoux-cairn-ui-group-header.mjs.map +1 -0
  44. package/fesm2022/joanroucoux-cairn-ui-input.mjs +205 -85
  45. package/fesm2022/joanroucoux-cairn-ui-input.mjs.map +1 -1
  46. package/fesm2022/joanroucoux-cairn-ui-line-chart.mjs +838 -512
  47. package/fesm2022/joanroucoux-cairn-ui-line-chart.mjs.map +1 -1
  48. package/fesm2022/joanroucoux-cairn-ui-menu.mjs +401 -225
  49. package/fesm2022/joanroucoux-cairn-ui-menu.mjs.map +1 -1
  50. package/fesm2022/joanroucoux-cairn-ui-meter.mjs +143 -57
  51. package/fesm2022/joanroucoux-cairn-ui-meter.mjs.map +1 -1
  52. package/fesm2022/joanroucoux-cairn-ui-motion.mjs +367 -399
  53. package/fesm2022/joanroucoux-cairn-ui-motion.mjs.map +1 -1
  54. package/fesm2022/joanroucoux-cairn-ui-nav-item.mjs +73 -44
  55. package/fesm2022/joanroucoux-cairn-ui-nav-item.mjs.map +1 -1
  56. package/fesm2022/joanroucoux-cairn-ui-result-group.mjs +191 -0
  57. package/fesm2022/joanroucoux-cairn-ui-result-group.mjs.map +1 -0
  58. package/fesm2022/joanroucoux-cairn-ui-row.mjs +376 -146
  59. package/fesm2022/joanroucoux-cairn-ui-row.mjs.map +1 -1
  60. package/fesm2022/joanroucoux-cairn-ui-segmented.mjs +183 -81
  61. package/fesm2022/joanroucoux-cairn-ui-segmented.mjs.map +1 -1
  62. package/fesm2022/joanroucoux-cairn-ui-select-pill.mjs +233 -0
  63. package/fesm2022/joanroucoux-cairn-ui-select-pill.mjs.map +1 -0
  64. package/fesm2022/joanroucoux-cairn-ui-select.mjs +121 -67
  65. package/fesm2022/joanroucoux-cairn-ui-select.mjs.map +1 -1
  66. package/fesm2022/joanroucoux-cairn-ui-skeleton.mjs +129 -51
  67. package/fesm2022/joanroucoux-cairn-ui-skeleton.mjs.map +1 -1
  68. package/fesm2022/joanroucoux-cairn-ui-stale-link.mjs +80 -39
  69. package/fesm2022/joanroucoux-cairn-ui-stale-link.mjs.map +1 -1
  70. package/fesm2022/joanroucoux-cairn-ui-stat.mjs +85 -55
  71. package/fesm2022/joanroucoux-cairn-ui-stat.mjs.map +1 -1
  72. package/fesm2022/joanroucoux-cairn-ui-switch.mjs +48 -35
  73. package/fesm2022/joanroucoux-cairn-ui-switch.mjs.map +1 -1
  74. package/fesm2022/joanroucoux-cairn-ui-tab-bar.mjs +113 -69
  75. package/fesm2022/joanroucoux-cairn-ui-tab-bar.mjs.map +1 -1
  76. package/fesm2022/joanroucoux-cairn-ui-table.mjs +1036 -310
  77. package/fesm2022/joanroucoux-cairn-ui-table.mjs.map +1 -1
  78. package/fesm2022/joanroucoux-cairn-ui-toast.mjs +240 -127
  79. package/fesm2022/joanroucoux-cairn-ui-toast.mjs.map +1 -1
  80. package/fesm2022/joanroucoux-cairn-ui.mjs +0 -4
  81. package/package.json +17 -1
  82. package/styles/motion.css +1 -13
  83. package/styles/tokens.css +35 -64
  84. package/types/joanroucoux-cairn-ui-action-bar.d.ts +9 -14
  85. package/types/joanroucoux-cairn-ui-alert.d.ts +29 -15
  86. package/types/joanroucoux-cairn-ui-amount.d.ts +64 -32
  87. package/types/joanroucoux-cairn-ui-async.d.ts +85 -38
  88. package/types/joanroucoux-cairn-ui-avatar.d.ts +34 -22
  89. package/types/joanroucoux-cairn-ui-back-link.d.ts +20 -15
  90. package/types/joanroucoux-cairn-ui-badge.d.ts +22 -14
  91. package/types/joanroucoux-cairn-ui-button.d.ts +36 -18
  92. package/types/joanroucoux-cairn-ui-card.d.ts +48 -23
  93. package/types/joanroucoux-cairn-ui-choice-chips.d.ts +91 -35
  94. package/types/joanroucoux-cairn-ui-control.d.ts +9 -18
  95. package/types/joanroucoux-cairn-ui-delta.d.ts +46 -24
  96. package/types/joanroucoux-cairn-ui-dialog.d.ts +124 -57
  97. package/types/joanroucoux-cairn-ui-donut.d.ts +83 -46
  98. package/types/joanroucoux-cairn-ui-drawer.d.ts +73 -0
  99. package/types/joanroucoux-cairn-ui-empty.d.ts +20 -13
  100. package/types/joanroucoux-cairn-ui-external-link.d.ts +6 -10
  101. package/types/joanroucoux-cairn-ui-fact.d.ts +49 -25
  102. package/types/joanroucoux-cairn-ui-field.d.ts +72 -49
  103. package/types/joanroucoux-cairn-ui-filter-chips.d.ts +35 -20
  104. package/types/joanroucoux-cairn-ui-group-header.d.ts +58 -0
  105. package/types/joanroucoux-cairn-ui-input.d.ts +59 -37
  106. package/types/joanroucoux-cairn-ui-line-chart.d.ts +199 -89
  107. package/types/joanroucoux-cairn-ui-menu.d.ts +81 -44
  108. package/types/joanroucoux-cairn-ui-meter.d.ts +44 -22
  109. package/types/joanroucoux-cairn-ui-motion.d.ts +61 -75
  110. package/types/joanroucoux-cairn-ui-nav-item.d.ts +15 -13
  111. package/types/joanroucoux-cairn-ui-result-group.d.ts +52 -0
  112. package/types/joanroucoux-cairn-ui-row.d.ts +79 -37
  113. package/types/joanroucoux-cairn-ui-segmented.d.ts +51 -27
  114. package/types/joanroucoux-cairn-ui-select-pill.d.ts +52 -0
  115. package/types/joanroucoux-cairn-ui-select.d.ts +28 -18
  116. package/types/joanroucoux-cairn-ui-skeleton.d.ts +35 -18
  117. package/types/joanroucoux-cairn-ui-stale-link.d.ts +23 -16
  118. package/types/joanroucoux-cairn-ui-stat.d.ts +26 -21
  119. package/types/joanroucoux-cairn-ui-switch.d.ts +7 -11
  120. package/types/joanroucoux-cairn-ui-tab-bar.d.ts +20 -17
  121. package/types/joanroucoux-cairn-ui-table.d.ts +251 -89
  122. package/types/joanroucoux-cairn-ui-toast.d.ts +46 -36
  123. package/types/joanroucoux-cairn-ui.d.ts +1 -2
  124. package/fesm2022/joanroucoux-cairn-ui.mjs.map +0 -1
@@ -1,18 +1,13 @@
1
- import * as i0 from '@angular/core';
2
- import { Signal } from '@angular/core';
3
-
1
+ import * as i0 from "@angular/core";
2
+ import { Signal } from "@angular/core";
4
3
  /**
5
- * Slides the items of a list into place when one is removed or inserted (FLIP): it measures every item
6
- * before and after the change, from the top of the list itself, then animates the shift in `translateY`
7
- * over `--duration-base` `--ease-out`. Pair it with `animate.leave="ui-leave-fade"` on the item so it fades
8
- * out first. Nothing moves under `prefers-reduced-motion`: the list closes up at once.
4
+ * Slides the items of a list into place when one is removed or inserted (FLIP). Pair it with
5
+ * `animate.leave="ui-leave-fade"` on the item so it fades out first. Nothing moves under
6
+ * `prefers-reduced-motion`.
9
7
  *
10
- * By default the items are the direct children of the list. Mark them with `uiFlipItem` instead when they
11
- * sit deeper, for instance a page of several groups: put `uiFlipList` on the element around every group and
12
- * `uiFlipItem` on each group heading and row, so a removal also slides the groups below. An item may sit
13
- * inside another item (a row inside a card): it then moves by its own share and its card carries the rest.
14
- * Only an item added or removed starts a slide; a change inside an item does not. Positions leave out the
15
- * translate of any animation running inside the list (a slide in progress, an enter fade-up).
8
+ * The items are the direct children of the list. Mark them with `uiFlipItem` instead when they sit
9
+ * deeper, so a removal also slides the groups below. Only an item added or removed starts a slide;
10
+ * a change inside an item does not.
16
11
  *
17
12
  * @example
18
13
  * <ul uiFlipList>
@@ -32,93 +27,84 @@ import { Signal } from '@angular/core';
32
27
  * }
33
28
  * </table>
34
29
  */
35
- declare class UiFlipList {
36
- private readonly host;
37
- private readonly reduced;
38
- private readonly mutations;
39
- private readonly resizes;
40
- private readonly running;
41
- private readonly watched;
42
- private readonly items;
43
- private tops;
44
- private shifts;
45
- constructor();
46
- private tracked;
47
- private measure;
48
- private onChange;
49
- private parentItem;
50
- static ɵfac: i0.ɵɵFactoryDeclaration<UiFlipList, never>;
51
- static ɵdir: i0.ɵɵDirectiveDeclaration<UiFlipList, "[uiFlipList]", never, {}, {}, never, never, true, never>;
30
+ export declare class UiFlipList {
31
+ private readonly host;
32
+ private readonly reduced;
33
+ private readonly mutations;
34
+ private readonly resizes;
35
+ private readonly running;
36
+ private readonly watched;
37
+ private readonly items;
38
+ private tops;
39
+ private shifts;
40
+ constructor();
41
+ private tracked;
42
+ private measure;
43
+ private onChange;
44
+ private parentItem;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiFlipList, never>;
46
+ static ɵdir: i0.ɵɵDirectiveDeclaration<UiFlipList, "[uiFlipList]", never, {}, {}, never, never, true, never>;
52
47
  }
53
48
  /**
54
- * Marks an element as an item of the nearest `uiFlipList`, at any depth: a group heading, a row inside a
55
- * group, a card. Once one item is marked, the list follows its marked items only.
49
+ * Marks an element as an item of the nearest `uiFlipList`, at any depth. Once one item is marked,
50
+ * the list follows its marked items only.
56
51
  *
57
52
  * @example
58
53
  * <tr uiTr uiFlipItem animate.leave="ui-leave-fade">...</tr>
59
54
  */
60
- declare class UiFlipItem {
61
- constructor();
62
- static ɵfac: i0.ɵɵFactoryDeclaration<UiFlipItem, never>;
63
- static ɵdir: i0.ɵɵDirectiveDeclaration<UiFlipItem, "[uiFlipItem]", never, {}, {}, never, never, true, never>;
55
+ export declare class UiFlipItem {
56
+ constructor();
57
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiFlipItem, never>;
58
+ static ɵdir: i0.ɵɵDirectiveDeclaration<UiFlipItem, "[uiFlipItem]", never, {}, {}, never, never, true, never>;
64
59
  }
65
-
66
60
  /**
67
- * Draws the eye to an element that just changed: scrolls it into view when it is off screen, holds the
68
- * `--soft` fill for 200 ms, then fades back to the element's own background over `--duration-highlight`.
69
- * Each new non-null token plays once, so pass a fresh value per event (an object or a counter), not a
70
- * boolean. A non-null token already present at first render plays on arrival. On a `tr` it paints the
71
- * cells, on a `td[ui-group-cell]` the band, anywhere else the host. Under `prefers-reduced-motion` the
72
- * scroll is instant and the fade lasts 600 ms.
73
- *
74
- * It starts on the next frame and, when the element is still playing a finite animation of its own (an
75
- * `animate.enter` fade on a new row), once that animation has finished, waiting no longer than
76
- * `--duration-base`: the element fades in, then lights up. Both can sit on the same element.
61
+ * Draws the eye to an element that just changed: scrolls it into view when off screen, flashes the
62
+ * `--soft` fill, then fades back. Each new non-null token plays once, so pass a fresh value per
63
+ * event (an object or a counter), not a boolean. A non-null token present at first render plays on
64
+ * arrival. Can sit on the same element as `animate.enter`: it waits for that fade to finish.
77
65
  *
78
66
  * Give the element `scroll-margin-top` and `scroll-margin-bottom` equal to what is pinned above and
79
- * below it (header, tab bar, action bar): a row under them counts as off screen and is scrolled out.
80
- * For an arrival on a page opened at the element, scroll to it at once first (`scrollIntoView` in
81
- * `afterNextRender`) and set the token afterwards: a token present at first render scrolls smoothly
82
- * from where the page is.
67
+ * below it (header, tab bar, action bar), or a row under them counts as on screen. For an arrival
68
+ * on a page opened at the element, scroll to it first (`scrollIntoView` in `afterNextRender`) and
69
+ * set the token afterwards, otherwise it scrolls smoothly from where the page is.
83
70
  *
84
71
  * @example
85
72
  * <a ui-row [uiHighlight]="changed() === holding.id ? token() : null" routerLink="/holdings/1">...</a>
86
73
  */
87
- declare class UiHighlight {
88
- readonly uiHighlight: i0.InputSignal<unknown>;
89
- private readonly host;
90
- private readonly reduced;
91
- private cancel;
92
- constructor();
93
- private play;
94
- private isVisible;
95
- private flash;
96
- static ɵfac: i0.ɵɵFactoryDeclaration<UiHighlight, never>;
97
- static ɵdir: i0.ɵɵDirectiveDeclaration<UiHighlight, "[uiHighlight]", never, { "uiHighlight": { "alias": "uiHighlight"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
74
+ export declare class UiHighlight {
75
+ readonly uiHighlight: import("@angular/core").InputSignal<unknown>;
76
+ private readonly host;
77
+ private readonly reduced;
78
+ private cancel;
79
+ constructor();
80
+ private play;
81
+ private isVisible;
82
+ private flash;
83
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiHighlight, never>;
84
+ static ɵdir: i0.ɵɵDirectiveDeclaration<UiHighlight, "[uiHighlight]", never, {
85
+ "uiHighlight": {
86
+ "alias": "uiHighlight";
87
+ "required": false;
88
+ "isSignal": true;
89
+ };
90
+ }, {}, never, never, true, never>;
98
91
  }
99
-
100
92
  /**
101
- * A signal that follows the user's `prefers-reduced-motion` preference live.
102
- * Call it in an injection context; the listener is removed with that context.
93
+ * A signal that follows the user's `prefers-reduced-motion` preference. Call it in an injection
94
+ * context.
103
95
  *
104
96
  * @example
105
97
  * protected readonly reduced = injectReducedMotion();
106
98
  */
107
- declare function injectReducedMotion(): Signal<boolean>;
108
-
99
+ export declare function injectReducedMotion(): Signal<boolean>;
109
100
  /**
110
101
  * Holds the transitions of the host and of everything inside it until two frames after its first
111
- * render, through the `data-ui-settling` attribute and the matching rule of `styles/motion.css`.
112
- * A route's elements are created a tick before their classes are bound; a layout read in between
113
- * would otherwise turn the bound fill, colour or switch track into a transition on page open. Call it
114
- * in an injection context. A host whose view is never refreshed (a detached change detector) keeps the
115
- * attribute, and with it no transition.
102
+ * render, so bound classes do not animate on page open. Call it in an injection context. A host
103
+ * whose view is never refreshed (a detached change detector) never gets its transitions back.
116
104
  *
117
105
  * @example
118
106
  * constructor() {
119
107
  * holdTransitionsUntilRendered();
120
108
  * }
121
109
  */
122
- declare function holdTransitionsUntilRendered(): void;
123
-
124
- export { UiFlipItem, UiFlipList, UiHighlight, holdTransitionsUntilRendered, injectReducedMotion };
110
+ export declare function holdTransitionsUntilRendered(): void;
@@ -1,8 +1,6 @@
1
- import * as _angular_core from '@angular/core';
2
-
1
+ import * as i0 from "@angular/core";
3
2
  /**
4
- * One destination of the sidebar navigation (Portfolio, Holdings, Allocation, Accounts). The active
5
- * fill and text colour switch at once on navigation; only the hover fill fades.
3
+ * One destination of the sidebar navigation.
6
4
  *
7
5
  * @example
8
6
  * <a ui-nav-item [active]="url === '/'" routerLink="/">
@@ -10,12 +8,16 @@ import * as _angular_core from '@angular/core';
10
8
  * Portfolio
11
9
  * </a>
12
10
  */
13
- declare class UiNavItem {
14
- readonly active: _angular_core.InputSignalWithTransform<boolean, unknown>;
15
- protected readonly classes: _angular_core.Signal<string>;
16
- constructor();
17
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiNavItem, never>;
18
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiNavItem, "a[ui-nav-item]", never, { "active": { "alias": "active"; "required": false; "isSignal": true; }; }, {}, never, ["[navIcon]", "*"], true, never>;
19
- }
20
-
21
- export { UiNavItem };
11
+ export declare class UiNavItem {
12
+ readonly active: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
13
+ protected readonly classes: import("@angular/core").Signal<string>;
14
+ constructor();
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiNavItem, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<UiNavItem, "a[ui-nav-item]", never, {
17
+ "active": {
18
+ "alias": "active";
19
+ "required": false;
20
+ "isSignal": true;
21
+ };
22
+ }, {}, never, ["[navIcon]", "*"], true, never>;
23
+ }
@@ -0,0 +1,52 @@
1
+ import * as i0 from "@angular/core";
2
+ /**
3
+ * One source of a search: a two-tone heading, then its rows, or a skeleton while it answers, a
4
+ * message when it has nothing, or an inline error with a retry.
5
+ *
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()">
9
+ * <button ui-row size="dense" type="button">...</button>
10
+ * <span resultGroupMessage>Aucun résultat chez Yahoo Finance.</span>
11
+ * </ui-result-group>
12
+ */
13
+ export declare class UiResultGroup {
14
+ readonly label: import("@angular/core").InputSignal<string>;
15
+ readonly hint: import("@angular/core").InputSignal<string | undefined>;
16
+ readonly state: import("@angular/core").InputSignal<"loading" | "error" | "empty" | "ready">;
17
+ readonly errorMessage: import("@angular/core").InputSignal<string | undefined>;
18
+ readonly retryLabel: import("@angular/core").InputSignal<string | undefined>;
19
+ readonly retry: import("@angular/core").OutputEmitterRef<void>;
20
+ protected readonly name: import("@angular/core").Signal<string>;
21
+ protected readonly animation = "cairn-pulse var(--pulse-duration) var(--ease-out) infinite alternate";
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiResultGroup, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<UiResultGroup, "ui-result-group", never, {
24
+ "label": {
25
+ "alias": "label";
26
+ "required": true;
27
+ "isSignal": true;
28
+ };
29
+ "hint": {
30
+ "alias": "hint";
31
+ "required": false;
32
+ "isSignal": true;
33
+ };
34
+ "state": {
35
+ "alias": "state";
36
+ "required": false;
37
+ "isSignal": true;
38
+ };
39
+ "errorMessage": {
40
+ "alias": "errorMessage";
41
+ "required": false;
42
+ "isSignal": true;
43
+ };
44
+ "retryLabel": {
45
+ "alias": "retryLabel";
46
+ "required": false;
47
+ "isSignal": true;
48
+ };
49
+ }, {
50
+ "retry": "retry";
51
+ }, never, ["[resultGroupMessage]", "*"], true, never>;
52
+ }
@@ -1,34 +1,72 @@
1
- import * as _angular_core from '@angular/core';
2
-
3
- declare const ROW_SIZES: readonly ["md", "lg", "xl", "card", "dense"];
1
+ import * as i0 from "@angular/core";
2
+ export declare const ROW_SIZES: readonly ["md", "lg", "xl", "card", "dense"];
4
3
  type RowSize = (typeof ROW_SIZES)[number];
5
- declare const ROW_PADDINGS: readonly ["md", "sm", "none"];
4
+ export declare const ROW_PADDINGS: readonly ["md", "sm", "none"];
6
5
  type RowPadding = (typeof ROW_PADDINGS)[number];
7
- declare const ROW_GAPS: readonly ["default", "sm"];
6
+ export declare const ROW_GAPS: readonly ["default", "sm"];
8
7
  type RowGap = (typeof ROW_GAPS)[number];
8
+ export declare const ROW_TRAILINGS: readonly ["none", "chevron"];
9
+ type RowTrailing = (typeof ROW_TRAILINGS)[number];
9
10
  /**
10
- * Clickable row of a list: a holding, an account, a search result.
11
+ * Clickable row of a list: a holding, an account, a search result. With `trailing="chevron"` it is a
12
+ * flush link row: no side padding, a 16 px chevron at the end, the text dimming on hover.
11
13
  *
12
14
  * @example
13
15
  * <a ui-row [selected]="holding.id === openId()" [routerLink]="['/holdings', holding.id]">
14
16
  * {{ holding.name }}
15
17
  * </a>
16
18
  */
17
- declare class UiRow {
18
- readonly selected: _angular_core.InputSignalWithTransform<boolean, unknown>;
19
- readonly busy: _angular_core.InputSignalWithTransform<boolean, unknown>;
20
- readonly unavailable: _angular_core.InputSignalWithTransform<boolean, unknown>;
21
- readonly size: _angular_core.InputSignal<"md" | "lg" | "xl" | "card" | "dense">;
22
- readonly padding: _angular_core.InputSignal<"md" | "sm" | "none">;
23
- readonly gap: _angular_core.InputSignal<"sm" | "default">;
24
- protected readonly classes: _angular_core.Signal<string>;
25
- constructor();
26
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiRow, never>;
27
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiRow, "a[ui-row], button[ui-row]", never, { "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "busy": { "alias": "busy"; "required": false; "isSignal": true; }; "unavailable": { "alias": "unavailable"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "padding": { "alias": "padding"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
19
+ export declare class UiRow {
20
+ readonly selected: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
21
+ readonly busy: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
22
+ readonly unavailable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
23
+ readonly size: import("@angular/core").InputSignal<"md" | "lg" | "xl" | "card" | "dense">;
24
+ readonly padding: import("@angular/core").InputSignal<"md" | "sm" | "none">;
25
+ readonly gap: import("@angular/core").InputSignal<"sm" | "default">;
26
+ readonly trailing: import("@angular/core").InputSignal<"none" | "chevron">;
27
+ protected readonly classes: import("@angular/core").Signal<string>;
28
+ constructor();
29
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiRow, never>;
30
+ static ɵcmp: i0.ɵɵComponentDeclaration<UiRow, "a[ui-row], button[ui-row]", never, {
31
+ "selected": {
32
+ "alias": "selected";
33
+ "required": false;
34
+ "isSignal": true;
35
+ };
36
+ "busy": {
37
+ "alias": "busy";
38
+ "required": false;
39
+ "isSignal": true;
40
+ };
41
+ "unavailable": {
42
+ "alias": "unavailable";
43
+ "required": false;
44
+ "isSignal": true;
45
+ };
46
+ "size": {
47
+ "alias": "size";
48
+ "required": false;
49
+ "isSignal": true;
50
+ };
51
+ "padding": {
52
+ "alias": "padding";
53
+ "required": false;
54
+ "isSignal": true;
55
+ };
56
+ "gap": {
57
+ "alias": "gap";
58
+ "required": false;
59
+ "isSignal": true;
60
+ };
61
+ "trailing": {
62
+ "alias": "trailing";
63
+ "required": false;
64
+ "isSignal": true;
65
+ };
66
+ }, {}, never, ["*"], true, never>;
28
67
  }
29
68
  /**
30
- * Lays out a `ui-row` with a trailing action beside it, such as a "more" icon button: the row takes
31
- * the room the action leaves and the action keeps its own size.
69
+ * Lays out a `ui-row` with a trailing action beside it, such as a "more" icon button.
32
70
  *
33
71
  * @example
34
72
  * <div uiRowItem>
@@ -36,14 +74,14 @@ declare class UiRow {
36
74
  * <button ui-button variant="quiet" size="icon-sm" aria-label="Account actions">...</button>
37
75
  * </div>
38
76
  */
39
- declare class UiRowItem {
40
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiRowItem, never>;
41
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiRowItem, "[uiRowItem]", never, {}, {}, never, never, true, never>;
77
+ export declare class UiRowItem {
78
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiRowItem, never>;
79
+ static ɵdir: i0.ɵɵDirectiveDeclaration<UiRowItem, "[uiRowItem]", never, {}, {}, never, never, true, never>;
42
80
  }
43
81
  /**
44
82
  * Non-interactive row of a list, separated from the next by a hairline: a passkey with its delete
45
- * button, a device, a setting. It is a 72px row (68px from 64rem) with a 12px gap; put it on an
46
- * `li` or a `div`. Use `ui-row` instead when the whole row is a link or an action.
83
+ * button, a device, a setting. Put it on an `li` or a `div`. Use `ui-row` instead when the whole
84
+ * row is a link or an action.
47
85
  *
48
86
  * @example
49
87
  * <ul>
@@ -53,15 +91,21 @@ declare class UiRowItem {
53
91
  * </li>
54
92
  * </ul>
55
93
  */
56
- declare class UiListRow {
57
- readonly ruled: _angular_core.InputSignalWithTransform<boolean, unknown>;
58
- protected readonly classes: _angular_core.Signal<"flex min-h-18 items-center gap-3 py-1.5 lg:min-h-17 shadow-[inset_0_-1px_0_var(--hairline)]" | "flex min-h-18 items-center gap-3 py-1.5 lg:min-h-17">;
59
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiListRow, never>;
60
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiListRow, "[uiListRow]", never, { "ruled": { "alias": "ruled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
94
+ export declare class UiListRow {
95
+ readonly ruled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
96
+ protected readonly classes: import("@angular/core").Signal<"flex min-h-18 items-center gap-3 py-1.5 lg:min-h-17 shadow-[inset_0_-1px_0_var(--hairline)]" | "flex min-h-18 items-center gap-3 py-1.5 lg:min-h-17">;
97
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiListRow, never>;
98
+ static ɵdir: i0.ɵɵDirectiveDeclaration<UiListRow, "[uiListRow]", never, {
99
+ "ruled": {
100
+ "alias": "ruled";
101
+ "required": false;
102
+ "isSignal": true;
103
+ };
104
+ }, {}, never, never, true, never>;
61
105
  }
62
106
  /**
63
- * The 36px filled tile that leads a row: an icon on a muted square with the control radius. Put it on
64
- * a `span` as the first child of a `ui-row` or a `uiListRow`.
107
+ * The filled tile that leads a row, holding an icon. Put it on a `span` as the first child of a
108
+ * `ui-row` or a `uiListRow`.
65
109
  *
66
110
  * @example
67
111
  * <a ui-row size="xl" padding="sm" href="/export">
@@ -69,10 +113,8 @@ declare class UiListRow {
69
113
  * Export
70
114
  * </a>
71
115
  */
72
- declare class UiRowTile {
73
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiRowTile, never>;
74
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiRowTile, "[uiRowTile]", never, {}, {}, never, never, true, never>;
116
+ export declare class UiRowTile {
117
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiRowTile, never>;
118
+ static ɵdir: i0.ɵɵDirectiveDeclaration<UiRowTile, "[uiRowTile]", never, {}, {}, never, never, true, never>;
75
119
  }
76
-
77
- export { ROW_GAPS, ROW_PADDINGS, ROW_SIZES, UiListRow, UiRow, UiRowItem, UiRowTile };
78
- export type { RowGap, RowPadding, RowSize };
120
+ export type { RowGap, RowPadding, RowSize, RowTrailing };
@@ -1,36 +1,60 @@
1
- import * as _angular_core from '@angular/core';
2
- import { ElementRef } from '@angular/core';
3
-
1
+ import * as i0 from "@angular/core";
2
+ import { ElementRef } from "@angular/core";
4
3
  type SegmentedOption = {
5
- value: string;
6
- label: string;
4
+ value: string;
5
+ label: string;
7
6
  };
8
- declare const SEGMENTED_SIZES: readonly ["md", "sm"];
7
+ export declare const SEGMENTED_SIZES: readonly ["md", "sm"];
9
8
  type SegmentedSize = (typeof SEGMENTED_SIZES)[number];
10
9
  /**
11
- * Exclusive choice within a small, known set: a time range, a unit, a mode. The selected option's
12
- * background is a single thumb that slides under it in `transform`, instead of being redrawn.
10
+ * Exclusive choice within a small, known set: a time range, a unit, a mode.
13
11
  *
14
12
  * @example
15
13
  * <ui-segmented [options]="ranges" label="Time range" [(value)]="range" />
16
14
  */
17
- declare class UiSegmented {
18
- readonly options: _angular_core.InputSignal<SegmentedOption[]>;
19
- readonly label: _angular_core.InputSignal<string>;
20
- readonly showLabel: _angular_core.InputSignalWithTransform<boolean, unknown>;
21
- protected readonly labelId: string;
22
- readonly value: _angular_core.ModelSignal<string>;
23
- readonly size: _angular_core.InputSignal<"md" | "sm">;
24
- protected readonly radios: _angular_core.Signal<readonly ElementRef<HTMLButtonElement>[]>;
25
- protected readonly thumbIndex: _angular_core.Signal<number>;
26
- constructor();
27
- protected optionClasses(optionValue: string): string;
28
- protected tabIndexFor(optionValue: string): number;
29
- protected select(optionValue: string): void;
30
- protected onKeydown(event: KeyboardEvent): void;
31
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiSegmented, never>;
32
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiSegmented, "ui-segmented", never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "showLabel": { "alias": "showLabel"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
15
+ export declare class UiSegmented {
16
+ readonly options: import("@angular/core").InputSignal<SegmentedOption[]>;
17
+ readonly label: import("@angular/core").InputSignal<string>;
18
+ readonly showLabel: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
19
+ protected readonly labelId: string;
20
+ readonly value: import("@angular/core").ModelSignal<string>;
21
+ readonly size: import("@angular/core").InputSignal<"md" | "sm">;
22
+ protected readonly radios: import("@angular/core").Signal<readonly ElementRef<HTMLButtonElement>[]>;
23
+ protected readonly thumbIndex: import("@angular/core").Signal<number>;
24
+ constructor();
25
+ protected optionClasses(optionValue: string): string;
26
+ protected tabIndexFor(optionValue: string): number;
27
+ protected select(optionValue: string): void;
28
+ protected onKeydown(event: KeyboardEvent): void;
29
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiSegmented, never>;
30
+ static ɵcmp: i0.ɵɵComponentDeclaration<UiSegmented, "ui-segmented", never, {
31
+ "options": {
32
+ "alias": "options";
33
+ "required": true;
34
+ "isSignal": true;
35
+ };
36
+ "label": {
37
+ "alias": "label";
38
+ "required": true;
39
+ "isSignal": true;
40
+ };
41
+ "showLabel": {
42
+ "alias": "showLabel";
43
+ "required": false;
44
+ "isSignal": true;
45
+ };
46
+ "value": {
47
+ "alias": "value";
48
+ "required": true;
49
+ "isSignal": true;
50
+ };
51
+ "size": {
52
+ "alias": "size";
53
+ "required": false;
54
+ "isSignal": true;
55
+ };
56
+ }, {
57
+ "value": "valueChange";
58
+ }, never, never, true, never>;
33
59
  }
34
-
35
- export { SEGMENTED_SIZES, UiSegmented };
36
- export type { SegmentedOption, SegmentedSize };
60
+ export type { SegmentedOption, SegmentedSize };
@@ -0,0 +1,52 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ElementRef } from "@angular/core";
3
+ import { UiMenu } from "@joanroucoux/cairn-ui/menu";
4
+ /**
5
+ * A pill that opens a `ui-menu` of exclusive choices, to head a row of filter chips: outlined at rest with a
6
+ * chevron, solid primary when `active`, where a separate 14 px cross replaces the chevron and emits `cleared`.
7
+ * It is 34 px tall inside a 44 px target on touch and 32 px with a fine pointer; its focus ring is an outline
8
+ * 2 px outside the pill; the cross has a 44 px hit area on touch (36 px with a fine pointer). `contextLabel`, when
9
+ * given, is read before the label while active so a screen reader hears what the account is. Clearing moves focus
10
+ * back to the trigger. The projected text is the pill label and the projected `ui-menu` is what it opens.
11
+ *
12
+ * @example
13
+ * <ui-select-pill uiChipsLeading [active]="!!account()" clearLabel="Clear the account" (cleared)="account.set('')">
14
+ * {{ accountName() }}
15
+ * <ui-menu label="Account" sheet>
16
+ * <button uiMenuItem [checked]="!account()" (click)="account.set('')">All accounts</button>
17
+ * </ui-menu>
18
+ * </ui-select-pill>
19
+ */
20
+ export declare class UiSelectPill {
21
+ readonly active: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
22
+ readonly clearLabel: import("@angular/core").InputSignal<string>;
23
+ readonly contextLabel: import("@angular/core").InputSignal<string | undefined>;
24
+ readonly cleared: import("@angular/core").OutputEmitterRef<void>;
25
+ protected readonly menu: import("@angular/core").Signal<UiMenu>;
26
+ protected readonly trigger: import("@angular/core").Signal<ElementRef<HTMLButtonElement>>;
27
+ protected readonly hostClasses = "relative flex-none inline-flex h-11 items-center pointer-fine:h-8";
28
+ protected readonly triggerClasses = "-mx-[5px] flex h-11 cursor-pointer items-center rounded-pill border-x-[5px] border-y-0 border-transparent bg-transparent p-0 font-[inherit] focus-visible:outline-2 focus-visible:-outline-offset-5 focus-visible:outline-(--ring) pointer-fine:mx-0 pointer-fine:h-8 pointer-fine:border-x-0 pointer-fine:focus-visible:outline-offset-0";
29
+ protected readonly clearClasses = "absolute end-0 flex size-[34px] cursor-pointer items-center justify-center rounded-pill border-0 bg-transparent p-0 text-(--primary-foreground) focus-visible:outline-2 focus-visible:-outline-offset-7 focus-visible:outline-(--primary-foreground) pointer-fine:size-8 pointer-fine:focus-visible:-outline-offset-6 after:absolute after:-inset-[5px] pointer-fine:after:-inset-0.5";
30
+ protected clear(): void;
31
+ protected readonly pillClasses: import("@angular/core").Signal<string>;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiSelectPill, never>;
33
+ static ɵcmp: i0.ɵɵComponentDeclaration<UiSelectPill, "ui-select-pill", never, {
34
+ "active": {
35
+ "alias": "active";
36
+ "required": false;
37
+ "isSignal": true;
38
+ };
39
+ "clearLabel": {
40
+ "alias": "clearLabel";
41
+ "required": true;
42
+ "isSignal": true;
43
+ };
44
+ "contextLabel": {
45
+ "alias": "contextLabel";
46
+ "required": false;
47
+ "isSignal": true;
48
+ };
49
+ }, {
50
+ "cleared": "cleared";
51
+ }, ["menu"], ["*", "ui-menu"], true, never>;
52
+ }
@@ -1,23 +1,33 @@
1
- import * as _angular_core from '@angular/core';
2
- import { UiControl, UiControlError } from '@joanroucoux/cairn-ui/control';
3
-
1
+ import { UiControl, UiControlError } from "@joanroucoux/cairn-ui/control";
2
+ import * as i0 from "@angular/core";
4
3
  /**
5
- * Styled native select, drop-down list included where the browser allows it. It stays a native
6
- * `<select>`: keyboard, typeahead and semantics come from the platform, not from a rebuilt listbox.
7
- *
8
- * Declares the `errors` and `touched` inputs Angular's `[formField]` fills, so a `ui-field` around
9
- * it can show the message without any binding here.
4
+ * Styled native select, drop-down list included where the browser allows it. Declares the `errors`
5
+ * and `touched` inputs Angular's `[formField]` fills, so a surrounding `ui-field` can show the message.
10
6
  *
11
7
  * @example
12
8
  * <select uiSelect><option value="pea">PEA</option></select>
13
9
  */
14
- declare class UiSelect implements UiControl {
15
- readonly size: _angular_core.InputSignal<"sm" | "md" | "lg" | "xl">;
16
- readonly errors: _angular_core.InputSignal<readonly UiControlError[]>;
17
- readonly touched: _angular_core.InputSignal<boolean>;
18
- protected readonly classes: _angular_core.Signal<string>;
19
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiSelect, never>;
20
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiSelect, "select[uiSelect]", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "errors": { "alias": "errors"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
21
- }
22
-
23
- export { UiSelect };
10
+ export declare class UiSelect implements UiControl {
11
+ readonly size: import("@angular/core").InputSignal<"sm" | "md" | "lg" | "xl">;
12
+ readonly errors: import("@angular/core").InputSignal<readonly UiControlError[]>;
13
+ readonly touched: import("@angular/core").InputSignal<boolean>;
14
+ protected readonly classes: import("@angular/core").Signal<string>;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiSelect, never>;
16
+ static ɵdir: i0.ɵɵDirectiveDeclaration<UiSelect, "select[uiSelect]", never, {
17
+ "size": {
18
+ "alias": "size";
19
+ "required": false;
20
+ "isSignal": true;
21
+ };
22
+ "errors": {
23
+ "alias": "errors";
24
+ "required": false;
25
+ "isSignal": true;
26
+ };
27
+ "touched": {
28
+ "alias": "touched";
29
+ "required": false;
30
+ "isSignal": true;
31
+ };
32
+ }, {}, never, never, true, never>;
33
+ }