@solostylist/ui-kit-native 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.
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/s-form/index.d.ts +2 -0
- package/dist/s-form/index.d.ts.map +1 -0
- package/dist/s-form/index.js +1 -0
- package/dist/s-form/s-form.d.ts +26 -0
- package/dist/s-form/s-form.d.ts.map +1 -0
- package/dist/s-form/s-form.js +25 -0
- package/dist/s-icon-button/index.d.ts +3 -0
- package/dist/s-icon-button/index.d.ts.map +1 -0
- package/dist/s-icon-button/index.js +1 -0
- package/dist/s-icon-button/s-icon-button.d.ts +46 -0
- package/dist/s-icon-button/s-icon-button.d.ts.map +1 -0
- package/dist/s-icon-button/s-icon-button.js +57 -0
- package/dist/s-select/index.d.ts +2 -0
- package/dist/s-select/index.d.ts.map +1 -0
- package/dist/s-select/index.js +1 -0
- package/dist/s-select/s-select.d.ts +48 -0
- package/dist/s-select/s-select.d.ts.map +1 -0
- package/dist/s-select/s-select.js +237 -0
- package/dist/s-text/index.d.ts +2 -0
- package/dist/s-text/index.d.ts.map +1 -0
- package/dist/s-text/index.js +1 -0
- package/dist/s-text/s-text.d.ts +30 -0
- package/dist/s-text/s-text.d.ts.map +1 -0
- package/dist/s-text/s-text.js +59 -0
- package/dist/s-text-field/index.d.ts +2 -0
- package/dist/s-text-field/index.d.ts.map +1 -0
- package/dist/s-text-field/index.js +1 -0
- package/dist/s-text-field/s-text-field.d.ts +53 -0
- package/dist/s-text-field/s-text-field.d.ts.map +1 -0
- package/dist/s-text-field/s-text-field.js +69 -0
- package/dist/theme/index.d.ts +6 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +7 -0
- package/dist/theme/s-theme-provider.d.ts +28 -0
- package/dist/theme/s-theme-provider.d.ts.map +1 -0
- package/dist/theme/s-theme-provider.js +110 -0
- package/dist/theme/theme-primitives.d.ts +169 -0
- package/dist/theme/theme-primitives.d.ts.map +1 -0
- package/dist/theme/theme-primitives.js +209 -0
- package/package.json +80 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { STextField, default } from './s-text-field';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type KeyboardTypeOptions } from 'react-native';
|
|
3
|
+
import { type TextInputProps } from 'react-native-paper';
|
|
4
|
+
/**
|
|
5
|
+
* Props interface for STextField component
|
|
6
|
+
* Synced with web STextField from @solostylist/ui-kit
|
|
7
|
+
*/
|
|
8
|
+
export interface STextFieldProps extends Omit<TextInputProps, 'error' | 'theme'> {
|
|
9
|
+
/** Field label displayed above the input */
|
|
10
|
+
label?: string;
|
|
11
|
+
/** Placeholder text shown when input is empty */
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
/** Current value of the input */
|
|
14
|
+
value?: string;
|
|
15
|
+
/** Callback fired when text changes */
|
|
16
|
+
onChangeText?: (text: string) => void;
|
|
17
|
+
/** Callback fired when input loses focus */
|
|
18
|
+
onBlur?: () => void;
|
|
19
|
+
/** Error message to display (string instead of boolean for better UX) */
|
|
20
|
+
error?: string;
|
|
21
|
+
/** Whether the field is required (shows asterisk in label) */
|
|
22
|
+
required?: boolean;
|
|
23
|
+
/** Input type - controls keyboard and secure entry */
|
|
24
|
+
type?: 'text' | 'password' | 'email' | 'tel' | 'number' | 'url';
|
|
25
|
+
/** Whether the input is disabled */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/** Keyboard type for mobile input */
|
|
28
|
+
keyboardType?: KeyboardTypeOptions;
|
|
29
|
+
/** Maximum length of input */
|
|
30
|
+
maxLength?: number;
|
|
31
|
+
/** Help text shown below the input */
|
|
32
|
+
hint?: string;
|
|
33
|
+
/** Whether to allow multiline input */
|
|
34
|
+
multiline?: boolean;
|
|
35
|
+
/** Number of lines for multiline input */
|
|
36
|
+
numberOfLines?: number;
|
|
37
|
+
/** Input size variant */
|
|
38
|
+
size?: 'small' | 'medium';
|
|
39
|
+
/** Visual style variant */
|
|
40
|
+
variant?: 'outlined' | 'flat';
|
|
41
|
+
/** Whether to auto-focus on mount */
|
|
42
|
+
autoFocus?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* An enhanced text field component with integrated form labeling, error handling, and password visibility toggle.
|
|
46
|
+
* Synced with web STextField from @solostylist/ui-kit.
|
|
47
|
+
*/
|
|
48
|
+
export declare const STextField: {
|
|
49
|
+
({ label, placeholder, value, onChangeText, onBlur, error, required, type, disabled, keyboardType, maxLength, hint, multiline, numberOfLines, size, variant, autoFocus, ...props }: STextFieldProps): React.JSX.Element;
|
|
50
|
+
displayName: string;
|
|
51
|
+
};
|
|
52
|
+
export default STextField;
|
|
53
|
+
//# sourceMappingURL=s-text-field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"s-text-field.d.ts","sourceRoot":"","sources":["../../src/s-text-field/s-text-field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAc,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIpE;;;GAGG;AACH,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,OAAO,CAAC;IAC9E,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sDAAsD;IACtD,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,KAAK,CAAC;IAChE,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qCAAqC;IACrC,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,0CAA0C;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yBAAyB;IACzB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,2BAA2B;IAC3B,OAAO,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAC9B,qCAAqC;IACrC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU;wLAmBpB,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO;;CAkGrC,CAAC;AAIF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { StyleSheet } from 'react-native';
|
|
4
|
+
import { TextInput } from 'react-native-paper';
|
|
5
|
+
import { SForm } from '../s-form';
|
|
6
|
+
import { useSTheme } from '../theme';
|
|
7
|
+
/**
|
|
8
|
+
* An enhanced text field component with integrated form labeling, error handling, and password visibility toggle.
|
|
9
|
+
* Synced with web STextField from @solostylist/ui-kit.
|
|
10
|
+
*/
|
|
11
|
+
export const STextField = ({ label, placeholder, value, onChangeText, onBlur, error, required = false, type = 'text', disabled = false, keyboardType, maxLength, hint, multiline = false, numberOfLines, size = 'medium', variant = 'outlined', autoFocus = false, ...props }) => {
|
|
12
|
+
const { theme } = useSTheme();
|
|
13
|
+
const [isPasswordVisible, setIsPasswordVisible] = useState(false);
|
|
14
|
+
const isPassword = type === 'password';
|
|
15
|
+
// Determine keyboard type based on input type
|
|
16
|
+
const getKeyboardType = () => {
|
|
17
|
+
if (keyboardType)
|
|
18
|
+
return keyboardType;
|
|
19
|
+
switch (type) {
|
|
20
|
+
case 'email':
|
|
21
|
+
return 'email-address';
|
|
22
|
+
case 'tel':
|
|
23
|
+
return 'phone-pad';
|
|
24
|
+
case 'number':
|
|
25
|
+
return 'numeric';
|
|
26
|
+
case 'url':
|
|
27
|
+
return 'url';
|
|
28
|
+
default:
|
|
29
|
+
return 'default';
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
// Auto-capitalize settings based on type
|
|
33
|
+
const getAutoCapitalize = () => {
|
|
34
|
+
if (type === 'email' || type === 'url' || type === 'password') {
|
|
35
|
+
return 'none';
|
|
36
|
+
}
|
|
37
|
+
return 'sentences';
|
|
38
|
+
};
|
|
39
|
+
const handleTogglePasswordVisibility = () => {
|
|
40
|
+
setIsPasswordVisible(!isPasswordVisible);
|
|
41
|
+
};
|
|
42
|
+
const styles = StyleSheet.create({
|
|
43
|
+
input: {
|
|
44
|
+
// Match web sizes: small = 36px (2.25rem), medium = 40px (2.5rem)
|
|
45
|
+
...(size === 'small' && !multiline
|
|
46
|
+
? {
|
|
47
|
+
height: 36,
|
|
48
|
+
}
|
|
49
|
+
: size === 'medium' && !multiline
|
|
50
|
+
? {
|
|
51
|
+
height: 40,
|
|
52
|
+
}
|
|
53
|
+
: {}),
|
|
54
|
+
},
|
|
55
|
+
content: {
|
|
56
|
+
// contentStyle is used for text content styling (input text and placeholder)
|
|
57
|
+
fontFamily: theme.typography.fontFamily,
|
|
58
|
+
// fontSize controls both input text and placeholder text size
|
|
59
|
+
fontSize: size === 'small' ? theme.typography.fontSize.sm : theme.typography.fontSize.md,
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
const inputType = isPassword && isPasswordVisible ? 'text' : type;
|
|
63
|
+
const secureTextEntry = inputType === 'password';
|
|
64
|
+
// Extract left prop from props if provided (for start icon support)
|
|
65
|
+
const { left, ...restProps } = props;
|
|
66
|
+
return (_jsx(SForm, { label: label, hint: hint, error: error, required: required, children: _jsx(TextInput, { mode: variant, placeholder: placeholder, placeholderTextColor: theme.colors.divider, value: value, onChangeText: onChangeText, onBlur: onBlur, error: !!error, disabled: disabled, secureTextEntry: secureTextEntry, keyboardType: getKeyboardType(), autoCapitalize: getAutoCapitalize(), maxLength: maxLength, multiline: multiline, numberOfLines: numberOfLines, autoFocus: autoFocus, dense: size === 'small', left: left, right: isPassword ? (_jsx(TextInput.Icon, { icon: isPasswordVisible ? 'eye-off' : 'eye', onPress: handleTogglePasswordVisibility, forceTextInputFocus: false, size: theme.iconSize.xs })) : undefined, style: styles.input, contentStyle: styles.content, ...restProps }) }));
|
|
67
|
+
};
|
|
68
|
+
STextField.displayName = 'STextField';
|
|
69
|
+
export default STextField;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme exports for @solostylist/ui-kit-native
|
|
3
|
+
*/
|
|
4
|
+
export { SThemeProvider, useSTheme, type SThemeProviderProps, type ThemeMode } from './s-theme-provider';
|
|
5
|
+
export { darkTheme, lightTheme, type NativeTheme, type NativeThemeColors, brand, lightBrand, gray, lightGray, green, lightGreen, orange, lightOrange, blue, lightBlue, red, lightRed, purple, lightPurple, blackAlpha, whiteAlpha, darkGradients, lightGradients, darkPulse, lightPulse, } from './theme-primitives';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,mBAAmB,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACzG,OAAO,EACL,SAAS,EACT,UAAU,EACV,KAAK,WAAW,EAChB,KAAK,iBAAiB,EAEtB,KAAK,EACL,UAAU,EACV,IAAI,EACJ,SAAS,EACT,KAAK,EACL,UAAU,EACV,MAAM,EACN,WAAW,EACX,IAAI,EACJ,SAAS,EACT,GAAG,EACH,QAAQ,EACR,MAAM,EACN,WAAW,EACX,UAAU,EACV,UAAU,EACV,aAAa,EACb,cAAc,EACd,SAAS,EACT,UAAU,GACX,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme exports for @solostylist/ui-kit-native
|
|
3
|
+
*/
|
|
4
|
+
export { SThemeProvider, useSTheme } from './s-theme-provider';
|
|
5
|
+
export { darkTheme, lightTheme,
|
|
6
|
+
// Re-export core colors for convenience
|
|
7
|
+
brand, lightBrand, gray, lightGray, green, lightGreen, orange, lightOrange, blue, lightBlue, red, lightRed, purple, lightPurple, blackAlpha, whiteAlpha, darkGradients, lightGradients, darkPulse, lightPulse, } from './theme-primitives';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type NativeTheme } from './theme-primitives';
|
|
3
|
+
export type ThemeMode = 'light' | 'dark' | 'system';
|
|
4
|
+
interface SThemeContextType {
|
|
5
|
+
theme: NativeTheme;
|
|
6
|
+
mode: ThemeMode;
|
|
7
|
+
isDark: boolean;
|
|
8
|
+
setMode: (mode: ThemeMode) => void;
|
|
9
|
+
toggleTheme: () => void;
|
|
10
|
+
}
|
|
11
|
+
export interface SThemeProviderProps {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
defaultMode?: ThemeMode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Theme provider for React Native that syncs with @solostylist/core colors.
|
|
17
|
+
* Wraps react-native-paper's Provider with custom theme configuration.
|
|
18
|
+
*/
|
|
19
|
+
export declare const SThemeProvider: {
|
|
20
|
+
({ children, defaultMode }: SThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Hook to access the current theme and theme controls.
|
|
25
|
+
*/
|
|
26
|
+
export declare const useSTheme: () => SThemeContextType;
|
|
27
|
+
export default SThemeProvider;
|
|
28
|
+
//# sourceMappingURL=s-theme-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"s-theme-provider.d.ts","sourceRoot":"","sources":["../../src/theme/s-theme-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoE,MAAM,OAAO,CAAC;AAGzF,OAAO,EAAyB,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE7E,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEpD,UAAU,iBAAiB;IACzB,KAAK,EAAE,WAAW,CAAC;IACnB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACnC,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAID,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc;gCAA0C,mBAAmB;;CAoGvF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,QAAO,iBAM5B,CAAC;AAIF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useCallback, useContext, useMemo, useState } from 'react';
|
|
3
|
+
import { useColorScheme } from 'react-native';
|
|
4
|
+
import { MD3DarkTheme, MD3LightTheme, Provider as PaperProvider } from 'react-native-paper';
|
|
5
|
+
import { darkTheme, lightTheme } from './theme-primitives';
|
|
6
|
+
const SThemeContext = createContext(undefined);
|
|
7
|
+
/**
|
|
8
|
+
* Theme provider for React Native that syncs with @solostylist/core colors.
|
|
9
|
+
* Wraps react-native-paper's Provider with custom theme configuration.
|
|
10
|
+
*/
|
|
11
|
+
export const SThemeProvider = ({ children, defaultMode = 'system' }) => {
|
|
12
|
+
const systemColorScheme = useColorScheme();
|
|
13
|
+
const [mode, setMode] = useState(defaultMode);
|
|
14
|
+
const isDark = useMemo(() => {
|
|
15
|
+
if (mode === 'system') {
|
|
16
|
+
return systemColorScheme === 'dark';
|
|
17
|
+
}
|
|
18
|
+
return mode === 'dark';
|
|
19
|
+
}, [mode, systemColorScheme]);
|
|
20
|
+
const theme = useMemo(() => (isDark ? darkTheme : lightTheme), [isDark]);
|
|
21
|
+
const toggleTheme = useCallback(() => {
|
|
22
|
+
// Toggle based on current visual state (isDark) instead of mode
|
|
23
|
+
// This ensures a single click always switches between light and dark
|
|
24
|
+
setMode(isDark ? 'light' : 'dark');
|
|
25
|
+
}, [isDark]);
|
|
26
|
+
// Create react-native-paper theme based on our theme
|
|
27
|
+
// Synchronized with web theme (MUI) for consistency
|
|
28
|
+
const paperTheme = useMemo(() => {
|
|
29
|
+
const baseTheme = isDark ? MD3DarkTheme : MD3LightTheme;
|
|
30
|
+
return {
|
|
31
|
+
...baseTheme,
|
|
32
|
+
colors: {
|
|
33
|
+
...baseTheme.colors,
|
|
34
|
+
// Primary colors - matches web theme primary.main/light/contrastText
|
|
35
|
+
primary: theme.colors.primary[500],
|
|
36
|
+
primaryContainer: theme.colors.primary[100],
|
|
37
|
+
onPrimary: theme.colors.primary[50], // Matches web primary.contrastText
|
|
38
|
+
onPrimaryContainer: theme.colors.primary[900],
|
|
39
|
+
// Secondary colors - matches web theme secondary
|
|
40
|
+
secondary: theme.colors.secondary[500],
|
|
41
|
+
secondaryContainer: theme.colors.secondary[100],
|
|
42
|
+
onSecondary: theme.colors.secondary[50], // Matches web secondary.contrastText pattern
|
|
43
|
+
onSecondaryContainer: theme.colors.secondary[900],
|
|
44
|
+
// Tertiary colors - maps to info color from web theme
|
|
45
|
+
tertiary: theme.colors.info[500],
|
|
46
|
+
tertiaryContainer: theme.colors.info[100],
|
|
47
|
+
onTertiary: theme.colors.info[50], // Matches web info.contrastText
|
|
48
|
+
onTertiaryContainer: theme.colors.info[900],
|
|
49
|
+
// Background and surface - matches web theme background.default/paper
|
|
50
|
+
background: theme.colors.background.default,
|
|
51
|
+
onBackground: theme.colors.text.primary,
|
|
52
|
+
surface: theme.colors.background.paper,
|
|
53
|
+
onSurface: theme.colors.text.primary,
|
|
54
|
+
surfaceVariant: theme.colors.background.elevated,
|
|
55
|
+
onSurfaceVariant: theme.colors.text.secondary,
|
|
56
|
+
// Error colors - matches web theme error.main/light/contrastText
|
|
57
|
+
error: theme.colors.error[500],
|
|
58
|
+
errorContainer: theme.colors.error[100],
|
|
59
|
+
onError: theme.colors.error[50], // Matches web error.contrastText
|
|
60
|
+
onErrorContainer: theme.colors.error[900],
|
|
61
|
+
// Outline colors - matches web theme divider/border
|
|
62
|
+
outline: theme.colors.divider,
|
|
63
|
+
outlineVariant: theme.colors.divider,
|
|
64
|
+
},
|
|
65
|
+
fonts: {
|
|
66
|
+
...baseTheme.fonts,
|
|
67
|
+
regular: {
|
|
68
|
+
fontFamily: 'Outfit_400Regular',
|
|
69
|
+
fontWeight: '400',
|
|
70
|
+
},
|
|
71
|
+
medium: {
|
|
72
|
+
fontFamily: 'Outfit_500Medium',
|
|
73
|
+
fontWeight: '500',
|
|
74
|
+
},
|
|
75
|
+
bold: {
|
|
76
|
+
fontFamily: 'Outfit_700Bold',
|
|
77
|
+
fontWeight: '700',
|
|
78
|
+
},
|
|
79
|
+
labelLarge: {
|
|
80
|
+
fontFamily: 'Outfit_500Medium',
|
|
81
|
+
fontSize: 14,
|
|
82
|
+
fontWeight: '500',
|
|
83
|
+
letterSpacing: 0.1,
|
|
84
|
+
lineHeight: 20,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
roundness: theme.borderRadius.md,
|
|
88
|
+
};
|
|
89
|
+
}, [isDark, theme]);
|
|
90
|
+
const contextValue = useMemo(() => ({
|
|
91
|
+
theme,
|
|
92
|
+
mode,
|
|
93
|
+
isDark,
|
|
94
|
+
setMode,
|
|
95
|
+
toggleTheme,
|
|
96
|
+
}), [theme, mode, isDark, toggleTheme]);
|
|
97
|
+
return (_jsx(SThemeContext.Provider, { value: contextValue, children: _jsx(PaperProvider, { theme: paperTheme, children: children }) }));
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Hook to access the current theme and theme controls.
|
|
101
|
+
*/
|
|
102
|
+
export const useSTheme = () => {
|
|
103
|
+
const context = useContext(SThemeContext);
|
|
104
|
+
if (!context) {
|
|
105
|
+
throw new Error('useSTheme must be used within a SThemeProvider');
|
|
106
|
+
}
|
|
107
|
+
return context;
|
|
108
|
+
};
|
|
109
|
+
SThemeProvider.displayName = 'SThemeProvider';
|
|
110
|
+
export default SThemeProvider;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme primitives for React Native
|
|
3
|
+
* Uses @solostylist/core for consistent colors across web and mobile
|
|
4
|
+
*/
|
|
5
|
+
import { blackAlpha, blue, brand, darkGradients, darkNativeGradients, darkPulse, gray, green, lightBlue, lightBrand, lightGradients, lightGray, lightGreen, lightNativeGradients, lightOrange, lightPulse, lightPurple, lightRed, orange, purple, red, whiteAlpha, type ColorRange, type NativeGradientPalette } from '@solostylist/core';
|
|
6
|
+
export interface NativeThemeColors {
|
|
7
|
+
primary: ColorRange;
|
|
8
|
+
secondary: ColorRange;
|
|
9
|
+
background: {
|
|
10
|
+
default: string;
|
|
11
|
+
paper: string;
|
|
12
|
+
elevated: string;
|
|
13
|
+
};
|
|
14
|
+
text: {
|
|
15
|
+
primary: string;
|
|
16
|
+
secondary: string;
|
|
17
|
+
disabled: string;
|
|
18
|
+
};
|
|
19
|
+
error: ColorRange;
|
|
20
|
+
warning: ColorRange;
|
|
21
|
+
success: ColorRange;
|
|
22
|
+
info: ColorRange;
|
|
23
|
+
divider: string;
|
|
24
|
+
blackAlpha: {
|
|
25
|
+
zero: string;
|
|
26
|
+
light: string;
|
|
27
|
+
medium: string;
|
|
28
|
+
dark: string;
|
|
29
|
+
full: string;
|
|
30
|
+
};
|
|
31
|
+
whiteAlpha: {
|
|
32
|
+
zero: string;
|
|
33
|
+
light: string;
|
|
34
|
+
medium: string;
|
|
35
|
+
dark: string;
|
|
36
|
+
full: string;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export interface NativeTheme {
|
|
40
|
+
dark: boolean;
|
|
41
|
+
colors: NativeThemeColors;
|
|
42
|
+
typography: {
|
|
43
|
+
fontFamily: string;
|
|
44
|
+
fontSize: {
|
|
45
|
+
xs: number;
|
|
46
|
+
sm: number;
|
|
47
|
+
md: number;
|
|
48
|
+
lg: number;
|
|
49
|
+
xl: number;
|
|
50
|
+
'2xl': number;
|
|
51
|
+
'3xl': number;
|
|
52
|
+
};
|
|
53
|
+
fontWeight: {
|
|
54
|
+
regular: '400';
|
|
55
|
+
medium: '500';
|
|
56
|
+
semibold: '600';
|
|
57
|
+
bold: '700';
|
|
58
|
+
};
|
|
59
|
+
lineHeight: {
|
|
60
|
+
tight: number;
|
|
61
|
+
normal: number;
|
|
62
|
+
relaxed: number;
|
|
63
|
+
};
|
|
64
|
+
scale: {
|
|
65
|
+
h1: {
|
|
66
|
+
fontSize: number;
|
|
67
|
+
fontWeight: '600';
|
|
68
|
+
lineHeight: number;
|
|
69
|
+
letterSpacing?: number;
|
|
70
|
+
};
|
|
71
|
+
h2: {
|
|
72
|
+
fontSize: number;
|
|
73
|
+
fontWeight: '600';
|
|
74
|
+
lineHeight: number;
|
|
75
|
+
letterSpacing?: number;
|
|
76
|
+
};
|
|
77
|
+
h3: {
|
|
78
|
+
fontSize: number;
|
|
79
|
+
fontWeight: '600';
|
|
80
|
+
lineHeight: number;
|
|
81
|
+
letterSpacing?: number;
|
|
82
|
+
};
|
|
83
|
+
h4: {
|
|
84
|
+
fontSize: number;
|
|
85
|
+
fontWeight: '600';
|
|
86
|
+
lineHeight: number;
|
|
87
|
+
letterSpacing?: number;
|
|
88
|
+
};
|
|
89
|
+
h5: {
|
|
90
|
+
fontSize: number;
|
|
91
|
+
fontWeight: '600';
|
|
92
|
+
lineHeight: number;
|
|
93
|
+
letterSpacing?: number;
|
|
94
|
+
};
|
|
95
|
+
h6: {
|
|
96
|
+
fontSize: number;
|
|
97
|
+
fontWeight: '600';
|
|
98
|
+
lineHeight: number;
|
|
99
|
+
letterSpacing?: number;
|
|
100
|
+
};
|
|
101
|
+
subtitle1: {
|
|
102
|
+
fontSize: number;
|
|
103
|
+
fontWeight: '400';
|
|
104
|
+
lineHeight: number;
|
|
105
|
+
letterSpacing?: number;
|
|
106
|
+
};
|
|
107
|
+
subtitle2: {
|
|
108
|
+
fontSize: number;
|
|
109
|
+
fontWeight: '400';
|
|
110
|
+
lineHeight: number;
|
|
111
|
+
letterSpacing?: number;
|
|
112
|
+
};
|
|
113
|
+
body1: {
|
|
114
|
+
fontSize: number;
|
|
115
|
+
fontWeight: '400';
|
|
116
|
+
lineHeight: number;
|
|
117
|
+
letterSpacing?: number;
|
|
118
|
+
};
|
|
119
|
+
body2: {
|
|
120
|
+
fontSize: number;
|
|
121
|
+
fontWeight: '400';
|
|
122
|
+
lineHeight: number;
|
|
123
|
+
letterSpacing?: number;
|
|
124
|
+
};
|
|
125
|
+
caption: {
|
|
126
|
+
fontSize: number;
|
|
127
|
+
fontWeight: '400';
|
|
128
|
+
lineHeight: number;
|
|
129
|
+
letterSpacing?: number;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
iconSize: {
|
|
134
|
+
xs: number;
|
|
135
|
+
sm: number;
|
|
136
|
+
md: number;
|
|
137
|
+
lg: number;
|
|
138
|
+
xl: number;
|
|
139
|
+
};
|
|
140
|
+
spacing: {
|
|
141
|
+
xs: number;
|
|
142
|
+
sm: number;
|
|
143
|
+
md: number;
|
|
144
|
+
lg: number;
|
|
145
|
+
xl: number;
|
|
146
|
+
'2xl': number;
|
|
147
|
+
};
|
|
148
|
+
borderRadius: {
|
|
149
|
+
none: number;
|
|
150
|
+
sm: number;
|
|
151
|
+
md: number;
|
|
152
|
+
lg: number;
|
|
153
|
+
xl: number;
|
|
154
|
+
full: number;
|
|
155
|
+
};
|
|
156
|
+
shadows: {
|
|
157
|
+
sm: string;
|
|
158
|
+
md: string;
|
|
159
|
+
lg: string;
|
|
160
|
+
};
|
|
161
|
+
gradients: typeof darkGradients;
|
|
162
|
+
nativeGradients: NativeGradientPalette;
|
|
163
|
+
pulse: typeof darkPulse;
|
|
164
|
+
}
|
|
165
|
+
export declare const darkTheme: NativeTheme;
|
|
166
|
+
export declare const lightTheme: NativeTheme;
|
|
167
|
+
export { brand, lightBrand, gray, lightGray, green, lightGreen, orange, lightOrange, blue, lightBlue, red, lightRed, purple, lightPurple, blackAlpha, whiteAlpha, darkGradients, lightGradients, darkNativeGradients, lightNativeGradients, darkPulse, lightPulse, };
|
|
168
|
+
export type { NativeGradientConfig, NativeGradientPalette } from '@solostylist/core';
|
|
169
|
+
//# sourceMappingURL=theme-primitives.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-primitives.d.ts","sourceRoot":"","sources":["../../src/theme/theme-primitives.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,UAAU,EACV,IAAI,EACJ,KAAK,EACL,aAAa,EACb,mBAAmB,EACnB,SAAS,EACT,IAAI,EACJ,KAAK,EACL,SAAS,EACT,UAAU,EACV,cAAc,EACd,SAAS,EACT,UAAU,EACV,oBAAoB,EACpB,WAAW,EACX,UAAU,EACV,WAAW,EACX,QAAQ,EACR,MAAM,EACN,MAAM,EACN,GAAG,EACH,UAAU,EACV,KAAK,UAAU,EACf,KAAK,qBAAqB,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AY,EAAE;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;IACF,SAAS,EAAE,OAAO,aAAa,CAAC;IAChC,eAAe,EAAE,qBAAqB,CAAC;IACvC,KAAK,EAAE,OAAO,SAAS,CAAC;CACzB;AA+GD,eAAO,MAAM,SAAS,EAAE,WA+CvB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,WA+CxB,CAAC;AAGF,OAAO,EACL,KAAK,EACL,UAAU,EACV,IAAI,EACJ,SAAS,EACT,KAAK,EACL,UAAU,EACV,MAAM,EACN,WAAW,EACX,IAAI,EACJ,SAAS,EACT,GAAG,EACH,QAAQ,EACR,MAAM,EACN,WAAW,EACX,UAAU,EACV,UAAU,EACV,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,SAAS,EACT,UAAU,GACX,CAAC;AAGF,YAAY,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme primitives for React Native
|
|
3
|
+
* Uses @solostylist/core for consistent colors across web and mobile
|
|
4
|
+
*/
|
|
5
|
+
import Color from 'color';
|
|
6
|
+
import { blackAlpha, blue, brand, darkGradients, darkNativeGradients, darkPulse, gray, green, lightBlue, lightBrand, lightGradients, lightGray, lightGreen, lightNativeGradients, lightOrange, lightPulse, lightPurple, lightRed, orange, purple, red, whiteAlpha, } from '@solostylist/core';
|
|
7
|
+
const typography = {
|
|
8
|
+
fontFamily: 'Outfit_400Regular',
|
|
9
|
+
fontSize: {
|
|
10
|
+
xs: 10,
|
|
11
|
+
sm: 12,
|
|
12
|
+
md: 14,
|
|
13
|
+
lg: 16,
|
|
14
|
+
xl: 18,
|
|
15
|
+
'2xl': 20,
|
|
16
|
+
'3xl': 24,
|
|
17
|
+
},
|
|
18
|
+
fontWeight: {
|
|
19
|
+
regular: '400',
|
|
20
|
+
medium: '500',
|
|
21
|
+
semibold: '600',
|
|
22
|
+
bold: '700',
|
|
23
|
+
},
|
|
24
|
+
lineHeight: {
|
|
25
|
+
tight: 1.25,
|
|
26
|
+
normal: 1.5,
|
|
27
|
+
relaxed: 1.75,
|
|
28
|
+
},
|
|
29
|
+
// Web-compatible typography scale (matches MUI theme)
|
|
30
|
+
scale: {
|
|
31
|
+
h1: {
|
|
32
|
+
fontSize: 48,
|
|
33
|
+
fontWeight: '600',
|
|
34
|
+
lineHeight: 1.2,
|
|
35
|
+
letterSpacing: -0.5,
|
|
36
|
+
},
|
|
37
|
+
h2: {
|
|
38
|
+
fontSize: 36,
|
|
39
|
+
fontWeight: '600',
|
|
40
|
+
lineHeight: 1.2,
|
|
41
|
+
},
|
|
42
|
+
h3: {
|
|
43
|
+
fontSize: 30,
|
|
44
|
+
fontWeight: '600',
|
|
45
|
+
lineHeight: 1.2,
|
|
46
|
+
},
|
|
47
|
+
h4: {
|
|
48
|
+
fontSize: 24,
|
|
49
|
+
fontWeight: '600',
|
|
50
|
+
lineHeight: 1.2,
|
|
51
|
+
},
|
|
52
|
+
h5: {
|
|
53
|
+
fontSize: 20,
|
|
54
|
+
fontWeight: '600',
|
|
55
|
+
lineHeight: 1.2,
|
|
56
|
+
},
|
|
57
|
+
h6: {
|
|
58
|
+
fontSize: 18,
|
|
59
|
+
fontWeight: '600',
|
|
60
|
+
lineHeight: 1.2,
|
|
61
|
+
},
|
|
62
|
+
subtitle1: {
|
|
63
|
+
fontSize: 18,
|
|
64
|
+
fontWeight: '400',
|
|
65
|
+
lineHeight: 1.75,
|
|
66
|
+
},
|
|
67
|
+
subtitle2: {
|
|
68
|
+
fontSize: 14,
|
|
69
|
+
fontWeight: '400',
|
|
70
|
+
lineHeight: 1.5,
|
|
71
|
+
},
|
|
72
|
+
body1: {
|
|
73
|
+
fontSize: 14,
|
|
74
|
+
fontWeight: '400',
|
|
75
|
+
lineHeight: 1.5,
|
|
76
|
+
},
|
|
77
|
+
body2: {
|
|
78
|
+
fontSize: 14,
|
|
79
|
+
fontWeight: '400',
|
|
80
|
+
lineHeight: 1.5,
|
|
81
|
+
},
|
|
82
|
+
caption: {
|
|
83
|
+
fontSize: 12,
|
|
84
|
+
fontWeight: '400',
|
|
85
|
+
lineHeight: 2,
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
const spacing = {
|
|
90
|
+
xs: 4,
|
|
91
|
+
sm: 8,
|
|
92
|
+
md: 12,
|
|
93
|
+
lg: 16,
|
|
94
|
+
xl: 24,
|
|
95
|
+
'2xl': 32,
|
|
96
|
+
};
|
|
97
|
+
const iconSize = {
|
|
98
|
+
xs: 16,
|
|
99
|
+
sm: 20,
|
|
100
|
+
md: 24,
|
|
101
|
+
lg: 28,
|
|
102
|
+
xl: 32,
|
|
103
|
+
};
|
|
104
|
+
const borderRadius = {
|
|
105
|
+
none: 0,
|
|
106
|
+
sm: 4,
|
|
107
|
+
md: 8,
|
|
108
|
+
lg: 12,
|
|
109
|
+
xl: 16,
|
|
110
|
+
full: 9999,
|
|
111
|
+
};
|
|
112
|
+
export const darkTheme = {
|
|
113
|
+
dark: true,
|
|
114
|
+
colors: {
|
|
115
|
+
primary: brand,
|
|
116
|
+
secondary: gray,
|
|
117
|
+
background: {
|
|
118
|
+
default: gray[900],
|
|
119
|
+
paper: gray[800],
|
|
120
|
+
elevated: gray[700],
|
|
121
|
+
},
|
|
122
|
+
text: {
|
|
123
|
+
primary: gray[50],
|
|
124
|
+
secondary: gray[400],
|
|
125
|
+
disabled: gray[500],
|
|
126
|
+
},
|
|
127
|
+
error: red,
|
|
128
|
+
warning: orange,
|
|
129
|
+
success: green,
|
|
130
|
+
info: blue,
|
|
131
|
+
divider: Color(gray[700]).alpha(0.9).hsl().string(),
|
|
132
|
+
blackAlpha: {
|
|
133
|
+
zero: blackAlpha[0],
|
|
134
|
+
light: blackAlpha[10],
|
|
135
|
+
medium: blackAlpha[50],
|
|
136
|
+
dark: blackAlpha[80],
|
|
137
|
+
full: blackAlpha[100],
|
|
138
|
+
},
|
|
139
|
+
whiteAlpha: {
|
|
140
|
+
zero: whiteAlpha[0],
|
|
141
|
+
light: whiteAlpha[10],
|
|
142
|
+
medium: whiteAlpha[50],
|
|
143
|
+
dark: whiteAlpha[80],
|
|
144
|
+
full: whiteAlpha[100],
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
typography,
|
|
148
|
+
iconSize,
|
|
149
|
+
spacing,
|
|
150
|
+
borderRadius,
|
|
151
|
+
shadows: {
|
|
152
|
+
sm: 'none',
|
|
153
|
+
md: 'none',
|
|
154
|
+
lg: 'none',
|
|
155
|
+
},
|
|
156
|
+
gradients: darkGradients,
|
|
157
|
+
nativeGradients: darkNativeGradients,
|
|
158
|
+
pulse: darkPulse,
|
|
159
|
+
};
|
|
160
|
+
export const lightTheme = {
|
|
161
|
+
dark: false,
|
|
162
|
+
colors: {
|
|
163
|
+
primary: lightBrand,
|
|
164
|
+
secondary: lightGray,
|
|
165
|
+
background: {
|
|
166
|
+
default: lightGray[50],
|
|
167
|
+
paper: lightGray[100],
|
|
168
|
+
elevated: lightGray[100],
|
|
169
|
+
},
|
|
170
|
+
text: {
|
|
171
|
+
primary: lightGray[900],
|
|
172
|
+
secondary: lightGray[600],
|
|
173
|
+
disabled: lightGray[400],
|
|
174
|
+
},
|
|
175
|
+
error: lightRed,
|
|
176
|
+
warning: lightOrange,
|
|
177
|
+
success: lightGreen,
|
|
178
|
+
info: lightBlue,
|
|
179
|
+
divider: Color(lightGray[300]).alpha(0.9).hsl().string(),
|
|
180
|
+
blackAlpha: {
|
|
181
|
+
zero: blackAlpha[0],
|
|
182
|
+
light: blackAlpha[10],
|
|
183
|
+
medium: blackAlpha[50],
|
|
184
|
+
dark: blackAlpha[80],
|
|
185
|
+
full: blackAlpha[100],
|
|
186
|
+
},
|
|
187
|
+
whiteAlpha: {
|
|
188
|
+
zero: whiteAlpha[0],
|
|
189
|
+
light: whiteAlpha[10],
|
|
190
|
+
medium: whiteAlpha[50],
|
|
191
|
+
dark: whiteAlpha[80],
|
|
192
|
+
full: whiteAlpha[100],
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
typography,
|
|
196
|
+
iconSize,
|
|
197
|
+
spacing,
|
|
198
|
+
borderRadius,
|
|
199
|
+
shadows: {
|
|
200
|
+
sm: 'none',
|
|
201
|
+
md: 'none',
|
|
202
|
+
lg: 'none',
|
|
203
|
+
},
|
|
204
|
+
gradients: lightGradients,
|
|
205
|
+
nativeGradients: lightNativeGradients,
|
|
206
|
+
pulse: lightPulse,
|
|
207
|
+
};
|
|
208
|
+
// Re-export color palettes for direct use
|
|
209
|
+
export { brand, lightBrand, gray, lightGray, green, lightGreen, orange, lightOrange, blue, lightBlue, red, lightRed, purple, lightPurple, blackAlpha, whiteAlpha, darkGradients, lightGradients, darkNativeGradients, lightNativeGradients, darkPulse, lightPulse, };
|