@solostylist/ui-kit 1.0.197 → 1.0.200

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.
Files changed (196) hide show
  1. package/dist/{ArrowUpward-JWPHrR6I.js → ArrowUpward-D8eqD-si.js} +1 -1
  2. package/dist/{Box-p3bpOtdn.js → Box-BkXoTbe8.js} +3 -3
  3. package/dist/{ButtonBase-PbSTzuUP.js → ButtonBase-D73M0QY5.js} +7 -7
  4. package/dist/{ChevronLeft-BJjuFNNQ.js → ChevronLeft-BmgmPHp9.js} +1 -1
  5. package/dist/{ChevronRight-5ZX3FodP.js → ChevronRight-DbWSr8yz.js} +1 -1
  6. package/dist/{Close-C-pCw-CD.js → Close-lHCUMitI.js} +1 -1
  7. package/dist/{ContentCopy-CNxsEhmq.js → ContentCopy-D4SuJd86.js} +1 -1
  8. package/dist/{DefaultPropsProvider-2MEHB2yv.js → DefaultPropsProvider-DPuuPIbS.js} +2 -2
  9. package/dist/{Download-D97XSAig.js → Download-BoRQUwCf.js} +1 -1
  10. package/dist/{ExpandMore-CTZrSZlF.js → ExpandMore-C7yRQv1-.js} +1 -1
  11. package/dist/{Favorite-Cvjg7GqN.js → Favorite-Bz_HcMgN.js} +1 -1
  12. package/dist/{Menu-_ZW9WiF2.js → Menu-GVFDMHCN.js} +137 -131
  13. package/dist/{MenuItem-DTapLhin.js → MenuItem-2wG8I2HO.js} +5 -5
  14. package/dist/{Paper-5nSdRRBA.js → Paper-CR019bki.js} +6 -6
  15. package/dist/{Select-J5gDqfEk.js → Select-80JhW337.js} +7 -7
  16. package/dist/{Stack-BlwLEm6H.js → Stack-Dfjnuorw.js} +5 -5
  17. package/dist/{Typography-Cum5_Ehu.js → Typography-PcmlIqm1.js} +4 -4
  18. package/dist/assets/s-overlay-scrollbar.css +1 -1
  19. package/dist/{createSvgIcon-DTNHY3_v.js → createSvgIcon-BkbeLOhM.js} +3 -3
  20. package/dist/{createTheme-CIXJrNxb.js → createTheme-DgoJyWM-.js} +874 -871
  21. package/dist/defaultTheme-CulFxfLR.js +5 -0
  22. package/dist/entries/core.d.ts +2 -2
  23. package/dist/entries/core.js +28 -30
  24. package/dist/{extendSxProp-CyoueGTe.js → extendSxProp-BJEIxcAx.js} +1 -1
  25. package/dist/{index-8LcCMmwl.js → index-DtGYsHSv.js} +4 -4
  26. package/dist/main.js +92 -94
  27. package/dist/s-accordion/s-accordion.js +89 -89
  28. package/dist/s-action-overlay/s-action-overlay.js +7 -7
  29. package/dist/s-ai-tool-bar/s-ai-tool-bar.d.ts +44 -0
  30. package/dist/s-ai-tool-bar/s-ai-tool-bar.js +241 -272
  31. package/dist/s-avatar/s-avatar.js +2 -2
  32. package/dist/s-blur-text/s-blur-text.js +25 -24
  33. package/dist/s-breadcrumbs/s-breadcrumbs.js +1 -1
  34. package/dist/s-carousel/s-carousel.d.ts +4 -4
  35. package/dist/s-carousel/s-carousel.js +4 -4
  36. package/dist/s-chat-input/s-chat-input.js +4 -4
  37. package/dist/s-chat-message/s-chat-message.js +135 -124
  38. package/dist/s-chips/s-chips.js +35 -35
  39. package/dist/s-code-block/s-code-block.js +1 -1
  40. package/dist/s-comment-message/s-comment-message.js +5 -5
  41. package/dist/s-copyable-text/s-copyable-text.js +1 -1
  42. package/dist/s-countdown/s-count-box.js +40 -37
  43. package/dist/s-countdown/s-count-down.d.ts +15 -10
  44. package/dist/s-countdown/s-count-down.js +79 -124
  45. package/dist/s-data-table/s-data-table.js +75 -76
  46. package/dist/s-date-picker/s-date-picker.js +43 -47
  47. package/dist/s-datetime-picker/s-datetime-picker.js +782 -782
  48. package/dist/s-dialog/s-dialog.js +1 -1
  49. package/dist/s-dialog-confirm/index.d.ts +1 -1
  50. package/dist/s-dialog-confirm/s-dialog-confirm.d.ts +1 -1
  51. package/dist/s-dialog-confirm/s-dialog-confirm.js +2 -2
  52. package/dist/s-dialog-message/index.d.ts +1 -1
  53. package/dist/s-dialog-message/s-dialog-message.d.ts +1 -1
  54. package/dist/s-dialog-message/s-dialog-message.js +2 -2
  55. package/dist/s-empty/s-empty.js +1 -1
  56. package/dist/s-file-dropzone/s-file-dropzone.js +16 -16
  57. package/dist/s-file-icon/s-file-icon.js +15 -15
  58. package/dist/s-flex-box/s-flex-box.js +1 -1
  59. package/dist/s-gallery/s-gallery.js +1 -1
  60. package/dist/s-gradient-icon/s-gradient-icon.js +5 -5
  61. package/dist/s-image-comparison/s-image-comparison.js +3 -3
  62. package/dist/s-image-modal/s-image-modal.js +7 -7
  63. package/dist/s-label/s-label.d.ts +1 -1
  64. package/dist/s-label/s-label.js +1 -1
  65. package/dist/s-language-switcher/s-language-switcher.js +8 -8
  66. package/dist/s-localization-provider/s-localization-provider.js +1 -1
  67. package/dist/s-moving-border/s-moving-border.d.ts +5 -5
  68. package/dist/s-multi-select/s-multi-select.js +3 -3
  69. package/dist/s-overlay-scrollbar/s-overlay-scrollbar.js +6 -6
  70. package/dist/s-pixel-reveal/s-pixel-reveal.js +76 -71
  71. package/dist/s-radial-pulse-animate/s-radial-pulse-animate.js +2 -2
  72. package/dist/s-review/s-review.d.ts +3 -2
  73. package/dist/s-review/s-review.js +19 -19
  74. package/dist/s-scroll-to-top/s-scroll-to-top.js +5 -5
  75. package/dist/s-scroll-velocity/scroll-velocity-container.d.ts +1 -1
  76. package/dist/s-scroll-velocity/scroll-velocity-row.d.ts +3 -3
  77. package/dist/s-scroll-velocity/scroll-velocity-row.js +2 -2
  78. package/dist/s-select/s-select.js +54 -67
  79. package/dist/s-select-list/s-select-list.js +1 -1
  80. package/dist/s-snackbar-message/s-snackbar-message.js +18 -18
  81. package/dist/s-stripe/s-stripe-cvc.d.ts +1 -1
  82. package/dist/s-stripe/s-stripe-expiry.d.ts +1 -1
  83. package/dist/s-stripe/s-stripe-number.d.ts +1 -1
  84. package/dist/s-stripe/stripe-input.d.ts +1 -1
  85. package/dist/s-text-editor/s-text-editor-toolbar.js +64 -60
  86. package/dist/s-text-editor/s-text-editor.js +1 -1
  87. package/dist/s-text-field/s-text-field.js +1 -1
  88. package/dist/s-text-shimmer/s-text-shimmer.js +3 -3
  89. package/dist/s-theme-demo/s-theme-demo.js +2 -2
  90. package/dist/s-theme-provider/s-theme-provider.d.ts +1 -1
  91. package/dist/s-theme-switch/s-theme-switch.js +1 -1
  92. package/dist/s-tip/s-tip.js +3 -3
  93. package/dist/{styled-BR6UL29H.js → styled-8Y5KoVix.js} +2 -2
  94. package/dist/theme/components/avatar.js +1 -1
  95. package/dist/theme/components/button.d.ts +2 -2
  96. package/dist/theme/components/button.js +1 -1
  97. package/dist/theme/components/chip.d.ts +2 -2
  98. package/dist/theme/components/chip.js +1 -1
  99. package/dist/theme/components/icon-button.d.ts +2 -2
  100. package/dist/theme/components/popover.js +2 -2
  101. package/dist/theme/components/skeleton.js +1 -1
  102. package/dist/theme/components/tooltip.js +5 -5
  103. package/dist/theme/customizations/data-display.js +12 -12
  104. package/dist/theme/customizations/feedback.js +2 -2
  105. package/dist/theme/customizations/inputs.js +12 -12
  106. package/dist/theme/customizations/navigation.js +28 -28
  107. package/dist/theme/customizations/surfaces.js +11 -11
  108. package/dist/theme/theme-primitives.js +1 -1
  109. package/dist/{useMobilePicker-C0pYjskU.js → useMobilePicker-DVnEuXv1.js} +3936 -3653
  110. package/dist/{useTheme-DSvhq4Np.js → useTheme-CWPkv7g3.js} +1 -1
  111. package/dist/{useThemeProps-C-oV4Fbz.js → useThemeProps-XYgXGzjS.js} +1 -1
  112. package/dist/utils/index.d.ts +0 -1
  113. package/dist/utils/index.js +7 -9
  114. package/dist/utils/logger.d.ts +1 -1
  115. package/dist/utils-D1UMIV0b.js +40 -0
  116. package/dist/{warning-BZ61Y8gI.js → warning-Ba-7BBAN.js} +3 -3
  117. package/package.json +67 -62
  118. package/dist/defaultTheme-DLue8Fr1.js +0 -5
  119. package/dist/s-accordion/package.json +0 -5
  120. package/dist/s-action-overlay/package.json +0 -5
  121. package/dist/s-ai-tool-bar/package.json +0 -5
  122. package/dist/s-autocomplete/package.json +0 -5
  123. package/dist/s-avatar/package.json +0 -5
  124. package/dist/s-blur-text/package.json +0 -5
  125. package/dist/s-breadcrumbs/package.json +0 -5
  126. package/dist/s-button/package.json +0 -5
  127. package/dist/s-button-link/package.json +0 -5
  128. package/dist/s-carousel/package.json +0 -5
  129. package/dist/s-category-card/package.json +0 -5
  130. package/dist/s-chat-input/package.json +0 -5
  131. package/dist/s-chat-message/package.json +0 -5
  132. package/dist/s-checkbox/package.json +0 -5
  133. package/dist/s-chip/package.json +0 -5
  134. package/dist/s-chips/package.json +0 -5
  135. package/dist/s-code-block/package.json +0 -5
  136. package/dist/s-comment-message/package.json +0 -5
  137. package/dist/s-copyable-text/package.json +0 -5
  138. package/dist/s-countdown/package.json +0 -5
  139. package/dist/s-data-table/package.json +0 -5
  140. package/dist/s-date-picker/package.json +0 -5
  141. package/dist/s-datetime-picker/package.json +0 -5
  142. package/dist/s-dialog/package.json +0 -5
  143. package/dist/s-dialog-confirm/package.json +0 -5
  144. package/dist/s-dialog-message/package.json +0 -5
  145. package/dist/s-empty/package.json +0 -5
  146. package/dist/s-error/package.json +0 -5
  147. package/dist/s-error-layout/package.json +0 -5
  148. package/dist/s-file-dropzone/package.json +0 -5
  149. package/dist/s-file-icon/package.json +0 -5
  150. package/dist/s-flex-box/package.json +0 -5
  151. package/dist/s-form/package.json +0 -5
  152. package/dist/s-gallery/package.json +0 -5
  153. package/dist/s-glow-button/package.json +0 -5
  154. package/dist/s-gradient-icon/package.json +0 -5
  155. package/dist/s-i18n-provider/package.json +0 -5
  156. package/dist/s-icon-button/package.json +0 -5
  157. package/dist/s-image-comparison/package.json +0 -5
  158. package/dist/s-image-modal/package.json +0 -5
  159. package/dist/s-item-not-found/package.json +0 -5
  160. package/dist/s-label/package.json +0 -5
  161. package/dist/s-language-switcher/package.json +0 -5
  162. package/dist/s-lazy-image/package.json +0 -5
  163. package/dist/s-localization-provider/package.json +0 -5
  164. package/dist/s-moving-border/package.json +0 -5
  165. package/dist/s-multi-select/package.json +0 -5
  166. package/dist/s-no-ssr/package.json +0 -5
  167. package/dist/s-overlay-scrollbar/package.json +0 -5
  168. package/dist/s-pagination/package.json +0 -5
  169. package/dist/s-pixel-reveal/package.json +0 -5
  170. package/dist/s-radial-pulse-animate/package.json +0 -5
  171. package/dist/s-rating/package.json +0 -5
  172. package/dist/s-review/package.json +0 -5
  173. package/dist/s-scroll-reveal/package.json +0 -6
  174. package/dist/s-scroll-to-top/package.json +0 -5
  175. package/dist/s-scroll-velocity/package.json +0 -5
  176. package/dist/s-select/package.json +0 -5
  177. package/dist/s-select-list/package.json +0 -5
  178. package/dist/s-skeleton/package.json +0 -5
  179. package/dist/s-snackbar-message/package.json +0 -5
  180. package/dist/s-spotlight-cursor/package.json +0 -5
  181. package/dist/s-stripe/package.json +0 -5
  182. package/dist/s-tabs/package.json +0 -4
  183. package/dist/s-text-editor/package.json +0 -5
  184. package/dist/s-text-field/package.json +0 -5
  185. package/dist/s-text-shimmer/package.json +0 -5
  186. package/dist/s-text-truncation/package.json +0 -5
  187. package/dist/s-theme-demo/package.json +0 -5
  188. package/dist/s-theme-provider/package.json +0 -5
  189. package/dist/s-theme-switch/package.json +0 -5
  190. package/dist/s-tip/package.json +0 -5
  191. package/dist/s-two-pane-layout/package.json +0 -5
  192. package/dist/s-typewriter-text/package.json +0 -6
  193. package/dist/s-zoom-image/package.json +0 -5
  194. package/dist/utils/bytes-to-size.d.ts +0 -1
  195. package/dist/utils/bytes-to-size.js +0 -9
  196. 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 || "Avatar",
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] || "A" }),
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,5 +1,5 @@
1
- import { j as y } from "../jsx-runtime-tc70JA_2.js";
2
- import { useState as K, useRef as R, useEffect as V, useMemo as b } from "react";
1
+ import { j as m } from "../jsx-runtime-tc70JA_2.js";
2
+ import { useState as K, useRef as R, useEffect as V, useMemo as y } from "react";
3
3
  import { Typography as B } from "@mui/material";
