@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,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SAccordion as e } from "./s-accordion.js";
|
|
2
2
|
export { e as SAccordion, e as default };
|
|
@@ -1,2 +1,70 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { toSxArray as e } from "../utils/sx.js";
|
|
2
|
+
import { styled as t, useThemeProps as n } from "@mui/material/styles";
|
|
3
|
+
import * as r from "react";
|
|
4
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
import o from "@mui/icons-material/ExpandMore";
|
|
6
|
+
import s from "@mui/material/Typography";
|
|
7
|
+
import { useControlled as c } from "@mui/material/utils";
|
|
8
|
+
import l from "@mui/utils/appendOwnerState";
|
|
9
|
+
import u from "@mui/material/Stack";
|
|
10
|
+
import d from "@mui/material/Accordion";
|
|
11
|
+
import f from "@mui/material/AccordionDetails";
|
|
12
|
+
import p from "@mui/material/AccordionSummary";
|
|
13
|
+
//#region lib/s-accordion/s-accordion.tsx
|
|
14
|
+
var m = t(d, {
|
|
15
|
+
name: "SAccordion",
|
|
16
|
+
slot: "Root"
|
|
17
|
+
})({});
|
|
18
|
+
function h(e, t) {
|
|
19
|
+
return typeof e == "function" ? e(t) : e;
|
|
20
|
+
}
|
|
21
|
+
var g = r.forwardRef(function(t, r) {
|
|
22
|
+
let d = n({
|
|
23
|
+
props: t,
|
|
24
|
+
name: "SAccordion"
|
|
25
|
+
}), { children: g, defaultExpanded: _ = !1, disabled: v = !1, expandIcon: y = /* @__PURE__ */ i(o, {}), expanded: b, onChange: x, slotProps: S, slots: C, startIcon: w, title: T, ...E } = d, [D, O] = c({
|
|
26
|
+
controlled: b,
|
|
27
|
+
default: _,
|
|
28
|
+
name: "SAccordion",
|
|
29
|
+
state: "expanded"
|
|
30
|
+
}), k = {
|
|
31
|
+
...d,
|
|
32
|
+
disabled: v,
|
|
33
|
+
expanded: D
|
|
34
|
+
}, { details: A = f, summary: j = p, summaryContent: M = u, title: N = s, ...P } = C ?? {}, { details: F, summary: I, summaryContent: L, title: R, ...z } = S ?? {}, B = l(C?.summary, h(I, k) ?? {}, k), V = l(C?.summaryContent, h(L, k) ?? {}, k), H = l(C?.title, h(R, k) ?? {}, k), U = l(C?.details, h(F, k) ?? {}, k), { sx: W, ...G } = V, { sx: K, ...q } = H;
|
|
35
|
+
return /* @__PURE__ */ a(m, {
|
|
36
|
+
elevation: 0,
|
|
37
|
+
...E,
|
|
38
|
+
disabled: v,
|
|
39
|
+
expanded: D,
|
|
40
|
+
onChange: (e, t) => {
|
|
41
|
+
O(t), x?.(e, t);
|
|
42
|
+
},
|
|
43
|
+
ownerState: k,
|
|
44
|
+
ref: r,
|
|
45
|
+
slots: P,
|
|
46
|
+
slotProps: z,
|
|
47
|
+
children: [T != null || w ? /* @__PURE__ */ i(j, {
|
|
48
|
+
expandIcon: y,
|
|
49
|
+
...B,
|
|
50
|
+
children: /* @__PURE__ */ a(M, {
|
|
51
|
+
direction: "row",
|
|
52
|
+
spacing: 1,
|
|
53
|
+
...G,
|
|
54
|
+
sx: [{ alignItems: "center" }, ...e(W)],
|
|
55
|
+
children: [w, /* @__PURE__ */ i(N, {
|
|
56
|
+
variant: "subtitle1",
|
|
57
|
+
...q,
|
|
58
|
+
sx: [{ fontWeight: 600 }, ...e(K)],
|
|
59
|
+
children: T
|
|
60
|
+
})]
|
|
61
|
+
})
|
|
62
|
+
}) : null, /* @__PURE__ */ i(A, {
|
|
63
|
+
...U,
|
|
64
|
+
children: g
|
|
65
|
+
})]
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
g.displayName = "SAccordion";
|
|
69
|
+
//#endregion
|
|
70
|
+
export { g as SAccordion, g as default };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { toSxArray as e } from "../utils/sx.js";
|
|
2
|
-
import { t } from "../
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
2
|
+
import { SIconButton as t } from "../s-icon-button/s-icon-button.js";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { Box as a, Grid as o, styled as s, useThemeProps as c } from "@mui/material";
|
|
6
|
+
import l from "@mui/utils/appendOwnerState";
|
|
7
7
|
//#region lib/s-action-overlay/s-action-overlay.tsx
|
|
8
|
-
var u = 40, d = 16, f =
|
|
8
|
+
var u = 40, d = 16, f = s(a, {
|
|
9
9
|
name: "SActionOverlay",
|
|
10
10
|
slot: "Root"
|
|
11
11
|
})({});
|
|
@@ -19,18 +19,18 @@ function m(e) {
|
|
|
19
19
|
justifyContent: t
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
var h =
|
|
23
|
-
let g =
|
|
24
|
-
props:
|
|
22
|
+
var h = n.forwardRef(function(s, h) {
|
|
23
|
+
let g = c({
|
|
24
|
+
props: s,
|
|
25
25
|
name: "SActionOverlay"
|
|
26
|
-
}), { "aria-label": _, actions: v, backdropColor: y = "background.paper", backdropOpacity: b = .9, borderRadius: x = 0, blurAmount: S = 10, children: C, columns: w = 3, maxWidth: T, onBlur: E, onFocus: D, onMouseEnter: O, onMouseLeave: k, onVisibilityChange: A, position: j = "center", showOnHover: M = !0, slotProps: N, slots: P, sx: F, tabIndex: I, visible: L, ...R } = g, [z, B] =
|
|
26
|
+
}), { "aria-label": _, actions: v, backdropColor: y = "background.paper", backdropOpacity: b = .9, borderRadius: x = 0, blurAmount: S = 10, children: C, columns: w = 3, maxWidth: T, onBlur: E, onFocus: D, onMouseEnter: O, onMouseLeave: k, onVisibilityChange: A, position: j = "center", showOnHover: M = !0, slotProps: N, slots: P, sx: F, tabIndex: I, visible: L, ...R } = g, [z, B] = n.useState(!1), V = L ?? z, H = {
|
|
27
27
|
...g,
|
|
28
28
|
position: j,
|
|
29
29
|
visible: V
|
|
30
|
-
}, U = P?.overlay ??
|
|
30
|
+
}, U = P?.overlay ?? a, W = P?.actions ?? o, G = l(P?.overlay, p(N?.overlay, H) ?? {}, H), K = l(P?.actions, p(N?.actions, H) ?? {}, H), { sx: q, ...J } = G, { sx: Y, ...X } = K, Z = m(j), Q = w > 0 ? w * u + (w - 1) * d + w * 16 : void 0, $ = (e, t) => {
|
|
31
31
|
M && (L === void 0 && B(t), A?.(e, t));
|
|
32
32
|
};
|
|
33
|
-
return /* @__PURE__ */
|
|
33
|
+
return /* @__PURE__ */ i(f, {
|
|
34
34
|
...R,
|
|
35
35
|
"aria-label": _ ?? (M ? "Show actions" : void 0),
|
|
36
36
|
onBlur: (e) => {
|
|
@@ -52,7 +52,7 @@ var h = r.forwardRef(function(c, h) {
|
|
|
52
52
|
display: "inline-flex",
|
|
53
53
|
position: "relative"
|
|
54
54
|
}, ...e(F)],
|
|
55
|
-
children: [C, V ? /* @__PURE__ */
|
|
55
|
+
children: [C, V ? /* @__PURE__ */ r(U, {
|
|
56
56
|
...J,
|
|
57
57
|
sx: [{
|
|
58
58
|
...Z,
|
|
@@ -66,7 +66,7 @@ var h = r.forwardRef(function(c, h) {
|
|
|
66
66
|
transform: "translateZ(0)",
|
|
67
67
|
transition: "opacity 200ms ease-in-out"
|
|
68
68
|
}, ...e(q)],
|
|
69
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ r(W, {
|
|
70
70
|
container: !0,
|
|
71
71
|
spacing: 2,
|
|
72
72
|
...X,
|
|
@@ -74,16 +74,16 @@ var h = r.forwardRef(function(c, h) {
|
|
|
74
74
|
justifyContent: Z.justifyContent,
|
|
75
75
|
maxWidth: T ?? Q
|
|
76
76
|
}, ...e(Y)],
|
|
77
|
-
children: v.map(({ icon:
|
|
77
|
+
children: v.map(({ icon: n, label: i, selected: a, sx: s, ...c }, l) => /* @__PURE__ */ r(o, {
|
|
78
78
|
sx: {
|
|
79
79
|
display: "flex",
|
|
80
80
|
justifyContent: "center"
|
|
81
81
|
},
|
|
82
|
-
children: /* @__PURE__ */
|
|
82
|
+
children: /* @__PURE__ */ r(t, {
|
|
83
83
|
...c,
|
|
84
|
-
"aria-label":
|
|
84
|
+
"aria-label": i,
|
|
85
85
|
"aria-pressed": a,
|
|
86
|
-
tooltip:
|
|
86
|
+
tooltip: i,
|
|
87
87
|
slotProps: { tooltip: { placement: "top" } },
|
|
88
88
|
sx: [{
|
|
89
89
|
bgcolor: a ? "primary.main" : void 0,
|
|
@@ -99,10 +99,10 @@ var h = r.forwardRef(function(c, h) {
|
|
|
99
99
|
bgcolor: a ? "primary.main" : void 0,
|
|
100
100
|
color: a ? "primary.contrastText" : void 0
|
|
101
101
|
}
|
|
102
|
-
}, ...e(
|
|
103
|
-
children:
|
|
102
|
+
}, ...e(s)],
|
|
103
|
+
children: n
|
|
104
104
|
})
|
|
105
|
-
}, `${
|
|
105
|
+
}, `${i}-${l}`))
|
|
106
106
|
})
|
|
107
107
|
}) : null]
|
|
108
108
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { STextField as e } from "../s-text-field/s-text-field.js";
|
|
2
2
|
import { forwardRef as t, useId as n } from "react";
|
|
3
3
|
import { jsx as r } from "react/jsx-runtime";
|
|
4
4
|
import { Autocomplete as i, styled as a, useThemeProps as o } from "@mui/material";
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import { toSxArray as e } from "../utils/sx.js";
|
|
2
|
-
import { t } from "../
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
2
|
+
import { SLazyImage as t } from "../s-lazy-image/s-lazy-image.js";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { Avatar as a, Box as o, Typography as s, styled as c, useThemeProps as l } from "@mui/material";
|
|
6
|
+
import u from "@mui/utils/appendOwnerState";
|
|
7
7
|
//#region lib/s-avatar/s-avatar.tsx
|
|
8
|
-
var d =
|
|
8
|
+
var d = c(o, {
|
|
9
9
|
name: "SAvatar",
|
|
10
10
|
slot: "Root"
|
|
11
11
|
})({}), f = (e) => e <= 32 ? 12 : e <= 40 ? 16 : e <= 56 ? 18 : Math.round(e * .4);
|
|
12
12
|
function p(e, t) {
|
|
13
13
|
return typeof e == "function" ? e(t) : e;
|
|
14
14
|
}
|
|
15
|
-
var m =
|
|
16
|
-
let
|
|
17
|
-
props:
|
|
15
|
+
var m = n.forwardRef(function(n, o) {
|
|
16
|
+
let c = l({
|
|
17
|
+
props: n,
|
|
18
18
|
name: "SAvatar"
|
|
19
|
-
}), { alt: m, children: h, name: g, showName: _ = !1, size: v = 40, slotProps: y, slots: b, src: x, sx: S, ...C } =
|
|
20
|
-
...
|
|
19
|
+
}), { alt: m, children: h, name: g, showName: _ = !1, size: v = 40, slotProps: y, slots: b, src: x, sx: S, ...C } = c, w = {
|
|
20
|
+
...c,
|
|
21
21
|
showName: _,
|
|
22
22
|
size: v
|
|
23
|
-
}, T = b?.avatar ??
|
|
24
|
-
return /* @__PURE__ */
|
|
23
|
+
}, T = b?.avatar ?? a, E = b?.image ?? t, D = b?.name ?? s, O = u(b?.avatar, p(y?.avatar, w) ?? {}, w), k = u(b?.image, p(y?.image, w) ?? {}, w), A = u(b?.name, p(y?.name, w) ?? {}, w), { sx: j, ...M } = O;
|
|
24
|
+
return /* @__PURE__ */ i(d, {
|
|
25
25
|
...C,
|
|
26
26
|
ownerState: w,
|
|
27
|
-
ref:
|
|
27
|
+
ref: o,
|
|
28
28
|
sx: [{
|
|
29
29
|
alignItems: "center",
|
|
30
30
|
display: "flex",
|
|
31
31
|
gap: 2
|
|
32
32
|
}, ...e(S)],
|
|
33
|
-
children: [/* @__PURE__ */
|
|
33
|
+
children: [/* @__PURE__ */ r(T, {
|
|
34
34
|
...M,
|
|
35
35
|
sx: [{
|
|
36
36
|
fontSize: f(v),
|
|
37
37
|
height: v,
|
|
38
38
|
width: v
|
|
39
39
|
}, ...e(j)],
|
|
40
|
-
children: h ?? (x ? /* @__PURE__ */
|
|
40
|
+
children: h ?? (x ? /* @__PURE__ */ r(E, {
|
|
41
41
|
...k,
|
|
42
42
|
alt: m ?? (typeof g == "string" ? g : "Avatar"),
|
|
43
43
|
height: v,
|
|
@@ -45,7 +45,7 @@ var m = r.forwardRef(function(r, s) {
|
|
|
45
45
|
variant: "circular",
|
|
46
46
|
width: v
|
|
47
47
|
}) : (typeof g == "string" ? g[0] : void 0) ?? "A")
|
|
48
|
-
}), _ && g != null ? /* @__PURE__ */
|
|
48
|
+
}), _ && g != null ? /* @__PURE__ */ r(D, {
|
|
49
49
|
...A,
|
|
50
50
|
children: g
|
|
51
51
|
}) : null]
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import e, { useEffect as t, useMemo as n, useRef as r, useState as i } from "react";
|
|
2
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
3
|
+
import { Typography as s, styled as c, useThemeProps as l } from "@mui/material";
|
|
4
|
+
import { useForkRef as u } from "@mui/material/utils";
|
|
5
5
|
import { motion as d, useReducedMotion as f } from "framer-motion";
|
|
6
6
|
//#region lib/s-blur-text/s-blur-text.tsx
|
|
7
|
-
var p =
|
|
7
|
+
var p = c(s, {
|
|
8
8
|
name: "SBlurText",
|
|
9
9
|
slot: "Root"
|
|
10
10
|
})({}), m = (e, t) => {
|
|
@@ -23,12 +23,12 @@ function h(e, t) {
|
|
|
23
23
|
};
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
var g =
|
|
27
|
-
let
|
|
28
|
-
props:
|
|
26
|
+
var g = e.forwardRef(function(e, s) {
|
|
27
|
+
let c = l({
|
|
28
|
+
props: e,
|
|
29
29
|
name: "SBlurText"
|
|
30
|
-
}), { children: g, delay: _ = 100, animateBy: v = "words", direction: y = "top", threshold: b = .1, rootMargin: x = "0px", animationFrom: S, animationTo: C, easing: w = (e) => e, onAnimationComplete: T, stepDuration: E = .35, variant: D = "body1", sx: O, ...k } =
|
|
31
|
-
|
|
30
|
+
}), { children: g, delay: _ = 100, animateBy: v = "words", direction: y = "top", threshold: b = .1, rootMargin: x = "0px", animationFrom: S, animationTo: C, easing: w = (e) => e, onAnimationComplete: T, stepDuration: E = .35, variant: D = "body1", sx: O, ...k } = c, A = n(() => h(g, v), [g, v]), [j, M] = i(!1), N = r(null), P = r(null), F = u(N, s), I = f();
|
|
31
|
+
t(() => {
|
|
32
32
|
if (I) {
|
|
33
33
|
M(!0);
|
|
34
34
|
return;
|
|
@@ -45,7 +45,7 @@ var g = t.forwardRef(function(t, c) {
|
|
|
45
45
|
x,
|
|
46
46
|
I,
|
|
47
47
|
b
|
|
48
|
-
]),
|
|
48
|
+
]), t(() => {
|
|
49
49
|
if (!I) return;
|
|
50
50
|
let e = `${v}:${g}`;
|
|
51
51
|
P.current !== e && (P.current = e, T?.());
|
|
@@ -55,7 +55,7 @@ var g = t.forwardRef(function(t, c) {
|
|
|
55
55
|
I,
|
|
56
56
|
g
|
|
57
57
|
]);
|
|
58
|
-
let L =
|
|
58
|
+
let L = n(() => y === "top" ? {
|
|
59
59
|
filter: "blur(10px)",
|
|
60
60
|
opacity: 0,
|
|
61
61
|
y: -50
|
|
@@ -63,7 +63,7 @@ var g = t.forwardRef(function(t, c) {
|
|
|
63
63
|
filter: "blur(10px)",
|
|
64
64
|
opacity: 0,
|
|
65
65
|
y: 50
|
|
66
|
-
}, [y]), R =
|
|
66
|
+
}, [y]), R = n(() => [{
|
|
67
67
|
filter: "blur(5px)",
|
|
68
68
|
opacity: .5,
|
|
69
69
|
y: y === "top" ? 5 : -5
|
|
@@ -72,10 +72,10 @@ var g = t.forwardRef(function(t, c) {
|
|
|
72
72
|
opacity: 1,
|
|
73
73
|
y: 0
|
|
74
74
|
}], [y]), z = S ?? L, B = C ?? R, V = B[B.length - 1] ?? z, H = {
|
|
75
|
-
...
|
|
75
|
+
...c,
|
|
76
76
|
inView: j
|
|
77
77
|
}, U = B.length + 1, W = E * (U - 1), G = Array.from({ length: U }, (e, t) => U === 1 ? 0 : t / (U - 1));
|
|
78
|
-
return /* @__PURE__ */
|
|
78
|
+
return /* @__PURE__ */ a(p, {
|
|
79
79
|
...k,
|
|
80
80
|
ownerState: H,
|
|
81
81
|
ref: F,
|
|
@@ -88,7 +88,7 @@ var g = t.forwardRef(function(t, c) {
|
|
|
88
88
|
delay: n * _ / 1e3,
|
|
89
89
|
ease: w
|
|
90
90
|
};
|
|
91
|
-
return /* @__PURE__ */
|
|
91
|
+
return /* @__PURE__ */ o(d.span, {
|
|
92
92
|
initial: I ? !1 : z,
|
|
93
93
|
animate: I ? V : j ? r : z,
|
|
94
94
|
transition: I ? { duration: 0 } : i,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../s-brand-logo-
|
|
1
|
+
import { t as e } from "../s-brand-logo-CErW9Slg.js";
|
|
2
2
|
export { e as SBrandLogo, e as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../s-brand-logo-
|
|
1
|
+
import { t as e } from "../s-brand-logo-CErW9Slg.js";
|
|
2
2
|
export { e as SBrandLogo, e as default };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { toSxArray as e } from "../utils/sx.js";
|
|
2
2
|
import { actionHoverMedia as t, getFocusVisibleStyle as n } from "../theme/components/action-styles.js";
|
|
3
3
|
import { paginationDimensions as r } from "../s-pagination/types.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
4
|
+
import { forwardRef as i } from "react";
|
|
5
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
6
|
+
import { Breadcrumbs as o, Link as s, Typography as c, styled as l, useThemeProps as u } from "@mui/material";
|
|
7
|
+
import d from "@mui/icons-material/ChevronRight";
|
|
8
8
|
//#region lib/s-breadcrumbs/s-breadcrumbs.tsx
|
|
9
|
-
var f =
|
|
9
|
+
var f = l(o, {
|
|
10
10
|
name: "SBreadcrumbs",
|
|
11
11
|
slot: "Root",
|
|
12
12
|
shouldForwardProp: (e) => e !== "ownerState"
|
|
@@ -27,11 +27,11 @@ var f = u(s, {
|
|
|
27
27
|
"&:active": { backgroundColor: i.action.selected },
|
|
28
28
|
[t]: { "&:hover": { backgroundColor: i.action.hover } }
|
|
29
29
|
} };
|
|
30
|
-
}), p =
|
|
31
|
-
let r =
|
|
30
|
+
}), p = i((t, n) => {
|
|
31
|
+
let r = u({
|
|
32
32
|
props: t,
|
|
33
33
|
name: "SBreadcrumbs"
|
|
34
|
-
}), { items:
|
|
34
|
+
}), { items: i, separator: o = /* @__PURE__ */ a(d, { fontSize: "small" }), LinkComponent: l, currentColor: p = "text.primary", linkColor: m = "primary.main", sx: h, ...g } = r, _ = {
|
|
35
35
|
...r,
|
|
36
36
|
currentColor: p,
|
|
37
37
|
linkColor: m
|
|
@@ -44,18 +44,18 @@ var f = u(s, {
|
|
|
44
44
|
"&::before": { display: "none" },
|
|
45
45
|
"&:hover": { textDecoration: "underline" }
|
|
46
46
|
};
|
|
47
|
-
return /* @__PURE__ */
|
|
47
|
+
return /* @__PURE__ */ a(f, {
|
|
48
48
|
ref: n,
|
|
49
49
|
ownerState: _,
|
|
50
|
-
separator:
|
|
50
|
+
separator: o,
|
|
51
51
|
sx: h,
|
|
52
52
|
...g,
|
|
53
|
-
children:
|
|
54
|
-
let r = n ===
|
|
55
|
-
return
|
|
53
|
+
children: i.map((t, n) => {
|
|
54
|
+
let r = n === i.length - 1, o = t.isCurrent ?? r, u = `${t.label}-${n}`;
|
|
55
|
+
return o ? /* @__PURE__ */ a(c, {
|
|
56
56
|
sx: { color: p },
|
|
57
57
|
children: t.label
|
|
58
|
-
},
|
|
58
|
+
}, u) : t.onClick ? /* @__PURE__ */ a(s, {
|
|
59
59
|
component: "button",
|
|
60
60
|
type: "button",
|
|
61
61
|
onClick: t.onClick,
|
|
@@ -68,18 +68,18 @@ var f = u(s, {
|
|
|
68
68
|
font: "inherit"
|
|
69
69
|
}],
|
|
70
70
|
children: t.label
|
|
71
|
-
},
|
|
71
|
+
}, u) : t.to ? /* @__PURE__ */ a(s, {
|
|
72
72
|
color: m,
|
|
73
73
|
sx: v,
|
|
74
|
-
...
|
|
75
|
-
component:
|
|
74
|
+
...l ? {
|
|
75
|
+
component: l,
|
|
76
76
|
to: t.to
|
|
77
77
|
} : { href: t.to },
|
|
78
78
|
children: t.label
|
|
79
|
-
},
|
|
79
|
+
}, u) : /* @__PURE__ */ a(c, {
|
|
80
80
|
sx: { color: p },
|
|
81
81
|
children: t.label
|
|
82
|
-
},
|
|
82
|
+
}, u);
|
|
83
83
|
})
|
|
84
84
|
});
|
|
85
85
|
});
|
package/dist/s-carousel/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SCarousel as e } from "./s-carousel.js";
|
|
2
2
|
export { e as SCarousel, e as default };
|
|
@@ -1,2 +1,184 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { toSxArray as e } from "../utils/sx.js";
|
|
2
|
+
import { SIconButton as t } from "../s-icon-button/s-icon-button.js";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { Children as r, forwardRef as i, useCallback as a, useEffect as o, useMemo as s, useState as c } from "react";
|
|
5
|
+
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
6
|
+
import { ArrowBackIosNew as f, ArrowForwardIos as p } from "@mui/icons-material";
|
|
7
|
+
import { Box as m, styled as h, useTheme as g, useThemeProps as ee } from "@mui/material";
|
|
8
|
+
import _ from "embla-carousel-autoplay";
|
|
9
|
+
import v from "embla-carousel-react";
|
|
10
|
+
//#region lib/s-carousel/s-carousel.tsx
|
|
11
|
+
var y = h(m, {
|
|
12
|
+
name: "SCarousel",
|
|
13
|
+
slot: "Root"
|
|
14
|
+
})({
|
|
15
|
+
position: "relative",
|
|
16
|
+
".carousel-arrow": {
|
|
17
|
+
position: "absolute",
|
|
18
|
+
top: "50%",
|
|
19
|
+
transform: "translate(0, -50%)",
|
|
20
|
+
zIndex: 1,
|
|
21
|
+
opacity: 0,
|
|
22
|
+
transition: "opacity 0.3s ease-in-out",
|
|
23
|
+
pointerEvents: "none",
|
|
24
|
+
"&.next": { right: 6 },
|
|
25
|
+
"&.prev": { left: 6 }
|
|
26
|
+
},
|
|
27
|
+
":hover": { ".carousel-arrow": {
|
|
28
|
+
opacity: 1,
|
|
29
|
+
pointerEvents: "auto"
|
|
30
|
+
} },
|
|
31
|
+
".carousel-arrow.Mui-focusVisible": {
|
|
32
|
+
opacity: 1,
|
|
33
|
+
pointerEvents: "auto"
|
|
34
|
+
}
|
|
35
|
+
}), b = h("div", { shouldForwardProp: (e) => e !== "centerPadding" })(({ centerPadding: e }) => ({
|
|
36
|
+
overflow: "hidden",
|
|
37
|
+
...e && { padding: `0 ${e}` }
|
|
38
|
+
})), te = h("div")({
|
|
39
|
+
display: "flex",
|
|
40
|
+
touchAction: "pan-y pinch-zoom"
|
|
41
|
+
}), ne = h("div", { shouldForwardProp: (e) => e !== "slidesToShow" && e !== "spaceBetween" })(({ slidesToShow: e, spaceBetween: t }) => ({
|
|
42
|
+
flex: `0 0 calc(100% / ${e})`,
|
|
43
|
+
minWidth: 0,
|
|
44
|
+
paddingInline: `${t / 2}px`,
|
|
45
|
+
boxSizing: "border-box"
|
|
46
|
+
})), re = h("ul")(({ theme: e }) => ({
|
|
47
|
+
gap: 6,
|
|
48
|
+
zIndex: 1,
|
|
49
|
+
margin: 0,
|
|
50
|
+
padding: 0,
|
|
51
|
+
listStyle: "none",
|
|
52
|
+
display: "flex",
|
|
53
|
+
alignItems: "center",
|
|
54
|
+
justifyContent: "center",
|
|
55
|
+
color: (e.vars ?? e).palette.primary.main,
|
|
56
|
+
"& li": {
|
|
57
|
+
width: 13,
|
|
58
|
+
height: 7,
|
|
59
|
+
display: "flex",
|
|
60
|
+
cursor: "pointer",
|
|
61
|
+
alignItems: "center",
|
|
62
|
+
justifyContent: "center",
|
|
63
|
+
transition: "all 0.4s",
|
|
64
|
+
"&.active span": { opacity: 1 },
|
|
65
|
+
"&.active": { width: 18 }
|
|
66
|
+
}
|
|
67
|
+
})), ie = h("span", { shouldForwardProp: (e) => e !== "dotColor" })(({ dotColor: e, theme: t }) => ({
|
|
68
|
+
width: "100%",
|
|
69
|
+
height: "100%",
|
|
70
|
+
borderRadius: t.radius.full,
|
|
71
|
+
cursor: "pointer",
|
|
72
|
+
position: "relative",
|
|
73
|
+
backgroundColor: e ?? (t.vars ?? t).palette.primary.main,
|
|
74
|
+
opacity: .35
|
|
75
|
+
}));
|
|
76
|
+
function ae(e, t) {
|
|
77
|
+
return typeof e == "string" || typeof e == "number" ? e : e && typeof e == "object" && "key" in e && e.key != null ? e.key : `slide-${t + 1}`;
|
|
78
|
+
}
|
|
79
|
+
function x(e, t) {
|
|
80
|
+
let [n, r] = c(e);
|
|
81
|
+
return o(() => {
|
|
82
|
+
function n() {
|
|
83
|
+
if (!t?.length) {
|
|
84
|
+
r(e);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
let n = window.innerWidth, i = [...t].sort((e, t) => e.breakpoint - t.breakpoint), a = e;
|
|
88
|
+
for (let t of i) if (n <= t.breakpoint) {
|
|
89
|
+
a = t.settings.slidesToShow ?? e;
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
r(a);
|
|
93
|
+
}
|
|
94
|
+
return n(), window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
|
|
95
|
+
}, [e, t]), n;
|
|
96
|
+
}
|
|
97
|
+
var S = i(function(i, h) {
|
|
98
|
+
let S = ee({
|
|
99
|
+
props: i,
|
|
100
|
+
name: "SCarousel"
|
|
101
|
+
}), { apiRef: C, children: w, dotColor: T, dots: E = !1, arrows: D = !0, slidesToShow: O = 4, spaceBetween: k = 4, autoplay: A = !1, autoplaySpeed: j = 3e3, infinite: M = !0, speed: N = 500, centerMode: P = !1, centerPadding: F = "60px", responsive: I, slotProps: L, sx: R, ...z } = S, B = g(), V = x(O, I), H = s(() => A ? [_({
|
|
102
|
+
delay: j,
|
|
103
|
+
stopOnInteraction: !1
|
|
104
|
+
})] : [], [A, j]), [U, W] = v({
|
|
105
|
+
loop: M,
|
|
106
|
+
duration: Math.round(N / 20),
|
|
107
|
+
align: P ? "center" : "start",
|
|
108
|
+
direction: B.direction === "rtl" ? "rtl" : "ltr",
|
|
109
|
+
slidesToScroll: 1
|
|
110
|
+
}, H), [G, K] = c([]), [q, J] = c(0), [oe, se] = c(!1), [ce, le] = c(!1), Y = a(() => {
|
|
111
|
+
W && (K(W.scrollSnapList()), J(W.selectedScrollSnap()), se(W.canScrollPrev()), le(W.canScrollNext()));
|
|
112
|
+
}, [W]);
|
|
113
|
+
o(() => {
|
|
114
|
+
if (W) return Y(), W.on("select", Y), W.on("reInit", Y), () => {
|
|
115
|
+
W.off("select", Y), W.off("reInit", Y);
|
|
116
|
+
};
|
|
117
|
+
}, [W, Y]), n.useImperativeHandle(C, () => W ?? null, [W]);
|
|
118
|
+
let X = r.toArray(w), Z = L?.previousButton, Q = L?.nextButton, $ = L?.dots, ue = {
|
|
119
|
+
...S,
|
|
120
|
+
activeSlidesToShow: V,
|
|
121
|
+
selectedIndex: q
|
|
122
|
+
};
|
|
123
|
+
return /* @__PURE__ */ d(y, {
|
|
124
|
+
...z,
|
|
125
|
+
ownerState: ue,
|
|
126
|
+
ref: h,
|
|
127
|
+
sx: R,
|
|
128
|
+
children: [
|
|
129
|
+
/* @__PURE__ */ u(b, {
|
|
130
|
+
ref: U,
|
|
131
|
+
centerPadding: P ? F : void 0,
|
|
132
|
+
children: /* @__PURE__ */ u(te, { children: X.map((e, t) => /* @__PURE__ */ u(ne, {
|
|
133
|
+
slidesToShow: V,
|
|
134
|
+
spaceBetween: k,
|
|
135
|
+
children: e
|
|
136
|
+
}, ae(e, t))) })
|
|
137
|
+
}),
|
|
138
|
+
D && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(t, {
|
|
139
|
+
"aria-label": "Previous slide",
|
|
140
|
+
...Z,
|
|
141
|
+
className: ["carousel-arrow prev", Z?.className].filter(Boolean).join(" "),
|
|
142
|
+
onClick: (e) => {
|
|
143
|
+
Z?.onClick?.(e), e.defaultPrevented || W?.scrollPrev();
|
|
144
|
+
},
|
|
145
|
+
disabled: Z?.disabled || !M && !oe,
|
|
146
|
+
sx: e(Z?.sx),
|
|
147
|
+
children: /* @__PURE__ */ u(f, {})
|
|
148
|
+
}), /* @__PURE__ */ u(t, {
|
|
149
|
+
"aria-label": "Next slide",
|
|
150
|
+
...Q,
|
|
151
|
+
className: ["carousel-arrow next", Q?.className].filter(Boolean).join(" "),
|
|
152
|
+
onClick: (e) => {
|
|
153
|
+
Q?.onClick?.(e), e.defaultPrevented || W?.scrollNext();
|
|
154
|
+
},
|
|
155
|
+
disabled: Q?.disabled || !M && !ce,
|
|
156
|
+
sx: e(Q?.sx),
|
|
157
|
+
children: /* @__PURE__ */ u(p, {})
|
|
158
|
+
})] }),
|
|
159
|
+
E && G.length > 0 && /* @__PURE__ */ u(re, {
|
|
160
|
+
...$,
|
|
161
|
+
sx: [{ mt: 4 }, ...e($?.sx)],
|
|
162
|
+
children: G.map((e, n) => /* @__PURE__ */ u(m, {
|
|
163
|
+
component: "li",
|
|
164
|
+
className: n === q ? "active" : "",
|
|
165
|
+
sx: { display: "flex" },
|
|
166
|
+
children: /* @__PURE__ */ u(t, {
|
|
167
|
+
"aria-label": `Go to slide ${n + 1}`,
|
|
168
|
+
onClick: () => W?.scrollTo(n),
|
|
169
|
+
sx: {
|
|
170
|
+
width: "100%",
|
|
171
|
+
height: "100%",
|
|
172
|
+
minWidth: 0,
|
|
173
|
+
p: 0
|
|
174
|
+
},
|
|
175
|
+
children: /* @__PURE__ */ u(ie, { dotColor: T })
|
|
176
|
+
})
|
|
177
|
+
}, e))
|
|
178
|
+
})
|
|
179
|
+
]
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
S.displayName = "SCarousel";
|
|
183
|
+
//#endregion
|
|
184
|
+
export { S as SCarousel, S as default };
|