siam-ui-utils 2.0.6 → 2.1.0

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.
Files changed (60) hide show
  1. package/.eslintrc +73 -0
  2. package/.eslintrc.mjs +53 -0
  3. package/.prettierrc +7 -0
  4. package/.prettierrc.js +5 -0
  5. package/.storybook/css/bootstrap.min.css +6 -0
  6. package/.storybook/css/bootstrap.rtl.only.min.css +1428 -0
  7. package/.storybook/main.ts +17 -0
  8. package/.storybook/preview.ts +16 -0
  9. package/eslint.config.js +28 -0
  10. package/index.d.ts +0 -53
  11. package/index.html +12 -0
  12. package/package.json +87 -70
  13. package/src/App.jsx +43 -0
  14. package/src/IntlMessages.jsx +7 -0
  15. package/src/bridges/{with-router-bridge.jsx → index.jsx} +1 -1
  16. package/src/constants.js +9 -0
  17. package/src/dropzone-uploader/DropzoneUploader.stories.tsx +32 -0
  18. package/src/dropzone-uploader/dropzone-uploader.css +66 -0
  19. package/src/{archivos-adjuntos → dropzone-uploader}/index.jsx +10 -6
  20. package/src/iconos/icon-button-svg.jsx +1 -2
  21. package/src/iconos/index.js +3 -31
  22. package/src/iconos/styled-icon.jsx +1 -1
  23. package/src/index.js +2 -2
  24. package/src/main.jsx +7 -0
  25. package/src/tomar-foto/TomarFoto.stories.tsx +29 -0
  26. package/src/tomar-foto/index.jsx +2 -1
  27. package/tsconfig.json +3 -2
  28. package/vite.config.ts +8 -4
  29. package/.eslintrc.json +0 -25
  30. package/src/IntlMessages.tsx +0 -11
  31. package/src/bridges/index.js +0 -1
  32. package/src/iconos/anular-ayuda-icon.jsx +0 -72
  33. package/src/iconos/asesoria-burbuja-button.jsx +0 -104
  34. package/src/iconos/asesoria-burbuja-icon.jsx +0 -104
  35. package/src/iconos/atencion-presencial-icon.jsx +0 -79
  36. package/src/iconos/atencion-telefonica-icon.jsx +0 -44
  37. package/src/iconos/atencion-turno-telefonico-icon.jsx +0 -53
  38. package/src/iconos/atencion-virtual-icon.jsx +0 -37
  39. package/src/iconos/biblioteca-burbuja-button.jsx +0 -59
  40. package/src/iconos/biblioteca-burbuja-icon.jsx +0 -66
  41. package/src/iconos/cancelar-turno-icon.jsx +0 -29
  42. package/src/iconos/codigo-verificacion-icon.jsx +0 -54
  43. package/src/iconos/curso-autogestionado-color-icon.jsx +0 -203
  44. package/src/iconos/curso-autogestionado-icon.jsx +0 -49
  45. package/src/iconos/curso-burbuja-button.jsx +0 -41
  46. package/src/iconos/curso-burbuja-icon.jsx +0 -97
  47. package/src/iconos/curso-presencial-color-icon.jsx +0 -256
  48. package/src/iconos/curso-presencial-icon.jsx +0 -71
  49. package/src/iconos/curso-virtual-color-icon.jsx +0 -109
  50. package/src/iconos/curso-virtual-icon.jsx +0 -40
  51. package/src/iconos/delegaciones-icon.jsx +0 -66
  52. package/src/iconos/forgot-dni-icon.jsx +0 -42
  53. package/src/iconos/forgot-password-icon.jsx +0 -46
  54. package/src/iconos/lapiz-act-contacto-perf-button.jsx +0 -44
  55. package/src/iconos/styled-timer-reenv-cod.jsx +0 -16
  56. package/src/iconos/user/user-styled-icon.jsx +0 -22
  57. package/src/iconos/verificar-sin-verificar-icon.jsx +0 -39
  58. package/src/iconos/verificar-verificado-icon.jsx +0 -30
  59. package/src/iconos/whatsapp-icon-button.jsx +0 -41
  60. /package/src/{iconos/constants-svg.js → constants-svg.js} +0 -0
