@squadbase/vantage 0.6.2-dev2.777fe38 → 0.6.2-dev2.b5837f0
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.
- package/dist/add-4GHF2TX2.js +6 -0
- package/dist/add-4GHF2TX2.js.map +1 -0
- package/dist/{build-JB4VOMUI.js → build-A23M4GCH.js} +9 -9
- package/dist/{build-JB4VOMUI.js.map → build-A23M4GCH.js.map} +1 -1
- package/dist/{check-ZJYK6RLG.js → check-FBHT6W6J.js} +7 -7
- package/dist/{check-ZJYK6RLG.js.map → check-FBHT6W6J.js.map} +1 -1
- package/dist/chunk-2IAPIOPS.js +152 -0
- package/dist/chunk-2IAPIOPS.js.map +1 -0
- package/dist/{chunk-5ZOP4SQR.js → chunk-2N72FKLB.js} +12 -7
- package/dist/chunk-2N72FKLB.js.map +1 -0
- package/dist/chunk-57GHR5LN.js +163 -0
- package/dist/chunk-57GHR5LN.js.map +1 -0
- package/dist/{chunk-BCE22JSM.js → chunk-5C2SEDPH.js} +50 -14
- package/dist/chunk-5C2SEDPH.js.map +1 -0
- package/dist/chunk-6OTTGAPO.js +44 -0
- package/dist/chunk-6OTTGAPO.js.map +1 -0
- package/dist/{chunk-RPZAALCX.js → chunk-7S52M2SL.js} +256 -165
- package/dist/chunk-7S52M2SL.js.map +1 -0
- package/dist/{chunk-U2M6HGKQ.js → chunk-AABMKHEU.js} +4 -4
- package/dist/{chunk-U2M6HGKQ.js.map → chunk-AABMKHEU.js.map} +1 -1
- package/dist/{chunk-PVTHHV7X.js → chunk-ANZLVSEP.js} +28 -7
- package/dist/chunk-ANZLVSEP.js.map +1 -0
- package/dist/chunk-CKWPK4RO.js +50 -0
- package/dist/chunk-CKWPK4RO.js.map +1 -0
- package/dist/{chunk-QI3XQKHS.js → chunk-GNXCX4WE.js} +10 -3
- package/dist/chunk-GNXCX4WE.js.map +1 -0
- package/dist/chunk-JXFCSF3K.js +673 -0
- package/dist/chunk-JXFCSF3K.js.map +1 -0
- package/dist/{chunk-PXRX5PEC.js → chunk-PDOBHMUQ.js} +3 -3
- package/dist/chunk-PDOBHMUQ.js.map +1 -0
- package/dist/chunk-QOXXOFGL.js +7051 -0
- package/dist/chunk-QOXXOFGL.js.map +1 -0
- package/dist/{chunk-ZVANIULZ.js → chunk-RNTDBX6S.js} +4 -4
- package/dist/{chunk-ZVANIULZ.js.map → chunk-RNTDBX6S.js.map} +1 -1
- package/dist/chunk-S5MDTHH7.js +466 -0
- package/dist/chunk-S5MDTHH7.js.map +1 -0
- package/dist/chunk-SDJTTMLK.js +1877 -0
- package/dist/chunk-SDJTTMLK.js.map +1 -0
- package/dist/{chunk-EP6JHXSR.js → chunk-SHZM3EXB.js} +68 -12
- package/dist/chunk-SHZM3EXB.js.map +1 -0
- package/dist/{chunk-A2UUGASH.js → chunk-U736PVHY.js} +2 -2
- package/dist/chunk-U736PVHY.js.map +1 -0
- package/dist/{chunk-JGRMRXXZ.js → chunk-UWSQUHX6.js} +4 -99
- package/dist/chunk-UWSQUHX6.js.map +1 -0
- package/dist/cli.js +12 -11
- package/dist/cli.js.map +1 -1
- package/dist/client/index.d.ts +34 -3
- package/dist/client/index.js +211 -12
- package/dist/client/index.js.map +1 -1
- package/dist/components/index.d.ts +1740 -29
- package/dist/components/index.js +7 -4
- package/dist/delta-text-CvwBGJ95.d.ts +15 -0
- package/dist/{dev-FCEC3UKQ.js → dev-H4I2JL63.js} +10 -10
- package/dist/dev-H4I2JL63.js.map +1 -0
- package/dist/doc/index.d.ts +215 -2
- package/dist/doc/index.js +309 -5
- package/dist/doc/index.js.map +1 -1
- package/dist/{docs-EJJ3BECT.js → docs-JVP4RPKT.js} +3 -3
- package/dist/{docs-EJJ3BECT.js.map → docs-JVP4RPKT.js.map} +1 -1
- package/dist/{doctor-WHZXPERA.js → doctor-B2O3GJDU.js} +7 -7
- package/dist/{doctor-WHZXPERA.js.map → doctor-B2O3GJDU.js.map} +1 -1
- package/dist/format-U0cQl069.d.ts +243 -0
- package/dist/markdown/index.js +1 -1
- package/dist/markdown/index.js.map +1 -1
- package/dist/{preview-OGMCNQUO.js → preview-T6CLSQVX.js} +3 -3
- package/dist/{preview-OGMCNQUO.js.map → preview-T6CLSQVX.js.map} +1 -1
- package/dist/query/index.d.ts +0 -11
- package/dist/query/index.js +2 -2
- package/dist/{routes-GTFO5PUF.js → routes-PVKNT777.js} +6 -6
- package/dist/{routes-GTFO5PUF.js.map → routes-PVKNT777.js.map} +1 -1
- package/dist/{search-6Y422SV6.js → search-5LC4XPB5.js} +3 -3
- package/dist/{search-6Y422SV6.js.map → search-5LC4XPB5.js.map} +1 -1
- package/dist/slide/index.d.ts +272 -1
- package/dist/slide/index.js +1021 -14
- package/dist/slide/index.js.map +1 -1
- package/dist/table/index.js +14 -10
- package/dist/table/index.js.map +1 -1
- package/dist/ui/index.d.ts +148 -12
- package/dist/ui/index.js +1340 -88
- package/dist/ui/index.js.map +1 -1
- package/dist/{upgrade-AL4KZZR4.js → upgrade-6DT7ADRP.js} +7 -7
- package/dist/{upgrade-AL4KZZR4.js.map → upgrade-6DT7ADRP.js.map} +1 -1
- package/dist/vite/index.d.ts +10 -0
- package/dist/vite/index.js +4 -4
- package/docs/en/changelog.md +2 -0
- package/docs/en/components.md +42 -17
- package/docs/en/doc/delta-text.md +40 -0
- package/docs/en/doc/doc-action-items.md +49 -0
- package/docs/en/doc/doc-callout.md +38 -0
- package/docs/en/doc/doc-data-table.md +60 -0
- package/docs/en/doc/doc-executive-summary.md +64 -0
- package/docs/en/doc/doc-figure.md +56 -0
- package/docs/en/doc/doc-key-findings.md +61 -0
- package/docs/en/doc/doc-kpi-scorecard.md +80 -0
- package/docs/en/doc/doc-notes-and-sources.md +43 -0
- package/docs/en/doc/doc-report-header.md +46 -0
- package/docs/en/pages-and-metadata.md +15 -0
- package/docs/en/parts/area-chart.md +99 -0
- package/docs/en/parts/bar-chart.md +91 -0
- package/docs/en/parts/bar-list.md +50 -0
- package/docs/en/parts/category-bar.md +37 -0
- package/docs/en/parts/chart-frame.md +39 -0
- package/docs/en/parts/data-table.md +22 -0
- package/docs/en/parts/delta.md +51 -0
- package/docs/en/parts/donut-chart.md +72 -0
- package/docs/en/parts/format.md +43 -0
- package/docs/en/parts/funnel-steps.md +2 -1
- package/docs/en/parts/heatmap.md +53 -0
- package/docs/en/parts/kpi-card.md +58 -0
- package/docs/en/parts/legend.md +35 -0
- package/docs/en/parts/line-chart.md +94 -0
- package/docs/en/parts/metric-value.md +3 -2
- package/docs/en/parts/progress-circle.md +33 -0
- package/docs/en/parts/sample-data.md +39 -0
- package/docs/en/parts/scatter-chart.md +56 -0
- package/docs/en/parts/sparkline.md +1 -1
- package/docs/en/parts/tracker.md +36 -0
- package/docs/en/parts/trend-indicator.md +17 -1
- package/docs/en/parts/updated-at.md +30 -0
- package/docs/en/parts/waterfall-chart.md +56 -0
- package/docs/en/slide/slide-chart-full.md +48 -0
- package/docs/en/slide/slide-chart-insight.md +52 -0
- package/docs/en/slide/slide-columns.md +46 -0
- package/docs/en/slide/slide-comparison.md +68 -0
- package/docs/en/slide/slide-cover.md +39 -0
- package/docs/en/slide/slide-exec-summary.md +47 -0
- package/docs/en/slide/slide-heading.md +38 -0
- package/docs/en/slide/slide-kpi-grid.md +55 -0
- package/docs/en/slide/slide-kpi-hero.md +58 -0
- package/docs/en/slide/slide-next-actions.md +49 -0
- package/docs/en/slide/slide-scorecard-table.md +54 -0
- package/docs/en/slide/slide-section.md +44 -0
- package/docs/en/slide/slide-source-line.md +34 -0
- package/docs/en/ui/alert-dialog.md +42 -0
- package/docs/en/ui/avatar.md +31 -0
- package/docs/en/ui/combobox.md +74 -0
- package/docs/en/ui/drawer.md +41 -0
- package/docs/en/ui/empty.md +1 -1
- package/docs/en/ui/error-state.md +4 -3
- package/docs/en/ui/field.md +42 -0
- package/docs/en/ui/hover-card.md +21 -0
- package/docs/en/ui/kbd.md +17 -0
- package/docs/en/ui/loading.md +1 -1
- package/docs/en/ui/pagination.md +36 -0
- package/docs/en/ui/radio-group.md +21 -0
- package/docs/en/ui/toast.md +44 -0
- package/docs/en/ui/toggle-group.md +4 -3
- package/docs/en/ui-and-theming.md +1 -1
- package/docs/index.json +1184 -114
- package/docs/ja/changelog.md +33 -0
- package/docs/ja/components.md +68 -101
- package/docs/ja/doc/delta-text.md +40 -0
- package/docs/ja/doc/doc-action-items.md +49 -0
- package/docs/ja/doc/doc-callout.md +38 -0
- package/docs/ja/doc/doc-data-table.md +60 -0
- package/docs/ja/doc/doc-executive-summary.md +64 -0
- package/docs/ja/doc/doc-figure.md +56 -0
- package/docs/ja/doc/doc-key-findings.md +61 -0
- package/docs/ja/doc/doc-kpi-scorecard.md +80 -0
- package/docs/ja/doc/doc-notes-and-sources.md +43 -0
- package/docs/ja/doc/doc-report-header.md +46 -0
- package/docs/ja/page-types/csv.md +83 -0
- package/docs/ja/page-types/doc.md +83 -0
- package/docs/ja/page-types/excel.md +82 -0
- package/docs/ja/page-types/slide.md +133 -0
- package/docs/ja/page-types.md +47 -0
- package/docs/ja/pages-and-metadata.md +15 -0
- package/docs/ja/parts/area-chart.md +85 -0
- package/docs/ja/parts/bar-chart.md +95 -0
- package/docs/ja/parts/bar-list.md +58 -0
- package/docs/ja/parts/category-bar.md +36 -0
- package/docs/ja/parts/chart-frame.md +36 -0
- package/docs/ja/parts/data-table.md +22 -0
- package/docs/ja/parts/delta.md +51 -0
- package/docs/ja/parts/donut-chart.md +66 -0
- package/docs/ja/parts/echart.md +3 -0
- package/docs/ja/parts/format.md +44 -0
- package/docs/ja/parts/funnel-steps.md +27 -8
- package/docs/ja/parts/heatmap.md +45 -0
- package/docs/ja/parts/kpi-card.md +56 -0
- package/docs/ja/parts/legend.md +36 -0
- package/docs/ja/parts/line-chart.md +84 -0
- package/docs/ja/parts/metric-value.md +3 -2
- package/docs/ja/parts/progress-circle.md +34 -0
- package/docs/ja/parts/sample-data.md +61 -0
- package/docs/ja/parts/scatter-chart.md +69 -0
- package/docs/ja/parts/sparkline.md +2 -2
- package/docs/ja/parts/tracker.md +32 -0
- package/docs/ja/parts/trend-indicator.md +17 -1
- package/docs/ja/parts/updated-at.md +27 -0
- package/docs/ja/parts/waterfall-chart.md +61 -0
- package/docs/ja/routing.md +8 -86
- package/docs/ja/slide/slide-chart-full.md +48 -0
- package/docs/ja/slide/slide-chart-insight.md +52 -0
- package/docs/ja/slide/slide-columns.md +46 -0
- package/docs/ja/slide/slide-comparison.md +68 -0
- package/docs/ja/slide/slide-cover.md +39 -0
- package/docs/ja/slide/slide-exec-summary.md +47 -0
- package/docs/ja/slide/slide-heading.md +38 -0
- package/docs/ja/slide/slide-kpi-grid.md +55 -0
- package/docs/ja/slide/slide-kpi-hero.md +58 -0
- package/docs/ja/slide/slide-next-actions.md +49 -0
- package/docs/ja/slide/slide-scorecard-table.md +54 -0
- package/docs/ja/slide/slide-section.md +44 -0
- package/docs/ja/slide/slide-source-line.md +34 -0
- package/docs/ja/ui/alert-dialog.md +41 -0
- package/docs/ja/ui/avatar.md +31 -0
- package/docs/ja/ui/combobox.md +74 -0
- package/docs/ja/ui/drawer.md +41 -0
- package/docs/ja/ui/empty.md +1 -1
- package/docs/ja/ui/error-state.md +4 -3
- package/docs/ja/ui/field.md +42 -0
- package/docs/ja/ui/hover-card.md +21 -0
- package/docs/ja/ui/kbd.md +16 -0
- package/docs/ja/ui/loading.md +1 -1
- package/docs/ja/ui/pagination.md +36 -0
- package/docs/ja/ui/radio-group.md +21 -0
- package/docs/ja/ui/toast.md +46 -0
- package/docs/ja/ui/toggle-group.md +4 -3
- package/docs/ja/ui-and-theming.md +14 -7
- package/package.json +43 -29
- package/registry/ui/accordion.tsx +76 -0
- package/registry/ui/alert-dialog.tsx +189 -0
- package/registry/ui/alert.tsx +80 -0
- package/registry/ui/app-shell.tsx +287 -0
- package/registry/ui/area-chart.tsx +3701 -0
- package/registry/ui/attention-list.tsx +303 -0
- package/registry/ui/avatar.tsx +110 -0
- package/registry/ui/badge.tsx +56 -0
- package/registry/ui/bar-chart.tsx +3698 -0
- package/registry/ui/bar-list.tsx +3743 -0
- package/registry/ui/box-plot-chart.tsx +3906 -0
- package/registry/ui/breadcrumb.tsx +128 -0
- package/registry/ui/button.tsx +62 -0
- package/registry/ui/calendar.tsx +223 -0
- package/registry/ui/card.tsx +107 -0
- package/registry/ui/category-bar.tsx +1290 -0
- package/registry/ui/chart-frame.tsx +1393 -0
- package/registry/ui/checkbox.tsx +30 -0
- package/registry/ui/collapsible.tsx +23 -0
- package/registry/ui/combobox.tsx +310 -0
- package/registry/ui/command.tsx +198 -0
- package/registry/ui/dashboard-card.tsx +217 -0
- package/registry/ui/data-table.tsx +693 -146
- package/registry/ui/date-range-picker.tsx +390 -0
- package/registry/ui/delta.tsx +191 -0
- package/registry/ui/dialog.tsx +161 -0
- package/registry/ui/donut-chart.tsx +3751 -0
- package/registry/ui/drawer.tsx +229 -0
- package/registry/ui/dropdown-menu.tsx +274 -0
- package/registry/ui/echart.tsx +1040 -0
- package/registry/ui/field.tsx +240 -0
- package/registry/ui/filter-bar.tsx +392 -0
- package/registry/ui/funnel-steps.tsx +3569 -0
- package/registry/ui/heatmap.tsx +1786 -0
- package/registry/ui/histogram-chart.tsx +3986 -0
- package/registry/ui/hover-card.tsx +52 -0
- package/registry/ui/input-group.tsx +160 -0
- package/registry/ui/input.tsx +24 -0
- package/registry/ui/kbd.tsx +30 -0
- package/registry/ui/kpi-card.tsx +704 -0
- package/registry/ui/label.tsx +22 -0
- package/registry/ui/legend.tsx +3563 -0
- package/registry/ui/line-chart.tsx +3699 -0
- package/registry/ui/metric-value.tsx +62 -0
- package/registry/ui/multi-select.tsx +232 -0
- package/registry/ui/page-shell.tsx +282 -0
- package/registry/ui/pagination.tsx +140 -0
- package/registry/ui/paired-chart.tsx +3827 -0
- package/registry/ui/placeholder.tsx +36 -0
- package/registry/ui/popover.tsx +92 -0
- package/registry/ui/progress-circle.tsx +867 -0
- package/registry/ui/progress.tsx +85 -0
- package/registry/ui/radio-group.tsx +39 -0
- package/registry/ui/sample-data.tsx +86 -0
- package/registry/ui/scatter-chart.tsx +4212 -0
- package/registry/ui/scroll-area.tsx +56 -0
- package/registry/ui/searchable-select.tsx +214 -0
- package/registry/ui/section-header.tsx +43 -0
- package/registry/ui/segmented-control.tsx +76 -0
- package/registry/ui/select.tsx +255 -0
- package/registry/ui/separator.tsx +27 -0
- package/registry/ui/sheet.tsx +139 -0
- package/registry/ui/sidebar.tsx +725 -0
- package/registry/ui/skeleton.tsx +17 -0
- package/registry/ui/slider.tsx +56 -0
- package/registry/ui/sparkline.tsx +230 -0
- package/registry/ui/spinner.tsx +14 -0
- package/registry/ui/states.tsx +90 -0
- package/registry/ui/status-badge.tsx +121 -0
- package/registry/ui/switch.tsx +34 -0
- package/registry/ui/table.tsx +118 -0
- package/registry/ui/tabs.tsx +84 -0
- package/registry/ui/textarea.tsx +22 -0
- package/registry/ui/toast.tsx +250 -0
- package/registry/ui/toggle-group.tsx +91 -0
- package/registry/ui/toggle.tsx +47 -0
- package/registry/ui/tooltip.tsx +72 -0
- package/registry/ui/tracker.tsx +849 -0
- package/registry/ui/trend-indicator.tsx +74 -0
- package/registry/ui/updated-at.tsx +122 -0
- package/registry/ui/waterfall-chart.tsx +4248 -0
- package/skills/vantage-add-feature/SKILL.md +9 -7
- package/skills/vantage-design/SKILL.md +36 -24
- package/skills/vantage-design/references/extract.md +16 -14
- package/skills/vantage-design/references/format.md +6 -5
- package/skills/vantage-design/references/presets.md +60 -110
- package/skills/vantage-pitfalls/SKILL.md +10 -1
- package/skills/vantage-slide/SKILL.md +71 -36
- package/templates/AGENTS.md +26 -3
- package/templates/agents/api.md +29 -0
- package/templates/agents/csv.md +2 -1
- package/templates/agents/doc.md +52 -3
- package/templates/agents/page.md +54 -9
- package/templates/agents/slide.md +83 -3
- package/templates/agents/xlsx.md +2 -1
- package/theme.css +247 -132
- package/dist/add-DY4AXANK.js +0 -6
- package/dist/add-DY4AXANK.js.map +0 -1
- package/dist/chunk-5ZOP4SQR.js.map +0 -1
- package/dist/chunk-A2UUGASH.js.map +0 -1
- package/dist/chunk-BCE22JSM.js.map +0 -1
- package/dist/chunk-DTDVSFRY.js +0 -29
- package/dist/chunk-DTDVSFRY.js.map +0 -1
- package/dist/chunk-EP6JHXSR.js.map +0 -1
- package/dist/chunk-JGRMRXXZ.js.map +0 -1
- package/dist/chunk-KLEIVDUV.js +0 -165
- package/dist/chunk-KLEIVDUV.js.map +0 -1
- package/dist/chunk-MP3QSOXL.js +0 -2232
- package/dist/chunk-MP3QSOXL.js.map +0 -1
- package/dist/chunk-PVTHHV7X.js.map +0 -1
- package/dist/chunk-PXRX5PEC.js.map +0 -1
- package/dist/chunk-QI3XQKHS.js.map +0 -1
- package/dist/chunk-RPZAALCX.js.map +0 -1
- package/dist/chunk-T3FLAGI6.js +0 -316
- package/dist/chunk-T3FLAGI6.js.map +0 -1
- package/dist/dev-FCEC3UKQ.js.map +0 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Copied by `vantage add ui checkbox`. This file is yours to edit.
|
|
2
|
+
// Generated from @squadbase/squadkit registry/ui/checkbox.tsx by `pnpm run registry` (in Vantage, edit packages/squadkit, not registry/).
|
|
3
|
+
"use client"
|
|
4
|
+
|
|
5
|
+
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox"
|
|
6
|
+
|
|
7
|
+
import { cn } from "@squadbase/vantage/ui"
|
|
8
|
+
import { CheckIcon } from "lucide-react"
|
|
9
|
+
|
|
10
|
+
function Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props) {
|
|
11
|
+
return (
|
|
12
|
+
<CheckboxPrimitive.Root
|
|
13
|
+
data-slot="checkbox"
|
|
14
|
+
className={cn(
|
|
15
|
+
"peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 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 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
|
|
16
|
+
className
|
|
17
|
+
)}
|
|
18
|
+
{...props}
|
|
19
|
+
>
|
|
20
|
+
<CheckboxPrimitive.Indicator
|
|
21
|
+
data-slot="checkbox-indicator"
|
|
22
|
+
className="grid place-content-center text-current transition-none [&>svg]:size-3.5"
|
|
23
|
+
>
|
|
24
|
+
<CheckIcon />
|
|
25
|
+
</CheckboxPrimitive.Indicator>
|
|
26
|
+
</CheckboxPrimitive.Root>
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { Checkbox }
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Copied by `vantage add ui collapsible`. This file is yours to edit.
|
|
2
|
+
// Generated from @squadbase/squadkit registry/ui/collapsible.tsx by `pnpm run registry` (in Vantage, edit packages/squadkit, not registry/).
|
|
3
|
+
"use client"
|
|
4
|
+
|
|
5
|
+
import { Collapsible as CollapsiblePrimitive } from "@base-ui/react/collapsible"
|
|
6
|
+
|
|
7
|
+
function Collapsible({ ...props }: CollapsiblePrimitive.Root.Props) {
|
|
8
|
+
return <CollapsiblePrimitive.Root data-slot="collapsible" {...props} />
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function CollapsibleTrigger({ ...props }: CollapsiblePrimitive.Trigger.Props) {
|
|
12
|
+
return (
|
|
13
|
+
<CollapsiblePrimitive.Trigger data-slot="collapsible-trigger" {...props} />
|
|
14
|
+
)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function CollapsibleContent({ ...props }: CollapsiblePrimitive.Panel.Props) {
|
|
18
|
+
return (
|
|
19
|
+
<CollapsiblePrimitive.Panel data-slot="collapsible-content" {...props} />
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent }
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
// Copied by `vantage add ui combobox`. This file is yours to edit.
|
|
2
|
+
// Generated from @squadbase/squadkit registry/ui/combobox.tsx by `pnpm run registry` (in Vantage, edit packages/squadkit, 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 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",
|
|
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,198 @@
|
|
|
1
|
+
// Copied by `vantage add ui command`. This file is yours to edit.
|
|
2
|
+
// Generated from @squadbase/squadkit registry/ui/command.tsx by `pnpm run registry` (in Vantage, edit packages/squadkit, not registry/).
|
|
3
|
+
"use client"
|
|
4
|
+
|
|
5
|
+
import * as React from "react"
|
|
6
|
+
import { Command as CommandPrimitive } from "cmdk"
|
|
7
|
+
|
|
8
|
+
import { cn } from "@squadbase/vantage/ui"
|
|
9
|
+
import {
|
|
10
|
+
Dialog,
|
|
11
|
+
DialogContent,
|
|
12
|
+
DialogDescription,
|
|
13
|
+
DialogHeader,
|
|
14
|
+
DialogTitle,
|
|
15
|
+
} from "@squadbase/vantage/ui"
|
|
16
|
+
import {
|
|
17
|
+
InputGroup,
|
|
18
|
+
InputGroupAddon,
|
|
19
|
+
} from "@squadbase/vantage/ui"
|
|
20
|
+
import { CheckIcon, SearchIcon } from "lucide-react"
|
|
21
|
+
|
|
22
|
+
function Command({
|
|
23
|
+
className,
|
|
24
|
+
...props
|
|
25
|
+
}: React.ComponentProps<typeof CommandPrimitive>) {
|
|
26
|
+
return (
|
|
27
|
+
<CommandPrimitive
|
|
28
|
+
data-slot="command"
|
|
29
|
+
className={cn(
|
|
30
|
+
"flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",
|
|
31
|
+
className
|
|
32
|
+
)}
|
|
33
|
+
{...props}
|
|
34
|
+
/>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function CommandDialog({
|
|
39
|
+
title = "Command Palette",
|
|
40
|
+
description = "Search for a command to run...",
|
|
41
|
+
children,
|
|
42
|
+
className,
|
|
43
|
+
showCloseButton = false,
|
|
44
|
+
...props
|
|
45
|
+
}: Omit<React.ComponentProps<typeof Dialog>, "children"> & {
|
|
46
|
+
title?: string
|
|
47
|
+
description?: string
|
|
48
|
+
className?: string
|
|
49
|
+
showCloseButton?: boolean
|
|
50
|
+
children: React.ReactNode
|
|
51
|
+
}) {
|
|
52
|
+
return (
|
|
53
|
+
<Dialog {...props}>
|
|
54
|
+
<DialogHeader className="sr-only">
|
|
55
|
+
<DialogTitle>{title}</DialogTitle>
|
|
56
|
+
<DialogDescription>{description}</DialogDescription>
|
|
57
|
+
</DialogHeader>
|
|
58
|
+
<DialogContent
|
|
59
|
+
className={cn(
|
|
60
|
+
"top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0",
|
|
61
|
+
className
|
|
62
|
+
)}
|
|
63
|
+
showCloseButton={showCloseButton}
|
|
64
|
+
>
|
|
65
|
+
{children}
|
|
66
|
+
</DialogContent>
|
|
67
|
+
</Dialog>
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function CommandInput({
|
|
72
|
+
className,
|
|
73
|
+
...props
|
|
74
|
+
}: React.ComponentProps<typeof CommandPrimitive.Input>) {
|
|
75
|
+
return (
|
|
76
|
+
<div data-slot="command-input-wrapper" className="p-1 pb-0">
|
|
77
|
+
<InputGroup className="h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!">
|
|
78
|
+
<CommandPrimitive.Input
|
|
79
|
+
data-slot="command-input"
|
|
80
|
+
className={cn(
|
|
81
|
+
"w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
82
|
+
className
|
|
83
|
+
)}
|
|
84
|
+
{...props}
|
|
85
|
+
/>
|
|
86
|
+
<InputGroupAddon>
|
|
87
|
+
<SearchIcon className="size-4 shrink-0 opacity-50" />
|
|
88
|
+
</InputGroupAddon>
|
|
89
|
+
</InputGroup>
|
|
90
|
+
</div>
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function CommandList({
|
|
95
|
+
className,
|
|
96
|
+
...props
|
|
97
|
+
}: React.ComponentProps<typeof CommandPrimitive.List>) {
|
|
98
|
+
return (
|
|
99
|
+
<CommandPrimitive.List
|
|
100
|
+
data-slot="command-list"
|
|
101
|
+
className={cn(
|
|
102
|
+
"no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",
|
|
103
|
+
className
|
|
104
|
+
)}
|
|
105
|
+
{...props}
|
|
106
|
+
/>
|
|
107
|
+
)
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function CommandEmpty({
|
|
111
|
+
className,
|
|
112
|
+
...props
|
|
113
|
+
}: React.ComponentProps<typeof CommandPrimitive.Empty>) {
|
|
114
|
+
return (
|
|
115
|
+
<CommandPrimitive.Empty
|
|
116
|
+
data-slot="command-empty"
|
|
117
|
+
className={cn("py-6 text-center text-sm", className)}
|
|
118
|
+
{...props}
|
|
119
|
+
/>
|
|
120
|
+
)
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function CommandGroup({
|
|
124
|
+
className,
|
|
125
|
+
...props
|
|
126
|
+
}: React.ComponentProps<typeof CommandPrimitive.Group>) {
|
|
127
|
+
return (
|
|
128
|
+
<CommandPrimitive.Group
|
|
129
|
+
data-slot="command-group"
|
|
130
|
+
className={cn(
|
|
131
|
+
"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",
|
|
132
|
+
className
|
|
133
|
+
)}
|
|
134
|
+
{...props}
|
|
135
|
+
/>
|
|
136
|
+
)
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function CommandSeparator({
|
|
140
|
+
className,
|
|
141
|
+
...props
|
|
142
|
+
}: React.ComponentProps<typeof CommandPrimitive.Separator>) {
|
|
143
|
+
return (
|
|
144
|
+
<CommandPrimitive.Separator
|
|
145
|
+
data-slot="command-separator"
|
|
146
|
+
className={cn("-mx-1 h-px bg-border", className)}
|
|
147
|
+
{...props}
|
|
148
|
+
/>
|
|
149
|
+
)
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function CommandItem({
|
|
153
|
+
className,
|
|
154
|
+
children,
|
|
155
|
+
...props
|
|
156
|
+
}: React.ComponentProps<typeof CommandPrimitive.Item>) {
|
|
157
|
+
return (
|
|
158
|
+
<CommandPrimitive.Item
|
|
159
|
+
data-slot="command-item"
|
|
160
|
+
className={cn(
|
|
161
|
+
"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",
|
|
162
|
+
className
|
|
163
|
+
)}
|
|
164
|
+
{...props}
|
|
165
|
+
>
|
|
166
|
+
{children}
|
|
167
|
+
<CheckIcon className="ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" />
|
|
168
|
+
</CommandPrimitive.Item>
|
|
169
|
+
)
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function CommandShortcut({
|
|
173
|
+
className,
|
|
174
|
+
...props
|
|
175
|
+
}: React.ComponentProps<"span">) {
|
|
176
|
+
return (
|
|
177
|
+
<span
|
|
178
|
+
data-slot="command-shortcut"
|
|
179
|
+
className={cn(
|
|
180
|
+
"ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground",
|
|
181
|
+
className
|
|
182
|
+
)}
|
|
183
|
+
{...props}
|
|
184
|
+
/>
|
|
185
|
+
)
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export {
|
|
189
|
+
Command,
|
|
190
|
+
CommandDialog,
|
|
191
|
+
CommandInput,
|
|
192
|
+
CommandList,
|
|
193
|
+
CommandEmpty,
|
|
194
|
+
CommandGroup,
|
|
195
|
+
CommandItem,
|
|
196
|
+
CommandShortcut,
|
|
197
|
+
CommandSeparator,
|
|
198
|
+
}
|