@squadbase/vantage 0.0.1 → 0.1.1

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.
Files changed (187) hide show
  1. package/README.md +24 -4
  2. package/dist/{chunk-ZGDU5YLH.js → chunk-5L2MH2NG.js} +16 -7
  3. package/dist/chunk-5L2MH2NG.js.map +1 -0
  4. package/dist/chunk-7IPAXPPY.js +51 -0
  5. package/dist/chunk-7IPAXPPY.js.map +1 -0
  6. package/dist/chunk-A2UUGASH.js +12 -0
  7. package/dist/chunk-A2UUGASH.js.map +1 -0
  8. package/dist/chunk-DTDVSFRY.js +29 -0
  9. package/dist/chunk-DTDVSFRY.js.map +1 -0
  10. package/dist/chunk-WQZYXXQW.js +2249 -0
  11. package/dist/chunk-WQZYXXQW.js.map +1 -0
  12. package/dist/{chunk-73J5ZD4C.js → chunk-YLAB6UQS.js} +17 -3
  13. package/dist/chunk-YLAB6UQS.js.map +1 -0
  14. package/dist/cli.js +607 -36
  15. package/dist/cli.js.map +1 -1
  16. package/dist/client/index.d.ts +2 -1
  17. package/dist/client/index.js +3 -1
  18. package/dist/client/index.js.map +1 -1
  19. package/dist/components/index.d.ts +575 -0
  20. package/dist/components/index.js +2097 -0
  21. package/dist/components/index.js.map +1 -0
  22. package/dist/{define-page-B6y9TOfZ.d.ts → define-page-BfhrK99G.d.ts} +5 -0
  23. package/dist/index.d.ts +2 -2
  24. package/dist/index.js +1 -1
  25. package/dist/index.js.map +1 -1
  26. package/dist/markdown/index.d.ts +9 -0
  27. package/dist/markdown/index.js +26 -0
  28. package/dist/markdown/index.js.map +1 -0
  29. package/dist/query/index.d.ts +95 -2
  30. package/dist/query/index.js +102 -1
  31. package/dist/query/index.js.map +1 -1
  32. package/dist/router/index.d.ts +86 -1
  33. package/dist/router/index.js +71 -7
  34. package/dist/router/index.js.map +1 -1
  35. package/dist/server/node.js +6 -1
  36. package/dist/server/node.js.map +1 -1
  37. package/dist/ui/index.d.ts +316 -200
  38. package/dist/ui/index.js +566 -511
  39. package/dist/ui/index.js.map +1 -1
  40. package/dist/vite/index.js +2 -2
  41. package/docs/en/agent-skills.md +89 -0
  42. package/docs/en/api-and-server.md +84 -0
  43. package/docs/en/build-and-deploy.md +280 -0
  44. package/docs/en/cli-reference.md +311 -0
  45. package/docs/en/components.md +235 -0
  46. package/docs/en/data-fetching.md +142 -0
  47. package/docs/en/environment-variables.md +69 -0
  48. package/docs/en/getting-started.md +95 -0
  49. package/docs/en/index.md +65 -0
  50. package/docs/en/markdown/markdown-renderer.md +44 -0
  51. package/docs/en/pages-and-metadata.md +59 -0
  52. package/docs/en/parts/app-shell.md +54 -0
  53. package/docs/en/parts/dashboard-card.md +64 -0
  54. package/docs/en/parts/data-table.md +86 -0
  55. package/docs/en/parts/date-range-picker.md +41 -0
  56. package/docs/en/parts/echart.md +53 -0
  57. package/docs/en/parts/filter-bar.md +66 -0
  58. package/docs/en/parts/funnel-steps.md +33 -0
  59. package/docs/en/parts/metric-value.md +23 -0
  60. package/docs/en/parts/multi-select.md +27 -0
  61. package/docs/en/parts/page-shell.md +45 -0
  62. package/docs/en/parts/placeholder.md +38 -0
  63. package/docs/en/parts/searchable-select.md +47 -0
  64. package/docs/en/parts/section-header.md +20 -0
  65. package/docs/en/parts/segmented-control.md +25 -0
  66. package/docs/en/parts/sparkline.md +47 -0
  67. package/docs/en/parts/status-badge.md +44 -0
  68. package/docs/en/parts/trend-indicator.md +26 -0
  69. package/docs/en/routing.md +177 -0
  70. package/docs/en/ui/accordion.md +36 -0
  71. package/docs/en/ui/alert.md +31 -0
  72. package/docs/en/ui/badge.md +23 -0
  73. package/docs/en/ui/breadcrumb.md +38 -0
  74. package/docs/en/ui/button.md +39 -0
  75. package/docs/en/ui/calendar.md +28 -0
  76. package/docs/en/ui/card.md +35 -0
  77. package/docs/en/ui/checkbox.md +34 -0
  78. package/docs/en/ui/cn.md +34 -0
  79. package/docs/en/ui/collapsible.md +21 -0
  80. package/docs/en/ui/command.md +37 -0
  81. package/docs/en/ui/dialog.md +52 -0
  82. package/docs/en/ui/dropdown-menu.md +50 -0
  83. package/docs/en/ui/empty.md +22 -0
  84. package/docs/en/ui/error-state.md +50 -0
  85. package/docs/en/ui/input-group.md +30 -0
  86. package/docs/en/ui/input.md +28 -0
  87. package/docs/en/ui/label.md +19 -0
  88. package/docs/en/ui/loading.md +19 -0
  89. package/docs/en/ui/popover.md +34 -0
  90. package/docs/en/ui/progress.md +28 -0
  91. package/docs/en/ui/scroll-area.md +23 -0
  92. package/docs/en/ui/select.md +63 -0
  93. package/docs/en/ui/separator.md +15 -0
  94. package/docs/en/ui/sheet.md +28 -0
  95. package/docs/en/ui/sidebar.md +92 -0
  96. package/docs/en/ui/skeleton.md +16 -0
  97. package/docs/en/ui/slider.md +21 -0
  98. package/docs/en/ui/spinner.md +14 -0
  99. package/docs/en/ui/switch.md +19 -0
  100. package/docs/en/ui/table.md +24 -0
  101. package/docs/en/ui/tabs.md +23 -0
  102. package/docs/en/ui/textarea.md +15 -0
  103. package/docs/en/ui/toggle-group.md +26 -0
  104. package/docs/en/ui/toggle.md +19 -0
  105. package/docs/en/ui/tooltip.md +22 -0
  106. package/docs/en/ui/use-is-mobile.md +18 -0
  107. package/docs/en/ui-and-theming.md +95 -0
  108. package/docs/index.json +1346 -0
  109. package/docs/ja/agent-skills.md +87 -0
  110. package/docs/ja/api-and-server.md +84 -0
  111. package/docs/ja/build-and-deploy.md +279 -0
  112. package/docs/ja/cli-reference.md +305 -0
  113. package/docs/ja/components.md +231 -0
  114. package/docs/ja/data-fetching.md +142 -0
  115. package/docs/ja/environment-variables.md +68 -0
  116. package/docs/ja/getting-started.md +95 -0
  117. package/docs/ja/index.md +65 -0
  118. package/docs/ja/markdown/markdown-renderer.md +43 -0
  119. package/docs/ja/pages-and-metadata.md +59 -0
  120. package/docs/ja/parts/app-shell.md +54 -0
  121. package/docs/ja/parts/dashboard-card.md +64 -0
  122. package/docs/ja/parts/data-table.md +85 -0
  123. package/docs/ja/parts/date-range-picker.md +41 -0
  124. package/docs/ja/parts/echart.md +52 -0
  125. package/docs/ja/parts/filter-bar.md +64 -0
  126. package/docs/ja/parts/funnel-steps.md +33 -0
  127. package/docs/ja/parts/metric-value.md +25 -0
  128. package/docs/ja/parts/multi-select.md +27 -0
  129. package/docs/ja/parts/page-shell.md +45 -0
  130. package/docs/ja/parts/placeholder.md +37 -0
  131. package/docs/ja/parts/searchable-select.md +47 -0
  132. package/docs/ja/parts/section-header.md +20 -0
  133. package/docs/ja/parts/segmented-control.md +26 -0
  134. package/docs/ja/parts/sparkline.md +47 -0
  135. package/docs/ja/parts/status-badge.md +44 -0
  136. package/docs/ja/parts/trend-indicator.md +26 -0
  137. package/docs/ja/routing.md +175 -0
  138. package/docs/ja/ui/accordion.md +37 -0
  139. package/docs/ja/ui/alert.md +31 -0
  140. package/docs/ja/ui/badge.md +23 -0
  141. package/docs/ja/ui/breadcrumb.md +38 -0
  142. package/docs/ja/ui/button.md +39 -0
  143. package/docs/ja/ui/calendar.md +28 -0
  144. package/docs/ja/ui/card.md +35 -0
  145. package/docs/ja/ui/checkbox.md +34 -0
  146. package/docs/ja/ui/cn.md +34 -0
  147. package/docs/ja/ui/collapsible.md +21 -0
  148. package/docs/ja/ui/command.md +36 -0
  149. package/docs/ja/ui/dialog.md +51 -0
  150. package/docs/ja/ui/dropdown-menu.md +50 -0
  151. package/docs/ja/ui/empty.md +22 -0
  152. package/docs/ja/ui/error-state.md +50 -0
  153. package/docs/ja/ui/input-group.md +30 -0
  154. package/docs/ja/ui/input.md +28 -0
  155. package/docs/ja/ui/label.md +19 -0
  156. package/docs/ja/ui/loading.md +19 -0
  157. package/docs/ja/ui/popover.md +34 -0
  158. package/docs/ja/ui/progress.md +28 -0
  159. package/docs/ja/ui/scroll-area.md +24 -0
  160. package/docs/ja/ui/select.md +64 -0
  161. package/docs/ja/ui/separator.md +15 -0
  162. package/docs/ja/ui/sheet.md +28 -0
  163. package/docs/ja/ui/sidebar.md +92 -0
  164. package/docs/ja/ui/skeleton.md +16 -0
  165. package/docs/ja/ui/slider.md +21 -0
  166. package/docs/ja/ui/spinner.md +14 -0
  167. package/docs/ja/ui/switch.md +19 -0
  168. package/docs/ja/ui/table.md +24 -0
  169. package/docs/ja/ui/tabs.md +24 -0
  170. package/docs/ja/ui/textarea.md +15 -0
  171. package/docs/ja/ui/toggle-group.md +27 -0
  172. package/docs/ja/ui/toggle.md +19 -0
  173. package/docs/ja/ui/tooltip.md +22 -0
  174. package/docs/ja/ui/use-is-mobile.md +18 -0
  175. package/docs/ja/ui-and-theming.md +95 -0
  176. package/package.json +29 -4
  177. package/registry/blocks/sales-overview.tsx +43 -19
  178. package/registry/ui/data-table.tsx +702 -102
  179. package/skills/vantage-add-feature/SKILL.md +153 -0
  180. package/skills/vantage-app/SKILL.md +291 -0
  181. package/skills/vantage-pitfalls/SKILL.md +139 -0
  182. package/templates/AGENTS.md +313 -0
  183. package/theme.css +178 -40
  184. package/dist/chunk-73J5ZD4C.js.map +0 -1
  185. package/dist/chunk-ATYZ45XL.js +0 -19
  186. package/dist/chunk-ATYZ45XL.js.map +0 -1
  187. package/dist/chunk-ZGDU5YLH.js.map +0 -1
