@rehagro/ui 1.0.11 → 1.0.13
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.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +553 -620
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +553 -620
- package/dist/index.mjs.map +1 -1
- package/dist/native.d.mts +7 -1
- package/dist/native.d.ts +7 -1
- package/dist/native.js +23 -4
- package/dist/native.js.map +1 -1
- package/dist/native.mjs +23 -4
- package/dist/native.mjs.map +1 -1
- package/dist/styles.css +2 -2
- package/package.json +1 -1
package/dist/native.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React$1 from 'react';
|
|
3
|
-
import { PressableProps, StyleProp, ViewStyle, View, TextInputProps as TextInputProps$1, TextInput as TextInput$1, ViewProps, TextProps as TextProps$1,
|
|
3
|
+
import { PressableProps, StyleProp, ViewStyle, TextStyle, View, TextInputProps as TextInputProps$1, TextInput as TextInput$1, ViewProps, TextProps as TextProps$1, Text as Text$1 } from 'react-native';
|
|
4
4
|
import { B as ButtonColor, P as PresetColor } from './colors.types-7nLOoy6r.mjs';
|
|
5
5
|
|
|
6
6
|
/** React Native theme — reuses the same token names as the web theme.
|
|
@@ -35,6 +35,8 @@ type RehagroNativeTheme = {
|
|
|
35
35
|
inputHeightSm?: number;
|
|
36
36
|
inputHeightMd?: number;
|
|
37
37
|
inputHeightLg?: number;
|
|
38
|
+
fontFamilyBody?: string;
|
|
39
|
+
fontFamilyDisplay?: string;
|
|
38
40
|
};
|
|
39
41
|
type RehagroNativeProviderProps = {
|
|
40
42
|
/** Theme overrides — any token not provided keeps the default value */
|
|
@@ -68,6 +70,8 @@ type ButtonProps = Omit<PressableProps, "style"> & {
|
|
|
68
70
|
children?: React$1.ReactNode;
|
|
69
71
|
/** Custom style for the outer Pressable */
|
|
70
72
|
style?: StyleProp<ViewStyle>;
|
|
73
|
+
/** Custom style applied to the inner text label (string children only) */
|
|
74
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
71
75
|
};
|
|
72
76
|
declare const Button: React$1.ForwardRefExoticComponent<Omit<PressableProps, "style"> & {
|
|
73
77
|
/** Visual style variant */
|
|
@@ -88,6 +92,8 @@ declare const Button: React$1.ForwardRefExoticComponent<Omit<PressableProps, "st
|
|
|
88
92
|
children?: React$1.ReactNode;
|
|
89
93
|
/** Custom style for the outer Pressable */
|
|
90
94
|
style?: StyleProp<ViewStyle>;
|
|
95
|
+
/** Custom style applied to the inner text label (string children only) */
|
|
96
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
91
97
|
} & React$1.RefAttributes<View>>;
|
|
92
98
|
|
|
93
99
|
type IconButtonVariant = "solid" | "outline" | "ghost";
|
package/dist/native.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React$1 from 'react';
|
|
3
|
-
import { PressableProps, StyleProp, ViewStyle, View, TextInputProps as TextInputProps$1, TextInput as TextInput$1, ViewProps, TextProps as TextProps$1,
|
|
3
|
+
import { PressableProps, StyleProp, ViewStyle, TextStyle, View, TextInputProps as TextInputProps$1, TextInput as TextInput$1, ViewProps, TextProps as TextProps$1, Text as Text$1 } from 'react-native';
|
|
4
4
|
import { B as ButtonColor, P as PresetColor } from './colors.types-7nLOoy6r.js';
|
|
5
5
|
|
|
6
6
|
/** React Native theme — reuses the same token names as the web theme.
|
|
@@ -35,6 +35,8 @@ type RehagroNativeTheme = {
|
|
|
35
35
|
inputHeightSm?: number;
|
|
36
36
|
inputHeightMd?: number;
|
|
37
37
|
inputHeightLg?: number;
|
|
38
|
+
fontFamilyBody?: string;
|
|
39
|
+
fontFamilyDisplay?: string;
|
|
38
40
|
};
|
|
39
41
|
type RehagroNativeProviderProps = {
|
|
40
42
|
/** Theme overrides — any token not provided keeps the default value */
|
|
@@ -68,6 +70,8 @@ type ButtonProps = Omit<PressableProps, "style"> & {
|
|
|
68
70
|
children?: React$1.ReactNode;
|
|
69
71
|
/** Custom style for the outer Pressable */
|
|
70
72
|
style?: StyleProp<ViewStyle>;
|
|
73
|
+
/** Custom style applied to the inner text label (string children only) */
|
|
74
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
71
75
|
};
|
|
72
76
|
declare const Button: React$1.ForwardRefExoticComponent<Omit<PressableProps, "style"> & {
|
|
73
77
|
/** Visual style variant */
|
|
@@ -88,6 +92,8 @@ declare const Button: React$1.ForwardRefExoticComponent<Omit<PressableProps, "st
|
|
|
88
92
|
children?: React$1.ReactNode;
|
|
89
93
|
/** Custom style for the outer Pressable */
|
|
90
94
|
style?: StyleProp<ViewStyle>;
|
|
95
|
+
/** Custom style applied to the inner text label (string children only) */
|
|
96
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
91
97
|
} & React$1.RefAttributes<View>>;
|
|
92
98
|
|
|
93
99
|
type IconButtonVariant = "solid" | "outline" | "ghost";
|
package/dist/native.js
CHANGED
|
@@ -34,7 +34,9 @@ var DEFAULT_NATIVE_THEME = {
|
|
|
34
34
|
borderWidthLg: 3,
|
|
35
35
|
inputHeightSm: 36,
|
|
36
36
|
inputHeightMd: 44,
|
|
37
|
-
inputHeightLg: 52
|
|
37
|
+
inputHeightLg: 52,
|
|
38
|
+
fontFamilyBody: "",
|
|
39
|
+
fontFamilyDisplay: ""
|
|
38
40
|
};
|
|
39
41
|
|
|
40
42
|
// src/provider/RehagroNativeContext.ts
|
|
@@ -69,6 +71,7 @@ var Button = react.forwardRef(function Button2({
|
|
|
69
71
|
rightIcon,
|
|
70
72
|
children,
|
|
71
73
|
style,
|
|
74
|
+
labelStyle,
|
|
72
75
|
accessibilityLabel,
|
|
73
76
|
...rest
|
|
74
77
|
}, ref) {
|
|
@@ -165,7 +168,7 @@ var Button = react.forwardRef(function Button2({
|
|
|
165
168
|
typeof children === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
166
169
|
reactNative.Text,
|
|
167
170
|
{
|
|
168
|
-
style: { color: textColor(pressed), fontSize: fontSizeMap[size], fontWeight: "500" },
|
|
171
|
+
style: [{ color: textColor(pressed), fontSize: fontSizeMap[size], fontWeight: "500", ...theme.fontFamilyDisplay ? { fontFamily: theme.fontFamilyDisplay } : {} }, labelStyle],
|
|
169
172
|
children
|
|
170
173
|
}
|
|
171
174
|
) : children,
|
|
@@ -459,11 +462,24 @@ var Checkbox = react.forwardRef(function Checkbox2({
|
|
|
459
462
|
accessibilityRole: "checkbox",
|
|
460
463
|
accessibilityState: { checked: indeterminate ? "mixed" : isChecked, disabled: !!disabled },
|
|
461
464
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
462
|
-
style: [
|
|
465
|
+
style: [
|
|
466
|
+
{ flexDirection: "row", alignItems: "center", gap: 8, opacity: disabled ? 0.5 : 1 },
|
|
467
|
+
style
|
|
468
|
+
],
|
|
463
469
|
...rest,
|
|
464
470
|
children: [
|
|
465
471
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: boxStyle, children: indeterminate ? /* @__PURE__ */ jsxRuntime.jsx(MinusIcon, { size: iconSize, color: theme.surface }) : isChecked ? /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { size: iconSize, color: theme.surface }) : null }),
|
|
466
|
-
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
472
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
473
|
+
reactNative.Text,
|
|
474
|
+
{
|
|
475
|
+
style: {
|
|
476
|
+
fontSize: fontSizeMap[size],
|
|
477
|
+
color: theme.text,
|
|
478
|
+
...theme.fontFamilyBody ? { fontFamily: theme.fontFamilyBody } : {}
|
|
479
|
+
},
|
|
480
|
+
children: label
|
|
481
|
+
}
|
|
482
|
+
)
|
|
467
483
|
]
|
|
468
484
|
}
|
|
469
485
|
);
|
|
@@ -620,9 +636,12 @@ var Text5 = react.forwardRef(function Text6({ variant = "body", color = "default
|
|
|
620
636
|
success: theme.success,
|
|
621
637
|
warning: theme.warning
|
|
622
638
|
};
|
|
639
|
+
const isDisplayVariant = variant === "h1" || variant === "h2" || variant === "h3" || variant === "h4";
|
|
640
|
+
const fontFamily = isDisplayVariant ? theme.fontFamilyDisplay : theme.fontFamilyBody;
|
|
623
641
|
const resolvedStyle = {
|
|
624
642
|
...variantStyles[variant],
|
|
625
643
|
color: colorMap[color],
|
|
644
|
+
...fontFamily ? { fontFamily } : {},
|
|
626
645
|
...bold ? { fontWeight: "700" } : {}
|
|
627
646
|
};
|
|
628
647
|
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { ref, style: [resolvedStyle, style], ...rest, children });
|
package/dist/native.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/provider/theme.native.ts","../src/provider/RehagroNativeContext.ts","../src/provider/RehagroNativeProvider.tsx","../src/components/Button/Button.native.tsx","../src/components/IconButton/IconButton.native.tsx","../src/components/TextInput/TextInput.native.tsx","../src/components/Checkbox/Checkbox.native.tsx","../src/components/Avatar/Avatar.native.tsx","../src/components/ActivityIndicator/ActivityIndicator.native.tsx","../src/components/Text/Text.native.tsx","../src/components/Tag/Tag.native.tsx","../src/components/Card/Card.native.tsx"],"names":["createContext","useContext","useMemo","forwardRef","Button","jsx","Pressable","jsxs","Fragment","ActivityIndicator","View","Text","PRESET_COLORS","isPresetColor","IconButton","TextInput","useState","paddingMap","radiusMap","RNTextInput","Checkbox","useCallback","Avatar","Image","RNActivityIndicator","RNText","Tag","Card","variantStyles","CardHeader","CardContent","CardFooter"],"mappings":";;;;;;;;;AAmDO,IAAM,oBAAA,GAAqD;AAAA,EAChE,OAAA,EAAS,SAAA;AAAA,EACT,YAAA,EAAc,SAAA;AAAA,EACd,SAAA,EAAW,SAAA;AAAA,EACX,cAAA,EAAgB,SAAA;AAAA,EAChB,MAAA,EAAQ,SAAA;AAAA,EACR,WAAA,EAAa,SAAA;AAAA,EAC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AAA,UAChB,gBAAgB,KAAA,CAAM;AAAA,SACxB;AAAA,QACA;AAAA,OACF;AAAA,MAEC;AAAA;AAAA,GACH;AAEJ,CAAC","file":"native.js","sourcesContent":["import type { RehagroTheme } from \"./theme\";\n\n/** React Native theme — reuses the same token names as the web theme.\n * Color values are plain CSS hex strings (e.g. \"#16a34a\").\n * Spacing/radius/border values are numbers (device-independent pixels).\n */\nexport type RehagroNativeTheme = {\n // Brand colors\n primary?: string;\n primaryHover?: string;\n secondary?: string;\n secondaryHover?: string;\n danger?: string;\n dangerHover?: string;\n warning?: string;\n success?: string;\n info?: string;\n infoHover?: string;\n\n // Semantic colors\n text?: string;\n textMuted?: string;\n surface?: string;\n background?: string;\n border?: string;\n\n // Border radius (numbers = dp)\n radiusXxs?: number;\n radiusXs?: number;\n radiusSm?: number;\n radiusMd?: number;\n radiusLg?: number;\n radiusXl?: number;\n\n // Border width\n borderWidthSm?: number;\n borderWidthMd?: number;\n borderWidthLg?: number;\n\n // Input sizes\n inputHeightSm?: number;\n inputHeightMd?: number;\n inputHeightLg?: number;\n};\n\nexport type RehagroNativeProviderProps = {\n /** Theme overrides — any token not provided keeps the default value */\n theme?: RehagroNativeTheme;\n children: React.ReactNode;\n};\n\nexport const DEFAULT_NATIVE_THEME: Required<RehagroNativeTheme> = {\n primary: \"#16a34a\",\n primaryHover: \"#15803d\",\n secondary: \"#6b7280\",\n secondaryHover: \"#4b5563\",\n danger: \"#dc2626\",\n dangerHover: \"#b91c1c\",\n warning: \"#d97706\",\n success: \"#16a34a\",\n info: \"#0284c7\",\n infoHover: \"#0369a1\",\n\n text: \"#111827\",\n textMuted: \"#6b7280\",\n surface: \"#ffffff\",\n background: \"#f9fafb\",\n border: \"#d1d5db\",\n\n radiusXxs: 4,\n radiusXs: 8,\n radiusSm: 12,\n radiusMd: 16,\n radiusLg: 24,\n radiusXl: 32,\n\n borderWidthSm: 1,\n borderWidthMd: 2,\n borderWidthLg: 3,\n\n inputHeightSm: 36,\n inputHeightMd: 44,\n inputHeightLg: 52,\n};\n\n// Ensures RehagroNativeTheme color keys stay in sync with RehagroTheme\ntype _ColorKeysMatch = Pick<\n RehagroTheme,\n \"primary\" | \"primaryHover\" | \"secondary\" | \"secondaryHover\" | \"danger\" | \"dangerHover\" | \"warning\" | \"success\" | \"info\" | \"infoHover\" | \"text\" | \"textMuted\" | \"surface\" | \"background\" | \"border\"\n>;\ntype _NativeColorKeys = Pick<\n RehagroNativeTheme,\n \"primary\" | \"primaryHover\" | \"secondary\" | \"secondaryHover\" | \"danger\" | \"dangerHover\" | \"warning\" | \"success\" | \"info\" | \"infoHover\" | \"text\" | \"textMuted\" | \"surface\" | \"background\" | \"border\"\n>;\n// This line will error at compile time if the color keys diverge:\ntype _ColorKeysCheck = _ColorKeysMatch extends _NativeColorKeys ? true : never;\n","import { createContext, useContext } from \"react\";\nimport type { RehagroNativeTheme } from \"./theme.native\";\nimport { DEFAULT_NATIVE_THEME } from \"./theme.native\";\n\nexport const RehagroNativeContext = createContext<Required<RehagroNativeTheme>>(DEFAULT_NATIVE_THEME);\n\nexport function useRehagroTheme(): Required<RehagroNativeTheme> {\n return useContext(RehagroNativeContext);\n}\n","import React, { useMemo } from \"react\";\nimport { RehagroNativeContext } from \"./RehagroNativeContext\";\nimport { DEFAULT_NATIVE_THEME } from \"./theme.native\";\nimport type { RehagroNativeProviderProps, RehagroNativeTheme } from \"./theme.native\";\n\nexport function RehagroNativeProvider({ theme, children }: RehagroNativeProviderProps) {\n const resolvedTheme = useMemo<Required<RehagroNativeTheme>>(\n () => ({ ...DEFAULT_NATIVE_THEME, ...theme }),\n [theme],\n );\n\n return (\n <RehagroNativeContext.Provider value={resolvedTheme}>\n {children}\n </RehagroNativeContext.Provider>\n );\n}\n","import React, { forwardRef } from \"react\";\nimport {\n ActivityIndicator,\n Pressable,\n Text,\n View,\n type PressableProps,\n type StyleProp,\n type ViewStyle,\n} from \"react-native\";\nimport { useRehagroTheme } from \"../../provider/RehagroNativeContext\";\nimport type { ButtonColor, PresetColor } from \"../../types/colors.types\";\n\nexport type { ButtonColor };\nexport type ButtonVariant = \"solid\" | \"outline\" | \"ghost\";\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\";\nexport type ButtonRadius = \"none\" | \"xxs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"full\";\n\nexport type ButtonProps = Omit<PressableProps, \"style\"> & {\n /** Visual style variant */\n variant?: ButtonVariant;\n /** Button size */\n size?: ButtonSize;\n /** Border radius */\n radius?: ButtonRadius;\n /** Color scheme — preset name or any CSS color (e.g., \"#c3c3c3\", \"red\", \"rgb(...)\") */\n color?: ButtonColor;\n /** Shows loading state and disables interaction */\n loading?: boolean;\n /** Icon rendered to the left of children (hidden when loading) */\n leftIcon?: React.ReactNode;\n /** Icon rendered to the right of children (hidden when loading) */\n rightIcon?: React.ReactNode;\n /** Label text */\n children?: React.ReactNode;\n /** Custom style for the outer Pressable */\n style?: StyleProp<ViewStyle>;\n};\n\nconst PRESET_COLORS = new Set<string>([\n \"primary\",\n \"secondary\",\n \"danger\",\n \"warning\",\n \"success\",\n \"info\",\n]);\n\nconst isPresetColor = (c: string): c is PresetColor => PRESET_COLORS.has(c);\n\nexport const Button = forwardRef<View, ButtonProps>(function Button(\n {\n variant = \"solid\",\n size = \"md\",\n radius = \"sm\",\n color = \"primary\",\n loading = false,\n disabled,\n leftIcon,\n rightIcon,\n children,\n style,\n accessibilityLabel,\n ...rest\n },\n ref,\n) {\n const theme = useRehagroTheme();\n const isDisabled = disabled || loading;\n const preset = isPresetColor(color);\n\n const presetBase: Record<PresetColor, string> = {\n primary: theme.primary,\n secondary: theme.secondary,\n danger: theme.danger,\n warning: theme.warning,\n success: theme.success,\n info: theme.info,\n };\n\n const presetHover: Record<PresetColor, string> = {\n primary: theme.primaryHover,\n secondary: theme.secondaryHover,\n danger: theme.dangerHover,\n warning: theme.warning,\n success: theme.success,\n info: theme.infoHover,\n };\n\n const colorBase = preset ? presetBase[color as PresetColor] : color;\n const colorHover = preset ? presetHover[color as PresetColor] : color;\n\n const sizeStyleMap: Record<ButtonSize, ViewStyle> = {\n sm: { paddingHorizontal: 12, paddingVertical: 6 },\n md: { paddingHorizontal: 16, paddingVertical: 8 },\n lg: { paddingHorizontal: 20, paddingVertical: 10 },\n };\n\n const fontSizeMap: Record<ButtonSize, number> = {\n sm: 14,\n md: 14,\n lg: 16,\n };\n\n const radiusStyleMap: Record<ButtonRadius, number> = {\n none: 0,\n xxs: 2,\n xs: 4,\n sm: 8,\n md: 12,\n lg: 16,\n xl: 24,\n full: 9999,\n };\n\n const baseStyle: ViewStyle = {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: 8,\n borderWidth: 1,\n opacity: isDisabled ? 0.5 : 1,\n borderRadius: radiusStyleMap[radius],\n ...sizeStyleMap[size],\n };\n\n const variantStyle = (pressed: boolean): ViewStyle => {\n if (variant === \"solid\") {\n return {\n backgroundColor: pressed ? colorHover : colorBase,\n borderColor: pressed ? colorHover : colorBase,\n };\n }\n if (variant === \"outline\") {\n return {\n borderColor: colorBase,\n backgroundColor: pressed ? colorBase : \"transparent\",\n };\n }\n return { borderColor: \"transparent\", backgroundColor: \"transparent\" };\n };\n\n const textColor = (pressed: boolean): string => {\n if (variant === \"solid\") return theme.surface;\n if (variant === \"outline\") return pressed ? theme.surface : colorBase;\n return colorBase;\n };\n\n return (\n <Pressable\n ref={ref}\n disabled={isDisabled}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled: !!isDisabled, busy: loading }}\n accessibilityLabel={\n accessibilityLabel ?? (typeof children === \"string\" ? children : undefined)\n }\n style={({ pressed }) => [baseStyle, variantStyle(pressed), style]}\n {...rest}\n >\n {({ pressed }) => (\n <>\n {loading && (\n <ActivityIndicator\n size=\"small\"\n color={variant === \"solid\" ? theme.surface : colorBase}\n />\n )}\n {!loading && leftIcon && <View accessibilityElementsHidden>{leftIcon}</View>}\n {typeof children === \"string\" ? (\n <Text\n style={{ color: textColor(pressed), fontSize: fontSizeMap[size], fontWeight: \"500\" }}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n {!loading && rightIcon && <View accessibilityElementsHidden>{rightIcon}</View>}\n </>\n )}\n </Pressable>\n );\n});\n","import React, { forwardRef } from \"react\";\nimport {\n ActivityIndicator,\n Pressable,\n View,\n type PressableProps,\n type StyleProp,\n type ViewStyle,\n} from \"react-native\";\nimport { useRehagroTheme } from \"../../provider/RehagroNativeContext\";\nimport type { ButtonColor, PresetColor } from \"../../types/colors.types\";\n\nexport type IconButtonVariant = \"solid\" | \"outline\" | \"ghost\";\nexport type IconButtonSize = \"sm\" | \"md\" | \"lg\";\nexport type IconButtonRadius = \"none\" | \"xxs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"full\";\nexport type IconButtonColor = ButtonColor;\n\nconst PRESET_COLORS = new Set<string>([\n \"primary\",\n \"secondary\",\n \"danger\",\n \"warning\",\n \"success\",\n \"info\",\n]);\n\nconst isPresetColor = (c: string): c is PresetColor => PRESET_COLORS.has(c);\n\nexport type IconButtonProps = Omit<PressableProps, \"style\"> & {\n /** Visual style variant */\n variant?: IconButtonVariant;\n /** Button size */\n size?: IconButtonSize;\n /** Border radius */\n radius?: IconButtonRadius;\n /** Color scheme — preset name or any CSS color (e.g., \"#c3c3c3\", \"red\", \"rgb(...)\") */\n color?: IconButtonColor;\n /** Shows loading state and disables interaction */\n loading?: boolean;\n /** Icon content */\n children?: React.ReactNode;\n /** Custom style for the outer Pressable */\n style?: StyleProp<ViewStyle>;\n};\n\nexport const IconButton = forwardRef<View, IconButtonProps>(function IconButton(\n {\n variant = \"ghost\",\n size = \"md\",\n radius = \"full\",\n color = \"primary\",\n loading = false,\n disabled,\n children,\n style,\n accessibilityLabel,\n ...rest\n },\n ref,\n) {\n const theme = useRehagroTheme();\n const isDisabled = disabled || loading;\n\n const sizePxMap: Record<IconButtonSize, number> = {\n sm: 32,\n md: 40,\n lg: 48,\n };\n\n const radiusPxMap: Record<IconButtonRadius, number> = {\n none: 0,\n xxs: 2,\n xs: 4,\n sm: 8,\n md: 12,\n lg: 16,\n xl: 24,\n full: 9999,\n };\n\n const presetTokens: Record<PresetColor, { main: string; hover: string }> = {\n primary: { main: theme.primary, hover: theme.primaryHover },\n secondary: { main: theme.secondary, hover: theme.secondaryHover },\n danger: { main: theme.danger, hover: theme.dangerHover },\n warning: { main: theme.warning, hover: theme.warning },\n success: { main: theme.success, hover: theme.success },\n info: { main: theme.info, hover: theme.infoHover },\n };\n\n const preset = isPresetColor(color);\n const main = preset ? presetTokens[color as PresetColor].main : color;\n const hover = preset ? presetTokens[color as PresetColor].hover : color;\n const boxSize = sizePxMap[size];\n\n const baseStyle: ViewStyle = {\n width: boxSize,\n height: boxSize,\n borderRadius: radiusPxMap[radius],\n alignItems: \"center\",\n justifyContent: \"center\",\n borderWidth: 1,\n opacity: isDisabled ? 0.5 : 1,\n };\n\n const variantStyle = (pressed: boolean): ViewStyle => {\n if (variant === \"solid\") {\n return { backgroundColor: pressed ? hover : main, borderColor: pressed ? hover : main };\n }\n if (variant === \"outline\") {\n return { borderColor: main, backgroundColor: pressed ? main : \"transparent\" };\n }\n return { borderColor: \"transparent\", backgroundColor: pressed ? `${main}1a` : \"transparent\" };\n };\n\n const iconColor = (pressed: boolean): string => {\n if (variant === \"solid\") return theme.surface;\n if (variant === \"outline\") return pressed ? theme.surface : main;\n return main;\n };\n\n return (\n <Pressable\n ref={ref}\n disabled={isDisabled}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled: !!isDisabled, busy: loading }}\n accessibilityLabel={accessibilityLabel}\n style={({ pressed }) => [baseStyle, variantStyle(pressed), style]}\n {...rest}\n >\n {({ pressed }) =>\n loading ? (\n <ActivityIndicator size=\"small\" color={variant === \"solid\" ? theme.surface : main} />\n ) : (\n <View style={{ tintColor: iconColor(pressed) } as ViewStyle}>\n {children}\n </View>\n )\n }\n </Pressable>\n );\n});\n","import React, { forwardRef, useState } from \"react\";\nimport {\n TextInput as RNTextInput,\n Text,\n View,\n type TextInputProps as RNTextInputProps,\n type StyleProp,\n type ViewStyle,\n} from \"react-native\";\nimport { useRehagroTheme } from \"../../provider/RehagroNativeContext\";\n\nexport type TextInputStatus = \"default\" | \"error\";\nexport type TextInputSize = \"sm\" | \"md\" | \"lg\";\nexport type TextInputRadius = \"none\" | \"xxs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"full\";\n\nexport type TextInputProps = Omit<RNTextInputProps, \"style\"> & {\n /** Label text displayed above the input */\n label?: string;\n /** Subtitle displayed next to the label */\n subtitle?: string;\n /** Validation status */\n status?: TextInputStatus;\n /** Input size */\n size?: TextInputSize;\n /** Border radius */\n radius?: TextInputRadius;\n /** Icon rendered to the left of the input */\n leftIcon?: React.ReactNode;\n /** Icon rendered to the right of the input */\n rightIcon?: React.ReactNode;\n /** Helper/error message displayed below the input */\n helperText?: React.ReactNode;\n /** Custom style for the outermost wrapper */\n wrapperStyle?: StyleProp<ViewStyle>;\n /** Custom style for the input container */\n style?: StyleProp<ViewStyle>;\n};\n\nexport const TextInput = forwardRef<RNTextInput, TextInputProps>(function TextInput(\n {\n label,\n subtitle,\n status = \"default\",\n size = \"md\",\n radius = \"xs\",\n leftIcon,\n rightIcon,\n helperText,\n editable = true,\n wrapperStyle,\n style,\n accessibilityLabel,\n ...rest\n },\n ref,\n) {\n const theme = useRehagroTheme();\n const [focused, setFocused] = useState(false);\n\n const isDisabled = editable === false;\n\n const heightMap: Record<TextInputSize, number> = {\n sm: theme.inputHeightSm,\n md: theme.inputHeightMd,\n lg: theme.inputHeightLg,\n };\n\n const paddingMap: Record<TextInputSize, number> = {\n sm: 12,\n md: 14,\n lg: 16,\n };\n\n const fontSizeMap: Record<TextInputSize, number> = {\n sm: 14,\n md: 14,\n lg: 16,\n };\n\n const radiusMap: Record<TextInputRadius, number> = {\n none: 0,\n xxs: theme.radiusXxs,\n xs: theme.radiusXs,\n sm: theme.radiusSm,\n md: theme.radiusMd,\n lg: theme.radiusLg,\n xl: theme.radiusXl,\n full: 9999,\n };\n\n const hasError = status === \"error\" || !!helperText;\n\n const borderColor = hasError\n ? theme.danger\n : focused\n ? theme.primary\n : theme.border;\n\n const containerStyle: ViewStyle = {\n height: heightMap[size],\n paddingHorizontal: paddingMap[size],\n borderRadius: radiusMap[radius],\n borderWidth: theme.borderWidthSm,\n borderColor,\n backgroundColor: isDisabled ? theme.background : theme.surface,\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: 8,\n opacity: isDisabled ? 0.5 : 1,\n };\n\n const inputId = accessibilityLabel ?? label;\n\n return (\n <View style={[{ gap: 4 }, wrapperStyle]}>\n {/* Label + Subtitle */}\n {label && (\n <View style={{ flexDirection: \"row\", alignItems: \"baseline\", gap: 4 }}>\n <Text style={{ fontSize: 14, fontWeight: \"500\", color: theme.text }}>\n {label}\n </Text>\n {subtitle && (\n <Text style={{ fontSize: 14, color: theme.textMuted }}>{subtitle}</Text>\n )}\n </View>\n )}\n\n {/* Input container */}\n <View style={[containerStyle, style]}>\n {leftIcon && (\n <View accessibilityElementsHidden style={{ width: fontSizeMap[size], height: fontSizeMap[size] }}>\n {leftIcon}\n </View>\n )}\n\n <RNTextInput\n ref={ref}\n editable={editable}\n accessibilityLabel={inputId}\n accessibilityState={{ disabled: isDisabled }}\n aria-invalid={status === \"error\"}\n onFocus={(e) => {\n setFocused(true);\n rest.onFocus?.(e);\n }}\n onBlur={(e) => {\n setFocused(false);\n rest.onBlur?.(e);\n }}\n style={{\n flex: 1,\n fontSize: fontSizeMap[size],\n color: theme.text,\n }}\n placeholderTextColor={theme.textMuted}\n {...rest}\n />\n\n {rightIcon && (\n <View accessibilityElementsHidden style={{ width: fontSizeMap[size], height: fontSizeMap[size] }}>\n {rightIcon}\n </View>\n )}\n </View>\n\n {/* Helper text */}\n {helperText && (\n <Text\n style={{\n fontSize: 12,\n color: hasError ? theme.danger : theme.textMuted,\n }}\n >\n {helperText}\n </Text>\n )}\n </View>\n );\n});\n","import React, { forwardRef, useCallback, useState } from \"react\";\nimport {\n Pressable,\n Text,\n View,\n type PressableProps,\n type StyleProp,\n type ViewStyle,\n} from \"react-native\";\nimport { useRehagroTheme } from \"../../provider/RehagroNativeContext\";\n\nexport type CheckboxSize = \"sm\" | \"md\" | \"lg\";\n\nexport type CheckboxProps = Omit<PressableProps, \"style\" | \"onPress\"> & {\n /** Checkbox size */\n size?: CheckboxSize;\n /** Label text displayed next to the checkbox */\n label?: string;\n /** Controlled checked state */\n checked?: boolean;\n /** Default checked state (uncontrolled) */\n defaultChecked?: boolean;\n /** Indeterminate state (partially checked) */\n indeterminate?: boolean;\n /** Callback fired when the value changes */\n onChange?: (checked: boolean) => void;\n /** Custom style for the outer wrapper */\n style?: StyleProp<ViewStyle>;\n};\n\nconst CheckIcon = ({ size, color }: { size: number; color: string }) => (\n <View\n style={{\n width: size,\n height: size,\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n {/* Simple checkmark drawn with two Views rotated — no SVG dep needed */}\n <View\n style={{\n position: \"absolute\",\n width: size * 0.55,\n height: size * 0.3,\n borderLeftWidth: 2,\n borderBottomWidth: 2,\n borderColor: color,\n transform: [{ rotate: \"-45deg\" }, { translateY: -size * 0.05 }],\n }}\n />\n </View>\n);\n\nconst MinusIcon = ({ size, color }: { size: number; color: string }) => (\n <View\n style={{\n width: size * 0.7,\n height: 2,\n backgroundColor: color,\n }}\n />\n);\n\nexport const Checkbox = forwardRef<View, CheckboxProps>(function Checkbox(\n {\n size = \"md\",\n label,\n checked: controlledChecked,\n defaultChecked = false,\n indeterminate = false,\n disabled,\n onChange,\n style,\n accessibilityLabel,\n ...rest\n },\n ref,\n) {\n const theme = useRehagroTheme();\n const isControlled = controlledChecked !== undefined;\n const [internalChecked, setInternalChecked] = useState(defaultChecked);\n\n const isChecked = isControlled ? controlledChecked : internalChecked;\n const isActive = isChecked || indeterminate;\n\n const handlePress = useCallback(() => {\n if (disabled) return;\n const next = !isChecked;\n if (!isControlled) setInternalChecked(next);\n onChange?.(next);\n }, [disabled, isChecked, isControlled, onChange]);\n\n const boxSizeMap: Record<CheckboxSize, number> = {\n sm: 16,\n md: 20,\n lg: 24,\n };\n\n const iconSizeMap: Record<CheckboxSize, number> = {\n sm: 10,\n md: 12,\n lg: 14,\n };\n\n const fontSizeMap: Record<CheckboxSize, number> = {\n sm: 14,\n md: 14,\n lg: 16,\n };\n\n const boxSize = boxSizeMap[size];\n const iconSize = iconSizeMap[size];\n\n const boxStyle: ViewStyle = {\n width: boxSize,\n height: boxSize,\n borderRadius: theme.radiusXxs,\n borderWidth: theme.borderWidthSm,\n borderColor: isActive ? theme.primary : theme.border,\n backgroundColor: isActive ? theme.primary : theme.surface,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n\n return (\n <Pressable\n ref={ref}\n onPress={handlePress}\n disabled={disabled}\n accessibilityRole=\"checkbox\"\n accessibilityState={{ checked: indeterminate ? \"mixed\" : isChecked, disabled: !!disabled }}\n accessibilityLabel={accessibilityLabel ?? label}\n style={[{ flexDirection: \"row\", alignItems: \"center\", gap: 8, opacity: disabled ? 0.5 : 1 }, style]}\n {...rest}\n >\n <View style={boxStyle}>\n {indeterminate ? (\n <MinusIcon size={iconSize} color={theme.surface} />\n ) : isChecked ? (\n <CheckIcon size={iconSize} color={theme.surface} />\n ) : null}\n </View>\n\n {label && (\n <Text style={{ fontSize: fontSizeMap[size], color: theme.text }}>\n {label}\n </Text>\n )}\n </Pressable>\n );\n});\n","import React, { forwardRef, useState, useMemo } from \"react\";\nimport { Image, Text, View, type StyleProp, type ViewStyle, type ViewProps } from \"react-native\";\nimport { useRehagroTheme } from \"../../provider/RehagroNativeContext\";\n\nexport type AvatarSize = \"sm\" | \"md\" | \"lg\" | \"xl\";\nexport type AvatarVariant = \"circle\" | \"square\";\n\n// Paleta de cores para avatares\nconst AVATAR_COLORS = [\n { bg: \"#FBF1E6\", text: \"#D6822D\" }, // Laranja\n { bg: \"#EDF3FA\", text: \"#538CC6\" }, // Azul\n { bg: \"#F3E5F5\", text: \"#9C27B0\" }, // Roxo\n { bg: \"#E8F5E9\", text: \"#4CAF50\" }, // Verde\n { bg: \"#FFF3E0\", text: \"#FF9800\" }, // Amarelo\n { bg: \"#FFEBEE\", text: \"#F44336\" }, // Vermelho\n { bg: \"#E3F2FD\", text: \"#2196F3\" }, // Azul claro\n { bg: \"#F3E5F5\", text: \"#673AB7\" }, // Violeta\n { bg: \"#E0F2F1\", text: \"#009688\" }, // Teal\n { bg: \"#FBE9E7\", text: \"#FF5722\" }, // Deep Orange\n];\n\n/**\n * Gera cores de avatar baseadas em uma string (nome)\n * Usa hash simples para garantir consistência\n */\nfunction getAvatarColors(name: string): { bg: string; text: string } {\n const hash = name.split(\"\").reduce((acc, char) => acc + char.charCodeAt(0), 0);\n const index = hash % AVATAR_COLORS.length;\n return AVATAR_COLORS[index];\n}\n\nexport type AvatarProps = Omit<ViewProps, \"style\"> & {\n /** Image source URL */\n src?: string;\n /** Alt text (used as accessibility label and initials fallback) */\n alt?: string;\n /** Fallback initials shown when image is unavailable */\n initials?: string;\n /** Avatar size */\n size?: AvatarSize;\n /** Shape variant */\n variant?: AvatarVariant;\n /** Generate background and text color automatically based on name/alt */\n colorFromName?: boolean;\n /** Custom style for the outer wrapper */\n style?: StyleProp<ViewStyle>;\n};\n\nexport const Avatar = forwardRef<View, AvatarProps>(function Avatar(\n { src, alt = \"\", initials, size = \"md\", variant = \"circle\", colorFromName = false, style, ...rest },\n ref,\n) {\n const theme = useRehagroTheme();\n const [imgError, setImgError] = useState(false);\n const showImage = !!src && !imgError;\n\n // Gera cores baseadas no nome se colorFromName estiver ativo\n const avatarColors = useMemo(() => {\n if (!colorFromName) return null;\n const name = initials || alt || \"\";\n return name ? getAvatarColors(name) : null;\n }, [colorFromName, initials, alt]);\n\n const fallbackLabel = initials\n ? initials.slice(0, 2).toUpperCase()\n : alt\n ? alt\n .split(\" \")\n .slice(0, 2)\n .map((w) => w[0])\n .join(\"\")\n .toUpperCase()\n : \"?\";\n\n const sizePxMap: Record<AvatarSize, number> = {\n sm: 32,\n md: 40,\n lg: 48,\n xl: 64,\n };\n\n const fontSizeMap: Record<AvatarSize, number> = {\n sm: 12,\n md: 14,\n lg: 18,\n xl: 20,\n };\n\n const boxSize = sizePxMap[size];\n const borderRadius = variant === \"circle\" ? boxSize / 2 : theme.radiusSm;\n\n const containerStyle: ViewStyle = {\n width: boxSize,\n height: boxSize,\n borderRadius,\n backgroundColor: avatarColors?.bg ?? theme.primary,\n alignItems: \"center\",\n justifyContent: \"center\",\n overflow: \"hidden\",\n };\n\n return (\n <View\n ref={ref}\n accessible\n accessibilityRole=\"image\"\n accessibilityLabel={alt || initials || fallbackLabel}\n style={[containerStyle, style]}\n {...rest}\n >\n {showImage ? (\n <Image\n source={{ uri: src }}\n style={{ width: boxSize, height: boxSize, borderRadius }}\n onError={() => setImgError(true)}\n accessibilityLabel={alt}\n />\n ) : (\n <Text\n style={{\n fontSize: fontSizeMap[size],\n fontWeight: \"500\",\n color: avatarColors?.text ?? theme.surface,\n }}\n accessibilityElementsHidden\n >\n {fallbackLabel}\n </Text>\n )}\n </View>\n );\n});\n","import React, { forwardRef } from \"react\";\nimport {\n ActivityIndicator as RNActivityIndicator,\n View,\n type StyleProp,\n type ViewStyle,\n type ViewProps,\n} from \"react-native\";\nimport { useRehagroTheme } from \"../../provider/RehagroNativeContext\";\n\nexport type ActivityIndicatorSize = \"sm\" | \"md\" | \"lg\";\nexport type ActivityIndicatorColor = \"primary\" | \"surface\" | \"custom\";\n\nexport type ActivityIndicatorProps = Omit<ViewProps, \"style\"> & {\n /** Spinner size */\n size?: ActivityIndicatorSize;\n /** Color preset — use \"custom\" to provide a raw color via `color` prop */\n colorVariant?: ActivityIndicatorColor;\n /** Raw color value (used when colorVariant is \"custom\") */\n color?: string;\n /** Whether the indicator is visible */\n animating?: boolean;\n /** Custom style for the outer wrapper */\n style?: StyleProp<ViewStyle>;\n};\n\nconst sizeMap: Record<ActivityIndicatorSize, number | \"small\" | \"large\"> = {\n sm: \"small\",\n md: \"large\",\n lg: 48,\n};\n\nexport const ActivityIndicator = forwardRef<View, ActivityIndicatorProps>(\n function ActivityIndicator(\n {\n size = \"md\",\n colorVariant = \"primary\",\n color,\n animating = true,\n style,\n accessibilityLabel = \"Carregando\",\n ...rest\n },\n ref,\n ) {\n const theme = useRehagroTheme();\n\n const resolvedColor =\n colorVariant === \"custom\" && color\n ? color\n : colorVariant === \"surface\"\n ? theme.surface\n : theme.primary;\n\n const spinnerSize = sizeMap[size];\n\n return (\n <View\n ref={ref}\n accessible\n accessibilityRole=\"progressbar\"\n accessibilityLabel={accessibilityLabel}\n accessibilityState={{ busy: animating }}\n style={style}\n {...rest}\n >\n <RNActivityIndicator\n animating={animating}\n size={spinnerSize as \"small\" | \"large\"}\n color={resolvedColor}\n />\n </View>\n );\n },\n);\n","import React, { forwardRef } from \"react\";\nimport {\n Text as RNText,\n type TextProps as RNTextProps,\n type StyleProp,\n type TextStyle,\n} from \"react-native\";\nimport { useRehagroTheme } from \"../../provider/RehagroNativeContext\";\n\nexport type TextVariant =\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"body\"\n | \"bodyLg\"\n | \"caption\"\n | \"label\";\n\nexport type TextColor = \"default\" | \"muted\" | \"primary\" | \"danger\" | \"success\" | \"warning\";\n\nexport type TextProps = Omit<RNTextProps, \"style\"> & {\n /** Typographic variant */\n variant?: TextVariant;\n /** Color preset */\n color?: TextColor;\n /** Bold weight */\n bold?: boolean;\n /** Custom style */\n style?: StyleProp<TextStyle>;\n};\n\nconst variantStyles: Record<TextVariant, TextStyle> = {\n h1: { fontSize: 32, lineHeight: 40, fontWeight: \"700\" },\n h2: { fontSize: 24, lineHeight: 32, fontWeight: \"700\" },\n h3: { fontSize: 20, lineHeight: 28, fontWeight: \"600\" },\n h4: { fontSize: 18, lineHeight: 26, fontWeight: \"600\" },\n bodyLg: { fontSize: 16, lineHeight: 24, fontWeight: \"400\" },\n body: { fontSize: 14, lineHeight: 20, fontWeight: \"400\" },\n label: { fontSize: 14, lineHeight: 20, fontWeight: \"500\" },\n caption: { fontSize: 12, lineHeight: 16, fontWeight: \"400\" },\n};\n\nexport const Text = forwardRef<RNText, TextProps>(function Text(\n { variant = \"body\", color = \"default\", bold = false, style, children, ...rest },\n ref,\n) {\n const theme = useRehagroTheme();\n\n const colorMap: Record<TextColor, string> = {\n default: theme.text,\n muted: theme.textMuted,\n primary: theme.primary,\n danger: theme.danger,\n success: theme.success,\n warning: theme.warning,\n };\n\n const resolvedStyle: TextStyle = {\n ...variantStyles[variant],\n color: colorMap[color],\n ...(bold ? { fontWeight: \"700\" } : {}),\n };\n\n return (\n <RNText ref={ref} style={[resolvedStyle, style]} {...rest}>\n {children}\n </RNText>\n );\n});\n","import React, { forwardRef } from \"react\";\nimport {\n Pressable,\n Text,\n View,\n type PressableProps,\n type StyleProp,\n type TextStyle,\n type ViewStyle,\n} from \"react-native\";\nimport { useRehagroTheme } from \"../../provider/RehagroNativeContext\";\nimport type { PresetColor } from \"../../types/colors.types\";\n\nexport type TagColor = PresetColor | (string & {});\nexport type TagSize = \"sm\" | \"md\" | \"lg\";\n\nexport type TagProps = Omit<PressableProps, \"style\"> & {\n /** Tag color — preset name or any CSS color (e.g., \"#c3c3c3\", \"red\") */\n color?: TagColor;\n /** Tag size */\n size?: TagSize;\n /** Active (selected) state */\n active?: boolean;\n /** Disabled state */\n disabled?: boolean;\n /** Tag label text */\n title: string;\n /** Optional icon rendered on the left side */\n leftIcon?: React.ReactNode;\n /** Optional icon rendered on the right side */\n rightIcon?: React.ReactNode;\n /** Custom style for the outer container */\n style?: StyleProp<ViewStyle>;\n};\n\nconst PRESET_COLORS = new Set<string>([\n \"primary\",\n \"secondary\",\n \"danger\",\n \"warning\",\n \"success\",\n \"info\",\n]);\n\nconst isPresetColor = (c: string): c is PresetColor => PRESET_COLORS.has(c);\n\n/** Appends a two-digit hex alpha to a 6-digit hex color string. */\nfunction hexAlpha(hex: string, alpha: string): string {\n return `${hex}${alpha}`;\n}\n\nexport const Tag = forwardRef<View, TagProps>(function Tag(\n {\n color = \"primary\",\n size = \"md\",\n active = false,\n disabled = false,\n title,\n leftIcon,\n rightIcon,\n style,\n accessibilityLabel,\n ...rest\n },\n ref,\n) {\n const theme = useRehagroTheme();\n const clickable = !!rest.onPress && !disabled;\n\n const presetTokens: Record<PresetColor, { main: string; hover: string }> = {\n primary: { main: theme.primary, hover: theme.primaryHover },\n secondary: { main: theme.secondary, hover: theme.secondaryHover },\n danger: { main: theme.danger, hover: theme.dangerHover },\n warning: { main: theme.warning, hover: theme.warning },\n success: { main: theme.success, hover: theme.success },\n info: { main: theme.info, hover: theme.infoHover },\n };\n\n const preset = isPresetColor(color);\n const mainColor = preset ? presetTokens[color as PresetColor].main : color;\n const hoverColor = preset ? presetTokens[color as PresetColor].hover : color;\n\n const sizeStyleMap: Record<TagSize, ViewStyle> = {\n sm: { paddingHorizontal: 8, paddingVertical: 2, gap: 4 },\n md: { paddingHorizontal: 10, paddingVertical: 4, gap: 6 },\n lg: { paddingHorizontal: 12, paddingVertical: 6, gap: 6 },\n };\n\n const fontSizeMap: Record<TagSize, number> = {\n sm: 11,\n md: 12,\n lg: 13,\n };\n\n const baseStyle: ViewStyle = {\n flexDirection: \"row\",\n alignItems: \"center\",\n alignSelf: \"flex-start\",\n borderRadius: 9999,\n borderWidth: 1,\n opacity: disabled ? 0.5 : 1,\n ...sizeStyleMap[size],\n };\n\n function containerStyle(pressed: boolean): ViewStyle {\n const resolvedColor = pressed && clickable ? hoverColor : mainColor;\n\n if (active) {\n return {\n backgroundColor: resolvedColor,\n borderColor: resolvedColor,\n };\n }\n\n // inactive\n const bg = pressed && clickable\n ? hexAlpha(mainColor, \"33\") // ~20% on press\n : hexAlpha(mainColor, \"1a\"); // ~10% resting\n const border = hexAlpha(mainColor, \"4d\"); // ~30%\n\n return { backgroundColor: bg, borderColor: border };\n }\n\n function resolvedTextColor(pressed: boolean): string {\n if (active) return theme.surface;\n return pressed && clickable ? hoverColor : mainColor;\n }\n\n const textStyle = (pressed: boolean): TextStyle => ({\n color: resolvedTextColor(pressed),\n fontSize: fontSizeMap[size],\n fontWeight: \"500\",\n });\n\n if (!clickable) {\n return (\n <View\n ref={ref}\n accessibilityRole=\"text\"\n accessibilityLabel={accessibilityLabel ?? title}\n accessibilityState={{ disabled }}\n style={[baseStyle, containerStyle(false), style]}\n >\n {leftIcon && <View accessibilityElementsHidden>{leftIcon}</View>}\n <Text style={textStyle(false)}>{title}</Text>\n {rightIcon && <View accessibilityElementsHidden>{rightIcon}</View>}\n </View>\n );\n }\n\n return (\n <Pressable\n ref={ref}\n disabled={disabled}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled, selected: active }}\n accessibilityLabel={accessibilityLabel ?? title}\n style={({ pressed }) => [baseStyle, containerStyle(pressed), style]}\n {...rest}\n >\n {({ pressed }) => (\n <>\n {leftIcon && <View accessibilityElementsHidden>{leftIcon}</View>}\n <Text style={textStyle(pressed)}>{title}</Text>\n {rightIcon && <View accessibilityElementsHidden>{rightIcon}</View>}\n </>\n )}\n </Pressable>\n );\n});\n","import React, { forwardRef } from \"react\";\nimport {\n Pressable,\n View,\n type PressableProps,\n type StyleProp,\n type ViewStyle,\n} from \"react-native\";\nimport { useRehagroTheme } from \"../../provider/RehagroNativeContext\";\n\nexport type CardVariant = \"elevated\" | \"outlined\" | \"filled\";\nexport type CardRadius = \"none\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\nexport type CardPadding = \"none\" | \"sm\" | \"md\" | \"lg\";\n\nexport type CardProps = Omit<PressableProps, \"style\"> & {\n /** Visual style variant */\n variant?: CardVariant;\n /** Border radius */\n radius?: CardRadius;\n /** Internal padding */\n padding?: CardPadding;\n /** Makes the card clickable with press effects */\n clickable?: boolean;\n /** Disabled state (only applies when clickable) */\n disabled?: boolean;\n /** Children content */\n children?: React.ReactNode;\n /** Custom style */\n style?: StyleProp<ViewStyle>;\n};\n\nconst radiusMap: Record<CardRadius, number> = {\n none: 0,\n xs: 2,\n sm: 4,\n md: 8,\n lg: 12,\n xl: 16,\n};\n\nconst paddingMap: Record<CardPadding, number> = {\n none: 0,\n sm: 12,\n md: 16,\n lg: 24,\n};\n\nexport const Card = forwardRef<View, CardProps>(function Card(\n {\n variant = \"outlined\",\n radius = \"sm\",\n padding = \"md\",\n clickable = false,\n disabled = false,\n children,\n style,\n ...rest\n },\n ref,\n) {\n const theme = useRehagroTheme();\n\n const baseStyle: ViewStyle = {\n borderRadius: radiusMap[radius],\n padding: paddingMap[padding],\n opacity: disabled ? 0.5 : 1,\n };\n\n const variantStyles: Record<CardVariant, ViewStyle> = {\n elevated: {\n backgroundColor: theme.surface,\n shadowColor: \"#000\",\n shadowOffset: { width: 0, height: 2 },\n shadowOpacity: 0.1,\n shadowRadius: 8,\n elevation: 4,\n },\n outlined: {\n backgroundColor: theme.surface,\n borderWidth: 1,\n borderColor: theme.border,\n },\n filled: {\n backgroundColor: theme.background,\n },\n };\n\n const containerStyle = (pressed: boolean): ViewStyle[] => {\n const styles: ViewStyle[] = [baseStyle, variantStyles[variant]];\n\n if (clickable && pressed) {\n styles.push({\n opacity: 0.8,\n transform: [{ scale: 0.99 }],\n });\n }\n\n return styles;\n };\n\n if (!clickable) {\n return (\n <View\n ref={ref}\n style={[baseStyle, variantStyles[variant], style]}\n accessibilityRole=\"none\"\n >\n {children}\n </View>\n );\n }\n\n return (\n <Pressable\n ref={ref}\n disabled={disabled}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled }}\n style={({ pressed }) => [containerStyle(pressed), style]}\n {...rest}\n >\n {children}\n </Pressable>\n );\n});\n\nexport type CardHeaderProps = {\n children?: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n};\n\nexport const CardHeader = forwardRef<View, CardHeaderProps>(function CardHeader(\n { children, style },\n ref,\n) {\n return (\n <View\n ref={ref}\n style={[\n {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n gap: 16,\n },\n style,\n ]}\n >\n {children}\n </View>\n );\n});\n\nexport type CardContentProps = {\n children?: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n};\n\nexport const CardContent = forwardRef<View, CardContentProps>(function CardContent(\n { children, style },\n ref,\n) {\n return (\n <View ref={ref} style={[{ marginTop: 8 }, style]}>\n {children}\n </View>\n );\n});\n\nexport type CardFooterProps = {\n children?: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n};\n\nexport const CardFooter = forwardRef<View, CardFooterProps>(function CardFooter(\n { children, style },\n ref,\n) {\n const theme = useRehagroTheme();\n\n return (\n <View\n ref={ref}\n style={[\n {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n gap: 8,\n marginTop: 16,\n paddingTop: 16,\n borderTopWidth: 1,\n borderTopColor: theme.border,\n },\n style,\n ]}\n >\n {children}\n </View>\n );\n});\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/provider/theme.native.ts","../src/provider/RehagroNativeContext.ts","../src/provider/RehagroNativeProvider.tsx","../src/components/Button/Button.native.tsx","../src/components/IconButton/IconButton.native.tsx","../src/components/TextInput/TextInput.native.tsx","../src/components/Checkbox/Checkbox.native.tsx","../src/components/Avatar/Avatar.native.tsx","../src/components/ActivityIndicator/ActivityIndicator.native.tsx","../src/components/Text/Text.native.tsx","../src/components/Tag/Tag.native.tsx","../src/components/Card/Card.native.tsx"],"names":["createContext","useContext","useMemo","forwardRef","Button","jsx","Pressable","jsxs","Fragment","ActivityIndicator","View","Text","PRESET_COLORS","isPresetColor","IconButton","TextInput","useState","paddingMap","radiusMap","RNTextInput","Checkbox","useCallback","Avatar","Image","RNActivityIndicator","RNText","Tag","Card","variantStyles","CardHeader","CardContent","CardFooter"],"mappings":";;;;;;;;;AAwDO,IAAM,oBAAA,GAAqD;AAAA,EAChE,OAAA,EAAS,SAAA;AAAA,EACT,YAAA,EAAc,SAAA;AAAA,EACd,SAAA,EAAW,SAAA;AAAA,EACX,cAAA,EAAgB,S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ACZ,GAAA,EACA;AACA,EAAA,uBACEzB,cAAAA,CAACK,gBAAAA,EAAA,EAAK,GAAA,EAAU,KAAA,EAAO,CAAC,EAAE,SAAA,EAAW,CAAA,EAAE,EAAG,KAAK,GAC5C,QAAA,EACH,CAAA;AAEJ,CAAC;AAOM,IAAM,UAAA,GAAaP,iBAAkC,SAAS4B,WAAAA,CACnE,EAAE,QAAA,EAAU,KAAA,IACZ,GAAA,EACA;AACA,EAAA,MAAM,QAAQ,eAAA,EAAgB;AAE9B,EAAA,uBACE1B,cAAAA;AAAA,IAACK,gBAAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,KAAA,EAAO;AAAA,QACL;AAAA,UACE,aAAA,EAAe,KAAA;AAAA,UACf,UAAA,EAAY,QAAA;AAAA,UACZ,cAAA,EAAgB,UAAA;AAAA,UAChB,GAAA,EAAK,CAAA;AAAA,UACL,SAAA,EAAW,EAAA;AAAA,UACX,UAAA,EAAY,EAAA;AAAA,UACZ,cAAA,EAAgB,CAAA;AAAA,UAChB,gBAAgB,KAAA,CAAM;AAAA,SACxB;AAAA,QACA;AAAA,OACF;AAAA,MAEC;AAAA;AAAA,GACH;AAEJ,CAAC","file":"native.js","sourcesContent":["import type { RehagroTheme } from \"./theme\";\n\n/** React Native theme — reuses the same token names as the web theme.\n * Color values are plain CSS hex strings (e.g. \"#16a34a\").\n * Spacing/radius/border values are numbers (device-independent pixels).\n */\nexport type RehagroNativeTheme = {\n // Brand colors\n primary?: string;\n primaryHover?: string;\n secondary?: string;\n secondaryHover?: string;\n danger?: string;\n dangerHover?: string;\n warning?: string;\n success?: string;\n info?: string;\n infoHover?: string;\n\n // Semantic colors\n text?: string;\n textMuted?: string;\n surface?: string;\n background?: string;\n border?: string;\n\n // Border radius (numbers = dp)\n radiusXxs?: number;\n radiusXs?: number;\n radiusSm?: number;\n radiusMd?: number;\n radiusLg?: number;\n radiusXl?: number;\n\n // Border width\n borderWidthSm?: number;\n borderWidthMd?: number;\n borderWidthLg?: number;\n\n // Input sizes\n inputHeightSm?: number;\n inputHeightMd?: number;\n inputHeightLg?: number;\n\n // Typography — must be loaded by the app (e.g. via expo-font / useFonts)\n // Inter for body/labels, Sora for headings/display\n fontFamilyBody?: string;\n fontFamilyDisplay?: string;\n};\n\nexport type RehagroNativeProviderProps = {\n /** Theme overrides — any token not provided keeps the default value */\n theme?: RehagroNativeTheme;\n children: React.ReactNode;\n};\n\nexport const DEFAULT_NATIVE_THEME: Required<RehagroNativeTheme> = {\n primary: \"#16a34a\",\n primaryHover: \"#15803d\",\n secondary: \"#6b7280\",\n secondaryHover: \"#4b5563\",\n danger: \"#dc2626\",\n dangerHover: \"#b91c1c\",\n warning: \"#d97706\",\n success: \"#16a34a\",\n info: \"#0284c7\",\n infoHover: \"#0369a1\",\n\n text: \"#111827\",\n textMuted: \"#6b7280\",\n surface: \"#ffffff\",\n background: \"#f9fafb\",\n border: \"#d1d5db\",\n\n radiusXxs: 4,\n radiusXs: 8,\n radiusSm: 12,\n radiusMd: 16,\n radiusLg: 24,\n radiusXl: 32,\n\n borderWidthSm: 1,\n borderWidthMd: 2,\n borderWidthLg: 3,\n\n inputHeightSm: 36,\n inputHeightMd: 44,\n inputHeightLg: 52,\n\n fontFamilyBody: \"\",\n fontFamilyDisplay: \"\",\n};\n\n// Ensures RehagroNativeTheme color keys stay in sync with RehagroTheme\ntype _ColorKeysMatch = Pick<\n RehagroTheme,\n \"primary\" | \"primaryHover\" | \"secondary\" | \"secondaryHover\" | \"danger\" | \"dangerHover\" | \"warning\" | \"success\" | \"info\" | \"infoHover\" | \"text\" | \"textMuted\" | \"surface\" | \"background\" | \"border\"\n>;\ntype _NativeColorKeys = Pick<\n RehagroNativeTheme,\n \"primary\" | \"primaryHover\" | \"secondary\" | \"secondaryHover\" | \"danger\" | \"dangerHover\" | \"warning\" | \"success\" | \"info\" | \"infoHover\" | \"text\" | \"textMuted\" | \"surface\" | \"background\" | \"border\"\n>;\n// This line will error at compile time if the color keys diverge:\ntype _ColorKeysCheck = _ColorKeysMatch extends _NativeColorKeys ? true : never;\n","import { createContext, useContext } from \"react\";\nimport type { RehagroNativeTheme } from \"./theme.native\";\nimport { DEFAULT_NATIVE_THEME } from \"./theme.native\";\n\nexport const RehagroNativeContext = createContext<Required<RehagroNativeTheme>>(DEFAULT_NATIVE_THEME);\n\nexport function useRehagroTheme(): Required<RehagroNativeTheme> {\n return useContext(RehagroNativeContext);\n}\n","import React, { useMemo } from \"react\";\nimport { RehagroNativeContext } from \"./RehagroNativeContext\";\nimport { DEFAULT_NATIVE_THEME } from \"./theme.native\";\nimport type { RehagroNativeProviderProps, RehagroNativeTheme } from \"./theme.native\";\n\nexport function RehagroNativeProvider({ theme, children }: RehagroNativeProviderProps) {\n const resolvedTheme = useMemo<Required<RehagroNativeTheme>>(\n () => ({ ...DEFAULT_NATIVE_THEME, ...theme }),\n [theme],\n );\n\n return (\n <RehagroNativeContext.Provider value={resolvedTheme}>\n {children}\n </RehagroNativeContext.Provider>\n );\n}\n","import React, { forwardRef } from \"react\";\nimport {\n ActivityIndicator,\n Pressable,\n Text,\n View,\n type PressableProps,\n type StyleProp,\n type TextStyle,\n type ViewStyle,\n} from \"react-native\";\nimport { useRehagroTheme } from \"../../provider/RehagroNativeContext\";\nimport type { ButtonColor, PresetColor } from \"../../types/colors.types\";\n\nexport type { ButtonColor };\nexport type ButtonVariant = \"solid\" | \"outline\" | \"ghost\";\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\";\nexport type ButtonRadius = \"none\" | \"xxs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"full\";\n\nexport type ButtonProps = Omit<PressableProps, \"style\"> & {\n /** Visual style variant */\n variant?: ButtonVariant;\n /** Button size */\n size?: ButtonSize;\n /** Border radius */\n radius?: ButtonRadius;\n /** Color scheme — preset name or any CSS color (e.g., \"#c3c3c3\", \"red\", \"rgb(...)\") */\n color?: ButtonColor;\n /** Shows loading state and disables interaction */\n loading?: boolean;\n /** Icon rendered to the left of children (hidden when loading) */\n leftIcon?: React.ReactNode;\n /** Icon rendered to the right of children (hidden when loading) */\n rightIcon?: React.ReactNode;\n /** Label text */\n children?: React.ReactNode;\n /** Custom style for the outer Pressable */\n style?: StyleProp<ViewStyle>;\n /** Custom style applied to the inner text label (string children only) */\n labelStyle?: StyleProp<TextStyle>;\n};\n\nconst PRESET_COLORS = new Set<string>([\n \"primary\",\n \"secondary\",\n \"danger\",\n \"warning\",\n \"success\",\n \"info\",\n]);\n\nconst isPresetColor = (c: string): c is PresetColor => PRESET_COLORS.has(c);\n\nexport const Button = forwardRef<View, ButtonProps>(function Button(\n {\n variant = \"solid\",\n size = \"md\",\n radius = \"sm\",\n color = \"primary\",\n loading = false,\n disabled,\n leftIcon,\n rightIcon,\n children,\n style,\n labelStyle,\n accessibilityLabel,\n ...rest\n },\n ref,\n) {\n const theme = useRehagroTheme();\n const isDisabled = disabled || loading;\n const preset = isPresetColor(color);\n\n const presetBase: Record<PresetColor, string> = {\n primary: theme.primary,\n secondary: theme.secondary,\n danger: theme.danger,\n warning: theme.warning,\n success: theme.success,\n info: theme.info,\n };\n\n const presetHover: Record<PresetColor, string> = {\n primary: theme.primaryHover,\n secondary: theme.secondaryHover,\n danger: theme.dangerHover,\n warning: theme.warning,\n success: theme.success,\n info: theme.infoHover,\n };\n\n const colorBase = preset ? presetBase[color as PresetColor] : color;\n const colorHover = preset ? presetHover[color as PresetColor] : color;\n\n const sizeStyleMap: Record<ButtonSize, ViewStyle> = {\n sm: { paddingHorizontal: 12, paddingVertical: 6 },\n md: { paddingHorizontal: 16, paddingVertical: 8 },\n lg: { paddingHorizontal: 20, paddingVertical: 10 },\n };\n\n const fontSizeMap: Record<ButtonSize, number> = {\n sm: 14,\n md: 14,\n lg: 16,\n };\n\n const radiusStyleMap: Record<ButtonRadius, number> = {\n none: 0,\n xxs: 2,\n xs: 4,\n sm: 8,\n md: 12,\n lg: 16,\n xl: 24,\n full: 9999,\n };\n\n const baseStyle: ViewStyle = {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: 8,\n borderWidth: 1,\n opacity: isDisabled ? 0.5 : 1,\n borderRadius: radiusStyleMap[radius],\n ...sizeStyleMap[size],\n };\n\n const variantStyle = (pressed: boolean): ViewStyle => {\n if (variant === \"solid\") {\n return {\n backgroundColor: pressed ? colorHover : colorBase,\n borderColor: pressed ? colorHover : colorBase,\n };\n }\n if (variant === \"outline\") {\n return {\n borderColor: colorBase,\n backgroundColor: pressed ? colorBase : \"transparent\",\n };\n }\n return { borderColor: \"transparent\", backgroundColor: \"transparent\" };\n };\n\n const textColor = (pressed: boolean): string => {\n if (variant === \"solid\") return theme.surface;\n if (variant === \"outline\") return pressed ? theme.surface : colorBase;\n return colorBase;\n };\n\n return (\n <Pressable\n ref={ref}\n disabled={isDisabled}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled: !!isDisabled, busy: loading }}\n accessibilityLabel={\n accessibilityLabel ?? (typeof children === \"string\" ? children : undefined)\n }\n style={({ pressed }) => [baseStyle, variantStyle(pressed), style]}\n {...rest}\n >\n {({ pressed }) => (\n <>\n {loading && (\n <ActivityIndicator\n size=\"small\"\n color={variant === \"solid\" ? theme.surface : colorBase}\n />\n )}\n {!loading && leftIcon && <View accessibilityElementsHidden>{leftIcon}</View>}\n {typeof children === \"string\" ? (\n <Text\n style={[{ color: textColor(pressed), fontSize: fontSizeMap[size], fontWeight: \"500\", ...(theme.fontFamilyDisplay ? { fontFamily: theme.fontFamilyDisplay } : {}) }, labelStyle]}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n {!loading && rightIcon && <View accessibilityElementsHidden>{rightIcon}</View>}\n </>\n )}\n </Pressable>\n );\n});\n","import React, { forwardRef } from \"react\";\nimport {\n ActivityIndicator,\n Pressable,\n View,\n type PressableProps,\n type StyleProp,\n type ViewStyle,\n} from \"react-native\";\nimport { useRehagroTheme } from \"../../provider/RehagroNativeContext\";\nimport type { ButtonColor, PresetColor } from \"../../types/colors.types\";\n\nexport type IconButtonVariant = \"solid\" | \"outline\" | \"ghost\";\nexport type IconButtonSize = \"sm\" | \"md\" | \"lg\";\nexport type IconButtonRadius = \"none\" | \"xxs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"full\";\nexport type IconButtonColor = ButtonColor;\n\nconst PRESET_COLORS = new Set<string>([\n \"primary\",\n \"secondary\",\n \"danger\",\n \"warning\",\n \"success\",\n \"info\",\n]);\n\nconst isPresetColor = (c: string): c is PresetColor => PRESET_COLORS.has(c);\n\nexport type IconButtonProps = Omit<PressableProps, \"style\"> & {\n /** Visual style variant */\n variant?: IconButtonVariant;\n /** Button size */\n size?: IconButtonSize;\n /** Border radius */\n radius?: IconButtonRadius;\n /** Color scheme — preset name or any CSS color (e.g., \"#c3c3c3\", \"red\", \"rgb(...)\") */\n color?: IconButtonColor;\n /** Shows loading state and disables interaction */\n loading?: boolean;\n /** Icon content */\n children?: React.ReactNode;\n /** Custom style for the outer Pressable */\n style?: StyleProp<ViewStyle>;\n};\n\nexport const IconButton = forwardRef<View, IconButtonProps>(function IconButton(\n {\n variant = \"ghost\",\n size = \"md\",\n radius = \"full\",\n color = \"primary\",\n loading = false,\n disabled,\n children,\n style,\n accessibilityLabel,\n ...rest\n },\n ref,\n) {\n const theme = useRehagroTheme();\n const isDisabled = disabled || loading;\n\n const sizePxMap: Record<IconButtonSize, number> = {\n sm: 32,\n md: 40,\n lg: 48,\n };\n\n const radiusPxMap: Record<IconButtonRadius, number> = {\n none: 0,\n xxs: 2,\n xs: 4,\n sm: 8,\n md: 12,\n lg: 16,\n xl: 24,\n full: 9999,\n };\n\n const presetTokens: Record<PresetColor, { main: string; hover: string }> = {\n primary: { main: theme.primary, hover: theme.primaryHover },\n secondary: { main: theme.secondary, hover: theme.secondaryHover },\n danger: { main: theme.danger, hover: theme.dangerHover },\n warning: { main: theme.warning, hover: theme.warning },\n success: { main: theme.success, hover: theme.success },\n info: { main: theme.info, hover: theme.infoHover },\n };\n\n const preset = isPresetColor(color);\n const main = preset ? presetTokens[color as PresetColor].main : color;\n const hover = preset ? presetTokens[color as PresetColor].hover : color;\n const boxSize = sizePxMap[size];\n\n const baseStyle: ViewStyle = {\n width: boxSize,\n height: boxSize,\n borderRadius: radiusPxMap[radius],\n alignItems: \"center\",\n justifyContent: \"center\",\n borderWidth: 1,\n opacity: isDisabled ? 0.5 : 1,\n };\n\n const variantStyle = (pressed: boolean): ViewStyle => {\n if (variant === \"solid\") {\n return { backgroundColor: pressed ? hover : main, borderColor: pressed ? hover : main };\n }\n if (variant === \"outline\") {\n return { borderColor: main, backgroundColor: pressed ? main : \"transparent\" };\n }\n return { borderColor: \"transparent\", backgroundColor: pressed ? `${main}1a` : \"transparent\" };\n };\n\n const iconColor = (pressed: boolean): string => {\n if (variant === \"solid\") return theme.surface;\n if (variant === \"outline\") return pressed ? theme.surface : main;\n return main;\n };\n\n return (\n <Pressable\n ref={ref}\n disabled={isDisabled}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled: !!isDisabled, busy: loading }}\n accessibilityLabel={accessibilityLabel}\n style={({ pressed }) => [baseStyle, variantStyle(pressed), style]}\n {...rest}\n >\n {({ pressed }) =>\n loading ? (\n <ActivityIndicator size=\"small\" color={variant === \"solid\" ? theme.surface : main} />\n ) : (\n <View style={{ tintColor: iconColor(pressed) } as ViewStyle}>\n {children}\n </View>\n )\n }\n </Pressable>\n );\n});\n","import React, { forwardRef, useState } from \"react\";\nimport {\n TextInput as RNTextInput,\n Text,\n View,\n type TextInputProps as RNTextInputProps,\n type StyleProp,\n type ViewStyle,\n} from \"react-native\";\nimport { useRehagroTheme } from \"../../provider/RehagroNativeContext\";\n\nexport type TextInputStatus = \"default\" | \"error\";\nexport type TextInputSize = \"sm\" | \"md\" | \"lg\";\nexport type TextInputRadius = \"none\" | \"xxs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"full\";\n\nexport type TextInputProps = Omit<RNTextInputProps, \"style\"> & {\n /** Label text displayed above the input */\n label?: string;\n /** Subtitle displayed next to the label */\n subtitle?: string;\n /** Validation status */\n status?: TextInputStatus;\n /** Input size */\n size?: TextInputSize;\n /** Border radius */\n radius?: TextInputRadius;\n /** Icon rendered to the left of the input */\n leftIcon?: React.ReactNode;\n /** Icon rendered to the right of the input */\n rightIcon?: React.ReactNode;\n /** Helper/error message displayed below the input */\n helperText?: React.ReactNode;\n /** Custom style for the outermost wrapper */\n wrapperStyle?: StyleProp<ViewStyle>;\n /** Custom style for the input container */\n style?: StyleProp<ViewStyle>;\n};\n\nexport const TextInput = forwardRef<RNTextInput, TextInputProps>(function TextInput(\n {\n label,\n subtitle,\n status = \"default\",\n size = \"md\",\n radius = \"xs\",\n leftIcon,\n rightIcon,\n helperText,\n editable = true,\n wrapperStyle,\n style,\n accessibilityLabel,\n ...rest\n },\n ref,\n) {\n const theme = useRehagroTheme();\n const [focused, setFocused] = useState(false);\n\n const isDisabled = editable === false;\n\n const heightMap: Record<TextInputSize, number> = {\n sm: theme.inputHeightSm,\n md: theme.inputHeightMd,\n lg: theme.inputHeightLg,\n };\n\n const paddingMap: Record<TextInputSize, number> = {\n sm: 12,\n md: 14,\n lg: 16,\n };\n\n const fontSizeMap: Record<TextInputSize, number> = {\n sm: 14,\n md: 14,\n lg: 16,\n };\n\n const radiusMap: Record<TextInputRadius, number> = {\n none: 0,\n xxs: theme.radiusXxs,\n xs: theme.radiusXs,\n sm: theme.radiusSm,\n md: theme.radiusMd,\n lg: theme.radiusLg,\n xl: theme.radiusXl,\n full: 9999,\n };\n\n const hasError = status === \"error\" || !!helperText;\n\n const borderColor = hasError\n ? theme.danger\n : focused\n ? theme.primary\n : theme.border;\n\n const containerStyle: ViewStyle = {\n height: heightMap[size],\n paddingHorizontal: paddingMap[size],\n borderRadius: radiusMap[radius],\n borderWidth: theme.borderWidthSm,\n borderColor,\n backgroundColor: isDisabled ? theme.background : theme.surface,\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: 8,\n opacity: isDisabled ? 0.5 : 1,\n };\n\n const inputId = accessibilityLabel ?? label;\n\n return (\n <View style={[{ gap: 4 }, wrapperStyle]}>\n {/* Label + Subtitle */}\n {label && (\n <View style={{ flexDirection: \"row\", alignItems: \"baseline\", gap: 4 }}>\n <Text style={{ fontSize: 14, fontWeight: \"500\", color: theme.text }}>\n {label}\n </Text>\n {subtitle && (\n <Text style={{ fontSize: 14, color: theme.textMuted }}>{subtitle}</Text>\n )}\n </View>\n )}\n\n {/* Input container */}\n <View style={[containerStyle, style]}>\n {leftIcon && (\n <View accessibilityElementsHidden style={{ width: fontSizeMap[size], height: fontSizeMap[size] }}>\n {leftIcon}\n </View>\n )}\n\n <RNTextInput\n ref={ref}\n editable={editable}\n accessibilityLabel={inputId}\n accessibilityState={{ disabled: isDisabled }}\n aria-invalid={status === \"error\"}\n onFocus={(e) => {\n setFocused(true);\n rest.onFocus?.(e);\n }}\n onBlur={(e) => {\n setFocused(false);\n rest.onBlur?.(e);\n }}\n style={{\n flex: 1,\n fontSize: fontSizeMap[size],\n color: theme.text,\n }}\n placeholderTextColor={theme.textMuted}\n {...rest}\n />\n\n {rightIcon && (\n <View accessibilityElementsHidden style={{ width: fontSizeMap[size], height: fontSizeMap[size] }}>\n {rightIcon}\n </View>\n )}\n </View>\n\n {/* Helper text */}\n {helperText && (\n <Text\n style={{\n fontSize: 12,\n color: hasError ? theme.danger : theme.textMuted,\n }}\n >\n {helperText}\n </Text>\n )}\n </View>\n );\n});\n","import React, { forwardRef, useCallback, useState } from \"react\";\nimport {\n Pressable,\n Text,\n View,\n type PressableProps,\n type StyleProp,\n type ViewStyle,\n} from \"react-native\";\nimport { useRehagroTheme } from \"../../provider/RehagroNativeContext\";\n\nexport type CheckboxSize = \"sm\" | \"md\" | \"lg\";\n\nexport type CheckboxProps = Omit<PressableProps, \"style\" | \"onPress\"> & {\n /** Checkbox size */\n size?: CheckboxSize;\n /** Label text displayed next to the checkbox */\n label?: string;\n /** Controlled checked state */\n checked?: boolean;\n /** Default checked state (uncontrolled) */\n defaultChecked?: boolean;\n /** Indeterminate state (partially checked) */\n indeterminate?: boolean;\n /** Callback fired when the value changes */\n onChange?: (checked: boolean) => void;\n /** Custom style for the outer wrapper */\n style?: StyleProp<ViewStyle>;\n};\n\nconst CheckIcon = ({ size, color }: { size: number; color: string }) => (\n <View\n style={{\n width: size,\n height: size,\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n {/* Simple checkmark drawn with two Views rotated — no SVG dep needed */}\n <View\n style={{\n position: \"absolute\",\n width: size * 0.55,\n height: size * 0.3,\n borderLeftWidth: 2,\n borderBottomWidth: 2,\n borderColor: color,\n transform: [{ rotate: \"-45deg\" }, { translateY: -size * 0.05 }],\n }}\n />\n </View>\n);\n\nconst MinusIcon = ({ size, color }: { size: number; color: string }) => (\n <View\n style={{\n width: size * 0.7,\n height: 2,\n backgroundColor: color,\n }}\n />\n);\n\nexport const Checkbox = forwardRef<View, CheckboxProps>(function Checkbox(\n {\n size = \"md\",\n label,\n checked: controlledChecked,\n defaultChecked = false,\n indeterminate = false,\n disabled,\n onChange,\n style,\n accessibilityLabel,\n ...rest\n },\n ref,\n) {\n const theme = useRehagroTheme();\n const isControlled = controlledChecked !== undefined;\n const [internalChecked, setInternalChecked] = useState(defaultChecked);\n\n const isChecked = isControlled ? controlledChecked : internalChecked;\n const isActive = isChecked || indeterminate;\n\n const handlePress = useCallback(() => {\n if (disabled) return;\n const next = !isChecked;\n if (!isControlled) setInternalChecked(next);\n onChange?.(next);\n }, [disabled, isChecked, isControlled, onChange]);\n\n const boxSizeMap: Record<CheckboxSize, number> = {\n sm: 16,\n md: 20,\n lg: 24,\n };\n\n const iconSizeMap: Record<CheckboxSize, number> = {\n sm: 10,\n md: 12,\n lg: 14,\n };\n\n const fontSizeMap: Record<CheckboxSize, number> = {\n sm: 14,\n md: 14,\n lg: 16,\n };\n\n const boxSize = boxSizeMap[size];\n const iconSize = iconSizeMap[size];\n\n const boxStyle: ViewStyle = {\n width: boxSize,\n height: boxSize,\n borderRadius: theme.radiusXxs,\n borderWidth: theme.borderWidthSm,\n borderColor: isActive ? theme.primary : theme.border,\n backgroundColor: isActive ? theme.primary : theme.surface,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n\n return (\n <Pressable\n ref={ref}\n onPress={handlePress}\n disabled={disabled}\n accessibilityRole=\"checkbox\"\n accessibilityState={{ checked: indeterminate ? \"mixed\" : isChecked, disabled: !!disabled }}\n accessibilityLabel={accessibilityLabel ?? label}\n style={[\n { flexDirection: \"row\", alignItems: \"center\", gap: 8, opacity: disabled ? 0.5 : 1 },\n style,\n ]}\n {...rest}\n >\n <View style={boxStyle}>\n {indeterminate ? (\n <MinusIcon size={iconSize} color={theme.surface} />\n ) : isChecked ? (\n <CheckIcon size={iconSize} color={theme.surface} />\n ) : null}\n </View>\n\n {label && (\n <Text\n style={{\n fontSize: fontSizeMap[size],\n color: theme.text,\n ...(theme.fontFamilyBody ? { fontFamily: theme.fontFamilyBody } : {}),\n }}\n >\n {label}\n </Text>\n )}\n </Pressable>\n );\n});\n","import React, { forwardRef, useState, useMemo } from \"react\";\nimport { Image, Text, View, type StyleProp, type ViewStyle, type ViewProps } from \"react-native\";\nimport { useRehagroTheme } from \"../../provider/RehagroNativeContext\";\n\nexport type AvatarSize = \"sm\" | \"md\" | \"lg\" | \"xl\";\nexport type AvatarVariant = \"circle\" | \"square\";\n\n// Paleta de cores para avatares\nconst AVATAR_COLORS = [\n { bg: \"#FBF1E6\", text: \"#D6822D\" }, // Laranja\n { bg: \"#EDF3FA\", text: \"#538CC6\" }, // Azul\n { bg: \"#F3E5F5\", text: \"#9C27B0\" }, // Roxo\n { bg: \"#E8F5E9\", text: \"#4CAF50\" }, // Verde\n { bg: \"#FFF3E0\", text: \"#FF9800\" }, // Amarelo\n { bg: \"#FFEBEE\", text: \"#F44336\" }, // Vermelho\n { bg: \"#E3F2FD\", text: \"#2196F3\" }, // Azul claro\n { bg: \"#F3E5F5\", text: \"#673AB7\" }, // Violeta\n { bg: \"#E0F2F1\", text: \"#009688\" }, // Teal\n { bg: \"#FBE9E7\", text: \"#FF5722\" }, // Deep Orange\n];\n\n/**\n * Gera cores de avatar baseadas em uma string (nome)\n * Usa hash simples para garantir consistência\n */\nfunction getAvatarColors(name: string): { bg: string; text: string } {\n const hash = name.split(\"\").reduce((acc, char) => acc + char.charCodeAt(0), 0);\n const index = hash % AVATAR_COLORS.length;\n return AVATAR_COLORS[index];\n}\n\nexport type AvatarProps = Omit<ViewProps, \"style\"> & {\n /** Image source URL */\n src?: string;\n /** Alt text (used as accessibility label and initials fallback) */\n alt?: string;\n /** Fallback initials shown when image is unavailable */\n initials?: string;\n /** Avatar size */\n size?: AvatarSize;\n /** Shape variant */\n variant?: AvatarVariant;\n /** Generate background and text color automatically based on name/alt */\n colorFromName?: boolean;\n /** Custom style for the outer wrapper */\n style?: StyleProp<ViewStyle>;\n};\n\nexport const Avatar = forwardRef<View, AvatarProps>(function Avatar(\n { src, alt = \"\", initials, size = \"md\", variant = \"circle\", colorFromName = false, style, ...rest },\n ref,\n) {\n const theme = useRehagroTheme();\n const [imgError, setImgError] = useState(false);\n const showImage = !!src && !imgError;\n\n // Gera cores baseadas no nome se colorFromName estiver ativo\n const avatarColors = useMemo(() => {\n if (!colorFromName) return null;\n const name = initials || alt || \"\";\n return name ? getAvatarColors(name) : null;\n }, [colorFromName, initials, alt]);\n\n const fallbackLabel = initials\n ? initials.slice(0, 2).toUpperCase()\n : alt\n ? alt\n .split(\" \")\n .slice(0, 2)\n .map((w) => w[0])\n .join(\"\")\n .toUpperCase()\n : \"?\";\n\n const sizePxMap: Record<AvatarSize, number> = {\n sm: 32,\n md: 40,\n lg: 48,\n xl: 64,\n };\n\n const fontSizeMap: Record<AvatarSize, number> = {\n sm: 12,\n md: 14,\n lg: 18,\n xl: 20,\n };\n\n const boxSize = sizePxMap[size];\n const borderRadius = variant === \"circle\" ? boxSize / 2 : theme.radiusSm;\n\n const containerStyle: ViewStyle = {\n width: boxSize,\n height: boxSize,\n borderRadius,\n backgroundColor: avatarColors?.bg ?? theme.primary,\n alignItems: \"center\",\n justifyContent: \"center\",\n overflow: \"hidden\",\n };\n\n return (\n <View\n ref={ref}\n accessible\n accessibilityRole=\"image\"\n accessibilityLabel={alt || initials || fallbackLabel}\n style={[containerStyle, style]}\n {...rest}\n >\n {showImage ? (\n <Image\n source={{ uri: src }}\n style={{ width: boxSize, height: boxSize, borderRadius }}\n onError={() => setImgError(true)}\n accessibilityLabel={alt}\n />\n ) : (\n <Text\n style={{\n fontSize: fontSizeMap[size],\n fontWeight: \"500\",\n color: avatarColors?.text ?? theme.surface,\n }}\n accessibilityElementsHidden\n >\n {fallbackLabel}\n </Text>\n )}\n </View>\n );\n});\n","import React, { forwardRef } from \"react\";\nimport {\n ActivityIndicator as RNActivityIndicator,\n View,\n type StyleProp,\n type ViewStyle,\n type ViewProps,\n} from \"react-native\";\nimport { useRehagroTheme } from \"../../provider/RehagroNativeContext\";\n\nexport type ActivityIndicatorSize = \"sm\" | \"md\" | \"lg\";\nexport type ActivityIndicatorColor = \"primary\" | \"surface\" | \"custom\";\n\nexport type ActivityIndicatorProps = Omit<ViewProps, \"style\"> & {\n /** Spinner size */\n size?: ActivityIndicatorSize;\n /** Color preset — use \"custom\" to provide a raw color via `color` prop */\n colorVariant?: ActivityIndicatorColor;\n /** Raw color value (used when colorVariant is \"custom\") */\n color?: string;\n /** Whether the indicator is visible */\n animating?: boolean;\n /** Custom style for the outer wrapper */\n style?: StyleProp<ViewStyle>;\n};\n\nconst sizeMap: Record<ActivityIndicatorSize, number | \"small\" | \"large\"> = {\n sm: \"small\",\n md: \"large\",\n lg: 48,\n};\n\nexport const ActivityIndicator = forwardRef<View, ActivityIndicatorProps>(\n function ActivityIndicator(\n {\n size = \"md\",\n colorVariant = \"primary\",\n color,\n animating = true,\n style,\n accessibilityLabel = \"Carregando\",\n ...rest\n },\n ref,\n ) {\n const theme = useRehagroTheme();\n\n const resolvedColor =\n colorVariant === \"custom\" && color\n ? color\n : colorVariant === \"surface\"\n ? theme.surface\n : theme.primary;\n\n const spinnerSize = sizeMap[size];\n\n return (\n <View\n ref={ref}\n accessible\n accessibilityRole=\"progressbar\"\n accessibilityLabel={accessibilityLabel}\n accessibilityState={{ busy: animating }}\n style={style}\n {...rest}\n >\n <RNActivityIndicator\n animating={animating}\n size={spinnerSize as \"small\" | \"large\"}\n color={resolvedColor}\n />\n </View>\n );\n },\n);\n","import React, { forwardRef } from \"react\";\nimport {\n Text as RNText,\n type TextProps as RNTextProps,\n type StyleProp,\n type TextStyle,\n} from \"react-native\";\nimport { useRehagroTheme } from \"../../provider/RehagroNativeContext\";\n\nexport type TextVariant =\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"body\"\n | \"bodyLg\"\n | \"caption\"\n | \"label\";\n\nexport type TextColor = \"default\" | \"muted\" | \"primary\" | \"danger\" | \"success\" | \"warning\";\n\nexport type TextProps = Omit<RNTextProps, \"style\"> & {\n /** Typographic variant */\n variant?: TextVariant;\n /** Color preset */\n color?: TextColor;\n /** Bold weight */\n bold?: boolean;\n /** Custom style */\n style?: StyleProp<TextStyle>;\n};\n\nconst variantStyles: Record<TextVariant, TextStyle> = {\n h1: { fontSize: 32, lineHeight: 40, fontWeight: \"700\" },\n h2: { fontSize: 24, lineHeight: 32, fontWeight: \"700\" },\n h3: { fontSize: 20, lineHeight: 28, fontWeight: \"600\" },\n h4: { fontSize: 18, lineHeight: 26, fontWeight: \"600\" },\n bodyLg: { fontSize: 16, lineHeight: 24, fontWeight: \"400\" },\n body: { fontSize: 14, lineHeight: 20, fontWeight: \"400\" },\n label: { fontSize: 14, lineHeight: 20, fontWeight: \"500\" },\n caption: { fontSize: 12, lineHeight: 16, fontWeight: \"400\" },\n};\n\nexport const Text = forwardRef<RNText, TextProps>(function Text(\n { variant = \"body\", color = \"default\", bold = false, style, children, ...rest },\n ref,\n) {\n const theme = useRehagroTheme();\n\n const colorMap: Record<TextColor, string> = {\n default: theme.text,\n muted: theme.textMuted,\n primary: theme.primary,\n danger: theme.danger,\n success: theme.success,\n warning: theme.warning,\n };\n\n const isDisplayVariant = variant === \"h1\" || variant === \"h2\" || variant === \"h3\" || variant === \"h4\";\n const fontFamily = isDisplayVariant ? theme.fontFamilyDisplay : theme.fontFamilyBody;\n\n const resolvedStyle: TextStyle = {\n ...variantStyles[variant],\n color: colorMap[color],\n ...(fontFamily ? { fontFamily } : {}),\n ...(bold ? { fontWeight: \"700\" } : {}),\n };\n\n return (\n <RNText ref={ref} style={[resolvedStyle, style]} {...rest}>\n {children}\n </RNText>\n );\n});\n","import React, { forwardRef } from \"react\";\nimport {\n Pressable,\n Text,\n View,\n type PressableProps,\n type StyleProp,\n type TextStyle,\n type ViewStyle,\n} from \"react-native\";\nimport { useRehagroTheme } from \"../../provider/RehagroNativeContext\";\nimport type { PresetColor } from \"../../types/colors.types\";\n\nexport type TagColor = PresetColor | (string & {});\nexport type TagSize = \"sm\" | \"md\" | \"lg\";\n\nexport type TagProps = Omit<PressableProps, \"style\"> & {\n /** Tag color — preset name or any CSS color (e.g., \"#c3c3c3\", \"red\") */\n color?: TagColor;\n /** Tag size */\n size?: TagSize;\n /** Active (selected) state */\n active?: boolean;\n /** Disabled state */\n disabled?: boolean;\n /** Tag label text */\n title: string;\n /** Optional icon rendered on the left side */\n leftIcon?: React.ReactNode;\n /** Optional icon rendered on the right side */\n rightIcon?: React.ReactNode;\n /** Custom style for the outer container */\n style?: StyleProp<ViewStyle>;\n};\n\nconst PRESET_COLORS = new Set<string>([\n \"primary\",\n \"secondary\",\n \"danger\",\n \"warning\",\n \"success\",\n \"info\",\n]);\n\nconst isPresetColor = (c: string): c is PresetColor => PRESET_COLORS.has(c);\n\n/** Appends a two-digit hex alpha to a 6-digit hex color string. */\nfunction hexAlpha(hex: string, alpha: string): string {\n return `${hex}${alpha}`;\n}\n\nexport const Tag = forwardRef<View, TagProps>(function Tag(\n {\n color = \"primary\",\n size = \"md\",\n active = false,\n disabled = false,\n title,\n leftIcon,\n rightIcon,\n style,\n accessibilityLabel,\n ...rest\n },\n ref,\n) {\n const theme = useRehagroTheme();\n const clickable = !!rest.onPress && !disabled;\n\n const presetTokens: Record<PresetColor, { main: string; hover: string }> = {\n primary: { main: theme.primary, hover: theme.primaryHover },\n secondary: { main: theme.secondary, hover: theme.secondaryHover },\n danger: { main: theme.danger, hover: theme.dangerHover },\n warning: { main: theme.warning, hover: theme.warning },\n success: { main: theme.success, hover: theme.success },\n info: { main: theme.info, hover: theme.infoHover },\n };\n\n const preset = isPresetColor(color);\n const mainColor = preset ? presetTokens[color as PresetColor].main : color;\n const hoverColor = preset ? presetTokens[color as PresetColor].hover : color;\n\n const sizeStyleMap: Record<TagSize, ViewStyle> = {\n sm: { paddingHorizontal: 8, paddingVertical: 2, gap: 4 },\n md: { paddingHorizontal: 10, paddingVertical: 4, gap: 6 },\n lg: { paddingHorizontal: 12, paddingVertical: 6, gap: 6 },\n };\n\n const fontSizeMap: Record<TagSize, number> = {\n sm: 11,\n md: 12,\n lg: 13,\n };\n\n const baseStyle: ViewStyle = {\n flexDirection: \"row\",\n alignItems: \"center\",\n alignSelf: \"flex-start\",\n borderRadius: 9999,\n borderWidth: 1,\n opacity: disabled ? 0.5 : 1,\n ...sizeStyleMap[size],\n };\n\n function containerStyle(pressed: boolean): ViewStyle {\n const resolvedColor = pressed && clickable ? hoverColor : mainColor;\n\n if (active) {\n return {\n backgroundColor: resolvedColor,\n borderColor: resolvedColor,\n };\n }\n\n // inactive\n const bg = pressed && clickable\n ? hexAlpha(mainColor, \"33\") // ~20% on press\n : hexAlpha(mainColor, \"1a\"); // ~10% resting\n const border = hexAlpha(mainColor, \"4d\"); // ~30%\n\n return { backgroundColor: bg, borderColor: border };\n }\n\n function resolvedTextColor(pressed: boolean): string {\n if (active) return theme.surface;\n return pressed && clickable ? hoverColor : mainColor;\n }\n\n const textStyle = (pressed: boolean): TextStyle => ({\n color: resolvedTextColor(pressed),\n fontSize: fontSizeMap[size],\n fontWeight: \"500\",\n });\n\n if (!clickable) {\n return (\n <View\n ref={ref}\n accessibilityRole=\"text\"\n accessibilityLabel={accessibilityLabel ?? title}\n accessibilityState={{ disabled }}\n style={[baseStyle, containerStyle(false), style]}\n >\n {leftIcon && <View accessibilityElementsHidden>{leftIcon}</View>}\n <Text style={textStyle(false)}>{title}</Text>\n {rightIcon && <View accessibilityElementsHidden>{rightIcon}</View>}\n </View>\n );\n }\n\n return (\n <Pressable\n ref={ref}\n disabled={disabled}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled, selected: active }}\n accessibilityLabel={accessibilityLabel ?? title}\n style={({ pressed }) => [baseStyle, containerStyle(pressed), style]}\n {...rest}\n >\n {({ pressed }) => (\n <>\n {leftIcon && <View accessibilityElementsHidden>{leftIcon}</View>}\n <Text style={textStyle(pressed)}>{title}</Text>\n {rightIcon && <View accessibilityElementsHidden>{rightIcon}</View>}\n </>\n )}\n </Pressable>\n );\n});\n","import React, { forwardRef } from \"react\";\nimport {\n Pressable,\n View,\n type PressableProps,\n type StyleProp,\n type ViewStyle,\n} from \"react-native\";\nimport { useRehagroTheme } from \"../../provider/RehagroNativeContext\";\n\nexport type CardVariant = \"elevated\" | \"outlined\" | \"filled\";\nexport type CardRadius = \"none\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\nexport type CardPadding = \"none\" | \"sm\" | \"md\" | \"lg\";\n\nexport type CardProps = Omit<PressableProps, \"style\"> & {\n /** Visual style variant */\n variant?: CardVariant;\n /** Border radius */\n radius?: CardRadius;\n /** Internal padding */\n padding?: CardPadding;\n /** Makes the card clickable with press effects */\n clickable?: boolean;\n /** Disabled state (only applies when clickable) */\n disabled?: boolean;\n /** Children content */\n children?: React.ReactNode;\n /** Custom style */\n style?: StyleProp<ViewStyle>;\n};\n\nconst radiusMap: Record<CardRadius, number> = {\n none: 0,\n xs: 2,\n sm: 4,\n md: 8,\n lg: 12,\n xl: 16,\n};\n\nconst paddingMap: Record<CardPadding, number> = {\n none: 0,\n sm: 12,\n md: 16,\n lg: 24,\n};\n\nexport const Card = forwardRef<View, CardProps>(function Card(\n {\n variant = \"outlined\",\n radius = \"sm\",\n padding = \"md\",\n clickable = false,\n disabled = false,\n children,\n style,\n ...rest\n },\n ref,\n) {\n const theme = useRehagroTheme();\n\n const baseStyle: ViewStyle = {\n borderRadius: radiusMap[radius],\n padding: paddingMap[padding],\n opacity: disabled ? 0.5 : 1,\n };\n\n const variantStyles: Record<CardVariant, ViewStyle> = {\n elevated: {\n backgroundColor: theme.surface,\n shadowColor: \"#000\",\n shadowOffset: { width: 0, height: 2 },\n shadowOpacity: 0.1,\n shadowRadius: 8,\n elevation: 4,\n },\n outlined: {\n backgroundColor: theme.surface,\n borderWidth: 1,\n borderColor: theme.border,\n },\n filled: {\n backgroundColor: theme.background,\n },\n };\n\n const containerStyle = (pressed: boolean): ViewStyle[] => {\n const styles: ViewStyle[] = [baseStyle, variantStyles[variant]];\n\n if (clickable && pressed) {\n styles.push({\n opacity: 0.8,\n transform: [{ scale: 0.99 }],\n });\n }\n\n return styles;\n };\n\n if (!clickable) {\n return (\n <View\n ref={ref}\n style={[baseStyle, variantStyles[variant], style]}\n accessibilityRole=\"none\"\n >\n {children}\n </View>\n );\n }\n\n return (\n <Pressable\n ref={ref}\n disabled={disabled}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled }}\n style={({ pressed }) => [containerStyle(pressed), style]}\n {...rest}\n >\n {children}\n </Pressable>\n );\n});\n\nexport type CardHeaderProps = {\n children?: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n};\n\nexport const CardHeader = forwardRef<View, CardHeaderProps>(function CardHeader(\n { children, style },\n ref,\n) {\n return (\n <View\n ref={ref}\n style={[\n {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n gap: 16,\n },\n style,\n ]}\n >\n {children}\n </View>\n );\n});\n\nexport type CardContentProps = {\n children?: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n};\n\nexport const CardContent = forwardRef<View, CardContentProps>(function CardContent(\n { children, style },\n ref,\n) {\n return (\n <View ref={ref} style={[{ marginTop: 8 }, style]}>\n {children}\n </View>\n );\n});\n\nexport type CardFooterProps = {\n children?: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n};\n\nexport const CardFooter = forwardRef<View, CardFooterProps>(function CardFooter(\n { children, style },\n ref,\n) {\n const theme = useRehagroTheme();\n\n return (\n <View\n ref={ref}\n style={[\n {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n gap: 8,\n marginTop: 16,\n paddingTop: 16,\n borderTopWidth: 1,\n borderTopColor: theme.border,\n },\n style,\n ]}\n >\n {children}\n </View>\n );\n});\n"]}
|
package/dist/native.mjs
CHANGED
|
@@ -32,7 +32,9 @@ var DEFAULT_NATIVE_THEME = {
|
|
|
32
32
|
borderWidthLg: 3,
|
|
33
33
|
inputHeightSm: 36,
|
|
34
34
|
inputHeightMd: 44,
|
|
35
|
-
inputHeightLg: 52
|
|
35
|
+
inputHeightLg: 52,
|
|
36
|
+
fontFamilyBody: "",
|
|
37
|
+
fontFamilyDisplay: ""
|
|
36
38
|
};
|
|
37
39
|
|
|
38
40
|
// src/provider/RehagroNativeContext.ts
|
|
@@ -67,6 +69,7 @@ var Button = forwardRef(function Button2({
|
|
|
67
69
|
rightIcon,
|
|
68
70
|
children,
|
|
69
71
|
style,
|
|
72
|
+
labelStyle,
|
|
70
73
|
accessibilityLabel,
|
|
71
74
|
...rest
|
|
72
75
|
}, ref) {
|
|
@@ -163,7 +166,7 @@ var Button = forwardRef(function Button2({
|
|
|
163
166
|
typeof children === "string" ? /* @__PURE__ */ jsx(
|
|
164
167
|
Text,
|
|
165
168
|
{
|
|
166
|
-
style: { color: textColor(pressed), fontSize: fontSizeMap[size], fontWeight: "500" },
|
|
169
|
+
style: [{ color: textColor(pressed), fontSize: fontSizeMap[size], fontWeight: "500", ...theme.fontFamilyDisplay ? { fontFamily: theme.fontFamilyDisplay } : {} }, labelStyle],
|
|
167
170
|
children
|
|
168
171
|
}
|
|
169
172
|
) : children,
|
|
@@ -457,11 +460,24 @@ var Checkbox = forwardRef(function Checkbox2({
|
|
|
457
460
|
accessibilityRole: "checkbox",
|
|
458
461
|
accessibilityState: { checked: indeterminate ? "mixed" : isChecked, disabled: !!disabled },
|
|
459
462
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
460
|
-
style: [
|
|
463
|
+
style: [
|
|
464
|
+
{ flexDirection: "row", alignItems: "center", gap: 8, opacity: disabled ? 0.5 : 1 },
|
|
465
|
+
style
|
|
466
|
+
],
|
|
461
467
|
...rest,
|
|
462
468
|
children: [
|
|
463
469
|
/* @__PURE__ */ jsx(View, { style: boxStyle, children: indeterminate ? /* @__PURE__ */ jsx(MinusIcon, { size: iconSize, color: theme.surface }) : isChecked ? /* @__PURE__ */ jsx(CheckIcon, { size: iconSize, color: theme.surface }) : null }),
|
|
464
|
-
label && /* @__PURE__ */ jsx(
|
|
470
|
+
label && /* @__PURE__ */ jsx(
|
|
471
|
+
Text,
|
|
472
|
+
{
|
|
473
|
+
style: {
|
|
474
|
+
fontSize: fontSizeMap[size],
|
|
475
|
+
color: theme.text,
|
|
476
|
+
...theme.fontFamilyBody ? { fontFamily: theme.fontFamilyBody } : {}
|
|
477
|
+
},
|
|
478
|
+
children: label
|
|
479
|
+
}
|
|
480
|
+
)
|
|
465
481
|
]
|
|
466
482
|
}
|
|
467
483
|
);
|
|
@@ -618,9 +634,12 @@ var Text5 = forwardRef(function Text6({ variant = "body", color = "default", bol
|
|
|
618
634
|
success: theme.success,
|
|
619
635
|
warning: theme.warning
|
|
620
636
|
};
|
|
637
|
+
const isDisplayVariant = variant === "h1" || variant === "h2" || variant === "h3" || variant === "h4";
|
|
638
|
+
const fontFamily = isDisplayVariant ? theme.fontFamilyDisplay : theme.fontFamilyBody;
|
|
621
639
|
const resolvedStyle = {
|
|
622
640
|
...variantStyles[variant],
|
|
623
641
|
color: colorMap[color],
|
|
642
|
+
...fontFamily ? { fontFamily } : {},
|
|
624
643
|
...bold ? { fontWeight: "700" } : {}
|
|
625
644
|
};
|
|
626
645
|
return /* @__PURE__ */ jsx(Text, { ref, style: [resolvedStyle, style], ...rest, children });
|