@senvenli/react 0.2.0 → 0.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.
Files changed (42) hide show
  1. package/dist/charts/chart-parts.d.ts +21 -5
  2. package/dist/charts/chart-parts.js +31 -15
  3. package/dist/charts/chart-parts.js.map +1 -1
  4. package/dist/charts/core-charts.d.ts +2 -2
  5. package/dist/charts/core-charts.js +2 -2
  6. package/dist/charts/core-charts.js.map +1 -1
  7. package/dist/charts/list-charts.d.ts +4 -4
  8. package/dist/charts/list-charts.js +8 -8
  9. package/dist/charts/list-charts.js.map +1 -1
  10. package/dist/charts/more-charts.d.ts +9 -7
  11. package/dist/charts/more-charts.js +12 -12
  12. package/dist/charts/more-charts.js.map +1 -1
  13. package/dist/charts/report-charts.d.ts +2 -2
  14. package/dist/charts/report-charts.js +4 -4
  15. package/dist/charts/report-charts.js.map +1 -1
  16. package/dist/collection/table.js +4 -1
  17. package/dist/collection/table.js.map +1 -1
  18. package/dist/navigation/accordion.js +1 -1
  19. package/dist/navigation/accordion.js.map +1 -1
  20. package/dist/navigation/navbar.js +4 -2
  21. package/dist/navigation/navbar.js.map +1 -1
  22. package/dist/navigation/pagination.js +1 -1
  23. package/dist/navigation/pagination.js.map +1 -1
  24. package/dist/navigation/tabs.js +2 -2
  25. package/dist/navigation/tabs.js.map +1 -1
  26. package/manifests/area-chart.json +46 -1
  27. package/manifests/bar-chart.json +46 -0
  28. package/manifests/bar-list.json +6 -0
  29. package/manifests/calendar-heatmap.json +6 -0
  30. package/manifests/chart-parts.json +48 -1
  31. package/manifests/composed-chart.json +46 -1
  32. package/manifests/donut-chart.json +46 -1
  33. package/manifests/funnel-chart.json +6 -0
  34. package/manifests/gauge-chart.json +46 -1
  35. package/manifests/heatmap.json +6 -0
  36. package/manifests/line-chart.json +46 -1
  37. package/manifests/radar-chart.json +46 -1
  38. package/manifests/radial-chart.json +46 -1
  39. package/manifests/scatter-chart.json +46 -1
  40. package/manifests/sparkline.json +6 -1
  41. package/manifests/tracker.json +6 -0
  42. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"report-charts.js","sourceRoot":"","sources":["../../src/charts/report-charts.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,QAAQ,IAAI,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,mBAAmB,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACvI,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAE9B,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC3G,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAA4B,MAAM,eAAe,CAAC;AAC1H,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE7E,MAAM,KAAK,GAAwB,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5D;;;;GAIG;AACH,MAAM,SAAS,GAAG,EAAE,IAAI,EAAE,yBAAyB,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK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I,KAAK,IAAI,IAAI,QAAQ,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;QAClH,CAAC,CAAC;QACF,QAAQ,EAAE,CAAC;QACX,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAAC;QAChE,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QAClE,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC5C,OAAO,GAAG,EAAE;YACV,QAAQ,EAAE,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;YAClD,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACjD,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;IACpB,OAAO,CACL,cACE,GAAG,EAAE,GAAG,oCAEE,iBAAiB;QAC3B,oGAAoG;QACpG,yCAAyC;QACzC,SAAS,EAAC,oDAAoD,EAC9D,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,YAE9F,QAAQ,GACL,CACP,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\n/**\n * The two report charts: WaterfallChart and Heatmap. Both sit on the shared ChartFrame (loading, empty\n * and the data-table alternative) through the charts' Shell, unchanged.\n */\n\nimport * as React from \"react\";\nimport { Bar, BarChart as RechartsBarChart, CartesianGrid, ReferenceLine, ResponsiveContainer, Tooltip, XAxis, YAxis } from \"recharts\";\nimport { useLocale } from \"react-aria-components\";\n\nimport { cn } from \"../utils\";\nimport type { TableColumn } from \"../collection/table\";\nimport {\n chartChangeLabel,\n chartDecreaseLabel,\n chartIncreaseLabel,\n chartNoValueLabel,\n chartPeriodLabel,\n chartTotalLabel,\n chartValueLabel,\n heatmapLessLabel,\n heatmapMoreLabel,\n} from \"../i18n\";\nimport { formattedValues, tickAxisWidth, tickOverhang, tickWrapWidth, valueAxisTicks } from \"./axis-width\";\nimport { ChartLegend, ChartTooltip, useChartAnimation, useChartDirection, type ChartValueFormatter } from \"./chart-parts\";\nimport { HEAT_LEVELS, heatmapThresholds, levelOf } from \"./list-charts\";\nimport { Shell, useOnce } from \"./more-charts\";\nimport { CategoryTick, LineSpan, ValueTick, placedLine } from \"./value-tick\";\n\nconst plain: ChartValueFormatter = (value) => String(value);\n/**\n * The size is in `style` as well, with its unit: Recharts measures a tick for wrapping in a hidden span that\n * takes only the tick's `style` (assigned as is, so a bare 11 is dropped). Without it the span kept the page's\n * body size (14–16px) and a tick that fits at 11px broke over two lines (\"−€\" above \"1.350.000\").\n */\nconst AXIS_TICK = { fill: \"var(--ds-text-subtlest)\", fontSize: 11, style: { fontVariantNumeric: \"tabular-nums\", fontSize: \"11px\" } } as const;\n/** U+2212: the typographic minus, the same width as the plus. */\nconst MINUS = \"−\";\n\ntype FrameProps = {\n /** What the chart shows (\"Income and expenses\"), over it; leave it out when a card or a heading already says so. */\n title?: string;\n /** Names the chart when it has no visible `title`. */\n \"aria-label\"?: string;\n /** The period it covers (\"September 2026\"). */\n period?: string;\n isLoading?: boolean;\n /** Shown instead of the plot when there is no data: an `EmptyState size=\"small\"` or text; \"No data\" by default. */\n emptyState?: React.ReactNode;\n};\n\n/* ── WaterfallChart ───────────────────────────────────────────────────────── */\n\nexport type WaterfallChartStep = { name: string; value: number };\n\nexport type WaterfallChartProps = FrameProps & {\n /**\n * The opening total (\"Opening balance\"), a total bar from zero; the running total starts at 0 without it. A\n * start without a finite value (NaN, ±Infinity) is left out the same way, with a warning in the console: no\n * start bar, the running total starts at 0, and the end total is the finite steps' sum (never NaN).\n */\n start?: WaterfallChartStep;\n /**\n * The changes, in order: a positive value raises the running total, a negative one lowers it, and a zero leaves\n * it (a neutral step: a flat 1.5px line at the running total, labeled \"€ 0\" with no sign, and no legend key of\n * its own). Steps without a finite value are left out, with a warning in the console. When nothing moves off\n * zero (no step, or every figure zero, start included), the chart counts it as nothing measured and shows the\n * empty state.\n */\n steps: readonly WaterfallChartStep[];\n /** The closing total's name (\"Net\"): a total bar from zero to the start plus every step. */\n endLabel: string;\n /**\n * Shared by the axis, the labels, the tooltip and the table (\"€ 48.920\"). Changes and a negative total are\n * formatted by their size with a `+` or `−` before them, so the formatter sees non-negative values there.\n */\n valueFormatter?: ChartValueFormatter;\n /** The plot's height in px; 240 by default. */\n height?: number;\n};\n\n/** One bar of the waterfall: where it starts and ends on the value axis, and what it is. */\nexport type WaterfallRow = {\n key: string;\n name: string;\n /** `zero`: a step of 0 (or one within float residue of it), neither an increase nor a decrease. */\n kind: \"start\" | \"increase\" | \"decrease\" | \"zero\" | \"end\";\n /** The step's signed change; undefined for a total. */\n change?: number;\n /** The running total before and after this bar (a total runs from 0). */\n from: number;\n to: number;\n};\n\n/** Relative tolerance under which a sum counts as zero: float residue such as 0.1 + 0.2 − 0.3 (5.6e−17). */\nconst RESIDUE = 1e-9;\n\n/**\n * The waterfall's bars: the start total from zero, each step from the running total to the next one, the end\n * total from zero to where the steps left it. Running totals may go below zero. A start or step without a\n * finite value is left out (the chart warns), so the end total is the sum of the finite figures. Running totals\n * and changes within float residue of zero (relative to the largest figure), and −0, are stored as 0, so they\n * never print as \"−€ 0\" or count as a decrease.\n */\nexport function waterfallRows(start: WaterfallChartStep | undefined, steps: readonly WaterfallChartStep[], endLabel: string): WaterfallRow[] {\n const finite = [start, ...steps].filter((step): step is WaterfallChartStep => step !== undefined && Number.isFinite(step.value));\n const scale = Math.max(1, ...finite.map((step) => Math.abs(step.value)));\n // `|| 0` turns −0 into 0.\n const clean = (value: number) => (Math.abs(value) < RESIDUE * scale ? 0 : value || 0);\n const rows: WaterfallRow[] = [];\n let running = 0;\n if (start && Number.isFinite(start.value)) {\n running = clean(start.value);\n rows.push({ key: \"0\", name: start.name, kind: \"start\", from: 0, to: running });\n }\n for (const step of steps) {\n if (!Number.isFinite(step.value)) continue;\n const from = running;\n const change = clean(step.value);\n running = clean(running + change);\n const kind = change < 0 ? \"decrease\" : change > 0 ? \"increase\" : \"zero\";\n rows.push({ key: String(rows.length), name: step.name, kind, change, from, to: running });\n }\n rows.push({ key: String(rows.length), name: endLabel, kind: \"end\", from: 0, to: running });\n return rows;\n}\n\n/** The value axis's narrowest: the 56px it always had. */\nconst AXIS_MIN = 56;\n/** The value axis's tick count; its ticks are Recharts' own for it. */\nconst WATERFALL_TICKS = 5;\n\n/** A tick of the value axis: the size through the formatter, a negative one with the typographic minus. */\nconst tickText = (format: ChartValueFormatter) => (value: number) => (value < 0 ? `${MINUS}${format(-value)}` : format(value));\n\n/**\n * The ticks the value axis draws between the data's extremes: Recharts' own nice ticks for its `[\"auto\", \"auto\"]`\n * domain, which takes in zero (every total stands on it).\n */\nexport function waterfallTicks(low: number, high: number): number[] {\n return valueAxisTicks([low, high], WATERFALL_TICKS);\n}\n\n/**\n * The value axis's width, as the other charts size theirs (axis-width's tickAxisWidth): its longest\n * tick as Recharts draws it (a negative one with its minus), at its estimated width plus the 8px Recharts draws it\n * in from the plot, never under 56px and never over 128px. Ticks too long for 128px are shown with compact figures\n * in the chart's locale, and the axis is sized for those. It was 7px a character of the longer of the data's ends\n * rounded up: over a figure's real 7px, under a \"€\" or an \"%\", and not always the tick drawn.\n */\nexport function waterfallAxisWidth(low: number, high: number, format: ChartValueFormatter, locale?: string): number {\n const ticks = waterfallTicks(low, high);\n return tickAxisWidth(ticks.map(tickText(format)), AXIS_MIN, 0, locale, formattedValues(ticks, tickText(format)));\n}\n\n/**\n * How the three kinds part without hue: all in `ds-chart-1`. Totals are solid; steps\n * are outlined in it, an increase filled with a 25% tint (lighter), a decrease hatched (a pattern). Every label\n * and table cell carries the sign as well. These are the legend's and the tooltip's keys; the bars draw the same.\n */\nconst KEY_OUTLINE = [\"0 0/100% 1.5px\", \"0 100%/100% 1.5px\", \"0 0/1.5px 100%\", \"100% 0/1.5px 100%\"]\n .map((place) => `linear-gradient(var(--ds-chart-1), var(--ds-chart-1)) ${place} no-repeat`)\n .join(\", \");\nconst INCREASE_TINT = \"color-mix(in oklab, var(--ds-chart-1) 25%, transparent)\";\nconst WATERFALL_KEY = {\n total: \"var(--ds-chart-1)\",\n increase: `${KEY_OUTLINE}, ${INCREASE_TINT}`,\n decrease: `${KEY_OUTLINE}, repeating-linear-gradient(135deg, var(--ds-chart-1) 0 1.5px, transparent 1.5px 3.5px)`,\n /** A zero step's tooltip key: the outline alone, neither tinted nor hatched. Never in the legend. */\n zero: KEY_OUTLINE,\n} as const;\nconst keyOf = (kind: WaterfallRow[\"kind\"]) => (kind === \"start\" || kind === \"end\" ? WATERFALL_KEY.total : WATERFALL_KEY[kind]);\n\n/** `+€ 12.000`, `−€ 3.400`, `€ 0`: the sign spelled out, the size through the formatter. */\nconst signed = (value: number, format: ChartValueFormatter, plus = true) =>\n `${value > 0 && plus ? \"+\" : value < 0 ? MINUS : \"\"}${format(Math.abs(value))}`;\n\ntype PlotRow = WaterfallRow & { band: [number, number] };\n\n/**\n * A running total built from positive and negative steps, with the start and end totals: how revenue becomes\n * net after each expense. Bars float from the running total before a step to the one after it, joined by thin\n * dashed connectors; totals stand on zero, and a zero line shows when a total goes negative. Totals are solid\n * `ds-chart-1`, increases outlined with a 25% tint, decreases outlined and hatched, each labeled with its signed\n * value. The arrow keys move between bars with the tooltip (change and running total); the data table has them all.\n */\nexport function WaterfallChart({ title, \"aria-label\": ariaLabel, period, start, steps, endLabel, valueFormatter = plain, isLoading, emptyState, height = 240 }: WaterfallChartProps) {\n const { locale } = useLocale();\n const animate = useChartAnimation();\n const direction = useChartDirection();\n const patternId = `ds-waterfall-hatch-${React.useId().replace(/[^a-zA-Z0-9_-]/g, \"\")}`;\n useOnce(\n [start, ...steps].some((step) => step && !Number.isFinite(step.value)),\n \"WaterfallChart: a start or steps without a finite value are left out; the end total is the sum of the finite figures.\",\n );\n const rows: PlotRow[] = waterfallRows(start, steps, endLabel).map((row) => ({ ...row, band: [Math.min(row.from, row.to), Math.max(row.from, row.to)] }));\n // Nothing to draw: no step, or every figure zero (start included), which counts as nothing measured.\n const isEmpty = rows.every((row) => row.from === 0 && row.to === 0);\n const low = Math.min(0, ...rows.map((row) => row.band[0]));\n const high = Math.max(0, ...rows.map((row) => row.band[1]));\n const axisWidth = waterfallAxisWidth(low, high, valueFormatter, locale);\n // The 20px top margin holds a top value tick of up to three lines; one of more takes the room it needs above its\n // gridline past the 8px a one-line tick takes (axis-width's tickOverhang).\n const axisTicks = waterfallTicks(low, high);\n const axisTexts = axisTicks.map(tickText(valueFormatter));\n const top = Math.max(20, 8 + tickOverhang(axisTexts.at(-1), tickWrapWidth(axisWidth), locale, axisTexts, formattedValues(axisTicks, tickText(valueFormatter))));\n const total = chartTotalLabel(locale);\n const change = chartChangeLabel(locale);\n const isTotal = (row: WaterfallRow) => row.kind === \"start\" || row.kind === \"end\";\n const label = (row: WaterfallRow) => (isTotal(row) ? signed(row.to, valueFormatter, false) : signed(row.change!, valueFormatter));\n const tableRows = rows.map((row) => ({ ...row, changeText: isTotal(row) ? \"\" : signed(row.change!, valueFormatter), totalText: signed(row.to, valueFormatter, false) }));\n const columns: TableColumn<(typeof tableRows)[number]>[] = [\n { key: \"name\", header: title ?? ariaLabel ?? \"\", isRowHeader: true },\n { key: \"changeText\", header: change, align: \"end\" },\n { key: \"totalText\", header: total, align: \"end\" },\n ];\n // A zero step enables no key: it is neither an increase nor a decrease, and its label says \"€ 0\".\n const kinds = new Set<string>(rows.map((row) => (isTotal(row) ? \"total\" : row.kind)));\n const legend = (\n <ChartLegend\n items={[\n { key: \"increase\", label: chartIncreaseLabel(locale), color: WATERFALL_KEY.increase, kind: \"bar\" as const },\n { key: \"decrease\", label: chartDecreaseLabel(locale), color: WATERFALL_KEY.decrease, kind: \"bar\" as const },\n { key: \"total\", label: total, color: WATERFALL_KEY.total, kind: \"bar\" as const },\n ].filter((item) => kinds.has(item.key))}\n />\n );\n return (\n <Shell title={title} aria-label={ariaLabel} period={period} isLoading={isLoading} emptyState={emptyState} isEmpty={isEmpty} height={height} legend={legend} columns={columns} rows={tableRows}>\n <div data-slot=\"waterfall\" className=\"h-full min-w-0\">\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsBarChart data={rows} barCategoryGap=\"20%\" accessibilityLayer margin={{ top, right: 4, bottom: 0, left: 4 }}>\n <defs>\n {/* The decrease's hatch: 1.5px ds-chart-1 stripes at 45°, every 5px. */}\n <pattern id={patternId} data-slot=\"waterfall-hatch\" width=\"5\" height=\"5\" patternUnits=\"userSpaceOnUse\" patternTransform=\"rotate(45)\">\n <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"5\" stroke=\"var(--ds-chart-1)\" strokeWidth=\"1.5\" />\n </pattern>\n </defs>\n <CartesianGrid vertical={false} stroke=\"var(--ds-border)\" />\n <XAxis\n dataKey=\"key\"\n reversed={direction.reversed}\n tickLine={false}\n axisLine={{ stroke: \"var(--ds-border-bold)\" }}\n // Recharts' ticks, kept inside the chart: the last step's name may be wider than its band.\n tick={<CategoryTick {...AXIS_TICK} />}\n tickFormatter={(key: string) => rows[Number(key)]?.name ?? \"\"}\n />\n <YAxis\n orientation={direction.valueAxis}\n tickLine={false}\n axisLine={false}\n // The DS's tick (ValueTick), given the room the axis has for it: a figure never parts from its sign and\n // currency, and ticks too long for 128px show compact figures.\n tick={<ValueTick {...AXIS_TICK} width={tickWrapWidth(axisWidth)} axisTicks={waterfallTicks(low, high)} />}\n tickCount={WATERFALL_TICKS}\n // Wide enough for its longest tick (\"−€ 2.000.000\"), 56–128px.\n width={axisWidth}\n // Every total stands on zero, so the data's own range includes it; \"auto\" rounds both ends.\n domain={[\"auto\", \"auto\"]}\n tickFormatter={tickText(valueFormatter)}\n />\n {low < 0 && <ReferenceLine y={0} stroke=\"var(--ds-border-bold)\" className=\"ds-waterfall-zero\" />}\n {/* Connectors: from each bar's end level to the next bar, so the eye follows the running total. */}\n {rows.slice(0, -1).map((row, index) => (\n <ReferenceLine\n key={`connector-${row.key}`}\n segment={[\n { x: row.key, y: row.to },\n { x: rows[index + 1]!.key, y: row.to },\n ]}\n stroke=\"var(--ds-border-bold)\"\n strokeDasharray=\"2 2\"\n ifOverflow=\"visible\"\n />\n ))}\n <Bar dataKey=\"band\" isAnimationActive={animate} shape={(props: unknown) => <WaterfallBar {...(props as BarShape)} patternId={patternId} label={label} />} />\n <Tooltip\n isAnimationActive={animate}\n cursor={{ fill: \"var(--ds-background-neutral)\", opacity: 0.5 }}\n content={({ active, payload }) => {\n const row = payload?.[0]?.payload as PlotRow | undefined;\n if (!active || !row) return null;\n return (\n <ChartTooltip\n active\n label={row.name}\n payload={\n isTotal(row)\n ? [{ dataKey: \"total\", name: total, value: signed(row.to, valueFormatter, false), color: keyOf(row.kind) }]\n : [\n { dataKey: \"change\", name: change, value: signed(row.change!, valueFormatter), color: keyOf(row.kind) },\n { dataKey: \"total\", name: total, value: signed(row.to, valueFormatter, false), color: \"transparent\" },\n ]\n }\n />\n );\n }}\n />\n </RechartsBarChart>\n </ResponsiveContainer>\n </div>\n </Shell>\n );\n}\n\ntype BarShape = { x?: number; y?: number; width?: number; height?: number; payload?: PlotRow };\n\n/** About how wide an 11px tabular label is, per character: enough to tell whether it fits over its bar. */\nconst LABEL_CHAR = 6;\n\n/**\n * One waterfall bar: solid for a total, outlined and tinted for an increase, outlined and hatched for a decrease, a\n * flat line for a zero step;\n * its signed value above it while that fits the bar's band (a narrow chart leaves it to the tooltip and table).\n */\nfunction WaterfallBar({ x = 0, y = 0, width = 0, height = 0, payload, patternId, label }: BarShape & { patternId: string; label: (row: WaterfallRow) => string }) {\n if (!payload) return null;\n // Range bars can arrive with a negative size (a reversed axis); draw from the top-left corner. A zero step\n // shows as a flat 1.5px ds-chart-1 line at the running total (no outline box, no tint), so its place is not a gap.\n const left = width < 0 ? x + width : x;\n const top = height < 0 ? y + height : y;\n const w = Math.abs(width);\n const h = Math.max(1, Math.abs(height));\n const total = payload.kind === \"start\" || payload.kind === \"end\";\n const fill = total ? \"var(--ds-chart-1)\" : payload.kind === \"increase\" ? INCREASE_TINT : `url(#${patternId})`;\n const text = label(payload);\n // The bar is 80% of its band (barCategoryGap 20%): the label may use the whole band.\n const fits = text.length * LABEL_CHAR <= w / 0.8 - 4;\n return (\n <g data-slot=\"waterfall-bar\" data-kind={payload.kind}>\n {fits && (\n <text\n data-slot=\"waterfall-label\"\n x={left + w / 2}\n y={top - 6}\n textAnchor=\"middle\"\n fill=\"var(--ds-text-subtle)\"\n fontSize={11}\n style={{ fontVariantNumeric: \"tabular-nums\" }}\n >\n {/* In its own reading direction, centered where it was (value-tick's LineSpan). */}\n <LineSpan {...placedLine(text, left + w / 2, \"middle\")} inherited=\"middle\" dy=\"0\">\n {text}\n </LineSpan>\n </text>\n )}\n {total ? (\n <rect x={left} y={top} width={w} height={h} rx={2} fill={fill} />\n ) : payload.kind === \"zero\" ? (\n <rect x={left} y={top - 0.75} width={w} height={1.5} fill=\"var(--ds-chart-1)\" />\n ) : (\n // The outline inside the bar's box, so increases and decreases keep the totals' width.\n <rect x={left + 0.75} y={top + 0.75} width={Math.max(0, w - 1.5)} height={Math.max(0, h - 1.5)} rx={1.5} fill={fill} stroke=\"var(--ds-chart-1)\" strokeWidth={1.5} />\n )}\n </g>\n );\n}\n\n/* ── Heatmap ───────────────────────────────────────────────────── */\n\nexport type HeatmapCell = {\n /** The cell's row and column, as named in `rows` and `columns`. */\n row: string;\n column: string;\n /**\n * `null`: the period is in the grid but has no data (hatched, \"No data\"), never the same as 0. A negative value\n * draws as step 0, like zero (the scale counts up from nothing); its name and the table keep the signed value.\n */\n value: number | null;\n /** The cell's name for screen readers and the tooltip's title; \"row, column: value\" by default. */\n label?: string;\n};\n\nexport type HeatmapProps = FrameProps & {\n /** The rows, top to bottom (\"Week 1\" …, or the months). Names are unique: cells find their row by name. */\n rows: readonly string[];\n /**\n * The columns, from the inline start (the weekdays, or the weeks). Names are unique, as for `rows`: a name given\n * twice draws both, but every cell of that name lands in the first (the chart warns).\n */\n columns: readonly string[];\n /** One entry per cell; a row and column with no entry draws no cell (a day outside the month). */\n data: readonly HeatmapCell[];\n /** The row headers' name (\"Week\"), on the data table's first header and the grid's corner; \"Period\" by default. */\n rowHeader?: string;\n /**\n * Four strictly ascending lower bounds of the four intensity steps; from the positive values' quartiles by\n * default. Bounds out of order still count each bound a value reaches, so the steps no longer follow the values\n * (the chart warns).\n */\n thresholds?: readonly [number, number, number, number];\n valueFormatter?: ChartValueFormatter;\n onCellPress?: (cell: HeatmapCell) => void;\n};\n\n/** A cell with no data: hatched, so it never passes for zero's flat `ds-background-neutral`. */\nconst HEAT_MISSING = \"repeating-linear-gradient(135deg, var(--ds-background-neutral-pressed) 0 2px, transparent 2px 5px)\";\n\ntype Slot = { cell: HeatmapCell; row: number; column: number; index: number };\n\n/** Whether the bounds rise strictly, each one finite: otherwise the steps no longer follow the values. */\nconst ascending = (bounds: readonly number[]) => bounds.every((bound, index) => Number.isFinite(bound) && (index === 0 || bound > bounds[index - 1]!));\nconst hasDuplicates = (names: readonly string[]) => new Set(names).size !== names.length;\n\n/**\n * A value over a grid of two cycles, month by weekday or week by weekday: when demand peaks. Cells share\n * the CalendarHeatmap's five steps (zero or less in `ds-background-neutral`, then the `ds-chart-1` ramp, steps\n * that differ in lightness), a cell with no data is hatched and named \"No data\", and a pair with no entry draws an\n * empty gap. Column labels above, row labels at the inline start, a \"Less … More\" scale under the grid. No text is\n * drawn over the cells.\n *\n * Screen readers: every row of the grid has as many cells as the header row (the corner is a column header named\n * by `rowHeader`, a gap an empty, unfocusable grid cell), so each cell sits under its own column's header.\n *\n * Keyboard and pointer: one tab stop. The arrow keys move focus a cell (mirrored in RTL, skipping gaps), Home\n * and End go to the row's ends, Ctrl+Home and Ctrl+End to the grid's; Enter and Space press the focused cell.\n * Hovering never moves focus or the tab stop. The tooltip shows the cell under the pointer while it is over one,\n * and the focused cell otherwise; a key that moves focus hands the tooltip back to the focused cell until the\n * pointer enters another cell. Escape hides it.\n */\nexport function Heatmap({ title, \"aria-label\": ariaLabel, period, rows, columns, data, rowHeader, thresholds, valueFormatter = plain, onCellPress, isLoading, emptyState }: HeatmapProps) {\n const { locale } = useLocale();\n const { isRtl } = useChartDirection();\n const animate = useChartAnimation();\n const noValue = chartNoValueLabel(locale);\n const rowHeaderLabel = rowHeader ?? chartPeriodLabel(locale);\n // Cells by position; a pair given twice keeps its last entry.\n const byPair = new Map<string, HeatmapCell>();\n for (const cell of data) if (rows.includes(cell.row) && columns.includes(cell.column)) byPair.set(`${cell.row}\\u0000${cell.column}`, cell);\n useOnce(data.some((cell) => !rows.includes(cell.row) || !columns.includes(cell.column)), \"Heatmap: a cell outside rows and columns is left out.\");\n useOnce(hasDuplicates(rows) || hasDuplicates(columns), \"Heatmap: rows and columns need unique names; a repeated name's cells are drawn in its first row or column only.\");\n useOnce(thresholds !== undefined && !ascending(thresholds), \"Heatmap: thresholds must be four finite, strictly ascending bounds.\");\n const slots: Slot[] = [];\n const grid: (Slot | undefined)[][] = rows.map((row, r) =>\n columns.map((column, c) => {\n // A repeated name is a gap after its first place, so no cell is drawn (or reached by the arrows) twice.\n if (rows.indexOf(row) !== r || columns.indexOf(column) !== c) return undefined;\n const cell = byPair.get(`${row}\\u0000${column}`);\n if (!cell) return undefined;\n const slot = { cell, row: r, column: c, index: slots.length };\n slots.push(slot);\n return slot;\n }),\n );\n const values = slots.map((slot) => slot.cell.value).filter((value): value is number => value !== null && Number.isFinite(value));\n const bounds = thresholds ?? heatmapThresholds(values);\n const hasMissing = slots.some((slot) => slot.cell.value === null || !Number.isFinite(slot.cell.value));\n const format = (value: number | null) => (value === null || !Number.isFinite(value) ? noValue : valueFormatter(value));\n const nameOf = (cell: HeatmapCell) => cell.label ?? `${cell.row}, ${cell.column}: ${format(cell.value)}`;\n // levelOf gives a negative value step 0, the same as zero.\n const fillOf = (cell: HeatmapCell) => (cell.value === null || !Number.isFinite(cell.value) ? HEAT_MISSING : HEAT_LEVELS[levelOf(cell.value, bounds)]!);\n\n // The roving tab stop and the keys follow focus only (the first cell until the reader moves); the pointer only\n // ever sets `hovered`, which the tooltip prefers while `tip.hover` holds.\n const [focused, setFocused] = React.useState(0);\n const [hovered, setHovered] = React.useState<number | null>(null);\n const [tip, setTip] = React.useState<{ focus: boolean; hover: boolean }>({ focus: false, hover: false });\n const current = Math.min(focused, Math.max(0, slots.length - 1));\n const cells = React.useRef<(HTMLElement | null)[]>([]);\n const move = (from: Slot, key: string, ctrl: boolean): Slot | undefined => {\n const forward = isRtl ? \"ArrowLeft\" : \"ArrowRight\";\n const back = isRtl ? \"ArrowRight\" : \"ArrowLeft\";\n const walk = (dr: number, dc: number) => {\n for (let r = from.row + dr, c = from.column + dc; r >= 0 && r < rows.length && c >= 0 && c < columns.length; r += dr, c += dc) {\n if (grid[r]![c]) return grid[r]![c];\n }\n return undefined;\n };\n if (key === forward) return walk(0, 1);\n if (key === back) return walk(0, -1);\n if (key === \"ArrowDown\") return walk(1, 0);\n if (key === \"ArrowUp\") return walk(-1, 0);\n if (key === \"Home\") return ctrl ? slots[0] : grid[from.row]!.find(Boolean);\n if (key === \"End\") return ctrl ? slots[slots.length - 1] : [...grid[from.row]!].reverse().find(Boolean);\n return undefined;\n };\n\n const tableRows = rows.map((row, r) => ({\n id: r,\n row,\n ...Object.fromEntries(columns.map((_, c) => [`c${c}`, grid[r]![c] ? format(grid[r]![c]!.cell.value) : \"\"])),\n })) as ({ id: number; row: string } & Record<string, string>)[];\n const tableColumns: TableColumn<(typeof tableRows)[number]>[] = [\n { key: \"row\", header: rowHeaderLabel, isRowHeader: true },\n ...columns.map((column, c) => ({ key: `c${c}`, header: column, align: \"end\" as const })),\n ];\n // Cell rows of 28px with 3px gaps, the column labels, the scale and their gaps.\n const height = 16 + 6 + rows.length * 28 + Math.max(0, rows.length - 1) * 3 + 12 + 20;\n const focusedSlot = slots[current];\n const hoveredSlot = hovered === null ? undefined : slots[hovered];\n const tipSlot = tip.hover && hoveredSlot ? hoveredSlot : tip.focus ? focusedSlot : undefined;\n\n return (\n <Shell\n title={title}\n aria-label={ariaLabel}\n period={period}\n isLoading={isLoading}\n emptyState={emptyState}\n isEmpty={values.length === 0}\n height={height}\n columns={tableColumns}\n rows={tableRows}\n >\n <div data-slot=\"heatmap\" className=\"relative flex min-w-0 flex-col gap-ds-150\">\n <div className=\"min-w-0 overflow-x-auto\" data-slot=\"heatmap-scroll\">\n <div\n role=\"grid\"\n aria-label={title ?? ariaLabel}\n data-slot=\"heatmap-grid\"\n className=\"grid min-w-max gap-[3px]\"\n style={{ gridTemplateColumns: `max-content repeat(${columns.length}, minmax(1.5rem, 1fr))` }}\n onKeyDown={(event) => {\n // Every key acts on the focused cell, never on the one under the pointer.\n if (!focusedSlot) return;\n if (event.key === \"Enter\" || event.key === \" \") {\n // Space never scrolls the page from inside the grid.\n event.preventDefault();\n onCellPress?.(focusedSlot.cell);\n return;\n }\n if (event.key === \"Escape\") {\n setTip({ focus: false, hover: false });\n return;\n }\n const next = move(focusedSlot, event.key, event.ctrlKey || event.metaKey);\n if (!next) return;\n event.preventDefault();\n setFocused(next.index);\n // The keyboard takes the tooltip back from the pointer.\n setTip({ focus: true, hover: false });\n cells.current[next.index]?.focus();\n }}\n onFocus={() => setTip((state) => ({ ...state, focus: true }))}\n onBlur={(event) => {\n if (!event.currentTarget.contains(event.relatedTarget as Node | null)) setTip((state) => ({ ...state, focus: false }));\n }}\n onMouseLeave={() => {\n setHovered(null);\n setTip((state) => ({ ...state, hover: false }));\n }}\n >\n <div role=\"row\" className=\"contents\">\n {/* The corner heads the row headers' column, so every row has as many cells as this one. */}\n <span role=\"columnheader\" aria-label={rowHeaderLabel} data-slot=\"heatmap-corner\" className=\"h-4\" />\n {columns.map((column, c) => (\n <span key={c} role=\"columnheader\" data-slot=\"heatmap-column\" className=\"h-4 truncate text-center text-[11px] leading-4 text-ds-text-subtlest\">\n {column}\n </span>\n ))}\n </div>\n {rows.map((row, r) => (\n <div key={r} role=\"row\" data-slot=\"heatmap-row\" className=\"contents\">\n <span role=\"rowheader\" className=\"flex h-7 items-center truncate pe-ds-100 text-body-small text-ds-text-subtle\">\n <bdi>{row}</bdi>\n </span>\n {columns.map((_, c) => {\n const slot = grid[r]![c];\n // An empty, unfocusable cell: it keeps the column count, so the cells after it stay under their headers.\n if (!slot) return <span key={c} role=\"gridcell\" data-slot=\"heatmap-gap\" className=\"h-7\" />;\n const missing = slot.cell.value === null || !Number.isFinite(slot.cell.value);\n return (\n <span\n key={c}\n ref={(element) => {\n cells.current[slot.index] = element;\n }}\n role=\"gridcell\"\n aria-label={nameOf(slot.cell)}\n data-slot=\"heatmap-cell\"\n data-state={missing ? \"missing\" : slot.cell.value === 0 ? \"zero\" : \"value\"}\n data-level={missing ? undefined : levelOf(slot.cell.value!, bounds)}\n tabIndex={slot.index === current ? 0 : -1}\n onFocus={() => setFocused(slot.index)}\n onMouseEnter={() => {\n setHovered(slot.index);\n setTip((state) => ({ ...state, hover: true }));\n }}\n onMouseLeave={() => setHovered((index) => (index === slot.index ? null : index))}\n onClick={() => onCellPress?.(slot.cell)}\n className={cn(\n \"h-7 rounded-[3px] outline-hidden focus-visible:inset-ring-2 focus-visible:inset-ring-ds-border-focused\",\n animate && \"transition-[background-color] duration-150\",\n onCellPress && \"cursor-pointer\",\n )}\n style={{ background: fillOf(slot.cell) }}\n />\n );\n })}\n </div>\n ))}\n </div>\n </div>\n <div data-slot=\"heatmap-scale\" className=\"flex flex-wrap items-center gap-x-ds-200 gap-y-ds-050 text-body-small text-ds-text-subtle\">\n <span className=\"flex items-center gap-ds-075\">\n <span>{heatmapLessLabel(locale)}</span>\n <span aria-hidden className=\"flex gap-[3px]\">\n {HEAT_LEVELS.map((background, level) => (\n <span key={level} data-level={level} className=\"size-3 rounded-[2px]\" style={{ background }} />\n ))}\n </span>\n <span>{heatmapMoreLabel(locale)}</span>\n </span>\n {hasMissing && (\n <span data-slot=\"heatmap-missing-key\" className=\"flex items-center gap-ds-075\">\n <span aria-hidden className=\"size-3 rounded-[2px]\" style={{ background: HEAT_MISSING }} />\n {noValue}\n </span>\n )}\n </div>\n {tipSlot && (\n <HeatTooltip anchor={cells.current[tipSlot.index] ?? null} title={tipSlot.cell.label ?? `${tipSlot.cell.row} · ${tipSlot.cell.column}`}>\n <ChartTooltip\n active\n label={tipSlot.cell.label ?? `${tipSlot.cell.row} · ${tipSlot.cell.column}`}\n payload={[{ dataKey: \"value\", name: chartValueLabel(locale), value: format(tipSlot.cell.value), color: fillOf(tipSlot.cell) }]}\n />\n </HeatTooltip>\n )}\n </div>\n </Shell>\n );\n}\n\n/**\n * The shared ChartTooltip over a cell: above it, or under it when there is no room; kept inside the chart's\n * width. Placed again when the grid's sideways scroll container scrolls or the window resizes, so it stays on\n * its cell. Hidden from screen readers, which read the cell's own name.\n */\nfunction HeatTooltip({ anchor, title, children }: { anchor: HTMLElement | null; title: string; children: React.ReactNode }) {\n const ref = React.useRef<HTMLDivElement>(null);\n const [place, setPlace] = React.useState<{ left: number; top: number } | null>(null);\n React.useLayoutEffect(() => {\n const tooltip = ref.current;\n const box = tooltip?.parentElement;\n if (!tooltip || !box || !anchor) return;\n const position = () => {\n const frame = box.getBoundingClientRect();\n const cell = anchor.getBoundingClientRect();\n const width = tooltip.offsetWidth;\n const heightOf = tooltip.offsetHeight;\n const center = cell.left - frame.left + cell.width / 2;\n const left = Math.min(Math.max(0, center - width / 2), Math.max(0, frame.width - width));\n // Above the cell while it fits in the viewport, under it otherwise.\n const top = cell.top - heightOf - 8 >= 0 ? cell.top - frame.top - heightOf - 8 : cell.bottom - frame.top + 8;\n setPlace((previous) => (previous && previous.left === left && previous.top === top ? previous : { left, top }));\n };\n position();\n const scroller = anchor.closest(\"[data-slot='heatmap-scroll']\");\n scroller?.addEventListener(\"scroll\", position, { passive: true });\n window.addEventListener(\"resize\", position);\n return () => {\n scroller?.removeEventListener(\"scroll\", position);\n window.removeEventListener(\"resize\", position);\n };\n }, [anchor, title]);\n return (\n <div\n ref={ref}\n aria-hidden\n data-slot=\"heatmap-tooltip\"\n // Its own width (max-content, at most the chart's), never squeezed by where it sits, so the placing\n // above measures the width it will have.\n className=\"pointer-events-none absolute z-10 w-max max-w-full\"\n style={place ? { left: place.left, top: place.top } : { left: 0, top: 0, visibility: \"hidden\" }}\n >\n {children}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"report-charts.js","sourceRoot":"","sources":["../../src/charts/report-charts.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,QAAQ,IAAI,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,mBAAmB,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACvI,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAE9B,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC3G,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAA4B,MAAM,eAAe,CAAC;AAC1H,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,OAAO,EAAE,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AC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,YAE9F,QAAQ,GACL,CACP,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\n/**\n * The two report charts: WaterfallChart and Heatmap. Both sit on the shared ChartFrame (loading, empty\n * and the data-table alternative) through the charts' Shell, unchanged.\n */\n\nimport * as React from \"react\";\nimport { Bar, BarChart as RechartsBarChart, CartesianGrid, ReferenceLine, ResponsiveContainer, Tooltip, XAxis, YAxis } from \"recharts\";\nimport { useLocale } from \"react-aria-components\";\n\nimport { cn } from \"../utils\";\nimport type { TableColumn } from \"../collection/table\";\nimport {\n chartChangeLabel,\n chartDecreaseLabel,\n chartIncreaseLabel,\n chartNoValueLabel,\n chartPeriodLabel,\n chartTotalLabel,\n chartValueLabel,\n heatmapLessLabel,\n heatmapMoreLabel,\n} from \"../i18n\";\nimport { formattedValues, tickAxisWidth, tickOverhang, tickWrapWidth, valueAxisTicks } from \"./axis-width\";\nimport { ChartLegend, ChartTooltip, useChartAnimation, useChartDirection, type ChartValueFormatter } from \"./chart-parts\";\nimport { HEAT_LEVELS, heatmapThresholds, levelOf } from \"./list-charts\";\nimport { Shell, useOnce } from \"./more-charts\";\nimport { CategoryTick, LineSpan, ValueTick, placedLine } from \"./value-tick\";\n\nconst plain: ChartValueFormatter = (value) => String(value);\n/**\n * The size is in `style` as well, with its unit: Recharts measures a tick for wrapping in a hidden span that\n * takes only the tick's `style` (assigned as is, so a bare 11 is dropped). Without it the span kept the page's\n * body size (14–16px) and a tick that fits at 11px broke over two lines (\"−€\" above \"1.350.000\").\n */\nconst AXIS_TICK = { fill: \"var(--ds-text-subtlest)\", fontSize: 11, style: { fontVariantNumeric: \"tabular-nums\", fontSize: \"11px\" } } as const;\n/** U+2212: the typographic minus, the same width as the plus. */\nconst MINUS = \"−\";\n\ntype FrameProps = {\n /** What the chart shows (\"Income and expenses\"), over it; leave it out when a card or a heading already says so. */\n title?: string;\n /** Names the chart when it has no visible `title`. */\n \"aria-label\"?: string;\n /** The period it covers (\"September 2026\"). */\n period?: string;\n isLoading?: boolean;\n /** Shown instead of the plot when there is no data: an `EmptyState size=\"small\"` or text; \"No data\" by default. */\n emptyState?: React.ReactNode;\n};\n\n/* ── WaterfallChart ───────────────────────────────────────────────────────── */\n\nexport type WaterfallChartStep = { name: string; value: number };\n\nexport type WaterfallChartProps = FrameProps & {\n /**\n * The opening total (\"Opening balance\"), a total bar from zero; the running total starts at 0 without it. A\n * start without a finite value (NaN, ±Infinity) is left out the same way, with a warning in the console: no\n * start bar, the running total starts at 0, and the end total is the finite steps' sum (never NaN).\n */\n start?: WaterfallChartStep;\n /**\n * The changes, in order: a positive value raises the running total, a negative one lowers it, and a zero leaves\n * it (a neutral step: a flat 1.5px line at the running total, labeled \"€ 0\" with no sign, and no legend key of\n * its own). Steps without a finite value are left out, with a warning in the console. When nothing moves off\n * zero (no step, or every figure zero, start included), the chart counts it as nothing measured and shows the\n * empty state.\n */\n steps: readonly WaterfallChartStep[];\n /** The closing total's name (\"Net\"): a total bar from zero to the start plus every step. */\n endLabel: string;\n /**\n * Shared by the axis, the labels, the tooltip and the table (\"€ 48.920\"). Changes and a negative total are\n * formatted by their size with a `+` or `−` before them, so the formatter sees non-negative values there.\n */\n valueFormatter?: ChartValueFormatter;\n /** The plot's height in px; 240 by default. */\n height?: number;\n};\n\n/** One bar of the waterfall: where it starts and ends on the value axis, and what it is. */\nexport type WaterfallRow = {\n key: string;\n name: string;\n /** `zero`: a step of 0 (or one within float residue of it), neither an increase nor a decrease. */\n kind: \"start\" | \"increase\" | \"decrease\" | \"zero\" | \"end\";\n /** The step's signed change; undefined for a total. */\n change?: number;\n /** The running total before and after this bar (a total runs from 0). */\n from: number;\n to: number;\n};\n\n/** Relative tolerance under which a sum counts as zero: float residue such as 0.1 + 0.2 − 0.3 (5.6e−17). */\nconst RESIDUE = 1e-9;\n\n/**\n * The waterfall's bars: the start total from zero, each step from the running total to the next one, the end\n * total from zero to where the steps left it. Running totals may go below zero. A start or step without a\n * finite value is left out (the chart warns), so the end total is the sum of the finite figures. Running totals\n * and changes within float residue of zero (relative to the largest figure), and −0, are stored as 0, so they\n * never print as \"−€ 0\" or count as a decrease.\n */\nexport function waterfallRows(start: WaterfallChartStep | undefined, steps: readonly WaterfallChartStep[], endLabel: string): WaterfallRow[] {\n const finite = [start, ...steps].filter((step): step is WaterfallChartStep => step !== undefined && Number.isFinite(step.value));\n const scale = Math.max(1, ...finite.map((step) => Math.abs(step.value)));\n // `|| 0` turns −0 into 0.\n const clean = (value: number) => (Math.abs(value) < RESIDUE * scale ? 0 : value || 0);\n const rows: WaterfallRow[] = [];\n let running = 0;\n if (start && Number.isFinite(start.value)) {\n running = clean(start.value);\n rows.push({ key: \"0\", name: start.name, kind: \"start\", from: 0, to: running });\n }\n for (const step of steps) {\n if (!Number.isFinite(step.value)) continue;\n const from = running;\n const change = clean(step.value);\n running = clean(running + change);\n const kind = change < 0 ? \"decrease\" : change > 0 ? \"increase\" : \"zero\";\n rows.push({ key: String(rows.length), name: step.name, kind, change, from, to: running });\n }\n rows.push({ key: String(rows.length), name: endLabel, kind: \"end\", from: 0, to: running });\n return rows;\n}\n\n/** The value axis's narrowest: the 56px it always had. */\nconst AXIS_MIN = 56;\n/** The value axis's tick count; its ticks are Recharts' own for it. */\nconst WATERFALL_TICKS = 5;\n\n/** A tick of the value axis: the size through the formatter, a negative one with the typographic minus. */\nconst tickText = (format: ChartValueFormatter) => (value: number) => (value < 0 ? `${MINUS}${format(-value)}` : format(value));\n\n/**\n * The ticks the value axis draws between the data's extremes: Recharts' own nice ticks for its `[\"auto\", \"auto\"]`\n * domain, which takes in zero (every total stands on it).\n */\nexport function waterfallTicks(low: number, high: number): number[] {\n return valueAxisTicks([low, high], WATERFALL_TICKS);\n}\n\n/**\n * The value axis's width, as the other charts size theirs (axis-width's tickAxisWidth): its longest\n * tick as Recharts draws it (a negative one with its minus), at its estimated width plus the 8px Recharts draws it\n * in from the plot, never under 56px and never over 128px. Ticks too long for 128px are shown with compact figures\n * in the chart's locale, and the axis is sized for those. It was 7px a character of the longer of the data's ends\n * rounded up: over a figure's real 7px, under a \"€\" or an \"%\", and not always the tick drawn.\n */\nexport function waterfallAxisWidth(low: number, high: number, format: ChartValueFormatter, locale?: string): number {\n const ticks = waterfallTicks(low, high);\n return tickAxisWidth(ticks.map(tickText(format)), AXIS_MIN, 0, locale, formattedValues(ticks, tickText(format)));\n}\n\n/**\n * How the three kinds part without hue: all in `ds-chart-1`. Totals are solid; steps\n * are outlined in it, an increase filled with a 25% tint (lighter), a decrease hatched (a pattern). Every label\n * and table cell carries the sign as well. These are the legend's and the tooltip's keys; the bars draw the same.\n */\nconst KEY_OUTLINE = [\"0 0/100% 1.5px\", \"0 100%/100% 1.5px\", \"0 0/1.5px 100%\", \"100% 0/1.5px 100%\"]\n .map((place) => `linear-gradient(var(--ds-chart-1), var(--ds-chart-1)) ${place} no-repeat`)\n .join(\", \");\nconst INCREASE_TINT = \"color-mix(in oklab, var(--ds-chart-1) 25%, transparent)\";\nconst WATERFALL_KEY = {\n total: \"var(--ds-chart-1)\",\n increase: `${KEY_OUTLINE}, ${INCREASE_TINT}`,\n decrease: `${KEY_OUTLINE}, repeating-linear-gradient(135deg, var(--ds-chart-1) 0 1.5px, transparent 1.5px 3.5px)`,\n /** A zero step's tooltip key: the outline alone, neither tinted nor hatched. Never in the legend. */\n zero: KEY_OUTLINE,\n} as const;\nconst keyOf = (kind: WaterfallRow[\"kind\"]) => (kind === \"start\" || kind === \"end\" ? WATERFALL_KEY.total : WATERFALL_KEY[kind]);\n\n/** `+€ 12.000`, `−€ 3.400`, `€ 0`: the sign spelled out, the size through the formatter. */\nconst signed = (value: number, format: ChartValueFormatter, plus = true) =>\n `${value > 0 && plus ? \"+\" : value < 0 ? MINUS : \"\"}${format(Math.abs(value))}`;\n\ntype PlotRow = WaterfallRow & { band: [number, number] };\n\n/**\n * A running total built from positive and negative steps, with the start and end totals: how revenue becomes\n * net after each expense. Bars float from the running total before a step to the one after it, joined by thin\n * dashed connectors; totals stand on zero, and a zero line shows when a total goes negative. Totals are solid\n * `ds-chart-1`, increases outlined with a 25% tint, decreases outlined and hatched, each labeled with its signed\n * value. The arrow keys move between bars with the tooltip (change and running total); the data table has them all.\n */\nexport function WaterfallChart({ title, \"aria-label\": ariaLabel, period, start, steps, endLabel, valueFormatter = plain, isLoading, emptyState, height = 240, ...table }: WaterfallChartProps) {\n const { locale } = useLocale();\n const animate = useChartAnimation();\n const direction = useChartDirection();\n const patternId = `ds-waterfall-hatch-${React.useId().replace(/[^a-zA-Z0-9_-]/g, \"\")}`;\n useOnce(\n [start, ...steps].some((step) => step && !Number.isFinite(step.value)),\n \"WaterfallChart: a start or steps without a finite value are left out; the end total is the sum of the finite figures.\",\n );\n const rows: PlotRow[] = waterfallRows(start, steps, endLabel).map((row) => ({ ...row, band: [Math.min(row.from, row.to), Math.max(row.from, row.to)] }));\n // Nothing to draw: no step, or every figure zero (start included), which counts as nothing measured.\n const isEmpty = rows.every((row) => row.from === 0 && row.to === 0);\n const low = Math.min(0, ...rows.map((row) => row.band[0]));\n const high = Math.max(0, ...rows.map((row) => row.band[1]));\n const axisWidth = waterfallAxisWidth(low, high, valueFormatter, locale);\n // The 20px top margin holds a top value tick of up to three lines; one of more takes the room it needs above its\n // gridline past the 8px a one-line tick takes (axis-width's tickOverhang).\n const axisTicks = waterfallTicks(low, high);\n const axisTexts = axisTicks.map(tickText(valueFormatter));\n const top = Math.max(20, 8 + tickOverhang(axisTexts.at(-1), tickWrapWidth(axisWidth), locale, axisTexts, formattedValues(axisTicks, tickText(valueFormatter))));\n const total = chartTotalLabel(locale);\n const change = chartChangeLabel(locale);\n const isTotal = (row: WaterfallRow) => row.kind === \"start\" || row.kind === \"end\";\n const label = (row: WaterfallRow) => (isTotal(row) ? signed(row.to, valueFormatter, false) : signed(row.change!, valueFormatter));\n const tableRows = rows.map((row) => ({ ...row, changeText: isTotal(row) ? \"\" : signed(row.change!, valueFormatter), totalText: signed(row.to, valueFormatter, false) }));\n const columns: TableColumn<(typeof tableRows)[number]>[] = [\n { key: \"name\", header: title ?? ariaLabel ?? \"\", isRowHeader: true },\n { key: \"changeText\", header: change, align: \"end\" },\n { key: \"totalText\", header: total, align: \"end\" },\n ];\n // A zero step enables no key: it is neither an increase nor a decrease, and its label says \"€ 0\".\n const kinds = new Set<string>(rows.map((row) => (isTotal(row) ? \"total\" : row.kind)));\n const legend = (\n <ChartLegend\n items={[\n { key: \"increase\", label: chartIncreaseLabel(locale), color: WATERFALL_KEY.increase, kind: \"bar\" as const },\n { key: \"decrease\", label: chartDecreaseLabel(locale), color: WATERFALL_KEY.decrease, kind: \"bar\" as const },\n { key: \"total\", label: total, color: WATERFALL_KEY.total, kind: \"bar\" as const },\n ].filter((item) => kinds.has(item.key))}\n />\n );\n return (\n <Shell table={table} title={title} aria-label={ariaLabel} period={period} isLoading={isLoading} emptyState={emptyState} isEmpty={isEmpty} height={height} legend={legend} columns={columns} rows={tableRows}>\n <div data-slot=\"waterfall\" className=\"h-full min-w-0\">\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsBarChart data={rows} barCategoryGap=\"20%\" accessibilityLayer margin={{ top, right: 4, bottom: 0, left: 4 }}>\n <defs>\n {/* The decrease's hatch: 1.5px ds-chart-1 stripes at 45°, every 5px. */}\n <pattern id={patternId} data-slot=\"waterfall-hatch\" width=\"5\" height=\"5\" patternUnits=\"userSpaceOnUse\" patternTransform=\"rotate(45)\">\n <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"5\" stroke=\"var(--ds-chart-1)\" strokeWidth=\"1.5\" />\n </pattern>\n </defs>\n <CartesianGrid vertical={false} stroke=\"var(--ds-border)\" />\n <XAxis\n dataKey=\"key\"\n reversed={direction.reversed}\n tickLine={false}\n axisLine={{ stroke: \"var(--ds-border-bold)\" }}\n // Recharts' ticks, kept inside the chart: the last step's name may be wider than its band.\n tick={<CategoryTick {...AXIS_TICK} />}\n tickFormatter={(key: string) => rows[Number(key)]?.name ?? \"\"}\n />\n <YAxis\n orientation={direction.valueAxis}\n tickLine={false}\n axisLine={false}\n // The DS's tick (ValueTick), given the room the axis has for it: a figure never parts from its sign and\n // currency, and ticks too long for 128px show compact figures.\n tick={<ValueTick {...AXIS_TICK} width={tickWrapWidth(axisWidth)} axisTicks={waterfallTicks(low, high)} />}\n tickCount={WATERFALL_TICKS}\n // Wide enough for its longest tick (\"−€ 2.000.000\"), 56–128px.\n width={axisWidth}\n // Every total stands on zero, so the data's own range includes it; \"auto\" rounds both ends.\n domain={[\"auto\", \"auto\"]}\n tickFormatter={tickText(valueFormatter)}\n />\n {low < 0 && <ReferenceLine y={0} stroke=\"var(--ds-border-bold)\" className=\"ds-waterfall-zero\" />}\n {/* Connectors: from each bar's end level to the next bar, so the eye follows the running total. */}\n {rows.slice(0, -1).map((row, index) => (\n <ReferenceLine\n key={`connector-${row.key}`}\n segment={[\n { x: row.key, y: row.to },\n { x: rows[index + 1]!.key, y: row.to },\n ]}\n stroke=\"var(--ds-border-bold)\"\n strokeDasharray=\"2 2\"\n ifOverflow=\"visible\"\n />\n ))}\n <Bar dataKey=\"band\" isAnimationActive={animate} shape={(props: unknown) => <WaterfallBar {...(props as BarShape)} patternId={patternId} label={label} />} />\n <Tooltip\n isAnimationActive={animate}\n cursor={{ fill: \"var(--ds-background-neutral)\", opacity: 0.5 }}\n content={({ active, payload }) => {\n const row = payload?.[0]?.payload as PlotRow | undefined;\n if (!active || !row) return null;\n return (\n <ChartTooltip\n active\n label={row.name}\n payload={\n isTotal(row)\n ? [{ dataKey: \"total\", name: total, value: signed(row.to, valueFormatter, false), color: keyOf(row.kind) }]\n : [\n { dataKey: \"change\", name: change, value: signed(row.change!, valueFormatter), color: keyOf(row.kind) },\n { dataKey: \"total\", name: total, value: signed(row.to, valueFormatter, false), color: \"transparent\" },\n ]\n }\n />\n );\n }}\n />\n </RechartsBarChart>\n </ResponsiveContainer>\n </div>\n </Shell>\n );\n}\n\ntype BarShape = { x?: number; y?: number; width?: number; height?: number; payload?: PlotRow };\n\n/** About how wide an 11px tabular label is, per character: enough to tell whether it fits over its bar. */\nconst LABEL_CHAR = 6;\n\n/**\n * One waterfall bar: solid for a total, outlined and tinted for an increase, outlined and hatched for a decrease, a\n * flat line for a zero step;\n * its signed value above it while that fits the bar's band (a narrow chart leaves it to the tooltip and table).\n */\nfunction WaterfallBar({ x = 0, y = 0, width = 0, height = 0, payload, patternId, label }: BarShape & { patternId: string; label: (row: WaterfallRow) => string }) {\n if (!payload) return null;\n // Range bars can arrive with a negative size (a reversed axis); draw from the top-left corner. A zero step\n // shows as a flat 1.5px ds-chart-1 line at the running total (no outline box, no tint), so its place is not a gap.\n const left = width < 0 ? x + width : x;\n const top = height < 0 ? y + height : y;\n const w = Math.abs(width);\n const h = Math.max(1, Math.abs(height));\n const total = payload.kind === \"start\" || payload.kind === \"end\";\n const fill = total ? \"var(--ds-chart-1)\" : payload.kind === \"increase\" ? INCREASE_TINT : `url(#${patternId})`;\n const text = label(payload);\n // The bar is 80% of its band (barCategoryGap 20%): the label may use the whole band.\n const fits = text.length * LABEL_CHAR <= w / 0.8 - 4;\n return (\n <g data-slot=\"waterfall-bar\" data-kind={payload.kind}>\n {fits && (\n <text\n data-slot=\"waterfall-label\"\n x={left + w / 2}\n y={top - 6}\n textAnchor=\"middle\"\n fill=\"var(--ds-text-subtle)\"\n fontSize={11}\n style={{ fontVariantNumeric: \"tabular-nums\" }}\n >\n {/* In its own reading direction, centered where it was (value-tick's LineSpan). */}\n <LineSpan {...placedLine(text, left + w / 2, \"middle\")} inherited=\"middle\" dy=\"0\">\n {text}\n </LineSpan>\n </text>\n )}\n {total ? (\n <rect x={left} y={top} width={w} height={h} rx={2} fill={fill} />\n ) : payload.kind === \"zero\" ? (\n <rect x={left} y={top - 0.75} width={w} height={1.5} fill=\"var(--ds-chart-1)\" />\n ) : (\n // The outline inside the bar's box, so increases and decreases keep the totals' width.\n <rect x={left + 0.75} y={top + 0.75} width={Math.max(0, w - 1.5)} height={Math.max(0, h - 1.5)} rx={1.5} fill={fill} stroke=\"var(--ds-chart-1)\" strokeWidth={1.5} />\n )}\n </g>\n );\n}\n\n/* ── Heatmap ───────────────────────────────────────────────────── */\n\nexport type HeatmapCell = {\n /** The cell's row and column, as named in `rows` and `columns`. */\n row: string;\n column: string;\n /**\n * `null`: the period is in the grid but has no data (hatched, \"No data\"), never the same as 0. A negative value\n * draws as step 0, like zero (the scale counts up from nothing); its name and the table keep the signed value.\n */\n value: number | null;\n /** The cell's name for screen readers and the tooltip's title; \"row, column: value\" by default. */\n label?: string;\n};\n\nexport type HeatmapProps = FrameProps & {\n /** The rows, top to bottom (\"Week 1\" …, or the months). Names are unique: cells find their row by name. */\n rows: readonly string[];\n /**\n * The columns, from the inline start (the weekdays, or the weeks). Names are unique, as for `rows`: a name given\n * twice draws both, but every cell of that name lands in the first (the chart warns).\n */\n columns: readonly string[];\n /** One entry per cell; a row and column with no entry draws no cell (a day outside the month). */\n data: readonly HeatmapCell[];\n /** The row headers' name (\"Week\"), on the data table's first header and the grid's corner; \"Period\" by default. */\n rowHeader?: string;\n /**\n * Four strictly ascending lower bounds of the four intensity steps; from the positive values' quartiles by\n * default. Bounds out of order still count each bound a value reaches, so the steps no longer follow the values\n * (the chart warns).\n */\n thresholds?: readonly [number, number, number, number];\n valueFormatter?: ChartValueFormatter;\n onCellPress?: (cell: HeatmapCell) => void;\n};\n\n/** A cell with no data: hatched, so it never passes for zero's flat `ds-background-neutral`. */\nconst HEAT_MISSING = \"repeating-linear-gradient(135deg, var(--ds-background-neutral-pressed) 0 2px, transparent 2px 5px)\";\n\ntype Slot = { cell: HeatmapCell; row: number; column: number; index: number };\n\n/** Whether the bounds rise strictly, each one finite: otherwise the steps no longer follow the values. */\nconst ascending = (bounds: readonly number[]) => bounds.every((bound, index) => Number.isFinite(bound) && (index === 0 || bound > bounds[index - 1]!));\nconst hasDuplicates = (names: readonly string[]) => new Set(names).size !== names.length;\n\n/**\n * A value over a grid of two cycles, month by weekday or week by weekday: when demand peaks. Cells share\n * the CalendarHeatmap's five steps (zero or less in `ds-background-neutral`, then the `ds-chart-1` ramp, steps\n * that differ in lightness), a cell with no data is hatched and named \"No data\", and a pair with no entry draws an\n * empty gap. Column labels above, row labels at the inline start, a \"Less … More\" scale under the grid. No text is\n * drawn over the cells.\n *\n * Screen readers: every row of the grid has as many cells as the header row (the corner is a column header named\n * by `rowHeader`, a gap an empty, unfocusable grid cell), so each cell sits under its own column's header.\n *\n * Keyboard and pointer: one tab stop. The arrow keys move focus a cell (mirrored in RTL, skipping gaps), Home\n * and End go to the row's ends, Ctrl+Home and Ctrl+End to the grid's; Enter and Space press the focused cell.\n * Hovering never moves focus or the tab stop. The tooltip shows the cell under the pointer while it is over one,\n * and the focused cell otherwise; a key that moves focus hands the tooltip back to the focused cell until the\n * pointer enters another cell. Escape hides it.\n */\nexport function Heatmap({ title, \"aria-label\": ariaLabel, period, rows, columns, data, rowHeader, thresholds, valueFormatter = plain, onCellPress, isLoading, emptyState, ...table }: HeatmapProps) {\n const { locale } = useLocale();\n const { isRtl } = useChartDirection();\n const animate = useChartAnimation();\n const noValue = chartNoValueLabel(locale);\n const rowHeaderLabel = rowHeader ?? chartPeriodLabel(locale);\n // Cells by position; a pair given twice keeps its last entry.\n const byPair = new Map<string, HeatmapCell>();\n for (const cell of data) if (rows.includes(cell.row) && columns.includes(cell.column)) byPair.set(`${cell.row}\\u0000${cell.column}`, cell);\n useOnce(data.some((cell) => !rows.includes(cell.row) || !columns.includes(cell.column)), \"Heatmap: a cell outside rows and columns is left out.\");\n useOnce(hasDuplicates(rows) || hasDuplicates(columns), \"Heatmap: rows and columns need unique names; a repeated name's cells are drawn in its first row or column only.\");\n useOnce(thresholds !== undefined && !ascending(thresholds), \"Heatmap: thresholds must be four finite, strictly ascending bounds.\");\n const slots: Slot[] = [];\n const grid: (Slot | undefined)[][] = rows.map((row, r) =>\n columns.map((column, c) => {\n // A repeated name is a gap after its first place, so no cell is drawn (or reached by the arrows) twice.\n if (rows.indexOf(row) !== r || columns.indexOf(column) !== c) return undefined;\n const cell = byPair.get(`${row}\\u0000${column}`);\n if (!cell) return undefined;\n const slot = { cell, row: r, column: c, index: slots.length };\n slots.push(slot);\n return slot;\n }),\n );\n const values = slots.map((slot) => slot.cell.value).filter((value): value is number => value !== null && Number.isFinite(value));\n const bounds = thresholds ?? heatmapThresholds(values);\n const hasMissing = slots.some((slot) => slot.cell.value === null || !Number.isFinite(slot.cell.value));\n const format = (value: number | null) => (value === null || !Number.isFinite(value) ? noValue : valueFormatter(value));\n const nameOf = (cell: HeatmapCell) => cell.label ?? `${cell.row}, ${cell.column}: ${format(cell.value)}`;\n // levelOf gives a negative value step 0, the same as zero.\n const fillOf = (cell: HeatmapCell) => (cell.value === null || !Number.isFinite(cell.value) ? HEAT_MISSING : HEAT_LEVELS[levelOf(cell.value, bounds)]!);\n\n // The roving tab stop and the keys follow focus only (the first cell until the reader moves); the pointer only\n // ever sets `hovered`, which the tooltip prefers while `tip.hover` holds.\n const [focused, setFocused] = React.useState(0);\n const [hovered, setHovered] = React.useState<number | null>(null);\n const [tip, setTip] = React.useState<{ focus: boolean; hover: boolean }>({ focus: false, hover: false });\n const current = Math.min(focused, Math.max(0, slots.length - 1));\n const cells = React.useRef<(HTMLElement | null)[]>([]);\n const move = (from: Slot, key: string, ctrl: boolean): Slot | undefined => {\n const forward = isRtl ? \"ArrowLeft\" : \"ArrowRight\";\n const back = isRtl ? \"ArrowRight\" : \"ArrowLeft\";\n const walk = (dr: number, dc: number) => {\n for (let r = from.row + dr, c = from.column + dc; r >= 0 && r < rows.length && c >= 0 && c < columns.length; r += dr, c += dc) {\n if (grid[r]![c]) return grid[r]![c];\n }\n return undefined;\n };\n if (key === forward) return walk(0, 1);\n if (key === back) return walk(0, -1);\n if (key === \"ArrowDown\") return walk(1, 0);\n if (key === \"ArrowUp\") return walk(-1, 0);\n if (key === \"Home\") return ctrl ? slots[0] : grid[from.row]!.find(Boolean);\n if (key === \"End\") return ctrl ? slots[slots.length - 1] : [...grid[from.row]!].reverse().find(Boolean);\n return undefined;\n };\n\n const tableRows = rows.map((row, r) => ({\n id: r,\n row,\n ...Object.fromEntries(columns.map((_, c) => [`c${c}`, grid[r]![c] ? format(grid[r]![c]!.cell.value) : \"\"])),\n })) as ({ id: number; row: string } & Record<string, string>)[];\n const tableColumns: TableColumn<(typeof tableRows)[number]>[] = [\n { key: \"row\", header: rowHeaderLabel, isRowHeader: true },\n ...columns.map((column, c) => ({ key: `c${c}`, header: column, align: \"end\" as const })),\n ];\n // Cell rows of 28px with 3px gaps, the column labels, the scale and their gaps.\n const height = 16 + 6 + rows.length * 28 + Math.max(0, rows.length - 1) * 3 + 12 + 20;\n const focusedSlot = slots[current];\n const hoveredSlot = hovered === null ? undefined : slots[hovered];\n const tipSlot = tip.hover && hoveredSlot ? hoveredSlot : tip.focus ? focusedSlot : undefined;\n\n return (\n <Shell table={table}\n title={title}\n aria-label={ariaLabel}\n period={period}\n isLoading={isLoading}\n emptyState={emptyState}\n isEmpty={values.length === 0}\n height={height}\n columns={tableColumns}\n rows={tableRows}\n >\n <div data-slot=\"heatmap\" className=\"relative flex min-w-0 flex-col gap-ds-150\">\n <div className=\"min-w-0 overflow-x-auto\" data-slot=\"heatmap-scroll\">\n <div\n role=\"grid\"\n aria-label={title ?? ariaLabel}\n data-slot=\"heatmap-grid\"\n className=\"grid min-w-max gap-[3px]\"\n style={{ gridTemplateColumns: `max-content repeat(${columns.length}, minmax(1.5rem, 1fr))` }}\n onKeyDown={(event) => {\n // Every key acts on the focused cell, never on the one under the pointer.\n if (!focusedSlot) return;\n if (event.key === \"Enter\" || event.key === \" \") {\n // Space never scrolls the page from inside the grid.\n event.preventDefault();\n onCellPress?.(focusedSlot.cell);\n return;\n }\n if (event.key === \"Escape\") {\n setTip({ focus: false, hover: false });\n return;\n }\n const next = move(focusedSlot, event.key, event.ctrlKey || event.metaKey);\n if (!next) return;\n event.preventDefault();\n setFocused(next.index);\n // The keyboard takes the tooltip back from the pointer.\n setTip({ focus: true, hover: false });\n cells.current[next.index]?.focus();\n }}\n onFocus={() => setTip((state) => ({ ...state, focus: true }))}\n onBlur={(event) => {\n if (!event.currentTarget.contains(event.relatedTarget as Node | null)) setTip((state) => ({ ...state, focus: false }));\n }}\n onMouseLeave={() => {\n setHovered(null);\n setTip((state) => ({ ...state, hover: false }));\n }}\n >\n <div role=\"row\" className=\"contents\">\n {/* The corner heads the row headers' column, so every row has as many cells as this one. */}\n <span role=\"columnheader\" aria-label={rowHeaderLabel} data-slot=\"heatmap-corner\" className=\"h-4\" />\n {columns.map((column, c) => (\n <span key={c} role=\"columnheader\" data-slot=\"heatmap-column\" className=\"h-4 truncate text-center text-[11px] leading-4 text-ds-text-subtlest\">\n {column}\n </span>\n ))}\n </div>\n {rows.map((row, r) => (\n <div key={r} role=\"row\" data-slot=\"heatmap-row\" className=\"contents\">\n <span role=\"rowheader\" className=\"flex h-7 items-center truncate pe-ds-100 text-body-small text-ds-text-subtle\">\n <bdi>{row}</bdi>\n </span>\n {columns.map((_, c) => {\n const slot = grid[r]![c];\n // An empty, unfocusable cell: it keeps the column count, so the cells after it stay under their headers.\n if (!slot) return <span key={c} role=\"gridcell\" data-slot=\"heatmap-gap\" className=\"h-7\" />;\n const missing = slot.cell.value === null || !Number.isFinite(slot.cell.value);\n return (\n <span\n key={c}\n ref={(element) => {\n cells.current[slot.index] = element;\n }}\n role=\"gridcell\"\n aria-label={nameOf(slot.cell)}\n data-slot=\"heatmap-cell\"\n data-state={missing ? \"missing\" : slot.cell.value === 0 ? \"zero\" : \"value\"}\n data-level={missing ? undefined : levelOf(slot.cell.value!, bounds)}\n tabIndex={slot.index === current ? 0 : -1}\n onFocus={() => setFocused(slot.index)}\n onMouseEnter={() => {\n setHovered(slot.index);\n setTip((state) => ({ ...state, hover: true }));\n }}\n onMouseLeave={() => setHovered((index) => (index === slot.index ? null : index))}\n onClick={() => onCellPress?.(slot.cell)}\n className={cn(\n \"h-7 rounded-[3px] outline-hidden focus-visible:inset-ring-2 focus-visible:inset-ring-ds-border-focused\",\n animate && \"transition-[background-color] duration-150\",\n onCellPress && \"cursor-pointer\",\n )}\n style={{ background: fillOf(slot.cell) }}\n />\n );\n })}\n </div>\n ))}\n </div>\n </div>\n <div data-slot=\"heatmap-scale\" className=\"flex flex-wrap items-center gap-x-ds-200 gap-y-ds-050 text-body-small text-ds-text-subtle\">\n <span className=\"flex items-center gap-ds-075\">\n <span>{heatmapLessLabel(locale)}</span>\n <span aria-hidden className=\"flex gap-[3px]\">\n {HEAT_LEVELS.map((background, level) => (\n <span key={level} data-level={level} className=\"size-3 rounded-[2px]\" style={{ background }} />\n ))}\n </span>\n <span>{heatmapMoreLabel(locale)}</span>\n </span>\n {hasMissing && (\n <span data-slot=\"heatmap-missing-key\" className=\"flex items-center gap-ds-075\">\n <span aria-hidden className=\"size-3 rounded-[2px]\" style={{ background: HEAT_MISSING }} />\n {noValue}\n </span>\n )}\n </div>\n {tipSlot && (\n <HeatTooltip anchor={cells.current[tipSlot.index] ?? null} title={tipSlot.cell.label ?? `${tipSlot.cell.row} · ${tipSlot.cell.column}`}>\n <ChartTooltip\n active\n label={tipSlot.cell.label ?? `${tipSlot.cell.row} · ${tipSlot.cell.column}`}\n payload={[{ dataKey: \"value\", name: chartValueLabel(locale), value: format(tipSlot.cell.value), color: fillOf(tipSlot.cell) }]}\n />\n </HeatTooltip>\n )}\n </div>\n </Shell>\n );\n}\n\n/**\n * The shared ChartTooltip over a cell: above it, or under it when there is no room; kept inside the chart's\n * width. Placed again when the grid's sideways scroll container scrolls or the window resizes, so it stays on\n * its cell. Hidden from screen readers, which read the cell's own name.\n */\nfunction HeatTooltip({ anchor, title, children }: { anchor: HTMLElement | null; title: string; children: React.ReactNode }) {\n const ref = React.useRef<HTMLDivElement>(null);\n const [place, setPlace] = React.useState<{ left: number; top: number } | null>(null);\n React.useLayoutEffect(() => {\n const tooltip = ref.current;\n const box = tooltip?.parentElement;\n if (!tooltip || !box || !anchor) return;\n const position = () => {\n const frame = box.getBoundingClientRect();\n const cell = anchor.getBoundingClientRect();\n const width = tooltip.offsetWidth;\n const heightOf = tooltip.offsetHeight;\n const center = cell.left - frame.left + cell.width / 2;\n const left = Math.min(Math.max(0, center - width / 2), Math.max(0, frame.width - width));\n // Above the cell while it fits in the viewport, under it otherwise.\n const top = cell.top - heightOf - 8 >= 0 ? cell.top - frame.top - heightOf - 8 : cell.bottom - frame.top + 8;\n setPlace((previous) => (previous && previous.left === left && previous.top === top ? previous : { left, top }));\n };\n position();\n const scroller = anchor.closest(\"[data-slot='heatmap-scroll']\");\n scroller?.addEventListener(\"scroll\", position, { passive: true });\n window.addEventListener(\"resize\", position);\n return () => {\n scroller?.removeEventListener(\"scroll\", position);\n window.removeEventListener(\"resize\", position);\n };\n }, [anchor, title]);\n return (\n <div\n ref={ref}\n aria-hidden\n data-slot=\"heatmap-tooltip\"\n // Its own width (max-content, at most the chart's), never squeezed by where it sits, so the placing\n // above measures the width it will have.\n className=\"pointer-events-none absolute z-10 w-max max-w-full\"\n style={place ? { left: place.left, top: place.top } : { left: 0, top: 0, visibility: \"hidden\" }}\n >\n {children}\n </div>\n );\n}\n"]}
