@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.
Files changed (108) 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/{extendSxProp-CyoueGTe.js → extendSxProp-BJEIxcAx.js} +1 -1
  23. package/dist/{index-8LcCMmwl.js → index-DtGYsHSv.js} +4 -4
  24. package/dist/s-accordion/s-accordion.js +89 -89
  25. package/dist/s-action-overlay/s-action-overlay.js +7 -7
  26. package/dist/s-ai-tool-bar/s-ai-tool-bar.d.ts +44 -0
  27. package/dist/s-ai-tool-bar/s-ai-tool-bar.js +241 -272
  28. package/dist/s-avatar/s-avatar.js +2 -2
  29. package/dist/s-breadcrumbs/s-breadcrumbs.js +1 -1
  30. package/dist/s-carousel/s-carousel.d.ts +4 -4
  31. package/dist/s-carousel/s-carousel.js +4 -4
  32. package/dist/s-chat-input/s-chat-input.js +4 -4
  33. package/dist/s-chat-message/s-chat-message.js +135 -124
  34. package/dist/s-chips/s-chips.js +35 -35
  35. package/dist/s-code-block/s-code-block.js +1 -1
  36. package/dist/s-comment-message/s-comment-message.js +5 -5
  37. package/dist/s-copyable-text/s-copyable-text.js +1 -1
  38. package/dist/s-countdown/s-count-down.d.ts +15 -10
  39. package/dist/s-countdown/s-count-down.js +84 -101
  40. package/dist/s-data-table/s-data-table.js +75 -76
  41. package/dist/s-date-picker/s-date-picker.js +43 -47
  42. package/dist/s-datetime-picker/s-datetime-picker.js +782 -782
  43. package/dist/s-dialog/s-dialog.js +1 -1
  44. package/dist/s-dialog-confirm/s-dialog-confirm.js +2 -2
  45. package/dist/s-dialog-message/s-dialog-message.js +2 -2
  46. package/dist/s-empty/s-empty.js +1 -1
  47. package/dist/s-file-dropzone/s-file-dropzone.js +4 -4
  48. package/dist/s-file-icon/s-file-icon.js +15 -15
  49. package/dist/s-flex-box/s-flex-box.js +1 -1
  50. package/dist/s-gallery/s-gallery.js +1 -1
  51. package/dist/s-gradient-icon/s-gradient-icon.js +5 -5
  52. package/dist/s-image-comparison/s-image-comparison.js +3 -3
  53. package/dist/s-image-modal/s-image-modal.js +7 -7
  54. package/dist/s-label/s-label.d.ts +1 -1
  55. package/dist/s-label/s-label.js +1 -1
  56. package/dist/s-language-switcher/s-language-switcher.js +8 -8
  57. package/dist/s-localization-provider/s-localization-provider.js +1 -1
  58. package/dist/s-moving-border/s-moving-border.d.ts +5 -5
  59. package/dist/s-multi-select/s-multi-select.js +3 -3
  60. package/dist/s-overlay-scrollbar/s-overlay-scrollbar.js +6 -6
  61. package/dist/s-pixel-reveal/s-pixel-reveal.js +76 -71
  62. package/dist/s-radial-pulse-animate/s-radial-pulse-animate.js +2 -2
  63. package/dist/s-review/s-review.d.ts +3 -2
  64. package/dist/s-review/s-review.js +19 -19
  65. package/dist/s-scroll-to-top/s-scroll-to-top.js +5 -5
  66. package/dist/s-scroll-velocity/scroll-velocity-container.d.ts +1 -1
  67. package/dist/s-scroll-velocity/scroll-velocity-row.d.ts +3 -3
  68. package/dist/s-scroll-velocity/scroll-velocity-row.js +2 -2
  69. package/dist/s-select/s-select.d.ts +3 -0
  70. package/dist/s-select/s-select.js +60 -72
  71. package/dist/s-select-list/s-select-list.js +1 -1
  72. package/dist/s-stripe/s-stripe-cvc.d.ts +1 -1
  73. package/dist/s-stripe/s-stripe-expiry.d.ts +1 -1
  74. package/dist/s-stripe/s-stripe-number.d.ts +1 -1
  75. package/dist/s-stripe/stripe-input.d.ts +1 -1
  76. package/dist/s-text-editor/s-text-editor-toolbar.js +64 -60
  77. package/dist/s-text-editor/s-text-editor.js +1 -1
  78. package/dist/s-text-field/s-text-field.js +1 -1
  79. package/dist/s-text-shimmer/s-text-shimmer.js +3 -3
  80. package/dist/s-theme-demo/s-theme-demo.js +2 -2
  81. package/dist/s-theme-provider/s-theme-provider.d.ts +1 -1
  82. package/dist/s-theme-switch/s-theme-switch.js +1 -1
  83. package/dist/s-tip/s-tip.js +3 -3
  84. package/dist/{styled-BR6UL29H.js → styled-8Y5KoVix.js} +2 -2
  85. package/dist/theme/components/avatar.js +1 -1
  86. package/dist/theme/components/button.d.ts +2 -2
  87. package/dist/theme/components/button.js +1 -1
  88. package/dist/theme/components/chip.d.ts +2 -2
  89. package/dist/theme/components/chip.js +1 -1
  90. package/dist/theme/components/icon-button.d.ts +2 -2
  91. package/dist/theme/components/popover.js +2 -2
  92. package/dist/theme/components/skeleton.js +1 -1
  93. package/dist/theme/components/tooltip.js +5 -5
  94. package/dist/theme/customizations/data-display.js +12 -12
  95. package/dist/theme/customizations/feedback.js +2 -2
  96. package/dist/theme/customizations/inputs.js +12 -12
  97. package/dist/theme/customizations/navigation.js +28 -28
  98. package/dist/theme/customizations/surfaces.js +11 -11
  99. package/dist/theme/theme-primitives.js +1 -1
  100. package/dist/{useMobilePicker-C0pYjskU.js → useMobilePicker-DVnEuXv1.js} +3936 -3653
  101. package/dist/{useTheme-DSvhq4Np.js → useTheme-CWPkv7g3.js} +1 -1
  102. package/dist/{useThemeProps-C-oV4Fbz.js → useThemeProps-XYgXGzjS.js} +1 -1
  103. package/dist/utils/logger.d.ts +1 -1
  104. package/dist/utils-CHdpkEZx.js +33 -0
  105. package/dist/{warning-BZ61Y8gI.js → warning-Ba-7BBAN.js} +3 -3
  106. package/package.json +59 -59
  107. package/dist/defaultTheme-DLue8Fr1.js +0 -5
  108. package/dist/utils-DJIrqgo5.js +0 -18
