ochreui 0.0.0-stage → 0.0.2

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.
Files changed (168) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +153 -2
  3. package/cli/ochreui.mjs +601 -0
  4. package/mcp/core.mjs +126 -0
  5. package/mcp/docs.json +906 -0
  6. package/mcp/server.mjs +23 -0
  7. package/package.json +393 -3
  8. package/registry/agent-team.ts +350 -0
  9. package/registry/avatar.ts +300 -0
  10. package/registry/badge.ts +207 -0
  11. package/registry/breadcrumb.ts +435 -0
  12. package/registry/button.ts +238 -0
  13. package/registry/card.ts +221 -0
  14. package/registry/change-summary.ts +200 -0
  15. package/registry/checkbox.ts +204 -0
  16. package/registry/code-block.ts +332 -0
  17. package/registry/color-picker.ts +720 -0
  18. package/registry/comment-thread.ts +503 -0
  19. package/registry/context-menu.ts +281 -0
  20. package/registry/cover-flow.ts +623 -0
  21. package/registry/date-picker.ts +799 -0
  22. package/registry/decision-inbox.ts +340 -0
  23. package/registry/dialog.ts +577 -0
  24. package/registry/dropdown-menu.ts +864 -0
  25. package/registry/email-draft.ts +916 -0
  26. package/registry/empty-calendar.ts +199 -0
  27. package/registry/empty-state.ts +164 -0
  28. package/registry/enrichment-orbit.ts +164 -0
  29. package/registry/filter-menu.ts +541 -0
  30. package/registry/form-field.ts +308 -0
  31. package/registry/frost-cloud.ts +381 -0
  32. package/registry/ghosted-chat.ts +210 -0
  33. package/registry/glow-cloud.ts +402 -0
  34. package/registry/grid-background.ts +164 -0
  35. package/registry/hover-card.ts +401 -0
  36. package/registry/icon-button.ts +133 -0
  37. package/registry/index.json +2124 -0
  38. package/registry/integration-beam.ts +588 -0
  39. package/registry/integration-grid.ts +209 -0
  40. package/registry/kbd.ts +176 -0
  41. package/registry/layer-stack.ts +351 -0
  42. package/registry/lead-sourcing.ts +285 -0
  43. package/registry/logo-cluster.ts +239 -0
  44. package/registry/logo-marquee.ts +505 -0
  45. package/registry/message-actions.ts +833 -0
  46. package/registry/model-orbit.ts +583 -0
  47. package/registry/model-wheel.ts +372 -0
  48. package/registry/notification-stack.ts +301 -0
  49. package/registry/number-input.ts +552 -0
  50. package/registry/number-ticker.ts +261 -0
  51. package/registry/ochre.css +917 -0
  52. package/registry/otp-input.ts +704 -0
  53. package/registry/overlay.ts +312 -0
  54. package/registry/pagination.ts +362 -0
  55. package/registry/popover.ts +296 -0
  56. package/registry/profile-menu.ts +332 -0
  57. package/registry/progress-tracker.ts +291 -0
  58. package/registry/rating.ts +461 -0
  59. package/registry/reaction-bar.ts +322 -0
  60. package/registry/region-map.ts +537 -0
  61. package/registry/resizable.ts +489 -0
  62. package/registry/scroll-area.ts +271 -0
  63. package/registry/segmented-control.ts +433 -0
  64. package/registry/select.ts +769 -0
  65. package/registry/separator.ts +97 -0
  66. package/registry/shimmer-loader.ts +211 -0
  67. package/registry/side-folder.ts +152 -0
  68. package/registry/skeleton.ts +136 -0
  69. package/registry/skill/INSTRUCTIONS.md +11 -0
  70. package/registry/skill/SKILL.md +65 -0
  71. package/registry/skill/checklist.md +45 -0
  72. package/registry/skill/references/agent-team.md +105 -0
  73. package/registry/skill/references/avatar.md +88 -0
  74. package/registry/skill/references/badge.md +92 -0
  75. package/registry/skill/references/breadcrumb.md +99 -0
  76. package/registry/skill/references/button.md +82 -0
  77. package/registry/skill/references/card.md +111 -0
  78. package/registry/skill/references/catalog.md +114 -0
  79. package/registry/skill/references/change-summary.md +103 -0
  80. package/registry/skill/references/checkbox.md +105 -0
  81. package/registry/skill/references/code-block.md +109 -0
  82. package/registry/skill/references/color-picker.md +138 -0
  83. package/registry/skill/references/comment-thread.md +164 -0
  84. package/registry/skill/references/context-menu.md +205 -0
  85. package/registry/skill/references/cover-flow.md +128 -0
  86. package/registry/skill/references/date-picker.md +154 -0
  87. package/registry/skill/references/decision-inbox.md +126 -0
  88. package/registry/skill/references/dialog.md +155 -0
  89. package/registry/skill/references/dropdown-menu.md +144 -0
  90. package/registry/skill/references/email-draft.md +182 -0
  91. package/registry/skill/references/empty-calendar.md +74 -0
  92. package/registry/skill/references/empty-state.md +118 -0
  93. package/registry/skill/references/enrichment-orbit.md +71 -0
  94. package/registry/skill/references/filter-menu.md +143 -0
  95. package/registry/skill/references/form-field.md +118 -0
  96. package/registry/skill/references/frost-cloud.md +80 -0
  97. package/registry/skill/references/ghosted-chat.md +75 -0
  98. package/registry/skill/references/glow-cloud.md +84 -0
  99. package/registry/skill/references/grid-background.md +76 -0
  100. package/registry/skill/references/hover-card.md +125 -0
  101. package/registry/skill/references/icon-button.md +99 -0
  102. package/registry/skill/references/integration-beam.md +107 -0
  103. package/registry/skill/references/integration-grid.md +100 -0
  104. package/registry/skill/references/kbd.md +65 -0
  105. package/registry/skill/references/layer-stack.md +115 -0
  106. package/registry/skill/references/lead-sourcing.md +92 -0
  107. package/registry/skill/references/logo-cluster.md +92 -0
  108. package/registry/skill/references/logo-marquee.md +123 -0
  109. package/registry/skill/references/message-actions.md +146 -0
  110. package/registry/skill/references/model-orbit.md +106 -0
  111. package/registry/skill/references/model-wheel.md +84 -0
  112. package/registry/skill/references/notification-stack.md +138 -0
  113. package/registry/skill/references/number-input.md +117 -0
  114. package/registry/skill/references/number-ticker.md +73 -0
  115. package/registry/skill/references/otp-input.md +142 -0
  116. package/registry/skill/references/pagination.md +112 -0
  117. package/registry/skill/references/popover.md +143 -0
  118. package/registry/skill/references/profile-menu.md +123 -0
  119. package/registry/skill/references/progress-tracker.md +122 -0
  120. package/registry/skill/references/rating.md +111 -0
  121. package/registry/skill/references/reaction-bar.md +128 -0
  122. package/registry/skill/references/region-map.md +109 -0
  123. package/registry/skill/references/resizable.md +127 -0
  124. package/registry/skill/references/scroll-area.md +113 -0
  125. package/registry/skill/references/segmented-control.md +96 -0
  126. package/registry/skill/references/select.md +122 -0
  127. package/registry/skill/references/separator.md +69 -0
  128. package/registry/skill/references/shimmer-loader.md +83 -0
  129. package/registry/skill/references/side-folder.md +75 -0
  130. package/registry/skill/references/skeleton.md +95 -0
  131. package/registry/skill/references/smart-recommendation.md +132 -0
  132. package/registry/skill/references/spinner.md +84 -0
  133. package/registry/skill/references/switch.md +79 -0
  134. package/registry/skill/references/tab-overload.md +70 -0
  135. package/registry/skill/references/tag-input.md +126 -0
  136. package/registry/skill/references/team-invite.md +94 -0
  137. package/registry/skill/references/testimonial-wall.md +110 -0
  138. package/registry/skill/references/text-area.md +115 -0
  139. package/registry/skill/references/text-field.md +126 -0
  140. package/registry/skill/references/text-reveal.md +71 -0
  141. package/registry/skill/references/thinking-loader.md +87 -0
  142. package/registry/skill/references/time-picker.md +122 -0
  143. package/registry/skill/references/tips-panel.md +115 -0
  144. package/registry/skill/references/toggle-group.md +98 -0
  145. package/registry/skill/references/tool-call-card.md +151 -0
  146. package/registry/skill/references/tooltip.md +94 -0
  147. package/registry/skill/references/tree-view.md +172 -0
  148. package/registry/skill/theming.md +57 -0
  149. package/registry/smart-recommendation.ts +415 -0
  150. package/registry/spinner.ts +67 -0
  151. package/registry/switch.ts +146 -0
  152. package/registry/tab-overload.ts +211 -0
  153. package/registry/tag-input.ts +620 -0
  154. package/registry/team-invite.ts +248 -0
  155. package/registry/testimonial-wall.ts +521 -0
  156. package/registry/text-area.ts +432 -0
  157. package/registry/text-field.ts +415 -0
  158. package/registry/text-reveal.ts +175 -0
  159. package/registry/theme.ts +68 -0
  160. package/registry/thinking-loader.ts +302 -0
  161. package/registry/time-picker.ts +828 -0
  162. package/registry/tips-panel.ts +312 -0
  163. package/registry/toggle-group.ts +357 -0
  164. package/registry/tool-call-card.ts +578 -0
  165. package/registry/tooltip.ts +486 -0
  166. package/registry/tree-view.ts +454 -0
  167. package/styles/base.css +500 -0
  168. package/styles/tokens.css +415 -0