@@ -171,7 +171,10 @@ export function TableView({ "aria-label": label, columns: allColumns, rows, rowK
171
171
  const raw = column.render ? column.render(item.row) : item.row[column.key];
172
172
  // Text and numbers are isolated, so a phone or a price keeps its order in RTL ("+1 555 0100").
173
173
  const value = typeof raw === "string" || typeof raw === "number" ? _jsx("bdi", { children: raw }) : raw;
174
- return (_jsxs(AriaCell, { "data-slot": "table-cell", "data-align": column.align ?? "start", "data-hide-below": hideBelow(column), className: cn(height, "group/cell relative border-b border-ds-border px-ds-200 align-middle outline-hidden", lastRow, "data-[focus-visible]:inset-ring-2 data-[focus-visible]:inset-ring-ds-border-focused", column.align === "end" ? "whitespace-nowrap text-end tabular-nums" : "text-start", cellBox, virtual && column.align === "end" && "justify-end", hiddenClass(column)), children: [!selectable && index === 0 && _jsx(SelectedMarker, {}), column.wrap ? (_jsxs(_Fragment, { children: [_jsx("span", { "data-slot": "table-cell-wrap", title: typeof raw === "string" ? raw : undefined, className: "line-clamp-2 py-ds-050", children: value }), _jsx("span", { "aria-hidden": true, inert: true, "data-slot": "table-cell-full", className: "absolute inset-x-0 top-0 z-[2] hidden min-h-full rounded-ds-medium bg-ds-surface-overlay px-ds-200 py-ds-150 text-ds-text shadow-ds-overlay group-hover/cell:block group-data-[focus-visible]/cell:block group-data-[focus-visible]/row:block", children: value })] })) : value] }, column.key));
174
+ return (_jsxs(AriaCell, { "data-slot": "table-cell", "data-align": column.align ?? "start", "data-hide-below": hideBelow(column), className: cn(height, "group/cell relative border-b border-ds-border px-ds-200 align-middle outline-hidden", lastRow, "data-[focus-visible]:inset-ring-2 data-[focus-visible]:inset-ring-ds-border-focused",
175
+ // One line per cell, as shadcn's tables: on a phone the table scrolls sideways instead of breaking
176
+ // "SO-1081" or a name over two lines. `wrap` columns clamp to two lines; `width` columns truncate.
177
+ column.align === "end" ? "whitespace-nowrap text-end tabular-nums" : cn("text-start", !column.wrap && !column.width && "whitespace-nowrap"), cellBox, virtual && column.align === "end" && "justify-end", hiddenClass(column)), children: [!selectable && index === 0 && _jsx(SelectedMarker, {}), column.wrap ? (_jsxs(_Fragment, { children: [_jsx("span", { "data-slot": "table-cell-wrap", title: typeof raw === "string" ? raw : undefined, className: "line-clamp-2 py-ds-050", children: value }), _jsx("span", { "aria-hidden": true, inert: true, "data-slot": "table-cell-full", className: "absolute inset-x-0 top-0 z-[2] hidden min-h-full rounded-ds-medium bg-ds-surface-overlay px-ds-200 py-ds-150 text-ds-text shadow-ds-overlay group-hover/cell:block group-data-[focus-visible]/cell:block group-data-[focus-visible]/row:block", children: value })] })) : value] }, column.key));
175
178
  })] })) })] }));
