@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,94 +1,93 @@
|
|
|
1
|
-
import { j as e } from "../jsx-runtime-
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Box as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import "../s-lazy-image/index.js";
|
|
1
|
+
import { j as e } from "../jsx-runtime-tc70JA_2.js";
|
|
2
|
+
import { useState as j, useEffect as G } from "react";
|
|
3
|
+
import { Box as h, Stack as r, Divider as D, Typography as m, IconButton as R } from "@mui/material";
|
|
4
|
+
import { SSkeleton as i } from "../s-skeleton/s-skeleton.js";
|
|
5
|
+
import { SAvatar as J } from "../s-avatar/s-avatar.js";
|
|
7
6
|
import { SRating as K } from "../s-rating/s-rating.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
const X =
|
|
7
|
+
import P from "../s-lazy-image/s-lazy-image.js";
|
|
8
|
+
import { c as H } from "../createSvgIcon-BKymXuBG.js";
|
|
9
|
+
import { SImageModal as Q } from "../s-image-modal/s-image-modal.js";
|
|
10
|
+
const X = H(/* @__PURE__ */ e.jsx("path", {
|
|
12
11
|
d: "M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2m4 0v12h4V3z"
|
|
13
|
-
}), "ThumbDown"), Z =
|
|
12
|
+
}), "ThumbDown"), Z = H(/* @__PURE__ */ e.jsx("path", {
|
|
14
13
|
d: "M1 21h4V9H1zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73z"
|
|
15
|
-
}), "ThumbUp"),
|
|
16
|
-
const
|
|
17
|
-
return w < 60 ? "just now" :
|
|
18
|
-
},
|
|
19
|
-
id:
|
|
20
|
-
userName:
|
|
21
|
-
userAvatar:
|
|
22
|
-
rating:
|
|
14
|
+
}), "ThumbUp"), _ = (l) => {
|
|
15
|
+
const x = /* @__PURE__ */ new Date(), v = typeof l == "string" ? new Date(l) : l, y = x.getTime() - v.getTime(), w = Math.floor(y / 1e3), c = Math.floor(w / 60), a = Math.floor(c / 60), o = Math.floor(a / 24), d = Math.floor(o / 7), f = Math.floor(o / 30), g = Math.floor(o / 365);
|
|
16
|
+
return w < 60 ? "just now" : c < 60 ? c === 1 ? "1 minute ago" : `${c} minutes ago` : a < 24 ? a === 1 ? "1 hour ago" : `${a} hours ago` : o < 7 ? o === 1 ? "1 day ago" : `${o} days ago` : d < 4 ? d === 1 ? "1 week ago" : `${d} weeks ago` : f < 12 ? f === 1 ? "1 month ago" : `${f} months ago` : g === 1 ? "1 year ago" : `${g} years ago`;
|
|
17
|
+
}, ee = ({
|
|
18
|
+
id: l = Date.now(),
|
|
19
|
+
userName: x,
|
|
20
|
+
userAvatar: v,
|
|
21
|
+
rating: y,
|
|
23
22
|
reviewContent: w,
|
|
24
|
-
datetime:
|
|
25
|
-
images:
|
|
26
|
-
userHelpfulVote:
|
|
27
|
-
helpfulYes:
|
|
28
|
-
helpfulNo:
|
|
29
|
-
onHelpfulVote:
|
|
30
|
-
showHelpfulSection:
|
|
31
|
-
avatarSize:
|
|
32
|
-
maxRating:
|
|
33
|
-
readOnly:
|
|
23
|
+
datetime: c,
|
|
24
|
+
images: a,
|
|
25
|
+
userHelpfulVote: o = null,
|
|
26
|
+
helpfulYes: d = 0,
|
|
27
|
+
helpfulNo: f = 0,
|
|
28
|
+
onHelpfulVote: g,
|
|
29
|
+
showHelpfulSection: L = !0,
|
|
30
|
+
avatarSize: I = 48,
|
|
31
|
+
maxRating: V = 5,
|
|
32
|
+
readOnly: W = !0,
|
|
34
33
|
showDivider: C = !0,
|
|
35
|
-
loading:
|
|
36
|
-
sx:
|
|
34
|
+
loading: E = !1,
|
|
35
|
+
sx: T = {}
|
|
37
36
|
}) => {
|
|
38
|
-
const [
|
|
39
|
-
let
|
|
40
|
-
|
|
41
|
-
},
|
|
42
|
-
id: `review-${
|
|
37
|
+
const [O, M] = j(d), [U, b] = j(f), [p, S] = j(o), [Y, $] = j(!1), [B, k] = j(null), z = (n) => {
|
|
38
|
+
let s = n;
|
|
39
|
+
p === n ? (n === "yes" ? M((t) => Math.max(0, t - 1)) : b((t) => Math.max(0, t - 1)), S(null), s = null) : (p === "yes" ? M((t) => Math.max(0, t - 1)) : p === "no" && b((t) => Math.max(0, t - 1)), n === "yes" ? M((t) => t + 1) : b((t) => t + 1), S(n), s = n), g && g(l, s);
|
|
40
|
+
}, u = a?.map((n, s) => ({
|
|
41
|
+
id: `review-${l}-image-${s}`,
|
|
43
42
|
type: "image",
|
|
44
|
-
url:
|
|
45
|
-
title: `Review image ${
|
|
46
|
-
desc: `Image ${
|
|
47
|
-
}))
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
return
|
|
56
|
-
|
|
57
|
-
}, [
|
|
58
|
-
/* @__PURE__ */ e.jsxs(
|
|
59
|
-
/* @__PURE__ */ e.jsx(
|
|
60
|
-
/* @__PURE__ */ e.jsxs(
|
|
61
|
-
/* @__PURE__ */ e.jsxs(
|
|
62
|
-
/* @__PURE__ */ e.jsx(
|
|
63
|
-
/* @__PURE__ */ e.jsx(
|
|
43
|
+
url: n,
|
|
44
|
+
title: `Review image ${s + 1}`,
|
|
45
|
+
desc: `Image ${s + 1} from ${x}'s review`
|
|
46
|
+
})) || [], N = (n) => {
|
|
47
|
+
const s = u[n];
|
|
48
|
+
s && (k(s), $(!0));
|
|
49
|
+
}, A = () => {
|
|
50
|
+
$(!1), k(null);
|
|
51
|
+
}, F = (n) => {
|
|
52
|
+
k(n);
|
|
53
|
+
}, q = _(c);
|
|
54
|
+
return G(() => {
|
|
55
|
+
S(o);
|
|
56
|
+
}, [o]), E ? /* @__PURE__ */ e.jsxs(h, { sx: { py: 2, ...T }, children: [
|
|
57
|
+
/* @__PURE__ */ e.jsxs(r, { direction: "row", spacing: 2, alignItems: "flex-start", children: [
|
|
58
|
+
/* @__PURE__ */ e.jsx(i, { component: "rounded-avatar", width: I, height: I }),
|
|
59
|
+
/* @__PURE__ */ e.jsxs(h, { sx: { flex: 1 }, children: [
|
|
60
|
+
/* @__PURE__ */ e.jsxs(r, { direction: "row", alignItems: "center", spacing: 2, mb: 1, children: [
|
|
61
|
+
/* @__PURE__ */ e.jsx(i, { variant: "text", width: 120, height: 20 }),
|
|
62
|
+
/* @__PURE__ */ e.jsx(i, { variant: "text", width: 80, height: 16 })
|
|
64
63
|
] }),
|
|
65
|
-
/* @__PURE__ */ e.jsx(
|
|
66
|
-
/* @__PURE__ */ e.jsx(
|
|
67
|
-
/* @__PURE__ */ e.jsxs(
|
|
68
|
-
/* @__PURE__ */ e.jsx(
|
|
69
|
-
/* @__PURE__ */ e.jsx(
|
|
70
|
-
/* @__PURE__ */ e.jsx(
|
|
71
|
-
/* @__PURE__ */ e.jsx(
|
|
72
|
-
/* @__PURE__ */ e.jsx(
|
|
64
|
+
/* @__PURE__ */ e.jsx(h, { sx: { mb: 1 }, children: /* @__PURE__ */ e.jsx(i, { variant: "text", width: 100, height: 20 }) }),
|
|
65
|
+
/* @__PURE__ */ e.jsx(i, { variant: "text", width: "100%", height: 16, sx: { mb: 0.5 } }),
|
|
66
|
+
/* @__PURE__ */ e.jsxs(r, { direction: "row", spacing: 1, sx: { display: "inline-flex", alignItems: "center" }, children: [
|
|
67
|
+
/* @__PURE__ */ e.jsx(i, { variant: "text", width: 140, height: 16, sx: { mr: 2 } }),
|
|
68
|
+
/* @__PURE__ */ e.jsx(i, { component: "icon-button" }),
|
|
69
|
+
/* @__PURE__ */ e.jsx(i, { variant: "text", width: 20, height: 16 }),
|
|
70
|
+
/* @__PURE__ */ e.jsx(i, { component: "icon-button" }),
|
|
71
|
+
/* @__PURE__ */ e.jsx(i, { variant: "text", width: 20, height: 16 })
|
|
73
72
|
] })
|
|
74
73
|
] })
|
|
75
74
|
] }),
|
|
76
|
-
C && /* @__PURE__ */ e.jsx(
|
|
77
|
-
] }) : /* @__PURE__ */ e.jsxs(
|
|
78
|
-
/* @__PURE__ */ e.jsxs(
|
|
79
|
-
/* @__PURE__ */ e.jsx(
|
|
80
|
-
/* @__PURE__ */ e.jsxs(
|
|
81
|
-
/* @__PURE__ */ e.jsxs(
|
|
82
|
-
/* @__PURE__ */ e.jsx(
|
|
83
|
-
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(
|
|
75
|
+
C && /* @__PURE__ */ e.jsx(D, { sx: { mt: 2 } })
|
|
76
|
+
] }) : /* @__PURE__ */ e.jsxs(h, { sx: { py: 2, ...T }, children: [
|
|
77
|
+
/* @__PURE__ */ e.jsxs(r, { direction: "row", spacing: 2, alignItems: "flex-start", children: [
|
|
78
|
+
/* @__PURE__ */ e.jsx(J, { avatar: v, name: x, size: I }),
|
|
79
|
+
/* @__PURE__ */ e.jsxs(h, { sx: { flex: 1 }, children: [
|
|
80
|
+
/* @__PURE__ */ e.jsxs(r, { direction: "row", alignItems: "center", spacing: 2, mb: 1, children: [
|
|
81
|
+
/* @__PURE__ */ e.jsx(m, { variant: "subtitle2", fontWeight: "600", children: x }),
|
|
82
|
+
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(m, { variant: "caption", children: q }) })
|
|
84
83
|
] }),
|
|
85
|
-
/* @__PURE__ */ e.jsx(
|
|
86
|
-
/* @__PURE__ */ e.jsx(
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
/* @__PURE__ */ e.jsx(h, { sx: { mb: 1 }, children: /* @__PURE__ */ e.jsx(K, { value: y, max: V, readOnly: W, size: "small" }) }),
|
|
85
|
+
/* @__PURE__ */ e.jsx(m, { variant: "body2", sx: { mb: 2, lineHeight: 1.6 }, children: w }),
|
|
86
|
+
a && a.length > 0 && /* @__PURE__ */ e.jsx(r, { direction: "row", spacing: 1, sx: { mb: 2, flexWrap: "wrap", gap: 1 }, children: a.map((n, s) => /* @__PURE__ */ e.jsx(
|
|
87
|
+
P,
|
|
89
88
|
{
|
|
90
|
-
src:
|
|
91
|
-
alt: `Review image ${
|
|
89
|
+
src: n,
|
|
90
|
+
alt: `Review image ${s + 1}`,
|
|
92
91
|
width: 80,
|
|
93
92
|
height: 80,
|
|
94
93
|
variant: "rounded",
|
|
@@ -96,7 +95,7 @@ const X = N(/* @__PURE__ */ e.jsx("path", {
|
|
|
96
95
|
objectFit: "cover",
|
|
97
96
|
cursor: "pointer"
|
|
98
97
|
},
|
|
99
|
-
onClick: () =>
|
|
98
|
+
onClick: () => N(s),
|
|
100
99
|
onMouseEnter: (t) => {
|
|
101
100
|
t.currentTarget.style.opacity = "0.8";
|
|
102
101
|
},
|
|
@@ -104,17 +103,17 @@ const X = N(/* @__PURE__ */ e.jsx("path", {
|
|
|
104
103
|
t.currentTarget.style.opacity = "1";
|
|
105
104
|
}
|
|
106
105
|
},
|
|
107
|
-
|
|
106
|
+
s
|
|
108
107
|
)) }),
|
|
109
|
-
|
|
110
|
-
/* @__PURE__ */ e.jsx(
|
|
108
|
+
L && /* @__PURE__ */ e.jsxs(r, { direction: "row", spacing: 1, sx: { display: "inline-flex", alignItems: "center" }, children: [
|
|
109
|
+
/* @__PURE__ */ e.jsx(m, { variant: "caption", sx: { mr: 2 }, children: "Was this review helpful?" }),
|
|
111
110
|
/* @__PURE__ */ e.jsx(
|
|
112
|
-
|
|
111
|
+
R,
|
|
113
112
|
{
|
|
114
113
|
size: "small",
|
|
115
|
-
onClick: () =>
|
|
114
|
+
onClick: () => z("yes"),
|
|
116
115
|
sx: {
|
|
117
|
-
color:
|
|
116
|
+
color: p === "yes" ? "primary.main" : "text.secondary",
|
|
118
117
|
"&:hover": {
|
|
119
118
|
backgroundColor: "action.hover"
|
|
120
119
|
}
|
|
@@ -122,14 +121,14 @@ const X = N(/* @__PURE__ */ e.jsx("path", {
|
|
|
122
121
|
children: /* @__PURE__ */ e.jsx(Z, { fontSize: "small" })
|
|
123
122
|
}
|
|
124
123
|
),
|
|
125
|
-
/* @__PURE__ */ e.jsx(
|
|
124
|
+
/* @__PURE__ */ e.jsx(m, { variant: "caption", children: O }),
|
|
126
125
|
/* @__PURE__ */ e.jsx(
|
|
127
|
-
|
|
126
|
+
R,
|
|
128
127
|
{
|
|
129
128
|
size: "small",
|
|
130
|
-
onClick: () =>
|
|
129
|
+
onClick: () => z("no"),
|
|
131
130
|
sx: {
|
|
132
|
-
color:
|
|
131
|
+
color: p === "no" ? "error.main" : "text.secondary",
|
|
133
132
|
ml: 1,
|
|
134
133
|
"&:hover": {
|
|
135
134
|
backgroundColor: "action.hover"
|
|
@@ -138,32 +137,28 @@ const X = N(/* @__PURE__ */ e.jsx("path", {
|
|
|
138
137
|
children: /* @__PURE__ */ e.jsx(X, { fontSize: "small" })
|
|
139
138
|
}
|
|
140
139
|
),
|
|
141
|
-
/* @__PURE__ */ e.jsx(
|
|
140
|
+
/* @__PURE__ */ e.jsx(m, { variant: "caption", children: U })
|
|
142
141
|
] })
|
|
143
142
|
] })
|
|
144
143
|
] }),
|
|
145
|
-
C && /* @__PURE__ */ e.jsx(
|
|
144
|
+
C && /* @__PURE__ */ e.jsx(D, { sx: { mt: 2 } }),
|
|
146
145
|
/* @__PURE__ */ e.jsx(
|
|
147
|
-
|
|
146
|
+
Q,
|
|
148
147
|
{
|
|
149
148
|
isOpen: Y,
|
|
150
|
-
onClose:
|
|
151
|
-
selectedItem:
|
|
152
|
-
onItemChange:
|
|
153
|
-
mediaItems:
|
|
154
|
-
showNavigation:
|
|
155
|
-
showThumbnailDock:
|
|
156
|
-
showCounter:
|
|
149
|
+
onClose: A,
|
|
150
|
+
selectedItem: B,
|
|
151
|
+
onItemChange: F,
|
|
152
|
+
mediaItems: u,
|
|
153
|
+
showNavigation: u.length > 1,
|
|
154
|
+
showThumbnailDock: u.length > 1,
|
|
155
|
+
showCounter: u.length > 1
|
|
157
156
|
}
|
|
158
157
|
)
|
|
159
158
|
] });
|
|
160
159
|
};
|
|
161
|
-
|
|
162
|
-
try {
|
|
163
|
-
q.displayName = "SReview", q.__docgenInfo = { description: "A comprehensive review component that displays user reviews with avatar, name, rating, content, and helpful voting system.", displayName: "SReview", props: { id: { defaultValue: { value: "Date.now()" }, description: "Unique identifier for the review (default: Date.now())", name: "id", required: !1, type: { name: "string | number" } }, userName: { defaultValue: null, description: "Name of the reviewer", name: "userName", required: !0, type: { name: "string" } }, userAvatar: { defaultValue: null, description: "URL for the user avatar image (falls back to initials if not provided)", name: "userAvatar", required: !1, type: { name: "string" } }, rating: { defaultValue: null, description: "Rating value", name: "rating", required: !0, type: { name: "number" } }, reviewContent: { defaultValue: null, description: "The review text content", name: "reviewContent", required: !0, type: { name: "string" } }, datetime: { defaultValue: null, description: "Date and time of the review (automatically converts to relative time)", name: "datetime", required: !0, type: { name: "string | Date" } }, images: { defaultValue: null, description: "Array of image URLs to display with the review", name: "images", required: !1, type: { name: "string[]" } }, userHelpfulVote: { defaultValue: { value: "null" }, description: "Current user vote status for this review (default: null)", name: "userHelpfulVote", required: !1, type: { name: '"yes" | "no" | null' } }, helpfulYes: { defaultValue: { value: "0" }, description: 'Number of "Yes" votes for helpfulness (default: 0)', name: "helpfulYes", required: !1, type: { name: "number" } }, helpfulNo: { defaultValue: { value: "0" }, description: 'Number of "No" votes for helpfulness (default: 0)', name: "helpfulNo", required: !1, type: { name: "number" } }, onHelpfulVote: { defaultValue: null, description: "Callback when user votes on helpfulness (returns null when un-voting)", name: "onHelpfulVote", required: !1, type: { name: '((reviewId: string | number, vote: "yes" | "no" | null) => void)' } }, showHelpfulSection: { defaultValue: { value: "true" }, description: "Whether to show the helpful voting section (default: true)", name: "showHelpfulSection", required: !1, type: { name: "boolean" } }, avatarSize: { defaultValue: { value: "48" }, description: "Size of the avatar in pixels (default: 48)", name: "avatarSize", required: !1, type: { name: "number" } }, maxRating: { defaultValue: { value: "5" }, description: "Maximum rating value (default: 5)", name: "maxRating", required: !1, type: { name: "number" } }, readOnly: { defaultValue: { value: "true" }, description: "Whether the rating is read-only (default: true)", name: "readOnly", required: !1, type: { name: "boolean" } }, showDivider: { defaultValue: { value: "true" }, description: "Whether to show the divider at the bottom of the review (default: true)", name: "showDivider", required: !1, type: { name: "boolean" } }, loading: { defaultValue: { value: "false" }, description: "Whether to show skeleton loading state instead of content (default: false)", name: "loading", required: !1, type: { name: "boolean" } }, sx: { defaultValue: { value: "{}" }, description: "MUI sx prop for custom styling", name: "sx", required: !1, type: { name: "SxProps" } } } };
|
|
164
|
-
} catch {
|
|
165
|
-
}
|
|
160
|
+
ee.displayName = "SReview";
|
|
166
161
|
export {
|
|
167
|
-
|
|
168
|
-
|
|
162
|
+
ee as SReview,
|
|
163
|
+
ee as default
|
|
169
164
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@solostylist/ui-kit/s-scroll-reveal",
|
|
3
|
-
"main": "./index.ts",
|
|
4
|
-
"module": "./index.ts",
|
|
5
|
-
"types": "./index.ts"
|
|
1
|
+
{
|
|
2
|
+
"name": "@solostylist/ui-kit/s-scroll-reveal",
|
|
3
|
+
"main": "./index.ts",
|
|
4
|
+
"module": "./index.ts",
|
|
5
|
+
"types": "./index.ts"
|
|
6
6
|
}
|
|
@@ -1,73 +1,65 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import { Box as
|
|
4
|
-
import { motion as
|
|
5
|
-
import { useScrollAnimation as
|
|
6
|
-
const
|
|
1
|
+
import { j as o } from "../jsx-runtime-tc70JA_2.js";
|
|
2
|
+
import B from "react";
|
|
3
|
+
import { Box as e } from "@mui/material";
|
|
4
|
+
import { motion as f } from "framer-motion";
|
|
5
|
+
import { useScrollAnimation as E } from "../hooks/use-scroll-animation.js";
|
|
6
|
+
const N = ({
|
|
7
7
|
children: a,
|
|
8
|
-
duration:
|
|
9
|
-
ease:
|
|
10
|
-
threshold:
|
|
11
|
-
rootMargin:
|
|
8
|
+
duration: v = 0.6,
|
|
9
|
+
ease: h = "easeOut",
|
|
10
|
+
threshold: u,
|
|
11
|
+
rootMargin: x,
|
|
12
12
|
delay: t,
|
|
13
|
-
direction:
|
|
14
|
-
distance:
|
|
15
|
-
scale:
|
|
16
|
-
rotate:
|
|
17
|
-
stagger:
|
|
18
|
-
staggerDelay:
|
|
19
|
-
sx:
|
|
20
|
-
...
|
|
13
|
+
direction: S,
|
|
14
|
+
distance: R,
|
|
15
|
+
scale: s = !0,
|
|
16
|
+
rotate: r = !1,
|
|
17
|
+
stagger: i = !0,
|
|
18
|
+
staggerDelay: j = 0.1,
|
|
19
|
+
sx: y,
|
|
20
|
+
...b
|
|
21
21
|
}) => {
|
|
22
|
-
const { ref:
|
|
23
|
-
threshold:
|
|
24
|
-
rootMargin:
|
|
22
|
+
const { ref: C, animate: A, initialPosition: l, finalPosition: c } = E({
|
|
23
|
+
threshold: u,
|
|
24
|
+
rootMargin: x,
|
|
25
25
|
delay: t,
|
|
26
|
-
direction:
|
|
27
|
-
distance:
|
|
28
|
-
}), m =
|
|
26
|
+
direction: S,
|
|
27
|
+
distance: R
|
|
28
|
+
}), m = s ? { ...l, scale: 0.85 } : l, d = s ? { ...c, scale: 1 } : c, n = r ? { ...m, rotate: -2 } : m, p = r ? { ...d, rotate: 0 } : d, P = {
|
|
29
29
|
hidden: { opacity: 0 },
|
|
30
30
|
visible: {
|
|
31
31
|
opacity: 1,
|
|
32
32
|
transition: {
|
|
33
|
-
staggerChildren:
|
|
33
|
+
staggerChildren: i ? j : 0,
|
|
34
34
|
delayChildren: t ? t / 1e3 : 0
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
},
|
|
37
|
+
}, V = {
|
|
38
38
|
hidden: n,
|
|
39
|
-
visible:
|
|
39
|
+
visible: p
|
|
40
40
|
};
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
|
|
41
|
+
return /* @__PURE__ */ o.jsx(e, { sx: { overflow: "hidden", ...y }, ...b, children: /* @__PURE__ */ o.jsx(
|
|
42
|
+
e,
|
|
43
43
|
{
|
|
44
|
-
component:
|
|
45
|
-
ref:
|
|
46
|
-
variants:
|
|
47
|
-
initial:
|
|
48
|
-
animate:
|
|
44
|
+
component: f.div,
|
|
45
|
+
ref: C,
|
|
46
|
+
variants: i ? P : void 0,
|
|
47
|
+
initial: i ? "hidden" : n,
|
|
48
|
+
animate: A ? i ? "visible" : p : i ? "hidden" : n,
|
|
49
49
|
transition: {
|
|
50
|
-
duration:
|
|
51
|
-
ease:
|
|
50
|
+
duration: v,
|
|
51
|
+
ease: h,
|
|
52
52
|
type: "spring",
|
|
53
53
|
stiffness: 80,
|
|
54
54
|
damping: 20,
|
|
55
55
|
mass: 0.8
|
|
56
56
|
},
|
|
57
|
-
children:
|
|
57
|
+
children: i ? B.Children.toArray(a).map((_, w) => /* @__PURE__ */ o.jsx(e, { component: f.div, variants: V, children: _ }, w)) : a
|
|
58
58
|
}
|
|
59
59
|
) });
|
|
60
60
|
};
|
|
61
|
-
|
|
62
|
-
try {
|
|
63
|
-
l.displayName = "SScrollReveal", l.__docgenInfo = { description: "A scroll-triggered animation component that reveals content with smooth animations when elements enter the viewport.", displayName: "SScrollReveal", props: { children: { defaultValue: null, description: "The content to be revealed with animation", name: "children", required: !0, type: { name: "ReactNode" } }, duration: { defaultValue: { value: "0.6" }, description: "Animation duration in seconds (default: 0.6)", name: "duration", required: !1, type: { name: "number" } }, ease: { defaultValue: { value: "easeOut" }, description: "Framer Motion easing function for the animation (default: 'easeOut')", name: "ease", required: !1, type: { name: "Easing" } }, threshold: { defaultValue: null, description: "Intersection Observer threshold (0-1) for triggering animation", name: "threshold", required: !1, type: { name: "number" } }, rootMargin: { defaultValue: null, description: "Intersection Observer root margin (CSS margin syntax)", name: "rootMargin", required: !1, type: { name: "string" } }, delay: { defaultValue: null, description: "Delay before starting animation in milliseconds", name: "delay", required: !1, type: { name: "number" } }, direction: { defaultValue: null, description: "Direction from which elements animate into view", name: "direction", required: !1, type: { name: "enum", value: [{ value: '"right"' }, { value: '"left"' }, { value: '"up"' }, { value: '"down"' }] } }, distance: { defaultValue: null, description: "Distance in pixels that elements travel during animation", name: "distance", required: !1, type: { name: "number" } }, scale: { defaultValue: { value: "true" }, description: "Whether to include scaling effect in the animation (default: true)", name: "scale", required: !1, type: { name: "boolean" } }, rotate: { defaultValue: { value: "false" }, description: "Whether to include rotation effect in the animation (default: false)", name: "rotate", required: !1, type: { name: "boolean" } }, stagger: { defaultValue: { value: "true" }, description: "Whether to stagger animations for multiple children (default: true)", name: "stagger", required: !1, type: { name: "boolean" } }, staggerDelay: { defaultValue: { value: "0.1" }, description: "Delay between staggered child animations in seconds (default: 0.1)", name: "staggerDelay", required: !1, type: { name: "number" } } } };
|
|
64
|
-
} catch {
|
|
65
|
-
}
|
|
66
|
-
try {
|
|
67
|
-
sscrollreveal.displayName = "sscrollreveal", sscrollreveal.__docgenInfo = { description: "A scroll-triggered animation component that reveals content with smooth animations when elements enter the viewport.", displayName: "sscrollreveal", props: { children: { defaultValue: null, description: "The content to be revealed with animation", name: "children", required: !0, type: { name: "ReactNode" } }, duration: { defaultValue: { value: "0.6" }, description: "Animation duration in seconds (default: 0.6)", name: "duration", required: !1, type: { name: "number" } }, ease: { defaultValue: { value: "easeOut" }, description: "Framer Motion easing function for the animation (default: 'easeOut')", name: "ease", required: !1, type: { name: "Easing" } }, threshold: { defaultValue: null, description: "Intersection Observer threshold (0-1) for triggering animation", name: "threshold", required: !1, type: { name: "number" } }, rootMargin: { defaultValue: null, description: "Intersection Observer root margin (CSS margin syntax)", name: "rootMargin", required: !1, type: { name: "string" } }, delay: { defaultValue: null, description: "Delay before starting animation in milliseconds", name: "delay", required: !1, type: { name: "number" } }, direction: { defaultValue: null, description: "Direction from which elements animate into view", name: "direction", required: !1, type: { name: "enum", value: [{ value: '"right"' }, { value: '"left"' }, { value: '"up"' }, { value: '"down"' }] } }, distance: { defaultValue: null, description: "Distance in pixels that elements travel during animation", name: "distance", required: !1, type: { name: "number" } }, scale: { defaultValue: { value: "true" }, description: "Whether to include scaling effect in the animation (default: true)", name: "scale", required: !1, type: { name: "boolean" } }, rotate: { defaultValue: { value: "false" }, description: "Whether to include rotation effect in the animation (default: false)", name: "rotate", required: !1, type: { name: "boolean" } }, stagger: { defaultValue: { value: "true" }, description: "Whether to stagger animations for multiple children (default: true)", name: "stagger", required: !1, type: { name: "boolean" } }, staggerDelay: { defaultValue: { value: "0.1" }, description: "Delay between staggered child animations in seconds (default: 0.1)", name: "staggerDelay", required: !1, type: { name: "number" } } } };
|
|
68
|
-
} catch {
|
|
69
|
-
}
|
|
61
|
+
N.displayName = "SScrollReveal";
|
|
70
62
|
export {
|
|
71
|
-
|
|
72
|
-
|
|
63
|
+
N as SScrollReveal,
|
|
64
|
+
N as default
|
|
73
65
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
{
|
|
2
|
-
"main": "./index.js",
|
|
3
|
-
"types": "./index.d.ts",
|
|
4
|
-
"sideEffects": false
|
|
5
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"main": "./index.js",
|
|
3
|
+
"types": "./index.d.ts",
|
|
4
|
+
"sideEffects": false
|
|
5
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import { A as
|
|
4
|
-
import { useIsPassedPosition as
|
|
5
|
-
import { s as
|
|
6
|
-
import { B as
|
|
7
|
-
const
|
|
1
|
+
import { j as r } from "../jsx-runtime-tc70JA_2.js";
|
|
2
|
+
import l from "react";
|
|
3
|
+
import { A as m } from "../ArrowUpward-CEeqSc-C.js";
|
|
4
|
+
import { useIsPassedPosition as d } from "../hooks/use-is-passed-position.js";
|
|
5
|
+
import { s as c } from "../styled-B0KflPi-.js";
|
|
6
|
+
import { B as p } from "../Box-CE3rycd-.js";
|
|
7
|
+
const f = c(p)({
|
|
8
8
|
position: "fixed",
|
|
9
9
|
bottom: 20,
|
|
10
10
|
right: 20,
|
|
@@ -21,35 +21,25 @@ const h = u(f)({
|
|
|
21
21
|
"&:hover": {
|
|
22
22
|
transform: "scale(1.1)"
|
|
23
23
|
}
|
|
24
|
-
}),
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
e();
|
|
28
|
-
else if (o) {
|
|
29
|
-
const t = document.getElementById(o);
|
|
30
|
-
t == null || t.scrollTo({ top: 0, behavior: "smooth" });
|
|
31
|
-
} else
|
|
32
|
-
window.scrollTo({ top: 0, behavior: "smooth" });
|
|
24
|
+
}), h = l.memo(({ onClick: e, scrollElementId: o, threshold: s = 100, icon: i, sx: n }) => {
|
|
25
|
+
const t = d(o || window, s), a = () => {
|
|
26
|
+
e ? e() : o ? document.getElementById(o)?.scrollTo({ top: 0, behavior: "smooth" }) : window.scrollTo({ top: 0, behavior: "smooth" });
|
|
33
27
|
};
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
-
|
|
28
|
+
return /* @__PURE__ */ r.jsx(
|
|
29
|
+
f,
|
|
36
30
|
{
|
|
37
31
|
sx: {
|
|
38
|
-
opacity:
|
|
39
|
-
visibility:
|
|
40
|
-
...
|
|
32
|
+
opacity: t ? 1 : 0,
|
|
33
|
+
visibility: t ? "visible" : "hidden",
|
|
34
|
+
...n
|
|
41
35
|
},
|
|
42
|
-
onClick:
|
|
43
|
-
children:
|
|
36
|
+
onClick: a,
|
|
37
|
+
children: i || /* @__PURE__ */ r.jsx(m, {})
|
|
44
38
|
}
|
|
45
39
|
);
|
|
46
40
|
});
|
|
47
|
-
|
|
48
|
-
try {
|
|
49
|
-
r.displayName = "SScrollToTop", r.__docgenInfo = { description: "A floating button that appears when the user scrolls down and allows them to quickly return to the top.", displayName: "SScrollToTop", props: { onClick: { defaultValue: null, description: "Handler called when the scroll-to-top button is clicked", name: "onClick", required: !1, type: { name: "(() => void)" } }, scrollElementId: { defaultValue: null, description: "ID of the scrollable element to monitor. If not provided, monitors the window scroll", name: "scrollElementId", required: !1, type: { name: "string" } }, threshold: { defaultValue: null, description: "Scroll position (in pixels) after which the button becomes visible (default: 100)", name: "threshold", required: !1, type: { name: "number" } }, icon: { defaultValue: null, description: "Custom icon to display instead of the default arrow", name: "icon", required: !1, type: { name: "ReactNode" } }, sx: { defaultValue: null, description: "System prop for custom styling", name: "sx", required: !1, type: { name: "SxProps<Theme>" } } } };
|
|
50
|
-
} catch {
|
|
51
|
-
}
|
|
41
|
+
h.displayName = "SScrollToTop";
|
|
52
42
|
export {
|
|
53
|
-
|
|
54
|
-
|
|
43
|
+
h as SScrollToTop,
|
|
44
|
+
h as default
|
|
55
45
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
{
|
|
2
|
-
"main": "./index.js",
|
|
3
|
-
"types": "./index.d.ts",
|
|
4
|
-
"sideEffects": false
|
|
5
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"main": "./index.js",
|
|
3
|
+
"types": "./index.d.ts",
|
|
4
|
+
"sideEffects": false
|
|
5
|
+
}
|
|
@@ -1,22 +1,8 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as c } from "../jsx-runtime-tc70JA_2.js";
|
|
2
2
|
import { ScrollVelocityRow as i } from "./scroll-velocity-row.js";
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
try {
|
|
6
|
-
l.displayName = "SScrollVelocity", l.__docgenInfo = { description: `A scroll-velocity based marquee component that automatically scrolls horizontally and responds to page scroll velocity.
|
|
7
|
-
Perfect for displaying logos, features, testimonials, or any repeating content in an engaging way.
|
|
8
|
-
|
|
9
|
-
The component automatically duplicates content to create a seamless infinite scroll effect and adjusts speed based on page scroll velocity.`, displayName: "SScrollVelocity", props: { children: { defaultValue: null, description: "Content to display in the scrolling marquee", 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" }] } } } };
|
|
10
|
-
} catch {
|
|
11
|
-
}
|
|
12
|
-
try {
|
|
13
|
-
sscrollvelocity.displayName = "sscrollvelocity", sscrollvelocity.__docgenInfo = { description: `A scroll-velocity based marquee component that automatically scrolls horizontally and responds to page scroll velocity.
|
|
14
|
-
Perfect for displaying logos, features, testimonials, or any repeating content in an engaging way.
|
|
15
|
-
|
|
16
|
-
The component automatically duplicates content to create a seamless infinite scroll effect and adjusts speed based on page scroll velocity.`, displayName: "sscrollvelocity", props: { children: { defaultValue: null, description: "Content to display in the scrolling marquee", 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" }] } } } };
|
|
17
|
-
} catch {
|
|
18
|
-
}
|
|
3
|
+
const s = ({ children: o, baseVelocity: l, direction: r, sx: t, ...e }) => /* @__PURE__ */ c.jsx(i, { baseVelocity: l, direction: r, sx: t, ...e, children: o });
|
|
4
|
+
s.displayName = "SScrollVelocity";
|
|
19
5
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
6
|
+
s as SScrollVelocity,
|
|
7
|
+
s as default
|
|
22
8
|
};
|
|
@@ -1,40 +1,31 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import { Box as
|
|
4
|
-
import { useScroll as
|
|
5
|
-
const
|
|
6
|
-
function
|
|
7
|
-
const { scrollY:
|
|
1
|
+
import { j as o } from "../jsx-runtime-tc70JA_2.js";
|
|
2
|
+
import u from "react";
|
|
3
|
+
import { Box as f } from "@mui/material";
|
|
4
|
+
import { useScroll as p, useVelocity as x, useSpring as d, useTransform as y } from "framer-motion";
|
|
5
|
+
const h = u.createContext(null);
|
|
6
|
+
function v({ children: e, sx: r, ...s }) {
|
|
7
|
+
const { scrollY: n } = p(), i = x(n), c = d(i, {
|
|
8
8
|
damping: 50,
|
|
9
9
|
stiffness: 400
|
|
10
|
-
}),
|
|
11
|
-
const
|
|
12
|
-
return
|
|
10
|
+
}), l = y(c, (t) => {
|
|
11
|
+
const a = t < 0 ? -1 : 1, m = Math.min(5, Math.abs(t) / 1e3 * 5);
|
|
12
|
+
return a * m;
|
|
13
13
|
});
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
|
|
14
|
+
return /* @__PURE__ */ o.jsx(h.Provider, { value: l, children: /* @__PURE__ */ o.jsx(
|
|
15
|
+
f,
|
|
16
16
|
{
|
|
17
17
|
sx: {
|
|
18
18
|
position: "relative",
|
|
19
19
|
width: "100%",
|
|
20
|
-
...
|
|
20
|
+
...r
|
|
21
21
|
},
|
|
22
|
-
...
|
|
23
|
-
children:
|
|
22
|
+
...s,
|
|
23
|
+
children: e
|
|
24
24
|
}
|
|
25
25
|
) });
|
|
26
26
|
}
|
|
27
|
-
try {
|
|
28
|
-
n.displayName = "ScrollVelocityContainer", n.__docgenInfo = { description: `Container component that provides scroll velocity context to child rows.
|
|
29
|
-
Use this to synchronize multiple ScrollVelocityRow components.`, displayName: "ScrollVelocityContainer", props: { children: { defaultValue: null, description: "Content to render inside the container", name: "children", required: !0, type: { name: "ReactNode" } } } };
|
|
30
|
-
} catch {
|
|
31
|
-
}
|
|
32
|
-
try {
|
|
33
|
-
t.displayName = "ScrollVelocityContext", t.__docgenInfo = { description: "Context for sharing scroll velocity across multiple rows", displayName: "ScrollVelocityContext", props: {} };
|
|
34
|
-
} catch {
|
|
35
|
-
}
|
|
36
27
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
28
|
+
v as ScrollVelocityContainer,
|
|
29
|
+
h as ScrollVelocityContext,
|
|
30
|
+
v as default
|
|
40
31
|
};
|