@impulse-ui-native/theme 1.0.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.
@@ -0,0 +1,185 @@
1
+ import { ViewStyle, TextStyle, DimensionValue, StyleSheet } from 'react-native';
2
+ import { DeepPartial } from '@impulse-ui-native/core';
3
+ import * as react from 'react';
4
+ import { PropsWithChildren } from 'react';
5
+
6
+ declare const StylePropsSet: Set<keyof SpacingProps | keyof ColorProps | keyof ShadowProps | keyof BorderProps | keyof TypographyProps | keyof FlexProps>;
7
+
8
+ type BorderProps = {
9
+ borderRadius?: ViewStyle['borderRadius'];
10
+ borderColor?: ViewStyle['borderColor'];
11
+ borderWidth?: ViewStyle['borderWidth'];
12
+ borderStyle?: ViewStyle['borderStyle'];
13
+ };
14
+
15
+ type ColorProps = {
16
+ color?: TextStyle['color'];
17
+ backgroundColor?: ViewStyle['backgroundColor'];
18
+ opacity?: ViewStyle['opacity'];
19
+ };
20
+
21
+ type ComponentSize = "small" | "medium" | "large";
22
+
23
+ type FlexProps = {
24
+ flex?: ViewStyle["flex"];
25
+ flexGrow?: ViewStyle["flexGrow"];
26
+ flexShrink?: ViewStyle["flexShrink"];
27
+ flexBasis?: ViewStyle["flexBasis"];
28
+ flexDirection?: ViewStyle["flexDirection"];
29
+ flexWrap?: ViewStyle["flexWrap"];
30
+ justifyContent?: ViewStyle["justifyContent"];
31
+ alignItems?: ViewStyle["alignItems"];
32
+ alignSelf?: ViewStyle["alignSelf"];
33
+ alignContent?: ViewStyle["alignContent"];
34
+ gap?: ViewStyle["gap"];
35
+ rowGap?: ViewStyle["rowGap"];
36
+ columnGap?: ViewStyle["columnGap"];
37
+ position?: ViewStyle["position"];
38
+ top?: ViewStyle["top"];
39
+ right?: ViewStyle["right"];
40
+ bottom?: ViewStyle["bottom"];
41
+ left?: ViewStyle["left"];
42
+ };
43
+
44
+ type ShadowProps = {
45
+ shadowColor?: ViewStyle['shadowColor'];
46
+ shadowOpacity?: ViewStyle['shadowOpacity'];
47
+ shadowRadius?: ViewStyle['shadowRadius'];
48
+ shadowOffset?: ViewStyle['shadowOffset'];
49
+ elevation?: ViewStyle['elevation'];
50
+ };
51
+
52
+ type SpacingProps = {
53
+ margin?: ViewStyle['margin'];
54
+ marginTop?: ViewStyle['marginTop'];
55
+ marginBottom?: ViewStyle['marginBottom'];
56
+ marginLeft?: ViewStyle['marginLeft'];
57
+ marginRight?: ViewStyle['marginRight'];
58
+ marginHorizontal?: ViewStyle['marginHorizontal'];
59
+ marginVertical?: ViewStyle['marginVertical'];
60
+ padding?: ViewStyle['padding'];
61
+ paddingTop?: ViewStyle['paddingTop'];
62
+ paddingBottom?: ViewStyle['paddingBottom'];
63
+ paddingLeft?: ViewStyle['paddingLeft'];
64
+ paddingRight?: ViewStyle['paddingRight'];
65
+ paddingHorizontal?: ViewStyle['paddingHorizontal'];
66
+ paddingVertical?: ViewStyle['paddingVertical'];
67
+ };
68
+
69
+ type TypographyProps = {
70
+ fontSize?: TextStyle['fontSize'];
71
+ fontFamily?: TextStyle['fontFamily'];
72
+ fontWeight?: TextStyle['fontWeight'];
73
+ fontStyle?: TextStyle['fontStyle'];
74
+ letterSpacing?: TextStyle['letterSpacing'];
75
+ lineHeight?: TextStyle['lineHeight'];
76
+ textAlign?: TextStyle['textAlign'];
77
+ textDecorationLine?: TextStyle['textDecorationLine'];
78
+ textDecorationStyle?: TextStyle['textDecorationStyle'];
79
+ textDecorationColor?: TextStyle['textDecorationColor'];
80
+ textTransform?: TextStyle['textTransform'];
81
+ includeFontPadding?: TextStyle['includeFontPadding'];
82
+ textAlignVertical?: TextStyle['textAlignVertical'];
83
+ writingDirection?: TextStyle['writingDirection'];
84
+ };
85
+ type TypographyPresetKey = 'Master' | 'DisplayLarge' | 'DisplayMedium' | 'DisplaySmall' | 'Title1' | 'Title2' | 'Title3' | 'Title4' | 'Title5' | 'Title6' | 'Subtitle1' | 'Subtitle2' | 'BodyLarge' | 'Body' | 'BodySmall' | 'Caption' | 'Label' | 'Overline' | 'Helper' | 'Code' | 'Quote' | 'Eyebrow';
86
+
87
+ type StyleProps = Partial<SpacingProps & ColorProps & ShadowProps & BorderProps & TypographyProps & FlexProps>;
88
+ type StylePropKey = keyof StyleProps;
89
+
90
+ declare const LightTheme: AppTheme;
91
+ interface ThemeColors {
92
+ primary: string;
93
+ secondary: string;
94
+ neutral: NeutralColors;
95
+ white: string;
96
+ black: string;
97
+ error: string;
98
+ warning: string;
99
+ success: string;
100
+ info: string;
101
+ text: {
102
+ primary: string;
103
+ secondary: string;
104
+ };
105
+ background: {
106
+ primary: string;
107
+ secondary: string;
108
+ };
109
+ }
110
+ interface ComponentsThemes {
111
+ typography: Record<TypographyPresetKey, TypographyProps>;
112
+ }
113
+ interface AppTheme {
114
+ colors: ThemeColors;
115
+ spacing: Space;
116
+ radii: Radii;
117
+ borderSize: BorderSizes;
118
+ fontFamily: FontFamilyMap;
119
+ fontSize: FontSizes;
120
+ components?: DeepPartial<ComponentsThemes>;
121
+ }
122
+
123
+ declare const DarkTheme: AppTheme;
124
+
125
+ interface ThemeContextData {
126
+ loaded: boolean;
127
+ theme: AppTheme;
128
+ }
129
+ type ColorScheme = "light" | "dark";
130
+
131
+ type SpaceSizesKeys = "none" | "auto" | "xxs" | "xs" | "mxs" | "sm" | "msm" | "md" | "lg" | "xl" | "xxl";
132
+ type Space = Record<SpaceSizesKeys, DimensionValue>;
133
+ type FontSizesKeys = "xxs" | "xs" | "xsm" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "huge" | "massive";
134
+ type FontSizes = Record<FontSizesKeys, number>;
135
+ type LineHeightKeys = "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
136
+ type LineHeights = Record<LineHeightKeys, string>;
137
+ type FontWeightKey = "thin" | "extraLight" | "light" | "regular" | "medium" | "semiBold" | "bold" | "extraBold" | "black";
138
+ type FontWeights = Record<FontWeightKey, "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900">;
139
+ type LetterSpacingKey = "tightest" | "tighter" | "tight" | "normal" | "wide" | "wider" | "widest" | "ultraWide";
140
+ type LetterSpacings = Record<LetterSpacingKey, number>;
141
+ type BorderSizeKey = "sm" | "md" | "lg" | "xl" | "xxl";
142
+ type BorderSizes = Record<BorderSizeKey, number>;
143
+ type RadiusKey = "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "round";
144
+ type Radii = Record<RadiusKey, number>;
145
+ type RadiusDrawnKey = "drawn1" | "drawn2" | "drawn3" | "drawn4" | "drawn5" | "drawn6";
146
+ type RadiiDrawn = Record<RadiusDrawnKey, string>;
147
+ type RadiusBlobKey = "blob1" | "blob2" | "blob3" | "blob4" | "blob5";
148
+ type RadiiBlob = Record<RadiusBlobKey, string>;
149
+ type RadiusConditionalKey = "conditional1" | "conditional2" | "conditional3" | "conditional4" | "conditional5" | "conditional6";
150
+ type RadiiConditional = Record<RadiusConditionalKey, string>;
151
+ type NeutralColorKey = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13";
152
+ type NeutralColors = Record<NeutralColorKey, string>;
153
+ type FontFamilyKey = "thin" | "thinItalic" | "extraLight" | "extraLightItalic" | "light" | "lightItalic" | "regular" | "italic" | "medium" | "mediumItalic" | "semiBold" | "semiBoldItalic" | "bold" | "boldItalic" | "extraBold" | "extraBoldItalic" | "black" | "blackItalic";
154
+ type FontFamilyMap = Record<FontFamilyKey, string>;
155
+
156
+ declare function useBorder(): BorderSizes;
157
+
158
+ declare function useColors(): ThemeColors;
159
+
160
+ declare function useRadii(): Radii;
161
+
162
+ declare function useSpace(): Space;
163
+
164
+ declare function useStyleProps<Props extends object>(props: Props): Partial<SpacingProps & ColorProps & ShadowProps & BorderProps & TypographyProps & FlexProps>;
165
+
166
+ declare function useTheme(): AppTheme;
167
+
168
+ type ThemedStyles<T extends StyleSheet.NamedStyles<T>> = T;
169
+ type StyledFunction<Props extends object, T extends StyleSheet.NamedStyles<T>> = (theme: AppTheme, props: Props) => ThemedStyles<T>;
170
+ declare const useThemedStyles: <Props extends object, T extends StyleSheet.NamedStyles<T>>(styledFunction: StyledFunction<Props, T>, props: Props) => ThemedStyles<T>;
171
+
172
+ interface ThemeProviderProps {
173
+ scheme: ColorScheme;
174
+ theme: {
175
+ light: AppTheme;
176
+ dark: AppTheme;
177
+ };
178
+ }
179
+ declare const ThemeProvider: react.NamedExoticComponent<PropsWithChildren<DeepPartial<ThemeProviderProps>>>;
180
+ declare function useThemeContext(): ThemeContextData;
181
+
182
+ declare const extractStyleProps: <Props extends object>(props: Props) => StyleProps;
183
+ declare const createStyleKey: <Props extends object>(props: Props) => string;
184
+
185
+ export { type AppTheme, type BorderProps, type BorderSizeKey, type BorderSizes, type ColorProps, type ColorScheme, type ComponentSize, DarkTheme, type FlexProps, type FontFamilyKey, type FontFamilyMap, type FontSizes, type FontSizesKeys, type FontWeightKey, type FontWeights, type LetterSpacingKey, type LetterSpacings, LightTheme, type LineHeightKeys, type LineHeights, type NeutralColorKey, type NeutralColors, type Radii, type RadiiBlob, type RadiiConditional, type RadiiDrawn, type RadiusBlobKey, type RadiusConditionalKey, type RadiusDrawnKey, type RadiusKey, type ShadowProps, type Space, type SpaceSizesKeys, type SpacingProps, type StylePropKey, type StyleProps, StylePropsSet, type ThemeContextData, ThemeProvider, type TypographyPresetKey, type TypographyProps, createStyleKey, extractStyleProps, useBorder, useColors, useRadii, useSpace, useStyleProps, useTheme, useThemeContext, useThemedStyles };
@@ -0,0 +1,364 @@
1
+ // src/constants/style.constants.ts
2
+ var StylePropsSet = /* @__PURE__ */ new Set([
3
+ // Spacing
4
+ "margin",
5
+ "marginTop",
6
+ "marginBottom",
7
+ "marginLeft",
8
+ "marginRight",
9
+ "marginHorizontal",
10
+ "marginVertical",
11
+ "padding",
12
+ "paddingTop",
13
+ "paddingBottom",
14
+ "paddingLeft",
15
+ "paddingRight",
16
+ "paddingHorizontal",
17
+ "paddingVertical",
18
+ // Appearance
19
+ "color",
20
+ "backgroundColor",
21
+ "opacity",
22
+ "borderRadius",
23
+ "borderColor",
24
+ "borderWidth",
25
+ "borderStyle",
26
+ "shadowColor",
27
+ "shadowOpacity",
28
+ "shadowRadius",
29
+ "shadowOffset",
30
+ "elevation",
31
+ // Typography (TextStyle)
32
+ "fontSize",
33
+ "fontFamily",
34
+ "fontWeight",
35
+ "fontStyle",
36
+ "letterSpacing",
37
+ "lineHeight",
38
+ "textAlign",
39
+ "textDecorationLine",
40
+ "textDecorationStyle",
41
+ "textDecorationColor",
42
+ "textTransform",
43
+ "includeFontPadding",
44
+ "textAlignVertical",
45
+ "writingDirection",
46
+ // Flex (ViewStyle)
47
+ "flex",
48
+ "flexGrow",
49
+ "flexShrink",
50
+ "flexBasis",
51
+ "flexDirection",
52
+ "flexWrap",
53
+ "justifyContent",
54
+ "alignItems",
55
+ "alignSelf",
56
+ "alignContent",
57
+ "gap",
58
+ "rowGap",
59
+ "columnGap",
60
+ // Positioning (commonly used with flex layouts)
61
+ "position",
62
+ "top",
63
+ "right",
64
+ "bottom",
65
+ "left"
66
+ ]);
67
+
68
+ // src/hooks/use-border.hook.ts
69
+ import { useMemo as useMemo2 } from "react";
70
+
71
+ // src/providers/theme.provider.tsx
72
+ import { merge } from "@impulse-ui-native/core";
73
+ import {
74
+ createContext,
75
+ memo,
76
+ useContext,
77
+ useMemo
78
+ } from "react";
79
+
80
+ // src/theme/tokens.theme.ts
81
+ var SpaceTokens = {
82
+ none: 0,
83
+ auto: "auto",
84
+ xxs: 4,
85
+ xs: 8,
86
+ mxs: 12,
87
+ sm: 16,
88
+ msm: 24,
89
+ md: 32,
90
+ lg: 48,
91
+ xl: 64,
92
+ xxl: 96
93
+ };
94
+ var BorderSizeTokens = {
95
+ sm: 1,
96
+ md: 2,
97
+ lg: 3,
98
+ xl: 5,
99
+ xxl: 10
100
+ };
101
+ var RadiiTokens = {
102
+ sm: 4,
103
+ md: 8,
104
+ lg: 16,
105
+ xl: 32,
106
+ xxl: 64,
107
+ xxxl: 128,
108
+ round: 1e5
109
+ };
110
+ var FontSizeTokens = {
111
+ xxs: 8,
112
+ xs: 12,
113
+ xsm: 14,
114
+ sm: 16,
115
+ md: 18,
116
+ lg: 20,
117
+ xl: 24,
118
+ xxl: 32,
119
+ xxxl: 40,
120
+ huge: 48,
121
+ massive: 56
122
+ };
123
+ var NeutralColorTokens = {
124
+ "0": "#ffffff",
125
+ "1": "#f8f9fa",
126
+ "2": "#f1f3f5",
127
+ "3": "#e9ecef",
128
+ "4": "#dee2e6",
129
+ "5": "#ced4da",
130
+ "6": "#adb5bd",
131
+ "7": "#868e96",
132
+ "8": "#495057",
133
+ "9": "#343a40",
134
+ "10": "#212529",
135
+ "11": "#16191d",
136
+ "12": "#0d0f12",
137
+ "13": "#000000"
138
+ };
139
+ var FontFamilyTokens = {
140
+ thin: "Montserrat-Thin",
141
+ thinItalic: "Montserrat-ThinItalic",
142
+ extraLight: "Montserrat-ExtraLight",
143
+ extraLightItalic: "Montserrat-ExtraLightItalic",
144
+ light: "Montserrat-Light",
145
+ lightItalic: "Montserrat-LightItalic",
146
+ regular: "Montserrat-Regular",
147
+ italic: "Montserrat-Italic",
148
+ medium: "Montserrat-Medium",
149
+ mediumItalic: "Montserrat-MediumItalic",
150
+ semiBold: "Montserrat-SemiBold",
151
+ semiBoldItalic: "Montserrat-SemiBoldItalic",
152
+ bold: "Montserrat-Bold",
153
+ boldItalic: "Montserrat-BoldItalic",
154
+ extraBold: "Montserrat-ExtraBold",
155
+ extraBoldItalic: "Montserrat-ExtraBoldItalic",
156
+ black: "Montserrat-Black",
157
+ blackItalic: "Montserrat-BlackItalic"
158
+ };
159
+
160
+ // src/theme/light.theme.ts
161
+ var LightTheme = {
162
+ colors: {
163
+ primary: "#f55d6b",
164
+ secondary: "#f55d6b",
165
+ neutral: NeutralColorTokens,
166
+ white: NeutralColorTokens["0"],
167
+ black: NeutralColorTokens["13"],
168
+ error: "#c92a2a",
169
+ warning: "#e67700",
170
+ success: "#7a9908",
171
+ info: "#1864ab",
172
+ text: {
173
+ primary: NeutralColorTokens["11"],
174
+ secondary: NeutralColorTokens["10"]
175
+ },
176
+ background: {
177
+ primary: NeutralColorTokens["2"],
178
+ secondary: NeutralColorTokens["0"]
179
+ }
180
+ },
181
+ spacing: SpaceTokens,
182
+ radii: RadiiTokens,
183
+ borderSize: BorderSizeTokens,
184
+ fontFamily: FontFamilyTokens,
185
+ fontSize: FontSizeTokens
186
+ };
187
+
188
+ // src/theme/dark.theme.ts
189
+ var DarkTheme = {
190
+ colors: {
191
+ primary: "#f55d6b",
192
+ secondary: "#f55d6b",
193
+ neutral: NeutralColorTokens,
194
+ white: NeutralColorTokens["0"],
195
+ black: NeutralColorTokens["13"],
196
+ error: "#c92a2a",
197
+ warning: "#e67700",
198
+ success: "#7a9908",
199
+ info: "#1864ab",
200
+ text: {
201
+ primary: NeutralColorTokens["11"],
202
+ secondary: NeutralColorTokens["10"]
203
+ },
204
+ background: {
205
+ primary: NeutralColorTokens["2"],
206
+ secondary: NeutralColorTokens["0"]
207
+ }
208
+ },
209
+ spacing: SpaceTokens,
210
+ radii: RadiiTokens,
211
+ borderSize: BorderSizeTokens,
212
+ fontFamily: FontFamilyTokens,
213
+ fontSize: FontSizeTokens
214
+ };
215
+
216
+ // src/providers/theme.provider.tsx
217
+ import {
218
+ Montserrat_100Thin,
219
+ Montserrat_100Thin_Italic,
220
+ Montserrat_200ExtraLight,
221
+ Montserrat_200ExtraLight_Italic,
222
+ Montserrat_300Light,
223
+ Montserrat_300Light_Italic,
224
+ Montserrat_400Regular,
225
+ Montserrat_400Regular_Italic,
226
+ Montserrat_500Medium,
227
+ Montserrat_500Medium_Italic,
228
+ Montserrat_600SemiBold,
229
+ Montserrat_600SemiBold_Italic,
230
+ Montserrat_700Bold,
231
+ Montserrat_700Bold_Italic,
232
+ Montserrat_800ExtraBold,
233
+ Montserrat_800ExtraBold_Italic,
234
+ Montserrat_900Black,
235
+ Montserrat_900Black_Italic,
236
+ useFonts
237
+ } from "@expo-google-fonts/montserrat";
238
+ var ThemeContext = createContext(void 0);
239
+ var ThemeProvider = memo(function ThemeProvider2(props) {
240
+ const scheme = props.scheme ?? "light";
241
+ const [loaded] = useFonts({
242
+ Montserrat_100Thin,
243
+ Montserrat_100Thin_Italic,
244
+ Montserrat_200ExtraLight,
245
+ Montserrat_200ExtraLight_Italic,
246
+ Montserrat_300Light,
247
+ Montserrat_300Light_Italic,
248
+ Montserrat_400Regular,
249
+ Montserrat_400Regular_Italic,
250
+ Montserrat_500Medium,
251
+ Montserrat_500Medium_Italic,
252
+ Montserrat_600SemiBold,
253
+ Montserrat_600SemiBold_Italic,
254
+ Montserrat_700Bold,
255
+ Montserrat_700Bold_Italic,
256
+ Montserrat_800ExtraBold,
257
+ Montserrat_800ExtraBold_Italic,
258
+ Montserrat_900Black,
259
+ Montserrat_900Black_Italic
260
+ });
261
+ const context = useMemo(() => {
262
+ const baseTheme = scheme === "light" ? LightTheme : DarkTheme;
263
+ return {
264
+ loaded,
265
+ theme: merge(baseTheme, props.theme?.[scheme])
266
+ };
267
+ }, [props.theme?.light, props.theme?.dark]);
268
+ return /* @__PURE__ */ React.createElement(ThemeContext.Provider, { value: context }, props.children);
269
+ });
270
+ function useThemeContext() {
271
+ const context = useContext(ThemeContext);
272
+ if (!context) {
273
+ throw new Error("useThemeContext must be used within a ThemeProvider");
274
+ }
275
+ return context;
276
+ }
277
+
278
+ // src/hooks/use-border.hook.ts
279
+ function useBorder() {
280
+ const context = useThemeContext();
281
+ return useMemo2(() => context.theme.borderSize, [context.theme.borderSize]);
282
+ }
283
+
284
+ // src/hooks/use-colors.hook.ts
285
+ import { useMemo as useMemo3 } from "react";
286
+ function useColors() {
287
+ const context = useThemeContext();
288
+ return useMemo3(() => context.theme.colors, [context.theme.colors]);
289
+ }
290
+
291
+ // src/hooks/use-radii.hook.ts
292
+ import { useMemo as useMemo4 } from "react";
293
+ function useRadii() {
294
+ const context = useThemeContext();
295
+ return useMemo4(() => context.theme.radii, [context.theme.radii]);
296
+ }
297
+
298
+ // src/hooks/use-space.hook.ts
299
+ import { useMemo as useMemo5 } from "react";
300
+ function useSpace() {
301
+ const context = useThemeContext();
302
+ return useMemo5(() => context.theme.spacing, [context.theme.spacing]);
303
+ }
304
+
305
+ // src/hooks/use-style-props.hook.ts
306
+ import { useMemo as useMemo6 } from "react";
307
+
308
+ // src/utils/style.utils.ts
309
+ var isStylePropKey = (k) => StylePropsSet.has(k);
310
+ var extractStyleProps = (props) => {
311
+ const style = {};
312
+ for (const k in props) {
313
+ if (isStylePropKey(k) && props[k] !== void 0) {
314
+ style[k] = props[k];
315
+ }
316
+ }
317
+ return style;
318
+ };
319
+ var createStyleKey = (props) => {
320
+ let key = "";
321
+ for (const k in props) {
322
+ if (isStylePropKey(k)) {
323
+ key += String(props[k]);
324
+ }
325
+ }
326
+ return key;
327
+ };
328
+
329
+ // src/hooks/use-style-props.hook.ts
330
+ function useStyleProps(props) {
331
+ const key = createStyleKey(props);
332
+ return useMemo6(() => extractStyleProps(props), [key]);
333
+ }
334
+
335
+ // src/hooks/use-theme.hook.ts
336
+ import { useMemo as useMemo7 } from "react";
337
+ function useTheme() {
338
+ const context = useThemeContext();
339
+ return useMemo7(() => context.theme, [context.theme]);
340
+ }
341
+
342
+ // src/hooks/use-themed-styles.ts
343
+ import { useMemo as useMemo8 } from "react";
344
+ var useThemedStyles = (styledFunction, props) => {
345
+ const theme = useTheme();
346
+ return useMemo8(() => styledFunction(theme, props), [theme, props]);
347
+ };
348
+ export {
349
+ DarkTheme,
350
+ LightTheme,
351
+ StylePropsSet,
352
+ ThemeProvider,
353
+ createStyleKey,
354
+ extractStyleProps,
355
+ useBorder,
356
+ useColors,
357
+ useRadii,
358
+ useSpace,
359
+ useStyleProps,
360
+ useTheme,
361
+ useThemeContext,
362
+ useThemedStyles
363
+ };
364
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/constants/style.constants.ts","../src/hooks/use-border.hook.ts","../src/providers/theme.provider.tsx","../src/theme/tokens.theme.ts","../src/theme/light.theme.ts","../src/theme/dark.theme.ts","../src/hooks/use-colors.hook.ts","../src/hooks/use-radii.hook.ts","../src/hooks/use-space.hook.ts","../src/hooks/use-style-props.hook.ts","../src/utils/style.utils.ts","../src/hooks/use-theme.hook.ts","../src/hooks/use-themed-styles.ts"],"sourcesContent":["import { StyleProps } from \"../types\";\r\n\r\nexport const StylePropsSet = new Set<keyof StyleProps>([\r\n // Spacing\r\n \"margin\",\r\n \"marginTop\",\r\n \"marginBottom\",\r\n \"marginLeft\",\r\n \"marginRight\",\r\n \"marginHorizontal\",\r\n \"marginVertical\",\r\n \"padding\",\r\n \"paddingTop\",\r\n \"paddingBottom\",\r\n \"paddingLeft\",\r\n \"paddingRight\",\r\n \"paddingHorizontal\",\r\n \"paddingVertical\",\r\n\r\n // Appearance\r\n \"color\",\r\n \"backgroundColor\",\r\n \"opacity\",\r\n \"borderRadius\",\r\n \"borderColor\",\r\n \"borderWidth\",\r\n \"borderStyle\",\r\n \"shadowColor\",\r\n \"shadowOpacity\",\r\n \"shadowRadius\",\r\n \"shadowOffset\",\r\n \"elevation\",\r\n\r\n // Typography (TextStyle)\r\n \"fontSize\",\r\n \"fontFamily\",\r\n \"fontWeight\",\r\n \"fontStyle\",\r\n \"letterSpacing\",\r\n \"lineHeight\",\r\n \"textAlign\",\r\n \"textDecorationLine\",\r\n \"textDecorationStyle\",\r\n \"textDecorationColor\",\r\n \"textTransform\",\r\n \"includeFontPadding\",\r\n \"textAlignVertical\",\r\n \"writingDirection\",\r\n\r\n // Flex (ViewStyle)\r\n \"flex\",\r\n \"flexGrow\",\r\n \"flexShrink\",\r\n \"flexBasis\",\r\n \"flexDirection\",\r\n \"flexWrap\",\r\n \"justifyContent\",\r\n \"alignItems\",\r\n \"alignSelf\",\r\n \"alignContent\",\r\n \"gap\",\r\n \"rowGap\",\r\n \"columnGap\",\r\n\r\n // Positioning (commonly used with flex layouts)\r\n \"position\",\r\n \"top\",\r\n \"right\",\r\n \"bottom\",\r\n \"left\",\r\n]);\r\n","import { useMemo } from \"react\";\r\nimport { useThemeContext } from \"../providers\";\r\nimport { BorderSizes } from \"../types\";\r\n\r\nexport function useBorder(): BorderSizes {\r\n const context = useThemeContext();\r\n\r\n return useMemo(() => context.theme.borderSize, [context.theme.borderSize]);\r\n}\r\n","import { DeepPartial, merge } from \"@impulse-ui-native/core\";\r\nimport {\r\n createContext,\r\n memo,\r\n PropsWithChildren,\r\n useContext,\r\n useMemo,\r\n} from \"react\";\r\nimport { AppTheme, DarkTheme, LightTheme } from \"../theme\";\r\nimport { ColorScheme, ThemeContextData } from \"../types\";\r\n\r\nimport {\r\n Montserrat_100Thin,\r\n Montserrat_100Thin_Italic,\r\n Montserrat_200ExtraLight,\r\n Montserrat_200ExtraLight_Italic,\r\n Montserrat_300Light,\r\n Montserrat_300Light_Italic,\r\n Montserrat_400Regular,\r\n Montserrat_400Regular_Italic,\r\n Montserrat_500Medium,\r\n Montserrat_500Medium_Italic,\r\n Montserrat_600SemiBold,\r\n Montserrat_600SemiBold_Italic,\r\n Montserrat_700Bold,\r\n Montserrat_700Bold_Italic,\r\n Montserrat_800ExtraBold,\r\n Montserrat_800ExtraBold_Italic,\r\n Montserrat_900Black,\r\n Montserrat_900Black_Italic,\r\n useFonts,\r\n} from \"@expo-google-fonts/montserrat\";\r\n\r\nconst ThemeContext = createContext<ThemeContextData | undefined>(undefined);\r\n\r\ninterface ThemeProviderProps {\r\n scheme: ColorScheme;\r\n theme: {\r\n light: AppTheme;\r\n dark: AppTheme;\r\n };\r\n}\r\n\r\nexport const ThemeProvider = memo(function ThemeProvider(\r\n props: PropsWithChildren<DeepPartial<ThemeProviderProps>>\r\n) {\r\n const scheme = props.scheme ?? \"light\";\r\n\r\n const [loaded] = useFonts({\r\n Montserrat_100Thin,\r\n Montserrat_100Thin_Italic,\r\n Montserrat_200ExtraLight,\r\n Montserrat_200ExtraLight_Italic,\r\n Montserrat_300Light,\r\n Montserrat_300Light_Italic,\r\n Montserrat_400Regular,\r\n Montserrat_400Regular_Italic,\r\n Montserrat_500Medium,\r\n Montserrat_500Medium_Italic,\r\n Montserrat_600SemiBold,\r\n Montserrat_600SemiBold_Italic,\r\n Montserrat_700Bold,\r\n Montserrat_700Bold_Italic,\r\n Montserrat_800ExtraBold,\r\n Montserrat_800ExtraBold_Italic,\r\n Montserrat_900Black,\r\n Montserrat_900Black_Italic,\r\n });\r\n\r\n const context = useMemo<ThemeContextData>(() => {\r\n const baseTheme = scheme === \"light\" ? LightTheme : DarkTheme;\r\n\r\n return {\r\n loaded,\r\n theme: merge(baseTheme, props.theme?.[scheme]),\r\n };\r\n }, [props.theme?.light, props.theme?.dark]);\r\n\r\n return (\r\n <ThemeContext.Provider value={context}>\r\n {props.children}\r\n </ThemeContext.Provider>\r\n );\r\n});\r\n\r\nexport function useThemeContext() {\r\n const context = useContext(ThemeContext);\r\n\r\n if (!context) {\r\n throw new Error(\"useThemeContext must be used within a ThemeProvider\");\r\n }\r\n\r\n return context;\r\n}\r\n","import {\r\n BorderSizes,\r\n FontFamilyMap,\r\n FontSizes,\r\n FontWeights,\r\n NeutralColors,\r\n Radii,\r\n Space,\r\n} from \"../types\";\r\n\r\nexport const SpaceTokens: Space = {\r\n none: 0,\r\n auto: \"auto\",\r\n xxs: 4,\r\n xs: 8,\r\n mxs: 12,\r\n sm: 16,\r\n msm: 24,\r\n md: 32,\r\n lg: 48,\r\n xl: 64,\r\n xxl: 96,\r\n};\r\n\r\nexport const BorderSizeTokens: BorderSizes = {\r\n sm: 1,\r\n md: 2,\r\n lg: 3,\r\n xl: 5,\r\n xxl: 10,\r\n};\r\n\r\nexport const RadiiTokens: Radii = {\r\n sm: 4,\r\n md: 8,\r\n lg: 16,\r\n xl: 32,\r\n xxl: 64,\r\n xxxl: 128,\r\n round: 100000,\r\n};\r\n\r\nexport const FontSizeTokens: FontSizes = {\r\n xxs: 8,\r\n xs: 12,\r\n xsm: 14,\r\n sm: 16,\r\n md: 18,\r\n lg: 20,\r\n xl: 24,\r\n xxl: 32,\r\n xxxl: 40,\r\n huge: 48,\r\n massive: 56,\r\n};\r\n\r\nexport const NeutralColorTokens: NeutralColors = {\r\n \"0\": \"#ffffff\",\r\n \"1\": \"#f8f9fa\",\r\n \"2\": \"#f1f3f5\",\r\n \"3\": \"#e9ecef\",\r\n \"4\": \"#dee2e6\",\r\n \"5\": \"#ced4da\",\r\n \"6\": \"#adb5bd\",\r\n \"7\": \"#868e96\",\r\n \"8\": \"#495057\",\r\n \"9\": \"#343a40\",\r\n \"10\": \"#212529\",\r\n \"11\": \"#16191d\",\r\n \"12\": \"#0d0f12\",\r\n \"13\": \"#000000\",\r\n};\r\n\r\nexport const FontWeightTokens: FontWeights = {\r\n thin: \"100\",\r\n extraLight: \"200\",\r\n light: \"300\",\r\n regular: \"400\",\r\n medium: \"500\",\r\n semiBold: \"600\",\r\n bold: \"700\",\r\n extraBold: \"800\",\r\n black: \"900\",\r\n};\r\n\r\nexport const FontFamilyTokens: FontFamilyMap = {\r\n thin: \"Montserrat-Thin\",\r\n thinItalic: \"Montserrat-ThinItalic\",\r\n extraLight: \"Montserrat-ExtraLight\",\r\n extraLightItalic: \"Montserrat-ExtraLightItalic\",\r\n light: \"Montserrat-Light\",\r\n lightItalic: \"Montserrat-LightItalic\",\r\n regular: \"Montserrat-Regular\",\r\n italic: \"Montserrat-Italic\",\r\n medium: \"Montserrat-Medium\",\r\n mediumItalic: \"Montserrat-MediumItalic\",\r\n semiBold: \"Montserrat-SemiBold\",\r\n semiBoldItalic: \"Montserrat-SemiBoldItalic\",\r\n bold: \"Montserrat-Bold\",\r\n boldItalic: \"Montserrat-BoldItalic\",\r\n extraBold: \"Montserrat-ExtraBold\",\r\n extraBoldItalic: \"Montserrat-ExtraBoldItalic\",\r\n black: \"Montserrat-Black\",\r\n blackItalic: \"Montserrat-BlackItalic\",\r\n};\r\n","import { DeepPartial } from \"@impulse-ui-native/core\";\r\nimport {\r\n BorderSizes,\r\n FontFamilyMap,\r\n FontSizes,\r\n NeutralColors,\r\n Radii,\r\n Space,\r\n TypographyPresetKey,\r\n TypographyProps,\r\n} from \"../types\";\r\nimport {\r\n BorderSizeTokens,\r\n FontFamilyTokens,\r\n FontSizeTokens,\r\n NeutralColorTokens,\r\n RadiiTokens,\r\n SpaceTokens,\r\n} from \"./tokens.theme\";\r\n\r\nexport const LightTheme: AppTheme = {\r\n colors: {\r\n primary: \"#f55d6b\",\r\n secondary: \"#f55d6b\",\r\n neutral: NeutralColorTokens,\r\n white: NeutralColorTokens[\"0\"],\r\n black: NeutralColorTokens[\"13\"],\r\n error: \"#c92a2a\",\r\n warning: \"#e67700\",\r\n success: \"#7a9908\",\r\n info: \"#1864ab\",\r\n text: {\r\n primary: NeutralColorTokens[\"11\"],\r\n secondary: NeutralColorTokens[\"10\"],\r\n },\r\n background: {\r\n primary: NeutralColorTokens[\"2\"],\r\n secondary: NeutralColorTokens[\"0\"],\r\n },\r\n },\r\n spacing: SpaceTokens,\r\n radii: RadiiTokens,\r\n borderSize: BorderSizeTokens,\r\n fontFamily: FontFamilyTokens,\r\n fontSize: FontSizeTokens,\r\n};\r\n\r\nexport interface ThemeColors {\r\n primary: string;\r\n secondary: string;\r\n neutral: NeutralColors;\r\n\r\n white: string;\r\n black: string;\r\n\r\n error: string;\r\n warning: string;\r\n success: string;\r\n info: string;\r\n\r\n text: {\r\n primary: string;\r\n secondary: string;\r\n };\r\n\r\n background: {\r\n primary: string;\r\n secondary: string;\r\n };\r\n}\r\n\r\nexport interface ComponentsThemes {\r\n typography: Record<TypographyPresetKey, TypographyProps>;\r\n}\r\n\r\nexport interface AppTheme {\r\n colors: ThemeColors;\r\n spacing: Space;\r\n radii: Radii;\r\n borderSize: BorderSizes;\r\n fontFamily: FontFamilyMap;\r\n fontSize: FontSizes;\r\n components?: DeepPartial<ComponentsThemes>;\r\n}\r\n","import { AppTheme } from './light.theme';\r\nimport {\r\n BorderSizeTokens,\r\n FontFamilyTokens,\r\n FontSizeTokens,\r\n NeutralColorTokens,\r\n RadiiTokens,\r\n SpaceTokens,\r\n} from './tokens.theme';\r\n\r\nexport const DarkTheme: AppTheme = {\r\n colors: {\r\n primary: '#f55d6b',\r\n secondary: '#f55d6b',\r\n neutral: NeutralColorTokens,\r\n white: NeutralColorTokens['0'],\r\n black: NeutralColorTokens['13'],\r\n error: '#c92a2a',\r\n warning: '#e67700',\r\n success: '#7a9908',\r\n info: '#1864ab',\r\n text: {\r\n primary: NeutralColorTokens['11'],\r\n secondary: NeutralColorTokens['10'],\r\n },\r\n background: {\r\n primary: NeutralColorTokens['2'],\r\n secondary: NeutralColorTokens['0'],\r\n },\r\n },\r\n spacing: SpaceTokens,\r\n radii: RadiiTokens,\r\n borderSize: BorderSizeTokens,\r\n fontFamily: FontFamilyTokens,\r\n fontSize: FontSizeTokens,\r\n};\r\n","import { useMemo } from \"react\";\r\nimport { useThemeContext } from \"../providers\";\r\nimport { ThemeColors } from \"../theme/light.theme\";\r\n\r\nexport function useColors(): ThemeColors {\r\n const context = useThemeContext();\r\n\r\n return useMemo(() => context.theme.colors, [context.theme.colors]);\r\n}\r\n","import { useMemo } from \"react\";\r\nimport { useThemeContext } from \"../providers\";\r\nimport { Radii } from \"../types\";\r\n\r\nexport function useRadii(): Radii {\r\n const context = useThemeContext();\r\n\r\n return useMemo(() => context.theme.radii, [context.theme.radii]);\r\n}\r\n","import { useMemo } from \"react\";\r\nimport { useThemeContext } from \"../providers\";\r\nimport { Space } from \"../types\";\r\n\r\nexport function useSpace(): Space {\r\n const context = useThemeContext();\r\n\r\n return useMemo(() => context.theme.spacing, [context.theme.spacing]);\r\n}\r\n","import { useMemo } from 'react';\r\nimport { createStyleKey, extractStyleProps } from '../utils';\r\n\r\nexport function useStyleProps<Props extends object>(props: Props) {\r\n const key = createStyleKey(props);\r\n\r\n return useMemo(() => extractStyleProps(props), [key]);\r\n}\r\n","import { StylePropsSet } from '../constants';\r\nimport { StylePropKey, StyleProps } from '../types';\r\n\r\nconst isStylePropKey = (k: string): k is StylePropKey =>\r\n StylePropsSet.has(k as StylePropKey);\r\n\r\nexport const extractStyleProps = <Props extends object>(\r\n props: Props\r\n): StyleProps => {\r\n const style: StyleProps = {};\r\n \r\n for (const k in props) {\r\n if (isStylePropKey(k) && props[k] !== undefined) {\r\n style[k] = props[k] as any;\r\n }\r\n }\r\n \r\n return style;\r\n};\r\n\r\nexport const createStyleKey = <Props extends object>(props: Props) => {\r\n let key = '';\r\n\r\n for (const k in props) {\r\n if (isStylePropKey(k)) {\r\n key += String(props[k as keyof Props]);\r\n }\r\n }\r\n \r\n return key;\r\n};\r\n","import { useMemo } from \"react\";\r\nimport { useThemeContext } from \"../providers\";\r\nimport { AppTheme } from \"../theme\";\r\n\r\nexport function useTheme(): AppTheme {\r\n const context = useThemeContext();\r\n\r\n return useMemo(() => context.theme, [context.theme]);\r\n}\r\n","import { useMemo } from \"react\";\r\nimport { StyleSheet } from \"react-native\";\r\nimport { AppTheme } from \"../theme\";\r\nimport { useTheme } from \"./use-theme.hook\";\r\n\r\ntype ThemedStyles<T extends StyleSheet.NamedStyles<T>> = T;\r\n\r\ntype StyledFunction<\r\n Props extends object,\r\n T extends StyleSheet.NamedStyles<T>\r\n> = (theme: AppTheme, props: Props) => ThemedStyles<T>;\r\n\r\nexport const useThemedStyles = <\r\n Props extends object,\r\n T extends StyleSheet.NamedStyles<T>\r\n>(\r\n styledFunction: StyledFunction<Props, T>,\r\n props: Props\r\n): ThemedStyles<T> => {\r\n const theme = useTheme();\r\n\r\n return useMemo(() => styledFunction(theme, props), [theme, props]);\r\n};\r\n"],"mappings":";AAEO,IAAM,gBAAgB,oBAAI,IAAsB;AAAA;AAAA,EAErD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAGA;AAA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E,MAAI,MAAM;AAEV,aAAW,KAAK,OAAO;AACrB,QAAI,eAAe,CAAC,GAAG;AACrB,aAAO,OAAO,MAAM,CAAgB,CAAC;AAAA,IACvC;AAAA,EACF;AAEA,SAAO;AACT;;;AD3BO,SAAS,cAAoC,OAAc;AAChE,QAAM,MAAM,eAAe,KAAK;AAEhC,SAAOC,SAAQ,MAAM,kBAAkB,KAAK,GAAG,CAAC,GAAG,CAAC;AACtD;;;AEPA,SAAS,WAAAC,gBAAe;AAIjB,SAAS,WAAqB;AACnC,QAAM,UAAU,gBAAgB;AAEhC,SAAOC,SAAQ,MAAM,QAAQ,OAAO,CAAC,QAAQ,KAAK,CAAC;AACrD;;;ACRA,SAAS,WAAAC,gBAAe;AAYjB,IAAM,kBAAkB,CAI7B,gBACA,UACoB;AACpB,QAAM,QAAQ,SAAS;AAEvB,SAAOC,SAAQ,MAAM,eAAe,OAAO,KAAK,GAAG,CAAC,OAAO,KAAK,CAAC;AACnE;","names":["useMemo","ThemeProvider","useMemo","useMemo","useMemo","useMemo","useMemo","useMemo","useMemo","useMemo","useMemo","useMemo","useMemo","useMemo","useMemo"]}
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@impulse-ui-native/theme",
3
+ "version": "1.0.0",
4
+ "source": "src/index.ts",
5
+ "main": "dist/index.cjs.js",
6
+ "module": "dist/index.esm.js",
7
+ "types": "dist/index.d.ts",
8
+ "react-native": "src/index.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "react-native": "./src/index.ts",
13
+ "import": "./dist/index.esm.js",
14
+ "require": "./dist/index.cjs.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "src",
20
+ "README.md",
21
+ "LICENSE"
22
+ ],
23
+ "dependencies": {
24
+ "@expo-google-fonts/montserrat": "^0.4.1",
25
+ "@impulse-ui-native/core": "1.0.0"
26
+ },
27
+ "peerDependencies": {
28
+ "react": ">=18",
29
+ "react-native": ">=0.74",
30
+ "expo": ">=51 || >=52",
31
+ "expo-modules-core": ">=1.0.0",
32
+ "react-native-gesture-handler": ">=2",
33
+ "react-native-reanimated": ">=3"
34
+ },
35
+ "publishConfig": {
36
+ "access": "public"
37
+ },
38
+ "scripts": {
39
+ "build": "tsup --config tsup.config.ts",
40
+ "typecheck": "tsc -p tsconfig.json --noEmit"
41
+ }
42
+ }
@@ -0,0 +1 @@
1
+ export * from './style.constants'