pixelize-design-library 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/. prettierrc +14 -0
  2. package/.eslintcache +1 -0
  3. package/.husky/pre-commit +4 -0
  4. package/.storybook/main.ts +19 -0
  5. package/.storybook/preview.ts +14 -0
  6. package/README.md +48 -0
  7. package/build/favicon.ico +0 -0
  8. package/build/logo192.png +0 -0
  9. package/build/logo512.png +0 -0
  10. package/build/manifest.json +25 -0
  11. package/build/robots.txt +3 -0
  12. package/eslint.config.mjs +20 -0
  13. package/exposedComponents.json +26 -0
  14. package/package.json +105 -0
  15. package/public/favicon.ico +0 -0
  16. package/public/index.html +43 -0
  17. package/public/logo192.png +0 -0
  18. package/public/logo512.png +0 -0
  19. package/public/manifest.json +25 -0
  20. package/public/robots.txt +3 -0
  21. package/rsbuild.config.ts +49 -0
  22. package/src/App.tsx +10 -0
  23. package/src/Components/Apexcharts/ApexBarChart/ApexBarChart.stories.tsx +39 -0
  24. package/src/Components/Apexcharts/ApexBarChart/ApexBarChart.tsx +80 -0
  25. package/src/Components/Apexcharts/ApexBarChart/ApexBarChartProps.tsx +20 -0
  26. package/src/Components/Apexcharts/ApexPieChart/ApexPieChart.stories.tsx +33 -0
  27. package/src/Components/Apexcharts/ApexPieChart/ApexPieChart.tsx +42 -0
  28. package/src/Components/Apexcharts/ApexPieChart/ApexPieChartProps.tsx +17 -0
  29. package/src/Components/Breadcrumbs/Breadcrumbs.stories.tsx +26 -0
  30. package/src/Components/Breadcrumbs/Breadcrumbs.tsx +25 -0
  31. package/src/Components/Breadcrumbs/BreadcrumbsProps.tsx +12 -0
  32. package/src/Components/Button/Button.stories.tsx +32 -0
  33. package/src/Components/Button/Button.tsx +26 -0
  34. package/src/Components/Button/ButtonProps.tsx +10 -0
  35. package/src/Components/ButtonGroupIcon/ButtonGoupIconProps.tsx +14 -0
  36. package/src/Components/ButtonGroupIcon/ButtonGroupIcon.stories.tsx +37 -0
  37. package/src/Components/ButtonGroupIcon/ButtonGroupIcon.tsx +25 -0
  38. package/src/Components/Checkbox/Checkbox.stories.tsx +45 -0
  39. package/src/Components/Checkbox/Checkbox.tsx +29 -0
  40. package/src/Components/Checkbox/CheckboxProps.tsx +9 -0
  41. package/src/Components/Input/TextInput.stories.tsx +44 -0
  42. package/src/Components/Input/TextInput.tsx +70 -0
  43. package/src/Components/Input/TextInputProps.tsx +27 -0
  44. package/src/Components/InputTextArea/InputTextArea.stories.tsx +48 -0
  45. package/src/Components/InputTextArea/InputTextArea.tsx +36 -0
  46. package/src/Components/InputTextArea/InputTextAreaProps.tsx +11 -0
  47. package/src/Components/Loading/Loading.stories.tsx +25 -0
  48. package/src/Components/Loading/Loading.tsx +37 -0
  49. package/src/Components/Loading/LoadingProps.tsx +1 -0
  50. package/src/Components/Modal/Modal.stories.tsx +106 -0
  51. package/src/Components/Modal/Modal.tsx +44 -0
  52. package/src/Components/Modal/ModalProps.tsx +12 -0
  53. package/src/Components/NavigationBar/NavBar.stories.tsx +26 -0
  54. package/src/Components/NavigationBar/NavigationBar.tsx +55 -0
  55. package/src/Components/NavigationBar/NavigationBarProps.tsx +13 -0
  56. package/src/Components/NumberInput/NumberInput.stories.tsx +31 -0
  57. package/src/Components/NumberInput/NumberInput.tsx +55 -0
  58. package/src/Components/NumberInput/NumberInputProps.tsx +28 -0
  59. package/src/Components/PinInput/PinInput.stories.tsx +40 -0
  60. package/src/Components/PinInput/PinInput.tsx +48 -0
  61. package/src/Components/PinInput/PinInputProps.tsx +33 -0
  62. package/src/Components/ProfileCard/ProfileCard.stories.tsx +30 -0
  63. package/src/Components/ProfileCard/ProfileCard.tsx +58 -0
  64. package/src/Components/ProfileCard/ProfileCardProps.tsx +41 -0
  65. package/src/Components/ProfilePhotoViewer/ProfilePhotoViewer.stories.tsx +25 -0
  66. package/src/Components/ProfilePhotoViewer/ProfilePhotoViewer.tsx +68 -0
  67. package/src/Components/ProfilePhotoViewer/ProfilePhotoViewerProps.tsx +14 -0
  68. package/src/Components/ProgressBar/ProgressBar.stories.tsx +46 -0
  69. package/src/Components/ProgressBar/ProgressBar.tsx +32 -0
  70. package/src/Components/ProgressBar/ProgressBarProps.tsx +7 -0
  71. package/src/Components/RadioButton/RadioButton.stories.tsx +46 -0
  72. package/src/Components/RadioButton/RadioButton.tsx +63 -0
  73. package/src/Components/RadioButton/RadioButtonProps.tsx +10 -0
  74. package/src/Components/Select/Select.stories.tsx +56 -0
  75. package/src/Components/Select/Select.tsx +45 -0
  76. package/src/Components/Select/SelectProps.tsx +15 -0
  77. package/src/Components/SideBar/SideBar.tsx +143 -0
  78. package/src/Components/SideBar/SideBarProps.tsx +18 -0
  79. package/src/Components/SideBar/Sidebar.stories.tsx +80 -0
  80. package/src/Components/Skeletons/Skeleton.stories.tsx +63 -0
  81. package/src/Components/Skeletons/SkeletonProps.tsx +23 -0
  82. package/src/Components/Skeletons/Skeletons.tsx +51 -0
  83. package/src/Components/Table/Table.stories.tsx +47 -0
  84. package/src/Components/Table/Table.tsx +516 -0
  85. package/src/Components/Table/TableProps.tsx +36 -0
  86. package/src/Components/Toaster/Toaster.stories.tsx +58 -0
  87. package/src/Components/Toaster/Toaster.tsx +34 -0
  88. package/src/Components/Toaster/ToasterProps.tsx +15 -0
  89. package/src/Components/ToolTip/ToolTip.stories.tsx +39 -0
  90. package/src/Components/ToolTip/ToolTip.tsx +61 -0
  91. package/src/Components/ToolTip/ToolTipProps.tsx +45 -0
  92. package/src/Layout.tsx +499 -0
  93. package/src/Theme/Dark/theme.ts +278 -0
  94. package/src/Theme/Default/theme.ts +301 -0
  95. package/src/Theme/index.ts +4 -0
  96. package/src/bootstrap.tsx +13 -0
  97. package/src/index.tsx +22 -0
  98. package/src/stories/Configure.mdx +364 -0
  99. package/src/stories/assets/accessibility.png +0 -0
  100. package/src/stories/assets/accessibility.svg +5 -0
  101. package/src/stories/assets/addon-library.png +0 -0
  102. package/src/stories/assets/assets.png +0 -0
  103. package/src/stories/assets/avif-test-image.avif +0 -0
  104. package/src/stories/assets/context.png +0 -0
  105. package/src/stories/assets/discord.svg +15 -0
  106. package/src/stories/assets/docs.png +0 -0
  107. package/src/stories/assets/figma-plugin.png +0 -0
  108. package/src/stories/assets/github.svg +3 -0
  109. package/src/stories/assets/share.png +0 -0
  110. package/src/stories/assets/styling.png +0 -0
  111. package/src/stories/assets/testing.png +0 -0
  112. package/src/stories/assets/theming.png +0 -0
  113. package/src/stories/assets/tutorials.svg +12 -0
  114. package/src/stories/assets/youtube.svg +4 -0
  115. package/src/stories/header.css +32 -0
  116. package/tsconfig.json +20 -0