4
4
  import { motion as D } from "framer-motion";
5
5
  const F = (s, a) => {
@@ -14,30 +14,30 @@ const F = (s, a) => {
14
14
  direction: o = "top",
15
15
  threshold: t = 0.1,
16
16
  rootMargin: l = "0px",
17
- animationFrom: d,
18
- animationTo: h,
19
- easing: w = (n) => n,
20
- onAnimationComplete: x,
21
- stepDuration: j = 0.35,
22
- variant: S = "body1",
23
- sx: g,
24
- ...v
17
+ animationFrom: b,
18
+ animationTo: d,
19
+ easing: h = (n) => n,
20
+ onAnimationComplete: w,
21
+ stepDuration: x = 0.35,
22
+ variant: j = "body1",
23
+ sx: S,
24
+ ...g
25
25
  }) => {
26
- const n = i === "words" ? s.split(" ") : s.split(""), [T, k] = K(!1), c = R(null);
26
+ const n = i === "words" ? s.split(" ") : s.split(""), [v, T] = K(!1), c = R(null);
27
27
  V(() => {
28
28
  if (!c.current) return;
29
29
  const r = new IntersectionObserver(
30
30
  ([e]) => {
31
- e.isIntersecting && (k(!0), r.unobserve(c.current));
31
+ e.isIntersecting && (T(!0), r.unobserve(c.current));
32
32
  },
33
33
  { threshold: t, rootMargin: l }
34
34
  );
35
35
  return r.observe(c.current), () => r.disconnect();
36
36
  }, [t, l]);
37
- const C = b(
37
+ const k = y(
38
38
  () => o === "top" ? { filter: "blur(10px)", opacity: 0, y: -50 } : { filter: "blur(10px)", opacity: 0, y: 50 },
39
39
  [o]
40
- ), E = b(
40
+ ), C = y(
41
41
  () => [
42
42
  {
43
43
  filter: "blur(5px)",
@@ -47,20 +47,21 @@ const F = (s, a) => {
47
47
  { filter: "blur(0px)", opacity: 1, y: 0 }
48
48
  ],
49
49
  [o]
50
- ), u = d ?? C, f = h ?? E, p = f.length + 1, I = j * (p - 1), O = Array.from({ length: p }, (r, e) => p === 1 ? 0 : e / (p - 1));
51
- return /* @__PURE__ */ y.jsx(B, { ref: c, variant: S, sx: g, ...v, children: n.map((r, e) => {
52
- const A = F(u, f), m = {
53
- duration: I,
54
- times: O,
55
- delay: e * a / 1e3
50
+ ), u = b ?? k, f = d ?? C, p = f.length + 1, E = x * (p - 1), I = Array.from({ length: p }, (r, e) => p === 1 ? 0 : e / (p - 1));
51
+ return /* @__PURE__ */ m.jsx(B, { ref: c, variant: j, sx: S, ...g, children: n.map((r, e) => {
52
+ const O = F(u, f), A = {
53
+ duration: E,
54
+ times: I,
55
+ delay: e * a / 1e3,
56
+ ease: h
56
57
  };
57
- return m.ease = w, /* @__PURE__ */ y.jsxs(
58
+ return /* @__PURE__ */ m.jsxs(
58
59
  D.span,
59
60
  {
60
61
  initial: u,
61
- animate: T ? A : u,
62
- transition: m,
63
- onAnimationComplete: e === n.length - 1 ? x : void 0,
62
+ animate: v ? O : u,
63
+ transition: A,
64
+ onAnimationComplete: e === n.length - 1 ? w : void 0,
64
65
  style: {
65
66
  display: "inline-block",
66
67
  willChange: "transform, filter, opacity"
@@ -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-5ZX3FodP.js";
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-DTNHY3_v.js";
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 || i).palette.primary.main,
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 || i).palette.primary.main },
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 || (c.vars || c).palette.divider
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-C-pCw-CD.js";
9
- import { c as R } from "../createSvgIcon-DTNHY3_v.js";
10
- import { A as X } from "../ArrowUpward-JWPHrR6I.js";
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 || []).filter((t) => !(j && t.size > j));
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 C } from "react";
3
- import { Box as r, Typography as t, Paper as V, IconButton as k } from "@mui/material";
4
- import { SAvatar as M } from "../s-avatar/s-avatar.js";
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 l } from "../s-skeleton/s-skeleton.js";
8
- import { c as h } from "../createSvgIcon-DTNHY3_v.js";
9
- import { f as H, a as q } from "../utils-DJIrqgo5.js";
10
- import { D as E } from "../Download-D97XSAig.js";
11
- const G = h(/* @__PURE__ */ e.jsx("path", {
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-D1UMIV0b.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 = h(/* @__PURE__ */ e.jsx("path", {
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 = h(/* @__PURE__ */ e.jsx("path", {
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
- message: m,
19
- variant: F = "received",
20
- timestamp: g,
21
- avatar: j,
22
- senderName: o,
23
- showAvatar: n = !0,
24
- showTimestamp: u = !1,
25
- maxWidth: v = "70%",
26
- attachments: f = [],
27
- onAttachmentClick: a,
28
- onDownload: d,
29
- hasError: x = !1,
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: I,
81
+ onRetry: y,
32
82
  loading: D = !1,
33
- sx: y,
34
- ...S
83
+ sx: w,
84
+ ...b
35
85
  }) => {
36
- const [p, w] = C(null), [O, b] = C(!1), s = F === "sent", L = (i) => {
37
- a ? a(i) : (w(i), b(!0));
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
- a ? a(i) : d && d(i);
40
- }, c = f.filter((i) => i.type === "image"), z = f.filter((i) => i.type === "file");
41
- return D ? /* @__PURE__ */ e.jsxs(
42
- r,
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
- display: "flex",
45
- flexDirection: s ? "row-reverse" : "row",
46
- alignItems: "flex-start",
47
- gap: 1,
48
- mb: 1,
49
- sx: {
50
- maxWidth: v,
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
- r,
103
+ s,
93
104
  {
94
105
  display: "flex",
95
- flexDirection: s ? "row-reverse" : "row",
106
+ flexDirection: o ? "row-reverse" : "row",
96
107
  alignItems: "flex-start",
97
108
  gap: 1,
98
109
  mb: 1,
99
110
  sx: {
100
- maxWidth: v,
101
- alignSelf: s ? "flex-end" : "flex-start",
102
- ...y
111
+ maxWidth: I,
112
+ alignSelf: o ? "flex-end" : "flex-start",
113
+ ...w
103
114
  },
104
- ...S,
115
+ ...b,
105
116
  children: [
106
- n && !s && /* @__PURE__ */ e.jsx(M, { avatar: j, name: o, size: 36 }),
117
+ a && !o && /* @__PURE__ */ e.jsx(F, { avatar: p, name: l, size: 36 }),
107
118
  /* @__PURE__ */ e.jsxs(
108
- r,
119
+ s,
109
120
  {
110
121
  display: "flex",
111
122
  flexDirection: "column",
112
- alignItems: s ? "flex-end" : "flex-start",
123
+ alignItems: o ? "flex-end" : "flex-start",
113
124
  gap: 0.5,
114
125
  sx: { minWidth: 0 },
115
126
  children: [
116
- o && !s && /* @__PURE__ */ e.jsx(t, { children: o }),
127
+ l && !o && /* @__PURE__ */ e.jsx(n, { children: l }),
117
128
  /* @__PURE__ */ e.jsxs(
118
- r,
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: x ? "error.main" : "divider",
127
- ...x && {
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
- c.length > 0 && /* @__PURE__ */ e.jsx(
134
- r,
144
+ j.length > 0 && /* @__PURE__ */ e.jsx(
145
+ s,
135
146
  {
136
147
  sx: {
137
148
  display: "grid",
138
- gridTemplateColumns: c.length === 1 ? "1fr" : "repeat(2, 1fr)",
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: c.map((i) => /* @__PURE__ */ e.jsx(
144
- r,
154
+ children: j.map((i) => /* @__PURE__ */ e.jsx(
155
+ s,
145
156
  {
146
157
  sx: {
147
158
  position: "relative",
148
- paddingTop: c.length === 1 ? "66.67%" : "100%",
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 || i.url,
161
- alt: i.name || "Image",
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
- z.length > 0 && /* @__PURE__ */ e.jsx(r, { sx: { p: 1.5 }, children: z.map((i, T) => /* @__PURE__ */ e.jsxs(
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(r, { sx: { flex: 1, minWidth: 0 }, children: [
203
+ /* @__PURE__ */ e.jsxs(s, { sx: { flex: 1, minWidth: 0 }, children: [
193
204
  /* @__PURE__ */ e.jsx(
194
- t,
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 || "Unnamed File"
215
+ children: i.name ?? "Unnamed File"
205
216
  }
206
217
  ),
207
- i.size && /* @__PURE__ */ e.jsx(t, { variant: "caption", children: H(i.size) })
218
+ i.size && /* @__PURE__ */ e.jsx(n, { variant: "caption", children: H(i.size) })
208
219
  ] }),
209
- d && /* @__PURE__ */ e.jsx(
210
- k,
220
+ h && /* @__PURE__ */ e.jsx(
221
+ M,
211
222
  {
212
223
  onClick: (B) => {
213
- B.stopPropagation(), d(i);
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
- m && /* @__PURE__ */ e.jsx(r, { sx: { px: 2, py: 1.5, pt: f.length > 0 ? 0 : 1.5 }, children: /* @__PURE__ */ e.jsx(
223
- t,
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: x ? "error.main" : "inherit"
240
+ color: m ? "error.main" : "inherit"
230
241
  },
231
- children: m
242
+ children: r
232
243
  }
233
244
  ) })
234
245
  ]
235
246
  }
236
247
  ),
237
- u && g && /* @__PURE__ */ e.jsx(t, { variant: "caption", children: q(g) }),
238
- x && /* @__PURE__ */ e.jsxs(r, { display: "flex", alignItems: "center", gap: 0.5, color: "error.main", children: [
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(t, { color: "inherit", children: W }),
241
- I && /* @__PURE__ */ e.jsx(k, { onClick: I, children: /* @__PURE__ */ e.jsx(K, {}) })
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
- n && s && /* @__PURE__ */ e.jsx(M, { avatar: j, name: o, size: 36 }),
247
- p && /* @__PURE__ */ e.jsx(
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
- b(!1), w(null);
263
+ S(!1), z(null);
253
264
  },
254
265
  selectedItem: {
255
- id: p.id,
266
+ id: g.id,
256
267
  type: "image",
257
- url: p.url,
258
- title: p.name
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
- Q.displayName = "SChatMessage";
279
+ X.displayName = "SChatMessage";
269
280
  export {
270
- Q as SChatMessage,
271
- Q as default
281
+ X as SChatMessage,
282
+ X as default
272
283
  };