@squadbase/vantage 0.6.2 → 0.7.0-dev1.3b0e616

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 (355) hide show
  1. package/dist/add-4GHF2TX2.js +6 -0
  2. package/dist/add-4GHF2TX2.js.map +1 -0
  3. package/dist/{build-O5TVNH4E.js → build-U7GO26HR.js} +9 -9
  4. package/dist/{build-O5TVNH4E.js.map → build-U7GO26HR.js.map} +1 -1
  5. package/dist/{check-WFBEDHDR.js → check-MRVAIHG5.js} +7 -7
  6. package/dist/{check-WFBEDHDR.js.map → check-MRVAIHG5.js.map} +1 -1
  7. package/dist/chunk-2IAPIOPS.js +152 -0
  8. package/dist/chunk-2IAPIOPS.js.map +1 -0
  9. package/dist/chunk-3RJEOP3J.js +174 -0
  10. package/dist/chunk-3RJEOP3J.js.map +1 -0
  11. package/dist/{chunk-QDZA5JSL.js → chunk-AABMKHEU.js} +4 -4
  12. package/dist/{chunk-QDZA5JSL.js.map → chunk-AABMKHEU.js.map} +1 -1
  13. package/dist/{chunk-PVTHHV7X.js → chunk-ANZLVSEP.js} +28 -7
  14. package/dist/chunk-ANZLVSEP.js.map +1 -0
  15. package/dist/chunk-CKWPK4RO.js +50 -0
  16. package/dist/chunk-CKWPK4RO.js.map +1 -0
  17. package/dist/chunk-EG4PX726.js +678 -0
  18. package/dist/chunk-EG4PX726.js.map +1 -0
  19. package/dist/{chunk-3G43C6OL.js → chunk-GNXCX4WE.js} +46 -3
  20. package/dist/chunk-GNXCX4WE.js.map +1 -0
  21. package/dist/chunk-NYQJ5UY4.js +9028 -0
  22. package/dist/chunk-NYQJ5UY4.js.map +1 -0
  23. package/dist/chunk-NZ5QIIG4.js +74 -0
  24. package/dist/chunk-NZ5QIIG4.js.map +1 -0
  25. package/dist/{chunk-BCE22JSM.js → chunk-PJ4SPXHS.js} +52 -16
  26. package/dist/chunk-PJ4SPXHS.js.map +1 -0
  27. package/dist/{chunk-RPZAALCX.js → chunk-QNOX7WLZ.js} +256 -165
  28. package/dist/chunk-QNOX7WLZ.js.map +1 -0
  29. package/dist/{chunk-ZVANIULZ.js → chunk-RNTDBX6S.js} +4 -4
  30. package/dist/{chunk-ZVANIULZ.js.map → chunk-RNTDBX6S.js.map} +1 -1
  31. package/dist/{chunk-PXRX5PEC.js → chunk-ROHNXP7J.js} +73 -4
  32. package/dist/chunk-ROHNXP7J.js.map +1 -0
  33. package/dist/chunk-S5MDTHH7.js +466 -0
  34. package/dist/chunk-S5MDTHH7.js.map +1 -0
  35. package/dist/chunk-SDJTTMLK.js +1877 -0
  36. package/dist/chunk-SDJTTMLK.js.map +1 -0
  37. package/dist/{chunk-EP6JHXSR.js → chunk-SHZM3EXB.js} +68 -12
  38. package/dist/chunk-SHZM3EXB.js.map +1 -0
  39. package/dist/chunk-TRMHNMMZ.js +61 -0
  40. package/dist/chunk-TRMHNMMZ.js.map +1 -0
  41. package/dist/{chunk-A2UUGASH.js → chunk-U736PVHY.js} +2 -2
  42. package/dist/chunk-U736PVHY.js.map +1 -0
  43. package/dist/{chunk-JGRMRXXZ.js → chunk-UWSQUHX6.js} +4 -99
  44. package/dist/chunk-UWSQUHX6.js.map +1 -0
  45. package/dist/cli.js +15 -11
  46. package/dist/cli.js.map +1 -1
  47. package/dist/client/index.d.ts +34 -3
  48. package/dist/client/index.js +211 -12
  49. package/dist/client/index.js.map +1 -1
  50. package/dist/components/index.d.ts +2113 -30
  51. package/dist/components/index.js +7 -4
  52. package/dist/delta-text-CbrOaW83.d.ts +17 -0
  53. package/dist/{dev-NZRLOQCL.js → dev-O42JFQ64.js} +24 -13
  54. package/dist/dev-O42JFQ64.js.map +1 -0
  55. package/dist/doc/index.d.ts +215 -2
  56. package/dist/doc/index.js +423 -5
  57. package/dist/doc/index.js.map +1 -1
  58. package/dist/{docs-ZGDJUHJI.js → docs-JVP4RPKT.js} +3 -3
  59. package/dist/{docs-ZGDJUHJI.js.map → docs-JVP4RPKT.js.map} +1 -1
  60. package/dist/{doctor-VFKEMR54.js → doctor-YD3XAAOT.js} +8 -8
  61. package/dist/doctor-YD3XAAOT.js.map +1 -0
  62. package/dist/format-DihQkL1N.d.ts +249 -0
  63. package/dist/geo-japan-7BMSOJRX.js +8 -0
  64. package/dist/geo-japan-7BMSOJRX.js.map +1 -0
  65. package/dist/geo-us-GVOG7VXH.js +8 -0
  66. package/dist/geo-us-GVOG7VXH.js.map +1 -0
  67. package/dist/geo-world-35HL56UU.js +8 -0
  68. package/dist/geo-world-35HL56UU.js.map +1 -0
  69. package/dist/markdown/index.js +1 -1
  70. package/dist/markdown/index.js.map +1 -1
  71. package/dist/{preview-QDCIVVSR.js → preview-T6CLSQVX.js} +12 -4
  72. package/dist/preview-T6CLSQVX.js.map +1 -0
  73. package/dist/query/index.d.ts +0 -11
  74. package/dist/query/index.js +2 -2
  75. package/dist/{routes-RHP5FVGD.js → routes-PVKNT777.js} +6 -6
  76. package/dist/{routes-RHP5FVGD.js.map → routes-PVKNT777.js.map} +1 -1
  77. package/dist/{search-RFBELGY7.js → search-5LC4XPB5.js} +3 -3
  78. package/dist/{search-RFBELGY7.js.map → search-5LC4XPB5.js.map} +1 -1
  79. package/dist/slide/index.d.ts +272 -1
  80. package/dist/slide/index.js +1086 -19
  81. package/dist/slide/index.js.map +1 -1
  82. package/dist/table/index.js +14 -10
  83. package/dist/table/index.js.map +1 -1
  84. package/dist/ui/index.d.ts +148 -12
  85. package/dist/ui/index.js +1340 -88
  86. package/dist/ui/index.js.map +1 -1
  87. package/dist/{upgrade-GF2P67M6.js → upgrade-6DT7ADRP.js} +7 -7
  88. package/dist/{upgrade-GF2P67M6.js.map → upgrade-6DT7ADRP.js.map} +1 -1
  89. package/dist/vite/index.d.ts +10 -0
  90. package/dist/vite/index.js +4 -4
  91. package/docs/en/agent-skills.md +1 -1
  92. package/docs/en/changelog.md +82 -0
  93. package/docs/en/cli-reference.md +30 -0
  94. package/docs/en/components.md +42 -17
  95. package/docs/en/doc/delta-text.md +40 -0
  96. package/docs/en/doc/doc-action-items.md +49 -0
  97. package/docs/en/doc/doc-callout.md +38 -0
  98. package/docs/en/doc/doc-data-table.md +60 -0
  99. package/docs/en/doc/doc-executive-summary.md +64 -0
  100. package/docs/en/doc/doc-figure.md +56 -0
  101. package/docs/en/doc/doc-key-findings.md +61 -0
  102. package/docs/en/doc/doc-kpi-scorecard.md +80 -0
  103. package/docs/en/doc/doc-notes-and-sources.md +43 -0
  104. package/docs/en/doc/doc-report-header.md +46 -0
  105. package/docs/en/pages-and-metadata.md +15 -0
  106. package/docs/en/parts/area-chart.md +99 -0
  107. package/docs/en/parts/bar-chart.md +91 -0
  108. package/docs/en/parts/bar-list.md +50 -0
  109. package/docs/en/parts/category-bar.md +37 -0
  110. package/docs/en/parts/chart-frame.md +39 -0
  111. package/docs/en/parts/data-table.md +22 -0
  112. package/docs/en/parts/delta.md +51 -0
  113. package/docs/en/parts/donut-chart.md +72 -0
  114. package/docs/en/parts/format.md +43 -0
  115. package/docs/en/parts/funnel-steps.md +2 -1
  116. package/docs/en/parts/heatmap.md +53 -0
  117. package/docs/en/parts/kpi-card.md +58 -0
  118. package/docs/en/parts/legend.md +35 -0
  119. package/docs/en/parts/line-chart.md +94 -0
  120. package/docs/en/parts/metric-value.md +3 -2
  121. package/docs/en/parts/page-shell.md +1 -1
  122. package/docs/en/parts/progress-circle.md +33 -0
  123. package/docs/en/parts/sample-data.md +39 -0
  124. package/docs/en/parts/scatter-chart.md +56 -0
  125. package/docs/en/parts/sparkline.md +1 -1
  126. package/docs/en/parts/tracker.md +36 -0
  127. package/docs/en/parts/trend-indicator.md +17 -1
  128. package/docs/en/parts/updated-at.md +30 -0
  129. package/docs/en/parts/waterfall-chart.md +56 -0
  130. package/docs/en/slide/slide-chart-full.md +48 -0
  131. package/docs/en/slide/slide-chart-insight.md +52 -0
  132. package/docs/en/slide/slide-columns.md +46 -0
  133. package/docs/en/slide/slide-comparison.md +68 -0
  134. package/docs/en/slide/slide-cover.md +39 -0
  135. package/docs/en/slide/slide-exec-summary.md +47 -0
  136. package/docs/en/slide/slide-heading.md +38 -0
  137. package/docs/en/slide/slide-kpi-grid.md +55 -0
  138. package/docs/en/slide/slide-kpi-hero.md +58 -0
  139. package/docs/en/slide/slide-next-actions.md +49 -0
  140. package/docs/en/slide/slide-scorecard-table.md +54 -0
  141. package/docs/en/slide/slide-section.md +44 -0
  142. package/docs/en/slide/slide-source-line.md +34 -0
  143. package/docs/en/ui/alert-dialog.md +42 -0
  144. package/docs/en/ui/avatar.md +31 -0
  145. package/docs/en/ui/combobox.md +74 -0
  146. package/docs/en/ui/drawer.md +41 -0
  147. package/docs/en/ui/empty.md +1 -1
  148. package/docs/en/ui/error-state.md +4 -3
  149. package/docs/en/ui/field.md +42 -0
  150. package/docs/en/ui/hover-card.md +21 -0
  151. package/docs/en/ui/kbd.md +17 -0
  152. package/docs/en/ui/loading.md +1 -1
  153. package/docs/en/ui/pagination.md +36 -0
  154. package/docs/en/ui/radio-group.md +21 -0
  155. package/docs/en/ui/toast.md +44 -0
  156. package/docs/en/ui/toggle-group.md +4 -3
  157. package/docs/en/ui-and-theming.md +1 -1
  158. package/docs/index.json +1184 -114
  159. package/docs/ja/agent-skills.md +1 -1
  160. package/docs/ja/changelog.md +84 -0
  161. package/docs/ja/cli-reference.md +29 -0
  162. package/docs/ja/components.md +68 -101
  163. package/docs/ja/doc/delta-text.md +40 -0
  164. package/docs/ja/doc/doc-action-items.md +49 -0
  165. package/docs/ja/doc/doc-callout.md +38 -0
  166. package/docs/ja/doc/doc-data-table.md +60 -0
  167. package/docs/ja/doc/doc-executive-summary.md +64 -0
  168. package/docs/ja/doc/doc-figure.md +56 -0
  169. package/docs/ja/doc/doc-key-findings.md +61 -0
  170. package/docs/ja/doc/doc-kpi-scorecard.md +80 -0
  171. package/docs/ja/doc/doc-notes-and-sources.md +43 -0
  172. package/docs/ja/doc/doc-report-header.md +46 -0
  173. package/docs/ja/page-types/csv.md +83 -0
  174. package/docs/ja/page-types/doc.md +83 -0
  175. package/docs/ja/page-types/excel.md +82 -0
  176. package/docs/ja/page-types/slide.md +133 -0
  177. package/docs/ja/page-types.md +47 -0
  178. package/docs/ja/pages-and-metadata.md +15 -0
  179. package/docs/ja/parts/area-chart.md +85 -0
  180. package/docs/ja/parts/bar-chart.md +95 -0
  181. package/docs/ja/parts/bar-list.md +58 -0
  182. package/docs/ja/parts/category-bar.md +36 -0
  183. package/docs/ja/parts/chart-frame.md +36 -0
  184. package/docs/ja/parts/data-table.md +22 -0
  185. package/docs/ja/parts/delta.md +51 -0
  186. package/docs/ja/parts/donut-chart.md +66 -0
  187. package/docs/ja/parts/echart.md +3 -0
  188. package/docs/ja/parts/format.md +44 -0
  189. package/docs/ja/parts/funnel-steps.md +27 -8
  190. package/docs/ja/parts/heatmap.md +45 -0
  191. package/docs/ja/parts/kpi-card.md +56 -0
  192. package/docs/ja/parts/legend.md +36 -0
  193. package/docs/ja/parts/line-chart.md +84 -0
  194. package/docs/ja/parts/metric-value.md +3 -2
  195. package/docs/ja/parts/page-shell.md +1 -1
  196. package/docs/ja/parts/progress-circle.md +34 -0
  197. package/docs/ja/parts/sample-data.md +61 -0
  198. package/docs/ja/parts/scatter-chart.md +69 -0
  199. package/docs/ja/parts/sparkline.md +2 -2
  200. package/docs/ja/parts/tracker.md +32 -0
  201. package/docs/ja/parts/trend-indicator.md +17 -1
  202. package/docs/ja/parts/updated-at.md +27 -0
  203. package/docs/ja/parts/waterfall-chart.md +61 -0
  204. package/docs/ja/routing.md +8 -86
  205. package/docs/ja/slide/slide-chart-full.md +48 -0
  206. package/docs/ja/slide/slide-chart-insight.md +52 -0
  207. package/docs/ja/slide/slide-columns.md +46 -0
  208. package/docs/ja/slide/slide-comparison.md +68 -0
  209. package/docs/ja/slide/slide-cover.md +39 -0
  210. package/docs/ja/slide/slide-exec-summary.md +47 -0
  211. package/docs/ja/slide/slide-heading.md +38 -0
  212. package/docs/ja/slide/slide-kpi-grid.md +55 -0
  213. package/docs/ja/slide/slide-kpi-hero.md +58 -0
  214. package/docs/ja/slide/slide-next-actions.md +49 -0
  215. package/docs/ja/slide/slide-scorecard-table.md +54 -0
  216. package/docs/ja/slide/slide-section.md +44 -0
  217. package/docs/ja/slide/slide-source-line.md +34 -0
  218. package/docs/ja/ui/alert-dialog.md +41 -0
  219. package/docs/ja/ui/avatar.md +31 -0
  220. package/docs/ja/ui/combobox.md +74 -0
  221. package/docs/ja/ui/drawer.md +41 -0
  222. package/docs/ja/ui/empty.md +1 -1
  223. package/docs/ja/ui/error-state.md +4 -3
  224. package/docs/ja/ui/field.md +42 -0
  225. package/docs/ja/ui/hover-card.md +21 -0
  226. package/docs/ja/ui/kbd.md +16 -0
  227. package/docs/ja/ui/loading.md +1 -1
  228. package/docs/ja/ui/pagination.md +36 -0
  229. package/docs/ja/ui/radio-group.md +21 -0
  230. package/docs/ja/ui/toast.md +46 -0
  231. package/docs/ja/ui/toggle-group.md +4 -3
  232. package/docs/ja/ui-and-theming.md +14 -7
  233. package/package.json +43 -29
  234. package/registry/ui/accordion.tsx +76 -0
  235. package/registry/ui/alert-dialog.tsx +189 -0
  236. package/registry/ui/alert.tsx +80 -0
  237. package/registry/ui/app-shell.tsx +424 -0
  238. package/registry/ui/area-chart.tsx +3960 -0
  239. package/registry/ui/attention-list.tsx +465 -0
  240. package/registry/ui/avatar.tsx +110 -0
  241. package/registry/ui/badge.tsx +56 -0
  242. package/registry/ui/bar-chart.tsx +3954 -0
  243. package/registry/ui/bar-list.tsx +3998 -0
  244. package/registry/ui/box-plot-chart.tsx +4214 -0
  245. package/registry/ui/breadcrumb.tsx +128 -0
  246. package/registry/ui/button.tsx +62 -0
  247. package/registry/ui/calendar.tsx +223 -0
  248. package/registry/ui/card.tsx +107 -0
  249. package/registry/ui/category-bar.tsx +1498 -0
  250. package/registry/ui/chart-frame.tsx +1604 -0
  251. package/registry/ui/checkbox.tsx +30 -0
  252. package/registry/ui/collapsible.tsx +23 -0
  253. package/registry/ui/combo-chart.tsx +1851 -0
  254. package/registry/ui/combobox.tsx +310 -0
  255. package/registry/ui/command.tsx +198 -0
  256. package/registry/ui/dashboard-card.tsx +217 -0
  257. package/registry/ui/data-table.tsx +896 -157
  258. package/registry/ui/date-range-picker.tsx +544 -0
  259. package/registry/ui/delta.tsx +350 -0
  260. package/registry/ui/dialog.tsx +161 -0
  261. package/registry/ui/donut-chart.tsx +4006 -0
  262. package/registry/ui/drawer.tsx +229 -0
  263. package/registry/ui/dropdown-menu.tsx +274 -0
  264. package/registry/ui/echart.tsx +1178 -0
  265. package/registry/ui/field.tsx +240 -0
  266. package/registry/ui/filter-bar.tsx +551 -0
  267. package/registry/ui/funnel-steps.tsx +3843 -0
  268. package/registry/ui/heatmap.tsx +2027 -0
  269. package/registry/ui/histogram-chart.tsx +4284 -0
  270. package/registry/ui/hover-card.tsx +52 -0
  271. package/registry/ui/input-group.tsx +160 -0
  272. package/registry/ui/input.tsx +24 -0
  273. package/registry/ui/kbd.tsx +30 -0
  274. package/registry/ui/kpi-card.tsx +905 -0
  275. package/registry/ui/label.tsx +22 -0
  276. package/registry/ui/legend.tsx +3817 -0
  277. package/registry/ui/line-chart.tsx +3958 -0
  278. package/registry/ui/metric-value.tsx +62 -0
  279. package/registry/ui/multi-select.tsx +382 -0
  280. package/registry/ui/page-shell.tsx +420 -0
  281. package/registry/ui/pagination.tsx +140 -0
  282. package/registry/ui/paired-chart.tsx +4086 -0
  283. package/registry/ui/pivot-table.tsx +1259 -0
  284. package/registry/ui/placeholder.tsx +36 -0
  285. package/registry/ui/popover.tsx +92 -0
  286. package/registry/ui/progress-circle.tsx +1033 -0
  287. package/registry/ui/progress.tsx +85 -0
  288. package/registry/ui/radio-group.tsx +39 -0
  289. package/registry/ui/sample-data.tsx +230 -0
  290. package/registry/ui/scatter-chart.tsx +4503 -0
  291. package/registry/ui/scroll-area.tsx +56 -0
  292. package/registry/ui/searchable-select.tsx +352 -0
  293. package/registry/ui/section-header.tsx +43 -0
  294. package/registry/ui/segmented-control.tsx +76 -0
  295. package/registry/ui/select.tsx +255 -0
  296. package/registry/ui/separator.tsx +27 -0
  297. package/registry/ui/sheet.tsx +139 -0
  298. package/registry/ui/sidebar.tsx +725 -0
  299. package/registry/ui/skeleton.tsx +17 -0
  300. package/registry/ui/slider.tsx +56 -0
  301. package/registry/ui/sparkline.tsx +230 -0
  302. package/registry/ui/spinner.tsx +14 -0
  303. package/registry/ui/states.tsx +247 -0
  304. package/registry/ui/status-badge.tsx +286 -0
  305. package/registry/ui/switch.tsx +34 -0
  306. package/registry/ui/table.tsx +118 -0
  307. package/registry/ui/tabs.tsx +84 -0
  308. package/registry/ui/textarea.tsx +22 -0
  309. package/registry/ui/toast.tsx +250 -0
  310. package/registry/ui/toggle-group.tsx +91 -0
  311. package/registry/ui/toggle.tsx +47 -0
  312. package/registry/ui/tooltip.tsx +72 -0
  313. package/registry/ui/tracker.tsx +1015 -0
  314. package/registry/ui/treemap.tsx +1916 -0
  315. package/registry/ui/trend-indicator.tsx +217 -0
  316. package/registry/ui/updated-at.tsx +276 -0
  317. package/registry/ui/waterfall-chart.tsx +4561 -0
  318. package/skills/vantage-add-feature/SKILL.md +14 -7
  319. package/skills/vantage-design/SKILL.md +62 -52
  320. package/skills/vantage-design/references/extract.md +26 -27
  321. package/skills/vantage-design/references/format.md +12 -172
  322. package/skills/vantage-design/references/presets.md +50 -110
  323. package/skills/vantage-pitfalls/SKILL.md +10 -1
  324. package/skills/vantage-slide/SKILL.md +71 -36
  325. package/templates/AGENTS.md +54 -16
  326. package/templates/agents/api.md +36 -0
  327. package/templates/agents/csv.md +2 -1
  328. package/templates/agents/doc.md +52 -3
  329. package/templates/agents/page.md +91 -10
  330. package/templates/agents/slide.md +90 -4
  331. package/templates/agents/xlsx.md +2 -1
  332. package/theme.css +247 -132
  333. package/dist/add-EISGSZAH.js +0 -6
  334. package/dist/add-EISGSZAH.js.map +0 -1
  335. package/dist/chunk-3G43C6OL.js.map +0 -1
  336. package/dist/chunk-5ZOP4SQR.js +0 -47
  337. package/dist/chunk-5ZOP4SQR.js.map +0 -1
  338. package/dist/chunk-A2UUGASH.js.map +0 -1
  339. package/dist/chunk-BCE22JSM.js.map +0 -1
  340. package/dist/chunk-DTDVSFRY.js +0 -29
  341. package/dist/chunk-DTDVSFRY.js.map +0 -1
  342. package/dist/chunk-EP6JHXSR.js.map +0 -1
  343. package/dist/chunk-JGRMRXXZ.js.map +0 -1
  344. package/dist/chunk-KLEIVDUV.js +0 -165
  345. package/dist/chunk-KLEIVDUV.js.map +0 -1
  346. package/dist/chunk-LSRMRIXA.js +0 -2227
  347. package/dist/chunk-LSRMRIXA.js.map +0 -1
  348. package/dist/chunk-PVTHHV7X.js.map +0 -1
  349. package/dist/chunk-PXRX5PEC.js.map +0 -1
  350. package/dist/chunk-RPZAALCX.js.map +0 -1
  351. package/dist/chunk-T3FLAGI6.js +0 -316
  352. package/dist/chunk-T3FLAGI6.js.map +0 -1
  353. package/dist/dev-NZRLOQCL.js.map +0 -1
  354. package/dist/doctor-VFKEMR54.js.map +0 -1
  355. package/dist/preview-QDCIVVSR.js.map +0 -1
