@solostylist/ui-kit 1.0.167 → 1.0.169
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/{Typography-B7LOtCzI.js → Typography-C8jwvSWe.js} +1 -1
- package/dist/main.d.ts +5 -3
- package/dist/main.js +187 -173
- package/dist/s-accordion/index.js +2 -2
- package/dist/s-accordion/s-accordion.d.ts +17 -1
- package/dist/s-accordion/s-accordion.js +252 -238
- package/dist/s-action-overlay/index.js +1 -1
- package/dist/s-action-overlay/s-action-overlay.d.ts +34 -1
- package/dist/s-action-overlay/s-action-overlay.js +67 -55
- package/dist/s-ai-tool-bar/index.d.ts +2 -0
- package/dist/s-ai-tool-bar/index.js +3 -2
- package/dist/s-ai-tool-bar/s-ai-tool-bar.d.ts +33 -22
- package/dist/s-ai-tool-bar/s-ai-tool-bar.js +295 -247
- package/dist/s-autocomplete/index.js +2 -2
- package/dist/s-autocomplete/s-autocomplete.d.ts +13 -15
- package/dist/s-autocomplete/s-autocomplete.js +25 -17
- package/dist/s-avatar/index.js +2 -2
- package/dist/s-avatar/s-avatar.d.ts +16 -1
- package/dist/s-avatar/s-avatar.js +23 -10
- package/dist/s-blur-text/index.js +2 -2
- package/dist/s-blur-text/s-blur-text.d.ts +4 -13
- package/dist/s-blur-text/s-blur-text.js +57 -51
- package/dist/s-breadcrumbs/index.js +2 -2
- package/dist/s-breadcrumbs/s-breadcrumbs.d.ts +20 -1
- package/dist/s-breadcrumbs/s-breadcrumbs.js +39 -30
- package/dist/s-button/index.js +2 -2
- package/dist/s-button/s-button.d.ts +7 -1
- package/dist/s-button/s-button.js +15 -5
- package/dist/s-button-link/index.js +2 -2
- package/dist/s-button-link/s-button-link.d.ts +12 -26
- package/dist/s-button-link/s-button-link.js +36 -26
- package/dist/s-carousel/index.js +1 -1
- package/dist/s-carousel/s-carousel.d.ts +11 -1
- package/dist/s-carousel/s-carousel.js +233 -223
- package/dist/s-category-card/index.js +2 -2
- package/dist/s-category-card/s-category-card.d.ts +28 -1
- package/dist/s-category-card/s-category-card.js +77 -58
- package/dist/s-chat-input/index.js +2 -2
- package/dist/s-chat-input/s-chat-input.d.ts +12 -1
- package/dist/s-chat-input/s-chat-input.js +92 -82
- package/dist/s-chat-message/index.js +2 -2
- package/dist/s-chat-message/s-chat-message.d.ts +22 -1
- package/dist/s-chat-message/s-chat-message.js +144 -133
- package/dist/s-checkbox/index.js +2 -2
- package/dist/s-checkbox/s-checkbox.d.ts +2 -15
- package/dist/s-checkbox/s-checkbox.js +20 -10
- package/dist/s-chip/index.js +2 -2
- package/dist/s-chip/s-chip.d.ts +7 -1
- package/dist/s-chip/s-chip.js +15 -5
- package/dist/s-chips/index.js +2 -2
- package/dist/s-chips/s-chips.d.ts +5 -18
- package/dist/s-chips/s-chips.js +56 -41
- package/dist/s-comment-message/index.js +2 -2
- package/dist/s-comment-message/s-comment-message.d.ts +26 -1
- package/dist/s-comment-message/s-comment-message.js +95 -89
- package/dist/s-copyable-text/index.js +1 -1
- package/dist/s-copyable-text/s-copyable-text.d.ts +9 -36
- package/dist/s-copyable-text/s-copyable-text.js +31 -21
- package/dist/s-countdown/index.d.ts +3 -2
- package/dist/s-countdown/index.js +4 -3
- package/dist/s-countdown/s-count-box.d.ts +39 -0
- package/dist/s-countdown/s-count-box.js +112 -0
- package/dist/s-countdown/s-count-down.d.ts +6 -50
- package/dist/s-countdown/s-count-down.js +110 -175
- package/dist/s-data-table/index.js +2 -2
- package/dist/s-data-table/s-data-table.d.ts +9 -65
- package/dist/s-data-table/s-data-table.js +381 -371
- package/dist/s-date-picker/index.js +2 -2
- package/dist/s-date-picker/s-date-picker.d.ts +6 -17
- package/dist/s-date-picker/s-date-picker.js +124 -107
- package/dist/s-datetime-picker/index.js +2 -2
- package/dist/s-datetime-picker/s-datetime-picker.d.ts +5 -16
- package/dist/s-datetime-picker/s-datetime-picker.js +897 -887
- package/dist/s-dialog/index.js +2 -2
- package/dist/s-dialog/s-dialog.d.ts +3 -16
- package/dist/s-dialog/s-dialog.js +32 -23
- package/dist/s-dialog-confirm/index.js +3 -3
- package/dist/s-dialog-confirm/s-dialog-confirm.d.ts +5 -13
- package/dist/s-dialog-confirm/s-dialog-confirm.js +55 -48
- package/dist/s-dialog-message/index.js +4 -4
- package/dist/s-dialog-message/s-dialog-message.d.ts +5 -15
- package/dist/s-dialog-message/s-dialog-message.js +45 -38
- package/dist/s-empty/index.js +2 -2
- package/dist/s-empty/s-empty.d.ts +5 -20
- package/dist/s-empty/s-empty.js +14 -4
- package/dist/s-error/index.js +2 -2
- package/dist/s-error/s-error.d.ts +5 -20
- package/dist/s-error/s-error.js +16 -6
- package/dist/s-error-layout/index.js +2 -2
- package/dist/s-error-layout/s-error-layout.d.ts +6 -1
- package/dist/s-error-layout/s-error-layout.js +60 -51
- package/dist/s-file-dropzone/index.js +2 -2
- package/dist/s-file-dropzone/s-file-dropzone.d.ts +6 -51
- package/dist/s-file-dropzone/s-file-dropzone.js +64 -54
- package/dist/s-file-icon/index.js +2 -2
- package/dist/s-file-icon/s-file-icon.d.ts +5 -25
- package/dist/s-file-icon/s-file-icon.js +14 -8
- package/dist/s-flex-box/index.js +2 -2
- package/dist/s-flex-box/s-flex-box.d.ts +10 -1
- package/dist/s-flex-box/s-flex-box.js +14 -4
- package/dist/s-form/index.js +2 -2
- package/dist/s-form/s-form.d.ts +5 -14
- package/dist/s-form/s-form.js +19 -9
- package/dist/s-gallery/index.js +33 -3
- package/dist/s-gallery/s-gallery.d.ts +3 -36
- package/dist/s-gallery/s-gallery.js +108 -78
- package/dist/s-glow-button/s-glow-button.d.ts +6 -42
- package/dist/s-glow-button/s-glow-button.js +29 -47
- package/dist/s-gradient-icon/index.d.ts +1 -1
- package/dist/s-gradient-icon/index.js +1 -1
- package/dist/s-gradient-icon/s-gradient-icon.d.ts +8 -68
- package/dist/s-gradient-icon/s-gradient-icon.js +54 -44
- package/dist/s-i18n-provider/index.js +1 -1
- package/dist/s-i18n-provider/s-i18n-provider.d.ts +5 -33
- package/dist/s-i18n-provider/s-i18n-provider.js +25 -15
- package/dist/s-icon-button/index.js +2 -2
- package/dist/s-icon-button/s-icon-button.d.ts +6 -19
- package/dist/s-icon-button/s-icon-button.js +14 -4
- package/dist/s-image-comparison/s-image-comparison.js +50 -45
- package/dist/s-image-modal/index.js +3 -3
- package/dist/s-image-modal/s-image-modal.d.ts +4 -20
- package/dist/s-image-modal/s-image-modal.js +150 -135
- package/dist/s-item-not-found/index.js +2 -2
- package/dist/s-item-not-found/s-item-not-found.d.ts +14 -1
- package/dist/s-item-not-found/s-item-not-found.js +21 -10
- package/dist/s-label/index.js +2 -2
- package/dist/s-label/s-label.d.ts +9 -25
- package/dist/s-label/s-label.js +19 -9
- package/dist/s-language-switcher/index.js +3 -3
- package/dist/s-language-switcher/s-language-switcher.d.ts +20 -33
- package/dist/s-language-switcher/s-language-switcher.js +137 -115
- package/dist/s-lazy-image/index.js +10 -2
- package/dist/s-lazy-image/s-lazy-image.d.ts +12 -58
- package/dist/s-lazy-image/s-lazy-image.js +53 -58
- package/dist/s-localization-provider/index.js +2 -2
- package/dist/s-localization-provider/s-localization-provider.d.ts +6 -27
- package/dist/s-localization-provider/s-localization-provider.js +157 -149
- package/dist/s-moving-border/index.js +2 -2
- package/dist/s-moving-border/s-moving-border.d.ts +3 -33
- package/dist/s-moving-border/s-moving-border.js +65 -55
- package/dist/s-multi-select/index.js +2 -2
- package/dist/s-multi-select/s-multi-select.d.ts +5 -15
- package/dist/s-multi-select/s-multi-select.js +54 -45
- package/dist/s-no-ssr/index.js +2 -2
- package/dist/s-no-ssr/s-no-ssr.d.ts +5 -33
- package/dist/s-no-ssr/s-no-ssr.js +21 -11
- package/dist/s-overlay-scrollbar/index.js +2 -2
- package/dist/s-overlay-scrollbar/s-overlay-scrollbar.d.ts +10 -1
- package/dist/s-overlay-scrollbar/s-overlay-scrollbar.js +16 -11
- package/dist/s-pagination/index.js +2 -2
- package/dist/s-pagination/s-pagination.d.ts +5 -23
- package/dist/s-pagination/s-pagination.js +17 -11
- package/dist/s-pixel-reveal/index.js +2 -2
- package/dist/s-pixel-reveal/s-pixel-reveal.d.ts +15 -1
- package/dist/s-pixel-reveal/s-pixel-reveal.js +83 -78
- package/dist/s-radial-pulse-animate/index.js +2 -2
- package/dist/s-radial-pulse-animate/s-radial-pulse-animate.d.ts +12 -1
- package/dist/s-radial-pulse-animate/s-radial-pulse-animate.js +52 -42
- package/dist/s-rating/index.js +2 -2
- package/dist/s-rating/s-rating.d.ts +7 -1
- package/dist/s-rating/s-rating.js +15 -5
- package/dist/s-review/index.js +2 -2
- package/dist/s-review/s-review.d.ts +25 -1
- package/dist/s-review/s-review.js +104 -97
- package/dist/s-scroll-reveal/index.js +2 -2
- package/dist/s-scroll-reveal/s-scroll-reveal.d.ts +17 -36
- package/dist/s-scroll-reveal/s-scroll-reveal.js +43 -33
- package/dist/s-scroll-to-top/index.js +2 -2
- package/dist/s-scroll-to-top/s-scroll-to-top.d.ts +12 -17
- package/dist/s-scroll-to-top/s-scroll-to-top.js +20 -15
- package/dist/s-scroll-velocity/index.d.ts +6 -0
- package/dist/s-scroll-velocity/index.js +8 -0
- package/dist/s-scroll-velocity/package.json +5 -0
- package/dist/s-scroll-velocity/s-scroll-velocity.d.ts +24 -0
- package/dist/s-scroll-velocity/s-scroll-velocity.js +22 -0
- package/dist/s-scroll-velocity/scroll-velocity-container.d.ts +20 -0
- package/dist/s-scroll-velocity/scroll-velocity-container.js +40 -0
- package/dist/s-scroll-velocity/scroll-velocity-row.d.ts +27 -0
- package/dist/s-scroll-velocity/scroll-velocity-row.js +131 -0
- package/dist/s-select/index.js +2 -2
- package/dist/s-select/s-select.d.ts +3 -22
- package/dist/s-select/s-select.js +76 -72
- package/dist/s-select-list/index.js +2 -2
- package/dist/s-select-list/s-select-list.d.ts +16 -19
- package/dist/s-select-list/s-select-list.js +33 -28
- package/dist/s-skeleton/index.js +2 -2
- package/dist/s-skeleton/s-skeleton.d.ts +6 -22
- package/dist/s-skeleton/s-skeleton.js +28 -18
- package/dist/s-snackbar-message/index.js +4 -4
- package/dist/s-snackbar-message/s-snackbar-message.d.ts +5 -23
- package/dist/s-snackbar-message/s-snackbar-message.js +38 -31
- package/dist/s-spotlight-cursor/index.js +2 -2
- package/dist/s-spotlight-cursor/s-spotlight-cursor.d.ts +10 -44
- package/dist/s-spotlight-cursor/s-spotlight-cursor.js +35 -29
- package/dist/s-stripe/index.d.ts +4 -1
- package/dist/s-stripe/index.js +7 -4
- package/dist/s-stripe/s-stripe-cvc.d.ts +8 -0
- package/dist/s-stripe/s-stripe-cvc.js +15 -0
- package/dist/s-stripe/s-stripe-expiry.d.ts +8 -0
- package/dist/s-stripe/s-stripe-expiry.js +15 -0
- package/dist/s-stripe/s-stripe-number.d.ts +8 -0
- package/dist/s-stripe/s-stripe-number.js +15 -0
- package/dist/s-stripe/s-stripe.d.ts +6 -85
- package/dist/s-stripe/s-stripe.js +24 -27
- package/dist/s-stripe/stripe-input.js +22 -18
- package/dist/s-tabs/index.js +6 -6
- package/dist/s-tabs/s-tab-panel.d.ts +11 -1
- package/dist/s-tabs/s-tab-panel.js +25 -16
- package/dist/s-tabs/s-tab.js +9 -5
- package/dist/s-tabs/s-tabs.d.ts +24 -3
- package/dist/s-tabs/s-tabs.js +34 -25
- package/dist/s-text-editor/index.js +3 -3
- package/dist/s-text-editor/s-text-editor-toolbar.js +91 -76
- package/dist/s-text-editor/s-text-editor.d.ts +13 -11
- package/dist/s-text-editor/s-text-editor.js +44 -30
- package/dist/s-text-field/index.js +2 -2
- package/dist/s-text-field/s-text-field.d.ts +6 -15
- package/dist/s-text-field/s-text-field.js +38 -28
- package/dist/s-text-shimmer/index.js +2 -2
- package/dist/s-text-shimmer/s-text-shimmer.d.ts +10 -1
- package/dist/s-text-shimmer/s-text-shimmer.js +27 -18
- package/dist/s-text-truncation/index.js +2 -2
- package/dist/s-text-truncation/s-text-truncation.d.ts +9 -38
- package/dist/s-text-truncation/s-text-truncation.js +34 -20
- package/dist/s-theme-demo/s-theme-demo.js +238 -223
- package/dist/s-theme-provider/index.js +1 -1
- package/dist/s-theme-provider/s-theme-provider.d.ts +5 -17
- package/dist/s-theme-provider/s-theme-provider.js +44 -34
- package/dist/s-theme-switch/s-theme-switch.js +23 -19
- package/dist/s-tip/index.js +2 -2
- package/dist/s-tip/s-tip.d.ts +5 -22
- package/dist/s-tip/s-tip.js +22 -12
- package/dist/s-two-pane-layout/index.js +10 -2
- package/dist/s-two-pane-layout/s-two-pane-layout.d.ts +7 -1
- package/dist/s-two-pane-layout/s-two-pane-layout.js +58 -48
- package/dist/s-typewriter-text/index.js +2 -2
- package/dist/s-typewriter-text/s-typewriter-text.d.ts +17 -1
- package/dist/s-typewriter-text/s-typewriter-text.js +37 -27
- package/dist/s-zoom-image/index.js +10 -2
- package/dist/s-zoom-image/s-zoom-image.d.ts +10 -42
- package/dist/s-zoom-image/s-zoom-image.js +62 -52
- package/dist/theme/components/alert.d.ts +1436 -1436
- package/dist/theme/components/button.d.ts +2150 -2150
- package/dist/theme/components/chip.d.ts +2 -2
- package/dist/theme/customizations/data-display.js +1 -1
- package/dist/{typographyClasses-C7fhAsUD.js → typographyClasses-DDyl9mok.js} +4 -4
- package/dist/{useMobilePicker-DgxcRrRB.js → useMobilePicker-C1RZZUWr.js} +1 -1
- package/package.json +23 -6
|
@@ -1,93 +1,94 @@
|
|
|
1
1
|
import { j as e } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Box as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
2
|
+
import { useState as v, useEffect as P } from "react";
|
|
3
|
+
import { Box as d, Stack as s, Divider as T, Typography as c, IconButton as H } from "@mui/material";
|
|
4
|
+
import { SAvatar as G } from "../s-avatar/s-avatar.js";
|
|
5
|
+
import { SImageModal as J } from "../s-image-modal/s-image-modal.js";
|
|
6
|
+
import "../s-lazy-image/index.js";
|
|
7
|
+
import { SRating as K } from "../s-rating/s-rating.js";
|
|
8
|
+
import { SSkeleton as l } from "../s-skeleton/s-skeleton.js";
|
|
9
|
+
import Q from "../s-lazy-image/s-lazy-image.js";
|
|
10
|
+
import { c as N } from "../createSvgIcon-DxwgGAVe.js";
|
|
11
|
+
const X = N(/* @__PURE__ */ e.jsx("path", {
|
|
11
12
|
d: "M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2m4 0v12h4V3z"
|
|
12
|
-
}), "ThumbDown"), Z =
|
|
13
|
+
}), "ThumbDown"), Z = N(/* @__PURE__ */ e.jsx("path", {
|
|
13
14
|
d: "M1 21h4V9H1zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73z"
|
|
14
|
-
}), "ThumbUp"),
|
|
15
|
-
const m = /* @__PURE__ */ new Date(),
|
|
16
|
-
return
|
|
17
|
-
},
|
|
18
|
-
id:
|
|
15
|
+
}), "ThumbUp"), ee = (o) => {
|
|
16
|
+
const m = /* @__PURE__ */ new Date(), w = typeof o == "string" ? new Date(o) : o, j = m.getTime() - w.getTime(), y = Math.floor(j / 1e3), u = Math.floor(y / 60), r = Math.floor(u / 60), i = Math.floor(r / 24), f = Math.floor(i / 7), h = Math.floor(i / 30), p = Math.floor(i / 365);
|
|
17
|
+
return y < 60 ? "just now" : u < 60 ? u === 1 ? "1 minute ago" : `${u} minutes ago` : r < 24 ? r === 1 ? "1 hour ago" : `${r} hours ago` : i < 7 ? i === 1 ? "1 day ago" : `${i} days ago` : f < 4 ? f === 1 ? "1 week ago" : `${f} weeks ago` : h < 12 ? h === 1 ? "1 month ago" : `${h} months ago` : p === 1 ? "1 year ago" : `${p} years ago`;
|
|
18
|
+
}, q = ({
|
|
19
|
+
id: o = Date.now(),
|
|
19
20
|
userName: m,
|
|
20
|
-
userAvatar:
|
|
21
|
-
rating:
|
|
22
|
-
reviewContent:
|
|
23
|
-
datetime:
|
|
24
|
-
images:
|
|
21
|
+
userAvatar: w,
|
|
22
|
+
rating: j,
|
|
23
|
+
reviewContent: y,
|
|
24
|
+
datetime: u,
|
|
25
|
+
images: r,
|
|
25
26
|
userHelpfulVote: i = null,
|
|
26
|
-
helpfulYes:
|
|
27
|
-
helpfulNo:
|
|
28
|
-
onHelpfulVote:
|
|
29
|
-
showHelpfulSection:
|
|
30
|
-
avatarSize:
|
|
31
|
-
maxRating:
|
|
32
|
-
readOnly:
|
|
33
|
-
showDivider:
|
|
34
|
-
loading:
|
|
35
|
-
sx:
|
|
27
|
+
helpfulYes: f = 0,
|
|
28
|
+
helpfulNo: h = 0,
|
|
29
|
+
onHelpfulVote: p,
|
|
30
|
+
showHelpfulSection: $ = !0,
|
|
31
|
+
avatarSize: b = 48,
|
|
32
|
+
maxRating: z = 5,
|
|
33
|
+
readOnly: L = !0,
|
|
34
|
+
showDivider: C = !0,
|
|
35
|
+
loading: W = !1,
|
|
36
|
+
sx: k = {}
|
|
36
37
|
}) => {
|
|
37
|
-
const [
|
|
38
|
-
let
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
id: `review-${
|
|
38
|
+
const [_, I] = v(f), [U, V] = v(h), [x, M] = v(i), [Y, D] = v(!1), [A, S] = v(null), R = (a) => {
|
|
39
|
+
let n = a;
|
|
40
|
+
x === a ? (a === "yes" ? I((t) => Math.max(0, t - 1)) : V((t) => Math.max(0, t - 1)), M(null), n = null) : (x === "yes" ? I((t) => Math.max(0, t - 1)) : x === "no" && V((t) => Math.max(0, t - 1)), a === "yes" ? I((t) => t + 1) : V((t) => t + 1), M(a), n = a), p && p(o, n);
|
|
41
|
+
}, g = (r == null ? void 0 : r.map((a, n) => ({
|
|
42
|
+
id: `review-${o}-image-${n}`,
|
|
42
43
|
type: "image",
|
|
43
|
-
url:
|
|
44
|
-
title: `Review image ${
|
|
45
|
-
desc: `Image ${
|
|
46
|
-
}))) || [],
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
return
|
|
55
|
-
|
|
56
|
-
}, [i]),
|
|
57
|
-
/* @__PURE__ */ e.jsxs(
|
|
58
|
-
/* @__PURE__ */ e.jsx(
|
|
59
|
-
/* @__PURE__ */ e.jsxs(
|
|
60
|
-
/* @__PURE__ */ e.jsxs(
|
|
61
|
-
/* @__PURE__ */ e.jsx(
|
|
62
|
-
/* @__PURE__ */ e.jsx(
|
|
44
|
+
url: a,
|
|
45
|
+
title: `Review image ${n + 1}`,
|
|
46
|
+
desc: `Image ${n + 1} from ${m}'s review`
|
|
47
|
+
}))) || [], O = (a) => {
|
|
48
|
+
const n = g[a];
|
|
49
|
+
n && (S(n), D(!0));
|
|
50
|
+
}, E = () => {
|
|
51
|
+
D(!1), S(null);
|
|
52
|
+
}, B = (a) => {
|
|
53
|
+
S(a);
|
|
54
|
+
}, F = ee(u);
|
|
55
|
+
return P(() => {
|
|
56
|
+
M(i);
|
|
57
|
+
}, [i]), W ? /* @__PURE__ */ e.jsxs(d, { sx: { py: 2, ...k }, children: [
|
|
58
|
+
/* @__PURE__ */ e.jsxs(s, { direction: "row", spacing: 2, alignItems: "flex-start", children: [
|
|
59
|
+
/* @__PURE__ */ e.jsx(l, { component: "rounded-avatar", width: b, height: b }),
|
|
60
|
+
/* @__PURE__ */ e.jsxs(d, { sx: { flex: 1 }, children: [
|
|
61
|
+
/* @__PURE__ */ e.jsxs(s, { direction: "row", alignItems: "center", spacing: 2, mb: 1, children: [
|
|
62
|
+
/* @__PURE__ */ e.jsx(l, { variant: "text", width: 120, height: 20 }),
|
|
63
|
+
/* @__PURE__ */ e.jsx(l, { variant: "text", width: 80, height: 16 })
|
|
63
64
|
] }),
|
|
64
|
-
/* @__PURE__ */ e.jsx(
|
|
65
|
-
/* @__PURE__ */ e.jsx(
|
|
66
|
-
/* @__PURE__ */ e.jsxs(
|
|
67
|
-
/* @__PURE__ */ e.jsx(
|
|
68
|
-
/* @__PURE__ */ e.jsx(
|
|
69
|
-
/* @__PURE__ */ e.jsx(
|
|
70
|
-
/* @__PURE__ */ e.jsx(
|
|
71
|
-
/* @__PURE__ */ e.jsx(
|
|
65
|
+
/* @__PURE__ */ e.jsx(d, { sx: { mb: 1 }, children: /* @__PURE__ */ e.jsx(l, { variant: "text", width: 100, height: 20 }) }),
|
|
66
|
+
/* @__PURE__ */ e.jsx(l, { variant: "text", width: "100%", height: 16, sx: { mb: 0.5 } }),
|
|
67
|
+
/* @__PURE__ */ e.jsxs(s, { direction: "row", spacing: 1, sx: { display: "inline-flex", alignItems: "center" }, children: [
|
|
68
|
+
/* @__PURE__ */ e.jsx(l, { variant: "text", width: 140, height: 16, sx: { mr: 2 } }),
|
|
69
|
+
/* @__PURE__ */ e.jsx(l, { component: "icon-button" }),
|
|
70
|
+
/* @__PURE__ */ e.jsx(l, { variant: "text", width: 20, height: 16 }),
|
|
71
|
+
/* @__PURE__ */ e.jsx(l, { component: "icon-button" }),
|
|
72
|
+
/* @__PURE__ */ e.jsx(l, { variant: "text", width: 20, height: 16 })
|
|
72
73
|
] })
|
|
73
74
|
] })
|
|
74
75
|
] }),
|
|
75
|
-
|
|
76
|
-
] }) : /* @__PURE__ */ e.jsxs(
|
|
77
|
-
/* @__PURE__ */ e.jsxs(
|
|
78
|
-
/* @__PURE__ */ e.jsx(
|
|
79
|
-
/* @__PURE__ */ e.jsxs(
|
|
80
|
-
/* @__PURE__ */ e.jsxs(
|
|
81
|
-
/* @__PURE__ */ e.jsx(
|
|
82
|
-
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(
|
|
76
|
+
C && /* @__PURE__ */ e.jsx(T, { sx: { mt: 2 } })
|
|
77
|
+
] }) : /* @__PURE__ */ e.jsxs(d, { sx: { py: 2, ...k }, children: [
|
|
78
|
+
/* @__PURE__ */ e.jsxs(s, { direction: "row", spacing: 2, alignItems: "flex-start", children: [
|
|
79
|
+
/* @__PURE__ */ e.jsx(G, { avatar: w, name: m, size: b }),
|
|
80
|
+
/* @__PURE__ */ e.jsxs(d, { sx: { flex: 1 }, children: [
|
|
81
|
+
/* @__PURE__ */ e.jsxs(s, { direction: "row", alignItems: "center", spacing: 2, mb: 1, children: [
|
|
82
|
+
/* @__PURE__ */ e.jsx(c, { variant: "subtitle2", fontWeight: "600", children: m }),
|
|
83
|
+
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(c, { variant: "caption", color: "text.secondary", children: F }) })
|
|
83
84
|
] }),
|
|
84
|
-
/* @__PURE__ */ e.jsx(
|
|
85
|
-
/* @__PURE__ */ e.jsx(
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
/* @__PURE__ */ e.jsx(d, { sx: { mb: 1 }, children: /* @__PURE__ */ e.jsx(K, { value: j, max: z, readOnly: L, size: "small" }) }),
|
|
86
|
+
/* @__PURE__ */ e.jsx(c, { variant: "body2", sx: { mb: 2, lineHeight: 1.6 }, children: y }),
|
|
87
|
+
r && r.length > 0 && /* @__PURE__ */ e.jsx(s, { direction: "row", spacing: 1, sx: { mb: 2, flexWrap: "wrap", gap: 1 }, children: r.map((a, n) => /* @__PURE__ */ e.jsx(
|
|
88
|
+
Q,
|
|
88
89
|
{
|
|
89
|
-
src:
|
|
90
|
-
alt: `Review image ${
|
|
90
|
+
src: a,
|
|
91
|
+
alt: `Review image ${n + 1}`,
|
|
91
92
|
width: 80,
|
|
92
93
|
height: 80,
|
|
93
94
|
variant: "rounded",
|
|
@@ -95,7 +96,7 @@ const X = L(/* @__PURE__ */ e.jsx("path", {
|
|
|
95
96
|
objectFit: "cover",
|
|
96
97
|
cursor: "pointer"
|
|
97
98
|
},
|
|
98
|
-
onClick: () =>
|
|
99
|
+
onClick: () => O(n),
|
|
99
100
|
onMouseEnter: (t) => {
|
|
100
101
|
t.currentTarget.style.opacity = "0.8";
|
|
101
102
|
},
|
|
@@ -103,17 +104,17 @@ const X = L(/* @__PURE__ */ e.jsx("path", {
|
|
|
103
104
|
t.currentTarget.style.opacity = "1";
|
|
104
105
|
}
|
|
105
106
|
},
|
|
106
|
-
|
|
107
|
+
n
|
|
107
108
|
)) }),
|
|
108
|
-
|
|
109
|
-
/* @__PURE__ */ e.jsx(
|
|
109
|
+
$ && /* @__PURE__ */ e.jsxs(s, { direction: "row", spacing: 1, sx: { display: "inline-flex", alignItems: "center" }, children: [
|
|
110
|
+
/* @__PURE__ */ e.jsx(c, { variant: "caption", color: "text.secondary", sx: { mr: 2 }, children: "Was this review helpful?" }),
|
|
110
111
|
/* @__PURE__ */ e.jsx(
|
|
111
112
|
H,
|
|
112
113
|
{
|
|
113
114
|
size: "small",
|
|
114
|
-
onClick: () =>
|
|
115
|
+
onClick: () => R("yes"),
|
|
115
116
|
sx: {
|
|
116
|
-
color:
|
|
117
|
+
color: x === "yes" ? "primary.main" : "text.secondary",
|
|
117
118
|
"&:hover": {
|
|
118
119
|
backgroundColor: "action.hover"
|
|
119
120
|
}
|
|
@@ -121,14 +122,14 @@ const X = L(/* @__PURE__ */ e.jsx("path", {
|
|
|
121
122
|
children: /* @__PURE__ */ e.jsx(Z, { fontSize: "small" })
|
|
122
123
|
}
|
|
123
124
|
),
|
|
124
|
-
/* @__PURE__ */ e.jsx(
|
|
125
|
+
/* @__PURE__ */ e.jsx(c, { variant: "caption", color: "text.secondary", children: _ }),
|
|
125
126
|
/* @__PURE__ */ e.jsx(
|
|
126
127
|
H,
|
|
127
128
|
{
|
|
128
129
|
size: "small",
|
|
129
|
-
onClick: () =>
|
|
130
|
+
onClick: () => R("no"),
|
|
130
131
|
sx: {
|
|
131
|
-
color:
|
|
132
|
+
color: x === "no" ? "error.main" : "text.secondary",
|
|
132
133
|
ml: 1,
|
|
133
134
|
"&:hover": {
|
|
134
135
|
backgroundColor: "action.hover"
|
|
@@ -137,26 +138,32 @@ const X = L(/* @__PURE__ */ e.jsx("path", {
|
|
|
137
138
|
children: /* @__PURE__ */ e.jsx(X, { fontSize: "small" })
|
|
138
139
|
}
|
|
139
140
|
),
|
|
140
|
-
/* @__PURE__ */ e.jsx(
|
|
141
|
+
/* @__PURE__ */ e.jsx(c, { variant: "caption", color: "text.secondary", children: U })
|
|
141
142
|
] })
|
|
142
143
|
] })
|
|
143
144
|
] }),
|
|
144
|
-
|
|
145
|
+
C && /* @__PURE__ */ e.jsx(T, { sx: { mt: 2 } }),
|
|
145
146
|
/* @__PURE__ */ e.jsx(
|
|
146
|
-
|
|
147
|
+
J,
|
|
147
148
|
{
|
|
148
149
|
isOpen: Y,
|
|
149
|
-
onClose:
|
|
150
|
-
selectedItem:
|
|
151
|
-
onItemChange:
|
|
152
|
-
mediaItems:
|
|
153
|
-
showNavigation:
|
|
154
|
-
showThumbnailDock:
|
|
155
|
-
showCounter:
|
|
150
|
+
onClose: E,
|
|
151
|
+
selectedItem: A,
|
|
152
|
+
onItemChange: B,
|
|
153
|
+
mediaItems: g,
|
|
154
|
+
showNavigation: g.length > 1,
|
|
155
|
+
showThumbnailDock: g.length > 1,
|
|
156
|
+
showCounter: g.length > 1
|
|
156
157
|
}
|
|
157
158
|
)
|
|
158
159
|
] });
|
|
159
160
|
};
|
|
161
|
+
q.displayName = "SReview";
|
|
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
166
|
export {
|
|
161
|
-
|
|
167
|
+
q as SReview,
|
|
168
|
+
q as default
|
|
162
169
|
};
|
|
@@ -1,56 +1,37 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { BoxProps } from '@mui/material';
|
|
3
3
|
import { Easing } from 'framer-motion';
|
|
4
|
+
/**
|
|
5
|
+
* Props interface for SScrollReveal component
|
|
6
|
+
*/
|
|
4
7
|
export interface SScrollRevealProps extends Omit<BoxProps, 'children'> {
|
|
8
|
+
/** The content to be revealed with animation */
|
|
5
9
|
children: React.ReactNode;
|
|
10
|
+
/** Animation duration in seconds (default: 0.6) */
|
|
6
11
|
duration?: number;
|
|
12
|
+
/** Framer Motion easing function for the animation (default: 'easeOut') */
|
|
7
13
|
ease?: Easing;
|
|
14
|
+
/** Intersection Observer threshold (0-1) for triggering animation */
|
|
8
15
|
threshold?: number;
|
|
16
|
+
/** Intersection Observer root margin (CSS margin syntax) */
|
|
9
17
|
rootMargin?: string;
|
|
18
|
+
/** Delay before starting animation in milliseconds */
|
|
10
19
|
delay?: number;
|
|
20
|
+
/** Direction from which elements animate into view */
|
|
11
21
|
direction?: 'up' | 'down' | 'left' | 'right';
|
|
22
|
+
/** Distance in pixels that elements travel during animation */
|
|
12
23
|
distance?: number;
|
|
24
|
+
/** Whether to include scaling effect in the animation (default: true) */
|
|
13
25
|
scale?: boolean;
|
|
26
|
+
/** Whether to include rotation effect in the animation (default: false) */
|
|
14
27
|
rotate?: boolean;
|
|
28
|
+
/** Whether to stagger animations for multiple children (default: true) */
|
|
15
29
|
stagger?: boolean;
|
|
30
|
+
/** Delay between staggered child animations in seconds (default: 0.1) */
|
|
16
31
|
staggerDelay?: number;
|
|
17
32
|
}
|
|
18
|
-
declare const SScrollReveal: React.FC<SScrollRevealProps>;
|
|
19
33
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* This component uses the Intersection Observer API to detect when elements come into view and applies
|
|
23
|
-
* customizable animation effects including directional movement, scaling, rotation, and staggered animations.
|
|
24
|
-
* Built on MUI Box with full styling support and optimized for performance.
|
|
25
|
-
*
|
|
26
|
-
* Key features:
|
|
27
|
-
* - Scroll-triggered animations with customizable timing
|
|
28
|
-
* - Support for multiple animation directions (up, down, left, right)
|
|
29
|
-
* - Optional scaling and rotation effects
|
|
30
|
-
* - Staggered animations for multiple children
|
|
31
|
-
* - Full MUI Box props support for styling
|
|
32
|
-
* - Performance-optimized with Intersection Observer
|
|
33
|
-
* - Responsive and accessible
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```tsx
|
|
37
|
-
* <SScrollReveal direction="up" duration={0.8} stagger={true}>
|
|
38
|
-
* <Typography>This text will slide up</Typography>
|
|
39
|
-
* <Button>This button will follow</Button>
|
|
40
|
-
* </SScrollReveal>
|
|
41
|
-
* ```
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* ```tsx
|
|
45
|
-
* <SScrollReveal
|
|
46
|
-
* direction="left"
|
|
47
|
-
* distance={100}
|
|
48
|
-
* scale={false}
|
|
49
|
-
* delay={200}
|
|
50
|
-
* sx={{ padding: 2 }}
|
|
51
|
-
* >
|
|
52
|
-
* <Card>Slides in from the left</Card>
|
|
53
|
-
* </SScrollReveal>
|
|
54
|
-
* ```
|
|
34
|
+
* A scroll-triggered animation component that reveals content with smooth animations when elements enter the viewport.
|
|
55
35
|
*/
|
|
36
|
+
export declare const SScrollReveal: React.FC<SScrollRevealProps>;
|
|
56
37
|
export default SScrollReveal;
|
|
@@ -1,63 +1,73 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import { Box as
|
|
1
|
+
import { j as i } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
+
import A from "react";
|
|
3
|
+
import { Box as r } from "@mui/material";
|
|
4
4
|
import { motion as p } from "framer-motion";
|
|
5
|
-
import { useScrollAnimation as
|
|
6
|
-
const
|
|
5
|
+
import { useScrollAnimation as I } from "../hooks/use-scroll-animation.js";
|
|
6
|
+
const l = ({
|
|
7
7
|
children: a,
|
|
8
8
|
duration: h = 0.6,
|
|
9
|
-
ease:
|
|
10
|
-
threshold:
|
|
11
|
-
rootMargin:
|
|
9
|
+
ease: g = "easeOut",
|
|
10
|
+
threshold: v,
|
|
11
|
+
rootMargin: y,
|
|
12
12
|
delay: t,
|
|
13
|
-
direction:
|
|
14
|
-
distance:
|
|
15
|
-
scale:
|
|
16
|
-
rotate:
|
|
17
|
-
stagger:
|
|
18
|
-
staggerDelay:
|
|
19
|
-
sx:
|
|
20
|
-
...
|
|
13
|
+
direction: b,
|
|
14
|
+
distance: V,
|
|
15
|
+
scale: o = !0,
|
|
16
|
+
rotate: s = !1,
|
|
17
|
+
stagger: e = !0,
|
|
18
|
+
staggerDelay: q = 0.1,
|
|
19
|
+
sx: _,
|
|
20
|
+
...w
|
|
21
21
|
}) => {
|
|
22
|
-
const { ref:
|
|
23
|
-
threshold:
|
|
24
|
-
rootMargin:
|
|
22
|
+
const { ref: S, animate: x, initialPosition: d, finalPosition: u } = I({
|
|
23
|
+
threshold: v,
|
|
24
|
+
rootMargin: y,
|
|
25
25
|
delay: t,
|
|
26
|
-
direction:
|
|
27
|
-
distance:
|
|
28
|
-
}), m =
|
|
26
|
+
direction: b,
|
|
27
|
+
distance: V
|
|
28
|
+
}), m = o ? { ...d, scale: 0.85 } : d, c = o ? { ...u, scale: 1 } : u, n = s ? { ...m, rotate: -2 } : m, f = s ? { ...c, rotate: 0 } : c, D = {
|
|
29
29
|
hidden: { opacity: 0 },
|
|
30
30
|
visible: {
|
|
31
31
|
opacity: 1,
|
|
32
32
|
transition: {
|
|
33
|
-
staggerChildren:
|
|
33
|
+
staggerChildren: e ? q : 0,
|
|
34
34
|
delayChildren: t ? t / 1e3 : 0
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
},
|
|
37
|
+
}, R = {
|
|
38
38
|
hidden: n,
|
|
39
39
|
visible: f
|
|
40
40
|
};
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
|
|
41
|
+
return /* @__PURE__ */ i.jsx(r, { sx: { overflow: "hidden", ..._ }, ...w, children: /* @__PURE__ */ i.jsx(
|
|
42
|
+
r,
|
|
43
43
|
{
|
|
44
44
|
component: p.div,
|
|
45
|
-
ref:
|
|
46
|
-
variants:
|
|
47
|
-
initial:
|
|
48
|
-
animate:
|
|
45
|
+
ref: S,
|
|
46
|
+
variants: e ? D : void 0,
|
|
47
|
+
initial: e ? "hidden" : n,
|
|
48
|
+
animate: x ? e ? "visible" : f : e ? "hidden" : n,
|
|
49
49
|
transition: {
|
|
50
50
|
duration: h,
|
|
51
|
-
ease:
|
|
51
|
+
ease: g,
|
|
52
52
|
type: "spring",
|
|
53
53
|
stiffness: 80,
|
|
54
54
|
damping: 20,
|
|
55
55
|
mass: 0.8
|
|
56
56
|
},
|
|
57
|
-
children:
|
|
57
|
+
children: e ? A.Children.toArray(a).map((O, N) => /* @__PURE__ */ i.jsx(r, { component: p.div, variants: R, children: O }, N)) : a
|
|
58
58
|
}
|
|
59
59
|
) });
|
|
60
60
|
};
|
|
61
|
+
l.displayName = "SScrollReveal";
|
|
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: '"left"' }, { value: '"right"' }, { 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: '"left"' }, { value: '"right"' }, { 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
70
|
export {
|
|
62
|
-
|
|
71
|
+
l as SScrollReveal,
|
|
72
|
+
l as default
|
|
63
73
|
};
|
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { SxProps, Theme } from '@mui/material/styles';
|
|
3
|
+
/**
|
|
4
|
+
* Props interface for SScrollToTop component
|
|
5
|
+
*/
|
|
3
6
|
export interface SScrollToTopProps {
|
|
4
|
-
/**
|
|
5
|
-
* Handler called when the scroll-to-top button is clicked
|
|
6
|
-
*/
|
|
7
|
+
/** Handler called when the scroll-to-top button is clicked */
|
|
7
8
|
onClick?: () => void;
|
|
8
|
-
/**
|
|
9
|
-
* ID of the scrollable element to monitor. If not provided, monitors the window scroll
|
|
10
|
-
*/
|
|
9
|
+
/** ID of the scrollable element to monitor. If not provided, monitors the window scroll */
|
|
11
10
|
scrollElementId?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Scroll position (in pixels) after which the button becomes visible
|
|
14
|
-
* @default 100
|
|
15
|
-
*/
|
|
11
|
+
/** Scroll position (in pixels) after which the button becomes visible (default: 100) */
|
|
16
12
|
threshold?: number;
|
|
17
|
-
/**
|
|
18
|
-
* Custom icon to display instead of the default arrow
|
|
19
|
-
*/
|
|
13
|
+
/** Custom icon to display instead of the default arrow */
|
|
20
14
|
icon?: React.ReactNode;
|
|
21
|
-
/**
|
|
22
|
-
* System prop for custom styling
|
|
23
|
-
*/
|
|
15
|
+
/** System prop for custom styling */
|
|
24
16
|
sx?: SxProps<Theme>;
|
|
25
17
|
}
|
|
26
|
-
|
|
18
|
+
/**
|
|
19
|
+
* A floating button that appears when the user scrolls down and allows them to quickly return to the top.
|
|
20
|
+
*/
|
|
21
|
+
export declare const SScrollToTop: React.MemoExoticComponent<({ onClick, scrollElementId, threshold, icon, sx }: SScrollToTopProps) => import("react/jsx-runtime").JSX.Element>;
|
|
27
22
|
export default SScrollToTop;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { j as i } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
-
import
|
|
3
|
-
import { A as
|
|
2
|
+
import c from "react";
|
|
3
|
+
import { A as p } from "../ArrowUpward-DhTFpzoh.js";
|
|
4
4
|
import { useIsPassedPosition as m } from "../hooks/use-is-passed-position.js";
|
|
5
|
-
import { s as
|
|
5
|
+
import { s as u } from "../styled-B0Z4EDy9.js";
|
|
6
6
|
import { B as f } from "../Box-Ha0cQ4KO.js";
|
|
7
|
-
const h =
|
|
7
|
+
const h = u(f)({
|
|
8
8
|
position: "fixed",
|
|
9
9
|
bottom: 20,
|
|
10
10
|
right: 20,
|
|
@@ -21,10 +21,10 @@ const h = p(f)({
|
|
|
21
21
|
"&:hover": {
|
|
22
22
|
transform: "scale(1.1)"
|
|
23
23
|
}
|
|
24
|
-
}),
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
27
|
-
|
|
24
|
+
}), r = c.memo(({ onClick: e, scrollElementId: o, threshold: s = 100, icon: n, sx: a }) => {
|
|
25
|
+
const l = m(o || window, s), d = () => {
|
|
26
|
+
if (e)
|
|
27
|
+
e();
|
|
28
28
|
else if (o) {
|
|
29
29
|
const t = document.getElementById(o);
|
|
30
30
|
t == null || t.scrollTo({ top: 0, behavior: "smooth" });
|
|
@@ -35,16 +35,21 @@ const h = p(f)({
|
|
|
35
35
|
h,
|
|
36
36
|
{
|
|
37
37
|
sx: {
|
|
38
|
-
opacity:
|
|
39
|
-
visibility:
|
|
40
|
-
...
|
|
38
|
+
opacity: l ? 1 : 0,
|
|
39
|
+
visibility: l ? "visible" : "hidden",
|
|
40
|
+
...a
|
|
41
41
|
},
|
|
42
|
-
onClick:
|
|
43
|
-
children:
|
|
42
|
+
onClick: d,
|
|
43
|
+
children: n || /* @__PURE__ */ i.jsx(p, {})
|
|
44
44
|
}
|
|
45
45
|
);
|
|
46
46
|
});
|
|
47
|
-
|
|
47
|
+
r.displayName = "SScrollToTop";
|
|
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
|
+
}
|
|
48
52
|
export {
|
|
49
|
-
|
|
53
|
+
r as SScrollToTop,
|
|
54
|
+
r as default
|
|
50
55
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default } from './s-scroll-velocity';
|
|
2
|
+
export type { SScrollVelocityProps } from './s-scroll-velocity';
|
|
3
|
+
export { ScrollVelocityContainer } from './scroll-velocity-container';
|
|
4
|
+
export type { ScrollVelocityContainerProps } from './scroll-velocity-container';
|
|
5
|
+
export { ScrollVelocityRow } from './scroll-velocity-row';
|
|
6
|
+
export type { ScrollVelocityRowProps } from './scroll-velocity-row';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SScrollVelocity as r } from "./s-scroll-velocity.js";
|
|
2
|
+
import { ScrollVelocityContainer as t } from "./scroll-velocity-container.js";
|
|
3
|
+
import { ScrollVelocityRow as f } from "./scroll-velocity-row.js";
|
|
4
|
+
export {
|
|
5
|
+
t as ScrollVelocityContainer,
|
|
6
|
+
f as ScrollVelocityRow,
|
|
7
|
+
r as default
|
|
8
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BoxProps } from '@mui/material';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the SScrollVelocity component
|
|
5
|
+
*/
|
|
6
|
+
export interface SScrollVelocityProps extends BoxProps {
|
|
7
|
+
/** Content to display in the scrolling marquee */
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
/** Base scrolling speed (default: 5) */
|
|
10
|
+
baseVelocity?: number;
|
|
11
|
+
/** Scroll direction: 1 for right, -1 for left (default: 1) */
|
|
12
|
+
direction?: 1 | -1;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A scroll-velocity based marquee component that automatically scrolls horizontally and responds to page scroll velocity.
|
|
16
|
+
* Perfect for displaying logos, features, testimonials, or any repeating content in an engaging way.
|
|
17
|
+
*
|
|
18
|
+
* The component automatically duplicates content to create a seamless infinite scroll effect and adjusts speed based on page scroll velocity.
|
|
19
|
+
*/
|
|
20
|
+
export declare const SScrollVelocity: {
|
|
21
|
+
({ children, baseVelocity, direction, sx, ...props }: SScrollVelocityProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
export default SScrollVelocity;
|