@squadbase/vantage 0.6.2-dev1.1c9e8bc → 0.6.2-dev1.20b05d1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{build-X5NVCQKT.js → build-A23M4GCH.js} +7 -7
- package/dist/{build-X5NVCQKT.js.map → build-A23M4GCH.js.map} +1 -1
- package/dist/{check-ZBIH422T.js → check-FBHT6W6J.js} +5 -5
- package/dist/{check-ZBIH422T.js.map → check-FBHT6W6J.js.map} +1 -1
- package/dist/chunk-2IAPIOPS.js +152 -0
- package/dist/chunk-2IAPIOPS.js.map +1 -0
- package/dist/chunk-57GHR5LN.js +163 -0
- package/dist/chunk-57GHR5LN.js.map +1 -0
- package/dist/{chunk-7DZGJQ3P.js → chunk-5C2SEDPH.js} +21 -4
- package/dist/chunk-5C2SEDPH.js.map +1 -0
- package/dist/chunk-6OTTGAPO.js +44 -0
- package/dist/chunk-6OTTGAPO.js.map +1 -0
- package/dist/{chunk-V3LF7BE7.js → chunk-ANZLVSEP.js} +4 -5
- package/dist/chunk-ANZLVSEP.js.map +1 -0
- package/dist/{chunk-XQUSGIDG.js → chunk-CKWPK4RO.js} +10 -3
- package/dist/chunk-CKWPK4RO.js.map +1 -0
- package/dist/chunk-JXFCSF3K.js +673 -0
- package/dist/chunk-JXFCSF3K.js.map +1 -0
- package/dist/{chunk-IUPSBD6W.js → chunk-QOXXOFGL.js} +23 -886
- package/dist/chunk-QOXXOFGL.js.map +1 -0
- package/dist/{chunk-CEXAQQ5W.js → chunk-S5MDTHH7.js} +180 -18
- package/dist/chunk-S5MDTHH7.js.map +1 -0
- package/dist/{chunk-2ICNHUG6.js → chunk-SDJTTMLK.js} +64 -7
- package/dist/chunk-SDJTTMLK.js.map +1 -0
- package/dist/{chunk-WAMZWZJB.js → chunk-SHZM3EXB.js} +19 -8
- package/dist/chunk-SHZM3EXB.js.map +1 -0
- package/dist/{chunk-JKLLFVEU.js → chunk-UWSQUHX6.js} +4 -99
- package/dist/chunk-UWSQUHX6.js.map +1 -0
- package/dist/cli.js +6 -6
- package/dist/client/index.d.ts +2 -0
- package/dist/client/index.js +8 -2
- package/dist/client/index.js.map +1 -1
- package/dist/components/index.d.ts +11 -247
- package/dist/components/index.js +4 -1
- package/dist/delta-text-CvwBGJ95.d.ts +15 -0
- package/dist/{dev-4XEDTELV.js → dev-H4I2JL63.js} +7 -7
- package/dist/{dev-4XEDTELV.js.map → dev-H4I2JL63.js.map} +1 -1
- package/dist/doc/index.d.ts +215 -2
- package/dist/doc/index.js +307 -3
- package/dist/doc/index.js.map +1 -1
- package/dist/{doctor-5E2VEZPK.js → doctor-B2O3GJDU.js} +5 -5
- package/dist/{doctor-5E2VEZPK.js.map → doctor-B2O3GJDU.js.map} +1 -1
- package/dist/format-U0cQl069.d.ts +243 -0
- package/dist/query/index.js +2 -2
- package/dist/{routes-3SGAFDMC.js → routes-PVKNT777.js} +4 -4
- package/dist/{routes-3SGAFDMC.js.map → routes-PVKNT777.js.map} +1 -1
- package/dist/slide/index.d.ts +272 -1
- package/dist/slide/index.js +972 -2
- package/dist/slide/index.js.map +1 -1
- package/dist/table/index.js +6 -3
- package/dist/table/index.js.map +1 -1
- package/dist/{upgrade-JHXZBGQS.js → upgrade-6DT7ADRP.js} +4 -4
- package/dist/{upgrade-JHXZBGQS.js.map → upgrade-6DT7ADRP.js.map} +1 -1
- package/dist/vite/index.js +3 -3
- package/docs/en/changelog.md +2 -0
- package/docs/en/components.md +13 -2
- package/docs/en/doc/delta-text.md +40 -0
- package/docs/en/doc/doc-action-items.md +49 -0
- package/docs/en/doc/doc-callout.md +38 -0
- package/docs/en/doc/doc-data-table.md +60 -0
- package/docs/en/doc/doc-executive-summary.md +64 -0
- package/docs/en/doc/doc-figure.md +56 -0
- package/docs/en/doc/doc-key-findings.md +61 -0
- package/docs/en/doc/doc-kpi-scorecard.md +80 -0
- package/docs/en/doc/doc-notes-and-sources.md +43 -0
- package/docs/en/doc/doc-report-header.md +46 -0
- package/docs/en/pages-and-metadata.md +15 -0
- package/docs/en/parts/area-chart.md +99 -0
- package/docs/en/parts/bar-chart.md +91 -0
- package/docs/en/parts/bar-list.md +50 -0
- package/docs/en/parts/category-bar.md +37 -0
- package/docs/en/parts/chart-frame.md +39 -0
- package/docs/en/parts/delta.md +4 -3
- package/docs/en/parts/donut-chart.md +72 -0
- package/docs/en/parts/funnel-steps.md +2 -1
- package/docs/en/parts/heatmap.md +53 -0
- package/docs/en/parts/kpi-card.md +2 -1
- package/docs/en/parts/legend.md +35 -0
- package/docs/en/parts/line-chart.md +94 -0
- package/docs/en/parts/progress-circle.md +33 -0
- package/docs/en/parts/sample-data.md +39 -0
- package/docs/en/parts/scatter-chart.md +56 -0
- package/docs/en/parts/tracker.md +36 -0
- package/docs/en/parts/updated-at.md +30 -0
- package/docs/en/parts/waterfall-chart.md +56 -0
- package/docs/en/slide/slide-chart-full.md +48 -0
- package/docs/en/slide/slide-chart-insight.md +52 -0
- package/docs/en/slide/slide-columns.md +46 -0
- package/docs/en/slide/slide-comparison.md +68 -0
- package/docs/en/slide/slide-cover.md +39 -0
- package/docs/en/slide/slide-exec-summary.md +47 -0
- package/docs/en/slide/slide-heading.md +38 -0
- package/docs/en/slide/slide-kpi-grid.md +55 -0
- package/docs/en/slide/slide-kpi-hero.md +58 -0
- package/docs/en/slide/slide-next-actions.md +49 -0
- package/docs/en/slide/slide-scorecard-table.md +54 -0
- package/docs/en/slide/slide-section.md +44 -0
- package/docs/en/slide/slide-source-line.md +34 -0
- package/docs/en/ui/alert-dialog.md +42 -0
- package/docs/en/ui/avatar.md +31 -0
- package/docs/en/ui/combobox.md +74 -0
- package/docs/en/ui/drawer.md +41 -0
- package/docs/en/ui/empty.md +1 -1
- package/docs/en/ui/error-state.md +4 -3
- package/docs/en/ui/field.md +42 -0
- package/docs/en/ui/hover-card.md +21 -0
- package/docs/en/ui/kbd.md +17 -0
- package/docs/en/ui/loading.md +1 -1
- package/docs/en/ui/pagination.md +36 -0
- package/docs/en/ui/radio-group.md +21 -0
- package/docs/en/ui/toast.md +44 -0
- package/docs/en/ui/toggle-group.md +4 -3
- package/docs/index.json +857 -77
- package/docs/ja/changelog.md +2 -0
- package/docs/ja/components.md +12 -1
- package/docs/ja/doc/delta-text.md +40 -0
- package/docs/ja/doc/doc-action-items.md +49 -0
- package/docs/ja/doc/doc-callout.md +38 -0
- package/docs/ja/doc/doc-data-table.md +60 -0
- package/docs/ja/doc/doc-executive-summary.md +64 -0
- package/docs/ja/doc/doc-figure.md +56 -0
- package/docs/ja/doc/doc-key-findings.md +61 -0
- package/docs/ja/doc/doc-kpi-scorecard.md +80 -0
- package/docs/ja/doc/doc-notes-and-sources.md +43 -0
- package/docs/ja/doc/doc-report-header.md +46 -0
- package/docs/ja/page-types/slide.md +1 -0
- package/docs/ja/pages-and-metadata.md +15 -0
- package/docs/ja/parts/area-chart.md +49 -25
- package/docs/ja/parts/bar-chart.md +50 -24
- package/docs/ja/parts/bar-list.md +31 -8
- package/docs/ja/parts/chart-frame.md +36 -0
- package/docs/ja/parts/delta.md +5 -4
- package/docs/ja/parts/donut-chart.md +45 -26
- package/docs/ja/parts/funnel-steps.md +27 -8
- package/docs/ja/parts/heatmap.md +45 -0
- package/docs/ja/parts/kpi-card.md +2 -1
- package/docs/ja/parts/legend.md +36 -0
- package/docs/ja/parts/line-chart.md +48 -22
- package/docs/ja/parts/sample-data.md +61 -0
- package/docs/ja/parts/scatter-chart.md +69 -0
- package/docs/ja/parts/updated-at.md +27 -0
- package/docs/ja/parts/waterfall-chart.md +61 -0
- package/docs/ja/slide/slide-chart-full.md +48 -0
- package/docs/ja/slide/slide-chart-insight.md +52 -0
- package/docs/ja/slide/slide-columns.md +46 -0
- package/docs/ja/slide/slide-comparison.md +68 -0
- package/docs/ja/slide/slide-cover.md +39 -0
- package/docs/ja/slide/slide-exec-summary.md +47 -0
- package/docs/ja/slide/slide-heading.md +38 -0
- package/docs/ja/slide/slide-kpi-grid.md +55 -0
- package/docs/ja/slide/slide-kpi-hero.md +58 -0
- package/docs/ja/slide/slide-next-actions.md +49 -0
- package/docs/ja/slide/slide-scorecard-table.md +54 -0
- package/docs/ja/slide/slide-section.md +44 -0
- package/docs/ja/slide/slide-source-line.md +34 -0
- package/docs/ja/ui/empty.md +1 -1
- package/docs/ja/ui/error-state.md +4 -3
- package/docs/ja/ui/loading.md +1 -1
- package/docs/ja/ui/toggle-group.md +4 -3
- package/package.json +2 -2
- package/registry/ui/delta.tsx +7 -4
- package/registry/ui/echart.tsx +123 -1
- package/registry/ui/kpi-card.tsx +9 -4
- package/skills/vantage-design/SKILL.md +27 -25
- package/skills/vantage-design/references/extract.md +16 -14
- package/skills/vantage-design/references/format.md +6 -5
- package/skills/vantage-design/references/presets.md +60 -110
- package/skills/vantage-pitfalls/SKILL.md +5 -0
- package/skills/vantage-slide/SKILL.md +54 -36
- package/templates/AGENTS.md +4 -2
- package/templates/agents/doc.md +48 -0
- package/templates/agents/page.md +22 -1
- package/templates/agents/slide.md +70 -2
- package/theme.css +10 -7
- package/dist/chunk-2ICNHUG6.js.map +0 -1
- package/dist/chunk-7DZGJQ3P.js.map +0 -1
- package/dist/chunk-CEXAQQ5W.js.map +0 -1
- package/dist/chunk-IUPSBD6W.js.map +0 -1
- package/dist/chunk-JKLLFVEU.js.map +0 -1
- package/dist/chunk-V3LF7BE7.js.map +0 -1
- package/dist/chunk-WAMZWZJB.js.map +0 -1
- package/dist/chunk-XQUSGIDG.js.map +0 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# UpdatedAt
|
|
2
|
+
|
|
3
|
+
> A freshness label such as "23 minutes ago". Shows the absolute time and zone on hover.
|
|
4
|
+
|
|
5
|
+
Renders a `<time>` whose `dateTime` is the ISO instant. The absolute time and zone
|
|
6
|
+
(`2026/10/20 16:41 JST`) appear in both a tooltip and the `title` attribute. The label text is
|
|
7
|
+
Japanese, in the form "23 分前に更新".
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { UpdatedAt } from "@squadbase/vantage/components";
|
|
11
|
+
import type { UpdatedAtProps } from "@squadbase/vantage/components";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
| Prop | Type | Default | Description |
|
|
15
|
+
| --- | --- | --- | --- |
|
|
16
|
+
| `at` | `Date \| string \| number` | | When the data was last updated. **Required.** |
|
|
17
|
+
| `variant` | `"relative" \| "absolute-first"` | `"relative"` | `"relative"` reads "23 分前に更新". `"absolute-first"` reads "16:41 更新(23 分前)", with the date added when it is not today. Use it on pages where "now" matters. |
|
|
18
|
+
| `timeZone` | `string` | | IANA time zone for the absolute time (e.g. `"Asia/Tokyo"`). Defaults to the runtime's zone. |
|
|
19
|
+
| `prefix` | `string` | | Text placed before the label, e.g. `"売上データ: "`. |
|
|
20
|
+
| `now` | `Date \| number` | | A fixed "current time" for tests and fixtures. It also disables the 60-second refresh. |
|
|
21
|
+
| `className` | `string` | | Classes to add. |
|
|
22
|
+
|
|
23
|
+
## Hydration
|
|
24
|
+
|
|
25
|
+
The text depends on the clock and time zone of whoever renders, so the first render (server and
|
|
26
|
+
client) is an empty `<time>` carrying only the ISO `dateTime`. After mount it fills in the label and
|
|
27
|
+
refreshes every 60 seconds; the interval is cleared on unmount. The `<time>` sets
|
|
28
|
+
`suppressHydrationWarning`, so sample data built from `Date.now()` at module load does not warn.
|
|
29
|
+
|
|
30
|
+
Within a minute of `now`, the label reads "たった今" ("just now").
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# WaterfallChart
|
|
2
|
+
|
|
3
|
+
> A typed waterfall chart. Shows how steps move a running total, such as revenue to gross profit.
|
|
4
|
+
|
|
5
|
+
Pass the steps as rows, the name column (`index`) and the amount column (`categories`), and it draws
|
|
6
|
+
a waterfall instead of you writing an ECharts option. Each row moves the running total by its value;
|
|
7
|
+
rows named in `totals` are bars from 0 to the total. Every step also prints its signed amount, so
|
|
8
|
+
colour is never the only carrier of direction. It renders inside
|
|
9
|
+
[`ChartFrame`](parts/chart-frame).
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import { WaterfallChart } from "@squadbase/vantage/components";
|
|
13
|
+
import type { WaterfallChartProps, WaterfallMode } from "@squadbase/vantage/components";
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
| Prop | Type | Default | Description |
|
|
17
|
+
| --- | --- | --- | --- |
|
|
18
|
+
| `data` | `T[]` | | The steps, left to right in row order. **Required.** |
|
|
19
|
+
| `index` | `keyof T` | | The column holding each step's name. **Required.** |
|
|
20
|
+
| `categories` | `NumericKeys<T>[]` | | The amount column as a one-element array. **Required.** Only the first is used. Values are numbers or numeric strings. |
|
|
21
|
+
| `totals` | `string[]` | | The `index` values of rows that are totals (e.g. `["Revenue", "Gross profit"]`). A total with a `null` value takes the running total so far; with a value, that value becomes the total and later steps continue from it. |
|
|
22
|
+
| `polarity` | `"higher-is-better" \| "lower-is-better" \| "neutral"` | `"higher-is-better"` | Whether an increase is good. Increases and decreases use `--positive-fill` / `--negative-fill`; `lower-is-better` swaps them (for churn, say), `neutral` uses one neutral colour. |
|
|
23
|
+
| `mode` | `"total" \| "delta"` | `"total"` | `"total"` draws totals as bars from 0. `"delta"` draws only the moves on a cumulative-change axis from 0, prints the opening and closing values in a note above the plot, and appends a net-change bar. Use it when the moves are small against the total (roughly under 5%). |
|
|
24
|
+
| `labels` | `Record<string, string>` | | Step name → display name, used on the axis, in the tooltip and the data table. Pass the `index` key to rename the table's first column. |
|
|
25
|
+
| `minValue` | `number` | | Lower limit of the value axis. The axis always includes 0, so only values ≤ 0 matter. It widens rather than clips. Pass the same `minValue` / `maxValue` to charts you compare side by side. |
|
|
26
|
+
| `maxValue` | `number` | | Upper limit of the value axis. It widens rather than clips. |
|
|
27
|
+
| `yAxisWidth` | `number` | | Width of the y-axis labels in px. Fix it to align the plot areas of stacked charts. |
|
|
28
|
+
| `showValues` | `boolean` | `true` | Print the signed amount on each bar (totals show the running total). |
|
|
29
|
+
| `showTooltip` | `boolean` | `true` | Show the tooltip (change and running total) on hover. |
|
|
30
|
+
| `format` | `ValueFormat` | `"compact"` | Number format: `"compact"`, `"number"`, `"currency"`, `"percent"`, `{ type, unit, … }`. |
|
|
31
|
+
| `valueFormatter` | `(value: number) => string` | | Escape hatch: a function that wins over `format`. |
|
|
32
|
+
| `title` | `string` | | Heading of the chart. |
|
|
33
|
+
| `summary` | `string \| "auto"` | | A one-sentence summary. `"auto"` builds one from the steps (first and last value, biggest increase and decrease). Omitted means no summary. |
|
|
34
|
+
| `isLoading` | `boolean` | `false` | Show a skeleton with the same height. |
|
|
35
|
+
| `emptyState` | `ChartEmptyState` | | Shown when `data` is empty: `{ title?, description?, action? }`. |
|
|
36
|
+
| `height` | `number` | `288` | Height of the plot area in px. |
|
|
37
|
+
| `chartOptions` | `EChartsOption` | | Escape hatch: deep-merged last into the generated ECharts option. |
|
|
38
|
+
| `actions` | `boolean \| ChartActionsOptions` | `false` | Show PNG save / copy buttons on hover. Title and summary are included in the image; turn that off with `{ includeTitle: false }`. |
|
|
39
|
+
| `fileName` | `string` | `"chart.png"` | File name for the saved PNG. |
|
|
40
|
+
| `ariaLabel` | `string` | | Label read aloud when there is no `title`. |
|
|
41
|
+
| `className` | `string` | | Classes to add (on the outer figure). |
|
|
42
|
+
|
|
43
|
+
## Total or delta
|
|
44
|
+
|
|
45
|
+
When the moves are tiny next to the total, a `total` waterfall flattens them into hairlines on a tall
|
|
46
|
+
axis. Switch to `mode="delta"` so the axis is the change itself.
|
|
47
|
+
|
|
48
|
+
```tsx
|
|
49
|
+
<WaterfallChart
|
|
50
|
+
data={rows}
|
|
51
|
+
index="step"
|
|
52
|
+
categories={["amount"]}
|
|
53
|
+
totals={["Revenue", "Gross profit"]}
|
|
54
|
+
summary="auto"
|
|
55
|
+
/>
|
|
56
|
+
```
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# SlideChartFull
|
|
2
|
+
|
|
3
|
+
> One chart across all 12 columns, with a one-line note under it.
|
|
4
|
+
|
|
5
|
+
A slide that gives one chart the full width — for many categories or a long series. A one-line `note` under the chart can say how to read it or what to watch.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { SlideChartFull } from "@squadbase/vantage/slide";
|
|
9
|
+
import type { SlideChartFullProps } from "@squadbase/vantage/slide";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **the content of one `<Slide>`**. It does not include `<Slide>` itself, so put it directly inside one. The root fills the canvas (1920×1080) at 100% and takes no `className`. Margins, text sizes and the grid are fixed inside the block (a 12-column grid on 1920×1080), so don't add your own dimensions. For how to build a deck, see [Slide](page-types/slide). The labels the block adds (「… 時点」, 「出典: …」) are fixed in Japanese; `title`, `lead`, `points` and the like are your own text.
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| `title` | `string` | The conclusion as one sentence (an action title). **Required.** |
|
|
20
|
+
| `chart` | `SlideChartInsightChart` | `{ type: "line" \| "bar" \| "area"; categories: string[]; series: { name: string; data: number[] }[] }`. **Required.** Same shape and rendering as `SlideChartInsight`. Two or more series show a legend. |
|
|
21
|
+
| `note` | `string` | One line under the chart: how to read it or what to watch. About 60 characters at most. |
|
|
22
|
+
| `asOf` | `string` | The date the numbers were taken, date only (e.g. `"2026-10-01"`). Shown as 「2026-10-01 時点」; don't write 「時点」 yourself. |
|
|
23
|
+
| `source` | `string` | Where the numbers come from (e.g. `"BI"`). Shown as 「出典: BI」. |
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
import { Slide, SlideChartFull } from "@squadbase/vantage/slide";
|
|
29
|
+
|
|
30
|
+
<Slide>
|
|
31
|
+
<SlideChartFull
|
|
32
|
+
title="Revenue hit a record high in September"
|
|
33
|
+
chart={{
|
|
34
|
+
type: "line",
|
|
35
|
+
categories: ["Apr", "May", "Jun", "Jul", "Aug", "Sep"],
|
|
36
|
+
series: [{ name: "Revenue (¥M)", data: [460, 480, 490, 500, 503, 540] }],
|
|
37
|
+
}}
|
|
38
|
+
note="September includes two large deals"
|
|
39
|
+
asOf="2026-10-01"
|
|
40
|
+
source="BI"
|
|
41
|
+
/>
|
|
42
|
+
</Slide>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Notes
|
|
46
|
+
|
|
47
|
+
- The chart is an `EChart` with no animation and no tooltip. The pptx export waits for it (`data-waitfor="canvas"`).
|
|
48
|
+
- To put reading points next to the chart, use `SlideChartInsight` instead.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# SlideChartInsight
|
|
2
|
+
|
|
3
|
+
> One chart and its reading — the most common slide in a report.
|
|
4
|
+
|
|
5
|
+
One chart (8 of 12 columns) and its reading (the other 4, up to 3 points). The chart is `line`, `bar` or `area`, built with canvas-size text, no tooltip and no animation, so it exports to pptx as it looks.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { SlideChartInsight } from "@squadbase/vantage/slide";
|
|
9
|
+
import type { SlideChartInsightProps, SlideChartInsightChart } from "@squadbase/vantage/slide";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **the content of one `<Slide>`**. It does not include `<Slide>` itself, so put it directly inside one. The root fills the canvas (1920×1080) at 100% and takes no `className`. Margins, text sizes and the grid are fixed inside the block (a 12-column grid on 1920×1080), so don't add your own dimensions. For how to build a deck, see [Slide](page-types/slide). The labels the block adds are fixed in Japanese: the `asOf` / `source` line (「… 時点」/「出典: …」) cannot be overridden, while `title`, `insights`, `chart.categories` and `chart.series[].name` are your own text.
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Default | Description |
|
|
18
|
+
| --- | --- | --- | --- |
|
|
19
|
+
| `title` | `string` | | The conclusion as one sentence (an action title). **Required.** |
|
|
20
|
+
| `chart` | `SlideChartInsightChart` | | `{ type: "line" \| "bar" \| "area"; categories: string[]; series: { name: string; data: number[] }[] }`. **Required.** Two or more series show a legend. |
|
|
21
|
+
| `insights` | `string[]` | | Points that read the chart, 2–3. **Required.** |
|
|
22
|
+
| `chartSide` | `"left" \| "right"` | `"left"` | Which side the chart takes. |
|
|
23
|
+
| `asOf` | `string` | | The date the numbers were taken, date only (e.g. `"2026-10-01"`). The block adds 「時点」 once, so don't write it. The label is fixed in Japanese. |
|
|
24
|
+
| `source` | `string` | | Where the numbers come from (e.g. `"社内 BI"`). Shown as 「出典: 社内 BI」; the "出典:" label is fixed in Japanese. |
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
import { Slide, SlideChartInsight } from "@squadbase/vantage/slide";
|
|
30
|
+
|
|
31
|
+
<Slide>
|
|
32
|
+
<SlideChartInsight
|
|
33
|
+
title="解約率は 6 月以降、毎月下がり続けている"
|
|
34
|
+
chart={{
|
|
35
|
+
type: "line",
|
|
36
|
+
categories: ["6 月", "7 月", "8 月", "9 月"],
|
|
37
|
+
series: [{ name: "解約率(%)", data: [2.7, 2.4, 2.1, 1.8] }],
|
|
38
|
+
}}
|
|
39
|
+
insights={[
|
|
40
|
+
"オンボーディング刷新後の 3 か月で 0.9pt 低下",
|
|
41
|
+
"低下は中小企業プランが中心",
|
|
42
|
+
]}
|
|
43
|
+
asOf="2026-10-01"
|
|
44
|
+
source="社内 BI"
|
|
45
|
+
/>
|
|
46
|
+
</Slide>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Notes
|
|
50
|
+
|
|
51
|
+
- More than 3 insights are still drawn but log a `console.warn` — split the slide.
|
|
52
|
+
- Typed charts such as `LineChart` are not used; the block builds the chart with `EChart` directly.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# SlideColumns
|
|
2
|
+
|
|
3
|
+
> [Part] The 12-column layout of a slide's body — SlideColumns and SlideColumn.
|
|
4
|
+
|
|
5
|
+
The 12-column layout of one slide's body. `SlideColumns` lays out `SlideColumn`s, each taking `span` of the 12 columns (8 / 4, 6 / 6, 4 / 4 / 4, …). It is a **part** for the body row of the grid, not a whole-slide block.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { SlideColumns, SlideColumn } from "@squadbase/vantage/slide";
|
|
9
|
+
import type { SlideColumnsProps, SlideColumnProps } from "@squadbase/vantage/slide";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **a slide part**, not a whole-slide block. Place it as a row in the 12-column grid inside a `<Slide>`; its root does not fill the canvas (100%×100%). All dimensions are fixed inside the part, so do not add your own. For how to build a deck, see [Slide](page-types/slide).
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
### SlideColumns
|
|
18
|
+
|
|
19
|
+
| Prop | Type | Default | Description |
|
|
20
|
+
| --- | --- | --- | --- |
|
|
21
|
+
| `children` | `ReactNode` | | The `SlideColumn`s. **Required.** |
|
|
22
|
+
| `align` | `"start" \| "center" \| "stretch"` | `"stretch"` | Vertical alignment of the columns in the row. |
|
|
23
|
+
|
|
24
|
+
### SlideColumn
|
|
25
|
+
|
|
26
|
+
| Prop | Type | Description |
|
|
27
|
+
| --- | --- | --- |
|
|
28
|
+
| `span` | `number` | How many of the 12 columns it takes (1–12). **Required.** |
|
|
29
|
+
| `children` | `ReactNode` | The column's content. **Required.** |
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
import { SlideColumns, SlideColumn } from "@squadbase/vantage/slide";
|
|
35
|
+
|
|
36
|
+
<SlideColumns align="center">
|
|
37
|
+
<SlideColumn span={8}>{/* chart */}</SlideColumn>
|
|
38
|
+
<SlideColumn span={4}>{/* reading */}</SlideColumn>
|
|
39
|
+
</SlideColumns>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Notes
|
|
43
|
+
|
|
44
|
+
- The spans should add up to 12.
|
|
45
|
+
- The gap and the number of columns come from the slide spec.
|
|
46
|
+
- If a column's content must fill the column's height, set `height: "100%"` on that content.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# SlideComparison
|
|
2
|
+
|
|
3
|
+
> A vs B, or before and after — 2 to 3 columns side by side.
|
|
4
|
+
|
|
5
|
+
A slide that compares 2 to 3 columns side by side. Each column has a heading, one main number (with its change) and a few points; an optional `verdict` line sits underneath. The columns share the 12 columns equally (6 / 6 or 4 / 4 / 4).
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { SlideComparison } from "@squadbase/vantage/slide";
|
|
9
|
+
import type { SlideComparisonProps, SlideComparisonColumn } from "@squadbase/vantage/slide";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **the content of one `<Slide>`**. It does not include `<Slide>` itself, so put it directly inside one. The root fills the canvas (1920×1080) at 100% and takes no `className`. Margins, text sizes and the grid are fixed inside the block (a 12-column grid on 1920×1080), so don't add your own dimensions. For how to build a deck, see [Slide](page-types/slide). The labels the block adds (「… 時点」, 「出典: …」) are fixed in Japanese; `title`, `lead`, `points` and the like are your own text.
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| `title` | `string` | The conclusion as one sentence (an action title). **Required.** |
|
|
20
|
+
| `columns` | `SlideComparisonColumn[]` | 2 to 3 columns. **Required.** Each column is described below. |
|
|
21
|
+
| `verdict` | `string` | One line saying which side wins or what follows. |
|
|
22
|
+
| `asOf` | `string` | The date the numbers were taken, date only (e.g. `"2026-10-01"`). Shown as 「2026-10-01 時点」; don't write 「時点」 yourself. |
|
|
23
|
+
| `source` | `string` | Where the numbers come from (e.g. `"BI"`). Shown as 「出典: BI」. |
|
|
24
|
+
|
|
25
|
+
### SlideComparisonColumn
|
|
26
|
+
|
|
27
|
+
| Prop | Type | Default | Description |
|
|
28
|
+
| --- | --- | --- | --- |
|
|
29
|
+
| `heading` | `string` | | What the column is ("Old plan", "Before"). **Required.** |
|
|
30
|
+
| `points` | `string[]` | | Short points. **Required.** At most 3 per column, about 24 characters each. Write the same kind of point in each column, in the same order. |
|
|
31
|
+
| `value` | `number \| null` | | The main number. `null` shows 「—」. Formatted by `format`. |
|
|
32
|
+
| `format` | `ValueFormat` | | How to format the value (`"currency"`, `"percent"`, …). Also the default format of `delta`. |
|
|
33
|
+
| `display` | `string` | | A string you already formatted ("¥120M"). Wins over `value`. |
|
|
34
|
+
| `delta` | `{ value: number \| null; format?: ValueFormat }` | | The change of the main number itself (a ratio for `percent`). Its direction comes from the sign. Without `format`, the column's `format` is used. |
|
|
35
|
+
| `comparisonLabel` | `string` | | What `delta` is measured against (「前月比」, 「旧プラン比」). Printed muted before the change. |
|
|
36
|
+
| `betterWhen` | `"up" \| "down"` | `"up"` | Which direction of `delta` is good. Use `"down"` for churn and cost. |
|
|
37
|
+
|
|
38
|
+
## Usage
|
|
39
|
+
|
|
40
|
+
```tsx
|
|
41
|
+
import { Slide, SlideComparison } from "@squadbase/vantage/slide";
|
|
42
|
+
|
|
43
|
+
<Slide>
|
|
44
|
+
<SlideComparison
|
|
45
|
+
title="The new plan churns less than the old one"
|
|
46
|
+
columns={[
|
|
47
|
+
{ heading: "Old plan", value: 0.024, format: "percent", points: ["¥9,800 per month", "No onboarding support"] },
|
|
48
|
+
{
|
|
49
|
+
heading: "New plan",
|
|
50
|
+
value: 0.018,
|
|
51
|
+
format: "percent",
|
|
52
|
+
delta: { value: -0.006 },
|
|
53
|
+
comparisonLabel: "旧プラン比",
|
|
54
|
+
betterWhen: "down",
|
|
55
|
+
points: ["¥12,800 per month", "With onboarding support"],
|
|
56
|
+
},
|
|
57
|
+
]}
|
|
58
|
+
verdict="Onboarding support explains most of the gap"
|
|
59
|
+
asOf="2026-10-01"
|
|
60
|
+
source="BI"
|
|
61
|
+
/>
|
|
62
|
+
</Slide>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Notes
|
|
66
|
+
|
|
67
|
+
- Fewer than 2 or more than 3 columns, or too many or too long points, log a console warning. Split the slide.
|
|
68
|
+
- The change is drawn with `DeltaText` (▲ ▼ and 「増」/「減」). Polarity is set only by `betterWhen`.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# SlideCover
|
|
2
|
+
|
|
3
|
+
> The cover of a deck — title, subtitle, period, author and as-of line on one slide.
|
|
4
|
+
|
|
5
|
+
The cover of a deck. The title sits in the left 8 columns; period, author and as-of go on one line at the foot.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { SlideCover } from "@squadbase/vantage/slide";
|
|
9
|
+
import type { SlideCoverProps } from "@squadbase/vantage/slide";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **the content of one `<Slide>`**. It does not include `<Slide>` itself, so put it directly inside one. The root fills the canvas (1920×1080) at 100% and takes no `className`. Margins, text sizes and the grid are fixed inside the block (a 12-column grid on 1920×1080), so don't add your own dimensions. For how to build a deck, see [Slide](page-types/slide). The labels the block adds (「… 時点」, 「出典: …」) are fixed in Japanese and cannot be overridden; `title`, `subtitle`, `period` and `author` are your own text.
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| `title` | `string` | The name of the deck. **Required.** |
|
|
20
|
+
| `subtitle` | `string` | One line under the title. |
|
|
21
|
+
| `period` | `string` | The period covered, e.g. "Jul–Sep 2026". |
|
|
22
|
+
| `author` | `string` | Author or team. |
|
|
23
|
+
| `asOf` | `string` | The date the numbers were taken, date only (e.g. `"2026-10-20"`). The block adds 「時点」 once, so don't write it. The label is fixed in Japanese. |
|
|
24
|
+
| `source` | `string` | Where the numbers come from (e.g. `"社内 BI"`). Shown as 「出典: 社内 BI」; the "出典:" label is fixed in Japanese. |
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
import { Slide, SlideCover } from "@squadbase/vantage/slide";
|
|
30
|
+
|
|
31
|
+
<Slide>
|
|
32
|
+
<SlideCover title="2026 年度 第 2 四半期 事業レビュー" subtitle="売上・解約・新規獲得の振り返りと次の打ち手" period="2026 年 7 月〜9 月" author="事業企画チーム" asOf="2026-10-20" source="社内 BI" />
|
|
33
|
+
</Slide>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Notes
|
|
37
|
+
|
|
38
|
+
- Use one cover per deck. Later slides carry their headline in the action title of the other blocks.
|
|
39
|
+
- Keep the subtitle to one line of purpose or audience; move longer explanations to later slides.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# SlideExecSummary
|
|
2
|
+
|
|
3
|
+
> The conclusion-first slide — an action title and 3–5 points.
|
|
4
|
+
|
|
5
|
+
The conclusion-first slide. Under the action title it lists 3–5 points, each a one-line headline with an optional supporting line.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { SlideExecSummary } from "@squadbase/vantage/slide";
|
|
9
|
+
import type { SlideExecSummaryProps, SlideExecSummaryPoint } from "@squadbase/vantage/slide";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **the content of one `<Slide>`**. It does not include `<Slide>` itself, so put it directly inside one. The root fills the canvas (1920×1080) at 100% and takes no `className`. Margins, text sizes and the grid are fixed inside the block (a 12-column grid on 1920×1080), so don't add your own dimensions. For how to build a deck, see [Slide](page-types/slide). The labels the block adds (「… 時点」, 「出典: …」) are fixed in Japanese and cannot be overridden; `title`, `points[].headline` and `points[].detail` are your own text.
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Default | Description |
|
|
18
|
+
| --- | --- | --- | --- |
|
|
19
|
+
| `title` | `string` | | The conclusion as one sentence (an action title). **Required.** |
|
|
20
|
+
| `points` | `SlideExecSummaryPoint[]` | | Points (`{ headline: string; detail?: string }`), 3–5 of them. **Required.** |
|
|
21
|
+
| `layout` | `"rows" \| "columns"` | `"rows"` | `rows` stacks them numbered; `columns` puts them side by side (best with 3–4). |
|
|
22
|
+
| `asOf` | `string` | | The date the numbers were taken, date only (e.g. `"2026-10-01"`). The block adds 「時点」 once, so don't write it. The label is fixed in Japanese. |
|
|
23
|
+
| `source` | `string` | | Where the numbers come from (e.g. `"社内 BI"`). Shown as 「出典: 社内 BI」; the "出典:" label is fixed in Japanese. |
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
import { Slide, SlideExecSummary } from "@squadbase/vantage/slide";
|
|
29
|
+
|
|
30
|
+
<Slide>
|
|
31
|
+
<SlideExecSummary
|
|
32
|
+
title="Q2 は売上が計画を 4% 上回り、解約の改善が次の課題"
|
|
33
|
+
points={[
|
|
34
|
+
{ headline: "売上は 5.4 億円で計画比 +4%", detail: "新規 38 社が牽引" },
|
|
35
|
+
{ headline: "解約率は 1.8% まで低下", detail: "オンボーディング刷新の効果" },
|
|
36
|
+
{ headline: "新規獲得は目標に 12 社届かず", detail: "紹介経由が想定の半分" },
|
|
37
|
+
]}
|
|
38
|
+
asOf="2026-10-20"
|
|
39
|
+
source="社内 BI"
|
|
40
|
+
/>
|
|
41
|
+
</Slide>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Notes
|
|
45
|
+
|
|
46
|
+
- More than 5 points are still drawn but log a `console.warn` — split the slide.
|
|
47
|
+
- Write `title` as a conclusion sentence, not a topic ("Sales status").
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# SlideHeading
|
|
2
|
+
|
|
3
|
+
> [Part] The title of one slide — an action title with an optional eyebrow.
|
|
4
|
+
|
|
5
|
+
The title of one slide: an `h2` at the page size, clamped to 2 lines, with an optional small label above it (`eyebrow`, e.g. the chapter). It is a **part** for the top row of a slide's 12-column grid, not a whole-slide block.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { SlideHeading } from "@squadbase/vantage/slide";
|
|
9
|
+
import type { SlideHeadingProps } from "@squadbase/vantage/slide";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **a slide part**, not a whole-slide block. Place it as a row in the 12-column grid inside a `<Slide>`; its root does not fill the canvas (100%×100%). All dimensions are fixed inside the part, so do not add your own. For how to build a deck, see [Slide](page-types/slide).
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| `title` | `string` | The conclusion as one sentence (an action title). Clamped to 2 lines. **Required.** |
|
|
20
|
+
| `eyebrow` | `string` | A short label above the title ("Chapter 2: Churn"). |
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
import { Slide, SlideHeading } from "@squadbase/vantage/slide";
|
|
26
|
+
|
|
27
|
+
<Slide>
|
|
28
|
+
<div style={{ display: "grid", gridTemplateColumns: "repeat(12, 1fr)" }}>
|
|
29
|
+
<SlideHeading title="Churn has fallen every month since June" eyebrow="Chapter 2: Churn" />
|
|
30
|
+
{/* …SlideColumns and so on… */}
|
|
31
|
+
</div>
|
|
32
|
+
</Slide>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Notes
|
|
36
|
+
|
|
37
|
+
- Write the title as the conclusion, not as a topic.
|
|
38
|
+
- It spans all 12 columns of the grid it sits in.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# SlideKpiGrid
|
|
2
|
+
|
|
3
|
+
> A scoreboard of 2–4 KPIs — value, change and target.
|
|
4
|
+
|
|
5
|
+
A scoreboard of 2–4 KPI cards side by side, each with label, value, change and target. They share the width equally.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { SlideKpiGrid } from "@squadbase/vantage/slide";
|
|
9
|
+
import type { SlideKpiGridProps, SlideKpiGridItem, SlideKpiGridDelta } from "@squadbase/vantage/slide";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **the content of one `<Slide>`**. It does not include `<Slide>` itself, so put it directly inside one. The root fills the canvas (1920×1080) at 100% and takes no `className`. Margins, text sizes and the grid are fixed inside the block (a 12-column grid on 1920×1080), so don't add your own dimensions. For how to build a deck, see [Slide](page-types/slide). The labels the block adds (「… 時点」, 「出典: …」, 「目標 …(達成率 …)」, 「増」/「減」/「横ばい」) are fixed in Japanese and cannot be overridden; `title`, `items[].label`, `items[].display` and `items[].comparisonLabel` are your own text.
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Default | Description |
|
|
18
|
+
| --- | --- | --- | --- |
|
|
19
|
+
| `title` | `string` | | The conclusion as one sentence (an action title). **Required.** |
|
|
20
|
+
| `items` | `SlideKpiGridItem[]` | | The KPIs, 2–4 of them. **Required.** Each item is described in the `items[].…` rows below. |
|
|
21
|
+
| `items[].label` | `string` | | The metric name. **Required.** |
|
|
22
|
+
| `items[].value` | `number \| null` | | The number. `null` shows 「—」. **Required.** Formatted with `format`. |
|
|
23
|
+
| `items[].format` | `ValueFormat` | | How to format the value (`"currency"`, `"percent"`, `{ type: "number", unit: "社" }`, …). Also the default format of `delta` and `target`. |
|
|
24
|
+
| `items[].display` | `string` | | Replaces the shown text only (the number behind it stays `value`, kept as `data-raw`). |
|
|
25
|
+
| `items[].delta` | `SlideKpiGridDelta` | | `{ value: number; format?: ValueFormat }`. The size of the change, signed (e.g. `0.074` with `format: "percent"` shows 「+7.4%」). The direction comes from the sign, and ▲ ▼ with 「増」「減」 always show. `format` defaults to the item's `format`. |
|
|
26
|
+
| `items[].betterWhen` | `"up" \| "down"` | `"up"` | Which direction of `delta` is good. Drives the colour. |
|
|
27
|
+
| `items[].comparisonLabel` | `string` | | What `delta` is against (e.g. 「前月比」). |
|
|
28
|
+
| `items[].target` | `number` | | The target, in the same `format` as `value`. Shown as 「目標 …(達成率 …)」. The rate is value ÷ target (target ÷ value when `betterWhen` is `"down"`). |
|
|
29
|
+
| `asOf` | `string` | | The date the numbers were taken, date only (e.g. `"2026-10-01"`). The block adds 「時点」 once, so don't write it. The label is fixed in Japanese. |
|
|
30
|
+
| `source` | `string` | | Where the numbers come from (e.g. `"社内 BI"`). Shown as 「出典: 社内 BI」; the "出典:" label is fixed in Japanese. |
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
import { Slide, SlideKpiGrid } from "@squadbase/vantage/slide";
|
|
36
|
+
|
|
37
|
+
<Slide>
|
|
38
|
+
<SlideKpiGrid
|
|
39
|
+
title="売上と継続率は計画どおり、新規獲得だけが未達"
|
|
40
|
+
items={[
|
|
41
|
+
{ label: "月次売上", value: 540_000_000, format: "currency", delta: { value: 0.074, format: "percent" }, comparisonLabel: "前月比", target: 520_000_000 },
|
|
42
|
+
{ label: "継続率", value: 0.982, format: { type: "percent", digits: 1 }, delta: { value: 0.004 }, comparisonLabel: "前月比", target: 0.98 },
|
|
43
|
+
{ label: "新規獲得", value: 38, format: { type: "number", unit: "社" }, delta: { value: -4 }, comparisonLabel: "前月比", target: 50 },
|
|
44
|
+
]}
|
|
45
|
+
asOf="2026-10-01"
|
|
46
|
+
source="社内 BI"
|
|
47
|
+
/>
|
|
48
|
+
</Slide>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Notes
|
|
52
|
+
|
|
53
|
+
- More than 4 are still drawn but log a `console.warn` — split the slide.
|
|
54
|
+
- Pass value, change and target as numbers. `format` formats them; use `display` only to change the shown text.
|
|
55
|
+
- Wording such as 「目標 …(達成率 …)」 and 「増」/「減」 comes from the block and is fixed in Japanese.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# SlideKpiHero
|
|
2
|
+
|
|
3
|
+
> One number as the hero — value, change and a trend line.
|
|
4
|
+
|
|
5
|
+
One number, large. The label, value and change take the left 6 columns and the trend line the right 6. Without `trend` the number takes the full width.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { SlideKpiHero } from "@squadbase/vantage/slide";
|
|
9
|
+
import type { SlideKpiHeroProps, SlideKpiHeroDelta } from "@squadbase/vantage/slide";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **the content of one `<Slide>`**. It does not include `<Slide>` itself, so put it directly inside one. The root fills the canvas (1920×1080) at 100% and takes no `className`. Margins, text sizes and the grid are fixed inside the block (a 12-column grid on 1920×1080), so don't add your own dimensions. For how to build a deck, see [Slide](page-types/slide). The labels the block adds (「… 時点」, 「出典: …」, 「増」/「減」/「横ばい」) are fixed in Japanese and cannot be overridden; `title`, `label`, `comparisonLabel` and `display` are your own text.
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Default | Description |
|
|
18
|
+
| --- | --- | --- | --- |
|
|
19
|
+
| `title` | `string` | | The conclusion as one sentence (an action title). **Required.** |
|
|
20
|
+
| `label` | `string` | | What the number is ("Monthly revenue"). **Required.** |
|
|
21
|
+
| `value` | `number \| null` | | The number. `null` shows 「—」. **Required.** Formatted with `format` (the number is kept as `data-raw` for export and tests). |
|
|
22
|
+
| `format` | `ValueFormat` | | How to format the value (`"currency"`, `"percent"`, …). Also the default format of `delta`. |
|
|
23
|
+
| `display` | `string` | | Replaces the shown text only (the number behind it stays `value`). |
|
|
24
|
+
| `delta` | `SlideKpiHeroDelta` | | `{ value: number; format?: ValueFormat }`. The size of the change, signed (e.g. `0.074` with `format: "percent"` shows 「+7.4%」). The direction comes from the sign, and ▲ ▼ with 「増」「減」 always show. `format` defaults to the metric's `format`. Omit for no change. |
|
|
25
|
+
| `betterWhen` | `"up" \| "down"` | `"up"` | Which direction of `delta` is good. Drives the colour. |
|
|
26
|
+
| `comparisonLabel` | `string` | | What `delta` is against (e.g. 「前月比」). |
|
|
27
|
+
| `trend` | `{ x: string; y: number }[]` | | Points of the line on the right; leave out for a number alone. |
|
|
28
|
+
| `asOf` | `string` | | The date the numbers were taken, date only (e.g. `"2026-10-01"`). The block adds 「時点」 once, so don't write it. The label is fixed in Japanese. |
|
|
29
|
+
| `source` | `string` | | Where the numbers come from (e.g. `"社内 BI"`). Shown as 「出典: 社内 BI」; the "出典:" label is fixed in Japanese. |
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
import { Slide, SlideKpiHero } from "@squadbase/vantage/slide";
|
|
35
|
+
|
|
36
|
+
<Slide>
|
|
37
|
+
<SlideKpiHero
|
|
38
|
+
title="9 月の売上は過去最高の 5.4 億円"
|
|
39
|
+
label="月次売上"
|
|
40
|
+
value={540_000_000}
|
|
41
|
+
format="currency"
|
|
42
|
+
delta={{ value: 0.074, format: "percent" }}
|
|
43
|
+
comparisonLabel="前月比"
|
|
44
|
+
trend={[
|
|
45
|
+
{ x: "4 月", y: 460_000_000 }, { x: "5 月", y: 480_000_000 }, { x: "6 月", y: 490_000_000 },
|
|
46
|
+
{ x: "7 月", y: 500_000_000 }, { x: "8 月", y: 503_000_000 }, { x: "9 月", y: 540_000_000 },
|
|
47
|
+
]}
|
|
48
|
+
asOf="2026-10-01"
|
|
49
|
+
source="社内 BI"
|
|
50
|
+
/>
|
|
51
|
+
</Slide>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Notes
|
|
55
|
+
|
|
56
|
+
- For a metric where a fall is good (cost), write `betterWhen="down"`. The colour follows `betterWhen`; the direction (▲ ▼ and 「増」/「減」) comes from the sign of `delta.value`.
|
|
57
|
+
- 「増」, 「減」, 「… 時点」 and 「出典: …」 are wording the block adds, fixed in Japanese.
|
|
58
|
+
- The chart is an `EChart` with animation off; the pptx export waits for it.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# SlideNextActions
|
|
2
|
+
|
|
3
|
+
> What happens next — 3–5 actions with owner, due date and the metric to check.
|
|
4
|
+
|
|
5
|
+
The closing slide of most reports: what happens next. Each action can carry an owner, a due date and the metric that shows it worked.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { SlideNextActions } from "@squadbase/vantage/slide";
|
|
9
|
+
import type { SlideNextActionsProps, SlideNextActionsItem } from "@squadbase/vantage/slide";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **the content of one `<Slide>`**. It does not include `<Slide>` itself, so put it directly inside one. The root fills the canvas (1920×1080) at 100% and takes no `className`. Margins, text sizes and the grid are fixed inside the block (a 12-column grid on 1920×1080), so don't add your own dimensions. For how to build a deck, see [Slide](page-types/slide). The labels the block adds (the column headers 担当 / 期限 / 確認する指標, 「… 時点」, 「出典: …」) are fixed in Japanese and cannot be overridden; `title` and the `items[]` fields are your own text.
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| `title` | `string` | The decision or plan as one sentence. **Required.** |
|
|
20
|
+
| `items` | `SlideNextActionsItem[]` | Actions, 3–5. **Required.** Each item is described in the `items[].…` rows below. |
|
|
21
|
+
| `items[].action` | `string` | What to do, as one sentence starting from the object (about 40 characters at most). **Required.** |
|
|
22
|
+
| `items[].owner` | `string` | The owner. |
|
|
23
|
+
| `items[].due` | `string` | The due date, shown as written on one line ("10/31"; about 10 characters at most). |
|
|
24
|
+
| `items[].metric` | `string` | What to look at to know it worked. |
|
|
25
|
+
| `asOf` | `string` | The date the numbers were taken, date only (e.g. `"2026-10-01"`). The block adds 「時点」 once, so don't write it. The label is fixed in Japanese. |
|
|
26
|
+
| `source` | `string` | Where the numbers come from (e.g. `"社内 BI"`). Shown as 「出典: 社内 BI」; the "出典:" label is fixed in Japanese. |
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
import { Slide, SlideNextActions } from "@squadbase/vantage/slide";
|
|
32
|
+
|
|
33
|
+
<Slide>
|
|
34
|
+
<SlideNextActions
|
|
35
|
+
title="解約と新規獲得の施策を 3 つ、11 月末までに始める"
|
|
36
|
+
items={[
|
|
37
|
+
{ action: "解約予兆スコアの上位 50 社に CS が連絡する", owner: "CS 部 山田", due: "10/31", metric: "解約率 1.5% 以下" },
|
|
38
|
+
{ action: "紹介プログラムの特典を見直す", owner: "マーケ 佐藤", due: "11/15", metric: "紹介経由の新規 20 社" },
|
|
39
|
+
{ action: "料金ページの導線を改善する", owner: "プロダクト 鈴木", due: "11/30", metric: "申込率 +1pt" },
|
|
40
|
+
]}
|
|
41
|
+
/>
|
|
42
|
+
</Slide>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Notes
|
|
46
|
+
|
|
47
|
+
- The owner, due and metric columns appear only when at least one item has a value.
|
|
48
|
+
- The column headers (担当 / 期限 / 確認する指標) are fixed in Japanese and cannot be overridden.
|
|
49
|
+
- `due` is shown as written ("10/31", "by next week"). More than 5 items log a `console.warn`.
|