@dryanovski/react-native-components 1.0.3 → 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.
Files changed (33) hide show
  1. package/lib/module/themes/colors.js +122 -0
  2. package/lib/module/themes/colors.js.map +1 -0
  3. package/lib/module/themes/light.js +17 -7
  4. package/lib/module/themes/light.js.map +1 -1
  5. package/lib/module/themes/radius.js +11 -0
  6. package/lib/module/themes/radius.js.map +1 -0
  7. package/lib/module/themes/size.js +11 -0
  8. package/lib/module/themes/size.js.map +1 -0
  9. package/lib/module/themes/spacing.js +13 -0
  10. package/lib/module/themes/spacing.js.map +1 -0
  11. package/lib/module/themes/typography.js +31 -0
  12. package/lib/module/themes/typography.js.map +1 -0
  13. package/lib/typescript/src/themes/colors.d.ts +108 -0
  14. package/lib/typescript/src/themes/colors.d.ts.map +1 -0
  15. package/lib/typescript/src/themes/light.d.ts.map +1 -1
  16. package/lib/typescript/src/themes/radius.d.ts +10 -0
  17. package/lib/typescript/src/themes/radius.d.ts.map +1 -0
  18. package/lib/typescript/src/themes/size.d.ts +10 -0
  19. package/lib/typescript/src/themes/size.d.ts.map +1 -0
  20. package/lib/typescript/src/themes/spacing.d.ts +12 -0
  21. package/lib/typescript/src/themes/spacing.d.ts.map +1 -0
  22. package/lib/typescript/src/themes/types.d.ts +10 -0
  23. package/lib/typescript/src/themes/types.d.ts.map +1 -1
  24. package/lib/typescript/src/themes/typography.d.ts +30 -0
  25. package/lib/typescript/src/themes/typography.d.ts.map +1 -0
  26. package/package.json +5 -6
  27. package/src/themes/colors.ts +125 -0
  28. package/src/themes/light.ts +17 -7
  29. package/src/themes/radius.ts +10 -0
  30. package/src/themes/size.ts +10 -0
  31. package/src/themes/spacing.ts +12 -0
  32. package/src/themes/types.ts +10 -0
  33. package/src/themes/typography.ts +33 -0
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+
3
+ export const colors = {
4
+ // ----- BRAND COLORS -----
5
+ primary: {
6
+ 50: '#F0F7FF',
7
+ 100: '#D9E9FF',
8
+ 200: '#B3D3FF',
9
+ 300: '#8DBDFF',
10
+ 400: '#66A7FF',
11
+ 500: '#3F91FF',
12
+ // main brand color
13
+ 600: '#2376E6',
14
+ 700: '#1658B3',
15
+ 800: '#0A3A80',
16
+ 900: '#001D4D'
17
+ },
18
+ secondary: {
19
+ 50: '#F5F5FF',
20
+ 100: '#E6E4FF',
21
+ 200: '#C8C4FF',
22
+ 300: '#AAA3FF',
23
+ 400: '#8C82FF',
24
+ 500: '#6E61FF',
25
+ // accent / complementary
26
+ 600: '#554ACC',
27
+ 700: '#3D3499',
28
+ 800: '#251E66',
29
+ 900: '#100A33'
30
+ },
31
+ // ----- STATUS COLORS -----
32
+ success: {
33
+ 50: '#EBFDF3',
34
+ 100: '#C8F9DF',
35
+ 200: '#A3F3C6',
36
+ 300: '#7DEDAE',
37
+ 400: '#57E796',
38
+ 500: '#32D880',
39
+ // success default
40
+ 600: '#28B56A',
41
+ 700: '#1E9254',
42
+ 800: '#146F3E',
43
+ 900: '#0A4C28'
44
+ },
45
+ warning: {
46
+ 50: '#FFFAEA',
47
+ 100: '#FFF2C2',
48
+ 200: '#FFE08A',
49
+ 300: '#FFCE52',
50
+ 400: '#FFBC1A',
51
+ 500: '#F5A000',
52
+ // warning default
53
+ 600: '#CC8300',
54
+ 700: '#A36600',
55
+ 800: '#7A4A00',
56
+ 900: '#523000'
57
+ },
58
+ danger: {
59
+ 50: '#FFF5F5',
60
+ 100: '#FFE0E0',
61
+ 200: '#FFB8B8',
62
+ 300: '#FF8A8A',
63
+ 400: '#FF5C5C',
64
+ 500: '#FF2E2E',
65
+ // danger default
66
+ 600: '#CC2323',
67
+ 700: '#991A1A',
68
+ 800: '#661212',
69
+ 900: '#330909'
70
+ },
71
+ error: {
72
+ 50: '#FFF4F2',
73
+ 100: '#FFE3DE',
74
+ 200: '#FFC0B8',
75
+ 300: '#FF9A8E',
76
+ 400: '#FF6B5C',
77
+ 500: '#F04438',
78
+ // common red error
79
+ 600: '#D92D20',
80
+ 700: '#B42318',
81
+ 800: '#912018',
82
+ 900: '#7A271A'
83
+ },
84
+ // ----- DISABLED -----
85
+ disabled: {
86
+ bg: '#E5E7EB',
87
+ text: '#9CA3AF',
88
+ border: '#D1D5DB'
89
+ },
90
+ // ----- NEUTRALS -----
91
+ gray: {
92
+ 50: '#F9FAFB',
93
+ 100: '#F3F4F6',
94
+ 200: '#E5E7EB',
95
+ 300: '#D1D5DB',
96
+ 400: '#9CA3AF',
97
+ 500: '#6B7280',
98
+ 600: '#4B5563',
99
+ 700: '#374151',
100
+ 800: '#1F2937',
101
+ 900: '#111827'
102
+ },
103
+ // ----- BACKGROUND -----
104
+ background: {
105
+ primary: '#FFFFFF',
106
+ secondary: '#F7F7F8',
107
+ tertiary: '#EFEFF1',
108
+ disabled: '#E5E7EB'
109
+ },
110
+ // ----- TEXT -----
111
+ text: {
112
+ primary: '#111827',
113
+ secondary: '#4B5563',
114
+ muted: '#6B7280',
115
+ inverted: '#FFFFFF'
116
+ },
117
+ // ----- BLACK & WHITE -----
118
+ white: '#FFFFFF',
119
+ black: '#000000',
120
+ transparent: 'transparent'
121
+ };
122
+ //# sourceMappingURL=colors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["colors","primary","secondary","success","warning","danger","error","disabled","bg","text","border","gray","background","tertiary","muted","inverted","white","black","transparent"],"sourceRoot":"../../../src","sources":["themes/colors.ts"],"mappings":"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","ignoreList":[]}
@@ -1,23 +1,33 @@
1
1
  "use strict";
