rn-feav-ui 1.0.5 → 1.0.6

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.
@@ -1,8 +1,15 @@
1
1
  import * as React from "react";
2
- import { StyleProp, ViewStyle } from "react-native";
2
+ import { StyleProp, TextStyle, ViewStyle } from "react-native";
3
3
  type BadgeProps = {
4
4
  label: string;
5
+ /** Optional leading icon or dot. */
6
+ leftIcon?: React.ReactNode;
5
7
  style?: StyleProp<ViewStyle>;
8
+ textStyle?: StyleProp<TextStyle>;
9
+ testID?: string;
10
+ accessibilityLabel?: string;
11
+ /** If set, badge is tappable. */
12
+ onPress?: () => void;
6
13
  };
7
- export declare const BadgeFEA: ({ label, style }: BadgeProps) => React.JSX.Element;
14
+ export declare const BadgeFEA: ({ label, leftIcon, style, textStyle, testID, accessibilityLabel, onPress, }: BadgeProps) => React.JSX.Element;
8
15
  export {};
@@ -38,23 +38,38 @@ var ThemeFEAVUiProvider_1 = require("../../theme/ThemeFEAVUiProvider");
38
38
  var React = __importStar(require("react"));
39
39
  var react_native_1 = require("react-native");
40
40
  var BadgeFEA = function (_a) {
41
- var label = _a.label, _b = _a.style, style = _b === void 0 ? {} : _b;
41
+ var label = _a.label, leftIcon = _a.leftIcon, _b = _a.style, style = _b === void 0 ? {} : _b, textStyle = _a.textStyle, testID = _a.testID, accessibilityLabel = _a.accessibilityLabel, onPress = _a.onPress;
42
42
  var theme = (0, ThemeFEAVUiProvider_1.useTheme)().theme;
43
- return (React.createElement(react_native_1.View, { style: [
44
- styles.badge,
45
- {
46
- backgroundColor: theme.colors.secondary,
47
- borderColor: theme.colors.border,
48
- },
49
- style,
50
- ] },
43
+ var body = (React.createElement(React.Fragment, null,
44
+ leftIcon,
51
45
  React.createElement(react_native_1.Text, { style: [
52
46
  styles.label,
53
47
  { color: theme.colors.secondaryForeground },
48
+ textStyle,
54
49
  ] }, label)));
50
+ var shellStyle = [
51
+ styles.badge,
52
+ {
53
+ backgroundColor: theme.colors.secondary,
54
+ borderColor: theme.colors.border,
55
+ },
56
+ style,
57
+ ];
58
+ if (onPress) {
59
+ return (React.createElement(react_native_1.Pressable, { testID: testID, accessibilityLabel: accessibilityLabel !== null && accessibilityLabel !== void 0 ? accessibilityLabel : label, accessibilityRole: "button", onPress: onPress, style: function (_a) {
60
+ var pressed = _a.pressed;
61
+ return [shellStyle, styles.row, pressed && { opacity: 0.85 }];
62
+ } }, body));
63
+ }
64
+ return (React.createElement(react_native_1.View, { testID: testID, accessibilityLabel: accessibilityLabel !== null && accessibilityLabel !== void 0 ? accessibilityLabel : label, style: [shellStyle, styles.row] }, body));
55
65
  };
56
66
  exports.BadgeFEA = BadgeFEA;
57
67
  var styles = react_native_1.StyleSheet.create({
68
+ row: {
69
+ flexDirection: "row",
70
+ alignItems: "center",
71
+ gap: 6,
72
+ },
58
73
  badge: {
59
74
  paddingHorizontal: 10,
60
75
  paddingVertical: 4,
@@ -1,14 +1,21 @@
1
1
  import * as React from "react";
2
- import { StyleProp, ViewStyle } from "react-native";
2
+ import { StyleProp, TextStyle, TouchableOpacityProps, ViewStyle } from "react-native";
3
3
  type ButtonVariant = "primary" | "glass" | "soft" | "outline" | "ghost";
4
4
  type ButtonSize = "default" | "sm" | "lg";
5
+ type TouchablePassthrough = Pick<TouchableOpacityProps, "testID" | "accessibilityLabel" | "accessibilityHint" | "accessibilityRole" | "accessibilityState" | "hitSlop" | "delayLongPress" | "activeOpacity">;
5
6
  type ButtonProps = {
6
7
  title: string;
7
8
  variant?: ButtonVariant;
8
9
  size?: ButtonSize;
9
10
  onPress: () => void;
10
11
  disabled?: boolean;
12
+ loading?: boolean;
13
+ leftIcon?: React.ReactNode;
14
+ rightIcon?: React.ReactNode;
15
+ /** Stretch to parent width (common for forms). */
16
+ fullWidth?: boolean;
11
17
  style?: StyleProp<ViewStyle>;
12
- };
13
- export declare const ButtonFEA: ({ title, variant, size, onPress, disabled, style, }: ButtonProps) => React.JSX.Element;
18
+ textStyle?: StyleProp<TextStyle>;
19
+ } & TouchablePassthrough;
20
+ export declare const ButtonFEA: ({ title, variant, size, onPress, disabled, loading, leftIcon, rightIcon, fullWidth, style, textStyle, testID, accessibilityLabel, accessibilityHint, accessibilityRole, accessibilityState, hitSlop, delayLongPress, activeOpacity, }: ButtonProps) => React.JSX.Element;
14
21
  export {};
@@ -1,4 +1,15 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
14
  if (k2 === undefined) k2 = k;
4
15
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -39,85 +50,95 @@ var ThemeFEAVUiProvider_1 = require("../../theme/ThemeFEAVUiProvider");
39
50
  var react_native_1 = require("react-native");
40
51
  var GlassCard_1 = require("../GlassCard");
41
52
  var ButtonFEA = function (_a) {
42
- var title = _a.title, _b = _a.variant, variant = _b === void 0 ? "primary" : _b, _c = _a.size, size = _c === void 0 ? "default" : _c, onPress = _a.onPress, _d = _a.disabled, disabled = _d === void 0 ? false : _d, style = _a.style;
53
+ var title = _a.title, _b = _a.variant, variant = _b === void 0 ? "primary" : _b, _c = _a.size, size = _c === void 0 ? "default" : _c, onPress = _a.onPress, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.loading, loading = _e === void 0 ? false : _e, leftIcon = _a.leftIcon, rightIcon = _a.rightIcon, _f = _a.fullWidth, fullWidth = _f === void 0 ? false : _f, style = _a.style, textStyle = _a.textStyle, testID = _a.testID, accessibilityLabel = _a.accessibilityLabel, accessibilityHint = _a.accessibilityHint, _g = _a.accessibilityRole, accessibilityRole = _g === void 0 ? "button" : _g, accessibilityState = _a.accessibilityState, hitSlop = _a.hitSlop, delayLongPress = _a.delayLongPress, activeOpacity = _a.activeOpacity;
43
54
  var theme = (0, ThemeFEAVUiProvider_1.useTheme)().theme;
44
55
  var sizeStyle = size === "sm"
45
56
  ? styles.sizeSm
46
57
  : size === "lg"
47
58
  ? styles.sizeLg
48
59
  : styles.sizeDefault;
60
+ var inactive = disabled || loading;
61
+ var touchableProps = {
62
+ testID: testID,
63
+ accessibilityLabel: accessibilityLabel !== null && accessibilityLabel !== void 0 ? accessibilityLabel : title,
64
+ accessibilityHint: accessibilityHint,
65
+ accessibilityRole: accessibilityRole,
66
+ accessibilityState: __assign({ disabled: inactive }, accessibilityState),
67
+ hitSlop: hitSlop,
68
+ delayLongPress: delayLongPress,
69
+ activeOpacity: activeOpacity !== null && activeOpacity !== void 0 ? activeOpacity : (variant === "glass" ? 0.85 : 0.9),
70
+ onPress: onPress,
71
+ disabled: inactive,
72
+ };
73
+ var widthStyle = fullWidth ? { alignSelf: "stretch", width: "100%" } : undefined;
74
+ var renderLabel = function (color, opacity) { return (React.createElement(react_native_1.View, { style: styles.contentRow },
75
+ loading ? (React.createElement(react_native_1.ActivityIndicator, { size: "small", color: color })) : (leftIcon),
76
+ React.createElement(react_native_1.Text, { style: [styles.text, { color: color, opacity: opacity }, textStyle] }, title),
77
+ !loading ? rightIcon : null)); };
49
78
  if (variant === "glass") {
50
- return (React.createElement(GlassCard_1.GlassCardFEA, { style: [styles.glassCard, style] },
51
- React.createElement(react_native_1.TouchableOpacity, { onPress: onPress, activeOpacity: 0.85, style: [styles.baseButton, sizeStyle], disabled: disabled },
52
- React.createElement(react_native_1.Text, { style: [
53
- styles.text,
54
- { color: theme.colors.foreground, opacity: disabled ? 0.5 : 1 },
55
- ] }, title))));
79
+ return (React.createElement(GlassCard_1.GlassCardFEA, { style: [styles.glassCard, widthStyle, style] },
80
+ React.createElement(react_native_1.TouchableOpacity, __assign({}, touchableProps, { style: [styles.baseButton, sizeStyle] }), renderLabel(theme.colors.foreground, inactive ? 0.5 : 1))));
56
81
  }
57
82
  if (variant === "soft") {
58
- return (React.createElement(react_native_1.TouchableOpacity, { onPress: onPress, activeOpacity: 0.9, disabled: disabled, style: [
83
+ return (React.createElement(react_native_1.TouchableOpacity, __assign({}, touchableProps, { style: [
59
84
  styles.baseButton,
60
85
  sizeStyle,
61
86
  styles.softButton,
62
87
  { backgroundColor: theme.colors.secondary, borderColor: theme.colors.border },
63
- disabled && styles.disabled,
88
+ inactive && styles.disabled,
89
+ widthStyle,
64
90
  style,
65
- ] },
66
- React.createElement(react_native_1.Text, { style: [
67
- styles.text,
68
- { color: theme.colors.secondaryForeground, opacity: disabled ? 0.6 : 1 },
69
- ] }, title)));
91
+ ] }), renderLabel(theme.colors.secondaryForeground, inactive ? 0.6 : 1)));
70
92
  }
71
93
  if (variant === "outline") {
72
- return (React.createElement(react_native_1.TouchableOpacity, { onPress: onPress, activeOpacity: 0.9, disabled: disabled, style: [
94
+ return (React.createElement(react_native_1.TouchableOpacity, __assign({}, touchableProps, { style: [
73
95
  styles.baseButton,
74
96
  sizeStyle,
75
97
  styles.outlineButton,
76
98
  {
77
99
  borderColor: theme.colors.border,
78
100
  },
79
- disabled && styles.disabled,
101
+ inactive && styles.disabled,
102
+ widthStyle,
80
103
  style,
81
- ] },
82
- React.createElement(react_native_1.Text, { style: [
83
- styles.text,
84
- {
85
- color: theme.colors.foreground,
86
- opacity: disabled ? 0.6 : 1,
87
- },
88
- ] }, title)));
104
+ ] }), renderLabel(theme.colors.foreground, inactive ? 0.6 : 1)));
89
105
  }
90
106
  if (variant === "ghost") {
91
- return (React.createElement(react_native_1.TouchableOpacity, { onPress: onPress, activeOpacity: 0.9, disabled: disabled, style: [
107
+ return (React.createElement(react_native_1.TouchableOpacity, __assign({}, touchableProps, { style: [
92
108
  styles.baseButton,
93
109
  sizeStyle,
94
110
  styles.ghostButton,
95
- disabled && styles.disabledGhost,
111
+ inactive && styles.disabledGhost,
112
+ widthStyle,
96
113
  style,
97
- ] },
98
- React.createElement(react_native_1.Text, { style: [
99
- styles.text,
100
- {
101
- color: theme.colors.foreground,
102
- opacity: disabled ? 0.5 : 1,
103
- },
104
- ] }, title)));
114
+ ] }), renderLabel(theme.colors.foreground, inactive ? 0.5 : 1)));
105
115
  }
106
- return (React.createElement(react_native_1.TouchableOpacity, { onPress: onPress, activeOpacity: 0.9, disabled: disabled, style: [
116
+ return (React.createElement(react_native_1.TouchableOpacity, __assign({}, touchableProps, { style: [
107
117
  styles.baseButton,
108
118
  sizeStyle,
109
119
  { backgroundColor: theme.colors.primary },
110
- disabled && { opacity: 0.7 },
120
+ inactive && { opacity: 0.7 },
121
+ widthStyle,
111
122
  style,
112
- ] },
113
- React.createElement(react_native_1.Text, { style: [
114
- styles.text,
115
- { color: theme.colors.primaryForeground },
116
- disabled && { opacity: 0.8 },
117
- ] }, title)));
123
+ ] }),
124
+ React.createElement(react_native_1.View, { style: styles.contentRow },
125
+ loading ? (React.createElement(react_native_1.ActivityIndicator, { size: "small", color: theme.colors.primaryForeground })) : (leftIcon),
126
+ React.createElement(react_native_1.Text, { style: [
127
+ styles.text,
128
+ { color: theme.colors.primaryForeground },
129
+ inactive && { opacity: 0.8 },
130
+ textStyle,
131
+ ] }, title),
132
+ !loading ? rightIcon : null)));
118
133
  };
119
134
  exports.ButtonFEA = ButtonFEA;
120
135
  var styles = react_native_1.StyleSheet.create({
136
+ contentRow: {
137
+ flexDirection: "row",
138
+ alignItems: "center",
139
+ justifyContent: "center",
140
+ gap: 8,
141
+ },
121
142
  baseButton: {
122
143
  borderRadius: 999,
123
144
  justifyContent: "center",
@@ -1,8 +1,12 @@
1
1
  import * as React from "react";
2
- import { StyleProp, ViewStyle } from "react-native";
2
+ import { StyleProp, ViewProps, ViewStyle } from "react-native";
3
3
  type CardProps = {
4
4
  children: React.ReactNode;
5
5
  style?: StyleProp<ViewStyle>;
6
- };
7
- export declare const CardFEA: ({ children, style }: CardProps) => React.JSX.Element;
6
+ /** When set, the card is pressable (e.g. list row). */
7
+ onPress?: () => void;
8
+ /** Passed to the root `View` or `Pressable`. */
9
+ testID?: string;
10
+ } & Pick<ViewProps, "accessibilityLabel" | "accessibilityRole" | "accessibilityHint">;
11
+ export declare const CardFEA: ({ children, style, onPress, testID, accessibilityLabel, accessibilityRole, accessibilityHint, }: CardProps) => React.JSX.Element;
8
12
  export {};
@@ -38,16 +38,23 @@ var React = __importStar(require("react"));
38
38
  var react_native_1 = require("react-native");
39
39
  var ThemeFEAVUiProvider_1 = require("../../theme/ThemeFEAVUiProvider");
40
40
  var CardFEA = function (_a) {
41
- var children = _a.children, style = _a.style;
41
+ var children = _a.children, style = _a.style, onPress = _a.onPress, testID = _a.testID, accessibilityLabel = _a.accessibilityLabel, accessibilityRole = _a.accessibilityRole, accessibilityHint = _a.accessibilityHint;
42
42
  var theme = (0, ThemeFEAVUiProvider_1.useTheme)().theme;
43
- return (React.createElement(react_native_1.View, { style: [
44
- styles.card,
45
- {
46
- backgroundColor: theme.colors.card,
47
- borderColor: theme.colors.border,
48
- },
49
- style,
50
- ] }, children));
43
+ var cardStyle = [
44
+ styles.card,
45
+ {
46
+ backgroundColor: theme.colors.card,
47
+ borderColor: theme.colors.border,
48
+ },
49
+ style,
50
+ ];
51
+ if (onPress) {
52
+ return (React.createElement(react_native_1.Pressable, { onPress: onPress, testID: testID, accessibilityLabel: accessibilityLabel, accessibilityRole: accessibilityRole !== null && accessibilityRole !== void 0 ? accessibilityRole : "button", accessibilityHint: accessibilityHint, style: function (_a) {
53
+ var pressed = _a.pressed;
54
+ return [cardStyle, pressed && { opacity: 0.92 }];
55
+ } }, children));
56
+ }
57
+ return (React.createElement(react_native_1.View, { testID: testID, accessibilityLabel: accessibilityLabel, accessibilityRole: accessibilityRole, accessibilityHint: accessibilityHint, style: cardStyle }, children));
51
58
  };
52
59
  exports.CardFEA = CardFEA;
53
60
  var styles = react_native_1.StyleSheet.create({
@@ -1,7 +1,15 @@
1
1
  import * as React from "react";
2
- export declare const CheckboxFEA: ({ checked, onChange, label, disabled, }: {
2
+ import { StyleProp, TextStyle, ViewStyle } from "react-native";
3
+ export declare const CheckboxFEA: ({ checked, onChange, label, disabled, size, style, testID, accessibilityLabel, accessibilityHint, labelStyle, }: {
3
4
  checked: boolean;
4
5
  onChange: (next: boolean) => void;
5
6
  label?: string;
6
7
  disabled?: boolean;
8
+ /** Box width/height in dp. */
9
+ size?: number;
10
+ style?: StyleProp<ViewStyle>;
11
+ testID?: string;
12
+ accessibilityLabel?: string;
13
+ accessibilityHint?: string;
14
+ labelStyle?: StyleProp<TextStyle>;
7
15
  }) => React.JSX.Element;
@@ -38,18 +38,27 @@ var React = __importStar(require("react"));
38
38
  var react_native_1 = require("react-native");
39
39
  var ThemeFEAVUiProvider_1 = require("../../theme/ThemeFEAVUiProvider");
40
40
  var CheckboxFEA = function (_a) {
41
- var checked = _a.checked, onChange = _a.onChange, label = _a.label, _b = _a.disabled, disabled = _b === void 0 ? false : _b;
41
+ var checked = _a.checked, onChange = _a.onChange, label = _a.label, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? 18 : _c, style = _a.style, testID = _a.testID, accessibilityLabel = _a.accessibilityLabel, accessibilityHint = _a.accessibilityHint, labelStyle = _a.labelStyle;
42
42
  var theme = (0, ThemeFEAVUiProvider_1.useTheme)().theme;
43
- return (React.createElement(react_native_1.Pressable, { onPress: function () { return !disabled && onChange(!checked); }, style: styles.row, disabled: disabled },
43
+ return (React.createElement(react_native_1.Pressable, { testID: testID, accessibilityLabel: accessibilityLabel !== null && accessibilityLabel !== void 0 ? accessibilityLabel : label, accessibilityHint: accessibilityHint, accessibilityRole: "checkbox", accessibilityState: { checked: checked, disabled: disabled }, onPress: function () { return !disabled && onChange(!checked); }, style: [styles.row, style], disabled: disabled },
44
44
  React.createElement(react_native_1.View, { style: [
45
45
  styles.box,
46
46
  {
47
+ width: size,
48
+ height: size,
49
+ borderRadius: Math.max(4, size / 5),
47
50
  borderColor: checked ? theme.colors.primary : theme.colors.input,
48
51
  backgroundColor: checked ? theme.colors.primary : "transparent",
49
52
  opacity: disabled ? 0.5 : 1,
50
53
  },
51
- ] }, checked ? React.createElement(react_native_1.Text, { style: styles.tick }, "\u2713") : null),
52
- label ? (React.createElement(react_native_1.Text, { style: { color: theme.colors.foreground, opacity: disabled ? 0.6 : 1 } }, label)) : null));
54
+ ] }, checked ? (React.createElement(react_native_1.Text, { style: [
55
+ styles.tick,
56
+ { fontSize: Math.max(10, size * 0.65), lineHeight: Math.max(12, size * 0.72) },
57
+ ] }, "\u2713")) : null),
58
+ label ? (React.createElement(react_native_1.Text, { style: [
59
+ { color: theme.colors.foreground, opacity: disabled ? 0.6 : 1, flexShrink: 1 },
60
+ labelStyle,
61
+ ] }, label)) : null));
53
62
  };
54
63
  exports.CheckboxFEA = CheckboxFEA;
55
64
  var styles = react_native_1.StyleSheet.create({
@@ -59,17 +68,12 @@ var styles = react_native_1.StyleSheet.create({
59
68
  gap: 8,
60
69
  },
61
70
  box: {
62
- width: 18,
63
- height: 18,
64
- borderRadius: 4,
65
71
  borderWidth: 1.5,
66
72
  alignItems: "center",
67
73
  justifyContent: "center",
68
74
  },
69
75
  tick: {
70
76
  color: "#ffffff",
71
- fontSize: 12,
72
- lineHeight: 13,
73
77
  fontWeight: "700",
74
78
  },
75
79
  });
@@ -1,8 +1,7 @@
1
1
  import * as React from "react";
2
- import { StyleProp, ViewStyle } from "react-native";
3
- type InputProps = {
4
- placeholder: string;
5
- style?: StyleProp<ViewStyle>;
2
+ import { StyleProp, TextInputProps, TextStyle } from "react-native";
3
+ export type InputFEAProps = Omit<TextInputProps, "placeholderTextColor" | "style"> & {
4
+ /** Merged after themed base styles. */
5
+ style?: StyleProp<TextStyle>;
6
6
  };
7
- export declare const InputFEA: ({ placeholder, style }: InputProps) => React.JSX.Element;
8
- export {};
7
+ export declare const InputFEA: ({ style, editable, ...rest }: InputFEAProps) => React.JSX.Element;
@@ -1,4 +1,15 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
14
  if (k2 === undefined) k2 = k;
4
15
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -32,23 +43,35 @@ var __importStar = (this && this.__importStar) || (function () {
32
43
  return result;
33
44
  };
34
45
  })();
46
+ var __rest = (this && this.__rest) || function (s, e) {
47
+ var t = {};
48
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
49
+ t[p] = s[p];
50
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
51
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
52
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
53
+ t[p[i]] = s[p[i]];
54
+ }
55
+ return t;
56
+ };
35
57
  Object.defineProperty(exports, "__esModule", { value: true });
36
58
  exports.InputFEA = void 0;
37
59
  var ThemeFEAVUiProvider_1 = require("../../theme/ThemeFEAVUiProvider");
38
60
  var React = __importStar(require("react"));
39
61
  var react_native_1 = require("react-native");
40
62
  var InputFEA = function (_a) {
41
- var placeholder = _a.placeholder, _b = _a.style, style = _b === void 0 ? {} : _b;
63
+ var style = _a.style, _b = _a.editable, editable = _b === void 0 ? true : _b, rest = __rest(_a, ["style", "editable"]);
42
64
  var theme = (0, ThemeFEAVUiProvider_1.useTheme)().theme;
43
- return (React.createElement(react_native_1.TextInput, { placeholder: placeholder, placeholderTextColor: theme.colors.mutedForeground, style: [
65
+ return (React.createElement(react_native_1.TextInput, __assign({ editable: editable, placeholderTextColor: theme.colors.mutedForeground }, rest, { style: [
44
66
  styles.base,
45
67
  {
46
68
  backgroundColor: theme.colors.background,
47
69
  color: theme.colors.foreground,
48
70
  borderColor: theme.colors.input,
71
+ opacity: editable ? 1 : 0.55,
49
72
  },
50
73
  style,
51
- ] }));
74
+ ] })));
52
75
  };
53
76
  exports.InputFEA = InputFEA;
54
77
  var styles = react_native_1.StyleSheet.create({
@@ -1,6 +1,13 @@
1
1
  import * as React from "react";
2
2
  import { StyleProp, TextStyle } from "react-native";
3
- export declare const LabelFEA: ({ children, style, }: {
3
+ export declare const LabelFEA: ({ children, style, required, disabled, testID, nativeID, numberOfLines, }: {
4
4
  children: React.ReactNode;
5
5
  style?: StyleProp<TextStyle>;
6
+ /** Shows a trailing asterisk when true. */
7
+ required?: boolean;
8
+ disabled?: boolean;
9
+ testID?: string;
10
+ /** Wire to an input via `nativeID` / `accessibilityLabelledBy` patterns. */
11
+ nativeID?: string;
12
+ numberOfLines?: number;
6
13
  }) => React.JSX.Element;
@@ -38,9 +38,15 @@ var React = __importStar(require("react"));
38
38
  var react_native_1 = require("react-native");
39
39
  var ThemeFEAVUiProvider_1 = require("../../theme/ThemeFEAVUiProvider");
40
40
  var LabelFEA = function (_a) {
41
- var children = _a.children, style = _a.style;
41
+ var children = _a.children, style = _a.style, required = _a.required, disabled = _a.disabled, testID = _a.testID, nativeID = _a.nativeID, numberOfLines = _a.numberOfLines;
42
42
  var theme = (0, ThemeFEAVUiProvider_1.useTheme)().theme;
43
- return React.createElement(react_native_1.Text, { style: [styles.base, { color: theme.colors.text }, style] }, children);
43
+ return (React.createElement(react_native_1.Text, { nativeID: nativeID, testID: testID, numberOfLines: numberOfLines, style: [
44
+ styles.base,
45
+ { color: theme.colors.foreground, opacity: disabled ? 0.6 : 1 },
46
+ style,
47
+ ] },
48
+ children,
49
+ required ? React.createElement(react_native_1.Text, { style: { color: theme.colors.destructive } }, " *") : null));
44
50
  };
45
51
  exports.LabelFEA = LabelFEA;
46
52
  var styles = react_native_1.StyleSheet.create({
@@ -1,9 +1,16 @@
1
1
  import * as React from "react";
2
- import { StyleProp, ViewStyle } from "react-native";
3
- export declare const SwitchFEA: ({ value, onValueChange, label, style, disabled, }: {
2
+ import { StyleProp, ViewStyle, ColorValue } from "react-native";
3
+ export declare const SwitchFEA: ({ value, onValueChange, label, labelPosition, style, disabled, testID, accessibilityLabel, thumbColor, ios_backgroundColor, }: {
4
4
  value: boolean;
5
5
  onValueChange: (next: boolean) => void;
6
6
  label?: string;
7
+ /** Label row placement relative to the switch. */
8
+ labelPosition?: "left" | "right";
7
9
  style?: StyleProp<ViewStyle>;
8
10
  disabled?: boolean;
11
+ testID?: string;
12
+ accessibilityLabel?: string;
13
+ /** Overrides default white thumb. */
14
+ thumbColor?: ColorValue;
15
+ ios_backgroundColor?: ColorValue;
9
16
  }) => React.JSX.Element;
@@ -38,10 +38,16 @@ var React = __importStar(require("react"));
38
38
  var react_native_1 = require("react-native");
39
39
  var ThemeFEAVUiProvider_1 = require("../../theme/ThemeFEAVUiProvider");
40
40
  var SwitchFEA = function (_a) {
41
- var value = _a.value, onValueChange = _a.onValueChange, label = _a.label, style = _a.style, _b = _a.disabled, disabled = _b === void 0 ? false : _b;
41
+ var value = _a.value, onValueChange = _a.onValueChange, label = _a.label, _b = _a.labelPosition, labelPosition = _b === void 0 ? "left" : _b, style = _a.style, _c = _a.disabled, disabled = _c === void 0 ? false : _c, testID = _a.testID, accessibilityLabel = _a.accessibilityLabel, thumbColor = _a.thumbColor, ios_backgroundColor = _a.ios_backgroundColor;
42
42
  var theme = (0, ThemeFEAVUiProvider_1.useTheme)().theme;
43
- return (React.createElement(react_native_1.View, { style: [{ flexDirection: "row", alignItems: "center", justifyContent: "space-between" }, style] },
44
- label ? (React.createElement(react_native_1.Text, { style: { color: theme.colors.foreground, opacity: disabled ? 0.6 : 1 } }, label)) : (React.createElement(react_native_1.View, null)),
45
- React.createElement(react_native_1.Switch, { value: value, onValueChange: onValueChange, disabled: disabled, trackColor: { false: theme.colors.input, true: theme.colors.primary }, thumbColor: "#ffffff" })));
43
+ var labelEl = label ? (React.createElement(react_native_1.Text, { style: { color: theme.colors.foreground, opacity: disabled ? 0.6 : 1, flexShrink: 1 } }, label)) : null;
44
+ var track = { false: theme.colors.input, true: theme.colors.primary };
45
+ var sw = (React.createElement(react_native_1.Switch, { testID: testID, accessibilityLabel: accessibilityLabel !== null && accessibilityLabel !== void 0 ? accessibilityLabel : label, value: value, onValueChange: onValueChange, disabled: disabled, trackColor: track, thumbColor: thumbColor !== null && thumbColor !== void 0 ? thumbColor : "#ffffff", ios_backgroundColor: ios_backgroundColor }));
46
+ return (React.createElement(react_native_1.View, { style: [
47
+ { flexDirection: "row", alignItems: "center", justifyContent: "space-between", gap: 12 },
48
+ style,
49
+ ] }, labelPosition === "left" ? (React.createElement(React.Fragment, null, labelEl !== null && labelEl !== void 0 ? labelEl : React.createElement(react_native_1.View, null),
50
+ sw)) : (React.createElement(React.Fragment, null,
51
+ sw, labelEl !== null && labelEl !== void 0 ? labelEl : React.createElement(react_native_1.View, null)))));
46
52
  };
47
53
  exports.SwitchFEA = SwitchFEA;
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
- import { StyleProp, ViewStyle } from "react-native";
3
- export declare const TextareaFEA: ({ placeholder, style, }: {
4
- placeholder?: string;
5
- style?: StyleProp<ViewStyle>;
6
- }) => React.JSX.Element;
2
+ import { StyleProp, TextInputProps, TextStyle } from "react-native";
3
+ export type TextareaFEAProps = Omit<TextInputProps, "placeholderTextColor" | "style" | "multiline"> & {
4
+ style?: StyleProp<TextStyle>;
5
+ };
6
+ export declare const TextareaFEA: ({ style, editable, ...rest }: TextareaFEAProps) => React.JSX.Element;
@@ -1,4 +1,15 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
14
  if (k2 === undefined) k2 = k;
4
15
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -32,23 +43,35 @@ var __importStar = (this && this.__importStar) || (function () {
32
43
  return result;
33
44
  };
34
45
  })();
46
+ var __rest = (this && this.__rest) || function (s, e) {
47
+ var t = {};
48
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
49
+ t[p] = s[p];
50
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
51
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
52
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
53
+ t[p[i]] = s[p[i]];
54
+ }
55
+ return t;
56
+ };
35
57
  Object.defineProperty(exports, "__esModule", { value: true });
36
58
  exports.TextareaFEA = void 0;
37
59
  var React = __importStar(require("react"));
38
60
  var react_native_1 = require("react-native");
39
61
  var ThemeFEAVUiProvider_1 = require("../../theme/ThemeFEAVUiProvider");
40
62
  var TextareaFEA = function (_a) {
41
- var placeholder = _a.placeholder, style = _a.style;
63
+ var style = _a.style, _b = _a.editable, editable = _b === void 0 ? true : _b, rest = __rest(_a, ["style", "editable"]);
42
64
  var theme = (0, ThemeFEAVUiProvider_1.useTheme)().theme;
43
- return (React.createElement(react_native_1.TextInput, { multiline: true, textAlignVertical: "top", placeholder: placeholder, placeholderTextColor: theme.colors.mutedForeground, style: [
65
+ return (React.createElement(react_native_1.TextInput, __assign({ multiline: true, textAlignVertical: "top", editable: editable, placeholderTextColor: theme.colors.mutedForeground }, rest, { style: [
44
66
  styles.base,
45
67
  {
46
68
  backgroundColor: theme.colors.background,
47
69
  color: theme.colors.foreground,
48
70
  borderColor: theme.colors.input,
71
+ opacity: editable ? 1 : 0.55,
49
72
  },
50
73
  style,
51
- ] }));
74
+ ] })));
52
75
  };
53
76
  exports.TextareaFEA = TextareaFEA;
54
77
  var styles = react_native_1.StyleSheet.create({
@@ -1,9 +1,16 @@
1
1
  import * as React from "react";
2
2
  import { StyleProp, TextStyle } from "react-native";
3
3
  type TypographyVariant = "h1" | "h2" | "h3" | "p" | "small" | "muted";
4
- export declare const TypographyFEA: ({ children, variant, style, }: {
4
+ export declare const TypographyFEA: ({ children, variant, style, numberOfLines, ellipsizeMode, selectable, testID, maxFontSizeMultiplier, onPress, accessibilityRole, }: {
5
5
  children: React.ReactNode;
6
6
  variant?: TypographyVariant;
7
7
  style?: StyleProp<TextStyle>;
8
+ numberOfLines?: number;
9
+ ellipsizeMode?: "head" | "middle" | "tail" | "clip";
10
+ selectable?: boolean;
11
+ testID?: string;
12
+ maxFontSizeMultiplier?: number;
13
+ onPress?: () => void;
14
+ accessibilityRole?: "text" | "header" | "link" | "none";
8
15
  }) => React.JSX.Element;
9
16
  export {};
@@ -38,7 +38,7 @@ var React = __importStar(require("react"));
38
38
  var react_native_1 = require("react-native");
39
39
  var ThemeFEAVUiProvider_1 = require("../../theme/ThemeFEAVUiProvider");
40
40
  var TypographyFEA = function (_a) {
41
- var children = _a.children, _b = _a.variant, variant = _b === void 0 ? "p" : _b, style = _a.style;
41
+ var children = _a.children, _b = _a.variant, variant = _b === void 0 ? "p" : _b, style = _a.style, numberOfLines = _a.numberOfLines, ellipsizeMode = _a.ellipsizeMode, selectable = _a.selectable, testID = _a.testID, maxFontSizeMultiplier = _a.maxFontSizeMultiplier, onPress = _a.onPress, accessibilityRole = _a.accessibilityRole;
42
42
  var theme = (0, ThemeFEAVUiProvider_1.useTheme)().theme;
43
43
  var variantStyle = variant === "h1"
44
44
  ? styles.h1
@@ -51,7 +51,7 @@ var TypographyFEA = function (_a) {
51
51
  : variant === "muted"
52
52
  ? styles.muted
53
53
  : styles.p;
54
- return (React.createElement(react_native_1.Text, { style: [
54
+ return (React.createElement(react_native_1.Text, { testID: testID, accessibilityRole: accessibilityRole, numberOfLines: numberOfLines, ellipsizeMode: ellipsizeMode, selectable: selectable, maxFontSizeMultiplier: maxFontSizeMultiplier, onPress: onPress, style: [
55
55
  variantStyle,
56
56
  {
57
57
  color: variant === "muted" ? theme.colors.mutedForeground : theme.colors.foreground,
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from "./components";
2
2
  export * from "./theme/ThemeFEAVUiProvider";
3
+ export { lightTheme, darkTheme } from "./theme/colors";
3
4
  export * from "./examples/Showcase";
package/dist/index.js CHANGED
@@ -14,6 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.darkTheme = exports.lightTheme = void 0;
17
18
  __exportStar(require("./components"), exports);
18
19
  __exportStar(require("./theme/ThemeFEAVUiProvider"), exports);
20
+ var colors_1 = require("./theme/colors");
21
+ Object.defineProperty(exports, "lightTheme", { enumerable: true, get: function () { return colors_1.lightTheme; } });
22
+ Object.defineProperty(exports, "darkTheme", { enumerable: true, get: function () { return colors_1.darkTheme; } });
19
23
  __exportStar(require("./examples/Showcase"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rn-feav-ui",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Shadcn-style React Native UI kit with theme support.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/readme.md CHANGED
@@ -81,3 +81,593 @@ All exports are available directly from `rn-feav-ui`.
81
81
  Full demo screen:
82
82
 
83
83
  - `src/examples/Showcase.tsx`
84
+
85
+ ---
86
+
87
+ ## API Reference
88
+
89
+ ### Theme & hooks
90
+
91
+ | Export | Description |
92
+ | --- | --- |
93
+ | `ThemeFEAVUiProvider` | Wraps the app; provides `theme` and `toggleTheme`. Props: `children: React.ReactNode`. |
94
+ | `useTheme()` | Returns `{ theme, toggleTheme } \| null`. `theme` is `lightTheme \| darkTheme`. |
95
+ | `lightTheme` / `darkTheme` | Exported from the package root for typing or static access: `import { lightTheme, darkTheme } from "rn-feav-ui"`. Prefer `useTheme()` at runtime inside components. |
96
+
97
+ **`theme.colors` (semantic tokens)** include: `background`, `foreground`, `card`, `cardForeground`, `muted`, `mutedForeground`, `border`, `input`, `ring`, `primary`, `primaryForeground`, `secondary`, `secondaryForeground`, `destructive`, `destructiveForeground`, plus aliases `bg`, `text`, `glass`. See `src/theme/colors.ts`.
98
+
99
+ | Export | Description |
100
+ | --- | --- |
101
+ | `SonnerFEA` | Toast host; wrap app (or subtree) so `useToastFEA()` works. Props: `children`. |
102
+ | `useToastFEA()` | Returns `{ toast }`. `toast({ title, description?, variant? })` with `variant`: `"default"` \| `"destructive"`. |
103
+ | `ToastFEA` | Alias of `SonnerFEA`. |
104
+
105
+ ---
106
+
107
+ ### Core
108
+
109
+ #### `ButtonFEA`
110
+
111
+ | Prop | Type | Default | Description |
112
+ | --- | --- | --- | --- |
113
+ | `title` | `string` | — | Button label. |
114
+ | `variant` | `"primary" \| "glass" \| "soft" \| "outline" \| "ghost"` | `"primary"` | Visual style. |
115
+ | `size` | `"default" \| "sm" \| "lg"` | `"default"` | Padding scale. |
116
+ | `onPress` | `() => void` | — | Press handler. |
117
+ | `disabled` | `boolean` | `false` | Disables interaction. |
118
+ | `loading` | `boolean` | `false` | Shows spinner and blocks press. |
119
+ | `leftIcon` / `rightIcon` | `React.ReactNode` | — | Optional icons around label. |
120
+ | `fullWidth` | `boolean` | `false` | Stretches button to parent width. |
121
+ | `style` | `StyleProp<ViewStyle>` | — | Root touchable / wrapper style. |
122
+ | `textStyle` | `StyleProp<TextStyle>` | — | Label text style override. |
123
+ | `testID` | `string` | — | Test identifier. |
124
+ | `accessibilityLabel` / `accessibilityHint` / `accessibilityRole` / `accessibilityState` | `TouchableOpacityProps[...]` | — | Accessibility passthrough. |
125
+ | `hitSlop` / `delayLongPress` / `activeOpacity` | `TouchableOpacityProps[...]` | — | Touchable behavior passthrough. |
126
+
127
+ #### `CardFEA` / `GlassCardFEA`
128
+
129
+ | Prop | Type | Description |
130
+ | --- | --- | --- |
131
+ | `children` | `React.ReactNode` | Content. |
132
+ | `style` | `StyleProp<ViewStyle>` | Container style. |
133
+ | `onPress` (`CardFEA`) | `() => void` | If set, card becomes pressable. |
134
+ | `testID` (`CardFEA`) | `string` | Root test identifier. |
135
+ | `accessibilityLabel` / `accessibilityRole` / `accessibilityHint` (`CardFEA`) | `ViewProps[...]` | Accessibility props on root. |
136
+
137
+ #### `TypographyFEA`
138
+
139
+ | Prop | Type | Default | Description |
140
+ | --- | --- | --- | --- |
141
+ | `children` | `React.ReactNode` | — | Text content. |
142
+ | `variant` | `"h1" \| "h2" \| "h3" \| "p" \| "small" \| "muted"` | `"p"` | Typography scale; `muted` uses `mutedForeground`. |
143
+ | `style` | `StyleProp<TextStyle>` | — | `Text` style. |
144
+ | `numberOfLines` | `number` | — | Truncates text after N lines. |
145
+ | `ellipsizeMode` | `"head" \| "middle" \| "tail" \| "clip"` | — | Ellipsis behavior when truncated. |
146
+ | `selectable` | `boolean` | — | Enables text selection/copy. |
147
+ | `testID` | `string` | — | Test identifier. |
148
+ | `maxFontSizeMultiplier` | `number` | — | Caps dynamic type scaling. |
149
+ | `onPress` | `() => void` | — | Optional press handler. |
150
+ | `accessibilityRole` | `"text" \| "header" \| "link" \| "none"` | — | Accessibility role. |
151
+
152
+ #### `SeparatorFEA`
153
+
154
+ | Prop | Type | Description |
155
+ | --- | --- | --- |
156
+ | `style` | `StyleProp<ViewStyle>` | Line style (height 1, full width). |
157
+
158
+ #### `LabelFEA`
159
+
160
+ | Prop | Type | Description |
161
+ | --- | --- | --- |
162
+ | `children` | `React.ReactNode` | Label text. |
163
+ | `style` | `StyleProp<TextStyle>` | Text style. |
164
+ | `required` | `boolean` | Appends red `*` when true. |
165
+ | `disabled` | `boolean` | Reduces label opacity. |
166
+ | `testID` | `string` | Test identifier. |
167
+ | `nativeID` | `string` | Can be linked from input `accessibilityLabelledBy`. |
168
+ | `numberOfLines` | `number` | Truncate label lines. |
169
+
170
+ #### `BadgeFEA`
171
+
172
+ | Prop | Type | Description |
173
+ | --- | --- | --- |
174
+ | `label` | `string` | Badge text. |
175
+ | `leftIcon` | `React.ReactNode` | Optional leading icon/dot. |
176
+ | `style` | `StyleProp<ViewStyle>` | Container style. |
177
+ | `textStyle` | `StyleProp<TextStyle>` | Badge label style. |
178
+ | `testID` | `string` | Test identifier. |
179
+ | `accessibilityLabel` | `string` | Accessible label override (defaults to `label`). |
180
+ | `onPress` | `() => void` | Makes badge tappable (`Pressable`). |
181
+
182
+ #### `AvatarFEA`
183
+
184
+ | Prop | Type | Default | Description |
185
+ | --- | --- | --- | --- |
186
+ | `source` | `ImageSourcePropType` | — | If set, shows image. |
187
+ | `fallback` | `string` | — | Initials (max 2 chars shown). |
188
+ | `size` | `number` | `40` | Width/height of circle. |
189
+
190
+ #### `AspectRatioFEA`
191
+
192
+ | Prop | Type | Default | Description |
193
+ | --- | --- | --- | --- |
194
+ | `ratio` | `number` | `1` | `width / height` for `aspectRatio`. |
195
+ | `children` | `React.ReactNode` | — | Content. |
196
+ | `style` | `StyleProp<ViewStyle>` | — | Wrapper style. |
197
+
198
+ #### `KbdFEA`
199
+
200
+ | Prop | Type | Description |
201
+ | --- | --- | --- |
202
+ | `children` | `React.ReactNode` | Keyboard hint text. |
203
+ | `style` | `StyleProp<TextStyle>` | Inner text style. |
204
+
205
+ #### `SpinnerFEA`
206
+
207
+ | Prop | Type | Default | Description |
208
+ | --- | --- | --- | --- |
209
+ | `size` | `"small" \| "large"` | `"small"` | `ActivityIndicator` size. |
210
+ | `style` | `StyleProp<ViewStyle>` | — | Wrapper style. |
211
+
212
+ #### `SkeletonFEA`
213
+
214
+ | Prop | Type | Default | Description |
215
+ | --- | --- | --- | --- |
216
+ | `height` | `number` | `80` | Block height. |
217
+ | `borderRadius` | `number` | `12` | Corner radius. |
218
+ | `marginVertical` | `number` | `8` | Vertical margin. |
219
+ | `style` | `StyleProp<ViewStyle>` | — | Extra style. |
220
+
221
+ #### `EmptyFEA`
222
+
223
+ | Prop | Type | Default | Description |
224
+ | --- | --- | --- | --- |
225
+ | `title` | `string` | `"No data"` | Heading. |
226
+ | `description` | `string` | — | Subtext. |
227
+ | `style` | `StyleProp<ViewStyle>` | — | Container style. |
228
+
229
+ ---
230
+
231
+ ### Form
232
+
233
+ #### `InputFEA`
234
+
235
+ | Prop | Type | Description |
236
+ | --- | --- | --- |
237
+ | `style` | `StyleProp<TextStyle>` | Passed to `TextInput`. |
238
+ | `...TextInputProps` | `Omit<TextInputProps, "placeholderTextColor" \| "style">` | Forwards all standard RN `TextInput` props (e.g. `value`, `onChangeText`, `keyboardType`, `editable`, etc.). `placeholderTextColor` is themed internally. |
239
+
240
+ #### `TextareaFEA`
241
+
242
+ | Prop | Type | Description |
243
+ | --- | --- | --- |
244
+ | `style` | `StyleProp<TextStyle>` | Multiline `TextInput` style. |
245
+ | `...TextInputProps` | `Omit<TextInputProps, "placeholderTextColor" \| "style">` | Forwards RN `TextInput` props while forcing `multiline` and `textAlignVertical="top"`. |
246
+
247
+ #### `CheckboxFEA`
248
+
249
+ | Prop | Type | Default | Description |
250
+ | --- | --- | --- | --- |
251
+ | `checked` | `boolean` | — | Controlled checked state. |
252
+ | `onChange` | `(next: boolean) => void` | — | Toggle handler. |
253
+ | `label` | `string` | — | Optional label. |
254
+ | `disabled` | `boolean` | `false` | Disables interaction. |
255
+ | `size` | `number` | `18` | Checkbox square size. |
256
+ | `style` | `StyleProp<ViewStyle>` | — | Row container style. |
257
+ | `labelStyle` | `StyleProp<TextStyle>` | — | Label text style. |
258
+ | `testID` | `string` | — | Test identifier. |
259
+ | `accessibilityLabel` | `string` | — | Accessible label override. |
260
+
261
+ #### `SwitchFEA`
262
+
263
+ | Prop | Type | Default | Description |
264
+ | --- | --- | --- | --- |
265
+ | `value` | `boolean` | — | Controlled value. |
266
+ | `onValueChange` | `(next: boolean) => void` | — | Change handler. |
267
+ | `label` | `string` | — | Optional label row. |
268
+ | `labelPosition` | `"left" \| "right"` | `"left"` | Places label before/after switch. |
269
+ | `disabled` | `boolean` | `false` | — |
270
+ | `style` | `StyleProp<ViewStyle>` | — | Row container. |
271
+ | `testID` | `string` | — | Test identifier. |
272
+ | `accessibilityLabel` | `string` | — | Accessibility label override. |
273
+ | `thumbColor` | `ColorValue` | `"#ffffff"` | Thumb color override. |
274
+ | `ios_backgroundColor` | `ColorValue` | — | iOS inactive background. |
275
+
276
+ #### `FieldFEA`
277
+
278
+ | Prop | Type | Description |
279
+ | --- | --- | --- |
280
+ | `label` | `string` | Optional field label. |
281
+ | `description` | `string` | Helper text (hidden if `error` set). |
282
+ | `error` | `string` | Error message (takes priority over description). |
283
+ | `children` | `React.ReactNode` | Input/control. |
284
+ | `style` | `StyleProp<ViewStyle>` | Field wrapper. |
285
+
286
+ #### `InputGroupFEA`
287
+
288
+ | Prop | Type | Description |
289
+ | --- | --- | --- |
290
+ | `children` | `React.ReactNode` | Grouped inputs. |
291
+ | `style` | `StyleProp<ViewStyle>` | Bordered container. |
292
+
293
+ #### `RadioGroupFEA`
294
+
295
+ | Prop | Type | Description |
296
+ | --- | --- | --- |
297
+ | `value` | `string` | Selected `value`. |
298
+ | `onValueChange` | `(next: string) => void` | Selection change. |
299
+ | `options` | `RadioOptionFEA[]` | `{ label, value, disabled? }`. |
300
+ | `style` | `StyleProp<ViewStyle>` | — |
301
+
302
+ #### `NativeSelectFEA` / `SelectFEA`
303
+
304
+ | Prop | Type | Default | Description |
305
+ | --- | --- | --- | --- |
306
+ | `value` | `string` | — | Selected option `value`. |
307
+ | `onValueChange` | `(next: string) => void` | — | Selection handler. |
308
+ | `options` | `SelectOptionFEA[]` | — | `{ label, value, disabled? }`. |
309
+ | `placeholder` | `string` | `"Select..."` | When nothing selected. |
310
+ | `style` | `StyleProp<ViewStyle>` | — | Menu / trigger styling. |
311
+
312
+ `SelectFEA` is an alias of `NativeSelectFEA`.
313
+
314
+ #### `ComboboxFEA`
315
+
316
+ | Prop | Type | Description |
317
+ | --- | --- | --- |
318
+ | `value` | `string` | Selected value. |
319
+ | `onValueChange` | `(next: string) => void` | — |
320
+ | `options` | `ComboboxOptionFEA[]` | `{ label, value }`. |
321
+ | `placeholder` | `string` | Trigger placeholder. |
322
+ | `style` | `StyleProp<ViewStyle>` | — |
323
+
324
+ #### `InputOTPFEA`
325
+
326
+ | Prop | Type | Default | Description |
327
+ | --- | --- | --- | --- |
328
+ | `value` | `string` | — | Controlled OTP string. |
329
+ | `onChange` | `(next: string) => void` | — | Updates full string. |
330
+ | `length` | `number` | `6` | Number of cells. |
331
+ | `style` | `StyleProp<ViewStyle>` | — | Row style. |
332
+
333
+ #### `DatePickerFEA`
334
+
335
+ | Prop | Type | Default | Description |
336
+ | --- | --- | --- | --- |
337
+ | `value` | `Date` | — | Current date (defaults internally to “now” for display). |
338
+ | `onChange` | `(next: Date) => void` | — | Emits new date when Y/M/D changes. |
339
+ | `startYear` | `number` | `1970` | Year list start. |
340
+ | `endYear` | `number` | current year + 10 | Year list end. |
341
+ | `style` | `StyleProp<ViewStyle>` | — | Row of selects. |
342
+
343
+ ---
344
+
345
+ ### Overlays & menus
346
+
347
+ #### `DialogFEA`
348
+
349
+ | Prop | Type | Description |
350
+ | --- | --- | --- |
351
+ | `open` | `boolean` | Visibility. |
352
+ | `onOpenChange` | `(next: boolean) => void` | Close/open; backdrop tap closes. |
353
+ | `children` | `React.ReactNode` | Usually `DialogHeaderFEA` + body + `DialogFooterFEA`. |
354
+ | `style` | `StyleProp<ViewStyle>` | Inner `CardFEA` style. |
355
+
356
+ #### `DialogHeaderFEA` / `DialogFooterFEA`
357
+
358
+ | Prop | Type | Description |
359
+ | --- | --- | --- |
360
+ | `children` | `React.ReactNode` | Layout sections. |
361
+
362
+ #### `AlertDialogFEA`
363
+
364
+ | Prop | Type | Default | Description |
365
+ | --- | --- | --- | --- |
366
+ | `open` | `boolean` | — | — |
367
+ | `onOpenChange` | `(next: boolean) => void` | — | — |
368
+ | `title` | `string` | — | Heading. |
369
+ | `description` | `string` | — | Body text. |
370
+ | `cancelText` | `string` | `"Cancel"` | Cancel button label. |
371
+ | `actionText` | `string` | `"Continue"` | Confirm button label. |
372
+ | `destructive` | `boolean` | `false` | Uses softer/destructive styling for action. |
373
+ | `onAction` | `() => void` | — | Runs before close on confirm. |
374
+
375
+ #### `ModalFEA`
376
+
377
+ | Prop | Type | Description |
378
+ | --- | --- | --- |
379
+ | `visible` | `boolean` | Renders overlay + card when true. |
380
+ | `children` | `React.ReactNode` | Content inside card. |
381
+ | `style` | `StyleProp<ViewStyle>` | Card style. |
382
+
383
+ #### `SheetFEA`
384
+
385
+ | Prop | Type | Description |
386
+ | --- | --- | --- |
387
+ | `open` | `boolean` | — |
388
+ | `onOpenChange` | `(next: boolean) => void` | — |
389
+ | `children` | `React.ReactNode` | Bottom sheet body. |
390
+ | `style` | `StyleProp<ViewStyle>` | Card style. |
391
+
392
+ #### `DrawerFEA`
393
+
394
+ | Prop | Type | Default | Description |
395
+ | --- | --- | --- | --- |
396
+ | `open` | `boolean` | — | — |
397
+ | `onOpenChange` | `(next: boolean) => void` | — | — |
398
+ | `side` | `"left" \| "right"` | `"left"` | Slide from edge. |
399
+ | `children` | `React.ReactNode` | — |
400
+ | `style` | `StyleProp<ViewStyle>` | Panel style. |
401
+
402
+ #### `PopoverFEA`
403
+
404
+ | Prop | Type | Description |
405
+ | --- | --- | --- |
406
+ | `open` | `boolean` | — |
407
+ | `onOpenChange` | `(next: boolean) => void` | — |
408
+ | `trigger` | `React.ReactNode` | Pressing toggles open (wrapped in `Pressable`). |
409
+ | `children` | `React.ReactNode` | Popover body inside `CardFEA`. |
410
+ | `contentStyle` | `StyleProp<ViewStyle>` | Inner card style. |
411
+
412
+ #### `DropdownMenuFEA`
413
+
414
+ | Prop | Type | Description |
415
+ | --- | --- | --- |
416
+ | `open` | `boolean` | — |
417
+ | `onOpenChange` | `(next: boolean) => void` | — |
418
+ | `trigger` | `React.ReactNode` | Opens menu. |
419
+ | `items` | `DropdownMenuItemFEA[]` | `{ label, onSelect?, destructive?, disabled? }`. |
420
+ | `style` | `StyleProp<ViewStyle>` | Passed to popover content. |
421
+
422
+ #### `ContextMenuFEA`
423
+
424
+ | Prop | Type | Description |
425
+ | --- | --- | --- |
426
+ | `items` | `DropdownMenuItemFEA[]` | Same as dropdown items. |
427
+ | `children` | `React.ReactNode` | Long-press target. |
428
+
429
+ #### `CommandFEA`
430
+
431
+ | Prop | Type | Default | Description |
432
+ | --- | --- | --- | --- |
433
+ | `open` | `boolean` | — | — |
434
+ | `onOpenChange` | `(next: boolean) => void` | — | — |
435
+ | `trigger` | `React.ReactNode` | — |
436
+ | `items` | `CommandItemFEA[]` | `{ label, value, keywords?, onSelect? }`. |
437
+ | `placeholder` | `string` | `"Type a command or search..."` | Search field. |
438
+ | `style` | `StyleProp<ViewStyle>` | — |
439
+
440
+ #### `TooltipFEA` / `HoverCardFEA`
441
+
442
+ | Prop | Type | Description |
443
+ | --- | --- | --- |
444
+ | `text` | `string` | Tooltip copy. |
445
+ | `children` | `React.ReactNode` | Tap to show brief modal-style hint. |
446
+
447
+ `HoverCardFEA` is an alias of `TooltipFEA` (React Native has no hover).
448
+
449
+ ---
450
+
451
+ ### Navigation & layout
452
+
453
+ #### `NavbarFEA`
454
+
455
+ | Prop | Type | Description |
456
+ | --- | --- | --- |
457
+ | `title` | `string` | Header title. |
458
+ | `style` | `StyleProp<ViewStyle>` | — |
459
+
460
+ #### `TabBarFEA`
461
+
462
+ | Prop | Type | Description |
463
+ | --- | --- | --- |
464
+ | `children` | `React.ReactNode` | Typically row of buttons. |
465
+ | `style` | `StyleProp<ViewStyle>` | — |
466
+
467
+ #### `TabsFEA` / `TabsListFEA` / `TabsTriggerFEA` / `TabsContentFEA`
468
+
469
+ | Component | Main props |
470
+ | --- | --- |
471
+ | `TabsFEA` | `defaultValue: string`, `children` |
472
+ | `TabsListFEA` | `children`, `style?` |
473
+ | `TabsTriggerFEA` | `value: string`, `children` |
474
+ | `TabsContentFEA` | `value: string`, `children` (shown when tab matches) |
475
+
476
+ #### `BreadcrumbFEA`
477
+
478
+ | Prop | Type | Description |
479
+ | --- | --- | --- |
480
+ | `items` | `BreadcrumbItemFEA[]` | `{ label, onPress? }` — last item usually has no `onPress`. |
481
+ | `separator` | `string` | Default `"/"`. |
482
+ | `style` | `StyleProp<ViewStyle>` | — |
483
+
484
+ #### `NavigationMenuFEA`
485
+
486
+ | Prop | Type | Description |
487
+ | --- | --- | --- |
488
+ | `value` | `string` | Active item `value`. |
489
+ | `onValueChange` | `(next: string) => void` | — |
490
+ | `items` | `NavigationMenuItemFEA[]` | `{ label, value, disabled? }`. |
491
+ | `style` | `StyleProp<ViewStyle>` | — |
492
+
493
+ #### `MenubarFEA`
494
+
495
+ | Prop | Type | Description |
496
+ | --- | --- | --- |
497
+ | `items` | `MenubarItemFEA[]` | `{ label, items: DropdownMenuItemFEA[] }` per top-level menu. |
498
+ | `style` | `StyleProp<ViewStyle>` | Horizontal bar. |
499
+
500
+ #### `PaginationFEA`
501
+
502
+ | Prop | Type | Default | Description |
503
+ | --- | --- | --- | --- |
504
+ | `page` | `number` | — | Current page (1-based). |
505
+ | `pageCount` | `number` | — | Total pages. |
506
+ | `onPageChange` | `(next: number) => void` | — | Page navigation. |
507
+ | `siblingCount` | `number` | `1` | Neighbor page buttons around current. |
508
+ | `style` | `StyleProp<ViewStyle>` | — | Row style. |
509
+
510
+ #### `SidebarFEA`
511
+
512
+ | Prop | Type | Description |
513
+ | --- | --- | --- |
514
+ | `open` | `boolean` | Uses `DrawerFEA` under the hood. |
515
+ | `onOpenChange` | `(next: boolean) => void` | — |
516
+ | `value` | `string` | Active item. |
517
+ | `onValueChange` | `(next: string) => void` | Optional. |
518
+ | `items` | `SidebarItemFEA[]` | `{ label, value, disabled? }`. |
519
+ | `header` / `footer` | `React.ReactNode` | Optional slots. |
520
+ | `style` | `StyleProp<ViewStyle>` | Drawer panel style. |
521
+
522
+ #### `ScrollAreaFEA`
523
+
524
+ | Prop | Type | Description |
525
+ | --- | --- | --- |
526
+ | Forwards | `ScrollViewProps` | Same as RN `ScrollView`; `showsVerticalScrollIndicator` defaults to `false`. |
527
+
528
+ ---
529
+
530
+ ### Data display
531
+
532
+ #### `ListItemFEA`
533
+
534
+ | Prop | Type | Description |
535
+ | --- | --- | --- |
536
+ | `title` | `string` | Primary line. |
537
+ | `subtitle` | `string` | Secondary line. |
538
+ | `style` | `StyleProp<ViewStyle>` | — |
539
+
540
+ #### `TableFEA` / `TableHeadFEA` / `TableRowFEA` / `TableCellFEA`
541
+
542
+ | Component | Props |
543
+ | --- | --- |
544
+ | `TableFEA` | `children`, `style?` |
545
+ | `TableHeadFEA` | `children`, `style?` |
546
+ | `TableRowFEA` | `children`, `style?` |
547
+ | `TableCellFEA` | `children`, `flex?` (default 1), `align?`: `"left"\|"center"\|"right"`, `style?` |
548
+
549
+ #### `DataTableFEA<Row>`
550
+
551
+ | Prop | Type | Description |
552
+ | --- | --- | --- |
553
+ | `columns` | `DataTableColumnFEA<Row>[]` | `key`, `header`, `flex?`, `align?`, `render?`. |
554
+ | `data` | `Row[]` | Row objects; cell = `row[key]` unless `render` set. |
555
+ | `rowKey` | `(row, index) => string` | Optional stable keys. |
556
+ | `style` / `headerStyle` | `StyleProp<ViewStyle>` | Table / header row. |
557
+
558
+ #### `CalendarFEA`
559
+
560
+ | Prop | Type | Description |
561
+ | --- | --- | --- |
562
+ | `value` | `Date` | Selected day. |
563
+ | `onChange` | `(next: Date) => void` | Day press. |
564
+ | `style` | `StyleProp<ViewStyle>` | Container. |
565
+
566
+ #### `ChartFEA`
567
+
568
+ | Prop | Type | Default | Description |
569
+ | --- | --- | --- | --- |
570
+ | `data` | `ChartSeriesPointFEA[]` | — | `{ label, value }` bar series. |
571
+ | `height` | `number` | `140` | Chart height. |
572
+ | `title` | `string` | — | Optional heading. |
573
+ | `style` | `StyleProp<ViewStyle>` | — | Container. |
574
+
575
+ ---
576
+
577
+ ### Interaction
578
+
579
+ #### `AccordionFEA`
580
+
581
+ | Prop | Type | Default | Description |
582
+ | --- | --- | --- | --- |
583
+ | `title` | `string` | — | Header. |
584
+ | `children` | `React.ReactNode` | — | Collapsible body. |
585
+ | `defaultOpen` | `boolean` | `false` | Initial open state. |
586
+ | `style` | `StyleProp<ViewStyle>` | — | Card wrapper. |
587
+
588
+ #### `CollapsibleFEA` / `CollapsibleTriggerFEA`
589
+
590
+ | `CollapsibleFEA` | `open`, `onOpenChange`, `trigger?`, `children`, `style?` |
591
+ | `CollapsibleTriggerFEA` | `title`, `open`, `onPress`, `style?` |
592
+
593
+ #### `ToggleFEA`
594
+
595
+ | Prop | Type | Description |
596
+ | --- | --- | --- |
597
+ | `pressed` | `boolean` | — |
598
+ | `onPressedChange` | `(next: boolean) => void` | — |
599
+ | `children` | `React.ReactNode` | Label. |
600
+ | `disabled` | `boolean` | — |
601
+ | `style` | `StyleProp<ViewStyle>` | — |
602
+
603
+ #### `ToggleGroupFEA`
604
+
605
+ | Prop | Type | Default | Description |
606
+ | --- | --- | --- | --- |
607
+ | `type` | `"single" \| "multiple"` | `"single"` | Selection mode. |
608
+ | `value` | `string \| string[]` | — | Selected value(s). |
609
+ | `onValueChange` | `(next: string \| string[]) => void` | — | — |
610
+ | `items` | `{ label, value, disabled? }[]` | — | — |
611
+ | `style` | `StyleProp<ViewStyle>` | — | Row. |
612
+
613
+ #### `SliderFEA`
614
+
615
+ | Prop | Type | Default | Description |
616
+ | --- | --- | --- | --- |
617
+ | `value` | `number` | — | Current value. |
618
+ | `onValueChange` | `(next: number) => void` | — | Snapped to `step`. |
619
+ | `min` / `max` / `step` | `number` | `0` / `100` / `1` | Range. |
620
+ | `style` | `StyleProp<ViewStyle>` | — | Track. |
621
+
622
+ #### `ResizableFEA`
623
+
624
+ | Prop | Type | Description |
625
+ | --- | --- | --- |
626
+ | `width` / `height` | `DimensionValue` | RN dimension (number or `%`). |
627
+ | `children` | `React.ReactNode` | — |
628
+ | `style` | `StyleProp<ViewStyle>` | — |
629
+
630
+ #### `CarouselFEA`
631
+
632
+ | Prop | Type | Description |
633
+ | --- | --- | --- |
634
+ | `children` | `React.ReactNode[]` | Pages (array of nodes). |
635
+ | `pageWidth` | `number` | Optional fixed page width. |
636
+ | `style` | `StyleProp<ViewStyle>` | `ScrollView` style. |
637
+
638
+ #### `BottomSheetFEA`
639
+
640
+ | Prop | Type | Description |
641
+ | --- | --- | --- |
642
+ | `children` | `React.ReactNode` | Anchored bottom sheet content. |
643
+ | `style` | `StyleProp<ViewStyle>` | Animated container. |
644
+
645
+ ---
646
+
647
+ ### Alerts & misc
648
+
649
+ #### `AlertFEA`
650
+
651
+ | Prop | Type | Default | Description |
652
+ | --- | --- | --- | --- |
653
+ | `title` | `string` | — | — |
654
+ | `description` | `string` | — | — |
655
+ | `variant` | `"default" \| "destructive"` | `"default"` | — |
656
+ | `style` | `StyleProp<ViewStyle>` | — | — |
657
+
658
+ #### `ProgressFEA`
659
+
660
+ | Prop | Type | Description |
661
+ | --- | --- | --- |
662
+ | `value` | `number` | 0–100 fill. |
663
+ | `style` | `StyleProp<ViewStyle>` | Track. |
664
+
665
+ #### `ThemeSwitchFEA`
666
+
667
+ Renders a text button that calls `toggleTheme` from context. No props.
668
+
669
+ ---
670
+
671
+ ### TypeScript
672
+
673
+ Import types when exported next to components, e.g. `DropdownMenuItemFEA`, `DataTableColumnFEA`, `SelectOptionFEA`, `BreadcrumbItemFEA`, `ChartSeriesPointFEA`, etc. Use your IDE “Go to definition” on `dist/**/*.d.ts` after `npm run build` for the exact emitted types.