@umriss-ui/core 0.2.0 → 0.3.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 +76 -0
- package/README.md +15 -4
- package/dist/core.js +2282 -2278
- package/dist/de.d.ts +67 -0
- package/dist/formats-DrB9TuzO.js +65 -0
- package/dist/index.d.ts +89 -9
- package/dist/wording/de.js +18 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -50,6 +50,82 @@ module on the caller's side that carries `"use client"` and imports from there.
|
|
|
50
50
|
|
|
51
51
|
---
|
|
52
52
|
|
|
53
|
+
## 0.3.1 – The README catches up (Sep. 2026)
|
|
54
|
+
|
|
55
|
+
Nothing in the code changed. The README that shipped with `0.3.0` still said
|
|
56
|
+
the formats default to German notation, and so did the line on `NumberInput`;
|
|
57
|
+
both describe ADR-0024 now, with the import that takes `GERMAN_FORMATS` beside
|
|
58
|
+
`GERMAN_WORDING`.
|
|
59
|
+
|
|
60
|
+
The `0.3.0` entry below listed `formatsFor(locale)` as added. It is not
|
|
61
|
+
exported — it builds `DEFAULT_FORMATS` and `GERMAN_FORMATS` inside the package
|
|
62
|
+
and nothing else — and the entry is gone.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 0.3.0 – English formats, and the context menu (Sep. 2026)
|
|
67
|
+
|
|
68
|
+
### Changed
|
|
69
|
+
|
|
70
|
+
- **The formats are English.** `DEFAULT_FORMATS` writes `en-GB` on a 24-hour
|
|
71
|
+
clock: `17/03/2026`, `09:05`, `1,234.5`, `74%`, "3 minutes ago", and English
|
|
72
|
+
collation. Until now it wrote `de-DE` whatever the wording said (ADR-0024;
|
|
73
|
+
ADR-0019 left this decision open on purpose).
|
|
74
|
+
- **German ships as a pair.** `GERMAN_FORMATS` stands beside `GERMAN_WORDING`
|
|
75
|
+
behind `@umriss-ui/core/wording/de`, so a German application takes both
|
|
76
|
+
halves of its language in one import:
|
|
77
|
+
`language={{ wording: GERMAN_WORDING, formats: GERMAN_FORMATS }}`. An
|
|
78
|
+
application that hands in the wording alone now gets German words over
|
|
79
|
+
English notation - which is what the library shipped before, and why the
|
|
80
|
+
decision was made.
|
|
81
|
+
- **`NumberInput` reads the notation it writes.** Its parser no longer assumes
|
|
82
|
+
a German dot and comma; the separators are measured off the formats
|
|
83
|
+
(`separatorsOf`), so a field under any notation - including one an
|
|
84
|
+
application replaced - reads its own output back. `parseNumber` and
|
|
85
|
+
`filterInput` take the separators as a last argument, defaulting to the
|
|
86
|
+
default notation.
|
|
87
|
+
- **What did not move:** the CSV export of `@umriss-ui/table` keeps its decimal
|
|
88
|
+
comma and its semicolon (a machine format for a spreadsheet, argued at its
|
|
89
|
+
site), and the German test fixtures that measure a property *of* German stay
|
|
90
|
+
German.
|
|
91
|
+
|
|
92
|
+
### Added
|
|
93
|
+
|
|
94
|
+
- **`separatorsOf(formats)`** and `DEFAULT_SEPARATORS`: the group and decimal
|
|
95
|
+
separator a notation writes, measured rather than declared.
|
|
96
|
+
- **Three wording entries for `@umriss-ui/schedule`'s lane groups**:
|
|
97
|
+
`scheduleFoldGroup`, `scheduleUnfoldGroup` and `scheduleLaneCount(count)`,
|
|
98
|
+
in English and in `GERMAN_WORDING`. An application that supplies a complete
|
|
99
|
+
`Wording` of its own gains three required entries — which the type says, at
|
|
100
|
+
compile time, as it is meant to (ADR-0019).
|
|
101
|
+
|
|
102
|
+
### Released together
|
|
103
|
+
|
|
104
|
+
`@umriss-ui/core` was already on `latest`; `@umriss-ui/charts`,
|
|
105
|
+
`@umriss-ui/table` and `@umriss-ui/schedule` join it with this delivery, and
|
|
106
|
+
the four are released together: the schedule stands on core and charts, and the
|
|
107
|
+
table's candidate peered on `^0.2.0` and would have refused this core.
|
|
108
|
+
|
|
109
|
+
## The context menu (Sep. 2026)
|
|
110
|
+
|
|
111
|
+
From `.scratch/schedule/spec.md`, ticket 01, and
|
|
112
|
+
`.scratch/schedule-refinement/spec.md`, ticket 03.
|
|
113
|
+
|
|
114
|
+
### Added
|
|
115
|
+
|
|
116
|
+
- **`ContextMenu`** — the menu opened at a point instead of under a trigger, for
|
|
117
|
+
a right-click on a surface that is not a button. Controlled (`open`,
|
|
118
|
+
`onOpenChange`, `position` in client coordinates, `ariaLabel`), built on
|
|
119
|
+
`Popover`, with `MenuItem`, `MenuSeparator` and the menu's keyboard. The focus
|
|
120
|
+
returns to where it stood when the menu opened.
|
|
121
|
+
- **Wording:** `scheduleLaneRefused`, `scheduleOverlap`, `scheduleLateTransport`,
|
|
122
|
+
`scheduleGhostTimes`, `scheduleSetup`, `scheduleTeardown`,
|
|
123
|
+
`scheduleTransport`, `scheduleRoute`, `scheduleOverlapWith` and
|
|
124
|
+
`scheduleLateBy`, for `@umriss-ui/schedule`, in both shipped wordings. An
|
|
125
|
+
application that hands in a whole `Wording` object of its own adds the nine.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
53
129
|
## 0.2.0 – Styles that load themselves, and touch nothing else (Sep. 2026)
|
|
54
130
|
|
|
55
131
|
Delivery report for `.scratch/styles-without-side-effects/spec.md` (ADR-0021).
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Guiding idea: **precise and quiet, with palpable quality** – depth comes from
|
|
|
5
5
|
soft shadows and fine light edges, not from hard outlines or effects.
|
|
6
6
|
|
|
7
7
|
The design language — "Ink & Paper", the dark theme, motion — is written down
|
|
8
|
-
once for all
|
|
8
|
+
once for all four packages in [`../../docs/design-language.md`](../../docs/design-language.md).
|
|
9
9
|
|
|
10
10
|
## Use
|
|
11
11
|
|
|
@@ -82,8 +82,18 @@ import { GERMAN_WORDING } from "@umriss-ui/core/wording/de";
|
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
Both objects are typed `Wording`, so a missing entry is a compile error rather
|
|
85
|
-
than a gap that shows up in the interface (ADR-0018, ADR-0019).
|
|
86
|
-
|
|
85
|
+
than a gap that shows up in the interface (ADR-0018, ADR-0019).
|
|
86
|
+
|
|
87
|
+
The formats — dates, numbers, durations — are a seam of their own. The default
|
|
88
|
+
is English notation on a 24-hour clock (`17/03/2026`, `09:05`, `1,234.5`), and
|
|
89
|
+
the same subpath ships `GERMAN_FORMATS` beside the German wording, so a German
|
|
90
|
+
application takes both halves of its language in one import (ADR-0024):
|
|
91
|
+
|
|
92
|
+
```tsx
|
|
93
|
+
import { GERMAN_FORMATS, GERMAN_WORDING } from "@umriss-ui/core/wording/de";
|
|
94
|
+
|
|
95
|
+
<UmrissProvider language={{ wording: GERMAN_WORDING, formats: GERMAN_FORMATS }}>…</UmrissProvider>;
|
|
96
|
+
```
|
|
87
97
|
|
|
88
98
|
## Components
|
|
89
99
|
|
|
@@ -110,6 +120,7 @@ The table and the alarm list are not part of this package. They live in
|
|
|
110
120
|
| `ConfirmDialog` | a compact confirmation dialog, `tone="danger"` for destructive actions, loading state |
|
|
111
121
|
| `ToastProvider` / `useToast` | stacked status messages at the bottom right, four tones, auto-dismiss, `aria-live` |
|
|
112
122
|
| `Menu` / `MenuItem` / `MenuSeparator` | a dropdown menu with a portal panel, arrow-key navigation, `tone="danger"` |
|
|
123
|
+
| `ContextMenu` | the same menu opened at a point in the viewport - for a right-click on a surface that is not a button; controlled, focus returns to where it was |
|
|
113
124
|
| `Tooltip` | help text on hover and keyboard focus, inverted (ink surface), portal |
|
|
114
125
|
| `Tabs` / `TabList` / `Tab` / `TabPanel` | controlled tabs with an ink underline and arrow-key control |
|
|
115
126
|
| `Skeleton` | a loading placeholder (bar or circle) with a discreet pulse |
|
|
@@ -121,7 +132,7 @@ The table and the alarm list are not part of this package. They live in
|
|
|
121
132
|
| `MultiSelect` | multiple selection: the field always stays on one line and measures the space (as many chips as fit, the rest as "+N"); chips are remove buttons (hover shows ×, a click deletes, backspace deletes the last, roving tabindex with arrow keys), and the "+N" counter opens the selected view directly; a panel with a search field (autofocus, Enter toggles the first hit), a view switch "all \| selected (N)" (the list always in natural order, deselected rows stay visible in the selected view until the view changes), and all/none/invert acting on the filtered set of the active view |
|
|
122
133
|
| `Card` / `CardHeader` / `CardBody` | panels with an eyebrow, actions, optionally collapsible; `flush` for borderless tables; a dividing line under the head only through `divider` (for borderless data) – otherwise white space carries the hierarchy |
|
|
123
134
|
| `Badge` | a status label with a dot, five tones; slightly rounded by default, `pill` for counters |
|
|
124
|
-
| `NumberInput` | numeric input in the notation the formats seam provides
|
|
135
|
+
| `NumberInput` | numeric input in the notation the formats seam provides (group separators on leaving the field; it reads back what it writes, whatever the notation), `decimals` (0 = whole numbers), `min`/`max`, arrow keys with Shift ×10, an integrated spinner column at the right inner edge, `prefix`/`suffix` adornments (€, %) |
|
|
125
136
|
| `Meter` | a narrow fill bar (0–1) with a mono percentage label, five tones – for utilisation in cells; `label` names what is being measured |
|
|
126
137
|
| `UmrissProvider` | one place to set things: density, portal target, toasts, language. **Optional** – without it everything behaves as it does unconfigured. It holds no theme (light and dark are the application's `color-scheme`) and writes nothing onto the document |
|
|
127
138
|
| `LanguageProvider` / `useFormats` / `useWording` | formatting and wording as an overridable seam; the wording is a directory of entries, not a translation call. English is the default, German ships as `@umriss-ui/core/wording/de` |
|