mirror of
https://github.com/aleleba/create-react-component-library.git
synced 2025-10-13 15:19:25 -06:00
PR-500824updating packages.
This commit is contained in:
@@ -59,7 +59,23 @@ module.exports = {
|
|||||||
"paths": {
|
"paths": {
|
||||||
"@Components/*": ["Components/*"]
|
"@Components/*": ["Components/*"]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
propFilter: (prop) => {
|
||||||
|
// Filter out props that might contain Symbol values
|
||||||
|
if (prop.name && typeof prop.name === 'symbol') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// Filter out React internal props that might cause issues
|
||||||
|
if (prop.name && prop.name.startsWith('$$')) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
docs: {
|
||||||
|
autodocs: 'tag',
|
||||||
|
defaultName: 'Docs',
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@@ -6,5 +6,24 @@ export const parameters = {
|
|||||||
date: /Date$/,
|
date: /Date$/,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
docs: {
|
||||||
|
extractArgTypes: (component) => {
|
||||||
|
// Filter out Symbol values to prevent serialization errors
|
||||||
|
const argTypes = {};
|
||||||
|
if (component && component.propTypes) {
|
||||||
|
Object.keys(component.propTypes).forEach(key => {
|
||||||
|
const propType = component.propTypes[key];
|
||||||
|
// Only include non-Symbol values
|
||||||
|
if (typeof propType !== 'symbol') {
|
||||||
|
argTypes[key] = propType;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return argTypes;
|
||||||
|
},
|
||||||
|
source: {
|
||||||
|
excludeDecorators: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
export const tags = ["autodocs"];
|
export const tags = ["autodocs"];
|
@@ -67,7 +67,7 @@ if(!checkedOut) process.exit(-1);
|
|||||||
|
|
||||||
const actualVersion = runCommandWithOutput(`cd ${repoName} && node -p "require('./package.json').version"`).toString().trim()
|
const actualVersion = runCommandWithOutput(`cd ${repoName} && node -p "require('./package.json').version"`).toString().trim()
|
||||||
|
|
||||||
const installDepsCommand = `cd ${repoName} && npm install --legacy-peer-deps`;
|
const installDepsCommand = `cd ${repoName} && npm i`;
|
||||||
const cleanGitHistoryCommand = `cd ${repoName} && rm -rf .git && git init && git add --all -- ":!.github" ":!bin" && git commit -m "Initial commit"`
|
const cleanGitHistoryCommand = `cd ${repoName} && rm -rf .git && git init && git add --all -- ":!.github" ":!bin" && git commit -m "Initial commit"`
|
||||||
const cleanGitHistoryCommandWindows = `cd ${repoName} && rmdir .git /s /q && git init && git add --all -- ":!.github" ":!bin" && git commit -m "Initial commit"`
|
const cleanGitHistoryCommandWindows = `cd ${repoName} && rmdir .git /s /q && git init && git add --all -- ":!.github" ":!bin" && git commit -m "Initial commit"`
|
||||||
const deleteFoldersCommand = `cd ${repoName} && rm -rf .github && rm -rf bin`
|
const deleteFoldersCommand = `cd ${repoName} && rm -rf .github && rm -rf bin`
|
||||||
|
1458
package-lock.json
generated
1458
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
50
package.json
50
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@aleleba/create-react-component-library",
|
"name": "@aleleba/create-react-component-library",
|
||||||
"version": "1.3.0",
|
"version": "1.3.1",
|
||||||
"description": "A starter kit for create a React component Library with storybook",
|
"description": "A starter kit for create a React component Library with storybook",
|
||||||
"bin": "./bin/cli.js",
|
"bin": "./bin/cli.js",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
"test:watch": "jest --watch",
|
"test:watch": "jest --watch",
|
||||||
"storybook": "storybook dev -p 3000",
|
"storybook": "storybook dev -p 3000",
|
||||||
"build-storybook": "storybook build",
|
"build-storybook": "storybook build",
|
||||||
"check-updates": "npx npm-check-updates -u && npm i --legacy-peer-deps",
|
"check-updates": "npx npm-check-updates -u && npm i",
|
||||||
"cy:open": "npx cypress open",
|
"cy:open": "npx cypress open",
|
||||||
"cy:run": "npx cypress run --headless --component"
|
"cy:run": "npx cypress run --headless --component"
|
||||||
},
|
},
|
||||||
@@ -50,52 +50,52 @@
|
|||||||
"@babel/preset-typescript": "^7.27.1",
|
"@babel/preset-typescript": "^7.27.1",
|
||||||
"@babel/register": "^7.27.1",
|
"@babel/register": "^7.27.1",
|
||||||
"@mdx-js/react": "^3.1.0",
|
"@mdx-js/react": "^3.1.0",
|
||||||
"@storybook/addon-docs": "^9.0.17",
|
"@storybook/addon-docs": "^9.1.1",
|
||||||
"@storybook/addon-links": "^9.0.17",
|
"@storybook/addon-links": "^9.1.1",
|
||||||
"@storybook/addon-styling-webpack": "^2.0.0",
|
"@storybook/addon-styling-webpack": "^2.0.0",
|
||||||
"@storybook/addon-webpack5-compiler-babel": "^3.0.6",
|
"@storybook/addon-webpack5-compiler-babel": "^3.0.6",
|
||||||
"@storybook/cli": "^9.0.17",
|
"@storybook/cli": "^9.1.1",
|
||||||
"@storybook/preset-scss": "^1.0.3",
|
"@storybook/preset-scss": "^1.0.3",
|
||||||
"@storybook/react-webpack5": "^9.0.17",
|
"@storybook/react-webpack5": "^9.1.1",
|
||||||
"@testing-library/dom": "^10.4.0",
|
"@testing-library/dom": "^10.4.1",
|
||||||
"@testing-library/jest-dom": "^6.6.3",
|
"@testing-library/jest-dom": "^6.6.4",
|
||||||
"@testing-library/react": "^16.3.0",
|
"@testing-library/react": "^16.3.0",
|
||||||
"@testing-library/user-event": "^14.6.1",
|
"@testing-library/user-event": "^14.6.1",
|
||||||
"@types/jest": "^30.0.0",
|
"@types/jest": "^30.0.0",
|
||||||
"@types/node": "^24.0.14",
|
"@types/node": "^24.2.1",
|
||||||
"@types/react": "^19.1.8",
|
"@types/react": "^19.1.9",
|
||||||
"@types/react-dom": "^19.1.6",
|
"@types/react-dom": "^19.1.7",
|
||||||
"@types/webpack": "^5.28.5",
|
"@types/webpack": "^5.28.5",
|
||||||
"babel-loader": "^10.0.0",
|
"babel-loader": "^10.0.0",
|
||||||
"clean-webpack-plugin": "^4.0.0",
|
"clean-webpack-plugin": "^4.0.0",
|
||||||
"css-loader": "^7.1.2",
|
"css-loader": "^7.1.2",
|
||||||
"css-minimizer-webpack-plugin": "^7.0.2",
|
"css-minimizer-webpack-plugin": "^7.0.2",
|
||||||
"cypress": "^14.5.2",
|
"cypress": "^14.5.4",
|
||||||
"dotenv": "^17.2.0",
|
"dotenv": "^17.2.1",
|
||||||
"eslint": "^9.31.0",
|
"eslint": "^9.33.0",
|
||||||
"eslint-plugin-react": "^7.37.5",
|
"eslint-plugin-react": "^7.37.5",
|
||||||
"eslint-plugin-storybook": "^9.0.17",
|
"eslint-plugin-storybook": "^9.1.1",
|
||||||
"eslint-webpack-plugin": "^5.0.2",
|
"eslint-webpack-plugin": "^5.0.2",
|
||||||
"html-webpack-plugin": "^5.6.3",
|
"html-webpack-plugin": "^5.6.3",
|
||||||
"identity-obj-proxy": "^3.0.0",
|
"identity-obj-proxy": "^3.0.0",
|
||||||
"jest": "^30.0.4",
|
"jest": "^30.0.5",
|
||||||
"jest-environment-jsdom": "^30.0.4",
|
"jest-environment-jsdom": "^30.0.5",
|
||||||
"jest-fetch-mock": "^3.0.3",
|
"jest-fetch-mock": "^3.0.3",
|
||||||
"mini-css-extract-plugin": "^2.9.2",
|
"mini-css-extract-plugin": "^2.9.3",
|
||||||
"react": "^19.1.0",
|
"react": "^19.1.1",
|
||||||
"react-dom": "^19.1.0",
|
"react-dom": "^19.1.1",
|
||||||
"resolve-ts-aliases": "^1.0.1",
|
"resolve-ts-aliases": "^1.0.1",
|
||||||
"sass": "^1.89.2",
|
"sass": "^1.90.0",
|
||||||
"sass-loader": "^16.0.5",
|
"sass-loader": "^16.0.5",
|
||||||
"storybook": "^9.0.17",
|
"storybook": "^9.1.1",
|
||||||
"style-loader": "^4.0.0",
|
"style-loader": "^4.0.0",
|
||||||
"terser-webpack-plugin": "^5.3.14",
|
"terser-webpack-plugin": "^5.3.14",
|
||||||
"ts-jest": "^29.4.0",
|
"ts-jest": "^29.4.1",
|
||||||
"ts-loader": "^9.5.2",
|
"ts-loader": "^9.5.2",
|
||||||
"tsconfig-paths-webpack-plugin": "^4.2.0",
|
"tsconfig-paths-webpack-plugin": "^4.2.0",
|
||||||
"typescript": "^5.8.3",
|
"typescript": "^5.9.2",
|
||||||
"url-loader": "^4.1.1",
|
"url-loader": "^4.1.1",
|
||||||
"webpack": "^5.100.2",
|
"webpack": "^5.101.0",
|
||||||
"webpack-cli": "^6.0.1",
|
"webpack-cli": "^6.0.1",
|
||||||
"webpack-node-externals": "^3.0.0"
|
"webpack-node-externals": "^3.0.0"
|
||||||
},
|
},
|
||||||
|
@@ -1,19 +1,37 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { StoryFn, Meta } from '@storybook/react-webpack5';
|
import type { Meta, StoryObj } from '@storybook/react';
|
||||||
import { Card } from '@components';
|
import { Card } from '@components';
|
||||||
|
|
||||||
// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
||||||
export default {
|
const meta: Meta<typeof Card> = {
|
||||||
title: 'Example/Card',
|
title: 'Example/Card',
|
||||||
component: Card,
|
component: Card,
|
||||||
} as Meta<typeof Card>;
|
parameters: {
|
||||||
|
docs: {
|
||||||
|
description: {
|
||||||
|
component: 'A reusable Card component for displaying content with an optional title.',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
argTypes: {
|
||||||
|
title: {
|
||||||
|
control: 'text',
|
||||||
|
description: 'The title of the card',
|
||||||
|
},
|
||||||
|
children: {
|
||||||
|
control: false,
|
||||||
|
description: 'The content to display inside the card',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
// More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
|
export default meta;
|
||||||
const Template: StoryFn<typeof Card> = (args) => <Card {...args} />;
|
type Story = StoryObj<typeof meta>;
|
||||||
|
|
||||||
export const Basic = Template.bind({});
|
|
||||||
// More on args: https://storybook.js.org/docs/react/writing-stories/args
|
// More on args: https://storybook.js.org/docs/react/writing-stories/args
|
||||||
Basic.args = {
|
export const Basic: Story = {
|
||||||
|
args: {
|
||||||
title: 'Test Title',
|
title: 'Test Title',
|
||||||
children: <p>Test Content</p>,
|
children: <p>Test Content</p>,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user