conexys-elements 1.0.16
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/README.md +81 -0
- package/dist/index.esm.js +45472 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +45544 -0
- package/dist/index.js.map +1 -0
- package/package.json +61 -0
package/README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Conexys Components
|
|
2
|
+
|
|
3
|
+
Biblioteca de componentes React para proyectos Conexys.
|
|
4
|
+
|
|
5
|
+
## Instalación
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install conexys-elements
|
|
9
|
+
# o usando yarn
|
|
10
|
+
yarn add conexys-elements
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Dependencias
|
|
14
|
+
|
|
15
|
+
Este paquete tiene como peer dependencies:
|
|
16
|
+
|
|
17
|
+
- react >= 18.0.0
|
|
18
|
+
- react-dom >= 18.0.0
|
|
19
|
+
- @mui/material >= 5.0.0
|
|
20
|
+
- @mui/icons-material >= 5.0.0
|
|
21
|
+
- axios >= 1.0.0
|
|
22
|
+
- react-i18next >= 12.0.0
|
|
23
|
+
- react-helmet-async >= 1.3.0
|
|
24
|
+
- react-router-dom >= 6.0.0
|
|
25
|
+
- sweetalert2 >= 11.0.0
|
|
26
|
+
- sweetalert2-react-content >= 5.0.0
|
|
27
|
+
- date-fns >= 2.28.0
|
|
28
|
+
- date-fns-tz >= 1.3.0
|
|
29
|
+
- react-select >= 5.0.0
|
|
30
|
+
- @fingerprintjs/fingerprintjs >= 3.3.0
|
|
31
|
+
|
|
32
|
+
Asegúrate de instalar estas dependencias en tu proyecto:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install react react-dom @mui/material @mui/icons-material axios react-i18next react-helmet-async react-router-dom sweetalert2 sweetalert2-react-content date-fns date-fns-tz react-select @fingerprintjs/fingerprintjs
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Uso
|
|
39
|
+
|
|
40
|
+
```jsx
|
|
41
|
+
import { Card, Loading, ActionButtons } from 'conexys-elements';
|
|
42
|
+
|
|
43
|
+
function MyComponent() {
|
|
44
|
+
return (
|
|
45
|
+
<div>
|
|
46
|
+
<Card title="Mi Tarjeta">
|
|
47
|
+
Contenido de la tarjeta
|
|
48
|
+
</Card>
|
|
49
|
+
|
|
50
|
+
<ActionButtons
|
|
51
|
+
onCancel={() => console.log('Cancelado')}
|
|
52
|
+
onSubmit={() => console.log('Enviado')}
|
|
53
|
+
cancelText="Cancelar"
|
|
54
|
+
submitText="Enviar"
|
|
55
|
+
/>
|
|
56
|
+
</div>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Inicialización de servicios compartidos
|
|
62
|
+
|
|
63
|
+
Para inicializar los servicios compartidos en tu aplicación:
|
|
64
|
+
|
|
65
|
+
```jsx
|
|
66
|
+
import { initializeSharedServices, initializeSharedComponents } from 'conexys-elements';
|
|
67
|
+
|
|
68
|
+
// En tu componente principal o archivo de inicialización
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
initializeSharedServices();
|
|
71
|
+
initializeSharedComponents();
|
|
72
|
+
}, []);
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Archivos de idioma
|
|
76
|
+
|
|
77
|
+
El paquete incluye traducciones básicas en español y catalán. Para usarlas, configura i18next con la ruta correcta a los archivos de idioma que se encuentran en `node_modules/conexys-elements/dist/language/`.
|
|
78
|
+
|
|
79
|
+
## Licencia
|
|
80
|
+
|
|
81
|
+
MIT
|