@@ -0,0 +1,56 @@
1
+ // Copied by `vantage add ui scroll-area`. This file is yours to edit.
2
+ // Generated from @squadbase/squadkit registry/ui/scroll-area.tsx by `pnpm run registry` (in Vantage, edit packages/squadkit, not registry/).
3
+ "use client"
4
+
5
+ import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area"
6
+
7
+ import { cn } from "@squadbase/vantage/ui"
8
+
9
+ function ScrollArea({
10
+ className,
11
+ children,
12
+ ...props
13
+ }: ScrollAreaPrimitive.Root.Props) {
14
+ return (
15
+ <ScrollAreaPrimitive.Root
16
+ data-slot="scroll-area"
17
+ className={cn("relative", className)}
18
+ {...props}
19
+ >
20
+ <ScrollAreaPrimitive.Viewport
21
+ data-slot="scroll-area-viewport"
22
+ className="size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1"
23
+ >
24
+ {children}
25
+ </ScrollAreaPrimitive.Viewport>
26
+ <ScrollBar />
27
+ <ScrollAreaPrimitive.Corner />
28
+ </ScrollAreaPrimitive.Root>
29
+ )
30
+ }
31
+
32
+ function ScrollBar({
33
+ className,
34
+ orientation = "vertical",
35
+ ...props
36
+ }: ScrollAreaPrimitive.Scrollbar.Props) {
37
+ return (
38
+ <ScrollAreaPrimitive.Scrollbar
39
+ data-slot="scroll-area-scrollbar"
40
+ data-orientation={orientation}
41
+ orientation={orientation}
42
+ className={cn(
43
+ "flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",
44
+ className
45
+ )}
46
+ {...props}
47
+ >
48
+ <ScrollAreaPrimitive.Thumb
49
+ data-slot="scroll-area-thumb"
50
+ className="relative flex-1 rounded-full bg-border"
51
+ />
52
+ </ScrollAreaPrimitive.Scrollbar>
53
+ )
54
+ }
55
+
56
+ export { ScrollArea, ScrollBar }
@@ -0,0 +1,352 @@
1
+ // Copied by `vantage add ui searchable-select`. This file is yours to edit.
2
+ // Generated from @squadbase/squadkit registry/components/searchable-select.tsx by `pnpm run registry` (in Vantage, edit packages/squadkit, not registry/).
3
+ "use client"
4
+
5
+ /**
6
+ * SearchableSelect — a single-select combobox with a filter box. Filtering runs
7
+ * client-side over the given options; pass `onSearch` to take it over yourself
8
+ * (server-side search), which turns the built-in filter off.
9
+ */
10
+ import { forwardRef, useMemo, useState } from "react"
11
+ import { ChevronDownIcon } from "lucide-react"
12
+
13
+ import { cn } from "@squadbase/vantage/ui"
14
+ import { Button } from "@squadbase/vantage/ui"
15
+ import { Popover, PopoverContent, PopoverTrigger } from "@squadbase/vantage/ui"
16
+ import { flattenOptions, type SelectOptions } from "@squadbase/vantage/components"
17
+ import { useSyncExternalStore } from "react"
18
+ import type { KeyboardEvent, MouseEvent } from "react"
19
+ import { CheckIcon, LoaderIcon, XIcon } from "lucide-react"
20
+ import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@squadbase/vantage/ui"
21
+ import { isGroupedOptions, type SelectOption } from "@squadbase/vantage/components"
22
+
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) ---------- */
155
+
156
+ interface OptionCommandListProps {
157
+ options: SelectOptions
158
+ /** Whether the given option value is currently selected (drives the check). */
159
+ isSelected: (value: string) => boolean
160
+ onSelect: (value: string) => void
161
+ /** Take filtering over yourself (server-side search); turns off built-in filter. */
162
+ onSearch?: (query: string) => void
163
+ isLoading: boolean
164
+ searchPlaceholder: string
165
+ emptyText: string
166
+ }
167
+
168
+ /** The searchable list body — flat or grouped, with loading and empty states. */
169
+ function OptionCommandList({
170
+ options,
171
+ isSelected,
172
+ onSelect,
173
+ onSearch,
174
+ isLoading,
175
+ searchPlaceholder,
176
+ emptyText,
177
+ }: OptionCommandListProps) {
178
+ const renderOptions = (items: SelectOption[]) =>
179
+ items.map((option) => (
180
+ <CommandItem
181
+ key={option.value}
182
+ value={option.value}
183
+ keywords={[option.label]}
184
+ disabled={option.disabled}
185
+ onSelect={onSelect}
186
+ >
187
+ {option.icon && <option.icon className="size-4 shrink-0" />}
188
+ <span className="flex-1 truncate">
189
+ {option.label}
190
+ {option.description && (
191
+ <span className="ml-2 text-xs text-muted-foreground">{option.description}</span>
192
+ )}
193
+ </span>
194
+ <CheckIcon
195
+ className={cn("size-4 shrink-0", isSelected(option.value) ? "opacity-100" : "opacity-0")}
196
+ />
197
+ </CommandItem>
198
+ ))
199
+
200
+ return (
201
+ <Command shouldFilter={!onSearch}>
202
+ <CommandInput placeholder={searchPlaceholder} onValueChange={onSearch} />
203
+ <CommandList>
204
+ {isLoading ? (
205
+ <div className="flex items-center justify-center py-6">
206
+ <LoaderIcon className="size-4 animate-spin text-muted-foreground" />
207
+ </div>
208
+ ) : (
209
+ <>
210
+ <CommandEmpty>{emptyText}</CommandEmpty>
211
+ {isGroupedOptions(options)
212
+ ? options.map((group) => (
213
+ <CommandGroup key={group.label} heading={group.label}>
214
+ {renderOptions(group.options)}
215
+ </CommandGroup>
216
+ ))
217
+ : renderOptions(options)}
218
+ </>
219
+ )}
220
+ </CommandList>
221
+ </Command>
222
+ )
223
+ }
224
+
225
+ interface RemoveButtonProps {
226
+ label: string
227
+ /** Runs on click and on Enter/Space; propagation is stopped for you. */
228
+ onRemove: () => void
229
+ /** Override the X icon size (default `size-3.5`). */
230
+ iconClassName?: string
231
+ }
232
+
233
+ /** The keyboard-accessible ×-affordance inside a badge or trigger. */
234
+ function RemoveButton({ label, onRemove, iconClassName }: RemoveButtonProps) {
235
+ const handle = (e: MouseEvent | KeyboardEvent) => {
236
+ e.stopPropagation()
237
+ onRemove()
238
+ }
239
+ return (
240
+ <span
241
+ role="button"
242
+ tabIndex={0}
243
+ aria-label={label}
244
+ className="rounded-sm opacity-50 hover:opacity-100 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none"
245
+ onClick={handle}
246
+ onKeyDown={(e) => {
247
+ if (e.key === "Enter" || e.key === " ") handle(e)
248
+ }}
249
+ >
250
+ <XIcon className={cn("size-3.5", iconClassName)} />
251
+ </span>
252
+ )
253
+ }
254
+
255
+ /* ---------- end of inlined code ---------- */
256
+
257
+ export interface SearchableSelectProps {
258
+ options: SelectOptions
259
+ value?: string
260
+ onChange?: (value: string | undefined) => void
261
+ onSearch?: (query: string) => void
262
+ placeholder?: string
263
+ searchPlaceholder?: string
264
+ emptyText?: string
265
+ isLoading?: boolean
266
+ disabled?: boolean
267
+ clearable?: boolean
268
+ className?: string
269
+ }
270
+
271
+ const TEXT = {
272
+ ja: { placeholder: "選択してください", search: "検索...", empty: "見つかりませんでした", clear: "クリア" },
273
+ en: { placeholder: "Select an option", search: "Search...", empty: "No results found.", clear: "Clear" },
274
+ }
275
+
276
+ /** Not given yet (a draft fills props in steps): render empty, keep the same value between renders. */
277
+ const NO_OPTIONS: never[] = []
278
+
279
+ export const SearchableSelect = forwardRef<HTMLDivElement, SearchableSelectProps>(
280
+ function SearchableSelect(
281
+ {
282
+ options = NO_OPTIONS,
283
+ value,
284
+ onChange,
285
+ onSearch,
286
+ placeholder,
287
+ searchPlaceholder,
288
+ emptyText,
289
+ isLoading = false,
290
+ disabled = false,
291
+ clearable = true,
292
+ className,
293
+ },
294
+ ref,
295
+ ) {
296
+ const [open, setOpen] = useState(false)
297
+ const t = TEXT[uiLanguage(useLocale())]
298
+
299
+ const allOptions = useMemo(() => flattenOptions(options), [options])
300
+ const selectedOption = useMemo(
301
+ () => allOptions.find((opt) => opt.value === value),
302
+ [allOptions, value],
303
+ )
304
+
305
+ function handleSelect(selectedValue: string) {
306
+ onChange?.(selectedValue === value ? undefined : selectedValue)
307
+ setOpen(false)
308
+ }
309
+
310
+ return (
311
+ <div ref={ref} data-slot="searchable-select">
312
+ <Popover open={open} onOpenChange={setOpen}>
313
+ <PopoverTrigger
314
+ render={
315
+ <Button
316
+ variant="outline"
317
+ disabled={disabled}
318
+ className={cn(
319
+ "w-full justify-between font-normal",
320
+ !selectedOption && "text-muted-foreground",
321
+ className,
322
+ )}
323
+ />
324
+ }
325
+ role="combobox"
326
+ aria-expanded={open}
327
+ >
328
+ <span className="truncate">{selectedOption ? selectedOption.label : (placeholder ?? t.placeholder)}</span>
329
+ <span className="flex shrink-0 items-center gap-1">
330
+ {clearable && value && (
331
+ <RemoveButton label={t.clear} onRemove={() => onChange?.(undefined)} />
332
+ )}
333
+ <ChevronDownIcon className="size-4 opacity-50" />
334
+ </span>
335
+ </PopoverTrigger>
336
+ <PopoverContent className="w-(--anchor-width) p-0" align="start">
337
+ <OptionCommandList
338
+ options={options}
339
+ isSelected={(v) => value === v}
340
+ onSelect={handleSelect}
341
+ onSearch={onSearch}
342
+ isLoading={isLoading}
343
+ searchPlaceholder={searchPlaceholder ?? t.search}
344
+ emptyText={emptyText ?? t.empty}
345
+ />
346
+ </PopoverContent>
347
+ </Popover>
348
+ </div>
349
+ )
350
+ },
351
+ )
352
+ SearchableSelect.displayName = "SearchableSelect"
@@ -0,0 +1,43 @@
1
+ // Copied by `vantage add ui section-header`. This file is yours to edit.
2
+ // Generated from @squadbase/squadkit registry/components/section-header.tsx by `pnpm run registry` (in Vantage, edit packages/squadkit, not registry/).
3
+ "use client"
4
+
5
+ /**
6
+ * SectionHeader — a titled divider inside a page: heading, optional
7
+ * description, and right-aligned actions that wrap below on narrow screens.
8
+ */
9
+ import { forwardRef, type ReactNode } from "react"
10
+
11
+ import { cn } from "@squadbase/vantage/ui"
12
+
13
+ const headingStyles = {
14
+ h1: "text-3xl font-bold tracking-tight",
15
+ h2: "text-base font-semibold tracking-tight",
16
+ h3: "text-base font-semibold",
17
+ h4: "text-lg font-semibold",
18
+ } as const
19
+
20
+ export interface SectionHeaderProps {
21
+ title: string
22
+ description?: string
23
+ actions?: ReactNode
24
+ className?: string
25
+ as?: keyof typeof headingStyles
26
+ }
27
+
28
+ export const SectionHeader = forwardRef<HTMLDivElement, SectionHeaderProps>(
29
+ ({ title, description, actions, className, as: Comp = "h2" }, ref) => (
30
+ <div
31
+ ref={ref}
32
+ data-slot="section-header"
33
+ className={cn("flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between", className)}
34
+ >
35
+ <div>
36
+ <Comp className={headingStyles[Comp]}>{title}</Comp>
37
+ {description && <p className="mt-1 text-sm text-muted-foreground">{description}</p>}
38
+ </div>
39
+ {actions && <div className="shrink-0">{actions}</div>}
40
+ </div>
41
+ ),
42
+ )
43
+ SectionHeader.displayName = "SectionHeader"
@@ -0,0 +1,76 @@
1
+ // Copied by `vantage add ui segmented-control`. This file is yours to edit.
2
+ // Generated from @squadbase/squadkit registry/components/segmented-control.tsx by `pnpm run registry` (in Vantage, edit packages/squadkit, not registry/).
3
+ "use client"
4
+
5
+ /**
6
+ * SegmentedControl — a single-select row of buttons over `ToggleGroup`. Base
7
+ * UI's toggle group is multi-value by default, so this wrapper narrows it to
8
+ * one value and refuses to deselect the active segment.
9
+ */
10
+ import { forwardRef } from "react"
11
+
12
+ import { cn } from "@squadbase/vantage/ui"
13
+ import { ToggleGroup, ToggleGroupItem } from "@squadbase/vantage/ui"
14
+ import type { SegmentOption } from "@squadbase/vantage/components"
15
+
16
+ const iconSizes = {
17
+ sm: "size-3.5",
18
+ default: "size-4",
19
+ lg: "size-5",
20
+ } as const
21
+
22
+ export interface SegmentedControlProps {
23
+ options: SegmentOption[]
24
+ value: string
25
+ onChange: (value: string) => void
26
+ size?: keyof typeof iconSizes
27
+ fullWidth?: boolean
28
+ ariaLabel?: string
29
+ className?: string
30
+ }
31
+
32
+ /** Not given yet (a draft fills props in steps): render empty, keep the same value between renders. */
33
+ const NO_OPTIONS: never[] = []
34
+
35
+ export const SegmentedControl = forwardRef<HTMLDivElement, SegmentedControlProps>(
36
+ function SegmentedControl(
37
+ { options = NO_OPTIONS, value, onChange, size = "default", fullWidth = false, ariaLabel, className },
38
+ ref,
39
+ ) {
40
+ return (
41
+ <ToggleGroup
42
+ ref={ref}
43
+ data-slot="segmented-control"
44
+ value={[value]}
45
+ onValueChange={(next) => {
46
+ // Base UI reports the full pressed set; keep the newly added segment
47
+ // and ignore the empty set so the control never loses its selection.
48
+ const picked = next.find((item) => item !== value) ?? next[0]
49
+ if (typeof picked === "string") onChange(picked)
50
+ }}
51
+ variant="outline"
52
+ size={size}
53
+ spacing={0}
54
+ aria-label={ariaLabel}
55
+ className={cn(fullWidth && "w-full", className)}
56
+ >
57
+ {options.map((option) => {
58
+ const Icon = option.icon
59
+ return (
60
+ <ToggleGroupItem
61
+ key={option.value}
62
+ value={option.value}
63
+ disabled={option.disabled}
64
+ aria-label={option.label}
65
+ className={cn(fullWidth && "flex-1")}
66
+ >
67
+ {Icon && <Icon className={iconSizes[size]} aria-hidden="true" />}
68
+ {option.label}
69
+ </ToggleGroupItem>
70
+ )
71
+ })}
72
+ </ToggleGroup>
73
+ )
74
+ },
75
+ )
76
+ SegmentedControl.displayName = "SegmentedControl"