@umituz/react-native-ai-creations 1.2.12 → 1.2.14
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
|
@@ -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 = {
|
|
@@ -24,16 +24,18 @@ export const DetailActions: React.FC<DetailActionsProps> = ({
|
|
|
24
24
|
<TouchableOpacity
|
|
25
25
|
style={[styles.button, styles.shareButton]}
|
|
26
26
|
onPress={onShare}
|
|
27
|
+
activeOpacity={0.7}
|
|
27
28
|
>
|
|
28
|
-
<AtomicIcon name="share-social" size="sm" color="
|
|
29
|
+
<AtomicIcon name="share-social-outline" size="sm" color="onPrimary" />
|
|
29
30
|
<AtomicText style={styles.buttonText}>{shareLabel}</AtomicText>
|
|
30
31
|
</TouchableOpacity>
|
|
31
32
|
|
|
32
33
|
<TouchableOpacity
|
|
33
34
|
style={[styles.button, styles.deleteButton]}
|
|
34
35
|
onPress={onDelete}
|
|
36
|
+
activeOpacity={0.7}
|
|
35
37
|
>
|
|
36
|
-
<AtomicIcon name="trash" size="sm" color=
|
|
38
|
+
<AtomicIcon name="trash-outline" size="sm" color="error" />
|
|
37
39
|
<AtomicText style={[styles.buttonText, { color: tokens.colors.error }]}>
|
|
38
40
|
{deleteLabel}
|
|
39
41
|
</AtomicText>
|
|
@@ -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=
|
|
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
|
-
|
|
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(
|
|
79
|
-
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
|
);
|