suabochica-design-system 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,28 @@ Unreleased until a version is published.
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## [1.3.0] - 2026-11-06
10
+
11
+ ### Added
12
+
13
+ - SiteHeader accepts an optional packaged portrait for the brand and a controlled
14
+ native Light/Dark/System selector, with a responsive layout and a Storybook
15
+ preview that switches the theme of its content.
16
+ - ScrollTrack organism: a pure-CSS scroll-driven isometric stage with three
17
+ abstract role layers (Developer, Designer, Manager by default). A named view
18
+ timeline tilts the rig and focuses each layer in depth while captions
19
+ crossfade; base styles render a static exploded stack under reduced motion or
20
+ without `animation-timeline` support. No JavaScript. React/Astro and
21
+ plain-HTML/Hugo share the same `sua-scroll-track*` classes and packaged CSS.
22
+ Long card/caption copy is height-capped with line clamps so descriptions
23
+ never overlap the stage.
24
+
25
+ ### Validation record
26
+
27
+ 189 Jest tests and 544 Chromium checks passed in the pinned browser container,
28
+ including 24 screenshot comparisons across light and dark themes, plus packed
29
+ Astro/Hugo installs of the 1.3.0 tarball.
30
+
9
31
  ## [1.2.0] - 2026-11-06
10
32
 
11
33
  ### Added
@@ -143,3 +165,4 @@ choosing the first release. See [RELEASE.md](RELEASE.md) for the sequence.
143
165
  [1.0.0]: https://github.com/suabochica/suabochica-storybook/releases/tag/v1.0.0
144
166
  [1.1.0]: https://github.com/suabochica/suabochica-storybook/releases/tag/v1.1.0
145
167
  [1.2.0]: https://github.com/suabochica/suabochica-storybook/releases/tag/v1.2.0
168
+ [1.3.0]: https://github.com/suabochica/suabochica-storybook/releases/tag/v1.3.0
package/DISTRIBUTION.md CHANGED
@@ -15,10 +15,10 @@ pnpm pack --pack-destination /path/to/existing/output-directory
15
15
  ```
16
16
 
17
17
  `prepack` rebuilds the artifact, so packing never silently ships stale output.
18
- Install the generated `suabochica-design-system-1.2.0.tgz` in a separate consumer:
18
+ Install the generated `suabochica-design-system-1.3.0.tgz` in a separate consumer:
19
19
 
20
20
  ```sh
21
- pnpm add /path/to/suabochica-design-system-1.2.0.tgz react@19.3.1 react-dom@19.3.1
21
+ pnpm add /path/to/suabochica-design-system-1.3.0.tgz react@19.3.1 react-dom@19.3.1
22
22
  ```
23
23
 
24
24
  ```tsx
@@ -54,6 +54,7 @@ no consumer Tailwind plugin or library-source scanning requirement.
54
54
  | `suabochica-design-system/icons/*.svg` | Nine pinned Iconoir regular SVGs for static HTML/Hugo use |
55
55
  | `suabochica-design-system/icons/LICENSE` | Iconoir MIT copyright and license notice |
56
56
  | `suabochica-design-system/icons/manifest.json` | Curated icon names and upstream version |
57
+ | `suabochica-design-system/images/*.png` | Packaged SiteHeader portrait for optional brand imagery |
57
58
  | `suabochica-design-system/package.json` | Metadata and location for static asset tooling |
58
59
 
59
60
  - ESM only; use `import`, not CommonJS `require` for the component entry.
package/MIGRATION.md CHANGED
@@ -96,8 +96,9 @@ rather than porting routes/content logic into the library.
96
96
  fixtures are verified; the actual portfolio/blog repositories and their versions
97
97
  need separate integration review. Alternate React/framework versions are not
98
98
  established by those fixture results.
99
- - **Packaging:** `suabochica-design-system@1.2.0` is published, including the
100
- Icon atom. Packed ESM builds are verified.
99
+ - **Packaging:** `suabochica-design-system@1.3.0` is published, including the
100
+ Icon atom, SiteHeader portrait/theme selector, and ScrollTrack. Packed ESM
101
+ builds are verified.
101
102
  Arbitrary consumer Tailwind utilities are not generated by the precompiled