176
179
  const rowHeight = density === "compact" ? 36 : 48;
177
180
  return (_jsx("div", { "data-slot": "table", "data-density": density, "data-scrolled": scrolled || undefined, "data-virtual": virtual ? "" : undefined, onScroll: maxHeight && !virtual ? (event) => setScrolled(event.currentTarget.scrollTop > 0) : undefined, style: maxHeight && !virtual ? { maxHeight } : undefined, className: cn(virtual ? "overflow-hidden" : "overflow-auto", "rounded-ds-large bg-ds-surface-raised shadow-ds-raised", maxHeight && "overscroll-contain"), children: virtual ? (_jsx(Virtualizer, { layout: TableLayout, layoutOptions: { rowHeight, headingHeight: 36 }, children: table })) : (table) }));
@@ -1 +1 @@
1
- {"version":3,"file":"table.js","sourceRoot":"","sources":["../../src/collection/table.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,IAAI,IAAI,QAAQ,EAChB,MAAM,IAAI,UAAU,EACpB,GAAG,IAAI,OAAO,EACd,KAAK,IAAI,SAAS,EAClB,SAAS,IAAI,aAAa,EAC1B,WAAW,IAAI,eAAe,EAC9B,WAAW,EACX,SAAS,EACT,WAAW,GAIZ,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAyDzD,MAAM,SAAS,GAAG,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAW,CAAC;AAE/E;;;;GAIG;AACH,MAAM,UAAU,GAAG,EAAE,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,eAAe,EAAW,CAAC;AACnH,8GAA8G;AAC9G,MAAM,WAAW,GAA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GACpB,IACN,CACJ,CAAC,CAAC,CACA,KACF,KAlCI,MAAM,CAAC,GAAG,CAmCN,CACZ,CAAC;wBACJ,CAAC,CAAC,IACM,CACX,GACa,IACN,CACf,CAAC;IACF,MAAM,SAAS,GAAG,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAClD,OAAO,CACL,2BACY,OAAO,kBACH,OAAO,mBACN,QAAQ,IAAI,SAAS,kBACtB,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EACtC,QAAQ,EAAE,SAAS,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,aAAa,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EACvG,KAAK,EAAE,SAAS,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,SAAS,EACxD,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,eAAe,EAAE,wDAAwD,EAAE,SAAS,IAAI,oBAAoB,CAAC,YAExJ,OAAO,CAAC,CAAC,CAAC,CACT,KAAC,WAAW,IAAC,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,EAAE,EAAE,YAC9E,KAAK,GACM,CACf,CAAC,CAAC,CAAC,CACF,KAAK,CACN,GACG,CACP,CAAC;AACJ,CAAC;AAED,sGAAsG;AACtG,SAAS,cAAc;IACrB,OAAO,CACL,iDAEY,kBAAkB,EAC5B,SAAS,EAAC,+FAA+F,GACzG,CACH,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport type { Density } from \"../density\";\nimport * as React from \"react\";\nimport {\n Cell as AriaCell,\n Column as AriaColumn,\n Row as AriaRow,\n Table as AriaTable,\n TableBody as AriaTableBody,\n TableHeader as AriaTableHeader,\n TableLayout,\n useLocale,\n Virtualizer,\n type Key,\n type Selection,\n type SortDescriptor,\n} from \"react-aria-components\";\n\nimport { cn } from \"../utils\";\nimport { IconGlyph } from \"../display/icon\";\nimport { selectionLabel } from \"../i18n\";\nimport { SelectionCheckbox } from \"./selection-checkbox\";\n\nexport type TableColumn<T> = {\n key: string;\n /** The column's name, a noun (\"Total\"). */\n header: string;\n /** `end` for numbers and money: right-aligned (start in RTL) in tabular figures. */\n align?: \"start\" | \"end\";\n isSortable?: boolean;\n /** A CSS width (\"120px\", \"20%\"). Set one to truncate long values in this column. */\n width?: string;\n /** The cell's content; the row's value under `key` by default. */\n render?: (row: T) => React.ReactNode;\n /** Long text: clamp to two lines with an ellipsis, the full text on hover and keyboard focus. */\n wrap?: boolean;\n /** The row header: the value that names the row (an order number); the first column by default. */\n isRowHeader?: boolean;\n /**\n * Hides the column, header and cells, on viewports narrower than this breakpoint (Tailwind's `sm` 640px,\n * `md` 768px, `lg` 1024px, `xl` 1280px): for secondary columns that crowd a narrow screen. The column\n * leaves the table there, so neither the arrow keys nor screen readers reach it. Ignored on the row\n * header column, which names each row (a development warning says so). Sorting by the other columns is\n * unaffected.\n */\n hideBelow?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n};\n\nexport type TableProps<T> = {\n /** Names the table (\"Orders\"). */\n \"aria-label\": string;\n columns: readonly TableColumn<T>[];\n rows: readonly T[];\n /**\n * The row's stable id; `row.id` by default. Ids must be unique within the table. When the data has no\n * single unique field, build one from the fields that are (`${row.date}:${row.channel}`), or add the row's\n * index as a last resort. A repeated id still renders every row: the first keeps its id and the later ones\n * are keyed `a#2`, `a#3`, … in row order, and selection and `onRowAction` receive those suffixed keys; a\n * development warning names the repeated ids. A suffixed key follows the row's position, not\n * the row: after a sort or filter, a selection made through it can move to another copy of the id.\n */\n rowKey?: (row: T) => Key;\n selectionMode?: \"none\" | \"single\" | \"multiple\";\n selectedKeys?: \"all\" | Iterable<Key>;\n defaultSelectedKeys?: \"all\" | Iterable<Key>;\n onSelectionChange?: (keys: Selection) => void;\n sortDescriptor?: SortDescriptor;\n onSortChange?: (descriptor: SortDescriptor) => void;\n /** `compact` (36px rows) for dense working screens; `default` (48px) for public and content pages. */\n density?: Density;\n /** Shown when there are no rows: an `EmptyState`, or one sentence on why it is empty and the action that fills it. */\n emptyState?: React.ReactNode;\n /** Opens the record: the whole row is the target. */\n onRowAction?: (key: Key) => void;\n /** A height for the scroll area: the header stays put and gets a shadow once rows scroll under it. */\n maxHeight?: string;\n};\n\nconst SORT_ICON = { ascending: \"arrow-up\", descending: \"arrow-down\" } as const;\n\n/**\n * `hideBelow` as CSS: `display: none` under the breakpoint (written out in full for Tailwind to find). Only\n * for the first paint of a server-rendered table, which has no viewport and renders every column; the\n * client then drops the column itself.\n */\nconst HIDE_BELOW = { sm: \"max-sm:hidden\", md: \"max-md:hidden\", lg: \"max-lg:hidden\", xl: \"max-xl:hidden\" } as const;\n/** The same breakpoints as media queries: the client leaves a hidden column out of the table's collection. */\nconst WIDE_ENOUGH = { sm: \"(width >= 40rem)\", md: \"(width >= 48rem)\", lg: \"(width >= 64rem)\", xl: \"(width >= 80rem)\" } as const;\ntype Breakpoint = keyof typeof HIDE_BELOW;\n\n/**\n * The breakpoints the viewport is at or above, as a stable string (\"sm md\"); every one where there is no\n * `matchMedia` (SSR, tests). The server snapshot is every breakpoint, so hydration renders every column,\n * exactly as the server did (no mismatch), with the CSS above hiding the narrow-screen ones; React then\n * re-renders at once with the real viewport and the hidden columns leave the collection. A client-only\n * render reads the viewport on its first render.\n */\nfunction useWideEnough(enabled: boolean) {\n // One MediaQueryList per breakpoint for the table's life, read by every snapshot and subscription.\n const lists = React.useMemo(\n () =>\n enabled && typeof window !== \"undefined\" && window.matchMedia\n ? (Object.keys(WIDE_ENOUGH) as Breakpoint[]).map((key) => [key, window.matchMedia(WIDE_ENOUGH[key])] as const)\n : null,\n [enabled],\n );\n const subscribe = React.useCallback(\n (onChange: () => void) => {\n lists?.forEach(([, list]) => list.addEventListener(\"change\", onChange));\n return () => lists?.forEach(([, list]) => list.removeEventListener(\"change\", onChange));\n },\n [lists],\n );\n const all = Object.keys(WIDE_ENOUGH).join(\" \");\n const snapshot = () => (lists ? lists.filter(([, list]) => list.matches).map(([key]) => key).join(\" \") : all);\n return React.useSyncExternalStore(subscribe, snapshot, () => all);\n}\n\n/**\n * The rows' keys, unique. React Aria keys a collection by id: a repeated id dropped rows (the\n * walk over the rows follows keys, and the last row with that id ends it early) and, on an update, could loop\n * forever. So the first row with an id keeps it and each later one gets `id#2`, `id#3`, … in row order,\n * skipping any suffix another row already uses as its real id. Ids are compared as strings, as React keys\n * are. Unique ids come back as they are, in the same array order. `repeated` lists each repeated id once.\n * A suffix follows the row's position, not the row: after a sort, filter or page change another copy of the\n * id can hold `id#2`. Each id resumes its own suffix count, so many copies of one id stay linear.\n */\nexport function uniqueRowKeys(keys: readonly Key[]): { keys: Key[]; repeated: Key[] } {\n const taken = new Set(keys.map(String));\n if (taken.size === keys.length) return { keys: [...keys], repeated: [] };\n // Each id as its first row gives it, by its string form.\n const first = new Map<string, Key>();\n const repeated = new Map<string, Key>();\n // The next suffix to try per id, so the k-th copy does not re-probe the k-1 suffixes before it.\n const next = new Map<string, number>();\n const unique = keys.map((key) => {\n const name = String(key);\n if (!first.has(name)) {\n first.set(name, key);\n return key;\n }\n repeated.set(name, first.get(name)!);\n let count = next.get(name) ?? 2;\n while (taken.has(`${name}#${count}`)) count++;\n next.set(name, count + 1);\n const suffixed = `${name}#${count}`;\n taken.add(suffixed);\n return suffixed;\n });\n return { keys: unique, repeated: [...repeated.values()] };\n}\n\n/** A row without an id: no `id` field (`undefined`) or `id: null`. */\nconst isMissing = (key: Key | null | undefined) => key == null;\n\n/** A repeated id as the warning shows it: JSON for real ids. */\nconst describeKey = (key: Key) => JSON.stringify(key);\n\n/**\n * Repeated row ids, said once per table and set of ids, in development only. `component` names the caller\n * (\"Table\", \"DataTable\"). Rows without an id (no `id` field, or `id: null`, and no `rowKey`) all repeat\n * `undefined` or `null`; the warning says so in those words instead of listing it as an id.\n */\nfunction useRepeatedKeyWarning(component: string, label: string, repeated: readonly Key[]) {\n const signature = repeated.length ? repeated.map((key) => (isMissing(key) ? String(key) : describeKey(key))).join(\", \") : \"\";\n const warned = React.useRef<Set<string> | null>(null);\n React.useEffect(() => {\n if (process.env.NODE_ENV === \"production\" || !signature) return;\n warned.current ??= new Set();\n if (warned.current.has(signature)) return;\n warned.current.add(signature);\n const missing = repeated.some(isMissing);\n const ids = repeated.filter((key) => !isMissing(key));\n const shown = ids.length > 10 ? `${ids.slice(0, 10).map(describeKey).join(\", \")} and ${ids.length - 10} more` : ids.map(describeKey).join(\", \");\n const problems = [missing && \"rows have no id; pass rowKey\", ids.length > 0 && `the row ids ${shown} repeat`].filter(Boolean).join(\", and \");\n // Only rows without ids: there is no id to show a suffix of, so the tail says how they are keyed instead,\n // in the keys' literal form: the first `undefined` (or `null`) itself, the later ones the strings\n // \"undefined#2\", \"undefined#3\", … by position.\n const positional = repeated\n .filter(isMissing)\n .map((key) => `${String(key)}, \"${String(key)}#2\", \"${String(key)}#3\", …`)\n .join(\" and \");\n const keyed = ids.length > 0\n ? 'the later rows with a repeated id are keyed \"<id>#2\", \"<id>#3\", … in row order'\n : `each row is keyed by its position: ${positional}`;\n console.warn(\n `${component} \"${label}\": ${problems}. Every row still renders: ${keyed}, and selection and onRowAction receive those keys. Give every row a unique id (rowKey).`,\n );\n // `repeated` is read through `signature`.\n }, [signature, label, component]);\n}\n\n/**\n * Records the user scans, compares, sorts and acts on: orders, customers, invoices. On\n * `ds-surface-raised` with a raised shadow; a sunken header row; 48px rows (36px compact) divided by\n * `ds-border`; selection by checkbox with a 2px marker on the leading edge; the row opens the record.\n * Status is a Badge, money right-aligned and formatted by the locale (\"$1,248.00\"). Under 640px use a List.\n *\n * Pressing a row opens the record while nothing is selected; once rows are ticked a press toggles\n * selection, and a record link in the row-header cell always opens, so a link is never trapped behind selection.\n */\nexport function Table<T extends object>(props: TableProps<T>) {\n return <TableView {...props} />;\n}\n\n/**\n * @internal The Table itself, with one option the public Table does not offer: `virtual` renders only\n * the rows in view (React Aria's Virtualizer). DataTable uses it for long client lists; the table becomes\n * its own scroll area at `height` px, rows and header keep their DS heights and look.\n */\nexport function TableView<T extends object>({\n \"aria-label\": label,\n columns: allColumns,\n rows,\n rowKey = (row) => (row as { id: Key }).id,\n selectionMode = \"none\",\n selectedKeys,\n defaultSelectedKeys,\n onSelectionChange,\n sortDescriptor,\n onSortChange,\n density = \"comfortable\",\n emptyState,\n onRowAction,\n maxHeight,\n virtual,\n component = \"Table\",\n}: TableProps<T> & {\n virtual?: { height: number };\n /** The component the warnings name: DataTable passes its own. */\n component?: \"Table\" | \"DataTable\";\n}) {\n const { locale } = useLocale();\n const [scrolled, setScrolled] = React.useState(false);\n const selectable = selectionMode !== \"none\";\n const multiple = selectionMode === \"multiple\";\n const rowHeaderKey = (allColumns.find((column) => column.isRowHeader) ?? allColumns[0])?.key;\n // The row header always shows. A column hidden at this viewport is dropped from the collection, so React\n // Aria's keyboard navigation never lands on it (a `display: none` cell would still be in the grid).\n const hideBelow = (column: TableColumn<T>) => (column.key === rowHeaderKey ? undefined : column.hideBelow);\n const ignoredHideBelow = allColumns.find((column) => column.key === rowHeaderKey)?.hideBelow;\n React.useEffect(() => {\n if (process.env.NODE_ENV !== \"production\" && ignoredHideBelow) {\n console.warn(`Table: hideBelow=\"${ignoredHideBelow}\" is ignored on the row header column \"${String(rowHeaderKey)}\", which names each row.`);\n }\n }, [ignoredHideBelow, rowHeaderKey]);\n const wide = useWideEnough(allColumns.some((column) => hideBelow(column)));\n const columns = allColumns.filter((column) => {\n const breakpoint = hideBelow(column);\n return !breakpoint || wide.split(\" \").includes(breakpoint);\n });\n // A resize that drops the focused cell's column: React Aria's grid state (useGridState) sees the focused\n // key leave the collection and moves focus to the cell now at that index in the same row (the next one\n // toward the end), or to the row itself when the dropped column was the row's end-most; focus never falls\n // to the page (checked in Chromium, LTR and RTL).\n const hiddenClass = (column: TableColumn<T>) => {\n const breakpoint = hideBelow(column);\n return !virtual && breakpoint ? HIDE_BELOW[breakpoint] : undefined;\n };\n const rowHeader = Math.max(0, columns.findIndex((column) => column.isRowHeader));\n const height = density === \"compact\" ? \"h-ds-row-compact\" : \"h-ds-row\";\n // Virtualized, cells are boxes the layout places; they centre their content themselves. Each row sits alone\n // in its own wrapper (so \"last row\" matches every row) and the header row has no box of its own: the\n // header cells carry the sunken fill and the scroll shadow, and every row keeps its divider.\n const cellBox = virtual ? \"flex items-center\" : \"\";\n const headerCell = virtual ? \"bg-ds-surface-sunken in-data-[scrolled]:shadow-ds-overflow\" : \"\";\n const lastRow = virtual ? \"\" : \"group-last/row:border-b-0\";\n // Every render, not memoized: a rows array changed in place (a row grown, removed or\n // replaced, same reference, same length) must not keep a stale key. It is O(n); unique ids take the fast path\n // (one Set) and come back unchanged.\n const { keys, repeated } = uniqueRowKeys(rows.map(rowKey));\n useRepeatedKeyWarning(component, label, repeated);\n const table = (\n <AriaTable\n aria-label={label}\n selectionMode={selectionMode}\n selectionBehavior=\"toggle\"\n selectedKeys={selectedKeys}\n defaultSelectedKeys={defaultSelectedKeys}\n onSelectionChange={onSelectionChange}\n sortDescriptor={sortDescriptor}\n onSortChange={onSortChange}\n onRowAction={onRowAction}\n onScroll={virtual ? (event: React.UIEvent<HTMLElement>) => setScrolled(event.currentTarget.scrollTop > 0) : undefined}\n style={virtual ? { height: virtual.height, overflow: \"auto\" } : undefined}\n className={cn(\"w-full border-separate border-spacing-0 text-body text-ds-text outline-hidden\", virtual && \"block overscroll-contain\")}\n >\n <AriaTableHeader\n data-slot=\"table-header\"\n className={cn(\n \"sticky top-0 z-[3] bg-ds-surface-sunken transition-shadow duration-(--ds-duration-fast) motion-reduce:transition-none\",\n \"in-data-[scrolled]:shadow-ds-overflow\",\n )}\n >\n {selectable && (\n <AriaColumn data-slot=\"table-selection-column\" className={cn(\"w-10 border-b border-ds-border ps-ds-200 text-start\", cellBox, headerCell)}>\n {/* Select all only where several can be selected; single selection names the column for screen readers. */}\n {multiple ? <SelectionCheckbox /> : <span className=\"sr-only\">{selectionLabel(locale)}</span>}\n </AriaColumn>\n )}\n {columns.map((column, index) => (\n <AriaColumn\n key={column.key}\n id={column.key}\n isRowHeader={index === rowHeader}\n allowsSorting={column.isSortable}\n data-slot=\"table-column\"\n data-align={column.align ?? \"start\"}\n data-hide-below={hideBelow(column)}\n style={column.width ? { width: column.width } : undefined}\n className={cn(\n \"h-9 whitespace-nowrap border-b border-ds-border px-ds-200 align-middle text-body-small font-medium text-ds-text-subtle outline-hidden\",\n \"data-[focus-visible]:inset-ring-2 data-[focus-visible]:inset-ring-ds-border-focused\",\n column.align === \"end\" ? \"text-end\" : \"text-start\",\n column.isSortable && \"cursor-pointer data-[hovered]:text-ds-text\",\n cellBox,\n headerCell,\n virtual && column.align === \"end\" && \"justify-end\",\n hiddenClass(column),\n )}\n >\n {({ allowsSorting, sortDirection }) => (\n <span className={cn(\"inline-flex items-center gap-ds-050\", column.align === \"end\" && \"flex-row-reverse\")}>\n {column.header}\n {allowsSorting && (\n <span data-slot=\"table-sort-icon\" data-direction={sortDirection ?? \"none\"} className={cn(\"inline-flex\", sortDirection ? \"text-ds-text\" : \"text-ds-text-subtlest\")}>\n <IconGlyph name={sortDirection ? SORT_ICON[sortDirection] : \"chevrons-up-down\"} size=\"small\" />\n </span>\n )}\n </span>\n )}\n </AriaColumn>\n ))}\n </AriaTableHeader>\n <AriaTableBody\n data-slot=\"table-body\"\n items={rows.map((row, index) => ({ key: keys[index], row }))}\n renderEmptyState={\n emptyState != null && emptyState !== false\n ? () => (\n <div data-slot=\"table-empty\" className=\"px-ds-300 py-ds-500 text-center text-body text-ds-text-subtle\">\n {emptyState}\n </div>\n )\n : undefined\n }\n >\n {(item) => (\n <AriaRow\n id={item.key}\n data-slot=\"table-row\"\n className={cn(\n \"group/row outline-hidden\",\n (onRowAction || selectable) && \"cursor-pointer\",\n \"data-[hovered]:bg-ds-surface-hovered data-[selected]:bg-ds-background-selected\",\n \"data-[focus-visible]:inset-ring-2 data-[focus-visible]:inset-ring-ds-border-focused\",\n )}\n >\n {selectable && (\n <AriaCell data-slot=\"table-cell\" className={cn(height, \"relative border-b border-ds-border ps-ds-200 align-middle\", lastRow, cellBox)}>\n <SelectedMarker />\n <SelectionCheckbox />\n </AriaCell>\n )}\n {columns.map((column, index) => {\n const raw = column.render ? column.render(item.row) : (item.row as Record<string, unknown>)[column.key];\n // Text and numbers are isolated, so a phone or a price keeps its order in RTL (\"+1 555 0100\").\n const value = typeof raw === \"string\" || typeof raw === \"number\" ? <bdi>{raw}</bdi> : raw;\n return (\n <AriaCell\n key={column.key}\n data-slot=\"table-cell\"\n data-align={column.align ?? \"start\"}\n data-hide-below={hideBelow(column)}\n className={cn(\n height,\n \"group/cell relative border-b border-ds-border px-ds-200 align-middle outline-hidden\",\n lastRow,\n \"data-[focus-visible]:inset-ring-2 data-[focus-visible]:inset-ring-ds-border-focused\",\n column.align === \"end\" ? \"whitespace-nowrap text-end tabular-nums\" : \"text-start\",\n cellBox,\n virtual && column.align === \"end\" && \"justify-end\",\n hiddenClass(column),\n )}\n >\n {!selectable && index === 0 && <SelectedMarker />}\n {column.wrap ? (\n <>\n <span data-slot=\"table-cell-wrap\" title={typeof raw === \"string\" ? raw : undefined} className=\"line-clamp-2 py-ds-050\">\n {value as React.ReactNode}\n </span>\n {/* The full text floats over the cell on hover and keyboard focus, so the row never changes\n height; screen readers already read it in full from the clamped text. */}\n <span\n aria-hidden\n inert\n data-slot=\"table-cell-full\"\n className=\"absolute inset-x-0 top-0 z-[2] hidden min-h-full rounded-ds-medium bg-ds-surface-overlay px-ds-200 py-ds-150 text-ds-text shadow-ds-overlay group-hover/cell:block group-data-[focus-visible]/cell:block group-data-[focus-visible]/row:block\"\n >\n {value as React.ReactNode}\n </span>\n </>\n ) : (\n (value as React.ReactNode)\n )}\n </AriaCell>\n );\n })}\n </AriaRow>\n )}\n </AriaTableBody>\n </AriaTable>\n );\n const rowHeight = density === \"compact\" ? 36 : 48;\n return (\n <div\n data-slot=\"table\"\n data-density={density}\n data-scrolled={scrolled || undefined}\n data-virtual={virtual ? \"\" : undefined}\n onScroll={maxHeight && !virtual ? (event) => setScrolled(event.currentTarget.scrollTop > 0) : undefined}\n style={maxHeight && !virtual ? { maxHeight } : undefined}\n className={cn(virtual ? \"overflow-hidden\" : \"overflow-auto\", \"rounded-ds-large bg-ds-surface-raised shadow-ds-raised\", maxHeight && \"overscroll-contain\")}\n >\n {virtual ? (\n <Virtualizer layout={TableLayout} layoutOptions={{ rowHeight, headingHeight: 36 }}>\n {table}\n </Virtualizer>\n ) : (\n table\n )}\n </div>\n );\n}\n\n/** The 2px `ds-border-selected` marker on the row's leading edge, shown while the row is selected. */\nfunction SelectedMarker() {\n return (\n <span\n aria-hidden\n data-slot=\"table-row-marker\"\n className=\"absolute inset-y-0 start-0 hidden w-0.5 bg-ds-border-selected group-data-[selected]/row:block\"\n />\n );\n}\n\n"]}
1
+ {"version":3,"file":"table.js","sourceRoot":"","sources":["../../src/collection/table.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,IAAI,IAAI,QAAQ,EAChB,MAAM,IAAI,UAAU,EACpB,GAAG,IAAI,OAAO,EACd,KAAK,IAAI,SAAS,EAClB,SAAS,IAAI,aAAa,EAC1B,WAAW,IAAI,eAAe,EAC9B,WAAW,EACX,SAAS,EACT,WAAW,GAIZ,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAyDzD,MAAM,SAAS,GA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AAE,SAAS,EAAE,aAAa,EAAE,EAAE,EAAE,YAC9E,KAAK,GACM,CACf,CAAC,CAAC,CAAC,CACF,KAAK,CACN,GACG,CACP,CAAC;AACJ,CAAC;AAED,sGAAsG;AACtG,SAAS,cAAc;IACrB,OAAO,CACL,iDAEY,kBAAkB,EAC5B,SAAS,EAAC,+FAA+F,GACzG,CACH,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport type { Density } from \"../density\";\nimport * as React from \"react\";\nimport {\n Cell as AriaCell,\n Column as AriaColumn,\n Row as AriaRow,\n Table as AriaTable,\n TableBody as AriaTableBody,\n TableHeader as AriaTableHeader,\n TableLayout,\n useLocale,\n Virtualizer,\n type Key,\n type Selection,\n type SortDescriptor,\n} from \"react-aria-components\";\n\nimport { cn } from \"../utils\";\nimport { IconGlyph } from \"../display/icon\";\nimport { selectionLabel } from \"../i18n\";\nimport { SelectionCheckbox } from \"./selection-checkbox\";\n\nexport type TableColumn<T> = {\n key: string;\n /** The column's name, a noun (\"Total\"). */\n header: string;\n /** `end` for numbers and money: right-aligned (start in RTL) in tabular figures. */\n align?: \"start\" | \"end\";\n isSortable?: boolean;\n /** A CSS width (\"120px\", \"20%\"). Set one to truncate long values in this column. */\n width?: string;\n /** The cell's content; the row's value under `key` by default. */\n render?: (row: T) => React.ReactNode;\n /** Long text: clamp to two lines with an ellipsis, the full text on hover and keyboard focus. */\n wrap?: boolean;\n /** The row header: the value that names the row (an order number); the first column by default. */\n isRowHeader?: boolean;\n /**\n * Hides the column, header and cells, on viewports narrower than this breakpoint (Tailwind's `sm` 640px,\n * `md` 768px, `lg` 1024px, `xl` 1280px): for secondary columns that crowd a narrow screen. The column\n * leaves the table there, so neither the arrow keys nor screen readers reach it. Ignored on the row\n * header column, which names each row (a development warning says so). Sorting by the other columns is\n * unaffected.\n */\n hideBelow?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n};\n\nexport type TableProps<T> = {\n /** Names the table (\"Orders\"). */\n \"aria-label\": string;\n columns: readonly TableColumn<T>[];\n rows: readonly T[];\n /**\n * The row's stable id; `row.id` by default. Ids must be unique within the table. When the data has no\n * single unique field, build one from the fields that are (`${row.date}:${row.channel}`), or add the row's\n * index as a last resort. A repeated id still renders every row: the first keeps its id and the later ones\n * are keyed `a#2`, `a#3`, … in row order, and selection and `onRowAction` receive those suffixed keys; a\n * development warning names the repeated ids. A suffixed key follows the row's position, not\n * the row: after a sort or filter, a selection made through it can move to another copy of the id.\n */\n rowKey?: (row: T) => Key;\n selectionMode?: \"none\" | \"single\" | \"multiple\";\n selectedKeys?: \"all\" | Iterable<Key>;\n defaultSelectedKeys?: \"all\" | Iterable<Key>;\n onSelectionChange?: (keys: Selection) => void;\n sortDescriptor?: SortDescriptor;\n onSortChange?: (descriptor: SortDescriptor) => void;\n /** `compact` (36px rows) for dense working screens; `default` (48px) for public and content pages. */\n density?: Density;\n /** Shown when there are no rows: an `EmptyState`, or one sentence on why it is empty and the action that fills it. */\n emptyState?: React.ReactNode;\n /** Opens the record: the whole row is the target. */\n onRowAction?: (key: Key) => void;\n /** A height for the scroll area: the header stays put and gets a shadow once rows scroll under it. */\n maxHeight?: string;\n};\n\nconst SORT_ICON = { ascending: \"arrow-up\", descending: \"arrow-down\" } as const;\n\n/**\n * `hideBelow` as CSS: `display: none` under the breakpoint (written out in full for Tailwind to find). Only\n * for the first paint of a server-rendered table, which has no viewport and renders every column; the\n * client then drops the column itself.\n */\nconst HIDE_BELOW = { sm: \"max-sm:hidden\", md: \"max-md:hidden\", lg: \"max-lg:hidden\", xl: \"max-xl:hidden\" } as const;\n/** The same breakpoints as media queries: the client leaves a hidden column out of the table's collection. */\nconst WIDE_ENOUGH = { sm: \"(width >= 40rem)\", md: \"(width >= 48rem)\", lg: \"(width >= 64rem)\", xl: \"(width >= 80rem)\" } as const;\ntype Breakpoint = keyof typeof HIDE_BELOW;\n\n/**\n * The breakpoints the viewport is at or above, as a stable string (\"sm md\"); every one where there is no\n * `matchMedia` (SSR, tests). The server snapshot is every breakpoint, so hydration renders every column,\n * exactly as the server did (no mismatch), with the CSS above hiding the narrow-screen ones; React then\n * re-renders at once with the real viewport and the hidden columns leave the collection. A client-only\n * render reads the viewport on its first render.\n */\nfunction useWideEnough(enabled: boolean) {\n // One MediaQueryList per breakpoint for the table's life, read by every snapshot and subscription.\n const lists = React.useMemo(\n () =>\n enabled && typeof window !== \"undefined\" && window.matchMedia\n ? (Object.keys(WIDE_ENOUGH) as Breakpoint[]).map((key) => [key, window.matchMedia(WIDE_ENOUGH[key])] as const)\n : null,\n [enabled],\n );\n const subscribe = React.useCallback(\n (onChange: () => void) => {\n lists?.forEach(([, list]) => list.addEventListener(\"change\", onChange));\n return () => lists?.forEach(([, list]) => list.removeEventListener(\"change\", onChange));\n },\n [lists],\n );\n const all = Object.keys(WIDE_ENOUGH).join(\" \");\n const snapshot = () => (lists ? lists.filter(([, list]) => list.matches).map(([key]) => key).join(\" \") : all);\n return React.useSyncExternalStore(subscribe, snapshot, () => all);\n}\n\n/**\n * The rows' keys, unique. React Aria keys a collection by id: a repeated id dropped rows (the\n * walk over the rows follows keys, and the last row with that id ends it early) and, on an update, could loop\n * forever. So the first row with an id keeps it and each later one gets `id#2`, `id#3`, … in row order,\n * skipping any suffix another row already uses as its real id. Ids are compared as strings, as React keys\n * are. Unique ids come back as they are, in the same array order. `repeated` lists each repeated id once.\n * A suffix follows the row's position, not the row: after a sort, filter or page change another copy of the\n * id can hold `id#2`. Each id resumes its own suffix count, so many copies of one id stay linear.\n */\nexport function uniqueRowKeys(keys: readonly Key[]): { keys: Key[]; repeated: Key[] } {\n const taken = new Set(keys.map(String));\n if (taken.size === keys.length) return { keys: [...keys], repeated: [] };\n // Each id as its first row gives it, by its string form.\n const first = new Map<string, Key>();\n const repeated = new Map<string, Key>();\n // The next suffix to try per id, so the k-th copy does not re-probe the k-1 suffixes before it.\n const next = new Map<string, number>();\n const unique = keys.map((key) => {\n const name = String(key);\n if (!first.has(name)) {\n first.set(name, key);\n return key;\n }\n repeated.set(name, first.get(name)!);\n let count = next.get(name) ?? 2;\n while (taken.has(`${name}#${count}`)) count++;\n next.set(name, count + 1);\n const suffixed = `${name}#${count}`;\n taken.add(suffixed);\n return suffixed;\n });\n return { keys: unique, repeated: [...repeated.values()] };\n}\n\n/** A row without an id: no `id` field (`undefined`) or `id: null`. */\nconst isMissing = (key: Key | null | undefined) => key == null;\n\n/** A repeated id as the warning shows it: JSON for real ids. */\nconst describeKey = (key: Key) => JSON.stringify(key);\n\n/**\n * Repeated row ids, said once per table and set of ids, in development only. `component` names the caller\n * (\"Table\", \"DataTable\"). Rows without an id (no `id` field, or `id: null`, and no `rowKey`) all repeat\n * `undefined` or `null`; the warning says so in those words instead of listing it as an id.\n */\nfunction useRepeatedKeyWarning(component: string, label: string, repeated: readonly Key[]) {\n const signature = repeated.length ? repeated.map((key) => (isMissing(key) ? String(key) : describeKey(key))).join(\", \") : \"\";\n const warned = React.useRef<Set<string> | null>(null);\n React.useEffect(() => {\n if (process.env.NODE_ENV === \"production\" || !signature) return;\n warned.current ??= new Set();\n if (warned.current.has(signature)) return;\n warned.current.add(signature);\n const missing = repeated.some(isMissing);\n const ids = repeated.filter((key) => !isMissing(key));\n const shown = ids.length > 10 ? `${ids.slice(0, 10).map(describeKey).join(\", \")} and ${ids.length - 10} more` : ids.map(describeKey).join(\", \");\n const problems = [missing && \"rows have no id; pass rowKey\", ids.length > 0 && `the row ids ${shown} repeat`].filter(Boolean).join(\", and \");\n // Only rows without ids: there is no id to show a suffix of, so the tail says how they are keyed instead,\n // in the keys' literal form: the first `undefined` (or `null`) itself, the later ones the strings\n // \"undefined#2\", \"undefined#3\", … by position.\n const positional = repeated\n .filter(isMissing)\n .map((key) => `${String(key)}, \"${String(key)}#2\", \"${String(key)}#3\", …`)\n .join(\" and \");\n const keyed = ids.length > 0\n ? 'the later rows with a repeated id are keyed \"<id>#2\", \"<id>#3\", … in row order'\n : `each row is keyed by its position: ${positional}`;\n console.warn(\n `${component} \"${label}\": ${problems}. Every row still renders: ${keyed}, and selection and onRowAction receive those keys. Give every row a unique id (rowKey).`,\n );\n // `repeated` is read through `signature`.\n }, [signature, label, component]);\n}\n\n/**\n * Records the user scans, compares, sorts and acts on: orders, customers, invoices. On\n * `ds-surface-raised` with a raised shadow; a sunken header row; 48px rows (36px compact) divided by\n * `ds-border`; selection by checkbox with a 2px marker on the leading edge; the row opens the record.\n * Status is a Badge, money right-aligned and formatted by the locale (\"$1,248.00\"). Under 640px use a List.\n *\n * Pressing a row opens the record while nothing is selected; once rows are ticked a press toggles\n * selection, and a record link in the row-header cell always opens, so a link is never trapped behind selection.\n */\nexport function Table<T extends object>(props: TableProps<T>) {\n return <TableView {...props} />;\n}\n\n/**\n * @internal The Table itself, with one option the public Table does not offer: `virtual` renders only\n * the rows in view (React Aria's Virtualizer). DataTable uses it for long client lists; the table becomes\n * its own scroll area at `height` px, rows and header keep their DS heights and look.\n */\nexport function TableView<T extends object>({\n \"aria-label\": label,\n columns: allColumns,\n rows,\n rowKey = (row) => (row as { id: Key }).id,\n selectionMode = \"none\",\n selectedKeys,\n defaultSelectedKeys,\n onSelectionChange,\n sortDescriptor,\n onSortChange,\n density = \"comfortable\",\n emptyState,\n onRowAction,\n maxHeight,\n virtual,\n component = \"Table\",\n}: TableProps<T> & {\n virtual?: { height: number };\n /** The component the warnings name: DataTable passes its own. */\n component?: \"Table\" | \"DataTable\";\n}) {\n const { locale } = useLocale();\n const [scrolled, setScrolled] = React.useState(false);\n const selectable = selectionMode !== \"none\";\n const multiple = selectionMode === \"multiple\";\n const rowHeaderKey = (allColumns.find((column) => column.isRowHeader) ?? allColumns[0])?.key;\n // The row header always shows. A column hidden at this viewport is dropped from the collection, so React\n // Aria's keyboard navigation never lands on it (a `display: none` cell would still be in the grid).\n const hideBelow = (column: TableColumn<T>) => (column.key === rowHeaderKey ? undefined : column.hideBelow);\n const ignoredHideBelow = allColumns.find((column) => column.key === rowHeaderKey)?.hideBelow;\n React.useEffect(() => {\n if (process.env.NODE_ENV !== \"production\" && ignoredHideBelow) {\n console.warn(`Table: hideBelow=\"${ignoredHideBelow}\" is ignored on the row header column \"${String(rowHeaderKey)}\", which names each row.`);\n }\n }, [ignoredHideBelow, rowHeaderKey]);\n const wide = useWideEnough(allColumns.some((column) => hideBelow(column)));\n const columns = allColumns.filter((column) => {\n const breakpoint = hideBelow(column);\n return !breakpoint || wide.split(\" \").includes(breakpoint);\n });\n // A resize that drops the focused cell's column: React Aria's grid state (useGridState) sees the focused\n // key leave the collection and moves focus to the cell now at that index in the same row (the next one\n // toward the end), or to the row itself when the dropped column was the row's end-most; focus never falls\n // to the page (checked in Chromium, LTR and RTL).\n const hiddenClass = (column: TableColumn<T>) => {\n const breakpoint = hideBelow(column);\n return !virtual && breakpoint ? HIDE_BELOW[breakpoint] : undefined;\n };\n const rowHeader = Math.max(0, columns.findIndex((column) => column.isRowHeader));\n const height = density === \"compact\" ? \"h-ds-row-compact\" : \"h-ds-row\";\n // Virtualized, cells are boxes the layout places; they centre their content themselves. Each row sits alone\n // in its own wrapper (so \"last row\" matches every row) and the header row has no box of its own: the\n // header cells carry the sunken fill and the scroll shadow, and every row keeps its divider.\n const cellBox = virtual ? \"flex items-center\" : \"\";\n const headerCell = virtual ? \"bg-ds-surface-sunken in-data-[scrolled]:shadow-ds-overflow\" : \"\";\n const lastRow = virtual ? \"\" : \"group-last/row:border-b-0\";\n // Every render, not memoized: a rows array changed in place (a row grown, removed or\n // replaced, same reference, same length) must not keep a stale key. It is O(n); unique ids take the fast path\n // (one Set) and come back unchanged.\n const { keys, repeated } = uniqueRowKeys(rows.map(rowKey));\n useRepeatedKeyWarning(component, label, repeated);\n const table = (\n <AriaTable\n aria-label={label}\n selectionMode={selectionMode}\n selectionBehavior=\"toggle\"\n selectedKeys={selectedKeys}\n defaultSelectedKeys={defaultSelectedKeys}\n onSelectionChange={onSelectionChange}\n sortDescriptor={sortDescriptor}\n onSortChange={onSortChange}\n onRowAction={onRowAction}\n onScroll={virtual ? (event: React.UIEvent<HTMLElement>) => setScrolled(event.currentTarget.scrollTop > 0) : undefined}\n style={virtual ? { height: virtual.height, overflow: \"auto\" } : undefined}\n className={cn(\"w-full border-separate border-spacing-0 text-body text-ds-text outline-hidden\", virtual && \"block overscroll-contain\")}\n >\n <AriaTableHeader\n data-slot=\"table-header\"\n className={cn(\n \"sticky top-0 z-[3] bg-ds-surface-sunken transition-shadow duration-(--ds-duration-fast) motion-reduce:transition-none\",\n \"in-data-[scrolled]:shadow-ds-overflow\",\n )}\n >\n {selectable && (\n <AriaColumn data-slot=\"table-selection-column\" className={cn(\"w-10 border-b border-ds-border ps-ds-200 text-start\", cellBox, headerCell)}>\n {/* Select all only where several can be selected; single selection names the column for screen readers. */}\n {multiple ? <SelectionCheckbox /> : <span className=\"sr-only\">{selectionLabel(locale)}</span>}\n </AriaColumn>\n )}\n {columns.map((column, index) => (\n <AriaColumn\n key={column.key}\n id={column.key}\n isRowHeader={index === rowHeader}\n allowsSorting={column.isSortable}\n data-slot=\"table-column\"\n data-align={column.align ?? \"start\"}\n data-hide-below={hideBelow(column)}\n style={column.width ? { width: column.width } : undefined}\n className={cn(\n \"h-9 whitespace-nowrap border-b border-ds-border px-ds-200 align-middle text-body-small font-medium text-ds-text-subtle outline-hidden\",\n \"data-[focus-visible]:inset-ring-2 data-[focus-visible]:inset-ring-ds-border-focused\",\n column.align === \"end\" ? \"text-end\" : \"text-start\",\n column.isSortable && \"cursor-pointer data-[hovered]:text-ds-text\",\n cellBox,\n headerCell,\n virtual && column.align === \"end\" && \"justify-end\",\n hiddenClass(column),\n )}\n >\n {({ allowsSorting, sortDirection }) => (\n <span className={cn(\"inline-flex items-center gap-ds-050\", column.align === \"end\" && \"flex-row-reverse\")}>\n {column.header}\n {allowsSorting && (\n <span data-slot=\"table-sort-icon\" data-direction={sortDirection ?? \"none\"} className={cn(\"inline-flex\", sortDirection ? \"text-ds-text\" : \"text-ds-text-subtlest\")}>\n <IconGlyph name={sortDirection ? SORT_ICON[sortDirection] : \"chevrons-up-down\"} size=\"small\" />\n </span>\n )}\n </span>\n )}\n </AriaColumn>\n ))}\n </AriaTableHeader>\n <AriaTableBody\n data-slot=\"table-body\"\n items={rows.map((row, index) => ({ key: keys[index], row }))}\n renderEmptyState={\n emptyState != null && emptyState !== false\n ? () => (\n <div data-slot=\"table-empty\" className=\"px-ds-300 py-ds-500 text-center text-body text-ds-text-subtle\">\n {emptyState}\n </div>\n )\n : undefined\n }\n >\n {(item) => (\n <AriaRow\n id={item.key}\n data-slot=\"table-row\"\n className={cn(\n \"group/row outline-hidden\",\n (onRowAction || selectable) && \"cursor-pointer\",\n \"data-[hovered]:bg-ds-surface-hovered data-[selected]:bg-ds-background-selected\",\n \"data-[focus-visible]:inset-ring-2 data-[focus-visible]:inset-ring-ds-border-focused\",\n )}\n >\n {selectable && (\n <AriaCell data-slot=\"table-cell\" className={cn(height, \"relative border-b border-ds-border ps-ds-200 align-middle\", lastRow, cellBox)}>\n <SelectedMarker />\n <SelectionCheckbox />\n </AriaCell>\n )}\n {columns.map((column, index) => {\n const raw = column.render ? column.render(item.row) : (item.row as Record<string, unknown>)[column.key];\n // Text and numbers are isolated, so a phone or a price keeps its order in RTL (\"+1 555 0100\").\n const value = typeof raw === \"string\" || typeof raw === \"number\" ? <bdi>{raw}</bdi> : raw;\n return (\n <AriaCell\n key={column.key}\n data-slot=\"table-cell\"\n data-align={column.align ?? \"start\"}\n data-hide-below={hideBelow(column)}\n className={cn(\n height,\n \"group/cell relative border-b border-ds-border px-ds-200 align-middle outline-hidden\",\n lastRow,\n \"data-[focus-visible]:inset-ring-2 data-[focus-visible]:inset-ring-ds-border-focused\",\n // One line per cell, as shadcn's tables: on a phone the table scrolls sideways instead of breaking\n // \"SO-1081\" or a name over two lines. `wrap` columns clamp to two lines; `width` columns truncate.\n column.align === \"end\" ? \"whitespace-nowrap text-end tabular-nums\" : cn(\"text-start\", !column.wrap && !column.width && \"whitespace-nowrap\"),\n cellBox,\n virtual && column.align === \"end\" && \"justify-end\",\n hiddenClass(column),\n )}\n >\n {!selectable && index === 0 && <SelectedMarker />}\n {column.wrap ? (\n <>\n <span data-slot=\"table-cell-wrap\" title={typeof raw === \"string\" ? raw : undefined} className=\"line-clamp-2 py-ds-050\">\n {value as React.ReactNode}\n </span>\n {/* The full text floats over the cell on hover and keyboard focus, so the row never changes\n height; screen readers already read it in full from the clamped text. */}\n <span\n aria-hidden\n inert\n data-slot=\"table-cell-full\"\n className=\"absolute inset-x-0 top-0 z-[2] hidden min-h-full rounded-ds-medium bg-ds-surface-overlay px-ds-200 py-ds-150 text-ds-text shadow-ds-overlay group-hover/cell:block group-data-[focus-visible]/cell:block group-data-[focus-visible]/row:block\"\n >\n {value as React.ReactNode}\n </span>\n </>\n ) : (\n (value as React.ReactNode)\n )}\n </AriaCell>\n );\n })}\n </AriaRow>\n )}\n </AriaTableBody>\n </AriaTable>\n );\n const rowHeight = density === \"compact\" ? 36 : 48;\n return (\n <div\n data-slot=\"table\"\n data-density={density}\n data-scrolled={scrolled || undefined}\n data-virtual={virtual ? \"\" : undefined}\n onScroll={maxHeight && !virtual ? (event) => setScrolled(event.currentTarget.scrollTop > 0) : undefined}\n style={maxHeight && !virtual ? { maxHeight } : undefined}\n className={cn(virtual ? \"overflow-hidden\" : \"overflow-auto\", \"rounded-ds-large bg-ds-surface-raised shadow-ds-raised\", maxHeight && \"overscroll-contain\")}\n >\n {virtual ? (\n <Virtualizer layout={TableLayout} layoutOptions={{ rowHeight, headingHeight: 36 }}>\n {table}\n </Virtualizer>\n ) : (\n table\n )}\n </div>\n );\n}\n\n/** The 2px `ds-border-selected` marker on the row's leading edge, shown while the row is selected. */\nfunction SelectedMarker() {\n return (\n <span\n aria-hidden\n data-slot=\"table-row-marker\"\n className=\"absolute inset-y-0 start-0 hidden w-0.5 bg-ds-border-selected group-data-[selected]/row:block\"\n />\n );\n}\n\n"]}
@@ -4,7 +4,7 @@ import * as React from "react";
4
4
  import { MotionScope } from "../defaults.js";
