@sdxc/ui 2026.10.28 → 2026.10.30

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.
Files changed (64) hide show
  1. package/README.md +41 -4
  2. package/dist/components/accordion.d.ts +3 -1
  3. package/dist/components/accordion.js +3 -1
  4. package/dist/components/button.d.ts +4 -0
  5. package/dist/components/button.js +2 -0
  6. package/dist/components/card.d.ts +6 -4
  7. package/dist/components/carousel.d.ts +15 -0
  8. package/dist/components/carousel.js +15 -0
  9. package/dist/components/cta-group.d.ts +45 -0
  10. package/dist/components/cta-group.js +26 -0
  11. package/dist/components/empty.d.ts +5 -3
  12. package/dist/components/feature.d.ts +102 -0
  13. package/dist/components/feature.js +150 -0
  14. package/dist/components/heading.d.ts +20 -4
  15. package/dist/components/heading.js +25 -11
  16. package/dist/components/index.d.ts +7 -0
  17. package/dist/components/index.js +7 -0
  18. package/dist/components/link-button.d.ts +2 -0
  19. package/dist/components/logo-cloud.d.ts +42 -0
  20. package/dist/components/logo-cloud.js +41 -0
  21. package/dist/components/marketing-header.d.ts +71 -0
  22. package/dist/components/marketing-header.js +81 -0
  23. package/dist/components/marketing-section.d.ts +87 -0
  24. package/dist/components/marketing-section.js +117 -0
  25. package/dist/components/nav-link.d.ts +2 -1
  26. package/dist/components/split.d.ts +69 -0
  27. package/dist/components/split.js +116 -0
  28. package/dist/components/stat-strip.d.ts +55 -0
  29. package/dist/components/stat-strip.js +65 -0
  30. package/dist/patterns/accent-text.d.ts +30 -0
  31. package/dist/patterns/accent-text.js +17 -0
  32. package/dist/patterns/announcement-chip.d.ts +41 -0
  33. package/dist/patterns/announcement-chip.js +49 -0
  34. package/dist/patterns/bento.d.ts +68 -0
  35. package/dist/patterns/bento.js +94 -0
  36. package/dist/patterns/check-row.d.ts +67 -0
  37. package/dist/patterns/check-row.js +76 -0
  38. package/dist/patterns/closing-cta.d.ts +60 -0
  39. package/dist/patterns/closing-cta.js +31 -0
  40. package/dist/patterns/code-stage.d.ts +63 -0
  41. package/dist/patterns/code-stage.js +82 -0
  42. package/dist/patterns/faq-band.d.ts +69 -0
  43. package/dist/patterns/faq-band.js +43 -0
  44. package/dist/patterns/feature-band.d.ts +85 -0
  45. package/dist/patterns/feature-band.js +50 -0
  46. package/dist/patterns/icon-well.d.ts +38 -0
  47. package/dist/patterns/icon-well.js +38 -0
  48. package/dist/patterns/index.d.ts +23 -0
  49. package/dist/patterns/index.js +23 -0
  50. package/dist/patterns/install-tabs.d.ts +77 -0
  51. package/dist/patterns/install-tabs.js +87 -0
  52. package/dist/patterns/landing-hero.d.ts +93 -0
  53. package/dist/patterns/landing-hero.js +126 -0
  54. package/dist/patterns/product-frame.d.ts +60 -0
  55. package/dist/patterns/product-frame.js +70 -0
  56. package/dist/patterns/proof-strip.d.ts +48 -0
  57. package/dist/patterns/proof-strip.js +29 -0
  58. package/dist/patterns/step-list.d.ts +47 -0
  59. package/dist/patterns/step-list.js +85 -0
  60. package/dist/patterns/tabbed-stage.d.ts +74 -0
  61. package/dist/patterns/tabbed-stage.js +77 -0
  62. package/dist/styles/marketing.d.ts +12 -0
  63. package/dist/styles/marketing.js +17 -0
  64. package/package.json +3 -2
