@blocklet/discuss-kit-ux 2.4.38 → 2.4.40
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/components/auto-translate/auto-translate-button.mjs +5 -4
- package/dist/components/blog/cover-image.mjs +3 -2
- package/dist/components/chat/channel-group.mjs +3 -2
- package/dist/components/chat/chat-header-addon.mjs +3 -2
- package/dist/components/chat/chat-in-wallet.mjs +3 -2
- package/dist/components/chat/chat-input.mjs +6 -5
- package/dist/components/chat/chat-list-in-wallet.mjs +3 -2
- package/dist/components/chat/chat-room.mjs +3 -2
- package/dist/components/chat/chat.mjs +3 -2
- package/dist/components/chat/user-search.mjs +3 -2
- package/dist/components/input/comment-input.mjs +3 -2
- package/dist/components/label-picker.mjs +3 -2
- package/dist/components/posts/comment.mjs +3 -3
- package/dist/components/posts/post.mjs +3 -2
- package/dist/components/rating/binary-thumb.mjs +7 -2
- package/dist/components/rating/github-reaction.mjs +3 -2
- package/package.json +11 -15
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { AddonButton } from "@arcblock/ux/lib/Header/addon-button";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import { Icon } from "@iconify/react";
|
|
4
|
+
import LanguageIcon from "@iconify/icons-tabler/language";
|
|
5
|
+
import SettingsIcon from "@iconify/icons-tabler/settings";
|
|
5
6
|
import { Box, Link, Tooltip, Typography } from "@mui/material";
|
|
6
7
|
import { useAutoTranslateStore, useTargetLanguage } from "./store.mjs";
|
|
7
8
|
import { useEditorStoreAdapter } from "./editor-store-adaptor.mjs";
|
|
@@ -26,7 +27,7 @@ function InternalAutoTranslateHeaderAddon({ ...rest }) {
|
|
|
26
27
|
/* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
27
28
|
"Target language: ",
|
|
28
29
|
targetLanguageName,
|
|
29
|
-
!!session?.user && /* @__PURE__ */ jsx(Link, { href: "/.well-known/service/user/settings", sx: { lineHeight: 1 }, children: /* @__PURE__ */ jsx(Box, { component: SettingsIcon, sx: { fontSize: 12 } }) })
|
|
30
|
+
!!session?.user && /* @__PURE__ */ jsx(Link, { href: "/.well-known/service/user/settings", sx: { lineHeight: 1 }, children: /* @__PURE__ */ jsx(Box, { component: Icon, icon: SettingsIcon, sx: { fontSize: 12 } }) })
|
|
30
31
|
] })
|
|
31
32
|
] }) });
|
|
32
33
|
};
|
|
@@ -38,7 +39,7 @@ function InternalAutoTranslateHeaderAddon({ ...rest }) {
|
|
|
38
39
|
variant: "contained",
|
|
39
40
|
sx: { color: "primary.contrastText" }
|
|
40
41
|
},
|
|
41
|
-
icon: /* @__PURE__ */ jsx(
|
|
42
|
+
icon: /* @__PURE__ */ jsx(Icon, { icon: LanguageIcon }),
|
|
42
43
|
...rest,
|
|
43
44
|
onClick: () => autoTranslate ? disableAutoTranslate() : enableAutoTranslate()
|
|
44
45
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, IconButton, Skeleton } from "@mui/material";
|
|
3
|
-
import
|
|
3
|
+
import { Icon } from "@iconify/react";
|
|
4
|
+
import UploadIcon from "@iconify/icons-material-symbols/upload";
|
|
4
5
|
import { useState } from "react";
|
|
5
6
|
import { DeleteOutlineOutlined as DeleteOutlineOutlinedIcon } from "@mui/icons-material";
|
|
6
7
|
import { UploaderTrigger, getUploadedImageUrl } from "../uploader/index.mjs";
|
|
@@ -123,7 +124,7 @@ export function CoverImageUpload({ url, onChange, width, ...rest }) {
|
|
|
123
124
|
transform: "translate(-50%, -50%)",
|
|
124
125
|
color: "grey.500"
|
|
125
126
|
},
|
|
126
|
-
children: /* @__PURE__ */ jsx(
|
|
127
|
+
children: /* @__PURE__ */ jsx(Icon, { icon: UploadIcon, style: { fontSize: 24 } })
|
|
127
128
|
}
|
|
128
129
|
)
|
|
129
130
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Box from "@mui/material/Box";
|
|
3
3
|
import { amber } from "@mui/material/colors";
|
|
4
|
-
import
|
|
4
|
+
import { Icon } from "@iconify/react";
|
|
5
|
+
import UsersGroupIcon from "@iconify/icons-tabler/users-group";
|
|
5
6
|
export default function ChannelGroup({ size = "normal", chat, children, ...rest }) {
|
|
6
7
|
const sm = size === "sm";
|
|
7
8
|
const iconSize = sm ? 40 : 48;
|
|
@@ -20,7 +21,7 @@ export default function ChannelGroup({ size = "normal", chat, children, ...rest
|
|
|
20
21
|
p: 0.8,
|
|
21
22
|
borderRadius: "100%"
|
|
22
23
|
},
|
|
23
|
-
children: /* @__PURE__ */ jsx(Box, { component: UsersGroupIcon, sx: { fontSize: 16, color: amber[700], width: iconSize } })
|
|
24
|
+
children: /* @__PURE__ */ jsx(Box, { component: Icon, icon: UsersGroupIcon, sx: { fontSize: 16, color: amber[700], width: iconSize } })
|
|
24
25
|
}
|
|
25
26
|
),
|
|
26
27
|
/* @__PURE__ */ jsxs(Box, { sx: { display: "flex", flexDirection: "column", height: "100%", justifyContent: "space-between" }, children: [
|
|
@@ -2,7 +2,8 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Link } from "react-router-dom";
|
|
3
3
|
import { Badge } from "@mui/material";
|
|
4
4
|
import { AddonButton } from "@arcblock/ux/lib/Header/addon-button";
|
|
5
|
-
import
|
|
5
|
+
import { Icon } from "@iconify/react";
|
|
6
|
+
import MessageCircleIcon from "@iconify/icons-tabler/message-circle";
|
|
6
7
|
import { useUnreadNotification } from "./unread-notification.mjs";
|
|
7
8
|
import preferences from "../../preferences.mjs";
|
|
8
9
|
export default function ChatHeaderAddon({ ...rest }) {
|
|
@@ -16,7 +17,7 @@ export default function ChatHeaderAddon({ ...rest }) {
|
|
|
16
17
|
AddonButton,
|
|
17
18
|
{
|
|
18
19
|
size: "medium",
|
|
19
|
-
icon: /* @__PURE__ */ jsx(Badge, { color: "error", invisible: !unread, badgeContent: unreadMessageCount, children: /* @__PURE__ */ jsx(
|
|
20
|
+
icon: /* @__PURE__ */ jsx(Badge, { color: "error", invisible: !unread, badgeContent: unreadMessageCount, children: /* @__PURE__ */ jsx(Icon, { icon: MessageCircleIcon }) }),
|
|
20
21
|
...rest,
|
|
21
22
|
component: Link,
|
|
22
23
|
to: "/chat"
|
|
@@ -4,7 +4,8 @@ import { useParams } from "react-router-dom";
|
|
|
4
4
|
import { Backdrop, useMediaQuery } from "@mui/material";
|
|
5
5
|
import Box from "@mui/material/Box";
|
|
6
6
|
import CircularProgress from "@mui/material/CircularProgress";
|
|
7
|
-
import
|
|
7
|
+
import { Icon } from "@iconify/react";
|
|
8
|
+
import ChatBubbleEmptyIcon from "@iconify/icons-iconoir/chat-bubble-empty";
|
|
8
9
|
import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
|
|
9
10
|
import ChatRoom from "./chat-room.mjs";
|
|
10
11
|
import { useChatContext } from "./context.mjs";
|
|
@@ -22,7 +23,7 @@ function Empty({ sx }) {
|
|
|
22
23
|
...Array.isArray(sx) ? sx : [sx]
|
|
23
24
|
];
|
|
24
25
|
return /* @__PURE__ */ jsxs(Box, { sx: mergedSx, children: [
|
|
25
|
-
/* @__PURE__ */ jsx(
|
|
26
|
+
/* @__PURE__ */ jsx(Icon, { icon: ChatBubbleEmptyIcon, style: { fontSize: 32 } }),
|
|
26
27
|
/* @__PURE__ */ jsx(Box, { component: "span", sx: { fontSize: 14, fontWeight: 500 }, children: t("chat.noChats") })
|
|
27
28
|
] });
|
|
28
29
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Button, CircularProgress } from "@mui/material";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import { Icon } from "@iconify/react";
|
|
4
|
+
import SendIcon from "@iconify/icons-tabler/send";
|
|
5
|
+
import LetterCaseIcon from "@iconify/icons-tabler/letter-case";
|
|
5
6
|
import { useIsFocused } from "@blocklet/editor/lib/main/hooks/useIsFocused";
|
|
6
7
|
import { BusyPlugin } from "@blocklet/editor/lib/ext/BusyPlugin";
|
|
7
8
|
import { useEffect, useState } from "react";
|
|
@@ -201,7 +202,7 @@ export function ChatInput({ initialContent, send, onContentChange, onFocusChange
|
|
|
201
202
|
bgcolor: "grey.300",
|
|
202
203
|
borderRadius: "100%"
|
|
203
204
|
},
|
|
204
|
-
children: /* @__PURE__ */ jsx(Box, { component: SendIcon, sx: { fontSize: 13, color: "text.secondary" } })
|
|
205
|
+
children: /* @__PURE__ */ jsx(Box, { component: Icon, icon: SendIcon, sx: { fontSize: 13, color: "text.secondary" } })
|
|
205
206
|
}
|
|
206
207
|
),
|
|
207
208
|
/* @__PURE__ */ jsx(
|
|
@@ -263,7 +264,7 @@ export function ChatInput({ initialContent, send, onContentChange, onFocusChange
|
|
|
263
264
|
color: "primary",
|
|
264
265
|
variant: "text",
|
|
265
266
|
onMouseDown: onToolbarBtnMouseDown,
|
|
266
|
-
startIcon: /* @__PURE__ */ jsx(Box, { component: LetterCaseIcon, sx: { fontSize: "14px !important" } }),
|
|
267
|
+
startIcon: /* @__PURE__ */ jsx(Box, { component: Icon, icon: LetterCaseIcon, sx: { fontSize: "14px !important" } }),
|
|
267
268
|
sx: {
|
|
268
269
|
width: 32,
|
|
269
270
|
height: 28,
|
|
@@ -281,7 +282,7 @@ export function ChatInput({ initialContent, send, onContentChange, onFocusChange
|
|
|
281
282
|
variant: "contained",
|
|
282
283
|
disabled: !content || editorBusy,
|
|
283
284
|
onMouseDown: onSendBtnMouseDown,
|
|
284
|
-
startIcon: editorBusy ? /* @__PURE__ */ jsx(CircularProgress, { size: 12 }) : /* @__PURE__ */ jsx(Box, { component: SendIcon, sx: { fontSize: "14px !important" } }),
|
|
285
|
+
startIcon: editorBusy ? /* @__PURE__ */ jsx(CircularProgress, { size: 12 }) : /* @__PURE__ */ jsx(Box, { component: Icon, icon: SendIcon, sx: { fontSize: "14px !important" } }),
|
|
285
286
|
sx: { height: 28 },
|
|
286
287
|
children: t("chat.send")
|
|
287
288
|
}
|
|
@@ -2,7 +2,8 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Backdrop, Divider } from "@mui/material";
|
|
3
3
|
import Box from "@mui/material/Box";
|
|
4
4
|
import CircularProgress from "@mui/material/CircularProgress";
|
|
5
|
-
import
|
|
5
|
+
import { Icon } from "@iconify/react";
|
|
6
|
+
import ChatBubbleEmptyIcon from "@iconify/icons-iconoir/chat-bubble-empty";
|
|
6
7
|
import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
|
|
7
8
|
import { useEffect } from "react";
|
|
8
9
|
import bridge from "@arcblock/bridge";
|
|
@@ -28,7 +29,7 @@ function Empty({ sx }) {
|
|
|
28
29
|
...Array.isArray(sx) ? sx : [sx]
|
|
29
30
|
];
|
|
30
31
|
return /* @__PURE__ */ jsxs(Box, { sx: mergedSx, children: [
|
|
31
|
-
/* @__PURE__ */ jsx(
|
|
32
|
+
/* @__PURE__ */ jsx(Icon, { icon: ChatBubbleEmptyIcon, style: { fontSize: 32 } }),
|
|
32
33
|
/* @__PURE__ */ jsx(Box, { component: "span", sx: { fontSize: 14, fontWeight: 500 }, children: t("chat.noChats") })
|
|
33
34
|
] });
|
|
34
35
|
}
|
|
@@ -6,7 +6,8 @@ import CircularProgress from "@mui/material/CircularProgress";
|
|
|
6
6
|
import { Backdrop, Stack, useMediaQuery } from "@mui/material";
|
|
7
7
|
import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
|
|
8
8
|
import { useTheme } from "@mui/material/styles";
|
|
9
|
-
import
|
|
9
|
+
import { Icon } from "@iconify/react";
|
|
10
|
+
import UsersPlusIcon from "@iconify/icons-tabler/users-plus";
|
|
10
11
|
import { useLocalStorageState } from "ahooks";
|
|
11
12
|
import { EditorConfigProvider } from "@blocklet/editor";
|
|
12
13
|
import MessageList from "./message-list.mjs";
|
|
@@ -124,7 +125,7 @@ export default function ChatRoom({ chat, inWallet, ...rest }) {
|
|
|
124
125
|
variant: "contained",
|
|
125
126
|
color: "primary",
|
|
126
127
|
onClick: () => joinChannel(chat.id),
|
|
127
|
-
startIcon: /* @__PURE__ */ jsx(Box, { component: UsersPlusIcon, sx: { fontSize: "16px!important" } }),
|
|
128
|
+
startIcon: /* @__PURE__ */ jsx(Box, { component: Icon, icon: UsersPlusIcon, sx: { fontSize: "16px!important" } }),
|
|
128
129
|
children: t("chat.joinChannel")
|
|
129
130
|
}
|
|
130
131
|
),
|
|
@@ -4,7 +4,8 @@ import { Backdrop, useMediaQuery } from "@mui/material";
|
|
|
4
4
|
import Box from "@mui/material/Box";
|
|
5
5
|
import IconButton from "@mui/material/IconButton";
|
|
6
6
|
import CircularProgress from "@mui/material/CircularProgress";
|
|
7
|
-
import
|
|
7
|
+
import { Icon } from "@iconify/react";
|
|
8
|
+
import ChatBubbleEmptyIcon from "@iconify/icons-iconoir/chat-bubble-empty";
|
|
8
9
|
import { Add as AddIcon } from "@mui/icons-material";
|
|
9
10
|
import { Helmet } from "react-helmet";
|
|
10
11
|
import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
|
|
@@ -27,7 +28,7 @@ function Empty({ sx }) {
|
|
|
27
28
|
...Array.isArray(sx) ? sx : [sx]
|
|
28
29
|
];
|
|
29
30
|
return /* @__PURE__ */ jsxs(Box, { sx: mergedSx, children: [
|
|
30
|
-
/* @__PURE__ */ jsx(
|
|
31
|
+
/* @__PURE__ */ jsx(Icon, { icon: ChatBubbleEmptyIcon, style: { fontSize: 32 } }),
|
|
31
32
|
/* @__PURE__ */ jsx(Box, { component: "span", sx: { fontSize: 14, fontWeight: 500 }, children: t("chat.noChats") })
|
|
32
33
|
] });
|
|
33
34
|
}
|
|
@@ -4,7 +4,8 @@ import { Autocomplete, Backdrop, Box, InputAdornment, TextField, Typography } fr
|
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import { useRequest } from "ahooks";
|
|
6
6
|
import DID from "@arcblock/ux/lib/DID";
|
|
7
|
-
import
|
|
7
|
+
import { Icon } from "@iconify/react";
|
|
8
|
+
import SearchIcon from "@iconify/icons-tabler/search";
|
|
8
9
|
import { useNavigate } from "react-router-dom";
|
|
9
10
|
import ReactDOM from "react-dom";
|
|
10
11
|
import { mergeSx } from "../utils.mjs";
|
|
@@ -126,7 +127,7 @@ export function UserSearch({ sx, inputSx, ...rest }) {
|
|
|
126
127
|
...params.InputProps,
|
|
127
128
|
type: "search",
|
|
128
129
|
sx: inputSx,
|
|
129
|
-
startAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx(Box, { component: SearchIcon, sx: { fontSize: 14 } }) })
|
|
130
|
+
startAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx(Box, { component: Icon, icon: SearchIcon, sx: { fontSize: 14 } }) })
|
|
130
131
|
}
|
|
131
132
|
}
|
|
132
133
|
}
|
|
@@ -6,7 +6,8 @@ import Alert from "@mui/material/Alert";
|
|
|
6
6
|
import Box from "@mui/material/Box";
|
|
7
7
|
import isBoolean from "lodash/isBoolean";
|
|
8
8
|
import { useContext } from "react";
|
|
9
|
-
import
|
|
9
|
+
import { Icon } from "@iconify/react";
|
|
10
|
+
import LanguageMarkdownIcon from "@iconify/icons-mdi/language-markdown";
|
|
10
11
|
import Input from "./input.mjs";
|
|
11
12
|
export default function CommentInput({
|
|
12
13
|
disabledSend,
|
|
@@ -53,7 +54,7 @@ export default function CommentInput({
|
|
|
53
54
|
component: "span",
|
|
54
55
|
sx: { display: "inline-flex", alignItems: "center", mr: 0.5, lineHeight: 1 },
|
|
55
56
|
title: "Styling with Markdown is supported",
|
|
56
|
-
children: /* @__PURE__ */ jsx(
|
|
57
|
+
children: /* @__PURE__ */ jsx(Icon, { icon: LanguageMarkdownIcon, style: { fontSize: 16 } })
|
|
57
58
|
}
|
|
58
59
|
)
|
|
59
60
|
}
|
|
@@ -2,7 +2,8 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Link } from "react-router-dom";
|
|
3
3
|
import Box from "@mui/material/Box";
|
|
4
4
|
import { LabelPicker as InnerLabelPicker } from "@blocklet/labels";
|
|
5
|
-
import
|
|
5
|
+
import { Icon } from "@iconify/react";
|
|
6
|
+
import EditOutlineIcon from "@iconify/icons-material-symbols/edit-outline";
|
|
6
7
|
import { AccessControl, useAuthzContext } from "./authz/index.mjs";
|
|
7
8
|
export function SecureLabelPicker(props) {
|
|
8
9
|
const { isAdmin } = useAuthzContext();
|
|
@@ -31,7 +32,7 @@ export function SecureLabelPicker(props) {
|
|
|
31
32
|
textDecoration: "none"
|
|
32
33
|
},
|
|
33
34
|
children: [
|
|
34
|
-
/* @__PURE__ */ jsx(
|
|
35
|
+
/* @__PURE__ */ jsx(Icon, { icon: EditOutlineIcon }),
|
|
35
36
|
/* @__PURE__ */ jsx("span", { children: "Edit labels" })
|
|
36
37
|
]
|
|
37
38
|
}
|
|
@@ -7,9 +7,9 @@ import Box from "@mui/material/Box";
|
|
|
7
7
|
import Button from "@mui/material/Button";
|
|
8
8
|
import { red } from "@mui/material/colors";
|
|
9
9
|
import MuiMenuItem from "@mui/material/MenuItem";
|
|
10
|
-
import { Icon } from "@iconify/react";
|
|
11
10
|
import { Suspense, useState } from "react";
|
|
12
|
-
import
|
|
11
|
+
import { Icon } from "@iconify/react";
|
|
12
|
+
import PinnedIcon from "@iconify/icons-tabler/pinned";
|
|
13
13
|
import preferences from "../../preferences.mjs";
|
|
14
14
|
import { useConfirm } from "../confirm.mjs";
|
|
15
15
|
import { useSessionContext } from "../hooks/index.mjs";
|
|
@@ -79,7 +79,7 @@ export default function Comment({
|
|
|
79
79
|
py: 0.25
|
|
80
80
|
},
|
|
81
81
|
children: [
|
|
82
|
-
/* @__PURE__ */ jsx(Box, { component: PinnedIcon, sx: { fontSize: 12 } }),
|
|
82
|
+
/* @__PURE__ */ jsx(Box, { component: Icon, icon: PinnedIcon, sx: { fontSize: 12 } }),
|
|
83
83
|
t("pinned")
|
|
84
84
|
]
|
|
85
85
|
}
|
|
@@ -6,7 +6,8 @@ import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
|
|
|
6
6
|
import MuiMenuItem from "@mui/material/MenuItem";
|
|
7
7
|
import clsx from "clsx";
|
|
8
8
|
import { useInViewport } from "ahooks";
|
|
9
|
-
import
|
|
9
|
+
import { Icon } from "@iconify/react";
|
|
10
|
+
import ArrowForwardUpIcon from "@iconify/icons-tabler/arrow-forward-up";
|
|
10
11
|
import { Stack } from "@mui/material";
|
|
11
12
|
import RelativeTime from "../shared/relative-time.mjs";
|
|
12
13
|
import { AuthorInfo } from "../avatars/index.mjs";
|
|
@@ -151,7 +152,7 @@ export default function PostComponent({
|
|
|
151
152
|
".did-address-text": { color: "primary.light" }
|
|
152
153
|
},
|
|
153
154
|
children: [
|
|
154
|
-
/* @__PURE__ */ jsx(Box, { component: ArrowForwardUpIcon }),
|
|
155
|
+
/* @__PURE__ */ jsx(Box, { component: Icon, icon: ArrowForwardUpIcon }),
|
|
155
156
|
/* @__PURE__ */ jsx("span", { children: "Reply to" }),
|
|
156
157
|
/* @__PURE__ */ jsx(Box, { component: "span", children: post.replyTo.fullName })
|
|
157
158
|
]
|
|
@@ -3,7 +3,8 @@ import { useMemo, useState } from "react";
|
|
|
3
3
|
import { styled } from "@arcblock/ux/lib/Theme";
|
|
4
4
|
import Box from "@mui/material/Box";
|
|
5
5
|
import clsx from "clsx";
|
|
6
|
-
import
|
|
6
|
+
import { Icon } from "@iconify/react";
|
|
7
|
+
import ThumbUpIcon from "@iconify/icons-iconoir/thumbs-up";
|
|
7
8
|
import RaterList from "./rater-list.mjs";
|
|
8
9
|
import Rating from "./rating.mjs";
|
|
9
10
|
import { useSessionContext } from "../hooks/index.mjs";
|
|
@@ -34,7 +35,11 @@ export default function BinaryThumb({ data = [], variant = "default", size = "sm
|
|
|
34
35
|
setLoading(false);
|
|
35
36
|
};
|
|
36
37
|
return /* @__PURE__ */ jsx(Root, { children: options.map((option) => {
|
|
37
|
-
const
|
|
38
|
+
const iconStyle = {};
|
|
39
|
+
if (option.value === "-1") {
|
|
40
|
+
iconStyle.transform = "rotate(180deg)";
|
|
41
|
+
}
|
|
42
|
+
const icon = /* @__PURE__ */ jsx(Icon, { icon: ThumbUpIcon, style: iconStyle });
|
|
38
43
|
return /* @__PURE__ */ jsxs("div", { className: "reaction-item", children: [
|
|
39
44
|
/* @__PURE__ */ jsx(
|
|
40
45
|
IconButton,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo, useState } from "react";
|
|
3
3
|
import { Box, Chip, ClickAwayListener, Tooltip, alpha } from "@mui/material";
|
|
4
|
-
import
|
|
4
|
+
import { Icon } from "@iconify/react";
|
|
5
|
+
import MoodPlusIcon from "@iconify/icons-tabler/mood-plus";
|
|
5
6
|
import { useSessionContext } from "../hooks/index.mjs";
|
|
6
7
|
import { IconButton } from "../icon-button.mjs";
|
|
7
8
|
const emojiFont = {
|
|
@@ -85,7 +86,7 @@ export default function GithubReaction({
|
|
|
85
86
|
};
|
|
86
87
|
const mergedSx = [{ position: "relative", ...hasReaction && { mt: 2.5 } }, ...Array.isArray(sx) ? sx : [sx]];
|
|
87
88
|
return /* @__PURE__ */ jsxs(IconButton, { onClick: handleOpen, sx: mergedSx, ...rest, children: [
|
|
88
|
-
/* @__PURE__ */ jsx(Box, { component: MoodPlusIcon }),
|
|
89
|
+
/* @__PURE__ */ jsx(Box, { component: Icon, icon: MoodPlusIcon }),
|
|
89
90
|
hasReaction && /* @__PURE__ */ jsx(Box, { sx: { position: "absolute", top: -24, left: 5, display: "flex", gap: 1 }, children: options.map((option) => {
|
|
90
91
|
if (!countPerValue[option.value]) {
|
|
91
92
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/discuss-kit-ux",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.40",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -19,17 +19,20 @@
|
|
|
19
19
|
"@arcblock/react-hooks": "^3.1.5",
|
|
20
20
|
"@arcblock/ws": "^1.21.2",
|
|
21
21
|
"@blocklet/js-sdk": "^1.16.48",
|
|
22
|
-
"@blocklet/uploader": "^0.2.
|
|
22
|
+
"@blocklet/uploader": "^0.2.7",
|
|
23
23
|
"@emotion/css": "^11.13.5",
|
|
24
24
|
"@emotion/react": "^11.14.0",
|
|
25
25
|
"@emotion/styled": "^11.14.1",
|
|
26
|
+
"@iconify/icons-iconoir": "^1.2.30",
|
|
27
|
+
"@iconify/icons-material-symbols": "^1.2.58",
|
|
28
|
+
"@iconify/icons-mdi": "^1.2.48",
|
|
29
|
+
"@iconify/icons-tabler": "^1.2.95",
|
|
26
30
|
"@iconify/react": "^4.1.1",
|
|
27
31
|
"@lexical/react": "^0.30.0",
|
|
28
32
|
"@lexical/text": "^0.30.0",
|
|
29
33
|
"ahooks": "^3.8.1",
|
|
30
34
|
"axios": "^0.27.2",
|
|
31
35
|
"dayjs": "^1.11.13",
|
|
32
|
-
"franc-min": "^6.2.0",
|
|
33
36
|
"js-cookie": "^3.0.5",
|
|
34
37
|
"lexical": "^0.30.0",
|
|
35
38
|
"lottie-react": "^2.4.0",
|
|
@@ -44,12 +47,12 @@
|
|
|
44
47
|
"unstated-next": "^1.1.0",
|
|
45
48
|
"url-join": "^4.0.1",
|
|
46
49
|
"zustand": "^4.5.5",
|
|
47
|
-
"@blocklet/editor": "2.4.
|
|
48
|
-
"@blocklet/labels": "2.4.
|
|
50
|
+
"@blocklet/editor": "2.4.40",
|
|
51
|
+
"@blocklet/labels": "2.4.40"
|
|
49
52
|
},
|
|
50
53
|
"peerDependencies": {
|
|
51
|
-
"@arcblock/did-connect-react": "^3.1.
|
|
52
|
-
"@arcblock/ux": "^3.1.
|
|
54
|
+
"@arcblock/did-connect-react": "^3.1.5",
|
|
55
|
+
"@arcblock/ux": "^3.1.5",
|
|
53
56
|
"@mui/icons-material": "^7.1.2",
|
|
54
57
|
"@mui/lab": "^7.0.0-beta.14",
|
|
55
58
|
"@mui/material": "^7.1.2",
|
|
@@ -62,10 +65,6 @@
|
|
|
62
65
|
"devDependencies": {
|
|
63
66
|
"@arcblock/eslint-config-ts": "^0.3.3",
|
|
64
67
|
"@babel/core": "^7.25.2",
|
|
65
|
-
"@blocklet/sdk": "^1.16.48",
|
|
66
|
-
"@iconify-json/iconoir": "^1.2.1",
|
|
67
|
-
"@iconify-json/material-symbols": "^1.2.1",
|
|
68
|
-
"@iconify-json/mdi": "^1.2.0",
|
|
69
68
|
"@storybook/addon-actions": "^6.5.16",
|
|
70
69
|
"@storybook/addon-essentials": "^6.5.16",
|
|
71
70
|
"@storybook/addon-interactions": "^6.5.16",
|
|
@@ -82,13 +81,10 @@
|
|
|
82
81
|
"babel-loader": "^8.4.1",
|
|
83
82
|
"react": "^19.1.0",
|
|
84
83
|
"react-dom": "^19.1.0",
|
|
85
|
-
"rollup-plugin-node-externals": "^7.1.3",
|
|
86
84
|
"typescript": "^4.9.5",
|
|
87
85
|
"unbuild": "^3.6.0",
|
|
88
|
-
"unplugin-icons": "^0.14.15",
|
|
89
86
|
"vite": "^7.0.0",
|
|
90
|
-
"vite-plugin-dts": "^4.5.4"
|
|
91
|
-
"vite-plugin-libcss": "^1.1.2"
|
|
87
|
+
"vite-plugin-dts": "^4.5.4"
|
|
92
88
|
},
|
|
93
89
|
"scripts": {
|
|
94
90
|
"build": "unbuild",
|