@cueplusplus/ui 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +705 -0
- package/dist/brand/_chassis.d.ts +54 -0
- package/dist/brand/_chassis.js +81 -0
- package/dist/brand/_geometry.js +41 -0
- package/dist/brand/cue-logotype.d.ts +29 -0
- package/dist/brand/cue-logotype.js +60 -0
- package/dist/brand/cue-mark.d.ts +30 -0
- package/dist/brand/cue-mark.js +61 -0
- package/dist/brand/index.d.ts +5 -0
- package/dist/brand/plussie.d.ts +67 -0
- package/dist/brand/plussie.js +125 -0
- package/dist/chat/agent-pile.js +1 -1
- package/dist/chat/ask-box.js +2 -2
- package/dist/chat/delegation-card.js +1 -1
- package/dist/chat/message.js +2 -2
- package/dist/chrome/_edge-scroller.d.ts +45 -0
- package/dist/chrome/_edge-scroller.js +149 -0
- package/dist/chrome/_glyphs.js +19 -1
- package/dist/chrome/_tabs-scroll.d.ts +13 -8
- package/dist/chrome/_tabs-scroll.js +13 -8
- package/dist/chrome/app-bar.d.ts +103 -0
- package/dist/chrome/app-bar.js +175 -0
- package/dist/chrome/app-shell.d.ts +125 -0
- package/dist/chrome/app-shell.js +167 -0
- package/dist/chrome/footer.d.ts +75 -0
- package/dist/chrome/footer.js +68 -0
- package/dist/chrome/index.d.ts +5 -1
- package/dist/chrome/index.js +4 -1
- package/dist/chrome/navigation-menu.js +1 -1
- package/dist/chrome/page-shell.d.ts +1 -1
- package/dist/chrome/page-shell.js +15 -5
- package/dist/chrome/segmented-control.d.ts +19 -0
- package/dist/chrome/segmented-control.js +40 -21
- package/dist/chrome/tabs.js +21 -65
- package/dist/chrome/toolbar.d.ts +22 -0
- package/dist/chrome/toolbar.js +26 -5
- package/dist/configurator/_overrides.js +22 -8
- package/dist/configurator/configurator.js +1 -1
- package/dist/configurator/panel-sections.js +10 -4
- package/dist/dmx/channel-matrix.js +1 -1
- package/dist/forms/otp-field.js +1 -1
- package/dist/index.d.ts +18 -9
- package/dist/index.js +16 -10
- package/dist/instruments/data-table.js +1 -1
- package/dist/instruments/index.d.ts +2 -2
- package/dist/instruments/index.js +2 -2
- package/dist/instruments/table.d.ts +14 -1
- package/dist/instruments/table.js +20 -1
- package/dist/layout/carousel.js +1 -1
- package/dist/layout/container.d.ts +1 -1
- package/dist/layout/container.js +6 -3
- package/dist/layout/index.d.ts +3 -3
- package/dist/layout/index.js +3 -3
- package/dist/layout/pagination.js +1 -1
- package/dist/layout/sidebar.d.ts +23 -3
- package/dist/layout/sidebar.js +18 -7
- package/dist/midi/spectrum-visualizer.js +1 -1
- package/dist/midi/timeline-ruler.js +1 -1
- package/dist/overlays/command-palette.js +1 -1
- package/dist/overlays/dialog.js +1 -1
- package/dist/overlays/dropdown-menu.js +2 -2
- package/dist/overlays/hover-card.js +1 -1
- package/dist/overlays/index.js +1 -1
- package/dist/overlays/popover.js +1 -1
- package/dist/overlays/sheet.js +1 -1
- package/dist/overlays/toast.js +1 -1
- package/dist/primitives/chip.d.ts +1 -1
- package/dist/primitives/index.d.ts +1 -1
- package/dist/primitives/index.js +1 -1
- package/dist/primitives/status-dot.d.ts +7 -0
- package/dist/primitives/status-dot.js +8 -1
- package/dist/styles.css +58 -2
- package/dist/system/density.d.ts +4 -1
- package/dist/system/density.js +12 -4
- package/dist/system/index.d.ts +4 -4
- package/dist/system/portal.d.ts +5 -5
- package/dist/system/portal.js +30 -11
- package/dist/system/prepaint.d.ts +34 -9
- package/dist/system/prepaint.js +48 -25
- package/dist/system/theme-provider.d.ts +48 -11
- package/dist/system/theme-provider.js +109 -35
- package/dist/system/use-density.d.ts +3 -3
- package/dist/system/use-density.js +16 -6
- package/dist/system/use-theme.d.ts +4 -2
- package/dist/system/use-theme.js +4 -2
- package/dist/theming/_presets.js +133 -5
- package/dist/theming/create-theme.d.ts +2 -2
- package/dist/theming/create-theme.js +37 -19
- package/dist/theming/serialize.d.ts +1 -1
- package/dist/theming/serialize.js +25 -1
- package/manifest/components/accordion.json +154 -0
- package/manifest/components/agent-pile.json +116 -0
- package/manifest/components/alert-dialog.json +190 -0
- package/manifest/components/app-bar.json +244 -0
- package/manifest/components/app-shell.json +291 -0
- package/manifest/components/app-window-frame.json +102 -0
- package/manifest/components/ask-box.json +209 -0
- package/manifest/components/autocomplete.json +197 -0
- package/manifest/components/avatar-group.json +72 -0
- package/manifest/components/avatar.json +95 -0
- package/manifest/components/breadcrumb.json +74 -0
- package/manifest/components/button-group.json +74 -0
- package/manifest/components/button.json +125 -0
- package/manifest/components/calendar.json +65 -0
- package/manifest/components/card.json +140 -0
- package/manifest/components/carousel.json +200 -0
- package/manifest/components/channel-matrix.json +173 -0
- package/manifest/components/chart-container.json +111 -0
- package/manifest/components/chart-ramp.json +72 -0
- package/manifest/components/chart-swatch.json +65 -0
- package/manifest/components/chart-tooltip-content.json +114 -0
- package/manifest/components/checkbox-group.json +68 -0
- package/manifest/components/checkbox.json +93 -0
- package/manifest/components/chip.json +132 -0
- package/manifest/components/collapsible.json +120 -0
- package/manifest/components/color-area.json +59 -0
- package/manifest/components/color-field.json +79 -0
- package/manifest/components/color-picker.json +175 -0
- package/manifest/components/color-slider.json +75 -0
- package/manifest/components/color-swatch.json +68 -0
- package/manifest/components/colors-section.json +66 -0
- package/manifest/components/combobox.json +198 -0
- package/manifest/components/command-palette.json +177 -0
- package/manifest/components/composer.json +176 -0
- package/manifest/components/container.json +60 -0
- package/manifest/components/context-menu.json +121 -0
- package/manifest/components/copy-button.json +93 -0
- package/manifest/components/cue-logotype.json +96 -0
- package/manifest/components/cue-mark.json +97 -0
- package/manifest/components/cue-portal-frame.json +55 -0
- package/manifest/components/data-table-pagination.json +83 -0
- package/manifest/components/data-table-toolbar.json +104 -0
- package/manifest/components/date-field.json +80 -0
- package/manifest/components/date-picker.json +191 -0
- package/manifest/components/date-range-picker.json +191 -0
- package/manifest/components/delegation-card.json +144 -0
- package/manifest/components/density.json +58 -0
- package/manifest/components/description-list.json +84 -0
- package/manifest/components/dialog.json +198 -0
- package/manifest/components/disclosure.json +109 -0
- package/manifest/components/dmx-bar.json +94 -0
- package/manifest/components/dmx-strip.json +101 -0
- package/manifest/components/drawer.json +179 -0
- package/manifest/components/dropdown-menu.json +229 -0
- package/manifest/components/empty-state.json +90 -0
- package/manifest/components/env-var-input.json +150 -0
- package/manifest/components/export-dialog.json +84 -0
- package/manifest/components/eyebrow.json +56 -0
- package/manifest/components/field-description.json +63 -0
- package/manifest/components/field-error.json +77 -0
- package/manifest/components/field-label.json +63 -0
- package/manifest/components/field.json +79 -0
- package/manifest/components/file-upload.json +159 -0
- package/manifest/components/flow-background.json +50 -0
- package/manifest/components/flow-controls.json +50 -0
- package/manifest/components/footer.json +112 -0
- package/manifest/components/grid.json +81 -0
- package/manifest/components/group-bar.json +102 -0
- package/manifest/components/hover-card.json +151 -0
- package/manifest/components/icon-button.json +88 -0
- package/manifest/components/info-tip.json +98 -0
- package/manifest/components/input-group.json +91 -0
- package/manifest/components/input.json +89 -0
- package/manifest/components/item.json +129 -0
- package/manifest/components/kbd.json +52 -0
- package/manifest/components/link.json +81 -0
- package/manifest/components/log-viewer.json +139 -0
- package/manifest/components/menubar.json +157 -0
- package/manifest/components/message-list.json +100 -0
- package/manifest/components/message.json +116 -0
- package/manifest/components/meter.json +114 -0
- package/manifest/components/multi-select.json +190 -0
- package/manifest/components/musical-time-input.json +113 -0
- package/manifest/components/navigation-menu.json +226 -0
- package/manifest/components/node-card.json +109 -0
- package/manifest/components/node-handle.json +69 -0
- package/manifest/components/number-field.json +107 -0
- package/manifest/components/otp-field.json +128 -0
- package/manifest/components/page-shell.json +96 -0
- package/manifest/components/pagination.json +92 -0
- package/manifest/components/panel-header.json +77 -0
- package/manifest/components/panel.json +71 -0
- package/manifest/components/password-input.json +119 -0
- package/manifest/components/piano-keyboard.json +120 -0
- package/manifest/components/plussie.json +111 -0
- package/manifest/components/popover.json +193 -0
- package/manifest/components/preset-section.json +73 -0
- package/manifest/components/progress.json +95 -0
- package/manifest/components/radio-group.json +73 -0
- package/manifest/components/radio.json +80 -0
- package/manifest/components/rating.json +141 -0
- package/manifest/components/resizable.json +88 -0
- package/manifest/components/row.json +109 -0
- package/manifest/components/scroll-area.json +91 -0
- package/manifest/components/scrollable-tabs-list.json +83 -0
- package/manifest/components/scrub-input.json +200 -0
- package/manifest/components/seam-cell.json +75 -0
- package/manifest/components/seam-grid.json +75 -0
- package/manifest/components/seam-list.json +56 -0
- package/manifest/components/search-input.json +134 -0
- package/manifest/components/section-header.json +112 -0
- package/manifest/components/segmented-control.json +138 -0
- package/manifest/components/select.json +194 -0
- package/manifest/components/separator.json +53 -0
- package/manifest/components/shape-section.json +66 -0
- package/manifest/components/sheet.json +186 -0
- package/manifest/components/sidebar.json +198 -0
- package/manifest/components/signal-edge.json +56 -0
- package/manifest/components/skeleton.json +46 -0
- package/manifest/components/slider.json +89 -0
- package/manifest/components/sparkline.json +76 -0
- package/manifest/components/spectrum-visualizer.json +115 -0
- package/manifest/components/spinner.json +61 -0
- package/manifest/components/stack.json +96 -0
- package/manifest/components/stat.json +87 -0
- package/manifest/components/status-bar.json +58 -0
- package/manifest/components/status-dot.json +78 -0
- package/manifest/components/stepper.json +89 -0
- package/manifest/components/switch.json +87 -0
- package/manifest/components/table-scroll-region.json +69 -0
- package/manifest/components/table.json +155 -0
- package/manifest/components/tabs.json +145 -0
- package/manifest/components/tags-input.json +190 -0
- package/manifest/components/terminal-frame.json +119 -0
- package/manifest/components/textarea.json +76 -0
- package/manifest/components/theme-configurator.json +124 -0
- package/manifest/components/theme-provider.json +134 -0
- package/manifest/components/threshold-rail.json +160 -0
- package/manifest/components/time-field.json +80 -0
- package/manifest/components/timeline-ruler.json +139 -0
- package/manifest/components/timeline.json +115 -0
- package/manifest/components/title-bar.json +82 -0
- package/manifest/components/toast.json +130 -0
- package/manifest/components/toggle-group.json +106 -0
- package/manifest/components/toggle.json +109 -0
- package/manifest/components/token-editor.json +90 -0
- package/manifest/components/toolbar.json +163 -0
- package/manifest/components/tooltip.json +164 -0
- package/manifest/components/tree-visibility-toggle.json +84 -0
- package/manifest/components/tree.json +140 -0
- package/manifest/components/two-step-button.json +113 -0
- package/manifest/components/universe-grid.json +127 -0
- package/manifest/components/usage-chart.json +124 -0
- package/manifest/manifest.json +2142 -0
- package/manifest/tokens.json +138 -0
- package/package.json +13 -5
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "NodeHandle",
|
|
3
|
+
"slug": "node-handle",
|
|
4
|
+
"group": "flow",
|
|
5
|
+
"importPath": "@cueplusplus/ui/flow",
|
|
6
|
+
"peerDependencies": [
|
|
7
|
+
"@xyflow/react"
|
|
8
|
+
],
|
|
9
|
+
"clientOnly": true,
|
|
10
|
+
"description": "A connection point on a node, drawn as a pin rather than a dot.\n\nEverything visual is **inline style, not a class**, and that is deliberate:\n`.react-flow__handle` sets `background-color`, `border` and `width`/`height`\nfrom the library's own unlayered stylesheet, while Tailwind's utilities live in\na cascade layer — and any layered rule loses to an unlayered one of the same\nspecificity, whatever order the files load in. An inline declaration is the\nonly paint that reliably wins, which is also how the port did it.\n\nThe pin is ringed in `--cue-bg` rather than in the card's own surface, so it\nreads as lifted off the edge it straddles no matter which surface rung the\nnode is on.",
|
|
11
|
+
"props": [
|
|
12
|
+
{
|
|
13
|
+
"name": "tone",
|
|
14
|
+
"type": "\"accent\" | \"danger\" | \"busy\" | \"muted\" | \"ok\" | \"warn\" | \"info\"",
|
|
15
|
+
"required": false,
|
|
16
|
+
"defaultValue": "accent",
|
|
17
|
+
"description": "What the connection carries. Defaults to `\"accent\"`."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "size",
|
|
21
|
+
"type": "number",
|
|
22
|
+
"required": false,
|
|
23
|
+
"defaultValue": "9",
|
|
24
|
+
"description": "Diameter in px at the 16px root, emitted as `rem`. Defaults to `9`."
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"typeReferences": [
|
|
28
|
+
"HandleProps"
|
|
29
|
+
],
|
|
30
|
+
"subcomponents": [],
|
|
31
|
+
"parts": [],
|
|
32
|
+
"variants": {},
|
|
33
|
+
"defaultVariants": {},
|
|
34
|
+
"tokensUsed": [
|
|
35
|
+
"--cue-accent",
|
|
36
|
+
"--cue-bg",
|
|
37
|
+
"--cue-border-strong",
|
|
38
|
+
"--cue-busy",
|
|
39
|
+
"--cue-danger",
|
|
40
|
+
"--cue-info",
|
|
41
|
+
"--cue-ok",
|
|
42
|
+
"--cue-warn"
|
|
43
|
+
],
|
|
44
|
+
"summary": "A connection point on a node, drawn as a pin rather than a dot.",
|
|
45
|
+
"examples": [
|
|
46
|
+
{
|
|
47
|
+
"title": "Usage",
|
|
48
|
+
"code": "<NodeHandle type=\"source\" position={Position.Right} id=\"u1\" />\n<NodeHandle type=\"target\" position={Position.Left} id=\"in\" tone=\"muted\" />",
|
|
49
|
+
"language": "tsx"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"status": "todo-docs",
|
|
53
|
+
"url": "/docs/components/node-handle",
|
|
54
|
+
"mdUrl": "/docs/components/node-handle.md",
|
|
55
|
+
"jsonUrl": "/r/components/node-handle.json",
|
|
56
|
+
"specimens": [
|
|
57
|
+
{
|
|
58
|
+
"title": "NodeHandle",
|
|
59
|
+
"group": "flow",
|
|
60
|
+
"components": [
|
|
61
|
+
"NodeHandle"
|
|
62
|
+
],
|
|
63
|
+
"code": "<div className=\"h-[9rem] w-full overflow-hidden rounded-(--radius-surface) border border-border\">\n <ReactFlow\n nodes={TONE_NODES}\n edges={[]}\n nodeTypes={NODE_TYPES}\n colorMode={theme.colorMode}\n style={theme.style}\n nodesDraggable={false}\n panOnDrag={false}\n zoomOnScroll={false}\n proOptions={{ hideAttribution: true }}\n />\n</div>",
|
|
64
|
+
"note": "A 9px connection pin in the system's tones, painted with inline `var(--cue-*)` references. That is deliberate: the library's own stylesheet is unlayered while Tailwind's utilities are layered, and a layered rule loses to an unlayered one of equal specificity whatever the import order. Shown on a node, because a handle only exists inside a canvas.",
|
|
65
|
+
"interaction": "the hit area is larger than the dot; the pin resolves its colour from the live custom properties, so a theme switch repaints it."
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"todo": true
|
|
69
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "NumberField",
|
|
3
|
+
"slug": "number-field",
|
|
4
|
+
"group": "forms",
|
|
5
|
+
"importPath": "@cueplusplus/ui",
|
|
6
|
+
"peerDependencies": [],
|
|
7
|
+
"clientOnly": true,
|
|
8
|
+
"description": "A numeric control with explicit − / + affordances and no native spinners.\n\nNative `<input type=\"number\">` spinners are unusable at console density — a\npair of 4px arrows that only appear on hover — so this is a text input with\n`inputMode=\"numeric\"` flanked by real buttons, which is also what makes it\ntouch-usable. Arrow keys step, Shift steps by `largeStep`, Alt by `smallStep`,\nand values typed out of range are clamped to `min`/`max` on blur.\n\nThe group owns the rim; the input and both buttons render bare inside it, so\nthe whole cluster reads as one field and focus feedback moves to\n`focus-within`.",
|
|
9
|
+
"props": [
|
|
10
|
+
{
|
|
11
|
+
"name": "className",
|
|
12
|
+
"type": "string",
|
|
13
|
+
"required": false,
|
|
14
|
+
"defaultValue": null,
|
|
15
|
+
"description": "Extra classes, merged over the group chassis."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "aria-label",
|
|
19
|
+
"type": "string",
|
|
20
|
+
"required": false,
|
|
21
|
+
"defaultValue": null,
|
|
22
|
+
"description": "Accessible name for the text control, when no {@link FieldLabel } names it."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "size",
|
|
26
|
+
"type": "\"sm\" | \"md\"",
|
|
27
|
+
"required": false,
|
|
28
|
+
"defaultValue": "md",
|
|
29
|
+
"description": "Rung of the control ladder. Defaults to `\"md\"`."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "placeholder",
|
|
33
|
+
"type": "string",
|
|
34
|
+
"required": false,
|
|
35
|
+
"defaultValue": null,
|
|
36
|
+
"description": "Placeholder shown while the field is empty."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "decrementLabel",
|
|
40
|
+
"type": "string",
|
|
41
|
+
"required": false,
|
|
42
|
+
"defaultValue": "Decrease",
|
|
43
|
+
"description": "Accessible name for the decrement button. Defaults to `\"Decrease\"`."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "incrementLabel",
|
|
47
|
+
"type": "string",
|
|
48
|
+
"required": false,
|
|
49
|
+
"defaultValue": "Increase",
|
|
50
|
+
"description": "Accessible name for the increment button. Defaults to `\"Increase\"`."
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"typeReferences": [
|
|
54
|
+
"Omit<BaseNumberField.Root.Props, \"className\">"
|
|
55
|
+
],
|
|
56
|
+
"subcomponents": [],
|
|
57
|
+
"parts": [],
|
|
58
|
+
"variants": {},
|
|
59
|
+
"defaultVariants": {},
|
|
60
|
+
"tokensUsed": [
|
|
61
|
+
"--cue-accent",
|
|
62
|
+
"--cue-border",
|
|
63
|
+
"--cue-control-lg",
|
|
64
|
+
"--cue-control-md",
|
|
65
|
+
"--cue-control-sm",
|
|
66
|
+
"--cue-danger",
|
|
67
|
+
"--cue-fg",
|
|
68
|
+
"--cue-fg-muted",
|
|
69
|
+
"--cue-fg-subtle",
|
|
70
|
+
"--cue-font-mono",
|
|
71
|
+
"--cue-radius-control",
|
|
72
|
+
"--cue-space-2",
|
|
73
|
+
"--cue-space-3",
|
|
74
|
+
"--cue-space-4",
|
|
75
|
+
"--cue-space-5",
|
|
76
|
+
"--cue-sunken",
|
|
77
|
+
"--cue-surface-2",
|
|
78
|
+
"--cue-text-body",
|
|
79
|
+
"--cue-text-label",
|
|
80
|
+
"--cue-text-ui"
|
|
81
|
+
],
|
|
82
|
+
"summary": "A numeric control with explicit − / + affordances and no native spinners.",
|
|
83
|
+
"examples": [
|
|
84
|
+
{
|
|
85
|
+
"title": "Usage",
|
|
86
|
+
"code": "<NumberField aria-label=\"Fade time\" defaultValue={3} min={0} max={600} step={0.5} />\n<Field><FieldLabel>Universe</FieldLabel><NumberField min={1} max={512} /></Field>",
|
|
87
|
+
"language": "tsx"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"status": "todo-docs",
|
|
91
|
+
"url": "/docs/components/number-field",
|
|
92
|
+
"mdUrl": "/docs/components/number-field.md",
|
|
93
|
+
"jsonUrl": "/r/components/number-field.json",
|
|
94
|
+
"specimens": [
|
|
95
|
+
{
|
|
96
|
+
"title": "NumberField",
|
|
97
|
+
"group": "forms",
|
|
98
|
+
"components": [
|
|
99
|
+
"NumberField"
|
|
100
|
+
],
|
|
101
|
+
"code": "<Specimens>\n <Specimen label=\"default\">\n <NumberField aria-label=\"Fade time\" defaultValue={3} min={0} max={600} step={0.5} />\n </Specimen>\n <Specimen label=\"sm\">\n <NumberField aria-label=\"Fade time, small\" defaultValue={3} size=\"sm\" />\n </Specimen>\n <Specimen label=\"disabled\">\n <NumberField aria-label=\"Fade time, disabled\" defaultValue={3} disabled />\n </Specimen>\n</Specimens>",
|
|
102
|
+
"note": "Stepper buttons on the chassis, with tabular figures so a changing digit does not shift the column.",
|
|
103
|
+
"interaction": "arrow keys step, shift-arrow steps by ten, the scroll wheel is deliberately inert."
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"todo": true
|
|
107
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "OTPField",
|
|
3
|
+
"slug": "otp-field",
|
|
4
|
+
"group": "forms",
|
|
5
|
+
"importPath": "@cueplusplus/ui",
|
|
6
|
+
"peerDependencies": [],
|
|
7
|
+
"clientOnly": true,
|
|
8
|
+
"description": "A one-time code, one character per box.\n\nThe boxes are not decoration: they tell the user how long the code is before\nthey start typing, which is the whole reason this pattern beats a plain text\ninput. Paste, arrow keys, Backspace across slot boundaries and the\n`one-time-code` autofill hint all come from Base UI.\n\nSlots ride the recessed chassis — sunken fill, hairline rim — so a code field\nreads as \"type here\" like every other input in the system, just squared off.",
|
|
9
|
+
"props": [
|
|
10
|
+
{
|
|
11
|
+
"name": "className",
|
|
12
|
+
"type": "string",
|
|
13
|
+
"required": false,
|
|
14
|
+
"defaultValue": null,
|
|
15
|
+
"description": "Extra classes for the row."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "id",
|
|
19
|
+
"type": "string",
|
|
20
|
+
"required": false,
|
|
21
|
+
"defaultValue": null,
|
|
22
|
+
"description": "Id of the first slot. Generated when omitted, so the hidden label can target it."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "aria-label",
|
|
26
|
+
"type": "string",
|
|
27
|
+
"required": false,
|
|
28
|
+
"defaultValue": null,
|
|
29
|
+
"description": "Accessible name for the field. Names the group *and*, through a visually\nhidden `<label>`, the first slot — the ARIA pattern for a code field. Leave\nit off inside a {@link Field }, which supplies a real label."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "size",
|
|
33
|
+
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
34
|
+
"required": false,
|
|
35
|
+
"defaultValue": "md",
|
|
36
|
+
"description": "Rung of the control ladder. Defaults to `\"md\"`."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "separator",
|
|
40
|
+
"type": "ReactNode",
|
|
41
|
+
"required": false,
|
|
42
|
+
"defaultValue": "–",
|
|
43
|
+
"description": "What sits between groups. Defaults to `\"–\"`. Always `aria-hidden`."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "length",
|
|
47
|
+
"type": "number",
|
|
48
|
+
"required": false,
|
|
49
|
+
"defaultValue": "6",
|
|
50
|
+
"description": "How many characters the code has. Defaults to `6`."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "groupSize",
|
|
54
|
+
"type": "number",
|
|
55
|
+
"required": false,
|
|
56
|
+
"defaultValue": null,
|
|
57
|
+
"description": "Insert a separator after every `groupSize` slots — `groupSize={3}` renders a\nsix-character code as `123 456`, which is how people read one off a screen."
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "slotLabel",
|
|
61
|
+
"type": "((index: number, length: number) => string)",
|
|
62
|
+
"required": false,
|
|
63
|
+
"defaultValue": "(index, total) => `Character ${index + 1} of ${total}`",
|
|
64
|
+
"description": "Accessible name for slot `index` (1-based here, since slot 0 is named by the\nfield label) of `length`. Defaults to\n``(index, length) => `Character ${index + 1} of ${length}` ``."
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "slotClassName",
|
|
68
|
+
"type": "string",
|
|
69
|
+
"required": false,
|
|
70
|
+
"defaultValue": null,
|
|
71
|
+
"description": "Extra classes for every slot."
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"typeReferences": [
|
|
75
|
+
"Omit<BaseOTPField.Root.Props, \"className\" | \"children\" | \"length\">"
|
|
76
|
+
],
|
|
77
|
+
"subcomponents": [],
|
|
78
|
+
"parts": [],
|
|
79
|
+
"variants": {},
|
|
80
|
+
"defaultVariants": {},
|
|
81
|
+
"tokensUsed": [
|
|
82
|
+
"--cue-accent",
|
|
83
|
+
"--cue-border",
|
|
84
|
+
"--cue-control-lg",
|
|
85
|
+
"--cue-control-md",
|
|
86
|
+
"--cue-control-sm",
|
|
87
|
+
"--cue-danger",
|
|
88
|
+
"--cue-fg",
|
|
89
|
+
"--cue-fg-subtle",
|
|
90
|
+
"--cue-font-mono",
|
|
91
|
+
"--cue-radius-control",
|
|
92
|
+
"--cue-space-1",
|
|
93
|
+
"--cue-space-2",
|
|
94
|
+
"--cue-space-3",
|
|
95
|
+
"--cue-space-4",
|
|
96
|
+
"--cue-space-5",
|
|
97
|
+
"--cue-sunken",
|
|
98
|
+
"--cue-text-body",
|
|
99
|
+
"--cue-text-emphasis",
|
|
100
|
+
"--cue-text-label",
|
|
101
|
+
"--cue-text-ui"
|
|
102
|
+
],
|
|
103
|
+
"summary": "A one-time code, one character per box.",
|
|
104
|
+
"examples": [
|
|
105
|
+
{
|
|
106
|
+
"title": "Usage",
|
|
107
|
+
"code": "<OTPField aria-label=\"Verification code\" onValueComplete={submit} />\n<OTPField aria-label=\"Recovery code\" length={8} groupSize={4} validationType=\"alphanumeric\" />",
|
|
108
|
+
"language": "tsx"
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
"status": "todo-docs",
|
|
112
|
+
"url": "/docs/components/otp-field",
|
|
113
|
+
"mdUrl": "/docs/components/otp-field.md",
|
|
114
|
+
"jsonUrl": "/r/components/otp-field.json",
|
|
115
|
+
"specimens": [
|
|
116
|
+
{
|
|
117
|
+
"title": "OTPField",
|
|
118
|
+
"group": "forms",
|
|
119
|
+
"components": [
|
|
120
|
+
"OTPField"
|
|
121
|
+
],
|
|
122
|
+
"code": "<Specimens>\n <Specimen label=\"empty\">\n <OTPField aria-label=\"Pairing code\" />\n </Specimen>\n <Specimen label=\"filled\">\n <OTPField aria-label=\"Pairing code, filled\" defaultValue=\"428170\" />\n </Specimen>\n <Specimen label=\"4 digits, sm\">\n <OTPField aria-label=\"Short code\" length={4} groupSize={4} size=\"sm\" />\n </Specimen>\n <Specimen label=\"disabled\">\n <OTPField aria-label=\"Code, disabled\" defaultValue=\"428170\" disabled />\n </Specimen>\n</Specimens>",
|
|
123
|
+
"note": "Six slots in two groups. One value, six boxes: paste fills all of them.",
|
|
124
|
+
"interaction": "Backspace walks back through the slots; arrow keys move without deleting."
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"todo": true
|
|
128
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "PageShell",
|
|
3
|
+
"slug": "page-shell",
|
|
4
|
+
"group": "chrome",
|
|
5
|
+
"importPath": "@cueplusplus/ui",
|
|
6
|
+
"peerDependencies": [],
|
|
7
|
+
"clientOnly": false,
|
|
8
|
+
"description": "A centred content column with a standard page header.\n\nThe header is emitted only when something fills it, so a shell used purely\nfor its measure adds no empty box and no stray vertical rhythm.\n\nRenders a plain `<div>` rather than a `<main>`: a page can hold more than one\nshell (a split view), and only one element per document may be `<main>`. Wrap\nit yourself where the semantics apply.\n\nStatic markup — no `\"use client\"`.",
|
|
9
|
+
"props": [
|
|
10
|
+
{
|
|
11
|
+
"name": "width",
|
|
12
|
+
"type": "\"narrow\" | \"wide\" | \"broad\" | \"full\"",
|
|
13
|
+
"required": false,
|
|
14
|
+
"defaultValue": "narrow",
|
|
15
|
+
"description": "Which measure the content column takes. Defaults to `\"narrow\"`."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "title",
|
|
19
|
+
"type": "ReactNode",
|
|
20
|
+
"required": false,
|
|
21
|
+
"defaultValue": null,
|
|
22
|
+
"description": "The page heading. Rendered as the `<h1>`."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "subtitle",
|
|
26
|
+
"type": "ReactNode",
|
|
27
|
+
"required": false,
|
|
28
|
+
"defaultValue": null,
|
|
29
|
+
"description": "One supporting line under the title."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "eyebrow",
|
|
33
|
+
"type": "ReactNode",
|
|
34
|
+
"required": false,
|
|
35
|
+
"defaultValue": null,
|
|
36
|
+
"description": "Accent kicker above the title — normally an `<Eyebrow>`."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "actions",
|
|
40
|
+
"type": "ReactNode",
|
|
41
|
+
"required": false,
|
|
42
|
+
"defaultValue": null,
|
|
43
|
+
"description": "Page-level actions, aligned with the title."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "children",
|
|
47
|
+
"type": "ReactNode",
|
|
48
|
+
"required": false,
|
|
49
|
+
"defaultValue": null,
|
|
50
|
+
"description": "The page body."
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"typeReferences": [
|
|
54
|
+
"Omit<React.ComponentPropsWithoutRef<\"div\">, \"title\">"
|
|
55
|
+
],
|
|
56
|
+
"subcomponents": [],
|
|
57
|
+
"parts": [],
|
|
58
|
+
"variants": {},
|
|
59
|
+
"defaultVariants": {},
|
|
60
|
+
"tokensUsed": [
|
|
61
|
+
"--cue-fg",
|
|
62
|
+
"--cue-fg-muted",
|
|
63
|
+
"--cue-font-mono",
|
|
64
|
+
"--cue-space-2",
|
|
65
|
+
"--cue-space-4",
|
|
66
|
+
"--cue-space-6",
|
|
67
|
+
"--cue-space-7",
|
|
68
|
+
"--cue-text-title",
|
|
69
|
+
"--cue-text-ui"
|
|
70
|
+
],
|
|
71
|
+
"summary": "A centred content column with a standard page header.",
|
|
72
|
+
"examples": [
|
|
73
|
+
{
|
|
74
|
+
"title": "Usage",
|
|
75
|
+
"code": "<PageShell title=\"Patch\" subtitle=\"512 channels\" eyebrow={<Eyebrow>Console</Eyebrow>}>\n <Panel>…</Panel>\n</PageShell>",
|
|
76
|
+
"language": "tsx"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"status": "todo-docs",
|
|
80
|
+
"url": "/docs/components/page-shell",
|
|
81
|
+
"mdUrl": "/docs/components/page-shell.md",
|
|
82
|
+
"jsonUrl": "/r/components/page-shell.json",
|
|
83
|
+
"specimens": [
|
|
84
|
+
{
|
|
85
|
+
"title": "PageShell",
|
|
86
|
+
"group": "chrome",
|
|
87
|
+
"components": [
|
|
88
|
+
"PageShell"
|
|
89
|
+
],
|
|
90
|
+
"code": "<div className=\"w-full rounded-(--radius-surface) border border-border bg-bg py-(--cue-space-5)\">\n <PageShell\n width=\"narrow\"\n eyebrow={<Eyebrow>show file</Eyebrow>}\n title=\"Ada, act 2\"\n subtitle=\"12 cues, 48 fixtures, 4 universes.\"\n actions={<Button variant=\"primary\">Save</Button>}\n >\n <Panel className=\"p-(--cue-space-5) font-mono text-(length:--cue-text-ui) text-fg-muted\">\n Page body.\n </Panel>\n </PageShell>\n</div>",
|
|
91
|
+
"note": "The page measure: eyebrow, title, subtitle, actions and a body at one of four widths — 42rem, 54rem, 84rem, or uncapped.",
|
|
92
|
+
"interaction": "none."
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"todo": true
|
|
96
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Pagination",
|
|
3
|
+
"slug": "pagination",
|
|
4
|
+
"group": "layout",
|
|
5
|
+
"importPath": "@cueplusplus/ui",
|
|
6
|
+
"peerDependencies": [],
|
|
7
|
+
"clientOnly": true,
|
|
8
|
+
"description": "The pager: previous, a window of page numbers, next.\n\nRenders nothing at all when there is a single page — a control offering no\nchoice is chrome that says \"there is more here\" when there is not.\n\nEvery page number is a real button with a spoken name (\"Page 3\"), because the\nbare numeral is meaningless read aloud out of context; the ellipses are\n`aria-hidden` for the same reason breadcrumb separators are.",
|
|
9
|
+
"props": [
|
|
10
|
+
{
|
|
11
|
+
"name": "page",
|
|
12
|
+
"type": "number",
|
|
13
|
+
"required": true,
|
|
14
|
+
"defaultValue": null,
|
|
15
|
+
"description": "The current page, 1-based."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "pageCount",
|
|
19
|
+
"type": "number",
|
|
20
|
+
"required": true,
|
|
21
|
+
"defaultValue": null,
|
|
22
|
+
"description": "How many pages there are in total."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "onPageChange",
|
|
26
|
+
"type": "(page: number) => void",
|
|
27
|
+
"required": true,
|
|
28
|
+
"defaultValue": null,
|
|
29
|
+
"description": "Called with the page a control asked for. Always within `1..pageCount`."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "siblingCount",
|
|
33
|
+
"type": "number",
|
|
34
|
+
"required": false,
|
|
35
|
+
"defaultValue": "1",
|
|
36
|
+
"description": "How many pages to show either side of the current one. Defaults to `1`."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "label",
|
|
40
|
+
"type": "string",
|
|
41
|
+
"required": false,
|
|
42
|
+
"defaultValue": "Pagination",
|
|
43
|
+
"description": "The nav's accessible name. Defaults to `\"Pagination\"`."
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"typeReferences": [
|
|
47
|
+
"Omit<React.ComponentPropsWithoutRef<\"nav\">, \"onChange\" | \"children\">"
|
|
48
|
+
],
|
|
49
|
+
"subcomponents": [],
|
|
50
|
+
"parts": [],
|
|
51
|
+
"variants": {},
|
|
52
|
+
"defaultVariants": {},
|
|
53
|
+
"tokensUsed": [
|
|
54
|
+
"--cue-accent",
|
|
55
|
+
"--cue-accent-soft",
|
|
56
|
+
"--cue-control-sm",
|
|
57
|
+
"--cue-fg",
|
|
58
|
+
"--cue-fg-muted",
|
|
59
|
+
"--cue-fg-subtle",
|
|
60
|
+
"--cue-font-mono",
|
|
61
|
+
"--cue-radius-control",
|
|
62
|
+
"--cue-space-1",
|
|
63
|
+
"--cue-space-2",
|
|
64
|
+
"--cue-surface-2",
|
|
65
|
+
"--cue-text-ui"
|
|
66
|
+
],
|
|
67
|
+
"summary": "The pager: previous, a window of page numbers, next.",
|
|
68
|
+
"examples": [
|
|
69
|
+
{
|
|
70
|
+
"title": "Usage",
|
|
71
|
+
"code": "<Pagination page={page} pageCount={12} onPageChange={setPage} />",
|
|
72
|
+
"language": "tsx"
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"status": "todo-docs",
|
|
76
|
+
"url": "/docs/components/pagination",
|
|
77
|
+
"mdUrl": "/docs/components/pagination.md",
|
|
78
|
+
"jsonUrl": "/r/components/pagination.json",
|
|
79
|
+
"specimens": [
|
|
80
|
+
{
|
|
81
|
+
"title": "Pagination",
|
|
82
|
+
"group": "layout",
|
|
83
|
+
"components": [
|
|
84
|
+
"Pagination"
|
|
85
|
+
],
|
|
86
|
+
"code": "<div className=\"flex w-full flex-col gap-(--cue-space-4)\">\n <Pagination page={page} pageCount={12} onPageChange={setPage} />\n <Pagination page={1} pageCount={3} onPageChange={() => {}} />\n</div>",
|
|
87
|
+
"note": "A windowed pager with gaps, generated by the exported `paginationRange`.",
|
|
88
|
+
"interaction": "the current page is accent-soft and carries `aria-current`; the ends disable rather than disappear."
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"todo": true
|
|
92
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "PanelHeader",
|
|
3
|
+
"slug": "panel-header",
|
|
4
|
+
"group": "chrome",
|
|
5
|
+
"importPath": "@cueplusplus/ui",
|
|
6
|
+
"peerDependencies": [],
|
|
7
|
+
"clientOnly": false,
|
|
8
|
+
"description": "The top bar of a {@link Panel}: title left, actions right, hairline under.\n\nPadded with the density row tokens rather than its own values, so the header\nlines up horizontally with the rows beneath it at every density level.\n\nStatic markup — no `\"use client\"`.",
|
|
9
|
+
"props": [
|
|
10
|
+
{
|
|
11
|
+
"name": "title",
|
|
12
|
+
"type": "ReactNode",
|
|
13
|
+
"required": false,
|
|
14
|
+
"defaultValue": null,
|
|
15
|
+
"description": "The header's label. Rendered one type rung above body text — the panel's\nown name, not a page heading."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "actions",
|
|
19
|
+
"type": "ReactNode",
|
|
20
|
+
"required": false,
|
|
21
|
+
"defaultValue": null,
|
|
22
|
+
"description": "Right-hand slot: the controls that act on the whole panel (a menu, a\nrefresh button, a count chip)."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "children",
|
|
26
|
+
"type": "ReactNode",
|
|
27
|
+
"required": false,
|
|
28
|
+
"defaultValue": null,
|
|
29
|
+
"description": "Extra content in the leading cluster, after the title."
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"typeReferences": [
|
|
33
|
+
"Omit<React.ComponentPropsWithoutRef<\"div\">, \"title\">"
|
|
34
|
+
],
|
|
35
|
+
"subcomponents": [],
|
|
36
|
+
"parts": [],
|
|
37
|
+
"variants": {},
|
|
38
|
+
"defaultVariants": {},
|
|
39
|
+
"tokensUsed": [
|
|
40
|
+
"--cue-border",
|
|
41
|
+
"--cue-fg",
|
|
42
|
+
"--cue-font-mono",
|
|
43
|
+
"--cue-pad-row-x",
|
|
44
|
+
"--cue-pad-row-y",
|
|
45
|
+
"--cue-radius-surface",
|
|
46
|
+
"--cue-space-2",
|
|
47
|
+
"--cue-space-3",
|
|
48
|
+
"--cue-surface-1",
|
|
49
|
+
"--cue-text-emphasis"
|
|
50
|
+
],
|
|
51
|
+
"summary": "The top bar of a {@link Panel}: title left, actions right, hairline under.",
|
|
52
|
+
"examples": [
|
|
53
|
+
{
|
|
54
|
+
"title": "Usage",
|
|
55
|
+
"code": "<PanelHeader title=\"Universes\" actions={<Chip tone=\"ok\">live</Chip>} />",
|
|
56
|
+
"language": "tsx"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"status": "todo-docs",
|
|
60
|
+
"url": "/docs/components/panel-header",
|
|
61
|
+
"mdUrl": "/docs/components/panel-header.md",
|
|
62
|
+
"jsonUrl": "/r/components/panel-header.json",
|
|
63
|
+
"specimens": [
|
|
64
|
+
{
|
|
65
|
+
"title": "Panel / PanelHeader",
|
|
66
|
+
"group": "chrome",
|
|
67
|
+
"components": [
|
|
68
|
+
"Panel",
|
|
69
|
+
"PanelHeader"
|
|
70
|
+
],
|
|
71
|
+
"code": "<div className=\"grid w-full gap-(--cue-space-5) lg:grid-cols-2\">\n <Panel>\n <PanelHeader title=\"Output\" actions={<Chip tone=\"ok\">live</Chip>} />\n {CUES.slice(0, 3).map((cue) => (\n <Row key={cue.id}>\n <span className=\"w-[2rem] shrink-0 font-mono tabular-nums\">{cue.id}</span>\n <span className=\"flex-1 truncate\">{cue.label}</span>\n <span className=\"font-mono tabular-nums text-fg-muted\">{cue.time}</span>\n </Row>\n ))}\n </Panel>\n <Panel className=\"p-(--cue-space-5)\">\n <PanelHeader>\n <Eyebrow>free-form header</Eyebrow>\n </PanelHeader>\n <p className=\"pt-(--cue-space-4) font-mono text-(length:--cue-text-ui) text-fg-muted\">\n A panel with body padding instead of rows, for prose and forms.\n </p>\n </Panel>\n</div>",
|
|
72
|
+
"note": "The universal container: one hairline rim, no shadow, and a header that owns its own rule.",
|
|
73
|
+
"interaction": "none. A panel is a box."
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"todo": true
|
|
77
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Panel",
|
|
3
|
+
"slug": "panel",
|
|
4
|
+
"group": "chrome",
|
|
5
|
+
"importPath": "@cueplusplus/ui",
|
|
6
|
+
"peerDependencies": [],
|
|
7
|
+
"clientOnly": false,
|
|
8
|
+
"description": "The universal container: one hairline rim, one raised surface, one radius.\n\nEverything in a console lives in a panel — a cue list, a patch table, a\nsettings group — so the shape is defined once here rather than re-typed as\nfour utilities at every call site. `overflow-hidden` is part of the recipe,\nnot an extra: it clips the first and last `Row`'s square edges back to the\npanel's radius, which is what makes a stack of hairline rows read as one\nobject.\n\nDeliberately flat: no shadow. In this system only a floating surface (a\ndialog, a menu, a toast) is allowed one — see `overlays/_surface.ts`.\n\nStatic markup — no `\"use client\"`.",
|
|
9
|
+
"props": [],
|
|
10
|
+
"typeReferences": [
|
|
11
|
+
"React.ComponentPropsWithoutRef<\"div\">"
|
|
12
|
+
],
|
|
13
|
+
"subcomponents": [],
|
|
14
|
+
"parts": [],
|
|
15
|
+
"variants": {},
|
|
16
|
+
"defaultVariants": {},
|
|
17
|
+
"tokensUsed": [
|
|
18
|
+
"--cue-border",
|
|
19
|
+
"--cue-fg",
|
|
20
|
+
"--cue-font-mono",
|
|
21
|
+
"--cue-pad-row-x",
|
|
22
|
+
"--cue-pad-row-y",
|
|
23
|
+
"--cue-radius-surface",
|
|
24
|
+
"--cue-space-2",
|
|
25
|
+
"--cue-space-3",
|
|
26
|
+
"--cue-surface-1",
|
|
27
|
+
"--cue-text-emphasis"
|
|
28
|
+
],
|
|
29
|
+
"summary": "The universal container: one hairline rim, one raised surface, one radius.",
|
|
30
|
+
"examples": [
|
|
31
|
+
{
|
|
32
|
+
"title": "A panel of rows",
|
|
33
|
+
"code": "<Panel>\n <PanelHeader title=\"Cue stack\" actions={<Chip tone=\"ok\">live</Chip>} />\n <Row interactive>Cue 1 — house up</Row>\n <Row interactive>Cue 2 — blackout</Row>\n</Panel>",
|
|
34
|
+
"language": "tsx"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"title": "Usage",
|
|
38
|
+
"code": "<Panel>\n <PanelHeader title=\"Cue stack\" actions={<IconButton aria-label=\"Add\" icon={Plus} />} />\n <Row>Cue 1</Row>\n <Row>Cue 2</Row>\n</Panel>",
|
|
39
|
+
"language": "tsx"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"status": "stable",
|
|
43
|
+
"url": "/docs/components/panel",
|
|
44
|
+
"mdUrl": "/docs/components/panel.md",
|
|
45
|
+
"jsonUrl": "/r/components/panel.json",
|
|
46
|
+
"whenToUse": [
|
|
47
|
+
"Any grouped region of a console: a cue list, a table, a settings block.",
|
|
48
|
+
"As the parent of a `Row` stack, whose square corners it clips back to the panel radius."
|
|
49
|
+
],
|
|
50
|
+
"whenNotToUse": [
|
|
51
|
+
"Page-level structure. Use `PageShell` for a titled page, `Container` for a width bound.",
|
|
52
|
+
"Anything that floats. Menus, dialogs and toasts wear the overlay surface, which owns the only shadows in the system."
|
|
53
|
+
],
|
|
54
|
+
"commonMistakes": [
|
|
55
|
+
"Adding a shadow. A panel is flat by design; a shadow here reads as a bug in the theme.",
|
|
56
|
+
"Padding the panel and then padding its rows, which doubles the gutter the row tokens already set."
|
|
57
|
+
],
|
|
58
|
+
"specimens": [
|
|
59
|
+
{
|
|
60
|
+
"title": "Panel / PanelHeader",
|
|
61
|
+
"group": "chrome",
|
|
62
|
+
"components": [
|
|
63
|
+
"Panel",
|
|
64
|
+
"PanelHeader"
|
|
65
|
+
],
|
|
66
|
+
"code": "<div className=\"grid w-full gap-(--cue-space-5) lg:grid-cols-2\">\n <Panel>\n <PanelHeader title=\"Output\" actions={<Chip tone=\"ok\">live</Chip>} />\n {CUES.slice(0, 3).map((cue) => (\n <Row key={cue.id}>\n <span className=\"w-[2rem] shrink-0 font-mono tabular-nums\">{cue.id}</span>\n <span className=\"flex-1 truncate\">{cue.label}</span>\n <span className=\"font-mono tabular-nums text-fg-muted\">{cue.time}</span>\n </Row>\n ))}\n </Panel>\n <Panel className=\"p-(--cue-space-5)\">\n <PanelHeader>\n <Eyebrow>free-form header</Eyebrow>\n </PanelHeader>\n <p className=\"pt-(--cue-space-4) font-mono text-(length:--cue-text-ui) text-fg-muted\">\n A panel with body padding instead of rows, for prose and forms.\n </p>\n </Panel>\n</div>",
|
|
67
|
+
"note": "The universal container: one hairline rim, no shadow, and a header that owns its own rule.",
|
|
68
|
+
"interaction": "none. A panel is a box."
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|