The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
updated theme
Jonathan Summers-Muir4742fe15b38b
diff --git a/package-lock.json b/package-lock.jsonindex 47a3d31e1a7..3e25fbc4bcc 100644--- a/package-lock.json+++ b/package-lock.json@@ -4727,6 +4727,36 @@"@mdx-js/react": "*"}},+ "node_modules/@next/swc-android-arm-eabi": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2.tgz",+ "integrity": "sha512-r2rrz+DZ8YYGqzVrbRrpP6GKzwozpOrnFbErc4k36vUTSFMag9yQahZfaBe06JYdqu/e5yhm/saIDEaSVPRP4g==",+ "cpu": [+ "arm"+ ],+ "optional": true,+ "os": [+ "android"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-android-arm64": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2.tgz",+ "integrity": "sha512-B+TINJhCf+CrY1+b3/JWQlkecv53rAGa/gA7gi5B1cnBa/2Uvoe+Ue0JeCefTjfiyl1ScsyNx+NcESY8Ye2Ngg==",+ "cpu": [+ "arm64"+ ],+ "optional": true,+ "os": [+ "android"+ ],+ "engines": {+ "node": ">= 10"+ }+ },"node_modules/@next/swc-darwin-arm64": {"version": "12.3.2","cpu": [@@ -4741,6 +4771,156 @@"node": ">= 10"}},+ "node_modules/@next/swc-darwin-x64": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2.tgz",+ "integrity": "sha512-1HkjmS9awwlaeEY8Y01nRSNkSv3y+qnC/mjMPe/W66hEh3QKa/LQHqHeS7NOdEs19B2mhZ7w+EgMRXdLQ0Su8w==",+ "cpu": [+ "x64"+ ],+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-freebsd-x64": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2.tgz",+ "integrity": "sha512-h5Mx0BKDCJ5Vu/U8e07esF6PjPv1EJgmRbYWTUZMAflu13MQpCJkKEJir7+BeRfTXRfgFf+llc7uocrpd7mcrg==",+ "cpu": [+ "x64"+ ],+ "optional": true,+ "os": [+ "freebsd"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-linux-arm-gnueabihf": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2.tgz",+ "integrity": "sha512-EuRZAamoxfe/WoWRaC0zsCAoE4gs/mEhilcloNM4J5Mnb3PLY8PZV394W7t5tjBjItMCF7l2Ebwjwtm46tq2RA==",+ "cpu": [+ "arm"+ ],+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-linux-arm64-gnu": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2.tgz",+ "integrity": "sha512-T9GCFyOIb4S3acA9LqflUYD+QZ94iZketHCqKdoO0Nx0OCHIgGJV5rotDe8TDXwh/goYpIfyHU4j1qqw4w4VnA==",+ "cpu": [+ "arm64"+ ],+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-linux-arm64-musl": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2.tgz",+ "integrity": "sha512-hxNVZS6L3c2z3l9EH2GP0MGQ9exu6O8cohYNZyqC9WUl6C03sEn8xzDH1y+NgD3fVurvYkGU5F0PDddJJLfDIw==",+ "cpu": [+ "arm64"+ ],+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-linux-x64-gnu": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2.tgz",+ "integrity": "sha512-fCPkLuwDwY8/QeXxciJJjDHG09liZym/Bhb4A+RLFQ877wUkwFsNWDUTSdUx0YXlYK/1gf67BKauqKkOKp6CYw==",+ "cpu": [+ "x64"+ ],+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-linux-x64-musl": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2.tgz",+ "integrity": "sha512-o+GifBIQ2K+/MEFxHsxUZoU3bsuVFLXZYWd3idimFHiVdDCVYiKsY6mYMmKDlucX+9xRyOCkKL9Tjf+3tuXJpw==",+ "cpu": [+ "x64"+ ],+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-win32-arm64-msvc": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2.tgz",+ "integrity": "sha512-crii66irzGGMSUR0L8r9+A06eTv7FTXqw4rgzJ33M79EwQJOdpY7RVKXLQMurUhniEeQEEOfamiEdPIi/qxisw==",+ "cpu": [+ "arm64"+ ],+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-win32-ia32-msvc": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2.tgz",+ "integrity": "sha512-5hRUSvn3MdQ4nVRu1rmKxq5YJzpTtZfaC/NyGw6wa4NSF1noUn/pdQGUr+I5Qz3CZkd1gZzzC0eaXQHlrk0E2g==",+ "cpu": [+ "ia32"+ ],+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-win32-x64-msvc": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2.tgz",+ "integrity": "sha512-tpQJYUH+TzPMIsdVl9fH8uDg47iwiNjKY+8e9da3dXqlkztKzjSw0OwSADoqh3KrifplXeKSta+BBGLdBqg3sg==",+ "cpu": [+ "x64"+ ],+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">= 10"+ }+ },"node_modules/@nodelib/fs.scandir": {"version": "2.1.5","license": "MIT",@@ -43099,186 +43279,6 @@"version": "0.4.1","dev": true,"license": "MIT"- },- "node_modules/@next/swc-android-arm-eabi": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2.tgz",- "integrity": "sha512-r2rrz+DZ8YYGqzVrbRrpP6GKzwozpOrnFbErc4k36vUTSFMag9yQahZfaBe06JYdqu/e5yhm/saIDEaSVPRP4g==",- "cpu": [- "arm"- ],- "optional": true,- "os": [- "android"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@next/swc-android-arm64": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2.tgz",- "integrity": "sha512-B+TINJhCf+CrY1+b3/JWQlkecv53rAGa/gA7gi5B1cnBa/2Uvoe+Ue0JeCefTjfiyl1ScsyNx+NcESY8Ye2Ngg==",- "cpu": [- "arm64"- ],- "optional": true,- "os": [- "android"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@next/swc-darwin-x64": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2.tgz",- "integrity": "sha512-1HkjmS9awwlaeEY8Y01nRSNkSv3y+qnC/mjMPe/W66hEh3QKa/LQHqHeS7NOdEs19B2mhZ7w+EgMRXdLQ0Su8w==",- "cpu": [- "x64"- ],- "optional": true,- "os": [- "darwin"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@next/swc-freebsd-x64": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2.tgz",- "integrity": "sha512-h5Mx0BKDCJ5Vu/U8e07esF6PjPv1EJgmRbYWTUZMAflu13MQpCJkKEJir7+BeRfTXRfgFf+llc7uocrpd7mcrg==",- "cpu": [- "x64"- ],- "optional": true,- "os": [- "freebsd"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@next/swc-linux-arm-gnueabihf": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2.tgz",- "integrity": "sha512-EuRZAamoxfe/WoWRaC0zsCAoE4gs/mEhilcloNM4J5Mnb3PLY8PZV394W7t5tjBjItMCF7l2Ebwjwtm46tq2RA==",- "cpu": [- "arm"- ],- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@next/swc-linux-arm64-gnu": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2.tgz",- "integrity": "sha512-T9GCFyOIb4S3acA9LqflUYD+QZ94iZketHCqKdoO0Nx0OCHIgGJV5rotDe8TDXwh/goYpIfyHU4j1qqw4w4VnA==",- "cpu": [- "arm64"- ],- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@next/swc-linux-arm64-musl": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2.tgz",- "integrity": "sha512-hxNVZS6L3c2z3l9EH2GP0MGQ9exu6O8cohYNZyqC9WUl6C03sEn8xzDH1y+NgD3fVurvYkGU5F0PDddJJLfDIw==",- "cpu": [- "arm64"- ],- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@next/swc-linux-x64-gnu": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2.tgz",- "integrity": "sha512-fCPkLuwDwY8/QeXxciJJjDHG09liZym/Bhb4A+RLFQ877wUkwFsNWDUTSdUx0YXlYK/1gf67BKauqKkOKp6CYw==",- "cpu": [- "x64"- ],- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@next/swc-linux-x64-musl": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2.tgz",- "integrity": "sha512-o+GifBIQ2K+/MEFxHsxUZoU3bsuVFLXZYWd3idimFHiVdDCVYiKsY6mYMmKDlucX+9xRyOCkKL9Tjf+3tuXJpw==",- "cpu": [- "x64"- ],- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@next/swc-win32-arm64-msvc": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2.tgz",- "integrity": "sha512-crii66irzGGMSUR0L8r9+A06eTv7FTXqw4rgzJ33M79EwQJOdpY7RVKXLQMurUhniEeQEEOfamiEdPIi/qxisw==",- "cpu": [- "arm64"- ],- "optional": true,- "os": [- "win32"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@next/swc-win32-ia32-msvc": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2.tgz",- "integrity": "sha512-5hRUSvn3MdQ4nVRu1rmKxq5YJzpTtZfaC/NyGw6wa4NSF1noUn/pdQGUr+I5Qz3CZkd1gZzzC0eaXQHlrk0E2g==",- "cpu": [- "ia32"- ],- "optional": true,- "os": [- "win32"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@next/swc-win32-x64-msvc": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2.tgz",- "integrity": "sha512-tpQJYUH+TzPMIsdVl9fH8uDg47iwiNjKY+8e9da3dXqlkztKzjSw0OwSADoqh3KrifplXeKSta+BBGLdBqg3sg==",- "cpu": [- "x64"- ],- "optional": true,- "os": [- "win32"- ],- "engines": {- "node": ">= 10"- }}},"dependencies": {@@ -45743,10 +45743,82 @@"version": "12.3.4","requires": {}},+ "@next/swc-android-arm-eabi": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2.tgz",+ "integrity": "sha512-r2rrz+DZ8YYGqzVrbRrpP6GKzwozpOrnFbErc4k36vUTSFMag9yQahZfaBe06JYdqu/e5yhm/saIDEaSVPRP4g==",+ "optional": true+ },+ "@next/swc-android-arm64": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2.tgz",+ "integrity": "sha512-B+TINJhCf+CrY1+b3/JWQlkecv53rAGa/gA7gi5B1cnBa/2Uvoe+Ue0JeCefTjfiyl1ScsyNx+NcESY8Ye2Ngg==",+ "optional": true+ },"@next/swc-darwin-arm64": {"version": "12.3.2","optional": true},+ "@next/swc-darwin-x64": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2.tgz",+ "integrity": "sha512-1HkjmS9awwlaeEY8Y01nRSNkSv3y+qnC/mjMPe/W66hEh3QKa/LQHqHeS7NOdEs19B2mhZ7w+EgMRXdLQ0Su8w==",+ "optional": true+ },+ "@next/swc-freebsd-x64": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2.tgz",+ "integrity": "sha512-h5Mx0BKDCJ5Vu/U8e07esF6PjPv1EJgmRbYWTUZMAflu13MQpCJkKEJir7+BeRfTXRfgFf+llc7uocrpd7mcrg==",+ "optional": true+ },+ "@next/swc-linux-arm-gnueabihf": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2.tgz",+ "integrity": "sha512-EuRZAamoxfe/WoWRaC0zsCAoE4gs/mEhilcloNM4J5Mnb3PLY8PZV394W7t5tjBjItMCF7l2Ebwjwtm46tq2RA==",+ "optional": true+ },+ "@next/swc-linux-arm64-gnu": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2.tgz",+ "integrity": "sha512-T9GCFyOIb4S3acA9LqflUYD+QZ94iZketHCqKdoO0Nx0OCHIgGJV5rotDe8TDXwh/goYpIfyHU4j1qqw4w4VnA==",+ "optional": true+ },+ "@next/swc-linux-arm64-musl": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2.tgz",+ "integrity": "sha512-hxNVZS6L3c2z3l9EH2GP0MGQ9exu6O8cohYNZyqC9WUl6C03sEn8xzDH1y+NgD3fVurvYkGU5F0PDddJJLfDIw==",+ "optional": true+ },+ "@next/swc-linux-x64-gnu": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2.tgz",+ "integrity": "sha512-fCPkLuwDwY8/QeXxciJJjDHG09liZym/Bhb4A+RLFQ877wUkwFsNWDUTSdUx0YXlYK/1gf67BKauqKkOKp6CYw==",+ "optional": true+ },+ "@next/swc-linux-x64-musl": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2.tgz",+ "integrity": "sha512-o+GifBIQ2K+/MEFxHsxUZoU3bsuVFLXZYWd3idimFHiVdDCVYiKsY6mYMmKDlucX+9xRyOCkKL9Tjf+3tuXJpw==",+ "optional": true+ },+ "@next/swc-win32-arm64-msvc": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2.tgz",+ "integrity": "sha512-crii66irzGGMSUR0L8r9+A06eTv7FTXqw4rgzJ33M79EwQJOdpY7RVKXLQMurUhniEeQEEOfamiEdPIi/qxisw==",+ "optional": true+ },+ "@next/swc-win32-ia32-msvc": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2.tgz",+ "integrity": "sha512-5hRUSvn3MdQ4nVRu1rmKxq5YJzpTtZfaC/NyGw6wa4NSF1noUn/pdQGUr+I5Qz3CZkd1gZzzC0eaXQHlrk0E2g==",+ "optional": true+ },+ "@next/swc-win32-x64-msvc": {+ "version": "12.3.2",+ "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2.tgz",+ "integrity": "sha512-tpQJYUH+TzPMIsdVl9fH8uDg47iwiNjKY+8e9da3dXqlkztKzjSw0OwSADoqh3KrifplXeKSta+BBGLdBqg3sg==",+ "optional": true+ },"@nodelib/fs.scandir": {"version": "2.1.5","requires": {@@ -71306,78 +71378,6 @@},"zxcvbn": {"version": "4.4.2"- },- "@next/swc-android-arm-eabi": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2.tgz",- "integrity": "sha512-r2rrz+DZ8YYGqzVrbRrpP6GKzwozpOrnFbErc4k36vUTSFMag9yQahZfaBe06JYdqu/e5yhm/saIDEaSVPRP4g==",- "optional": true- },- "@next/swc-android-arm64": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2.tgz",- "integrity": "sha512-B+TINJhCf+CrY1+b3/JWQlkecv53rAGa/gA7gi5B1cnBa/2Uvoe+Ue0JeCefTjfiyl1ScsyNx+NcESY8Ye2Ngg==",- "optional": true- },- "@next/swc-darwin-x64": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2.tgz",- "integrity": "sha512-1HkjmS9awwlaeEY8Y01nRSNkSv3y+qnC/mjMPe/W66hEh3QKa/LQHqHeS7NOdEs19B2mhZ7w+EgMRXdLQ0Su8w==",- "optional": true- },- "@next/swc-freebsd-x64": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2.tgz",- "integrity": "sha512-h5Mx0BKDCJ5Vu/U8e07esF6PjPv1EJgmRbYWTUZMAflu13MQpCJkKEJir7+BeRfTXRfgFf+llc7uocrpd7mcrg==",- "optional": true- },- "@next/swc-linux-arm-gnueabihf": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2.tgz",- "integrity": "sha512-EuRZAamoxfe/WoWRaC0zsCAoE4gs/mEhilcloNM4J5Mnb3PLY8PZV394W7t5tjBjItMCF7l2Ebwjwtm46tq2RA==",- "optional": true- },- "@next/swc-linux-arm64-gnu": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2.tgz",- "integrity": "sha512-T9GCFyOIb4S3acA9LqflUYD+QZ94iZketHCqKdoO0Nx0OCHIgGJV5rotDe8TDXwh/goYpIfyHU4j1qqw4w4VnA==",- "optional": true- },- "@next/swc-linux-arm64-musl": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2.tgz",- "integrity": "sha512-hxNVZS6L3c2z3l9EH2GP0MGQ9exu6O8cohYNZyqC9WUl6C03sEn8xzDH1y+NgD3fVurvYkGU5F0PDddJJLfDIw==",- "optional": true- },- "@next/swc-linux-x64-gnu": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2.tgz",- "integrity": "sha512-fCPkLuwDwY8/QeXxciJJjDHG09liZym/Bhb4A+RLFQ877wUkwFsNWDUTSdUx0YXlYK/1gf67BKauqKkOKp6CYw==",- "optional": true- },- "@next/swc-linux-x64-musl": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2.tgz",- "integrity": "sha512-o+GifBIQ2K+/MEFxHsxUZoU3bsuVFLXZYWd3idimFHiVdDCVYiKsY6mYMmKDlucX+9xRyOCkKL9Tjf+3tuXJpw==",- "optional": true- },- "@next/swc-win32-arm64-msvc": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2.tgz",- "integrity": "sha512-crii66irzGGMSUR0L8r9+A06eTv7FTXqw4rgzJ33M79EwQJOdpY7RVKXLQMurUhniEeQEEOfamiEdPIi/qxisw==",- "optional": true- },- "@next/swc-win32-ia32-msvc": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2.tgz",- "integrity": "sha512-5hRUSvn3MdQ4nVRu1rmKxq5YJzpTtZfaC/NyGw6wa4NSF1noUn/pdQGUr+I5Qz3CZkd1gZzzC0eaXQHlrk0E2g==",- "optional": true- },- "@next/swc-win32-x64-msvc": {- "version": "12.3.2",- "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2.tgz",- "integrity": "sha512-tpQJYUH+TzPMIsdVl9fH8uDg47iwiNjKY+8e9da3dXqlkztKzjSw0OwSADoqh3KrifplXeKSta+BBGLdBqg3sg==",- "optional": true}}}diff --git a/packages/config/tailwind.config.js b/packages/config/tailwind.config.jsindex 1dcd31537df..67014ec33e5 100644--- a/packages/config/tailwind.config.js+++ b/packages/config/tailwind.config.js@@ -14,17 +14,39 @@ function generateTwColorClasses(globalKey, twAttributes) {}}})- return classes+ const nestedClasses = kebabToNested(classes)+ // return, but nest the keys if they are kebab case named+ return nestedClasses+}++function kebabToNested(obj) {+ const result = {}+ for (const [key, value] of Object.entries(obj)) {+ const parts = key.split('-')+ let currentObj = result+ for (let i = 0; i < parts.length; i++) {+ const part = parts[i]+ if (!currentObj[part]) {+ currentObj[part] = {}+ }+ if (i === parts.length - 1) {+ if (typeof value === 'object') {+ currentObj[part] = nestObject(value)+ } else {+ currentObj[part] = value+ }+ } else {+ currentObj = currentObj[part]+ }+ }+ }+ return result}const uiConfig = ui({mode: 'JIT',darkMode: 'class',theme: {- accentColor: (theme) => ({- ...theme('colors'),- ...generateTwColorClasses('accentColor', color),- }),backgroundColor: (theme) => ({...theme('colors'),...generateTwColorClasses('backgroundColor', color),@@ -33,38 +55,10 @@ const uiConfig = ui({...theme('colors'),...generateTwColorClasses('borderColor', color),}),- boxShadowColor: (theme) => ({- ...theme('colors'),- ...generateTwColorClasses('boxShadowColor', color),- }),- caretColor: (theme) => ({- ...theme('colors'),- ...generateTwColorClasses('caretColor', color),- }),- divideColor: (theme) => ({- ...theme('colors'),- ...generateTwColorClasses('divideColor', color),- }),- outlineColor: (theme) => ({- ...theme('colors'),- ...generateTwColorClasses('outlineColor', color),- }),- ringColor: (theme) => ({- ...theme('colors'),- ...generateTwColorClasses('ringColor', color),- }),- ringOffsetColor: (theme) => ({- ...theme('colors'),- ...generateTwColorClasses('ringOffsetColor', color),- }),textColor: (theme) => ({...theme('colors'),...generateTwColorClasses('textColor', color),}),- textDecorationColor: (theme) => ({- ...theme('colors'),- ...generateTwColorClasses('textDecorationColor', color),- }),extend: {typography: ({ theme }) => ({// Removal of backticks in code blocks for tailwind v3.0diff --git a/packages/ui/.storybook/main.js b/packages/ui/.storybook/main.jsindex b300f96451b..a163a0f971a 100644--- a/packages/ui/.storybook/main.js+++ b/packages/ui/.storybook/main.js@@ -7,28 +7,42 @@ module.exports = {// // ],// // TODO: Temporally Import one by one story and fix build issue.// // After all stories are cleaned, revert to wildcard import.- stories: ['../src/components/Accordion/Accordion.stories.tsx', '../src/components/Alert/Alert.stories.tsx', '../src/components/Avatar/Avatar.stories.tsx', '../src/components/Button/Button.stories.tsx', '../src/components/Checkbox/Checkbox.stories.tsx', '../src/components/Collapsible/Collapsible.stories.tsx', '../src/components/ContextMenu/ContextMenu.stories.tsx', '../src/components/Dropdown/Dropdown.stories.tsx'],+ stories: [+ '../src/components/Accordion/Accordion.stories.tsx',+ '../src/components/Alert/Alert.stories.tsx',+ '../src/components/Avatar/Avatar.stories.tsx',+ '../src/components/Button/Button.stories.tsx',+ '../src/components/Checkbox/Checkbox.stories.tsx',+ '../src/components/Collapsible/Collapsible.stories.tsx',+ '../src/components/ContextMenu/ContextMenu.stories.tsx',+ '../src/components/Dropdown/Dropdown.stories.tsx',+ '../src/components/DropdownTest/Dropdown-test2.stories.tsx',+ ],addons: [- // '@storybook/addon-links',- // '@storybook/addon-essentials',- // '@storybook/addon-interactions',- // '@storybook/addon-actions',- 'storybook-dark-mode', {- name: '@storybook/addon-styling',- options: {- // Check out https://github.com/storybookjs/addon-styling/blob/main/docs/api.md- // For more details on this addon's options.- postCss: true- }- }, '@storybook/addon-mdx-gfm'],+ // '@storybook/addon-links',+ // '@storybook/addon-essentials',+ // '@storybook/addon-interactions',+ // '@storybook/addon-actions',+ 'storybook-dark-mode',+ {+ name: '@storybook/addon-styling',+ options: {+ // Check out https://github.com/storybookjs/addon-styling/blob/main/docs/api.md+ // For more details on this addon's options.+ postCss: true,+ },+ },+ '@storybook/addon-mdx-gfm',+ ],+docs: {- autodocs: true+ autodocs: true,},framework: {name: '@storybook/react-webpack5',- options: {}- }-};+ options: {},+ },+}// module.exports = {// // stories: [@@ -86,4 +100,4 @@ module.exports = {// docs: {// autodocs: true,// },-// }\ No newline at end of file+// }diff --git a/packages/ui/.storybook/preview.css b/packages/ui/.storybook/preview.cssindex 2afd110d2e3..5682f9ab6be 100644--- a/packages/ui/.storybook/preview.css+++ b/packages/ui/.storybook/preview.css@@ -2,9 +2,13 @@@tailwind components;@tailwind utilities;+@import './../build/css/themes/dark.css';+@import './../build/css/themes/light.css';+@import './../build/css/themes/darker-dark.css';+.dark,.light,.light .docs-story,.dark .docs-story {- @apply bg-scale-200;+ @apply bg-body;}diff --git a/packages/ui/build-tokens.js b/packages/ui/build-tokens.jsindex af445710ac1..9898db76faf 100644--- a/packages/ui/build-tokens.js+++ b/packages/ui/build-tokens.js@@ -174,7 +174,7 @@ themeFiles.map(function (filePath, i) {getStyleDictionaryConfig(// determine wether to include the root theme properties with each themerootTheme ? [filePath] : ['tokens/themes/root.json', filePath],- rootTheme ? 'darkasdsd' : fileName,+ rootTheme ? 'dark' : fileName,'themes',buildTailwindFiles,falsediff --git a/packages/ui/build/css/source/global-two.css b/packages/ui/build/css/source/global-two.cssindex 4696905caff..fce01f2ce79 100644--- a/packages/ui/build/css/source/global-two.css+++ b/packages/ui/build/css/source/global-two.css@@ -1,6 +1,6 @@/*** Do not edit directly- * Generated on Sat, 06 May 2023 10:29:24 GMT+ * Generated on Sat, 06 May 2023 12:08:53 GMT*/:root {diff --git a/packages/ui/build/css/source/global.css b/packages/ui/build/css/source/global.cssindex e975804be9b..73d65ff5cdd 100644--- a/packages/ui/build/css/source/global.css+++ b/packages/ui/build/css/source/global.css@@ -1,6 +1,6 @@/*** Do not edit directly- * Generated on Sat, 06 May 2023 10:29:24 GMT+ * Generated on Sat, 06 May 2023 12:08:53 GMT*/:root {diff --git a/packages/ui/build/css/themes/dark.css b/packages/ui/build/css/themes/dark.cssindex 2174f046970..d337163d199 100644--- a/packages/ui/build/css/themes/dark.css+++ b/packages/ui/build/css/themes/dark.css@@ -1,6 +1,6 @@/*** Do not edit directly- * Generated on Sat, 06 May 2023 10:28:49 GMT+ * Generated on Sat, 06 May 2023 12:08:53 GMT*/.dark {@@ -18,13 +18,13 @@--themeVariablesBackgroundBody: #1c1c1c; /* og color is colors.Gray.Dark.2 */--themeVariablesBackground: #232323; /* og color is colors.Gray.Dark.3 */--themeVariablesBrand: #2b825b;- --textDefault: var(--themeVariablesTextBody);+ --textColorBodyDefault: var(--themeVariablesTextBody);--backgroundColorBodyAlt: var(--themeVariablesBackgroundBodyAlt);--backgroundColorBody: var(--themeVariablesBackgroundBody); /* Background color used for the main page body. */--backgroundColorDefault: var(--themeVariablesBackground); /* Default background color for any container. */- --textBodyLightest: lch(32.8 0 0);- --textBodyLighter: lch(46.9 0 0);- --textBodyLight: lch(65.6 0 0);+ --textColorBodyLightest: lch(32.8 0 0);+ --textColorBodyLighter: lch(46.9 0 0);+ --textColorBodyLight: lch(65.6 0 0);--borderColorBody: lch(14.8 0 0);--borderColorDefault: lch(18 0 0); /* Default border color */--backgroundColorControl: lch(9.6 0 0);diff --git a/packages/ui/build/css/themes/darkasdsd.css b/packages/ui/build/css/themes/darkasdsd.cssdeleted file mode 100644index 038fce079d0..00000000000--- a/packages/ui/build/css/themes/darkasdsd.css+++ /dev/null@@ -1,33 +0,0 @@-/**- * Do not edit directly- * Generated on Sat, 06 May 2023 10:29:24 GMT- */--.darkasdsd {- --utilityMixNegative: #000;- --utilityMixPositive: #fff;- --darkenPercentage: 0.2;- --lightenHardest: 0.65;- --lightenHarder: 0.5;- --lightenHard: 0.3;- --lightenSoft: 0.05;- --lightenDefault: 0.1;- --textOverrideLightenStrength: 0;- --themeVariablesTextBody: #ededed; /* og color is colors.Gray.Dark.12 */- --themeVariablesBackgroundBodyAlt: #161616; /* og color is colors.Gray.Dark.1 */- --themeVariablesBackgroundBody: #1c1c1c; /* og color is colors.Gray.Dark.2 */- --themeVariablesBackground: #232323; /* og color is colors.Gray.Dark.3 */- --themeVariablesBrand: #2b825b;- --textDefault: var(--themeVariablesTextBody);- --backgroundColorBodyAlt: var(--themeVariablesBackgroundBodyAlt);- --backgroundColorBody: var(--themeVariablesBackgroundBody); /* Background color used for the main page body. */- --backgroundColorDefault: var(--themeVariablesBackground); /* Default background color for any container. */- --textBodyLightest: lch(32.8 0 0);- --textBodyLighter: lch(46.9 0 0);- --textBodyLight: lch(65.6 0 0);- --borderColorBody: lch(14.8 0 0);- --borderColorDefault: lch(18 0 0); /* Default border color */- --backgroundColorControl: lch(9.6 0 0);- --backgroundColorSelection: lch(18 0 0);- --borderColorControl: lch(22.1 0 0);-}diff --git a/packages/ui/build/css/themes/darker-dark.css b/packages/ui/build/css/themes/darker-dark.cssindex baedc9fb580..e0f9008813d 100644--- a/packages/ui/build/css/themes/darker-dark.css+++ b/packages/ui/build/css/themes/darker-dark.css@@ -1,9 +1,9 @@/*** Do not edit directly- * Generated on Sat, 06 May 2023 10:29:24 GMT+ * Generated on Sat, 06 May 2023 12:08:53 GMT*/-.darker-dark {+.dark {--utilityMixNegative: #000;--utilityMixPositive: #fff;--darkenPercentage: 0.2;@@ -18,13 +18,17 @@--themeVariablesBackgroundBody: #000; /* $colors.Gray.Dark.2 */--themeVariablesBackground: #141414; /* $colors.Gray.Dark.3 */--themeVariablesBrand: #d626dc;- --textDefault: var(--themeVariablesTextBody);+ --textColorBodyDefault: var(--themeVariablesTextBody);--backgroundColorBodyAlt: var(--themeVariablesBackgroundBodyAlt);- --backgroundColorBody: var(--themeVariablesBackgroundBody); /* Background color used for the main page body. */- --backgroundColorDefault: var(--themeVariablesBackground); /* Default background color for any container. */- --textBodyLightest: lch(32.6 0 0);- --textBodyLighter: lch(46.5 0 0);- --textBodyLight: lch(65.1 0 0);+ --backgroundColorBody: var(+ --themeVariablesBackgroundBody+ ); /* Background color used for the main page body. */+ --backgroundColorDefault: var(+ --themeVariablesBackground+ ); /* Default background color for any container. */+ --textColorBodyLightest: lch(32.6 0 0);+ --textColorBodyLighter: lch(46.5 0 0);+ --textColorBodyLight: lch(65.1 0 0);--borderColorBody: lch(5 0 0);--borderColorDefault: lch(11 0 0); /* Default border color */--backgroundColorControl: lch(4.42 0 0);diff --git a/packages/ui/build/css/themes/light.css b/packages/ui/build/css/themes/light.cssindex c5ed39c1d3c..c555d74476c 100644--- a/packages/ui/build/css/themes/light.css+++ b/packages/ui/build/css/themes/light.css@@ -1,6 +1,6 @@/*** Do not edit directly- * Generated on Sat, 06 May 2023 10:29:24 GMT+ * Generated on Sat, 06 May 2023 12:08:53 GMT*/.light {@@ -19,13 +19,13 @@--themeVariablesBackgroundBody: #f8f9fa; /* og color is colors.Slate.Light.2 */--themeVariablesBackground: #fbfcfd; /* og color is colors.Slate.Light.1 */--themeVariablesBrand: #2b825b;- --textDefault: var(--themeVariablesTextBody);+ --textColorBodyDefault: var(--themeVariablesTextBody);--backgroundColorBodyAlt: var(--themeVariablesBackgroundBodyAlt);--backgroundColorBody: var(--themeVariablesBackgroundBody); /* Background color used for the main page body. */--backgroundColorDefault: var(--themeVariablesBackground); /* Default background color for any container. */- --textBodyLightest: lch(68.7 0.61 224);- --textBodyLighter: lch(55.2 0.87 224);- --textBodyLight: lch(37.3 1.22 224);+ --textColorBodyLightest: lch(68.7 0.61 224);+ --textColorBodyLighter: lch(55.2 0.87 224);+ --textColorBodyLight: lch(37.3 1.22 224);--borderColorBody: lch(94.4 0.62 251);--borderColorDefault: lch(95.4 0.62 251); /* Default border color */--backgroundColorControl: lch(99.2 0.45 251);diff --git a/packages/ui/build/css/tw-extend/color.js b/packages/ui/build/css/tw-extend/color.jsindex 678fb7ba81f..280495515c4 100644--- a/packages/ui/build/css/tw-extend/color.js+++ b/packages/ui/build/css/tw-extend/color.js@@ -12,10 +12,10 @@ module.exports = {"borderColor-DEFAULT": "var(--borderColorDefault, lch(18 0 0));","borderColor-body": "var(--borderColorBody, lch(14.8 0 0));","borderColor-control": "var(--borderColorControl, lch(22.1 0 0));",-"text-DEFAULT": "var(--textDefault, #ededed);",-"text-body-light": "var(--textBodyLight, lch(65.6 0 0));",-"text-body-lighter": "var(--textBodyLighter, lch(46.9 0 0));",-"text-body-lightest": "var(--textBodyLightest, lch(32.8 0 0));",+"textColor-body-DEFAULT": "var(--textColorBodyDefault, #ededed);",+"textColor-body-light": "var(--textColorBodyLight, lch(65.6 0 0));",+"textColor-body-lighter": "var(--textColorBodyLighter, lch(46.9 0 0));",+"textColor-body-lightest": "var(--textColorBodyLightest, lch(32.8 0 0));","utility-mix-positive": "var(--utilityMixPositive, #fff);","utility-mix-negative": "var(--utilityMixNegative, #000);"}\ No newline at end of filediff --git a/packages/ui/src/components/Dropdown/Dropdown.stories.tsx b/packages/ui/src/components/Dropdown/Dropdown.stories.tsxindex d63186651bd..3b66560452a 100644--- a/packages/ui/src/components/Dropdown/Dropdown.stories.tsx+++ b/packages/ui/src/components/Dropdown/Dropdown.stories.tsx@@ -25,8 +25,13 @@ const DemoContainer = ({ children }: { children: React.ReactNode }) => (><divclassName="+ bg border+p-3 px-5- bg-scale-300 border border-scale-600 rounded flex gap-4+ shadow-sm+ rounded-md+ flex+ gap-4justify-betweenitems-centerw-3/4@@ -53,9 +58,9 @@ export const DefaultFull = (args: any) => {overlay={[<Dropdown.Misc><div>- <span className="block">Signed in as </span>+ <span className="block text-body">Signed in as </span>- <span>[email protected] </span>+ <span className="text-body-light">[email protected] </span></div></Dropdown.Misc>,<Dropdown.Separator />,diff --git a/packages/ui/src/components/DropdownTest/Dropdown-test.stories.tsx b/packages/ui/src/components/DropdownTest/Dropdown-test.stories.tsxnew file mode 100644index 00000000000..75057be1fc6--- /dev/null+++ b/packages/ui/src/components/DropdownTest/Dropdown-test.stories.tsx@@ -0,0 +1,323 @@+import React, { useState } from 'react'+import { Dropdown } from '.'+import { Button } from '../Button'+import { Input } from '../Input'++import { IconSettings } from '../Icon/icons/IconSettings'+import { IconLogOut } from '../Icon/icons/IconLogOut'+import { IconChevronDown } from '../Icon/icons/IconChevronDown'+import { IconChevronRight } from '../Icon/icons/IconChevronRight'+import { IconHardDrive } from '../Icon/icons/IconHardDrive'+import { IconLogIn } from '../Icon/icons/IconLogIn'+import { IconSearch } from '../Icon/icons/IconSearch'++export default {+ title: 'Navigation/DropdownTest',+ component: Dropdown,+}++const DemoContainer = ({ children }: { children: React.ReactNode }) => (+ <div+ className="+ flex justify-center items-center+ w-screen h-screen+ "+ >+ <div+ className="+ p-3 px-5+ bg-scale-300 border border-scale-600 rounded flex gap-4+ justify-between+ items-center+ w-3/4+ "+ >+ <div>+ <h4 className="text-scale-1200 text-base">Shall we nest some components?</h4>+ <p className="text-scale-1100 text-sm">yea sure, go on then.</p>+ </div>+ <div className="relative">{children}</div>+ </div>+ </div>+)++export const DefaultFull = (args: any) => {+ const [checked, setChecked] = useState(false)+ const [value, setValue] = useState('red')++ return (+ <DemoContainer>+ <Dropdown+ side="bottom"+ align="end"+ overlay={[+ <Dropdown.Misc>+ <div>+ <span className="block">Signed in as </span>++ <span>[email protected] </span>+ </div>+ </Dropdown.Misc>,+ <Dropdown.Separator />,+ <Dropdown.Label>Group label</Dropdown.Label>,+ <Dropdown.Item onClick={() => console.log('clicked')}>Account</Dropdown.Item>,+ <Dropdown.Item>+ Settings <Dropdown.RightSlot>⌘+T</Dropdown.RightSlot>+ </Dropdown.Item>,+ <Dropdown.Separator />,+ <Dropdown.Checkbox checked={checked} onChange={setChecked}>+ Show subtitles+ </Dropdown.Checkbox>,+ <Dropdown.Separator />,+ <Dropdown.RadioGroup value={value} onChange={setValue}>+ <Dropdown.Radio value={'red'}>Red</Dropdown.Radio>+ <Dropdown.Radio value={'blue'}>Blue</Dropdown.Radio>+ <Dropdown.Radio value={'green'}>Green</Dropdown.Radio>+ </Dropdown.RadioGroup>,+ <Dropdown.Separator />,+ <Dropdown+ isNested+ overlay={[+ <Dropdown.RadioGroup value={value} onChange={setValue}>+ <Dropdown.Radio value={'red'}>Red</Dropdown.Radio>+ <Dropdown.Radio value={'blue'}>Blue</Dropdown.Radio>+ <Dropdown.Radio value={'green'}>Green</Dropdown.Radio>+ </Dropdown.RadioGroup>,+ <Dropdown.Separator />,+ <Dropdown.Label>Group label</Dropdown.Label>,+ <Dropdown.Item onClick={() => console.log('clicked')}>Account</Dropdown.Item>,+ <Dropdown.Item>+ Settings <Dropdown.RightSlot>⌘+T</Dropdown.RightSlot>+ </Dropdown.Item>,+ ]}+ >+ <Dropdown.TriggerItem icon={<IconHardDrive />}>+ Open sub menu{' '}+ <Dropdown.RightSlot>+ <IconChevronRight size={14} />+ </Dropdown.RightSlot>+ </Dropdown.TriggerItem>+ </Dropdown>,+ <Dropdown.Separator />,+ <Dropdown.Item icon={<IconLogIn size="tiny" />}>Log out</Dropdown.Item>,+ ]}+ >+ <Button as="span" type="default" iconRight={<IconChevronDown />}>+ Click for dropdown+ </Button>+ </Dropdown>+ </DemoContainer>+ )+}++export const Default = (args: any) => (+ <div style={{ margin: '0 auto', minHeight: '420px', marginTop: '220px' }}>+ <Dropdown+ {...args}+ overlay={[+ <Dropdown.Misc>+ <div>+ <span className="block">Signed in as </span>++ <span>[email protected] </span>+ </div>+ </Dropdown.Misc>,+ <Dropdown.Separator />,+ <Dropdown.Label>Group label</Dropdown.Label>,+ <Dropdown.Item onClick={() => console.log('clicked')}>Account</Dropdown.Item>,+ <Dropdown.Item>+ Settings <Dropdown.RightSlot>⌘+T</Dropdown.RightSlot>+ </Dropdown.Item>,+ <Dropdown.Separator />,+ <Dropdown.Item icon={<IconLogIn size="tiny" />}>Log out</Dropdown.Item>,+ ]}+ >+ <Button as="span" type="secondary" iconRight={<IconChevronDown />}>+ Click for dropdown+ </Button>+ </Dropdown>+ </div>+)++Default.args = {}++export const doNotcloseOverlay = (args: any) => (+ <div style={{ margin: '0 auto', minHeight: '420px', marginTop: '220px' }}>+ <Dropdown+ {...args}+ overlay={[+ <Dropdown.Misc>+ <span>Signed in as </span>+ <span>[email protected] </span>+ </Dropdown.Misc>,+ <Dropdown.Separator />,+ <Dropdown.Item>Account</Dropdown.Item>,+ <Dropdown.Item>Settings</Dropdown.Item>,+ <Dropdown.Item>+ <Button icon={<IconLogOut />}>Log out</Button>+ </Dropdown.Item>,+ ]}+ >+ <Button as="span" type="outline" iconRight={<IconChevronDown />}>+ Click for dropdown+ </Button>+ </Dropdown>+ </div>+)++doNotcloseOverlay.args = {}++export const withCustomStyles = (args: any) => (+ <div+ style={{+ margin: '0 auto',+ minHeight: '420px',+ marginTop: '220px',+ marginLeft: '400px',+ }}+ >+ <Dropdown+ overlayStyle={{ minWidth: '500px' }}+ placement="bottomRight"+ {...args}+ overlay={[+ <Dropdown.Item>+ <span>Signed in as </span>+ <span>[email protected] </span>+ </Dropdown.Item>,+ <Dropdown.Separator />,+ <Dropdown.Item>Account</Dropdown.Item>,+ <Dropdown.Item>Settings</Dropdown.Item>,+ <Dropdown.Separator />,+ <Dropdown.Item>+ <Button type="default" icon={<IconLogOut />}>+ Log out+ </Button>+ </Dropdown.Item>,+ ]}+ >+ <Button as="span" type="outline" iconRight={<IconChevronDown />}>+ Click for dropdown+ </Button>+ </Dropdown>+ </div>+)++withCustomStyles.args = {}++export const SearchList = (args: any) => (+ <div style={{ margin: '0 auto', minHeight: '420px', marginTop: '220px' }}>+ <Dropdown+ {...args}+ overlay={[+ <Dropdown.Misc>+ <Input size="tiny" icon={<IconSearch size={14} />} autoFocus={false} />+ </Dropdown.Misc>,+ <Dropdown.Item>+ <span>Signed in as </span>+ <span>[email protected] </span>+ </Dropdown.Item>,+ <Dropdown.Item>+ <span>Signed in as </span>+ <span>[email protected] </span>+ </Dropdown.Item>,+ <Dropdown.Separator />,+ <Dropdown.Item icon={<IconLogIn />}>+ <span>Log out</span>+ </Dropdown.Item>,+ ]}+ >+ <Button as="span" type="outline" iconRight={<IconChevronDown />}>+ Click for dropdown+ </Button>+ </Dropdown>+ </div>+)++SearchList.args = {}++export const Checkbox = (args: any) => {+ const [checked, setChecked] = useState(false)++ return (+ <div style={{ margin: '0 auto', minHeight: '420px', marginTop: '220px' }}>+ <Dropdown+ {...args}+ overlay={[+ <Dropdown.Item icon={<IconSettings size="small" />}>Account</Dropdown.Item>,+ <Dropdown.Item>Settings</Dropdown.Item>,+ <Dropdown.Separator />,+ <Dropdown.Checkbox checked={checked} onChange={setChecked}>+ Show subtitles+ </Dropdown.Checkbox>,+ ]}+ >+ <Button as="span" type="outline" iconRight={<IconChevronDown />}>+ Click for dropdown+ </Button>+ </Dropdown>+ </div>+ )+}++export const Radio = (args: any) => {+ const [value, setValue] = useState('red')++ return (+ <div style={{ margin: '0 auto', minHeight: '420px', marginTop: '220px' }}>+ <Dropdown+ {...args}+ overlay={[+ <Dropdown.RadioGroup value={value} onChange={setValue}>+ <Dropdown.Radio value={'red'}>Red</Dropdown.Radio>+ <Dropdown.Radio value={'blue'}>Blue</Dropdown.Radio>+ <Dropdown.Radio value={'green'}>Green</Dropdown.Radio>+ </Dropdown.RadioGroup>,+ ]}+ >+ <Button as="span" type="outline" iconRight={<IconChevronDown />}>+ Click for dropdown+ </Button>+ </Dropdown>+ </div>+ )+}++export const Nested = (args: any) => {+ const [value, setValue] = useState('red')++ return (+ <div style={{ margin: '0 auto', minHeight: '420px', marginTop: '220px' }}>+ <Dropdown+ {...args}+ overlay={+ <>+ <Dropdown.RadioGroup value={value} onChange={setValue}>+ <Dropdown.Radio value={'red'}>Red</Dropdown.Radio>+ <Dropdown.Radio value={'blue'}>Blue</Dropdown.Radio>+ <Dropdown.Radio value={'green'}>Green</Dropdown.Radio>+ </Dropdown.RadioGroup>++ <Dropdown+ isNested+ overlay={[+ <Dropdown.RadioGroup value={value} onChange={setValue}>+ <Dropdown.Radio value={'red'}>Red</Dropdown.Radio>+ <Dropdown.Radio value={'blue'}>Blue</Dropdown.Radio>+ <Dropdown.Radio value={'green'}>Green</Dropdown.Radio>+ </Dropdown.RadioGroup>,+ ]}+ >+ <Dropdown.TriggerItem>Open sub menu</Dropdown.TriggerItem>+ </Dropdown>+ <Dropdown.Item>hello</Dropdown.Item>+ </>+ }+ >+ <Button as="span" type="outline" iconRight={<IconChevronDown />}>+ Click for dropdown+ </Button>+ </Dropdown>+ </div>+ )+}diff --git a/packages/ui/src/components/DropdownTest/Dropdown-test2.stories.tsx b/packages/ui/src/components/DropdownTest/Dropdown-test2.stories.tsxnew file mode 100644index 00000000000..09a352b7382--- /dev/null+++ b/packages/ui/src/components/DropdownTest/Dropdown-test2.stories.tsx@@ -0,0 +1,131 @@+import {+ Cloud,+ CreditCard,+ Github,+ Keyboard,+ LifeBuoy,+ LogOut,+ Mail,+ MessageSquare,+ Plus,+ PlusCircle,+ Settings,+ User,+ UserPlus,+ Users,+} from 'lucide-react'++import { Button } from './../Button'+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuGroup,+ DropdownMenuItem,+ DropdownMenuLabel,+ DropdownMenuPortal,+ DropdownMenuSeparator,+ DropdownMenuShortcut,+ DropdownMenuSub,+ DropdownMenuSubContent,+ DropdownMenuSubTrigger,+ DropdownMenuTrigger,+} from './Dropdown'++import { Dropdown } from '.'++export default {+ title: 'Navigation/DropdownTest',+ component: Dropdown,+}++export const DropdownMenuDemo = () => {+ return (+ <div>+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button type="outline">Open</Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent className="w-56">+ <DropdownMenuLabel>My Account</DropdownMenuLabel>+ <DropdownMenuSeparator />+ <DropdownMenuGroup>+ <DropdownMenuItem>+ <User className="mr-2 h-4 w-4" />+ <span>Profile</span>+ <DropdownMenuShortcut>⇧⌘P</DropdownMenuShortcut>+ </DropdownMenuItem>+ <DropdownMenuItem>+ <CreditCard className="mr-2 h-4 w-4" />+ <span>Billing</span>+ <DropdownMenuShortcut>⌘B</DropdownMenuShortcut>+ </DropdownMenuItem>+ <DropdownMenuItem>+ <Settings className="mr-2 h-4 w-4" />+ <span>Settings</span>+ <DropdownMenuShortcut>⌘S</DropdownMenuShortcut>+ </DropdownMenuItem>+ <DropdownMenuItem>+ <Keyboard className="mr-2 h-4 w-4" />+ <span>Keyboard shortcuts</span>+ <DropdownMenuShortcut>⌘K</DropdownMenuShortcut>+ </DropdownMenuItem>+ </DropdownMenuGroup>+ <DropdownMenuSeparator />+ <DropdownMenuGroup>+ <DropdownMenuItem>+ <Users className="mr-2 h-4 w-4" />+ <span>Team</span>+ </DropdownMenuItem>+ <DropdownMenuSub>+ <DropdownMenuSubTrigger>+ <UserPlus className="mr-2 h-4 w-4" />+ <span>Invite users</span>+ </DropdownMenuSubTrigger>+ <DropdownMenuPortal>+ <DropdownMenuSubContent>+ <DropdownMenuItem>+ <Mail className="mr-2 h-4 w-4" />+ <span>Email</span>+ </DropdownMenuItem>+ <DropdownMenuItem>+ <MessageSquare className="mr-2 h-4 w-4" />+ <span>Message</span>+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ <DropdownMenuItem>+ <PlusCircle className="mr-2 h-4 w-4" />+ <span>More...</span>+ </DropdownMenuItem>+ </DropdownMenuSubContent>+ </DropdownMenuPortal>+ </DropdownMenuSub>+ <DropdownMenuItem>+ <Plus className="mr-2 h-4 w-4" />+ <span>New Team</span>+ <DropdownMenuShortcut>⌘+T</DropdownMenuShortcut>+ </DropdownMenuItem>+ </DropdownMenuGroup>+ <DropdownMenuSeparator />+ <DropdownMenuItem>+ <Github className="mr-2 h-4 w-4" />+ <span>GitHub</span>+ </DropdownMenuItem>+ <DropdownMenuItem>+ <LifeBuoy className="mr-2 h-4 w-4" />+ <span>Support</span>+ </DropdownMenuItem>+ <DropdownMenuItem disabled>+ <Cloud className="mr-2 h-4 w-4" />+ <span>API</span>+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ <DropdownMenuItem>+ <LogOut className="mr-2 h-4 w-4" />+ <span>Log out</span>+ <DropdownMenuShortcut>⇧⌘Q</DropdownMenuShortcut>+ </DropdownMenuItem>+ </DropdownMenuContent>+ </DropdownMenu>+ </div>+ )+}diff --git a/packages/ui/src/components/DropdownTest/Dropdown.module.css b/packages/ui/src/components/DropdownTest/Dropdown.module.cssnew file mode 100644index 00000000000..751546ff202--- /dev/null+++ b/packages/ui/src/components/DropdownTest/Dropdown.module.css@@ -0,0 +1,112 @@+/* .sbui-dropdown-item {+ @apply text-xs;+ @apply text-typography-body-light dark:text-typography-body-dark;+ @apply px-4 py-1.5 flex items-center space-x-2;+ @apply cursor-pointer;+ @apply focus:bg-bg-secondary-light dark:focus:bg-bg-primary-dark border-none;+ cursor: 'default';++ user-select: none;+}++/* .sbui-dropdown-item svg {+ @apply text-typography-body-secondary-light dark:text-typography-body-secondary-dark;+} */++/* .sbui-dropdown-label {+ @apply text-typography-body-secondary-light dark:text-typography-body-secondary-dark;+ @apply px-4 py-1.5 flex items-center space-x-2;+ font-size: 0.65rem;+}++.sbui-dropdown-misc {+ @apply px-4 py-1.5;+}++.sbui-dropdown-item:focus-visible {+ border: none;+ outline: none;+}++.sbui-dropdown-input {+ @apply flex items-center space-x-0 pl-8 pr-4;+}++.sbui-dropdown-input__check {+ @apply absolute left-2;+ @apply flex items-center;+} */++/* .sbui-dropdown__content {+ @apply bg-bg-primary-light dark:bg-bg-secondary-dark p-0;+ @apply border border-lightmode dark:border-darkmode;+ @apply rounded;+ @apply shadow;+ border-style: solid;+ border-width: 1px;+} */++/* @keyframes fadeIn {+ from {+ transform: scale(0.95);+ opacity: 0;+ }+ to {+ transform: scale(1);+ opacity: 1;+ }+}++@keyframes fadeOut {+ from {+ transform: scale(1);+ opacity: 1;+ }+ to {+ transform: scale(0.95);+ opacity: 0;+ }+} */+/* .sbui-dropdown__content {+ transform-origin: 'var(--radix-dropdown-menu-content-transform-origin)';+} */++/* .sbui-dropdown__content[data-state='open'] {+ animation: fadeIn 50ms ease-out;+}++.sbui-dropdown__content[data-state='closed'] {+ animation: fadeOut 50ms ease-in;+} */++/* .sbui-dropdown__trigger {+ @apply border-none bg-transparent p-0 focus:ring-0;+} */++/* .sbui-dropdown__arrow {+ @apply fill-current text-bg-primary-light dark:text-bg-secondary-dark;+ @apply border-0 border-t;+ border-style: solid;++}++.sbui-dropdown-item-trigger {+ @apply text-xs;+ @apply text-typography-body-light dark:text-typography-body-dark;+ @apply px-4 py-1.5 flex items-center space-x-2;+ @apply cursor-pointer;+ cursor: 'default';+}++.sbui-dropdown-item-trigger svg {+ @apply text-typography-body-secondary-light dark:text-typography-body-secondary-dark;+}++.sbui-dropdown-item-trigger:focus-visible {+ border: none;+ outline: none;+} */++/* .sbui-dropdown__trigger-item[data-state='open'] {+ @apply bg-bg-secondary-light dark:bg-bg-primary-dark border-none;+} */diff --git a/packages/ui/src/components/DropdownTest/Dropdown.tsx b/packages/ui/src/components/DropdownTest/Dropdown.tsxnew file mode 100644index 00000000000..34103d1a039--- /dev/null+++ b/packages/ui/src/components/DropdownTest/Dropdown.tsx@@ -0,0 +1,183 @@+import * as React from 'react'+import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'+import { Check, ChevronRight, Circle } from 'lucide-react'++import { cn } from './../../utils/cn'++const DropdownMenu = DropdownMenuPrimitive.Root++const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger++const DropdownMenuGroup = DropdownMenuPrimitive.Group++const DropdownMenuPortal = DropdownMenuPrimitive.Portal++const DropdownMenuSub = DropdownMenuPrimitive.Sub++const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup++const DropdownMenuSubTrigger = React.forwardRef<+ React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {+ inset?: boolean+ }+>(({ className, inset, children, ...props }, ref) => (+ <DropdownMenuPrimitive.SubTrigger+ ref={ref}+ className={cn(+ 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent',+ inset && 'pl-8',+ className+ )}+ {...props}+ >+ {children}+ <ChevronRight className="ml-auto h-4 w-4" />+ </DropdownMenuPrimitive.SubTrigger>+))+DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName++const DropdownMenuSubContent = React.forwardRef<+ React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>+>(({ className, ...props }, ref) => (+ <DropdownMenuPrimitive.SubContent+ ref={ref}+ className={cn(+ 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1',+ className+ )}+ {...props}+ />+))+DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName++const DropdownMenuContent = React.forwardRef<+ React.ElementRef<typeof DropdownMenuPrimitive.Content>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>+>(({ className, sideOffset = 4, ...props }, ref) => (+ <DropdownMenuPrimitive.Portal>+ <DropdownMenuPrimitive.Content+ ref={ref}+ sideOffset={sideOffset}+ className={cn(+ 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in 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+ )}+ {...props}+ />+ </DropdownMenuPrimitive.Portal>+))+DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName++const DropdownMenuItem = React.forwardRef<+ React.ElementRef<typeof DropdownMenuPrimitive.Item>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {+ inset?: boolean+ }+>(({ className, inset, ...props }, ref) => (+ <DropdownMenuPrimitive.Item+ ref={ref}+ className={cn(+ 'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',+ inset && 'pl-8',+ className+ )}+ {...props}+ />+))+DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName++const DropdownMenuCheckboxItem = React.forwardRef<+ React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>+>(({ className, children, checked, ...props }, ref) => (+ <DropdownMenuPrimitive.CheckboxItem+ ref={ref}+ className={cn(+ 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',+ className+ )}+ checked={checked}+ {...props}+ >+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">+ <DropdownMenuPrimitive.ItemIndicator>+ <Check className="h-4 w-4" />+ </DropdownMenuPrimitive.ItemIndicator>+ </span>+ {children}+ </DropdownMenuPrimitive.CheckboxItem>+))+DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName++const DropdownMenuRadioItem = React.forwardRef<+ React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>+>(({ className, children, ...props }, ref) => (+ <DropdownMenuPrimitive.RadioItem+ ref={ref}+ className={cn(+ 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',+ className+ )}+ {...props}+ >+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">+ <DropdownMenuPrimitive.ItemIndicator>+ <Circle className="h-2 w-2 fill-current" />+ </DropdownMenuPrimitive.ItemIndicator>+ </span>+ {children}+ </DropdownMenuPrimitive.RadioItem>+))+DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName++const DropdownMenuLabel = React.forwardRef<+ React.ElementRef<typeof DropdownMenuPrimitive.Label>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {+ inset?: boolean+ }+>(({ className, inset, ...props }, ref) => (+ <DropdownMenuPrimitive.Label+ ref={ref}+ className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}+ {...props}+ />+))+DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName++const DropdownMenuSeparator = React.forwardRef<+ React.ElementRef<typeof DropdownMenuPrimitive.Separator>,+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>+>(({ className, ...props }, ref) => (+ <DropdownMenuPrimitive.Separator+ ref={ref}+ className={cn('-mx-1 my-1 h-px bg-muted', className)}+ {...props}+ />+))+DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName++const DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {+ return <span className={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...props} />+}+DropdownMenuShortcut.displayName = 'DropdownMenuShortcut'++export {+ DropdownMenu,+ DropdownMenuTrigger,+ DropdownMenuContent,+ DropdownMenuItem,+ DropdownMenuCheckboxItem,+ DropdownMenuRadioItem,+ DropdownMenuLabel,+ DropdownMenuSeparator,+ DropdownMenuShortcut,+ DropdownMenuGroup,+ DropdownMenuPortal,+ DropdownMenuSub,+ DropdownMenuSubContent,+ DropdownMenuSubTrigger,+ DropdownMenuRadioGroup,+}diff --git a/packages/ui/src/components/DropdownTest/index.tsx b/packages/ui/src/components/DropdownTest/index.tsxnew file mode 100644index 00000000000..a34974dee8c--- /dev/null+++ b/packages/ui/src/components/DropdownTest/index.tsx@@ -0,0 +1 @@+export { default as Dropdown } from './Dropdown'diff --git a/packages/ui/src/lib/theme/defaultTheme.ts b/packages/ui/src/lib/theme/defaultTheme.tsindex 4cdaeaca7f0..c9bbe58d602 100644--- a/packages/ui/src/lib/theme/defaultTheme.ts+++ b/packages/ui/src/lib/theme/defaultTheme.ts@@ -1181,7 +1181,6 @@ export default {// root:trigger: `flex-border-noneroundedbg-transparent p-0@@ -1201,8 +1200,8 @@ export default {`,content: `z-40- bg-scale-100 dark:bg-scale-300- border border-scale-300 dark:border-scale-500+ bg+ borderroundedshadow-lgpy-1.5@@ -1226,26 +1225,25 @@ export default {item: `grouprelative- text-xs- text-scale-1100+ text-sm+ text-body-lightpx-4 py-1.5 flex items-center space-x-2cursor-pointer- focus:bg-scale-300 dark:focus:bg-scale-500- focus:text-scale-1200+ focus:bg-selection+ focus:text-bodyborder-nonefocus:outline-none`,disabled: `opacity-50 cursor-default`,label: `- text-scale-900+ text-body-lighterpx-4 flex items-center space-x-2 py-1.5text-xs`,separator: `w-full- h-pxmy-2- bg-scale-300 dark:bg-scale-500+ border-t-[1px]`,misc: `px-4 py-1.5diff --git a/packages/ui/tailwind.config.js b/packages/ui/tailwind.config.jsindex 5a2b6529c7f..1dff83a81f0 100644--- a/packages/ui/tailwind.config.js+++ b/packages/ui/tailwind.config.js@@ -26,4 +26,4 @@ module.exports = config({},})-module.exports = require('config/tailwind.config')+// module.exports = require('config/tailwind.config')diff --git a/packages/ui/tokens/themes/root.json b/packages/ui/tokens/themes/root.jsonindex 64cf141f868..41d9b2c7c0f 100644--- a/packages/ui/tokens/themes/root.json+++ b/packages/ui/tokens/themes/root.json@@ -116,13 +116,13 @@}}},- "text": {- "DEFAULT": {+ "textColor": {+ "body-DEFAULT": {"value": "{theme-variables.text.body}","type": "color"},"body-light": {- "value": "{text.DEFAULT}",+ "value": "{textColor.body-DEFAULT}","type": "color","$extensions": {"studio.tokens": {@@ -136,7 +136,7 @@}},"body-lighter": {- "value": "{text.DEFAULT}",+ "value": "{textColor.body-DEFAULT}","type": "color","$extensions": {"studio.tokens": {@@ -150,7 +150,7 @@}},"body-lightest": {- "value": "{text.DEFAULT}",+ "value": "{textColor.body-DEFAULT}","type": "color","$extensions": {"studio.tokens": {@@ -162,7 +162,9 @@}}}- },+ }+ },+ "text": {"override-lighten-strength": {"value": "0","type": "other"