@squadbase/vantage 0.6.2-dev1.42c4e48 → 0.6.2-dev1.51e401a

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 (295) hide show
  1. package/dist/{build-MFWRPYKW.js → build-U7GO26HR.js} +7 -7
  2. package/dist/{build-MFWRPYKW.js.map → build-U7GO26HR.js.map} +1 -1
  3. package/dist/{check-ZBIH422T.js → check-MRVAIHG5.js} +5 -5
  4. package/dist/{check-ZBIH422T.js.map → check-MRVAIHG5.js.map} +1 -1
  5. package/dist/chunk-2IAPIOPS.js +152 -0
  6. package/dist/chunk-2IAPIOPS.js.map +1 -0
  7. package/dist/chunk-3RJEOP3J.js +174 -0
  8. package/dist/chunk-3RJEOP3J.js.map +1 -0
  9. package/dist/chunk-77CISBMG.js +7581 -0
  10. package/dist/chunk-77CISBMG.js.map +1 -0
  11. package/dist/{chunk-V3LF7BE7.js → chunk-ANZLVSEP.js} +4 -5
  12. package/dist/chunk-ANZLVSEP.js.map +1 -0
  13. package/dist/{chunk-XQUSGIDG.js → chunk-CKWPK4RO.js} +10 -3
  14. package/dist/chunk-CKWPK4RO.js.map +1 -0
  15. package/dist/chunk-EG4PX726.js +678 -0
  16. package/dist/chunk-EG4PX726.js.map +1 -0
  17. package/dist/chunk-NZ5QIIG4.js +74 -0
  18. package/dist/chunk-NZ5QIIG4.js.map +1 -0
  19. package/dist/{chunk-7DZGJQ3P.js → chunk-PJ4SPXHS.js} +23 -6
  20. package/dist/chunk-PJ4SPXHS.js.map +1 -0
  21. package/dist/{chunk-OB6UBJXF.js → chunk-QNOX7WLZ.js} +127 -36
  22. package/dist/chunk-QNOX7WLZ.js.map +1 -0
  23. package/dist/{chunk-PXRX5PEC.js → chunk-ROHNXP7J.js} +73 -4
  24. package/dist/chunk-ROHNXP7J.js.map +1 -0
  25. package/dist/{chunk-CEXAQQ5W.js → chunk-S5MDTHH7.js} +180 -18
  26. package/dist/chunk-S5MDTHH7.js.map +1 -0
  27. package/dist/{chunk-IBGOCWJB.js → chunk-SDJTTMLK.js} +247 -86
  28. package/dist/chunk-SDJTTMLK.js.map +1 -0
  29. package/dist/{chunk-QEWCYW3I.js → chunk-SHZM3EXB.js} +29 -8
  30. package/dist/chunk-SHZM3EXB.js.map +1 -0
  31. package/dist/chunk-TRMHNMMZ.js +61 -0
  32. package/dist/chunk-TRMHNMMZ.js.map +1 -0
  33. package/dist/{chunk-A2UUGASH.js → chunk-U736PVHY.js} +2 -2
  34. package/dist/chunk-U736PVHY.js.map +1 -0
  35. package/dist/{chunk-JKLLFVEU.js → chunk-UWSQUHX6.js} +4 -99
  36. package/dist/chunk-UWSQUHX6.js.map +1 -0
  37. package/dist/cli.js +6 -6
  38. package/dist/client/index.d.ts +2 -0
  39. package/dist/client/index.js +8 -2
  40. package/dist/client/index.js.map +1 -1
  41. package/dist/components/index.d.ts +1617 -101
  42. package/dist/components/index.js +7 -4
  43. package/dist/delta-text-CbrOaW83.d.ts +17 -0
  44. package/dist/{dev-DCTOHQ6W.js → dev-O42JFQ64.js} +7 -7
  45. package/dist/{dev-DCTOHQ6W.js.map → dev-O42JFQ64.js.map} +1 -1
  46. package/dist/doc/index.d.ts +215 -2
  47. package/dist/doc/index.js +423 -5
  48. package/dist/doc/index.js.map +1 -1
  49. package/dist/{doctor-5E2VEZPK.js → doctor-YD3XAAOT.js} +5 -5
  50. package/dist/{doctor-5E2VEZPK.js.map → doctor-YD3XAAOT.js.map} +1 -1
  51. package/dist/format-DihQkL1N.d.ts +249 -0
  52. package/dist/markdown/index.js +1 -1
  53. package/dist/markdown/index.js.map +1 -1
  54. package/dist/query/index.js +2 -2
  55. package/dist/{routes-3SGAFDMC.js → routes-PVKNT777.js} +4 -4
  56. package/dist/{routes-3SGAFDMC.js.map → routes-PVKNT777.js.map} +1 -1
  57. package/dist/slide/index.d.ts +272 -1
  58. package/dist/slide/index.js +1025 -4
  59. package/dist/slide/index.js.map +1 -1
  60. package/dist/table/index.js +11 -8
  61. package/dist/table/index.js.map +1 -1
  62. package/dist/ui/index.d.ts +8 -2
  63. package/dist/ui/index.js +22 -112
  64. package/dist/ui/index.js.map +1 -1
  65. package/dist/{upgrade-DBBE6GIR.js → upgrade-6DT7ADRP.js} +4 -4
  66. package/dist/{upgrade-DBBE6GIR.js.map → upgrade-6DT7ADRP.js.map} +1 -1
  67. package/dist/vite/index.js +3 -3
  68. package/docs/en/agent-skills.md +1 -1
  69. package/docs/en/changelog.md +2 -0
  70. package/docs/en/components.md +42 -17
  71. package/docs/en/doc/delta-text.md +40 -0
  72. package/docs/en/doc/doc-action-items.md +49 -0
  73. package/docs/en/doc/doc-callout.md +38 -0
  74. package/docs/en/doc/doc-data-table.md +60 -0
  75. package/docs/en/doc/doc-executive-summary.md +64 -0
  76. package/docs/en/doc/doc-figure.md +56 -0
  77. package/docs/en/doc/doc-key-findings.md +61 -0
  78. package/docs/en/doc/doc-kpi-scorecard.md +80 -0
  79. package/docs/en/doc/doc-notes-and-sources.md +43 -0
  80. package/docs/en/doc/doc-report-header.md +46 -0
  81. package/docs/en/pages-and-metadata.md +15 -0
  82. package/docs/en/parts/area-chart.md +99 -0
  83. package/docs/en/parts/bar-chart.md +91 -0
  84. package/docs/en/parts/bar-list.md +50 -0
  85. package/docs/en/parts/category-bar.md +37 -0
  86. package/docs/en/parts/chart-frame.md +39 -0
  87. package/docs/en/parts/data-table.md +22 -0
  88. package/docs/en/parts/delta.md +51 -0
  89. package/docs/en/parts/donut-chart.md +72 -0
  90. package/docs/en/parts/format.md +43 -0
  91. package/docs/en/parts/funnel-steps.md +2 -1
  92. package/docs/en/parts/heatmap.md +53 -0
  93. package/docs/en/parts/kpi-card.md +58 -0
  94. package/docs/en/parts/legend.md +35 -0
  95. package/docs/en/parts/line-chart.md +94 -0
  96. package/docs/en/parts/metric-value.md +3 -2
  97. package/docs/en/parts/progress-circle.md +33 -0
  98. package/docs/en/parts/sample-data.md +39 -0
  99. package/docs/en/parts/scatter-chart.md +56 -0
  100. package/docs/en/parts/sparkline.md +1 -1
  101. package/docs/en/parts/tracker.md +36 -0
  102. package/docs/en/parts/trend-indicator.md +17 -1
  103. package/docs/en/parts/updated-at.md +30 -0
  104. package/docs/en/parts/waterfall-chart.md +56 -0
  105. package/docs/en/slide/slide-chart-full.md +48 -0
  106. package/docs/en/slide/slide-chart-insight.md +52 -0
  107. package/docs/en/slide/slide-columns.md +46 -0
  108. package/docs/en/slide/slide-comparison.md +68 -0
  109. package/docs/en/slide/slide-cover.md +39 -0
  110. package/docs/en/slide/slide-exec-summary.md +47 -0
  111. package/docs/en/slide/slide-heading.md +38 -0
  112. package/docs/en/slide/slide-kpi-grid.md +55 -0
  113. package/docs/en/slide/slide-kpi-hero.md +58 -0
  114. package/docs/en/slide/slide-next-actions.md +49 -0
  115. package/docs/en/slide/slide-scorecard-table.md +54 -0
  116. package/docs/en/slide/slide-section.md +44 -0
  117. package/docs/en/slide/slide-source-line.md +34 -0
  118. package/docs/en/ui/alert-dialog.md +42 -0
  119. package/docs/en/ui/avatar.md +31 -0
  120. package/docs/en/ui/combobox.md +74 -0
  121. package/docs/en/ui/drawer.md +41 -0
  122. package/docs/en/ui/empty.md +1 -1
  123. package/docs/en/ui/error-state.md +4 -3
  124. package/docs/en/ui/field.md +42 -0
  125. package/docs/en/ui/hover-card.md +21 -0
  126. package/docs/en/ui/kbd.md +17 -0
  127. package/docs/en/ui/loading.md +1 -1
  128. package/docs/en/ui/pagination.md +36 -0
  129. package/docs/en/ui/radio-group.md +21 -0
  130. package/docs/en/ui/toast.md +44 -0
  131. package/docs/en/ui/toggle-group.md +4 -3
  132. package/docs/en/ui-and-theming.md +1 -1
  133. package/docs/index.json +917 -77
  134. package/docs/ja/agent-skills.md +1 -1
  135. package/docs/ja/changelog.md +2 -0
  136. package/docs/ja/components.md +39 -16
  137. package/docs/ja/doc/delta-text.md +40 -0
  138. package/docs/ja/doc/doc-action-items.md +49 -0
  139. package/docs/ja/doc/doc-callout.md +38 -0
  140. package/docs/ja/doc/doc-data-table.md +60 -0
  141. package/docs/ja/doc/doc-executive-summary.md +64 -0
  142. package/docs/ja/doc/doc-figure.md +56 -0
  143. package/docs/ja/doc/doc-key-findings.md +61 -0
  144. package/docs/ja/doc/doc-kpi-scorecard.md +80 -0
  145. package/docs/ja/doc/doc-notes-and-sources.md +43 -0
  146. package/docs/ja/doc/doc-report-header.md +46 -0
  147. package/docs/ja/page-types/slide.md +1 -0
  148. package/docs/ja/pages-and-metadata.md +15 -0
  149. package/docs/ja/parts/area-chart.md +49 -25
  150. package/docs/ja/parts/bar-chart.md +50 -24
  151. package/docs/ja/parts/bar-list.md +31 -8
  152. package/docs/ja/parts/chart-frame.md +36 -0
  153. package/docs/ja/parts/data-table.md +22 -0
  154. package/docs/ja/parts/delta.md +51 -0
  155. package/docs/ja/parts/donut-chart.md +45 -26
  156. package/docs/ja/parts/format.md +44 -0
  157. package/docs/ja/parts/funnel-steps.md +27 -8
  158. package/docs/ja/parts/heatmap.md +45 -0
  159. package/docs/ja/parts/kpi-card.md +56 -0
  160. package/docs/ja/parts/legend.md +36 -0
  161. package/docs/ja/parts/line-chart.md +48 -22
  162. package/docs/ja/parts/metric-value.md +3 -2
  163. package/docs/ja/parts/sample-data.md +61 -0
  164. package/docs/ja/parts/scatter-chart.md +69 -0
  165. package/docs/ja/parts/sparkline.md +1 -1
  166. package/docs/ja/parts/trend-indicator.md +17 -1
  167. package/docs/ja/parts/updated-at.md +27 -0
  168. package/docs/ja/parts/waterfall-chart.md +61 -0
  169. package/docs/ja/slide/slide-chart-full.md +48 -0
  170. package/docs/ja/slide/slide-chart-insight.md +52 -0
  171. package/docs/ja/slide/slide-columns.md +46 -0
  172. package/docs/ja/slide/slide-comparison.md +68 -0
  173. package/docs/ja/slide/slide-cover.md +39 -0
  174. package/docs/ja/slide/slide-exec-summary.md +47 -0
  175. package/docs/ja/slide/slide-heading.md +38 -0
  176. package/docs/ja/slide/slide-kpi-grid.md +55 -0
  177. package/docs/ja/slide/slide-kpi-hero.md +58 -0
  178. package/docs/ja/slide/slide-next-actions.md +49 -0
  179. package/docs/ja/slide/slide-scorecard-table.md +54 -0
  180. package/docs/ja/slide/slide-section.md +44 -0
  181. package/docs/ja/slide/slide-source-line.md +34 -0
  182. package/docs/ja/ui/empty.md +1 -1
  183. package/docs/ja/ui/error-state.md +4 -3
  184. package/docs/ja/ui/loading.md +1 -1
  185. package/docs/ja/ui/toggle-group.md +4 -3
  186. package/docs/ja/ui-and-theming.md +2 -2
  187. package/package.json +26 -24
  188. package/registry/ui/accordion.tsx +4 -2
  189. package/registry/ui/alert-dialog.tsx +3 -3
  190. package/registry/ui/alert.tsx +3 -1
  191. package/registry/ui/app-shell.tsx +145 -2
  192. package/registry/ui/area-chart.tsx +3111 -166
  193. package/registry/ui/attention-list.tsx +465 -0
  194. package/registry/ui/avatar.tsx +1 -1
  195. package/registry/ui/badge.tsx +3 -1
  196. package/registry/ui/bar-chart.tsx +3105 -164
  197. package/registry/ui/bar-list.tsx +3877 -181
  198. package/registry/ui/box-plot-chart.tsx +4214 -0
  199. package/registry/ui/breadcrumb.tsx +3 -1
  200. package/registry/ui/button.tsx +3 -1
  201. package/registry/ui/calendar.tsx +3 -1
  202. package/registry/ui/card.tsx +4 -2
  203. package/registry/ui/category-bar.tsx +1233 -16
  204. package/registry/ui/chart-frame.tsx +1604 -0
  205. package/registry/ui/checkbox.tsx +3 -1
  206. package/registry/ui/collapsible.tsx +3 -1
  207. package/registry/ui/combobox.tsx +2 -2
  208. package/registry/ui/command.tsx +3 -1
  209. package/registry/ui/dashboard-card.tsx +71 -28
  210. package/registry/ui/data-table.tsx +882 -68
  211. package/registry/ui/date-range-picker.tsx +400 -65
  212. package/registry/ui/delta.tsx +350 -0
  213. package/registry/ui/dialog.tsx +5 -3
  214. package/registry/ui/donut-chart.tsx +3184 -182
  215. package/registry/ui/drawer.tsx +1 -1
  216. package/registry/ui/dropdown-menu.tsx +5 -3
  217. package/registry/ui/echart.tsx +761 -69
  218. package/registry/ui/field.tsx +1 -1
  219. package/registry/ui/filter-bar.tsx +212 -26
  220. package/registry/ui/funnel-steps.tsx +3622 -53
  221. package/registry/ui/heatmap.tsx +2027 -0
  222. package/registry/ui/histogram-chart.tsx +4284 -0
  223. package/registry/ui/hover-card.tsx +2 -2
  224. package/registry/ui/input-group.tsx +3 -1
  225. package/registry/ui/input.tsx +3 -1
  226. package/registry/ui/kbd.tsx +3 -1
  227. package/registry/ui/kpi-card.tsx +905 -0
  228. package/registry/ui/label.tsx +3 -1
  229. package/registry/ui/legend.tsx +3817 -0
  230. package/registry/ui/line-chart.tsx +3109 -158
  231. package/registry/ui/metric-value.tsx +9 -1
  232. package/registry/ui/multi-select.tsx +170 -14
  233. package/registry/ui/page-shell.tsx +244 -51
  234. package/registry/ui/pagination.tsx +3 -1
  235. package/registry/ui/paired-chart.tsx +4086 -0
  236. package/registry/ui/placeholder.tsx +8 -2
  237. package/registry/ui/popover.tsx +4 -2
  238. package/registry/ui/progress-circle.tsx +773 -12
  239. package/registry/ui/progress.tsx +3 -1
  240. package/registry/ui/radio-group.tsx +1 -1
  241. package/registry/ui/sample-data.tsx +230 -0
  242. package/registry/ui/scatter-chart.tsx +4503 -0
  243. package/registry/ui/scroll-area.tsx +3 -2
  244. package/registry/ui/searchable-select.tsx +153 -10
  245. package/registry/ui/section-header.tsx +5 -3
  246. package/registry/ui/segmented-control.tsx +7 -2
  247. package/registry/ui/select.tsx +4 -2
  248. package/registry/ui/separator.tsx +3 -1
  249. package/registry/ui/sheet.tsx +4 -2
  250. package/registry/ui/sidebar.tsx +4 -2
  251. package/registry/ui/skeleton.tsx +4 -2
  252. package/registry/ui/slider.tsx +4 -2
  253. package/registry/ui/sparkline.tsx +84 -9
  254. package/registry/ui/spinner.tsx +3 -1
  255. package/registry/ui/states.tsx +194 -8
  256. package/registry/ui/status-badge.tsx +246 -39
  257. package/registry/ui/switch.tsx +3 -1
  258. package/registry/ui/table.tsx +4 -2
  259. package/registry/ui/tabs.tsx +5 -3
  260. package/registry/ui/textarea.tsx +3 -1
  261. package/registry/ui/toast.tsx +2 -2
  262. package/registry/ui/toggle-group.tsx +3 -1
  263. package/registry/ui/toggle.tsx +3 -1
  264. package/registry/ui/tooltip.tsx +10 -4
  265. package/registry/ui/tracker.tsx +798 -19
  266. package/registry/ui/trend-indicator.tsx +164 -9
  267. package/registry/ui/updated-at.tsx +276 -0
  268. package/registry/ui/waterfall-chart.tsx +4561 -0
  269. package/skills/vantage-add-feature/SKILL.md +5 -0
  270. package/skills/vantage-design/SKILL.md +60 -52
  271. package/skills/vantage-design/references/extract.md +26 -27
  272. package/skills/vantage-design/references/format.md +12 -172
  273. package/skills/vantage-design/references/presets.md +50 -110
  274. package/skills/vantage-pitfalls/SKILL.md +5 -0
  275. package/skills/vantage-slide/SKILL.md +54 -36
  276. package/templates/AGENTS.md +45 -16
  277. package/templates/agents/api.md +7 -0
  278. package/templates/agents/doc.md +48 -0
  279. package/templates/agents/page.md +69 -2
  280. package/templates/agents/slide.md +77 -3
  281. package/theme.css +247 -149
  282. package/dist/chunk-5ZOP4SQR.js +0 -47
  283. package/dist/chunk-5ZOP4SQR.js.map +0 -1
  284. package/dist/chunk-7DZGJQ3P.js.map +0 -1
  285. package/dist/chunk-A2UUGASH.js.map +0 -1
  286. package/dist/chunk-AG6RZ2RR.js +0 -3208
  287. package/dist/chunk-AG6RZ2RR.js.map +0 -1
  288. package/dist/chunk-CEXAQQ5W.js.map +0 -1
  289. package/dist/chunk-IBGOCWJB.js.map +0 -1
  290. package/dist/chunk-JKLLFVEU.js.map +0 -1
  291. package/dist/chunk-OB6UBJXF.js.map +0 -1
  292. package/dist/chunk-PXRX5PEC.js.map +0 -1
  293. package/dist/chunk-QEWCYW3I.js.map +0 -1
  294. package/dist/chunk-V3LF7BE7.js.map +0 -1
  295. package/dist/chunk-XQUSGIDG.js.map +0 -1
