@nicolassancho/storybook-core 4.2.0 → 4.2.2

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
@@ -17,8 +17,10 @@ documented in Storybook. It is published to npm as `@nicolassancho/storybook-cor
17
17
  `prefers-reduced-motion` support. [axe](https://github.com/dequelabs/axe-core) runs on every story
18
18
  in CI, and a violation fails the build. Automated checks catch only part of what matters, so this
19
19
  is a safety net, not a claim of WCAG conformance.
20
- - **Works from Next.js Server Components.** The components are stateless, so they carry no
21
- `"use client"` directive and render on the server with no client JavaScript.
20
+ - **Server Components first.** Presentational components are stateless, so they carry no
21
+ `"use client"` directive and render on the server with no client JavaScript. A component that needs
22
+ interaction marks itself as a client component, and the package check verifies that the directive
23
+ survives the build.
22
24
  - **Bring your own router and image component.** Navigation uses `href` and renders a plain `<a>`
23
25
  by default. Pass `LinkComponent` (e.g. `next/link`) or `ImageComponent` (e.g. `next/image`) to
24
26
  plug in your framework.
@@ -11,5 +11,5 @@ const detailsStyles = tv({
11
11
  });
12
12
  export const ProductDetails = ({ details, className }) => {
13
13
  const styles = detailsStyles();
14
- return (_jsx("ul", { className: styles.base({ className }), children: details.map((item) => (_jsxs("li", { className: styles.item(), children: [_jsx(Text, { as: "span", weight: "semibold", className: styles.label(), children: item.label }), _jsx(Text, { as: "span", children: item.value })] }, item.label))) }));
14
+ return (_jsx("dl", { className: styles.base({ className }), children: details.map((item) => (_jsxs("div", { className: styles.item(), children: [_jsx("dt", { children: _jsx(Text, { as: "span", weight: "semibold", className: styles.label(), children: item.label }) }), _jsx("dd", { children: _jsx(Text, { as: "span", children: item.value }) })] }, item.label))) }));
15
15
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nicolassancho/storybook-core",
3
- "version": "4.2.0",
3
+ "version": "4.2.2",
4
4
  "description": "Accessible React + Tailwind component library built with tailwind-variants and documented in Storybook.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",