@umituz/react-native-design-system 2.6.96 → 2.6.98

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-design-system",
3
- "version": "2.6.96",
3
+ "version": "2.6.98",
4
4
  "description": "Universal design system for React Native apps - Consolidated package with atoms, molecules, organisms, theme, typography, responsive and safe area utilities",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -98,8 +98,10 @@ export {
98
98
  NavigationCleanupManager,
99
99
  AppNavigation,
100
100
  TabLabel,
101
+ NavigationHeader, // Added
101
102
  useTabBarStyles,
102
103
  useTabConfig,
104
+ type NavigationHeaderProps, // Added
103
105
  type TabsNavigatorProps,
104
106
  type StackNavigatorProps,
105
107
  type FabButtonProps,
@@ -166,4 +168,9 @@ export {
166
168
  // GlowingCard
167
169
  GlowingCard,
168
170
  type GlowingCardProps,
171
+ // Filter Group
172
+ FilterGroup,
173
+ type FilterGroupProps,
174
+ type FilterItem,
169
175
  } from '../molecules';
176
+
@@ -0,0 +1,58 @@
1
+
2
+ import React from 'react';
3
+ import { ScrollView, StyleSheet, ViewStyle } from 'react-native';
4
+ import { AtomicChip } from '../../atoms/chip';
5
+ import { useAppDesignTokens } from '../../theme';
6
+ import type { FilterGroupProps } from './types';
7
+
8
+ export function FilterGroup<T = string>({
9
+ items,
10
+ selectedValue,
11
+ onSelect,
12
+ style,
13
+ contentContainerStyle,
14
+ itemStyle,
15
+ }: FilterGroupProps<T>) {
16
+ const tokens = useAppDesignTokens();
17
+
18
+ const styles = StyleSheet.create({
19
+ container: {
20
+ flexGrow: 0,
21
+ },
22
+ content: {
23
+ paddingHorizontal: tokens.spacing.md,
24
+ gap: tokens.spacing.sm,
25
+ alignItems: 'center',
26
+ },
27
+ item: {
28
+ // Default styles if needed, though AtomicChip handles most
29
+ },
30
+ });
31
+
32
+ return (
33
+ <ScrollView
34
+ horizontal
35
+ showsHorizontalScrollIndicator={false}
36
+ style={[styles.container, style]}
37
+ contentContainerStyle={[styles.content, contentContainerStyle]}
38
+ >
39
+ {items.map((item) => {
40
+ const isSelected = item.value === selectedValue;
41
+ return (
42
+ <AtomicChip
43
+ key={`${item.value}`}
44
+ variant={isSelected ? 'filled' : 'outlined'}
45
+ color={isSelected ? 'primary' : 'surface'}
46
+ selected={isSelected}
47
+ onPress={() => onSelect(item.value)}
48
+ clickable
49
+ style={[styles.item, itemStyle]}
50
+ testID={item.testID}
51
+ >
52
+ {item.label}
53
+ </AtomicChip>
54
+ );
55
+ })}
56
+ </ScrollView>
57
+ );
58
+ }
@@ -0,0 +1,3 @@
1
+
2
+ export * from './FilterGroup';
3
+ export * from './types';
@@ -0,0 +1,15 @@
1
+
2
+ export interface FilterItem<T = string> {
3
+ label: string;
4
+ value: T;
5
+ testID?: string;
6
+ }
7
+
8
+ export interface FilterGroupProps<T = string> {
9
+ items: FilterItem<T>[];
10
+ selectedValue: T;
11
+ onSelect: (value: T) => void;
12
+ style?: any;
13
+ contentContainerStyle?: any;
14
+ itemStyle?: any;
15
+ }
@@ -64,3 +64,5 @@ export * from './splash';
64
64
 
65
65
  // GlowingCard
66
66
  export { GlowingCard, type GlowingCardProps } from './GlowingCard';
67
+ export * from './filter-group';
68
+