@@ -1,8 +1,14 @@
1
1
  // Copied by `vantage add ui metric-value`. This file is yours to edit.
2
- // Generated from @squadbase/vantage src/components/metric-value.tsx by `npm run registry` (in Vantage, edit src/, not registry/).
2
+ // Generated from @squadbase/squadkit registry/components/metric-value.tsx by `pnpm run registry` (in Vantage, edit packages/squadkit, not registry/).
3
+ "use client"
4
+
3
5
  /**
4
6
  * MetricValue / MetricUnit — the large number in a dashboard tile and its
5
7
  * trailing unit, sized as a pair so the unit stays subordinate at every size.
8
+ *
9
+ * @deprecated KPI の数字は KpiCard を使う。KpiCard は書式(`format`、単位は
10
+ * `{ type: "number", unit: "社" }`)・比較ラベル・増減を値から計算するので、
11
+ * 手書きの数字と TrendIndicator の組み合わせのように食い違わない。
6
12
  */
7
13
  import { forwardRef, type HTMLAttributes } from "react"
8
14
  import { cva, type VariantProps } from "class-variance-authority"
@@ -27,6 +33,7 @@ export interface MetricValueProps
27
33
  extends HTMLAttributes<HTMLDivElement>,
28
34
  VariantProps<typeof metricValueVariants> {}