5
5
  import { Button as AriaButton, Disclosure as AriaDisclosure, DisclosureGroup, DisclosurePanel, Heading, } from "react-aria-components";
6
6
  import { IconGlyph } from "../display/icon.js";
7
- const TRIGGER = "group flex min-h-12 w-full cursor-default items-center justify-between gap-ds-150 rounded-ds-small text-start text-body font-medium text-ds-text outline-hidden " +
7
+ const TRIGGER = "group flex min-h-12 w-full cursor-pointer data-[disabled]:cursor-not-allowed items-center justify-between gap-ds-150 rounded-ds-small text-start text-body font-medium text-ds-text outline-hidden " +
8
8
  "data-[focus-visible]:inset-ring-2 data-[focus-visible]:inset-ring-ds-border-focused";
9
9
  /**
10
10
  * Shows and hides one section. The trigger is a button inside a heading, so the page outline keeps the
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../src/navigation/accordion.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAmB,MAAM,aAAa,CAAC;AAC3D,OAAO,EACL,MAAM,IAAI,UAAU,EACpB,UAAU,IAAI,cAAc,EAC5B,eAAe,EACf,eAAe,EACf,OAAO,GAER,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAe5C,MAAM,OAAO,GACX,kKAAkK;IAClK,qFAAqF,CAAC;AAExF;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,EAAgC;IAC3E,OAAO,CACL,KAAC,WAAW,IAAC,MAAM,EAAE,MAAM,YACzB,KAAC,cAAc,OAAK,KAAK,GAAI,GACjB,CACf,CAAC;AACJ,CAAC;AAED,6EAA6E;AAC7E,MAAM,mBAAmB,GAAG,KAAK,CAAC,aAAa,CAAkC,SAAS,CAAC,CAAC;AAE5F,SAAS,cAAc,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,YAAY,EA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,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,YACzD,IAAI,CAAC,OAAO,IADM,IAAI,CAAC,EAAE,CAEX,CAClB,CAAC;gBACJ,CAAC,CAAC,QAAQ,GACiB,GACf,CACnB,CAAC;AACJ,CAAC;AAED,0GAA0G;AAC1G,MAAM,UAAU,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,EAA+B;IACzE,OAAO,CACL,KAAC,WAAW,IAAC,MAAM,EAAE,MAAM,YACzB,KAAC,aAAa,OAAM,KAAwB,GAAI,GACpC,CACf,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nimport { MotionScope, type WithMotion } from \"../defaults\";\nimport {\n Button as AriaButton,\n Disclosure as AriaDisclosure,\n DisclosureGroup,\n DisclosurePanel,\n Heading,\n type Key,\n} from \"react-aria-components\";\n\nimport { IconGlyph } from \"../display/icon\";\n\nexport type DisclosureProps = {\n /** A full question or a clear section name (\"When is my deposit refunded?\"). */\n title: React.ReactNode;\n children: React.ReactNode;\n isExpanded?: boolean;\n defaultExpanded?: boolean;\n onExpandedChange?: (isExpanded: boolean) => void;\n /** The heading level of the title in the page outline; the Accordion's, or 3 by default. */\n headingLevel?: 2 | 3 | 4 | 5 | 6;\n /** Inside an Accordion: its key. */\n id?: Key;\n};\n\nconst TRIGGER =\n \"group flex min-h-12 w-full cursor-default items-center justify-between gap-ds-150 rounded-ds-small text-start text-body font-medium text-ds-text outline-hidden \" +\n \"data-[focus-visible]:inset-ring-2 data-[focus-visible]:inset-ring-ds-border-focused\";\n\n/**\n * Shows and hides one section. The trigger is a button inside a heading, so the page outline keeps the\n * title; its chevron turns as it opens. Never hide a required field or an error in a closed panel: open\n * it when it holds one.\n */\nexport function Disclosure({ motion, ...props }: DisclosureProps & WithMotion) {\n return (\n <MotionScope motion={motion}>\n <DisclosureBody {...props} />\n </MotionScope>\n );\n}\n\n/** The Accordion's heading level, for the Disclosures composed inside it. */\nconst HeadingLevelContext = React.createContext<DisclosureProps[\"headingLevel\"]>(undefined);\n\nfunction DisclosureBody({ title, children, isExpanded, defaultExpanded, onExpandedChange, headingLevel: own, id }: DisclosureProps) {\n const headingLevel = own ?? React.useContext(HeadingLevelContext) ?? 3;\n return (\n <AriaDisclosure\n id={id}\n isExpanded={isExpanded}\n defaultExpanded={defaultExpanded}\n onExpandedChange={onExpandedChange}\n data-slot=\"disclosure\"\n className=\"border-b border-ds-border\"\n >\n <Heading level={headingLevel} className=\"m-0\">\n <AriaButton slot=\"trigger\" data-slot=\"disclosure-trigger\" className={TRIGGER}>\n <span className=\"min-w-0 flex-1\">{title}</span>\n <IconGlyph\n name=\"chevron-down\"\n data-slot=\"disclosure-chevron\"\n className=\"text-ds-icon-subtle transition-transform duration-(--ds-duration-fast) ease-ds-standard group-aria-expanded:rotate-180 motion-reduce:transition-none\"\n />\n </AriaButton>\n </Heading>\n <DisclosurePanel data-slot=\"disclosure-panel\" className=\"text-body text-ds-text-subtle\">\n <div className=\"pb-ds-200\">{children}</div>\n </DisclosurePanel>\n </AriaDisclosure>\n );\n}\n\nexport type AccordionItem = { id: Key; title: React.ReactNode; content: React.ReactNode };\n\nexport type AccordionProps = {\n /** FAQ entries, settings groups, long-form sections. Leave it out to compose `Disclosure`s as children instead. */\n items?: readonly AccordionItem[];\n /** With no `items`: `Disclosure`s, each with an `id` (the key `expandedKeys` uses). */\n children?: React.ReactNode;\n expandedKeys?: Iterable<Key>;\n defaultExpandedKeys?: Iterable<Key>;\n onExpandedChange?: (keys: Set<Key>) => void;\n /** Several open at once; by default opening one closes the others. */\n allowsMultipleExpanded?: boolean;\n headingLevel?: 2 | 3 | 4 | 5 | 6;\n};\n\n/** Stacked Disclosures with a 1px rule between them (FAQ, settings groups, long forms). */\nfunction AccordionBody({ items, children, expandedKeys, defaultExpandedKeys, onExpandedChange, allowsMultipleExpanded, headingLevel }: AccordionProps) {\n return (\n <DisclosureGroup\n expandedKeys={expandedKeys}\n defaultExpandedKeys={defaultExpandedKeys}\n onExpandedChange={onExpandedChange}\n allowsMultipleExpanded={allowsMultipleExpanded}\n data-slot=\"accordion\"\n className=\"border-t border-ds-border\"\n >\n <HeadingLevelContext.Provider value={headingLevel}>\n {items\n ? items.map((item) => (\n <DisclosureBody key={item.id} id={item.id} title={item.title}>\n {item.content}\n </DisclosureBody>\n ))\n : children}\n </HeadingLevelContext.Provider>\n </DisclosureGroup>\n );\n}\n\n/** Accordion with its own `motion` (auto, reduce or none); see AccordionBody for the component itself. */\nexport function Accordion({ motion, ...props }: AccordionProps & WithMotion) {\n return (\n <MotionScope motion={motion}>\n <AccordionBody {...(props as AccordionProps)} />\n </MotionScope>\n );\n}\n"]}
1
+ {"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../src/navigation/accordion.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAmB,MAAM,aAAa,CAAC;AAC3D,OAAO,EACL,MAAM,IAAI,UAAU,EACpB,UAAU,IAAI,cAAc,EAC5B,eAAe,EACf,eAAe,EACf,OAAO,GAER,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAe5C,MAAM,OAAO,GACX,qMAAqM;IACrM,qFAAqF,CAAC;AAExF;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,EAAgC;IAC3E,OAAO,CACL,KAAC,WAAW,IAAC,MAAM,EAAE,MAAM,YACzB,KAAC,cAAc,OAAK,KAAK,GAAI,GACjB,CACf,CAAC;AACJ,CAAC;AAED,6EAA6E;AAC7E,MAAM,mBAAmB,GAAG,KAAK,CAAC,aAAa,CAAkC,SAAS,CAAC,CAAC;AAE5F,SAAS,cAAc,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,YAA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EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,YACzD,IAAI,CAAC,OAAO,IADM,IAAI,CAAC,EAAE,CAEX,CAClB,CAAC;gBACJ,CAAC,CAAC,QAAQ,GACiB,GACf,CACnB,CAAC;AACJ,CAAC;AAED,0GAA0G;AAC1G,MAAM,UAAU,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,EAA+B;IACzE,OAAO,CACL,KAAC,WAAW,IAAC,MAAM,EAAE,MAAM,YACzB,KAAC,aAAa,OAAM,KAAwB,GAAI,GACpC,CACf,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nimport { MotionScope, type WithMotion } from \"../defaults\";\nimport {\n Button as AriaButton,\n Disclosure as AriaDisclosure,\n DisclosureGroup,\n DisclosurePanel,\n Heading,\n type Key,\n} from \"react-aria-components\";\n\nimport { IconGlyph } from \"../display/icon\";\n\nexport type DisclosureProps = {\n /** A full question or a clear section name (\"When is my deposit refunded?\"). */\n title: React.ReactNode;\n children: React.ReactNode;\n isExpanded?: boolean;\n defaultExpanded?: boolean;\n onExpandedChange?: (isExpanded: boolean) => void;\n /** The heading level of the title in the page outline; the Accordion's, or 3 by default. */\n headingLevel?: 2 | 3 | 4 | 5 | 6;\n /** Inside an Accordion: its key. */\n id?: Key;\n};\n\nconst TRIGGER =\n \"group flex min-h-12 w-full cursor-pointer data-[disabled]:cursor-not-allowed items-center justify-between gap-ds-150 rounded-ds-small text-start text-body font-medium text-ds-text outline-hidden \" +\n \"data-[focus-visible]:inset-ring-2 data-[focus-visible]:inset-ring-ds-border-focused\";\n\n/**\n * Shows and hides one section. The trigger is a button inside a heading, so the page outline keeps the\n * title; its chevron turns as it opens. Never hide a required field or an error in a closed panel: open\n * it when it holds one.\n */\nexport function Disclosure({ motion, ...props }: DisclosureProps & WithMotion) {\n return (\n <MotionScope motion={motion}>\n <DisclosureBody {...props} />\n </MotionScope>\n );\n}\n\n/** The Accordion's heading level, for the Disclosures composed inside it. */\nconst HeadingLevelContext = React.createContext<DisclosureProps[\"headingLevel\"]>(undefined);\n\nfunction DisclosureBody({ title, children, isExpanded, defaultExpanded, onExpandedChange, headingLevel: own, id }: DisclosureProps) {\n const headingLevel = own ?? React.useContext(HeadingLevelContext) ?? 3;\n return (\n <AriaDisclosure\n id={id}\n isExpanded={isExpanded}\n defaultExpanded={defaultExpanded}\n onExpandedChange={onExpandedChange}\n data-slot=\"disclosure\"\n className=\"border-b border-ds-border\"\n >\n <Heading level={headingLevel} className=\"m-0\">\n <AriaButton slot=\"trigger\" data-slot=\"disclosure-trigger\" className={TRIGGER}>\n <span className=\"min-w-0 flex-1\">{title}</span>\n <IconGlyph\n name=\"chevron-down\"\n data-slot=\"disclosure-chevron\"\n className=\"text-ds-icon-subtle transition-transform duration-(--ds-duration-fast) ease-ds-standard group-aria-expanded:rotate-180 motion-reduce:transition-none\"\n />\n </AriaButton>\n </Heading>\n <DisclosurePanel data-slot=\"disclosure-panel\" className=\"text-body text-ds-text-subtle\">\n <div className=\"pb-ds-200\">{children}</div>\n </DisclosurePanel>\n </AriaDisclosure>\n );\n}\n\nexport type AccordionItem = { id: Key; title: React.ReactNode; content: React.ReactNode };\n\nexport type AccordionProps = {\n /** FAQ entries, settings groups, long-form sections. Leave it out to compose `Disclosure`s as children instead. */\n items?: readonly AccordionItem[];\n /** With no `items`: `Disclosure`s, each with an `id` (the key `expandedKeys` uses). */\n children?: React.ReactNode;\n expandedKeys?: Iterable<Key>;\n defaultExpandedKeys?: Iterable<Key>;\n onExpandedChange?: (keys: Set<Key>) => void;\n /** Several open at once; by default opening one closes the others. */\n allowsMultipleExpanded?: boolean;\n headingLevel?: 2 | 3 | 4 | 5 | 6;\n};\n\n/** Stacked Disclosures with a 1px rule between them (FAQ, settings groups, long forms). */\nfunction AccordionBody({ items, children, expandedKeys, defaultExpandedKeys, onExpandedChange, allowsMultipleExpanded, headingLevel }: AccordionProps) {\n return (\n <DisclosureGroup\n expandedKeys={expandedKeys}\n defaultExpandedKeys={defaultExpandedKeys}\n onExpandedChange={onExpandedChange}\n allowsMultipleExpanded={allowsMultipleExpanded}\n data-slot=\"accordion\"\n className=\"border-t border-ds-border\"\n >\n <HeadingLevelContext.Provider value={headingLevel}>\n {items\n ? items.map((item) => (\n <DisclosureBody key={item.id} id={item.id} title={item.title}>\n {item.content}\n </DisclosureBody>\n ))\n : children}\n </HeadingLevelContext.Provider>\n </DisclosureGroup>\n );\n}\n\n/** Accordion with its own `motion` (auto, reduce or none); see AccordionBody for the component itself. */\nexport function Accordion({ motion, ...props }: AccordionProps & WithMotion) {\n return (\n <MotionScope motion={motion}>\n <AccordionBody {...(props as AccordionProps)} />\n </MotionScope>\n );\n}\n"]}
@@ -8,7 +8,7 @@ import { Button } from "../action/button.js";
8
8
  import { mainNavigationLabel, openMenuLabel } from "../i18n.js";
