forstok-ui-lib 8.6.1 → 8.6.2
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/dist/index.d.ts +2 -1
- package/dist/index.js +21 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/emoji/index.tsx +34 -17
- package/src/components/textarea/ref.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,28 +1,45 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type CSSProperties } from "react";
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import DropDownComponent from '../dropdown';
|
|
5
|
-
import IconComponent from '../icon';
|
|
3
|
+
import { Emoji, EmojiPicker } from "frimousse";
|
|
6
4
|
|
|
7
|
-
import
|
|
8
|
-
import
|
|
5
|
+
import ButtonComponent from "../button";
|
|
6
|
+
import DropDownComponent from "../dropdown";
|
|
7
|
+
import IconComponent from "../icon";
|
|
9
8
|
|
|
9
|
+
import { evForceCloseDropdown } from "../../assets/javascripts/function";
|
|
10
|
+
import { EmojiContainer } from "./styles";
|
|
10
11
|
|
|
11
|
-
const EmojiComponent = ({
|
|
12
|
-
|
|
12
|
+
const EmojiComponent = ({
|
|
13
|
+
$mode,
|
|
14
|
+
evChange,
|
|
15
|
+
$emojiStyles,
|
|
16
|
+
}: {
|
|
17
|
+
$mode?: "textarea";
|
|
18
|
+
evChange: (emoji: string) => void;
|
|
19
|
+
$emojiStyles?: CSSProperties;
|
|
20
|
+
}) => {
|
|
21
|
+
const onChange = ({ emoji }: Emoji) => {
|
|
13
22
|
evChange(emoji);
|
|
14
23
|
evForceCloseDropdown();
|
|
15
|
-
}
|
|
24
|
+
};
|
|
16
25
|
|
|
17
26
|
return (
|
|
18
|
-
<EmojiContainer
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
27
|
+
<EmojiContainer
|
|
28
|
+
$mode={$mode}
|
|
29
|
+
{...($emojiStyles && { style: $emojiStyles })}
|
|
30
|
+
>
|
|
31
|
+
<DropDownComponent
|
|
32
|
+
$internalWidth="314px"
|
|
33
|
+
$bottom="40px"
|
|
34
|
+
$openPosition="left"
|
|
35
|
+
$placement="top"
|
|
36
|
+
>
|
|
37
|
+
<div aria-label="control">
|
|
38
|
+
<ButtonComponent $mode="clearL" title="Choose Emoticon">
|
|
39
|
+
<IconComponent $name="emoji" $width="12px" />
|
|
23
40
|
</ButtonComponent>
|
|
24
41
|
</div>
|
|
25
|
-
<div aria-label=
|
|
42
|
+
<div aria-label="body">
|
|
26
43
|
<EmojiPicker.Root onEmojiSelect={onChange}>
|
|
27
44
|
<EmojiPicker.Search />
|
|
28
45
|
<EmojiPicker.Viewport>
|
|
@@ -34,7 +51,7 @@ const EmojiComponent = ({ $mode, evChange } : { $mode?: 'textarea', evChange: (e
|
|
|
34
51
|
</div>
|
|
35
52
|
</DropDownComponent>
|
|
36
53
|
</EmojiContainer>
|
|
37
|
-
)
|
|
54
|
+
);
|
|
38
55
|
};
|
|
39
56
|
|
|
40
|
-
export default EmojiComponent;
|
|
57
|
+
export default EmojiComponent;
|