29
35
 
36
+ /** @deprecated KPI の数字は KpiCard を使う。 */
30
37
  export const MetricValue = forwardRef<HTMLDivElement, MetricValueProps>(
31
38
  ({ className, size, ...props }, ref) => (
32
39
  <div
@@ -41,6 +48,7 @@ MetricValue.displayName = "MetricValue"
41
48
 
42
49
  export interface MetricUnitProps extends HTMLAttributes<HTMLSpanElement> {}
43
50
 
51
+ /** @deprecated KPI の単位は KpiCard の `format`(`{ type: "number", unit: "社" }`)で付ける。 */
44
52
  export const MetricUnit = forwardRef<HTMLSpanElement, MetricUnitProps>(
45
53
  ({ className, ...props }, ref) => (
46
54
  <span
@@ -1,8 +1,10 @@
1
1
  // Copied by `vantage add ui multi-select`. This file is yours to edit.
2
- // Generated from @squadbase/vantage src/components/multi-select.tsx by `npm run registry` (in Vantage, edit src/, not registry/).
2
+ // Generated from @squadbase/squadkit registry/components/multi-select.tsx by `pnpm run registry` (in Vantage, edit packages/squadkit, not registry/).
3
+ "use client"
4
+
3
5
  /**
4
6
  * MultiSelect — a multi-value combobox that shows the selection as removable
5
- * badges. Past `maxCount` badges the rest collapse into a "+N件" counter.
7
+ * badges. Past `maxCount` badges the rest collapse into a "+N more" (ja: "+N件") counter.
6
8
  * Pass `onSearch` to take filtering over yourself (server-side search).
7
9
  */
8
10
  import { forwardRef, useId, useMemo, useState } from "react"
@@ -12,12 +14,144 @@ import { cn } from "@squadbase/vantage/ui"
12
14
  import { Badge } from "@squadbase/vantage/ui"
13
15
  import { Popover, PopoverContent, PopoverTrigger } from "@squadbase/vantage/ui"
14
16
  import { flattenOptions, type SelectOptions } from "@squadbase/vantage/components"
17
+ import { useSyncExternalStore } from "react"
15
18
  import type { KeyboardEvent, MouseEvent } from "react"
16
19
  import { CheckIcon, LoaderIcon, XIcon } from "lucide-react"
17
20
  import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@squadbase/vantage/ui"
18
21
  import { isGroupedOptions, type SelectOption } from "@squadbase/vantage/components"
19
22
 
20
- /* ---------- inlined from src/components/option-command.tsx (internal to @squadbase/vantage) ---------- */
23
+ /* ---------- inlined from @squadbase/squadkit registry/lib/locale.ts (internal to @squadbase/vantage) ---------- */
24
+
25
+ /**
26
+ * The display language of the parts and the defaults that follow it.
27
+ *
28
+ * The language comes from `<html lang>`: a tag starting with `ja` reads Japanese, anything else English.
29
+ * Without a usable `lang` (missing, invalid, or no `document` — SSR, Node) the locale is `FALLBACK_LOCALE`
30
+ * (`en-US`). A `locale` passed explicitly (a prop, an argument) always wins.
31
+ *
32
+ * Parts read the locale through `useLocale` (`hooks/use-locale`) and pass it down; the pure helpers here
33
+ * and in `format` / `comparison` / `chart-*` take it as an argument and fall back to `documentLocale()`.
34
+ */
35
+
36
+ /** The language of the built-in wording: Japanese or English. */
37
+ type UiLanguage = "ja" | "en"
38
+
39
+ /** The locale used when `<html lang>` gives none (and on the server). */
40
+ const FALLBACK_LOCALE = "en-US"
41
+
42
+ /** `"ja"` when `locale` starts with `ja` (`ja`, `ja-JP`), else `"en"`. A missing locale is `"en"`. */
43
+ function uiLanguage(locale: string | null | undefined): UiLanguage {
44
+ return typeof locale === "string" && locale.trim().toLowerCase().startsWith("ja") ? "ja" : "en"
45
+ }
46
+
47
+ /** A BCP 47 tag in its canonical form (`en-gb` → `en-GB`), or `FALLBACK_LOCALE` when it is empty or invalid. */
48
+ function normalizeLocale(tag: string | null | undefined): string {
49
+ const value = tag?.trim()
50
+ if (!value) return FALLBACK_LOCALE
51
+ try {
52
+ return Intl.getCanonicalLocales(value)[0] ?? FALLBACK_LOCALE
53
+ } catch {
54
+ return FALLBACK_LOCALE
55
+ }
56
+ }
57
+
58
+ /**
59
+ * The locale of the page: `document.documentElement.lang`, canonicalized. `FALLBACK_LOCALE` when it is empty or
60
+ * invalid, or there is no `document`. Parts read it through `useLocale`, never while rendering.
61
+ */
62
+ function documentLocale(): string {
63
+ if (typeof document === "undefined") return FALLBACK_LOCALE
64
+ return normalizeLocale(document.documentElement?.getAttribute("lang"))
65
+ }
66
+
67
+ /** `locale` when given, else the page's locale (`documentLocale()`). */
68
+ function resolveLocale(locale?: string | null): string {
69
+ return locale || documentLocale()
70
+ }
71
+
72
+ /** Picks the wording table of the locale's language. */
73
+ function pickLocale<T>(table: { ja: T; en: T }, locale?: string | null): T {
74
+ return table[uiLanguage(resolveLocale(locale))]
75
+ }
76
+
77
+ /** The currency `format="currency"` uses without a `currency`: JPY for Japanese, USD otherwise. */
78
+ function defaultCurrency(locale?: string | null): string {
79
+ return uiLanguage(resolveLocale(locale)) === "ja" ? "JPY" : "USD"
80
+ }
81
+
82
+ /** The month a fiscal year starts in (1–12) when none is given: April for Japanese, January otherwise. */
83
+ function defaultFiscalYearStartMonth(locale?: string | null): number {
84
+ return uiLanguage(resolveLocale(locale)) === "ja" ? 4 : 1
85
+ }
86
+
87
+ /** A day of the week, 0 = Sunday … 6 = Saturday (the `Date#getDay` / date-fns numbering). */
88
+ type WeekDay = 0 | 1 | 2 | 3 | 4 | 5 | 6
89
+
90
+ /** Locales whose week starts on Sunday when the runtime has no week data. */
91
+ const SUNDAY_FIRST = new Set(["en", "en-US", "en-CA"])
92
+
93
+ /**
94
+ * The first day of the week: Monday for Japanese; otherwise the locale's convention from `Intl.Locale`
95
+ * (`en-US` Sunday, `en-GB` Monday). Without week data in the runtime: Sunday for `en` / `en-US` / `en-CA`,
96
+ * Monday for the rest.
97
+ */
98
+ function weekStartsOn(locale?: string | null): WeekDay {
99
+ const tag = normalizeLocale(resolveLocale(locale))
100
+ if (uiLanguage(tag) === "ja") return 1
101
+ try {
102
+ const info = new Intl.Locale(tag) as Intl.Locale & {
103
+ getWeekInfo?: () => { firstDay: number }
104
+ weekInfo?: { firstDay: number }
105
+ }
106
+ const firstDay = info.getWeekInfo?.().firstDay ?? info.weekInfo?.firstDay
107
+ if (typeof firstDay === "number" && firstDay >= 1 && firstDay <= 7) return (firstDay % 7) as WeekDay
108
+ } catch {
109
+ // Fall through to the table below.
110
+ }
111
+ return SUNDAY_FIRST.has(tag) ? 0 : 1
112
+ }
113
+
114
+ /* ---------- inlined from @squadbase/squadkit registry/hooks/use-locale.ts (internal to @squadbase/vantage) ---------- */
115
+
116
+ const listeners = new Set<() => void>()
117
+ let observer: MutationObserver | null = null
118
+
119
+ /** One observer on `<html lang>` for every subscribed part. */
120
+ function subscribe(onChange: () => void): () => void {
121
+ if (typeof document === "undefined" || typeof MutationObserver === "undefined") return () => {}
122
+ listeners.add(onChange)
123
+ if (!observer) {
124
+ observer = new MutationObserver(() => {
125
+ for (const listener of [...listeners]) listener()
126
+ })
127
+ observer.observe(document.documentElement, { attributes: true, attributeFilter: ["lang"] })
128
+ }
129
+ return () => {
130
+ listeners.delete(onChange)
131
+ if (listeners.size === 0 && observer) {
132
+ observer.disconnect()
133
+ observer = null
134
+ }
135
+ }
136
+ }
137
+
138
+ const serverLocale = () => FALLBACK_LOCALE
139
+
140
+ /**
141
+ * The page's locale (`<html lang>`), following changes made while the page runs. On the server and during
142
+ * hydration it is `FALLBACK_LOCALE` (`en-US`), so the markup matches; it switches right after.
143
+ */
144
+ function useDocumentLocale(): string {
145
+ return useSyncExternalStore(subscribe, documentLocale, serverLocale)
146
+ }
147
+
148
+ /** The locale a part renders in: its `locale` prop when given, else the page's (`useDocumentLocale`). */
149
+ function useLocale(locale?: string | null): string {
150
+ const page = useDocumentLocale()
151
+ return locale || page
152
+ }
153
+
154
+ /* ---------- inlined from @squadbase/squadkit registry/components/option-command.tsx (internal to @squadbase/vantage) ---------- */
21
155
 
22
156
  interface OptionCommandListProps {
23
157
  options: SelectOptions
@@ -134,16 +268,37 @@ export interface MultiSelectProps {
134
268
  className?: string
135
269
  }
136
270
 
271
+ const TEXT = {
272
+ ja: {
273
+ placeholder: "選択してください",
274
+ search: "検索...",
275
+ empty: "見つかりませんでした",
276
+ remove: (label: string) => `${label}を削除`,
277
+ more: (count: number) => `+${count}件`,
278
+ },
279
+ en: {
280
+ placeholder: "Select options",
281
+ search: "Search...",
282
+ empty: "No results found.",
283
+ remove: (label: string) => `Remove ${label}`,
284
+ more: (count: number) => `+${count} more`,
285
+ },
286
+ }
287
+
288
+ /** Not given yet (a draft fills props in steps): render empty, keep the same value between renders. */
289
+ const NO_OPTIONS: never[] = []
290
+ const NO_VALUES: string[] = []
291
+
137
292
  export const MultiSelect = forwardRef<HTMLDivElement, MultiSelectProps>(function MultiSelect(
138
293
  {
139
- options,
140
- value,
294
+ options = NO_OPTIONS,
295
+ value = NO_VALUES,
141
296
  onChange,
142
297
  onSearch,
143
298
  maxCount = 3,
144
- placeholder = "選択してください",
145
- searchPlaceholder = "検索...",
146
- emptyText = "見つかりませんでした",
299
+ placeholder,
300
+ searchPlaceholder,
301
+ emptyText,
147
302
  isLoading = false,
148
303
  disabled = false,
149
304
  className,
@@ -152,6 +307,7 @@ export const MultiSelect = forwardRef<HTMLDivElement, MultiSelectProps>(function
152
307
  ) {
153
308
  const [open, setOpen] = useState(false)
154
309
  const listId = useId()
310
+ const t = TEXT[uiLanguage(useLocale())]
155
311
 
156
312
  const allOptions = useMemo(() => flattenOptions(options), [options])
157
313
  const selectedOptions = useMemo(
@@ -179,20 +335,20 @@ export const MultiSelect = forwardRef<HTMLDivElement, MultiSelectProps>(function
179
335
  aria-controls={listId}
180
336
  disabled={disabled}
181
337
  className={cn(
182
- "inline-flex min-h-9 w-full items-center justify-between gap-2 rounded-md border bg-background px-3 py-1.5 text-sm shadow-xs transition-all outline-none hover:bg-accent hover:text-accent-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
338
+ "inline-flex min-h-9 w-full items-center justify-between gap-2 rounded-md border bg-background px-3 py-1.5 text-sm shadow-xs transition-[color,background-color,border-color,box-shadow] outline-none hover:bg-accent hover:text-accent-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
183
339
  className,
184
340
  )}
185
341
  >
186
342
  <span className="flex min-w-0 flex-1 flex-wrap items-center gap-1">
187
343
  {selectedOptions.length === 0 ? (
188
- <span className="text-muted-foreground">{placeholder}</span>
344
+ <span className="text-muted-foreground">{placeholder ?? t.placeholder}</span>
189
345
  ) : (
190
346
  <>
191
347
  {visibleBadges.map((option) => (
192
348
  <Badge key={option.value} variant="secondary" className="shrink-0 gap-1 pr-1">
193
349
  <span className="max-w-[120px] truncate">{option.label}</span>
194
350
  <RemoveButton
195
- label={`${option.label}を削除`}
351
+ label={t.remove(option.label)}
196
352
  onRemove={() => onChange?.(value.filter((v) => v !== option.value))}
197
353
  iconClassName="size-3"
198
354
  />
@@ -200,7 +356,7 @@ export const MultiSelect = forwardRef<HTMLDivElement, MultiSelectProps>(function
200
356
  ))}
201
357
  {overflowCount > 0 && (
202
358
  <Badge variant="secondary" className="shrink-0">
203
- +{overflowCount}件
359
+ {t.more(overflowCount)}
204
360
  </Badge>
205
361
  )}
206
362
  </>
@@ -215,8 +371,8 @@ export const MultiSelect = forwardRef<HTMLDivElement, MultiSelectProps>(function
215
371
  onSelect={handleSelect}
216
372
  onSearch={onSearch}
217
373
  isLoading={isLoading}
218
- searchPlaceholder={searchPlaceholder}
219
- emptyText={emptyText}
374
+ searchPlaceholder={searchPlaceholder ?? t.search}
375
+ emptyText={emptyText ?? t.empty}
220
376
  />
221
377
  </PopoverContent>
222
378
  </Popover>
@@ -1,14 +1,153 @@
1
1
  // Copied by `vantage add ui page-shell`. This file is yours to edit.
2
- // Generated from @squadbase/vantage src/components/page-shell.tsx by `npm run registry` (in Vantage, edit src/, not registry/).
2
+ // Generated from @squadbase/squadkit registry/components/page-shell.tsx by `pnpm run registry` (in Vantage, edit packages/squadkit, not registry/).
3
+ "use client"
4
+
3
5
  /**
4
6
  * PageShell — the standard page frame: a bordered header band (title,
5
7
  * description, meta, actions), an optional summary card row, and the content
6
8
  * area. Composed from parts so a page can use only what it needs.
7
9
  */
8
- import { forwardRef, type HTMLAttributes } from "react"
10
+ import { forwardRef, type HTMLAttributes, type ReactNode } from "react"
9
11
  import { cva, type VariantProps } from "class-variance-authority"
10
12
 
13
+ import { formatDateRange, EMPTY_VALUE } from "@squadbase/vantage/components"
11
14
  import { cn } from "@squadbase/vantage/ui"
15
+ import { Badge } from "@squadbase/vantage/ui"
16
+ import { UpdatedAt, type UpdatedAtProps } from "@squadbase/vantage/components"
17
+ import { useSyncExternalStore } from "react"
18
+
19
+ /* ---------- inlined from @squadbase/squadkit registry/lib/locale.ts (internal to @squadbase/vantage) ---------- */
20
+
21
+ /**
22
+ * The display language of the parts and the defaults that follow it.
23
+ *
24
+ * The language comes from `<html lang>`: a tag starting with `ja` reads Japanese, anything else English.
25
+ * Without a usable `lang` (missing, invalid, or no `document` — SSR, Node) the locale is `FALLBACK_LOCALE`
26
+ * (`en-US`). A `locale` passed explicitly (a prop, an argument) always wins.
27
+ *
28
+ * Parts read the locale through `useLocale` (`hooks/use-locale`) and pass it down; the pure helpers here
29
+ * and in `format` / `comparison` / `chart-*` take it as an argument and fall back to `documentLocale()`.
30
+ */
31
+
32
+ /** The language of the built-in wording: Japanese or English. */
33
+ type UiLanguage = "ja" | "en"
34
+
35
+ /** The locale used when `<html lang>` gives none (and on the server). */
36
+ const FALLBACK_LOCALE = "en-US"
37
+
38
+ /** `"ja"` when `locale` starts with `ja` (`ja`, `ja-JP`), else `"en"`. A missing locale is `"en"`. */
39
+ function uiLanguage(locale: string | null | undefined): UiLanguage {
40
+ return typeof locale === "string" && locale.trim().toLowerCase().startsWith("ja") ? "ja" : "en"
41
+ }
42
+
43
+ /** A BCP 47 tag in its canonical form (`en-gb` → `en-GB`), or `FALLBACK_LOCALE` when it is empty or invalid. */
44
+ function normalizeLocale(tag: string | null | undefined): string {
45
+ const value = tag?.trim()
46
+ if (!value) return FALLBACK_LOCALE
47
+ try {
48
+ return Intl.getCanonicalLocales(value)[0] ?? FALLBACK_LOCALE
49
+ } catch {
50
+ return FALLBACK_LOCALE
51
+ }
52
+ }
53
+
54
+ /**
55
+ * The locale of the page: `document.documentElement.lang`, canonicalized. `FALLBACK_LOCALE` when it is empty or
56
+ * invalid, or there is no `document`. Parts read it through `useLocale`, never while rendering.
57
+ */
58
+ function documentLocale(): string {
59
+ if (typeof document === "undefined") return FALLBACK_LOCALE
60
+ return normalizeLocale(document.documentElement?.getAttribute("lang"))
61
+ }
62
+
63
+ /** `locale` when given, else the page's locale (`documentLocale()`). */
64
+ function resolveLocale(locale?: string | null): string {
65
+ return locale || documentLocale()
66
+ }
67
+
68
+ /** Picks the wording table of the locale's language. */
69
+ function pickLocale<T>(table: { ja: T; en: T }, locale?: string | null): T {
70
+ return table[uiLanguage(resolveLocale(locale))]
71
+ }
72
+
73
+ /** The currency `format="currency"` uses without a `currency`: JPY for Japanese, USD otherwise. */
74
+ function defaultCurrency(locale?: string | null): string {
75
+ return uiLanguage(resolveLocale(locale)) === "ja" ? "JPY" : "USD"
76
+ }
77
+
78
+ /** The month a fiscal year starts in (1–12) when none is given: April for Japanese, January otherwise. */
79
+ function defaultFiscalYearStartMonth(locale?: string | null): number {
80
+ return uiLanguage(resolveLocale(locale)) === "ja" ? 4 : 1
81
+ }
82
+
83
+ /** A day of the week, 0 = Sunday … 6 = Saturday (the `Date#getDay` / date-fns numbering). */
84
+ type WeekDay = 0 | 1 | 2 | 3 | 4 | 5 | 6
85
+
86
+ /** Locales whose week starts on Sunday when the runtime has no week data. */
87
+ const SUNDAY_FIRST = new Set(["en", "en-US", "en-CA"])
88
+
89
+ /**
90
+ * The first day of the week: Monday for Japanese; otherwise the locale's convention from `Intl.Locale`
91
+ * (`en-US` Sunday, `en-GB` Monday). Without week data in the runtime: Sunday for `en` / `en-US` / `en-CA`,
92
+ * Monday for the rest.
93
+ */
94
+ function weekStartsOn(locale?: string | null): WeekDay {
95
+ const tag = normalizeLocale(resolveLocale(locale))
96
+ if (uiLanguage(tag) === "ja") return 1
97
+ try {
98
+ const info = new Intl.Locale(tag) as Intl.Locale & {
99
+ getWeekInfo?: () => { firstDay: number }
100
+ weekInfo?: { firstDay: number }
101
+ }
102
+ const firstDay = info.getWeekInfo?.().firstDay ?? info.weekInfo?.firstDay
103
+ if (typeof firstDay === "number" && firstDay >= 1 && firstDay <= 7) return (firstDay % 7) as WeekDay
104
+ } catch {
105
+ // Fall through to the table below.
106
+ }
107
+ return SUNDAY_FIRST.has(tag) ? 0 : 1
108
+ }
109
+
110
+ /* ---------- inlined from @squadbase/squadkit registry/hooks/use-locale.ts (internal to @squadbase/vantage) ---------- */
111
+
112
+ const listeners = new Set<() => void>()
113
+ let observer: MutationObserver | null = null
114
+
115
+ /** One observer on `<html lang>` for every subscribed part. */
116
+ function subscribe(onChange: () => void): () => void {
117
+ if (typeof document === "undefined" || typeof MutationObserver === "undefined") return () => {}
118
+ listeners.add(onChange)
119
+ if (!observer) {
120
+ observer = new MutationObserver(() => {
121
+ for (const listener of [...listeners]) listener()
122
+ })
123
+ observer.observe(document.documentElement, { attributes: true, attributeFilter: ["lang"] })
124
+ }
125
+ return () => {
126
+ listeners.delete(onChange)
127
+ if (listeners.size === 0 && observer) {
128
+ observer.disconnect()
129
+ observer = null
130
+ }
131
+ }
132
+ }
133
+
134
+ const serverLocale = () => FALLBACK_LOCALE
135
+
136
+ /**
137
+ * The page's locale (`<html lang>`), following changes made while the page runs. On the server and during
138
+ * hydration it is `FALLBACK_LOCALE` (`en-US`), so the markup matches; it switches right after.
139
+ */
140
+ function useDocumentLocale(): string {
141
+ return useSyncExternalStore(subscribe, documentLocale, serverLocale)
142
+ }
143
+
144
+ /** The locale a part renders in: its `locale` prop when given, else the page's (`useDocumentLocale`). */
145
+ function useLocale(locale?: string | null): string {
146
+ const page = useDocumentLocale()
147
+ return locale || page
148
+ }
149
+
150
+ /* ---------- end of inlined code ---------- */
12
151
 
13
152
  export interface PageShellProps extends HTMLAttributes<HTMLDivElement> {}
14
153
 
@@ -19,7 +158,22 @@ export const PageShell = forwardRef<HTMLDivElement, PageShellProps>(
19
158
  )
20
159
  PageShell.displayName = "PageShell"
21
160
 
22
- export interface PageShellHeaderProps extends HTMLAttributes<HTMLDivElement> {}
161
+ const SOURCE_PREFIX = { ja: "出典:", en: "Source: " }
162
+
163
+ export interface PageShellHeaderProps extends HTMLAttributes<HTMLDivElement> {
164
+ /** When the data was last updated. Drawn by `UpdatedAt` at the right end of the title row. */
165
+ updatedAt?: UpdatedAtProps["at"]
166
+ /** `"relative"` (default) or `"absolute-first"` ("16:41 更新(23 分前)") for pages where "now" matters. */
167
+ updatedAtVariant?: UpdatedAtProps["variant"]
168
+ /** IANA time zone for the absolute time of `updatedAt`. Defaults to the runtime's zone. */
169
+ timeZone?: string
170
+ /** Where the data comes from. Shown as a chip "Source: ○○" (ja: "出典:○○") on the second row. */
171
+ source?: string
172
+ /** The period the data covers. Shown as a chip "2026/9/23〜10/20" on the second row. */
173
+ period?: { start: Date | string | number; end: Date | string | number }
174
+ /** The page's overall state (an alert, a status badge). Shown on the third row; no row when absent. */
175
+ status?: ReactNode
176
+ }
23
177
 
24
178
  /**
25
179
  * A wrapping flex row, not a two-column grid: when the heading cannot keep its
@@ -27,16 +181,54 @@ export interface PageShellHeaderProps extends HTMLAttributes<HTMLDivElement> {}
27
181
  * `1fr auto` grid would instead hand the heading whatever the end block leaves,
28
182
  * and a CJK title — breakable between any two characters — collapses into a
29
183
  * one-character column.
184
+ *
185
+ * The meta props (`updatedAt`, `source`, `period`, `status`) fix the order every
186
+ * page head shares: title and update time (right end) → source / period chips →
187
+ * overall status → summary cards. Empty rows are not drawn. Rows are placed with
188
+ * flex `order`, so they land before `PageShellSummary` whatever the child order.
30
189
  */
31
190
  export const PageShellHeader = forwardRef<HTMLDivElement, PageShellHeaderProps>(
32
- ({ className, ...props }, ref) => (
33
- <div
34
- ref={ref}
35
- data-slot="page-shell-header"
36
- className={cn("flex flex-wrap items-start gap-x-4 gap-y-6 border-b px-6 py-12", className)}
37
- {...props}
38
- />
39
- ),
191
+ ({ className, updatedAt, updatedAtVariant, timeZone, source, period, status, children, ...props }, ref) => {
192
+ const locale = useLocale()
193
+ const periodText = period ? formatDateRange(period.start, period.end, { timeZone, locale }) : undefined
194
+ const hasChips = Boolean(source) || (periodText !== undefined && periodText !== EMPTY_VALUE)
195
+ const hasStatus = status !== undefined && status !== null && status !== false && status !== ""
196
+ return (
197
+ <div
198
+ ref={ref}
199
+ data-slot="page-shell-header"
200
+ className={cn("flex flex-wrap items-start gap-x-4 gap-y-4 px-6 pt-8", className)}
201
+ {...props}
202
+ >
203
+ {children}
204
+ {updatedAt !== undefined && updatedAt !== null ? (
205
+ <div data-slot="page-shell-updated-at" className="ml-auto max-w-full shrink-0 text-right">
206
+ <UpdatedAt at={updatedAt} variant={updatedAtVariant} timeZone={timeZone} />
207
+ </div>
208
+ ) : null}
209
+ {hasChips ? (
210
+ <div data-slot="page-shell-chips" className="order-1 flex basis-full flex-wrap gap-1.5">
211
+ {source ? (
212
+ <Badge variant="outline" className="h-auto max-w-full whitespace-normal text-muted-foreground">
213
+ {SOURCE_PREFIX[uiLanguage(locale)]}
214
+ {source}
215
+ </Badge>
216
+ ) : null}
217
+ {periodText && periodText !== EMPTY_VALUE ? (
218
+ <Badge variant="outline" className="tabular-nums text-muted-foreground">
219
+ {periodText}
220
+ </Badge>
221
+ ) : null}
222
+ </div>
223
+ ) : null}
224
+ {hasStatus ? (
225
+ <div data-slot="page-shell-status" className="order-2 min-w-0 basis-full">
226
+ {status}
227
+ </div>
228
+ ) : null}
229
+ </div>
230
+ )
231
+ },
40
232
  )
41
233
  PageShellHeader.displayName = "PageShellHeader"
42
234
 
@@ -61,7 +253,7 @@ export const PageShellTitle = forwardRef<HTMLHeadingElement, PageShellTitleProps
61
253
  <h1
62
254
  ref={ref}
63
255
  data-slot="page-shell-title"
64
- className={cn("text-2xl font-bold tracking-tight text-foreground", className)}
256
+ className={cn("text-2xl font-semibold tracking-tight text-foreground", className)}
65
257
  {...props}
66
258
  />
67
259
  ),
@@ -132,7 +324,7 @@ export const PageShellSummary = forwardRef<HTMLDivElement, PageShellSummaryProps
132
324
  ref={ref}
133
325
  data-slot="page-shell-summary"
134
326
  className={cn(
135
- "grid basis-full grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",
327
+ "order-3 grid basis-full grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",
136
328
  className,
137
329
  )}
138
330
  {...props}
@@ -142,10 +334,23 @@ export const PageShellSummary = forwardRef<HTMLDivElement, PageShellSummaryProps
142
334
  PageShellSummary.displayName = "PageShellSummary"
143
335
 
144
336
  /**
145
- * Accent colours are spelled out one utility set per colour rather than built
146
- * from a template string — Tailwind only emits classes it can see literally in
147
- * the source.
337
+ * Accent tints come from theme tokens, never Tailwind palette colours: the
338
+ * semantic tones (`--positive` / `--negative` / `--warning` / `--info` /
339
+ * `--neutral` and their `*-subtle`) and, for hues with no status meaning,
340
+ * `--chart-4` / `--chart-5`. The colour-named accents are kept for compatibility
341
+ * and map to the nearest tone. Each set is a literal string — Tailwind only
342
+ * emits classes it can see literally in the source.
148
343
  */
344
+ const summaryCardTones = {
345
+ positive: "border-positive/20 dark:border-positive/25 bg-positive-subtle [&>svg]:text-positive",
346
+ negative: "border-negative/20 dark:border-negative/25 bg-negative-subtle [&>svg]:text-negative",
347
+ warning: "border-warning/20 dark:border-warning/25 bg-warning-subtle [&>svg]:text-warning",
348
+ info: "border-info/20 dark:border-info/25 bg-info-subtle [&>svg]:text-info",
349
+ neutral: "border-neutral/20 dark:border-neutral/25 bg-neutral-subtle [&>svg]:text-neutral",
350
+ violet: "border-chart-4/30 bg-chart-4/5 [&>svg]:text-chart-4",
351
+ pink: "border-chart-5/30 bg-chart-5/5 [&>svg]:text-chart-5",
352
+ } as const
353
+
149
354
  export const pageShellSummaryCardVariants = cva(
150
355
  "relative flex items-start gap-3 rounded-lg border bg-background px-4 py-3 text-sm [&>svg]:mt-0.5 [&>svg]:size-4 [&>svg]:shrink-0",
151
356
  {
@@ -154,40 +359,28 @@ export const pageShellSummaryCardVariants = cva(
154
359
  default: "text-card-foreground",
155
360
  accent:
156
361
  "border-[var(--chart-1)]/30 bg-linear-to-r from-[var(--chart-1)]/5 to-[var(--chart-1)]/5 [&>svg]:text-[var(--chart-1)]",
157
- amber:
158
- "border-amber-300 bg-amber-50 [&>svg]:text-amber-600 dark:border-amber-800 dark:bg-amber-950/50 dark:[&>svg]:text-amber-400",
159
- blue: "border-blue-300 bg-blue-50 [&>svg]:text-blue-600 dark:border-blue-800 dark:bg-blue-950/50 dark:[&>svg]:text-blue-400",
160
- emerald:
161
- "border-emerald-300 bg-emerald-50 [&>svg]:text-emerald-600 dark:border-emerald-800 dark:bg-emerald-950/50 dark:[&>svg]:text-emerald-400",
162
- red: "border-red-300 bg-red-50 [&>svg]:text-red-600 dark:border-red-800 dark:bg-red-950/50 dark:[&>svg]:text-red-400",
163
- violet:
164
- "border-violet-300 bg-violet-50 [&>svg]:text-violet-600 dark:border-violet-800 dark:bg-violet-950/50 dark:[&>svg]:text-violet-400",
165
- orange:
166
- "border-orange-300 bg-orange-50 [&>svg]:text-orange-600 dark:border-orange-800 dark:bg-orange-950/50 dark:[&>svg]:text-orange-400",
167
- cyan: "border-cyan-300 bg-cyan-50 [&>svg]:text-cyan-600 dark:border-cyan-800 dark:bg-cyan-950/50 dark:[&>svg]:text-cyan-400",
168
- slate:
169
- "border-slate-300 bg-slate-50 [&>svg]:text-slate-600 dark:border-slate-800 dark:bg-slate-950/50 dark:[&>svg]:text-slate-400",
170
- green:
171
- "border-green-300 bg-green-50 [&>svg]:text-green-600 dark:border-green-800 dark:bg-green-950/50 dark:[&>svg]:text-green-400",
172
- teal: "border-teal-300 bg-teal-50 [&>svg]:text-teal-600 dark:border-teal-800 dark:bg-teal-950/50 dark:[&>svg]:text-teal-400",
173
- sky: "border-sky-300 bg-sky-50 [&>svg]:text-sky-600 dark:border-sky-800 dark:bg-sky-950/50 dark:[&>svg]:text-sky-400",
174
- indigo:
175
- "border-indigo-300 bg-indigo-50 [&>svg]:text-indigo-600 dark:border-indigo-800 dark:bg-indigo-950/50 dark:[&>svg]:text-indigo-400",
176
- purple:
177
- "border-purple-300 bg-purple-50 [&>svg]:text-purple-600 dark:border-purple-800 dark:bg-purple-950/50 dark:[&>svg]:text-purple-400",
178
- pink: "border-pink-300 bg-pink-50 [&>svg]:text-pink-600 dark:border-pink-800 dark:bg-pink-950/50 dark:[&>svg]:text-pink-400",
179
- rose: "border-rose-300 bg-rose-50 [&>svg]:text-rose-600 dark:border-rose-800 dark:bg-rose-950/50 dark:[&>svg]:text-rose-400",
180
- yellow:
181
- "border-yellow-300 bg-yellow-50 [&>svg]:text-yellow-600 dark:border-yellow-800 dark:bg-yellow-950/50 dark:[&>svg]:text-yellow-400",
182
- lime: "border-lime-300 bg-lime-50 [&>svg]:text-lime-600 dark:border-lime-800 dark:bg-lime-950/50 dark:[&>svg]:text-lime-400",
183
- gray: "border-gray-300 bg-gray-50 [&>svg]:text-gray-600 dark:border-gray-800 dark:bg-gray-950/50 dark:[&>svg]:text-gray-400",
184
- zinc: "border-zinc-300 bg-zinc-50 [&>svg]:text-zinc-600 dark:border-zinc-800 dark:bg-zinc-950/50 dark:[&>svg]:text-zinc-400",
185
- neutral:
186
- "border-neutral-300 bg-neutral-50 [&>svg]:text-neutral-600 dark:border-neutral-800 dark:bg-neutral-950/50 dark:[&>svg]:text-neutral-400",
187
- stone:
188
- "border-stone-300 bg-stone-50 [&>svg]:text-stone-600 dark:border-stone-800 dark:bg-stone-950/50 dark:[&>svg]:text-stone-400",
189
- fuchsia:
190
- "border-fuchsia-300 bg-fuchsia-50 [&>svg]:text-fuchsia-600 dark:border-fuchsia-800 dark:bg-fuchsia-950/50 dark:[&>svg]:text-fuchsia-400",
362
+ amber: summaryCardTones.warning,
363
+ blue: summaryCardTones.info,
364
+ emerald: summaryCardTones.positive,
365
+ red: summaryCardTones.negative,
366
+ violet: summaryCardTones.violet,
367
+ orange: summaryCardTones.warning,
368
+ cyan: summaryCardTones.info,
369
+ slate: summaryCardTones.neutral,
370
+ green: summaryCardTones.positive,
371
+ teal: summaryCardTones.positive,
372
+ sky: summaryCardTones.info,
373
+ indigo: summaryCardTones.info,
374
+ purple: summaryCardTones.violet,
375
+ pink: summaryCardTones.pink,
376
+ rose: summaryCardTones.negative,
377
+ yellow: summaryCardTones.warning,
378
+ lime: summaryCardTones.positive,
379
+ gray: summaryCardTones.neutral,
380
+ zinc: summaryCardTones.neutral,
381
+ neutral: summaryCardTones.neutral,
382
+ stone: summaryCardTones.neutral,
383
+ fuchsia: summaryCardTones.violet,
191
384
  },
192
385
  },
193
386
  defaultVariants: {
@@ -219,7 +412,7 @@ export const PageShellContent = forwardRef<HTMLDivElement, PageShellContentProps
219
412
  <div
220
413
  ref={ref}
221
414
  data-slot="page-shell-content"
222
- className={cn("flex-1 p-6", className)}
415
+ className={cn("flex min-w-0 flex-1 flex-col gap-6 p-6", className)}
223
416
  {...props}
224
417
  />
225
418
  ),
@@ -1,5 +1,7 @@
1
1
  // Copied by `vantage add ui pagination`. This file is yours to edit.
2
- // Generated from @squadbase/vantage src/ui/pagination.tsx by `npm run registry` (in Vantage, edit src/, not registry/).
2
+ // Generated from @squadbase/squadkit registry/ui/pagination.tsx by `pnpm run registry` (in Vantage, edit packages/squadkit, not registry/).
3
+ "use client"
4
+
3
5
  import * as React from "react"
4
6
  import { cn } from "@squadbase/vantage/ui"
5
7