@solostylist/ui-kit 1.0.196 → 1.0.198
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/{ArrowUpward-JWPHrR6I.js → ArrowUpward-D8eqD-si.js} +1 -1
- package/dist/{Box-p3bpOtdn.js → Box-BkXoTbe8.js} +3 -3
- package/dist/{ButtonBase-PbSTzuUP.js → ButtonBase-D73M0QY5.js} +7 -7
- package/dist/{ChevronLeft-BJjuFNNQ.js → ChevronLeft-BmgmPHp9.js} +1 -1
- package/dist/{ChevronRight-5ZX3FodP.js → ChevronRight-DbWSr8yz.js} +1 -1
- package/dist/{Close-C-pCw-CD.js → Close-lHCUMitI.js} +1 -1
- package/dist/{ContentCopy-CNxsEhmq.js → ContentCopy-D4SuJd86.js} +1 -1
- package/dist/{DefaultPropsProvider-2MEHB2yv.js → DefaultPropsProvider-DPuuPIbS.js} +2 -2
- package/dist/{Download-D97XSAig.js → Download-BoRQUwCf.js} +1 -1
- package/dist/{ExpandMore-CTZrSZlF.js → ExpandMore-C7yRQv1-.js} +1 -1
- package/dist/{Favorite-Cvjg7GqN.js → Favorite-Bz_HcMgN.js} +1 -1
- package/dist/{Menu-_ZW9WiF2.js → Menu-GVFDMHCN.js} +137 -131
- package/dist/{MenuItem-DTapLhin.js → MenuItem-2wG8I2HO.js} +5 -5
- package/dist/{Paper-5nSdRRBA.js → Paper-CR019bki.js} +6 -6
- package/dist/{Select-J5gDqfEk.js → Select-80JhW337.js} +7 -7
- package/dist/{Stack-BlwLEm6H.js → Stack-Dfjnuorw.js} +5 -5
- package/dist/{Typography-Cum5_Ehu.js → Typography-PcmlIqm1.js} +4 -4
- package/dist/assets/s-overlay-scrollbar.css +1 -1
- package/dist/{createSvgIcon-DTNHY3_v.js → createSvgIcon-BkbeLOhM.js} +3 -3
- package/dist/{createTheme-CIXJrNxb.js → createTheme-DgoJyWM-.js} +874 -871
- package/dist/defaultTheme-CulFxfLR.js +5 -0
- package/dist/{extendSxProp-CyoueGTe.js → extendSxProp-BJEIxcAx.js} +1 -1
- package/dist/{index-8LcCMmwl.js → index-DtGYsHSv.js} +4 -4
- package/dist/s-accordion/s-accordion.js +89 -89
- package/dist/s-action-overlay/s-action-overlay.js +7 -7
- package/dist/s-ai-tool-bar/s-ai-tool-bar.d.ts +44 -0
- package/dist/s-ai-tool-bar/s-ai-tool-bar.js +241 -272
- package/dist/s-avatar/s-avatar.js +2 -2
- package/dist/s-breadcrumbs/s-breadcrumbs.js +1 -1
- package/dist/s-carousel/s-carousel.d.ts +4 -4
- package/dist/s-carousel/s-carousel.js +4 -4
- package/dist/s-chat-input/s-chat-input.js +4 -4
- package/dist/s-chat-message/s-chat-message.js +135 -124
- package/dist/s-chips/s-chips.js +35 -35
- package/dist/s-code-block/s-code-block.js +1 -1
- package/dist/s-comment-message/s-comment-message.js +5 -5
- package/dist/s-copyable-text/s-copyable-text.js +1 -1
- package/dist/s-countdown/s-count-down.d.ts +15 -10
- package/dist/s-countdown/s-count-down.js +84 -101
- package/dist/s-data-table/s-data-table.js +75 -76
- package/dist/s-date-picker/s-date-picker.js +43 -47
- package/dist/s-datetime-picker/s-datetime-picker.js +782 -782
- package/dist/s-dialog/s-dialog.js +1 -1
- package/dist/s-dialog-confirm/s-dialog-confirm.js +2 -2
- package/dist/s-dialog-message/s-dialog-message.js +2 -2
- package/dist/s-empty/s-empty.js +1 -1
- package/dist/s-file-dropzone/s-file-dropzone.js +4 -4
- package/dist/s-file-icon/s-file-icon.js +15 -15
- package/dist/s-flex-box/s-flex-box.js +1 -1
- package/dist/s-gallery/s-gallery.js +1 -1
- package/dist/s-gradient-icon/s-gradient-icon.js +5 -5
- package/dist/s-image-comparison/s-image-comparison.js +3 -3
- package/dist/s-image-modal/s-image-modal.js +7 -7
- package/dist/s-label/s-label.d.ts +1 -1
- package/dist/s-label/s-label.js +1 -1
- package/dist/s-language-switcher/s-language-switcher.js +8 -8
- package/dist/s-localization-provider/s-localization-provider.js +1 -1
- package/dist/s-moving-border/s-moving-border.d.ts +5 -5
- package/dist/s-multi-select/s-multi-select.js +3 -3
- package/dist/s-overlay-scrollbar/s-overlay-scrollbar.js +6 -6
- package/dist/s-pixel-reveal/s-pixel-reveal.js +76 -71
- package/dist/s-radial-pulse-animate/s-radial-pulse-animate.js +2 -2
- package/dist/s-review/s-review.d.ts +3 -2
- package/dist/s-review/s-review.js +19 -19
- package/dist/s-scroll-to-top/s-scroll-to-top.js +5 -5
- package/dist/s-scroll-velocity/scroll-velocity-container.d.ts +1 -1
- package/dist/s-scroll-velocity/scroll-velocity-row.d.ts +3 -3
- package/dist/s-scroll-velocity/scroll-velocity-row.js +2 -2
- package/dist/s-select/s-select.d.ts +3 -0
- package/dist/s-select/s-select.js +60 -72
- package/dist/s-select-list/s-select-list.js +1 -1
- package/dist/s-stripe/s-stripe-cvc.d.ts +1 -1
- package/dist/s-stripe/s-stripe-expiry.d.ts +1 -1
- package/dist/s-stripe/s-stripe-number.d.ts +1 -1
- package/dist/s-stripe/stripe-input.d.ts +1 -1
- package/dist/s-text-editor/s-text-editor-toolbar.js +64 -60
- package/dist/s-text-editor/s-text-editor.js +1 -1
- package/dist/s-text-field/s-text-field.js +1 -1
- package/dist/s-text-shimmer/s-text-shimmer.js +3 -3
- package/dist/s-theme-demo/s-theme-demo.js +2 -2
- package/dist/s-theme-provider/s-theme-provider.d.ts +1 -1
- package/dist/s-theme-switch/s-theme-switch.js +1 -1
- package/dist/s-tip/s-tip.js +3 -3
- package/dist/{styled-BR6UL29H.js → styled-8Y5KoVix.js} +2 -2
- package/dist/theme/components/avatar.js +1 -1
- package/dist/theme/components/button.d.ts +2 -2
- package/dist/theme/components/button.js +1 -1
- package/dist/theme/components/chip.d.ts +2 -2
- package/dist/theme/components/chip.js +1 -1
- package/dist/theme/components/icon-button.d.ts +2 -2
- package/dist/theme/components/popover.js +2 -2
- package/dist/theme/components/skeleton.js +1 -1
- package/dist/theme/components/tooltip.js +5 -5
- package/dist/theme/customizations/data-display.js +12 -12
- package/dist/theme/customizations/feedback.js +2 -2
- package/dist/theme/customizations/inputs.js +12 -12
- package/dist/theme/customizations/navigation.js +28 -28
- package/dist/theme/customizations/surfaces.js +11 -11
- package/dist/theme/theme-primitives.js +1 -1
- package/dist/{useMobilePicker-C0pYjskU.js → useMobilePicker-DVnEuXv1.js} +3936 -3653
- package/dist/{useTheme-DSvhq4Np.js → useTheme-CWPkv7g3.js} +1 -1
- package/dist/{useThemeProps-C-oV4Fbz.js → useThemeProps-XYgXGzjS.js} +1 -1
- package/dist/utils/logger.d.ts +1 -1
- package/dist/utils-CHdpkEZx.js +33 -0
- package/dist/{warning-BZ61Y8gI.js → warning-Ba-7BBAN.js} +3 -3
- package/package.json +59 -59
- package/dist/defaultTheme-DLue8Fr1.js +0 -5
- package/dist/utils-DJIrqgo5.js +0 -18
|
@@ -6,13 +6,13 @@ const n = ({ avatar: i, name: a, showName: e = !1, size: r = 40, avatarProps: o
|
|
|
6
6
|
h,
|
|
7
7
|
{
|
|
8
8
|
src: i,
|
|
9
|
-
alt: a
|
|
9
|
+
alt: a ?? "Avatar",
|
|
10
10
|
width: r,
|
|
11
11
|
height: r,
|
|
12
12
|
variant: "circular",
|
|
13
13
|
style: { borderRadius: "50%" }
|
|
14
14
|
}
|
|
15
|
-
) : a?.[0]
|
|
15
|
+
) : a?.[0] ?? "A" }),
|
|
16
16
|
e && /* @__PURE__ */ t.jsx(d, { variant: "body1", fontSize: 20, children: a })
|
|
17
17
|
] });
|
|
18
18
|
n.displayName = "SAvatar";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as o } from "../jsx-runtime-tc70JA_2.js";
|
|
2
2
|
import { forwardRef as f } from "react";
|
|
3
|
-
import { C as i } from "../ChevronRight-
|
|
3
|
+
import { C as i } from "../ChevronRight-DbWSr8yz.js";
|
|
4
4
|
import { Breadcrumbs as $, Typography as t, Link as e } from "@mui/material";
|
|
5
5
|
const j = f(
|
|
6
6
|
({
|
|
@@ -6,13 +6,13 @@ import { default as Slider, Settings } from 'react-slick';
|
|
|
6
6
|
*/
|
|
7
7
|
export interface SCarouselProps extends PropsWithChildren, Settings {
|
|
8
8
|
/** Custom color for the navigation dots */
|
|
9
|
-
dotColor?: string;
|
|
9
|
+
readonly dotColor?: string;
|
|
10
10
|
/** Space between slides in pixels */
|
|
11
|
-
spaceBetween?: number;
|
|
11
|
+
readonly spaceBetween?: number;
|
|
12
12
|
/** Custom styles for the dots container */
|
|
13
|
-
dotStyles?: SxProps<Theme>;
|
|
13
|
+
readonly dotStyles?: SxProps<Theme>;
|
|
14
14
|
/** Custom styles for the arrow buttons */
|
|
15
|
-
arrowStyles?: SxProps<Theme>;
|
|
15
|
+
readonly arrowStyles?: SxProps<Theme>;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* A carousel component built on react-slick with smooth sliding functionality and customizable navigation.
|
|
@@ -3,7 +3,7 @@ import ue, { forwardRef as nt } from "react";
|
|
|
3
3
|
import { styled as Me, useTheme as it } from "@mui/material";
|
|
4
4
|
import { c as be, a as ot, g as at } from "../_commonjsHelpers-ByX85dGu.js";
|
|
5
5
|
import { SIconButton as Ue } from "../s-icon-button/s-icon-button.js";
|
|
6
|
-
import { c as Ve } from "../createSvgIcon-
|
|
6
|
+
import { c as Ve } from "../createSvgIcon-BkbeLOhM.js";
|
|
7
7
|
import '../assets/s-carousel.css';const lt = Ve(/* @__PURE__ */ oe.jsx("path", {
|
|
8
8
|
d: "M17.77 3.77 16 2 6 12l10 10 1.77-1.77L9.54 12z"
|
|
9
9
|
}), "ArrowBackIosNew"), st = Ve(/* @__PURE__ */ oe.jsx("path", {
|
|
@@ -2374,7 +2374,7 @@ const Wt = /* @__PURE__ */ at(At), qt = Me("div", {
|
|
|
2374
2374
|
display: "flex",
|
|
2375
2375
|
alignItems: "center",
|
|
2376
2376
|
justifyContent: "center",
|
|
2377
|
-
color: (i.vars
|
|
2377
|
+
color: (i.vars ?? i).palette.primary.main,
|
|
2378
2378
|
"& li": {
|
|
2379
2379
|
width: 13,
|
|
2380
2380
|
height: 7,
|
|
@@ -2384,7 +2384,7 @@ const Wt = /* @__PURE__ */ at(At), qt = Me("div", {
|
|
|
2384
2384
|
alignItems: "center",
|
|
2385
2385
|
justifyContent: "center",
|
|
2386
2386
|
transition: "all 0.4s",
|
|
2387
|
-
"&.slick-active span": { backgroundColor: (i.vars
|
|
2387
|
+
"&.slick-active span": { backgroundColor: (i.vars ?? i).palette.primary.main },
|
|
2388
2388
|
"&.slick-active": { width: 18 }
|
|
2389
2389
|
}
|
|
2390
2390
|
})), Bt = Me("span", {
|
|
@@ -2395,7 +2395,7 @@ const Wt = /* @__PURE__ */ at(At), qt = Me("div", {
|
|
|
2395
2395
|
borderRadius: 12,
|
|
2396
2396
|
cursor: "pointer",
|
|
2397
2397
|
position: "relative",
|
|
2398
|
-
backgroundColor: i
|
|
2398
|
+
backgroundColor: i ?? (c.vars ?? c).palette.divider
|
|
2399
2399
|
}));
|
|
2400
2400
|
function Xt({ onClick: i, sx: c, className: h }) {
|
|
2401
2401
|
const O = h?.split(" ").filter((y) => y !== "slick-next").join(" ");
|
|
@@ -5,9 +5,9 @@ import q from "emoji-picker-react";
|
|
|
5
5
|
import { SFileIcon as G } from "../s-file-icon/s-file-icon.js";
|
|
6
6
|
import { SIconButton as d } from "../s-icon-button/s-icon-button.js";
|
|
7
7
|
import { STextField as J } from "../s-text-field/s-text-field.js";
|
|
8
|
-
import { C as Q } from "../Close-
|
|
9
|
-
import { c as R } from "../createSvgIcon-
|
|
10
|
-
import { A as X } from "../ArrowUpward-
|
|
8
|
+
import { C as Q } from "../Close-lHCUMitI.js";
|
|
9
|
+
import { c as R } from "../createSvgIcon-BkbeLOhM.js";
|
|
10
|
+
import { A as X } from "../ArrowUpward-D8eqD-si.js";
|
|
11
11
|
const Y = R(/* @__PURE__ */ r.jsx("path", {
|
|
12
12
|
d: "M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z"
|
|
13
13
|
}), "AttachFile"), Z = R(/* @__PURE__ */ r.jsx("path", {
|
|
@@ -32,7 +32,7 @@ const Y = R(/* @__PURE__ */ r.jsx("path", {
|
|
|
32
32
|
}, k = () => {
|
|
33
33
|
a || p.trim().length === 0 && l.length === 0 || (I?.(p, l), u(""), i.forEach((e) => URL.revokeObjectURL(e)), h(/* @__PURE__ */ new Map()), m([]));
|
|
34
34
|
}, z = (e) => {
|
|
35
|
-
const n = Array.from(e.target.files
|
|
35
|
+
const n = Array.from(e.target.files ?? []).filter((t) => !(j && t.size > j));
|
|
36
36
|
m((t) => [...t, ...n]), E?.(n), e.target.value = "";
|
|
37
37
|
}, K = (e) => {
|
|
38
38
|
const o = l[e];
|
|
@@ -1,121 +1,132 @@
|
|
|
1
1
|
import { j as e } from "../jsx-runtime-tc70JA_2.js";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Box as
|
|
4
|
-
import { SAvatar as
|
|
2
|
+
import { useState as k } from "react";
|
|
3
|
+
import { Box as s, Typography as n, Paper as V, IconButton as M } from "@mui/material";
|
|
4
|
+
import { SAvatar as F } from "../s-avatar/s-avatar.js";
|
|
5
5
|
import { SImageModal as P } from "../s-image-modal/s-image-modal.js";
|
|
6
6
|
import U from "../s-lazy-image/s-lazy-image.js";
|
|
7
|
-
import { SSkeleton as
|
|
8
|
-
import { c as
|
|
9
|
-
import { f as H, a as q } from "../utils-
|
|
10
|
-
import { D as E } from "../Download-
|
|
11
|
-
const G =
|
|
7
|
+
import { SSkeleton as t } from "../s-skeleton/s-skeleton.js";
|
|
8
|
+
import { c as v } from "../createSvgIcon-BkbeLOhM.js";
|
|
9
|
+
import { f as H, a as q } from "../utils-CHdpkEZx.js";
|
|
10
|
+
import { D as E } from "../Download-BoRQUwCf.js";
|
|
11
|
+
const G = v(/* @__PURE__ */ e.jsx("path", {
|
|
12
12
|
d: "M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"
|
|
13
|
-
}), "ErrorOutline"), J =
|
|
13
|
+
}), "ErrorOutline"), J = v(/* @__PURE__ */ e.jsx("path", {
|
|
14
14
|
d: "M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm7 7V3.5L18.5 9z"
|
|
15
|
-
}), "InsertDriveFile"), K =
|
|
15
|
+
}), "InsertDriveFile"), K = v(/* @__PURE__ */ e.jsx("path", {
|
|
16
16
|
d: "M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"
|
|
17
|
-
}), "Refresh"), Q = ({
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
17
|
+
}), "Refresh"), Q = ({ isSent: r, showAvatar: d, showTimestamp: x, senderName: p, maxWidth: l, sx: a, ...c }) => /* @__PURE__ */ e.jsxs(
|
|
18
|
+
s,
|
|
19
|
+
{
|
|
20
|
+
display: "flex",
|
|
21
|
+
flexDirection: r ? "row-reverse" : "row",
|
|
22
|
+
alignItems: "flex-start",
|
|
23
|
+
gap: 1,
|
|
24
|
+
mb: 1,
|
|
25
|
+
sx: {
|
|
26
|
+
maxWidth: l,
|
|
27
|
+
alignSelf: r ? "flex-end" : "flex-start",
|
|
28
|
+
...a
|
|
29
|
+
},
|
|
30
|
+
...c,
|
|
31
|
+
children: [
|
|
32
|
+
d && !r && /* @__PURE__ */ e.jsx(t, { component: "rounded-avatar", width: 36, height: 36 }),
|
|
33
|
+
/* @__PURE__ */ e.jsxs(
|
|
34
|
+
s,
|
|
35
|
+
{
|
|
36
|
+
display: "flex",
|
|
37
|
+
flexDirection: "column",
|
|
38
|
+
alignItems: r ? "flex-end" : "flex-start",
|
|
39
|
+
gap: 0.5,
|
|
40
|
+
sx: { minWidth: 0 },
|
|
41
|
+
children: [
|
|
42
|
+
p && !r && /* @__PURE__ */ e.jsx(t, { variant: "text", width: 100, height: 12, sx: { ml: 0.5 } }),
|
|
43
|
+
/* @__PURE__ */ e.jsxs(
|
|
44
|
+
s,
|
|
45
|
+
{
|
|
46
|
+
sx: {
|
|
47
|
+
display: "inline-block",
|
|
48
|
+
width: "20rem",
|
|
49
|
+
maxWidth: "100%",
|
|
50
|
+
overflow: "hidden",
|
|
51
|
+
ml: 0.5
|
|
52
|
+
},
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ e.jsx(t, { variant: "text", width: "100%", height: 16, sx: { mb: 0.5 } }),
|
|
55
|
+
/* @__PURE__ */ e.jsx(t, { variant: "text", width: "85%", height: 16, sx: { mb: 0.5 } }),
|
|
56
|
+
/* @__PURE__ */ e.jsx(t, { variant: "text", width: "70%", height: 16 })
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
x && /* @__PURE__ */ e.jsx(t, { variant: "text", width: 60, height: 10, sx: { ml: r ? 0 : 0.5, mr: r ? 0.5 : 0 } })
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
d && r && /* @__PURE__ */ e.jsx(t, { component: "rounded-avatar", width: 36, height: 36 })
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
), X = ({
|
|
68
|
+
message: r,
|
|
69
|
+
variant: d = "received",
|
|
70
|
+
timestamp: x,
|
|
71
|
+
avatar: p,
|
|
72
|
+
senderName: l,
|
|
73
|
+
showAvatar: a = !0,
|
|
74
|
+
showTimestamp: c = !1,
|
|
75
|
+
maxWidth: I = "70%",
|
|
76
|
+
attachments: u = [],
|
|
77
|
+
onAttachmentClick: f,
|
|
78
|
+
onDownload: h,
|
|
79
|
+
hasError: m = !1,
|
|
30
80
|
errorMessage: W = "Failed to send message",
|
|
31
|
-
onRetry:
|
|
81
|
+
onRetry: y,
|
|
32
82
|
loading: D = !1,
|
|
33
|
-
sx:
|
|
34
|
-
...
|
|
83
|
+
sx: w,
|
|
84
|
+
...b
|
|
35
85
|
}) => {
|
|
36
|
-
const [
|
|
37
|
-
|
|
86
|
+
const [g, z] = k(null), [O, S] = k(!1), o = d === "sent", L = (i) => {
|
|
87
|
+
f ? f(i) : (z(i), S(!0));
|
|
38
88
|
}, R = (i) => {
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
return D ? /* @__PURE__ */ e.
|
|
42
|
-
|
|
89
|
+
f ? f(i) : h && h(i);
|
|
90
|
+
}, j = u.filter((i) => i.type === "image"), C = u.filter((i) => i.type === "file");
|
|
91
|
+
return D ? /* @__PURE__ */ e.jsx(
|
|
92
|
+
Q,
|
|
43
93
|
{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
sx:
|
|
50
|
-
|
|
51
|
-
alignSelf: s ? "flex-end" : "flex-start",
|
|
52
|
-
...y
|
|
53
|
-
},
|
|
54
|
-
...S,
|
|
55
|
-
children: [
|
|
56
|
-
n && !s && /* @__PURE__ */ e.jsx(l, { component: "rounded-avatar", width: 36, height: 36 }),
|
|
57
|
-
/* @__PURE__ */ e.jsxs(
|
|
58
|
-
r,
|
|
59
|
-
{
|
|
60
|
-
display: "flex",
|
|
61
|
-
flexDirection: "column",
|
|
62
|
-
alignItems: s ? "flex-end" : "flex-start",
|
|
63
|
-
gap: 0.5,
|
|
64
|
-
sx: { minWidth: 0 },
|
|
65
|
-
children: [
|
|
66
|
-
o && !s && /* @__PURE__ */ e.jsx(l, { variant: "text", width: 100, height: 12, sx: { ml: 0.5 } }),
|
|
67
|
-
/* @__PURE__ */ e.jsxs(
|
|
68
|
-
r,
|
|
69
|
-
{
|
|
70
|
-
sx: {
|
|
71
|
-
display: "inline-block",
|
|
72
|
-
width: "20rem",
|
|
73
|
-
maxWidth: "100%",
|
|
74
|
-
overflow: "hidden",
|
|
75
|
-
ml: 0.5
|
|
76
|
-
},
|
|
77
|
-
children: [
|
|
78
|
-
/* @__PURE__ */ e.jsx(l, { variant: "text", width: "100%", height: 16, sx: { mb: 0.5 } }),
|
|
79
|
-
/* @__PURE__ */ e.jsx(l, { variant: "text", width: "85%", height: 16, sx: { mb: 0.5 } }),
|
|
80
|
-
/* @__PURE__ */ e.jsx(l, { variant: "text", width: "70%", height: 16 })
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
),
|
|
84
|
-
u && /* @__PURE__ */ e.jsx(l, { variant: "text", width: 60, height: 10, sx: { ml: s ? 0 : 0.5, mr: s ? 0.5 : 0 } })
|
|
85
|
-
]
|
|
86
|
-
}
|
|
87
|
-
),
|
|
88
|
-
n && s && /* @__PURE__ */ e.jsx(l, { component: "rounded-avatar", width: 36, height: 36 })
|
|
89
|
-
]
|
|
94
|
+
isSent: o,
|
|
95
|
+
showAvatar: a,
|
|
96
|
+
showTimestamp: c,
|
|
97
|
+
senderName: l,
|
|
98
|
+
maxWidth: I,
|
|
99
|
+
sx: w,
|
|
100
|
+
...b
|
|
90
101
|
}
|
|
91
102
|
) : /* @__PURE__ */ e.jsxs(
|
|
92
|
-
|
|
103
|
+
s,
|
|
93
104
|
{
|
|
94
105
|
display: "flex",
|
|
95
|
-
flexDirection:
|
|
106
|
+
flexDirection: o ? "row-reverse" : "row",
|
|
96
107
|
alignItems: "flex-start",
|
|
97
108
|
gap: 1,
|
|
98
109
|
mb: 1,
|
|
99
110
|
sx: {
|
|
100
|
-
maxWidth:
|
|
101
|
-
alignSelf:
|
|
102
|
-
...
|
|
111
|
+
maxWidth: I,
|
|
112
|
+
alignSelf: o ? "flex-end" : "flex-start",
|
|
113
|
+
...w
|
|
103
114
|
},
|
|
104
|
-
...
|
|
115
|
+
...b,
|
|
105
116
|
children: [
|
|
106
|
-
|
|
117
|
+
a && !o && /* @__PURE__ */ e.jsx(F, { avatar: p, name: l, size: 36 }),
|
|
107
118
|
/* @__PURE__ */ e.jsxs(
|
|
108
|
-
|
|
119
|
+
s,
|
|
109
120
|
{
|
|
110
121
|
display: "flex",
|
|
111
122
|
flexDirection: "column",
|
|
112
|
-
alignItems:
|
|
123
|
+
alignItems: o ? "flex-end" : "flex-start",
|
|
113
124
|
gap: 0.5,
|
|
114
125
|
sx: { minWidth: 0 },
|
|
115
126
|
children: [
|
|
116
|
-
|
|
127
|
+
l && !o && /* @__PURE__ */ e.jsx(n, { children: l }),
|
|
117
128
|
/* @__PURE__ */ e.jsxs(
|
|
118
|
-
|
|
129
|
+
s,
|
|
119
130
|
{
|
|
120
131
|
sx: {
|
|
121
132
|
display: "inline-block",
|
|
@@ -123,29 +134,29 @@ const G = h(/* @__PURE__ */ e.jsx("path", {
|
|
|
123
134
|
wordBreak: "break-word",
|
|
124
135
|
maxWidth: "100%",
|
|
125
136
|
border: "1px solid",
|
|
126
|
-
borderColor:
|
|
127
|
-
...
|
|
137
|
+
borderColor: m ? "error.main" : "divider",
|
|
138
|
+
...m && {
|
|
128
139
|
opacity: 0.7
|
|
129
140
|
},
|
|
130
141
|
overflow: "hidden"
|
|
131
142
|
},
|
|
132
143
|
children: [
|
|
133
|
-
|
|
134
|
-
|
|
144
|
+
j.length > 0 && /* @__PURE__ */ e.jsx(
|
|
145
|
+
s,
|
|
135
146
|
{
|
|
136
147
|
sx: {
|
|
137
148
|
display: "grid",
|
|
138
|
-
gridTemplateColumns:
|
|
149
|
+
gridTemplateColumns: j.length === 1 ? "1fr" : "repeat(2, 1fr)",
|
|
139
150
|
gap: 0.5,
|
|
140
151
|
p: 0.5
|
|
141
152
|
},
|
|
142
153
|
minWidth: 200,
|
|
143
|
-
children:
|
|
144
|
-
|
|
154
|
+
children: j.map((i) => /* @__PURE__ */ e.jsx(
|
|
155
|
+
s,
|
|
145
156
|
{
|
|
146
157
|
sx: {
|
|
147
158
|
position: "relative",
|
|
148
|
-
paddingTop:
|
|
159
|
+
paddingTop: j.length === 1 ? "66.67%" : "100%",
|
|
149
160
|
cursor: "pointer",
|
|
150
161
|
borderRadius: 1.5,
|
|
151
162
|
overflow: "hidden",
|
|
@@ -157,8 +168,8 @@ const G = h(/* @__PURE__ */ e.jsx("path", {
|
|
|
157
168
|
children: /* @__PURE__ */ e.jsx(
|
|
158
169
|
U,
|
|
159
170
|
{
|
|
160
|
-
src: i.thumbnailUrl
|
|
161
|
-
alt: i.name
|
|
171
|
+
src: i.thumbnailUrl ?? i.url,
|
|
172
|
+
alt: i.name ?? "Image",
|
|
162
173
|
width: "100%",
|
|
163
174
|
height: "100%",
|
|
164
175
|
style: {
|
|
@@ -174,7 +185,7 @@ const G = h(/* @__PURE__ */ e.jsx("path", {
|
|
|
174
185
|
))
|
|
175
186
|
}
|
|
176
187
|
),
|
|
177
|
-
|
|
188
|
+
C.length > 0 && /* @__PURE__ */ e.jsx(s, { sx: { p: 1.5 }, children: C.map((i, T) => /* @__PURE__ */ e.jsxs(
|
|
178
189
|
V,
|
|
179
190
|
{
|
|
180
191
|
variant: "outlined",
|
|
@@ -189,9 +200,9 @@ const G = h(/* @__PURE__ */ e.jsx("path", {
|
|
|
189
200
|
onClick: () => R(i),
|
|
190
201
|
children: [
|
|
191
202
|
/* @__PURE__ */ e.jsx(J, { sx: { fontSize: 32 } }),
|
|
192
|
-
/* @__PURE__ */ e.jsxs(
|
|
203
|
+
/* @__PURE__ */ e.jsxs(s, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
193
204
|
/* @__PURE__ */ e.jsx(
|
|
194
|
-
|
|
205
|
+
n,
|
|
195
206
|
{
|
|
196
207
|
variant: "body2",
|
|
197
208
|
sx: {
|
|
@@ -201,16 +212,16 @@ const G = h(/* @__PURE__ */ e.jsx("path", {
|
|
|
201
212
|
textOverflow: "ellipsis",
|
|
202
213
|
whiteSpace: "nowrap"
|
|
203
214
|
},
|
|
204
|
-
children: i.name
|
|
215
|
+
children: i.name ?? "Unnamed File"
|
|
205
216
|
}
|
|
206
217
|
),
|
|
207
|
-
i.size && /* @__PURE__ */ e.jsx(
|
|
218
|
+
i.size && /* @__PURE__ */ e.jsx(n, { variant: "caption", children: H(i.size) })
|
|
208
219
|
] }),
|
|
209
|
-
|
|
210
|
-
|
|
220
|
+
h && /* @__PURE__ */ e.jsx(
|
|
221
|
+
M,
|
|
211
222
|
{
|
|
212
223
|
onClick: (B) => {
|
|
213
|
-
B.stopPropagation(),
|
|
224
|
+
B.stopPropagation(), h(i);
|
|
214
225
|
},
|
|
215
226
|
children: /* @__PURE__ */ e.jsx(E, {})
|
|
216
227
|
}
|
|
@@ -219,43 +230,43 @@ const G = h(/* @__PURE__ */ e.jsx("path", {
|
|
|
219
230
|
},
|
|
220
231
|
i.id
|
|
221
232
|
)) }),
|
|
222
|
-
|
|
223
|
-
|
|
233
|
+
r && /* @__PURE__ */ e.jsx(s, { sx: { px: 2, py: 1.5, pt: u.length > 0 ? 0 : 1.5 }, children: /* @__PURE__ */ e.jsx(
|
|
234
|
+
n,
|
|
224
235
|
{
|
|
225
236
|
variant: "body2",
|
|
226
237
|
sx: {
|
|
227
238
|
fontSize: "0.875rem",
|
|
228
239
|
whiteSpace: "pre-wrap",
|
|
229
|
-
color:
|
|
240
|
+
color: m ? "error.main" : "inherit"
|
|
230
241
|
},
|
|
231
|
-
children:
|
|
242
|
+
children: r
|
|
232
243
|
}
|
|
233
244
|
) })
|
|
234
245
|
]
|
|
235
246
|
}
|
|
236
247
|
),
|
|
237
|
-
|
|
238
|
-
|
|
248
|
+
c && x && /* @__PURE__ */ e.jsx(n, { variant: "caption", children: q(x) }),
|
|
249
|
+
m && /* @__PURE__ */ e.jsxs(s, { display: "flex", alignItems: "center", gap: 0.5, color: "error.main", children: [
|
|
239
250
|
/* @__PURE__ */ e.jsx(G, { sx: { fontSize: "1rem" } }),
|
|
240
|
-
/* @__PURE__ */ e.jsx(
|
|
241
|
-
|
|
251
|
+
/* @__PURE__ */ e.jsx(n, { color: "inherit", children: W }),
|
|
252
|
+
y && /* @__PURE__ */ e.jsx(M, { onClick: y, children: /* @__PURE__ */ e.jsx(K, {}) })
|
|
242
253
|
] })
|
|
243
254
|
]
|
|
244
255
|
}
|
|
245
256
|
),
|
|
246
|
-
|
|
247
|
-
|
|
257
|
+
a && o && /* @__PURE__ */ e.jsx(F, { avatar: p, name: l, size: 36 }),
|
|
258
|
+
g && /* @__PURE__ */ e.jsx(
|
|
248
259
|
P,
|
|
249
260
|
{
|
|
250
261
|
isOpen: O,
|
|
251
262
|
onClose: () => {
|
|
252
|
-
|
|
263
|
+
S(!1), z(null);
|
|
253
264
|
},
|
|
254
265
|
selectedItem: {
|
|
255
|
-
id:
|
|
266
|
+
id: g.id,
|
|
256
267
|
type: "image",
|
|
257
|
-
url:
|
|
258
|
-
title:
|
|
268
|
+
url: g.url,
|
|
269
|
+
title: g.name
|
|
259
270
|
},
|
|
260
271
|
showNavigation: !1,
|
|
261
272
|
showThumbnailDock: !1
|
|
@@ -265,8 +276,8 @@ const G = h(/* @__PURE__ */ e.jsx("path", {
|
|
|
265
276
|
}
|
|
266
277
|
);
|
|
267
278
|
};
|
|
268
|
-
|
|
279
|
+
X.displayName = "SChatMessage";
|
|
269
280
|
export {
|
|
270
|
-
|
|
271
|
-
|
|
281
|
+
X as SChatMessage,
|
|
282
|
+
X as default
|
|
272
283
|
};
|
package/dist/s-chips/s-chips.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
import { j as s } from "../jsx-runtime-tc70JA_2.js";
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { Box as
|
|
2
|
+
import { useRef as g, useState as m, useCallback as C, useEffect as E } from "react";
|
|
3
|
+
import { Box as a, Chip as c, Tooltip as R } from "@mui/material";
|
|
4
4
|
const v = ({
|
|
5
|
-
chips:
|
|
6
|
-
overflow:
|
|
5
|
+
chips: n,
|
|
6
|
+
overflow: o = !0,
|
|
7
7
|
onClick: h,
|
|
8
|
-
overflowText:
|
|
8
|
+
overflowText: p = "keywords"
|
|
9
9
|
}) => {
|
|
10
|
-
const u =
|
|
10
|
+
const u = g(null), [b, w] = m([]), [y, W] = m([]), [x, j] = m(0), r = C((t) => {
|
|
11
11
|
const e = document.createElement("span");
|
|
12
|
-
e.style.visibility = "hidden", e.style.position = "absolute", e.style.whiteSpace = "nowrap", e.textContent =
|
|
13
|
-
const
|
|
14
|
-
return document.body.removeChild(e),
|
|
15
|
-
}, []),
|
|
16
|
-
const
|
|
17
|
-
let e = 0,
|
|
18
|
-
for (
|
|
19
|
-
const f =
|
|
20
|
-
if (e + f <=
|
|
21
|
-
e += f,
|
|
12
|
+
e.style.visibility = "hidden", e.style.position = "absolute", e.style.whiteSpace = "nowrap", e.textContent = t.trim(), document.body.appendChild(e);
|
|
13
|
+
const i = e.offsetWidth;
|
|
14
|
+
return document.body.removeChild(e), i + 16;
|
|
15
|
+
}, []), l = C(() => {
|
|
16
|
+
const t = u.current?.offsetWidth ?? 0;
|
|
17
|
+
let e = 0, i = 0;
|
|
18
|
+
for (const d of n) {
|
|
19
|
+
const f = r(d);
|
|
20
|
+
if (e + f <= t)
|
|
21
|
+
e += f, i++;
|
|
22
22
|
else
|
|
23
23
|
break;
|
|
24
24
|
}
|
|
25
|
-
if (
|
|
26
|
-
const
|
|
27
|
-
for (; e +
|
|
28
|
-
|
|
25
|
+
if (i < n.length) {
|
|
26
|
+
const d = r(`+${n.length - i} ${p}`);
|
|
27
|
+
for (; e + d > t && i > 0; )
|
|
28
|
+
i--, e -= r(n[i]);
|
|
29
29
|
}
|
|
30
|
-
w(
|
|
31
|
-
}, [
|
|
30
|
+
w(n.slice(0, i)), W(n.slice(i)), j(n.length - i);
|
|
31
|
+
}, [n, p, r]), S = o ? { textOverflow: "ellipsis", whiteSpace: "nowrap", overflow: "hidden" } : {};
|
|
32
32
|
return E(() => {
|
|
33
|
-
if (
|
|
34
|
-
return
|
|
35
|
-
window.removeEventListener("resize",
|
|
33
|
+
if (o)
|
|
34
|
+
return l(), window.addEventListener("resize", l), () => {
|
|
35
|
+
window.removeEventListener("resize", l);
|
|
36
36
|
};
|
|
37
|
-
}, [
|
|
38
|
-
(
|
|
39
|
-
|
|
37
|
+
}, [n, o, l]), /* @__PURE__ */ s.jsxs(a, { ref: u, display: "flex", maxWidth: "100%", flexWrap: o ? "nowrap" : "wrap", ...S, children: [
|
|
38
|
+
(o ? b : n).map((t) => /* @__PURE__ */ s.jsx(
|
|
39
|
+
a,
|
|
40
40
|
{
|
|
41
41
|
component: "span",
|
|
42
42
|
textTransform: "lowercase",
|
|
43
43
|
onClick: () => {
|
|
44
|
-
h?.(
|
|
44
|
+
h?.(t);
|
|
45
45
|
},
|
|
46
46
|
children: /* @__PURE__ */ s.jsx(
|
|
47
47
|
c,
|
|
48
48
|
{
|
|
49
|
-
label:
|
|
49
|
+
label: t.trim(),
|
|
50
50
|
sx: {
|
|
51
51
|
mr: 1,
|
|
52
52
|
mb: 1,
|
|
@@ -56,9 +56,9 @@ const v = ({
|
|
|
56
56
|
}
|
|
57
57
|
)
|
|
58
58
|
},
|
|
59
|
-
|
|
59
|
+
t
|
|
60
60
|
)),
|
|
61
|
-
|
|
61
|
+
o && x > 0 && /* @__PURE__ */ s.jsx(
|
|
62
62
|
R,
|
|
63
63
|
{
|
|
64
64
|
slotProps: {
|
|
@@ -66,11 +66,11 @@ const v = ({
|
|
|
66
66
|
},
|
|
67
67
|
arrow: !0,
|
|
68
68
|
placement: "top",
|
|
69
|
-
title: /* @__PURE__ */ s.jsx(
|
|
70
|
-
children: /* @__PURE__ */ s.jsx(
|
|
69
|
+
title: /* @__PURE__ */ s.jsx(a, { display: "flex", gap: 1, maxWidth: "240px", flexWrap: "wrap", children: y.map((t) => /* @__PURE__ */ s.jsx(c, { label: t.trim() }, t)) }),
|
|
70
|
+
children: /* @__PURE__ */ s.jsx(a, { component: "span", textTransform: "lowercase", children: /* @__PURE__ */ s.jsx(
|
|
71
71
|
c,
|
|
72
72
|
{
|
|
73
|
-
label: `+${x} ${
|
|
73
|
+
label: `+${x} ${p}`,
|
|
74
74
|
variant: "outlined",
|
|
75
75
|
color: "info",
|
|
76
76
|
sx: { mr: 1, mb: 1, userSelect: "none", cursor: "pointer" }
|
|
@@ -2,7 +2,7 @@ import { j as o } from "../jsx-runtime-tc70JA_2.js";
|
|
|
2
2
|
import { useState as g } from "react";
|
|
3
3
|
import { useColorScheme as p, Box as k, IconButton as u } from "@mui/material";
|
|
4
4
|
import { Prism as b } from "react-syntax-highlighter";
|
|
5
|
-
import { C as m, a as f } from "../ContentCopy-
|
|
5
|
+
import { C as m, a as f } from "../ContentCopy-D4SuJd86.js";
|
|
6
6
|
const w = {
|
|
7
7
|
'code[class*="language-"]': {
|
|
8
8
|
background: "hsl(220, 13%, 18%)",
|
|
@@ -3,10 +3,10 @@ import { useId as N, useState as v, useEffect as R } from "react";
|
|
|
3
3
|
import { Box as i, Stack as n, Typography as a, IconButton as O, Button as k, Collapse as Q } from "@mui/material";
|
|
4
4
|
import { SAvatar as U } from "../s-avatar/s-avatar.js";
|
|
5
5
|
import { SSkeleton as e } from "../s-skeleton/s-skeleton.js";
|
|
6
|
-
import { g as X } from "../utils-
|
|
7
|
-
import { F as Y } from "../Favorite-
|
|
8
|
-
import { c as I } from "../createSvgIcon-
|
|
9
|
-
import { E as Z } from "../ExpandMore-
|
|
6
|
+
import { g as X } from "../utils-CHdpkEZx.js";
|
|
7
|
+
import { F as Y } from "../Favorite-Bz_HcMgN.js";
|
|
8
|
+
import { c as I } from "../createSvgIcon-BkbeLOhM.js";
|
|
9
|
+
import { E as Z } from "../ExpandMore-C7yRQv1-.js";
|
|
10
10
|
const _ = I(/* @__PURE__ */ t.jsx("path", {
|
|
11
11
|
d: "m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"
|
|
12
12
|
}), "ExpandLess"), tt = I(/* @__PURE__ */ t.jsx("path", {
|
|
@@ -112,7 +112,7 @@ const _ = I(/* @__PURE__ */ t.jsx("path", {
|
|
|
112
112
|
showReplies: d,
|
|
113
113
|
avatarSize: Math.max(32, r - 8)
|
|
114
114
|
},
|
|
115
|
-
s.id
|
|
115
|
+
s.id ?? `reply-${K}`
|
|
116
116
|
)) }) })
|
|
117
117
|
] });
|
|
118
118
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as o } from "../jsx-runtime-tc70JA_2.js";
|
|
2
2
|
import { useState as l } from "react";
|
|
3
3
|
import { Paper as p, Box as d, IconButton as x, Typography as m } from "@mui/material";
|
|
4
|
-
import { C as u, a as h } from "../ContentCopy-
|
|
4
|
+
import { C as u, a as h } from "../ContentCopy-D4SuJd86.js";
|
|
5
5
|
const f = ({ text: r, typographyProps: e, onCopied: a, paperProps: i }) => {
|
|
6
6
|
const [t, s] = l(!1), n = async () => {
|
|
7
7
|
if (r)
|