@squadbase/vantage 0.6.2-dev1.9612525 → 0.6.2-dev1.9d7130b

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 (339) hide show
  1. package/dist/add-4GHF2TX2.js +6 -0
  2. package/dist/add-4GHF2TX2.js.map +1 -0
  3. package/dist/{build-TVKFIVFQ.js → build-U7GO26HR.js} +9 -9
  4. package/dist/{build-TVKFIVFQ.js.map → build-U7GO26HR.js.map} +1 -1
  5. package/dist/{check-3KHZXZMQ.js → check-MRVAIHG5.js} +7 -7
  6. package/dist/{check-3KHZXZMQ.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-77CISBMG.js +7581 -0
  12. package/dist/chunk-77CISBMG.js.map +1 -0
  13. package/dist/{chunk-U2M6HGKQ.js → chunk-AABMKHEU.js} +4 -4
  14. package/dist/{chunk-U2M6HGKQ.js.map → chunk-AABMKHEU.js.map} +1 -1
  15. package/dist/{chunk-PVTHHV7X.js → chunk-ANZLVSEP.js} +28 -7
  16. package/dist/chunk-ANZLVSEP.js.map +1 -0
  17. package/dist/chunk-CKWPK4RO.js +50 -0
  18. package/dist/chunk-CKWPK4RO.js.map +1 -0
  19. package/dist/chunk-EG4PX726.js +678 -0
  20. package/dist/chunk-EG4PX726.js.map +1 -0
  21. package/dist/{chunk-QI3XQKHS.js → chunk-GNXCX4WE.js} +10 -3
  22. package/dist/chunk-GNXCX4WE.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-P7W4LR3Z.js → chunk-PJ4SPXHS.js} +24 -7
  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-CEXAQQ5W.js → chunk-S5MDTHH7.js} +180 -18
  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-LMUACBMA.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-JKLLFVEU.js → chunk-UWSQUHX6.js} +4 -99
  44. package/dist/chunk-UWSQUHX6.js.map +1 -0
  45. package/dist/cli.js +12 -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 +1761 -30
  51. package/dist/components/index.js +7 -4
  52. package/dist/delta-text-CbrOaW83.d.ts +17 -0
  53. package/dist/{dev-GDKATCC7.js → dev-O42JFQ64.js} +10 -10
  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-EJJ3BECT.js → docs-JVP4RPKT.js} +3 -3
  59. package/dist/{docs-EJJ3BECT.js.map → docs-JVP4RPKT.js.map} +1 -1
  60. package/dist/{doctor-WQXPXP6K.js → doctor-YD3XAAOT.js} +7 -7
  61. package/dist/{doctor-WQXPXP6K.js.map → doctor-YD3XAAOT.js.map} +1 -1
  62. package/dist/format-DihQkL1N.d.ts +249 -0
  63. package/dist/markdown/index.js +1 -1
  64. package/dist/markdown/index.js.map +1 -1
  65. package/dist/{preview-OGMCNQUO.js → preview-T6CLSQVX.js} +3 -3
  66. package/dist/{preview-OGMCNQUO.js.map → preview-T6CLSQVX.js.map} +1 -1
  67. package/dist/query/index.d.ts +0 -11
  68. package/dist/query/index.js +2 -2
  69. package/dist/{routes-MWBWWOJ2.js → routes-PVKNT777.js} +6 -6
  70. package/dist/{routes-MWBWWOJ2.js.map → routes-PVKNT777.js.map} +1 -1
  71. package/dist/{search-6Y422SV6.js → search-5LC4XPB5.js} +3 -3
  72. package/dist/{search-6Y422SV6.js.map → search-5LC4XPB5.js.map} +1 -1
  73. package/dist/slide/index.d.ts +272 -1
  74. package/dist/slide/index.js +1025 -4
  75. package/dist/slide/index.js.map +1 -1
  76. package/dist/table/index.js +14 -10
  77. package/dist/table/index.js.map +1 -1
  78. package/dist/ui/index.d.ts +148 -12
  79. package/dist/ui/index.js +1340 -88
  80. package/dist/ui/index.js.map +1 -1
  81. package/dist/{upgrade-HCANX4GQ.js → upgrade-6DT7ADRP.js} +7 -7
  82. package/dist/{upgrade-HCANX4GQ.js.map → upgrade-6DT7ADRP.js.map} +1 -1
  83. package/dist/vite/index.d.ts +10 -0
  84. package/dist/vite/index.js +4 -4
  85. package/docs/en/agent-skills.md +1 -1
  86. package/docs/en/changelog.md +2 -0
  87. package/docs/en/components.md +42 -17
  88. package/docs/en/doc/delta-text.md +40 -0
  89. package/docs/en/doc/doc-action-items.md +49 -0
  90. package/docs/en/doc/doc-callout.md +38 -0
  91. package/docs/en/doc/doc-data-table.md +60 -0
  92. package/docs/en/doc/doc-executive-summary.md +64 -0
  93. package/docs/en/doc/doc-figure.md +56 -0
  94. package/docs/en/doc/doc-key-findings.md +61 -0
  95. package/docs/en/doc/doc-kpi-scorecard.md +80 -0
  96. package/docs/en/doc/doc-notes-and-sources.md +43 -0
  97. package/docs/en/doc/doc-report-header.md +46 -0
  98. package/docs/en/pages-and-metadata.md +15 -0
  99. package/docs/en/parts/area-chart.md +99 -0
  100. package/docs/en/parts/bar-chart.md +91 -0
  101. package/docs/en/parts/bar-list.md +50 -0
  102. package/docs/en/parts/category-bar.md +37 -0
  103. package/docs/en/parts/chart-frame.md +39 -0
  104. package/docs/en/parts/data-table.md +22 -0
  105. package/docs/en/parts/delta.md +51 -0
  106. package/docs/en/parts/donut-chart.md +72 -0
  107. package/docs/en/parts/format.md +43 -0
  108. package/docs/en/parts/funnel-steps.md +2 -1
  109. package/docs/en/parts/heatmap.md +53 -0
  110. package/docs/en/parts/kpi-card.md +58 -0
  111. package/docs/en/parts/legend.md +35 -0
  112. package/docs/en/parts/line-chart.md +94 -0
  113. package/docs/en/parts/metric-value.md +3 -2
  114. package/docs/en/parts/progress-circle.md +33 -0
  115. package/docs/en/parts/sample-data.md +39 -0
  116. package/docs/en/parts/scatter-chart.md +56 -0
  117. package/docs/en/parts/sparkline.md +1 -1
  118. package/docs/en/parts/tracker.md +36 -0
  119. package/docs/en/parts/trend-indicator.md +17 -1
  120. package/docs/en/parts/updated-at.md +30 -0
  121. package/docs/en/parts/waterfall-chart.md +56 -0
  122. package/docs/en/slide/slide-chart-full.md +48 -0
  123. package/docs/en/slide/slide-chart-insight.md +52 -0
  124. package/docs/en/slide/slide-columns.md +46 -0
  125. package/docs/en/slide/slide-comparison.md +68 -0
  126. package/docs/en/slide/slide-cover.md +39 -0
  127. package/docs/en/slide/slide-exec-summary.md +47 -0
  128. package/docs/en/slide/slide-heading.md +38 -0
  129. package/docs/en/slide/slide-kpi-grid.md +55 -0
  130. package/docs/en/slide/slide-kpi-hero.md +58 -0
  131. package/docs/en/slide/slide-next-actions.md +49 -0
  132. package/docs/en/slide/slide-scorecard-table.md +54 -0
  133. package/docs/en/slide/slide-section.md +44 -0
  134. package/docs/en/slide/slide-source-line.md +34 -0
  135. package/docs/en/ui/alert-dialog.md +42 -0
  136. package/docs/en/ui/avatar.md +31 -0
  137. package/docs/en/ui/combobox.md +74 -0
  138. package/docs/en/ui/drawer.md +41 -0
  139. package/docs/en/ui/empty.md +1 -1
  140. package/docs/en/ui/error-state.md +4 -3
  141. package/docs/en/ui/field.md +42 -0
  142. package/docs/en/ui/hover-card.md +21 -0
  143. package/docs/en/ui/kbd.md +17 -0
  144. package/docs/en/ui/loading.md +1 -1
  145. package/docs/en/ui/pagination.md +36 -0
  146. package/docs/en/ui/radio-group.md +21 -0
  147. package/docs/en/ui/toast.md +44 -0
  148. package/docs/en/ui/toggle-group.md +4 -3
  149. package/docs/en/ui-and-theming.md +1 -1
  150. package/docs/index.json +1184 -114
  151. package/docs/ja/agent-skills.md +1 -1
  152. package/docs/ja/changelog.md +33 -0
  153. package/docs/ja/components.md +68 -101
  154. package/docs/ja/doc/delta-text.md +40 -0
  155. package/docs/ja/doc/doc-action-items.md +49 -0
  156. package/docs/ja/doc/doc-callout.md +38 -0
  157. package/docs/ja/doc/doc-data-table.md +60 -0
  158. package/docs/ja/doc/doc-executive-summary.md +64 -0
  159. package/docs/ja/doc/doc-figure.md +56 -0
  160. package/docs/ja/doc/doc-key-findings.md +61 -0
  161. package/docs/ja/doc/doc-kpi-scorecard.md +80 -0
  162. package/docs/ja/doc/doc-notes-and-sources.md +43 -0
  163. package/docs/ja/doc/doc-report-header.md +46 -0
  164. package/docs/ja/page-types/csv.md +83 -0
  165. package/docs/ja/page-types/doc.md +83 -0
  166. package/docs/ja/page-types/excel.md +82 -0
  167. package/docs/ja/page-types/slide.md +133 -0
  168. package/docs/ja/page-types.md +47 -0
  169. package/docs/ja/pages-and-metadata.md +15 -0
  170. package/docs/ja/parts/area-chart.md +85 -0
  171. package/docs/ja/parts/bar-chart.md +95 -0
  172. package/docs/ja/parts/bar-list.md +58 -0
  173. package/docs/ja/parts/category-bar.md +36 -0
  174. package/docs/ja/parts/chart-frame.md +36 -0
  175. package/docs/ja/parts/data-table.md +22 -0
  176. package/docs/ja/parts/delta.md +51 -0
  177. package/docs/ja/parts/donut-chart.md +66 -0
  178. package/docs/ja/parts/echart.md +3 -0
  179. package/docs/ja/parts/format.md +44 -0
  180. package/docs/ja/parts/funnel-steps.md +27 -8
  181. package/docs/ja/parts/heatmap.md +45 -0
  182. package/docs/ja/parts/kpi-card.md +56 -0
  183. package/docs/ja/parts/legend.md +36 -0
  184. package/docs/ja/parts/line-chart.md +84 -0
  185. package/docs/ja/parts/metric-value.md +3 -2
  186. package/docs/ja/parts/progress-circle.md +34 -0
  187. package/docs/ja/parts/sample-data.md +61 -0
  188. package/docs/ja/parts/scatter-chart.md +69 -0
  189. package/docs/ja/parts/sparkline.md +2 -2
  190. package/docs/ja/parts/tracker.md +32 -0
  191. package/docs/ja/parts/trend-indicator.md +17 -1
  192. package/docs/ja/parts/updated-at.md +27 -0
  193. package/docs/ja/parts/waterfall-chart.md +61 -0
  194. package/docs/ja/routing.md +8 -86
  195. package/docs/ja/slide/slide-chart-full.md +48 -0
  196. package/docs/ja/slide/slide-chart-insight.md +52 -0
  197. package/docs/ja/slide/slide-columns.md +46 -0
  198. package/docs/ja/slide/slide-comparison.md +68 -0
  199. package/docs/ja/slide/slide-cover.md +39 -0
  200. package/docs/ja/slide/slide-exec-summary.md +47 -0
  201. package/docs/ja/slide/slide-heading.md +38 -0
  202. package/docs/ja/slide/slide-kpi-grid.md +55 -0
  203. package/docs/ja/slide/slide-kpi-hero.md +58 -0
  204. package/docs/ja/slide/slide-next-actions.md +49 -0
  205. package/docs/ja/slide/slide-scorecard-table.md +54 -0
  206. package/docs/ja/slide/slide-section.md +44 -0
  207. package/docs/ja/slide/slide-source-line.md +34 -0
  208. package/docs/ja/ui/alert-dialog.md +41 -0
  209. package/docs/ja/ui/avatar.md +31 -0
  210. package/docs/ja/ui/combobox.md +74 -0
  211. package/docs/ja/ui/drawer.md +41 -0
  212. package/docs/ja/ui/empty.md +1 -1
  213. package/docs/ja/ui/error-state.md +4 -3
  214. package/docs/ja/ui/field.md +42 -0
  215. package/docs/ja/ui/hover-card.md +21 -0
  216. package/docs/ja/ui/kbd.md +16 -0
  217. package/docs/ja/ui/loading.md +1 -1
  218. package/docs/ja/ui/pagination.md +36 -0
  219. package/docs/ja/ui/radio-group.md +21 -0
  220. package/docs/ja/ui/toast.md +46 -0
  221. package/docs/ja/ui/toggle-group.md +4 -3
  222. package/docs/ja/ui-and-theming.md +14 -7
  223. package/package.json +41 -31
  224. package/registry/ui/accordion.tsx +76 -0
  225. package/registry/ui/alert-dialog.tsx +189 -0
  226. package/registry/ui/alert.tsx +80 -0
  227. package/registry/ui/app-shell.tsx +424 -0
  228. package/registry/ui/area-chart.tsx +3960 -0
  229. package/registry/ui/attention-list.tsx +465 -0
  230. package/registry/ui/avatar.tsx +110 -0
  231. package/registry/ui/badge.tsx +56 -0
  232. package/registry/ui/bar-chart.tsx +3954 -0
  233. package/registry/ui/bar-list.tsx +3998 -0
  234. package/registry/ui/box-plot-chart.tsx +4214 -0
  235. package/registry/ui/breadcrumb.tsx +128 -0
  236. package/registry/ui/button.tsx +62 -0
  237. package/registry/ui/calendar.tsx +223 -0
  238. package/registry/ui/card.tsx +107 -0
  239. package/registry/ui/category-bar.tsx +1498 -0
  240. package/registry/ui/chart-frame.tsx +1604 -0
  241. package/registry/ui/checkbox.tsx +30 -0
  242. package/registry/ui/collapsible.tsx +23 -0
  243. package/registry/ui/combobox.tsx +310 -0
  244. package/registry/ui/command.tsx +198 -0
  245. package/registry/ui/dashboard-card.tsx +217 -0
  246. package/registry/ui/data-table.tsx +896 -157
  247. package/registry/ui/date-range-picker.tsx +544 -0
  248. package/registry/ui/delta.tsx +350 -0
  249. package/registry/ui/dialog.tsx +161 -0
  250. package/registry/ui/donut-chart.tsx +4006 -0
  251. package/registry/ui/drawer.tsx +229 -0
  252. package/registry/ui/dropdown-menu.tsx +274 -0
  253. package/registry/ui/echart.tsx +1178 -0
  254. package/registry/ui/field.tsx +240 -0
  255. package/registry/ui/filter-bar.tsx +551 -0
  256. package/registry/ui/funnel-steps.tsx +3843 -0
  257. package/registry/ui/heatmap.tsx +2027 -0
  258. package/registry/ui/histogram-chart.tsx +4284 -0
  259. package/registry/ui/hover-card.tsx +52 -0
  260. package/registry/ui/input-group.tsx +160 -0
  261. package/registry/ui/input.tsx +24 -0
  262. package/registry/ui/kbd.tsx +30 -0
  263. package/registry/ui/kpi-card.tsx +905 -0
  264. package/registry/ui/label.tsx +22 -0
  265. package/registry/ui/legend.tsx +3817 -0
  266. package/registry/ui/line-chart.tsx +3958 -0
  267. package/registry/ui/metric-value.tsx +62 -0
  268. package/registry/ui/multi-select.tsx +382 -0
  269. package/registry/ui/page-shell.tsx +420 -0
  270. package/registry/ui/pagination.tsx +140 -0
  271. package/registry/ui/paired-chart.tsx +4086 -0
  272. package/registry/ui/placeholder.tsx +36 -0
  273. package/registry/ui/popover.tsx +92 -0
  274. package/registry/ui/progress-circle.tsx +1033 -0
  275. package/registry/ui/progress.tsx +85 -0
  276. package/registry/ui/radio-group.tsx +39 -0
  277. package/registry/ui/sample-data.tsx +230 -0
  278. package/registry/ui/scatter-chart.tsx +4503 -0
  279. package/registry/ui/scroll-area.tsx +56 -0
  280. package/registry/ui/searchable-select.tsx +352 -0
  281. package/registry/ui/section-header.tsx +43 -0
  282. package/registry/ui/segmented-control.tsx +76 -0
  283. package/registry/ui/select.tsx +255 -0
  284. package/registry/ui/separator.tsx +27 -0
  285. package/registry/ui/sheet.tsx +139 -0
  286. package/registry/ui/sidebar.tsx +725 -0
  287. package/registry/ui/skeleton.tsx +17 -0
  288. package/registry/ui/slider.tsx +56 -0
  289. package/registry/ui/sparkline.tsx +230 -0
  290. package/registry/ui/spinner.tsx +14 -0
  291. package/registry/ui/states.tsx +247 -0
  292. package/registry/ui/status-badge.tsx +286 -0
  293. package/registry/ui/switch.tsx +34 -0
  294. package/registry/ui/table.tsx +118 -0
  295. package/registry/ui/tabs.tsx +84 -0
  296. package/registry/ui/textarea.tsx +22 -0
  297. package/registry/ui/toast.tsx +250 -0
  298. package/registry/ui/toggle-group.tsx +91 -0
  299. package/registry/ui/toggle.tsx +47 -0
  300. package/registry/ui/tooltip.tsx +72 -0
  301. package/registry/ui/tracker.tsx +1015 -0
  302. package/registry/ui/trend-indicator.tsx +217 -0
  303. package/registry/ui/updated-at.tsx +276 -0
  304. package/registry/ui/waterfall-chart.tsx +4561 -0
  305. package/skills/vantage-add-feature/SKILL.md +14 -7
  306. package/skills/vantage-design/SKILL.md +62 -52
  307. package/skills/vantage-design/references/extract.md +26 -27
  308. package/skills/vantage-design/references/format.md +12 -172
  309. package/skills/vantage-design/references/presets.md +50 -110
  310. package/skills/vantage-pitfalls/SKILL.md +10 -1
  311. package/skills/vantage-slide/SKILL.md +68 -36
  312. package/templates/AGENTS.md +54 -16
  313. package/templates/agents/api.md +36 -0
  314. package/templates/agents/csv.md +2 -1
  315. package/templates/agents/doc.md +52 -3
  316. package/templates/agents/page.md +91 -10
  317. package/templates/agents/slide.md +83 -4
  318. package/templates/agents/xlsx.md +2 -1
  319. package/theme.css +247 -132
  320. package/dist/add-DY4AXANK.js +0 -6
  321. package/dist/add-DY4AXANK.js.map +0 -1
  322. package/dist/chunk-5ZOP4SQR.js +0 -47
  323. package/dist/chunk-5ZOP4SQR.js.map +0 -1
  324. package/dist/chunk-A2UUGASH.js.map +0 -1
  325. package/dist/chunk-CEXAQQ5W.js.map +0 -1
  326. package/dist/chunk-DTDVSFRY.js +0 -29
  327. package/dist/chunk-DTDVSFRY.js.map +0 -1
  328. package/dist/chunk-JKLLFVEU.js.map +0 -1
  329. package/dist/chunk-LMUACBMA.js.map +0 -1
  330. package/dist/chunk-MP3QSOXL.js +0 -2232
  331. package/dist/chunk-MP3QSOXL.js.map +0 -1
  332. package/dist/chunk-P7W4LR3Z.js.map +0 -1
  333. package/dist/chunk-PVTHHV7X.js.map +0 -1
  334. package/dist/chunk-PXRX5PEC.js.map +0 -1
  335. package/dist/chunk-QI3XQKHS.js.map +0 -1
  336. package/dist/chunk-RPZAALCX.js.map +0 -1
  337. package/dist/chunk-VA776YE5.js +0 -316
  338. package/dist/chunk-VA776YE5.js.map +0 -1
  339. package/dist/dev-GDKATCC7.js.map +0 -1
