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,126 @@
1
+ # Tag Input
2
+
3
+ Several short values in one field, each shown as a chip. Paste a whole list, check each value, flash duplicates, edit with Backspace and the arrows, and cap the count, with signal forms, reactive forms or ngModel.
4
+
5
+ Add: `npx ochreui@latest add tag-input`
6
+ Import: `import { UiTagInput, UiTag } from './ui/tag-input';`
7
+ Selector: `<ui-tag-input>`
8
+ Docs: /components/tag-input
9
+
10
+ ## When to use
11
+ - Several short values in one field: emails to invite, labels, keywords, domains, stop words.
12
+ - Lists pasted from elsewhere: commas, semicolons and new lines become chips at once.
13
+
14
+ ## When not to use
15
+ - Picking from a fixed list: use Combobox.
16
+ - A single value: use Text Field.
17
+
18
+ ## Usage
19
+
20
+ ```ts
21
+ import { Component, signal } from '@angular/core';
22
+ import { FormField, form, maxLength } from '@angular/forms/signals';
23
+ import { UiTag, UiTagInput } from './ui/tag-input';
24
+
25
+ const EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
26
+
27
+ @Component({
28
+ selector: 'app-invite-teammates',
29
+ imports: [UiTagInput, UiTag, FormField],
30
+ template: `
31
+ <ui-tag-input label="Invite teammates" hint="Paste a list: commas, spaces or new lines." avatar>
32
+ <input uiTagInput [formField]="f.emails" placeholder="name@company.com" inputmode="email"
33
+ splitOnSpace [normalize]="lower" [validate]="isEmail" />
34
+ </ui-tag-input>
35
+ `,
36
+ })
37
+ export class InviteTeammates {
38
+ protected readonly lower = (v: string) => v.trim().toLowerCase();
39
+ protected readonly isEmail = (v: string) => EMAIL.test(v) || `“${v}” doesn't look like an email address.`;
40
+ private readonly model = signal({ emails: ['lena@northwind.io'] });
41
+ protected readonly f = form(this.model, (p) => maxLength(p.emails, 10));
42
+ }
43
+ ```
44
+
45
+ ## Rules
46
+ - Put uiTagInput on your own <input> inside ui-tag-input; bind [formField], formControl(Name), ngModel or [(value)].
47
+ - The form value is string[]; the input text is only a draft.
48
+ - With [formField], set the cap with maxLength() in the schema and let the field set name; do not write maxLength or name attributes.
49
+ - Without signal forms, write maxLength="10" and name="…" on the input.
50
+ - validate returns true or the message to show; normalize runs first.
51
+ - Duplicates compare case-insensitively unless caseSensitive is set.
52
+
53
+ ## Inputs
54
+
55
+ | Name | Type | Default | Description |
56
+ | --- | --- | --- | --- |
57
+ | `label` | `string` | none | Above the field; clicking focuses the input. |
58
+ | `hint` | `string` | none | Quiet line under the field; a message replaces it. |
59
+ | `error` | `string \| null \| undefined` | none | Invalid from outside: red edge, aria-invalid, message in place of the hint. |
60
+ | `optional` | `boolean` | false | "Optional" after the label, also spoken. |
61
+ | `avatar` | `boolean` | false | First-letter circle on every chip, for people. |
62
+ | `labels` | `Partial<TagInputLabels>` | English | Translations; {tag} and {n} are replaced. |
63
+ | `value (UiTag)` | `string[] (model)` | [] | The chips; [(value)] or a form binding. |
64
+ | `validate (UiTag)` | `(tag: string) => true \| string` | none | Check before adding; a message keeps the text in the field. |
65
+ | `normalize (UiTag)` | `(tag: string) => string` | trim | Cleans a value before the check and duplicate test. |
66
+ | `splitOnSpace (UiTag)` | `boolean` | false | Space also adds a chip. |
67
+ | `caseSensitive (UiTag)` | `boolean` | false | Duplicates compare case-sensitively. |
68
+ | `maxLength (UiTag)` | `number` | none | Cap on the chip count; shows n/cap. Signal forms: schema maxLength(). |
69
+ | `maxlength (UiTag)` | `number` | none | Lower case: character limit for the typed value, kept on the input. |
70
+ | `name (UiTag)` | `string` | none | Native form submission, one hidden input per chip. Signal forms set it. |
71
+ | `placeholder (UiTag)` | `string` | "Add…" | While empty; "Add more…" after the first chip, none at the cap. |
72
+ | `id / aria-describedby (UiTag)` | `string` | generated | Kept and merged with the field description. |
73
+
74
+ ## Outputs
75
+
76
+ | Name | Payload | Description |
77
+ | --- | --- | --- |
78
+ | `valueChange (UiTag)` | `string[]` | After a chip is added or removed. |
79
+ | `added (UiTag)` | `string[]` | Values just added (several after a paste). |
80
+ | `removed (UiTag)` | `string` | Value just removed. |
81
+
82
+ ## TagInputLabels
83
+
84
+ | Field | Type | Description |
85
+ | --- | --- | --- |
86
+ | `optional` | `string` | Tag after the label. |
87
+ | `add` | `string` | Placeholder with no chips and none of your own. |
88
+ | `addMore` | `string` | Placeholder after the first chip. |
89
+ | `remove` | `string` | Name of each ×, with {tag}. |
90
+ | `added` | `string` | Announced after adding one, with {tag}. |
91
+ | `addedMany` | `string` | Announced after a paste, with {n}. |
92
+ | `removed` | `string` | Announced after removing, with {tag}. |
93
+ | `duplicate` | `string` | Announced for a duplicate, with {tag}. |
94
+ | `armed` | `string` | Announced after the first Backspace, with {tag}. |
95
+ | `limit` | `string` | Message when the cap stops an addition, with {n}. |
96
+
97
+ ## CSS variables
98
+
99
+ | Variable | Default | Description |
100
+ | --- | --- | --- |
101
+ | `--ui-text-field-edge` | `var(--ui-hairline)` | Resting edge (shared with Text Field). |
102
+ | `--ui-text-field-edge-hover` | `text at 18%` | Hover edge. |
103
+ | `--ui-text-field-edge-focus` | `var(--ui-border-input)` | Focused edge, ≥ 3:1. |
104
+ | `--ui-text-field-radius` | `7px` | Corners (Classic 10px). |
105
+ | `--ui-tag-input-max-height` | `156px (Classic 168px)` | Height after which the chips scroll. |
106
+
107
+ ## Keyboard
108
+
109
+ | Keys | Action |
110
+ | --- | --- |
111
+ | Enter / , / ; | Add the draft as a chip. |
112
+ | Space | Add, with splitOnSpace. |
113
+ | Tab | Add and move on; stays when rejected. |
114
+ | Backspace (empty field) | Select the last chip, then remove it. |
115
+ | ← (→ in RTL) at the start | Focus the last chip. |
116
+ | ← / → on a chip | Previous / next chip, then the field; mirrored in RTL. |
117
+ | Home / End on a chip | First chip / the field. |
118
+ | Backspace / Delete / Enter on a chip | Remove; focus the next chip or the field. |
119
+ | Esc | Clear the draft and its message; on a chip, back to the field. |
120
+
121
+ ## Accessibility
122
+ - Native input named by the label, described by the hint/message and a status region; rejection sets aria-invalid.
123
+ - Each × is named "Remove …", tabindex -1, and is the chip's roving focus stop.
124
+ - Adds, removals, duplicates and the Backspace selection are announced.
125
+ - Never disabled at the cap, so focus never drops to the page.
126
+ - Text ≥ 4.5:1, × and focus edge ≥ 3:1; forced colors keep the field edge and chip frames.
@@ -0,0 +1,94 @@
1
+ # Team Invite
2
+
3
+ A looping card illustration: a cursor drags a third avatar into an empty dashed slot next to two linked teammates; the line turns solid and the newcomer comes online.
4
+
5
+ Add: `npx ochreui@latest add team-invite`
6
+ Import: `import { UiTeamInvite } from './ui/team-invite';`
7
+ Selector: `<ui-team-invite>`
8
+ Docs: /components/team-invite
9
+
10
+ ## When to use
11
+ - Feature cards about inviting people, sharing, collaboration or working together live.
12
+ - Onboarding steps such as "add your teammates", where a small moving scene helps.
13
+
14
+ ## When not to use
15
+ - A real member list or invite status: it is a picture that loops by itself.
16
+ - Screens that must stay completely still: lean on reduced motion, or use a static image.
17
+
18
+ ## Usage
19
+
20
+ ```ts
21
+ import { Component } from '@angular/core';
22
+ import { TeamInviteAvatars, UiTeamInvite } from './ui/team-invite';
23
+
24
+ @Component({
25
+ selector: 'app-invite-feature',
26
+ imports: [UiTeamInvite],
27
+ template: `
28
+ <article>
29
+ <ui-team-invite [avatars]="team" />
30
+ <h3>Bring your team along</h3>
31
+ <p>Send one link and new people land in the right workspace, ready to go.</p>
32
+ </article>
33
+ `,
34
+ styles: `
35
+ article { max-inline-size: 420px; border-radius: 16px; background: var(--ui-bg-canvas); box-shadow: 0 0 0 1px var(--ui-hairline); overflow: hidden; }
36
+ ui-team-invite { 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 InviteFeature {
42
+ protected readonly team: TeamInviteAvatars = [{ name: 'Nora' }, { name: 'Emil' }, { name: 'Ada' }];
43
+ }
44
+ ```
45
+
46
+ ## Rules
47
+ - Pass exactly three avatars: the two linked teammates, then the one being invited.
48
+ - Use square portraits; they are cropped to a circle. Names go only into the screen-reader sentence.
49
+ - Size it through the host inline size (at most 560px); the height follows at 3 : 2.
50
+ - The loop pauses off-screen and in hidden tabs and restarts from the beginning; reduced motion or --ui-motion-scale: 0 shows the waiting scene, still.
51
+ - The scene keeps its physical layout in right-to-left pages.
52
+
53
+ ## Inputs
54
+
55
+ | Name | Type | Default | Description |
56
+ | --- | --- | --- | --- |
57
+ | `avatars` | `TeamInviteAvatars` | required | Exactly three people: the two linked teammates, then the one being invited. |
58
+ | `label` | `string \| undefined` | labels.label(names) | The one sentence screen readers hear; an empty string hides the scene from them. |
59
+ | `labels` | `Partial<TeamInviteLabels>` | English | The label sentence and the stand-ins for missing names, for translation. |
60
+
61
+ ## TeamInviteAvatar
62
+
63
+ | Field | Type | Description |
64
+ | --- | --- | --- |
65
+ | `src` | `string \| undefined` | Square portrait URL cropped to a circle; left out, one of three drawn avatars. |
66
+ | `name` | `string \| undefined` | First name, heard in the label only. |
67
+
68
+ ## TeamInviteAvatars
69
+
70
+ `type TeamInviteAvatars = readonly [TeamInviteAvatar, TeamInviteAvatar, TeamInviteAvatar]`
71
+
72
+ ## TeamInviteLabels
73
+
74
+ | Field | Type | Description |
75
+ | --- | --- | --- |
76
+ | `unnamed` | `readonly [string, string, string]` | Stand-ins for missing names, in avatar order. |
77
+ | `label` | `(names: readonly [string, string, string]) => string` | Used when label is left out. |
78
+
79
+ ## CSS variables
80
+
81
+ | Variable | Default | Description |
82
+ | --- | --- | --- |
83
+ | `--ui-team-invite-surface` | `var(--ui-bg-surface)` | The ring around each avatar. |
84
+ | `--ui-team-invite-line` | `light-dark(var(--ui-border), var(--ui-border-strong))` | The links and the dashed slot. |
85
+ | `--ui-team-invite-plus` | `var(--ui-text-muted) at 35% (45% dark)` | The + in the empty slot. |
86
+ | `--ui-team-invite-dot` | `color-mix(in srgb, var(--ui-hue-green) 55%, var(--ui-green-dark))` | Status dots; the halo is mixed from it. |
87
+ | `--ui-team-invite-cursor` | `near-black navy (gray-1000 with a touch of indigo)` | The pointer fill, the same in both themes. |
88
+ | `--ui-team-invite-cursor-edge` | `var(--ui-gray-0)` | The pointer outline, white in both themes. |
89
+
90
+ ## Accessibility
91
+ - Host role=img with one aria-label naming the three people; every child aria-hidden, portraits alt="" and draggable=false.
92
+ - label="" drops the role and hides the scene (aria-hidden) when nearby text says the same.
93
+ - Nothing is focusable or interactive; no live region.
94
+ - Forced colors: avatars get a CanvasText edge, links and + CanvasText, the dashed line and slot GrayText, dots CanvasText, the cursor CanvasText with a Canvas edge.
@@ -0,0 +1,110 @@
1
+ # Testimonial Wall
2
+
3
+ A landing-page wall of customer quotes in up to three columns that scroll endlessly in opposite directions. A column eases to a stop under the pointer, on keyboard focus or a touch hold, and the mouse can drag it and fling it.
4
+
5
+ Add: `npx ochreui@latest add testimonial-wall`
6
+ Import: `import { UiTestimonialWall } from './ui/testimonial-wall';`
7
+ Selector: `<ui-testimonial-wall>`
8
+ Docs: /components/testimonial-wall
9
+
10
+ ## When to use
11
+ - A "loved by" section on a landing or pricing page with eight quotes or more.
12
+ - Social proof that should feel alive but stop as soon as someone reads.
13
+
14
+ ## When not to use
15
+ - Two or three quotes: place them side by side.
16
+ - A single hero quote or a case study: use a still, larger layout.
17
+ - Reviews people search or filter: use a list or a grid.
18
+
19
+ ## Usage
20
+
21
+ ```ts
22
+ import { Component } from '@angular/core';
23
+ import { Testimonial, UiTestimonialWall } from './ui/testimonial-wall';
24
+
25
+ @Component({
26
+ selector: 'app-customer-love',
27
+ imports: [UiTestimonialWall],
28
+ template: `
29
+ <section>
30
+ <p class="eyebrow">Testimonials</p>
31
+ <h2>Trusted by teams who keep things running</h2>
32
+ <ui-testimonial-wall [items]="quotes" [speed]="26" label="What our customers say" />
33
+ </section>
34
+ `,
35
+ styles: `
36
+ section { display: grid; gap: 6px; text-align: center; }
37
+ .eyebrow { margin: 0; color: var(--ui-text-muted); font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; }
38
+ h2 { margin: 0 0 18px; font-size: 24px; font-weight: 500; }
39
+ ui-testimonial-wall { --ui-testimonial-wall-height: 640px; text-align: start; }
40
+ `,
41
+ })
42
+ export class CustomerLove {
43
+ // Two quotes per column at least; four or more reads best.
44
+ protected readonly quotes: Testimonial[] = [
45
+ { quote: 'Setup took one coffee. We have not looked back since.', name: 'Kwame Asante', role: 'Founder', company: 'Tidewell Freight', verified: true },
46
+ { quote: 'Patients get their reminders and the front desk gets its evenings back.', name: 'Rafael Quintero', role: 'Head of Support', company: 'Pinecrest Clinics', rating: 5 },
47
+ { quote: 'It feels like it was made by people who have worked a till on a Saturday.', name: 'Aiko Fujimura', role: 'Store Lead', company: 'Paperlantern Books', avatar: '/avatars/aiko.jpg' },
48
+ { quote: 'Month-end close went from four days to a day and a half.', name: 'Tomasz Wrona', role: 'Finance Director', company: 'Brightwater Co-op', rating: 4 },
49
+ { quote: 'Clear, quick and quiet. Exactly what I want from something I open fifty times a day.', name: 'Nadia Bensalem', role: 'Product Owner', company: 'Fernhill Energy' },
50
+ { quote: 'I trust the numbers again.', name: 'Matteo Ferrante', role: 'Logistics Analyst', company: 'Northgate Haulage' },
51
+ ];
52
+ }
53
+ ```
54
+
55
+ ## Rules
56
+ - Give at least two quotes per column, ideally four or more.
57
+ - Set the height with --ui-testimonial-wall-height, not an input; the wall takes the container width.
58
+ - Columns follow the wall width (740 / 480px), not the viewport.
59
+ - Runs only on screen in a visible tab; mouse drag scrubs, touch swipes scroll the page.
60
+
61
+ ## Inputs
62
+
63
+ | Name | Type | Default | Description |
64
+ | --- | --- | --- | --- |
65
+ | `items` | `readonly Testimonial[]` | required | The quotes, dealt round-robin across the columns; none shows the empty note. |
66
+ | `columns` | `1 \| 2 \| 3` | 3 | Most columns on a wide wall; 2 below 740px and 1 below 480px of the wall's own width; never more than the quotes. |
67
+ | `speed` | `number` | 28 | px/s of column 1; column 2 runs x0.84 downward, column 3 x1.12 upward. 0 is still. |
68
+ | `pauseOnHover` | `boolean` | true | The hovered column eases to a stop. Keyboard focus and touch hold always stop their column. |
69
+ | `paused` | `boolean (model)` | false | Eases every column to a stop while true; bind [(paused)] to your own pause control. |
70
+ | `label` | `string` | 'What customers say' | Accessible name of the region. |
71
+ | `labels` | `Partial<TestimonialWallLabels>` | English | rated(n), verified, empty. |
72
+
73
+ ## Outputs
74
+
75
+ | Name | Payload | Description |
76
+ | --- | --- | --- |
77
+ | `pausedChange` | `boolean` | From the paused model, for [(paused)]. |
78
+
79
+ ## Testimonial
80
+
81
+ `type Testimonial = { quote: string; name: string; role?: string; company?: string; avatar?: string; rating?: 1 | 2 | 3 | 4 | 5; verified?: boolean }`
82
+
83
+ ## TestimonialWallLabels
84
+
85
+ `type TestimonialWallLabels = { rated: (stars: number) => string; verified: string; empty: string }`
86
+
87
+ ## CSS variables
88
+
89
+ | Variable | Default | Description |
90
+ | --- | --- | --- |
91
+ | `--ui-testimonial-wall-height` | `600px` | Wall height; reduced motion grows it to fit every quote. |
92
+ | `--ui-testimonial-wall-fade` | `120px (Classic 96px)` | Soft fade at the top and bottom edges. |
93
+ | `--ui-testimonial-wall-card-shadow` | `0 0 0 0.5px edge, 0 1px 1px -1px, 0 1px 2px` | Card edge at rest. |
94
+ | `--ui-testimonial-wall-card-shadow-hover` | `0 0 0 0.5px edge, 0 2px 4px, 0 12px 24px -12px` | Card edge when lifted by hover or keyboard focus. |
95
+
96
+ ## Keyboard
97
+
98
+ | Keys | Action |
99
+ | --- | --- |
100
+ | Tab | Next quote, down column 1 then column 2; its column stops and a partly hidden quote slides into view. |
101
+ | Shift+Tab | Previous quote; leaving the wall lets every column run again. |
102
+
103
+ ## Accessibility
104
+ - role=region named by label; one list per column; each quote a figure with blockquote and figcaption.
105
+ - Each figure is named by the person's name only (aria-labelledby); verified is visually hidden text, read once.
106
+ - Loop copies are aria-hidden and hold no tab stops, so every quote is read and focused once; they still take hover and drag.
107
+ - Hover, keyboard focus (focus-visible) and touch hold stop their column; [(paused)] stops all.
108
+ - Stars are one role=img with "Rated n out of 5"; avatars alt=""; initials aria-hidden.
109
+ - Reduced motion or --ui-motion-scale: 0: still masonry at natural height, no fade, no copies.
110
+ - Forced colors: card and initials edges become CanvasText.
@@ -0,0 +1,115 @@
1
+ # Text Area
2
+
3
+ Several lines of text with a label, hint and error in place. It grows with what you type, gives more room on request, counts characters, and sends on ⌘ Enter. Your own textarea inside, so every kind of Angular form just works.
4
+
5
+ Add: `npx ochreui@latest add text-area`
6
+ Import: `import { UiTextArea, UiTextarea } from './ui/text-area';`
7
+ Selector: `<ui-text-area>`
8
+ Docs: /components/text-area
9
+
10
+ ## When to use
11
+ - Several lines: descriptions, notes, release notes, feedback.
12
+ - Prompts and instructions, with more room while editing.
13
+ - Short messages sent with ⌘ Enter.
14
+
15
+ ## When not to use
16
+ - One line: use Text Field.
17
+ - A chat box with attachments and a send button: use Chat Composer.
18
+
19
+ ## Usage
20
+
21
+ ```ts
22
+ import { Component, signal } from '@angular/core';
23
+ import { FormField, form, maxLength } from '@angular/forms/signals';
24
+ import { UiTextArea, UiTextarea } from './ui/text-area';
25
+
26
+ @Component({
27
+ selector: 'app-workspace-context',
28
+ imports: [UiTextArea, UiTextarea, FormField],
29
+ template: `
30
+ <ui-text-area
31
+ label="Workspace context"
32
+ hint="Added to every chat in this workspace. ⌘ Enter saves."
33
+ counter
34
+ expandable
35
+ [maxRows]="8"
36
+ submitShortcut
37
+ (submitted)="save($event)"
38
+ >
39
+ <textarea uiTextarea [formField]="f.context"></textarea>
40
+ </ui-text-area>
41
+ `,
42
+ })
43
+ export class WorkspaceContext {
44
+ private readonly model = signal({ context: 'We sell refurbished laptops to schools in Portugal and Spain.' });
45
+ protected readonly f = form(this.model, (p) => maxLength(p.context, 2000));
46
+
47
+ protected save(text: string) {
48
+ console.log('Saved', text.length, 'characters');
49
+ }
50
+ }
51
+ ```
52
+
53
+ ## Rules
54
+ - Put uiTextarea on your own <textarea> inside ui-text-area and bind it with [formField], formControl or ngModel.
55
+ - With [formField], set limits through the schema (maxLength()), not the maxlength attribute.
56
+ - Pass the error string you want shown; the field doesn't read form state itself.
57
+ - Don't set rows or a height yourself; use minRows, maxRows and expandedRows.
58
+ - Keep your own descriptions with aria-describedby="…" or [aria-describedby], not [attr.aria-describedby].
59
+
60
+ ## Inputs
61
+
62
+ | Name | Type | Default | Description |
63
+ | --- | --- | --- | --- |
64
+ | `label` | `string` | none | Above the field; clicking focuses the text. |
65
+ | `hint` | `string` | none | Quiet line under the field; the error replaces it. |
66
+ | `error` | `string \| null \| undefined` | none | Invalid state: red edge, aria-invalid, message in place of the hint. Signal forms: f.x().errors()[0]?.message. |
67
+ | `optional` | `boolean` | false | "Optional" after the label, also spoken. |
68
+ | `counter` | `boolean` | false | "120/2,000" from maxlength (signal forms: maxLength()). Darker at the limit, red over. |
69
+ | `minRows` | `number` | 3 | Height while empty, in lines. |
70
+ | `maxRows` | `number` | 10 | Grows up to this many lines, then scrolls. |
71
+ | `expandable` | `boolean` | false | Corner button for more room. |
72
+ | `expandedRows` | `number` | 16 | Lines while expanded, even when empty. |
73
+ | `expanded` | `boolean (model)` | false | Expanded state; [(expanded)] to control it. |
74
+ | `submitShortcut` | `boolean` | false | ⌘/Ctrl+Enter emits submitted; Enter alone is a new line. |
75
+ | `labels` | `Partial<TextAreaLabels>` | English | Translations: optional, moreRoom, lessRoom. |
76
+
77
+ ## Outputs
78
+
79
+ | Name | Payload | Description |
80
+ | --- | --- | --- |
81
+ | `submitted` | `string` | The value on ⌘/Ctrl+Enter with submitShortcut, even when empty. |
82
+ | `expandedChange` | `boolean` | After the corner button changed the room. |
83
+
84
+ ## TextAreaLabels
85
+
86
+ | Field | Type | Description |
87
+ | --- | --- | --- |
88
+ | `optional` | `string` | Tag after the label. |
89
+ | `moreRoom` | `string` | Corner button while compact. |
90
+ | `lessRoom` | `string` | Corner button while expanded. |
91
+
92
+ ## CSS variables
93
+
94
+ | Variable | Default | Description |
95
+ | --- | --- | --- |
96
+ | `--ui-text-field-edge` | `var(--ui-hairline)` | Resting edge (shared with Text Field). |
97
+ | `--ui-text-field-edge-hover` | `text at 18%` | Hover edge. |
98
+ | `--ui-text-field-edge-focus` | `var(--ui-border-input)` | Focused edge, ≥ 3:1. |
99
+ | `--ui-text-area-radius` | `8px` | Corners (Classic 10px). |
100
+
101
+ ## Keyboard
102
+
103
+ | Keys | Action |
104
+ | --- | --- |
105
+ | Tab | Text, then its corner button. |
106
+ | Enter | New line, always. |
107
+ | ⌘/Ctrl+Enter | With submitShortcut, emits submitted. |
108
+ | Enter or Space | On the corner button, toggles the room; focus stays. |
109
+
110
+ ## Accessibility
111
+ - Native textarea with label for; otherwise aria-label on the textarea.
112
+ - Hint/error and counter in aria-describedby (merged with yours); error sets aria-invalid and is announced.
113
+ - Corner button: More room / Less room label, aria-controls the textarea.
114
+ - aria-keyshortcuts with submitShortcut; ignored while an IME composes.
115
+ - Text ≥ 4.5:1, focus edge ≥ 3:1; forced colors keep edge and focus outline.
@@ -0,0 +1,126 @@
1
+ # Text Field
2
+
3
+ One input for every form: label, hint and error in place, prefix and suffix, a clear ×, show password, copy, and a character count. Your own input inside, so every kind of Angular form just works.
4
+
5
+ Add: `npx ochreui@latest add text-field`
6
+ Import: `import { UiTextField, UiInput, UiTextFieldPrefix, UiTextFieldSuffix } from './ui/text-field';`
7
+ Selector: `<ui-text-field>`
8
+ Docs: /components/text-field
9
+
10
+ ## When to use
11
+ - Any one-line field: names, emails, URLs, amounts, search, passwords, keys.
12
+ - Settings, sign-up and onboarding forms.
13
+
14
+ ## When not to use
15
+ - Several lines: use Text Area.
16
+ - A fixed list: use Select or Combobox.
17
+ - Verification codes: use OTP Input.
18
+
19
+ ## Usage
20
+
21
+ ```ts
22
+ import { Component, signal } from '@angular/core';
23
+ import { FormField, form, maxLength, pattern, required } from '@angular/forms/signals';
24
+ import { UiInput, UiTextField } from './ui/text-field';
25
+
26
+ @Component({
27
+ selector: 'app-workspace-form',
28
+ imports: [UiTextField, UiInput, FormField],
29
+ template: `
30
+ <form class="fields" (submit)="save($event)">
31
+ <ui-text-field label="Workspace name" counter clearable>
32
+ <input uiInput [formField]="f.name" />
33
+ </ui-text-field>
34
+ <ui-text-field label="Workspace URL" prefix="northwind.app/" hint="Lowercase letters, numbers and dashes." [error]="f.slug().errors()[0]?.message">
35
+ <input uiInput [formField]="f.slug" spellcheck="false" autocapitalize="none" />
36
+ </ui-text-field>
37
+ <ui-text-field label="Password">
38
+ <input uiInput type="password" [formField]="f.password" autocomplete="new-password" />
39
+ </ui-text-field>
40
+ <ui-text-field label="API key" copyable>
41
+ <input uiInput readonly [value]="apiKey" />
42
+ </ui-text-field>
43
+ </form>
44
+ `,
45
+ styles: `
46
+ .fields { display: flex; flex-direction: column; gap: 16px; max-width: 360px; }
47
+ `,
48
+ })
49
+ export class WorkspaceForm {
50
+ protected readonly apiKey = 'nw_live_3fK8pQ2r';
51
+ private readonly model = signal({ name: 'Northwind', slug: 'northwind', password: '' });
52
+ protected readonly f = form(this.model, (p) => {
53
+ required(p.name);
54
+ maxLength(p.name, 32);
55
+ pattern(p.slug, /^[a-z0-9-]*$/, { message: 'Only lowercase letters, numbers and dashes.' });
56
+ });
57
+
58
+ protected save(event: Event) {
59
+ event.preventDefault();
60
+ }
61
+ }
62
+ ```
63
+
64
+ ## Rules
65
+ - Put uiInput on your own <input> inside ui-text-field and bind it with [formField], formControl or ngModel.
66
+ - With [formField], set limits through the schema (maxLength()), not the maxlength attribute.
67
+ - Pass the error string you want shown; the field doesn't read form state itself.
68
+ - Keep your own descriptions with aria-describedby="…" or [aria-describedby], not [attr.aria-describedby].
69
+
70
+ ## Inputs
71
+
72
+ | Name | Type | Default | Description |
73
+ | --- | --- | --- | --- |
74
+ | `label` | `string` | none | Above the input; clicking focuses it. |
75
+ | `hint` | `string` | none | Quiet line under the input; the error replaces it. |
76
+ | `error` | `string \| null \| undefined` | none | Invalid state: red edge, aria-invalid, message in place of the hint. Signal forms: f.x().errors()[0]?.message. |
77
+ | `prefix` | `string` | none | Text before the value, flush, cut at its start when long. Icons: uiTextFieldPrefix. |
78
+ | `suffix` | `string` | none | Text after the value. Icons: uiTextFieldSuffix. |
79
+ | `size` | `'sm' \| 'md' \| 'lg'` | 'md' | 28/32/36px; Classic 32/36/40; 6px taller with 16px text on touch. |
80
+ | `optional` | `boolean` | false | "Optional" after the label, also spoken. |
81
+ | `clearable` | `boolean` | false | × while there is a value, plus Escape; dispatches a native input event. |
82
+ | `copyable` | `boolean` | false | Copy button that turns into a check; pair with readonly. |
83
+ | `counter` | `boolean` | false | "12/40" from the input's maxlength (signal forms: maxLength()). |
84
+ | `labels` | `Partial<TextFieldLabels>` | English | Translations: optional, clear, show, hide, copy, copied, pressToCopy. |
85
+
86
+ ## Outputs
87
+
88
+ | Name | Payload | Description |
89
+ | --- | --- | --- |
90
+ | `cleared` | `void` | After × or Escape emptied the field. |
91
+
92
+ ## TextFieldLabels
93
+
94
+ | Field | Type | Description |
95
+ | --- | --- | --- |
96
+ | `optional` | `string` | Tag after the label. |
97
+ | `clear` | `string` | Clear button. |
98
+ | `show` | `string` | Show password button. |
99
+ | `hide` | `string` | Hide password button. |
100
+ | `copy` | `string` | Copy button. |
101
+ | `copied` | `string` | Copy button and announcement after copying. |
102
+ | `pressToCopy` | `string` | Announced when the clipboard is blocked and the text is selected instead. |
103
+
104
+ ## CSS variables
105
+
106
+ | Variable | Default | Description |
107
+ | --- | --- | --- |
108
+ | `--ui-text-field-edge` | `var(--ui-hairline)` | Resting edge. |
109
+ | `--ui-text-field-edge-hover` | `text at 18%` | Hover edge. |
110
+ | `--ui-text-field-edge-focus` | `var(--ui-border-input)` | Focused edge, ≥ 3:1. |
111
+ | `--ui-text-field-radius` | `7px` | Corners (Classic 10px). |
112
+
113
+ ## Keyboard
114
+
115
+ | Keys | Action |
116
+ | --- | --- |
117
+ | Tab | Input, then its show-password or copy button; × is skipped. |
118
+ | Esc | Empties a clearable field with a value, before surrounding layers react. |
119
+ | Enter or Space | Toggles show password, or copies. |
120
+
121
+ ## Accessibility
122
+ - Native input with label for; otherwise aria-label on the input.
123
+ - Hint/error and counter in aria-describedby (merged with yours); error sets aria-invalid and is announced.
124
+ - Show password / Hide password label says what the button does next; Copied is announced in a status region.
125
+ - dir=auto on value and message.
126
+ - Text ≥ 4.5:1, focus edge ≥ 3:1; forced colors keep edge and focus outline.
@@ -0,0 +1,71 @@
1
+ # Text Reveal
2
+
3
+ Text that arrives one word or letter at a time as it scrolls into view, each piece fading in out of a soft blur while rising into place. Put it on your own heading or paragraph.
4
+
5
+ Add: `npx ochreui@latest add text-reveal`
6
+ Import: `import { UiTextReveal } from './ui/text-reveal';`
7
+ Selector: `<[uiTextReveal]>`
8
+ Docs: /components/text-reveal
9
+
10
+ ## When to use
11
+ - Headlines and short intros on landing pages that should arrive as the reader scrolls.
12
+ - One sentence to be read in order: a promise, a mission line, a quote.
13
+
14
+ ## When not to use
15
+ - Long paragraphs or anything people must read at once.
16
+ - Text that changes often, like live numbers: the reveal only plays on entering the view.
17
+
18
+ ## Usage
19
+
20
+ ```ts
21
+ import { Component } from '@angular/core';
22
+ import { UiTextReveal } from './ui/text-reveal';
23
+
24
+ @Component({
25
+ selector: 'app-pricing-intro',
26
+ imports: [UiTextReveal],
27
+ template: `
28
+ <h2 uiTextReveal text="One plan, every agent included."></h2>
29
+ <p uiTextReveal [delay]="260" [stagger]="22"
30
+ text="Pay for the runs you make, not the seats you fill. Cancel whenever you like."></p>
31
+ `,
32
+ })
33
+ export class PricingIntro {}
34
+ ```
35
+
36
+ ## Rules
37
+ - Leave the element empty; the text goes in the text input.
38
+ - Exported as uiTextReveal: #r="uiTextReveal" then (click)="r.replay()" to play it again.
39
+ - Starts on the first visible pixel and waits while the tab is hidden.
40
+ - Keep it to headlines and one or two sentences; by="char" only for short display text.
41
+
42
+ ## Inputs
43
+
44
+ | Name | Type | Default | Description |
45
+ | --- | --- | --- | --- |
46
+ | `text` | `string` | required | The text to reveal; runs of whitespace collapse to one space. |
47
+ | `by` | `'word' \| 'char'` | 'word' | Reveal word by word, or letter by letter (letters of a word never wrap apart). |
48
+ | `stagger` | `number` | 40 | Milliseconds between two pieces. |
49
+ | `delay` | `number` | 0 | Milliseconds before the first piece. |
50
+ | `duration` | `number` | 700 | Milliseconds each piece takes to arrive. |
51
+ | `once` | `boolean` | true | Reveal only the first time; false hides it again once out of view and replays on return. |
52
+
53
+ ## TextRevealBy
54
+
55
+ `type TextRevealBy = 'word' | 'char'`
56
+
57
+ ## CSS variables
58
+
59
+ | Variable | Default | Description |
60
+ | --- | --- | --- |
61
+ | `--ui-text-reveal-rise` | `0.35em` | How far below its place each piece starts. |
62
+ | `--ui-text-reveal-blur` | `8px` | How blurred each piece starts. |
63
+ | `--ui-text-reveal-ease` | `cubic-bezier(0.2, 0.7, 0.2, 1)` | Curve shared by the fade, the blur and the rise. |
64
+
65
+ ## Accessibility
66
+ - A visually hidden copy carries the text, read once from the first frame; the animated pieces are aria-hidden.
67
+ - The host is your own element, so headings keep their level.
68
+ - Real spaces between pieces: normal wrapping, words never break.
69
+ - The hidden copy is not selectable, so copying gives the sentence once.
70
+ - dir=auto on both copies keeps word order right in RTL pages.
71
+ - Reduced motion: text shown at once, no animation, replay() does nothing.