@equal-experts/kuat-react 0.14.0-beta.2 → 0.15.0-beta.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/agent-docs/AGENTS.md +1 -1
- package/agent-docs/README.md +1 -1
- package/agent-docs/external/kuat-agent-rules/reference/accessibility/accessibility.md +27 -1
- package/agent-docs/external/kuat-agent-rules/reference/design-language/colour-usage.md +107 -0
- package/agent-docs/external/kuat-agent-rules/reference/design-language/colours.md +86 -11
- package/agent-docs/external/kuat-agent-rules/reference/design-language/tokens/colors.tokens.json +193 -5
- package/agent-docs/external/kuat-agent-rules/reference/media-types/web-marketing/patterns/README.md +6 -0
- package/agent-docs/external/kuat-agent-rules/reference/media-types/web-marketing/website.md +14 -0
- package/agent-docs/external/kuat-agent-rules/reference/media-types/web-product/README.md +1 -0
- package/agent-docs/external/kuat-agent-rules/reference/media-types/web-product/accessibility.md +0 -29
- package/agent-docs/external/kuat-agent-rules/reference/media-types/web-product/colour-modes.md +58 -0
- package/agent-docs/external/kuat-agent-rules/reference/media-types/web-product/component-decision-tree.md +3 -32
- package/agent-docs/external/kuat-agent-rules/reference/media-types/web-product/component-registry.md +1 -1
- package/agent-docs/external/kuat-agent-rules/reference/media-types/web-product/content/product-content.md +0 -26
- package/agent-docs/external/kuat-agent-rules/reference/media-types/web-product/patterns/README.md +14 -5
- package/agent-docs/external/kuat-agent-rules/reference/media-types/web-product/patterns/{forms.md → complete-a-form.md} +43 -53
- package/agent-docs/external/kuat-agent-rules/reference/media-types/web-product/patterns/{dashboards.md → dashboard.md} +42 -51
- package/agent-docs/external/kuat-agent-rules/reference/media-types/web-product/patterns/documentation.md +41 -51
- package/agent-docs/external/kuat-agent-rules/reference/media-types/web-product/patterns/{authentication.md → sign-in.md} +42 -52
- package/agent-docs/manifest.json +3 -3
- package/agent-docs/rules/LOADING-consumer.md +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -10,6 +10,20 @@ Marketing websites are public-facing pages designed to inform, engage, and conve
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
+
## Colour Usage
|
|
14
|
+
|
|
15
|
+
Marketing pages are **core-dominant**: Tier 1 (EE Blue, Transform Teal, Tech Blue, Equal Ember,
|
|
16
|
+
Dark Data, The Cloud, White) for almost everything. Full-page background floods are restricted to
|
|
17
|
+
**Tech Blue or Dark Data** (or The Cloud / white) — EE Blue is used at block/component level only,
|
|
18
|
+
never as a full-page fill.
|
|
19
|
+
|
|
20
|
+
Extended-palette colours (Logic Lime, Equal Ember) appear only as small pull-outs — dark text on
|
|
21
|
+
them, never body text, never a full flood — and must stay within **~5–10% of a page's total
|
|
22
|
+
area**. See [colour-usage.md](../../design-language/colour-usage.md) for the full tier model and
|
|
23
|
+
[colours.md](../../design-language/colours.md) for values.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
13
27
|
## Layout Structure
|
|
14
28
|
|
|
15
29
|
```
|
|
@@ -5,6 +5,7 @@ Reference for Equal Experts web applications, dashboards, internal tools, and pr
|
|
|
5
5
|
| File | Scope |
|
|
6
6
|
|------|-------|
|
|
7
7
|
| [design.md](./design.md) | Layout, navigation, product visual patterns |
|
|
8
|
+
| [colour-modes.md](./colour-modes.md) | Shadcn light/dark semantic colour mapping |
|
|
8
9
|
| [accessibility.md](./accessibility.md) | Product accessibility requirements |
|
|
9
10
|
| [emails.md](./emails.md) | Transactional / product email patterns |
|
|
10
11
|
| [component-decision-tree.md](./component-decision-tree.md) | Which component source to use (Blocks → Kuat → shadcn → custom) |
|
package/agent-docs/external/kuat-agent-rules/reference/media-types/web-product/accessibility.md
CHANGED
|
@@ -355,35 +355,6 @@ Kuat components automatically respect `prefers-reduced-motion`. When building cu
|
|
|
355
355
|
|
|
356
356
|
---
|
|
357
357
|
|
|
358
|
-
## Testing Checklist
|
|
359
|
-
|
|
360
|
-
### Keyboard Testing
|
|
361
|
-
|
|
362
|
-
- [ ] Can reach all interactive elements with Tab
|
|
363
|
-
- [ ] Focus order is logical
|
|
364
|
-
- [ ] Focus indicator is visible
|
|
365
|
-
- [ ] Can activate buttons/links with Enter/Space
|
|
366
|
-
- [ ] Can close modals with Escape
|
|
367
|
-
- [ ] No keyboard traps
|
|
368
|
-
|
|
369
|
-
### Screen Reader Testing
|
|
370
|
-
|
|
371
|
-
- [ ] Page has descriptive title
|
|
372
|
-
- [ ] Headings create logical outline
|
|
373
|
-
- [ ] Images have appropriate alt text
|
|
374
|
-
- [ ] Links and buttons have clear labels
|
|
375
|
-
- [ ] Form fields are labelled
|
|
376
|
-
- [ ] Error messages are announced
|
|
377
|
-
|
|
378
|
-
### Visual Testing
|
|
379
|
-
|
|
380
|
-
- [ ] Content visible at 200% zoom
|
|
381
|
-
- [ ] Works in both orientations
|
|
382
|
-
- [ ] Colour contrast meets requirements
|
|
383
|
-
- [ ] Information not conveyed by colour alone
|
|
384
|
-
|
|
385
|
-
---
|
|
386
|
-
|
|
387
358
|
## Related Documentation
|
|
388
359
|
|
|
389
360
|
- [Accessibility foundations](../../accessibility/accessibility.md) - Principles and guidelines
|
package/agent-docs/external/kuat-agent-rules/reference/media-types/web-product/colour-modes.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Colour Modes (Light & Dark)
|
|
2
|
+
|
|
3
|
+
Shadcn/ui semantic-role mapping for Equal Experts product UI. Product UI runs on a 50–950
|
|
4
|
+
primitive scale with semantic role tokens (`background`, `foreground`, `primary`,
|
|
5
|
+
`primary-foreground`, …) that flip value between light and dark mode while the role name stays
|
|
6
|
+
fixed — components reference `bg-primary text-primary-foreground` and the mode handles the rest.
|
|
7
|
+
|
|
8
|
+
**Status:** the mapping below is agreed (June 2026 colours lockdown) and is the target for
|
|
9
|
+
`@equal-experts/kuat-core`'s light and dark themes and `token-contract.json` (published
|
|
10
|
+
downstream). Until that release ships, treat the recommended values as the authority for review
|
|
11
|
+
and design work; the shipped `--color-*` CSS custom properties are the implementation of record
|
|
12
|
+
once published — see [colours.md](../../design-language/colours.md) for the upstream token values
|
|
13
|
+
these resolve from.
|
|
14
|
+
|
|
15
|
+
## Light mode
|
|
16
|
+
|
|
17
|
+
| Role | Value | Notes |
|
|
18
|
+
|------|-------|-------|
|
|
19
|
+
| `background` / `foreground` | White / Dark Data | 15.5:1 |
|
|
20
|
+
| `card` / `card-foreground` | White / Dark Data | 15.5:1 |
|
|
21
|
+
| `primary` / `primary-foreground` | EE Blue-600 `#1378ae` / White | EE Blue-600, not the brand -500, so white button text reaches AA (4.85:1); brand EE Blue `#1795d4` only passes for large/bold labels |
|
|
22
|
+
| `secondary` / `secondary-foreground` | Transform Teal-50 / Transform Teal-700 | 6.8:1 |
|
|
23
|
+
| `muted` / `muted-foreground` | The Cloud / Server Slate | 6.9:1 |
|
|
24
|
+
| `accent` / `accent-foreground` | EE Blue-50 / EE Blue-700 | 6.5:1 |
|
|
25
|
+
| `destructive` / `destructive-foreground` | Runtime Red / White | 7.8:1 |
|
|
26
|
+
| `ring` | EE Blue-600 | Meets 3:1 UI floor |
|
|
27
|
+
| `border` / `input` | Light neutral | Decorative divider — subtle by design, not a state indicator |
|
|
28
|
+
| `chart-1…5` | Tier 3 order | EE Blue, Equal Ember, Tech Blue, Logic Lime, Packet Plum |
|
|
29
|
+
|
|
30
|
+
## Dark mode
|
|
31
|
+
|
|
32
|
+
| Role | Value | Notes |
|
|
33
|
+
|------|-------|-------|
|
|
34
|
+
| `background` / `foreground` | Dark Data / The Cloud | 14.2:1 |
|
|
35
|
+
| `card` / `card-foreground` | Dark surface / The Cloud | 12.5:1 |
|
|
36
|
+
| `primary` / `primary-foreground` | EE Blue (brand -500) / Dark Data | 4.6:1 — on dark surfaces, brand EE Blue itself passes with dark text |
|
|
37
|
+
| `secondary` / `secondary-foreground` | Tech Blue / White | 7.8:1 |
|
|
38
|
+
| `muted` / `muted-foreground` | Dark neutral / Edge Blue | 7.2:1 |
|
|
39
|
+
| `accent` / `accent-foreground` | Tech Blue-900 / Edge Blue | 10.7:1 |
|
|
40
|
+
| `destructive` / `destructive-foreground` | Runtime Red / White | 7.8:1 (unchanged from light mode) |
|
|
41
|
+
| `ring` | EE Blue (brand -500) | — |
|
|
42
|
+
| `border` / `input` | Dark neutral | — |
|
|
43
|
+
| `chart-1…5` | Tier 3 order, dark-adjusted | EE Blue, Equal Ember, Edge Blue, Logic Lime, Signal Yellow (Edge Blue/Signal Yellow swapped in for dark-surface contrast) |
|
|
44
|
+
|
|
45
|
+
## Interaction states
|
|
46
|
+
|
|
47
|
+
Hover/active states use **Edge Blue** (the light end of the three-stage blue — see
|
|
48
|
+
[colour-usage.md](../../design-language/colour-usage.md#the-three-stage-blue)), not a raw opacity
|
|
49
|
+
tint of EE Blue. Interactive elements combine a tint-plus-darker-overlay treatment with an
|
|
50
|
+
affordance cue (border-radius, shape) — colour is never the only signal that something is
|
|
51
|
+
clickable.
|
|
52
|
+
|
|
53
|
+
## Links vs primary actions
|
|
54
|
+
|
|
55
|
+
`primary` (buttons, key CTAs) uses EE Blue; text links and small text use the semantic `link`
|
|
56
|
+
token, not `primary` — see
|
|
57
|
+
[colour-usage.md](../../design-language/colour-usage.md#links-vs-buttons--the-accessible-blue) for
|
|
58
|
+
why these are deliberately different values.
|
|
@@ -206,38 +206,9 @@ import { cn } from "@/lib/utils"
|
|
|
206
206
|
|
|
207
207
|
---
|
|
208
208
|
|
|
209
|
-
##
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
### Functionality
|
|
214
|
-
- [ ] All variants render correctly
|
|
215
|
-
- [ ] Default props work
|
|
216
|
-
- [ ] Custom className can be passed
|
|
217
|
-
- [ ] Component ref is forwarded (React)
|
|
218
|
-
|
|
219
|
-
### Types
|
|
220
|
-
- [ ] Props are properly typed
|
|
221
|
-
- [ ] Types are exported
|
|
222
|
-
- [ ] No TypeScript errors
|
|
223
|
-
|
|
224
|
-
### Accessibility
|
|
225
|
-
- [ ] Keyboard navigation works
|
|
226
|
-
- [ ] Screen reader announces correctly
|
|
227
|
-
- [ ] Focus visible and logical
|
|
228
|
-
- [ ] ARIA attributes present
|
|
229
|
-
|
|
230
|
-
### Styling
|
|
231
|
-
- [ ] Uses design tokens
|
|
232
|
-
- [ ] Works in light and dark mode
|
|
233
|
-
- [ ] Responsive if applicable
|
|
234
|
-
- [ ] Matches design specifications
|
|
235
|
-
|
|
236
|
-
### Edge Cases
|
|
237
|
-
- [ ] Long text handled
|
|
238
|
-
- [ ] Empty states handled
|
|
239
|
-
- [ ] Loading states (if applicable)
|
|
240
|
-
- [ ] Error states (if applicable)
|
|
209
|
+
## Component testing
|
|
210
|
+
|
|
211
|
+
Component test strategy and per-component verification (functionality, types, accessibility, styling, edge cases) are **owned by the implementation repo** — `kuat-mono` and the published package — per the upstream/local ownership split (see the repo's `AGENTS.md`). This reference covers component **selection and structure**, not test procedure.
|
|
241
212
|
|
|
242
213
|
---
|
|
243
214
|
|
package/agent-docs/external/kuat-agent-rules/reference/media-types/web-product/component-registry.md
CHANGED
|
@@ -8,7 +8,7 @@ Stable IDs link patterns and checklists to per-component guides in the implement
|
|
|
8
8
|
|
|
9
9
|
| ID | Display name | Source | Overlay / package doc | Upstream refs |
|
|
10
10
|
|----|--------------|--------|----------------------|---------------|
|
|
11
|
-
| `shadcn:button` | Button | shadcn CLI + `kuat-core` theme | `components/button.md` | [
|
|
11
|
+
| `shadcn:button` | Button | shadcn CLI + `kuat-core` theme | `components/button.md` | [complete a form](./patterns/complete-a-form.md), [sign in](./patterns/sign-in.md), [content/actions](./content/actions.md) |
|
|
12
12
|
| `kuat:button-group` | ButtonGroup | `@equal-experts/kuat-react` / `kuat-vue` | `components/button-group.md` | [component-decision-tree](./component-decision-tree.md) |
|
|
13
13
|
| `kuat:kuat-header` | KuatHeader | `@equal-experts/kuat-react` / `kuat-vue` block | `components/kuat-header.md` | [component-decision-tree](./component-decision-tree.md), [design](./design.md) |
|
|
14
14
|
|
|
@@ -90,32 +90,6 @@ Before writing, know:
|
|
|
90
90
|
|
|
91
91
|
---
|
|
92
92
|
|
|
93
|
-
## Product Content Checklist
|
|
94
|
-
|
|
95
|
-
**Context and Timing:**
|
|
96
|
-
- [ ] Content appears at right moment
|
|
97
|
-
- [ ] Information directly relevant
|
|
98
|
-
- [ ] Content disappears when not relevant
|
|
99
|
-
|
|
100
|
-
**Clarity and Conciseness:**
|
|
101
|
-
- [ ] Every word carries meaning
|
|
102
|
-
- [ ] As short as possible while clear
|
|
103
|
-
- [ ] Most important info first
|
|
104
|
-
|
|
105
|
-
**Usability:**
|
|
106
|
-
- [ ] Users can complete task without leaving for help
|
|
107
|
-
- [ ] Button labels describe action clearly
|
|
108
|
-
- [ ] Form labels clear and persistent
|
|
109
|
-
- [ ] Error messages explain problem and fix
|
|
110
|
-
|
|
111
|
-
**Accessibility:**
|
|
112
|
-
- [ ] Accessible to screen readers
|
|
113
|
-
- [ ] Labels connected to inputs
|
|
114
|
-
- [ ] Error messages associated with fields
|
|
115
|
-
- [ ] Logical heading hierarchy
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
93
|
## Related Documentation
|
|
120
94
|
|
|
121
95
|
- [Voice and tone](../../../brand/voice-and-tone.md) - Voice, tone, style
|
package/agent-docs/external/kuat-agent-rules/reference/media-types/web-product/patterns/README.md
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
# Web Product Patterns
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Outcome-framed patterns for web-application page types, grouped by the user outcome they serve (see the
|
|
4
|
+
[patterns overview](../../../patterns/overview.md)). Each is **single-medium**: its concept and its
|
|
5
|
+
web-product implementation live together in one document.
|
|
6
|
+
|
|
7
|
+
## Help users to…
|
|
8
|
+
|
|
9
|
+
| Pattern | For | Base layout |
|
|
10
|
+
|---------|-----|-------------|
|
|
11
|
+
| [Sign in](./sign-in.md) | Login, registration, password flows, MFA | Single column |
|
|
12
|
+
| [Complete a form](./complete-a-form.md) | Settings, multi-step forms, data entry | Varies |
|
|
13
|
+
|
|
14
|
+
## Pages
|
|
4
15
|
|
|
5
16
|
| Pattern | For | Base layout |
|
|
6
17
|
|---------|-----|-------------|
|
|
7
|
-
| [
|
|
8
|
-
| [
|
|
9
|
-
| [forms.md](./forms.md) | Settings, multi-step forms, data entry | Varies |
|
|
10
|
-
| [documentation.md](./documentation.md) | Docs sites, knowledge bases, API reference | Sidebar + split |
|
|
18
|
+
| [Dashboard](./dashboard.md) | Analytics, data tables, metrics, reporting | Sidebar navigation |
|
|
19
|
+
| [Documentation](./documentation.md) | Docs sites, knowledge bases, API reference | Sidebar + split |
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Help users to complete a form
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**User goal:** Complete a form efficiently — understand what's needed, correct mistakes easily, and not
|
|
4
|
+
lose work in progress.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
> **Pattern:** *Help users to…* · single-medium (web-product) — concept and implementation together.
|
|
7
|
+
> Covers forms, settings pages, multi-step wizards, and data entry interfaces.
|
|
6
8
|
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
### User Goals
|
|
9
|
+
## Context
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
Forms are where users hand over information to get something done, and every field is friction between
|
|
12
|
+
them and their task. They want to complete the task efficiently, understand what each field needs and
|
|
13
|
+
why, fix errors without re-entering data, and trust that their progress won't be lost. This covers
|
|
14
|
+
public forms, app settings, multi-step wizards, and inline data entry.
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
## Principles
|
|
17
17
|
|
|
18
18
|
| Principle | Implementation |
|
|
19
19
|
|-----------|----------------|
|
|
@@ -22,16 +22,11 @@ Patterns for forms, settings pages, multi-step wizards, and data entry interface
|
|
|
22
22
|
| Helpful feedback | Specific, actionable error messages |
|
|
23
23
|
| Progress preservation | Save work, confirm destructive actions |
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Success shows up as: form completion rate, time to complete, error rate and recovery, and abandonment rate.
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
- Time to complete
|
|
29
|
-
- Error rate and recovery
|
|
30
|
-
- Abandonment rate
|
|
27
|
+
## Solution in web-product
|
|
31
28
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
## Layout
|
|
29
|
+
### Layout
|
|
35
30
|
|
|
36
31
|
**Base Layout:** Varies by context
|
|
37
32
|
|
|
@@ -42,7 +37,7 @@ Patterns for forms, settings pages, multi-step wizards, and data entry interface
|
|
|
42
37
|
| Multi-step wizards | Single Column or Horizontal Navigation |
|
|
43
38
|
| Inline editing | Within parent layout |
|
|
44
39
|
|
|
45
|
-
|
|
40
|
+
#### Card-Based Form (Settings, Profile)
|
|
46
41
|
|
|
47
42
|
```
|
|
48
43
|
┌─────────────────────────────────────┐
|
|
@@ -55,7 +50,7 @@ Patterns for forms, settings pages, multi-step wizards, and data entry interface
|
|
|
55
50
|
└─────────────────────────────────────┘
|
|
56
51
|
```
|
|
57
52
|
|
|
58
|
-
|
|
53
|
+
#### Multi-Step Wizard
|
|
59
54
|
|
|
60
55
|
```
|
|
61
56
|
┌─────────────────────────────────────┐
|
|
@@ -72,7 +67,7 @@ Patterns for forms, settings pages, multi-step wizards, and data entry interface
|
|
|
72
67
|
└─────────────────────────────────────┘
|
|
73
68
|
```
|
|
74
69
|
|
|
75
|
-
|
|
70
|
+
#### Specifications
|
|
76
71
|
|
|
77
72
|
| Element | Value |
|
|
78
73
|
|---------|-------|
|
|
@@ -82,11 +77,9 @@ Patterns for forms, settings pages, multi-step wizards, and data entry interface
|
|
|
82
77
|
| Section spacing | 32px between cards |
|
|
83
78
|
| Settings page max-width | 800px |
|
|
84
79
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
## Design
|
|
80
|
+
### Design
|
|
88
81
|
|
|
89
|
-
|
|
82
|
+
#### Color Tokens
|
|
90
83
|
|
|
91
84
|
| Element | Token |
|
|
92
85
|
|---------|-------|
|
|
@@ -98,7 +91,7 @@ Patterns for forms, settings pages, multi-step wizards, and data entry interface
|
|
|
98
91
|
| Error state | `border-destructive`, `text-destructive` |
|
|
99
92
|
| Success indicator | `text-green-600` |
|
|
100
93
|
|
|
101
|
-
|
|
94
|
+
#### Typography
|
|
102
95
|
|
|
103
96
|
| Element | Style |
|
|
104
97
|
|---------|-------|
|
|
@@ -110,7 +103,7 @@ Patterns for forms, settings pages, multi-step wizards, and data entry interface
|
|
|
110
103
|
| Error text | `text-sm text-destructive` |
|
|
111
104
|
| Required indicator | `text-destructive` (asterisk) |
|
|
112
105
|
|
|
113
|
-
|
|
106
|
+
#### Spacing
|
|
114
107
|
|
|
115
108
|
| Element | Value |
|
|
116
109
|
|---------|-------|
|
|
@@ -119,11 +112,9 @@ Patterns for forms, settings pages, multi-step wizards, and data entry interface
|
|
|
119
112
|
| Between fields | 24px |
|
|
120
113
|
| Button group gap | 16px |
|
|
121
114
|
|
|
122
|
-
|
|
115
|
+
### Content
|
|
123
116
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
### Field Labels
|
|
117
|
+
#### Field Labels
|
|
127
118
|
|
|
128
119
|
| Requirement | Example |
|
|
129
120
|
|-------------|---------|
|
|
@@ -131,7 +122,7 @@ Patterns for forms, settings pages, multi-step wizards, and data entry interface
|
|
|
131
122
|
| Required indicator | "Email address *" |
|
|
132
123
|
| Optional indicator | "Phone number (optional)" |
|
|
133
124
|
|
|
134
|
-
|
|
125
|
+
#### Helper Text
|
|
135
126
|
|
|
136
127
|
Use to:
|
|
137
128
|
- Explain format requirements
|
|
@@ -144,7 +135,7 @@ Email address *
|
|
|
144
135
|
We'll send your receipt to this address.
|
|
145
136
|
```
|
|
146
137
|
|
|
147
|
-
|
|
138
|
+
#### Error Messages
|
|
148
139
|
|
|
149
140
|
| Quality | Bad | Good |
|
|
150
141
|
|---------|-----|------|
|
|
@@ -152,7 +143,7 @@ We'll send your receipt to this address.
|
|
|
152
143
|
| Actionable | "Error" | "Please enter a valid date (DD/MM/YYYY)" |
|
|
153
144
|
| Polite | "Wrong!" | "Please check this field" |
|
|
154
145
|
|
|
155
|
-
|
|
146
|
+
#### Button Labels
|
|
156
147
|
|
|
157
148
|
| Action | Label |
|
|
158
149
|
|--------|-------|
|
|
@@ -162,9 +153,7 @@ We'll send your receipt to this address.
|
|
|
162
153
|
| Cancel | "Cancel", "Discard changes" |
|
|
163
154
|
| Delete | "Delete", "Remove" |
|
|
164
155
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
## Accessibility
|
|
156
|
+
### Accessibility
|
|
168
157
|
|
|
169
158
|
**Base requirements:** See [accessibility foundations](../../../accessibility/accessibility.md) and [web accessibility](../accessibility.md)
|
|
170
159
|
|
|
@@ -179,7 +168,7 @@ We'll send your receipt to this address.
|
|
|
179
168
|
| Focus management | Focus first error after failed submission |
|
|
180
169
|
| No time limits | Allow unlimited time (or generous extension) |
|
|
181
170
|
|
|
182
|
-
|
|
171
|
+
#### Form Validation Pattern
|
|
183
172
|
|
|
184
173
|
**Critical: Validate on submit, not on blur**
|
|
185
174
|
|
|
@@ -191,18 +180,16 @@ We'll send your receipt to this address.
|
|
|
191
180
|
| Error summary | Show summary above form with field links |
|
|
192
181
|
| Focus first error | Move focus to first invalid field |
|
|
193
182
|
|
|
194
|
-
|
|
183
|
+
#### Grouping
|
|
195
184
|
|
|
196
185
|
Use `<fieldset>` and `<legend>` for:
|
|
197
186
|
- Radio button groups
|
|
198
187
|
- Checkbox groups
|
|
199
188
|
- Related fields (e.g., address components)
|
|
200
189
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
## Implementation
|
|
190
|
+
### Implementation
|
|
204
191
|
|
|
205
|
-
|
|
192
|
+
#### Field Layout Patterns
|
|
206
193
|
|
|
207
194
|
**Vertical (Default):**
|
|
208
195
|
|
|
@@ -233,7 +220,7 @@ Best for: Settings pages with many fields
|
|
|
233
220
|
|
|
234
221
|
Best for: Related fields (names, addresses)
|
|
235
222
|
|
|
236
|
-
|
|
223
|
+
#### Button Placement
|
|
237
224
|
|
|
238
225
|
**Component guide:** `shadcn:button` — the `components/button.md` guide for button behaviour lives in the consumer package `agent-docs/` or overlay (see [component-registry.md](../component-registry.md)).
|
|
239
226
|
|
|
@@ -259,7 +246,7 @@ Best for: Related fields (names, addresses)
|
|
|
259
246
|
| Left | Back (`variant="outline"`) |
|
|
260
247
|
| Right | Next/Submit (`variant="default"`) |
|
|
261
248
|
|
|
262
|
-
|
|
249
|
+
#### Settings Page Pattern
|
|
263
250
|
|
|
264
251
|
Multiple card sections, each independently saveable:
|
|
265
252
|
|
|
@@ -281,7 +268,7 @@ Multiple card sections, each independently saveable:
|
|
|
281
268
|
| Section max-width | 800px |
|
|
282
269
|
| Alignment | Left-aligned (not centered) |
|
|
283
270
|
|
|
284
|
-
|
|
271
|
+
#### Multi-Step Wizard Pattern
|
|
285
272
|
|
|
286
273
|
**Progress Indicator:**
|
|
287
274
|
|
|
@@ -301,7 +288,7 @@ Multiple card sections, each independently saveable:
|
|
|
301
288
|
- Warn before leaving with unsaved changes
|
|
302
289
|
- Handle session timeout gracefully
|
|
303
290
|
|
|
304
|
-
|
|
291
|
+
#### Responsive Behavior
|
|
305
292
|
|
|
306
293
|
| Breakpoint | Grid Fields | Button Layout |
|
|
307
294
|
|------------|-------------|---------------|
|
|
@@ -309,8 +296,6 @@ Multiple card sections, each independently saveable:
|
|
|
309
296
|
| Tablet | 2 columns | Horizontal |
|
|
310
297
|
| Desktop | As designed | Horizontal |
|
|
311
298
|
|
|
312
|
-
---
|
|
313
|
-
|
|
314
299
|
## Best Practices
|
|
315
300
|
|
|
316
301
|
### Do's
|
|
@@ -352,10 +337,15 @@ Multiple card sections, each independently saveable:
|
|
|
352
337
|
| Session timeout | Save draft, prompt re-auth |
|
|
353
338
|
| Network failure | Queue submission, retry automatically |
|
|
354
339
|
|
|
355
|
-
|
|
340
|
+
## Examples
|
|
341
|
+
|
|
342
|
+
The card-based form above (600px max-width, section title in the header, fields stacked with 24px
|
|
343
|
+
spacing, and `[Cancel] [Save]` in the footer) is the canonical mid-fidelity frame. The same frame
|
|
344
|
+
scales up to independently saveable settings sections and, with a progress indicator and Back / Next
|
|
345
|
+
controls, to multi-step wizards.
|
|
356
346
|
|
|
357
|
-
## Related
|
|
347
|
+
## Related
|
|
358
348
|
|
|
359
349
|
- [Product Design](../design.md) - Layout options
|
|
360
350
|
- [Web Accessibility](../accessibility.md) - Form validation pattern
|
|
361
|
-
- [
|
|
351
|
+
- [Help users to sign in](./sign-in.md) - Login/registration forms
|