@appcorp/app-corp-vista 0.3.38 → 0.3.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.
@@ -1,3 +1,3 @@
1
- import { FC } from 'react';
1
+ import React from 'react';
2
2
  import { VistaTextAreaV1Props } from '../type/vista-text-area-type';
3
- export declare const VistaTextAreaV1: FC<VistaTextAreaV1Props>;
3
+ export declare const VistaTextAreaV1: React.ForwardRefExoticComponent<VistaTextAreaV1Props & React.RefAttributes<HTMLTextAreaElement>>;
@@ -11,6 +11,39 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  return __assign.apply(this, arguments);
13
13
  };
14
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
15
+ if (k2 === undefined) k2 = k;
16
+ var desc = Object.getOwnPropertyDescriptor(m, k);
17
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
18
+ desc = { enumerable: true, get: function() { return m[k]; } };
19
+ }
20
+ Object.defineProperty(o, k2, desc);
21
+ }) : (function(o, m, k, k2) {
22
+ if (k2 === undefined) k2 = k;
23
+ o[k2] = m[k];
24
+ }));
25
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
26
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
27
+ }) : function(o, v) {
28
+ o["default"] = v;
29
+ });
30
+ var __importStar = (this && this.__importStar) || (function () {
31
+ var ownKeys = function(o) {
32
+ ownKeys = Object.getOwnPropertyNames || function (o) {
33
+ var ar = [];
34
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
35
+ return ar;
36
+ };
37
+ return ownKeys(o);
38
+ };
39
+ return function (mod) {
40
+ if (mod && mod.__esModule) return mod;
41
+ var result = {};
42
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
43
+ __setModuleDefault(result, mod);
44
+ return result;
45
+ };
46
+ })();
14
47
  var __rest = (this && this.__rest) || function (s, e) {
15
48
  var t = {};
16
49
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -22,13 +55,10 @@ var __rest = (this && this.__rest) || function (s, e) {
22
55
  }
23
56
  return t;
24
57
  };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
58
  Object.defineProperty(exports, "__esModule", { value: true });
29
59
  exports.VistaTextAreaV1 = void 0;
30
- var react_1 = __importDefault(require("react"));
31
- var VistaTextAreaV1 = function (_a) {
60
+ var react_1 = __importStar(require("react"));
61
+ exports.VistaTextAreaV1 = (0, react_1.forwardRef)(function (_a, ref) {
32
62
  var _b = _a.autoFocus, autoFocus = _b === void 0 ? false : _b, _c = _a.className, className = _c === void 0 ? '' : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, error = _a.error, handleOnChange = _a.handleOnChange, id = _a.id, info = _a.info, label = _a.label, optional = _a.optional, placeholder = _a.placeholder, _e = _a.readOnly, readOnly = _e === void 0 ? false : _e, _f = _a.required, required = _f === void 0 ? false : _f, _g = _a.rows, rows = _g === void 0 ? 4 : _g, value = _a.value, rest = __rest(_a, ["autoFocus", "className", "disabled", "error", "handleOnChange", "id", "info", "label", "optional", "placeholder", "readOnly", "required", "rows", "value"]);
33
63
  return (react_1.default.createElement("div", null,
34
64
  react_1.default.createElement("div", { className: "flex justify-between" },
@@ -38,10 +68,9 @@ var VistaTextAreaV1 = function (_a) {
38
68
  required && react_1.default.createElement("sup", { className: "text-red-500" }, "*")),
39
69
  optional && (react_1.default.createElement("span", { id: "".concat(id, "-optional"), className: "text-sm/6 text-gray-500" }, optional))),
40
70
  react_1.default.createElement("div", { className: "mt-2" },
41
- react_1.default.createElement("textarea", __assign({ autoFocus: autoFocus, className: "block w-full rounded-md border-0 bg-white/5 dark:bg-white/5 py-1.5 text-gray-900 dark:text-white shadow-sm ring-1 ring-inset ring-gray-200 focus:ring-2 focus:ring-inset focus:ring-primary disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-300 disabled:ring-gray-200 sm:text-sm/6 dark:disabled:bg-gray-800 dark:disabled:text-gray-400 dark:disabled:ring-gray-700 placeholder:text-gray-500 ".concat(className), cols: 200, disabled: disabled, id: id, name: id, onChange: function (e) {
71
+ react_1.default.createElement("textarea", __assign({}, rest, { autoFocus: autoFocus, className: "block w-full rounded-md border-0 bg-white/5 dark:bg-white/5 py-1.5 text-gray-900 dark:text-white shadow-sm ring-1 ring-inset ring-gray-200 focus:ring-2 focus:ring-inset focus:ring-primary disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-300 disabled:ring-gray-200 sm:text-sm/6 dark:disabled:bg-gray-800 dark:disabled:text-gray-400 dark:disabled:ring-gray-700 placeholder:text-gray-500 ".concat(className), cols: 200, disabled: disabled, id: id, name: id, onChange: function (e) {
42
72
  return handleOnChange(id, e.target.value);
43
- }, placeholder: placeholder, readOnly: readOnly, required: required, rows: rows, value: value }, rest))),
73
+ }, placeholder: placeholder, readOnly: readOnly, required: required, rows: rows, value: value, ref: ref }))),
44
74
  info && !error && (react_1.default.createElement("p", { id: "".concat(id, "-info"), className: "mt-2 text-sm text-indigo-500" }, info)),
45
75
  error && !info && (react_1.default.createElement("p", { id: "".concat(id, "-error"), className: "mt-2 text-sm text-red-500" }, error))));
46
- };
47
- exports.VistaTextAreaV1 = VistaTextAreaV1;
76
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/app-corp-vista",
3
- "version": "0.3.38",
3
+ "version": "0.3.39",
4
4
  "scripts": {
5
5
  "build": "yarn clean && yarn build:ts && cp package.json lib && cp README.md lib && cp yarn.lock lib",
6
6
  "build:next": "next build",