@solostylist/ui-kit 1.0.151 → 1.0.153
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-DvTpkKgd.js +8 -0
- package/dist/ChevronLeft-zg9wurzn.js +8 -0
- package/dist/{ChevronRight-CyCLDFyO.js → ChevronRight-BKIP5v8z.js} +2 -5
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +8 -6
- package/dist/hooks/use-is-passed-position.d.ts +1 -0
- package/dist/hooks/use-is-passed-position.js +21 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +163 -159
- package/dist/s-breadcrumbs/index.d.ts +2 -0
- package/dist/s-breadcrumbs/index.js +4 -0
- package/dist/s-breadcrumbs/package.json +5 -0
- package/dist/s-breadcrumbs/s-breadcrumbs.d.ts +18 -0
- package/dist/s-breadcrumbs/s-breadcrumbs.js +43 -0
- package/dist/s-chat-input/s-chat-input.js +36 -37
- package/dist/s-image-comparison/s-image-comparison.js +7 -6
- package/dist/s-image-modal/s-image-modal.js +21 -20
- package/dist/s-scroll-to-top/index.d.ts +2 -0
- package/dist/s-scroll-to-top/index.js +4 -0
- package/dist/s-scroll-to-top/package.json +5 -0
- package/dist/s-scroll-to-top/s-scroll-to-top.d.ts +27 -0
- package/dist/s-scroll-to-top/s-scroll-to-top.js +50 -0
- package/package.json +1 -1
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { j as o } from "./jsx-runtime-OVHDjVDe.js";
|
|
2
2
|
import { c as t } from "./createSvgIcon-Dq42_0tn.js";
|
|
3
|
-
const
|
|
4
|
-
d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"
|
|
5
|
-
}), "ChevronLeft"), s = t(/* @__PURE__ */ o.jsx("path", {
|
|
3
|
+
const e = t(/* @__PURE__ */ o.jsx("path", {
|
|
6
4
|
d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
|
|
7
5
|
}), "ChevronRight");
|
|
8
6
|
export {
|
|
9
|
-
|
|
10
|
-
s as a
|
|
7
|
+
e as C
|
|
11
8
|
};
|
package/dist/hooks/index.d.ts
CHANGED
package/dist/hooks/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { useDialog as
|
|
2
|
-
import { usePopover as
|
|
1
|
+
import { useDialog as s } from "./use-dialog.js";
|
|
2
|
+
import { usePopover as i } from "./use-popover.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { useScrollAnimation as
|
|
4
|
+
import { useScrollAnimation as p } from "./use-scroll-animation.js";
|
|
5
|
+
import { useIsPassedPosition as u } from "./use-is-passed-position.js";
|
|
5
6
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
s as useDialog,
|
|
8
|
+
u as useIsPassedPosition,
|
|
9
|
+
i as usePopover,
|
|
10
|
+
p as useScrollAnimation
|
|
9
11
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useIsPassedPosition(el: React.RefObject<HTMLElement> | string | Window, positionY: number): boolean;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useState as f, useEffect as d } from "react";
|
|
2
|
+
function a(s, r) {
|
|
3
|
+
const [c, l] = f(!1);
|
|
4
|
+
return d(() => {
|
|
5
|
+
let e = null;
|
|
6
|
+
if (typeof s == "string" ? e = document.getElementById(s) ?? null : s instanceof Window ? e = s : s != null && s.current && (e = s.current), !e || !("addEventListener" in e)) return;
|
|
7
|
+
const n = () => {
|
|
8
|
+
let t = 0;
|
|
9
|
+
e instanceof Window ? t = e.scrollY : e instanceof HTMLElement && (t = e.scrollTop), l((o) => {
|
|
10
|
+
const i = t > r;
|
|
11
|
+
return o !== i ? i : o;
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
return n(), e.addEventListener("scroll", n), () => {
|
|
15
|
+
e == null || e.removeEventListener("scroll", n);
|
|
16
|
+
};
|
|
17
|
+
}, [s, r]), c;
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
a as useIsPassedPosition
|
|
21
|
+
};
|
package/dist/main.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export { default as SAutocomplete } from './s-autocomplete/index';
|
|
|
6
6
|
export type { SAutocompleteProps } from './s-autocomplete/index';
|
|
7
7
|
export { default as SAvatar } from './s-avatar/index';
|
|
8
8
|
export type { SAvatarProps } from './s-avatar/index';
|
|
9
|
+
export { default as SBreadcrumbs } from './s-breadcrumbs/index';
|
|
10
|
+
export type { SBreadcrumbsProps, BreadcrumbItem } from './s-breadcrumbs/index';
|
|
9
11
|
export { default as SButton } from './s-button/index';
|
|
10
12
|
export type { SButtonProps } from './s-button/index';
|
|
11
13
|
export { default as SButtonLink } from './s-button-link/index';
|
package/dist/main.js
CHANGED
|
@@ -1,169 +1,173 @@
|
|
|
1
1
|
import { default as t } from "./s-accordion/s-accordion.js";
|
|
2
2
|
import { default as l } from "./s-action-overlay/s-action-overlay.js";
|
|
3
|
-
import { default as
|
|
3
|
+
import { default as m } from "./s-autocomplete/s-autocomplete.js";
|
|
4
4
|
import { default as u } from "./s-avatar/s-avatar.js";
|
|
5
|
-
import { default as d } from "./s-
|
|
6
|
-
import { default as i } from "./s-button
|
|
7
|
-
import { default as g } from "./s-
|
|
8
|
-
import { default as T } from "./s-
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as b } from "./s-
|
|
11
|
-
import { default as D } from "./s-
|
|
5
|
+
import { default as d } from "./s-breadcrumbs/s-breadcrumbs.js";
|
|
6
|
+
import { default as i } from "./s-button/s-button.js";
|
|
7
|
+
import { default as g } from "./s-button-link/s-button-link.js";
|
|
8
|
+
import { default as T } from "./s-carousel/s-carousel.js";
|
|
9
|
+
import { default as P } from "./s-chat-input/s-chat-input.js";
|
|
10
|
+
import { default as b } from "./s-chat-message/s-chat-message.js";
|
|
11
|
+
import { default as D } from "./s-comment-message/s-comment-message.js";
|
|
12
|
+
import { default as M } from "./s-text-editor/s-text-editor.js";
|
|
12
13
|
import "./s-text-editor/s-text-editor-toolbar.js";
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { DialogConfirmProvider as
|
|
18
|
-
import { DialogMessageProvider as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as
|
|
27
|
-
import { default as
|
|
28
|
-
import { default as
|
|
29
|
-
import { default as
|
|
30
|
-
import { default as
|
|
31
|
-
import { default as
|
|
32
|
-
import { default as
|
|
33
|
-
import { default as
|
|
34
|
-
import { default as
|
|
35
|
-
import { default as
|
|
36
|
-
import { default as
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as
|
|
39
|
-
import { default as
|
|
40
|
-
import { default as
|
|
41
|
-
import { SSmartTextField as
|
|
42
|
-
import { SCopilotKitProvider as
|
|
43
|
-
import { SStripeCVC as
|
|
44
|
-
import { default as
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
-
import { default as
|
|
49
|
-
import { default as
|
|
50
|
-
import { default as
|
|
51
|
-
import { default as
|
|
52
|
-
import { default as
|
|
53
|
-
import { default as
|
|
54
|
-
import { default as
|
|
55
|
-
import { MediaItem as
|
|
56
|
-
import { default as
|
|
57
|
-
import { default as
|
|
58
|
-
import { default as
|
|
59
|
-
import { default as
|
|
60
|
-
import { default as
|
|
61
|
-
import { default as
|
|
62
|
-
import { default as
|
|
63
|
-
import { default as
|
|
64
|
-
import { default as
|
|
65
|
-
import { default as
|
|
66
|
-
import { default as
|
|
67
|
-
import { default as
|
|
68
|
-
import { default as
|
|
69
|
-
import { SLanguagePopover as
|
|
70
|
-
import { useDialog as
|
|
71
|
-
import { usePopover as
|
|
14
|
+
import { default as I } from "./s-checkbox/s-checkbox.js";
|
|
15
|
+
import { default as F } from "./s-chip/s-chip.js";
|
|
16
|
+
import { default as w } from "./s-chips/s-chips.js";
|
|
17
|
+
import { default as E } from "./s-data-table/s-data-table.js";
|
|
18
|
+
import { DialogConfirmProvider as R, default as G, useDialogConfirm as N } from "./s-dialog-confirm/s-dialog-confirm.js";
|
|
19
|
+
import { DialogMessageProvider as j, default as K, useDialogMessage as V } from "./s-dialog-message/s-dialog-message.js";
|
|
20
|
+
import { default as H } from "./s-error/s-error.js";
|
|
21
|
+
import { default as Q } from "./s-empty/s-empty.js";
|
|
22
|
+
import { default as W } from "./s-flex-box/s-flex-box.js";
|
|
23
|
+
import { default as Y } from "./s-two-pane-layout/s-two-pane-layout.js";
|
|
24
|
+
import { default as _ } from "./s-dialog/s-dialog.js";
|
|
25
|
+
import { default as ee } from "./s-error-layout/s-error-layout.js";
|
|
26
|
+
import { default as re } from "./s-file-dropzone/s-file-dropzone.js";
|
|
27
|
+
import { default as te } from "./s-file-icon/s-file-icon.js";
|
|
28
|
+
import { default as le } from "./s-i18n-provider/s-i18n-provider.js";
|
|
29
|
+
import { default as me } from "./s-icon-button/s-icon-button.js";
|
|
30
|
+
import { default as ue } from "./s-label/s-label.js";
|
|
31
|
+
import { default as de } from "./s-multi-select/s-multi-select.js";
|
|
32
|
+
import { default as ie } from "./s-no-ssr/s-no-ssr.js";
|
|
33
|
+
import { default as ge } from "./s-overlay-scrollbar/s-overlay-scrollbar.js";
|
|
34
|
+
import { default as Te } from "./s-text-field/s-text-field.js";
|
|
35
|
+
import { default as Pe } from "./s-pagination/s-pagination.js";
|
|
36
|
+
import { default as be } from "./s-select/s-select.js";
|
|
37
|
+
import { default as De } from "./s-skeleton/s-skeleton.js";
|
|
38
|
+
import { default as Me } from "./s-tip/s-tip.js";
|
|
39
|
+
import { default as Ie } from "./s-text-truncation/s-text-truncation.js";
|
|
40
|
+
import { default as Fe, SnackbarMessageProvider as Be, useSnackbarMessage as we } from "./s-snackbar-message/s-snackbar-message.js";
|
|
41
|
+
import { default as Ee } from "./s-form/s-form.js";
|
|
42
|
+
import { SSmartTextField as Re } from "./s-smart-text-field/s-smart-text-field.js";
|
|
43
|
+
import { SCopilotKitProvider as Ne } from "./s-copilot-kit-provider/s-copilot-kit-provider.js";
|
|
44
|
+
import { SStripeCVC as je, SStripeExpiry as Ke, SStripeNumber as Ve, StripeTextField as qe } from "./s-stripe/s-stripe.js";
|
|
45
|
+
import { default as Je } from "./s-theme-provider/s-theme-provider.js";
|
|
46
|
+
import { default as Ue } from "./s-theme-switch/s-theme-switch.js";
|
|
47
|
+
import { default as Xe } from "./s-datetime-picker/s-datetime-picker.js";
|
|
48
|
+
import { default as Ze } from "./s-date-picker/s-date-picker.js";
|
|
49
|
+
import { default as $e } from "./s-localization-provider/s-localization-provider.js";
|
|
50
|
+
import { default as oo } from "./s-gradient-icon/s-gradient-icon.js";
|
|
51
|
+
import { default as ao } from "./s-glow-button/s-glow-button.js";
|
|
52
|
+
import { default as fo } from "./s-moving-border/s-moving-border.js";
|
|
53
|
+
import { default as so } from "./s-scroll-reveal/s-scroll-reveal.js";
|
|
54
|
+
import { default as po } from "./s-spotlight-cursor/s-spotlight-cursor.js";
|
|
55
|
+
import { default as So } from "./s-copyable-text/s-copyable-text.js";
|
|
56
|
+
import { MediaItem as io, default as no } from "./s-gallery/s-gallery.js";
|
|
57
|
+
import { default as co } from "./s-image-modal/s-image-modal.js";
|
|
58
|
+
import { default as Co } from "./s-lazy-image/s-lazy-image.js";
|
|
59
|
+
import { default as vo } from "./s-image-comparison/s-image-comparison.js";
|
|
60
|
+
import { default as yo } from "./s-item-not-found/s-item-not-found.js";
|
|
61
|
+
import { default as Lo } from "./s-category-card/s-category-card.js";
|
|
62
|
+
import { default as ho } from "./s-radial-pulse-animate/s-radial-pulse-animate.js";
|
|
63
|
+
import { default as ko } from "./s-rating/s-rating.js";
|
|
64
|
+
import { default as Bo } from "./s-review/s-review.js";
|
|
65
|
+
import { default as Ao } from "./s-tabs/s-tabs.js";
|
|
66
|
+
import { default as zo } from "./s-tabs/s-tab.js";
|
|
67
|
+
import { default as Go } from "./s-tabs/s-tab-panel.js";
|
|
68
|
+
import { default as Oo } from "./s-text-shimmer/s-text-shimmer.js";
|
|
69
|
+
import { default as Ko } from "./s-typewriter-text/s-typewriter-text.js";
|
|
70
|
+
import { SLanguagePopover as qo, default as Ho, defaultLanguageOptions as Jo } from "./s-language-switcher/s-language-switcher.js";
|
|
71
|
+
import { useDialog as Uo } from "./hooks/use-dialog.js";
|
|
72
|
+
import { usePopover as Xo } from "./hooks/use-popover.js";
|
|
72
73
|
import "react";
|
|
73
|
-
import { useScrollAnimation as
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
74
|
+
import { useScrollAnimation as Zo } from "./hooks/use-scroll-animation.js";
|
|
75
|
+
import { useIsPassedPosition as $o } from "./hooks/use-is-passed-position.js";
|
|
76
|
+
import { formatDatePosted as or } from "./utils/dayjs.js";
|
|
77
|
+
import { bytesToSize as ar } from "./utils/bytes-to-size.js";
|
|
78
|
+
import { LogLevel as fr, Logger as lr, createLogger as sr, logger as mr } from "./utils/logger.js";
|
|
79
|
+
import { default as ur } from "dayjs";
|
|
78
80
|
export {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
R as DialogConfirmProvider,
|
|
82
|
+
j as DialogMessageProvider,
|
|
83
|
+
fr as LogLevel,
|
|
84
|
+
lr as Logger,
|
|
85
|
+
io as MediaItem,
|
|
84
86
|
t as SAccordion,
|
|
85
87
|
l as SActionOverlay,
|
|
86
|
-
|
|
88
|
+
m as SAutocomplete,
|
|
87
89
|
u as SAvatar,
|
|
88
|
-
d as
|
|
89
|
-
i as
|
|
90
|
-
g as
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
I as
|
|
96
|
-
F as
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
ee as
|
|
110
|
-
re as
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
le as
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
de as
|
|
129
|
-
ie as
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
ho as
|
|
133
|
-
ko as
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
be as
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
zo as
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
Je as
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
ar as
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
90
|
+
d as SBreadcrumbs,
|
|
91
|
+
i as SButton,
|
|
92
|
+
g as SButtonLink,
|
|
93
|
+
T as SCarousel,
|
|
94
|
+
Lo as SCategoryCard,
|
|
95
|
+
P as SChatInput,
|
|
96
|
+
b as SChatMessage,
|
|
97
|
+
I as SCheckbox,
|
|
98
|
+
F as SChip,
|
|
99
|
+
w as SChips,
|
|
100
|
+
D as SCommentMessage,
|
|
101
|
+
Ne as SCopilotKitProvider,
|
|
102
|
+
So as SCopyableText,
|
|
103
|
+
E as SDataTable,
|
|
104
|
+
Ze as SDatePicker,
|
|
105
|
+
Xe as SDateTimePicker,
|
|
106
|
+
_ as SDialog,
|
|
107
|
+
G as SDialogConfirm,
|
|
108
|
+
K as SDialogMessage,
|
|
109
|
+
Q as SEmpty,
|
|
110
|
+
H as SError,
|
|
111
|
+
ee as SErrorLayout,
|
|
112
|
+
re as SFileDropzone,
|
|
113
|
+
te as SFileIcon,
|
|
114
|
+
W as SFlexBox,
|
|
115
|
+
Ee as SForm,
|
|
116
|
+
no as SGallery,
|
|
117
|
+
ao as SGlowButton,
|
|
118
|
+
oo as SGradientIcon,
|
|
119
|
+
le as SI18nProvider,
|
|
120
|
+
me as SIconButton,
|
|
121
|
+
vo as SImageComparison,
|
|
122
|
+
co as SImageModal,
|
|
123
|
+
yo as SItemNotFound,
|
|
124
|
+
ue as SLabel,
|
|
125
|
+
qo as SLanguagePopover,
|
|
126
|
+
Ho as SLanguageSwitcher,
|
|
127
|
+
Co as SLazyImage,
|
|
128
|
+
$e as SLocalizationProvider,
|
|
129
|
+
fo as SMovingBorder,
|
|
130
|
+
de as SMultiSelect,
|
|
131
|
+
ie as SNoSsr,
|
|
132
|
+
ge as SOverlayScrollbar,
|
|
133
|
+
Pe as SPagination,
|
|
134
|
+
ho as SRadialPulseAnimate,
|
|
135
|
+
ko as SRating,
|
|
136
|
+
Bo as SReview,
|
|
137
|
+
so as SScrollReveal,
|
|
138
|
+
be as SSelect,
|
|
139
|
+
De as SSkeleton,
|
|
140
|
+
Re as SSmartTextField,
|
|
141
|
+
Fe as SSnackbarMessage,
|
|
142
|
+
po as SSpotlightCursor,
|
|
143
|
+
je as SStripeCVC,
|
|
144
|
+
Ke as SStripeExpiry,
|
|
145
|
+
Ve as SStripeNumber,
|
|
146
|
+
zo as STab,
|
|
147
|
+
Go as STabPanel,
|
|
148
|
+
Ao as STabs,
|
|
149
|
+
M as STextEditor,
|
|
150
|
+
Te as STextField,
|
|
151
|
+
Oo as STextShimmer,
|
|
152
|
+
Ie as STextTruncation,
|
|
153
|
+
Je as SThemeProvider,
|
|
154
|
+
Ue as SThemeSwitch,
|
|
155
|
+
Me as STip,
|
|
156
|
+
Y as STwoPaneLayout,
|
|
157
|
+
Ko as STypewriterText,
|
|
158
|
+
Be as SnackbarMessageProvider,
|
|
159
|
+
qe as StripeTextField,
|
|
160
|
+
ar as bytesToSize,
|
|
161
|
+
sr as createLogger,
|
|
162
|
+
ur as dayjs,
|
|
163
|
+
Jo as defaultLanguageOptions,
|
|
164
|
+
or as formatDatePosted,
|
|
165
|
+
mr as logger,
|
|
166
|
+
Uo as useDialog,
|
|
167
|
+
N as useDialogConfirm,
|
|
168
|
+
V as useDialogMessage,
|
|
169
|
+
$o as useIsPassedPosition,
|
|
170
|
+
Xo as usePopover,
|
|
171
|
+
Zo as useScrollAnimation,
|
|
172
|
+
we as useSnackbarMessage
|
|
169
173
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BreadcrumbsProps, SxProps, Theme } from '@mui/material';
|
|
3
|
+
export interface BreadcrumbItem {
|
|
4
|
+
label: string;
|
|
5
|
+
to?: string;
|
|
6
|
+
onClick?: (event: React.MouseEvent) => void;
|
|
7
|
+
isCurrent?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface SBreadcrumbsProps extends Omit<BreadcrumbsProps, 'children'> {
|
|
10
|
+
items: BreadcrumbItem[];
|
|
11
|
+
separator?: React.ReactNode;
|
|
12
|
+
LinkComponent?: React.ElementType;
|
|
13
|
+
currentColor?: string;
|
|
14
|
+
linkColor?: string;
|
|
15
|
+
sx?: SxProps<Theme>;
|
|
16
|
+
}
|
|
17
|
+
declare const SBreadcrumbs: React.ForwardRefExoticComponent<Omit<SBreadcrumbsProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
18
|
+
export default SBreadcrumbs;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { j as o } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
+
import { forwardRef as f } from "react";
|
|
3
|
+
import { C as i } from "../ChevronRight-BKIP5v8z.js";
|
|
4
|
+
import { Breadcrumbs as $, Typography as t, Link as e } from "@mui/material";
|
|
5
|
+
const j = f(
|
|
6
|
+
({
|
|
7
|
+
items: a,
|
|
8
|
+
separator: u = /* @__PURE__ */ o.jsx(i, { fontSize: "small" }),
|
|
9
|
+
LinkComponent: s,
|
|
10
|
+
currentColor: c = "text.primary",
|
|
11
|
+
linkColor: n = "primary.main",
|
|
12
|
+
sx: b,
|
|
13
|
+
...h
|
|
14
|
+
}, p) => /* @__PURE__ */ o.jsx($, { ref: p, separator: u, sx: b, ...h, children: a.map((r, l) => {
|
|
15
|
+
const d = l === a.length - 1;
|
|
16
|
+
return r.isCurrent ?? d ? /* @__PURE__ */ o.jsx(t, { color: c, children: r.label }, `${r.label}-${l}`) : r.onClick ? /* @__PURE__ */ o.jsx(
|
|
17
|
+
e,
|
|
18
|
+
{
|
|
19
|
+
component: "button",
|
|
20
|
+
onClick: r.onClick,
|
|
21
|
+
color: n,
|
|
22
|
+
underline: "hover",
|
|
23
|
+
sx: { cursor: "pointer", background: "none", border: "none", padding: 0, font: "inherit" },
|
|
24
|
+
children: r.label
|
|
25
|
+
},
|
|
26
|
+
`${r.label}-${l}`
|
|
27
|
+
) : r.to ? s ? /* @__PURE__ */ o.jsx(
|
|
28
|
+
e,
|
|
29
|
+
{
|
|
30
|
+
component: s,
|
|
31
|
+
to: r.to,
|
|
32
|
+
color: n,
|
|
33
|
+
underline: "hover",
|
|
34
|
+
children: r.label
|
|
35
|
+
},
|
|
36
|
+
`${r.label}-${l}`
|
|
37
|
+
) : /* @__PURE__ */ o.jsx(e, { href: r.to, color: n, underline: "hover", children: r.label }, `${r.label}-${l}`) : /* @__PURE__ */ o.jsx(t, { color: c, children: r.label }, `${r.label}-${l}`);
|
|
38
|
+
}) })
|
|
39
|
+
);
|
|
40
|
+
j.displayName = "SBreadcrumbs";
|
|
41
|
+
export {
|
|
42
|
+
j as default
|
|
43
|
+
};
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { j as r } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Box as s, outlinedInputClasses as D, Typography as
|
|
2
|
+
import { forwardRef as K, useState as c, useRef as T, useId as V, useEffect as B } from "react";
|
|
3
|
+
import { Box as s, outlinedInputClasses as D, Typography as I, Popper as W, ClickAwayListener as H } from "@mui/material";
|
|
4
4
|
import _ from "emoji-picker-react";
|
|
5
5
|
import q from "../s-file-icon/s-file-icon.js";
|
|
6
6
|
import d from "../s-icon-button/s-icon-button.js";
|
|
7
7
|
import G from "../s-text-field/s-text-field.js";
|
|
8
8
|
import { C as J } from "../Close-D4kX7Vbc.js";
|
|
9
|
-
import { c as
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}), "ArrowUpward"), Q = v(/* @__PURE__ */ r.jsx("path", {
|
|
9
|
+
import { c as E } from "../createSvgIcon-Dq42_0tn.js";
|
|
10
|
+
import { A as N } from "../ArrowUpward-DvTpkKgd.js";
|
|
11
|
+
const Q = E(/* @__PURE__ */ r.jsx("path", {
|
|
13
12
|
d: "M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z"
|
|
14
|
-
}), "AttachFile"), X =
|
|
13
|
+
}), "AttachFile"), X = E(/* @__PURE__ */ r.jsx("path", {
|
|
15
14
|
d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M8.5 8c.83 0 1.5.67 1.5 1.5S9.33 11 8.5 11 7 10.33 7 9.5 7.67 8 8.5 8M12 18c-2.28 0-4.22-1.66-5-4h10c-.78 2.34-2.72 4-5 4m3.5-7c-.83 0-1.5-.67-1.5-1.5S14.67 8 15.5 8s1.5.67 1.5 1.5-.67 1.5-1.5 1.5"
|
|
16
|
-
}), "EmojiEmotions"),
|
|
17
|
-
({ onSubmit: p, onFileSelect: m, disabled: a, acceptedFileTypes: M, maxFileSize:
|
|
18
|
-
const [u, h] = c(""), [l, x] = c([]), [i, f] = c(/* @__PURE__ */ new Map()), [
|
|
15
|
+
}), "EmojiEmotions"), le = K(
|
|
16
|
+
({ onSubmit: p, onFileSelect: m, disabled: a, acceptedFileTypes: M, maxFileSize: v, ...z }, U) => {
|
|
17
|
+
const [u, h] = c(""), [l, x] = c([]), [i, f] = c(/* @__PURE__ */ new Map()), [k, g] = c(!1), C = T(null), y = V(), b = (e) => e.type.startsWith("image/"), $ = (e) => {
|
|
19
18
|
const o = `${e.name}-${e.size}-${e.lastModified}`;
|
|
20
19
|
if (i.has(o))
|
|
21
20
|
return i.get(o);
|
|
@@ -24,29 +23,29 @@ const N = v(/* @__PURE__ */ r.jsx("path", {
|
|
|
24
23
|
return f((t) => new Map(t).set(o, n)), n;
|
|
25
24
|
}
|
|
26
25
|
return "";
|
|
27
|
-
}, $ = (e) => {
|
|
28
|
-
h(e.target.value);
|
|
29
26
|
}, P = (e) => {
|
|
27
|
+
h(e.target.value);
|
|
28
|
+
}, L = (e) => {
|
|
30
29
|
h((o) => o + e.emoji), g(!1);
|
|
31
|
-
},
|
|
32
|
-
g(!
|
|
33
|
-
},
|
|
30
|
+
}, A = () => {
|
|
31
|
+
g(!k);
|
|
32
|
+
}, w = () => {
|
|
34
33
|
a || u.trim().length === 0 && l.length === 0 || (p == null || p(u, l), h(""), i.forEach((e) => URL.revokeObjectURL(e)), f(/* @__PURE__ */ new Map()), x([]));
|
|
35
|
-
}, A = (e) => {
|
|
36
|
-
const n = Array.from(e.target.files || []).filter((t) => !(k && t.size > k));
|
|
37
|
-
x((t) => [...t, ...n]), m == null || m(n), e.target.value = "";
|
|
38
34
|
}, F = (e) => {
|
|
35
|
+
const n = Array.from(e.target.files || []).filter((t) => !(v && t.size > v));
|
|
36
|
+
x((t) => [...t, ...n]), m == null || m(n), e.target.value = "";
|
|
37
|
+
}, O = (e) => {
|
|
39
38
|
const o = l[e];
|
|
40
39
|
if (o && b(o)) {
|
|
41
40
|
const n = `${o.name}-${o.size}-${o.lastModified}`, t = i.get(n);
|
|
42
41
|
t && (URL.revokeObjectURL(t), f((j) => {
|
|
43
|
-
const
|
|
44
|
-
return
|
|
42
|
+
const R = new Map(j);
|
|
43
|
+
return R.delete(n), R;
|
|
45
44
|
}));
|
|
46
45
|
}
|
|
47
46
|
x((n) => n.filter((t, j) => j !== e));
|
|
48
|
-
},
|
|
49
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(),
|
|
47
|
+
}, S = (e) => {
|
|
48
|
+
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), w());
|
|
50
49
|
};
|
|
51
50
|
return B(() => () => {
|
|
52
51
|
i.forEach((e) => URL.revokeObjectURL(e));
|
|
@@ -57,8 +56,8 @@ const N = v(/* @__PURE__ */ r.jsx("path", {
|
|
|
57
56
|
placeholder: "Enter your message here...",
|
|
58
57
|
disabled: a,
|
|
59
58
|
value: u,
|
|
60
|
-
onChange:
|
|
61
|
-
onKeyDown:
|
|
59
|
+
onChange: P,
|
|
60
|
+
onKeyDown: S,
|
|
62
61
|
multiline: !0,
|
|
63
62
|
minRows: 1,
|
|
64
63
|
maxRows: 10,
|
|
@@ -113,7 +112,7 @@ const N = v(/* @__PURE__ */ r.jsx("path", {
|
|
|
113
112
|
s,
|
|
114
113
|
{
|
|
115
114
|
component: "img",
|
|
116
|
-
src:
|
|
115
|
+
src: $(e),
|
|
117
116
|
alt: e.name,
|
|
118
117
|
sx: {
|
|
119
118
|
width: 40,
|
|
@@ -126,15 +125,15 @@ const N = v(/* @__PURE__ */ r.jsx("path", {
|
|
|
126
125
|
}
|
|
127
126
|
) : /* @__PURE__ */ r.jsx(q, { extension: t }),
|
|
128
127
|
/* @__PURE__ */ r.jsxs(s, { display: "flex", flexDirection: "row", alignItems: "center", gap: 1, children: [
|
|
129
|
-
/* @__PURE__ */ r.jsx(
|
|
130
|
-
/* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsxs(
|
|
128
|
+
/* @__PURE__ */ r.jsx(I, { variant: "subtitle2", textOverflow: "ellipsis", overflow: "hidden", whiteSpace: "nowrap", children: e.name }),
|
|
129
|
+
/* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsxs(I, { variant: "caption", color: "text.secondary", children: [
|
|
131
130
|
"(",
|
|
132
131
|
Math.round(e.size / 1024),
|
|
133
132
|
" KB)"
|
|
134
133
|
] }) })
|
|
135
134
|
] })
|
|
136
135
|
] }),
|
|
137
|
-
/* @__PURE__ */ r.jsx(d, { size: "small", onClick: () =>
|
|
136
|
+
/* @__PURE__ */ r.jsx(d, { size: "small", onClick: () => O(o), sx: { minWidth: "auto", p: 0.5 }, children: /* @__PURE__ */ r.jsx(J, {}) })
|
|
138
137
|
]
|
|
139
138
|
},
|
|
140
139
|
`${e.name}-${o}`
|
|
@@ -148,13 +147,13 @@ const N = v(/* @__PURE__ */ r.jsx("path", {
|
|
|
148
147
|
type: "file",
|
|
149
148
|
multiple: !0,
|
|
150
149
|
accept: M,
|
|
151
|
-
onChange:
|
|
150
|
+
onChange: F,
|
|
152
151
|
style: { display: "none" },
|
|
153
|
-
id: `file-attachment-input-${
|
|
152
|
+
id: `file-attachment-input-${y}`,
|
|
154
153
|
disabled: a
|
|
155
154
|
}
|
|
156
155
|
),
|
|
157
|
-
/* @__PURE__ */ r.jsx("label", { htmlFor: `file-attachment-input-${
|
|
156
|
+
/* @__PURE__ */ r.jsx("label", { htmlFor: `file-attachment-input-${y}`, children: /* @__PURE__ */ r.jsx(
|
|
158
157
|
d,
|
|
159
158
|
{
|
|
160
159
|
component: "span",
|
|
@@ -172,8 +171,8 @@ const N = v(/* @__PURE__ */ r.jsx("path", {
|
|
|
172
171
|
/* @__PURE__ */ r.jsx(
|
|
173
172
|
d,
|
|
174
173
|
{
|
|
175
|
-
ref:
|
|
176
|
-
onClick:
|
|
174
|
+
ref: C,
|
|
175
|
+
onClick: A,
|
|
177
176
|
disabled: a,
|
|
178
177
|
size: "small",
|
|
179
178
|
sx: {
|
|
@@ -189,7 +188,7 @@ const N = v(/* @__PURE__ */ r.jsx("path", {
|
|
|
189
188
|
/* @__PURE__ */ r.jsx(
|
|
190
189
|
d,
|
|
191
190
|
{
|
|
192
|
-
onClick:
|
|
191
|
+
onClick: w,
|
|
193
192
|
disabled: a,
|
|
194
193
|
size: "small",
|
|
195
194
|
sx: {
|
|
@@ -202,7 +201,7 @@ const N = v(/* @__PURE__ */ r.jsx("path", {
|
|
|
202
201
|
}
|
|
203
202
|
)
|
|
204
203
|
] }),
|
|
205
|
-
/* @__PURE__ */ r.jsx(W, { open:
|
|
204
|
+
/* @__PURE__ */ r.jsx(W, { open: k, anchorEl: C.current, placement: "top-start", sx: { zIndex: 1300 }, children: /* @__PURE__ */ r.jsx(H, { onClickAway: () => g(!1), children: /* @__PURE__ */ r.jsx(
|
|
206
205
|
s,
|
|
207
206
|
{
|
|
208
207
|
sx: {
|
|
@@ -295,7 +294,7 @@ const N = v(/* @__PURE__ */ r.jsx("path", {
|
|
|
295
294
|
children: /* @__PURE__ */ r.jsx(
|
|
296
295
|
_,
|
|
297
296
|
{
|
|
298
|
-
onEmojiClick:
|
|
297
|
+
onEmojiClick: L,
|
|
299
298
|
width: 300,
|
|
300
299
|
height: 400,
|
|
301
300
|
searchDisabled: !1,
|
|
@@ -309,5 +308,5 @@ const N = v(/* @__PURE__ */ r.jsx("path", {
|
|
|
309
308
|
}
|
|
310
309
|
);
|
|
311
310
|
export {
|
|
312
|
-
|
|
311
|
+
le as default
|
|
313
312
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { j as t } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
2
|
import * as n from "react";
|
|
3
|
-
import { C as I
|
|
4
|
-
import {
|
|
3
|
+
import { C as I } from "../ChevronLeft-zg9wurzn.js";
|
|
4
|
+
import { C as L } from "../ChevronRight-BKIP5v8z.js";
|
|
5
|
+
import { Box as s, IconButton as C } from "@mui/material";
|
|
5
6
|
import v from "../s-lazy-image/s-lazy-image.js";
|
|
6
|
-
const
|
|
7
|
+
const R = n.forwardRef(
|
|
7
8
|
({ sx: x, leftImage: g, rightImage: b, altLeft: w = "Left image", altRight: j = "Right image", initialPosition: y = 50, ...E }, r) => {
|
|
8
9
|
const [i, S] = n.useState(y), [o, d] = n.useState(!1), l = n.useRef(null), u = (e) => {
|
|
9
10
|
if (!l.current) return;
|
|
@@ -110,7 +111,7 @@ const C = n.forwardRef(
|
|
|
110
111
|
}
|
|
111
112
|
),
|
|
112
113
|
/* @__PURE__ */ t.jsx(
|
|
113
|
-
|
|
114
|
+
C,
|
|
114
115
|
{
|
|
115
116
|
className: "slider-handle",
|
|
116
117
|
sx: {
|
|
@@ -151,7 +152,7 @@ const C = n.forwardRef(
|
|
|
151
152
|
);
|
|
152
153
|
}
|
|
153
154
|
);
|
|
154
|
-
|
|
155
|
+
R.displayName = "SImageComparison";
|
|
155
156
|
export {
|
|
156
|
-
|
|
157
|
+
R as default
|
|
157
158
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { j as i } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Modal as
|
|
2
|
+
import { useState as E, useEffect as j } from "react";
|
|
3
|
+
import { Modal as R, Box as a, Paper as g, Typography as k, IconButton as m, Stack as L } from "@mui/material";
|
|
4
4
|
import { motion as b, AnimatePresence as A } from "framer-motion";
|
|
5
5
|
import D from "../s-lazy-image/s-lazy-image.js";
|
|
6
6
|
import { C as F } from "../Close-D4kX7Vbc.js";
|
|
7
|
-
import { C as T
|
|
7
|
+
import { C as T } from "../ChevronLeft-zg9wurzn.js";
|
|
8
|
+
import { C as $ } from "../ChevronRight-BKIP5v8z.js";
|
|
8
9
|
const w = ({ item: s, onClick: d, style: l = {}, objectFit: e = "contain", disableVideoControls: r = !1 }) => s.type === "video" ? /* @__PURE__ */ i.jsx(
|
|
9
10
|
a,
|
|
10
11
|
{
|
|
@@ -34,29 +35,29 @@ const w = ({ item: s, onClick: d, style: l = {}, objectFit: e = "contain", disab
|
|
|
34
35
|
...l
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
|
-
),
|
|
38
|
+
), X = ({
|
|
38
39
|
selectedItem: s,
|
|
39
40
|
isOpen: d,
|
|
40
41
|
onClose: l,
|
|
41
42
|
onItemChange: e,
|
|
42
43
|
mediaItems: r = [],
|
|
43
|
-
renderMediaItem:
|
|
44
|
+
renderMediaItem: f,
|
|
44
45
|
showNavigation: z = !0,
|
|
45
46
|
showThumbnailDock: I = !0,
|
|
46
47
|
showCounter: P = !0,
|
|
47
48
|
modalSx: S = {}
|
|
48
49
|
}) => {
|
|
49
|
-
const [
|
|
50
|
+
const [C, p] = E(s || null), t = s || C;
|
|
50
51
|
j(() => {
|
|
51
52
|
s && p(s);
|
|
52
53
|
}, [s]);
|
|
53
|
-
const c = z && r.length > 1 && t, n = t ? r.findIndex((o) => o.id === t.id) : -1,
|
|
54
|
+
const c = z && r.length > 1 && t, n = t ? r.findIndex((o) => o.id === t.id) : -1, h = r.length, v = () => {
|
|
54
55
|
if (c && n > 0) {
|
|
55
56
|
const o = r[n - 1];
|
|
56
57
|
e ? e(o) : p(o);
|
|
57
58
|
}
|
|
58
59
|
}, y = () => {
|
|
59
|
-
if (c && n <
|
|
60
|
+
if (c && n < h - 1) {
|
|
60
61
|
const o = r[n + 1];
|
|
61
62
|
e ? e(o) : p(o);
|
|
62
63
|
}
|
|
@@ -66,7 +67,7 @@ const w = ({ item: s, onClick: d, style: l = {}, objectFit: e = "contain", disab
|
|
|
66
67
|
if (d)
|
|
67
68
|
switch (u.key) {
|
|
68
69
|
case "ArrowLeft":
|
|
69
|
-
|
|
70
|
+
v();
|
|
70
71
|
break;
|
|
71
72
|
case "ArrowRight":
|
|
72
73
|
y();
|
|
@@ -77,8 +78,8 @@ const w = ({ item: s, onClick: d, style: l = {}, objectFit: e = "contain", disab
|
|
|
77
78
|
}
|
|
78
79
|
};
|
|
79
80
|
return document.addEventListener("keydown", o), () => document.removeEventListener("keydown", o);
|
|
80
|
-
}, [d, n,
|
|
81
|
-
|
|
81
|
+
}, [d, n, h, c]), !d || !t ? null : /* @__PURE__ */ i.jsx(
|
|
82
|
+
R,
|
|
82
83
|
{
|
|
83
84
|
open: d,
|
|
84
85
|
onClose: l,
|
|
@@ -159,7 +160,7 @@ const w = ({ item: s, onClick: d, style: l = {}, objectFit: e = "contain", disab
|
|
|
159
160
|
overflow: "hidden"
|
|
160
161
|
},
|
|
161
162
|
children: [
|
|
162
|
-
|
|
163
|
+
f ? f(t) : /* @__PURE__ */ i.jsx(w, { item: t }),
|
|
163
164
|
(t.title || t.desc) && /* @__PURE__ */ i.jsxs(
|
|
164
165
|
a,
|
|
165
166
|
{
|
|
@@ -189,7 +190,7 @@ const w = ({ item: s, onClick: d, style: l = {}, objectFit: e = "contain", disab
|
|
|
189
190
|
}
|
|
190
191
|
),
|
|
191
192
|
/* @__PURE__ */ i.jsx(
|
|
192
|
-
|
|
193
|
+
m,
|
|
193
194
|
{
|
|
194
195
|
"aria-label": "Close",
|
|
195
196
|
onClick: l,
|
|
@@ -218,17 +219,17 @@ const w = ({ item: s, onClick: d, style: l = {}, objectFit: e = "contain", disab
|
|
|
218
219
|
children: [
|
|
219
220
|
n + 1,
|
|
220
221
|
" / ",
|
|
221
|
-
|
|
222
|
+
h
|
|
222
223
|
]
|
|
223
224
|
}
|
|
224
225
|
),
|
|
225
226
|
c && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
226
227
|
/* @__PURE__ */ i.jsx(
|
|
227
|
-
|
|
228
|
+
m,
|
|
228
229
|
{
|
|
229
230
|
"aria-label": "Previous image",
|
|
230
231
|
onClick: (o) => {
|
|
231
|
-
o.stopPropagation(),
|
|
232
|
+
o.stopPropagation(), v();
|
|
232
233
|
},
|
|
233
234
|
disabled: n === 0,
|
|
234
235
|
sx: {
|
|
@@ -245,13 +246,13 @@ const w = ({ item: s, onClick: d, style: l = {}, objectFit: e = "contain", disab
|
|
|
245
246
|
}
|
|
246
247
|
),
|
|
247
248
|
/* @__PURE__ */ i.jsx(
|
|
248
|
-
|
|
249
|
+
m,
|
|
249
250
|
{
|
|
250
251
|
"aria-label": "Next image",
|
|
251
252
|
onClick: (o) => {
|
|
252
253
|
o.stopPropagation(), y();
|
|
253
254
|
},
|
|
254
|
-
disabled: n ===
|
|
255
|
+
disabled: n === h - 1,
|
|
255
256
|
sx: {
|
|
256
257
|
position: "absolute",
|
|
257
258
|
right: { xs: 8, sm: 10, md: 12 },
|
|
@@ -325,7 +326,7 @@ const w = ({ item: s, onClick: d, style: l = {}, objectFit: e = "contain", disab
|
|
|
325
326
|
transition: { type: "spring", stiffness: 400, damping: 25 }
|
|
326
327
|
},
|
|
327
328
|
children: [
|
|
328
|
-
|
|
329
|
+
f ? f(o, () => {
|
|
329
330
|
e ? e(o) : p(o);
|
|
330
331
|
}) : /* @__PURE__ */ i.jsx(
|
|
331
332
|
w,
|
|
@@ -381,5 +382,5 @@ const w = ({ item: s, onClick: d, style: l = {}, objectFit: e = "contain", disab
|
|
|
381
382
|
};
|
|
382
383
|
export {
|
|
383
384
|
w as DefaultMediaItem,
|
|
384
|
-
|
|
385
|
+
X as default
|
|
385
386
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
3
|
+
export interface SScrollToTopProps {
|
|
4
|
+
/**
|
|
5
|
+
* Handler called when the scroll-to-top button is clicked
|
|
6
|
+
*/
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
/**
|
|
9
|
+
* ID of the scrollable element to monitor. If not provided, monitors the window scroll
|
|
10
|
+
*/
|
|
11
|
+
scrollElementId?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Scroll position (in pixels) after which the button becomes visible
|
|
14
|
+
* @default 100
|
|
15
|
+
*/
|
|
16
|
+
threshold?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Custom icon to display instead of the default arrow
|
|
19
|
+
*/
|
|
20
|
+
icon?: React.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* System prop for custom styling
|
|
23
|
+
*/
|
|
24
|
+
sx?: SxProps<Theme>;
|
|
25
|
+
}
|
|
26
|
+
declare const SScrollToTop: React.MemoExoticComponent<({ onClick, scrollElementId, threshold, icon, sx }: SScrollToTopProps) => import("react/jsx-runtime").JSX.Element>;
|
|
27
|
+
export default SScrollToTop;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { j as i } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
+
import d from "react";
|
|
3
|
+
import { A as c } from "../ArrowUpward-DvTpkKgd.js";
|
|
4
|
+
import { useIsPassedPosition as m } from "../hooks/use-is-passed-position.js";
|
|
5
|
+
import { s as p } from "../styled-BD_erj7E.js";
|
|
6
|
+
import { B as f } from "../Box-DqmXop3Z.js";
|
|
7
|
+
const h = p(f)({
|
|
8
|
+
position: "fixed",
|
|
9
|
+
bottom: 20,
|
|
10
|
+
right: 20,
|
|
11
|
+
zIndex: 100,
|
|
12
|
+
display: "flex",
|
|
13
|
+
alignItems: "center",
|
|
14
|
+
justifyContent: "center",
|
|
15
|
+
borderRadius: "50%",
|
|
16
|
+
width: 40,
|
|
17
|
+
height: 40,
|
|
18
|
+
backgroundColor: "background.paper",
|
|
19
|
+
cursor: "pointer",
|
|
20
|
+
transition: "all 0.3s ease",
|
|
21
|
+
"&:hover": {
|
|
22
|
+
transform: "scale(1.1)"
|
|
23
|
+
}
|
|
24
|
+
}), u = d.memo(({ onClick: r, scrollElementId: o, threshold: e = 100, icon: a, sx: n }) => {
|
|
25
|
+
const s = m(o || window, e), l = () => {
|
|
26
|
+
if (r)
|
|
27
|
+
r();
|
|
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" });
|
|
33
|
+
};
|
|
34
|
+
return /* @__PURE__ */ i.jsx(
|
|
35
|
+
h,
|
|
36
|
+
{
|
|
37
|
+
sx: {
|
|
38
|
+
opacity: s ? 1 : 0,
|
|
39
|
+
visibility: s ? "visible" : "hidden",
|
|
40
|
+
...n
|
|
41
|
+
},
|
|
42
|
+
onClick: l,
|
|
43
|
+
children: a || /* @__PURE__ */ i.jsx(c, {})
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
});
|
|
47
|
+
u.displayName = "SScrollToTop";
|
|
48
|
+
export {
|
|
49
|
+
u as default
|
|
50
|
+
};
|