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,74 @@
1
+ # Empty Calendar
2
+
3
+ A small drawing of three calendar cards marked empty, fanned out over a soft warm-to-cool glow. The placeholder lines pulse, the glow breathes, and each card lifts or slides out when you hover it.
4
+
5
+ Add: `npx ochreui@latest add empty-calendar`
6
+ Import: `import { UiEmptyCalendar } from './ui/empty-calendar';`
7
+ Selector: `<ui-empty-calendar>`
8
+ Docs: /components/empty-calendar
9
+
10
+ ## When to use
11
+ - Problem cards about an empty pipeline or no meetings booked.
12
+ - Bento grids and feature cards that want a small drawing above the text.
13
+
14
+ ## When not to use
15
+ - Showing a real schedule: the cards only hold placeholder lines.
16
+
17
+ ## Usage
18
+
19
+ ```ts
20
+ import { Component } from '@angular/core';
21
+ import { UiEmptyCalendar } from './ui/empty-calendar';
22
+
23
+ @Component({
24
+ selector: 'app-pipeline-card',
25
+ imports: [UiEmptyCalendar],
26
+ template: `
27
+ <article>
28
+ <ui-empty-calendar />
29
+ <h3>No meetings on the books</h3>
30
+ <p>Leads go cold while follow-ups wait in someone's inbox. Booking links fix that.</p>
31
+ </article>
32
+ `,
33
+ styles: `
34
+ article { max-inline-size: 360px; padding: 8px 8px 20px; border-radius: 16px; background: var(--ui-bg-canvas); box-shadow: inset 0 0 0 1px var(--ui-hairline); }
35
+ h3 { margin: 4px 12px 0; color: var(--ui-text); font-size: 15px; line-height: 22px; font-weight: 600; }
36
+ p { margin: 4px 12px 0; color: var(--ui-text-muted); font-size: 13px; line-height: 20px; }
37
+ `,
38
+ })
39
+ export class PipelineCard {}
40
+ ```
41
+
42
+ ## Rules
43
+ - 3 : 2, min(560px, 100%) wide by default: set width or max-width with your own class.
44
+ - Set label="" when a heading next to it already says the same thing.
45
+ - Keep translated labels about as short as the defaults; the badge grows and the icon follows the button text.
46
+
47
+ ## Inputs
48
+
49
+ | Name | Type | Default | Description |
50
+ | --- | --- | --- | --- |
51
+ | `label` | `string` | a sentence describing the empty cards | What screen readers hear. "" hides the drawing from them (decorative). |
52
+ | `labels` | `Partial<EmptyCalendarLabels>` | {} | Default label and the drawn words: title, badge (shown in capitals), action. |
53
+
54
+ ## EmptyCalendarLabels
55
+
56
+ `type EmptyCalendarLabels = { label: string; title: string; badge: string; action: string }`
57
+
58
+ ## CSS variables
59
+
60
+ | Variable | Default | Description |
61
+ | --- | --- | --- |
62
+ | `--ui-empty-calendar-card` | `var(--ui-bg-surface)` | Card fill; lines and button are mixed from it. |
63
+ | `--ui-empty-calendar-badge-bg` | `var(--ui-hue-orange) at 6% (18% dark) on the card` | Badge fill. |
64
+ | `--ui-empty-calendar-badge-text` | `var(--ui-hue-orange), softened in light mode` | Badge text. |
65
+ | `--ui-empty-calendar-glow-1` | `var(--ui-hue-orange)` | Glow, left. Drawn faint. |
66
+ | `--ui-empty-calendar-glow-2` | `var(--ui-hue-pink)` | Glow, middle. |
67
+ | `--ui-empty-calendar-glow-3` | `var(--ui-hue-purple) mixed with blue` | Glow, right. |
68
+
69
+ ## Accessibility
70
+ - One role=img named by label; the SVG and its words are aria-hidden.
71
+ - label="" makes it decorative: aria-hidden, no role.
72
+ - Soft text inside the drawing is decorative, never the only place that says something.
73
+ - Nothing focusable; hover is decoration.
74
+ - The drawing stays left to right in RTL pages.
@@ -0,0 +1,118 @@
1
+ # Empty State
2
+
3
+ What a list, table or panel shows while it has nothing: an icon on a soft tile, a title, one quiet line and the first step. Framed, or bare to fill a panel.
4
+
5
+ Add: `npx ochreui@latest add empty-state`
6
+ Import: `import { UiEmptyState, UiEmptyStateIcon, UiEmptyStateHeading, UiEmptyStateText } from './ui/empty-state';`
7
+ Selector: `<ui-empty-state>`
8
+ Docs: /components/empty-state
9
+
10
+ ## When to use
11
+ - A list, table or board with nothing yet: say what will appear and offer the first step.
12
+ - A search or filter that matched nothing, with a button that clears it.
13
+ - A panel or page with nothing selected: use it bare.
14
+
15
+ ## When not to use
16
+ - While data is loading: use Skeleton, then the empty state if it stays empty.
17
+ - Errors or a failed load: say what went wrong, with a retry.
18
+ - A first-run checklist with several steps.
19
+
20
+ ## Usage
21
+
22
+ ```ts
23
+ import { Component, input, output } from '@angular/core';
24
+ import { UiButton, UiButtonIcon } from './ui/button';
25
+ import { UiEmptyState, UiEmptyStateIcon } from './ui/empty-state';
26
+
27
+ export interface Webhook {
28
+ id: string;
29
+ url: string;
30
+ }
31
+
32
+ @Component({
33
+ selector: 'app-webhook-list',
34
+ imports: [UiEmptyState, UiEmptyStateIcon, UiButton, UiButtonIcon],
35
+ template: `
36
+ @if (hooks().length) {
37
+ <ul>
38
+ @for (hook of hooks(); track hook.id) {
39
+ <li>{{ hook.url }}</li>
40
+ }
41
+ </ul>
42
+ } @else {
43
+ <ui-empty-state heading="No webhooks yet" text="Endpoints you add here get a POST each time a run finishes or fails.">
44
+ <svg uiEmptyStateIcon viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round">
45
+ <circle cx="12" cy="12" r="2.25" />
46
+ <path d="M7.4 7.4a6.5 6.5 0 0 0 0 9.2M16.6 7.4a6.5 6.5 0 0 1 0 9.2M4.2 4.2a11 11 0 0 0 0 15.6M19.8 4.2a11 11 0 0 1 0 15.6" />
47
+ </svg>
48
+ <button uiButton variant="secondary" size="sm" type="button" (click)="add.emit()">
49
+ <svg uiButtonIcon viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round">
50
+ <path d="M8 3.5v9M3.5 8h9" />
51
+ </svg>
52
+ Add endpoint
53
+ </button>
54
+ </ui-empty-state>
55
+ }
56
+ `,
57
+ })
58
+ export class WebhookList {
59
+ readonly hooks = input<Webhook[]>([]);
60
+ readonly add = output();
61
+ }
62
+ ```
63
+
64
+ ## Rules
65
+ - Show it in place of the list, only once loading has finished.
66
+ - One short title and one line of text; the first step as a small secondary button.
67
+ - Use bare + tall inside a panel with a height; framed inside a page or a list area.
68
+ - Put uiEmptyStateHeading / uiEmptyStateText on a <span>, never a <p>.
69
+
70
+ ## Inputs
71
+
72
+ | Name | Type | Default | Description |
73
+ | --- | --- | --- | --- |
74
+ | `heading` | `string` | none | What is empty: "No webhooks yet". Needed unless uiEmptyStateHeading is projected. |
75
+ | `headingLevel` | `2 \| 3 \| 4 \| 5 \| 6` | none | Makes the title role=heading at this level; otherwise a paragraph. |
76
+ | `text` | `string` | none | One line on what will show up here or how to get there; balanced when it wraps. |
77
+ | `icon` | `boolean` | true | Shows the tile with the projected svg[uiEmptyStateIcon], or a document glyph. false leaves it out. |
78
+ | `bare` | `boolean` | false | No frame and no padding. |
79
+ | `tall` | `boolean` | false | min-height 100% and centred; the parent needs a height. |
80
+ | `(content)` | `elements` | none | Anything else is the actions row: centred, gap 8px, wraps. |
81
+
82
+ ## EmptyStateHeadingLevel
83
+
84
+ `type EmptyStateHeadingLevel = 2 | 3 | 4 | 5 | 6`
85
+
86
+ ## Template: uiEmptyStateIcon
87
+
88
+ Your icon on the tile: 18px (Classic 20px), aria-hidden, focusable=false. Context: `none`.
89
+
90
+ ```html
91
+ <svg uiEmptyStateIcon viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9">…</svg>
92
+ ```
93
+
94
+ ## Template: uiEmptyStateHeading / uiEmptyStateText
95
+
96
+ Rich title or text instead of the string inputs. Put them on a <span>. Context: `none`.
97
+
98
+ ```html
99
+ <span uiEmptyStateText>Press <kbd>N</kbd> to start one.</span>
100
+ ```
101
+
102
+ ## CSS variables
103
+
104
+ | Variable | Default | Description |
105
+ | --- | --- | --- |
106
+ | `--ui-empty-state-bg` | `var(--ui-bg-subtle); with data-ui-look="tray" none in light, a 60% var(--ui-bg-surface) wash in dark` | Frame fill. |
107
+ | `--ui-empty-state-edge` | `a 0.5px ring (6% text in light, var(--ui-hairline) in dark); var(--ui-border) 1px dashed with data-ui-look="tray"` | Frame edge colour. |
108
+ | `--ui-empty-state-radius` | `12px; 16px with data-ui-look="tray"` | Frame corners. |
109
+ | `--ui-empty-state-measure` | `430px` | Widest text line. |
110
+
111
+ ## Accessibility
112
+ - Only the icon tile is aria-hidden; title, text and actions are read in order.
113
+ - Takes no focus; Tab goes to the actions.
114
+ - After a search or filter, put role=status on a wrapper that stays mounted, not on the empty state.
115
+ - headingLevel makes the title reachable by heading navigation.
116
+ - Title and text have dir=auto.
117
+ - Forced colors: the frame and tile keep a 1px system-colour border.
118
+ - Dev-mode warning when there is no heading.
@@ -0,0 +1,71 @@
1
+ # Enrichment Orbit
2
+
3
+ A calm card illustration: a record tile inside two thin rings, with colour comets running around them in opposite directions and three upright data nodes orbiting the outer ring.
4
+
5
+ Add: `npx ochreui@latest add enrichment-orbit`
6
+ Import: `import { UiEnrichmentOrbit } from './ui/enrichment-orbit';`
7
+ Selector: `<ui-enrichment-orbit>`
8
+ Docs: /components/enrichment-orbit
9
+
10
+ ## When to use
11
+ - A step or feature card about enriching, scoring or syncing data around one central record.
12
+ - Bento grids that need a calm illustration that keeps moving.
13
+
14
+ ## When not to use
15
+ - Next to content where constant motion would distract.
16
+
17
+ ## Usage
18
+
19
+ ```ts
20
+ import { Component } from '@angular/core';
21
+ import { UiEnrichmentOrbit } from './ui/enrichment-orbit';
22
+
23
+ @Component({
24
+ selector: 'app-enrich-card',
25
+ imports: [UiEnrichmentOrbit],
26
+ template: `
27
+ <article class="card">
28
+ <ui-enrichment-orbit label="A contact record with three data sources orbiting it" />
29
+ <h3>Fill in every contact</h3>
30
+ <p>Job title, company size and location arrive from three sources and land on one record.</p>
31
+ </article>
32
+ `,
33
+ styles: `
34
+ .card {
35
+ box-sizing: border-box; inline-size: min(360px, 100%); padding: 8px 8px 20px;
36
+ border-radius: 16px; background: var(--ui-bg-surface); box-shadow: inset 0 0 0 1px var(--ui-hairline);
37
+ }
38
+ h3 { margin: 4px 12px 0; color: var(--ui-text); font-size: 15px; line-height: 22px; font-weight: 600; }
39
+ p { margin: 4px 12px 0; color: var(--ui-text-muted); font-size: 13px; line-height: 20px; }
40
+ `,
41
+ })
42
+ export class EnrichCard {}
43
+ ```
44
+
45
+ ## Rules
46
+ - 3 : 2 box, inline-size min(560px, 100%); set another width with your own class.
47
+ - Comets 7 s per turn (outer clockwise, inner counter-clockwise), nodes 22 s clockwise, linear.
48
+ - Pauses off-screen and in hidden tabs and restarts the loop when back.
49
+ - Reduced motion or --ui-motion-scale: 0: still pose, nodes at 0/120/240 degrees, comets at the top.
50
+
51
+ ## Inputs
52
+
53
+ | Name | Type | Default | Description |
54
+ | --- | --- | --- | --- |
55
+ | `label` | `string` | 'A record tile with data nodes orbiting around it' | Accessible name (role=img). Empty hides it from assistive tech. |
56
+
57
+ ## CSS variables
58
+
59
+ | Variable | Default | Description |
60
+ | --- | --- | --- |
61
+ | `--ui-enrichment-orbit-ring` | `light-dark(border tinted indigo, --ui-border-strong)` | Ring colour; the inner ring is drawn at 45%. |
62
+ | `--ui-enrichment-orbit-face` | `light-dark(--ui-bg-surface, surface + 5% text)` | Tile and node face. |
63
+ | `--ui-enrichment-orbit-ink` | `var(--ui-text)` | Mark in the tile. |
64
+ | `--ui-enrichment-orbit-glyph` | `var(--ui-text-muted)` | Node glyphs, drawn at 55%. |
65
+ | `--ui-enrichment-orbit-comet-1` | `coral` | Warm end of the comets. |
66
+ | `--ui-enrichment-orbit-comet-2` | `violet` | Middle of the comets. |
67
+ | `--ui-enrichment-orbit-comet-3` | `blue` | Cool end of the comets. |
68
+
69
+ ## Accessibility
70
+ - Host role=img with aria-label from label; the SVG is aria-hidden and not focusable.
71
+ - Empty label: aria-hidden host, no role.
@@ -0,0 +1,143 @@
1
+ # Filter Menu
2
+
3
+ Grouped checkbox filters in one card: a removable chip per pick, Clear all, groups that fold away and one tab stop for the whole list. The value is picked ids per group, with signal forms, reactive forms, ngModel or [(value)].
4
+
5
+ Add: `npx ochreui@latest add filter-menu`
6
+ Import: `import { UiFilterMenu } from './ui/filter-menu';`
7
+ Selector: `<ui-filter-menu>`
8
+ Docs: /components/filter-menu
9
+
10
+ ## When to use
11
+ - Narrowing a list, table or board by a few groups of known options.
12
+ - Side panels and popovers where several filters stay visible at once.
13
+
14
+ ## When not to use
15
+ - One choice from a short list: use Segmented Control or Select.
16
+ - Free-text search, dates or numeric ranges.
17
+
18
+ ## Usage
19
+
20
+ ```ts
21
+ import { Component, signal } from '@angular/core';
22
+ import { FormField, form } from '@angular/forms/signals';
23
+ import { FilterGroup, FilterValue, UiFilterMenu } from './ui/filter-menu';
24
+
25
+ @Component({
26
+ selector: 'app-issue-filters',
27
+ imports: [UiFilterMenu, FormField],
28
+ template: `<ui-filter-menu [groups]="groups" [formField]="f.filters" />`,
29
+ })
30
+ export class IssueFilters {
31
+ protected readonly groups: FilterGroup[] = [
32
+ {
33
+ id: 'status',
34
+ label: 'Status',
35
+ options: [
36
+ { id: 'todo', label: 'Todo' },
37
+ { id: 'in-progress', label: 'In progress' },
38
+ { id: 'done', label: 'Done' },
39
+ ],
40
+ },
41
+ {
42
+ id: 'priority',
43
+ label: 'Priority',
44
+ chipPrefix: 'Priority: ',
45
+ options: [
46
+ { id: 'urgent', label: 'Urgent' },
47
+ { id: 'high', label: 'High' },
48
+ { id: 'low', label: 'Low' },
49
+ ],
50
+ },
51
+ ];
52
+ private readonly model = signal<{ filters: FilterValue }>({ filters: { status: ['in-progress'] } });
53
+ protected readonly f = form(this.model);
54
+ }
55
+ ```
56
+
57
+ ## Rules
58
+ - Bind [formField], formControl, formControlName, ngModel or [(value)]; the value is { [groupId]: optionId[] }.
59
+ - With [formField], don't set disabled: the form sets it.
60
+ - Use heading, not title, for the visible title.
61
+ - Leave open unset to start with the first group open; [(open)] controls it.
62
+ - Translate every visible and spoken word through labels.
63
+
64
+ ## Inputs
65
+
66
+ | Name | Type | Default | Description |
67
+ | --- | --- | --- | --- |
68
+ | `groups` | `FilterGroup[]` | required | Groups top to bottom: { id, label, options: { id, label }[], chipPrefix? }. |
69
+ | `value` | `FilterValue` | {} | Picked option ids per group id; option order, empty groups left out, unknown ids kept. |
70
+ | `open` | `string[] \| undefined` | the first group | Ids of the open groups; two-way with [(open)]. |
71
+ | `heading` | `string` | 'Filters' | Title on top; names the menu. |
72
+ | `hints` | `boolean` | true | Keyboard hint row; always hidden on touch. |
73
+ | `disabled` | `boolean` | false | Disables every control; forms set it too. |
74
+ | `labels` | `Partial<FilterMenuLabels>` | English | Words shown and announced, for translation. |
75
+
76
+ ## Outputs
77
+
78
+ | Name | Payload | Description |
79
+ | --- | --- | --- |
80
+ | `valueChange` | `FilterValue` | After every pick, removal and Clear all. Not on writes from code. |
81
+ | `openChange` | `string[]` | When a group opens or closes. |
82
+ | `touch` | `void` | When focus leaves the menu. |
83
+
84
+ ## FilterGroup
85
+
86
+ | Field | Type | Description |
87
+ | --- | --- | --- |
88
+ | `id` | `string` | Key in the value. |
89
+ | `label` | `string` | Header text. |
90
+ | `options` | `FilterOption[]` | { id, label } rows. |
91
+ | `chipPrefix` | `string` | Optional text before this group's chips. |
92
+
93
+ ## FilterValue
94
+
95
+ | Field | Type | Description |
96
+ | --- | --- | --- |
97
+ | `[groupId]` | `readonly string[]` | Picked option ids. |
98
+
99
+ ## FilterMenuLabels
100
+
101
+ | Field | Type | Description |
102
+ | --- | --- | --- |
103
+ | `heading` | `string` | Title. |
104
+ | `clearAll` | `string` | Clear all button. |
105
+ | `remove` | `(chip: string) => string` | Chip remove button name. |
106
+ | `more` | `(count: number, chips: readonly string[]) => string` | Name of the +N button. |
107
+ | `less` | `string` | +N button while all chips show. |
108
+ | `picked` | `(count: number) => string` | "1 filter" in a header. |
109
+ | `options` | `(count: number) => string` | Header description, "4 options". |
110
+ | `navigate` | `string` | Hint row. |
111
+ | `select` | `string` | Hint row. |
112
+ | `cleared` | `string` | Announced after Clear all. |
113
+ | `added` | `(chip: string) => string` | Announced after a pick. |
114
+ | `removed` | `(chip: string) => string` | Announced after a removal. |
115
+
116
+ ## CSS variables
117
+
118
+ | Variable | Default | Description |
119
+ | --- | --- | --- |
120
+ | `--ui-filter-menu-width` | `400px` | Widest the card grows; Classic adds its 20px tray. |
121
+ | `--ui-filter-menu-radius` | `10px (Classic 20px)` | Card corners. |
122
+ | `--ui-filter-menu-fill` | `var(--ui-hue-blue) (Classic var(--ui-bg-neutral-solid))` | Checked box fill. |
123
+ | `--ui-checkbox-edge` | `color-mix(in srgb, var(--ui-text) 26%, transparent)` | Unchecked box edge, shared with Checkbox; var(--ui-border-input) gives 3:1. |
124
+
125
+ ## Keyboard
126
+
127
+ | Keys | Action |
128
+ | --- | --- |
129
+ | Tab | Clear all, chip remove buttons, then the list as one stop. |
130
+ | ↓ / ↑ | Next / previous row among headers and open options; no wrap. |
131
+ | Enter / Space | Toggles an option; opens or closes a group. |
132
+ | → | Opens a group; on an open one, moves to its first option. |
133
+ | ← | Closes the group from its header or an option. |
134
+ | Home / End | First / last row. |
135
+ | Letters | Next row starting with the typed text. |
136
+
137
+ ## Accessibility
138
+ - role=group named by the title; headers have aria-expanded; options are role=checkbox.
139
+ - Closed groups are inert; headers described as "4 options, 1 filter".
140
+ - Chip remove buttons named "Remove <chip>"; +N is a button with aria-expanded.
141
+ - One role=status announcement per change.
142
+ - Focus moves to the next chip or the list, never to the page.
143
+ - Inset focus ring; forced colors keep edges and Highlight for checked; mirrors in RTL.
@@ -0,0 +1,118 @@
1
+ # Form Field
2
+
3
+ The label, a required mark or Optional, and one line for the hint, the error and a count, around any control that has none of its own: a native select, a date input, a segmented control, a rating. Your control stays yours, so every kind of Angular form just works.
4
+
5
+ Add: `npx ochreui@latest add form-field`
6
+ Import: `import { UiFormField, UiFieldControl } from './ui/form-field';`
7
+ Selector: `<ui-form-field>`
8
+ Docs: /components/form-field
9
+
10
+ ## When to use
11
+ - A control with no label, hint or error of its own: native select, date/time/color/file/range input, Segmented Control, Toggle Group, Rating, radio group, custom picker.
12
+ - Forms that mix kinds of controls, so labels and messages line up.
13
+
14
+ ## When not to use
15
+ - Text Field, Text Area or Number Input: use their own label, hint and error.
16
+ - A single checkbox or switch: use Checkbox or Switch.
17
+ - Several fields under one heading: use fieldset and legend.
18
+
19
+ ## Usage
20
+
21
+ ```ts
22
+ import { Component, computed, signal } from '@angular/core';
23
+ import { FormField, form, maxLength, required } from '@angular/forms/signals';
24
+ import { UiFieldControl, UiFormField } from './ui/form-field';
25
+
26
+ @Component({
27
+ selector: 'app-workflow-form',
28
+ imports: [UiFormField, UiFieldControl, FormField],
29
+ template: `
30
+ <form class="fields" novalidate (submit)="$event.preventDefault()">
31
+ <ui-form-field label="Workflow name" [counter]="f.name().value().length + '/40'">
32
+ <input uiFieldControl [formField]="f.name" autocomplete="off" />
33
+ </ui-form-field>
34
+ <ui-form-field label="Runner" hint="Large runners finish sooner and bill per minute.">
35
+ <select uiFieldControl [formField]="f.runner">
36
+ <option value="small">Small, 2 vCPU</option>
37
+ <option value="medium">Medium, 4 vCPU</option>
38
+ <option value="large">Large, 8 vCPU</option>
39
+ </select>
40
+ </ui-form-field>
41
+ <ui-form-field label="Monthly cap" hint="In US dollars. Runs pause once it is reached." [error]="capError()">
42
+ <input uiFieldControl inputmode="decimal" [formField]="f.cap" />
43
+ </ui-form-field>
44
+ <ui-form-field label="Instructions" optional [counter]="f.notes().value().length + '/280'">
45
+ <textarea uiFieldControl rows="2" [formField]="f.notes"></textarea>
46
+ </ui-form-field>
47
+ </form>
48
+ `,
49
+ styles: `
50
+ .fields { display: flex; flex-direction: column; gap: 16px; max-width: 360px; }
51
+ `,
52
+ })
53
+ export class WorkflowForm {
54
+ private readonly model = signal({ name: 'Weekly invoice digest', runner: 'medium', cap: '650', notes: '' });
55
+ protected readonly f = form(this.model, (p) => {
56
+ required(p.name);
57
+ maxLength(p.name, 40);
58
+ maxLength(p.notes, 280);
59
+ });
60
+ protected readonly capError = computed(() =>
61
+ Number(this.model().cap) > 500 ? 'Your plan allows up to $500 a month.' : null,
62
+ );
63
+ }
64
+ ```
65
+
66
+ ## Rules
67
+ - Put uiFieldControl on the control; bind it with [formField], formControl or ngModel as usual.
68
+ - Do not wrap Text Field, Text Area, Number Input, Checkbox or Switch.
69
+ - With [formField], required, disabled and readonly come from the schema; do not write them.
70
+ - Non-native controls are named by the field label (aria-labelledby); leave out their own aria-label.
71
+ - counter is a string you build, e.g. f.notes().value().length + "/280".
72
+
73
+ ## Inputs
74
+
75
+ | Name | Type | Default | Description |
76
+ | --- | --- | --- | --- |
77
+ | `label` | `string` | none | Above the control; clicking focuses it. |
78
+ | `hint` | `string` | none | Quiet line under the control; the error replaces it. |
79
+ | `error` | `string \| boolean \| null \| undefined` | none | Invalid state: red edge on native controls, aria-invalid, message in place of the hint. true = invalid with no message. |
80
+ | `required` | `boolean` | false | Required mark and aria-required. The mark also shows when the control is required (native required, schema required()). Never writes required on the control. |
81
+ | `optional` | `boolean` | false | "Optional" after the label, also heard by screen readers. |
82
+ | `counter` | `string` | none | Text at the end of the message line, e.g. "12/280". You build it. |
83
+ | `for` | `string` | none | Id of a control you cannot mark with uiFieldControl. |
84
+ | `size` | `'sm' \| 'md' \| 'lg'` | 'md' | Native inputs and selects 28, 32 or 36px; Classic +4; touch +6 (md 38) with 16px text. |
85
+ | `labels` | `Partial<FormFieldLabels>` | English | Words to translate: optional, required (the mark). |
86
+ | `aria-describedby (uiFieldControl)` | `string` | none | Your own descriptions, kept alongside the hint, error and counter. Set it as aria-describedby="…", not [attr.aria-describedby]. |
87
+
88
+ ## FormFieldLabels
89
+
90
+ | Field | Type | Description |
91
+ | --- | --- | --- |
92
+ | `optional` | `string` | Tag after the label, also inside the label for screen readers. |
93
+ | `required` | `string` | The required mark (default *), hidden from screen readers. |
94
+
95
+ ## CSS variables
96
+
97
+ | Variable | Default | Description |
98
+ | --- | --- | --- |
99
+ | `--ui-form-field-gap` | `calc(var(--ui-space-1-5) + 1px * var(--ui-look-tray))` | Gap between label, control and message line. |
100
+ | `--ui-form-field-required` | `var(--ui-text-muted)` | Required mark colour. |
101
+ | `--ui-text-field-edge` | `var(--ui-hairline)` | Resting edge of native controls (shared with Text Field). |
102
+ | `--ui-text-field-edge-hover` | `color-mix(in srgb, var(--ui-text) 18%, transparent)` | Edge on hover. |
103
+ | `--ui-text-field-edge-focus` | `var(--ui-border-input)` | Edge while focused, ≥ 3:1. |
104
+ | `--ui-text-field-radius` | `7px (Classic 10px)` | Corners of native controls. |
105
+
106
+ ## Keyboard
107
+
108
+ | Keys | Action |
109
+ | --- | --- |
110
+ | Tab | Control to control; label, hint and count are not stops. |
111
+ | Other keys | Handled by the control itself. |
112
+
113
+ ## Accessibility
114
+ - label for on input, select, textarea; aria-labelledby on other controls.
115
+ - Hint or error and count in aria-describedby; the message line is a polite live region.
116
+ - Required mark aria-hidden; aria-required on the control. Optional is part of the name.
117
+ - Muted text ≥ 4.5:1; focus edge ≥ 3:1.
118
+ - Forced colors: native controls keep an edge and a Highlight focus outline.
@@ -0,0 +1,80 @@
1
+ # Frost Cloud
2
+
3
+ A frosted white cloud mascot with cut-out eyes on a blue or red-orange sky: it floats, breathes, glances around, blinks, follows the pointer and bounces with a wink when pressed.
4
+
5
+ Add: `npx ochreui@latest add frost-cloud`
6
+ Import: `import { UiFrostCloud } from './ui/frost-cloud';`
7
+ Selector: `<ui-frost-cloud>`
8
+ Docs: /components/frost-cloud
9
+
10
+ ## When to use
11
+ - A friendly face for an assistant, an AI feature or a cloud product: app icon, empty state, feature card.
12
+ - Landing pages that want a calm, living mascot instead of a static logo.
13
+
14
+ ## When not to use
15
+ - Sizes under about 48 px.
16
+ - Brands far from blue or orange.
17
+
18
+ ## Usage
19
+
20
+ ```ts
21
+ import { Component } from '@angular/core';
22
+ import { UiFrostCloud } from './ui/frost-cloud';
23
+
24
+ @Component({
25
+ selector: 'app-helper-card',
26
+ imports: [UiFrostCloud],
27
+ template: `
28
+ <article>
29
+ <ui-frost-cloud class="art" color="orange" label="Nimbus, the helper for this workspace" />
30
+ <h3>Say hello to Nimbus</h3>
31
+ <p>Ask about your files, your calendar or the last meeting.</p>
32
+ </article>
33
+ `,
34
+ styles: `
35
+ article {
36
+ box-sizing: border-box; inline-size: min(320px, 100%); overflow: hidden;
37
+ border-radius: 18px; background: var(--ui-bg-surface); box-shadow: inset 0 0 0 1px var(--ui-hairline);
38
+ }
39
+ .art { inline-size: 100%; }
40
+ h3 { margin: 16px 20px 4px; color: var(--ui-text); font-size: 16px; line-height: 24px; font-weight: 600; }
41
+ p { margin: 0 20px 20px; color: var(--ui-text-muted); font-size: 14px; line-height: 20px; }
42
+ `,
43
+ })
44
+ export class HelperCard {}
45
+ ```
46
+
47
+ ## Rules
48
+ - Square, min(380px, 100%) by default; set width and height through your class and the sky fills the box, cloud centred up to 380px.
49
+ - Orange defaults come from data-color=orange on the host; the hooks override both colours.
50
+ - Runs only on screen in a visible tab and resumes where it stopped; reduced motion or --ui-motion-scale: 0 keeps it fully still and ignores presses.
51
+
52
+ ## Inputs
53
+
54
+ | Name | Type | Default | Description |
55
+ | --- | --- | --- | --- |
56
+ | `color` | `FrostCloudColor` | 'blue' | Blue-to-cyan or red-to-orange sky; haze and eyes follow. |
57
+ | `background` | `boolean` | true | Paint the sky over the whole box; off, a soft coloured edge on your surface. |
58
+ | `followPointer` | `boolean` | true | Eyes follow the pointer while it is over the box. |
59
+ | `label` | `string \| null \| undefined` | undefined | Accessible name; defaults to a short description. Empty string: aria-hidden decoration. |
60
+
61
+ ## FrostCloudColor
62
+
63
+ `type FrostCloudColor = 'blue' | 'orange'`
64
+
65
+ ## CSS variables
66
+
67
+ | Variable | Default | Description |
68
+ | --- | --- | --- |
69
+ | `--ui-frost-cloud-sky-top` | `light-dark(#2577ea, #165ac9)` | Sky top. |
70
+ | `--ui-frost-cloud-sky-bottom` | `light-dark(#4ac7f5, #2aa5e5)` | Sky bottom. |
71
+ | `--ui-frost-cloud-sky-glow` | `light-dark(rgb(120 215 252 / 0.5), rgb(96 192 246 / 0.45))` | Soft light behind the cloud. |
72
+ | `--ui-frost-cloud-tint` | `#a2d1f6` | Lower-body haze; edge glow without a sky. |
73
+ | `--ui-frost-cloud-eye` | `#5ccaf9` | Eye colour (top a step deeper). |
74
+ | `--ui-frost-cloud-shadow` | `light-dark(#1a66c8, #0b3f96)` | Ground shadow. |
75
+
76
+ ## Accessibility
77
+ - Host role=img with one aria-label; the SVG is aria-hidden.
78
+ - Not focusable; pressing only animates.
79
+ - Empty label: aria-hidden, no role.
80
+ - forced-color-adjust: none keeps the sky in forced colors.
@@ -0,0 +1,75 @@
1
+ # Ghosted Chat
2
+
3
+ A small card illustration: three chat messages seen and never answered. They arrive one by one, a red shine runs through the last one, and on hover a thumbs-down reply pops in.
4
+
5
+ Add: `npx ochreui@latest add ghosted-chat`
6
+ Import: `import { UiGhostedChat } from './ui/ghosted-chat';`
7
+ Selector: `<ui-ghosted-chat>`
8
+ Docs: /components/ghosted-chat
9
+
10
+ ## When to use
11
+ - A problem card about outreach that gets ignored, or messages read and never answered.
12
+ - Bento grids and feature cards that want a small picture above their title and text.
13
+
14
+ ## When not to use
15
+ - As a real chat: the messages are a fixed drawing.
16
+ - Below about 220px wide, where the message text gets too small to read.
17
+
18
+ ## Usage
19
+
20
+ ```ts
21
+ import { Component } from '@angular/core';
22
+ import { UiGhostedChat } from './ui/ghosted-chat';
23
+
24
+ @Component({
25
+ selector: 'app-outreach-card',
26
+ imports: [UiGhostedChat],
27
+ template: `
28
+ <article>
29
+ <ui-ghosted-chat />
30
+ <h3>Cold outreach goes nowhere</h3>
31
+ <p>Your messages get opened, then sit there. No reply, no next step, no idea why.</p>
32
+ </article>
33
+ `,
34
+ styles: `
35
+ article { max-inline-size: 360px; }
36
+ h3 { margin: 16px 0 0; font-size: 16px; line-height: 1.4; font-weight: 600; }
37
+ p { margin: 6px 0 0; color: var(--ui-text-muted); font-size: 14px; line-height: 1.5; }
38
+ `,
39
+ })
40
+ export class OutreachCard {}
41
+ ```
42
+
43
+ ## Rules
44
+ - Width up to 560px from its container, height at 3:2; the whole drawing scales, nothing reflows.
45
+ - Enters once when a third of it is in view. Call replay() on the instance (#chat, then (click)="chat.replay()") to play it again.
46
+ - The shine waits off-screen and in hidden tabs, and starts over when it comes back.
47
+ - Reduced motion or --ui-motion-scale: 0: everything in place at once, no shine, instant hover.
48
+
49
+ ## Inputs
50
+
51
+ | Name | Type | Default | Description |
52
+ | --- | --- | --- | --- |
53
+ | `label` | `string` | 'A one-sided chat: three messages seen, none answered' | What screen readers hear for the whole picture. Empty hides the picture from them. |
54
+ | `labels` | `Partial<GhostedChatLabels>` | {} | The texts in the drawing: status, first, second, last and receipt. Keep them about as long as the defaults. |
55
+
56
+ ## GhostedChatLabels
57
+
58
+ `type GhostedChatLabels = { status: string; first: string; second: string; last: string; receipt: string }`
59
+
60
+ ## CSS variables
61
+
62
+ | Variable | Default | Description |
63
+ | --- | --- | --- |
64
+ | `--ui-ghosted-chat-bubble` | `var(--ui-bg-surface)` | Message fill. |
65
+ | `--ui-ghosted-chat-ink` | `var(--ui-text)` | Text of the last message; the first two use it a little softer. |
66
+ | `--ui-ghosted-chat-status` | `var(--ui-text-muted)` | The status line and the receipt. |
67
+ | `--ui-ghosted-chat-reply` | `a deep blue` | The reply bubble that pops in on hover. |
68
+ | `--ui-ghosted-chat-shine` | `var(--ui-hue-red)` | The shine that runs through the last message. |
69
+
70
+ ## Accessibility
71
+ - One image named by label; the drawing inside is aria-hidden, so nothing is read twice.
72
+ - label="" hides the whole picture from screen readers.
73
+ - Not focusable; the hover reply is decoration only and never shows on touch screens.
74
+ - Forced colours: outlined bubbles in system colours, and the hover fade still works.
75
+ - The scene always reads left to right, also on right-to-left pages.