@umriss-ui/core 0.43.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -0
- package/README.md +49 -11
- package/dist/core.css +1 -1
- package/dist/core.js +4593 -4139
- package/dist/de.d.ts +42 -0
- package/dist/formats-Bo0qM01D.js +97 -0
- package/dist/index.d.ts +197 -51
- package/dist/wording/de.js +18 -2
- package/docs/llms-full.md +1238 -303
- package/package.json +1 -1
- package/dist/formats-BccAYWgq.js +0 -80
package/dist/de.d.ts
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
/** Everything the library knows about formatting. */
|
|
2
2
|
declare interface Formats {
|
|
3
|
+
/** The language tag the set was built in: "en-GB". */
|
|
4
|
+
locale: string;
|
|
5
|
+
/** The IANA name of the time zone instants are written in, or `undefined`
|
|
6
|
+
for the reader's own. */
|
|
7
|
+
timeZone: string | undefined;
|
|
8
|
+
/** The zone's generic name in the set's locale: "Central European Time".
|
|
9
|
+
Empty until the page has hydrated where no zone is named. */
|
|
10
|
+
timeZoneName: (d: Date) => string;
|
|
3
11
|
/** Date as displayed: 17/03/2026 */
|
|
4
12
|
date: (d: Date) => string;
|
|
5
13
|
/** Short form without the year, in the range footer: 17/03 */
|
|
6
14
|
dateShort: (d: Date) => string;
|
|
7
15
|
/** The calendar's month header: March 2026 */
|
|
8
16
|
month: (d: Date) => string;
|
|
17
|
+
/** The month alone, in the calendar head's month list: March */
|
|
18
|
+
monthName: (d: Date) => string;
|
|
9
19
|
/** Accessible name of a calendar cell: Tuesday, 17 March 2026 */
|
|
10
20
|
dateLong: (d: Date) => string;
|
|
11
21
|
/** Time of day, optionally with seconds: 09:05 or 09:05:03 */
|
|
@@ -129,6 +139,12 @@ declare interface Wording {
|
|
|
129
139
|
the dialog. */
|
|
130
140
|
datePanel: string;
|
|
131
141
|
dateClear: string;
|
|
142
|
+
/** The name of the DatePicker panel's typed field. */
|
|
143
|
+
typeDate: string;
|
|
144
|
+
/** Announced when the typed text is no date. */
|
|
145
|
+
notADate: string;
|
|
146
|
+
/** Announced when the typed date lies outside `min` and `max`; each bound is written in the formats in use, `null` where there is none. */
|
|
147
|
+
dateOutOfRange: (min: string | null, max: string | null) => string;
|
|
132
148
|
dateTimePlaceholder: string;
|
|
133
149
|
dateTimePanel: string;
|
|
134
150
|
dateTimeClear: string;
|
|
@@ -142,6 +158,10 @@ declare interface Wording {
|
|
|
142
158
|
dateTimeRangeClear: string;
|
|
143
159
|
previousMonth: string;
|
|
144
160
|
nextMonth: string;
|
|
161
|
+
/** Name of the calendar head's month list. */
|
|
162
|
+
monthSelect: string;
|
|
163
|
+
/** Name of the calendar head's year list. */
|
|
164
|
+
yearSelect: string;
|
|
145
165
|
/** Group name of the preset column. */
|
|
146
166
|
quickSelect: string;
|
|
147
167
|
today: string;
|
|
@@ -242,8 +262,14 @@ declare interface Wording {
|
|
|
242
262
|
exportLabel: string;
|
|
243
263
|
/** The export button of a table in server mode, which holds and writes one page. */
|
|
244
264
|
exportPageLabel: string;
|
|
265
|
+
/** The status while the application prepares an export of every match. */
|
|
266
|
+
exporting: string;
|
|
267
|
+
/** The alert beside the export button when preparing the export failed without a message. */
|
|
268
|
+
exportFailed: string;
|
|
245
269
|
/** The export's file name, where the application names none. */
|
|
246
270
|
exportFileName: string;
|
|
271
|
+
/** The name of the sheet an XLSX export holds. */
|
|
272
|
+
exportSheetName: string;
|
|
247
273
|
/** Placeholder and accessible name of the search field. */
|
|
248
274
|
tableSearchPlaceholder: string;
|
|
249
275
|
tableSearchLabel: string;
|
|
@@ -323,6 +349,8 @@ declare interface Wording {
|
|
|
323
349
|
pathRow: string;
|
|
324
350
|
/** The footer of a tree: it sums the top level, since a parent holds its children. */
|
|
325
351
|
footerTopLevel: string;
|
|
352
|
+
/** The footer of a server-mode table: its sums come from the server and cover every match, not the page. Read out only. */
|
|
353
|
+
footerOfMatches: string;
|
|
326
354
|
/** The box that selects every row of a group. */
|
|
327
355
|
selectGroup: (name: string) => string;
|
|
328
356
|
/** A group of the week key: "Week 42, 2026". */
|
|
@@ -331,6 +359,12 @@ declare interface Wording {
|
|
|
331
359
|
entries: (count: number, formatted: string) => string;
|
|
332
360
|
/** "3 selected" in the pagination bar and the table toolbar. */
|
|
333
361
|
selectedCount: (count: number, formatted: string) => string;
|
|
362
|
+
/** The first sentence of the offer in a server-mode table, once the page is ticked: "All 50 on this page are selected." */
|
|
363
|
+
selectedOnPage: (count: number, formatted: string) => string;
|
|
364
|
+
/** The button after it, for the rows the server holds: "Select all 12,400 that match". */
|
|
365
|
+
selectAllMatching: (count: number, formatted: string) => string;
|
|
366
|
+
/** The line once they are selected: "All 12,400 that match are selected." */
|
|
367
|
+
allMatchingSelected: (count: number, formatted: string) => string;
|
|
334
368
|
/** Said to a screen reader after Ctrl+C copied rows: "3 rows copied". */
|
|
335
369
|
copiedRows: (count: number, formatted: string) => string;
|
|
336
370
|
/** Said after Ctrl+C copied the active cell of a grid. */
|
|
@@ -362,6 +396,8 @@ declare interface Wording {
|
|
|
362
396
|
rangeInvalid: string;
|
|
363
397
|
/** Clears search and conditions - in the table toolbar and in the empty body. */
|
|
364
398
|
resetAll: string;
|
|
399
|
+
/** The button under a server-mode table's error that sends the request once more. */
|
|
400
|
+
tryAgain: string;
|
|
365
401
|
/** "43 of 1.204" - the numbers come from the formats. */
|
|
366
402
|
filteredOfTotal: (matches: string, total: string) => string;
|
|
367
403
|
/** The four outcomes of an assessment, as a word beside the value. Colour
|
|
@@ -384,6 +420,12 @@ declare interface Wording {
|
|
|
384
420
|
freshnessFresh: string;
|
|
385
421
|
freshnessStale: string;
|
|
386
422
|
freshnessDisconnected: string;
|
|
423
|
+
/** The three quality levels (ADR-0077) - the THIRD axis, beside the verdict
|
|
424
|
+
and the freshness: how far the value's source vouches for it. A bad value
|
|
425
|
+
keeps its verdict and its age. */
|
|
426
|
+
qualityGood: string;
|
|
427
|
+
qualityUncertain: string;
|
|
428
|
+
qualityBad: string;
|
|
387
429
|
/** "As of: 3 minutes ago", where the duration comes from the formats. */
|
|
388
430
|
asOfAgo: (duration: string) => string;
|
|
389
431
|
close: string;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
function O(n, e, i) {
|
|
2
|
+
if (i === "percent") return n.percent(e);
|
|
3
|
+
if (i === "count") return n.count(e);
|
|
4
|
+
if (i === void 0) return n.number(e);
|
|
5
|
+
const { decimals: r, ...a } = i;
|
|
6
|
+
return Object.keys(a).length === 0 ? n.number(e, r) : n.numberWith(
|
|
7
|
+
e,
|
|
8
|
+
r === void 0 ? a : { minimumFractionDigits: r, maximumFractionDigits: r, ...a }
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
const w = 10, E = [
|
|
12
|
+
["day", 86400],
|
|
13
|
+
["hour", 3600],
|
|
14
|
+
["minute", 60]
|
|
15
|
+
];
|
|
16
|
+
function A(n, e) {
|
|
17
|
+
const i = `${n}|${e ?? ""}`;
|
|
18
|
+
let r = T.get(i);
|
|
19
|
+
if (!r) {
|
|
20
|
+
r = l(n, e), T.set(i, r);
|
|
21
|
+
for (const a of M) L.add(r[a]);
|
|
22
|
+
}
|
|
23
|
+
return r;
|
|
24
|
+
}
|
|
25
|
+
const T = /* @__PURE__ */ new Map(), L = /* @__PURE__ */ new WeakSet(), M = ["date", "dateShort", "month", "dateLong", "time", "dateTime", "offset", "timeZoneName"];
|
|
26
|
+
function l(n, e) {
|
|
27
|
+
const i = new Intl.DateTimeFormat(n, { timeZone: e, day: "2-digit", month: "2-digit", year: "numeric" }), r = new Intl.DateTimeFormat(n, { timeZone: e, day: "2-digit", month: "2-digit" }), a = new Intl.DateTimeFormat(n, { timeZone: e, month: "long", year: "numeric" }), I = new Intl.DateTimeFormat(n, { month: "long" }), D = new Intl.DateTimeFormat(n, {
|
|
28
|
+
timeZone: e,
|
|
29
|
+
weekday: "long",
|
|
30
|
+
day: "numeric",
|
|
31
|
+
month: "long",
|
|
32
|
+
year: "numeric"
|
|
33
|
+
}), c = { timeZone: e, hour: "2-digit", minute: "2-digit", hour12: !1, hourCycle: "h23" }, f = {
|
|
34
|
+
without: new Intl.DateTimeFormat(n, c),
|
|
35
|
+
with: new Intl.DateTimeFormat(n, { ...c, second: "2-digit" })
|
|
36
|
+
}, d = {
|
|
37
|
+
without: new Intl.DateTimeFormat(n, { day: "2-digit", month: "2-digit", year: "numeric", ...c }),
|
|
38
|
+
with: new Intl.DateTimeFormat(n, {
|
|
39
|
+
day: "2-digit",
|
|
40
|
+
month: "2-digit",
|
|
41
|
+
year: "numeric",
|
|
42
|
+
...c,
|
|
43
|
+
second: "2-digit"
|
|
44
|
+
})
|
|
45
|
+
}, y = new Intl.DateTimeFormat(n, { timeZone: e, timeZoneName: "shortOffset" }), N = new Intl.DateTimeFormat(n, { timeZone: e, timeZoneName: "shortGeneric" }), F = /* @__PURE__ */ new Map(), u = { signDisplay: "negative" }, h = /* @__PURE__ */ new Map(), b = new Intl.NumberFormat(n, { ...u, notation: "scientific", maximumSignificantDigits: 10 }), p = new Intl.NumberFormat(n, u), S = new Intl.NumberFormat(n, { ...u, style: "percent", maximumFractionDigits: 0 }), v = new Intl.Collator(n), g = new Intl.RelativeTimeFormat(n, { numeric: "auto" });
|
|
46
|
+
return {
|
|
47
|
+
locale: n,
|
|
48
|
+
timeZone: e,
|
|
49
|
+
timeZoneName: (t) => N.formatToParts(t).find((o) => o.type === "timeZoneName")?.value ?? "",
|
|
50
|
+
date: (t) => i.format(t),
|
|
51
|
+
dateShort: (t) => r.format(t),
|
|
52
|
+
month: (t) => a.format(t),
|
|
53
|
+
monthName: (t) => I.format(t),
|
|
54
|
+
dateLong: (t) => D.format(t),
|
|
55
|
+
time: (t, o) => (o ? f.with : f.without).format(t),
|
|
56
|
+
dateTime: (t, o) => (o ? d.with : d.without).format(t),
|
|
57
|
+
offset: (t) => y.formatToParts(t).find((o) => o.type === "timeZoneName")?.value ?? "",
|
|
58
|
+
number: (t, o) => {
|
|
59
|
+
if (o === void 0 && t !== 0 && Math.abs(t) < 0.5 * 10 ** -w) return b.format(t);
|
|
60
|
+
let m = F.get(o);
|
|
61
|
+
return m || (m = new Intl.NumberFormat(n, {
|
|
62
|
+
...u,
|
|
63
|
+
minimumFractionDigits: o,
|
|
64
|
+
maximumFractionDigits: o ?? w
|
|
65
|
+
}), F.set(o, m)), m.format(t);
|
|
66
|
+
},
|
|
67
|
+
numberWith: (t, o) => {
|
|
68
|
+
const m = JSON.stringify(o);
|
|
69
|
+
let s = h.get(m);
|
|
70
|
+
return s || (s = new Intl.NumberFormat(n, { ...u, ...o }), h.set(m, s)), s.format(t);
|
|
71
|
+
},
|
|
72
|
+
count: (t) => p.format(t),
|
|
73
|
+
percent: (t) => S.format(t),
|
|
74
|
+
compareText: (t, o) => v.compare(t, o),
|
|
75
|
+
relative: (t) => {
|
|
76
|
+
const o = Math.max(0, Math.round(t / 1e3));
|
|
77
|
+
for (const [m, s] of E)
|
|
78
|
+
if (o >= s) return g.format(-Math.floor(o / s), m);
|
|
79
|
+
return g.format(-o, "second");
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
const x = /* @__PURE__ */ A("en-GB");
|
|
84
|
+
function k(n) {
|
|
85
|
+
const e = [...n.number(1234.5, 1).replace(/[\d-]/g, "")], i = e[e.length - 1] ?? ".";
|
|
86
|
+
return { group: e.length > 1 ? e[0] : "", decimal: i };
|
|
87
|
+
}
|
|
88
|
+
const R = /* @__PURE__ */ k(x);
|
|
89
|
+
export {
|
|
90
|
+
x as D,
|
|
91
|
+
M as I,
|
|
92
|
+
R as a,
|
|
93
|
+
L as b,
|
|
94
|
+
A as f,
|
|
95
|
+
k as s,
|
|
96
|
+
O as w
|
|
97
|
+
};
|