@squadbase/vantage 0.6.2-dev1.ac99e02 → 0.6.2-dev1.d7c0911
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{build-MFWRPYKW.js → build-X5NVCQKT.js} +4 -4
- package/dist/{build-MFWRPYKW.js.map → build-X5NVCQKT.js.map} +1 -1
- package/dist/{chunk-IBGOCWJB.js → chunk-2ICNHUG6.js} +186 -82
- package/dist/chunk-2ICNHUG6.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-PXRX5PEC.js → chunk-PDOBHMUQ.js} +3 -3
- package/dist/chunk-PDOBHMUQ.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-QEWCYW3I.js → chunk-WAMZWZJB.js} +13 -3
- package/dist/chunk-WAMZWZJB.js.map +1 -0
- package/dist/chunk-WRSX2MDK.js +7866 -0
- package/dist/chunk-WRSX2MDK.js.map +1 -0
- package/dist/{chunk-OB6UBJXF.js → chunk-XPQSTZUU.js} +125 -35
- package/dist/chunk-XPQSTZUU.js.map +1 -0
- package/dist/cli.js +3 -3
- package/dist/components/index.d.ts +1831 -99
- package/dist/components/index.js +4 -4
- package/dist/{dev-DCTOHQ6W.js → dev-4XEDTELV.js} +4 -4
- package/dist/{dev-DCTOHQ6W.js.map → dev-4XEDTELV.js.map} +1 -1
- package/dist/doc/index.js +2 -2
- package/dist/doc/index.js.map +1 -1
- package/dist/markdown/index.js +1 -1
- package/dist/markdown/index.js.map +1 -1
- package/dist/table/index.js +5 -5
- package/dist/table/index.js.map +1 -1
- package/dist/ui/index.d.ts +4 -1
- package/dist/ui/index.js +21 -111
- package/dist/ui/index.js.map +1 -1
- package/dist/{upgrade-DBBE6GIR.js → upgrade-JHXZBGQS.js} +3 -3
- package/dist/{upgrade-DBBE6GIR.js.map → upgrade-JHXZBGQS.js.map} +1 -1
- package/dist/vite/index.js +2 -2
- package/docs/en/components.md +29 -15
- package/docs/en/parts/data-table.md +22 -0
- package/docs/en/parts/delta.md +50 -0
- package/docs/en/parts/format.md +43 -0
- package/docs/en/parts/kpi-card.md +57 -0
- package/docs/en/parts/metric-value.md +3 -2
- package/docs/en/parts/sparkline.md +1 -1
- package/docs/en/parts/trend-indicator.md +17 -1
- package/docs/en/ui-and-theming.md +1 -1
- package/docs/index.json +92 -32
- package/docs/ja/changelog.md +5 -0
- package/docs/ja/components.md +27 -15
- package/docs/ja/parts/data-table.md +22 -0
- package/docs/ja/parts/delta.md +50 -0
- package/docs/ja/parts/format.md +44 -0
- package/docs/ja/parts/kpi-card.md +55 -0
- package/docs/ja/parts/metric-value.md +3 -2
- package/docs/ja/parts/sparkline.md +1 -1
- package/docs/ja/parts/trend-indicator.md +17 -1
- package/docs/ja/ui-and-theming.md +2 -2
- package/package.json +2 -1
- package/registry/ui/accordion.tsx +4 -2
- package/registry/ui/alert-dialog.tsx +3 -3
- package/registry/ui/alert.tsx +3 -1
- package/registry/ui/app-shell.tsx +7 -1
- package/registry/ui/area-chart.tsx +2781 -157
- package/registry/ui/avatar.tsx +1 -1
- package/registry/ui/badge.tsx +3 -1
- package/registry/ui/bar-chart.tsx +2780 -157
- package/registry/ui/bar-list.tsx +3471 -93
- package/registry/ui/breadcrumb.tsx +3 -1
- package/registry/ui/button.tsx +3 -1
- package/registry/ui/calendar.tsx +3 -1
- package/registry/ui/card.tsx +4 -2
- package/registry/ui/category-bar.tsx +990 -16
- package/registry/ui/chart-frame.tsx +1358 -0
- package/registry/ui/checkbox.tsx +3 -1
- package/registry/ui/collapsible.tsx +3 -1
- package/registry/ui/combobox.tsx +2 -2
- package/registry/ui/command.tsx +3 -1
- package/registry/ui/dashboard-card.tsx +69 -26
- package/registry/ui/data-table.tsx +678 -56
- package/registry/ui/date-range-picker.tsx +245 -64
- package/registry/ui/delta.tsx +188 -0
- package/registry/ui/dialog.tsx +5 -3
- package/registry/ui/donut-chart.tsx +2857 -173
- package/registry/ui/drawer.tsx +1 -1
- package/registry/ui/dropdown-menu.tsx +5 -3
- package/registry/ui/echart.tsx +448 -44
- package/registry/ui/field.tsx +1 -1
- package/registry/ui/filter-bar.tsx +33 -6
- package/registry/ui/funnel-steps.tsx +3316 -49
- package/registry/ui/heatmap.tsx +1752 -0
- package/registry/ui/hover-card.tsx +2 -2
- package/registry/ui/input-group.tsx +3 -1
- package/registry/ui/input.tsx +3 -1
- package/registry/ui/kbd.tsx +3 -1
- package/registry/ui/kpi-card.tsx +677 -0
- package/registry/ui/label.tsx +3 -1
- package/registry/ui/legend.tsx +3500 -0
- package/registry/ui/line-chart.tsx +2781 -151
- package/registry/ui/metric-value.tsx +9 -1
- package/registry/ui/multi-select.tsx +11 -5
- package/registry/ui/page-shell.tsx +104 -49
- package/registry/ui/pagination.tsx +3 -1
- package/registry/ui/placeholder.tsx +8 -2
- package/registry/ui/popover.tsx +4 -2
- package/registry/ui/progress-circle.tsx +607 -12
- package/registry/ui/progress.tsx +3 -1
- package/registry/ui/radio-group.tsx +1 -1
- package/registry/ui/sample-data.tsx +86 -0
- package/registry/ui/scatter-chart.tsx +4150 -0
- package/registry/ui/scroll-area.tsx +3 -2
- package/registry/ui/searchable-select.tsx +8 -3
- package/registry/ui/section-header.tsx +4 -2
- package/registry/ui/segmented-control.tsx +7 -2
- package/registry/ui/select.tsx +4 -2
- package/registry/ui/separator.tsx +3 -1
- package/registry/ui/sheet.tsx +4 -2
- package/registry/ui/sidebar.tsx +4 -2
- package/registry/ui/skeleton.tsx +4 -2
- package/registry/ui/slider.tsx +3 -1
- package/registry/ui/sparkline.tsx +84 -9
- package/registry/ui/spinner.tsx +3 -1
- package/registry/ui/states.tsx +34 -5
- package/registry/ui/status-badge.tsx +81 -39
- package/registry/ui/switch.tsx +3 -1
- package/registry/ui/table.tsx +4 -2
- package/registry/ui/tabs.tsx +5 -3
- package/registry/ui/textarea.tsx +3 -1
- package/registry/ui/toast.tsx +2 -2
- package/registry/ui/toggle-group.tsx +3 -1
- package/registry/ui/toggle.tsx +3 -1
- package/registry/ui/tooltip.tsx +4 -2
- package/registry/ui/tracker.tsx +624 -17
- package/registry/ui/trend-indicator.tsx +13 -1
- package/registry/ui/updated-at.tsx +122 -0
- package/registry/ui/waterfall-chart.tsx +4186 -0
- package/templates/AGENTS.md +13 -1
- package/theme.css +237 -136
- package/dist/chunk-5ZOP4SQR.js.map +0 -1
- package/dist/chunk-A2UUGASH.js.map +0 -1
- package/dist/chunk-AG6RZ2RR.js +0 -3208
- package/dist/chunk-AG6RZ2RR.js.map +0 -1
- package/dist/chunk-IBGOCWJB.js.map +0 -1
- package/dist/chunk-OB6UBJXF.js.map +0 -1
- package/dist/chunk-PXRX5PEC.js.map +0 -1
- package/dist/chunk-QEWCYW3I.js.map +0 -1
package/registry/ui/checkbox.tsx
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// Copied by `vantage add ui checkbox`. This file is yours to edit.
|
|
2
|
-
// Generated from @squadbase/
|
|
2
|
+
// Generated from @squadbase/squadkit registry/ui/checkbox.tsx by `npm run registry` (in Vantage, edit packages/squadkit, not registry/).
|
|
3
|
+
"use client"
|
|
4
|
+
|
|
3
5
|
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox"
|
|
4
6
|
|
|
5
7
|
import { cn } from "@squadbase/vantage/ui"
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// Copied by `vantage add ui collapsible`. This file is yours to edit.
|
|
2
|
-
// Generated from @squadbase/
|
|
2
|
+
// Generated from @squadbase/squadkit registry/ui/collapsible.tsx by `npm run registry` (in Vantage, edit packages/squadkit, not registry/).
|
|
3
|
+
"use client"
|
|
4
|
+
|
|
3
5
|
import { Collapsible as CollapsiblePrimitive } from "@base-ui/react/collapsible"
|
|
4
6
|
|
|
5
7
|
function Collapsible({ ...props }: CollapsiblePrimitive.Root.Props) {
|
package/registry/ui/combobox.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Copied by `vantage add ui combobox`. This file is yours to edit.
|
|
2
|
-
// Generated from @squadbase/
|
|
2
|
+
// Generated from @squadbase/squadkit registry/ui/combobox.tsx by `npm run registry` (in Vantage, edit packages/squadkit, not registry/).
|
|
3
3
|
"use client"
|
|
4
4
|
|
|
5
5
|
import * as React from "react"
|
|
@@ -117,7 +117,7 @@ function ComboboxContent({
|
|
|
117
117
|
data-slot="combobox-content"
|
|
118
118
|
data-chips={!!anchor}
|
|
119
119
|
className={cn(
|
|
120
|
-
"cn-menu-target cn-menu-translucent group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
120
|
+
"cn-menu-target cn-menu-translucent group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in motion-reduce:animate-none! data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
121
121
|
className
|
|
122
122
|
)}
|
|
123
123
|
{...props}
|
package/registry/ui/command.tsx
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// Copied by `vantage add ui command`. This file is yours to edit.
|
|
2
|
-
// Generated from @squadbase/
|
|
2
|
+
// Generated from @squadbase/squadkit registry/ui/command.tsx by `npm run registry` (in Vantage, edit packages/squadkit, not registry/).
|
|
3
|
+
"use client"
|
|
4
|
+
|
|
3
5
|
import * as React from "react"
|
|
4
6
|
import { Command as CommandPrimitive } from "cmdk"
|
|
5
7
|
|
|
@@ -1,25 +1,51 @@
|
|
|
1
1
|
// Copied by `vantage add ui dashboard-card`. This file is yours to edit.
|
|
2
|
-
// Generated from @squadbase/
|
|
2
|
+
// Generated from @squadbase/squadkit registry/components/dashboard-card.tsx by `npm run registry` (in Vantage, edit packages/squadkit, not registry/).
|
|
3
|
+
"use client"
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* DashboardCard — the tighter card used for dashboard tiles: smaller padding
|
|
5
7
|
* than the plain `Card`, a title/description/action header, and a matching
|
|
6
8
|
* skeleton for the loading state. `DashboardCardPreset` wires the common
|
|
7
9
|
* arrangement in one prop-driven component.
|
|
10
|
+
*
|
|
11
|
+
* - **Rows line up by subgrid.** `subgrid={3}` (header, content, footer) or `{2}` makes the
|
|
12
|
+
* tile span that many rows of its parent grid (`row-span-N` + `grid-template-rows: subgrid`),
|
|
13
|
+
* so tiles placed directly in one grid share the top edge of each part. Parts that are not
|
|
14
|
+
* given are not drawn (no empty header or footer, no fixed `h-*` / `min-h-*`); the preset puts
|
|
15
|
+
* each part on its own row. Without `subgrid` it is a plain block.
|
|
16
|
+
* - **`size="sm"`** is a step tighter (padding), for two tiles side by side in a narrow place.
|
|
17
|
+
*
|
|
18
|
+
* Use it for tiles that hold a chart, ranking or table. For a single KPI use
|
|
19
|
+
* `KpiCard` — it is already a card, and computes the delta, labels and target
|
|
20
|
+
* lines from the values.
|
|
8
21
|
*/
|
|
9
22
|
import { forwardRef, type HTMLAttributes, type ReactNode } from "react"
|
|
10
23
|
|
|
11
24
|
import { cn } from "@squadbase/vantage/ui"
|
|
12
25
|
import { Skeleton } from "@squadbase/vantage/ui"
|
|
26
|
+
import { SampleBadge, SampleClaim, useSampleMark } from "@squadbase/vantage/components"
|
|
27
|
+
|
|
28
|
+
export interface DashboardCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
29
|
+
/** 親の grid の何行にまたがって subgrid で揃えるか(ヘッダー・本文・フッターなら 3、ヘッダー・本文なら 2)。未指定なら通常のブロック。 */
|
|
30
|
+
subgrid?: 2 | 3
|
|
31
|
+
/** `"sm"` は一段小さい余白。Sheet の中などで 2 枚を横に並べるとき。既定 `"default"`。 */
|
|
32
|
+
size?: "default" | "sm"
|
|
33
|
+
}
|
|
13
34
|
|
|
14
|
-
|
|
35
|
+
const SUBGRID_CLASS = {
|
|
36
|
+
2: "row-span-2 grid content-start grid-rows-subgrid",
|
|
37
|
+
3: "row-span-3 grid content-start grid-rows-subgrid",
|
|
38
|
+
} as const
|
|
15
39
|
|
|
16
40
|
export const DashboardCard = forwardRef<HTMLDivElement, DashboardCardProps>(
|
|
17
|
-
({ className, ...props }, ref) => (
|
|
41
|
+
({ className, subgrid, size = "default", ...props }, ref) => (
|
|
18
42
|
<div
|
|
19
43
|
ref={ref}
|
|
20
44
|
data-slot="dashboard-card"
|
|
45
|
+
data-size={size}
|
|
21
46
|
className={cn(
|
|
22
|
-
"group rounded-
|
|
47
|
+
"group rounded-xl border bg-card shadow-[var(--shadow-card)] px-1 py-1 text-card-foreground",
|
|
48
|
+
subgrid && SUBGRID_CLASS[subgrid],
|
|
23
49
|
className,
|
|
24
50
|
)}
|
|
25
51
|
{...props}
|
|
@@ -35,7 +61,7 @@ export const DashboardCardHeader = forwardRef<HTMLDivElement, DashboardCardHeade
|
|
|
35
61
|
<div
|
|
36
62
|
ref={ref}
|
|
37
63
|
data-slot="dashboard-card-header"
|
|
38
|
-
className={cn("flex flex-row items-start justify-between gap-4 px-3 py-3", className)}
|
|
64
|
+
className={cn("flex flex-row items-start justify-between gap-4 px-3 py-3 group-data-[size=sm]:px-2 group-data-[size=sm]:py-2", className)}
|
|
39
65
|
{...props}
|
|
40
66
|
/>
|
|
41
67
|
),
|
|
@@ -89,7 +115,7 @@ export interface DashboardCardContentProps extends HTMLAttributes<HTMLDivElement
|
|
|
89
115
|
|
|
90
116
|
export const DashboardCardContent = forwardRef<HTMLDivElement, DashboardCardContentProps>(
|
|
91
117
|
({ className, ...props }, ref) => (
|
|
92
|
-
<div ref={ref} data-slot="dashboard-card-content" className={cn("p-3", className)} {...props} />
|
|
118
|
+
<div ref={ref} data-slot="dashboard-card-content" className={cn("p-3 group-data-[size=sm]:p-2", className)} {...props} />
|
|
93
119
|
),
|
|
94
120
|
)
|
|
95
121
|
DashboardCardContent.displayName = "DashboardCardContent"
|
|
@@ -101,7 +127,7 @@ export const DashboardCardFooter = forwardRef<HTMLDivElement, DashboardCardFoote
|
|
|
101
127
|
<div
|
|
102
128
|
ref={ref}
|
|
103
129
|
data-slot="dashboard-card-footer"
|
|
104
|
-
className={cn("flex items-center px-3 py-1.5", className)}
|
|
130
|
+
className={cn("flex items-center px-3 py-1.5 group-data-[size=sm]:px-2", className)}
|
|
105
131
|
{...props}
|
|
106
132
|
/>
|
|
107
133
|
),
|
|
@@ -116,7 +142,7 @@ export function DashboardCardSkeleton({ className }: DashboardCardSkeletonProps)
|
|
|
116
142
|
return (
|
|
117
143
|
<div
|
|
118
144
|
data-slot="dashboard-card-skeleton"
|
|
119
|
-
className={cn("rounded-
|
|
145
|
+
className={cn("rounded-xl border bg-card p-6 shadow-[var(--shadow-card)]", className)}
|
|
120
146
|
>
|
|
121
147
|
<div className="flex items-start justify-between gap-4 pb-4">
|
|
122
148
|
<Skeleton className="h-5 w-32" />
|
|
@@ -129,7 +155,8 @@ export function DashboardCardSkeleton({ className }: DashboardCardSkeletonProps)
|
|
|
129
155
|
}
|
|
130
156
|
|
|
131
157
|
export interface DashboardCardPresetProps
|
|
132
|
-
extends Omit<HTMLAttributes<HTMLDivElement>, "title"
|
|
158
|
+
extends Omit<HTMLAttributes<HTMLDivElement>, "title">,
|
|
159
|
+
Pick<DashboardCardProps, "subgrid" | "size"> {
|
|
133
160
|
title?: ReactNode
|
|
134
161
|
description?: ReactNode
|
|
135
162
|
actions?: ReactNode
|
|
@@ -149,26 +176,42 @@ export function DashboardCardPreset({
|
|
|
149
176
|
contentClassName,
|
|
150
177
|
footerClassName,
|
|
151
178
|
className,
|
|
179
|
+
subgrid,
|
|
152
180
|
...props
|
|
153
181
|
}: DashboardCardPresetProps) {
|
|
154
|
-
|
|
182
|
+
// Inside SampleData the card shows the mark in its header, and the parts inside it do not repeat it.
|
|
183
|
+
const sample = useSampleMark()
|
|
184
|
+
const hasHeader = title || description || actions || sample
|
|
155
185
|
return (
|
|
156
|
-
<DashboardCard className={className} {...props}>
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
{(
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
186
|
+
<DashboardCard className={className} subgrid={subgrid} {...props}>
|
|
187
|
+
<SampleClaim>
|
|
188
|
+
{hasHeader && (
|
|
189
|
+
<DashboardCardHeader className={cn(subgrid && "row-start-1", headerClassName)}>
|
|
190
|
+
{(title || description) && (
|
|
191
|
+
<div>
|
|
192
|
+
{title && <DashboardCardTitle>{title}</DashboardCardTitle>}
|
|
193
|
+
{description && <DashboardCardDescription>{description}</DashboardCardDescription>}
|
|
194
|
+
</div>
|
|
195
|
+
)}
|
|
196
|
+
{(actions || sample) && (
|
|
197
|
+
<DashboardCardAction className={cn(sample && actions && "flex items-center gap-2")}>
|
|
198
|
+
{sample && <SampleBadge label={sample.label} />}
|
|
199
|
+
{actions}
|
|
200
|
+
</DashboardCardAction>
|
|
201
|
+
)}
|
|
202
|
+
</DashboardCardHeader>
|
|
203
|
+
)}
|
|
204
|
+
{children && (
|
|
205
|
+
<DashboardCardContent className={cn(subgrid && "row-start-2", contentClassName)}>
|
|
206
|
+
{children}
|
|
207
|
+
</DashboardCardContent>
|
|
208
|
+
)}
|
|
209
|
+
{footer && (
|
|
210
|
+
<DashboardCardFooter className={cn(subgrid === 3 && "row-start-3", footerClassName)}>
|
|
211
|
+
{footer}
|
|
212
|
+
</DashboardCardFooter>
|
|
213
|
+
)}
|
|
214
|
+
</SampleClaim>
|
|
172
215
|
</DashboardCard>
|
|
173
216
|
)
|
|
174
217
|
}
|