diff --git a/client/package-lock.json b/client/package-lock.json index 7fbe43ab..87557ecd 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -8,6 +8,7 @@ "name": "ecommerce", "version": "0.1.0", "dependencies": { + "@babel/runtime": "^7.28.2", "@emotion/react": "^11.9.3", "@emotion/styled": "^11.9.3", "@mui/icons-material": "^5.8.4", @@ -18,11 +19,13 @@ "@testing-library/user-event": "^13.5.0", "axios": "^0.27.2", "bootstrap": "^5.2.0", + "framer-motion": "^12.23.12", + "lucide-react": "^0.536.0", "motion": "^12.23.12", "rc-drawer": "^5.1.0", - "react": "^18.2.0", - "react-bootstrap": "^2.4.0", - "react-dom": "^18.2.0", + "react": "^18.3.1", + "react-bootstrap": "^2.10.10", + "react-dom": "^18.3.1", "react-icons": "^5.5.0", "react-loading": "^2.0.3", "react-router-dom": "^6.3.0", @@ -3399,49 +3402,56 @@ } }, "node_modules/@popperjs/core": { - "version": "2.11.5", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.5.tgz", - "integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw==", + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "license": "MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/popperjs" } }, "node_modules/@react-aria/ssr": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@react-aria/ssr/-/ssr-3.3.0.tgz", - "integrity": "sha512-yNqUDuOVZIUGP81R87BJVi/ZUZp/nYOBXbPsRe7oltJOfErQZD+UezMpw4vM2KRz18cURffvmC8tJ6JTeyDtaQ==", + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/@react-aria/ssr/-/ssr-3.9.10.tgz", + "integrity": "sha512-hvTm77Pf+pMBhuBm760Li0BVIO38jv1IBws1xFm1NoL26PU+fe+FMW5+VZWyANR6nYL65joaJKZqOdTQMkO9IQ==", + "license": "Apache-2.0", "dependencies": { - "@babel/runtime": "^7.6.2" + "@swc/helpers": "^0.5.0" + }, + "engines": { + "node": ">= 12" }, "peerDependencies": { - "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0" + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, "node_modules/@restart/hooks": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/@restart/hooks/-/hooks-0.4.7.tgz", - "integrity": "sha512-ZbjlEHcG+FQtpDPHd7i4FzNNvJf2enAwZfJbpM8CW7BhmOAbsHpZe3tsHwfQUrBuyrxWqPYp2x5UMnilWcY22A==", + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/@restart/hooks/-/hooks-0.4.16.tgz", + "integrity": "sha512-f7aCv7c+nU/3mF7NWLtVVr0Ra80RqsO89hO72r+Y/nvQr5+q0UFGkocElTH6MJApvReVh6JHUFYn2cw1WdHF3w==", + "license": "MIT", "dependencies": { - "dequal": "^2.0.2" + "dequal": "^2.0.3" }, "peerDependencies": { "react": ">=16.8.0" } }, "node_modules/@restart/ui": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@restart/ui/-/ui-1.3.1.tgz", - "integrity": "sha512-MYvMs2eeZTHu2dBJHOXKx72vxzEZeWbZx2z1QjeXq62iYjpjIyukBC2ZEy8x+sb9Gl0AiOiHkPXrl1wn95aOGQ==", + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/@restart/ui/-/ui-1.9.4.tgz", + "integrity": "sha512-N4C7haUc3vn4LTwVUPlkJN8Ach/+yIMvRuTVIhjilNHqegY60SGLrzud6errOMNJwSnmYFnt1J0H/k8FE3A4KA==", + "license": "MIT", "dependencies": { - "@babel/runtime": "^7.18.3", - "@popperjs/core": "^2.11.5", - "@react-aria/ssr": "^3.2.0", - "@restart/hooks": "^0.4.7", - "@types/warning": "^3.0.0", - "dequal": "^2.0.2", + "@babel/runtime": "^7.26.0", + "@popperjs/core": "^2.11.8", + "@react-aria/ssr": "^3.5.0", + "@restart/hooks": "^0.5.0", + "@types/warning": "^3.0.3", + "dequal": "^2.0.3", "dom-helpers": "^5.2.0", - "uncontrollable": "^7.2.1", + "uncontrollable": "^8.0.4", "warning": "^4.0.3" }, "peerDependencies": { @@ -3449,6 +3459,27 @@ "react-dom": ">=16.14.0" } }, + "node_modules/@restart/ui/node_modules/@restart/hooks": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@restart/hooks/-/hooks-0.5.1.tgz", + "integrity": "sha512-EMoH04NHS1pbn07iLTjIjgttuqb7qu4+/EyhAx27MHpoENcB2ZdSsLTNxmKD+WEPnZigo62Qc8zjGnNxoSE/5Q==", + "license": "MIT", + "dependencies": { + "dequal": "^2.0.3" + }, + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/@restart/ui/node_modules/uncontrollable": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/uncontrollable/-/uncontrollable-8.0.4.tgz", + "integrity": "sha512-ulRWYWHvscPFc0QQXvyJjY6LIXU56f0h8pQFvhxiKk5V1fcI8gp9Ht9leVAhrVjzqMw0BgjspBINx9r6oyJUvQ==", + "license": "MIT", + "peerDependencies": { + "react": ">=16.14.0" + } + }, "node_modules/@rollup/plugin-babel": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", @@ -3915,6 +3946,15 @@ "url": "https://github.com/sponsors/gregberge" } }, + "node_modules/@swc/helpers": { + "version": "0.5.17", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.17.tgz", + "integrity": "sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.8.0" + } + }, "node_modules/@testing-library/dom": { "version": "8.14.0", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.14.0.tgz", @@ -4372,9 +4412,10 @@ "integrity": "sha512-ymZk3LEC/fsut+/Q5qejp6R9O1rMxz3XaRHDV6kX8MrGAhOSPqVARbDi+EZvInBpw+BnCX3TD240byVkOfQsHg==" }, "node_modules/@types/prop-types": { - "version": "15.7.5", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", - "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" + "version": "15.7.15", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", + "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", + "license": "MIT" }, "node_modules/@types/q": { "version": "1.5.5", @@ -4418,10 +4459,11 @@ } }, "node_modules/@types/react-transition-group": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.5.tgz", - "integrity": "sha512-juKD/eiSM3/xZYzjuzH6ZwpP+/lejltmiS3QEzV/vmb/Q8+HfDmxu+Baga8UEMGBqV88Nbg4l2hY/K2DkyaLLA==", - "dependencies": { + "version": "4.4.12", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.12.tgz", + "integrity": "sha512-8TV6R3h2j7a91c+1DXdJi3Syo69zzIZbz7Lg5tORM5LEJG7X/E6a1V3drRyBRZq7/utz7A+c4OgYLiLcYGHG6w==", + "license": "MIT", + "peerDependencies": { "@types/react": "*" } }, @@ -4487,9 +4529,10 @@ "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==" }, "node_modules/@types/warning": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/warning/-/warning-3.0.0.tgz", - "integrity": "sha512-t/Tvs5qR47OLOr+4E9ckN8AmP2Tf16gWq+/qA4iUGS/OOyHVO8wv2vjJuX8SNOUTJyWb+2t7wJm6cXILFnOROA==" + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/warning/-/warning-3.0.3.tgz", + "integrity": "sha512-D1XC7WK8K+zZEveUPY+cf4+kgauk8N4eHr/XIHXGlGYkHLud6hK9lYfZk1ry1TNh798cZUCgb6MqGEG8DkJt6Q==", + "license": "MIT" }, "node_modules/@types/ws": { "version": "8.18.1", @@ -6095,9 +6138,10 @@ "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==" }, "node_modules/classnames": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", - "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==" + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==", + "license": "MIT" }, "node_modules/clean-css": { "version": "5.3.0", @@ -6988,9 +7032,10 @@ } }, "node_modules/dequal": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.2.tgz", - "integrity": "sha512-q9K8BlJVxK7hQYqa6XISGmBZbtQQWVXSrRrWreHC94rMt1QL/Impruc+7p2CYSYuVIUr+YCt6hjrs1kkdJRTug==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "license": "MIT", "engines": { "node": ">=6" } @@ -9797,6 +9842,7 @@ "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "license": "MIT", "dependencies": { "loose-envify": "^1.0.0" } @@ -12717,6 +12763,15 @@ "tslib": "^2.0.3" } }, + "node_modules/lucide-react": { + "version": "0.536.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.536.0.tgz", + "integrity": "sha512-2PgvNa9v+qz4Jt/ni8vPLt4jwoFybXHuubQT8fv4iCW5TjDxkbZjNZZHa485ad73NSEn/jdsEtU57eE1g+ma8A==", + "license": "ISC", + "peerDependencies": { + "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, "node_modules/lz-string": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", @@ -15151,9 +15206,10 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "node_modules/react": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "license": "MIT", "dependencies": { "loose-envify": "^1.1.0" }, @@ -15178,20 +15234,22 @@ } }, "node_modules/react-bootstrap": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/react-bootstrap/-/react-bootstrap-2.4.0.tgz", - "integrity": "sha512-dn599jNK1Fg5GGjJH+lQQDwELVzigh/MdusKpB/0el+sCjsO5MZDH5gRMmBjRhC+vb7VlCDr6OXffPIDSkNMLw==", + "version": "2.10.10", + "resolved": "https://registry.npmjs.org/react-bootstrap/-/react-bootstrap-2.10.10.tgz", + "integrity": "sha512-gMckKUqn8aK/vCnfwoBpBVFUGT9SVQxwsYrp9yDHt0arXMamxALerliKBxr1TPbntirK/HGrUAHYbAeQTa9GHQ==", + "license": "MIT", "dependencies": { - "@babel/runtime": "^7.17.2", - "@restart/hooks": "^0.4.6", - "@restart/ui": "^1.2.0", - "@types/react-transition-group": "^4.4.4", - "classnames": "^2.3.1", + "@babel/runtime": "^7.24.7", + "@restart/hooks": "^0.4.9", + "@restart/ui": "^1.9.4", + "@types/prop-types": "^15.7.12", + "@types/react-transition-group": "^4.4.6", + "classnames": "^2.3.2", "dom-helpers": "^5.2.1", "invariant": "^2.2.4", "prop-types": "^15.8.1", "prop-types-extra": "^1.1.0", - "react-transition-group": "^4.4.2", + "react-transition-group": "^4.4.5", "uncontrollable": "^7.2.1", "warning": "^4.0.3" }, @@ -15314,15 +15372,16 @@ } }, "node_modules/react-dom": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", - "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "license": "MIT", "dependencies": { "loose-envify": "^1.1.0", - "scheduler": "^0.23.0" + "scheduler": "^0.23.2" }, "peerDependencies": { - "react": "^18.2.0" + "react": "^18.3.1" } }, "node_modules/react-error-overlay": { @@ -15347,7 +15406,8 @@ "node_modules/react-lifecycles-compat": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", - "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==", + "license": "MIT" }, "node_modules/react-loading": { "version": "2.0.3", @@ -15497,9 +15557,10 @@ } }, "node_modules/react-transition-group": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.2.tgz", - "integrity": "sha512-/RNYfRAMlZwDSr6z4zNKV6xu53/e2BuaBbGhbyYIXTrmgu/bGHzmqOs7mJSJBHy9Ud+ApHx3QjrkKSp1pxvlFg==", + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "license": "BSD-3-Clause", "dependencies": { "@babel/runtime": "^7.5.5", "dom-helpers": "^5.0.1", @@ -16007,9 +16068,10 @@ } }, "node_modules/scheduler": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", - "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "license": "MIT", "dependencies": { "loose-envify": "^1.1.0" } @@ -17187,9 +17249,10 @@ } }, "node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" }, "node_modules/tsutils": { "version": "3.21.0", @@ -17292,6 +17355,7 @@ "version": "7.2.1", "resolved": "https://registry.npmjs.org/uncontrollable/-/uncontrollable-7.2.1.tgz", "integrity": "sha512-svtcfoTADIB0nT9nltgjujTi7BzVmwjZClOmskKu/E8FW9BXzg9os8OLr4f8Dlnk0rYWJIWr4wv9eKUXiQvQwQ==", + "license": "MIT", "dependencies": { "@babel/runtime": "^7.6.3", "@types/react": ">=16.9.11", @@ -20697,40 +20761,56 @@ } }, "@popperjs/core": { - "version": "2.11.5", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.5.tgz", - "integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw==" + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==" }, "@react-aria/ssr": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@react-aria/ssr/-/ssr-3.3.0.tgz", - "integrity": "sha512-yNqUDuOVZIUGP81R87BJVi/ZUZp/nYOBXbPsRe7oltJOfErQZD+UezMpw4vM2KRz18cURffvmC8tJ6JTeyDtaQ==", + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/@react-aria/ssr/-/ssr-3.9.10.tgz", + "integrity": "sha512-hvTm77Pf+pMBhuBm760Li0BVIO38jv1IBws1xFm1NoL26PU+fe+FMW5+VZWyANR6nYL65joaJKZqOdTQMkO9IQ==", "requires": { - "@babel/runtime": "^7.6.2" + "@swc/helpers": "^0.5.0" } }, "@restart/hooks": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/@restart/hooks/-/hooks-0.4.7.tgz", - "integrity": "sha512-ZbjlEHcG+FQtpDPHd7i4FzNNvJf2enAwZfJbpM8CW7BhmOAbsHpZe3tsHwfQUrBuyrxWqPYp2x5UMnilWcY22A==", + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/@restart/hooks/-/hooks-0.4.16.tgz", + "integrity": "sha512-f7aCv7c+nU/3mF7NWLtVVr0Ra80RqsO89hO72r+Y/nvQr5+q0UFGkocElTH6MJApvReVh6JHUFYn2cw1WdHF3w==", "requires": { - "dequal": "^2.0.2" + "dequal": "^2.0.3" } }, "@restart/ui": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@restart/ui/-/ui-1.3.1.tgz", - "integrity": "sha512-MYvMs2eeZTHu2dBJHOXKx72vxzEZeWbZx2z1QjeXq62iYjpjIyukBC2ZEy8x+sb9Gl0AiOiHkPXrl1wn95aOGQ==", - "requires": { - "@babel/runtime": "^7.18.3", - "@popperjs/core": "^2.11.5", - "@react-aria/ssr": "^3.2.0", - "@restart/hooks": "^0.4.7", - "@types/warning": "^3.0.0", - "dequal": "^2.0.2", + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/@restart/ui/-/ui-1.9.4.tgz", + "integrity": "sha512-N4C7haUc3vn4LTwVUPlkJN8Ach/+yIMvRuTVIhjilNHqegY60SGLrzud6errOMNJwSnmYFnt1J0H/k8FE3A4KA==", + "requires": { + "@babel/runtime": "^7.26.0", + "@popperjs/core": "^2.11.8", + "@react-aria/ssr": "^3.5.0", + "@restart/hooks": "^0.5.0", + "@types/warning": "^3.0.3", + "dequal": "^2.0.3", "dom-helpers": "^5.2.0", - "uncontrollable": "^7.2.1", + "uncontrollable": "^8.0.4", "warning": "^4.0.3" + }, + "dependencies": { + "@restart/hooks": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@restart/hooks/-/hooks-0.5.1.tgz", + "integrity": "sha512-EMoH04NHS1pbn07iLTjIjgttuqb7qu4+/EyhAx27MHpoENcB2ZdSsLTNxmKD+WEPnZigo62Qc8zjGnNxoSE/5Q==", + "requires": { + "dequal": "^2.0.3" + } + }, + "uncontrollable": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/uncontrollable/-/uncontrollable-8.0.4.tgz", + "integrity": "sha512-ulRWYWHvscPFc0QQXvyJjY6LIXU56f0h8pQFvhxiKk5V1fcI8gp9Ht9leVAhrVjzqMw0BgjspBINx9r6oyJUvQ==", + "requires": {} + } } }, "@rollup/plugin-babel": { @@ -21049,6 +21129,14 @@ "loader-utils": "^2.0.0" } }, + "@swc/helpers": { + "version": "0.5.17", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.17.tgz", + "integrity": "sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A==", + "requires": { + "tslib": "^2.8.0" + } + }, "@testing-library/dom": { "version": "8.14.0", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.14.0.tgz", @@ -21431,9 +21519,9 @@ "integrity": "sha512-ymZk3LEC/fsut+/Q5qejp6R9O1rMxz3XaRHDV6kX8MrGAhOSPqVARbDi+EZvInBpw+BnCX3TD240byVkOfQsHg==" }, "@types/prop-types": { - "version": "15.7.5", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", - "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" + "version": "15.7.15", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", + "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==" }, "@types/q": { "version": "1.5.5", @@ -21477,12 +21565,10 @@ } }, "@types/react-transition-group": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.5.tgz", - "integrity": "sha512-juKD/eiSM3/xZYzjuzH6ZwpP+/lejltmiS3QEzV/vmb/Q8+HfDmxu+Baga8UEMGBqV88Nbg4l2hY/K2DkyaLLA==", - "requires": { - "@types/react": "*" - } + "version": "4.4.12", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.12.tgz", + "integrity": "sha512-8TV6R3h2j7a91c+1DXdJi3Syo69zzIZbz7Lg5tORM5LEJG7X/E6a1V3drRyBRZq7/utz7A+c4OgYLiLcYGHG6w==", + "requires": {} }, "@types/resolve": { "version": "1.17.1", @@ -21546,9 +21632,9 @@ "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==" }, "@types/warning": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/warning/-/warning-3.0.0.tgz", - "integrity": "sha512-t/Tvs5qR47OLOr+4E9ckN8AmP2Tf16gWq+/qA4iUGS/OOyHVO8wv2vjJuX8SNOUTJyWb+2t7wJm6cXILFnOROA==" + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/warning/-/warning-3.0.3.tgz", + "integrity": "sha512-D1XC7WK8K+zZEveUPY+cf4+kgauk8N4eHr/XIHXGlGYkHLud6hK9lYfZk1ry1TNh798cZUCgb6MqGEG8DkJt6Q==" }, "@types/ws": { "version": "8.18.1", @@ -22680,9 +22766,9 @@ "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==" }, "classnames": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", - "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==" + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==" }, "clean-css": { "version": "5.3.0", @@ -23297,9 +23383,9 @@ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" }, "dequal": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.2.tgz", - "integrity": "sha512-q9K8BlJVxK7hQYqa6XISGmBZbtQQWVXSrRrWreHC94rMt1QL/Impruc+7p2CYSYuVIUr+YCt6hjrs1kkdJRTug==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==" }, "destroy": { "version": "1.2.0", @@ -27398,6 +27484,12 @@ "tslib": "^2.0.3" } }, + "lucide-react": { + "version": "0.536.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.536.0.tgz", + "integrity": "sha512-2PgvNa9v+qz4Jt/ni8vPLt4jwoFybXHuubQT8fv4iCW5TjDxkbZjNZZHa485ad73NSEn/jdsEtU57eE1g+ma8A==", + "requires": {} + }, "lz-string": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", @@ -28954,9 +29046,9 @@ } }, "react": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "requires": { "loose-envify": "^1.1.0" } @@ -28975,20 +29067,21 @@ } }, "react-bootstrap": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/react-bootstrap/-/react-bootstrap-2.4.0.tgz", - "integrity": "sha512-dn599jNK1Fg5GGjJH+lQQDwELVzigh/MdusKpB/0el+sCjsO5MZDH5gRMmBjRhC+vb7VlCDr6OXffPIDSkNMLw==", - "requires": { - "@babel/runtime": "^7.17.2", - "@restart/hooks": "^0.4.6", - "@restart/ui": "^1.2.0", - "@types/react-transition-group": "^4.4.4", - "classnames": "^2.3.1", + "version": "2.10.10", + "resolved": "https://registry.npmjs.org/react-bootstrap/-/react-bootstrap-2.10.10.tgz", + "integrity": "sha512-gMckKUqn8aK/vCnfwoBpBVFUGT9SVQxwsYrp9yDHt0arXMamxALerliKBxr1TPbntirK/HGrUAHYbAeQTa9GHQ==", + "requires": { + "@babel/runtime": "^7.24.7", + "@restart/hooks": "^0.4.9", + "@restart/ui": "^1.9.4", + "@types/prop-types": "^15.7.12", + "@types/react-transition-group": "^4.4.6", + "classnames": "^2.3.2", "dom-helpers": "^5.2.1", "invariant": "^2.2.4", "prop-types": "^15.8.1", "prop-types-extra": "^1.1.0", - "react-transition-group": "^4.4.2", + "react-transition-group": "^4.4.5", "uncontrollable": "^7.2.1", "warning": "^4.0.3" } @@ -29075,12 +29168,12 @@ } }, "react-dom": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", - "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "requires": { "loose-envify": "^1.1.0", - "scheduler": "^0.23.0" + "scheduler": "^0.23.2" } }, "react-error-overlay": { @@ -29210,9 +29303,9 @@ } }, "react-transition-group": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.2.tgz", - "integrity": "sha512-/RNYfRAMlZwDSr6z4zNKV6xu53/e2BuaBbGhbyYIXTrmgu/bGHzmqOs7mJSJBHy9Ud+ApHx3QjrkKSp1pxvlFg==", + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", "requires": { "@babel/runtime": "^7.5.5", "dom-helpers": "^5.0.1", @@ -29558,9 +29651,9 @@ } }, "scheduler": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", - "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", "requires": { "loose-envify": "^1.1.0" } @@ -30438,9 +30531,9 @@ } }, "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" }, "tsutils": { "version": "3.21.0", diff --git a/client/package.json b/client/package.json index 22219eb3..0210479f 100644 --- a/client/package.json +++ b/client/package.json @@ -3,6 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { + "@babel/runtime": "^7.28.2", "@emotion/react": "^11.9.3", "@emotion/styled": "^11.9.3", "@mui/icons-material": "^5.8.4", @@ -13,11 +14,13 @@ "@testing-library/user-event": "^13.5.0", "axios": "^0.27.2", "bootstrap": "^5.2.0", + "framer-motion": "^12.23.12", + "lucide-react": "^0.536.0", "motion": "^12.23.12", "rc-drawer": "^5.1.0", - "react": "^18.2.0", - "react-bootstrap": "^2.4.0", - "react-dom": "^18.2.0", + "react": "^18.3.1", + "react-bootstrap": "^2.10.10", + "react-dom": "^18.3.1", "react-icons": "^5.5.0", "react-loading": "^2.0.3", "react-router-dom": "^6.3.0", diff --git a/client/public/default-profile.png b/client/public/default-profile.png new file mode 100644 index 00000000..d923cd58 Binary files /dev/null and b/client/public/default-profile.png differ diff --git a/client/src/components/Account/Account.css b/client/src/components/Account/Account.css index e49ffa69..6dd073f7 100644 --- a/client/src/components/Account/Account.css +++ b/client/src/components/Account/Account.css @@ -1,46 +1,48 @@ - .user__account__container { - height: auto; - min-height: 100vh; - width: 100%; - display: flex; - flex-direction: column; - align-items: center; - background-color: var(--bg-primary); -} - -/* Dark mode: black background for account */ -.dark-mode .user__account__container { - background-color: #000000; + display: flex; + justify-content: center; + padding: 3rem 1rem; + background: #f8f9fa; + margin-top: 150px; } .account__container { - height: 100%; - width: 100%; - padding: 5%; + width: 100%; + max-width: 900px; + background: #fff; + border-radius: 12px; + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); + padding: 2rem; + display: flex; + flex-direction: column; + gap: 2rem; } -.account__header { - width: 90%; - height: 80px; - font-size: 2rem; - font-weight: bolder; +.account__header h1 { + font-size: 2rem; + font-weight: bold; + text-align: center; + color: #333; } -.account__header h1{ - width: 100%; - height: auto; - font-size: 2.5rem; - font-weight: bolder; - color: var(--text-primary); +/* Responsive */ +@media (max-width: 768px) { + .account__container { + padding: 1.5rem; + gap: 1.5rem; + } + + .account__header h1 { + font-size: 1.6rem; + } } -.account__page__detail { - height: auto; - width: 90%; - display: flex; - flex-direction: row; - justify-content: space-between; - flex-wrap: wrap-reverse; - align-items: flex-start; -} \ No newline at end of file +@media (max-width: 480px) { + .account__container { + padding: 1rem; + } + + .account__header h1 { + font-size: 1.4rem; + } +} diff --git a/client/src/components/Account/Account.js b/client/src/components/Account/Account.js index 6c60e802..6cdc604e 100644 --- a/client/src/components/Account/Account.js +++ b/client/src/components/Account/Account.js @@ -1,6 +1,6 @@ import './Account.css'; -const Account = (props) => { +const Account = ({ children }) => { return (
@@ -8,11 +8,11 @@ const Account = (props) => {

My account

- {props.children} + {children}
); } - -export default Account; \ No newline at end of file + +export default Account; diff --git a/client/src/components/Account/ManageAccount/ManageAccount.css b/client/src/components/Account/ManageAccount/ManageAccount.css index 8b7946d7..fe83762a 100644 --- a/client/src/components/Account/ManageAccount/ManageAccount.css +++ b/client/src/components/Account/ManageAccount/ManageAccount.css @@ -1,124 +1,142 @@ +.manage-account-container { + max-width: 600px; + margin: 2rem auto; + padding: 2rem; + background: #fff; + border-radius: 12px; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); + font-family: 'Segoe UI', sans-serif; + margin-top: 200px; +} -.manage__account__container { - height: auto; - width: 100%; - display: flex; - flex-direction: column; - justify-content: flex-start; - align-items: flex-start; - margin-top: 20px; +.manage-account-header { + text-align: center; + font-size: 1.8rem; + margin-bottom: 2rem; + color: #222; } +/* Profile Photo Section */ +.profile-photo-section { + display: flex; + flex-direction: column; + align-items: center; + gap: 1rem; + margin-bottom: 2rem; +} -.edit__account__container { - width: 100%; - height: 300px; +.profile-photo-preview { + width: 120px; + height: 120px; + object-fit: cover; + border-radius: 50%; + border: 2px solid #ddd; } -.edit__account { - width: 250px; - height: 100%; +.custom-upload-button { + display: flex; + align-items: center; + background-color: #007bff; + color: #fff; + padding: 0.6rem 1rem; + border-radius: 6px; + font-size: 0.9rem; + cursor: pointer; + transition: background-color 0.2s ease; } -.edit__account__header { - width:100%; - height: 20%; - font-size: 1.7rem; - font-weight: bolder; +.custom-upload-button:hover { + background-color: #0056b3; } -.edit__account__form__container { - width:100%; - height: 80%; +/* Form Section */ +.account-form { + display: flex; + flex-direction: column; + gap: 1.2rem; } -.edit__account__form { - width:100%; - height: 100%; +.form-group { + display: flex; + flex-direction: column; } -.edit__input__container { - height:35%; - width: 100%; +.form-label { + margin-bottom: 0.3rem; + font-weight: 500; + color: #333; } -.edit__account__input { - height: 50%; - width: 100%; +.form-input { + padding: 0.7rem 1rem; + border: 1px solid #ccc; + border-radius: 6px; + font-size: 1rem; + transition: border-color 0.2s ease; } -.save__changes__button__container { - height: 30%; - width: 100%; - display: flex; - justify-content: flex-start; - align-items: center; +.form-input::placeholder { + color: #aaa; + font-style: italic; + text-align: start; } -.save__changes__button { - height: 60%; - width: 50%; - font-size: 1rem; - background-color: #FFE26E; - border-color: #FFE26E; - border-style: dashed; - font-weight:bold; +.form-input:focus { + border-color: #007bff; + outline: none; } -.separator__line { - margin-top: 20px; - height: 5px; - width: 50%; - background-color: #FFE26E; +/* Buttons */ +.actions { + display: flex; + justify-content: space-between; + margin-top: 2rem; + flex-wrap: wrap; + gap: 1rem; } -/* Delete account form */ +.save-btn, +.delete-btn { + flex: 1; + min-width: 140px; + padding: 0.7rem 1rem; + font-size: 1rem; + border-radius: 6px; + cursor: pointer; + border: none; + transition: background-color 0.2s ease; +} -.delete_account__container { - width: 250px; - height: 200px; - display: flex; - justify-content: flex-start; - align-items: center; +.save-btn { + background-color: #28a745; + color: #fff; } -.delete__account { - height: 100%; - width: 100%; - display: flex; - justify-content: flex-start; - align-self: flex-start; - flex-direction: column; +.save-btn:hover { + background-color: #218838; } -.delete__account__header { - width: 100%; - height: 30%; - display: flex; - justify-content: flex-start; - align-items: center; - font-size: 1.7rem; - font-weight: bolder; +.delete-btn { + background-color: #dc3545; + color: #fff; } -.delete__account__prompt { - height: 35%; - width: 100%; +.delete-btn:hover { + background-color: #c82333; } -.delete__account__button__container { - height: 35%; +/* Responsive */ +@media (max-width: 500px) { + .manage-account-container { + padding: 1.5rem 1rem; + } + + .actions { + flex-direction: column; + } + + .save-btn, + .delete-btn { width: 100%; - display: flex; - justify-content: flex-start; -} - -.delete__account__button { - height: 45px; - width: 160px; - font-size: 1rem; - background-color: #ff6e6e; - border-color: #ff6e6e; - border-style: dashed; - font-weight:bold; -} \ No newline at end of file + } +} diff --git a/client/src/components/Account/ManageAccount/ManageAccount.js b/client/src/components/Account/ManageAccount/ManageAccount.js index f11aef99..bb73332f 100644 --- a/client/src/components/Account/ManageAccount/ManageAccount.js +++ b/client/src/components/Account/ManageAccount/ManageAccount.js @@ -1,45 +1,79 @@ +import { useState } from 'react'; import Account from '../Account'; -import './ManageAccount.css' +import './ManageAccount.css'; +import { Upload } from 'lucide-react'; const ManageAccount = () => { - return ( - -
-
-
-
Edit account
-
-
-
- - -
-
- - -
-
- -
-
-
-
-
-
-
-
-
- Delete account -
-
Do you want to cancel subscription?
-
- -
-
-
-
-
- ); -} - -export default ManageAccount; \ No newline at end of file + const [profilePic, setProfilePic] = useState(null); + const [preview, setPreview] = useState(null); + + const handleImageChange = (e) => { + const file = e.target.files[0]; + setProfilePic(file); + + if (file) { + const reader = new FileReader(); + reader.onloadend = () => { + setPreview(reader.result); + }; + reader.readAsDataURL(file); + } + }; + + return ( + +
+

Manage Your Account

+ +
+ Profile + + + +
+ +
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+ +
+ + +
+
+ + ); +}; + +export default ManageAccount; diff --git a/client/src/components/Account/MyAccount/MyAccount.css b/client/src/components/Account/MyAccount/MyAccount.css index 444b0a37..38ada7ae 100644 --- a/client/src/components/Account/MyAccount/MyAccount.css +++ b/client/src/components/Account/MyAccount/MyAccount.css @@ -1,62 +1,149 @@ +/* Container */ +.account-container { + max-width: 1100px; + margin: 220px auto 2rem; + padding: 1rem; + display: flex; + flex-direction: column; + gap: 2rem; + font-family: 'Segoe UI', sans-serif; +} -.order__history__container { - height: 200px; - width: 70%; - display: flex; - flex-direction: column; - justify-content: flex-start; - align-self: flex-start; +/* Profile Card */ +.profile-card { + display: flex; + flex-wrap: wrap; + background: #fff; + border-radius: 12px; + box-shadow: 0 0 15px rgba(0, 0, 0, 0.05); + padding: 2rem; + gap: 2rem; + align-items: center; + transition: transform 0.3s ease, box-shadow 0.3s ease; } -.order__history { - height: auto; - width: 100%; - display: flex; - flex-direction: column; +.profile-card:hover { + transform: scale(1.03); + box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15); +} + +/* Profile Image Section */ +.profile-left { + display: flex; + flex-direction: column; + align-items: center; + gap: 1rem; + flex: 1; +} + +.profile-photo-preview { + width: 150px; + height: 150px; + border-radius: 50%; + object-fit: cover; + border: 3px solid #f0f0f0; } -.order__history__header { - width: 100%; - height: 50px; - font-size: 1.7rem; - font-weight: bolder; +.custom-upload-button { + padding: 0.5rem 1rem; + background-color: #007bff; + color: white; + border-radius: 6px; + cursor: pointer; + font-weight: 500; + display: inline-flex; + align-items: center; + transition: background-color 0.3s ease; } -.order__history__detail { - width: 100%; - height: 50px; +.custom-upload-button:hover { + background-color: #0056b3; } -.account__details__container { - width: 30%; - height: 200px; +/* Profile Info */ +.profile-right { + flex: 2; + display: flex; + flex-direction: column; + gap: 1rem; } -.account__details__header { - width: 100%; - height: 50px; - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; +.profile-right h2 { + margin: 0; + font-size: 1.8rem; } -@media (max-width: 780px) { - .account__details__header { - flex-direction: column; - height: auto; - align-items: flex-start; - } +.profile-right p { + color: #666; } -.details__header { - width: 80%; - height: auto; - font-size: 1.7rem; - font-weight: bolder; +.profile-buttons { + display: flex; + flex-wrap: wrap; + gap: 1rem; } -.logout__action { - width: 20%; - height: auto; -} \ No newline at end of file +.btn { + padding: 0.6rem 1.2rem; + border-radius: 6px; + font-weight: 500; + position: relative !important; + top: 0 !important; + cursor: pointer; + text-decoration: none; + min-width: 180px; + text-align: center; +} + +.edit-btn { + background-color: #28a745 !important; + color: white !important; +} + +.edit-btn:hover { + background-color: #1e7e34; + color: white !important; +} + +.logout-btn { + background-color: #dc3545 !important; + color: white !important; +} + +.logout-btn:hover { + background-color: #b82735 !important; + color: white !important; +} + +/* Orders Card */ +.orders-card { + background: #fff; + border-radius: 12px; + padding: 2rem; + box-shadow: 0 0 15px rgba(0, 0, 0, 0.05); + transition: transform 0.3s ease, box-shadow 0.3s ease; +} + +.orders-card:hover { + transform: scale(1.03); + box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15); +} + +.orders-card h3 { + margin-bottom: 1rem; +} + +.no-orders { + color: #888; +} + +/* Responsive */ +@media (max-width: 768px) { + .profile-card { + flex-direction: column; + text-align: center; + } + .profile-buttons { + justify-content: center; + } +} diff --git a/client/src/components/Account/MyAccount/MyAccount.js b/client/src/components/Account/MyAccount/MyAccount.js index cb7a985b..2e0cafe9 100644 --- a/client/src/components/Account/MyAccount/MyAccount.js +++ b/client/src/components/Account/MyAccount/MyAccount.js @@ -1,31 +1,65 @@ -import Account from '../Account'; +import { useState } from 'react'; +import { Link } from 'react-router-dom'; import './MyAccount.css'; -import { Link } from 'react-router-dom' +import { Upload } from 'lucide-react'; const MyAccount = () => { - return ( - -
-
-
Order History
-
You have not place any orders yet
-
-
-
-
-
Account Details
-
Logout
-
-
-
Account holder name
-
Account holder email
-
- Manage account -
-
-
-
- ); -} - -export default MyAccount; \ No newline at end of file + const [profileImage, setProfileImage] = useState(null); + const [preview, setPreview] = useState(null); + + const handleImageChange = (e) => { + const file = e.target.files[0]; + if (file) { + setProfileImage(file); + setPreview(URL.createObjectURL(file)); + } + }; + + const handleImageUpload = () => { + alert('Profile image uploaded!'); + }; + + return ( +
+
+
+
+ Profile + + + +
+
+ +
+

Diksha Singh

+

diksha@example.com

+
+ Manage Account + Logout +
+
+
+ +
+

Order History

+
You have not placed any orders yet.
+
+
+ ); +}; + +export default MyAccount;