@@ -0,0 +1,85 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
2
+ import { bg, fg } from "@sdxc/u/color";
3
+ import { rounded } from "@sdxc/u/effects";
4
+ import { counterIncrement, counterReset, pseudoContent, raw } from "@sdxc/u/general";
5
+ import { absolute, container, gap, grid, gridTemplate, inlineFlex, items, justify, relative, repeat, vstack, } from "@sdxc/u/layout";
6
+ import { at } from "@sdxc/u/responsive";
7
+ import { bs, is, m, mbe } from "@sdxc/u/size";
8
+ import { after, before, not } from "@sdxc/u/state";
9
+ import { leading, pretty, text, textAlign, weight } from "@sdxc/u/typography";
10
+ import { resolveHeadingLevel, TAG_BY_LEVEL } from "../components/heading-scope.js";
11
+ /**
12
+ * Lays numbered steps in a responsive three-column track. A sizing wrapper is
13
+ * the named container; the `<ol>` holds the grid and `@container` column tracks
14
+ * so the query can restyle a descendant. Collapses below `xl` (64rem).
15
+ * Connector lines appear between items only when the track is wide.
16
+ *
17
+ * @param handle Runtime handle carrying the host `<ol>`'s props.
18
+ * @returns The render function producing the list's markup.
19
+ * @example
20
+ * <StepList>
21
+ * <StepList.Item title={t("step.one")}>{t("step.one.body")}</StepList.Item>
22
+ * <StepList.Item title={t("step.two")}>{t("step.two.body")}</StepList.Item>
23
+ * </StepList>
24
+ */
25
+ export function StepList(handle) {
26
+ return () => {
27
+ let { children, mix, ...rest } = handle.props;
28
+ return (_jsx("div", { mix: [container("ui-marketing-step-list")], children: _jsx("ol", { ...rest, "data-slot": "step-list", mix: [
29
+ counterReset("ui-marketing-step"),
30
+ raw({ listStyle: "none", padding: "0", margin: "0" }),
31
+ grid(),
32
+ gap(8),
33
+ gridTemplate({ columns: "minmax(0, 1fr)" }),
34
+ at("xl", "ui-marketing-step-list", gridTemplate({ columns: repeat(3, "minmax(0, 1fr)") })),
35
+ mix,
36
+ ], children: children }) }));
37
+ };
38
+ }
39
+ /**
40
+ * One numbered step: a brand medallion, a title, and supporting copy.
41
+ *
42
+ * @param handle Runtime handle carrying the host `<li>`'s props.
43
+ * @returns The render function producing the step's markup.
44
+ */
45
+ StepList.Item = function StepListItem(handle) {
46
+ return () => {
47
+ let { children, mix, title, ...rest } = handle.props;
48
+ let resolved = resolveHeadingLevel(handle);
49
+ let Tag = TAG_BY_LEVEL[resolved];
50
+ return (_jsxs("li", { ...rest, "data-slot": "step-list-item", mix: [
51
+ relative(),
52
+ vstack({ align: "center", gap: 4 }),
53
+ textAlign("center"),
54
+ counterIncrement("ui-marketing-step"),
55
+ before([
56
+ pseudoContent("counter(ui-marketing-step)"),
57
+ inlineFlex(),
58
+ items("center"),
59
+ justify("center"),
60
+ is(12),
61
+ bs(12),
62
+ mbe(2),
63
+ rounded("full"),
64
+ bg("brand.solid"),
65
+ fg("brand.onSolid"),
66
+ text("xl"),
67
+ weight("semibold"),
68
+ ]),
69
+ not(":last-child", after([
70
+ pseudoContent('""'),
71
+ absolute(),
72
+ raw({
73
+ insetBlockStart: "1.5rem",
74
+ insetInlineStart: "calc(50% + 2rem)",
75
+ inlineSize: "calc(100% - 4rem)",
76
+ blockSize: "2px",
77
+ backgroundColor: "var(--ui-neutral-border)",
78
+ display: "none",
79
+ }),
80
+ at("xl", "ui-marketing-step-list", raw({ display: "block" })),
81
+ ])),
82
+ mix,
83
+ ], children: [_jsx(Tag, { "data-slot": "step-list-title", "data-heading-level": resolved, mix: [m(0), text("xl"), weight("medium"), fg("neutral.emphasis")], children: title }), _jsx("div", { mix: [text("base"), leading("relaxed"), pretty(), fg("neutral")], children: children })] }));
84
+ };
85
+ };
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Pill tabs (icon + label) that reveal one media panel at a time. Selection is
3
+ * a radio group styled with CSS, so the stage works with JavaScript disabled.
4
+ * Labels, icons, and panel content stay on the page as props/children.
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 TabbedStage} and its compound parts.
12
+ */
13
+ export declare namespace TabbedStage {
14
+ /**
15
+ * Value {@link TabbedStage} provides so nested items share one radio name.
16
+ */
17
+ interface Context {
18
+ /** Radio `name` every item in this stage writes. */
19
+ name: string;
20
+ }
21
+ /**
22
+ * Props accepted by {@link TabbedStage}.
23
+ */
24
+ interface Props extends TagProps<"div"> {
25
+ /**
26
+ * Shared `name` for the radio group that switches panels. Required so
27
+ * multiple stages on one page stay independent.
28
+ */
29
+ name: string;
30
+ /** Accessible name for the stage. Required — the library ships no copy. */
31
+ "aria-label": string;
32
+ /** One or more {@link TabbedStage.Item} entries. */
33
+ children: RemixNode;
34
+ }
35
+ /**
36
+ * Props accepted by {@link TabbedStage.Item}.
37
+ */
38
+ interface ItemProps extends TagProps<"div"> {
39
+ /** Radio value written for this tab/panel pair. */
40
+ value: string;
41
+ /** Visible tab label. */
42
+ label: RemixNode;
43
+ /** Optional glyph shown before the label. */
44
+ icon?: RemixNode;
45
+ /**
46
+ * Marks this item as the initially selected one. Only one item in a
47
+ * stage should pass `defaultChecked`.
48
+ */
49
+ defaultChecked?: boolean;
50
+ /** Media or staged UI revealed when this tab is selected. */
51
+ children: RemixNode;
52
+ }
53
+ }
54
+ /**
55
+ * Host for pill tabs and their panels. Nest {@link TabbedStage.Item} children;
56
+ * each item pairs a tab with the media it reveals.
57
+ *
58
+ * @param handle Runtime handle carrying the host `<div>`'s props and providing
59
+ * {@link TabbedStage.Context}.
60
+ * @returns The render function producing the stage's markup.
61
+ * @example
62
+ * <TabbedStage name="demo" aria-label={t("stage.label")}>
63
+ * <TabbedStage.Item value="inbox" label={t("stage.inbox")} icon={inboxIcon} defaultChecked>
64
+ * {inboxShot}
65
+ * </TabbedStage.Item>
66
+ * <TabbedStage.Item value="board" label={t("stage.board")} icon={boardIcon}>
67
+ * {boardShot}
68
+ * </TabbedStage.Item>
69
+ * </TabbedStage>
70
+ */
71
+ export declare function TabbedStage(handle: Handle<TabbedStage.Props, TabbedStage.Context>): () => import("remix/component").RemixElement;
72
+ export declare namespace TabbedStage {
73
+ var Item: (handle: Handle<TabbedStage.ItemProps>) => () => import("remix/component").RemixElement;
74
+ }
@@ -0,0 +1,77 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
2
+ import { visuallyHidden } from "@sdxc/u/a11y";
3
+ import { bg, border, fg, outline } from "@sdxc/u/color";
4
+ import { rounded, transition } from "@sdxc/u/effects";
5
+ import { cursor, raw } from "@sdxc/u/general";
6
+ import { basis, center, flex, flexWrap, gap, hidden, inlineFlex, items, justify, } from "@sdxc/u/layout";
7
+ import { overflow } from "@sdxc/u/overflow";
8
+ import { p } from "@sdxc/u/size";
9
+ import { precededBy, when } from "@sdxc/u/state";
10
+ import { text, weight } from "@sdxc/u/typography";
11
+ /**
12
+ * Host for pill tabs and their panels. Nest {@link TabbedStage.Item} children;
13
+ * each item pairs a tab with the media it reveals.
14
+ *
15
+ * @param handle Runtime handle carrying the host `<div>`'s props and providing
16
+ * {@link TabbedStage.Context}.
17
+ * @returns The render function producing the stage's markup.
18
+ * @example
19
+ * <TabbedStage name="demo" aria-label={t("stage.label")}>
20
+ * <TabbedStage.Item value="inbox" label={t("stage.inbox")} icon={inboxIcon} defaultChecked>
21
+ * {inboxShot}
22
+ * </TabbedStage.Item>
23
+ * <TabbedStage.Item value="board" label={t("stage.board")} icon={boardIcon}>
24
+ * {boardShot}
25
+ * </TabbedStage.Item>
26
+ * </TabbedStage>
27
+ */
28
+ export function TabbedStage(handle) {
29
+ return () => {
30
+ let { mix, name, ...rest } = handle.props;
31
+ handle.context.set({ name });
32
+ return (_jsx("div", { ...rest, "data-slot": "tabbed-stage", "data-name": name, mix: [flex(), flexWrap("wrap"), justify("center"), gap(2, 6), mix] }));
33
+ };
34
+ }
35
+ /**
36
+ * One tab + panel pair. The pill label sits in the tab row; the panel spans
37
+ * the full stage width and reveals when its adjacent radio is checked.
38
+ *
39
+ * @param handle Runtime handle carrying the item's props.
40
+ * @returns The render function producing the item's markup.
41
+ */
42
+ TabbedStage.Item = function TabbedStageItem(handle) {
43
+ return () => {
44
+ let { children, defaultChecked, icon, label, mix, value, ...rest } = handle.props;
45
+ let context = handle.context.get(TabbedStage);
46
+ let groupName = context?.name ?? "tabbed-stage";
47
+ let inputId = `${groupName}-tab-${value}`;
48
+ return (_jsxs("div", { ...rest, "data-slot": "tabbed-stage-item", "data-value": value, mix: [raw({ display: "contents" }), mix], children: [_jsx("input", { type: "radio", name: groupName, id: inputId, value: value, defaultChecked: defaultChecked, mix: [visuallyHidden()] }), _jsxs("label", { htmlFor: inputId, mix: [
49
+ raw({ order: -1 }),
50
+ inlineFlex(),
51
+ items("center"),
52
+ justify("center"),
53
+ gap(2),
54
+ p(2, 3.5),
55
+ rounded("full"),
56
+ text("sm"),
57
+ weight("medium"),
58
+ fg("neutral"),
59
+ bg("neutral.tint"),
60
+ border({ color: "neutral", width: 1, style: "solid" }),
61
+ cursor("pointer"),
62
+ transition("color, background-color, border-color"),
63
+ precededBy("input:checked", [
64
+ bg("brand.solid"),
65
+ fg("brand.onSolid"),
66
+ border({ color: "brand", width: 1, style: "solid" }),
67
+ ]),
68
+ precededBy("input:focus-visible", outline({ color: "brand.ring", offset: 2 })),
69
+ ], children: [icon ? _jsx("span", { mix: [inlineFlex(), center()], children: icon }) : null, label] }), _jsx("div", { "data-slot": "tabbed-stage-panel", mix: [
70
+ basis("100%"),
71
+ hidden(),
72
+ overflow("hidden"),
73
+ rounded("xl"),
74
+ when(":is(input:checked) + label + &", raw({ display: "block" })),
75
+ ], children: children })] }));
76
+ };
77
+ };
@@ -106,3 +106,15 @@ export declare function marketingHairline<Node extends Element = Element>(): Mix
106
106
  export declare function logoCloudMark<Node extends Element = Element>(): MixinDescriptor<Node, [
107
107
  styles: CSSStyles
108
108
  ], ElementProps>;