package/. prettierrc ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "printWidth": 80,
3
+ "tabWidth": 2,
4
+ "useTabs": false,
5
+ "semi": true,
6
+ "singleQuote": true,
7
+ "quoteProps": "as-needed",
8
+ "jsxSingleQuote": false,
9
+ "trailingComma": "all",
10
+ "bracketSpacing": true,
11
+ "jsxBracketSameLine": true,
12
+ "arrowParens": "avoid",
13
+ "endOfLine": "auto"
14
+ }
package/.eslintcache ADDED
@@ -0,0 +1 @@
1
+ [{"/Users/mahesh/Applications/Pixelize/CRM/Micro-Components/src/Layout.tsx":"1"},{"size":19413,"mtime":1720254738133,"results":"2","hashOfConfig":"3"},{"filePath":"4","messages":"5","suppressedMessages":"6","errorCount":10,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"7u0djc","/Users/mahesh/Applications/Pixelize/CRM/Micro-Components/src/Layout.tsx",["7","8","9","10","11","12","13","14","15","16"],[],{"ruleId":"17","severity":2,"message":"18","line":45,"column":1,"nodeType":"19","messageId":"20","endLine":45,"endColumn":12,"suggestions":"21"},{"ruleId":"17","severity":2,"message":"18","line":55,"column":9,"nodeType":"19","messageId":"20","endLine":55,"endColumn":20,"suggestions":"22"},{"ruleId":"17","severity":2,"message":"18","line":59,"column":9,"nodeType":"19","messageId":"20","endLine":59,"endColumn":20,"suggestions":"23"},{"ruleId":"17","severity":2,"message":"18","line":137,"column":9,"nodeType":"19","messageId":"20","endLine":137,"endColumn":20,"suggestions":"24"},{"ruleId":"17","severity":2,"message":"18","line":138,"column":9,"nodeType":"19","messageId":"20","endLine":138,"endColumn":20,"suggestions":"25"},{"ruleId":"17","severity":2,"message":"18","line":162,"column":9,"nodeType":"19","messageId":"20","endLine":162,"endColumn":20,"suggestions":"26"},{"ruleId":"17","severity":2,"message":"18","line":186,"column":44,"nodeType":"19","messageId":"20","endLine":186,"endColumn":55},{"ruleId":"17","severity":2,"message":"18","line":311,"column":33,"nodeType":"19","messageId":"20","endLine":311,"endColumn":44,"suggestions":"27"},{"ruleId":"17","severity":2,"message":"18","line":431,"column":33,"nodeType":"19","messageId":"20","endLine":431,"endColumn":44,"suggestions":"28"},{"ruleId":"17","severity":2,"message":"18","line":491,"column":108,"nodeType":"19","messageId":"20","endLine":491,"endColumn":119},"no-console","Unexpected console statement.","MemberExpression","unexpected",["29"],["30"],["31"],["32"],["33"],["34"],["35"],["36"],{"messageId":"37","data":"38","fix":"39","desc":"40"},{"messageId":"37","data":"41","fix":"42","desc":"40"},{"messageId":"37","data":"43","fix":"44","desc":"40"},{"messageId":"37","data":"45","fix":"46","desc":"40"},{"messageId":"37","data":"47","fix":"48","desc":"40"},{"messageId":"37","data":"49","fix":"50","desc":"40"},{"messageId":"37","data":"51","fix":"52","desc":"40"},{"messageId":"37","data":"53","fix":"54","desc":"40"},"removeConsole",{"propertyName":"55"},{"range":"56","text":"57"},"Remove the console.log().",{"propertyName":"55"},{"range":"58","text":"57"},{"propertyName":"55"},{"range":"59","text":"57"},{"propertyName":"55"},{"range":"60","text":"57"},{"propertyName":"55"},{"range":"61","text":"57"},{"propertyName":"55"},{"range":"62","text":"57"},{"propertyName":"55"},{"range":"63","text":"57"},{"propertyName":"55"},{"range":"64","text":"57"},"log",[1713,1733],"",[1994,2013],[2063,2085],[3942,3961],[3970,3987],[4700,4737],[10452,10480],[15696,15730]]
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env sh
2
+ . "$(dirname -- "$0")/_/husky.sh"
3
+
4
+ npx lint-staged
@@ -0,0 +1,19 @@
1
+ import type { StorybookConfig } from "@storybook/react-webpack5";
2
+
3
+ const config: StorybookConfig = {
4
+ stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
5
+ addons: [
6
+ "@storybook/preset-create-react-app",
7
+ "@storybook/addon-onboarding",
8
+ "@storybook/addon-links",
9
+ "@storybook/addon-essentials",
10
+ "@chromatic-com/storybook",
11
+ "@storybook/addon-interactions",
12
+ ],
13
+ framework: {
14
+ name: "@storybook/react-webpack5",
15
+ options: {},
16
+ },
17
+ staticDirs: ["../public"],
18
+ };
19
+ export default config;
@@ -0,0 +1,14 @@
1
+
2
+ const preview = {
3
+ parameters: {
4
+ controls: {
5
+ matchers: {
6
+ color: /(background|color)$/i,
7
+ date: /Date$/i,
8
+ },
9
+ },
10
+ },
11
+
12
+ };
13
+
14
+ export default preview;
package/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # Getting Started with Create React App
2
+
3
+ This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
4
+
5
+ ## Available Scripts
6
+
7
+ In the project directory, you can run:
8
+
9
+ ### `npm start`
10
+
11
+ Runs the app in the development mode.\
12
+ Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
13
+
14
+ The page will reload if you make edits.\
15
+ You will also see any lint errors in the console.
16
+
17
+ ### `npm test`
18
+
19
+ Launches the test runner in the interactive watch mode.\
20
+ See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21
+
22
+ ### `npm run build`
23
+
24
+ Builds the app for production to the `build` folder.\
25
+ It correctly bundles React in production mode and optimizes the build for the best performance.
26
+
27
+ The build is minified and the filenames include the hashes.\
28
+ Your app is ready to be deployed!
29
+
30
+ See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31
+
32
+ ### `npm run eject`
33
+
34
+ **Note: this is a one-way operation. Once you `eject`, you can’t go back!**
35
+
36
+ If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37
+
38
+ Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
39
+
40
+ You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
41
+
42
+ ## Learn More
43
+
44
+ You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45
+
46
+ To learn React, check out the [React documentation](https://reactjs.org/).
47
+
48
+ just update
Binary file
Binary file
Binary file
@@ -0,0 +1,25 @@
1
+ {
2
+ "short_name": "React App",
3
+ "name": "Create React App Sample",
4
+ "icons": [
5
+ {
6
+ "src": "favicon.ico",
7
+ "sizes": "64x64 32x32 24x24 16x16",
8
+ "type": "image/x-icon"
9
+ },
10
+ {
11
+ "src": "logo192.png",
12
+ "type": "image/png",
13
+ "sizes": "192x192"
14
+ },
15
+ {
16
+ "src": "logo512.png",
17
+ "type": "image/png",
18
+ "sizes": "512x512"
19
+ }
20
+ ],
21
+ "start_url": ".",
22
+ "display": "standalone",
23
+ "theme_color": "#000000",
24
+ "background_color": "#ffffff"
25
+ }
@@ -0,0 +1,3 @@
1
+ # https://www.robotstxt.org/robotstxt.html
2
+ User-agent: *
3
+ Disallow:
@@ -0,0 +1,20 @@
1
+ import globals from "globals";
2
+ import pluginJs from "@eslint/js";
3
+ import tseslint from "typescript-eslint";
4
+ import pluginReactConfig from "eslint-plugin-react/configs/recommended.js";
5
+ import { fixupConfigRules } from "@eslint/compat";
6
+
7
+ export default [
8
+ { files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"] },
9
+ { languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } } },
10
+ { languageOptions: { globals: globals.browser } },
11
+ pluginJs.configs.recommended,
12
+ ...tseslint.configs.recommended,
13
+ ...fixupConfigRules(pluginReactConfig),
14
+ {
15
+ rules: {
16
+ "@typescript-eslint/no-explicit-any": "off",
17
+ "no-console": "error",
18
+ },
19
+ },
20
+ ];
@@ -0,0 +1,26 @@
1
+ {
2
+ "./TextInput": "./src/Components/Input/TextInput.tsx",
3
+ "./InputTextArea": "./src/Components/InputTextArea/InputTextArea.tsx",
4
+ "./Select": "./src/Components/Select/Select.tsx",
5
+ "./Checkbox": "./src/Components/Checkbox/Checkbox.tsx",
6
+ "./Button": "./src/Components/Button/Button.tsx",
7
+ "./Toaster": "./src/Components/Toaster/Toaster.tsx",
8
+ "./Modal": "./src/Components/Modal/Modal.tsx",
9
+ "./theme": "./src/Theme/Default/theme.ts",
10
+ "./Sidebar": "./src/Components/SideBar/SideBar.tsx",
11
+ "./Navbar": "./src/Components/NavigationBar/NavigationBar.tsx",
12
+ "./Loading": "./src/Components/Loading/Loading.tsx",
13
+ "./Skeletons": "./src/Components/Skeletons/Skeletons.tsx",
14
+ "./RadioButton": "./src/Components/RadioButton/RadioButton.tsx",
15
+ "./ButtonGroupIcon": "./src/Components/ButtonGroupIcon/ButtonGroupIcon.tsx",
16
+ "./ProgressBar": "./src/Components/ProgressBar/ProgressBar.tsx",
17
+ "./NumberInput": "./src/Components/NumberInput/NumberInput.tsx",
18
+ "./PinInput": "./src/Components/PinInput/PinInput.tsx",
19
+ "./ProfileCard": "./src/Components/ProfileCard/ProfileCard.tsx",
20
+ "./Breadcrumb": "./src/Components/Breadcrumbs/Breadcrumbs.tsx",
21
+ "./TableComponent": "./src/Components/Table/Table.tsx",
22
+ "./Tooltip": "./src/Components/ToolTip/ToolTip.tsx",
23
+ "./ApexBarChart": "./src/Components/Apexcharts/ApexBarChart/ApexBarChart.tsx",
24
+ "./ApexPieChart": "./src/Components/Apexcharts/ApexPieChart/ApexPieChart.tsx",
25
+ "./ProfilePhotoViewer": "./src/Components/ProfilePhotoViewer/ProfilePhotoViewer.tsx"
26
+ }
package/package.json ADDED
@@ -0,0 +1,105 @@
1
+ {
2
+ "name": "pixelize-design-library",
3
+ "version": "0.1.0",
4
+ "private": false,
5
+ "dependencies": {
6
+ "@babel/core": "^7.24.5",
7
+ "@chakra-ui/icons": "^2.1.1",
8
+ "@chakra-ui/react": "^2.8.2",
9
+ "@emotion/react": "^11.11.4",
10
+ "@emotion/styled": "^11.11.5",
11
+ "@module-federation/enhanced": "0.1.13",
12
+ "@storybook/addon-actions": "^8.1.1",
13
+ "@storybook/addon-controls": "^8.1.1",
14
+ "@testing-library/jest-dom": "^5.17.0",
15
+ "@testing-library/react": "^13.4.0",
16
+ "@testing-library/user-event": "^13.5.0",
17
+ "@types/jest": "^27.5.2",
18
+ "@types/node": "^16.18.97",
19
+ "@types/react": "^18.3.2",
20
+ "@types/react-dom": "^18.3.0",
21
+ "apexcharts": "^3.49.1",
22
+ "framer-motion": "^11.2.2",
23
+ "react": "^18.3.1",
24
+ "react-apexcharts": "^1.4.1",
25
+ "react-dom": "^18.3.1",
26
+ "react-icons": "^5.2.1",
27
+ "react-router-dom": "^6.23.1",
28
+ "react-scripts": "5.0.1",
29
+ "typescript": "^4.9.5",
30
+ "web-vitals": "^2.1.4"
31
+ },
32
+ "scripts": {
33
+ "start": "react-scripts start",
34
+ "build": "react-scripts build",
35
+ "test": "react-scripts test",
36
+ "eject": "react-scripts eject",
37
+ "storybook": "storybook dev -p 6006",
38
+ "build-storybook": "storybook build",
39
+ "dev": "rsbuild dev",
40
+ "build:dev": "rsbuild build",
41
+ "prepare": "husky install"
42
+ },
43
+ "eslintConfig": {
44
+ "extends": [
45
+ "react-app",
46
+ "react-app/jest",
47
+ "plugin:storybook/recommended"
48
+ ]
49
+ },
50
+ "browserslist": {
51
+ "production": [
52
+ ">0.2%",
53
+ "not dead",
54
+ "not op_mini all"
55
+ ],
56
+ "development": [
57
+ "last 1 chrome version",
58
+ "last 1 firefox version",
59
+ "last 1 safari version"
60
+ ]
61
+ },
62
+ "devDependencies": {
63
+ "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
64
+ "@chakra-ui/storybook-addon": "^5.1.0",
65
+ "@chromatic-com/storybook": "^1.4.0",
66
+ "@rsbuild/core": "0.6.15",
67
+ "@rsbuild/plugin-react": "0.6.15",
68
+ "@storybook/addon-essentials": "^8.1.1",
69
+ "@storybook/addon-interactions": "^8.1.1",
70
+ "@storybook/addon-links": "^8.1.1",
71
+ "@storybook/addon-onboarding": "^8.1.1",
72
+ "@storybook/blocks": "^8.1.1",
73
+ "@storybook/preset-create-react-app": "^8.1.1",
74
+ "@storybook/react": "^8.1.1",
75
+ "@storybook/react-webpack5": "^8.1.1",
76
+ "@storybook/test": "^8.1.1",
77
+ "eslint-plugin-storybook": "^0.8.0",
78
+ "prop-types": "^15.8.1",
79
+ "storybook": "^8.1.1",
80
+ "webpack": "^5.91.0",
81
+ "@eslint/compat": "^1.1.0",
82
+ "@eslint/js": "^9.6.0",
83
+ "@typescript-eslint/eslint-plugin": "^5.62.0",
84
+ "@typescript-eslint/parser": "^5.62.0",
85
+ "eslint": "^8.57.0",
86
+ "eslint-config-prettier": "^9.1.0",
87
+ "eslint-plugin-react": "^7.34.3",
88
+ "globals": "^15.8.0",
89
+ "husky": "^8.0.0",
90
+ "lint-staged": "^15.2.7",
91
+ "prettier": "^3.3.2",
92
+ "typescript-eslint": "^7.15.0"
93
+ },
94
+ "husky": {
95
+ "hooks": {
96
+ "pre-commit": "lint-staged"
97
+ }
98
+ },
99
+ "lint-staged": {
100
+ "*.{js,jsx,ts,tsx,css}": [
101
+ "eslint --cache --fix",
102
+ "prettier --write"
103
+ ]
104
+ }
105
+ }
Binary file
@@ -0,0 +1,43 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="utf-8" />
6
+ <!-- <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> -->
7
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
8
+ <meta name="theme-color" content="#000000" />
9
+ <meta name="description" content="Web site created using create-react-app" />
10
+ <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
11
+ <!--
12
+ manifest.json provides metadata used when your web app is installed on a
13
+ user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
14
+ -->
15
+ <!-- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> -->
16
+ <!--
17
+ Notice the use of %PUBLIC_URL% in the tags above.
18
+ It will be replaced with the URL of the `public` folder during the build.
19
+ Only files inside the `public` folder can be referenced from the HTML.
20
+
21
+ Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
22
+ work correctly both with client-side routing and a non-root public URL.
23
+ Learn how to configure a non-root public URL by running `npm run build`.
24
+ -->
25
+ <title>React App</title>
26
+ </head>
27
+
28
+ <body>
29
+ <noscript>You need to enable JavaScript to run this app.</noscript>
30
+ <div id="root"></div>
31
+ <!--
32
+ This HTML file is a template.
33
+ If you open it directly in the browser, you will see an empty page.
34
+
35
+ You can add webfonts, meta tags, or analytics to this file.
36
+ The build step will place the bundled scripts into the <body> tag.
37
+
38
+ To begin the development, run `npm start` or `yarn start`.
39
+ To create a production bundle, use `npm run build` or `yarn build`.
40
+ -->
41
+ </body>
42
+
43
+ </html>
Binary file
Binary file
@@ -0,0 +1,25 @@
1
+ {
2
+ "short_name": "React App",
3
+ "name": "Create React App Sample",
4
+ "icons": [
5
+ {
6
+ "src": "favicon.ico",
7
+ "sizes": "64x64 32x32 24x24 16x16",
8
+ "type": "image/x-icon"
9
+ },
10
+ {
11
+ "src": "logo192.png",
12
+ "type": "image/png",
13
+ "sizes": "192x192"
14
+ },
15
+ {
16
+ "src": "logo512.png",
17
+ "type": "image/png",
18
+ "sizes": "512x512"
19
+ }
20
+ ],
21
+ "start_url": ".",
22
+ "display": "standalone",
23
+ "theme_color": "#000000",
24
+ "background_color": "#ffffff"
25
+ }
@@ -0,0 +1,3 @@
1
+ # https://www.robotstxt.org/robotstxt.html
2
+ User-agent: *
3
+ Disallow:
@@ -0,0 +1,49 @@
1
+ import { defineConfig } from '@rsbuild/core';
2
+ import { pluginReact } from '@rsbuild/plugin-react';
3
+ import { ModuleFederationPlugin } from '@module-federation/enhanced/rspack';
4
+ export default defineConfig({
5
+ server: {
6
+ port: 8008,
7
+ // port: 4001
8
+ },
9
+ dev: {
10
+ // It is necessary to configure assetPrefix, and in the production environment, you need to configure output.assetPrefix
11
+ assetPrefix: 'http://pixelize.memron.net:8008',
12
+ // assetPrefix: 'http://localhost:4001',
13
+ },
14
+ tools: {
15
+ rspack: (config, { appendPlugins }) => {
16
+ config.output!.uniqueName = 'app1';
17
+ appendPlugins([
18
+ new ModuleFederationPlugin({
19
+ name: 'Pixelize_MFEC',
20
+ exposes: require("./exposedComponents.json"),
21
+ shared: {
22
+ 'react': {
23
+ singleton: true,
24
+ requiredVersion: '^18.3.1',
25
+ },
26
+ 'react-dom': {
27
+ singleton: true,
28
+ },
29
+ 'react-icons': {
30
+ singleton: true,
31
+ requiredVersion: '^5.2.1',
32
+ },
33
+ '@chakra-ui': {
34
+ singleton: true
35
+ },
36
+ '@chakra-ui/react': {
37
+ singleton: true
38
+ },
39
+ '@chakra-ui/icons': {
40
+ singleton: true
41
+ },
42
+
43
+ },
44
+ }),
45
+ ]);
46
+ },
47
+ },
48
+ plugins: [pluginReact()],
49
+ });
package/src/App.tsx ADDED
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import Layout from './Layout';
3
+ function App() {
4
+ return (
5
+ <div className="App">
6
+ <Layout />
7
+ </div >
8
+ );
9
+ }
10
+ export default App;
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ import { StoryFn, Meta } from '@storybook/react';
3
+ import ApexBarChart from './ApexBarChart';
4
+ import { ApexBarChartProps } from './ApexBarChartProps';
5
+
6
+ export default {
7
+ title: 'Components/ApexCharts/ApexBarChart',
8
+ component: ApexBarChart,
9
+ argTypes: {
10
+ backgroundColor: { control: 'color' },
11
+ },
12
+ } as Meta;
13
+
14
+ const Template: StoryFn<ApexBarChartProps> = (args) => <ApexBarChart {...args} />;
15
+
16
+ export const Primary = Template.bind({});
17
+ Primary.args = {
18
+ data: [44, 55, 41, 64, 22, 43, 21],
19
+ Labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
20
+ title: 'Weekly Sales',
21
+ titlePosition: 'left',
22
+ height: 400,
23
+ width: 500,
24
+ barColor: ['#3182ce'],
25
+ xAxisStyle: {
26
+ color: '#ffffff',
27
+ },
28
+ yAxisStyle: {
29
+ color: '#ffffff',
30
+ },
31
+ titleStyle: {
32
+ color: '#3182ce',
33
+ fontSize: '16px',
34
+ fontWeight: 600,
35
+ fontFamily: 'Arial',
36
+ },
37
+ };
38
+
39
+ // You can add more variations of the component by adding more exports like the Primary example.
@@ -0,0 +1,80 @@
1
+ import React from "react";
2
+ import ReactApexChart from "react-apexcharts";
3
+ import { ApexOptions } from "apexcharts";
4
+ import { ApexBarChartProps } from "./ApexBarChartProps";
5
+
6
+ export default function ApexBarChart({
7
+ data,
8
+ Labels,
9
+ title,
10
+ titlePosition,
11
+ height = 400,
12
+ width = 500,
13
+ barColor = ["#3182ce"],
14
+ xAxisStyle = {
15
+ color: "#ffffff",
16
+ },
17
+ yAxisStyle = {
18
+ color: "#ffffff",
19
+ },
20
+ titleStyle = {
21
+ color: "#3182ce",
22
+ fontSize: "16px",
23
+ fontWeight: 600,
24
+ fontFamily: "Arial",
25
+ },
26
+ }: ApexBarChartProps) {
27
+ const options: ApexOptions = {
28
+ chart: {
29
+ type: "bar",
30
+ height: 350,
31
+ },
32
+ plotOptions: {
33
+ bar: {
34
+ borderRadius: 4,
35
+ horizontal: false,
36
+ },
37
+ },
38
+ dataLabels: {
39
+ enabled: false,
40
+ style: {
41
+ fontSize: "12px",
42
+ colors: ["#00E396"], //data label color
43
+ },
44
+ },
45
+ xaxis: {
46
+ categories: Labels,
47
+ labels: {
48
+ style: xAxisStyle,
49
+ },
50
+ },
51
+ yaxis: {
52
+ labels: {
53
+ style: yAxisStyle,
54
+ },
55
+ },
56
+ title: {
57
+ text: title,
58
+ align: titlePosition,
59
+ style: titleStyle,
60
+ },
61
+ colors: barColor, //bar color
62
+ };
63
+ const series = [
64
+ {
65
+ name: "Data",
66
+ data: data,
67
+ },
68
+ ];
69
+ return (
70
+ <div>
71
+ <ReactApexChart
72
+ options={options}
73
+ series={series}
74
+ type="bar"
75
+ height={height}
76
+ width={width}
77
+ />
78
+ </div>
79
+ );
80
+ }
@@ -0,0 +1,20 @@
1
+ import { ApexOptions } from "apexcharts";
2
+ export type ApexBarChartProps = {
3
+ data: number[];
4
+ Labels: string[];
5
+ title?: string;
6
+ titlePosition?: 'left' | 'center' | 'right';
7
+ height?: number;
8
+ width?: number;
9
+ barColor?: string[];
10
+ xAxisStyle?: StyleProps;
11
+ yAxisStyle?: StyleProps;
12
+ titleStyle?: StyleProps;
13
+ };
14
+
15
+ type StyleProps = {
16
+ fontSize?: string
17
+ fontFamily?: string
18
+ fontWeight?: string | number
19
+ color?: string
20
+ }
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import { StoryFn, Meta } from '@storybook/react';
3
+ import ApexPieChart from './ApexPieChart';
4
+ import { ApexPieChartProps } from './ApexPieChartProps';
5
+
6
+ export default {
7
+ title: 'Components/ApexCharts/ApexPieChart',
8
+ component: ApexPieChart,
9
+ argTypes: {
10
+ backgroundColor: { control: 'color' },
11
+ },
12
+ } as Meta;
13
+
14
+ const Template: StoryFn<ApexPieChartProps> = (args) => <ApexPieChart {...args} />;
15
+
16
+ export const Primary = Template.bind({});
17
+ Primary.args = {
18
+ data: [44, 55, 41, 64, 22, 43, 21],
19
+ labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
20
+ title: 'Weekly Sales',
21
+ titlePosition: 'left',
22
+ height: 400,
23
+ width: 500,
24
+ chartColor: ['#3182ce', '#ff6384', '#36a2eb', '#cc65fe', '#ffce56', '#ff6384', '#36a2eb'],
25
+ titleStyle: {
26
+ color: '#3182ce',
27
+ fontSize: '16px',
28
+ fontWeight: 600,
29
+ fontFamily: 'Arial',
30
+ },
31
+ };
32
+
33
+ // You can add more variations of the component by adding more exports like the Primary example.