@@ -0,0 +1,17 @@
1
+ import type { StorybookConfig } from '@storybook/react-vite';
2
+
3
+ const config: StorybookConfig = {
4
+ stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
5
+ addons: [
6
+ '@storybook/addon-onboarding',
7
+ '@storybook/addon-links',
8
+ '@storybook/addon-essentials',
9
+ '@chromatic-com/storybook',
10
+ '@storybook/addon-interactions',
11
+ ],
12
+ framework: {
13
+ name: '@storybook/react-vite',
14
+ options: {},
15
+ },
16
+ };
17
+ export default config;
@@ -0,0 +1,16 @@
1
+ import type { Preview } from '@storybook/react';
2
+ import "./css/bootstrap.min.css";
3
+ import "./css/bootstrap.rtl.only.min.css";
4
+
5
+ const preview: Preview = {
6
+ parameters: {
7
+ controls: {
8
+ matchers: {
9
+ color: /(background|color)$/i,
10
+ date: /Date$/i,
11
+ },
12
+ },
13
+ },
14
+ };
15
+
16
+ export default preview;
@@ -0,0 +1,28 @@
1
+ import js from '@eslint/js'
2
+ import globals from 'globals'
3
+ import reactHooks from 'eslint-plugin-react-hooks'
4
+ import reactRefresh from 'eslint-plugin-react-refresh'
5
+ import tseslint from 'typescript-eslint'
6
+
7
+ export default tseslint.config(
8
+ { ignores: ['dist'] },
9
+ {
10
+ extends: [js.configs.recommended, ...tseslint.configs.recommended],
11
+ files: ['**/*.{ts,tsx}'],
12
+ languageOptions: {
13
+ ecmaVersion: 2020,
14
+ globals: globals.browser,
15
+ },
16
+ plugins: {
17
+ 'react-hooks': reactHooks,
18
+ 'react-refresh': reactRefresh,
19
+ },
20
+ rules: {
21
+ ...reactHooks.configs.recommended.rules,
22
+ 'react-refresh/only-export-components': [
23
+ 'warn',
24
+ { allowConstantExport: true },
25
+ ],
26
+ },
27
+ },
28
+ )
package/index.d.ts CHANGED
@@ -15,59 +15,6 @@ declare module "siam-ui-utils" {
15
15
  //INTLMESSAGES
16
16
  export function IntlMessages(props);
17
17
 
18
- //ICONOS
19
- export function AnularAyudaIcon(props);
20
- export function AsesoriaBurbujaButton(props);
21
- export function AsesoriaBurbujaIcon(props);
22
- export function AtencionPresencial(props);
23
- export function AtencionTelefonica(props);
24
- export function AtencionTurnoTelefonico(props);
25
- export function AtencionVirtual(props);
26
- export function BibliotecaBurbujaButton(props);
27
- export function BibliotecaBurbujaIcon(props);
28
- export function CancelarTurnoIcon(props);
29
- export function CodigoVerificacionIcon(props);
30
- export const passwordEyeSvg;
31
- export const passwordEyeOpenSvg;
32
- export const contactoBarraSup;
33
- export const pagosMenuLateral;
34
- export const delegacionMenuLateral;
35
- export const delegacionesVerde;
36
- export const telefonoCeleste;
37
- export const mailRojo;
38
- export const whatAppIcon;
39
- export const telefonoEmergencia;
40
- export const telefonoConsulta;
41
- export const telefonoExequial;
42
- export const telefonoSalud;
43
- export const descarga;
44
- export const descargaOver;
45
- export const anularAyuda;
46
- export const continuar;
47
- export const pdfImage;
48
- export function CursoAutogestionadoColor(props);
49
- export function CursoAutogestionado(props);
50
- export function CursoBurbujaButton(props);
51
- export function CursoBurbujaIcon(props);
52
- export function CursoPresencialColor(props);
53
- export function CursoPresencial(props);
54
- export function CursoVirtualColor(props);
55
- export function CursoVirtual(props);
56
- export function DelegacionesIcon(props);
57
- export function ForgotDniIcon(props);
58
- export function ForgotPasswordIcon(props);
59
- export function IconButtonSvg(props);
60
- export function LabelTimer(props);
61
- export function LapizActContactoPerfilButton(props);
62
- export function Icon(props);
63
- export function UserIcon(props);
64
- export function VerificarSinVerificarIcon(props);
65
- export function VerificarVerificadoIcon(props);
66
- export function WhatsappIconButton(props);
67
-
68
- //ICONOS/USER
69
- export function UserIcon(props);
70
-
71
18
  //TOMAR FOTO
72
19
  export function TomarFoto(props);
73
20
  }
