import type { ReactNode } from "react" import { sampleDataNotice } from "@hm-design/chart/examples" import { StorySection } from "@/components/story-page" // Storybook presentation only (not part of @hm-design/chart): the open Chart page layout (2026-11-12, user request). // Charts sit directly on the Storybook content background, without the example card (background, border, padding). Each chart // is one StorySection: H2 variant name → description (what the example shows) → thin section divider → optional toolbar → chart. // The charts themselves are the public @hm-design/chart components on the @hm-design/chart/examples sample data, with the same // props as the matching *Example card, so data, legend, tooltip and interaction are unchanged. No common layout change; the page // only sets the chart's own surface token (chartPageClass). /** * className of every Chart page's StoryPage. The charts sit on the Storybook content background (--hm-sem-bg-content), so the page * sets the chart's public surface token to it (2026-11-12): slice / segment gaps, Dot rings, label halos and the radial meter's * center read as background instead of white. Only the token value is set, as a consumer would; no chart internals are overridden. */ export const chartPageClass = "[--hm-chart-surface:var(--hm-sem-bg-content)]" /** One sample-data notice per page, instead of a badge and a notice under every chart. */ export function ChartSampleNotice() { return (
{sampleDataNotice}
) } /** * One chart of a Chart page. `toolbar` keeps the example card's control row (Select height, so the charts of a row start at the * same height); pass `null` for an empty row of that height next to charts that have one. */ export function ChartSpecimen({ title, description, toolbar, children, }: { title: string description?: ReactNode toolbar?: ReactNode children: ReactNode }) { return (