@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,190 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "MultiSelect",
|
|
3
|
+
"slug": "multi-select",
|
|
4
|
+
"group": "forms",
|
|
5
|
+
"importPath": "@cueplusplus/ui",
|
|
6
|
+
"peerDependencies": [],
|
|
7
|
+
"clientOnly": true,
|
|
8
|
+
"description": "Several values out of a known set, each shown as a removable chip.\n\nThe chips live *inside* the field rather than under it, which is what makes\nthe control honest about its own size: a selection of nine trusses is visibly\nnine trusses tall, and nothing is hidden behind a \"+6 more\" the user has to\nopen something to read. That is also why the field takes `min-h-control-*`\ninstead of a fixed height.\n\nBackspace in an empty input removes the last chip and the chips themselves are\narrow-key navigable — both come from Base UI's `Combobox.Chips`, and both are\nthe parts hand-rolled multi-selects forget.",
|
|
9
|
+
"props": [
|
|
10
|
+
{
|
|
11
|
+
"name": "items",
|
|
12
|
+
"type": "readonly ComboboxOption[]",
|
|
13
|
+
"required": true,
|
|
14
|
+
"defaultValue": null,
|
|
15
|
+
"description": "The rows, in display order. Base UI filters them against what is typed."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "value",
|
|
19
|
+
"type": "readonly string[]",
|
|
20
|
+
"required": false,
|
|
21
|
+
"defaultValue": null,
|
|
22
|
+
"description": "Selected values. Use with `onValueChange` for a controlled field."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "defaultValue",
|
|
26
|
+
"type": "readonly string[]",
|
|
27
|
+
"required": false,
|
|
28
|
+
"defaultValue": null,
|
|
29
|
+
"description": "Initially selected values for an uncontrolled field."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "onValueChange",
|
|
33
|
+
"type": "((value: string[]) => void)",
|
|
34
|
+
"required": false,
|
|
35
|
+
"defaultValue": null,
|
|
36
|
+
"description": "Called with the full selection after every add or remove."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "placeholder",
|
|
40
|
+
"type": "string",
|
|
41
|
+
"required": false,
|
|
42
|
+
"defaultValue": null,
|
|
43
|
+
"description": "Shown while nothing is selected — suppressed once chips fill the field."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "emptyMessage",
|
|
47
|
+
"type": "ReactNode",
|
|
48
|
+
"required": false,
|
|
49
|
+
"defaultValue": "No matches",
|
|
50
|
+
"description": "Shown in place of the list when the query matches nothing."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "size",
|
|
54
|
+
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
55
|
+
"required": false,
|
|
56
|
+
"defaultValue": "md",
|
|
57
|
+
"description": "Rung of the control ladder. Defaults to `\"md\"`."
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "disabled",
|
|
61
|
+
"type": "boolean",
|
|
62
|
+
"required": false,
|
|
63
|
+
"defaultValue": null,
|
|
64
|
+
"description": "Prevent opening and grey the field out."
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "required",
|
|
68
|
+
"type": "boolean",
|
|
69
|
+
"required": false,
|
|
70
|
+
"defaultValue": null,
|
|
71
|
+
"description": "Require at least one value before the owning form submits."
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "name",
|
|
75
|
+
"type": "string",
|
|
76
|
+
"required": false,
|
|
77
|
+
"defaultValue": null,
|
|
78
|
+
"description": "Name for the hidden input, when the field is part of a form."
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "id",
|
|
82
|
+
"type": "string",
|
|
83
|
+
"required": false,
|
|
84
|
+
"defaultValue": null,
|
|
85
|
+
"description": "Id forwarded to the text input."
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "aria-label",
|
|
89
|
+
"type": "string",
|
|
90
|
+
"required": false,
|
|
91
|
+
"defaultValue": null,
|
|
92
|
+
"description": "Accessible name for the input, when no {@link FieldLabel } names it."
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "aria-labelledby",
|
|
96
|
+
"type": "string",
|
|
97
|
+
"required": false,
|
|
98
|
+
"defaultValue": null,
|
|
99
|
+
"description": "Id of the element naming the input."
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "removeLabel",
|
|
103
|
+
"type": "((label: string) => string)",
|
|
104
|
+
"required": false,
|
|
105
|
+
"defaultValue": "(label) => `Remove ${label}`",
|
|
106
|
+
"description": "Accessible name for a chip's remove button, given the row's label. Defaults\nto ``(label) => `Remove ${label}` ``."
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"name": "className",
|
|
110
|
+
"type": "string",
|
|
111
|
+
"required": false,
|
|
112
|
+
"defaultValue": null,
|
|
113
|
+
"description": "Extra classes for the field."
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"name": "popupClassName",
|
|
117
|
+
"type": "string",
|
|
118
|
+
"required": false,
|
|
119
|
+
"defaultValue": null,
|
|
120
|
+
"description": "Extra classes for the popup surface."
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "sideOffset",
|
|
124
|
+
"type": "number",
|
|
125
|
+
"required": false,
|
|
126
|
+
"defaultValue": "4",
|
|
127
|
+
"description": "Distance in px between the field and the popup. Defaults to `4`."
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"typeReferences": [],
|
|
131
|
+
"subcomponents": [],
|
|
132
|
+
"parts": [],
|
|
133
|
+
"variants": {},
|
|
134
|
+
"defaultVariants": {},
|
|
135
|
+
"tokensUsed": [
|
|
136
|
+
"--cue-accent",
|
|
137
|
+
"--cue-accent-soft",
|
|
138
|
+
"--cue-border",
|
|
139
|
+
"--cue-border-overlay",
|
|
140
|
+
"--cue-chip-h",
|
|
141
|
+
"--cue-control-lg",
|
|
142
|
+
"--cue-control-md",
|
|
143
|
+
"--cue-control-sm",
|
|
144
|
+
"--cue-danger",
|
|
145
|
+
"--cue-fg",
|
|
146
|
+
"--cue-fg-muted",
|
|
147
|
+
"--cue-fg-subtle",
|
|
148
|
+
"--cue-font-mono",
|
|
149
|
+
"--cue-icon-sm",
|
|
150
|
+
"--cue-radius-control",
|
|
151
|
+
"--cue-radius-overlay",
|
|
152
|
+
"--cue-scrim",
|
|
153
|
+
"--cue-space-1",
|
|
154
|
+
"--cue-space-2",
|
|
155
|
+
"--cue-space-3",
|
|
156
|
+
"--cue-space-4",
|
|
157
|
+
"--cue-space-5",
|
|
158
|
+
"--cue-sunken",
|
|
159
|
+
"--cue-surface-2",
|
|
160
|
+
"--cue-text-body",
|
|
161
|
+
"--cue-text-emphasis",
|
|
162
|
+
"--cue-text-label",
|
|
163
|
+
"--cue-text-ui"
|
|
164
|
+
],
|
|
165
|
+
"summary": "Several values out of a known set, each shown as a removable chip.",
|
|
166
|
+
"examples": [
|
|
167
|
+
{
|
|
168
|
+
"title": "Usage",
|
|
169
|
+
"code": "<MultiSelect aria-label=\"Trusses\" items={trusses} value={picked} onValueChange={setPicked} />",
|
|
170
|
+
"language": "tsx"
|
|
171
|
+
}
|
|
172
|
+
],
|
|
173
|
+
"status": "todo-docs",
|
|
174
|
+
"url": "/docs/components/multi-select",
|
|
175
|
+
"mdUrl": "/docs/components/multi-select.md",
|
|
176
|
+
"jsonUrl": "/r/components/multi-select.json",
|
|
177
|
+
"specimens": [
|
|
178
|
+
{
|
|
179
|
+
"title": "MultiSelect",
|
|
180
|
+
"group": "forms",
|
|
181
|
+
"components": [
|
|
182
|
+
"MultiSelect"
|
|
183
|
+
],
|
|
184
|
+
"code": "<div className=\"grid w-full gap-(--cue-space-5) lg:grid-cols-2\">\n <MultiSelect\n aria-label=\"Fixture types\"\n items={FIXTURE_OPTIONS}\n defaultValue={[\"par64\", \"s4\"]}\n placeholder=\"Fixture types\"\n />\n <MultiSelect\n aria-label=\"Fixture types, disabled\"\n items={FIXTURE_OPTIONS}\n defaultValue={[\"sharpy\"]}\n disabled\n />\n</div>",
|
|
185
|
+
"note": "Several values in one control, rendered as removable chips.",
|
|
186
|
+
"interaction": "each chip's remove button has its own accessible name; Backspace removes the last one."
|
|
187
|
+
}
|
|
188
|
+
],
|
|
189
|
+
"todo": true
|
|
190
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "MusicalTimeInput",
|
|
3
|
+
"slug": "musical-time-input",
|
|
4
|
+
"group": "midi",
|
|
5
|
+
"importPath": "@cueplusplus/ui/midi",
|
|
6
|
+
"peerDependencies": [],
|
|
7
|
+
"clientOnly": true,
|
|
8
|
+
"description": "`bars.beats.sixteenths` — a position in a song, typed the way a song is\ncounted.\n\nA number field would ask for 4.25 and mean \"bar 2, beat 1, one sixteenth in\",\nwhich is a conversion the musician has to do in their head every time. This\nfield does it instead: three segments, each one stepping in its own musical\nunit, and the carry between them handled by the arithmetic rather than by the\ntypist (bar 1 beat 4 plus one beat is bar 2 beat 1).\n\nThree interactions, because the three are used at different moments: **arrows**\nfor a nudge while listening, **scroll** for a sweep, and **typing** for a\nposition read off a cue sheet. Tab moves between the segments on its own — the\nported version intercepted Tab to reimplement the focus order the browser\nalready had, which broke Shift+Tab out of the field entirely.\n\nThe scroll gesture is bound natively rather than through React's `onWheel`,\nbecause React attaches wheel listeners passively at the root: `preventDefault`\nthere is a no-op and the page scrolls away underneath the edit.",
|
|
9
|
+
"props": [
|
|
10
|
+
{
|
|
11
|
+
"name": "value",
|
|
12
|
+
"type": "number",
|
|
13
|
+
"required": true,
|
|
14
|
+
"defaultValue": null,
|
|
15
|
+
"description": "The position, in quarter-note beats. Always controlled."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "onChange",
|
|
19
|
+
"type": "(beats: number) => void",
|
|
20
|
+
"required": true,
|
|
21
|
+
"defaultValue": null,
|
|
22
|
+
"description": "Called with the new position after every edit."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "timeSignature",
|
|
26
|
+
"type": "TimeSignature",
|
|
27
|
+
"required": false,
|
|
28
|
+
"defaultValue": "{ numerator: 4, denominator: 4 }",
|
|
29
|
+
"description": "The signature the display counts in. Defaults to 4/4."
|
|
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": "total",
|
|
40
|
+
"type": "boolean",
|
|
41
|
+
"required": false,
|
|
42
|
+
"defaultValue": "true",
|
|
43
|
+
"description": "Print the total in beats after the segments. Defaults to `true`."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "disabled",
|
|
47
|
+
"type": "boolean",
|
|
48
|
+
"required": false,
|
|
49
|
+
"defaultValue": "false",
|
|
50
|
+
"description": "Refuse every edit."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "label",
|
|
54
|
+
"type": "string",
|
|
55
|
+
"required": false,
|
|
56
|
+
"defaultValue": "Musical time",
|
|
57
|
+
"description": "Accessible name for the field as a whole. Defaults to `\"Musical time\"`."
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"typeReferences": [
|
|
61
|
+
"Omit<React.ComponentPropsWithoutRef<\"div\">, \"onChange\" | \"defaultValue\">"
|
|
62
|
+
],
|
|
63
|
+
"subcomponents": [],
|
|
64
|
+
"parts": [],
|
|
65
|
+
"variants": {},
|
|
66
|
+
"defaultVariants": {},
|
|
67
|
+
"tokensUsed": [
|
|
68
|
+
"--cue-accent",
|
|
69
|
+
"--cue-border",
|
|
70
|
+
"--cue-control-lg",
|
|
71
|
+
"--cue-control-md",
|
|
72
|
+
"--cue-control-sm",
|
|
73
|
+
"--cue-danger",
|
|
74
|
+
"--cue-fg",
|
|
75
|
+
"--cue-fg-subtle",
|
|
76
|
+
"--cue-font-mono",
|
|
77
|
+
"--cue-radius-control",
|
|
78
|
+
"--cue-space-2",
|
|
79
|
+
"--cue-space-3",
|
|
80
|
+
"--cue-space-4",
|
|
81
|
+
"--cue-space-5",
|
|
82
|
+
"--cue-sunken",
|
|
83
|
+
"--cue-text-body",
|
|
84
|
+
"--cue-text-label",
|
|
85
|
+
"--cue-text-micro",
|
|
86
|
+
"--cue-text-ui"
|
|
87
|
+
],
|
|
88
|
+
"summary": "`bars.beats.sixteenths` — a position in a song, typed the way a song is counted.",
|
|
89
|
+
"examples": [
|
|
90
|
+
{
|
|
91
|
+
"title": "Usage",
|
|
92
|
+
"code": "<MusicalTimeInput value={beats} onChange={setBeats} />\n<MusicalTimeInput value={beats} onChange={setBeats} timeSignature={{ numerator: 6, denominator: 8 }} />",
|
|
93
|
+
"language": "tsx"
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"status": "todo-docs",
|
|
97
|
+
"url": "/docs/components/musical-time-input",
|
|
98
|
+
"mdUrl": "/docs/components/musical-time-input.md",
|
|
99
|
+
"jsonUrl": "/r/components/musical-time-input.json",
|
|
100
|
+
"specimens": [
|
|
101
|
+
{
|
|
102
|
+
"title": "MusicalTimeInput",
|
|
103
|
+
"group": "midi",
|
|
104
|
+
"components": [
|
|
105
|
+
"MusicalTimeInput"
|
|
106
|
+
],
|
|
107
|
+
"code": "<Specimens>\n <Specimen label=\"4/4\">\n <MusicalTimeInput value={beats} onChange={setBeats} label=\"Loop start\" />\n </Specimen>\n <Specimen label=\"7/8\">\n <MusicalTimeInput\n value={beats}\n onChange={setBeats}\n timeSignature={{ numerator: 7, denominator: 8 }}\n label=\"Loop start, 7/8\"\n />\n </Specimen>\n <Specimen label=\"no total\">\n <MusicalTimeInput value={beats} onChange={setBeats} total={false} size=\"sm\" label=\"Compact\" />\n </Specimen>\n <Specimen label=\"disabled\">\n <MusicalTimeInput value={beats} onChange={setBeats} disabled label=\"Locked\" />\n </Specimen>\n <Specimen label=\"formatted\">\n <Chip tone=\"accent\">{formatMusicalTime(beatsToMusical(beats))}</Chip>\n </Specimen>\n</Specimens>",
|
|
108
|
+
"note": "`bars.beats.sixteenths` as three segments, time-signature aware, with the total-beats readout beside it.",
|
|
109
|
+
"interaction": "arrow keys and the scroll wheel step the segment under the caret; Tab moves between segments and overflow carries into the next one."
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"todo": true
|
|
113
|
+
}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "NavigationMenu",
|
|
3
|
+
"slug": "navigation-menu",
|
|
4
|
+
"group": "chrome",
|
|
5
|
+
"importPath": "@cueplusplus/ui",
|
|
6
|
+
"peerDependencies": [],
|
|
7
|
+
"clientOnly": true,
|
|
8
|
+
"description": "The marketing-shaped navigation header: a strip of words, each opening a panel\nof destinations.\n\nWraps Base UI's `NavigationMenu`, which is the right primitive because a\nnavigation menu is *not* a menu: its rows are links, not commands, so it must\nnot take `role=\"menu\"` (which tells a screen reader to expect commands and\nswallows the browser's own link affordances). Hover intent, the shared\nresizing popup, focus handling and the landmark are all the primitive's.\n\nReach for {@link Menubar } when the entries run commands, `Tabs` when they\nswitch a panel in place, and `Sidebar` when the console has more than about\nsix destinations.",
|
|
9
|
+
"props": [],
|
|
10
|
+
"typeReferences": [],
|
|
11
|
+
"subcomponents": [
|
|
12
|
+
"Root",
|
|
13
|
+
"List",
|
|
14
|
+
"Item",
|
|
15
|
+
"Trigger",
|
|
16
|
+
"Content",
|
|
17
|
+
"Link",
|
|
18
|
+
"Viewport"
|
|
19
|
+
],
|
|
20
|
+
"parts": [
|
|
21
|
+
{
|
|
22
|
+
"name": "Root",
|
|
23
|
+
"usage": "NavigationMenu.Root",
|
|
24
|
+
"description": "The navigation landmark. Renders a `<nav>` at the top level.\n\nGive it an `aria-label`: a page with more than one navigation landmark and no\nnames on them is a page a screen-reader user cannot navigate by landmark,\nwhich is the only reason the landmark exists.",
|
|
25
|
+
"props": [
|
|
26
|
+
{
|
|
27
|
+
"name": "className",
|
|
28
|
+
"type": "string",
|
|
29
|
+
"required": false,
|
|
30
|
+
"defaultValue": null,
|
|
31
|
+
"description": "Extra classes for the `<nav>`."
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"typeReferences": [
|
|
35
|
+
"Omit<BaseNavigationMenu.Root.Props, \"className\">"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "List",
|
|
40
|
+
"usage": "NavigationMenu.List",
|
|
41
|
+
"description": "The horizontal strip of top-level items. Renders a `<ul>`.",
|
|
42
|
+
"props": [
|
|
43
|
+
{
|
|
44
|
+
"name": "className",
|
|
45
|
+
"type": "string",
|
|
46
|
+
"required": false,
|
|
47
|
+
"defaultValue": null,
|
|
48
|
+
"description": "Extra classes for the strip of items."
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"typeReferences": [
|
|
52
|
+
"Omit<BaseNavigationMenu.List.Props, \"className\">"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "Item",
|
|
57
|
+
"usage": "NavigationMenu.Item",
|
|
58
|
+
"description": "One top-level entry: a trigger with a panel, or a bare\n{@link NavigationMenuLink}. Renders an `<li>`.",
|
|
59
|
+
"props": [],
|
|
60
|
+
"typeReferences": [
|
|
61
|
+
"BaseNavigationMenu.Item.Props"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "Trigger",
|
|
66
|
+
"usage": "NavigationMenu.Trigger",
|
|
67
|
+
"description": "A top-level word that opens a panel.\n\nOpen is `accent-soft` plus full-strength ink — the same tint the active tab\nand the highlighted menu row use, never a solid accent block. The caret is a\nchild of the trigger rather than a sibling so it inherits the ink and rotates\nwith the open state for free.",
|
|
68
|
+
"props": [
|
|
69
|
+
{
|
|
70
|
+
"name": "className",
|
|
71
|
+
"type": "string",
|
|
72
|
+
"required": false,
|
|
73
|
+
"defaultValue": null,
|
|
74
|
+
"description": "Extra classes for the trigger."
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "caret",
|
|
78
|
+
"type": "boolean",
|
|
79
|
+
"required": false,
|
|
80
|
+
"defaultValue": "true",
|
|
81
|
+
"description": "Draw the caret that says a panel opens below. Defaults to `true`."
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"typeReferences": [
|
|
85
|
+
"Omit<BaseNavigationMenu.Trigger.Props, \"className\">"
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "Content",
|
|
90
|
+
"usage": "NavigationMenu.Content",
|
|
91
|
+
"description": "One item's panel. Only the open item's content is mounted into the shared\n{@link NavigationMenuViewport}, which is what lets the popup resize smoothly\nbetween items instead of one panel per popup.",
|
|
92
|
+
"props": [
|
|
93
|
+
{
|
|
94
|
+
"name": "className",
|
|
95
|
+
"type": "string",
|
|
96
|
+
"required": false,
|
|
97
|
+
"defaultValue": null,
|
|
98
|
+
"description": "Extra classes for the panel body."
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"typeReferences": [
|
|
102
|
+
"Omit<BaseNavigationMenu.Content.Props, \"className\">"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "Link",
|
|
107
|
+
"usage": "NavigationMenu.Link",
|
|
108
|
+
"description": "One destination inside a panel.\n\nNever underlined at rest — the same rule as `Link` — because a panel of eight\nunderlined rows is a wall of rules. Hover moves the ink and the ground, which\nis louder and quieter at the same time.\n\nPass `render={<NextLink href=\"…\" />}` for client-side routing.",
|
|
109
|
+
"props": [
|
|
110
|
+
{
|
|
111
|
+
"name": "className",
|
|
112
|
+
"type": "string",
|
|
113
|
+
"required": false,
|
|
114
|
+
"defaultValue": null,
|
|
115
|
+
"description": "Extra classes for the link row."
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"name": "active",
|
|
119
|
+
"type": "boolean",
|
|
120
|
+
"required": false,
|
|
121
|
+
"defaultValue": null,
|
|
122
|
+
"description": "Mark this link as the current destination."
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "description",
|
|
126
|
+
"type": "ReactNode",
|
|
127
|
+
"required": false,
|
|
128
|
+
"defaultValue": null,
|
|
129
|
+
"description": "Supporting line under the label."
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"typeReferences": [
|
|
133
|
+
"Omit<BaseNavigationMenu.Link.Props, \"className\">"
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"name": "Viewport",
|
|
138
|
+
"usage": "NavigationMenu.Viewport",
|
|
139
|
+
"description": "The single floating panel every item shares: portal, positioner, popup and\nviewport in one part.\n\nPut exactly one of these inside a {@link NavigationMenuRoot}, after the list.\nIt is one popup rather than one-per-item on purpose — that is what makes\nmoving between two open items a resize instead of a close-and-reopen — and it\nis portalled through {@link useCuePortalProps} so it carries the caller's\ntheme, density and mode.\n\nThe popup animates its own `width`/`height` from the `--popup-width` /\n`--popup-height` custom properties Base UI publishes as the active panel\nchanges.",
|
|
140
|
+
"props": [
|
|
141
|
+
{
|
|
142
|
+
"name": "className",
|
|
143
|
+
"type": "string",
|
|
144
|
+
"required": false,
|
|
145
|
+
"defaultValue": null,
|
|
146
|
+
"description": "Extra classes for the popup surface."
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "align",
|
|
150
|
+
"type": "\"center\" | \"end\" | \"start\"",
|
|
151
|
+
"required": false,
|
|
152
|
+
"defaultValue": "start",
|
|
153
|
+
"description": "Alignment along the bottom of the active trigger. Defaults to `\"start\"`."
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "positionerClassName",
|
|
157
|
+
"type": "string",
|
|
158
|
+
"required": false,
|
|
159
|
+
"defaultValue": null,
|
|
160
|
+
"description": "Extra classes for the positioner that places the popup."
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "sideOffset",
|
|
164
|
+
"type": "number | OffsetFunction",
|
|
165
|
+
"required": false,
|
|
166
|
+
"defaultValue": "4",
|
|
167
|
+
"description": "Gap in px between the strip and the popup. Defaults to `4`."
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
"typeReferences": [
|
|
171
|
+
"Omit<BaseNavigationMenu.Popup.Props, \"className\">"
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
"variants": {},
|
|
176
|
+
"defaultVariants": {},
|
|
177
|
+
"tokensUsed": [
|
|
178
|
+
"--cue-accent",
|
|
179
|
+
"--cue-accent-soft",
|
|
180
|
+
"--cue-border",
|
|
181
|
+
"--cue-border-overlay",
|
|
182
|
+
"--cue-control-md",
|
|
183
|
+
"--cue-control-sm",
|
|
184
|
+
"--cue-fg",
|
|
185
|
+
"--cue-fg-muted",
|
|
186
|
+
"--cue-fg-subtle",
|
|
187
|
+
"--cue-font-mono",
|
|
188
|
+
"--cue-icon-sm",
|
|
189
|
+
"--cue-radius-control",
|
|
190
|
+
"--cue-radius-overlay",
|
|
191
|
+
"--cue-scrim",
|
|
192
|
+
"--cue-space-1",
|
|
193
|
+
"--cue-space-2",
|
|
194
|
+
"--cue-space-3",
|
|
195
|
+
"--cue-surface-2",
|
|
196
|
+
"--cue-surface-3",
|
|
197
|
+
"--cue-text-emphasis",
|
|
198
|
+
"--cue-text-label",
|
|
199
|
+
"--cue-text-ui"
|
|
200
|
+
],
|
|
201
|
+
"summary": "The marketing-shaped navigation header: a strip of words, each opening a panel of destinations.",
|
|
202
|
+
"examples": [
|
|
203
|
+
{
|
|
204
|
+
"title": "Usage",
|
|
205
|
+
"code": "<NavigationMenu.Root aria-label=\"Console\">\n <NavigationMenu.List>\n <NavigationMenu.Item>\n <NavigationMenu.Trigger>Patch</NavigationMenu.Trigger>\n <NavigationMenu.Content>\n <NavigationMenu.Link href=\"/patch/fixtures\" description=\"Everything addressed\">\n Fixtures\n </NavigationMenu.Link>\n </NavigationMenu.Content>\n </NavigationMenu.Item>\n </NavigationMenu.List>\n <NavigationMenu.Viewport />\n</NavigationMenu.Root>",
|
|
206
|
+
"language": "tsx"
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"status": "todo-docs",
|
|
210
|
+
"url": "/docs/components/navigation-menu",
|
|
211
|
+
"mdUrl": "/docs/components/navigation-menu.md",
|
|
212
|
+
"jsonUrl": "/r/components/navigation-menu.json",
|
|
213
|
+
"specimens": [
|
|
214
|
+
{
|
|
215
|
+
"title": "NavigationMenu",
|
|
216
|
+
"group": "chrome",
|
|
217
|
+
"components": [
|
|
218
|
+
"NavigationMenu"
|
|
219
|
+
],
|
|
220
|
+
"code": "<NavigationMenu.Root>\n <NavigationMenu.List>\n <NavigationMenu.Item>\n <NavigationMenu.Trigger>Products</NavigationMenu.Trigger>\n <NavigationMenu.Content className=\"w-[20rem]\">\n <NavigationMenu.Link href=\"#dmxhub\" description=\"Art-Net and sACN bridge.\">\n dmxhub\n </NavigationMenu.Link>\n <NavigationMenu.Link href=\"#venu\" description=\"Show control.\" active>\n VENU.studio\n </NavigationMenu.Link>\n </NavigationMenu.Content>\n </NavigationMenu.Item>\n <NavigationMenu.Item>\n <NavigationMenu.Trigger caret={false}>Docs</NavigationMenu.Trigger>\n <NavigationMenu.Content className=\"w-[16rem]\">\n <NavigationMenu.Link href=\"#tokens\">Tokens</NavigationMenu.Link>\n <NavigationMenu.Link href=\"#components\">Components</NavigationMenu.Link>\n </NavigationMenu.Content>\n </NavigationMenu.Item>\n </NavigationMenu.List>\n <NavigationMenu.Viewport />\n</NavigationMenu.Root>",
|
|
221
|
+
"note": "A menu bar whose panels are portalled through the stamping contract, so they keep the theme and density of the island they were opened from.",
|
|
222
|
+
"interaction": "hover opens after a short delay; Escape closes and returns focus to the trigger."
|
|
223
|
+
}
|
|
224
|
+
],
|
|
225
|
+
"todo": true
|
|
226
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "NodeCard",
|
|
3
|
+
"slug": "node-card",
|
|
4
|
+
"group": "flow",
|
|
5
|
+
"importPath": "@cueplusplus/ui/flow",
|
|
6
|
+
"peerDependencies": [],
|
|
7
|
+
"clientOnly": true,
|
|
8
|
+
"description": "A node on a graph canvas, drawn in this system's language.\n\nFramed with an **outline, never a border**. React Flow is told a node's height\nup front — every layout that stacks nodes computes it — and a 1px border on\neach side makes the rendered box 2px taller than the number the layout used,\nwhich is how node stacks end up overlapping by a hairline that grows with the\nnode count. An outline is painted outside the box model entirely and costs\nnothing, so the formula and the DOM agree. `-outline-offset-1` then pulls it\nback inside the corner radius.\n\nThe frame's colour is the node's state (see `_frame.ts`): selected beats live\nbeats identity. When neither `tone` nor `state` is given the card paints no\ncolour of its own and inherits `--cue-node-frame` from the node wrapper, which\nis how `useFlowTheme().nodeStyles` colours a whole class of nodes at once.\n\nThe header band is the drag handle — pass\n`dragHandle: '[data-slot=\"node-card-header\"]'` on the node so a pointer inside\nthe body edits instead of dragging.\n\nNothing here imports `@xyflow/react`: a node card is a div, and the same card\ndraws a static diagram on a marketing page with no graph engine shipped. It\nalso never clips — handles straddle the rim, so an `overflow-hidden` in\n`className` would slice every connection point in half.",
|
|
9
|
+
"props": [
|
|
10
|
+
{
|
|
11
|
+
"name": "tone",
|
|
12
|
+
"type": "\"input\" | \"output\" | \"processing\"",
|
|
13
|
+
"required": false,
|
|
14
|
+
"defaultValue": null,
|
|
15
|
+
"description": "Where the node sits in the signal path. Inks the frame at rest."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "state",
|
|
19
|
+
"type": "\"idle\" | \"selected\" | \"disabled\" | \"live\"",
|
|
20
|
+
"required": false,
|
|
21
|
+
"defaultValue": null,
|
|
22
|
+
"description": "What the node is doing right now. Outranks `tone`.\n\nPass React Flow's own `selected` through:\n`state={selected ? \"selected\" : \"idle\"}`."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "header",
|
|
26
|
+
"type": "ReactNode",
|
|
27
|
+
"required": false,
|
|
28
|
+
"defaultValue": null,
|
|
29
|
+
"description": "The summary band: a label, a toggle, a badge. Also the drag handle."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "expanded",
|
|
33
|
+
"type": "boolean",
|
|
34
|
+
"required": false,
|
|
35
|
+
"defaultValue": "true",
|
|
36
|
+
"description": "Whether the body is shown. Defaults to `true`; `false` renders the band alone."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "onExpandedChange",
|
|
40
|
+
"type": "((expanded: boolean) => void)",
|
|
41
|
+
"required": false,
|
|
42
|
+
"defaultValue": null,
|
|
43
|
+
"description": "Called with the requested state when the caret is clicked. Supplying it is\nwhat makes the caret appear — a card nobody can collapse should not offer to."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "toggleLabel",
|
|
47
|
+
"type": "string",
|
|
48
|
+
"required": false,
|
|
49
|
+
"defaultValue": null,
|
|
50
|
+
"description": "Accessible name for the caret. Defaults to `\"Collapse\"` / `\"Expand\"`."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "children",
|
|
54
|
+
"type": "ReactNode",
|
|
55
|
+
"required": false,
|
|
56
|
+
"defaultValue": null,
|
|
57
|
+
"description": "The body: rows, bars, fields. Full-bleed — rows own their own padding."
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"typeReferences": [
|
|
61
|
+
"React.ComponentPropsWithoutRef<\"div\">"
|
|
62
|
+
],
|
|
63
|
+
"subcomponents": [],
|
|
64
|
+
"parts": [],
|
|
65
|
+
"variants": {},
|
|
66
|
+
"defaultVariants": {},
|
|
67
|
+
"tokensUsed": [
|
|
68
|
+
"--cue-accent",
|
|
69
|
+
"--cue-border",
|
|
70
|
+
"--cue-control-sm",
|
|
71
|
+
"--cue-fg",
|
|
72
|
+
"--cue-fg-muted",
|
|
73
|
+
"--cue-fg-subtle",
|
|
74
|
+
"--cue-font-mono",
|
|
75
|
+
"--cue-info",
|
|
76
|
+
"--cue-node-frame",
|
|
77
|
+
"--cue-radius-surface",
|
|
78
|
+
"--cue-space-2",
|
|
79
|
+
"--cue-space-3",
|
|
80
|
+
"--cue-surface-1",
|
|
81
|
+
"--cue-text-label",
|
|
82
|
+
"--cue-text-micro"
|
|
83
|
+
],
|
|
84
|
+
"summary": "A node on a graph canvas, drawn in this system's language.",
|
|
85
|
+
"examples": [
|
|
86
|
+
{
|
|
87
|
+
"title": "Usage",
|
|
88
|
+
"code": "function MergeNode({ selected }: NodeProps) {\n const [open, setOpen] = React.useState(true);\n return (\n <NodeCard\n tone=\"processing\"\n state={selected ? \"selected\" : \"live\"}\n header={<span className=\"truncate\">merge · universe 3</span>}\n expanded={open}\n onExpandedChange={setOpen}\n >\n <DmxBar data={frame} />\n </NodeCard>\n );\n}",
|
|
89
|
+
"language": "tsx"
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"status": "todo-docs",
|
|
93
|
+
"url": "/docs/components/node-card",
|
|
94
|
+
"mdUrl": "/docs/components/node-card.md",
|
|
95
|
+
"jsonUrl": "/r/components/node-card.json",
|
|
96
|
+
"specimens": [
|
|
97
|
+
{
|
|
98
|
+
"title": "NodeCard",
|
|
99
|
+
"group": "flow",
|
|
100
|
+
"components": [
|
|
101
|
+
"NodeCard"
|
|
102
|
+
],
|
|
103
|
+
"code": "<Specimens>\n {([\"input\", \"processing\", \"output\"] as const).map((tone) => (\n <Specimen key={tone} label={tone}>\n <NodeCard tone={tone} header={tone} className=\"w-[10rem]\">\n <span className=\"font-mono text-(length:--cue-text-micro) text-fg-subtle\">\n 512 slots\n </span>\n </NodeCard>\n </Specimen>\n ))}\n {([\"idle\", \"live\", \"selected\", \"disabled\"] as const).map((state) => (\n <Specimen key={state} label={state}>\n <NodeCard state={state} header={state} className=\"w-[10rem]\">\n <StatusDot tone={state === \"live\" ? \"ok\" : \"idle\"} label={state} />\n </NodeCard>\n </Specimen>\n ))}\n <Specimen label=\"collapsed\">\n <NodeCard header=\"Collapsible\" expanded={false} className=\"w-[10rem]\">\n <span>Hidden body</span>\n </NodeCard>\n </Specimen>\n</Specimens>",
|
|
104
|
+
"note": "Framed with an outline rather than a border, so a node's rendered height is exactly the height the layout was told. The frame colour is the state: selected is `fg`, input is `info`, output and live are accent, idle is `fg-subtle`.",
|
|
105
|
+
"interaction": "the expand toggle is a real button; the frame colour changes with `state`, never with hover alone."
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"todo": true
|
|
109
|
+
}
|