react-native-unilist 0.1.0
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/LICENSE +20 -0
- package/README.md +516 -0
- package/lib/module/UniList.js +101 -0
- package/lib/module/UniList.js.map +1 -0
- package/lib/module/components/Card.js +94 -0
- package/lib/module/components/Card.js.map +1 -0
- package/lib/module/components/layouts/CarouselLayout.js +88 -0
- package/lib/module/components/layouts/CarouselLayout.js.map +1 -0
- package/lib/module/components/layouts/GridLayout.js +46 -0
- package/lib/module/components/layouts/GridLayout.js.map +1 -0
- package/lib/module/components/layouts/MasonryLayout.js +45 -0
- package/lib/module/components/layouts/MasonryLayout.js.map +1 -0
- package/lib/module/hooks/usePagination.js +113 -0
- package/lib/module/hooks/usePagination.js.map +1 -0
- package/lib/module/hooks/useSearch.js +92 -0
- package/lib/module/hooks/useSearch.js.map +1 -0
- package/lib/module/index.js +19 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/utils/theme.js +236 -0
- package/lib/module/utils/theme.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/UniList.d.ts +34 -0
- package/lib/typescript/src/UniList.d.ts.map +1 -0
- package/lib/typescript/src/components/Card.d.ts +22 -0
- package/lib/typescript/src/components/Card.d.ts.map +1 -0
- package/lib/typescript/src/components/layouts/CarouselLayout.d.ts +14 -0
- package/lib/typescript/src/components/layouts/CarouselLayout.d.ts.map +1 -0
- package/lib/typescript/src/components/layouts/GridLayout.d.ts +11 -0
- package/lib/typescript/src/components/layouts/GridLayout.d.ts.map +1 -0
- package/lib/typescript/src/components/layouts/MasonryLayout.d.ts +9 -0
- package/lib/typescript/src/components/layouts/MasonryLayout.d.ts.map +1 -0
- package/lib/typescript/src/hooks/usePagination.d.ts +23 -0
- package/lib/typescript/src/hooks/usePagination.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useSearch.d.ts +20 -0
- package/lib/typescript/src/hooks/useSearch.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +9 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/utils/theme.d.ts +73 -0
- package/lib/typescript/src/utils/theme.d.ts.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// Predefined color schemes
|
|
4
|
+
export const colorSchemes = {
|
|
5
|
+
blue: {
|
|
6
|
+
primary: '#007AFF',
|
|
7
|
+
secondary: '#5856D6',
|
|
8
|
+
success: '#34C759',
|
|
9
|
+
warning: '#FF9500',
|
|
10
|
+
error: '#FF3B30',
|
|
11
|
+
info: '#5AC8FA'
|
|
12
|
+
},
|
|
13
|
+
green: {
|
|
14
|
+
primary: '#34C759',
|
|
15
|
+
secondary: '#30D158',
|
|
16
|
+
success: '#34C759',
|
|
17
|
+
warning: '#FF9500',
|
|
18
|
+
error: '#FF3B30',
|
|
19
|
+
info: '#5AC8FA'
|
|
20
|
+
},
|
|
21
|
+
purple: {
|
|
22
|
+
primary: '#AF52DE',
|
|
23
|
+
secondary: '#5856D6',
|
|
24
|
+
success: '#34C759',
|
|
25
|
+
warning: '#FF9500',
|
|
26
|
+
error: '#FF3B30',
|
|
27
|
+
info: '#5AC8FA'
|
|
28
|
+
},
|
|
29
|
+
orange: {
|
|
30
|
+
primary: '#FF9500',
|
|
31
|
+
secondary: '#FF6B35',
|
|
32
|
+
success: '#34C759',
|
|
33
|
+
warning: '#FF9500',
|
|
34
|
+
error: '#FF3B30',
|
|
35
|
+
info: '#5AC8FA'
|
|
36
|
+
},
|
|
37
|
+
red: {
|
|
38
|
+
primary: '#FF3B30',
|
|
39
|
+
secondary: '#FF6B6B',
|
|
40
|
+
success: '#34C759',
|
|
41
|
+
warning: '#FF9500',
|
|
42
|
+
error: '#FF3B30',
|
|
43
|
+
info: '#5AC8FA'
|
|
44
|
+
},
|
|
45
|
+
custom: {
|
|
46
|
+
primary: '#007AFF',
|
|
47
|
+
secondary: '#5856D6',
|
|
48
|
+
success: '#34C759',
|
|
49
|
+
warning: '#FF9500',
|
|
50
|
+
error: '#FF3B30',
|
|
51
|
+
info: '#5AC8FA'
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
// Light theme
|
|
56
|
+
export const lightTheme = {
|
|
57
|
+
type: 'light',
|
|
58
|
+
colors: {
|
|
59
|
+
primary: '#007AFF',
|
|
60
|
+
secondary: '#5856D6',
|
|
61
|
+
background: '#FFFFFF',
|
|
62
|
+
surface: '#F8F9FA',
|
|
63
|
+
text: '#1A1A1A',
|
|
64
|
+
textSecondary: '#666666',
|
|
65
|
+
border: '#E1E5E9',
|
|
66
|
+
shadow: '#000000',
|
|
67
|
+
success: '#34C759',
|
|
68
|
+
warning: '#FF9500',
|
|
69
|
+
error: '#FF3B30',
|
|
70
|
+
info: '#5AC8FA'
|
|
71
|
+
},
|
|
72
|
+
spacing: {
|
|
73
|
+
xs: 4,
|
|
74
|
+
sm: 8,
|
|
75
|
+
md: 16,
|
|
76
|
+
lg: 24,
|
|
77
|
+
xl: 32,
|
|
78
|
+
xxl: 48
|
|
79
|
+
},
|
|
80
|
+
borderRadius: {
|
|
81
|
+
sm: 4,
|
|
82
|
+
md: 8,
|
|
83
|
+
lg: 12,
|
|
84
|
+
xl: 16
|
|
85
|
+
},
|
|
86
|
+
typography: {
|
|
87
|
+
heading: {
|
|
88
|
+
fontSize: 24,
|
|
89
|
+
fontWeight: '600',
|
|
90
|
+
lineHeight: 32
|
|
91
|
+
},
|
|
92
|
+
subheading: {
|
|
93
|
+
fontSize: 18,
|
|
94
|
+
fontWeight: '500',
|
|
95
|
+
lineHeight: 24
|
|
96
|
+
},
|
|
97
|
+
body: {
|
|
98
|
+
fontSize: 16,
|
|
99
|
+
fontWeight: '400',
|
|
100
|
+
lineHeight: 24
|
|
101
|
+
},
|
|
102
|
+
caption: {
|
|
103
|
+
fontSize: 14,
|
|
104
|
+
fontWeight: '400',
|
|
105
|
+
lineHeight: 20
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
// Dark theme
|
|
111
|
+
export const darkTheme = {
|
|
112
|
+
type: 'dark',
|
|
113
|
+
colors: {
|
|
114
|
+
primary: '#0A84FF',
|
|
115
|
+
secondary: '#5E5CE6',
|
|
116
|
+
background: '#000000',
|
|
117
|
+
surface: '#1C1C1E',
|
|
118
|
+
text: '#FFFFFF',
|
|
119
|
+
textSecondary: '#8E8E93',
|
|
120
|
+
border: '#38383A',
|
|
121
|
+
shadow: '#000000',
|
|
122
|
+
success: '#30D158',
|
|
123
|
+
warning: '#FF9F0A',
|
|
124
|
+
error: '#FF453A',
|
|
125
|
+
info: '#64D2FF'
|
|
126
|
+
},
|
|
127
|
+
spacing: {
|
|
128
|
+
xs: 4,
|
|
129
|
+
sm: 8,
|
|
130
|
+
md: 16,
|
|
131
|
+
lg: 24,
|
|
132
|
+
xl: 32,
|
|
133
|
+
xxl: 48
|
|
134
|
+
},
|
|
135
|
+
borderRadius: {
|
|
136
|
+
sm: 4,
|
|
137
|
+
md: 8,
|
|
138
|
+
lg: 12,
|
|
139
|
+
xl: 16
|
|
140
|
+
},
|
|
141
|
+
typography: {
|
|
142
|
+
heading: {
|
|
143
|
+
fontSize: 24,
|
|
144
|
+
fontWeight: '600',
|
|
145
|
+
lineHeight: 32
|
|
146
|
+
},
|
|
147
|
+
subheading: {
|
|
148
|
+
fontSize: 18,
|
|
149
|
+
fontWeight: '500',
|
|
150
|
+
lineHeight: 24
|
|
151
|
+
},
|
|
152
|
+
body: {
|
|
153
|
+
fontSize: 16,
|
|
154
|
+
fontWeight: '400',
|
|
155
|
+
lineHeight: 24
|
|
156
|
+
},
|
|
157
|
+
caption: {
|
|
158
|
+
fontSize: 14,
|
|
159
|
+
fontWeight: '400',
|
|
160
|
+
lineHeight: 20
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
// Theme manager
|
|
166
|
+
export class ThemeManager {
|
|
167
|
+
currentTheme = lightTheme;
|
|
168
|
+
listeners = [];
|
|
169
|
+
static getInstance() {
|
|
170
|
+
if (!ThemeManager.instance) {
|
|
171
|
+
ThemeManager.instance = new ThemeManager();
|
|
172
|
+
}
|
|
173
|
+
return ThemeManager.instance;
|
|
174
|
+
}
|
|
175
|
+
getTheme() {
|
|
176
|
+
return this.currentTheme;
|
|
177
|
+
}
|
|
178
|
+
setTheme(theme) {
|
|
179
|
+
this.currentTheme = theme;
|
|
180
|
+
this.notifyListeners();
|
|
181
|
+
}
|
|
182
|
+
setThemeType(type, colorScheme = 'blue') {
|
|
183
|
+
let baseTheme;
|
|
184
|
+
switch (type) {
|
|
185
|
+
case 'dark':
|
|
186
|
+
baseTheme = darkTheme;
|
|
187
|
+
break;
|
|
188
|
+
case 'light':
|
|
189
|
+
default:
|
|
190
|
+
baseTheme = lightTheme;
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Apply color scheme
|
|
195
|
+
const schemeColors = colorSchemes[colorScheme];
|
|
196
|
+
const updatedTheme = {
|
|
197
|
+
...baseTheme,
|
|
198
|
+
type,
|
|
199
|
+
colors: {
|
|
200
|
+
...baseTheme.colors,
|
|
201
|
+
...schemeColors
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
this.setTheme(updatedTheme);
|
|
205
|
+
}
|
|
206
|
+
setCustomTheme(customColors) {
|
|
207
|
+
const updatedTheme = {
|
|
208
|
+
...this.currentTheme,
|
|
209
|
+
type: 'custom',
|
|
210
|
+
colors: {
|
|
211
|
+
...this.currentTheme.colors,
|
|
212
|
+
...customColors
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
this.setTheme(updatedTheme);
|
|
216
|
+
}
|
|
217
|
+
subscribe(listener) {
|
|
218
|
+
this.listeners.push(listener);
|
|
219
|
+
return () => {
|
|
220
|
+
const index = this.listeners.indexOf(listener);
|
|
221
|
+
if (index > -1) {
|
|
222
|
+
this.listeners.splice(index, 1);
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
notifyListeners() {
|
|
227
|
+
this.listeners.forEach(listener => listener(this.currentTheme));
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
// Hook for using theme
|
|
232
|
+
export const useTheme = () => {
|
|
233
|
+
// This would need React import, but keeping it simple for now
|
|
234
|
+
return ThemeManager.getInstance().getTheme();
|
|
235
|
+
};
|
|
236
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["colorSchemes","blue","primary","secondary","success","warning","error","info","green","purple","orange","red","custom","lightTheme","type","colors","background","surface","text","textSecondary","border","shadow","spacing","xs","sm","md","lg","xl","xxl","borderRadius","typography","heading","fontSize","fontWeight","lineHeight","subheading","body","caption","darkTheme","ThemeManager","currentTheme","listeners","getInstance","instance","getTheme","setTheme","theme","notifyListeners","setThemeType","colorScheme","baseTheme","schemeColors","updatedTheme","setCustomTheme","customColors","subscribe","listener","push","index","indexOf","splice","forEach","useTheme"],"sourceRoot":"../../../src","sources":["utils/theme.ts"],"mappings":";;AA2DA;AACA,OAAO,MAAMA,YAAuD,GAAG;EACrEC,IAAI,EAAE;IACJC,OAAO,EAAE,SAAS;IAClBC,SAAS,EAAE,SAAS;IACpBC,OAAO,EAAE,SAAS;IAClBC,OAAO,EAAE,SAAS;IAClBC,KAAK,EAAE,SAAS;IAChBC,IAAI,EAAE;EACR,CAAC;EACDC,KAAK,EAAE;IACLN,OAAO,EAAE,SAAS;IAClBC,SAAS,EAAE,SAAS;IACpBC,OAAO,EAAE,SAAS;IAClBC,OAAO,EAAE,SAAS;IAClBC,KAAK,EAAE,SAAS;IAChBC,IAAI,EAAE;EACR,CAAC;EACDE,MAAM,EAAE;IACNP,OAAO,EAAE,SAAS;IAClBC,SAAS,EAAE,SAAS;IACpBC,OAAO,EAAE,SAAS;IAClB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Y,CAAC;EAC7B;EAEAC,cAAcA,CAACC,YAAkC,EAAQ;IACvD,MAAMF,YAAmB,GAAG;MAC1B,GAAG,IAAI,CAACZ,YAAY;MACpB1B,IAAI,EAAE,QAAQ;MACdC,MAAM,EAAE;QACN,GAAG,IAAI,CAACyB,YAAY,CAACzB,MAAM;QAC3B,GAAGuC;MACL;IACF,CAAC;IAED,IAAI,CAACT,QAAQ,CAACO,YAAY,CAAC;EAC7B;EAEAG,SAASA,CAACC,QAAgC,EAAc;IACtD,IAAI,CAACf,SAAS,CAACgB,IAAI,CAACD,QAAQ,CAAC;IAC7B,OAAO,MAAM;MACX,MAAME,KAAK,GAAG,IAAI,CAACjB,SAAS,CAACkB,OAAO,CAACH,QAAQ,CAAC;MAC9C,IAAIE,KAAK,GAAG,CAAC,CAAC,EAAE;QACd,IAAI,CAACjB,SAAS,CAACmB,MAAM,CAACF,KAAK,EAAE,CAAC,CAAC;MACjC;IACF,CAAC;EACH;EAEQX,eAAeA,CAAA,EAAS;IAC9B,IAAI,CAACN,SAAS,CAACoB,OAAO,CAACL,QAAQ,IAAIA,QAAQ,CAAC,IAAI,CAAChB,YAAY,CAAC,CAAC;EACjE;AACF;;AAEA;AACA,OAAO,MAAMsB,QAAQ,GAAGA,CAAA,KAAa;EACnC;EACA,OAAOvB,YAAY,CAACG,WAAW,CAAC,CAAC,CAACE,QAAQ,CAAC,CAAC;AAC9C,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { FlatListProps, ScrollViewProps, StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import React, { type ReactElement, type ReactNode } from 'react';
|
|
3
|
+
type EmptyComponent = ReactElement | null;
|
|
4
|
+
export interface UniListProps<ItemT = any> extends Omit<FlatListProps<ItemT>, 'renderItem' | 'data'>, Omit<ScrollViewProps, 'children'> {
|
|
5
|
+
/** Data array → triggers FlatList mode. If undefined, ScrollView mode. */
|
|
6
|
+
data?: ItemT[];
|
|
7
|
+
/** Render function for each item (FlatList mode) */
|
|
8
|
+
renderItem?: (item: ItemT, index: number) => ReactElement | null;
|
|
9
|
+
/** Children (ScrollView mode) */
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
/** Space (px) between items / children */
|
|
12
|
+
spacing?: number;
|
|
13
|
+
/** Empty‑state UI */
|
|
14
|
+
ListEmptyComponent?: EmptyComponent;
|
|
15
|
+
/** Show when `loading` true AND no data yet */
|
|
16
|
+
loading?: boolean;
|
|
17
|
+
/** Optional custom container style */
|
|
18
|
+
contentContainerStyle?: StyleProp<ViewStyle>;
|
|
19
|
+
}
|
|
20
|
+
/** Imperative actions forwarded to parent */
|
|
21
|
+
export interface UniListRef {
|
|
22
|
+
/** Scroll to item index (FlatList only) */
|
|
23
|
+
scrollToIndex: (opts: {
|
|
24
|
+
index: number;
|
|
25
|
+
animated?: boolean;
|
|
26
|
+
}) => void;
|
|
27
|
+
/** Scroll to top */
|
|
28
|
+
scrollToTop: (animated?: boolean) => void;
|
|
29
|
+
}
|
|
30
|
+
export declare const UniList: <ItemT = any>(p: UniListProps<ItemT> & {
|
|
31
|
+
ref?: React.Ref<UniListRef>;
|
|
32
|
+
}) => ReactElement;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=UniList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UniList.d.ts","sourceRoot":"","sources":["../../../src/UniList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAEb,eAAe,EACf,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,EAEZ,KAAK,YAAY,EACjB,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AAGf,KAAK,cAAc,GAAG,YAAY,GAAG,IAAI,CAAC;AAE1C,MAAM,WAAW,YAAY,CAAC,KAAK,GAAG,GAAG,CACvC,SAAQ,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC,EACvD,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC;IACnC,0EAA0E;IAC1E,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC;IACf,oDAAoD;IACpD,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,YAAY,GAAG,IAAI,CAAC;IACjE,iCAAiC;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qBAAqB;IACrB,kBAAkB,CAAC,EAAE,cAAc,CAAC;IACpC,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sCAAsC;IACtC,qBAAqB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9C;AAED,6CAA6C;AAC7C,MAAM,WAAW,UAAU;IACzB,2CAA2C;IAC3C,aAAa,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IACrE,oBAAoB;IACpB,WAAW,EAAE,CAAC,QAAQ,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CAC3C;AA8GD,eAAO,MAAM,OAAO,EAA+B,CAAC,KAAK,GAAG,GAAG,EAC7D,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;CAAE,KACrD,YAAY,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
export type CardType = 'elevated' | 'outlined' | 'filled' | 'gradient' | 'glass';
|
|
4
|
+
export type CardStyle = 'modern' | 'classic' | 'minimal' | 'material' | 'neumorphic';
|
|
5
|
+
export interface CardProps {
|
|
6
|
+
type?: CardType;
|
|
7
|
+
cardStyle?: CardStyle;
|
|
8
|
+
title?: string;
|
|
9
|
+
subtitle?: string;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
backgroundColor?: string;
|
|
12
|
+
borderRadius?: number;
|
|
13
|
+
elevation?: number;
|
|
14
|
+
style?: StyleProp<ViewStyle>;
|
|
15
|
+
onPress?: () => void;
|
|
16
|
+
}
|
|
17
|
+
export declare const ElevatedCard: React.FC<CardProps>;
|
|
18
|
+
export declare const OutlinedCard: React.FC<CardProps>;
|
|
19
|
+
export declare const FilledCard: React.FC<CardProps>;
|
|
20
|
+
export declare const GradientCard: React.FC<CardProps>;
|
|
21
|
+
export declare const GlassCard: React.FC<CardProps>;
|
|
22
|
+
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;AACjF,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,YAAY,CAAC;AAErF,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAMD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAuC5C,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAE5C,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAE1C,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAE5C,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAEzC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface CarouselLayoutProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
autoplay?: boolean;
|
|
5
|
+
interval?: number;
|
|
6
|
+
showDots?: boolean;
|
|
7
|
+
dotColor?: string;
|
|
8
|
+
activeDotColor?: string;
|
|
9
|
+
itemWidth?: number;
|
|
10
|
+
spacing?: number;
|
|
11
|
+
style?: any;
|
|
12
|
+
}
|
|
13
|
+
export declare const CarouselLayout: React.FC<CarouselLayoutProps>;
|
|
14
|
+
//# sourceMappingURL=CarouselLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CarouselLayout.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/CarouselLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAgFxD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ViewStyle, StyleProp } from 'react-native';
|
|
3
|
+
export interface GridLayoutProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
columns?: number;
|
|
6
|
+
spacing?: number;
|
|
7
|
+
aspectRatio?: number;
|
|
8
|
+
style?: StyleProp<ViewStyle>;
|
|
9
|
+
}
|
|
10
|
+
export declare const GridLayout: React.FC<GridLayoutProps>;
|
|
11
|
+
//# sourceMappingURL=GridLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridLayout.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/GridLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAgDhD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface MasonryLayoutProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
columns?: number;
|
|
5
|
+
spacing?: number;
|
|
6
|
+
style?: any;
|
|
7
|
+
}
|
|
8
|
+
export declare const MasonryLayout: React.FC<MasonryLayoutProps>;
|
|
9
|
+
//# sourceMappingURL=MasonryLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MasonryLayout.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/MasonryLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAkDtD,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface PaginationOptions<T> {
|
|
2
|
+
pageSize: number;
|
|
3
|
+
initialData?: T[];
|
|
4
|
+
onLoadMore?: (page: number) => Promise<T[]>;
|
|
5
|
+
onError?: (error: Error) => void;
|
|
6
|
+
}
|
|
7
|
+
export interface PaginationState<T> {
|
|
8
|
+
data: T[];
|
|
9
|
+
loading: boolean;
|
|
10
|
+
error: Error | null;
|
|
11
|
+
hasMore: boolean;
|
|
12
|
+
currentPage: number;
|
|
13
|
+
totalPages: number;
|
|
14
|
+
totalItems: number;
|
|
15
|
+
}
|
|
16
|
+
export interface PaginationActions {
|
|
17
|
+
loadMore: () => Promise<void>;
|
|
18
|
+
refresh: () => Promise<void>;
|
|
19
|
+
reset: () => void;
|
|
20
|
+
setData: (data: any[]) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare function usePagination<T>({ pageSize, initialData, onLoadMore, onError, }: PaginationOptions<T>): PaginationState<T> & PaginationActions;
|
|
23
|
+
//# sourceMappingURL=usePagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePagination.d.ts","sourceRoot":"","sources":["../../../../src/hooks/usePagination.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,CAAC,EAAE,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IAC5C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;CAChC;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,EAC/B,QAAQ,EACR,WAAgB,EAChB,UAAU,EACV,OAAO,GACR,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,GAAG,iBAAiB,CA+G/D"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface SearchOptions<T> {
|
|
2
|
+
data: T[];
|
|
3
|
+
searchFields: (keyof T)[];
|
|
4
|
+
debounceMs?: number;
|
|
5
|
+
caseSensitive?: boolean;
|
|
6
|
+
highlightResults?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface SearchState<T> {
|
|
9
|
+
query: string;
|
|
10
|
+
results: T[];
|
|
11
|
+
loading: boolean;
|
|
12
|
+
highlightedResults: T[];
|
|
13
|
+
}
|
|
14
|
+
export interface SearchActions {
|
|
15
|
+
setQuery: (query: string) => void;
|
|
16
|
+
clearSearch: () => void;
|
|
17
|
+
search: (query: string) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare function useSearch<T>({ data, searchFields, debounceMs, caseSensitive, highlightResults, }: SearchOptions<T>): SearchState<T> & SearchActions;
|
|
20
|
+
//# sourceMappingURL=useSearch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useSearch.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,YAAY,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,EAAE,CAAC,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,EAC3B,IAAI,EACJ,YAAY,EACZ,UAAgB,EAChB,aAAqB,EACrB,gBAAwB,GACzB,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,aAAa,CA0FnD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { UniList, type UniListProps, type UniListRef } from './UniList';
|
|
2
|
+
export { ElevatedCard, OutlinedCard, FilledCard, GradientCard, GlassCard, type CardProps, type CardType, type CardStyle } from './components/Card';
|
|
3
|
+
export { GridLayout, type GridLayoutProps } from './components/layouts/GridLayout';
|
|
4
|
+
export { CarouselLayout, type CarouselLayoutProps } from './components/layouts/CarouselLayout';
|
|
5
|
+
export { MasonryLayout, type MasonryLayoutProps } from './components/layouts/MasonryLayout';
|
|
6
|
+
export { usePagination, type PaginationOptions, type PaginationState, type PaginationActions } from './hooks/usePagination';
|
|
7
|
+
export { useSearch, type SearchOptions, type SearchState, type SearchActions } from './hooks/useSearch';
|
|
8
|
+
export { ThemeManager, useTheme, lightTheme, darkTheme, colorSchemes, type Theme, type ThemeType, type ColorScheme, type ThemeColors } from './utils/theme';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAGxE,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,SAAS,EACT,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,SAAS,EACf,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACrB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,cAAc,EACd,KAAK,mBAAmB,EACzB,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EACL,aAAa,EACb,KAAK,kBAAkB,EACxB,MAAM,oCAAoC,CAAC;AAG5C,OAAO,EACL,aAAa,EACb,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,aAAa,EACnB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,SAAS,EACT,YAAY,EACZ,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,WAAW,EACjB,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export type ThemeType = 'light' | 'dark' | 'auto' | 'custom';
|
|
2
|
+
export type ColorScheme = 'blue' | 'green' | 'purple' | 'orange' | 'red' | 'custom';
|
|
3
|
+
export interface ThemeColors {
|
|
4
|
+
primary: string;
|
|
5
|
+
secondary: string;
|
|
6
|
+
background: string;
|
|
7
|
+
surface: string;
|
|
8
|
+
text: string;
|
|
9
|
+
textSecondary: string;
|
|
10
|
+
border: string;
|
|
11
|
+
shadow: string;
|
|
12
|
+
success: string;
|
|
13
|
+
warning: string;
|
|
14
|
+
error: string;
|
|
15
|
+
info: string;
|
|
16
|
+
}
|
|
17
|
+
export interface Theme {
|
|
18
|
+
type: ThemeType;
|
|
19
|
+
colors: ThemeColors;
|
|
20
|
+
spacing: {
|
|
21
|
+
xs: number;
|
|
22
|
+
sm: number;
|
|
23
|
+
md: number;
|
|
24
|
+
lg: number;
|
|
25
|
+
xl: number;
|
|
26
|
+
xxl: number;
|
|
27
|
+
};
|
|
28
|
+
borderRadius: {
|
|
29
|
+
sm: number;
|
|
30
|
+
md: number;
|
|
31
|
+
lg: number;
|
|
32
|
+
xl: number;
|
|
33
|
+
};
|
|
34
|
+
typography: {
|
|
35
|
+
heading: {
|
|
36
|
+
fontSize: number;
|
|
37
|
+
fontWeight: string;
|
|
38
|
+
lineHeight: number;
|
|
39
|
+
};
|
|
40
|
+
subheading: {
|
|
41
|
+
fontSize: number;
|
|
42
|
+
fontWeight: string;
|
|
43
|
+
lineHeight: number;
|
|
44
|
+
};
|
|
45
|
+
body: {
|
|
46
|
+
fontSize: number;
|
|
47
|
+
fontWeight: string;
|
|
48
|
+
lineHeight: number;
|
|
49
|
+
};
|
|
50
|
+
caption: {
|
|
51
|
+
fontSize: number;
|
|
52
|
+
fontWeight: string;
|
|
53
|
+
lineHeight: number;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export declare const colorSchemes: Record<ColorScheme, Partial<ThemeColors>>;
|
|
58
|
+
export declare const lightTheme: Theme;
|
|
59
|
+
export declare const darkTheme: Theme;
|
|
60
|
+
export declare class ThemeManager {
|
|
61
|
+
private static instance;
|
|
62
|
+
private currentTheme;
|
|
63
|
+
private listeners;
|
|
64
|
+
static getInstance(): ThemeManager;
|
|
65
|
+
getTheme(): Theme;
|
|
66
|
+
setTheme(theme: Theme): void;
|
|
67
|
+
setThemeType(type: ThemeType, colorScheme?: ColorScheme): void;
|
|
68
|
+
setCustomTheme(customColors: Partial<ThemeColors>): void;
|
|
69
|
+
subscribe(listener: (theme: Theme) => void): () => void;
|
|
70
|
+
private notifyListeners;
|
|
71
|
+
}
|
|
72
|
+
export declare const useTheme: () => Theme;
|
|
73
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/utils/theme.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAC7D,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEpF,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,SA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AC;SACpB,CAAC;KACH,CAAC;CACH;AAGD,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,CAiDlE,CAAC;AAGF,eAAO,MAAM,UAAU,EAAE,KAoDxB,CAAC;AAGF,eAAO,MAAM,SAAS,EAAE,KAoDvB,CAAC;AAGF,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAe;IACtC,OAAO,CAAC,YAAY,CAAqB;IACzC,OAAO,CAAC,SAAS,CAAkC;IAEnD,MAAM,CAAC,WAAW,IAAI,YAAY;IAOlC,QAAQ,IAAI,KAAK;IAIjB,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAK5B,YAAY,CAAC,IAAI,EAAE,SAAS,EAAE,WAAW,GAAE,WAAoB,GAAG,IAAI;IA2BtE,cAAc,CAAC,YAAY,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,IAAI;IAaxD,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,MAAM,IAAI;IAUvD,OAAO,CAAC,eAAe;CAGxB;AAGD,eAAO,MAAM,QAAQ,QAAO,KAG3B,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-native-unilist",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Beautiful FlatList and ScrollView wrapper for React Native",
|
|
5
|
+
"main": "lib/module/index.js",
|
|
6
|
+
"module": "lib/module/index.js",
|
|
7
|
+
"types": "lib/typescript/src/index.d.ts",
|
|
8
|
+
"files": ["lib"],
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/SamadK01/react-native-unilist.git"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"react-native",
|
|
15
|
+
"flatlist",
|
|
16
|
+
"scrollview",
|
|
17
|
+
"list",
|
|
18
|
+
"unilist"
|
|
19
|
+
],
|
|
20
|
+
"author": "SamadK01",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"react-native-builder-bob": "^0.40.8"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"react": "*",
|
|
27
|
+
"react-native": "*"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"prepare": "bob build"
|
|
31
|
+
},
|
|
32
|
+
"react-native-builder-bob": {
|
|
33
|
+
"source": "src",
|
|
34
|
+
"output": "lib",
|
|
35
|
+
"targets": [
|
|
36
|
+
[
|
|
37
|
+
"module",
|
|
38
|
+
{ "esm": true }
|
|
39
|
+
],
|
|
40
|
+
[
|
|
41
|
+
"typescript",
|
|
42
|
+
{ "project": "tsconfig.build.json" }
|
|
43
|
+
]
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
}
|