package/index.html ADDED
@@ -0,0 +1,12 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Firma digital</title>
7
+ </head>
8
+ <body>
9
+ <div id="root"></div>
10
+ <script type="module" src="/src/main.jsx"></script>
11
+ </body>
12
+ </html>
package/package.json CHANGED
@@ -1,70 +1,87 @@
1
- {
2
- "name": "siam-ui-utils",
3
- "version": "2.0.6",
4
- "keywords": [
5
- "ampf-react",
6
- "ampf-utils",
7
- "siam-ui-utils"
8
- ],
9
- "author": "Ampf Development Team",
10
- "license": "MIT",
11
- "description": "Conjunto de librerias de componentes utiles para AMPF",
12
- "main": "src/index.js",
13
- "browser": "src/index.js",
14
- "types": "index",
15
- "homepage": "https://github.com/ampfgit/siam-ui-utils#readme",
16
- "repository": {
17
- "type": "git",
18
- "url": "https://github.com/ampfgit/siam-ui-utils"
19
- },
20
- "moduleResolution": "nodenext",
21
- "scripts": {
22
- "publish-npm": "npm publish"
23
- },
24
- "dependencies": {
25
- "@types/react-intl": "^3.0.0",
26
- "html5-file-selector": "^2.1.0",
27
- "prop-types": "^15.8.1",
28
- "react": "^18.3.1",
29
- "react-dropzone-uploader": "^2.11.0",
30
- "react-intl": "^6.4.2",
31
- "react-notifications": "^1.7.4",
32
- "react-router": "^6.26.2",
33
- "react-router-dom": "^6.26.2",
34
- "react-select": "^5.8.0",
35
- "reactstrap": "^9.2.2",
36
- "siam-utils": "^1.1.4",
37
- "source-map-loader": "^5.0.0",
38
- "styled-components": "^6.1.12",
39
- "typescript": "^5.5.4"
40
- },
41
- "devDependencies": {
42
- "@testing-library/dom": "^10.4.0",
43
- "@testing-library/jest-dom": "^6.4.8",
44
- "@testing-library/react": "^16.0.0",
45
- "@types/react-router-dom": "^5.3.3",
46
- "@typescript-eslint/parser": "^8.2.0",
47
- "@vitejs/plugin-react": "^4.3.1",
48
- "copyfiles": "^2.4.1",
49
- "eslint": "^8.57.0",
50
- "eslint-config-airbnb": "^19.0.4",
51
- "eslint-config-prettier": "^8.8.0",
52
- "eslint-config-react-app": "^7.0.1",
53
- "eslint-plugin-import": "^2.27.5",
54
- "eslint-plugin-jsx-a11y": "^6.7.1",
55
- "eslint-plugin-prettier": "^4.2.1",
56
- "eslint-plugin-react": "^7.33.0",
57
- "vite": "^5.3.4",
58
- "vite-plugin-eslint": "^1.8.1",
59
- "vitest": "^2.0.5"
60
- },
61
- "resolutions": {
62
- "@babel/core": "7.19.6",
63
- "@babel/generator": "7.19.6",
64
- "@babel/compat-data": "7.19.4",
65
- "@babel/helper-compilation-targets": "7.19.3",
66
- "@babel/helper-create-class-features-plugin": "7.19.0",
67
- "@babel/helper-module-transforms": "7.19.6",
68
- "babel-loader": "8.2.5"
69
- }
70
- }
1
+ {
2
+ "name": "siam-ui-utils",
3
+ "version": "2.1.0",
4
+ "keywords": [
5
+ "ampf-react",
6
+ "ampf-utils",
7
+ "siam-ui-utils"
8
+ ],
9
+ "type": "module",
10
+ "author": "Ampf Development Team",
11
+ "license": "MIT",
12
+ "description": "Conjunto de librerias de componentes utiles para AMPF",
13
+ "main": "src/index.js",
14
+ "browser": "src/index.js",
15
+ "types": "index",
16
+ "homepage": "https://github.com/ampfgit/siam-ui-utils#readme",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/ampfgit/siam-ui-utils"
20
+ },
21
+ "moduleResolution": "nodenext",
22
+ "scripts": {
23
+ "start": "vite",
24
+ "publish-npm": "npm publish",
25
+ "storybook": "storybook dev -p 6006",
26
+ "build-storybook": "storybook build"
27
+ },
28
+ "dependencies": {
29
+ "@storybook/cli": "^8.3.2",
30
+ "@types/react-intl": "^3.0.0",
31
+ "eslint-plugin-react-hooks": "^4.6.2",
32
+ "eslint-plugin-react-refresh": "^0.4.12",
33
+ "html5-file-selector": "^2.1.0",
34
+ "init": "^0.1.2",
35
+ "prop-types": "^15.8.1",
36
+ "react": "^18.3.1",
37
+ "react-dropzone-uploader": "^2.11.0",
38
+ "react-intl": "^6.4.2",
39
+ "react-notifications": "^1.7.4",
40
+ "react-router": "^6.26.2",
41
+ "react-router-dom": "^6.26.2",
42
+ "react-select": "^5.8.0",
43
+ "reactstrap": "^9.2.2",
44
+ "siam-utils": "^1.1.4",
45
+ "source-map-loader": "^5.0.0",
46
+ "styled-components": "^6.1.12",
47
+ "typescript": "^5.5.4",
48
+ "vite-plugin-commonjs": "^0.10.3"
49
+ },
50
+ "devDependencies": {
51
+ "@chromatic-com/storybook": "^1.9.0",
52
+ "@storybook/addon-essentials": "^8.3.2",
53
+ "@storybook/addon-interactions": "^8.3.2",
54
+ "@storybook/addon-links": "^8.3.2",
55
+ "@storybook/addon-onboarding": "^8.3.2",
56
+ "@storybook/blocks": "^8.3.2",
57
+ "@storybook/react": "^8.3.2",
58
+ "@storybook/react-vite": "^8.3.2",
59
+ "@storybook/test": "^8.3.2",
60
+ "@testing-library/dom": "^10.4.0",
61
+ "@testing-library/jest-dom": "^6.4.8",
62
+ "@testing-library/react": "^16.0.0",
63
+ "@types/react-router-dom": "^5.3.3",
64
+ "@typescript-eslint/eslint-plugin": "^5.0.0",
65
+ "@typescript-eslint/parser": "^5.0.0",
66
+ "@vitejs/plugin-react": "^4.3.1",
67
+ "copyfiles": "^2.4.1",
68
+ "eslint": "^8.57.1",
69
+ "eslint-config-airbnb": "^19.0.4",
70
+ "eslint-config-prettier": "^8.8.0",
71
+ "eslint-config-react-app": "^7.0.1",
72
+ "eslint-plugin-import": "^2.27.5",
73
+ "eslint-plugin-jsx-a11y": "^6.7.1",
74
+ "eslint-plugin-prettier": "^5.0.0-alpha.1",
75
+ "eslint-plugin-react": "^7.33.0",
76
+ "eslint-plugin-storybook": "^0.8.0",
77
+ "storybook": "^8.3.2",
78
+ "vite": "^5.3.4",
79
+ "vite-plugin-eslint": "^1.8.1",
80
+ "vitest": "^2.0.5"
81
+ },
82
+ "eslintConfig": {
83
+ "extends": [
84
+ "plugin:storybook/recommended"
85
+ ]
86
+ }
87
+ }
package/src/App.jsx ADDED
@@ -0,0 +1,43 @@
1
+ import React, { useState } from "react";
2
+ import { TomarFoto } from './tomar-foto'
3
+ import { LABEL_BUTTONS } from "./constants";
4
+
5
+ const { TOMAR_FOTO_CELULAR, TOMAR_FOTO_WEB } = LABEL_BUTTONS
6
+
7
+ function App() {
8
+ const [componentReference, setComponentReference] = useState(undefined);
9
+
10
+ const handleLinkClick = (e) => {
11
+ const { target: { innerText } } = e;
12
+ setComponentReference(innerText);
13
+ }
14
+
15
+ return (
16
+ <div className="d-flex">
17
+ <div id="menu">
18
+ <button onClick={handleLinkClick}>{TOMAR_FOTO_CELULAR}</button>
19
+ <button onClick={handleLinkClick}>{TOMAR_FOTO_WEB}</button>
20
+
21
+ </div>
22
+
23
+ <div id="content">
24
+ {componentReference === TOMAR_FOTO_CELULAR && <TomarFoto isMobile={true} />}
25
+ {componentReference===TOMAR_FOTO_WEB && <TomarFoto isMobile={false} />}
26
+ </div>
27
+ </div>
28
+
29
+
30
+ // <AnularAyudaIcon
31
+ // cbuPago='1234'
32
+ // codDelegacion='AMPF'
33
+ // fechaAcreditacion='10/10/2025'
34
+ // fechaVtoTramite='10/10/2025'
35
+ // netoFinal={124}
36
+ // nroSolicitud='1234'
37
+ // size='3.5rem'
38
+ // title='Botón de arrepentimiento'
39
+ // />
40
+ )
41
+ }
42
+
43
+ export default App
@@ -0,0 +1,7 @@
1
+ import React from 'react'
2
+ import { FormattedMessage, injectIntl } from 'react-intl'
3
+ const _InjectMassage = (props) => <FormattedMessage {...props} />
4
+
5
+ export const IntlMessages = injectIntl(_InjectMassage, {
6
+ withRef: false,
7
+ })
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { useNavigate } from 'react-router';
3
3
 
