prizmux 1.4.0 → 1.4.2

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.
Files changed (30) hide show
  1. package/README.md +27 -176
  2. package/dist/components/Header/Header.d.ts +4 -0
  3. package/dist/components/Header/Header.d.ts.map +1 -0
  4. package/dist/components/Header/Header.js +95 -0
  5. package/dist/components/Header/Header.js.map +1 -0
  6. package/dist/components/Header/Header.types.d.ts +17 -0
  7. package/dist/components/Header/Header.types.d.ts.map +1 -0
  8. package/dist/components/Header/Header.types.js +3 -0
  9. package/dist/components/Header/Header.types.js.map +1 -0
  10. package/dist/components/Header/index.d.ts +3 -0
  11. package/dist/components/Header/index.d.ts.map +1 -0
  12. package/dist/components/Header/index.js +6 -0
  13. package/dist/components/Header/index.js.map +1 -0
  14. package/dist/components/Sidebar/Sidebar.d.ts +5 -0
  15. package/dist/components/Sidebar/Sidebar.d.ts.map +1 -0
  16. package/dist/components/Sidebar/Sidebar.js +224 -0
  17. package/dist/components/Sidebar/Sidebar.js.map +1 -0
  18. package/dist/components/Sidebar/Sidebar.types.d.ts +42 -0
  19. package/dist/components/Sidebar/Sidebar.types.d.ts.map +1 -0
  20. package/dist/components/Sidebar/Sidebar.types.js +3 -0
  21. package/dist/components/Sidebar/Sidebar.types.js.map +1 -0
  22. package/dist/components/Sidebar/index.d.ts +3 -0
  23. package/dist/components/Sidebar/index.d.ts.map +1 -0
  24. package/dist/components/Sidebar/index.js +6 -0
  25. package/dist/components/Sidebar/index.js.map +1 -0
  26. package/dist/components/index.d.ts +6 -4
  27. package/dist/components/index.d.ts.map +1 -1
  28. package/dist/components/index.js +6 -4
  29. package/dist/components/index.js.map +1 -1
  30. package/package.json +3 -3
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # 👽 Prizmux
1
+ # Prizmux
2
2
 
3
3
  A developer-first React Native component system.
4
4
 
@@ -6,195 +6,46 @@ 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
- ### HeaderWithBack
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
- ### PhoneInput
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
- ```bash
151
- # optional only if you want actual flag images
152
- npm install react-native-country-flag
153
- ```
23
+ | Component | Description |
24
+ | -------------- | ------------------------------------------------------------------------------------- |
25
+ | `Alert` | Customizable modal alert — bring your own buttons |
26
+ | `BottomSheet` | Swipeable sheet with drag handle and backdrop dismiss |
27
+ | `Button` | Variants, sizes, loading state, icon support, full accessibility |
28
+ | `Card` | Composable container, put anything inside |
29
+ | `EmptyState` | Placeholder UI for empty lists and zero-data screens |
30
+ | `FAB` | Floating action button with icon, label, or both |
31
+ | `Header` | Navigation header with or without a back button, avatar, and action icons with badges |
32
+ | `ImagePreview` | Full screen image viewer with gallery support |
33
+ | `PhoneInput` | International phone input with searchable country picker and auto-detection |
34
+ | `Sidebar` | Collapsible navigation panel with customizable items, icons, and active states |
35
+ | `Toast` | Auto, manual, and swipe-to-dismiss notifications |
154
36
 
155
37
  ---
156
38
 
157
- ## Architecture
39
+ ## Design Decisions
158
40
 
159
- ```
160
- /components
161
- /Button
162
- Button.tsx
163
- Button.types.ts
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
- ```
41
+ - **No icon library required** — every component that needs an icon accepts `ReactNode`.
42
+ - **No navigation dependency** — `HeaderWithBack` requires you to pass `onBackPress`.
43
+ - **No image library required** — image slots accept `ReactNode`.
44
+ - **No flag library required** — `PhoneInput` accepts a `renderFlag` prop with a built-in ISO code fallback.
45
+ - **Fully typed** — every component ships with a `.types.ts` file.
191
46
 
192
47
  ---
193
48
 
194
- ## Design Decisions
49
+ ## License
195
50
 
