@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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umriss-ui/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0",
|
|
4
4
|
"description": "React component library for data-dense dashboards and tools - forms, date pickers, overlays, a tree view and a command palette. Precise, quiet, professional.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Roman Händler",
|
package/dist/formats-BccAYWgq.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
function l(n, i, o) {
|
|
2
|
-
if (o === "percent") return n.percent(i);
|
|
3
|
-
if (o === "count") return n.count(i);
|
|
4
|
-
if (o === void 0) return n.number(i);
|
|
5
|
-
const { decimals: a, ...u } = o;
|
|
6
|
-
return Object.keys(u).length === 0 ? n.number(i, a) : n.numberWith(
|
|
7
|
-
i,
|
|
8
|
-
a === void 0 ? u : { minimumFractionDigits: a, maximumFractionDigits: a, ...u }
|
|
9
|
-
);
|
|
10
|
-
}
|
|
11
|
-
const w = 10, b = [
|
|
12
|
-
["day", 86400],
|
|
13
|
-
["hour", 3600],
|
|
14
|
-
["minute", 60]
|
|
15
|
-
];
|
|
16
|
-
function N(n) {
|
|
17
|
-
const i = new Intl.DateTimeFormat(n, { day: "2-digit", month: "2-digit", year: "numeric" }), o = new Intl.DateTimeFormat(n, { day: "2-digit", month: "2-digit" }), a = new Intl.DateTimeFormat(n, { month: "long", year: "numeric" }), u = new Intl.DateTimeFormat(n, {
|
|
18
|
-
weekday: "long",
|
|
19
|
-
day: "numeric",
|
|
20
|
-
month: "long",
|
|
21
|
-
year: "numeric"
|
|
22
|
-
}), c = { hour: "2-digit", minute: "2-digit", hour12: !1, hourCycle: "h23" }, f = {
|
|
23
|
-
without: new Intl.DateTimeFormat(n, c),
|
|
24
|
-
with: new Intl.DateTimeFormat(n, { ...c, second: "2-digit" })
|
|
25
|
-
}, F = {
|
|
26
|
-
without: new Intl.DateTimeFormat(n, { day: "2-digit", month: "2-digit", year: "numeric", ...c }),
|
|
27
|
-
with: new Intl.DateTimeFormat(n, {
|
|
28
|
-
day: "2-digit",
|
|
29
|
-
month: "2-digit",
|
|
30
|
-
year: "numeric",
|
|
31
|
-
...c,
|
|
32
|
-
second: "2-digit"
|
|
33
|
-
})
|
|
34
|
-
}, T = new Intl.DateTimeFormat(n, { timeZoneName: "shortOffset" }), d = /* @__PURE__ */ new Map(), s = { signDisplay: "negative" }, g = /* @__PURE__ */ new Map(), D = new Intl.NumberFormat(n, { ...s, notation: "scientific", maximumSignificantDigits: 10 }), y = new Intl.NumberFormat(n, s), I = new Intl.NumberFormat(n, { ...s, style: "percent", maximumFractionDigits: 0 }), p = new Intl.Collator(n), h = new Intl.RelativeTimeFormat(n, { numeric: "auto" });
|
|
35
|
-
return {
|
|
36
|
-
date: (t) => i.format(t),
|
|
37
|
-
dateShort: (t) => o.format(t),
|
|
38
|
-
month: (t) => a.format(t),
|
|
39
|
-
dateLong: (t) => u.format(t),
|
|
40
|
-
time: (t, e) => (e ? f.with : f.without).format(t),
|
|
41
|
-
dateTime: (t, e) => (e ? F.with : F.without).format(t),
|
|
42
|
-
offset: (t) => T.formatToParts(t).find((e) => e.type === "timeZoneName")?.value ?? "",
|
|
43
|
-
number: (t, e) => {
|
|
44
|
-
if (e === void 0 && t !== 0 && Math.abs(t) < 0.5 * 10 ** -w) return D.format(t);
|
|
45
|
-
let r = d.get(e);
|
|
46
|
-
return r || (r = new Intl.NumberFormat(n, {
|
|
47
|
-
...s,
|
|
48
|
-
minimumFractionDigits: e,
|
|
49
|
-
maximumFractionDigits: e ?? w
|
|
50
|
-
}), d.set(e, r)), r.format(t);
|
|
51
|
-
},
|
|
52
|
-
numberWith: (t, e) => {
|
|
53
|
-
const r = JSON.stringify(e);
|
|
54
|
-
let m = g.get(r);
|
|
55
|
-
return m || (m = new Intl.NumberFormat(n, { ...s, ...e }), g.set(r, m)), m.format(t);
|
|
56
|
-
},
|
|
57
|
-
count: (t) => y.format(t),
|
|
58
|
-
percent: (t) => I.format(t),
|
|
59
|
-
compareText: (t, e) => p.compare(t, e),
|
|
60
|
-
relative: (t) => {
|
|
61
|
-
const e = Math.max(0, Math.round(t / 1e3));
|
|
62
|
-
for (const [r, m] of b)
|
|
63
|
-
if (e >= m) return h.format(-Math.floor(e / m), r);
|
|
64
|
-
return h.format(-e, "second");
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
const S = N("en-GB");
|
|
69
|
-
function v(n) {
|
|
70
|
-
const i = [...n.number(1234.5, 1).replace(/[\d-]/g, "")], o = i[i.length - 1] ?? ".";
|
|
71
|
-
return { group: i.length > 1 ? i[0] : "", decimal: o };
|
|
72
|
-
}
|
|
73
|
-
const A = v(S);
|
|
74
|
-
export {
|
|
75
|
-
S as D,
|
|
76
|
-
A as a,
|
|
77
|
-
N as f,
|
|
78
|
-
v as s,
|
|
79
|
-
l as w
|
|
80
|
-
};
|