prizmux 1.4.0 → 1.4.1
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/README.md +25 -175
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -6,195 +6,45 @@ A developer-first React Native component system.
|
|
|
6
6
|
|
|
7
7
|
Prizmux gives you production-ready UI primitives with no bloated dependencies, no locked abstractions, and no fighting the framework. Just clean components you can copy, modify, and ship.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## Why Prizmux?
|
|
12
|
-
|
|
13
|
-
Most React Native UI libraries are over-opinionated, hard to override, and packed with unnecessary dependencies. Prizmux takes a different approach — lightweight, zero forced dependencies, and fully typed.
|
|
14
|
-
|
|
15
|
-
Every component follows the same rule: **bring your own icons, images, and navigation**. The package never pulls in lucide, expo-image, expo-router, or any other third-party library on your behalf.
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## Components
|
|
20
|
-
|
|
21
|
-
### Button
|
|
22
|
-
Variants, sizes, loading state, icon support (left or right), icon-only mode, and full accessibility out of the box.
|
|
23
|
-
|
|
24
|
-
```tsx
|
|
25
|
-
<Button
|
|
26
|
-
title="Continue"
|
|
27
|
-
variant="filled"
|
|
28
|
-
size="medium"
|
|
29
|
-
borderRadius={8}
|
|
30
|
-
icon={<ArrowRight size={18} color="#fff" />}
|
|
31
|
-
iconPosition="right"
|
|
32
|
-
onPress={() => {}}
|
|
33
|
-
/>
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
### Card
|
|
39
|
-
Composable container with shadow and rounded corners. Put anything inside.
|
|
40
|
-
|
|
41
|
-
```tsx
|
|
42
|
-
<Card>
|
|
43
|
-
<Text>Hello world</Text>
|
|
44
|
-
</Card>
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
### BottomSheet
|
|
50
|
-
Swipeable sheet with drag handle, backdrop dismiss, and close button. Bring your own close icon.
|
|
51
|
-
|
|
52
|
-
```tsx
|
|
53
|
-
<BottomSheet
|
|
54
|
-
visible={visible}
|
|
55
|
-
onClose={() => setVisible(false)}
|
|
56
|
-
title="Options"
|
|
57
|
-
closeIcon={<X size={16} color="#333" />}
|
|
58
|
-
>
|
|
59
|
-
<Text>Sheet content</Text>
|
|
60
|
-
</BottomSheet>
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
### ImagePreview
|
|
66
|
-
Full screen image viewer with single image and gallery support. Bring your own nav icons.
|
|
67
|
-
|
|
68
|
-
```tsx
|
|
69
|
-
<ImagePreview
|
|
70
|
-
visible={visible}
|
|
71
|
-
images={['https://...']}
|
|
72
|
-
onClose={() => setVisible(false)}
|
|
73
|
-
closeIcon={<X size={24} color="#fff" />}
|
|
74
|
-
prevIcon={<ChevronLeft size={32} color="#fff" />}
|
|
75
|
-
nextIcon={<ChevronRight size={32} color="#fff" />}
|
|
76
|
-
/>
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Trigger it by wrapping any image in a `Pressable`:
|
|
80
|
-
|
|
81
|
-
```tsx
|
|
82
|
-
<Pressable onPress={() => setVisible(true)}>
|
|
83
|
-
<Image source={{ uri: '...' }} style={styles.avatar} />
|
|
84
|
-
</Pressable>
|
|
85
|
-
```
|
|
9
|
+
📖 **Full documentation at [prizmux.vercel.app](https://prizmux.vercel.app)**
|
|
86
10
|
|
|
87
11
|
---
|
|
88
12
|
|
|
89
|
-
|
|
90
|
-
Navigation header with back button, optional avatar, optional title position, and up to 4 right-side action icons with badge support.
|
|
91
|
-
|
|
92
|
-
```tsx
|
|
93
|
-
<HeaderWithBack
|
|
94
|
-
title="John Doe"
|
|
95
|
-
onBackPress={() => router.back()}
|
|
96
|
-
avatar={<Image source={{ uri: '...' }} style={{ width: 40, height: 40 }} />}
|
|
97
|
-
actions={[
|
|
98
|
-
{ icon: <Bell size={22} color="#333" />, onPress: () => {}, badge: 3 },
|
|
99
|
-
{ icon: <Phone size={22} color="#333" />, onPress: () => {} },
|
|
100
|
-
]}
|
|
101
|
-
/>
|
|
102
|
-
```
|
|
13
|
+
## Install
|
|
103
14
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
### EmptyState
|
|
107
|
-
Placeholder UI for empty lists or zero-data screens. Bring your own icon and action button.
|
|
108
|
-
|
|
109
|
-
```tsx
|
|
110
|
-
<EmptyState
|
|
111
|
-
title="No bookings yet"
|
|
112
|
-
description="Start by booking a service."
|
|
113
|
-
icon={<CalendarX size={80} color="rgba(99,102,241,0.3)" />}
|
|
114
|
-
action={
|
|
115
|
-
<Button title="Book Now" variant="filled" onPress={() => {}} />
|
|
116
|
-
}
|
|
117
|
-
/>
|
|
15
|
+
```bash
|
|
16
|
+
npm install prizmux
|
|
118
17
|
```
|
|
119
18
|
|
|
120
19
|
---
|
|
121
20
|
|
|
122
|
-
|
|
123
|
-
International phone number input with a searchable country picker, auto-detection when a full number is pasted, and a clean ISO code fallback when no flag renderer is provided.
|
|
124
|
-
|
|
125
|
-
```tsx
|
|
126
|
-
<PhoneInput
|
|
127
|
-
label="Phone Number"
|
|
128
|
-
defaultCountryCode="UG"
|
|
129
|
-
value={phone}
|
|
130
|
-
onChange={setPhone}
|
|
131
|
-
placeholder="712 345 678"
|
|
132
|
-
renderFlag={(country) => (
|
|
133
|
-
<CountryFlag isoCode={country.code} size={22} />
|
|
134
|
-
)}
|
|
135
|
-
/>
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
`onChange` returns an object with three fields:
|
|
139
|
-
|
|
140
|
-
```ts
|
|
141
|
-
{
|
|
142
|
-
country: Country; // full country object
|
|
143
|
-
number: string; // local number only e.g. "712345678"
|
|
144
|
-
full: string; // complete number e.g. "+256712345678"
|
|
145
|
-
}
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
**Flags** — no flag library is bundled. Pass any renderer via `renderFlag`, or leave it out and the component falls back to a clean ISO code label (`UG`, `US`).
|
|
21
|
+
## Components
|
|
149
22
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
23
|
+
| Component | Description |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `Button` | Variants, sizes, loading state, icon support, full accessibility |
|
|
26
|
+
| `Card` | Composable container, put anything inside |
|
|
27
|
+
| `BottomSheet` | Swipeable sheet with drag handle and backdrop dismiss |
|
|
28
|
+
| `ImagePreview` | Full screen image viewer with gallery support |
|
|
29
|
+
| `HeaderWithBack` | Navigation header with back button, avatar, and action icons with badges |
|
|
30
|
+
| `EmptyState` | Placeholder UI for empty lists and zero-data screens |
|
|
31
|
+
| `PhoneInput` | International phone input with searchable country picker and auto-detection |
|
|
32
|
+
| `Toast` | Auto, manual, and swipe-to-dismiss notifications |
|
|
33
|
+
| `FAB` | Floating action button with icon, label, or both |
|
|
34
|
+
| `Alert` | Customizable modal alert — bring your own buttons |
|
|
154
35
|
|
|
155
36
|
---
|
|
156
37
|
|
|
157
|
-
##
|
|
38
|
+
## Design Decisions
|
|
158
39
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
index.ts
|
|
165
|
-
/Card
|
|
166
|
-
Card.tsx
|
|
167
|
-
Card.types.ts
|
|
168
|
-
index.ts
|
|
169
|
-
/BottomSheet
|
|
170
|
-
BottomSheet.tsx
|
|
171
|
-
BottomSheet.types.ts
|
|
172
|
-
index.ts
|
|
173
|
-
/ImagePreview
|
|
174
|
-
ImagePreview.tsx
|
|
175
|
-
ImagePreview.types.ts
|
|
176
|
-
index.ts
|
|
177
|
-
/HeaderWithBack
|
|
178
|
-
HeaderWithBack.tsx
|
|
179
|
-
HeaderWithBack.types.ts
|
|
180
|
-
index.ts
|
|
181
|
-
/EmptyState
|
|
182
|
-
EmptyState.tsx
|
|
183
|
-
EmptyState.types.ts
|
|
184
|
-
index.ts
|
|
185
|
-
/PhoneInput
|
|
186
|
-
PhoneInput.tsx
|
|
187
|
-
PhoneInput.types.ts
|
|
188
|
-
countries.ts
|
|
189
|
-
index.ts
|
|
190
|
-
```
|
|
40
|
+
- **No icon library required** — every component that needs an icon accepts `ReactNode`.
|
|
41
|
+
- **No navigation dependency** — `HeaderWithBack` requires you to pass `onBackPress`.
|
|
42
|
+
- **No image library required** — image slots accept `ReactNode`.
|
|
43
|
+
- **No flag library required** — `PhoneInput` accepts a `renderFlag` prop with a built-in ISO code fallback.
|
|
44
|
+
- **Fully typed** — every component ships with a `.types.ts` file.
|
|
191
45
|
|
|
192
46
|
---
|
|
193
47
|
|
|
194
|
-
##
|
|
48
|
+
## License
|
|
195
49
|
|
|
196
|
-
|
|
197
|
-
- **No navigation dependency** — `HeaderWithBack` requires you to pass `onBackPress`. Use expo-router, react-navigation, or anything else.
|
|
198
|
-
- **No image library required** — `ImagePreview` and `HeaderWithBack` accept `ReactNode` for avatar/image slots. Use expo-image, the built-in RN Image, or anything you want.
|
|
199
|
-
- **No flag library required** — `PhoneInput` accepts a `renderFlag` prop. Use `react-native-country-flag`, a custom SVG, or rely on the built-in ISO fallback.
|
|
200
|
-
- **Fully typed** — every component ships with a `.types.ts` file.
|
|
50
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prizmux",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.01",
|
|
4
4
|
"description": "A smooth and modern UI component library for React Native",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -71,10 +71,10 @@
|
|
|
71
71
|
"prizmux"
|
|
72
72
|
],
|
|
73
73
|
"author": "Lukwago Joel Jr",
|
|
74
|
-
|
|
74
|
+
"license": "MIT",
|
|
75
75
|
"repository": {
|
|
76
76
|
"type": "git",
|
|
77
|
-
"url": "https://github.com/contecfy/prizmux"
|
|
77
|
+
"url": "git+https://github.com/contecfy/prizmux.git"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
80
|
"react": ">=16.8.0",
|