@joanroucoux/cairn-ui 0.7.2 → 0.8.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 +72 -0
- package/README.md +67 -0
- package/fesm2022/joanroucoux-cairn-ui-action-bar.mjs +54 -0
- package/fesm2022/joanroucoux-cairn-ui-action-bar.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-alert.mjs +129 -0
- package/fesm2022/joanroucoux-cairn-ui-alert.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-amount.mjs +114 -0
- package/fesm2022/joanroucoux-cairn-ui-amount.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-async.mjs +282 -0
- package/fesm2022/joanroucoux-cairn-ui-async.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-avatar.mjs +71 -0
- package/fesm2022/joanroucoux-cairn-ui-avatar.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-back-link.mjs +79 -0
- package/fesm2022/joanroucoux-cairn-ui-back-link.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-badge.mjs +48 -0
- package/fesm2022/joanroucoux-cairn-ui-badge.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-button.mjs +128 -0
- package/fesm2022/joanroucoux-cairn-ui-button.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-card.mjs +146 -0
- package/fesm2022/joanroucoux-cairn-ui-card.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-choice-chips.mjs +172 -0
- package/fesm2022/joanroucoux-cairn-ui-choice-chips.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-control.mjs +18 -0
- package/fesm2022/joanroucoux-cairn-ui-control.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-delta.mjs +103 -0
- package/fesm2022/joanroucoux-cairn-ui-delta.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-dialog.mjs +626 -0
- package/fesm2022/joanroucoux-cairn-ui-dialog.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-donut.mjs +347 -0
- package/fesm2022/joanroucoux-cairn-ui-donut.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-empty.mjs +47 -0
- package/fesm2022/joanroucoux-cairn-ui-empty.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-external-link.mjs +65 -0
- package/fesm2022/joanroucoux-cairn-ui-external-link.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-fact.mjs +99 -0
- package/fesm2022/joanroucoux-cairn-ui-fact.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-field.mjs +232 -0
- package/fesm2022/joanroucoux-cairn-ui-field.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-filter-chips.mjs +89 -0
- package/fesm2022/joanroucoux-cairn-ui-filter-chips.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-input.mjs +90 -0
- package/fesm2022/joanroucoux-cairn-ui-input.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-line-chart.mjs +844 -0
- package/fesm2022/joanroucoux-cairn-ui-line-chart.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-menu.mjs +241 -0
- package/fesm2022/joanroucoux-cairn-ui-menu.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-meter.mjs +86 -0
- package/fesm2022/joanroucoux-cairn-ui-meter.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-motion.mjs +415 -0
- package/fesm2022/joanroucoux-cairn-ui-motion.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-nav-item.mjs +45 -0
- package/fesm2022/joanroucoux-cairn-ui-nav-item.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-row.mjs +164 -0
- package/fesm2022/joanroucoux-cairn-ui-row.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-segmented.mjs +165 -0
- package/fesm2022/joanroucoux-cairn-ui-segmented.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-select.mjs +69 -0
- package/fesm2022/joanroucoux-cairn-ui-select.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-skeleton.mjs +91 -0
- package/fesm2022/joanroucoux-cairn-ui-skeleton.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-stale-link.mjs +43 -0
- package/fesm2022/joanroucoux-cairn-ui-stale-link.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-stat.mjs +96 -0
- package/fesm2022/joanroucoux-cairn-ui-stat.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-switch.mjs +37 -0
- package/fesm2022/joanroucoux-cairn-ui-switch.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-tab-bar.mjs +75 -0
- package/fesm2022/joanroucoux-cairn-ui-tab-bar.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-table.mjs +321 -0
- package/fesm2022/joanroucoux-cairn-ui-table.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-toast.mjs +153 -0
- package/fesm2022/joanroucoux-cairn-ui-toast.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui.mjs +0 -5462
- package/fesm2022/joanroucoux-cairn-ui.mjs.map +1 -1
- package/package.json +141 -1
- package/types/joanroucoux-cairn-ui-action-bar.d.ts +22 -0
- package/types/joanroucoux-cairn-ui-alert.d.ts +23 -0
- package/types/joanroucoux-cairn-ui-amount.d.ts +45 -0
- package/types/joanroucoux-cairn-ui-async.d.ts +58 -0
- package/types/joanroucoux-cairn-ui-avatar.d.ts +35 -0
- package/types/joanroucoux-cairn-ui-back-link.d.ts +22 -0
- package/types/joanroucoux-cairn-ui-badge.d.ts +23 -0
- package/types/joanroucoux-cairn-ui-button.d.ts +29 -0
- package/types/joanroucoux-cairn-ui-card.d.ts +36 -0
- package/types/joanroucoux-cairn-ui-choice-chips.d.ts +46 -0
- package/types/joanroucoux-cairn-ui-control.d.ts +27 -0
- package/types/joanroucoux-cairn-ui-delta.d.ts +38 -0
- package/types/joanroucoux-cairn-ui-dialog.d.ts +72 -0
- package/types/joanroucoux-cairn-ui-donut.d.ts +59 -0
- package/types/joanroucoux-cairn-ui-empty.d.ts +19 -0
- package/types/joanroucoux-cairn-ui-external-link.d.ts +15 -0
- package/types/joanroucoux-cairn-ui-fact.d.ts +44 -0
- package/types/joanroucoux-cairn-ui-field.d.ts +84 -0
- package/types/joanroucoux-cairn-ui-filter-chips.d.ts +28 -0
- package/types/joanroucoux-cairn-ui-input.d.ts +51 -0
- package/types/joanroucoux-cairn-ui-line-chart.d.ts +114 -0
- package/types/joanroucoux-cairn-ui-menu.d.ts +66 -0
- package/types/joanroucoux-cairn-ui-meter.d.ts +30 -0
- package/types/joanroucoux-cairn-ui-motion.d.ts +124 -0
- package/types/joanroucoux-cairn-ui-nav-item.d.ts +21 -0
- package/types/joanroucoux-cairn-ui-row.d.ts +78 -0
- package/types/joanroucoux-cairn-ui-segmented.d.ts +36 -0
- package/types/joanroucoux-cairn-ui-select.d.ts +23 -0
- package/types/joanroucoux-cairn-ui-skeleton.d.ts +26 -0
- package/types/joanroucoux-cairn-ui-stale-link.d.ts +24 -0
- package/types/joanroucoux-cairn-ui-stat.d.ts +32 -0
- package/types/joanroucoux-cairn-ui-switch.d.ts +17 -0
- package/types/joanroucoux-cairn-ui-tab-bar.d.ts +31 -0
- package/types/joanroucoux-cairn-ui-table.d.ts +139 -0
- package/types/joanroucoux-cairn-ui-toast.d.ts +51 -0
- package/types/joanroucoux-cairn-ui.d.ts +1 -1440
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/** Named dialog widths; any other CSS length is accepted as is. `DialogWidth` is derived from this tuple. */
|
|
4
|
+
declare const DIALOG_WIDTHS: readonly ["md", "lg"];
|
|
5
|
+
type DialogWidth = (typeof DIALOG_WIDTHS)[number];
|
|
6
|
+
/** Spacing presets. `DialogLayout` is derived from this tuple. */
|
|
7
|
+
declare const DIALOG_LAYOUTS: readonly ["trade", "form", "list", "confirm"];
|
|
8
|
+
type DialogLayout = (typeof DIALOG_LAYOUTS)[number];
|
|
9
|
+
type LayoutClasses = {
|
|
10
|
+
dialog: string;
|
|
11
|
+
header: string;
|
|
12
|
+
title: string;
|
|
13
|
+
cross: string;
|
|
14
|
+
icon: string;
|
|
15
|
+
handle: string;
|
|
16
|
+
body: string;
|
|
17
|
+
footer: string;
|
|
18
|
+
};
|
|
19
|
+
/** What started a close, as `closed` reports it. `DialogCloseReason` is derived from this tuple. */
|
|
20
|
+
declare const DIALOG_CLOSE_REASONS: readonly ["escape", "backdrop", "cross", "drag", "programmatic"];
|
|
21
|
+
type DialogCloseReason = (typeof DIALOG_CLOSE_REASONS)[number];
|
|
22
|
+
/**
|
|
23
|
+
* Modal dialog on the native <dialog>: a bottom sheet under `64rem`, centered above it.
|
|
24
|
+
*
|
|
25
|
+
* `busy` keeps it open while its action runs: Escape, a click on the backdrop and a drag of the sheet do
|
|
26
|
+
* nothing and the cross is disabled. The owner disables its own buttons and still closes it through `open`.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* <ui-dialog heading="Buy" description="Ferrari" closeLabel="Close" width="528px" [open]="buying()" (dismissed)="buying.set(false)">
|
|
30
|
+
* <p>Body</p>
|
|
31
|
+
* <button dialogActions ui-button variant="outline" class="max-lg:hidden" (click)="buying.set(false)">Cancel</button>
|
|
32
|
+
* <button dialogActions ui-button>Buy 40 shares</button>
|
|
33
|
+
* </ui-dialog>
|
|
34
|
+
*/
|
|
35
|
+
declare class UiDialog {
|
|
36
|
+
#private;
|
|
37
|
+
readonly heading: _angular_core.InputSignal<string>;
|
|
38
|
+
readonly description: _angular_core.InputSignal<string | undefined>;
|
|
39
|
+
readonly closeLabel: _angular_core.InputSignal<string | undefined>;
|
|
40
|
+
readonly layout: _angular_core.InputSignal<"form" | "trade" | "list" | "confirm">;
|
|
41
|
+
readonly truncateDescription: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
42
|
+
readonly width: _angular_core.InputSignal<"md" | "lg" | (string & {})>;
|
|
43
|
+
readonly open: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
44
|
+
readonly busy: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
45
|
+
readonly dismissed: _angular_core.OutputEmitterRef<void>;
|
|
46
|
+
readonly closed: _angular_core.OutputEmitterRef<"drag" | "escape" | "backdrop" | "cross" | "programmatic">;
|
|
47
|
+
protected readonly headingId: string;
|
|
48
|
+
protected readonly descriptionId: string;
|
|
49
|
+
protected readonly bodyId: string;
|
|
50
|
+
protected readonly scrollable: _angular_core.WritableSignal<boolean>;
|
|
51
|
+
protected readonly describedBy: _angular_core.Signal<string | null>;
|
|
52
|
+
protected readonly widthValue: _angular_core.Signal<string>;
|
|
53
|
+
protected readonly spec: _angular_core.Signal<LayoutClasses>;
|
|
54
|
+
protected readonly headerClasses: _angular_core.Signal<string>;
|
|
55
|
+
protected readonly titleClasses: _angular_core.Signal<string>;
|
|
56
|
+
protected readonly crossClasses: _angular_core.Signal<string>;
|
|
57
|
+
protected readonly iconClasses: _angular_core.Signal<string>;
|
|
58
|
+
protected readonly footerClasses: _angular_core.Signal<string>;
|
|
59
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
60
|
+
constructor();
|
|
61
|
+
protected close(reason: DialogCloseReason): void;
|
|
62
|
+
protected onCancel(event: Event): void;
|
|
63
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
64
|
+
protected onPointerDown(event: MouseEvent): void;
|
|
65
|
+
protected onClick(event: MouseEvent): void;
|
|
66
|
+
protected onNativeClose(): void;
|
|
67
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiDialog, never>;
|
|
68
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiDialog, "ui-dialog", never, { "heading": { "alias": "heading"; "required": true; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "closeLabel": { "alias": "closeLabel"; "required": false; "isSignal": true; }; "layout": { "alias": "layout"; "required": false; "isSignal": true; }; "truncateDescription": { "alias": "truncateDescription"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; "busy": { "alias": "busy"; "required": false; "isSignal": true; }; }, { "dismissed": "dismissed"; "closed": "closed"; }, never, ["*", "[dialogActions]"], true, never>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { DIALOG_CLOSE_REASONS, DIALOG_LAYOUTS, DIALOG_WIDTHS, UiDialog };
|
|
72
|
+
export type { DialogCloseReason, DialogLayout, DialogWidth };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
type DonutSlice = {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
value: number;
|
|
7
|
+
sublabel?: string;
|
|
8
|
+
};
|
|
9
|
+
type Ramp = 1 | 2 | 3 | 4 | 5 | 6;
|
|
10
|
+
type RankedSlice = DonutSlice & {
|
|
11
|
+
share: number;
|
|
12
|
+
ramp: Ramp;
|
|
13
|
+
members: string[];
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
type PositionedSlice = RankedSlice & {
|
|
17
|
+
dash: string;
|
|
18
|
+
offset: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* A ring chart with a legend: slices rank from largest to smallest on a grey ramp, and hovering,
|
|
23
|
+
* focusing or activating a legend row highlights its slice and centres it in the ring.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* <ui-donut [slices]="byAssetClass()" label="Par classe d'actif" othersLabel="Autres" [valueFormat]="formatEur" [shareFormat]="formatShare" (sliceSelect)="goToHoldings($event)" />
|
|
27
|
+
*/
|
|
28
|
+
declare class UiDonut {
|
|
29
|
+
readonly slices: _angular_core.InputSignal<DonutSlice[]>;
|
|
30
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
31
|
+
readonly othersLabel: _angular_core.InputSignal<string>;
|
|
32
|
+
readonly valueFormat: _angular_core.InputSignal<(value: number) => string>;
|
|
33
|
+
readonly shareFormat: _angular_core.InputSignal<(share: number) => string>;
|
|
34
|
+
readonly legendHref: _angular_core.InputSignal<((id: string) => string | null) | undefined>;
|
|
35
|
+
readonly sliceSelect: _angular_core.OutputEmitterRef<string>;
|
|
36
|
+
protected readonly activeId: _angular_core.WritableSignal<string | null>;
|
|
37
|
+
protected readonly ranked: _angular_core.Signal<RankedSlice[]>;
|
|
38
|
+
protected readonly positioned: _angular_core.Signal<PositionedSlice[]>;
|
|
39
|
+
protected readonly active: _angular_core.Signal<RankedSlice | null>;
|
|
40
|
+
protected readonly ariaLabel: _angular_core.Signal<string>;
|
|
41
|
+
protected readonly radius = 78;
|
|
42
|
+
protected readonly ringWidth = 30;
|
|
43
|
+
protected strokeColor(slice: RankedSlice): string;
|
|
44
|
+
protected sliceClasses(slice: RankedSlice): string;
|
|
45
|
+
protected dotClasses(slice: RankedSlice): string;
|
|
46
|
+
protected rowClasses(slice: RankedSlice): string;
|
|
47
|
+
protected subLabel(slice: RankedSlice): string;
|
|
48
|
+
protected isActive(slice: RankedSlice): boolean;
|
|
49
|
+
protected highlight(id: string): void;
|
|
50
|
+
protected clearHighlight(id: string): void;
|
|
51
|
+
protected hrefFor(id: string): string | null;
|
|
52
|
+
protected follow(event: MouseEvent, slice: RankedSlice): void;
|
|
53
|
+
protected select(slice: RankedSlice): void;
|
|
54
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiDonut, never>;
|
|
55
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiDonut, "ui-donut", never, { "slices": { "alias": "slices"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "othersLabel": { "alias": "othersLabel"; "required": true; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "shareFormat": { "alias": "shareFormat"; "required": false; "isSignal": true; }; "legendHref": { "alias": "legendHref"; "required": false; "isSignal": true; }; }, { "sliceSelect": "sliceSelect"; }, never, never, true, never>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export { UiDonut };
|
|
59
|
+
export type { DonutSlice };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Centred empty state: a title, a hint and an action slot, such as a catalogue search that matches
|
|
5
|
+
* nothing. The padding is 24px, 48px from 64rem.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <ui-empty heading="Aucun instrument ne correspond à « zzz »" hint="La recherche porte sur le nom et l'ISIN.">
|
|
9
|
+
* <button ui-button variant="outline" size="md" type="button">Ajouter une ligne</button>
|
|
10
|
+
* </ui-empty>
|
|
11
|
+
*/
|
|
12
|
+
declare class UiEmpty {
|
|
13
|
+
readonly heading: _angular_core.InputSignal<string>;
|
|
14
|
+
readonly hint: _angular_core.InputSignal<string>;
|
|
15
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiEmpty, never>;
|
|
16
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiEmpty, "ui-empty", never, { "heading": { "alias": "heading"; "required": true; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { UiEmpty };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Link to another site: the label followed by an external-link icon. A 44px target on touch,
|
|
5
|
+
* an underline on hover with a mouse.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <a ui-external-link href="https://example.com" target="_blank" rel="noopener">Page on example.com</a>
|
|
9
|
+
*/
|
|
10
|
+
declare class UiExternalLink {
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiExternalLink, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiExternalLink, "a[ui-external-link]", never, {}, {}, never, ["*"], true, never>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { UiExternalLink };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/** Available fact row sizes. `FactSize` is derived from this tuple. */
|
|
4
|
+
declare const FACT_SIZES: readonly ["md", "sm", "auto", "recap"];
|
|
5
|
+
type FactSize = (typeof FACT_SIZES)[number];
|
|
6
|
+
/** Colour of the line under a fact value. `stale` flags an out-of-date figure. */
|
|
7
|
+
declare const FACT_SUB_TONES: readonly ["subtle", "stale"];
|
|
8
|
+
type FactSubTone = (typeof FACT_SUB_TONES)[number];
|
|
9
|
+
/**
|
|
10
|
+
* The list that holds `div[ui-fact]` rows, as a native description list.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* <dl uiFacts>
|
|
14
|
+
* <div ui-fact label="Quantity">500</div>
|
|
15
|
+
* <div ui-fact label="Price" sub="24/09 · Yahoo">28,64 €</div>
|
|
16
|
+
* </dl>
|
|
17
|
+
*/
|
|
18
|
+
declare class UiFacts {
|
|
19
|
+
readonly ruled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
20
|
+
protected readonly classes: _angular_core.Signal<"m-0 flex flex-col shadow-[inset_0_1px_0_var(--hairline)]" | "m-0 flex flex-col">;
|
|
21
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiFacts, never>;
|
|
22
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiFacts, "dl[uiFacts]", never, { "ruled": { "alias": "ruled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* One fact of a `dl[uiFacts]`: a label on the left, its value on the right, an optional sub-line
|
|
26
|
+
* under the value, and a hairline above every row but the first at the `md` size (the `sm` desktop list is separated by space only). The projected content is the value.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* <div ui-fact label="Price" sub="24/09 · Yahoo" subTone="stale">28,64 €</div>
|
|
30
|
+
*/
|
|
31
|
+
declare class UiFact {
|
|
32
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
33
|
+
readonly sub: _angular_core.InputSignal<string | undefined>;
|
|
34
|
+
readonly subTone: _angular_core.InputSignal<"subtle" | "stale">;
|
|
35
|
+
readonly size: _angular_core.InputSignal<"md" | "sm" | "auto" | "recap">;
|
|
36
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
37
|
+
protected readonly valueClasses: _angular_core.Signal<string>;
|
|
38
|
+
protected readonly subClasses: _angular_core.Signal<string>;
|
|
39
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiFact, never>;
|
|
40
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiFact, "div[ui-fact]", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "sub": { "alias": "sub"; "required": false; "isSignal": true; }; "subTone": { "alias": "subTone"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { FACT_SIZES, FACT_SUB_TONES, UiFact, UiFacts };
|
|
44
|
+
export type { FactSize, FactSubTone };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import * as _joanroucoux_cairn_ui_control from '@joanroucoux/cairn-ui/control';
|
|
2
|
+
import * as _angular_core from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Marks an element, typically an 18px svg icon, as the leading content of a `ui-field`: it sits
|
|
6
|
+
* inside the control's left edge and the control's text is inset to clear it. Decorative, so hidden
|
|
7
|
+
* from assistive technologies.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <ui-field label="Search" labelHidden>
|
|
11
|
+
* <svg uiFieldLeading width="18" height="18" viewBox="0 0 24 24">...</svg>
|
|
12
|
+
* <input uiInput type="search" />
|
|
13
|
+
* </ui-field>
|
|
14
|
+
*/
|
|
15
|
+
declare class UiFieldLeading {
|
|
16
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiFieldLeading, never>;
|
|
17
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiFieldLeading, "[uiFieldLeading]", never, {}, {}, never, never, true, never>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Marks an element, typically an icon button, as the trailing action of a `ui-field`: it sits on the
|
|
21
|
+
* control's right edge, square to the control's height, and the control's text is padded to clear it.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* <ui-field label="Password">
|
|
25
|
+
* <input uiInput type="password" size="xl" />
|
|
26
|
+
* <button uiFieldTrailing type="button" aria-label="Show the password" [attr.aria-pressed]="shown()">...</button>
|
|
27
|
+
* </ui-field>
|
|
28
|
+
*
|
|
29
|
+
* A toggle such as this one should carry `aria-pressed`. The slot shares the right edge with `unit`:
|
|
30
|
+
* set one or the other, not both.
|
|
31
|
+
*/
|
|
32
|
+
declare class UiFieldTrailing {
|
|
33
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiFieldTrailing, never>;
|
|
34
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiFieldTrailing, "[uiFieldTrailing]", never, {}, {}, never, never, true, never>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Label, control, hint and error as one unit. The control stays a plain native element:
|
|
38
|
+
* the field finds it in its own projected content and wires the ARIA attributes onto it.
|
|
39
|
+
*
|
|
40
|
+
* The message comes from the caller's `error`, or, where none is set, from the projected control's
|
|
41
|
+
* own validation state once it is touched.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* <ui-field label="Quantity" hint="Leave empty if unknown">
|
|
45
|
+
* <input uiInput type="number" [formField]="form.quantity" />
|
|
46
|
+
* </ui-field>
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* <ui-field label="ISIN or name" [error]="blank() ? 'Enter an ISIN' : undefined">
|
|
50
|
+
* <input uiInput type="search" />
|
|
51
|
+
* </ui-field>
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* <ui-field label="Search holdings" labelHidden>
|
|
55
|
+
* <input uiInput type="search" placeholder="Instrument or account" />
|
|
56
|
+
* </ui-field>
|
|
57
|
+
*/
|
|
58
|
+
declare class UiField {
|
|
59
|
+
#private;
|
|
60
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
61
|
+
readonly labelHidden: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
62
|
+
readonly hint: _angular_core.InputSignal<string | undefined>;
|
|
63
|
+
readonly error: _angular_core.InputSignal<string | undefined>;
|
|
64
|
+
readonly unit: _angular_core.InputSignal<string | undefined>;
|
|
65
|
+
readonly optional: _angular_core.InputSignal<string | undefined>;
|
|
66
|
+
readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
67
|
+
protected readonly hintId: string;
|
|
68
|
+
protected readonly errorId: string;
|
|
69
|
+
protected readonly control: _angular_core.Signal<_joanroucoux_cairn_ui_control.UiControl | undefined>;
|
|
70
|
+
protected readonly leading: _angular_core.Signal<UiFieldLeading | undefined>;
|
|
71
|
+
protected readonly trailing: _angular_core.Signal<UiFieldTrailing | undefined>;
|
|
72
|
+
protected readonly rowClasses: _angular_core.Signal<string>;
|
|
73
|
+
protected readonly labelClasses: _angular_core.Signal<"sr-only" | "text-label leading-[17px] font-medium text-(--muted-foreground)">;
|
|
74
|
+
/**
|
|
75
|
+
* The caller's own `error` wins: it is the only way to report something the control does not
|
|
76
|
+
* know about, such as a search box refusing an empty query.
|
|
77
|
+
*/
|
|
78
|
+
protected readonly message: _angular_core.Signal<string | undefined>;
|
|
79
|
+
constructor();
|
|
80
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiField, never>;
|
|
81
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiField, "ui-field", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "labelHidden": { "alias": "labelHidden"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "unit": { "alias": "unit"; "required": false; "isSignal": true; }; "optional": { "alias": "optional"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; }, {}, ["control", "leading", "trailing"], ["[uiFieldLeading]", "*", "[uiFieldTrailing]"], true, never>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export { UiField, UiFieldLeading, UiFieldTrailing };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
type FilterChipOption = {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
count?: number | string | null;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* A row of single-choice filter pills, each with an optional count, that narrows a list in place:
|
|
10
|
+
* an asset class, a status. On touch it scrolls on one line, bleeding to the screen edges; with a
|
|
11
|
+
* fine pointer it wraps.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <ui-filter-chips ariaLabel="Filter by class" [options]="classes()" [(value)]="selectedClass" />
|
|
15
|
+
*/
|
|
16
|
+
declare class UiFilterChips {
|
|
17
|
+
readonly options: _angular_core.InputSignal<FilterChipOption[]>;
|
|
18
|
+
readonly value: _angular_core.ModelSignal<string>;
|
|
19
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
20
|
+
protected readonly chipClasses = "flex-none flex h-11 items-center rounded-pill border-0 bg-transparent p-0 font-[inherit] cursor-pointer transition-transform duration-(--duration-press) ease-out active:scale-(--press-scale) focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-(--ring) pointer-fine:h-8 pointer-fine:focus-visible:outline-offset-2";
|
|
21
|
+
protected pillClasses(optionValue: string): string;
|
|
22
|
+
protected countClasses(optionValue: string): string;
|
|
23
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiFilterChips, never>;
|
|
24
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiFilterChips, "ui-filter-chips", never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": true; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { UiFilterChips };
|
|
28
|
+
export type { FilterChipOption };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { UiControl, UiControlError } from '@joanroucoux/cairn-ui/control';
|
|
3
|
+
|
|
4
|
+
/** Available control sizes. `md` is the 44/40px touch target; `lg` and `xl` are the 48px sheet and sign-in fields. */
|
|
5
|
+
declare const CONTROL_SIZES: readonly ["sm", "md", "lg", "xl"];
|
|
6
|
+
type ControlSize = (typeof CONTROL_SIZES)[number];
|
|
7
|
+
declare const CONTROL_BASE_CLASSES = "w-full rounded-control px-3 text-body text-(--foreground) shadow-[inset_0_0_0_1px_var(--border)] placeholder:text-(--muted-foreground) focus-visible:shadow-[inset_0_0_0_2px_var(--ring)] aria-invalid:shadow-[inset_0_0_0_2px_var(--negative)] disabled:cursor-not-allowed disabled:opacity-50";
|
|
8
|
+
declare const CONTROL_SURFACES: readonly ["background", "card"];
|
|
9
|
+
type ControlSurface = (typeof CONTROL_SURFACES)[number];
|
|
10
|
+
declare const CONTROL_SURFACE_CLASSES: Record<ControlSurface, string>;
|
|
11
|
+
declare const CONTROL_SIZE_CLASSES: Record<ControlSize, string>;
|
|
12
|
+
/**
|
|
13
|
+
* Styled native text input. A directive (not a wrapper component) so the host
|
|
14
|
+
* stays a plain <input>: every forms flavor (ngModel, reactive, signal forms)
|
|
15
|
+
* and every native attribute keep working without any plumbing.
|
|
16
|
+
*
|
|
17
|
+
* Declares the `errors` and `touched` inputs Angular's `[formField]` fills, so a `ui-field` around
|
|
18
|
+
* it can show the message without any binding here.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* <input uiInput type="email" placeholder="you@example.com" />
|
|
22
|
+
*/
|
|
23
|
+
declare class UiInput implements UiControl {
|
|
24
|
+
readonly size: _angular_core.InputSignal<"sm" | "md" | "lg" | "xl">;
|
|
25
|
+
readonly surface: _angular_core.InputSignal<"background" | "card">;
|
|
26
|
+
readonly errors: _angular_core.InputSignal<readonly UiControlError[]>;
|
|
27
|
+
readonly touched: _angular_core.InputSignal<boolean>;
|
|
28
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
29
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiInput, never>;
|
|
30
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiInput, "input[uiInput]", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "surface": { "alias": "surface"; "required": false; "isSignal": true; }; "errors": { "alias": "errors"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Styled native textarea. Lives beside the input because it shares every one of its
|
|
34
|
+
* classes; it takes no size, since a textarea grows from a floor instead of sitting
|
|
35
|
+
* at a fixed height.
|
|
36
|
+
*
|
|
37
|
+
* Declares the `errors` and `touched` inputs Angular's `[formField]` fills, so a `ui-field` around
|
|
38
|
+
* it can show the message without any binding here.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* <textarea uiTextarea maxlength="280"></textarea>
|
|
42
|
+
*/
|
|
43
|
+
declare class UiTextarea implements UiControl {
|
|
44
|
+
readonly errors: _angular_core.InputSignal<readonly UiControlError[]>;
|
|
45
|
+
readonly touched: _angular_core.InputSignal<boolean>;
|
|
46
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiTextarea, never>;
|
|
47
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiTextarea, "textarea[uiTextarea]", never, { "errors": { "alias": "errors"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { CONTROL_BASE_CLASSES, CONTROL_SIZES, CONTROL_SIZE_CLASSES, CONTROL_SURFACES, CONTROL_SURFACE_CLASSES, UiInput, UiTextarea };
|
|
51
|
+
export type { ControlSize, ControlSurface };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { ElementRef } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
type ChartPoint = {
|
|
5
|
+
t: number;
|
|
6
|
+
v: number;
|
|
7
|
+
};
|
|
8
|
+
type PlottedPoint = ChartPoint & {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
};
|
|
12
|
+
type ChartGeometry = {
|
|
13
|
+
line: string;
|
|
14
|
+
end: {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
};
|
|
18
|
+
start: {
|
|
19
|
+
y: number;
|
|
20
|
+
};
|
|
21
|
+
points: PlottedPoint[];
|
|
22
|
+
plotBottom: number;
|
|
23
|
+
plotTop: number;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
type TickLabel = {
|
|
27
|
+
text: string;
|
|
28
|
+
classes: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
declare const TOOLTIP_SIZES: readonly ["compact", "large"];
|
|
32
|
+
type TooltipSize = (typeof TOOLTIP_SIZES)[number];
|
|
33
|
+
type AxisTicks = 3 | 5 | 'auto';
|
|
34
|
+
|
|
35
|
+
type PlotRef = ElementRef<SVGSVGElement>;
|
|
36
|
+
type LineRef = ElementRef<SVGPathElement>;
|
|
37
|
+
type EndRef = ElementRef<SVGCircleElement>;
|
|
38
|
+
/**
|
|
39
|
+
* Value over time: a monotone curve with a dashed line at the starting value and a tooltip.
|
|
40
|
+
*
|
|
41
|
+
* Axis labels are never repeated: a tick whose `axisFormat` text equals the previous drawn label is
|
|
42
|
+
* not rendered. The first tick always is, so only the last edge label can drop. With `axisTicks="3"`
|
|
43
|
+
* only the first, middle and last ticks count; with `auto` every tick counts from `sm` up and the
|
|
44
|
+
* three core ticks below it. Tick positions are unchanged.
|
|
45
|
+
*
|
|
46
|
+
* A new series interpolates from the drawn curve, fading the start label and the dashed line. With
|
|
47
|
+
* `rangeKey` bound, only a series that comes with a new key does so: a new series under the same key
|
|
48
|
+
* (a reload after a buy) is drawn at once, with no fade. The key may change before its series arrives.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* <ui-line-chart [points]="points" label="Net worth over one month" startLabel="Since" [valueFormat]="formatEur" />
|
|
52
|
+
*/
|
|
53
|
+
declare class UiLineChart {
|
|
54
|
+
#private;
|
|
55
|
+
readonly points: _angular_core.InputSignal<ChartPoint[]>;
|
|
56
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
57
|
+
readonly valueFormat: _angular_core.InputSignal<(value: number) => string>;
|
|
58
|
+
readonly tooltipFormat: _angular_core.InputSignal<((point: ChartPoint) => string) | undefined>;
|
|
59
|
+
readonly deltaFormat: _angular_core.InputSignal<(delta: number) => string>;
|
|
60
|
+
readonly timeFormat: _angular_core.InputSignal<(time: number) => string>;
|
|
61
|
+
readonly axisFormat: _angular_core.InputSignal<(time: number) => string>;
|
|
62
|
+
readonly startLabel: _angular_core.InputSignal<string>;
|
|
63
|
+
readonly timeColumnLabel: _angular_core.InputSignal<string>;
|
|
64
|
+
readonly valueColumnLabel: _angular_core.InputSignal<string>;
|
|
65
|
+
readonly sparkline: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
66
|
+
readonly tooltip: _angular_core.InputSignal<"auto" | "compact" | "large">;
|
|
67
|
+
readonly tooltipDelta: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
68
|
+
readonly axisGap: _angular_core.InputSignal<number | "auto">;
|
|
69
|
+
readonly axisTicks: _angular_core.InputSignalWithTransform<AxisTicks, string | 5 | 3>;
|
|
70
|
+
readonly rangeKey: _angular_core.InputSignal<string | null>;
|
|
71
|
+
protected readonly svgRef: _angular_core.Signal<PlotRef>;
|
|
72
|
+
protected readonly lineRef: _angular_core.Signal<LineRef | undefined>;
|
|
73
|
+
protected readonly endRef: _angular_core.Signal<EndRef | undefined>;
|
|
74
|
+
protected readonly activeIndex: _angular_core.WritableSignal<number | null>;
|
|
75
|
+
protected readonly held: _angular_core.WritableSignal<ChartGeometry | null>;
|
|
76
|
+
protected readonly measuredSize: _angular_core.WritableSignal<{
|
|
77
|
+
width: number;
|
|
78
|
+
height: number;
|
|
79
|
+
} | null>;
|
|
80
|
+
protected readonly effectiveWidth: _angular_core.Signal<number>;
|
|
81
|
+
protected readonly effectiveHeight: _angular_core.Signal<number>;
|
|
82
|
+
protected readonly plotHeight: _angular_core.Signal<number>;
|
|
83
|
+
protected readonly tooltipStyle: (point: PlottedPoint) => string;
|
|
84
|
+
protected readonly tooltipClasses: _angular_core.Signal<{
|
|
85
|
+
box: string;
|
|
86
|
+
value: string;
|
|
87
|
+
delta: string;
|
|
88
|
+
}>;
|
|
89
|
+
protected readonly geometry: _angular_core.Signal<ChartGeometry | null>;
|
|
90
|
+
protected readonly shown: _angular_core.Signal<ChartGeometry | null>;
|
|
91
|
+
protected readonly startFade: _angular_core.Signal<"opacity-0 duration-(--duration-exit)" | "duration-(--duration-fast)">;
|
|
92
|
+
protected readonly ticks: _angular_core.Signal<PlottedPoint[]>;
|
|
93
|
+
protected readonly tickTexts: _angular_core.Signal<(TickLabel | null)[]>;
|
|
94
|
+
protected readonly active: _angular_core.Signal<PlottedPoint | null>;
|
|
95
|
+
protected readonly startLabelInfo: _angular_core.Signal<{
|
|
96
|
+
label: string;
|
|
97
|
+
placement: {
|
|
98
|
+
y: number;
|
|
99
|
+
x: number;
|
|
100
|
+
anchor: "start" | "end";
|
|
101
|
+
};
|
|
102
|
+
} | null>;
|
|
103
|
+
constructor();
|
|
104
|
+
protected deltaFor(point: PlottedPoint): number;
|
|
105
|
+
protected deltaClasses(point: PlottedPoint): string;
|
|
106
|
+
protected onPointerMove(event: PointerEvent): void;
|
|
107
|
+
protected onPointerLeave(): void;
|
|
108
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
109
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiLineChart, never>;
|
|
110
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiLineChart, "ui-line-chart", never, { "points": { "alias": "points"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "tooltipFormat": { "alias": "tooltipFormat"; "required": false; "isSignal": true; }; "deltaFormat": { "alias": "deltaFormat"; "required": false; "isSignal": true; }; "timeFormat": { "alias": "timeFormat"; "required": false; "isSignal": true; }; "axisFormat": { "alias": "axisFormat"; "required": false; "isSignal": true; }; "startLabel": { "alias": "startLabel"; "required": false; "isSignal": true; }; "timeColumnLabel": { "alias": "timeColumnLabel"; "required": false; "isSignal": true; }; "valueColumnLabel": { "alias": "valueColumnLabel"; "required": false; "isSignal": true; }; "sparkline": { "alias": "sparkline"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "tooltipDelta": { "alias": "tooltipDelta"; "required": false; "isSignal": true; }; "axisGap": { "alias": "axisGap"; "required": false; "isSignal": true; }; "axisTicks": { "alias": "axisTicks"; "required": false; "isSignal": true; }; "rangeKey": { "alias": "rangeKey"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export { UiLineChart };
|
|
114
|
+
export type { AxisTicks, ChartPoint, TooltipSize };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* One action of a `ui-menu`; `destructive` paints it in `--negative`.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* <button uiMenuItem destructive (click)="remove()">Delete the line</button>
|
|
8
|
+
*/
|
|
9
|
+
declare class UiMenuItem {
|
|
10
|
+
#private;
|
|
11
|
+
readonly destructive: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
12
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
13
|
+
focus(): void;
|
|
14
|
+
hasFocus(): boolean;
|
|
15
|
+
protected onClick(): void;
|
|
16
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiMenuItem, never>;
|
|
17
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiMenuItem, "button[uiMenuItem]", never, { "destructive": { "alias": "destructive"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Secondary actions menu, opened from its trigger through the native Popover API. With `sheet`, below
|
|
21
|
+
* 64rem it opens as a bottom action sheet above the tab bar instead of beside its trigger, and
|
|
22
|
+
* `heading` names what the actions apply to. `width` fixes the outer popover width in pixels (the sheet
|
|
23
|
+
* always spans the screen below 64rem); without it the menu fits its content.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* <button ui-button size="icon" aria-label="More" [uiMenuTrigger]="menu">...</button>
|
|
27
|
+
* <ui-menu #menu label="Line actions">
|
|
28
|
+
* <button uiMenuItem (click)="edit()">Edit</button>
|
|
29
|
+
* <button uiMenuItem destructive (click)="remove()">Delete the line</button>
|
|
30
|
+
* </ui-menu>
|
|
31
|
+
*/
|
|
32
|
+
declare class UiMenu {
|
|
33
|
+
#private;
|
|
34
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
35
|
+
readonly sheet: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
36
|
+
readonly heading: _angular_core.InputSignal<string | undefined>;
|
|
37
|
+
readonly width: _angular_core.InputSignalWithTransform<number | undefined, unknown>;
|
|
38
|
+
readonly menuId: string;
|
|
39
|
+
readonly isOpen: _angular_core.WritableSignal<boolean>;
|
|
40
|
+
protected readonly hasWidth: _angular_core.Signal<boolean>;
|
|
41
|
+
protected readonly widthVar: _angular_core.Signal<string | null>;
|
|
42
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
43
|
+
protected readonly items: _angular_core.Signal<readonly UiMenuItem[]>;
|
|
44
|
+
open(trigger: HTMLElement): void;
|
|
45
|
+
close(): void;
|
|
46
|
+
protected onToggle(event: Event): void;
|
|
47
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
48
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiMenu, never>;
|
|
49
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiMenu, "ui-menu", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "sheet": { "alias": "sheet"; "required": false; "isSignal": true; }; "heading": { "alias": "heading"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, {}, ["items"], ["*"], true, never>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Opens a `ui-menu` from a trigger element and wires `aria-haspopup`, `aria-expanded` and
|
|
53
|
+
* `aria-controls` on it.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* <button ui-button size="icon" aria-label="More" [uiMenuTrigger]="menu">...</button>
|
|
57
|
+
*/
|
|
58
|
+
declare class UiMenuTrigger {
|
|
59
|
+
#private;
|
|
60
|
+
readonly uiMenuTrigger: _angular_core.InputSignal<UiMenu>;
|
|
61
|
+
protected toggle(): void;
|
|
62
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiMenuTrigger, never>;
|
|
63
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiMenuTrigger, "[uiMenuTrigger]", never, { "uiMenuTrigger": { "alias": "uiMenuTrigger"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { UiMenu, UiMenuItem, UiMenuTrigger };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/** Track thicknesses. `MeterSize` is derived from this tuple. */
|
|
4
|
+
declare const METER_SIZES: readonly ["md", "sm"];
|
|
5
|
+
type MeterSize = (typeof METER_SIZES)[number];
|
|
6
|
+
/** Ramp step used to paint the fill. `MeterTone` is derived from this tuple. */
|
|
7
|
+
declare const METER_TONES: readonly [1, 2, 3, 4, 5, 6];
|
|
8
|
+
type MeterTone = (typeof METER_TONES)[number];
|
|
9
|
+
/**
|
|
10
|
+
* Proportion of a whole, drawn as a single bar. One bar per category, never a stacked
|
|
11
|
+
* strip: without hue to separate segments, length has to do the work alone.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <ui-meter [value]="0.463" label="Funds" valueText="46.3% - 128,656.00 EUR" [tone]="1" />
|
|
15
|
+
*/
|
|
16
|
+
declare class UiMeter {
|
|
17
|
+
readonly value: _angular_core.InputSignal<number>;
|
|
18
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
19
|
+
readonly valueText: _angular_core.InputSignal<string>;
|
|
20
|
+
readonly tone: _angular_core.InputSignal<2 | 1 | 3 | 4 | 5 | 6>;
|
|
21
|
+
readonly size: _angular_core.InputSignal<"md" | "sm">;
|
|
22
|
+
protected readonly trackClasses: _angular_core.Signal<string>;
|
|
23
|
+
protected readonly percent: _angular_core.Signal<number>;
|
|
24
|
+
protected readonly fillClasses: _angular_core.Signal<string>;
|
|
25
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiMeter, never>;
|
|
26
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiMeter, "ui-meter", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "valueText": { "alias": "valueText"; "required": true; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { METER_SIZES, METER_TONES, UiMeter };
|
|
30
|
+
export type { MeterSize, MeterTone };
|