@squadbase/vantage 0.6.2-dev1.b332e5a → 0.6.2-dev1.bcb51d1
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-TVKFIVFQ.js → build-U7GO26HR.js} +9 -9
- package/dist/{build-TVKFIVFQ.js.map → build-U7GO26HR.js.map} +1 -1
- package/dist/{check-3KHZXZMQ.js → check-MRVAIHG5.js} +7 -7
- package/dist/{check-3KHZXZMQ.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-5ZOP4SQR.js → chunk-2N72FKLB.js} +12 -7
- package/dist/chunk-2N72FKLB.js.map +1 -0
- package/dist/chunk-57GHR5LN.js +163 -0
- package/dist/chunk-57GHR5LN.js.map +1 -0
- package/dist/chunk-6OTTGAPO.js +44 -0
- package/dist/chunk-6OTTGAPO.js.map +1 -0
- package/dist/{chunk-RPZAALCX.js → chunk-7S52M2SL.js} +256 -165
- package/dist/chunk-7S52M2SL.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-QI3XQKHS.js → chunk-GNXCX4WE.js} +10 -3
- package/dist/chunk-GNXCX4WE.js.map +1 -0
- package/dist/chunk-JXFCSF3K.js +673 -0
- package/dist/chunk-JXFCSF3K.js.map +1 -0
- package/dist/{chunk-PXRX5PEC.js → chunk-PDOBHMUQ.js} +3 -3
- package/dist/chunk-PDOBHMUQ.js.map +1 -0
- package/dist/{chunk-P7W4LR3Z.js → chunk-PJ4SPXHS.js} +24 -7
- package/dist/chunk-PJ4SPXHS.js.map +1 -0
- package/dist/chunk-QOXXOFGL.js +7051 -0
- package/dist/chunk-QOXXOFGL.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-CEXAQQ5W.js → chunk-S5MDTHH7.js} +180 -18
- 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-LMUACBMA.js → chunk-SHZM3EXB.js} +68 -12
- package/dist/chunk-SHZM3EXB.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-JKLLFVEU.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 +1740 -29
- package/dist/components/index.js +7 -4
- package/dist/delta-text-CvwBGJ95.d.ts +15 -0
- package/dist/{dev-GDKATCC7.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 +309 -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-WQXPXP6K.js → doctor-YD3XAAOT.js} +7 -7
- package/dist/{doctor-WQXPXP6K.js.map → doctor-YD3XAAOT.js.map} +1 -1
- package/dist/format-U0cQl069.d.ts +243 -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-MWBWWOJ2.js → routes-PVKNT777.js} +6 -6
- package/dist/{routes-MWBWWOJ2.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 +974 -4
- 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-HCANX4GQ.js → upgrade-6DT7ADRP.js} +7 -7
- package/dist/{upgrade-HCANX4GQ.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 +33 -23
- 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 +287 -0
- package/registry/ui/area-chart.tsx +3701 -0
- package/registry/ui/attention-list.tsx +303 -0
- package/registry/ui/avatar.tsx +110 -0
- package/registry/ui/badge.tsx +56 -0
- package/registry/ui/bar-chart.tsx +3698 -0
- package/registry/ui/bar-list.tsx +3743 -0
- package/registry/ui/box-plot-chart.tsx +3906 -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 +1290 -0
- package/registry/ui/chart-frame.tsx +1393 -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 +693 -146
- package/registry/ui/date-range-picker.tsx +390 -0
- package/registry/ui/delta.tsx +191 -0
- package/registry/ui/dialog.tsx +161 -0
- package/registry/ui/donut-chart.tsx +3751 -0
- package/registry/ui/drawer.tsx +229 -0
- package/registry/ui/dropdown-menu.tsx +274 -0
- package/registry/ui/echart.tsx +1040 -0
- package/registry/ui/field.tsx +240 -0
- package/registry/ui/filter-bar.tsx +392 -0
- package/registry/ui/funnel-steps.tsx +3569 -0
- package/registry/ui/heatmap.tsx +1786 -0
- package/registry/ui/histogram-chart.tsx +3986 -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 +704 -0
- package/registry/ui/label.tsx +22 -0
- package/registry/ui/legend.tsx +3563 -0
- package/registry/ui/line-chart.tsx +3699 -0
- package/registry/ui/metric-value.tsx +62 -0
- package/registry/ui/multi-select.tsx +232 -0
- package/registry/ui/page-shell.tsx +282 -0
- package/registry/ui/pagination.tsx +140 -0
- package/registry/ui/paired-chart.tsx +3827 -0
- package/registry/ui/placeholder.tsx +36 -0
- package/registry/ui/popover.tsx +92 -0
- package/registry/ui/progress-circle.tsx +867 -0
- package/registry/ui/progress.tsx +85 -0
- package/registry/ui/radio-group.tsx +39 -0
- package/registry/ui/sample-data.tsx +86 -0
- package/registry/ui/scatter-chart.tsx +4212 -0
- package/registry/ui/scroll-area.tsx +56 -0
- package/registry/ui/searchable-select.tsx +214 -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 +90 -0
- package/registry/ui/status-badge.tsx +121 -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 +849 -0
- package/registry/ui/trend-indicator.tsx +74 -0
- package/registry/ui/updated-at.tsx +122 -0
- package/registry/ui/waterfall-chart.tsx +4248 -0
- package/skills/vantage-add-feature/SKILL.md +9 -7
- package/skills/vantage-design/SKILL.md +60 -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 +54 -36
- package/templates/AGENTS.md +53 -16
- package/templates/agents/csv.md +2 -1
- package/templates/agents/doc.md +52 -3
- package/templates/agents/page.md +53 -8
- package/templates/agents/slide.md +77 -3
- package/templates/agents/xlsx.md +2 -1
- package/theme.css +247 -138
- package/dist/add-DY4AXANK.js +0 -6
- package/dist/add-DY4AXANK.js.map +0 -1
- package/dist/chunk-5ZOP4SQR.js.map +0 -1
- package/dist/chunk-A2UUGASH.js.map +0 -1
- package/dist/chunk-CEXAQQ5W.js.map +0 -1
- package/dist/chunk-DTDVSFRY.js +0 -29
- package/dist/chunk-DTDVSFRY.js.map +0 -1
- package/dist/chunk-JKLLFVEU.js.map +0 -1
- package/dist/chunk-LMUACBMA.js.map +0 -1
- package/dist/chunk-NKFBFDRZ.js +0 -2241
- package/dist/chunk-NKFBFDRZ.js.map +0 -1
- package/dist/chunk-P7W4LR3Z.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-VA776YE5.js +0 -316
- package/dist/chunk-VA776YE5.js.map +0 -1
- package/dist/dev-GDKATCC7.js.map +0 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Field
|
|
2
|
+
|
|
3
|
+
> A form layout part that binds a label, description and error to an input.
|
|
4
|
+
|
|
5
|
+
Lays out one input's label, helper text and error message with fixed spacing and direction. Put the
|
|
6
|
+
input itself, such as [`Input`](ui/input) or [`Switch`](ui/switch),
|
|
7
|
+
inside it.
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import {
|
|
11
|
+
Field,
|
|
12
|
+
FieldLabel,
|
|
13
|
+
FieldDescription,
|
|
14
|
+
FieldError,
|
|
15
|
+
FieldContent,
|
|
16
|
+
FieldTitle,
|
|
17
|
+
FieldGroup,
|
|
18
|
+
FieldSet,
|
|
19
|
+
FieldLegend,
|
|
20
|
+
FieldSeparator,
|
|
21
|
+
} from "@squadbase/vantage/ui";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Parts
|
|
25
|
+
|
|
26
|
+
| Part | Role |
|
|
27
|
+
| --- | --- |
|
|
28
|
+
| `Field` | The frame for one input. `orientation` picks the layout |
|
|
29
|
+
| `FieldLabel` | The label (uses `Label`). Tie it to the input with `htmlFor` |
|
|
30
|
+
| `FieldDescription` | Helper text |
|
|
31
|
+
| `FieldError` | The error. Pass `children` or `errors` (`{ message }[]`). Renders nothing when empty |
|
|
32
|
+
| `FieldContent` | A column that groups the label and description in a horizontal layout |
|
|
33
|
+
| `FieldTitle` | A heading that is not a `<label>` |
|
|
34
|
+
| `FieldGroup` | Stacks several `Field`s vertically |
|
|
35
|
+
| `FieldSet` / `FieldLegend` | `<fieldset>` / `<legend>`. `FieldLegend` takes `variant` (`"legend"` by default, or `"label"` for smaller text) |
|
|
36
|
+
| `FieldSeparator` | A divider line. You can put text in the middle |
|
|
37
|
+
|
|
38
|
+
| Prop | Type | Default | Description |
|
|
39
|
+
| --- | --- | --- | --- |
|
|
40
|
+
| `orientation` | `"vertical" \| "horizontal" \| "responsive"` | `"vertical"` | Passed to `Field`. `responsive` goes horizontal only when the container is wide. |
|
|
41
|
+
| `data-invalid` | `boolean` | | Set on `Field` to turn the label and description the error colour. Also put `aria-invalid` on the input. |
|
|
42
|
+
| `errors` | `Array<{ message?: string } \| undefined>` | | Passed to `FieldError`. Several are shown as a bulleted list, and duplicates are merged into one. |
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Hover Card
|
|
2
|
+
|
|
3
|
+
> A preview card that appears when you hover a link.
|
|
4
|
+
|
|
5
|
+
Shows supplementary content in a card when the pointer rests on a link or term (or when it receives
|
|
6
|
+
keyboard focus). Meant for **read-only** information such as a metric definition or a user profile.
|
|
7
|
+
For anything interactive use [`Popover`](ui/popover); for a short phrase use
|
|
8
|
+
[`Tooltip`](ui/tooltip). Built on Base UI's `PreviewCard`.
|
|
9
|
+
|
|
10
|
+
```tsx
|
|
11
|
+
import { HoverCard, HoverCardTrigger, HoverCardContent } from "@squadbase/vantage/ui";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
`HoverCardTrigger` renders an `<a>` by default. Pass `render` to use another element.
|
|
15
|
+
|
|
16
|
+
| Prop | Type | Default | Description |
|
|
17
|
+
| --- | --- | --- | --- |
|
|
18
|
+
| `side` | `"top" \| "right" \| "bottom" \| "left"` | `"bottom"` | Passed to `HoverCardContent`. Which side of the trigger it appears on. |
|
|
19
|
+
| `align` | `"start" \| "center" \| "end"` | `"center"` | Passed to `HoverCardContent`. |
|
|
20
|
+
| `sideOffset` | `number` | `4` | Distance in px between `HoverCardContent` and the trigger. |
|
|
21
|
+
| `delay` | `number` | `600` | Passed to `HoverCardTrigger`. Milliseconds before it opens. |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Kbd
|
|
2
|
+
|
|
3
|
+
> A keyboard key.
|
|
4
|
+
|
|
5
|
+
A small part for showing shortcut keys. Line several keys up with `KbdGroup`.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { Kbd, KbdGroup } from "@squadbase/vantage/ui";
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Description |
|
|
12
|
+
| --- | --- | --- |
|
|
13
|
+
| `Kbd` | `ComponentProps<"kbd">` | A single key. |
|
|
14
|
+
| `KbdGroup` | `ComponentProps<"div">` | Lays the keys out side by side. |
|
|
15
|
+
|
|
16
|
+
Placed inside a button or a [`Tooltip`](ui/tooltip), it blends in with the
|
|
17
|
+
surrounding text colour.
|
package/docs/en/ui/loading.md
CHANGED
|
@@ -12,7 +12,7 @@ import { Loading } from "@squadbase/vantage/ui";
|
|
|
12
12
|
|
|
13
13
|
| Prop | Type | Default | Description |
|
|
14
14
|
| --- | --- | --- | --- |
|
|
15
|
-
| `label` | `string` | `"
|
|
15
|
+
| `label` | `string` | `"読み込んでいます…"` | Text shown next to the spinner. |
|
|
16
16
|
| `className` | `string` | | Classes to add. By default it centres within a 30vh minimum height. |
|
|
17
17
|
|
|
18
18
|
To hold the layout while waiting use [`Skeleton`](ui/skeleton); in tight spots such
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Pagination
|
|
2
|
+
|
|
3
|
+
> A row of page links.
|
|
4
|
+
|
|
5
|
+
Page navigation for a list split into pages. It is purely visual and holds neither the current page
|
|
6
|
+
nor the total — the caller owns that state (URL search params or `useState`).
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import {
|
|
10
|
+
Pagination,
|
|
11
|
+
PaginationContent,
|
|
12
|
+
PaginationItem,
|
|
13
|
+
PaginationLink,
|
|
14
|
+
PaginationPrevious,
|
|
15
|
+
PaginationNext,
|
|
16
|
+
PaginationEllipsis,
|
|
17
|
+
} from "@squadbase/vantage/ui";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Parts
|
|
21
|
+
|
|
22
|
+
| Part | Role |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| `Pagination` | The `<nav>`, with `aria-label="pagination"` |
|
|
25
|
+
| `PaginationContent` / `PaginationItem` | The `<ul>` / `<li>` |
|
|
26
|
+
| `PaginationLink` | One page's `<a>`. `isActive` marks the current page |
|
|
27
|
+
| `PaginationPrevious` / `PaginationNext` | The `<a>` to the previous / next page. `text` changes the wording |
|
|
28
|
+
| `PaginationEllipsis` | The ellipsis |
|
|
29
|
+
|
|
30
|
+
| Prop | Type | Default | Description |
|
|
31
|
+
| --- | --- | --- | --- |
|
|
32
|
+
| `isActive` | `boolean` | | Passed to `PaginationLink`. Sets `aria-current="page"` and an outlined look. |
|
|
33
|
+
| `text` | `string` | `"Previous" / "Next"` | Label of `PaginationPrevious` / `PaginationNext` (hidden below 640px). |
|
|
34
|
+
|
|
35
|
+
The links are plain `<a>` elements, so passing `href` navigates as usual. To change only in-page
|
|
36
|
+
state, call `preventDefault()` in `onClick`.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Radio Group
|
|
2
|
+
|
|
3
|
+
> Radio buttons for choosing one of a few options.
|
|
4
|
+
|
|
5
|
+
An input that keeps every option visible and lets the user pick one. With many options consider
|
|
6
|
+
[`Select`](ui/select); to switch with side-by-side buttons consider
|
|
7
|
+
[`SegmentedControl`](parts/segmented-control).
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { RadioGroup, RadioGroupItem } from "@squadbase/vantage/ui";
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
`RadioGroupItem` has no label of its own. Give it an `id` and tie it to a
|
|
14
|
+
[`Label`](ui/label) through `htmlFor`.
|
|
15
|
+
|
|
16
|
+
| Prop | Type | Description |
|
|
17
|
+
| --- | --- | --- |
|
|
18
|
+
| `value` | `unknown` | The selected value of `RadioGroup` (controlled). |
|
|
19
|
+
| `defaultValue` | `unknown` | The initial value of `RadioGroup` (uncontrolled). |
|
|
20
|
+
| `onValueChange` | `(value: unknown) => void` | Passed to `RadioGroup`. Receives the `value` of the chosen `RadioGroupItem`. |
|
|
21
|
+
| `disabled` | `boolean` | Disables the whole group, or a single item. |
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Toast
|
|
2
|
+
|
|
3
|
+
> A transient notification in the corner of the screen.
|
|
4
|
+
|
|
5
|
+
A short notice about the result of an action, such as a save succeeding or failing. Built on Base
|
|
6
|
+
UI's `Toast`; it does not depend on `sonner`.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { Toaster, toast } from "@squadbase/vantage/ui";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
**Wrap the app root in `Toaster` once**, then call `toast.add()` from anywhere. `Toaster` renders
|
|
15
|
+
its children and adds a stack for notifications at the bottom right (bottom centre on mobile).
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
<Toaster>
|
|
19
|
+
<App />
|
|
20
|
+
</Toaster>;
|
|
21
|
+
|
|
22
|
+
toast.add({ title: "レポートを保存しました", type: "success" });
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
`toast` is a manager created once per module, with `add` / `close` / `update` / `promise`.
|
|
26
|
+
|
|
27
|
+
| Prop | Type | Default | Description |
|
|
28
|
+
| --- | --- | --- | --- |
|
|
29
|
+
| `title` | `ReactNode` | | The heading. |
|
|
30
|
+
| `description` | `ReactNode` | | The body. |
|
|
31
|
+
| `type` | `"success" \| "info" \| "warning" \| "error" \| "loading" \| string` | | Picks the icon shown on the left. No icon if omitted. |
|
|
32
|
+
| `timeout` | `number` | `5000` | Milliseconds until it closes itself. `0` keeps it open. |
|
|
33
|
+
| `actionProps` | `ButtonProps` | | Shows an action button when given (`children` is the label, `onClick` the handler). |
|
|
34
|
+
|
|
35
|
+
`toast.add()` returns an ID. Replace the contents with `toast.update(id, {...})` and close it with
|
|
36
|
+
`toast.close(id)`. For async work use `toast.promise(promise, { loading, success, error })`.
|
|
37
|
+
|
|
38
|
+
> [!NOTE]
|
|
39
|
+
> The call style differs from shadcn/ui's `sonner` version (`toast("…")` / `toast.success("…")`).
|
|
40
|
+
> This has the same API as shadcn/ui's Base UI `toast`. When you need a separate manager outside
|
|
41
|
+
> `Toaster`, create one with `createToastManager()` and pass it as `<Toaster toastManager={manager}>`.
|
|
42
|
+
> You can also recompose the parts (`Toast` / `ToastTitle` / `ToastDescription` / `ToastAction` /
|
|
43
|
+
> `ToastClose` / `ToastViewport` / `ToastPortal` / `ToastProvider`, `useToastManager`) into your own
|
|
44
|
+
> layout.
|
|
@@ -14,13 +14,14 @@ import { ToggleGroup, ToggleGroupItem } from "@squadbase/vantage/ui";
|
|
|
14
14
|
| --- | --- | --- | --- |
|
|
15
15
|
| `value` | `string[]` | | The selected values — **an array even for single choice**. |
|
|
16
16
|
| `onValueChange` | `(value: string[]) => void` | | Fired on change, with an array. |
|
|
17
|
-
| `
|
|
17
|
+
| `multiple` | `boolean` | `false` | `true` allows more than one selection. |
|
|
18
18
|
| `variant` | `"default" \| "outline"` | `"default"` | |
|
|
19
19
|
| `size` | `"default" \| "sm" \| "lg"` | `"default"` | |
|
|
20
20
|
| `spacing` | `number` | `2` | Gap between items; `0` welds them into one band. |
|
|
21
21
|
| `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | |
|
|
22
22
|
|
|
23
23
|
> [!WARNING]
|
|
24
|
-
> There is no Radix-style `type="single"` / `type="multiple"`.
|
|
25
|
-
>
|
|
24
|
+
> There is no Radix-style `type="single"` / `type="multiple"`. Instead there is a boolean `multiple`;
|
|
25
|
+
> by default (`false`) only one item can be pressed at a time. Even then `value` is an array of at
|
|
26
|
+
> most one element. [`SegmentedControl`](parts/segmented-control) already handles
|
|
26
27
|
> that, so prefer it when you want single choice.
|
|
@@ -36,7 +36,7 @@ In `/ui` (a selection): `Button`, `Card`, the `Table` primitives, `Tabs`, `Input
|
|
|
36
36
|
`DropdownMenu`, `Sidebar`, `Alert` / `Skeleton` / `Spinner`, `Loading` / `Empty` / `ErrorState`.
|
|
37
37
|
|
|
38
38
|
In `/components` (a selection): `PageShell`, `AppShell`, `DashboardCard`, `DataTable`, `EChart`,
|
|
39
|
-
`FunnelSteps`, `FilterBar`, `DateRangePicker`, `
|
|
39
|
+
`FunnelSteps`, `FilterBar`, `DateRangePicker`, `KpiCard`, `Delta`.
|
|
40
40
|
|
|
41
41
|
Props and usage for every component live in the [Components](components) tab.
|
|
42
42
|
|