@squadbase/vantage 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -4
- package/dist/chunk-A2UUGASH.js +12 -0
- package/dist/chunk-A2UUGASH.js.map +1 -0
- package/dist/{chunk-ZGDU5YLH.js → chunk-PRFBSQA4.js} +9 -5
- package/dist/chunk-PRFBSQA4.js.map +1 -0
- package/dist/chunk-WQZYXXQW.js +2249 -0
- package/dist/chunk-WQZYXXQW.js.map +1 -0
- package/dist/{chunk-73J5ZD4C.js → chunk-YLAB6UQS.js} +17 -3
- package/dist/chunk-YLAB6UQS.js.map +1 -0
- package/dist/cli.js +607 -36
- package/dist/cli.js.map +1 -1
- package/dist/components/index.d.ts +554 -0
- package/dist/components/index.js +1983 -0
- package/dist/components/index.js.map +1 -0
- package/dist/markdown/index.d.ts +9 -0
- package/dist/markdown/index.js +26 -0
- package/dist/markdown/index.js.map +1 -0
- package/dist/query/index.d.ts +27 -1
- package/dist/query/index.js +18 -0
- package/dist/query/index.js.map +1 -1
- package/dist/server/node.js +6 -1
- package/dist/server/node.js.map +1 -1
- package/dist/ui/index.d.ts +316 -200
- package/dist/ui/index.js +566 -511
- package/dist/ui/index.js.map +1 -1
- package/dist/vite/index.js +2 -2
- package/docs/en/agent-skills.md +89 -0
- package/docs/en/api-and-server.md +84 -0
- package/docs/en/build-and-deploy.md +280 -0
- package/docs/en/cli-reference.md +311 -0
- package/docs/en/components.md +233 -0
- package/docs/en/data-fetching.md +78 -0
- package/docs/en/environment-variables.md +69 -0
- package/docs/en/getting-started.md +95 -0
- package/docs/en/index.md +65 -0
- package/docs/en/markdown/markdown-renderer.md +44 -0
- package/docs/en/pages-and-metadata.md +56 -0
- package/docs/en/parts/app-shell.md +54 -0
- package/docs/en/parts/dashboard-card.md +64 -0
- package/docs/en/parts/data-table.md +86 -0
- package/docs/en/parts/date-range-picker.md +41 -0
- package/docs/en/parts/echart.md +53 -0
- package/docs/en/parts/filter-bar.md +66 -0
- package/docs/en/parts/funnel-steps.md +33 -0
- package/docs/en/parts/metric-value.md +23 -0
- package/docs/en/parts/multi-select.md +27 -0
- package/docs/en/parts/page-shell.md +45 -0
- package/docs/en/parts/searchable-select.md +47 -0
- package/docs/en/parts/section-header.md +20 -0
- package/docs/en/parts/segmented-control.md +25 -0
- package/docs/en/parts/status-badge.md +44 -0
- package/docs/en/parts/trend-indicator.md +26 -0
- package/docs/en/routing.md +95 -0
- package/docs/en/ui/accordion.md +36 -0
- package/docs/en/ui/alert.md +31 -0
- package/docs/en/ui/badge.md +23 -0
- package/docs/en/ui/breadcrumb.md +38 -0
- package/docs/en/ui/button.md +39 -0
- package/docs/en/ui/calendar.md +28 -0
- package/docs/en/ui/card.md +35 -0
- package/docs/en/ui/checkbox.md +34 -0
- package/docs/en/ui/cn.md +34 -0
- package/docs/en/ui/collapsible.md +21 -0
- package/docs/en/ui/command.md +37 -0
- package/docs/en/ui/dialog.md +52 -0
- package/docs/en/ui/dropdown-menu.md +50 -0
- package/docs/en/ui/empty.md +22 -0
- package/docs/en/ui/error-state.md +50 -0
- package/docs/en/ui/input-group.md +30 -0
- package/docs/en/ui/input.md +28 -0
- package/docs/en/ui/label.md +19 -0
- package/docs/en/ui/loading.md +19 -0
- package/docs/en/ui/popover.md +34 -0
- package/docs/en/ui/progress.md +28 -0
- package/docs/en/ui/scroll-area.md +23 -0
- package/docs/en/ui/select.md +63 -0
- package/docs/en/ui/separator.md +15 -0
- package/docs/en/ui/sheet.md +28 -0
- package/docs/en/ui/sidebar.md +92 -0
- package/docs/en/ui/skeleton.md +16 -0
- package/docs/en/ui/slider.md +21 -0
- package/docs/en/ui/spinner.md +14 -0
- package/docs/en/ui/switch.md +19 -0
- package/docs/en/ui/table.md +24 -0
- package/docs/en/ui/tabs.md +23 -0
- package/docs/en/ui/textarea.md +15 -0
- package/docs/en/ui/toggle-group.md +26 -0
- package/docs/en/ui/toggle.md +19 -0
- package/docs/en/ui/tooltip.md +22 -0
- package/docs/en/ui/use-is-mobile.md +18 -0
- package/docs/en/ui-and-theming.md +95 -0
- package/docs/index.json +1306 -0
- package/docs/ja/agent-skills.md +87 -0
- package/docs/ja/api-and-server.md +84 -0
- package/docs/ja/build-and-deploy.md +279 -0
- package/docs/ja/cli-reference.md +305 -0
- package/docs/ja/components.md +229 -0
- package/docs/ja/data-fetching.md +78 -0
- package/docs/ja/environment-variables.md +68 -0
- package/docs/ja/getting-started.md +95 -0
- package/docs/ja/index.md +65 -0
- package/docs/ja/markdown/markdown-renderer.md +43 -0
- package/docs/ja/pages-and-metadata.md +56 -0
- package/docs/ja/parts/app-shell.md +54 -0
- package/docs/ja/parts/dashboard-card.md +64 -0
- package/docs/ja/parts/data-table.md +85 -0
- package/docs/ja/parts/date-range-picker.md +41 -0
- package/docs/ja/parts/echart.md +52 -0
- package/docs/ja/parts/filter-bar.md +64 -0
- package/docs/ja/parts/funnel-steps.md +33 -0
- package/docs/ja/parts/metric-value.md +25 -0
- package/docs/ja/parts/multi-select.md +27 -0
- package/docs/ja/parts/page-shell.md +45 -0
- package/docs/ja/parts/searchable-select.md +47 -0
- package/docs/ja/parts/section-header.md +20 -0
- package/docs/ja/parts/segmented-control.md +26 -0
- package/docs/ja/parts/status-badge.md +44 -0
- package/docs/ja/parts/trend-indicator.md +26 -0
- package/docs/ja/routing.md +95 -0
- package/docs/ja/ui/accordion.md +37 -0
- package/docs/ja/ui/alert.md +31 -0
- package/docs/ja/ui/badge.md +23 -0
- package/docs/ja/ui/breadcrumb.md +38 -0
- package/docs/ja/ui/button.md +39 -0
- package/docs/ja/ui/calendar.md +28 -0
- package/docs/ja/ui/card.md +35 -0
- package/docs/ja/ui/checkbox.md +34 -0
- package/docs/ja/ui/cn.md +34 -0
- package/docs/ja/ui/collapsible.md +21 -0
- package/docs/ja/ui/command.md +36 -0
- package/docs/ja/ui/dialog.md +51 -0
- package/docs/ja/ui/dropdown-menu.md +50 -0
- package/docs/ja/ui/empty.md +22 -0
- package/docs/ja/ui/error-state.md +50 -0
- package/docs/ja/ui/input-group.md +30 -0
- package/docs/ja/ui/input.md +28 -0
- package/docs/ja/ui/label.md +19 -0
- package/docs/ja/ui/loading.md +19 -0
- package/docs/ja/ui/popover.md +34 -0
- package/docs/ja/ui/progress.md +28 -0
- package/docs/ja/ui/scroll-area.md +24 -0
- package/docs/ja/ui/select.md +64 -0
- package/docs/ja/ui/separator.md +15 -0
- package/docs/ja/ui/sheet.md +28 -0
- package/docs/ja/ui/sidebar.md +92 -0
- package/docs/ja/ui/skeleton.md +16 -0
- package/docs/ja/ui/slider.md +21 -0
- package/docs/ja/ui/spinner.md +14 -0
- package/docs/ja/ui/switch.md +19 -0
- package/docs/ja/ui/table.md +24 -0
- package/docs/ja/ui/tabs.md +24 -0
- package/docs/ja/ui/textarea.md +15 -0
- package/docs/ja/ui/toggle-group.md +27 -0
- package/docs/ja/ui/toggle.md +19 -0
- package/docs/ja/ui/tooltip.md +22 -0
- package/docs/ja/ui/use-is-mobile.md +18 -0
- package/docs/ja/ui-and-theming.md +95 -0
- package/package.json +29 -4
- package/registry/blocks/sales-overview.tsx +43 -19
- package/registry/ui/data-table.tsx +702 -102
- package/skills/vantage-add-feature/SKILL.md +150 -0
- package/skills/vantage-app/SKILL.md +258 -0
- package/skills/vantage-pitfalls/SKILL.md +115 -0
- package/templates/AGENTS.md +268 -0
- package/theme.css +178 -40
- package/dist/chunk-73J5ZD4C.js.map +0 -1
- package/dist/chunk-ZGDU5YLH.js.map +0 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# UI & theming
|
|
2
|
+
|
|
3
|
+
> Import the built-in UI kit. Override theme tokens in styles.css. Copy sources with add.
|
|
4
|
+
|
|
5
|
+
Vantage ships **shadcn/ui** (the Base UI variant) and a Tailwind v4 theme. No setup — use them
|
|
6
|
+
immediately.
|
|
7
|
+
|
|
8
|
+
## Use the UI kit
|
|
9
|
+
|
|
10
|
+
There are two entry points: the shadcn/ui primitives live in `@squadbase/vantage/ui`, and the
|
|
11
|
+
dashboard parts composed from them live in `@squadbase/vantage/components`.
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { Button } from "@squadbase/vantage/ui";
|
|
15
|
+
import { DashboardCardPreset, MetricValue } from "@squadbase/vantage/components";
|
|
16
|
+
|
|
17
|
+
export default function Overview() {
|
|
18
|
+
return (
|
|
19
|
+
<div className="grid gap-4 p-6 md:grid-cols-3">
|
|
20
|
+
<DashboardCardPreset title="Revenue">
|
|
21
|
+
<MetricValue className="my-0">$12,400</MetricValue>
|
|
22
|
+
</DashboardCardPreset>
|
|
23
|
+
<DashboardCardPreset title="New customers">
|
|
24
|
+
<MetricValue className="my-0">128</MetricValue>
|
|
25
|
+
</DashboardCardPreset>
|
|
26
|
+
<DashboardCardPreset title="Churn">
|
|
27
|
+
<MetricValue className="my-0">2.1%</MetricValue>
|
|
28
|
+
</DashboardCardPreset>
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
In `/ui` (a selection): `Button`, `Card`, the `Table` primitives, `Tabs`, `Input` / `Select` /
|
|
35
|
+
`Checkbox` / `Switch` / `Slider`, `Calendar`, `Dialog` / `Sheet` / `Popover` / `Tooltip` /
|
|
36
|
+
`DropdownMenu`, `Sidebar`, `Alert` / `Skeleton` / `Spinner`, `Loading` / `Empty` / `ErrorState`.
|
|
37
|
+
|
|
38
|
+
In `/components` (a selection): `PageShell`, `AppShell`, `DashboardCard`, `DataTable`, `EChart`,
|
|
39
|
+
`FunnelSteps`, `FilterBar`, `DateRangePicker`, `MetricValue`, `TrendIndicator`.
|
|
40
|
+
|
|
41
|
+
Props and usage for every component live in the [Components](components) tab.
|
|
42
|
+
|
|
43
|
+
## Tailwind just works
|
|
44
|
+
|
|
45
|
+
Write Tailwind utilities in `className` and they apply. You never write `tailwind.config` or
|
|
46
|
+
`postcss.config` (they're forbidden files and would error). Use `cn()` to combine classes.
|
|
47
|
+
|
|
48
|
+
```tsx
|
|
49
|
+
import { cn } from "@squadbase/vantage/ui";
|
|
50
|
+
|
|
51
|
+
<div className={cn("p-4", isActive && "bg-accent")} />;
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Override theme tokens
|
|
55
|
+
|
|
56
|
+
Design tokens like colors and radii are CSS variables. To override them, place a `styles.css` at the
|
|
57
|
+
project root and override **only CSS variables**. The file is auto-imported after the theme.
|
|
58
|
+
|
|
59
|
+
```css
|
|
60
|
+
/* styles.css — CSS variable overrides only */
|
|
61
|
+
:root {
|
|
62
|
+
--primary: oklch(0.55 0.22 265);
|
|
63
|
+
}
|
|
64
|
+
.dark,
|
|
65
|
+
[data-theme="dark"] {
|
|
66
|
+
--primary: oklch(0.72 0.19 265);
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
> [!WARNING]
|
|
71
|
+
> `styles.css` may only **override CSS variables (theme tokens)**. You cannot bring a `tailwind.config`
|
|
72
|
+
> (it's a forbidden file).
|
|
73
|
+
|
|
74
|
+
The tokens are shadcn/ui's neutral palette (oklch), plus `--chart-1` through `--chart-5` for charts
|
|
75
|
+
and `--sidebar-*` for the sidebar. Changing `--chart-*` also changes
|
|
76
|
+
[`EChart`](parts/echart)'s palette — charts build their theme by reading those CSS
|
|
77
|
+
variables directly.
|
|
78
|
+
|
|
79
|
+
## When you want to edit the source: `vantage add`
|
|
80
|
+
|
|
81
|
+
To make a component's internals your own, copy an editable source into `components/`.
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
vantage add ui data-table # copy an editable DataTable
|
|
85
|
+
vantage add block sales-overview
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
> [!NOTE]
|
|
89
|
+
> In the current prototype, `vantage add` can copy only `data-table` (ui) and `sales-overview` (block).
|
|
90
|
+
> All other UI components are import-only.
|
|
91
|
+
|
|
92
|
+
## What to read next
|
|
93
|
+
|
|
94
|
+
- [Components](components) — the props reference for every component
|
|
95
|
+
- [CLI reference](cli-reference) — every command
|