{"_id":"@burnsred/utils-storybook","_rev":"3-9d4f66e38bb188030d03f66ebf969651","name":"@burnsred/utils-storybook","dist-tags":{"latest":"1.1.2"},"versions":{"1.0.1":{"name":"@burnsred/utils-storybook","version":"1.0.1","description":"Workaround for lagging @chakra-ui/storybook","license":"MIT","type":"module","main":"dist/index.js","scripts":{"build":"tsc -b","check":"tsc --noEmit","clean":"rm -rf tsconfig.tsbuildinfo dist/","lint":"eslint src/","lint:fix":"eslint --fix src/","test":"echo \"No test specified\" && exit 0"},"devDependencies":{"@storybook/addon-docs":"^7.0.11","@storybook/react":"^7.0.11"},"types":"./dist/index.d.ts","gitHead":"ef8276a911a667ffd4b9305aa891d65b85cf9347","_id":"@burnsred/utils-storybook@1.0.1","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-1dGO84DiAnqriX6ol/i3+cSCJ8jhR6OkOkTFMgeVIDvgWYl49Oi4oYPZGVX2VKqeE1JgEGMdMc96gmOrZkZarA==","shasum":"bc23dfaf99b7440b05104027da0ac28007827eb2","tarball":"https://registry.npmjs.org/@burnsred/utils-storybook/-/utils-storybook-1.0.1.tgz","fileCount":19,"unpackedSize":14017,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH9ziVb/bAqtujUez5asmkN2YS+Bbu/OpI7NdfqGV2sAAiEA9Dry6wMiiT/lOc4hJL92VFmOrmhMmvKEuWFzIyNqin8="}]},"_npmUser":{"name":"burnsred","email":"accounts@burnsred.com.au"},"directories":{},"maintainers":[{"name":"burnsred","email":"accounts@burnsred.com.au"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/utils-storybook_1.0.1_1686209944091_0.6037842638184652"},"_hasShrinkwrap":false},"1.1.0":{"name":"@burnsred/utils-storybook","version":"1.1.0","description":"Workaround for lagging @chakra-ui/storybook","license":"MIT","type":"module","main":"dist/index.js","scripts":{"build":"tsc -b","check":"tsc --noEmit","clean":"rm -rf tsconfig.tsbuildinfo dist/","lint":"eslint src/","lint:fix":"eslint --fix src/","test":"echo \"No test specified\" && exit 0"},"devDependencies":{"@chakra-ui/storybook-addon":"^4.0.16","@storybook/addon-docs":"^7.0.11","@storybook/react":"^7.0.11"},"types":"./dist/index.d.ts","gitHead":"487d02b78c3e9debc401b5ed45ad3e14b8b9c48a","_id":"@burnsred/utils-storybook@1.1.0","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-j7KR7XyFOKtqzzU5EMxgaog+DN0d/tkroEjx0HDM4SkEN3miGsKvhh+wNPclBk78yC39pucbbKjUKIIApJFaow==","shasum":"0963cbd642465d1ce109dd3eb2d2265a12dc1056","tarball":"https://registry.npmjs.org/@burnsred/utils-storybook/-/utils-storybook-1.1.0.tgz","fileCount":19,"unpackedSize":15555,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDmb7nUgoRUyxJGeOpn3n1JGRFOKSDdbkV36nTPbN+0LQIgVvsWvdUaV9bePNE2nxMDdoLwpQuEylMZtj8eI/2iCAg="}]},"_npmUser":{"name":"burnsred","email":"accounts@burnsred.com.au"},"directories":{},"maintainers":[{"name":"burnsred","email":"accounts@burnsred.com.au"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/utils-storybook_1.1.0_1686615050391_0.8937625974975711"},"_hasShrinkwrap":false},"1.1.1":{"name":"@burnsred/utils-storybook","version":"1.1.1","description":"Workaround for lagging @chakra-ui/storybook","license":"MIT","type":"module","main":"dist/index.js","scripts":{"build":"tsc -b","check":"tsc --noEmit","clean":"rm -rf tsconfig.tsbuildinfo dist/","lint":"eslint src/","lint:fix":"eslint --fix src/","test":"echo \"No test specified\" && exit 0"},"dependencies":{"@chakra-ui/storybook-addon":"^4.0.16"},"peerDependencies":{"@storybook/addon-docs":"^7.0.11","@storybook/react":"^7.0.11"},"types":"./dist/index.d.ts","gitHead":"bad8c899aebe234a2175b6bddbba381778a14df8","_id":"@burnsred/utils-storybook@1.1.1","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-K6jUs9fuG9AeZu5GED48jtOsJmpwava0arTNghTqqJw16qbSAPNrhtzhIiVMuS/wCGKs+p6OiID8cKlVrNpgXw==","shasum":"1754e0b45f1eb78047504f4e9b7651832ace52e2","tarball":"https://registry.npmjs.org/@burnsred/utils-storybook/-/utils-storybook-1.1.1.tgz","fileCount":19,"unpackedSize":15580,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBFlREcz1Gb78duLD2OhGxjwb4AA4LNuZBNwSmRPgQEtAiAaaE1MDduFcLvtPF8OPp/Op6lt3dcAxOlyBhO2WEj2LA=="}]},"_npmUser":{"name":"burnsred","email":"accounts@burnsred.com.au"},"directories":{},"maintainers":[{"name":"burnsred","email":"accounts@burnsred.com.au"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/utils-storybook_1.1.1_1686616985938_0.7297651566325103"},"_hasShrinkwrap":false},"1.1.2":{"name":"@burnsred/utils-storybook","version":"1.1.2","description":"Workaround for lagging @chakra-ui/storybook","license":"MIT","type":"module","main":"dist/index.js","scripts":{"build":"tsc -b","check":"tsc --noEmit","clean":"rm -rf tsconfig.tsbuildinfo dist/","lint":"eslint src/","lint:fix":"eslint --fix src/","test":"echo \"No test specified\" && exit 0"},"dependencies":{"@chakra-ui/storybook-addon":"^4.0.16"},"peerDependencies":{"@storybook/addon-docs":"^7.0.11","@storybook/react":"^7.0.11"},"types":"./dist/index.d.ts","gitHead":"aafbedc0ebf68dcd91cee7b98133adb8eec0c1ec","_id":"@burnsred/utils-storybook@1.1.2","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-Xl8iy0fgjFT08r4+4YabFvy+IdphuqLXflydatKrOhdi4np2RRD7MnH8bYMUfID72/bYYk1WV/5Cf4mAF3WrZA==","shasum":"276ecf7a48d2ba5d29745fc2806b666db08f848c","tarball":"https://registry.npmjs.org/@burnsred/utils-storybook/-/utils-storybook-1.1.2.tgz","fileCount":20,"unpackedSize":15924,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpsgPjdBZvk5IHbjxHhNdanOWuAXNKUGG3QNJbiA239gIgWoo3drvBGZjP5sCxFZnKS1bOZ35WUs9X2+ONJaMflrU="}]},"_npmUser":{"name":"burnsred","email":"accounts@burnsred.com.au"},"directories":{},"maintainers":[{"name":"burnsred","email":"accounts@burnsred.com.au"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/utils-storybook_1.1.2_1703631495107_0.19185034141828727"},"_hasShrinkwrap":false}},"time":{"created":"2023-06-08T07:39:04.044Z","1.0.1":"2023-06-08T07:39:04.313Z","modified":"2023-12-26T22:58:15.496Z","1.1.0":"2023-06-13T00:10:50.589Z","1.1.1":"2023-06-13T00:43:06.101Z","1.1.2":"2023-12-26T22:58:15.290Z"},"maintainers":[{"name":"burnsred","email":"accounts@burnsred.com.au"}],"description":"Workaround for lagging @chakra-ui/storybook","license":"MIT","readme":"# BurnsRED Storybook Utils\n\n> [!WARNING]\n> Deprecated, prefer https://github.com/chakra-ui/chakra-ui/tree/main/tooling/storybook-addon/\n\n@chakra-ui/storybook-addon is not yet supported by Storybook v7; this package\nprovides a custom decorator to fill the gap.\n\n> Attention: We've detected that you're using the following addons in versions\n> which are known to be incompatible with Storybook 7:\n>\n> - @chakra-ui/storybook-addon@4.0.16\n\n[Storybook 7.0 - Use the new framework API · Issue #7402 · chakra-ui/chakra-ui](https://github.com/chakra-ui/chakra-ui/issues/7402)\n\n## Installing in a client project\n\n```sh\nnpm i -D @burnsred/utils-storybook\n```\n\n```tsx\nimport type { Preview } from '@storybook/react';\nimport { createChakraThemeDecorator } from '@burnsred/utils-storybook';\n\nimport { localTheme } from '../src/theme';\n\nconst preview: Preview = {\n  // ...\n};\n\n// note that `decorators` needs to be defined as a separate export to work properly\nexport const decorators = [\n  createChakraThemeDecorator(localTheme),\n];\n\nexport default preview;\n```\n\nStories will now be rendered with the ChakraThemeDecorator 👍\n\n## MDX\n\nRendering with a Chakra theme in MDX files requires use of the `withTheme` or `Themed` helpers:\n\n```jsx\n// Introduction.mdx\nimport { Themed } from '@burnsred/utils-storybook';\nimport { Button } from '@chakra-ui/react';\nimport { Meta } from '@storybook/blocks';\n\nimport { localTheme as theme } from '../src/theme';\nimport MySpike from './MySpike.tsx';\n\n<Meta title=\"Introduction\" />\n\n## Using `withTheme`\n\n✅ Preferred:\n\n<MySpike />\n\n## Using `Themed`\n\n❌ Avoid: DX in MDX files is atrocious:\n\n<Themed theme={theme}>\n  <Button variant=\"solid\">Chakra Button</Button>\n</Themed>\n\n```\n\n```jsx\n// MySpike.tsx\nimport { withTheme } from '@burnsred/utils-storybook';\n\nexport const MySpike = () => <Button variant=\"solid\">Chakra Button</Button>\n\nexport default withTheme(theme, MySpike)\n``\n","readmeFilename":"README.md"}