@joanroucoux/cairn-ui 0.8.2 → 0.9.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.
- package/CHANGELOG.md +114 -0
- package/fesm2022/joanroucoux-cairn-ui-action-bar.mjs +57 -53
- package/fesm2022/joanroucoux-cairn-ui-action-bar.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-alert.mjs +155 -47
- package/fesm2022/joanroucoux-cairn-ui-alert.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-amount.mjs +220 -110
- package/fesm2022/joanroucoux-cairn-ui-amount.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-async.mjs +392 -216
- package/fesm2022/joanroucoux-cairn-ui-async.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-avatar.mjs +145 -68
- package/fesm2022/joanroucoux-cairn-ui-avatar.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-back-link.mjs +87 -47
- package/fesm2022/joanroucoux-cairn-ui-back-link.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-badge.mjs +83 -43
- package/fesm2022/joanroucoux-cairn-ui-badge.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-button.mjs +184 -104
- package/fesm2022/joanroucoux-cairn-ui-button.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-card.mjs +232 -137
- package/fesm2022/joanroucoux-cairn-ui-card.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-choice-chips.mjs +298 -102
- package/fesm2022/joanroucoux-cairn-ui-choice-chips.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-control.mjs +4 -17
- package/fesm2022/joanroucoux-cairn-ui-control.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-delta.mjs +150 -83
- package/fesm2022/joanroucoux-cairn-ui-delta.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-dialog.mjs +508 -471
- package/fesm2022/joanroucoux-cairn-ui-dialog.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-donut.mjs +255 -157
- package/fesm2022/joanroucoux-cairn-ui-donut.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-drawer.mjs +303 -0
- package/fesm2022/joanroucoux-cairn-ui-drawer.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-empty.mjs +76 -35
- package/fesm2022/joanroucoux-cairn-ui-empty.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-external-link.mjs +40 -31
- package/fesm2022/joanroucoux-cairn-ui-external-link.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-fact.mjs +188 -79
- package/fesm2022/joanroucoux-cairn-ui-fact.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-field.mjs +309 -173
- package/fesm2022/joanroucoux-cairn-ui-field.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-filter-chips.mjs +165 -87
- package/fesm2022/joanroucoux-cairn-ui-filter-chips.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-group-header.mjs +269 -0
- package/fesm2022/joanroucoux-cairn-ui-group-header.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-input.mjs +205 -85
- package/fesm2022/joanroucoux-cairn-ui-input.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-line-chart.mjs +838 -512
- package/fesm2022/joanroucoux-cairn-ui-line-chart.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-menu.mjs +401 -225
- package/fesm2022/joanroucoux-cairn-ui-menu.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-meter.mjs +143 -57
- package/fesm2022/joanroucoux-cairn-ui-meter.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-motion.mjs +367 -399
- package/fesm2022/joanroucoux-cairn-ui-motion.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-nav-item.mjs +73 -44
- package/fesm2022/joanroucoux-cairn-ui-nav-item.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-result-group.mjs +191 -0
- package/fesm2022/joanroucoux-cairn-ui-result-group.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-row.mjs +408 -146
- package/fesm2022/joanroucoux-cairn-ui-row.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-segmented.mjs +183 -81
- package/fesm2022/joanroucoux-cairn-ui-segmented.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-select-pill.mjs +270 -0
- package/fesm2022/joanroucoux-cairn-ui-select-pill.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-select.mjs +121 -67
- package/fesm2022/joanroucoux-cairn-ui-select.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-skeleton.mjs +129 -51
- package/fesm2022/joanroucoux-cairn-ui-skeleton.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-stale-link.mjs +80 -39
- package/fesm2022/joanroucoux-cairn-ui-stale-link.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-stat.mjs +85 -55
- package/fesm2022/joanroucoux-cairn-ui-stat.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-switch.mjs +48 -35
- package/fesm2022/joanroucoux-cairn-ui-switch.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-tab-bar.mjs +113 -69
- package/fesm2022/joanroucoux-cairn-ui-tab-bar.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-table.mjs +1036 -310
- package/fesm2022/joanroucoux-cairn-ui-table.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-toast.mjs +240 -127
- package/fesm2022/joanroucoux-cairn-ui-toast.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui.mjs +0 -4
- package/package.json +17 -1
- package/styles/motion.css +1 -13
- package/styles/tokens.css +35 -64
- package/types/joanroucoux-cairn-ui-action-bar.d.ts +9 -14
- package/types/joanroucoux-cairn-ui-alert.d.ts +29 -15
- package/types/joanroucoux-cairn-ui-amount.d.ts +64 -32
- package/types/joanroucoux-cairn-ui-async.d.ts +85 -38
- package/types/joanroucoux-cairn-ui-avatar.d.ts +34 -22
- package/types/joanroucoux-cairn-ui-back-link.d.ts +20 -15
- package/types/joanroucoux-cairn-ui-badge.d.ts +22 -14
- package/types/joanroucoux-cairn-ui-button.d.ts +36 -18
- package/types/joanroucoux-cairn-ui-card.d.ts +48 -23
- package/types/joanroucoux-cairn-ui-choice-chips.d.ts +91 -35
- package/types/joanroucoux-cairn-ui-control.d.ts +9 -18
- package/types/joanroucoux-cairn-ui-delta.d.ts +46 -24
- package/types/joanroucoux-cairn-ui-dialog.d.ts +124 -57
- package/types/joanroucoux-cairn-ui-donut.d.ts +83 -46
- package/types/joanroucoux-cairn-ui-drawer.d.ts +73 -0
- package/types/joanroucoux-cairn-ui-empty.d.ts +20 -13
- package/types/joanroucoux-cairn-ui-external-link.d.ts +6 -10
- package/types/joanroucoux-cairn-ui-fact.d.ts +49 -25
- package/types/joanroucoux-cairn-ui-field.d.ts +72 -49
- package/types/joanroucoux-cairn-ui-filter-chips.d.ts +35 -20
- package/types/joanroucoux-cairn-ui-group-header.d.ts +58 -0
- package/types/joanroucoux-cairn-ui-input.d.ts +59 -37
- package/types/joanroucoux-cairn-ui-line-chart.d.ts +199 -89
- package/types/joanroucoux-cairn-ui-menu.d.ts +81 -44
- package/types/joanroucoux-cairn-ui-meter.d.ts +44 -22
- package/types/joanroucoux-cairn-ui-motion.d.ts +61 -75
- package/types/joanroucoux-cairn-ui-nav-item.d.ts +15 -13
- package/types/joanroucoux-cairn-ui-result-group.d.ts +52 -0
- package/types/joanroucoux-cairn-ui-row.d.ts +92 -37
- package/types/joanroucoux-cairn-ui-segmented.d.ts +51 -27
- package/types/joanroucoux-cairn-ui-select-pill.d.ts +59 -0
- package/types/joanroucoux-cairn-ui-select.d.ts +28 -18
- package/types/joanroucoux-cairn-ui-skeleton.d.ts +35 -18
- package/types/joanroucoux-cairn-ui-stale-link.d.ts +23 -16
- package/types/joanroucoux-cairn-ui-stat.d.ts +26 -21
- package/types/joanroucoux-cairn-ui-switch.d.ts +7 -11
- package/types/joanroucoux-cairn-ui-tab-bar.d.ts +20 -17
- package/types/joanroucoux-cairn-ui-table.d.ts +251 -89
- package/types/joanroucoux-cairn-ui-toast.d.ts +46 -36
- package/types/joanroucoux-cairn-ui.d.ts +1 -2
- package/fesm2022/joanroucoux-cairn-ui.mjs.map +0 -1
package/styles/motion.css
CHANGED
|
@@ -26,13 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
@keyframes cairn-panel-in {
|
|
30
|
-
from {
|
|
31
|
-
opacity: 0;
|
|
32
|
-
transform: translateX(8px);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
29
|
@keyframes cairn-fade-out {
|
|
37
30
|
to {
|
|
38
31
|
opacity: 0;
|
|
@@ -47,10 +40,6 @@
|
|
|
47
40
|
animation: cairn-fade-up-in var(--duration-fast) var(--ease-out);
|
|
48
41
|
}
|
|
49
42
|
|
|
50
|
-
.ui-enter-panel {
|
|
51
|
-
animation: cairn-panel-in var(--duration-base) var(--ease-out);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
43
|
.ui-leave-fade {
|
|
55
44
|
animation: cairn-fade-out var(--duration-exit) var(--ease-out) forwards;
|
|
56
45
|
}
|
|
@@ -79,8 +68,7 @@
|
|
|
79
68
|
}
|
|
80
69
|
|
|
81
70
|
@media (prefers-reduced-motion: reduce) {
|
|
82
|
-
.ui-enter-fade-up
|
|
83
|
-
.ui-enter-panel {
|
|
71
|
+
.ui-enter-fade-up {
|
|
84
72
|
animation-name: cairn-fade-in;
|
|
85
73
|
}
|
|
86
74
|
|
package/styles/tokens.css
CHANGED
|
@@ -1,18 +1,6 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Design tokens of the Cairn ui library - shipped with the package (dist/ui/styles/tokens.css).
|
|
3
|
-
* This file must stay a pure token sheet: no resets, no element styles, so consumers
|
|
4
|
-
* can import it without side effects.
|
|
5
|
-
*
|
|
6
|
-
* Monochrome direction: the brand carries no hue, so semantic color is the only color in the
|
|
7
|
-
* interface. Every text token clears 4.5:1 against --background, --card, --elevated, --muted and --soft in both
|
|
8
|
-
* schemes; the ratios are recorded in projects/ui/docs/colors.mdx. Do not edit a value without
|
|
9
|
-
* recomputing them.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
1
|
:root {
|
|
13
2
|
color-scheme: light dark;
|
|
14
3
|
|
|
15
|
-
/* Surfaces */
|
|
16
4
|
--background: light-dark(#f7f8f8, #0a0b0b);
|
|
17
5
|
--foreground: light-dark(#111414, #edefee);
|
|
18
6
|
--card: light-dark(#ffffff, #151717);
|
|
@@ -21,11 +9,9 @@
|
|
|
21
9
|
--border: light-dark(#e2e5e4, #242726);
|
|
22
10
|
--hairline: light-dark(#edefee, #1e2020);
|
|
23
11
|
|
|
24
|
-
/* Text */
|
|
25
12
|
--muted-foreground: light-dark(#5c6462, #989d9b);
|
|
26
13
|
--subtle-foreground: light-dark(#626a68, #8f9593);
|
|
27
14
|
|
|
28
|
-
/* Brand - no hue: --primary is a near-black on light, a near-white on dark */
|
|
29
15
|
--primary: light-dark(#161918, #f2f4f3);
|
|
30
16
|
--primary-to: light-dark(#333937, #c9cecc);
|
|
31
17
|
--primary-foreground: light-dark(#fafbfa, #0a0b0b);
|
|
@@ -33,12 +19,10 @@
|
|
|
33
19
|
--glow: light-dark(rgb(22 25 24 / 0.05), rgb(242 244 243 / 0.07));
|
|
34
20
|
--ring: light-dark(#161918, #f2f4f3);
|
|
35
21
|
|
|
36
|
-
/* Semantics - these roles never change meaning, in any theme */
|
|
37
22
|
--positive: light-dark(#047757, #3fbf8f);
|
|
38
23
|
--negative: light-dark(#b5413a, #e96e63);
|
|
39
24
|
--stale: light-dark(#86620d, #c4922a);
|
|
40
25
|
|
|
41
|
-
/* Neutral ramp - allocation bars, where a categorical palette would break the monochrome premise */
|
|
42
26
|
--ramp-1: light-dark(#161918, #f2f4f3);
|
|
43
27
|
--ramp-2: light-dark(#3d4341, #c9cecc);
|
|
44
28
|
--ramp-3: light-dark(#646b69, #a2a9a6);
|
|
@@ -46,7 +30,6 @@
|
|
|
46
30
|
--ramp-5: light-dark(#b0b6b4, #5a605e);
|
|
47
31
|
--ramp-6: light-dark(#ced3d1, #3b403e);
|
|
48
32
|
|
|
49
|
-
/* Kept from the starter so its reference components still resolve */
|
|
50
33
|
--secondary: light-dark(#f1f3f2, #1e2020);
|
|
51
34
|
--secondary-foreground: light-dark(#111414, #edefee);
|
|
52
35
|
--muted: light-dark(#f1f3f2, #1e2020);
|
|
@@ -55,58 +38,46 @@
|
|
|
55
38
|
--destructive: light-dark(#b8443c, #a33a33);
|
|
56
39
|
--destructive-foreground: light-dark(#fafbfa, #fafbfa);
|
|
57
40
|
|
|
58
|
-
/* Type - Rubik, one family for logotype and interface (self-hosted, 400/500/600/700).
|
|
59
|
-
Names follow Tailwind 4 namespaces: registered in @theme they yield text-body, rounded-control,
|
|
60
|
-
ease-out... Reset Tailwind's defaults (--text-*: initial) so only this scale exists.
|
|
61
|
-
Weights: 400 text, 500 labels and buttons, 600 titles and the dominant figure, 700 logotype only. */
|
|
62
41
|
--font-sans: 'Rubik', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
63
|
-
--numeric: tabular-nums;
|
|
42
|
+
--numeric: tabular-nums;
|
|
64
43
|
--text-caption: 0.75rem;
|
|
65
|
-
--text-caption--line-height: 1.0625rem;
|
|
44
|
+
--text-caption--line-height: 1.0625rem;
|
|
66
45
|
--text-label: 0.875rem;
|
|
67
|
-
--text-label--line-height: 1.25rem;
|
|
46
|
+
--text-label--line-height: 1.25rem;
|
|
68
47
|
--text-body: 1rem;
|
|
69
|
-
--text-body--line-height: 1.5rem;
|
|
48
|
+
--text-body--line-height: 1.5rem;
|
|
70
49
|
--text-title: 1.25rem;
|
|
71
|
-
--text-title--line-height: 1.75rem;
|
|
50
|
+
--text-title--line-height: 1.75rem;
|
|
72
51
|
--text-heading: 1.75rem;
|
|
73
|
-
--text-heading--line-height: 2.125rem;
|
|
52
|
+
--text-heading--line-height: 2.125rem;
|
|
74
53
|
--text-display: 2.5rem;
|
|
75
|
-
--text-display--line-height: 2.75rem;
|
|
76
|
-
--tracking-display: -0.02em;
|
|
77
|
-
--tracking-caption: 0.01em;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
--
|
|
81
|
-
--
|
|
82
|
-
--stack-
|
|
83
|
-
--
|
|
84
|
-
--
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
--
|
|
91
|
-
--
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
--
|
|
96
|
-
--duration-fast: 180ms; /* menus, segmented thumb */
|
|
97
|
-
--duration-base: 260ms; /* dialogs, sheets, list to detail, chart range change */
|
|
98
|
-
--duration-exit: 180ms; /* every exit */
|
|
99
|
-
--ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* what appears or moves */
|
|
100
|
-
--ease-sheet: cubic-bezier(0.32, 0.72, 0, 1); /* sheets rising from the bottom, and back */
|
|
54
|
+
--text-display--line-height: 2.75rem;
|
|
55
|
+
--tracking-display: -0.02em;
|
|
56
|
+
--tracking-caption: 0.01em;
|
|
57
|
+
|
|
58
|
+
--gutter: 1rem;
|
|
59
|
+
--inset-card: 1rem;
|
|
60
|
+
--stack-group: 1rem;
|
|
61
|
+
--stack-section: 1rem;
|
|
62
|
+
--row-min: 2.75rem;
|
|
63
|
+
--header-height: 3.5rem;
|
|
64
|
+
|
|
65
|
+
--radius-control: 0.5rem;
|
|
66
|
+
--radius-container: 0.75rem;
|
|
67
|
+
--radius-pill: 9999px;
|
|
68
|
+
|
|
69
|
+
--duration-press: 120ms;
|
|
70
|
+
--duration-fast: 180ms;
|
|
71
|
+
--duration-base: 260ms;
|
|
72
|
+
--duration-exit: 180ms;
|
|
73
|
+
--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
|
|
74
|
+
--ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
|
|
101
75
|
--press-scale: 0.97;
|
|
102
|
-
--enter-scale: 0.95;
|
|
103
|
-
--pulse-duration: 1600ms;
|
|
104
|
-
--duration-spin: 800ms;
|
|
105
|
-
--duration-highlight: 1200ms;
|
|
106
|
-
--toast-duration: 5000ms;
|
|
107
|
-
|
|
108
|
-
/* Browser theme color (meta theme-color, iOS status bar) follows the top of the page:
|
|
109
|
-
light #f7f8f8, dark #0a0b0b - the --background values. */
|
|
76
|
+
--enter-scale: 0.95;
|
|
77
|
+
--pulse-duration: 1600ms;
|
|
78
|
+
--duration-spin: 800ms;
|
|
79
|
+
--duration-highlight: 1200ms;
|
|
80
|
+
--toast-duration: 5000ms;
|
|
110
81
|
}
|
|
111
82
|
|
|
112
83
|
:root {
|
|
@@ -130,18 +101,18 @@
|
|
|
130
101
|
|
|
131
102
|
@media (pointer: fine) {
|
|
132
103
|
:root {
|
|
133
|
-
--row-min: 2.5rem;
|
|
104
|
+
--row-min: 2.5rem;
|
|
134
105
|
}
|
|
135
106
|
}
|
|
136
107
|
|
|
137
108
|
@media (prefers-reduced-motion: reduce) {
|
|
138
109
|
:root {
|
|
139
110
|
--press-scale: 1;
|
|
140
|
-
--enter-scale: 1;
|
|
111
|
+
--enter-scale: 1;
|
|
141
112
|
--duration-base: 150ms;
|
|
142
113
|
--pulse-duration: 0ms;
|
|
143
114
|
--duration-highlight: 600ms;
|
|
144
|
-
--duration-spin: 1600ms;
|
|
115
|
+
--duration-spin: 1600ms;
|
|
145
116
|
}
|
|
146
117
|
}
|
|
147
118
|
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
3
2
|
/**
|
|
4
|
-
* Bar of actions fixed above the tab bar on iPhone
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* width equally. While it is on the page it publishes its height as `--action-bar-height` on the
|
|
8
|
-
* root element, which `ui-toaster` adds to its offset so a confirmation never covers the actions.
|
|
3
|
+
* Bar of actions fixed above the tab bar on iPhone, hidden from `64rem`, where the same actions
|
|
4
|
+
* live in the page itself. Its children share the width equally. While it is on the page it
|
|
5
|
+
* publishes its height as `--action-bar-height` on the root element, which `ui-toaster` clears.
|
|
9
6
|
*
|
|
10
7
|
* @example
|
|
11
8
|
* <ui-action-bar>
|
|
@@ -13,10 +10,8 @@ import * as i0 from '@angular/core';
|
|
|
13
10
|
* <button ui-button size="tall">Buy</button>
|
|
14
11
|
* </ui-action-bar>
|
|
15
12
|
*/
|
|
16
|
-
declare class UiActionBar {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export { UiActionBar };
|
|
13
|
+
export declare class UiActionBar {
|
|
14
|
+
constructor();
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiActionBar, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiActionBar, "ui-action-bar", never, {}, {}, never, ["*"], true, never>;
|
|
17
|
+
}
|
|
@@ -1,23 +1,37 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
declare const ALERT_VARIANTS: readonly ["error", "warning"];
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare const ALERT_VARIANTS: readonly ["error", "warning", "info"];
|
|
4
3
|
type AlertVariant = (typeof ALERT_VARIANTS)[number];
|
|
5
4
|
/**
|
|
6
|
-
* Inline message explaining a failure or a consequence
|
|
5
|
+
* Inline message explaining a failure or a consequence, or static help with `info`: an icon, an optional heading and a text.
|
|
7
6
|
* It fades in when it appears; set `[fadeIn]="false"` on an alert that is part of the page as it
|
|
8
|
-
* opens
|
|
7
|
+
* opens.
|
|
9
8
|
*
|
|
10
9
|
* @example
|
|
11
10
|
* <ui-alert heading="Sign-in failed">Try again.</ui-alert>
|
|
12
11
|
*/
|
|
13
|
-
declare class UiAlert {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
export declare class UiAlert {
|
|
13
|
+
readonly variant: import("@angular/core").InputSignal<"error" | "warning" | "info">;
|
|
14
|
+
readonly heading: import("@angular/core").InputSignal<string | undefined>;
|
|
15
|
+
readonly fadeIn: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
16
|
+
protected readonly role: import("@angular/core").Signal<string>;
|
|
17
|
+
protected readonly classes: import("@angular/core").Signal<string>;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiAlert, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiAlert, "ui-alert", never, {
|
|
20
|
+
"variant": {
|
|
21
|
+
"alias": "variant";
|
|
22
|
+
"required": false;
|
|
23
|
+
"isSignal": true;
|
|
24
|
+
};
|
|
25
|
+
"heading": {
|
|
26
|
+
"alias": "heading";
|
|
27
|
+
"required": false;
|
|
28
|
+
"isSignal": true;
|
|
29
|
+
};
|
|
30
|
+
"fadeIn": {
|
|
31
|
+
"alias": "fadeIn";
|
|
32
|
+
"required": false;
|
|
33
|
+
"isSignal": true;
|
|
34
|
+
};
|
|
35
|
+
}, {}, never, ["*"], true, never>;
|
|
20
36
|
}
|
|
21
|
-
|
|
22
|
-
export { ALERT_VARIANTS, UiAlert };
|
|
23
|
-
export type { AlertVariant };
|
|
37
|
+
export type { AlertVariant };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { InjectionToken, Signal } from
|
|
3
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { InjectionToken, Signal } from "@angular/core";
|
|
4
3
|
/** App-wide "amounts are hidden" state. Defaults to never masked; the app overrides it. */
|
|
5
|
-
declare const UI_AMOUNT_MASKED: InjectionToken<Signal<boolean>>;
|
|
6
|
-
/** Available figure styles.
|
|
7
|
-
declare const AMOUNT_NUMERICS: readonly ["tabular", "proportional"];
|
|
4
|
+
export declare const UI_AMOUNT_MASKED: InjectionToken<Signal<boolean>>;
|
|
5
|
+
/** Available figure styles. */
|
|
6
|
+
export declare const AMOUNT_NUMERICS: readonly ["tabular", "proportional"];
|
|
8
7
|
type AmountNumeric = (typeof AMOUNT_NUMERICS)[number];
|
|
9
|
-
/** Available masking behaviors.
|
|
10
|
-
declare const AMOUNT_MASKINGS: readonly ["dots", "hide"];
|
|
8
|
+
/** Available masking behaviors. */
|
|
9
|
+
export declare const AMOUNT_MASKINGS: readonly ["dots", "hide"];
|
|
11
10
|
type AmountMasking = (typeof AMOUNT_MASKINGS)[number];
|
|
12
11
|
/**
|
|
13
12
|
* A number or an amount of money, formatted for the locale and masked when the app hides amounts.
|
|
@@ -16,30 +15,63 @@ type AmountMasking = (typeof AMOUNT_MASKINGS)[number];
|
|
|
16
15
|
* <ui-amount [value]="total" currency="EUR" numeric="proportional" />
|
|
17
16
|
* <ui-amount [value]="dayChange" currency="EUR" signed whenMasked="hide" />
|
|
18
17
|
*/
|
|
19
|
-
declare class UiAmount {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
18
|
+
export declare class UiAmount {
|
|
19
|
+
#private;
|
|
20
|
+
readonly value: import("@angular/core").InputSignal<number | null | undefined>;
|
|
21
|
+
readonly currency: import("@angular/core").InputSignal<string | undefined>;
|
|
22
|
+
readonly locale: import("@angular/core").InputSignal<string>;
|
|
23
|
+
readonly signed: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
24
|
+
readonly fractionDigits: import("@angular/core").InputSignal<number>;
|
|
25
|
+
readonly numeric: import("@angular/core").InputSignal<"tabular" | "proportional">;
|
|
26
|
+
readonly whenMasked: import("@angular/core").InputSignal<"dots" | "hide">;
|
|
27
|
+
protected readonly hidden: Signal<boolean>;
|
|
28
|
+
protected readonly text: Signal<string>;
|
|
29
|
+
protected readonly classes: Signal<string>;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiAmount, never>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiAmount, "ui-amount", never, {
|
|
32
|
+
"value": {
|
|
33
|
+
"alias": "value";
|
|
34
|
+
"required": false;
|
|
35
|
+
"isSignal": true;
|
|
36
|
+
};
|
|
37
|
+
"currency": {
|
|
38
|
+
"alias": "currency";
|
|
39
|
+
"required": false;
|
|
40
|
+
"isSignal": true;
|
|
41
|
+
};
|
|
42
|
+
"locale": {
|
|
43
|
+
"alias": "locale";
|
|
44
|
+
"required": false;
|
|
45
|
+
"isSignal": true;
|
|
46
|
+
};
|
|
47
|
+
"signed": {
|
|
48
|
+
"alias": "signed";
|
|
49
|
+
"required": false;
|
|
50
|
+
"isSignal": true;
|
|
51
|
+
};
|
|
52
|
+
"fractionDigits": {
|
|
53
|
+
"alias": "fractionDigits";
|
|
54
|
+
"required": false;
|
|
55
|
+
"isSignal": true;
|
|
56
|
+
};
|
|
57
|
+
"numeric": {
|
|
58
|
+
"alias": "numeric";
|
|
59
|
+
"required": false;
|
|
60
|
+
"isSignal": true;
|
|
61
|
+
};
|
|
62
|
+
"whenMasked": {
|
|
63
|
+
"alias": "whenMasked";
|
|
64
|
+
"required": false;
|
|
65
|
+
"isSignal": true;
|
|
66
|
+
};
|
|
67
|
+
}, {}, never, never, true, never>;
|
|
33
68
|
}
|
|
34
|
-
|
|
35
69
|
type AmountFormatOptions = {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
70
|
+
locale: string;
|
|
71
|
+
currency?: string;
|
|
72
|
+
signed?: boolean;
|
|
73
|
+
fractionDigits?: number;
|
|
40
74
|
};
|
|
41
|
-
/** Formats a number or an amount for the locale
|
|
42
|
-
declare function formatAmount(value: number | null | undefined, options: AmountFormatOptions, masked?: boolean): string;
|
|
43
|
-
|
|
44
|
-
export { AMOUNT_MASKINGS, AMOUNT_NUMERICS, UI_AMOUNT_MASKED, UiAmount, formatAmount };
|
|
45
|
-
export type { AmountFormatOptions, AmountMasking, AmountNumeric };
|
|
75
|
+
/** Formats a number or an amount for the locale. A missing value is an em dash, a masked one four bullets. */
|
|
76
|
+
export declare function formatAmount(value: number | null | undefined, options: AmountFormatOptions, masked?: boolean): string;
|
|
77
|
+
export type { AmountFormatOptions, AmountMasking, AmountNumeric };
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Signal } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
declare const ASYNC_STATES: readonly ["loading", "error", "empty", "ready"];
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Signal } from "@angular/core";
|
|
3
|
+
/** Available async block states. */
|
|
4
|
+
export declare const ASYNC_STATES: readonly ["loading", "error", "empty", "ready"];
|
|
6
5
|
type AsyncState = (typeof ASYNC_STATES)[number];
|
|
7
|
-
/** Looks of the error block.
|
|
8
|
-
declare const ASYNC_VARIANTS: readonly ["elevated", "plain", "emphasis", "inline"];
|
|
6
|
+
/** Looks of the error block. */
|
|
7
|
+
export declare const ASYNC_VARIANTS: readonly ["elevated", "plain", "emphasis", "inline"];
|
|
9
8
|
type AsyncVariant = (typeof ASYNC_VARIANTS)[number];
|
|
10
|
-
/** Alignments of the error block; `auto` is centred from 64rem.
|
|
11
|
-
declare const ASYNC_ALIGNS: readonly ["start", "center", "auto"];
|
|
9
|
+
/** Alignments of the error block; `auto` is centred from 64rem. */
|
|
10
|
+
export declare const ASYNC_ALIGNS: readonly ["start", "center", "auto"];
|
|
12
11
|
type AsyncAlign = (typeof ASYNC_ALIGNS)[number];
|
|
13
12
|
/**
|
|
14
13
|
* The three states of a block that depends on a service call, next to the ready content.
|
|
@@ -20,39 +19,87 @@ type AsyncAlign = (typeof ASYNC_ALIGNS)[number];
|
|
|
20
19
|
* <span>{{ total() }}</span>
|
|
21
20
|
* </ui-async>
|
|
22
21
|
*/
|
|
23
|
-
declare class UiAsync {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
22
|
+
export declare class UiAsync {
|
|
23
|
+
#private;
|
|
24
|
+
readonly state: import("@angular/core").InputSignal<"loading" | "error" | "empty" | "ready">;
|
|
25
|
+
readonly errorTitle: import("@angular/core").InputSignal<string | undefined>;
|
|
26
|
+
readonly errorMessage: import("@angular/core").InputSignal<string | undefined>;
|
|
27
|
+
readonly retryLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
28
|
+
/** Draws the rotate icon in the retry button. Only the `inline` variant honours `false`. */
|
|
29
|
+
readonly retryIcon: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
30
|
+
readonly variant: import("@angular/core").InputSignal<"elevated" | "plain" | "emphasis" | "inline">;
|
|
31
|
+
readonly align: import("@angular/core").InputSignal<"start" | "center" | "auto">;
|
|
32
|
+
readonly card: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
33
|
+
readonly fill: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
34
|
+
readonly retry: import("@angular/core").OutputEmitterRef<void>;
|
|
35
|
+
protected readonly shown: import("@angular/core").Signal<"loading" | "error" | "empty" | "ready" | null>;
|
|
36
|
+
protected readonly filling: import("@angular/core").Signal<boolean>;
|
|
37
|
+
protected readonly iconSize: import("@angular/core").Signal<16 | 18>;
|
|
38
|
+
protected readonly boxClasses: import("@angular/core").Signal<string>;
|
|
39
|
+
protected readonly titleClasses: import("@angular/core").Signal<string>;
|
|
40
|
+
protected readonly messageClasses: import("@angular/core").Signal<string>;
|
|
41
|
+
protected readonly retryButtonClasses: import("@angular/core").Signal<string>;
|
|
42
|
+
constructor();
|
|
43
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiAsync, never>;
|
|
44
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiAsync, "ui-async", never, {
|
|
45
|
+
"state": {
|
|
46
|
+
"alias": "state";
|
|
47
|
+
"required": true;
|
|
48
|
+
"isSignal": true;
|
|
49
|
+
};
|
|
50
|
+
"errorTitle": {
|
|
51
|
+
"alias": "errorTitle";
|
|
52
|
+
"required": false;
|
|
53
|
+
"isSignal": true;
|
|
54
|
+
};
|
|
55
|
+
"errorMessage": {
|
|
56
|
+
"alias": "errorMessage";
|
|
57
|
+
"required": false;
|
|
58
|
+
"isSignal": true;
|
|
59
|
+
};
|
|
60
|
+
"retryLabel": {
|
|
61
|
+
"alias": "retryLabel";
|
|
62
|
+
"required": false;
|
|
63
|
+
"isSignal": true;
|
|
64
|
+
};
|
|
65
|
+
"retryIcon": {
|
|
66
|
+
"alias": "retryIcon";
|
|
67
|
+
"required": false;
|
|
68
|
+
"isSignal": true;
|
|
69
|
+
};
|
|
70
|
+
"variant": {
|
|
71
|
+
"alias": "variant";
|
|
72
|
+
"required": false;
|
|
73
|
+
"isSignal": true;
|
|
74
|
+
};
|
|
75
|
+
"align": {
|
|
76
|
+
"alias": "align";
|
|
77
|
+
"required": false;
|
|
78
|
+
"isSignal": true;
|
|
79
|
+
};
|
|
80
|
+
"card": {
|
|
81
|
+
"alias": "card";
|
|
82
|
+
"required": false;
|
|
83
|
+
"isSignal": true;
|
|
84
|
+
};
|
|
85
|
+
"fill": {
|
|
86
|
+
"alias": "fill";
|
|
87
|
+
"required": false;
|
|
88
|
+
"isSignal": true;
|
|
89
|
+
};
|
|
90
|
+
}, {
|
|
91
|
+
"retry": "retry";
|
|
92
|
+
}, never, ["[asyncLoading]", "[asyncEmpty]", "*"], true, never>;
|
|
44
93
|
}
|
|
45
|
-
|
|
94
|
+
declare const SKELETON_DELAY_MS = 150;
|
|
95
|
+
declare const SKELETON_MIN_MS = 400;
|
|
46
96
|
/**
|
|
47
97
|
* Turns the live state of a call into the state to draw: `loading` only appears once the call has
|
|
48
|
-
* lasted 150 ms and, once shown, stays at least 400 ms
|
|
49
|
-
*
|
|
50
|
-
* `null` means nothing to draw yet, for a first load still under 150 ms. Call it in an injection context.
|
|
98
|
+
* lasted 150 ms and, once shown, stays at least 400 ms. Until then the previous state stays on
|
|
99
|
+
* screen; `null` means nothing to draw yet (a first load under 150 ms). Call it in an injection context.
|
|
51
100
|
*
|
|
52
101
|
* @example
|
|
53
102
|
* protected readonly shown = delayedState(this.state);
|
|
54
103
|
*/
|
|
55
|
-
declare function delayedState(source: Signal<AsyncState>): Signal<AsyncState | null>;
|
|
56
|
-
|
|
57
|
-
export { ASYNC_ALIGNS, ASYNC_STATES, ASYNC_VARIANTS, UiAsync, delayedState };
|
|
58
|
-
export type { AsyncAlign, AsyncState, AsyncVariant };
|
|
104
|
+
export declare function delayedState(source: Signal<AsyncState>): Signal<AsyncState | null>;
|
|
105
|
+
export type { AsyncAlign, AsyncState, AsyncVariant };
|
|
@@ -1,35 +1,47 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare const AVATAR_SIZES: readonly ["sm", "md", "lg", "auto"];
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/** Available avatar sizes. */
|
|
3
|
+
export declare const AVATAR_SIZES: readonly ["sm", "md", "lg", "auto"];
|
|
5
4
|
type AvatarSize = (typeof AVATAR_SIZES)[number];
|
|
6
5
|
/**
|
|
7
|
-
* Initials in a disc, standing in for a person.
|
|
6
|
+
* Initials in a disc, standing in for a person.
|
|
8
7
|
*
|
|
9
8
|
* @example
|
|
10
9
|
* <ui-avatar initials="JR" label="My account" />
|
|
11
10
|
*/
|
|
12
|
-
declare class UiAvatar {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
export declare class UiAvatar {
|
|
12
|
+
readonly initials: import("@angular/core").InputSignal<string>;
|
|
13
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
14
|
+
readonly size: import("@angular/core").InputSignal<"sm" | "md" | "lg" | "auto">;
|
|
15
|
+
protected readonly classes: import("@angular/core").Signal<string>;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiAvatar, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiAvatar, "ui-avatar", never, {
|
|
18
|
+
"initials": {
|
|
19
|
+
"alias": "initials";
|
|
20
|
+
"required": true;
|
|
21
|
+
"isSignal": true;
|
|
22
|
+
};
|
|
23
|
+
"label": {
|
|
24
|
+
"alias": "label";
|
|
25
|
+
"required": true;
|
|
26
|
+
"isSignal": true;
|
|
27
|
+
};
|
|
28
|
+
"size": {
|
|
29
|
+
"alias": "size";
|
|
30
|
+
"required": false;
|
|
31
|
+
"isSignal": true;
|
|
32
|
+
};
|
|
33
|
+
}, {}, never, never, true, never>;
|
|
19
34
|
}
|
|
20
35
|
/**
|
|
21
|
-
* Round hit area around a `ui-avatar` that links somewhere
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* itself keeps its own size.
|
|
36
|
+
* Round hit area around a `ui-avatar` that links somewhere. On the current page
|
|
37
|
+
* (`aria-current="page"`, set by `routerLinkActive` through `ariaCurrentWhenActive`) it holds a
|
|
38
|
+
* soft halo.
|
|
25
39
|
*
|
|
26
40
|
* @example
|
|
27
41
|
* <a uiAvatarLink routerLink="/profile"><ui-avatar initials="JR" label="Profile" size="auto" /></a>
|
|
28
42
|
*/
|
|
29
|
-
declare class UiAvatarLink {
|
|
30
|
-
|
|
31
|
-
|
|
43
|
+
export declare class UiAvatarLink {
|
|
44
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiAvatarLink, never>;
|
|
45
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiAvatarLink, "a[uiAvatarLink], button[uiAvatarLink]", never, {}, {}, never, never, true, never>;
|
|
32
46
|
}
|
|
33
|
-
|
|
34
|
-
export { AVATAR_SIZES, UiAvatar, UiAvatarLink };
|
|
35
|
-
export type { AvatarSize };
|
|
47
|
+
export type { AvatarSize };
|