rn-feav-ui 1.0.2 → 1.0.4
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/components/Accordion/index.d.ts +8 -0
- package/dist/components/Accordion/index.js +65 -0
- package/dist/components/Alert/index.d.ts +10 -0
- package/dist/components/Alert/index.js +78 -0
- package/dist/components/Avatar/index.d.ts +7 -0
- package/dist/components/Avatar/index.js +66 -0
- package/dist/components/Badge/index.d.ts +4 -2
- package/dist/components/Badge/index.js +28 -6
- package/dist/components/BottomSheet/index.d.ts +2 -2
- package/dist/components/BottomSheet/index.js +21 -8
- package/dist/components/Button/index.d.ts +11 -3
- package/dist/components/Button/index.js +125 -23
- package/dist/components/Card/index.d.ts +8 -0
- package/dist/components/Card/index.js +59 -0
- package/dist/components/Checkbox/index.d.ts +7 -0
- package/dist/components/Checkbox/index.js +75 -0
- package/dist/components/Dialog/index.d.ts +14 -0
- package/dist/components/Dialog/index.js +79 -0
- package/dist/components/GlassCard/index.d.ts +1 -1
- package/dist/components/GlassCard/index.js +10 -5
- package/dist/components/GlassCard/styles.d.ts +23 -1
- package/dist/components/GlassCard/styles.js +17 -2
- package/dist/components/Input/index.d.ts +4 -2
- package/dist/components/Input/index.js +21 -14
- package/dist/components/Label/index.d.ts +6 -0
- package/dist/components/Label/index.js +52 -0
- package/dist/components/ListItem/index.d.ts +2 -2
- package/dist/components/ListItem/index.js +27 -9
- package/dist/components/Modal/index.d.ts +2 -2
- package/dist/components/Modal/index.js +27 -9
- package/dist/components/Navbar/index.d.ts +2 -2
- package/dist/components/Navbar/index.js +19 -8
- package/dist/components/Progress/index.d.ts +6 -0
- package/dist/components/Progress/index.js +65 -0
- package/dist/components/Separator/index.d.ts +5 -0
- package/dist/components/Separator/index.js +57 -0
- package/dist/components/Skeleton/index.d.ts +1 -1
- package/dist/components/Skeleton/index.js +18 -5
- package/dist/components/Switch/index.d.ts +9 -0
- package/dist/components/Switch/index.js +47 -0
- package/dist/components/TabBar/index.d.ts +2 -2
- package/dist/components/TabBar/index.js +20 -6
- package/dist/components/Tabs/index.d.ts +18 -0
- package/dist/components/Tabs/index.js +102 -0
- package/dist/components/Textarea/index.d.ts +6 -0
- package/dist/components/Textarea/index.js +62 -0
- package/dist/components/ThemeSwitch/index.d.ts +1 -1
- package/dist/components/ThemeSwitch/index.js +3 -3
- package/dist/components/Typography/index.d.ts +9 -0
- package/dist/components/Typography/index.js +70 -0
- package/dist/components/index.d.ts +14 -0
- package/dist/components/index.js +14 -0
- package/dist/examples/Showcase.d.ts +2 -0
- package/dist/examples/Showcase.js +131 -0
- package/dist/theme/colors.d.ts +34 -4
- package/dist/theme/colors.js +43 -10
- package/package.json +21 -4
- package/readme.md +87 -21
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Showcase = void 0;
|
|
37
|
+
var React = __importStar(require("react"));
|
|
38
|
+
var react_native_1 = require("react-native");
|
|
39
|
+
var ThemeFEAVUiProvider_1 = require("../theme/ThemeFEAVUiProvider");
|
|
40
|
+
var components_1 = require("../components");
|
|
41
|
+
var ShowcaseContent = function () {
|
|
42
|
+
var _a = (0, ThemeFEAVUiProvider_1.useTheme)(), theme = _a.theme, toggleTheme = _a.toggleTheme;
|
|
43
|
+
var _b = React.useState(true), checked = _b[0], setChecked = _b[1];
|
|
44
|
+
var _c = React.useState(false), switchOn = _c[0], setSwitchOn = _c[1];
|
|
45
|
+
var _d = React.useState(false), dialogOpen = _d[0], setDialogOpen = _d[1];
|
|
46
|
+
var _e = React.useState(false), modalOpen = _e[0], setModalOpen = _e[1];
|
|
47
|
+
return (React.createElement(react_native_1.View, { style: { flex: 1, backgroundColor: theme.colors.bg } },
|
|
48
|
+
React.createElement(react_native_1.ScrollView, { contentContainerStyle: { padding: 16, gap: 14 } },
|
|
49
|
+
React.createElement(components_1.NavbarFEA, { title: "FEAV UI Showcase" }),
|
|
50
|
+
React.createElement(components_1.CardFEA, null,
|
|
51
|
+
React.createElement(components_1.TypographyFEA, { variant: "h2" }, "Theme"),
|
|
52
|
+
React.createElement(components_1.TypographyFEA, { variant: "muted" },
|
|
53
|
+
"Current: ",
|
|
54
|
+
theme.mode),
|
|
55
|
+
React.createElement(react_native_1.View, { style: { marginTop: 10 } },
|
|
56
|
+
React.createElement(components_1.ButtonFEA, { title: "Toggle Theme", variant: "outline", onPress: toggleTheme }))),
|
|
57
|
+
React.createElement(components_1.CardFEA, null,
|
|
58
|
+
React.createElement(components_1.TypographyFEA, { variant: "h2" }, "Buttons"),
|
|
59
|
+
React.createElement(react_native_1.View, { style: { gap: 8, marginTop: 10 } },
|
|
60
|
+
React.createElement(components_1.ButtonFEA, { title: "Primary", onPress: function () { return null; } }),
|
|
61
|
+
React.createElement(components_1.ButtonFEA, { title: "Secondary / Soft", variant: "soft", onPress: function () { return null; } }),
|
|
62
|
+
React.createElement(components_1.ButtonFEA, { title: "Outline", variant: "outline", onPress: function () { return null; } }),
|
|
63
|
+
React.createElement(components_1.ButtonFEA, { title: "Ghost", variant: "ghost", onPress: function () { return null; } }),
|
|
64
|
+
React.createElement(components_1.ButtonFEA, { title: "Glass", variant: "glass", onPress: function () { return null; } }))),
|
|
65
|
+
React.createElement(components_1.CardFEA, null,
|
|
66
|
+
React.createElement(components_1.TypographyFEA, { variant: "h2" }, "Inputs"),
|
|
67
|
+
React.createElement(react_native_1.View, { style: { marginTop: 10 } },
|
|
68
|
+
React.createElement(components_1.LabelFEA, null, "Username"),
|
|
69
|
+
React.createElement(components_1.InputFEA, { placeholder: "Enter username" }),
|
|
70
|
+
React.createElement(components_1.LabelFEA, null, "Description"),
|
|
71
|
+
React.createElement(components_1.TextareaFEA, { placeholder: "Write something..." }))),
|
|
72
|
+
React.createElement(components_1.CardFEA, null,
|
|
73
|
+
React.createElement(components_1.TypographyFEA, { variant: "h2" }, "Selection"),
|
|
74
|
+
React.createElement(react_native_1.View, { style: { marginTop: 10, gap: 12 } },
|
|
75
|
+
React.createElement(components_1.CheckboxFEA, { checked: checked, onChange: setChecked, label: "Accept terms" }),
|
|
76
|
+
React.createElement(components_1.SwitchFEA, { value: switchOn, onValueChange: setSwitchOn, label: "Enable notifications" }))),
|
|
77
|
+
React.createElement(components_1.CardFEA, null,
|
|
78
|
+
React.createElement(components_1.TypographyFEA, { variant: "h2" }, "Status & Feedback"),
|
|
79
|
+
React.createElement(react_native_1.View, { style: { marginTop: 10, gap: 10 } },
|
|
80
|
+
React.createElement(components_1.BadgeFEA, { label: "Beta" }),
|
|
81
|
+
React.createElement(components_1.AlertFEA, { title: "Heads up!", description: "This is a default alert." }),
|
|
82
|
+
React.createElement(components_1.AlertFEA, { variant: "destructive", title: "Something went wrong", description: "Please try again later." }),
|
|
83
|
+
React.createElement(components_1.ProgressFEA, { value: 66 }),
|
|
84
|
+
React.createElement(components_1.SkeletonFEA, { height: 40 }))),
|
|
85
|
+
React.createElement(components_1.CardFEA, null,
|
|
86
|
+
React.createElement(components_1.TypographyFEA, { variant: "h2" }, "Display"),
|
|
87
|
+
React.createElement(react_native_1.View, { style: { marginTop: 10, gap: 12 } },
|
|
88
|
+
React.createElement(react_native_1.View, { style: { flexDirection: "row", gap: 8 } },
|
|
89
|
+
React.createElement(components_1.AvatarFEA, { fallback: "NT" }),
|
|
90
|
+
React.createElement(components_1.AvatarFEA, { fallback: "UI", size: 32 })),
|
|
91
|
+
React.createElement(components_1.SeparatorFEA, null),
|
|
92
|
+
React.createElement(components_1.ListItemFEA, { title: "List title", subtitle: "Supporting text for list item." }))),
|
|
93
|
+
React.createElement(components_1.CardFEA, null,
|
|
94
|
+
React.createElement(components_1.TypographyFEA, { variant: "h2" }, "Tabs"),
|
|
95
|
+
React.createElement(components_1.TabsFEA, { defaultValue: "account" },
|
|
96
|
+
React.createElement(components_1.TabsListFEA, { style: { marginTop: 10 } },
|
|
97
|
+
React.createElement(components_1.TabsTriggerFEA, { value: "account" }, "Account"),
|
|
98
|
+
React.createElement(components_1.TabsTriggerFEA, { value: "password" }, "Password")),
|
|
99
|
+
React.createElement(components_1.TabsContentFEA, { value: "account" },
|
|
100
|
+
React.createElement(components_1.TypographyFEA, { variant: "p" }, "Manage your account settings here.")),
|
|
101
|
+
React.createElement(components_1.TabsContentFEA, { value: "password" },
|
|
102
|
+
React.createElement(components_1.TypographyFEA, { variant: "p" }, "Change your password from this tab.")))),
|
|
103
|
+
React.createElement(components_1.AccordionFEA, { title: "Accordion Example" },
|
|
104
|
+
React.createElement(components_1.TypographyFEA, { variant: "p" }, "This content is shown when accordion is open.")),
|
|
105
|
+
React.createElement(components_1.TabBarFEA, null,
|
|
106
|
+
React.createElement(components_1.ButtonFEA, { title: "Home", variant: "ghost", onPress: function () { return null; } }),
|
|
107
|
+
React.createElement(components_1.ButtonFEA, { title: "Search", variant: "ghost", onPress: function () { return null; } }),
|
|
108
|
+
React.createElement(components_1.ButtonFEA, { title: "Profile", variant: "ghost", onPress: function () { return null; } })),
|
|
109
|
+
React.createElement(components_1.CardFEA, null,
|
|
110
|
+
React.createElement(components_1.TypographyFEA, { variant: "h2" }, "Overlays"),
|
|
111
|
+
React.createElement(react_native_1.View, { style: { marginTop: 10, gap: 8 } },
|
|
112
|
+
React.createElement(components_1.ButtonFEA, { title: "Open Dialog", onPress: function () { return setDialogOpen(true); } }),
|
|
113
|
+
React.createElement(components_1.ButtonFEA, { title: "Open Modal", variant: "outline", onPress: function () { return setModalOpen(true); } }))),
|
|
114
|
+
React.createElement(components_1.BottomSheetFEA, null,
|
|
115
|
+
React.createElement(components_1.TypographyFEA, { variant: "small" }, "BottomSheet preview area"))),
|
|
116
|
+
React.createElement(components_1.DialogFEA, { open: dialogOpen, onOpenChange: setDialogOpen },
|
|
117
|
+
React.createElement(components_1.DialogHeaderFEA, null,
|
|
118
|
+
React.createElement(components_1.TypographyFEA, { variant: "h3" }, "Confirm Action"),
|
|
119
|
+
React.createElement(components_1.TypographyFEA, { variant: "muted" }, "This is a shadcn-style dialog on React Native.")),
|
|
120
|
+
React.createElement(components_1.DialogFooterFEA, null,
|
|
121
|
+
React.createElement(components_1.ButtonFEA, { title: "Cancel", variant: "ghost", onPress: function () { return setDialogOpen(false); } }),
|
|
122
|
+
React.createElement(components_1.ButtonFEA, { title: "Continue", onPress: function () { return setDialogOpen(false); } }))),
|
|
123
|
+
React.createElement(components_1.ModalFEA, { visible: modalOpen },
|
|
124
|
+
React.createElement(components_1.TypographyFEA, { variant: "h3" }, "Modal Content"),
|
|
125
|
+
React.createElement(components_1.TypographyFEA, { variant: "muted" }, "This is the modal component preview."),
|
|
126
|
+
React.createElement(react_native_1.View, { style: { marginTop: 12 } },
|
|
127
|
+
React.createElement(components_1.ButtonFEA, { title: "Close", onPress: function () { return setModalOpen(false); } })))));
|
|
128
|
+
};
|
|
129
|
+
var Showcase = function () { return (React.createElement(ThemeFEAVUiProvider_1.ThemeFEAVUiProvider, null,
|
|
130
|
+
React.createElement(ShowcaseContent, null))); };
|
|
131
|
+
exports.Showcase = Showcase;
|
package/dist/theme/colors.d.ts
CHANGED
|
@@ -1,20 +1,50 @@
|
|
|
1
1
|
export declare const lightTheme: {
|
|
2
2
|
mode: string;
|
|
3
3
|
colors: {
|
|
4
|
+
background: string;
|
|
5
|
+
foreground: string;
|
|
6
|
+
card: string;
|
|
7
|
+
cardForeground: string;
|
|
8
|
+
popover: string;
|
|
9
|
+
popoverForeground: string;
|
|
10
|
+
muted: string;
|
|
11
|
+
mutedForeground: string;
|
|
12
|
+
border: string;
|
|
13
|
+
input: string;
|
|
14
|
+
ring: string;
|
|
15
|
+
primary: string;
|
|
16
|
+
primaryForeground: string;
|
|
17
|
+
secondary: string;
|
|
18
|
+
secondaryForeground: string;
|
|
19
|
+
destructive: string;
|
|
20
|
+
destructiveForeground: string;
|
|
4
21
|
bg: string;
|
|
5
22
|
text: string;
|
|
6
|
-
primary: string;
|
|
7
|
-
border: string;
|
|
8
23
|
glass: string;
|
|
9
24
|
};
|
|
10
25
|
};
|
|
11
26
|
export declare const darkTheme: {
|
|
12
27
|
mode: string;
|
|
13
28
|
colors: {
|
|
29
|
+
background: string;
|
|
30
|
+
foreground: string;
|
|
31
|
+
card: string;
|
|
32
|
+
cardForeground: string;
|
|
33
|
+
popover: string;
|
|
34
|
+
popoverForeground: string;
|
|
35
|
+
muted: string;
|
|
36
|
+
mutedForeground: string;
|
|
37
|
+
border: string;
|
|
38
|
+
input: string;
|
|
39
|
+
ring: string;
|
|
40
|
+
primary: string;
|
|
41
|
+
primaryForeground: string;
|
|
42
|
+
secondary: string;
|
|
43
|
+
secondaryForeground: string;
|
|
44
|
+
destructive: string;
|
|
45
|
+
destructiveForeground: string;
|
|
14
46
|
bg: string;
|
|
15
47
|
text: string;
|
|
16
|
-
primary: string;
|
|
17
|
-
border: string;
|
|
18
48
|
glass: string;
|
|
19
49
|
};
|
|
20
50
|
};
|
package/dist/theme/colors.js
CHANGED
|
@@ -7,20 +7,53 @@ exports.darkTheme = exports.lightTheme = void 0;
|
|
|
7
7
|
exports.lightTheme = {
|
|
8
8
|
mode: 'light',
|
|
9
9
|
colors: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
// shadcn-like semantic tokens (neutral base + clear primary)
|
|
11
|
+
background: "#ffffff",
|
|
12
|
+
foreground: "#0f172a",
|
|
13
|
+
card: "#ffffff",
|
|
14
|
+
cardForeground: "#0f172a",
|
|
15
|
+
popover: "#ffffff",
|
|
16
|
+
popoverForeground: "#0f172a",
|
|
17
|
+
muted: "#f1f5f9",
|
|
18
|
+
mutedForeground: "#64748b",
|
|
19
|
+
border: "#e2e8f0",
|
|
20
|
+
input: "#e2e8f0",
|
|
21
|
+
ring: "#2563eb",
|
|
22
|
+
primary: "#2563eb",
|
|
23
|
+
primaryForeground: "#ffffff",
|
|
24
|
+
secondary: "#f1f5f9",
|
|
25
|
+
secondaryForeground: "#0f172a",
|
|
26
|
+
destructive: "#dc2626",
|
|
27
|
+
destructiveForeground: "#ffffff",
|
|
28
|
+
// backwards-compatible aliases
|
|
29
|
+
bg: "#ffffff",
|
|
30
|
+
text: "#0f172a",
|
|
31
|
+
glass: "rgba(255,255,255,0.55)",
|
|
15
32
|
}
|
|
16
33
|
};
|
|
17
34
|
exports.darkTheme = {
|
|
18
35
|
mode: 'dark',
|
|
19
36
|
colors: {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
37
|
+
background: "#020617",
|
|
38
|
+
foreground: "#f8fafc",
|
|
39
|
+
card: "#0b1220",
|
|
40
|
+
cardForeground: "#f8fafc",
|
|
41
|
+
popover: "#0b1220",
|
|
42
|
+
popoverForeground: "#f8fafc",
|
|
43
|
+
muted: "rgba(148,163,184,0.12)",
|
|
44
|
+
mutedForeground: "rgba(148,163,184,0.85)",
|
|
45
|
+
border: "rgba(148,163,184,0.22)",
|
|
46
|
+
input: "rgba(148,163,184,0.22)",
|
|
47
|
+
ring: "#60a5fa",
|
|
48
|
+
primary: "#60a5fa",
|
|
49
|
+
primaryForeground: "#020617",
|
|
50
|
+
secondary: "rgba(148,163,184,0.12)",
|
|
51
|
+
secondaryForeground: "#f8fafc",
|
|
52
|
+
destructive: "#f87171",
|
|
53
|
+
destructiveForeground: "#020617",
|
|
54
|
+
// backwards-compatible aliases
|
|
55
|
+
bg: "#020617",
|
|
56
|
+
text: "#f8fafc",
|
|
57
|
+
glass: "rgba(2,6,23,0.6)",
|
|
25
58
|
}
|
|
26
59
|
};
|
package/package.json
CHANGED
|
@@ -1,14 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rn-feav-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"description": "Shadcn-style React Native UI kit with theme support.",
|
|
4
5
|
"main": "dist/index.js",
|
|
5
6
|
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"default": "./dist/index.js"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"react-native": "dist/index.js",
|
|
14
|
+
"sideEffects": false,
|
|
6
15
|
"files": [
|
|
7
16
|
"dist"
|
|
8
17
|
],
|
|
9
|
-
"scripts": {
|
|
10
|
-
|
|
11
|
-
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsc",
|
|
20
|
+
"dev": "tsc --watch",
|
|
21
|
+
"prepublishOnly": "npm run build"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"react-native",
|
|
25
|
+
"ui-kit",
|
|
26
|
+
"components",
|
|
27
|
+
"shadcn"
|
|
28
|
+
],
|
|
12
29
|
"peerDependencies": {
|
|
13
30
|
"expo-linear-gradient": ">=55.0.11",
|
|
14
31
|
"react": ">=18",
|
package/readme.md
CHANGED
|
@@ -1,21 +1,87 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
# rn-feav-ui
|
|
2
|
+
|
|
3
|
+
Shadcn-style React Native UI kit with theme support (light/dark).
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Simple, consistent “shadcn-like” components (Button/Input/Card/etc.)
|
|
8
|
+
- Light/Dark mode via `ThemeFEAVUiProvider`
|
|
9
|
+
- Pure React Native primitives (minimal native dependencies)
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install rn-feav-ui
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### TypeScript IntelliSense (auto-complete)
|
|
18
|
+
|
|
19
|
+
Thư viện đã cấu hình `types`/`exports` nên bạn có thể import trực tiếp từ package root để IDE gợi ý component:
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import { ButtonFEA, InputFEA, CardFEA, ThemeFEAVUiProvider } from "rn-feav-ui";
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
Wrap your app with the theme provider:
|
|
28
|
+
|
|
29
|
+
```tsx
|
|
30
|
+
import * as React from "react";
|
|
31
|
+
import { ThemeFEAVUiProvider } from "rn-feav-ui";
|
|
32
|
+
|
|
33
|
+
export default function App() {
|
|
34
|
+
return <ThemeFEAVUiProvider>{/* your screens */}</ThemeFEAVUiProvider>;
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Example (Button + Input + Dialog):
|
|
39
|
+
|
|
40
|
+
```tsx
|
|
41
|
+
import * as React from "react";
|
|
42
|
+
import {
|
|
43
|
+
ButtonFEA,
|
|
44
|
+
InputFEA,
|
|
45
|
+
DialogFEA,
|
|
46
|
+
DialogHeaderFEA,
|
|
47
|
+
DialogFooterFEA,
|
|
48
|
+
TypographyFEA,
|
|
49
|
+
} from "rn-feav-ui";
|
|
50
|
+
|
|
51
|
+
export function Example() {
|
|
52
|
+
const [open, setOpen] = React.useState(false);
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<>
|
|
56
|
+
<InputFEA placeholder="Email" />
|
|
57
|
+
<ButtonFEA title="Open dialog" onPress={() => setOpen(true)} />
|
|
58
|
+
<DialogFEA open={open} onOpenChange={setOpen}>
|
|
59
|
+
<DialogHeaderFEA>
|
|
60
|
+
<TypographyFEA variant="h3">Confirm</TypographyFEA>
|
|
61
|
+
</DialogHeaderFEA>
|
|
62
|
+
<DialogFooterFEA>
|
|
63
|
+
<ButtonFEA title="Cancel" variant="ghost" onPress={() => setOpen(false)} />
|
|
64
|
+
<ButtonFEA title="OK" onPress={() => setOpen(false)} />
|
|
65
|
+
</DialogFooterFEA>
|
|
66
|
+
</DialogFEA>
|
|
67
|
+
</>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Component List
|
|
73
|
+
|
|
74
|
+
Core components (exported from `rn-feav-ui`):
|
|
75
|
+
- Layout/Surface: `CardFEA`, `GlassCardFEA`, `SeparatorFEA`
|
|
76
|
+
- Navigation/Containers: `NavbarFEA`, `TabBarFEA`, `TabsFEA` (with `TabsListFEA`, `TabsTriggerFEA`, `TabsContentFEA`)
|
|
77
|
+
- Inputs/Form: `InputFEA`, `TextareaFEA`, `LabelFEA`, `CheckboxFEA`, `SwitchFEA`
|
|
78
|
+
- Feedback: `AlertFEA`, `ProgressFEA`, `SkeletonFEA`
|
|
79
|
+
- Data display: `AvatarFEA`, `ListItemFEA`, `BadgeFEA`
|
|
80
|
+
- Overlays: `ModalFEA`, `BottomSheetFEA`, `DialogFEA` (with `DialogHeaderFEA`, `DialogFooterFEA`)
|
|
81
|
+
- Misc: `AccordionFEA`, `TypographyFEA`, `ButtonFEA`
|
|
82
|
+
|
|
83
|
+
## Showcase
|
|
84
|
+
|
|
85
|
+
There is a full demo inside the repo at:
|
|
86
|
+
|
|
87
|
+
- `src/examples/Showcase.tsx`
|