ikualo-ui-kit-mobile 2.1.4 → 2.1.6

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/app.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "ikualo-app-2.0",
4
4
  "slug": "ikualo-app-20",
5
5
  "owner": "ikualo",
6
- "version": "2.1.4",
6
+ "version": "2.1.6",
7
7
  "orientation": "portrait",
8
8
  "icon": "./assets/icon.png",
9
9
  "userInterfaceStyle": "automatic",
@@ -1,31 +1,32 @@
1
1
  import { StyleSheet } from 'react-native';
2
2
  import { ITheme } from '../../../src/models';
3
- export const getStyleTabs = (theme: ITheme) => StyleSheet.create({
4
- 'tab-container': {
5
- padding: 4,
6
- borderRadius: 4,
7
- borderColor: theme.colors.transparent,
8
- backgroundColor: theme.colors.background_tab,
9
- },
10
- tab: {
11
- borderRadius: 4,
12
- borderColor: theme.colors.transparent,
13
- paddingVertical: 0,
14
- },
15
- 'tab--active': {
16
- backgroundColor: theme.colors.background_card,
17
- },
18
- 'tab-txt': {
19
- fontFamily: 'MontserratBold',
20
- fontSize: 14,
21
- lineHeight: 16,
22
- color: theme.colors.text_btn_disabled,
23
- },
24
- 'tab-txt--active': {
25
- fontFamily: 'MontserratBold',
26
- fontSize: 14,
27
- lineHeight: 16,
28
- color: theme.colors.icon,
29
-
30
- },
31
- });
3
+ export const getStyleTabs = (theme: ITheme) =>
4
+ StyleSheet.create({
5
+ 'tab-container': {
6
+ padding: 4,
7
+ borderRadius: 40,
8
+ borderColor: theme.colors.transparent,
9
+ backgroundColor: theme.colors.background_tab,
10
+ },
11
+ tab: {
12
+ borderRadius: 40,
13
+ borderColor: theme.colors.transparent,
14
+ paddingVertical: 0,
15
+ },
16
+ 'tab--active': {
17
+ borderRadius: 40,
18
+ backgroundColor: theme.colors.background_card,
19
+ },
20
+ 'tab-txt': {
21
+ fontFamily: 'MontserratBold',
22
+ fontSize: 14,
23
+ lineHeight: 16,
24
+ color: theme.colors.text_btn_disabled,
25
+ },
26
+ 'tab-txt--active': {
27
+ fontFamily: 'MontserratBold',
28
+ fontSize: 14,
29
+ lineHeight: 16,
30
+ color: theme.colors.icon,
31
+ },
32
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ikualo-ui-kit-mobile",
3
- "version": "2.1.4",
3
+ "version": "2.1.6",
4
4
  "main": "src/index.ts",
5
5
  "scripts": {
6
6
  "start": "expo start",
@@ -31,16 +31,13 @@ class PriorityManager {
31
31
  // Si hay un diálogo actual y el nuevo tiene mayor prioridad, cerrar el actual
32
32
  if (this.currentDialog && priority > this.currentDialog.priority) {
33
33
  this.currentDialog.onDismiss();
34
- this.currentDialog = null; // Eliminar completamente de memoria
34
+ this.currentDialog = null;
35
35
  }
36
36
 
37
37
  // Si no hay diálogo actual o el nuevo tiene mayor prioridad, mostrarlo
38
38
  if (!this.currentDialog || priority > this.currentDialog.priority) {
39
39
  this.currentDialog = { id, priority, onDismiss };
40
40
  this.notify();
41
- } else {
42
- // Si el diálogo no puede mostrarse por prioridad menor, eliminarlo completamente
43
- // No mantener referencia alguna al diálogo rechazado
44
41
  }
45
42
  }
46
43
 
@@ -62,13 +59,16 @@ class PriorityManager {
62
59
  }
63
60
  }
64
61
 
65
- export const DialogDown = (props: IDialogDown & { priority?: 0 | 1 | 2 | 3 | 4 | 5 }) => {
62
+ export const DialogDown = (props: IDialogDown & { priority?: 0 | 1 | 2 | 3 | 4 | 5; id?: string }) => {
66
63
  const theme = useStore().theme;
67
64
  const stylesDialog = getStylesDialog(theme);
68
- const { isVisible, title, children, onDismiss, image, showCloseButton = true, priority = 0 } = props;
65
+ const { isVisible, title, children, onDismiss, image, showCloseButton = true, priority = 0, id } = props;
69
66
  const slideAnim = useRef(new Animated.Value(0)).current;
70
67
  const [currentDialog, setCurrentDialog] = useState<{ id: string; priority: number } | null>(null);
71
- const [dialogId] = useState(() => Math.random().toString(36).substring(2, 11));
68
+ const [dialogId] = useState(() => {
69
+ // Si se proporciona un id, usarlo. Si no, generar uno aleatorio
70
+ return id || Math.random().toString(36).substring(2, 11);
71
+ });
72
72
  const priorityManager = useRef(PriorityManager.getInstance());
73
73
 
74
74
  const handleDismissKeyboard = () => {
@@ -85,7 +85,7 @@ export const DialogDown = (props: IDialogDown & { priority?: 0 | 1 | 2 | 3 | 4 |
85
85
  return () => {
86
86
  unsubscribe();
87
87
  };
88
- }, []);
88
+ }, [dialogId]);
89
89
 
90
90
  // Manejar cuando se debe mostrar/ocultar el diálogo
91
91
  useEffect(() => {
@@ -120,6 +120,7 @@ export interface ICheckboxComponent {
120
120
  label?: string;
121
121
  }
122
122
  export interface IDialogDown {
123
+ id?: string;
123
124
  isVisible: boolean;
124
125
  title?: string;
125
126
  showCloseButton?: boolean;