@@ -0,0 +1,45 @@
1
+ # Ochre review checklist
2
+
3
+ Go through every line before you say the work is done. Fix what fails, then go through it again.
4
+
5
+ ## Search the code
6
+
7
+ Run these and look at every hit in code you wrote or changed:
8
+
9
+ ```sh
10
+ grep -rnE '#[0-9a-fA-F]{3,8}\b|rgba?\(' src/app --include=*.ts --include=*.css --include=*.scss --include=*.html | grep -v src/app/ui/
11
+ grep -rn '::ng-deep' src/app
12
+ grep -rnE "from 'ochreui" src/app
13
+ grep -rnE 'font-size: *[0-9]+px|box-shadow: *[0-9]' src/app --include=*.ts --include=*.css --include=*.scss | grep -v src/app/ui/
14
+ ```
15
+
16
+ - No hard-coded colors, font sizes or shadows next to Ochre: use `--ui-*` tokens.
17
+ - No `::ng-deep`.
18
+ - Imports come from the copied files (`./ui/<name>`), not from a package.
19
+
20
+ ## Wiring
21
+
22
+ - [ ] Every component was checked against its `references/<name>.md`: no invented inputs, outputs or types.
23
+ - [ ] Required inputs are set. Outputs are handled. Nothing is wired to a no-op.
24
+ - [ ] State changes produce new arrays and objects; nothing mutates an input in place.
25
+ - [ ] Sample or placeholder data is gone, or clearly marked as such for the user.
26
+ - [ ] Loading, empty and error states are handled where data is fetched.
27
+
28
+ ## Look
29
+
30
+ - [ ] One accent color. Status colors only where they carry a state.
31
+ - [ ] Spacing on the `--ui-space-*` scale; nothing squeezed against a card edge.
32
+ - [ ] The screen looks right in light and in dark (`data-ui-theme="dark"` on `<html>`).
33
+ - [ ] At about 360px wide nothing overflows sideways.
34
+
35
+ ## Accessibility
36
+
37
+ - [ ] Everything works with the keyboard alone, and focus is visible.
38
+ - [ ] Icon-only buttons have an `aria-label`.
39
+ - [ ] Text passes 4.5:1 contrast on its background; borders of fields and the focus ring 3:1.
40
+ - [ ] Nothing important moves when `prefers-reduced-motion` is on.
41
+
42
+ ## Build
43
+
44
+ - [ ] `ng build` passes with strict templates and no budget warnings.
45
+ - [ ] `ochreui diff` shows only the edits you meant to make to copied files.
@@ -0,0 +1,105 @@
1
+ # Agent Team
2
+
3
+ A looping card illustration: a prompt types itself into a pill, a glow blooms, dashed lines draw down and three agents pop in, each with a status dot, a role and up to two tool discs.
4
+
5
+ Add: `npx ochreui@latest add agent-team`
6
+ Import: `import { UiAgentTeam } from './ui/agent-team';`
7
+ Selector: `<ui-agent-team>`
8
+ Docs: /components/agent-team
9
+
10
+ ## When to use
11
+ - AI and automation products where one request staffs several agents or roles.
12
+ - Feature cards and landing sections about delegation, teams or work across several tools.
13
+
14
+ ## When not to use
15
+ - Real org charts or live agent status: it is a picture that loops by itself.
16
+ - More or fewer than three agents: the layout is drawn for exactly three.
17
+
18
+ ## Usage
19
+
20
+ ```ts
21
+ import { Component } from '@angular/core';
22
+ import { AgentTeamMembers, UiAgentTeam } from './ui/agent-team';
23
+
24
+ @Component({
25
+ selector: 'app-agents-feature',
26
+ imports: [UiAgentTeam],
27
+ template: `
28
+ <article>
29
+ <ui-agent-team prompt="Set up a crew to clear my support queue" [members]="team" />
30
+ <h3>One request, a whole team</h3>
31
+ <p>Describe the job once. Three agents pick it up, each with its own role and the tools it needs.</p>
32
+ </article>
33
+ `,
34
+ styles: `
35
+ article { max-inline-size: 560px; border-radius: 16px; background: var(--ui-bg-canvas); box-shadow: 0 0 0 1px var(--ui-hairline); overflow: hidden; }
36
+ ui-agent-team { inline-size: 100%; }
37
+ h3 { margin: 0; padding: 0 24px 4px; font-size: 16px; }
38
+ p { margin: 0; padding: 0 24px 24px; color: var(--ui-text-muted); }
39
+ `,
40
+ })
41
+ export class AgentsFeature {
42
+ protected readonly team: AgentTeamMembers = [
43
+ { role: 'Billing Analyst', tools: ['docs', 'search'] },
44
+ { role: 'Refund Specialist', tools: ['crm', 'chat'] },
45
+ { role: 'Account Lead', tools: ['mail', 'calendar'] },
46
+ ];
47
+ }
48
+ ```
49
+
50
+ ## Rules
51
+ - Pass exactly three members; tools beyond two are ignored.
52
+ - Keep the prompt to about 40 characters and roles to about 18.
53
+ - Size it through the host's inline size (at most 560px); the height follows at 3 : 2.
54
+ - The loop pauses off-screen and in hidden tabs and restarts from the beginning; reduced motion or --ui-motion-scale: 0 shows the finished scene, still.
55
+
56
+ ## Inputs
57
+
58
+ | Name | Type | Default | Description |
59
+ | --- | --- | --- | --- |
60
+ | `members` | `AgentTeamMembers` | required | Exactly three agents, inline start to end. |
61
+ | `prompt` | `string \| undefined` | labels.prompt | The request that types itself, about 40 characters; longer ones are clipped at the button and type for longer. |
62
+ | `label` | `string \| undefined` | labels.label(prompt, roles) | The one sentence screen readers hear; an empty string hides the scene from them. |
63
+ | `labels` | `Partial<AgentTeamLabels>` | English | The default prompt and the label sentence, for translation. |
64
+
65
+ ## AgentTeamMember
66
+
67
+ | Field | Type | Description |
68
+ | --- | --- | --- |
69
+ | `role` | `string` | The role in the chip, one line; long roles end in an ellipsis. |
70
+ | `avatar` | `string \| undefined` | Image URL cropped to a circle; left out, one of three drawn avatars. |
71
+ | `tools` | `readonly AgentTeamTool[] \| undefined` | Up to two tool glyphs, drawn as overlapping discs. |
72
+
73
+ ## AgentTeamMembers
74
+
75
+ `type AgentTeamMembers = readonly [AgentTeamMember, AgentTeamMember, AgentTeamMember]`
76
+
77
+ ## AgentTeamTool
78
+
79
+ `type AgentTeamTool = 'mail' | 'chat' | 'crm' | 'calendar' | 'search' | 'docs'`
80
+
81
+ ## AgentTeamLabels
82
+
83
+ | Field | Type | Description |
84
+ | --- | --- | --- |
85
+ | `prompt` | `string` | Used when prompt is left out. |
86
+ | `label` | `(prompt: string, roles: readonly string[]) => string` | Used when label is left out. |
87
+
88
+ ## CSS variables
89
+
90
+ | Variable | Default | Description |
91
+ | --- | --- | --- |
92
+ | `--ui-agent-team-surface` | `var(--ui-bg-surface)` | Pill, avatar ring and chip fill. |
93
+ | `--ui-agent-team-ink` | `var(--ui-text)` | Prompt and role text. |
94
+ | `--ui-agent-team-line` | `light-dark(var(--ui-border), var(--ui-border-strong))` | Dashed lines. |
95
+ | `--ui-agent-team-accent` | `var(--ui-accent)` | Send button. |
96
+ | `--ui-agent-team-dot` | `var(--ui-hue-green)` | Status dots; the halo is mixed from it. |
97
+ | `--ui-agent-team-glow-a` | `pink, 26% (14% dark)` | Glow at the inline start. |
98
+ | `--ui-agent-team-glow-b` | `violet, 26% (14% dark)` | Glow at the inline end. |
99
+ | `--ui-agent-team-tool-bg` | `var(--ui-gray-0)` | Tool discs, white in both themes. |
100
+
101
+ ## Accessibility
102
+ - Host role=img with one aria-label holding the prompt and the three roles; every child aria-hidden, photos alt="".
103
+ - label="" drops the role and hides the scene (aria-hidden) when nearby text says the same.
104
+ - No live region: typing is never announced. Nothing is focusable.
105
+ - Forced colors: pill, avatars and chips get a CanvasText edge, the send button ButtonText, dots CanvasText, lines GrayText.
@@ -0,0 +1,88 @@
1
+ # Avatar
2
+
3
+ A person's picture or initials on their own soft color, a rounded square for workspaces, an agent's pixel mark, a status dot, and a group that overlaps and ends in +N.
4
+
5
+ Add: `npx ochreui@latest add avatar`
6
+ Import: `import { UiAvatar, UiAvatarGroup } from './ui/avatar';`
7
+ Selector: `<ui-avatar, ui-avatar-group>`
8
+ Docs: /components/avatar
9
+
10
+ ## When to use
11
+ - A person next to their name: comments, members, assignees, the account menu.
12
+ - A workspace, team or org: shape="square".
13
+ - An AI agent: kind="agent", rippling while it works.
14
+ - Who is involved when space is tight: ui-avatar-group with +N.
15
+
16
+ ## When not to use
17
+ - A status with no person: use a badge.
18
+ - A tool or app logo in running text: use an inline icon.
19
+ - Choosing people: use a tag input or combobox.
20
+
21
+ ## Usage
22
+
23
+ ```ts
24
+ import { Component, input } from '@angular/core';
25
+ import { UiAvatar, UiAvatarGroup } from './ui/avatar';
26
+
27
+ export interface Reviewer {
28
+ id: string;
29
+ name: string;
30
+ photo?: string;
31
+ online: boolean;
32
+ }
33
+
34
+ @Component({
35
+ selector: 'app-reviewers',
36
+ imports: [UiAvatar, UiAvatarGroup],
37
+ template: `
38
+ <ui-avatar-group size="24" [max]="4" [attr.aria-label]="reviewers().length + ' reviewers'">
39
+ @for (r of reviewers(); track r.id) {
40
+ <ui-avatar [seed]="r.id" [name]="r.name" [src]="r.photo" [status]="r.online ? 'online' : undefined" />
41
+ }
42
+ <ui-avatar kind="agent" seed="agent_triage" name="Triage bot" />
43
+ </ui-avatar-group>
44
+ `,
45
+ })
46
+ export class Reviewers {
47
+ reviewers = input.required<Reviewer[]>();
48
+ }
49
+ ```
50
+
51
+ ## Rules
52
+ - Agents use kind="agent" with the agent's id as seed, never initials or a robot icon.
53
+ - Always pass a stable id as seed.
54
+ - Hide avatars that sit next to a visible name (aria-hidden="true").
55
+ - Avatars must sit in the group's own content (plain wrappers like <a> are fine), not inside another component's template.
56
+
57
+ ## Inputs
58
+
59
+ | Name | Type | Default | Description |
60
+ | --- | --- | --- | --- |
61
+ | `name` | `string` | none | UiAvatar. Initials, spoken name and (without seed) the color. Without it: gray outline, aria-hidden. |
62
+ | `src` | `string` | none | UiAvatar. Picture URL; initials show while loading and stay on failure. |
63
+ | `size` | `20 \| 24 \| 32 \| 40` | 32 | UiAvatar / UiAvatarGroup. The group's size wins inside a group. |
64
+ | `shape` | `'circle' \| 'square'` | circle (square for agents) | UiAvatar. |
65
+ | `status` | `'online' \| 'away' \| 'busy'` | none | UiAvatar. Corner dot, appended to the spoken name. |
66
+ | `kind` | `'person' \| 'agent'` | 'person' | UiAvatar. agent draws a 3x3 pixel mark; src still wins. |
67
+ | `seed` | `string` | name | UiAvatar. Source of color and pattern; pass a stable id. |
68
+ | `color` | `string` | --ui-hue-blue | UiAvatar, agent only. Mark color. |
69
+ | `working` | `boolean` | false | UiAvatar, agent only. Squares ripple. |
70
+ | `statusLabels` | `Record<AvatarStatus, string>` | online/away/busy | UiAvatar. Spoken status words. |
71
+ | `aria-hidden` | `boolean` | false | UiAvatar. Hide it next to a visible name; static or bound with [aria-hidden]. |
72
+ | `aria-label` | `string` | none | UiAvatar. Replaces the spoken name and status. |
73
+ | `max` | `number` | 4 | UiAvatarGroup. Avatars shown before +N (99+ above 99). |
74
+ | `total` | `number` | none | UiAvatarGroup. Full count when only the first few are passed. |
75
+ | `moreLabel` | `(n: number) => string` | n more | UiAvatarGroup. Spoken name of the +N chip. |
76
+
77
+ ## CSS variables
78
+
79
+ | Variable | Default | Description |
80
+ | --- | --- | --- |
81
+ | `--ui-avatar-ring` | `--ui-bg-surface` | Gap around status dots and grouped avatars; set it to the background they sit on. |
82
+ | `--ui-avatar-wave` | `1200ms` | One ripple of a working agent. Still with reduced motion. |
83
+
84
+ ## Accessibility
85
+ - With a name: role="img" and aria-label "Name[, status]"; initials, mark and dot are aria-hidden; img alt="".
86
+ - Next to a visible name, add aria-hidden="true" or bind [aria-hidden] (not [attr.aria-hidden]).
87
+ - ui-avatar-group is role="group"; give it an aria-label with the total. The +N chip reads "N more".
88
+ - Initials ≥ 4.5:1 and status dots ≥ 3:1 in light and dark; forced colors keep dot and mark.
@@ -0,0 +1,92 @@
1
+ # Badge
2
+
3
+ A small status label that carries color: seven soft tones, a leading dot or icon, a softly pulsing live dot, and a round count up to 99+.
4
+
5
+ Add: `npx ochreui@latest add badge`
6
+ Import: `import { UiBadge, UiBadgeIcon } from './ui/badge';`
7
+ Selector: `<ui-badge>`
8
+ Docs: /components/badge
9
+
10
+ ## When to use
11
+ - The state of a run, deploy or agent on a row or card.
12
+ - A count next to a title or in a sidebar, capped at 99+.
13
+ - A short kind or stage that is not a status (Beta, Draft): neutral or purple.
14
+ - A highlight in your brand color, such as Recommended or New: accent.
15
+ - Something running right now: the live dot.
16
+
17
+ ## When not to use
18
+ - Anything clickable or removable: use a button or a tag input.
19
+ - Summary text and counts in a page header: keep them gray.
20
+ - A longer message about a state: use a notice or toast.
21
+ - A person or agent: use an avatar.
22
+
23
+ ## Usage
24
+
25
+ ```ts
26
+ import { Component, input } from '@angular/core';
27
+ import { BadgeTone, UiBadge } from './ui/badge';
28
+
29
+ export type DeployState = 'building' | 'review' | 'live' | 'failed' | 'queued';
30
+
31
+ const BADGES: Record<DeployState, { tone: BadgeTone; text: string; dot?: boolean; live?: boolean }> = {
32
+ building: { tone: 'info', text: 'Building', live: true },
33
+ review: { tone: 'warning', text: 'Awaiting review', dot: true },
34
+ live: { tone: 'success', text: 'Live' },
35
+ failed: { tone: 'danger', text: 'Failed' },
36
+ queued: { tone: 'neutral', text: 'Queued' },
37
+ };
38
+
39
+ @Component({
40
+ selector: 'app-deploy-row',
41
+ imports: [UiBadge],
42
+ template: `
43
+ @let badge = badges[state()];
44
+ <div class="row">
45
+ <span class="title">{{ service() }}</span>
46
+ <ui-badge [tone]="badge.tone" [dot]="!!badge.dot" [live]="!!badge.live">{{ badge.text }}</ui-badge>
47
+ </div>
48
+ `,
49
+ styles: `
50
+ .row { display: flex; align-items: center; gap: 12px; }
51
+ .title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
52
+ `,
53
+ })
54
+ export class DeployRow {
55
+ service = input.required<string>();
56
+ state = input.required<DeployState>();
57
+ protected readonly badges = BADGES;
58
+ }
59
+ ```
60
+
61
+ ## Rules
62
+ - Map states to tones once: running = info + live, waiting = warning + dot, done = success, failed = danger, queued = neutral.
63
+ - Keep one colored badge per row.
64
+ - Icons go in as <svg uiBadgeIcon>; with dot or live the dot wins.
65
+ - Give counts a label when nearby text doesn't say what is counted.
66
+
67
+ ## Inputs
68
+
69
+ | Name | Type | Default | Description |
70
+ | --- | --- | --- | --- |
71
+ | `(content)` | `text` | none | One or two words; ends in … at the container's width. |
72
+ | `tone` | `'neutral' \| 'info' \| 'success' \| 'warning' \| 'danger' \| 'purple' \| 'accent'` | 'neutral' | Soft tint with text in a deeper shade. info = running, success = done, warning = needs you, danger = failed, purple = a kind like Beta, accent = the brand indigo for a highlight like Recommended. |
73
+ | `size` | `'sm' \| 'md'` | 'sm' | sm 18px / 11px text; md 20px / 12px text. |
74
+ | `dot` | `boolean` | false | A dot in the tone color before the text. |
75
+ | `live` | `boolean` | false | The dot pulses softly; implies dot. |
76
+ | `count` | `number` | none | Round count instead of text; locale-formatted, clamped at 0. NaN with nothing else renders nothing. |
77
+ | `max` | `number` | 99 | Above it the count reads max+. |
78
+ | `label` | `string` | none | What a count means, read instead of the number; or the state of a dot or icon with no text. |
79
+
80
+ ## CSS variables
81
+
82
+ | Variable | Default | Description |
83
+ | --- | --- | --- |
84
+ | `--ui-badge-radius` | `4px (5px md); pill with data-ui-look="tray"` | Corners of a text badge. Counts are always round. |
85
+ | `--ui-badge-pulse` | `1800ms` | One live-dot cycle. Still with reduced motion. |
86
+
87
+ ## Accessibility
88
+ - Plain text, no role; dot and icon are aria-hidden.
89
+ - Color is never the only signal: the word carries the state.
90
+ - label gives a count a spoken meaning (the visible number is aria-hidden), or names a dot or icon that has no text.
91
+ - Every tone's text is ≥ 4.5:1 on its tint in light and dark, over the canvas, surface and tray backgrounds.
92
+ - Forced colors: an outline and a visible dot.
@@ -0,0 +1,99 @@
1
+ # Breadcrumb
2
+
3
+ Where a page sits and the way back up: your own links in one quiet line, the current page last, a long middle folded into a "…" menu, and long names shortened with the full one on hover.
4
+
5
+ Add: `npx ochreui@latest add breadcrumb`
6
+ Import: `import { UiBreadcrumb, UiCrumb, UiCrumbIcon } from './ui/breadcrumb';`
7
+ Selector: `<ui-breadcrumb>`
8
+ Docs: /components/breadcrumb
9
+
10
+ ## When to use
11
+ - Showing where a page sits in a hierarchy: workspace, project, folder, file.
12
+ - Going back up several levels in one click.
13
+ - Deep trails: the middle folds into "…" past maxItems, and on its own when the row is narrow.
14
+
15
+ ## When not to use
16
+ - Paging through one list: use Pagination.
17
+ - Switching views of the same level: use Segmented Control or tabs.
18
+ - Steps of a flow done in order: use a stepper.
19
+ - Picking another workspace from the trail: put a Dropdown Menu on that crumb.
20
+
21
+ ## Usage
22
+
23
+ ```ts
24
+ import { Component } from '@angular/core';
25
+ import { RouterLink } from '@angular/router';
26
+ import { UiBreadcrumb, UiCrumb, UiCrumbIcon } from './ui/breadcrumb';
27
+
28
+ @Component({
29
+ selector: 'app-file-header',
30
+ imports: [UiBreadcrumb, UiCrumb, UiCrumbIcon, RouterLink],
31
+ template: `
32
+ <ui-breadcrumb>
33
+ <a uiCrumb routerLink="/projects">
34
+ <svg uiCrumbIcon viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.25"><path d="M2.5 9.5 4.5 3.5h7l2 6M2.5 9.5v3h11v-3z" /></svg>
35
+ Projects
36
+ </a>
37
+ <a uiCrumb routerLink="/projects/northwind">Northwind</a>
38
+ <a uiCrumb routerLink="/projects/northwind/brand-refresh">Brand refresh</a>
39
+ <span uiCrumb>Logo pack v3</span>
40
+ </ui-breadcrumb>
41
+ `,
42
+ })
43
+ export class FileHeader {}
44
+ ```
45
+
46
+ ## Rules
47
+ - Put each a[uiCrumb], button[uiCrumb] or span[uiCrumb] directly inside <ui-breadcrumb>, top level first; the last is the current page.
48
+ - Use routerLink or href on anchors and (click) on buttons; folded rows link to the same href and follow the crumb itself.
49
+ - Needs dropdown-menu.ts and overlay.ts next to breadcrumb.ts (the CLI adds them).
50
+ - Icon-only crumbs need an aria-label; put uiCrumbIcon on a leading 14px glyph.
51
+
52
+ ## Inputs
53
+
54
+ | Name | Type | Default | Description |
55
+ | --- | --- | --- | --- |
56
+ | `maxItems` | `number` | 4 | Most crumbs shown, "…" included; past it the crumbs after the first fold into the menu. A narrow row folds more on its own. |
57
+ | `separator` | `'slash' \| 'chevron' \| string` | null (slash in Clean, chevron in Classic) | Slash, 14px chevron mirrored in RTL, or any short text. |
58
+ | `labels` | `Partial<BreadcrumbLabels>` | { nav: 'Breadcrumb', more: (n) => 'Show ' + n + ' more crumbs', menu: 'More crumbs' } | Landmark name, "…" button name, menu name. |
59
+ | `label (UiCrumb)` | `string` | its text | The crumb's name in the "…" menu. |
60
+
61
+ ## BreadcrumbLabels
62
+
63
+ | Field | Type | Description |
64
+ | --- | --- | --- |
65
+ | `nav` | `string` | Names the nav landmark. |
66
+ | `more` | `(count: number) => string` | The "…" button's name, given how many crumbs it holds. |
67
+ | `menu` | `string` | Names the menu of folded crumbs. |
68
+
69
+ ## BreadcrumbSeparator
70
+
71
+ `type BreadcrumbSeparator = 'slash' | 'chevron' | (string & {})`
72
+
73
+ ## CSS variables
74
+
75
+ | Variable | Default | Description |
76
+ | --- | --- | --- |
77
+ | `--ui-breadcrumb-color` | `var(--ui-text-muted)` | Crumbs and the "…". |
78
+ | `--ui-breadcrumb-color-current` | `var(--ui-text)` | Current page; crumbs on hover. |
79
+ | `--ui-breadcrumb-separator` | `var(--ui-text-muted) at 45%, Classic 39%` | Separators (decorative, hidden from screen readers). |
80
+ | `--ui-breadcrumb-max-label` | `200px` | Longest a crumb gets before "…"; the current page is not capped. |
81
+
82
+ ## Keyboard
83
+
84
+ | Keys | Action |
85
+ | --- | --- |
86
+ | Tab | Crumbs and the "…"; the current page is skipped. |
87
+ | Enter | Follows a crumb; on "…", opens the menu on its first row. |
88
+ | ArrowDown | On "…", opens the menu; in it, next row, wrapping. |
89
+ | ArrowUp | Previous row, wrapping. |
90
+ | Home / End | First / last row. |
91
+ | Escape | Closes the menu; focus back on "…". |
92
+
93
+ ## Accessibility
94
+ - nav landmark named by labels.nav around an ol; one li per crumb.
95
+ - Last crumb: aria-current=page, not a link, tabindex=-1; separators are CSS with empty alt text.
96
+ - "…": aria-label with the count, aria-haspopup=menu, aria-expanded, aria-controls while open, title listing the folded names; opens a role=menu with menuitem rows.
97
+ - After a crumb or a row is followed and the trail re-renders, focus moves to the new current page.
98
+ - Labels have dir=auto; a title with the full name only while a label is cut.
99
+ - Focus ring on :focus-visible only; forced colors: hovered crumbs underline, the active menu row uses Highlight, the panel keeps an edge.
@@ -0,0 +1,82 @@
1
+ # Button
2
+
3
+ Primary, secondary, ghost and destructive buttons with icons, three sizes, a shimmering loading state that stays focusable, and a width that glides when the label changes.
4
+
5
+ Add: `npx ochreui@latest add button`
6
+ Import: `import { UiButton, UiButtonIcon } from './ui/button';`
7
+ Selector: `<button[uiButton]>`
8
+ Docs: /components/button
9
+
10
+ ## When to use
11
+ - Any action someone starts: submit a form, send a message, open a dialog.
12
+ - Actions that take a moment: loading keeps the label in place, dimmed, while they run.
13
+
14
+ ## When not to use
15
+ - Going to another page: use a link.
16
+ - Switching between views: use a segmented control or tabs.
17
+
18
+ ## Usage
19
+
20
+ ```ts
21
+ import { Component, output, signal } from '@angular/core';
22
+ import { UiButton } from './ui/button';
23
+
24
+ @Component({
25
+ selector: 'app-publish-footer',
26
+ imports: [UiButton],
27
+ template: `
28
+ <footer class="actions">
29
+ <button type="button" uiButton variant="ghost" (click)="cancel.emit()">Cancel</button>
30
+ <button type="button" uiButton [loading]="publishing()" (click)="publish()">Publish</button>
31
+ </footer>
32
+ `,
33
+ styles: `
34
+ .actions { display: flex; justify-content: flex-end; gap: 8px; }
35
+ `,
36
+ })
37
+ export class PublishFooter {
38
+ cancel = output();
39
+ published = output();
40
+ protected readonly publishing = signal(false);
41
+
42
+ protected async publish() {
43
+ this.publishing.set(true);
44
+ await new Promise((done) => setTimeout(done, 1200));
45
+ this.publishing.set(false);
46
+ this.published.emit();
47
+ }
48
+ }
49
+ ```
50
+
51
+ ## Rules
52
+ - Use <button uiButton>, never a div; set type="button" outside forms.
53
+ - Icons go in <svg uiButtonIcon> (before) or <svg uiButtonIconEnd> (after).
54
+ - Announce the end of a loading action in your own aria-live region.
55
+ - Use links, not buttons, for navigation.
56
+
57
+ ## Inputs
58
+
59
+ | Name | Type | Default | Description |
60
+ | --- | --- | --- | --- |
61
+ | `variant` | `'primary' \| 'secondary' \| 'ghost' \| 'destructive'` | 'primary' | Dark chip, white with a hairline edge, text only, or light red for deleting. |
62
+ | `size` | `'sm' \| 'md' \| 'lg'` | 'md' | 24/28/32px (touch 32/34/36); Classic 32/40/48px. |
63
+ | `loading` | `boolean` | false | Spinner in place of the leading icon, shimmering label, aria-busy; clicks and submits ignored; stays focusable. |
64
+
65
+ ## CSS variables
66
+
67
+ | Variable | Default | Description |
68
+ | --- | --- | --- |
69
+ | `--ui-button-radius` | `6px` | Corners; Classic 10/12/14px. |
70
+ | `--ui-button-press` | `0.97` | Scale while held. |
71
+
72
+ ## Keyboard
73
+
74
+ | Keys | Action |
75
+ | --- | --- |
76
+ | Enter or Space | Activates the button. |
77
+
78
+ ## Accessibility
79
+ - The host is the native <button>: focus, keyboard and forms work natively; disabled leaves the tab order.
80
+ - Loading sets aria-busy and aria-disabled, never disabled, so focus stays.
81
+ - Icon-only buttons need aria-label; [uiButtonIcon] / [uiButtonIconEnd] icons are aria-hidden.
82
+ - Labels ≥ 4.5:1 at rest and hover in light and dark; forced colors keep an outline.
@@ -0,0 +1,111 @@
1
+ # Card
2
+
3
+ The container every screen is built from: a header with an icon, a title, a quiet line and an action, then content and a quiet footer. Make the whole card one click target, or show it as the picked one of a few.
4
+
5
+ Add: `npx ochreui@latest add card`
6
+ Import: `import { UiCard, UiCardHeader, UiCardTitle, UiCardDescription, UiCardIcon, UiCardAction, UiCardContent, UiCardFooter, UiCardEnd, UiCardLink } from './ui/card';`
7
+ Selector: `<[uiCard]>`
8
+ Docs: /components/card
9
+
10
+ ## When to use
11
+ - One self-contained thing: an agent, a project, an integration, with its name, a line and an action.
12
+ - A settings group: title and note, fields, Save in the footer.
13
+ - A grid of things to open: interactive, with a link as the title.
14
+ - A few choices side by side: interactive, the picked one selected.
15
+
16
+ ## When not to use
17
+ - Something floating above the page: use Popover or Dialog.
18
+ - Rows of a long list: plain rows with hairlines.
19
+ - Only a line between groups: use Separator.
20
+
21
+ ## Usage
22
+
23
+ ```ts
24
+ import { Component } from '@angular/core';
25
+ import { UiButton } from './ui/button';
26
+ import { UiCard, UiCardAction, UiCardContent, UiCardDescription, UiCardEnd, UiCardFooter, UiCardHeader, UiCardTitle } from './ui/card';
27
+ import { UiIconButton, UiIconButtonIcon } from './ui/icon-button';
28
+
29
+ @Component({
30
+ selector: 'app-release-notes-agent',
31
+ imports: [UiCard, UiCardHeader, UiCardTitle, UiCardDescription, UiCardAction, UiCardContent, UiCardFooter, UiCardEnd, UiButton, UiIconButton, UiIconButtonIcon],
32
+ template: `
33
+ <section uiCard>
34
+ <ui-card-header>
35
+ <h3 uiCardTitle>Release notes writer</h3>
36
+ <p uiCardDescription>Drafts notes from merged pull requests</p>
37
+ <button type="button" uiIconButton uiCardAction size="sm" label="More for Release notes writer">
38
+ <svg uiIconButtonIcon viewBox="0 0 24 24" fill="currentColor"><circle cx="5.5" cy="12" r="1.5" /><circle cx="12" cy="12" r="1.5" /><circle cx="18.5" cy="12" r="1.5" /></svg>
39
+ </button>
40
+ </ui-card-header>
41
+ <p uiCardContent>The last draft covered 14 pull requests and 3 fixes.</p>
42
+ <div uiCardFooter>
43
+ <span>Idle · last run yesterday</span>
44
+ <button type="button" uiButton uiCardEnd variant="secondary" size="sm">Open</button>
45
+ </div>
46
+ </section>
47
+ `,
48
+ styles: `
49
+ p { margin: 0; }
50
+ `,
51
+ })
52
+ export class ReleaseNotesAgent {}
53
+ ```
54
+
55
+ ## Rules
56
+ - Put uiCard on your own element: section/article for page parts, li inside a ul of cards, div otherwise.
57
+ - interactive needs an <a uiCardLink> or <button uiCardLink> inside uiCardTitle.
58
+ - With selected, set aria-pressed (buttons) or aria-current (links) on the uiCardLink.
59
+ - uiCardFooter goes last, as a direct child of the card; uiCardEnd pushes buttons to the end.
60
+ - Don't add a second link that does the same thing as the title link.
61
+
62
+ ## Inputs
63
+
64
+ | Name | Type | Default | Description |
65
+ | --- | --- | --- | --- |
66
+ | `interactive` | `boolean` | false | The whole card is one click target: the uiCardLink in its title stretches over it. Deeper shadow on mouse hover only. |
67
+ | `selected` | `boolean` | false | Shown as picked: grayer fill and firmer edge (Classic: darker tray). Also set aria-pressed or aria-current on the link. |
68
+ | `aria-labelledby` | `string` | the title on section/article | A section or article card without aria-label is labelled by its title; your value is kept. |
69
+ | `aria-label` | `string` | none | Your own name for the card, static or bound. A section or article card with one is not labelled by its title. |
70
+
71
+ ## Parts
72
+
73
+ | Field | Type | Description |
74
+ | --- | --- | --- |
75
+ | `ui-card-header` | `element` | Top row: [uiCardIcon], then title, description and extra content, then [uiCardAction]. |
76
+ | `uiCardTitle` | `h2–h4, p` | The title (h2–h4, or p for choices). Gets an id unless given one. |
77
+ | `uiCardDescription` | `any element` | Quiet line under the title; empty takes no room. |
78
+ | `uiCardIcon` | `any element` | Icon, logo or avatar before the title. |
79
+ | `uiCardAction` | `any element` | At the end of the title line, centred on it. |
80
+ | `uiCardLink` | `a, button` | a or button in the title; covers an interactive card, carries its focus ring, described by the description. Keeps your aria-describedby="…". |
81
+ | `uiCardContent` | `any element` | The body. |
82
+ | `uiCardFooter` | `any element` | Bottom row in small muted text, last in the card; on the tray in Classic. |
83
+ | `uiCardEnd` | `any element` | Pushes a footer item, and what follows, to the end. |
84
+
85
+ ## CSS variables
86
+
87
+ | Variable | Default | Description |
88
+ | --- | --- | --- |
89
+ | `--ui-card-radius` | `calc(var(--ui-radius-md) + 2px + 6px * var(--ui-look-tray))` | Corners: 10px; Classic 16px panel, tray adds 4px. |
90
+ | `--ui-card-padding` | `var(--ui-space-4)` | Inner space. |
91
+ | `--ui-card-gap` | `var(--ui-space-3)` | Space between header, content and footer. |
92
+ | `--ui-card-bg` | `var(--ui-bg-surface)` | Fill. |
93
+ | `--ui-card-bg-selected` | `color-mix(in srgb, var(--ui-bg-muted) 45%, var(--ui-bg-surface)); Classic color-mix(in srgb, var(--ui-text) 5%, var(--ui-tray-bg))` | Selected fill; in Classic the tray around the panel. |
94
+ | `--ui-card-edge` | `color-mix(in srgb, var(--ui-bg-muted) 88%, var(--ui-bg-surface))` | Resting edge. On grey surfaces set --ui-card-edge: var(--ui-hairline). |
95
+ | `--ui-card-edge-hover` | `color-mix(in srgb, var(--ui-text) 5%, var(--ui-bg-muted))` | Edge under a mouse on an interactive card. |
96
+ | `--ui-card-edge-selected` | `color-mix(in srgb, var(--ui-text) 9%, var(--ui-bg-muted))` | Edge of a selected card. |
97
+
98
+ ## Keyboard
99
+
100
+ | Keys | Action |
101
+ | --- | --- |
102
+ | Tab | Reaches an interactive card through its title link or button; ring around the whole card. Inner buttons follow. |
103
+ | Enter | Opens the title link or presses its button. |
104
+ | Space | Presses the title button. |
105
+
106
+ ## Accessibility
107
+ - Title is a real heading (p in choice lists); section/article cards are labelled by it, so the name is read once.
108
+ - One real link or button is the target, described by the description; no clickable div.
109
+ - Other buttons stay separate targets above the stretched link.
110
+ - Selected is also said with aria-pressed or aria-current; dev-mode warning when missing.
111
+ - Forced colors: CanvasText edge on every card, 2px Highlight edge when selected.