siam-ui-utils 2.0.12 → 2.0.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
@@ -1,12 +1,11 @@
1
1
  {
2
2
  "name": "siam-ui-utils",
3
- "version": "2.0.12",
3
+ "version": "2.0.14",
4
4
  "keywords": [
5
5
  "ampf-react",
6
6
  "ampf-utils",
7
7
  "siam-ui-utils"
8
8
  ],
9
- "type": "module",
10
9
  "author": "Ampf Development Team",
11
10
  "license": "MIT",
12
11
  "description": "Conjunto de librerias de componentes utiles para AMPF",
@@ -20,18 +19,11 @@
20
19
  },
21
20
  "moduleResolution": "nodenext",
22
21
  "scripts": {
23
- "start": "vite",
24
- "publish-npm": "npm publish",
25
- "storybook": "storybook dev -p 6006",
26
- "build-storybook": "storybook build"
22
+ "publish-npm": "npm publish"
27
23
  },
28
24
  "dependencies": {
29
- "@storybook/cli": "^8.3.2",
30
25
  "@types/react-intl": "^3.0.0",
31
- "eslint-plugin-react-hooks": "^4.6.2",
32
- "eslint-plugin-react-refresh": "^0.4.12",
33
26
  "html5-file-selector": "^2.1.0",
34
- "init": "^0.1.2",
35
27
  "prop-types": "^15.8.1",
36
28
  "react": "^18.3.1",
37
29
  "react-dropzone-uploader": "^2.11.0",
@@ -44,45 +36,26 @@
44
36
  "siam-utils": "^1.1.4",
45
37
  "source-map-loader": "^5.0.0",
46
38
  "styled-components": "^6.1.12",
47
- "typescript": "^5.5.4",
48
- "vite-plugin-commonjs": "^0.10.3"
39
+ "typescript": "^5.5.4"
49
40
  },
50
41
  "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/builder-vite": "^8.3.4",
58
- "@storybook/react": "^8.3.2",
59
- "@storybook/react-vite": "^8.3.2",
60
- "@storybook/test": "^8.3.2",
61
42
  "@testing-library/dom": "^10.4.0",
62
43
  "@testing-library/jest-dom": "^6.4.8",
63
44
  "@testing-library/react": "^16.0.0",
64
45
  "@types/react-router-dom": "^5.3.3",
65
- "@typescript-eslint/eslint-plugin": "^5.0.0",
66
- "@typescript-eslint/parser": "^5.0.0",
46
+ "@typescript-eslint/parser": "^8.2.0",
67
47
  "@vitejs/plugin-react": "^4.3.1",
68
48
  "copyfiles": "^2.4.1",
69
- "eslint": "^8.57.1",
49
+ "eslint": "^8.57.0",
70
50
  "eslint-config-airbnb": "^19.0.4",
71
51
  "eslint-config-prettier": "^8.8.0",
72
52
  "eslint-config-react-app": "^7.0.1",
73
53
  "eslint-plugin-import": "^2.27.5",
74
54
  "eslint-plugin-jsx-a11y": "^6.7.1",
75
- "eslint-plugin-prettier": "^5.0.0-alpha.1",
55
+ "eslint-plugin-prettier": "^4.2.1",
76
56
  "eslint-plugin-react": "^7.33.0",
77
- "eslint-plugin-storybook": "^0.8.0",
78
- "storybook": "^8.3.2",
79
57
  "vite": "^5.3.4",
80
- "vite-plugin-eslint": "^1.1.0",
58
+ "vite-plugin-eslint": "^1.8.1",
81
59
  "vitest": "^2.0.5"
82
- },
83
- "eslintConfig": {
84
- "extends": [
85
- "plugin:storybook/recommended"
86
- ]
87
60
  }
88
61
  }
@@ -14,7 +14,8 @@ export const DropzoneUploader = ({
14
14
  maxFiles = 3,
15
15
  accept = 'image/*, application/pdf',
16
16
  capture = null,
17
- nameFileLabel = 'Subir archivos',
17
+ nameFileLabel = 'Subir archivos',
18
+ className=""
18
19
  }) => {
19
20
  const [files, setFiles] = useState([])
20
21
  const [totalFilesDU, setTotalFilesDU] = useState(totalFiles)
@@ -120,14 +121,14 @@ export const DropzoneUploader = ({
120
121
  setTotalFilesDU(totalFiles)
121
122
  }, [totalFiles])
122
123
 
123
- return (
124
- <Dropzone
125
- disableUpload={false}
126
- maxFiles={totalFilesDU < maxFiles ? maxFiles : 0}
127
- maxSize={maxSize} // en megas
128
- InputComponent={Input}
129
- PreviewComponent={CustomPreview}
130
- classNames={{ dropzone: 'dropzone-upload-frame' }}
124
+ return (
125
+ <Dropzone
126
+ disableUpload={false}
127
+ maxFiles={totalFilesDU < maxFiles ? maxFiles : 0}
128
+ maxSize={maxSize} // en megas
129
+ InputComponent={Input}
130
+ PreviewComponent={CustomPreview}
131
+ classNames={{ dropzone: `dropzone-upload-frame ${className}`}}
131
132
  onChangeStatus={handleChangeStatus}
132
133
  getFilesFromEvent={getFilesFromEvent}
133
134
  accept={accept}
@@ -1,10 +1,10 @@
1
- /* eslint-disable react/prop-types */
2
1
  import { useState } from 'react'
3
2
  import { Row } from 'reactstrap'
4
3
  import { DropzoneUploader, Colxx } from '../'
5
4
  import { TAKE_PHOTO } from '../constants'
6
5
  import imgHacerFoto from '../assets/img/take-photo.png'
7
6
 
7
+ // eslint-disable-next-line react/prop-types
8
8
  export const TomarFoto = ({ onFilesSelectedSelfie, isMobile = false }) => {
9
9
  const [filesTotalSelectedSelfie, setTotalFilesSelectedSelfie] = useState(0)
10
10
  const {
package/vite.config.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  import react from "@vitejs/plugin-react";
2
2
  import { defineConfig } from "vitest/config";
3
+ import eslint from 'vite-plugin-eslint';
3
4
 
4
5
  export default defineConfig({
5
- plugins: [react()],
6
- test: {
7
- globals: true,
8
- }
9
- });
6
+ plugins: [react(), eslint()],
7
+ test: {
8
+ globals: true,
9
+ },
10
+ });