pmg-ui-kit 0.0.41 → 0.0.42

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.
@@ -8,6 +8,7 @@ type TextAreaProps = {
8
8
  shouldBeValidateInWebchecker?: boolean;
9
9
  required?: boolean;
10
10
  name?: string;
11
+ disabled?: boolean;
11
12
  };
12
- export declare const Textarea: ({ rows, className, placeholder, value, bottomHint, handleOnChange, shouldBeValidateInWebchecker, required, name, }: TextAreaProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const Textarea: ({ rows, className, placeholder, value, bottomHint, handleOnChange, shouldBeValidateInWebchecker, required, name, disabled }: TextAreaProps) => import("react/jsx-runtime").JSX.Element;
13
14
  export {};
@@ -5,13 +5,13 @@ import { useEffect, useState } from "react";
5
5
  import { useValidatePattern } from "../../hooks/useValidatePattern";
6
6
  import { ValidationPatterns } from "../../consts/validationPatterns";
7
7
  import { Text } from "./Text";
8
- export const Textarea = ({ rows = 4, className, placeholder = "", value, bottomHint, handleOnChange, shouldBeValidateInWebchecker = false, required, name, }) => {
8
+ export const Textarea = ({ rows = 4, className, placeholder = "", value, bottomHint, handleOnChange, shouldBeValidateInWebchecker = false, required, name, disabled = false }) => {
9
9
  const isValid = useValidatePattern(ValidationPatterns.NON_EMPTY_PATTERN, value?.toString(), required ? false : true);
10
10
  useEffect(() => {
11
11
  setVal(value);
12
12
  }, [value]);
13
13
  const [val, setVal] = useState(value);
14
- return (_jsxs("div", { className: "flex flex-col", children: [_jsx("textarea", { id: shouldBeValidateInWebchecker ? "handleInWebchecker" : undefined, value: val || "", name: name, onChange: (e) => {
14
+ return (_jsxs("div", { className: "flex flex-col", children: [_jsx("textarea", { id: shouldBeValidateInWebchecker ? "handleInWebchecker" : undefined, value: val || "", name: name, disabled: disabled, onChange: (e) => {
15
15
  e.currentTarget.classList.remove("border-red-500");
16
16
  setVal(e.target.value);
17
17
  handleOnChange && handleOnChange(e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmg-ui-kit",
3
- "version": "0.0.41",
3
+ "version": "0.0.42",
4
4
  "description": "Components library for PMG projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",