@solostylist/ui-kit 1.0.174 → 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.
- package/dist/{ArrowUpward-DhTFpzoh.js → ArrowUpward-CEeqSc-C.js} +2 -2
- package/dist/{Box-Ha0cQ4KO.js → Box-CE3rycd-.js} +5 -5
- package/dist/ButtonBase-C_YYB9Ry.js +1099 -0
- package/dist/{ChevronLeft-CBuFk2Fh.js → ChevronLeft-6gdh4lRt.js} +2 -2
- package/dist/{ChevronRight-CnDWPrOm.js → ChevronRight-CC3l-wPC.js} +2 -2
- package/dist/{Close-BRlEKA2Q.js → Close-DOHlPcFK.js} +2 -2
- package/dist/{ContentCopy-7nFBtjhs.js → ContentCopy-2xxDThyB.js} +2 -2
- package/dist/DefaultPropsProvider-sk0uWcA6.js +64 -0
- package/dist/{Download-UsLvGg3y.js → Download-Chao5NQl.js} +2 -2
- package/dist/{ExpandMore-DTWX_mHf.js → ExpandMore-DIGPB4Mj.js} +2 -2
- package/dist/{Favorite-DS5Gpq2s.js → Favorite-wp65zwWq.js} +2 -2
- package/dist/{Menu-CWq-a1Wz.js → Menu-DZYzE2Mg.js} +908 -906
- package/dist/{MenuItem-DY_qFSPR.js → MenuItem-BXiIhfBS.js} +26 -25
- package/dist/Paper-DnctZB5U.js +689 -0
- package/dist/{Select-DabtQlJT.js → Select-DY7XGVsv.js} +2152 -2115
- package/dist/{Stack-Cq2r2NmC.js → Stack-BScsuyQy.js} +6 -6
- package/dist/{Typography-C8jwvSWe.js → Typography-9Kg27dDw.js} +84 -86
- package/dist/{_commonjsHelpers-B4e78b8K.js → _commonjsHelpers-ByX85dGu.js} +18 -13
- package/dist/assets/s-overlay-scrollbar.css +1 -9
- package/dist/createSvgIcon-BKymXuBG.js +242 -0
- package/dist/{createTheme-3Wd3hHrj.js → createTheme-f5g1s6ww.js} +859 -906
- package/dist/defaultTheme-LSr-S9un.js +5 -0
- package/dist/entries/carousel.d.ts +10 -0
- package/dist/entries/carousel.js +4 -0
- package/dist/entries/chat.d.ts +9 -0
- package/dist/entries/chat.js +4 -0
- package/dist/entries/code.d.ts +9 -0
- package/dist/entries/code.js +4 -0
- package/dist/entries/core.d.ts +100 -0
- package/dist/entries/core.js +122 -0
- package/dist/entries/dates.d.ts +16 -0
- package/dist/entries/dates.js +12 -0
- package/dist/entries/dropzone.d.ts +9 -0
- package/dist/entries/dropzone.js +4 -0
- package/dist/entries/editor.d.ts +12 -0
- package/dist/entries/editor.js +4 -0
- package/dist/entries/gallery.d.ts +17 -0
- package/dist/entries/gallery.js +13 -0
- package/dist/entries/i18n.d.ts +13 -0
- package/dist/entries/i18n.js +8 -0
- package/dist/entries/motion.d.ts +29 -0
- package/dist/entries/motion.js +28 -0
- package/dist/entries/scrollbar.d.ts +9 -0
- package/dist/entries/scrollbar.js +4 -0
- package/dist/entries/stripe.d.ts +10 -0
- package/dist/entries/stripe.js +10 -0
- package/dist/extendSxProp-DitxZ8We.js +36 -0
- package/dist/hooks/index.js +8 -9
- package/dist/hooks/use-is-passed-position.js +10 -10
- package/dist/{index-BGvzecIA.js → index-D3G5Rwl-.js} +0 -7
- package/dist/{index-CfKHZ86U.js → index-DtYP8YE7.js} +12 -13
- package/dist/{jsx-runtime-OVHDjVDe.js → jsx-runtime-tc70JA_2.js} +108 -128
- package/dist/main.d.ts +29 -145
- package/dist/main.js +187 -187
- package/dist/mergeSlotProps-CuzBQdlp.js +62 -0
- package/dist/resolveProps-BDH0VJjn.js +39 -0
- package/dist/s-accordion/package.json +5 -5
- package/dist/s-accordion/s-accordion.js +374 -358
- package/dist/s-action-overlay/package.json +5 -5
- package/dist/s-action-overlay/s-action-overlay.js +64 -79
- package/dist/s-ai-tool-bar/package.json +5 -5
- package/dist/s-ai-tool-bar/s-ai-tool-bar.js +260 -275
- package/dist/s-autocomplete/s-autocomplete.js +19 -25
- package/dist/s-avatar/package.json +5 -5
- package/dist/s-avatar/s-avatar.js +14 -25
- package/dist/s-blur-text/package.json +5 -5
- package/dist/s-blur-text/s-blur-text.js +55 -59
- package/dist/s-breadcrumbs/package.json +5 -5
- package/dist/s-breadcrumbs/s-breadcrumbs.js +31 -39
- package/dist/s-button/package.json +5 -5
- package/dist/s-button/s-button.js +7 -15
- package/dist/s-button-link/s-button-link.js +28 -36
- package/dist/s-carousel/package.json +4 -4
- package/dist/s-carousel/s-carousel.js +267 -280
- package/dist/s-category-card/package.json +4 -4
- package/dist/s-category-card/s-category-card.js +60 -77
- package/dist/s-chat-input/package.json +5 -5
- package/dist/s-chat-input/s-chat-input.d.ts +4 -0
- package/dist/s-chat-input/s-chat-input.js +103 -109
- package/dist/s-chat-message/s-chat-message.js +111 -120
- package/dist/s-checkbox/s-checkbox.js +12 -20
- package/dist/s-chip/package.json +5 -5
- package/dist/s-chip/s-chip.js +7 -15
- package/dist/s-chips/s-chips.js +47 -56
- package/dist/s-code-block/package.json +5 -5
- package/dist/s-code-block/s-code-block.js +35 -43
- package/dist/s-comment-message/package.json +5 -5
- package/dist/s-comment-message/s-comment-message.js +90 -94
- package/dist/s-copyable-text/s-copyable-text.js +24 -32
- package/dist/s-countdown/s-count-box.js +42 -50
- package/dist/s-countdown/s-count-down.js +79 -107
- package/dist/s-data-table/s-data-table.js +374 -384
- package/dist/s-date-picker/s-date-picker.js +164 -164
- package/dist/s-datetime-picker/s-datetime-picker.js +1599 -1603
- package/dist/s-dialog/s-dialog.js +24 -32
- package/dist/s-dialog-confirm/s-dialog-confirm.js +46 -50
- package/dist/s-dialog-message/s-dialog-message.js +40 -44
- package/dist/s-empty/s-empty.js +6 -14
- package/dist/s-error/s-error.js +9 -17
- package/dist/s-error-layout/s-error-layout.js +38 -47
- package/dist/s-file-dropzone/s-file-dropzone.js +55 -64
- package/dist/s-file-icon/s-file-icon.js +9 -13
- package/dist/s-flex-box/s-flex-box.js +6 -14
- package/dist/s-form/s-form.js +11 -19
- package/dist/s-gallery/index.js +3 -33
- package/dist/s-gallery/s-gallery.js +91 -114
- package/dist/s-glow-button/s-glow-button.js +22 -26
- package/dist/s-gradient-icon/s-gradient-icon.js +49 -59
- package/dist/s-i18n-provider/s-i18n-provider.js +17 -25
- package/dist/s-icon-button/s-icon-button.js +6 -14
- package/dist/s-image-comparison/package.json +5 -5
- package/dist/s-image-comparison/s-image-comparison.js +48 -53
- package/dist/s-image-modal/package.json +5 -5
- package/dist/s-image-modal/s-image-modal.js +137 -150
- package/dist/s-item-not-found/s-item-not-found.js +13 -22
- package/dist/s-label/s-label.js +12 -20
- package/dist/s-language-switcher/s-language-switcher.js +119 -141
- package/dist/s-lazy-image/index.js +2 -10
- package/dist/s-lazy-image/s-lazy-image.js +33 -37
- package/dist/s-localization-provider/s-localization-provider.js +368 -380
- package/dist/s-moving-border/s-moving-border.js +52 -67
- package/dist/s-multi-select/s-multi-select.js +43 -51
- package/dist/s-no-ssr/s-no-ssr.js +13 -21
- package/dist/s-overlay-scrollbar/s-overlay-scrollbar.js +12 -16
- package/dist/s-pagination/s-pagination.js +13 -17
- package/dist/s-pixel-reveal/package.json +5 -5
- package/dist/s-pixel-reveal/s-pixel-reveal.js +92 -99
- package/dist/s-radial-pulse-animate/package.json +5 -5
- package/dist/s-radial-pulse-animate/s-radial-pulse-animate.js +40 -48
- package/dist/s-rating/package.json +5 -5
- package/dist/s-rating/s-rating.js +7 -15
- package/dist/s-review/package.json +5 -5
- package/dist/s-review/s-review.js +101 -106
- package/dist/s-scroll-reveal/package.json +5 -5
- package/dist/s-scroll-reveal/s-scroll-reveal.js +40 -48
- package/dist/s-scroll-to-top/package.json +5 -5
- package/dist/s-scroll-to-top/s-scroll-to-top.js +20 -30
- package/dist/s-scroll-velocity/package.json +5 -5
- package/dist/s-scroll-velocity/s-scroll-velocity.js +5 -19
- package/dist/s-scroll-velocity/scroll-velocity-container.js +18 -27
- package/dist/s-scroll-velocity/scroll-velocity-row.js +62 -71
- package/dist/s-select/s-select.js +67 -75
- package/dist/s-select-list/s-select-list.js +28 -32
- package/dist/s-skeleton/s-skeleton.js +20 -28
- package/dist/s-snackbar-message/s-snackbar-message.js +36 -40
- package/dist/s-spotlight-cursor/s-spotlight-cursor.js +31 -35
- package/dist/s-stripe/s-stripe-cvc.js +8 -12
- package/dist/s-stripe/s-stripe-expiry.js +8 -12
- package/dist/s-stripe/s-stripe-number.js +8 -12
- package/dist/s-stripe/s-stripe.d.ts +2 -2
- package/dist/s-stripe/s-stripe.js +17 -26
- package/dist/s-stripe/stripe-input.js +25 -29
- package/dist/s-tabs/package.json +3 -3
- package/dist/s-tabs/s-tab-panel.js +17 -25
- package/dist/s-tabs/s-tab.js +5 -9
- package/dist/s-tabs/s-tabs.js +19 -27
- package/dist/s-text-editor/s-text-editor-toolbar.js +73 -88
- package/dist/s-text-editor/s-text-editor.js +33 -45
- package/dist/s-text-field/s-text-field.js +31 -40
- package/dist/s-text-shimmer/package.json +4 -4
- package/dist/s-text-shimmer/s-text-shimmer.js +19 -27
- package/dist/s-text-truncation/s-text-truncation.js +24 -32
- package/dist/s-theme-demo/package.json +5 -5
- package/dist/s-theme-demo/s-theme-demo.js +219 -234
- package/dist/s-theme-provider/s-theme-provider.js +37 -45
- package/dist/s-theme-switch/package.json +4 -4
- package/dist/s-theme-switch/s-theme-switch.js +19 -23
- package/dist/s-tip/s-tip.js +14 -22
- package/dist/s-two-pane-layout/index.js +2 -10
- package/dist/s-two-pane-layout/s-two-pane-layout.js +47 -55
- package/dist/s-typewriter-text/package.json +5 -5
- package/dist/s-typewriter-text/s-typewriter-text.js +27 -35
- package/dist/s-zoom-image/index.js +2 -10
- package/dist/s-zoom-image/package.json +5 -5
- package/dist/s-zoom-image/s-zoom-image.js +53 -62
- package/dist/styled-B0KflPi-.js +203 -0
- package/dist/theme/components/alert.d.ts +484 -264
- package/dist/theme/components/avatar.js +2 -2
- package/dist/theme/components/button.d.ts +726 -396
- package/dist/theme/components/chip.js +2 -2
- package/dist/theme/components/components.js +14 -12
- package/dist/theme/components/icon-button.d.ts +6191 -0
- package/dist/theme/components/icon-button.js +90 -0
- package/dist/theme/customizations/data-display.js +1 -1
- package/dist/theme/customizations/inputs.js +2 -2
- package/dist/theme/customizations/navigation.js +2 -2
- package/dist/theme/theme-primitives.d.ts +8 -246
- package/dist/theme/theme-primitives.js +76 -87
- package/dist/{typographyClasses-DDyl9mok.js → typographyClasses-C7fhAsUD.js} +4 -4
- package/dist/{useMobilePicker-C1RZZUWr.js → useMobilePicker-C4AYe0Ch.js} +11249 -11231
- package/dist/{useTheme-B5czKfC4.js → useTheme-CtdhfT4P.js} +1 -1
- package/dist/{useThemeProps-DqA5BinV.js → useThemeProps-_apS-Aua.js} +2 -2
- package/dist/utils/dayjs.js +7 -7
- package/dist/utils/logger.js +29 -32
- package/dist/{warning-BCwEnWrE.js → warning-DnPRVtW6.js} +4 -4
- package/package.json +240 -81
- package/README.md +0 -13
- package/dist/ButtonBase-DfTfJ_ou.js +0 -1105
- package/dist/DefaultPropsProvider-CaCsvQaq.js +0 -78
- package/dist/Paper-hkbPWyBT.js +0 -553
- package/dist/createSvgIcon-DxwgGAVe.js +0 -247
- package/dist/defaultTheme-fEi1x1Gb.js +0 -5
- package/dist/extendSxProp-BKWjdW12.js +0 -37
- package/dist/mergeSlotProps-Dl_rJtoN.js +0 -62
- package/dist/resolveProps-61uUKnlS.js +0 -52
- package/dist/styled-B0Z4EDy9.js +0 -206
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
import { j as u } from "../jsx-runtime-
|
|
2
|
-
import { useContext as
|
|
3
|
-
import { Box as
|
|
4
|
-
import { useMotionValue as
|
|
5
|
-
import { ScrollVelocityContext as
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
return ((
|
|
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
|
|
10
|
+
function L({
|
|
11
11
|
children: e,
|
|
12
12
|
baseVelocity: n = 5,
|
|
13
|
-
direction:
|
|
14
|
-
sx:
|
|
15
|
-
velocityFactor:
|
|
16
|
-
...
|
|
13
|
+
direction: i = 1,
|
|
14
|
+
sx: s,
|
|
15
|
+
velocityFactor: g,
|
|
16
|
+
...b
|
|
17
17
|
}) {
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
const o =
|
|
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
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
|
|
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
|
|
32
|
-
|
|
31
|
+
const f = new IntersectionObserver(([h]) => {
|
|
32
|
+
S.current = h.isIntersecting;
|
|
33
33
|
});
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
|
|
34
|
+
f.observe(o);
|
|
35
|
+
const m = () => {
|
|
36
|
+
V.current = document.visibilityState === "visible";
|
|
37
37
|
};
|
|
38
|
-
document.addEventListener("visibilitychange",
|
|
38
|
+
document.addEventListener("visibilitychange", m, {
|
|
39
39
|
passive: !0
|
|
40
|
-
}),
|
|
41
|
-
const a = window.matchMedia("(prefers-reduced-motion: reduce)"),
|
|
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",
|
|
45
|
-
r.disconnect(),
|
|
44
|
+
return a.addEventListener("change", d), d(), () => {
|
|
45
|
+
r.disconnect(), f.disconnect(), document.removeEventListener("visibilitychange", m), a.removeEventListener("change", d);
|
|
46
46
|
};
|
|
47
|
-
}, [e,
|
|
48
|
-
const
|
|
47
|
+
}, [e, y]);
|
|
48
|
+
const N = F([w, y], ([o, t]) => {
|
|
49
49
|
const l = Number(t) || 1, r = Number(o) || 0;
|
|
50
|
-
return `${-
|
|
50
|
+
return `${-Y(0, l, r)}px`;
|
|
51
51
|
});
|
|
52
|
-
return
|
|
53
|
-
if (!
|
|
54
|
-
const l = t / 1e3, r =
|
|
55
|
-
if (
|
|
56
|
-
const
|
|
57
|
-
|
|
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 =
|
|
59
|
+
const a = y.get() || 0;
|
|
60
60
|
if (a <= 0) return;
|
|
61
|
-
const
|
|
62
|
-
|
|
61
|
+
const d = a * n / 100, h = R.current * d * m * l;
|
|
62
|
+
w.set(w.get() + h);
|
|
63
63
|
}), /* @__PURE__ */ u.jsx(
|
|
64
|
-
|
|
64
|
+
E,
|
|
65
65
|
{
|
|
66
|
-
ref:
|
|
66
|
+
ref: x,
|
|
67
67
|
sx: {
|
|
68
68
|
width: "100%",
|
|
69
69
|
overflow: "hidden",
|
|
70
70
|
whiteSpace: "nowrap",
|
|
71
|
-
...
|
|
71
|
+
...s
|
|
72
72
|
},
|
|
73
|
-
...
|
|
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:
|
|
82
|
+
x: N
|
|
83
83
|
},
|
|
84
|
-
children: Array.from({ length:
|
|
85
|
-
|
|
84
|
+
children: Array.from({ length: k }).map((o, t) => /* @__PURE__ */ u.jsx(
|
|
85
|
+
E,
|
|
86
86
|
{
|
|
87
|
-
ref: t === 0 ?
|
|
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
|
|
105
|
-
const { scrollY: n } =
|
|
104
|
+
function $(e) {
|
|
105
|
+
const { scrollY: n } = _(), i = q(n), s = T(i, {
|
|
106
106
|
damping: 50,
|
|
107
107
|
stiffness: 400
|
|
108
|
-
}),
|
|
109
|
-
const
|
|
110
|
-
return
|
|
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(
|
|
112
|
+
return /* @__PURE__ */ u.jsx(L, { ...e, velocityFactor: g });
|
|
113
113
|
}
|
|
114
|
-
function
|
|
115
|
-
const n =
|
|
116
|
-
return n ? /* @__PURE__ */ u.jsx(
|
|
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
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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-
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { Select as
|
|
5
|
-
import { SForm as
|
|
6
|
-
const
|
|
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"),
|
|
8
|
+
}), "Search"), N = A(
|
|
9
9
|
({
|
|
10
|
-
options:
|
|
11
|
-
optionLabel:
|
|
12
|
-
optionValue:
|
|
13
|
-
placeholder:
|
|
14
|
-
label:
|
|
15
|
-
error:
|
|
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:
|
|
17
|
+
variant: R = "outlined",
|
|
18
18
|
simple: w = !1,
|
|
19
19
|
htmlFor: v,
|
|
20
|
-
searchable:
|
|
20
|
+
searchable: r = !1,
|
|
21
21
|
searchPlaceholder: P = "",
|
|
22
|
-
...
|
|
23
|
-
},
|
|
24
|
-
const
|
|
25
|
-
return /* @__PURE__ */ t.jsx(
|
|
26
|
-
|
|
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:
|
|
33
|
-
open:
|
|
34
|
-
onOpen:
|
|
35
|
-
onClose:
|
|
36
|
-
j(!1),
|
|
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:
|
|
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:
|
|
46
|
+
renderValue: s.multiple ? (e) => {
|
|
47
47
|
const n = e;
|
|
48
|
-
return n.length === 0 ? /* @__PURE__ */ t.jsx(
|
|
49
|
-
const
|
|
50
|
-
return
|
|
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(
|
|
55
|
+
return /* @__PURE__ */ t.jsx(p, { component: "span", sx: { color: "divider" }, children: x });
|
|
56
56
|
if (w)
|
|
57
|
-
return
|
|
58
|
-
const
|
|
59
|
-
return
|
|
57
|
+
return a(n);
|
|
58
|
+
const i = l.find((d) => o(d) === o(n));
|
|
59
|
+
return i ? a(i) : "";
|
|
60
60
|
},
|
|
61
|
-
...
|
|
62
|
-
value:
|
|
61
|
+
...s,
|
|
62
|
+
value: l.length ? L ?? "" : "",
|
|
63
63
|
onChange: (e, n) => {
|
|
64
|
-
if (
|
|
65
|
-
|
|
66
|
-
else if (!
|
|
67
|
-
const
|
|
68
|
-
$(
|
|
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
|
-
|
|
73
|
-
|
|
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:
|
|
80
|
-
onChange: (e) =>
|
|
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(
|
|
88
|
+
startAdornment: /* @__PURE__ */ t.jsx(B, { position: "start", children: /* @__PURE__ */ t.jsx(K, { fontSize: "small" }) })
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
) }),
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
r ? m?.length > 0 ? m.map((e, n) => /* @__PURE__ */ t.jsx(
|
|
93
|
+
c,
|
|
94
94
|
{
|
|
95
|
-
disabled:
|
|
96
|
-
value:
|
|
97
|
-
children:
|
|
95
|
+
disabled: e?.disabled ?? !1,
|
|
96
|
+
value: o(e),
|
|
97
|
+
children: a(e)
|
|
98
98
|
},
|
|
99
|
-
`${
|
|
100
|
-
)) :
|
|
101
|
-
|
|
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:
|
|
104
|
-
value:
|
|
105
|
-
children:
|
|
103
|
+
disabled: e?.disabled ?? !1,
|
|
104
|
+
value: o(e),
|
|
105
|
+
children: a(e)
|
|
106
106
|
},
|
|
107
|
-
`${
|
|
108
|
-
)) :
|
|
109
|
-
|
|
107
|
+
`${o(e)}-${n}`
|
|
108
|
+
)) : l?.map((e, n) => /* @__PURE__ */ t.jsx(
|
|
109
|
+
c,
|
|
110
110
|
{
|
|
111
|
-
disabled:
|
|
112
|
-
value:
|
|
113
|
-
children:
|
|
111
|
+
disabled: e?.disabled ?? !1,
|
|
112
|
+
value: o(e),
|
|
113
|
+
children: a(e)
|
|
114
114
|
},
|
|
115
|
-
`${
|
|
115
|
+
`${o(e)}-${n}`
|
|
116
116
|
))
|
|
117
117
|
]
|
|
118
118
|
}
|
|
119
119
|
) });
|
|
120
120
|
}
|
|
121
121
|
);
|
|
122
|
-
|
|
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
|
-
|
|
133
|
-
|
|
124
|
+
N as SSelect,
|
|
125
|
+
N as default
|
|
134
126
|
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { styled as
|
|
3
|
-
const
|
|
4
|
-
shouldForwardProp: (
|
|
5
|
-
})(({ theme:
|
|
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:
|
|
11
|
-
paddingLeft:
|
|
12
|
-
paddingRight:
|
|
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:
|
|
16
|
-
})),
|
|
17
|
-
items:
|
|
18
|
-
selectedId:
|
|
19
|
-
onSelect:
|
|
20
|
-
renderItem:
|
|
21
|
-
renderBelow:
|
|
22
|
-
showRadio:
|
|
23
|
-
}) => /* @__PURE__ */
|
|
24
|
-
const
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
|
|
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:
|
|
37
|
+
children: l(r, d)
|
|
38
38
|
}
|
|
39
39
|
),
|
|
40
|
-
|
|
40
|
+
o && /* @__PURE__ */ e.jsx(g, { checked: d })
|
|
41
41
|
] }),
|
|
42
|
-
|
|
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
|
-
|
|
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
|
-
|
|
52
|
-
|
|
47
|
+
f as SSelectList,
|
|
48
|
+
f as default
|
|
53
49
|
};
|
|
@@ -1,44 +1,36 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as e } from "../jsx-runtime-tc70JA_2.js";
|
|
2
2
|
import { Skeleton as a } from "@mui/material";
|
|
3
|
-
const
|
|
4
|
-
variant:
|
|
5
|
-
width:
|
|
3
|
+
const h = ({
|
|
4
|
+
variant: r = "text",
|
|
5
|
+
width: i = "100%",
|
|
6
6
|
height: u = 32,
|
|
7
|
-
fontSize:
|
|
8
|
-
component:
|
|
9
|
-
...
|
|
7
|
+
fontSize: n = "16px",
|
|
8
|
+
component: x,
|
|
9
|
+
...t
|
|
10
10
|
}) => {
|
|
11
|
-
switch (
|
|
11
|
+
switch (x) {
|
|
12
12
|
case "button":
|
|
13
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ e.jsx(a, { height: 32, variant: "rounded", width: i, ...t });
|
|
14
14
|
case "checkbox":
|
|
15
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ e.jsx(a, { height: 24, variant: "rounded", width: 24, ...t });
|
|
16
16
|
case "radio-button":
|
|
17
|
-
return /* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */ e.jsx(a, { height: 24, variant: "circular", width: 24, ...t });
|
|
18
18
|
case "avatar":
|
|
19
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ e.jsx(a, { height: 54, variant: "rectangular", width: 54, ...t });
|
|
20
20
|
case "rounded-avatar":
|
|
21
|
-
return /* @__PURE__ */
|
|
21
|
+
return /* @__PURE__ */ e.jsx(a, { height: 48, variant: "circular", width: 48, ...t });
|
|
22
22
|
case "icon-button":
|
|
23
|
-
return /* @__PURE__ */
|
|
23
|
+
return /* @__PURE__ */ e.jsx(a, { height: 32, variant: "circular", width: 32, ...t });
|
|
24
24
|
case "typography":
|
|
25
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ e.jsx(a, { sx: { fontSize: n }, variant: "text", width: "100%", ...t });
|
|
26
26
|
case "title-typography":
|
|
27
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ e.jsx(a, { sx: { fontSize: n }, variant: "text", width: 200, ...t });
|
|
28
28
|
default:
|
|
29
|
-
return
|
|
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
|
-
|
|
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
|
-
|
|
43
|
-
|
|
34
|
+
h as SSkeleton,
|
|
35
|
+
h as default
|
|
44
36
|
};
|