@gadagi/design-system 1.0.5 → 1.0.6
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.
- package/dist/adi-design-system/components/Badge/Badge.d.ts +9 -0
- package/dist/adi-design-system/components/Badge/Badge.d.ts.map +1 -0
- package/dist/adi-design-system/components/Badge/index.d.ts +2 -0
- package/dist/adi-design-system/components/Badge/index.d.ts.map +1 -0
- package/dist/adi-design-system/components/Button/Button.d.ts +12 -0
- package/dist/adi-design-system/components/Button/Button.d.ts.map +1 -0
- package/dist/adi-design-system/components/Button/index.d.ts +3 -0
- package/dist/adi-design-system/components/Button/index.d.ts.map +1 -0
- package/dist/adi-design-system/components/Input/Input.d.ts +10 -0
- package/dist/adi-design-system/components/Input/Input.d.ts.map +1 -0
- package/dist/adi-design-system/components/Input/index.d.ts +2 -0
- package/dist/adi-design-system/components/Input/index.d.ts.map +1 -0
- package/dist/adi-design-system/index.d.ts +7 -0
- package/dist/adi-design-system/index.d.ts.map +1 -0
- package/dist/adi-design-system/index.js +1 -0
- package/dist/adi-design-system/theme/ThemeProvider.d.ts +10 -0
- package/dist/adi-design-system/theme/ThemeProvider.d.ts.map +1 -0
- package/dist/adi-design-system/theme/interfaces/theme.interface.d.ts +7 -0
- package/dist/adi-design-system/theme/interfaces/theme.interface.d.ts.map +1 -0
- package/dist/adi-design-system/theme/useTheme.d.ts +2 -0
- package/dist/adi-design-system/theme/useTheme.d.ts.map +1 -0
- package/dist/adi-design-system/tokens/colors.d.ts +75 -0
- package/dist/adi-design-system/tokens/colors.d.ts.map +1 -0
- package/dist/adi-design-system/tokens/index.d.ts +4 -0
- package/dist/adi-design-system/tokens/index.d.ts.map +1 -0
- package/dist/adi-design-system/tokens/spacing.d.ts +14 -0
- package/dist/adi-design-system/tokens/spacing.d.ts.map +1 -0
- package/dist/adi-design-system/tokens/typography.d.ts +22 -0
- package/dist/adi-design-system/tokens/typography.d.ts.map +1 -0
- package/dist/components/Badge/Badge.d.ts +9 -0
- package/dist/components/Badge/Badge.d.ts.map +1 -0
- package/dist/components/Badge/Badge.js +23 -0
- package/dist/components/Badge/Badge.js.map +1 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Badge/index.d.ts.map +1 -0
- package/dist/components/Badge/index.js +2 -0
- package/dist/components/Badge/index.js.map +1 -0
- package/dist/components/Button/Button.d.ts +12 -0
- package/dist/components/Button/Button.d.ts.map +1 -0
- package/dist/components/Button/Button.js +33 -0
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/Button/index.d.ts +3 -0
- package/dist/components/Button/index.d.ts.map +1 -0
- package/dist/components/Button/index.js +2 -0
- package/dist/components/Button/index.js.map +1 -0
- package/dist/components/Input/Input.d.ts +10 -0
- package/dist/components/Input/Input.d.ts.map +1 -0
- package/dist/components/Input/Input.js +20 -0
- package/dist/components/Input/Input.js.map +1 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Input/index.d.ts.map +1 -0
- package/dist/components/Input/index.js +2 -0
- package/dist/components/Input/index.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/theme/ThemeProvider.d.ts +10 -0
- package/dist/theme/ThemeProvider.d.ts.map +1 -0
- package/dist/theme/ThemeProvider.js +12 -0
- package/dist/theme/ThemeProvider.js.map +1 -0
- package/dist/theme/interfaces/theme.interface.d.ts +6 -0
- package/dist/theme/interfaces/theme.interface.d.ts.map +1 -0
- package/dist/theme/interfaces/theme.interface.js +2 -0
- package/dist/theme/interfaces/theme.interface.js.map +1 -0
- package/dist/theme/useTheme.d.ts +2 -0
- package/dist/theme/useTheme.d.ts.map +1 -0
- package/dist/theme/useTheme.js +2 -0
- package/dist/theme/useTheme.js.map +1 -0
- package/dist/tokens/colors.d.ts +114 -0
- package/dist/tokens/colors.d.ts.map +1 -0
- package/dist/tokens/colors.js +115 -0
- package/dist/tokens/colors.js.map +1 -0
- package/dist/tokens/index.d.ts +4 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/{src/tokens/index.ts → dist/tokens/index.js} +3 -2
- package/dist/tokens/index.js.map +1 -0
- package/dist/tokens/spacing.d.ts +14 -0
- package/dist/tokens/spacing.d.ts.map +1 -0
- package/dist/tokens/spacing.js +14 -0
- package/dist/tokens/spacing.js.map +1 -0
- package/dist/tokens/typography.d.ts +22 -0
- package/dist/tokens/typography.d.ts.map +1 -0
- package/dist/tokens/typography.js +22 -0
- package/dist/tokens/typography.js.map +1 -0
- package/package.json +7 -7
- package/src/components/Badge/Badge.tsx +0 -37
- package/src/components/Badge/index.ts +0 -1
- package/src/components/Button/Button.tsx +0 -59
- package/src/components/Button/index.ts +0 -2
- package/src/components/Input/Input.tsx +0 -55
- package/src/components/Input/index.ts +0 -1
- package/src/index.ts +0 -6
- package/src/theme/ThemeProvider.tsx +0 -27
- package/src/theme/interfaces/theme.interface.ts +0 -6
- package/src/theme/useTheme.ts +0 -1
- package/src/tokens/colors.ts +0 -116
- package/src/tokens/spacing.ts +0 -13
- package/src/tokens/typography.ts +0 -21
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
export declare const colors: {
|
|
2
|
+
readonly primary: {
|
|
3
|
+
readonly 50: "#f0f0ff";
|
|
4
|
+
readonly 100: "#e6e6ff";
|
|
5
|
+
readonly 200: "#ccc9ff";
|
|
6
|
+
readonly 300: "#b3acff";
|
|
7
|
+
readonly 400: "#998fff";
|
|
8
|
+
readonly 500: "#4a3fb5";
|
|
9
|
+
readonly 600: "#4235a3";
|
|
10
|
+
readonly 700: "#3a2c91";
|
|
11
|
+
readonly 800: "#32247f";
|
|
12
|
+
readonly 900: "#2a1f5f";
|
|
13
|
+
};
|
|
14
|
+
readonly neutral: {
|
|
15
|
+
readonly 50: "#f8fafc";
|
|
16
|
+
readonly 100: "#ebedef";
|
|
17
|
+
readonly 200: "#e2e8f0";
|
|
18
|
+
readonly 300: "#cbd5e1";
|
|
19
|
+
readonly 400: "#94a3b8";
|
|
20
|
+
readonly 500: "#64748b";
|
|
21
|
+
readonly 600: "#4b5463";
|
|
22
|
+
readonly 700: "#374151";
|
|
23
|
+
readonly 800: "#1e293b";
|
|
24
|
+
readonly 900: "#0f172a";
|
|
25
|
+
};
|
|
26
|
+
readonly success: {
|
|
27
|
+
readonly 50: "#f0fdf4";
|
|
28
|
+
readonly 100: "#dcfce7";
|
|
29
|
+
readonly 200: "#bbf7d0";
|
|
30
|
+
readonly 300: "#86efac";
|
|
31
|
+
readonly 400: "#4ade80";
|
|
32
|
+
readonly 500: "#2fb855";
|
|
33
|
+
readonly 600: "#16a34a";
|
|
34
|
+
readonly 700: "#15803d";
|
|
35
|
+
readonly 800: "#166534";
|
|
36
|
+
readonly 900: "#14532d";
|
|
37
|
+
};
|
|
38
|
+
readonly warning: {
|
|
39
|
+
readonly 50: "#fffbeb";
|
|
40
|
+
readonly 100: "#fef3c7";
|
|
41
|
+
readonly 200: "#fde68a";
|
|
42
|
+
readonly 300: "#fcd34d";
|
|
43
|
+
readonly 400: "#fbbf24";
|
|
44
|
+
readonly 500: "#e6a110";
|
|
45
|
+
readonly 600: "#d97706";
|
|
46
|
+
readonly 700: "#b45309";
|
|
47
|
+
readonly 800: "#92400e";
|
|
48
|
+
readonly 900: "#78350f";
|
|
49
|
+
};
|
|
50
|
+
readonly danger: {
|
|
51
|
+
readonly 50: "#fef2f2";
|
|
52
|
+
readonly 100: "#fee2e2";
|
|
53
|
+
readonly 200: "#fecaca";
|
|
54
|
+
readonly 300: "#fca5a5";
|
|
55
|
+
readonly 400: "#f87171";
|
|
56
|
+
readonly 500: "#dc4c4c";
|
|
57
|
+
readonly 600: "#dc2626";
|
|
58
|
+
readonly 700: "#b91c1c";
|
|
59
|
+
readonly 800: "#991b1b";
|
|
60
|
+
readonly 900: "#7f1d1d";
|
|
61
|
+
};
|
|
62
|
+
readonly info: {
|
|
63
|
+
readonly 50: "#eff6ff";
|
|
64
|
+
readonly 100: "#dbeafe";
|
|
65
|
+
readonly 200: "#bfdbfe";
|
|
66
|
+
readonly 300: "#93c5fd";
|
|
67
|
+
readonly 400: "#60a5fa";
|
|
68
|
+
readonly 500: "#2d7fd8";
|
|
69
|
+
readonly 600: "#2563eb";
|
|
70
|
+
readonly 700: "#1d4ed8";
|
|
71
|
+
readonly 800: "#1e40af";
|
|
72
|
+
readonly 900: "#1e3a8a";
|
|
73
|
+
};
|
|
74
|
+
readonly light: "#ebedef";
|
|
75
|
+
readonly dark: "#4b5463";
|
|
76
|
+
};
|
|
77
|
+
export declare const darkColors: {
|
|
78
|
+
readonly primary: {
|
|
79
|
+
readonly 50: "#1a1a2e";
|
|
80
|
+
readonly 100: "#252542";
|
|
81
|
+
readonly 500: "#7c71e6";
|
|
82
|
+
readonly 600: "#8b82eb";
|
|
83
|
+
readonly 700: "#9a93f0";
|
|
84
|
+
readonly 900: "#b8b3f5";
|
|
85
|
+
};
|
|
86
|
+
readonly neutral: {
|
|
87
|
+
readonly 50: "#0f172a";
|
|
88
|
+
readonly 100: "#1e293b";
|
|
89
|
+
readonly 200: "#334155";
|
|
90
|
+
readonly 400: "#64748b";
|
|
91
|
+
readonly 600: "#cbd5e1";
|
|
92
|
+
readonly 800: "#f1f5f9";
|
|
93
|
+
readonly 900: "#f8fafc";
|
|
94
|
+
};
|
|
95
|
+
readonly success: {
|
|
96
|
+
readonly 500: "#4ade80";
|
|
97
|
+
readonly 100: "#14532d";
|
|
98
|
+
};
|
|
99
|
+
readonly warning: {
|
|
100
|
+
readonly 500: "#fbbf24";
|
|
101
|
+
readonly 100: "#713f12";
|
|
102
|
+
};
|
|
103
|
+
readonly danger: {
|
|
104
|
+
readonly 500: "#f87171";
|
|
105
|
+
readonly 100: "#7f1d1d";
|
|
106
|
+
};
|
|
107
|
+
readonly info: {
|
|
108
|
+
readonly 500: "#60a5fa";
|
|
109
|
+
readonly 100: "#1e3a8a";
|
|
110
|
+
};
|
|
111
|
+
readonly light: "#f8fafc";
|
|
112
|
+
readonly dark: "#0f172a";
|
|
113
|
+
};
|
|
114
|
+
//# sourceMappingURL=colors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/tokens/colors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2ET,CAAC;AAGX,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCb,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
export const colors = {
|
|
2
|
+
primary: {
|
|
3
|
+
50: '#f0f0ff',
|
|
4
|
+
100: '#e6e6ff',
|
|
5
|
+
200: '#ccc9ff',
|
|
6
|
+
300: '#b3acff',
|
|
7
|
+
400: '#998fff',
|
|
8
|
+
500: '#4a3fb5', // WCAG compliant version of #5447c7
|
|
9
|
+
600: '#4235a3',
|
|
10
|
+
700: '#3a2c91',
|
|
11
|
+
800: '#32247f',
|
|
12
|
+
900: '#2a1f5f',
|
|
13
|
+
},
|
|
14
|
+
neutral: {
|
|
15
|
+
50: '#f8fafc',
|
|
16
|
+
100: '#ebedef', // Your lightColor
|
|
17
|
+
200: '#e2e8f0',
|
|
18
|
+
300: '#cbd5e1',
|
|
19
|
+
400: '#94a3b8',
|
|
20
|
+
500: '#64748b',
|
|
21
|
+
600: '#4b5463', // Your darkColor
|
|
22
|
+
700: '#374151',
|
|
23
|
+
800: '#1e293b',
|
|
24
|
+
900: '#0f172a',
|
|
25
|
+
},
|
|
26
|
+
success: {
|
|
27
|
+
50: '#f0fdf4',
|
|
28
|
+
100: '#dcfce7',
|
|
29
|
+
200: '#bbf7d0',
|
|
30
|
+
300: '#86efac',
|
|
31
|
+
400: '#4ade80',
|
|
32
|
+
500: '#2fb855', // WCAG compliant version of #36cd69
|
|
33
|
+
600: '#16a34a',
|
|
34
|
+
700: '#15803d',
|
|
35
|
+
800: '#166534',
|
|
36
|
+
900: '#14532d',
|
|
37
|
+
},
|
|
38
|
+
warning: {
|
|
39
|
+
50: '#fffbeb',
|
|
40
|
+
100: '#fef3c7',
|
|
41
|
+
200: '#fde68a',
|
|
42
|
+
300: '#fcd34d',
|
|
43
|
+
400: '#fbbf24',
|
|
44
|
+
500: '#e6a110', // WCAG compliant version of #f9b115
|
|
45
|
+
600: '#d97706',
|
|
46
|
+
700: '#b45309',
|
|
47
|
+
800: '#92400e',
|
|
48
|
+
900: '#78350f',
|
|
49
|
+
},
|
|
50
|
+
danger: {
|
|
51
|
+
50: '#fef2f2',
|
|
52
|
+
100: '#fee2e2',
|
|
53
|
+
200: '#fecaca',
|
|
54
|
+
300: '#fca5a5',
|
|
55
|
+
400: '#f87171',
|
|
56
|
+
500: '#dc4c4c', // WCAG compliant version of #e55353
|
|
57
|
+
600: '#dc2626',
|
|
58
|
+
700: '#b91c1c',
|
|
59
|
+
800: '#991b1b',
|
|
60
|
+
900: '#7f1d1d',
|
|
61
|
+
},
|
|
62
|
+
info: {
|
|
63
|
+
50: '#eff6ff',
|
|
64
|
+
100: '#dbeafe',
|
|
65
|
+
200: '#bfdbfe',
|
|
66
|
+
300: '#93c5fd',
|
|
67
|
+
400: '#60a5fa',
|
|
68
|
+
500: '#2d7fd8', // WCAG compliant version of #3090f1
|
|
69
|
+
600: '#2563eb',
|
|
70
|
+
700: '#1d4ed8',
|
|
71
|
+
800: '#1e40af',
|
|
72
|
+
900: '#1e3a8a',
|
|
73
|
+
},
|
|
74
|
+
light: '#ebedef', // Your lightColor
|
|
75
|
+
dark: '#4b5463', // Your darkColor
|
|
76
|
+
};
|
|
77
|
+
// Dark Theme Tokens - High contrast versions for dark backgrounds
|
|
78
|
+
export const darkColors = {
|
|
79
|
+
primary: {
|
|
80
|
+
50: '#1a1a2e',
|
|
81
|
+
100: '#252542',
|
|
82
|
+
500: '#7c71e6', // Lighter purple for dark backgrounds
|
|
83
|
+
600: '#8b82eb',
|
|
84
|
+
700: '#9a93f0',
|
|
85
|
+
900: '#b8b3f5',
|
|
86
|
+
},
|
|
87
|
+
neutral: {
|
|
88
|
+
50: '#0f172a',
|
|
89
|
+
100: '#1e293b',
|
|
90
|
+
200: '#334155',
|
|
91
|
+
400: '#64748b',
|
|
92
|
+
600: '#cbd5e1', // Light gray for dark text
|
|
93
|
+
800: '#f1f5f9',
|
|
94
|
+
900: '#f8fafc',
|
|
95
|
+
},
|
|
96
|
+
success: {
|
|
97
|
+
500: '#4ade80', // Bright green for dark backgrounds
|
|
98
|
+
100: '#14532d',
|
|
99
|
+
},
|
|
100
|
+
warning: {
|
|
101
|
+
500: '#fbbf24', // Bright amber for dark backgrounds
|
|
102
|
+
100: '#713f12',
|
|
103
|
+
},
|
|
104
|
+
danger: {
|
|
105
|
+
500: '#f87171', // Bright red for dark backgrounds
|
|
106
|
+
100: '#7f1d1d',
|
|
107
|
+
},
|
|
108
|
+
info: {
|
|
109
|
+
500: '#60a5fa', // Bright blue for dark backgrounds
|
|
110
|
+
100: '#1e3a8a',
|
|
111
|
+
},
|
|
112
|
+
light: '#f8fafc', // Light text color for dark theme
|
|
113
|
+
dark: '#0f172a', // Dark background color
|
|
114
|
+
};
|
|
115
|
+
//# sourceMappingURL=colors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../src/tokens/colors.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,OAAO,EAAE;QACP,EAAE,EAAG,SAAS;QACd,GAAG,EAAE,SAAS;QACd,GAAG,EAAE,SAAS;QACd,GAAG,EAAE,SAAS;QACd,GAAG,EAAE,SAAS;QACd,GAAG,EAAE,SAAS,EAAG,oCAAoC;QACrD,GAAG,EAAE,SAAS;QACd,GAAG,EAAE,SAAS;QACd,GAAG,EAAE,SAAS;QACd,GAAG,EAAE,SAAS;KACf;IACD,OAAO,E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CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tokens/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const spacing: {
|
|
2
|
+
readonly 0: "0";
|
|
3
|
+
readonly 1: "0.25rem";
|
|
4
|
+
readonly 2: "0.5rem";
|
|
5
|
+
readonly 3: "0.75rem";
|
|
6
|
+
readonly 4: "1rem";
|
|
7
|
+
readonly 5: "1.25rem";
|
|
8
|
+
readonly 6: "1.5rem";
|
|
9
|
+
readonly 8: "2rem";
|
|
10
|
+
readonly 10: "2.5rem";
|
|
11
|
+
readonly 12: "3rem";
|
|
12
|
+
readonly 16: "4rem";
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=spacing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["../../src/tokens/spacing.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;;;;;;;;;;;CAYV,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spacing.js","sourceRoot":"","sources":["../../src/tokens/spacing.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,CAAC,EAAI,GAAG;IACR,CAAC,EAAI,SAAS;IACd,CAAC,EAAI,QAAQ;IACb,CAAC,EAAI,SAAS;IACd,CAAC,EAAI,MAAM;IACX,CAAC,EAAI,SAAS;IACd,CAAC,EAAI,QAAQ;IACb,CAAC,EAAI,MAAM;IACX,EAAE,EAAG,QAAQ;IACb,EAAE,EAAG,MAAM;IACX,EAAE,EAAG,MAAM;CACH,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const typography: {
|
|
2
|
+
readonly fontFamily: {
|
|
3
|
+
readonly sans: "\"Inter\", -apple-system, BlinkMacSystemFont, sans-serif";
|
|
4
|
+
readonly mono: "\"JetBrains Mono\", \"Fira Code\", monospace";
|
|
5
|
+
};
|
|
6
|
+
readonly fontSize: {
|
|
7
|
+
readonly xs: "0.75rem";
|
|
8
|
+
readonly sm: "0.875rem";
|
|
9
|
+
readonly base: "1rem";
|
|
10
|
+
readonly lg: "1.125rem";
|
|
11
|
+
readonly xl: "1.25rem";
|
|
12
|
+
readonly '2xl': "1.5rem";
|
|
13
|
+
readonly '3xl': "1.875rem";
|
|
14
|
+
};
|
|
15
|
+
readonly fontWeight: {
|
|
16
|
+
readonly normal: 400;
|
|
17
|
+
readonly medium: 500;
|
|
18
|
+
readonly semibold: 600;
|
|
19
|
+
readonly bold: 700;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=typography.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../src/tokens/typography.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;CAoBb,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const typography = {
|
|
2
|
+
fontFamily: {
|
|
3
|
+
sans: '"Inter", -apple-system, BlinkMacSystemFont, sans-serif',
|
|
4
|
+
mono: '"JetBrains Mono", "Fira Code", monospace',
|
|
5
|
+
},
|
|
6
|
+
fontSize: {
|
|
7
|
+
xs: '0.75rem',
|
|
8
|
+
sm: '0.875rem',
|
|
9
|
+
base: '1rem',
|
|
10
|
+
lg: '1.125rem',
|
|
11
|
+
xl: '1.25rem',
|
|
12
|
+
'2xl': '1.5rem',
|
|
13
|
+
'3xl': '1.875rem',
|
|
14
|
+
},
|
|
15
|
+
fontWeight: {
|
|
16
|
+
normal: 400,
|
|
17
|
+
medium: 500,
|
|
18
|
+
semibold: 600,
|
|
19
|
+
bold: 700,
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=typography.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typography.js","sourceRoot":"","sources":["../../src/tokens/typography.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,UAAU,EAAE;QACV,IAAI,EAAG,wDAAwD;QAC/D,IAAI,EAAG,0CAA0C;KAClD;IACD,QAAQ,EAAE;QACR,EAAE,EAAI,SAAS;QACf,EAAE,EAAI,UAAU;QAChB,IAAI,EAAE,MAAM;QACZ,EAAE,EAAI,UAAU;QAChB,EAAE,EAAI,SAAS;QACf,KAAK,EAAC,QAAQ;QACd,KAAK,EAAC,UAAU;KACjB;IACD,UAAU,EAAE;QACV,MAAM,EAAG,GAAG;QACZ,MAAM,EAAG,GAAG;QACZ,QAAQ,EAAC,GAAG;QACZ,IAAI,EAAK,GAAG;KACb;CACO,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gadagi/design-system",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Design system for gadagi micro-frontends",
|
|
5
|
-
"main": "
|
|
6
|
-
"module": "
|
|
7
|
-
"types": "
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
-
"types": "./
|
|
11
|
-
"default": "./
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
|
-
"files": ["
|
|
14
|
+
"files": ["dist"],
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "tsc && echo 'export * from \"./src/index\";' > dist/adi-design-system/index.js",
|
|
17
17
|
"dev": "tsc --watch"
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { colors, spacing, typography } from '../../tokens';
|
|
3
|
-
|
|
4
|
-
type BadgeVariant = 'default' | 'success' | 'warning' | 'danger' | 'info';
|
|
5
|
-
|
|
6
|
-
interface BadgeProps {
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
variant?: BadgeVariant;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const badgeColors: Record<BadgeVariant, { bg: string; text: string }> = {
|
|
12
|
-
default: { bg: colors.neutral[100], text: colors.neutral[600] },
|
|
13
|
-
success: { bg: colors.success[100], text: '#15803d' },
|
|
14
|
-
warning: { bg: colors.warning[100], text: '#92400e' },
|
|
15
|
-
danger: { bg: colors.danger[100], text: '#b91c1c' },
|
|
16
|
-
info: { bg: colors.primary[100], text: colors.primary[700] },
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const Badge: React.FC<BadgeProps> = ({ children, variant = 'default' }) => {
|
|
20
|
-
const { bg, text } = badgeColors[variant];
|
|
21
|
-
return (
|
|
22
|
-
<span
|
|
23
|
-
style={{
|
|
24
|
-
display: 'inline-flex',
|
|
25
|
-
alignItems: 'center',
|
|
26
|
-
padding: `${spacing[0]} ${spacing[2]}`,
|
|
27
|
-
borderRadius: '9999px',
|
|
28
|
-
fontSize: typography.fontSize.xs,
|
|
29
|
-
fontWeight: typography.fontWeight.medium,
|
|
30
|
-
background: bg,
|
|
31
|
-
color: text,
|
|
32
|
-
}}
|
|
33
|
-
>
|
|
34
|
-
{children}
|
|
35
|
-
</span>
|
|
36
|
-
);
|
|
37
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Badge } from './Badge';
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import React, { ButtonHTMLAttributes } from 'react';
|
|
2
|
-
import { colors, spacing, typography } from '../../tokens';
|
|
3
|
-
|
|
4
|
-
type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'ghost';
|
|
5
|
-
type ButtonSize = 'sm' | 'md' | 'lg';
|
|
6
|
-
|
|
7
|
-
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
8
|
-
variant?: ButtonVariant;
|
|
9
|
-
size?: ButtonSize;
|
|
10
|
-
loading?: boolean;
|
|
11
|
-
fullWidth?: boolean;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const sizeStyles: Record<ButtonSize, React.CSSProperties> = {
|
|
15
|
-
sm: { padding: `${spacing[1]} ${spacing[3]}`, fontSize: typography.fontSize.sm },
|
|
16
|
-
md: { padding: `${spacing[2]} ${spacing[4]}`, fontSize: typography.fontSize.base },
|
|
17
|
-
lg: { padding: `${spacing[3]} ${spacing[6]}`, fontSize: typography.fontSize.lg },
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const variantStyles: Record<ButtonVariant, React.CSSProperties> = {
|
|
21
|
-
primary: { background: colors.primary[600], color: '#fff', border: 'none' },
|
|
22
|
-
secondary: { background: 'transparent', color: colors.primary[600], border: `1px solid ${colors.primary[600]}` },
|
|
23
|
-
danger: { background: colors.danger[500], color: '#fff', border: 'none' },
|
|
24
|
-
ghost: { background: 'transparent', color: colors.neutral[600], border: 'none' },
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const Button: React.FC<ButtonProps> = ({
|
|
28
|
-
variant = 'primary',
|
|
29
|
-
size = 'md',
|
|
30
|
-
loading = false,
|
|
31
|
-
fullWidth = false,
|
|
32
|
-
children,
|
|
33
|
-
disabled,
|
|
34
|
-
style,
|
|
35
|
-
...rest
|
|
36
|
-
}) => {
|
|
37
|
-
const baseStyle: React.CSSProperties = {
|
|
38
|
-
display: 'inline-flex',
|
|
39
|
-
alignItems: 'center',
|
|
40
|
-
justifyContent: 'center',
|
|
41
|
-
gap: spacing[2],
|
|
42
|
-
borderRadius: '6px',
|
|
43
|
-
fontWeight: typography.fontWeight.medium,
|
|
44
|
-
fontFamily: typography.fontFamily.sans,
|
|
45
|
-
cursor: disabled || loading ? 'not-allowed' : 'pointer',
|
|
46
|
-
opacity: disabled || loading ? 0.6 : 1,
|
|
47
|
-
width: fullWidth ? '100%' : undefined,
|
|
48
|
-
transition: 'opacity 0.15s, transform 0.1s',
|
|
49
|
-
...sizeStyles[size],
|
|
50
|
-
...variantStyles[variant],
|
|
51
|
-
...style,
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
return (
|
|
55
|
-
<button style={baseStyle} disabled={disabled || loading} {...rest}>
|
|
56
|
-
{loading ? 'Loading...' : children}
|
|
57
|
-
</button>
|
|
58
|
-
);
|
|
59
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import React, { InputHTMLAttributes } from 'react';
|
|
2
|
-
import { colors, spacing, typography } from '../../tokens';
|
|
3
|
-
|
|
4
|
-
interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
5
|
-
label?: string;
|
|
6
|
-
error?: string;
|
|
7
|
-
hint?: string;
|
|
8
|
-
fullWidth?: boolean;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const Input: React.FC<InputProps> = ({
|
|
12
|
-
label,
|
|
13
|
-
error,
|
|
14
|
-
hint,
|
|
15
|
-
fullWidth = false,
|
|
16
|
-
id,
|
|
17
|
-
style,
|
|
18
|
-
...rest
|
|
19
|
-
}) => {
|
|
20
|
-
const inputId = id ?? label?.toLowerCase().replace(/\s+/g, '-');
|
|
21
|
-
|
|
22
|
-
const inputStyle: React.CSSProperties = {
|
|
23
|
-
display: 'block',
|
|
24
|
-
width: fullWidth ? '100%' : undefined,
|
|
25
|
-
padding: `${spacing[2]} ${spacing[3]}`,
|
|
26
|
-
fontSize: typography.fontSize.base,
|
|
27
|
-
fontFamily: typography.fontFamily.sans,
|
|
28
|
-
borderRadius: '6px',
|
|
29
|
-
border: `1px solid ${error ? colors.danger[500] : colors.neutral[200]}`,
|
|
30
|
-
outline: 'none',
|
|
31
|
-
background: '#fff',
|
|
32
|
-
color: colors.neutral[900],
|
|
33
|
-
...style,
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
return (
|
|
37
|
-
<div style={{ display: 'flex', flexDirection: 'column', gap: spacing[1] }}>
|
|
38
|
-
{label && (
|
|
39
|
-
<label
|
|
40
|
-
htmlFor={inputId}
|
|
41
|
-
style={{ fontSize: typography.fontSize.sm, fontWeight: typography.fontWeight.medium, color: colors.neutral[600] }}
|
|
42
|
-
>
|
|
43
|
-
{label}
|
|
44
|
-
</label>
|
|
45
|
-
)}
|
|
46
|
-
<input id={inputId} style={inputStyle} {...rest} />
|
|
47
|
-
{error && (
|
|
48
|
-
<span style={{ fontSize: typography.fontSize.xs, color: colors.danger[500] }}>{error}</span>
|
|
49
|
-
)}
|
|
50
|
-
{hint && !error && (
|
|
51
|
-
<span style={{ fontSize: typography.fontSize.xs, color: colors.neutral[400] }}>{hint}</span>
|
|
52
|
-
)}
|
|
53
|
-
</div>
|
|
54
|
-
);
|
|
55
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Input } from './Input';
|
package/src/index.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { Button } from './components/Button';
|
|
2
|
-
export { Input } from './components/Input';
|
|
3
|
-
export { Badge } from './components/Badge';
|
|
4
|
-
export { ThemeProvider } from './theme/ThemeProvider';
|
|
5
|
-
export { useTheme } from './theme/useTheme';
|
|
6
|
-
export * from './tokens';
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React, { createContext, useContext, useState, ReactNode } from 'react';
|
|
2
|
-
import { ThemeContextValue, Theme } from './interfaces/theme.interface'
|
|
3
|
-
|
|
4
|
-
const ThemeContext = createContext<ThemeContextValue>({
|
|
5
|
-
theme: 'system',
|
|
6
|
-
setTheme: () => {},
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
interface ThemeProviderProps {
|
|
10
|
-
children: ReactNode;
|
|
11
|
-
defaultTheme?: Theme;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const ThemeProvider: React.FC<ThemeProviderProps> = ({
|
|
15
|
-
children,
|
|
16
|
-
defaultTheme = 'system',
|
|
17
|
-
}) => {
|
|
18
|
-
const [theme, setTheme] = useState<Theme>(defaultTheme);
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<ThemeContext.Provider value={{ theme, setTheme }}>
|
|
22
|
-
<div data-theme={theme}>{children}</div>
|
|
23
|
-
</ThemeContext.Provider>
|
|
24
|
-
);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const useTheme = (): ThemeContextValue => useContext(ThemeContext);
|
package/src/theme/useTheme.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useTheme } from './ThemeProvider';
|