diff --git a/package-lock.json b/package-lock.json index 5fab82d..3e67664 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,7 @@ "@types/react-syntax-highlighter": "^15.5.13", "eslint": "^9", "eslint-config-next": "15.2.3", - "sass": "^1.86.0", + "sass": "^1.32.13", "typescript": "^5" } }, @@ -843,330 +843,6 @@ "node": ">=12.4.0" } }, - "node_modules/@parcel/watcher": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz", - "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "dependencies": { - "detect-libc": "^1.0.3", - "is-glob": "^4.0.3", - "micromatch": "^4.0.5", - "node-addon-api": "^7.0.0" - }, - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "@parcel/watcher-android-arm64": "2.5.1", - "@parcel/watcher-darwin-arm64": "2.5.1", - "@parcel/watcher-darwin-x64": "2.5.1", - "@parcel/watcher-freebsd-x64": "2.5.1", - "@parcel/watcher-linux-arm-glibc": "2.5.1", - "@parcel/watcher-linux-arm-musl": "2.5.1", - "@parcel/watcher-linux-arm64-glibc": "2.5.1", - "@parcel/watcher-linux-arm64-musl": "2.5.1", - "@parcel/watcher-linux-x64-glibc": "2.5.1", - "@parcel/watcher-linux-x64-musl": "2.5.1", - "@parcel/watcher-win32-arm64": "2.5.1", - "@parcel/watcher-win32-ia32": "2.5.1", - "@parcel/watcher-win32-x64": "2.5.1" - } - }, - "node_modules/@parcel/watcher-android-arm64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz", - "integrity": "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-darwin-arm64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.1.tgz", - "integrity": "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-darwin-x64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.1.tgz", - "integrity": "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-freebsd-x64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.1.tgz", - "integrity": "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm-glibc": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.1.tgz", - "integrity": "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm-musl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.1.tgz", - "integrity": "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm64-glibc": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.1.tgz", - "integrity": "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm64-musl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.1.tgz", - "integrity": "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-x64-glibc": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz", - "integrity": "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-x64-musl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz", - "integrity": "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-arm64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.1.tgz", - "integrity": "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-ia32": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.1.tgz", - "integrity": "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-x64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz", - "integrity": "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher/node_modules/detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", - "dev": true, - "license": "Apache-2.0", - "optional": true, - "bin": { - "detect-libc": "bin/detect-libc.js" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/@popperjs/core": { "version": "2.11.8", "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", @@ -1752,6 +1428,20 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "devOptional": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -1987,6 +1677,19 @@ "dev": true, "license": "MIT" }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/bootstrap": { "version": "5.3.3", "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.3.tgz", @@ -2037,7 +1740,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "fill-range": "^7.1.1" @@ -2185,19 +1888,41 @@ } }, "node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "devOptional": true, "license": "MIT", "dependencies": { - "readdirp": "^4.0.1" + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" }, "engines": { - "node": ">= 14.16.0" + "node": ">= 8.10.0" }, "funding": { "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "devOptional": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" } }, "node_modules/client-only": { @@ -3161,7 +2886,7 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" @@ -3232,6 +2957,21 @@ "node": ">=0.4.x" } }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -3552,13 +3292,6 @@ "node": ">= 4" } }, - "node_modules/immutable": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.0.3.tgz", - "integrity": "sha512-P8IdPQHq3lA1xVeBRi5VPqUm5HDgKnx0Ru51wZz5mjxHr5n3RWhjIpOFU7ybkUxfB+5IToy+OLaHYDBIWsv+uw==", - "devOptional": true, - "license": "MIT" - }, "node_modules/import-fresh": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", @@ -3686,6 +3419,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/is-boolean-object": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", @@ -3791,7 +3537,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -3836,7 +3582,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" @@ -3872,7 +3618,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=0.12.0" @@ -4379,13 +4125,15 @@ } } }, - "node_modules/node-addon-api": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", - "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", - "dev": true, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "devOptional": true, "license": "MIT", - "optional": true + "engines": { + "node": ">=0.10.0" + } }, "node_modules/object-assign": { "version": "4.1.1", @@ -4646,7 +4394,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=8.6" @@ -4814,17 +4562,16 @@ } }, "node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "devOptional": true, "license": "MIT", - "engines": { - "node": ">= 14.18.0" + "dependencies": { + "picomatch": "^2.2.1" }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" + "engines": { + "node": ">=8.10.0" } }, "node_modules/reflect.getprototypeof": { @@ -5056,24 +4803,19 @@ } }, "node_modules/sass": { - "version": "1.86.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.86.0.tgz", - "integrity": "sha512-zV8vGUld/+mP4KbMLJMX7TyGCuUp7hnkOScgCMsWuHtns8CWBoz+vmEhoGMXsaJrbUP8gj+F1dLvVe79sK8UdA==", + "version": "1.32.13", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.32.13.tgz", + "integrity": "sha512-dEgI9nShraqP7cXQH+lEXVf73WOPCse0QlFzSD8k+1TcOxCMwVXfQlr0jtoluZysQOyJGnfr21dLvYKDJq8HkA==", "devOptional": true, "license": "MIT", "dependencies": { - "chokidar": "^4.0.0", - "immutable": "^5.0.2", - "source-map-js": ">=0.6.2 <2.0.0" + "chokidar": ">=3.0.0 <4.0.0" }, "bin": { "sass": "sass.js" }, "engines": { - "node": ">=14.0.0" - }, - "optionalDependencies": { - "@parcel/watcher": "^2.4.1" + "node": ">=8.9.0" } }, "node_modules/scheduler": { @@ -5561,7 +5303,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "is-number": "^7.0.0" diff --git a/package.json b/package.json index 12342e5..967901e 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@types/react-syntax-highlighter": "^15.5.13", "eslint": "^9", "eslint-config-next": "15.2.3", - "sass": "^1.86.0", + "sass": "^1.32.13", "typescript": "^5" } } diff --git a/src/app/(components)/input/page.tsx b/src/app/(components)/input/page.tsx index f15c3f7..3d16e21 100644 --- a/src/app/(components)/input/page.tsx +++ b/src/app/(components)/input/page.tsx @@ -1,93 +1,97 @@ -"use client"; +'use client'; -import IndiceContenido from "@/components/content-index"; -import Input from "@/components/input"; -import VistaComponente from "@/components/vista-componente"; -import { inputBasicExample, inputPasswordExample, inputStylesExample } from "@/snippets/input/input-examples"; -import { useState } from "react"; +import IndiceContenido from '@/components/content-index'; +import Input from '@/components/input'; +import PasswordInput from '@/components/password'; +import VistaComponente from '@/components/vista-componente'; +import { + inputBasicExample, + inputPasswordExample, + inputStylesExample, +} from '@/snippets/input/input-examples'; +import { useState } from 'react'; export default function Page() { - const [value, setValue] = useState(""); - const [password, setPassword] = useState(""); + const [value, setValue] = useState(''); + const [password, setPassword] = useState(''); return ( <> -
-

+
+

🔤 Componente: Input

-

+

El componente <Input /> es un campo de entrada - reutilizable con soporte para etiquetas, tipos como{" "} + reutilizable con soporte para etiquetas, tipos como{' '} password, accesibilidad mejorada, y personalización de estilos. Además, incluye un botón para mostrar/ocultar contraseñas cuando el tipo es password.

-
+
setValue(e.target.value)} /> - setPassword(e.target.value)} /> -
-

