@appcorp/app-corp-vista 0.1.38 → 0.1.39

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.
@@ -44,7 +44,7 @@ var outline_1 = require("@heroicons/react/24/outline");
44
44
  var vista_button_v1_1 = require("../vista-button-v1/vista-button-v1");
45
45
  var vista_button_type_1 = require("../../type/vista-button-type");
46
46
  var VistaUploadV1 = function (_a) {
47
- var _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, error = _a.error, fileInfo = _a.fileInfo, handleIconClick = _a.handleIconClick, handleOnChange = _a.handleOnChange, id = _a.id, imageUrl = _a.imageUrl, info = _a.info, label = _a.label, _d = _a.required, required = _d === void 0 ? false : _d, _e = _a.type, type = _e === void 0 ? 'file' : _e;
47
+ var _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, error = _a.error, fileInfo = _a.fileInfo, handleClearImage = _a.handleClearImage, handleOnChange = _a.handleOnChange, id = _a.id, imageUrl = _a.imageUrl, info = _a.info, label = _a.label, _d = _a.required, required = _d === void 0 ? false : _d, _e = _a.type, type = _e === void 0 ? 'file' : _e;
48
48
  var inputRef = (0, react_1.useRef)(null);
49
49
  var handleClick = function (e) {
50
50
  var _a;
@@ -66,7 +66,7 @@ var VistaUploadV1 = function (_a) {
66
66
  react_1.default.createElement("p", { className: "pl-1" }, "or drag and drop")),
67
67
  fileInfo && (react_1.default.createElement("p", { className: "text-xs/5 text-gray-500" }, fileInfo)))),
68
68
  imageUrl && (react_1.default.createElement(react_1.default.Fragment, null,
69
- react_1.default.createElement(vista_button_v1_1.VistaButtonV1, { className: 'absolute top-3 right-3', handleOnClick: handleIconClick, icon: react_1.default.createElement(outline_1.XMarkIcon, { className: 'size-6' }), variant: vista_button_type_1.VISTA_BUTTON_VARIANT.ICON }),
69
+ react_1.default.createElement(vista_button_v1_1.VistaButtonV1, { className: 'absolute top-3 right-3', handleOnClick: handleClearImage, icon: react_1.default.createElement(outline_1.XMarkIcon, { className: 'size-6' }), variant: vista_button_type_1.VISTA_BUTTON_VARIANT.ICON }),
70
70
  react_1.default.createElement(image_1.default, { alt: 'upload', className: 'object-contain', fill: true, sizes: '50vw', height: 0, src: imageUrl, width: 0 })))),
71
71
  info && !error && (react_1.default.createElement("p", { id: "".concat(id, "-info"), className: "mt-2 text-sm text-primary" }, info)),
72
72
  error && !info && (react_1.default.createElement("p", { id: "".concat(id, "-error"), className: "mt-2 text-sm text-red-500 dark:text-red-500" }, error))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/app-corp-vista",
3
- "version": "0.1.38",
3
+ "version": "0.1.39",
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",
@@ -4,7 +4,7 @@ export interface VistaUploadV1Props {
4
4
  disabled?: boolean;
5
5
  error?: string;
6
6
  fileInfo?: string;
7
- handleIconClick: () => void;
7
+ handleClearImage: () => void;
8
8
  handleOnChange: (e: ChangeEvent<HTMLInputElement>) => void;
9
9
  id: string;
10
10
  imageUrl?: string;