cc-ui-library 1.0.1

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 (80) hide show
  1. package/.prettierrc.js +13 -0
  2. package/.storybook/main.ts +25 -0
  3. package/.storybook/preview.ts +24 -0
  4. package/.yarn/install-state.gz +0 -0
  5. package/.yarnrc.yml +1 -0
  6. package/README.md +25 -0
  7. package/dist/tsconfig.tsbuildinfo +1 -0
  8. package/index.scss +0 -0
  9. package/lib/assets/utils/functionUtils.d.ts +1 -0
  10. package/lib/components/Button/Button.d.ts +7 -0
  11. package/lib/components/Button/Button.stories.d.ts +10 -0
  12. package/lib/components/Button/index.d.ts +1 -0
  13. package/lib/components/Button/types.d.ts +68 -0
  14. package/lib/components/Icon/Icon.d.ts +4 -0
  15. package/lib/components/Icon/Icon.stories.d.ts +7 -0
  16. package/lib/components/Icon/iconList.d.ts +2 -0
  17. package/lib/components/Icon/index.d.ts +1 -0
  18. package/lib/components/Icon/types.d.ts +10 -0
  19. package/lib/components/Toggle/Toggle.d.ts +5 -0
  20. package/lib/components/Toggle/Toggle.stories.d.ts +9 -0
  21. package/lib/components/Toggle/index.d.ts +1 -0
  22. package/lib/components/Toggle/types.d.ts +22 -0
  23. package/lib/hooks/useClickOutside.d.ts +2 -0
  24. package/lib/index.d.ts +118 -0
  25. package/lib/index.esm.js +1054 -0
  26. package/lib/index.esm.js.map +1 -0
  27. package/lib/index.js +1079 -0
  28. package/lib/index.js.map +1 -0
  29. package/lib/tsconfig.tsbuildinfo +1 -0
  30. package/lib/utils/checkEmpty/checkEmpty.d.ts +3 -0
  31. package/lib/utils/checkEmpty/checkEmpty.stories.d.ts +6 -0
  32. package/package.json +58 -0
  33. package/rollup.config.mjs +57 -0
  34. package/src/assets/icons/logo.svg +18 -0
  35. package/src/assets/styles/_colors.scss +23 -0
  36. package/src/assets/styles/_rsfonts.scss +228 -0
  37. package/src/assets/utils/functionUtils.ts +5 -0
  38. package/src/components/Button/Button.scss +5 -0
  39. package/src/components/Button/Button.stories.tsx +56 -0
  40. package/src/components/Button/Button.tsx +38 -0
  41. package/src/components/Button/index.ts +1 -0
  42. package/src/components/Button/types.ts +71 -0
  43. package/src/components/Icon/Icon.stories.tsx +37 -0
  44. package/src/components/Icon/Icon.tsx +42 -0
  45. package/src/components/Icon/Icons.scss +33 -0
  46. package/src/components/Icon/iconList.ts +8 -0
  47. package/src/components/Icon/index.ts +1 -0
  48. package/src/components/Icon/types.ts +10 -0
  49. package/src/components/Toggle/Toggle.scss +153 -0
  50. package/src/components/Toggle/Toggle.stories.tsx +55 -0
  51. package/src/components/Toggle/Toggle.tsx +55 -0
  52. package/src/components/Toggle/index.ts +1 -0
  53. package/src/components/Toggle/types.ts +22 -0
  54. package/src/fonts/Montserrat/Montserrat-Medium.ttf +0 -0
  55. package/src/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  56. package/src/fonts/Montserrat/Montserrat-SemiBold.ttf +0 -0
  57. package/src/fonts/Poppins/Poppins-Black.ttf +0 -0
  58. package/src/fonts/Poppins/Poppins-BlackItalic.ttf +0 -0
  59. package/src/fonts/Poppins/Poppins-Bold.ttf +0 -0
  60. package/src/fonts/Poppins/Poppins-BoldItalic.ttf +0 -0
  61. package/src/fonts/Poppins/Poppins-ExtraBold.ttf +0 -0
  62. package/src/fonts/Poppins/Poppins-ExtraBoldItalic.ttf +0 -0
  63. package/src/fonts/Poppins/Poppins-ExtraLight.ttf +0 -0
  64. package/src/fonts/Poppins/Poppins-ExtraLightItalic.ttf +0 -0
  65. package/src/fonts/Poppins/Poppins-Italic.ttf +0 -0
  66. package/src/fonts/Poppins/Poppins-Light.ttf +0 -0
  67. package/src/fonts/Poppins/Poppins-LightItalic.ttf +0 -0
  68. package/src/fonts/Poppins/Poppins-Medium.ttf +0 -0
  69. package/src/fonts/Poppins/Poppins-MediumItalic.ttf +0 -0
  70. package/src/fonts/Poppins/Poppins-Regular.ttf +0 -0
  71. package/src/fonts/Poppins/Poppins-SemiBold.ttf +0 -0
  72. package/src/fonts/Poppins/Poppins-SemiBoldItalic.ttf +0 -0
  73. package/src/fonts/Poppins/Poppins-Thin.ttf +0 -0
  74. package/src/fonts/Poppins/Poppins-ThinItalic.ttf +0 -0
  75. package/src/hooks/useClickOutside.tsx +21 -0
  76. package/src/index.ts +13 -0
  77. package/src/utils/checkEmpty/checkEmpty.stories.tsx +34 -0
  78. package/src/utils/checkEmpty/checkEmpty.ts +10 -0
  79. package/tsconfig.json +52 -0
  80. package/vite.config.js +30 -0
