forstok-ui-lib 8.6.1 → 8.6.3
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 +3 -2
- package/dist/index.js +186 -186
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +190 -190
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/emoji/index.tsx +34 -17
- package/src/components/icon/styles.ts +2 -0
- package/src/components/icon/typed.ts +1 -0
- 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;
|
|
@@ -8,6 +8,7 @@ import IconArrowLeftBlue from "../../assets/images/icons/arrow-left-blue.svg";
|
|
|
8
8
|
import IconWarning from "../../assets/images/icons/warning.svg";
|
|
9
9
|
import IconAlert from "../../assets/images/icons/alert.svg";
|
|
10
10
|
import IconArrowUpload from "../../assets/images/icons/arrow-upload.svg";
|
|
11
|
+
import IconArrowDownload from "../../assets/images/icons/arrow-download.svg";
|
|
11
12
|
import IconTrash from "../../assets/images/icons/trash.svg";
|
|
12
13
|
import IconArrowLeft from "../../assets/images/icons/arrow-left.svg";
|
|
13
14
|
import IconArrowLeftDouble from "../../assets/images/icons/arrow-left-double.svg";
|
|
@@ -141,6 +142,7 @@ const iconStyles = {
|
|
|
141
142
|
alert: IconAlert,
|
|
142
143
|
barcode: IconBarcode,
|
|
143
144
|
"arrow-upload": IconArrowUpload,
|
|
145
|
+
"arrow-download": IconArrowDownload,
|
|
144
146
|
trash: IconTrash,
|
|
145
147
|
"arrow-left": IconArrowLeft,
|
|
146
148
|
"arrow-left-double": IconArrowLeftDouble,
|