@sdxc/ui 2026.11.4 → 2026.11.11

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/README.md CHANGED
@@ -245,7 +245,7 @@ Landing bands, composition craft and animated visuals. Every piece imports from
245
245
 
246
246
  - `LandingHero` — eyebrow, display title, lead, `CtaGroup`, `note`, `proof`, media (`mediaPlacement`: `below` | `end` | `background`).
247
247
  - `ProofStrip` — compact ruled band for `LogoCloud` and/or `StatStrip` children.
248
- - `FeatureBand` — header + `layout`: `split` | `grid` | `steps` | `stage` | `timeline`.
248
+ - `FeatureBand` — header + `layout`: `split` | `grid` | `steps` | `stage` | `timeline`; split `mediaSide` (`start` | `end`) and `lean`.
249
249
  - `PricingBand`, `PricingBand.Plan` — plan cards; a `featured` plan inverts and leads on phones.
250
250
  - `TestimonialBand`, `TestimonialBand.Quote` — quote cards in masonry columns.
251
251
  - `FaqBand` — header + one or two `Accordion` columns (`columns={1|2}`).
@@ -260,6 +260,8 @@ Landing bands, composition craft and animated visuals. Every piece imports from
260
260
  **Composition craft**
261
261
 
262
262
  - `ProductFrame` — window/device chrome (`stage`, `shadow`, `lights`, `title`, `url`, `footer`), and `designWidth` + `fit` to crop or scale a desktop composition on phones.
263
+ - `PhoneFrame`, `screenCorners` — ink phone bezel around a capture or live screen (`bezel`, or `--app-bezel`).
264
+ - `PhoneFan` — three phones (`start` / `front` / `end`) fanned on a pausable bobbing stage.
263
265
  - `CodeStage` / `TerminalPanel` — titled mono panel (`variant`: `code` | `terminal` | `slab`, `language`, `lineNumbers`, `tabs`).
264
266
  - `InstallTabs`, `InstallTabs.Option` — radio dialect strip (no JS).
265
267
  - `TabbedStage`, `TabbedStage.Item` — tabs or a vertical rail controlling a media panel (no JS).
