@cueplusplus/ui 0.18.2 → 0.20.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 +100 -0
- package/dist/brand/_motif-seed.js +20 -0
- package/dist/brand/gloss-object.d.ts +23 -0
- package/dist/brand/gloss-object.js +108 -0
- package/dist/brand/halftone.d.ts +23 -0
- package/dist/brand/halftone.js +54 -0
- package/dist/brand/index.d.ts +8 -1
- package/dist/brand/motif.d.ts +32 -0
- package/dist/brand/motif.js +71 -0
- package/dist/brand/particle-logo.d.ts +50 -0
- package/dist/brand/particle-logo.js +437 -0
- package/dist/brand/particle-mark.d.ts +29 -0
- package/dist/brand/particle-mark.js +137 -0
- package/dist/brand/ribbon.d.ts +20 -0
- package/dist/brand/ribbon.js +54 -0
- package/dist/brand/text-scramble.d.ts +42 -0
- package/dist/brand/text-scramble.js +160 -0
- package/dist/chat/delegation-card.js +2 -1
- package/dist/chat/message.js +12 -13
- package/dist/chrome/announcement-bar.d.ts +30 -0
- package/dist/chrome/announcement-bar.js +38 -0
- package/dist/chrome/app-bar.d.ts +4 -1
- package/dist/chrome/app-bar.js +7 -2
- package/dist/chrome/app-shell.js +8 -1
- package/dist/chrome/band.d.ts +3 -1
- package/dist/chrome/band.js +4 -3
- package/dist/chrome/hero.d.ts +61 -0
- package/dist/chrome/hero.js +108 -0
- package/dist/chrome/index.d.ts +6 -1
- package/dist/chrome/index.js +6 -1
- package/dist/chrome/keyword.d.ts +22 -0
- package/dist/chrome/keyword.js +28 -0
- package/dist/chrome/logo-strip.d.ts +23 -0
- package/dist/chrome/logo-strip.js +43 -0
- package/dist/chrome/page-shell.js +13 -1
- package/dist/chrome/stat-band.d.ts +32 -0
- package/dist/chrome/stat-band.js +39 -0
- package/dist/color/color-area.js +2 -1
- package/dist/dmx/channel-matrix.js +5 -3
- package/dist/dmx/dmx-strip.js +5 -3
- package/dist/elements/animated-number.js +4 -1
- package/dist/elements/replay.d.ts +1 -1
- package/dist/elements/replay.js +5 -2
- package/dist/elements/scroll-anchor.js +4 -1
- package/dist/forms/_chassis.d.ts +1 -1
- package/dist/forms/_chassis.js +2 -2
- package/dist/forms/env-var-input.js +2 -1
- package/dist/forms/file-upload.js +2 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +18 -2
- package/dist/instruments/data-table.js +3 -2
- package/dist/instruments/index.js +1 -1
- package/dist/instruments/stat.js +1 -1
- package/dist/instruments/table.js +1 -1
- package/dist/instruments/terminal-frame.js +5 -2
- package/dist/layout/grid.js +4 -2
- package/dist/layout/index.d.ts +2 -1
- package/dist/layout/index.js +2 -1
- package/dist/layout/preview.js +4 -188
- package/dist/layout/reveal.d.ts +44 -0
- package/dist/layout/reveal.js +106 -0
- package/dist/layout/sidebar.js +88 -52
- package/dist/lib/cn.js +23 -5
- package/dist/lib/particle-field-shaders.js +236 -0
- package/dist/lib/particle-field.js +210 -0
- package/dist/midi/spectrum-visualizer.js +2 -1
- package/dist/overlays/_surface.d.ts +2 -2
- package/dist/primitives/button.js +22 -3
- package/dist/primitives/chip.d.ts +1 -1
- package/dist/primitives/chip.js +63 -6
- package/dist/styles.css +26 -0
- package/dist/system/_scoped-pairing.js +18 -0
- package/dist/system/_stage-scope.js +199 -0
- package/dist/system/_style-check.js +1 -1
- package/dist/system/_style-chip.js +1 -1
- package/dist/system/_style-field-chassis.js +14 -1
- package/dist/system/_style-group-label.js +7 -3
- package/dist/system/_style-hero-title.js +41 -0
- package/dist/system/_style-kbd.js +1 -1
- package/dist/system/_style-label-ink.js +12 -5
- package/dist/system/_style-menu.js +1 -1
- package/dist/system/_style-page-title.js +1 -1
- package/dist/system/_style-segmented-control.js +1 -1
- package/dist/system/_style-skeleton.js +1 -1
- package/dist/system/_style-tab.js +1 -1
- package/dist/system/font-scope.d.ts +38 -0
- package/dist/system/font-scope.js +69 -0
- package/dist/system/frame-clock.d.ts +33 -0
- package/dist/system/frame-clock.js +55 -0
- package/dist/system/index.d.ts +4 -1
- package/dist/system/index.js +4 -1
- package/dist/system/portal.js +7 -1
- package/dist/system/still.d.ts +32 -0
- package/dist/system/still.js +60 -0
- package/manifest/components/alert-dialog.json +1 -1
- package/manifest/components/announcement-bar.json +82 -0
- package/manifest/components/app-bar.json +3 -2
- package/manifest/components/app-shell.json +3 -0
- package/manifest/components/autocomplete.json +2 -0
- package/manifest/components/band.json +2 -1
- package/manifest/components/bento.json +13 -13
- package/manifest/components/button.json +1 -0
- package/manifest/components/channel-matrix.json +1 -0
- package/manifest/components/chart-tooltip-content.json +1 -0
- package/manifest/components/checkbox-group.json +1 -1
- package/manifest/components/checkbox.json +1 -1
- package/manifest/components/chip.json +1 -0
- package/manifest/components/color-area.json +10 -0
- package/manifest/components/color-field.json +3 -0
- package/manifest/components/color-picker.json +3 -0
- package/manifest/components/combobox.json +2 -0
- package/manifest/components/command-palette.json +1 -0
- package/manifest/components/composer.json +3 -0
- package/manifest/components/context-menu.json +1 -1
- package/manifest/components/data-table-pagination.json +3 -0
- package/manifest/components/data-table-toolbar.json +3 -0
- package/manifest/components/date-field.json +3 -0
- package/manifest/components/date-picker.json +3 -0
- package/manifest/components/date-range-picker.json +3 -0
- package/manifest/components/delegation-card.json +6 -0
- package/manifest/components/density.json +6 -2
- package/manifest/components/dialog.json +1 -1
- package/manifest/components/dmx-bar.json +1 -1
- package/manifest/components/dmx-strip.json +1 -1
- package/manifest/components/drawer.json +1 -1
- package/manifest/components/dropdown-menu.json +1 -0
- package/manifest/components/env-var-input.json +3 -0
- package/manifest/components/file-upload.json +5 -0
- package/manifest/components/font-scope.json +82 -0
- package/manifest/components/footer.json +0 -1
- package/manifest/components/gloss-object.json +81 -0
- package/manifest/components/grid.json +6 -6
- package/manifest/components/halftone.json +79 -0
- package/manifest/components/hero.json +204 -0
- package/manifest/components/hover-card.json +1 -1
- package/manifest/components/input-group.json +3 -0
- package/manifest/components/input.json +3 -0
- package/manifest/components/kbd.json +1 -0
- package/manifest/components/keyword.json +67 -0
- package/manifest/components/ledger.json +5 -5
- package/manifest/components/logo-strip.json +93 -0
- package/manifest/components/markdown-text.json +3 -3
- package/manifest/components/menubar.json +1 -1
- package/manifest/components/message.json +8 -0
- package/manifest/components/motif.json +90 -0
- package/manifest/components/multi-select.json +2 -0
- package/manifest/components/musical-time-input.json +3 -0
- package/manifest/components/navigation-menu.json +1 -0
- package/manifest/components/number-field.json +3 -0
- package/manifest/components/otp-field.json +3 -0
- package/manifest/components/page-shell.json +5 -0
- package/manifest/components/particle-logo.json +140 -0
- package/manifest/components/particle-mark.json +75 -0
- package/manifest/components/password-input.json +3 -0
- package/manifest/components/popover.json +1 -1
- package/manifest/components/preview.json +10 -4
- package/manifest/components/radio-group.json +0 -1
- package/manifest/components/radio.json +0 -1
- package/manifest/components/reveal.json +106 -0
- package/manifest/components/ribbon.json +65 -0
- package/manifest/components/scrollable-tabs-list.json +1 -0
- package/manifest/components/scrub-input.json +3 -0
- package/manifest/components/search-input.json +3 -0
- package/manifest/components/segmented-control.json +1 -0
- package/manifest/components/select.json +3 -0
- package/manifest/components/sheet.json +1 -1
- package/manifest/components/sidebar.json +1 -0
- package/manifest/components/skeleton.json +1 -0
- package/manifest/components/spectrum-visualizer.json +10 -0
- package/manifest/components/stack.json +4 -4
- package/manifest/components/stat-band.json +68 -0
- package/manifest/components/stat.json +1 -1
- package/manifest/components/still-provider.json +60 -0
- package/manifest/components/switch.json +0 -1
- package/manifest/components/table.json +2 -2
- package/manifest/components/tabs.json +1 -0
- package/manifest/components/tags-input.json +2 -0
- package/manifest/components/text-scramble.json +90 -0
- package/manifest/components/textarea.json +3 -0
- package/manifest/components/theme-configurator.json +1 -0
- package/manifest/components/theme-provider.json +10 -4
- package/manifest/components/time-field.json +3 -0
- package/manifest/components/toast.json +1 -0
- package/manifest/components/tooltip.json +1 -1
- package/manifest/fixtures.json +18 -0
- package/manifest/manifest.json +368 -80
- package/manifest/tokens.json +93 -3
- package/package.json +6 -6
- package/dist/system/_paint-ground-pattern.js +0 -30
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
//#region src/brand/text-scramble.d.ts
|
|
3
|
+
interface TextScrambleProps extends Omit<React.ComponentPropsWithoutRef<"p">, "children"> {
|
|
4
|
+
/** The phrases to cycle through, in order, looping. The first is what renders before any script runs. */
|
|
5
|
+
phrases: readonly string[];
|
|
6
|
+
/**
|
|
7
|
+
* What assistive technology reads instead of the animation: one sentence that
|
|
8
|
+
* names the whole cycle. The animated text is hidden from it, because a
|
|
9
|
+
* scramble read aloud is noise.
|
|
10
|
+
*/
|
|
11
|
+
label: string;
|
|
12
|
+
/**
|
|
13
|
+
* `matrix` (the default): letters, digits and symbols at 28ms a frame, one
|
|
14
|
+
* character locking per frame. `flap`: upper-cased, a departure board's
|
|
15
|
+
* letters at 55ms a frame, one character locking every two frames.
|
|
16
|
+
*/
|
|
17
|
+
effect?: "matrix" | "flap";
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A line that cycles through phrases, scrambling each one in — cueplusplus.com's
|
|
21
|
+
* "what we do" cycler, ported verbatim (`what-we-do.tsx`; spec
|
|
22
|
+
* 2026-10-04-cue-site-verbatim §4.2).
|
|
23
|
+
*
|
|
24
|
+
* Each frame, every character not yet locked shows a random glyph from the
|
|
25
|
+
* effect's set; spaces are never scrambled; characters lock left to right. A
|
|
26
|
+
* phrase holds for 1.8s once it has revealed, so a long phrase and a slow effect
|
|
27
|
+
* still finish before the next begins: the next starts after
|
|
28
|
+
* `length × revealEvery × speed + 1800ms`.
|
|
29
|
+
*
|
|
30
|
+
* **Reduced motion** shows each phrase whole, one every 2.6s, as the site does.
|
|
31
|
+
* **Held still** (a gallery thumbnail, under a still `StillProvider`) shows the
|
|
32
|
+
* first phrase and schedules nothing, which is this library's departure from the
|
|
33
|
+
* source: a thumbnail costs nothing at rest. The text is written straight into
|
|
34
|
+
* the DOM node, as the source does, so thirty-five frames a second never
|
|
35
|
+
* re-render React.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* <TextScramble phrases={["we build software", "we design stages"]} label="We build software and design stages." />
|
|
39
|
+
*/
|
|
40
|
+
declare const TextScramble: React.ForwardRefExoticComponent<TextScrambleProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
41
|
+
//#endregion
|
|
42
|
+
export { TextScramble, TextScrambleProps };
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { usePrefersReducedMotion } from "../instruments/_motion.js";
|
|
4
|
+
import { useStillHeld } from "../system/still.js";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region src/brand/text-scramble.tsx
|
|
8
|
+
/** The matrix effect's glyphs, cueplusplus.com's `MATRIX_GLYPHS`. */
|
|
9
|
+
const MATRIX_GLYPHS = "ABCDEFGHJKLMNPQRSTUVWXYZ0123456789#%&*<>/=+";
|
|
10
|
+
/** The flap effect's glyphs, cueplusplus.com's `FLAP_GLYPHS`. */
|
|
11
|
+
const FLAP_GLYPHS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
12
|
+
/** How long a phrase holds once it has fully revealed, before the next begins. */
|
|
13
|
+
const HOLD_MS = 1800;
|
|
14
|
+
/** Under reduced motion, how long each whole phrase is shown. */
|
|
15
|
+
const REDUCED_MS = 2600;
|
|
16
|
+
/**
|
|
17
|
+
* A line that cycles through phrases, scrambling each one in — cueplusplus.com's
|
|
18
|
+
* "what we do" cycler, ported verbatim (`what-we-do.tsx`; spec
|
|
19
|
+
* 2026-10-04-cue-site-verbatim §4.2).
|
|
20
|
+
*
|
|
21
|
+
* Each frame, every character not yet locked shows a random glyph from the
|
|
22
|
+
* effect's set; spaces are never scrambled; characters lock left to right. A
|
|
23
|
+
* phrase holds for 1.8s once it has revealed, so a long phrase and a slow effect
|
|
24
|
+
* still finish before the next begins: the next starts after
|
|
25
|
+
* `length × revealEvery × speed + 1800ms`.
|
|
26
|
+
*
|
|
27
|
+
* **Reduced motion** shows each phrase whole, one every 2.6s, as the site does.
|
|
28
|
+
* **Held still** (a gallery thumbnail, under a still `StillProvider`) shows the
|
|
29
|
+
* first phrase and schedules nothing, which is this library's departure from the
|
|
30
|
+
* source: a thumbnail costs nothing at rest. The text is written straight into
|
|
31
|
+
* the DOM node, as the source does, so thirty-five frames a second never
|
|
32
|
+
* re-render React.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* <TextScramble phrases={["we build software", "we design stages"]} label="We build software and design stages." />
|
|
36
|
+
*/
|
|
37
|
+
const TextScramble = React.forwardRef(function TextScramble({ phrases, label, effect = "matrix", className, ...props }, ref) {
|
|
38
|
+
const text = React.useRef(null);
|
|
39
|
+
const held = useStillHeld();
|
|
40
|
+
const reduced = usePrefersReducedMotion();
|
|
41
|
+
const key = phrases.join("\0");
|
|
42
|
+
React.useEffect(() => {
|
|
43
|
+
const element = text.current;
|
|
44
|
+
if (element === null || phrases.length === 0) return;
|
|
45
|
+
if (held) {
|
|
46
|
+
element.textContent = phrases[0];
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const glyphs = effect === "flap" ? FLAP_GLYPHS : MATRIX_GLYPHS;
|
|
50
|
+
const speed = effect === "flap" ? 55 : 28;
|
|
51
|
+
const revealEvery = effect === "flap" ? 2 : 1;
|
|
52
|
+
const shape = (s) => effect === "flap" ? s.toUpperCase() : s;
|
|
53
|
+
let i = 0;
|
|
54
|
+
let scrambleTimer;
|
|
55
|
+
let cycleTimer;
|
|
56
|
+
let current = phrases[0];
|
|
57
|
+
let started = false;
|
|
58
|
+
let running = false;
|
|
59
|
+
let visible = true;
|
|
60
|
+
const clear = () => {
|
|
61
|
+
if (scrambleTimer !== void 0) clearInterval(scrambleTimer);
|
|
62
|
+
if (cycleTimer !== void 0) clearTimeout(cycleTimer);
|
|
63
|
+
scrambleTimer = void 0;
|
|
64
|
+
cycleTimer = void 0;
|
|
65
|
+
};
|
|
66
|
+
const scramble = (phrase) => {
|
|
67
|
+
if (scrambleTimer !== void 0) clearInterval(scrambleTimer);
|
|
68
|
+
if (reduced) {
|
|
69
|
+
element.textContent = phrase;
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
let frame = 0;
|
|
73
|
+
const length = phrase.length;
|
|
74
|
+
scrambleTimer = setInterval(() => {
|
|
75
|
+
const settled = Math.floor(frame / revealEvery);
|
|
76
|
+
let out = "";
|
|
77
|
+
for (let k = 0; k < length; k++) {
|
|
78
|
+
const ch = phrase[k];
|
|
79
|
+
if (ch === " " || k < settled) out += ch;
|
|
80
|
+
else out += glyphs[Math.floor(Math.random() * glyphs.length)];
|
|
81
|
+
}
|
|
82
|
+
element.textContent = out;
|
|
83
|
+
frame++;
|
|
84
|
+
if (settled >= length) {
|
|
85
|
+
if (scrambleTimer !== void 0) clearInterval(scrambleTimer);
|
|
86
|
+
scrambleTimer = void 0;
|
|
87
|
+
element.textContent = phrase;
|
|
88
|
+
}
|
|
89
|
+
}, speed);
|
|
90
|
+
};
|
|
91
|
+
const tick = () => {
|
|
92
|
+
const phrase = shape(phrases[i % phrases.length]);
|
|
93
|
+
current = phrase;
|
|
94
|
+
scramble(phrase);
|
|
95
|
+
i++;
|
|
96
|
+
const revealMs = reduced ? 0 : phrase.length * revealEvery * speed;
|
|
97
|
+
cycleTimer = setTimeout(tick, revealMs + (reduced ? REDUCED_MS : HOLD_MS));
|
|
98
|
+
};
|
|
99
|
+
const begin = () => {
|
|
100
|
+
started = true;
|
|
101
|
+
running = true;
|
|
102
|
+
if (reduced) {
|
|
103
|
+
element.textContent = phrases[0];
|
|
104
|
+
i = 1;
|
|
105
|
+
cycleTimer = setTimeout(tick, REDUCED_MS);
|
|
106
|
+
} else tick();
|
|
107
|
+
};
|
|
108
|
+
const pause = () => {
|
|
109
|
+
if (!running) return;
|
|
110
|
+
running = false;
|
|
111
|
+
clear();
|
|
112
|
+
element.textContent = current;
|
|
113
|
+
};
|
|
114
|
+
const resume = () => {
|
|
115
|
+
if (running || !visible || document.hidden) return;
|
|
116
|
+
if (!started) {
|
|
117
|
+
begin();
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
running = true;
|
|
121
|
+
cycleTimer = setTimeout(tick, reduced ? REDUCED_MS : HOLD_MS);
|
|
122
|
+
};
|
|
123
|
+
const observer = typeof IntersectionObserver === "undefined" ? null : new IntersectionObserver(([entry]) => {
|
|
124
|
+
visible = entry?.isIntersecting ?? true;
|
|
125
|
+
if (visible) resume();
|
|
126
|
+
else pause();
|
|
127
|
+
});
|
|
128
|
+
observer?.observe(element);
|
|
129
|
+
const onVisibility = () => document.hidden ? pause() : resume();
|
|
130
|
+
document.addEventListener("visibilitychange", onVisibility);
|
|
131
|
+
resume();
|
|
132
|
+
return () => {
|
|
133
|
+
clear();
|
|
134
|
+
observer?.disconnect();
|
|
135
|
+
document.removeEventListener("visibilitychange", onVisibility);
|
|
136
|
+
};
|
|
137
|
+
}, [
|
|
138
|
+
key,
|
|
139
|
+
effect,
|
|
140
|
+
held,
|
|
141
|
+
reduced
|
|
142
|
+
]);
|
|
143
|
+
return /* @__PURE__ */ jsxs("p", {
|
|
144
|
+
ref,
|
|
145
|
+
"data-slot": "text-scramble",
|
|
146
|
+
className: cn(className),
|
|
147
|
+
...props,
|
|
148
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
149
|
+
className: "sr-only",
|
|
150
|
+
children: label
|
|
151
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
152
|
+
ref: text,
|
|
153
|
+
"data-slot": "text-scramble-text",
|
|
154
|
+
"aria-hidden": "true",
|
|
155
|
+
children: phrases[0]
|
|
156
|
+
})]
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
//#endregion
|
|
160
|
+
export { TextScramble };
|
|
@@ -3,6 +3,7 @@ import { cn } from "../lib/cn.js";
|
|
|
3
3
|
import { agentColor } from "./agent-color.js";
|
|
4
4
|
import { CheckGlyph } from "./_glyphs.js";
|
|
5
5
|
import { FOCUS_RING_OFFSET_2 } from "../system/_focus-ring.js";
|
|
6
|
+
import { FIELD_RADIUS } from "../system/_style-field-chassis.js";
|
|
6
7
|
import { Spinner } from "../primitives/spinner.js";
|
|
7
8
|
import * as React from "react";
|
|
8
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -53,7 +54,7 @@ const DelegationCard = React.forwardRef(function DelegationCard({ className, age
|
|
|
53
54
|
"data-direction": direction,
|
|
54
55
|
"data-state": open ? "open" : "closed",
|
|
55
56
|
"data-status": status,
|
|
56
|
-
className: cn(
|
|
57
|
+
className: cn(`flex min-w-0 flex-col gap-(--cue-space-2) ${FIELD_RADIUS} border border-border px-(--cue-space-3) py-(--cue-space-2)`, className),
|
|
57
58
|
style: {
|
|
58
59
|
"--agent-color": color,
|
|
59
60
|
...style
|
package/dist/chat/message.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { cn } from "../lib/cn.js";
|
|
2
2
|
import { AGENT_ROOT_COLOR, agentColor } from "./agent-color.js";
|
|
3
|
+
import { FIELD_RADIUS, FIELD_RADIUS_BL, FIELD_RADIUS_BR } from "../system/_style-field-chassis.js";
|
|
3
4
|
import { LABEL_FACE } from "../system/_style-label-face.js";
|
|
4
5
|
import { LABEL_CASE } from "../system/_style-label-case.js";
|
|
5
6
|
import { LABEL_TRACKING } from "../system/_style-label-tracking.js";
|
|
@@ -12,21 +13,19 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
12
13
|
*
|
|
13
14
|
* The tight corner is the tail, and it points at whoever is speaking: bottom
|
|
14
15
|
* right for the right-aligned user turn, bottom left for the agent's. Written
|
|
15
|
-
* as the overlay rung with one corner overridden to the
|
|
16
|
-
* than a `[border-radius: …]`
|
|
17
|
-
* directly — a `--radius-*` reader
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* covers every corner, not just the four edges), so the four-value shorthand
|
|
24
|
-
* upstream Tailwind has no plain form for is two ordinary utility classes.
|
|
16
|
+
* as the overlay rung with one corner overridden to the **field's** corner
|
|
17
|
+
* (`FIELD_RADIUS_BR`/`_BL`, 2026-10-04), rather than a `[border-radius: …]`
|
|
18
|
+
* arbitrary value reading `var(--radius-*)` directly — a `--radius-*` reader
|
|
19
|
+
* bypasses the bridge every other radius in this system resolves through, and
|
|
20
|
+
* would not tighten with `--cue-radius-scale`. The field's corner is the
|
|
21
|
+
* control's under every set that names no `style-field-radius`, so the tail is
|
|
22
|
+
* what it always was there; under a set whose controls are pills (Prism,
|
|
23
|
+
* Ledger) it stays a tail instead of swelling into a 9999px curve.
|
|
25
24
|
*/
|
|
26
25
|
const ROLE_RADII = {
|
|
27
|
-
user:
|
|
28
|
-
agent:
|
|
29
|
-
system:
|
|
26
|
+
user: `rounded-overlay ${FIELD_RADIUS_BR}`,
|
|
27
|
+
agent: `rounded-overlay ${FIELD_RADIUS_BL}`,
|
|
28
|
+
system: FIELD_RADIUS
|
|
30
29
|
};
|
|
31
30
|
/**
|
|
32
31
|
* Fill per role.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
//#region src/chrome/announcement-bar.d.ts
|
|
3
|
+
/** The bar's one link. */
|
|
4
|
+
interface AnnouncementBarAction {
|
|
5
|
+
/** The link's text, e.g. "Read the notes". */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Where it goes. */
|
|
8
|
+
href: string;
|
|
9
|
+
}
|
|
10
|
+
interface AnnouncementBarProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
11
|
+
/** The one line. */
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
/** One link, read as the bar's action. */
|
|
14
|
+
action?: AnnouncementBarAction;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* One line across the top of a page, and one link: a launch, a change, a date.
|
|
18
|
+
*
|
|
19
|
+
* Filled in the accent, centred, and as short as its line. It is not a
|
|
20
|
+
* notification: it says the same thing to every reader and cannot be dismissed,
|
|
21
|
+
* so use `Toast` or `Alert` for anything that is about the reader.
|
|
22
|
+
*
|
|
23
|
+
* Static markup — no `"use client"`.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* <AnnouncementBar action={{ label: "Learn more", href: "/changelog" }}>Plans for teams are here.</AnnouncementBar>
|
|
27
|
+
*/
|
|
28
|
+
declare const AnnouncementBar: React.ForwardRefExoticComponent<AnnouncementBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { AnnouncementBar, AnnouncementBarAction, AnnouncementBarProps };
|
|
@@ -0,0 +1,38 @@
|
|
|
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/announcement-bar.tsx
|
|
5
|
+
/**
|
|
6
|
+
* One line across the top of a page, and one link: a launch, a change, a date.
|
|
7
|
+
*
|
|
8
|
+
* Filled in the accent, centred, and as short as its line. It is not a
|
|
9
|
+
* notification: it says the same thing to every reader and cannot be dismissed,
|
|
10
|
+
* so use `Toast` or `Alert` for anything that is about the reader.
|
|
11
|
+
*
|
|
12
|
+
* Static markup — no `"use client"`.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* <AnnouncementBar action={{ label: "Learn more", href: "/changelog" }}>Plans for teams are here.</AnnouncementBar>
|
|
16
|
+
*/
|
|
17
|
+
const AnnouncementBar = React.forwardRef(function AnnouncementBar({ className, children, action, ...elementProps }, ref) {
|
|
18
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
19
|
+
ref,
|
|
20
|
+
"data-slot": "announcement-bar",
|
|
21
|
+
className: cn("flex w-full flex-wrap items-center justify-center gap-x-(--cue-space-3) bg-accent-fill px-(--cue-space-5) py-(--cue-space-2) text-center text-(length:--cue-text-ui) text-accent-fill-fg", className),
|
|
22
|
+
...elementProps,
|
|
23
|
+
children: [/* @__PURE__ */ jsx("span", { children }), action === void 0 ? null : /* @__PURE__ */ jsxs("a", {
|
|
24
|
+
href: action.href,
|
|
25
|
+
className: "font-semibold underline underline-offset-4",
|
|
26
|
+
children: [
|
|
27
|
+
action.label,
|
|
28
|
+
" ",
|
|
29
|
+
/* @__PURE__ */ jsx("span", {
|
|
30
|
+
"aria-hidden": "true",
|
|
31
|
+
children: "→"
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
})]
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
//#endregion
|
|
38
|
+
export { AnnouncementBar };
|
package/dist/chrome/app-bar.d.ts
CHANGED
|
@@ -15,7 +15,10 @@ interface AppBarRootProps extends React.ComponentPropsWithoutRef<"header"> {
|
|
|
15
15
|
}
|
|
16
16
|
type AppBarBrandProps = Omit<LinkProps, "variant" | "external">;
|
|
17
17
|
interface AppBarNavProps extends Omit<React.ComponentPropsWithoutRef<"nav">, "children"> {
|
|
18
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Where the links sit when they are narrower than the space. Omitted, the style
|
|
20
|
+
* set's `style-nav-align` decides, and without one it is `"end"`.
|
|
21
|
+
*/
|
|
19
22
|
align?: "start" | "center" | "end";
|
|
20
23
|
/**
|
|
21
24
|
* What the navigation does when the links do not fit. Defaults to `"scroll"`.
|
package/dist/chrome/app-bar.js
CHANGED
|
@@ -89,6 +89,11 @@ const NAV_ALIGN = {
|
|
|
89
89
|
end: "justify-end"
|
|
90
90
|
};
|
|
91
91
|
/**
|
|
92
|
+
* The style set's nav alignment (structural Looks, spec 2026-10-02 §3.5), for a nav
|
|
93
|
+
* whose caller named none: `flex-end` unset, which is what `justify-end` draws.
|
|
94
|
+
*/
|
|
95
|
+
const NAV_ALIGN_FROM_SET = "[justify-content:var(--cue-style-nav-align,flex-end)]";
|
|
96
|
+
/**
|
|
92
97
|
* The `<nav>` landmark between the brand and the actions, and the one part of
|
|
93
98
|
* the bar that gives up width.
|
|
94
99
|
*
|
|
@@ -102,14 +107,14 @@ const NAV_ALIGN = {
|
|
|
102
107
|
* scroll to reach it. Aligning the frame and letting the nav grow from its
|
|
103
108
|
* start keeps every link reachable at every width.
|
|
104
109
|
*/
|
|
105
|
-
const AppBarNav = React.forwardRef(function AppBarNav({ className, frameClassName, align
|
|
110
|
+
const AppBarNav = React.forwardRef(function AppBarNav({ className, frameClassName, align, overflow = "scroll", previousLabel = "Show earlier links", nextLabel = "Show later links", ...elementProps }, ref) {
|
|
106
111
|
return /* @__PURE__ */ jsx(EdgeScrollNav, {
|
|
107
112
|
ref,
|
|
108
113
|
"data-slot": "app-bar-nav",
|
|
109
114
|
scrolls: overflow === "scroll",
|
|
110
115
|
previousLabel,
|
|
111
116
|
nextLabel,
|
|
112
|
-
frameClassName: cn("min-w-0 flex-1", NAV_ALIGN[align], frameClassName),
|
|
117
|
+
frameClassName: cn("min-w-0 flex-1", align === void 0 ? NAV_ALIGN_FROM_SET : NAV_ALIGN[align], frameClassName),
|
|
113
118
|
className: cn("flex min-w-0 items-center gap-(--cue-space-4)", className),
|
|
114
119
|
...elementProps
|
|
115
120
|
});
|
package/dist/chrome/app-shell.js
CHANGED
|
@@ -10,6 +10,13 @@ import { DRAG_CLASSES, NO_DRAG_CLASSES } from "./_drag.js";
|
|
|
10
10
|
import * as React from "react";
|
|
11
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
//#region src/chrome/app-shell.tsx
|
|
13
|
+
/**
|
|
14
|
+
* A style set's page ground (structural Looks, spec 2026-10-02 §3.1): a gradient of
|
|
15
|
+
* the theme's own inks, tiled or not. The frame is the one element that covers the
|
|
16
|
+
* whole window, so the ground lands here. Unset, every reader falls back to the
|
|
17
|
+
* value it had — no image, `auto`, `no-repeat` — and the frame paints as it did.
|
|
18
|
+
*/
|
|
19
|
+
const PAGE_GROUND_CLASSES = "[background-image:var(--cue-style-page-ground-image,none)] [background-size:var(--cue-style-page-ground-tile,auto)] [background-repeat:var(--cue-style-page-ground-repeat,no-repeat)]";
|
|
13
20
|
const AppShellContext = React.createContext({
|
|
14
21
|
navOpen: false,
|
|
15
22
|
setNavOpen: () => {},
|
|
@@ -114,7 +121,7 @@ const AppShell = {
|
|
|
114
121
|
ref,
|
|
115
122
|
"data-slot": "app-shell",
|
|
116
123
|
"data-rail": rail ? "" : void 0,
|
|
117
|
-
className: cn("group/app-shell relative flex h-dvh flex-col overflow-clip bg-bg text-fg", TEXTURE_CLASSES, className),
|
|
124
|
+
className: cn("group/app-shell relative flex h-dvh flex-col overflow-clip bg-bg text-fg", TEXTURE_CLASSES, PAGE_GROUND_CLASSES, className),
|
|
118
125
|
style: {
|
|
119
126
|
[NAV_WIDTH_PROPERTY]: rail ? railWidth : navWidth,
|
|
120
127
|
...style
|
package/dist/chrome/band.d.ts
CHANGED
|
@@ -76,7 +76,9 @@ interface BandProps extends React.ComponentPropsWithoutRef<"section"> {
|
|
|
76
76
|
* nothing and they do not vanish symmetrically: `--cue-band-ground` is
|
|
77
77
|
* `transparent` on `:root` and on every set but `marketing` and `kiln`, so a
|
|
78
78
|
* `"ground"` paints nothing on most pages, while `--cue-band-rule` is `0px`
|
|
79
|
-
* under those two
|
|
79
|
+
* under those two and under `ledger` and `prism`, which separate bands by
|
|
80
|
+
* rhythm alone (and `prism`'s by a ground image, `style-band-ground-image`).
|
|
81
|
+
* Both are deliberate and nothing warns.
|
|
80
82
|
*
|
|
81
83
|
* **Two substitution boundaries, because `--cue-band-y` is a `calc()` resolved
|
|
82
84
|
* at the element that declares it.** A `<Density>` island nested inside a
|
package/dist/chrome/band.js
CHANGED
|
@@ -3,13 +3,12 @@ import { TEXTURE_CLASSES } from "../system/_paint-texture.js";
|
|
|
3
3
|
import { Container } from "../layout/container.js";
|
|
4
4
|
import { bandClasses } from "./_band.js";
|
|
5
5
|
import { BAND_BROAD_WIDTH, BAND_Y_HALVES } from "../system/_style-band.js";
|
|
6
|
-
import { GROUND_PATTERN_CLASSES } from "../system/_paint-ground-pattern.js";
|
|
7
6
|
import * as React from "react";
|
|
8
7
|
import { jsx } from "react/jsx-runtime";
|
|
9
8
|
//#region src/chrome/band.tsx
|
|
10
9
|
const SEPARATION_PAINT = {
|
|
11
10
|
rule: "border-(--cue-band-rule-color)",
|
|
12
|
-
ground: `bg-(--cue-band-ground)
|
|
11
|
+
ground: `bg-(--cue-band-ground) [background-image:var(--cue-paint-ground-pattern,none),var(--cue-style-band-ground-image,none)] [background-size:var(--cue-paint-ground-pattern-size,auto),auto] ${TEXTURE_CLASSES} before:[mask-image:linear-gradient(var(--cue-band-ground),var(--cue-band-ground)),var(--cue-paint-fade)] before:[-webkit-mask-image:linear-gradient(var(--cue-band-ground),var(--cue-band-ground)),var(--cue-paint-fade)]`,
|
|
13
12
|
bleed: null,
|
|
14
13
|
none: null
|
|
15
14
|
};
|
|
@@ -32,7 +31,9 @@ const SEPARATION_PAINT = {
|
|
|
32
31
|
* nothing and they do not vanish symmetrically: `--cue-band-ground` is
|
|
33
32
|
* `transparent` on `:root` and on every set but `marketing` and `kiln`, so a
|
|
34
33
|
* `"ground"` paints nothing on most pages, while `--cue-band-rule` is `0px`
|
|
35
|
-
* under those two
|
|
34
|
+
* under those two and under `ledger` and `prism`, which separate bands by
|
|
35
|
+
* rhythm alone (and `prism`'s by a ground image, `style-band-ground-image`).
|
|
36
|
+
* Both are deliberate and nothing warns.
|
|
36
37
|
*
|
|
37
38
|
* **Two substitution boundaries, because `--cue-band-y` is a `calc()` resolved
|
|
38
39
|
* at the element that declares it.** A `<Density>` island nested inside a
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
//#region src/chrome/hero.d.ts
|
|
3
|
+
interface HeroProps extends Omit<React.ComponentPropsWithoutRef<"section">, "title"> {
|
|
4
|
+
/** A short line above the title, usually an `Eyebrow`. */
|
|
5
|
+
eyebrow?: React.ReactNode;
|
|
6
|
+
/** The title's first line. A hero without a title is a band; use `Band`. */
|
|
7
|
+
title: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* The title's second line, drawn in the style set's second ink: the accent, a
|
|
10
|
+
* muted ink or the keyword gradient, by the Look. Omit it for a one-line title.
|
|
11
|
+
*/
|
|
12
|
+
titleSecond?: React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* The title's heading level. `1`, the default, is a page's opening; `2` or `3`
|
|
15
|
+
* is a hero that opens a section under the page's own `<h1>`, or a preview of
|
|
16
|
+
* one on a page about something else.
|
|
17
|
+
*/
|
|
18
|
+
level?: 1 | 2 | 3;
|
|
19
|
+
/** The sentence under the title. */
|
|
20
|
+
lede?: React.ReactNode;
|
|
21
|
+
/** The calls to action, usually a primary and a secondary `Button`. */
|
|
22
|
+
actions?: React.ReactNode;
|
|
23
|
+
/** Art beside or behind the words: a `Motif`, an image, a product shot. */
|
|
24
|
+
media?: React.ReactNode;
|
|
25
|
+
/** A row of figures under the lede, usually a `StatBand`. */
|
|
26
|
+
stats?: React.ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* `page` draws the hero on the page's own ground. `inverse` draws it as a dark
|
|
29
|
+
* card on any page — its whole colour scope flipped, controls and focus included —
|
|
30
|
+
* which is how a report opens on a light page. Defaults to `"page"`.
|
|
31
|
+
*/
|
|
32
|
+
surface?: "page" | "inverse";
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The opening of a page: a title, the line under it, what to do next, and art.
|
|
36
|
+
*
|
|
37
|
+
* **The Look decides the arrangement, not this component.** The grid reads the
|
|
38
|
+
* style set's hero recipe — `style-hero-columns`, `style-hero-align` and
|
|
39
|
+
* `style-hero-media-order` — so the same hero opens centred under one Look, with
|
|
40
|
+
* its art beside the words under another, and with the art first under a third,
|
|
41
|
+
* with no prop changed. Unset, it is one column, start-aligned, art after the
|
|
42
|
+
* words.
|
|
43
|
+
*
|
|
44
|
+
* **No media, one column**, whatever the recipe says: two columns with nothing in
|
|
45
|
+
* the second is half a page of nothing.
|
|
46
|
+
*
|
|
47
|
+
* `surface="inverse"` is a theme island in dark mode, so every ink inside it —
|
|
48
|
+
* the title, the lede, a button's fill and its focus ring — is the dark palette's,
|
|
49
|
+
* and an overlay opened from it inherits that. The island carries
|
|
50
|
+
* `data-cue-rescope`, where the token build re-declares the active set's and
|
|
51
|
+
* pack's inks, so the card is right in the first frame, before hydration.
|
|
52
|
+
*
|
|
53
|
+
* Static markup — no `"use client"`.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* <Hero eyebrow={<Eyebrow>Category report</Eyebrow>} title="Snacks & nuts" titleSecond="Range review"
|
|
57
|
+
* lede="Every recommendation has a boundary." actions={<Button>Open the report</Button>} />
|
|
58
|
+
*/
|
|
59
|
+
declare const Hero: React.ForwardRefExoticComponent<HeroProps & React.RefAttributes<HTMLElement>>;
|
|
60
|
+
//#endregion
|
|
61
|
+
export { Hero, HeroProps };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { cn } from "../lib/cn.js";
|
|
2
|
+
import { ThemeProvider } from "../system/theme-provider.js";
|
|
3
|
+
import { BODY_VOICE } from "../system/_style-body.js";
|
|
4
|
+
import { LEDE_INK, LEDE_LEADING, LEDE_SIZE, LEDE_TRACKING } from "../system/_style-lede.js";
|
|
5
|
+
import { HERO_TITLE_VOICE } from "../system/_style-hero-title.js";
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
//#region src/chrome/hero.tsx
|
|
9
|
+
/**
|
|
10
|
+
* The second title line's ink (spec 2026-10-02 §3.1, §15.2). A colour by default;
|
|
11
|
+
* under a set whose line takes the keyword gradient, the build restates the
|
|
12
|
+
* colour as the accent and derives a fill, a clip and a text fill, so the
|
|
13
|
+
* gradient paints the glyphs through `background-clip: text`. Each derived
|
|
14
|
+
* name's fallback is the property's own initial value, so a line no set
|
|
15
|
+
* touches computes exactly what it did. All of it sits behind
|
|
16
|
+
* `@supports (background-clip: text)`, so a browser that cannot clip keeps the
|
|
17
|
+
* solid accent; forced colours drop the image and the transparent fill, as
|
|
18
|
+
* `Keyword` does.
|
|
19
|
+
*/
|
|
20
|
+
const TITLE_SECOND = "block text-[color:var(--cue-style-hero-title-ink-2,var(--cue-fg))] supports-[background-clip:text]:[background-image:var(--cue-style-hero-title-fill-2,none)] supports-[background-clip:text]:[background-clip:var(--cue-style-hero-title-clip-2,border-box)] supports-[background-clip:text]:[-webkit-background-clip:var(--cue-style-hero-title-clip-2,border-box)] supports-[background-clip:text]:[-webkit-text-fill-color:var(--cue-style-hero-title-text-2,currentcolor)] forced-colors:[background-image:none] forced-colors:[-webkit-text-fill-color:CanvasText]";
|
|
21
|
+
/**
|
|
22
|
+
* The opening of a page: a title, the line under it, what to do next, and art.
|
|
23
|
+
*
|
|
24
|
+
* **The Look decides the arrangement, not this component.** The grid reads the
|
|
25
|
+
* style set's hero recipe — `style-hero-columns`, `style-hero-align` and
|
|
26
|
+
* `style-hero-media-order` — so the same hero opens centred under one Look, with
|
|
27
|
+
* its art beside the words under another, and with the art first under a third,
|
|
28
|
+
* with no prop changed. Unset, it is one column, start-aligned, art after the
|
|
29
|
+
* words.
|
|
30
|
+
*
|
|
31
|
+
* **No media, one column**, whatever the recipe says: two columns with nothing in
|
|
32
|
+
* the second is half a page of nothing.
|
|
33
|
+
*
|
|
34
|
+
* `surface="inverse"` is a theme island in dark mode, so every ink inside it —
|
|
35
|
+
* the title, the lede, a button's fill and its focus ring — is the dark palette's,
|
|
36
|
+
* and an overlay opened from it inherits that. The island carries
|
|
37
|
+
* `data-cue-rescope`, where the token build re-declares the active set's and
|
|
38
|
+
* pack's inks, so the card is right in the first frame, before hydration.
|
|
39
|
+
*
|
|
40
|
+
* Static markup — no `"use client"`.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* <Hero eyebrow={<Eyebrow>Category report</Eyebrow>} title="Snacks & nuts" titleSecond="Range review"
|
|
44
|
+
* lede="Every recommendation has a boundary." actions={<Button>Open the report</Button>} />
|
|
45
|
+
*/
|
|
46
|
+
const Hero = React.forwardRef(function Hero({ className, eyebrow, title, titleSecond, level = 1, lede, actions, media, stats, surface = "page", ...elementProps }, ref) {
|
|
47
|
+
const words = /* @__PURE__ */ jsxs("div", {
|
|
48
|
+
"data-slot": "hero-words",
|
|
49
|
+
className: "flex min-w-0 flex-col gap-(--cue-space-5) [align-items:var(--cue-style-hero-align,start)] [text-align:var(--cue-style-hero-align,start)]",
|
|
50
|
+
children: [
|
|
51
|
+
eyebrow,
|
|
52
|
+
/* @__PURE__ */ jsxs(level === 3 ? "h3" : level === 2 ? "h2" : "h1", {
|
|
53
|
+
"data-slot": "hero-title",
|
|
54
|
+
className: cn(HERO_TITLE_VOICE, "m-0"),
|
|
55
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
56
|
+
className: "block",
|
|
57
|
+
children: title
|
|
58
|
+
}), titleSecond === void 0 ? null : /* @__PURE__ */ jsx("span", {
|
|
59
|
+
"data-slot": "hero-title-second",
|
|
60
|
+
className: TITLE_SECOND,
|
|
61
|
+
children: titleSecond
|
|
62
|
+
})]
|
|
63
|
+
}),
|
|
64
|
+
lede === void 0 ? null : /* @__PURE__ */ jsx("p", {
|
|
65
|
+
"data-slot": "hero-lede",
|
|
66
|
+
className: cn(BODY_VOICE, LEDE_SIZE, LEDE_LEADING, LEDE_TRACKING, LEDE_INK, "m-0 max-w-[48ch]"),
|
|
67
|
+
children: lede
|
|
68
|
+
}),
|
|
69
|
+
actions === void 0 ? null : /* @__PURE__ */ jsx("div", {
|
|
70
|
+
"data-slot": "hero-actions",
|
|
71
|
+
className: "flex flex-wrap items-center gap-(--cue-space-3) [justify-content:var(--cue-style-hero-align,start)]",
|
|
72
|
+
children: actions
|
|
73
|
+
}),
|
|
74
|
+
stats === void 0 ? null : /* @__PURE__ */ jsx("div", {
|
|
75
|
+
"data-slot": "hero-stats",
|
|
76
|
+
className: "w-full",
|
|
77
|
+
children: stats
|
|
78
|
+
})
|
|
79
|
+
]
|
|
80
|
+
});
|
|
81
|
+
const body = /* @__PURE__ */ jsxs("div", {
|
|
82
|
+
"data-slot": "hero-grid",
|
|
83
|
+
"data-media": media === void 0 ? void 0 : "",
|
|
84
|
+
className: cn("grid w-full items-center gap-(--cue-space-7)", media === void 0 ? "grid-cols-1" : "grid-cols-1 md:[grid-template-columns:var(--cue-style-hero-columns,1fr)]"),
|
|
85
|
+
children: [words, media === void 0 ? null : /* @__PURE__ */ jsx("div", {
|
|
86
|
+
"data-slot": "hero-media",
|
|
87
|
+
className: "min-w-0 [order:var(--cue-style-hero-media-order,1)]",
|
|
88
|
+
children: media
|
|
89
|
+
})]
|
|
90
|
+
});
|
|
91
|
+
return /* @__PURE__ */ jsx("section", {
|
|
92
|
+
ref,
|
|
93
|
+
"data-slot": "hero",
|
|
94
|
+
"data-surface": surface,
|
|
95
|
+
className: cn("w-full", className),
|
|
96
|
+
...elementProps,
|
|
97
|
+
children: surface === "inverse" ? /* @__PURE__ */ jsx(ThemeProvider, {
|
|
98
|
+
mode: "dark",
|
|
99
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
100
|
+
"data-cue-rescope": "",
|
|
101
|
+
className: "rounded-surface bg-bg p-(--cue-space-7) text-fg",
|
|
102
|
+
children: body
|
|
103
|
+
})
|
|
104
|
+
}) : body
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
//#endregion
|
|
108
|
+
export { Hero };
|
package/dist/chrome/index.d.ts
CHANGED
|
@@ -21,4 +21,9 @@ import { ScrollableTabsList, ScrollableTabsListProps, Tabs, TabsListProps, TabsP
|
|
|
21
21
|
import { TitleBar, TitleBarProps } from "./title-bar.js";
|
|
22
22
|
import { Tree, TreeProps, TreeVisibility, TreeVisibilityToggle, TreeVisibilityToggleProps } from "./tree.js";
|
|
23
23
|
import { Toolbar, ToolbarButtonProps, ToolbarGroupProps, ToolbarRootProps, ToolbarSeparatorProps } from "./toolbar.js";
|
|
24
|
-
|
|
24
|
+
import { AnnouncementBar, AnnouncementBarAction, AnnouncementBarProps } from "./announcement-bar.js";
|
|
25
|
+
import { Hero, HeroProps } from "./hero.js";
|
|
26
|
+
import { Keyword, KeywordProps } from "./keyword.js";
|
|
27
|
+
import { LogoStrip, LogoStripProps } from "./logo-strip.js";
|
|
28
|
+
import { StatBand, StatBandProps, StatBandStat } from "./stat-band.js";
|
|
29
|
+
export { AnnouncementBar, type AnnouncementBarAction, type AnnouncementBarProps, AppBar, type AppBarActionsProps, type AppBarBrandProps, type AppBarLinkProps, type AppBarNavProps, type AppBarRegister, type AppBarRootProps, type AppBarSeparatorProps, AppShell, type AppShellAsideProps, type AppShellBarProps, type AppShellBodyProps, type AppShellContentProps, type AppShellNavTriggerProps, type AppShellRootProps, type AppShellScrollerProps, type AppShellSidebarProps, Band, type BandProps, type BandSeparation, type BandWidth, type BarOverflow, EmptyState, type EmptyStateProps, Eyebrow, type EyebrowProps, Footer, type FooterProps, Hero, type HeroProps, Inspector, type InspectorFooterProps, type InspectorRootProps, type InspectorRowProps, type InspectorSectionProps, Keyword, type KeywordProps, LogoStrip, type LogoStripProps, 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, StatBand, type StatBandProps, type StatBandStat, StatusBar, type StatusBarGroupProps, type StatusBarItemProps, type StatusBarProminence, 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 };
|
package/dist/chrome/index.js
CHANGED
|
@@ -19,4 +19,9 @@ import { ScrollableTabsList, Tabs } from "./tabs.js";
|
|
|
19
19
|
import { TitleBar } from "./title-bar.js";
|
|
20
20
|
import { Tree, TreeVisibilityToggle } from "./tree.js";
|
|
21
21
|
import { Toolbar } from "./toolbar.js";
|
|
22
|
-
|
|
22
|
+
import { AnnouncementBar } from "./announcement-bar.js";
|
|
23
|
+
import { Hero } from "./hero.js";
|
|
24
|
+
import { Keyword } from "./keyword.js";
|
|
25
|
+
import { LogoStrip } from "./logo-strip.js";
|
|
26
|
+
import { StatBand } from "./stat-band.js";
|
|
27
|
+
export { AnnouncementBar, AppBar, AppShell, Band, EmptyState, Eyebrow, Footer, Hero, Inspector, Keyword, LogoStrip, NavigationMenu, PageShell, Panel, PanelHeader, Row, ScrollArea, ScrollableTabsList, SeamList, SectionHeader, SegmentedControl, StatBand, StatusBar, TAB_FADE_PX, TREE_GUIDE_GLYPHS, Tabs, TitleBar, Toolbar, Tree, TreeVisibilityToggle, computeScrollEdges, edgeFadeMask, flattenTree, rowVariants };
|