Props del componente

- +
+

Props del componente

+
- - - + + + @@ -108,7 +112,7 @@ export default function Page() { string @@ -174,7 +178,7 @@ export default function Page() { InputHTMLAttributes<HTMLInputElement> diff --git a/src/app/(components)/table/page.tsx b/src/app/(components)/table/page.tsx index bf3a8e2..ccf4e9c 100644 --- a/src/app/(components)/table/page.tsx +++ b/src/app/(components)/table/page.tsx @@ -1,21 +1,21 @@ -"use client"; +'use client'; -import React, { useState } from "react"; -import Table, { Header, TableSkeleton } from "@/components/table"; -import VistaComponente from "@/components/vista-componente"; +import React, { useState } from 'react'; +import Table, { Header, TableSkeleton } from '@/components/table'; +import VistaComponente from '@/components/vista-componente'; import { tableBasicExample, tableSkeletonExample, -} from "@/snippets/table/table-basic"; -import { tableClickable } from "@/snippets/table/table-clickable"; -import { tableAutoPagination } from "@/snippets/table/table-auto-pagination"; -import { tableCustomPagination } from "@/snippets/table/table-custom-pagination"; -import { tableCustomCellRender } from "@/snippets/table/table-custom-cell-render"; -import { tableColumnWidth } from "@/snippets/table/table-column-width"; -import { CodeBlock } from "@/components/code-block"; -import Input from "@/components/input"; -import { tableFilter } from "@/snippets/table/table-filter"; -import IndiceContenido from "@/components/content-index"; +} from '@/snippets/table/table-basic'; +import { tableClickable } from '@/snippets/table/table-clickable'; +import { tableAutoPagination } from '@/snippets/table/table-auto-pagination'; +import { tableCustomPagination } from '@/snippets/table/table-custom-pagination'; +import { tableCustomCellRender } from '@/snippets/table/table-custom-cell-render'; +import { tableColumnWidth } from '@/snippets/table/table-column-width'; +import { CodeBlock } from '@/components/code-block'; +import Input from '@/components/input'; +import { tableFilter } from '@/snippets/table/table-filter'; +import IndiceContenido from '@/components/content-index'; export default function Page() { const headers: Header<{ @@ -24,20 +24,20 @@ export default function Page() { email: string; acciones?: null; }>[] = [ - { key: "name", label: "Nombre", width: "30%" }, - { key: "age", label: "Edad", width: "15%" }, - { key: "email", label: "Correo", width: "40%" }, + { key: 'name', label: 'Nombre', width: '30%' }, + { key: 'age', label: 'Edad', width: '15%' }, + { key: 'email', label: 'Correo', width: '40%' }, ]; const baseData = [ - { name: "Juan", age: 20, email: "juan@example.com" }, - { name: "María", age: 25, email: "maria@example.com" }, - { name: "Pedro", age: 30, email: "pedro@example.com" }, - { name: "Luisa", age: 28, email: "luisa@example.com" }, + { name: 'Juan', age: 20, email: 'juan@example.com' }, + { name: 'María', age: 25, email: 'maria@example.com' }, + { name: 'Pedro', age: 30, email: 'pedro@example.com' }, + { name: 'Luisa', age: 28, email: 'luisa@example.com' }, ]; const [currentPage, setCurrentPage] = useState(1); - const [search, setSearch] = useState(""); + const [search, setSearch] = useState(''); const filteredData = baseData.filter((item) => item.name.toLowerCase().includes(search.toLowerCase()) @@ -47,43 +47,43 @@ export default function Page() { <> -
-

+
+

Componente: Table

-

+

El componente <Table /> permite mostrar datos en forma tabular, con funcionalidades como ordenamiento, paginación, renderizado personalizado, clic en filas y un estado de carga - esqueleto. Los estilos de esta tabla se encuentran en{" "} + esqueleto. Los estilos de esta tabla se encuentran en{' '} @/styles/sass/_table.scss

@@ -93,32 +93,32 @@ export default function Page() { } /> -
+

PropTipoDescripciónPropTipoDescripción
- Tipo del input. Soporta cualquier tipo válido de HTML como{" "} + Tipo del input. Soporta cualquier tipo válido de HTML como{' '} text, password, email, etc. - Cualquier otra prop válida de un <input />{" "} + Cualquier otra prop válida de un <input />{' '} estándar.
{/* SKELETON */}
(
@@ -196,13 +196,13 @@ export default function Page() { {/* FILTRO */} setSearch(e.target.value)} /> @@ -210,9 +210,9 @@ export default function Page() {
{/* PROPS */} -
-

Props del componente

-
+
+

Props del componente

+
- - - + + + @@ -291,7 +291,7 @@ export default function Page() { className?
PropTipoDescripciónPropTipoDescripción
- {"{ table?, row?, cell?, header? }"} + {'{ table?, row?, cell?, header? }'} Clases personalizadas para la tabla, filas, celdas y diff --git a/src/components/input.tsx b/src/components/input.tsx index 2b32e67..907ec66 100644 --- a/src/components/input.tsx +++ b/src/components/input.tsx @@ -1,79 +1,42 @@ -import React, { useState } from "react"; +import React from 'react'; -export interface InputProps - extends Omit, "className"> { +export interface SimpleInputProps + extends Omit, 'className'> { + /** Etiqueta visible asociada al campo de entrada */ label?: string; + /** Clases CSS personalizables para distintos elementos */ className?: { + /** Clases para el contenedor del input */ container?: string; + /** Clases para la etiqueta */ label?: string; + /** Clases para el input */ input?: string; }; } /** - * Componente de entrada (`Input`) reutilizable en React. - * - * Este componente renderiza un campo de entrada (``) con una etiqueta opcional y - * funcionalidad para mostrar u ocultar contraseñas cuando el tipo es `password`. - * También permite personalizar clases CSS y es accesible mediante `aria-label` y `htmlFor`. - * - * @component - * @param {Object} props - Propiedades del componente. - * @param {string} [props.label] - Etiqueta visible asociada al campo de entrada. - * @param {Object} [props.className] - Clases CSS personalizables para distintos elementos. - * @param {string} [props.className.container] - Clases para el contenedor del input. - * @param {string} [props.className.label] - Clases para la etiqueta del input. - * @param {string} [props.className.input] - Clases para el input en sí. - * @param {string} [props.type] - Tipo del input (`text`, `password`, `email`, etc.). - * @param {string} [props.name] - Nombre del input (útil para formularios). - * @param {string} [props.id] - ID personalizado para el input (para accesibilidad). - * @param {string} [props.value] - Valor del input (para uso controlado). - * @param {function} [props.onChange] - Manejador del cambio de valor del input. - * @param {React.InputHTMLAttributes} [rest] - Atributos adicionales compatibles con ``. + * Componente de entrada (`Input`) sin lógica de mostrar/ocultar contraseña. */ -export default function Input(props: InputProps) { - const { className, label, type, name, id, ...rest } = props; - const [showPassword, setShowPassword] = useState(false); +export default function SimpleInput(props: SimpleInputProps) { + const { label, name, id, className, ...rest } = props; - const isPassword = type === "password"; - const inputType = isPassword && showPassword ? "text" : type; const inputId = - id || name || (label ? `input-${label.replace(/\s+/g, "-")}` : undefined); - - const togglePasswordVisibility = () => setShowPassword(!showPassword); + id || name || (label ? `input-${label.replace(/\s+/g, '-')}` : undefined); return ( -
+
{label && inputId && ( -
); } diff --git a/src/components/password.tsx b/src/components/password.tsx new file mode 100644 index 0000000..3975493 --- /dev/null +++ b/src/components/password.tsx @@ -0,0 +1,70 @@ +import React, { useState } from 'react'; + +export interface PasswordInputProps + extends Omit< + React.InputHTMLAttributes, + 'type' | 'className' + > { + /** + * Texto de la etiqueta asociada al input (opcional). + */ + label?: string; + /** + * Clases CSS personalizables para distintos elementos. + */ + className?: { + /** Clases para el contenedor del componente */ + container?: string; + /** Clases para la etiqueta */ + label?: string; + /** Clases para el campo input */ + input?: string; + /** Clases para el botón de toggle */ + button?: string; + }; +} + +/** + * Componente especializado para inputs de contraseña con botón de mostrar/ocultar. + */ +export default function PasswordInput(props: PasswordInputProps) { + const { label, name, id, className, ...rest } = props; + const [visible, setVisible] = useState(false); + + // Determina el tipo de input según el estado de visibilidad + const inputType = visible ? 'text' : 'password'; + const inputId = + id || + name || + (label ? `password-${label.replace(/\s+/g, '-')}` : undefined); + + const toggleVisibility = () => setVisible((v) => !v); + + return ( +
+ {label && inputId && ( + + )} +
+ + +
+
+ ); +}