rangaat 0.1.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.
- package/LICENSE +20 -0
- package/README.md +102 -0
- package/Rangaat.podspec +20 -0
- package/android/build.gradle +67 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/com/rangaat/RangaatPackage.kt +17 -0
- package/android/src/main/java/com/rangaat/RangaatView.kt +15 -0
- package/android/src/main/java/com/rangaat/RangaatViewManager.kt +41 -0
- package/ios/RangaatView.h +14 -0
- package/ios/RangaatView.mm +48 -0
- package/lib/module/RangaatView.js +17 -0
- package/lib/module/RangaatView.js.map +1 -0
- package/lib/module/RangaatView.native.js +5 -0
- package/lib/module/RangaatView.native.js.map +1 -0
- package/lib/module/RangaatViewNativeComponent.ts +11 -0
- package/lib/module/components/Button/Button.js +53 -0
- package/lib/module/components/Button/Button.js.map +1 -0
- package/lib/module/components/Button/index.js +4 -0
- package/lib/module/components/Button/index.js.map +1 -0
- package/lib/module/components/Button/styles.js +113 -0
- package/lib/module/components/Button/styles.js.map +1 -0
- package/lib/module/components/Button/types.js +4 -0
- package/lib/module/components/Button/types.js.map +1 -0
- package/lib/module/hooks/useTheme.js +20 -0
- package/lib/module/hooks/useTheme.js.map +1 -0
- package/lib/module/index.js +13 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/theme/ThemeProvider.js +31 -0
- package/lib/module/theme/ThemeProvider.js.map +1 -0
- package/lib/module/theme/defaultTheme.js +118 -0
- package/lib/module/theme/defaultTheme.js.map +1 -0
- package/lib/module/theme/types.js +2 -0
- package/lib/module/theme/types.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/RangaatView.d.ts +7 -0
- package/lib/typescript/src/RangaatView.d.ts.map +1 -0
- package/lib/typescript/src/RangaatView.native.d.ts +3 -0
- package/lib/typescript/src/RangaatView.native.d.ts.map +1 -0
- package/lib/typescript/src/RangaatViewNativeComponent.d.ts +7 -0
- package/lib/typescript/src/RangaatViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/components/Button/Button.d.ts +4 -0
- package/lib/typescript/src/components/Button/Button.d.ts.map +1 -0
- package/lib/typescript/src/components/Button/index.d.ts +3 -0
- package/lib/typescript/src/components/Button/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Button/styles.d.ts +37 -0
- package/lib/typescript/src/components/Button/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/Button/types.d.ts +25 -0
- package/lib/typescript/src/components/Button/types.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useTheme.d.ts +7 -0
- package/lib/typescript/src/hooks/useTheme.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +8 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/theme/ThemeProvider.d.ts +17 -0
- package/lib/typescript/src/theme/ThemeProvider.d.ts.map +1 -0
- package/lib/typescript/src/theme/defaultTheme.d.ts +4 -0
- package/lib/typescript/src/theme/defaultTheme.d.ts.map +1 -0
- package/lib/typescript/src/theme/types.d.ts +95 -0
- package/lib/typescript/src/theme/types.d.ts.map +1 -0
- package/package.json +182 -0
- package/src/RangaatView.native.tsx +2 -0
- package/src/RangaatView.tsx +9 -0
- package/src/RangaatViewNativeComponent.ts +11 -0
- package/src/components/Button/Button.tsx +78 -0
- package/src/components/Button/index.ts +2 -0
- package/src/components/Button/styles.ts +114 -0
- package/src/components/Button/types.ts +26 -0
- package/src/hooks/useTheme.ts +12 -0
- package/src/index.tsx +13 -0
- package/src/theme/ThemeProvider.tsx +43 -0
- package/src/theme/defaultTheme.ts +79 -0
- package/src/theme/types.ts +59 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { createContext, useContext, useState } from 'react';
|
|
4
|
+
import { lightTheme, darkTheme } from "./defaultTheme.js";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
const ThemeContext = /*#__PURE__*/createContext(undefined);
|
|
7
|
+
export const ThemeProvider = ({
|
|
8
|
+
children,
|
|
9
|
+
initialTheme = lightTheme
|
|
10
|
+
}) => {
|
|
11
|
+
const [theme, setTheme] = useState(initialTheme);
|
|
12
|
+
const toggleTheme = () => {
|
|
13
|
+
setTheme(prevTheme => prevTheme.isDark ? lightTheme : darkTheme);
|
|
14
|
+
};
|
|
15
|
+
return /*#__PURE__*/_jsx(ThemeContext.Provider, {
|
|
16
|
+
value: {
|
|
17
|
+
theme,
|
|
18
|
+
setTheme,
|
|
19
|
+
toggleTheme
|
|
20
|
+
},
|
|
21
|
+
children: children
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
export const useThemeContext = () => {
|
|
25
|
+
const context = useContext(ThemeContext);
|
|
26
|
+
if (!context) {
|
|
27
|
+
throw new Error('useThemeContext must be used within a ThemeProvider');
|
|
28
|
+
}
|
|
29
|
+
return context;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=ThemeProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","createContext","useContext","useState","lightTheme","darkTheme","jsx","_jsx","ThemeContext","undefined","ThemeProvider","children","initialTheme","theme","setTheme","toggleTheme","prevTheme","isDark","Provider","value","useThemeContext","context","Error"],"sourceRoot":"../../../src","sources":["theme/ThemeProvider.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,UAAU,EAAEC,QAAQ,QAAQ,OAAO;AAGlE,SAASC,UAAU,EAAEC,SAAS,QAAQ,mBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQvD,MAAMC,YAAY,gBAAGP,aAAa,CAAgCQ,SAAS,CAAC;AAQ5E,OAAO,MAAMC,aAA2C,GAAGA,CAAC;EAC1DC,QAAQ;EACRC,YAAY,GAAGR;AACjB,CAAC,KAAK;EACJ,MAAM,CAACS,KAAK,EAAEC,QAAQ,CAAC,GAAGX,QAAQ,CAAeS,YAAY,CAAC;EAE9D,MAAMG,WAAW,GAAGA,CAAA,KAAM;IACxBD,QAAQ,CAAEE,SAAS,IAAMA,SAAS,CAACC,MAAM,GAAGb,UAAU,GAAGC,SAAU,CAAC;EACtE,CAAC;EAED,oBACEE,IAAA,CAACC,YAAY,CAACU,QAAQ;IAACC,KAAK,EAAE;MAAEN,KAAK;MAAEC,QAAQ;MAAEC;IAAY,CAAE;IAAAJ,QAAA,EAC5DA;EAAQ,CACY,CAAC;AAE5B,CAAC;AAED,OAAO,MAAMS,eAAe,GAAGA,CAAA,KAAM;EACnC,MAAMC,OAAO,GAAGnB,UAAU,CAACM,YAAY,CAAC;EACxC,IAAI,CAACa,OAAO,EAAE;IACZ,MAAM,IAAIC,KAAK,CAAC,qDAAqD,CAAC;EACxE;EACA,OAAOD,OAAO;AAChB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export const lightTheme = {
|
|
4
|
+
isDark: false,
|
|
5
|
+
colors: {
|
|
6
|
+
primary: '#6750A4',
|
|
7
|
+
onPrimary: '#FFFFFF',
|
|
8
|
+
primaryContainer: '#EADDFF',
|
|
9
|
+
onPrimaryContainer: '#21005D',
|
|
10
|
+
secondary: '#625B71',
|
|
11
|
+
onSecondary: '#FFFFFF',
|
|
12
|
+
secondaryContainer: '#E8DEF8',
|
|
13
|
+
onSecondaryContainer: '#1D192B',
|
|
14
|
+
background: '#FFFBFE',
|
|
15
|
+
onBackground: '#1C1B1F',
|
|
16
|
+
surface: '#FFFBFE',
|
|
17
|
+
onSurface: '#1C1B1F',
|
|
18
|
+
surfaceVariant: '#E7E0EC',
|
|
19
|
+
onSurfaceVariant: '#49454F',
|
|
20
|
+
outline: '#79747E',
|
|
21
|
+
error: '#B3261E',
|
|
22
|
+
onError: '#FFFFFF',
|
|
23
|
+
disabled: '#1C1B1F60',
|
|
24
|
+
onDisabled: '#1C1B1F30'
|
|
25
|
+
},
|
|
26
|
+
typography: {
|
|
27
|
+
h1: {
|
|
28
|
+
fontSize: 57,
|
|
29
|
+
fontWeight: '400',
|
|
30
|
+
lineHeight: 64
|
|
31
|
+
},
|
|
32
|
+
h2: {
|
|
33
|
+
fontSize: 45,
|
|
34
|
+
fontWeight: '400',
|
|
35
|
+
lineHeight: 52
|
|
36
|
+
},
|
|
37
|
+
h3: {
|
|
38
|
+
fontSize: 36,
|
|
39
|
+
fontWeight: '400',
|
|
40
|
+
lineHeight: 44
|
|
41
|
+
},
|
|
42
|
+
bodyLarge: {
|
|
43
|
+
fontSize: 16,
|
|
44
|
+
fontWeight: '400',
|
|
45
|
+
lineHeight: 24
|
|
46
|
+
},
|
|
47
|
+
bodyMedium: {
|
|
48
|
+
fontSize: 14,
|
|
49
|
+
fontWeight: '400',
|
|
50
|
+
lineHeight: 20
|
|
51
|
+
},
|
|
52
|
+
bodySmall: {
|
|
53
|
+
fontSize: 12,
|
|
54
|
+
fontWeight: '400',
|
|
55
|
+
lineHeight: 16
|
|
56
|
+
},
|
|
57
|
+
labelLarge: {
|
|
58
|
+
fontSize: 14,
|
|
59
|
+
fontWeight: '500',
|
|
60
|
+
lineHeight: 20,
|
|
61
|
+
letterSpacing: 0.1
|
|
62
|
+
},
|
|
63
|
+
labelMedium: {
|
|
64
|
+
fontSize: 12,
|
|
65
|
+
fontWeight: '500',
|
|
66
|
+
lineHeight: 16,
|
|
67
|
+
letterSpacing: 0.5
|
|
68
|
+
},
|
|
69
|
+
labelSmall: {
|
|
70
|
+
fontSize: 11,
|
|
71
|
+
fontWeight: '500',
|
|
72
|
+
lineHeight: 16,
|
|
73
|
+
letterSpacing: 0.5
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
spacing: {
|
|
77
|
+
xs: 4,
|
|
78
|
+
sm: 8,
|
|
79
|
+
md: 16,
|
|
80
|
+
lg: 24,
|
|
81
|
+
xl: 32,
|
|
82
|
+
xxl: 40
|
|
83
|
+
},
|
|
84
|
+
shapes: {
|
|
85
|
+
extraSmall: 4,
|
|
86
|
+
small: 8,
|
|
87
|
+
medium: 12,
|
|
88
|
+
large: 16,
|
|
89
|
+
extraLarge: 28,
|
|
90
|
+
pill: 9999
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
export const darkTheme = {
|
|
94
|
+
...lightTheme,
|
|
95
|
+
isDark: true,
|
|
96
|
+
colors: {
|
|
97
|
+
primary: '#D0BCFF',
|
|
98
|
+
onPrimary: '#381E72',
|
|
99
|
+
primaryContainer: '#4F378B',
|
|
100
|
+
onPrimaryContainer: '#EADDFF',
|
|
101
|
+
secondary: '#CCC2DC',
|
|
102
|
+
onSecondary: '#332D41',
|
|
103
|
+
secondaryContainer: '#4A4458',
|
|
104
|
+
onSecondaryContainer: '#E8DEF8',
|
|
105
|
+
background: '#1C1B1F',
|
|
106
|
+
onBackground: '#E6E1E5',
|
|
107
|
+
surface: '#1C1B1F',
|
|
108
|
+
onSurface: '#E6E1E5',
|
|
109
|
+
surfaceVariant: '#49454F',
|
|
110
|
+
onSurfaceVariant: '#CAC4D0',
|
|
111
|
+
outline: '#938F99',
|
|
112
|
+
error: '#F2B8B5',
|
|
113
|
+
onError: '#601410',
|
|
114
|
+
disabled: '#E6E1E560',
|
|
115
|
+
onDisabled: '#E6E1E530'
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
//# sourceMappingURL=defaultTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["lightTheme","isDark","colors","primary","onPrimary","primaryContainer","onPrimaryContainer","secondary","onSecondary","secondaryContainer","onSecondaryContainer","background","onBackground","surface","onSurface","surfaceVariant","onSurfaceVariant","outline","error","onError","disabled","onDisabled","typography","h1","fontSize","fontWeight","lineHeight","h2","h3","bodyLarge","bodyMedium","bodySmall","labelLarge","letterSpacing","labelMedium","labelSmall","spacing","xs","sm","md","lg","xl","xxl","shapes","extraSmall","small","medium","large","extraLarge","pill","darkTheme"],"sourceRoot":"../../../src","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BC,KAAK,EAAE,SAAS;IAChBC,OAAO,EAAE,SAAS;IAClBC,QAAQ,EAAE,WAAW;IACrBC,UAAU,EAAE;EACd;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["theme/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ColorValue, type ViewProps } from 'react-native';
|
|
2
|
+
type Props = ViewProps & {
|
|
3
|
+
color?: ColorValue;
|
|
4
|
+
};
|
|
5
|
+
export declare function RangaatView({ color, style, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=RangaatView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RangaatView.d.ts","sourceRoot":"","sources":["../../../src/RangaatView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAErE,KAAK,KAAK,GAAG,SAAS,GAAG;IACvB,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,2CAE3D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RangaatView.native.d.ts","sourceRoot":"","sources":["../../../src/RangaatView.native.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,8BAA8B,CAAC;AACtE,cAAc,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ColorValue, type ViewProps } from 'react-native';
|
|
2
|
+
interface NativeProps extends ViewProps {
|
|
3
|
+
color?: ColorValue;
|
|
4
|
+
}
|
|
5
|
+
declare const _default: import("react-native/types_generated/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
|
|
6
|
+
export default _default;
|
|
7
|
+
//# sourceMappingURL=RangaatViewNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RangaatViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/RangaatViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,UAAU,WAAY,SAAQ,SAAS;IACrC,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;;AAED,wBAAkE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,MAAM,yEAqElB,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,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { RangaatTheme } from '../../theme/types';
|
|
2
|
+
import type { ButtonSize, ButtonVariant } from './types';
|
|
3
|
+
export declare const getButtonStyles: (theme: RangaatTheme, variant: ButtonVariant, size: ButtonSize, isPressed: boolean, isDisabled: boolean, customColor?: string) => Readonly<{
|
|
4
|
+
container: {
|
|
5
|
+
backgroundColor: string;
|
|
6
|
+
borderColor: string;
|
|
7
|
+
borderWidth: number;
|
|
8
|
+
borderRadius: number;
|
|
9
|
+
paddingVertical: number;
|
|
10
|
+
paddingHorizontal: number;
|
|
11
|
+
flexDirection: "row";
|
|
12
|
+
alignItems: "center";
|
|
13
|
+
justifyContent: "center";
|
|
14
|
+
opacity: number;
|
|
15
|
+
elevation: number;
|
|
16
|
+
shadowColor: string;
|
|
17
|
+
shadowOffset: {
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
};
|
|
21
|
+
shadowOpacity: number;
|
|
22
|
+
shadowRadius: number;
|
|
23
|
+
gap: number;
|
|
24
|
+
};
|
|
25
|
+
text: {
|
|
26
|
+
color: string;
|
|
27
|
+
fontSize: number;
|
|
28
|
+
fontWeight: any;
|
|
29
|
+
lineHeight: number;
|
|
30
|
+
letterSpacing: number;
|
|
31
|
+
textAlign: "center";
|
|
32
|
+
};
|
|
33
|
+
disabled: {
|
|
34
|
+
opacity: number;
|
|
35
|
+
};
|
|
36
|
+
}>;
|
|
37
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEzD,eAAO,MAAM,eAAe,GAC1B,OAAO,YAAY,EACnB,SAAS,aAAa,EACtB,MAAM,UAAU,EAChB,WAAW,OAAO,EAClB,YAAY,OAAO,EACnB,cAAc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;oBA8FsB,GAAG;;;;;;;;EAS9C,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { PressableProps, StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export type ButtonVariant = 'filled' | 'outlined' | 'text' | 'elevated' | 'tonal';
|
|
4
|
+
export type ButtonSize = 'small' | 'medium' | 'large';
|
|
5
|
+
export interface ButtonProps extends Omit<PressableProps, 'style'> {
|
|
6
|
+
/** The text to display inside the button */
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/** The visual variant of the button */
|
|
9
|
+
variant?: ButtonVariant;
|
|
10
|
+
/** The size of the button */
|
|
11
|
+
size?: ButtonSize;
|
|
12
|
+
/** Custom color override for the button (background for filled, text/border for outlined) */
|
|
13
|
+
color?: string;
|
|
14
|
+
/** Whether the button should take the full width of its container */
|
|
15
|
+
fullWidth?: boolean;
|
|
16
|
+
/** Icon to display before the text */
|
|
17
|
+
iconLeft?: ReactNode;
|
|
18
|
+
/** Icon to display after the text */
|
|
19
|
+
iconRight?: ReactNode;
|
|
20
|
+
/** Custom styles for the button container */
|
|
21
|
+
style?: StyleProp<ViewStyle>;
|
|
22
|
+
/** Custom styles for the button text */
|
|
23
|
+
textStyle?: StyleProp<TextStyle>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC;AAClF,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtD,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC;IAChE,4CAA4C;IAC5C,QAAQ,EAAE,SAAS,CAAC;IACpB,uCAAuC;IACvC,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,6BAA6B;IAC7B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,6FAA6F;IAC7F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,qCAAqC;IACrC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,wCAAwC;IACxC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAClC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { RangaatTheme } from '../theme/types';
|
|
2
|
+
export declare const useTheme: () => RangaatTheme;
|
|
3
|
+
export declare const useThemeActions: () => {
|
|
4
|
+
setTheme: (theme: RangaatTheme) => void;
|
|
5
|
+
toggleTheme: () => void;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=useTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useTheme.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,eAAO,MAAM,QAAQ,QAAO,YAG3B,CAAC;AAEF,eAAO,MAAM,eAAe;;;CAG3B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { RangaatView } from './RangaatView';
|
|
2
|
+
export { ThemeProvider, useThemeContext } from './theme/ThemeProvider';
|
|
3
|
+
export { lightTheme, darkTheme } from './theme/defaultTheme';
|
|
4
|
+
export type { RangaatTheme, ThemeColors, ThemeTypography, ThemeShapes, ThemeSpacing } from './theme/types';
|
|
5
|
+
export { useTheme, useThemeActions } from './hooks/useTheme';
|
|
6
|
+
export { Button } from './components/Button';
|
|
7
|
+
export type { ButtonProps, ButtonVariant, ButtonSize } from './components/Button';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC7D,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG3G,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAG7D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type { RangaatTheme } from './types';
|
|
4
|
+
interface ThemeContextValue {
|
|
5
|
+
theme: RangaatTheme;
|
|
6
|
+
setTheme: (theme: RangaatTheme) => void;
|
|
7
|
+
toggleTheme: () => void;
|
|
8
|
+
}
|
|
9
|
+
export interface ThemeProviderProps {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
initialTheme?: RangaatTheme;
|
|
12
|
+
useSystemTheme?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const ThemeProvider: React.FC<ThemeProviderProps>;
|
|
15
|
+
export declare const useThemeContext: () => ThemeContextValue;
|
|
16
|
+
export {};
|
|
17
|
+
//# 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,KAA8C,MAAM,OAAO,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5C,UAAU,iBAAiB;IACzB,KAAK,EAAE,YAAY,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IACxC,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAID,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAetD,CAAC;AAEF,eAAO,MAAM,eAAe,yBAM3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultTheme.d.ts","sourceRoot":"","sources":["../../../../src/theme/defaultTheme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,UAAU,EAAE,YAkDxB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,YAwBvB,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export interface ThemeColors {
|
|
2
|
+
primary: string;
|
|
3
|
+
onPrimary: string;
|
|
4
|
+
primaryContainer: string;
|
|
5
|
+
onPrimaryContainer: string;
|
|
6
|
+
secondary: string;
|
|
7
|
+
onSecondary: string;
|
|
8
|
+
secondaryContainer: string;
|
|
9
|
+
onSecondaryContainer: string;
|
|
10
|
+
background: string;
|
|
11
|
+
onBackground: string;
|
|
12
|
+
surface: string;
|
|
13
|
+
onSurface: string;
|
|
14
|
+
surfaceVariant: string;
|
|
15
|
+
onSurfaceVariant: string;
|
|
16
|
+
outline: string;
|
|
17
|
+
error: string;
|
|
18
|
+
onError: string;
|
|
19
|
+
disabled: string;
|
|
20
|
+
onDisabled: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ThemeTypography {
|
|
23
|
+
h1: {
|
|
24
|
+
fontSize: number;
|
|
25
|
+
fontWeight: string;
|
|
26
|
+
lineHeight: number;
|
|
27
|
+
};
|
|
28
|
+
h2: {
|
|
29
|
+
fontSize: number;
|
|
30
|
+
fontWeight: string;
|
|
31
|
+
lineHeight: number;
|
|
32
|
+
};
|
|
33
|
+
h3: {
|
|
34
|
+
fontSize: number;
|
|
35
|
+
fontWeight: string;
|
|
36
|
+
lineHeight: number;
|
|
37
|
+
};
|
|
38
|
+
bodyLarge: {
|
|
39
|
+
fontSize: number;
|
|
40
|
+
fontWeight: string;
|
|
41
|
+
lineHeight: number;
|
|
42
|
+
};
|
|
43
|
+
bodyMedium: {
|
|
44
|
+
fontSize: number;
|
|
45
|
+
fontWeight: string;
|
|
46
|
+
lineHeight: number;
|
|
47
|
+
};
|
|
48
|
+
bodySmall: {
|
|
49
|
+
fontSize: number;
|
|
50
|
+
fontWeight: string;
|
|
51
|
+
lineHeight: number;
|
|
52
|
+
};
|
|
53
|
+
labelLarge: {
|
|
54
|
+
fontSize: number;
|
|
55
|
+
fontWeight: string;
|
|
56
|
+
lineHeight: number;
|
|
57
|
+
letterSpacing: number;
|
|
58
|
+
};
|
|
59
|
+
labelMedium: {
|
|
60
|
+
fontSize: number;
|
|
61
|
+
fontWeight: string;
|
|
62
|
+
lineHeight: number;
|
|
63
|
+
letterSpacing: number;
|
|
64
|
+
};
|
|
65
|
+
labelSmall: {
|
|
66
|
+
fontSize: number;
|
|
67
|
+
fontWeight: string;
|
|
68
|
+
lineHeight: number;
|
|
69
|
+
letterSpacing: number;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
export interface ThemeSpacing {
|
|
73
|
+
xs: number;
|
|
74
|
+
sm: number;
|
|
75
|
+
md: number;
|
|
76
|
+
lg: number;
|
|
77
|
+
xl: number;
|
|
78
|
+
xxl: number;
|
|
79
|
+
}
|
|
80
|
+
export interface ThemeShapes {
|
|
81
|
+
extraSmall: number;
|
|
82
|
+
small: number;
|
|
83
|
+
medium: number;
|
|
84
|
+
large: number;
|
|
85
|
+
extraLarge: number;
|
|
86
|
+
pill: number;
|
|
87
|
+
}
|
|
88
|
+
export interface RangaatTheme {
|
|
89
|
+
colors: ThemeColors;
|
|
90
|
+
typography: ThemeTypography;
|
|
91
|
+
spacing: ThemeSpacing;
|
|
92
|
+
shapes: ThemeShapes;
|
|
93
|
+
isDark: boolean;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/theme/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,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,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,WAAW,CAAC;IACpB,UAAU,EAAE,eAAe,CAAC;IAC5B,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;CACjB"}
|
package/package.json
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rangaat",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Bring color and life to your mobile apps with customizable React Native UI components.",
|
|
5
|
+
"main": "./lib/module/index.js",
|
|
6
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"source": "./src/index.tsx",
|
|
10
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
11
|
+
"default": "./lib/module/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"src",
|
|
17
|
+
"lib",
|
|
18
|
+
"android",
|
|
19
|
+
"ios",
|
|
20
|
+
"cpp",
|
|
21
|
+
"*.podspec",
|
|
22
|
+
"react-native.config.js",
|
|
23
|
+
"!ios/build",
|
|
24
|
+
"!android/build",
|
|
25
|
+
"!android/gradle",
|
|
26
|
+
"!android/gradlew",
|
|
27
|
+
"!android/gradlew.bat",
|
|
28
|
+
"!android/local.properties",
|
|
29
|
+
"!**/__tests__",
|
|
30
|
+
"!**/__fixtures__",
|
|
31
|
+
"!**/__mocks__",
|
|
32
|
+
"!**/.*"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"example": "yarn workspace rangaat-example",
|
|
36
|
+
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
37
|
+
"prepare": "bob build",
|
|
38
|
+
"typecheck": "tsc",
|
|
39
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
40
|
+
"test": "jest",
|
|
41
|
+
"release": "release-it --only-version",
|
|
42
|
+
"web": "vite",
|
|
43
|
+
"build:web": "vite build"
|
|
44
|
+
},
|
|
45
|
+
"keywords": [
|
|
46
|
+
"react-native",
|
|
47
|
+
"ios",
|
|
48
|
+
"android"
|
|
49
|
+
],
|
|
50
|
+
"repository": {
|
|
51
|
+
"type": "git",
|
|
52
|
+
"url": "git+https://github.com/abdulmajeed-dev0x/rangaat.git"
|
|
53
|
+
},
|
|
54
|
+
"author": "Abdul Majeed <abdulmajeed.dev0x@gmail.com> (https://github.com/abdulmajeed-dev0x/)",
|
|
55
|
+
"license": "MIT",
|
|
56
|
+
"bugs": {
|
|
57
|
+
"url": "https://github.com/abdulmajeed-dev0x/rangaat/issues"
|
|
58
|
+
},
|
|
59
|
+
"homepage": "https://github.com/abdulmajeed-dev0x/rangaat#readme",
|
|
60
|
+
"publishConfig": {
|
|
61
|
+
"registry": "https://registry.npmjs.org/"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@commitlint/config-conventional": "^20.5.0",
|
|
65
|
+
"@eslint/compat": "^2.0.3",
|
|
66
|
+
"@eslint/eslintrc": "^3.3.5",
|
|
67
|
+
"@eslint/js": "^10.0.1",
|
|
68
|
+
"@jest/globals": "^30.0.0",
|
|
69
|
+
"@react-native/babel-preset": "0.85.0",
|
|
70
|
+
"@react-native/eslint-config": "0.85.0",
|
|
71
|
+
"@react-native/jest-preset": "0.85.0",
|
|
72
|
+
"@release-it/conventional-changelog": "^10.0.6",
|
|
73
|
+
"@types/react": "^19.2.0",
|
|
74
|
+
"commitlint": "^20.5.0",
|
|
75
|
+
"del-cli": "^7.0.0",
|
|
76
|
+
"eslint": "^9.39.4",
|
|
77
|
+
"eslint-config-prettier": "^10.1.8",
|
|
78
|
+
"eslint-plugin-ft-flow": "^3.0.11",
|
|
79
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
80
|
+
"jest": "^30.3.0",
|
|
81
|
+
"lefthook": "^2.1.4",
|
|
82
|
+
"prettier": "^3.8.1",
|
|
83
|
+
"react": "19.2.3",
|
|
84
|
+
"react-native": "0.85.0",
|
|
85
|
+
"react-native-builder-bob": "^0.41.0",
|
|
86
|
+
"react-native-web": "~0.21.1",
|
|
87
|
+
"release-it": "^19.2.4",
|
|
88
|
+
"turbo": "^2.8.21",
|
|
89
|
+
"typescript": "^6.0.2"
|
|
90
|
+
},
|
|
91
|
+
"peerDependencies": {
|
|
92
|
+
"react": "*",
|
|
93
|
+
"react-native": "*"
|
|
94
|
+
},
|
|
95
|
+
"workspaces": [
|
|
96
|
+
"example"
|
|
97
|
+
],
|
|
98
|
+
"packageManager": "yarn@4.11.0",
|
|
99
|
+
"react-native-builder-bob": {
|
|
100
|
+
"source": "src",
|
|
101
|
+
"output": "lib",
|
|
102
|
+
"targets": [
|
|
103
|
+
[
|
|
104
|
+
"module",
|
|
105
|
+
{
|
|
106
|
+
"esm": true
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
[
|
|
110
|
+
"typescript",
|
|
111
|
+
{
|
|
112
|
+
"project": "tsconfig.build.json"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
"codegenConfig": {
|
|
118
|
+
"name": "RangaatViewSpec",
|
|
119
|
+
"type": "all",
|
|
120
|
+
"jsSrcsDir": "src",
|
|
121
|
+
"android": {
|
|
122
|
+
"javaPackageName": "com.rangaat"
|
|
123
|
+
},
|
|
124
|
+
"ios": {
|
|
125
|
+
"components": {
|
|
126
|
+
"RangaatView": {
|
|
127
|
+
"className": "RangaatView"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"prettier": {
|
|
133
|
+
"quoteProps": "consistent",
|
|
134
|
+
"singleQuote": true,
|
|
135
|
+
"tabWidth": 2,
|
|
136
|
+
"trailingComma": "es5",
|
|
137
|
+
"useTabs": false
|
|
138
|
+
},
|
|
139
|
+
"jest": {
|
|
140
|
+
"preset": "@react-native/jest-preset",
|
|
141
|
+
"modulePathIgnorePatterns": [
|
|
142
|
+
"<rootDir>/example/node_modules",
|
|
143
|
+
"<rootDir>/lib/"
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
"commitlint": {
|
|
147
|
+
"extends": [
|
|
148
|
+
"@commitlint/config-conventional"
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
"release-it": {
|
|
152
|
+
"git": {
|
|
153
|
+
"commitMessage": "chore: release ${version}",
|
|
154
|
+
"tagName": "v${version}"
|
|
155
|
+
},
|
|
156
|
+
"npm": {
|
|
157
|
+
"publish": true
|
|
158
|
+
},
|
|
159
|
+
"github": {
|
|
160
|
+
"release": true
|
|
161
|
+
},
|
|
162
|
+
"plugins": {
|
|
163
|
+
"@release-it/conventional-changelog": {
|
|
164
|
+
"preset": {
|
|
165
|
+
"name": "angular"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"create-react-native-library": {
|
|
171
|
+
"type": "fabric-view",
|
|
172
|
+
"languages": "kotlin-objc",
|
|
173
|
+
"tools": [
|
|
174
|
+
"eslint",
|
|
175
|
+
"jest",
|
|
176
|
+
"lefthook",
|
|
177
|
+
"release-it",
|
|
178
|
+
"vite"
|
|
179
|
+
],
|
|
180
|
+
"version": "0.62.0"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { View, type ColorValue, type ViewProps } from 'react-native';
|
|
2
|
+
|
|
3
|
+
type Props = ViewProps & {
|
|
4
|
+
color?: ColorValue;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export function RangaatView({ color, style, ...rest }: Props) {
|
|
8
|
+
return <View {...rest} style={[style, { backgroundColor: color }]} />;
|
|
9
|
+
}
|