@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,64 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./Menu-BB3Khkc0.js";
|
|
2
|
-
import { t } from "./jsx-runtime-V-UOMaX1.js";
|
|
3
|
-
import { t as n } from "./createSvgIcon-Bs2KOQvq.js";
|
|
4
|
-
import { SChips as r } from "./s-chips/s-chips.js";
|
|
5
|
-
import { t as i } from "./MenuItem-CjPW2J-w.js";
|
|
6
|
-
import { usePopover as a } from "./hooks/use-popover.js";
|
|
7
|
-
import * as o from "react";
|
|
8
|
-
import { OutlinedInput as s, Stack as c } from "@mui/material";
|
|
9
|
-
//#region ../../node_modules/@mui/icons-material/esm/UnfoldMore.js
|
|
10
|
-
var l = t(), u = n(/* @__PURE__ */ (0, l.jsx)("path", { d: "M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z" }), "UnfoldMore"), d = ({ label: t, onChange: n, options: d, value: f = [], chipProps: p }) => {
|
|
11
|
-
let m = a(), h = o.useRef(null), [g, _] = o.useState(), [v, y] = o.useState(null);
|
|
12
|
-
o.useEffect(() => {
|
|
13
|
-
h.current && _(h.current.offsetWidth);
|
|
14
|
-
}, [m.open]);
|
|
15
|
-
let b = o.useCallback((e, t) => {
|
|
16
|
-
let r = [...f];
|
|
17
|
-
t ? r.push(e) : r = r.filter((t) => t !== e), n?.(r);
|
|
18
|
-
}, [n, f]);
|
|
19
|
-
return /* @__PURE__ */ (0, l.jsxs)(c, {
|
|
20
|
-
direction: "column",
|
|
21
|
-
gap: 1,
|
|
22
|
-
children: [
|
|
23
|
-
/* @__PURE__ */ (0, l.jsx)(s, {
|
|
24
|
-
endAdornment: /* @__PURE__ */ (0, l.jsx)(u, {
|
|
25
|
-
fontSize: "small",
|
|
26
|
-
sx: {
|
|
27
|
-
color: "action.active",
|
|
28
|
-
position: "absolute",
|
|
29
|
-
right: "7px"
|
|
30
|
-
}
|
|
31
|
-
}),
|
|
32
|
-
onClick: m.handleOpen,
|
|
33
|
-
ref: (e) => {
|
|
34
|
-
y(e), h.current = e;
|
|
35
|
-
},
|
|
36
|
-
value: t,
|
|
37
|
-
sx: { input: { color: "text.secondary" } }
|
|
38
|
-
}),
|
|
39
|
-
/* @__PURE__ */ (0, l.jsx)(e, {
|
|
40
|
-
anchorEl: v,
|
|
41
|
-
onClose: m.handleClose,
|
|
42
|
-
open: m.open,
|
|
43
|
-
slotProps: { paper: { sx: { width: g ? `${g}px` : void 0 } } },
|
|
44
|
-
children: d.map((e) => {
|
|
45
|
-
let t = f.includes(e.value);
|
|
46
|
-
return /* @__PURE__ */ (0, l.jsx)(i, {
|
|
47
|
-
onClick: () => {
|
|
48
|
-
b(e.value, !t);
|
|
49
|
-
},
|
|
50
|
-
selected: t,
|
|
51
|
-
children: e.label
|
|
52
|
-
}, e.label);
|
|
53
|
-
})
|
|
54
|
-
}),
|
|
55
|
-
/* @__PURE__ */ (0, l.jsx)(r, {
|
|
56
|
-
chips: d.filter((e) => f.includes(e.value)).map((e) => e.label),
|
|
57
|
-
...p
|
|
58
|
-
})
|
|
59
|
-
]
|
|
60
|
-
});
|
|
61
|
-
};
|
|
62
|
-
d.displayName = "SMultiSelect";
|
|
63
|
-
//#endregion
|
|
64
|
-
export { d as t };
|
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./jsx-runtime-V-UOMaX1.js";
|
|
2
|
-
import { t } from "./createSvgIcon-Bs2KOQvq.js";
|
|
3
|
-
import n from "./s-lazy-image/s-lazy-image.js";
|
|
4
|
-
import { SAvatar as r } from "./s-avatar/s-avatar.js";
|
|
5
|
-
import { i } from "./utils-Cj6R-BZe.js";
|
|
6
|
-
import { SImageModal as a } from "./s-image-modal/s-image-modal.js";
|
|
7
|
-
import { SSkeleton as o } from "./s-skeleton/s-skeleton.js";
|
|
8
|
-
import { SRating as s } from "./s-rating/s-rating.js";
|
|
9
|
-
import { useEffect as c, useId as l, useState as u } from "react";
|
|
10
|
-
import { Box as d, Divider as f, IconButton as p, Stack as m, Typography as h } from "@mui/material";
|
|
11
|
-
//#region ../../node_modules/@mui/icons-material/esm/ThumbDown.js
|
|
12
|
-
var g = e(), _ = t(/* @__PURE__ */ (0, g.jsx)("path", { d: "M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2m4 0v12h4V3z" }), "ThumbDown"), v = t(/* @__PURE__ */ (0, g.jsx)("path", { d: "M1 21h4V9H1zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73z" }), "ThumbUp"), y = ({ id: e, userName: t, userAvatar: y, rating: b, reviewContent: x, datetime: S, images: C, userHelpfulVote: w = null, helpfulYes: T = 0, helpfulNo: E = 0, onHelpfulVote: D, showHelpfulSection: O = !0, avatarSize: k = 48, maxRating: A = 5, readOnly: j = !0, showDivider: M = !0, loading: N = !1, sx: P = {} }) => {
|
|
13
|
-
let F = l(), I = e ?? F, [L, R] = u(T), [z, B] = u(E), [V, H] = u(w), [U, W] = u(!1), [G, K] = u(null), q = (e) => {
|
|
14
|
-
let t = null;
|
|
15
|
-
V === e ? (e === "yes" ? R((e) => Math.max(0, e - 1)) : B((e) => Math.max(0, e - 1)), H(null)) : (V === "yes" ? R((e) => Math.max(0, e - 1)) : V === "no" && B((e) => Math.max(0, e - 1)), e === "yes" ? R((e) => e + 1) : B((e) => e + 1), H(e), t = e), D && D(I, t);
|
|
16
|
-
}, J = C?.map((e, n) => ({
|
|
17
|
-
id: `review-${I}-image-${n}`,
|
|
18
|
-
type: "image",
|
|
19
|
-
url: e,
|
|
20
|
-
title: `Review image ${n + 1}`,
|
|
21
|
-
desc: `Image ${n + 1} from ${t}'s review`
|
|
22
|
-
})) ?? [], Y = (e) => {
|
|
23
|
-
let t = J[e];
|
|
24
|
-
t && (K(t), W(!0));
|
|
25
|
-
}, X = () => {
|
|
26
|
-
W(!1), K(null);
|
|
27
|
-
}, Z = (e) => {
|
|
28
|
-
K(e);
|
|
29
|
-
}, Q = i(S);
|
|
30
|
-
return c(() => {
|
|
31
|
-
H(w);
|
|
32
|
-
}, [w]), N ? /* @__PURE__ */ (0, g.jsxs)(d, {
|
|
33
|
-
sx: {
|
|
34
|
-
py: 2,
|
|
35
|
-
...P
|
|
36
|
-
},
|
|
37
|
-
children: [/* @__PURE__ */ (0, g.jsxs)(m, {
|
|
38
|
-
direction: "row",
|
|
39
|
-
spacing: 2,
|
|
40
|
-
alignItems: "flex-start",
|
|
41
|
-
children: [/* @__PURE__ */ (0, g.jsx)(o, {
|
|
42
|
-
component: "rounded-avatar",
|
|
43
|
-
width: k,
|
|
44
|
-
height: k
|
|
45
|
-
}), /* @__PURE__ */ (0, g.jsxs)(d, {
|
|
46
|
-
sx: { flex: 1 },
|
|
47
|
-
children: [
|
|
48
|
-
/* @__PURE__ */ (0, g.jsxs)(m, {
|
|
49
|
-
direction: "row",
|
|
50
|
-
alignItems: "center",
|
|
51
|
-
spacing: 2,
|
|
52
|
-
mb: 1,
|
|
53
|
-
children: [/* @__PURE__ */ (0, g.jsx)(o, {
|
|
54
|
-
variant: "text",
|
|
55
|
-
width: 120,
|
|
56
|
-
height: 20
|
|
57
|
-
}), /* @__PURE__ */ (0, g.jsx)(o, {
|
|
58
|
-
variant: "text",
|
|
59
|
-
width: 80,
|
|
60
|
-
height: 16
|
|
61
|
-
})]
|
|
62
|
-
}),
|
|
63
|
-
/* @__PURE__ */ (0, g.jsx)(d, {
|
|
64
|
-
sx: { mb: 1 },
|
|
65
|
-
children: /* @__PURE__ */ (0, g.jsx)(o, {
|
|
66
|
-
variant: "text",
|
|
67
|
-
width: 100,
|
|
68
|
-
height: 20
|
|
69
|
-
})
|
|
70
|
-
}),
|
|
71
|
-
/* @__PURE__ */ (0, g.jsx)(o, {
|
|
72
|
-
variant: "text",
|
|
73
|
-
width: "100%",
|
|
74
|
-
height: 16,
|
|
75
|
-
sx: { mb: .5 }
|
|
76
|
-
}),
|
|
77
|
-
/* @__PURE__ */ (0, g.jsxs)(m, {
|
|
78
|
-
direction: "row",
|
|
79
|
-
spacing: 1,
|
|
80
|
-
sx: {
|
|
81
|
-
display: "inline-flex",
|
|
82
|
-
alignItems: "center"
|
|
83
|
-
},
|
|
84
|
-
children: [
|
|
85
|
-
/* @__PURE__ */ (0, g.jsx)(o, {
|
|
86
|
-
variant: "text",
|
|
87
|
-
width: 140,
|
|
88
|
-
height: 16,
|
|
89
|
-
sx: { mr: 2 }
|
|
90
|
-
}),
|
|
91
|
-
/* @__PURE__ */ (0, g.jsx)(o, { component: "icon-button" }),
|
|
92
|
-
/* @__PURE__ */ (0, g.jsx)(o, {
|
|
93
|
-
variant: "text",
|
|
94
|
-
width: 20,
|
|
95
|
-
height: 16
|
|
96
|
-
}),
|
|
97
|
-
/* @__PURE__ */ (0, g.jsx)(o, { component: "icon-button" }),
|
|
98
|
-
/* @__PURE__ */ (0, g.jsx)(o, {
|
|
99
|
-
variant: "text",
|
|
100
|
-
width: 20,
|
|
101
|
-
height: 16
|
|
102
|
-
})
|
|
103
|
-
]
|
|
104
|
-
})
|
|
105
|
-
]
|
|
106
|
-
})]
|
|
107
|
-
}), M && /* @__PURE__ */ (0, g.jsx)(f, { sx: { mt: 2 } })]
|
|
108
|
-
}) : /* @__PURE__ */ (0, g.jsxs)(d, {
|
|
109
|
-
sx: {
|
|
110
|
-
py: 2,
|
|
111
|
-
...P
|
|
112
|
-
},
|
|
113
|
-
children: [
|
|
114
|
-
/* @__PURE__ */ (0, g.jsxs)(m, {
|
|
115
|
-
direction: "row",
|
|
116
|
-
spacing: 2,
|
|
117
|
-
alignItems: "flex-start",
|
|
118
|
-
children: [/* @__PURE__ */ (0, g.jsx)(r, {
|
|
119
|
-
avatar: y,
|
|
120
|
-
name: t,
|
|
121
|
-
size: k
|
|
122
|
-
}), /* @__PURE__ */ (0, g.jsxs)(d, {
|
|
123
|
-
sx: { flex: 1 },
|
|
124
|
-
children: [
|
|
125
|
-
/* @__PURE__ */ (0, g.jsxs)(m, {
|
|
126
|
-
direction: "row",
|
|
127
|
-
alignItems: "center",
|
|
128
|
-
spacing: 2,
|
|
129
|
-
mb: 1,
|
|
130
|
-
children: [/* @__PURE__ */ (0, g.jsx)(h, {
|
|
131
|
-
variant: "subtitle2",
|
|
132
|
-
fontWeight: "600",
|
|
133
|
-
children: t
|
|
134
|
-
}), /* @__PURE__ */ (0, g.jsx)("div", { children: /* @__PURE__ */ (0, g.jsx)(h, {
|
|
135
|
-
variant: "caption",
|
|
136
|
-
children: Q
|
|
137
|
-
}) })]
|
|
138
|
-
}),
|
|
139
|
-
/* @__PURE__ */ (0, g.jsx)(d, {
|
|
140
|
-
sx: { mb: 1 },
|
|
141
|
-
children: /* @__PURE__ */ (0, g.jsx)(s, {
|
|
142
|
-
value: b,
|
|
143
|
-
max: A,
|
|
144
|
-
readOnly: j
|
|
145
|
-
})
|
|
146
|
-
}),
|
|
147
|
-
/* @__PURE__ */ (0, g.jsx)(h, {
|
|
148
|
-
variant: "body2",
|
|
149
|
-
sx: {
|
|
150
|
-
mb: 2,
|
|
151
|
-
lineHeight: 1.6
|
|
152
|
-
},
|
|
153
|
-
children: x
|
|
154
|
-
}),
|
|
155
|
-
C && C.length > 0 && /* @__PURE__ */ (0, g.jsx)(m, {
|
|
156
|
-
direction: "row",
|
|
157
|
-
spacing: 1,
|
|
158
|
-
sx: {
|
|
159
|
-
mb: 2,
|
|
160
|
-
flexWrap: "wrap",
|
|
161
|
-
gap: 1
|
|
162
|
-
},
|
|
163
|
-
children: C.map((e, t) => /* @__PURE__ */ (0, g.jsx)(n, {
|
|
164
|
-
src: e,
|
|
165
|
-
alt: `Review image ${t + 1}`,
|
|
166
|
-
width: 80,
|
|
167
|
-
height: 80,
|
|
168
|
-
variant: "rounded",
|
|
169
|
-
style: {
|
|
170
|
-
objectFit: "cover",
|
|
171
|
-
cursor: "pointer"
|
|
172
|
-
},
|
|
173
|
-
onClick: () => Y(t),
|
|
174
|
-
onMouseEnter: (e) => {
|
|
175
|
-
e.currentTarget.style.opacity = "0.8";
|
|
176
|
-
},
|
|
177
|
-
onMouseLeave: (e) => {
|
|
178
|
-
e.currentTarget.style.opacity = "1";
|
|
179
|
-
}
|
|
180
|
-
}, t))
|
|
181
|
-
}),
|
|
182
|
-
O && /* @__PURE__ */ (0, g.jsxs)(m, {
|
|
183
|
-
direction: "row",
|
|
184
|
-
spacing: 1,
|
|
185
|
-
sx: {
|
|
186
|
-
display: "inline-flex",
|
|
187
|
-
alignItems: "center"
|
|
188
|
-
},
|
|
189
|
-
children: [
|
|
190
|
-
/* @__PURE__ */ (0, g.jsx)(h, {
|
|
191
|
-
variant: "caption",
|
|
192
|
-
sx: { mr: 2 },
|
|
193
|
-
children: "Was this review helpful?"
|
|
194
|
-
}),
|
|
195
|
-
/* @__PURE__ */ (0, g.jsx)(p, {
|
|
196
|
-
onClick: () => q("yes"),
|
|
197
|
-
sx: {
|
|
198
|
-
color: V === "yes" ? "primary.main" : "text.secondary",
|
|
199
|
-
"&:hover": { backgroundColor: "action.hover" }
|
|
200
|
-
},
|
|
201
|
-
children: /* @__PURE__ */ (0, g.jsx)(v, { fontSize: "small" })
|
|
202
|
-
}),
|
|
203
|
-
/* @__PURE__ */ (0, g.jsx)(h, {
|
|
204
|
-
variant: "caption",
|
|
205
|
-
children: L
|
|
206
|
-
}),
|
|
207
|
-
/* @__PURE__ */ (0, g.jsx)(p, {
|
|
208
|
-
onClick: () => q("no"),
|
|
209
|
-
sx: {
|
|
210
|
-
color: V === "no" ? "error.main" : "text.secondary",
|
|
211
|
-
ml: 1,
|
|
212
|
-
"&:hover": { backgroundColor: "action.hover" }
|
|
213
|
-
},
|
|
214
|
-
children: /* @__PURE__ */ (0, g.jsx)(_, { fontSize: "small" })
|
|
215
|
-
}),
|
|
216
|
-
/* @__PURE__ */ (0, g.jsx)(h, {
|
|
217
|
-
variant: "caption",
|
|
218
|
-
children: z
|
|
219
|
-
})
|
|
220
|
-
]
|
|
221
|
-
})
|
|
222
|
-
]
|
|
223
|
-
})]
|
|
224
|
-
}),
|
|
225
|
-
M && /* @__PURE__ */ (0, g.jsx)(f, { sx: { mt: 2 } }),
|
|
226
|
-
/* @__PURE__ */ (0, g.jsx)(a, {
|
|
227
|
-
isOpen: U,
|
|
228
|
-
onClose: X,
|
|
229
|
-
selectedItem: G,
|
|
230
|
-
onItemChange: Z,
|
|
231
|
-
mediaItems: J,
|
|
232
|
-
showNavigation: J.length > 1,
|
|
233
|
-
showThumbnailDock: J.length > 1,
|
|
234
|
-
showCounter: J.length > 1
|
|
235
|
-
})
|
|
236
|
-
]
|
|
237
|
-
});
|
|
238
|
-
};
|
|
239
|
-
y.displayName = "SReview";
|
|
240
|
-
//#endregion
|
|
241
|
-
export { y as t };
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./jsx-runtime-V-UOMaX1.js";
|
|
2
|
-
import { t } from "./createSvgIcon-Bs2KOQvq.js";
|
|
3
|
-
import { SForm as n } from "./s-form/s-form.js";
|
|
4
|
-
import { forwardRef as r, useState as i } from "react";
|
|
5
|
-
import { Box as a, InputAdornment as o, ListSubheader as s, MenuItem as c, Select as l, TextField as u } from "@mui/material";
|
|
6
|
-
//#region ../../node_modules/@mui/icons-material/esm/Search.js
|
|
7
|
-
var d = e(), f = t(/* @__PURE__ */ (0, d.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"), p = r(({ options: e = [], optionLabel: t = "name", optionValue: r = "id", placeholder: p, label: m = "", error: h, required: g = !1, simple: _ = !1, htmlFor: v, searchable: y = !1, searchPlaceholder: b = "", renderOption: x, ...S }, C) => {
|
|
8
|
-
let w = S.value !== void 0, [T, E] = i(S.multiple ? [] : null), D = w ? S.value : T, [O, k] = i(""), [A, j] = i(!1), M = (e) => typeof e == "string" || typeof e == "number" ? String(e) : String(e[t]), N = (e) => typeof e == "string" || typeof e == "number" ? e : e[r], P = y && O ? e.filter((e) => M(e).toLowerCase().includes(O.toLowerCase())) : e;
|
|
9
|
-
return /* @__PURE__ */ (0, d.jsx)(n, {
|
|
10
|
-
error: h,
|
|
11
|
-
label: m,
|
|
12
|
-
required: g,
|
|
13
|
-
htmlFor: v,
|
|
14
|
-
children: /* @__PURE__ */ (0, d.jsxs)(l, {
|
|
15
|
-
id: v,
|
|
16
|
-
displayEmpty: !0,
|
|
17
|
-
fullWidth: !0,
|
|
18
|
-
defaultValue: "",
|
|
19
|
-
ref: C,
|
|
20
|
-
open: y ? A : void 0,
|
|
21
|
-
onOpen: y ? () => j(!0) : void 0,
|
|
22
|
-
onClose: y ? () => {
|
|
23
|
-
j(!1), k("");
|
|
24
|
-
} : void 0,
|
|
25
|
-
MenuProps: y ? {
|
|
26
|
-
autoFocus: !1,
|
|
27
|
-
PaperProps: { onKeyDown: (e) => {
|
|
28
|
-
e.stopPropagation();
|
|
29
|
-
} }
|
|
30
|
-
} : void 0,
|
|
31
|
-
renderValue: S.multiple ? (t) => {
|
|
32
|
-
let n = t;
|
|
33
|
-
return n.length === 0 ? /* @__PURE__ */ (0, d.jsx)(a, {
|
|
34
|
-
component: "span",
|
|
35
|
-
sx: { color: "divider" },
|
|
36
|
-
children: p
|
|
37
|
-
}) : n?.map((t) => {
|
|
38
|
-
let n = e.find((e) => N(e) === N(t));
|
|
39
|
-
return n ? M(n) : "";
|
|
40
|
-
}).filter(Boolean).join(", ");
|
|
41
|
-
} : (t) => {
|
|
42
|
-
let n = t;
|
|
43
|
-
if (n == null || n === "") return /* @__PURE__ */ (0, d.jsx)(a, {
|
|
44
|
-
component: "span",
|
|
45
|
-
sx: { color: "divider" },
|
|
46
|
-
children: p
|
|
47
|
-
});
|
|
48
|
-
if (_) return M(n);
|
|
49
|
-
let r = e.find((e) => N(e) === N(n));
|
|
50
|
-
return r ? M(r) : "";
|
|
51
|
-
},
|
|
52
|
-
...S,
|
|
53
|
-
value: e.length ? D ?? "" : "",
|
|
54
|
-
onChange: (e, t) => {
|
|
55
|
-
if (S.onChange) S.onChange(e, t);
|
|
56
|
-
else if (!w) {
|
|
57
|
-
let t = e.target.value;
|
|
58
|
-
E(t);
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
children: [y && /* @__PURE__ */ (0, d.jsx)(s, {
|
|
62
|
-
sx: {
|
|
63
|
-
px: 2,
|
|
64
|
-
py: 1,
|
|
65
|
-
position: "sticky",
|
|
66
|
-
top: 0,
|
|
67
|
-
bgcolor: "background.paper",
|
|
68
|
-
zIndex: 1
|
|
69
|
-
},
|
|
70
|
-
children: /* @__PURE__ */ (0, d.jsx)(u, {
|
|
71
|
-
fullWidth: !0,
|
|
72
|
-
autoFocus: !0,
|
|
73
|
-
placeholder: b,
|
|
74
|
-
value: O,
|
|
75
|
-
onChange: (e) => k(e.target.value),
|
|
76
|
-
onKeyDown: (e) => {
|
|
77
|
-
e.key !== "Escape" && e.stopPropagation();
|
|
78
|
-
},
|
|
79
|
-
onClick: (e) => {
|
|
80
|
-
e.stopPropagation();
|
|
81
|
-
},
|
|
82
|
-
InputProps: { startAdornment: /* @__PURE__ */ (0, d.jsx)(o, {
|
|
83
|
-
position: "start",
|
|
84
|
-
children: /* @__PURE__ */ (0, d.jsx)(f, { fontSize: "small" })
|
|
85
|
-
}) }
|
|
86
|
-
})
|
|
87
|
-
}), (() => {
|
|
88
|
-
let t = (e) => e.map((e, t) => /* @__PURE__ */ (0, d.jsx)(c, {
|
|
89
|
-
disabled: e?.disabled ?? !1,
|
|
90
|
-
value: N(e),
|
|
91
|
-
children: x ? x(e) : M(e)
|
|
92
|
-
}, `${N(e)}-${t}`));
|
|
93
|
-
return y ? P.length > 0 ? t(P) : O ? /* @__PURE__ */ (0, d.jsx)(c, {
|
|
94
|
-
disabled: !0,
|
|
95
|
-
children: /* @__PURE__ */ (0, d.jsx)(a, {
|
|
96
|
-
sx: {
|
|
97
|
-
color: "text.secondary",
|
|
98
|
-
textAlign: "center",
|
|
99
|
-
width: "100%"
|
|
100
|
-
},
|
|
101
|
-
children: "No results found"
|
|
102
|
-
})
|
|
103
|
-
}) : t(e) : t(e);
|
|
104
|
-
})()]
|
|
105
|
-
})
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
p.displayName = "SSelect";
|
|
109
|
-
//#endregion
|
|
110
|
-
export { p as t };
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./Menu-BB3Khkc0.js";
|
|
2
|
-
import { t } from "./jsx-runtime-V-UOMaX1.js";
|
|
3
|
-
import { t as n } from "./Stack-BJ4hQFAK.js";
|
|
4
|
-
import { a as r, n as i, t as a } from "./Select-B9880Uge.js";
|
|
5
|
-
import { t as o } from "./createSvgIcon-Bs2KOQvq.js";
|
|
6
|
-
import { t as s } from "./s-text-field-C2WdBxNO.js";
|
|
7
|
-
import * as c from "react";
|
|
8
|
-
import { MenuItem as l } from "@mui/material";
|
|
9
|
-
//#region ../../node_modules/@mui/icons-material/esm/Code.js
|
|
10
|
-
var u = t(), d = o(/* @__PURE__ */ (0, u.jsx)("path", { d: "M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z" }), "Code"), f = o(/* @__PURE__ */ (0, u.jsx)("path", { d: "M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42M10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5" }), "FormatBold"), p = o(/* @__PURE__ */ (0, u.jsx)("path", { d: "M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z" }), "FormatItalic"), m = o(/* @__PURE__ */ (0, u.jsx)("path", { d: "M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5m0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5M7 19h14v-2H7zm0-6h14v-2H7zm0-8v2h14V5z" }), "FormatListBulleted"), h = o(/* @__PURE__ */ (0, u.jsx)("path", { d: "M2 17h2v.5H3v1h1v.5H2v1h3v-4H2zm1-9h1V4H2v1h1zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2zm5-6v2h14V5zm0 14h14v-2H7zm0-6h14v-2H7z" }), "FormatListNumbered"), g = o(/* @__PURE__ */ (0, u.jsx)("path", { d: "M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5" }), "Link"), _ = o(/* @__PURE__ */ (0, u.jsx)("path", { d: "M6.85 7.08C6.85 4.37 9.45 3 12.24 3c1.64 0 3 .49 3.9 1.28.77.65 1.46 1.73 1.46 3.24h-3.01c0-.31-.05-.59-.15-.85-.29-.86-1.2-1.28-2.25-1.28-1.86 0-2.34 1.02-2.34 1.7 0 .48.25.88.74 1.21.38.25.77.48 1.41.7H7.39c-.21-.34-.54-.89-.54-1.92M21 12v-2H3v2h9.62c1.15.45 1.96.75 1.96 1.97 0 1-.81 1.67-2.28 1.67-1.54 0-2.93-.54-2.93-2.51H6.4c0 .55.08 1.13.24 1.58.81 2.29 3.29 3.3 5.67 3.3 2.27 0 5.3-.89 5.3-4.05 0-.3-.01-1.16-.48-1.94H21z" }), "StrikethroughS"), v = ({ editor: t }) => {
|
|
11
|
-
let [r, o] = c.useState(!1), [v, x] = c.useState(null), [S, C] = c.useState("");
|
|
12
|
-
return /* @__PURE__ */ (0, u.jsxs)(c.Fragment, { children: [/* @__PURE__ */ (0, u.jsx)(n, {
|
|
13
|
-
className: "tiptap-toolbar",
|
|
14
|
-
spacing: 1,
|
|
15
|
-
sx: {
|
|
16
|
-
borderBottom: "1px solid",
|
|
17
|
-
borderColor: "divider",
|
|
18
|
-
p: "8px",
|
|
19
|
-
minHeight: "57px"
|
|
20
|
-
},
|
|
21
|
-
children: t ? /* @__PURE__ */ (0, u.jsxs)(n, {
|
|
22
|
-
direction: "row",
|
|
23
|
-
spacing: .5,
|
|
24
|
-
sx: {
|
|
25
|
-
alignItems: "center",
|
|
26
|
-
flexWrap: "wrap"
|
|
27
|
-
},
|
|
28
|
-
children: [
|
|
29
|
-
/* @__PURE__ */ (0, u.jsxs)(a, {
|
|
30
|
-
onChange: (e) => {
|
|
31
|
-
let n = e.target.value;
|
|
32
|
-
if (n) {
|
|
33
|
-
if (n === "p") {
|
|
34
|
-
t.chain().focus().setParagraph().run();
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
if (n.startsWith("h")) {
|
|
38
|
-
let e = parseInt(n.replace("h", ""));
|
|
39
|
-
!isNaN(e) && e >= 1 && e <= 6 && t.chain().focus().setHeading({ level: e }).run();
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
value: y(t),
|
|
44
|
-
children: [/* @__PURE__ */ (0, u.jsx)(l, {
|
|
45
|
-
disabled: !t.can().chain().focus().setParagraph().run(),
|
|
46
|
-
value: "p",
|
|
47
|
-
children: "Paragraph"
|
|
48
|
-
}), [
|
|
49
|
-
1,
|
|
50
|
-
2,
|
|
51
|
-
3,
|
|
52
|
-
4,
|
|
53
|
-
5,
|
|
54
|
-
6
|
|
55
|
-
].map((e) => /* @__PURE__ */ (0, u.jsxs)(l, {
|
|
56
|
-
disabled: !t.can().chain().focus().setHeading({ level: e }).run(),
|
|
57
|
-
value: `h${e}`,
|
|
58
|
-
children: ["Heading ", e]
|
|
59
|
-
}, e))]
|
|
60
|
-
}),
|
|
61
|
-
/* @__PURE__ */ (0, u.jsx)(b, {
|
|
62
|
-
active: t.isActive("bold"),
|
|
63
|
-
disabled: !t.can().chain().focus().toggleBold().run(),
|
|
64
|
-
onClick: () => {
|
|
65
|
-
t.chain().focus().toggleBold().run();
|
|
66
|
-
},
|
|
67
|
-
children: /* @__PURE__ */ (0, u.jsx)(f, {})
|
|
68
|
-
}),
|
|
69
|
-
/* @__PURE__ */ (0, u.jsx)(b, {
|
|
70
|
-
active: t.isActive("italic"),
|
|
71
|
-
disabled: !t.can().chain().focus().toggleItalic().run(),
|
|
72
|
-
onClick: () => {
|
|
73
|
-
t.chain().focus().toggleItalic().run();
|
|
74
|
-
},
|
|
75
|
-
children: /* @__PURE__ */ (0, u.jsx)(p, {})
|
|
76
|
-
}),
|
|
77
|
-
/* @__PURE__ */ (0, u.jsx)(b, {
|
|
78
|
-
active: t.isActive("strike"),
|
|
79
|
-
disabled: !t.can().chain().focus().toggleStrike().run(),
|
|
80
|
-
onClick: () => {
|
|
81
|
-
t.chain().focus().toggleStrike().run();
|
|
82
|
-
},
|
|
83
|
-
children: /* @__PURE__ */ (0, u.jsx)(_, {})
|
|
84
|
-
}),
|
|
85
|
-
/* @__PURE__ */ (0, u.jsx)(b, {
|
|
86
|
-
active: t.isActive("codeBlock"),
|
|
87
|
-
disabled: !t.can().chain().focus().toggleCodeBlock().run(),
|
|
88
|
-
onClick: () => {
|
|
89
|
-
t.chain().focus().toggleCodeBlock();
|
|
90
|
-
},
|
|
91
|
-
children: /* @__PURE__ */ (0, u.jsx)(d, {})
|
|
92
|
-
}),
|
|
93
|
-
/* @__PURE__ */ (0, u.jsx)(b, {
|
|
94
|
-
active: t.isActive("bulletList"),
|
|
95
|
-
disabled: !t.can().chain().focus().toggleBulletList().run(),
|
|
96
|
-
onClick: () => {
|
|
97
|
-
t.chain().focus().toggleBulletList().run();
|
|
98
|
-
},
|
|
99
|
-
children: /* @__PURE__ */ (0, u.jsx)(m, {})
|
|
100
|
-
}),
|
|
101
|
-
/* @__PURE__ */ (0, u.jsx)(b, {
|
|
102
|
-
active: t.isActive("orderedList"),
|
|
103
|
-
disabled: !t.can().chain().focus().toggleOrderedList().run(),
|
|
104
|
-
onClick: () => {
|
|
105
|
-
t.chain().focus().toggleOrderedList().run();
|
|
106
|
-
},
|
|
107
|
-
children: /* @__PURE__ */ (0, u.jsx)(h, {})
|
|
108
|
-
}),
|
|
109
|
-
/* @__PURE__ */ (0, u.jsx)(b, {
|
|
110
|
-
onClick: (e) => {
|
|
111
|
-
C(t.getAttributes("link").href ?? ""), x(e.currentTarget), o(!0);
|
|
112
|
-
},
|
|
113
|
-
children: /* @__PURE__ */ (0, u.jsx)(g, {})
|
|
114
|
-
}),
|
|
115
|
-
/* @__PURE__ */ (0, u.jsx)(b, {
|
|
116
|
-
active: t.isActive("link"),
|
|
117
|
-
disabled: !t.can().chain().focus().unsetLink().run(),
|
|
118
|
-
onClick: () => {
|
|
119
|
-
t.chain().focus().unsetLink().run();
|
|
120
|
-
},
|
|
121
|
-
children: /* @__PURE__ */ (0, u.jsx)(g, {})
|
|
122
|
-
})
|
|
123
|
-
]
|
|
124
|
-
}) : null
|
|
125
|
-
}), /* @__PURE__ */ (0, u.jsx)(e, {
|
|
126
|
-
anchorEl: v,
|
|
127
|
-
anchorOrigin: {
|
|
128
|
-
horizontal: "left",
|
|
129
|
-
vertical: "bottom"
|
|
130
|
-
},
|
|
131
|
-
onClose: () => {
|
|
132
|
-
o(!1), x(null), C("");
|
|
133
|
-
},
|
|
134
|
-
open: r,
|
|
135
|
-
slotProps: { paper: { sx: { p: 2 } } },
|
|
136
|
-
children: /* @__PURE__ */ (0, u.jsx)(i, { children: /* @__PURE__ */ (0, u.jsx)(s, {
|
|
137
|
-
name: "url",
|
|
138
|
-
label: "URL",
|
|
139
|
-
onChange: (e) => {
|
|
140
|
-
C(e.target.value);
|
|
141
|
-
},
|
|
142
|
-
onKeyUp: (e) => {
|
|
143
|
-
if (e.key === "Enter") {
|
|
144
|
-
if (S === "") {
|
|
145
|
-
t?.chain().focus().extendMarkRange("link").unsetLink().run();
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
t?.chain().focus().setLink({ href: S }).run(), o(!1), x(null), C("");
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
value: S
|
|
152
|
-
}) })
|
|
153
|
-
})] });
|
|
154
|
-
};
|
|
155
|
-
function y(e) {
|
|
156
|
-
if (e.isActive("paragraph")) return "p";
|
|
157
|
-
for (let t of [
|
|
158
|
-
1,
|
|
159
|
-
2,
|
|
160
|
-
3,
|
|
161
|
-
4,
|
|
162
|
-
5,
|
|
163
|
-
6
|
|
164
|
-
]) if (e.isActive("heading", { level: t })) return `h${t}`;
|
|
165
|
-
return "p";
|
|
166
|
-
}
|
|
167
|
-
var b = c.forwardRef(function({ active: e, children: t, disabled: n, onClick: i }, a) {
|
|
168
|
-
return /* @__PURE__ */ (0, u.jsx)(r, {
|
|
169
|
-
color: e ? "primary" : "inherit",
|
|
170
|
-
disabled: n,
|
|
171
|
-
onClick: i,
|
|
172
|
-
ref: a,
|
|
173
|
-
children: t
|
|
174
|
-
});
|
|
175
|
-
});
|
|
176
|
-
//#endregion
|
|
177
|
-
export { v as t };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./jsx-runtime-V-UOMaX1.js";
|
|
2
|
-
import { t } from "./createSvgIcon-Bs2KOQvq.js";
|
|
3
|
-
import { SForm as n } from "./s-form/s-form.js";
|
|
4
|
-
import { useState as r } from "react";
|
|
5
|
-
import { IconButton as i, InputAdornment as a, TextField as o } from "@mui/material";
|
|
6
|
-
//#region ../../node_modules/@mui/icons-material/esm/Visibility.js
|
|
7
|
-
var s = e(), c = t(/* @__PURE__ */ (0, s.jsx)("path", { d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3" }), "Visibility"), l = t(/* @__PURE__ */ (0, s.jsx)("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z" }), "VisibilityOff"), u = ({ label: e = "", required: t = !1, error: u, type: d = "text", htmlFor: f, hint: p, ...m }) => {
|
|
8
|
-
let [h, g] = r(!1), _ = d === "password", v = () => {
|
|
9
|
-
g(!h);
|
|
10
|
-
}, y = _ && h ? "text" : d, b = _ ? /* @__PURE__ */ (0, s.jsx)(a, {
|
|
11
|
-
position: "end",
|
|
12
|
-
children: /* @__PURE__ */ (0, s.jsx)(i, {
|
|
13
|
-
"aria-label": "toggle password visibility",
|
|
14
|
-
onClick: v,
|
|
15
|
-
edge: "end",
|
|
16
|
-
size: "small",
|
|
17
|
-
children: h ? /* @__PURE__ */ (0, s.jsx)(l, {}) : /* @__PURE__ */ (0, s.jsx)(c, {})
|
|
18
|
-
})
|
|
19
|
-
}) : void 0;
|
|
20
|
-
return /* @__PURE__ */ (0, s.jsx)(n, {
|
|
21
|
-
label: e,
|
|
22
|
-
hint: p,
|
|
23
|
-
error: u,
|
|
24
|
-
required: t,
|
|
25
|
-
htmlFor: f,
|
|
26
|
-
children: /* @__PURE__ */ (0, s.jsx)(o, {
|
|
27
|
-
fullWidth: !0,
|
|
28
|
-
type: y,
|
|
29
|
-
id: f,
|
|
30
|
-
error: !!u,
|
|
31
|
-
...m,
|
|
32
|
-
slotProps: { input: {
|
|
33
|
-
endAdornment: b,
|
|
34
|
-
...m.slotProps?.input
|
|
35
|
-
} }
|
|
36
|
-
})
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
u.displayName = "STextField";
|
|
40
|
-
//#endregion
|
|
41
|
-
export { u as t };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./jsx-runtime-V-UOMaX1.js";
|
|
2
|
-
import { t } from "./createSvgIcon-Bs2KOQvq.js";
|
|
3
|
-
import { useCallback as n, useRef as r } from "react";
|
|
4
|
-
import { flushSync as i } from "react-dom";
|
|
5
|
-
import { IconButton as a } from "@mui/material";
|
|
6
|
-
//#region ../../node_modules/@mui/icons-material/esm/DarkMode.js
|
|
7
|
-
var o = e(), s = t(/* @__PURE__ */ (0, o.jsx)("path", { d: "M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1" }), "DarkMode"), c = t(/* @__PURE__ */ (0, o.jsx)("path", { d: "M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z" }), "LightMode"), l = ({ mode: e, setMode: t, sx: l }) => {
|
|
8
|
-
let u = r(null), d = e === "dark", f = n(() => {
|
|
9
|
-
setTimeout(() => {
|
|
10
|
-
t?.(e === "dark" ? "light" : "dark");
|
|
11
|
-
}, 0);
|
|
12
|
-
}, [e, t]);
|
|
13
|
-
return /* @__PURE__ */ (0, o.jsx)(a, {
|
|
14
|
-
ref: u,
|
|
15
|
-
onClick: n(async () => {
|
|
16
|
-
if (!u.current || !document.startViewTransition) {
|
|
17
|
-
f();
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
await document.startViewTransition(() => {
|
|
21
|
-
i(() => {
|
|
22
|
-
f();
|
|
23
|
-
});
|
|
24
|
-
}).ready;
|
|
25
|
-
let { top: e, left: t, width: n, height: r } = u.current.getBoundingClientRect(), a = t + n / 2, o = e + r / 2, s = Math.hypot(Math.max(t, window.innerWidth - t), Math.max(e, window.innerHeight - e));
|
|
26
|
-
document.documentElement.animate({ clipPath: [`circle(0px at ${a}px ${o}px)`, `circle(${s}px at ${a}px ${o}px)`] }, {
|
|
27
|
-
duration: 700,
|
|
28
|
-
easing: "ease-in-out",
|
|
29
|
-
pseudoElement: "::view-transition-new(root)"
|
|
30
|
-
});
|
|
31
|
-
}, [f]),
|
|
32
|
-
sx: l,
|
|
33
|
-
children: d ? /* @__PURE__ */ (0, o.jsx)(c, {}) : /* @__PURE__ */ (0, o.jsx)(s, {})
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
//#endregion
|
|
37
|
-
export { l as t };
|