siam-ui-utils 2.1.0 → 2.1.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.
@@ -1,17 +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;
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;
@@ -1,16 +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;
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;
package/package.json CHANGED
@@ -1,87 +1,87 @@
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
- }
1
+ {
2
+ "name": "siam-ui-utils",
3
+ "version": "2.1.1",
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.1.0",
80
+ "vitest": "^2.0.5"
81
+ },
82
+ "eslintConfig": {
83
+ "extends": [
84
+ "plugin:storybook/recommended"
85
+ ]
86
+ }
87
+ }
@@ -1,12 +1,10 @@
1
1
  import React from 'react';
2
2
  import { useNavigate } from 'react-router';
3
3
 
4
- const withRouter = (Component) => {
4
+ export const withRouter = (Component) => {
5
5
  const Wrapper = (props) => {
6
6
  const history = useNavigate();
7
7
  return <Component history={history} {...props} />;
8
8
  };
9
9
  return Wrapper;
10
10
  };
11
-
12
- export default withRouter;
@@ -2,31 +2,33 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
 
3
3
  import { DropzoneUploader } from '.';
4
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
- }
5
+ const args = {
6
+ onChangeFiles: () => {
7
+ console.log('Accion despues de seleccionar un archivo');
8
+ },
9
+ totalFiles: 0,
10
+ maxFiles: 3,
11
+ accept: 'image/*, application/pdf',
12
+ capture: null,
13
+ nameFileLabel: 'Subir archivos',
14
+ maxFileSize: 2,
15
+ };
14
16
 
15
17
  const meta = {
16
18
  title: 'Components/DropzoneUploader',
17
19
  component: DropzoneUploader,
18
- args: {
19
- ...args
20
- },
20
+ args: {
21
+ ...args,
22
+ },
21
23
  } satisfies Meta<typeof DropzoneUploader>;
22
24
 
23
25
  export default meta;
26
+
24
27
  type Story = StoryObj<typeof meta>;
25
28
 
26
29
  export const DropzoneUploaderBasic: Story = {
27
30
  args: {
28
31
  ...args,
29
- maxFileSize: 7
30
- },
32
+ maxFileSize: 5,
33
+ },
31
34
  };
32
-
package/src/index.js CHANGED
@@ -1,7 +1,6 @@
1
- export * from './dropzone-uploader'
2
- export * from './bridges'
3
- export * from './CustomBootstrap'
4
- export * from './CustomSelectInput'
5
- export * from "./iconos"
6
- export * from './IntlMessages'
7
- export * from './tomar-foto'
1
+ export * from './dropzone-uploader';
2
+ export * from './bridges';
3
+ export * from './CustomBootstrap';
4
+ export * from './CustomSelectInput';
5
+ export * from './IntlMessages';
6
+ export * from './tomar-foto';
package/vite.config.ts CHANGED
@@ -3,12 +3,8 @@ import { defineConfig } from "vitest/config";
3
3
  import eslint from 'vite-plugin-eslint';
4
4
 
5
5
  export default defineConfig({
6
- plugins: [react(), eslint()],
6
+ plugins: [react()],
7
7
  test: {
8
8
  globals: true,
9
- },
10
- server: {
11
- port: 3002,
12
- open: true,
13
- },
9
+ }
14
10
  });