yukit-web 0.6.1 → 0.6.4
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/README.md +97 -10
- package/fesm2022/yukit-web-chart.mjs +650 -0
- package/fesm2022/yukit-web-chart.mjs.map +1 -0
- package/fesm2022/yukit-web.mjs +116 -72
- package/fesm2022/yukit-web.mjs.map +1 -1
- package/package.json +15 -1
- package/src/lib/theme/tokens/color.css +23 -0
- package/types/yukit-web-chart.d.ts +219 -0
- package/types/yukit-web.d.ts +28 -6
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yukit-web",
|
|
3
3
|
"description": "Angular UI component library for Yurest web applications.",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.4",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Yurest Solutions",
|
|
7
7
|
"email": "develop@yurest.com"
|
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
"types": "./types/yukit-web.d.ts",
|
|
16
16
|
"default": "./fesm2022/yukit-web.mjs"
|
|
17
17
|
},
|
|
18
|
+
"./chart": {
|
|
19
|
+
"types": "./types/yukit-web-chart.d.ts",
|
|
20
|
+
"default": "./fesm2022/yukit-web-chart.mjs"
|
|
21
|
+
},
|
|
18
22
|
"./helm/accordion": {
|
|
19
23
|
"types": "./types/yukit-web-helm-accordion.d.ts",
|
|
20
24
|
"default": "./fesm2022/yukit-web-helm-accordion.mjs"
|
|
@@ -270,10 +274,20 @@
|
|
|
270
274
|
"@ng-icons/lucide": "^32.2.0",
|
|
271
275
|
"@spartan-ng/brain": "^1.7.0",
|
|
272
276
|
"@tanstack/angular-table": "^9.0.0",
|
|
277
|
+
"d3-scale": "^4.0.2",
|
|
278
|
+
"d3-shape": "^3.2.0",
|
|
273
279
|
"embla-carousel-angular": "^21.0.0",
|
|
274
280
|
"ngx-scrollbar": "^19.1.5",
|
|
275
281
|
"rxjs": "^7.8.0"
|
|
276
282
|
},
|
|
283
|
+
"peerDependenciesMeta": {
|
|
284
|
+
"d3-scale": {
|
|
285
|
+
"optional": true
|
|
286
|
+
},
|
|
287
|
+
"d3-shape": {
|
|
288
|
+
"optional": true
|
|
289
|
+
}
|
|
290
|
+
},
|
|
277
291
|
"dependencies": {
|
|
278
292
|
"@tanstack/table-core": "^9.0.0",
|
|
279
293
|
"class-variance-authority": "^0.7.1",
|
|
@@ -323,6 +323,16 @@
|
|
|
323
323
|
|
|
324
324
|
--black: var(--neutrals-dark);
|
|
325
325
|
--black-foreground: var(--neutrals-on-fill);
|
|
326
|
+
|
|
327
|
+
/** || Chart series: 3:1 against the page and surface backgrounds || */
|
|
328
|
+
--chart-1: var(--primary-6);
|
|
329
|
+
--chart-2: var(--blue-4);
|
|
330
|
+
--chart-3: var(--teal-4);
|
|
331
|
+
--chart-4: var(--yellow-5);
|
|
332
|
+
--chart-5: var(--violet-4);
|
|
333
|
+
--chart-6: var(--pink-4);
|
|
334
|
+
--chart-7: var(--secondary-6);
|
|
335
|
+
--chart-8: var(--green-4);
|
|
326
336
|
}
|
|
327
337
|
|
|
328
338
|
.dark {
|
|
@@ -512,6 +522,16 @@
|
|
|
512
522
|
--teal-border-light: var(--teal-5);
|
|
513
523
|
--teal-text: var(--teal-2);
|
|
514
524
|
--teal-text-strong: var(--teal-1);
|
|
525
|
+
|
|
526
|
+
/** || Chart series || */
|
|
527
|
+
--chart-1: var(--primary-4);
|
|
528
|
+
--chart-2: var(--blue-3);
|
|
529
|
+
--chart-3: var(--teal-3);
|
|
530
|
+
--chart-4: var(--yellow-3);
|
|
531
|
+
--chart-5: var(--violet-3);
|
|
532
|
+
--chart-6: var(--pink-3);
|
|
533
|
+
--chart-7: var(--secondary-5);
|
|
534
|
+
--chart-8: var(--green-3);
|
|
515
535
|
}
|
|
516
536
|
|
|
517
537
|
@theme inline {
|
|
@@ -526,4 +546,7 @@
|
|
|
526
546
|
--color-additional-foreground: var(--additional-foreground);
|
|
527
547
|
--color-ink: var(--black);
|
|
528
548
|
--color-ink-foreground: var(--black-foreground);
|
|
549
|
+
--color-chart-6: var(--chart-6);
|
|
550
|
+
--color-chart-7: var(--chart-7);
|
|
551
|
+
--color-chart-8: var(--chart-8);
|
|
529
552
|
}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import * as yukit_web_chart from 'yukit-web/chart';
|
|
2
|
+
import * as _angular_core from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/** Theme token a series is painted with; `chart-n` resolves to the `--chart-n` custom property of `yukit-web/theme.css`. */
|
|
5
|
+
type YuwChartColorDto = 'chart-1' | 'chart-2' | 'chart-3' | 'chart-4' | 'chart-5' | 'chart-6' | 'chart-7' | 'chart-8';
|
|
6
|
+
/** Every chart token, in palette order. */
|
|
7
|
+
declare const YUW_CHART_COLORS: readonly YuwChartColorDto[];
|
|
8
|
+
/**
|
|
9
|
+
* How one series is shown: its label, already translated by the consumer, and its color token.
|
|
10
|
+
*/
|
|
11
|
+
interface YuwChartSeriesDto {
|
|
12
|
+
readonly color: YuwChartColorDto;
|
|
13
|
+
readonly label: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Series of a chart keyed by the data field holding their values. The key order is the drawing, stacking, legend
|
|
17
|
+
* and tooltip order.
|
|
18
|
+
*/
|
|
19
|
+
type YuwChartConfigDto = Readonly<Record<string, YuwChartSeriesDto>>;
|
|
20
|
+
/** One data row: the category under `categoryKey` and one number per series key. */
|
|
21
|
+
type YuwChartRowDto = Readonly<Record<string, unknown>>;
|
|
22
|
+
/**
|
|
23
|
+
* Chart kind. Bars group their series side by side unless the kind is `-stacked`; `bar-horizontal` lays the categories
|
|
24
|
+
* on the vertical axis. `pie` and `donut` draw one slice per series, its value summed across every row.
|
|
25
|
+
*/
|
|
26
|
+
type YuwChartKindDto = 'area' | 'area-stacked' | 'bar' | 'bar-horizontal' | 'bar-horizontal-stacked' | 'bar-stacked' | 'donut' | 'line' | 'pie';
|
|
27
|
+
/** Turns a value into the text shown on axes, tooltips and the accessible table, e.g. a localized currency. */
|
|
28
|
+
type YuwChartValueFormatDto = (value: number) => string;
|
|
29
|
+
/** Turns the value under `categoryKey` into its label, e.g. a localized month name. */
|
|
30
|
+
type YuwChartCategoryFormatDto = (category: unknown) => string;
|
|
31
|
+
/** Color token of the series at `index`, cycling through the palette: builds a config for a dynamic set of series. */
|
|
32
|
+
declare function yuwChartColorAt(index: number): YuwChartColorDto;
|
|
33
|
+
|
|
34
|
+
/** How a mark is painted: a filled shape, a translucent area or a line. */
|
|
35
|
+
type YuwChartMarkPaintDto = 'area' | 'fill' | 'stroke';
|
|
36
|
+
/** A drawn path. `hit` is the position in `YuwChartScene.hits` it belongs to, or `null` when it spans all of them. */
|
|
37
|
+
interface YuwChartMark {
|
|
38
|
+
readonly color: string;
|
|
39
|
+
readonly d: string;
|
|
40
|
+
readonly hit: number | null;
|
|
41
|
+
readonly key: string;
|
|
42
|
+
readonly paint: YuwChartMarkPaintDto;
|
|
43
|
+
}
|
|
44
|
+
/** A dot drawn on a line or area at the active position. */
|
|
45
|
+
interface YuwChartPoint {
|
|
46
|
+
readonly color: string;
|
|
47
|
+
readonly cx: number;
|
|
48
|
+
readonly cy: number;
|
|
49
|
+
readonly key: string;
|
|
50
|
+
}
|
|
51
|
+
interface YuwChartTooltipItem {
|
|
52
|
+
readonly color: string;
|
|
53
|
+
readonly key: string;
|
|
54
|
+
readonly label: string;
|
|
55
|
+
readonly value: string;
|
|
56
|
+
}
|
|
57
|
+
interface YuwChartTooltip {
|
|
58
|
+
readonly items: readonly YuwChartTooltipItem[];
|
|
59
|
+
readonly title: string | null;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* One position the pointer and the keyboard can activate: a category of a cartesian chart, a slice of a pie. `d` is
|
|
63
|
+
* the area that reacts to the pointer, `cursor` what highlights it, `anchor` where its tooltip points.
|
|
64
|
+
*/
|
|
65
|
+
interface YuwChartHit {
|
|
66
|
+
readonly anchor: {
|
|
67
|
+
readonly x: number;
|
|
68
|
+
readonly y: number;
|
|
69
|
+
};
|
|
70
|
+
readonly cursor: string | null;
|
|
71
|
+
readonly d: string;
|
|
72
|
+
readonly points: readonly YuwChartPoint[];
|
|
73
|
+
readonly tooltip: YuwChartTooltip;
|
|
74
|
+
}
|
|
75
|
+
interface YuwChartTick {
|
|
76
|
+
readonly anchor: 'end' | 'middle' | 'start';
|
|
77
|
+
readonly label: string;
|
|
78
|
+
readonly x: number;
|
|
79
|
+
readonly y: number;
|
|
80
|
+
}
|
|
81
|
+
interface YuwChartTableRow {
|
|
82
|
+
readonly cells: readonly string[];
|
|
83
|
+
readonly header: string | null;
|
|
84
|
+
}
|
|
85
|
+
/** The text alternative: the same numbers as a table, with a corner header only when rows have headers. */
|
|
86
|
+
interface YuwChartTable {
|
|
87
|
+
readonly corner: string | null;
|
|
88
|
+
readonly head: readonly string[];
|
|
89
|
+
readonly rows: readonly YuwChartTableRow[];
|
|
90
|
+
}
|
|
91
|
+
/** Everything a chart kind draws, in pixels of the measured plot. */
|
|
92
|
+
interface YuwChartScene {
|
|
93
|
+
readonly cursorPaint: 'band' | 'line';
|
|
94
|
+
readonly empty: boolean;
|
|
95
|
+
readonly grid: readonly string[];
|
|
96
|
+
readonly hits: readonly YuwChartHit[];
|
|
97
|
+
readonly marks: readonly YuwChartMark[];
|
|
98
|
+
/** Where marks and hit areas are drawn from; anchors, ticks and the grid are absolute. */
|
|
99
|
+
readonly origin: {
|
|
100
|
+
readonly x: number;
|
|
101
|
+
readonly y: number;
|
|
102
|
+
};
|
|
103
|
+
readonly table: YuwChartTable;
|
|
104
|
+
readonly ticks: readonly YuwChartTick[];
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
interface YuwChartSize {
|
|
108
|
+
readonly height: number;
|
|
109
|
+
readonly width: number;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Chart drawn as SVG from a series `config` and `data` rows, with a tooltip and a legend that read the same config.
|
|
114
|
+
*
|
|
115
|
+
* Every series is a key of `config` naming the row field that holds its values, plus its label (already translated)
|
|
116
|
+
* and a `chart-n` color token, so light and dark mode recolor through the theme with no redraw. `kind` picks the
|
|
117
|
+
* drawing: bars (grouped, stacked, horizontal), lines, areas, or a pie / donut with one slice per series summed across
|
|
118
|
+
* the rows. The chart fills its root element and redraws when it resizes; size it with `class` (default `h-72`).
|
|
119
|
+
*
|
|
120
|
+
* The pointer and the keyboard (focus the plot, then the arrow keys, Home, End and Escape) move a tooltip across the
|
|
121
|
+
* categories or slices, announced politely to screen readers. The same numbers are always available to assistive
|
|
122
|
+
* technology as a visually hidden table, which also renders on the server, where the plot is not drawn.
|
|
123
|
+
*
|
|
124
|
+
* The library hardcodes no locale: `valueFormat` and `categoryFormat` turn values and categories into text.
|
|
125
|
+
*
|
|
126
|
+
* Inputs:
|
|
127
|
+
* - `ariaLabel`: Required accessible name of the chart, e.g. its title. The app supplies and translates it.
|
|
128
|
+
* - `categoryFormat`: Turns the value under `categoryKey` into its label. Cartesian kinds only. Default is `String`.
|
|
129
|
+
* - `categoryKey`: Row field holding each category, e.g. the period. Cartesian kinds only. Default is `undefined`.
|
|
130
|
+
* - `categoryLabel`: Header of the category column in the accessible table, e.g. "Month". Cartesian kinds only.
|
|
131
|
+
* Default is `undefined`.
|
|
132
|
+
* - `config`: Required series, keyed by the row field holding their values (`YuwChartConfigDto`). Its order is the
|
|
133
|
+
* drawing, stacking, legend and tooltip order.
|
|
134
|
+
* - `data`: Required rows (`YuwChartRowDto[]`). A non-numeric value is a gap, never a zero.
|
|
135
|
+
* - `description`: Accessible description, e.g. the period the chart covers. Default is `undefined`.
|
|
136
|
+
* - `emptyText`: Required message shown when there is nothing to draw. The app supplies and translates it.
|
|
137
|
+
* - `kind`: The drawing (`YuwChartKindDto`). Default is `'bar'`.
|
|
138
|
+
* - `legend`: Shows the legend under the plot. Default is `true`.
|
|
139
|
+
* - `loading`: Shows a skeleton instead of the plot and marks the chart busy. Default is `false`.
|
|
140
|
+
* - `valueFormat`: Turns a value into the text of axes, tooltips and the accessible table, e.g. a localized currency.
|
|
141
|
+
* Default is `String`.
|
|
142
|
+
* - `class`: Extra classes merged last onto the root element; set its height here.
|
|
143
|
+
*
|
|
144
|
+
* Usage:
|
|
145
|
+
* ```html
|
|
146
|
+
* <yuw-chart
|
|
147
|
+
* kind="bar-stacked"
|
|
148
|
+
* ariaLabel="Purchases per month"
|
|
149
|
+
* emptyText="No purchases in this period"
|
|
150
|
+
* categoryKey="month"
|
|
151
|
+
* categoryLabel="Month"
|
|
152
|
+
* [config]="config"
|
|
153
|
+
* [data]="rows"
|
|
154
|
+
* [valueFormat]="formatEuros"
|
|
155
|
+
* class="h-80"
|
|
156
|
+
* />
|
|
157
|
+
* ```
|
|
158
|
+
*/
|
|
159
|
+
declare class YuwChartComponent {
|
|
160
|
+
private readonly _id;
|
|
161
|
+
private readonly _plot;
|
|
162
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
163
|
+
readonly categoryFormat: _angular_core.InputSignal<YuwChartCategoryFormatDto>;
|
|
164
|
+
readonly categoryKey: _angular_core.InputSignal<string | undefined>;
|
|
165
|
+
readonly categoryLabel: _angular_core.InputSignal<string | undefined>;
|
|
166
|
+
readonly config: _angular_core.InputSignal<Readonly<Record<string, yukit_web_chart.YuwChartSeriesDto>>>;
|
|
167
|
+
readonly data: _angular_core.InputSignal<readonly Readonly<Record<string, unknown>>[]>;
|
|
168
|
+
readonly description: _angular_core.InputSignal<string | undefined>;
|
|
169
|
+
readonly emptyText: _angular_core.InputSignal<string>;
|
|
170
|
+
readonly kind: _angular_core.InputSignal<YuwChartKindDto>;
|
|
171
|
+
readonly legend: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
172
|
+
readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
173
|
+
readonly userClass: _angular_core.InputSignal<string>;
|
|
174
|
+
readonly valueFormat: _angular_core.InputSignal<YuwChartValueFormatDto>;
|
|
175
|
+
protected readonly descriptionId: string;
|
|
176
|
+
protected readonly size: _angular_core.Signal<YuwChartSize>;
|
|
177
|
+
protected readonly scene: _angular_core.Signal<YuwChartScene>;
|
|
178
|
+
protected readonly active: _angular_core.WritableSignal<number | null>;
|
|
179
|
+
protected readonly activeHit: _angular_core.Signal<YuwChartHit | null>;
|
|
180
|
+
protected readonly activePoints: _angular_core.Signal<readonly YuwChartPoint[]>;
|
|
181
|
+
protected readonly announcement: _angular_core.Signal<string>;
|
|
182
|
+
protected readonly cursorClass: _angular_core.Signal<string>;
|
|
183
|
+
protected readonly describedBy: _angular_core.Signal<string | null>;
|
|
184
|
+
protected readonly drawable: _angular_core.Signal<boolean>;
|
|
185
|
+
protected readonly interactive: _angular_core.Signal<boolean>;
|
|
186
|
+
protected readonly legendItems: _angular_core.Signal<{
|
|
187
|
+
key: string;
|
|
188
|
+
label: string;
|
|
189
|
+
color: string;
|
|
190
|
+
}[]>;
|
|
191
|
+
protected readonly marks: _angular_core.Signal<{
|
|
192
|
+
d: string;
|
|
193
|
+
key: string;
|
|
194
|
+
class: string;
|
|
195
|
+
style: {
|
|
196
|
+
[x: string]: string;
|
|
197
|
+
};
|
|
198
|
+
}[]>;
|
|
199
|
+
protected readonly origin: _angular_core.Signal<string>;
|
|
200
|
+
protected readonly rootClass: _angular_core.Signal<string>;
|
|
201
|
+
protected readonly showLegend: _angular_core.Signal<boolean>;
|
|
202
|
+
protected readonly tooltip: _angular_core.Signal<{
|
|
203
|
+
left: number;
|
|
204
|
+
top: number;
|
|
205
|
+
class: string;
|
|
206
|
+
items: readonly YuwChartTooltipItem[];
|
|
207
|
+
title: string | null;
|
|
208
|
+
} | null>;
|
|
209
|
+
protected readonly viewBox: _angular_core.Signal<string>;
|
|
210
|
+
protected activate(index: number): void;
|
|
211
|
+
protected clear(): void;
|
|
212
|
+
protected onFocus(event: FocusEvent): void;
|
|
213
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
214
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<YuwChartComponent, never>;
|
|
215
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<YuwChartComponent, "yuw-chart", never, { "ariaLabel": { "alias": "ariaLabel"; "required": true; "isSignal": true; }; "categoryFormat": { "alias": "categoryFormat"; "required": false; "isSignal": true; }; "categoryKey": { "alias": "categoryKey"; "required": false; "isSignal": true; }; "categoryLabel": { "alias": "categoryLabel"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": true; "isSignal": true; }; "data": { "alias": "data"; "required": true; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": true; "isSignal": true; }; "kind": { "alias": "kind"; "required": false; "isSignal": true; }; "legend": { "alias": "legend"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export { YUW_CHART_COLORS, YuwChartComponent, yuwChartColorAt };
|
|
219
|
+
export type { YuwChartCategoryFormatDto, YuwChartColorDto, YuwChartConfigDto, YuwChartKindDto, YuwChartRowDto, YuwChartSeriesDto, YuwChartValueFormatDto };
|
package/types/yukit-web.d.ts
CHANGED
|
@@ -440,7 +440,11 @@ type YuwComboboxValue = string | string[] | undefined;
|
|
|
440
440
|
* `<yuw-button>` whose content is that template: clicking it opens the option list straight away,
|
|
441
441
|
* with the search field inside it. `triggerAriaLabel` names that button, so pass one that reads well
|
|
442
442
|
* for an icon-only trigger. See `YuwComboboxTriggerDirective`.
|
|
443
|
-
* - `invalid`: Forces invalid styling.
|
|
443
|
+
* - `invalid`: Forces invalid styling. Applied from the first blur on, so a pristine field is not flagged.
|
|
444
|
+
* - `helperText`: Hint shown under the control. Replaced by the error while one is displayed.
|
|
445
|
+
*
|
|
446
|
+
* Bound with `[formField]` (signal forms), the error state follows the field: shown once it is touched, with the
|
|
447
|
+
* `message` of its first error under the control.
|
|
444
448
|
*
|
|
445
449
|
* Content marked `yuwComboboxFooter` is projected at the bottom of the option list, for actions
|
|
446
450
|
* that belong with it (a "clear all", say); the consumer renders and styles it.
|
|
@@ -465,6 +469,7 @@ declare class YuwComboboxComponent<TData = unknown> extends YuwValueAccessorBase
|
|
|
465
469
|
protected readonly triggerTemplate: _angular_core.Signal<YuwComboboxTriggerDirective | undefined>;
|
|
466
470
|
readonly clearAriaLabel: _angular_core.InputSignal<string | undefined>;
|
|
467
471
|
readonly emptyText: _angular_core.InputSignal<string | undefined>;
|
|
472
|
+
readonly helperText: _angular_core.InputSignal<string | undefined>;
|
|
468
473
|
readonly inputId: _angular_core.InputSignal<string | undefined>;
|
|
469
474
|
readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
470
475
|
readonly keepValueOnEscape: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
@@ -519,7 +524,7 @@ declare class YuwComboboxComponent<TData = unknown> extends YuwValueAccessorBase
|
|
|
519
524
|
*/
|
|
520
525
|
private _guardEscape;
|
|
521
526
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<YuwComboboxComponent<any>, never>;
|
|
522
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<YuwComboboxComponent<any>, "yuw-combobox", never, { "clearAriaLabel": { "alias": "clearAriaLabel"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "keepValueOnEscape": { "alias": "keepValueOnEscape"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": true; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "readonlyTrigger": { "alias": "readonlyTrigger"; "required": false; "isSignal": true; }; "search": { "alias": "search"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "triggerAriaLabel": { "alias": "triggerAriaLabel"; "required": true; "isSignal": true; }; "triggerClass": { "alias": "triggerClass"; "required": false; "isSignal": true; }; "triggerColor": { "alias": "triggerColor"; "required": false; "isSignal": true; }; "triggerSize": { "alias": "triggerSize"; "required": false; "isSignal": true; }; "triggerVariant": { "alias": "triggerVariant"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "search": "searchChange"; "value": "valueChange"; }, ["itemTemplate", "triggerTemplate"], ["[yuwComboboxFooter]"], true, never>;
|
|
527
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<YuwComboboxComponent<any>, "yuw-combobox", never, { "clearAriaLabel": { "alias": "clearAriaLabel"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "keepValueOnEscape": { "alias": "keepValueOnEscape"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": true; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "readonlyTrigger": { "alias": "readonlyTrigger"; "required": false; "isSignal": true; }; "search": { "alias": "search"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "triggerAriaLabel": { "alias": "triggerAriaLabel"; "required": true; "isSignal": true; }; "triggerClass": { "alias": "triggerClass"; "required": false; "isSignal": true; }; "triggerColor": { "alias": "triggerColor"; "required": false; "isSignal": true; }; "triggerSize": { "alias": "triggerSize"; "required": false; "isSignal": true; }; "triggerVariant": { "alias": "triggerVariant"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "search": "searchChange"; "value": "valueChange"; }, ["itemTemplate", "triggerTemplate"], ["[yuwComboboxFooter]"], true, never>;
|
|
523
528
|
}
|
|
524
529
|
|
|
525
530
|
interface YuwPageSort {
|
|
@@ -969,8 +974,10 @@ declare function getPaginationRange(page: number, totalPages: number): YuwPagina
|
|
|
969
974
|
* using `@for`.
|
|
970
975
|
*
|
|
971
976
|
* Inputs:
|
|
972
|
-
* - `collapseWithSheet`: Inside a `<yuw-sheet>` or `<yuws-form-sheet>`, collapses every item whenever the sheet opens
|
|
973
|
-
*
|
|
977
|
+
* - `collapseWithSheet`: Inside a `<yuw-sheet>` or `<yuws-form-sheet>`, collapses every item whenever the sheet opens,
|
|
978
|
+
* so each opening starts folded. Ignored outside a sheet. Default is `false`. It folds on opening and never on
|
|
979
|
+
* closing: a height transition cut short by the sheet detaching leaves Chrome rendering the content 0 tall on every
|
|
980
|
+
* later opening.
|
|
974
981
|
*
|
|
975
982
|
* Extends `HlmAccordion` (instead of re-applying `BrnAccordion` and copying the helm's classes
|
|
976
983
|
* by hand) so the helm's `data-slot`, classes and its `BrnAccordion` host directive — including
|
|
@@ -2058,10 +2065,14 @@ type YuwDatepickerModeDto = 'single' | 'range' | 'multiple' | 'monthYear';
|
|
|
2058
2065
|
* association. When omitted, a unique per-instance id is generated.
|
|
2059
2066
|
* - `size`: Trigger button height (`YuwFieldSizeDto`), matching the `<yuw-button>` size of the same name. Default is `'default'`.
|
|
2060
2067
|
* - `class`: Extra classes merged onto the trigger button (e.g. a width), consumer classes win.
|
|
2061
|
-
* - `invalid`: Forces invalid styling.
|
|
2068
|
+
* - `invalid`: Forces invalid styling. Applied from the first blur on, so a pristine field is not flagged.
|
|
2069
|
+
* - `helperText`: Hint shown under the control. Replaced by the error while one is displayed.
|
|
2062
2070
|
* - `formatDate`: Custom date formatter function `(date: Date) => string` for the trigger label.
|
|
2063
2071
|
* In `range`/`multiple` modes it formats each date, joined with `' - '` / `', '`.
|
|
2064
2072
|
*
|
|
2073
|
+
* Bound with `[formField]` (signal forms), the error state follows the field: shown once it is touched, with the
|
|
2074
|
+
* `message` of its first error under the control.
|
|
2075
|
+
*
|
|
2065
2076
|
* Usage:
|
|
2066
2077
|
* ```html
|
|
2067
2078
|
* <yuw-datepicker [(value)]="selectedDate" placeholder="Select date..." />
|
|
@@ -2074,6 +2085,7 @@ declare class YuwDatepickerComponent extends YuwValueAccessorBase<YuwDatepickerV
|
|
|
2074
2085
|
readonly buttonId: _angular_core.InputSignal<string | undefined>;
|
|
2075
2086
|
readonly captionLayout: _angular_core.InputSignal<"label" | "dropdown" | "dropdown-months" | "dropdown-years">;
|
|
2076
2087
|
readonly formatDate: _angular_core.InputSignal<((date: Date) => string) | undefined>;
|
|
2088
|
+
readonly helperText: _angular_core.InputSignal<string | undefined>;
|
|
2077
2089
|
readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
2078
2090
|
readonly maxDate: _angular_core.InputSignal<Date | undefined>;
|
|
2079
2091
|
readonly minDate: _angular_core.InputSignal<Date | undefined>;
|
|
@@ -2100,7 +2112,7 @@ declare class YuwDatepickerComponent extends YuwValueAccessorBase<YuwDatepickerV
|
|
|
2100
2112
|
protected _emptyValue(): YuwDatepickerValue;
|
|
2101
2113
|
protected onValueChange(next: YuwDatepickerValue): void;
|
|
2102
2114
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<YuwDatepickerComponent, never>;
|
|
2103
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<YuwDatepickerComponent, "yuw-datepicker", never, { "align": { "alias": "align"; "required": false; "isSignal": true; }; "buttonId": { "alias": "buttonId"; "required": false; "isSignal": true; }; "captionLayout": { "alias": "captionLayout"; "required": false; "isSignal": true; }; "formatDate": { "alias": "formatDate"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
2115
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<YuwDatepickerComponent, "yuw-datepicker", never, { "align": { "alias": "align"; "required": false; "isSignal": true; }; "buttonId": { "alias": "buttonId"; "required": false; "isSignal": true; }; "captionLayout": { "alias": "captionLayout"; "required": false; "isSignal": true; }; "formatDate": { "alias": "formatDate"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
2104
2116
|
}
|
|
2105
2117
|
|
|
2106
2118
|
/**
|
|
@@ -2839,6 +2851,12 @@ type YuwTooltipPositionDto = 'top' | 'bottom' | 'left' | 'right';
|
|
|
2839
2851
|
* Brain tooltip config default (`100`).
|
|
2840
2852
|
* - `tooltipDisabled`: Disables the tooltip entirely.
|
|
2841
2853
|
*
|
|
2854
|
+
* Focus opens it only when it is keyboard focus (`:focus-visible`). Brain opens on any `focus`, so a
|
|
2855
|
+
* dialog or sheet autofocusing its first tabbable element on open would pop the tooltip unasked.
|
|
2856
|
+
* Brain has no public way to cancel a show, so a non-keyboard focus suppresses it through
|
|
2857
|
+
* `mutableTooltipDisabled`, which Brain checks once the show delay elapses; blur and hover give the
|
|
2858
|
+
* `tooltipDisabled` input back.
|
|
2859
|
+
*
|
|
2842
2860
|
* Usage:
|
|
2843
2861
|
* ```html
|
|
2844
2862
|
* <button yuwTooltip="Save changes" hlmBtn>Save</button>
|
|
@@ -2846,6 +2864,10 @@ type YuwTooltipPositionDto = 'top' | 'bottom' | 'left' | 'right';
|
|
|
2846
2864
|
* ```
|
|
2847
2865
|
*/
|
|
2848
2866
|
declare class YuwTooltipDirective {
|
|
2867
|
+
private readonly host;
|
|
2868
|
+
private readonly tooltip;
|
|
2869
|
+
protected restore(): void;
|
|
2870
|
+
protected suppressUnlessKeyboardFocus(): void;
|
|
2849
2871
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<YuwTooltipDirective, never>;
|
|
2850
2872
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<YuwTooltipDirective, "[yuwTooltip]", never, {}, {}, never, never, true, [{ directive: typeof i1$a.BrnTooltip; inputs: { "brnTooltip": "yuwTooltip"; "position": "position"; "hideDelay": "hideDelay"; "showDelay": "showDelay"; "tooltipDisabled": "tooltipDisabled"; }; outputs: {}; }]>;
|
|
2851
2873
|
}
|