@squadbase/vantage 0.6.1 → 0.6.2-dev1.31accb1

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 (183) hide show
  1. package/dist/add-DY4AXANK.js +6 -0
  2. package/dist/add-DY4AXANK.js.map +1 -0
  3. package/dist/{build-O5TVNH4E.js → build-TVKFIVFQ.js} +8 -8
  4. package/dist/{build-O5TVNH4E.js.map → build-TVKFIVFQ.js.map} +1 -1
  5. package/dist/{check-WFBEDHDR.js → check-3KHZXZMQ.js} +6 -6
  6. package/dist/{check-WFBEDHDR.js.map → check-3KHZXZMQ.js.map} +1 -1
  7. package/dist/{chunk-PLST5Q7T.js → chunk-AG6RZ2RR.js} +1010 -23
  8. package/dist/chunk-AG6RZ2RR.js.map +1 -0
  9. package/dist/{chunk-KLEIVDUV.js → chunk-CEXAQQ5W.js} +150 -11
  10. package/dist/chunk-CEXAQQ5W.js.map +1 -0
  11. package/dist/{chunk-JGRMRXXZ.js → chunk-JKLLFVEU.js} +3 -3
  12. package/dist/{chunk-JGRMRXXZ.js.map → chunk-JKLLFVEU.js.map} +1 -1
  13. package/dist/{chunk-EP6JHXSR.js → chunk-LMUACBMA.js} +3 -3
  14. package/dist/{chunk-EP6JHXSR.js.map → chunk-LMUACBMA.js.map} +1 -1
  15. package/dist/{chunk-MXI3PZFT.js → chunk-OB6UBJXF.js} +156 -200
  16. package/dist/chunk-OB6UBJXF.js.map +1 -0
  17. package/dist/{chunk-BCE22JSM.js → chunk-P7W4LR3Z.js} +32 -13
  18. package/dist/chunk-P7W4LR3Z.js.map +1 -0
  19. package/dist/chunk-PXRX5PEC.js +54 -0
  20. package/dist/chunk-PXRX5PEC.js.map +1 -0
  21. package/dist/{chunk-3G43C6OL.js → chunk-QI3XQKHS.js} +39 -3
  22. package/dist/chunk-QI3XQKHS.js.map +1 -0
  23. package/dist/{chunk-QDZA5JSL.js → chunk-U2M6HGKQ.js} +3 -3
  24. package/dist/{chunk-QDZA5JSL.js.map → chunk-U2M6HGKQ.js.map} +1 -1
  25. package/dist/{chunk-T3FLAGI6.js → chunk-VA776YE5.js} +3 -3
  26. package/dist/{chunk-T3FLAGI6.js.map → chunk-VA776YE5.js.map} +1 -1
  27. package/dist/cli.js +14 -11
  28. package/dist/cli.js.map +1 -1
  29. package/dist/components/index.d.ts +223 -1
  30. package/dist/components/index.js +3 -2
  31. package/dist/{dev-NZRLOQCL.js → dev-GDKATCC7.js} +22 -11
  32. package/dist/dev-GDKATCC7.js.map +1 -0
  33. package/dist/doc/index.d.ts +4 -0
  34. package/dist/doc/index.js +107 -11
  35. package/dist/doc/index.js.map +1 -1
  36. package/dist/{docs-ZGDJUHJI.js → docs-EJJ3BECT.js} +3 -3
  37. package/dist/{docs-ZGDJUHJI.js.map → docs-EJJ3BECT.js.map} +1 -1
  38. package/dist/{doctor-VFKEMR54.js → doctor-WQXPXP6K.js} +7 -7
  39. package/dist/doctor-WQXPXP6K.js.map +1 -0
  40. package/dist/{preview-QDCIVVSR.js → preview-OGMCNQUO.js} +12 -4
  41. package/dist/preview-OGMCNQUO.js.map +1 -0
  42. package/dist/{routes-RHP5FVGD.js → routes-MWBWWOJ2.js} +5 -5
  43. package/dist/{routes-RHP5FVGD.js.map → routes-MWBWWOJ2.js.map} +1 -1
  44. package/dist/{search-RFBELGY7.js → search-6Y422SV6.js} +3 -3
  45. package/dist/{search-RFBELGY7.js.map → search-6Y422SV6.js.map} +1 -1
  46. package/dist/slide/index.js +61 -15
  47. package/dist/slide/index.js.map +1 -1
  48. package/dist/table/index.js +7 -5
  49. package/dist/table/index.js.map +1 -1
  50. package/dist/ui/index.d.ts +140 -10
  51. package/dist/ui/index.js +1406 -63
  52. package/dist/ui/index.js.map +1 -1
  53. package/dist/{upgrade-GF2P67M6.js → upgrade-HCANX4GQ.js} +6 -6
  54. package/dist/{upgrade-GF2P67M6.js.map → upgrade-HCANX4GQ.js.map} +1 -1
  55. package/dist/vite/index.js +3 -3
  56. package/docs/en/changelog.md +24 -0
  57. package/docs/en/cli-reference.md +30 -0
  58. package/docs/en/parts/page-shell.md +1 -1
  59. package/docs/en/routing.md +4 -2
  60. package/docs/index.json +291 -61
  61. package/docs/ja/changelog.md +50 -0
  62. package/docs/ja/cli-reference.md +29 -0
  63. package/docs/ja/components.md +33 -89
  64. package/docs/ja/page-types/csv.md +83 -0
  65. package/docs/ja/page-types/doc.md +83 -0
  66. package/docs/ja/page-types/excel.md +82 -0
  67. package/docs/ja/page-types/slide.md +132 -0
  68. package/docs/ja/page-types.md +47 -0
  69. package/docs/ja/parts/area-chart.md +61 -0
  70. package/docs/ja/parts/bar-chart.md +69 -0
  71. package/docs/ja/parts/bar-list.md +35 -0
  72. package/docs/ja/parts/category-bar.md +36 -0
  73. package/docs/ja/parts/donut-chart.md +47 -0
  74. package/docs/ja/parts/echart.md +3 -0
  75. package/docs/ja/parts/line-chart.md +58 -0
  76. package/docs/ja/parts/page-shell.md +1 -1
  77. package/docs/ja/parts/progress-circle.md +34 -0
  78. package/docs/ja/parts/sparkline.md +1 -1
  79. package/docs/ja/parts/tracker.md +32 -0
  80. package/docs/ja/routing.md +8 -84
  81. package/docs/ja/ui/alert-dialog.md +41 -0
  82. package/docs/ja/ui/avatar.md +31 -0
  83. package/docs/ja/ui/combobox.md +74 -0
  84. package/docs/ja/ui/drawer.md +41 -0
  85. package/docs/ja/ui/field.md +42 -0
  86. package/docs/ja/ui/hover-card.md +21 -0
  87. package/docs/ja/ui/kbd.md +16 -0
  88. package/docs/ja/ui/pagination.md +36 -0
  89. package/docs/ja/ui/radio-group.md +21 -0
  90. package/docs/ja/ui/toast.md +46 -0
  91. package/docs/ja/ui-and-theming.md +14 -7
  92. package/package.json +18 -12
  93. package/registry/ui/accordion.tsx +74 -0
  94. package/registry/ui/alert-dialog.tsx +189 -0
  95. package/registry/ui/alert.tsx +78 -0
  96. package/registry/ui/app-shell.tsx +281 -0
  97. package/registry/ui/area-chart.tsx +1015 -0
  98. package/registry/ui/avatar.tsx +110 -0
  99. package/registry/ui/badge.tsx +54 -0
  100. package/registry/ui/bar-chart.tsx +1013 -0
  101. package/registry/ui/bar-list.tsx +302 -0
  102. package/registry/ui/breadcrumb.tsx +126 -0
  103. package/registry/ui/button.tsx +60 -0
  104. package/registry/ui/calendar.tsx +221 -0
  105. package/registry/ui/card.tsx +105 -0
  106. package/registry/ui/category-bar.tsx +281 -0
  107. package/registry/ui/checkbox.tsx +28 -0
  108. package/registry/ui/collapsible.tsx +21 -0
  109. package/registry/ui/combobox.tsx +310 -0
  110. package/registry/ui/command.tsx +196 -0
  111. package/registry/ui/dashboard-card.tsx +174 -0
  112. package/registry/ui/data-table.tsx +16 -91
  113. package/registry/ui/date-range-picker.tsx +209 -0
  114. package/registry/ui/dialog.tsx +159 -0
  115. package/registry/ui/donut-chart.tsx +1004 -0
  116. package/registry/ui/drawer.tsx +229 -0
  117. package/registry/ui/dropdown-menu.tsx +272 -0
  118. package/registry/ui/echart.tsx +486 -0
  119. package/registry/ui/field.tsx +240 -0
  120. package/registry/ui/filter-bar.tsx +365 -0
  121. package/registry/ui/funnel-steps.tsx +274 -0
  122. package/registry/ui/hover-card.tsx +52 -0
  123. package/registry/ui/input-group.tsx +158 -0
  124. package/registry/ui/input.tsx +22 -0
  125. package/registry/ui/kbd.tsx +28 -0
  126. package/registry/ui/label.tsx +20 -0
  127. package/registry/ui/line-chart.tsx +1007 -0
  128. package/registry/ui/metric-value.tsx +54 -0
  129. package/registry/ui/multi-select.tsx +226 -0
  130. package/registry/ui/page-shell.tsx +227 -0
  131. package/registry/ui/pagination.tsx +138 -0
  132. package/registry/ui/placeholder.tsx +30 -0
  133. package/registry/ui/popover.tsx +90 -0
  134. package/registry/ui/progress-circle.tsx +272 -0
  135. package/registry/ui/progress.tsx +83 -0
  136. package/registry/ui/radio-group.tsx +39 -0
  137. package/registry/ui/scroll-area.tsx +55 -0
  138. package/registry/ui/searchable-select.tsx +209 -0
  139. package/registry/ui/section-header.tsx +41 -0
  140. package/registry/ui/segmented-control.tsx +71 -0
  141. package/registry/ui/select.tsx +253 -0
  142. package/registry/ui/separator.tsx +25 -0
  143. package/registry/ui/sheet.tsx +137 -0
  144. package/registry/ui/sidebar.tsx +723 -0
  145. package/registry/ui/skeleton.tsx +15 -0
  146. package/registry/ui/slider.tsx +54 -0
  147. package/registry/ui/sparkline.tsx +155 -0
  148. package/registry/ui/spinner.tsx +12 -0
  149. package/registry/ui/states.tsx +61 -0
  150. package/registry/ui/status-badge.tsx +79 -0
  151. package/registry/ui/switch.tsx +32 -0
  152. package/registry/ui/table.tsx +116 -0
  153. package/registry/ui/tabs.tsx +82 -0
  154. package/registry/ui/textarea.tsx +20 -0
  155. package/registry/ui/toast.tsx +250 -0
  156. package/registry/ui/toggle-group.tsx +89 -0
  157. package/registry/ui/toggle.tsx +45 -0
  158. package/registry/ui/tooltip.tsx +66 -0
  159. package/registry/ui/tracker.tsx +236 -0
  160. package/registry/ui/trend-indicator.tsx +62 -0
  161. package/skills/vantage-add-feature/SKILL.md +9 -7
  162. package/skills/vantage-design/SKILL.md +3 -1
  163. package/skills/vantage-design/references/format.md +1 -1
  164. package/skills/vantage-pitfalls/SKILL.md +5 -1
  165. package/skills/vantage-slide/SKILL.md +17 -0
  166. package/templates/AGENTS.md +10 -1
  167. package/templates/agents/api.md +29 -0
  168. package/templates/agents/csv.md +2 -1
  169. package/templates/agents/doc.md +6 -3
  170. package/templates/agents/page.md +22 -8
  171. package/templates/agents/slide.md +13 -1
  172. package/templates/agents/xlsx.md +2 -1
  173. package/theme.css +51 -1
  174. package/dist/add-EISGSZAH.js +0 -6
  175. package/dist/add-EISGSZAH.js.map +0 -1
  176. package/dist/chunk-3G43C6OL.js.map +0 -1
  177. package/dist/chunk-BCE22JSM.js.map +0 -1
  178. package/dist/chunk-KLEIVDUV.js.map +0 -1
  179. package/dist/chunk-MXI3PZFT.js.map +0 -1
  180. package/dist/chunk-PLST5Q7T.js.map +0 -1
  181. package/dist/dev-NZRLOQCL.js.map +0 -1
  182. package/dist/doctor-VFKEMR54.js.map +0 -1
  183. package/dist/preview-QDCIVVSR.js.map +0 -1