9
9
  import { LAYER } from "../layers.js";
10
10
  import { NavPanel } from "./nav-panel.js";
11
- const LINK = "inline-flex h-8 items-center gap-ds-075 rounded-ds-control-medium px-ds-100 text-body font-[500] text-ds-text-subtle outline-hidden transition-colors duration-(--ds-duration-fast) motion-reduce:transition-none " +
11
+ const LINK = "inline-flex h-8 items-center gap-ds-075 whitespace-nowrap rounded-ds-control-medium px-ds-100 text-body font-[500] text-ds-text-subtle outline-hidden transition-colors duration-(--ds-duration-fast) motion-reduce:transition-none " +
12
12
  "data-[hovered]:bg-ds-background-neutral-subtle-hovered data-[hovered]:text-ds-text data-[pressed]:bg-ds-background-neutral-pressed " +
13
13
  "data-[focus-visible]:inset-ring-2 data-[focus-visible]:inset-ring-ds-border-focused " +
14
14
  "aria-[current=page]:bg-ds-background-neutral aria-[current=page]:text-ds-text";
@@ -23,7 +23,9 @@ export function Navbar({ brand: brandProp, brandHref = "/", brandLabel, links, c
23
23
  const name = label ?? mainNavigationLabel(locale);
24
24
  const { brand, actions: endActions, items } = splitSlots(children, brandProp, actionsProp);
25
25
  const renderLinks = () => links ? (links.map((link) => (_jsx(NavbarItem, { id: link.id, href: link.href, children: link.label }, link.id)))) : (items);
26
- const brandLink = (_jsx(AriaLink, { href: brandHref, "aria-label": brandLabel, "data-slot": "navbar-brand", className: "flex min-w-0 items-center gap-ds-100 rounded-ds-medium text-body-strong text-ds-text outline-hidden data-[focus-visible]:inset-ring-2 data-[focus-visible]:inset-ring-ds-border-focused", children: _jsx(BrandLinkContext.Provider, { value: true, children: brand }) }));
26
+ const brandLink = (_jsx(AriaLink, { href: brandHref, "aria-label": brandLabel, "data-slot": "navbar-brand",
27
+ // shrink-0: the brand keeps its size and the links give way, so a wide wordmark never runs under the first link.
28
+ className: "flex shrink-0 items-center gap-ds-100 rounded-ds-medium text-body-strong text-ds-text outline-hidden data-[focus-visible]:inset-ring-2 data-[focus-visible]:inset-ring-ds-border-focused", children: _jsx(BrandLinkContext.Provider, { value: true, children: brand }) }));
27
29
  return (_jsxs("header", { "data-slot": "navbar", "data-density": density, className: cn("border-b border-ds-border bg-ds-surface-raised text-ds-text", isSticky && cn("sticky top-0 pt-[env(safe-area-inset-top,0px)]", LAYER.stickyBar)), children: [_jsxs("div", { "data-slot": "navbar-content", style: maxWidth !== undefined ? { maxWidth } : undefined, className: cn("flex items-center gap-ds-300 transition-[height] duration-(--ds-duration-medium) motion-reduce:transition-none", maxWidth !== undefined && "mx-auto w-full",
28
30
  // Safe-area insets are physical edges, so they pair with physical padding.
29
31
  "[padding-left:max(var(--ds-space-200),env(safe-area-inset-left,0px))] [padding-right:max(var(--ds-space-200),env(safe-area-inset-right,0px))]", "md:[padding-left:max(var(--ds-space-300),env(safe-area-inset-left,0px))] md:[padding-right:max(var(--ds-space-300),env(safe-area-inset-right,0px))]", density === "compact" ? "h-12" : "h-14"), children: [brandLink, _jsx("nav", { "aria-label": name, "data-slot": "navbar-links", className: "hidden md:block", children: _jsx("ul", { className: "flex items-center gap-ds-100", children: _jsx(NavbarContext.Provider, { value: { currentKey, inPanel: false }, children: renderLinks() }) }) }), _jsxs("div", { "data-slot": "navbar-end", className: "ms-auto flex items-center gap-ds-100", children: [_jsx("div", { className: "hidden items-center gap-ds-100 md:flex", children: endActions }), _jsx("div", { className: "md:hidden", children: _jsx(Button, { variant: "subtle", iconOnly: true, iconBefore: "menu", "aria-label": openMenuLabel(locale), "aria-expanded": open, onPress: () => setOpen(true), "data-slot": "navbar-menu-button" }) })] })] }), _jsxs(NavPanel, { isOpen: open, onOpenChange: setOpen, label: name, side: "end", slot: "navbar", header: brand, children: [_jsx("nav", { children: _jsx("ul", { className: "flex flex-col gap-ds-025", children: _jsx(NavbarContext.Provider, { value: { currentKey, inPanel: true }, children: renderLinks() }) }) }), endActions && (_jsx("div", { "data-slot": "navbar-panel-actions", className: "flex flex-col items-stretch gap-ds-100 border-t border-ds-border pt-ds-200", children: endActions }))] })] }));