@cueplusplus/ui 0.1.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/dist/charts/_token.js +39 -0
- package/dist/charts/container.d.ts +58 -0
- package/dist/charts/container.js +77 -0
- package/dist/charts/index.d.ts +5 -0
- package/dist/charts/index.js +5 -0
- package/dist/charts/ramps.d.ts +140 -0
- package/dist/charts/ramps.js +615 -0
- package/dist/charts/theme.d.ts +112 -0
- package/dist/charts/theme.js +165 -0
- package/dist/charts/tones.d.ts +111 -0
- package/dist/charts/tones.js +127 -0
- package/dist/chat/_glyphs.js +55 -0
- package/dist/chat/agent-color.d.ts +84 -0
- package/dist/chat/agent-color.js +101 -0
- package/dist/chat/agent-pile.d.ts +55 -0
- package/dist/chat/agent-pile.js +121 -0
- package/dist/chat/ask-box.d.ts +88 -0
- package/dist/chat/ask-box.js +341 -0
- package/dist/chat/composer.d.ts +66 -0
- package/dist/chat/composer.js +144 -0
- package/dist/chat/delegation-card.d.ts +60 -0
- package/dist/chat/delegation-card.js +129 -0
- package/dist/chat/index.d.ts +8 -0
- package/dist/chat/index.js +8 -0
- package/dist/chat/message-list.d.ts +39 -0
- package/dist/chat/message-list.js +105 -0
- package/dist/chat/message.d.ts +47 -0
- package/dist/chat/message.js +108 -0
- package/dist/chrome/_glyphs.js +101 -0
- package/dist/chrome/_tabs-scroll.d.ts +62 -0
- package/dist/chrome/_tabs-scroll.js +68 -0
- package/dist/chrome/_tree.d.ts +75 -0
- package/dist/chrome/_tree.js +49 -0
- package/dist/chrome/empty-state.d.ts +37 -0
- package/dist/chrome/empty-state.js +57 -0
- package/dist/chrome/eyebrow.d.ts +29 -0
- package/dist/chrome/eyebrow.js +36 -0
- package/dist/chrome/index.d.ts +17 -0
- package/dist/chrome/index.js +17 -0
- package/dist/chrome/navigation-menu.d.ts +80 -0
- package/dist/chrome/navigation-menu.js +121 -0
- package/dist/chrome/page-shell.d.ts +38 -0
- package/dist/chrome/page-shell.js +66 -0
- package/dist/chrome/panel.d.ts +55 -0
- package/dist/chrome/panel.js +67 -0
- package/dist/chrome/row.d.ts +82 -0
- package/dist/chrome/row.js +106 -0
- package/dist/chrome/scroll-area.d.ts +39 -0
- package/dist/chrome/scroll-area.js +70 -0
- package/dist/chrome/section-header.d.ts +42 -0
- package/dist/chrome/section-header.js +79 -0
- package/dist/chrome/segmented-control.d.ts +58 -0
- package/dist/chrome/segmented-control.js +76 -0
- package/dist/chrome/status-bar.d.ts +46 -0
- package/dist/chrome/status-bar.js +56 -0
- package/dist/chrome/tabs.d.ts +80 -0
- package/dist/chrome/tabs.js +176 -0
- package/dist/chrome/title-bar.d.ts +37 -0
- package/dist/chrome/title-bar.js +45 -0
- package/dist/chrome/toolbar.d.ts +46 -0
- package/dist/chrome/toolbar.js +62 -0
- package/dist/chrome/tree.d.ts +98 -0
- package/dist/chrome/tree.js +248 -0
- package/dist/color/_checker.js +14 -0
- package/dist/color/_convert.d.ts +52 -0
- package/dist/color/_convert.js +66 -0
- package/dist/color/_glyphs.js +28 -0
- package/dist/color/_thumb.js +15 -0
- package/dist/color/_value.js +28 -0
- package/dist/color/color-area.d.ts +27 -0
- package/dist/color/color-area.js +40 -0
- package/dist/color/color-field.d.ts +32 -0
- package/dist/color/color-field.js +43 -0
- package/dist/color/color-picker.d.ts +71 -0
- package/dist/color/color-picker.js +178 -0
- package/dist/color/color-slider.d.ts +31 -0
- package/dist/color/color-slider.js +51 -0
- package/dist/color/color-swatch.d.ts +32 -0
- package/dist/color/color-swatch.js +44 -0
- package/dist/color/index.d.ts +7 -0
- package/dist/color/index.js +7 -0
- package/dist/configurator/_export.d.ts +78 -0
- package/dist/configurator/_export.js +261 -0
- package/dist/configurator/_glyphs.js +92 -0
- package/dist/configurator/_overrides.d.ts +247 -0
- package/dist/configurator/_overrides.js +514 -0
- package/dist/configurator/configurator.d.ts +71 -0
- package/dist/configurator/configurator.js +279 -0
- package/dist/configurator/export-dialog.d.ts +30 -0
- package/dist/configurator/export-dialog.js +121 -0
- package/dist/configurator/index.d.ts +8 -0
- package/dist/configurator/index.js +8 -0
- package/dist/configurator/panel-sections.d.ts +86 -0
- package/dist/configurator/panel-sections.js +316 -0
- package/dist/configurator/token-editor.d.ts +74 -0
- package/dist/configurator/token-editor.js +149 -0
- package/dist/configurator/use-zoom.d.ts +87 -0
- package/dist/configurator/use-zoom.js +113 -0
- package/dist/date/_glyphs.js +34 -0
- package/dist/date/_segments.js +55 -0
- package/dist/date/_trigger.js +31 -0
- package/dist/date/calendar.d.ts +25 -0
- package/dist/date/calendar.js +125 -0
- package/dist/date/date-field.d.ts +34 -0
- package/dist/date/date-field.js +41 -0
- package/dist/date/date-picker.d.ts +69 -0
- package/dist/date/date-picker.js +89 -0
- package/dist/date/date-range-picker.d.ts +65 -0
- package/dist/date/date-range-picker.js +92 -0
- package/dist/date/index.d.ts +6 -0
- package/dist/date/index.js +6 -0
- package/dist/date/time-field.d.ts +29 -0
- package/dist/date/time-field.js +36 -0
- package/dist/dmx/_ramp.d.ts +77 -0
- package/dist/dmx/_ramp.js +169 -0
- package/dist/dmx/_readout.js +53 -0
- package/dist/dmx/_universe.d.ts +105 -0
- package/dist/dmx/_universe.js +112 -0
- package/dist/dmx/channel-matrix.d.ts +81 -0
- package/dist/dmx/channel-matrix.js +285 -0
- package/dist/dmx/dmx-bar.d.ts +50 -0
- package/dist/dmx/dmx-bar.js +107 -0
- package/dist/dmx/dmx-strip.d.ts +41 -0
- package/dist/dmx/dmx-strip.js +196 -0
- package/dist/dmx/index.d.ts +7 -0
- package/dist/dmx/index.js +7 -0
- package/dist/dmx/universe-grid.d.ts +61 -0
- package/dist/dmx/universe-grid.js +182 -0
- package/dist/flow/_frame.d.ts +52 -0
- package/dist/flow/_frame.js +38 -0
- package/dist/flow/controls.d.ts +41 -0
- package/dist/flow/controls.js +53 -0
- package/dist/flow/flow.css +121 -0
- package/dist/flow/handles.d.ts +40 -0
- package/dist/flow/handles.js +61 -0
- package/dist/flow/index.d.ts +7 -0
- package/dist/flow/index.js +7 -0
- package/dist/flow/node-card.d.ts +71 -0
- package/dist/flow/node-card.js +102 -0
- package/dist/flow/signal-edge.d.ts +60 -0
- package/dist/flow/signal-edge.js +108 -0
- package/dist/flow/use-flow-theme.d.ts +69 -0
- package/dist/flow/use-flow-theme.js +109 -0
- package/dist/forms/_chassis.d.ts +64 -0
- package/dist/forms/_chassis.js +59 -0
- package/dist/forms/_glyphs.js +143 -0
- package/dist/forms/_listbox.js +55 -0
- package/dist/forms/autocomplete.d.ts +61 -0
- package/dist/forms/autocomplete.js +88 -0
- package/dist/forms/button-group.d.ts +47 -0
- package/dist/forms/button-group.js +52 -0
- package/dist/forms/checkbox.d.ts +51 -0
- package/dist/forms/checkbox.js +98 -0
- package/dist/forms/combobox.d.ts +73 -0
- package/dist/forms/combobox.js +108 -0
- package/dist/forms/env-var-input.d.ts +74 -0
- package/dist/forms/env-var-input.js +116 -0
- package/dist/forms/field.d.ts +89 -0
- package/dist/forms/field.js +102 -0
- package/dist/forms/file-upload.d.ts +113 -0
- package/dist/forms/file-upload.js +232 -0
- package/dist/forms/index.d.ts +26 -0
- package/dist/forms/index.js +26 -0
- package/dist/forms/input-group.d.ts +31 -0
- package/dist/forms/input-group.js +54 -0
- package/dist/forms/input.d.ts +33 -0
- package/dist/forms/input.js +36 -0
- package/dist/forms/multi-select.d.ts +62 -0
- package/dist/forms/multi-select.js +107 -0
- package/dist/forms/number-field.d.ts +38 -0
- package/dist/forms/number-field.js +64 -0
- package/dist/forms/otp-field.d.ts +54 -0
- package/dist/forms/otp-field.js +59 -0
- package/dist/forms/password-input.d.ts +46 -0
- package/dist/forms/password-input.js +62 -0
- package/dist/forms/radio-group.d.ts +50 -0
- package/dist/forms/radio-group.js +64 -0
- package/dist/forms/rating.d.ts +69 -0
- package/dist/forms/rating.js +103 -0
- package/dist/forms/scrub-input.d.ts +81 -0
- package/dist/forms/scrub-input.js +249 -0
- package/dist/forms/search-input.d.ts +54 -0
- package/dist/forms/search-input.js +112 -0
- package/dist/forms/select.d.ts +75 -0
- package/dist/forms/select.js +91 -0
- package/dist/forms/slider.d.ts +44 -0
- package/dist/forms/slider.js +65 -0
- package/dist/forms/switch.d.ts +36 -0
- package/dist/forms/switch.js +71 -0
- package/dist/forms/tags-input.d.ts +69 -0
- package/dist/forms/tags-input.js +148 -0
- package/dist/forms/textarea.d.ts +27 -0
- package/dist/forms/textarea.js +37 -0
- package/dist/forms/toggle-group.d.ts +41 -0
- package/dist/forms/toggle-group.js +56 -0
- package/dist/forms/toggle.d.ts +41 -0
- package/dist/forms/toggle.js +100 -0
- package/dist/index.d.ts +112 -0
- package/dist/index.js +104 -0
- package/dist/instruments/_ansi.js +116 -0
- package/dist/instruments/_glyphs.js +90 -0
- package/dist/instruments/_motion.js +56 -0
- package/dist/instruments/_rem.js +21 -0
- package/dist/instruments/app-window-frame.d.ts +48 -0
- package/dist/instruments/app-window-frame.js +76 -0
- package/dist/instruments/copy-button.d.ts +41 -0
- package/dist/instruments/copy-button.js +112 -0
- package/dist/instruments/data-table.d.ts +168 -0
- package/dist/instruments/data-table.js +212 -0
- package/dist/instruments/group-bar.d.ts +63 -0
- package/dist/instruments/group-bar.js +122 -0
- package/dist/instruments/index.d.ts +13 -0
- package/dist/instruments/index.js +13 -0
- package/dist/instruments/log-viewer.d.ts +74 -0
- package/dist/instruments/log-viewer.js +215 -0
- package/dist/instruments/meter.d.ts +77 -0
- package/dist/instruments/meter.js +96 -0
- package/dist/instruments/progress.d.ts +45 -0
- package/dist/instruments/progress.js +61 -0
- package/dist/instruments/seam-grid.d.ts +66 -0
- package/dist/instruments/seam-grid.js +78 -0
- package/dist/instruments/sparkline.d.ts +39 -0
- package/dist/instruments/sparkline.js +85 -0
- package/dist/instruments/stat.d.ts +35 -0
- package/dist/instruments/stat.js +59 -0
- package/dist/instruments/table.d.ts +51 -0
- package/dist/instruments/table.js +92 -0
- package/dist/instruments/terminal-frame.d.ts +89 -0
- package/dist/instruments/terminal-frame.js +256 -0
- package/dist/instruments/two-step-button.d.ts +47 -0
- package/dist/instruments/two-step-button.js +147 -0
- package/dist/instruments/usage-chart.d.ts +55 -0
- package/dist/instruments/usage-chart.js +235 -0
- package/dist/layout/_collapse.js +46 -0
- package/dist/layout/_glyphs.js +45 -0
- package/dist/layout/accordion.d.ts +52 -0
- package/dist/layout/accordion.js +81 -0
- package/dist/layout/breadcrumb.d.ts +35 -0
- package/dist/layout/breadcrumb.js +67 -0
- package/dist/layout/card.d.ts +51 -0
- package/dist/layout/card.js +76 -0
- package/dist/layout/carousel.d.ts +96 -0
- package/dist/layout/carousel.js +211 -0
- package/dist/layout/collapsible.d.ts +74 -0
- package/dist/layout/collapsible.js +126 -0
- package/dist/layout/container.d.ts +27 -0
- package/dist/layout/container.js +40 -0
- package/dist/layout/description-list.d.ts +24 -0
- package/dist/layout/description-list.js +37 -0
- package/dist/layout/grid.d.ts +40 -0
- package/dist/layout/grid.js +48 -0
- package/dist/layout/index.d.ts +15 -0
- package/dist/layout/index.js +15 -0
- package/dist/layout/item.d.ts +65 -0
- package/dist/layout/item.js +100 -0
- package/dist/layout/link.d.ts +48 -0
- package/dist/layout/link.js +63 -0
- package/dist/layout/pagination.d.ts +54 -0
- package/dist/layout/pagination.js +121 -0
- package/dist/layout/resizable.d.ts +38 -0
- package/dist/layout/resizable.js +68 -0
- package/dist/layout/sidebar.d.ts +67 -0
- package/dist/layout/sidebar.js +129 -0
- package/dist/layout/stack.d.ts +46 -0
- package/dist/layout/stack.js +62 -0
- package/dist/layout/stepper.d.ts +49 -0
- package/dist/layout/stepper.js +81 -0
- package/dist/layout/timeline.d.ts +43 -0
- package/dist/layout/timeline.js +63 -0
- package/dist/lib/aria-class.js +24 -0
- package/dist/lib/cn.js +18 -0
- package/dist/lib/compose.js +38 -0
- package/dist/lib/cva.d.ts +18 -0
- package/dist/lib/cva.js +65 -0
- package/dist/midi/_notes.d.ts +101 -0
- package/dist/midi/_notes.js +183 -0
- package/dist/midi/_ruler.d.ts +100 -0
- package/dist/midi/_ruler.js +105 -0
- package/dist/midi/_time.d.ts +107 -0
- package/dist/midi/_time.js +130 -0
- package/dist/midi/index.d.ts +9 -0
- package/dist/midi/index.js +9 -0
- package/dist/midi/musical-time-input.d.ts +48 -0
- package/dist/midi/musical-time-input.js +154 -0
- package/dist/midi/piano-keyboard.d.ts +50 -0
- package/dist/midi/piano-keyboard.js +193 -0
- package/dist/midi/spectrum-visualizer.d.ts +65 -0
- package/dist/midi/spectrum-visualizer.js +213 -0
- package/dist/midi/threshold-rail.d.ts +72 -0
- package/dist/midi/threshold-rail.js +214 -0
- package/dist/midi/timeline-ruler.d.ts +83 -0
- package/dist/midi/timeline-ruler.js +152 -0
- package/dist/overlays/_debounce.js +34 -0
- package/dist/overlays/_glyphs.js +59 -0
- package/dist/overlays/_surface.d.ts +70 -0
- package/dist/overlays/_surface.js +70 -0
- package/dist/overlays/_wheel.js +42 -0
- package/dist/overlays/alert-dialog.d.ts +67 -0
- package/dist/overlays/alert-dialog.js +117 -0
- package/dist/overlays/command-palette.d.ts +93 -0
- package/dist/overlays/command-palette.js +193 -0
- package/dist/overlays/context-menu.d.ts +64 -0
- package/dist/overlays/context-menu.js +78 -0
- package/dist/overlays/dialog.d.ts +72 -0
- package/dist/overlays/dialog.js +124 -0
- package/dist/overlays/drawer.d.ts +75 -0
- package/dist/overlays/drawer.js +151 -0
- package/dist/overlays/dropdown-menu.d.ts +79 -0
- package/dist/overlays/dropdown-menu.js +156 -0
- package/dist/overlays/hover-card.d.ts +58 -0
- package/dist/overlays/hover-card.js +91 -0
- package/dist/overlays/index.d.ts +15 -0
- package/dist/overlays/index.js +15 -0
- package/dist/overlays/info-tip.d.ts +41 -0
- package/dist/overlays/info-tip.js +45 -0
- package/dist/overlays/menubar.d.ts +72 -0
- package/dist/overlays/menubar.js +100 -0
- package/dist/overlays/popover.d.ts +66 -0
- package/dist/overlays/popover.js +114 -0
- package/dist/overlays/sheet.d.ts +78 -0
- package/dist/overlays/sheet.js +131 -0
- package/dist/overlays/toast.d.ts +106 -0
- package/dist/overlays/toast.js +146 -0
- package/dist/overlays/tooltip.d.ts +57 -0
- package/dist/overlays/tooltip.js +95 -0
- package/dist/primitives/avatar.d.ts +51 -0
- package/dist/primitives/avatar.js +93 -0
- package/dist/primitives/button.d.ts +46 -0
- package/dist/primitives/button.js +94 -0
- package/dist/primitives/chip.d.ts +47 -0
- package/dist/primitives/chip.js +152 -0
- package/dist/primitives/icon-button.d.ts +41 -0
- package/dist/primitives/icon-button.js +59 -0
- package/dist/primitives/index.d.ts +10 -0
- package/dist/primitives/index.js +10 -0
- package/dist/primitives/kbd.d.ts +17 -0
- package/dist/primitives/kbd.js +24 -0
- package/dist/primitives/separator.d.ts +25 -0
- package/dist/primitives/separator.js +30 -0
- package/dist/primitives/skeleton.d.ts +20 -0
- package/dist/primitives/skeleton.js +27 -0
- package/dist/primitives/spinner.d.ts +26 -0
- package/dist/primitives/spinner.js +31 -0
- package/dist/primitives/status-dot.d.ts +44 -0
- package/dist/primitives/status-dot.js +50 -0
- package/dist/styles.css +19 -0
- package/dist/system/density.d.ts +33 -0
- package/dist/system/density.js +49 -0
- package/dist/system/index.d.ts +8 -0
- package/dist/system/index.js +7 -0
- package/dist/system/portal.d.ts +51 -0
- package/dist/system/portal.js +122 -0
- package/dist/system/prepaint.d.ts +38 -0
- package/dist/system/prepaint.js +37 -0
- package/dist/system/theme-provider.d.ts +72 -0
- package/dist/system/theme-provider.js +252 -0
- package/dist/system/use-density.d.ts +33 -0
- package/dist/system/use-density.js +84 -0
- package/dist/system/use-isomorphic-layout-effect.js +15 -0
- package/dist/system/use-theme.d.ts +19 -0
- package/dist/system/use-theme.js +25 -0
- package/dist/theming/_presets.d.ts +11 -0
- package/dist/theming/_presets.js +487 -0
- package/dist/theming/contrast.d.ts +110 -0
- package/dist/theming/contrast.js +167 -0
- package/dist/theming/create-theme.d.ts +165 -0
- package/dist/theming/create-theme.js +442 -0
- package/dist/theming/index.d.ts +5 -0
- package/dist/theming/index.js +5 -0
- package/dist/theming/serialize.d.ts +145 -0
- package/dist/theming/serialize.js +165 -0
- package/package.json +216 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
//#region src/chrome/_glyphs.tsx
|
|
4
|
+
/**
|
|
5
|
+
* Shared chrome glyphs.
|
|
6
|
+
*
|
|
7
|
+
* Drawn inline rather than pulled from `lucide-react` for the same reason as
|
|
8
|
+
* `overlays/_glyphs.tsx`: a disclosure triangle and a pair of chevrons should
|
|
9
|
+
* not put an icon dependency on the render path of every collapsible section,
|
|
10
|
+
* and hand-set strokes stay hairline-thin at the 8–12px sizes console density
|
|
11
|
+
* asks for. `currentColor` everywhere — the tone comes from the parent.
|
|
12
|
+
*
|
|
13
|
+
* @internal Not part of the public API.
|
|
14
|
+
*/
|
|
15
|
+
/** A right-pointing chevron. Rotate it 90° to point down. */
|
|
16
|
+
function ChevronRightGlyph(props) {
|
|
17
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
18
|
+
viewBox: "0 0 16 16",
|
|
19
|
+
fill: "none",
|
|
20
|
+
stroke: "currentColor",
|
|
21
|
+
strokeWidth: "2",
|
|
22
|
+
strokeLinecap: "round",
|
|
23
|
+
strokeLinejoin: "round",
|
|
24
|
+
"aria-hidden": "true",
|
|
25
|
+
...props,
|
|
26
|
+
children: /* @__PURE__ */ jsx("path", { d: "m6 3 5 5-5 5" })
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/** A left-pointing chevron. */
|
|
30
|
+
function ChevronLeftGlyph(props) {
|
|
31
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
32
|
+
viewBox: "0 0 16 16",
|
|
33
|
+
fill: "none",
|
|
34
|
+
stroke: "currentColor",
|
|
35
|
+
strokeWidth: "2",
|
|
36
|
+
strokeLinecap: "round",
|
|
37
|
+
strokeLinejoin: "round",
|
|
38
|
+
"aria-hidden": "true",
|
|
39
|
+
...props,
|
|
40
|
+
children: /* @__PURE__ */ jsx("path", { d: "m10 3-5 5 5 5" })
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/** A solid down caret — the "this opens a panel" mark on a navigation trigger. */
|
|
44
|
+
function CaretDownGlyph(props) {
|
|
45
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
46
|
+
viewBox: "0 0 16 16",
|
|
47
|
+
fill: "currentColor",
|
|
48
|
+
"aria-hidden": "true",
|
|
49
|
+
...props,
|
|
50
|
+
children: /* @__PURE__ */ jsx("path", { d: "M11.5 6.5h-7L8 11z" })
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/** An open eye: the node is drawn normally. */
|
|
54
|
+
function EyeGlyph(props) {
|
|
55
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
56
|
+
viewBox: "0 0 16 16",
|
|
57
|
+
fill: "none",
|
|
58
|
+
stroke: "currentColor",
|
|
59
|
+
strokeWidth: "1.5",
|
|
60
|
+
strokeLinecap: "round",
|
|
61
|
+
strokeLinejoin: "round",
|
|
62
|
+
"aria-hidden": "true",
|
|
63
|
+
...props,
|
|
64
|
+
children: [/* @__PURE__ */ jsx("path", { d: "M1.5 8S4 3.5 8 3.5 14.5 8 14.5 8 12 12.5 8 12.5 1.5 8 1.5 8Z" }), /* @__PURE__ */ jsx("circle", {
|
|
65
|
+
cx: "8",
|
|
66
|
+
cy: "8",
|
|
67
|
+
r: "2"
|
|
68
|
+
})]
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/** A dashed outline: the node is drawn, but ghosted and out of the way. */
|
|
72
|
+
function GhostGlyph(props) {
|
|
73
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
74
|
+
viewBox: "0 0 16 16",
|
|
75
|
+
fill: "none",
|
|
76
|
+
stroke: "currentColor",
|
|
77
|
+
strokeWidth: "1.5",
|
|
78
|
+
strokeLinecap: "round",
|
|
79
|
+
strokeLinejoin: "round",
|
|
80
|
+
strokeDasharray: "2 2",
|
|
81
|
+
"aria-hidden": "true",
|
|
82
|
+
...props,
|
|
83
|
+
children: /* @__PURE__ */ jsx("path", { d: "M4 13V6.5a4 4 0 0 1 8 0V13l-2-1.25L8 13l-2-1.25z" })
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/** The eye with a stroke through it: the node is not drawn at all. */
|
|
87
|
+
function EyeOffGlyph(props) {
|
|
88
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
89
|
+
viewBox: "0 0 16 16",
|
|
90
|
+
fill: "none",
|
|
91
|
+
stroke: "currentColor",
|
|
92
|
+
strokeWidth: "1.5",
|
|
93
|
+
strokeLinecap: "round",
|
|
94
|
+
strokeLinejoin: "round",
|
|
95
|
+
"aria-hidden": "true",
|
|
96
|
+
...props,
|
|
97
|
+
children: [/* @__PURE__ */ jsx("path", { d: "M6.2 4A6.5 6.5 0 0 1 8 3.5C12 3.5 14.5 8 14.5 8a12 12 0 0 1-2.3 2.7M9.8 12a6.5 6.5 0 0 1-1.8.5C4 12.5 1.5 8 1.5 8A12 12 0 0 1 4.4 4.8" }), /* @__PURE__ */ jsx("path", { d: "m2.5 2.5 11 11" })]
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
//#endregion
|
|
101
|
+
export { CaretDownGlyph, ChevronLeftGlyph, ChevronRightGlyph, EyeGlyph, EyeOffGlyph, GhostGlyph };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
//#region src/chrome/_tabs-scroll.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Pure geometry for {@link ScrollableTabsList} (see `./tabs.tsx`).
|
|
4
|
+
*
|
|
5
|
+
* A separate module from the component on purpose. These are plain functions
|
|
6
|
+
* over numbers — testable without a DOM, reusable by anything else that needs a
|
|
7
|
+
* scroll-edge affordance — and keeping them out of the component file means the
|
|
8
|
+
* component file can stay `"use client"` while this one has no directive at
|
|
9
|
+
* all. (It is also what makes React Fast Refresh work on the component: a file
|
|
10
|
+
* that exports both a component and non-component values gets a full reload
|
|
11
|
+
* instead of a hot swap.)
|
|
12
|
+
*/
|
|
13
|
+
/** How far the fade reaches in from an overflowing edge, in px. */
|
|
14
|
+
declare const TAB_FADE_PX = 24;
|
|
15
|
+
/** Which edges of a horizontal scroller still hide content. */
|
|
16
|
+
interface ScrollEdges {
|
|
17
|
+
/** More content exists before the visible window (to the left in LTR). */
|
|
18
|
+
start: boolean;
|
|
19
|
+
/** More content exists after the visible window (to the right in LTR). */
|
|
20
|
+
end: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Work out which edges of a horizontal scroller still hide content.
|
|
24
|
+
*
|
|
25
|
+
* The 1px tolerances are load-bearing, not defensive padding: fractional layout
|
|
26
|
+
* widths leave `scrollLeft` a sub-pixel short of `scrollWidth - clientWidth` at
|
|
27
|
+
* a hard scroll end, so an exact comparison pins the end indicator ON forever
|
|
28
|
+
* with nothing left to reveal — at which point it means the opposite of what it
|
|
29
|
+
* says. The `max <= 1` guard is the same story for a strip that very nearly
|
|
30
|
+
* fits.
|
|
31
|
+
*
|
|
32
|
+
* @param scrollLeft The scroller's current horizontal offset.
|
|
33
|
+
* @param scrollWidth The full width of the scrolled content.
|
|
34
|
+
* @param clientWidth The width of the visible window.
|
|
35
|
+
* @returns Which edges still have content beyond them.
|
|
36
|
+
* @example
|
|
37
|
+
* computeScrollEdges(0, 600, 200); // { start: false, end: true }
|
|
38
|
+
*/
|
|
39
|
+
declare function computeScrollEdges(scrollLeft: number, scrollWidth: number, clientWidth: number): ScrollEdges;
|
|
40
|
+
/**
|
|
41
|
+
* A CSS mask that fades a strip's CONTENT out at its overflowing edges.
|
|
42
|
+
*
|
|
43
|
+
* Deliberately a mask rather than the usual gradient overlay. A tab strip sits
|
|
44
|
+
* on whatever surface the caller put it on — a panel, a toolbar, the page — so
|
|
45
|
+
* an overlay would have to re-create that background as an opaque colour and
|
|
46
|
+
* would drift the moment the theme changed. Masking fades the content itself
|
|
47
|
+
* and lets whatever is behind show through, so it matches by construction in
|
|
48
|
+
* all eight themes and both modes.
|
|
49
|
+
*
|
|
50
|
+
* This softens the cut; it is NOT the whole affordance. What sits at an
|
|
51
|
+
* overflowing edge is often the gap between two tabs, and fading empty space is
|
|
52
|
+
* invisible — hence the chevron buttons in the component.
|
|
53
|
+
*
|
|
54
|
+
* @param edges Which edges overflow, from {@link computeScrollEdges}.
|
|
55
|
+
* @param fadePx How far the fade reaches in. Defaults to {@link TAB_FADE_PX}.
|
|
56
|
+
* @returns A `linear-gradient(...)` value, or `undefined` when nothing
|
|
57
|
+
* overflows — no mask property at all, rather than a fully opaque one, so the
|
|
58
|
+
* common case creates no compositing layer.
|
|
59
|
+
*/
|
|
60
|
+
declare function edgeFadeMask(edges: ScrollEdges, fadePx?: number): string | undefined;
|
|
61
|
+
//#endregion
|
|
62
|
+
export { ScrollEdges, TAB_FADE_PX, computeScrollEdges, edgeFadeMask };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
//#region src/chrome/_tabs-scroll.ts
|
|
2
|
+
/**
|
|
3
|
+
* Pure geometry for {@link ScrollableTabsList} (see `./tabs.tsx`).
|
|
4
|
+
*
|
|
5
|
+
* A separate module from the component on purpose. These are plain functions
|
|
6
|
+
* over numbers — testable without a DOM, reusable by anything else that needs a
|
|
7
|
+
* scroll-edge affordance — and keeping them out of the component file means the
|
|
8
|
+
* component file can stay `"use client"` while this one has no directive at
|
|
9
|
+
* all. (It is also what makes React Fast Refresh work on the component: a file
|
|
10
|
+
* that exports both a component and non-component values gets a full reload
|
|
11
|
+
* instead of a hot swap.)
|
|
12
|
+
*/
|
|
13
|
+
/** How far the fade reaches in from an overflowing edge, in px. */
|
|
14
|
+
const TAB_FADE_PX = 24;
|
|
15
|
+
/**
|
|
16
|
+
* Work out which edges of a horizontal scroller still hide content.
|
|
17
|
+
*
|
|
18
|
+
* The 1px tolerances are load-bearing, not defensive padding: fractional layout
|
|
19
|
+
* widths leave `scrollLeft` a sub-pixel short of `scrollWidth - clientWidth` at
|
|
20
|
+
* a hard scroll end, so an exact comparison pins the end indicator ON forever
|
|
21
|
+
* with nothing left to reveal — at which point it means the opposite of what it
|
|
22
|
+
* says. The `max <= 1` guard is the same story for a strip that very nearly
|
|
23
|
+
* fits.
|
|
24
|
+
*
|
|
25
|
+
* @param scrollLeft The scroller's current horizontal offset.
|
|
26
|
+
* @param scrollWidth The full width of the scrolled content.
|
|
27
|
+
* @param clientWidth The width of the visible window.
|
|
28
|
+
* @returns Which edges still have content beyond them.
|
|
29
|
+
* @example
|
|
30
|
+
* computeScrollEdges(0, 600, 200); // { start: false, end: true }
|
|
31
|
+
*/
|
|
32
|
+
function computeScrollEdges(scrollLeft, scrollWidth, clientWidth) {
|
|
33
|
+
const max = scrollWidth - clientWidth;
|
|
34
|
+
if (max <= 1) return {
|
|
35
|
+
start: false,
|
|
36
|
+
end: false
|
|
37
|
+
};
|
|
38
|
+
return {
|
|
39
|
+
start: scrollLeft > 1,
|
|
40
|
+
end: scrollLeft < max - 1
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* A CSS mask that fades a strip's CONTENT out at its overflowing edges.
|
|
45
|
+
*
|
|
46
|
+
* Deliberately a mask rather than the usual gradient overlay. A tab strip sits
|
|
47
|
+
* on whatever surface the caller put it on — a panel, a toolbar, the page — so
|
|
48
|
+
* an overlay would have to re-create that background as an opaque colour and
|
|
49
|
+
* would drift the moment the theme changed. Masking fades the content itself
|
|
50
|
+
* and lets whatever is behind show through, so it matches by construction in
|
|
51
|
+
* all eight themes and both modes.
|
|
52
|
+
*
|
|
53
|
+
* This softens the cut; it is NOT the whole affordance. What sits at an
|
|
54
|
+
* overflowing edge is often the gap between two tabs, and fading empty space is
|
|
55
|
+
* invisible — hence the chevron buttons in the component.
|
|
56
|
+
*
|
|
57
|
+
* @param edges Which edges overflow, from {@link computeScrollEdges}.
|
|
58
|
+
* @param fadePx How far the fade reaches in. Defaults to {@link TAB_FADE_PX}.
|
|
59
|
+
* @returns A `linear-gradient(...)` value, or `undefined` when nothing
|
|
60
|
+
* overflows — no mask property at all, rather than a fully opaque one, so the
|
|
61
|
+
* common case creates no compositing layer.
|
|
62
|
+
*/
|
|
63
|
+
function edgeFadeMask(edges, fadePx = 24) {
|
|
64
|
+
if (!edges.start && !edges.end) return void 0;
|
|
65
|
+
return `linear-gradient(to right, ${edges.start ? `transparent 0px, black ${fadePx}px` : "black 0px"}, ${edges.end ? `black calc(100% - ${fadePx}px), transparent 100%` : "black 100%"})`;
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
export { TAB_FADE_PX, computeScrollEdges, edgeFadeMask };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
//#region src/chrome/_tree.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* The pure half of {@link Tree} (see `./tree.tsx`).
|
|
5
|
+
*
|
|
6
|
+
* A tree is two separate problems: working out which rows are visible and how
|
|
7
|
+
* they connect, and painting them. The first one is plain data — no DOM, no
|
|
8
|
+
* refs, no React — so it lives here where it can be unit-tested directly and
|
|
9
|
+
* reused by anything else that needs an outline (a virtualized variant, in
|
|
10
|
+
* particular, needs exactly this list and nothing else).
|
|
11
|
+
*/
|
|
12
|
+
/** One node of the outline. */
|
|
13
|
+
interface TreeItem {
|
|
14
|
+
/** Stable identity: what selection, expansion and focus are keyed on. */
|
|
15
|
+
id: string;
|
|
16
|
+
/** What the row reads as. Kept a node so a call site can mark part of it up. */
|
|
17
|
+
label: React.ReactNode;
|
|
18
|
+
/** Optional leading icon component, drawn `aria-hidden`. */
|
|
19
|
+
icon?: React.ElementType;
|
|
20
|
+
/** Nested nodes. An empty array still makes the row a parent (an empty folder). */
|
|
21
|
+
children?: readonly TreeItem[];
|
|
22
|
+
/** Trailing slot: a count, a `Chip`, a `StatusDot`. */
|
|
23
|
+
badge?: React.ReactNode;
|
|
24
|
+
/** Grey the row out; it stays reachable by keyboard but cannot be selected. */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* One column of the indent gutter.
|
|
29
|
+
*
|
|
30
|
+
* - `line` — an ancestor at this depth still has siblings below, so its
|
|
31
|
+
* through-line continues past this row.
|
|
32
|
+
* - `space` — that ancestor was the last of its set; the column is now blank.
|
|
33
|
+
* - `branch` / `last` — the row's own elbow, forked or terminal.
|
|
34
|
+
*/
|
|
35
|
+
type TreeGuide = "line" | "space" | "branch" | "last";
|
|
36
|
+
/** The box-drawing column each guide paints, one mono character wide. */
|
|
37
|
+
declare const TREE_GUIDE_GLYPHS: Record<TreeGuide, string>;
|
|
38
|
+
/** A visible row: the item plus everything the DOM row needs to know about it. */
|
|
39
|
+
interface TreeRow {
|
|
40
|
+
/** The node this row draws. */
|
|
41
|
+
item: TreeItem;
|
|
42
|
+
/** Depth from the roots; `0` for a root. */
|
|
43
|
+
level: number;
|
|
44
|
+
/** The id of the row's parent, or `null` at the root. */
|
|
45
|
+
parentId: string | null;
|
|
46
|
+
/** Whether the node declares children at all — what `aria-expanded` hangs on. */
|
|
47
|
+
hasChildren: boolean;
|
|
48
|
+
/** Whether those children are currently shown. */
|
|
49
|
+
expanded: boolean;
|
|
50
|
+
/** 1-based position among its siblings (`aria-posinset`). */
|
|
51
|
+
position: number;
|
|
52
|
+
/** How many siblings there are in total (`aria-setsize`). */
|
|
53
|
+
setSize: number;
|
|
54
|
+
/** One column per level: ancestor through-lines, then this row's elbow. */
|
|
55
|
+
guides: TreeGuide[];
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Walk the tree depth-first and return only the rows the expansion state
|
|
59
|
+
* reveals.
|
|
60
|
+
*
|
|
61
|
+
* The result is deliberately flat. A flat list is what the ARIA tree pattern
|
|
62
|
+
* wants anyway — `aria-level` / `aria-posinset` / `aria-setsize` carry the
|
|
63
|
+
* structure, no `role="group"` wrappers needed — and it is what makes roving
|
|
64
|
+
* tabindex ("the next visible row") a single array index instead of a recursive
|
|
65
|
+
* search.
|
|
66
|
+
*
|
|
67
|
+
* @param items The roots, in display order.
|
|
68
|
+
* @param expanded Ids whose children are currently shown.
|
|
69
|
+
* @returns Visible rows, top to bottom.
|
|
70
|
+
* @example
|
|
71
|
+
* flattenTree(items, new Set(["house"])).map((row) => row.item.id);
|
|
72
|
+
*/
|
|
73
|
+
declare function flattenTree(items: readonly TreeItem[], expanded: ReadonlySet<string>): TreeRow[];
|
|
74
|
+
//#endregion
|
|
75
|
+
export { TREE_GUIDE_GLYPHS, TreeGuide, TreeItem, TreeRow, flattenTree };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
//#region src/chrome/_tree.ts
|
|
2
|
+
/** The box-drawing column each guide paints, one mono character wide. */
|
|
3
|
+
const TREE_GUIDE_GLYPHS = {
|
|
4
|
+
line: "│",
|
|
5
|
+
space: " ",
|
|
6
|
+
branch: "├",
|
|
7
|
+
last: "└"
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Walk the tree depth-first and return only the rows the expansion state
|
|
11
|
+
* reveals.
|
|
12
|
+
*
|
|
13
|
+
* The result is deliberately flat. A flat list is what the ARIA tree pattern
|
|
14
|
+
* wants anyway — `aria-level` / `aria-posinset` / `aria-setsize` carry the
|
|
15
|
+
* structure, no `role="group"` wrappers needed — and it is what makes roving
|
|
16
|
+
* tabindex ("the next visible row") a single array index instead of a recursive
|
|
17
|
+
* search.
|
|
18
|
+
*
|
|
19
|
+
* @param items The roots, in display order.
|
|
20
|
+
* @param expanded Ids whose children are currently shown.
|
|
21
|
+
* @returns Visible rows, top to bottom.
|
|
22
|
+
* @example
|
|
23
|
+
* flattenTree(items, new Set(["house"])).map((row) => row.item.id);
|
|
24
|
+
*/
|
|
25
|
+
function flattenTree(items, expanded) {
|
|
26
|
+
const rows = [];
|
|
27
|
+
const walk = (siblings, level, parentId, ancestorLines) => {
|
|
28
|
+
siblings.forEach((item, index) => {
|
|
29
|
+
const isLast = index === siblings.length - 1;
|
|
30
|
+
const hasChildren = item.children !== void 0;
|
|
31
|
+
const isExpanded = hasChildren && expanded.has(item.id);
|
|
32
|
+
rows.push({
|
|
33
|
+
item,
|
|
34
|
+
level,
|
|
35
|
+
parentId,
|
|
36
|
+
hasChildren,
|
|
37
|
+
expanded: isExpanded,
|
|
38
|
+
position: index + 1,
|
|
39
|
+
setSize: siblings.length,
|
|
40
|
+
guides: level === 0 ? [] : [...ancestorLines.slice(1).map((continues) => continues ? "line" : "space"), isLast ? "last" : "branch"]
|
|
41
|
+
});
|
|
42
|
+
if (isExpanded && item.children !== void 0) walk(item.children, level + 1, item.id, [...ancestorLines, !isLast]);
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
walk(items, 0, null, []);
|
|
46
|
+
return rows;
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { TREE_GUIDE_GLYPHS, flattenTree };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
//#region src/chrome/empty-state.d.ts
|
|
3
|
+
interface EmptyStateProps extends Omit<React.ComponentPropsWithoutRef<"div">, "title"> {
|
|
4
|
+
/** What is missing. One short line: "No cues yet". */
|
|
5
|
+
title: React.ReactNode;
|
|
6
|
+
/** How to fix it. One sentence, muted. */
|
|
7
|
+
hint?: React.ReactNode;
|
|
8
|
+
/** The way out — normally a single `Button`. */
|
|
9
|
+
action?: React.ReactNode;
|
|
10
|
+
/** Optional glyph above the title (e.g. a lucide icon), drawn `aria-hidden`. */
|
|
11
|
+
icon?: React.ElementType;
|
|
12
|
+
/** Extra content between the hint and the action — rarely needed. */
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The "there is nothing here" panel body.
|
|
17
|
+
*
|
|
18
|
+
* Centred and quiet: an empty state is a report, not an alarm, so it uses the
|
|
19
|
+
* muted ramp throughout and gets its emphasis from position rather than colour.
|
|
20
|
+
* The icon is decorative — the title carries the meaning, so a screen reader
|
|
21
|
+
* hears one sentence instead of a shrug emoji.
|
|
22
|
+
*
|
|
23
|
+
* Static markup — no `"use client"`.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* <Panel>
|
|
27
|
+
* <EmptyState
|
|
28
|
+
* icon={ListX}
|
|
29
|
+
* title="No cues yet"
|
|
30
|
+
* hint="Record one from the live look, or import a show file."
|
|
31
|
+
* action={<Button variant="primary">Record cue</Button>}
|
|
32
|
+
* />
|
|
33
|
+
* </Panel>
|
|
34
|
+
*/
|
|
35
|
+
declare const EmptyState: React.ForwardRefExoticComponent<EmptyStateProps & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { EmptyState, EmptyStateProps };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { cn } from "../lib/cn.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/chrome/empty-state.tsx
|
|
5
|
+
/**
|
|
6
|
+
* The "there is nothing here" panel body.
|
|
7
|
+
*
|
|
8
|
+
* Centred and quiet: an empty state is a report, not an alarm, so it uses the
|
|
9
|
+
* muted ramp throughout and gets its emphasis from position rather than colour.
|
|
10
|
+
* The icon is decorative — the title carries the meaning, so a screen reader
|
|
11
|
+
* hears one sentence instead of a shrug emoji.
|
|
12
|
+
*
|
|
13
|
+
* Static markup — no `"use client"`.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* <Panel>
|
|
17
|
+
* <EmptyState
|
|
18
|
+
* icon={ListX}
|
|
19
|
+
* title="No cues yet"
|
|
20
|
+
* hint="Record one from the live look, or import a show file."
|
|
21
|
+
* action={<Button variant="primary">Record cue</Button>}
|
|
22
|
+
* />
|
|
23
|
+
* </Panel>
|
|
24
|
+
*/
|
|
25
|
+
const EmptyState = React.forwardRef(function EmptyState({ className, title, hint, action, icon: Icon, children, ...elementProps }, ref) {
|
|
26
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
27
|
+
ref,
|
|
28
|
+
"data-slot": "empty-state",
|
|
29
|
+
className: cn("flex flex-col items-center justify-center gap-(--cue-space-3) px-(--cue-space-6) py-(--cue-space-7) text-center font-mono", className),
|
|
30
|
+
...elementProps,
|
|
31
|
+
children: [
|
|
32
|
+
Icon === void 0 ? null : /* @__PURE__ */ jsx(Icon, {
|
|
33
|
+
"aria-hidden": "true",
|
|
34
|
+
"data-slot": "empty-state-icon",
|
|
35
|
+
className: "size-(--cue-space-7) shrink-0 text-fg-subtle"
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ jsx("span", {
|
|
38
|
+
"data-slot": "empty-state-title",
|
|
39
|
+
className: "text-(length:--cue-text-emphasis) text-fg",
|
|
40
|
+
children: title
|
|
41
|
+
}),
|
|
42
|
+
hint === void 0 ? null : /* @__PURE__ */ jsx("p", {
|
|
43
|
+
"data-slot": "empty-state-hint",
|
|
44
|
+
className: "max-w-[36ch] text-(length:--cue-text-ui) leading-relaxed text-fg-muted",
|
|
45
|
+
children: hint
|
|
46
|
+
}),
|
|
47
|
+
children,
|
|
48
|
+
action === void 0 ? null : /* @__PURE__ */ jsx("div", {
|
|
49
|
+
"data-slot": "empty-state-action",
|
|
50
|
+
className: "pt-(--cue-space-2)",
|
|
51
|
+
children: action
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
//#endregion
|
|
57
|
+
export { EmptyState };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
//#region src/chrome/eyebrow.d.ts
|
|
3
|
+
interface EyebrowProps extends React.ComponentPropsWithoutRef<"span"> {
|
|
4
|
+
/**
|
|
5
|
+
* Print the `//` motif ahead of the label. Defaults to `true` — the slashes
|
|
6
|
+
* are the brand mark of this system, and an eyebrow without them is just
|
|
7
|
+
* small uppercase text. Pass `false` for a plain kicker.
|
|
8
|
+
*/
|
|
9
|
+
slashes?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The small accent kicker that sits above a title: `// PATCH`.
|
|
13
|
+
*
|
|
14
|
+
* Mono, uppercase and widely tracked, in the theme's accent — the one place
|
|
15
|
+
* where the accent is used for pure typography rather than for a control. The
|
|
16
|
+
* slashes are marked `aria-hidden` and `select-none`, so a screen reader reads
|
|
17
|
+
* "patch" and a copy-paste of the page does not carry punctuation that was only
|
|
18
|
+
* ever decoration.
|
|
19
|
+
*
|
|
20
|
+
* Static markup — no `"use client"`.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* <Eyebrow>Patch</Eyebrow>
|
|
24
|
+
* @example
|
|
25
|
+
* <Eyebrow slashes={false}>Beta</Eyebrow>
|
|
26
|
+
*/
|
|
27
|
+
declare const Eyebrow: React.ForwardRefExoticComponent<EyebrowProps & React.RefAttributes<HTMLSpanElement>>;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { Eyebrow, EyebrowProps };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { cn } from "../lib/cn.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/chrome/eyebrow.tsx
|
|
5
|
+
/**
|
|
6
|
+
* The small accent kicker that sits above a title: `// PATCH`.
|
|
7
|
+
*
|
|
8
|
+
* Mono, uppercase and widely tracked, in the theme's accent — the one place
|
|
9
|
+
* where the accent is used for pure typography rather than for a control. The
|
|
10
|
+
* slashes are marked `aria-hidden` and `select-none`, so a screen reader reads
|
|
11
|
+
* "patch" and a copy-paste of the page does not carry punctuation that was only
|
|
12
|
+
* ever decoration.
|
|
13
|
+
*
|
|
14
|
+
* Static markup — no `"use client"`.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <Eyebrow>Patch</Eyebrow>
|
|
18
|
+
* @example
|
|
19
|
+
* <Eyebrow slashes={false}>Beta</Eyebrow>
|
|
20
|
+
*/
|
|
21
|
+
const Eyebrow = React.forwardRef(function Eyebrow({ className, slashes = true, children, ...elementProps }, ref) {
|
|
22
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
23
|
+
ref,
|
|
24
|
+
"data-slot": "eyebrow",
|
|
25
|
+
className: cn("inline-flex items-center gap-(--cue-space-2) font-mono text-(length:--cue-text-label) tracking-[0.2em] text-accent uppercase", className),
|
|
26
|
+
...elementProps,
|
|
27
|
+
children: [slashes ? /* @__PURE__ */ jsx("span", {
|
|
28
|
+
"data-slot": "eyebrow-glyph",
|
|
29
|
+
"aria-hidden": "true",
|
|
30
|
+
className: "select-none",
|
|
31
|
+
children: "//"
|
|
32
|
+
}) : null, children]
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
//#endregion
|
|
36
|
+
export { Eyebrow };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ScrollEdges, TAB_FADE_PX, computeScrollEdges, edgeFadeMask } from "./_tabs-scroll.js";
|
|
2
|
+
import { TREE_GUIDE_GLYPHS, TreeGuide, TreeItem, TreeRow, flattenTree } from "./_tree.js";
|
|
3
|
+
import { EmptyState, EmptyStateProps } from "./empty-state.js";
|
|
4
|
+
import { Eyebrow, EyebrowProps } from "./eyebrow.js";
|
|
5
|
+
import { NavigationMenu, NavigationMenuContentProps, NavigationMenuItemProps, NavigationMenuLinkProps, NavigationMenuListProps, NavigationMenuRootProps, NavigationMenuTriggerProps, NavigationMenuViewportProps } from "./navigation-menu.js";
|
|
6
|
+
import { PageShell, PageShellProps, PageWidth } from "./page-shell.js";
|
|
7
|
+
import { Panel, PanelHeader, PanelHeaderProps, PanelProps } from "./panel.js";
|
|
8
|
+
import { Row, RowProps, SeamList, SeamListProps, rowVariants } from "./row.js";
|
|
9
|
+
import { ScrollArea, ScrollAreaOrientation, ScrollAreaProps } from "./scroll-area.js";
|
|
10
|
+
import { SectionHeader, SectionHeaderProps } from "./section-header.js";
|
|
11
|
+
import { SegmentedControl, SegmentedControlItem, SegmentedControlProps, SegmentedControlSize } from "./segmented-control.js";
|
|
12
|
+
import { StatusBar, StatusBarItemProps, StatusBarProps, StatusBarTone } from "./status-bar.js";
|
|
13
|
+
import { ScrollableTabsList, ScrollableTabsListProps, Tabs, TabsListProps, TabsPanelProps, TabsRootProps, TabsTabProps } from "./tabs.js";
|
|
14
|
+
import { TitleBar, TitleBarProps } from "./title-bar.js";
|
|
15
|
+
import { Tree, TreeProps, TreeVisibility, TreeVisibilityToggle, TreeVisibilityToggleProps } from "./tree.js";
|
|
16
|
+
import { Toolbar, ToolbarButtonProps, ToolbarGroupProps, ToolbarRootProps, ToolbarSeparatorProps } from "./toolbar.js";
|
|
17
|
+
export { EmptyState, type EmptyStateProps, Eyebrow, type EyebrowProps, NavigationMenu, type NavigationMenuContentProps, type NavigationMenuItemProps, type NavigationMenuLinkProps, type NavigationMenuListProps, type NavigationMenuRootProps, type NavigationMenuTriggerProps, type NavigationMenuViewportProps, PageShell, type PageShellProps, type PageWidth, Panel, PanelHeader, type PanelHeaderProps, type PanelProps, Row, type RowProps, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, type ScrollEdges, ScrollableTabsList, type ScrollableTabsListProps, SeamList, type SeamListProps, SectionHeader, type SectionHeaderProps, SegmentedControl, type SegmentedControlItem, type SegmentedControlProps, type SegmentedControlSize, StatusBar, type StatusBarItemProps, type StatusBarProps, type StatusBarTone, TAB_FADE_PX, TREE_GUIDE_GLYPHS, Tabs, type TabsListProps, type TabsPanelProps, type TabsRootProps, type TabsTabProps, TitleBar, type TitleBarProps, Toolbar, type ToolbarButtonProps, type ToolbarGroupProps, type ToolbarRootProps, type ToolbarSeparatorProps, Tree, type TreeGuide, type TreeItem, type TreeProps, type TreeRow, type TreeVisibility, TreeVisibilityToggle, type TreeVisibilityToggleProps, computeScrollEdges, edgeFadeMask, flattenTree, rowVariants };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TAB_FADE_PX, computeScrollEdges, edgeFadeMask } from "./_tabs-scroll.js";
|
|
2
|
+
import { TREE_GUIDE_GLYPHS, flattenTree } from "./_tree.js";
|
|
3
|
+
import { EmptyState } from "./empty-state.js";
|
|
4
|
+
import { Eyebrow } from "./eyebrow.js";
|
|
5
|
+
import { NavigationMenu } from "./navigation-menu.js";
|
|
6
|
+
import { PageShell } from "./page-shell.js";
|
|
7
|
+
import { Panel, PanelHeader } from "./panel.js";
|
|
8
|
+
import { Row, SeamList, rowVariants } from "./row.js";
|
|
9
|
+
import { ScrollArea } from "./scroll-area.js";
|
|
10
|
+
import { SectionHeader } from "./section-header.js";
|
|
11
|
+
import { SegmentedControl } from "./segmented-control.js";
|
|
12
|
+
import { StatusBar } from "./status-bar.js";
|
|
13
|
+
import { ScrollableTabsList, Tabs } from "./tabs.js";
|
|
14
|
+
import { TitleBar } from "./title-bar.js";
|
|
15
|
+
import { Tree, TreeVisibilityToggle } from "./tree.js";
|
|
16
|
+
import { Toolbar } from "./toolbar.js";
|
|
17
|
+
export { EmptyState, Eyebrow, NavigationMenu, PageShell, Panel, PanelHeader, Row, ScrollArea, ScrollableTabsList, SeamList, SectionHeader, SegmentedControl, StatusBar, TAB_FADE_PX, TREE_GUIDE_GLYPHS, Tabs, TitleBar, Toolbar, Tree, TreeVisibilityToggle, computeScrollEdges, edgeFadeMask, flattenTree, rowVariants };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { NavigationMenu } from "@base-ui/react/navigation-menu";
|
|
3
|
+
//#region src/chrome/navigation-menu.d.ts
|
|
4
|
+
interface NavigationMenuRootProps extends Omit<NavigationMenu.Root.Props, "className"> {
|
|
5
|
+
/** Extra classes for the `<nav>`. */
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
interface NavigationMenuListProps extends Omit<NavigationMenu.List.Props, "className"> {
|
|
9
|
+
/** Extra classes for the strip of items. */
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
interface NavigationMenuItemProps extends NavigationMenu.Item.Props {}
|
|
13
|
+
interface NavigationMenuTriggerProps extends Omit<NavigationMenu.Trigger.Props, "className"> {
|
|
14
|
+
/** Extra classes for the trigger. */
|
|
15
|
+
className?: string;
|
|
16
|
+
/** Draw the caret that says a panel opens below. Defaults to `true`. */
|
|
17
|
+
caret?: boolean;
|
|
18
|
+
}
|
|
19
|
+
interface NavigationMenuContentProps extends Omit<NavigationMenu.Content.Props, "className"> {
|
|
20
|
+
/** Extra classes for the panel body. */
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
interface NavigationMenuLinkProps extends Omit<NavigationMenu.Link.Props, "className"> {
|
|
24
|
+
/** Extra classes for the link row. */
|
|
25
|
+
className?: string;
|
|
26
|
+
/** Supporting line under the label. */
|
|
27
|
+
description?: React.ReactNode;
|
|
28
|
+
/** Mark this link as the current destination. */
|
|
29
|
+
active?: boolean;
|
|
30
|
+
}
|
|
31
|
+
interface NavigationMenuViewportProps extends Omit<NavigationMenu.Popup.Props, "className"> {
|
|
32
|
+
/** Extra classes for the popup surface. */
|
|
33
|
+
className?: string;
|
|
34
|
+
/** Extra classes for the positioner that places the popup. */
|
|
35
|
+
positionerClassName?: string;
|
|
36
|
+
/** Gap in px between the strip and the popup. Defaults to `4`. */
|
|
37
|
+
sideOffset?: NavigationMenu.Positioner.Props["sideOffset"];
|
|
38
|
+
/** Alignment along the bottom of the active trigger. Defaults to `"start"`. */
|
|
39
|
+
align?: NavigationMenu.Positioner.Props["align"];
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The marketing-shaped navigation header: a strip of words, each opening a panel
|
|
43
|
+
* of destinations.
|
|
44
|
+
*
|
|
45
|
+
* Wraps Base UI's `NavigationMenu`, which is the right primitive because a
|
|
46
|
+
* navigation menu is *not* a menu: its rows are links, not commands, so it must
|
|
47
|
+
* not take `role="menu"` (which tells a screen reader to expect commands and
|
|
48
|
+
* swallows the browser's own link affordances). Hover intent, the shared
|
|
49
|
+
* resizing popup, focus handling and the landmark are all the primitive's.
|
|
50
|
+
*
|
|
51
|
+
* Reach for {@link Menubar} when the entries run commands, `Tabs` when they
|
|
52
|
+
* switch a panel in place, and `Sidebar` when the console has more than about
|
|
53
|
+
* six destinations.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* <NavigationMenu.Root aria-label="Console">
|
|
57
|
+
* <NavigationMenu.List>
|
|
58
|
+
* <NavigationMenu.Item>
|
|
59
|
+
* <NavigationMenu.Trigger>Patch</NavigationMenu.Trigger>
|
|
60
|
+
* <NavigationMenu.Content>
|
|
61
|
+
* <NavigationMenu.Link href="/patch/fixtures" description="Everything addressed">
|
|
62
|
+
* Fixtures
|
|
63
|
+
* </NavigationMenu.Link>
|
|
64
|
+
* </NavigationMenu.Content>
|
|
65
|
+
* </NavigationMenu.Item>
|
|
66
|
+
* </NavigationMenu.List>
|
|
67
|
+
* <NavigationMenu.Viewport />
|
|
68
|
+
* </NavigationMenu.Root>
|
|
69
|
+
*/
|
|
70
|
+
declare const NavigationMenu$1: {
|
|
71
|
+
Root: React.ForwardRefExoticComponent<Omit<NavigationMenuRootProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
72
|
+
List: React.ForwardRefExoticComponent<Omit<NavigationMenuListProps, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
73
|
+
Item: React.ForwardRefExoticComponent<Omit<NavigationMenuItemProps, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
74
|
+
Trigger: React.ForwardRefExoticComponent<Omit<NavigationMenuTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
75
|
+
Content: React.ForwardRefExoticComponent<Omit<NavigationMenuContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
76
|
+
Link: React.ForwardRefExoticComponent<Omit<NavigationMenuLinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
77
|
+
Viewport: React.ForwardRefExoticComponent<Omit<NavigationMenuViewportProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
78
|
+
};
|
|
79
|
+
//#endregion
|
|
80
|
+
export { NavigationMenu$1 as NavigationMenu, NavigationMenuContentProps, NavigationMenuItemProps, NavigationMenuLinkProps, NavigationMenuListProps, NavigationMenuRootProps, NavigationMenuTriggerProps, NavigationMenuViewportProps };
|