{"_id":"@27-lanterns/use-steps","_rev":"5-9986170bcdb66d31cc6bd391413ac727","name":"@27-lanterns/use-steps","dist-tags":{"latest":"1.0.3"},"versions":{"0.1.2":{"name":"@27-lanterns/use-steps","version":"0.1.2","keywords":["hooks","react"],"author":{"name":"Evgenii Astapushkin"},"license":"MIT","_id":"@27-lanterns/use-steps@0.1.2","maintainers":[{"name":"lebannehn","email":"lebannehn.karnimirie@gmail.com"}],"dist":{"shasum":"98ea3eefc2bb8109215727d186e7c794225febe7","tarball":"https://registry.npmjs.org/@27-lanterns/use-steps/-/use-steps-0.1.2.tgz","fileCount":11,"integrity":"sha512-onnWz0pXPGP5igsBZDB+ozvKCXsuBzsIZ0QCD73fNosDeym8vx6p46X347cC92XbZFgpu91NioQYEMIEq/mZOA==","signatures":[{"sig":"MEYCIQCY1zdLDL7pFSvrsi2X2BICUVUUy0SbIoHWi4vOvkjnqAIhAKNC2YiGQG8m53mAp4yj1kA3nitUA2BoKUmmLvCUExg0","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5808},"main":"package/index.js","type":"commonjs","types":"./package/index.d.ts","gitHead":"027e3070cdd7961b7dc1dff61c6559567210b6cc","scripts":{"gulp:build":"npx gulp build"},"_npmUser":{"name":"lebannehn","email":"lebannehn.karnimirie@gmail.com"},"_npmVersion":"11.2.0","description":"A custom react hook to manage wizard or ui stage transitions","directories":{},"_nodeVersion":"22.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"del":"^8.0.0","gulp":"^5.0.1","through2":"^4.0.2","@types/gulp":"^4.0.17","gulp-typescript":"^6.0.0-alpha.1"},"peerDependencies":{"react":">=16.8.0","typescript":">=4.1.6","@types/react":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/use-steps_0.1.2_1757628466938_0.5445957150578371","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@27-lanterns/use-steps","version":"1.0.0","keywords":["hooks","react"],"author":{"name":"Evgenii Astapushkin","email":"lebannehn.karnimirie@gmail.com"},"license":"MIT","_id":"@27-lanterns/use-steps@1.0.0","maintainers":[{"name":"lebannehn","email":"lebannehn.karnimirie@gmail.com"}],"homepage":"https://github.com/lebannehn/use-steps","bugs":{"url":"https://github.com/lebannehn/use-steps/issues"},"dist":{"shasum":"9ab57856cf518c27266c35d563374a92f03e1fde","tarball":"https://registry.npmjs.org/@27-lanterns/use-steps/-/use-steps-1.0.0.tgz","fileCount":11,"integrity":"sha512-sqLiUM8x7Ab5BLqrRjAqfG2Fv8zfPQ1FrBCJ5wXNTL35ihHY2ge4gD8zxe2dBtKLKcqGcOopjXpeagumKdGO4w==","signatures":[{"sig":"MEQCIA37hDNwN0qtr+OjW53SZltUwETzvupL/sD6xBuGFqwsAiAUV/0oNUYeEQRysTxkpiq4zApY7rH9fEj0NXo7gUnIPA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7822},"main":"package/index.js","type":"commonjs","types":"./package/index.d.ts","engines":{"node":">=8.16.0"},"scripts":{"gulp:build":"npx gulp build"},"_npmUser":{"name":"lebannehn","email":"lebannehn.karnimirie@gmail.com"},"repository":{"url":"git+https://github.com/lebannehn/use-steps.git","type":"git"},"_npmVersion":"10.8.2","description":"A custom react hook to control ui/wizard/page stages or steps","directories":{},"_nodeVersion":"18.20.8","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"del":"^8.0.0","gulp":"^5.0.1","through2":"^4.0.2","typescript":">=4.1.6","@types/gulp":"^4.0.17","@types/react":">=16.8.0","gulp-typescript":"^6.0.0-alpha.1"},"peerDependencies":{"react":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/use-steps_1.0.0_1757791783756_0.495875738845474","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@27-lanterns/use-steps","version":"1.0.3","description":"A custom react hook to control ui/wizard/page stages or steps","author":{"name":"Evgenii Astapushkin","email":"lebannehn.karnimirie@gmail.com"},"keywords":["hooks","react","steps","wizard","stages"],"bugs":{"url":"https://github.com/lebannehn/use-steps/issues"},"homepage":"https://github.com/lebannehn/use-steps","repository":{"type":"git","url":"git+https://github.com/lebannehn/use-steps.git"},"license":"MIT","type":"commonjs","main":"package/index.js","scripts":{"gulp:build":"npx gulp build"},"peerDependencies":{"react":">=16.8.0"},"devDependencies":{"typescript":">=4.1.6","@types/react":">=16.8.0","@types/gulp":"^4.0.17","del":"^8.0.0","gulp":"^5.0.1","gulp-typescript":"^6.0.0-alpha.1","through2":"^4.0.2"},"engines":{"node":">=8.16.0"},"publishConfig":{"access":"public"},"_id":"@27-lanterns/use-steps@1.0.3","types":"./package/index.d.ts","_nodeVersion":"18.20.8","_npmVersion":"10.8.2","dist":{"integrity":"sha512-cDnpBWb86udotBmFPwTccHNjjqDjs8EOKvBCyJsFfa9KoO4b9G/nStfKWdl5dWqCosm0WbUCtE7NPEikyMfu3A==","shasum":"aad4cda26730200021d8bb4de257fc8ee0d3805e","tarball":"https://registry.npmjs.org/@27-lanterns/use-steps/-/use-steps-1.0.3.tgz","fileCount":11,"unpackedSize":7873,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHv+WDEl5nN2kPDK3YqaXX3OMri1j3c5VZsLVBW4wsWeAiEA3on42cGHc9kg9dSiVu71YSpgrNxRTFOhyG7h34iJbBk="}]},"_npmUser":{"name":"lebannehn","email":"lebannehn.karnimirie@gmail.com"},"directories":{},"maintainers":[{"name":"lebannehn","email":"lebannehn.karnimirie@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/use-steps_1.0.3_1758039933952_0.5581786958884327"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-11T22:07:46.822Z","modified":"2025-09-16T16:25:34.389Z","0.1.1":"2025-09-11T21:47:45.112Z","0.1.2":"2025-09-11T22:07:47.112Z","1.0.0":"2025-09-13T19:29:43.966Z","1.0.3":"2025-09-16T16:25:34.147Z"},"bugs":{"url":"https://github.com/lebannehn/use-steps/issues"},"author":{"name":"Evgenii Astapushkin","email":"lebannehn.karnimirie@gmail.com"},"license":"MIT","homepage":"https://github.com/lebannehn/use-steps","keywords":["hooks","react","steps","wizard","stages"],"repository":{"type":"git","url":"git+https://github.com/lebannehn/use-steps.git"},"description":"A custom react hook to control ui/wizard/page stages or steps","maintainers":[{"name":"lebannehn","email":"lebannehn.karnimirie@gmail.com"}],"readme":"# use-steps\n\nA custom [React](https://reactjs.de) hook to control ui/wizard/page stages or steps.\n\nSupports circular and sequential transitions.\n\n### Installation\n\n```console\nnpm i @27-lanterns/use-steps\n```\n\n### Params\n\n| Param | type     | Optional? | Default value | Description                                                                              |\n|------|----------|-----------|---------------|------------------------------------------------------------------------------------------|\n| stepsList | `T[]`    | No        | -             | An array of available steps to go through                                                |\n| isCircular | `boolean` | Yes       | `false`       | Are controls circular (i.e. you go to the first step after the last one and vice versa)? |\n\n### Usage\n\n```tsx\nimport React, { FC } from 'react';\nimport useSteps from '@27-lanterns/use-steps';\n\nconst availableSteps: string[] = ['Opening', 'Intermission', 'Ending'];\nconst altrenateSteps: string[] = ['Intro', 'Culmination', 'Credits'];\n\nconst SomeWizardComponent: FC = () => {\n\tconst [isCircular, setIsCircular] = useState(false);\n\tconst [currentStep, nextStep, previousStep, setStep, hasStep, setAvailableSteps] = useSteps({\n\t\tstepsList: availableSteps,\n\t\tisCircular\n\t});\n\t\n\tconst toggleCircular = () => setIsCircular(!isCircular);\n\n\treturn <>\n        <article>\n            <h2>{currentStep}</h2>\n            <p>Has intermission? {hasStep(availableSteps[1]) ? 'Yes' : 'No'}</p>\n        </article>\n        <button onClick={previousStep}>Previous</button>\n        <button onClick={nextStep}>Next</button>\n        <button onClick={() => setStep(availableSteps[2])}>FastForward</button>\n        <button onClick={() => setAvailableSteps(altrenateSteps)}>Change steps</button>\n        <button onClick={toggleCircular}>Toggle circular mode</button>\n    </>;\n};\n```\n","readmeFilename":"README.md"}