@solostylist/ui-kit 1.0.188 → 1.0.190

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 (109) hide show
  1. package/dist/s-accordion/package.json +5 -5
  2. package/dist/s-action-overlay/package.json +5 -5
  3. package/dist/s-action-overlay/s-action-overlay.js +0 -1
  4. package/dist/s-ai-tool-bar/package.json +5 -5
  5. package/dist/s-ai-tool-bar/s-ai-tool-bar.js +67 -71
  6. package/dist/s-autocomplete/package.json +5 -5
  7. package/dist/s-avatar/package.json +5 -5
  8. package/dist/s-blur-text/package.json +5 -5
  9. package/dist/s-breadcrumbs/package.json +5 -5
  10. package/dist/s-button/package.json +5 -5
  11. package/dist/s-button/s-button.d.ts +1 -2
  12. package/dist/s-button-link/package.json +5 -5
  13. package/dist/s-carousel/package.json +5 -5
  14. package/dist/s-category-card/package.json +5 -5
  15. package/dist/s-chat-input/package.json +5 -5
  16. package/dist/s-chat-input/s-chat-input.js +132 -129
  17. package/dist/s-chat-message/package.json +5 -5
  18. package/dist/s-chat-message/s-chat-message.js +28 -29
  19. package/dist/s-checkbox/package.json +5 -5
  20. package/dist/s-chip/package.json +5 -5
  21. package/dist/s-chip/s-chip.d.ts +1 -2
  22. package/dist/s-chips/package.json +5 -5
  23. package/dist/s-chips/s-chips.js +42 -41
  24. package/dist/s-code-block/package.json +5 -5
  25. package/dist/s-code-block/s-code-block.js +1 -2
  26. package/dist/s-comment-message/package.json +5 -5
  27. package/dist/s-comment-message/s-comment-message.js +67 -69
  28. package/dist/s-copyable-text/package.json +5 -5
  29. package/dist/s-countdown/package.json +5 -5
  30. package/dist/s-data-table/package.json +5 -5
  31. package/dist/s-data-table/s-data-table.js +157 -157
  32. package/dist/s-date-picker/package.json +5 -5
  33. package/dist/s-datetime-picker/package.json +5 -5
  34. package/dist/s-dialog/package.json +5 -5
  35. package/dist/s-dialog-confirm/package.json +5 -5
  36. package/dist/s-dialog-confirm/s-dialog-confirm.js +2 -2
  37. package/dist/s-dialog-message/package.json +5 -5
  38. package/dist/s-dialog-message/s-dialog-message.js +3 -3
  39. package/dist/s-empty/package.json +5 -5
  40. package/dist/s-error/package.json +5 -5
  41. package/dist/s-error-layout/package.json +5 -5
  42. package/dist/s-file-dropzone/package.json +5 -5
  43. package/dist/s-file-dropzone/s-file-dropzone.d.ts +1 -5
  44. package/dist/s-file-dropzone/s-file-dropzone.js +17 -19
  45. package/dist/s-file-icon/package.json +5 -5
  46. package/dist/s-flex-box/package.json +5 -5
  47. package/dist/s-flex-box/s-flex-box.d.ts +1 -2
  48. package/dist/s-form/package.json +5 -5
  49. package/dist/s-gallery/package.json +5 -5
  50. package/dist/s-gallery/s-gallery.js +86 -85
  51. package/dist/s-glow-button/package.json +5 -5
  52. package/dist/s-gradient-icon/package.json +5 -5
  53. package/dist/s-gradient-icon/s-gradient-icon.d.ts +1 -1
  54. package/dist/s-gradient-icon/s-gradient-icon.js +23 -24
  55. package/dist/s-i18n-provider/package.json +5 -5
  56. package/dist/s-icon-button/package.json +5 -5
  57. package/dist/s-image-comparison/package.json +5 -5
  58. package/dist/s-image-comparison/s-image-comparison.js +50 -44
  59. package/dist/s-image-modal/package.json +5 -5
  60. package/dist/s-image-modal/s-image-modal.js +128 -128
  61. package/dist/s-item-not-found/package.json +5 -5
  62. package/dist/s-label/package.json +5 -5
  63. package/dist/s-language-switcher/package.json +5 -5
  64. package/dist/s-language-switcher/s-language-switcher.js +98 -96
  65. package/dist/s-lazy-image/package.json +5 -5
  66. package/dist/s-localization-provider/package.json +5 -5
  67. package/dist/s-moving-border/package.json +5 -5
  68. package/dist/s-moving-border/s-moving-border.js +73 -73
  69. package/dist/s-multi-select/package.json +5 -5
  70. package/dist/s-multi-select/s-multi-select.js +38 -38
  71. package/dist/s-no-ssr/package.json +5 -5
  72. package/dist/s-overlay-scrollbar/package.json +5 -5
  73. package/dist/s-pagination/package.json +5 -5
  74. package/dist/s-pixel-reveal/package.json +5 -5
  75. package/dist/s-pixel-reveal/s-pixel-reveal.js +35 -33
  76. package/dist/s-radial-pulse-animate/package.json +5 -5
  77. package/dist/s-rating/package.json +5 -5
  78. package/dist/s-rating/s-rating.d.ts +1 -2
  79. package/dist/s-review/package.json +5 -5
  80. package/dist/s-review/s-review.js +75 -77
  81. package/dist/s-scroll-reveal/package.json +6 -6
  82. package/dist/s-scroll-to-top/package.json +5 -5
  83. package/dist/s-scroll-velocity/package.json +5 -5
  84. package/dist/s-select/package.json +5 -5
  85. package/dist/s-select/s-select.d.ts +1 -1
  86. package/dist/s-select/s-select.js +19 -21
  87. package/dist/s-select-list/package.json +5 -5
  88. package/dist/s-select-list/s-select-list.d.ts +2 -2
  89. package/dist/s-skeleton/package.json +5 -5
  90. package/dist/s-snackbar-message/package.json +5 -5
  91. package/dist/s-snackbar-message/s-snackbar-message.js +1 -1
  92. package/dist/s-spotlight-cursor/package.json +5 -5
  93. package/dist/s-stripe/package.json +5 -5
  94. package/dist/s-tabs/package.json +4 -4
  95. package/dist/s-tabs/s-tab.d.ts +1 -2
  96. package/dist/s-text-editor/package.json +5 -5
  97. package/dist/s-text-editor/s-text-editor-toolbar.js +55 -57
  98. package/dist/s-text-editor/s-text-editor.js +9 -9
  99. package/dist/s-text-field/package.json +5 -5
  100. package/dist/s-text-shimmer/package.json +5 -5
  101. package/dist/s-text-truncation/package.json +5 -5
  102. package/dist/s-theme-demo/package.json +5 -5
  103. package/dist/s-theme-provider/package.json +5 -5
  104. package/dist/s-theme-switch/package.json +5 -5
  105. package/dist/s-tip/package.json +5 -5
  106. package/dist/s-two-pane-layout/package.json +5 -5
  107. package/dist/s-typewriter-text/package.json +6 -6
  108. package/dist/s-zoom-image/package.json +5 -5
  109. package/package.json +8 -7
