hisd3-ui-kit 1.0.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.
@@ -0,0 +1,129 @@
1
+ import { LayoutDirection, ThemeMode } from "../enum/theme";
2
+
3
+ interface FontSize {
4
+ xs: string;
5
+ sm: string;
6
+ md: string;
7
+ lg: string;
8
+ xl: string;
9
+ xxl: string;
10
+ }
11
+
12
+ interface FontWeight {
13
+ light: string;
14
+ regular: string;
15
+ medium: string;
16
+ bold: string;
17
+ lg: string; // Assuming 'lg' is for large font weight
18
+ }
19
+
20
+ interface Font {
21
+ size: FontSize;
22
+ weight: FontWeight;
23
+ }
24
+
25
+ interface Palette {
26
+ mode: ThemeMode;
27
+ borderColor: string;
28
+ dividerColor: string;
29
+ tooltipBg: string;
30
+ background: string;
31
+ primary: {
32
+ main: string;
33
+ contrastText: string;
34
+ };
35
+ secondary: {
36
+ main: string;
37
+ };
38
+ success: {
39
+ main: string;
40
+ light: string;
41
+ };
42
+ warning: {
43
+ main: string;
44
+ light: string;
45
+ };
46
+ gray: {
47
+ 50: string;
48
+ 100: string;
49
+ 200: string;
50
+ 300: string;
51
+ 400: string;
52
+ 500: string;
53
+ 600: string;
54
+ 700: string;
55
+ 800: string;
56
+ 900: string;
57
+ A100: string;
58
+ A200: string;
59
+ A400: string;
60
+ A700: string;
61
+ };
62
+ black: string;
63
+ white: string;
64
+ orange: {
65
+ 5: string;
66
+ 6: string;
67
+ };
68
+ cyan: {
69
+ 7: string;
70
+ };
71
+ red: {
72
+ 6: string;
73
+ };
74
+ green: {
75
+ 3: string;
76
+ 5: string;
77
+ 6: string;
78
+ 7: string;
79
+ };
80
+ blue: {
81
+ 5: string;
82
+ 7: string;
83
+ };
84
+ text: string;
85
+ }
86
+
87
+ interface Sidebar {
88
+ light: string;
89
+ dark: string;
90
+ }
91
+
92
+ interface Breakpoints {
93
+ xs: number;
94
+ sm: number;
95
+ md: number;
96
+ lg: number;
97
+ xl: number;
98
+ xxl: number;
99
+ }
100
+
101
+ interface Sizes {
102
+ line: {
103
+ base: number;
104
+ };
105
+ borderRadius: {
106
+ base: string;
107
+ circle: string;
108
+ };
109
+ framed: {
110
+ base: string;
111
+ };
112
+ }
113
+
114
+ export interface StyledTheme {
115
+ spacing: number;
116
+ cardRadius: string;
117
+ cardRadius30: string;
118
+ cardShadow: string;
119
+ direction: LayoutDirection;
120
+ palette: Palette;
121
+ status: {
122
+ danger: string;
123
+ };
124
+ divider: string;
125
+ font: Font;
126
+ sidebar: Sidebar;
127
+ breakpoints: Breakpoints;
128
+ sizes: Sizes;
129
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ESNext", // Utilize modern JavaScript features
4
+ "module": "ESNext", // Enable ES Modules
5
+ "moduleResolution": "node", // Use Node.js module resolution
6
+ "jsx": "react-jsx", // JSX Transform for React 18
7
+ "outDir": "./dist", // Output compiled files to 'dist' directory
8
+ "esModuleInterop": true, // Ensure compatibility with CommonJS and ES Modules
9
+ "skipLibCheck": true, // Skip type checking of library files (improves performance)
10
+ "strict": true, // Enable all strict type-checking options
11
+ "declaration": true, // Generate .d.ts declaration files
12
+ "forceConsistentCasingInFileNames": true, // Ensure consistent casing in file names
13
+ "allowJs": true, // Allow JavaScript files to be imported into the TypeScript project
14
+ "resolveJsonModule": true // Allow importing JSON files as modules
15
+ },
16
+ "include": ["src"], // Include all TypeScript files in 'src' folder
17
+ "exclude": ["node_modules"] // Exclude 'node_modules' folder
18
+ }
@@ -0,0 +1,45 @@
1
+ const path = require("path");
2
+ const TerserPlugin = require("terser-webpack-plugin");
3
+ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
4
+
5
+ module.exports = {
6
+ entry: "./src/index.ts", // Entry file for your component library
7
+ output: {
8
+ path: path.resolve(__dirname, "dist"),
9
+ filename: "index.js",
10
+ library: "HISD3UIKIT", // Expose your component under a global name
11
+ libraryTarget: "umd", // UMD allows for various module systems (CommonJS, AMD, or as a global)
12
+ umdNamedDefine: true, // Ensures proper module naming when using UMD
13
+ },
14
+ resolve: {
15
+ extensions: [".ts", ".tsx", ".js", ".jsx"], // Resolve TypeScript and JavaScript files
16
+ },
17
+ module: {
18
+ rules: [
19
+ {
20
+ test: /\.tsx?$/,
21
+ use: "ts-loader",
22
+ exclude: /node_modules/,
23
+ },
24
+ {
25
+ test: /\.jsx?$/,
26
+ use: "babel-loader",
27
+ exclude: /node_modules/,
28
+ },
29
+ {
30
+ test: /\.css$/,
31
+ use: [MiniCssExtractPlugin.loader, "css-loader"],
32
+ },
33
+ ],
34
+ },
35
+ optimization: {
36
+ minimize: true,
37
+ minimizer: [new TerserPlugin()], // Minify the output for smaller bundle size
38
+ },
39
+ externals: {
40
+ // Externalize React and ReactDOM (you don't want to bundle these)
41
+ react: "React",
42
+ "react-dom": "ReactDOM",
43
+ "styled-components": "styled-components",
44
+ },
45
+ };