@pnkx-lib/ui 1.9.568 → 1.9.570

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.
@@ -1297,6 +1297,8 @@ const Input = (props) => {
1297
1297
  toLowerCaseSafe,
1298
1298
  // maxValue,
1299
1299
  // minValue,
1300
+ onClickSubLabel,
1301
+ onClickLabel,
1300
1302
  disabled,
1301
1303
  ...restProps
1302
1304
  } = props;
@@ -1428,7 +1430,8 @@ const Input = (props) => {
1428
1430
  {
1429
1431
  label,
1430
1432
  required,
1431
- classNameLabel
1433
+ classNameLabel,
1434
+ onClick: onClickLabel
1432
1435
  }
1433
1436
  );
1434
1437
  return /* @__PURE__ */ jsx(Fragment, {});
@@ -1445,7 +1448,8 @@ const Input = (props) => {
1445
1448
  "default-class-name-subLabel",
1446
1449
  classNameSubLabel
1447
1450
  ),
1448
- isSubLabel: true
1451
+ isSubLabel: true,
1452
+ onClick: onClickSubLabel
1449
1453
  }
1450
1454
  )
1451
1455
  ] });
@@ -20,6 +20,7 @@ const Textarea = forwardRef(
20
20
  autoSize = { minRows: 2, maxRows: 10 },
21
21
  classNameLabel,
22
22
  contentTooltip,
23
+ disabled,
23
24
  ...restProps
24
25
  } = props;
25
26
  const { name, value, onChange, onBlur } = field || {};
@@ -71,8 +72,9 @@ const Textarea = forwardRef(
71
72
  ref,
72
73
  className: twMerge(
73
74
  // autoSize ? "textarea-custom" : "",
74
- customStyleTextarea,
75
- "pnkx-default-input"
75
+ disabled ? "pnkx-disable-input" : "",
76
+ "pnkx-default-input",
77
+ customStyleTextarea
76
78
  ),
77
79
  value,
78
80
  onBlur,
@@ -82,6 +84,7 @@ const Textarea = forwardRef(
82
84
  },
83
85
  status: (isTouched || isSubmitted) && errorMessage ? "error" : void 0,
84
86
  autoSize,
87
+ disabled,
85
88
  ...restProps
86
89
  }
87
90
  ),
package/es/ui/Label.js CHANGED
@@ -2,12 +2,25 @@ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
3
3
  import { Typography } from './Typography.js';
4
4
 
5
- const Label = ({ label, required, classNameLabel, isSubLabel }) => {
5
+ const Label = ({
6
+ label,
7
+ required,
8
+ classNameLabel,
9
+ isSubLabel,
10
+ onClick
11
+ }) => {
6
12
  //! State
7
13
  //! Function
8
14
  //! Render
9
15
  return /* @__PURE__ */ jsxs("div", { className: twMerge("flex gap-1 mb-2 items-baseline", classNameLabel), children: [
10
- /* @__PURE__ */ jsx(Typography.Text, { className: twMerge(isSubLabel ? "!text-[#8C93A3]" : ""), children: label }),
16
+ /* @__PURE__ */ jsx(
17
+ Typography.Text,
18
+ {
19
+ className: twMerge(isSubLabel ? "!text-[#8C93A3]" : ""),
20
+ onClick,
21
+ children: label
22
+ }
23
+ ),
11
24
  required && /* @__PURE__ */ jsx("span", { className: "text-red-600 h-0", children: "*" })
12
25
  ] });
13
26
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pnkx-lib/ui",
3
3
  "private": false,
4
- "version": "1.9.568",
4
+ "version": "1.9.570",
5
5
  "type": "module",
6
6
  "main": "./es/index.js",
7
7
  "module": "./es/index.js",
@@ -26,6 +26,8 @@ export interface InputProps extends InputPropsAntd {
26
26
  thousandSeparator?: string;
27
27
  decimalSeparator?: string;
28
28
  toLowerCaseSafe?: boolean;
29
+ onClickSubLabel?: React.MouseEventHandler<HTMLDivElement> | undefined;
30
+ onClickLabel?: React.MouseEventHandler<HTMLDivElement> | undefined;
29
31
  }
30
32
  export declare const Input: (props: InputProps) => import("react/jsx-runtime").JSX.Element;
31
33
  export interface PropsNumberFormat extends Omit<InputProps, "onChange" | "afterOnChange" | "value" | "defaultValue" | "iconStartInput" | "iconEndInput"> {
@@ -3,5 +3,6 @@ export interface LabelProps {
3
3
  required?: boolean;
4
4
  classNameLabel?: string;
5
5
  isSubLabel?: boolean;
6
+ onClick?: React.MouseEventHandler<HTMLDivElement> | undefined;
6
7
  }
7
- export declare const Label: ({ label, required, classNameLabel, isSubLabel }: LabelProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const Label: ({ label, required, classNameLabel, isSubLabel, onClick, }: LabelProps) => import("react/jsx-runtime").JSX.Element;