@solostylist/ui-kit 1.0.195 → 1.0.197

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.
@@ -1,7 +1,7 @@
1
1
  import { j as e } from "../jsx-runtime-tc70JA_2.js";
2
2
  import { hslToRgb as s, Button as u } from "@mui/material";
3
- import { blue as f } from "../theme/theme-primitives.js";
4
- import { SMovingBorder as x } from "../s-moving-border/s-moving-border.js";
3
+ import { SMovingBorder as f } from "../s-moving-border/s-moving-border.js";
4
+ import { blue as x } from "../theme/theme-primitives.js";
5
5
  const a = ({
6
6
  borderRadius: t = 12,
7
7
  children: l,
@@ -9,10 +9,10 @@ const a = ({
9
9
  width: o = "fit-content",
10
10
  height: r = "60px",
11
11
  glowSize: p = 60,
12
- glowColor: i = s(f[500]),
12
+ glowColor: i = s(x[500]),
13
13
  ...m
14
14
  }) => /* @__PURE__ */ e.jsx(
15
- x,
15
+ f,
16
16
  {
17
17
  width: o,
18
18
  height: r,
@@ -2,10 +2,10 @@ import { j as o } from "../jsx-runtime-tc70JA_2.js";
2
2
  import j, { useState as C, useEffect as k } from "react";
3
3
  import { Modal as L, Box as d, Paper as m, Typography as w, IconButton as y, Stack as A } from "@mui/material";
4
4
  import { motion as b, AnimatePresence as D } from "framer-motion";
5
- import { C as F } from "../Close-C-pCw-CD.js";
6
- import { C as N } from "../ChevronLeft-BJjuFNNQ.js";
7
- import { C as T } from "../ChevronRight-5ZX3FodP.js";
8
- import $ from "../s-lazy-image/s-lazy-image.js";
5
+ import F from "../s-lazy-image/s-lazy-image.js";
6
+ import { C as N } from "../Close-C-pCw-CD.js";
7
+ import { C as T } from "../ChevronLeft-BJjuFNNQ.js";
8
+ import { C as $ } from "../ChevronRight-5ZX3FodP.js";
9
9
  const z = ({ item: r, onClick: l, style: c = {}, objectFit: e = "contain", disableVideoControls: s = !1 }) => r.type === "video" ? /* @__PURE__ */ o.jsx(
10
10
  d,
11
11
  {
@@ -22,7 +22,7 @@ const z = ({ item: r, onClick: l, style: c = {}, objectFit: e = "contain", disab
22
22
  children: /* @__PURE__ */ o.jsx("source", { src: r.url, type: "video/mp4" })
23
23
  }
24
24
  ) : /* @__PURE__ */ o.jsx(
25
- $,
25
+ F,
26
26
  {
27
27
  src: r.url,
28
28
  alt: r.title || "",
@@ -200,7 +200,7 @@ const z = ({ item: r, onClick: l, style: c = {}, objectFit: e = "contain", disab
200
200
  right: { xs: 8, sm: 10, md: 12 },
201
201
  zIndex: (i) => i.zIndex.modal + 102
202
202
  },
203
- children: /* @__PURE__ */ o.jsx(F, {})
203
+ children: /* @__PURE__ */ o.jsx(N, {})
204
204
  }
205
205
  ),
206
206
  P && a && /* @__PURE__ */ o.jsxs(
@@ -242,7 +242,7 @@ const z = ({ item: r, onClick: l, style: c = {}, objectFit: e = "contain", disab
242
242
  opacity: 0.5
243
243
  }
244
244
  },
245
- children: /* @__PURE__ */ o.jsx(N, {})
245
+ children: /* @__PURE__ */ o.jsx(T, {})
246
246
  }
247
247
  ),
248
248
  /* @__PURE__ */ o.jsx(
@@ -263,7 +263,7 @@ const z = ({ item: r, onClick: l, style: c = {}, objectFit: e = "contain", disab
263
263
  opacity: 0.5
264
264
  }
265
265
  },
266
- children: /* @__PURE__ */ o.jsx(T, {})
266
+ children: /* @__PURE__ */ o.jsx($, {})
267
267
  }
268
268
  )
269
269
  ] })
@@ -1,14 +1,14 @@
1
- import { j as e } from "../jsx-runtime-tc70JA_2.js";
2
- import { c as s } from "../createSvgIcon-DTNHY3_v.js";
3
- import { Stack as o, Box as c, Tooltip as l } from "@mui/material";
4
- const a = s(/* @__PURE__ */ e.jsx("path", {
1
+ import { j as t } from "../jsx-runtime-tc70JA_2.js";
2
+ import { c as l } from "../createSvgIcon-DTNHY3_v.js";
3
+ import { Stack as o, Typography as n, Tooltip as i } from "@mui/material";
4
+ const a = l(/* @__PURE__ */ t.jsx("path", {
5
5
  d: "M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"
6
- }), "HelpOutlineOutlined"), m = ({ label: n, children: i, hint: t, sx: r }) => /* @__PURE__ */ e.jsxs(o, { width: "100%", sx: r, children: [
7
- /* @__PURE__ */ e.jsxs(o, { direction: "row", alignItems: "center", mb: 1, children: [
8
- /* @__PURE__ */ e.jsx(c, { sx: { fontSize: "0.875rem", fontWeight: 500, lineHeight: 1.57, color: "text.secondary" }, children: n }),
9
- t ? /* @__PURE__ */ e.jsx(l, { title: t, placement: "top", children: /* @__PURE__ */ e.jsx(a, { sx: { marginLeft: "4px", fontSize: 16, color: "text.secondary" } }) }) : null
6
+ }), "HelpOutlineOutlined"), m = ({ label: r, children: s, hint: e, sx: c }) => /* @__PURE__ */ t.jsxs(o, { width: "100%", sx: c, children: [
7
+ /* @__PURE__ */ t.jsxs(o, { direction: "row", alignItems: "center", mb: 1, children: [
8
+ /* @__PURE__ */ t.jsx(n, { variant: "subtitle2", color: "text.secondary", children: r }),
9
+ e ? /* @__PURE__ */ t.jsx(i, { title: e, placement: "top", children: /* @__PURE__ */ t.jsx(a, { sx: { marginLeft: "4px", fontSize: 16, color: "text.secondary" } }) }) : null
10
10
  ] }),
11
- i
11
+ s
12
12
  ] });
13
13
  m.displayName = "SLabel";
14
14
  export {
@@ -3,9 +3,9 @@ import * as o from "react";
3
3
  import { c as j } from "../createSvgIcon-DTNHY3_v.js";
4
4
  import { Stack as M, OutlinedInput as C } from "@mui/material";
5
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";
6
+ import { SChips as v } from "../s-chips/s-chips.js";
7
+ import { M as I } from "../Menu-_ZW9WiF2.js";
8
+ import { M as k } from "../MenuItem-DTapLhin.js";
9
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
11
  }), "UnfoldMore"), L = ({
@@ -44,7 +44,7 @@ const E = j(/* @__PURE__ */ t.jsx("path", {
44
44
  }
45
45
  ),
46
46
  /* @__PURE__ */ t.jsx(
47
- v,
47
+ I,
48
48
  {
49
49
  anchorEl: f,
50
50
  onClose: s.handleClose,
@@ -53,7 +53,7 @@ const E = j(/* @__PURE__ */ t.jsx("path", {
53
53
  children: a.map((e) => {
54
54
  const n = l.includes(e.value);
55
55
  return /* @__PURE__ */ t.jsx(
56
- I,
56
+ k,
57
57
  {
58
58
  onClick: () => {
59
59
  x(e.value, !n);
@@ -67,7 +67,7 @@ const E = j(/* @__PURE__ */ t.jsx("path", {
67
67
  }
68
68
  ),
69
69
  /* @__PURE__ */ t.jsx(
70
- k,
70
+ v,
71
71
  {
72
72
  chips: a.filter((e) => l.includes(e.value)).map((e) => e.label),
73
73
  ...d
@@ -1,93 +1,91 @@
1
1
  import { j as e } from "../jsx-runtime-tc70JA_2.js";
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
- import { SSkeleton as i } from "../s-skeleton/s-skeleton.js";
2
+ import { useId as K, useState as h, useEffect as P } from "react";
3
+ import { Box as o, Stack as a, Divider as M, Typography as r, IconButton as S } from "@mui/material";
5
4
  import { SAvatar as Q } from "../s-avatar/s-avatar.js";
6
- import { SRating as X } from "../s-rating/s-rating.js";
5
+ import { SImageModal as X } from "../s-image-modal/s-image-modal.js";
7
6
  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", {
7
+ import { SRating as _ } from "../s-rating/s-rating.js";
8
+ import { SSkeleton as n } from "../s-skeleton/s-skeleton.js";
9
+ import { c as T } from "../createSvgIcon-DTNHY3_v.js";
10
+ import { g as ee } from "../utils-DJIrqgo5.js";
11
+ const te = T(/* @__PURE__ */ e.jsx("path", {
11
12
  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"), te = z(/* @__PURE__ */ e.jsx("path", {
13
+ }), "ThumbDown"), se = T(/* @__PURE__ */ e.jsx("path", {
13
14
  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"), 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
- userAvatar: v,
21
- rating: I,
22
- reviewContent: w,
23
- datetime: l,
24
- images: r,
25
- userHelpfulVote: o = null,
26
- helpfulYes: x = 0,
27
- helpfulNo: f = 0,
28
- onHelpfulVote: g,
29
- showHelpfulSection: V = !0,
30
- avatarSize: y = 48,
31
- maxRating: W = 5,
32
- readOnly: E = !0,
33
- showDivider: C = !0,
34
- loading: O = !1,
35
- sx: T = {}
15
+ }), "ThumbUp"), ie = ({
16
+ id: k,
17
+ userName: m,
18
+ userAvatar: R,
19
+ rating: L,
20
+ reviewContent: $,
21
+ datetime: z,
22
+ images: x,
23
+ userHelpfulVote: d = null,
24
+ helpfulYes: H = 0,
25
+ helpfulNo: V = 0,
26
+ onHelpfulVote: v,
27
+ showHelpfulSection: D = !0,
28
+ avatarSize: p = 48,
29
+ maxRating: E = 5,
30
+ readOnly: O = !0,
31
+ showDivider: w = !0,
32
+ loading: U = !1,
33
+ sx: y = {}
36
34
  }) => {
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
- 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($, s);
40
- }, u = r?.map((n, s) => ({
41
- id: `review-${$}-image-${s}`,
35
+ const W = K(), I = k ?? W, [B, g] = h(H), [N, j] = h(V), [l, f] = h(d), [Y, b] = h(!1), [A, u] = h(null), C = (s) => {
36
+ let i = s;
37
+ l === s ? (s === "yes" ? g((t) => Math.max(0, t - 1)) : j((t) => Math.max(0, t - 1)), f(null), i = null) : (l === "yes" ? g((t) => Math.max(0, t - 1)) : l === "no" && j((t) => Math.max(0, t - 1)), s === "yes" ? g((t) => t + 1) : j((t) => t + 1), f(s), i = s), v && v(I, i);
38
+ }, c = x?.map((s, i) => ({
39
+ id: `review-${I}-image-${i}`,
42
40
  type: "image",
43
- url: n,
44
- title: `Review image ${s + 1}`,
45
- desc: `Image ${s + 1} from ${d}'s review`
46
- })) || [], F = (n) => {
47
- const s = u[n];
48
- s && (k(s), D(!0));
41
+ url: s,
42
+ title: `Review image ${i + 1}`,
43
+ desc: `Image ${i + 1} from ${m}'s review`
44
+ })) || [], F = (s) => {
45
+ const i = c[s];
46
+ i && (u(i), b(!0));
49
47
  }, q = () => {
50
- D(!1), k(null);
51
- }, G = (n) => {
52
- k(n);
53
- }, J = ne(l);
48
+ b(!1), u(null);
49
+ }, G = (s) => {
50
+ u(s);
51
+ }, J = ee(z);
54
52
  return P(() => {
55
- S(o);
56
- }, [o]), O ? /* @__PURE__ */ e.jsxs(c, { sx: { py: 2, ...T }, children: [
53
+ f(d);
54
+ }, [d]), U ? /* @__PURE__ */ e.jsxs(o, { sx: { py: 2, ...y }, children: [
57
55
  /* @__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: [
56
+ /* @__PURE__ */ e.jsx(n, { component: "rounded-avatar", width: p, height: p }),
57
+ /* @__PURE__ */ e.jsxs(o, { sx: { flex: 1 }, children: [
60
58
  /* @__PURE__ */ e.jsxs(a, { direction: "row", alignItems: "center", spacing: 2, mb: 1, children: [
61
- /* @__PURE__ */ e.jsx(i, { variant: "text", width: 120, height: 20 }),
62
- /* @__PURE__ */ e.jsx(i, { variant: "text", width: 80, height: 16 })
59
+ /* @__PURE__ */ e.jsx(n, { variant: "text", width: 120, height: 20 }),
60
+ /* @__PURE__ */ e.jsx(n, { variant: "text", width: 80, height: 16 })
63
61
  ] }),
64
- /* @__PURE__ */ e.jsx(c, { sx: { mb: 1 }, children: /* @__PURE__ */ e.jsx(i, { variant: "text", width: 100, height: 20 }) }),
65
- /* @__PURE__ */ e.jsx(i, { variant: "text", width: "100%", height: 16, sx: { mb: 0.5 } }),
62
+ /* @__PURE__ */ e.jsx(o, { sx: { mb: 1 }, children: /* @__PURE__ */ e.jsx(n, { variant: "text", width: 100, height: 20 }) }),
63
+ /* @__PURE__ */ e.jsx(n, { variant: "text", width: "100%", height: 16, sx: { mb: 0.5 } }),
66
64
  /* @__PURE__ */ e.jsxs(a, { direction: "row", spacing: 1, sx: { display: "inline-flex", alignItems: "center" }, children: [
67
- /* @__PURE__ */ e.jsx(i, { variant: "text", width: 140, height: 16, sx: { mr: 2 } }),
68
- /* @__PURE__ */ e.jsx(i, { component: "icon-button" }),
69
- /* @__PURE__ */ e.jsx(i, { variant: "text", width: 20, height: 16 }),
70
- /* @__PURE__ */ e.jsx(i, { component: "icon-button" }),
71
- /* @__PURE__ */ e.jsx(i, { variant: "text", width: 20, height: 16 })
65
+ /* @__PURE__ */ e.jsx(n, { variant: "text", width: 140, height: 16, sx: { mr: 2 } }),
66
+ /* @__PURE__ */ e.jsx(n, { component: "icon-button" }),
67
+ /* @__PURE__ */ e.jsx(n, { variant: "text", width: 20, height: 16 }),
68
+ /* @__PURE__ */ e.jsx(n, { component: "icon-button" }),
69
+ /* @__PURE__ */ e.jsx(n, { variant: "text", width: 20, height: 16 })
72
70
  ] })
73
71
  ] })
74
72
  ] }),
75
- C && /* @__PURE__ */ e.jsx(H, { sx: { mt: 2 } })
76
- ] }) : /* @__PURE__ */ e.jsxs(c, { sx: { py: 2, ...T }, children: [
73
+ w && /* @__PURE__ */ e.jsx(M, { sx: { mt: 2 } })
74
+ ] }) : /* @__PURE__ */ e.jsxs(o, { sx: { py: 2, ...y }, children: [
77
75
  /* @__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: [
76
+ /* @__PURE__ */ e.jsx(Q, { avatar: R, name: m, size: p }),
77
+ /* @__PURE__ */ e.jsxs(o, { sx: { flex: 1 }, children: [
80
78
  /* @__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 }) })
79
+ /* @__PURE__ */ e.jsx(r, { variant: "subtitle2", fontWeight: "600", children: m }),
80
+ /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(r, { variant: "caption", children: J }) })
83
81
  ] }),
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(
82
+ /* @__PURE__ */ e.jsx(o, { sx: { mb: 1 }, children: /* @__PURE__ */ e.jsx(_, { value: L, max: E, readOnly: O }) }),
83
+ /* @__PURE__ */ e.jsx(r, { variant: "body2", sx: { mb: 2, lineHeight: 1.6 }, children: $ }),
84
+ x && x.length > 0 && /* @__PURE__ */ e.jsx(a, { direction: "row", spacing: 1, sx: { mb: 2, flexWrap: "wrap", gap: 1 }, children: x.map((s, i) => /* @__PURE__ */ e.jsx(
87
85
  Z,
88
86
  {
89
- src: n,
90
- alt: `Review image ${s + 1}`,
87
+ src: s,
88
+ alt: `Review image ${i + 1}`,
91
89
  width: 80,
92
90
  height: 80,
93
91
  variant: "rounded",
@@ -95,7 +93,7 @@ const ee = z(/* @__PURE__ */ e.jsx("path", {
95
93
  objectFit: "cover",
96
94
  cursor: "pointer"
97
95
  },
98
- onClick: () => F(s),
96
+ onClick: () => F(i),
99
97
  onMouseEnter: (t) => {
100
98
  t.currentTarget.style.opacity = "0.8";
101
99
  },
@@ -103,60 +101,60 @@ const ee = z(/* @__PURE__ */ e.jsx("path", {
103
101
  t.currentTarget.style.opacity = "1";
104
102
  }
105
103
  },
106
- s
104
+ i
107
105
  )) }),
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?" }),
106
+ D && /* @__PURE__ */ e.jsxs(a, { direction: "row", spacing: 1, sx: { display: "inline-flex", alignItems: "center" }, children: [
107
+ /* @__PURE__ */ e.jsx(r, { variant: "caption", sx: { mr: 2 }, children: "Was this review helpful?" }),
110
108
  /* @__PURE__ */ e.jsx(
111
- L,
109
+ S,
112
110
  {
113
- onClick: () => R("yes"),
111
+ onClick: () => C("yes"),
114
112
  sx: {
115
- color: p === "yes" ? "primary.main" : "text.secondary",
113
+ color: l === "yes" ? "primary.main" : "text.secondary",
116
114
  "&:hover": {
117
115
  backgroundColor: "action.hover"
118
116
  }
119
117
  },
120
- children: /* @__PURE__ */ e.jsx(te, { fontSize: "small" })
118
+ children: /* @__PURE__ */ e.jsx(se, { fontSize: "small" })
121
119
  }
122
120
  ),
123
- /* @__PURE__ */ e.jsx(h, { variant: "caption", children: Y }),
121
+ /* @__PURE__ */ e.jsx(r, { variant: "caption", children: B }),
124
122
  /* @__PURE__ */ e.jsx(
125
- L,
123
+ S,
126
124
  {
127
- onClick: () => R("no"),
125
+ onClick: () => C("no"),
128
126
  sx: {
129
- color: p === "no" ? "error.main" : "text.secondary",
127
+ color: l === "no" ? "error.main" : "text.secondary",
130
128
  ml: 1,
131
129
  "&:hover": {
132
130
  backgroundColor: "action.hover"
133
131
  }
134
132
  },
135
- children: /* @__PURE__ */ e.jsx(ee, { fontSize: "small" })
133
+ children: /* @__PURE__ */ e.jsx(te, { fontSize: "small" })
136
134
  }
137
135
  ),
138
- /* @__PURE__ */ e.jsx(h, { variant: "caption", children: B })
136
+ /* @__PURE__ */ e.jsx(r, { variant: "caption", children: N })
139
137
  ] })
140
138
  ] })
141
139
  ] }),
142
- C && /* @__PURE__ */ e.jsx(H, { sx: { mt: 2 } }),
140
+ w && /* @__PURE__ */ e.jsx(M, { sx: { mt: 2 } }),
143
141
  /* @__PURE__ */ e.jsx(
144
- _,
142
+ X,
145
143
  {
146
- isOpen: N,
144
+ isOpen: Y,
147
145
  onClose: q,
148
146
  selectedItem: A,
149
147
  onItemChange: G,
150
- mediaItems: u,
151
- showNavigation: u.length > 1,
152
- showThumbnailDock: u.length > 1,
153
- showCounter: u.length > 1
148
+ mediaItems: c,
149
+ showNavigation: c.length > 1,
150
+ showThumbnailDock: c.length > 1,
151
+ showCounter: c.length > 1
154
152
  }
155
153
  )
156
154
  ] });
157
155
  };
158
- se.displayName = "SReview";
156
+ ie.displayName = "SReview";
159
157
  export {
160
- se as SReview,
161
- se as default
158
+ ie as SReview,
159
+ ie as default
162
160
  };
@@ -1,3 +1,4 @@
1
+ import { ReactNode } from 'react';
1
2
  import { SelectProps } from '@mui/material';
2
3
  /** Base type constraint for select options - can be primitives or objects */
3
4
  type BaseOption = string | number | Record<string, unknown>;
@@ -29,6 +30,8 @@ export type SSelectProps<T extends BaseOption = string> = Omit<SelectProps, 'err
29
30
  searchable?: boolean;
30
31
  /** Placeholder text for the search input */
31
32
  searchPlaceholder?: string;
33
+ /** Custom render function for options */
34
+ renderOption?: (option: T) => ReactNode;
32
35
  };
33
36
  /**
34
37
  * A flexible select component that handles both primitive and object options with form integration.
@@ -1,40 +1,41 @@
1
1
  import { j as t } from "../jsx-runtime-tc70JA_2.js";
2
- import { forwardRef as A, useState as f } from "react";
3
- import { c as E } from "../createSvgIcon-DTNHY3_v.js";
4
- import { Select as F, ListSubheader as M, TextField as T, InputAdornment as B, MenuItem as c, Box as p } from "@mui/material";
5
- import { SForm as D } from "../s-form/s-form.js";
6
- const K = E(/* @__PURE__ */ t.jsx("path", {
2
+ import { forwardRef as F, useState as p } from "react";
3
+ import { c as M } from "../createSvgIcon-DTNHY3_v.js";
4
+ import { Select as T, ListSubheader as B, TextField as D, InputAdornment as K, MenuItem as f, Box as x } from "@mui/material";
5
+ import { SForm as N } from "../s-form/s-form.js";
6
+ const R = M(/* @__PURE__ */ t.jsx("path", {
7
7
  d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"
8
- }), "Search"), N = A(
8
+ }), "Search"), W = F(
9
9
  ({
10
- options: r = [],
11
- optionLabel: m = "name",
12
- optionValue: y = "id",
13
- placeholder: x,
14
- label: C = "",
15
- error: b,
16
- required: I = !1,
17
- simple: w = !1,
18
- htmlFor: g,
19
- searchable: l = !1,
20
- searchPlaceholder: P = "",
10
+ options: o = [],
11
+ optionLabel: y = "name",
12
+ optionValue: C = "id",
13
+ placeholder: g,
14
+ label: b = "",
15
+ error: I,
16
+ required: w = !1,
17
+ simple: P = !1,
18
+ htmlFor: v,
19
+ searchable: r = !1,
20
+ searchPlaceholder: V = "",
21
+ renderOption: u,
21
22
  ...s
22
- }, O) => {
23
- const v = s.value !== void 0, [V, $] = f(s.multiple ? [] : null), L = v ? s.value : V, [u, h] = f(""), [k, j] = f(!1), a = (e) => String(typeof e == "string" || typeof e == "number" ? e : e[m]), o = (e) => typeof e == "string" || typeof e == "number" ? e : e[y], S = l && u ? r.filter((e) => a(e).toLowerCase().includes(u.toLowerCase())) : r;
24
- return /* @__PURE__ */ t.jsx(D, { error: b, label: C, required: I, htmlFor: g, children: /* @__PURE__ */ t.jsxs(
25
- F,
23
+ }, $) => {
24
+ const h = s.value !== void 0, [L, k] = p(s.multiple ? [] : null), z = h ? s.value : L, [i, j] = p(""), [A, S] = p(!1), a = (e) => String(typeof e == "string" || typeof e == "number" ? e : e[y]), l = (e) => typeof e == "string" || typeof e == "number" ? e : e[C], m = r && i ? o.filter((e) => a(e).toLowerCase().includes(i.toLowerCase())) : o;
25
+ return /* @__PURE__ */ t.jsx(N, { error: I, label: b, required: w, htmlFor: v, children: /* @__PURE__ */ t.jsxs(
26
+ T,
26
27
  {
27
- id: g,
28
+ id: v,
28
29
  displayEmpty: !0,
29
30
  fullWidth: !0,
30
31
  defaultValue: "",
31
- ref: O,
32
- open: l ? k : void 0,
33
- onOpen: l ? () => j(!0) : void 0,
34
- onClose: l ? () => {
35
- j(!1), h("");
32
+ ref: $,
33
+ open: r ? A : void 0,
34
+ onOpen: r ? () => S(!0) : void 0,
35
+ onClose: r ? () => {
36
+ S(!1), j("");
36
37
  } : void 0,
37
- MenuProps: l ? {
38
+ MenuProps: r ? {
38
39
  autoFocus: !1,
39
40
  PaperProps: {
40
41
  onKeyDown: (e) => {
@@ -44,38 +45,38 @@ const K = E(/* @__PURE__ */ t.jsx("path", {
44
45
  } : void 0,
45
46
  renderValue: s.multiple ? (e) => {
46
47
  const n = e;
47
- return n.length === 0 ? /* @__PURE__ */ t.jsx(p, { component: "span", sx: { color: "divider" }, children: x }) : n?.map((i) => {
48
- const d = r.find((z) => o(z) === o(i));
49
- return d ? a(d) : "";
48
+ return n.length === 0 ? /* @__PURE__ */ t.jsx(x, { component: "span", sx: { color: "divider" }, children: g }) : n?.map((d) => {
49
+ const c = o.find((E) => l(E) === l(d));
50
+ return c ? a(c) : "";
50
51
  }).filter(Boolean).join(", ");
51
52
  } : (e) => {
52
53
  const n = e;
53
54
  if (n == null || n === "")
54
- return /* @__PURE__ */ t.jsx(p, { component: "span", sx: { color: "divider" }, children: x });
55
- if (w)
55
+ return /* @__PURE__ */ t.jsx(x, { component: "span", sx: { color: "divider" }, children: g });
56
+ if (P)
56
57
  return a(n);
57
- const i = r.find((d) => o(d) === o(n));
58
- return i ? a(i) : "";
58
+ const d = o.find((c) => l(c) === l(n));
59
+ return d ? a(d) : "";
59
60
  },
60
61
  ...s,
61
- value: r.length ? L ?? "" : "",
62
+ value: o.length ? z ?? "" : "",
62
63
  onChange: (e, n) => {
63
64
  if (s.onChange)
64
65
  s.onChange(e, n);
65
- else if (!v) {
66
- const i = e.target.value;
67
- $(i);
66
+ else if (!h) {
67
+ const d = e.target.value;
68
+ k(d);
68
69
  }
69
70
  },
70
71
  children: [
71
- l && /* @__PURE__ */ t.jsx(M, { sx: { px: 2, py: 1, position: "sticky", top: 0, bgcolor: "background.paper", zIndex: 1 }, children: /* @__PURE__ */ t.jsx(
72
- T,
72
+ r && /* @__PURE__ */ t.jsx(B, { sx: { px: 2, py: 1, position: "sticky", top: 0, bgcolor: "background.paper", zIndex: 1 }, children: /* @__PURE__ */ t.jsx(
73
+ D,
73
74
  {
74
75
  fullWidth: !0,
75
76
  autoFocus: !0,
76
- placeholder: P,
77
- value: u,
78
- onChange: (e) => h(e.target.value),
77
+ placeholder: V,
78
+ value: i,
79
+ onChange: (e) => j(e.target.value),
79
80
  onKeyDown: (e) => {
80
81
  e.key !== "Escape" && e.stopPropagation();
81
82
  },
@@ -83,42 +84,42 @@ const K = E(/* @__PURE__ */ t.jsx("path", {
83
84
  e.stopPropagation();
84
85
  },
85
86
  InputProps: {
86
- startAdornment: /* @__PURE__ */ t.jsx(B, { position: "start", children: /* @__PURE__ */ t.jsx(K, { fontSize: "small" }) })
87
+ startAdornment: /* @__PURE__ */ t.jsx(K, { position: "start", children: /* @__PURE__ */ t.jsx(R, { fontSize: "small" }) })
87
88
  }
88
89
  }
89
90
  ) }),
90
- l ? S?.length > 0 ? S.map((e, n) => /* @__PURE__ */ t.jsx(
91
- c,
91
+ r ? m?.length > 0 ? m.map((e, n) => /* @__PURE__ */ t.jsx(
92
+ f,
92
93
  {
93
94
  disabled: e?.disabled ?? !1,
94
- value: o(e),
95
- children: a(e)
95
+ value: l(e),
96
+ children: u ? u(e) : a(e)
96
97
  },
97
- `${o(e)}-${n}`
98
- )) : u ? /* @__PURE__ */ t.jsx(c, { disabled: !0, children: /* @__PURE__ */ t.jsx(p, { sx: { color: "text.secondary", textAlign: "center", width: "100%" }, children: "No results found" }) }) : r?.map((e, n) => /* @__PURE__ */ t.jsx(
99
- c,
98
+ `${l(e)}-${n}`
99
+ )) : i ? /* @__PURE__ */ t.jsx(f, { disabled: !0, children: /* @__PURE__ */ t.jsx(x, { sx: { color: "text.secondary", textAlign: "center", width: "100%" }, children: "No results found" }) }) : o?.map((e, n) => /* @__PURE__ */ t.jsx(
100
+ f,
100
101
  {
101
102
  disabled: e?.disabled ?? !1,
102
- value: o(e),
103
- children: a(e)
103
+ value: l(e),
104
+ children: u ? u(e) : a(e)
104
105
  },
105
- `${o(e)}-${n}`
106
- )) : r?.map((e, n) => /* @__PURE__ */ t.jsx(
107
- c,
106
+ `${l(e)}-${n}`
107
+ )) : o?.map((e, n) => /* @__PURE__ */ t.jsx(
108
+ f,
108
109
  {
109
110
  disabled: e?.disabled ?? !1,
110
- value: o(e),
111
- children: a(e)
111
+ value: l(e),
112
+ children: u ? u(e) : a(e)
112
113
  },
113
- `${o(e)}-${n}`
114
+ `${l(e)}-${n}`
114
115
  ))
115
116
  ]
116
117
  }
117
118
  ) });
118
119
  }
119
120
  );
120
- N.displayName = "SSelect";
121
+ W.displayName = "SSelect";
121
122
  export {
122
- N as SSelect,
123
- N as default
123
+ W as SSelect,
124
+ W as default
124
125
  };
@@ -1,10 +1,10 @@
1
1
  import { j as l } from "../jsx-runtime-tc70JA_2.js";
2
- import u from "./stripe-input.js";
3
- import { STextField as m } from "../s-text-field/s-text-field.js";
2
+ import { STextField as u } from "../s-text-field/s-text-field.js";
3
+ import m from "./stripe-input.js";
4
4
  const a = (r) => {
5
5
  const { helperText: p, slotProps: t, inputProps: o, error: e, labelErrorMessage: i, stripeElement: n, ...s } = r;
6
6
  return /* @__PURE__ */ l.jsx(
7
- m,
7
+ u,
8
8
  {
9
9
  fullWidth: !0,
10
10
  slotProps: {
@@ -21,7 +21,7 @@ const a = (r) => {
21
21
  component: n
22
22
  // Pass Stripe element as component
23
23
  },
24
- inputComponent: u
24
+ inputComponent: m
25
25
  // Custom input component for Stripe integration
26
26
  }
27
27
  },
@@ -0,0 +1,2 @@
1
+ export { default } from './s-switch';
2
+ export type { SSwitchProps } from './s-switch';
@@ -0,0 +1,4 @@
1
+ import { SSwitch as e } from "./s-switch.js";
2
+ export {
3
+ e as default
4
+ };