package/tsconfig.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "compilerOptions": {
3
+ /* Language and Environment */
4
+ "target": "esnext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
5
+ "jsx": "react-jsx" /* Specify what JSX code is generated. */,
6
+
7
+ /* Modules */
8
+ "module": "ESNext" /* Specify what module code is generated. */,
9
+ "moduleResolution": "Node" /* Specify how TypeScript looks up a file from a given module specifier. */,
10
+
11
+ /* JavaScript Support */
12
+ "allowJs": false /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */,
13
+ "maxNodeModuleJsDepth": 1 /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */,
14
+
15
+ /* Emit */
16
+ "declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */,
17
+ // "emitDeclarationOnly": true /* Only output d.ts files and not JavaScript files. */,
18
+ "sourceMap": true /* Create source map files for emitted JavaScript files. */,
19
+ "outDir": "lib" /* Specify an output folder for all emitted files. */,
20
+ "declarationDir": "lib" /* Specify the output directory for generated declaration files. */,
21
+
22
+ /* Interop Constraints */
23
+ "allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */,
24
+ "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
25
+ "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
26
+
27
+ /* Type Checking */
28
+ "strict": true /* Enable all strict type-checking options. */,
29
+ "noUnusedLocals": true /* Enable error reporting when local variables aren't read. */,
30
+ "noUnusedParameters": true /* Raise an error when a function parameter isn't read. */,
31
+ "noImplicitReturns": true /* Enable error reporting for codepaths that do not explicitly return in a function. */,
32
+ "noFallthroughCasesInSwitch": true /* Enable error reporting for fallthrough cases in switch statements. */,
33
+ "noUncheckedIndexedAccess": true /* Add 'undefined' to a type when accessed using an index. */,
34
+ "allowUnreachableCode": false /* Disable error reporting for unreachable code. */,
35
+
36
+ /* Completeness */
37
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */,
38
+ "types": ["vite-plugin-svgr/client"],
39
+ "noEmit": true
40
+
41
+ // Path alias
42
+ // "paths": {
43
+ // "@components": ["./src/components/"],
44
+ // "@styles": ["./src/assets/styles/"],
45
+ // "@icons": ["./src/assets/icons/"],
46
+ // "@/*": ["./src/*"]
47
+ // }
48
+ },
49
+
50
+ "include": ["src"],
51
+ "exclude": ["node_modules", "lib"]
52
+ }
package/vite.config.js ADDED
@@ -0,0 +1,30 @@
1
+ import react from '@vitejs/plugin-react';
2
+ import path from 'path';
3
+ import svgrPlugin from 'vite-plugin-svgr';
4
+
5
+ export default {
6
+ plugins: [
7
+ react(),
8
+ svgrPlugin({
9
+ svgrOptions: {
10
+ icon: true,
11
+ },
12
+ }),
13
+ ],
14
+
15
+ // resolve: {
16
+ // alias: {
17
+ // '@components': path.resolve(__dirname, './src/components'),
18
+ // '@styles': path.resolve(__dirname, './src/assets/styles'),
19
+ // '@icons': path.resolve(__dirname, './src/assets/icons'),
20
+ // },
21
+ // },
22
+
23
+ // css: {
24
+ // preprocessorOptions: {
25
+ // scss: {
26
+ // additionalData: `@import "./src/assets/styles/_colors.scss";`,
27
+ // },
28
+ // },
29
+ // },
30
+ };