@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,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useCallback as e } from "react";
|
|
2
|
+
import { useControlled as t } from "@mui/material/utils";
|
|
3
3
|
//#region lib/s-image-viewer/use-image-viewer-navigation.ts
|
|
4
4
|
var n = [
|
|
5
5
|
"a[href]",
|
|
@@ -28,21 +28,21 @@ var n = [
|
|
|
28
28
|
"[role=\"textbox\"]"
|
|
29
29
|
].join(", ");
|
|
30
30
|
function r({ selectedItem: r, defaultSelectedItem: i, onItemChange: a, mediaItems: o, showNavigation: s }) {
|
|
31
|
-
let [c, l] =
|
|
31
|
+
let [c, l] = t({
|
|
32
32
|
controlled: r,
|
|
33
33
|
default: i ?? null,
|
|
34
34
|
name: "SImageViewer",
|
|
35
35
|
state: "selectedItem"
|
|
36
|
-
}), u = c ? o.findIndex((e) => e.id === c.id) : -1, d = !!(s && o.length > 1 && u >= 0), f = o.length, p =
|
|
36
|
+
}), u = c ? o.findIndex((e) => e.id === c.id) : -1, d = !!(s && o.length > 1 && u >= 0), f = o.length, p = e((e, t, n) => {
|
|
37
37
|
l(t), a?.(e, t, n);
|
|
38
|
-
}, [a, l]), m =
|
|
38
|
+
}, [a, l]), m = e((e) => {
|
|
39
39
|
d && u > 0 && p(e, o[u - 1], "previous");
|
|
40
40
|
}, [
|
|
41
41
|
d,
|
|
42
42
|
u,
|
|
43
43
|
o,
|
|
44
44
|
p
|
|
45
|
-
]), h =
|
|
45
|
+
]), h = e((e) => {
|
|
46
46
|
d && u < f - 1 && p(e, o[u + 1], "next");
|
|
47
47
|
}, [
|
|
48
48
|
d,
|
|
@@ -59,7 +59,7 @@ function r({ selectedItem: r, defaultSelectedItem: i, onItemChange: a, mediaItem
|
|
|
59
59
|
selectItem: p,
|
|
60
60
|
goToPrevious: m,
|
|
61
61
|
goToNext: h,
|
|
62
|
-
handleKeyDown:
|
|
62
|
+
handleKeyDown: e((e) => {
|
|
63
63
|
let t = e.target;
|
|
64
64
|
t instanceof Element && t.closest(n) || (e.key === "ArrowLeft" && d && u > 0 ? (e.preventDefault(), m(e)) : e.key === "ArrowRight" && d && u < f - 1 && (e.preventDefault(), h(e)));
|
|
65
65
|
}, [
|
package/dist/s-label/s-label.js
CHANGED
|
@@ -1,62 +1,61 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
1
|
+
import { toSxArray as e } from "../utils/sx.js";
|
|
2
|
+
import { styled as t, useThemeProps as n } from "@mui/material/styles";
|
|
3
|
+
import r from "@mui/material/IconButton";
|
|
4
|
+
import * as i from "react";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
import s from "@mui/material/Typography";
|
|
7
|
+
import c from "@mui/utils/appendOwnerState";
|
|
8
|
+
import l from "@mui/material/Tooltip";
|
|
9
|
+
import u from "@mui/icons-material/InfoOutlined";
|
|
10
|
+
import d from "@mui/material/Stack";
|
|
12
11
|
//#region lib/s-label/s-label.tsx
|
|
13
|
-
var f =
|
|
12
|
+
var f = t(d, {
|
|
14
13
|
name: "SLabel",
|
|
15
14
|
slot: "Root"
|
|
16
15
|
})({});
|
|
17
16
|
function p(e, t) {
|
|
18
17
|
return typeof e == "function" ? e(t) : e;
|
|
19
18
|
}
|
|
20
|
-
var m = (e, t) => !t && !(
|
|
21
|
-
let h =
|
|
22
|
-
props:
|
|
19
|
+
var m = (e, t) => !t && !(i.isValidElement(e) && e.type === s), h = i.forwardRef(function(t, i) {
|
|
20
|
+
let h = n({
|
|
21
|
+
props: t,
|
|
23
22
|
name: "SLabel"
|
|
24
23
|
}), { children: g, disableLabelTypography: _ = !1, disableValueTypography: v = !1, hint: y, label: b, slotProps: x, slots: S, sx: C, ...w } = h, T = typeof y == "string" ? y.trim().length > 0 : !!y, E = {
|
|
25
24
|
...h,
|
|
26
25
|
disableLabelTypography: _,
|
|
27
26
|
disableValueTypography: v,
|
|
28
27
|
hasHint: T
|
|
29
|
-
}, D = S?.labelRow ??
|
|
30
|
-
return /* @__PURE__ */
|
|
28
|
+
}, D = S?.labelRow ?? d, O = S?.label ?? s, k = S?.value ?? s, A = S?.tooltip ?? l, j = S?.hintButton ?? r, M = c(S?.labelRow, p(x?.labelRow, E) ?? {}, E), N = c(S?.label, p(x?.label, E) ?? {}, E), P = c(S?.value, p(x?.value, E) ?? {}, E), F = c(S?.tooltip, p(x?.tooltip, E) ?? {}, E), I = c(S?.hintButton, p(x?.hintButton, E) ?? {}, E), L = m(b, _), R = m(g, v);
|
|
29
|
+
return /* @__PURE__ */ o(f, {
|
|
31
30
|
...w,
|
|
32
|
-
ref:
|
|
31
|
+
ref: i,
|
|
33
32
|
ownerState: E,
|
|
34
|
-
sx: [{ width: "100%" }, ...
|
|
35
|
-
children: [/* @__PURE__ */
|
|
33
|
+
sx: [{ width: "100%" }, ...e(C)],
|
|
34
|
+
children: [/* @__PURE__ */ o(D, {
|
|
36
35
|
direction: "row",
|
|
37
36
|
...M,
|
|
38
|
-
sx: [{ alignItems: "center" }, ...
|
|
39
|
-
children: [L ? /* @__PURE__ */
|
|
37
|
+
sx: [{ alignItems: "center" }, ...e(M?.sx)],
|
|
38
|
+
children: [L ? /* @__PURE__ */ a(O, {
|
|
40
39
|
component: "span",
|
|
41
40
|
color: "text.secondary",
|
|
42
41
|
...N,
|
|
43
42
|
children: b
|
|
44
|
-
}) : b, E.hasHint ? /* @__PURE__ */
|
|
43
|
+
}) : b, E.hasHint ? /* @__PURE__ */ a(A, {
|
|
45
44
|
title: y,
|
|
46
45
|
placement: "top",
|
|
47
46
|
...F,
|
|
48
|
-
children: /* @__PURE__ */
|
|
47
|
+
children: /* @__PURE__ */ a(j, {
|
|
49
48
|
"aria-label": typeof y == "string" ? y : "More information",
|
|
50
49
|
size: "small",
|
|
51
50
|
...I,
|
|
52
51
|
sx: [{
|
|
53
52
|
ml: 1,
|
|
54
53
|
p: 0
|
|
55
|
-
}, ...
|
|
56
|
-
children: /* @__PURE__ */ u
|
|
54
|
+
}, ...e(I?.sx)],
|
|
55
|
+
children: /* @__PURE__ */ a(u, { fontSize: "inherit" })
|
|
57
56
|
})
|
|
58
57
|
}) : null]
|
|
59
|
-
}), R ? /* @__PURE__ */
|
|
58
|
+
}), R ? /* @__PURE__ */ a(k, {
|
|
60
59
|
component: "div",
|
|
61
60
|
...P,
|
|
62
61
|
children: g
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { SLanguagePopover as e, SLanguageSwitcher as t, defaultLanguageOptions as n } from "./s-language-switcher.js";
|
|
2
|
+
export { e as SLanguagePopover, t as SLanguageSwitcher, t as default, n as defaultLanguageOptions };
|
|
@@ -1,2 +1,150 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { SIconButton as e } from "../s-icon-button/s-icon-button.js";
|
|
2
|
+
import { styled as t, useThemeProps as n } from "@mui/material/styles";
|
|
3
|
+
import r from "react";
|
|
4
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
import o from "@mui/material/Typography";
|
|
6
|
+
import { mergeSlotProps as s } from "@mui/material/utils";
|
|
7
|
+
import c from "@mui/material/ListItemIcon";
|
|
8
|
+
import l from "@mui/material/Menu";
|
|
9
|
+
import u from "@mui/material/MenuItem";
|
|
10
|
+
import d from "react-country-flag";
|
|
11
|
+
import { useTranslation as f } from "react-i18next";
|
|
12
|
+
//#region lib/s-language-switcher/s-language-switcher.tsx
|
|
13
|
+
var p = 16, m = 20, h = [{
|
|
14
|
+
code: "en",
|
|
15
|
+
label: "English",
|
|
16
|
+
countryCode: "GB"
|
|
17
|
+
}, {
|
|
18
|
+
code: "vi",
|
|
19
|
+
label: "Vietnamese",
|
|
20
|
+
countryCode: "VN"
|
|
21
|
+
}], g = t(l, {
|
|
22
|
+
name: "SLanguagePopover",
|
|
23
|
+
slot: "Root"
|
|
24
|
+
})({}), _ = r.forwardRef(function(e, t) {
|
|
25
|
+
let r = n({
|
|
26
|
+
props: e,
|
|
27
|
+
name: "SLanguagePopover"
|
|
28
|
+
}), { anchorOrigin: l = {
|
|
29
|
+
horizontal: "right",
|
|
30
|
+
vertical: "bottom"
|
|
31
|
+
}, currentLanguage: f, languages: p = h, menuId: _, menuLabelledBy: v, menuWidth: y = "220px", onLanguageChange: b, slotProps: x, transformOrigin: S = {
|
|
32
|
+
horizontal: "right",
|
|
33
|
+
vertical: "top"
|
|
34
|
+
}, variant: C = "selectedMenu", ...w } = r, T = {
|
|
35
|
+
...r,
|
|
36
|
+
anchorOrigin: l,
|
|
37
|
+
currentLanguage: f,
|
|
38
|
+
languages: p,
|
|
39
|
+
menuId: _,
|
|
40
|
+
menuLabelledBy: v,
|
|
41
|
+
menuWidth: y,
|
|
42
|
+
onLanguageChange: b,
|
|
43
|
+
open: w.open,
|
|
44
|
+
slotProps: x,
|
|
45
|
+
transformOrigin: S,
|
|
46
|
+
variant: C
|
|
47
|
+
};
|
|
48
|
+
return /* @__PURE__ */ i(g, {
|
|
49
|
+
...w,
|
|
50
|
+
ref: t,
|
|
51
|
+
anchorOrigin: l,
|
|
52
|
+
ownerState: T,
|
|
53
|
+
slotProps: {
|
|
54
|
+
...x,
|
|
55
|
+
paper: s(x?.paper, { sx: { minWidth: y } }),
|
|
56
|
+
list: s(x?.list, {
|
|
57
|
+
id: _,
|
|
58
|
+
"aria-labelledby": v
|
|
59
|
+
})
|
|
60
|
+
},
|
|
61
|
+
transformOrigin: S,
|
|
62
|
+
variant: C,
|
|
63
|
+
children: p.map((e) => /* @__PURE__ */ a(u, {
|
|
64
|
+
onClick: (t) => {
|
|
65
|
+
b?.(t, e.code);
|
|
66
|
+
},
|
|
67
|
+
selected: f === e.code,
|
|
68
|
+
children: [/* @__PURE__ */ i(c, { children: /* @__PURE__ */ i(d, {
|
|
69
|
+
alt: "",
|
|
70
|
+
"aria-hidden": "true",
|
|
71
|
+
countryCode: e.countryCode,
|
|
72
|
+
svg: !0,
|
|
73
|
+
style: {
|
|
74
|
+
width: m,
|
|
75
|
+
height: m
|
|
76
|
+
}
|
|
77
|
+
}) }), /* @__PURE__ */ i(o, {
|
|
78
|
+
variant: "subtitle2",
|
|
79
|
+
children: e.label
|
|
80
|
+
})]
|
|
81
|
+
}, e.code))
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
_.displayName = "SLanguagePopover";
|
|
85
|
+
var v = t(e, {
|
|
86
|
+
name: "SLanguageSwitcher",
|
|
87
|
+
slot: "Root"
|
|
88
|
+
})({}), y = r.forwardRef(function(e, t) {
|
|
89
|
+
let o = n({
|
|
90
|
+
props: e,
|
|
91
|
+
name: "SLanguageSwitcher"
|
|
92
|
+
}), { "aria-label": s, languages: c = h, onLanguageChange: l, currentLanguage: u, tooltip: m, buttonFlagSize: g = p, menuWidth: y = "220px", onClick: b, useI18n: x = !0, ...S } = o, C = f(), w = x ? C.t : null, T = x ? C.i18n : null, [E, D] = r.useState(null), O = r.useId(), k = r.useId(), A = S.id ?? O, j = !!E, M = u ?? T?.language ?? c[0]?.code ?? "en", N = c.find((e) => e.code === M) || c[0], P = r.useCallback((e) => {
|
|
93
|
+
b?.(e), e.defaultPrevented || D(e.currentTarget);
|
|
94
|
+
}, [b]), F = r.useCallback(() => {
|
|
95
|
+
D(null);
|
|
96
|
+
}, []), I = r.useCallback((e, t) => {
|
|
97
|
+
l ? l(e, t) : T && T.changeLanguage(t), e.defaultPrevented || F();
|
|
98
|
+
}, [
|
|
99
|
+
F,
|
|
100
|
+
T,
|
|
101
|
+
l
|
|
102
|
+
]), L = m ?? (w ? w("header:language.tooltip") : "Change language"), R = {
|
|
103
|
+
...o,
|
|
104
|
+
"aria-label": s ?? (typeof L == "string" ? L : "Change language"),
|
|
105
|
+
buttonFlagSize: g,
|
|
106
|
+
currentLanguage: M,
|
|
107
|
+
languages: c,
|
|
108
|
+
menuWidth: y,
|
|
109
|
+
onClick: b,
|
|
110
|
+
onLanguageChange: l,
|
|
111
|
+
open: j,
|
|
112
|
+
tooltip: L,
|
|
113
|
+
useI18n: x
|
|
114
|
+
};
|
|
115
|
+
return /* @__PURE__ */ a(r.Fragment, { children: [/* @__PURE__ */ i(v, {
|
|
116
|
+
...S,
|
|
117
|
+
ref: t,
|
|
118
|
+
id: A,
|
|
119
|
+
"aria-controls": j ? k : void 0,
|
|
120
|
+
"aria-expanded": j || void 0,
|
|
121
|
+
"aria-haspopup": "menu",
|
|
122
|
+
"aria-label": s ?? (typeof L == "string" ? L : "Change language"),
|
|
123
|
+
onClick: P,
|
|
124
|
+
ownerState: R,
|
|
125
|
+
tooltip: L,
|
|
126
|
+
children: /* @__PURE__ */ i(d, {
|
|
127
|
+
alt: "",
|
|
128
|
+
"aria-hidden": "true",
|
|
129
|
+
countryCode: N?.countryCode || "US",
|
|
130
|
+
svg: !0,
|
|
131
|
+
style: {
|
|
132
|
+
width: g,
|
|
133
|
+
height: g
|
|
134
|
+
}
|
|
135
|
+
})
|
|
136
|
+
}), /* @__PURE__ */ i(_, {
|
|
137
|
+
anchorEl: E,
|
|
138
|
+
menuId: k,
|
|
139
|
+
menuLabelledBy: A,
|
|
140
|
+
onClose: F,
|
|
141
|
+
open: j,
|
|
142
|
+
onLanguageChange: I,
|
|
143
|
+
languages: c,
|
|
144
|
+
currentLanguage: M,
|
|
145
|
+
menuWidth: y
|
|
146
|
+
})] });
|
|
147
|
+
});
|
|
148
|
+
y.displayName = "SLanguageSwitcher";
|
|
149
|
+
//#endregion
|
|
150
|
+
export { _ as SLanguagePopover, y as SLanguageSwitcher, y as default, h as defaultLanguageOptions };
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { toSxArray as e } from "../utils/sx.js";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { Box as o, Skeleton as s, styled as c, useTheme as l, useThemeProps as u } from "@mui/material";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { Box as i, Skeleton as a, styled as o, useTheme as s, useThemeProps as c } from "@mui/material";
|
|
5
|
+
import { mergeSlotProps as l, useForkRef as u } from "@mui/material/utils";
|
|
7
6
|
//#region lib/s-lazy-image/s-lazy-image.tsx
|
|
8
|
-
var d =
|
|
7
|
+
var d = o(i, {
|
|
9
8
|
name: "SLazyImage",
|
|
10
9
|
slot: "Root"
|
|
11
|
-
})({}), f =
|
|
10
|
+
})({}), f = o("img", {
|
|
12
11
|
name: "SLazyImage",
|
|
13
12
|
slot: "Image"
|
|
14
|
-
})({}), p =
|
|
13
|
+
})({}), p = o(a, {
|
|
15
14
|
name: "SLazyImage",
|
|
16
15
|
slot: "Skeleton"
|
|
17
16
|
})({});
|
|
@@ -21,12 +20,12 @@ function m(e, t) {
|
|
|
21
20
|
function h(e, t) {
|
|
22
21
|
return e === "circular" ? "50%" : e === "rounded" ? typeof t == "number" ? `${t}px` : t : 0;
|
|
23
22
|
}
|
|
24
|
-
var g =
|
|
25
|
-
let
|
|
26
|
-
props:
|
|
23
|
+
var g = t.forwardRef(function(i, a) {
|
|
24
|
+
let o = c({
|
|
25
|
+
props: i,
|
|
27
26
|
name: "SLazyImage"
|
|
28
|
-
}), { alt: g, height: _ = "100%", minHeight: v = "auto", minWidth: y = "auto", slotProps: b, slots: x, src: S, sx: C, variant: w = "rounded", width: T = "100%", ...E } =
|
|
29
|
-
...
|
|
27
|
+
}), { alt: g, height: _ = "100%", minHeight: v = "auto", minWidth: y = "auto", slotProps: b, slots: x, src: S, sx: C, variant: w = "rounded", width: T = "100%", ...E } = o, D = s(), [O, k] = t.useState(null), A = O === S, j = {
|
|
28
|
+
...o,
|
|
30
29
|
alt: g,
|
|
31
30
|
height: _,
|
|
32
31
|
loaded: A,
|
|
@@ -35,13 +34,13 @@ var g = r.forwardRef(function(o, s) {
|
|
|
35
34
|
src: S,
|
|
36
35
|
variant: w,
|
|
37
36
|
width: T
|
|
38
|
-
}, M = x?.root ?? d, N = x?.image ?? f, P = x?.skeleton ?? p, F = m(b?.root, j), I = m(b?.image, j), L = m(b?.skeleton, j), { ref: R, sx: z, ...B } =
|
|
37
|
+
}, M = x?.root ?? d, N = x?.image ?? f, P = x?.skeleton ?? p, F = m(b?.root, j), I = m(b?.image, j), L = m(b?.skeleton, j), { ref: R, sx: z, ...B } = l(F, {
|
|
39
38
|
...E,
|
|
40
39
|
sx: C
|
|
41
|
-
}), { onLoad: V, sx: H, ...U } = I ?? {}, { sx: W, ...G } = L ?? {}, K = h(w, D.shape.borderRadius), q =
|
|
40
|
+
}), { onLoad: V, sx: H, ...U } = I ?? {}, { sx: W, ...G } = L ?? {}, K = h(w, D.shape.borderRadius), q = u(R, a), J = (e) => {
|
|
42
41
|
k(S), V?.(e);
|
|
43
42
|
}, Y = { ownerState: j }, X = { ownerState: j }, Z = { ownerState: j };
|
|
44
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ r(M, {
|
|
45
44
|
...B,
|
|
46
45
|
...Y,
|
|
47
46
|
ref: q,
|
|
@@ -52,7 +51,7 @@ var g = r.forwardRef(function(o, s) {
|
|
|
52
51
|
position: "relative",
|
|
53
52
|
width: T
|
|
54
53
|
}, ...e(z)],
|
|
55
|
-
children: [A ? null : /* @__PURE__ */
|
|
54
|
+
children: [A ? null : /* @__PURE__ */ n(P, {
|
|
56
55
|
animation: "wave",
|
|
57
56
|
variant: w,
|
|
58
57
|
...G,
|
|
@@ -63,7 +62,7 @@ var g = r.forwardRef(function(o, s) {
|
|
|
63
62
|
minWidth: y,
|
|
64
63
|
width: "100%"
|
|
65
64
|
}, ...e(W)]
|
|
66
|
-
}), /* @__PURE__ */
|
|
65
|
+
}), /* @__PURE__ */ n(N, {
|
|
67
66
|
...U,
|
|
68
67
|
...X,
|
|
69
68
|
alt: g,
|
package/dist/s-link/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SLink as e } from "./s-link.js";
|
|
2
2
|
export { e as SLink, e as default };
|
package/dist/s-link/s-link.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SLocalizationProvider as e } from "./s-localization-provider.js";
|
|
2
2
|
export { e as SLocalizationProvider, e as default };
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import "react";
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { AdapterDayjs as t } from "@mui/x-date-pickers/AdapterDayjs";
|
|
4
|
+
import { LocalizationProvider as n } from "@mui/x-date-pickers/LocalizationProvider";
|
|
5
|
+
//#region lib/s-localization-provider/s-localization-provider.tsx
|
|
6
|
+
var r = (r) => /* @__PURE__ */ e(n, {
|
|
7
|
+
...r,
|
|
8
|
+
dateAdapter: t
|
|
9
|
+
});
|
|
10
|
+
r.displayName = "SLocalizationProvider";
|
|
11
|
+
//#endregion
|
|
12
|
+
export { r as SLocalizationProvider, r as default };
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { toSxArray as e } from "../utils/sx.js";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { Box as i, ListItemButton as a, Typography as o, styled as s, useThemeProps as c } from "@mui/material";
|
|
5
|
+
import l from "@mui/utils/appendOwnerState";
|
|
6
6
|
//#region lib/s-nav-item/s-nav-item.tsx
|
|
7
|
-
var u =
|
|
7
|
+
var u = s("li", {
|
|
8
8
|
name: "SNavItem",
|
|
9
9
|
slot: "Root"
|
|
10
10
|
})({});
|
|
11
11
|
function d(e, t) {
|
|
12
12
|
return typeof e == "function" ? e(t) : e;
|
|
13
13
|
}
|
|
14
|
-
var f =
|
|
15
|
-
let f =
|
|
16
|
-
props:
|
|
14
|
+
var f = t.forwardRef(function(t, s) {
|
|
15
|
+
let f = c({
|
|
16
|
+
props: t,
|
|
17
17
|
name: "SNavItem"
|
|
18
18
|
}), { action: p, disabled: m = !1, href: h, icon: g, onClick: _, primary: v, selected: y = !1, slotProps: b, slots: x, sx: S, ...C } = f, w = {
|
|
19
19
|
...f,
|
|
20
20
|
disabled: m,
|
|
21
21
|
selected: y
|
|
22
|
-
}, T = x?.button ??
|
|
22
|
+
}, T = x?.button ?? a, E = x?.icon ?? i, D = x?.primary ?? o, O = x?.action ?? i, k = d(b?.button, w), A = d(b?.icon, w), j = d(b?.primary, w), M = d(b?.action, w), N = l(x?.button, k ?? {}, w), P = l(x?.icon, A ?? {}, w), F = l(x?.primary, j ?? {}, w), I = l(x?.action, M ?? {}, w), { onClick: L, sx: R, ...z } = N, { sx: B, ...V } = P, { sx: H, ...U } = I, W = L || _ ? (e) => {
|
|
23
23
|
L?.(e), e.defaultPrevented || _?.(e);
|
|
24
24
|
} : void 0;
|
|
25
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ n(u, {
|
|
26
26
|
...C,
|
|
27
|
-
ref:
|
|
27
|
+
ref: s,
|
|
28
28
|
ownerState: w,
|
|
29
29
|
sx: [{
|
|
30
30
|
display: "block",
|
|
31
31
|
userSelect: "none"
|
|
32
32
|
}, ...e(S)],
|
|
33
|
-
children: /* @__PURE__ */
|
|
33
|
+
children: /* @__PURE__ */ r(T, {
|
|
34
34
|
component: h ? "a" : "div",
|
|
35
35
|
...z,
|
|
36
36
|
"aria-current": y ? "page" : void 0,
|
|
@@ -49,14 +49,14 @@ var f = n.forwardRef(function(n, c) {
|
|
|
49
49
|
"&.Mui-disabled": { cursor: "not-allowed" },
|
|
50
50
|
"@media (hover: hover) and (pointer: fine)": { "&:hover": { color: "text.primary" } }
|
|
51
51
|
}, ...e(R)],
|
|
52
|
-
children: [/* @__PURE__ */ i
|
|
52
|
+
children: [/* @__PURE__ */ r(i, {
|
|
53
53
|
sx: {
|
|
54
54
|
alignItems: "center",
|
|
55
55
|
display: "flex",
|
|
56
56
|
gap: 1,
|
|
57
57
|
minWidth: 0
|
|
58
58
|
},
|
|
59
|
-
children: [g == null ? null : /* @__PURE__ */
|
|
59
|
+
children: [g == null ? null : /* @__PURE__ */ n(E, {
|
|
60
60
|
component: "span",
|
|
61
61
|
...V,
|
|
62
62
|
sx: [{
|
|
@@ -65,12 +65,12 @@ var f = n.forwardRef(function(n, c) {
|
|
|
65
65
|
justifyContent: "center"
|
|
66
66
|
}, ...e(B)],
|
|
67
67
|
children: g
|
|
68
|
-
}), /* @__PURE__ */
|
|
68
|
+
}), /* @__PURE__ */ n(D, {
|
|
69
69
|
component: "span",
|
|
70
70
|
...F,
|
|
71
71
|
children: v
|
|
72
72
|
})]
|
|
73
|
-
}), p == null ? null : /* @__PURE__ */
|
|
73
|
+
}), p == null ? null : /* @__PURE__ */ n(O, {
|
|
74
74
|
component: "span",
|
|
75
75
|
...U,
|
|
76
76
|
sx: [{
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { SNavGroupItem as e, SNavItems as t } from "./s-nav-items.js";
|
|
2
|
+
export { e as SNavGroupItem, t as SNavItems, t as default };
|
|
@@ -1,2 +1,167 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { toSxArray as e } from "../utils/sx.js";
|
|
2
|
+
import { SNavItem as t } from "../s-nav-item/s-nav-item.js";
|
|
3
|
+
import { styled as n, useThemeProps as r } from "@mui/material/styles";
|
|
4
|
+
import * as i from "react";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
import s from "@mui/icons-material/ExpandMore";
|
|
7
|
+
import c from "@mui/material/Typography";
|
|
8
|
+
import l from "@mui/material/Stack";
|
|
9
|
+
import u from "@mui/material/Box";
|
|
10
|
+
import d from "@mui/material/Collapse";
|
|
11
|
+
import f from "@mui/material/ListItemButton";
|
|
12
|
+
//#region lib/s-nav-items/s-nav-items.tsx
|
|
13
|
+
var p = n(i.forwardRef(function(e, t) {
|
|
14
|
+
return /* @__PURE__ */ a(l, {
|
|
15
|
+
component: "ul",
|
|
16
|
+
...e,
|
|
17
|
+
ref: t
|
|
18
|
+
});
|
|
19
|
+
}), {
|
|
20
|
+
name: "SNavItems",
|
|
21
|
+
slot: "Root"
|
|
22
|
+
})({});
|
|
23
|
+
function m(e, t) {
|
|
24
|
+
return e.some((e) => e.href && (t === e.href || t.startsWith(e.href + "/")) ? !0 : e.items ? m(e.items, t) : !1);
|
|
25
|
+
}
|
|
26
|
+
function h(e, t) {
|
|
27
|
+
return !!(e.href && (t === e.href || t.startsWith(e.href + "/")));
|
|
28
|
+
}
|
|
29
|
+
function g(e, t) {
|
|
30
|
+
let n = e.items ?? [];
|
|
31
|
+
return {
|
|
32
|
+
active: h(e, t),
|
|
33
|
+
childActive: n.length > 0 && m(n, t)
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function _({ item: e, pathname: n, depth: r, linkComponent: l }) {
|
|
37
|
+
let p = !!(e.items && e.items.length > 0), { active: m, childActive: h } = g(e, n), [_, y] = i.useState(e.defaultOpen ?? h);
|
|
38
|
+
if (i.useEffect(() => {
|
|
39
|
+
h && y(!0);
|
|
40
|
+
}, [h]), !p) return /* @__PURE__ */ a(t, {
|
|
41
|
+
disabled: e.disabled,
|
|
42
|
+
href: e.href,
|
|
43
|
+
icon: e.icon ? e.icon(m) : null,
|
|
44
|
+
primary: e.title,
|
|
45
|
+
selected: m,
|
|
46
|
+
slotProps: { button: {
|
|
47
|
+
component: e.component ?? l,
|
|
48
|
+
rel: e.rel,
|
|
49
|
+
target: e.target,
|
|
50
|
+
sx: r > 0 ? { pl: `${(r - 1) * 12 + 12}px` } : void 0
|
|
51
|
+
} }
|
|
52
|
+
});
|
|
53
|
+
let b = m || h;
|
|
54
|
+
return /* @__PURE__ */ o(u, {
|
|
55
|
+
component: "li",
|
|
56
|
+
sx: {
|
|
57
|
+
userSelect: "none",
|
|
58
|
+
display: "block"
|
|
59
|
+
},
|
|
60
|
+
children: [/* @__PURE__ */ o(f, {
|
|
61
|
+
onClick: () => y((e) => !e),
|
|
62
|
+
disabled: e.disabled,
|
|
63
|
+
selected: b,
|
|
64
|
+
sx: {
|
|
65
|
+
alignItems: "center",
|
|
66
|
+
borderRadius: 1,
|
|
67
|
+
color: b ? "text.primary" : "text.secondary",
|
|
68
|
+
display: "flex",
|
|
69
|
+
flex: "0 0 auto",
|
|
70
|
+
gap: 1,
|
|
71
|
+
justifyContent: "space-between",
|
|
72
|
+
p: 1.5,
|
|
73
|
+
pl: r > 0 ? `${r * 12 + 12}px` : "12px",
|
|
74
|
+
whiteSpace: "nowrap",
|
|
75
|
+
width: "100%",
|
|
76
|
+
"&.Mui-disabled": {
|
|
77
|
+
color: "text.disabled",
|
|
78
|
+
cursor: "not-allowed"
|
|
79
|
+
},
|
|
80
|
+
"@media (hover: hover) and (pointer: fine)": { "&:hover": { ...!b && !e.disabled && {
|
|
81
|
+
bgcolor: "action.hover",
|
|
82
|
+
color: "text.primary"
|
|
83
|
+
} } }
|
|
84
|
+
},
|
|
85
|
+
"aria-expanded": _,
|
|
86
|
+
children: [/* @__PURE__ */ o(u, {
|
|
87
|
+
sx: {
|
|
88
|
+
alignItems: "center",
|
|
89
|
+
display: "flex",
|
|
90
|
+
gap: 1
|
|
91
|
+
},
|
|
92
|
+
children: [e.icon ? /* @__PURE__ */ a(u, {
|
|
93
|
+
component: "span",
|
|
94
|
+
sx: {
|
|
95
|
+
display: "flex",
|
|
96
|
+
alignItems: "center",
|
|
97
|
+
justifyContent: "center"
|
|
98
|
+
},
|
|
99
|
+
children: e.icon(b)
|
|
100
|
+
}) : null, /* @__PURE__ */ a(c, {
|
|
101
|
+
component: "span",
|
|
102
|
+
variant: "body1",
|
|
103
|
+
children: e.title
|
|
104
|
+
})]
|
|
105
|
+
}), /* @__PURE__ */ a(u, {
|
|
106
|
+
component: "span",
|
|
107
|
+
sx: {
|
|
108
|
+
display: "flex",
|
|
109
|
+
alignItems: "center",
|
|
110
|
+
color: "text.secondary",
|
|
111
|
+
transition: "transform 200ms ease",
|
|
112
|
+
transform: _ ? "rotate(0deg)" : "rotate(-90deg)"
|
|
113
|
+
},
|
|
114
|
+
children: /* @__PURE__ */ a(s, {})
|
|
115
|
+
})]
|
|
116
|
+
}), /* @__PURE__ */ a(d, {
|
|
117
|
+
in: _,
|
|
118
|
+
timeout: 200,
|
|
119
|
+
unmountOnExit: !0,
|
|
120
|
+
children: /* @__PURE__ */ a(u, {
|
|
121
|
+
sx: {
|
|
122
|
+
ml: r > 0 ? `${r * 16 + 12}px` : "12px",
|
|
123
|
+
mt: 1,
|
|
124
|
+
mb: 1,
|
|
125
|
+
pl: 1
|
|
126
|
+
},
|
|
127
|
+
children: /* @__PURE__ */ a(v, {
|
|
128
|
+
items: e.items,
|
|
129
|
+
pathname: n,
|
|
130
|
+
depth: r + 1,
|
|
131
|
+
linkComponent: l
|
|
132
|
+
})
|
|
133
|
+
})
|
|
134
|
+
})]
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
_.displayName = "SNavGroupItem";
|
|
138
|
+
var v = i.forwardRef(function(t, n) {
|
|
139
|
+
let i = r({
|
|
140
|
+
props: t,
|
|
141
|
+
name: "SNavItems"
|
|
142
|
+
}), { depth: o = 0, items: s, linkComponent: c, pathname: l = "", sx: u, ...d } = i, f = {
|
|
143
|
+
...i,
|
|
144
|
+
depth: o,
|
|
145
|
+
pathname: l
|
|
146
|
+
};
|
|
147
|
+
return /* @__PURE__ */ a(p, {
|
|
148
|
+
spacing: 1,
|
|
149
|
+
...d,
|
|
150
|
+
ref: n,
|
|
151
|
+
ownerState: f,
|
|
152
|
+
sx: [{
|
|
153
|
+
listStyle: "none",
|
|
154
|
+
m: 0,
|
|
155
|
+
p: 0
|
|
156
|
+
}, ...e(u)],
|
|
157
|
+
children: s.map((e) => /* @__PURE__ */ a(_, {
|
|
158
|
+
item: e,
|
|
159
|
+
pathname: l,
|
|
160
|
+
depth: o,
|
|
161
|
+
linkComponent: c
|
|
162
|
+
}, e.key))
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
v.displayName = "SNavItems";
|
|
166
|
+
//#endregion
|
|
167
|
+
export { _ as SNavGroupItem, v as SNavItems, v as default };
|
package/dist/s-no-ssr/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SNoSsr as e } from "./s-no-ssr.js";
|
|
2
2
|
export { e as SNoSsr, e as default };
|