@umituz/react-native-ai-creations 1.2.12 → 1.2.13

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-ai-creations",
3
- "version": "1.2.12",
3
+ "version": "1.2.13",
4
4
  "description": "AI-generated creations gallery with filtering, sharing, and management for React Native apps",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -20,6 +20,8 @@ export interface CreationsTranslations {
20
20
  readonly deleteMessage: string;
21
21
  readonly photoCount: string;
22
22
  readonly filterAll: string;
23
+ readonly filterLabel: string;
24
+ readonly filterTitle: string;
23
25
  }
24
26
 
25
27
  /**
@@ -61,6 +63,8 @@ export const DEFAULT_TRANSLATIONS: CreationsTranslations = {
61
63
  deleteMessage: "creations.deleteMessage",
62
64
  photoCount: "creations.photoCount",
63
65
  filterAll: "creations.filterAll",
66
+ filterLabel: "common.filter",
67
+ filterTitle: "common.filter",
64
68
  };
65
69
 
66
70
  export const DEFAULT_CONFIG: CreationsConfig = {
@@ -8,6 +8,8 @@ interface GalleryHeaderProps {
8
8
  readonly countLabel: string;
9
9
  readonly isFiltered: boolean;
10
10
  readonly onFilterPress: () => void;
11
+ readonly filterLabel?: string;
12
+ readonly filterIcon?: any;
11
13
  readonly style?: any;
12
14
  }
13
15
 
@@ -17,6 +19,8 @@ export const GalleryHeader: React.FC<GalleryHeaderProps> = ({
17
19
  countLabel,
18
20
  isFiltered,
19
21
  onFilterPress,
22
+ filterLabel = 'Filter',
23
+ filterIcon = 'filter-outline',
20
24
  style,
21
25
  }) => {
22
26
  const tokens = useAppDesignTokens();
@@ -33,14 +37,15 @@ export const GalleryHeader: React.FC<GalleryHeaderProps> = ({
33
37
  <TouchableOpacity
34
38
  onPress={onFilterPress}
35
39
  style={[styles.filterButton, isFiltered && styles.filterButtonActive]}
40
+ activeOpacity={0.7}
36
41
  >
37
42
  <AtomicIcon
38
- name="ListFilter"
43
+ name={filterIcon}
39
44
  size="sm"
40
45
  color={isFiltered ? "primary" : "secondary"}
41
46
  />
42
47
  <AtomicText style={[styles.filterText, { color: isFiltered ? tokens.colors.primary : tokens.colors.textSecondary }]}>
43
- Filter
48
+ {filterLabel}
44
49
  </AtomicText>
45
50
  {isFiltered && (
46
51
  <View style={styles.badge} />
@@ -73,12 +73,12 @@ export function CreationsGalleryScreen({
73
73
  if (config.types.length > 0) {
74
74
  categories.push({
75
75
  id: 'type',
76
- title: t('creations.category') || 'Category',
76
+ title: t(config.translations.filterTitle) || t('creations.category') || 'Category',
77
77
  multiSelect: false,
78
- options: config.types.map(t => ({
79
- id: t.id,
80
- label: t.labelKey,
81
- icon: 'Image',
78
+ options: config.types.map(type => ({
79
+ id: type.id,
80
+ label: t(type.labelKey),
81
+ icon: type.icon || 'Image',
82
82
  }))
83
83
  });
84
84
  }
@@ -218,6 +218,7 @@ export function CreationsGalleryScreen({
218
218
  count={filtered.length}
219
219
  countLabel={t(config.translations.photoCount) || 'photos'}
220
220
  isFiltered={isFiltered}
221
+ filterLabel={t(config.translations.filterLabel) || 'Filter'}
221
222
  onFilterPress={() => filterSheetRef.current?.present()}
222
223
  style={{ paddingTop: insets.top }}
223
224
  />
@@ -256,7 +257,7 @@ export function CreationsGalleryScreen({
256
257
  toggleFilter(id, category?.multiSelect);
257
258
  }}
258
259
  onClearFilters={clearFilters}
259
- title={t("common.filter")}
260
+ title={t(config.translations.filterTitle) || t("common.filter")}
260
261
  />
261
262
  </View>
262
263
  );