@@ -0,0 +1,575 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { HTMLAttributes, ComponentType, ReactNode, ElementType, ComponentProps, SVGAttributes } from 'react';
4
+ import { VariantProps } from 'class-variance-authority';
5
+ import { EChartsOption } from 'echarts';
6
+ export { EChartsOption } from 'echarts';
7
+ import { ColumnDef, SortingState, OnChangeFn, ColumnFiltersState, PaginationState, RowSelectionState, VisibilityState, TableMeta, Table } from '@tanstack/react-table';
8
+ export { ColumnDef, ColumnFiltersState, PaginationState, RowSelectionState, SortingState, VisibilityState } from '@tanstack/react-table';
9
+ export { DateRange as RdpDateRange } from 'react-day-picker';
10
+
11
+ interface PageShellProps extends HTMLAttributes<HTMLDivElement> {
12
+ }
13
+ declare const PageShell: React.ForwardRefExoticComponent<PageShellProps & React.RefAttributes<HTMLDivElement>>;
14
+ interface PageShellHeaderProps extends HTMLAttributes<HTMLDivElement> {
15
+ }
16
+ declare const PageShellHeader: React.ForwardRefExoticComponent<PageShellHeaderProps & React.RefAttributes<HTMLDivElement>>;
17
+ interface PageShellHeadingProps extends HTMLAttributes<HTMLDivElement> {
18
+ }
19
+ declare const PageShellHeading: React.ForwardRefExoticComponent<PageShellHeadingProps & React.RefAttributes<HTMLDivElement>>;
20
+ interface PageShellTitleProps extends HTMLAttributes<HTMLHeadingElement> {
21
+ }
22
+ declare const PageShellTitle: React.ForwardRefExoticComponent<PageShellTitleProps & React.RefAttributes<HTMLHeadingElement>>;
23
+ interface PageShellDescriptionProps extends HTMLAttributes<HTMLParagraphElement> {
24
+ }
25
+ declare const PageShellDescription: React.ForwardRefExoticComponent<PageShellDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
26
+ interface PageShellHeaderEndProps extends HTMLAttributes<HTMLDivElement> {
27
+ }
28
+ declare const PageShellHeaderEnd: React.ForwardRefExoticComponent<PageShellHeaderEndProps & React.RefAttributes<HTMLDivElement>>;
29
+ interface PageShellMetaProps extends HTMLAttributes<HTMLDivElement> {
30
+ }
31
+ declare const PageShellMeta: React.ForwardRefExoticComponent<PageShellMetaProps & React.RefAttributes<HTMLDivElement>>;
32
+ interface PageShellActionsProps extends HTMLAttributes<HTMLDivElement> {
33
+ }
34
+ declare const PageShellActions: React.ForwardRefExoticComponent<PageShellActionsProps & React.RefAttributes<HTMLDivElement>>;
35
+ interface PageShellSummaryProps extends HTMLAttributes<HTMLDivElement> {
36
+ }
37
+ declare const PageShellSummary: React.ForwardRefExoticComponent<PageShellSummaryProps & React.RefAttributes<HTMLDivElement>>;
38
+ /**
39
+ * Accent colours are spelled out one utility set per colour rather than built
40
+ * from a template string — Tailwind only emits classes it can see literally in
41
+ * the source.
42
+ */
43
+ declare const pageShellSummaryCardVariants: (props?: ({
44
+ accent?: "accent" | "default" | "amber" | "blue" | "emerald" | "red" | "violet" | "orange" | "cyan" | "slate" | "green" | "teal" | "sky" | "indigo" | "purple" | "pink" | "rose" | "yellow" | "lime" | "gray" | "zinc" | "neutral" | "stone" | "fuchsia" | null | undefined;
45
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
46
+ interface PageShellSummaryCardProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof pageShellSummaryCardVariants> {
47
+ }
48
+ declare const PageShellSummaryCard: React.ForwardRefExoticComponent<PageShellSummaryCardProps & React.RefAttributes<HTMLDivElement>>;
49
+ interface PageShellContentProps extends HTMLAttributes<HTMLDivElement> {
50
+ }
51
+ declare const PageShellContent: React.ForwardRefExoticComponent<PageShellContentProps & React.RefAttributes<HTMLDivElement>>;
52
+
53
+ /**
54
+ * Shared data shapes for the composite dashboard components. Kept in one place
55
+ * so filters, metrics and date pickers agree on the same vocabulary.
56
+ */
57
+
58
+ interface FilterOption {
59
+ label: string;
60
+ value: string;
61
+ count?: number;
62
+ disabled?: boolean;
63
+ }
64
+ type FilterType = "select" | "multi-select" | "date-range" | "search";
65
+ interface FilterConfig {
66
+ /** Unique key for this filter */
67
+ key: string;
68
+ /** Display label */
69
+ label: string;
70
+ /** Filter input type */
71
+ type: FilterType;
72
+ /** Available options (for select/multi-select) */
73
+ options?: FilterOption[];
74
+ /** Placeholder text */
75
+ placeholder?: string;
76
+ /** Default value */
77
+ defaultValue?: string | string[];
78
+ }
79
+ type FilterValues = Record<string, string | string[] | undefined>;
80
+ interface SegmentOption {
81
+ label: string;
82
+ value: string;
83
+ icon?: ComponentType<{
84
+ className?: string;
85
+ }>;
86
+ disabled?: boolean;
87
+ }
88
+ interface DateRange {
89
+ from: Date | undefined;
90
+ to: Date | undefined;
91
+ }
92
+ interface PresetItem {
93
+ label: string;
94
+ getValue: () => DateRange;
95
+ }
96
+ type TrendDirection = "up" | "down" | "neutral";
97
+ type MetricVariant = "default" | "primary" | "accent" | "muted";
98
+ interface MetricItem {
99
+ /** Unique identifier for the metric */
100
+ id: string;
101
+ /** Display label for the metric */
102
+ label: string;
103
+ /** Current value (formatted string or number) */
104
+ value: string | number;
105
+ /** Optional unit suffix (e.g. "円", "%", "件") */
106
+ unit?: string;
107
+ /** Trend direction */
108
+ trend?: TrendDirection;
109
+ /** Trend change value */
110
+ trendValue?: number;
111
+ /** Optional description or subtitle */
112
+ description?: string;
113
+ /** Whether higher values are positive (default: true) */
114
+ positiveIsGood?: boolean;
115
+ /** Visual emphasis variant */
116
+ variant?: MetricVariant;
117
+ }
118
+ interface NavItem {
119
+ /** Display label */
120
+ label: string;
121
+ /** Route path or URL */
122
+ href: string;
123
+ /** Icon component (e.g. a `lucide-react` icon) */
124
+ icon?: ComponentType<{
125
+ className?: string;
126
+ }>;
127
+ /** Whether this item is currently active */
128
+ isActive?: boolean;
129
+ /** Whether this item is disabled */
130
+ disabled?: boolean;
131
+ /** Optional badge text (e.g. notification count) */
132
+ badge?: string;
133
+ /** Nested child items */
134
+ children?: NavItem[];
135
+ }
136
+ interface NavGroup {
137
+ /** Group label */
138
+ label?: string;
139
+ /** Items in this group */
140
+ items: NavItem[];
141
+ }
142
+ interface SelectOption {
143
+ value: string;
144
+ label: string;
145
+ disabled?: boolean;
146
+ icon?: ComponentType<{
147
+ className?: string;
148
+ }>;
149
+ description?: ReactNode;
150
+ }
151
+ interface SelectOptionGroup {
152
+ label: string;
153
+ options: SelectOption[];
154
+ }
155
+ type SelectOptions = SelectOption[] | SelectOptionGroup[];
156
+ declare function isGroupedOptions(options: SelectOptions): options is SelectOptionGroup[];
157
+ declare function flattenOptions(options: SelectOptions): SelectOption[];
158
+
159
+ interface AppShellSidebarProps {
160
+ variant?: "sidebar";
161
+ groups: NavGroup[];
162
+ actions?: ReactNode;
163
+ header?: ReactNode;
164
+ children: ReactNode;
165
+ defaultOpen?: boolean;
166
+ className?: string;
167
+ linkComponent?: ElementType;
168
+ onNavigate?: (href: string) => void;
169
+ }
170
+ interface AppShellHeaderProps {
171
+ variant: "header";
172
+ groups: NavGroup[];
173
+ actions?: ReactNode;
174
+ header?: ReactNode;
175
+ children: ReactNode;
176
+ className?: string;
177
+ linkComponent?: ElementType;
178
+ onNavigate?: (href: string) => void;
179
+ }
180
+ type AppShellProps = AppShellSidebarProps | AppShellHeaderProps;
181
+ declare const AppShell: React.ForwardRefExoticComponent<AppShellProps & React.RefAttributes<HTMLDivElement>>;
182
+
183
+ declare const headingStyles: {
184
+ readonly h1: "text-3xl font-bold tracking-tight";
185
+ readonly h2: "text-2xl font-semibold tracking-tight";
186
+ readonly h3: "text-xl font-semibold";
187
+ readonly h4: "text-lg font-semibold";
188
+ };
189
+ interface SectionHeaderProps {
190
+ title: string;
191
+ description?: string;
192
+ actions?: ReactNode;
193
+ className?: string;
194
+ as?: keyof typeof headingStyles;
195
+ }
196
+ declare const SectionHeader: React.ForwardRefExoticComponent<SectionHeaderProps & React.RefAttributes<HTMLDivElement>>;
197
+
198
+ interface DashboardCardProps extends HTMLAttributes<HTMLDivElement> {
199
+ }
200
+ declare const DashboardCard: React.ForwardRefExoticComponent<DashboardCardProps & React.RefAttributes<HTMLDivElement>>;
201
+ interface DashboardCardHeaderProps extends HTMLAttributes<HTMLDivElement> {
202
+ }
203
+ declare const DashboardCardHeader: React.ForwardRefExoticComponent<DashboardCardHeaderProps & React.RefAttributes<HTMLDivElement>>;
204
+ interface DashboardCardTitleProps extends HTMLAttributes<HTMLHeadingElement> {
205
+ }
206
+ declare const DashboardCardTitle: React.ForwardRefExoticComponent<DashboardCardTitleProps & React.RefAttributes<HTMLHeadingElement>>;
207
+ interface DashboardCardDescriptionProps extends HTMLAttributes<HTMLParagraphElement> {
208
+ }
209
+ declare const DashboardCardDescription: React.ForwardRefExoticComponent<DashboardCardDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
210
+ interface DashboardCardActionProps extends HTMLAttributes<HTMLDivElement> {
211
+ }
212
+ declare const DashboardCardAction: React.ForwardRefExoticComponent<DashboardCardActionProps & React.RefAttributes<HTMLDivElement>>;
213
+ interface DashboardCardContentProps extends HTMLAttributes<HTMLDivElement> {
214
+ }
215
+ declare const DashboardCardContent: React.ForwardRefExoticComponent<DashboardCardContentProps & React.RefAttributes<HTMLDivElement>>;
216
+ interface DashboardCardFooterProps extends HTMLAttributes<HTMLDivElement> {
217
+ }
218
+ declare const DashboardCardFooter: React.ForwardRefExoticComponent<DashboardCardFooterProps & React.RefAttributes<HTMLDivElement>>;
219
+ interface DashboardCardSkeletonProps {
220
+ className?: string;
221
+ }
222
+ declare function DashboardCardSkeleton({ className }: DashboardCardSkeletonProps): React.JSX.Element;
223
+ interface DashboardCardPresetProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
224
+ title?: ReactNode;
225
+ description?: ReactNode;
226
+ actions?: ReactNode;
227
+ footer?: ReactNode;
228
+ headerClassName?: string;
229
+ contentClassName?: string;
230
+ footerClassName?: string;
231
+ }
232
+ declare function DashboardCardPreset({ title, description, actions, footer, children, headerClassName, contentClassName, footerClassName, className, ...props }: DashboardCardPresetProps): React.JSX.Element;
233
+
234
+ interface EChartProps {
235
+ /**
236
+ * ECharts のオプション。
237
+ *
238
+ * 型推論を効かせるため、必ず `EChartsOption` を annotation するか
239
+ * `satisfies EChartsOption` を付けること。付けないと `type: "category"` などの
240
+ * literal が `string` に拡張され、ビルドが失敗する。
241
+ *
242
+ * @example
243
+ * import type { EChartsOption } from "@squadbase/vantage/components"
244
+ *
245
+ * const option: EChartsOption = {
246
+ * xAxis: { type: "category", data: ["A", "B"] },
247
+ * yAxis: { type: "value" },
248
+ * series: [{ type: "bar", data: [1, 2] }],
249
+ * }
250
+ * <EChart option={option} />
251
+ */
252
+ option: EChartsOption;
253
+ /**
254
+ * チャートの高さ。数値は px、文字列は CSS 値(例: `"50vh"`)として扱う。
255
+ *
256
+ * 省略した場合は外側ラッパーに `h-[400px]` がデフォルトで当たるが、`className` に
257
+ * `h-full` や `h-[360px]` などの高さクラスを渡せばそちらが優先される
258
+ * (`h-full` を使う場合は親要素に確定した高さが必要)。
259
+ * `height` と `className` の高さを両方指定した場合は `height`(インライン style)が勝つ。
260
+ */
261
+ height?: string | number;
262
+ loading?: boolean;
263
+ /** `echarts.init` にそのまま渡すテーマ(名前または登録済みテーマオブジェクト)。 */
264
+ theme?: string | object;
265
+ onEvents?: Record<string, (params: unknown) => void>;
266
+ ariaLabel?: string;
267
+ className?: string;
268
+ /** true にするとチャート右上に PNG コピー / ダウンロードボタンを表示する */
269
+ actions?: boolean;
270
+ /** ダウンロード時のファイル名(拡張子含む)。省略時は "chart.png" */
271
+ fileName?: string;
272
+ }
273
+ declare const EChart: React.ForwardRefExoticComponent<EChartProps & React.RefAttributes<HTMLDivElement>>;
274
+
275
+ interface FunnelStep {
276
+ /** ステップのラベル(例: "ページビュー") */
277
+ label: string;
278
+ /** このステップの数値 */
279
+ value: number;
280
+ /** Tailwind bg カラークラス(例: "bg-chart-1")。未指定時は自動割り当て */
281
+ color?: string;
282
+ /** クリック時のハンドラ */
283
+ onClick?: () => void;
284
+ }
285
+ declare const funnelStepsVariants: (props?: ({
286
+ size?: "sm" | "lg" | "md" | null | undefined;
287
+ direction?: "horizontal" | "vertical" | null | undefined;
288
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
289
+ interface FunnelStepsProps extends ComponentProps<"div">, VariantProps<typeof funnelStepsVariants> {
290
+ /** ファネルステップの配列(先頭が最大幅) */
291
+ data: FunnelStep[];
292
+ /** ステップ間のコンバージョン率を表示する */
293
+ showConversion?: boolean;
294
+ /** 値の表示フォーマット関数 */
295
+ formatValue?: (value: number) => string;
296
+ /** マウント時のエントリアニメーションを有効にする */
297
+ animate?: boolean;
298
+ }
299
+ declare const FunnelSteps: React.ForwardRefExoticComponent<Omit<FunnelStepsProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
300
+
301
+ type SparklineVariant = "line" | "bar";
302
+ interface SparklineDataPoint {
303
+ value: number;
304
+ label?: string;
305
+ }
306
+ interface SparklineProps extends SVGAttributes<SVGSVGElement> {
307
+ data: SparklineDataPoint[];
308
+ variant?: SparklineVariant;
309
+ height?: number;
310
+ /** Tailwind text-colour class; drives both stroke and fill via `currentColor`. */
311
+ color?: string;
312
+ area?: boolean;
313
+ animate?: boolean;
314
+ className?: string;
315
+ }
316
+ declare const Sparkline: React.ForwardRefExoticComponent<SparklineProps & React.RefAttributes<SVGSVGElement>>;
317
+
318
+ interface DataTableContextValue<TData> {
319
+ table: Table<TData>;
320
+ selectedRows: TData[];
321
+ hasSelection: boolean;
322
+ globalFilter: string;
323
+ setGlobalFilter: OnChangeFn<string>;
324
+ enableFiltering: boolean;
325
+ enablePagination: boolean;
326
+ enableRowSelection: boolean;
327
+ visibleColumnCount: number;
328
+ }
329
+ /**
330
+ * @template TData 行データ型
331
+ * @template TValue セル値の型 (省略時は任意)
332
+ */
333
+ interface DataTableProps<TData, TValue> {
334
+ /**
335
+ * TanStack Table の列定義配列。
336
+ *
337
+ * `ColumnDef<TData, TValue>[]` を annotation するか配列リテラルに
338
+ * `satisfies ColumnDef<TData>[]` を付けないと、`accessorKey` などの
339
+ * literal が `string` に拡張され型エラーになる。
340
+ *
341
+ * @example
342
+ * import type { ColumnDef } from "@squadbase/vantage/components"
343
+ *
344
+ * const columns: ColumnDef<User>[] = [
345
+ * { accessorKey: "id", header: "ID" },
346
+ * { accessorKey: "name", header: "名前" },
347
+ * ]
348
+ * <DataTable columns={columns} data={users}>...</DataTable>
349
+ */
350
+ columns: ColumnDef<TData, TValue>[];
351
+ data: TData[];
352
+ enableSorting?: boolean;
353
+ sorting?: SortingState;
354
+ onSortingChange?: OnChangeFn<SortingState>;
355
+ enableFiltering?: boolean;
356
+ columnFilters?: ColumnFiltersState;
357
+ onColumnFiltersChange?: OnChangeFn<ColumnFiltersState>;
358
+ globalFilter?: string;
359
+ onGlobalFilterChange?: OnChangeFn<string>;
360
+ enablePagination?: boolean;
361
+ pagination?: PaginationState;
362
+ onPaginationChange?: OnChangeFn<PaginationState>;
363
+ pageCount?: number;
364
+ enableRowSelection?: boolean;
365
+ rowSelection?: RowSelectionState;
366
+ onRowSelectionChange?: OnChangeFn<RowSelectionState>;
367
+ columnVisibility?: VisibilityState;
368
+ onColumnVisibilityChange?: OnChangeFn<VisibilityState>;
369
+ meta?: TableMeta<TData>;
370
+ className?: string;
371
+ /** Required — the parts to render (toolbar, content, pagination). */
372
+ children: ReactNode;
373
+ }
374
+ interface DataTableToolbarProps extends HTMLAttributes<HTMLDivElement> {
375
+ showSearch?: boolean;
376
+ toolbar?: ReactNode;
377
+ bulkActions?: (selectedRows: unknown[]) => ReactNode;
378
+ }
379
+ interface DataTableContentProps extends HTMLAttributes<HTMLDivElement> {
380
+ }
381
+ interface DataTablePaginationProps extends HTMLAttributes<HTMLDivElement> {
382
+ pageSizeOptions?: number[];
383
+ }
384
+ interface DataTableColumnVisibilityProps {
385
+ /** 列 ID をキーとしたラベルマップ。ヘッダーが文字列でない列のラベルを指定する */
386
+ columnLabels?: Record<string, string>;
387
+ className?: string;
388
+ }
389
+ /** The preset takes every `DataTable` prop except `children`, plus a few slots. */
390
+ type DataTablePresetProps<TData, TValue> = Omit<DataTableProps<TData, TValue>, "children"> & {
391
+ enableColumnVisibility?: boolean;
392
+ columnLabels?: Record<string, string>;
393
+ /** Extension slots */
394
+ toolbar?: ReactNode;
395
+ bulkActions?: (selectedRows: TData[]) => ReactNode;
396
+ };
397
+ declare function useDataTable<TData>(): DataTableContextValue<TData>;
398
+ declare function DataTable<TData, TValue>({ columns, data, enableSorting, sorting: sortingProp, onSortingChange, enableFiltering, columnFilters: columnFiltersProp, onColumnFiltersChange, globalFilter: globalFilterProp, onGlobalFilterChange, enablePagination, pagination: paginationProp, onPaginationChange, pageCount, enableRowSelection, rowSelection: rowSelectionProp, onRowSelectionChange, columnVisibility: columnVisibilityProp, onColumnVisibilityChange, meta, className, children, }: DataTableProps<TData, TValue>): React.JSX.Element;
399
+ declare namespace DataTable {
400
+ var displayName: string;
401
+ }
402
+ declare const DataTableToolbar: React.ForwardRefExoticComponent<DataTableToolbarProps & React.RefAttributes<HTMLDivElement>>;
403
+ declare const DataTableContent: React.ForwardRefExoticComponent<DataTableContentProps & React.RefAttributes<HTMLDivElement>>;
404
+ declare const DataTablePagination: React.ForwardRefExoticComponent<DataTablePaginationProps & React.RefAttributes<HTMLDivElement>>;
405
+ declare const DataTableColumnVisibility: React.ForwardRefExoticComponent<DataTableColumnVisibilityProps & React.RefAttributes<HTMLButtonElement>>;
406
+ /** The usual arrangement — toolbar, body and pagination — in one component. */
407
+ declare function DataTablePreset<TData, TValue>({ enableColumnVisibility, columnLabels, toolbar, bulkActions, ...tableProps }: DataTablePresetProps<TData, TValue>): React.JSX.Element;
408
+ declare namespace DataTablePreset {
409
+ var displayName: string;
410
+ }
411
+
412
+ interface FilterBarProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
413
+ value: FilterValues;
414
+ onChange: (values: FilterValues) => void;
415
+ onClear?: () => void;
416
+ className?: string;
417
+ children?: ReactNode;
418
+ }
419
+ declare const FilterBar: React.ForwardRefExoticComponent<FilterBarProps & React.RefAttributes<HTMLDivElement>>;
420
+ interface FilterBarSelectProps {
421
+ filterKey: string;
422
+ label: string;
423
+ options: FilterOption[];
424
+ placeholder?: string;
425
+ className?: string;
426
+ }
427
+ declare function FilterBarSelect({ filterKey, label, options, placeholder, className, }: FilterBarSelectProps): React.JSX.Element;
428
+ declare namespace FilterBarSelect {
429
+ var displayName: string;
430
+ }
431
+ interface FilterBarMultiSelectProps {
432
+ filterKey: string;
433
+ label: string;
434
+ options: FilterOption[];
435
+ placeholder?: string;
436
+ className?: string;
437
+ }
438
+ declare function FilterBarMultiSelect({ filterKey, label, options, placeholder, className, }: FilterBarMultiSelectProps): React.JSX.Element;
439
+ declare namespace FilterBarMultiSelect {
440
+ var displayName: string;
441
+ }
442
+ interface FilterBarActiveChipsProps {
443
+ /** Filter configs used to resolve option labels. Without them, raw values show. */
444
+ filters?: FilterConfig[];
445
+ className?: string;
446
+ }
447
+ declare function FilterBarActiveChips({ filters, className }: FilterBarActiveChipsProps): React.JSX.Element | null;
448
+ declare namespace FilterBarActiveChips {
449
+ var displayName: string;
450
+ }
451
+ interface FilterBarClearButtonProps {
452
+ /** Override the button label. Defaults to "クリア". */
453
+ label?: string;
454
+ className?: string;
455
+ }
456
+ declare function FilterBarClearButton({ label, className }: FilterBarClearButtonProps): React.JSX.Element | null;
457
+ declare namespace FilterBarClearButton {
458
+ var displayName: string;
459
+ }
460
+ interface FilterBarPresetProps {
461
+ filters: FilterConfig[];
462
+ value: FilterValues;
463
+ onChange: (values: FilterValues) => void;
464
+ onClear?: () => void;
465
+ className?: string;
466
+ }
467
+ /** The whole row built from a `FilterConfig[]`. */
468
+ declare function FilterBarPreset({ filters, value, onChange, onClear, className, }: FilterBarPresetProps): React.JSX.Element;
469
+ declare namespace FilterBarPreset {
470
+ var displayName: string;
471
+ }
472
+
473
+ declare const defaultPresets: PresetItem[];
474
+ interface DateRangePickerProps {
475
+ /**
476
+ * 選択中の日付範囲。型は Vantage 独自の `DateRange`。
477
+ * react-day-picker の `DateRange` とは別物なので注意 — そちらが必要なら
478
+ * このファイルの末尾で re-export している `RdpDateRange` を使う。
479
+ *
480
+ * @example
481
+ * import type { DateRange } from "@squadbase/vantage/components"
482
+ *
483
+ * const [range, setRange] = useState<DateRange | undefined>()
484
+ * <DateRangePicker value={range} onChange={setRange} />
485
+ */
486
+ value?: DateRange;
487
+ onChange?: (range: DateRange) => void;
488
+ presets?: PresetItem[];
489
+ showPresets?: boolean;
490
+ maxDate?: Date;
491
+ minDate?: Date;
492
+ placeholder?: string;
493
+ disabled?: boolean;
494
+ className?: string;
495
+ align?: "start" | "center" | "end";
496
+ }
497
+ declare const DateRangePicker: React.ForwardRefExoticComponent<DateRangePickerProps & React.RefAttributes<HTMLDivElement>>;
498
+
499
+ declare const iconSizes: {
500
+ readonly sm: "size-3.5";
501
+ readonly default: "size-4";
502
+ readonly lg: "size-5";
503
+ };
504
+ interface SegmentedControlProps {
505
+ options: SegmentOption[];
506
+ value: string;
507
+ onChange: (value: string) => void;
508
+ size?: keyof typeof iconSizes;
509
+ fullWidth?: boolean;
510
+ ariaLabel?: string;
511
+ className?: string;
512
+ }
513
+ declare const SegmentedControl: React.ForwardRefExoticComponent<SegmentedControlProps & React.RefAttributes<HTMLDivElement>>;
514
+
515
+ interface SearchableSelectProps {
516
+ options: SelectOptions;
517
+ value?: string;
518
+ onChange?: (value: string | undefined) => void;
519
+ onSearch?: (query: string) => void;
520
+ placeholder?: string;
521
+ searchPlaceholder?: string;
522
+ emptyText?: string;
523
+ isLoading?: boolean;
524
+ disabled?: boolean;
525
+ clearable?: boolean;
526
+ className?: string;
527
+ }
528
+ declare const SearchableSelect: React.ForwardRefExoticComponent<SearchableSelectProps & React.RefAttributes<HTMLDivElement>>;
529
+
530
+ interface MultiSelectProps {
531
+ options: SelectOptions;
532
+ value: string[];
533
+ onChange?: (value: string[]) => void;
534
+ onSearch?: (query: string) => void;
535
+ maxCount?: number;
536
+ placeholder?: string;
537
+ searchPlaceholder?: string;
538
+ emptyText?: string;
539
+ isLoading?: boolean;
540
+ disabled?: boolean;
541
+ className?: string;
542
+ }
543
+ declare const MultiSelect: React.ForwardRefExoticComponent<MultiSelectProps & React.RefAttributes<HTMLDivElement>>;
544
+
545
+ declare const metricValueVariants: (props?: ({
546
+ size?: "sm" | "lg" | "md" | "xl" | null | undefined;
547
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
548
+ interface MetricValueProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof metricValueVariants> {
549
+ }
550
+ declare const MetricValue: React.ForwardRefExoticComponent<MetricValueProps & React.RefAttributes<HTMLDivElement>>;
551
+ interface MetricUnitProps extends HTMLAttributes<HTMLSpanElement> {
552
+ }
553
+ declare const MetricUnit: React.ForwardRefExoticComponent<MetricUnitProps & React.RefAttributes<HTMLSpanElement>>;
554
+
555
+ interface TrendIndicatorProps {
556
+ value: number;
557
+ direction: TrendDirection;
558
+ positiveIsGood?: boolean;
559
+ className?: string;
560
+ }
561
+ declare const TrendIndicator: React.ForwardRefExoticComponent<TrendIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
562
+
563
+ interface StatusBadgeProps {
564
+ status: string;
565
+ label?: string;
566
+ colorMap?: Partial<Record<string, string>>;
567
+ className?: string;
568
+ }
569
+ declare const StatusBadge: React.ForwardRefExoticComponent<StatusBadgeProps & React.RefAttributes<HTMLSpanElement>>;
570
+
571
+ interface PlaceholderProps extends HTMLAttributes<HTMLSpanElement> {
572
+ }
573
+ declare const Placeholder: React.ForwardRefExoticComponent<PlaceholderProps & React.RefAttributes<HTMLSpanElement>>;
574
+
575
+ export { AppShell, type AppShellHeaderProps, type AppShellProps, type AppShellSidebarProps, DashboardCard, DashboardCardAction, type DashboardCardActionProps, DashboardCardContent, type DashboardCardContentProps, DashboardCardDescription, type DashboardCardDescriptionProps, DashboardCardFooter, type DashboardCardFooterProps, DashboardCardHeader, type DashboardCardHeaderProps, DashboardCardPreset, type DashboardCardPresetProps, type DashboardCardProps, DashboardCardSkeleton, type DashboardCardSkeletonProps, DashboardCardTitle, type DashboardCardTitleProps, DataTable, DataTableColumnVisibility, type DataTableColumnVisibilityProps, DataTableContent, type DataTableContentProps, DataTablePagination, type DataTablePaginationProps, DataTablePreset, type DataTablePresetProps, type DataTableProps, DataTableToolbar, type DataTableToolbarProps, type DateRange, DateRangePicker, type DateRangePickerProps, EChart, type EChartProps, FilterBar, FilterBarActiveChips, type FilterBarActiveChipsProps, FilterBarClearButton, type FilterBarClearButtonProps, FilterBarMultiSelect, type FilterBarMultiSelectProps, FilterBarPreset, type FilterBarPresetProps, type FilterBarProps, FilterBarSelect, type FilterBarSelectProps, type FilterConfig, type FilterOption, type FilterType, type FilterValues, type FunnelStep, FunnelSteps, type FunnelStepsProps, type MetricItem, MetricUnit, type MetricUnitProps, MetricValue, type MetricValueProps, type MetricVariant, MultiSelect, type MultiSelectProps, type NavGroup, type NavItem, PageShell, PageShellActions, type PageShellActionsProps, PageShellContent, type PageShellContentProps, PageShellDescription, type PageShellDescriptionProps, PageShellHeader, PageShellHeaderEnd, type PageShellHeaderEndProps, type PageShellHeaderProps, PageShellHeading, type PageShellHeadingProps, PageShellMeta, type PageShellMetaProps, type PageShellProps, PageShellSummary, PageShellSummaryCard, type PageShellSummaryCardProps, type PageShellSummaryProps, PageShellTitle, type PageShellTitleProps, Placeholder, type PlaceholderProps, type PresetItem, SearchableSelect, type SearchableSelectProps, SectionHeader, type SectionHeaderProps, type SegmentOption, SegmentedControl, type SegmentedControlProps, type SelectOption, type SelectOptionGroup, type SelectOptions, Sparkline, type SparklineDataPoint, type SparklineProps, type SparklineVariant, StatusBadge, type StatusBadgeProps, type TrendDirection, TrendIndicator, type TrendIndicatorProps, defaultPresets, flattenOptions, funnelStepsVariants, isGroupedOptions, metricValueVariants, pageShellSummaryCardVariants, useDataTable };