@@ -17,7 +17,7 @@ export declare namespace InstallCommand {
17
17
  type Manager = "npm" | "pnpm" | "yarn" | "bun";
18
18
  /** Props accepted by {@link InstallCommand}. */
19
19
  interface Props extends Omit<TagProps<"form">, "children" | "aria-label" | "title"> {
20
- /** Package specifiers to install, such as `["@sdxc/ui", "remix@3.1.0"]`. */
20
+ /** Package specifiers to install, such as `["@sdxc/ui", "remix@3.2.0"]`. */
21
21
  packages: readonly string[];
22
22
  /** Installs them as development dependencies. */
23
23
  dev?: boolean;
@@ -58,6 +58,12 @@ export declare namespace FeatureBand {
58
58
  * Media for `layout="split"`. Every other layout carries its media in its items.
59
59
  */
60
60
  media?: RemixNode;
61
+ /**
62
+ * Which side the media column sits on when `layout="split"`. Defaults to `"end"`
63
+ * (copy then media). `"start"` puts media first and leans the wide track that way
64
+ * unless `lean` is set.
65
+ */
66
+ mediaSide?: "start" | "end";
61
67
  /** Which column is wider when `layout="split"`. */
62
68
  lean?: Split.Lean;
63
69
  /** Grid column count when `layout="grid"`. */
@@ -97,6 +103,8 @@ export declare namespace FeatureBand {
97
103
  * <ul><li>{t("f1.claim")}</li></ul>
98
104
  * </FeatureBand>
99
105
  * @example
106
+ * <FeatureBand layout="split" mediaSide="start" title={t("f2.title")} media={shot}>{claims}</FeatureBand>
107
+ * @example
100
108
  * <FeatureBand layout="stage" id="how" title={t("how.title")}>
101
109
  * <TabbedStage.Item value="detect" label={t("how.detect")} defaultChecked>{shot}</TabbedStage.Item>
102
110
  * </FeatureBand>
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "remix/component/jsx-runtime";
2
2
  import { raw } from "@sdxc/u/general";
3
3
  import { vstack } from "@sdxc/u/layout";
4
4
  import { HeadingScope } from "../components/heading-scope.js";
@@ -26,6 +26,8 @@ const DEFAULT_TONE = "plain";
26
26
  * <ul><li>{t("f1.claim")}</li></ul>
27
27
  * </FeatureBand>
28
28
  * @example
29
+ * <FeatureBand layout="split" mediaSide="start" title={t("f2.title")} media={shot}>{claims}</FeatureBand>
30
+ * @example
29
31
  * <FeatureBand layout="stage" id="how" title={t("how.title")}>
30
32
  * <TabbedStage.Item value="detect" label={t("how.detect")} defaultChecked>{shot}</TabbedStage.Item>
31
33
  * </FeatureBand>
@@ -36,10 +38,12 @@ const DEFAULT_TONE = "plain";
36
38
  */
37
39
  export function FeatureBand(handle) {
38
40
  return () => {
39
- let { children, columns, gridVariant, description, eyebrow, eyebrowHref, eyebrowIndex, eyebrowVariant, id, layout, lean, media, mix, parts, ruled, spacing, stageLabel, stageName, title, tone, ...rest } = handle.props;
41
+ let { children, columns, gridVariant, description, eyebrow, eyebrowHref, eyebrowIndex, eyebrowVariant, id, layout, lean, media, mediaSide, mix, parts, ruled, spacing, stageLabel, stageName, title, tone, ...rest } = handle.props;
40
42
  let resolvedLayout = layout ?? DEFAULT_LAYOUT;
41
43
  let resolvedTone = tone ?? DEFAULT_TONE;
42
44
  let resolvedSpacing = spacing ?? "normal";
45
+ let mediaOnStart = mediaSide === "start";
46
+ let resolvedLean = lean ?? (mediaOnStart ? "copy" : "media");
43
47
  let body = _jsx("div", { mix: [vstack({ gap: 4, align: "stretch" })], children: children });
44
48
  let isSplit = resolvedLayout === "split" && media !== undefined;
45
49
  let isSelfScoped = resolvedLayout === "grid" || resolvedLayout === "steps" || resolvedLayout === "timeline";
@@ -60,7 +64,9 @@ export function FeatureBand(handle) {
60
64
  description: parts?.description,
61
65
  }, children: title }));
62
66
  if (isSplit) {
63
- return (_jsx(LandingSection, { ...rest, id: id, tone: resolvedTone, spacing: resolvedSpacing, ruled: ruled, mix: mix, children: _jsxs(Split, { lean: lean, children: [_jsxs(Split.Copy, { checks: Boolean(children), children: [header, _jsx(HeadingScope, { children: children })] }), _jsx(Split.Media, { mix: [parts?.media], children: _jsx(HeadingScope, { children: media }) })] }) }));
67
+ let copy = (_jsxs(Split.Copy, { checks: Boolean(children), children: [header, _jsx(HeadingScope, { children: children })] }));
68
+ let mediaColumn = (_jsx(Split.Media, { mix: [parts?.media], children: _jsx(HeadingScope, { children: media }) }));
69
+ return (_jsx(LandingSection, { ...rest, id: id, tone: resolvedTone, spacing: resolvedSpacing, ruled: ruled, mix: mix, children: _jsx(Split, { lean: resolvedLean, "data-media-side": mediaOnStart ? "start" : "end", children: mediaOnStart ? (_jsxs(_Fragment, { children: [mediaColumn, copy] })) : (_jsxs(_Fragment, { children: [copy, mediaColumn] })) }) }));
64
70
  }
65
71
  return (_jsx(LandingSection, { ...rest, id: id, tone: resolvedTone, spacing: resolvedSpacing, ruled: ruled, mix: mix, children: _jsxs("div", { mix: [vstack({ gap: 0, align: "stretch" })], children: [header, isSelfScoped ? body : _jsx(HeadingScope, { children: body })] }) }));
66
72
  };
@@ -33,6 +33,8 @@ export * from "./logo-cloud.js";
33
33
  export * from "./logo-sentence.js";
34
34
  export * from "./marquee.js";
35
35
  export * from "./motion-loop.js";
36
+ export * from "./phone-fan.js";
37
+ export * from "./phone-frame.js";
36
38
  export * from "./pricing-band.js";
37
39
  export * from "./product-frame.js";
38
40
  export * from "./proof-strip.js";
@@ -33,6 +33,8 @@ export * from "./logo-cloud.js";
33
33
  export * from "./logo-sentence.js";
34
34
  export * from "./marquee.js";
35
35
  export * from "./motion-loop.js";
36
+ export * from "./phone-fan.js";
37
+ export * from "./phone-frame.js";
36
38
  export * from "./pricing-band.js";
37
39
  export * from "./product-frame.js";
38
40
  export * from "./proof-strip.js";
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Three phones on a landing stage: the front screen readable, two more fanned behind it
3
+ * once the column is wide enough, floating on staggered bobs inside a pausable loop.
4
+ *
5
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
6
+ * @copyright Sergio Xalambrí 2026
7
+ */
8
+ import type { Handle, Props as TagProps, RemixNode } from "remix/component";
9
+ /**
10
+ * Prop types for {@link PhoneFan}.
11
+ */
12
+ export declare namespace PhoneFan {
13
+ /**
14
+ * Props accepted by {@link PhoneFan}.
15
+ */
16
+ interface Props extends TagProps<"div"> {
17
+ /** Accessible name of the stage as a whole. */
18
+ label: string;
19
+ /** Accessible name of the pause toggle. Forwarded to {@link MotionLoop}. */
20
+ pauseLabel?: string;
21
+ /** Phone behind the front on the inline start, tilted out. */
22
+ start: RemixNode;
23
+ /** Leading phone in the middle of the fan. */
24
+ front: RemixNode;
25
+ /** Phone behind the front on the inline end, tilted out. */
26
+ end: RemixNode;
27
+ }
28
+ }
29
+ /**
30
+ * Lays three phone screens as a fan: side phones hide on a narrow column and tilt out from
31
+ * `md`, all floating on staggered bobs that {@link MotionLoop} can pause.
32
+ *
33
+ * @param handle Runtime handle carrying the host `<div>`'s props.
34
+ * @returns The render function producing the stage.
35
+ * @example
36
+ * <PhoneFan label={t("phones.label")} pauseLabel={t("pause")} start={left} front={hero} end={right} />
37
+ */
38
+ export declare function PhoneFan(handle: Handle<PhoneFan.Props>): () => import("remix/component").RemixElement;
@@ -0,0 +1,89 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
2
+ import { keyframes } from "@sdxc/u/animation";
3
+ import { raw } from "@sdxc/u/general";
4
+ import { hidden, hstack } from "@sdxc/u/layout";
5
+ import { at, motionSafe } from "@sdxc/u/responsive";
6
+ import { MotionLoop } from "./motion-loop.js";
7
+ /** Container the fan queries so side phones appear only when the stage has room. */
8
+ const FAN_CONTAINER = "ui-landing-phone-fan";
9
+ /**
10
+ * A slow bob that keeps a phone feeling held. Delay offsets neighbours so they never rise
11
+ * together; reduced-motion visitors see the rest pose.
12
+ *
13
+ * @param name Unique keyframe name for this bob.
14
+ * @param delay Negative delay so the loop is mid-cycle on first paint.
15
+ * @param rise How far the host lifts at the peak.
16
+ * @param rotate Resting tilt kept through the motion so float does not flatten it.
17
+ */
18
+ function bob(name, delay, rise, rotate) {
19
+ return [
20
+ keyframes(name, {
21
+ "0%, 100%": { translate: "0 0", rotate },
22
+ "50%": { translate: `0 ${rise}`, rotate },
23
+ }),
24
+ motionSafe(raw({
25
+ animationName: name,
26
+ animationDuration: "5.5s",
27
+ animationTimingFunction: "ease-in-out",
28
+ animationIterationCount: "infinite",
29
+ animationDelay: delay,
30
+ })),
31
+ ];
32
+ }
33
+ /**
34
+ * Lays three phone screens as a fan: side phones hide on a narrow column and tilt out from
35
+ * `md`, all floating on staggered bobs that {@link MotionLoop} can pause.
36
+ *
37
+ * @param handle Runtime handle carrying the host `<div>`'s props.
38
+ * @returns The render function producing the stage.
39
+ * @example
40
+ * <PhoneFan label={t("phones.label")} pauseLabel={t("pause")} start={left} front={hero} end={right} />
41
+ */
42
+ export function PhoneFan(handle) {
43
+ return () => {
44
+ let { end, front, label, mix, pauseLabel, start, ...rest } = handle.props;
45
+ return (_jsx(MotionLoop, { pauseLabel: pauseLabel, mix: mix, ...rest, children: _jsx("div", { role: "img", "aria-label": label, "data-slot": "phone-fan", mix: [
46
+ raw({
47
+ "--phone": "min(14rem, 58cqi)",
48
+ position: "relative",
49
+ isolation: "isolate",
50
+ overflow: "visible",
51
+ paddingBlock: "0.75rem 1.25rem",
52
+ containerType: "inline-size",
53
+ containerName: FAN_CONTAINER,
54
+ }),
55
+ ], children: _jsxs("div", { "data-slot": "phone-fan-row", mix: [hstack({ gap: 0, align: "start", justify: "center" })], children: [_jsx(FannedPhone, { side: "start", children: start }), _jsx("div", { "data-slot": "phone-fan-front", mix: [
56
+ raw({
57
+ inlineSize: "var(--phone)",
58
+ flexShrink: "0",
59
+ zIndex: "1",
60
+ transformOrigin: "50% 100%",
61
+ }),
62
+ bob("ui-phone-fan-front", "-0.4s", "-0.55rem", "-1.5deg"),
63
+ ], children: front }), _jsx(FannedPhone, { side: "end", children: end })] }) }) }));
64
+ };
65
+ }
66
+ /**
67
+ * A phone tilted out from behind the front screen once the stage is wide enough; on a
68
+ * narrow column the front phone stands alone. The tilt is baked into its bob so the float
69
+ * never erases it.
70
+ */
71
+ function FannedPhone(handle) {
72
+ return () => {
73
+ let start = handle.props.side === "start";
74
+ let rotate = start ? "-7deg" : "7deg";
75
+ return (_jsx("div", { "data-slot": "phone-fan-side", "data-side": handle.props.side, mix: [
76
+ hidden(),
77
+ at("md", FAN_CONTAINER, raw({
78
+ display: "block",
79
+ flexShrink: "0",
80
+ inlineSize: "var(--phone)",
81
+ marginBlockStart: "calc(var(--phone) * 0.18)",
82
+ marginInline: start ? "0 calc(var(--phone) * -0.12)" : "calc(var(--phone) * -0.12) 0",
83
+ scale: "0.86",
84
+ transformOrigin: start ? "100% 0%" : "0% 0%",
85
+ })),
86
+ at("md", FAN_CONTAINER, bob(start ? "ui-phone-fan-start" : "ui-phone-fan-end", start ? "-1.2s" : "-2.8s", "-0.4rem", rotate)),
87
+ ], children: handle.props.children }));
88
+ };
89
+ }
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Hardware chrome for a phone screenshot or live screen on a landing: an ink bezel in the
3
+ * proportions of a tall capture, and the screen's rounded corners, at the width the column
4
+ * gives it. Pair with {@link PhoneFan} when several screens share a stage.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import type { Handle, Props as TagProps, RemixNode } from "remix/component";
10
+ /**
11
+ * Prop types for {@link PhoneFrame}.
12
+ */
13
+ export declare namespace PhoneFrame {
14
+ /**
15
+ * Props accepted by {@link PhoneFrame}.
16
+ */
17
+ interface Props extends TagProps<"div"> {
18
+ /**
19
+ * Bezel fill. Defaults to `var(--app-bezel)` so a page can paint every phone from one
20
+ * token, then to {@link DEFAULT_BEZEL} when that token is unset.
21
+ */
22
+ bezel?: string;
23
+ /** The screen: a capture, a `picture`, or live UI, clipped with {@link screenCorners}. */
24
+ children: RemixNode;
25
+ }
26
+ }
27
+ /**
28
+ * The bezel around a phone screen. The capture carries its own status bar, so the frame
29
+ * adds only the hardware rim.
30
+ *
31
+ * @param handle Runtime handle carrying the host `<div>`'s props.
32
+ * @returns The render function producing the bezel.
33
+ * @example
34
+ * <PhoneFrame bezel="#1a0830">
35
+ * <img src={shot} alt={t("phone.alt")} mix={[screenCorners()]} />
36
+ * </PhoneFrame>
37
+ */
38
+ export declare function PhoneFrame(handle: Handle<PhoneFrame.Props>): () => import("remix/component").RemixElement;
39
+ /**
40
+ * The corners of the screen inside a {@link PhoneFrame}, for the element that holds the
41
+ * capture, so the picture itself clips and the bezel hugs it.
42
+ *
43
+ * @returns A `css()` mixin for the screen element.
44
+ * @example
45
+ * <img src={shot} alt="" mix={[screenCorners()]} />
46
+ */
47
+ export declare function screenCorners(): import("packages/u/src").UtilityMixin<Element>;
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx } from "remix/component/jsx-runtime";
2
+ import { raw, mergeMix } from "@sdxc/u/general";
3
+ import { is, p } from "@sdxc/u/size";
4
+ /** Fallback ink when the page has not set `--app-bezel`. */
5
+ const DEFAULT_BEZEL = "#161412";
6
+ /**
7
+ * The bezel around a phone screen. The capture carries its own status bar, so the frame
8
+ * adds only the hardware rim.
9
+ *
10
+ * @param handle Runtime handle carrying the host `<div>`'s props.
11
+ * @returns The render function producing the bezel.
12
+ * @example
13
+ * <PhoneFrame bezel="#1a0830">
14
+ * <img src={shot} alt={t("phone.alt")} mix={[screenCorners()]} />
15
+ * </PhoneFrame>
16
+ */
17
+ export function PhoneFrame(handle) {
18
+ return () => {
19
+ let { bezel, children, mix, ...rest } = handle.props;
20
+ return (_jsx("div", { ...rest, "data-slot": "phone-frame", mix: mergeMix([
21
+ is("full"),
22
+ p(1.5),
23
+ raw({
24
+ backgroundColor: bezel ?? `var(--app-bezel, ${DEFAULT_BEZEL})`,
25
+ borderRadius: "15% / 7%",
26
+ boxShadow: "inset 0 0 0 1px rgb(255 255 255 / 0.12)",
27
+ }),
28
+ ], mix), children: children }));
29
+ };
30
+ }
31
+ /**
32
+ * The corners of the screen inside a {@link PhoneFrame}, for the element that holds the
33
+ * capture, so the picture itself clips and the bezel hugs it.
34
+ *
35
+ * @returns A `css()` mixin for the screen element.
36
+ * @example
37
+ * <img src={shot} alt="" mix={[screenCorners()]} />
38
+ */
39
+ export function screenCorners() {
40
+ return raw({ overflow: "hidden", borderRadius: "12.5% / 5.8%" });
41
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdxc/ui",
3
- "version": "2026.11.4",
3
+ "version": "2026.11.11",
4
4
  "description": "Styled, accessible remix/component components rendered as server HTML",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -28,16 +28,16 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@remix-run/ui": "0.12.1",
31
- "@sdxc/highlight": "2026.11.3",
32
- "@sdxc/icons": "2026.11.3",
31
+ "@sdxc/highlight": "2026.11.10",
32
+ "@sdxc/icons": "2026.11.10",
33
33
  "@sdxc/iife": "2026.10.23",
34
- "@sdxc/u": "2026.11.3",
35
- "@sdxc/uuid": "2026.11.3"
34
+ "@sdxc/u": "2026.11.10",
35
+ "@sdxc/uuid": "2026.11.10"
36
36
  },
37
37
  "peerDependencies": {
38
- "remix": "3.1.0"
38
+ "remix": "3.2.0"
39
39
  },
40
- "gitHead": "f9b4adfc3d85b98a3d628b69cc2e1b9c0b7af2d8",
40
+ "gitHead": "7c45be8b647bb2ac1d5300de8b80f267d7442139",
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },