@ieu-ui/core 0.2.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/dist/config/types.d.ts +8 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +3 -0
- package/dist/config/types.js.map +1 -0
- package/dist/context/IeuProvider.d.ts +11 -0
- package/dist/context/IeuProvider.d.ts.map +1 -0
- package/dist/context/IeuProvider.js +77 -0
- package/dist/context/IeuProvider.js.map +1 -0
- package/dist/context/ThemeContext.d.ts +12 -0
- package/dist/context/ThemeContext.d.ts.map +1 -0
- package/dist/context/ThemeContext.js +17 -0
- package/dist/context/ThemeContext.js.map +1 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +16 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/useColorMode.d.ts +10 -0
- package/dist/hooks/useColorMode.d.ts.map +1 -0
- package/dist/hooks/useColorMode.js +38 -0
- package/dist/hooks/useColorMode.js.map +1 -0
- package/dist/hooks/useResponsive.d.ts +23 -0
- package/dist/hooks/useResponsive.d.ts.map +1 -0
- package/dist/hooks/useResponsive.js +71 -0
- package/dist/hooks/useResponsive.js.map +1 -0
- package/dist/hooks/useTheme.d.ts +49 -0
- package/dist/hooks/useTheme.d.ts.map +1 -0
- package/dist/hooks/useTheme.js +42 -0
- package/dist/hooks/useTheme.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/theme/animations.d.ts +69 -0
- package/dist/theme/animations.d.ts.map +1 -0
- package/dist/theme/animations.js +63 -0
- package/dist/theme/animations.js.map +1 -0
- package/dist/theme/borderRadius.d.ts +13 -0
- package/dist/theme/borderRadius.d.ts.map +1 -0
- package/dist/theme/borderRadius.js +15 -0
- package/dist/theme/borderRadius.js.map +1 -0
- package/dist/theme/breakpoints.d.ts +23 -0
- package/dist/theme/breakpoints.d.ts.map +1 -0
- package/dist/theme/breakpoints.js +24 -0
- package/dist/theme/breakpoints.js.map +1 -0
- package/dist/theme/colors.d.ts +41 -0
- package/dist/theme/colors.d.ts.map +1 -0
- package/dist/theme/colors.js +206 -0
- package/dist/theme/colors.js.map +1 -0
- package/dist/theme/index.d.ts +32 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +60 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/shadows.d.ts +13 -0
- package/dist/theme/shadows.d.ts.map +1 -0
- package/dist/theme/shadows.js +55 -0
- package/dist/theme/shadows.js.map +1 -0
- package/dist/theme/spacing.d.ts +49 -0
- package/dist/theme/spacing.d.ts.map +1 -0
- package/dist/theme/spacing.js +50 -0
- package/dist/theme/spacing.js.map +1 -0
- package/dist/theme/typography.d.ts +57 -0
- package/dist/theme/typography.d.ts.map +1 -0
- package/dist/theme/typography.js +151 -0
- package/dist/theme/typography.js.map +1 -0
- package/dist/utils/platform.d.ts +20 -0
- package/dist/utils/platform.d.ts.map +1 -0
- package/dist/utils/platform.js +31 -0
- package/dist/utils/platform.js.map +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export interface FontStack {
|
|
2
|
+
body: string[];
|
|
3
|
+
heading: string[];
|
|
4
|
+
mono: string[];
|
|
5
|
+
}
|
|
6
|
+
export declare const defaultFontStack: FontStack;
|
|
7
|
+
export interface FontSize {
|
|
8
|
+
xs: number;
|
|
9
|
+
sm: number;
|
|
10
|
+
md: number;
|
|
11
|
+
lg: number;
|
|
12
|
+
xl: number;
|
|
13
|
+
'2xl': number;
|
|
14
|
+
'3xl': number;
|
|
15
|
+
'4xl': number;
|
|
16
|
+
'5xl': number;
|
|
17
|
+
'6xl': number;
|
|
18
|
+
'7xl': number;
|
|
19
|
+
}
|
|
20
|
+
export interface FontWeight {
|
|
21
|
+
normal: '400';
|
|
22
|
+
medium: '500';
|
|
23
|
+
semibold: '600';
|
|
24
|
+
bold: '700';
|
|
25
|
+
extrabold: '800';
|
|
26
|
+
}
|
|
27
|
+
export interface LineHeight {
|
|
28
|
+
none: 1;
|
|
29
|
+
tight: 1.25;
|
|
30
|
+
snug: 1.375;
|
|
31
|
+
normal: 1.5;
|
|
32
|
+
relaxed: 1.625;
|
|
33
|
+
loose: 2;
|
|
34
|
+
}
|
|
35
|
+
export interface LetterSpacing {
|
|
36
|
+
tighter: '-0.05em';
|
|
37
|
+
tight: '-0.025em';
|
|
38
|
+
normal: '0';
|
|
39
|
+
wide: '0.025em';
|
|
40
|
+
wider: '0.05em';
|
|
41
|
+
widest: '0.1em';
|
|
42
|
+
}
|
|
43
|
+
export interface TypographySystem {
|
|
44
|
+
fontSize: FontSize;
|
|
45
|
+
fontWeight: FontWeight;
|
|
46
|
+
lineHeight: LineHeight;
|
|
47
|
+
letterSpacing: LetterSpacing;
|
|
48
|
+
}
|
|
49
|
+
export declare const typography: TypographySystem;
|
|
50
|
+
export interface TextVariant {
|
|
51
|
+
fontSize: number;
|
|
52
|
+
lineHeight: number;
|
|
53
|
+
fontWeight: string;
|
|
54
|
+
letterSpacing: string;
|
|
55
|
+
}
|
|
56
|
+
export declare const textVariants: Record<string, TextVariant>;
|
|
57
|
+
//# sourceMappingURL=typography.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../src/theme/typography.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,eAAO,MAAM,gBAAgB,EAAE,SA4B9B,CAAC;AAEF,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC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
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.textVariants = exports.typography = exports.defaultFontStack = void 0;
|
|
4
|
+
exports.defaultFontStack = {
|
|
5
|
+
body: [
|
|
6
|
+
'Inter',
|
|
7
|
+
'-apple-system',
|
|
8
|
+
'BlinkMacSystemFont',
|
|
9
|
+
'Segoe UI',
|
|
10
|
+
'Roboto',
|
|
11
|
+
'Helvetica Neue',
|
|
12
|
+
'Arial',
|
|
13
|
+
'sans-serif',
|
|
14
|
+
],
|
|
15
|
+
heading: [
|
|
16
|
+
'Inter',
|
|
17
|
+
'-apple-system',
|
|
18
|
+
'BlinkMacSystemFont',
|
|
19
|
+
'Segoe UI',
|
|
20
|
+
'Roboto',
|
|
21
|
+
'Helvetica Neue',
|
|
22
|
+
'Arial',
|
|
23
|
+
'sans-serif',
|
|
24
|
+
],
|
|
25
|
+
mono: [
|
|
26
|
+
'JetBrains Mono',
|
|
27
|
+
'Menlo',
|
|
28
|
+
'Monaco',
|
|
29
|
+
'Courier New',
|
|
30
|
+
'monospace',
|
|
31
|
+
],
|
|
32
|
+
};
|
|
33
|
+
exports.typography = {
|
|
34
|
+
fontSize: {
|
|
35
|
+
xs: 12,
|
|
36
|
+
sm: 14,
|
|
37
|
+
md: 16,
|
|
38
|
+
lg: 18,
|
|
39
|
+
xl: 20,
|
|
40
|
+
'2xl': 24,
|
|
41
|
+
'3xl': 30,
|
|
42
|
+
'4xl': 36,
|
|
43
|
+
'5xl': 48,
|
|
44
|
+
'6xl': 60,
|
|
45
|
+
'7xl': 72,
|
|
46
|
+
},
|
|
47
|
+
fontWeight: {
|
|
48
|
+
normal: '400',
|
|
49
|
+
medium: '500',
|
|
50
|
+
semibold: '600',
|
|
51
|
+
bold: '700',
|
|
52
|
+
extrabold: '800',
|
|
53
|
+
},
|
|
54
|
+
lineHeight: {
|
|
55
|
+
none: 1,
|
|
56
|
+
tight: 1.25,
|
|
57
|
+
snug: 1.375,
|
|
58
|
+
normal: 1.5,
|
|
59
|
+
relaxed: 1.625,
|
|
60
|
+
loose: 2,
|
|
61
|
+
},
|
|
62
|
+
letterSpacing: {
|
|
63
|
+
tighter: '-0.05em',
|
|
64
|
+
tight: '-0.025em',
|
|
65
|
+
normal: '0',
|
|
66
|
+
wide: '0.025em',
|
|
67
|
+
wider: '0.05em',
|
|
68
|
+
widest: '0.1em',
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
exports.textVariants = {
|
|
72
|
+
h1: {
|
|
73
|
+
fontSize: 60,
|
|
74
|
+
lineHeight: 72,
|
|
75
|
+
fontWeight: '700',
|
|
76
|
+
letterSpacing: '-0.025em',
|
|
77
|
+
},
|
|
78
|
+
h2: {
|
|
79
|
+
fontSize: 48,
|
|
80
|
+
lineHeight: 60,
|
|
81
|
+
fontWeight: '700',
|
|
82
|
+
letterSpacing: '-0.025em',
|
|
83
|
+
},
|
|
84
|
+
h3: {
|
|
85
|
+
fontSize: 36,
|
|
86
|
+
lineHeight: 44,
|
|
87
|
+
fontWeight: '600',
|
|
88
|
+
letterSpacing: '-0.025em',
|
|
89
|
+
},
|
|
90
|
+
h4: {
|
|
91
|
+
fontSize: 30,
|
|
92
|
+
lineHeight: 38,
|
|
93
|
+
fontWeight: '600',
|
|
94
|
+
letterSpacing: '-0.025em',
|
|
95
|
+
},
|
|
96
|
+
h5: {
|
|
97
|
+
fontSize: 24,
|
|
98
|
+
lineHeight: 32,
|
|
99
|
+
fontWeight: '600',
|
|
100
|
+
letterSpacing: '0',
|
|
101
|
+
},
|
|
102
|
+
h6: {
|
|
103
|
+
fontSize: 20,
|
|
104
|
+
lineHeight: 28,
|
|
105
|
+
fontWeight: '600',
|
|
106
|
+
letterSpacing: '0',
|
|
107
|
+
},
|
|
108
|
+
body1: {
|
|
109
|
+
fontSize: 16,
|
|
110
|
+
lineHeight: 24,
|
|
111
|
+
fontWeight: '400',
|
|
112
|
+
letterSpacing: '0',
|
|
113
|
+
},
|
|
114
|
+
body2: {
|
|
115
|
+
fontSize: 14,
|
|
116
|
+
lineHeight: 20,
|
|
117
|
+
fontWeight: '400',
|
|
118
|
+
letterSpacing: '0',
|
|
119
|
+
},
|
|
120
|
+
subtitle1: {
|
|
121
|
+
fontSize: 16,
|
|
122
|
+
lineHeight: 24,
|
|
123
|
+
fontWeight: '500',
|
|
124
|
+
letterSpacing: '0',
|
|
125
|
+
},
|
|
126
|
+
subtitle2: {
|
|
127
|
+
fontSize: 14,
|
|
128
|
+
lineHeight: 20,
|
|
129
|
+
fontWeight: '500',
|
|
130
|
+
letterSpacing: '0',
|
|
131
|
+
},
|
|
132
|
+
caption: {
|
|
133
|
+
fontSize: 12,
|
|
134
|
+
lineHeight: 16,
|
|
135
|
+
fontWeight: '400',
|
|
136
|
+
letterSpacing: '0',
|
|
137
|
+
},
|
|
138
|
+
overline: {
|
|
139
|
+
fontSize: 12,
|
|
140
|
+
lineHeight: 16,
|
|
141
|
+
fontWeight: '500',
|
|
142
|
+
letterSpacing: '0.1em',
|
|
143
|
+
},
|
|
144
|
+
button: {
|
|
145
|
+
fontSize: 14,
|
|
146
|
+
lineHeight: 20,
|
|
147
|
+
fontWeight: '500',
|
|
148
|
+
letterSpacing: '0.025em',
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
//# sourceMappingURL=typography.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typography.js","sourceRoot":"","sources":["../../src/theme/typography.ts"],"names":[],"mappings":";;;AAMa,QAAA,gBAAgB,GAAc;IACzC,IAAI,EAAE;QACJ,OAAO;QACP,eAAe;QACf,oBAAoB;QACpB,UAAU;QACV,QAAQ;QACR,gBAAgB;QAChB,OAAO;QACP,YAAY;KACb;IACD,OAAO,EAAE;QACP,OAAO;QACP,eAAe;QACf,oBAAoB;QACpB,UAAU;QACV,QAAQ;QACR,gBAAgB;QAChB,OAAO;QACP,YAAY;KACb;IACD,IAAI,E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
1
|
+
export declare const isIOS: () => boolean;
|
|
2
|
+
export declare const isAndroid: () => boolean;
|
|
3
|
+
export declare const platform: {
|
|
4
|
+
isIOS: boolean;
|
|
5
|
+
isAndroid: boolean;
|
|
6
|
+
OS: "ios" | "android" | "windows" | "macos" | "web";
|
|
7
|
+
select: <T>(config: {
|
|
8
|
+
ios?: T;
|
|
9
|
+
android?: T;
|
|
10
|
+
default: T;
|
|
11
|
+
}) => T;
|
|
12
|
+
};
|
|
13
|
+
export declare const isWeb: () => boolean;
|
|
14
|
+
export declare const select: <T>(config: {
|
|
15
|
+
ios?: T;
|
|
16
|
+
android?: T;
|
|
17
|
+
web?: T;
|
|
18
|
+
default: T;
|
|
19
|
+
}) => T;
|
|
20
|
+
//# sourceMappingURL=platform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/utils/platform.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,eAEjB,CAAC;AAEF,eAAO,MAAM,SAAS,eAErB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;aAIV,CAAC,UAAU;QAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAAC,OAAO,EAAE,CAAC,CAAA;KAAE,KAAG,CAAC;CAI7D,CAAC;AAEF,eAAO,MAAM,KAAK,eAEjB,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,CAAC,EAAE,QAAQ;IAAE,GAAG,CAAC,EAAE,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAAC,OAAO,EAAE,CAAC,CAAA;CAAE,KAAG,CAGjF,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.select = exports.isWeb = exports.platform = exports.isAndroid = exports.isIOS = void 0;
|
|
4
|
+
const react_native_1 = require("react-native");
|
|
5
|
+
const isIOS = () => {
|
|
6
|
+
return react_native_1.Platform.OS === 'ios';
|
|
7
|
+
};
|
|
8
|
+
exports.isIOS = isIOS;
|
|
9
|
+
const isAndroid = () => {
|
|
10
|
+
return react_native_1.Platform.OS === 'android';
|
|
11
|
+
};
|
|
12
|
+
exports.isAndroid = isAndroid;
|
|
13
|
+
exports.platform = {
|
|
14
|
+
isIOS: (0, exports.isIOS)(),
|
|
15
|
+
isAndroid: (0, exports.isAndroid)(),
|
|
16
|
+
OS: react_native_1.Platform.OS,
|
|
17
|
+
select: (config) => {
|
|
18
|
+
const os = react_native_1.Platform.OS;
|
|
19
|
+
return config[os] ?? config.default;
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
const isWeb = () => {
|
|
23
|
+
return react_native_1.Platform.OS === 'web';
|
|
24
|
+
};
|
|
25
|
+
exports.isWeb = isWeb;
|
|
26
|
+
const select = (config) => {
|
|
27
|
+
const os = react_native_1.Platform.OS;
|
|
28
|
+
return config[os] ?? config.default;
|
|
29
|
+
};
|
|
30
|
+
exports.select = select;
|
|
31
|
+
//# sourceMappingURL=platform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../src/utils/platform.ts"],"names":[],"mappings":";;;AAAA,+CAAwC;AAEjC,MAAM,KAAK,GAAG,GAAG,EAAE;IACxB,OAAO,uBAAQ,CAAC,EAAE,KAAK,KAAK,CAAC;AAC/B,CAAC,CAAC;AAFW,QAAA,KAAK,SAEhB;AAEK,MAAM,SAAS,GAAG,GAAG,EAAE;IAC5B,OAAO,uBAAQ,CAAC,EAAE,KAAK,SAAS,CAAC;AACnC,CAAC,CAAC;AAFW,QAAA,SAAS,aAEpB;AAEW,QAAA,QAAQ,GAAG;IACtB,KAAK,EAAE,IAAA,aAAK,GAAE;IACd,SAAS,EAAE,IAAA,iBAAS,GAAE;IACtB,EAAE,EAAE,uBAAQ,CAAC,EAAE;IACf,MAAM,EAAE,CAAI,MAA4C,EAAK,EAAE;QAC7D,MAAM,EAAE,GAAG,uBAAQ,CAAC,EAAyB,CAAC;QAC9C,OAAO,MAAM,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC;IACtC,CAAC;CACF,CAAC;AAEK,MAAM,KAAK,GAAG,GAAG,EAAE;IACxB,OAAO,uBAAQ,CAAC,EAAE,KAAK,KAAK,CAAC;AAC/B,CAAC,CAAC;AAFW,QAAA,KAAK,SAEhB;AAEK,MAAM,MAAM,GAAG,CAAI,MAAqD,EAAK,EAAE;IACpF,MAAM,EAAE,GAAG,uBAAQ,CAAC,EAAyB,CAAC;IAC9C,OAAO,MAAM,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC;AACtC,CAAC,CAAC;AAHW,QAAA,MAAM,UAGjB"}
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ieu-ui/core",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Core theme system and utilities for Ieu-UI",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc",
|
|
14
|
+
"prepublishOnly": "npm run build",
|
|
15
|
+
"dev": "tsc --watch",
|
|
16
|
+
"lint": "eslint src --ext .ts,.tsx",
|
|
17
|
+
"type-check": "tsc --noEmit",
|
|
18
|
+
"test": "jest --passWithNoTests",
|
|
19
|
+
"test:coverage": "jest --coverage",
|
|
20
|
+
"clean": "rm -rf dist"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"react-native-safe-area-context": "^5.0.0",
|
|
24
|
+
"react-native-reanimated": "^3.16.1"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"react": "^19.2.0",
|
|
28
|
+
"react-native": ">=0.84.0"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/react": "^19.2.0",
|
|
32
|
+
"@types/react-native": "^0.73.0",
|
|
33
|
+
"jest": "^29.7.0",
|
|
34
|
+
"jest-expo": "~52.0.6",
|
|
35
|
+
"react-test-renderer": "^19.2.0",
|
|
36
|
+
"typescript": "^5.7.2"
|
|
37
|
+
},
|
|
38
|
+
"jest": {
|
|
39
|
+
"preset": "jest-expo",
|
|
40
|
+
"testMatch": [
|
|
41
|
+
"**/__tests__/**/*.test.ts?(x)"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
}
|