helppeople-ui 1.9.6 → 1.10.1
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/dist/components/CustomFeedbackProvider/CustomFeedbackProvider.d.ts +32 -0
- package/dist/components/CustomImage/CustomImage.d.ts +62 -0
- package/dist/examples/CustomImageExample/CustomImageExample.d.ts +3 -0
- package/dist/index.d.ts +5 -0
- package/dist/my-library.cjs.js +7 -7
- package/dist/my-library.es.js +896 -829
- package/package.json +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { NotificationInstance } from 'antd/es/notification/interface';
|
|
3
|
+
import { MessageInstance } from 'antd/es/message/interface';
|
|
4
|
+
import { HookAPI as ModalHookAPI } from 'antd/es/modal/useModal';
|
|
5
|
+
/** Valor del contexto con las APIs de feedback */
|
|
6
|
+
export interface FeedbackContextValue {
|
|
7
|
+
notification: NotificationInstance;
|
|
8
|
+
message: MessageInstance;
|
|
9
|
+
modal: ModalHookAPI;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Hook para acceder a las APIs de feedback (notification, message, modal).
|
|
13
|
+
* Debe usarse dentro de CustomFeedbackProvider.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const { notification, message, modal } = useFeedback();
|
|
17
|
+
* notification.success({ message: "Guardado" });
|
|
18
|
+
* message.info("Procesando...");
|
|
19
|
+
* modal.confirm({ title: "¿Estás seguro?", onOk: () => ... });
|
|
20
|
+
*/
|
|
21
|
+
export declare const useFeedback: () => FeedbackContextValue;
|
|
22
|
+
interface FeedbackProviderProps {
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
/** Called once when feedback APIs are available — use to register imperative services */
|
|
25
|
+
onReady?: (apis: FeedbackContextValue) => void;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Provider principal. Envuelve en <AntdApp component={false}> para obtener
|
|
29
|
+
* las APIs sin crear un div wrapper ni un ConfigProvider fantasma.
|
|
30
|
+
*/
|
|
31
|
+
declare const CustomFeedbackProvider: React.FC<FeedbackProviderProps>;
|
|
32
|
+
export default CustomFeedbackProvider;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Image as AntImage, ImageProps as AntImageProps } from 'antd';
|
|
3
|
+
export interface CustomImageConfig extends AntImageProps {
|
|
4
|
+
/**
|
|
5
|
+
* URL de la imagen
|
|
6
|
+
*/
|
|
7
|
+
src?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Ancho de la imagen
|
|
10
|
+
*/
|
|
11
|
+
width?: string | number;
|
|
12
|
+
/**
|
|
13
|
+
* Alto de la imagen
|
|
14
|
+
*/
|
|
15
|
+
height?: string | number;
|
|
16
|
+
/**
|
|
17
|
+
* Texto alternativo
|
|
18
|
+
*/
|
|
19
|
+
alt?: string;
|
|
20
|
+
/**
|
|
21
|
+
* URL de imagen fallback cuando falla la carga
|
|
22
|
+
*/
|
|
23
|
+
fallback?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Placeholder mientras carga la imagen (true para placeholder por defecto)
|
|
26
|
+
*/
|
|
27
|
+
placeholder?: React.ReactNode | boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Habilitar o configurar la vista previa
|
|
30
|
+
*/
|
|
31
|
+
preview?: boolean | AntImageProps["preview"];
|
|
32
|
+
/**
|
|
33
|
+
* Estilos personalizados
|
|
34
|
+
*/
|
|
35
|
+
style?: React.CSSProperties;
|
|
36
|
+
/**
|
|
37
|
+
* Clases CSS adicionales
|
|
38
|
+
*/
|
|
39
|
+
className?: string;
|
|
40
|
+
}
|
|
41
|
+
declare const CustomImage: React.FC<CustomImageConfig>;
|
|
42
|
+
export interface CustomImagePreviewGroupConfig {
|
|
43
|
+
/**
|
|
44
|
+
* Contenido children (imágenes)
|
|
45
|
+
*/
|
|
46
|
+
children?: React.ReactNode;
|
|
47
|
+
/**
|
|
48
|
+
* Habilitar o configurar la vista previa del grupo
|
|
49
|
+
*/
|
|
50
|
+
preview?: boolean | Parameters<typeof AntImage.PreviewGroup>[0]["preview"];
|
|
51
|
+
/**
|
|
52
|
+
* URL de las imágenes para preview (alternativa a children)
|
|
53
|
+
*/
|
|
54
|
+
items?: string[];
|
|
55
|
+
/**
|
|
56
|
+
* URL de imagen fallback para el grupo
|
|
57
|
+
*/
|
|
58
|
+
fallback?: string;
|
|
59
|
+
}
|
|
60
|
+
declare const CustomImagePreviewGroup: React.FC<CustomImagePreviewGroupConfig>;
|
|
61
|
+
export default CustomImage;
|
|
62
|
+
export { CustomImagePreviewGroup as ImagePreviewGroup };
|
package/dist/index.d.ts
CHANGED
|
@@ -66,6 +66,8 @@ export { default as LibraryThemeProvider } from './theme/LibraryThemeProvider';
|
|
|
66
66
|
export type { CustomButtonConfig, CustomToolbarProps, PageHeaderConfig, } from './components/CustomToolbar/CustomToolbar';
|
|
67
67
|
export type { CustomSubToolbarProps } from './components/CustomSubToolbar/CustomSubToolbar';
|
|
68
68
|
export { default as Message } from './components/CustomMessage/CustomMessage';
|
|
69
|
+
export { default as FeedbackProvider, useFeedback } from './components/CustomFeedbackProvider/CustomFeedbackProvider';
|
|
70
|
+
export type { FeedbackContextValue } from './components/CustomFeedbackProvider/CustomFeedbackProvider';
|
|
69
71
|
export * from './components/Icons/CustomIcon';
|
|
70
72
|
export type { CustomPaginationProps } from './components/CustomPagination/CustomPagination';
|
|
71
73
|
export type { CustomProgressProps } from './components/CustomProgress/CustomProgress';
|
|
@@ -76,4 +78,7 @@ export type { CustomTreeProps, CustomDirectoryTreeProps, } from './components/Cu
|
|
|
76
78
|
export type { CustomAvatarConfig, CustomAvatarGroupConfig } from './components/CustomAvatar/CustomAvatar';
|
|
77
79
|
export { default as Badge } from './components/CustomBadge/CustomBadge';
|
|
78
80
|
export type { CustomBadgeConfig } from './components/CustomBadge/CustomBadge';
|
|
81
|
+
export { default as Image } from './components/CustomImage/CustomImage';
|
|
82
|
+
export { ImagePreviewGroup } from './components/CustomImage/CustomImage';
|
|
83
|
+
export type { CustomImageConfig, CustomImagePreviewGroupConfig } from './components/CustomImage/CustomImage';
|
|
79
84
|
export type { TableColumnsType } from 'antd';
|