@suflon/rnmd-reporting 0.0.1 → 0.0.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.
package/src/index.ts ADDED
@@ -0,0 +1,5 @@
1
+ export * from './navigation';
2
+ export { default as Reporting } from './modules/Reporting';
3
+ export { default as ReportingDetail } from './modules/Reporting/component/ReportingDetail';
4
+ export { default as ReportChart } from './modules/Reporting/component/ReportChart';
5
+ export { default as ReportFilterModal } from './modules/Reporting/component/ReportFilterModal';
@@ -115,15 +115,16 @@ const Reporting = ({ onBackPress }: { onBackPress?: () => void } = {}) => {
115
115
  <TouchableOpacity
116
116
  key={pick.id || i}
117
117
  onPress={() => handleReportPress(pick)}
118
+ activeOpacity={0.8}
118
119
  className="w-[170px] bg-white dark:bg-background-darkSecondaryBg rounded-2xl p-3 border border-slate-200 dark:border-gray-800 gap-1.5"
119
120
  >
120
121
  <View className="w-7 h-7 rounded-lg bg-violet-50 dark:bg-violet-950/40 items-center justify-center">
121
122
  <Icon name="bar-chart-2" type="Feather" size={16} color={iconBrandColor} />
122
123
  </View>
123
- <Text style={{ color: isDark ? '#FFFFFF' : '#0F172A' }} className="text-xs font-extrabold" numberOfLines={1}>
124
+ <Text className="text-xs font-extrabold text-slate-900 dark:text-text-dark-primary" numberOfLines={1}>
124
125
  {pick.name}
125
126
  </Text>
126
- <Text className="text-[9px] text-slate-500 dark:text-gray-400" numberOfLines={1}>
127
+ <Text className="text-[9px] font-semibold text-slate-500 dark:text-gray-400" numberOfLines={1}>
127
128
  {pick.sub_report_class ? SUB_CLASS_LABEL_MAP[pick.sub_report_class] || pick.sub_report_class : 'Report'}
128
129
  </Text>
129
130
  </TouchableOpacity>
@@ -144,11 +145,12 @@ const Reporting = ({ onBackPress }: { onBackPress?: () => void } = {}) => {
144
145
  <TouchableOpacity
145
146
  key={tab.id}
146
147
  onPress={() => setActiveTabId(tab.id)}
147
- style={{
148
- backgroundColor: isActive ? themeColors.brand[600] : (isDark ? '#1C1C1E' : '#FFFFFF'),
149
- borderColor: isActive ? themeColors.brand[600] : (isDark ? '#2C2C2E' : '#E2E8F0'),
150
- }}
151
- className="flex-row items-center gap-1.5 px-3.5 py-2 rounded-full border"
148
+ activeOpacity={0.8}
149
+ className={`flex-row items-center gap-1.5 px-3.5 py-2 rounded-full border ${
150
+ isActive
151
+ ? 'bg-violet-600 border-violet-600'
152
+ : 'bg-white dark:bg-background-darkSecondaryBg border-slate-200 dark:border-gray-800'
153
+ }`}
152
154
  >
153
155
  <Icon
154
156
  name={tab.icon}
@@ -157,20 +159,27 @@ const Reporting = ({ onBackPress }: { onBackPress?: () => void } = {}) => {
157
159
  color={isActive ? '#FFFFFF' : (isDark ? '#FFFFFF' : themeColors.slate[600])}
158
160
  />
159
161
  <Text
160
- style={{ color: isActive ? '#FFFFFF' : (isDark ? '#FFFFFF' : '#334155') }}
161
- className="text-[11px] font-bold"
162
+ className={`text-[11px] font-bold ${
163
+ isActive
164
+ ? 'text-white'
165
+ : 'text-slate-700 dark:text-gray-200'
166
+ }`}
162
167
  >
163
168
  {tab.label}
164
169
  </Text>
165
170
  <View
166
- style={{
167
- backgroundColor: isActive ? 'rgba(255, 255, 255, 0.25)' : (isDark ? '#2C2C2E' : '#F1F5F9'),
168
- }}
169
- className="rounded-full px-1.5 py-0.5"
171
+ className={`rounded-full px-1.5 py-0.5 ${
172
+ isActive
173
+ ? 'bg-white/25'
174
+ : 'bg-slate-100 dark:bg-gray-800'
175
+ }`}
170
176
  >
171
177
  <Text
172
- style={{ color: isActive ? '#FFFFFF' : (isDark ? '#FFFFFF' : '#475569') }}
173
- className="text-[9px] font-extrabold"
178
+ className={`text-[9px] font-extrabold ${
179
+ isActive
180
+ ? 'text-white'
181
+ : 'text-slate-600 dark:text-gray-300'
182
+ }`}
174
183
  >
175
184
  {count}
176
185
  </Text>
@@ -189,13 +198,14 @@ const Reporting = ({ onBackPress }: { onBackPress?: () => void } = {}) => {
189
198
  </View>
190
199
  ) : filteredReports.length === 0 ? (
191
200
  <View className="bg-white dark:bg-background-darkSecondaryBg p-8 rounded-2xl items-center mt-2.5 border border-slate-200 dark:border-gray-800">
192
- <Text className="text-slate-500 dark:text-gray-400 text-xs">No reports match the selected category</Text>
201
+ <Text className="text-slate-500 dark:text-gray-400 text-xs font-semibold">No reports match the selected category</Text>
193
202
  </View>
194
203
  ) : (
195
204
  filteredReports.map((item) => (
196
205
  <TouchableOpacity
197
206
  key={item.id}
198
207
  onPress={() => handleReportPress(item)}
208
+ activeOpacity={0.8}
199
209
  className="bg-white dark:bg-background-darkSecondaryBg rounded-2xl p-3.5 border border-slate-200 dark:border-gray-800 flex-row items-center"
200
210
  >
201
211
  <View className="flex-row items-center gap-3 flex-1">
@@ -209,7 +219,7 @@ const Reporting = ({ onBackPress }: { onBackPress?: () => void } = {}) => {
209
219
  </View>
210
220
 
211
221
  <View className="flex-1">
212
- <Text style={{ color: isDark ? '#FFFFFF' : '#0F172A' }} className="text-sm font-extrabold" numberOfLines={1}>
222
+ <Text className="text-[13px] font-extrabold text-slate-900 dark:text-text-dark-primary" numberOfLines={1}>
213
223
  {item.name}
214
224
  </Text>
215
225
  <View className="flex-row items-center gap-1.5 mt-0.5">
@@ -217,7 +227,7 @@ const Reporting = ({ onBackPress }: { onBackPress?: () => void } = {}) => {
217
227
  {SUB_CLASS_LABEL_MAP[item.sub_report_class] || item.sub_report_class || 'Report'}
218
228
  </Text>
219
229
  <Text className="text-[10px] text-slate-400 dark:text-gray-500">•</Text>
220
- <Text className="text-[10px] text-slate-500 dark:text-gray-400">
230
+ <Text className="text-[10px] font-semibold text-slate-500 dark:text-gray-400">
221
231
  {item.report_type || 'LISTING'}
222
232
  </Text>
223
233
  </View>