@carto/ps-react-ui 0.1.0-alpha.7 → 1.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,6 +1,6 @@
1
1
  import { InputFileProps } from './types';
2
2
  /**
3
- * InputFile allow users to upload files into a UI.
3
+ * `InputFile` allow users to upload files into a UI.
4
4
  *
5
5
  * @param {InputFileProps} props - InputFile props
6
6
  *
@@ -8,19 +8,22 @@ import { InputFileProps } from './types';
8
8
  *
9
9
  * ```ts
10
10
  * <InputFile
11
+ * id='fileupload'
11
12
  * placeholder='Upload file'
13
+ * description='Drag and drop or click to select files',
12
14
  * buttonText='Browse'
13
15
  * multipleSummaryText='files selected'
14
- * accept='application/JSON'
16
+ * accept='*'
15
17
  * multiple={false}
18
+ * required={false},
16
19
  * disabled={false}
17
20
  * error={false}
18
21
  * variant='filled'
19
- * files={[]}
22
+ * defaultValue={[]}
20
23
  * onChange={(files: File[]) => {})}
21
24
  * />
22
25
  * ```
23
26
  *
24
- * @alpha
27
+ * **@alpha**
25
28
  */
26
- export declare function InputFile({ placeholder, buttonText, multipleSummaryText, helperText, accept, multiple, disabled, error, variant, files, onChange, }: InputFileProps): JSX.Element;
29
+ export declare function InputFile({ id, placeholder, buttonText, multipleSummaryText, helperText, accept, multiple, required, disabled, error, variant, defaultValue, onChange, }: InputFileProps): JSX.Element;
@@ -1,14 +1,17 @@
1
+ /// <reference types="web" />
1
2
  export declare type Variant = 'outlined' | 'filled';
2
3
  export interface InputFileProps {
4
+ id?: string;
3
5
  placeholder?: string;
4
6
  buttonText?: string;
5
7
  multipleSummaryText?: string;
6
8
  helperText?: string;
7
9
  accept?: string;
10
+ required?: boolean;
8
11
  multiple?: boolean;
9
12
  disabled?: boolean;
10
13
  error?: boolean;
11
14
  variant?: Variant;
12
- files?: File[] | [];
15
+ defaultValue?: File[] | undefined;
13
16
  onChange: (files: File[]) => void;
14
17
  }
package/package.json CHANGED
@@ -1,18 +1,17 @@
1
1
  {
2
2
  "name": "@carto/ps-react-ui",
3
- "version": "0.1.0-alpha.7",
3
+ "version": "1.1.1",
4
4
  "description": "CARTO's Professional Service React UI library",
5
5
  "files": [
6
6
  "dist"
7
7
  ],
8
8
  "type": "module",
9
9
  "types": "./dist/types/index.d.ts",
10
- "main": "./dist/ps-react-ui.umd.js",
11
- "module": "./dist/ps-react-ui.es.js",
10
+ "main": "./dist/ps-react-ui.js",
11
+ "module": "./dist/ps-react-ui.js",
12
12
  "exports": {
13
13
  ".": {
14
- "import": "./dist/ps-react-ui.es.js",
15
- "require": "./dist/ps-react-ui.umd.js"
14
+ "import": "./dist/ps-react-ui.js"
16
15
  }
17
16
  },
18
17
  "scripts": {
@@ -20,66 +19,41 @@
20
19
  "build": "vite build",
21
20
  "lint": "eslint './**/*.{ts,tsx}' --ignore-path ../../.gitignore",
22
21
  "format": "prettier --write . --ignore-path ../../.gitignore",
23
- "docs:generate": "typedoc --options ../../typedoc.json src/index.ts",
24
22
  "test:watch": "vitest",
25
23
  "test:related": "vitest --run --passWithNoTests",
26
24
  "test:coverage": "vitest run --coverage",
27
25
  "storybook:start": "start-storybook -p 6006 --no-open",
28
26
  "storybook:build": "build-storybook"
29
27
  },
28
+ "typedoc": {
29
+ "entryPoint": "./src/index.ts",
30
+ "readmeFile": "./README.md"
31
+ },
30
32
  "dependencies": {
31
- "@carto/react-core": "1.2.1",
32
- "@carto/react-ui": "1.2.1",
33
33
  "@material-ui/core": "4.12.4",
34
34
  "@material-ui/icons": "4.11.3",
35
35
  "@material-ui/lab": "4.0.0-alpha.61",
36
36
  "@material-ui/styles": "4.11.5",
37
- "echarts": "5.3.3",
38
- "echarts-for-react": "3.0.2",
39
- "react": "17.0.2",
40
- "react-dom": "17.0.2"
37
+ "echarts": "5.4.0",
38
+ "echarts-for-react": "3.0.2"
41
39
  },
42
40
  "devDependencies": {
43
- "@rollup/pluginutils": "4.2.1",
44
- "@storybook/addon-actions": "6.5.9",
45
- "@storybook/addon-essentials": "6.5.9",
46
- "@storybook/addon-interactions": "6.5.9",
47
- "@storybook/addon-links": "6.5.9",
48
- "@storybook/builder-vite": "0.2.0",
49
- "@storybook/react": "6.5.9",
41
+ "@carto/eslint-config-ps-react": "1.0.0",
42
+ "@rollup/pluginutils": "5.0.2",
43
+ "@storybook/addon-actions": "6.5.13",
44
+ "@storybook/addon-essentials": "6.5.13",
45
+ "@storybook/addon-interactions": "6.5.13",
46
+ "@storybook/addon-links": "6.5.13",
47
+ "@storybook/builder-vite": "0.2.5",
48
+ "@storybook/react": "6.5.13",
50
49
  "@storybook/testing-library": "0.0.13",
51
- "@types/react": "17.0.44",
52
50
  "@types/react-dom": "17.0.15",
53
- "eslint-plugin-jest": "26.6.0",
54
- "eslint-plugin-jsx-a11y": "6.6.0",
55
- "eslint-plugin-react": "7.30.1",
56
- "eslint-plugin-react-hooks": "4.6.0",
57
- "eslint-plugin-testing-library": "5.5.1"
51
+ "eslint-plugin-jsx-a11y": "6.6.1"
58
52
  },
59
53
  "eslintConfig": {
60
- "root": true,
61
- "parserOptions": {
62
- "ecmaFeatures": {
63
- "jsx": true
64
- }
65
- },
66
- "globals": {
67
- "React": true,
68
- "JSX": true
69
- },
70
- "rules": {
71
- "react/react-in-jsx-scope": 0
72
- },
73
54
  "extends": [
74
- "../../package.json",
75
- "plugin:react/recommended",
76
- "plugin:react-hooks/recommended",
55
+ "@carto/eslint-config-ps-react",
77
56
  "plugin:jsx-a11y/recommended"
78
- ],
79
- "settings": {
80
- "react": {
81
- "version": "detect"
82
- }
83
- }
57
+ ]
84
58
  }
85
59
  }