102
103
  stylesheet.
103
104
  - **Behavior:** apps own validation/announcements, routing, data fetching, CMS/
package/README.md CHANGED
@@ -23,7 +23,7 @@ pnpm pack --pack-destination /path/to/existing/output-directory
23
23
  resulting tarball in your React application:
24
24
 
25
25
  ```sh
26
- pnpm add /path/to/suabochica-design-system-1.2.0.tgz react@19.3.1 react-dom@19.3.1
26
+ pnpm add /path/to/suabochica-design-system-1.3.0.tgz react@19.3.1 react-dom@19.3.1
27
27
  ```
28
28
 
29
29
  Import styles once in the application layout and components from the public entry:
@@ -273,6 +273,15 @@ never claims payment receipt; hydration is optional. See
273
273
  [`src/components/ReaderSupport/README.md`](src/components/ReaderSupport/README.md)
274
274
  for configuration, clipboard/no-JavaScript behavior, and the Hugo shortcode.
275
275
 
276
+ **Organisms → ScrollTrack** is a pure-CSS scroll-driven isometric stage: three
277
+ abstract role layers (developer, designer, manager by default) separate in 3D
278
+ and focus one at a time while captions crossfade. Base styles render a static
279
+ stack for reduced motion and browsers without animation timelines; no
280
+ JavaScript is required. Card and caption blurbs are height-capped so long copy
281
+ never collides with the stage. See
282
+ [`src/components/ScrollTrack/README.md`](src/components/ScrollTrack/README.md)
283
+ for props, the motion contract, and the plain-HTML/Hugo markup.
284
+
276
285
  **Templates → PortfolioIndexTemplate** and **Pages → Portfolio** demonstrate a
277
286
  complete portfolio composition with skip navigation, project and writing
278
287
  collections, optional content/footer slots, and alternating project media. See
