@solostylist/ui-kit 1.0.204 → 1.0.205
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-CDLbIMHR.js +6 -0
- package/dist/Box-CCxGQYgC.js +46 -0
- package/dist/{ButtonBase-CyZX7c8K.js → ButtonBase-BpUvp8ep.js} +284 -285
- package/dist/ChevronLeft-C7DUyLoc.js +6 -0
- package/dist/ChevronRight-VFk57Tte.js +6 -0
- package/dist/Close-OtVsJy75.js +6 -0
- package/dist/ContentCopy-DHDP4d6g.js +6 -0
- package/dist/{DefaultPropsProvider-CFaP_bh_.js → DefaultPropsProvider-DpRXvTbj.js} +48 -48
- package/dist/Download-Bbx6BZUJ.js +6 -0
- package/dist/ExpandMore-BTC1yHzp.js +6 -0
- package/dist/Favorite-mcH9KX-m.js +6 -0
- package/dist/{Menu-BB3Khkc0.js → Menu-Dhh4e9H1.js} +544 -544
- package/dist/{MenuItem-CjPW2J-w.js → MenuItem-aaIy8lan.js} +39 -39
- package/dist/{Paper-COr98fp-.js → Paper--8Q3qCqb.js} +25 -25
- package/dist/{Select-B9880Uge.js → Select-B5RvkbDO.js} +732 -732
- package/dist/{Stack-BJ4hQFAK.js → Stack-D-aoKnaS.js} +27 -27
- package/dist/{Typography-B_GHPkH2.js → Typography-CswuXQLF.js} +25 -25
- package/dist/avatar-BVV8tT0K.js +10 -0
- package/dist/{buttonBaseClasses-DqKyadLa.js → buttonBaseClasses-CzfJbQi5.js} +1 -1
- package/dist/checkbox-Dd2nIREk.js +57 -0
- package/dist/chunk-efA98nb6.js +13 -0
- package/dist/{createSvgIcon-Bs2KOQvq.js → createSvgIcon-KjKEsKNV.js} +50 -50
- package/dist/{createTheme-CMuiGmV-.js → createTheme-DuS5_nJb.js} +1 -1
- package/dist/{defaultTheme-C7Su92B_.js → defaultTheme-DBynruYK.js} +1 -1
- package/dist/entries/carousel.js +2 -3
- package/dist/entries/chat.js +2 -3
- package/dist/entries/code.js +2 -3
- package/dist/entries/core.js +13 -14
- package/dist/entries/dates.js +4 -5
- package/dist/entries/dropzone.js +2 -3
- package/dist/entries/editor.js +1 -2
- package/dist/entries/gallery.js +1 -2
- package/dist/entries/i18n.js +2 -3
- package/dist/entries/motion.js +1 -2
- package/dist/entries/scrollbar.js +0 -1
- package/dist/entries/stripe.js +1 -2
- package/dist/{extendSxProp-DC0zdi8T.js → extendSxProp-YPyfzlEb.js} +1 -1
- package/dist/{iconButtonClasses-BggbSXxO.js → iconButtonClasses-ApDUTw5e.js} +1 -1
- package/dist/main.js +21 -22
- package/dist/{mergeSlotProps-DKt8V_TK.js → mergeSlotProps-BG-pTgpj.js} +1 -1
- package/dist/{outlinedInputClasses-5cvWh4bu.js → outlinedInputClasses-bgmdcolQ.js} +1 -1
- package/dist/{resolveProps-BfzHOpig.js → resolveProps-CcZ6Bxlf.js} +1 -1
- package/dist/s-accordion/index.js +2 -3
- package/dist/s-accordion/s-accordion.js +2 -3
- package/dist/{s-accordion-Dt3fbZNh.js → s-accordion-Da1IZflX.js} +203 -203
- package/dist/s-action-overlay/index.js +0 -1
- package/dist/s-action-overlay/s-action-overlay.js +44 -44
- package/dist/s-autocomplete/index.js +0 -1
- package/dist/s-autocomplete/s-autocomplete.js +12 -12
- package/dist/s-avatar/index.js +0 -1
- package/dist/s-avatar/s-avatar.js +16 -16
- package/dist/s-blur-text/index.js +0 -1
- package/dist/s-blur-text/s-blur-text.js +34 -34
- package/dist/s-breadcrumbs/index.js +1 -2
- package/dist/s-breadcrumbs/s-breadcrumbs.js +24 -24
- package/dist/s-button/index.js +0 -1
- package/dist/s-button/s-button.js +6 -6
- package/dist/s-carousel/index.js +2 -3
- package/dist/s-carousel/s-carousel.js +2 -3
- package/dist/s-carousel-BoDg9pKU.js +125 -0
- package/dist/s-category-card/index.js +0 -1
- package/dist/s-category-card/s-category-card.js +31 -31
- package/dist/s-chat-input/index.js +2 -3
- package/dist/s-chat-input/s-chat-input.js +2 -3
- package/dist/{s-chat-input-j_4JZfmI.js → s-chat-input-v_XIZVGk.js} +85 -85
- package/dist/s-chat-message/index.js +2 -3
- package/dist/s-chat-message/s-chat-message.js +2 -3
- package/dist/s-chat-message-CWtxsicj.js +281 -0
- package/dist/s-checkbox/index.js +0 -1
- package/dist/s-checkbox/s-checkbox.js +13 -13
- package/dist/s-chip/index.js +0 -1
- package/dist/s-chip/s-chip.js +6 -6
- package/dist/s-chips/index.js +0 -1
- package/dist/s-chips/s-chips.js +37 -37
- package/dist/s-code-block/index.js +2 -3
- package/dist/s-code-block/s-code-block.js +2 -3
- package/dist/{s-code-block-BxdWmtRX.js → s-code-block-BqYdR0Em.js} +21 -21
- package/dist/s-comment-message/index.js +2 -3
- package/dist/s-comment-message/s-comment-message.js +2 -3
- package/dist/s-comment-message-DDAHdQqY.js +195 -0
- package/dist/s-copyable-text/index.js +1 -2
- package/dist/s-copyable-text/s-copyable-text.js +20 -20
- package/dist/s-countdown/index.js +1 -2
- package/dist/s-countdown/s-count-box.js +31 -31
- package/dist/s-countdown/s-count-down.js +14 -14
- package/dist/s-data-table/index.js +2 -3
- package/dist/s-data-table/s-data-table.js +2 -3
- package/dist/{s-data-table-B9B189jk.js → s-data-table-BjqqIsFX.js} +284 -284
- package/dist/s-date-picker/index.js +2 -3
- package/dist/s-date-picker/s-date-picker.js +2 -3
- package/dist/{s-date-picker-CH4q-Bfx.js → s-date-picker-BYqxsjPU.js} +68 -68
- package/dist/s-datetime-picker/index.js +2 -3
- package/dist/s-datetime-picker/s-datetime-picker.js +2 -3
- package/dist/{s-datetime-picker-dviksz3-.js → s-datetime-picker-BtwGoxL3.js} +1251 -1251
- package/dist/s-dialog/index.js +1 -2
- package/dist/s-dialog/s-dialog.js +28 -28
- package/dist/s-dialog-confirm/index.js +1 -2
- package/dist/s-dialog-confirm/s-dialog-confirm.js +42 -42
- package/dist/s-dialog-message/index.js +1 -2
- package/dist/s-dialog-message/s-dialog-message.js +32 -32
- package/dist/s-empty/index.js +0 -1
- package/dist/s-empty/s-empty.js +5 -5
- package/dist/s-error/index.js +0 -1
- package/dist/s-error/s-error.js +6 -6
- package/dist/s-error-layout/index.js +0 -1
- package/dist/s-error-layout/s-error-layout.js +36 -36
- package/dist/s-file-dropzone/index.js +2 -3
- package/dist/s-file-dropzone/s-file-dropzone.js +2 -3
- package/dist/s-file-dropzone-BJBNFC_b.js +134 -0
- package/dist/s-file-icon/index.js +1 -2
- package/dist/s-file-icon/s-file-icon.js +79 -79
- package/dist/s-flex-box/index.js +1 -2
- package/dist/s-flex-box/s-flex-box.js +7 -7
- package/dist/s-form/index.js +0 -1
- package/dist/s-form/s-form.js +11 -11
- package/dist/s-gallery/index.js +1 -2
- package/dist/s-gallery/s-gallery.js +72 -72
- package/dist/s-glow-button/index.js +1 -2
- package/dist/s-glow-button/s-glow-button.js +10 -10
- package/dist/s-gradient-icon/index.js +0 -1
- package/dist/s-gradient-icon/s-gradient-icon.js +46 -46
- package/dist/s-i18n-provider/index.js +0 -1
- package/dist/s-i18n-provider/s-i18n-provider.js +13 -14
- package/dist/s-icon-button/index.js +0 -1
- package/dist/s-icon-button/s-icon-button.js +7 -7
- package/dist/s-image-comparison/index.js +1 -2
- package/dist/s-image-comparison/s-image-comparison.js +56 -56
- package/dist/s-image-modal/index.js +1 -2
- package/dist/s-image-modal/s-image-modal.js +94 -94
- package/dist/s-item-not-found/index.js +0 -1
- package/dist/s-item-not-found/s-item-not-found.js +48 -48
- package/dist/s-label/index.js +2 -3
- package/dist/s-label/s-label.js +2 -3
- package/dist/s-label-Bt4vQGGN.js +30 -0
- package/dist/s-language-switcher/index.js +2 -3
- package/dist/s-language-switcher/s-language-switcher.js +2 -3
- package/dist/{s-language-switcher-DhcrqHJt.js → s-language-switcher-BJP1r1la.js} +53 -53
- package/dist/s-lazy-image/index.js +0 -1
- package/dist/s-lazy-image/s-lazy-image.js +27 -27
- package/dist/s-link/index.js +0 -1
- package/dist/s-link/s-link.js +15 -15
- package/dist/s-localization-provider/index.js +2 -3
- package/dist/s-localization-provider/s-localization-provider.js +2 -3
- package/dist/{s-localization-provider-BpoHpRVl.js → s-localization-provider-CeOR72Ti.js} +9 -9
- package/dist/s-moving-border/index.js +0 -1
- package/dist/s-moving-border/s-moving-border.js +38 -38
- package/dist/s-multi-select/index.js +2 -3
- package/dist/s-multi-select/s-multi-select.js +2 -3
- package/dist/s-multi-select-xKP4heeG.js +64 -0
- package/dist/s-no-ssr/index.js +0 -1
- package/dist/s-no-ssr/s-no-ssr.js +10 -10
- package/dist/s-overlay-scrollbar/index.js +0 -1
- package/dist/s-overlay-scrollbar/s-overlay-scrollbar.js +9 -9
- package/dist/s-pagination/index.js +0 -1
- package/dist/s-pagination/s-pagination.js +17 -17
- package/dist/s-pixel-reveal/index.js +1 -2
- package/dist/s-pixel-reveal/s-pixel-reveal.js +62 -62
- package/dist/s-radial-pulse-animate/index.js +1 -2
- package/dist/s-radial-pulse-animate/s-radial-pulse-animate.js +37 -37
- package/dist/s-rating/index.js +0 -1
- package/dist/s-rating/s-rating.js +6 -6
- package/dist/s-review/index.js +2 -3
- package/dist/s-review/s-review.js +2 -3
- package/dist/s-review-DOBlCEU2.js +241 -0
- package/dist/s-scroll-reveal/index.js +0 -1
- package/dist/s-scroll-reveal/s-scroll-reveal.js +11 -11
- package/dist/s-scroll-to-top/index.js +1 -2
- package/dist/s-scroll-to-top/s-scroll-to-top.js +14 -14
- package/dist/s-scroll-velocity/index.js +0 -1
- package/dist/s-scroll-velocity/s-scroll-velocity.js +6 -6
- package/dist/s-scroll-velocity/scroll-velocity-container.js +8 -8
- package/dist/s-scroll-velocity/scroll-velocity-row.js +22 -22
- package/dist/s-select/index.js +2 -3
- package/dist/s-select/s-select.js +2 -3
- package/dist/s-select-DXbeZ0CG.js +110 -0
- package/dist/s-select-list/index.js +0 -1
- package/dist/s-select-list/s-select-list.js +17 -17
- package/dist/s-skeleton/index.js +0 -1
- package/dist/s-skeleton/s-skeleton.js +16 -16
- package/dist/s-snackbar-message/index.js +0 -1
- package/dist/s-snackbar-message/s-snackbar-message.js +24 -24
- package/dist/s-spotlight-cursor/index.js +0 -1
- package/dist/s-spotlight-cursor/s-spotlight-cursor.js +21 -21
- package/dist/s-stripe/index.js +1 -2
- package/dist/s-stripe/s-stripe-cvc.js +8 -9
- package/dist/s-stripe/s-stripe-expiry.js +8 -9
- package/dist/s-stripe/s-stripe-number.js +8 -9
- package/dist/s-stripe/s-stripe.js +10 -10
- package/dist/s-stripe/stripe-input.js +16 -16
- package/dist/s-switch/index.js +0 -1
- package/dist/s-switch/s-switch.js +13 -13
- package/dist/s-tabs/index.js +0 -1
- package/dist/s-tabs/s-tab-panel.js +7 -7
- package/dist/s-tabs/s-tab.js +6 -6
- package/dist/s-tabs/s-tabs.js +24 -24
- package/dist/s-text-editor/index.js +2 -3
- package/dist/s-text-editor/s-text-editor-toolbar.js +2 -3
- package/dist/s-text-editor/s-text-editor.js +24 -24
- package/dist/s-text-editor-toolbar-BDDttdIt.js +177 -0
- package/dist/s-text-field/index.js +2 -3
- package/dist/s-text-field/s-text-field.js +2 -3
- package/dist/s-text-field-ni42E-1x.js +41 -0
- package/dist/s-text-shimmer/index.js +1 -2
- package/dist/s-text-shimmer/s-text-shimmer.js +13 -13
- package/dist/s-text-truncation/index.js +0 -1
- package/dist/s-text-truncation/s-text-truncation.js +42 -42
- package/dist/s-theme-demo/index.js +2 -3
- package/dist/s-theme-demo/s-theme-demo.js +2 -3
- package/dist/{s-theme-demo-ChEG6wog.js → s-theme-demo-B4pz6fse.js} +181 -181
- package/dist/s-theme-provider/index.js +1 -2
- package/dist/s-theme-provider/s-theme-provider.js +16 -16
- package/dist/s-theme-switch/index.js +2 -3
- package/dist/s-theme-switch/s-theme-switch.js +2 -3
- package/dist/s-theme-switch-CCEdponC.js +37 -0
- package/dist/s-tip/index.js +2 -3
- package/dist/s-tip/s-tip.js +2 -3
- package/dist/s-tip-CG51Q6oR.js +34 -0
- package/dist/s-tool-bar/index.js +2 -3
- package/dist/s-tool-bar/s-tool-bar.js +2 -3
- package/dist/s-tool-bar-C2lZhhJm.js +404 -0
- package/dist/s-two-pane-layout/index.js +1 -2
- package/dist/s-two-pane-layout/s-two-pane-layout.js +48 -48
- package/dist/s-typewriter-text/index.js +0 -1
- package/dist/s-typewriter-text/s-typewriter-text.js +21 -21
- package/dist/s-zoom-image/index.js +0 -1
- package/dist/s-zoom-image/s-zoom-image.js +12 -12
- package/dist/select-D9KH9LAz.js +11 -0
- package/dist/{styled-CjUxhIJh.js → styled-Dz7rwAje.js} +2 -2
- package/dist/{svgIconClasses-DOmb6RsS.js → svgIconClasses-CygVMw0E.js} +1 -1
- package/dist/{tabClasses-DoD3-n6K.js → tabClasses-CIRFQ-PB.js} +1 -1
- package/dist/theme/components/accordion-summary.js +2 -2
- package/dist/theme/components/alert.js +2 -2
- package/dist/theme/components/avatar.js +2 -3
- package/dist/theme/components/button.js +2 -2
- package/dist/theme/components/card.js +2 -2
- package/dist/theme/components/checkbox.js +2 -3
- package/dist/theme/components/chip.js +15 -15
- package/dist/theme/components/components.js +6 -7
- package/dist/theme/components/icon-button.js +2 -2
- package/dist/theme/components/linear-progress.js +2 -2
- package/dist/theme/components/link.js +2 -2
- package/dist/theme/components/list-item-button.js +1 -1
- package/dist/theme/components/list-item.js +3 -3
- package/dist/theme/components/outlined-input.js +3 -3
- package/dist/theme/components/select.js +2 -3
- package/dist/theme/components/step-icon.js +2 -2
- 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 +2 -2
- package/dist/theme/components/toggle-button.js +2 -2
- package/dist/theme/theme-primitives.js +2 -2
- package/dist/{theme-primitives-Csxbv-2Y.js → theme-primitives-BG66N-x4.js} +1 -1
- package/dist/{toggle-button-CAcYep44.js → toggle-button-BI6z89CX.js} +2 -2
- package/dist/{toggle-button-group-BCHnFS_B.js → toggle-button-group-Dzzh9mXv.js} +3 -3
- package/dist/{typographyClasses-YJ-sLvHS.js → typographyClasses-C0nDz5e6.js} +1 -1
- package/dist/{useMobilePicker-CVsWEjX5.js → useMobilePicker-DdH0AzNe.js} +1849 -1849
- package/dist/{useTheme-B8aCSYJ4.js → useTheme-BES_k_99.js} +1 -1
- package/dist/{useThemeProps-CeO0wKq2.js → useThemeProps-CJRFdjVv.js} +2 -2
- package/dist/utils/dayjs.js +1 -1
- package/dist/{warning-Bc_24lbr.js → warning-D7iWhOZI.js} +28 -28
- package/package.json +1 -1
- package/dist/ArrowUpward-KYbUu0UZ.js +0 -5
- package/dist/Box-a5uPlxYL.js +0 -47
- package/dist/ChevronLeft-Djq7TyZX.js +0 -5
- package/dist/ChevronRight-BgWjUtu8.js +0 -5
- package/dist/Close-DD2G0QfM.js +0 -5
- package/dist/ContentCopy-D1OlBB-D.js +0 -6
- package/dist/Download-DDt8mUQX.js +0 -5
- package/dist/ExpandMore-3GurpYw-.js +0 -5
- package/dist/Favorite-gVQqn0Cm.js +0 -5
- package/dist/avatar-boNnyODN.js +0 -9
- package/dist/checkbox-CajxsIFH.js +0 -57
- package/dist/chunk-BQCxAhux.js +0 -23
- package/dist/jsx-runtime-V-UOMaX1.js +0 -180
- package/dist/s-carousel-B3VUHzx3.js +0 -2294
- package/dist/s-chat-message-DQk5XWSJ.js +0 -281
- package/dist/s-comment-message-D3XTOm1L.js +0 -195
- package/dist/s-file-dropzone-DYiYlcY8.js +0 -134
- package/dist/s-label-g_Qac9jO.js +0 -30
- package/dist/s-multi-select-CUsIS9dm.js +0 -64
- package/dist/s-review-C1E6ASin.js +0 -241
- package/dist/s-select-CmsTrYmx.js +0 -110
- package/dist/s-text-editor-toolbar-DC-dnSBG.js +0 -177
- package/dist/s-text-field-C2WdBxNO.js +0 -41
- package/dist/s-theme-switch-uXRVJIf_.js +0 -37
- package/dist/s-tip-oiH-79gR.js +0 -34
- package/dist/s-tool-bar-CM-cxOkI.js +0 -404
- package/dist/select-CjaxyZK_.js +0 -11
- /package/dist/{createSimplePaletteValueFilter-1V26n1YK.js → createSimplePaletteValueFilter-dAWZ3p3z.js} +0 -0
- /package/dist/{generateUtilityClasses-i3-S3IQr.js → generateUtilityClasses-BMwEKe3O.js} +0 -0
- /package/dist/{objectWithoutPropertiesLoose-Dn-p_OIo.js → objectWithoutPropertiesLoose-BdL2_POW.js} +0 -0
- /package/dist/{useControlled-DZKvfhNx.js → useControlled-CvWtMQJF.js} +0 -0
- /package/dist/{useEnhancedEffect-C_B_y6Db.js → useEnhancedEffect-NLLl34XR.js} +0 -0
- /package/dist/{useFormControl-y5Pput5X.js → useFormControl-ngLNi8dL.js} +0 -0
- /package/dist/{utils-Cj6R-BZe.js → utils-Cu16ybRR.js} +0 -0
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./jsx-runtime-V-UOMaX1.js";
|
|
2
|
-
import { t } from "./createSvgIcon-Bs2KOQvq.js";
|
|
3
|
-
import { t as n } from "./Download-DDt8mUQX.js";
|
|
4
|
-
import r from "./s-lazy-image/s-lazy-image.js";
|
|
5
|
-
import { SAvatar as i } from "./s-avatar/s-avatar.js";
|
|
6
|
-
import { n as a, r as o } from "./utils-Cj6R-BZe.js";
|
|
7
|
-
import { SImageModal as s } from "./s-image-modal/s-image-modal.js";
|
|
8
|
-
import { SSkeleton as c } from "./s-skeleton/s-skeleton.js";
|
|
9
|
-
import { useState as l } from "react";
|
|
10
|
-
import { Box as u, IconButton as d, Paper as f, Typography as p } from "@mui/material";
|
|
11
|
-
//#region ../../node_modules/@mui/icons-material/esm/ErrorOutline.js
|
|
12
|
-
var m = e(), h = t(/* @__PURE__ */ (0, m.jsx)("path", { d: "M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8" }), "ErrorOutline"), g = t(/* @__PURE__ */ (0, m.jsx)("path", { d: "M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm7 7V3.5L18.5 9z" }), "InsertDriveFile"), _ = t(/* @__PURE__ */ (0, m.jsx)("path", { d: "M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z" }), "Refresh"), v = ({ isSent: e, showAvatar: t, showTimestamp: n, senderName: r, maxWidth: i, sx: a, ...o }) => /* @__PURE__ */ (0, m.jsxs)(u, {
|
|
13
|
-
display: "flex",
|
|
14
|
-
flexDirection: e ? "row-reverse" : "row",
|
|
15
|
-
alignItems: "flex-start",
|
|
16
|
-
gap: 1,
|
|
17
|
-
mb: 1,
|
|
18
|
-
sx: {
|
|
19
|
-
maxWidth: i,
|
|
20
|
-
alignSelf: e ? "flex-end" : "flex-start",
|
|
21
|
-
...a
|
|
22
|
-
},
|
|
23
|
-
...o,
|
|
24
|
-
children: [
|
|
25
|
-
t && !e && /* @__PURE__ */ (0, m.jsx)(c, {
|
|
26
|
-
component: "rounded-avatar",
|
|
27
|
-
width: 36,
|
|
28
|
-
height: 36
|
|
29
|
-
}),
|
|
30
|
-
/* @__PURE__ */ (0, m.jsxs)(u, {
|
|
31
|
-
display: "flex",
|
|
32
|
-
flexDirection: "column",
|
|
33
|
-
alignItems: e ? "flex-end" : "flex-start",
|
|
34
|
-
gap: .5,
|
|
35
|
-
sx: { minWidth: 0 },
|
|
36
|
-
children: [
|
|
37
|
-
r && !e && /* @__PURE__ */ (0, m.jsx)(c, {
|
|
38
|
-
variant: "text",
|
|
39
|
-
width: 100,
|
|
40
|
-
height: 12,
|
|
41
|
-
sx: { ml: .5 }
|
|
42
|
-
}),
|
|
43
|
-
/* @__PURE__ */ (0, m.jsxs)(u, {
|
|
44
|
-
sx: {
|
|
45
|
-
display: "inline-block",
|
|
46
|
-
width: "20rem",
|
|
47
|
-
maxWidth: "100%",
|
|
48
|
-
overflow: "hidden",
|
|
49
|
-
ml: .5
|
|
50
|
-
},
|
|
51
|
-
children: [
|
|
52
|
-
/* @__PURE__ */ (0, m.jsx)(c, {
|
|
53
|
-
variant: "text",
|
|
54
|
-
width: "100%",
|
|
55
|
-
height: 16,
|
|
56
|
-
sx: { mb: .5 }
|
|
57
|
-
}),
|
|
58
|
-
/* @__PURE__ */ (0, m.jsx)(c, {
|
|
59
|
-
variant: "text",
|
|
60
|
-
width: "85%",
|
|
61
|
-
height: 16,
|
|
62
|
-
sx: { mb: .5 }
|
|
63
|
-
}),
|
|
64
|
-
/* @__PURE__ */ (0, m.jsx)(c, {
|
|
65
|
-
variant: "text",
|
|
66
|
-
width: "70%",
|
|
67
|
-
height: 16
|
|
68
|
-
})
|
|
69
|
-
]
|
|
70
|
-
}),
|
|
71
|
-
n && /* @__PURE__ */ (0, m.jsx)(c, {
|
|
72
|
-
variant: "text",
|
|
73
|
-
width: 60,
|
|
74
|
-
height: 10,
|
|
75
|
-
sx: {
|
|
76
|
-
ml: e ? 0 : .5,
|
|
77
|
-
mr: e ? .5 : 0
|
|
78
|
-
}
|
|
79
|
-
})
|
|
80
|
-
]
|
|
81
|
-
}),
|
|
82
|
-
t && e && /* @__PURE__ */ (0, m.jsx)(c, {
|
|
83
|
-
component: "rounded-avatar",
|
|
84
|
-
width: 36,
|
|
85
|
-
height: 36
|
|
86
|
-
})
|
|
87
|
-
]
|
|
88
|
-
}), y = ({ message: e, variant: t = "received", timestamp: c, avatar: y, senderName: b, showAvatar: x = !0, showTimestamp: S = !1, maxWidth: C = "70%", attachments: w = [], onAttachmentClick: T, onDownload: E, hasError: D = !1, errorMessage: O = "Failed to send message", onRetry: k, loading: A = !1, sx: j, ...M }) => {
|
|
89
|
-
let [N, P] = l(null), [F, I] = l(!1), L = t === "sent", R = (e) => {
|
|
90
|
-
T ? T(e) : (P(e), I(!0));
|
|
91
|
-
}, z = (e) => {
|
|
92
|
-
T ? T(e) : E && E(e);
|
|
93
|
-
}, B = w.filter((e) => e.type === "image"), V = w.filter((e) => e.type === "file");
|
|
94
|
-
return A ? /* @__PURE__ */ (0, m.jsx)(v, {
|
|
95
|
-
isSent: L,
|
|
96
|
-
showAvatar: x,
|
|
97
|
-
showTimestamp: S,
|
|
98
|
-
senderName: b,
|
|
99
|
-
maxWidth: C,
|
|
100
|
-
sx: j,
|
|
101
|
-
...M
|
|
102
|
-
}) : /* @__PURE__ */ (0, m.jsxs)(u, {
|
|
103
|
-
display: "flex",
|
|
104
|
-
flexDirection: L ? "row-reverse" : "row",
|
|
105
|
-
alignItems: "flex-start",
|
|
106
|
-
gap: 1,
|
|
107
|
-
mb: 1,
|
|
108
|
-
sx: {
|
|
109
|
-
maxWidth: C,
|
|
110
|
-
alignSelf: L ? "flex-end" : "flex-start",
|
|
111
|
-
...j
|
|
112
|
-
},
|
|
113
|
-
...M,
|
|
114
|
-
children: [
|
|
115
|
-
x && !L && /* @__PURE__ */ (0, m.jsx)(i, {
|
|
116
|
-
avatar: y,
|
|
117
|
-
name: b,
|
|
118
|
-
size: 36
|
|
119
|
-
}),
|
|
120
|
-
/* @__PURE__ */ (0, m.jsxs)(u, {
|
|
121
|
-
display: "flex",
|
|
122
|
-
flexDirection: "column",
|
|
123
|
-
alignItems: L ? "flex-end" : "flex-start",
|
|
124
|
-
gap: .5,
|
|
125
|
-
sx: { minWidth: 0 },
|
|
126
|
-
children: [
|
|
127
|
-
b && !L && /* @__PURE__ */ (0, m.jsx)(p, { children: b }),
|
|
128
|
-
/* @__PURE__ */ (0, m.jsxs)(u, {
|
|
129
|
-
sx: {
|
|
130
|
-
display: "inline-block",
|
|
131
|
-
borderRadius: 2,
|
|
132
|
-
wordBreak: "break-word",
|
|
133
|
-
maxWidth: "100%",
|
|
134
|
-
border: "1px solid",
|
|
135
|
-
borderColor: D ? "error.main" : "divider",
|
|
136
|
-
...D && { opacity: .7 },
|
|
137
|
-
overflow: "hidden"
|
|
138
|
-
},
|
|
139
|
-
children: [
|
|
140
|
-
B.length > 0 && /* @__PURE__ */ (0, m.jsx)(u, {
|
|
141
|
-
sx: {
|
|
142
|
-
display: "grid",
|
|
143
|
-
gridTemplateColumns: B.length === 1 ? "1fr" : "repeat(2, 1fr)",
|
|
144
|
-
gap: .5,
|
|
145
|
-
p: .5
|
|
146
|
-
},
|
|
147
|
-
minWidth: 200,
|
|
148
|
-
children: B.map((e) => /* @__PURE__ */ (0, m.jsx)(u, {
|
|
149
|
-
sx: {
|
|
150
|
-
position: "relative",
|
|
151
|
-
paddingTop: B.length === 1 ? "66.67%" : "100%",
|
|
152
|
-
cursor: "pointer",
|
|
153
|
-
borderRadius: 1.5,
|
|
154
|
-
overflow: "hidden",
|
|
155
|
-
"&:hover": { opacity: .9 }
|
|
156
|
-
},
|
|
157
|
-
onClick: () => R(e),
|
|
158
|
-
children: /* @__PURE__ */ (0, m.jsx)(r, {
|
|
159
|
-
src: e.thumbnailUrl ?? e.url,
|
|
160
|
-
alt: e.name ?? "Image",
|
|
161
|
-
width: "100%",
|
|
162
|
-
height: "100%",
|
|
163
|
-
style: {
|
|
164
|
-
position: "absolute",
|
|
165
|
-
top: 0,
|
|
166
|
-
left: 0,
|
|
167
|
-
objectFit: "cover"
|
|
168
|
-
}
|
|
169
|
-
})
|
|
170
|
-
}, e.id))
|
|
171
|
-
}),
|
|
172
|
-
V.length > 0 && /* @__PURE__ */ (0, m.jsx)(u, {
|
|
173
|
-
sx: { p: 1.5 },
|
|
174
|
-
children: V.map((e, t) => /* @__PURE__ */ (0, m.jsxs)(f, {
|
|
175
|
-
variant: "outlined",
|
|
176
|
-
sx: {
|
|
177
|
-
display: "flex",
|
|
178
|
-
alignItems: "center",
|
|
179
|
-
gap: 1.5,
|
|
180
|
-
p: 1,
|
|
181
|
-
mt: t > 0 ? 1 : 0,
|
|
182
|
-
cursor: "pointer"
|
|
183
|
-
},
|
|
184
|
-
onClick: () => z(e),
|
|
185
|
-
children: [
|
|
186
|
-
/* @__PURE__ */ (0, m.jsx)(g, { sx: { fontSize: 32 } }),
|
|
187
|
-
/* @__PURE__ */ (0, m.jsxs)(u, {
|
|
188
|
-
sx: {
|
|
189
|
-
flex: 1,
|
|
190
|
-
minWidth: 0
|
|
191
|
-
},
|
|
192
|
-
children: [/* @__PURE__ */ (0, m.jsx)(p, {
|
|
193
|
-
variant: "body2",
|
|
194
|
-
sx: {
|
|
195
|
-
fontSize: "0.875rem",
|
|
196
|
-
fontWeight: 500,
|
|
197
|
-
overflow: "hidden",
|
|
198
|
-
textOverflow: "ellipsis",
|
|
199
|
-
whiteSpace: "nowrap"
|
|
200
|
-
},
|
|
201
|
-
children: e.name ?? "Unnamed File"
|
|
202
|
-
}), e.size && /* @__PURE__ */ (0, m.jsx)(p, {
|
|
203
|
-
variant: "caption",
|
|
204
|
-
children: a(e.size)
|
|
205
|
-
})]
|
|
206
|
-
}),
|
|
207
|
-
E && /* @__PURE__ */ (0, m.jsx)(d, {
|
|
208
|
-
onClick: (t) => {
|
|
209
|
-
t.stopPropagation(), E(e);
|
|
210
|
-
},
|
|
211
|
-
children: /* @__PURE__ */ (0, m.jsx)(n, {})
|
|
212
|
-
})
|
|
213
|
-
]
|
|
214
|
-
}, e.id))
|
|
215
|
-
}),
|
|
216
|
-
e && /* @__PURE__ */ (0, m.jsx)(u, {
|
|
217
|
-
sx: {
|
|
218
|
-
px: 2,
|
|
219
|
-
py: 1.5,
|
|
220
|
-
pt: w.length > 0 ? 0 : 1.5
|
|
221
|
-
},
|
|
222
|
-
children: /* @__PURE__ */ (0, m.jsx)(p, {
|
|
223
|
-
variant: "body2",
|
|
224
|
-
sx: {
|
|
225
|
-
fontSize: "0.875rem",
|
|
226
|
-
whiteSpace: "pre-wrap",
|
|
227
|
-
color: D ? "error.main" : "inherit"
|
|
228
|
-
},
|
|
229
|
-
children: e
|
|
230
|
-
})
|
|
231
|
-
})
|
|
232
|
-
]
|
|
233
|
-
}),
|
|
234
|
-
S && c && /* @__PURE__ */ (0, m.jsx)(p, {
|
|
235
|
-
variant: "caption",
|
|
236
|
-
children: o(c)
|
|
237
|
-
}),
|
|
238
|
-
D && /* @__PURE__ */ (0, m.jsxs)(u, {
|
|
239
|
-
display: "flex",
|
|
240
|
-
alignItems: "center",
|
|
241
|
-
gap: .5,
|
|
242
|
-
color: "error.main",
|
|
243
|
-
children: [
|
|
244
|
-
/* @__PURE__ */ (0, m.jsx)(h, { sx: { fontSize: "1rem" } }),
|
|
245
|
-
/* @__PURE__ */ (0, m.jsx)(p, {
|
|
246
|
-
color: "inherit",
|
|
247
|
-
children: O
|
|
248
|
-
}),
|
|
249
|
-
k && /* @__PURE__ */ (0, m.jsx)(d, {
|
|
250
|
-
onClick: k,
|
|
251
|
-
children: /* @__PURE__ */ (0, m.jsx)(_, {})
|
|
252
|
-
})
|
|
253
|
-
]
|
|
254
|
-
})
|
|
255
|
-
]
|
|
256
|
-
}),
|
|
257
|
-
x && L && /* @__PURE__ */ (0, m.jsx)(i, {
|
|
258
|
-
avatar: y,
|
|
259
|
-
name: b,
|
|
260
|
-
size: 36
|
|
261
|
-
}),
|
|
262
|
-
N && /* @__PURE__ */ (0, m.jsx)(s, {
|
|
263
|
-
isOpen: F,
|
|
264
|
-
onClose: () => {
|
|
265
|
-
I(!1), P(null);
|
|
266
|
-
},
|
|
267
|
-
selectedItem: {
|
|
268
|
-
id: N.id,
|
|
269
|
-
type: "image",
|
|
270
|
-
url: N.url,
|
|
271
|
-
title: N.name
|
|
272
|
-
},
|
|
273
|
-
showNavigation: !1,
|
|
274
|
-
showThumbnailDock: !1
|
|
275
|
-
})
|
|
276
|
-
]
|
|
277
|
-
});
|
|
278
|
-
};
|
|
279
|
-
y.displayName = "SChatMessage";
|
|
280
|
-
//#endregion
|
|
281
|
-
export { y as t };
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./jsx-runtime-V-UOMaX1.js";
|
|
2
|
-
import { t } from "./createSvgIcon-Bs2KOQvq.js";
|
|
3
|
-
import { t as n } from "./ExpandMore-3GurpYw-.js";
|
|
4
|
-
import { t as r } from "./Favorite-gVQqn0Cm.js";
|
|
5
|
-
import { SAvatar as i } from "./s-avatar/s-avatar.js";
|
|
6
|
-
import { i as a } from "./utils-Cj6R-BZe.js";
|
|
7
|
-
import { SSkeleton as o } from "./s-skeleton/s-skeleton.js";
|
|
8
|
-
import { useEffect as s, useId as c, useState as l } from "react";
|
|
9
|
-
import { Box as u, Button as d, Collapse as f, IconButton as p, Stack as m, Typography as h } from "@mui/material";
|
|
10
|
-
//#region ../../node_modules/@mui/icons-material/esm/ExpandLess.js
|
|
11
|
-
var g = e(), _ = t(/* @__PURE__ */ (0, g.jsx)("path", { d: "m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z" }), "ExpandLess"), v = t(/* @__PURE__ */ (0, g.jsx)("path", { d: "M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3m-4.4 15.55-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05" }), "FavoriteBorder"), y = t(/* @__PURE__ */ (0, g.jsx)("path", { d: "M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11" }), "Reply"), b = ({ id: e, userName: t, userAvatar: x, commentContent: S, datetime: C, likes: w = 0, isLiked: T = !1, replies: E = [], totalReplies: D, onLike: O, onReply: k, onToggleReplies: A, showReplies: j = !0, avatarSize: M = 48, level: N = 0, maxLevel: P = 3, loading: F = !1, children: I, sx: L = {} }) => {
|
|
12
|
-
let R = c(), z = e ?? R, [B, V] = l(w), [H, U] = l(T), [W, G] = l(!1), K = () => {
|
|
13
|
-
H ? (V((e) => Math.max(0, e - 1)), U(!1)) : (V((e) => e + 1), U(!0)), O && O(z);
|
|
14
|
-
}, q = () => {
|
|
15
|
-
k && k(z);
|
|
16
|
-
}, J = () => {
|
|
17
|
-
G(!W), A && A(z);
|
|
18
|
-
}, Y = a(C), X = D ?? E.length, Z = X > 0, Q = Math.min(N, P) * 2;
|
|
19
|
-
return s(() => {
|
|
20
|
-
V(w);
|
|
21
|
-
}, [w]), s(() => {
|
|
22
|
-
U(T);
|
|
23
|
-
}, [T]), F ? /* @__PURE__ */ (0, g.jsx)(u, {
|
|
24
|
-
sx: {
|
|
25
|
-
pl: Q,
|
|
26
|
-
py: 1,
|
|
27
|
-
...L
|
|
28
|
-
},
|
|
29
|
-
children: /* @__PURE__ */ (0, g.jsxs)(m, {
|
|
30
|
-
direction: "row",
|
|
31
|
-
spacing: 2,
|
|
32
|
-
alignItems: "flex-start",
|
|
33
|
-
children: [/* @__PURE__ */ (0, g.jsx)(o, {
|
|
34
|
-
component: "rounded-avatar",
|
|
35
|
-
width: M,
|
|
36
|
-
height: M
|
|
37
|
-
}), /* @__PURE__ */ (0, g.jsxs)(u, {
|
|
38
|
-
sx: { flex: 1 },
|
|
39
|
-
children: [
|
|
40
|
-
/* @__PURE__ */ (0, g.jsxs)(m, {
|
|
41
|
-
direction: "row",
|
|
42
|
-
alignItems: "center",
|
|
43
|
-
spacing: 2,
|
|
44
|
-
mb: 1,
|
|
45
|
-
children: [/* @__PURE__ */ (0, g.jsx)(o, {
|
|
46
|
-
variant: "text",
|
|
47
|
-
width: 120,
|
|
48
|
-
height: 20
|
|
49
|
-
}), /* @__PURE__ */ (0, g.jsx)(o, {
|
|
50
|
-
variant: "text",
|
|
51
|
-
width: 80,
|
|
52
|
-
height: 16
|
|
53
|
-
})]
|
|
54
|
-
}),
|
|
55
|
-
/* @__PURE__ */ (0, g.jsx)(o, {
|
|
56
|
-
variant: "text",
|
|
57
|
-
width: "100%",
|
|
58
|
-
height: 16,
|
|
59
|
-
sx: { mb: .5 }
|
|
60
|
-
}),
|
|
61
|
-
/* @__PURE__ */ (0, g.jsx)(o, {
|
|
62
|
-
variant: "text",
|
|
63
|
-
width: "85%",
|
|
64
|
-
height: 16,
|
|
65
|
-
sx: { mb: .5 }
|
|
66
|
-
}),
|
|
67
|
-
/* @__PURE__ */ (0, g.jsx)(o, {
|
|
68
|
-
variant: "text",
|
|
69
|
-
width: "70%",
|
|
70
|
-
height: 16,
|
|
71
|
-
sx: { mb: 2 }
|
|
72
|
-
}),
|
|
73
|
-
/* @__PURE__ */ (0, g.jsxs)(m, {
|
|
74
|
-
direction: "row",
|
|
75
|
-
spacing: 1,
|
|
76
|
-
alignItems: "center",
|
|
77
|
-
children: [
|
|
78
|
-
/* @__PURE__ */ (0, g.jsx)(o, { component: "icon-button" }),
|
|
79
|
-
/* @__PURE__ */ (0, g.jsx)(o, {
|
|
80
|
-
variant: "text",
|
|
81
|
-
width: 20,
|
|
82
|
-
height: 16
|
|
83
|
-
}),
|
|
84
|
-
/* @__PURE__ */ (0, g.jsx)(o, {
|
|
85
|
-
variant: "text",
|
|
86
|
-
width: 60,
|
|
87
|
-
height: 32
|
|
88
|
-
}),
|
|
89
|
-
/* @__PURE__ */ (0, g.jsx)(o, {
|
|
90
|
-
variant: "text",
|
|
91
|
-
width: 80,
|
|
92
|
-
height: 32
|
|
93
|
-
})
|
|
94
|
-
]
|
|
95
|
-
})
|
|
96
|
-
]
|
|
97
|
-
})]
|
|
98
|
-
})
|
|
99
|
-
}) : /* @__PURE__ */ (0, g.jsxs)(u, {
|
|
100
|
-
sx: {
|
|
101
|
-
pl: Q,
|
|
102
|
-
py: 1,
|
|
103
|
-
...L
|
|
104
|
-
},
|
|
105
|
-
children: [/* @__PURE__ */ (0, g.jsxs)(m, {
|
|
106
|
-
direction: "row",
|
|
107
|
-
spacing: 2,
|
|
108
|
-
alignItems: "flex-start",
|
|
109
|
-
children: [/* @__PURE__ */ (0, g.jsx)(i, {
|
|
110
|
-
avatar: x,
|
|
111
|
-
name: t,
|
|
112
|
-
size: M
|
|
113
|
-
}), /* @__PURE__ */ (0, g.jsxs)(u, {
|
|
114
|
-
sx: { flex: 1 },
|
|
115
|
-
children: [
|
|
116
|
-
/* @__PURE__ */ (0, g.jsxs)(m, {
|
|
117
|
-
direction: "row",
|
|
118
|
-
alignItems: "center",
|
|
119
|
-
spacing: 2,
|
|
120
|
-
mb: 1,
|
|
121
|
-
children: [/* @__PURE__ */ (0, g.jsx)(h, {
|
|
122
|
-
variant: "subtitle2",
|
|
123
|
-
fontWeight: "600",
|
|
124
|
-
children: t
|
|
125
|
-
}), /* @__PURE__ */ (0, g.jsx)("div", { children: /* @__PURE__ */ (0, g.jsx)(h, {
|
|
126
|
-
variant: "caption",
|
|
127
|
-
children: Y
|
|
128
|
-
}) })]
|
|
129
|
-
}),
|
|
130
|
-
/* @__PURE__ */ (0, g.jsx)(h, {
|
|
131
|
-
variant: "body2",
|
|
132
|
-
sx: {
|
|
133
|
-
mb: 2,
|
|
134
|
-
lineHeight: 1.6
|
|
135
|
-
},
|
|
136
|
-
children: S
|
|
137
|
-
}),
|
|
138
|
-
/* @__PURE__ */ (0, g.jsxs)(m, {
|
|
139
|
-
direction: "row",
|
|
140
|
-
spacing: 1,
|
|
141
|
-
alignItems: "center",
|
|
142
|
-
children: [
|
|
143
|
-
/* @__PURE__ */ (0, g.jsx)(p, {
|
|
144
|
-
onClick: K,
|
|
145
|
-
sx: { color: H ? "error.main" : "text.secondary" },
|
|
146
|
-
children: H ? /* @__PURE__ */ (0, g.jsx)(r, {}) : /* @__PURE__ */ (0, g.jsx)(v, {})
|
|
147
|
-
}),
|
|
148
|
-
B > 0 && /* @__PURE__ */ (0, g.jsx)(h, {
|
|
149
|
-
variant: "caption",
|
|
150
|
-
children: B
|
|
151
|
-
}),
|
|
152
|
-
/* @__PURE__ */ (0, g.jsx)(d, {
|
|
153
|
-
startIcon: /* @__PURE__ */ (0, g.jsx)(y, {}),
|
|
154
|
-
onClick: q,
|
|
155
|
-
variant: "text",
|
|
156
|
-
children: "Reply"
|
|
157
|
-
}),
|
|
158
|
-
Z && j && /* @__PURE__ */ (0, g.jsxs)(d, {
|
|
159
|
-
startIcon: W ? /* @__PURE__ */ (0, g.jsx)(_, {}) : /* @__PURE__ */ (0, g.jsx)(n, {}),
|
|
160
|
-
onClick: J,
|
|
161
|
-
variant: "text",
|
|
162
|
-
children: [
|
|
163
|
-
X,
|
|
164
|
-
" ",
|
|
165
|
-
X === 1 ? "reply" : "replies"
|
|
166
|
-
]
|
|
167
|
-
})
|
|
168
|
-
]
|
|
169
|
-
}),
|
|
170
|
-
I && /* @__PURE__ */ (0, g.jsx)(u, {
|
|
171
|
-
sx: { mt: 2 },
|
|
172
|
-
children: I
|
|
173
|
-
})
|
|
174
|
-
]
|
|
175
|
-
})]
|
|
176
|
-
}), Z && j && /* @__PURE__ */ (0, g.jsx)(f, {
|
|
177
|
-
in: W,
|
|
178
|
-
children: /* @__PURE__ */ (0, g.jsx)(u, {
|
|
179
|
-
sx: { mt: 2 },
|
|
180
|
-
children: E.map((e, t) => /* @__PURE__ */ (0, g.jsx)(b, {
|
|
181
|
-
...e,
|
|
182
|
-
level: N + 1,
|
|
183
|
-
maxLevel: P,
|
|
184
|
-
onLike: O,
|
|
185
|
-
onReply: k,
|
|
186
|
-
showReplies: j,
|
|
187
|
-
avatarSize: Math.max(32, M - 8)
|
|
188
|
-
}, e.id ?? `reply-${t}`))
|
|
189
|
-
})
|
|
190
|
-
})]
|
|
191
|
-
});
|
|
192
|
-
};
|
|
193
|
-
b.displayName = "SCommentMessage";
|
|
194
|
-
//#endregion
|
|
195
|
-
export { b as t };
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./jsx-runtime-V-UOMaX1.js";
|
|
2
|
-
import { t } from "./Box-a5uPlxYL.js";
|
|
3
|
-
import { t as n } from "./Stack-BJ4hQFAK.js";
|
|
4
|
-
import { t as r } from "./createSvgIcon-Bs2KOQvq.js";
|
|
5
|
-
import { t as i } from "./Typography-B_GHPkH2.js";
|
|
6
|
-
import { SForm as a } from "./s-form/s-form.js";
|
|
7
|
-
import { t as o } from "./utils-Cj6R-BZe.js";
|
|
8
|
-
import { SFileIcon as s } from "./s-file-icon/s-file-icon.js";
|
|
9
|
-
import * as c from "react";
|
|
10
|
-
import { Avatar as l, Button as u, IconButton as d, Tooltip as f } from "@mui/material";
|
|
11
|
-
import { useDropzone as p } from "react-dropzone";
|
|
12
|
-
//#region ../../node_modules/@mui/icons-material/esm/CloseOutlined.js
|
|
13
|
-
var m = e(), h = r(/* @__PURE__ */ (0, m.jsx)("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"), g = r(/* @__PURE__ */ (0, m.jsx)("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"), _ = ({ hint: e, label: r = "", error: _, onRemoveAll: v, onRemove: y, required: b = !1, isShowBtnRemoveAll: x = !1, ...S }) => {
|
|
14
|
-
let { getRootProps: C, getInputProps: w, isDragActive: T } = p(S);
|
|
15
|
-
return /* @__PURE__ */ (0, m.jsxs)(c.Fragment, { children: [/* @__PURE__ */ (0, m.jsx)(a, {
|
|
16
|
-
error: _,
|
|
17
|
-
label: r,
|
|
18
|
-
required: b,
|
|
19
|
-
hint: e,
|
|
20
|
-
children: /* @__PURE__ */ (0, m.jsxs)(t, {
|
|
21
|
-
sx: {
|
|
22
|
-
alignItems: "center",
|
|
23
|
-
border: "1px dashed",
|
|
24
|
-
borderColor: "divider",
|
|
25
|
-
borderRadius: 1,
|
|
26
|
-
cursor: "pointer",
|
|
27
|
-
display: "flex",
|
|
28
|
-
flexWrap: "wrap",
|
|
29
|
-
justifyContent: "center",
|
|
30
|
-
outline: "none",
|
|
31
|
-
p: 4,
|
|
32
|
-
...T && {
|
|
33
|
-
bgcolor: "action.selected",
|
|
34
|
-
opacity: .5
|
|
35
|
-
},
|
|
36
|
-
"&:hover": { ...!T && { bgcolor: "action.hover" } }
|
|
37
|
-
},
|
|
38
|
-
...C(),
|
|
39
|
-
children: [/* @__PURE__ */ (0, m.jsx)("input", { ...w() }), /* @__PURE__ */ (0, m.jsxs)(n, {
|
|
40
|
-
direction: "row",
|
|
41
|
-
spacing: 1,
|
|
42
|
-
sx: { alignItems: "center" },
|
|
43
|
-
children: [/* @__PURE__ */ (0, m.jsx)(l, {
|
|
44
|
-
sx: {
|
|
45
|
-
border: "1px dashed",
|
|
46
|
-
borderColor: "divider",
|
|
47
|
-
color: "text.secondary",
|
|
48
|
-
backgroundColor: "transparent"
|
|
49
|
-
},
|
|
50
|
-
children: /* @__PURE__ */ (0, m.jsx)(g, { fontSize: "small" })
|
|
51
|
-
}), /* @__PURE__ */ (0, m.jsx)(n, {
|
|
52
|
-
spacing: 1,
|
|
53
|
-
children: /* @__PURE__ */ (0, m.jsxs)(i, {
|
|
54
|
-
color: "text.secondary",
|
|
55
|
-
variant: "body2",
|
|
56
|
-
children: [
|
|
57
|
-
/* @__PURE__ */ (0, m.jsx)(i, {
|
|
58
|
-
component: "span",
|
|
59
|
-
sx: { textDecoration: "underline" },
|
|
60
|
-
variant: "inherit",
|
|
61
|
-
children: "Click to upload"
|
|
62
|
-
}),
|
|
63
|
-
" ",
|
|
64
|
-
"or drag and drop your files here"
|
|
65
|
-
]
|
|
66
|
-
})
|
|
67
|
-
})]
|
|
68
|
-
})]
|
|
69
|
-
})
|
|
70
|
-
}), S.files?.length ? /* @__PURE__ */ (0, m.jsxs)(n, {
|
|
71
|
-
mt: 1,
|
|
72
|
-
spacing: 1,
|
|
73
|
-
children: [/* @__PURE__ */ (0, m.jsx)(n, {
|
|
74
|
-
component: "ul",
|
|
75
|
-
spacing: 1,
|
|
76
|
-
sx: {
|
|
77
|
-
listStyle: "none",
|
|
78
|
-
m: 0,
|
|
79
|
-
p: 0
|
|
80
|
-
},
|
|
81
|
-
children: S.files?.map((e) => /* @__PURE__ */ (0, m.jsxs)(n, {
|
|
82
|
-
component: "li",
|
|
83
|
-
direction: "row",
|
|
84
|
-
spacing: 2,
|
|
85
|
-
sx: {
|
|
86
|
-
alignItems: "center",
|
|
87
|
-
border: "1px solid",
|
|
88
|
-
borderColor: "divider",
|
|
89
|
-
borderRadius: 1,
|
|
90
|
-
flex: "1 1 auto",
|
|
91
|
-
p: 1
|
|
92
|
-
},
|
|
93
|
-
children: [
|
|
94
|
-
/* @__PURE__ */ (0, m.jsx)(s, { extension: e.name.split(".").pop() }),
|
|
95
|
-
/* @__PURE__ */ (0, m.jsxs)(t, {
|
|
96
|
-
sx: { flex: "1 1 auto" },
|
|
97
|
-
children: [/* @__PURE__ */ (0, m.jsx)(i, {
|
|
98
|
-
variant: "subtitle2",
|
|
99
|
-
children: e.name
|
|
100
|
-
}), /* @__PURE__ */ (0, m.jsx)(i, {
|
|
101
|
-
color: "text.secondary",
|
|
102
|
-
variant: "body2",
|
|
103
|
-
children: o(e.size)
|
|
104
|
-
})]
|
|
105
|
-
}),
|
|
106
|
-
/* @__PURE__ */ (0, m.jsx)(f, {
|
|
107
|
-
title: "Remove",
|
|
108
|
-
children: /* @__PURE__ */ (0, m.jsx)(d, {
|
|
109
|
-
onClick: () => {
|
|
110
|
-
y?.(e);
|
|
111
|
-
},
|
|
112
|
-
children: /* @__PURE__ */ (0, m.jsx)(h, {})
|
|
113
|
-
})
|
|
114
|
-
})
|
|
115
|
-
]
|
|
116
|
-
}, e.size))
|
|
117
|
-
}), /* @__PURE__ */ (0, m.jsx)(n, {
|
|
118
|
-
direction: "row",
|
|
119
|
-
sx: {
|
|
120
|
-
alignItems: "center",
|
|
121
|
-
justifyContent: "flex-end"
|
|
122
|
-
},
|
|
123
|
-
children: x && /* @__PURE__ */ (0, m.jsx)(u, {
|
|
124
|
-
onClick: v,
|
|
125
|
-
type: "button",
|
|
126
|
-
variant: "text",
|
|
127
|
-
children: "Remove all"
|
|
128
|
-
})
|
|
129
|
-
})]
|
|
130
|
-
}) : null] });
|
|
131
|
-
};
|
|
132
|
-
_.displayName = "SFileDropzone";
|
|
133
|
-
//#endregion
|
|
134
|
-
export { _ as t };
|
package/dist/s-label-g_Qac9jO.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./jsx-runtime-V-UOMaX1.js";
|
|
2
|
-
import { t } from "./createSvgIcon-Bs2KOQvq.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import { Stack as n, Tooltip as r, Typography as i } from "@mui/material";
|
|
5
|
-
//#region ../../node_modules/@mui/icons-material/esm/HelpOutlineOutlined.js
|
|
6
|
-
var a = e(), o = t(/* @__PURE__ */ (0, a.jsx)("path", { d: "M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4" }), "HelpOutlineOutlined"), s = ({ label: e, children: t, hint: s, sx: c }) => /* @__PURE__ */ (0, a.jsxs)(n, {
|
|
7
|
-
width: "100%",
|
|
8
|
-
sx: c,
|
|
9
|
-
children: [/* @__PURE__ */ (0, a.jsxs)(n, {
|
|
10
|
-
direction: "row",
|
|
11
|
-
alignItems: "center",
|
|
12
|
-
mb: 1,
|
|
13
|
-
children: [/* @__PURE__ */ (0, a.jsx)(i, {
|
|
14
|
-
variant: "subtitle2",
|
|
15
|
-
color: "text.secondary",
|
|
16
|
-
children: e
|
|
17
|
-
}), s ? /* @__PURE__ */ (0, a.jsx)(r, {
|
|
18
|
-
title: s,
|
|
19
|
-
placement: "top",
|
|
20
|
-
children: /* @__PURE__ */ (0, a.jsx)(o, { sx: {
|
|
21
|
-
marginLeft: "4px",
|
|
22
|
-
fontSize: 16,
|
|
23
|
-
color: "text.secondary"
|
|
24
|
-
} })
|
|
25
|
-
}) : null]
|
|
26
|
-
}), t]
|
|
27
|
-
});
|
|
28
|
-
s.displayName = "SLabel";
|
|
29
|
-
//#endregion
|
|
30
|
-
export { s as t };
|