forstok-ui-lib 8.9.8 → 8.9.9

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forstok-ui-lib",
3
- "version": "8.9.8",
3
+ "version": "8.9.9",
4
4
  "description": "Forstok UI Components Library",
5
5
  "path": "dist",
6
6
  "main": "dist/index.js",
@@ -12,10 +12,12 @@ import { EmojiContainer } from "./styles";
12
12
  const EmojiComponent = ({
13
13
  $mode,
14
14
  evChange,
15
+ isDisabled,
15
16
  $emojiStyles,
16
17
  }: {
17
18
  $mode?: "textarea";
18
19
  evChange: (emoji: string) => void;
20
+ isDisabled?: boolean;
19
21
  $emojiStyles?: CSSProperties;
20
22
  }) => {
21
23
  const onChange = ({ emoji }: Emoji) => {
@@ -35,7 +37,11 @@ const EmojiComponent = ({
35
37
  $placement="top"
36
38
  >
37
39
  <div aria-label="control">
38
- <ButtonComponent $mode="clearL" title="Choose Emoticon">
40
+ <ButtonComponent
41
+ $mode="clearL"
42
+ title="Choose Emoticon"
43
+ disabled={isDisabled}
44
+ >
39
45
  <IconComponent $name="emoji" $width="12px" />
40
46
  </ButtonComponent>
41
47
  </div>
@@ -44,7 +44,7 @@ const TextAreaComponent = ({
44
44
  }: TTextArea) => {
45
45
  const innerRef = useRef<HTMLTextAreaElement>(null);
46
46
 
47
- const { name, defaultValue } = props;
47
+ const { name, defaultValue, disabled } = props;
48
48
 
49
49
  const [valueInput, setValueInput] = useState<string>(
50
50
  defaultValue?.toString() ?? "",
@@ -92,6 +92,7 @@ const TextAreaComponent = ({
92
92
 
93
93
  let parseProps = { ...props };
94
94
  delete parseProps.defaultValue;
95
+ delete parseProps.disabled;
95
96
 
96
97
  return (
97
98
  <div style={{ position: "relative" }}>
@@ -107,12 +108,14 @@ const TextAreaComponent = ({
107
108
  handleChange(e);
108
109
  _evBlur(e);
109
110
  }}
111
+ disabled={disabled}
110
112
  {...parseProps}
111
113
  />
112
114
  {$isEmoji ? (
113
115
  <EmojiComponent
114
116
  $mode="textarea"
115
117
  evChange={evChangeEmoji}
118
+ isDisabled={disabled}
116
119
  {...($emojiStyles && { style: $emojiStyles })}
117
120
  />
118
121
  ) : null}