@solostylist/ui-kit 1.0.175 → 1.0.176

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 (203) hide show
  1. package/dist/{ArrowUpward-DhTFpzoh.js → ArrowUpward-CEeqSc-C.js} +2 -2
  2. package/dist/{Box-Ha0cQ4KO.js → Box-CE3rycd-.js} +5 -5
  3. package/dist/ButtonBase-C_YYB9Ry.js +1099 -0
  4. package/dist/{ChevronLeft-CBuFk2Fh.js → ChevronLeft-6gdh4lRt.js} +2 -2
  5. package/dist/{ChevronRight-CnDWPrOm.js → ChevronRight-CC3l-wPC.js} +2 -2
  6. package/dist/{Close-BRlEKA2Q.js → Close-DOHlPcFK.js} +2 -2
  7. package/dist/{ContentCopy-7nFBtjhs.js → ContentCopy-2xxDThyB.js} +2 -2
  8. package/dist/DefaultPropsProvider-sk0uWcA6.js +64 -0
  9. package/dist/{Download-UsLvGg3y.js → Download-Chao5NQl.js} +2 -2
  10. package/dist/{ExpandMore-DTWX_mHf.js → ExpandMore-DIGPB4Mj.js} +2 -2
  11. package/dist/{Favorite-DS5Gpq2s.js → Favorite-wp65zwWq.js} +2 -2
  12. package/dist/{Menu-CWq-a1Wz.js → Menu-DZYzE2Mg.js} +908 -906
  13. package/dist/{MenuItem-DY_qFSPR.js → MenuItem-BXiIhfBS.js} +26 -25
  14. package/dist/Paper-DnctZB5U.js +689 -0
  15. package/dist/{Select-DabtQlJT.js → Select-DY7XGVsv.js} +2152 -2115
  16. package/dist/{Stack-Cq2r2NmC.js → Stack-BScsuyQy.js} +6 -6
  17. package/dist/{Typography-C8jwvSWe.js → Typography-9Kg27dDw.js} +84 -86
  18. package/dist/{_commonjsHelpers-B4e78b8K.js → _commonjsHelpers-ByX85dGu.js} +18 -13
  19. package/dist/assets/s-overlay-scrollbar.css +1 -9
  20. package/dist/createSvgIcon-BKymXuBG.js +242 -0
  21. package/dist/{createTheme-3Wd3hHrj.js → createTheme-f5g1s6ww.js} +859 -906
  22. package/dist/defaultTheme-LSr-S9un.js +5 -0
  23. package/dist/entries/carousel.d.ts +10 -0
  24. package/dist/entries/carousel.js +4 -0
  25. package/dist/entries/chat.d.ts +9 -0
  26. package/dist/entries/chat.js +4 -0
  27. package/dist/entries/code.d.ts +9 -0
  28. package/dist/entries/code.js +4 -0
  29. package/dist/entries/core.d.ts +100 -0
  30. package/dist/entries/core.js +122 -0
  31. package/dist/entries/dates.d.ts +16 -0
  32. package/dist/entries/dates.js +12 -0
  33. package/dist/entries/dropzone.d.ts +9 -0
  34. package/dist/entries/dropzone.js +4 -0
  35. package/dist/entries/editor.d.ts +12 -0
  36. package/dist/entries/editor.js +4 -0
  37. package/dist/entries/gallery.d.ts +17 -0
  38. package/dist/entries/gallery.js +13 -0
  39. package/dist/entries/i18n.d.ts +13 -0
  40. package/dist/entries/i18n.js +8 -0
  41. package/dist/entries/motion.d.ts +29 -0
  42. package/dist/entries/motion.js +28 -0
  43. package/dist/entries/scrollbar.d.ts +9 -0
  44. package/dist/entries/scrollbar.js +4 -0
  45. package/dist/entries/stripe.d.ts +10 -0
  46. package/dist/entries/stripe.js +10 -0
  47. package/dist/extendSxProp-DitxZ8We.js +36 -0
  48. package/dist/hooks/index.js +8 -9
  49. package/dist/hooks/use-is-passed-position.js +10 -10
  50. package/dist/{index-BGvzecIA.js → index-D3G5Rwl-.js} +0 -7
  51. package/dist/{index-CfKHZ86U.js → index-DtYP8YE7.js} +12 -13
  52. package/dist/{jsx-runtime-OVHDjVDe.js → jsx-runtime-tc70JA_2.js} +108 -128
  53. package/dist/main.d.ts +29 -145
  54. package/dist/main.js +187 -187
  55. package/dist/mergeSlotProps-CuzBQdlp.js +62 -0
  56. package/dist/resolveProps-BDH0VJjn.js +39 -0
  57. package/dist/s-accordion/package.json +5 -5
  58. package/dist/s-accordion/s-accordion.js +374 -358
  59. package/dist/s-action-overlay/package.json +5 -5
  60. package/dist/s-action-overlay/s-action-overlay.js +64 -79
  61. package/dist/s-ai-tool-bar/package.json +5 -5
  62. package/dist/s-ai-tool-bar/s-ai-tool-bar.js +260 -275
  63. package/dist/s-autocomplete/s-autocomplete.js +19 -25
  64. package/dist/s-avatar/package.json +5 -5
  65. package/dist/s-avatar/s-avatar.js +14 -25
  66. package/dist/s-blur-text/package.json +5 -5
  67. package/dist/s-blur-text/s-blur-text.js +55 -59
  68. package/dist/s-breadcrumbs/package.json +5 -5
  69. package/dist/s-breadcrumbs/s-breadcrumbs.js +31 -39
  70. package/dist/s-button/package.json +5 -5
  71. package/dist/s-button/s-button.js +7 -15
  72. package/dist/s-button-link/s-button-link.js +28 -36
  73. package/dist/s-carousel/package.json +4 -4
  74. package/dist/s-carousel/s-carousel.js +267 -280
  75. package/dist/s-category-card/package.json +4 -4
  76. package/dist/s-category-card/s-category-card.js +60 -77
  77. package/dist/s-chat-input/package.json +5 -5
  78. package/dist/s-chat-input/s-chat-input.js +84 -92
  79. package/dist/s-chat-message/s-chat-message.js +111 -120
  80. package/dist/s-checkbox/s-checkbox.js +12 -20
  81. package/dist/s-chip/package.json +5 -5
  82. package/dist/s-chip/s-chip.js +7 -15
  83. package/dist/s-chips/s-chips.js +47 -56
  84. package/dist/s-code-block/package.json +5 -5
  85. package/dist/s-code-block/s-code-block.js +35 -43
  86. package/dist/s-comment-message/package.json +5 -5
  87. package/dist/s-comment-message/s-comment-message.js +90 -94
  88. package/dist/s-copyable-text/s-copyable-text.js +24 -32
  89. package/dist/s-countdown/s-count-box.js +42 -50
  90. package/dist/s-countdown/s-count-down.js +79 -107
  91. package/dist/s-data-table/s-data-table.js +374 -384
  92. package/dist/s-date-picker/s-date-picker.js +164 -164
  93. package/dist/s-datetime-picker/s-datetime-picker.js +1599 -1603
  94. package/dist/s-dialog/s-dialog.js +24 -32
  95. package/dist/s-dialog-confirm/s-dialog-confirm.js +46 -50
  96. package/dist/s-dialog-message/s-dialog-message.js +40 -44
  97. package/dist/s-empty/s-empty.js +6 -14
  98. package/dist/s-error/s-error.js +9 -17
  99. package/dist/s-error-layout/s-error-layout.js +38 -47
  100. package/dist/s-file-dropzone/s-file-dropzone.js +55 -64
  101. package/dist/s-file-icon/s-file-icon.js +9 -13
  102. package/dist/s-flex-box/s-flex-box.js +6 -14
  103. package/dist/s-form/s-form.js +11 -19
  104. package/dist/s-gallery/index.js +3 -33
  105. package/dist/s-gallery/s-gallery.js +91 -114
  106. package/dist/s-glow-button/s-glow-button.js +22 -26
  107. package/dist/s-gradient-icon/s-gradient-icon.js +49 -59
  108. package/dist/s-i18n-provider/s-i18n-provider.js +17 -25
  109. package/dist/s-icon-button/s-icon-button.js +6 -14
  110. package/dist/s-image-comparison/package.json +5 -5
  111. package/dist/s-image-comparison/s-image-comparison.js +48 -53
  112. package/dist/s-image-modal/package.json +5 -5
  113. package/dist/s-image-modal/s-image-modal.js +137 -150
  114. package/dist/s-item-not-found/s-item-not-found.js +13 -22
  115. package/dist/s-label/s-label.js +12 -20
  116. package/dist/s-language-switcher/s-language-switcher.js +119 -141
  117. package/dist/s-lazy-image/index.js +2 -10
  118. package/dist/s-lazy-image/s-lazy-image.js +33 -37
  119. package/dist/s-localization-provider/s-localization-provider.js +368 -380
  120. package/dist/s-moving-border/s-moving-border.js +52 -67
  121. package/dist/s-multi-select/s-multi-select.js +43 -51
  122. package/dist/s-no-ssr/s-no-ssr.js +13 -21
  123. package/dist/s-overlay-scrollbar/s-overlay-scrollbar.js +12 -16
  124. package/dist/s-pagination/s-pagination.js +13 -17
  125. package/dist/s-pixel-reveal/package.json +5 -5
  126. package/dist/s-pixel-reveal/s-pixel-reveal.js +92 -99
  127. package/dist/s-radial-pulse-animate/package.json +5 -5
  128. package/dist/s-radial-pulse-animate/s-radial-pulse-animate.js +40 -48
  129. package/dist/s-rating/package.json +5 -5
  130. package/dist/s-rating/s-rating.js +7 -15
  131. package/dist/s-review/package.json +5 -5
  132. package/dist/s-review/s-review.js +101 -106
  133. package/dist/s-scroll-reveal/package.json +5 -5
  134. package/dist/s-scroll-reveal/s-scroll-reveal.js +40 -48
  135. package/dist/s-scroll-to-top/package.json +5 -5
  136. package/dist/s-scroll-to-top/s-scroll-to-top.js +20 -30
  137. package/dist/s-scroll-velocity/package.json +5 -5
  138. package/dist/s-scroll-velocity/s-scroll-velocity.js +5 -19
  139. package/dist/s-scroll-velocity/scroll-velocity-container.js +18 -27
  140. package/dist/s-scroll-velocity/scroll-velocity-row.js +62 -71
  141. package/dist/s-select/s-select.js +67 -75
  142. package/dist/s-select-list/s-select-list.js +28 -32
  143. package/dist/s-skeleton/s-skeleton.js +20 -28
  144. package/dist/s-snackbar-message/s-snackbar-message.js +36 -40
  145. package/dist/s-spotlight-cursor/s-spotlight-cursor.js +31 -35
  146. package/dist/s-stripe/s-stripe-cvc.js +8 -12
  147. package/dist/s-stripe/s-stripe-expiry.js +8 -12
  148. package/dist/s-stripe/s-stripe-number.js +8 -12
  149. package/dist/s-stripe/s-stripe.d.ts +2 -2
  150. package/dist/s-stripe/s-stripe.js +17 -26
  151. package/dist/s-stripe/stripe-input.js +25 -29
  152. package/dist/s-tabs/package.json +3 -3
  153. package/dist/s-tabs/s-tab-panel.js +17 -25
  154. package/dist/s-tabs/s-tab.js +5 -9
  155. package/dist/s-tabs/s-tabs.js +19 -27
  156. package/dist/s-text-editor/s-text-editor-toolbar.js +73 -88
  157. package/dist/s-text-editor/s-text-editor.js +33 -45
  158. package/dist/s-text-field/s-text-field.js +31 -40
  159. package/dist/s-text-shimmer/package.json +4 -4
  160. package/dist/s-text-shimmer/s-text-shimmer.js +19 -27
  161. package/dist/s-text-truncation/s-text-truncation.js +24 -32
  162. package/dist/s-theme-demo/package.json +5 -5
  163. package/dist/s-theme-demo/s-theme-demo.js +219 -234
  164. package/dist/s-theme-provider/s-theme-provider.js +37 -45
  165. package/dist/s-theme-switch/package.json +4 -4
  166. package/dist/s-theme-switch/s-theme-switch.js +19 -23
  167. package/dist/s-tip/s-tip.js +14 -22
  168. package/dist/s-two-pane-layout/index.js +2 -10
  169. package/dist/s-two-pane-layout/s-two-pane-layout.js +47 -55
  170. package/dist/s-typewriter-text/package.json +5 -5
  171. package/dist/s-typewriter-text/s-typewriter-text.js +27 -35
  172. package/dist/s-zoom-image/index.js +2 -10
  173. package/dist/s-zoom-image/package.json +5 -5
  174. package/dist/s-zoom-image/s-zoom-image.js +53 -62
  175. package/dist/styled-B0KflPi-.js +203 -0
  176. package/dist/theme/components/alert.d.ts +484 -264
  177. package/dist/theme/components/avatar.js +2 -2
  178. package/dist/theme/components/button.d.ts +726 -396
  179. package/dist/theme/components/chip.js +2 -2
  180. package/dist/theme/components/icon-button.d.ts +726 -396
  181. package/dist/theme/customizations/data-display.js +1 -1
  182. package/dist/theme/customizations/inputs.js +2 -2
  183. package/dist/theme/customizations/navigation.js +2 -2
  184. package/dist/theme/theme-primitives.d.ts +8 -246
  185. package/dist/theme/theme-primitives.js +76 -87
  186. package/dist/{typographyClasses-DDyl9mok.js → typographyClasses-C7fhAsUD.js} +4 -4
  187. package/dist/{useMobilePicker-C1RZZUWr.js → useMobilePicker-C4AYe0Ch.js} +11249 -11231
  188. package/dist/{useTheme-B5czKfC4.js → useTheme-CtdhfT4P.js} +1 -1
  189. package/dist/{useThemeProps-DqA5BinV.js → useThemeProps-_apS-Aua.js} +2 -2
  190. package/dist/utils/dayjs.js +7 -7
  191. package/dist/utils/logger.js +29 -32
  192. package/dist/{warning-BCwEnWrE.js → warning-DnPRVtW6.js} +4 -4
  193. package/package.json +240 -81
  194. package/README.md +0 -13
  195. package/dist/ButtonBase-DfTfJ_ou.js +0 -1105
  196. package/dist/DefaultPropsProvider-CaCsvQaq.js +0 -78
  197. package/dist/Paper-hkbPWyBT.js +0 -553
  198. package/dist/createSvgIcon-DxwgGAVe.js +0 -247
  199. package/dist/defaultTheme-fEi1x1Gb.js +0 -5
  200. package/dist/extendSxProp-BKWjdW12.js +0 -37
  201. package/dist/mergeSlotProps-Dl_rJtoN.js +0 -62
  202. package/dist/resolveProps-61uUKnlS.js +0 -52
  203. package/dist/styled-B0Z4EDy9.js +0 -206