4
- export const withRouter = (Component) => {
4
+ const withRouter = (Component) => {
5
5
  const Wrapper = (props) => {
6
6
  const history = useNavigate();
7
7
  return <Component history={history} {...props} />;
package/src/constants.js CHANGED
@@ -5,3 +5,12 @@ export const TAKE_PHOTO = {
5
5
  'La carga de una foto Selfie de frente junto a tu DNI solo es accesible desde su teléfono',
6
6
  TAKE_PHOTO_MESSAGE: 'Hacer Foto',
7
7
  }
8
+
9
+
10
+ export const LABEL_BUTTONS = {
11
+ TOMAR_FOTO_CELULAR: 'Tomar Foto CELULAR',
12
+ TOMAR_FOTO_WEB: 'Tomar Foto WEB',
13
+ SUBIR_ARCHIVO_MAX_3: 'Subir archivos (maximo 3)',
14
+ SUBIR_ARCHIVO_MAX_7: 'Subir archivos (maximo 7)'
15
+
16
+ }
@@ -0,0 +1,32 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+
3
+ import { DropzoneUploader } from '.';
4
+
5
+ const args={
6
+ onChangeFiles: () => {console.log('Dispatch an action onchange file')},
7
+ totalFiles: 0,
8
+ maxFiles: 3,
9
+ accept : 'image/*, application/pdf',
10
+ capture : null,
11
+ nameFileLabel : 'Subir archivos',
12
+ maxFileSize: 2
13
+ }
14
+
15
+ const meta = {
16
+ title: 'Components/DropzoneUploader',
17
+ component: DropzoneUploader,
18
+ args: {
19
+ ...args
20
+ },
21
+ } satisfies Meta<typeof DropzoneUploader>;
22
+
23
+ export default meta;
24
+ type Story = StoryObj<typeof meta>;
25
+
26
+ export const DropzoneUploaderBasic: Story = {
27
+ args: {
28
+ ...args,
29
+ maxFileSize: 7
30
+ },
31
+ };
32
+
@@ -0,0 +1,66 @@
1
+ .dropzone-upload-button{
2
+ padding: 25;
3
+ border-radius: 5px !important;
4
+ cursor: pointer;
5
+ color: #fff;
6
+ width: 10rem !important;
7
+ height: 2rem !important;
8
+ line-height: 1.5 !important;
9
+ font-size: 13px;
10
+ text-align: center;
11
+ vertical-align: middle !important;
12
+ border: none;
13
+ padding-top: 0.5rem;
14
+ margin-top: 0.5rem;
15
+ background-color: #af251b;
16
+ &:hover {
17
+ background-color: rgb(108, 31, 1);
18
+ }
19
+ }
20
+ .dropzone-upload-frame{
21
+ border: 0px !important;
22
+ overflow: 'none' !important;
23
+ }
24
+ .dropzone-upload-previewContainer {
25
+ display: flex;
26
+ flex-direction: row;
27
+ align-items: center;
28
+ justify-content: space-between;
29
+ position: relative;
30
+ width: 100px;
31
+ min-height: 60px;
32
+ z-index: 1;
33
+ border-bottom: 1px solid #ECECEC;
34
+ box-sizing: border-box;
35
+ }
36
+
37
+ .dropzone-upload-previewImage {
38
+ width: 60rem;
39
+ max-height: 60px;
40
+ max-width: 10rem;
41
+ border-radius: 4px;
42
+ padding-right: 1rem;
43
+ }
44
+
45
+ .dropzone-upload-delete-btn {
46
+ width: 2rem;
47
+ line-height: 1.5;
48
+ border : 0;
49
+ color: #ff0000;
50
+ background-color: #f8f8f8;
51
+ padding-right:1rem;
52
+ }
53
+
54
+ .dropzone-upload-file-name-container {
55
+ position: relative;
56
+ display: inline-block;
57
+ max-width: 150px; /* Ajusta este valor para aumentar el ancho */
58
+ }
59
+
60
+ .dropzone-upload-file-name {
61
+ padding-right: 1rem;
62
+ white-space: nowrap;
63
+ overflow: hidden;
64
+ text-overflow: ellipsis;
65
+ max-width: 150px; /* Ajusta este valor para aumentar el ancho */
66
+ }
@@ -1,18 +1,22 @@
1
+ /* eslint-disable react/prop-types */
1
2
  import React, { useEffect, useState } from 'react'
2
3
  import { getDroppedOrSelectedFiles } from 'html5-file-selector'
3
4
  import Dropzone from 'react-dropzone-uploader'
4
5
  import { NotificationManager } from 'react-notifications'
5
6
  import 'react-dropzone-uploader/dist/styles.css'
6
- import { IconButtonSvg, pdfImage } from '../'
7
+ import IconButtonSvg from '../iconos/icon-button-svg'
8
+ import { pdfImage } from '../constants-svg'
9
+ import "./dropzone-uploader.css"
7
10
 
8
- const maxSize = 7
11
+ const maxSize = 7 //en MB
9
12
  export const DropzoneUploader = ({
10
13
  onChangeFiles,
11
14
  totalFiles,
12
- maxFiles = 3,
15
+ maxFiles = 3,
13
16
  accept = 'image/*, application/pdf',
14
17
  capture = null,
15
- nameFileLabel = 'Subir archivos',
18
+ nameFileLabel = 'Subir archivos',
19
+ maxFileSize=maxSize
16
20
  }) => {
17
21
  const [files, setFiles] = useState([])
18
22
  const [totalFilesDU, setTotalFilesDU] = useState(totalFiles)
@@ -43,7 +47,7 @@ export const DropzoneUploader = ({
43
47
  }
44
48
  const CustomPreview = ({ fileWithMeta }) => {
45
49
  const { meta, remove } = fileWithMeta
46
- if (meta.size / (1024 * 1024) > maxSize) {
50
+ if (meta.size / (1024 * 1024) > maxFileSize) {
47
51
  NotificationManager.error(
48
52
  'El archivo supera el tamaño máximo',
49
53
  'Advertencia'
@@ -122,7 +126,7 @@ export const DropzoneUploader = ({
122
126
  <Dropzone
123
127
  disableUpload={false}
124
128
  maxFiles={totalFilesDU < maxFiles ? maxFiles : 0}
125
- maxSize={maxSize} // en megas
129
+ maxSize={maxFileSize} // en megas
126
130
  InputComponent={Input}
127
131
  PreviewComponent={CustomPreview}
128
132
  classNames={{ dropzone: 'dropzone-upload-frame' }}
@@ -46,5 +46,4 @@ const IconButtonSvg = (props) => {
46
46
  );
47
47
  };
48
48
  IconButtonSvg.defaultProps = { theme: {} };
49
- const _t=withTheme(IconButtonSvg);
50
- export {_t as IconButtonSvg}
49
+ export default withTheme(IconButtonSvg);
@@ -1,31 +1,3 @@
1
- export * from "./anular-ayuda-icon";
2
- export * from "./asesoria-burbuja-button";
3
- export * from "./asesoria-burbuja-icon";
4
- export * from "./atencion-presencial-icon";
5
- export * from "./atencion-telefonica-icon";
6
- export * from "./atencion-turno-telefonico-icon";
7
- export * from "./atencion-virtual-icon";
8
- export * from "./biblioteca-burbuja-button";
9
- export * from "./biblioteca-burbuja-icon";
10
- export * from "./cancelar-turno-icon";
11
- export * from "./codigo-verificacion-icon";
12
- export * from "./constants-svg";
13
- export * from "./curso-autogestionado-color-icon";
14
- export * from "./curso-autogestionado-icon";
15
- export * from "./curso-burbuja-button";
16
- export * from "./curso-burbuja-icon";
17
- export * from "./curso-presencial-color-icon";
18
- export * from "./curso-presencial-icon";
19
- export * from "./curso-virtual-color-icon";
20
- export * from "./curso-virtual-icon";
21
- export * from "./delegaciones-icon";
22
- export * from "./forgot-dni-icon";
23
- export * from "./forgot-password-icon";
24
- export * from "./icon-button-svg";
25
- export * from "./lapiz-act-contacto-perf-button";
26
- export * from "./styled-icon";
27
- export * from "./user/user-styled-icon";
28
- export * from "./styled-timer-reenv-cod";
29
- export * from "./verificar-sin-verificar-icon";
30
- export * from "./verificar-verificado-icon";
31
- export * from "./whatsapp-icon-button";
1
+ import IconButtonSvg from "./icon-button-svg";
2
+ export { IconButtonSvg };
3
+ export * from "./styled-icon";
@@ -22,4 +22,4 @@ export const Icon = styled(IconDiv)`
22
22
  display: ${(props) => props.display || 'none'};
23
23
  }
24
24
  `;
25
-
25
+ export default Icon;
package/src/index.js CHANGED
@@ -1,7 +1,7 @@
1
- export * from './archivos-adjuntos'
1
+ export * from './dropzone-uploader'
2
2
  export * from './bridges'
3
3
  export * from './CustomBootstrap'
4
4
  export * from './CustomSelectInput'
5
- export * from './iconos'
5
+ export * from "./iconos"
6
6
  export * from './IntlMessages'
7
7
  export * from './tomar-foto'
package/src/main.jsx ADDED
@@ -0,0 +1,7 @@
1
+ import React from 'react'
2
+ import ReactDOM from 'react-dom/client'
3
+
4
+ export const App = React.lazy(
5
+ () => import(/* webpackChunkName: "App" */ './App')
6
+ )
7
+ ReactDOM.createRoot(document.getElementById('root')).render(<App />)
@@ -0,0 +1,29 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+
3
+ import { TomarFoto } from '.';
4
+
5
+ const meta = {
6
+ title: 'Components/TomarFoto',
7
+ component: TomarFoto,
8
+ args: {
9
+ onFilesSelectedSelfie:() => { },
10
+ isMobile:false
11
+ },
12
+ } satisfies Meta<typeof TomarFoto>;
13
+
14
+ export default meta;
15
+ type Story = StoryObj<typeof meta>;
16
+
17
+ export const TomarFotoWebApplication: Story = {
18
+ args: {
19
+ isMobile: false
20
+ },
21
+ };
22
+ export const TomarFotoMobileApplication: Story = {
23
+ args: {
24
+ isMobile: true,
25
+ onFilesSelectedSelfie: () => {
26
+ console.log('Dispatch an action')
27
+ }
28
+ },
29
+ };
@@ -1,4 +1,5 @@
1
- import { useState } from 'react'
1
+ /* eslint-disable react/prop-types */
2
+ import React, { useState } from 'react'
2
3
  import { Row } from 'reactstrap'
3
4
  import { DropzoneUploader, Colxx } from '../'
4
5
  import { TAKE_PHOTO } from '../constants'
package/tsconfig.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "skipLibCheck": true,
12
12
  "strict": true,
13
13
  "forceConsistentCasingInFileNames": true,
14
- "module": "ESNext",
14
+ "module": "commonjs",
15
15
  "moduleResolution": "node",
16
16
  "noImplicitReturns": true,
17
17
  "resolveJsonModule": true,
@@ -21,6 +21,7 @@
21
21
  },
22
22
  "include": [
23
23
  "src",
24
- "index.d.ts"
24
+ "index.d.ts",
25
+ "eslint.config.js"
25
26
  ]
26
27
  }