@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,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ShapeSection",
|
|
3
|
+
"slug": "shape-section",
|
|
4
|
+
"group": "configurator",
|
|
5
|
+
"importPath": "@cueplusplus/ui/configurator",
|
|
6
|
+
"peerDependencies": [
|
|
7
|
+
"react-aria-components"
|
|
8
|
+
],
|
|
9
|
+
"clientOnly": true,
|
|
10
|
+
"description": "Section 3 — the geometry and type knobs, which belong to the *density* axis\nrather than to the theme.\n\nBoth multipliers are crossed with the density ladder when they are written, so\nnudging the radius keeps `ultra-compact` tighter than `large` instead of\nflattening the two. The density knob is the published `--cue-density` escape\nhatch (spec §6): the shipped control ladder is three hand-authored blocks, not\na multiplier, so this scales bespoke app geometry — `calc(200px *\nvar(--cue-density))` — and the picker above is what moves the controls.",
|
|
11
|
+
"props": [
|
|
12
|
+
{
|
|
13
|
+
"name": "edits",
|
|
14
|
+
"type": "TokenEdits",
|
|
15
|
+
"required": true,
|
|
16
|
+
"defaultValue": null,
|
|
17
|
+
"description": "The panel's edit surface."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "className",
|
|
21
|
+
"type": "string",
|
|
22
|
+
"required": false,
|
|
23
|
+
"defaultValue": null,
|
|
24
|
+
"description": "Extra classes for the section."
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"typeReferences": [],
|
|
28
|
+
"subcomponents": [],
|
|
29
|
+
"parts": [],
|
|
30
|
+
"variants": {},
|
|
31
|
+
"defaultVariants": {},
|
|
32
|
+
"tokensUsed": [
|
|
33
|
+
"--cue-accent",
|
|
34
|
+
"--cue-border",
|
|
35
|
+
"--cue-border-strong",
|
|
36
|
+
"--cue-density",
|
|
37
|
+
"--cue-fg",
|
|
38
|
+
"--cue-fg-muted",
|
|
39
|
+
"--cue-fg-subtle",
|
|
40
|
+
"--cue-font-mono",
|
|
41
|
+
"--cue-font-pairing-mono",
|
|
42
|
+
"--cue-font-sans",
|
|
43
|
+
"--cue-font-scale",
|
|
44
|
+
"--cue-font-theme-mono",
|
|
45
|
+
"--cue-radius-control",
|
|
46
|
+
"--cue-radius-scale",
|
|
47
|
+
"--cue-space-1",
|
|
48
|
+
"--cue-space-2",
|
|
49
|
+
"--cue-space-4",
|
|
50
|
+
"--cue-text-label",
|
|
51
|
+
"--cue-text-micro"
|
|
52
|
+
],
|
|
53
|
+
"summary": "Section 3 — the geometry and type knobs, which belong to the *density* axis rather than to the theme.",
|
|
54
|
+
"examples": [
|
|
55
|
+
{
|
|
56
|
+
"title": "Usage",
|
|
57
|
+
"code": "<ShapeSection edits={edits} />",
|
|
58
|
+
"language": "tsx"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"status": "todo-docs",
|
|
62
|
+
"url": "/docs/components/shape-section",
|
|
63
|
+
"mdUrl": "/docs/components/shape-section.md",
|
|
64
|
+
"jsonUrl": "/r/components/shape-section.json",
|
|
65
|
+
"todo": true
|
|
66
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Sheet",
|
|
3
|
+
"slug": "sheet",
|
|
4
|
+
"group": "overlays",
|
|
5
|
+
"importPath": "@cueplusplus/ui",
|
|
6
|
+
"peerDependencies": [],
|
|
7
|
+
"clientOnly": true,
|
|
8
|
+
"description": "A modal panel that slides in from an edge: an inspector, a filter drawer, a\ndetails pane too wide for a popover.\n\nThe same Base UI `Dialog` as {@link Dialog } — same focus trap, same\ndismissal, same portal theme stamp — anchored to an edge instead of centred.\nReach for it when the content is a *side channel* to the page rather than an\ninterruption of it; a task that must be finished before anything else belongs\nin a `Dialog`. On a phone-shaped viewport prefer {@link Drawer }, which is the\nsame idea with a swipe.",
|
|
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": "Sheet.Root",
|
|
24
|
+
"description": "Groups the parts of a sheet and owns its open state. Renders no element.",
|
|
25
|
+
"props": [],
|
|
26
|
+
"typeReferences": [
|
|
27
|
+
"BaseDialog.Root.Props"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "Trigger",
|
|
32
|
+
"usage": "Sheet.Trigger",
|
|
33
|
+
"description": "The control that opens the sheet. A `<button>` by default, deliberately\nunstyled — pass `render={<Button />}` so the button's own variant classes stay\nthe last word on how it looks.",
|
|
34
|
+
"props": [],
|
|
35
|
+
"typeReferences": [
|
|
36
|
+
"BaseDialog.Trigger.Props"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "Content",
|
|
41
|
+
"usage": "Sheet.Content",
|
|
42
|
+
"description": "The sheet's portal, scrim and popup in one part.\n\nThe portal container comes from {@link useCuePortalProps}, so the surface\ncarries the caller's `data-theme` / `data-density` / `data-mode` even though\nit mounts at the end of `<body>`.\n\nFocus trapping, focus restoration, Escape and outside-press dismissal, and\nscroll locking all come from Base UI's `Dialog`; this layer supplies the edge\ngeometry and the slide.",
|
|
43
|
+
"props": [
|
|
44
|
+
{
|
|
45
|
+
"name": "className",
|
|
46
|
+
"type": "string",
|
|
47
|
+
"required": false,
|
|
48
|
+
"defaultValue": null,
|
|
49
|
+
"description": "Extra classes for the popup surface."
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "closeLabel",
|
|
53
|
+
"type": "string",
|
|
54
|
+
"required": false,
|
|
55
|
+
"defaultValue": "Close",
|
|
56
|
+
"description": "Accessible name for the corner close affordance. Defaults to `\"Close\"`."
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "keepMounted",
|
|
60
|
+
"type": "boolean",
|
|
61
|
+
"required": false,
|
|
62
|
+
"defaultValue": null,
|
|
63
|
+
"description": "Keep the popup mounted while closed, so its content is not re-created."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "backdropClassName",
|
|
67
|
+
"type": "string",
|
|
68
|
+
"required": false,
|
|
69
|
+
"defaultValue": null,
|
|
70
|
+
"description": "Extra classes for the scrim behind it."
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "side",
|
|
74
|
+
"type": "\"left\" | \"right\" | \"bottom\"",
|
|
75
|
+
"required": false,
|
|
76
|
+
"defaultValue": "right",
|
|
77
|
+
"description": ""
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "showCloseButton",
|
|
81
|
+
"type": "boolean",
|
|
82
|
+
"required": false,
|
|
83
|
+
"defaultValue": "true",
|
|
84
|
+
"description": "Show the corner close affordance. Defaults to `true`."
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"typeReferences": [
|
|
88
|
+
"Omit<BaseDialog.Popup.Props, \"className\">",
|
|
89
|
+
"VariantProps<typeof sheetPopupVariants>"
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "Title",
|
|
94
|
+
"usage": "Sheet.Title",
|
|
95
|
+
"description": "The sheet's heading. Base UI wires it to the popup's `aria-labelledby`, so a\nsheet with a title needs no `aria-label`.",
|
|
96
|
+
"props": [],
|
|
97
|
+
"typeReferences": [
|
|
98
|
+
"BaseDialog.Title.Props"
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "Description",
|
|
103
|
+
"usage": "Sheet.Description",
|
|
104
|
+
"description": "The supporting line under the title, published as `aria-describedby`.",
|
|
105
|
+
"props": [],
|
|
106
|
+
"typeReferences": [
|
|
107
|
+
"BaseDialog.Description.Props"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"name": "Footer",
|
|
112
|
+
"usage": "Sheet.Footer",
|
|
113
|
+
"description": "The action strip at the foot of the sheet. `mt-auto` so it sinks to the bottom\nedge of a tall panel instead of hugging whatever content happens to be above.",
|
|
114
|
+
"props": [],
|
|
115
|
+
"typeReferences": [
|
|
116
|
+
"React.ComponentPropsWithoutRef<\"div\">"
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "Close",
|
|
121
|
+
"usage": "Sheet.Close",
|
|
122
|
+
"description": "A control that closes the sheet. Unstyled for the same reason as the\ntrigger — wrap it: `<Sheet.Close render={<Button>Cancel</Button>} />`.",
|
|
123
|
+
"props": [],
|
|
124
|
+
"typeReferences": [
|
|
125
|
+
"BaseDialog.Close.Props"
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"variants": {
|
|
130
|
+
"side": [
|
|
131
|
+
"right",
|
|
132
|
+
"left",
|
|
133
|
+
"bottom"
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
"defaultVariants": {
|
|
137
|
+
"side": "right"
|
|
138
|
+
},
|
|
139
|
+
"tokensUsed": [
|
|
140
|
+
"--cue-accent-soft",
|
|
141
|
+
"--cue-border",
|
|
142
|
+
"--cue-border-overlay",
|
|
143
|
+
"--cue-control-sm",
|
|
144
|
+
"--cue-fg",
|
|
145
|
+
"--cue-fg-muted",
|
|
146
|
+
"--cue-fg-subtle",
|
|
147
|
+
"--cue-font-mono",
|
|
148
|
+
"--cue-radius-control",
|
|
149
|
+
"--cue-radius-overlay",
|
|
150
|
+
"--cue-scrim",
|
|
151
|
+
"--cue-space-1",
|
|
152
|
+
"--cue-space-2",
|
|
153
|
+
"--cue-space-3",
|
|
154
|
+
"--cue-space-4",
|
|
155
|
+
"--cue-space-6",
|
|
156
|
+
"--cue-surface-2",
|
|
157
|
+
"--cue-text-emphasis",
|
|
158
|
+
"--cue-text-label",
|
|
159
|
+
"--cue-text-ui"
|
|
160
|
+
],
|
|
161
|
+
"summary": "A modal panel that slides in from an edge: an inspector, a filter drawer, a details pane too wide for a popover.",
|
|
162
|
+
"examples": [
|
|
163
|
+
{
|
|
164
|
+
"title": "Usage",
|
|
165
|
+
"code": "<Sheet.Root>\n <Sheet.Trigger render={<Button>Inspect</Button>} />\n <Sheet.Content side=\"right\">\n <Sheet.Title>Fixture inspector</Sheet.Title>\n <Sheet.Description>Everything patched at this address.</Sheet.Description>\n <Sheet.Footer><Sheet.Close render={<Button>Done</Button>} /></Sheet.Footer>\n </Sheet.Content>\n</Sheet.Root>",
|
|
166
|
+
"language": "tsx"
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"status": "todo-docs",
|
|
170
|
+
"url": "/docs/components/sheet",
|
|
171
|
+
"mdUrl": "/docs/components/sheet.md",
|
|
172
|
+
"jsonUrl": "/r/components/sheet.json",
|
|
173
|
+
"specimens": [
|
|
174
|
+
{
|
|
175
|
+
"title": "Sheet",
|
|
176
|
+
"group": "overlays",
|
|
177
|
+
"components": [
|
|
178
|
+
"Sheet"
|
|
179
|
+
],
|
|
180
|
+
"code": "<Specimens>\n {([\"right\", \"left\", \"bottom\"] as const).map((side) => (\n <Specimen key={side} label={side}>\n <Sheet.Root>\n <Sheet.Trigger render={<Button>{side}</Button>} />\n <Sheet.Content side={side}>\n <Sheet.Title>Fixture inspector</Sheet.Title>\n <Sheet.Description>Source Four 26°, universe 1, channel 12.</Sheet.Description>\n <div className=\"flex flex-col gap-(--cue-space-4)\">\n <Switch label=\"Highlight\" defaultChecked />\n <Switch label=\"Park\" />\n </div>\n <Sheet.Footer>\n <Sheet.Close render={<Button>Close</Button>} />\n </Sheet.Footer>\n </Sheet.Content>\n </Sheet.Root>\n </Specimen>\n ))}\n</Specimens>",
|
|
181
|
+
"note": "A dialog anchored to an edge. Three sides, each with its own translate transition.",
|
|
182
|
+
"interaction": "the transition is driven by Base UI's data attributes and CSS, and switches off under prefers-reduced-motion."
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
"todo": true
|
|
186
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Sidebar",
|
|
3
|
+
"slug": "sidebar",
|
|
4
|
+
"group": "layout",
|
|
5
|
+
"importPath": "@cueplusplus/ui",
|
|
6
|
+
"peerDependencies": [],
|
|
7
|
+
"clientOnly": true,
|
|
8
|
+
"description": "The console's navigation column: sections of items, a scroller of its own,\nand a rail that collapses the whole thing to icons.",
|
|
9
|
+
"props": [],
|
|
10
|
+
"typeReferences": [],
|
|
11
|
+
"subcomponents": [
|
|
12
|
+
"Root",
|
|
13
|
+
"Section",
|
|
14
|
+
"Item",
|
|
15
|
+
"Rail"
|
|
16
|
+
],
|
|
17
|
+
"parts": [
|
|
18
|
+
{
|
|
19
|
+
"name": "Root",
|
|
20
|
+
"usage": "Sidebar.Root",
|
|
21
|
+
"description": "The navigation column: a `<nav>` on a hairline, with a collapse valve and a\nscroller of its own.\n\nWidth is an inline length rather than a class, because it is the one piece of\nconsole geometry a user is expected to change and persist; the transition\nbetween the two widths is CSS and switches off under `prefers-reduced-motion`.\n\n**The column scrolls, the rail does not.** Thirty rows of navigation is an\nordinary amount for a documentation site or a settings screen, and a column\nthat cannot scroll simply loses the last of them off the bottom of the frame.\nSo the sections go in an inner scroller and the root keeps the height — which\nis also what saves {@link SidebarRail}: it is `absolute inset-y-0`, its\ncontaining block is the root rather than the scroller, and an absolutely\npositioned box whose containing block is outside a scroll container neither\nscrolls with it nor is clipped by it. Put the scroller on the root instead\nand the collapse rail slides away with the third screenful.",
|
|
22
|
+
"props": [
|
|
23
|
+
{
|
|
24
|
+
"name": "landmark",
|
|
25
|
+
"type": "\"complementary\" | \"navigation\"",
|
|
26
|
+
"required": false,
|
|
27
|
+
"defaultValue": "navigation",
|
|
28
|
+
"description": "Which landmark the column is. Defaults to `\"navigation\"`, rendering\n`<nav>`; `\"complementary\"` renders `<aside>` instead.\n\nA column of `Sidebar.Item`s is a list of destinations, one of which carries\n`aria-current=\"page\"` — that is primary navigation, and announcing it as\ncomplementary tells a screen-reader user the site's main map is an aside.\n`\"complementary\"` is there for the column that genuinely is one: a filter\nrail, an inspector, a related-links strip."
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "collapsed",
|
|
32
|
+
"type": "boolean",
|
|
33
|
+
"required": false,
|
|
34
|
+
"defaultValue": null,
|
|
35
|
+
"description": "Collapsed state when controlled. Pass with `onCollapsedChange`."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "defaultCollapsed",
|
|
39
|
+
"type": "boolean",
|
|
40
|
+
"required": false,
|
|
41
|
+
"defaultValue": "false",
|
|
42
|
+
"description": "Initial collapsed state when uncontrolled. Defaults to `false`."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "onCollapsedChange",
|
|
46
|
+
"type": "((collapsed: boolean) => void)",
|
|
47
|
+
"required": false,
|
|
48
|
+
"defaultValue": null,
|
|
49
|
+
"description": "Called with the new collapsed state whenever the rail is pressed."
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "width",
|
|
53
|
+
"type": "string",
|
|
54
|
+
"required": false,
|
|
55
|
+
"defaultValue": "14rem",
|
|
56
|
+
"description": "Width while expanded. Any CSS length. Defaults to `\"14rem\"`."
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "collapsedWidth",
|
|
60
|
+
"type": "string",
|
|
61
|
+
"required": false,
|
|
62
|
+
"defaultValue": "3rem",
|
|
63
|
+
"description": "Width while collapsed. Any CSS length. Defaults to `\"3rem\"`."
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"typeReferences": [
|
|
67
|
+
"React.ComponentPropsWithoutRef<\"aside\">"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "Section",
|
|
72
|
+
"usage": "Sidebar.Section",
|
|
73
|
+
"description": "One group of items, under an optional caption.",
|
|
74
|
+
"props": [
|
|
75
|
+
{
|
|
76
|
+
"name": "label",
|
|
77
|
+
"type": "ReactNode",
|
|
78
|
+
"required": false,
|
|
79
|
+
"defaultValue": null,
|
|
80
|
+
"description": "The group caption, in the mono micro idiom. Dropped entirely while the\nsidebar is collapsed — at rail width a caption has nothing left to caption."
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"typeReferences": [
|
|
84
|
+
"React.ComponentPropsWithoutRef<\"div\">"
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "Item",
|
|
89
|
+
"usage": "Sidebar.Item",
|
|
90
|
+
"description": "One navigation destination.\n\nActive is a tint (`accent-soft` ground, accent ink), not a solid fill: a\nfilled accent bar in a column of eight items reads as a button someone left\npressed. Same ruling as the segmented control and the active tab.\n\nWhile collapsed the label goes `sr-only` rather than being unmounted — it is\nthe item's accessible name, and an icon-only button with no name is a\nWCAG 4.1.2 failure.",
|
|
91
|
+
"props": [
|
|
92
|
+
{
|
|
93
|
+
"name": "icon",
|
|
94
|
+
"type": "ElementType<any, keyof IntrinsicElements>",
|
|
95
|
+
"required": false,
|
|
96
|
+
"defaultValue": null,
|
|
97
|
+
"description": "Optional leading icon component (e.g. a lucide icon), drawn `aria-hidden`."
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "active",
|
|
101
|
+
"type": "boolean",
|
|
102
|
+
"required": false,
|
|
103
|
+
"defaultValue": "false",
|
|
104
|
+
"description": "Mark this item as the current destination."
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "badge",
|
|
108
|
+
"type": "ReactNode",
|
|
109
|
+
"required": false,
|
|
110
|
+
"defaultValue": null,
|
|
111
|
+
"description": "Trailing slot: a count, a status dot. Hidden while collapsed."
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "render",
|
|
115
|
+
"type": "RenderProp<Record<string, unknown>>",
|
|
116
|
+
"required": false,
|
|
117
|
+
"defaultValue": null,
|
|
118
|
+
"description": "Replace the rendered element (Base UI render prop) — normally a router\nlink: `render={<NextLink href=\"/patch\" />}`."
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"typeReferences": [
|
|
122
|
+
"React.ComponentPropsWithoutRef<\"button\">"
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "Rail",
|
|
127
|
+
"usage": "Sidebar.Rail",
|
|
128
|
+
"description": "The hairline-wide hit strip along the sidebar's edge that toggles it.\n\nA 4px target straddling the rim, invisible until hovered — the collapse\ncontrol should cost no chrome, because a dedicated button for it is a\npermanent 24px reminder of a thing most people set once.\n\nPass it as a child of {@link SidebarRoot} like any other. It is `absolute`\nagainst the root rather than against the root's inner scroller, so it spans\nthe whole column and holds its edge however far the sections are scrolled.",
|
|
129
|
+
"props": [
|
|
130
|
+
{
|
|
131
|
+
"name": "collapseLabel",
|
|
132
|
+
"type": "string",
|
|
133
|
+
"required": false,
|
|
134
|
+
"defaultValue": "Collapse sidebar",
|
|
135
|
+
"description": "Accessible name while expanded. Defaults to `\"Collapse sidebar\"`."
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "expandLabel",
|
|
139
|
+
"type": "string",
|
|
140
|
+
"required": false,
|
|
141
|
+
"defaultValue": "Expand sidebar",
|
|
142
|
+
"description": "Accessible name while collapsed. Defaults to `\"Expand sidebar\"`."
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"typeReferences": [
|
|
146
|
+
"Omit<React.ComponentPropsWithoutRef<\"button\">, \"children\">"
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
"variants": {},
|
|
151
|
+
"defaultVariants": {},
|
|
152
|
+
"tokensUsed": [
|
|
153
|
+
"--cue-accent",
|
|
154
|
+
"--cue-accent-soft",
|
|
155
|
+
"--cue-border",
|
|
156
|
+
"--cue-control-md",
|
|
157
|
+
"--cue-control-sm",
|
|
158
|
+
"--cue-fg",
|
|
159
|
+
"--cue-fg-muted",
|
|
160
|
+
"--cue-fg-subtle",
|
|
161
|
+
"--cue-font-mono",
|
|
162
|
+
"--cue-icon-md",
|
|
163
|
+
"--cue-radius-control",
|
|
164
|
+
"--cue-space-1",
|
|
165
|
+
"--cue-space-2",
|
|
166
|
+
"--cue-space-3",
|
|
167
|
+
"--cue-space-4",
|
|
168
|
+
"--cue-surface-1",
|
|
169
|
+
"--cue-surface-2",
|
|
170
|
+
"--cue-text-label",
|
|
171
|
+
"--cue-text-ui"
|
|
172
|
+
],
|
|
173
|
+
"summary": "The console's navigation column: sections of items, a scroller of its own, and a rail that collapses the whole thing to icons.",
|
|
174
|
+
"examples": [
|
|
175
|
+
{
|
|
176
|
+
"title": "Usage",
|
|
177
|
+
"code": "<Sidebar.Root defaultCollapsed aria-label=\"Main\">\n <Sidebar.Section label=\"Console\">\n <Sidebar.Item render={<NextLink href=\"/patch\" />} active>Patch</Sidebar.Item>\n </Sidebar.Section>\n <Sidebar.Rail />\n</Sidebar.Root>",
|
|
178
|
+
"language": "tsx"
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"status": "todo-docs",
|
|
182
|
+
"url": "/docs/components/sidebar",
|
|
183
|
+
"mdUrl": "/docs/components/sidebar.md",
|
|
184
|
+
"jsonUrl": "/r/components/sidebar.json",
|
|
185
|
+
"specimens": [
|
|
186
|
+
{
|
|
187
|
+
"title": "Sidebar",
|
|
188
|
+
"group": "layout",
|
|
189
|
+
"components": [
|
|
190
|
+
"Sidebar"
|
|
191
|
+
],
|
|
192
|
+
"code": "<div className=\"flex h-[14rem] w-full max-w-[36rem] overflow-hidden rounded-(--radius-surface) border border-border\">\n <Sidebar.Root aria-label=\"Console sections\">\n <Sidebar.Section label=\"Console\">\n <Sidebar.Item icon={Sliders} active>\n Patch\n </Sidebar.Item>\n <Sidebar.Item icon={List} badge={<Chip tone=\"accent\">12</Chip>}>\n Cues\n </Sidebar.Item>\n <Sidebar.Item icon={Settings}>Setup</Sidebar.Item>\n </Sidebar.Section>\n <Sidebar.Rail />\n </Sidebar.Root>\n <div className=\"flex-1 p-(--cue-space-5) font-mono text-(length:--cue-text-ui) text-fg-muted\">\n Content beside the column.\n </div>\n</div>",
|
|
193
|
+
"note": "Sections of items and a 4px rail that collapses the column to icons. The label goes `sr-only` while collapsed rather than being unmounted, because an icon-only button with no name is a WCAG 4.1.2 failure.",
|
|
194
|
+
"interaction": "the rail is invisible until hovered, and is a real button with an `aria-expanded` state."
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
"todo": true
|
|
198
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "SignalEdge",
|
|
3
|
+
"slug": "signal-edge",
|
|
4
|
+
"group": "flow",
|
|
5
|
+
"importPath": "@cueplusplus/ui/flow",
|
|
6
|
+
"peerDependencies": [
|
|
7
|
+
"@xyflow/react"
|
|
8
|
+
],
|
|
9
|
+
"clientOnly": false,
|
|
10
|
+
"description": "A wire between two nodes, drawn as three paths.\n\n1. **The wire.** A bezier in the tone's colour, thin and half-lit at rest.\n2. **The hit path.** Sixteen invisible pixels of it, because nobody can click\n 1.6px. `BaseEdge` draws this one, and the edge label, for free.\n3. **The pulse.** Only while `data.live` — a pale dashed overlay of the same\n colour, marching along the wire. This is the only animation in the group,\n it carries no information the opacity does not, and `flow.css` stops it\n dead under `prefers-reduced-motion`.\n\nState is read from props rather than from a store on purpose: an edge that\nsubscribed to \"is this route live\" would re-render on every frame of a 40Hz\ntelemetry feed, times the number of edges. The host decides when the answer\nchanged; this component only draws it. It also means the component is a pure\nfunction of its props — no hooks, no context, no canvas needed to test it.\n\nSelection outranks everything, including the pulse: two loud treatments on one\nwire read as neither.",
|
|
11
|
+
"props": [],
|
|
12
|
+
"typeReferences": [
|
|
13
|
+
"EdgeProps<SignalEdgeType>"
|
|
14
|
+
],
|
|
15
|
+
"subcomponents": [],
|
|
16
|
+
"parts": [],
|
|
17
|
+
"variants": {},
|
|
18
|
+
"defaultVariants": {},
|
|
19
|
+
"tokensUsed": [
|
|
20
|
+
"--cue-accent",
|
|
21
|
+
"--cue-busy",
|
|
22
|
+
"--cue-danger",
|
|
23
|
+
"--cue-fg",
|
|
24
|
+
"--cue-fg-subtle",
|
|
25
|
+
"--cue-info",
|
|
26
|
+
"--cue-ok",
|
|
27
|
+
"--cue-warn"
|
|
28
|
+
],
|
|
29
|
+
"summary": "A wire between two nodes, drawn as three paths.",
|
|
30
|
+
"examples": [
|
|
31
|
+
{
|
|
32
|
+
"title": "Usage",
|
|
33
|
+
"code": "const edges = [{ id: \"r1\", source: \"s1\", target: \"m1\", type: \"signal\", data: { live: true } }];\n<ReactFlow edges={edges} edgeTypes={theme.edgeTypes} />",
|
|
34
|
+
"language": "tsx"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"status": "todo-docs",
|
|
38
|
+
"url": "/docs/components/signal-edge",
|
|
39
|
+
"mdUrl": "/docs/components/signal-edge.md",
|
|
40
|
+
"jsonUrl": "/r/components/signal-edge.json",
|
|
41
|
+
"specimens": [
|
|
42
|
+
{
|
|
43
|
+
"title": "useFlowTheme / FlowControls / FlowBackground / SignalEdge",
|
|
44
|
+
"group": "flow",
|
|
45
|
+
"components": [
|
|
46
|
+
"FlowControls",
|
|
47
|
+
"FlowBackground",
|
|
48
|
+
"SignalEdge"
|
|
49
|
+
],
|
|
50
|
+
"code": "<div className=\"h-[24rem] w-full overflow-hidden rounded-(--radius-surface) border border-border\">\n <ReactFlow\n nodes={NODES}\n edges={EDGES}\n nodeTypes={NODE_TYPES}\n edgeTypes={theme.edgeTypes}\n defaultEdgeOptions={theme.defaultEdgeOptions}\n colorMode={theme.colorMode}\n style={theme.style}\n fitView\n proOptions={{ hideAttribution: true }}\n >\n <FlowBackground />\n <FlowControls />\n </ReactFlow>\n</div>",
|
|
51
|
+
"note": "The hook returns the `--xy-*` token map plus stable `edgeTypes` and `defaultEdgeOptions` identities. Every part also publishes the map on its own root, so the group is correct before flow.css is imported and correct again after.",
|
|
52
|
+
"interaction": "the controls capsule is an overlay surface; a live wire animates its dash overlay and stops under prefers-reduced-motion."
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"todo": true
|
|
56
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Skeleton",
|
|
3
|
+
"slug": "skeleton",
|
|
4
|
+
"group": "primitives",
|
|
5
|
+
"importPath": "@cueplusplus/ui",
|
|
6
|
+
"peerDependencies": [],
|
|
7
|
+
"clientOnly": false,
|
|
8
|
+
"description": "A loading placeholder block.\n\nCarries no intrinsic size — give it one with `className` (`h-4 w-24`) so the\nskeleton matches the shape of whatever is arriving. `aria-hidden` by default:\na screen reader should hear the surrounding live region say \"loading\", not a\nfleet of empty boxes. The pulse stills under `prefers-reduced-motion`.\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-radius-control",
|
|
19
|
+
"--cue-surface-2"
|
|
20
|
+
],
|
|
21
|
+
"summary": "A loading placeholder block.",
|
|
22
|
+
"examples": [
|
|
23
|
+
{
|
|
24
|
+
"title": "Usage",
|
|
25
|
+
"code": "<Skeleton className=\"h-4 w-32\" />",
|
|
26
|
+
"language": "tsx"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"status": "todo-docs",
|
|
30
|
+
"url": "/docs/components/skeleton",
|
|
31
|
+
"mdUrl": "/docs/components/skeleton.md",
|
|
32
|
+
"jsonUrl": "/r/components/skeleton.json",
|
|
33
|
+
"specimens": [
|
|
34
|
+
{
|
|
35
|
+
"title": "Skeleton",
|
|
36
|
+
"group": "primitives",
|
|
37
|
+
"components": [
|
|
38
|
+
"Skeleton"
|
|
39
|
+
],
|
|
40
|
+
"code": "<div className=\"flex w-full max-w-[28rem] flex-col gap-(--cue-space-3)\">\n <Skeleton className=\"h-4 w-[12rem]\" />\n <Skeleton className=\"h-4 w-[20rem]\" />\n <Skeleton className=\"h-4 w-[16rem]\" />\n <div className=\"flex items-center gap-(--cue-space-3)\">\n <Skeleton className=\"size-8 rounded-full\" />\n <Skeleton className=\"h-4 flex-1\" />\n <Chip tone=\"busy\" variant=\"outline\">\n <Copy aria-hidden=\"true\" className=\"size-icon-sm\" /> loading\n </Chip>\n </div>\n</div>",
|
|
41
|
+
"note": "The shape of content that has not arrived. Sized by the caller, because only the caller knows the shape.",
|
|
42
|
+
"interaction": "the shimmer stills under prefers-reduced-motion."
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"todo": true
|
|
46
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Slider",
|
|
3
|
+
"slug": "slider",
|
|
4
|
+
"group": "forms",
|
|
5
|
+
"importPath": "@cueplusplus/ui",
|
|
6
|
+
"peerDependencies": [],
|
|
7
|
+
"clientOnly": true,
|
|
8
|
+
"description": "A continuous value control: one thumb, or several for a range.\n\nDrawn as a 2px rail rather than the chunky default — at console density a\nslider is a readout first and a grab target second, and the thumb supplies the\naffordance. The filled portion uses the theme accent so the slider agrees with\nevery other \"this much\" indicator on screen.\n\nThe important part of the API is {@link SliderProps.onCommit}: the\nchange/commit split is what lets a host app coalesce a whole drag into one\nundo entry instead of hundreds.",
|
|
9
|
+
"props": [
|
|
10
|
+
{
|
|
11
|
+
"name": "label",
|
|
12
|
+
"type": "ReactNode",
|
|
13
|
+
"required": false,
|
|
14
|
+
"defaultValue": null,
|
|
15
|
+
"description": "Visible label above the track."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "className",
|
|
19
|
+
"type": "string",
|
|
20
|
+
"required": false,
|
|
21
|
+
"defaultValue": null,
|
|
22
|
+
"description": "Extra classes, merged over the root defaults."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "aria-label",
|
|
26
|
+
"type": "string",
|
|
27
|
+
"required": false,
|
|
28
|
+
"defaultValue": null,
|
|
29
|
+
"description": "Accessible name for the thumb. With several thumbs each is suffixed with its\n1-based index, so a range slider announces \"Window 1\" and \"Window 2\"."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "onCommit",
|
|
33
|
+
"type": "((value: number | number[]) => void)",
|
|
34
|
+
"required": false,
|
|
35
|
+
"defaultValue": null,
|
|
36
|
+
"description": "Fired once when a gesture *ends*: pointer-up after a drag, key-up after a\nstep, or a track press. `onValueChange` fires on every intermediate value —\na drag emits dozens — so an undo stack, a network write or a persisted\nsetting must hang off this, not off `onValueChange`, or it will record every\nframe of the drag as a separate edit."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "showValue",
|
|
40
|
+
"type": "boolean",
|
|
41
|
+
"required": false,
|
|
42
|
+
"defaultValue": "false",
|
|
43
|
+
"description": "Show the live formatted value opposite the label."
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"typeReferences": [
|
|
47
|
+
"Omit<BaseSlider.Root.Props, \"className\" | \"onValueCommitted\">"
|
|
48
|
+
],
|
|
49
|
+
"subcomponents": [],
|
|
50
|
+
"parts": [],
|
|
51
|
+
"variants": {},
|
|
52
|
+
"defaultVariants": {},
|
|
53
|
+
"tokensUsed": [
|
|
54
|
+
"--cue-accent",
|
|
55
|
+
"--cue-border",
|
|
56
|
+
"--cue-control-sm",
|
|
57
|
+
"--cue-fg",
|
|
58
|
+
"--cue-fg-muted",
|
|
59
|
+
"--cue-font-mono",
|
|
60
|
+
"--cue-space-2",
|
|
61
|
+
"--cue-space-3",
|
|
62
|
+
"--cue-text-label"
|
|
63
|
+
],
|
|
64
|
+
"summary": "A continuous value control: one thumb, or several for a range.",
|
|
65
|
+
"examples": [
|
|
66
|
+
{
|
|
67
|
+
"title": "Usage",
|
|
68
|
+
"code": "<Slider aria-label=\"Intensity\" value={level} onValueChange={setLevel} onCommit={pushUndo} />\n<Slider label=\"Window\" showValue defaultValue={[20, 60]} />",
|
|
69
|
+
"language": "tsx"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"status": "todo-docs",
|
|
73
|
+
"url": "/docs/components/slider",
|
|
74
|
+
"mdUrl": "/docs/components/slider.md",
|
|
75
|
+
"jsonUrl": "/r/components/slider.json",
|
|
76
|
+
"specimens": [
|
|
77
|
+
{
|
|
78
|
+
"title": "Slider / RangeSlider",
|
|
79
|
+
"group": "forms",
|
|
80
|
+
"components": [
|
|
81
|
+
"Slider"
|
|
82
|
+
],
|
|
83
|
+
"code": "<div className=\"grid w-full gap-(--cue-space-6) lg:grid-cols-2\">\n <Slider aria-label=\"Master level\" defaultValue={62} label=\"Master\" showValue />\n <Slider\n aria-label=\"Level window\"\n defaultValue={[20, 80]}\n label=\"Level window\"\n showValue\n />\n <Slider aria-label=\"Locked level\" defaultValue={40} label=\"Locked\" disabled showValue />\n <Slider aria-label=\"Stepped level\" defaultValue={50} step={10} label=\"Steps of 10\" showValue />\n</div>",
|
|
84
|
+
"note": "One thumb or two. `onCommit` fires once at the end of a drag, which is the undo-coalescing contract the consoles need.",
|
|
85
|
+
"interaction": "the thumb grows while dragging; arrow keys step, Page Up and Page Down jump."
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"todo": true
|
|
89
|
+
}
|