@cueplusplus/ui 0.13.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +307 -0
- package/README.md +2 -19
- package/dist/index.d.ts +2 -2
- package/dist/layout/frames.d.ts +19 -1
- package/dist/layout/frames.js +21 -7
- package/dist/layout/index.d.ts +2 -2
- package/dist/primitives/chip.d.ts +1 -1
- package/dist/system/theme-provider.d.ts +46 -1
- package/dist/system/theme-provider.js +29 -3
- package/manifest/components/accordion.json +16 -4
- package/manifest/components/activity-graph.json +15 -3
- package/manifest/components/agent-card.json +15 -3
- package/manifest/components/agent-handoff.json +14 -3
- package/manifest/components/agent-mode-badge.json +12 -3
- package/manifest/components/agent-pile.json +13 -3
- package/manifest/components/agent-plan.json +13 -3
- package/manifest/components/agent-status.json +14 -3
- package/manifest/components/agent-surface.json +12 -3
- package/manifest/components/alert-dialog.json +14 -3
- package/manifest/components/animated-number.json +12 -3
- package/manifest/components/app-window-frame.json +13 -3
- package/manifest/components/approval-card.json +14 -3
- package/manifest/components/artifact-card.json +14 -3
- package/manifest/components/ask-box.json +13 -3
- package/manifest/components/audience-icon.json +11 -3
- package/manifest/components/autocomplete.json +15 -3
- package/manifest/components/avatar-group.json +15 -4
- package/manifest/components/avatar.json +16 -4
- package/manifest/components/background-inbox.json +14 -3
- package/manifest/components/band.json +14 -4
- package/manifest/components/breadcrumb.json +14 -3
- package/manifest/components/button-group.json +13 -3
- package/manifest/components/calendar.json +15 -4
- package/manifest/components/canvas-split-body.json +13 -3
- package/manifest/components/canvas-split-document.json +11 -3
- package/manifest/components/canvas-split-header.json +13 -3
- package/manifest/components/canvas-split-line.json +13 -3
- package/manifest/components/canvas-split-message.json +13 -3
- package/manifest/components/canvas-split-thread.json +11 -3
- package/manifest/components/canvas-split.json +13 -3
- package/manifest/components/card.json +14 -3
- package/manifest/components/carousel.json +12 -3
- package/manifest/components/catalogue-icon.json +11 -3
- package/manifest/components/channel-beta-icon.json +11 -3
- package/manifest/components/channel-matrix.json +11 -3
- package/manifest/components/channel-released-icon.json +11 -3
- package/manifest/components/chart-container.json +11 -3
- package/manifest/components/chart-ramp.json +12 -3
- package/manifest/components/chart-swatch.json +11 -3
- package/manifest/components/chart-tooltip-content.json +12 -4
- package/manifest/components/chart.json +14 -3
- package/manifest/components/chat-empty-state.json +13 -3
- package/manifest/components/chat-panel-assistant-message.json +11 -3
- package/manifest/components/chat-panel-composer.json +11 -3
- package/manifest/components/chat-panel-messages.json +11 -3
- package/manifest/components/chat-panel-typing.json +11 -3
- package/manifest/components/chat-panel-user-message.json +11 -3
- package/manifest/components/chat-panel.json +13 -3
- package/manifest/components/checkbox-group.json +15 -4
- package/manifest/components/checkpoint-history.json +13 -3
- package/manifest/components/clamp.json +12 -3
- package/manifest/components/cli-tool-icon.json +11 -3
- package/manifest/components/code-diff.json +14 -3
- package/manifest/components/code-runner.json +13 -3
- package/manifest/components/collapsible.json +13 -3
- package/manifest/components/color-area.json +12 -4
- package/manifest/components/color-field.json +12 -3
- package/manifest/components/color-picker.json +14 -4
- package/manifest/components/color-slider.json +12 -3
- package/manifest/components/color-swatch.json +13 -3
- package/manifest/components/colors-section.json +11 -3
- package/manifest/components/combobox.json +15 -4
- package/manifest/components/compaction-row.json +12 -3
- package/manifest/components/comparison-card.json +12 -3
- package/manifest/components/composer-actions.json +11 -3
- package/manifest/components/composer-attach-button.json +11 -3
- package/manifest/components/composer-attachment-chip.json +13 -3
- package/manifest/components/composer-attachments.json +11 -3
- package/manifest/components/composer-bar.json +12 -3
- package/manifest/components/composer-command-item.json +13 -3
- package/manifest/components/composer-context.json +13 -3
- package/manifest/components/composer-input.json +11 -3
- package/manifest/components/composer-menu-item.json +12 -3
- package/manifest/components/composer-menu.json +13 -3
- package/manifest/components/composer-model-item.json +13 -3
- package/manifest/components/composer-model-trigger.json +13 -3
- package/manifest/components/composer-person-item.json +13 -3
- package/manifest/components/composer-send.json +13 -3
- package/manifest/components/composer-toolbar.json +11 -3
- package/manifest/components/composer-voice-button.json +11 -3
- package/manifest/components/composer-voice.json +13 -3
- package/manifest/components/composer.json +14 -4
- package/manifest/components/computer-use.json +13 -3
- package/manifest/components/confidence-marker.json +11 -3
- package/manifest/components/connection-state.json +12 -3
- package/manifest/components/container.json +12 -3
- package/manifest/components/context-breakdown.json +12 -4
- package/manifest/components/context-menu.json +14 -4
- package/manifest/components/context-usage.json +14 -4
- package/manifest/components/conversation-search.json +13 -3
- package/manifest/components/copy-button.json +14 -3
- package/manifest/components/cost-meter.json +12 -3
- package/manifest/components/cue-portal-frame.json +12 -3
- package/manifest/components/data-table-pagination.json +13 -3
- package/manifest/components/data-table-toolbar.json +12 -3
- package/manifest/components/date-field.json +12 -3
- package/manifest/components/date-picker.json +13 -3
- package/manifest/components/date-range-picker.json +11 -3
- package/manifest/components/day-separator.json +12 -3
- package/manifest/components/delegation-card.json +14 -4
- package/manifest/components/density.json +12 -2
- package/manifest/components/description-list.json +15 -4
- package/manifest/components/diagram.json +13 -3
- package/manifest/components/disclosure.json +15 -4
- package/manifest/components/dmx-bar.json +12 -3
- package/manifest/components/dmx-strip.json +11 -3
- package/manifest/components/document-reference.json +13 -3
- package/manifest/components/draft-restore.json +13 -3
- package/manifest/components/drawer.json +13 -4
- package/manifest/components/edit-message.json +13 -3
- package/manifest/components/elements-command-palette.json +13 -3
- package/manifest/components/elements-composer.json +13 -3
- package/manifest/components/elements-data-table.json +11 -3
- package/manifest/components/elements-timeline.json +13 -3
- package/manifest/components/elicitation-form.json +13 -3
- package/manifest/components/empty-state-composer.json +11 -3
- package/manifest/components/empty-state-greeting.json +11 -3
- package/manifest/components/empty-state-suggestion.json +11 -3
- package/manifest/components/empty-state-suggestions.json +11 -3
- package/manifest/components/empty-state.json +15 -4
- package/manifest/components/end-of-turn-summary.json +14 -3
- package/manifest/components/env-var-input.json +15 -4
- package/manifest/components/error-state.json +13 -3
- package/manifest/components/export-dialog.json +10 -2
- package/manifest/components/eyebrow.json +14 -4
- package/manifest/components/feedback-dialog.json +13 -3
- package/manifest/components/field-description.json +15 -4
- package/manifest/components/field-error.json +15 -4
- package/manifest/components/field-label.json +15 -4
- package/manifest/components/file-tree.json +13 -3
- package/manifest/components/file-upload.json +14 -4
- package/manifest/components/flow-background.json +11 -3
- package/manifest/components/flow-controls.json +11 -3
- package/manifest/components/flow-graph.json +13 -3
- package/manifest/components/folder-icon.json +12 -3
- package/manifest/components/frac.json +11 -3
- package/manifest/components/frames.json +14 -0
- package/manifest/components/generation-loader.json +13 -3
- package/manifest/components/generative-ui.json +16 -4
- package/manifest/components/grid.json +14 -3
- package/manifest/components/group-bar.json +13 -3
- package/manifest/components/guardrail-notice.json +13 -3
- package/manifest/components/hover-card.json +14 -4
- package/manifest/components/icon-button.json +15 -3
- package/manifest/components/image-generation.json +13 -3
- package/manifest/components/info-tip.json +15 -4
- package/manifest/components/inline-citation.json +13 -3
- package/manifest/components/input-group.json +15 -4
- package/manifest/components/item.json +15 -4
- package/manifest/components/job-progress.json +14 -3
- package/manifest/components/kbd.json +14 -3
- package/manifest/components/launcher-bubble.json +14 -3
- package/manifest/components/link.json +13 -3
- package/manifest/components/live-region-announcer.json +16 -4
- package/manifest/components/log-viewer.json +15 -3
- package/manifest/components/map-answer.json +13 -3
- package/manifest/components/markdown-text.json +16 -4
- package/manifest/components/math-block.json +13 -3
- package/manifest/components/mcp-server-icon.json +12 -3
- package/manifest/components/mcp-server-panel.json +13 -3
- package/manifest/components/memory-chips.json +12 -3
- package/manifest/components/menubar.json +13 -3
- package/manifest/components/message-actions.json +14 -4
- package/manifest/components/message-attachments.json +12 -3
- package/manifest/components/message-branches.json +12 -3
- package/manifest/components/message-list.json +12 -3
- package/manifest/components/message-pair.json +12 -3
- package/manifest/components/message-queue.json +13 -3
- package/manifest/components/message-timing.json +13 -3
- package/manifest/components/message.json +12 -3
- package/manifest/components/mobile-composer.json +14 -3
- package/manifest/components/model-picker.json +12 -3
- package/manifest/components/multi-select.json +16 -4
- package/manifest/components/musical-time-input.json +11 -3
- package/manifest/components/navigation-menu.json +13 -3
- package/manifest/components/node-card.json +11 -3
- package/manifest/components/node-handle.json +11 -3
- package/manifest/components/number-field.json +15 -3
- package/manifest/components/number-ticker.json +12 -3
- package/manifest/components/onboarding.json +12 -3
- package/manifest/components/otp-field.json +14 -3
- package/manifest/components/page-shell.json +14 -4
- package/manifest/components/pagination.json +14 -3
- package/manifest/components/panel-header.json +14 -4
- package/manifest/components/password-input.json +15 -4
- package/manifest/components/permission-grant.json +13 -3
- package/manifest/components/permission-scopes.json +14 -3
- package/manifest/components/piano-keyboard.json +11 -3
- package/manifest/components/preset-section.json +11 -3
- package/manifest/components/progress.json +14 -3
- package/manifest/components/prompt-library.json +12 -3
- package/manifest/components/queue-dock.json +14 -3
- package/manifest/components/quota-banner.json +12 -3
- package/manifest/components/quote-reply.json +12 -3
- package/manifest/components/radio-group.json +15 -4
- package/manifest/components/radio.json +15 -4
- package/manifest/components/rating.json +15 -4
- package/manifest/components/read-aloud.json +13 -3
- package/manifest/components/reasoning-effort.json +12 -3
- package/manifest/components/reasoning-panel.json +13 -3
- package/manifest/components/recommendation-card.json +12 -3
- package/manifest/components/regenerate-menu.json +12 -3
- package/manifest/components/replay-player.json +14 -3
- package/manifest/components/research-report.json +12 -3
- package/manifest/components/resizable.json +13 -3
- package/manifest/components/retrieval-chunks.json +13 -3
- package/manifest/components/revert-dock.json +14 -3
- package/manifest/components/reviewable-diff.json +12 -3
- package/manifest/components/risk-badge.json +14 -3
- package/manifest/components/schedule-card.json +12 -3
- package/manifest/components/score-breakdown.json +13 -3
- package/manifest/components/scroll-anchor.json +12 -3
- package/manifest/components/scroll-area.json +13 -3
- package/manifest/components/scrollable-tabs-list.json +14 -4
- package/manifest/components/seam-cell.json +13 -4
- package/manifest/components/seam-grid.json +14 -3
- package/manifest/components/seam-list.json +13 -3
- package/manifest/components/search-input.json +15 -4
- package/manifest/components/section-header.json +14 -3
- package/manifest/components/segmented-control.json +15 -3
- package/manifest/components/separator.json +14 -3
- package/manifest/components/settings-panel.json +13 -3
- package/manifest/components/shape-section.json +11 -3
- package/manifest/components/shared-conversation.json +12 -3
- package/manifest/components/sheet.json +14 -4
- package/manifest/components/shimmer-label.json +12 -3
- package/manifest/components/sidebar.json +15 -4
- package/manifest/components/signal-edge.json +13 -4
- package/manifest/components/skeleton.json +16 -4
- package/manifest/components/skill-icon.json +12 -3
- package/manifest/components/slider.json +14 -3
- package/manifest/components/sources.json +12 -3
- package/manifest/components/sparkline.json +14 -4
- package/manifest/components/speaker-identity.json +11 -3
- package/manifest/components/spec-sheet.json +13 -4
- package/manifest/components/spectrum-visualizer.json +11 -3
- package/manifest/components/spinner.json +16 -4
- package/manifest/components/stack-icon.json +12 -3
- package/manifest/components/stack.json +14 -3
- package/manifest/components/stacks-matrix-icon.json +11 -3
- package/manifest/components/stat.json +14 -3
- package/manifest/components/status-dot.json +16 -4
- package/manifest/components/stepper.json +15 -4
- package/manifest/components/stopped-run.json +13 -4
- package/manifest/components/streaming-text.json +12 -3
- package/manifest/components/sub.json +11 -3
- package/manifest/components/subagent-list.json +13 -3
- package/manifest/components/suggestions.json +12 -3
- package/manifest/components/sup.json +11 -3
- package/manifest/components/swap-label.json +12 -3
- package/manifest/components/tags-input.json +15 -4
- package/manifest/components/tail-status.json +14 -3
- package/manifest/components/terminal-block.json +13 -3
- package/manifest/components/terminal-frame.json +14 -3
- package/manifest/components/textarea.json +15 -4
- package/manifest/components/theme-configurator.json +12 -3
- package/manifest/components/theme-provider.json +10 -0
- package/manifest/components/thinking-indicator.json +12 -3
- package/manifest/components/thread-list.json +12 -3
- package/manifest/components/thread-search.json +12 -3
- package/manifest/components/threshold-rail.json +13 -3
- package/manifest/components/time-boundary.json +13 -3
- package/manifest/components/time-field.json +15 -4
- package/manifest/components/timeline-ruler.json +13 -3
- package/manifest/components/timeline.json +13 -3
- package/manifest/components/title-bar.json +13 -3
- package/manifest/components/todo-list.json +12 -3
- package/manifest/components/toggle-group.json +15 -4
- package/manifest/components/toggle.json +15 -4
- package/manifest/components/token-editor.json +12 -3
- package/manifest/components/tool-call.json +13 -3
- package/manifest/components/tool-error.json +14 -4
- package/manifest/components/tool-group.json +12 -3
- package/manifest/components/tool-timeline.json +14 -4
- package/manifest/components/toolbar.json +14 -4
- package/manifest/components/trace-waterfall.json +12 -3
- package/manifest/components/tree-visibility-toggle.json +13 -3
- package/manifest/components/tree.json +14 -3
- package/manifest/components/turn-footer.json +14 -3
- package/manifest/components/two-step-button.json +14 -3
- package/manifest/components/typing-indicator.json +12 -3
- package/manifest/components/universe-grid.json +14 -4
- package/manifest/components/unread-divider.json +14 -4
- package/manifest/components/usage-chart.json +14 -3
- package/manifest/components/verdict-row.json +14 -3
- package/manifest/components/voice-conversation.json +13 -3
- package/manifest/components/web-preview.json +13 -3
- package/manifest/components/web-search.json +13 -3
- package/manifest/components/work-collapse.json +15 -4
- package/manifest/manifest.json +651 -651
- package/manifest/tokens.json +1 -1
- package/package.json +5 -5
|
@@ -9,6 +9,7 @@ import { ThemeRegistryContext } from "./theme-registry.js";
|
|
|
9
9
|
import * as React from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { MODES, THEME_NAME_PATTERN, validateManifest } from "@cueplusplus/theme-base";
|
|
12
|
+
import { CSPProvider } from "@base-ui/react/csp-provider";
|
|
12
13
|
//#region src/system/theme-provider.tsx
|
|
13
14
|
/**
|
|
14
15
|
* The empty registry, at module scope so the default is referentially stable.
|
|
@@ -170,7 +171,7 @@ function writePreferences(storageKey, preferences) {
|
|
|
170
171
|
* <App />
|
|
171
172
|
* </ThemeProvider>
|
|
172
173
|
*/
|
|
173
|
-
function ThemeProvider({ themes: themesProp, theme: themeProp, density: densityProp, mode: modeProp = DEFAULT_MODE, font: fontProp, styleSet: styleSetProp, fontScale = 1, fontFamilies, overrides, storageKey = DEFAULT_STORAGE_KEY, persistPreferences = true, asChild = false, className, style: styleProp, children }) {
|
|
174
|
+
function ThemeProvider({ themes: themesProp, theme: themeProp, density: densityProp, mode: modeProp = DEFAULT_MODE, font: fontProp, styleSet: styleSetProp, fontScale = 1, fontFamilies, overrides, storageKey = DEFAULT_STORAGE_KEY, persistPreferences = true, nonce, asChild = false, className, style: styleProp, children }) {
|
|
174
175
|
const ambient = React.useContext(ThemeContext);
|
|
175
176
|
const isRoot = ambient === null;
|
|
176
177
|
const outerStyleSet = React.useContext(StyleSetContext);
|
|
@@ -510,10 +511,35 @@ function ThemeProvider({ themes: themesProp, theme: themeProp, density: densityP
|
|
|
510
511
|
children
|
|
511
512
|
});
|
|
512
513
|
const densityLayer = overridesStyle === "" ? null : /* @__PURE__ */ jsx("style", {
|
|
514
|
+
...nonce === void 0 ? null : { nonce },
|
|
513
515
|
"data-cue-overrides": "",
|
|
514
516
|
children: overridesStyle
|
|
515
517
|
});
|
|
516
|
-
|
|
518
|
+
/**
|
|
519
|
+
* Base UI's own style elements, which this provider's nonce also has to reach.
|
|
520
|
+
*
|
|
521
|
+
* `@base-ui/react` renders one style element — a hoisted
|
|
522
|
+
* `<style precedence>` carrying `.base-ui-disable-scrollbar` — from
|
|
523
|
+
* `utils/styles.mjs`. `ScrollAreaRoot` and `SelectPopup` pass it a nonce they
|
|
524
|
+
* read from Base UI's own `CSPContext`, and nothing fills that context unless
|
|
525
|
+
* a `CSPProvider` is rendered above them. Without one it ships bare and a
|
|
526
|
+
* `style-src-elem` policy refuses it by content hash, on every page that
|
|
527
|
+
* renders a Select, a Popover or a ScrollArea — which is most authenticated
|
|
528
|
+
* pages of a real application, and no page of its sign-in screen. A consumer
|
|
529
|
+
* cannot reasonably guess that the fix lives in a peer dependency's provider,
|
|
530
|
+
* and this library already takes the nonce and already sits at the root.
|
|
531
|
+
*
|
|
532
|
+
* Rendered **only when a nonce was given**, and that is not tidiness. A
|
|
533
|
+
* consumer that wraps its own application in `CSPProvider` is the case this
|
|
534
|
+
* must not break: an unconditional inner provider would overwrite that outer
|
|
535
|
+
* context with `undefined` and un-nonce every Base UI style element in the
|
|
536
|
+
* tree — turning this into the bug it exists to fix.
|
|
537
|
+
*/
|
|
538
|
+
const withCspContext = (tree) => nonce === void 0 ? tree : /* @__PURE__ */ jsx(CSPProvider, {
|
|
539
|
+
nonce,
|
|
540
|
+
children: tree
|
|
541
|
+
});
|
|
542
|
+
return withCspContext(/* @__PURE__ */ jsx(ThemeRegistryContext.Provider, {
|
|
517
543
|
value: registry,
|
|
518
544
|
children: /* @__PURE__ */ jsx(ThemeContext.Provider, {
|
|
519
545
|
value: contextValue,
|
|
@@ -537,7 +563,7 @@ function ThemeProvider({ themes: themesProp, theme: themeProp, density: densityP
|
|
|
537
563
|
})
|
|
538
564
|
})
|
|
539
565
|
})
|
|
540
|
-
});
|
|
566
|
+
}));
|
|
541
567
|
}
|
|
542
568
|
//#endregion
|
|
543
569
|
export { FontFamiliesContext, FontScaleContext, ThemeContext, ThemeProvider };
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"--cue-space-4",
|
|
146
146
|
"--cue-text-ui"
|
|
147
147
|
],
|
|
148
|
-
"summary": "A stack of sections, one
|
|
148
|
+
"summary": "A stack of sections, one or several open at a time.",
|
|
149
149
|
"examples": [
|
|
150
150
|
{
|
|
151
151
|
"title": "Usage",
|
|
@@ -153,10 +153,23 @@
|
|
|
153
153
|
"language": "tsx"
|
|
154
154
|
}
|
|
155
155
|
],
|
|
156
|
-
"status": "
|
|
156
|
+
"status": "stable",
|
|
157
157
|
"url": "/docs/components/accordion",
|
|
158
158
|
"mdUrl": "/docs/components/accordion.md",
|
|
159
159
|
"jsonUrl": "/r/components/accordion.json",
|
|
160
|
+
"whenToUse": [
|
|
161
|
+
"Several peer sections where the reader only needs one at a time: a settings page, a long form split by topic.",
|
|
162
|
+
"Anywhere the closed titles are themselves a useful table of contents."
|
|
163
|
+
],
|
|
164
|
+
"whenNotToUse": [
|
|
165
|
+
"Exactly one section. Use `Collapsible` — it wears the same skin, so a lone section and a stack of them look alike by design.",
|
|
166
|
+
"Optional detail inside a form. Use `Disclosure`; a summary row that looks like a section header makes a form read as twice as long as it is.",
|
|
167
|
+
"Content the reader must compare side by side. Hiding one to see the other defeats the task."
|
|
168
|
+
],
|
|
169
|
+
"commonMistakes": [
|
|
170
|
+
"Opening every section by default, which is a page with extra clicks in it.",
|
|
171
|
+
"Reimplementing the open-state bookkeeping. The disclosure ARIA and keyboard handling are Base UI's; this layer only adds the console skin."
|
|
172
|
+
],
|
|
160
173
|
"specimens": [
|
|
161
174
|
{
|
|
162
175
|
"title": "Accordion",
|
|
@@ -168,6 +181,5 @@
|
|
|
168
181
|
"note": "Hairline-separated items with mono summary rows. Several can be open at once.",
|
|
169
182
|
"interaction": "the whole header row is the trigger; the panel animates its height and stills under prefers-reduced-motion."
|
|
170
183
|
}
|
|
171
|
-
]
|
|
172
|
-
"todo": true
|
|
184
|
+
]
|
|
173
185
|
}
|
|
@@ -84,10 +84,23 @@
|
|
|
84
84
|
"language": "tsx"
|
|
85
85
|
}
|
|
86
86
|
],
|
|
87
|
-
"status": "
|
|
87
|
+
"status": "stable",
|
|
88
88
|
"url": "/docs/components/activity-graph",
|
|
89
89
|
"mdUrl": "/docs/components/activity-graph.md",
|
|
90
90
|
"jsonUrl": "/r/components/activity-graph.json",
|
|
91
|
+
"whenToUse": [
|
|
92
|
+
"Run volume over a date window, where the question is which days were busy rather than the exact number on any one of them.",
|
|
93
|
+
"A header that needs what is being counted on one side and a pre-formatted total opposite it."
|
|
94
|
+
],
|
|
95
|
+
"whenNotToUse": [
|
|
96
|
+
"A window you need to fit a fixed width. Cells are fixed-size, so a long range scrolls horizontally rather than shrinking.",
|
|
97
|
+
"Anything that is not a date-and-count series: `data` is date and count pairs, and every gap in the window is filled as an empty cell."
|
|
98
|
+
],
|
|
99
|
+
"commonMistakes": [
|
|
100
|
+
"Leaving `start` and `end` unset. heat-graph then draws a full year ending today, which will not match your data.",
|
|
101
|
+
"Bucketing the counts into levels yourself. Levels are classified for you from `data`.",
|
|
102
|
+
"Passing a raw number to `total`. It is printed as given, so format it first."
|
|
103
|
+
],
|
|
91
104
|
"specimens": [
|
|
92
105
|
{
|
|
93
106
|
"title": "ActivityGraph",
|
|
@@ -99,6 +112,5 @@
|
|
|
99
112
|
"note": "Half a year of runs as a calendar of cells, dense where the work was. It is the one element in the family with a runtime dependency of its own — `heat-graph`, an optional peer — which does the calendar arithmetic and the levelling; everything you can see here is cue's, from the five-step ramp in the streaming hue down to the legend. Cells are a fixed size, so a long window scrolls sideways rather than shrinking into a smudge.",
|
|
100
113
|
"interaction": "none. The five legend swatches are `aria-hidden` and sit between the words less and more, which is what carries the scale."
|
|
101
114
|
}
|
|
102
|
-
]
|
|
103
|
-
"todo": true
|
|
115
|
+
]
|
|
104
116
|
}
|
|
@@ -130,10 +130,23 @@
|
|
|
130
130
|
"language": "tsx"
|
|
131
131
|
}
|
|
132
132
|
],
|
|
133
|
-
"status": "
|
|
133
|
+
"status": "stable",
|
|
134
134
|
"url": "/docs/components/agent-card",
|
|
135
135
|
"mdUrl": "/docs/components/agent-card.md",
|
|
136
136
|
"jsonUrl": "/r/components/agent-card.json",
|
|
137
|
+
"whenToUse": [
|
|
138
|
+
"A directory or picker where someone chooses an agent before the conversation starts.",
|
|
139
|
+
"Advertising named capabilities alongside the provider, version, model and endpoint behind them."
|
|
140
|
+
],
|
|
141
|
+
"whenNotToUse": [
|
|
142
|
+
"Reporting what an agent is doing right now. The card is a standing description of the agent, not a live state.",
|
|
143
|
+
"An endpoint that has to be read in full. `endpoint` truncates rather than wraps."
|
|
144
|
+
],
|
|
145
|
+
"commonMistakes": [
|
|
146
|
+
"Rendering your own Connected label beside the action. `connected` already swaps the action for a settled Connected state and disables it.",
|
|
147
|
+
"Writing a paragraph into `description`. It is sized for one or two sentences.",
|
|
148
|
+
"Leaving `onConnect` off while `connected` is false, which shows an action with nowhere to go."
|
|
149
|
+
],
|
|
137
150
|
"specimens": [
|
|
138
151
|
{
|
|
139
152
|
"title": "AgentCard",
|
|
@@ -145,6 +158,5 @@
|
|
|
145
158
|
"note": "Who you are about to talk to, before you talk to it: the name and who publishes it, one paragraph on what it is for, the skills it advertises, and — in mono along the bottom — the model and the endpoint actually behind it. Those last two are the line that separates a card from a marketing tile.",
|
|
146
159
|
"interaction": "the action is the only control. Connected disables it and swaps the ink button for a settled field row with a tick, rather than greying out a button that still looks pressable."
|
|
147
160
|
}
|
|
148
|
-
]
|
|
149
|
-
"todo": true
|
|
161
|
+
]
|
|
150
162
|
}
|
|
@@ -84,10 +84,22 @@
|
|
|
84
84
|
"language": "tsx"
|
|
85
85
|
}
|
|
86
86
|
],
|
|
87
|
-
"status": "
|
|
87
|
+
"status": "stable",
|
|
88
88
|
"url": "/docs/components/agent-handoff",
|
|
89
89
|
"mdUrl": "/docs/components/agent-handoff.md",
|
|
90
90
|
"jsonUrl": "/r/components/agent-handoff.json",
|
|
91
|
+
"whenToUse": [
|
|
92
|
+
"The moment one agent gives the baton to another in a transcript that would otherwise jump.",
|
|
93
|
+
"Showing which pieces of context travelled across with it."
|
|
94
|
+
],
|
|
95
|
+
"whenNotToUse": [
|
|
96
|
+
"A handoff you cannot explain. `reason` is required because without it a handoff reads as an unexplained jump.",
|
|
97
|
+
"A step inside a single agent's own work — this element is about the boundary between two of them."
|
|
98
|
+
],
|
|
99
|
+
"commonMistakes": [
|
|
100
|
+
"Omitting `carried` to hide the context section. Pass an empty array instead; it is a required prop.",
|
|
101
|
+
"Leaving `settled` false once the receiving agent is underway, so the arrow and the receiving badge keep signalling a transition that already finished."
|
|
102
|
+
],
|
|
91
103
|
"specimens": [
|
|
92
104
|
{
|
|
93
105
|
"title": "AgentHandoff",
|
|
@@ -99,6 +111,5 @@
|
|
|
99
111
|
"note": "The baton moving, with the reason attached. Two badges and an arrow: while the handoff is live the receiving agent and the arrow take the streaming hue, and `settled` cools both once the new agent is actually underway. What travelled across is listed under it against a rule — a handoff with no carried context is a handoff you cannot audit.",
|
|
100
112
|
"interaction": "none. It is a record of something that happened, not a control; the only thing that moves is the colour, over half a second."
|
|
101
113
|
}
|
|
102
|
-
]
|
|
103
|
-
"todo": true
|
|
114
|
+
]
|
|
104
115
|
}
|
|
@@ -82,10 +82,20 @@
|
|
|
82
82
|
"language": "tsx"
|
|
83
83
|
}
|
|
84
84
|
],
|
|
85
|
-
"status": "
|
|
85
|
+
"status": "stable",
|
|
86
86
|
"url": "/docs/components/agent-mode-badge",
|
|
87
87
|
"mdUrl": "/docs/components/agent-mode-badge.md",
|
|
88
88
|
"jsonUrl": "/r/components/agent-mode-badge.json",
|
|
89
|
+
"whenToUse": [
|
|
90
|
+
"Anywhere a person needs the run's authority from the corner of their eye — the fact every catalogue leaves to prose.",
|
|
91
|
+
"As the source for mode-aware styling elsewhere: put the same `data-agent-mode` on a composer and its focus ring, send button and rail tint from one place."
|
|
92
|
+
],
|
|
93
|
+
"whenNotToUse": [
|
|
94
|
+
"A status. Use `AgentStatus` — authority and activity are different questions."
|
|
95
|
+
],
|
|
96
|
+
"commonMistakes": [
|
|
97
|
+
"Threading a mode prop through components instead of reusing the attribute. `elements.css` declares four custom properties under `data-agent-mode`, so a console adds a mode-aware surface by reading a property rather than by branching."
|
|
98
|
+
],
|
|
89
99
|
"specimens": [
|
|
90
100
|
{
|
|
91
101
|
"title": "AgentModeBadge",
|
|
@@ -97,6 +107,5 @@
|
|
|
97
107
|
"note": "How much authority the run is holding, which is the fact a person most needs from the corner of their eye and the one every catalogue leaves to prose. The ladder is four rungs — will it ask me, is it writing, is it only planning, are the guardrails off — because that is how many accents every product in the study paints, whatever it calls its six or seven or nine modes. The chip is the readout; `data-agent-mode` is the part that travels.",
|
|
98
108
|
"interaction": "press the chip to cycle the rung. The second specimen is the whole point: one attribute on the box, and the rail, the border and the send button all re-derive from `var(--cue-elements-mode-icon)` with no prop threading and no branch in any component. Colour is never alone — each rung has its own glyph and its own word, so the ladder survives a monochrome screenshot."
|
|
99
109
|
}
|
|
100
|
-
]
|
|
101
|
-
"todo": true
|
|
110
|
+
]
|
|
102
111
|
}
|
|
@@ -127,10 +127,21 @@
|
|
|
127
127
|
"language": "tsx"
|
|
128
128
|
}
|
|
129
129
|
],
|
|
130
|
-
"status": "
|
|
130
|
+
"status": "stable",
|
|
131
131
|
"url": "/docs/components/agent-pile",
|
|
132
132
|
"mdUrl": "/docs/components/agent-pile.md",
|
|
133
133
|
"jsonUrl": "/r/components/agent-pile.json",
|
|
134
|
+
"whenToUse": [
|
|
135
|
+
"A multi-agent run where who is involved matters more than what each is doing right now.",
|
|
136
|
+
"Anywhere the states must be legible without colour — crown, spinning arc and `?` badge each also go into the accessible name."
|
|
137
|
+
],
|
|
138
|
+
"whenNotToUse": [
|
|
139
|
+
"One agent. An `Avatar` says it with less.",
|
|
140
|
+
"A list the reader must act on. A pile is a summary."
|
|
141
|
+
],
|
|
142
|
+
"commonMistakes": [
|
|
143
|
+
"Adding a colour-only state of your own, which breaks the rule the three built-in states follow."
|
|
144
|
+
],
|
|
134
145
|
"specimens": [
|
|
135
146
|
{
|
|
136
147
|
"title": "AgentPile",
|
|
@@ -142,6 +153,5 @@
|
|
|
142
153
|
"note": "Faces at −12px overlap, fanning to +4px on hover. The crown marks the orchestrator, an arc marks work in flight and a `?` marks an agent waiting on an answer.",
|
|
143
154
|
"interaction": "every face is a button with the agent's name; the pile is one tab stop and arrow keys move inside it."
|
|
144
155
|
}
|
|
145
|
-
]
|
|
146
|
-
"todo": true
|
|
156
|
+
]
|
|
147
157
|
}
|
|
@@ -54,10 +54,21 @@
|
|
|
54
54
|
"language": "tsx"
|
|
55
55
|
}
|
|
56
56
|
],
|
|
57
|
-
"status": "
|
|
57
|
+
"status": "stable",
|
|
58
58
|
"url": "/docs/components/agent-plan",
|
|
59
59
|
"mdUrl": "/docs/components/agent-plan.md",
|
|
60
60
|
"jsonUrl": "/r/components/agent-plan.json",
|
|
61
|
+
"whenToUse": [
|
|
62
|
+
"An ordered set of steps the agent walks front to back, with one of them currently running."
|
|
63
|
+
],
|
|
64
|
+
"whenNotToUse": [
|
|
65
|
+
"Work that fans out and rejoins. `steps` is a flat array worked through in order.",
|
|
66
|
+
"A checklist a person ticks. Progress is driven entirely by `activeIndex`, not by input."
|
|
67
|
+
],
|
|
68
|
+
"commonMistakes": [
|
|
69
|
+
"Clamping `activeIndex` before passing it. Values past the end already mark every step done, and values before the start mark none.",
|
|
70
|
+
"Passing rich nodes as steps. `steps` is `readonly string[]`."
|
|
71
|
+
],
|
|
61
72
|
"specimens": [
|
|
62
73
|
{
|
|
63
74
|
"title": "AgentPlan",
|
|
@@ -69,6 +80,5 @@
|
|
|
69
80
|
"note": "The checklist the agent published before it started, with one index driving the whole thing: steps before it are done, the step at it is running, steps after it are waiting. An index past the end marks every step done.",
|
|
70
81
|
"interaction": "none. A plan is a readout; the agent moves it, not the reader."
|
|
71
82
|
}
|
|
72
|
-
]
|
|
73
|
-
"todo": true
|
|
83
|
+
]
|
|
74
84
|
}
|
|
@@ -67,10 +67,22 @@
|
|
|
67
67
|
"language": "tsx"
|
|
68
68
|
}
|
|
69
69
|
],
|
|
70
|
-
"status": "
|
|
70
|
+
"status": "stable",
|
|
71
71
|
"url": "/docs/components/agent-status",
|
|
72
72
|
"mdUrl": "/docs/components/agent-status.md",
|
|
73
73
|
"jsonUrl": "/r/components/agent-status.json",
|
|
74
|
+
"whenToUse": [
|
|
75
|
+
"A standing status pill beside a run: working, waiting, or done with a check.",
|
|
76
|
+
"Showing how long it has been going, which renders in mono when `elapsed` is provided."
|
|
77
|
+
],
|
|
78
|
+
"whenNotToUse": [
|
|
79
|
+
"A failure. The three states are working, waiting and done — there is no error mode.",
|
|
80
|
+
"A multi-line explanation. `label` is a short status line."
|
|
81
|
+
],
|
|
82
|
+
"commonMistakes": [
|
|
83
|
+
"Formatting the clock into `label`. `elapsed` is its own prop and gets the mono treatment.",
|
|
84
|
+
"Leaving `state=\"working\"` on a finished run, which keeps the pill signalling activity after there is nothing left to do."
|
|
85
|
+
],
|
|
74
86
|
"specimens": [
|
|
75
87
|
{
|
|
76
88
|
"title": "AgentStatus",
|
|
@@ -82,6 +94,5 @@
|
|
|
82
94
|
"note": "One pill that always answers the two questions a run raises: what is it doing, and for how long. Working shimmers, waiting is still and marked, done carries a check and the elapsed total.",
|
|
83
95
|
"interaction": "the trailing control is a labelled icon button that pauses a run and offers to run it again once it is done."
|
|
84
96
|
}
|
|
85
|
-
]
|
|
86
|
-
"todo": true
|
|
97
|
+
]
|
|
87
98
|
}
|
|
@@ -73,10 +73,20 @@
|
|
|
73
73
|
"language": "tsx"
|
|
74
74
|
}
|
|
75
75
|
],
|
|
76
|
-
"status": "
|
|
76
|
+
"status": "stable",
|
|
77
77
|
"url": "/docs/components/agent-surface",
|
|
78
78
|
"mdUrl": "/docs/components/agent-surface.md",
|
|
79
79
|
"jsonUrl": "/r/components/agent-surface.json",
|
|
80
|
+
"whenToUse": [
|
|
81
|
+
"A region of the elements family that must repaint wholesale — a different skin or fidelity — with no prop threading and no branch in any component."
|
|
82
|
+
],
|
|
83
|
+
"whenNotToUse": [
|
|
84
|
+
"One component's appearance. Use that component's own props.",
|
|
85
|
+
"Density. Use `Density`."
|
|
86
|
+
],
|
|
87
|
+
"commonMistakes": [
|
|
88
|
+
"Reading the React context to style something. The attributes do the work — `elements.css` re-declares the `--cue-*` tokens under them and custom properties inherit. The context exists for the one place that cannot see the DOM: an overlay portalled to `<body>` from inside the island."
|
|
89
|
+
],
|
|
80
90
|
"specimens": [
|
|
81
91
|
{
|
|
82
92
|
"title": "AgentSurface",
|
|
@@ -88,6 +98,5 @@
|
|
|
88
98
|
"note": "One DOM, three paint jobs. The same three tool calls sit in all three specimens; the only difference is the pair of attributes on the box around them. skin='aui' re-points the colour set to assistant-ui's own inks and grounds, and fidelity='upstream' re-points the metrics too, which is what stops cue's density ladder at the island edge. Without @cueplusplus/ui/elements.css imported, all three would look alike.",
|
|
89
99
|
"interaction": "none of its own. The island is a values-set, not a control: everything inside keeps the behaviour it has outside."
|
|
90
100
|
}
|
|
91
|
-
]
|
|
92
|
-
"todo": true
|
|
101
|
+
]
|
|
93
102
|
}
|
|
@@ -195,10 +195,22 @@
|
|
|
195
195
|
"language": "tsx"
|
|
196
196
|
}
|
|
197
197
|
],
|
|
198
|
-
"status": "
|
|
198
|
+
"status": "stable",
|
|
199
199
|
"url": "/docs/components/alert-dialog",
|
|
200
200
|
"mdUrl": "/docs/components/alert-dialog.md",
|
|
201
201
|
"jsonUrl": "/r/components/alert-dialog.json",
|
|
202
|
+
"whenToUse": [
|
|
203
|
+
"A rare, expensive, irreversible action — dropping a database, discarding unsaved work.",
|
|
204
|
+
"Anywhere an accidental outside click must not dismiss the question."
|
|
205
|
+
],
|
|
206
|
+
"whenNotToUse": [
|
|
207
|
+
"A routine destructive action. Use `TwoStepButton`: a dialog in front of something people do twenty times an hour only teaches them to dismiss dialogs.",
|
|
208
|
+
"Anything with more than two answers. Use `Dialog`."
|
|
209
|
+
],
|
|
210
|
+
"commonMistakes": [
|
|
211
|
+
"Reaching for `Dialog` instead. The difference is not cosmetic — this takes `role=\"alertdialog\"` and refuses outside-press dismissal, which is the whole point.",
|
|
212
|
+
"Labelling the buttons 'OK' and 'Cancel'. Name the action: 'Delete patch' says what OK does."
|
|
213
|
+
],
|
|
202
214
|
"specimens": [
|
|
203
215
|
{
|
|
204
216
|
"title": "AlertDialog",
|
|
@@ -210,6 +222,5 @@
|
|
|
210
222
|
"note": "The destructive twin: no scrim dismissal, no close button, and an explicit pair of Cancel and Action.",
|
|
211
223
|
"interaction": "Escape is deliberately not enough on its own; the action has to be chosen."
|
|
212
224
|
}
|
|
213
|
-
]
|
|
214
|
-
"todo": true
|
|
225
|
+
]
|
|
215
226
|
}
|
|
@@ -55,10 +55,20 @@
|
|
|
55
55
|
"language": "tsx"
|
|
56
56
|
}
|
|
57
57
|
],
|
|
58
|
-
"status": "
|
|
58
|
+
"status": "stable",
|
|
59
59
|
"url": "/docs/components/animated-number",
|
|
60
60
|
"mdUrl": "/docs/components/animated-number.md",
|
|
61
61
|
"jsonUrl": "/r/components/animated-number.json",
|
|
62
|
+
"whenToUse": [
|
|
63
|
+
"A value that is the same fact moving — a token count, a cost, a duration, a file tally."
|
|
64
|
+
],
|
|
65
|
+
"whenNotToUse": [
|
|
66
|
+
"A value that is a new fact each time. A number that steps says 'this is different'; one that counts says 'this is the same thing, changed'."
|
|
67
|
+
],
|
|
68
|
+
"commonMistakes": [
|
|
69
|
+
"Dropping the `tabular-nums`. A proportional `1` is narrower than a `0`, so a stepping counter nudges everything to its right on every update.",
|
|
70
|
+
"Tweening something that jumps for a real reason, which implies continuity that is not there."
|
|
71
|
+
],
|
|
62
72
|
"specimens": [
|
|
63
73
|
{
|
|
64
74
|
"title": "AnimatedNumber",
|
|
@@ -70,6 +80,5 @@
|
|
|
70
80
|
"note": "A number that counts to its new value instead of jumping to it, in tabular numerals so the digits do not jitter on the way. Both halves are one teardown's: the reference eases its live token estimate from the previous value to the new one and paints it in font-variant-numeric tabular-nums, because a proportional 1 is narrower than a 0 and a stepping counter nudges everything to its right on every update. A value that steps reads as a new fact; a value that counts reads as the same fact moving, which is what a token, a cost and a duration actually are.",
|
|
71
81
|
"interaction": "press the button and watch the digits rather than the box — nothing to the right of the number moves. Under prefers-reduced-motion the new value simply arrives: stillness for a counter has to mean landing on the number, because a readout that stopped where it was would be wrong rather than still. Mid-tween the digits are aria-hidden and the settled value is carried beside them, so a screen reader reads what the run reported and never a frame of the animation."
|
|
72
82
|
}
|
|
73
|
-
]
|
|
74
|
-
"todo": true
|
|
83
|
+
]
|
|
75
84
|
}
|
|
@@ -104,10 +104,21 @@
|
|
|
104
104
|
"language": "tsx"
|
|
105
105
|
}
|
|
106
106
|
],
|
|
107
|
-
"status": "
|
|
107
|
+
"status": "stable",
|
|
108
108
|
"url": "/docs/components/app-window-frame",
|
|
109
109
|
"mdUrl": "/docs/components/app-window-frame.md",
|
|
110
110
|
"jsonUrl": "/r/components/app-window-frame.json",
|
|
111
|
+
"whenToUse": [
|
|
112
|
+
"A marketing hero or a docs illustration that should re-theme with the site and stay legible at any zoom.",
|
|
113
|
+
"Anywhere a real screenshot would go stale the week after a redesign."
|
|
114
|
+
],
|
|
115
|
+
"whenNotToUse": [
|
|
116
|
+
"Application chrome. This is a depiction of a window, not one — use `TitleBar` and `StatusBar` directly."
|
|
117
|
+
],
|
|
118
|
+
"commonMistakes": [
|
|
119
|
+
"Reaching for a PNG. Because the contents are components, the depiction and the real thing cannot drift — it is built from the real `TitleBar` and `StatusBar`.",
|
|
120
|
+
"Filling it with fake markup. The point is that it holds the components it is advertising."
|
|
121
|
+
],
|
|
111
122
|
"specimens": [
|
|
112
123
|
{
|
|
113
124
|
"title": "AppWindowFrame",
|
|
@@ -119,6 +130,5 @@
|
|
|
119
130
|
"note": "The marketing device: a window with traffic lights, a toolbar slot and a status bar slot, so a screenshot of a product looks like a product.",
|
|
120
131
|
"interaction": "none. The frame is scenery."
|
|
121
132
|
}
|
|
122
|
-
]
|
|
123
|
-
"todo": true
|
|
133
|
+
]
|
|
124
134
|
}
|
|
@@ -116,10 +116,22 @@
|
|
|
116
116
|
"language": "tsx"
|
|
117
117
|
}
|
|
118
118
|
],
|
|
119
|
-
"status": "
|
|
119
|
+
"status": "stable",
|
|
120
120
|
"url": "/docs/components/approval-card",
|
|
121
121
|
"mdUrl": "/docs/components/approval-card.md",
|
|
122
122
|
"jsonUrl": "/r/components/approval-card.json",
|
|
123
|
+
"whenToUse": [
|
|
124
|
+
"A command with side effects that must not run until someone says so.",
|
|
125
|
+
"Carrying that request through its whole lifecycle, since one card covers request, running, done and denied."
|
|
126
|
+
],
|
|
127
|
+
"whenNotToUse": [
|
|
128
|
+
"A decision with no command behind it. `command` is required and is shown in a mono field.",
|
|
129
|
+
"Reporting a command that failed. The four states are request, running, done and denied; a failure needs somewhere else to go."
|
|
130
|
+
],
|
|
131
|
+
"commonMistakes": [
|
|
132
|
+
"Leaving `state=\"request\"` after the user has answered, so Allow and Deny stay pressable on a command that already ran.",
|
|
133
|
+
"Folding the explanation into `title`. `title` names the action that needs approval; `subtitle` is the supporting line that explains it."
|
|
134
|
+
],
|
|
123
135
|
"specimens": [
|
|
124
136
|
{
|
|
125
137
|
"title": "ApprovalCard",
|
|
@@ -131,6 +143,5 @@
|
|
|
131
143
|
"note": "Human in the loop for one action: the command in mono exactly as it will run, and three answers. The four specimens are the four states of the union, and the first one is live: answer it and it moves.",
|
|
132
144
|
"interaction": "Allow once and Always allow are separate answers, never one control with a modifier. Denying settles the card rather than hiding it."
|
|
133
145
|
}
|
|
134
|
-
]
|
|
135
|
-
"todo": true
|
|
146
|
+
]
|
|
136
147
|
}
|
|
@@ -73,10 +73,22 @@
|
|
|
73
73
|
"language": "tsx"
|
|
74
74
|
}
|
|
75
75
|
],
|
|
76
|
-
"status": "
|
|
76
|
+
"status": "stable",
|
|
77
77
|
"url": "/docs/components/artifact-card",
|
|
78
78
|
"mdUrl": "/docs/components/artifact-card.md",
|
|
79
79
|
"jsonUrl": "/r/components/artifact-card.json",
|
|
80
|
+
"whenToUse": [
|
|
81
|
+
"A document the model produced, standing in the transcript as an object with its kind, version and recency.",
|
|
82
|
+
"The live phase of that writing, where `generating` pulses the icon and shows a word count with a shimmer."
|
|
83
|
+
],
|
|
84
|
+
"whenNotToUse": [
|
|
85
|
+
"A file the person attached rather than one the model generated.",
|
|
86
|
+
"Showing the document's text. The card stands for the artifact; it does not render its body."
|
|
87
|
+
],
|
|
88
|
+
"commonMistakes": [
|
|
89
|
+
"Passing `words` without `generating`. The live word count only replaces the meta line while generation is running.",
|
|
90
|
+
"Splitting the resting line across props. `meta` is one pre-formatted string — kind, version and recency together."
|
|
91
|
+
],
|
|
80
92
|
"specimens": [
|
|
81
93
|
{
|
|
82
94
|
"title": "ArtifactCard",
|
|
@@ -88,6 +100,5 @@
|
|
|
88
100
|
"note": "The document the answer produced, as an object you can pick up. While it is being written the icon pulses, the label shimmers and the word count climbs; when it lands, the meta line blurs in with its size and version. It is the handle — the document itself opens in a canvas.",
|
|
89
101
|
"interaction": "the whole card is the target and lifts a pixel under the pointer; the arrow only appears on hover, so a resting card is quiet."
|
|
90
102
|
}
|
|
91
|
-
]
|
|
92
|
-
"todo": true
|
|
103
|
+
]
|
|
93
104
|
}
|
|
@@ -268,10 +268,21 @@
|
|
|
268
268
|
"language": "tsx"
|
|
269
269
|
}
|
|
270
270
|
],
|
|
271
|
-
"status": "
|
|
271
|
+
"status": "stable",
|
|
272
272
|
"url": "/docs/components/ask-box",
|
|
273
273
|
"mdUrl": "/docs/components/ask-box.md",
|
|
274
274
|
"jsonUrl": "/r/components/ask-box.json",
|
|
275
|
+
"whenToUse": [
|
|
276
|
+
"A run that cannot proceed without a person — a confirmation, a value, a choice between options.",
|
|
277
|
+
"Anywhere the answer must be recorded by the host, not by the UI."
|
|
278
|
+
],
|
|
279
|
+
"whenNotToUse": [
|
|
280
|
+
"A form. This is a single question inside a transcript.",
|
|
281
|
+
"Something the agent can decide. An ask that did not need asking is an interruption."
|
|
282
|
+
],
|
|
283
|
+
"commonMistakes": [
|
|
284
|
+
"Letting the component own whether it has been answered. It holds the *draft* only; the fact of having answered comes back as `answer` once the host has recorded it. Anything else makes local state the source of truth for a decision the run depends on — which survives exactly until the pane unmounts."
|
|
285
|
+
],
|
|
275
286
|
"specimens": [
|
|
276
287
|
{
|
|
277
288
|
"title": "AskBox",
|
|
@@ -283,6 +294,5 @@
|
|
|
283
294
|
"note": "The HITL question widget: five kinds, three danger levels, and a collapsed `question · answer ✓` summary once it is answered. Controlled through `onAnswer`, because the host owns the run.",
|
|
284
295
|
"interaction": "the danger chip is text as well as colour; an answered box collapses but stays expandable."
|
|
285
296
|
}
|
|
286
|
-
]
|
|
287
|
-
"todo": true
|
|
297
|
+
]
|
|
288
298
|
}
|
|
@@ -17,10 +17,19 @@
|
|
|
17
17
|
"tokensUsed": [],
|
|
18
18
|
"summary": "An audience: a named group of people something is published to.",
|
|
19
19
|
"examples": [],
|
|
20
|
-
"status": "
|
|
20
|
+
"status": "stable",
|
|
21
21
|
"url": "/docs/components/audience-icon",
|
|
22
22
|
"mdUrl": "/docs/components/audience-icon.md",
|
|
23
23
|
"jsonUrl": "/r/components/audience-icon.json",
|
|
24
|
+
"whenToUse": [
|
|
25
|
+
"Choosing or showing who something is published to."
|
|
26
|
+
],
|
|
27
|
+
"whenNotToUse": [
|
|
28
|
+
"A container of artefacts. Use `FolderIcon` or `CatalogueIcon`."
|
|
29
|
+
],
|
|
30
|
+
"commonMistakes": [
|
|
31
|
+
"Drawing it as a diamond or a tag, which files it with the folders — exactly the mistake a reader makes when deciding where to publish something. It is people, not an abstract shape."
|
|
32
|
+
],
|
|
24
33
|
"specimens": [
|
|
25
34
|
{
|
|
26
35
|
"title": "The container icon set",
|
|
@@ -41,6 +50,5 @@
|
|
|
41
50
|
"note": "One grid and one weight across all ten, at size-icon-md — the size a navigation row draws them at. Each is a plain <svg> that takes every SVG prop.",
|
|
42
51
|
"interaction": "none. They are decorative by default: aria-hidden, announced by nothing, because the row they mark already carries its name."
|
|
43
52
|
}
|
|
44
|
-
]
|
|
45
|
-
"todo": true
|
|
53
|
+
]
|
|
46
54
|
}
|
|
@@ -242,10 +242,23 @@
|
|
|
242
242
|
"language": "tsx"
|
|
243
243
|
}
|
|
244
244
|
],
|
|
245
|
-
"status": "
|
|
245
|
+
"status": "stable",
|
|
246
246
|
"url": "/docs/components/autocomplete",
|
|
247
247
|
"mdUrl": "/docs/components/autocomplete.md",
|
|
248
248
|
"jsonUrl": "/r/components/autocomplete.json",
|
|
249
|
+
"whenToUse": [
|
|
250
|
+
"A value the product cannot enumerate: a name, a search term, a hostname. The suggestions are a shortcut, not the set of legal answers.",
|
|
251
|
+
"Anywhere typing something unlisted must survive blur rather than being silently discarded."
|
|
252
|
+
],
|
|
253
|
+
"whenNotToUse": [
|
|
254
|
+
"A value that must come from a known set. Use `Combobox`, whose text is a filter and whose value is always one of `items`.",
|
|
255
|
+
"Several values at once. Use `TagsInput` for free-form, `MultiSelect` for a known set."
|
|
256
|
+
],
|
|
257
|
+
"commonMistakes": [
|
|
258
|
+
"Reaching for it because it looks like `Combobox`. Pick on the contract, not the shape: ask what happens downstream to a value nobody suggested.",
|
|
259
|
+
"Passing objects as `items`. Suggestions are plain strings, because an autocomplete has no identity to attach to a value it did not supply.",
|
|
260
|
+
"Validating only against the suggestions. The whole point is that the typed value wins, so the typed value is what needs checking."
|
|
261
|
+
],
|
|
249
262
|
"specimens": [
|
|
250
263
|
{
|
|
251
264
|
"title": "Autocomplete",
|
|
@@ -257,6 +270,5 @@
|
|
|
257
270
|
"note": "Suggestions over free text: the field keeps whatever was typed, and the list only offers.",
|
|
258
271
|
"interaction": "the list opens on input, not on focus; `autoHighlight` pre-selects the first match."
|
|
259
272
|
}
|
|
260
|
-
]
|
|
261
|
-
"todo": true
|
|
273
|
+
]
|
|
262
274
|
}
|