@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/progress.tsx
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// Copied by `vantage add ui progress`. This file is yours to edit.
|
|
2
|
-
// Generated from @squadbase/
|
|
2
|
+
// Generated from @squadbase/squadkit registry/ui/progress.tsx by `npm run registry` (in Vantage, edit packages/squadkit, not registry/).
|
|
3
|
+
"use client"
|
|
4
|
+
|
|
3
5
|
import { Progress as ProgressPrimitive } from "@base-ui/react/progress"
|
|
4
6
|
|
|
5
7
|
import { cn } from "@squadbase/vantage/ui"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Copied by `vantage add ui radio-group`. This file is yours to edit.
|
|
2
|
-
// Generated from @squadbase/
|
|
2
|
+
// Generated from @squadbase/squadkit registry/ui/radio-group.tsx by `npm run registry` (in Vantage, edit packages/squadkit, not registry/).
|
|
3
3
|
"use client"
|
|
4
4
|
|
|
5
5
|
import { Radio as RadioPrimitive } from "@base-ui/react/radio"
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// Copied by `vantage add ui sample-data`. This file is yours to edit.
|
|
2
|
+
// Generated from @squadbase/squadkit registry/components/sample-data.tsx by `npm run registry` (in Vantage, edit packages/squadkit, not registry/).
|
|
3
|
+
"use client"
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* SampleData — marks the values inside it as a sample: they are not connected to real data yet
|
|
7
|
+
* (a draft laid out before its queries are wired, a screen built from column definitions only).
|
|
8
|
+
* Not the same as `provisional` on KpiCard and the charts, which means 速報 — real values that are
|
|
9
|
+
* not final yet. For a single value in running text or a heading, use `Placeholder` instead.
|
|
10
|
+
*
|
|
11
|
+
* - **No box of its own.** It renders `display: contents`, so the grid / subgrid of the parent
|
|
12
|
+
* still sees the cards inside as its direct children (KpiCard rows keep lining up).
|
|
13
|
+
* - **The card shows the mark.** The nearest `KpiCard` or `DashboardCardPreset` inside it puts a
|
|
14
|
+
* `SampleBadge` in its header, once (also while loading): a card claims the mark, so the parts
|
|
15
|
+
* anywhere inside that card (body, actions, footer) do not repeat it. Put a bare chart in a
|
|
16
|
+
* `DashboardCardPreset` to have it marked.
|
|
17
|
+
* - The mark is a word, not only a colour (`--warning` on `--warning-subtle`), and its
|
|
18
|
+
* `title` says what it means.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* import { SampleData } from "@/components/sample-data"
|
|
22
|
+
* // Vantage: import { SampleData } from "@squadbase/vantage/components"
|
|
23
|
+
* <SampleData>
|
|
24
|
+
* <KpiCard label="売上" value={12400000} format={{ type: "currency", currency: "JPY" }} />
|
|
25
|
+
* </SampleData>
|
|
26
|
+
*/
|
|
27
|
+
import { createContext, useContext, useMemo, type HTMLAttributes, type ReactNode } from "react"
|
|
28
|
+
|
|
29
|
+
import { cn } from "@squadbase/vantage/ui"
|
|
30
|
+
import { Badge } from "@squadbase/vantage/ui"
|
|
31
|
+
|
|
32
|
+
export const DEFAULT_SAMPLE_LABEL = "見本の値"
|
|
33
|
+
const SAMPLE_TITLE = "実データにまだつながっていない見本の値です"
|
|
34
|
+
|
|
35
|
+
interface SampleState {
|
|
36
|
+
label: string
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const SampleContext = createContext<SampleState | null>(null)
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The mark a card inside `SampleData` should show, or null. A card that shows it wraps its
|
|
43
|
+
* content in `<SampleClaim>` so the parts inside do not show it again.
|
|
44
|
+
*/
|
|
45
|
+
export function useSampleMark(): SampleState | null {
|
|
46
|
+
return useContext(SampleContext)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** Ends the `SampleData` scope for the parts inside a card that already shows the mark. */
|
|
50
|
+
export function SampleClaim({ children }: { children?: ReactNode }) {
|
|
51
|
+
return <SampleContext.Provider value={null}>{children}</SampleContext.Provider>
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface SampleBadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
55
|
+
/** 印の文言。既定「見本の値」。 */
|
|
56
|
+
label?: string
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function SampleBadge({ label = DEFAULT_SAMPLE_LABEL, className, ...props }: SampleBadgeProps) {
|
|
60
|
+
return (
|
|
61
|
+
<Badge
|
|
62
|
+
data-slot="sample-badge"
|
|
63
|
+
title={SAMPLE_TITLE}
|
|
64
|
+
className={cn("border-warning/30 bg-warning-subtle text-warning align-middle", className)}
|
|
65
|
+
{...props}
|
|
66
|
+
>
|
|
67
|
+
{label}
|
|
68
|
+
</Badge>
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface SampleDataProps {
|
|
73
|
+
/** 印の文言。既定「見本の値」。 */
|
|
74
|
+
label?: string
|
|
75
|
+
children?: ReactNode
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function SampleData({ label = DEFAULT_SAMPLE_LABEL, children }: SampleDataProps) {
|
|
79
|
+
// A stable value, so the cards inside do not re-render when only the parent does.
|
|
80
|
+
const state = useMemo(() => ({ label }), [label])
|
|
81
|
+
return (
|
|
82
|
+
<div data-slot="sample-data" style={{ display: "contents" }}>
|
|
83
|
+
<SampleContext.Provider value={state}>{children}</SampleContext.Provider>
|
|
84
|
+
</div>
|
|
85
|
+
)
|
|
86
|
+
}
|