@gadagi/design-system 1.0.4 → 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 +8 -10
- 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,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type BadgeVariant = 'default' | 'success' | 'warning' | 'danger' | 'info';
|
|
3
|
+
interface BadgeProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
variant?: BadgeVariant;
|
|
6
|
+
}
|
|
7
|
+
export declare const Badge: React.FC<BadgeProps>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=Badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,KAAK,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE1E,UAAU,UAAU;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAUD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAkBtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Badge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'ghost';
|
|
3
|
+
type ButtonSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
variant?: ButtonVariant;
|
|
6
|
+
size?: ButtonSize;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
fullWidth?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const Button: React.FC<ButtonProps>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAGpD,KAAK,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAClE,KAAK,UAAU,GAAM,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAExC,UAAU,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IACnE,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAeD,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAgCxC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAG,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { InputHTMLAttributes } from 'react';
|
|
2
|
+
interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
label?: string;
|
|
4
|
+
error?: string;
|
|
5
|
+
hint?: string;
|
|
6
|
+
fullWidth?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const Input: React.FC<InputProps>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAGnD,UAAU,UAAW,SAAQ,mBAAmB,CAAC,gBAAgB,CAAC;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CA4CtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
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';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAa,qBAAqB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAc,oBAAoB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAc,oBAAoB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAW,kBAAkB,CAAC;AACjD,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'export * from "./src/index";'
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { ThemeContextValue, Theme } from './interfaces/theme.interface';
|
|
3
|
+
interface ThemeProviderProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
defaultTheme?: Theme;
|
|
6
|
+
}
|
|
7
|
+
export declare const ThemeProvider: React.FC<ThemeProviderProps>;
|
|
8
|
+
export declare const useTheme: () => ThemeContextValue;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../src/theme/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAuC,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AAOvE,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EAAE,KAAK,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAWtD,CAAC;AAEF,eAAO,MAAM,QAAQ,QAAO,iBAA6C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.interface.d.ts","sourceRoot":"","sources":["../../../../src/theme/interfaces/theme.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,MAAM,KAAK,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;AAE7C,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../src/theme/useTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export declare const colors: {
|
|
2
|
+
readonly primary: {
|
|
3
|
+
readonly 50: "#f0f0ff";
|
|
4
|
+
readonly 100: "#e6e6ff";
|
|
5
|
+
readonly 500: "#4a3fb5";
|
|
6
|
+
readonly 600: "#4235a3";
|
|
7
|
+
readonly 700: "#3a2c91";
|
|
8
|
+
readonly 900: "#2a1f5f";
|
|
9
|
+
};
|
|
10
|
+
readonly neutral: {
|
|
11
|
+
readonly 50: "#f8fafc";
|
|
12
|
+
readonly 100: "#ebedef";
|
|
13
|
+
readonly 200: "#e2e8f0";
|
|
14
|
+
readonly 400: "#94a3b8";
|
|
15
|
+
readonly 600: "#4b5463";
|
|
16
|
+
readonly 800: "#1e293b";
|
|
17
|
+
readonly 900: "#0f172a";
|
|
18
|
+
};
|
|
19
|
+
readonly success: {
|
|
20
|
+
readonly 500: "#2fb855";
|
|
21
|
+
readonly 100: "#dcfce7";
|
|
22
|
+
};
|
|
23
|
+
readonly warning: {
|
|
24
|
+
readonly 500: "#e6a110";
|
|
25
|
+
readonly 100: "#fef3c7";
|
|
26
|
+
};
|
|
27
|
+
readonly danger: {
|
|
28
|
+
readonly 500: "#dc4c4c";
|
|
29
|
+
readonly 100: "#fee2e2";
|
|
30
|
+
};
|
|
31
|
+
readonly info: {
|
|
32
|
+
readonly 500: "#2d7fd8";
|
|
33
|
+
readonly 100: "#dbeafe";
|
|
34
|
+
};
|
|
35
|
+
readonly light: "#ebedef";
|
|
36
|
+
readonly dark: "#4b5463";
|
|
37
|
+
};
|
|
38
|
+
export declare const darkColors: {
|
|
39
|
+
readonly primary: {
|
|
40
|
+
readonly 50: "#1a1a2e";
|
|
41
|
+
readonly 100: "#252542";
|
|
42
|
+
readonly 500: "#7c71e6";
|
|
43
|
+
readonly 600: "#8b82eb";
|
|
44
|
+
readonly 700: "#9a93f0";
|
|
45
|
+
readonly 900: "#b8b3f5";
|
|
46
|
+
};
|
|
47
|
+
readonly neutral: {
|
|
48
|
+
readonly 50: "#0f172a";
|
|
49
|
+
readonly 100: "#1e293b";
|
|
50
|
+
readonly 200: "#334155";
|
|
51
|
+
readonly 400: "#64748b";
|
|
52
|
+
readonly 600: "#cbd5e1";
|
|
53
|
+
readonly 800: "#f1f5f9";
|
|
54
|
+
readonly 900: "#f8fafc";
|
|
55
|
+
};
|
|
56
|
+
readonly success: {
|
|
57
|
+
readonly 500: "#4ade80";
|
|
58
|
+
readonly 100: "#14532d";
|
|
59
|
+
};
|
|
60
|
+
readonly warning: {
|
|
61
|
+
readonly 500: "#fbbf24";
|
|
62
|
+
readonly 100: "#713f12";
|
|
63
|
+
};
|
|
64
|
+
readonly danger: {
|
|
65
|
+
readonly 500: "#f87171";
|
|
66
|
+
readonly 100: "#7f1d1d";
|
|
67
|
+
};
|
|
68
|
+
readonly info: {
|
|
69
|
+
readonly 500: "#60a5fa";
|
|
70
|
+
readonly 100: "#1e3a8a";
|
|
71
|
+
};
|
|
72
|
+
readonly light: "#f8fafc";
|
|
73
|
+
readonly dark: "#0f172a";
|
|
74
|
+
};
|
|
75
|
+
//# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCT,CAAC;AAGX,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","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,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,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type BadgeVariant = 'default' | 'success' | 'warning' | 'danger' | 'info';
|
|
3
|
+
interface BadgeProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
variant?: BadgeVariant;
|
|
6
|
+
}
|
|
7
|
+
export declare const Badge: React.FC<BadgeProps>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=Badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,KAAK,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE1E,UAAU,UAAU;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAUD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAkBtC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { colors, spacing, typography } from '../../tokens';
|
|
3
|
+
const badgeColors = {
|
|
4
|
+
default: { bg: colors.neutral[100], text: colors.neutral[600] },
|
|
5
|
+
success: { bg: colors.success[100], text: '#15803d' },
|
|
6
|
+
warning: { bg: colors.warning[100], text: '#92400e' },
|
|
7
|
+
danger: { bg: colors.danger[100], text: '#b91c1c' },
|
|
8
|
+
info: { bg: colors.primary[100], text: colors.primary[700] },
|
|
9
|
+
};
|
|
10
|
+
export const Badge = ({ children, variant = 'default' }) => {
|
|
11
|
+
const { bg, text } = badgeColors[variant];
|
|
12
|
+
return (_jsx("span", { style: {
|
|
13
|
+
display: 'inline-flex',
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
padding: `${spacing[0]} ${spacing[2]}`,
|
|
16
|
+
borderRadius: '9999px',
|
|
17
|
+
fontSize: typography.fontSize.xs,
|
|
18
|
+
fontWeight: typography.fontWeight.medium,
|
|
19
|
+
background: bg,
|
|
20
|
+
color: text,
|
|
21
|
+
}, children: children }));
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=Badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,OAAO,E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+1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Badge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'ghost';
|
|
3
|
+
type ButtonSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
variant?: ButtonVariant;
|
|
6
|
+
size?: ButtonSize;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
fullWidth?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const Button: React.FC<ButtonProps>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAGpD,KAAK,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAClE,KAAK,UAAU,GAAM,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAExC,UAAU,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IACnE,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAeD,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAgCxC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { colors, spacing, typography } from '../../tokens';
|
|
3
|
+
const sizeStyles = {
|
|
4
|
+
sm: { padding: `${spacing[1]} ${spacing[3]}`, fontSize: typography.fontSize.sm },
|
|
5
|
+
md: { padding: `${spacing[2]} ${spacing[4]}`, fontSize: typography.fontSize.base },
|
|
6
|
+
lg: { padding: `${spacing[3]} ${spacing[6]}`, fontSize: typography.fontSize.lg },
|
|
7
|
+
};
|
|
8
|
+
const variantStyles = {
|
|
9
|
+
primary: { background: colors.primary[600], color: '#fff', border: 'none' },
|
|
10
|
+
secondary: { background: 'transparent', color: colors.primary[600], border: `1px solid ${colors.primary[600]}` },
|
|
11
|
+
danger: { background: colors.danger[500], color: '#fff', border: 'none' },
|
|
12
|
+
ghost: { background: 'transparent', color: colors.neutral[600], border: 'none' },
|
|
13
|
+
};
|
|
14
|
+
export const Button = ({ variant = 'primary', size = 'md', loading = false, fullWidth = false, children, disabled, style, ...rest }) => {
|
|
15
|
+
const baseStyle = {
|
|
16
|
+
display: 'inline-flex',
|
|
17
|
+
alignItems: 'center',
|
|
18
|
+
justifyContent: 'center',
|
|
19
|
+
gap: spacing[2],
|
|
20
|
+
borderRadius: '6px',
|
|
21
|
+
fontWeight: typography.fontWeight.medium,
|
|
22
|
+
fontFamily: typography.fontFamily.sans,
|
|
23
|
+
cursor: disabled || loading ? 'not-allowed' : 'pointer',
|
|
24
|
+
opacity: disabled || loading ? 0.6 : 1,
|
|
25
|
+
width: fullWidth ? '100%' : undefined,
|
|
26
|
+
transition: 'opacity 0.15s, transform 0.1s',
|
|
27
|
+
...sizeStyles[size],
|
|
28
|
+
...variantStyles[variant],
|
|
29
|
+
...style,
|
|
30
|
+
};
|
|
31
|
+
return (_jsx("button", { style: baseStyle, disabled: disabled || loading, ...rest, children: loading ? 'Loading...' : children }));
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAY3D,MAAM,UAAU,GAA4C;IAC1D,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE,EAAE;IAChF,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,IAAI,EAAE;IAClF,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE,EAAE;CACjF,CAAC;AAEF,MAAM,aAAa,GAA+C;IAChE,OAAO,EAAI,EAAE,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;IAC7E,SAAS,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,aAAa,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE;IAChH,MAAM,EAAK,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;IAC5E,KAAK,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["../../../src/components/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAG,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { InputHTMLAttributes } from 'react';
|
|
2
|
+
interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
label?: string;
|
|
4
|
+
error?: string;
|
|
5
|
+
hint?: string;
|
|
6
|
+
fullWidth?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const Input: React.FC<InputProps>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAGnD,UAAU,UAAW,SAAQ,mBAAmB,CAAC,gBAAgB,CAAC;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CA4CtC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { colors, spacing, typography } from '../../tokens';
|
|
3
|
+
export const Input = ({ label, error, hint, fullWidth = false, id, style, ...rest }) => {
|
|
4
|
+
const inputId = id ?? label?.toLowerCase().replace(/\s+/g, '-');
|
|
5
|
+
const inputStyle = {
|
|
6
|
+
display: 'block',
|
|
7
|
+
width: fullWidth ? '100%' : undefined,
|
|
8
|
+
padding: `${spacing[2]} ${spacing[3]}`,
|
|
9
|
+
fontSize: typography.fontSize.base,
|
|
10
|
+
fontFamily: typography.fontFamily.sans,
|
|
11
|
+
borderRadius: '6px',
|
|
12
|
+
border: `1px solid ${error ? colors.danger[500] : colors.neutral[200]}`,
|
|
13
|
+
outline: 'none',
|
|
14
|
+
background: '#fff',
|
|
15
|
+
color: colors.neutral[900],
|
|
16
|
+
...style,
|
|
17
|
+
};
|
|
18
|
+
return (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: spacing[1] }, children: [label && (_jsx("label", { htmlFor: inputId, style: { fontSize: typography.fontSize.sm, fontWeight: typography.fontWeight.medium, color: colors.neutral[600] }, children: label })), _jsx("input", { id: inputId, style: inputStyle, ...rest }), error && (_jsx("span", { style: { fontSize: typography.fontSize.xs, color: colors.danger[500] }, children: error })), hint && !error && (_jsx("span", { style: { fontSize: typography.fontSize.xs, color: colors.neutral[400] }, children: hint }))] }));
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=Input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAS3D,MAAM,CAAC,MAAM,KAAK,GAAyB,CAAC,EAC1C,KAAK,EACL,KAAK,EACL,IAAI,EACJ,SAAS,GAAG,KAAK,EACjB,EAAE,EACF,KAAK,EACL,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,OAAO,GAAG,EAAE,IAAI,KAAK,EAAE,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEhE,MAAM,UAAU,GAAwB;QACtC,OAAO,EAAE,O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AM,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,YAAG,IAAI,GAAQ,CAC7F,IACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
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';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAa,qBAAqB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAc,oBAAoB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAc,oBAAoB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAW,kBAAkB,CAAC;AACjD,cAAc,UAAU,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
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';
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAa,qBAAqB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAc,oBAAoB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAc,oBAAoB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAW,kBAAkB,CAAC;AACjD,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { ThemeContextValue, Theme } from './interfaces/theme.interface';
|
|
3
|
+
interface ThemeProviderProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
defaultTheme?: Theme;
|
|
6
|
+
}
|
|
7
|
+
export declare const ThemeProvider: React.FC<ThemeProviderProps>;
|
|
8
|
+
export declare const useTheme: () => ThemeContextValue;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAuC,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AAOvE,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EAAE,KAAK,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAWtD,CAAC;AAEF,eAAO,MAAM,QAAQ,QAAO,iBAA6C,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useContext, useState } from 'react';
|
|
3
|
+
const ThemeContext = createContext({
|
|
4
|
+
theme: 'system',
|
|
5
|
+
setTheme: () => { },
|
|
6
|
+
});
|
|
7
|
+
export const ThemeProvider = ({ children, defaultTheme = 'system', }) => {
|
|
8
|
+
const [theme, setTheme] = useState(defaultTheme);
|
|
9
|
+
return (_jsx(ThemeContext.Provider, { value: { theme, setTheme }, children: _jsx("div", { "data-theme": theme, children: children }) }));
|
|
10
|
+
};
|
|
11
|
+
export const useTheme = () => useContext(ThemeContext);
|
|
12
|
+
//# sourceMappingURL=ThemeProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeProvider.js","sourceRoot":"","sources":["../../src/theme/ThemeProvider.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAa,MAAM,OAAO,CAAC;AAG9E,MAAM,YAAY,GAAG,aAAa,CAAoB;IACpD,KAAK,EAAE,QAAQ;IACf,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC;CACnB,CAAC,CAAC;AAOH,MAAM,CAAC,MAAM,aAAa,GAAiC,CAAC,EAC1D,QAAQ,EACR,YAAY,GAAG,QAAQ,GACxB,EAAE,EAAE;IACH,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAQ,YAAY,CAAC,CAAC;IAExD,OAAO,CACL,KAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,YAC/C,4BAAiB,KAAK,YAAG,QAAQ,GAAO,GAClB,CACzB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAsB,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.interface.d.ts","sourceRoot":"","sources":["../../../src/theme/interfaces/theme.interface.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEhD,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.interface.js","sourceRoot":"","sources":["../../../src/theme/interfaces/theme.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/theme/useTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTheme.js","sourceRoot":"","sources":["../../src/theme/useTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC"}
|