@@ -0,0 +1,255 @@
1
+ // Copied by `vantage add ui select`. This file is yours to edit.
2
+ // Generated from @squadbase/squadkit registry/ui/select.tsx by `pnpm run registry` (in Vantage, edit packages/squadkit, not registry/).
3
+ "use client"
4
+
5
+ import * as React from "react"
6
+ import { Select as SelectPrimitive } from "@base-ui/react/select"
7
+
8
+ import { cn } from "@squadbase/vantage/ui"
9
+ import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react"
10
+
11
+ type DerivedSelectItem = { label: React.ReactNode; value: unknown }
12
+
13
+ /**
14
+ * Collect every reachable `SelectItem`'s `value` → children pair.
15
+ *
16
+ * Base UI's `Select.Value` renders the selected *value*, not the matching
17
+ * item's children — without `items` the trigger shows a raw `"kanto"` where the
18
+ * list says "関東". Deriving `items` from the children here means the ordinary
19
+ * case is right by default. The walk only sees `SelectItem` elements present in
20
+ * this tree, so options produced by an intermediate component still need
21
+ * `items` passed explicitly (an explicit `items` always wins).
22
+ */
23
+ function collectSelectItems(
24
+ node: React.ReactNode,
25
+ into: DerivedSelectItem[] = [],
26
+ ): DerivedSelectItem[] {
27
+ React.Children.forEach(node, (child) => {
28
+ if (!React.isValidElement(child)) return
29
+ const props = child.props as { value?: unknown; children?: React.ReactNode }
30
+ if (child.type === SelectItem) {
31
+ if (props.value !== undefined) into.push({ label: props.children, value: props.value })
32
+ return
33
+ }
34
+ if (props.children !== undefined) collectSelectItems(props.children, into)
35
+ })
36
+ return into
37
+ }
38
+
39
+ function Select<Value, Multiple extends boolean | undefined = false>({
40
+ items,
41
+ children,
42
+ ...props
43
+ }: SelectPrimitive.Root.Props<Value, Multiple>) {
44
+ const derivedItems = React.useMemo(() => {
45
+ if (items) return items
46
+ const collected = collectSelectItems(children)
47
+ return collected.length > 0 ? collected : undefined
48
+ }, [items, children])
49
+
50
+ return (
51
+ <SelectPrimitive.Root<Value, Multiple> items={derivedItems} {...props}>
52
+ {children}
53
+ </SelectPrimitive.Root>
54
+ )
55
+ }
56
+
57
+ function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {
58
+ return (
59
+ <SelectPrimitive.Group
60
+ data-slot="select-group"
61
+ className={cn("scroll-my-1 p-1", className)}
62
+ {...props}
63
+ />
64
+ )
65
+ }
66
+
67
+ function SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {
68
+ return (
69
+ <SelectPrimitive.Value
70
+ data-slot="select-value"
71
+ className={cn("flex flex-1 text-left", className)}
72
+ {...props}
73
+ />
74
+ )
75
+ }
76
+
77
+ function SelectTrigger({
78
+ className,
79
+ size = "default",
80
+ children,
81
+ ...props
82
+ }: SelectPrimitive.Trigger.Props & {
83
+ size?: "sm" | "default"
84
+ }) {
85
+ return (
86
+ <SelectPrimitive.Trigger
87
+ data-slot="select-trigger"
88
+ data-size={size}
89
+ className={cn(
90
+ "flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
91
+ className
92
+ )}
93
+ {...props}
94
+ >
95
+ {children}
96
+ <SelectPrimitive.Icon
97
+ render={
98
+ <ChevronDownIcon className="pointer-events-none size-4 text-muted-foreground" />
99
+ }
100
+ />
101
+ </SelectPrimitive.Trigger>
102
+ )
103
+ }
104
+
105
+ function SelectContent({
106
+ className,
107
+ children,
108
+ side = "bottom",
109
+ sideOffset = 4,
110
+ align = "center",
111
+ alignOffset = 0,
112
+ alignItemWithTrigger = true,
113
+ ...props
114
+ }: SelectPrimitive.Popup.Props &
115
+ Pick<
116
+ SelectPrimitive.Positioner.Props,
117
+ "align" | "alignOffset" | "side" | "sideOffset" | "alignItemWithTrigger"
118
+ >) {
119
+ return (
120
+ <SelectPrimitive.Portal>
121
+ <SelectPrimitive.Positioner
122
+ side={side}
123
+ sideOffset={sideOffset}
124
+ align={align}
125
+ alignOffset={alignOffset}
126
+ alignItemWithTrigger={alignItemWithTrigger}
127
+ className="isolate z-50"
128
+ >
129
+ <SelectPrimitive.Popup
130
+ data-slot="select-content"
131
+ data-align-trigger={alignItemWithTrigger}
132
+ className={cn(
133
+ "cn-menu-target cn-menu-translucent relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in motion-reduce:animate-none! data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
134
+ className
135
+ )}
136
+ {...props}
137
+ >
138
+ <SelectScrollUpButton />
139
+ <SelectPrimitive.List>{children}</SelectPrimitive.List>
140
+ <SelectScrollDownButton />
141
+ </SelectPrimitive.Popup>
142
+ </SelectPrimitive.Positioner>
143
+ </SelectPrimitive.Portal>
144
+ )
145
+ }
146
+
147
+ function SelectLabel({
148
+ className,
149
+ ...props
150
+ }: SelectPrimitive.GroupLabel.Props) {
151
+ return (
152
+ <SelectPrimitive.GroupLabel
153
+ data-slot="select-label"
154
+ className={cn("px-1.5 py-1 text-xs text-muted-foreground", className)}
155
+ {...props}
156
+ />
157
+ )
158
+ }
159
+
160
+ function SelectItem({
161
+ className,
162
+ children,
163
+ ...props
164
+ }: SelectPrimitive.Item.Props) {
165
+ return (
166
+ <SelectPrimitive.Item
167
+ data-slot="select-item"
168
+ className={cn(
169
+ "relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
170
+ className
171
+ )}
172
+ {...props}
173
+ >
174
+ {/*
175
+ `line-clamp-1` rather than `truncate`: the item's width is capped by the
176
+ popup (`--anchor-width`), and a label longer than that must stop before
177
+ the `pr-8` reserved for the check indicator. `text-overflow: ellipsis`
178
+ does not apply to a flex container's anonymous text, so it would clip
179
+ without an ellipsis; `-webkit-line-clamp` ellipsizes the text node.
180
+ */}
181
+ <SelectPrimitive.ItemText className="min-w-0 flex-1 line-clamp-1">
182
+ {children}
183
+ </SelectPrimitive.ItemText>
184
+ <SelectPrimitive.ItemIndicator
185
+ render={
186
+ <span className="pointer-events-none absolute right-2 flex size-4 items-center justify-center" />
187
+ }
188
+ >
189
+ <CheckIcon className="pointer-events-none" />
190
+ </SelectPrimitive.ItemIndicator>
191
+ </SelectPrimitive.Item>
192
+ )
193
+ }
194
+
195
+ function SelectSeparator({
196
+ className,
197
+ ...props
198
+ }: SelectPrimitive.Separator.Props) {
199
+ return (
200
+ <SelectPrimitive.Separator
201
+ data-slot="select-separator"
202
+ className={cn("pointer-events-none -mx-1 my-1 h-px bg-border", className)}
203
+ {...props}
204
+ />
205
+ )
206
+ }
207
+
208
+ function SelectScrollUpButton({
209
+ className,
210
+ ...props
211
+ }: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>) {
212
+ return (
213
+ <SelectPrimitive.ScrollUpArrow
214
+ data-slot="select-scroll-up-button"
215
+ className={cn(
216
+ "top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
217
+ className
218
+ )}
219
+ {...props}
220
+ >
221
+ <ChevronUpIcon />
222
+ </SelectPrimitive.ScrollUpArrow>
223
+ )
224
+ }
225
+
226
+ function SelectScrollDownButton({
227
+ className,
228
+ ...props
229
+ }: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>) {
230
+ return (
231
+ <SelectPrimitive.ScrollDownArrow
232
+ data-slot="select-scroll-down-button"
233
+ className={cn(
234
+ "bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
235
+ className
236
+ )}
237
+ {...props}
238
+ >
239
+ <ChevronDownIcon />
240
+ </SelectPrimitive.ScrollDownArrow>
241
+ )
242
+ }
243
+
244
+ export {
245
+ Select,
246
+ SelectContent,
247
+ SelectGroup,
248
+ SelectItem,
249
+ SelectLabel,
250
+ SelectScrollDownButton,
251
+ SelectScrollUpButton,
252
+ SelectSeparator,
253
+ SelectTrigger,
254
+ SelectValue,
255
+ }
@@ -0,0 +1,27 @@
1
+ // Copied by `vantage add ui separator`. This file is yours to edit.
2
+ // Generated from @squadbase/squadkit registry/ui/separator.tsx by `pnpm run registry` (in Vantage, edit packages/squadkit, not registry/).
3
+ "use client"
4
+
5
+ import { Separator as SeparatorPrimitive } from "@base-ui/react/separator"
6
+
7
+ import { cn } from "@squadbase/vantage/ui"
8
+
9
+ function Separator({
10
+ className,
11
+ orientation = "horizontal",
12
+ ...props
13
+ }: SeparatorPrimitive.Props) {
14
+ return (
15
+ <SeparatorPrimitive
16
+ data-slot="separator"
17
+ orientation={orientation}
18
+ className={cn(
19
+ "shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
20
+ className
21
+ )}
22
+ {...props}
23
+ />
24
+ )
25
+ }
26
+
27
+ export { Separator }
@@ -0,0 +1,139 @@
1
+ // Copied by `vantage add ui sheet`. This file is yours to edit.
2
+ // Generated from @squadbase/squadkit registry/ui/sheet.tsx by `pnpm run registry` (in Vantage, edit packages/squadkit, not registry/).
3
+ "use client"
4
+
5
+ import * as React from "react"
6
+ import { Dialog as SheetPrimitive } from "@base-ui/react/dialog"
7
+
8
+ import { cn } from "@squadbase/vantage/ui"
9
+ import { Button } from "@squadbase/vantage/ui"
10
+ import { XIcon } from "lucide-react"
11
+
12
+ function Sheet({ ...props }: SheetPrimitive.Root.Props) {
13
+ return <SheetPrimitive.Root data-slot="sheet" {...props} />
14
+ }
15
+
16
+ function SheetTrigger({ ...props }: SheetPrimitive.Trigger.Props) {
17
+ return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />
18
+ }
19
+
20
+ function SheetClose({ ...props }: SheetPrimitive.Close.Props) {
21
+ return <SheetPrimitive.Close data-slot="sheet-close" {...props} />
22
+ }
23
+
24
+ function SheetPortal({ ...props }: SheetPrimitive.Portal.Props) {
25
+ return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />
26
+ }
27
+
28
+ function SheetOverlay({ className, ...props }: SheetPrimitive.Backdrop.Props) {
29
+ return (
30
+ <SheetPrimitive.Backdrop
31
+ data-slot="sheet-overlay"
32
+ className={cn(
33
+ "fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",
34
+ className
35
+ )}
36
+ {...props}
37
+ />
38
+ )
39
+ }
40
+
41
+ function SheetContent({
42
+ className,
43
+ children,
44
+ side = "right",
45
+ showCloseButton = true,
46
+ ...props
47
+ }: SheetPrimitive.Popup.Props & {
48
+ side?: "top" | "right" | "bottom" | "left"
49
+ showCloseButton?: boolean
50
+ }) {
51
+ return (
52
+ <SheetPortal>
53
+ <SheetOverlay />
54
+ <SheetPrimitive.Popup
55
+ data-slot="sheet-content"
56
+ data-side={side}
57
+ className={cn(
58
+ "fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-out data-ending-style:opacity-0 data-starting-style:opacity-0 motion-reduce:data-ending-style:translate-none! motion-reduce:data-starting-style:translate-none! data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",
59
+ className
60
+ )}
61
+ {...props}
62
+ >
63
+ {children}
64
+ {showCloseButton && (
65
+ <SheetPrimitive.Close
66
+ data-slot="sheet-close"
67
+ render={
68
+ <Button
69
+ variant="ghost"
70
+ className="absolute top-3 right-3"
71
+ size="icon-sm"
72
+ />
73
+ }
74
+ >
75
+ <XIcon />
76
+ <span className="sr-only">Close</span>
77
+ </SheetPrimitive.Close>
78
+ )}
79
+ </SheetPrimitive.Popup>
80
+ </SheetPortal>
81
+ )
82
+ }
83
+
84
+ function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
85
+ return (
86
+ <div
87
+ data-slot="sheet-header"
88
+ className={cn("flex flex-col gap-0.5 p-4", className)}
89
+ {...props}
90
+ />
91
+ )
92
+ }
93
+
94
+ function SheetFooter({ className, ...props }: React.ComponentProps<"div">) {
95
+ return (
96
+ <div
97
+ data-slot="sheet-footer"
98
+ className={cn("mt-auto flex flex-col gap-2 p-4", className)}
99
+ {...props}
100
+ />
101
+ )
102
+ }
103
+
104
+ function SheetTitle({ className, ...props }: SheetPrimitive.Title.Props) {
105
+ return (
106
+ <SheetPrimitive.Title
107
+ data-slot="sheet-title"
108
+ className={cn(
109
+ "cn-font-heading text-base font-medium text-foreground",
110
+ className
111
+ )}
112
+ {...props}
113
+ />
114
+ )
115
+ }
116
+
117
+ function SheetDescription({
118
+ className,
119
+ ...props
120
+ }: SheetPrimitive.Description.Props) {
121
+ return (
122
+ <SheetPrimitive.Description
123
+ data-slot="sheet-description"
124
+ className={cn("text-sm text-muted-foreground", className)}
125
+ {...props}
126
+ />
127
+ )
128
+ }
129
+
130
+ export {
131
+ Sheet,
132
+ SheetTrigger,
133
+ SheetClose,
134
+ SheetContent,
135
+ SheetHeader,
136
+ SheetFooter,
137
+ SheetTitle,
138
+ SheetDescription,
139
+ }