2
2
 
3
+ import { colors } from "./colors.js";
4
+ import { radii } from "./radius.js";
5
+ import { sizes } from "./size.js";
6
+ import { spacing } from "./spacing.js";
7
+ import { typography } from "./typography.js";
3
8
  export const LightTheme = {
9
+ color: colors,
10
+ size: sizes,
11
+ spacing: spacing,
12
+ typography: typography,
13
+ radius: radii,
4
14
  components: {
5
15
  card: {
6
- border_radius: 8,
7
- padding: 16,
8
- shadow_color: '#000',
16
+ border_radius: radii.md,
17
+ padding: spacing.lg,
18
+ shadow_color: colors.black,
9
19
  shadow_offset: {
10
20
  width: 0,
11
21
  height: 2
12
22
  },
13
23
  shadow_opacity: 0.1,
14
- shadow_radius: 4,
24
+ shadow_radius: radii.sm,
15
25
  elevation: 3
16
26
  },
17
27
  surface: {
18
- default_background_color: '#fff',
19
- secondary_background_color: '#f0f0f0',
20
- transparent_background_color: 'transparent'
28
+ default_background_color: colors.primary[50],
29
+ secondary_background_color: colors.primary[100],
30
+ transparent_background_color: colors.transparent
21
31
  }
22
32
  }
23
33
  };
