@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,179 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Drawer",
|
|
3
|
+
"slug": "drawer",
|
|
4
|
+
"group": "overlays",
|
|
5
|
+
"importPath": "@cueplusplus/ui",
|
|
6
|
+
"peerDependencies": [],
|
|
7
|
+
"clientOnly": true,
|
|
8
|
+
"description": "A swipe-dismissable edge panel — the touch-first cousin of {@link Sheet }.\n\nWraps Base UI's `Drawer`, so the drag tracking, the velocity-aware dismissal,\nthe nested-drawer stacking and the focus trap are the primitive's. What this\nlayer adds is the shared overlay surface, the portal theme stamp, and one\ndecision the caller should not have to make twice: `swipeDirection` picks the\nedge *and* the gesture together, so a drawer can never be dragged in a\ndirection that would push it further onto the screen.\n\nPrefer `Sheet` on a pointer-first console — a swipe is not discoverable with a\nmouse — and reach for this on touch, or wherever the panel is glanceable\nenough that dismissing it should cost one gesture.",
|
|
9
|
+
"props": [],
|
|
10
|
+
"typeReferences": [],
|
|
11
|
+
"subcomponents": [
|
|
12
|
+
"Root",
|
|
13
|
+
"Trigger",
|
|
14
|
+
"Content",
|
|
15
|
+
"Title",
|
|
16
|
+
"Description",
|
|
17
|
+
"Footer",
|
|
18
|
+
"Close"
|
|
19
|
+
],
|
|
20
|
+
"parts": [
|
|
21
|
+
{
|
|
22
|
+
"name": "Root",
|
|
23
|
+
"usage": "Drawer.Root",
|
|
24
|
+
"description": "Groups the parts of a drawer and owns its open state. Renders no element.",
|
|
25
|
+
"props": [
|
|
26
|
+
{
|
|
27
|
+
"name": "swipeDirection",
|
|
28
|
+
"type": "\"up\" | \"down\" | \"left\" | \"right\"",
|
|
29
|
+
"required": false,
|
|
30
|
+
"defaultValue": "down",
|
|
31
|
+
"description": "Which way the drawer is dragged to dismiss it, which also decides the edge\nit lives on. Defaults to `\"down\"` — the bottom sheet."
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"typeReferences": [
|
|
35
|
+
"Omit<BaseDrawer.Root.Props, \"swipeDirection\">"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "Trigger",
|
|
40
|
+
"usage": "Drawer.Trigger",
|
|
41
|
+
"description": "The control that opens the drawer. Unstyled — pass `render={<Button />}` so\nthe button's own variant classes stay the last word.",
|
|
42
|
+
"props": [],
|
|
43
|
+
"typeReferences": [
|
|
44
|
+
"BaseDrawer.Trigger.Props"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "Content",
|
|
49
|
+
"usage": "Drawer.Content",
|
|
50
|
+
"description": "The drawer's portal, scrim, viewport and popup in one part.\n\nPortalled through {@link useCuePortalProps}, so the surface carries the\ncaller's theme, density and mode even though it mounts at the end of\n`<body>`. The swipe gesture, the rubber-banding, the velocity-aware dismissal\nand the focus trap are all Base UI's; this layer supplies the edge geometry\nand the token skin.",
|
|
51
|
+
"props": [
|
|
52
|
+
{
|
|
53
|
+
"name": "className",
|
|
54
|
+
"type": "string",
|
|
55
|
+
"required": false,
|
|
56
|
+
"defaultValue": null,
|
|
57
|
+
"description": "Extra classes for the popup surface."
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "keepMounted",
|
|
61
|
+
"type": "boolean",
|
|
62
|
+
"required": false,
|
|
63
|
+
"defaultValue": null,
|
|
64
|
+
"description": "Keep the popup mounted while closed, so its content is not re-created."
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "viewportClassName",
|
|
68
|
+
"type": "string",
|
|
69
|
+
"required": false,
|
|
70
|
+
"defaultValue": null,
|
|
71
|
+
"description": "Extra classes for the full-viewport box that parks the popup on its edge."
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "backdropClassName",
|
|
75
|
+
"type": "string",
|
|
76
|
+
"required": false,
|
|
77
|
+
"defaultValue": null,
|
|
78
|
+
"description": "Extra classes for the scrim behind it."
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "grabHandle",
|
|
82
|
+
"type": "boolean",
|
|
83
|
+
"required": false,
|
|
84
|
+
"defaultValue": "true",
|
|
85
|
+
"description": "Draw the grab bar that advertises the swipe. Defaults to `true`.\n\nPurely decorative — the whole popup is draggable — so it is `aria-hidden`\nand there is no keyboard equivalent to lose by turning it off."
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"typeReferences": [
|
|
89
|
+
"Omit<BaseDrawer.Popup.Props, \"className\">"
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "Title",
|
|
94
|
+
"usage": "Drawer.Title",
|
|
95
|
+
"description": "The drawer's heading, wired to the popup's `aria-labelledby`.",
|
|
96
|
+
"props": [],
|
|
97
|
+
"typeReferences": [
|
|
98
|
+
"BaseDrawer.Title.Props"
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "Description",
|
|
103
|
+
"usage": "Drawer.Description",
|
|
104
|
+
"description": "The supporting line under the title, published as `aria-describedby`.",
|
|
105
|
+
"props": [],
|
|
106
|
+
"typeReferences": [
|
|
107
|
+
"BaseDrawer.Description.Props"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"name": "Footer",
|
|
112
|
+
"usage": "Drawer.Footer",
|
|
113
|
+
"description": "The action strip at the foot of the drawer.",
|
|
114
|
+
"props": [],
|
|
115
|
+
"typeReferences": [
|
|
116
|
+
"React.ComponentPropsWithoutRef<\"div\">"
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "Close",
|
|
121
|
+
"usage": "Drawer.Close",
|
|
122
|
+
"description": "A control that closes the drawer. Unstyled — wrap it in a `Button`.",
|
|
123
|
+
"props": [],
|
|
124
|
+
"typeReferences": [
|
|
125
|
+
"BaseDrawer.Close.Props"
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"variants": {},
|
|
130
|
+
"defaultVariants": {},
|
|
131
|
+
"tokensUsed": [
|
|
132
|
+
"--cue-accent-soft",
|
|
133
|
+
"--cue-border",
|
|
134
|
+
"--cue-border-overlay",
|
|
135
|
+
"--cue-border-strong",
|
|
136
|
+
"--cue-control-sm",
|
|
137
|
+
"--cue-fg",
|
|
138
|
+
"--cue-fg-muted",
|
|
139
|
+
"--cue-fg-subtle",
|
|
140
|
+
"--cue-font-mono",
|
|
141
|
+
"--cue-radius-control",
|
|
142
|
+
"--cue-radius-overlay",
|
|
143
|
+
"--cue-scrim",
|
|
144
|
+
"--cue-space-1",
|
|
145
|
+
"--cue-space-2",
|
|
146
|
+
"--cue-space-3",
|
|
147
|
+
"--cue-space-4",
|
|
148
|
+
"--cue-space-6",
|
|
149
|
+
"--cue-surface-2",
|
|
150
|
+
"--cue-text-emphasis",
|
|
151
|
+
"--cue-text-label",
|
|
152
|
+
"--cue-text-ui"
|
|
153
|
+
],
|
|
154
|
+
"summary": "A swipe-dismissable edge panel — the touch-first cousin of {@link Sheet }.",
|
|
155
|
+
"examples": [
|
|
156
|
+
{
|
|
157
|
+
"title": "Usage",
|
|
158
|
+
"code": "<Drawer.Root swipeDirection=\"down\">\n <Drawer.Trigger render={<Button>Cue stack</Button>} />\n <Drawer.Content>\n <Drawer.Title>Cue stack</Drawer.Title>\n <Drawer.Footer><Drawer.Close render={<Button>Done</Button>} /></Drawer.Footer>\n </Drawer.Content>\n</Drawer.Root>",
|
|
159
|
+
"language": "tsx"
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
"status": "todo-docs",
|
|
163
|
+
"url": "/docs/components/drawer",
|
|
164
|
+
"mdUrl": "/docs/components/drawer.md",
|
|
165
|
+
"jsonUrl": "/r/components/drawer.json",
|
|
166
|
+
"specimens": [
|
|
167
|
+
{
|
|
168
|
+
"title": "Drawer",
|
|
169
|
+
"group": "overlays",
|
|
170
|
+
"components": [
|
|
171
|
+
"Drawer"
|
|
172
|
+
],
|
|
173
|
+
"code": "<Specimens>\n <Specimen label=\"bottom\">\n <Drawer.Root>\n <Drawer.Trigger render={<Button>Open drawer</Button>} />\n <Drawer.Content>\n <Drawer.Title>Quick patch</Drawer.Title>\n <Drawer.Description>The next free block on universe 1.</Drawer.Description>\n <Drawer.Footer>\n <Drawer.Close render={<Button>Cancel</Button>} />\n <Drawer.Close render={<Button variant=\"primary\">Patch</Button>} />\n </Drawer.Footer>\n </Drawer.Content>\n </Drawer.Root>\n </Specimen>\n <Specimen label=\"no grab handle\">\n <Drawer.Root>\n <Drawer.Trigger render={<Button>Bare drawer</Button>} />\n <Drawer.Content grabHandle={false}>\n <Drawer.Title>Quick patch</Drawer.Title>\n <Drawer.Description>The next free block on universe 1.</Drawer.Description>\n <Drawer.Footer>\n <Drawer.Close render={<Button>Close</Button>} />\n </Drawer.Footer>\n </Drawer.Content>\n </Drawer.Root>\n </Specimen>\n</Specimens>",
|
|
174
|
+
"note": "The touch-first sheet: a grab handle and a swipe direction.",
|
|
175
|
+
"interaction": "drag the handle to dismiss; on a pointer device it behaves as an ordinary sheet."
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
"todo": true
|
|
179
|
+
}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "DropdownMenu",
|
|
3
|
+
"slug": "dropdown-menu",
|
|
4
|
+
"group": "overlays",
|
|
5
|
+
"importPath": "@cueplusplus/ui",
|
|
6
|
+
"peerDependencies": [],
|
|
7
|
+
"clientOnly": true,
|
|
8
|
+
"description": "A command list hung off a button: row actions, view options, an account menu.\n\nWraps Base UI's `Menu`, so roving focus, typeahead, submenu handling, Escape\nand outside-press dismissal are the primitive's. This layer adds the token\nskin, the portal theme stamp and the canvas-safe wheel dismissal\n(see {@link DropdownMenuRootProps.closeOnWheel}).",
|
|
9
|
+
"props": [],
|
|
10
|
+
"typeReferences": [],
|
|
11
|
+
"subcomponents": [
|
|
12
|
+
"Root",
|
|
13
|
+
"Trigger",
|
|
14
|
+
"Content",
|
|
15
|
+
"Group",
|
|
16
|
+
"Label",
|
|
17
|
+
"Item",
|
|
18
|
+
"CheckboxItem",
|
|
19
|
+
"Separator"
|
|
20
|
+
],
|
|
21
|
+
"parts": [
|
|
22
|
+
{
|
|
23
|
+
"name": "Root",
|
|
24
|
+
"usage": "DropdownMenu.Root",
|
|
25
|
+
"description": "Groups the parts of a menu and owns its open state. Renders no element.",
|
|
26
|
+
"props": [
|
|
27
|
+
{
|
|
28
|
+
"name": "closeOnWheel",
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"required": false,
|
|
31
|
+
"defaultValue": "true",
|
|
32
|
+
"description": "Close the menu when the viewport moves under it — a wheel anywhere outside\nthe popup, or a window resize. Defaults to `true`.\n\nThe menu is positioned from its trigger's rect, and a canvas that pans by\nmutating a CSS transform fires no `scroll` event, so without this a menu\nover the patch grid detaches from its button the moment the user scrolls.\nA wheel *inside* the popup is left alone — that is a long menu scrolling."
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"typeReferences": [
|
|
36
|
+
"BaseMenu.Root.Props"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "Trigger",
|
|
41
|
+
"usage": "DropdownMenu.Trigger",
|
|
42
|
+
"description": "The control that opens the menu. Unstyled — pass `render={<Button />}` or\n`render={<IconButton …/>}` so the button's variant classes win.",
|
|
43
|
+
"props": [],
|
|
44
|
+
"typeReferences": [
|
|
45
|
+
"BaseMenu.Trigger.Props"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "Content",
|
|
50
|
+
"usage": "DropdownMenu.Content",
|
|
51
|
+
"description": "The menu's portal, positioner and popup.\n\nPortalled through {@link useCuePortalProps} so the rows render at the\ncaller's density; roving focus, typeahead and Escape come from Base UI.",
|
|
52
|
+
"props": [
|
|
53
|
+
{
|
|
54
|
+
"name": "className",
|
|
55
|
+
"type": "string",
|
|
56
|
+
"required": false,
|
|
57
|
+
"defaultValue": null,
|
|
58
|
+
"description": "Extra classes for the popup surface."
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "align",
|
|
62
|
+
"type": "\"center\" | \"end\" | \"start\"",
|
|
63
|
+
"required": false,
|
|
64
|
+
"defaultValue": "start",
|
|
65
|
+
"description": "Alignment along that side. Defaults to `\"start\"`."
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "keepMounted",
|
|
69
|
+
"type": "boolean",
|
|
70
|
+
"required": false,
|
|
71
|
+
"defaultValue": null,
|
|
72
|
+
"description": "Keep the popup mounted while closed."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "positionerClassName",
|
|
76
|
+
"type": "string",
|
|
77
|
+
"required": false,
|
|
78
|
+
"defaultValue": null,
|
|
79
|
+
"description": "Extra classes for the positioner that places the popup."
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "sideOffset",
|
|
83
|
+
"type": "number | OffsetFunction",
|
|
84
|
+
"required": false,
|
|
85
|
+
"defaultValue": "4",
|
|
86
|
+
"description": "Gap in px between trigger and popup. Defaults to `4`."
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "side",
|
|
90
|
+
"type": "\"left\" | \"right\" | \"top\" | \"bottom\" | \"inline-end\" | \"inline-start\"",
|
|
91
|
+
"required": false,
|
|
92
|
+
"defaultValue": null,
|
|
93
|
+
"description": "Preferred side of the trigger. Defaults to `\"bottom\"`."
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "alignOffset",
|
|
97
|
+
"type": "number | OffsetFunction",
|
|
98
|
+
"required": false,
|
|
99
|
+
"defaultValue": null,
|
|
100
|
+
"description": "Nudge along the alignment axis, in px."
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"typeReferences": [
|
|
104
|
+
"Omit<BaseMenu.Popup.Props, \"className\">"
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "Group",
|
|
109
|
+
"usage": "DropdownMenu.Group",
|
|
110
|
+
"description": "A labelled block of rows. Give it a {@link DropdownMenuLabel} as its first child.",
|
|
111
|
+
"props": [],
|
|
112
|
+
"typeReferences": [
|
|
113
|
+
"BaseMenu.Group.Props"
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "Label",
|
|
118
|
+
"usage": "DropdownMenu.Label",
|
|
119
|
+
"description": "The uppercase mono caption over a group. Names the group for assistive tech,\nso it belongs inside a {@link DropdownMenuGroup}, not loose in the popup.",
|
|
120
|
+
"props": [],
|
|
121
|
+
"typeReferences": [
|
|
122
|
+
"BaseMenu.GroupLabel.Props"
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "Item",
|
|
127
|
+
"usage": "DropdownMenu.Item",
|
|
128
|
+
"description": "One command. Closes the menu on press unless `closeOnClick={false}`.\n\nHighlighted with `accent-soft` rather than a solid accent fill: at console\ndensity a solid bar under the pointer is far too loud (the luma defect\nruling), and the soft tint still passes contrast against the row text.",
|
|
129
|
+
"props": [
|
|
130
|
+
{
|
|
131
|
+
"name": "icon",
|
|
132
|
+
"type": "ElementType<any, keyof IntrinsicElements>",
|
|
133
|
+
"required": false,
|
|
134
|
+
"defaultValue": null,
|
|
135
|
+
"description": "Optional leading icon component, sized to the density icon token."
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "trailing",
|
|
139
|
+
"type": "ReactNode",
|
|
140
|
+
"required": false,
|
|
141
|
+
"defaultValue": null,
|
|
142
|
+
"description": "Trailing slot — a `Kbd` shortcut hint, a count, a chevron."
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"typeReferences": [
|
|
146
|
+
"BaseMenu.Item.Props"
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"name": "CheckboxItem",
|
|
151
|
+
"usage": "DropdownMenu.CheckboxItem",
|
|
152
|
+
"description": "A row that toggles a setting. Stays open on press — toggling three view\noptions should not mean opening the menu three times.\n\nThe tick gutter is always reserved, so labels do not jog sideways as items\nare ticked.",
|
|
153
|
+
"props": [],
|
|
154
|
+
"typeReferences": [
|
|
155
|
+
"BaseMenu.CheckboxItem.Props"
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"name": "Separator",
|
|
160
|
+
"usage": "DropdownMenu.Separator",
|
|
161
|
+
"description": "The hairline between groups of rows.",
|
|
162
|
+
"props": [],
|
|
163
|
+
"typeReferences": [
|
|
164
|
+
"BaseMenu.Separator.Props"
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
"variants": {},
|
|
169
|
+
"defaultVariants": {},
|
|
170
|
+
"tokensUsed": [
|
|
171
|
+
"--cue-accent",
|
|
172
|
+
"--cue-accent-soft",
|
|
173
|
+
"--cue-border",
|
|
174
|
+
"--cue-border-overlay",
|
|
175
|
+
"--cue-control-sm",
|
|
176
|
+
"--cue-fg",
|
|
177
|
+
"--cue-fg-muted",
|
|
178
|
+
"--cue-fg-subtle",
|
|
179
|
+
"--cue-font-mono",
|
|
180
|
+
"--cue-icon-sm",
|
|
181
|
+
"--cue-radius-control",
|
|
182
|
+
"--cue-radius-overlay",
|
|
183
|
+
"--cue-scrim",
|
|
184
|
+
"--cue-space-1",
|
|
185
|
+
"--cue-space-2",
|
|
186
|
+
"--cue-space-3",
|
|
187
|
+
"--cue-surface-2",
|
|
188
|
+
"--cue-text-emphasis",
|
|
189
|
+
"--cue-text-label",
|
|
190
|
+
"--cue-text-ui"
|
|
191
|
+
],
|
|
192
|
+
"summary": "A command list hung off a button.",
|
|
193
|
+
"examples": [
|
|
194
|
+
{
|
|
195
|
+
"title": "Usage",
|
|
196
|
+
"code": "<DropdownMenu.Root>\n <DropdownMenu.Trigger render={<IconButton aria-label=\"Cue actions\" icon={MoreVertical} />} />\n <DropdownMenu.Content align=\"end\">\n <DropdownMenu.Group>\n <DropdownMenu.Label>Playback</DropdownMenu.Label>\n <DropdownMenu.Item onClick={go}>Go</DropdownMenu.Item>\n </DropdownMenu.Group>\n <DropdownMenu.Separator />\n <DropdownMenu.CheckboxItem checked={follow} onCheckedChange={setFollow}>\n Follow\n </DropdownMenu.CheckboxItem>\n </DropdownMenu.Content>\n</DropdownMenu.Root>",
|
|
197
|
+
"language": "tsx"
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
"status": "stable",
|
|
201
|
+
"url": "/docs/components/dropdown-menu",
|
|
202
|
+
"mdUrl": "/docs/components/dropdown-menu.md",
|
|
203
|
+
"jsonUrl": "/r/components/dropdown-menu.json",
|
|
204
|
+
"whenToUse": [
|
|
205
|
+
"Row actions, view options, an account menu: a list of things to do.",
|
|
206
|
+
"Toggling view state with `DropdownMenu.CheckboxItem`, which stays open so three toggles cost one trip."
|
|
207
|
+
],
|
|
208
|
+
"whenNotToUse": [
|
|
209
|
+
"Choosing a value that a form will submit. Use `Select`.",
|
|
210
|
+
"Arbitrary content. A menu is a list of commands, not a layout container.",
|
|
211
|
+
"Right-click actions on a surface. Use `ContextMenu`."
|
|
212
|
+
],
|
|
213
|
+
"commonMistakes": [
|
|
214
|
+
"Putting an input inside a menu item, where typeahead and roving focus fight the field for every keystroke.",
|
|
215
|
+
"Leaving a `DropdownMenu.Group` without a `DropdownMenu.Label`, which leaves the group unnamed for assistive tech."
|
|
216
|
+
],
|
|
217
|
+
"specimens": [
|
|
218
|
+
{
|
|
219
|
+
"title": "DropdownMenu",
|
|
220
|
+
"group": "overlays",
|
|
221
|
+
"components": [
|
|
222
|
+
"DropdownMenu"
|
|
223
|
+
],
|
|
224
|
+
"code": "<Specimens>\n <Specimen label=\"default\">\n <DropdownMenu.Root>\n <DropdownMenu.Trigger render={<IconButton aria-label=\"Cue actions\" icon={MoreVertical} />} />\n <DropdownMenu.Content align=\"end\">\n <DropdownMenu.Group>\n <DropdownMenu.Label>Cue</DropdownMenu.Label>\n <DropdownMenu.Item icon={Play} trailing={<Kbd>G</Kbd>}>\n Go\n </DropdownMenu.Item>\n <DropdownMenu.Item icon={Copy} trailing={<Kbd>⌘D</Kbd>}>\n Duplicate\n </DropdownMenu.Item>\n </DropdownMenu.Group>\n <DropdownMenu.Separator />\n <DropdownMenu.CheckboxItem checked={follow} onCheckedChange={setFollow}>\n Follow\n </DropdownMenu.CheckboxItem>\n <DropdownMenu.Separator />\n <DropdownMenu.Item icon={Trash2} disabled>\n Delete\n </DropdownMenu.Item>\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n </Specimen>\n <Specimen label=\"from a density island\">\n <Density density=\"ultra-compact\">\n <DropdownMenu.Root>\n <DropdownMenu.Trigger render={<Button>Ultra-compact</Button>} />\n <DropdownMenu.Content>\n <DropdownMenu.Item>The popup is ultra-compact too</DropdownMenu.Item>\n <DropdownMenu.Item>Because the portal is stamped</DropdownMenu.Item>\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n </Density>\n </Specimen>\n</Specimens>",
|
|
225
|
+
"note": "Groups, labels, icons, trailing shortcuts, checkbox items and separators, on the shared menu surface.",
|
|
226
|
+
"interaction": "closes on wheel as well as on scroll, so a menu opened over a pannable canvas cannot be left floating over nothing."
|
|
227
|
+
}
|
|
228
|
+
]
|
|
229
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "EmptyState",
|
|
3
|
+
"slug": "empty-state",
|
|
4
|
+
"group": "chrome",
|
|
5
|
+
"importPath": "@cueplusplus/ui",
|
|
6
|
+
"peerDependencies": [],
|
|
7
|
+
"clientOnly": false,
|
|
8
|
+
"description": "The \"there is nothing here\" panel body.\n\nCentred and quiet: an empty state is a report, not an alarm, so it uses the\nmuted ramp throughout and gets its emphasis from position rather than colour.\nThe icon is decorative — the title carries the meaning, so a screen reader\nhears one sentence instead of a shrug emoji.\n\nStatic markup — no `\"use client\"`.",
|
|
9
|
+
"props": [
|
|
10
|
+
{
|
|
11
|
+
"name": "title",
|
|
12
|
+
"type": "ReactNode",
|
|
13
|
+
"required": true,
|
|
14
|
+
"defaultValue": null,
|
|
15
|
+
"description": "What is missing. One short line: \"No cues yet\"."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "hint",
|
|
19
|
+
"type": "ReactNode",
|
|
20
|
+
"required": false,
|
|
21
|
+
"defaultValue": null,
|
|
22
|
+
"description": "How to fix it. One sentence, muted."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "action",
|
|
26
|
+
"type": "ReactNode",
|
|
27
|
+
"required": false,
|
|
28
|
+
"defaultValue": null,
|
|
29
|
+
"description": "The way out — normally a single `Button`."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "icon",
|
|
33
|
+
"type": "ElementType<any, keyof IntrinsicElements>",
|
|
34
|
+
"required": false,
|
|
35
|
+
"defaultValue": null,
|
|
36
|
+
"description": "Optional glyph above the title (e.g. a lucide icon), drawn `aria-hidden`."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "children",
|
|
40
|
+
"type": "ReactNode",
|
|
41
|
+
"required": false,
|
|
42
|
+
"defaultValue": null,
|
|
43
|
+
"description": "Extra content between the hint and the action — rarely needed."
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"typeReferences": [
|
|
47
|
+
"Omit<React.ComponentPropsWithoutRef<\"div\">, \"title\">"
|
|
48
|
+
],
|
|
49
|
+
"subcomponents": [],
|
|
50
|
+
"parts": [],
|
|
51
|
+
"variants": {},
|
|
52
|
+
"defaultVariants": {},
|
|
53
|
+
"tokensUsed": [
|
|
54
|
+
"--cue-fg",
|
|
55
|
+
"--cue-fg-muted",
|
|
56
|
+
"--cue-fg-subtle",
|
|
57
|
+
"--cue-font-mono",
|
|
58
|
+
"--cue-space-2",
|
|
59
|
+
"--cue-space-3",
|
|
60
|
+
"--cue-space-6",
|
|
61
|
+
"--cue-space-7",
|
|
62
|
+
"--cue-text-emphasis",
|
|
63
|
+
"--cue-text-ui"
|
|
64
|
+
],
|
|
65
|
+
"summary": "The \"there is nothing here\" panel body.",
|
|
66
|
+
"examples": [
|
|
67
|
+
{
|
|
68
|
+
"title": "Usage",
|
|
69
|
+
"code": "<Panel>\n <EmptyState\n icon={ListX}\n title=\"No cues yet\"\n hint=\"Record one from the live look, or import a show file.\"\n action={<Button variant=\"primary\">Record cue</Button>}\n />\n</Panel>",
|
|
70
|
+
"language": "tsx"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"status": "todo-docs",
|
|
74
|
+
"url": "/docs/components/empty-state",
|
|
75
|
+
"mdUrl": "/docs/components/empty-state.md",
|
|
76
|
+
"jsonUrl": "/r/components/empty-state.json",
|
|
77
|
+
"specimens": [
|
|
78
|
+
{
|
|
79
|
+
"title": "EmptyState",
|
|
80
|
+
"group": "chrome",
|
|
81
|
+
"components": [
|
|
82
|
+
"EmptyState"
|
|
83
|
+
],
|
|
84
|
+
"code": "<div className=\"grid w-full gap-(--cue-space-5) lg:grid-cols-2\">\n <Panel>\n <EmptyState\n icon={List}\n title={COPY.empty.title}\n hint={COPY.empty.hint}\n action={<Button variant=\"primary\">{COPY.empty.action}</Button>}\n />\n </Panel>\n <Panel>\n <EmptyState\n icon={Eye}\n title={COPY.error.title}\n hint={COPY.error.hint}\n action={<Button>{COPY.error.action}</Button>}\n >\n <StatusDot tone=\"danger\" label=\"No reply\" />\n </EmptyState>\n </Panel>\n</div>",
|
|
85
|
+
"note": "The standard empty copy, from lib/samples.tsx. Same words everywhere in the app.",
|
|
86
|
+
"interaction": "the action is an ordinary Button and behaves like one."
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"todo": true
|
|
90
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "EnvVarInput",
|
|
3
|
+
"slug": "env-var-input",
|
|
4
|
+
"group": "forms",
|
|
5
|
+
"importPath": "@cueplusplus/ui",
|
|
6
|
+
"peerDependencies": [],
|
|
7
|
+
"clientOnly": true,
|
|
8
|
+
"description": "A config value that may be a literal *or* a reference to an environment\nvariable — and looks unmistakably different in each case.\n\nWhen the value matches `env(NAME)` the text box is replaced by a warn-toned\npill naming the variable. That swap is the entire point: a config screen full\nof identical text boxes gives no way to tell \"this is the key\" from \"this is\nwhere the key comes from\", and the difference decides whether the value is\nsafe to screenshot, commit or paste into a ticket. Warn is the system's amber,\nso the pill reads as \"resolved elsewhere — check the environment\" rather than\nas an error.\n\nPorted from supbuddy's config editor, where the pattern earned its keep.",
|
|
9
|
+
"props": [
|
|
10
|
+
{
|
|
11
|
+
"name": "value",
|
|
12
|
+
"type": "string",
|
|
13
|
+
"required": false,
|
|
14
|
+
"defaultValue": null,
|
|
15
|
+
"description": "The value — a literal, or an `env(NAME)` reference. Use with `onValueChange`."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "defaultValue",
|
|
19
|
+
"type": "string",
|
|
20
|
+
"required": false,
|
|
21
|
+
"defaultValue": null,
|
|
22
|
+
"description": "Initial value for an uncontrolled field."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "onValueChange",
|
|
26
|
+
"type": "((value: string) => void)",
|
|
27
|
+
"required": false,
|
|
28
|
+
"defaultValue": null,
|
|
29
|
+
"description": "Called with the new value: on every keystroke in the literal state, and with\n`\"\"` when the variable pill is cleared. One argument, because the pill's\nclear button has no DOM change event to hand on."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "placeholder",
|
|
33
|
+
"type": "string",
|
|
34
|
+
"required": false,
|
|
35
|
+
"defaultValue": null,
|
|
36
|
+
"description": "Shown while the literal field is empty."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "secret",
|
|
40
|
+
"type": "boolean",
|
|
41
|
+
"required": false,
|
|
42
|
+
"defaultValue": "false",
|
|
43
|
+
"description": "Mask the literal value. The reference is never masked — a name is not a secret."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "size",
|
|
47
|
+
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
48
|
+
"required": false,
|
|
49
|
+
"defaultValue": "md",
|
|
50
|
+
"description": "Rung of the control ladder. Defaults to `\"md\"`."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "disabled",
|
|
54
|
+
"type": "boolean",
|
|
55
|
+
"required": false,
|
|
56
|
+
"defaultValue": null,
|
|
57
|
+
"description": "Prevent editing and grey the control out."
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "name",
|
|
61
|
+
"type": "string",
|
|
62
|
+
"required": false,
|
|
63
|
+
"defaultValue": null,
|
|
64
|
+
"description": "Name for the underlying input, when the field is part of a form."
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "id",
|
|
68
|
+
"type": "string",
|
|
69
|
+
"required": false,
|
|
70
|
+
"defaultValue": null,
|
|
71
|
+
"description": "Id forwarded to the underlying input."
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "aria-label",
|
|
75
|
+
"type": "string",
|
|
76
|
+
"required": false,
|
|
77
|
+
"defaultValue": null,
|
|
78
|
+
"description": "Accessible name for the field, when no {@link FieldLabel } names it."
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "clearLabel",
|
|
82
|
+
"type": "string",
|
|
83
|
+
"required": false,
|
|
84
|
+
"defaultValue": "Clear environment variable",
|
|
85
|
+
"description": "Accessible name for the pill's clear button. Defaults to `\"Clear environment variable\"`."
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "className",
|
|
89
|
+
"type": "string",
|
|
90
|
+
"required": false,
|
|
91
|
+
"defaultValue": null,
|
|
92
|
+
"description": "Extra classes for the wrapper."
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"typeReferences": [
|
|
96
|
+
"Omit<React.ComponentPropsWithoutRef<\"div\">, \"onChange\" | \"defaultValue\">"
|
|
97
|
+
],
|
|
98
|
+
"subcomponents": [],
|
|
99
|
+
"parts": [],
|
|
100
|
+
"variants": {},
|
|
101
|
+
"defaultVariants": {},
|
|
102
|
+
"tokensUsed": [
|
|
103
|
+
"--cue-accent",
|
|
104
|
+
"--cue-border",
|
|
105
|
+
"--cue-control-lg",
|
|
106
|
+
"--cue-control-md",
|
|
107
|
+
"--cue-control-sm",
|
|
108
|
+
"--cue-danger",
|
|
109
|
+
"--cue-fg",
|
|
110
|
+
"--cue-fg-subtle",
|
|
111
|
+
"--cue-font-mono",
|
|
112
|
+
"--cue-icon-md",
|
|
113
|
+
"--cue-icon-sm",
|
|
114
|
+
"--cue-radius-control",
|
|
115
|
+
"--cue-space-2",
|
|
116
|
+
"--cue-space-3",
|
|
117
|
+
"--cue-space-4",
|
|
118
|
+
"--cue-space-5",
|
|
119
|
+
"--cue-sunken",
|
|
120
|
+
"--cue-text-body",
|
|
121
|
+
"--cue-text-label",
|
|
122
|
+
"--cue-text-ui",
|
|
123
|
+
"--cue-warn"
|
|
124
|
+
],
|
|
125
|
+
"summary": "A config value that may be a literal *or* a reference to an environment variable — and looks unmistakably different in each case.",
|
|
126
|
+
"examples": [
|
|
127
|
+
{
|
|
128
|
+
"title": "Usage",
|
|
129
|
+
"code": "<EnvVarInput aria-label=\"Service key\" secret value={key} onValueChange={setKey} />\n<EnvVarInput aria-label=\"Project URL\" defaultValue={envReference(\"SUPABASE_URL\")} />",
|
|
130
|
+
"language": "tsx"
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"status": "todo-docs",
|
|
134
|
+
"url": "/docs/components/env-var-input",
|
|
135
|
+
"mdUrl": "/docs/components/env-var-input.md",
|
|
136
|
+
"jsonUrl": "/r/components/env-var-input.json",
|
|
137
|
+
"specimens": [
|
|
138
|
+
{
|
|
139
|
+
"title": "EnvVarInput",
|
|
140
|
+
"group": "forms",
|
|
141
|
+
"components": [
|
|
142
|
+
"EnvVarInput"
|
|
143
|
+
],
|
|
144
|
+
"code": "<Specimens>\n <Specimen label=\"literal\">\n <EnvVarInput aria-label=\"Node address, literal\" defaultValue=\"10.0.0.42\" />\n </Specimen>\n <Specimen label=\"env reference\">\n <EnvVarInput aria-label=\"Node address, reference\" defaultValue=\"env(ARTNET_HOST)\" />\n </Specimen>\n <Specimen label=\"secret\">\n <EnvVarInput aria-label=\"API token\" defaultValue=\"env(CUE_API_TOKEN)\" secret />\n </Specimen>\n <Specimen label=\"disabled\">\n <EnvVarInput aria-label=\"Locked reference\" defaultValue=\"env(ARTNET_HOST)\" disabled />\n </Specimen>\n</Specimens>",
|
|
145
|
+
"note": "A literal value and an `env(NAME)` reference are different things, so they do not look the same: the reference swaps to an amber token pill.",
|
|
146
|
+
"interaction": "the mode switch is a button; typing `env(` in the field is enough to flip it."
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"todo": true
|
|
150
|
+
}
|