@solostylist/ui-kit 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{gradients-90SYkAC0.js → gradients-DSnBONEQ.js} +1 -1
- package/dist/main.js +1 -1
- package/dist/palettes/index.js +1 -1
- package/dist/{palettes-Dw3PEYF5.js → palettes-CJLuEy1m.js} +163 -163
- package/dist/s-accordion/index.js +1 -1
- package/dist/s-accordion/s-accordion.js +70 -2
- package/dist/s-action-overlay/s-action-overlay.js +21 -21
- package/dist/s-autocomplete/s-autocomplete.js +1 -1
- package/dist/s-avatar/s-avatar.js +17 -17
- package/dist/s-blur-text/s-blur-text.js +16 -16
- package/dist/s-brand-logo/index.js +1 -1
- package/dist/s-brand-logo/s-brand-logo.js +1 -1
- package/dist/s-breadcrumbs/s-breadcrumbs.js +19 -19
- package/dist/s-carousel/index.js +1 -1
- package/dist/s-carousel/s-carousel.js +184 -2
- package/dist/s-category-card/s-category-card.js +22 -22
- package/dist/s-chat-input/index.js +1 -1
- package/dist/s-chat-input/s-chat-input.js +398 -2
- package/dist/s-chat-message/index.js +1 -1
- package/dist/s-chat-message/s-chat-message.js +314 -2
- package/dist/s-checkbox/s-checkbox.js +18 -19
- package/dist/s-chips/index.js +1 -1
- package/dist/s-chips/s-chips.js +174 -2
- package/dist/s-code-block/index.js +1 -1
- package/dist/s-code-block/s-code-block.js +103 -2
- package/dist/s-comment-message/index.js +1 -1
- package/dist/s-comment-message/s-comment-message.js +189 -2
- package/dist/s-copyable-text/s-copyable-text.js +18 -18
- package/dist/s-countdown/s-count-box.js +18 -18
- package/dist/s-data-table/index.js +1 -1
- package/dist/s-data-table/s-data-table.js +213 -2
- package/dist/s-date-picker/index.js +1 -1
- package/dist/s-date-picker/s-date-picker.js +106 -2
- package/dist/s-datetime-picker/index.js +1 -1
- package/dist/s-datetime-picker/s-datetime-picker.js +108 -2
- package/dist/s-dialog/index.js +1 -1
- package/dist/s-dialog/s-dialog.js +80 -2
- package/dist/s-dialog-confirm/s-dialog-confirm.js +32 -33
- package/dist/s-dialog-message/s-dialog-message.js +31 -32
- package/dist/s-empty/s-empty.js +13 -14
- package/dist/s-file-dropzone/index.js +1 -1
- package/dist/s-file-dropzone/s-file-dropzone.js +219 -2
- package/dist/s-file-icon/s-file-icon.js +87 -88
- package/dist/s-flex-box/s-flex-box.js +11 -12
- package/dist/s-form/s-form.js +15 -15
- package/dist/s-gallery/s-gallery.js +1 -1
- package/dist/s-glow-button/s-glow-button.js +9 -10
- package/dist/s-icon-button/s-icon-button.js +15 -16
- package/dist/s-image-comparison/s-image-comparison.js +29 -31
- package/dist/s-image-viewer/image-viewer-thumbnail-dock.js +1 -1
- package/dist/s-image-viewer/index.js +3 -3
- package/dist/s-image-viewer/s-image-viewer.js +266 -2
- package/dist/s-image-viewer/use-image-viewer-navigation.js +7 -7
- package/dist/s-label/s-label.js +26 -27
- package/dist/s-language-switcher/index.js +2 -2
- package/dist/s-language-switcher/s-language-switcher.js +150 -2
- package/dist/s-lazy-image/s-lazy-image.js +17 -18
- package/dist/s-link/index.js +1 -1
- package/dist/s-link/s-link.js +5 -2
- package/dist/s-localization-provider/index.js +1 -1
- package/dist/s-localization-provider/s-localization-provider.js +12 -2
- package/dist/s-nav-item/s-nav-item.js +16 -16
- package/dist/s-nav-items/index.js +2 -2
- package/dist/s-nav-items/s-nav-items.js +167 -2
- package/dist/s-no-ssr/index.js +1 -1
- package/dist/s-no-ssr/s-no-ssr.js +5 -2
- package/dist/s-pagination/index.js +1 -1
- package/dist/s-pagination/s-pagination.js +85 -2
- package/dist/s-pixel-reveal/s-pixel-reveal.js +20 -20
- package/dist/s-quantity-input/index.js +1 -1
- package/dist/s-quantity-input/s-quantity-input.js +246 -2
- package/dist/s-review/index.js +1 -1
- package/dist/s-review/s-review.js +272 -2
- package/dist/s-scroll-reveal/s-scroll-reveal.js +7 -8
- package/dist/s-scroll-to-top/s-scroll-to-top.js +27 -28
- package/dist/s-scroll-velocity/scroll-velocity-row.js +29 -29
- package/dist/s-select/index.js +1 -1
- package/dist/s-select/s-select.js +201 -2
- package/dist/s-select-list/s-select-list.js +47 -50
- package/dist/s-skeleton/s-skeleton.js +16 -17
- package/dist/s-snackbar-message/index.js +2 -2
- package/dist/s-snackbar-message/s-snackbar-message.js +89 -2
- package/dist/s-spotlight-cursor/s-spotlight-cursor.js +27 -27
- package/dist/s-status-illustration/s-status-illustration.js +74 -74
- package/dist/s-stripe/s-stripe.js +11 -12
- package/dist/s-stripe/stripe-input.js +3 -2
- package/dist/s-switch/index.js +1 -1
- package/dist/s-switch/s-switch.js +48 -2
- package/dist/s-tabs/s-tabs.js +48 -50
- package/dist/s-text-editor/index.js +1 -1
- package/dist/s-text-editor/s-text-editor-toolbar.js +216 -2
- package/dist/s-text-editor/s-text-editor.js +25 -26
- package/dist/s-text-field/index.js +1 -1
- package/dist/s-text-field/s-text-field.js +52 -2
- package/dist/s-text-shimmer/s-text-shimmer.js +1 -3
- package/dist/s-text-truncation/s-text-truncation.js +20 -20
- package/dist/s-theme-demo/s-theme-demo.js +8 -8
- package/dist/s-theme-demo/theme-demo-color-palette-section.js +1 -1
- package/dist/s-theme-demo/theme-demo-color-ramps-section.js +1 -1
- package/dist/s-theme-demo/theme-demo-components-section.js +265 -2
- package/dist/s-theme-demo/theme-demo-typography-section.js +10 -10
- package/dist/s-theme-provider/s-theme-provider.js +1 -1
- package/dist/s-theme-switch/index.js +1 -1
- package/dist/s-theme-switch/s-theme-switch.js +60 -2
- package/dist/s-tip/index.js +1 -1
- package/dist/s-tip/s-tip.js +61 -2
- package/dist/s-tool-bar/s-tool-bar.js +28 -28
- package/dist/s-tool-bar/tool-bar-action-buttons.js +55 -2
- package/dist/s-tool-bar/tool-bar-image-input.js +148 -2
- package/dist/s-tool-bar/tool-bar-inputs.js +55 -55
- package/dist/s-tool-item/s-tool-item.js +22 -22
- package/dist/s-two-pane-layout/s-two-pane-layout.js +32 -32
- package/dist/s-zoom-image/s-zoom-image.js +18 -19
- package/dist/theme/components/autocomplete.js +43 -2
- package/dist/theme/components/avatar.js +9 -2
- package/dist/theme/components/card.js +3 -3
- package/dist/theme/components/checkbox.js +90 -2
- package/dist/theme/components/chip.js +3 -3
- package/dist/theme/components/components.js +20 -20
- package/dist/theme/components/date-calendar.js +1 -0
- package/dist/theme/components/day-calendar.js +1 -0
- package/dist/theme/components/field-label-styles.js +19 -2
- package/dist/theme/components/form-label.js +1 -1
- package/dist/theme/components/list-item-button.js +1 -1
- package/dist/theme/components/list-item.js +7 -7
- package/dist/theme/components/month-calendar.js +14 -13
- package/dist/theme/components/multi-section-digital-clock-section.js +1 -0
- package/dist/theme/components/outlined-input.js +6 -6
- package/dist/theme/components/picker-day.js +1 -0
- package/dist/theme/components/pickers-arrow-switcher.js +1 -0
- package/dist/theme/components/pickers-calendar-header.js +3 -2
- package/dist/theme/components/select.js +6 -6
- package/dist/theme/components/switch.js +1 -1
- package/dist/theme/components/table-pagination.js +1 -1
- package/dist/theme/components/toggle-button.js +93 -2
- package/dist/theme/components/year-calendar.js +14 -13
- package/dist/theme/theme-primitives.js +2 -2
- package/dist/{theme-primitives-Dt_DT9b5.js → theme-primitives-CRfnMsNy.js} +108 -109
- package/dist/utils/dayjs.js +9 -146
- package/package.json +1 -1
- package/dist/Add-COc9VdNg.js +0 -6
- package/dist/ArrowUpward-D88i2k4q.js +0 -6
- package/dist/Box-9oeZgA1U.js +0 -46
- package/dist/Button-DgIFcM44.js +0 -534
- package/dist/ButtonBase-DxKtpFYs.js +0 -747
- package/dist/Checkbox-BoZu9z2l.js +0 -152
- package/dist/ChevronRight-BxsM4W78.js +0 -6
- package/dist/Close-o4HFfK0I.js +0 -6
- package/dist/Collapse-zgIFP5Sj.js +0 -266
- package/dist/ContentCopy-5unyTYXy.js +0 -6
- package/dist/DefaultPropsProvider-ebWx4_5E.js +0 -128
- package/dist/DialogContent-CAry6lVf.js +0 -450
- package/dist/Download-DtvoRwpl.js +0 -6
- package/dist/ExpandMore-Ba5bg6s-.js +0 -6
- package/dist/Favorite-B_GsElm0.js +0 -6
- package/dist/FormControl-BxmM9UP6.js +0 -221
- package/dist/FormControlLabel-DzgppcC_.js +0 -173
- package/dist/Grow-zRRuwUl-.js +0 -121
- package/dist/InfoOutlined-VC7X46pc.js +0 -6
- package/dist/List-CnGIAXAS.js +0 -103
- package/dist/ListContext-B1HQt3OD.js +0 -6
- package/dist/Menu-C4Zabc9U.js +0 -504
- package/dist/MenuItem-rXJfQzDC.js +0 -223
- package/dist/MenuList-DDV8J-yd.js +0 -407
- package/dist/Modal-jAiibALV.js +0 -707
- package/dist/Paper-ixxCeml9.js +0 -115
- package/dist/Popper-CVYyMS3c.js +0 -1350
- package/dist/Portal-AnyvFRC4.js +0 -53
- package/dist/RtlProvider-B7uVJXUY.js +0 -19
- package/dist/Skeleton-iZFynl7z.js +0 -220
- package/dist/Stack-UMc4dV4G.js +0 -158
- package/dist/SwitchBase-D7zqrstO.js +0 -198
- package/dist/Tooltip-DbCd6rgF.js +0 -447
- package/dist/Typography-yXjc7kVP.js +0 -168
- package/dist/UnfoldMoreRounded-DsN0HVDV.js +0 -6
- package/dist/appendOwnerState-CELpvdMz.js +0 -17
- package/dist/assets/stripe-input.css +0 -1
- package/dist/autocomplete-B_4y84Ba.js +0 -43
- package/dist/avatar-BHuZu3DN.js +0 -10
- package/dist/buttonBaseClasses-BvBqFLb_.js +0 -13
- package/dist/capitalize-CccCFNpQ.js +0 -5
- package/dist/checkbox-BKMZEVU5.js +0 -88
- package/dist/checkboxClasses-CEsqS4sc.js +0 -18
- package/dist/chunk-C_CI6nMA.js +0 -13
- package/dist/clsx-DGZSe4Nt.js +0 -16
- package/dist/colorManipulator-DmUjcif3.js +0 -129
- package/dist/contains-WOhYaq1E.js +0 -16
- package/dist/createSimplePaletteValueFilter-C1gWywW_.js +0 -14
- package/dist/createSvgIcon-B0SZlJF1.js +0 -155
- package/dist/createTheme-xB2Em0Na.js +0 -1869
- package/dist/defaultTheme-BaGcIzCh.js +0 -210
- package/dist/elementAcceptingRef-DhkNAkFH.js +0 -472
- package/dist/exactProp-C_IsucXf.js +0 -13
- package/dist/field-label-styles-BOyhp6gw.js +0 -50
- package/dist/formLabelClasses-B0Fa-86T.js +0 -18
- package/dist/generateUtilityClass-PAIOm1jC.js +0 -34
- package/dist/generateUtilityClasses-DvX505Gy.js +0 -10
- package/dist/iconButtonClasses-CkciZuIe.js +0 -27
- package/dist/inputAdornmentClasses-D5yYK5bM.js +0 -19
- package/dist/inputBaseClasses-DuWQGq8Z.js +0 -25
- package/dist/integerPropType-Disnft4a.js +0 -27
- package/dist/isEventHandler-8dPdzK9U.js +0 -7
- package/dist/isFocusVisible-Y7157FQS.js +0 -35
- package/dist/isLayoutSupported-Ceir7nyK.js +0 -21
- package/dist/listItemButtonClasses-DbL-aTVf.js +0 -18
- package/dist/memoTheme-qFyKAk7y.js +0 -15
- package/dist/mergeSlotProps-xl1-PgWL.js +0 -45
- package/dist/monthCalendarClasses-BYVHyEfI.js +0 -14
- package/dist/objectWithoutPropertiesLoose-Cpds-4w8.js +0 -23
- package/dist/outlinedInputClasses-DECY98u0.js +0 -17
- package/dist/pickersCalendarHeaderClasses-CIj0gBye.js +0 -12
- package/dist/prop-types-BzYPyWN7.js +0 -516
- package/dist/resolveProps-7jIA45vn.js +0 -30
- package/dist/s-accordion-B8nlrdFc.js +0 -487
- package/dist/s-carousel-Dnjke4JQ.js +0 -1353
- package/dist/s-chat-input-DCS0mJE4.js +0 -419
- package/dist/s-chat-message-9oollJJq.js +0 -315
- package/dist/s-chips-WqGdqHW9.js +0 -176
- package/dist/s-code-block-DzGoGg5e.js +0 -658
- package/dist/s-comment-message-C6kfgRjv.js +0 -191
- package/dist/s-data-table-B1TGVupB.js +0 -805
- package/dist/s-date-picker-BpX4HmBp.js +0 -656
- package/dist/s-datetime-picker-ByzW44E0.js +0 -3878
- package/dist/s-dialog-BLiyjLkx.js +0 -123
- package/dist/s-file-dropzone-CVQpYRdY.js +0 -422
- package/dist/s-image-viewer-DNIEYdtL.js +0 -269
- package/dist/s-language-switcher-D-1nywT3.js +0 -251
- package/dist/s-link-CAMTGfd9.js +0 -234
- package/dist/s-localization-provider-Xw3NO2uP.js +0 -519
- package/dist/s-nav-items-BUp7DddG.js +0 -327
- package/dist/s-no-ssr-D8tPdDfh.js +0 -25
- package/dist/s-pagination-Dt8Pk5Tp.js +0 -606
- package/dist/s-quantity-input-mYCixlJc.js +0 -246
- package/dist/s-review-DSXXtWlL.js +0 -272
- package/dist/s-select-dwY2DYa9.js +0 -204
- package/dist/s-snackbar-message-3Z6VySlB.js +0 -808
- package/dist/s-switch-B8bZAzLh.js +0 -307
- package/dist/s-text-editor-toolbar-D-XgFQix.js +0 -2121
- package/dist/s-text-field-BM4qk0mf.js +0 -51
- package/dist/s-theme-switch-BLMz1_m2.js +0 -60
- package/dist/s-tip-ty41ePQm.js +0 -62
- package/dist/selectClasses-DoUlWfzV.js +0 -22
- package/dist/styled-Bog8QCl3.js +0 -163
- package/dist/svgIconClasses-C8D4AsMj.js +0 -20
- package/dist/switchClasses-eiq1bkQN.js +0 -23
- package/dist/theme-demo-components-section-gtIYRngY.js +0 -267
- package/dist/toggle-button-Cxi5CfXC.js +0 -104
- package/dist/tool-bar-action-buttons-Dt-pV3GA.js +0 -54
- package/dist/tool-bar-image-input-BXlll_hV.js +0 -148
- package/dist/typographyClasses-BLM3NmYd.js +0 -31
- package/dist/useControlled-BeB0W_Ui.js +0 -5
- package/dist/useControlled-C4QJnpiR.js +0 -29
- package/dist/useEnhancedEffect-Bc3gBClC.js +0 -5
- package/dist/useEnhancedEffect-DFq_FMGX.js +0 -5
- package/dist/useEventCallback-CVqMfiG_.js +0 -14
- package/dist/useForkRef-CKneCEtr.js +0 -29
- package/dist/useFormControl-iWLrn7Ek.js +0 -18
- package/dist/useMobilePicker-C4UQFvkj.js +0 -7580
- package/dist/useSlot-iIu8ek6E.js +0 -83
- package/dist/useTheme-BIWMbX3i.js +0 -9
- package/dist/useThemeProps-BI9yq95N.js +0 -19
- package/dist/useThemeProps-Cr28OQu3.js +0 -13
- package/dist/utils-oJyTAkZY.js +0 -214
- package/dist/warning-CNkSZkq6.js +0 -98
- package/dist/yearCalendarClasses-CuAQumpz.js +0 -14
- /package/dist/{colors-DKqWMRgW.js → colors-CNjL5fhq.js} +0 -0
- /package/dist/{s-brand-logo-jtAJZQIv.js → s-brand-logo-CErW9Slg.js} +0 -0
- /package/dist/{utils-DaSrTYUS.js → utils-CMeAWSRO.js} +0 -0
|
@@ -1,2 +1,216 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { toSxArray as e } from "../utils/sx.js";
|
|
2
|
+
import { STextField as t } from "../s-text-field/s-text-field.js";
|
|
3
|
+
import n from "@mui/material/IconButton";
|
|
4
|
+
import * as r from "react";
|
|
5
|
+
import i from "@mui/material/Select";
|
|
6
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
+
import { MenuItem as s, styled as c, useThemeProps as l } from "@mui/material";
|
|
8
|
+
import u from "@mui/material/Stack";
|
|
9
|
+
import d from "@mui/icons-material/Code";
|
|
10
|
+
import f from "@mui/icons-material/FormatBold";
|
|
11
|
+
import p from "@mui/icons-material/FormatItalic";
|
|
12
|
+
import m from "@mui/icons-material/FormatListBulleted";
|
|
13
|
+
import h from "@mui/icons-material/FormatListNumbered";
|
|
14
|
+
import g from "@mui/icons-material/Link";
|
|
15
|
+
import _ from "@mui/icons-material/StrikethroughS";
|
|
16
|
+
import v from "@mui/material/FormControl";
|
|
17
|
+
import y from "@mui/material/Popover";
|
|
18
|
+
//#region lib/s-text-editor/s-text-editor-toolbar.tsx
|
|
19
|
+
var b = c(u, {
|
|
20
|
+
name: "STextEditorToolbar",
|
|
21
|
+
slot: "Root"
|
|
22
|
+
})({}), x = r.forwardRef(function(n, c) {
|
|
23
|
+
let x = l({
|
|
24
|
+
props: n,
|
|
25
|
+
name: "STextEditorToolbar"
|
|
26
|
+
}), { className: w, disabled: T = !1, editor: E, spacing: D = 1, sx: O, ...k } = x, A = {
|
|
27
|
+
...x,
|
|
28
|
+
disabled: T,
|
|
29
|
+
editorReady: E != null
|
|
30
|
+
}, [j, M] = r.useState(!1), [N, P] = r.useState(null), [F, I] = r.useState("");
|
|
31
|
+
return r.useEffect(() => {
|
|
32
|
+
T && (M(!1), P(null), I(""));
|
|
33
|
+
}, [T]), /* @__PURE__ */ o(r.Fragment, { children: [/* @__PURE__ */ a(b, {
|
|
34
|
+
...k,
|
|
35
|
+
className: ["tiptap-toolbar", w].filter(Boolean).join(" "),
|
|
36
|
+
ownerState: A,
|
|
37
|
+
ref: c,
|
|
38
|
+
spacing: D,
|
|
39
|
+
"aria-disabled": T || void 0,
|
|
40
|
+
sx: [{
|
|
41
|
+
borderBottom: "1px solid",
|
|
42
|
+
borderColor: "divider",
|
|
43
|
+
p: "8px",
|
|
44
|
+
minHeight: "57px"
|
|
45
|
+
}, ...e(O)],
|
|
46
|
+
children: E ? /* @__PURE__ */ o(u, {
|
|
47
|
+
direction: "row",
|
|
48
|
+
spacing: .5,
|
|
49
|
+
sx: {
|
|
50
|
+
alignItems: "center",
|
|
51
|
+
flexWrap: "wrap"
|
|
52
|
+
},
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ o(i, {
|
|
55
|
+
disabled: T,
|
|
56
|
+
inputProps: { "aria-label": "Text format" },
|
|
57
|
+
onChange: (e) => {
|
|
58
|
+
let t = e.target.value;
|
|
59
|
+
if (t) {
|
|
60
|
+
if (t === "p") {
|
|
61
|
+
E.chain().focus().setParagraph().run();
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
if (t.startsWith("h")) {
|
|
65
|
+
let e = parseInt(t.replace("h", ""));
|
|
66
|
+
!isNaN(e) && e >= 1 && e <= 6 && E.chain().focus().setHeading({ level: e }).run();
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
value: S(E),
|
|
71
|
+
children: [/* @__PURE__ */ a(s, {
|
|
72
|
+
disabled: T || !E.can().chain().focus().setParagraph().run(),
|
|
73
|
+
value: "p",
|
|
74
|
+
children: "Paragraph"
|
|
75
|
+
}), [
|
|
76
|
+
1,
|
|
77
|
+
2,
|
|
78
|
+
3,
|
|
79
|
+
4,
|
|
80
|
+
5,
|
|
81
|
+
6
|
|
82
|
+
].map((e) => /* @__PURE__ */ o(s, {
|
|
83
|
+
disabled: T || !E.can().chain().focus().setHeading({ level: e }).run(),
|
|
84
|
+
value: `h${e}`,
|
|
85
|
+
children: ["Heading ", e]
|
|
86
|
+
}, e))]
|
|
87
|
+
}),
|
|
88
|
+
/* @__PURE__ */ a(C, {
|
|
89
|
+
active: E.isActive("bold"),
|
|
90
|
+
disabled: T || !E.can().chain().focus().toggleBold().run(),
|
|
91
|
+
label: "Bold",
|
|
92
|
+
onClick: () => {
|
|
93
|
+
E.chain().focus().toggleBold().run();
|
|
94
|
+
},
|
|
95
|
+
children: /* @__PURE__ */ a(f, {})
|
|
96
|
+
}),
|
|
97
|
+
/* @__PURE__ */ a(C, {
|
|
98
|
+
active: E.isActive("italic"),
|
|
99
|
+
disabled: T || !E.can().chain().focus().toggleItalic().run(),
|
|
100
|
+
label: "Italic",
|
|
101
|
+
onClick: () => {
|
|
102
|
+
E.chain().focus().toggleItalic().run();
|
|
103
|
+
},
|
|
104
|
+
children: /* @__PURE__ */ a(p, {})
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ a(C, {
|
|
107
|
+
active: E.isActive("strike"),
|
|
108
|
+
disabled: T || !E.can().chain().focus().toggleStrike().run(),
|
|
109
|
+
label: "Strikethrough",
|
|
110
|
+
onClick: () => {
|
|
111
|
+
E.chain().focus().toggleStrike().run();
|
|
112
|
+
},
|
|
113
|
+
children: /* @__PURE__ */ a(_, {})
|
|
114
|
+
}),
|
|
115
|
+
/* @__PURE__ */ a(C, {
|
|
116
|
+
active: E.isActive("codeBlock"),
|
|
117
|
+
disabled: T || !E.can().chain().focus().toggleCodeBlock().run(),
|
|
118
|
+
label: "Code block",
|
|
119
|
+
onClick: () => {
|
|
120
|
+
E.chain().focus().toggleCodeBlock().run();
|
|
121
|
+
},
|
|
122
|
+
children: /* @__PURE__ */ a(d, {})
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ a(C, {
|
|
125
|
+
active: E.isActive("bulletList"),
|
|
126
|
+
disabled: T || !E.can().chain().focus().toggleBulletList().run(),
|
|
127
|
+
label: "Bulleted list",
|
|
128
|
+
onClick: () => {
|
|
129
|
+
E.chain().focus().toggleBulletList().run();
|
|
130
|
+
},
|
|
131
|
+
children: /* @__PURE__ */ a(m, {})
|
|
132
|
+
}),
|
|
133
|
+
/* @__PURE__ */ a(C, {
|
|
134
|
+
active: E.isActive("orderedList"),
|
|
135
|
+
disabled: T || !E.can().chain().focus().toggleOrderedList().run(),
|
|
136
|
+
label: "Numbered list",
|
|
137
|
+
onClick: () => {
|
|
138
|
+
E.chain().focus().toggleOrderedList().run();
|
|
139
|
+
},
|
|
140
|
+
children: /* @__PURE__ */ a(h, {})
|
|
141
|
+
}),
|
|
142
|
+
/* @__PURE__ */ a(C, {
|
|
143
|
+
disabled: T,
|
|
144
|
+
label: "Set link",
|
|
145
|
+
onClick: (e) => {
|
|
146
|
+
I(E.getAttributes("link").href ?? ""), P(e.currentTarget), M(!0);
|
|
147
|
+
},
|
|
148
|
+
children: /* @__PURE__ */ a(g, {})
|
|
149
|
+
}),
|
|
150
|
+
/* @__PURE__ */ a(C, {
|
|
151
|
+
active: E.isActive("link"),
|
|
152
|
+
disabled: T || !E.can().chain().focus().unsetLink().run(),
|
|
153
|
+
label: "Remove link",
|
|
154
|
+
onClick: () => {
|
|
155
|
+
E.chain().focus().unsetLink().run();
|
|
156
|
+
},
|
|
157
|
+
children: /* @__PURE__ */ a(g, {})
|
|
158
|
+
})
|
|
159
|
+
]
|
|
160
|
+
}) : null
|
|
161
|
+
}), /* @__PURE__ */ a(y, {
|
|
162
|
+
anchorEl: N,
|
|
163
|
+
anchorOrigin: {
|
|
164
|
+
horizontal: "left",
|
|
165
|
+
vertical: "bottom"
|
|
166
|
+
},
|
|
167
|
+
onClose: () => {
|
|
168
|
+
M(!1), P(null), I("");
|
|
169
|
+
},
|
|
170
|
+
open: !T && j,
|
|
171
|
+
slotProps: { paper: { sx: { p: 2 } } },
|
|
172
|
+
children: /* @__PURE__ */ a(v, { children: /* @__PURE__ */ a(t, {
|
|
173
|
+
name: "url",
|
|
174
|
+
label: "URL",
|
|
175
|
+
onChange: (e) => {
|
|
176
|
+
I(e.target.value);
|
|
177
|
+
},
|
|
178
|
+
onKeyUp: (e) => {
|
|
179
|
+
if (e.key === "Enter") {
|
|
180
|
+
if (F === "") {
|
|
181
|
+
E?.chain().focus().extendMarkRange("link").unsetLink().run();
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
E?.chain().focus().setLink({ href: F }).run(), M(!1), P(null), I("");
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
value: F
|
|
188
|
+
}) })
|
|
189
|
+
})] });
|
|
190
|
+
});
|
|
191
|
+
x.displayName = "STextEditorToolbar";
|
|
192
|
+
function S(e) {
|
|
193
|
+
if (e.isActive("paragraph")) return "p";
|
|
194
|
+
for (let t of [
|
|
195
|
+
1,
|
|
196
|
+
2,
|
|
197
|
+
3,
|
|
198
|
+
4,
|
|
199
|
+
5,
|
|
200
|
+
6
|
|
201
|
+
]) if (e.isActive("heading", { level: t })) return `h${t}`;
|
|
202
|
+
return "p";
|
|
203
|
+
}
|
|
204
|
+
var C = r.forwardRef(function({ active: e, children: t, disabled: r, label: i, onClick: o }, s) {
|
|
205
|
+
return /* @__PURE__ */ a(n, {
|
|
206
|
+
"aria-label": i,
|
|
207
|
+
"aria-pressed": e,
|
|
208
|
+
color: e ? "primary" : "inherit",
|
|
209
|
+
disabled: r,
|
|
210
|
+
onClick: o,
|
|
211
|
+
ref: s,
|
|
212
|
+
children: t
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
//#endregion
|
|
216
|
+
export { x as STextEditorToolbar };
|
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "../
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
1
|
+
import { toSxArray as e } from "../utils/sx.js";
|
|
2
|
+
import { tint as t } from "../theme/utils.js";
|
|
3
|
+
import { STextEditorToolbar as n } from "./s-text-editor-toolbar.js";
|
|
4
|
+
import { styled as r, useThemeProps as i } from "@mui/material/styles";
|
|
5
|
+
import * as a from "react";
|
|
6
|
+
import { forwardRef as o } from "react";
|
|
7
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
+
import l from "@mui/material/Box";
|
|
10
9
|
import { Placeholder as u } from "@tiptap/extension-placeholder";
|
|
11
10
|
import { EditorContent as d, useEditor as f } from "@tiptap/react";
|
|
12
11
|
import { StarterKit as p } from "@tiptap/starter-kit";
|
|
13
12
|
//#region lib/s-text-editor/s-text-editor.tsx
|
|
14
|
-
var m =
|
|
13
|
+
var m = r(l, {
|
|
15
14
|
name: "STextEditor",
|
|
16
15
|
slot: "Root",
|
|
17
16
|
shouldForwardProp: (e) => e !== "ownerState"
|
|
18
|
-
})({}), h =
|
|
19
|
-
let
|
|
20
|
-
props:
|
|
17
|
+
})({}), h = o((r, o) => {
|
|
18
|
+
let l = i({
|
|
19
|
+
props: r,
|
|
21
20
|
name: "STextEditor"
|
|
22
|
-
}), { content: h, editable: g = !0, hideToolbar: _ = !1, onUpdate: v = () => {}, placeholder: y, sx: b, ...x } =
|
|
23
|
-
...
|
|
21
|
+
}), { content: h, editable: g = !0, hideToolbar: _ = !1, onUpdate: v = () => {}, placeholder: y, sx: b, ...x } = l, S = {
|
|
22
|
+
...l,
|
|
24
23
|
editable: g,
|
|
25
24
|
hideToolbar: _
|
|
26
|
-
}, C =
|
|
25
|
+
}, C = a.useRef(y);
|
|
27
26
|
C.current = y;
|
|
28
27
|
let w = f({
|
|
29
|
-
extensions:
|
|
28
|
+
extensions: a.useMemo(() => [p.configure({ link: {
|
|
30
29
|
openOnClick: !1,
|
|
31
30
|
autolink: !0
|
|
32
31
|
} }), u.configure({
|
|
@@ -38,15 +37,15 @@ var m = t(e, {
|
|
|
38
37
|
onUpdate: v,
|
|
39
38
|
parseOptions: { preserveWhitespace: "full" }
|
|
40
39
|
});
|
|
41
|
-
return
|
|
40
|
+
return a.useEffect(() => {
|
|
42
41
|
!w || w.isDestroyed || w.setEditable(g);
|
|
43
|
-
}, [g, w]),
|
|
42
|
+
}, [g, w]), a.useEffect(() => {
|
|
44
43
|
!w || w.isDestroyed || w.view.dispatch(w.state.tr);
|
|
45
|
-
}, [w, y]),
|
|
44
|
+
}, [w, y]), a.useEffect(() => {
|
|
46
45
|
!w || w.isDestroyed || w.getHTML() !== h && w.commands.setContent(h);
|
|
47
|
-
}, [h, w]), /* @__PURE__ */
|
|
46
|
+
}, [h, w]), /* @__PURE__ */ c(m, {
|
|
48
47
|
...x,
|
|
49
|
-
ref:
|
|
48
|
+
ref: o,
|
|
50
49
|
ownerState: S,
|
|
51
50
|
sx: [(e) => ({
|
|
52
51
|
display: "flex",
|
|
@@ -58,7 +57,7 @@ var m = t(e, {
|
|
|
58
57
|
...g ? {
|
|
59
58
|
"&:hover": { borderColor: (e.vars ?? e).palette.grey[500] },
|
|
60
59
|
"&:focus-within": {
|
|
61
|
-
outline: `3px solid ${
|
|
60
|
+
outline: `3px solid ${t((e.vars ?? e).palette.primary[500], 50)}`,
|
|
62
61
|
borderColor: (e.vars ?? e).palette.primary[400]
|
|
63
62
|
}
|
|
64
63
|
} : {},
|
|
@@ -88,11 +87,11 @@ var m = t(e, {
|
|
|
88
87
|
pointerEvents: "none"
|
|
89
88
|
}
|
|
90
89
|
}
|
|
91
|
-
}), ...
|
|
92
|
-
children: [_ ? null : /* @__PURE__ */
|
|
90
|
+
}), ...e(b)],
|
|
91
|
+
children: [_ ? null : /* @__PURE__ */ s(n, {
|
|
93
92
|
disabled: !g,
|
|
94
93
|
editor: w
|
|
95
|
-
}), /* @__PURE__ */
|
|
94
|
+
}), /* @__PURE__ */ s(d, {
|
|
96
95
|
className: "tiptap-container",
|
|
97
96
|
editor: w
|
|
98
97
|
})]
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { STextField as e } from "./s-text-field.js";
|
|
2
2
|
export { e as STextField, e as default };
|
|
@@ -1,2 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { staticFieldLabelStyles as e } from "../theme/components/field-label-styles.js";
|
|
2
|
+
import { forwardRef as t, useState as n } from "react";
|
|
3
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
4
|
+
import { inputLabelClasses as i } from "@mui/material/InputLabel";
|
|
5
|
+
import { Visibility as a, VisibilityOff as o } from "@mui/icons-material";
|
|
6
|
+
import { IconButton as s, InputAdornment as c, TextField as l, styled as u, useThemeProps as d } from "@mui/material";
|
|
7
|
+
import { mergeSlotProps as f } from "@mui/material/utils";
|
|
8
|
+
import { inputBaseClasses as p } from "@mui/material/InputBase";
|
|
9
|
+
//#region lib/s-text-field/s-text-field.tsx
|
|
10
|
+
var m = u(l, {
|
|
11
|
+
name: "STextField",
|
|
12
|
+
slot: "Root",
|
|
13
|
+
shouldForwardProp: (e) => e !== "ownerState"
|
|
14
|
+
})({
|
|
15
|
+
...e,
|
|
16
|
+
[`& .${i.root}[data-shrink='false'] + .${p.formControl} .${p.input}`]: { "&::placeholder": { opacity: "1 !important" } }
|
|
17
|
+
}), h = t((e, t) => {
|
|
18
|
+
let i = d({
|
|
19
|
+
props: e,
|
|
20
|
+
name: "STextField"
|
|
21
|
+
}), { fullWidth: l = !0, type: u = "text", slotProps: p, togglePasswordText: h = "toggle password visibility", ...g } = i, [_, v] = n(!1), y = u === "password", b = {
|
|
22
|
+
...i,
|
|
23
|
+
fullWidth: l,
|
|
24
|
+
password: y,
|
|
25
|
+
passwordVisible: _
|
|
26
|
+
}, x = () => {
|
|
27
|
+
v((e) => !e);
|
|
28
|
+
}, S = y && _ ? "text" : u, C = y ? /* @__PURE__ */ r(c, {
|
|
29
|
+
position: "end",
|
|
30
|
+
children: /* @__PURE__ */ r(s, {
|
|
31
|
+
"aria-label": h,
|
|
32
|
+
onClick: x,
|
|
33
|
+
edge: "end",
|
|
34
|
+
size: "small",
|
|
35
|
+
children: r(_ ? o : a, {})
|
|
36
|
+
})
|
|
37
|
+
}) : void 0;
|
|
38
|
+
return /* @__PURE__ */ r(m, {
|
|
39
|
+
...g,
|
|
40
|
+
fullWidth: l,
|
|
41
|
+
ownerState: b,
|
|
42
|
+
ref: t,
|
|
43
|
+
type: S,
|
|
44
|
+
slotProps: {
|
|
45
|
+
...p,
|
|
46
|
+
input: y ? f(p?.input, { endAdornment: C }) : p?.input
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
h.displayName = "STextField";
|
|
51
|
+
//#endregion
|
|
52
|
+
export { h as STextField, h as default };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "../styled-Bog8QCl3.js";
|
|
3
|
-
import { t as n } from "../useThemeProps-Cr28OQu3.js";
|
|
1
|
+
import { keyframes as e, styled as t, useThemeProps as n } from "@mui/material/styles";
|
|
4
2
|
import * as r from "react";
|
|
5
3
|
import { jsx as i } from "react/jsx-runtime";
|
|
6
4
|
import { Typography as a } from "@mui/material";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { toSxArray as e } from "../utils/sx.js";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { useCallback as n, useEffect as r, useRef as i, useState as a } from "react";
|
|
4
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
5
|
+
import { Box as l, Link as u, Tooltip as d, Typography as f, styled as p, useThemeProps as m } from "@mui/material";
|
|
6
|
+
import h from "@mui/utils/appendOwnerState";
|
|
7
7
|
//#region lib/s-text-truncation/s-text-truncation.tsx
|
|
8
|
-
var g =
|
|
8
|
+
var g = p(l, {
|
|
9
9
|
name: "STextTruncation",
|
|
10
10
|
slot: "Root",
|
|
11
11
|
shouldForwardProp: (e) => e !== "ownerState"
|
|
@@ -16,13 +16,13 @@ function _(e, t) {
|
|
|
16
16
|
function v(e) {
|
|
17
17
|
return e ? Object.fromEntries(Object.entries(e).filter(([e]) => e === "children" || e === "component" || e === "id" || e === "ref" || e === "role" || e === "tabIndex" || e === "title" || e.startsWith("aria-") || e.startsWith("data-") ? !1 : !/^on[A-Z]/.test(e))) : {};
|
|
18
18
|
}
|
|
19
|
-
var y =
|
|
20
|
-
let y =
|
|
21
|
-
props:
|
|
19
|
+
var y = t.forwardRef(function(l, p) {
|
|
20
|
+
let y = m({
|
|
21
|
+
props: l,
|
|
22
22
|
name: "STextTruncation"
|
|
23
|
-
}), { children: b, collapseText: x = "See less", expandText: S = "See more", lines: C = 3, slotProps: w, slots: T, sx: E, variant: D = "expandable", ...O } = y, [k, A] =
|
|
24
|
-
I.current = e, typeof
|
|
25
|
-
}, [
|
|
23
|
+
}), { children: b, collapseText: x = "See less", expandText: S = "See more", lines: C = 3, slotProps: w, slots: T, sx: E, variant: D = "expandable", ...O } = y, [k, A] = a(!1), [j, M] = a(!1), [N, P] = a(b), F = i(null), I = i(null), L = t.useCallback((e) => {
|
|
24
|
+
I.current = e, typeof p == "function" ? p(e) : p && (p.current = e);
|
|
25
|
+
}, [p]), R = n(() => {
|
|
26
26
|
let e = F.current;
|
|
27
27
|
if (!e || !b) {
|
|
28
28
|
M(!1), P(b);
|
|
@@ -46,7 +46,7 @@ var y = n.forwardRef(function(u, m) {
|
|
|
46
46
|
C,
|
|
47
47
|
b
|
|
48
48
|
]);
|
|
49
|
-
|
|
49
|
+
r(() => {
|
|
50
50
|
R();
|
|
51
51
|
let e = new ResizeObserver(R);
|
|
52
52
|
return I.current && e.observe(I.current), () => e.disconnect();
|
|
@@ -56,17 +56,17 @@ var y = n.forwardRef(function(u, m) {
|
|
|
56
56
|
expanded: k,
|
|
57
57
|
truncated: j,
|
|
58
58
|
variant: D
|
|
59
|
-
}, B = T?.text ??
|
|
60
|
-
return /* @__PURE__ */
|
|
59
|
+
}, B = T?.text ?? f, V = T?.toggle ?? u, H = T?.tooltip ?? d, U = _(w?.text, z), W = _(w?.toggle, z), G = _(w?.tooltip, z), { onClick: K, sx: q, ...J } = W ?? {}, Y = h(T?.text, U ?? {}, z), X = h(T?.text, v(U), z), Z = h(T?.toggle, J, z), Q = h(T?.tooltip, G ?? {}, z);
|
|
60
|
+
return /* @__PURE__ */ s(g, {
|
|
61
61
|
...O,
|
|
62
62
|
ownerState: z,
|
|
63
63
|
ref: L,
|
|
64
64
|
sx: [{ position: "relative" }, ...e(E)],
|
|
65
|
-
children: D === "tooltip" ? /* @__PURE__ */
|
|
65
|
+
children: D === "tooltip" ? /* @__PURE__ */ s(H, {
|
|
66
66
|
arrow: !0,
|
|
67
67
|
title: b,
|
|
68
68
|
...Q,
|
|
69
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ s(B, {
|
|
70
70
|
...Y,
|
|
71
71
|
sx: [{
|
|
72
72
|
display: "-webkit-box",
|
|
@@ -78,7 +78,7 @@ var y = n.forwardRef(function(u, m) {
|
|
|
78
78
|
}, ...e(U?.sx)],
|
|
79
79
|
children: b
|
|
80
80
|
})
|
|
81
|
-
}) : /* @__PURE__ */
|
|
81
|
+
}) : /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(B, {
|
|
82
82
|
ref: F,
|
|
83
83
|
"aria-hidden": !0,
|
|
84
84
|
component: "span",
|
|
@@ -92,9 +92,9 @@ var y = n.forwardRef(function(u, m) {
|
|
|
92
92
|
visibility: "hidden",
|
|
93
93
|
pointerEvents: "none"
|
|
94
94
|
}, ...e(U?.sx)]
|
|
95
|
-
}), /* @__PURE__ */
|
|
95
|
+
}), /* @__PURE__ */ c(B, {
|
|
96
96
|
...Y,
|
|
97
|
-
children: [k ? b : N, j && /* @__PURE__ */
|
|
97
|
+
children: [k ? b : N, j && /* @__PURE__ */ c(o, { children: [k ? " " : "… ", /* @__PURE__ */ s(V, {
|
|
98
98
|
component: "button",
|
|
99
99
|
type: "button",
|
|
100
100
|
...Z,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { toSxArray as e } from "../utils/sx.js";
|
|
2
|
-
import { t } from "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { TypographySection as t } from "./theme-demo-typography-section.js";
|
|
3
|
+
import { ShadowSection as n } from "./theme-demo-shadow-section.js";
|
|
4
|
+
import { InteractiveSection as r } from "./theme-demo-interactive-section.js";
|
|
5
|
+
import { SoloStylistSection as i } from "./theme-demo-components-section.js";
|
|
6
6
|
import { ColorRampsSection as a } from "./theme-demo-color-ramps-section.js";
|
|
7
7
|
import { ColorPaletteSection as o } from "./theme-demo-color-palette-section.js";
|
|
8
8
|
import * as s from "react";
|
|
@@ -64,10 +64,10 @@ var h = [
|
|
|
64
64
|
children: [
|
|
65
65
|
T.colors && /* @__PURE__ */ c(o, {}),
|
|
66
66
|
T.ramps && /* @__PURE__ */ c(a, {}),
|
|
67
|
-
T.typography && /* @__PURE__ */ c(
|
|
68
|
-
(T.components || T.forms) && /* @__PURE__ */ c(
|
|
69
|
-
T.interactive && /* @__PURE__ */ c(
|
|
70
|
-
T.shadows && /* @__PURE__ */ c(
|
|
67
|
+
T.typography && /* @__PURE__ */ c(t, {}),
|
|
68
|
+
(T.components || T.forms) && /* @__PURE__ */ c(i, {}),
|
|
69
|
+
T.interactive && /* @__PURE__ */ c(r, {}),
|
|
70
|
+
T.shadows && /* @__PURE__ */ c(n, {})
|
|
71
71
|
]
|
|
72
72
|
})]
|
|
73
73
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useTheme as e } from "@mui/material/styles";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
4
|
import { Box as r, Card as i, CardContent as a, Stack as o, Typography as s } from "@mui/material";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, i, l as a, m as o, n as s, o as c, p as l, r as u, s as d, t as f, u as p } from "../colors-
|
|
1
|
+
import { a as e, c as t, d as n, f as r, i, l as a, m as o, n as s, o as c, p as l, r as u, s as d, t as f, u as p } from "../colors-CNjL5fhq.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
4
4
|
import { Box as g, Card as _, CardContent as v, Stack as y, Typography as b } from "@mui/material";
|