package/dist/js/index.js CHANGED
@@ -541,7 +541,7 @@ function CodeBlock({ code, children, language, caption, className, ...props }) {
541
541
  function isWide(element) {
542
542
  return element !== null && window.getComputedStyle(element).getPropertyValue("--sua-header-wide").trim() === "1";
543
543
  }
544
- function SiteHeader({ brand, items, currentKey, navigationLabel = "Primary", menuLabel = "Menu", numbered = true, className, ref, onClick, onKeyDown, ...props }) {
544
+ function SiteHeader({ brand, items, currentKey, navigationLabel = "Primary", menuLabel = "Menu", numbered = true, themeSelector, className, ref, onClick, onKeyDown, ...props }) {
545
545
  const rootRef = useRef(null);
546
546
  const toggleRef = useRef(null);
547
547
  const navigationRef = useRef(null);
@@ -555,7 +555,7 @@ function SiteHeader({ brand, items, currentKey, navigationLabel = "Primary", men
555
555
  currentKey,
556
556
  hasLinks
557
557
  });
558
- const { label: brandLabel, className: brandClassName, ...brandProps } = brand;
558
+ const { label: brandLabel, imageSrc, className: brandClassName, ...brandProps } = brand;
559
559
  useImperativeHandle(ref, () => rootRef.current, []);
560
560
  useEffect(() => {
561
561
  let previousWide = isWide(rootRef.current);
@@ -642,12 +642,43 @@ function SiteHeader({ brand, items, currentKey, navigationLabel = "Primary", men
642
642
  /* @__PURE__ */ jsxs(TextLink, {
643
643
  ...brandProps,
644
644
  className: cx("sua-site-header__brand", brandClassName),
645
- children: [/* @__PURE__ */ jsx("span", {
646
- className: "sua-site-header__brand-label",
647
- children: brandLabel
648
- }), /* @__PURE__ */ jsx("span", {
649
- className: "sua-site-header__brand-dot",
650
- "aria-hidden": "true"
645
+ children: [
646
+ imageSrc && /* @__PURE__ */ jsx("img", {
647
+ className: "sua-site-header__portrait",
648
+ src: imageSrc,
649
+ alt: "",
650
+ width: "40",
651
+ height: "40"
652
+ }),
653
+ /* @__PURE__ */ jsx("span", {
654
+ className: "sua-site-header__brand-label",
655
+ children: brandLabel
656
+ }),
657
+ !imageSrc && /* @__PURE__ */ jsx("span", {
658
+ className: "sua-site-header__brand-dot",
659
+ "aria-hidden": "true"
660
+ })
661
+ ]
662
+ }),
663
+ themeSelector && /* @__PURE__ */ jsxs("label", {
664
+ className: "sua-site-header__theme",
665
+ children: [/* @__PURE__ */ jsx("span", { children: themeSelector.label ?? "Theme" }), /* @__PURE__ */ jsxs("select", {
666
+ value: themeSelector.value,
667
+ onChange: (event) => themeSelector.onChange(event.currentTarget.value),
668
+ children: [
669
+ /* @__PURE__ */ jsx("option", {
670
+ value: "light",
671
+ children: "Light"
672
+ }),
673
+ /* @__PURE__ */ jsx("option", {
674
+ value: "dark",
675
+ children: "Dark"
676
+ }),
677
+ /* @__PURE__ */ jsx("option", {
678
+ value: "system",
679
+ children: "System"
680
+ })
681
+ ]
651
682
  })]
652
683
  }),
653
684
  hasLinks && /* @__PURE__ */ jsx(Button, {
@@ -980,6 +1011,119 @@ function ReaderSupport({ amounts = suggestedAmounts, defaultAmount, breBKey = "3
980
1011
  })
981
1012
  });
982
1013
  }
1014
+ // src/components/ScrollTrack/ScrollTrack.tsx
1015
+ var defaultLayers = [
1016
+ {
1017
+ id: "developer",
1018
+ title: "Developer",
1019
+ description: "Ships reliable code, owns architecture, and turns ideas into working software."
1020
+ },
1021
+ {
1022
+ id: "designer",
1023
+ title: "Designer",
1024
+ description: "Shapes clear interfaces and visual systems that feel effortless to use."
1025
+ },
1026
+ {
1027
+ id: "manager",
1028
+ title: "Manager",
1029
+ description: "Aligns people and priorities so teams deliver the right things on time."
1030
+ }
1031
+ ];
1032
+ function stageClass(index) {
1033
+ return Math.min(index + 1, 3);
1034
+ }
1035
+ function padIndex(index) {
1036
+ return String(index + 1).padStart(2, "0");
1037
+ }
1038
+ function LayerCard({ layer, index }) {
1039
+ return /* @__PURE__ */ jsx("article", {
1040
+ className: cx("sua-scroll-track__layer", `sua-scroll-track__layer--${stageClass(index)}`),
1041
+ "aria-hidden": "true",
1042
+ children: /* @__PURE__ */ jsxs("div", {
1043
+ className: "sua-scroll-track__card",
1044
+ children: [
1045
+ /* @__PURE__ */ jsx("span", {
1046
+ className: "sua-scroll-track__card-meta",
1047
+ children: layer.icon ? /* @__PURE__ */ jsx(Icon, {
1048
+ name: layer.icon,
1049
+ size: "md",
1050
+ className: "sua-scroll-track__card-icon"
1051
+ }) : /* @__PURE__ */ jsx("span", {
1052
+ className: "sua-scroll-track__card-index",
1053
+ children: padIndex(index)
1054
+ })
1055
+ }),
1056
+ /* @__PURE__ */ jsx("p", {
1057
+ className: "sua-scroll-track__card-title",
1058
+ children: layer.title
1059
+ }),
1060
+ /* @__PURE__ */ jsx("p", {
1061
+ className: "sua-scroll-track__card-body",
1062
+ children: layer.description
1063
+ })
1064
+ ]
1065
+ })
1066
+ });
1067
+ }
1068
+ function ScrollTrack({ title = "How I work", description, headingLevel = 2, layers = defaultLayers, hint = "Scroll to explore", className, ...props }) {
1069
+ const titleId = `${useId()}-title`;
1070
+ return /* @__PURE__ */ jsxs("section", {
1071
+ ...props,
1072
+ "aria-labelledby": titleId,
1073
+ className: cx("sua-scroll-track", "sua-not-prose", className),
1074
+ children: [/* @__PURE__ */ jsxs("div", {
1075
+ className: "sua-scroll-track__intro",
1076
+ children: [/* @__PURE__ */ jsx(Heading, {
1077
+ id: titleId,
1078
+ level: headingLevel,
1079
+ size: "lg",
1080
+ children: title
1081
+ }), description ? /* @__PURE__ */ jsx(Text, {
1082
+ tone: "muted",
1083
+ children: description
1084
+ }) : null]
1085
+ }), /* @__PURE__ */ jsx("div", {
1086
+ className: "sua-scroll-track__track",
1087
+ children: /* @__PURE__ */ jsxs("div", {
1088
+ className: "sua-scroll-track__stage",
1089
+ children: [/* @__PURE__ */ jsxs("div", {
1090
+ className: "sua-scroll-track__scene",
1091
+ children: [/* @__PURE__ */ jsx("div", {
1092
+ className: "sua-scroll-track__rig",
1093
+ children: layers.map((layer, index) => /* @__PURE__ */ jsx(LayerCard, {
1094
+ layer,
1095
+ index
1096
+ }, layer.id))
1097
+ }), /* @__PURE__ */ jsx("ol", {
1098
+ className: "sua-scroll-track__captions",
1099
+ children: layers.map((layer, index) => /* @__PURE__ */ jsxs("li", {
1100
+ className: cx("sua-scroll-track__caption", `sua-scroll-track__caption--${stageClass(index)}`),
1101
+ children: [
1102
+ /* @__PURE__ */ jsx("span", {
1103
+ className: "sua-scroll-track__caption-index",
1104
+ "aria-hidden": "true",
1105
+ children: padIndex(index)
1106
+ }),
1107
+ /* @__PURE__ */ jsx("strong", {
1108
+ className: "sua-scroll-track__caption-title",
1109
+ children: layer.title
1110
+ }),
1111
+ /* @__PURE__ */ jsx("span", {
1112
+ className: "sua-scroll-track__caption-body",
1113
+ children: layer.description
1114
+ })
1115
+ ]
1116
+ }, layer.id))
1117
+ })]
1118
+ }), /* @__PURE__ */ jsx("p", {
1119
+ className: "sua-scroll-track__hint",
1120
+ "aria-hidden": "true",
1121
+ children: hint
1122
+ })]
1123
+ })
1124
+ })]
1125
+ });
1126
+ }
983
1127
  // src/templates/PortfolioIndexTemplate/PortfolioIndexTemplate.tsx
984
1128
  function hasContent$1(content) {
985
1129
  return content != null && typeof content !== "boolean" && content !== "";
@@ -1203,6 +1347,6 @@ function ArticleTemplate({ header, article, content, leadFigure, signOff, footer
1203
1347
  ]
1204
1348
  });
1205
1349
  }
1206
- export { ArticleBody, ArticleScrollRegion, ArticleSummaryCard, ArticleTemplate, Badge, Badge as Tag, Surface as Box, Surface, Button, CodeBlock, Container, Figure, FormField, Grid, GridItem, Heading, Icon, Label, MetadataRow, NavLinkGroup, PortfolioIndexTemplate, ProjectShowcaseCard, ReaderSupport, SiteHeader, Stack, Text, TextInput, TextLink };
1350
+ export { ArticleBody, ArticleScrollRegion, ArticleSummaryCard, ArticleTemplate, Badge, Badge as Tag, Surface as Box, Surface, Button, CodeBlock, Container, Figure, FormField, Grid, GridItem, Heading, Icon, Label, MetadataRow, NavLinkGroup, PortfolioIndexTemplate, ProjectShowcaseCard, ReaderSupport, ScrollTrack, SiteHeader, Stack, Text, TextInput, TextLink };
1207
1351
 
1208
1352
  //# sourceMappingURL=index.js.map