diff --git a/ai b/ai index eb7800f5f..4bfb2b6ac 160000 --- a/ai +++ b/ai @@ -1 +1 @@ -Subproject commit eb7800f5f7f0481769c2a946078c05d23b609ef5 +Subproject commit 4bfb2b6ace3de7ae9db9ec1840da2d91e06f44da diff --git a/bun.lock b/bun.lock index 6caefd47d..0daf3adc6 100644 --- a/bun.lock +++ b/bun.lock @@ -481,26 +481,12 @@ "dependencies": { "@ai-sdk/react": "^3.0.25", "@autumn/shared": "workspace:*", + "@base-ui/react": "^1.4.1", "@better-auth/dash": "catalog:", "@fortawesome/free-brands-svg-icons": "^6.7.2", "@fortawesome/react-fontawesome": "^0.2.2", "@monaco-editor/react": "^4.7.0", "@phosphor-icons/react": "^2.1.10", - "@radix-ui/react-accordion": "^1.2.11", - "@radix-ui/react-checkbox": "^1.1.4", - "@radix-ui/react-dialog": "^1.1.15", - "@radix-ui/react-dropdown-menu": "^2.1.16", - "@radix-ui/react-hover-card": "^1.1.15", - "@radix-ui/react-label": "^2.1.8", - "@radix-ui/react-popover": "^1.1.14", - "@radix-ui/react-radio-group": "^1.3.8", - "@radix-ui/react-scroll-area": "^1.2.10", - "@radix-ui/react-select": "^2.2.6", - "@radix-ui/react-separator": "^1.1.8", - "@radix-ui/react-slot": "^1.2.4", - "@radix-ui/react-switch": "^1.2.5", - "@radix-ui/react-tabs": "^1.1.3", - "@radix-ui/react-tooltip": "^1.2.8", "@sentry/react": "^10.25.0", "@sentry/vite-plugin": "^4.6.0", "@squircle/core": "^1.0.6", @@ -1679,7 +1665,7 @@ "@radix-ui/react-id": ["@radix-ui/react-id@1.1.1", "", { "dependencies": { "@radix-ui/react-use-layout-effect": "1.1.1" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-kGkGegYIdQsOb4XjsfM97rXsiHaBwco+hFI66oO4s9LU+PLAC5oJ7khdOVFxkhsmlbpUqDAvXw11CluXP+jkHg=="], - "@radix-ui/react-label": ["@radix-ui/react-label@2.1.8", "", { "dependencies": { "@radix-ui/react-primitive": "2.1.4" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-FmXs37I6hSBVDlO4y764TNz1rLgKwjJMQ0EGte6F3Cb3f4bIuHB/iLa/8I9VKkmOy+gNHq8rql3j686ACVV21A=="], + "@radix-ui/react-label": ["@radix-ui/react-label@2.1.7", "", { "dependencies": { "@radix-ui/react-primitive": "2.1.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-YT1GqPSL8kJn20djelMX7/cTRp/Y9w5IZHvfxQTVHrOqa2yMl7i/UfMqKRU5V7mEyKTrUVgJXhNQPVCG8PBLoQ=="], "@radix-ui/react-menu": ["@radix-ui/react-menu@2.1.16", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-collection": "1.1.7", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-direction": "1.1.1", "@radix-ui/react-dismissable-layer": "1.1.11", "@radix-ui/react-focus-guards": "1.1.3", "@radix-ui/react-focus-scope": "1.1.7", "@radix-ui/react-id": "1.1.1", "@radix-ui/react-popper": "1.2.8", "@radix-ui/react-portal": "1.1.9", "@radix-ui/react-presence": "1.1.5", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-roving-focus": "1.1.11", "@radix-ui/react-slot": "1.2.3", "@radix-ui/react-use-callback-ref": "1.1.1", "aria-hidden": "^1.2.4", "react-remove-scroll": "^2.6.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-72F2T+PLlphrqLcAotYPp0uJMr5SjP5SL01wfEspJbru5Zs5vQaSHb4VB3ZMJPimgHHCHG7gMOeOB9H3Hdmtxg=="], @@ -1699,7 +1685,7 @@ "@radix-ui/react-presence": ["@radix-ui/react-presence@1.1.5", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-use-layout-effect": "1.1.1" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-/jfEwNDdQVBCNvjkGit4h6pMOzq8bHkopq458dPt2lMjx+eBQUohZNG9A7DtO/O5ukSbxuaNGXMjHicgwy6rQQ=="], - "@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + "@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.4", "", { "dependencies": { "@radix-ui/react-slot": "1.2.4" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-9hQc4+GNVtJAIEPEqlYqW5RiYdrr8ea5XQ0ZOnD6fgru+83kqT15mq2OCcbe8KnjRZl5vF3ks69AKz3kh1jrhg=="], "@radix-ui/react-progress": ["@radix-ui/react-progress@1.1.7", "", { "dependencies": { "@radix-ui/react-context": "1.1.2", "@radix-ui/react-primitive": "2.1.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-vPdg/tF6YC/ynuBIJlk1mm7Le0VgW6ub6J2UWnTQ7/D23KXcPI1qy+0vBkgKgd38RCMJavBXpB83HPNFMTb0Fg=="], @@ -1711,11 +1697,11 @@ "@radix-ui/react-select": ["@radix-ui/react-select@2.2.6", "", { "dependencies": { "@radix-ui/number": "1.1.1", "@radix-ui/primitive": "1.1.3", "@radix-ui/react-collection": "1.1.7", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-direction": "1.1.1", "@radix-ui/react-dismissable-layer": "1.1.11", "@radix-ui/react-focus-guards": "1.1.3", "@radix-ui/react-focus-scope": "1.1.7", "@radix-ui/react-id": "1.1.1", "@radix-ui/react-popper": "1.2.8", "@radix-ui/react-portal": "1.1.9", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-slot": "1.2.3", "@radix-ui/react-use-callback-ref": "1.1.1", "@radix-ui/react-use-controllable-state": "1.2.2", "@radix-ui/react-use-layout-effect": "1.1.1", "@radix-ui/react-use-previous": "1.1.1", "@radix-ui/react-visually-hidden": "1.2.3", "aria-hidden": "^1.2.4", "react-remove-scroll": "^2.6.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-I30RydO+bnn2PQztvo25tswPH+wFBjehVGtmagkU78yMdwTwVf12wnAOF+AeP8S2N8xD+5UPbGhkUfPyvT+mwQ=="], - "@radix-ui/react-separator": ["@radix-ui/react-separator@1.1.8", "", { "dependencies": { "@radix-ui/react-primitive": "2.1.4" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-sDvqVY4itsKwwSMEe0jtKgfTh+72Sy3gPmQpjqcQneqQ4PFmr/1I0YA+2/puilhggCe2gJcx5EBAYFkWkdpa5g=="], + "@radix-ui/react-separator": ["@radix-ui/react-separator@1.1.7", "", { "dependencies": { "@radix-ui/react-primitive": "2.1.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-0HEb8R9E8A+jZjvmFCy/J4xhbXy3TV+9XSnGJ3KvTtjlIUy/YQ/p6UYZvi7YbeoeXdyU9+Y3scizK6hkY37baA=="], "@radix-ui/react-slider": ["@radix-ui/react-slider@1.3.6", "", { "dependencies": { "@radix-ui/number": "1.1.1", "@radix-ui/primitive": "1.1.3", "@radix-ui/react-collection": "1.1.7", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-direction": "1.1.1", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-use-controllable-state": "1.2.2", "@radix-ui/react-use-layout-effect": "1.1.1", "@radix-ui/react-use-previous": "1.1.1", "@radix-ui/react-use-size": "1.1.1" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-JPYb1GuM1bxfjMRlNLE+BcmBC8onfCi60Blk7OBqi2MLTFdS+8401U4uFjnwkOr49BLmXxLC6JHkvAsx5OJvHw=="], - "@radix-ui/react-slot": ["@radix-ui/react-slot@1.2.4", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.2" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-Jl+bCv8HxKnlTLVrcDE8zTMJ09R9/ukw4qBs/oZClOfoQk/cOTbDn+NceXfV7j09YPVQUryJPHurafcSg6EVKA=="], + "@radix-ui/react-slot": ["@radix-ui/react-slot@1.2.3", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.2" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A=="], "@radix-ui/react-switch": ["@radix-ui/react-switch@1.2.6", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-use-controllable-state": "1.2.2", "@radix-ui/react-use-previous": "1.1.1", "@radix-ui/react-use-size": "1.1.1" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-bByzr1+ep1zk4VubeEVViV592vu2lHE2BZY5OnzehZqOOgogN80+mNtCqPkhn2gklJqOpxWgPoYTSnhBCqpOXQ=="], @@ -6341,29 +6327,85 @@ "@prisma/instrumentation/@opentelemetry/instrumentation": ["@opentelemetry/instrumentation@0.207.0", "", { "dependencies": { "@opentelemetry/api-logs": "0.207.0", "import-in-the-middle": "^2.0.0", "require-in-the-middle": "^8.0.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-y6eeli9+TLKnznrR8AZlQMSJT7wILpXH+6EYq5Vf/4Ao+huI7EedxQHwRgVUOMLFbe7VFDvHJrX9/f4lcwnJsA=="], - "@radix-ui/react-alert-dialog/@radix-ui/react-slot": ["@radix-ui/react-slot@1.2.3", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.2" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A=="], + "@radix-ui/react-accordion/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], - "@radix-ui/react-collection/@radix-ui/react-slot": ["@radix-ui/react-slot@1.2.3", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.2" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A=="], + "@radix-ui/react-alert-dialog/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], - "@radix-ui/react-dialog/@radix-ui/react-slot": ["@radix-ui/react-slot@1.2.3", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.2" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A=="], + "@radix-ui/react-arrow/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], - "@radix-ui/react-form/@radix-ui/react-label": ["@radix-ui/react-label@2.1.7", "", { "dependencies": { "@radix-ui/react-primitive": "2.1.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-YT1GqPSL8kJn20djelMX7/cTRp/Y9w5IZHvfxQTVHrOqa2yMl7i/UfMqKRU5V7mEyKTrUVgJXhNQPVCG8PBLoQ=="], + "@radix-ui/react-aspect-ratio/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], - "@radix-ui/react-label/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.4", "", { "dependencies": { "@radix-ui/react-slot": "1.2.4" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-9hQc4+GNVtJAIEPEqlYqW5RiYdrr8ea5XQ0ZOnD6fgru+83kqT15mq2OCcbe8KnjRZl5vF3ks69AKz3kh1jrhg=="], + "@radix-ui/react-avatar/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], - "@radix-ui/react-menu/@radix-ui/react-slot": ["@radix-ui/react-slot@1.2.3", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.2" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A=="], + "@radix-ui/react-checkbox/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], - "@radix-ui/react-popover/@radix-ui/react-slot": ["@radix-ui/react-slot@1.2.3", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.2" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A=="], + "@radix-ui/react-collapsible/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], - "@radix-ui/react-primitive/@radix-ui/react-slot": ["@radix-ui/react-slot@1.2.3", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.2" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A=="], + "@radix-ui/react-collection/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], - "@radix-ui/react-select/@radix-ui/react-slot": ["@radix-ui/react-slot@1.2.3", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.2" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A=="], + "@radix-ui/react-context-menu/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], - "@radix-ui/react-separator/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.4", "", { "dependencies": { "@radix-ui/react-slot": "1.2.4" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-9hQc4+GNVtJAIEPEqlYqW5RiYdrr8ea5XQ0ZOnD6fgru+83kqT15mq2OCcbe8KnjRZl5vF3ks69AKz3kh1jrhg=="], + "@radix-ui/react-dialog/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], - "@radix-ui/react-toolbar/@radix-ui/react-separator": ["@radix-ui/react-separator@1.1.7", "", { "dependencies": { "@radix-ui/react-primitive": "2.1.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-0HEb8R9E8A+jZjvmFCy/J4xhbXy3TV+9XSnGJ3KvTtjlIUy/YQ/p6UYZvi7YbeoeXdyU9+Y3scizK6hkY37baA=="], + "@radix-ui/react-dismissable-layer/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], - "@radix-ui/react-tooltip/@radix-ui/react-slot": ["@radix-ui/react-slot@1.2.3", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.2" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A=="], + "@radix-ui/react-dropdown-menu/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-focus-scope/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-form/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-hover-card/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-label/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-menu/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-menubar/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-navigation-menu/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-one-time-password-field/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-password-toggle-field/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-popover/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-popper/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-portal/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-primitive/@radix-ui/react-slot": ["@radix-ui/react-slot@1.2.4", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.2" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-Jl+bCv8HxKnlTLVrcDE8zTMJ09R9/ukw4qBs/oZClOfoQk/cOTbDn+NceXfV7j09YPVQUryJPHurafcSg6EVKA=="], + + "@radix-ui/react-progress/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-radio-group/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-roving-focus/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-scroll-area/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-select/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-separator/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-slider/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-switch/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-tabs/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-toast/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-toggle/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-toggle-group/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-toolbar/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-tooltip/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-visually-hidden/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], "@reduxjs/toolkit/immer": ["immer@11.1.4", "", {}, "sha512-XREFCPo6ksxVzP4E0ekD5aMdf8WMwmdNaz6vuvxgI40UaEiu6q3p8X52aU6GdyvLY3XXX/8R7JOTXStz/nBbRw=="], @@ -6669,8 +6711,6 @@ "clone-response/mimic-response": ["mimic-response@1.0.1", "", {}, "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ=="], - "cmdk/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.4", "", { "dependencies": { "@radix-ui/react-slot": "1.2.4" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-9hQc4+GNVtJAIEPEqlYqW5RiYdrr8ea5XQ0ZOnD6fgru+83kqT15mq2OCcbe8KnjRZl5vF3ks69AKz3kh1jrhg=="], - "concurrently/chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="], "conf/ajv": ["ajv@8.20.0", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA=="], @@ -7037,11 +7077,7 @@ "puppeteer/puppeteer-core": ["puppeteer-core@22.14.0", "", { "dependencies": { "@puppeteer/browsers": "2.3.0", "chromium-bidi": "0.6.2", "debug": "^4.3.5", "devtools-protocol": "0.0.1312386", "ws": "^8.18.0" } }, "sha512-rl4tOY5LcA3e374GAlsGGHc05HL3eGNf5rZ+uxkl6id9zVZKcwcp1Z+Nd6byb6WPiPeecT/dwz8f/iUm+AZQSw=="], - "radix-ui/@radix-ui/react-label": ["@radix-ui/react-label@2.1.7", "", { "dependencies": { "@radix-ui/react-primitive": "2.1.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-YT1GqPSL8kJn20djelMX7/cTRp/Y9w5IZHvfxQTVHrOqa2yMl7i/UfMqKRU5V7mEyKTrUVgJXhNQPVCG8PBLoQ=="], - - "radix-ui/@radix-ui/react-separator": ["@radix-ui/react-separator@1.1.7", "", { "dependencies": { "@radix-ui/react-primitive": "2.1.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-0HEb8R9E8A+jZjvmFCy/J4xhbXy3TV+9XSnGJ3KvTtjlIUy/YQ/p6UYZvi7YbeoeXdyU9+Y3scizK6hkY37baA=="], - - "radix-ui/@radix-ui/react-slot": ["@radix-ui/react-slot@1.2.3", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.2" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A=="], + "radix-ui/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], "rc/strip-json-comments": ["strip-json-comments@2.0.1", "", {}, "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ=="], diff --git a/knip.json b/knip.json index c23fe5b83..1371dbcf1 100644 --- a/knip.json +++ b/knip.json @@ -25,6 +25,7 @@ "server": { "entry": [ "src/internal/customers/cusUtils/createNewCustomer.ts", + "src/internal/rewards/RewardRedemptionService.ts", "src/utils/importUtils/addProductFromSubs.ts", "src/utils/scriptUtils/readOnlyStripe.ts", "src/utils/scriptUtils/scriptUtils.ts", @@ -43,7 +44,7 @@ "vite": { "entry": ["tests/**/*.{ts,tsx}"], "project": ["src/**/*.{ts,tsx}", "tests/**/*.{ts,tsx}"], - "ignore": ["src/components/ai-elements/**"], + "ignore": ["src/components/ai-elements/**", "src/hooks/useControllableState.ts"], "ignoreDependencies": [ "tailwindcss", "tailwind-scrollbar-hide", diff --git a/vite/components.json b/vite/components.json index 5599e04e3..4d2990c87 100644 --- a/vite/components.json +++ b/vite/components.json @@ -1,6 +1,6 @@ { "$schema": "https://ui.shadcn.com/schema.json", - "style": "new-york", + "style": "base-nova", "rsc": false, "tsx": true, "tailwind": { diff --git a/vite/package.json b/vite/package.json index de56c2a2d..e9237ef39 100644 --- a/vite/package.json +++ b/vite/package.json @@ -21,26 +21,12 @@ "dependencies": { "@ai-sdk/react": "^3.0.25", "@autumn/shared": "workspace:*", + "@base-ui/react": "^1.4.1", "@better-auth/dash": "catalog:", "@fortawesome/free-brands-svg-icons": "^6.7.2", "@fortawesome/react-fontawesome": "^0.2.2", "@monaco-editor/react": "^4.7.0", "@phosphor-icons/react": "^2.1.10", - "@radix-ui/react-accordion": "^1.2.11", - "@radix-ui/react-checkbox": "^1.1.4", - "@radix-ui/react-dialog": "^1.1.15", - "@radix-ui/react-dropdown-menu": "^2.1.16", - "@radix-ui/react-hover-card": "^1.1.15", - "@radix-ui/react-label": "^2.1.8", - "@radix-ui/react-popover": "^1.1.14", - "@radix-ui/react-radio-group": "^1.3.8", - "@radix-ui/react-scroll-area": "^1.2.10", - "@radix-ui/react-select": "^2.2.6", - "@radix-ui/react-separator": "^1.1.8", - "@radix-ui/react-slot": "^1.2.4", - "@radix-ui/react-switch": "^1.2.5", - "@radix-ui/react-tabs": "^1.1.3", - "@radix-ui/react-tooltip": "^1.2.8", "@sentry/react": "^10.25.0", "@sentry/vite-plugin": "^4.6.0", "@squircle/core": "^1.0.6", diff --git a/vite/src/components/ai-elements/chain-of-thought.tsx b/vite/src/components/ai-elements/chain-of-thought.tsx index f2d1dca4a..091ac73ce 100644 --- a/vite/src/components/ai-elements/chain-of-thought.tsx +++ b/vite/src/components/ai-elements/chain-of-thought.tsx @@ -1,6 +1,6 @@ "use client"; -import { useControllableState } from "@radix-ui/react-use-controllable-state"; +import { useControllableState } from "@/hooks/useControllableState"; import { BrainIcon, ChevronDownIcon, @@ -58,7 +58,7 @@ export const ChainOfThought = memo( }); const chainOfThoughtContext = useMemo( - () => ({ isOpen, setIsOpen }), + () => ({ isOpen: isOpen ?? false, setIsOpen }), [isOpen, setIsOpen], ); diff --git a/vite/src/components/ai-elements/inline-citation.tsx b/vite/src/components/ai-elements/inline-citation.tsx index 8ea52296e..57f5b212c 100644 --- a/vite/src/components/ai-elements/inline-citation.tsx +++ b/vite/src/components/ai-elements/inline-citation.tsx @@ -80,7 +80,7 @@ export const InlineCitationCardTrigger = ({ ); -export type InlineCitationCardBodyProps = ComponentProps<"div">; +export type InlineCitationCardBodyProps = ComponentProps; export const InlineCitationCardBody = ({ className, diff --git a/vite/src/components/ai-elements/reasoning.tsx b/vite/src/components/ai-elements/reasoning.tsx index 55b5ebedd..55b916c42 100644 --- a/vite/src/components/ai-elements/reasoning.tsx +++ b/vite/src/components/ai-elements/reasoning.tsx @@ -1,6 +1,6 @@ "use client"; -import { useControllableState } from "@radix-ui/react-use-controllable-state"; +import { useControllableState } from "@/hooks/useControllableState"; import { BrainIcon, ChevronDownIcon } from "lucide-react"; import type { ComponentProps, ReactNode } from "react"; import { createContext, memo, useContext, useEffect, useState } from "react"; diff --git a/vite/src/components/forms/shared/plan-items/CollapsedBooleanItems.tsx b/vite/src/components/forms/shared/plan-items/CollapsedBooleanItems.tsx index a178c6ab6..2f489c403 100644 --- a/vite/src/components/forms/shared/plan-items/CollapsedBooleanItems.tsx +++ b/vite/src/components/forms/shared/plan-items/CollapsedBooleanItems.tsx @@ -18,19 +18,17 @@ export function CollapsedBooleanItems({ items, renderItem, }: CollapsedBooleanItemsProps) { - const [value, setValue] = useState(""); + const [value, setValue] = useState([]); if (items.length === 0) return null; - const isExpanded = value === "boolean-flags"; + const isExpanded = value.includes("boolean-flags"); const label = isExpanded ? "Hide" : `${items.length} more`; return ( { + side?: "top" | "bottom" | "left" | "right"; + align?: "start" | "center" | "end"; + sideOffset?: number; +}) => { return ( ) { - return ; +}: AccordionProps) { + return ( + + ); } function AccordionItem({ className, ...props -}: React.ComponentProps) { +}: AccordionPrimitive.Item.Props) { return ( ) { +}: AccordionPrimitive.Trigger.Props) { return ( svg]:rotate-180", + "focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[aria-expanded=true]>svg]:rotate-180", className, )} {...props} @@ -49,15 +62,15 @@ function AccordionContent({ className, children, ...props -}: React.ComponentProps) { +}: AccordionPrimitive.Panel.Props) { return ( -
{children}
-
+ ); } diff --git a/vite/src/components/ui/badge.tsx b/vite/src/components/ui/badge.tsx index 484454e45..3bdb0b22d 100644 --- a/vite/src/components/ui/badge.tsx +++ b/vite/src/components/ui/badge.tsx @@ -1,6 +1,7 @@ -import { Slot } from "@radix-ui/react-slot"; +import { mergeProps } from "@base-ui/react/merge-props"; +import { useRender } from "@base-ui/react/use-render"; import { cva, type VariantProps } from "class-variance-authority"; -import type * as React from "react"; +import * as React from "react"; import { cn } from "@/lib/utils"; @@ -36,18 +37,28 @@ function Badge({ className, variant, asChild = false, + render: renderProp, + children, ...props -}: React.ComponentProps<"span"> & +}: useRender.ComponentProps<"span"> & VariantProps & { asChild?: boolean }) { - const Comp = asChild ? Slot : "span"; + const effectiveRender = + asChild && React.isValidElement(children) ? children : renderProp; - return ( - - ); + return useRender({ + defaultTagName: "span", + props: mergeProps<"span">( + { + className: cn(badgeVariants({ variant }), className), + }, + { ...props, children: effectiveRender ? undefined : children }, + ), + render: effectiveRender, + state: { + slot: "badge", + variant, + }, + }); } export { Badge }; diff --git a/vite/src/components/ui/breadcrumb.tsx b/vite/src/components/ui/breadcrumb.tsx index 39c067dfc..34ef1d3cc 100644 --- a/vite/src/components/ui/breadcrumb.tsx +++ b/vite/src/components/ui/breadcrumb.tsx @@ -1,6 +1,7 @@ -import { Slot } from "@radix-ui/react-slot"; +import { mergeProps } from "@base-ui/react/merge-props"; +import { useRender } from "@base-ui/react/use-render"; import { ChevronRight, MoreHorizontal } from "lucide-react"; -import type * as React from "react"; +import * as React from "react"; import { cn } from "@/lib/utils"; @@ -34,19 +35,28 @@ function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">) { function BreadcrumbLink({ asChild, className, + render: renderProp, + children, ...props -}: React.ComponentProps<"a"> & { +}: useRender.ComponentProps<"a"> & { asChild?: boolean; }) { - const Comp = asChild ? Slot : "a"; + const effectiveRender = + asChild && React.isValidElement(children) ? children : renderProp; - return ( - - ); + return useRender({ + defaultTagName: "a", + props: mergeProps<"a">( + { + className: cn("hover:text-foreground transition-colors", className), + }, + { ...props, children: effectiveRender ? undefined : children }, + ), + render: effectiveRender, + state: { + slot: "breadcrumb-link", + }, + }); } function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) { diff --git a/vite/src/components/ui/button-group.tsx b/vite/src/components/ui/button-group.tsx index 3f7db816f..d048ef0bc 100644 --- a/vite/src/components/ui/button-group.tsx +++ b/vite/src/components/ui/button-group.tsx @@ -1,5 +1,7 @@ -import { Slot } from "@radix-ui/react-slot"; +import { mergeProps } from "@base-ui/react/merge-props"; +import { useRender } from "@base-ui/react/use-render"; import { cva, type VariantProps } from "class-variance-authority"; +import * as React from "react"; import { Separator } from "@/components/ui/separator"; import { cn } from "@/lib/utils"; @@ -39,21 +41,31 @@ function ButtonGroup({ function ButtonGroupText({ className, asChild = false, + render: renderProp, + children, ...props -}: React.ComponentProps<"div"> & { +}: useRender.ComponentProps<"div"> & { asChild?: boolean; }) { - const Comp = asChild ? Slot : "div"; + const effectiveRender = + asChild && React.isValidElement(children) ? children : renderProp; - return ( - - ); + return useRender({ + defaultTagName: "div", + props: mergeProps<"div">( + { + className: cn( + "bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", + className, + ), + }, + { ...props, children: effectiveRender ? undefined : children }, + ), + render: effectiveRender, + state: { + slot: "button-group-text", + }, + }); } function ButtonGroupSeparator({ diff --git a/vite/src/components/ui/button.tsx b/vite/src/components/ui/button.tsx index b885a974d..7a84c0223 100644 --- a/vite/src/components/ui/button.tsx +++ b/vite/src/components/ui/button.tsx @@ -1,12 +1,10 @@ -import { Slot } from "@radix-ui/react-slot"; +import { Button as ButtonPrimitive } from "@base-ui/react/button"; import { cva, type VariantProps } from "class-variance-authority"; import { LoaderCircle, PlusIcon, Search } from "lucide-react"; import * as React from "react"; import { cn } from "@/lib/utils"; import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip"; -// [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 - const buttonVariants = cva( `inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-sm text-sm transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-zinc-950 disabled:pointer-events-none disabled:opacity-50 dark:focus-visible:ring-zinc-300 font-regular @@ -14,19 +12,14 @@ const buttonVariants = cva( { variants: { variant: { - // border border-[#8231FF] default: - // "bg-zinc-900 text-zinc-50 shadow hover:bg-zinc-900/90 dark:bg-zinc-50 dark:text-zinc-900 dark:hover:bg-zinc-50/90", `bg-primary hover:bg-primary/90 text-zinc-50 shadow dark:bg-zinc-50 dark:text-zinc-900 dark:hover:bg-zinc-50/90 !rounded-xs `, secondary: "border border-zinc-200 bg-white shadow-sm hover:bg-zinc-100 hover:text-zinc-900 dark:border-zinc-800 dark:bg-zinc-950 dark:hover:bg-zinc-800 dark:hover:text-zinc-50", - // "bg-zinc-100 text-zinc-900 shadow-sm hover:bg-zinc-100/80 dark:bg-zinc-800 dark:text-zinc-50 dark:hover:bg-zinc-800/80", destructive: "font-semibold text-red-400 border border-red-400 rounded-md shadow-sm hover:bg-red-500/90 hover:text-zinc-50 dark:bg-red-900 dark:text-zinc-50 dark:hover:bg-red-900/90 shadow-sm ", - // destructive: - // "bg-red-500 font-semibold text-zinc-50 shadow-sm hover:bg-red-500/90 dark:bg-red-900 dark:text-zinc-50 dark:hover:bg-red-900/90", outline: "border border-zinc-200 bg-white shadow-sm hover:bg-zinc-100 hover:text-zinc-900 dark:border-zinc-800 dark:bg-zinc-950 dark:hover:bg-zinc-800 dark:hover:text-zinc-50", ghost: @@ -36,15 +29,12 @@ const buttonVariants = cva( link: "text-zinc-900 underline-offset-4 hover:underline dark:text-zinc-50", dashed: "hover:bg-stone-100 text-t2 border border-1 border-dashed border-stone-300", - // shadow-sm hover:from-stone-100 hover:to-stone-200 dark:border-zinc-800 dark:bg-zinc-950 dark:hover:bg-zinc-800 dark:hover:text-zinc-50 gradientPrimary: "bg-gradient-to-b font-semibold border-t border-purple-400 outline outline-primary rounded-sm from-primary/85 to-primary text-white hover:from-primary hover:to-primary shadow-purple-500/50 transition-[background] duration-300 !h-7.5 mt-0.25", gradientSecondary: "border border-stone-300 font-semibold bg-gradient-to-b from-white to-stone-100 text-t1 hover:from-stone-300 hover:to-stone-400 shadow-sm", - // add: "text-primary border-t border-white outline outline-purple-800/20 bg-gradient-to-b from-zinc-50 to-zinc-200/70 shadow-sm hover:from-zinc-200 hover:border-zinc-200 hover:text-primary dark:border-zinc-800 dark:bg-zinc-950 dark:hover:bg-zinc-800 dark:hover:text-zinc-50 !h-6 rounded-md", add: "text-primary border-t border-white outline outline-zinc-200 bg-gradient-to-b from-stone-100 to-zinc-50 hover:from-stone-100 hover:to-stone-100 hover:border-primary dark:border-zinc-800 dark:bg-zinc-950 dark:hover:bg-zinc-800 dark:hover:text-zinc-50 !h-9.5 rounded-none", - // add: "border-t border-purple-400 bg-gradient-to-b from-primary/90 to-primary text-white hover:from-primary hover:to-primary !shadow-lg !h-6 rounded-md", analyse: "text-primary border-t border-white outline outline-zinc-200 bg-gradient-to-b from-stone-100 to-zinc-50 hover:from-stone-100 hover:to-stone-100 hover:border-primary dark:border-zinc-800 dark:bg-zinc-950 dark:hover:bg-zinc-800 dark:hover:text-zinc-50 !h-9.5 rounded-none", @@ -82,6 +72,7 @@ export interface ButtonProps tooltipContent?: string; disableStartIcon?: boolean; shimmer?: boolean; + render?: React.ReactElement; } const Button = React.forwardRef( @@ -100,14 +91,17 @@ const Button = React.forwardRef( children, disableStartIcon = false, shimmer = false, + render, ...props }, ref, ) => { - const Comp = asChild ? Slot : "button"; - const Button = ( - ( }} disabled={isLoading || props.disabled || shimmer} > - {isLoading && } - {startIcon && !isLoading && <>{startIcon}} - {!isLoading && !startIcon && variant === "add" && !disableStartIcon && ( - + {renderProp ? undefined : ( + <> + {isLoading && } + {startIcon && !isLoading && <>{startIcon}} + {!isLoading && !startIcon && variant === "add" && !disableStartIcon && ( + + )} + {!isLoading && + !startIcon && + variant === "analyse" && + !disableStartIcon && } + {children} + {endIcon && !isLoading && <>{endIcon}} + )} - {!isLoading && - !startIcon && - variant === "analyse" && - !disableStartIcon && } - {children} - {endIcon && !isLoading && <>{endIcon}} - + ); if (tooltipContent) { return ( - {Button} + {ButtonElement} {tooltipContent} - // - // {Button} - // ); - } else { - return Button; } + return ButtonElement; }, ); Button.displayName = "Button"; diff --git a/vite/src/components/ui/checkbox.tsx b/vite/src/components/ui/checkbox.tsx index a7b94809f..b66c7120f 100644 --- a/vite/src/components/ui/checkbox.tsx +++ b/vite/src/components/ui/checkbox.tsx @@ -1,12 +1,12 @@ -import * as CheckboxPrimitive from "@radix-ui/react-checkbox"; +import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox"; import { CheckIcon } from "lucide-react"; import * as React from "react"; import { cn } from "@/lib/utils"; const Checkbox = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef & { + HTMLButtonElement, + CheckboxPrimitive.Root.Props & { iconClassName?: string; } >(({ className, iconClassName, ...props }, ref) => ( @@ -14,7 +14,7 @@ const Checkbox = React.forwardRef< ref={ref} data-slot="checkbox" className={cn( - "peer shrink-0 rounded border border-gray-300 size-4 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-gray-900 data-[state=checked]:border-gray-900 transition-none", + "peer shrink-0 rounded border border-gray-300 size-4 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-checked:bg-gray-900 data-checked:border-gray-900 transition-none", className, )} {...props} @@ -27,6 +27,6 @@ const Checkbox = React.forwardRef< )); -Checkbox.displayName = CheckboxPrimitive.Root.displayName; +Checkbox.displayName = "Checkbox"; export { Checkbox }; diff --git a/vite/src/components/ui/dialog.tsx b/vite/src/components/ui/dialog.tsx index 0199e0f6e..0e7491a96 100644 --- a/vite/src/components/ui/dialog.tsx +++ b/vite/src/components/ui/dialog.tsx @@ -1,6 +1,6 @@ "use client"; -import * as DialogPrimitive from "@radix-ui/react-dialog"; +import { Dialog as DialogPrimitive } from "@base-ui/react/dialog"; import { XIcon } from "lucide-react"; import * as React from "react"; @@ -8,60 +8,90 @@ import { cn } from "@/lib/utils"; function Dialog({ ...props -}: React.ComponentProps) { +}: DialogPrimitive.Root.Props) { return ; } function DialogTrigger({ + asChild, + children, ...props -}: React.ComponentProps) { - return ; +}: DialogPrimitive.Trigger.Props & { asChild?: boolean }) { + if (asChild && React.isValidElement(children)) { + return ( + + ); + } + return ( + + {children} + + ); } function DialogPortal({ ...props -}: React.ComponentProps) { +}: DialogPrimitive.Portal.Props) { return ; } function DialogClose({ + asChild, + children, ...props -}: React.ComponentProps) { - return ; +}: DialogPrimitive.Close.Props & { asChild?: boolean }) { + if (asChild && React.isValidElement(children)) { + return ( + + ); + } + return ( + + {children} + + ); } -const DialogOverlay = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, ...props }, ref) => ( - e.stopPropagation()} - className={cn( - "fixed inset-0 z-[170] bg-white/70 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", - className, - )} - {...props} - /> -)); -DialogOverlay.displayName = "DialogOverlay"; +function DialogOverlay({ + className, + ...props +}: DialogPrimitive.Backdrop.Props) { + return ( + e.stopPropagation()} + className={cn( + "fixed inset-0 z-[170] bg-white/70 backdrop-blur-sm data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0", + className, + )} + {...props} + /> + ); +} function DialogContent({ className, children, showCloseButton = true, ...props -}: React.ComponentProps & { +}: DialogPrimitive.Popup.Props & { showCloseButton?: boolean; }) { return ( - {children} {showCloseButton && ( - + Close )} - + ); } @@ -113,7 +143,7 @@ function DialogFooter({ function DialogTitle({ className, ...props -}: React.ComponentProps) { +}: DialogPrimitive.Title.Props) { return ( ) { +}: DialogPrimitive.Description.Props) { return ( ; +} -const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger; +function DropdownMenuTrigger({ + asChild, + children, + ...props +}: MenuPrimitive.Trigger.Props & { asChild?: boolean }) { + if (asChild && React.isValidElement(children)) { + return ( + + ); + } + return ( + + {children} + + ); +} -const DropdownMenuGroup = DropdownMenuPrimitive.Group; +function DropdownMenuGroup({ + ...props +}: MenuPrimitive.Group.Props) { + return ; +} -const DropdownMenuPortal = DropdownMenuPrimitive.Portal; +function DropdownMenuPortal({ + children, +}: { + children: React.ReactNode; +}) { + return <>{children}; +} -const DropdownMenuSub = DropdownMenuPrimitive.Sub; +function DropdownMenuSub({ + ...props +}: MenuPrimitive.SubmenuRoot.Props) { + return ; +} -const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup; +function DropdownMenuRadioGroup({ + ...props +}: MenuPrimitive.RadioGroup.Props) { + return ( + + ); +} const DropdownMenuSubTrigger = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef & { + HTMLDivElement, + MenuPrimitive.SubmenuTrigger.Props & { inset?: boolean; withIcon?: boolean; } >(({ className, inset, children, withIcon = true, ...props }, ref) => ( - {children} {withIcon && } - + )); -DropdownMenuSubTrigger.displayName = - DropdownMenuPrimitive.SubTrigger.displayName; +DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger"; const DropdownMenuSubContent = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, ...props }, ref) => ( - + HTMLDivElement, + MenuPrimitive.Popup.Props & { + sideOffset?: number; + } +>(({ className, sideOffset = 0, ...props }, ref) => ( + + + + + )); -DropdownMenuSubContent.displayName = - DropdownMenuPrimitive.SubContent.displayName; +DropdownMenuSubContent.displayName = "DropdownMenuSubContent"; const DropdownMenuContent = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, sideOffset = 4, ...props }, ref) => ( - - e.preventDefault()} - ref={ref} + HTMLDivElement, + MenuPrimitive.Popup.Props & { + sideOffset?: number; + side?: "top" | "bottom" | "left" | "right"; + align?: "start" | "center" | "end"; + onCloseAutoFocus?: (e: any) => void; + } +>(({ className, sideOffset = 4, side = "bottom", align = "start", onCloseAutoFocus: _onCloseAutoFocus, ...props }, ref) => ( + + - + side={side} + align={align} + className="isolate z-[200] outline-none" + > + + + )); -DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName; +DropdownMenuContent.displayName = "DropdownMenuContent"; const DropdownMenuItem = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef & { + HTMLDivElement, + MenuPrimitive.Item.Props & { inset?: boolean; isLoading?: boolean; shimmer?: boolean; + asChild?: boolean; } ->(({ className, inset, shimmer = false, isLoading, ...props }, ref) => ( - svg]:size-4 [&>svg]:shrink-0", - shimmer && "shimmer", - inset && "pl-8", - className, - )} - disabled={shimmer || isLoading} - {...props} - > - {isLoading ? ( - <> - {props.children} - - - ) : ( - props.children - )} - -)); -DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName; +>(({ className, inset, shimmer = false, isLoading, children, asChild, ...props }, ref) => { + if (asChild && React.isValidElement(children)) { + return ( + svg]:size-4 [&>svg]:shrink-0", + shimmer && "shimmer", + inset && "pl-8", + className, + )} + disabled={shimmer || isLoading} + {...props} + /> + ); + } + return ( + svg]:size-4 [&>svg]:shrink-0", + shimmer && "shimmer", + inset && "pl-8", + className, + )} + disabled={shimmer || isLoading} + {...props} + > + {isLoading ? ( + <> + {children} + + + ) : ( + children + )} + + ); +}); +DropdownMenuItem.displayName = "DropdownMenuItem"; const DropdownMenuCheckboxItem = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef + HTMLDivElement, + MenuPrimitive.CheckboxItem.Props >(({ className, children, checked, ...props }, ref) => ( - {children} - + - + - + )); -DropdownMenuCheckboxItem.displayName = - DropdownMenuPrimitive.CheckboxItem.displayName; +DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem"; const DropdownMenuRadioItem = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef + HTMLDivElement, + MenuPrimitive.RadioItem.Props >(({ className, children, ...props }, ref) => ( - - + - + {children} - + )); -DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName; +DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem"; const DropdownMenuLabel = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef & { + HTMLDivElement, + MenuPrimitive.GroupLabel.Props & { inset?: boolean; } >(({ className, inset, ...props }, ref) => ( - )); -DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName; +DropdownMenuLabel.displayName = "DropdownMenuLabel"; const DropdownMenuSeparator = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef + HTMLDivElement, + MenuPrimitive.Separator.Props >(({ className, ...props }, ref) => ( - )); -DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName; +DropdownMenuSeparator.displayName = "DropdownMenuSeparator"; const DropdownMenuShortcut = ({ className, diff --git a/vite/src/components/ui/hover-card.tsx b/vite/src/components/ui/hover-card.tsx index 4193aff8e..450d18839 100644 --- a/vite/src/components/ui/hover-card.tsx +++ b/vite/src/components/ui/hover-card.tsx @@ -1,19 +1,37 @@ -import * as HoverCardPrimitive from "@radix-ui/react-hover-card"; -import type * as React from "react"; +import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card"; +import * as React from "react"; import { cn } from "@/lib/utils"; function HoverCard({ + openDelay: _openDelay, + closeDelay: _closeDelay, ...props -}: React.ComponentProps) { - return ; +}: PreviewCardPrimitive.Root.Props & { + openDelay?: number; + closeDelay?: number; +}) { + return ; } function HoverCardTrigger({ + asChild, + children, ...props -}: React.ComponentProps) { +}: PreviewCardPrimitive.Trigger.Props & { asChild?: boolean }) { + if (asChild && React.isValidElement(children)) { + return ( + + ); + } return ( - + + {children} + ); } @@ -21,21 +39,31 @@ function HoverCardContent({ className, align = "center", sideOffset = 4, + side = "bottom", ...props -}: React.ComponentProps) { +}: PreviewCardPrimitive.Popup.Props & + Pick< + PreviewCardPrimitive.Positioner.Props, + "align" | "side" | "sideOffset" + >) { return ( - - + - + className="isolate z-50" + > + + + ); } diff --git a/vite/src/components/ui/label.tsx b/vite/src/components/ui/label.tsx index ce1650543..b7bf7d1f1 100644 --- a/vite/src/components/ui/label.tsx +++ b/vite/src/components/ui/label.tsx @@ -1,4 +1,4 @@ -import * as LabelPrimitive from "@radix-ui/react-label"; +import { Field } from "@base-ui/react/field"; import type * as React from "react"; import { cn } from "@/lib/utils"; @@ -6,9 +6,9 @@ import { cn } from "@/lib/utils"; function Label({ className, ...props -}: React.ComponentProps) { +}: Field.Label.Props) { return ( - ) { +}: PopoverPrimitive.Root.Props) { return ; } function PopoverTrigger({ + asChild, + children, ...props -}: React.ComponentProps) { - return ; +}: PopoverPrimitive.Trigger.Props & { asChild?: boolean }) { + if (asChild && React.isValidElement(children)) { + return ( + + ); + } + return ( + + {children} + + ); } function PopoverContent({ className, align = "center", sideOffset = 4, + side = "bottom", + onEscapeKeyDown: _onEscapeKeyDown, + onPointerDownOutside: _onPointerDownOutside, + onOpenAutoFocus: _onOpenAutoFocus, + onCloseAutoFocus: _onCloseAutoFocus, + forceMount: _forceMount, + asChild: _asChild, ...props -}: React.ComponentProps) { +}: PopoverPrimitive.Popup.Props & + Pick< + PopoverPrimitive.Positioner.Props, + "align" | "side" | "sideOffset" + > & { + onEscapeKeyDown?: (e: any) => void; + onPointerDownOutside?: (e: any) => void; + onOpenAutoFocus?: (e: any) => void; + onCloseAutoFocus?: (e: any) => void; + forceMount?: boolean; + asChild?: boolean; + }) { return ( - + className="isolate z-[200]" + > + + ); } -function PopoverAnchor({ - ...props -}: React.ComponentProps) { - return ; -} - export { Popover, PopoverTrigger, PopoverContent }; diff --git a/vite/src/components/ui/scroll-area.tsx b/vite/src/components/ui/scroll-area.tsx index ecb7fc891..22abdc01e 100644 --- a/vite/src/components/ui/scroll-area.tsx +++ b/vite/src/components/ui/scroll-area.tsx @@ -1,4 +1,4 @@ -import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"; +import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area"; import type * as React from "react"; import { cn } from "@/lib/utils"; @@ -7,7 +7,7 @@ function ScrollArea({ className, children, ...props -}: React.ComponentProps) { +}: ScrollAreaPrimitive.Root.Props) { return ( ) { +}: ScrollAreaPrimitive.Scrollbar.Props) { return ( - - - + ); } -export { ScrollArea }; +export { ScrollArea, ScrollBar }; diff --git a/vite/src/components/ui/separator.tsx b/vite/src/components/ui/separator.tsx index 00b0ff284..fbfc19566 100644 --- a/vite/src/components/ui/separator.tsx +++ b/vite/src/components/ui/separator.tsx @@ -1,6 +1,6 @@ "use client"; -import * as SeparatorPrimitive from "@radix-ui/react-separator"; +import { Separator as SeparatorPrimitive } from "@base-ui/react/separator"; import type * as React from "react"; import { cn } from "@/lib/utils"; @@ -8,14 +8,17 @@ import { cn } from "@/lib/utils"; function Separator({ className, orientation = "horizontal", - decorative = true, + decorative, ...props -}: React.ComponentProps) { +}: SeparatorPrimitive.Props & { + orientation?: "horizontal" | "vertical"; + decorative?: boolean; +}) { return ( - & { +}: SwitchPrimitive.Root.Props & { thumbClassName?: string; }) { return ( diff --git a/vite/src/components/ui/tabs.tsx b/vite/src/components/ui/tabs.tsx index 46525bcba..3bbb2f8a2 100644 --- a/vite/src/components/ui/tabs.tsx +++ b/vite/src/components/ui/tabs.tsx @@ -1,15 +1,19 @@ "use client"; -import * as TabsPrimitive from "@radix-ui/react-tabs"; +import { Tabs as TabsPrimitive } from "@base-ui/react/tabs"; import * as React from "react"; import { cn } from "@/lib/utils"; -const Tabs = TabsPrimitive.Root; +function Tabs({ + ...props +}: TabsPrimitive.Root.Props) { + return ; +} const TabsList = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef + HTMLDivElement, + TabsPrimitive.List.Props >(({ className, ...props }, ref) => ( )); -TabsList.displayName = TabsPrimitive.List.displayName; +TabsList.displayName = "TabsList"; const TabsTrigger = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef & { + HTMLButtonElement, + TabsPrimitive.Tab.Props & { variant?: "default" | "onboarding"; } >(({ className, variant = "default", ...props }, ref) => ( - )); -TabsTrigger.displayName = TabsPrimitive.Trigger.displayName; +TabsTrigger.displayName = "TabsTrigger"; const TabsContent = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef + HTMLDivElement, + TabsPrimitive.Panel.Props >(({ className, ...props }, ref) => ( - )); -TabsContent.displayName = TabsPrimitive.Content.displayName; +TabsContent.displayName = "TabsContent"; export { Tabs, TabsContent, TabsList, TabsTrigger }; diff --git a/vite/src/components/ui/tooltip.tsx b/vite/src/components/ui/tooltip.tsx index ef784d8bd..90b09dcfd 100644 --- a/vite/src/components/ui/tooltip.tsx +++ b/vite/src/components/ui/tooltip.tsx @@ -1,63 +1,89 @@ "use client"; -import * as TooltipPrimitive from "@radix-ui/react-tooltip"; -import type * as React from "react"; +import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip"; +import * as React from "react"; import { cn } from "@/lib/utils"; function TooltipProvider({ - delayDuration = 0, + delay = 0, ...props -}: React.ComponentProps) { +}: TooltipPrimitive.Provider.Props) { return ( ); } function Tooltip({ + delayDuration, ...props -}: React.ComponentProps) { +}: TooltipPrimitive.Root.Props & { delayDuration?: number }) { return ( - + ); } function TooltipTrigger({ + asChild, + children, ...props -}: React.ComponentProps) { - return ; +}: TooltipPrimitive.Trigger.Props & { asChild?: boolean }) { + if (asChild && React.isValidElement(children)) { + return ( + + ); + } + return ( + + {children} + + ); } function TooltipContent({ className, sideOffset = 0, + side = "top", + align = "center", children, - ...props -}: React.ComponentProps) { +}: TooltipPrimitive.Popup.Props & + Pick< + TooltipPrimitive.Positioner.Props, + "align" | "side" | "sideOffset" + >) { return ( - + - {children} - {/* */} - + className, + )} + {...props} + > + {children} + + ); } diff --git a/vite/src/components/v2/CodeGroup.tsx b/vite/src/components/v2/CodeGroup.tsx index 39397fba7..2872753b7 100644 --- a/vite/src/components/v2/CodeGroup.tsx +++ b/vite/src/components/v2/CodeGroup.tsx @@ -1,24 +1,24 @@ import { CheckIcon, CopyIcon } from "@phosphor-icons/react"; -import * as TabsPrimitive from "@radix-ui/react-tabs"; +import { Tabs as TabsPrimitive } from "@base-ui/react/tabs"; import * as React from "react"; import { useTheme } from "@/contexts/ThemeProvider"; import { highlightCode } from "@/lib/shikiHighlighter"; import { cn } from "@/lib/utils"; interface CodeGroupProps - extends React.ComponentPropsWithoutRef {} + extends TabsPrimitive.Root.Props {} const CodeGroup = React.forwardRef< - React.ElementRef, + HTMLDivElement, CodeGroupProps >(({ ...props }, ref) => ); CodeGroup.displayName = "CodeGroup"; interface CodeGroupListProps - extends React.ComponentPropsWithoutRef {} + extends TabsPrimitive.List.Props {} const CodeGroupList = React.forwardRef< - React.ElementRef, + HTMLDivElement, CodeGroupListProps >(({ className, ...props }, ref) => ( {} + extends TabsPrimitive.Tab.Props {} const CodeGroupTab = React.forwardRef< - React.ElementRef, + HTMLButtonElement, CodeGroupTabProps >(({ className, ...props }, ref) => ( - { + extends TabsPrimitive.Panel.Props { copyText?: string; } const CodeGroupContent = React.forwardRef< - React.ElementRef, + HTMLDivElement, CodeGroupContentProps >(({ className, children, copyText: _copyText, ...props }, ref) => { return ( - {children} - + ); }); CodeGroupContent.displayName = "CodeGroupContent"; diff --git a/vite/src/components/v2/badges/Badge.tsx b/vite/src/components/v2/badges/Badge.tsx index e7e21bc65..cc3a995d7 100644 --- a/vite/src/components/v2/badges/Badge.tsx +++ b/vite/src/components/v2/badges/Badge.tsx @@ -1,11 +1,10 @@ -import { Slot } from "@radix-ui/react-slot"; +import { mergeProps } from "@base-ui/react/merge-props"; +import { useRender } from "@base-ui/react/use-render"; import { cva, type VariantProps } from "class-variance-authority"; import type * as React from "react"; import { cn } from "@/lib/utils"; -// transition-colors focus:outline-none focus:ring-2 focus:ring-zinc-950 focus:ring-offset-2 dark:border-zinc-800 dark:focus:ring-zinc-300 - const badgeVariants = cva( `inline-flex items-center rounded-lg border border-zinc-200 px-1.5 py-0.5 @@ -38,18 +37,24 @@ function Badge({ variant, size, asChild = false, + render: renderProp, ...props -}: React.ComponentProps<"span"> & +}: useRender.ComponentProps<"span"> & VariantProps & { asChild?: boolean }) { - const Comp = asChild ? Slot : "span"; - - return ( - - ); + return useRender({ + defaultTagName: "span", + props: mergeProps<"span">( + { + className: cn(badgeVariants({ variant, size }), className), + }, + props, + ), + render: renderProp, + state: { + slot: "badge", + variant, + }, + }); } export { Badge }; diff --git a/vite/src/components/v2/buttons/Button.tsx b/vite/src/components/v2/buttons/Button.tsx index ecef5a224..c67bf4a71 100644 --- a/vite/src/components/v2/buttons/Button.tsx +++ b/vite/src/components/v2/buttons/Button.tsx @@ -1,12 +1,10 @@ /* eslint-disable react-refresh/only-export-components */ -import { Slot } from "@radix-ui/react-slot"; +import { Button as ButtonPrimitive } from "@base-ui/react/button"; import { cva, type VariantProps } from "class-variance-authority"; import * as React from "react"; import SmallSpinner from "@/components/general/SmallSpinner"; import { cn } from "@/lib/utils"; -// Remove ring styles -// focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive const buttonVariants = cva( `inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none cursor-pointer rounded-lg group/btn transition-colors w-fit transform-gpu @@ -14,7 +12,6 @@ const buttonVariants = cva( { variants: { variant: { - // Custom primary: ` !text-primary-foreground bg-primary @@ -76,6 +73,7 @@ export interface ButtonProps transition?: boolean; disableActive?: boolean; hide?: boolean; + render?: React.ReactElement; } const Button = React.forwardRef( @@ -90,11 +88,12 @@ const Button = React.forwardRef( disableActive = true, hide = false, children, + render: renderProp, ...props }, ref, ) => { - const Comp = asChild ? Slot : "button"; + const effectiveRender = asChild && React.isValidElement(children) ? children : renderProp; const getDisableActiveStyles = () => { if (!disableActive) return ""; @@ -126,9 +125,10 @@ const Button = React.forwardRef( if (hide) return null; return ( - ( disabled={isLoading || props.disabled} {...props} > - {isLoading ? ( - - ) : variant === "primary" ? ( - - {children} - - ) : ( - children + {effectiveRender ? undefined : ( + <> + {isLoading ? ( + + ) : variant === "primary" ? ( + + {children} + + ) : ( + children + )} + )} - + ); }, ); diff --git a/vite/src/components/v2/buttons/CheckboxButton.tsx b/vite/src/components/v2/buttons/CheckboxButton.tsx index aa0e87d83..64265de8f 100644 --- a/vite/src/components/v2/buttons/CheckboxButton.tsx +++ b/vite/src/components/v2/buttons/CheckboxButton.tsx @@ -1,15 +1,15 @@ -import type * as CheckboxPrimitive from "@radix-ui/react-checkbox"; +import type { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox"; import * as React from "react"; import { Checkbox } from "@/components/ui/checkbox"; import { cn } from "@/lib/utils"; export const CheckboxButton = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef + HTMLButtonElement, + CheckboxPrimitive.Root.Props >(({ className, onCheckedChange, checked, ...props }, ref) => { const handleClick = () => { const newChecked = !checked; - onCheckedChange?.(newChecked); + onCheckedChange?.(newChecked, undefined as any); }; return ( @@ -35,7 +35,7 @@ export const CheckboxButton = React.forwardRef< ref={ref} tabIndex={-1} onClick={(e) => e.preventDefault()} - className="data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:shadow-none size-3.5 shadow-[0_2px_4px_0_#00000005,inset_0_2px_1px_0_#FFFFFF] rounded-md border border-border bg-interactive-secondary dark:shadow-none pointer-events-none" + className="data-checked:bg-primary data-checked:border-primary data-checked:shadow-none size-3.5 shadow-[0_2px_4px_0_#00000005,inset_0_2px_1px_0_#FFFFFF] rounded-md border border-border bg-interactive-secondary dark:shadow-none pointer-events-none" iconClassName="size-2" {...props} /> diff --git a/vite/src/components/v2/checkboxes/Checkbox.tsx b/vite/src/components/v2/checkboxes/Checkbox.tsx index ae1cafc46..9c3f0b6df 100644 --- a/vite/src/components/v2/checkboxes/Checkbox.tsx +++ b/vite/src/components/v2/checkboxes/Checkbox.tsx @@ -1,13 +1,12 @@ "use client"; -import * as CheckboxPrimitive from "@radix-ui/react-checkbox"; +import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox"; import { CheckIcon } from "lucide-react"; import type * as React from "react"; import { cn } from "@/lib/utils"; -interface CheckboxProps - extends React.ComponentProps { +interface CheckboxProps extends CheckboxPrimitive.Root.Props { size?: "sm" | "md" | "lg"; disabled?: boolean; } @@ -24,7 +23,7 @@ function Checkbox({ const handleKeyDown = (e: React.KeyboardEvent) => { if (e.key === "Enter" && !disabled) { e.preventDefault(); - onCheckedChange?.(!checked); + onCheckedChange?.(!checked, undefined as any); } }; @@ -33,7 +32,7 @@ function Checkbox({ data-slot="checkbox" style={{ cursor: "pointer", ...style }} className={cn( - "peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", + "peer border-input dark:bg-input/30 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-checked:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", !disabled && "hover:bg-hover-primary hover:border-primary", size === "sm" && "size-3.5", diff --git a/vite/src/components/v2/checkboxes/TextCheckbox.tsx b/vite/src/components/v2/checkboxes/TextCheckbox.tsx index 41085bde4..c69eaf16c 100644 --- a/vite/src/components/v2/checkboxes/TextCheckbox.tsx +++ b/vite/src/components/v2/checkboxes/TextCheckbox.tsx @@ -1,11 +1,10 @@ -import type * as CheckboxPrimitive from "@radix-ui/react-checkbox"; import type * as React from "react"; import { useId } from "react"; import { cn } from "@/lib/utils"; import { Checkbox } from "./Checkbox"; interface TextCheckboxProps - extends React.ComponentProps { + extends React.ComponentProps { children: React.ReactNode; } diff --git a/vite/src/components/v2/dialogs/Dialog.tsx b/vite/src/components/v2/dialogs/Dialog.tsx index bf5cd72ca..eaa8960e9 100644 --- a/vite/src/components/v2/dialogs/Dialog.tsx +++ b/vite/src/components/v2/dialogs/Dialog.tsx @@ -1,6 +1,6 @@ "use client"; -import * as DialogPrimitive from "@radix-ui/react-dialog"; +import { Dialog as DialogPrimitive } from "@base-ui/react/dialog"; import { XIcon } from "lucide-react"; import * as React from "react"; @@ -8,57 +8,87 @@ import { cn } from "@/lib/utils"; function Dialog({ ...props -}: React.ComponentProps) { +}: DialogPrimitive.Root.Props) { return ; } function DialogTrigger({ + asChild, + children, ...props -}: React.ComponentProps) { - return ; +}: DialogPrimitive.Trigger.Props & { asChild?: boolean }) { + if (asChild && React.isValidElement(children)) { + return ( + + ); + } + return ( + + {children} + + ); } function DialogPortal({ ...props -}: React.ComponentProps) { +}: DialogPrimitive.Portal.Props) { return ; } function DialogClose({ + asChild, + children, ...props -}: React.ComponentProps) { - return ; +}: DialogPrimitive.Close.Props & { asChild?: boolean }) { + if (asChild && React.isValidElement(children)) { + return ( + + ); + } + return ( + + {children} + + ); } -const DialogOverlay = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, ...props }, ref) => ( - -)); -DialogOverlay.displayName = DialogPrimitive.Overlay.displayName; +function DialogOverlay({ + className, + ...props +}: DialogPrimitive.Backdrop.Props) { + return ( + + ); +} const DialogContent = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef & { + HTMLDivElement, + DialogPrimitive.Popup.Props & { showCloseButton?: boolean; } >(({ className, children, showCloseButton = true, ...props }, ref) => ( - Close )} - + )); -DialogContent.displayName = DialogPrimitive.Content.displayName; +DialogContent.displayName = "DialogContent"; function DialogHeader({ className, ...props }: React.ComponentProps<"div">) { return ( @@ -105,8 +135,8 @@ function DialogFooter({ className, ...props }: React.ComponentProps<"div">) { } const DialogTitle = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef + HTMLHeadingElement, + DialogPrimitive.Title.Props >(({ className, ...props }, ref) => ( )); -DialogTitle.displayName = DialogPrimitive.Title.displayName; +DialogTitle.displayName = "DialogTitle"; const DialogDescription = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef + HTMLParagraphElement, + DialogPrimitive.Description.Props >(({ className, ...props }, ref) => ( )); -DialogDescription.displayName = DialogPrimitive.Description.displayName; +DialogDescription.displayName = "DialogDescription"; export { Dialog, diff --git a/vite/src/components/v2/dropdowns/DropdownMenu.tsx b/vite/src/components/v2/dropdowns/DropdownMenu.tsx index 7af30e9ea..2837777db 100644 --- a/vite/src/components/v2/dropdowns/DropdownMenu.tsx +++ b/vite/src/components/v2/dropdowns/DropdownMenu.tsx @@ -1,6 +1,6 @@ "use client"; -import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"; +import { Menu as MenuPrimitive } from "@base-ui/react/menu"; import { cva, type VariantProps } from "class-variance-authority"; import { Check, ChevronRight, Circle } from "lucide-react"; import * as React from "react"; @@ -9,14 +9,12 @@ import { useHotkeys } from "react-hotkeys-hook"; import SmallSpinner from "@/components/general/SmallSpinner"; import { cn } from "@/lib/utils"; -// Context for sharing menu open state with items const DropdownMenuContext = React.createContext<{ isOpen: boolean }>({ isOpen: false, }); -// CVA variants for menu items const dropdownMenuItemVariants = cva( - "relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-t2 outline-hidden transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0", + "relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-t2 outline-hidden transition-colors data-disabled:pointer-events-none data-disabled:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0", { variants: { variant: { @@ -40,86 +38,91 @@ type DropdownMenuItemVariantProps = VariantProps< typeof dropdownMenuItemVariants >; -// Root function DropdownMenu( - props: React.ComponentProps, + props: MenuPrimitive.Root.Props, ) { const isOpen = props.open ?? false; return ( - + ); } -// Trigger const DropdownMenuTrigger = React.forwardRef< - React.ElementRef, - React.ComponentProps ->(function DropdownMenuTrigger(props, ref) { + HTMLButtonElement, + MenuPrimitive.Trigger.Props & { asChild?: boolean } +>(function DropdownMenuTrigger({ asChild, children, ...props }, ref) { + if (asChild && React.isValidElement(children)) { + return ( + + ); + } return ( - + > + {children} + ); }); -// Group function DropdownMenuGroup( - props: React.ComponentProps, + props: MenuPrimitive.Group.Props, ) { return ( - + ); } -// Portal -function DropdownMenuPortal( - props: React.ComponentProps, -) { - return ; +function DropdownMenuPortal({ + children, +}: { + children: React.ReactNode; +}) { + return <>{children}; } -// Sub function DropdownMenuSub( - props: React.ComponentProps, + props: MenuPrimitive.SubmenuRoot.Props, ) { - return ; + return ; } -// RadioGroup function DropdownMenuRadioGroup( - props: React.ComponentProps, + props: MenuPrimitive.RadioGroup.Props, ) { return ( - ); } -// SubTrigger -type DropdownMenuSubTriggerProps = React.ComponentProps< - typeof DropdownMenuPrimitive.SubTrigger -> & { +type DropdownMenuSubTriggerProps = MenuPrimitive.SubmenuTrigger.Props & { inset?: boolean; withIcon?: boolean; }; const DropdownMenuSubTrigger = React.forwardRef< - React.ElementRef, + HTMLDivElement, DropdownMenuSubTriggerProps >(function DropdownMenuSubTrigger(props, ref) { const { inset, withIcon = true, className, children, ...rest } = props; return ( - svg]:pointer-events-none [&>svg]:size-4 [&>svg]:shrink-0", + "flex cursor-pointer gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm text-t2 outline-hidden hover:bg-accent focus:bg-accent data-popup-open:bg-accent [&>svg]:pointer-events-none [&>svg]:size-4 [&>svg]:shrink-0", inset && "pl-8", className, )} @@ -127,73 +130,80 @@ const DropdownMenuSubTrigger = React.forwardRef< > {children} {withIcon && } - + ); }); -// SubContent const DropdownMenuSubContent = React.forwardRef< - React.ElementRef, - React.ComponentProps + HTMLDivElement, + MenuPrimitive.Popup.Props & { sideOffset?: number } >(function DropdownMenuSubContent(props, ref) { - const { className, ...rest } = props; + const { className, sideOffset = 0, ...rest } = props; return ( - + + + + + ); }); -// Content -type DropdownMenuContentProps = React.ComponentProps< - typeof DropdownMenuPrimitive.Content -> & { +type DropdownMenuContentProps = MenuPrimitive.Popup.Props & { sideOffset?: number; + side?: "top" | "bottom" | "left" | "right"; + align?: "start" | "center" | "end"; + onCloseAutoFocus?: (e: any) => void; }; const DropdownMenuContent = React.forwardRef< - React.ElementRef, + HTMLDivElement, DropdownMenuContentProps >(function DropdownMenuContent(props, ref) { - const { className, sideOffset = 4, ...rest } = props; + const { className, sideOffset = 4, side = "bottom", align = "start", onCloseAutoFocus: _onCloseAutoFocus, ...rest } = props; return ( - - + e.preventDefault()} - className={cn( - "bg-interactive-secondary text-t2 z-[101] min-w-[8rem] overflow-hidden rounded-lg border p-1 shadow-md", - "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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", - className, - )} - {...rest} - /> - + side={side} + align={align} + className="isolate z-[101] outline-none" + > + + + ); }); -// Item -type DropdownMenuItemProps = React.ComponentProps< - typeof DropdownMenuPrimitive.Item -> & +type DropdownMenuItemProps = MenuPrimitive.Item.Props & DropdownMenuItemVariantProps & { isLoading?: boolean; shimmer?: boolean; - /** Keyboard shortcut that triggers this item when the menu is open */ shortcut?: string; }; const DropdownMenuItem = React.forwardRef< - React.ElementRef, + HTMLDivElement, DropdownMenuItemProps >(function DropdownMenuItem(props, ref) { const { @@ -213,7 +223,7 @@ const DropdownMenuItem = React.forwardRef< shortcut ?? "", (e) => { e.preventDefault(); - onClick?.(e as unknown as React.MouseEvent); + onClick?.(e as any); }, { enabled: !!shortcut && isOpen, @@ -222,7 +232,7 @@ const DropdownMenuItem = React.forwardRef< ); return ( - ) : ( - <> - {children} - {/* {shortcut && ( - - {shortcut} - - )} */} - + children )} - + ); }); -// CheckboxItem const DropdownMenuCheckboxItem = React.forwardRef< - React.ElementRef, - React.ComponentProps + HTMLDivElement, + MenuPrimitive.CheckboxItem.Props >(function DropdownMenuCheckboxItem(props, ref) { const { className, children, ...rest } = props; return ( - {children} - + - + - + ); }); -// RadioItem const DropdownMenuRadioItem = React.forwardRef< - React.ElementRef, - React.ComponentProps + HTMLDivElement, + MenuPrimitive.RadioItem.Props >(function DropdownMenuRadioItem(props, ref) { const { className, children, ...rest } = props; return ( - - + - + {children} - + ); }); -// Label -type DropdownMenuLabelProps = React.ComponentProps< - typeof DropdownMenuPrimitive.Label -> & { +type DropdownMenuLabelProps = MenuPrimitive.GroupLabel.Props & { inset?: boolean; }; const DropdownMenuLabel = React.forwardRef< - React.ElementRef, + HTMLDivElement, DropdownMenuLabelProps >(function DropdownMenuLabel(props, ref) { const { inset, className, ...rest } = props; return ( - , - React.ComponentProps + HTMLDivElement, + MenuPrimitive.Separator.Props >(function DropdownMenuSeparator(props, ref) { const { className, ...rest } = props; return ( - ; function DropdownMenuShortcut(props: DropdownMenuShortcutProps) { diff --git a/vite/src/components/v2/radio-groups/RadioGroup.tsx b/vite/src/components/v2/radio-groups/RadioGroup.tsx index 60cf58e79..fb8110fc3 100644 --- a/vite/src/components/v2/radio-groups/RadioGroup.tsx +++ b/vite/src/components/v2/radio-groups/RadioGroup.tsx @@ -1,14 +1,15 @@ -import * as RadioGroupPrimitive from "@radix-ui/react-radio-group"; +import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group"; +import { Radio } from "@base-ui/react/radio"; import * as React from "react"; import { cn } from "@/lib/utils"; const RadioGroup = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef + HTMLDivElement, + RadioGroupPrimitive.Props >(({ className, ...props }, ref) => { return ( - ); }); -RadioGroup.displayName = RadioGroupPrimitive.Root.displayName; +RadioGroup.displayName = "RadioGroup"; const RadioGroupItem = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef + HTMLButtonElement, + Radio.Root.Props >(({ className, style, ...props }, ref) => { return ( - -
- - + + ); }); -RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName; +RadioGroupItem.displayName = "RadioGroupItem"; export { RadioGroup, RadioGroupItem }; diff --git a/vite/src/components/v2/selects/RoleSelect.tsx b/vite/src/components/v2/selects/RoleSelect.tsx index cef9a1456..d8503614a 100644 --- a/vite/src/components/v2/selects/RoleSelect.tsx +++ b/vite/src/components/v2/selects/RoleSelect.tsx @@ -105,7 +105,6 @@ export function RoleSelect({
diff --git a/vite/src/components/v2/selects/SearchableSelect.tsx b/vite/src/components/v2/selects/SearchableSelect.tsx index 9acd09a52..582daf4c4 100644 --- a/vite/src/components/v2/selects/SearchableSelect.tsx +++ b/vite/src/components/v2/selects/SearchableSelect.tsx @@ -116,10 +116,9 @@ export function SearchableSelect({ {open && ( ; -} | null>(null); - function Select({ onValueChange, onOpenChange, + value, + defaultValue, ...props -}: React.ComponentProps) { - const triggerRef = React.useRef(null); - - const handleValueChange = (value: string) => { - onValueChange?.(value); - }; - - const handleOpenChange = (open: boolean) => { - // When dropdown closes, blur the trigger to remove focus ring - if (!open) { - setTimeout(() => { - if (triggerRef.current) { - triggerRef.current.blur(); - } else { - // Fallback: blur the active element if ref isn't set - (document.activeElement as HTMLElement)?.blur(); - } - }, 0); - } - onOpenChange?.(open); - }; - +}: Omit, "onValueChange" | "onOpenChange"> & { + onValueChange?: (value: string) => void; + onOpenChange?: (open: boolean) => void; + value?: string; + defaultValue?: string; +}) { return ( - - - + + data-slot="select" + value={value} + defaultValue={defaultValue} + onValueChange={onValueChange ? (val) => onValueChange(val as string) : undefined} + onOpenChange={onOpenChange ? (open) => onOpenChange(open) : undefined} + {...props} + /> ); } function SelectGroup({ ...props -}: React.ComponentProps) { +}: SelectPrimitive.Group.Props) { return ; } function SelectValue({ ...props -}: React.ComponentProps) { +}: SelectPrimitive.Value.Props) { return ; } @@ -65,28 +47,22 @@ function SelectTrigger({ size = "default", children, ...props -}: React.ComponentProps & { +}: SelectPrimitive.Trigger.Props & { size?: "sm" | "default"; }) { - const context = React.useContext(SelectContext); - return ( {children} - + @@ -96,43 +72,26 @@ function SelectTrigger({ function SelectContent({ className, children, - position = "popper", - onEscapeKeyDown, + position = "item-aligned", ...props -}: React.ComponentProps) { +}: SelectPrimitive.Popup.Props & { + position?: string; + side?: string; +}) { return ( - { - // Stop propagation to prevent parent dialogs/sheets from closing - e.stopPropagation(); - onEscapeKeyDown?.(e); - }} - className={cn( - // z-[200] to appear above sheets (z-[150]) - "bg-interactive-secondary text-popover-foreground relative z-[200] max-h-(--radix-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border shadow-md", - - position === "popper" && - "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", - - className, - )} - position={position} - {...props} - > - - + {children} - - - + + ); } @@ -140,9 +99,9 @@ function SelectContent({ function SelectLabel({ className, ...props -}: React.ComponentProps) { +}: SelectPrimitive.GroupLabel.Props) { return ( - ) { +}: SelectPrimitive.Item.Props) { return ( ) { +}: React.ComponentProps<"div">) { return ( - ) { - return ( - - - - ); -} - -function SelectScrollDownButton({ - className, - ...props -}: React.ComponentProps) { - return ( - - - - ); -} - export { Select, SelectContent, diff --git a/vite/src/components/v2/separator.tsx b/vite/src/components/v2/separator.tsx index 37eeeacdd..61a89e10c 100644 --- a/vite/src/components/v2/separator.tsx +++ b/vite/src/components/v2/separator.tsx @@ -1,6 +1,6 @@ "use client"; -import * as SeparatorPrimitive from "@radix-ui/react-separator"; +import { Separator as SeparatorPrimitive } from "@base-ui/react/separator"; import type * as React from "react"; import { cn } from "@/lib/utils"; @@ -10,12 +10,15 @@ function Separator({ orientation = "horizontal", decorative = true, ...props -}: React.ComponentProps) { +}: SeparatorPrimitive.Props & { + orientation?: "horizontal" | "vertical"; + decorative?: boolean; +}) { return ( - ) { +function Sheet({ ...props }: SheetPrimitive.Root.Props) { return ; } function SheetTrigger({ + asChild, + children, ...props -}: React.ComponentProps) { - return ; +}: SheetPrimitive.Trigger.Props & { asChild?: boolean }) { + if (asChild && React.isValidElement(children)) { + return ( + + ); + } + return ( + + {children} + + ); } function SheetClose({ + asChild, + children, ...props -}: React.ComponentProps) { - return ; +}: SheetPrimitive.Close.Props & { asChild?: boolean }) { + if (asChild && React.isValidElement(children)) { + return ( + + ); + } + return ( + + {children} + + ); } function SheetPortal({ container, ...props -}: React.ComponentProps & { +}: SheetPrimitive.Portal.Props & { container?: HTMLElement | null; }) { const resolvedContainer = @@ -33,7 +63,7 @@ function SheetPortal({ return ( ); @@ -42,12 +72,12 @@ function SheetPortal({ function SheetOverlay({ className, ...props -}: React.ComponentProps) { +}: SheetPrimitive.Backdrop.Props) { return ( - & { +}: SheetPrimitive.Popup.Props & { side?: "top" | "right" | "bottom" | "left"; hideCloseButton?: boolean; portalContainer?: HTMLElement | null; @@ -70,30 +100,30 @@ function SheetContent({ return ( - {children} {!hideCloseButton && ( - + Close )} - + ); } @@ -121,7 +151,7 @@ function SheetFooter({ className, ...props }: React.ComponentProps<"div">) { function SheetTitle({ className, ...props -}: React.ComponentProps) { +}: SheetPrimitive.Title.Props) { return ( ) { +}: SheetPrimitive.Description.Props) { return ( , "type">) { + Omit) { return ( <> @@ -61,7 +60,7 @@ function SheetAccordionItem({ return ( - +

{title}

{description && ( @@ -71,9 +70,9 @@ function SheetAccordionItem({ - +
{children}
-
+ ); } diff --git a/vite/src/components/v2/tooltips/Tooltip.tsx b/vite/src/components/v2/tooltips/Tooltip.tsx index ba23739fa..a4cfe3e52 100644 --- a/vite/src/components/v2/tooltips/Tooltip.tsx +++ b/vite/src/components/v2/tooltips/Tooltip.tsx @@ -1,56 +1,83 @@ "use client"; -import * as TooltipPrimitive from "@radix-ui/react-tooltip"; -import type * as React from "react"; +import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip"; +import * as React from "react"; import { cn } from "@/lib/utils"; function TooltipProvider({ - delayDuration = 0, + delay = 0, ...props -}: React.ComponentProps) { +}: TooltipPrimitive.Provider.Props) { return ( ); } function Tooltip({ + delayDuration, ...props -}: React.ComponentProps) { +}: TooltipPrimitive.Root.Props & { delayDuration?: number }) { return ( - + ); } function TooltipTrigger({ + asChild, + children, ...props -}: React.ComponentProps) { - return ; +}: TooltipPrimitive.Trigger.Props & { asChild?: boolean }) { + if (asChild && React.isValidElement(children)) { + return ( + + ); + } + return ( + + {children} + + ); } function TooltipContent({ className, sideOffset = 6, + side = "top", + align = "center", children, ...props -}: React.ComponentProps) { +}: TooltipPrimitive.Popup.Props & + Pick< + TooltipPrimitive.Positioner.Props, + "align" | "side" | "sideOffset" + >) { return ( - + - {children} - + className, + )} + {...props} + > + {children} + + ); } diff --git a/vite/src/hooks/useControllableState.ts b/vite/src/hooks/useControllableState.ts new file mode 100644 index 000000000..e53b7a328 --- /dev/null +++ b/vite/src/hooks/useControllableState.ts @@ -0,0 +1,37 @@ +import { useCallback, useRef, useState } from "react"; + +type UseControllableStateParams = { + prop?: T; + defaultProp?: T; + onChange?: (value: T) => void; +}; + +/** + * Manages state that can be either controlled or uncontrolled. + * Replacement for @radix-ui/react-use-controllable-state. + */ +function useControllableState({ + prop, + defaultProp, + onChange, +}: UseControllableStateParams): [T | undefined, (value: T) => void] { + const [uncontrolled, setUncontrolled] = useState(defaultProp); + const isControlled = prop !== undefined; + const value = isControlled ? prop : uncontrolled; + const onChangeRef = useRef(onChange); + onChangeRef.current = onChange; + + const setValue = useCallback( + (nextValue: T) => { + if (!isControlled) { + setUncontrolled(nextValue); + } + onChangeRef.current?.(nextValue); + }, + [isControlled], + ); + + return [value, setValue]; +} + +export { useControllableState }; diff --git a/vite/src/views/main-sidebar/components/OrgDropdown.tsx b/vite/src/views/main-sidebar/components/OrgDropdown.tsx index 76226f1cf..afd0360e2 100644 --- a/vite/src/views/main-sidebar/components/OrgDropdown.tsx +++ b/vite/src/views/main-sidebar/components/OrgDropdown.tsx @@ -1,4 +1,4 @@ -import { DropdownMenuGroup } from "@radix-ui/react-dropdown-menu"; +import { DropdownMenuGroup } from "@/components/v2/dropdowns/DropdownMenu"; import { useQueryClient } from "@tanstack/react-query"; import { ChevronDown, @@ -49,10 +49,10 @@ export const OrgDropdown = () => { const { expanded, setExpanded } = useSidebarContext(); const { theme, setTheme } = useTheme(); - let { data: orgs } = useListOrganizations(); + const { data: orgsData } = useListOrganizations(); + let orgs = Array.isArray(orgsData) ? orgsData : undefined; const { data: activeOrganization } = authClient.useActiveOrganization(); - // Exclude the active organization from the orgs list (this makes it easier for users to understand which org is active) if (activeOrganization && orgs) { orgs = orgs.filter((o) => o.id !== activeOrganization.id); } diff --git a/vite/vite.config.ts b/vite/vite.config.ts index 359b91aa5..bd211d3cb 100644 --- a/vite/vite.config.ts +++ b/vite/vite.config.ts @@ -43,20 +43,6 @@ export default defineConfig({ "../packages/atmn/src/prompts/skills/index.ts", ), - // Hide Radix UI imports with cleaner aliases - "@radix/accordion": "@radix-ui/react-accordion", - "@radix/checkbox": "@radix-ui/react-checkbox", - "@radix/context-menu": "@radix-ui/react-context-menu", - "@radix/dialog": "@radix-ui/react-dialog", - "@radix/dropdown-menu": "@radix-ui/react-dropdown-menu", - "@radix/popover": "@radix-ui/react-popover", - "@radix/scroll-area": "@radix-ui/react-scroll-area", - "@radix/select": "@radix-ui/react-select", - "@radix/separator": "@radix-ui/react-separator", - "@radix/slot": "@radix-ui/react-slot", - "@radix/switch": "@radix-ui/react-switch", - "@radix/tabs": "@radix-ui/react-tabs", - "@radix/tooltip": "@radix-ui/react-tooltip", }, },