@joanroucoux/cairn-ui 0.8.1 → 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.
- package/CHANGELOG.md +105 -0
- package/README.md +2 -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 +376 -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 +233 -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 +79 -37
- package/types/joanroucoux-cairn-ui-segmented.d.ts +51 -27
- package/types/joanroucoux-cairn-ui-select-pill.d.ts +52 -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
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare const BACK_LINK_SIZES: readonly ["md", "sm", "header"];
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/** Available back link sizes. */
|
|
3
|
+
export declare const BACK_LINK_SIZES: readonly ["md", "sm", "header", "inline"];
|
|
5
4
|
type BackLinkSize = (typeof BACK_LINK_SIZES)[number];
|
|
6
5
|
/**
|
|
7
|
-
* Link back to the parent screen: a chevron and the name of the destination.
|
|
6
|
+
* Link back to the parent screen: a chevron and the name of the destination. On a `button`, it
|
|
7
|
+
* goes back inside the current view, such as from a form to the search that led to it.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* <a ui-back-link routerLink="/accounts">Accounts</a>
|
|
11
11
|
*/
|
|
12
|
-
declare class UiBackLink {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
export declare class UiBackLink {
|
|
13
|
+
readonly size: import("@angular/core").InputSignal<"md" | "sm" | "header" | "inline">;
|
|
14
|
+
protected readonly type: string | null;
|
|
15
|
+
protected readonly chevron: import("@angular/core").Signal<number>;
|
|
16
|
+
protected readonly classes: import("@angular/core").Signal<string>;
|
|
17
|
+
constructor();
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiBackLink, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiBackLink, "a[ui-back-link], button[ui-back-link]", never, {
|
|
20
|
+
"size": {
|
|
21
|
+
"alias": "size";
|
|
22
|
+
"required": false;
|
|
23
|
+
"isSignal": true;
|
|
24
|
+
};
|
|
25
|
+
}, {}, never, ["*"], true, never>;
|
|
19
26
|
}
|
|
20
|
-
|
|
21
|
-
export { BACK_LINK_SIZES, UiBackLink };
|
|
22
|
-
export type { BackLinkSize };
|
|
27
|
+
export type { BackLinkSize };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare const BADGE_VARIANTS: readonly ["neutral", "outline"];
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/** Available badge variants. */
|
|
3
|
+
export declare const BADGE_VARIANTS: readonly ["neutral", "outline"];
|
|
5
4
|
type BadgeVariant = (typeof BADGE_VARIANTS)[number];
|
|
6
|
-
declare const BADGE_SIZES: readonly ["md", "sm"];
|
|
5
|
+
export declare const BADGE_SIZES: readonly ["md", "sm"];
|
|
7
6
|
type BadgeSize = (typeof BADGE_SIZES)[number];
|
|
8
7
|
/**
|
|
9
8
|
* Small status descriptor for counts, states or labels, such as an instrument's asset class.
|
|
@@ -11,13 +10,22 @@ type BadgeSize = (typeof BADGE_SIZES)[number];
|
|
|
11
10
|
* @example
|
|
12
11
|
* <ui-badge>ETF</ui-badge>
|
|
13
12
|
*/
|
|
14
|
-
declare class UiBadge {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
export declare class UiBadge {
|
|
14
|
+
readonly variant: import("@angular/core").InputSignal<"neutral" | "outline">;
|
|
15
|
+
readonly size: import("@angular/core").InputSignal<"md" | "sm">;
|
|
16
|
+
protected readonly classes: import("@angular/core").Signal<string>;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiBadge, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiBadge, "ui-badge", never, {
|
|
19
|
+
"variant": {
|
|
20
|
+
"alias": "variant";
|
|
21
|
+
"required": false;
|
|
22
|
+
"isSignal": true;
|
|
23
|
+
};
|
|
24
|
+
"size": {
|
|
25
|
+
"alias": "size";
|
|
26
|
+
"required": false;
|
|
27
|
+
"isSignal": true;
|
|
28
|
+
};
|
|
29
|
+
}, {}, never, ["*"], true, never>;
|
|
20
30
|
}
|
|
21
|
-
|
|
22
|
-
export { BADGE_SIZES, BADGE_VARIANTS, UiBadge };
|
|
23
|
-
export type { BadgeSize, BadgeVariant };
|
|
31
|
+
export type { BadgeSize, BadgeVariant };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare const BUTTON_VARIANTS: readonly ["primary", "outline", "ghost", "destructive", "quiet", "quiet-destructive", "outline-destructive", "quiet-glow", "tonal"];
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/** Available button variants. */
|
|
3
|
+
export declare const BUTTON_VARIANTS: readonly ["primary", "outline", "ghost", "destructive", "quiet", "quiet-destructive", "outline-destructive", "quiet-glow", "tonal"];
|
|
5
4
|
type ButtonVariant = (typeof BUTTON_VARIANTS)[number];
|
|
6
5
|
/** Available button sizes. */
|
|
7
|
-
declare const BUTTON_SIZES: readonly ["compact", "slim", "xs", "sm", "md", "lg", "xl", "xxl", "tall", "block", "icon", "icon-sm"];
|
|
6
|
+
export declare const BUTTON_SIZES: readonly ["compact", "slim", "xs", "sm", "md", "lg", "xl", "xxl", "tall", "block", "icon", "icon-sm"];
|
|
8
7
|
type ButtonSize = (typeof BUTTON_SIZES)[number];
|
|
9
8
|
/**
|
|
10
9
|
* Styled native button or anchor, applied as an attribute so the host keeps every native behavior.
|
|
@@ -13,17 +12,36 @@ type ButtonSize = (typeof BUTTON_SIZES)[number];
|
|
|
13
12
|
* <button ui-button variant="destructive">Delete</button>
|
|
14
13
|
* <button ui-button size="icon" variant="ghost" aria-label="More actions">...</button>
|
|
15
14
|
*/
|
|
16
|
-
declare class UiButton {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
export declare class UiButton {
|
|
16
|
+
readonly variant: import("@angular/core").InputSignal<"primary" | "outline" | "ghost" | "destructive" | "quiet" | "quiet-destructive" | "outline-destructive" | "quiet-glow" | "tonal">;
|
|
17
|
+
readonly size: import("@angular/core").InputSignal<"compact" | "slim" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "tall" | "block" | "icon" | "icon-sm">;
|
|
18
|
+
readonly loading: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
19
|
+
readonly busy: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
20
|
+
protected readonly inactive: import("@angular/core").Signal<boolean>;
|
|
21
|
+
protected readonly classes: import("@angular/core").Signal<string>;
|
|
22
|
+
constructor();
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiButton, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiButton, "button[ui-button], a[ui-button]", never, {
|
|
25
|
+
"variant": {
|
|
26
|
+
"alias": "variant";
|
|
27
|
+
"required": false;
|
|
28
|
+
"isSignal": true;
|
|
29
|
+
};
|
|
30
|
+
"size": {
|
|
31
|
+
"alias": "size";
|
|
32
|
+
"required": false;
|
|
33
|
+
"isSignal": true;
|
|
34
|
+
};
|
|
35
|
+
"loading": {
|
|
36
|
+
"alias": "loading";
|
|
37
|
+
"required": false;
|
|
38
|
+
"isSignal": true;
|
|
39
|
+
};
|
|
40
|
+
"busy": {
|
|
41
|
+
"alias": "busy";
|
|
42
|
+
"required": false;
|
|
43
|
+
"isSignal": true;
|
|
44
|
+
};
|
|
45
|
+
}, {}, never, ["*"], true, never>;
|
|
26
46
|
}
|
|
27
|
-
|
|
28
|
-
export { BUTTON_SIZES, BUTTON_VARIANTS, UiButton };
|
|
29
|
-
export type { ButtonSize, ButtonVariant };
|
|
47
|
+
export type { ButtonSize, ButtonVariant };
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare const CARD_VARIANTS: readonly ["default", "elevated", "inset"];
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/** Available card variants. */
|
|
3
|
+
export declare const CARD_VARIANTS: readonly ["default", "elevated", "inset"];
|
|
5
4
|
type CardVariant = (typeof CARD_VARIANTS)[number];
|
|
6
|
-
/** Available card paddings.
|
|
7
|
-
declare const CARD_PADDINGS: readonly ["none", "xs", "sm", "md", "list", "rows", "recap", "panel"];
|
|
5
|
+
/** Available card paddings. */
|
|
6
|
+
export declare const CARD_PADDINGS: readonly ["none", "xs", "sm", "md", "list", "rows", "recap", "panel"];
|
|
8
7
|
type CardPadding = (typeof CARD_PADDINGS)[number];
|
|
9
|
-
/** Where the card surface (fill, border, radius) and its padding apply.
|
|
10
|
-
declare const CARD_SURFACES: readonly ["always", "lg", "max-lg"];
|
|
8
|
+
/** Where the card surface (fill, border, radius) and its padding apply. */
|
|
9
|
+
export declare const CARD_SURFACES: readonly ["always", "lg", "max-lg"];
|
|
11
10
|
type CardSurface = (typeof CARD_SURFACES)[number];
|
|
11
|
+
/** Border of the card surface; `auto` follows the variant. */
|
|
12
|
+
declare const CARD_BORDERS: readonly ["auto", "none", "border", "hairline"];
|
|
13
|
+
type CardBorder = (typeof CARD_BORDERS)[number];
|
|
12
14
|
/**
|
|
13
15
|
* Surface that groups related content: a summary block, a table, a side panel. `surface` limits the
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* card or a dialog: a picked title, a results list, a recap, an empty-state panel.
|
|
16
|
+
* card styling to one side of `64rem`. `variant="inset"` is the `--background` box that sits inside
|
|
17
|
+
* a card or a dialog.
|
|
17
18
|
*
|
|
18
19
|
* @example
|
|
19
20
|
* <ui-card variant="elevated" padding="sm">Total</ui-card>
|
|
@@ -21,16 +22,40 @@ type CardSurface = (typeof CARD_SURFACES)[number];
|
|
|
21
22
|
* <ui-card padding="none" clip>Table that touches the edges, clipped to the corners</ui-card>
|
|
22
23
|
* <ui-card surface="max-lg">Card on an iPhone, plain on a desktop</ui-card>
|
|
23
24
|
*/
|
|
24
|
-
declare class UiCard {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
export declare class UiCard {
|
|
26
|
+
readonly variant: import("@angular/core").InputSignal<"default" | "elevated" | "inset">;
|
|
27
|
+
readonly padding: import("@angular/core").InputSignal<"none" | "xs" | "sm" | "md" | "list" | "rows" | "recap" | "panel">;
|
|
28
|
+
readonly surface: import("@angular/core").InputSignal<"always" | "lg" | "max-lg">;
|
|
29
|
+
readonly border: import("@angular/core").InputSignal<"none" | "auto" | "border" | "hairline">;
|
|
30
|
+
readonly clip: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
31
|
+
protected readonly classes: import("@angular/core").Signal<string>;
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiCard, never>;
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiCard, "ui-card", never, {
|
|
34
|
+
"variant": {
|
|
35
|
+
"alias": "variant";
|
|
36
|
+
"required": false;
|
|
37
|
+
"isSignal": true;
|
|
38
|
+
};
|
|
39
|
+
"padding": {
|
|
40
|
+
"alias": "padding";
|
|
41
|
+
"required": false;
|
|
42
|
+
"isSignal": true;
|
|
43
|
+
};
|
|
44
|
+
"surface": {
|
|
45
|
+
"alias": "surface";
|
|
46
|
+
"required": false;
|
|
47
|
+
"isSignal": true;
|
|
48
|
+
};
|
|
49
|
+
"border": {
|
|
50
|
+
"alias": "border";
|
|
51
|
+
"required": false;
|
|
52
|
+
"isSignal": true;
|
|
53
|
+
};
|
|
54
|
+
"clip": {
|
|
55
|
+
"alias": "clip";
|
|
56
|
+
"required": false;
|
|
57
|
+
"isSignal": true;
|
|
58
|
+
};
|
|
59
|
+
}, {}, never, ["*"], true, never>;
|
|
33
60
|
}
|
|
34
|
-
|
|
35
|
-
export { CARD_PADDINGS, CARD_SURFACES, CARD_VARIANTS, UiCard };
|
|
36
|
-
export type { CardPadding, CardSurface, CardVariant };
|
|
61
|
+
export type { CardPadding, CardSurface, CardVariant };
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { ElementRef } from
|
|
3
|
-
import { UiControl, UiControlError } from
|
|
4
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ElementRef } from "@angular/core";
|
|
3
|
+
import { UiControl, UiControlError } from "@joanroucoux/cairn-ui/control";
|
|
5
4
|
type ChoiceChipOption = {
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
8
7
|
};
|
|
9
8
|
/**
|
|
10
|
-
* Exclusive choice among a handful of named options, shown as wrapping pills
|
|
11
|
-
*
|
|
9
|
+
* Exclusive choice among a handful of named options, shown as wrapping pills. Binds to Signal Forms
|
|
10
|
+
* with `[formField]`.
|
|
12
11
|
*
|
|
13
12
|
* @example
|
|
14
13
|
* <ui-choice-chips label="Envelope" [options]="envelopes" [(value)]="envelope" />
|
|
@@ -16,31 +15,88 @@ type ChoiceChipOption = {
|
|
|
16
15
|
* @example
|
|
17
16
|
* <ui-choice-chips label="Envelope" [options]="envelopes" [formField]="form.envelope" />
|
|
18
17
|
*/
|
|
19
|
-
declare class UiChoiceChips implements UiControl {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
18
|
+
export declare class UiChoiceChips implements UiControl {
|
|
19
|
+
#private;
|
|
20
|
+
readonly options: import("@angular/core").InputSignal<ChoiceChipOption[]>;
|
|
21
|
+
readonly value: import("@angular/core").ModelSignal<string>;
|
|
22
|
+
readonly label: import("@angular/core").InputSignal<string | undefined>;
|
|
23
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
24
|
+
readonly ariaLabelledby: import("@angular/core").InputSignal<string | undefined>;
|
|
25
|
+
readonly surface: import("@angular/core").InputSignal<"background" | "card">;
|
|
26
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
27
|
+
readonly errors: import("@angular/core").InputSignal<readonly UiControlError[]>;
|
|
28
|
+
readonly invalid: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
29
|
+
readonly required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
30
|
+
readonly touched: import("@angular/core").InputSignal<boolean>;
|
|
31
|
+
readonly touch: import("@angular/core").OutputEmitterRef<void>;
|
|
32
|
+
protected readonly labelId: string;
|
|
33
|
+
protected readonly radios: import("@angular/core").Signal<readonly ElementRef<HTMLButtonElement>[]>;
|
|
34
|
+
protected readonly labelledBy: import("@angular/core").Signal<string | null>;
|
|
35
|
+
protected chipClasses(optionValue: string): string;
|
|
36
|
+
protected tabIndexFor(optionValue: string): number;
|
|
37
|
+
protected select(optionValue: string): void;
|
|
38
|
+
protected onFocusOut(event: FocusEvent): void;
|
|
39
|
+
protected onKeydown(event: KeyboardEvent, index: number): void;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiChoiceChips, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiChoiceChips, "ui-choice-chips", never, {
|
|
42
|
+
"options": {
|
|
43
|
+
"alias": "options";
|
|
44
|
+
"required": true;
|
|
45
|
+
"isSignal": true;
|
|
46
|
+
};
|
|
47
|
+
"value": {
|
|
48
|
+
"alias": "value";
|
|
49
|
+
"required": true;
|
|
50
|
+
"isSignal": true;
|
|
51
|
+
};
|
|
52
|
+
"label": {
|
|
53
|
+
"alias": "label";
|
|
54
|
+
"required": false;
|
|
55
|
+
"isSignal": true;
|
|
56
|
+
};
|
|
57
|
+
"ariaLabel": {
|
|
58
|
+
"alias": "ariaLabel";
|
|
59
|
+
"required": false;
|
|
60
|
+
"isSignal": true;
|
|
61
|
+
};
|
|
62
|
+
"ariaLabelledby": {
|
|
63
|
+
"alias": "ariaLabelledby";
|
|
64
|
+
"required": false;
|
|
65
|
+
"isSignal": true;
|
|
66
|
+
};
|
|
67
|
+
"surface": {
|
|
68
|
+
"alias": "surface";
|
|
69
|
+
"required": false;
|
|
70
|
+
"isSignal": true;
|
|
71
|
+
};
|
|
72
|
+
"disabled": {
|
|
73
|
+
"alias": "disabled";
|
|
74
|
+
"required": false;
|
|
75
|
+
"isSignal": true;
|
|
76
|
+
};
|
|
77
|
+
"errors": {
|
|
78
|
+
"alias": "errors";
|
|
79
|
+
"required": false;
|
|
80
|
+
"isSignal": true;
|
|
81
|
+
};
|
|
82
|
+
"invalid": {
|
|
83
|
+
"alias": "invalid";
|
|
84
|
+
"required": false;
|
|
85
|
+
"isSignal": true;
|
|
86
|
+
};
|
|
87
|
+
"required": {
|
|
88
|
+
"alias": "required";
|
|
89
|
+
"required": false;
|
|
90
|
+
"isSignal": true;
|
|
91
|
+
};
|
|
92
|
+
"touched": {
|
|
93
|
+
"alias": "touched";
|
|
94
|
+
"required": false;
|
|
95
|
+
"isSignal": true;
|
|
96
|
+
};
|
|
97
|
+
}, {
|
|
98
|
+
"value": "valueChange";
|
|
99
|
+
"touch": "touch";
|
|
100
|
+
}, never, never, true, never>;
|
|
43
101
|
}
|
|
44
|
-
|
|
45
|
-
export { UiChoiceChips };
|
|
46
|
-
export type { ChoiceChipOption };
|
|
102
|
+
export type { ChoiceChipOption };
|
|
@@ -1,27 +1,18 @@
|
|
|
1
|
-
import { InjectionToken, Signal } from
|
|
2
|
-
|
|
1
|
+
import { InjectionToken, Signal } from "@angular/core";
|
|
3
2
|
/**
|
|
4
|
-
* The part of a validation error this library reads. Angular's own `ValidationError` satisfies it
|
|
5
|
-
* which is how a Signal Forms error reaches a field without this package depending on
|
|
6
|
-
* `@angular/forms`.
|
|
3
|
+
* The part of a validation error this library reads. Angular's own `ValidationError` satisfies it.
|
|
7
4
|
*/
|
|
8
5
|
type UiControlError = {
|
|
9
|
-
|
|
6
|
+
readonly message?: string;
|
|
10
7
|
};
|
|
11
8
|
/** What a styled control offers the field wrapped around it. */
|
|
12
9
|
type UiControl = {
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
readonly errors: Signal<readonly UiControlError[]>;
|
|
11
|
+
readonly touched: Signal<boolean>;
|
|
15
12
|
};
|
|
16
13
|
/**
|
|
17
|
-
* Resolves to the styled control projected into a field.
|
|
18
|
-
*
|
|
19
|
-
* Angular's `[formField]` directive fills any input named `errors` or `touched` on the directives
|
|
20
|
-
* sitting on its host element, so a control declaring them receives its own validation state with
|
|
21
|
-
* nothing written at the call site. This token is how the field finds whichever control was
|
|
22
|
-
* projected into it.
|
|
14
|
+
* Resolves to the styled control projected into a field. A control provides it and declares the
|
|
15
|
+
* `errors` and `touched` inputs that Angular's `[formField]` fills.
|
|
23
16
|
*/
|
|
24
|
-
declare const UI_CONTROL: InjectionToken<UiControl>;
|
|
25
|
-
|
|
26
|
-
export { UI_CONTROL };
|
|
27
|
-
export type { UiControl, UiControlError };
|
|
17
|
+
export declare const UI_CONTROL: InjectionToken<UiControl>;
|
|
18
|
+
export type { UiControl, UiControlError };
|
|
@@ -1,38 +1,60 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare const DELTA_EMPHASES: readonly ["text", "pill"];
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/** Available delta emphases. */
|
|
3
|
+
export declare const DELTA_EMPHASES: readonly ["text", "pill"];
|
|
5
4
|
type DeltaEmphasis = (typeof DELTA_EMPHASES)[number];
|
|
6
|
-
/** Type sizes.
|
|
7
|
-
declare const DELTA_SIZES: readonly ["label", "inherit"];
|
|
5
|
+
/** Type sizes. */
|
|
6
|
+
export declare const DELTA_SIZES: readonly ["label", "inherit"];
|
|
8
7
|
type DeltaSize = (typeof DELTA_SIZES)[number];
|
|
9
|
-
/** Font weights.
|
|
10
|
-
declare const DELTA_WEIGHTS: readonly ["medium", "regular"];
|
|
8
|
+
/** Font weights. */
|
|
9
|
+
export declare const DELTA_WEIGHTS: readonly ["medium", "regular"];
|
|
11
10
|
type DeltaWeight = (typeof DELTA_WEIGHTS)[number];
|
|
12
11
|
type Sign = 'positive' | 'negative' | 'neutral' | 'unknown';
|
|
13
12
|
/**
|
|
14
13
|
* Signed amount whose sign carries meaning: a gain, a loss, or an unknown.
|
|
15
14
|
*
|
|
16
|
-
* A null value is not a zero:
|
|
17
|
-
*
|
|
18
|
-
* already contain a + or a minus sign.
|
|
15
|
+
* A null value is not a zero: it renders the unknown state, not a gain of zero. Color never
|
|
16
|
+
* carries the sign on its own: the projected text must already contain a + or a minus sign.
|
|
19
17
|
*
|
|
20
18
|
* @example
|
|
21
19
|
* <ui-delta [value]="holding.dayChangeEur" unknownLabel="Not available">
|
|
22
20
|
* {{ holding.dayChangeEur | signedMoney }}
|
|
23
21
|
* </ui-delta>
|
|
24
22
|
*/
|
|
25
|
-
declare class UiDelta {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
export declare class UiDelta {
|
|
24
|
+
readonly value: import("@angular/core").InputSignal<number | null | undefined>;
|
|
25
|
+
readonly unknownLabel: import("@angular/core").InputSignal<string>;
|
|
26
|
+
readonly emphasis: import("@angular/core").InputSignal<"text" | "pill">;
|
|
27
|
+
readonly size: import("@angular/core").InputSignal<"label" | "inherit">;
|
|
28
|
+
readonly weight: import("@angular/core").InputSignal<"medium" | "regular">;
|
|
29
|
+
protected readonly sign: import("@angular/core").Signal<Sign>;
|
|
30
|
+
protected readonly classes: import("@angular/core").Signal<string>;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiDelta, never>;
|
|
32
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiDelta, "ui-delta", never, {
|
|
33
|
+
"value": {
|
|
34
|
+
"alias": "value";
|
|
35
|
+
"required": true;
|
|
36
|
+
"isSignal": true;
|
|
37
|
+
};
|
|
38
|
+
"unknownLabel": {
|
|
39
|
+
"alias": "unknownLabel";
|
|
40
|
+
"required": true;
|
|
41
|
+
"isSignal": true;
|
|
42
|
+
};
|
|
43
|
+
"emphasis": {
|
|
44
|
+
"alias": "emphasis";
|
|
45
|
+
"required": false;
|
|
46
|
+
"isSignal": true;
|
|
47
|
+
};
|
|
48
|
+
"size": {
|
|
49
|
+
"alias": "size";
|
|
50
|
+
"required": false;
|
|
51
|
+
"isSignal": true;
|
|
52
|
+
};
|
|
53
|
+
"weight": {
|
|
54
|
+
"alias": "weight";
|
|
55
|
+
"required": false;
|
|
56
|
+
"isSignal": true;
|
|
57
|
+
};
|
|
58
|
+
}, {}, never, ["*"], true, never>;
|
|
35
59
|
}
|
|
36
|
-
|
|
37
|
-
export { DELTA_EMPHASES, DELTA_SIZES, DELTA_WEIGHTS, UiDelta };
|
|
38
|
-
export type { DeltaEmphasis, DeltaSize, DeltaWeight };
|
|
60
|
+
export type { DeltaEmphasis, DeltaSize, DeltaWeight };
|