@@ -0,0 +1,310 @@
1
+ // Copied by `vantage add ui combobox`. This file is yours to edit.
2
+ // Generated from @squadbase/vantage src/ui/combobox.tsx by `npm run registry` (in Vantage, edit src/, not registry/).
3
+ "use client"
4
+
5
+ import * as React from "react"
6
+ import { Combobox as ComboboxPrimitive } from "@base-ui/react/combobox"
7
+ import { cn } from "@squadbase/vantage/ui"
8
+
9
+ import { Button } from "@squadbase/vantage/ui"
10
+ import {
11
+ InputGroup,
12
+ InputGroupAddon,
13
+ InputGroupButton,
14
+ InputGroupInput,
15
+ } from "@squadbase/vantage/ui"
16
+ import { CheckIcon, ChevronDownIcon, XIcon } from "lucide-react"
17
+
18
+ const Combobox = ComboboxPrimitive.Root
19
+
20
+ function ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {
21
+ return <ComboboxPrimitive.Value data-slot="combobox-value" {...props} />
22
+ }
23
+
24
+ function ComboboxTrigger({
25
+ className,
26
+ children,
27
+ ...props
28
+ }: ComboboxPrimitive.Trigger.Props) {
29
+ return (
30
+ <ComboboxPrimitive.Trigger
31
+ data-slot="combobox-trigger"
32
+ className={cn("[&_svg:not([class*='size-'])]:size-4", className)}
33
+ {...props}
34
+ >
35
+ {children}
36
+ <ChevronDownIcon
37
+ className="pointer-events-none size-4 text-muted-foreground"
38
+ />
39
+ </ComboboxPrimitive.Trigger>
40
+ )
41
+ }
42
+
43
+ function ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) {
44
+ return (
45
+ <ComboboxPrimitive.Clear
46
+ data-slot="combobox-clear"
47
+ render={<InputGroupButton variant="ghost" size="icon-xs" />}
48
+ className={cn(className)}
49
+ {...props}
50
+ >
51
+ <XIcon
52
+ className="pointer-events-none"
53
+ />
54
+ </ComboboxPrimitive.Clear>
55
+ )
56
+ }
57
+
58
+ function ComboboxInput({
59
+ className,
60
+ children,
61
+ disabled = false,
62
+ showTrigger = true,
63
+ showClear = false,
64
+ ...props
65
+ }: ComboboxPrimitive.Input.Props & {
66
+ showTrigger?: boolean
67
+ showClear?: boolean
68
+ }) {
69
+ return (
70
+ <InputGroup className={cn("w-auto", className)}>
71
+ <ComboboxPrimitive.Input
72
+ render={<InputGroupInput disabled={disabled} />}
73
+ {...props}
74
+ />
75
+ <InputGroupAddon align="inline-end">
76
+ {showTrigger && (
77
+ <InputGroupButton
78
+ size="icon-xs"
79
+ variant="ghost"
80
+ render={<ComboboxTrigger />}
81
+ data-slot="input-group-button"
82
+ className="group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent"
83
+ disabled={disabled}
84
+ />
85
+ )}
86
+ {showClear && <ComboboxClear disabled={disabled} />}
87
+ </InputGroupAddon>
88
+ {children}
89
+ </InputGroup>
90
+ )
91
+ }
92
+
93
+ function ComboboxContent({
94
+ className,
95
+ side = "bottom",
96
+ sideOffset = 6,
97
+ align = "start",
98
+ alignOffset = 0,
99
+ anchor,
100
+ ...props
101
+ }: ComboboxPrimitive.Popup.Props &
102
+ Pick<
103
+ ComboboxPrimitive.Positioner.Props,
104
+ "side" | "align" | "sideOffset" | "alignOffset" | "anchor"
105
+ >) {
106
+ return (
107
+ <ComboboxPrimitive.Portal>
108
+ <ComboboxPrimitive.Positioner
109
+ side={side}
110
+ sideOffset={sideOffset}
111
+ align={align}
112
+ alignOffset={alignOffset}
113
+ anchor={anchor}
114
+ className="isolate z-50"
115
+ >
116
+ <ComboboxPrimitive.Popup
117
+ data-slot="combobox-content"
118
+ data-chips={!!anchor}
119
+ className={cn(
120
+ "cn-menu-target cn-menu-translucent group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) 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-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
121
+ className
122
+ )}
123
+ {...props}
124
+ />
125
+ </ComboboxPrimitive.Positioner>
126
+ </ComboboxPrimitive.Portal>
127
+ )
128
+ }
129
+
130
+ function ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {
131
+ return (
132
+ <ComboboxPrimitive.List
133
+ data-slot="combobox-list"
134
+ className={cn(
135
+ "no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0",
136
+ className
137
+ )}
138
+ {...props}
139
+ />
140
+ )
141
+ }
142
+
143
+ function ComboboxItem({
144
+ className,
145
+ children,
146
+ ...props
147
+ }: ComboboxPrimitive.Item.Props) {
148
+ return (
149
+ <ComboboxPrimitive.Item
150
+ data-slot="combobox-item"
151
+ className={cn(
152
+ "relative flex w-full cursor-default items-center gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**: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",
153
+ className
154
+ )}
155
+ {...props}
156
+ >
157
+ {children}
158
+ <ComboboxPrimitive.ItemIndicator
159
+ render={
160
+ <span className="pointer-events-none absolute right-2 flex size-4 items-center justify-center" />
161
+ }
162
+ >
163
+ <CheckIcon
164
+ className="pointer-events-none"
165
+ />
166
+ </ComboboxPrimitive.ItemIndicator>
167
+ </ComboboxPrimitive.Item>
168
+ )
169
+ }
170
+
171
+ function ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {
172
+ return (
173
+ <ComboboxPrimitive.Group
174
+ data-slot="combobox-group"
175
+ className={cn(className)}
176
+ {...props}
177
+ />
178
+ )
179
+ }
180
+
181
+ function ComboboxLabel({
182
+ className,
183
+ ...props
184
+ }: ComboboxPrimitive.GroupLabel.Props) {
185
+ return (
186
+ <ComboboxPrimitive.GroupLabel
187
+ data-slot="combobox-label"
188
+ className={cn("px-2 py-1.5 text-xs text-muted-foreground", className)}
189
+ {...props}
190
+ />
191
+ )
192
+ }
193
+
194
+ function ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props) {
195
+ return (
196
+ <ComboboxPrimitive.Collection data-slot="combobox-collection" {...props} />
197
+ )
198
+ }
199
+
200
+ function ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) {
201
+ return (
202
+ <ComboboxPrimitive.Empty
203
+ data-slot="combobox-empty"
204
+ className={cn(
205
+ "hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex",
206
+ className
207
+ )}
208
+ {...props}
209
+ />
210
+ )
211
+ }
212
+
213
+ function ComboboxSeparator({
214
+ className,
215
+ ...props
216
+ }: ComboboxPrimitive.Separator.Props) {
217
+ return (
218
+ <ComboboxPrimitive.Separator
219
+ data-slot="combobox-separator"
220
+ className={cn("-mx-1 my-1 h-px bg-border", className)}
221
+ {...props}
222
+ />
223
+ )
224
+ }
225
+
226
+ function ComboboxChips({
227
+ className,
228
+ ...props
229
+ }: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> &
230
+ ComboboxPrimitive.Chips.Props) {
231
+ return (
232
+ <ComboboxPrimitive.Chips
233
+ data-slot="combobox-chips"
234
+ className={cn(
235
+ "flex min-h-8 flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40",
236
+ className
237
+ )}
238
+ {...props}
239
+ />
240
+ )
241
+ }
242
+
243
+ function ComboboxChip({
244
+ className,
245
+ children,
246
+ showRemove = true,
247
+ ...props
248
+ }: ComboboxPrimitive.Chip.Props & {
249
+ showRemove?: boolean
250
+ }) {
251
+ return (
252
+ <ComboboxPrimitive.Chip
253
+ data-slot="combobox-chip"
254
+ className={cn(
255
+ "flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0",
256
+ className
257
+ )}
258
+ {...props}
259
+ >
260
+ {children}
261
+ {showRemove && (
262
+ <ComboboxPrimitive.ChipRemove
263
+ render={<Button variant="ghost" size="icon-xs" />}
264
+ className="-ml-1 opacity-50 hover:opacity-100"
265
+ data-slot="combobox-chip-remove"
266
+ >
267
+ <XIcon
268
+ className="pointer-events-none"
269
+ />
270
+ </ComboboxPrimitive.ChipRemove>
271
+ )}
272
+ </ComboboxPrimitive.Chip>
273
+ )
274
+ }
275
+
276
+ function ComboboxChipsInput({
277
+ className,
278
+ ...props
279
+ }: ComboboxPrimitive.Input.Props) {
280
+ return (
281
+ <ComboboxPrimitive.Input
282
+ data-slot="combobox-chip-input"
283
+ className={cn("min-w-16 flex-1 outline-none", className)}
284
+ {...props}
285
+ />
286
+ )
287
+ }
288
+
289
+ function useComboboxAnchor() {
290
+ return React.useRef<HTMLDivElement | null>(null)
291
+ }
292
+
293
+ export {
294
+ Combobox,
295
+ ComboboxInput,
296
+ ComboboxContent,
297
+ ComboboxList,
298
+ ComboboxItem,
299
+ ComboboxGroup,
300
+ ComboboxLabel,
301
+ ComboboxCollection,
302
+ ComboboxEmpty,
303
+ ComboboxSeparator,
304
+ ComboboxChips,
305
+ ComboboxChip,
306
+ ComboboxChipsInput,
307
+ ComboboxTrigger,
308
+ ComboboxValue,
309
+ useComboboxAnchor,
310
+ }
@@ -0,0 +1,196 @@
1
+ // Copied by `vantage add ui command`. This file is yours to edit.
2
+ // Generated from @squadbase/vantage src/ui/command.tsx by `npm run registry` (in Vantage, edit src/, not registry/).
3
+ import * as React from "react"
4
+ import { Command as CommandPrimitive } from "cmdk"
5
+
6
+ import { cn } from "@squadbase/vantage/ui"
7
+ import {
8
+ Dialog,
9
+ DialogContent,
10
+ DialogDescription,
11
+ DialogHeader,
12
+ DialogTitle,
13
+ } from "@squadbase/vantage/ui"
14
+ import {
15
+ InputGroup,
16
+ InputGroupAddon,
17
+ } from "@squadbase/vantage/ui"
18
+ import { CheckIcon, SearchIcon } from "lucide-react"
19
+
20
+ function Command({
21
+ className,
22
+ ...props
23
+ }: React.ComponentProps<typeof CommandPrimitive>) {
24
+ return (
25
+ <CommandPrimitive
26
+ data-slot="command"
27
+ className={cn(
28
+ "flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",
29
+ className
30
+ )}
31
+ {...props}
32
+ />
33
+ )
34
+ }
35
+
36
+ function CommandDialog({
37
+ title = "Command Palette",
38
+ description = "Search for a command to run...",
39
+ children,
40
+ className,
41
+ showCloseButton = false,
42
+ ...props
43
+ }: Omit<React.ComponentProps<typeof Dialog>, "children"> & {
44
+ title?: string
45
+ description?: string
46
+ className?: string
47
+ showCloseButton?: boolean
48
+ children: React.ReactNode
49
+ }) {
50
+ return (
51
+ <Dialog {...props}>
52
+ <DialogHeader className="sr-only">
53
+ <DialogTitle>{title}</DialogTitle>
54
+ <DialogDescription>{description}</DialogDescription>
55
+ </DialogHeader>
56
+ <DialogContent
57
+ className={cn(
58
+ "top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0",
59
+ className
60
+ )}
61
+ showCloseButton={showCloseButton}
62
+ >
63
+ {children}
64
+ </DialogContent>
65
+ </Dialog>
66
+ )
67
+ }
68
+
69
+ function CommandInput({
70
+ className,
71
+ ...props
72
+ }: React.ComponentProps<typeof CommandPrimitive.Input>) {
73
+ return (
74
+ <div data-slot="command-input-wrapper" className="p-1 pb-0">
75
+ <InputGroup className="h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!">
76
+ <CommandPrimitive.Input
77
+ data-slot="command-input"
78
+ className={cn(
79
+ "w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
80
+ className
81
+ )}
82
+ {...props}
83
+ />
84
+ <InputGroupAddon>
85
+ <SearchIcon className="size-4 shrink-0 opacity-50" />
86
+ </InputGroupAddon>
87
+ </InputGroup>
88
+ </div>
89
+ )
90
+ }
91
+
92
+ function CommandList({
93
+ className,
94
+ ...props
95
+ }: React.ComponentProps<typeof CommandPrimitive.List>) {
96
+ return (
97
+ <CommandPrimitive.List
98
+ data-slot="command-list"
99
+ className={cn(
100
+ "no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",
101
+ className
102
+ )}
103
+ {...props}
104
+ />
105
+ )
106
+ }
107
+
108
+ function CommandEmpty({
109
+ className,
110
+ ...props
111
+ }: React.ComponentProps<typeof CommandPrimitive.Empty>) {
112
+ return (
113
+ <CommandPrimitive.Empty
114
+ data-slot="command-empty"
115
+ className={cn("py-6 text-center text-sm", className)}
116
+ {...props}
117
+ />
118
+ )
119
+ }
120
+
121
+ function CommandGroup({
122
+ className,
123
+ ...props
124
+ }: React.ComponentProps<typeof CommandPrimitive.Group>) {
125
+ return (
126
+ <CommandPrimitive.Group
127
+ data-slot="command-group"
128
+ className={cn(
129
+ "overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",
130
+ className
131
+ )}
132
+ {...props}
133
+ />
134
+ )
135
+ }
136
+
137
+ function CommandSeparator({
138
+ className,
139
+ ...props
140
+ }: React.ComponentProps<typeof CommandPrimitive.Separator>) {
141
+ return (
142
+ <CommandPrimitive.Separator
143
+ data-slot="command-separator"
144
+ className={cn("-mx-1 h-px bg-border", className)}
145
+ {...props}
146
+ />
147
+ )
148
+ }
149
+
150
+ function CommandItem({
151
+ className,
152
+ children,
153
+ ...props
154
+ }: React.ComponentProps<typeof CommandPrimitive.Item>) {
155
+ return (
156
+ <CommandPrimitive.Item
157
+ data-slot="command-item"
158
+ className={cn(
159
+ "group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",
160
+ className
161
+ )}
162
+ {...props}
163
+ >
164
+ {children}
165
+ <CheckIcon className="ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" />
166
+ </CommandPrimitive.Item>
167
+ )
168
+ }
169
+
170
+ function CommandShortcut({
171
+ className,
172
+ ...props
173
+ }: React.ComponentProps<"span">) {
174
+ return (
175
+ <span
176
+ data-slot="command-shortcut"
177
+ className={cn(
178
+ "ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground",
179
+ className
180
+ )}
181
+ {...props}
182
+ />
183
+ )
184
+ }
185
+
186
+ export {
187
+ Command,
188
+ CommandDialog,
189
+ CommandInput,
190
+ CommandList,
191
+ CommandEmpty,
192
+ CommandGroup,
193
+ CommandItem,
194
+ CommandShortcut,
195
+ CommandSeparator,
196
+ }
@@ -0,0 +1,174 @@
1
+ // Copied by `vantage add ui dashboard-card`. This file is yours to edit.
2
+ // Generated from @squadbase/vantage src/components/dashboard-card.tsx by `npm run registry` (in Vantage, edit src/, not registry/).
3
+ /**
4
+ * DashboardCard — the tighter card used for dashboard tiles: smaller padding
5
+ * than the plain `Card`, a title/description/action header, and a matching
6
+ * skeleton for the loading state. `DashboardCardPreset` wires the common
7
+ * arrangement in one prop-driven component.
8
+ */
9
+ import { forwardRef, type HTMLAttributes, type ReactNode } from "react"
10
+
11
+ import { cn } from "@squadbase/vantage/ui"
12
+ import { Skeleton } from "@squadbase/vantage/ui"
13
+
14
+ export interface DashboardCardProps extends HTMLAttributes<HTMLDivElement> {}
15
+
16
+ export const DashboardCard = forwardRef<HTMLDivElement, DashboardCardProps>(
17
+ ({ className, ...props }, ref) => (
18
+ <div
19
+ ref={ref}
20
+ data-slot="dashboard-card"
21
+ className={cn(
22
+ "group rounded-lg border bg-card px-1 py-1 text-card-foreground",
23
+ className,
24
+ )}
25
+ {...props}
26
+ />
27
+ ),
28
+ )
29
+ DashboardCard.displayName = "DashboardCard"
30
+
31
+ export interface DashboardCardHeaderProps extends HTMLAttributes<HTMLDivElement> {}
32
+
33
+ export const DashboardCardHeader = forwardRef<HTMLDivElement, DashboardCardHeaderProps>(
34
+ ({ className, ...props }, ref) => (
35
+ <div
36
+ ref={ref}
37
+ data-slot="dashboard-card-header"
38
+ className={cn("flex flex-row items-start justify-between gap-4 px-3 py-3", className)}
39
+ {...props}
40
+ />
41
+ ),
42
+ )
43
+ DashboardCardHeader.displayName = "DashboardCardHeader"
44
+
45
+ export interface DashboardCardTitleProps extends HTMLAttributes<HTMLHeadingElement> {}
46
+
47
+ export const DashboardCardTitle = forwardRef<HTMLHeadingElement, DashboardCardTitleProps>(
48
+ ({ className, ...props }, ref) => (
49
+ <h3
50
+ ref={ref}
51
+ data-slot="dashboard-card-title"
52
+ className={cn("text-sm leading-none font-semibold tracking-tight", className)}
53
+ {...props}
54
+ />
55
+ ),
56
+ )
57
+ DashboardCardTitle.displayName = "DashboardCardTitle"
58
+
59
+ export interface DashboardCardDescriptionProps extends HTMLAttributes<HTMLParagraphElement> {}
60
+
61
+ export const DashboardCardDescription = forwardRef<
62
+ HTMLParagraphElement,
63
+ DashboardCardDescriptionProps
64
+ >(({ className, ...props }, ref) => (
65
+ <p
66
+ ref={ref}
67
+ data-slot="dashboard-card-description"
68
+ className={cn("text-xs text-muted-foreground", className)}
69
+ {...props}
70
+ />
71
+ ))
72
+ DashboardCardDescription.displayName = "DashboardCardDescription"
73
+
74
+ export interface DashboardCardActionProps extends HTMLAttributes<HTMLDivElement> {}
75
+
76
+ export const DashboardCardAction = forwardRef<HTMLDivElement, DashboardCardActionProps>(
77
+ ({ className, ...props }, ref) => (
78
+ <div
79
+ ref={ref}
80
+ data-slot="dashboard-card-action"
81
+ className={cn("ml-auto shrink-0", className)}
82
+ {...props}
83
+ />
84
+ ),
85
+ )
86
+ DashboardCardAction.displayName = "DashboardCardAction"
87
+
88
+ export interface DashboardCardContentProps extends HTMLAttributes<HTMLDivElement> {}
89
+
90
+ export const DashboardCardContent = forwardRef<HTMLDivElement, DashboardCardContentProps>(
91
+ ({ className, ...props }, ref) => (
92
+ <div ref={ref} data-slot="dashboard-card-content" className={cn("p-3", className)} {...props} />
93
+ ),
94
+ )
95
+ DashboardCardContent.displayName = "DashboardCardContent"
96
+
97
+ export interface DashboardCardFooterProps extends HTMLAttributes<HTMLDivElement> {}
98
+
99
+ export const DashboardCardFooter = forwardRef<HTMLDivElement, DashboardCardFooterProps>(
100
+ ({ className, ...props }, ref) => (
101
+ <div
102
+ ref={ref}
103
+ data-slot="dashboard-card-footer"
104
+ className={cn("flex items-center px-3 py-1.5", className)}
105
+ {...props}
106
+ />
107
+ ),
108
+ )
109
+ DashboardCardFooter.displayName = "DashboardCardFooter"
110
+
111
+ export interface DashboardCardSkeletonProps {
112
+ className?: string
113
+ }
114
+
115
+ export function DashboardCardSkeleton({ className }: DashboardCardSkeletonProps) {
116
+ return (
117
+ <div
118
+ data-slot="dashboard-card-skeleton"
119
+ className={cn("rounded-lg border bg-card p-6 shadow-sm", className)}
120
+ >
121
+ <div className="flex items-start justify-between gap-4 pb-4">
122
+ <Skeleton className="h-5 w-32" />
123
+ <Skeleton className="h-8 w-8 rounded-md" />
124
+ </div>
125
+ <Skeleton className="h-4 w-full" />
126
+ <Skeleton className="mt-2 h-4 w-3/4" />
127
+ </div>
128
+ )
129
+ }
130
+
131
+ export interface DashboardCardPresetProps
132
+ extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
133
+ title?: ReactNode
134
+ description?: ReactNode
135
+ actions?: ReactNode
136
+ footer?: ReactNode
137
+ headerClassName?: string
138
+ contentClassName?: string
139
+ footerClassName?: string
140
+ }
141
+
142
+ export function DashboardCardPreset({
143
+ title,
144
+ description,
145
+ actions,
146
+ footer,
147
+ children,
148
+ headerClassName,
149
+ contentClassName,
150
+ footerClassName,
151
+ className,
152
+ ...props
153
+ }: DashboardCardPresetProps) {
154
+ const hasHeader = title || description || actions
155
+ return (
156
+ <DashboardCard className={className} {...props}>
157
+ {hasHeader && (
158
+ <DashboardCardHeader className={headerClassName}>
159
+ {(title || description) && (
160
+ <div>
161
+ {title && <DashboardCardTitle>{title}</DashboardCardTitle>}
162
+ {description && <DashboardCardDescription>{description}</DashboardCardDescription>}
163
+ </div>
164
+ )}
165
+ {actions && <DashboardCardAction>{actions}</DashboardCardAction>}
166
+ </DashboardCardHeader>
167
+ )}
168
+ {children && (
169
+ <DashboardCardContent className={contentClassName}>{children}</DashboardCardContent>
170
+ )}
171
+ {footer && <DashboardCardFooter className={footerClassName}>{footer}</DashboardCardFooter>}
172
+ </DashboardCard>
173
+ )
174
+ }