196
- - **No icon library required** — every component that needs an icon accepts `ReactNode`. Pass lucide, react-native-vector-icons, an SVG, or a plain emoji.
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.
51
+ MIT
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { HeaderProps } from './Header.types';
3
+ export declare const Header: React.FC<HeaderProps>;
4
+ //# sourceMappingURL=Header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../src/components/Header/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAEjD,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAkExC,CAAA"}
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Header = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_native_1 = require("react-native");
6
+ const Header = ({ title, avatar, titlePosition = 'center', showBack = false, onBackPress, backIcon, actions = [], }) => {
7
+ const titleStyle = titlePosition === 'left'
8
+ ? styles.titleLeft
9
+ : titlePosition === 'right'
10
+ ? styles.titleRight
11
+ : styles.titleCenter;
12
+ const visibleActions = actions.slice(0, 4);
13
+ return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles.header, children: [showBack ? ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { onPress: onBackPress, style: styles.backButton, android_ripple: { color: 'rgba(0, 0, 0, 0.1)' }, children: backIcon ?? (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: styles.backIcon, children: "\u2039" }) })) : ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.leftSpacer })), avatar && (0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.avatarContainer, children: avatar }), (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.title, titleStyle], numberOfLines: 1, children: title }), (0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.actionsContainer, children: visibleActions.map((action, index) => ((0, jsx_runtime_1.jsxs)(react_native_1.Pressable, { onPress: action.onPress, style: styles.actionButton, android_ripple: { color: 'rgba(0, 0, 0, 0.1)' }, children: [action.icon, action.badge !== undefined && ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.badge, children: (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: styles.badgeText, numberOfLines: 1, children: typeof action.badge === 'number' && action.badge > 99
14
+ ? '99+'
15
+ : action.badge }) }))] }, index))) })] }));
16
+ };
17
+ exports.Header = Header;
18
+ const styles = react_native_1.StyleSheet.create({
19
+ header: {
20
+ flexDirection: 'row',
21
+ alignItems: 'center',
22
+ paddingHorizontal: 8,
23
+ paddingVertical: 12,
24
+ backgroundColor: '#FFFFFF',
25
+ borderBottomWidth: 1,
26
+ borderBottomColor: '#E5E7EB',
27
+ },
28
+ leftSpacer: {
29
+ width: 40,
30
+ height: 40,
31
+ },
32
+ backButton: {
33
+ width: 40,
34
+ height: 40,
35
+ borderRadius: 20,
36
+ backgroundColor: '#F3F4F6',
37
+ justifyContent: 'center',
38
+ alignItems: 'center',
39
+ },
40
+ backIcon: {
41
+ fontSize: 28,
42
+ color: '#111827',
43
+ lineHeight: 32,
44
+ fontWeight: '300',
45
+ },
46
+ avatarContainer: {
47
+ marginLeft: 6,
48
+ width: 40,
49
+ height: 40,
50
+ borderRadius: 20,
51
+ overflow: 'hidden',
52
+ justifyContent: 'center',
53
+ alignItems: 'center',
54
+ },
55
+ title: {
56
+ flex: 1,
57
+ fontSize: 18,
58
+ fontWeight: 'bold',
59
+ color: '#111827',
60
+ marginHorizontal: 8,
61
+ },
62
+ titleLeft: { textAlign: 'left' },
63
+ titleCenter: { textAlign: 'center' },
64
+ titleRight: { textAlign: 'right' },
65
+ actionsContainer: {
66
+ flexDirection: 'row',
67
+ alignItems: 'center',
68
+ gap: 4,
69
+ },
70
+ actionButton: {
71
+ width: 40,
72
+ height: 40,
73
+ borderRadius: 20,
74
+ justifyContent: 'center',
75
+ alignItems: 'center',
76
+ },
77
+ badge: {
78
+ position: 'absolute',
79
+ top: 4,
80
+ right: 4,
81
+ minWidth: 16,
82
+ height: 16,
83
+ borderRadius: 8,
84
+ backgroundColor: '#EF4444',
85
+ justifyContent: 'center',
86
+ alignItems: 'center',
87
+ paddingHorizontal: 3,
88
+ },
89
+ badgeText: {
90
+ fontSize: 10,
91
+ fontWeight: '700',
92
+ color: '#FFFFFF',
93
+ },
94
+ });
95
+ //# sourceMappingURL=Header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../src/components/Header/Header.tsx"],"names":[],"mappings":";;;;AACA,+CAAgE;AAGzD,MAAM,MAAM,GAA0B,CAAC,EAC5C,KAAK,EACL,MAAM,EACN,aAAa,GAAG,QAAQ,EACxB,QAAQ,GAAG,KAAK,EAChB,WAAW,EACX,QAAQ,EACR,OAAO,GAAG,EAAE,GACb,EAAE,EAAE;IACH,MAAM,UAAU,GACd,aAAa,KAAK,MAAM;QACtB,CAAC,CAAC,MAAM,CAAC,SAAS;QAClB,CAAC,CAAC,aAAa,KAAK,OAAO;YAC3B,CAAC,CAAC,MAAM,CAAC,UAAU;YACnB,CAAC,CAAC,MAAM,CAAC,WAAW,CAAA;IAExB,MAAM,cAAc,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAE1C,OAAO,CACL,wBAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,aAGvB,QAAQ,CAAC,CAAC,CAAC,CAC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;QACT,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,EAAE;QAChB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACrB;IAED,KAAK,EAAE;QACL,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,CAAC;QACN,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,CAAC;QACf,eAAe,EAAE,SAAS;QAC1B,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,iBAAiB,EAAE,CAAC;KACrB;IAED,SAAS,EAAE;QACT,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,KAAK,EAAE,SAAS;KACjB;CACF,CAAC,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from 'react';
2
+ export interface HeaderAction {
3
+ icon: ReactNode;
4
+ onPress: () => void;
5
+ badge?: number | string;
6
+ }
7
+ export interface HeaderProps {
8
+ title: string;
9
+ avatar?: ReactNode;
10
+ titlePosition?: 'left' | 'center' | 'right';
11
+ /** Back button control */
12
+ showBack?: boolean;
13
+ onBackPress?: () => void;
14
+ backIcon?: ReactNode;
15
+ actions?: HeaderAction[];
16
+ }
17
+ //# sourceMappingURL=Header.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Header.types.d.ts","sourceRoot":"","sources":["../../../src/components/Header/Header.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,SAAS,CAAA;IACf,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;IAE3C,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAA;IAEpB,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;CACzB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Header.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Header.types.js","sourceRoot":"","sources":["../../../src/components/Header/Header.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export { Header } from './Header';
2
+ export type { HeaderProps, HeaderAction } from './Header.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Header/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Header = void 0;
4
+ var Header_1 = require("./Header");
5
+ Object.defineProperty(exports, "Header", { enumerable: true, get: function () { return Header_1.Header; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Header/index.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAAzB,gGAAA,MAAM,OAAA"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { SidebarProps } from './Sidebar.types';
3
+ export declare const Sidebar: React.FC<SidebarProps>;
4
+ export default Sidebar;
5
+ //# sourceMappingURL=Sidebar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/Sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAW9D,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,iBAAiB,CAAC;AAoEjE,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA0N1C,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,224 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Sidebar = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const react_native_1 = require("react-native");
7
+ const { width: SCREEN_WIDTH, height: SCREEN_HEIGHT } = react_native_1.Dimensions.get('window');
8
+ // Get the initial off-screen value based on slide direction
9
+ const getInitialTranslate = (side, width, height) => {
10
+ switch (side) {
11
+ case 'left': return { x: -width, y: 0 };
12
+ case 'right': return { x: width, y: 0 };
13
+ case 'top': return { x: 0, y: -height };
14
+ case 'bottom': return { x: 0, y: height };
15
+ }
16
+ };
17
+ // Position style for the drawer
18
+ const getDrawerPosition = (side, width, height, offsetTop, offsetSide) => {
19
+ switch (side) {
20
+ case 'left':
21
+ return {
22
+ left: offsetSide,
23
+ top: offsetTop,
24
+ bottom: 0,
25
+ width,
26
+ height: undefined,
27
+ };
28
+ case 'right':
29
+ return {
30
+ right: offsetSide,
31
+ top: offsetTop,
32
+ bottom: 0,
33
+ width,
34
+ height: undefined,
35
+ };
36
+ case 'top':
37
+ return {
38
+ top: 0,
39
+ left: 0,
40
+ right: 0,
41
+ height,
42
+ width: undefined,
43
+ };
44
+ case 'bottom':
45
+ return {
46
+ bottom: 0,
47
+ left: 0,
48
+ right: 0,
49
+ height,
50
+ width: undefined,
51
+ };
52
+ }
53
+ };
54
+ // Which corners to round based on slide direction
55
+ const getBorderRadius = (side, radius) => {
56
+ switch (side) {
57
+ case 'left': return { borderTopRightRadius: radius, borderBottomRightRadius: radius };
58
+ case 'right': return { borderTopLeftRadius: radius, borderBottomLeftRadius: radius };
59
+ case 'top': return { borderBottomLeftRadius: radius, borderBottomRightRadius: radius };
60
+ case 'bottom': return { borderTopLeftRadius: radius, borderTopRightRadius: radius };
61
+ }
62
+ };
63
+ const Sidebar = ({ visible, onClose, items, side = 'right', width = SCREEN_WIDTH * 0.56, height = SCREEN_HEIGHT * 0.5, offsetTop = 0, offsetSide = 0, showOverlay = true, overlayColor = 'rgba(0,0,0,0.3)', dismissOnOverlayPress = true, backgroundColor = '#FFFFFF', borderRadius = 0, header, showHeader = true, headerStyle, showIconBackground = false, iconBackgroundColor = 'rgba(0,0,0,0.06)', iconBorderRadius = 8, activeItemColor = '#F3F4F6', itemTextColor = '#111827', badgeBorderRadius = 12, shadow = true, style, itemStyle, itemTextStyle, badgeStyle, badgeTextStyle, }) => {
64
+ const isHorizontal = side === 'left' || side === 'right';
65
+ const initial = getInitialTranslate(side, width, height);
66
+ const translateX = (0, react_1.useRef)(new react_native_1.Animated.Value(initial.x)).current;
67
+ const translateY = (0, react_1.useRef)(new react_native_1.Animated.Value(initial.y)).current;
68
+ const opacityAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(0)).current;
69
+ const animateIn = (0, react_1.useCallback)(() => {
70
+ translateX.setValue(initial.x);
71
+ translateY.setValue(initial.y);
72
+ opacityAnim.setValue(0);
73
+ react_native_1.Animated.parallel([
74
+ react_native_1.Animated.timing(opacityAnim, {
75
+ toValue: 1,
76
+ duration: 220,
77
+ useNativeDriver: true,
78
+ }),
79
+ react_native_1.Animated.spring(translateX, {
80
+ toValue: 0,
81
+ bounciness: 0,
82
+ speed: 20,
83
+ useNativeDriver: true,
84
+ }),
85
+ react_native_1.Animated.spring(translateY, {
86
+ toValue: 0,
87
+ bounciness: 0,
88
+ speed: 20,
89
+ useNativeDriver: true,
90
+ }),
91
+ ]).start();
92
+ }, [translateX, translateY, opacityAnim, initial]);
93
+ const animateOut = (0, react_1.useCallback)((onDone) => {
94
+ react_native_1.Animated.parallel([
95
+ react_native_1.Animated.timing(opacityAnim, {
96
+ toValue: 0,
97
+ duration: 200,
98
+ useNativeDriver: true,
99
+ }),
100
+ react_native_1.Animated.timing(translateX, {
101
+ toValue: initial.x,
102
+ duration: 200,
103
+ useNativeDriver: true,
104
+ }),
105
+ react_native_1.Animated.timing(translateY, {
106
+ toValue: initial.y,
107
+ duration: 200,
108
+ useNativeDriver: true,
109
+ }),
110
+ ]).start(() => onDone?.());
111
+ }, [translateX, translateY, opacityAnim, initial]);
112
+ (0, react_1.useEffect)(() => {
113
+ if (visible) {
114
+ animateIn();
115
+ }
116
+ }, [visible]);
117
+ const handleClose = (0, react_1.useCallback)(() => {
118
+ animateOut(onClose);
119
+ }, [animateOut, onClose]);
120
+ if (!visible)
121
+ return null;
122
+ const positionStyle = getDrawerPosition(side, width, height, offsetTop, offsetSide);
123
+ const radiusStyle = getBorderRadius(side, borderRadius);
124
+ const shadowStyle = shadow ? {
125
+ shadowColor: '#000',
126
+ shadowOffset: { width: side === 'right' ? -2 : 2, height: 4 },
127
+ shadowOpacity: 0.15,
128
+ shadowRadius: 8,
129
+ elevation: 10,
130
+ } : {};
131
+ return ((0, jsx_runtime_1.jsxs)(react_native_1.Modal, { visible: visible, transparent: true, animationType: "none", statusBarTranslucent: true, onRequestClose: handleClose, children: [showOverlay ? ((0, jsx_runtime_1.jsx)(react_native_1.TouchableWithoutFeedback, { onPress: dismissOnOverlayPress ? handleClose : undefined, children: (0, jsx_runtime_1.jsx)(react_native_1.Animated.View, { style: [
132
+ styles.backdrop,
133
+ { backgroundColor: overlayColor, opacity: opacityAnim },
134
+ ] }) })) : (
135
+ // Invisible touch area just to capture taps outside when no overlay
136
+ dismissOnOverlayPress && ((0, jsx_runtime_1.jsx)(react_native_1.TouchableWithoutFeedback, { onPress: handleClose, children: (0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.backdrop }) }))), (0, jsx_runtime_1.jsxs)(react_native_1.Animated.View, { style: [
137
+ styles.drawer,
138
+ positionStyle,
139
+ radiusStyle,
140
+ shadowStyle,
141
+ { backgroundColor, transform: [{ translateX }, { translateY }] },
142
+ style,
143
+ ], children: [header && showHeader && ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: [styles.header, headerStyle], children: header })), (0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.menuContainer, children: items.map((item) => ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { style: ({ pressed }) => [
144
+ styles.menuItem,
145
+ pressed && { backgroundColor: activeItemColor },
146
+ itemStyle,
147
+ ], onPress: () => {
148
+ handleClose();
149
+ setTimeout(() => item.onPress(), 220);
150
+ }, android_ripple: { color: 'rgba(0,0,0,0.05)', borderless: false }, children: (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles.menuItemContent, children: [item.icon && ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: [
151
+ styles.iconContainer,
152
+ showIconBackground && {
153
+ backgroundColor: iconBackgroundColor,
154
+ borderRadius: iconBorderRadius,
155
+ width: 36,
156
+ height: 36,
157
+ },
158
+ ], children: item.icon })), (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [
159
+ styles.menuItemText,
160
+ { color: itemTextColor },
161
+ itemTextStyle,
162
+ ], children: item.title }), item.badge !== undefined && ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: [
163
+ styles.badge,
164
+ { borderRadius: badgeBorderRadius },
165
+ item.badgeColor ? { backgroundColor: item.badgeColor } : null,
166
+ badgeStyle,
167
+ ], children: (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.badgeText, badgeTextStyle], children: typeof item.badge === 'number' && item.badge > 99
168
+ ? '99+'
169
+ : item.badge }) }))] }) }, item.id))) })] })] }));
170
+ };
171
+ exports.Sidebar = Sidebar;
172
+ exports.default = exports.Sidebar;
173
+ const styles = react_native_1.StyleSheet.create({
174
+ backdrop: {
175
+ ...react_native_1.StyleSheet.absoluteFillObject,
176
+ },
177
+ drawer: {
178
+ position: 'absolute',
179
+ overflow: 'hidden',
180
+ zIndex: 10,
181
+ },
182
+ header: {
183
+ borderBottomWidth: react_native_1.StyleSheet.hairlineWidth,
184
+ borderBottomColor: '#E5E7EB',
185
+ },
186
+ menuContainer: {
187
+ paddingVertical: 8,
188
+ },
189
+ menuItem: {
190
+ paddingHorizontal: 16,
191
+ paddingVertical: 14,
192
+ marginHorizontal: 8,
193
+ marginVertical: 2,
194
+ borderRadius: 8,
195
+ },
196
+ menuItemContent: {
197
+ flexDirection: 'row',
198
+ alignItems: 'center',
199
+ gap: 12,
200
+ },
201
+ iconContainer: {
202
+ alignItems: 'center',
203
+ justifyContent: 'center',
204
+ },
205
+ menuItemText: {
206
+ flex: 1,
207
+ fontSize: 15,
208
+ fontWeight: '500',
209
+ },
210
+ badge: {
211
+ minWidth: 20,
212
+ height: 20,
213
+ backgroundColor: '#6B7280',
214
+ justifyContent: 'center',
215
+ alignItems: 'center',
216
+ paddingHorizontal: 6,
217
+ },
218
+ badgeText: {
219
+ color: '#FFFFFF',
220
+ fontSize: 11,
221
+ fontWeight: '700',
222
+ },
223
+ });
224
+ //# sourceMappingURL=Sidebar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.js","sourceRoot":"","sources":["../../../src/components/Sidebar/Sidebar.tsx"],"names":[],"mappings":";;;;AAAA,iCAA8D;AAC9D,+CASsB;AAGtB,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,yBAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAEhF,4DAA4D;AAC5D,MAAM,mBAAmB,GAAG,CAAC,IAAiB,EAAE,KAAa,EAAE,MAAc,EAAE,EAAE;IAC/E,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,MAAM,CAAC,CAAG,OAAO,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;QAC1C,KAAK,OAAO,CAAC,CAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAG,CAA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K,EAAE,SAAS;QAChB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KAClB;CACF,CAAC,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { ReactNode } from 'react';
2
+ import { TextStyle, ViewStyle } from 'react-native';
3
+ export type SidebarSide = 'left' | 'right' | 'top' | 'bottom';
4
+ export interface SidebarMenuItem {
5
+ id: string;
6
+ title: string;
7
+ icon?: ReactNode;
8
+ onPress: () => void;
9
+ badge?: number | string;
10
+ badgeColor?: string;
11
+ }
12
+ export interface SidebarProps {
13
+ visible: boolean;
14
+ onClose: () => void;
15
+ items: SidebarMenuItem[];
16
+ side?: SidebarSide;
17
+ width?: number;
18
+ height?: number;
19
+ offsetTop?: number;
20
+ offsetSide?: number;
21
+ showOverlay?: boolean;
22
+ overlayColor?: string;
23
+ dismissOnOverlayPress?: boolean;
24
+ backgroundColor?: string;
25
+ borderRadius?: number;
26
+ header?: ReactNode;
27
+ showHeader?: boolean;
28
+ headerStyle?: ViewStyle;
29
+ showIconBackground?: boolean;
30
+ iconBackgroundColor?: string;
31
+ iconBorderRadius?: number;
32
+ activeItemColor?: string;
33
+ itemTextColor?: string;
34
+ badgeBorderRadius?: number;
35
+ shadow?: boolean;
36
+ style?: ViewStyle;
37
+ itemStyle?: ViewStyle;
38
+ itemTextStyle?: TextStyle;
39
+ badgeStyle?: ViewStyle;
40
+ badgeTextStyle?: TextStyle;
41
+ }
42
+ //# sourceMappingURL=Sidebar.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.types.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/Sidebar.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE9D,MAAM,WAAW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EAAE,SAAS,CAAC;IACvB,cAAc,CAAC,EAAE,SAAS,CAAC;CAC5B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Sidebar.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.types.js","sourceRoot":"","sources":["../../../src/components/Sidebar/Sidebar.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export { Sidebar } from './Sidebar';
2
+ export type { SidebarProps, SidebarMenuItem, SidebarSide } from './Sidebar.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Sidebar = void 0;
4
+ var Sidebar_1 = require("./Sidebar");
5
+ Object.defineProperty(exports, "Sidebar", { enumerable: true, get: function () { return Sidebar_1.Sidebar; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Sidebar/index.ts"],"names":[],"mappings":";;;AAAA,qCAAoC;AAA3B,kGAAA,OAAO,OAAA"}
@@ -1,10 +1,12 @@
1
+ export * from './Alert';
2
+ export * from './BottomSheet';
1
3
  export * from './Button';
2
4
  export * from './Card';
3
- export * from './BottomSheet';
4
- export * from './ImagePreview';
5
- export * from './HeaderWithBack';
6
5
  export * from './EmptyState';
6
+ export * from './Fab';
7
+ export * from './Header';
8
+ export * from './ImagePreview';
7
9
  export * from './PhoneInput';
10
+ export * from './Sidebar';
8
11
  export * from './Toast';
9
- export * from './Fab';
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
@@ -14,13 +14,15 @@ 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
+ __exportStar(require("./Alert"), exports);
18
+ __exportStar(require("./BottomSheet"), exports);
17
19
  __exportStar(require("./Button"), exports);
18
20
  __exportStar(require("./Card"), exports);
19
- __exportStar(require("./BottomSheet"), exports);
20
- __exportStar(require("./ImagePreview"), exports);
21
- __exportStar(require("./HeaderWithBack"), exports);
22
21
  __exportStar(require("./EmptyState"), exports);
22
+ __exportStar(require("./Fab"), exports);
23
+ __exportStar(require("./Header"), exports);
24
+ __exportStar(require("./ImagePreview"), exports);
23
25
  __exportStar(require("./PhoneInput"), exports);
26
+ __exportStar(require("./Sidebar"), exports);
24
27
  __exportStar(require("./Toast"), exports);
25
- __exportStar(require("./Fab"), exports);
26
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,yCAAuB;AACvB,gDAA8B;AAC9B,iDAA+B;AAC/B,mDAAgC;AAChC,+CAA6B;AAC7B,+CAA6B;AAC7B,0CAAwB;AACxB,wCAAsB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,gDAA8B;AAC9B,2CAAyB;AACzB,yCAAuB;AACvB,+CAA6B;AAC7B,wCAAsB;AACtB,2CAAyB;AACzB,iDAA+B;AAC/B,+CAA6B;AAC7B,4CAA0B;AAC1B,0CAAwB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prizmux",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
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
- "license": "MIT",
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",