@@ -1 +1 @@
1
- {"version":3,"names":["LightTheme","components","card","border_radius","padding","shadow_color","shadow_offset","width","height","shadow_opacity","shadow_radius","elevation","surface","default_background_color","secondary_background_color","transparent_background_color"],"sourceRoot":"../../../src","sources":["themes/light.ts"],"mappings":";;AAEA,OAAO,MAAMA,UAA2B,GAAG;EACzCC,UAAU,EAAE;IACVC,IAAI,EAAE;MACJC,aAAa,EAAE,CAAC;MAChBC,OAAO,EAAE,EAAE;MACXC,YAAY,EAAE,MAAM;MACpBC,aAAa,EAAE;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAE,CAAC;MACtCC,cAAc,EAAE,GAAG;MACnBC,aAAa,EAAE,CAAC;MAChBC,SAAS,EAAE;IACb,CAAC;IACDC,OAAO,EAAE;MACPC,wBAAwB,EAAE,MAAM;MAChCC,0BAA0B,EAAE,SAAS;MACrCC,4BAA4B,EAAE;IAChC;EACF;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["colors","radii","sizes","spacing","typography","LightTheme","color","size","radius","components","card","border_radius","md","padding","lg","shadow_color","black","shadow_offset","width","height","shadow_opacity","shadow_radius","sm","elevation","surface","default_background_color","primary","secondary_background_color","transparent_background_color","transparent"],"sourceRoot":"../../../src","sources":["themes/light.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,aAAU;AACjC,SAASC,KAAK,QAAQ,aAAU;AAChC,SAASC,KAAK,QAAQ,WAAQ;AAC9B,SAASC,OAAO,QAAQ,cAAW;AAEnC,SAASC,UAAU,QAAQ,iBAAc;AAEzC,OAAO,MAAMC,UAA2B,GAAG;EACzCC,KAAK,EAAEN,MAAM;EACbO,IAAI,EAAEL,KAAK;EACXC,OAAO,EAAEA,OAAO;EAChBC,UAAU,EAAEA,UAAU;EACtBI,MAAM,EAAEP,KAAK;EACbQ,UAAU,EAAE;IACVC,IAAI,EAAE;MACJC,aAAa,EAAEV,KAAK,CAACW,EAAE;MACvBC,OAAO,EAAEV,OAAO,CAACW,EAAE;MACnBC,YAAY,EAAEf,MAAM,CAACgB,KAAK;MAC1BC,aAAa,EAAE;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAE,CAAC;MACtCC,cAAc,EAAE,GAAG;MACnBC,aAAa,EAAEpB,KAAK,CAACqB,EAAE;MACvBC,SAAS,EAAE;IACb,CAAC;IACDC,OAAO,EAAE;MACPC,wBAAwB,EAAEzB,MAAM,CAAC0B,OAAO,CAAC,EAAE,CAAC;MAC5CC,0BAA0B,EAAE3B,MAAM,CAAC0B,OAAO,CAAC,GAAG,CAAC;MAC/CE,4BAA4B,EAAE5B,MAAM,CAAC6B;IACvC;EACF;AACF,CAAC","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ export const radii = {
4
+ none: 0,
5
+ sm: 4,
6
+ md: 8,
7
+ lg: 12,
8
+ xl: 16,
9
+ full: 9999
10
+ };
11
+ //# sourceMappingURL=radius.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["radii","none","sm","md","lg","xl","full"],"sourceRoot":"../../../src","sources":["themes/radius.ts"],"mappings":";;AAAA,OAAO,MAAMA,KAAK,GAAG;EACnBC,IAAI,EAAE,CAAC;EACPC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE,EAAE;EACNC,IAAI,EAAE;AACR,CAAU","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ export const sizes = {
4
+ 'xs': 16,
5
+ 'sm': 24,
6
+ 'md': 32,
7
+ 'lg': 48,
8
+ 'xl': 64,
9
+ '2xl': 96
10
+ };
11
+ //# sourceMappingURL=size.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sizes"],"sourceRoot":"../../../src","sources":["themes/size.ts"],"mappings":";;AAAA,OAAO,MAAMA,KAAK,GAAG;EACnB,IAAI,EAAE,EAAE;EACR,IAAI,EAAE,EAAE;EACR,IAAI,EAAE,EAAE;EACR,IAAI,EAAE,EAAE;EACR,IAAI,EAAE,EAAE;EACR,KAAK,EAAE;AACT,CAAU","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ export const spacing = {
4
+ 'none': 0,
5
+ 'xs': 4,
6
+ 'sm': 8,
7
+ 'md': 12,
8
+ 'lg': 16,
9
+ 'xl': 24,
10
+ '2xl': 32,
11
+ '3xl': 40
12
+ };
13
+ //# sourceMappingURL=spacing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["spacing"],"sourceRoot":"../../../src","sources":["themes/spacing.ts"],"mappings":";;AAAA,OAAO,MAAMA,OAAO,GAAG;EACrB,MAAM,EAAE,CAAC;EACT,IAAI,EAAE,CAAC;EACP,IAAI,EAAE,CAAC;EACP,IAAI,EAAE,EAAE;EACR,IAAI,EAAE,EAAE;EACR,IAAI,EAAE,EAAE;EACR,KAAK,EAAE,EAAE;EACT,KAAK,EAAE;AACT,CAAU","ignoreList":[]}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ export const typography = {
4
+ fonts: {
5
+ regular: 'System',
6
+ medium: 'System',
7
+ bold: 'System'
8
+ },
9
+ fontSizes: {
10
+ 'xs': 12,
11
+ 'sm': 14,
12
+ 'md': 16,
13
+ 'lg': 20,
14
+ 'xl': 24,
15
+ '2xl': 32
16
+ },
17
+ lineHeights: {
18
+ 'xs': 16,
19
+ 'sm': 18,
20
+ 'md': 20,
21
+ 'lg': 28,
22
+ 'xl': 32,
23
+ '2xl': 40
24
+ },
25
+ fontWeights: {
26
+ regular: '400',
27
+ medium: '500',
28
+ bold: '700'
29
+ }
30
+ };
31
+ //# sourceMappingURL=typography.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["typography","fonts","regular","medium","bold","fontSizes","lineHeights","fontWeights"],"sourceRoot":"../../../src","sources":["themes/typography.ts"],"mappings":";;AAAA,OAAO,MAAMA,UAAU,GAAG;EACxBC,KAAK,EAAE;IACLC,OAAO,EAAE,QAAQ;IACjBC,MAAM,EAAE,QAAQ;IAChBC,IAAI,EAAE;EACR,CAAC;EAEDC,SAAS,EAAE;IACT,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,KAAK,EAAE;EACT,CAAC;EAEDC,WAAW,EAAE;IACX,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,KAAK,EAAE;EACT,CAAC;EAEDC,WAAW,EAAE;IACXL,OAAO,EAAE,KAAc;IACvBC,MAAM,EAAE,KAAc;IACtBC,IAAI,EAAE;EACR;AACF,CAAU","ignoreList":[]}
@@ -0,0 +1,108 @@
1
+ export declare const colors: {
2
+ readonly primary: {
3
+ readonly 50: "#F0F7FF";
4
+ readonly 100: "#D9E9FF";
5
+ readonly 200: "#B3D3FF";
6
+ readonly 300: "#8DBDFF";
7
+ readonly 400: "#66A7FF";
8
+ readonly 500: "#3F91FF";
9
+ readonly 600: "#2376E6";
10
+ readonly 700: "#1658B3";
11
+ readonly 800: "#0A3A80";
12
+ readonly 900: "#001D4D";
13
+ };
14
+ readonly secondary: {
15
+ readonly 50: "#F5F5FF";
16
+ readonly 100: "#E6E4FF";
17
+ readonly 200: "#C8C4FF";
18
+ readonly 300: "#AAA3FF";
19
+ readonly 400: "#8C82FF";
20
+ readonly 500: "#6E61FF";
21
+ readonly 600: "#554ACC";
22
+ readonly 700: "#3D3499";
23
+ readonly 800: "#251E66";
24
+ readonly 900: "#100A33";
25
+ };
26
+ readonly success: {
27
+ readonly 50: "#EBFDF3";
28
+ readonly 100: "#C8F9DF";
29
+ readonly 200: "#A3F3C6";
30
+ readonly 300: "#7DEDAE";
31
+ readonly 400: "#57E796";
32
+ readonly 500: "#32D880";
33
+ readonly 600: "#28B56A";
34
+ readonly 700: "#1E9254";
35
+ readonly 800: "#146F3E";
36
+ readonly 900: "#0A4C28";
37
+ };
38
+ readonly warning: {
39
+ readonly 50: "#FFFAEA";
40
+ readonly 100: "#FFF2C2";
41
+ readonly 200: "#FFE08A";
42
+ readonly 300: "#FFCE52";
43
+ readonly 400: "#FFBC1A";
44
+ readonly 500: "#F5A000";
45
+ readonly 600: "#CC8300";
46
+ readonly 700: "#A36600";
47
+ readonly 800: "#7A4A00";
48
+ readonly 900: "#523000";
49
+ };
50
+ readonly danger: {
51
+ readonly 50: "#FFF5F5";
52
+ readonly 100: "#FFE0E0";
53
+ readonly 200: "#FFB8B8";
54
+ readonly 300: "#FF8A8A";
55
+ readonly 400: "#FF5C5C";
56
+ readonly 500: "#FF2E2E";
57
+ readonly 600: "#CC2323";
58
+ readonly 700: "#991A1A";
59
+ readonly 800: "#661212";
60
+ readonly 900: "#330909";
61
+ };
62
+ readonly error: {
63
+ readonly 50: "#FFF4F2";
64
+ readonly 100: "#FFE3DE";
65
+ readonly 200: "#FFC0B8";
66
+ readonly 300: "#FF9A8E";
67
+ readonly 400: "#FF6B5C";
68
+ readonly 500: "#F04438";
69
+ readonly 600: "#D92D20";
70
+ readonly 700: "#B42318";
71
+ readonly 800: "#912018";
72
+ readonly 900: "#7A271A";
73
+ };
74
+ readonly disabled: {
75
+ readonly bg: "#E5E7EB";
76
+ readonly text: "#9CA3AF";
77
+ readonly border: "#D1D5DB";
78
+ };
79
+ readonly gray: {
80
+ readonly 50: "#F9FAFB";
81
+ readonly 100: "#F3F4F6";
82
+ readonly 200: "#E5E7EB";
83
+ readonly 300: "#D1D5DB";
84
+ readonly 400: "#9CA3AF";
85
+ readonly 500: "#6B7280";
86
+ readonly 600: "#4B5563";
87
+ readonly 700: "#374151";
88
+ readonly 800: "#1F2937";
89
+ readonly 900: "#111827";
90
+ };
91
+ readonly background: {
92
+ readonly primary: "#FFFFFF";
93
+ readonly secondary: "#F7F7F8";
94
+ readonly tertiary: "#EFEFF1";
95
+ readonly disabled: "#E5E7EB";
96
+ };
97
+ readonly text: {
98
+ readonly primary: "#111827";
99
+ readonly secondary: "#4B5563";
100
+ readonly muted: "#6B7280";
101
+ readonly inverted: "#FFFFFF";
102
+ };
103
+ readonly white: "#FFFFFF";
104
+ readonly black: "#000000";
105
+ readonly transparent: "transparent";
106
+ };
107
+ export type ColorToken = typeof colors;
108
+ //# sourceMappingURL=colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../../src/themes/colors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0HT,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,OAAO,MAAM,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"light.d.ts","sourceRoot":"","sources":["../../../../src/themes/light.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,eAAO,MAAM,UAAU,EAAE,eAiBxB,CAAC"}
1
+ {"version":3,"file":"light.d.ts","sourceRoot":"","sources":["../../../../src/themes/light.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG/C,eAAO,MAAM,UAAU,EAAE,eAsBxB,CAAC"}
@@ -0,0 +1,10 @@
1
+ export declare const radii: {
2
+ readonly none: 0;
3
+ readonly sm: 4;
4
+ readonly md: 8;
5
+ readonly lg: 12;
6
+ readonly xl: 16;
7
+ readonly full: 9999;
8
+ };
9
+ export type RadiusToken = keyof typeof radii;
10
+ //# sourceMappingURL=radius.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radius.d.ts","sourceRoot":"","sources":["../../../../src/themes/radius.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK;;;;;;;CAOR,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,KAAK,CAAC"}
@@ -0,0 +1,10 @@
1
+ export declare const sizes: {
2
+ readonly xs: 16;
3
+ readonly sm: 24;
4
+ readonly md: 32;
5
+ readonly lg: 48;
6
+ readonly xl: 64;
7
+ readonly '2xl': 96;
8
+ };
9
+ export type SizeToken = keyof typeof sizes;
10
+ //# sourceMappingURL=size.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"size.d.ts","sourceRoot":"","sources":["../../../../src/themes/size.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK;;;;;;;CAOR,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,KAAK,CAAC"}
@@ -0,0 +1,12 @@
1
+ export declare const spacing: {
2
+ readonly none: 0;
3
+ readonly xs: 4;
4
+ readonly sm: 8;
5
+ readonly md: 12;
6
+ readonly lg: 16;
7
+ readonly xl: 24;
8
+ readonly '2xl': 32;
9
+ readonly '3xl': 40;
10
+ };
11
+ export type SpacingToken = keyof typeof spacing;
12
+ //# sourceMappingURL=spacing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["../../../../src/themes/spacing.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;;;;;;;;CASV,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,OAAO,CAAC"}
@@ -1,6 +1,16 @@
1
1
  import type { CardStyleVariables } from '../components/Card/styles';
2
2
  import type { SurfaceStyleVariables } from '../components/Surface/styles';
3
+ import type { colors } from './colors';
4
+ import type { radii } from './radius';
5
+ import type { sizes } from './size';
6
+ import type { spacing } from './spacing';
7
+ import type { typography } from './typography';
3
8
  export type ThemeDefinition = {
9
+ color: typeof colors;
10
+ size: typeof sizes;
11
+ spacing: typeof spacing;
12
+ typography: typeof typography;
13
+ radius: typeof radii;
4
14
  components: {
5
15
  card: CardStyleVariables;
6
16
  surface: SurfaceStyleVariables;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/themes/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAE1E,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,EAAE;QACV,IAAI,EAAE,kBAAkB,CAAC;QACzB,OAAO,EAAE,qBAAqB,CAAC;KAChC,CAAC;CACH,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/themes/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,OAAO,MAAM,CAAC;IACrB,IAAI,EAAE,OAAO,KAAK,CAAC;IACnB,OAAO,EAAE,OAAO,OAAO,CAAC;IACxB,UAAU,EAAE,OAAO,UAAU,CAAC;IAC9B,MAAM,EAAE,OAAO,KAAK,CAAC;IACrB,UAAU,EAAE;QACV,IAAI,EAAE,kBAAkB,CAAC;QACzB,OAAO,EAAE,qBAAqB,CAAC;KAChC,CAAC;CACH,CAAC"}
@@ -0,0 +1,30 @@
1
+ export declare const typography: {
2
+ readonly fonts: {
3
+ readonly regular: "System";
4
+ readonly medium: "System";
5
+ readonly bold: "System";
6
+ };
7
+ readonly fontSizes: {
8
+ readonly xs: 12;
9
+ readonly sm: 14;
10
+ readonly md: 16;
11
+ readonly lg: 20;
12
+ readonly xl: 24;
13
+ readonly '2xl': 32;
14
+ };
15
+ readonly lineHeights: {
16
+ readonly xs: 16;
17
+ readonly sm: 18;
18
+ readonly md: 20;
19
+ readonly lg: 28;
20
+ readonly xl: 32;
21
+ readonly '2xl': 40;
22
+ };
23
+ readonly fontWeights: {
24
+ readonly regular: "400";
25
+ readonly medium: "500";
26
+ readonly bold: "700";
27
+ };
28
+ };
29
+ export type TypographyToken = typeof typography;
30
+ //# sourceMappingURL=typography.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../../../src/themes/typography.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8Bb,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,OAAO,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dryanovski/react-native-components",
3
- "version": "1.0.3",
3
+ "version": "1.0.6",
4
4
  "description": "Collection of reusable React Native components for building mobile applications.",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -61,13 +61,12 @@
61
61
  "typescript": "^5.8.3"
62
62
  },
63
63
  "peerDependencies": {
64
- "react": ">=19.0.0",
65
- "react-native": ">=0.81.0",
66
- "react-native-reanimated": "~4.1.1",
64
+ "react": ">=19",
65
+ "react-native": ">=0.81.5",
66
+ "react-native-reanimated": ">=4",
67
67
  "react-native-safe-area-context": "~5.6.0",
68
68
  "react-native-screens": ">=4",
69
- "react-native-svg": "^15.12.1",
70
- "react-native-worklets": "0.5.1"
69
+ "react-native-svg": "^15.12.1"
71
70
  },
72
71
  "prettier": {
73
72
  "quoteProps": "consistent",
@@ -0,0 +1,125 @@
1
+ export const colors = {
2
+ // ----- BRAND COLORS -----
3
+ primary: {
4
+ 50: '#F0F7FF',
5
+ 100: '#D9E9FF',
6
+ 200: '#B3D3FF',
7
+ 300: '#8DBDFF',
8
+ 400: '#66A7FF',
9
+ 500: '#3F91FF', // main brand color
10
+ 600: '#2376E6',
11
+ 700: '#1658B3',
12
+ 800: '#0A3A80',
13
+ 900: '#001D4D',
14
+ },
15
+
16
+ secondary: {
17
+ 50: '#F5F5FF',
18
+ 100: '#E6E4FF',
19
+ 200: '#C8C4FF',
20
+ 300: '#AAA3FF',
21
+ 400: '#8C82FF',
22
+ 500: '#6E61FF', // accent / complementary
23
+ 600: '#554ACC',
24
+ 700: '#3D3499',
25
+ 800: '#251E66',
26
+ 900: '#100A33',
27
+ },
28
+
29
+ // ----- STATUS COLORS -----
30
+ success: {
31
+ 50: '#EBFDF3',
32
+ 100: '#C8F9DF',
33
+ 200: '#A3F3C6',
34
+ 300: '#7DEDAE',
35
+ 400: '#57E796',
36
+ 500: '#32D880', // success default
37
+ 600: '#28B56A',
38
+ 700: '#1E9254',
39
+ 800: '#146F3E',
40
+ 900: '#0A4C28',
41
+ },
42
+
43
+ warning: {
44
+ 50: '#FFFAEA',
45
+ 100: '#FFF2C2',
46
+ 200: '#FFE08A',
47
+ 300: '#FFCE52',
48
+ 400: '#FFBC1A',
49
+ 500: '#F5A000', // warning default
50
+ 600: '#CC8300',
51
+ 700: '#A36600',
52
+ 800: '#7A4A00',
53
+ 900: '#523000',
54
+ },
55
+
56
+ danger: {
57
+ 50: '#FFF5F5',
58
+ 100: '#FFE0E0',
59
+ 200: '#FFB8B8',
60
+ 300: '#FF8A8A',
61
+ 400: '#FF5C5C',
62
+ 500: '#FF2E2E', // danger default
63
+ 600: '#CC2323',
64
+ 700: '#991A1A',
65
+ 800: '#661212',
66
+ 900: '#330909',
67
+ },
68
+
69
+ error: {
70
+ 50: '#FFF4F2',
71
+ 100: '#FFE3DE',
72
+ 200: '#FFC0B8',
73
+ 300: '#FF9A8E',
74
+ 400: '#FF6B5C',
75
+ 500: '#F04438', // common red error
76
+ 600: '#D92D20',
77
+ 700: '#B42318',
78
+ 800: '#912018',
79
+ 900: '#7A271A',
80
+ },
81
+
82
+ // ----- DISABLED -----
83
+ disabled: {
84
+ bg: '#E5E7EB',
85
+ text: '#9CA3AF',
86
+ border: '#D1D5DB',
87
+ },
88
+
89
+ // ----- NEUTRALS -----
90
+ gray: {
91
+ 50: '#F9FAFB',
92
+ 100: '#F3F4F6',
93
+ 200: '#E5E7EB',
94
+ 300: '#D1D5DB',
95
+ 400: '#9CA3AF',
96
+ 500: '#6B7280',
97
+ 600: '#4B5563',
98
+ 700: '#374151',
99
+ 800: '#1F2937',
100
+ 900: '#111827',
101
+ },
102
+
103
+ // ----- BACKGROUND -----
104
+ background: {
105
+ primary: '#FFFFFF',
106
+ secondary: '#F7F7F8',
107
+ tertiary: '#EFEFF1',
108
+ disabled: '#E5E7EB',
109
+ },
110
+
111
+ // ----- TEXT -----
112
+ text: {
113
+ primary: '#111827',
114
+ secondary: '#4B5563',
115
+ muted: '#6B7280',
116
+ inverted: '#FFFFFF',
117
+ },
118
+
119
+ // ----- BLACK & WHITE -----
120
+ white: '#FFFFFF',
121
+ black: '#000000',
122
+ transparent: 'transparent',
123
+ } as const;
124
+
125
+ export type ColorToken = typeof colors;
@@ -1,20 +1,30 @@
1
+ import { colors } from './colors';
2
+ import { radii } from './radius';
3
+ import { sizes } from './size';
4
+ import { spacing } from './spacing';
1
5
  import type { ThemeDefinition } from './types';
6
+ import { typography } from './typography';
2
7
 
3
8
  export const LightTheme: ThemeDefinition = {
9
+ color: colors,
10
+ size: sizes,
11
+ spacing: spacing,
12
+ typography: typography,
13
+ radius: radii,
4
14
  components: {
5
15
  card: {
6
- border_radius: 8,
7
- padding: 16,
8
- shadow_color: '#000',
16
+ border_radius: radii.md,
17
+ padding: spacing.lg,
18
+ shadow_color: colors.black,
9
19
  shadow_offset: { width: 0, height: 2 },
10
20
  shadow_opacity: 0.1,
11
- shadow_radius: 4,
21
+ shadow_radius: radii.sm,
12
22
  elevation: 3,
13
23
  },
14
24
  surface: {
15
- default_background_color: '#fff',
16
- secondary_background_color: '#f0f0f0',
17
- transparent_background_color: 'transparent',
25
+ default_background_color: colors.primary[50],
26
+ secondary_background_color: colors.primary[100],
27
+ transparent_background_color: colors.transparent,
18
28
  },
19
29
  },
20
30
  };
@@ -0,0 +1,10 @@
1
+ export const radii = {
2
+ none: 0,
3
+ sm: 4,
4
+ md: 8,
5
+ lg: 12,
6
+ xl: 16,
7
+ full: 9999,
8
+ } as const;
9
+
10
+ export type RadiusToken = keyof typeof radii;
@@ -0,0 +1,10 @@
1
+ export const sizes = {
2
+ 'xs': 16,
3
+ 'sm': 24,
4
+ 'md': 32,
5
+ 'lg': 48,
6
+ 'xl': 64,
7
+ '2xl': 96,
8
+ } as const;
9
+
10
+ export type SizeToken = keyof typeof sizes;
@@ -0,0 +1,12 @@
1
+ export const spacing = {
2
+ 'none': 0,
3
+ 'xs': 4,
4
+ 'sm': 8,
5
+ 'md': 12,
6
+ 'lg': 16,
7
+ 'xl': 24,
8
+ '2xl': 32,
9
+ '3xl': 40,
10
+ } as const;
11
+
12
+ export type SpacingToken = keyof typeof spacing;
@@ -1,7 +1,17 @@
1
1
  import type { CardStyleVariables } from '../components/Card/styles';
2
2
  import type { SurfaceStyleVariables } from '../components/Surface/styles';
3
+ import type { colors } from './colors';
4
+ import type { radii } from './radius';
5
+ import type { sizes } from './size';
6
+ import type { spacing } from './spacing';
7
+ import type { typography } from './typography';
3
8
 
4
9
  export type ThemeDefinition = {
10
+ color: typeof colors;
11
+ size: typeof sizes;
12
+ spacing: typeof spacing;
13
+ typography: typeof typography;
14
+ radius: typeof radii;
5
15
  components: {
6
16
  card: CardStyleVariables;
7
17
  surface: SurfaceStyleVariables;
@@ -0,0 +1,33 @@
1
+ export const typography = {
2
+ fonts: {
3
+ regular: 'System',
4
+ medium: 'System',
5
+ bold: 'System',
6
+ },
7
+
8
+ fontSizes: {
9
+ 'xs': 12,
10
+ 'sm': 14,
11
+ 'md': 16,
12
+ 'lg': 20,
13
+ 'xl': 24,
14
+ '2xl': 32,
15
+ },
16
+
17
+ lineHeights: {
18
+ 'xs': 16,
19
+ 'sm': 18,
20
+ 'md': 20,
21
+ 'lg': 28,
22
+ 'xl': 32,
23
+ '2xl': 40,
24
+ },
25
+
26
+ fontWeights: {
27
+ regular: '400' as const,
28
+ medium: '500' as const,
29
+ bold: '700' as const,
30
+ },
31
+ } as const;
32
+
33
+ export type TypographyToken = typeof typography;