@@ -1,76 +1,76 @@
1
- import { j as u } from "../jsx-runtime-OVHDjVDe.js";
2
- import { useContext as A, useRef as i, useState as B, useEffect as D } from "react";
3
- import { Box as I } from "@mui/material";
4
- import { useMotionValue as N, useTransform as z, useAnimationFrame as P, motion as O, useScroll as T, useVelocity as X, useSpring as Y } from "framer-motion";
5
- import { ScrollVelocityContext as $ } from "./scroll-velocity-container.js";
6
- const V = (e, n, s) => {
7
- const c = n - e;
8
- return ((s - e) % c + c) % c + e;
1
+ import { j as u } from "../jsx-runtime-tc70JA_2.js";
2
+ import { useContext as P, useRef as c, useState as W, useEffect as A } from "react";
3
+ import { Box as E } from "@mui/material";
4
+ import { useMotionValue as I, useTransform as F, useAnimationFrame as B, motion as O, useScroll as _, useVelocity as q, useSpring as T } from "framer-motion";
5
+ import { ScrollVelocityContext as X } from "./scroll-velocity-container.js";
6
+ const Y = (e, n, i) => {
7
+ const s = n - e;
8
+ return ((i - e) % s + s) % s + e;
9
9
  };
10
- function F({
10
+ function L({
11
11
  children: e,
12
12
  baseVelocity: n = 5,
13
- direction: s = 1,
14
- sx: c,
15
- velocityFactor: w,
16
- ...y
13
+ direction: i = 1,
14
+ sx: s,
15
+ velocityFactor: g,
16
+ ...b
17
17
  }) {
18
- const g = i(null), b = i(null), [L, q] = B(1), x = N(0), W = i(s >= 0 ? 1 : -1), S = i(s >= 0 ? 1 : -1), v = N(0), R = i(!0), _ = i(!0), M = i(!1);
19
- D(() => {
20
- const o = g.current, t = b.current;
18
+ const x = c(null), v = c(null), [k, z] = W(1), w = I(0), D = c(i >= 0 ? 1 : -1), R = c(i >= 0 ? 1 : -1), y = I(0), S = c(!0), V = c(!0), M = c(!1);
19
+ A(() => {
20
+ const o = x.current, t = v.current;
21
21
  if (!o || !t) return;
22
22
  const l = () => {
23
- const p = o.offsetWidth || 0, h = t.scrollWidth || 0;
24
- v.set(h);
25
- const C = h > 0 ? Math.max(3, Math.ceil(p / h) + 2) : 1;
26
- q((j) => j === C ? j : C);
23
+ const h = o.offsetWidth || 0, p = t.scrollWidth || 0;
24
+ y.set(p);
25
+ const j = p > 0 ? Math.max(3, Math.ceil(h / p) + 2) : 1;
26
+ z((C) => C === j ? C : j);
27
27
  };
28
28
  l();
29
29
  const r = new ResizeObserver(l);
30
30
  r.observe(o), r.observe(t);
31
- const d = new IntersectionObserver(([p]) => {
32
- R.current = p.isIntersecting;
31
+ const f = new IntersectionObserver(([h]) => {
32
+ S.current = h.isIntersecting;
33
33
  });
34
- d.observe(o);
35
- const f = () => {
36
- _.current = document.visibilityState === "visible";
34
+ f.observe(o);
35
+ const m = () => {
36
+ V.current = document.visibilityState === "visible";
37
37
  };
38
- document.addEventListener("visibilitychange", f, {
38
+ document.addEventListener("visibilitychange", m, {
39
39
  passive: !0
40
- }), f();
41
- const a = window.matchMedia("(prefers-reduced-motion: reduce)"), m = () => {
40
+ }), m();
41
+ const a = window.matchMedia("(prefers-reduced-motion: reduce)"), d = () => {
42
42
  M.current = a.matches;
43
43
  };
44
- return a.addEventListener("change", m), m(), () => {
45
- r.disconnect(), d.disconnect(), document.removeEventListener("visibilitychange", f), a.removeEventListener("change", m);
44
+ return a.addEventListener("change", d), d(), () => {
45
+ r.disconnect(), f.disconnect(), document.removeEventListener("visibilitychange", m), a.removeEventListener("change", d);
46
46
  };
47
- }, [e, v]);
48
- const k = z([x, v], ([o, t]) => {
47
+ }, [e, y]);
48
+ const N = F([w, y], ([o, t]) => {
49
49
  const l = Number(t) || 1, r = Number(o) || 0;
50
- return `${-V(0, l, r)}px`;
50
+ return `${-Y(0, l, r)}px`;
51
51
  });
52
- return P((o, t) => {
53
- if (!R.current || !_.current) return;
54
- const l = t / 1e3, r = w.get(), d = Math.min(5, Math.abs(r)), f = M.current ? 1 : 1 + d;
55
- if (d > 0.1) {
56
- const h = r >= 0 ? 1 : -1;
57
- S.current = W.current * h;
52
+ return B((o, t) => {
53
+ if (!S.current || !V.current) return;
54
+ const l = t / 1e3, r = g.get(), f = Math.min(5, Math.abs(r)), m = M.current ? 1 : 1 + f;
55
+ if (f > 0.1) {
56
+ const p = r >= 0 ? 1 : -1;
57
+ R.current = D.current * p;
58
58
  }
59
- const a = v.get() || 0;
59
+ const a = y.get() || 0;
60
60
  if (a <= 0) return;
61
- const m = a * n / 100, p = S.current * m * f * l;
62
- x.set(x.get() + p);
61
+ const d = a * n / 100, h = R.current * d * m * l;
62
+ w.set(w.get() + h);
63
63
  }), /* @__PURE__ */ u.jsx(
64
- I,
64
+ E,
65
65
  {
66
- ref: g,
66
+ ref: x,
67
67
  sx: {
68
68
  width: "100%",
69
69
  overflow: "hidden",
70
70
  whiteSpace: "nowrap",
71
- ...c
71
+ ...s
72
72
  },
73
- ...y,
73
+ ...b,
74
74
  children: /* @__PURE__ */ u.jsx(
75
75
  O.div,
76
76
  {
@@ -79,12 +79,12 @@ function F({
79
79
  alignItems: "center",
80
80
  willChange: "transform",
81
81
  userSelect: "none",
82
- x: k
82
+ x: N
83
83
  },
84
- children: Array.from({ length: L }).map((o, t) => /* @__PURE__ */ u.jsx(
85
- I,
84
+ children: Array.from({ length: k }).map((o, t) => /* @__PURE__ */ u.jsx(
85
+ E,
86
86
  {
87
- ref: t === 0 ? b : null,
87
+ ref: t === 0 ? v : null,
88
88
  "aria-hidden": t !== 0,
89
89
  sx: {
90
90
  display: "inline-flex",
@@ -101,31 +101,22 @@ function F({
101
101
  }
102
102
  );
103
103
  }
104
- function G(e) {
105
- const { scrollY: n } = T(), s = X(n), c = Y(s, {
104
+ function $(e) {
105
+ const { scrollY: n } = _(), i = q(n), s = T(i, {
106
106
  damping: 50,
107
107
  stiffness: 400
108
- }), w = z(c, (y) => {
109
- const g = y < 0 ? -1 : 1, b = Math.min(5, Math.abs(y) / 1e3 * 5);
110
- return g * b;
108
+ }), g = F(s, (b) => {
109
+ const x = b < 0 ? -1 : 1, v = Math.min(5, Math.abs(b) / 1e3 * 5);
110
+ return x * v;
111
111
  });
112
- return /* @__PURE__ */ u.jsx(F, { ...e, velocityFactor: w });
112
+ return /* @__PURE__ */ u.jsx(L, { ...e, velocityFactor: g });
113
113
  }
114
- function E(e) {
115
- const n = A($);
116
- return n ? /* @__PURE__ */ u.jsx(F, { ...e, velocityFactor: n }) : /* @__PURE__ */ u.jsx(G, { ...e });
117
- }
118
- try {
119
- E.displayName = "ScrollVelocityRow", E.__docgenInfo = { description: `A horizontal scrolling row component that responds to page scroll velocity.
120
- Can be used standalone or inside ScrollVelocityContainer for synchronized scrolling.`, displayName: "ScrollVelocityRow", props: { children: { defaultValue: null, description: "Content to repeat in the scrolling row", name: "children", required: !0, type: { name: "ReactNode" } }, baseVelocity: { defaultValue: null, description: "Base scrolling speed (default: 5)", name: "baseVelocity", required: !1, type: { name: "number" } }, direction: { defaultValue: null, description: "Scroll direction: 1 for right, -1 for left (default: 1)", name: "direction", required: !1, type: { name: "enum", value: [{ value: "1" }, { value: "-1" }] } } } };
121
- } catch {
122
- }
123
- try {
124
- V.displayName = "wrap", V.__docgenInfo = { description: "Wraps a value within a range [min, max)", displayName: "wrap", props: {} };
125
- } catch {
114
+ function U(e) {
115
+ const n = P(X);
116
+ return n ? /* @__PURE__ */ u.jsx(L, { ...e, velocityFactor: n }) : /* @__PURE__ */ u.jsx($, { ...e });
126
117
  }
127
118
  export {
128
- E as ScrollVelocityRow,
129
- E as default,
130
- V as wrap
119
+ U as ScrollVelocityRow,
120
+ U as default,
121
+ Y as wrap
131
122
  };
@@ -1,41 +1,41 @@
1
- import { j as t } from "../jsx-runtime-OVHDjVDe.js";
2
- import { forwardRef as z, useState as f } from "react";
3
- import { c as O } from "../createSvgIcon-DxwgGAVe.js";
4
- import { Select as E, ListSubheader as F, TextField as M, InputAdornment as T, MenuItem as p, Box as h } from "@mui/material";
5
- import { SForm as B } from "../s-form/s-form.js";
6
- const D = O(/* @__PURE__ */ t.jsx("path", {
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-BKymXuBG.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", {
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"), x = z(
8
+ }), "Search"), N = A(
9
9
  ({
10
- options: r = [],
11
- optionLabel: _ = "name",
12
- optionValue: b = "id",
13
- placeholder: g,
14
- label: m = "",
15
- error: C,
10
+ options: l = [],
11
+ optionLabel: S = "name",
12
+ optionValue: y = "id",
13
+ placeholder: x,
14
+ label: C = "",
15
+ error: b,
16
16
  required: I = !1,
17
- variant: K = "outlined",
17
+ variant: R = "outlined",
18
18
  simple: w = !1,
19
19
  htmlFor: v,
20
- searchable: o = !1,
20
+ searchable: r = !1,
21
21
  searchPlaceholder: P = "",
22
- ...a
23
- }, N) => {
24
- const y = a.value !== void 0, [V, $] = f(a.multiple ? [] : null), A = y ? a.value : V, [c, S] = f(""), [L, j] = f(!1), s = (e) => String(typeof e == "string" || typeof e == "number" ? e : e[_]), l = (e) => typeof e == "string" || typeof e == "number" ? e : e[b], i = o && c ? r.filter((e) => s(e).toLowerCase().includes(c.toLowerCase())) : r;
25
- return /* @__PURE__ */ t.jsx(B, { error: C, label: m, required: I, htmlFor: v, children: /* @__PURE__ */ t.jsxs(
26
- E,
22
+ ...s
23
+ }, O) => {
24
+ const g = s.value !== void 0, [V, $] = f(s.multiple ? [] : null), L = g ? s.value : V, [u, h] = f(""), [k, j] = f(!1), a = (e) => String(typeof e == "string" || typeof e == "number" ? e : e[S]), o = (e) => typeof e == "string" || typeof e == "number" ? e : e[y], m = r && u ? l.filter((e) => a(e).toLowerCase().includes(u.toLowerCase())) : l;
25
+ return /* @__PURE__ */ t.jsx(D, { error: b, label: C, required: I, htmlFor: v, children: /* @__PURE__ */ t.jsxs(
26
+ F,
27
27
  {
28
28
  id: v,
29
29
  displayEmpty: !0,
30
30
  fullWidth: !0,
31
31
  defaultValue: "",
32
- ref: N,
33
- open: o ? L : void 0,
34
- onOpen: o ? () => j(!0) : void 0,
35
- onClose: o ? () => {
36
- j(!1), S("");
32
+ ref: O,
33
+ open: r ? k : void 0,
34
+ onOpen: r ? () => j(!0) : void 0,
35
+ onClose: r ? () => {
36
+ j(!1), h("");
37
37
  } : void 0,
38
- MenuProps: o ? {
38
+ MenuProps: r ? {
39
39
  autoFocus: !1,
40
40
  PaperProps: {
41
41
  onKeyDown: (e) => {
@@ -43,41 +43,41 @@ const D = O(/* @__PURE__ */ t.jsx("path", {
43
43
  }
44
44
  }
45
45
  } : void 0,
46
- renderValue: a.multiple ? (e) => {
46
+ renderValue: s.multiple ? (e) => {
47
47
  const n = e;
48
- return n.length === 0 ? /* @__PURE__ */ t.jsx(h, { component: "span", sx: { color: "divider" }, children: g }) : n == null ? void 0 : n.map((d) => {
49
- const u = r.find((k) => l(k) === l(d));
50
- return u ? s(u) : "";
48
+ return n.length === 0 ? /* @__PURE__ */ t.jsx(p, { component: "span", sx: { color: "divider" }, children: x }) : n?.map((i) => {
49
+ const d = l.find((z) => o(z) === o(i));
50
+ return d ? a(d) : "";
51
51
  }).filter(Boolean).join(", ");
52
52
  } : (e) => {
53
53
  const n = e;
54
54
  if (n == null || n === "")
55
- return /* @__PURE__ */ t.jsx(h, { component: "span", sx: { color: "divider" }, children: g });
55
+ return /* @__PURE__ */ t.jsx(p, { component: "span", sx: { color: "divider" }, children: x });
56
56
  if (w)
57
- return s(n);
58
- const d = r.find((u) => l(u) === l(n));
59
- return d ? s(d) : "";
57
+ return a(n);
58
+ const i = l.find((d) => o(d) === o(n));
59
+ return i ? a(i) : "";
60
60
  },
61
- ...a,
62
- value: r.length ? A ?? "" : "",
61
+ ...s,
62
+ value: l.length ? L ?? "" : "",
63
63
  onChange: (e, n) => {
64
- if (a.onChange)
65
- a.onChange(e, n);
66
- else if (!y) {
67
- const d = e.target.value;
68
- $(d);
64
+ if (s.onChange)
65
+ s.onChange(e, n);
66
+ else if (!g) {
67
+ const i = e.target.value;
68
+ $(i);
69
69
  }
70
70
  },
71
71
  children: [
72
- o && /* @__PURE__ */ t.jsx(F, { sx: { px: 2, py: 1, position: "sticky", top: 0, bgcolor: "background.paper", zIndex: 1 }, children: /* @__PURE__ */ t.jsx(
73
- M,
72
+ r && /* @__PURE__ */ t.jsx(M, { sx: { px: 2, py: 1, position: "sticky", top: 0, bgcolor: "background.paper", zIndex: 1 }, children: /* @__PURE__ */ t.jsx(
73
+ T,
74
74
  {
75
75
  size: "small",
76
76
  fullWidth: !0,
77
77
  autoFocus: !0,
78
78
  placeholder: P,
79
- value: c,
80
- onChange: (e) => S(e.target.value),
79
+ value: u,
80
+ onChange: (e) => h(e.target.value),
81
81
  onKeyDown: (e) => {
82
82
  e.key !== "Escape" && e.stopPropagation();
83
83
  },
@@ -85,50 +85,42 @@ const D = O(/* @__PURE__ */ t.jsx("path", {
85
85
  e.stopPropagation();
86
86
  },
87
87
  InputProps: {
88
- startAdornment: /* @__PURE__ */ t.jsx(T, { position: "start", children: /* @__PURE__ */ t.jsx(D, { fontSize: "small" }) })
88
+ startAdornment: /* @__PURE__ */ t.jsx(B, { position: "start", children: /* @__PURE__ */ t.jsx(K, { fontSize: "small" }) })
89
89
  }
90
90
  }
91
91
  ) }),
92
- o ? (i == null ? void 0 : i.length) > 0 ? i.map((e, n) => /* @__PURE__ */ t.jsx(
93
- p,
92
+ r ? m?.length > 0 ? m.map((e, n) => /* @__PURE__ */ t.jsx(
93
+ c,
94
94
  {
95
- disabled: (e == null ? void 0 : e.disabled) ?? !1,
96
- value: l(e),
97
- children: s(e)
95
+ disabled: e?.disabled ?? !1,
96
+ value: o(e),
97
+ children: a(e)
98
98
  },
99
- `${l(e)}-${n}`
100
- )) : c ? /* @__PURE__ */ t.jsx(p, { disabled: !0, children: /* @__PURE__ */ t.jsx(h, { sx: { color: "text.secondary", textAlign: "center", width: "100%" }, children: "No results found" }) }) : r == null ? void 0 : r.map((e, n) => /* @__PURE__ */ t.jsx(
101
- p,
99
+ `${o(e)}-${n}`
100
+ )) : u ? /* @__PURE__ */ t.jsx(c, { disabled: !0, children: /* @__PURE__ */ t.jsx(p, { sx: { color: "text.secondary", textAlign: "center", width: "100%" }, children: "No results found" }) }) : l?.map((e, n) => /* @__PURE__ */ t.jsx(
101
+ c,
102
102
  {
103
- disabled: (e == null ? void 0 : e.disabled) ?? !1,
104
- value: l(e),
105
- children: s(e)
103
+ disabled: e?.disabled ?? !1,
104
+ value: o(e),
105
+ children: a(e)
106
106
  },
107
- `${l(e)}-${n}`
108
- )) : r == null ? void 0 : r.map((e, n) => /* @__PURE__ */ t.jsx(
109
- p,
107
+ `${o(e)}-${n}`
108
+ )) : l?.map((e, n) => /* @__PURE__ */ t.jsx(
109
+ c,
110
110
  {
111
- disabled: (e == null ? void 0 : e.disabled) ?? !1,
112
- value: l(e),
113
- children: s(e)
111
+ disabled: e?.disabled ?? !1,
112
+ value: o(e),
113
+ children: a(e)
114
114
  },
115
- `${l(e)}-${n}`
115
+ `${o(e)}-${n}`
116
116
  ))
117
117
  ]
118
118
  }
119
119
  ) });
120
120
  }
121
121
  );
122
- x.displayName = "SSelect";
123
- try {
124
- x.displayName = "SSelect", x.__docgenInfo = { description: "A flexible select component that handles both primitive and object options with form integration.", displayName: "SSelect", props: {} };
125
- } catch {
126
- }
127
- try {
128
- sselect.displayName = "sselect", sselect.__docgenInfo = { description: "A flexible select component that handles both primitive and object options with form integration.", displayName: "sselect", props: {} };
129
- } catch {
130
- }
122
+ N.displayName = "SSelect";
131
123
  export {
132
- x as SSelect,
133
- x as default
124
+ N as SSelect,
125
+ N as default
134
126
  };
@@ -1,31 +1,31 @@
1
- import { j as t } from "../jsx-runtime-OVHDjVDe.js";
2
- import { styled as u, Box as a, Stack as m, Radio as f, Collapse as y } from "@mui/material";
3
- const S = u(a, {
4
- shouldForwardProp: (e) => e !== "selected"
5
- })(({ theme: e, selected: d }) => ({
1
+ import { j as e } from "../jsx-runtime-tc70JA_2.js";
2
+ import { styled as p, Box as i, Stack as x, Radio as g, Collapse as j } from "@mui/material";
3
+ const u = p(i, {
4
+ shouldForwardProp: (s) => s !== "selected"
5
+ })(({ theme: s, selected: a }) => ({
6
6
  display: "flex",
7
7
  alignItems: "center",
8
8
  justifyContent: "space-between",
9
9
  borderRadius: 8,
10
- padding: e.spacing(1),
11
- paddingLeft: e.spacing(2),
12
- paddingRight: e.spacing(2),
10
+ padding: s.spacing(1),
11
+ paddingLeft: s.spacing(2),
12
+ paddingRight: s.spacing(2),
13
13
  border: "1px solid",
14
14
  cursor: "pointer",
15
- borderColor: d ? (e.vars || e).palette.primary.dark : (e.vars || e).palette.divider
16
- })), i = ({
17
- items: e,
18
- selectedId: d,
19
- onSelect: o,
20
- renderItem: s,
21
- renderBelow: l,
22
- showRadio: c = !0
23
- }) => /* @__PURE__ */ t.jsx(m, { spacing: 2, children: e.map((r) => {
24
- const n = r.id === d, p = l && n;
25
- return /* @__PURE__ */ t.jsxs(a, { children: [
26
- /* @__PURE__ */ t.jsxs(S, { selected: n, onClick: () => o(r.id), children: [
27
- /* @__PURE__ */ t.jsx(
28
- a,
15
+ borderColor: a ? (s.vars || s).palette.primary.dark : (s.vars || s).palette.divider
16
+ })), f = ({
17
+ items: s,
18
+ selectedId: a,
19
+ onSelect: t,
20
+ renderItem: l,
21
+ renderBelow: n,
22
+ showRadio: o = !0
23
+ }) => /* @__PURE__ */ e.jsx(x, { spacing: 2, children: s.map((r) => {
24
+ const d = r.id === a, c = n && d;
25
+ return /* @__PURE__ */ e.jsxs(i, { children: [
26
+ /* @__PURE__ */ e.jsxs(u, { selected: d, onClick: () => t(r.id), children: [
27
+ /* @__PURE__ */ e.jsx(
28
+ i,
29
29
  {
30
30
  sx: {
31
31
  display: "flex",
@@ -34,20 +34,16 @@ const S = u(a, {
34
34
  flex: 1,
35
35
  borderRadius: 8
36
36
  },
37
- children: s(r, n)
37
+ children: l(r, d)
38
38
  }
39
39
  ),
40
- c && /* @__PURE__ */ t.jsx(f, { checked: n })
40
+ o && /* @__PURE__ */ e.jsx(g, { checked: d })
41
41
  ] }),
42
- p && /* @__PURE__ */ t.jsx(y, { in: n, children: /* @__PURE__ */ t.jsx(a, { mt: 2, children: l(r) }) })
42
+ c && /* @__PURE__ */ e.jsx(j, { in: d, children: /* @__PURE__ */ e.jsx(i, { mt: 2, children: n(r) }) })
43
43
  ] }, r.id);
44
44
  }) });
45
- i.displayName = "SSelectList";
46
- try {
47
- i.displayName = "SSelectList", i.__docgenInfo = { description: "A selectable list component with radio buttons and optional expandable content.", displayName: "SSelectList", props: { items: { defaultValue: null, description: "Array of items to render", name: "items", required: !0, type: { name: "SSelectListItem<T>[]" } }, selectedId: { defaultValue: null, description: "ID of the currently selected item", name: "selectedId", required: !0, type: { name: "string" } }, onSelect: { defaultValue: null, description: "Callback when an item is selected", name: "onSelect", required: !0, type: { name: "(id: string) => void" } }, renderItem: { defaultValue: null, description: "Function to render the content of each item", name: "renderItem", required: !0, type: { name: "(item: SSelectListItem<T>, selected: boolean) => ReactNode" } }, renderBelow: { defaultValue: null, description: "Optional function to render content below the selected item", name: "renderBelow", required: !1, type: { name: "((item: SSelectListItem<T>) => ReactNode)" } }, showRadio: { defaultValue: { value: "true" }, description: "Whether to show a radio button (default: true)", name: "showRadio", required: !1, type: { name: "boolean" } } } };
48
- } catch {
49
- }
45
+ f.displayName = "SSelectList";
50
46
  export {
51
- i as SSelectList,
52
- i as default
47
+ f as SSelectList,
48
+ f as default
53
49
  };
@@ -1,44 +1,36 @@
1
- import { j as t } from "../jsx-runtime-OVHDjVDe.js";
1
+ import { j as e } from "../jsx-runtime-tc70JA_2.js";
2
2
  import { Skeleton as a } from "@mui/material";
3
- const o = ({
4
- variant: n = "text",
5
- width: r = "100%",
3
+ const h = ({
4
+ variant: r = "text",
5
+ width: i = "100%",
6
6
  height: u = 32,
7
- fontSize: i = "16px",
8
- component: l,
9
- ...e
7
+ fontSize: n = "16px",
8
+ component: x,
9
+ ...t
10
10
  }) => {
11
- switch (l) {
11
+ switch (x) {
12
12
  case "button":
13
- return /* @__PURE__ */ t.jsx(a, { height: 32, variant: "rounded", width: r, ...e });
13
+ return /* @__PURE__ */ e.jsx(a, { height: 32, variant: "rounded", width: i, ...t });
14
14
  case "checkbox":
15
- return /* @__PURE__ */ t.jsx(a, { height: 24, variant: "rounded", width: 24, ...e });
15
+ return /* @__PURE__ */ e.jsx(a, { height: 24, variant: "rounded", width: 24, ...t });
16
16
  case "radio-button":
17
- return /* @__PURE__ */ t.jsx(a, { height: 24, variant: "circular", width: 24, ...e });
17
+ return /* @__PURE__ */ e.jsx(a, { height: 24, variant: "circular", width: 24, ...t });
18
18
  case "avatar":
19
- return /* @__PURE__ */ t.jsx(a, { height: 54, variant: "rectangular", width: 54, ...e });
19
+ return /* @__PURE__ */ e.jsx(a, { height: 54, variant: "rectangular", width: 54, ...t });
20
20
  case "rounded-avatar":
21
- return /* @__PURE__ */ t.jsx(a, { height: 48, variant: "circular", width: 48, ...e });
21
+ return /* @__PURE__ */ e.jsx(a, { height: 48, variant: "circular", width: 48, ...t });
22
22
  case "icon-button":
23
- return /* @__PURE__ */ t.jsx(a, { height: 32, variant: "circular", width: 32, ...e });
23
+ return /* @__PURE__ */ e.jsx(a, { height: 32, variant: "circular", width: 32, ...t });
24
24
  case "typography":
25
- return /* @__PURE__ */ t.jsx(a, { sx: { fontSize: i }, variant: "text", width: "100%", ...e });
25
+ return /* @__PURE__ */ e.jsx(a, { sx: { fontSize: n }, variant: "text", width: "100%", ...t });
26
26
  case "title-typography":
27
- return /* @__PURE__ */ t.jsx(a, { sx: { fontSize: i }, variant: "text", width: 200, ...e });
27
+ return /* @__PURE__ */ e.jsx(a, { sx: { fontSize: n }, variant: "text", width: 200, ...t });
28
28
  default:
29
- return n === "text" ? /* @__PURE__ */ t.jsx(a, { sx: { fontSize: i }, variant: n, width: r, ...e }) : /* @__PURE__ */ t.jsx(a, { height: u, variant: n, width: r, ...e });
29
+ return r === "text" ? /* @__PURE__ */ e.jsx(a, { sx: { fontSize: n }, variant: r, width: i, ...t }) : /* @__PURE__ */ e.jsx(a, { height: u, variant: r, width: i, ...t });
30
30
  }
31
31
  };
32
- o.displayName = "SSkeleton";
33
- try {
34
- o.displayName = "SSkeleton", o.__docgenInfo = { description: "An enhanced skeleton loading component with pre-defined component presets for consistent loading states.", displayName: "SSkeleton", props: { variant: { defaultValue: { value: "text" }, description: "Visual variant of the skeleton", name: "variant", required: !1, type: { name: "enum", value: [{ value: '"text"' }, { value: '"rectangular"' }, { value: '"rounded"' }, { value: '"circular"' }] } }, height: { defaultValue: { value: "32" }, description: "Height of the skeleton (number for px, string for CSS units)", name: "height", required: !1, type: { name: "string | number" } }, width: { defaultValue: { value: "100%" }, description: "Width of the skeleton (number for px, string for CSS units)", name: "width", required: !1, type: { name: "string | number" } }, fontSize: { defaultValue: { value: "16px" }, description: "Font size for text variant skeletons", name: "fontSize", required: !1, type: { name: "string | number" } }, component: { defaultValue: null, description: "Pre-defined component preset for common UI elements", name: "component", required: !1, type: { name: "enum", value: [{ value: '"typography"' }, { value: '"button"' }, { value: '"checkbox"' }, { value: '"radio-button"' }, { value: '"avatar"' }, { value: '"rounded-avatar"' }, { value: '"icon-button"' }, { value: '"title-typography"' }] } } } };
35
- } catch {
36
- }
37
- try {
38
- sskeleton.displayName = "sskeleton", sskeleton.__docgenInfo = { description: "An enhanced skeleton loading component with pre-defined component presets for consistent loading states.", displayName: "sskeleton", props: { variant: { defaultValue: { value: "text" }, description: "Visual variant of the skeleton", name: "variant", required: !1, type: { name: "enum", value: [{ value: '"text"' }, { value: '"rectangular"' }, { value: '"rounded"' }, { value: '"circular"' }] } }, height: { defaultValue: { value: "32" }, description: "Height of the skeleton (number for px, string for CSS units)", name: "height", required: !1, type: { name: "string | number" } }, width: { defaultValue: { value: "100%" }, description: "Width of the skeleton (number for px, string for CSS units)", name: "width", required: !1, type: { name: "string | number" } }, fontSize: { defaultValue: { value: "16px" }, description: "Font size for text variant skeletons", name: "fontSize", required: !1, type: { name: "string | number" } }, component: { defaultValue: null, description: "Pre-defined component preset for common UI elements", name: "component", required: !1, type: { name: "enum", value: [{ value: '"typography"' }, { value: '"button"' }, { value: '"checkbox"' }, { value: '"radio-button"' }, { value: '"avatar"' }, { value: '"rounded-avatar"' }, { value: '"icon-button"' }, { value: '"title-typography"' }] } } } };
39
- } catch {
40
- }
32
+ h.displayName = "SSkeleton";
41
33
  export {
42
- o as SSkeleton,
43
- o as default
34
+ h as SSkeleton,
35
+ h as default
44
36
  };