@@ -1,39 +1,39 @@
1
1
  import { j as t } from "../jsx-runtime-tc70JA_2.js";
2
- import * as s from "react";
3
- import { c as x } from "../createSvgIcon-DTNHY3_v.js";
4
- import { Stack as j, OutlinedInput as M } from "@mui/material";
5
- import { usePopover as S } from "../hooks/use-popover.js";
6
- import { M as C } from "../Menu-_ZW9WiF2.js";
7
- import { M as R } from "../MenuItem-DTapLhin.js";
8
- import { SChips as b } from "../s-chips/s-chips.js";
9
- const v = x(/* @__PURE__ */ t.jsx("path", {
2
+ import * as o from "react";
3
+ import { c as j } from "../createSvgIcon-DTNHY3_v.js";
4
+ import { Stack as M, OutlinedInput as C } from "@mui/material";
5
+ import { usePopover as b } from "../hooks/use-popover.js";
6
+ import { M as v } from "../Menu-_ZW9WiF2.js";
7
+ import { M as I } from "../MenuItem-DTapLhin.js";
8
+ import { SChips as k } from "../s-chips/s-chips.js";
9
+ const E = j(/* @__PURE__ */ t.jsx("path", {
10
10
  d: "M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"
11
- }), "UnfoldMore"), I = ({
11
+ }), "UnfoldMore"), L = ({
12
12
  label: p,
13
- onChange: a,
14
- options: i,
15
- value: r = [],
13
+ onChange: i,
14
+ options: a,
15
+ value: l = [],
16
16
  chipProps: d
17
17
  }) => {
18
- const o = S(), c = s.useRef(null), [u, f] = s.useState();
19
- s.useEffect(() => {
20
- c.current && f(c.current.offsetWidth);
21
- }, [o.open]);
22
- const m = s.useCallback(
18
+ const s = b(), c = o.useRef(null), [u, m] = o.useState(), [f, h] = o.useState(null);
19
+ o.useEffect(() => {
20
+ c.current && m(c.current.offsetWidth);
21
+ }, [s.open]);
22
+ const x = o.useCallback(
23
23
  (e, n) => {
24
- let l = [...r];
25
- n ? l.push(e) : l = l.filter((h) => h !== e), a?.(l);
24
+ let r = [...l];
25
+ n ? r.push(e) : r = r.filter((S) => S !== e), i?.(r);
26
26
  },
27
- [a, r]
27
+ [i, l]
28
28
  );
29
- return /* @__PURE__ */ t.jsxs(j, { direction: "column", gap: 1, children: [
29
+ return /* @__PURE__ */ t.jsxs(M, { direction: "column", gap: 1, children: [
30
30
  /* @__PURE__ */ t.jsx(
31
- M,
31
+ C,
32
32
  {
33
- endAdornment: /* @__PURE__ */ t.jsx(v, { fontSize: "small", sx: { color: "action.active", position: "absolute", right: "7px" } }),
34
- onClick: o.handleOpen,
33
+ endAdornment: /* @__PURE__ */ t.jsx(E, { fontSize: "small", sx: { color: "action.active", position: "absolute", right: "7px" } }),
34
+ onClick: s.handleOpen,
35
35
  ref: (e) => {
36
- o.anchorRef.current = e, c.current = e;
36
+ h(e), c.current = e;
37
37
  },
38
38
  value: p,
39
39
  sx: {
@@ -44,19 +44,19 @@ const v = x(/* @__PURE__ */ t.jsx("path", {
44
44
  }
45
45
  ),
46
46
  /* @__PURE__ */ t.jsx(
47
- C,
47
+ v,
48
48
  {
49
- anchorEl: o.anchorRef.current,
50
- onClose: o.handleClose,
51
- open: o.open,
49
+ anchorEl: f,
50
+ onClose: s.handleClose,
51
+ open: s.open,
52
52
  slotProps: { paper: { sx: { width: u ? `${u}px` : void 0 } } },
53
- children: i.map((e) => {
54
- const n = r.includes(e.value);
53
+ children: a.map((e) => {
54
+ const n = l.includes(e.value);
55
55
  return /* @__PURE__ */ t.jsx(
56
- R,
56
+ I,
57
57
  {
58
58
  onClick: () => {
59
- m(e.value, !n);
59
+ x(e.value, !n);
60
60
  },
61
61
  selected: n,
62
62
  children: e.label
@@ -67,16 +67,16 @@ const v = x(/* @__PURE__ */ t.jsx("path", {
67
67
  }
68
68
  ),
69
69
  /* @__PURE__ */ t.jsx(
70
- b,
70
+ k,
71
71
  {
72
- chips: i.filter((e) => r.includes(e.value)).map((e) => e.label),
72
+ chips: a.filter((e) => l.includes(e.value)).map((e) => e.label),
73
73
  ...d
74
74
  }
75
75
  )
76
76
  ] });
77
77
  };
78
- I.displayName = "SMultiSelect";
78
+ L.displayName = "SMultiSelect";
79
79
  export {
80
- I as SMultiSelect,
81
- I as default
80
+ L as SMultiSelect,
81
+ L as default
82
82
  };
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,6 +1,6 @@
1
- import { j } from "../jsx-runtime-tc70JA_2.js";
2
- import { forwardRef as L, useRef as h, useCallback as F, useEffect as Q } from "react";
3
- import { brand as A } from "../theme/theme-primitives.js";
1
+ import { j as A } from "../jsx-runtime-tc70JA_2.js";
2
+ import { forwardRef as Q, useRef as h, useEffect as N, useCallback as q } from "react";
3
+ import { brand as E } from "../theme/theme-primitives.js";
4
4
  class U {
5
5
  x;
6
6
  y;
@@ -26,55 +26,57 @@ class U {
26
26
  c.fillRect(this.x + o, this.y + o, this.size, this.size);
27
27
  }
28
28
  }
29
- const Z = L(
29
+ const Z = Q(
30
30
  ({
31
31
  gap: s = 5,
32
32
  speed: c = 100,
33
- colors: l = [A[400], A[500], A[600]],
33
+ colors: l = [E[400], E[500], E[600]],
34
34
  loading: o = !0,
35
35
  src: z,
36
36
  alt: y = "",
37
37
  style: M,
38
38
  children: b,
39
- instant: q = !0,
40
- ...N
39
+ instant: k = !0,
40
+ ...$
41
41
  }, S) => {
42
- const g = h(null), w = h(null), $ = h(null), p = h(/* @__PURE__ */ new Map()), a = h(null), E = h(1e3 / 60), k = h(performance.now()), I = h(
43
- typeof window < "u" ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : !1
44
- ), O = F((e, n, u, r) => {
42
+ const g = h(null), w = h(null), D = h(null), p = h(/* @__PURE__ */ new Map()), a = h(null), I = h(1e3 / 60), C = h(0), P = h(!1);
43
+ N(() => {
44
+ P.current = typeof window < "u" ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : !1;
45
+ }, []);
46
+ const O = q((e, n, u, r) => {
45
47
  const t = e - u, i = n - r;
46
48
  return t * t + i * i;
47
- }, []), V = F(() => {
49
+ }, []), V = q(() => {
48
50
  const e = g.current, n = e?.getContext("2d");
49
51
  if (!e || !n) return;
50
52
  p.current = /* @__PURE__ */ new Map();
51
- const u = I.current ? 0 : Math.max(0, Math.min(100, c)) * 1e-3, r = window.devicePixelRatio || 1, t = e.width / r, i = e.height / r, x = 2, X = 0.5, D = (t + i) * 0.01, H = t % s / 2, T = i % s / 2;
52
- for (let f = H; f < t; f += s)
53
- for (let m = T; m < i; m += s) {
53
+ const u = P.current ? 0 : Math.max(0, Math.min(100, c)) * 1e-3, r = window.devicePixelRatio || 1, t = e.width / r, i = e.height / r, x = 2, X = 0.5, H = (t + i) * 0.01, T = t % s / 2, W = i % s / 2;
54
+ for (let f = T; f < t; f += s)
55
+ for (let m = W; m < i; m += s) {
54
56
  const d = l[Math.floor(Math.random() * l.length)];
55
57
  let v = 0;
56
- if (!q && !I.current) {
57
- const W = f + s / 2, G = m + s / 2, J = t / 2, K = i / 2;
58
- v = Math.sqrt(O(W, G, J, K));
58
+ if (!k && !P.current) {
59
+ const G = f + s / 2, J = m + s / 2, K = t / 2, L = i / 2;
60
+ v = Math.sqrt(O(G, J, K, L));
59
61
  }
60
- const P = Math.random() * 4 + D, R = Math.random() * (x - X) + X, B = new U(f, m, d, u, v, P, R);
62
+ const F = Math.random() * 4 + H, R = Math.random() * (x - X) + X, B = new U(f, m, d, u, v, F, R);
61
63
  p.current.has(d) || p.current.set(d, []), p.current.get(d).push(B);
62
64
  }
63
- a.current && cancelAnimationFrame(a.current);
65
+ a.current && cancelAnimationFrame(a.current), C.current = performance.now();
64
66
  const Y = () => {
65
67
  a.current = requestAnimationFrame(Y);
66
- const f = performance.now(), m = f - k.current;
67
- if (m < E.current) return;
68
- k.current = f - m % E.current, n.clearRect(0, 0, t, i);
68
+ const f = performance.now(), m = f - C.current;
69
+ if (m < I.current) return;
70
+ C.current = f - m % I.current, n.clearRect(0, 0, t, i);
69
71
  let d = !1;
70
- p.current.forEach((v, P) => {
71
- n.fillStyle = P;
72
+ p.current.forEach((v, F) => {
73
+ n.fillStyle = F;
72
74
  for (const R of v)
73
75
  R.update(o) && (R.draw(n, s), d = !0);
74
76
  }), !o && !d && a.current && (cancelAnimationFrame(a.current), a.current = null);
75
77
  };
76
78
  Y();
77
- }, [s, c, l, q, o, O]), C = F(() => {
79
+ }, [s, c, l, k, o, O]), j = q(() => {
78
80
  const e = g.current, n = w.current, u = e?.getContext("2d");
79
81
  if (!e || !n || !u) return;
80
82
  const r = n.getBoundingClientRect();
@@ -82,15 +84,15 @@ const Z = L(
82
84
  const t = Math.floor(r.width), i = Math.floor(r.height), x = window.devicePixelRatio || 1;
83
85
  e.width = t * x, e.height = i * x, e.style.width = `${t}px`, e.style.height = `${i}px`, u.setTransform(1, 0, 0, 1, 0, 0), u.scale(x, x), V();
84
86
  }, [V]);
85
- return Q(() => {
86
- C();
87
+ return N(() => {
88
+ j();
87
89
  const e = new ResizeObserver(() => {
88
- requestAnimationFrame(() => C());
90
+ requestAnimationFrame(() => j());
89
91
  });
90
92
  return w.current && e.observe(w.current), () => {
91
93
  e.disconnect(), a.current && cancelAnimationFrame(a.current);
92
94
  };
93
- }, [C]), /* @__PURE__ */ j.jsxs(
95
+ }, [j]), /* @__PURE__ */ A.jsxs(
94
96
  "div",
95
97
  {
96
98
  ref: (e) => {
@@ -103,12 +105,12 @@ const Z = L(
103
105
  overflow: "hidden",
104
106
  ...M
105
107
  },
106
- ...N,
108
+ ...$,
107
109
  children: [
108
- z && /* @__PURE__ */ j.jsx(
110
+ z && /* @__PURE__ */ A.jsx(
109
111
  "img",
110
112
  {
111
- ref: $,
113
+ ref: D,
112
114
  src: z,
113
115
  alt: y,
114
116
  style: {
@@ -122,7 +124,7 @@ const Z = L(
122
124
  }
123
125
  ),
124
126
  b,
125
- /* @__PURE__ */ j.jsx(
127
+ /* @__PURE__ */ A.jsx(
126
128
  "canvas",
127
129
  {
128
130
  ref: g,
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -3,8 +3,7 @@ import { RatingProps } from '@mui/material';
3
3
  /**
4
4
  * Props interface for SRating component
5
5
  */
6
- export interface SRatingProps extends RatingProps {
7
- }
6
+ export type SRatingProps = RatingProps;
8
7
  /**
9
8
  * A star rating component that allows users to provide feedback and ratings.
10
9
  */
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,69 +1,69 @@
1
1
  import { j as e } from "../jsx-runtime-tc70JA_2.js";
2
- import { useState as j, useEffect as G } from "react";
3
- import { Box as h, Stack as r, Divider as D, Typography as m, IconButton as R } from "@mui/material";
2
+ import { useId as K, useState as j, useEffect as P } from "react";
3
+ import { Box as c, Stack as a, Divider as H, Typography as h, IconButton as L } from "@mui/material";
4
4
  import { SSkeleton as i } from "../s-skeleton/s-skeleton.js";
5
- import { SAvatar as J } from "../s-avatar/s-avatar.js";
6
- import { SRating as K } from "../s-rating/s-rating.js";
7
- import P from "../s-lazy-image/s-lazy-image.js";
8
- import { c as H } from "../createSvgIcon-DTNHY3_v.js";
9
- import { SImageModal as Q } from "../s-image-modal/s-image-modal.js";
10
- const X = H(/* @__PURE__ */ e.jsx("path", {
5
+ import { SAvatar as Q } from "../s-avatar/s-avatar.js";
6
+ import { SRating as X } from "../s-rating/s-rating.js";
7
+ import Z from "../s-lazy-image/s-lazy-image.js";
8
+ import { c as z } from "../createSvgIcon-DTNHY3_v.js";
9
+ import { SImageModal as _ } from "../s-image-modal/s-image-modal.js";
10
+ const ee = z(/* @__PURE__ */ e.jsx("path", {
11
11
  d: "M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2m4 0v12h4V3z"
12
- }), "ThumbDown"), Z = H(/* @__PURE__ */ e.jsx("path", {
12
+ }), "ThumbDown"), te = z(/* @__PURE__ */ e.jsx("path", {
13
13
  d: "M1 21h4V9H1zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73z"
14
- }), "ThumbUp"), _ = (l) => {
15
- const x = /* @__PURE__ */ new Date(), v = typeof l == "string" ? new Date(l) : l, y = x.getTime() - v.getTime(), w = Math.floor(y / 1e3), c = Math.floor(w / 60), a = Math.floor(c / 60), o = Math.floor(a / 24), d = Math.floor(o / 7), f = Math.floor(o / 30), g = Math.floor(o / 365);
16
- return w < 60 ? "just now" : c < 60 ? c === 1 ? "1 minute ago" : `${c} minutes ago` : a < 24 ? a === 1 ? "1 hour ago" : `${a} hours ago` : o < 7 ? o === 1 ? "1 day ago" : `${o} days ago` : d < 4 ? d === 1 ? "1 week ago" : `${d} weeks ago` : f < 12 ? f === 1 ? "1 month ago" : `${f} months ago` : g === 1 ? "1 year ago" : `${g} years ago`;
17
- }, ee = ({
18
- id: l = Date.now(),
19
- userName: x,
14
+ }), "ThumbUp"), ne = (m) => {
15
+ const d = /* @__PURE__ */ new Date(), v = typeof m == "string" ? new Date(m) : m, I = d.getTime() - v.getTime(), w = Math.floor(I / 1e3), l = Math.floor(w / 60), r = Math.floor(l / 60), o = Math.floor(r / 24), x = Math.floor(o / 7), f = Math.floor(o / 30), g = Math.floor(o / 365);
16
+ return w < 60 ? "just now" : l < 60 ? l === 1 ? "1 minute ago" : `${l} minutes ago` : r < 24 ? r === 1 ? "1 hour ago" : `${r} hours ago` : o < 7 ? o === 1 ? "1 day ago" : `${o} days ago` : x < 4 ? x === 1 ? "1 week ago" : `${x} weeks ago` : f < 12 ? f === 1 ? "1 month ago" : `${f} months ago` : g === 1 ? "1 year ago" : `${g} years ago`;
17
+ }, se = ({
18
+ id: m,
19
+ userName: d,
20
20
  userAvatar: v,
21
- rating: y,
21
+ rating: I,
22
22
  reviewContent: w,
23
- datetime: c,
24
- images: a,
23
+ datetime: l,
24
+ images: r,
25
25
  userHelpfulVote: o = null,
26
- helpfulYes: d = 0,
26
+ helpfulYes: x = 0,
27
27
  helpfulNo: f = 0,
28
28
  onHelpfulVote: g,
29
- showHelpfulSection: L = !0,
30
- avatarSize: I = 48,
31
- maxRating: V = 5,
32
- readOnly: W = !0,
29
+ showHelpfulSection: V = !0,
30
+ avatarSize: y = 48,
31
+ maxRating: W = 5,
32
+ readOnly: E = !0,
33
33
  showDivider: C = !0,
34
- loading: E = !1,
34
+ loading: O = !1,
35
35
  sx: T = {}
36
36
  }) => {
37
- const [O, M] = j(d), [U, b] = j(f), [p, S] = j(o), [Y, $] = j(!1), [B, k] = j(null), z = (n) => {
37
+ const U = K(), $ = m ?? U, [Y, M] = j(x), [B, b] = j(f), [p, S] = j(o), [N, D] = j(!1), [A, k] = j(null), R = (n) => {
38
38
  let s = n;
39
- p === n ? (n === "yes" ? M((t) => Math.max(0, t - 1)) : b((t) => Math.max(0, t - 1)), S(null), s = null) : (p === "yes" ? M((t) => Math.max(0, t - 1)) : p === "no" && b((t) => Math.max(0, t - 1)), n === "yes" ? M((t) => t + 1) : b((t) => t + 1), S(n), s = n), g && g(l, s);
40
- }, u = a?.map((n, s) => ({
41
- id: `review-${l}-image-${s}`,
39
+ p === n ? (n === "yes" ? M((t) => Math.max(0, t - 1)) : b((t) => Math.max(0, t - 1)), S(null), s = null) : (p === "yes" ? M((t) => Math.max(0, t - 1)) : p === "no" && b((t) => Math.max(0, t - 1)), n === "yes" ? M((t) => t + 1) : b((t) => t + 1), S(n), s = n), g && g($, s);
40
+ }, u = r?.map((n, s) => ({
41
+ id: `review-${$}-image-${s}`,
42
42
  type: "image",
43
43
  url: n,
44
44
  title: `Review image ${s + 1}`,
45
- desc: `Image ${s + 1} from ${x}'s review`
46
- })) || [], N = (n) => {
45
+ desc: `Image ${s + 1} from ${d}'s review`
46
+ })) || [], F = (n) => {
47
47
  const s = u[n];
48
- s && (k(s), $(!0));
49
- }, A = () => {
50
- $(!1), k(null);
51
- }, F = (n) => {
48
+ s && (k(s), D(!0));
49
+ }, q = () => {
50
+ D(!1), k(null);
51
+ }, G = (n) => {
52
52
  k(n);
53
- }, q = _(c);
54
- return G(() => {
53
+ }, J = ne(l);
54
+ return P(() => {
55
55
  S(o);
56
- }, [o]), E ? /* @__PURE__ */ e.jsxs(h, { sx: { py: 2, ...T }, children: [
57
- /* @__PURE__ */ e.jsxs(r, { direction: "row", spacing: 2, alignItems: "flex-start", children: [
58
- /* @__PURE__ */ e.jsx(i, { component: "rounded-avatar", width: I, height: I }),
59
- /* @__PURE__ */ e.jsxs(h, { sx: { flex: 1 }, children: [
60
- /* @__PURE__ */ e.jsxs(r, { direction: "row", alignItems: "center", spacing: 2, mb: 1, children: [
56
+ }, [o]), O ? /* @__PURE__ */ e.jsxs(c, { sx: { py: 2, ...T }, children: [
57
+ /* @__PURE__ */ e.jsxs(a, { direction: "row", spacing: 2, alignItems: "flex-start", children: [
58
+ /* @__PURE__ */ e.jsx(i, { component: "rounded-avatar", width: y, height: y }),
59
+ /* @__PURE__ */ e.jsxs(c, { sx: { flex: 1 }, children: [
60
+ /* @__PURE__ */ e.jsxs(a, { direction: "row", alignItems: "center", spacing: 2, mb: 1, children: [
61
61
  /* @__PURE__ */ e.jsx(i, { variant: "text", width: 120, height: 20 }),
62
62
  /* @__PURE__ */ e.jsx(i, { variant: "text", width: 80, height: 16 })
63
63
  ] }),
64
- /* @__PURE__ */ e.jsx(h, { sx: { mb: 1 }, children: /* @__PURE__ */ e.jsx(i, { variant: "text", width: 100, height: 20 }) }),
64
+ /* @__PURE__ */ e.jsx(c, { sx: { mb: 1 }, children: /* @__PURE__ */ e.jsx(i, { variant: "text", width: 100, height: 20 }) }),
65
65
  /* @__PURE__ */ e.jsx(i, { variant: "text", width: "100%", height: 16, sx: { mb: 0.5 } }),
66
- /* @__PURE__ */ e.jsxs(r, { direction: "row", spacing: 1, sx: { display: "inline-flex", alignItems: "center" }, children: [
66
+ /* @__PURE__ */ e.jsxs(a, { direction: "row", spacing: 1, sx: { display: "inline-flex", alignItems: "center" }, children: [
67
67
  /* @__PURE__ */ e.jsx(i, { variant: "text", width: 140, height: 16, sx: { mr: 2 } }),
68
68
  /* @__PURE__ */ e.jsx(i, { component: "icon-button" }),
69
69
  /* @__PURE__ */ e.jsx(i, { variant: "text", width: 20, height: 16 }),
@@ -72,19 +72,19 @@ const X = H(/* @__PURE__ */ e.jsx("path", {
72
72
  ] })
73
73
  ] })
74
74
  ] }),
75
- C && /* @__PURE__ */ e.jsx(D, { sx: { mt: 2 } })
76
- ] }) : /* @__PURE__ */ e.jsxs(h, { sx: { py: 2, ...T }, children: [
77
- /* @__PURE__ */ e.jsxs(r, { direction: "row", spacing: 2, alignItems: "flex-start", children: [
78
- /* @__PURE__ */ e.jsx(J, { avatar: v, name: x, size: I }),
79
- /* @__PURE__ */ e.jsxs(h, { sx: { flex: 1 }, children: [
80
- /* @__PURE__ */ e.jsxs(r, { direction: "row", alignItems: "center", spacing: 2, mb: 1, children: [
81
- /* @__PURE__ */ e.jsx(m, { variant: "subtitle2", fontWeight: "600", children: x }),
82
- /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(m, { variant: "caption", children: q }) })
75
+ C && /* @__PURE__ */ e.jsx(H, { sx: { mt: 2 } })
76
+ ] }) : /* @__PURE__ */ e.jsxs(c, { sx: { py: 2, ...T }, children: [
77
+ /* @__PURE__ */ e.jsxs(a, { direction: "row", spacing: 2, alignItems: "flex-start", children: [
78
+ /* @__PURE__ */ e.jsx(Q, { avatar: v, name: d, size: y }),
79
+ /* @__PURE__ */ e.jsxs(c, { sx: { flex: 1 }, children: [
80
+ /* @__PURE__ */ e.jsxs(a, { direction: "row", alignItems: "center", spacing: 2, mb: 1, children: [
81
+ /* @__PURE__ */ e.jsx(h, { variant: "subtitle2", fontWeight: "600", children: d }),
82
+ /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(h, { variant: "caption", children: J }) })
83
83
  ] }),
84
- /* @__PURE__ */ e.jsx(h, { sx: { mb: 1 }, children: /* @__PURE__ */ e.jsx(K, { value: y, max: V, readOnly: W, size: "small" }) }),
85
- /* @__PURE__ */ e.jsx(m, { variant: "body2", sx: { mb: 2, lineHeight: 1.6 }, children: w }),
86
- a && a.length > 0 && /* @__PURE__ */ e.jsx(r, { direction: "row", spacing: 1, sx: { mb: 2, flexWrap: "wrap", gap: 1 }, children: a.map((n, s) => /* @__PURE__ */ e.jsx(
87
- P,
84
+ /* @__PURE__ */ e.jsx(c, { sx: { mb: 1 }, children: /* @__PURE__ */ e.jsx(X, { value: I, max: W, readOnly: E }) }),
85
+ /* @__PURE__ */ e.jsx(h, { variant: "body2", sx: { mb: 2, lineHeight: 1.6 }, children: w }),
86
+ r && r.length > 0 && /* @__PURE__ */ e.jsx(a, { direction: "row", spacing: 1, sx: { mb: 2, flexWrap: "wrap", gap: 1 }, children: r.map((n, s) => /* @__PURE__ */ e.jsx(
87
+ Z,
88
88
  {
89
89
  src: n,
90
90
  alt: `Review image ${s + 1}`,
@@ -95,7 +95,7 @@ const X = H(/* @__PURE__ */ e.jsx("path", {
95
95
  objectFit: "cover",
96
96
  cursor: "pointer"
97
97
  },
98
- onClick: () => N(s),
98
+ onClick: () => F(s),
99
99
  onMouseEnter: (t) => {
100
100
  t.currentTarget.style.opacity = "0.8";
101
101
  },
@@ -105,28 +105,26 @@ const X = H(/* @__PURE__ */ e.jsx("path", {
105
105
  },
106
106
  s
107
107
  )) }),
108
- L && /* @__PURE__ */ e.jsxs(r, { direction: "row", spacing: 1, sx: { display: "inline-flex", alignItems: "center" }, children: [
109
- /* @__PURE__ */ e.jsx(m, { variant: "caption", sx: { mr: 2 }, children: "Was this review helpful?" }),
108
+ V && /* @__PURE__ */ e.jsxs(a, { direction: "row", spacing: 1, sx: { display: "inline-flex", alignItems: "center" }, children: [
109
+ /* @__PURE__ */ e.jsx(h, { variant: "caption", sx: { mr: 2 }, children: "Was this review helpful?" }),
110
110
  /* @__PURE__ */ e.jsx(
111
- R,
111
+ L,
112
112
  {
113
- size: "small",
114
- onClick: () => z("yes"),
113
+ onClick: () => R("yes"),
115
114
  sx: {
116
115
  color: p === "yes" ? "primary.main" : "text.secondary",
117
116
  "&:hover": {
118
117
  backgroundColor: "action.hover"
119
118
  }
120
119
  },
121
- children: /* @__PURE__ */ e.jsx(Z, { fontSize: "small" })
120
+ children: /* @__PURE__ */ e.jsx(te, { fontSize: "small" })
122
121
  }
123
122
  ),
124
- /* @__PURE__ */ e.jsx(m, { variant: "caption", children: O }),
123
+ /* @__PURE__ */ e.jsx(h, { variant: "caption", children: Y }),
125
124
  /* @__PURE__ */ e.jsx(
126
- R,
125
+ L,
127
126
  {
128
- size: "small",
129
- onClick: () => z("no"),
127
+ onClick: () => R("no"),
130
128
  sx: {
131
129
  color: p === "no" ? "error.main" : "text.secondary",
132
130
  ml: 1,
@@ -134,21 +132,21 @@ const X = H(/* @__PURE__ */ e.jsx("path", {
134
132
  backgroundColor: "action.hover"
135
133
  }
136
134
  },
137
- children: /* @__PURE__ */ e.jsx(X, { fontSize: "small" })
135
+ children: /* @__PURE__ */ e.jsx(ee, { fontSize: "small" })
138
136
  }
139
137
  ),
140
- /* @__PURE__ */ e.jsx(m, { variant: "caption", children: U })
138
+ /* @__PURE__ */ e.jsx(h, { variant: "caption", children: B })
141
139
  ] })
142
140
  ] })
143
141
  ] }),
144
- C && /* @__PURE__ */ e.jsx(D, { sx: { mt: 2 } }),
142
+ C && /* @__PURE__ */ e.jsx(H, { sx: { mt: 2 } }),
145
143
  /* @__PURE__ */ e.jsx(
146
- Q,
144
+ _,
147
145
  {
148
- isOpen: Y,
149
- onClose: A,
150
- selectedItem: B,
151
- onItemChange: F,
146
+ isOpen: N,
147
+ onClose: q,
148
+ selectedItem: A,
149
+ onItemChange: G,
152
150
  mediaItems: u,
153
151
  showNavigation: u.length > 1,
154
152
  showThumbnailDock: u.length > 1,
@@ -157,8 +155,8 @@ const X = H(/* @__PURE__ */ e.jsx("path", {
157
155
  )
158
156
  ] });
159
157
  };
160
- ee.displayName = "SReview";
158
+ se.displayName = "SReview";
161
159
  export {
162
- ee as SReview,
163
- ee as default
160
+ se as SReview,
161
+ se as default
164
162
  };
@@ -1,6 +1,6 @@
1
- {
2
- "name": "@solostylist/ui-kit/s-scroll-reveal",
3
- "main": "./index.ts",
4
- "module": "./index.ts",
5
- "types": "./index.ts"
6
- }
1
+ {
2
+ "name": "@solostylist/ui-kit/s-scroll-reveal",
3
+ "main": "./index.ts",
4
+ "module": "./index.ts",
5
+ "types": "./index.ts"
6
+ }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.js",
3
- "types": "./index.d.ts",
4
- "sideEffects": false
5
- }
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -1,6 +1,6 @@
1
1
  import { SelectProps } from '@mui/material';
2
2
  /** Base type constraint for select options - can be primitives or objects */
3
- type BaseOption = string | number | Record<string, any>;
3
+ type BaseOption = string | number | Record<string, unknown>;
4
4
  /**
5
5
  * Props interface for SSelect component
6
6
  */