@solostylist/ui-kit 1.0.224 → 1.0.226
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ArrowUpward-BMKLosZj.js → ArrowUpward-DONVUi9Q.js} +1 -1
- package/dist/{ButtonBase-Bo6ysVGS.js → ButtonBase-BDefit5I.js} +100 -99
- package/dist/{ChevronRight-OLNOfW9P.js → ChevronRight-cBbrlMYh.js} +1 -1
- package/dist/{Close-Bj2HYB9Q.js → Close-DRS0T6Yu.js} +1 -1
- package/dist/{Collapse-CnXmaDqT.js → Collapse-Dtji6IrM.js} +4 -3
- package/dist/{ContentCopy-Br2p19dq.js → ContentCopy-C4mVqexq.js} +1 -1
- package/dist/{Download-BhSXOhCI.js → Download-D277qwl2.js} +1 -1
- package/dist/{ExpandMore-Bu7_1g6Q.js → ExpandMore-DIsT5FOp.js} +1 -1
- package/dist/{Favorite-BJSuHe0H.js → Favorite-CbvuQfe4.js} +1 -1
- package/dist/{FormControl-DYkaP-oD.js → FormControl-DMZWdEWz.js} +6 -6
- package/dist/{InfoOutlined-C1AW3f5V.js → InfoOutlined-BCzG-5py.js} +1 -1
- package/dist/{Menu-C-0KEauj.js → Menu-CbHevx8q.js} +20 -20
- package/dist/{MenuItem-DWivWkNb.js → MenuItem-CCClg9Si.js} +8 -8
- package/dist/{MenuList-5HOyYdgq.js → MenuList-5C2nFAWS.js} +45 -45
- package/dist/{Modal-C1VRVWBZ.js → Modal-Cu5Cgh-q.js} +109 -108
- package/dist/{Paper-BY4X6-u_.js → Paper-Cy7rReyx.js} +1 -1
- package/dist/{Typography-EsraKPZO.js → Typography-DqtTB0ZJ.js} +2 -2
- package/dist/{UnfoldMoreRounded-pz7NMMy3.js → UnfoldMoreRounded-Cbt8Oi8S.js} +1 -1
- package/dist/{autocomplete-qLj7AqcP.js → autocomplete-Du0flrk6.js} +1 -1
- package/dist/{avatar-BuMhUthq.js → avatar-DQtjHpOs.js} +2 -2
- package/dist/{checkbox-B95Vlykq.js → checkbox-BGA2cVbl.js} +17 -17
- package/dist/{createSvgIcon-BdNZIlKS.js → createSvgIcon-HW-tbFcL.js} +1 -1
- package/dist/{mergeSlotProps-DBBJwoun.js → mergeSlotProps-slENzJO5.js} +1 -1
- package/dist/monthCalendarClasses-C1jHkjgt.js +14 -0
- package/dist/s-accordion/index.js +1 -1
- package/dist/s-accordion/s-accordion.js +1 -1
- package/dist/{s-accordion-CXHBadZ_.js → s-accordion-D2VsBSgb.js} +7 -7
- package/dist/s-breadcrumbs/s-breadcrumbs.js +1 -1
- package/dist/s-carousel/index.js +1 -1
- package/dist/s-carousel/s-carousel.js +1 -1
- package/dist/{s-carousel-BUJYCigy.js → s-carousel-S6CRrrpW.js} +7 -9
- package/dist/s-category-card/s-category-card.js +0 -1
- package/dist/s-chat-input/index.js +1 -1
- package/dist/s-chat-input/s-chat-input.js +1 -1
- package/dist/s-chat-input-DNptuBb0.js +352 -0
- package/dist/s-chat-message/index.js +1 -1
- package/dist/s-chat-message/s-chat-message.js +1 -1
- package/dist/{s-chat-message-ox4Sj6xh.js → s-chat-message-Bsvsh45G.js} +4 -6
- package/dist/s-chips/index.js +1 -1
- package/dist/s-chips/s-chips.js +1 -1
- package/dist/{s-chips-DelHx6zM.js → s-chips-CH0zKaz-.js} +1 -1
- package/dist/s-code-block/index.js +1 -1
- package/dist/s-code-block/s-code-block.js +1 -1
- package/dist/{s-code-block-sjt0AQb_.js → s-code-block-ByNQ4Zq5.js} +1 -1
- package/dist/s-comment-message/index.js +1 -1
- package/dist/s-comment-message/s-comment-message.js +1 -1
- package/dist/{s-comment-message-DzjXXLZQ.js → s-comment-message-DF580Qxk.js} +13 -19
- package/dist/s-copyable-text/s-copyable-text.js +1 -1
- package/dist/s-data-table/index.js +1 -1
- package/dist/s-data-table/s-data-table.js +1 -1
- package/dist/{s-data-table-TrCdKq9r.js → s-data-table-B8llaX-A.js} +9 -9
- package/dist/s-date-picker/index.js +1 -1
- package/dist/s-date-picker/picker-action-bar.d.ts +12 -0
- package/dist/s-date-picker/picker-action-bar.js +52 -0
- package/dist/s-date-picker/s-date-picker.d.ts +1 -4
- package/dist/s-date-picker/s-date-picker.js +1 -1
- package/dist/s-date-picker-CLncO3oo.js +640 -0
- package/dist/s-datetime-picker/index.js +1 -1
- package/dist/s-datetime-picker/s-datetime-picker.d.ts +1 -4
- package/dist/s-datetime-picker/s-datetime-picker.js +1 -1
- package/dist/{s-datetime-picker-rCWovez1.js → s-datetime-picker-Dy1fX3rI.js} +806 -799
- package/dist/s-dialog/s-dialog.d.ts +3 -3
- package/dist/s-dialog/s-dialog.js +8 -8
- package/dist/s-dialog-confirm/s-dialog-confirm.d.ts +7 -1
- package/dist/s-dialog-confirm/s-dialog-confirm.js +7 -7
- package/dist/s-dialog-message/s-dialog-message.js +3 -4
- package/dist/s-empty/s-empty.js +2 -5
- package/dist/s-error/s-error.js +1 -1
- package/dist/s-error-layout/s-error-layout.d.ts +1 -1
- package/dist/s-error-layout/s-error-layout.js +3 -2
- package/dist/s-file-dropzone/index.js +1 -1
- package/dist/s-file-dropzone/s-file-dropzone.d.ts +1 -4
- package/dist/s-file-dropzone/s-file-dropzone.js +1 -1
- package/dist/{s-file-dropzone-oaQoRV92.js → s-file-dropzone-CbaOf3_3.js} +47 -42
- package/dist/s-gallery/gallery-grid-item.d.ts +17 -0
- package/dist/s-gallery/gallery-grid-item.js +112 -0
- package/dist/s-gallery/gallery-layout.d.ts +16 -0
- package/dist/s-gallery/gallery-layout.js +50 -0
- package/dist/s-gallery/gallery-media-item.d.ts +15 -0
- package/dist/s-gallery/gallery-media-item.js +112 -0
- package/dist/s-gallery/index.d.ts +5 -2
- package/dist/s-gallery/index.js +2 -1
- package/dist/s-gallery/s-gallery.d.ts +1 -17
- package/dist/s-gallery/s-gallery.js +38 -284
- package/dist/s-image-comparison/s-image-comparison.js +46 -42
- package/dist/s-image-modal/default-media-item.d.ts +9 -0
- package/dist/s-image-modal/default-media-item.js +34 -0
- package/dist/s-image-modal/image-modal-thumbnail-dock.d.ts +11 -0
- package/dist/s-image-modal/image-modal-thumbnail-dock.js +102 -0
- package/dist/s-image-modal/index.d.ts +2 -2
- package/dist/s-image-modal/index.js +2 -1
- package/dist/s-image-modal/s-image-modal.d.ts +1 -52
- package/dist/s-image-modal/s-image-modal.js +2 -2
- package/dist/s-image-modal/types.d.ts +52 -0
- package/dist/s-image-modal/types.js +0 -0
- package/dist/s-image-modal/use-image-modal-navigation.d.ts +29 -0
- package/dist/s-image-modal/use-image-modal-navigation.js +57 -0
- package/dist/s-image-modal-hhRD4727.js +243 -0
- package/dist/s-label/s-label.js +1 -1
- package/dist/s-language-switcher/index.js +1 -1
- package/dist/s-language-switcher/s-language-switcher.js +1 -1
- package/dist/{s-language-switcher-vievp2VS.js → s-language-switcher-BKK0r8Kh.js} +4 -4
- package/dist/s-localization-provider/index.js +1 -1
- package/dist/s-localization-provider/s-localization-provider.js +1 -1
- package/dist/{s-localization-provider-YCsec18c.js → s-localization-provider-DDO9UEu_.js} +4 -4
- package/dist/s-nav-item/s-nav-item.js +1 -1
- package/dist/s-nav-items/s-nav-items.js +4 -7
- package/dist/s-pagination/s-pagination.js +12 -15
- package/dist/s-review/index.js +1 -1
- package/dist/s-review/s-review.js +1 -1
- package/dist/{s-review-D4FBfBPF.js → s-review-f0OI1oqM.js} +18 -27
- package/dist/s-scroll-reveal/s-scroll-reveal.js +1 -1
- package/dist/s-scroll-to-top/s-scroll-to-top.js +1 -1
- package/dist/s-select/index.js +1 -1
- package/dist/s-select/s-select.d.ts +2 -0
- package/dist/s-select/s-select.js +1 -1
- package/dist/{s-select-b8CHbeCf.js → s-select-BqWS_5Bs.js} +21 -21
- package/dist/s-select-list/s-select-list.js +2 -11
- package/dist/s-spotlight-cursor/s-spotlight-cursor.js +23 -15
- package/dist/s-stripe/s-stripe-cvc.d.ts +1 -5
- package/dist/s-stripe/s-stripe-cvc.js +11 -11
- package/dist/s-stripe/s-stripe-expiry.d.ts +1 -5
- package/dist/s-stripe/s-stripe-expiry.js +11 -11
- package/dist/s-stripe/s-stripe-number.d.ts +1 -5
- package/dist/s-stripe/s-stripe-number.js +11 -11
- package/dist/s-stripe/s-stripe.d.ts +11 -4
- package/dist/s-stripe/s-stripe.js +19 -17
- package/dist/s-stripe/stripe-input.js +41 -32
- package/dist/s-text-editor/index.js +1 -1
- package/dist/s-text-editor/s-text-editor-toolbar.js +1 -1
- package/dist/s-text-editor/s-text-editor.d.ts +1 -4
- package/dist/s-text-editor/s-text-editor.js +21 -24
- package/dist/{s-text-editor-toolbar-CCK7yyNS.js → s-text-editor-toolbar-DrQ8v-4J.js} +45 -44
- package/dist/s-text-field/index.js +1 -1
- package/dist/s-text-field/s-text-field.d.ts +3 -4
- package/dist/s-text-field/s-text-field.js +1 -1
- package/dist/s-text-field-DLSDoq7u.js +42 -0
- package/dist/s-theme-demo/index.js +1 -1
- package/dist/s-theme-demo/s-theme-demo.js +1 -1
- package/dist/{s-theme-demo-THHj5mFp.js → s-theme-demo-DeY0K6MC.js} +4 -4
- package/dist/s-theme-provider/s-theme-provider.js +26 -25
- package/dist/s-theme-switch/index.js +1 -1
- package/dist/s-theme-switch/s-theme-switch.js +1 -1
- package/dist/{s-theme-switch-V3Q58mkG.js → s-theme-switch-B0KHb2wu.js} +1 -1
- package/dist/s-tip/index.js +1 -1
- package/dist/s-tip/s-tip.js +1 -1
- package/dist/{s-tip-Dwu5T2u0.js → s-tip-Beuy9MLR.js} +2 -2
- package/dist/s-tool-bar/index.d.ts +1 -1
- package/dist/s-tool-bar/index.js +1 -1
- package/dist/s-tool-bar/s-tool-bar.d.ts +1 -155
- package/dist/s-tool-bar/s-tool-bar.js +114 -2
- package/dist/s-tool-bar/tool-bar-action-buttons.d.ts +15 -0
- package/dist/s-tool-bar/tool-bar-action-buttons.js +2 -0
- package/dist/s-tool-bar/tool-bar-image-input.d.ts +8 -0
- package/dist/s-tool-bar/tool-bar-image-input.js +2 -0
- package/dist/s-tool-bar/tool-bar-inputs.d.ts +3 -0
- package/dist/s-tool-bar/tool-bar-inputs.js +139 -0
- package/dist/s-tool-bar/types.d.ts +170 -0
- package/dist/s-tool-bar/types.js +0 -0
- package/dist/s-tool-bar/utils.d.ts +10 -0
- package/dist/s-tool-bar/utils.js +22 -0
- package/dist/theme/components/accordion-summary.js +2 -2
- package/dist/theme/components/accordion.js +1 -1
- package/dist/theme/components/alert.d.ts +1 -1
- package/dist/theme/components/alert.js +1 -1
- package/dist/theme/components/autocomplete.js +1 -1
- package/dist/theme/components/avatar.d.ts +10 -1
- package/dist/theme/components/avatar.js +1 -1
- package/dist/theme/components/card.js +4 -4
- package/dist/theme/components/checkbox.js +1 -1
- package/dist/theme/components/chip.js +17 -6
- package/dist/theme/components/components.js +134 -118
- package/dist/theme/components/date-calendar.d.ts +13 -0
- package/dist/theme/components/date-calendar.js +7 -0
- package/dist/theme/components/day-calendar.d.ts +14 -1
- package/dist/theme/components/day-calendar.js +14 -1
- package/dist/theme/components/dialog-actions.js +1 -1
- package/dist/theme/components/dialog-content.d.ts +13 -0
- package/dist/theme/components/dialog-content.js +7 -0
- package/dist/theme/components/dialog-title.d.ts +21 -0
- package/dist/theme/components/dialog-title.js +7 -0
- package/dist/theme/components/form-label.js +1 -1
- package/dist/theme/components/icon-button.d.ts +5 -1
- package/dist/theme/components/icon-button.js +18 -24
- package/dist/theme/components/linear-progress.js +2 -2
- package/dist/theme/components/link.d.ts +1 -1
- package/dist/theme/components/link.js +2 -2
- package/dist/theme/components/list-item-button.js +2 -2
- package/dist/theme/components/list-item.js +3 -3
- package/dist/theme/components/month-calendar.d.ts +27 -0
- package/dist/theme/components/month-calendar.js +14 -0
- package/dist/theme/components/multi-section-digital-clock-section.js +25 -0
- package/dist/theme/components/outlined-input.js +6 -6
- package/dist/theme/components/picker-day.d.ts +16 -2
- package/dist/theme/components/picker-day.js +13 -1
- package/dist/theme/components/pickers-arrow-switcher.d.ts +12 -0
- package/dist/theme/components/pickers-arrow-switcher.js +4 -0
- package/dist/theme/components/pickers-calendar-header.d.ts +38 -0
- package/dist/theme/components/pickers-calendar-header.js +24 -0
- package/dist/theme/components/select.js +2 -2
- package/dist/theme/components/slider.d.ts +29 -2
- package/dist/theme/components/slider.js +14 -2
- package/dist/theme/components/step-connector.d.ts +1 -1
- package/dist/theme/components/step-connector.js +1 -1
- package/dist/theme/components/step-icon.js +1 -1
- package/dist/theme/components/tab.js +1 -1
- package/dist/theme/components/table-pagination.js +1 -1
- package/dist/theme/components/toggle-button-group.js +1 -1
- package/dist/theme/components/toggle-button.js +1 -1
- package/dist/theme/components/year-calendar.d.ts +36 -0
- package/dist/theme/components/year-calendar.js +17 -0
- package/dist/theme/theme-primitives.d.ts +36 -0
- package/dist/theme/theme-primitives.js +2 -2
- package/dist/{theme-primitives-D2vHHGiX.js → theme-primitives-7ruiI7gY.js} +10 -3
- package/dist/{toggle-button-group-ABwIhV4P.js → toggle-button-group-Dx9fvVok.js} +4 -4
- package/dist/{toggle-button-BUsRxHn0.js → toggle-button-j6VLaPoa.js} +3 -3
- package/dist/tool-bar-action-buttons-B4QhqdK_.js +50 -0
- package/dist/tool-bar-image-input-BKFAtyJ1.js +138 -0
- package/dist/{useControlled-DXKqhylj.js → useControlled-BtZNCHV0.js} +1 -1
- package/dist/useForkRef-yOYCJHzF.js +29 -0
- package/dist/{useMobilePicker-ujH2nH2-.js → useMobilePicker-C8toWhEP.js} +7657 -7674
- package/dist/{useSlot-Dkc1Mj31.js → useSlot-IwEDsR9t.js} +107 -133
- package/dist/{utils-CCnIUPad.js → utils-CU6O7jrX.js} +5 -5
- package/dist/{LocalizationProvider-BdaUKqz3.js → warning-CFMmJJnf.js} +51 -51
- package/dist/yearCalendarClasses-DypEe_Vn.js +14 -0
- package/package.json +1 -1
- package/dist/s-chat-input-DKGeMh55.js +0 -299
- package/dist/s-date-picker-BkZIEZoz.js +0 -634
- package/dist/s-image-modal-DA3DBNbv.js +0 -397
- package/dist/s-text-field-Ck5QMhYI.js +0 -41
- package/dist/s-tool-bar-DGfyNoYW.js +0 -454
- /package/dist/{buttonBaseClasses-BLZbMisL.js → buttonBaseClasses-BVDyR-hz.js} +0 -0
- /package/dist/{checkboxClasses-DSyvUOsN.js → checkboxClasses-DPzQcJz-.js} +0 -0
- /package/dist/{createSimplePaletteValueFilter-GHK52GLU.js → createSimplePaletteValueFilter-5v48HHyU.js} +0 -0
- /package/dist/{extends-D8CDMpIy.js → extends-DM-C9PwL.js} +0 -0
- /package/dist/{formLabelClasses-Cv7W0Roi.js → formLabelClasses-BfRVjiBm.js} +0 -0
- /package/dist/{iconButtonClasses-9jjSQ9-U.js → iconButtonClasses-LyjwljJq.js} +0 -0
- /package/dist/{inputAdornmentClasses-VKwluNTs.js → inputAdornmentClasses-DHmz00nZ.js} +0 -0
- /package/dist/{objectWithoutPropertiesLoose-BpY-kC5L.js → objectWithoutPropertiesLoose-kj3TmhoA.js} +0 -0
- /package/dist/{outlinedInputClasses-Cz4pnn0X.js → outlinedInputClasses-Z5R6RJE3.js} +0 -0
- /package/dist/{selectClasses-DvT1febA.js → selectClasses-vjNpSSyQ.js} +0 -0
- /package/dist/{svgIconClasses-D46YUMKp.js → svgIconClasses-BtHvkhy5.js} +0 -0
- /package/dist/{tabClasses-KqPlYv0c.js → tabClasses-CmFw6sbs.js} +0 -0
- /package/dist/{typographyClasses-CFf0OFiD.js → typographyClasses-CspzYrIn.js} +0 -0
- /package/dist/{useControlled-2-C6cXjG.js → useControlled-DuSwFVhD.js} +0 -0
- /package/dist/{useFormControl-B4z6ONhx.js → useFormControl-bYnTwZE5.js} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Breakpoint } from '@mui/material';
|
|
1
|
+
import { Breakpoint, DialogProps } from '@mui/material';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* Props for the SDialog component.
|
|
5
5
|
*/
|
|
6
|
-
export interface SDialogProps {
|
|
6
|
+
export interface SDialogProps extends Omit<DialogProps, 'title' | 'content' | 'onClose' | 'open' | 'maxWidth' | 'children'> {
|
|
7
7
|
/** Dialog title - can be string or React element */
|
|
8
8
|
title?: string | React.ReactNode;
|
|
9
9
|
/** Dialog content - can be string (auto-wrapped in Typography) or React element */
|
|
@@ -23,5 +23,5 @@ export interface SDialogProps {
|
|
|
23
23
|
/** Whether to show the close button in the title bar */
|
|
24
24
|
showClose?: boolean;
|
|
25
25
|
}
|
|
26
|
-
export declare const SDialog: React.ForwardRefExoticComponent<SDialogProps & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
export declare const SDialog: React.ForwardRefExoticComponent<Omit<SDialogProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
27
27
|
export default SDialog;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { t as e } from "../Close-
|
|
1
|
+
import { t as e } from "../Close-DRS0T6Yu.js";
|
|
2
2
|
import * as t from "react";
|
|
3
3
|
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
4
|
import { Dialog as a, DialogActions as o, DialogContent as s, DialogTitle as c, IconButton as l, Stack as u, Typography as d } from "@mui/material";
|
|
5
5
|
//#region lib/s-dialog/s-dialog.tsx
|
|
6
|
-
var f = t.forwardRef(({ title: t, content: f, actions: p, onClose: m = () => {}, open: h = !1, maxWidth: g = "sm", useForm: _ = !1, onSubmit: v = () => {}, showClose: y = !0 },
|
|
7
|
-
let
|
|
8
|
-
ref:
|
|
6
|
+
var f = t.forwardRef(({ title: t, content: f, actions: p, onClose: m = () => {}, open: h = !1, maxWidth: g = "sm", useForm: _ = !1, onSubmit: v = () => {}, showClose: y = !0, ...b }, x) => {
|
|
7
|
+
let S = /* @__PURE__ */ i(n, { children: [f && /* @__PURE__ */ r(s, {
|
|
8
|
+
ref: x,
|
|
9
9
|
children: typeof f == "string" ? /* @__PURE__ */ r(d, {
|
|
10
|
-
variant: "
|
|
11
|
-
sx: { color: "text.secondary" },
|
|
10
|
+
variant: "body1",
|
|
12
11
|
children: f
|
|
13
12
|
}) : f
|
|
14
13
|
}), p && /* @__PURE__ */ r(o, { children: p })] });
|
|
@@ -17,6 +16,7 @@ var f = t.forwardRef(({ title: t, content: f, actions: p, onClose: m = () => {},
|
|
|
17
16
|
maxWidth: g,
|
|
18
17
|
onClose: m,
|
|
19
18
|
open: h,
|
|
19
|
+
...b,
|
|
20
20
|
children: [t && /* @__PURE__ */ r(c, { children: /* @__PURE__ */ i(u, {
|
|
21
21
|
direction: "row",
|
|
22
22
|
spacing: 3,
|
|
@@ -34,8 +34,8 @@ var f = t.forwardRef(({ title: t, content: f, actions: p, onClose: m = () => {},
|
|
|
34
34
|
})]
|
|
35
35
|
}) }), _ ? /* @__PURE__ */ r("form", {
|
|
36
36
|
onSubmit: v,
|
|
37
|
-
children:
|
|
38
|
-
}) :
|
|
37
|
+
children: S
|
|
38
|
+
}) : S]
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
41
|
f.displayName = "SDialog";
|
|
@@ -20,9 +20,15 @@ export interface SDialogConfirmProps {
|
|
|
20
20
|
showClose?: boolean;
|
|
21
21
|
/** Whether the dialog is in loading state (disables buttons) */
|
|
22
22
|
loading?: boolean;
|
|
23
|
+
/** Text for the cancel button */
|
|
24
|
+
cancelText?: string;
|
|
25
|
+
/** Text for the confirm button */
|
|
26
|
+
confirmText?: string;
|
|
27
|
+
/** Accessible text for the close button */
|
|
28
|
+
closeText?: string;
|
|
23
29
|
}
|
|
24
30
|
export declare const SDialogConfirm: {
|
|
25
|
-
({ title, content, onConfirm, onClose, open, maxWidth, showClose, loading, }: SDialogConfirmProps): React.JSX.Element;
|
|
31
|
+
({ title, content, onConfirm, onClose, open, maxWidth, showClose, loading, cancelText, confirmText, closeText, }: SDialogConfirmProps): React.JSX.Element;
|
|
26
32
|
displayName: string;
|
|
27
33
|
};
|
|
28
34
|
export default SDialogConfirm;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as e } from "../Typography-
|
|
2
|
-
import { t } from "../Close-
|
|
1
|
+
import { t as e } from "../Typography-DqtTB0ZJ.js";
|
|
2
|
+
import { t } from "../Close-DRS0T6Yu.js";
|
|
3
3
|
import { useDialog as n } from "../hooks/use-dialog.js";
|
|
4
4
|
import * as r from "react";
|
|
5
5
|
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
6
|
import { Button as s, Dialog as c, DialogActions as l, DialogContent as u, DialogTitle as d, IconButton as f, Stack as p } from "@mui/material";
|
|
7
7
|
//#region lib/s-dialog-confirm/s-dialog-confirm.tsx
|
|
8
|
-
var m = ({ title: n, content: r, onConfirm: m = () => {}, onClose: h = () => {}, open: g = !1, maxWidth: _ = "sm", showClose: v = !0, loading: y = !1 }) => /* @__PURE__ */ o(c, {
|
|
8
|
+
var m = ({ title: n, content: r, onConfirm: m = () => {}, onClose: h = () => {}, open: g = !1, maxWidth: _ = "sm", showClose: v = !0, loading: y = !1, cancelText: b = "Cancel", confirmText: x = "Confirm", closeText: S = "Close" }) => /* @__PURE__ */ o(c, {
|
|
9
9
|
fullWidth: !0,
|
|
10
10
|
maxWidth: _,
|
|
11
11
|
onClose: h,
|
|
@@ -22,24 +22,24 @@ var m = ({ title: n, content: r, onConfirm: m = () => {}, onClose: h = () => {},
|
|
|
22
22
|
variant: "h5",
|
|
23
23
|
children: n
|
|
24
24
|
}) : /* @__PURE__ */ a("div", { children: n }), v && /* @__PURE__ */ a(f, {
|
|
25
|
+
"aria-label": S,
|
|
25
26
|
onClick: h,
|
|
26
27
|
children: /* @__PURE__ */ a(t, {})
|
|
27
28
|
})]
|
|
28
29
|
}) }),
|
|
29
30
|
r && /* @__PURE__ */ a(u, { children: typeof r == "string" ? /* @__PURE__ */ a(e, {
|
|
30
|
-
variant: "
|
|
31
|
-
sx: { color: "text.secondary" },
|
|
31
|
+
variant: "body1",
|
|
32
32
|
children: r
|
|
33
33
|
}) : r }),
|
|
34
34
|
/* @__PURE__ */ a(l, { children: /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(s, {
|
|
35
35
|
onClick: h,
|
|
36
36
|
variant: "outlined",
|
|
37
37
|
disabled: y,
|
|
38
|
-
children:
|
|
38
|
+
children: b
|
|
39
39
|
}), /* @__PURE__ */ a(s, {
|
|
40
40
|
onClick: m,
|
|
41
41
|
loading: y,
|
|
42
|
-
children:
|
|
42
|
+
children: x
|
|
43
43
|
})] }) })
|
|
44
44
|
]
|
|
45
45
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "../Typography-
|
|
2
|
-
import { t } from "../Close-
|
|
1
|
+
import { t as e } from "../Typography-DqtTB0ZJ.js";
|
|
2
|
+
import { t } from "../Close-DRS0T6Yu.js";
|
|
3
3
|
import { useDialog as n } from "../hooks/use-dialog.js";
|
|
4
4
|
import * as r from "react";
|
|
5
5
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
@@ -28,8 +28,7 @@ var p = ({ title: n, content: r, onClose: p = () => {}, onOk: m = () => {}, open
|
|
|
28
28
|
})]
|
|
29
29
|
}) }),
|
|
30
30
|
r && /* @__PURE__ */ i(l, { children: typeof r == "string" ? /* @__PURE__ */ i(e, {
|
|
31
|
-
variant: "
|
|
32
|
-
sx: { color: "text.secondary" },
|
|
31
|
+
variant: "body1",
|
|
33
32
|
children: r
|
|
34
33
|
}) : r }),
|
|
35
34
|
/* @__PURE__ */ i(c, { children: /* @__PURE__ */ i(o, {
|
package/dist/s-empty/s-empty.js
CHANGED
|
@@ -3,11 +3,8 @@ import { jsx as e } from "react/jsx-runtime";
|
|
|
3
3
|
import { Typography as t } from "@mui/material";
|
|
4
4
|
//#region lib/s-empty/s-empty.tsx
|
|
5
5
|
var n = ({ title: n }) => /* @__PURE__ */ e(t, {
|
|
6
|
-
variant: "
|
|
7
|
-
sx: {
|
|
8
|
-
color: "text.secondary",
|
|
9
|
-
my: 3
|
|
10
|
-
},
|
|
6
|
+
variant: "body1",
|
|
7
|
+
sx: { my: 3 },
|
|
11
8
|
children: n ?? "No data available."
|
|
12
9
|
});
|
|
13
10
|
n.displayName = "SEmpty";
|
package/dist/s-error/s-error.js
CHANGED
|
@@ -23,7 +23,7 @@ var a = () => /* @__PURE__ */ t(r, {
|
|
|
23
23
|
children: "500: Internal server error"
|
|
24
24
|
}),
|
|
25
25
|
/* @__PURE__ */ e(i, {
|
|
26
|
-
variant: "
|
|
26
|
+
variant: "body1",
|
|
27
27
|
children: "We're sorry, but we encountered an error while trying to load the content. Please try again later."
|
|
28
28
|
})
|
|
29
29
|
]
|
|
@@ -18,7 +18,7 @@ export interface SErrorLayoutProps {
|
|
|
18
18
|
imageHeight?: string | number;
|
|
19
19
|
/** Container max width. Default: 'lg' */
|
|
20
20
|
maxWidth?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | false;
|
|
21
|
-
/** Main container height. Default: '
|
|
21
|
+
/** Main container minimum height. Default: '100dvh' */
|
|
22
22
|
height?: string | number;
|
|
23
23
|
/** Vertical padding. Default: 8 (64px) */
|
|
24
24
|
py?: number | string;
|
|
@@ -3,7 +3,7 @@ import "react";
|
|
|
3
3
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
4
|
import { Box as r, Button as i, Container as a, Stack as o, Typography as s } from "@mui/material";
|
|
5
5
|
//#region lib/s-error-layout/s-error-layout.tsx
|
|
6
|
-
var c = ({ imageSrc: c, imageAlt: l, title: u, description: d, buttonText: f, imageWidth: p = "200px", imageHeight: m = "auto", maxWidth: h = "lg", height: g = "
|
|
6
|
+
var c = ({ imageSrc: c, imageAlt: l, title: u, description: d, buttonText: f, imageWidth: p = "200px", imageHeight: m = "auto", maxWidth: h = "lg", height: g = "100dvh", py: _ = 8, spacing: v = 6, titleVariant: y = "h4", descriptionVariant: b = "body1", buttonVariant: x = "contained", buttonColor: S = "primary", containerSx: C, imageContainerSx: w, contentSx: T, titleSx: E, descriptionSx: D, buttonContainerSx: O, buttonProps: k, hideImage: A = !1, customActions: j }) => {
|
|
7
7
|
let M = j ? /* @__PURE__ */ t(r, {
|
|
8
8
|
sx: {
|
|
9
9
|
display: "flex",
|
|
@@ -31,8 +31,9 @@ var c = ({ imageSrc: c, imageAlt: l, title: u, description: d, buttonText: f, im
|
|
|
31
31
|
display: "flex",
|
|
32
32
|
flexDirection: "column",
|
|
33
33
|
justifyContent: "center",
|
|
34
|
+
boxSizing: "border-box",
|
|
35
|
+
minHeight: g,
|
|
34
36
|
py: _,
|
|
35
|
-
height: g,
|
|
36
37
|
...C
|
|
37
38
|
},
|
|
38
39
|
children: /* @__PURE__ */ t(a, {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../s-file-dropzone-
|
|
1
|
+
import { t as e } from "../s-file-dropzone-CbaOf3_3.js";
|
|
2
2
|
export { e as SFileDropzone, e as default };
|
|
@@ -30,8 +30,5 @@ export interface SFileDropzoneProps extends DropzoneOptions {
|
|
|
30
30
|
/** Whether to show the 'Remove all' button */
|
|
31
31
|
isShowBtnRemoveAll?: boolean;
|
|
32
32
|
}
|
|
33
|
-
export declare const SFileDropzone:
|
|
34
|
-
({ hint, label, error, onRemoveAll, onRemove, required, isShowBtnRemoveAll, ...props }: SFileDropzoneProps): React.JSX.Element;
|
|
35
|
-
displayName: string;
|
|
36
|
-
};
|
|
33
|
+
export declare const SFileDropzone: React.ForwardRefExoticComponent<SFileDropzoneProps & React.RefAttributes<HTMLInputElement>>;
|
|
37
34
|
export default SFileDropzone;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../s-file-dropzone-
|
|
1
|
+
import { t as e } from "../s-file-dropzone-CbaOf3_3.js";
|
|
2
2
|
export { e as SFileDropzone, e as default };
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import { t as e } from "./Box-BlmynALm.js";
|
|
2
2
|
import { t } from "./Stack-BQkLmLFp.js";
|
|
3
3
|
import { t as n } from "./utils-B5Rl6Zwv.js";
|
|
4
|
-
import { t as r } from "./
|
|
5
|
-
import { t as i } from "./
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
4
|
+
import { t as r } from "./useForkRef-yOYCJHzF.js";
|
|
5
|
+
import { t as i } from "./createSvgIcon-HW-tbFcL.js";
|
|
6
|
+
import { t as a } from "./Typography-DqtTB0ZJ.js";
|
|
7
|
+
import { SForm as o } from "./s-form/s-form.js";
|
|
8
|
+
import { SFileIcon as s } from "./s-file-icon/s-file-icon.js";
|
|
9
|
+
import * as c from "react";
|
|
10
|
+
import { forwardRef as l } from "react";
|
|
11
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
12
|
+
import { Avatar as f, Button as p, IconButton as m, Tooltip as h } from "@mui/material";
|
|
13
|
+
import { useDropzone as g } from "react-dropzone";
|
|
12
14
|
//#region ../../node_modules/@mui/icons-material/CloseOutlined.mjs
|
|
13
|
-
var
|
|
14
|
-
let { getRootProps:
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
error:
|
|
17
|
-
label:
|
|
18
|
-
required:
|
|
19
|
-
hint:
|
|
20
|
-
children: /* @__PURE__ */
|
|
15
|
+
var _ = i(/* @__PURE__ */ u("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "CloseOutlined"), v = i(/* @__PURE__ */ u("path", { d: "M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3M8 13h2.55v3h2.9v-3H16l-4-4z" }), "CloudUploadOutlined"), y = l(({ hint: i, label: l = "", error: y, onRemoveAll: b, onRemove: x, required: S = !1, isShowBtnRemoveAll: C = !1, ...w }, T) => {
|
|
16
|
+
let { getRootProps: E, getInputProps: D, isDragActive: O, inputRef: k } = g(w), A = r(T, k);
|
|
17
|
+
return /* @__PURE__ */ d(c.Fragment, { children: [/* @__PURE__ */ u(o, {
|
|
18
|
+
error: y,
|
|
19
|
+
label: l,
|
|
20
|
+
required: S,
|
|
21
|
+
hint: i,
|
|
22
|
+
children: /* @__PURE__ */ d(e, {
|
|
21
23
|
sx: {
|
|
22
24
|
alignItems: "center",
|
|
23
25
|
border: "1px dashed",
|
|
@@ -29,32 +31,35 @@ var h = r(/* @__PURE__ */ c("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.4
|
|
|
29
31
|
justifyContent: "center",
|
|
30
32
|
outline: "none",
|
|
31
33
|
p: 4,
|
|
32
|
-
...
|
|
34
|
+
...O && {
|
|
33
35
|
bgcolor: "action.selected",
|
|
34
36
|
opacity: .5
|
|
35
37
|
},
|
|
36
|
-
"&:hover": { ...!
|
|
38
|
+
"&:hover": { ...!O && { bgcolor: "action.hover" } }
|
|
37
39
|
},
|
|
38
|
-
...
|
|
39
|
-
children: [/* @__PURE__ */
|
|
40
|
+
...E(),
|
|
41
|
+
children: [/* @__PURE__ */ u("input", {
|
|
42
|
+
...D(),
|
|
43
|
+
ref: A
|
|
44
|
+
}), /* @__PURE__ */ d(t, {
|
|
40
45
|
direction: "row",
|
|
41
46
|
spacing: 1,
|
|
42
47
|
sx: { alignItems: "center" },
|
|
43
|
-
children: [/* @__PURE__ */
|
|
48
|
+
children: [/* @__PURE__ */ u(f, {
|
|
44
49
|
sx: {
|
|
45
50
|
border: "1px dashed",
|
|
46
51
|
borderColor: "divider",
|
|
47
52
|
color: "text.secondary",
|
|
48
53
|
backgroundColor: "transparent"
|
|
49
54
|
},
|
|
50
|
-
children: /* @__PURE__ */
|
|
51
|
-
}), /* @__PURE__ */
|
|
55
|
+
children: /* @__PURE__ */ u(v, { fontSize: "small" })
|
|
56
|
+
}), /* @__PURE__ */ u(t, {
|
|
52
57
|
spacing: 1,
|
|
53
|
-
children: /* @__PURE__ */
|
|
58
|
+
children: /* @__PURE__ */ d(a, {
|
|
54
59
|
variant: "body2",
|
|
55
60
|
sx: { color: "text.secondary" },
|
|
56
61
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ u(a, {
|
|
58
63
|
component: "span",
|
|
59
64
|
sx: { textDecoration: "underline" },
|
|
60
65
|
variant: "inherit",
|
|
@@ -67,10 +72,10 @@ var h = r(/* @__PURE__ */ c("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.4
|
|
|
67
72
|
})]
|
|
68
73
|
})]
|
|
69
74
|
})
|
|
70
|
-
}),
|
|
75
|
+
}), w.files?.length ? /* @__PURE__ */ d(t, {
|
|
71
76
|
spacing: 1,
|
|
72
77
|
sx: { mt: 1 },
|
|
73
|
-
children: [/* @__PURE__ */
|
|
78
|
+
children: [/* @__PURE__ */ u(t, {
|
|
74
79
|
component: "ul",
|
|
75
80
|
spacing: 1,
|
|
76
81
|
sx: {
|
|
@@ -78,7 +83,7 @@ var h = r(/* @__PURE__ */ c("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.4
|
|
|
78
83
|
m: 0,
|
|
79
84
|
p: 0
|
|
80
85
|
},
|
|
81
|
-
children:
|
|
86
|
+
children: w.files?.map((r) => /* @__PURE__ */ d(t, {
|
|
82
87
|
component: "li",
|
|
83
88
|
direction: "row",
|
|
84
89
|
spacing: 2,
|
|
@@ -91,44 +96,44 @@ var h = r(/* @__PURE__ */ c("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.4
|
|
|
91
96
|
p: 1
|
|
92
97
|
},
|
|
93
98
|
children: [
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ u(s, { extension: r.name.split(".").pop() }),
|
|
100
|
+
/* @__PURE__ */ d(e, {
|
|
96
101
|
sx: { flex: "1 1 auto" },
|
|
97
|
-
children: [/* @__PURE__ */
|
|
102
|
+
children: [/* @__PURE__ */ u(a, {
|
|
98
103
|
variant: "subtitle2",
|
|
99
104
|
children: r.name
|
|
100
|
-
}), /* @__PURE__ */
|
|
105
|
+
}), /* @__PURE__ */ u(a, {
|
|
101
106
|
variant: "body2",
|
|
102
107
|
sx: { color: "text.secondary" },
|
|
103
108
|
children: n(r.size)
|
|
104
109
|
})]
|
|
105
110
|
}),
|
|
106
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ u(h, {
|
|
107
112
|
title: "Remove",
|
|
108
|
-
children: /* @__PURE__ */
|
|
113
|
+
children: /* @__PURE__ */ u(m, {
|
|
109
114
|
onClick: () => {
|
|
110
|
-
|
|
115
|
+
x?.(r);
|
|
111
116
|
},
|
|
112
|
-
children: /* @__PURE__ */
|
|
117
|
+
children: /* @__PURE__ */ u(_, {})
|
|
113
118
|
})
|
|
114
119
|
})
|
|
115
120
|
]
|
|
116
121
|
}, r.size))
|
|
117
|
-
}), /* @__PURE__ */
|
|
122
|
+
}), /* @__PURE__ */ u(t, {
|
|
118
123
|
direction: "row",
|
|
119
124
|
sx: {
|
|
120
125
|
alignItems: "center",
|
|
121
126
|
justifyContent: "flex-end"
|
|
122
127
|
},
|
|
123
|
-
children:
|
|
124
|
-
onClick:
|
|
128
|
+
children: C && /* @__PURE__ */ u(p, {
|
|
129
|
+
onClick: b,
|
|
125
130
|
type: "button",
|
|
126
131
|
variant: "text",
|
|
127
132
|
children: "Remove all"
|
|
128
133
|
})
|
|
129
134
|
})]
|
|
130
135
|
}) : null] });
|
|
131
|
-
};
|
|
132
|
-
|
|
136
|
+
});
|
|
137
|
+
y.displayName = "SFileDropzone";
|
|
133
138
|
//#endregion
|
|
134
|
-
export {
|
|
139
|
+
export { y as t };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { MediaItemType } from '../s-image-modal';
|
|
3
|
+
/**
|
|
4
|
+
* Single draggable grid cell: media + hover overlay with title/desc
|
|
5
|
+
*/
|
|
6
|
+
export declare const GalleryGridItem: React.FC<{
|
|
7
|
+
item: MediaItemType;
|
|
8
|
+
index: number;
|
|
9
|
+
/** Unique gallery instance id used to scope framer-motion layout ids */
|
|
10
|
+
instanceId: string;
|
|
11
|
+
/** Whether a drag is in progress anywhere in the gallery (suppresses clicks) */
|
|
12
|
+
isDragging: boolean;
|
|
13
|
+
onSelect: (item: MediaItemType) => void;
|
|
14
|
+
onDragStart: () => void;
|
|
15
|
+
/** Called on drag end with the combined x+y drag offset */
|
|
16
|
+
onDragEnd: (index: number, moveDistance: number) => void;
|
|
17
|
+
}>;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { MediaItem as e } from "./gallery-media-item.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
import { Box as r, Paper as i, Typography as a } from "@mui/material";
|
|
5
|
+
import { motion as o } from "framer-motion";
|
|
6
|
+
//#region lib/s-gallery/gallery-grid-item.tsx
|
|
7
|
+
var s = ({ item: s, index: c, instanceId: l, isDragging: u, onSelect: d, onDragStart: f, onDragEnd: p }) => /* @__PURE__ */ t(o.div, {
|
|
8
|
+
layoutId: `media-${s.id}-${l}`,
|
|
9
|
+
onClick: () => !u && d(s),
|
|
10
|
+
variants: {
|
|
11
|
+
hidden: {
|
|
12
|
+
y: 50,
|
|
13
|
+
scale: .9,
|
|
14
|
+
opacity: 0
|
|
15
|
+
},
|
|
16
|
+
visible: {
|
|
17
|
+
y: 0,
|
|
18
|
+
scale: 1,
|
|
19
|
+
opacity: 1,
|
|
20
|
+
transition: {
|
|
21
|
+
type: "spring",
|
|
22
|
+
stiffness: 350,
|
|
23
|
+
damping: 25,
|
|
24
|
+
delay: c * .05
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
whileHover: {
|
|
29
|
+
filter: "brightness(1.1)",
|
|
30
|
+
zIndex: 10
|
|
31
|
+
},
|
|
32
|
+
drag: !0,
|
|
33
|
+
dragConstraints: {
|
|
34
|
+
left: 0,
|
|
35
|
+
right: 0,
|
|
36
|
+
top: 0,
|
|
37
|
+
bottom: 0
|
|
38
|
+
},
|
|
39
|
+
dragElastic: 1,
|
|
40
|
+
onDragStart: f,
|
|
41
|
+
onDragEnd: (e, t) => p(c, t.offset.x + t.offset.y),
|
|
42
|
+
style: {
|
|
43
|
+
position: "relative",
|
|
44
|
+
gridRow: s.rowSpan ? `span ${s.rowSpan}` : "span 2",
|
|
45
|
+
gridColumn: s.colSpan ? `span ${s.colSpan}` : "span 1"
|
|
46
|
+
},
|
|
47
|
+
children: /* @__PURE__ */ n(i, {
|
|
48
|
+
sx: {
|
|
49
|
+
position: "relative",
|
|
50
|
+
overflow: "hidden",
|
|
51
|
+
borderRadius: 1,
|
|
52
|
+
width: "100%",
|
|
53
|
+
height: "100%",
|
|
54
|
+
cursor: "grab",
|
|
55
|
+
"&:active": { cursor: "grabbing" },
|
|
56
|
+
"&:hover .hover-overlay": { opacity: 1 }
|
|
57
|
+
},
|
|
58
|
+
children: [/* @__PURE__ */ t(e, {
|
|
59
|
+
item: s,
|
|
60
|
+
sx: {
|
|
61
|
+
position: "absolute",
|
|
62
|
+
inset: 0,
|
|
63
|
+
width: "100%",
|
|
64
|
+
height: "100%"
|
|
65
|
+
},
|
|
66
|
+
onClick: () => !u && d(s)
|
|
67
|
+
}), (s.title || s.desc) && /* @__PURE__ */ n(r, {
|
|
68
|
+
className: "hover-overlay",
|
|
69
|
+
sx: {
|
|
70
|
+
position: "absolute",
|
|
71
|
+
inset: 0,
|
|
72
|
+
display: "flex",
|
|
73
|
+
flexDirection: "column",
|
|
74
|
+
justifyContent: "flex-end",
|
|
75
|
+
padding: 1.5,
|
|
76
|
+
pointerEvents: "none",
|
|
77
|
+
opacity: 0,
|
|
78
|
+
transition: "opacity 0.2s ease-in-out",
|
|
79
|
+
color: "common.white",
|
|
80
|
+
background: "linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.35) 45%, transparent)"
|
|
81
|
+
},
|
|
82
|
+
children: [s.title && /* @__PURE__ */ t(a, {
|
|
83
|
+
variant: "h6",
|
|
84
|
+
sx: {
|
|
85
|
+
position: "relative",
|
|
86
|
+
fontSize: {
|
|
87
|
+
xs: 14,
|
|
88
|
+
sm: 18,
|
|
89
|
+
md: 20
|
|
90
|
+
},
|
|
91
|
+
whiteSpace: "nowrap",
|
|
92
|
+
overflow: "hidden",
|
|
93
|
+
textOverflow: "ellipsis"
|
|
94
|
+
},
|
|
95
|
+
children: s.title
|
|
96
|
+
}), s.desc && /* @__PURE__ */ t(a, {
|
|
97
|
+
variant: "body2",
|
|
98
|
+
sx: {
|
|
99
|
+
position: "relative",
|
|
100
|
+
mt: .5,
|
|
101
|
+
display: "-webkit-box",
|
|
102
|
+
WebkitLineClamp: 2,
|
|
103
|
+
WebkitBoxOrient: "vertical",
|
|
104
|
+
overflow: "hidden"
|
|
105
|
+
},
|
|
106
|
+
children: s.desc
|
|
107
|
+
})]
|
|
108
|
+
})]
|
|
109
|
+
})
|
|
110
|
+
}, `${s.id}-${l}`);
|
|
111
|
+
//#endregion
|
|
112
|
+
export { s as GalleryGridItem };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MediaItemType } from '../s-image-modal';
|
|
2
|
+
/**
|
|
3
|
+
* Built-in layout variants for the gallery
|
|
4
|
+
*/
|
|
5
|
+
export type GalleryLayoutVariant = 'masonry' | 'grid' | 'spotlight' | 'featured' | 'highlight' | 'custom';
|
|
6
|
+
/**
|
|
7
|
+
* Get layout dimensions for a specific index and variant
|
|
8
|
+
*/
|
|
9
|
+
export declare const getLayoutDimensions: (index: number, variant: GalleryLayoutVariant) => {
|
|
10
|
+
colSpan: number;
|
|
11
|
+
rowSpan: number;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Apply layout variant to media items by setting colSpan and rowSpan
|
|
15
|
+
*/
|
|
16
|
+
export declare const applyLayoutVariant: (items: MediaItemType[], variant: GalleryLayoutVariant) => MediaItemType[];
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
//#region lib/s-gallery/gallery-layout.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return e % 3 == 0 ? 3 : e % 2 == 0 ? 2 : 4;
|
|
4
|
+
}
|
|
5
|
+
var t = (t, n) => {
|
|
6
|
+
switch (n) {
|
|
7
|
+
case "grid": return {
|
|
8
|
+
colSpan: 1,
|
|
9
|
+
rowSpan: 2
|
|
10
|
+
};
|
|
11
|
+
case "masonry": return {
|
|
12
|
+
colSpan: 1,
|
|
13
|
+
rowSpan: e(t)
|
|
14
|
+
};
|
|
15
|
+
case "spotlight": return t === 0 ? {
|
|
16
|
+
colSpan: 2,
|
|
17
|
+
rowSpan: 4
|
|
18
|
+
} : {
|
|
19
|
+
colSpan: 1,
|
|
20
|
+
rowSpan: 2
|
|
21
|
+
};
|
|
22
|
+
case "featured": return t === 0 ? {
|
|
23
|
+
colSpan: 2,
|
|
24
|
+
rowSpan: 6
|
|
25
|
+
} : {
|
|
26
|
+
colSpan: 1,
|
|
27
|
+
rowSpan: 2
|
|
28
|
+
};
|
|
29
|
+
case "highlight": return t === 0 ? {
|
|
30
|
+
colSpan: 3,
|
|
31
|
+
rowSpan: 6
|
|
32
|
+
} : {
|
|
33
|
+
colSpan: 1,
|
|
34
|
+
rowSpan: 2
|
|
35
|
+
};
|
|
36
|
+
case "custom": return {
|
|
37
|
+
colSpan: 1,
|
|
38
|
+
rowSpan: 2
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}, n = (e, n) => n === "custom" ? e : e.map((e, r) => {
|
|
42
|
+
let { colSpan: i, rowSpan: a } = t(r, n);
|
|
43
|
+
return {
|
|
44
|
+
...e,
|
|
45
|
+
colSpan: i,
|
|
46
|
+
rowSpan: a
|
|
47
|
+
};
|
|
48
|
+
});
|
|
49
|
+
//#endregion
|
|
50
|
+
export { n as applyLayoutVariant, t as getLayoutDimensions };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SxProps, Theme } from '@mui/material';
|
|
3
|
+
import { MediaItemType } from '../s-image-modal';
|
|
4
|
+
/**
|
|
5
|
+
* Props for individual MediaItem components
|
|
6
|
+
*/
|
|
7
|
+
export type MediaItemProps = {
|
|
8
|
+
/** Media item data */
|
|
9
|
+
item: MediaItemType;
|
|
10
|
+
/** Custom styling */
|
|
11
|
+
sx?: SxProps<Theme>;
|
|
12
|
+
/** Click handler */
|
|
13
|
+
onClick?: () => void;
|
|
14
|
+
};
|
|
15
|
+
export declare const MediaItem: React.FC<MediaItemProps>;
|