@squadbase/vantage 0.6.2-dev1.a7c4a3e → 0.6.2-dev1.a881d95
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/add-4GHF2TX2.js +6 -0
- package/dist/add-4GHF2TX2.js.map +1 -0
- package/dist/{build-JB4VOMUI.js → build-U7GO26HR.js} +9 -9
- package/dist/{build-JB4VOMUI.js.map → build-U7GO26HR.js.map} +1 -1
- package/dist/{check-ZJYK6RLG.js → check-MRVAIHG5.js} +7 -7
- package/dist/{check-ZJYK6RLG.js.map → check-MRVAIHG5.js.map} +1 -1
- package/dist/chunk-2IAPIOPS.js +152 -0
- package/dist/chunk-2IAPIOPS.js.map +1 -0
- package/dist/chunk-3RJEOP3J.js +174 -0
- package/dist/chunk-3RJEOP3J.js.map +1 -0
- package/dist/chunk-77CISBMG.js +7581 -0
- package/dist/chunk-77CISBMG.js.map +1 -0
- package/dist/{chunk-U2M6HGKQ.js → chunk-AABMKHEU.js} +4 -4
- package/dist/{chunk-U2M6HGKQ.js.map → chunk-AABMKHEU.js.map} +1 -1
- package/dist/{chunk-PVTHHV7X.js → chunk-ANZLVSEP.js} +28 -7
- package/dist/chunk-ANZLVSEP.js.map +1 -0
- package/dist/chunk-CKWPK4RO.js +50 -0
- package/dist/chunk-CKWPK4RO.js.map +1 -0
- package/dist/chunk-EG4PX726.js +678 -0
- package/dist/chunk-EG4PX726.js.map +1 -0
- package/dist/{chunk-QI3XQKHS.js → chunk-GNXCX4WE.js} +10 -3
- package/dist/chunk-GNXCX4WE.js.map +1 -0
- package/dist/chunk-NZ5QIIG4.js +74 -0
- package/dist/chunk-NZ5QIIG4.js.map +1 -0
- package/dist/{chunk-BCE22JSM.js → chunk-PJ4SPXHS.js} +52 -16
- package/dist/chunk-PJ4SPXHS.js.map +1 -0
- package/dist/{chunk-RPZAALCX.js → chunk-QNOX7WLZ.js} +256 -165
- package/dist/chunk-QNOX7WLZ.js.map +1 -0
- package/dist/{chunk-ZVANIULZ.js → chunk-RNTDBX6S.js} +4 -4
- package/dist/{chunk-ZVANIULZ.js.map → chunk-RNTDBX6S.js.map} +1 -1
- package/dist/{chunk-PXRX5PEC.js → chunk-ROHNXP7J.js} +73 -4
- package/dist/chunk-ROHNXP7J.js.map +1 -0
- package/dist/chunk-S5MDTHH7.js +466 -0
- package/dist/chunk-S5MDTHH7.js.map +1 -0
- package/dist/chunk-SDJTTMLK.js +1877 -0
- package/dist/chunk-SDJTTMLK.js.map +1 -0
- package/dist/{chunk-EP6JHXSR.js → chunk-SHZM3EXB.js} +68 -12
- package/dist/chunk-SHZM3EXB.js.map +1 -0
- package/dist/chunk-TRMHNMMZ.js +61 -0
- package/dist/chunk-TRMHNMMZ.js.map +1 -0
- package/dist/{chunk-A2UUGASH.js → chunk-U736PVHY.js} +2 -2
- package/dist/chunk-U736PVHY.js.map +1 -0
- package/dist/{chunk-JGRMRXXZ.js → chunk-UWSQUHX6.js} +4 -99
- package/dist/chunk-UWSQUHX6.js.map +1 -0
- package/dist/cli.js +12 -11
- package/dist/cli.js.map +1 -1
- package/dist/client/index.d.ts +34 -3
- package/dist/client/index.js +211 -12
- package/dist/client/index.js.map +1 -1
- package/dist/components/index.d.ts +1761 -30
- package/dist/components/index.js +7 -4
- package/dist/delta-text-CbrOaW83.d.ts +17 -0
- package/dist/{dev-FCEC3UKQ.js → dev-O42JFQ64.js} +10 -10
- package/dist/dev-O42JFQ64.js.map +1 -0
- package/dist/doc/index.d.ts +215 -2
- package/dist/doc/index.js +423 -5
- package/dist/doc/index.js.map +1 -1
- package/dist/{docs-EJJ3BECT.js → docs-JVP4RPKT.js} +3 -3
- package/dist/{docs-EJJ3BECT.js.map → docs-JVP4RPKT.js.map} +1 -1
- package/dist/{doctor-WHZXPERA.js → doctor-YD3XAAOT.js} +7 -7
- package/dist/{doctor-WHZXPERA.js.map → doctor-YD3XAAOT.js.map} +1 -1
- package/dist/format-DihQkL1N.d.ts +249 -0
- package/dist/markdown/index.js +1 -1
- package/dist/markdown/index.js.map +1 -1
- package/dist/{preview-OGMCNQUO.js → preview-T6CLSQVX.js} +3 -3
- package/dist/{preview-OGMCNQUO.js.map → preview-T6CLSQVX.js.map} +1 -1
- package/dist/query/index.d.ts +0 -11
- package/dist/query/index.js +2 -2
- package/dist/{routes-GTFO5PUF.js → routes-PVKNT777.js} +6 -6
- package/dist/{routes-GTFO5PUF.js.map → routes-PVKNT777.js.map} +1 -1
- package/dist/{search-6Y422SV6.js → search-5LC4XPB5.js} +3 -3
- package/dist/{search-6Y422SV6.js.map → search-5LC4XPB5.js.map} +1 -1
- package/dist/slide/index.d.ts +272 -1
- package/dist/slide/index.js +1072 -14
- package/dist/slide/index.js.map +1 -1
- package/dist/table/index.js +14 -10
- package/dist/table/index.js.map +1 -1
- package/dist/ui/index.d.ts +148 -12
- package/dist/ui/index.js +1340 -88
- package/dist/ui/index.js.map +1 -1
- package/dist/{upgrade-AL4KZZR4.js → upgrade-6DT7ADRP.js} +7 -7
- package/dist/{upgrade-AL4KZZR4.js.map → upgrade-6DT7ADRP.js.map} +1 -1
- package/dist/vite/index.d.ts +10 -0
- package/dist/vite/index.js +4 -4
- package/docs/en/agent-skills.md +1 -1
- package/docs/en/changelog.md +2 -0
- package/docs/en/components.md +42 -17
- 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/data-table.md +22 -0
- package/docs/en/parts/delta.md +51 -0
- package/docs/en/parts/donut-chart.md +72 -0
- package/docs/en/parts/format.md +43 -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 +58 -0
- package/docs/en/parts/legend.md +35 -0
- package/docs/en/parts/line-chart.md +94 -0
- package/docs/en/parts/metric-value.md +3 -2
- 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/sparkline.md +1 -1
- package/docs/en/parts/tracker.md +36 -0
- package/docs/en/parts/trend-indicator.md +17 -1
- 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/en/ui-and-theming.md +1 -1
- package/docs/index.json +1184 -114
- package/docs/ja/agent-skills.md +1 -1
- package/docs/ja/changelog.md +33 -0
- package/docs/ja/components.md +68 -101
- 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/csv.md +83 -0
- package/docs/ja/page-types/doc.md +83 -0
- package/docs/ja/page-types/excel.md +82 -0
- package/docs/ja/page-types/slide.md +133 -0
- package/docs/ja/page-types.md +47 -0
- package/docs/ja/pages-and-metadata.md +15 -0
- package/docs/ja/parts/area-chart.md +85 -0
- package/docs/ja/parts/bar-chart.md +95 -0
- package/docs/ja/parts/bar-list.md +58 -0
- package/docs/ja/parts/category-bar.md +36 -0
- package/docs/ja/parts/chart-frame.md +36 -0
- package/docs/ja/parts/data-table.md +22 -0
- package/docs/ja/parts/delta.md +51 -0
- package/docs/ja/parts/donut-chart.md +66 -0
- package/docs/ja/parts/echart.md +3 -0
- package/docs/ja/parts/format.md +44 -0
- package/docs/ja/parts/funnel-steps.md +27 -8
- package/docs/ja/parts/heatmap.md +45 -0
- package/docs/ja/parts/kpi-card.md +56 -0
- package/docs/ja/parts/legend.md +36 -0
- package/docs/ja/parts/line-chart.md +84 -0
- package/docs/ja/parts/metric-value.md +3 -2
- package/docs/ja/parts/progress-circle.md +34 -0
- package/docs/ja/parts/sample-data.md +61 -0
- package/docs/ja/parts/scatter-chart.md +69 -0
- package/docs/ja/parts/sparkline.md +2 -2
- package/docs/ja/parts/tracker.md +32 -0
- package/docs/ja/parts/trend-indicator.md +17 -1
- package/docs/ja/parts/updated-at.md +27 -0
- package/docs/ja/parts/waterfall-chart.md +61 -0
- package/docs/ja/routing.md +8 -86
- 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/alert-dialog.md +41 -0
- package/docs/ja/ui/avatar.md +31 -0
- package/docs/ja/ui/combobox.md +74 -0
- package/docs/ja/ui/drawer.md +41 -0
- package/docs/ja/ui/empty.md +1 -1
- package/docs/ja/ui/error-state.md +4 -3
- package/docs/ja/ui/field.md +42 -0
- package/docs/ja/ui/hover-card.md +21 -0
- package/docs/ja/ui/kbd.md +16 -0
- package/docs/ja/ui/loading.md +1 -1
- package/docs/ja/ui/pagination.md +36 -0
- package/docs/ja/ui/radio-group.md +21 -0
- package/docs/ja/ui/toast.md +46 -0
- package/docs/ja/ui/toggle-group.md +4 -3
- package/docs/ja/ui-and-theming.md +14 -7
- package/package.json +43 -29
- package/registry/ui/accordion.tsx +76 -0
- package/registry/ui/alert-dialog.tsx +189 -0
- package/registry/ui/alert.tsx +80 -0
- package/registry/ui/app-shell.tsx +424 -0
- package/registry/ui/area-chart.tsx +3960 -0
- package/registry/ui/attention-list.tsx +465 -0
- package/registry/ui/avatar.tsx +110 -0
- package/registry/ui/badge.tsx +56 -0
- package/registry/ui/bar-chart.tsx +3954 -0
- package/registry/ui/bar-list.tsx +3998 -0
- package/registry/ui/box-plot-chart.tsx +4214 -0
- package/registry/ui/breadcrumb.tsx +128 -0
- package/registry/ui/button.tsx +62 -0
- package/registry/ui/calendar.tsx +223 -0
- package/registry/ui/card.tsx +107 -0
- package/registry/ui/category-bar.tsx +1498 -0
- package/registry/ui/chart-frame.tsx +1604 -0
- package/registry/ui/checkbox.tsx +30 -0
- package/registry/ui/collapsible.tsx +23 -0
- package/registry/ui/combobox.tsx +310 -0
- package/registry/ui/command.tsx +198 -0
- package/registry/ui/dashboard-card.tsx +217 -0
- package/registry/ui/data-table.tsx +896 -157
- package/registry/ui/date-range-picker.tsx +544 -0
- package/registry/ui/delta.tsx +350 -0
- package/registry/ui/dialog.tsx +161 -0
- package/registry/ui/donut-chart.tsx +4006 -0
- package/registry/ui/drawer.tsx +229 -0
- package/registry/ui/dropdown-menu.tsx +274 -0
- package/registry/ui/echart.tsx +1178 -0
- package/registry/ui/field.tsx +240 -0
- package/registry/ui/filter-bar.tsx +551 -0
- package/registry/ui/funnel-steps.tsx +3843 -0
- package/registry/ui/heatmap.tsx +2027 -0
- package/registry/ui/histogram-chart.tsx +4284 -0
- package/registry/ui/hover-card.tsx +52 -0
- package/registry/ui/input-group.tsx +160 -0
- package/registry/ui/input.tsx +24 -0
- package/registry/ui/kbd.tsx +30 -0
- package/registry/ui/kpi-card.tsx +905 -0
- package/registry/ui/label.tsx +22 -0
- package/registry/ui/legend.tsx +3817 -0
- package/registry/ui/line-chart.tsx +3958 -0
- package/registry/ui/metric-value.tsx +62 -0
- package/registry/ui/multi-select.tsx +382 -0
- package/registry/ui/page-shell.tsx +420 -0
- package/registry/ui/pagination.tsx +140 -0
- package/registry/ui/paired-chart.tsx +4086 -0
- package/registry/ui/placeholder.tsx +36 -0
- package/registry/ui/popover.tsx +92 -0
- package/registry/ui/progress-circle.tsx +1033 -0
- package/registry/ui/progress.tsx +85 -0
- package/registry/ui/radio-group.tsx +39 -0
- package/registry/ui/sample-data.tsx +230 -0
- package/registry/ui/scatter-chart.tsx +4503 -0
- package/registry/ui/scroll-area.tsx +56 -0
- package/registry/ui/searchable-select.tsx +352 -0
- package/registry/ui/section-header.tsx +43 -0
- package/registry/ui/segmented-control.tsx +76 -0
- package/registry/ui/select.tsx +255 -0
- package/registry/ui/separator.tsx +27 -0
- package/registry/ui/sheet.tsx +139 -0
- package/registry/ui/sidebar.tsx +725 -0
- package/registry/ui/skeleton.tsx +17 -0
- package/registry/ui/slider.tsx +56 -0
- package/registry/ui/sparkline.tsx +230 -0
- package/registry/ui/spinner.tsx +14 -0
- package/registry/ui/states.tsx +247 -0
- package/registry/ui/status-badge.tsx +286 -0
- package/registry/ui/switch.tsx +34 -0
- package/registry/ui/table.tsx +118 -0
- package/registry/ui/tabs.tsx +84 -0
- package/registry/ui/textarea.tsx +22 -0
- package/registry/ui/toast.tsx +250 -0
- package/registry/ui/toggle-group.tsx +91 -0
- package/registry/ui/toggle.tsx +47 -0
- package/registry/ui/tooltip.tsx +72 -0
- package/registry/ui/tracker.tsx +1015 -0
- package/registry/ui/trend-indicator.tsx +217 -0
- package/registry/ui/updated-at.tsx +276 -0
- package/registry/ui/waterfall-chart.tsx +4561 -0
- package/skills/vantage-add-feature/SKILL.md +14 -7
- package/skills/vantage-design/SKILL.md +62 -52
- package/skills/vantage-design/references/extract.md +26 -27
- package/skills/vantage-design/references/format.md +12 -172
- package/skills/vantage-design/references/presets.md +50 -110
- package/skills/vantage-pitfalls/SKILL.md +10 -1
- package/skills/vantage-slide/SKILL.md +71 -36
- package/templates/AGENTS.md +53 -16
- package/templates/agents/api.md +36 -0
- package/templates/agents/csv.md +2 -1
- package/templates/agents/doc.md +52 -3
- package/templates/agents/page.md +91 -10
- package/templates/agents/slide.md +90 -4
- package/templates/agents/xlsx.md +2 -1
- package/theme.css +247 -132
- package/dist/add-DY4AXANK.js +0 -6
- package/dist/add-DY4AXANK.js.map +0 -1
- package/dist/chunk-5ZOP4SQR.js +0 -47
- package/dist/chunk-5ZOP4SQR.js.map +0 -1
- package/dist/chunk-A2UUGASH.js.map +0 -1
- package/dist/chunk-BCE22JSM.js.map +0 -1
- package/dist/chunk-DTDVSFRY.js +0 -29
- package/dist/chunk-DTDVSFRY.js.map +0 -1
- package/dist/chunk-EP6JHXSR.js.map +0 -1
- package/dist/chunk-JGRMRXXZ.js.map +0 -1
- package/dist/chunk-KLEIVDUV.js +0 -165
- package/dist/chunk-KLEIVDUV.js.map +0 -1
- package/dist/chunk-MP3QSOXL.js +0 -2232
- package/dist/chunk-MP3QSOXL.js.map +0 -1
- package/dist/chunk-PVTHHV7X.js.map +0 -1
- package/dist/chunk-PXRX5PEC.js.map +0 -1
- package/dist/chunk-QI3XQKHS.js.map +0 -1
- package/dist/chunk-RPZAALCX.js.map +0 -1
- package/dist/chunk-T3FLAGI6.js +0 -316
- package/dist/chunk-T3FLAGI6.js.map +0 -1
- package/dist/dev-FCEC3UKQ.js.map +0 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# DocActionItems
|
|
2
|
+
|
|
3
|
+
> What to do next — action, owner, due date, expected effect and priority.
|
|
4
|
+
|
|
5
|
+
The recommendations section: action, owner, due date, expected effect and priority. The default `table` is a table; `asks` is a short bulleted list of requests to the reader (introductions, a decision, a hire). Priority is only the word 高 / 中 / 低, with no badge and no colour.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { DocActionItems } from "@squadbase/vantage/doc";
|
|
9
|
+
import type { DocActionItemsProps, DocActionItem, DocActionPriority } from "@squadbase/vantage/doc";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **one section to place directly under `<Document>`**. The document sets heading and body sizes and the width, so no dimensions are set here. `action` is a `ReactNode`; Markdown strings are not parsed. The table headings ("対応", "担当", "期限", "期待する効果", "優先度"), the priority words (高 / 中 / 低) and the "まで" after a due date in `asks` are fixed in Japanese and cannot be overridden. Write `action`, `owner`, `due` and `impact` in English yourself; the default heading "推奨する対応" is Japanese, so pass `title`. For the whole page, see [Document](page-types/doc).
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Default | Description |
|
|
18
|
+
| --- | --- | --- | --- |
|
|
19
|
+
| `title` | `string` | `"推奨する対応"` | Heading text. |
|
|
20
|
+
| `headingLevel` | `2 \| 3` | `2` | Heading level: 2 directly under `<Document>`, 3 inside another section. |
|
|
21
|
+
| `items` | `DocActionItem[]` | | Actions, most important first. **Required.** |
|
|
22
|
+
| `items[].action` | `ReactNode` | | What to do. **Required.** |
|
|
23
|
+
| `items[].owner` | `string` | | Owner. |
|
|
24
|
+
| `items[].due` | `string` | | Due date, shown as written ("2026-11-15", "11 月末"). |
|
|
25
|
+
| `items[].impact` | `string` | | Expected effect ("解約率 −0.5pt"). Shown in the `table` only. |
|
|
26
|
+
| `items[].priority` | `"high" \| "medium" \| "low"` | | Priority, printed as the word 高 / 中 / 低 (高 in semibold). Shown in the `table` only. |
|
|
27
|
+
| `variant` | `"table" \| "asks"` | `"table"` | A table, or a bulleted list of requests to the reader. |
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
import { Document, DocActionItems } from "@squadbase/vantage/doc";
|
|
33
|
+
|
|
34
|
+
<Document>
|
|
35
|
+
<DocActionItems
|
|
36
|
+
items={[
|
|
37
|
+
{ action: "法人プランの導入支援を増員する", owner: "CS 部", due: "2026-11-15", impact: "解約率 −0.5pt", priority: "high" },
|
|
38
|
+
{ action: "紹介プログラムの特典を見直す", owner: "マーケティング部", due: "11 月末", impact: "紹介経由の新規 +10 社", priority: "medium" },
|
|
39
|
+
{ action: "料金ページの文言を改善する", owner: "プロダクト部", priority: "low" },
|
|
40
|
+
]}
|
|
41
|
+
/>
|
|
42
|
+
</Document>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Notes
|
|
46
|
+
|
|
47
|
+
- `due` is shown as written ("2026-11-15", "11 月末"). A missing owner, due or impact shows "—".
|
|
48
|
+
- `variant="asks"` adds only the owner and "`due` まで" (e.g. "(CS 部・11 月末 まで)"); the effect and priority are not shown.
|
|
49
|
+
- When printed, each item of `asks` stays on one page and does not break across pages.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# DocCallout
|
|
2
|
+
|
|
3
|
+
> A boxed remark inside the text — a note, insight, warning or decision.
|
|
4
|
+
|
|
5
|
+
A box for the one thing a reader must not miss — a `div` with `role="note"` and a left rule in the kind's semantic colour (a decision is neutral). The kind also prints as a word ("注意", "示唆"), so colour is never the only signal. Don't use it for decoration.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { DocCallout } from "@squadbase/vantage/doc";
|
|
9
|
+
import type { DocCalloutProps, DocCalloutKind } from "@squadbase/vantage/doc";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **a part to place inside body text or a section**, not a section of its own directly under `<Document>`. The document sets heading and body sizes and the width, so no dimensions are set here. `children` is a `string` or a `ReactNode`; Markdown strings are not parsed. The kind words ("補足", "示唆", "注意", "決定事項") are fixed in Japanese and cannot be overridden, so an English callout reads "注意: your title". Write `title` in English. For the whole page, see [Document](page-types/doc).
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Default | Description |
|
|
18
|
+
| --- | --- | --- | --- |
|
|
19
|
+
| `kind` | `"note" \| "insight" \| "warning" \| "decision"` | `"note"` | Kind: note (補足) / insight (示唆) / warning (注意) / decision (決定事項). |
|
|
20
|
+
| `title` | `string` | | Heading of the box, one short line. When given, it prints as "<kind word>: <title>". Omit it and only the kind word shows. A title equal to the kind word is shown once. |
|
|
21
|
+
| `children` | `ReactNode` | | The body. A `string` becomes a paragraph. Markdown strings are not parsed. **Required.** |
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { Document, DocCallout } from "@squadbase/vantage/doc";
|
|
27
|
+
|
|
28
|
+
<Document>
|
|
29
|
+
<DocCallout kind="warning" title="9 月の数値は速報値">
|
|
30
|
+
10 月 10 日の確定で変わることがあります。
|
|
31
|
+
</DocCallout>
|
|
32
|
+
</Document>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Notes
|
|
36
|
+
|
|
37
|
+
- The kind word is added by the block; do not repeat it in `title`, which should hold only the heading itself.
|
|
38
|
+
- When printed, it stays on one page and does not break across pages.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# DocDataTable
|
|
2
|
+
|
|
3
|
+
> A table with the notes a printed table needs — title, unit, total row, footnotes and source.
|
|
4
|
+
|
|
5
|
+
A table with what a printed table needs: title, unit, right-aligned numbers, a total row, highlighted rows, footnotes and a source line. It is a plain `table` styled by `<Document>`, which also keeps rows together when printed. For screens that need sorting or scrolling, use `DataTable`.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { DocDataTable } from "@squadbase/vantage/doc";
|
|
9
|
+
import type { DocDataTableProps, DocTableColumn, DocTableRow, DocTableCell } from "@squadbase/vantage/doc";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **a part to place inside body text or a section**, not a section of its own directly under `<Document>`. The document sets heading and body sizes and the width, so no dimensions are set here. A cell is a string or a number; a `ReactNode` is not accepted. The caption labels "出典" and "データ時点" are fixed in Japanese and cannot be overridden; column labels, `title`, `unit` and footnotes are yours, so write them in English. For the whole page, see [Document](page-types/doc).
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| `title` | `string` | Table title, as a caption above the table. |
|
|
20
|
+
| `unit` | `string` | Unit or scale ("単位: 百万円"). With a title it follows in parentheses. |
|
|
21
|
+
| `columns` | `DocTableColumn[]` | Columns (`{ key; label; format?: ValueFormat; align?: "left" \| "right" \| "center" }`). Without `format`, numbers use a plain thousands format. Without `align`, a column of numbers is right-aligned and others left-aligned. **Required.** |
|
|
22
|
+
| `rows` | `DocTableRow[]` | Rows: objects keyed by the `key` of `columns`. A cell is a string or a number (`null`, `undefined` and an empty string show "—"). **Required.** |
|
|
23
|
+
| `total` | `DocTableRow` | The total row (`tfoot`), keyed like `rows`. |
|
|
24
|
+
| `highlightRows` | `number[]` | Indexes of the rows to set in semibold (zero-based, indexes into `rows`). |
|
|
25
|
+
| `footnotes` | `{ mark: string; text: string }[]` | Footnotes. Write the same `mark` ("※1") in a cell string to point at one. |
|
|
26
|
+
| `source` | `string` | Source. Shown as "出典: …" in the caption. |
|
|
27
|
+
| `asOf` | `string` | The date the data was taken, as a date only ("2026-10-03"). The block adds the label "データ時点". |
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
import { Document, DocDataTable } from "@squadbase/vantage/doc";
|
|
33
|
+
|
|
34
|
+
<Document>
|
|
35
|
+
<DocDataTable
|
|
36
|
+
title="部門別の売上"
|
|
37
|
+
unit="単位: 百万円"
|
|
38
|
+
columns={[
|
|
39
|
+
{ key: "dept", label: "部門" },
|
|
40
|
+
{ key: "sales", label: "売上", format: "number" },
|
|
41
|
+
{ key: "share", label: "構成比", format: { type: "percent", digits: 1 } },
|
|
42
|
+
]}
|
|
43
|
+
rows={[
|
|
44
|
+
{ dept: "法人営業", sales: 312, share: 0.58 },
|
|
45
|
+
{ dept: "パートナー", sales: 148, share: 0.27 },
|
|
46
|
+
{ dept: "オンライン ※1", sales: 80, share: 0.15 },
|
|
47
|
+
]}
|
|
48
|
+
total={{ dept: "合計", sales: 540, share: 1 }}
|
|
49
|
+
highlightRows={[0]}
|
|
50
|
+
footnotes={[{ mark: "※1", text: "9 月から集計対象に追加" }]}
|
|
51
|
+
source="会計システム"
|
|
52
|
+
asOf="2026-10-03"
|
|
53
|
+
/>
|
|
54
|
+
</Document>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Notes
|
|
58
|
+
|
|
59
|
+
- Numbers line up with `tabular-nums`, and a missing cell shows "—".
|
|
60
|
+
- When printed, a row does not break across pages. A long table may break between rows, and the caption (footnotes and source) stays on one page.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# DocExecutiveSummary
|
|
2
|
+
|
|
3
|
+
> The answer first — one conclusion, 3–5 points and optional headline numbers.
|
|
4
|
+
|
|
5
|
+
The answer-first section (BLUF): one conclusion sentence, 3–5 numbered points and up to 3 headline numbers. The direction of each change comes from the sign of the `delta` you pass, and the ▲▼ mark and the sign are always printed, so the direction is clear without colour.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { DocExecutiveSummary } from "@squadbase/vantage/doc";
|
|
9
|
+
import type { DocExecutiveSummaryProps, DocSummaryMetric } from "@squadbase/vantage/doc";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **one section to place directly under `<Document>`**. The document sets heading and body sizes and the width, so no dimensions are set here. `conclusion` and `points` are a `string` or a `ReactNode`; Markdown strings are not parsed. The default heading "要旨" and the default comparison name "前期比" are Japanese; on an English page pass `title` and `comparisonLabel` in English. Nothing else is printed by the block here. For the whole page, see [Document](page-types/doc).
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Default | Description |
|
|
18
|
+
| --- | --- | --- | --- |
|
|
19
|
+
| `title` | `string` | `"要旨"` | Heading text. |
|
|
20
|
+
| `headingLevel` | `2 \| 3` | `2` | Heading level: 2 directly under `<Document>`, 3 inside another section. |
|
|
21
|
+
| `conclusion` | `ReactNode` | | The verdict in one sentence, set in semibold. **Required.** |
|
|
22
|
+
| `points` | `ReactNode[]` | | Supporting points, 3–5, most important first. Shown as a numbered list. **Required.** |
|
|
23
|
+
| `metrics` | `DocSummaryMetric[]` | | Headline numbers (at most 3; any beyond are ignored). |
|
|
24
|
+
| `metrics[].label` | `string` | | Name of the metric. |
|
|
25
|
+
| `metrics[].value` | `number \| null` | | The value. `null` shows "—". |
|
|
26
|
+
| `metrics[].format` | `ValueFormat` | | Format of `value` (`"currency"`, `{ type: "percent", digits: 1 }`, …). |
|
|
27
|
+
| `metrics[].display` | `string` | | When given, shown instead of the formatted value ("about ¥54M"). |
|
|
28
|
+
| `metrics[].delta` | `{ value: number; format?: ValueFormat }` | | The change itself (current − comparison). Direction comes from the sign; the ▲▼ mark and the sign are always printed. Omit for no comparison. Without `format`, the metric's `format` is used. |
|
|
29
|
+
| `metrics[].comparisonLabel` | `string` | `"前期比"` | Name of the comparison (e.g. "前月比"). |
|
|
30
|
+
| `metrics[].betterWhen` | `"up" \| "down"` | `"up"` | Which way is good. Use `"down"` for churn or cost. Colour only adds good / bad. |
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
import { Document, DocExecutiveSummary } from "@squadbase/vantage/doc";
|
|
36
|
+
|
|
37
|
+
<Document>
|
|
38
|
+
<DocExecutiveSummary
|
|
39
|
+
conclusion="9 月の売上は計画を上回ったが、新規獲得は目標に届いていない。"
|
|
40
|
+
points={[
|
|
41
|
+
"売上は 5,390 万円で、計画比 +3.7%。",
|
|
42
|
+
"解約率は 1.8% まで下がり、3 か月連続で改善。",
|
|
43
|
+
"新規獲得は 38 社で、目標の 50 社に未達。",
|
|
44
|
+
]}
|
|
45
|
+
metrics={[
|
|
46
|
+
{ label: "売上", value: 53_900_000, format: "currency", delta: { value: 3_700_000 }, comparisonLabel: "前月比" },
|
|
47
|
+
{
|
|
48
|
+
label: "解約率",
|
|
49
|
+
value: 0.018,
|
|
50
|
+
format: { type: "percent", digits: 1 },
|
|
51
|
+
delta: { value: -0.003, format: { type: "number", digits: 1, unit: "pt", divisor: 0.01 } },
|
|
52
|
+
comparisonLabel: "前月比",
|
|
53
|
+
betterWhen: "down",
|
|
54
|
+
},
|
|
55
|
+
]}
|
|
56
|
+
/>
|
|
57
|
+
</Document>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Notes
|
|
61
|
+
|
|
62
|
+
- For a metric where a fall is good, set `betterWhen: "down"` (this flips the good / bad colour; the ▲▼ mark and sign still show the real direction).
|
|
63
|
+
- `delta` is the change itself, not the comparison value. For a rate (churn and the like), give it a `pt` format as in the example so it is not read as a relative change.
|
|
64
|
+
- When printed, each point and each metric tile stays on one page; the section as a whole may break across pages.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# DocFigure
|
|
2
|
+
|
|
3
|
+
> The figure convention in one place — a finding title, unit, the chart and a caption with source.
|
|
4
|
+
|
|
5
|
+
The figure convention: a title that states the finding, the unit, the chart (as `children`) and a caption with source and notes, as a real `figure` / `figcaption`. The chart is yours — a typed chart, an `EChart` or an image. A number without a source and a date is unfinished, so `source` and `asOf` are first-class.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { DocFigure } from "@squadbase/vantage/doc";
|
|
9
|
+
import type { DocFigureProps } from "@squadbase/vantage/doc";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **a part to place inside body text or a section**, not a section of its own directly under `<Document>`. The document sets heading and body sizes and the width, so no dimensions are set here. `children` is the chart (a `ReactNode`). The caption labels "図 N", "出典" and "データ時点" are fixed in Japanese and cannot be overridden; write `title`, `unit` and `notes` in English yourself. For the whole page, see [Document](page-types/doc).
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| `title` | `string` | The finding as a sentence ("Churn fell two months running"), not the subject. **Required.** |
|
|
20
|
+
| `unit` | `string` | Unit or scale ("単位: %"), shown right under the title. Put definitions and caveats in `notes`. |
|
|
21
|
+
| `number` | `number` | Figure number, shown as "図 N" in the caption. |
|
|
22
|
+
| `source` | `string` | Where the data comes from. Shown as "出典: …" in the caption. |
|
|
23
|
+
| `asOf` | `string` | The date the data was taken, as a date only ("2026-10-03"). The block adds the label "データ時点". |
|
|
24
|
+
| `notes` | `string[]` | Footnotes and definitions, one per line. |
|
|
25
|
+
| `children` | `ReactNode` | The chart; it takes the full column. **Required.** |
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
```tsx
|
|
30
|
+
import { Document, DocFigure } from "@squadbase/vantage/doc";
|
|
31
|
+
import { EChart, type EChartsOption } from "@squadbase/vantage/components";
|
|
32
|
+
|
|
33
|
+
const option: EChartsOption = {
|
|
34
|
+
xAxis: { type: "category", data: ["7 月", "8 月", "9 月"] },
|
|
35
|
+
yAxis: { type: "value" },
|
|
36
|
+
series: [{ type: "line", data: [2.4, 2.1, 1.8] }],
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
<Document>
|
|
40
|
+
<DocFigure
|
|
41
|
+
number={1}
|
|
42
|
+
title="解約率は 2 か月連続で低下"
|
|
43
|
+
unit="単位: %"
|
|
44
|
+
source="課金システム"
|
|
45
|
+
asOf="2026-10-03"
|
|
46
|
+
notes={["解約率は、月初の契約数に対するその月の解約数の割合。"]}
|
|
47
|
+
>
|
|
48
|
+
<EChart option={option} height={240} ariaLabel="解約率の推移(7〜9 月)" />
|
|
49
|
+
</DocFigure>
|
|
50
|
+
</Document>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Notes
|
|
54
|
+
|
|
55
|
+
- Do not give the chart in `children` its own `title`; the title goes in the `title` of `DocFigure`. If the chart needs an accessible name, use `ariaLabel`.
|
|
56
|
+
- A figure does not break across pages when printed.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# DocKeyFindings
|
|
2
|
+
|
|
3
|
+
> 3–5 findings — a concluding headline, evidence and an optional number.
|
|
4
|
+
|
|
5
|
+
The "what we learned" section: 3–5 findings, each a numbered `h3` headline that states the conclusion, the evidence under it and optionally one number. The direction of the change comes from the sign of the `delta` you pass, and the ▲▼ mark and sign are always printed.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { DocKeyFindings } from "@squadbase/vantage/doc";
|
|
9
|
+
import type { DocKeyFindingsProps, DocFinding, DocFindingMetric } from "@squadbase/vantage/doc";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **one section to place directly under `<Document>`**. The document sets heading and body sizes and the width, so no dimensions are set here. `evidence` is a `string` or a `ReactNode`; Markdown strings are not parsed. The default heading "主要な発見" and the default comparison name "前期比" are Japanese; on an English page pass `title` and `comparisonLabel` in English. For the whole page, see [Document](page-types/doc).
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Default | Description |
|
|
18
|
+
| --- | --- | --- | --- |
|
|
19
|
+
| `title` | `string` | `"主要な発見"` | Section heading. |
|
|
20
|
+
| `headingLevel` | `2 \| 3` | `2` | Heading level: 2 directly under `<Document>`, 3 inside another section. |
|
|
21
|
+
| `findings` | `DocFinding[]` | | Findings (`{ headline: string; evidence: ReactNode; metric?: DocFindingMetric }`), 3–5, most important first. **Required.** |
|
|
22
|
+
| `findings[].metric` | `DocFindingMetric` | | One number to go with the finding, with the fields below. |
|
|
23
|
+
| `findings[].metric[].label` | `string` | | Name of the metric. |
|
|
24
|
+
| `findings[].metric[].value` | `number \| null` | | The value. `null` shows "—". |
|
|
25
|
+
| `findings[].metric[].format` | `ValueFormat` | | Format of `value` (`"currency"`, `{ type: "percent", digits: 1 }`, …). |
|
|
26
|
+
| `findings[].metric[].display` | `string` | | When given, shown instead of the formatted value ("about ¥54M"). |
|
|
27
|
+
| `findings[].metric[].delta` | `{ value: number; format?: ValueFormat }` | | The change itself (current − comparison). Direction comes from the sign; the ▲▼ mark and the sign are always printed. Omit for no comparison. Without `format`, the metric's `format` is used. |
|
|
28
|
+
| `findings[].metric[].comparisonLabel` | `string` | `"前期比"` | Name of the comparison (e.g. "前月比"). |
|
|
29
|
+
| `findings[].metric[].betterWhen` | `"up" \| "down"` | `"up"` | Which way is good. Use `"down"` for churn or cost. Colour only adds good / bad. |
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
import { Document, DocKeyFindings } from "@squadbase/vantage/doc";
|
|
35
|
+
|
|
36
|
+
<Document>
|
|
37
|
+
<DocKeyFindings
|
|
38
|
+
findings={[
|
|
39
|
+
{
|
|
40
|
+
headline: "新規契約は法人プランが牽引した",
|
|
41
|
+
evidence: "法人プランの新規が前月比 +20%(20 社 → 24 社)。個人プランは横ばいだった。",
|
|
42
|
+
metric: { label: "法人プランの新規", value: 24, format: { type: "number", unit: "社" }, delta: { value: 4 }, comparisonLabel: "前月比" },
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
headline: "解約は導入 3 か月以内に集中している",
|
|
46
|
+
evidence: "解約の 62% が導入から 3 か月以内で、オンボーディングが分かれ目になっている。",
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
headline: "紹介経由の契約は定着率が高い",
|
|
50
|
+
evidence: "紹介経由で入った契約の 6 か月継続率は 91% で、広告経由の 74% を上回った。",
|
|
51
|
+
},
|
|
52
|
+
]}
|
|
53
|
+
/>
|
|
54
|
+
</Document>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Notes
|
|
58
|
+
|
|
59
|
+
- Write `headline` as a sentence with a verdict, not a topic ("Churn is concentrated in business plans"). With `headingLevel={3}` the findings become `h4`.
|
|
60
|
+
- Keep the numbers in `evidence` consistent with the `metric` (`delta` is the change itself; no rate is computed for you).
|
|
61
|
+
- When printed, each finding stays on one page and does not break across pages.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# DocKpiScorecard
|
|
2
|
+
|
|
3
|
+
> Key metrics in one place — actual, change, gap to target and trend.
|
|
4
|
+
|
|
5
|
+
The key metrics in one section: actual, change from the previous period, achievement against target and a small trend. The default `table` prints well; `grid` shows 3–6 metrics as `dl` tiles. The block computes the direction from the sign of `delta` and the achievement rate from `value ÷ target`.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { DocKpiScorecard } from "@squadbase/vantage/doc";
|
|
9
|
+
import type { DocKpiScorecardProps, DocScorecardMetric } from "@squadbase/vantage/doc";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **one section to place directly under `<Document>`**. The document sets heading and body sizes and the width, so no dimensions are set here. `asOf` and `source` appear in one line under the block. The labels the block prints (the column headings "指標" / "実績" / "目標" / "達成率" / "推移", "達成率" and "目標" in tiles, "データ時点", "出典") are fixed in Japanese and cannot be overridden. Only `title` and `comparisonLabel` can be set, so pass them in English; their defaults ("主要指標", "前期比") are Japanese. For the whole page, see [Document](page-types/doc).
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Default | Description |
|
|
18
|
+
| --- | --- | --- | --- |
|
|
19
|
+
| `title` | `string` | `"主要指標"` | Heading text. |
|
|
20
|
+
| `headingLevel` | `2 \| 3` | `2` | Heading level: 2 directly under `<Document>`, 3 inside another section. |
|
|
21
|
+
| `metrics` | `DocScorecardMetric[]` | | Metrics. **Required.** |
|
|
22
|
+
| `metrics[].label` | `string` | | Name of the metric. |
|
|
23
|
+
| `metrics[].value` | `number \| null` | | The value. `null` shows "—". |
|
|
24
|
+
| `metrics[].format` | `ValueFormat` | | Format of `value` (`"currency"`, `{ type: "percent", digits: 1 }`, …). |
|
|
25
|
+
| `metrics[].display` | `string` | | When given, shown instead of the formatted value ("about ¥54M"). |
|
|
26
|
+
| `metrics[].delta` | `{ value: number; format?: ValueFormat }` | | The change itself (current − comparison). Direction comes from the sign; the ▲▼ mark and the sign are always printed. Omit for no comparison. Without `format`, the metric's `format` is used. |
|
|
27
|
+
| `metrics[].comparisonLabel` | `string` | `"前期比"` | Name of the comparison (e.g. "前月比"). |
|
|
28
|
+
| `metrics[].betterWhen` | `"up" \| "down"` | `"up"` | Which way is good. Use `"down"` for churn or cost. Colour only adds good / bad. |
|
|
29
|
+
| `metrics[].target` | `number` | | The target for the period, shown in the metric's `format`; the achievement rate (value ÷ target) is computed here. |
|
|
30
|
+
| `metrics[].trend` | `{ x: string; y: number }[]` | | One series over time, oldest first; the last point is the current value. Use the same unit as `value`. Omit and the cell shows "—"; with two or more points a `Sparkline` is drawn. |
|
|
31
|
+
| `variant` | `"table" \| "grid"` | `"table"` | Table or tiles. |
|
|
32
|
+
| `asOf` | `string` | | The date the numbers were taken, as a date only ("2026-10-03"). Shown as "データ時点 …" in a line under the block. |
|
|
33
|
+
| `source` | `string` | | Source. Shown as "出典: …" in a line under the block. |
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
import { Document, DocKpiScorecard } from "@squadbase/vantage/doc";
|
|
39
|
+
|
|
40
|
+
<Document>
|
|
41
|
+
<DocKpiScorecard
|
|
42
|
+
asOf="2026-10-03"
|
|
43
|
+
source="会計システム"
|
|
44
|
+
metrics={[
|
|
45
|
+
{
|
|
46
|
+
label: "売上",
|
|
47
|
+
value: 53_900_000,
|
|
48
|
+
format: "currency",
|
|
49
|
+
delta: { value: 3_700_000 },
|
|
50
|
+
comparisonLabel: "前月比",
|
|
51
|
+
target: 52_000_000,
|
|
52
|
+
trend: [
|
|
53
|
+
{ x: "5 月", y: 48_000_000 },
|
|
54
|
+
{ x: "6 月", y: 49_000_000 },
|
|
55
|
+
{ x: "7 月", y: 50_000_000 },
|
|
56
|
+
{ x: "8 月", y: 50_200_000 },
|
|
57
|
+
{ x: "9 月", y: 53_900_000 },
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
label: "解約率",
|
|
62
|
+
value: 0.018,
|
|
63
|
+
format: { type: "percent", digits: 1 },
|
|
64
|
+
delta: { value: -0.003, format: { type: "number", digits: 1, unit: "pt", divisor: 0.01 } },
|
|
65
|
+
comparisonLabel: "前月比",
|
|
66
|
+
betterWhen: "down",
|
|
67
|
+
target: 0.02,
|
|
68
|
+
},
|
|
69
|
+
{ label: "新規獲得", value: 38, format: { type: "number", unit: "社" }, delta: { value: -4 }, comparisonLabel: "前月比", target: 50 },
|
|
70
|
+
]}
|
|
71
|
+
/>
|
|
72
|
+
</Document>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Notes
|
|
76
|
+
|
|
77
|
+
- For churn or cost, where a fall is good, set `betterWhen: "down"`. A missing value shows "—".
|
|
78
|
+
- Give `target` and the `y` of `trend` in the same unit as `value` (yen if `value` is yen). `target` is shown in the metric's `format`.
|
|
79
|
+
- The heading of the comparison column in the table is the `comparisonLabel` of the first metric that has one, or "前期比" if none does. There is only one column, so use `variant="grid"` to give each metric its own comparison name.
|
|
80
|
+
- When printed, the `table` keeps each row on one page and the `grid` keeps each tile on one page.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# DocNotesAndSources
|
|
2
|
+
|
|
3
|
+
> The end matter of a document — notes, definitions of terms and data sources.
|
|
4
|
+
|
|
5
|
+
The section to put last in a document. It prints numbered notes, definitions of terms and the data sources (with their as-of dates). A part with nothing in it is not drawn; with all three empty nothing renders.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { DocNotesAndSources } from "@squadbase/vantage/doc";
|
|
9
|
+
import type { DocNotesAndSourcesProps, DocDefinition, DocSource } from "@squadbase/vantage/doc";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **one section placed directly under `<Document>`**. The document sets heading and body sizes and the width, so no dimensions are set here. Markdown strings are not parsed. For the whole page, see [Document](page-types/doc). The sub-headings ("注記", "用語の定義", "出典") and 「(データ時点 …)」 are fixed in Japanese.
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Default | Description |
|
|
18
|
+
| --- | --- | --- | --- |
|
|
19
|
+
| `title` | `string` | `"注記・出典"` | The section heading. |
|
|
20
|
+
| `headingLevel` | `2 \| 3` | `2` | Heading level: `2` directly under `<Document>`, `3` inside another section. The sub-headings go one level lower. |
|
|
21
|
+
| `notes` | `ReactNode[]` | | Notes, printed as a numbered list (provisional figures, exclusions). |
|
|
22
|
+
| `definitions` | `DocDefinition[]` | | Definitions of terms: `{ term: string; description: ReactNode }`. |
|
|
23
|
+
| `sources` | `DocSource[]` | | Data sources: `{ name: string; asOf?: string }`. `asOf` is a date only (e.g. `"2026-10-03"`), printed as 「(データ時点 2026-10-03)」. |
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
import { Document, DocNotesAndSources } from "@squadbase/vantage/doc";
|
|
29
|
+
|
|
30
|
+
<Document>
|
|
31
|
+
{/* …body sections… */}
|
|
32
|
+
<DocNotesAndSources
|
|
33
|
+
notes={["September figures are provisional; final values are posted on October 10.", "Refunds are excluded from revenue."]}
|
|
34
|
+
definitions={[{ term: "Churn rate", description: "Contracts cancelled in the month divided by contracts at the start of the month." }]}
|
|
35
|
+
sources={[{ name: "Contract DB", asOf: "2026-10-03" }, { name: "Accounting system" }]}
|
|
36
|
+
/>
|
|
37
|
+
</Document>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Notes
|
|
41
|
+
|
|
42
|
+
- Each part is kept together so it does not break across pages when printed.
|
|
43
|
+
- `asOf` is date only; the 「データ時点」 wording is added for you.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# DocReportHeader
|
|
2
|
+
|
|
3
|
+
> The opening of a document — title, subtitle, period, as-of, author and source.
|
|
4
|
+
|
|
5
|
+
The section that opens a document: an `h1` title and a short fact sheet (`dl`) of period, data as-of, author and source. It is the only block that owns the `h1`; the rest start at `h2`.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { DocReportHeader } from "@squadbase/vantage/doc";
|
|
9
|
+
import type { DocReportHeaderProps } from "@squadbase/vantage/doc";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **one section to place directly under `<Document>`**. The document sets heading and body sizes and the width, so no dimensions are set here. `subtitle` is a `string` or a `ReactNode`; Markdown strings are not parsed. The fact labels this block prints ("対象期間", "データ時点", "作成者", "出典") are fixed in Japanese and cannot be overridden, so an English page shows them in Japanese. For the whole page, see [Document](page-types/doc).
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| `title` | `string` | The document title (`h1`). State the subject and period, not a slogan. **Required.** |
|
|
20
|
+
| `subtitle` | `ReactNode` | One line under the title (who it is for, …). A `string` or a `ReactNode`. |
|
|
21
|
+
| `period` | `string` | The period the numbers cover ("2026 年 9 月", "2026-07-01 〜 2026-09-30"). |
|
|
22
|
+
| `asOf` | `string` | The date the data was taken, as a date only ("2026-10-03"). The block adds the label "データ時点". |
|
|
23
|
+
| `author` | `string` | Author. |
|
|
24
|
+
| `source` | `string` | Where the numbers come from ("受注管理システム、会計システム"), as one string. |
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
import { Document, DocReportHeader } from "@squadbase/vantage/doc";
|
|
30
|
+
|
|
31
|
+
<Document>
|
|
32
|
+
<DocReportHeader
|
|
33
|
+
title="2026 年 9 月 月次事業報告"
|
|
34
|
+
subtitle="経営会議向け"
|
|
35
|
+
period="2026-09-01 〜 2026-09-30"
|
|
36
|
+
asOf="2026-10-03"
|
|
37
|
+
author="事業企画チーム"
|
|
38
|
+
source="受注管理システム、会計システム"
|
|
39
|
+
/>
|
|
40
|
+
</Document>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Notes
|
|
44
|
+
|
|
45
|
+
- An empty fact is left out, row and all, instead of showing "—".
|
|
46
|
+
- When printed, the whole header stays on one page; it does not break across pages.
|
|
@@ -60,6 +60,21 @@ No `navLabel` is set, so the nav shows the same string. To change it, **rename t
|
|
|
60
60
|
prefix it with `_` to stop it routing and render it from a `.tsx` page with `FilePageView`, where a
|
|
61
61
|
`definePage` of your own applies.
|
|
62
62
|
|
|
63
|
+
## App display language
|
|
64
|
+
|
|
65
|
+
Export `lang` as a literal from the root `_layout.tsx` and it becomes `<html lang>`.
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
// src/_layout.tsx
|
|
69
|
+
export const lang = "ja"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
- The value is a BCP 47 language tag (`"ja"`, `"en"`, `"ja-JP"`, …). Variables and template interpolation are not read.
|
|
73
|
+
- Only the root `_layout.tsx` is read. A `lang` in a nested layout or a page is ignored.
|
|
74
|
+
- A missing or malformed value falls back to `"en"` (malformed values raise a diagnostic). Apps that specify nothing produce the same output as before.
|
|
75
|
+
- With `ja`, Japanese text in slides and doc pages no longer breaks mid-phrase (`word-break: auto-phrase`), and the slide toolbar messages switch to Japanese.
|
|
76
|
+
- In dev, editing `lang` reloads the page automatically.
|
|
77
|
+
|
|
63
78
|
## Relationship to Fast Refresh
|
|
64
79
|
|
|
65
80
|
Even with a non-component export like `page`, Vantage handles it internally so React Fast Refresh
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# AreaChart
|
|
2
|
+
|
|
3
|
+
> A typed area chart for trends over time. Pass rows, the x-axis column and the series columns.
|
|
4
|
+
|
|
5
|
+
Draws a trend as filled areas. Instead of building an ECharts option, pass **the rows (`data`), the
|
|
6
|
+
x-axis column (`index`) and the series columns (`categories`)**; the legend, tooltip and axis
|
|
7
|
+
formats come with it. Colours follow the `--chart-1` … `--chart-5` tokens in fixed order and track
|
|
8
|
+
light / dark. Under the hood it is an [`EChart`](parts/echart) inside a chart frame
|
|
9
|
+
(title, summary, loading skeleton, empty state). The value axis always starts at 0.
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import { AreaChart } from "@squadbase/vantage/components";
|
|
13
|
+
import type { AreaChartProps, ChartEventPayload } from "@squadbase/vantage/components";
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
| Prop | Type | Default | Description |
|
|
17
|
+
| --- | --- | --- | --- |
|
|
18
|
+
| `data` | `Record<string, unknown>[]` | | An array of rows. **Required.** One row is one x-axis point. Numeric columns are a number or a numeric string (such as a SQL DECIMAL); anything else counts as a gap. |
|
|
19
|
+
| `index` | `string` | | The column used for the x axis. **Required.** |
|
|
20
|
+
| `categories` | `string[]` | | The columns drawn as series. **Required.** Their order is the legend and colour order. Six or more fold into the five largest by total plus an Other series. |
|
|
21
|
+
| `areaOptions` | `AreaChartOptions` | | Area-specific settings: `{ type, curveType, fill, connectNulls }`. **Prefer this.** Takes precedence over the deprecated flat props of the same name. See below. |
|
|
22
|
+
| `forecast` | `ChartForecast` | | A forecast continuing one series: `{ data, category?, label? }`. `data` rows share the `index` key and carry the predicted value and an optional range. Always drawn as a dashed, lighter line. |
|
|
23
|
+
| `comparison` | `ChartComparison` | | Turns one of `categories` into a comparison line (prior year, plan…): `{ category, vs: "prior-period" \| "prior-year" \| "target" \| "custom", label? }`. Drawn as a thin grey line with no fill; the tooltip adds the main series' difference from it. `label` is required for `custom`. |
|
|
24
|
+
| `colors` | `ChartColors` | `["chart-1", …, "chart-5"]` | Series colours: `"chart-1"` … `"chart-5"` or a semantic tone (`"positive"` / `"warning"` / `"negative"` / `"neutral"`). An array follows series order; a record is keyed by series name. |
|
|
25
|
+
| `labels` | `Record<string, string>` | | Maps `index` values and series names to display names (axes, legend, tooltip, data table). |
|
|
26
|
+
| `format` | `ValueFormat` | `"compact"` | Number format: `"compact"` / `"number"` / `"currency"` / `"percent"` / `"multiple"` / `"duration"`, or `{ type, digits, currency, notation, unit, divisor, durationUnit }`. Same values as the KPI components. Axes use a short form; the tooltip uses the same format. |
|
|
27
|
+
| `valueFormatter` | `(value: number) => string` | | A function escape hatch for the format. Takes precedence over `format`; kept for compatibility. |
|
|
28
|
+
| `title` | `string` | | The chart heading. It labels the plot area for screen readers. |
|
|
29
|
+
| `summary` | `string \| "auto"` | | A one-sentence summary shown under the title and used as the plot's `aria-describedby`. `"auto"` builds one from `data`. Omitted means no summary. |
|
|
30
|
+
| `isLoading` | `boolean` | | Show a skeleton shaped like the final chart, at the same height. |
|
|
31
|
+
| `emptyState` | `ChartEmptyState` | | What to show when `data` is empty: `{ title?, description?, action? }`. The frame keeps its height. `action` takes one node, such as a button. |
|
|
32
|
+
| `height` | `number \| string` | `288` | Plot-area height in px. A CSS length string is accepted for compatibility only and is deprecated; pass a number. |
|
|
33
|
+
| `actions` | `boolean \| { includeTitle?: boolean }` | `false` | Show PNG save / copy buttons at the top right on hover. The PNG includes the title and summary unless you pass `{ includeTitle: false }`. |
|
|
34
|
+
| `fileName` | `string` | `"chart.png"` | File name for the saved PNG. Use with `actions`. |
|
|
35
|
+
| `chartOptions` | `EChartsOption` | | An escape hatch deep-merged last into the generated ECharts option. |
|
|
36
|
+
| `highlight` | `"auto" \| "none"` | `"auto"` | Label the max and latest value (first series only, two series or fewer). For `percent` stacking it labels the first and latest share of the bottom band. |
|
|
37
|
+
| `provisionalFrom` | `string \| number` | | An `index` value; points from here on are provisional and drawn lighter or dashed. Distinct from `forecast`. |
|
|
38
|
+
| `provisionalLabel` | `string` | | Name of the provisional range in legend and tooltip. |
|
|
39
|
+
| `target` | `number` | | A target value, drawn as a dotted horizontal line. The value axis always includes it. |
|
|
40
|
+
| `targetLabel` | `string` | | Label for the target line. |
|
|
41
|
+
| `annotations` | `ChartAnnotation[]` | | Notes at given positions: `{ at, label, to? }`. `at` / `to` are `index` values; with `to` it becomes a band, otherwise a vertical line. |
|
|
42
|
+
| `showLegend` | `boolean` | `true` | Show the legend. |
|
|
43
|
+
| `showTooltip` | `boolean` | `true` | Show the tooltip on hover. |
|
|
44
|
+
| `showGridLines` | `boolean` | `true` | Grid lines on the value axis. |
|
|
45
|
+
| `showXAxis` | `boolean` | `true` | Show the x axis. |
|
|
46
|
+
| `showYAxis` | `boolean` | `true` | Show the y axis. |
|
|
47
|
+
| `startEndOnly` | `boolean` | `false` | Label only the first and last x-axis ticks. |
|
|
48
|
+
| `yAxisWidth` | `number` | | Width of the y-axis labels (px). Fix it to align plot areas across stacked charts. |
|
|
49
|
+
| `minValue` | `number` | | Lower bound of the value axis. Area charts always start at 0, so only values of 0 or below take effect (room under negative values). |
|
|
50
|
+
| `maxValue` | `number` | | Upper bound of the value axis. The axis widens if the data exceeds it. Pass the same value to charts you compare side by side. |
|
|
51
|
+
| `allowDecimals` | `boolean` | `true` | `false` limits ticks to integers. |
|
|
52
|
+
| `xAxisLabel` | `string` | | Name of the x axis. |
|
|
53
|
+
| `yAxisLabel` | `string` | | Name of the y axis. |
|
|
54
|
+
| `onValueChange` | `(value: ChartEventPayload \| null) => void` | | Called on a click. Receives the clicked row plus `eventType` and `categoryClicked` (the series name); clicking the same point again passes `null`. When set, everything but the selection dims. |
|
|
55
|
+
| `ariaLabel` | `string` | | Screen-reader label for the plot area when there is no `title`. |
|
|
56
|
+
| `className` | `string` | | Classes to add (to the outer `<figure>`). |
|
|
57
|
+
| `type` | `"default" \| "stacked" \| "percent"` | | **Deprecated.** Use `areaOptions.type`. |
|
|
58
|
+
| `curveType` | `"linear" \| "smooth" \| "step"` | | **Deprecated.** Use `areaOptions.curveType`. |
|
|
59
|
+
| `fill` | `"gradient" \| "solid" \| "none"` | | **Deprecated.** Use `areaOptions.fill`. |
|
|
60
|
+
| `connectNulls` | `boolean` | | **Deprecated.** Use `areaOptions.connectNulls`. |
|
|
61
|
+
| `loading` | `boolean` | | **Deprecated.** Use `isLoading`. |
|
|
62
|
+
|
|
63
|
+
## areaOptions
|
|
64
|
+
|
|
65
|
+
| Prop | Type | Default | Description |
|
|
66
|
+
| --- | --- | --- | --- |
|
|
67
|
+
| `type` | `"default" \| "stacked" \| "percent"` | `"default"` | `stacked` stacks the series; `percent` stacks them as shares of each point's total (the tooltip still shows the original values). |
|
|
68
|
+
| `curveType` | `"linear" \| "smooth" \| "step"` | `"linear"` | The line shape. |
|
|
69
|
+
| `fill` | `"gradient" \| "solid" \| "none"` | `"gradient"` | How the area is filled. |
|
|
70
|
+
| `connectNulls` | `boolean` | `false` | Join the line across gaps (`null` values). |
|
|
71
|
+
|
|
72
|
+
> [!WARNING]
|
|
73
|
+
> The flat `type`, `curveType`, `fill` and `connectNulls` props still work but are **deprecated**. Use
|
|
74
|
+
> `areaOptions`; when both are given, `areaOptions` wins.
|
|
75
|
+
|
|
76
|
+
## Showing a change in composition
|
|
77
|
+
|
|
78
|
+
`areaOptions.type: "percent"` stacks each point to 100%. The value axis is fixed to 0–100%, and the
|
|
79
|
+
tooltip shows the **original values**.
|
|
80
|
+
|
|
81
|
+
```tsx
|
|
82
|
+
<AreaChart
|
|
83
|
+
data={rows}
|
|
84
|
+
index="month"
|
|
85
|
+
categories={["Online", "Store"]}
|
|
86
|
+
areaOptions={{ type: "percent" }}
|
|
87
|
+
/>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
> [!NOTE]
|
|
91
|
+
> `colors` are not Tailwind classes but **colour values** (the chart is drawn on a canvas). Token
|
|
92
|
+
> names such as `"chart-2"` follow light / dark. Axis, legend and tooltip colours always come from the
|
|
93
|
+
> theme.
|
|
94
|
+
|
|
95
|
+
## AreaChart or EChart
|
|
96
|
+
|
|
97
|
+
Start with this typed chart. Reach for [`EChart`](parts/echart) only for what these
|
|
98
|
+
props cannot express — dual axes, scatter plots, heatmaps. Small tweaks can go through
|
|
99
|
+
`chartOptions`.
|