@appcorp/app-corp-vista 0.1.6 → 0.1.7

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.
@@ -43,7 +43,6 @@ var VistaUploadV1 = function (_a) {
43
43
  var handleClick = function (e) {
44
44
  var _a;
45
45
  e.stopPropagation();
46
- handleOnChange(e);
47
46
  (_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.click();
48
47
  };
49
48
  return (react_1.default.createElement("div", { className: className },
@@ -57,7 +56,7 @@ var VistaUploadV1 = function (_a) {
57
56
  react_1.default.createElement("div", { className: "mt-4 flex justify-center text-sm/6 text-gray-500" },
58
57
  react_1.default.createElement("label", { htmlFor: "file-upload", className: "relative cursor-pointer rounded-md font-semibold text-primary focus-within:ring-2 focus-within:ring-primary focus-within:ring-offset-2 focus-within:outline-hidden hover:text-primary/50" },
59
58
  react_1.default.createElement("span", null, "Upload a file"),
60
- react_1.default.createElement("input", { className: "sr-only", disabled: disabled, id: id, name: id, ref: inputRef, required: required, type: type })),
59
+ react_1.default.createElement("input", { className: "sr-only", disabled: disabled, id: id, name: id, onChange: handleOnChange, ref: inputRef, required: required, type: type })),
61
60
  react_1.default.createElement("p", { className: "pl-1" }, "or drag and drop")),
62
61
  fileInfo && (react_1.default.createElement("p", { className: "text-xs/5 text-gray-500" }, fileInfo)))),
63
62
  info && !error && (react_1.default.createElement("p", { id: "".concat(id, "-info"), className: "mt-2 text-sm text-primary" }, info)),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/app-corp-vista",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "scripts": {
5
5
  "build": "yarn clean && yarn build:ts && cp package.json lib && cp README.md lib",
6
6
  "build:next": "next build",
@@ -1,10 +1,10 @@
1
- import { FormEvent, HTMLInputTypeAttribute } from "react";
1
+ import { ChangeEvent, HTMLInputTypeAttribute } from "react";
2
2
  export interface VistaUploadV1Props {
3
3
  className?: string;
4
4
  disabled?: boolean;
5
5
  error?: string;
6
6
  fileInfo?: string;
7
- handleOnChange: (e: FormEvent<HTMLInputElement>) => void;
7
+ handleOnChange: (e: ChangeEvent<HTMLInputElement>) => void;
8
8
  id: string;
9
9
  info?: string;
10
10
  label?: string;