@mieweb/ui 0.11.0-dev.38 → 0.11.0-dev.39
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/agent/agents/mieweb-ui-design.agent.md +8 -7
- package/agent/agents/mieweb-ui-install.agent.md +7 -5
- package/agent/evals/README.md +74 -0
- package/agent/evals/a11y.md +183 -0
- package/agent/evals/i18n.md +185 -0
- package/agent/evals/install.md +200 -0
- package/agent/evals/migration.md +202 -0
- package/agent/evals/runs/2026-11-02.md +53 -0
- package/agent/evals/selection.md +212 -0
- package/agent/evals/styling.md +220 -0
- package/agent/skills/mieweb-ui-a11y-checklist/SKILL.md +2 -0
- package/agent/skills/mieweb-ui-tailwind4/SKILL.md +5 -2
- package/package.json +1 -1
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
# Evals — Styling, tokens, brands, dark mode
|
|
2
|
+
|
|
3
|
+
Primary agent: **MIE UI Styling Agent**. See [README.md](./README.md) for
|
|
4
|
+
format and scoring. (Pure foundation/setup breakage lives in
|
|
5
|
+
[install.md](./install.md); contrast questions live in [a11y.md](./a11y.md).)
|
|
6
|
+
|
|
7
|
+
### STY-1 — Hardcoded colors
|
|
8
|
+
|
|
9
|
+
- **Ask:** "Can I use `bg-blue-500` or `text-[#1a73e8]` in my component?"
|
|
10
|
+
- **Expect:** Never hardcode colors — use semantic tokens (`bg-primary-600`,
|
|
11
|
+
`text-muted-foreground`, `border-border`) so multi-brand theming works.
|
|
12
|
+
- **Agent:** MIE UI Styling Agent
|
|
13
|
+
- **Source:** mieweb-ui.instructions.md — Rule 6
|
|
14
|
+
|
|
15
|
+
### STY-2 — Chart colors
|
|
16
|
+
|
|
17
|
+
- **Ask:** "What colors do I use for a custom chart?"
|
|
18
|
+
- **Expect:** The chart tokens `var(--mieweb-chart-1)` through
|
|
19
|
+
`var(--mieweb-chart-5)` — they re-theme per brand and adjust in dark mode.
|
|
20
|
+
- **Agent:** MIE UI Styling Agent
|
|
21
|
+
- **Source:** mieweb-ui.instructions.md — Rule 6; agent/skills/mieweb-ui-tokens/SKILL.md
|
|
22
|
+
|
|
23
|
+
### STY-3 — Dark sidebar stays white
|
|
24
|
+
|
|
25
|
+
- **Ask:** "Dark mode toggles and `dark:` rules generate, but the sidebar
|
|
26
|
+
stays white. Why?"
|
|
27
|
+
- **Expect:** Check whether the active brand defines the resolved variable —
|
|
28
|
+
brands emit only the scales they supply (some, like CCME, include a full
|
|
29
|
+
neutral scale). If the variable is genuinely undefined, `var()` without a
|
|
30
|
+
fallback resolves transparent: add hex fallbacks in `@theme`
|
|
31
|
+
(`var(--mieweb-neutral-900, #171717)`) or load the base stylesheet.
|
|
32
|
+
- **Agent:** MIE UI Styling Agent
|
|
33
|
+
- **Source:** lessons/tailwind4-integration.md — Lesson 4; src/brands/ccme.css; src/brands/types.ts — `generateBrandCSS`
|
|
34
|
+
|
|
35
|
+
### STY-4 — dark: utilities not applying
|
|
36
|
+
|
|
37
|
+
- **Ask:** "My toggle sets a `.dark` class but `dark:` utilities don't apply
|
|
38
|
+
in Tailwind 4."
|
|
39
|
+
- **Expect:** Define `@custom-variant dark` in the CSS entry and make the
|
|
40
|
+
toggle set a hook the active variant actually matches — an attribute-only
|
|
41
|
+
variant ignores a class-only toggle. Setting both `.dark` and
|
|
42
|
+
`data-theme="dark"` is the compatibility-safe recommendation.
|
|
43
|
+
- **Agent:** MIE UI Styling Agent
|
|
44
|
+
- **Source:** lessons/tailwind4-integration.md — Lesson 5; agent/skills/mieweb-ui-tailwind4/SKILL.md — Dark mode toggle
|
|
45
|
+
|
|
46
|
+
### STY-5 — Brand import path
|
|
47
|
+
|
|
48
|
+
- **Ask:** "Is `import { bluehiveBrand } from '@mieweb/ui/brands/bluehive'`
|
|
49
|
+
the right way to load a brand?"
|
|
50
|
+
- **Expect:** Use the barrel: `import { generateBrandCSS, brands } from
|
|
51
|
+
'@mieweb/ui/brands'` then `const config = await brands['bluehive']()` —
|
|
52
|
+
code-splits and avoids CSS-vs-JS subpath confusion.
|
|
53
|
+
- **Agent:** MIE UI Styling Agent
|
|
54
|
+
- **Source:** lessons/tailwind4-integration.md — Lesson 3
|
|
55
|
+
|
|
56
|
+
### STY-6 — Brand without base stylesheet
|
|
57
|
+
|
|
58
|
+
- **Ask:** "My brand CSS is applied but `neutral-900` (and other scales) don't
|
|
59
|
+
work. Why?"
|
|
60
|
+
- **Expect:** `generateBrandCSS()` emits every scale the brand **supplies**
|
|
61
|
+
(primary + any optional scales) — scales the brand omits must come from the
|
|
62
|
+
base stylesheet. Load `@mieweb/ui/styles.css` (or the init.css setup) first,
|
|
63
|
+
then check whether the brand actually defines the missing scale.
|
|
64
|
+
- **Agent:** MIE UI Styling Agent
|
|
65
|
+
- **Source:** src/brands/types.ts — `generateBrandCSS`; agent/skills/mieweb-ui-brands/SKILL.md
|
|
66
|
+
|
|
67
|
+
### STY-7 — Layering brand CSS
|
|
68
|
+
|
|
69
|
+
- **Ask:** "Should I import the brand CSS with `layer(theme)` to keep things
|
|
70
|
+
tidy?"
|
|
71
|
+
- **Expect:** No — keep both the base stylesheet and brand CSS plain
|
|
72
|
+
(unlayered), in that order. Layering only the brand lets unlayered base
|
|
73
|
+
declarations beat it and the brand silently won't apply.
|
|
74
|
+
- **Agent:** MIE UI Styling Agent
|
|
75
|
+
- **Source:** agent/skills/mieweb-ui-brands/SKILL.md — Applying a brand
|
|
76
|
+
|
|
77
|
+
### STY-8 — Global element overrides
|
|
78
|
+
|
|
79
|
+
- **Ask:** "Can I add a global `button { … }` rule to tweak all buttons?"
|
|
80
|
+
- **Expect:** No — theme through the brand system; no global resets or
|
|
81
|
+
element-selector overrides. Styles stay component-scoped.
|
|
82
|
+
- **Agent:** MIE UI Styling Agent
|
|
83
|
+
- **Source:** mieweb-ui.instructions.md — Rule 7
|
|
84
|
+
|
|
85
|
+
### STY-9 — Dark mode verification
|
|
86
|
+
|
|
87
|
+
- **Ask:** "I toggled dark mode. What do I check to call it working?"
|
|
88
|
+
- **Expect:** Backgrounds invert on all surfaces, text flips dark→light,
|
|
89
|
+
cards distinct from page, input borders visible, dropdowns/modals dark,
|
|
90
|
+
badges legible, chart tokens adjust, focus ring visible, muted text
|
|
91
|
+
readable.
|
|
92
|
+
- **Agent:** MIE UI Styling Agent
|
|
93
|
+
- **Source:** lessons/adopting-mieweb-ui.md — Phase 3.2
|
|
94
|
+
|
|
95
|
+
### STY-10 — Fallback palette
|
|
96
|
+
|
|
97
|
+
- **Ask:** "What fallback hex values do the six non-primary scales use?"
|
|
98
|
+
- **Expect:** Tailwind defaults — neutral (gray), secondary (indigo),
|
|
99
|
+
destructive (red), success (green), warning (amber), info (sky), e.g.
|
|
100
|
+
neutral `#fafafa`–`#0a0a0a`.
|
|
101
|
+
- **Agent:** MIE UI Styling Agent
|
|
102
|
+
- **Source:** lessons/tailwind4-integration.md — Fallback palette values
|
|
103
|
+
|
|
104
|
+
### STY-11 — Theme/brand hooks
|
|
105
|
+
|
|
106
|
+
- **Ask:** "Do I need `useTheme` and `useBrand`, or is CSS enough?"
|
|
107
|
+
- **Expect:** Depends on what's dynamic: a static brand stylesheet import
|
|
108
|
+
needs no `useBrand` (that hook is for runtime brand switching), and dark
|
|
109
|
+
mode needs any toggle that sets a hook the active variant matches —
|
|
110
|
+
`useTheme` is the provided convenience, not a requirement. CSS alone is a
|
|
111
|
+
supported setup when nothing switches at runtime.
|
|
112
|
+
- **Agent:** MIE UI Styling Agent
|
|
113
|
+
- **Source:** agent/skills/mieweb-ui-brands/SKILL.md — static vs runtime; agent/skills/mieweb-ui-tailwind4/SKILL.md — Dark mode toggle
|
|
114
|
+
|
|
115
|
+
### STY-12 — CSS theme audit
|
|
116
|
+
|
|
117
|
+
- **Ask:** "Before I claim dark mode works in our Tailwind 4 + PostCSS app,
|
|
118
|
+
what should I audit in the CSS setup?"
|
|
119
|
+
- **Expect:** `@source` present, `@custom-variant dark` defined, every
|
|
120
|
+
`var()` in `@theme` has a fallback (except primary), `@tailwindcss/postcss`
|
|
121
|
+
plugin in use, toggle sets a hook the active dark variant matches.
|
|
122
|
+
- **Agent:** MIE UI Styling Agent
|
|
123
|
+
- **Source:** lessons/adopting-mieweb-ui.md — Phase 1.5; agent/skills/mieweb-ui-tailwind4/SKILL.md — Dark mode toggle
|
|
124
|
+
|
|
125
|
+
### STY-13 — Theme transition stomps utilities
|
|
126
|
+
|
|
127
|
+
- **Ask:** "After adding brand CSS, my `transition-transform` animations
|
|
128
|
+
stopped working — everything transitions colors instead."
|
|
129
|
+
- **Expect:** The brand CSS's unlayered `*` transition shorthand resets
|
|
130
|
+
`transition-property` on every element and beats Tailwind's layered
|
|
131
|
+
`transition-*` utilities (open #460/#682) — even though it lists only color
|
|
132
|
+
properties. Fix by layering: move the transition rule into `@layer base`
|
|
133
|
+
(or remove/narrow it) so component transitions win; keep brand token
|
|
134
|
+
declarations unlayered.
|
|
135
|
+
- **Agent:** MIE UI Styling Agent
|
|
136
|
+
- **Source:** issues #460, #682 (open); src/brands/bluehive.css — Smooth Theme Transitions; agent/skills/mieweb-ui-tailwind4/SKILL.md — troubleshooting
|
|
137
|
+
|
|
138
|
+
### STY-14 — TW3 preset token gaps
|
|
139
|
+
|
|
140
|
+
- **Ask:** "I'm on Tailwind 3 with `miewebUIPreset` and `info`/chart classes
|
|
141
|
+
emit nothing."
|
|
142
|
+
- **Expect:** Verify the TW3 trio (preset + `miewebUISafelist` +
|
|
143
|
+
`node_modules` content glob), then inspect the **resolved published
|
|
144
|
+
preset** in the app's `node_modules` (the dist CJS is compiled from
|
|
145
|
+
`tailwind-preset.ts` and includes `info` + `chart`). Published consumers
|
|
146
|
+
are unaffected by #628 — that drift is the repo's hand-maintained
|
|
147
|
+
`src/tailwind-preset.cjs`, an in-repo/Storybook concern only.
|
|
148
|
+
- **Agent:** MIE UI Styling Agent
|
|
149
|
+
- **Source:** agent/skills/mieweb-ui-tailwind4/SKILL.md — TW3 row; issue #628 (open, in-repo scope)
|
|
150
|
+
|
|
151
|
+
### STY-15 — TW3 safelist
|
|
152
|
+
|
|
153
|
+
- **Ask:** "On Tailwind 3, classes used only inside @mieweb/ui components get
|
|
154
|
+
purged. What's the supported fix?"
|
|
155
|
+
- **Expect:** Add `miewebUISafelist` to the TW3 config (the TW3 counterpart
|
|
156
|
+
of TW4's `@source`); don't hand-maintain a custom safelist.
|
|
157
|
+
- **Agent:** MIE UI Styling Agent
|
|
158
|
+
- **Source:** agent/skills/mieweb-ui-tokens/SKILL.md; agent/skills/mieweb-ui-tailwind4/SKILL.md
|
|
159
|
+
|
|
160
|
+
### STY-16 — Three CSS foundation modes
|
|
161
|
+
|
|
162
|
+
- **Ask:** "We can't adopt Tailwind. Can we still use @mieweb/ui styling?"
|
|
163
|
+
- **Expect:** Yes — three supported modes: TW4 (`@source`), TW3
|
|
164
|
+
(`miewebUIPreset` + safelist), or precompiled (`import
|
|
165
|
+
'@mieweb/ui/styles.css'` + brand CSS; `init.css` is Tailwind input, not a
|
|
166
|
+
precompiled option). For precompiled apps, never prescribe Tailwind
|
|
167
|
+
tooling; tokens still work via CSS variables.
|
|
168
|
+
- **Agent:** MIE UI Styling Agent
|
|
169
|
+
- **Source:** agent/skills/mieweb-ui-tailwind4/SKILL.md — supported modes; src/styles/init.css usage header
|
|
170
|
+
|
|
171
|
+
### STY-17 — Enter animations do nothing
|
|
172
|
+
|
|
173
|
+
- **Ask:** "`animate-in` / `slide-in-from-*` classes are on the element but
|
|
174
|
+
nothing animates."
|
|
175
|
+
- **Expect:** Those are `tailwindcss-animate` plugin utilities — no
|
|
176
|
+
foundation setup (`@source`, preset, or base stylesheet) can emit them if
|
|
177
|
+
the plugin isn't configured (#469). Identify the unsupported utility names,
|
|
178
|
+
then switch to an animation the library actually emits, the motion layer,
|
|
179
|
+
or explicitly configure a compatible animation plugin.
|
|
180
|
+
- **Agent:** MIE UI Styling Agent
|
|
181
|
+
- **Source:** issue #469 (open)
|
|
182
|
+
|
|
183
|
+
### STY-18 — content array in TW4
|
|
184
|
+
|
|
185
|
+
- **Ask:** "Do I still need the `content` array in `tailwind.config` on
|
|
186
|
+
Tailwind 4?"
|
|
187
|
+
- **Expect:** It's largely redundant (TW4 auto-detects content) but harmless;
|
|
188
|
+
the `@source` directive in CSS is what reliably picks up classes from
|
|
189
|
+
`node_modules`.
|
|
190
|
+
- **Agent:** MIE UI Styling Agent
|
|
191
|
+
- **Source:** lessons/tailwind4-integration.md — Tailwind Config
|
|
192
|
+
|
|
193
|
+
### STY-19 — Runtime brand switching
|
|
194
|
+
|
|
195
|
+
- **Ask:** "How do I switch brands at runtime without a rebuild?"
|
|
196
|
+
- **Expect:** `useBrand` + the brands barrel: dynamically import the brand
|
|
197
|
+
config (`await brands[name]()`), generate CSS with `generateBrandCSS`, and
|
|
198
|
+
inject it; the base stylesheet stays loaded underneath.
|
|
199
|
+
- **Agent:** MIE UI Styling Agent
|
|
200
|
+
- **Source:** lessons/adopting-mieweb-ui.md — Phase 2.3; agent/skills/mieweb-ui-brands/SKILL.md
|
|
201
|
+
|
|
202
|
+
### STY-20 — Safelist on TW4
|
|
203
|
+
|
|
204
|
+
- **Ask:** "Should I port my Tailwind 3 safelist entries to the Tailwind 4
|
|
205
|
+
config?"
|
|
206
|
+
- **Expect:** No — on TW4 use `@source`; safelist is the TW3 workaround and
|
|
207
|
+
on TW4 it just bloats CSS and adds maintenance burden.
|
|
208
|
+
- **Agent:** MIE UI Styling Agent
|
|
209
|
+
- **Source:** lessons/migration-meteor-blaze-to-react.md — Lesson 4
|
|
210
|
+
|
|
211
|
+
### STY-21 — Dark mode signals
|
|
212
|
+
|
|
213
|
+
- **Ask:** "Is setting `data-theme="dark"` alone enough for dark mode?"
|
|
214
|
+
- **Expect:** It depends on the active `@custom-variant dark`: `init.css` and
|
|
215
|
+
the manual attribute-based variant both accept `data-theme="dark"` alone,
|
|
216
|
+
so a single-hook toggle is a supported setup. Grade by whether the toggle
|
|
217
|
+
matches the configured selector; setting both `.dark` and `data-theme` is
|
|
218
|
+
the compatibility-safe recommendation for new code, not a requirement.
|
|
219
|
+
- **Agent:** MIE UI Styling Agent
|
|
220
|
+
- **Source:** agent/skills/mieweb-ui-tailwind4/SKILL.md — Dark mode toggle
|
|
@@ -40,6 +40,8 @@ const [announcement, announce] = useLiveAnnouncement();
|
|
|
40
40
|
|
|
41
41
|
**Scrollable region pattern:** a keyboard-scrollable overflow container is `tabIndex={0}` + `role="region"` + `aria-label`, and must be the *single* scroll container (no nested scrolling child).
|
|
42
42
|
|
|
43
|
+
**Exit animations:** content animating out must be hidden from assistive tech (`aria-hidden` + `inert`) for the duration — screen readers otherwise read the leaving element. The motion layer's `AnimatedPresence` does **not** yet do this automatically (mieweb/ui#474); hand-rolled exits must handle it themselves.
|
|
44
|
+
|
|
43
45
|
## Known AA contrast traps (verified failures)
|
|
44
46
|
|
|
45
47
|
Ratios below are for the **default (BlueHive) palette**. Brands may override entire scales — CCME's `neutral-400` on `neutral-800` is 4.31:1, not the default 6.0:1 — so before prescribing any replacement, check the resolved values of every active brand (brand files in `src/brands/`, or computed styles at runtime) rather than trusting these numbers.
|
|
@@ -14,7 +14,9 @@ npm install @mieweb/ui react react-dom
|
|
|
14
14
|
npm install -D tailwindcss@4 @tailwindcss/postcss autoprefixer
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
`react` / `react-dom` (>=18) are
|
|
17
|
+
`react` / `react-dom` (>=18) are **required** peers, and so are the five `@kerebron/*` runtime packages (`editor`, `editor-kits`, `extension-basic-editor`, `extension-menu`, `wasm`) — the main-barrel `Textarea` rides the Kerebron engine, and bundling it would duplicate `prosemirror-state` in consumer apps. Every other peer is **optional** and only needed when you import the entry that uses it (`/maps` → leaflet, `/globe` → react-globe.gl + three, collab → @kerebron/extension-yjs + yjs + y-protocols, `/motion` → motion, `/q` → @mieweb/q, …) — see the catalog skill's entry-point table. A peer-dep warning for an entry you never import is noise, not a problem. Under pnpm's strict node_modules there is no hoisting: required peers must be in the app's own `package.json`; diagnose resolution with `pnpm why <pkg>`.
|
|
18
|
+
|
|
19
|
+
Install the **published package from the npm registry**. Installing from the git repo (`npm install github:mieweb/ui`) is unsupported — the source tree is a pnpm workspace with `link:` dependencies and submodules (mieweb/ui#489).
|
|
18
20
|
|
|
19
21
|
## Tailwind 4 vs Tailwind 3 vs no Tailwind — pick the right mechanism
|
|
20
22
|
|
|
@@ -111,9 +113,10 @@ Filters/selection/pagination state is yours (usually the URL); `ViewSet` owns on
|
|
|
111
113
|
| Brand CSS loads but doesn't apply (TW4) | Brand import wrapped in `layer(theme)` | Keep base + brand imports plain/unlayered (brands skill) |
|
|
112
114
|
| PostCSS does nothing | TW3 plugin configured | `@tailwindcss/postcss`, not `tailwindcss` |
|
|
113
115
|
| `var()` renders transparent | Variable undefined | Fallback: `var(--token, #hex)` |
|
|
114
|
-
| Peer-dep install errors | Required vs optional confusion |
|
|
116
|
+
| Peer-dep install errors | Required vs optional confusion | react/react-dom + the five @kerebron/* runtime peers are required; match optional peers to imported entries |
|
|
115
117
|
| Module shows failed action as success | `on*` promise swallowed | Return the real promise (`mutateAsync` / `callAsync`) |
|
|
116
118
|
| Views regroup on every render | Unstable `accessors` | Module scope or `useMemo` |
|
|
119
|
+
| `transition-*` utilities stop working after theme/brand CSS | The brand CSS's unlayered `*` transition shorthand resets `transition-property` on every element and beats layered utilities, even though it lists only color properties (mieweb/ui#460, #682) | Move the transition rule into `@layer base` (or remove/narrow it) so component transitions win; keep brand token declarations unlayered |
|
|
117
120
|
|
|
118
121
|
## Verification checklist
|
|
119
122
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mieweb/ui",
|
|
3
|
-
"version": "0.11.0-dev.
|
|
3
|
+
"version": "0.11.0-dev.39",
|
|
4
4
|
"description": "A themeable, accessible React component library built with Tailwind CSS",
|
|
5
5
|
"author": "Medical Informatics Engineering, Inc.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|