@squadbase/vantage 0.6.2-dev1.a7c4a3e → 0.6.2-dev1.b28a4df
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-X5NVCQKT.js} +9 -9
- package/dist/{build-JB4VOMUI.js.map → build-X5NVCQKT.js.map} +1 -1
- package/dist/{check-ZJYK6RLG.js → check-ZBIH422T.js} +7 -7
- package/dist/{check-ZJYK6RLG.js.map → check-ZBIH422T.js.map} +1 -1
- package/dist/chunk-2ICNHUG6.js +1820 -0
- package/dist/chunk-2ICNHUG6.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-BCE22JSM.js → chunk-7DZGJQ3P.js} +33 -14
- package/dist/chunk-7DZGJQ3P.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-KLEIVDUV.js → chunk-CEXAQQ5W.js} +150 -11
- package/dist/chunk-CEXAQQ5W.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-JGRMRXXZ.js → chunk-JKLLFVEU.js} +3 -3
- package/dist/{chunk-JGRMRXXZ.js.map → chunk-JKLLFVEU.js.map} +1 -1
- package/dist/{chunk-PXRX5PEC.js → chunk-PDOBHMUQ.js} +3 -3
- package/dist/chunk-PDOBHMUQ.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-A2UUGASH.js → chunk-U736PVHY.js} +2 -2
- package/dist/chunk-U736PVHY.js.map +1 -0
- package/dist/chunk-UNCSBSO4.js +7866 -0
- package/dist/chunk-UNCSBSO4.js.map +1 -0
- package/dist/{chunk-PVTHHV7X.js → chunk-V3LF7BE7.js} +27 -5
- package/dist/chunk-V3LF7BE7.js.map +1 -0
- package/dist/{chunk-EP6JHXSR.js → chunk-WAMZWZJB.js} +54 -9
- package/dist/chunk-WAMZWZJB.js.map +1 -0
- package/dist/{chunk-RPZAALCX.js → chunk-XPQSTZUU.js} +254 -164
- package/dist/chunk-XPQSTZUU.js.map +1 -0
- package/dist/{chunk-DTDVSFRY.js → chunk-XQUSGIDG.js} +17 -3
- package/dist/chunk-XQUSGIDG.js.map +1 -0
- package/dist/cli.js +12 -11
- package/dist/cli.js.map +1 -1
- package/dist/client/index.d.ts +32 -3
- package/dist/client/index.js +205 -12
- package/dist/client/index.js.map +1 -1
- package/dist/components/index.d.ts +1975 -28
- package/dist/components/index.js +4 -4
- package/dist/{dev-FCEC3UKQ.js → dev-4XEDTELV.js} +10 -10
- package/dist/dev-4XEDTELV.js.map +1 -0
- package/dist/doc/index.js +2 -2
- 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-5E2VEZPK.js} +7 -7
- package/dist/{doctor-WHZXPERA.js.map → doctor-5E2VEZPK.js.map} +1 -1
- 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-3SGAFDMC.js} +6 -6
- package/dist/{routes-GTFO5PUF.js.map → routes-3SGAFDMC.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.js +49 -12
- package/dist/slide/index.js.map +1 -1
- package/dist/table/index.js +11 -10
- package/dist/table/index.js.map +1 -1
- package/dist/ui/index.d.ts +144 -11
- package/dist/ui/index.js +1339 -87
- package/dist/ui/index.js.map +1 -1
- package/dist/{upgrade-AL4KZZR4.js → upgrade-JHXZBGQS.js} +7 -7
- package/dist/{upgrade-AL4KZZR4.js.map → upgrade-JHXZBGQS.js.map} +1 -1
- package/dist/vite/index.d.ts +10 -0
- package/dist/vite/index.js +4 -4
- package/docs/en/components.md +29 -15
- package/docs/en/parts/data-table.md +22 -0
- package/docs/en/parts/delta.md +50 -0
- package/docs/en/parts/format.md +43 -0
- package/docs/en/parts/kpi-card.md +57 -0
- package/docs/en/parts/metric-value.md +3 -2
- package/docs/en/parts/sparkline.md +1 -1
- package/docs/en/parts/trend-indicator.md +17 -1
- package/docs/en/ui-and-theming.md +1 -1
- package/docs/index.json +366 -76
- package/docs/ja/changelog.md +31 -0
- package/docs/ja/components.md +57 -101
- 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 +132 -0
- package/docs/ja/page-types.md +47 -0
- package/docs/ja/parts/area-chart.md +61 -0
- package/docs/ja/parts/bar-chart.md +69 -0
- package/docs/ja/parts/bar-list.md +35 -0
- package/docs/ja/parts/category-bar.md +36 -0
- package/docs/ja/parts/data-table.md +22 -0
- package/docs/ja/parts/delta.md +50 -0
- package/docs/ja/parts/donut-chart.md +47 -0
- package/docs/ja/parts/echart.md +3 -0
- package/docs/ja/parts/format.md +44 -0
- package/docs/ja/parts/kpi-card.md +55 -0
- package/docs/ja/parts/line-chart.md +58 -0
- package/docs/ja/parts/metric-value.md +3 -2
- package/docs/ja/parts/progress-circle.md +34 -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/routing.md +8 -86
- 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/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/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-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 +3639 -0
- package/registry/ui/avatar.tsx +110 -0
- package/registry/ui/badge.tsx +56 -0
- package/registry/ui/bar-chart.tsx +3636 -0
- package/registry/ui/bar-list.tsx +3680 -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 +1255 -0
- package/registry/ui/chart-frame.tsx +1358 -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 +188 -0
- package/registry/ui/dialog.tsx +161 -0
- package/registry/ui/donut-chart.tsx +3688 -0
- package/registry/ui/drawer.tsx +229 -0
- package/registry/ui/dropdown-menu.tsx +274 -0
- package/registry/ui/echart.tsx +890 -0
- package/registry/ui/field.tsx +240 -0
- package/registry/ui/filter-bar.tsx +392 -0
- package/registry/ui/funnel-steps.tsx +3541 -0
- package/registry/ui/heatmap.tsx +1752 -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 +677 -0
- package/registry/ui/label.tsx +22 -0
- package/registry/ui/legend.tsx +3500 -0
- package/registry/ui/line-chart.tsx +3637 -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/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 +4150 -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 +68 -0
- package/registry/ui/tracker.tsx +843 -0
- package/registry/ui/trend-indicator.tsx +74 -0
- package/registry/ui/updated-at.tsx +122 -0
- package/registry/ui/waterfall-chart.tsx +4186 -0
- package/skills/vantage-add-feature/SKILL.md +9 -7
- package/skills/vantage-design/SKILL.md +12 -2
- package/skills/vantage-design/references/format.md +1 -1
- package/skills/vantage-pitfalls/SKILL.md +5 -1
- package/skills/vantage-slide/SKILL.md +17 -0
- package/templates/AGENTS.md +22 -1
- package/templates/agents/api.md +29 -0
- package/templates/agents/csv.md +2 -1
- package/templates/agents/doc.md +4 -3
- package/templates/agents/page.md +32 -8
- package/templates/agents/slide.md +13 -1
- package/templates/agents/xlsx.md +2 -1
- package/theme.css +241 -130
- 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.map +0 -1
- package/dist/chunk-EP6JHXSR.js.map +0 -1
- 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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squadbase/vantage",
|
|
3
|
-
"version": "0.6.2-dev1.
|
|
3
|
+
"version": "0.6.2-dev1.b28a4df",
|
|
4
4
|
"description": "Data dashboard framework for Squadbase Editor. Vite-powered, config-free, one-file first.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -99,62 +99,76 @@
|
|
|
99
99
|
"templates",
|
|
100
100
|
"NOTICE"
|
|
101
101
|
],
|
|
102
|
-
"scripts": {
|
|
103
|
-
"build": "node scripts/build-docs.mjs && node scripts/build.mjs",
|
|
104
|
-
"build:js": "tsup --no-dts",
|
|
105
|
-
"build:types": "tsup --dts-only",
|
|
106
|
-
"build:docs": "node scripts/build-docs.mjs",
|
|
107
|
-
"dev": "tsup --watch --no-dts",
|
|
108
|
-
"dev:types": "tsc --noEmit --watch",
|
|
109
|
-
"typecheck": "tsc --noEmit",
|
|
110
|
-
"type-check": "tsc --noEmit",
|
|
111
|
-
"prepublishOnly": "node scripts/build-docs.mjs && node scripts/build.mjs",
|
|
112
|
-
"release": "npm publish --@squadbase:registry=https://registry.npmjs.org",
|
|
113
|
-
"site:install": "npm --prefix site install",
|
|
114
|
-
"site:dev": "npm --prefix site run dev",
|
|
115
|
-
"site:build": "npm --prefix site run build"
|
|
116
|
-
},
|
|
117
102
|
"dependencies": {
|
|
118
103
|
"@base-ui/react": "^1.6.0",
|
|
119
|
-
"@hono/node-server": "^2.
|
|
104
|
+
"@hono/node-server": "^2.1.5",
|
|
120
105
|
"@streamdown/code": "^1.1.1",
|
|
121
|
-
"@tailwindcss/vite": "^4.3.
|
|
106
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
122
107
|
"@tanstack/react-query": "^5.101.2",
|
|
123
108
|
"@tanstack/react-router": "^1.170.17",
|
|
124
109
|
"@tanstack/react-table": "^8.21.3",
|
|
125
|
-
"@vitejs/plugin-react": "^6.
|
|
110
|
+
"@vitejs/plugin-react": "^6.1.2",
|
|
126
111
|
"class-variance-authority": "^0.7.1",
|
|
127
112
|
"clsx": "^2.1.1",
|
|
128
113
|
"cmdk": "^1.1.1",
|
|
129
114
|
"date-fns": "^4.1.0",
|
|
130
115
|
"echarts": "^6.0.0",
|
|
131
|
-
"esbuild": "
|
|
116
|
+
"esbuild": "0.28.1",
|
|
132
117
|
"fflate": "^0.8.3",
|
|
133
|
-
"hono": "^4.13.
|
|
118
|
+
"hono": "^4.13.13",
|
|
134
119
|
"html-to-image": "^1.11.13",
|
|
135
120
|
"lucide-react": "^0.468.0",
|
|
136
121
|
"papaparse": "^5.7.0",
|
|
137
122
|
"picocolors": "^1.1.1",
|
|
138
123
|
"react-day-picker": "^10.0.1",
|
|
139
124
|
"read-excel-file": "^9.3.10",
|
|
125
|
+
"shiki": "3.23.0",
|
|
140
126
|
"streamdown": "^2.5.0",
|
|
141
|
-
"tailwind-merge": "
|
|
142
|
-
"tailwindcss": "^4.3.
|
|
127
|
+
"tailwind-merge": "3.6.0",
|
|
128
|
+
"tailwindcss": "^4.3.3",
|
|
143
129
|
"tw-animate-css": "^1.0.0",
|
|
144
|
-
"vite": "^8.
|
|
130
|
+
"vite": "^8.3.4"
|
|
145
131
|
},
|
|
146
132
|
"peerDependencies": {
|
|
147
133
|
"react": ">=18.2.0",
|
|
148
|
-
"react-dom": ">=18.2.0"
|
|
134
|
+
"react-dom": ">=18.2.0",
|
|
135
|
+
"typescript": ">=5.0.0"
|
|
136
|
+
},
|
|
137
|
+
"peerDependenciesMeta": {
|
|
138
|
+
"typescript": {
|
|
139
|
+
"optional": true
|
|
140
|
+
}
|
|
149
141
|
},
|
|
150
142
|
"devDependencies": {
|
|
151
143
|
"@types/node": "^22.10.0",
|
|
152
144
|
"@types/papaparse": "^5.5.2",
|
|
153
145
|
"@types/react": "^19.2.0",
|
|
154
146
|
"@types/react-dom": "^19.2.0",
|
|
155
|
-
"
|
|
156
|
-
"react
|
|
147
|
+
"jsdom": "^26.0.0",
|
|
148
|
+
"react": "^19.3.1",
|
|
149
|
+
"react-dom": "^19.3.1",
|
|
157
150
|
"tsup": "^8.5.1",
|
|
158
|
-
"typescript": "^5.7.0"
|
|
151
|
+
"typescript": "^5.7.0",
|
|
152
|
+
"vitest": "^5.0.5",
|
|
153
|
+
"@squadbase/squadkit": "0.0.0"
|
|
154
|
+
},
|
|
155
|
+
"gitHead": "b28a4df06392f8a1212118ae04faf3f44ff1ebc4",
|
|
156
|
+
"scripts": {
|
|
157
|
+
"build": "node scripts/build-docs.mjs && node scripts/build.mjs",
|
|
158
|
+
"build:js": "tsup --no-dts",
|
|
159
|
+
"build:types": "tsup --dts-only",
|
|
160
|
+
"build:docs": "node scripts/build-docs.mjs",
|
|
161
|
+
"dev": "tsup --watch --no-dts",
|
|
162
|
+
"dev:types": "tsc --noEmit --watch",
|
|
163
|
+
"test": "vitest run",
|
|
164
|
+
"test:watch": "vitest",
|
|
165
|
+
"registry": "node scripts/gen-registry.mjs",
|
|
166
|
+
"registry:check": "node scripts/gen-registry.mjs --check",
|
|
167
|
+
"typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.registry.json",
|
|
168
|
+
"type-check": "tsc --noEmit && tsc --noEmit -p tsconfig.registry.json",
|
|
169
|
+
"release": "pnpm publish --@squadbase:registry=https://registry.npmjs.org",
|
|
170
|
+
"site:install": "npm --prefix site install",
|
|
171
|
+
"site:dev": "npm --prefix site run dev",
|
|
172
|
+
"site:build": "npm --prefix site run build"
|
|
159
173
|
}
|
|
160
|
-
}
|
|
174
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// Copied by `vantage add ui accordion`. This file is yours to edit.
|
|
2
|
+
// Generated from @squadbase/squadkit registry/ui/accordion.tsx by `pnpm run registry` (in Vantage, edit packages/squadkit, not registry/).
|
|
3
|
+
"use client"
|
|
4
|
+
|
|
5
|
+
import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion"
|
|
6
|
+
|
|
7
|
+
import { cn } from "@squadbase/vantage/ui"
|
|
8
|
+
import { ChevronDownIcon, ChevronUpIcon } from "lucide-react"
|
|
9
|
+
|
|
10
|
+
function Accordion({ className, ...props }: AccordionPrimitive.Root.Props) {
|
|
11
|
+
return (
|
|
12
|
+
<AccordionPrimitive.Root
|
|
13
|
+
data-slot="accordion"
|
|
14
|
+
className={cn("flex w-full flex-col", className)}
|
|
15
|
+
{...props}
|
|
16
|
+
/>
|
|
17
|
+
)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function AccordionItem({ className, ...props }: AccordionPrimitive.Item.Props) {
|
|
21
|
+
return (
|
|
22
|
+
<AccordionPrimitive.Item
|
|
23
|
+
data-slot="accordion-item"
|
|
24
|
+
className={cn("not-last:border-b", className)}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function AccordionTrigger({
|
|
31
|
+
className,
|
|
32
|
+
children,
|
|
33
|
+
...props
|
|
34
|
+
}: AccordionPrimitive.Trigger.Props) {
|
|
35
|
+
return (
|
|
36
|
+
<AccordionPrimitive.Header className="flex">
|
|
37
|
+
<AccordionPrimitive.Trigger
|
|
38
|
+
data-slot="accordion-trigger"
|
|
39
|
+
className={cn(
|
|
40
|
+
"group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground",
|
|
41
|
+
className
|
|
42
|
+
)}
|
|
43
|
+
{...props}
|
|
44
|
+
>
|
|
45
|
+
{children}
|
|
46
|
+
<ChevronDownIcon data-slot="accordion-trigger-icon" className="pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden" />
|
|
47
|
+
<ChevronUpIcon data-slot="accordion-trigger-icon" className="pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline" />
|
|
48
|
+
</AccordionPrimitive.Trigger>
|
|
49
|
+
</AccordionPrimitive.Header>
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function AccordionContent({
|
|
54
|
+
className,
|
|
55
|
+
children,
|
|
56
|
+
...props
|
|
57
|
+
}: AccordionPrimitive.Panel.Props) {
|
|
58
|
+
return (
|
|
59
|
+
<AccordionPrimitive.Panel
|
|
60
|
+
data-slot="accordion-content"
|
|
61
|
+
className="overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up motion-reduce:animate-none"
|
|
62
|
+
{...props}
|
|
63
|
+
>
|
|
64
|
+
<div
|
|
65
|
+
className={cn(
|
|
66
|
+
"h-(--accordion-panel-height) pt-0 pb-2.5 data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
|
|
67
|
+
className
|
|
68
|
+
)}
|
|
69
|
+
>
|
|
70
|
+
{children}
|
|
71
|
+
</div>
|
|
72
|
+
</AccordionPrimitive.Panel>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
// Copied by `vantage add ui alert-dialog`. This file is yours to edit.
|
|
2
|
+
// Generated from @squadbase/squadkit registry/ui/alert-dialog.tsx by `pnpm run registry` (in Vantage, edit packages/squadkit, not registry/).
|
|
3
|
+
"use client"
|
|
4
|
+
|
|
5
|
+
import * as React from "react"
|
|
6
|
+
import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog"
|
|
7
|
+
import { cn } from "@squadbase/vantage/ui"
|
|
8
|
+
|
|
9
|
+
import { Button } from "@squadbase/vantage/ui"
|
|
10
|
+
|
|
11
|
+
function AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {
|
|
12
|
+
return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props) {
|
|
16
|
+
return (
|
|
17
|
+
<AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props) {
|
|
22
|
+
return (
|
|
23
|
+
<AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function AlertDialogOverlay({
|
|
28
|
+
className,
|
|
29
|
+
...props
|
|
30
|
+
}: AlertDialogPrimitive.Backdrop.Props) {
|
|
31
|
+
return (
|
|
32
|
+
<AlertDialogPrimitive.Backdrop
|
|
33
|
+
data-slot="alert-dialog-overlay"
|
|
34
|
+
className={cn(
|
|
35
|
+
"fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in motion-reduce:animate-none! data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
36
|
+
className
|
|
37
|
+
)}
|
|
38
|
+
{...props}
|
|
39
|
+
/>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function AlertDialogContent({
|
|
44
|
+
className,
|
|
45
|
+
size = "default",
|
|
46
|
+
...props
|
|
47
|
+
}: AlertDialogPrimitive.Popup.Props & {
|
|
48
|
+
size?: "default" | "sm"
|
|
49
|
+
}) {
|
|
50
|
+
return (
|
|
51
|
+
<AlertDialogPortal>
|
|
52
|
+
<AlertDialogOverlay />
|
|
53
|
+
<AlertDialogPrimitive.Popup
|
|
54
|
+
data-slot="alert-dialog-content"
|
|
55
|
+
data-size={size}
|
|
56
|
+
className={cn(
|
|
57
|
+
"group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm 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",
|
|
58
|
+
className
|
|
59
|
+
)}
|
|
60
|
+
{...props}
|
|
61
|
+
/>
|
|
62
|
+
</AlertDialogPortal>
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function AlertDialogHeader({
|
|
67
|
+
className,
|
|
68
|
+
...props
|
|
69
|
+
}: React.ComponentProps<"div">) {
|
|
70
|
+
return (
|
|
71
|
+
<div
|
|
72
|
+
data-slot="alert-dialog-header"
|
|
73
|
+
className={cn(
|
|
74
|
+
"grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",
|
|
75
|
+
className
|
|
76
|
+
)}
|
|
77
|
+
{...props}
|
|
78
|
+
/>
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function AlertDialogFooter({
|
|
83
|
+
className,
|
|
84
|
+
...props
|
|
85
|
+
}: React.ComponentProps<"div">) {
|
|
86
|
+
return (
|
|
87
|
+
<div
|
|
88
|
+
data-slot="alert-dialog-footer"
|
|
89
|
+
className={cn(
|
|
90
|
+
"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",
|
|
91
|
+
className
|
|
92
|
+
)}
|
|
93
|
+
{...props}
|
|
94
|
+
/>
|
|
95
|
+
)
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function AlertDialogMedia({
|
|
99
|
+
className,
|
|
100
|
+
...props
|
|
101
|
+
}: React.ComponentProps<"div">) {
|
|
102
|
+
return (
|
|
103
|
+
<div
|
|
104
|
+
data-slot="alert-dialog-media"
|
|
105
|
+
className={cn(
|
|
106
|
+
"mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6",
|
|
107
|
+
className
|
|
108
|
+
)}
|
|
109
|
+
{...props}
|
|
110
|
+
/>
|
|
111
|
+
)
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function AlertDialogTitle({
|
|
115
|
+
className,
|
|
116
|
+
...props
|
|
117
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {
|
|
118
|
+
return (
|
|
119
|
+
<AlertDialogPrimitive.Title
|
|
120
|
+
data-slot="alert-dialog-title"
|
|
121
|
+
className={cn(
|
|
122
|
+
"cn-font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",
|
|
123
|
+
className
|
|
124
|
+
)}
|
|
125
|
+
{...props}
|
|
126
|
+
/>
|
|
127
|
+
)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function AlertDialogDescription({
|
|
131
|
+
className,
|
|
132
|
+
...props
|
|
133
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {
|
|
134
|
+
return (
|
|
135
|
+
<AlertDialogPrimitive.Description
|
|
136
|
+
data-slot="alert-dialog-description"
|
|
137
|
+
className={cn(
|
|
138
|
+
"text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
|
|
139
|
+
className
|
|
140
|
+
)}
|
|
141
|
+
{...props}
|
|
142
|
+
/>
|
|
143
|
+
)
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function AlertDialogAction({
|
|
147
|
+
className,
|
|
148
|
+
...props
|
|
149
|
+
}: React.ComponentProps<typeof Button>) {
|
|
150
|
+
return (
|
|
151
|
+
<Button
|
|
152
|
+
data-slot="alert-dialog-action"
|
|
153
|
+
className={cn(className)}
|
|
154
|
+
{...props}
|
|
155
|
+
/>
|
|
156
|
+
)
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function AlertDialogCancel({
|
|
160
|
+
className,
|
|
161
|
+
variant = "outline",
|
|
162
|
+
size = "default",
|
|
163
|
+
...props
|
|
164
|
+
}: AlertDialogPrimitive.Close.Props &
|
|
165
|
+
Pick<React.ComponentProps<typeof Button>, "variant" | "size">) {
|
|
166
|
+
return (
|
|
167
|
+
<AlertDialogPrimitive.Close
|
|
168
|
+
data-slot="alert-dialog-cancel"
|
|
169
|
+
className={cn(className)}
|
|
170
|
+
render={<Button variant={variant} size={size} />}
|
|
171
|
+
{...props}
|
|
172
|
+
/>
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export {
|
|
177
|
+
AlertDialog,
|
|
178
|
+
AlertDialogAction,
|
|
179
|
+
AlertDialogCancel,
|
|
180
|
+
AlertDialogContent,
|
|
181
|
+
AlertDialogDescription,
|
|
182
|
+
AlertDialogFooter,
|
|
183
|
+
AlertDialogHeader,
|
|
184
|
+
AlertDialogMedia,
|
|
185
|
+
AlertDialogOverlay,
|
|
186
|
+
AlertDialogPortal,
|
|
187
|
+
AlertDialogTitle,
|
|
188
|
+
AlertDialogTrigger,
|
|
189
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// Copied by `vantage add ui alert`. This file is yours to edit.
|
|
2
|
+
// Generated from @squadbase/squadkit registry/ui/alert.tsx by `pnpm run registry` (in Vantage, edit packages/squadkit, not registry/).
|
|
3
|
+
"use client"
|
|
4
|
+
|
|
5
|
+
import * as React from "react"
|
|
6
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
7
|
+
|
|
8
|
+
import { cn } from "@squadbase/vantage/ui"
|
|
9
|
+
|
|
10
|
+
const alertVariants = cva(
|
|
11
|
+
"group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
variant: {
|
|
15
|
+
default: "bg-card text-card-foreground",
|
|
16
|
+
destructive:
|
|
17
|
+
"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
variant: "default",
|
|
22
|
+
},
|
|
23
|
+
}
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
function Alert({
|
|
27
|
+
className,
|
|
28
|
+
variant,
|
|
29
|
+
...props
|
|
30
|
+
}: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {
|
|
31
|
+
return (
|
|
32
|
+
<div
|
|
33
|
+
data-slot="alert"
|
|
34
|
+
role="alert"
|
|
35
|
+
className={cn(alertVariants({ variant }), className)}
|
|
36
|
+
{...props}
|
|
37
|
+
/>
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
42
|
+
return (
|
|
43
|
+
<div
|
|
44
|
+
data-slot="alert-title"
|
|
45
|
+
className={cn(
|
|
46
|
+
"font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",
|
|
47
|
+
className
|
|
48
|
+
)}
|
|
49
|
+
{...props}
|
|
50
|
+
/>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function AlertDescription({
|
|
55
|
+
className,
|
|
56
|
+
...props
|
|
57
|
+
}: React.ComponentProps<"div">) {
|
|
58
|
+
return (
|
|
59
|
+
<div
|
|
60
|
+
data-slot="alert-description"
|
|
61
|
+
className={cn(
|
|
62
|
+
"text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
|
|
63
|
+
className
|
|
64
|
+
)}
|
|
65
|
+
{...props}
|
|
66
|
+
/>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function AlertAction({ className, ...props }: React.ComponentProps<"div">) {
|
|
71
|
+
return (
|
|
72
|
+
<div
|
|
73
|
+
data-slot="alert-action"
|
|
74
|
+
className={cn("absolute top-2 right-2", className)}
|
|
75
|
+
{...props}
|
|
76
|
+
/>
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export { Alert, AlertTitle, AlertDescription, AlertAction }
|