@xenide-io/the-old-ui-theme 0.7.0 → 0.9.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/README.md +9 -10
- package/dist/{Chip-Cq3AiAji.d.mts → Chip-BzuNgJIa.d.mts} +81 -23
- package/dist/{Chip-Cq3AiAji.d.ts → Chip-BzuNgJIa.d.ts} +81 -23
- package/dist/{ai-message-blocknote-WABTHFY7.mjs → ai-message-blocknote-D4Z6DUCJ.mjs} +9 -3
- package/dist/chunk-2EO5VCXP.mjs +3912 -0
- package/dist/chunk-APKRZQRO.mjs +251 -0
- package/dist/chunk-BS7BZI5W.mjs +19 -0
- package/dist/chunk-IULORI3A.mjs +8 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +997 -576
- package/dist/index.mjs +49 -45
- package/dist/suite.d.mts +157 -55
- package/dist/suite.d.ts +157 -55
- package/dist/suite.js +4249 -801
- package/dist/suite.mjs +2578 -594
- package/dist/theme-boot-P-oqKVZF.d.mts +74 -0
- package/dist/theme-boot-P-oqKVZF.d.ts +74 -0
- package/dist/theme-boot.d.mts +2 -0
- package/dist/theme-boot.d.ts +2 -0
- package/dist/theme-boot.js +44 -0
- package/dist/theme-boot.mjs +8 -0
- package/dist/ui.d.mts +5 -29
- package/dist/ui.d.ts +5 -29
- package/dist/ui.js +647 -352
- package/dist/ui.mjs +10 -12
- package/docs/README.md +34 -0
- package/docs/ai-quick-reference.md +56 -0
- package/docs/component-library-improvement-plan.md +751 -0
- package/docs/component-reference.md +81 -0
- package/docs/components.md +48 -0
- package/docs/demos.md +19 -0
- package/docs/installation.md +117 -0
- package/docs/suite-audit.md +34 -0
- package/docs/theme-token-reference.md +67 -0
- package/docs/themes.md +164 -0
- package/package.json +22 -21
- package/public/fonts/OpenRunde-Bold.woff2 +0 -0
- package/public/fonts/OpenRunde-Medium.woff2 +0 -0
- package/public/fonts/OpenRunde-Regular.woff2 +0 -0
- package/public/fonts/OpenRunde-Semibold.woff2 +0 -0
- package/scripts/package-smoke.mjs +43 -0
- package/src/app/globals.css +2 -1
- package/src/components/ui/Accordion.tsx +20 -6
- package/src/components/ui/Avatar.tsx +5 -3
- package/src/components/ui/Calendar.tsx +187 -63
- package/src/components/ui/Card.test.tsx +38 -0
- package/src/components/ui/Card.tsx +77 -14
- package/src/components/ui/CollapsibleSection.tsx +12 -4
- package/src/components/ui/CommandPalette.test.tsx +91 -4
- package/src/components/ui/CommandPalette.tsx +138 -128
- package/src/components/ui/EmptyState.tsx +2 -2
- package/src/components/ui/FormField.tsx +1 -1
- package/src/components/ui/Input.tsx +42 -18
- package/src/components/ui/Kbd.tsx +18 -3
- package/src/components/ui/Modal.tsx +3 -1
- package/src/components/ui/Progress.tsx +14 -5
- package/src/components/ui/SegmentedControl.tsx +2 -2
- package/src/components/ui/SettingsLayout.tsx +1 -1
- package/src/components/ui/Stat.tsx +3 -2
- package/src/components/ui/Table.tsx +8 -3
- package/src/components/ui/Tooltip.test.tsx +70 -1
- package/src/components/ui/Tooltip.tsx +53 -29
- package/src/components/ui/Typography.tsx +103 -49
- package/src/components/ui/avatar-stat.test.tsx +23 -0
- package/src/components/ui/calendar.test.tsx +88 -0
- package/src/components/ui/disclosure.test.tsx +39 -0
- package/src/components/ui/index.ts +44 -6
- package/src/components/ui/progress.test.tsx +15 -0
- package/src/components/ui/typography.test.tsx +26 -1
- package/src/styles/suite-skin.css +8 -2
- package/src/styles/themes.css +184 -68
- package/src/suite/components/ai-message-blocknote.tsx +13 -2
- package/src/suite/components/ai-panel.tsx +41 -10
- package/src/suite/components/app-switcher.test.tsx +21 -6
- package/src/suite/components/app-switcher.tsx +7 -11
- package/src/suite/components/suite-app-layout.tsx +12 -3
- package/src/suite/components/suite-bottom-nav.tsx +0 -1
- package/src/suite/components/suite-clients-projects-directory.test.tsx +71 -0
- package/src/suite/components/suite-clients-projects-directory.tsx +943 -0
- package/src/suite/components/suite-integration-picker.test.tsx +224 -0
- package/src/suite/components/suite-integration-picker.tsx +939 -0
- package/src/suite/components/suite-integration-rules.test.tsx +157 -0
- package/src/suite/components/suite-integration-rules.tsx +471 -0
- package/src/suite/components/suite-mobile-drawer.test.tsx +18 -2
- package/src/suite/components/suite-mobile-drawer.tsx +65 -98
- package/src/suite/components/suite-notification-bell.tsx +29 -4
- package/src/suite/components/suite-sidebar.tsx +25 -25
- package/src/suite/components/suite-skeleton.tsx +2 -2
- package/src/suite/components/suite-user-menu.tsx +9 -8
- package/src/suite/components/theme-provider.test.tsx +87 -3
- package/src/suite/components/theme-provider.tsx +144 -23
- package/src/suite/components/today-ui.tsx +79 -68
- package/src/suite/components/workspace-switcher.test.tsx +56 -0
- package/src/suite/components/workspace-switcher.tsx +3 -3
- package/src/suite/icons/app-accents.ts +12 -12
- package/src/suite/icons/glyphs.ts +6 -12
- package/src/suite/index.ts +27 -0
- package/src/suite/lib/apps.test.ts +9 -1
- package/src/suite/lib/apps.ts +14 -8
- package/src/suite/lib/cookies.ts +53 -0
- package/src/suite/lib/theme-boot.ts +32 -0
- package/src/suite/lib/theme-cookie.ts +7 -0
- package/src/suite/lib/use-sidebar-width.ts +5 -51
- package/dist/chunk-KDR6HI6F.mjs +0 -1075
- package/dist/chunk-NOI42JNZ.mjs +0 -151
- package/dist/chunk-VXISSXTB.mjs +0 -2564
- package/src/suite/lib/use-lock-mobile-page-zoom.test.tsx +0 -65
- package/src/suite/lib/use-lock-mobile-page-zoom.ts +0 -51
|
@@ -0,0 +1,751 @@
|
|
|
1
|
+
# Component Library Improvement Plan
|
|
2
|
+
|
|
3
|
+
## Executive summary
|
|
4
|
+
|
|
5
|
+
The Old UI should not stop looking PostHog-ish. Its strongest assets are already the parts that make PostHog recognizable: warm work surfaces, rounded typography, tactile controls, compact product UI, vivid data colors, and a slightly handmade tone.
|
|
6
|
+
|
|
7
|
+
The next version should refine that identity into **handcrafted precision**: a calm, dense analytics workspace where tactility and playfulness appear deliberately rather than on every surface.
|
|
8
|
+
|
|
9
|
+
The highest-value work is not adding more components. It is:
|
|
10
|
+
|
|
11
|
+
1. Make the token system complete and consistent across every theme.
|
|
12
|
+
2. Make interactive components production-accessible and keyboard-complete.
|
|
13
|
+
3. Give depth, color, radius, density, and motion explicit meanings.
|
|
14
|
+
4. Turn tables, charts, filters, and dashboard shells into reusable product patterns.
|
|
15
|
+
5. Add automated behavior, accessibility, package, and visual regression coverage.
|
|
16
|
+
|
|
17
|
+
## Current baseline
|
|
18
|
+
|
|
19
|
+
The repository is both a published component library and a Next.js component lab.
|
|
20
|
+
|
|
21
|
+
- 40 UI source files, 10 dashboard components, 6 public chart components, and 64 icon components.
|
|
22
|
+
- 28 themes across 14 light/dark pairs.
|
|
23
|
+
- Semantic theme variables, a Tailwind preset, Open Runde, bespoke SVG icons, and PostHog-style button chrome.
|
|
24
|
+
- No unit, interaction, accessibility, or visual regression tests. The current `test` script is TypeScript checking only.
|
|
25
|
+
- The library is broad enough for internal tools, but its complex widgets are not yet production-grade.
|
|
26
|
+
|
|
27
|
+
### What is already strong
|
|
28
|
+
|
|
29
|
+
- The warm HedgeHog canvas and crisp surface hierarchy are more distinctive than a generic neutral component kit.
|
|
30
|
+
- Open Runde gives the system an approachable voice without sacrificing product density.
|
|
31
|
+
- Primary and secondary button chrome has a recognizable physical press interaction.
|
|
32
|
+
- Theme switching is token-driven and does not require React rerenders.
|
|
33
|
+
- The dashboard grid and table overflow behavior already account for responsive layouts.
|
|
34
|
+
- The icon set is locally owned, consistent, and based on `currentColor`.
|
|
35
|
+
- Chart and product-category colors are separate from the basic neutral palette.
|
|
36
|
+
- Components generally use native HTML elements for simple controls.
|
|
37
|
+
|
|
38
|
+
### Main systemic problems
|
|
39
|
+
|
|
40
|
+
- Depth has no stable meaning. Static cards, inputs, panels, insights, and actions often share similar ridges and elevation.
|
|
41
|
+
- The token model has backgrounds but lacks `on-*` foreground colors, selected states, focus colors, and complete interaction roles.
|
|
42
|
+
- Hardcoded Tailwind colors bypass themes in cards, stats, ratings, avatars, filters, and buttons.
|
|
43
|
+
- Radius and spacing choices drift between CSS variables and one-off `rounded-lg`/`rounded-xl` utilities.
|
|
44
|
+
- Many composite widgets look finished but lack their expected keyboard, focus, and ARIA behavior.
|
|
45
|
+
- Twenty-eight themes multiply defects because many do not override the complete token set.
|
|
46
|
+
- The chart exports are fixed demos rather than reusable chart APIs.
|
|
47
|
+
- The lab documents components manually, causing examples, package names, theme lists, and actual APIs to drift.
|
|
48
|
+
|
|
49
|
+
## Recommended visual direction
|
|
50
|
+
|
|
51
|
+
### Handcrafted precision
|
|
52
|
+
|
|
53
|
+
Use an approximate **80 / 15 / 5** balance:
|
|
54
|
+
|
|
55
|
+
- 80% quiet workspace: neutral surfaces, precise alignment, compact controls, readable data.
|
|
56
|
+
- 15% tactile product character: hard button ridge, inset wells, selected controls, purposeful ribbons.
|
|
57
|
+
- 5% playful punctuation: illustrations, unusual empty states, success moments, onboarding, and rare easter eggs.
|
|
58
|
+
|
|
59
|
+
This avoids two bad outcomes: cloning current PostHog component-for-component, or replacing the identity with generic shadcn/Linear-style SaaS UI.
|
|
60
|
+
|
|
61
|
+
### Preserve
|
|
62
|
+
|
|
63
|
+
- Warm yellow-gray HedgeHog canvas rather than generic zinc or slate.
|
|
64
|
+
- Open Runde for interface text.
|
|
65
|
+
- Six-pixel control radius as the default visual signature.
|
|
66
|
+
- Hard lower ridge and physical press behavior for important actions.
|
|
67
|
+
- Orange as the brand/action accent, separate from danger.
|
|
68
|
+
- Bold blue, violet, green, pink, and red data series.
|
|
69
|
+
- Product-category ribbons where category recognition matters.
|
|
70
|
+
- Dense toolbars, query controls, tables, and analytics layouts.
|
|
71
|
+
- Bespoke icons and concise, human copy.
|
|
72
|
+
|
|
73
|
+
### Change
|
|
74
|
+
|
|
75
|
+
- Raised treatment should mean **interactive**, not merely “contained.”
|
|
76
|
+
- Static cards and charts should be mostly flat; only clickable cards receive hover elevation.
|
|
77
|
+
- Orange should not also mean warning, error, selection, link, and decoration.
|
|
78
|
+
- Status colors must have paired readable foreground and subtle-background tokens.
|
|
79
|
+
- Large radii should be reserved for floating overlays, not applied inconsistently.
|
|
80
|
+
- Product controls should use a coherent density scale rather than unrelated size values.
|
|
81
|
+
- Routine work should use quick, subtle motion; expressive motion should be rare.
|
|
82
|
+
- Personality should come from typography, tactility, copy, icons, and authored moments, not gradients or decorative effects.
|
|
83
|
+
|
|
84
|
+
## Reference systems
|
|
85
|
+
|
|
86
|
+
### PostHog: identity and tactile character
|
|
87
|
+
|
|
88
|
+
Borrow:
|
|
89
|
+
|
|
90
|
+
- Warm neutral workspace, Open Runde/RoundHog character, compact Lemon controls, hard button ridge, expressive data palette, and intentionally unusual moments.
|
|
91
|
+
- The brand principle of feeling handcrafted, thoughtful, and recognizable.
|
|
92
|
+
|
|
93
|
+
Do not copy:
|
|
94
|
+
|
|
95
|
+
- Legacy token fragmentation, overlapping color meanings, or every implementation detail of Lemon UI.
|
|
96
|
+
|
|
97
|
+
Primary sources:
|
|
98
|
+
|
|
99
|
+
- <https://posthog.com/handbook/brand/visual-identity>
|
|
100
|
+
- <https://posthog.com/handbook/brand/assets>
|
|
101
|
+
- <https://github.com/PostHog/posthog/tree/master/frontend/src/lib/lemon-ui>
|
|
102
|
+
- <https://github.com/PostHog/posthog/blob/master/frontend/src/styles/base.scss>
|
|
103
|
+
|
|
104
|
+
### Linear: hierarchy and application shell
|
|
105
|
+
|
|
106
|
+
Borrow:
|
|
107
|
+
|
|
108
|
+
- Quiet global chrome, strong alignment, neutral hierarchy before hue, and full-workflow stress testing.
|
|
109
|
+
- Clear separation of persistent navigation, working content, and inspectors.
|
|
110
|
+
|
|
111
|
+
Do not copy:
|
|
112
|
+
|
|
113
|
+
- Cool monochrome translucency, faint low-contrast borders, or generic premium-dark-SaaS styling.
|
|
114
|
+
|
|
115
|
+
Sources:
|
|
116
|
+
|
|
117
|
+
- <https://linear.app/now/how-we-redesigned-the-linear-ui>
|
|
118
|
+
- <https://linear.app/blog/a-design-reset>
|
|
119
|
+
|
|
120
|
+
### GitHub Primer: semantic token discipline
|
|
121
|
+
|
|
122
|
+
Borrow:
|
|
123
|
+
|
|
124
|
+
- Primitive, functional, and component token layers.
|
|
125
|
+
- Explicit rest, hover, active, selected, disabled, loading, and focus roles.
|
|
126
|
+
- Responsive regions that change workflow rather than merely shrink.
|
|
127
|
+
|
|
128
|
+
Do not copy:
|
|
129
|
+
|
|
130
|
+
- GitHub’s blue/green identity or border-heavy repository-page appearance.
|
|
131
|
+
|
|
132
|
+
Sources:
|
|
133
|
+
|
|
134
|
+
- <https://primer.style/product/getting-started/foundations/color-usage/>
|
|
135
|
+
- <https://primer.style/product/primitives/color/>
|
|
136
|
+
- <https://primer.style/product/getting-started/foundations/layout/>
|
|
137
|
+
|
|
138
|
+
### Shopify Polaris: semantic depth and task density
|
|
139
|
+
|
|
140
|
+
Borrow:
|
|
141
|
+
|
|
142
|
+
- Compact controls for minute-to-minute work.
|
|
143
|
+
- Depth that distinguishes pressable actions from static content.
|
|
144
|
+
- Workflow components such as saved views, index filters, bulk actions, and contextual feedback.
|
|
145
|
+
|
|
146
|
+
Do not copy:
|
|
147
|
+
|
|
148
|
+
- Card soup or an overly neutral black-and-white visual identity.
|
|
149
|
+
|
|
150
|
+
Sources:
|
|
151
|
+
|
|
152
|
+
- <https://polaris.shopify.com/design/layout>
|
|
153
|
+
- <https://polaris.shopify.com/design/colors>
|
|
154
|
+
- <https://polaris.shopify.com/design/depth>
|
|
155
|
+
|
|
156
|
+
### Radix Themes and primitives: mechanics
|
|
157
|
+
|
|
158
|
+
Borrow:
|
|
159
|
+
|
|
160
|
+
- Predictable color scales, contextual radius, role-based shadows, and accessible headless behavior.
|
|
161
|
+
- Primitive behavior underneath custom Old UI styling.
|
|
162
|
+
|
|
163
|
+
Do not copy:
|
|
164
|
+
|
|
165
|
+
- Default indigo-gray visuals, pervasive translucency, or one radius formula for every component.
|
|
166
|
+
|
|
167
|
+
Sources:
|
|
168
|
+
|
|
169
|
+
- <https://www.radix-ui.com/themes/docs/theme/color>
|
|
170
|
+
- <https://www.radix-ui.com/themes/docs/theme/radius>
|
|
171
|
+
- <https://www.radix-ui.com/themes/docs/theme/shadows>
|
|
172
|
+
|
|
173
|
+
### IBM Carbon: data density and spatial rhythm
|
|
174
|
+
|
|
175
|
+
Borrow:
|
|
176
|
+
|
|
177
|
+
- Four-pixel micro spacing with an eight-pixel major rhythm.
|
|
178
|
+
- Productive versus expressive motion.
|
|
179
|
+
- Complete data-table workflows and alignment to visible layout keylines.
|
|
180
|
+
|
|
181
|
+
Do not copy:
|
|
182
|
+
|
|
183
|
+
- Square enterprise styling or forcing every measurement onto eight pixels.
|
|
184
|
+
|
|
185
|
+
Sources:
|
|
186
|
+
|
|
187
|
+
- <https://carbondesignsystem.com/elements/2x-grid/overview/>
|
|
188
|
+
- <https://carbondesignsystem.com/elements/motion/overview/>
|
|
189
|
+
- <https://carbondesignsystem.com/components/data-table/usage/>
|
|
190
|
+
|
|
191
|
+
## Foundation plan
|
|
192
|
+
|
|
193
|
+
### 1. Token architecture
|
|
194
|
+
|
|
195
|
+
Keep the public `--ph-*` prefix because the package has external consumers. Consolidate tokens into three documented layers.
|
|
196
|
+
|
|
197
|
+
**Primitive layer**
|
|
198
|
+
|
|
199
|
+
- Neutral and accent scales in perceptual color space, preferably OKLCH.
|
|
200
|
+
- Separate scales for brand, success, warning, danger, info, and categorical data.
|
|
201
|
+
- Alpha scales for subtle fills and state overlays.
|
|
202
|
+
|
|
203
|
+
**Semantic layer**
|
|
204
|
+
|
|
205
|
+
- Surfaces: canvas, surface, subtle/inset, raised, overlay.
|
|
206
|
+
- Text: primary, secondary, tertiary, disabled, inverse, link.
|
|
207
|
+
- Borders: subtle, default, strong, focus, danger.
|
|
208
|
+
- Actions: primary, secondary, quiet, danger, plus foreground and hover/active roles.
|
|
209
|
+
- Feedback: solid, subtle, border, and foreground roles for every status.
|
|
210
|
+
- Selection: selected background, selected foreground, selected border.
|
|
211
|
+
- Focus: one global focus-ring color and offset token.
|
|
212
|
+
|
|
213
|
+
**Component layer**
|
|
214
|
+
|
|
215
|
+
- Use only where a component cannot be expressed cleanly with semantic roles.
|
|
216
|
+
- Keep existing Lemon button face/frame tokens here.
|
|
217
|
+
- Add explicit overlay, tooltip, table, and chart-specific roles rather than hardcoded utilities.
|
|
218
|
+
|
|
219
|
+
Required additions include:
|
|
220
|
+
|
|
221
|
+
- `--ph-on-accent`
|
|
222
|
+
- `--ph-on-success`
|
|
223
|
+
- `--ph-on-warning`
|
|
224
|
+
- `--ph-on-danger`
|
|
225
|
+
- `--ph-on-info`
|
|
226
|
+
- `--ph-focus-ring`
|
|
227
|
+
- `--ph-selected-bg`
|
|
228
|
+
- `--ph-selected-text`
|
|
229
|
+
- `--ph-selected-border`
|
|
230
|
+
- `--ph-surface-inset`
|
|
231
|
+
- `--ph-surface-raised`
|
|
232
|
+
- `--ph-surface-overlay`
|
|
233
|
+
- `--ph-border-subtle`
|
|
234
|
+
|
|
235
|
+
Every built-in theme must define the complete required token contract. Do not allow missing values to silently inherit HedgeHog Light.
|
|
236
|
+
|
|
237
|
+
### 2. Theme tiers
|
|
238
|
+
|
|
239
|
+
Keep theme breadth, but stop treating all 28 themes as equally certified.
|
|
240
|
+
|
|
241
|
+
- **Core:** the themes guaranteed to pass contrast, interaction, chart, and visual tests.
|
|
242
|
+
- **Compatible:** themes that satisfy semantic token and contrast requirements but may have less hand-tuning.
|
|
243
|
+
- **Experimental:** novelty themes available in the lab without a production guarantee.
|
|
244
|
+
|
|
245
|
+
Start with HedgeHog Light/Dark as the reference pair. Promote other themes only after they pass the same fixtures.
|
|
246
|
+
|
|
247
|
+
### 3. Depth model
|
|
248
|
+
|
|
249
|
+
Define four levels and apply them consistently.
|
|
250
|
+
|
|
251
|
+
| Level | Meaning | Examples |
|
|
252
|
+
| --- | --- | --- |
|
|
253
|
+
| Flat | Static content | cards, alerts, badges, chart canvases |
|
|
254
|
+
| Inset | Working area or contained input | query well, code area, dashboard canvas |
|
|
255
|
+
| Raised | Pressable or selectable | primary/secondary buttons, menu trigger, interactive tile |
|
|
256
|
+
| Floating | Temporarily above the app | popover, menu, command palette, dialog |
|
|
257
|
+
|
|
258
|
+
The hard three-pixel Lemon ridge belongs primarily to raised actions. Static cards should not move on hover.
|
|
259
|
+
|
|
260
|
+
### 4. Radius model
|
|
261
|
+
|
|
262
|
+
- Control: 6px.
|
|
263
|
+
- Surface: 8px.
|
|
264
|
+
- Floating overlay: 10-12px.
|
|
265
|
+
- Pill: fully rounded only for chips, status pills, and intentionally pill-shaped actions.
|
|
266
|
+
- Circular: avatars and icon controls.
|
|
267
|
+
|
|
268
|
+
Remove one-off radius utilities when a semantic radius applies.
|
|
269
|
+
|
|
270
|
+
### 5. Density and spacing
|
|
271
|
+
|
|
272
|
+
- Use a 4px micro-grid and 8px major spacing rhythm.
|
|
273
|
+
- Standardize controls around `xs`, `sm`, `md`, and `lg` rather than component-specific values.
|
|
274
|
+
- Suggested visible heights: 24px, 30px, 36px, and 44px.
|
|
275
|
+
- Keep at least a 44px effective touch target on touch layouts even when the visual control is compact.
|
|
276
|
+
- Define compact and standard table/list densities as complete sets, not isolated padding changes.
|
|
277
|
+
|
|
278
|
+
### 6. Typography
|
|
279
|
+
|
|
280
|
+
- Keep Open Runde, but publish font assets correctly or make the font an explicit consumer-owned option.
|
|
281
|
+
- Use a tighter product type scale than the marketing hero scale.
|
|
282
|
+
- Add tabular numerals to stats, tables, timestamps, pagination, and chart labels.
|
|
283
|
+
- Balance large headings and use pretty wrapping for body introductions.
|
|
284
|
+
- Allow typography components to accept native element props and refs.
|
|
285
|
+
- Avoid fixed heading levels inside reusable cards and dashboard shells; allow consumers to choose semantic level.
|
|
286
|
+
|
|
287
|
+
### 7. Focus and motion
|
|
288
|
+
|
|
289
|
+
- Apply one tokenized `:focus-visible` treatment to every interactive primitive.
|
|
290
|
+
- Use `:focus-within` for compound fields, file upload, search groups, and segmented controls.
|
|
291
|
+
- Remove `outline-none` unless an equal or stronger replacement exists.
|
|
292
|
+
- Add a global reduced-motion mode.
|
|
293
|
+
- Animate only opacity and transform where possible.
|
|
294
|
+
- Productive motion should generally complete in 100-180ms; reserve expressive motion for rare moments.
|
|
295
|
+
- Remove global smooth scrolling under reduced-motion preferences.
|
|
296
|
+
|
|
297
|
+
### 8. Responsive behavior
|
|
298
|
+
|
|
299
|
+
- Define named regions: shell, navigator, toolbar, canvas, inspector, and activity panel.
|
|
300
|
+
- On narrow screens, convert inspectors and secondary panes to sheets or drill-in screens instead of squeezed columns.
|
|
301
|
+
- Menus, hover cards, and popovers need collision detection and safe viewport padding.
|
|
302
|
+
- Tabs, steppers, and segmented controls need an explicit wrap, scroll, or collapse policy.
|
|
303
|
+
- Add mobile navigation to the component lab.
|
|
304
|
+
- Account for safe areas in full-height overlays and drawers.
|
|
305
|
+
|
|
306
|
+
## Component plan
|
|
307
|
+
|
|
308
|
+
### Actions
|
|
309
|
+
|
|
310
|
+
**Button and ButtonChrome**
|
|
311
|
+
|
|
312
|
+
- Keep the tactile primary/secondary chrome as a signature.
|
|
313
|
+
- Reduce conceptual variants to primary, secondary, quiet/tertiary, danger, and link. Treat success/warning/info as tones only where a workflow truly needs them.
|
|
314
|
+
- Reserve `signal` for a featured CTA pattern instead of a general button role.
|
|
315
|
+
- Make outline support explicit rather than silently no-op on most variants.
|
|
316
|
+
- Replace the current visual-only `split` prop with a true two-target split-button composition.
|
|
317
|
+
- Add loading state that preserves label width, icon-only accessible-name requirements, and ref forwarding.
|
|
318
|
+
- Use one focus-visible and disabled-state contract across every variant.
|
|
319
|
+
|
|
320
|
+
**DropdownButton, DropdownMenu, DropdownItem**
|
|
321
|
+
|
|
322
|
+
- Decide whether this is a disclosure or an ARIA menu and name/API it accordingly.
|
|
323
|
+
- Use a headless positioning/interaction primitive for collision detection, Escape, outside click, focus movement, and focus return.
|
|
324
|
+
- Add item groups, labels, separators, checkbox/radio items, destructive items, disabled items, and links only after base behavior is complete.
|
|
325
|
+
|
|
326
|
+
### Forms
|
|
327
|
+
|
|
328
|
+
**Input, Select, Textarea, Checkbox, Radio, Toggle, Range, FileUpload**
|
|
329
|
+
|
|
330
|
+
- Introduce a shared `Field`/`FormField` composition for label, description, error, required state, and generated IDs.
|
|
331
|
+
- Connect helper/error text with `aria-describedby` and `aria-errormessage`.
|
|
332
|
+
- Implement the currently missing small and large input styles.
|
|
333
|
+
- Forward refs and preserve native props.
|
|
334
|
+
- Give compound controls a shared focus-within treatment.
|
|
335
|
+
- Correct Range and FileUpload label association.
|
|
336
|
+
- Place checkbox description/error content in a proper text column.
|
|
337
|
+
- Add indeterminate Checkbox and required/optional label affordances.
|
|
338
|
+
- Keep native controls wherever possible.
|
|
339
|
+
|
|
340
|
+
**SearchInput and SearchGroup**
|
|
341
|
+
|
|
342
|
+
- Treat search as a compound field with a clear button, loading state, shortcut hint, and focus-within border.
|
|
343
|
+
- Ensure compact density remains readable and touch-safe.
|
|
344
|
+
|
|
345
|
+
**Rating**
|
|
346
|
+
|
|
347
|
+
- Implement single-selection radio semantics and arrow-key navigation.
|
|
348
|
+
- Separate read-only display from interactive rating APIs.
|
|
349
|
+
|
|
350
|
+
**Calendar**
|
|
351
|
+
|
|
352
|
+
- Rebuild around an accessible date-grid behavior foundation rather than extending the current button grid.
|
|
353
|
+
- Add locale-aware month/day labels, keyboard navigation, selected/today semantics, min/max dates, disabled dates, and visible-month synchronization.
|
|
354
|
+
- Keep Old UI styling above the behavior layer.
|
|
355
|
+
|
|
356
|
+
### Feedback and status
|
|
357
|
+
|
|
358
|
+
**Alert and Toast**
|
|
359
|
+
|
|
360
|
+
- Define deliberate live-region policy: static alerts should not always be assertive; transient toasts should announce at the right politeness.
|
|
361
|
+
- Use consistent status icon, subtle fill, border, title, body, and action anatomy.
|
|
362
|
+
- Add toast duration, pause-on-hover/focus, swipe/dismiss behavior, and provider/viewport only if the library intends to own toast orchestration.
|
|
363
|
+
|
|
364
|
+
**Badge and Indicator**
|
|
365
|
+
|
|
366
|
+
- Separate status, category, count, and decorative badge roles.
|
|
367
|
+
- Use semantic foreground tokens instead of white text assumptions.
|
|
368
|
+
- Fix Indicator offset or remove it from the API.
|
|
369
|
+
- Ensure status information has a text equivalent when meaningful.
|
|
370
|
+
|
|
371
|
+
**Progress**
|
|
372
|
+
|
|
373
|
+
- Validate zero/negative max and clamp both visual and ARIA values.
|
|
374
|
+
- Support determinate and indeterminate modes explicitly.
|
|
375
|
+
- Connect visible labels to the progress element.
|
|
376
|
+
|
|
377
|
+
**EmptyState**
|
|
378
|
+
|
|
379
|
+
- Keep this as a personality punctuation point.
|
|
380
|
+
- Add size and alignment patterns, but avoid excessive variants.
|
|
381
|
+
- Define when illustration, icon, primary action, and secondary help are appropriate.
|
|
382
|
+
|
|
383
|
+
### Surfaces and layout
|
|
384
|
+
|
|
385
|
+
**Card and Panel**
|
|
386
|
+
|
|
387
|
+
- Make default cards flat and static.
|
|
388
|
+
- Add a distinct interactive card variant with hover, focus, and pressed behavior.
|
|
389
|
+
- Remove global hover elevation from noninteractive cards.
|
|
390
|
+
- Fix media edge alignment and replace hardcoded orange highlighting with semantic tokens.
|
|
391
|
+
- Prefer composable header/body/footer regions over fixed heading semantics.
|
|
392
|
+
- Clarify Panel as an inset/working surface or merge it with the surface model.
|
|
393
|
+
|
|
394
|
+
**Modal and Drawer**
|
|
395
|
+
|
|
396
|
+
- Rebuild on accessible dialog primitives with portals, accessible names/descriptions, focus trapping, Escape, focus restoration, scroll lock, and outside-click policy.
|
|
397
|
+
- Add viewport-safe max height, internal scrolling, overscroll containment, and mobile safe-area padding.
|
|
398
|
+
- Treat Drawer as a dialog/sheet with equivalent behavior.
|
|
399
|
+
- Use floating elevation, not the same ridge as normal cards.
|
|
400
|
+
|
|
401
|
+
**Accordion and CollapsibleSection**
|
|
402
|
+
|
|
403
|
+
- Add complete disclosure semantics and hide collapsed focusable content.
|
|
404
|
+
- Consolidate shared disclosure behavior.
|
|
405
|
+
- Keep `CollapsibleSection` lab-only unless consumers have a real product need.
|
|
406
|
+
|
|
407
|
+
**HoverCard**
|
|
408
|
+
|
|
409
|
+
- Support keyboard focus, pointer hover intent, touch behavior, safe delays, and collision-aware placement.
|
|
410
|
+
- Add a separate accessible Tooltip primitive; do not treat HoverCard and Tooltip as the same pattern.
|
|
411
|
+
|
|
412
|
+
### Navigation
|
|
413
|
+
|
|
414
|
+
**Tabs and SegmentedControl**
|
|
415
|
+
|
|
416
|
+
- Tabs need tablist/tab/panel relationships, roving focus, and arrow-key behavior.
|
|
417
|
+
- SegmentedControl should use radio-group or pressed-button semantics based on whether it selects a value or changes a view.
|
|
418
|
+
- Define overflow behavior for narrow layouts.
|
|
419
|
+
|
|
420
|
+
**Breadcrumbs and Pagination**
|
|
421
|
+
|
|
422
|
+
- Render Breadcrumbs as an ordered list.
|
|
423
|
+
- Replace Pagination's fixed `[1, 2, 3, last]` logic with a window around the current page.
|
|
424
|
+
- Use the ellipsis character and include accessible page labels.
|
|
425
|
+
- Define behavior for invalid page counts and zero results.
|
|
426
|
+
|
|
427
|
+
**Stepper**
|
|
428
|
+
|
|
429
|
+
- Use list semantics and announce current, complete, and error states.
|
|
430
|
+
- Either honor per-step status or remove it in favor of a single current index.
|
|
431
|
+
- Add vertical/mobile presentation.
|
|
432
|
+
|
|
433
|
+
**CommandPalette**
|
|
434
|
+
|
|
435
|
+
- Rebuild as an accessible dialog plus combobox/listbox pattern.
|
|
436
|
+
- Trap and restore focus, label the input, expose active option state, support empty results safely, and contain keyboard handling.
|
|
437
|
+
- Add groups and recent actions only after the core model is correct.
|
|
438
|
+
|
|
439
|
+
**FilterChips**
|
|
440
|
+
|
|
441
|
+
- Separate toggle and remove actions into valid focusable controls.
|
|
442
|
+
- Define filter, selected-filter, and dismissible-tag APIs rather than combining them in one element.
|
|
443
|
+
- Build a higher-level filter bar pattern with count, clear-all, and overflow behavior.
|
|
444
|
+
|
|
445
|
+
### Data display
|
|
446
|
+
|
|
447
|
+
**Table**
|
|
448
|
+
|
|
449
|
+
- Keep a lightweight semantic Table primitive.
|
|
450
|
+
- Add stable row keys, column scopes, empty state, row props, numeric alignment, and responsive overflow indicators.
|
|
451
|
+
- Build a separate DataTable pattern for sorting, selection, density, filtering, pagination, bulk actions, saved views, and loading states.
|
|
452
|
+
- Do not overload the basic Table with every data-grid behavior.
|
|
453
|
+
|
|
454
|
+
**Stat and DashboardKpiCard**
|
|
455
|
+
|
|
456
|
+
- Consolidate duplicate metric anatomy.
|
|
457
|
+
- Use tabular numerals, optional trend context, comparison period, and accessible value descriptions.
|
|
458
|
+
- Replace hardcoded amber and other palette utilities with semantic tones.
|
|
459
|
+
|
|
460
|
+
**Avatar and AvatarGroup**
|
|
461
|
+
|
|
462
|
+
- Replace white status borders with a surface token.
|
|
463
|
+
- Use `React.Children.toArray` for grouping and counts.
|
|
464
|
+
- Define image fallback, initials, loading failure, and status text behavior.
|
|
465
|
+
|
|
466
|
+
**Timeline, ChatBubble, Terminal, Kbd**
|
|
467
|
+
|
|
468
|
+
- Keep these as specialized display primitives, but align their radius, spacing, focus, and semantic APIs with foundations.
|
|
469
|
+
- Make Timeline heading levels consumer-controlled.
|
|
470
|
+
- Limit ChatBubble to conversational products rather than presenting it as a universal primitive.
|
|
471
|
+
- Fix Kbd's `ReactNode[]` joining behavior and distinguish key, shortcut, and token visuals or simplify the variants.
|
|
472
|
+
- Keep Terminal content semantic and horizontally scrollable.
|
|
473
|
+
|
|
474
|
+
### Charts and dashboards
|
|
475
|
+
|
|
476
|
+
**Chart components**
|
|
477
|
+
|
|
478
|
+
- Move charts to a dedicated `charts` package subpath so optional peer dependencies are actually optional.
|
|
479
|
+
- Replace fixed demo exports with typed data, series, label, size, formatter, loading, empty, and error props.
|
|
480
|
+
- Keep demo datasets only in the component lab.
|
|
481
|
+
- Provide a textual summary or table fallback for every chart.
|
|
482
|
+
- Make tooltip and data-point exploration keyboard accessible where practical.
|
|
483
|
+
- Keep chart colors in a separate categorical namespace and test adjacent-series contrast.
|
|
484
|
+
|
|
485
|
+
**Dashboard components**
|
|
486
|
+
|
|
487
|
+
- Keep DashboardGrid, DashboardWell, toolbar, filters, KPI, and insight shells as the start of a useful analytics pattern library.
|
|
488
|
+
- Make shell headings consumer-controlled.
|
|
489
|
+
- Mark mini trend bars decorative or provide an accessible summary.
|
|
490
|
+
- Add complete insight states: loading, empty, error, stale, refreshing, and no-permission.
|
|
491
|
+
- Standardize toolbar/keyline alignment across KPI cards, filters, charts, and tables.
|
|
492
|
+
- Add responsive inspector/sheet patterns rather than only card grids.
|
|
493
|
+
|
|
494
|
+
### Foundation and documentation components
|
|
495
|
+
|
|
496
|
+
**Typography**
|
|
497
|
+
|
|
498
|
+
- Add native props, refs, and an `as` strategy where semantics need to differ from visual style.
|
|
499
|
+
- Add a dedicated typography specimen to the lab.
|
|
500
|
+
|
|
501
|
+
**Icons**
|
|
502
|
+
|
|
503
|
+
- Keep decorative icons hidden by default.
|
|
504
|
+
- Automatically expose icons when an accessible label/title is provided, or provide a clear labeled-icon API.
|
|
505
|
+
- Add size and stroke alignment fixtures at 12, 16, 20, and 24px.
|
|
506
|
+
|
|
507
|
+
**ThemeSwitcher, ThemeManager, ThemeDomSync**
|
|
508
|
+
|
|
509
|
+
- Synchronize multiple switchers and cross-tab changes.
|
|
510
|
+
- Guard storage access.
|
|
511
|
+
- Add optional system mode.
|
|
512
|
+
- Keep pre-paint initialization to avoid theme flash.
|
|
513
|
+
|
|
514
|
+
**CodeBlock, ComponentDocs, ShowcaseWrapper**
|
|
515
|
+
|
|
516
|
+
- Treat these as documentation-only exports unless consumer demand exists.
|
|
517
|
+
- Generate examples and prop references from executable fixtures or metadata to reduce drift.
|
|
518
|
+
- Announce copy success and handle clipboard failures.
|
|
519
|
+
|
|
520
|
+
### Add only after foundations are stable
|
|
521
|
+
|
|
522
|
+
- Tooltip
|
|
523
|
+
- Popover
|
|
524
|
+
- Skeleton
|
|
525
|
+
- Spinner/LoadingIndicator
|
|
526
|
+
- FormField
|
|
527
|
+
- DataTable
|
|
528
|
+
- Combobox/Autocomplete
|
|
529
|
+
- Sheet as the responsive Drawer pattern
|
|
530
|
+
- VisuallyHidden and FocusScope utilities if not supplied by behavior primitives
|
|
531
|
+
|
|
532
|
+
## Engineering plan
|
|
533
|
+
|
|
534
|
+
### Behavior foundation decision
|
|
535
|
+
|
|
536
|
+
Do not hand-roll focus trapping, roving focus, popover collision detection, or complex ARIA state unless there is a strong reason.
|
|
537
|
+
|
|
538
|
+
Evaluate headless primitives against these requirements:
|
|
539
|
+
|
|
540
|
+
- Unstyled or easily restyled.
|
|
541
|
+
- Tree-shakeable per primitive.
|
|
542
|
+
- Good React 18 and server-component boundaries.
|
|
543
|
+
- Portal, focus, keyboard, and positioning behavior.
|
|
544
|
+
- Does not impose a competing visual system.
|
|
545
|
+
|
|
546
|
+
Radix primitives are the leading fit for Dialog, DropdownMenu, Popover, HoverCard, Tabs, Accordion, and Tooltip. Calendar/date behavior may warrant a focused accessible date library. The visual layer should remain fully owned by The Old UI.
|
|
547
|
+
|
|
548
|
+
### API rules
|
|
549
|
+
|
|
550
|
+
- Export every public component prop and item type.
|
|
551
|
+
- Forward refs on native and interactive primitives.
|
|
552
|
+
- Extend the correct native element props where possible.
|
|
553
|
+
- Use controlled and uncontrolled state conventions consistently.
|
|
554
|
+
- Do not expose props that have no effect.
|
|
555
|
+
- Separate visual tone, interaction role, size, and state instead of encoding all of them in a single `variant` union.
|
|
556
|
+
- Keep escape-hatch `className`, but make normal use possible through documented props.
|
|
557
|
+
- Plan breaking API cleanup for a major release because the package is already public.
|
|
558
|
+
|
|
559
|
+
### CSS rules
|
|
560
|
+
|
|
561
|
+
- One source of truth for active component CSS; remove or clearly archive duplicated `lemon-primitives.css` and `excel-themes.css`.
|
|
562
|
+
- No hardcoded palette utilities inside theme-aware public components.
|
|
563
|
+
- No `transition: all`.
|
|
564
|
+
- No static hover elevation.
|
|
565
|
+
- Every interaction state must work in light and dark themes.
|
|
566
|
+
- Compile publishable CSS instead of requiring consumers to process private Tailwind directives unexpectedly.
|
|
567
|
+
- Package font assets with resolvable URLs or document fonts as a separate installation choice.
|
|
568
|
+
|
|
569
|
+
## Verification strategy
|
|
570
|
+
|
|
571
|
+
### Component tests
|
|
572
|
+
|
|
573
|
+
Add Vitest and Testing Library tests for:
|
|
574
|
+
|
|
575
|
+
- Controlled and uncontrolled behavior.
|
|
576
|
+
- Keyboard navigation and focus restoration.
|
|
577
|
+
- ARIA state, labels, descriptions, and live-region behavior.
|
|
578
|
+
- Disabled, loading, empty, and error states.
|
|
579
|
+
- Edge cases such as zero progress max, empty command results, and pagination windows.
|
|
580
|
+
|
|
581
|
+
### Accessibility tests
|
|
582
|
+
|
|
583
|
+
- Run automated axe checks on every lab fixture.
|
|
584
|
+
- Add keyboard-only acceptance tests for all interactive composites.
|
|
585
|
+
- Measure text and non-text contrast for every core theme.
|
|
586
|
+
- Include reduced-motion and high-contrast/forced-colors checks.
|
|
587
|
+
|
|
588
|
+
### Visual tests
|
|
589
|
+
|
|
590
|
+
Keep the existing Next.js lab and add Playwright screenshot coverage rather than introducing another documentation stack immediately.
|
|
591
|
+
|
|
592
|
+
- Capture all components in HedgeHog Light and Dark.
|
|
593
|
+
- Capture semantic color and state fixtures in every theme.
|
|
594
|
+
- Capture compact, standard, mobile, and long-content cases.
|
|
595
|
+
- Test 320px, 768px, and desktop widths.
|
|
596
|
+
- Add interaction screenshots for focus, hover, active, selected, disabled, loading, and error.
|
|
597
|
+
|
|
598
|
+
### Package tests
|
|
599
|
+
|
|
600
|
+
- Pack and install the tarball into a minimal consumer fixture.
|
|
601
|
+
- Verify root, `ui`, future `charts`, CSS, themes, and Tailwind preset exports.
|
|
602
|
+
- Verify fonts resolve or are intentionally external.
|
|
603
|
+
- Verify importing `ui` does not require chart dependencies.
|
|
604
|
+
- Verify ESM, CJS, and type declarations.
|
|
605
|
+
|
|
606
|
+
## Delivery phases
|
|
607
|
+
|
|
608
|
+
### Phase 0: stop regressions
|
|
609
|
+
|
|
610
|
+
Effort: medium
|
|
611
|
+
|
|
612
|
+
- Add interaction, axe, visual, and package smoke test foundations.
|
|
613
|
+
- Fix font publication and CSS packaging.
|
|
614
|
+
- Separate chart exports from the default UI entry.
|
|
615
|
+
- Fix existing API no-ops and clear functional defects: pagination, progress, Indicator offset, Rating semantics, input sizes, card media, and chart border class.
|
|
616
|
+
- Export public prop types.
|
|
617
|
+
|
|
618
|
+
Exit criteria:
|
|
619
|
+
|
|
620
|
+
- A package tarball works in a clean consumer fixture.
|
|
621
|
+
- Core components have baseline screenshots and axe checks.
|
|
622
|
+
- Root UI imports do not require optional chart packages.
|
|
623
|
+
|
|
624
|
+
### Phase 1: foundations and reference theme
|
|
625
|
+
|
|
626
|
+
Effort: large
|
|
627
|
+
|
|
628
|
+
- Implement semantic foreground, selection, focus, surface, and border tokens.
|
|
629
|
+
- Define depth, radius, spacing, density, typography, and motion rules.
|
|
630
|
+
- Remove hardcoded component colors and inconsistent radii.
|
|
631
|
+
- Fully tune HedgeHog Light and Dark as reference themes.
|
|
632
|
+
- Add a theme contract fixture and validator.
|
|
633
|
+
|
|
634
|
+
Exit criteria:
|
|
635
|
+
|
|
636
|
+
- HedgeHog Light/Dark pass contrast and every state fixture.
|
|
637
|
+
- Components use semantic roles rather than hardcoded color utilities.
|
|
638
|
+
- Static and interactive depth are visibly distinguishable.
|
|
639
|
+
|
|
640
|
+
### Phase 2: core primitives
|
|
641
|
+
|
|
642
|
+
Effort: large
|
|
643
|
+
|
|
644
|
+
- Refine Button, FormField and inputs, Badge, Alert, Toast, Progress, Card, Panel, Avatar, typography, and icons.
|
|
645
|
+
- Add ref forwarding and native prop support.
|
|
646
|
+
- Standardize loading, disabled, focus, and error behavior.
|
|
647
|
+
|
|
648
|
+
Exit criteria:
|
|
649
|
+
|
|
650
|
+
- Core primitives work with keyboard, screen reader, long text, dark mode, and mobile touch.
|
|
651
|
+
- Component APIs consistently separate role, tone, size, and state.
|
|
652
|
+
|
|
653
|
+
### Phase 3: complex interaction
|
|
654
|
+
|
|
655
|
+
Effort: large
|
|
656
|
+
|
|
657
|
+
- Rebuild Modal, Drawer/Sheet, DropdownMenu, Tooltip, HoverCard, Tabs, Accordion, SegmentedControl, CommandPalette, Calendar, Stepper, and FilterChips using proven behavior primitives.
|
|
658
|
+
- Add collision detection, focus management, portals, responsive policies, and complete keyboard contracts.
|
|
659
|
+
|
|
660
|
+
Exit criteria:
|
|
661
|
+
|
|
662
|
+
- Every composite passes documented keyboard interaction tests.
|
|
663
|
+
- Overlay behavior is viewport-safe and restores focus.
|
|
664
|
+
- No pointer-only public component remains.
|
|
665
|
+
|
|
666
|
+
### Phase 4: data workflows
|
|
667
|
+
|
|
668
|
+
Effort: large
|
|
669
|
+
|
|
670
|
+
- Expand basic Table and create a separate DataTable pattern.
|
|
671
|
+
- Turn charts into typed reusable components with accessible fallback content.
|
|
672
|
+
- Complete dashboard loading/empty/error/refreshing states.
|
|
673
|
+
- Align toolbars, filters, KPI cards, charts, tables, and inspectors to shared keylines.
|
|
674
|
+
|
|
675
|
+
Exit criteria:
|
|
676
|
+
|
|
677
|
+
- At least one realistic analytics workflow works end-to-end at mobile and desktop widths.
|
|
678
|
+
- Data components support loading, empty, error, and populated states.
|
|
679
|
+
- Chart dependencies remain optional.
|
|
680
|
+
|
|
681
|
+
### Phase 5: themes and documentation
|
|
682
|
+
|
|
683
|
+
Effort: medium
|
|
684
|
+
|
|
685
|
+
- Classify themes as core, compatible, or experimental.
|
|
686
|
+
- Bring each promoted theme up to the complete token contract.
|
|
687
|
+
- Generate or co-locate examples to prevent source-string drift.
|
|
688
|
+
- Add typography, state, density, responsive, and accessibility documentation.
|
|
689
|
+
- Add a mobile component-lab navigator.
|
|
690
|
+
|
|
691
|
+
Exit criteria:
|
|
692
|
+
|
|
693
|
+
- Documentation uses the real package name and current APIs.
|
|
694
|
+
- Theme claims match automated theme coverage.
|
|
695
|
+
- Every public component has purpose, anatomy, API, state, keyboard, and usage guidance.
|
|
696
|
+
|
|
697
|
+
## Priority order by component
|
|
698
|
+
|
|
699
|
+
### P0: fix before visual expansion
|
|
700
|
+
|
|
701
|
+
- Modal, Drawer, CommandPalette, Calendar, Tabs, SegmentedControl, Accordion, HoverCard.
|
|
702
|
+
- Input family error/help associations and ref forwarding.
|
|
703
|
+
- Font/CSS packaging and optional chart dependency isolation.
|
|
704
|
+
- Theme foreground contrast and focus tokens.
|
|
705
|
+
- Pagination, Rating, Progress, FilterChips, and Indicator defects.
|
|
706
|
+
|
|
707
|
+
### P1: establish the evolved look
|
|
708
|
+
|
|
709
|
+
- Button role/variant cleanup.
|
|
710
|
+
- Card/Panel depth semantics.
|
|
711
|
+
- Consistent radii, spacing, density, focus, and motion.
|
|
712
|
+
- Alert, Toast, Badge, Stat, Avatar, EmptyState, and typography refinement.
|
|
713
|
+
- HedgeHog Light/Dark reference-theme polish.
|
|
714
|
+
|
|
715
|
+
### P2: make it a strong product library
|
|
716
|
+
|
|
717
|
+
- DataTable and filter/saved-view workflows.
|
|
718
|
+
- Reusable chart APIs and accessible chart summaries.
|
|
719
|
+
- Responsive dashboard shell, inspectors, and sheets.
|
|
720
|
+
- Complete documentation and visual regression matrix.
|
|
721
|
+
- Promotion of additional themes to certified status.
|
|
722
|
+
|
|
723
|
+
### P3: optional expansion
|
|
724
|
+
|
|
725
|
+
- Specialized ChatBubble, Timeline, Terminal, Diff, Swap, Countdown, and novelty patterns.
|
|
726
|
+
- Additional themes and expressive motion.
|
|
727
|
+
- New component categories only when tied to a real consuming-product workflow.
|
|
728
|
+
|
|
729
|
+
## Success measures
|
|
730
|
+
|
|
731
|
+
- All public interactive components are keyboard complete and have automated interaction tests.
|
|
732
|
+
- All core themes meet WCAG AA contrast for text, controls, status foregrounds, and focus indicators.
|
|
733
|
+
- No hardcoded color in a public component bypasses the semantic theme contract.
|
|
734
|
+
- Root UI import has no chart dependency requirement.
|
|
735
|
+
- Package fonts and CSS work in a clean consumer without undocumented build behavior.
|
|
736
|
+
- Every component has documented loading, empty, error, disabled, focus, and long-content behavior where applicable.
|
|
737
|
+
- Mobile workflows preserve functionality rather than only stacking desktop cards.
|
|
738
|
+
- The interface remains recognizable as The Old UI in grayscale through typography, spacing, radius, and tactile depth alone.
|
|
739
|
+
|
|
740
|
+
## Recommended first implementation slice
|
|
741
|
+
|
|
742
|
+
The first slice should be small enough to prove the direction but broad enough to expose token weaknesses:
|
|
743
|
+
|
|
744
|
+
1. Build the new semantic token contract in HedgeHog Light/Dark.
|
|
745
|
+
2. Apply it to Button, Input/FormField, Card, Badge, Alert, and Modal.
|
|
746
|
+
3. Make Card flat by default and Button tactile by default.
|
|
747
|
+
4. Rebuild Modal behavior on an accessible primitive.
|
|
748
|
+
5. Add one realistic dashboard fixture containing a toolbar, filters, KPI, card, form, alert, and modal.
|
|
749
|
+
6. Capture desktop/mobile, light/dark, keyboard-focus, error, loading, and disabled visual tests.
|
|
750
|
+
|
|
751
|
+
That slice will determine whether handcrafted precision works as a system before the remaining components are migrated.
|