@solostylist/ui-kit 2.0.0 → 2.0.1
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/{gradients-90SYkAC0.js → gradients-DSnBONEQ.js} +1 -1
- package/dist/main.js +1 -1
- package/dist/palettes/index.js +1 -1
- package/dist/{palettes-Dw3PEYF5.js → palettes-CJLuEy1m.js} +163 -163
- package/dist/s-accordion/index.js +1 -1
- package/dist/s-accordion/s-accordion.js +70 -2
- package/dist/s-action-overlay/s-action-overlay.js +21 -21
- package/dist/s-autocomplete/s-autocomplete.js +1 -1
- package/dist/s-avatar/s-avatar.js +17 -17
- package/dist/s-blur-text/s-blur-text.js +16 -16
- package/dist/s-brand-logo/index.js +1 -1
- package/dist/s-brand-logo/s-brand-logo.js +1 -1
- package/dist/s-breadcrumbs/s-breadcrumbs.js +19 -19
- package/dist/s-carousel/index.js +1 -1
- package/dist/s-carousel/s-carousel.js +184 -2
- package/dist/s-category-card/s-category-card.js +22 -22
- package/dist/s-chat-input/index.js +1 -1
- package/dist/s-chat-input/s-chat-input.js +398 -2
- package/dist/s-chat-message/index.js +1 -1
- package/dist/s-chat-message/s-chat-message.js +314 -2
- package/dist/s-checkbox/s-checkbox.js +18 -19
- package/dist/s-chips/index.js +1 -1
- package/dist/s-chips/s-chips.js +174 -2
- package/dist/s-code-block/index.js +1 -1
- package/dist/s-code-block/s-code-block.js +103 -2
- package/dist/s-comment-message/index.js +1 -1
- package/dist/s-comment-message/s-comment-message.js +189 -2
- package/dist/s-copyable-text/s-copyable-text.js +18 -18
- package/dist/s-countdown/s-count-box.js +18 -18
- package/dist/s-data-table/index.js +1 -1
- package/dist/s-data-table/s-data-table.js +213 -2
- package/dist/s-date-picker/index.js +1 -1
- package/dist/s-date-picker/s-date-picker.js +106 -2
- package/dist/s-datetime-picker/index.js +1 -1
- package/dist/s-datetime-picker/s-datetime-picker.js +108 -2
- package/dist/s-dialog/index.js +1 -1
- package/dist/s-dialog/s-dialog.js +80 -2
- package/dist/s-dialog-confirm/s-dialog-confirm.js +32 -33
- package/dist/s-dialog-message/s-dialog-message.js +31 -32
- package/dist/s-empty/s-empty.js +13 -14
- package/dist/s-file-dropzone/index.js +1 -1
- package/dist/s-file-dropzone/s-file-dropzone.js +219 -2
- package/dist/s-file-icon/s-file-icon.js +87 -88
- package/dist/s-flex-box/s-flex-box.js +11 -12
- package/dist/s-form/s-form.js +15 -15
- package/dist/s-gallery/s-gallery.js +1 -1
- package/dist/s-glow-button/s-glow-button.js +9 -10
- package/dist/s-icon-button/s-icon-button.js +15 -16
- package/dist/s-image-comparison/s-image-comparison.js +29 -31
- package/dist/s-image-viewer/image-viewer-thumbnail-dock.js +1 -1
- package/dist/s-image-viewer/index.js +3 -3
- package/dist/s-image-viewer/s-image-viewer.js +266 -2
- package/dist/s-image-viewer/use-image-viewer-navigation.js +7 -7
- package/dist/s-label/s-label.js +26 -27
- package/dist/s-language-switcher/index.js +2 -2
- package/dist/s-language-switcher/s-language-switcher.js +150 -2
- package/dist/s-lazy-image/s-lazy-image.js +17 -18
- package/dist/s-link/index.js +1 -1
- package/dist/s-link/s-link.js +5 -2
- package/dist/s-localization-provider/index.js +1 -1
- package/dist/s-localization-provider/s-localization-provider.js +12 -2
- package/dist/s-nav-item/s-nav-item.js +16 -16
- package/dist/s-nav-items/index.js +2 -2
- package/dist/s-nav-items/s-nav-items.js +167 -2
- package/dist/s-no-ssr/index.js +1 -1
- package/dist/s-no-ssr/s-no-ssr.js +5 -2
- package/dist/s-pagination/index.js +1 -1
- package/dist/s-pagination/s-pagination.js +85 -2
- package/dist/s-pixel-reveal/s-pixel-reveal.js +20 -20
- package/dist/s-quantity-input/index.js +1 -1
- package/dist/s-quantity-input/s-quantity-input.js +246 -2
- package/dist/s-review/index.js +1 -1
- package/dist/s-review/s-review.js +272 -2
- package/dist/s-scroll-reveal/s-scroll-reveal.js +7 -8
- package/dist/s-scroll-to-top/s-scroll-to-top.js +27 -28
- package/dist/s-scroll-velocity/scroll-velocity-row.js +29 -29
- package/dist/s-select/index.js +1 -1
- package/dist/s-select/s-select.js +201 -2
- package/dist/s-select-list/s-select-list.js +47 -50
- package/dist/s-skeleton/s-skeleton.js +16 -17
- package/dist/s-snackbar-message/index.js +2 -2
- package/dist/s-snackbar-message/s-snackbar-message.js +89 -2
- package/dist/s-spotlight-cursor/s-spotlight-cursor.js +27 -27
- package/dist/s-status-illustration/s-status-illustration.js +74 -74
- package/dist/s-stripe/s-stripe.js +11 -12
- package/dist/s-stripe/stripe-input.js +3 -2
- package/dist/s-switch/index.js +1 -1
- package/dist/s-switch/s-switch.js +48 -2
- package/dist/s-tabs/s-tabs.js +48 -50
- package/dist/s-text-editor/index.js +1 -1
- package/dist/s-text-editor/s-text-editor-toolbar.js +216 -2
- package/dist/s-text-editor/s-text-editor.js +25 -26
- package/dist/s-text-field/index.js +1 -1
- package/dist/s-text-field/s-text-field.js +52 -2
- package/dist/s-text-shimmer/s-text-shimmer.js +1 -3
- package/dist/s-text-truncation/s-text-truncation.js +20 -20
- package/dist/s-theme-demo/s-theme-demo.js +8 -8
- package/dist/s-theme-demo/theme-demo-color-palette-section.js +1 -1
- package/dist/s-theme-demo/theme-demo-color-ramps-section.js +1 -1
- package/dist/s-theme-demo/theme-demo-components-section.js +265 -2
- package/dist/s-theme-demo/theme-demo-typography-section.js +10 -10
- package/dist/s-theme-provider/s-theme-provider.js +1 -1
- package/dist/s-theme-switch/index.js +1 -1
- package/dist/s-theme-switch/s-theme-switch.js +60 -2
- package/dist/s-tip/index.js +1 -1
- package/dist/s-tip/s-tip.js +61 -2
- package/dist/s-tool-bar/s-tool-bar.js +28 -28
- package/dist/s-tool-bar/tool-bar-action-buttons.js +55 -2
- package/dist/s-tool-bar/tool-bar-image-input.js +148 -2
- package/dist/s-tool-bar/tool-bar-inputs.js +55 -55
- package/dist/s-tool-item/s-tool-item.js +22 -22
- package/dist/s-two-pane-layout/s-two-pane-layout.js +32 -32
- package/dist/s-zoom-image/s-zoom-image.js +18 -19
- package/dist/theme/components/autocomplete.js +43 -2
- package/dist/theme/components/avatar.js +9 -2
- package/dist/theme/components/card.js +3 -3
- package/dist/theme/components/checkbox.js +90 -2
- package/dist/theme/components/chip.js +3 -3
- package/dist/theme/components/components.js +20 -20
- package/dist/theme/components/date-calendar.js +1 -0
- package/dist/theme/components/day-calendar.js +1 -0
- package/dist/theme/components/field-label-styles.js +19 -2
- package/dist/theme/components/form-label.js +1 -1
- package/dist/theme/components/list-item-button.js +1 -1
- package/dist/theme/components/list-item.js +7 -7
- package/dist/theme/components/month-calendar.js +14 -13
- package/dist/theme/components/multi-section-digital-clock-section.js +1 -0
- package/dist/theme/components/outlined-input.js +6 -6
- package/dist/theme/components/picker-day.js +1 -0
- package/dist/theme/components/pickers-arrow-switcher.js +1 -0
- package/dist/theme/components/pickers-calendar-header.js +3 -2
- package/dist/theme/components/select.js +6 -6
- package/dist/theme/components/switch.js +1 -1
- package/dist/theme/components/table-pagination.js +1 -1
- package/dist/theme/components/toggle-button.js +93 -2
- package/dist/theme/components/year-calendar.js +14 -13
- package/dist/theme/theme-primitives.js +2 -2
- package/dist/{theme-primitives-Dt_DT9b5.js → theme-primitives-CRfnMsNy.js} +108 -109
- package/dist/utils/dayjs.js +9 -146
- package/package.json +1 -1
- package/dist/Add-COc9VdNg.js +0 -6
- package/dist/ArrowUpward-D88i2k4q.js +0 -6
- package/dist/Box-9oeZgA1U.js +0 -46
- package/dist/Button-DgIFcM44.js +0 -534
- package/dist/ButtonBase-DxKtpFYs.js +0 -747
- package/dist/Checkbox-BoZu9z2l.js +0 -152
- package/dist/ChevronRight-BxsM4W78.js +0 -6
- package/dist/Close-o4HFfK0I.js +0 -6
- package/dist/Collapse-zgIFP5Sj.js +0 -266
- package/dist/ContentCopy-5unyTYXy.js +0 -6
- package/dist/DefaultPropsProvider-ebWx4_5E.js +0 -128
- package/dist/DialogContent-CAry6lVf.js +0 -450
- package/dist/Download-DtvoRwpl.js +0 -6
- package/dist/ExpandMore-Ba5bg6s-.js +0 -6
- package/dist/Favorite-B_GsElm0.js +0 -6
- package/dist/FormControl-BxmM9UP6.js +0 -221
- package/dist/FormControlLabel-DzgppcC_.js +0 -173
- package/dist/Grow-zRRuwUl-.js +0 -121
- package/dist/InfoOutlined-VC7X46pc.js +0 -6
- package/dist/List-CnGIAXAS.js +0 -103
- package/dist/ListContext-B1HQt3OD.js +0 -6
- package/dist/Menu-C4Zabc9U.js +0 -504
- package/dist/MenuItem-rXJfQzDC.js +0 -223
- package/dist/MenuList-DDV8J-yd.js +0 -407
- package/dist/Modal-jAiibALV.js +0 -707
- package/dist/Paper-ixxCeml9.js +0 -115
- package/dist/Popper-CVYyMS3c.js +0 -1350
- package/dist/Portal-AnyvFRC4.js +0 -53
- package/dist/RtlProvider-B7uVJXUY.js +0 -19
- package/dist/Skeleton-iZFynl7z.js +0 -220
- package/dist/Stack-UMc4dV4G.js +0 -158
- package/dist/SwitchBase-D7zqrstO.js +0 -198
- package/dist/Tooltip-DbCd6rgF.js +0 -447
- package/dist/Typography-yXjc7kVP.js +0 -168
- package/dist/UnfoldMoreRounded-DsN0HVDV.js +0 -6
- package/dist/appendOwnerState-CELpvdMz.js +0 -17
- package/dist/assets/stripe-input.css +0 -1
- package/dist/autocomplete-B_4y84Ba.js +0 -43
- package/dist/avatar-BHuZu3DN.js +0 -10
- package/dist/buttonBaseClasses-BvBqFLb_.js +0 -13
- package/dist/capitalize-CccCFNpQ.js +0 -5
- package/dist/checkbox-BKMZEVU5.js +0 -88
- package/dist/checkboxClasses-CEsqS4sc.js +0 -18
- package/dist/chunk-C_CI6nMA.js +0 -13
- package/dist/clsx-DGZSe4Nt.js +0 -16
- package/dist/colorManipulator-DmUjcif3.js +0 -129
- package/dist/contains-WOhYaq1E.js +0 -16
- package/dist/createSimplePaletteValueFilter-C1gWywW_.js +0 -14
- package/dist/createSvgIcon-B0SZlJF1.js +0 -155
- package/dist/createTheme-xB2Em0Na.js +0 -1869
- package/dist/defaultTheme-BaGcIzCh.js +0 -210
- package/dist/elementAcceptingRef-DhkNAkFH.js +0 -472
- package/dist/exactProp-C_IsucXf.js +0 -13
- package/dist/field-label-styles-BOyhp6gw.js +0 -50
- package/dist/formLabelClasses-B0Fa-86T.js +0 -18
- package/dist/generateUtilityClass-PAIOm1jC.js +0 -34
- package/dist/generateUtilityClasses-DvX505Gy.js +0 -10
- package/dist/iconButtonClasses-CkciZuIe.js +0 -27
- package/dist/inputAdornmentClasses-D5yYK5bM.js +0 -19
- package/dist/inputBaseClasses-DuWQGq8Z.js +0 -25
- package/dist/integerPropType-Disnft4a.js +0 -27
- package/dist/isEventHandler-8dPdzK9U.js +0 -7
- package/dist/isFocusVisible-Y7157FQS.js +0 -35
- package/dist/isLayoutSupported-Ceir7nyK.js +0 -21
- package/dist/listItemButtonClasses-DbL-aTVf.js +0 -18
- package/dist/memoTheme-qFyKAk7y.js +0 -15
- package/dist/mergeSlotProps-xl1-PgWL.js +0 -45
- package/dist/monthCalendarClasses-BYVHyEfI.js +0 -14
- package/dist/objectWithoutPropertiesLoose-Cpds-4w8.js +0 -23
- package/dist/outlinedInputClasses-DECY98u0.js +0 -17
- package/dist/pickersCalendarHeaderClasses-CIj0gBye.js +0 -12
- package/dist/prop-types-BzYPyWN7.js +0 -516
- package/dist/resolveProps-7jIA45vn.js +0 -30
- package/dist/s-accordion-B8nlrdFc.js +0 -487
- package/dist/s-carousel-Dnjke4JQ.js +0 -1353
- package/dist/s-chat-input-DCS0mJE4.js +0 -419
- package/dist/s-chat-message-9oollJJq.js +0 -315
- package/dist/s-chips-WqGdqHW9.js +0 -176
- package/dist/s-code-block-DzGoGg5e.js +0 -658
- package/dist/s-comment-message-C6kfgRjv.js +0 -191
- package/dist/s-data-table-B1TGVupB.js +0 -805
- package/dist/s-date-picker-BpX4HmBp.js +0 -656
- package/dist/s-datetime-picker-ByzW44E0.js +0 -3878
- package/dist/s-dialog-BLiyjLkx.js +0 -123
- package/dist/s-file-dropzone-CVQpYRdY.js +0 -422
- package/dist/s-image-viewer-DNIEYdtL.js +0 -269
- package/dist/s-language-switcher-D-1nywT3.js +0 -251
- package/dist/s-link-CAMTGfd9.js +0 -234
- package/dist/s-localization-provider-Xw3NO2uP.js +0 -519
- package/dist/s-nav-items-BUp7DddG.js +0 -327
- package/dist/s-no-ssr-D8tPdDfh.js +0 -25
- package/dist/s-pagination-Dt8Pk5Tp.js +0 -606
- package/dist/s-quantity-input-mYCixlJc.js +0 -246
- package/dist/s-review-DSXXtWlL.js +0 -272
- package/dist/s-select-dwY2DYa9.js +0 -204
- package/dist/s-snackbar-message-3Z6VySlB.js +0 -808
- package/dist/s-switch-B8bZAzLh.js +0 -307
- package/dist/s-text-editor-toolbar-D-XgFQix.js +0 -2121
- package/dist/s-text-field-BM4qk0mf.js +0 -51
- package/dist/s-theme-switch-BLMz1_m2.js +0 -60
- package/dist/s-tip-ty41ePQm.js +0 -62
- package/dist/selectClasses-DoUlWfzV.js +0 -22
- package/dist/styled-Bog8QCl3.js +0 -163
- package/dist/svgIconClasses-C8D4AsMj.js +0 -20
- package/dist/switchClasses-eiq1bkQN.js +0 -23
- package/dist/theme-demo-components-section-gtIYRngY.js +0 -267
- package/dist/toggle-button-Cxi5CfXC.js +0 -104
- package/dist/tool-bar-action-buttons-Dt-pV3GA.js +0 -54
- package/dist/tool-bar-image-input-BXlll_hV.js +0 -148
- package/dist/typographyClasses-BLM3NmYd.js +0 -31
- package/dist/useControlled-BeB0W_Ui.js +0 -5
- package/dist/useControlled-C4QJnpiR.js +0 -29
- package/dist/useEnhancedEffect-Bc3gBClC.js +0 -5
- package/dist/useEnhancedEffect-DFq_FMGX.js +0 -5
- package/dist/useEventCallback-CVqMfiG_.js +0 -14
- package/dist/useForkRef-CKneCEtr.js +0 -29
- package/dist/useFormControl-iWLrn7Ek.js +0 -18
- package/dist/useMobilePicker-C4UQFvkj.js +0 -7580
- package/dist/useSlot-iIu8ek6E.js +0 -83
- package/dist/useTheme-BIWMbX3i.js +0 -9
- package/dist/useThemeProps-BI9yq95N.js +0 -19
- package/dist/useThemeProps-Cr28OQu3.js +0 -13
- package/dist/utils-oJyTAkZY.js +0 -214
- package/dist/warning-CNkSZkq6.js +0 -98
- package/dist/yearCalendarClasses-CuAQumpz.js +0 -14
- /package/dist/{colors-DKqWMRgW.js → colors-CNjL5fhq.js} +0 -0
- /package/dist/{s-brand-logo-jtAJZQIv.js → s-brand-logo-CErW9Slg.js} +0 -0
- /package/dist/{utils-DaSrTYUS.js → utils-CMeAWSRO.js} +0 -0
|
@@ -1,2 +1,272 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { i as e } from "../utils-CMeAWSRO.js";
|
|
2
|
+
import { toSxArray as t } from "../utils/sx.js";
|
|
3
|
+
import { SLazyImage as n } from "../s-lazy-image/s-lazy-image.js";
|
|
4
|
+
import { SSkeleton as r } from "../s-skeleton/s-skeleton.js";
|
|
5
|
+
import { SAvatar as i } from "../s-avatar/s-avatar.js";
|
|
6
|
+
import { SImageViewer as a } from "../s-image-viewer/s-image-viewer.js";
|
|
7
|
+
import { SRating as ee } from "../s-rating/s-rating.js";
|
|
8
|
+
import o, { useId as s, useState as c } from "react";
|
|
9
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
10
|
+
import { ThumbDown as te, ThumbUp as d } from "@mui/icons-material";
|
|
11
|
+
import { Box as f, ButtonBase as ne, Divider as p, IconButton as m, Stack as h, Typography as g, styled as _, useTheme as re, useThemeProps as ie } from "@mui/material";
|
|
12
|
+
import { useControlled as v } from "@mui/material/utils";
|
|
13
|
+
//#region lib/s-review/s-review.tsx
|
|
14
|
+
var y = _(f, {
|
|
15
|
+
name: "SReview",
|
|
16
|
+
slot: "Root"
|
|
17
|
+
})({}), b = o.forwardRef(function(o, _) {
|
|
18
|
+
let b = ie({
|
|
19
|
+
props: o,
|
|
20
|
+
name: "SReview"
|
|
21
|
+
}), ae = re(), { reviewId: x, userName: S, userAvatar: C, rating: w, onRatingChange: oe, reviewContent: T, datetime: E, images: D, userHelpfulVote: O, defaultUserHelpfulVote: k = null, helpfulYes: A, defaultHelpfulYes: j = 0, helpfulNo: se, defaultHelpfulNo: M = 0, onHelpfulVote: ce, showHelpfulSection: N = !0, avatarSize: P = 48, maxRating: F = 5, readOnly: I = !0, showDivider: L = !0, loading: R = !1, sx: z, ...B } = b, V = s(), H = x ?? B.id ?? V, [U, W] = v({
|
|
22
|
+
controlled: O,
|
|
23
|
+
default: k,
|
|
24
|
+
name: "SReview",
|
|
25
|
+
state: "userHelpfulVote"
|
|
26
|
+
}), [G, le] = v({
|
|
27
|
+
controlled: A,
|
|
28
|
+
default: j,
|
|
29
|
+
name: "SReview",
|
|
30
|
+
state: "helpfulYes"
|
|
31
|
+
}), [K, ue] = v({
|
|
32
|
+
controlled: se,
|
|
33
|
+
default: M,
|
|
34
|
+
name: "SReview",
|
|
35
|
+
state: "helpfulNo"
|
|
36
|
+
}), q = {
|
|
37
|
+
...b,
|
|
38
|
+
avatarSize: P,
|
|
39
|
+
defaultHelpfulNo: M,
|
|
40
|
+
defaultHelpfulYes: j,
|
|
41
|
+
defaultUserHelpfulVote: k,
|
|
42
|
+
helpfulNo: K,
|
|
43
|
+
helpfulYes: G,
|
|
44
|
+
maxRating: F,
|
|
45
|
+
loading: R,
|
|
46
|
+
readOnly: I,
|
|
47
|
+
reviewId: H,
|
|
48
|
+
showDivider: L,
|
|
49
|
+
showHelpfulSection: N,
|
|
50
|
+
userHelpfulVote: U
|
|
51
|
+
}, [de, J] = c(!1), [Y, X] = c(null), Z = (e, t) => {
|
|
52
|
+
let n = U === t ? null : t, r = G, i = K;
|
|
53
|
+
U === "yes" && (r = Math.max(0, r - 1)), U === "no" && (i = Math.max(0, i - 1)), n === "yes" && (r += 1), n === "no" && (i += 1), W(n), le(r), ue(i), ce?.(e, H, n);
|
|
54
|
+
}, Q = D?.map((e, t) => ({
|
|
55
|
+
id: `review-${H}-image-${t}`,
|
|
56
|
+
type: "image",
|
|
57
|
+
url: e,
|
|
58
|
+
title: `Review image ${t + 1}`,
|
|
59
|
+
desc: `Image ${t + 1} from ${S}'s review`
|
|
60
|
+
})) ?? [], fe = (e) => {
|
|
61
|
+
let t = Q[e];
|
|
62
|
+
t && (X(t), J(!0));
|
|
63
|
+
}, $ = () => {
|
|
64
|
+
J(!1), X(null);
|
|
65
|
+
}, pe = (e, t) => {
|
|
66
|
+
X(t);
|
|
67
|
+
}, me = e(E);
|
|
68
|
+
return R ? /* @__PURE__ */ u(y, {
|
|
69
|
+
...B,
|
|
70
|
+
ref: _,
|
|
71
|
+
ownerState: q,
|
|
72
|
+
sx: [{ py: 2 }, ...t(z)],
|
|
73
|
+
children: [/* @__PURE__ */ u(h, {
|
|
74
|
+
direction: "row",
|
|
75
|
+
spacing: 2,
|
|
76
|
+
sx: { alignItems: "flex-start" },
|
|
77
|
+
children: [/* @__PURE__ */ l(r, {
|
|
78
|
+
variant: "circular",
|
|
79
|
+
width: P,
|
|
80
|
+
height: P,
|
|
81
|
+
sx: { flexShrink: 0 }
|
|
82
|
+
}), /* @__PURE__ */ u(f, {
|
|
83
|
+
sx: { flex: 1 },
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ u(h, {
|
|
86
|
+
direction: "row",
|
|
87
|
+
spacing: 2,
|
|
88
|
+
sx: {
|
|
89
|
+
alignItems: "center",
|
|
90
|
+
mb: 1
|
|
91
|
+
},
|
|
92
|
+
children: [/* @__PURE__ */ l(r, {
|
|
93
|
+
width: 120,
|
|
94
|
+
height: 20
|
|
95
|
+
}), /* @__PURE__ */ l(r, {
|
|
96
|
+
width: 80,
|
|
97
|
+
height: 16
|
|
98
|
+
})]
|
|
99
|
+
}),
|
|
100
|
+
/* @__PURE__ */ l(f, {
|
|
101
|
+
sx: { mb: 1 },
|
|
102
|
+
children: /* @__PURE__ */ l(r, {
|
|
103
|
+
width: 100,
|
|
104
|
+
height: 20
|
|
105
|
+
})
|
|
106
|
+
}),
|
|
107
|
+
/* @__PURE__ */ l(r, {
|
|
108
|
+
height: 16,
|
|
109
|
+
sx: { mb: .5 }
|
|
110
|
+
}),
|
|
111
|
+
N && /* @__PURE__ */ u(h, {
|
|
112
|
+
direction: "row",
|
|
113
|
+
spacing: 1,
|
|
114
|
+
sx: {
|
|
115
|
+
display: "inline-flex",
|
|
116
|
+
alignItems: "center"
|
|
117
|
+
},
|
|
118
|
+
children: [
|
|
119
|
+
/* @__PURE__ */ l(r, {
|
|
120
|
+
width: 140,
|
|
121
|
+
height: 16,
|
|
122
|
+
sx: { mr: 2 }
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ l(r, { preset: "icon-button" }),
|
|
125
|
+
/* @__PURE__ */ l(r, {
|
|
126
|
+
width: 20,
|
|
127
|
+
height: 16
|
|
128
|
+
}),
|
|
129
|
+
/* @__PURE__ */ l(r, { preset: "icon-button" }),
|
|
130
|
+
/* @__PURE__ */ l(r, {
|
|
131
|
+
width: 20,
|
|
132
|
+
height: 16
|
|
133
|
+
})
|
|
134
|
+
]
|
|
135
|
+
})
|
|
136
|
+
]
|
|
137
|
+
})]
|
|
138
|
+
}), L && /* @__PURE__ */ l(p, { sx: { mt: 2 } })]
|
|
139
|
+
}) : /* @__PURE__ */ u(y, {
|
|
140
|
+
...B,
|
|
141
|
+
ref: _,
|
|
142
|
+
ownerState: q,
|
|
143
|
+
sx: [{ py: 2 }, ...t(z)],
|
|
144
|
+
children: [
|
|
145
|
+
/* @__PURE__ */ u(h, {
|
|
146
|
+
direction: "row",
|
|
147
|
+
spacing: 2,
|
|
148
|
+
sx: { alignItems: "flex-start" },
|
|
149
|
+
children: [/* @__PURE__ */ l(i, {
|
|
150
|
+
src: C,
|
|
151
|
+
name: S,
|
|
152
|
+
size: P
|
|
153
|
+
}), /* @__PURE__ */ u(f, {
|
|
154
|
+
sx: { flex: 1 },
|
|
155
|
+
children: [
|
|
156
|
+
/* @__PURE__ */ l(g, {
|
|
157
|
+
variant: "subtitle1",
|
|
158
|
+
children: S
|
|
159
|
+
}),
|
|
160
|
+
/* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(ee, {
|
|
161
|
+
value: w,
|
|
162
|
+
max: F,
|
|
163
|
+
onChange: oe,
|
|
164
|
+
readOnly: I
|
|
165
|
+
}) }),
|
|
166
|
+
/* @__PURE__ */ l(g, {
|
|
167
|
+
variant: "body1",
|
|
168
|
+
sx: { lineHeight: 1.6 },
|
|
169
|
+
children: T
|
|
170
|
+
}),
|
|
171
|
+
/* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(g, {
|
|
172
|
+
variant: "caption",
|
|
173
|
+
sx: { mb: 2 },
|
|
174
|
+
children: me
|
|
175
|
+
}) }),
|
|
176
|
+
D && D.length > 0 && /* @__PURE__ */ l(h, {
|
|
177
|
+
direction: "row",
|
|
178
|
+
sx: {
|
|
179
|
+
mt: 1,
|
|
180
|
+
mb: 2,
|
|
181
|
+
flexWrap: "wrap",
|
|
182
|
+
gap: 1
|
|
183
|
+
},
|
|
184
|
+
children: D.map((e, t) => /* @__PURE__ */ l(ne, {
|
|
185
|
+
"aria-label": `Open review image ${t + 1}`,
|
|
186
|
+
component: "div",
|
|
187
|
+
onClick: () => fe(t),
|
|
188
|
+
sx: {
|
|
189
|
+
borderRadius: 1,
|
|
190
|
+
transition: (e) => e.transitions.create("opacity", { duration: e.transitions.duration.shorter }),
|
|
191
|
+
"&.Mui-focusVisible": {
|
|
192
|
+
outline: "2px solid",
|
|
193
|
+
outlineColor: "primary.main",
|
|
194
|
+
outlineOffset: 2
|
|
195
|
+
},
|
|
196
|
+
"@media (hover: hover) and (pointer: fine)": { "&:hover": { opacity: ae.interaction.mediaHoverOpacity } }
|
|
197
|
+
},
|
|
198
|
+
children: /* @__PURE__ */ l(n, {
|
|
199
|
+
src: e,
|
|
200
|
+
alt: `Review image ${t + 1}`,
|
|
201
|
+
width: 80,
|
|
202
|
+
height: 80,
|
|
203
|
+
slotProps: { image: { sx: { objectFit: "cover" } } }
|
|
204
|
+
})
|
|
205
|
+
}, `${e}-${t}`))
|
|
206
|
+
}),
|
|
207
|
+
N && /* @__PURE__ */ u(h, {
|
|
208
|
+
direction: "row",
|
|
209
|
+
spacing: 1,
|
|
210
|
+
sx: {
|
|
211
|
+
display: "inline-flex",
|
|
212
|
+
alignItems: "center"
|
|
213
|
+
},
|
|
214
|
+
children: [
|
|
215
|
+
/* @__PURE__ */ l(g, {
|
|
216
|
+
variant: "body2",
|
|
217
|
+
sx: { mr: 2 },
|
|
218
|
+
children: "Was this review helpful?"
|
|
219
|
+
}),
|
|
220
|
+
/* @__PURE__ */ l(m, {
|
|
221
|
+
"aria-label": "Mark review as helpful",
|
|
222
|
+
"aria-pressed": U === "yes",
|
|
223
|
+
onClick: (e) => Z(e, "yes"),
|
|
224
|
+
sx: {
|
|
225
|
+
color: U === "yes" ? "primary.main" : "text.secondary",
|
|
226
|
+
"&:hover": { backgroundColor: "action.hover" }
|
|
227
|
+
},
|
|
228
|
+
children: /* @__PURE__ */ l(d, { fontSize: "small" })
|
|
229
|
+
}),
|
|
230
|
+
/* @__PURE__ */ l(g, {
|
|
231
|
+
variant: "caption",
|
|
232
|
+
children: G
|
|
233
|
+
}),
|
|
234
|
+
/* @__PURE__ */ l(m, {
|
|
235
|
+
"aria-label": "Mark review as not helpful",
|
|
236
|
+
"aria-pressed": U === "no",
|
|
237
|
+
onClick: (e) => Z(e, "no"),
|
|
238
|
+
sx: {
|
|
239
|
+
color: U === "no" ? "error.main" : "text.secondary",
|
|
240
|
+
ml: 1,
|
|
241
|
+
"&:hover": { backgroundColor: "action.hover" }
|
|
242
|
+
},
|
|
243
|
+
children: /* @__PURE__ */ l(te, { fontSize: "small" })
|
|
244
|
+
}),
|
|
245
|
+
/* @__PURE__ */ l(g, {
|
|
246
|
+
variant: "caption",
|
|
247
|
+
children: K
|
|
248
|
+
})
|
|
249
|
+
]
|
|
250
|
+
})
|
|
251
|
+
]
|
|
252
|
+
})]
|
|
253
|
+
}),
|
|
254
|
+
L && /* @__PURE__ */ l(p, { sx: { mt: 2 } }),
|
|
255
|
+
/* @__PURE__ */ l(a, {
|
|
256
|
+
"aria-label": "Review media viewer",
|
|
257
|
+
open: de,
|
|
258
|
+
onClose: $,
|
|
259
|
+
onCloseButtonClick: $,
|
|
260
|
+
selectedItem: Y,
|
|
261
|
+
onItemChange: pe,
|
|
262
|
+
mediaItems: Q,
|
|
263
|
+
showNavigation: Q.length > 1,
|
|
264
|
+
showThumbnailDock: Q.length > 1,
|
|
265
|
+
showCounter: Q.length > 1
|
|
266
|
+
})
|
|
267
|
+
]
|
|
268
|
+
});
|
|
269
|
+
});
|
|
270
|
+
b.displayName = "SReview";
|
|
271
|
+
//#endregion
|
|
272
|
+
export { b as SReview, b as default };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "
|
|
3
|
-
import { useScrollAnimation as n } from "../hooks/use-scroll-animation.js";
|
|
1
|
+
import { useScrollAnimation as e } from "../hooks/use-scroll-animation.js";
|
|
2
|
+
import { styled as t, useThemeProps as n } from "@mui/material/styles";
|
|
4
3
|
import r from "react";
|
|
5
4
|
import { jsx as i } from "react/jsx-runtime";
|
|
6
5
|
import { Box as a } from "@mui/material";
|
|
7
6
|
import { motion as o, useReducedMotion as s } from "framer-motion";
|
|
8
7
|
//#region lib/s-scroll-reveal/s-scroll-reveal.tsx
|
|
9
|
-
var c =
|
|
8
|
+
var c = t(a, {
|
|
10
9
|
name: "SScrollReveal",
|
|
11
10
|
slot: "Root"
|
|
12
11
|
})({ overflow: "hidden" });
|
|
@@ -16,9 +15,9 @@ function l(e) {
|
|
|
16
15
|
function u(e, t, n, r) {
|
|
17
16
|
return t ? e ? "visible" : "hidden" : e ? r : n;
|
|
18
17
|
}
|
|
19
|
-
var d = r.forwardRef(function(
|
|
20
|
-
let f =
|
|
21
|
-
props:
|
|
18
|
+
var d = r.forwardRef(function(t, d) {
|
|
19
|
+
let f = n({
|
|
20
|
+
props: t,
|
|
22
21
|
name: "SScrollReveal"
|
|
23
22
|
}), { children: p, duration: m = .6, ease: h = "easeOut", threshold: g, rootMargin: _, delay: v, direction: y, distance: b, scaleOnReveal: x = !0, rotateOnReveal: S = !1, stagger: C = !0, staggerDelay: w = .1, sx: T, ...E } = f, D = {
|
|
24
23
|
...f,
|
|
@@ -28,7 +27,7 @@ var d = r.forwardRef(function(e, d) {
|
|
|
28
27
|
scaleOnReveal: x,
|
|
29
28
|
stagger: C,
|
|
30
29
|
staggerDelay: w
|
|
31
|
-
}, O = s(), { ref: k, animate: A, initialPosition: j, finalPosition: M } =
|
|
30
|
+
}, O = s(), { ref: k, animate: A, initialPosition: j, finalPosition: M } = e({
|
|
32
31
|
threshold: g,
|
|
33
32
|
rootMargin: _,
|
|
34
33
|
delay: v,
|
|
@@ -1,37 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "../
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { useMediaQuery as s, useScrollTrigger as c } from "@mui/material";
|
|
1
|
+
import { reducedMotionMedia as e } from "../theme/components/action-styles.js";
|
|
2
|
+
import { SIconButton as t } from "../s-icon-button/s-icon-button.js";
|
|
3
|
+
import { styled as n, useThemeProps as r } from "@mui/material/styles";
|
|
4
|
+
import * as i from "react";
|
|
5
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
6
|
+
import { useMediaQuery as o, useScrollTrigger as s } from "@mui/material";
|
|
7
|
+
import c from "@mui/icons-material/ArrowUpward";
|
|
9
8
|
//#region lib/s-scroll-to-top/s-scroll-to-top.tsx
|
|
10
|
-
var l =
|
|
9
|
+
var l = n(t, {
|
|
11
10
|
name: "SScrollToTop",
|
|
12
11
|
slot: "Root"
|
|
13
|
-
})(({ theme:
|
|
14
|
-
let r =
|
|
12
|
+
})(({ theme: t, ownerState: n }) => {
|
|
13
|
+
let r = t.vars ?? t;
|
|
15
14
|
return {
|
|
16
15
|
position: "fixed",
|
|
17
|
-
bottom:
|
|
18
|
-
right:
|
|
16
|
+
bottom: t.spacing(2),
|
|
17
|
+
right: t.spacing(2),
|
|
19
18
|
zIndex: r.zIndex.fab,
|
|
20
|
-
opacity: +!!
|
|
21
|
-
visibility:
|
|
22
|
-
transition: [
|
|
23
|
-
[
|
|
19
|
+
opacity: +!!n.isScrolled,
|
|
20
|
+
visibility: n.isScrolled ? "visible" : "hidden",
|
|
21
|
+
transition: [t.transitions.create(["opacity", "visibility"]), t.transitions.create(["background-color", "color"], { duration: t.transitions.duration.shorter })].join(","),
|
|
22
|
+
[e]: { transition: "none" }
|
|
24
23
|
};
|
|
25
|
-
}), u =
|
|
26
|
-
let { target:
|
|
24
|
+
}), u = i.forwardRef(function(e, t) {
|
|
25
|
+
let { target: n, ...i } = r({
|
|
27
26
|
props: e,
|
|
28
27
|
name: "SScrollToTop"
|
|
29
|
-
}), { "aria-label": u = "Scroll to top", disableHysteresis: d = !0, icon: f, onClick: p, sx: m, tabIndex: h = 0, threshold: g = 100, ..._ } =
|
|
28
|
+
}), { "aria-label": u = "Scroll to top", disableHysteresis: d = !0, icon: f, onClick: p, sx: m, tabIndex: h = 0, threshold: g = 100, ..._ } = i, v = s({
|
|
30
29
|
disableHysteresis: d,
|
|
31
|
-
target:
|
|
30
|
+
target: n,
|
|
32
31
|
threshold: g
|
|
33
|
-
}), y =
|
|
34
|
-
...
|
|
32
|
+
}), y = o("(prefers-reduced-motion: reduce)"), b = {
|
|
33
|
+
...i,
|
|
35
34
|
"aria-label": u,
|
|
36
35
|
disableHysteresis: d,
|
|
37
36
|
isScrolled: v,
|
|
@@ -39,15 +38,15 @@ var l = e(i, {
|
|
|
39
38
|
threshold: g
|
|
40
39
|
}, x = (e) => {
|
|
41
40
|
if (p?.(e), e.defaultPrevented) return;
|
|
42
|
-
let t =
|
|
41
|
+
let t = n === void 0 ? typeof window > "u" ? null : window : n;
|
|
43
42
|
typeof t?.scrollTo == "function" && t.scrollTo({
|
|
44
43
|
top: 0,
|
|
45
44
|
behavior: y ? "auto" : "smooth"
|
|
46
45
|
});
|
|
47
46
|
};
|
|
48
|
-
return /* @__PURE__ */
|
|
47
|
+
return /* @__PURE__ */ a(l, {
|
|
49
48
|
..._,
|
|
50
|
-
ref:
|
|
49
|
+
ref: t,
|
|
51
50
|
"aria-hidden": v ? void 0 : !0,
|
|
52
51
|
"aria-label": u,
|
|
53
52
|
onClick: x,
|
|
@@ -55,9 +54,9 @@ var l = e(i, {
|
|
|
55
54
|
tabIndex: v ? h : -1,
|
|
56
55
|
variant: "overlay",
|
|
57
56
|
sx: m,
|
|
58
|
-
children: f ?? /* @__PURE__ */
|
|
57
|
+
children: f ?? /* @__PURE__ */ a(c, {})
|
|
59
58
|
});
|
|
60
|
-
}), d =
|
|
59
|
+
}), d = i.memo(u);
|
|
61
60
|
d.displayName = "SScrollToTop";
|
|
62
61
|
//#endregion
|
|
63
62
|
export { d as SScrollToTop, d as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { toSxArray as e } from "../utils/sx.js";
|
|
2
|
-
import { t } from "
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { ScrollVelocityContext as t } from "./scroll-velocity-container.js";
|
|
3
|
+
import n, { useContext as r, useEffect as i, useRef as a, useState as o } from "react";
|
|
4
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
5
|
+
import { Box as c, useTheme as l } from "@mui/material";
|
|
6
|
+
import { useForkRef as u } from "@mui/material/utils";
|
|
7
7
|
import { motion as d, useAnimationFrame as f, useMotionValue as p, useScroll as m, useSpring as h, useTransform as g, useVelocity as _ } from "framer-motion";
|
|
8
8
|
//#region lib/s-scroll-velocity/scroll-velocity-row.tsx
|
|
9
9
|
var v = (e, t, n) => {
|
|
@@ -13,12 +13,12 @@ var v = (e, t, n) => {
|
|
|
13
13
|
function y(e) {
|
|
14
14
|
return Array.from({ length: e }, (e, t) => `scroll-velocity-copy-${t + 1}`);
|
|
15
15
|
}
|
|
16
|
-
var b =
|
|
17
|
-
let C =
|
|
18
|
-
|
|
16
|
+
var b = n.forwardRef(function({ children: t, baseVelocity: r = 5, direction: m = 1, spacing: h = 0, sx: _, velocityFactor: b, ...x }, S) {
|
|
17
|
+
let C = l(), w = a(null), T = u(w, S), E = a(null), [D, O] = o(1), k = p(0), A = a(m >= 0 ? -1 : 1), j = a(m >= 0 ? -1 : 1), M = p(0), N = a(!0), P = a(!0), F = a(!1), I = n.useMemo(() => y(D), [D]), L = C.spacing(h);
|
|
18
|
+
i(() => {
|
|
19
19
|
let e = m >= 0 ? -1 : 1, t = A.current;
|
|
20
20
|
A.current = e, j.current *= e / t;
|
|
21
|
-
}, [m]),
|
|
21
|
+
}, [m]), i(() => {
|
|
22
22
|
let e = w.current, t = E.current, n = t?.parentElement;
|
|
23
23
|
if (!e || !t || !n) return;
|
|
24
24
|
let r = () => {
|
|
@@ -45,23 +45,23 @@ var b = r.forwardRef(function({ children: n, baseVelocity: i = 5, direction: m =
|
|
|
45
45
|
i.disconnect(), a.disconnect(), document.removeEventListener("visibilitychange", o), s.removeEventListener("change", c);
|
|
46
46
|
};
|
|
47
47
|
}, [
|
|
48
|
-
|
|
48
|
+
t,
|
|
49
49
|
L,
|
|
50
50
|
M
|
|
51
51
|
]);
|
|
52
52
|
let R = g([k, M], ([e, t]) => `${-v(0, Number(t) || 1, -(Number(e) || 0))}px`);
|
|
53
53
|
return f((e, t) => {
|
|
54
54
|
if (!N.current || !P.current || F.current) return;
|
|
55
|
-
let n = t / 1e3,
|
|
55
|
+
let n = t / 1e3, i = b.get(), a = Math.min(5, Math.abs(i)), o = 1 + a;
|
|
56
56
|
if (a > .1) {
|
|
57
|
-
let e =
|
|
57
|
+
let e = i >= 0 ? 1 : -1;
|
|
58
58
|
j.current = A.current * e;
|
|
59
59
|
}
|
|
60
60
|
let s = M.get() ?? 0;
|
|
61
61
|
if (s <= 0) return;
|
|
62
|
-
let c = s *
|
|
62
|
+
let c = s * r / 100, l = j.current * c * o * n;
|
|
63
63
|
k.set(k.get() + l);
|
|
64
|
-
}), /* @__PURE__ */ c
|
|
64
|
+
}), /* @__PURE__ */ s(c, {
|
|
65
65
|
ref: T,
|
|
66
66
|
sx: [{
|
|
67
67
|
width: "100%",
|
|
@@ -69,7 +69,7 @@ var b = r.forwardRef(function({ children: n, baseVelocity: i = 5, direction: m =
|
|
|
69
69
|
whiteSpace: "nowrap"
|
|
70
70
|
}, ...e(_)],
|
|
71
71
|
...x,
|
|
72
|
-
children: /* @__PURE__ */
|
|
72
|
+
children: /* @__PURE__ */ s(d.div, {
|
|
73
73
|
style: {
|
|
74
74
|
display: "inline-flex",
|
|
75
75
|
alignItems: "center",
|
|
@@ -78,10 +78,10 @@ var b = r.forwardRef(function({ children: n, baseVelocity: i = 5, direction: m =
|
|
|
78
78
|
userSelect: "none",
|
|
79
79
|
x: R
|
|
80
80
|
},
|
|
81
|
-
children: I.map((e,
|
|
82
|
-
ref:
|
|
83
|
-
"aria-hidden":
|
|
84
|
-
inert:
|
|
81
|
+
children: I.map((e, n) => /* @__PURE__ */ s(c, {
|
|
82
|
+
ref: n === 0 ? E : null,
|
|
83
|
+
"aria-hidden": n !== 0,
|
|
84
|
+
inert: n !== 0,
|
|
85
85
|
sx: {
|
|
86
86
|
display: "inline-flex",
|
|
87
87
|
flexShrink: 0,
|
|
@@ -89,29 +89,29 @@ var b = r.forwardRef(function({ children: n, baseVelocity: i = 5, direction: m =
|
|
|
89
89
|
columnGap: L
|
|
90
90
|
},
|
|
91
91
|
component: "div",
|
|
92
|
-
children:
|
|
92
|
+
children: t
|
|
93
93
|
}, e))
|
|
94
94
|
})
|
|
95
95
|
});
|
|
96
|
-
}), x =
|
|
96
|
+
}), x = n.forwardRef(function(e, t) {
|
|
97
97
|
let { scrollY: n } = m(), r = g(h(_(n), {
|
|
98
98
|
damping: 50,
|
|
99
99
|
stiffness: 400
|
|
100
100
|
}), (e) => (e < 0 ? -1 : 1) * Math.min(5, Math.abs(e) / 1e3 * 5));
|
|
101
|
-
return /* @__PURE__ */
|
|
101
|
+
return /* @__PURE__ */ s(b, {
|
|
102
102
|
...e,
|
|
103
103
|
ref: t,
|
|
104
104
|
velocityFactor: r
|
|
105
105
|
});
|
|
106
|
-
}), S =
|
|
107
|
-
let
|
|
108
|
-
return
|
|
106
|
+
}), S = n.forwardRef(function(e, n) {
|
|
107
|
+
let i = r(t);
|
|
108
|
+
return i ? /* @__PURE__ */ s(b, {
|
|
109
109
|
...e,
|
|
110
|
-
ref:
|
|
111
|
-
velocityFactor:
|
|
112
|
-
}) : /* @__PURE__ */
|
|
110
|
+
ref: n,
|
|
111
|
+
velocityFactor: i
|
|
112
|
+
}) : /* @__PURE__ */ s(x, {
|
|
113
113
|
...e,
|
|
114
|
-
ref:
|
|
114
|
+
ref: n
|
|
115
115
|
});
|
|
116
116
|
});
|
|
117
117
|
//#endregion
|
package/dist/s-select/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SSelect as e } from "./s-select.js";
|
|
2
2
|
export { e as SSelect, e as default };
|