@@ -3,6 +3,7 @@ import { SxProps } from '@mui/material';
3
3
  /**
4
4
  * Props interface for SReview component
5
5
  */
6
+ export type HelpfulVote = 'yes' | 'no' | null;
6
7
  export interface SReviewProps {
7
8
  /** Unique identifier for the review (default: Date.now()) */
8
9
  id?: string | number;
@@ -19,13 +20,13 @@ export interface SReviewProps {
19
20
  /** Array of image URLs to display with the review */
20
21
  images?: string[];
21
22
  /** Current user vote status for this review (default: null) */
22
- userHelpfulVote?: 'yes' | 'no' | null;
23
+ userHelpfulVote?: HelpfulVote;
23
24
  /** Number of "Yes" votes for helpfulness (default: 0) */
24
25
  helpfulYes?: number;
25
26
  /** Number of "No" votes for helpfulness (default: 0) */
26
27
  helpfulNo?: number;
27
28
  /** Callback when user votes on helpfulness (returns null when un-voting) */
28
- onHelpfulVote?: (reviewId: string | number, vote: 'yes' | 'no' | null) => void;
29
+ onHelpfulVote?: (reviewId: string | number, vote: HelpfulVote) => void;
29
30
  /** Whether to show the helpful voting section (default: true) */
30
31
  showHelpfulSection?: boolean;
31
32
  /** Size of the avatar in pixels (default: 48) */
@@ -1,13 +1,13 @@
1
1
  import { j as e } from "../jsx-runtime-tc70JA_2.js";
2
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";
3
+ import { Box as a, Stack as o, Divider as M, Typography as r, IconButton as S } from "@mui/material";
4
4
  import { SAvatar as Q } from "../s-avatar/s-avatar.js";
5
5
  import { SImageModal as X } from "../s-image-modal/s-image-modal.js";
6
6
  import Z from "../s-lazy-image/s-lazy-image.js";
7
7
  import { SRating as _ } from "../s-rating/s-rating.js";
8
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";
9
+ import { c as T } from "../createSvgIcon-BkbeLOhM.js";
10
+ import { g as ee } from "../utils-CHdpkEZx.js";
11
11
  const te = T(/* @__PURE__ */ e.jsx("path", {
12
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"
13
13
  }), "ThumbDown"), se = T(/* @__PURE__ */ e.jsx("path", {
@@ -33,15 +33,15 @@ const te = T(/* @__PURE__ */ e.jsx("path", {
33
33
  sx: y = {}
34
34
  }) => {
35
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);
36
+ let i = null;
37
+ l === s ? (s === "yes" ? g((t) => Math.max(0, t - 1)) : j((t) => Math.max(0, t - 1)), f(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
38
  }, c = x?.map((s, i) => ({
39
39
  id: `review-${I}-image-${i}`,
40
40
  type: "image",
41
41
  url: s,
42
42
  title: `Review image ${i + 1}`,
43
43
  desc: `Image ${i + 1} from ${m}'s review`
44
- })) || [], F = (s) => {
44
+ })) ?? [], F = (s) => {
45
45
  const i = c[s];
46
46
  i && (u(i), b(!0));
47
47
  }, q = () => {
@@ -51,17 +51,17 @@ const te = T(/* @__PURE__ */ e.jsx("path", {
51
51
  }, J = ee(z);
52
52
  return P(() => {
53
53
  f(d);
54
- }, [d]), U ? /* @__PURE__ */ e.jsxs(o, { sx: { py: 2, ...y }, children: [
55
- /* @__PURE__ */ e.jsxs(a, { direction: "row", spacing: 2, alignItems: "flex-start", children: [
54
+ }, [d]), U ? /* @__PURE__ */ e.jsxs(a, { sx: { py: 2, ...y }, children: [
55
+ /* @__PURE__ */ e.jsxs(o, { direction: "row", spacing: 2, alignItems: "flex-start", children: [
56
56
  /* @__PURE__ */ e.jsx(n, { component: "rounded-avatar", width: p, height: p }),
57
- /* @__PURE__ */ e.jsxs(o, { sx: { flex: 1 }, children: [
58
- /* @__PURE__ */ e.jsxs(a, { direction: "row", alignItems: "center", spacing: 2, mb: 1, children: [
57
+ /* @__PURE__ */ e.jsxs(a, { sx: { flex: 1 }, children: [
58
+ /* @__PURE__ */ e.jsxs(o, { direction: "row", alignItems: "center", spacing: 2, mb: 1, children: [
59
59
  /* @__PURE__ */ e.jsx(n, { variant: "text", width: 120, height: 20 }),
60
60
  /* @__PURE__ */ e.jsx(n, { variant: "text", width: 80, height: 16 })
61
61
  ] }),
62
- /* @__PURE__ */ e.jsx(o, { sx: { mb: 1 }, children: /* @__PURE__ */ e.jsx(n, { variant: "text", width: 100, height: 20 }) }),
62
+ /* @__PURE__ */ e.jsx(a, { sx: { mb: 1 }, children: /* @__PURE__ */ e.jsx(n, { variant: "text", width: 100, height: 20 }) }),
63
63
  /* @__PURE__ */ e.jsx(n, { variant: "text", width: "100%", height: 16, sx: { mb: 0.5 } }),
64
- /* @__PURE__ */ e.jsxs(a, { direction: "row", spacing: 1, sx: { display: "inline-flex", alignItems: "center" }, children: [
64
+ /* @__PURE__ */ e.jsxs(o, { direction: "row", spacing: 1, sx: { display: "inline-flex", alignItems: "center" }, children: [
65
65
  /* @__PURE__ */ e.jsx(n, { variant: "text", width: 140, height: 16, sx: { mr: 2 } }),
66
66
  /* @__PURE__ */ e.jsx(n, { component: "icon-button" }),
67
67
  /* @__PURE__ */ e.jsx(n, { variant: "text", width: 20, height: 16 }),
@@ -71,17 +71,17 @@ const te = T(/* @__PURE__ */ e.jsx("path", {
71
71
  ] })
72
72
  ] }),
73
73
  w && /* @__PURE__ */ e.jsx(M, { sx: { mt: 2 } })
74
- ] }) : /* @__PURE__ */ e.jsxs(o, { sx: { py: 2, ...y }, children: [
75
- /* @__PURE__ */ e.jsxs(a, { direction: "row", spacing: 2, alignItems: "flex-start", children: [
74
+ ] }) : /* @__PURE__ */ e.jsxs(a, { sx: { py: 2, ...y }, children: [
75
+ /* @__PURE__ */ e.jsxs(o, { direction: "row", spacing: 2, alignItems: "flex-start", children: [
76
76
  /* @__PURE__ */ e.jsx(Q, { avatar: R, name: m, size: p }),
77
- /* @__PURE__ */ e.jsxs(o, { sx: { flex: 1 }, children: [
78
- /* @__PURE__ */ e.jsxs(a, { direction: "row", alignItems: "center", spacing: 2, mb: 1, children: [
77
+ /* @__PURE__ */ e.jsxs(a, { sx: { flex: 1 }, children: [
78
+ /* @__PURE__ */ e.jsxs(o, { direction: "row", alignItems: "center", spacing: 2, mb: 1, children: [
79
79
  /* @__PURE__ */ e.jsx(r, { variant: "subtitle2", fontWeight: "600", children: m }),
80
80
  /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(r, { variant: "caption", children: J }) })
81
81
  ] }),
82
- /* @__PURE__ */ e.jsx(o, { sx: { mb: 1 }, children: /* @__PURE__ */ e.jsx(_, { value: L, max: E, readOnly: O }) }),
82
+ /* @__PURE__ */ e.jsx(a, { sx: { mb: 1 }, children: /* @__PURE__ */ e.jsx(_, { value: L, max: E, readOnly: O }) }),
83
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(
84
+ x && x.length > 0 && /* @__PURE__ */ e.jsx(o, { direction: "row", spacing: 1, sx: { mb: 2, flexWrap: "wrap", gap: 1 }, children: x.map((s, i) => /* @__PURE__ */ e.jsx(
85
85
  Z,
86
86
  {
87
87
  src: s,
@@ -103,7 +103,7 @@ const te = T(/* @__PURE__ */ e.jsx("path", {
103
103
  },
104
104
  i
105
105
  )) }),
106
- D && /* @__PURE__ */ e.jsxs(a, { direction: "row", spacing: 1, sx: { display: "inline-flex", alignItems: "center" }, children: [
106
+ D && /* @__PURE__ */ e.jsxs(o, { direction: "row", spacing: 1, sx: { display: "inline-flex", alignItems: "center" }, children: [
107
107
  /* @__PURE__ */ e.jsx(r, { variant: "caption", sx: { mr: 2 }, children: "Was this review helpful?" }),
108
108
  /* @__PURE__ */ e.jsx(
109
109
  S,
@@ -1,9 +1,9 @@
1
1
  import { j as r } from "../jsx-runtime-tc70JA_2.js";
2
2
  import l from "react";
3
- import { A as m } from "../ArrowUpward-JWPHrR6I.js";
3
+ import { A as m } from "../ArrowUpward-D8eqD-si.js";
4
4
  import { useIsPassedPosition as d } from "../hooks/use-is-passed-position.js";
5
- import { s as c } from "../styled-BR6UL29H.js";
6
- import { B as p } from "../Box-p3bpOtdn.js";
5
+ import { s as c } from "../styled-8Y5KoVix.js";
6
+ import { B as p } from "../Box-BkXoTbe8.js";
7
7
  const f = c(p)({
8
8
  position: "fixed",
9
9
  bottom: 20,
@@ -22,7 +22,7 @@ const f = c(p)({
22
22
  transform: "scale(1.1)"
23
23
  }
24
24
  }), h = l.memo(({ onClick: e, scrollElementId: o, threshold: s = 100, icon: i, sx: n }) => {
25
- const t = d(o || window, s), a = () => {
25
+ const t = d(o ?? window, s), a = () => {
26
26
  e ? e() : o ? document.getElementById(o)?.scrollTo({ top: 0, behavior: "smooth" }) : window.scrollTo({ top: 0, behavior: "smooth" });
27
27
  };
28
28
  return /* @__PURE__ */ r.jsx(
@@ -34,7 +34,7 @@ const f = c(p)({
34
34
  ...n
35
35
  },
36
36
  onClick: a,
37
- children: i || /* @__PURE__ */ r.jsx(m, {})
37
+ children: i ?? /* @__PURE__ */ r.jsx(m, {})
38
38
  }
39
39
  );
40
40
  });
@@ -10,7 +10,7 @@ export declare const ScrollVelocityContext: React.Context<MotionValue<number> |
10
10
  */
11
11
  export interface ScrollVelocityContainerProps extends BoxProps {
12
12
  /** Content to render inside the container */
13
- children: React.ReactNode;
13
+ readonly children: React.ReactNode;
14
14
  }
15
15
  /**
16
16
  * Container component that provides scroll velocity context to child rows.
@@ -13,11 +13,11 @@ export declare const wrap: (min: number, max: number, v: number) => number;
13
13
  */
14
14
  export interface ScrollVelocityRowProps extends BoxProps {
15
15
  /** Content to repeat in the scrolling row */
16
- children: React.ReactNode;
16
+ readonly children: React.ReactNode;
17
17
  /** Base scrolling speed (default: 5) */
18
- baseVelocity?: number;
18
+ readonly baseVelocity?: number;
19
19
  /** Scroll direction: 1 for right, -1 for left (default: 1) */
20
- direction?: 1 | -1;
20
+ readonly direction?: 1 | -1;
21
21
  }
22
22
  /**
23
23
  * A horizontal scrolling row component that responds to page scroll velocity.
@@ -20,7 +20,7 @@ function L({
20
20
  const o = x.current, t = v.current;
21
21
  if (!o || !t) return;
22
22
  const l = () => {
23
- const h = o.offsetWidth || 0, p = t.scrollWidth || 0;
23
+ const h = o.offsetWidth ?? 0, p = t.scrollWidth ?? 0;
24
24
  y.set(p);
25
25
  const j = p > 0 ? Math.max(3, Math.ceil(h / p) + 2) : 1;
26
26
  z((C) => C === j ? C : j);
@@ -56,7 +56,7 @@ function L({
56
56
  const p = r >= 0 ? 1 : -1;
57
57
  R.current = D.current * p;
58
58
  }
59
- const a = y.get() || 0;
59
+ const a = y.get() ?? 0;
60
60
  if (a <= 0) return;
61
61
  const d = a * n / 100, h = R.current * d * m * l;
62
62
  w.set(w.get() + h);
@@ -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,38 +1,39 @@
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", {
1
+ import { j as r } from "../jsx-runtime-tc70JA_2.js";
2
+ import { forwardRef as E, useState as c } from "react";
3
+ import { c as F } from "../createSvgIcon-BkbeLOhM.js";
4
+ import { Select as T, ListSubheader as B, TextField as D, InputAdornment as K, MenuItem as j, Box as f } from "@mui/material";
5
+ import { SForm as N } from "../s-form/s-form.js";
6
+ const R = F(/* @__PURE__ */ r.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 = E(
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,
10
+ options: o = [],
11
+ optionLabel: y = "name",
12
+ optionValue: C = "id",
13
+ placeholder: p,
14
+ label: I = "",
15
+ error: w,
16
+ required: P = !1,
17
+ simple: V = !1,
18
+ htmlFor: x,
19
19
  searchable: l = !1,
20
- searchPlaceholder: P = "",
20
+ searchPlaceholder: b = "",
21
+ renderOption: g,
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
+ }, L) => {
24
+ const m = s.value !== void 0, [O, k] = c(s.multiple ? [] : null), M = m ? s.value : O, [d, v] = c(""), [z, h] = c(!1), i = (e) => String(typeof e == "string" || typeof e == "number" ? e : e[y]), a = (e) => typeof e == "string" || typeof e == "number" ? e : e[C], S = l && d ? o.filter((e) => i(e).toLowerCase().includes(d.toLowerCase())) : o;
25
+ return /* @__PURE__ */ r.jsx(N, { error: w, label: I, required: P, htmlFor: x, children: /* @__PURE__ */ r.jsxs(
26
+ T,
26
27
  {
27
- id: g,
28
+ id: x,
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,
32
+ ref: L,
33
+ open: l ? z : void 0,
34
+ onOpen: l ? () => h(!0) : void 0,
34
35
  onClose: l ? () => {
35
- j(!1), h("");
36
+ h(!1), v("");
36
37
  } : void 0,
37
38
  MenuProps: l ? {
38
39
  autoFocus: !1,
@@ -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__ */ r.jsx(f, { component: "span", sx: { color: "divider" }, children: p }) : n?.map((t) => {
49
+ const u = o.find((A) => a(A) === a(t));
50
+ return u ? i(u) : "";
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)
56
- return a(n);
57
- const i = r.find((d) => o(d) === o(n));
58
- return i ? a(i) : "";
55
+ return /* @__PURE__ */ r.jsx(f, { component: "span", sx: { color: "divider" }, children: p });
56
+ if (V)
57
+ return i(n);
58
+ const t = o.find((u) => a(u) === a(n));
59
+ return t ? i(t) : "";
59
60
  },
60
61
  ...s,
61
- value: r.length ? L ?? "" : "",
62
+ value: o.length ? M ?? "" : "",
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 (!m) {
67
+ const t = e.target.value;
68
+ k(t);
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
+ l && /* @__PURE__ */ r.jsx(B, { sx: { px: 2, py: 1, position: "sticky", top: 0, bgcolor: "background.paper", zIndex: 1 }, children: /* @__PURE__ */ r.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: b,
78
+ value: d,
79
+ onChange: (e) => v(e.target.value),
79
80
  onKeyDown: (e) => {
80
81
  e.key !== "Escape" && e.stopPropagation();
81
82
  },
@@ -83,42 +84,29 @@ 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__ */ r.jsx(K, { position: "start", children: /* @__PURE__ */ r.jsx(R, { fontSize: "small" }) })
87
88
  }
88
89
  }
89
90
  ) }),
90
- l ? S?.length > 0 ? S.map((e, n) => /* @__PURE__ */ t.jsx(
91
- c,
92
- {
93
- disabled: e?.disabled ?? !1,
94
- value: o(e),
95
- children: a(e)
96
- },
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,
100
- {
101
- disabled: e?.disabled ?? !1,
102
- value: o(e),
103
- children: a(e)
104
- },
105
- `${o(e)}-${n}`
106
- )) : r?.map((e, n) => /* @__PURE__ */ t.jsx(
107
- c,
108
- {
109
- disabled: e?.disabled ?? !1,
110
- value: o(e),
111
- children: a(e)
112
- },
113
- `${o(e)}-${n}`
114
- ))
91
+ (() => {
92
+ const e = (n) => n.map((t, u) => /* @__PURE__ */ r.jsx(
93
+ j,
94
+ {
95
+ disabled: t?.disabled ?? !1,
96
+ value: a(t),
97
+ children: g ? g(t) : i(t)
98
+ },
99
+ `${a(t)}-${u}`
100
+ ));
101
+ return l ? S.length > 0 ? e(S) : d ? /* @__PURE__ */ r.jsx(j, { disabled: !0, children: /* @__PURE__ */ r.jsx(f, { sx: { color: "text.secondary", textAlign: "center", width: "100%" }, children: "No results found" }) }) : e(o) : e(o);
102
+ })()
115
103
  ]
116
104
  }
117
105
  ) });
118
106
  }
119
107
  );
120
- N.displayName = "SSelect";
108
+ W.displayName = "SSelect";
121
109
  export {
122
- N as SSelect,
123
- N as default
110
+ W as SSelect,
111
+ W as default
124
112
  };
@@ -12,7 +12,7 @@ const u = p(i, {
12
12
  paddingRight: s.spacing(2),
13
13
  border: "1px solid",
14
14
  cursor: "pointer",
15
- borderColor: a ? (s.vars || s).palette.primary.dark : (s.vars || s).palette.divider
15
+ borderColor: a ? (s.vars ?? s).palette.primary.dark : (s.vars ?? s).palette.divider
16
16
  })), f = ({
17
17
  items: s,
18
18
  selectedId: a,
@@ -1,7 +1,7 @@
1
1
  import { CardCvcElement } from '@stripe/react-stripe-js';
2
2
  import { StripeTextFieldProps } from './s-stripe';
3
3
  /** Card security code (CVC/CVV) input field with Stripe integration. */
4
- export declare function SStripeCVC(props: StripeTextFieldProps<typeof CardCvcElement>): import("react/jsx-runtime").JSX.Element;
4
+ export declare function SStripeCVC(props: Readonly<StripeTextFieldProps<typeof CardCvcElement>>): import("react/jsx-runtime").JSX.Element;
5
5
  export declare namespace SStripeCVC {
6
6
  var displayName: string;
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import { CardExpiryElement } from '@stripe/react-stripe-js';
2
2
  import { StripeTextFieldProps } from './s-stripe';
3
3
  /** Card expiration date input field with Stripe integration. */
4
- export declare function SStripeExpiry(props: StripeTextFieldProps<typeof CardExpiryElement>): import("react/jsx-runtime").JSX.Element;
4
+ export declare function SStripeExpiry(props: Readonly<StripeTextFieldProps<typeof CardExpiryElement>>): import("react/jsx-runtime").JSX.Element;
5
5
  export declare namespace SStripeExpiry {
6
6
  var displayName: string;
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import { CardNumberElement } from '@stripe/react-stripe-js';
2
2
  import { StripeTextFieldProps } from './s-stripe';
3
3
  /** Card number input field with Stripe integration. */
4
- export declare function SStripeNumber(props: StripeTextFieldProps<typeof CardNumberElement>): import("react/jsx-runtime").JSX.Element;
4
+ export declare function SStripeNumber(props: Readonly<StripeTextFieldProps<typeof CardNumberElement>>): import("react/jsx-runtime").JSX.Element;
5
5
  export declare namespace SStripeNumber {
6
6
  var displayName: string;
7
7
  }
@@ -7,5 +7,5 @@ import * as React from 'react';
7
7
  * @param ref - Forward ref for focus management
8
8
  * @returns JSX element containing configured Stripe element
9
9
  */
10
- declare const StripeInput: React.ForwardRefExoticComponent<Omit<InputBaseComponentProps, "ref"> & React.RefAttributes<any>>;
10
+ declare const StripeInput: React.ForwardRefExoticComponent<Omit<InputBaseComponentProps, "ref"> & React.RefAttributes<unknown>>;
11
11
  export default StripeInput;