@area8975/ui 0.1.1-dev.15 → 0.1.1-dev.18
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/fesm2022/area8975-ui.mjs +926 -142
- package/fesm2022/area8975-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/theme.css +2 -13
- package/types/area8975-ui.d.ts +188 -90
package/package.json
CHANGED
package/theme.css
CHANGED
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
/* Defaults hover styles on all devices */
|
|
14
14
|
@custom-variant hover (&:hover);
|
|
15
15
|
|
|
16
|
-
/* dark: follows a .dark class on <html> rather than the media query, so an app can offer System, Light and Dark */
|
|
17
16
|
@custom-variant dark (&:where(.dark, .dark *));
|
|
18
17
|
|
|
19
18
|
|
|
@@ -116,7 +115,6 @@
|
|
|
116
115
|
}
|
|
117
116
|
|
|
118
117
|
|
|
119
|
-
/* Paints the page, otherwise the browser's white shows through whatever --background is */
|
|
120
118
|
@layer base {
|
|
121
119
|
body {
|
|
122
120
|
background-color: var(--background);
|
|
@@ -124,10 +122,6 @@
|
|
|
124
122
|
}
|
|
125
123
|
}
|
|
126
124
|
|
|
127
|
-
/*
|
|
128
|
-
* Softer light theme. The page is a light grey so white cards and the sidebar
|
|
129
|
-
* stand off it, edged with a slightly stronger line. Dark mode keeps Preline's.
|
|
130
|
-
*/
|
|
131
125
|
:root:not(.dark) {
|
|
132
126
|
--background: oklch(0.948 0.005 264);
|
|
133
127
|
--sidebar: var(--card);
|
|
@@ -135,23 +129,18 @@
|
|
|
135
129
|
--card-line: oklch(0.9 0.006 264);
|
|
136
130
|
}
|
|
137
131
|
|
|
138
|
-
/* Dark to match, a deeper page with the cards and sidebar raised off it */
|
|
139
132
|
.dark {
|
|
140
133
|
--background: var(--color-neutral-900);
|
|
141
134
|
--sidebar: var(--card);
|
|
142
135
|
--sidebar-line: var(--card-line);
|
|
143
136
|
|
|
144
|
-
/*
|
|
137
|
+
/* Preline's item hover matches the card colour in dark */
|
|
145
138
|
--dropdown-item-hover: var(--color-neutral-700);
|
|
146
139
|
--dropdown-item-focus: var(--color-neutral-700);
|
|
147
140
|
--dropdown-item-active: var(--color-neutral-700);
|
|
148
141
|
}
|
|
149
142
|
|
|
150
|
-
/*
|
|
151
|
-
* Dark tints. Soft fills, borders and focus rings use the 50 to 200 shades and
|
|
152
|
-
* soft text the 800 one, so in dark those become see-through tints of the
|
|
153
|
-
* colour and a light text shade. Solid colours stay as they are.
|
|
154
|
-
*/
|
|
143
|
+
/* soft fills use the 50 to 200 shades and 800 text, so those become tints in dark */
|
|
155
144
|
.dark {
|
|
156
145
|
--color-primary-50: color-mix(in oklab, var(--color-blue-500) 12%, transparent);
|
|
157
146
|
--color-primary-100: color-mix(in oklab, var(--color-blue-500) 20%, transparent);
|
package/types/area8975-ui.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { ElementRef, EnvironmentProviders, InjectionToken, OnDestroy, OnInit, Pr
|
|
|
3
3
|
import ApexCharts$1 from "apexcharts";
|
|
4
4
|
import { Placement } from "@floating-ui/dom";
|
|
5
5
|
import { Observable } from "rxjs";
|
|
6
|
+
import { IconType } from "@ng-icons/core";
|
|
6
7
|
/** One entry in a legend, the colour ties it to its marks. */
|
|
7
8
|
export interface ChartLegendItem {
|
|
8
9
|
name: string;
|
|
@@ -29,10 +30,7 @@ export type ChartLegendPosition = 'auto' | 'none';
|
|
|
29
30
|
* Keep the order, a series takes the next slot, never a generated colour.
|
|
30
31
|
*/
|
|
31
32
|
export declare const CHART_PALETTE: readonly ["#2a78d6", "#eb6834", "#1baf7a", "#eda100", "#e87ba4", "#008300", "#4a3aa7", "#e34948"];
|
|
32
|
-
/**
|
|
33
|
-
* The palette for dark mode. Violet and green are lightened so every slot
|
|
34
|
-
* keeps 3:1 contrast on a dark card, the rest already do.
|
|
35
|
-
*/
|
|
33
|
+
/** Violet and green are lightened to keep 3:1 contrast on a dark card. */
|
|
36
34
|
export declare const CHART_PALETTE_DARK: readonly ["#2a78d6", "#eb6834", "#1baf7a", "#eda100", "#e87ba4", "#2e9e2e", "#8a7cf0", "#e34948"];
|
|
37
35
|
/** Past eight series, fold the rest into "Other" instead of reusing a colour. */
|
|
38
36
|
export declare const CHART_MAX_SERIES: 8;
|
|
@@ -44,7 +42,6 @@ export interface ChartInk {
|
|
|
44
42
|
muted: string;
|
|
45
43
|
grid: string;
|
|
46
44
|
surface: string;
|
|
47
|
-
/** Series that are there for context. */
|
|
48
45
|
context: string;
|
|
49
46
|
}
|
|
50
47
|
export declare const CHART_INK: ChartInk;
|
|
@@ -72,11 +69,7 @@ export interface ChartSeries {
|
|
|
72
69
|
/** Draws the line dashed, e.g. to set projected figures apart from actual ones. Bars ignore it. */
|
|
73
70
|
dashed?: boolean;
|
|
74
71
|
}
|
|
75
|
-
/**
|
|
76
|
-
* Pixels, or `fill` to take the height of the chart's host, which then has to
|
|
77
|
-
* get its height from layout (a grid row, a flex parent, `h-full` under a sized
|
|
78
|
-
* parent). Clamp it with `min-h-*` and `max-h-*` on the host.
|
|
79
|
-
*/
|
|
72
|
+
/** `fill` takes the host's height, which has to come from layout. */
|
|
80
73
|
export type ChartHeight = number | 'fill';
|
|
81
74
|
/** Turns a raw value into what the axis, tooltip and table show, e.g. money. */
|
|
82
75
|
export type ChartValueFormatter = (value: number) => string;
|
|
@@ -105,10 +98,6 @@ declare abstract class UiAxisChartBase implements ChartLegendSource {
|
|
|
105
98
|
* matter stand out. The way to show more series than there are colours.
|
|
106
99
|
*/
|
|
107
100
|
readonly highlight: import("@angular/core").InputSignal<string[] | null>;
|
|
108
|
-
/**
|
|
109
|
-
* Highlighted series keep the colour they'd have with nothing highlighted,
|
|
110
|
-
* so picking one out of many doesn't change what colour it is.
|
|
111
|
-
*/
|
|
112
101
|
readonly highlightKeepsColours: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
113
102
|
/** `none` leaves the legend out, for when a `ui-chart-legend` is linked with `for`. */
|
|
114
103
|
readonly legend: import("@angular/core").InputSignal<ChartLegendPosition>;
|
|
@@ -439,10 +428,7 @@ export declare class UiChartLegendComponent {
|
|
|
439
428
|
readonly note: import("@angular/core").InputSignal<string>;
|
|
440
429
|
/** A chart to take items from and hide or fade series on, set its `legend` to `none`. */
|
|
441
430
|
readonly for: import("@angular/core").InputSignal<ChartLegendSource | null>;
|
|
442
|
-
/**
|
|
443
|
-
* Adjusts the items taken from `for`, e.g. to relabel or reorder them.
|
|
444
|
-
* Keep each item's `name`, toggling and fading find the series by it.
|
|
445
|
-
*/
|
|
431
|
+
/** Adjusts the linked chart's items, e.g. to relabel them. Keep each `name`. */
|
|
446
432
|
readonly itemsWith: import("@angular/core").InputSignal<((items: ChartLegendItem[]) => ChartLegendItem[]) | null>;
|
|
447
433
|
/** Names of items switched off, bound two-way when `toggleable`. */
|
|
448
434
|
readonly hidden: import("@angular/core").ModelSignal<string[]>;
|
|
@@ -511,7 +497,6 @@ export declare class UiLineChartComponent extends UiAxisChartBase {
|
|
|
511
497
|
readonly showPoints: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
512
498
|
/** Shades this category and everything after it as a forecast. */
|
|
513
499
|
readonly projectedFrom: import("@angular/core").InputSignal<string | null>;
|
|
514
|
-
/** Names the `projectedFrom` band. */
|
|
515
500
|
readonly projectedLabel: import("@angular/core").InputSignal<string>;
|
|
516
501
|
private readonly projectedAnnotations;
|
|
517
502
|
protected readonly chartOptions: import("@angular/core").Signal<ApexCharts.ApexOptions>;
|
|
@@ -583,26 +568,16 @@ export declare class UiPieChartComponent extends UiAxisChartBase {
|
|
|
583
568
|
export declare const PieChartVariants: readonly ["pie", "donut"];
|
|
584
569
|
/** @see {@link PieChartVariants} */
|
|
585
570
|
export type PieChartVariant = typeof PieChartVariants[number];
|
|
586
|
-
/** Currency and locale shared by everything in the library that formats numbers. */
|
|
587
571
|
export interface UiFormat {
|
|
588
572
|
/** ISO 4217 code, e.g. "GBP". */
|
|
589
573
|
currency: string;
|
|
590
574
|
/** BCP 47 tag, e.g. "en-GB". */
|
|
591
575
|
locale: string;
|
|
592
576
|
}
|
|
593
|
-
/** What the library uses when nothing is provided. */
|
|
594
577
|
export declare const UI_FORMAT_DEFAULTS: UiFormat;
|
|
595
578
|
export declare const UI_FORMAT: InjectionToken<UiFormat>;
|
|
596
|
-
/**
|
|
597
|
-
* Sets the currency and locale once, in the app config or on a component for
|
|
598
|
-
* just its part of the page. Inputs on a component still win over it.
|
|
599
|
-
*/
|
|
600
579
|
export declare function provideUiFormat(format: Partial<UiFormat>): Provider;
|
|
601
|
-
/**
|
|
602
|
-
* Formats money in the provided currency and locale, made for a chart's
|
|
603
|
-
* `valueFormatter`. Needs an injection context, e.g. a component field.
|
|
604
|
-
* `options` tweaks the output, e.g. `{ maximumFractionDigits: 0 }` for axes.
|
|
605
|
-
*/
|
|
580
|
+
/** Needs an injection context, e.g. a component field. */
|
|
606
581
|
export declare function injectMoneyFormatter(options?: Intl.NumberFormatOptions): (value: number) => string;
|
|
607
582
|
/** Native type values ui-input supports. File/checkbox/radio/range need their own components. */
|
|
608
583
|
export declare const InputTypes: readonly ["text", "email", "tel", "url", "search", "password", "number", "date", "time", "datetime-local", "month", "week", "color"];
|
|
@@ -705,7 +680,7 @@ export declare class UiDropzoneComponent {
|
|
|
705
680
|
readonly maxSize: import("@angular/core").InputSignal<number | null>;
|
|
706
681
|
readonly title: import("@angular/core").InputSignal<string>;
|
|
707
682
|
readonly hint: import("@angular/core").InputSignal<string>;
|
|
708
|
-
readonly icon: import("@angular/core").InputSignal<
|
|
683
|
+
readonly icon: import("@angular/core").InputSignal<keyof import("@ng-icons/core").NgIconNameMap>;
|
|
709
684
|
readonly rejected: import("@angular/core").OutputEmitterRef<FileRejection[]>;
|
|
710
685
|
private readonly picker;
|
|
711
686
|
private dragDepth;
|
|
@@ -1251,6 +1226,7 @@ export declare class UiSelectComponent<Model = unknown> {
|
|
|
1251
1226
|
readonly listId: string;
|
|
1252
1227
|
readonly hasSelection: import("@angular/core").Signal<boolean>;
|
|
1253
1228
|
readonly triggerLabel: import("@angular/core").Signal<string>;
|
|
1229
|
+
readonly isEmpty: import("@angular/core").Signal<boolean>;
|
|
1254
1230
|
/** Tags only replace the trigger text when there's no inline search box. */
|
|
1255
1231
|
readonly showTags: import("@angular/core").Signal<boolean>;
|
|
1256
1232
|
/** The text to create from, or null when there's nothing to offer. */
|
|
@@ -1567,12 +1543,7 @@ export declare const AlertIntents: string[];
|
|
|
1567
1543
|
export declare const AlertAppearances: readonly ["soft", "bordered"];
|
|
1568
1544
|
export type AlertIntent = typeof AlertIntents[number];
|
|
1569
1545
|
export type AlertAppearance = typeof AlertAppearances[number];
|
|
1570
|
-
/**
|
|
1571
|
-
* A small round picture of a person, their initials until `src` is set or
|
|
1572
|
-
* when the image fails to load. Screen readers hear the name, not the initials.
|
|
1573
|
-
*/
|
|
1574
1546
|
export declare class UiAvatarComponent {
|
|
1575
|
-
/** Who it shows, the initials come from it. */
|
|
1576
1547
|
readonly name: import("@angular/core").InputSignal<string>;
|
|
1577
1548
|
readonly src: import("@angular/core").InputSignal<string | null>;
|
|
1578
1549
|
readonly size: import("@angular/core").InputSignal<"sm" | "md" | "lg">;
|
|
@@ -1600,7 +1571,6 @@ export declare class UiAvatarComponent {
|
|
|
1600
1571
|
};
|
|
1601
1572
|
}, {}, never, never, true, never>;
|
|
1602
1573
|
}
|
|
1603
|
-
/** sm for dense rows, md for menus and lists, lg for a profile header. */
|
|
1604
1574
|
export declare const AvatarSizes: readonly ["sm", "md", "lg"];
|
|
1605
1575
|
/** @see {@link AvatarSizes} */
|
|
1606
1576
|
export type AvatarSize = typeof AvatarSizes[number];
|
|
@@ -1867,11 +1837,6 @@ export declare const CardRadii: readonly ["none", "sm", "md", "lg", "xl"];
|
|
|
1867
1837
|
/** @see {@link CardRadii} */
|
|
1868
1838
|
export type CardRadius = typeof CardRadii[number];
|
|
1869
1839
|
export declare const radiusClasses: Record<CardRadius, string>;
|
|
1870
|
-
/**
|
|
1871
|
-
* The title row at the top of a card, with an optional muted subtitle.
|
|
1872
|
-
* Anything projected goes on the right as actions, e.g. buttons or a picker,
|
|
1873
|
-
* and wraps under the title when there isn't room.
|
|
1874
|
-
*/
|
|
1875
1840
|
export declare class UiCardHeaderComponent {
|
|
1876
1841
|
readonly heading: import("@angular/core").InputSignal<string>;
|
|
1877
1842
|
readonly subtitle: import("@angular/core").InputSignal<string>;
|
|
@@ -1896,7 +1861,6 @@ export declare class UiCardHeaderComponent {
|
|
|
1896
1861
|
};
|
|
1897
1862
|
}, {}, never, ["*"], true, never>;
|
|
1898
1863
|
}
|
|
1899
|
-
/** Heading levels a card title can use. */
|
|
1900
1864
|
export declare const CardHeadingLevels: readonly [2, 3, 4];
|
|
1901
1865
|
/** @see {@link CardHeadingLevels} */
|
|
1902
1866
|
export type CardHeadingLevel = typeof CardHeadingLevels[number];
|
|
@@ -1926,7 +1890,7 @@ export declare class UiDrawerComponent {
|
|
|
1926
1890
|
"required": false;
|
|
1927
1891
|
"isSignal": true;
|
|
1928
1892
|
};
|
|
1929
|
-
}, {}, never,
|
|
1893
|
+
}, {}, never, ["[drawer-actions]", "*"], true, never>;
|
|
1930
1894
|
}
|
|
1931
1895
|
export declare class UiDropdownDirective {
|
|
1932
1896
|
readonly element: ElementRef<any>;
|
|
@@ -1985,7 +1949,7 @@ export declare class UiKpiComponent {
|
|
|
1985
1949
|
readonly label: import("@angular/core").InputSignal<string>;
|
|
1986
1950
|
readonly value: import("@angular/core").InputSignal<string>;
|
|
1987
1951
|
readonly hint: import("@angular/core").InputSignal<string>;
|
|
1988
|
-
readonly icon: import("@angular/core").InputSignal<
|
|
1952
|
+
readonly icon: import("@angular/core").InputSignal<keyof import("@ng-icons/core").NgIconNameMap | undefined>;
|
|
1989
1953
|
readonly iconPosition: import("@angular/core").InputSignal<"right" | "left">;
|
|
1990
1954
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiKpiComponent, never>;
|
|
1991
1955
|
static ɵcmp: i0.ɵɵComponentDeclaration<UiKpiComponent, "ui-kpi", never, {
|
|
@@ -2298,18 +2262,12 @@ export declare class UiProgressComponent {
|
|
|
2298
2262
|
};
|
|
2299
2263
|
}, {}, never, never, true, never>;
|
|
2300
2264
|
}
|
|
2301
|
-
/** One choice in a segmented control. */
|
|
2302
2265
|
export interface SegmentedOption<T> {
|
|
2303
2266
|
value: T;
|
|
2304
2267
|
label: string;
|
|
2305
2268
|
/** Read out instead of `label`, for when the label is abbreviated, e.g. "6M". */
|
|
2306
2269
|
ariaLabel?: string;
|
|
2307
2270
|
}
|
|
2308
|
-
/**
|
|
2309
|
-
* A row of options where exactly one is picked, e.g. a time range or a view
|
|
2310
|
-
* toggle. Built on native radios, so arrow keys move between options and
|
|
2311
|
-
* screen readers hear a radio group.
|
|
2312
|
-
*/
|
|
2313
2271
|
export declare class UiSegmentedComponent<T> {
|
|
2314
2272
|
readonly options: import("@angular/core").InputSignal<SegmentedOption<T>[]>;
|
|
2315
2273
|
readonly value: import("@angular/core").ModelSignal<T>;
|
|
@@ -2378,13 +2336,7 @@ export declare class UiSkeletonComponent {
|
|
|
2378
2336
|
export declare const SkeletonShapes: readonly ["text", "circle", "rect"];
|
|
2379
2337
|
/** @see {@link SkeletonShapes} */
|
|
2380
2338
|
export type SkeletonShape = typeof SkeletonShapes[number];
|
|
2381
|
-
/**
|
|
2382
|
-
* A muted label over a large figure, for the numbers inside a card. Project
|
|
2383
|
-
* the value, e.g. a `ui-money`, and optionally a change or badge beside it
|
|
2384
|
-
* with `stat-change` and a small line under it with `stat-note`.
|
|
2385
|
-
*
|
|
2386
|
-
* Each stat is its own `dl`, so put a row of them in a plain flex or grid wrapper.
|
|
2387
|
-
*/
|
|
2339
|
+
/** Each stat is its own `dl`, so wrap a row of them in a plain div. */
|
|
2388
2340
|
export declare class UiStatComponent {
|
|
2389
2341
|
readonly label: import("@angular/core").InputSignal<string>;
|
|
2390
2342
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiStatComponent, never>;
|
|
@@ -2520,6 +2472,8 @@ interface ColumnDragPreview {
|
|
|
2520
2472
|
}
|
|
2521
2473
|
export declare class UiTableComponent<Row = unknown> implements OnInit, OnDestroy {
|
|
2522
2474
|
readonly classes: import("@angular/core").InputSignal<string>;
|
|
2475
|
+
/** Lets controls elsewhere on the page link to this table, e.g. `<ui-search [table]="'transactions'">`. */
|
|
2476
|
+
readonly tableId: import("@angular/core").InputSignal<string | null>;
|
|
2523
2477
|
readonly columns: import("@angular/core").InputSignal<TableColumn<Row>[]>;
|
|
2524
2478
|
readonly dataSource: import("@angular/core").InputSignal<TableDataSource<Row>>;
|
|
2525
2479
|
readonly emptyMessage: import("@angular/core").InputSignal<string>;
|
|
@@ -2575,6 +2529,9 @@ export declare class UiTableComponent<Row = unknown> implements OnInit, OnDestro
|
|
|
2575
2529
|
private readonly load$;
|
|
2576
2530
|
private readonly destroyRef;
|
|
2577
2531
|
private readonly cdr;
|
|
2532
|
+
private readonly registry;
|
|
2533
|
+
private loadedQuery;
|
|
2534
|
+
private loadedFilters;
|
|
2578
2535
|
private resizeState;
|
|
2579
2536
|
private columnDragState;
|
|
2580
2537
|
private readonly filterDataSources;
|
|
@@ -2627,6 +2584,11 @@ export declare class UiTableComponent<Row = unknown> implements OnInit, OnDestro
|
|
|
2627
2584
|
"required": false;
|
|
2628
2585
|
"isSignal": true;
|
|
2629
2586
|
};
|
|
2587
|
+
"tableId": {
|
|
2588
|
+
"alias": "tableId";
|
|
2589
|
+
"required": false;
|
|
2590
|
+
"isSignal": true;
|
|
2591
|
+
};
|
|
2630
2592
|
"columns": {
|
|
2631
2593
|
"alias": "columns";
|
|
2632
2594
|
"required": true;
|
|
@@ -2719,6 +2681,18 @@ export declare class UiTableComponent<Row = unknown> implements OnInit, OnDestro
|
|
|
2719
2681
|
"rowsReordered": "rowsReordered";
|
|
2720
2682
|
}, never, never, true, never>;
|
|
2721
2683
|
}
|
|
2684
|
+
export interface UiLinkedTable {
|
|
2685
|
+
readonly query: WritableSignal<string>;
|
|
2686
|
+
readonly filters: WritableSignal<Record<string, unknown>>;
|
|
2687
|
+
}
|
|
2688
|
+
export declare class UiTableRegistry {
|
|
2689
|
+
private readonly tables;
|
|
2690
|
+
get(id: string): UiLinkedTable | null;
|
|
2691
|
+
register(id: string, table: UiLinkedTable): void;
|
|
2692
|
+
unregister(id: string, table: UiLinkedTable): void;
|
|
2693
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiTableRegistry, never>;
|
|
2694
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
2695
|
+
}
|
|
2722
2696
|
export declare class UiToastComponent {
|
|
2723
2697
|
readonly intent: import("@angular/core").InputSignal<"success" | "warning" | "danger" | "info">;
|
|
2724
2698
|
readonly classes: import("@angular/core").InputSignal<string>;
|
|
@@ -2726,7 +2700,7 @@ export declare class UiToastComponent {
|
|
|
2726
2700
|
/** ms before the toast dismisses itself, paused while hovered or focused. null never times out. */
|
|
2727
2701
|
readonly timeoutMs: import("@angular/core").InputSignal<number | null>;
|
|
2728
2702
|
readonly dismissed: import("@angular/core").OutputEmitterRef<void>;
|
|
2729
|
-
protected readonly icon: import("@angular/core").Signal<
|
|
2703
|
+
protected readonly icon: import("@angular/core").Signal<IconType>;
|
|
2730
2704
|
protected readonly iconColour: import("@angular/core").Signal<string>;
|
|
2731
2705
|
protected readonly role: import("@angular/core").Signal<"alert" | "status">;
|
|
2732
2706
|
private hovered;
|
|
@@ -2925,11 +2899,6 @@ export declare class UiOverlayComponent implements UiOverlayStackEntry {
|
|
|
2925
2899
|
}
|
|
2926
2900
|
export declare class UiSidebarComponent {
|
|
2927
2901
|
readonly isOpen: import("@angular/core").ModelSignal<boolean>;
|
|
2928
|
-
/**
|
|
2929
|
-
* True while the sidebar is narrow, so content projected into the footer can
|
|
2930
|
-
* shrink to an icon or avatar. Read it with `#sidebar="uiSidebar"` or by
|
|
2931
|
-
* injecting UiSidebarComponent.
|
|
2932
|
-
*/
|
|
2933
2902
|
readonly isCollapsed: import("@angular/core").Signal<boolean>;
|
|
2934
2903
|
readonly toggle: () => void;
|
|
2935
2904
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiSidebarComponent, never>;
|
|
@@ -2943,11 +2912,6 @@ export declare class UiSidebarComponent {
|
|
|
2943
2912
|
"isOpen": "isOpenChange";
|
|
2944
2913
|
}, never, ["*", "[sidebar-footer]"], true, never>;
|
|
2945
2914
|
}
|
|
2946
|
-
/**
|
|
2947
|
-
* A labelled section of sidebar items. The label shows while the sidebar is
|
|
2948
|
-
* open and turns into a divider when it's collapsed, screen readers get the
|
|
2949
|
-
* name either way.
|
|
2950
|
-
*/
|
|
2951
2915
|
export declare class UiSidebarGroupComponent {
|
|
2952
2916
|
private readonly sidebar;
|
|
2953
2917
|
readonly label: import("@angular/core").InputSignal<string>;
|
|
@@ -3427,6 +3391,61 @@ export declare class UiFileInputComponent {
|
|
|
3427
3391
|
"rejected": "rejected";
|
|
3428
3392
|
}, never, never, true, never>;
|
|
3429
3393
|
}
|
|
3394
|
+
export declare class UiSearchComponent {
|
|
3395
|
+
private readonly host;
|
|
3396
|
+
private readonly registry;
|
|
3397
|
+
readonly value: import("@angular/core").ModelSignal<string>;
|
|
3398
|
+
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
3399
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
3400
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
3401
|
+
/** How long typing has to pause before `searched` fires, in milliseconds. */
|
|
3402
|
+
readonly debounce: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
3403
|
+
/** The `tableId` of a ui-table to search, it can render before or after this. */
|
|
3404
|
+
readonly table: import("@angular/core").InputSignal<string | null>;
|
|
3405
|
+
/** The value once typing pauses, for running a search. Clearing fires straight away. */
|
|
3406
|
+
readonly searched: import("@angular/core").OutputEmitterRef<string>;
|
|
3407
|
+
private readonly linked;
|
|
3408
|
+
private timer;
|
|
3409
|
+
constructor();
|
|
3410
|
+
protected onInput(value: string): void;
|
|
3411
|
+
protected clear(): void;
|
|
3412
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiSearchComponent, never>;
|
|
3413
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiSearchComponent, "ui-search", never, {
|
|
3414
|
+
"value": {
|
|
3415
|
+
"alias": "value";
|
|
3416
|
+
"required": false;
|
|
3417
|
+
"isSignal": true;
|
|
3418
|
+
};
|
|
3419
|
+
"placeholder": {
|
|
3420
|
+
"alias": "placeholder";
|
|
3421
|
+
"required": false;
|
|
3422
|
+
"isSignal": true;
|
|
3423
|
+
};
|
|
3424
|
+
"ariaLabel": {
|
|
3425
|
+
"alias": "ariaLabel";
|
|
3426
|
+
"required": false;
|
|
3427
|
+
"isSignal": true;
|
|
3428
|
+
};
|
|
3429
|
+
"disabled": {
|
|
3430
|
+
"alias": "disabled";
|
|
3431
|
+
"required": false;
|
|
3432
|
+
"isSignal": true;
|
|
3433
|
+
};
|
|
3434
|
+
"debounce": {
|
|
3435
|
+
"alias": "debounce";
|
|
3436
|
+
"required": false;
|
|
3437
|
+
"isSignal": true;
|
|
3438
|
+
};
|
|
3439
|
+
"table": {
|
|
3440
|
+
"alias": "table";
|
|
3441
|
+
"required": false;
|
|
3442
|
+
"isSignal": true;
|
|
3443
|
+
};
|
|
3444
|
+
}, {
|
|
3445
|
+
"value": "valueChange";
|
|
3446
|
+
"searched": "searched";
|
|
3447
|
+
}, never, never, true, never>;
|
|
3448
|
+
}
|
|
3430
3449
|
export declare class UiSwitchComponent {
|
|
3431
3450
|
readonly value: import("@angular/core").ModelSignal<boolean>;
|
|
3432
3451
|
readonly id: import("@angular/core").InputSignal<string>;
|
|
@@ -3458,6 +3477,104 @@ export declare class UiSwitchComponent {
|
|
|
3458
3477
|
"value": "valueChange";
|
|
3459
3478
|
}, never, ["*"], true, never>;
|
|
3460
3479
|
}
|
|
3480
|
+
export declare const TableFiltersBreakpoints: {
|
|
3481
|
+
readonly sm: "40rem";
|
|
3482
|
+
readonly md: "48rem";
|
|
3483
|
+
readonly lg: "64rem";
|
|
3484
|
+
readonly xl: "80rem";
|
|
3485
|
+
readonly '2xl': "96rem";
|
|
3486
|
+
};
|
|
3487
|
+
/** @see {@link TableFiltersBreakpoints} */
|
|
3488
|
+
export type TableFiltersBreakpoint = keyof typeof TableFiltersBreakpoints;
|
|
3489
|
+
export interface TableFacetOption {
|
|
3490
|
+
value: unknown;
|
|
3491
|
+
label: string;
|
|
3492
|
+
}
|
|
3493
|
+
/** Writes the picked value, or an array when `multiple`, under `id`. */
|
|
3494
|
+
export interface TableOptionsFacet {
|
|
3495
|
+
id: string;
|
|
3496
|
+
label: string;
|
|
3497
|
+
kind: 'options';
|
|
3498
|
+
options: TableFacetOption[];
|
|
3499
|
+
multiple?: boolean;
|
|
3500
|
+
}
|
|
3501
|
+
/** Writes `{ start, end }` ISO dates under `id`. */
|
|
3502
|
+
export interface TableDateRangeFacet {
|
|
3503
|
+
id: string;
|
|
3504
|
+
label: string;
|
|
3505
|
+
kind: 'dateRange';
|
|
3506
|
+
/** Quick picks, see date-range-presets.ts for ready made ones. */
|
|
3507
|
+
presets?: DateRangePreset[];
|
|
3508
|
+
placeholder?: string;
|
|
3509
|
+
min?: IsoDate | null;
|
|
3510
|
+
max?: IsoDate | null;
|
|
3511
|
+
}
|
|
3512
|
+
export type TableFacet = TableOptionsFacet | TableDateRangeFacet;
|
|
3513
|
+
export type TableFacetDateRange = DateRange;
|
|
3514
|
+
type Filters = Record<string, unknown>;
|
|
3515
|
+
type DateMode = 'any' | 'custom' | number;
|
|
3516
|
+
export declare class UiTableFiltersComponent {
|
|
3517
|
+
private readonly registry;
|
|
3518
|
+
readonly facets: import("@angular/core").InputSignal<TableFacet[]>;
|
|
3519
|
+
/** The `tableId` of a ui-table to filter, it can render before or after this. */
|
|
3520
|
+
readonly table: import("@angular/core").InputSignal<string | null>;
|
|
3521
|
+
readonly value: import("@angular/core").ModelSignal<Filters>;
|
|
3522
|
+
/** Below this breakpoint the panel becomes a Filters button and a drawer. */
|
|
3523
|
+
readonly collapseBelow: import("@angular/core").InputSignal<"sm" | "md" | "lg" | "xl" | "2xl">;
|
|
3524
|
+
protected readonly idPrefix: string;
|
|
3525
|
+
protected readonly anyDate: DateMode;
|
|
3526
|
+
protected readonly customDate: DateMode;
|
|
3527
|
+
private readonly customDates;
|
|
3528
|
+
private readonly linked;
|
|
3529
|
+
protected readonly appliedCount: import("@angular/core").Signal<number>;
|
|
3530
|
+
protected readonly anyApplied: import("@angular/core").Signal<boolean>;
|
|
3531
|
+
private readonly window;
|
|
3532
|
+
protected readonly wide: import("@angular/core").WritableSignal<boolean>;
|
|
3533
|
+
constructor();
|
|
3534
|
+
protected groupName(facet: TableFacet): string;
|
|
3535
|
+
protected choiceId(facet: TableFacet, choice: number | string): string;
|
|
3536
|
+
protected picked(facet: TableOptionsFacet): unknown;
|
|
3537
|
+
protected pick(facet: TableOptionsFacet, value: unknown): void;
|
|
3538
|
+
protected isChecked(facet: TableOptionsFacet, option: TableFacetOption): boolean;
|
|
3539
|
+
protected check(facet: TableOptionsFacet, option: TableFacetOption, checked: boolean): void;
|
|
3540
|
+
protected range(facet: TableDateRangeFacet): DateRange;
|
|
3541
|
+
protected dateMode(facet: TableDateRangeFacet): DateMode;
|
|
3542
|
+
protected pickDate(facet: TableDateRangeFacet, mode: DateMode): void;
|
|
3543
|
+
protected setRange(facet: TableDateRangeFacet, range: DateRange): void;
|
|
3544
|
+
protected clearAll(): void;
|
|
3545
|
+
private setCustom;
|
|
3546
|
+
private apply;
|
|
3547
|
+
private write;
|
|
3548
|
+
private currentFilters;
|
|
3549
|
+
private ownFilters;
|
|
3550
|
+
private withoutOwn;
|
|
3551
|
+
private hasAny;
|
|
3552
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiTableFiltersComponent, never>;
|
|
3553
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiTableFiltersComponent, "ui-table-filters", never, {
|
|
3554
|
+
"facets": {
|
|
3555
|
+
"alias": "facets";
|
|
3556
|
+
"required": true;
|
|
3557
|
+
"isSignal": true;
|
|
3558
|
+
};
|
|
3559
|
+
"table": {
|
|
3560
|
+
"alias": "table";
|
|
3561
|
+
"required": false;
|
|
3562
|
+
"isSignal": true;
|
|
3563
|
+
};
|
|
3564
|
+
"value": {
|
|
3565
|
+
"alias": "value";
|
|
3566
|
+
"required": false;
|
|
3567
|
+
"isSignal": true;
|
|
3568
|
+
};
|
|
3569
|
+
"collapseBelow": {
|
|
3570
|
+
"alias": "collapseBelow";
|
|
3571
|
+
"required": false;
|
|
3572
|
+
"isSignal": true;
|
|
3573
|
+
};
|
|
3574
|
+
}, {
|
|
3575
|
+
"value": "valueChange";
|
|
3576
|
+
}, never, never, true, never>;
|
|
3577
|
+
}
|
|
3461
3578
|
export declare class UiTimeSelectComponent {
|
|
3462
3579
|
/** 24 hour "HH:mm" string. */
|
|
3463
3580
|
readonly value: import("@angular/core").ModelSignal<string>;
|
|
@@ -3491,19 +3608,13 @@ export declare class UiTimeSelectComponent {
|
|
|
3491
3608
|
"value": "valueChange";
|
|
3492
3609
|
}, never, never, true, never>;
|
|
3493
3610
|
}
|
|
3494
|
-
/**
|
|
3495
|
-
* The signed in person and their options, e.g. Settings and Log out, with a
|
|
3496
|
-
* theme switch. Goes inside a dropdown's `uiDropdownContent`, the same as
|
|
3497
|
-
* `ui-dropdown-menu`. Give that dropdown `closeBehaviour="whenClickOutside"`
|
|
3498
|
-
* so picking a theme doesn't close it, picking an item still does.
|
|
3499
|
-
*/
|
|
3611
|
+
/** Give the dropdown it sits in `closeBehaviour="whenClickOutside"`. */
|
|
3500
3612
|
export declare class UiUserMenuComponent {
|
|
3501
3613
|
private readonly dropdown;
|
|
3502
3614
|
readonly name: import("@angular/core").InputSignal<string>;
|
|
3503
3615
|
/** A second line under the name, e.g. an email address. */
|
|
3504
3616
|
readonly detail: import("@angular/core").InputSignal<string>;
|
|
3505
3617
|
readonly src: import("@angular/core").InputSignal<string | null>;
|
|
3506
|
-
/** The same items as `ui-dropdown-menu`, buttons, labelled groups and dividers. */
|
|
3507
3618
|
readonly items: import("@angular/core").InputSignal<DropdownMenuItem[]>;
|
|
3508
3619
|
/** Shows the System, Light and Dark switch, which needs `provideUiTheme()`. */
|
|
3509
3620
|
readonly themeSwitch: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
@@ -3544,16 +3655,11 @@ export declare class UiUserMenuComponent {
|
|
|
3544
3655
|
/** What the user picked, `system` follows the OS setting. */
|
|
3545
3656
|
export type UiThemePreference = 'system' | 'light' | 'dark';
|
|
3546
3657
|
export interface UiThemeConfig {
|
|
3547
|
-
/** localStorage key the preference is kept under. */
|
|
3548
3658
|
storageKey: string;
|
|
3549
3659
|
}
|
|
3550
3660
|
export declare const UI_THEME_CONFIG: InjectionToken<UiThemeConfig>;
|
|
3551
3661
|
/**
|
|
3552
|
-
*
|
|
3553
|
-
* library's tokens key off. Add it with `provideUiTheme()`.
|
|
3554
|
-
*
|
|
3555
|
-
* To stop the page flashing the wrong theme before the app boots, apply the
|
|
3556
|
-
* stored class early with a small inline script in `index.html`'s `<head>`:
|
|
3662
|
+
* Add this to `index.html`'s `<head>` so the stored theme applies before boot:
|
|
3557
3663
|
*
|
|
3558
3664
|
* ```html
|
|
3559
3665
|
* <script>
|
|
@@ -3572,24 +3678,16 @@ export declare class UiThemeService {
|
|
|
3572
3678
|
private readonly media;
|
|
3573
3679
|
readonly preference: import("@angular/core").WritableSignal<UiThemePreference>;
|
|
3574
3680
|
private readonly systemDark;
|
|
3575
|
-
/** Whether dark is showing now, resolved from the preference and the OS setting. */
|
|
3576
3681
|
readonly isDark: import("@angular/core").Signal<boolean>;
|
|
3577
3682
|
constructor();
|
|
3578
3683
|
private stored;
|
|
3579
3684
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiThemeService, never>;
|
|
3580
3685
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
3581
3686
|
}
|
|
3582
|
-
/** Starts theme switching at boot. Read or change it through `UiThemeService`. */
|
|
3583
3687
|
export declare function provideUiTheme(config?: Partial<UiThemeConfig>): EnvironmentProviders;
|
|
3584
|
-
/**
|
|
3585
|
-
* Picks System, Light or Dark through UiThemeService, so the choice is stored
|
|
3586
|
-
* and applied straight away. Add `provideUiTheme()` so the stored choice is
|
|
3587
|
-
* applied at boot, not only once this has rendered.
|
|
3588
|
-
*/
|
|
3589
3688
|
export declare class UiThemeSwitchComponent {
|
|
3590
3689
|
protected readonly theme: UiThemeService;
|
|
3591
3690
|
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
3592
|
-
/** Stretches to the container's width, see `ui-segmented`. */
|
|
3593
3691
|
readonly fill: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
3594
3692
|
protected readonly options: SegmentedOption<UiThemePreference>[];
|
|
3595
3693
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiThemeSwitchComponent, never>;
|