109
+ /**
110
+ * Corner radius and soft elevation for a solid marketing CTA. Compose onto a
111
+ * {@link Button} or {@link LinkButton} in a hero {@link CtaGroup}; override
112
+ * `--ui-marketing-cta-radius` per brand for pill (`9999px`) vs soft-rect.
113
+ *
114
+ * @returns A `css()` mixin ready for a CTA control's `mix` prop.
115
+ * @example
116
+ * <Button size="lg" color="brand" mix={[marketingCtaChrome()]}>{label}</Button>;
117
+ */
118
+ export declare function marketingCtaChrome<Node extends Element = Element>(): MixinDescriptor<Node, [
119
+ styles: CSSStyles
120
+ ], ElementProps>;
@@ -206,3 +206,20 @@ export function logoCloudMark() {
206
206
  }),
207
207
  ]);
208
208
  }
209
+ /** Soft elevation a solid marketing CTA carries over the band behind it. */
210
+ const CTA_SHADOW = "0 1px 2px color-mix(in oklab, CanvasText 6%, transparent), 0 4px 12px color-mix(in oklab, CanvasText 8%, transparent)";
211
+ /**
212
+ * Corner radius and soft elevation for a solid marketing CTA. Compose onto a
213
+ * {@link Button} or {@link LinkButton} in a hero {@link CtaGroup}; override
214
+ * `--ui-marketing-cta-radius` per brand for pill (`9999px`) vs soft-rect.
215
+ *
216
+ * @returns A `css()` mixin ready for a CTA control's `mix` prop.
217
+ * @example
218
+ * <Button size="lg" color="brand" mix={[marketingCtaChrome()]}>{label}</Button>;
219
+ */
220
+ export function marketingCtaChrome() {
221
+ return raw({
222
+ borderRadius: "var(--ui-marketing-cta-radius, 0.5rem)",
223
+ boxShadow: CTA_SHADOW,
224
+ });
225
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdxc/ui",
3
- "version": "2026.10.28",
3
+ "version": "2026.10.30",
4
4
  "description": "Styled, accessible remix/component components rendered as server HTML",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -10,6 +10,7 @@
10
10
  "./animations": "./dist/animations/index.js",
11
11
  "./behaviors": "./dist/behaviors/index.js",
12
12
  "./mixins": "./dist/mixins/index.js",
13
+ "./patterns": "./dist/patterns/index.js",
13
14
  "./styles": "./dist/styles/index.js",
14
15
  "./utils": "./dist/utils/index.js",
15
16
  "./reset.css": "./src/reset.css",
@@ -26,7 +27,7 @@
26
27
  "peerDependencies": {
27
28
  "remix": "3.1.0"
28
29
  },
29
- "gitHead": "3925ab3050d9a10d86340267d73168bdc8d24531",
30
+ "gitHead": "b76637cea65a8310f966862a15bcaeb5a657d7b0",
30
31
  "publishConfig": {
31
32
  "access": "public"
32
33
  },