@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,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SDateTimePicker as e } from "./s-datetime-picker.js";
|
|
2
2
|
export { e as SDateTimePicker, e as default };
|
|
@@ -1,2 +1,108 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { tint as e } from "../theme/utils.js";
|
|
2
|
+
import { staticFieldLabelStyles as t } from "../theme/components/field-label-styles.js";
|
|
3
|
+
import { PickerActionBar as n } from "../s-date-picker/picker-action-bar.js";
|
|
4
|
+
import { forwardRef as r } from "react";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
import { styled as a, useTheme as o, useThemeProps as s } from "@mui/material";
|
|
7
|
+
import { mergeSlotProps as c } from "@mui/material/utils";
|
|
8
|
+
import { inputBaseClasses as l } from "@mui/material/InputBase";
|
|
9
|
+
import { DateTimePicker as u } from "@mui/x-date-pickers/DateTimePicker";
|
|
10
|
+
//#region lib/s-datetime-picker/s-datetime-picker.tsx
|
|
11
|
+
var d = [
|
|
12
|
+
"year",
|
|
13
|
+
"month",
|
|
14
|
+
"day",
|
|
15
|
+
"hours",
|
|
16
|
+
"minutes"
|
|
17
|
+
], f = a(u, {
|
|
18
|
+
name: "SDateTimePicker",
|
|
19
|
+
slot: "Root",
|
|
20
|
+
shouldForwardProp: (e) => e !== "ownerState"
|
|
21
|
+
})({}), p = r((r, a) => {
|
|
22
|
+
let u = s({
|
|
23
|
+
props: r,
|
|
24
|
+
name: "SDateTimePicker"
|
|
25
|
+
}), { label: p, required: m = !1, error: h = !1, helperText: g, id: _, slots: v, slotProps: y, views: b = d, ...x } = u, S = o(), C = {
|
|
26
|
+
...u,
|
|
27
|
+
error: h,
|
|
28
|
+
required: m
|
|
29
|
+
};
|
|
30
|
+
return /* @__PURE__ */ i(f, {
|
|
31
|
+
...x,
|
|
32
|
+
ref: a,
|
|
33
|
+
label: p,
|
|
34
|
+
ownerState: C,
|
|
35
|
+
views: b,
|
|
36
|
+
slots: {
|
|
37
|
+
actionBar: n,
|
|
38
|
+
...v
|
|
39
|
+
},
|
|
40
|
+
slotProps: {
|
|
41
|
+
...y,
|
|
42
|
+
openPickerButton: c(y?.openPickerButton, {
|
|
43
|
+
edge: "end",
|
|
44
|
+
size: "small"
|
|
45
|
+
}),
|
|
46
|
+
popper: c(y?.popper, { sx: { "& .MuiPaper-root": {
|
|
47
|
+
border: "1px solid",
|
|
48
|
+
borderColor: (S.vars ?? S).palette.divider,
|
|
49
|
+
borderRadius: (S.vars ?? S).shape.borderRadius,
|
|
50
|
+
boxShadow: "none",
|
|
51
|
+
backgroundImage: "none"
|
|
52
|
+
} } }),
|
|
53
|
+
textField: c(y?.textField, {
|
|
54
|
+
fullWidth: !0,
|
|
55
|
+
id: _,
|
|
56
|
+
error: h,
|
|
57
|
+
helperText: g,
|
|
58
|
+
required: m,
|
|
59
|
+
sx: {
|
|
60
|
+
...t,
|
|
61
|
+
"& .MuiPickersOutlinedInput-root": {
|
|
62
|
+
height: S.spacing(5),
|
|
63
|
+
minHeight: S.spacing(5),
|
|
64
|
+
px: 1.5,
|
|
65
|
+
py: 1,
|
|
66
|
+
color: (S.vars ?? S).palette.text.primary,
|
|
67
|
+
borderRadius: (S.vars ?? S).shape.borderRadius,
|
|
68
|
+
border: `1px solid ${(S.vars ?? S).palette.divider}`,
|
|
69
|
+
backgroundColor: (S.vars ?? S).palette.background.default,
|
|
70
|
+
transition: "border 120ms ease-in",
|
|
71
|
+
"&:hover": { borderColor: (S.vars ?? S).palette.grey[500] },
|
|
72
|
+
[`&:focus-within:not(.${l.error}):not(.${l.disabled}), &.${l.focused}:not(.${l.error}):not(.${l.disabled})`]: {
|
|
73
|
+
outline: `3px solid ${e((S.vars ?? S).palette.primary[500], 50)}`,
|
|
74
|
+
borderColor: (S.vars ?? S).palette.primary[400]
|
|
75
|
+
},
|
|
76
|
+
[`&.${l.error}:not(.${l.disabled})`]: {
|
|
77
|
+
borderColor: (S.vars ?? S).palette.error.main,
|
|
78
|
+
"&:hover": { borderColor: (S.vars ?? S).palette.error.main }
|
|
79
|
+
},
|
|
80
|
+
[`&.${l.error}:focus-within:not(.${l.disabled}), &.${l.error}.${l.focused}:not(.${l.disabled})`]: {
|
|
81
|
+
outline: `3px solid rgba(${(S.vars ?? S).palette.error.mainChannel} / 0.5)`,
|
|
82
|
+
borderColor: (S.vars ?? S).palette.error.main
|
|
83
|
+
},
|
|
84
|
+
[`&.${l.disabled}, &.${l.disabled} *`]: { color: (S.vars ?? S).palette.text.disabled },
|
|
85
|
+
[`&.${l.disabled}`]: { outline: "none" },
|
|
86
|
+
"&.MuiPickersInputBase-inputSizeSmall": {
|
|
87
|
+
height: S.spacing(4.5),
|
|
88
|
+
minHeight: S.spacing(4.5)
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"& .MuiPickersInputBase-sectionsContainer": {
|
|
92
|
+
alignItems: "center",
|
|
93
|
+
height: "100%",
|
|
94
|
+
p: "0 !important"
|
|
95
|
+
},
|
|
96
|
+
"& .MuiPickersOutlinedInput-notchedOutline": { border: "none !important" },
|
|
97
|
+
"& .MuiPickersInputBase-input::placeholder": {
|
|
98
|
+
opacity: 1,
|
|
99
|
+
color: (S.vars ?? S).palette.text.secondary
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
})
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
p.displayName = "SDateTimePicker";
|
|
107
|
+
//#endregion
|
|
108
|
+
export { p as SDateTimePicker, p as default };
|
package/dist/s-dialog/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SDialog as e } from "./s-dialog.js";
|
|
2
2
|
export { e as SDialog, e as default };
|
|
@@ -1,2 +1,80 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { styled as e, useThemeProps as t } from "@mui/material/styles";
|
|
2
|
+
import n from "@mui/material/IconButton";
|
|
3
|
+
import * as r from "react";
|
|
4
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
import o from "@mui/material/Typography";
|
|
6
|
+
import { mergeSlotProps as s } from "@mui/material/utils";
|
|
7
|
+
import c from "@mui/utils/appendOwnerState";
|
|
8
|
+
import l from "@mui/icons-material/Close";
|
|
9
|
+
import u from "@mui/material/Stack";
|
|
10
|
+
import d from "@mui/material/Dialog";
|
|
11
|
+
import f from "@mui/material/DialogActions";
|
|
12
|
+
import p from "@mui/material/DialogContent";
|
|
13
|
+
import m from "@mui/material/DialogTitle";
|
|
14
|
+
//#region lib/s-dialog/s-dialog.tsx
|
|
15
|
+
var h = e(d, {
|
|
16
|
+
name: "SDialog",
|
|
17
|
+
slot: "Root"
|
|
18
|
+
})({});
|
|
19
|
+
function g(e, t) {
|
|
20
|
+
return typeof e == "function" ? e(t) : e;
|
|
21
|
+
}
|
|
22
|
+
var _ = r.forwardRef(function(e, d) {
|
|
23
|
+
let _ = t({
|
|
24
|
+
props: e,
|
|
25
|
+
name: "SDialog"
|
|
26
|
+
}), { actions: v, "aria-labelledby": y, children: b, closeText: x = "Close dialog", disableTypography: S = !1, fullWidth: C = !0, maxWidth: w = "sm", onCloseButtonClick: T, open: E, showCloseButton: D, slotProps: O, slots: k, title: A, ...j } = _, M = r.useId(), N = A != null, P = {
|
|
27
|
+
..._,
|
|
28
|
+
hasActions: v != null,
|
|
29
|
+
hasTitle: N
|
|
30
|
+
}, F = D ?? T != null, { actions: I = f, closeButton: ee = n, content: L = p, title: R = m, titleContent: z = o, ...B } = k ?? {}, { actions: V, closeButton: H, content: U, title: W, titleContent: G, ...K } = O ?? {}, q = c(k?.actions, g(V, P) ?? {}, P), J = c(k?.closeButton, g(H, P) ?? {}, P), Y = c(k?.content, g(U, P) ?? {}, P), X = c(k?.title, g(W, P) ?? {}, P), Z = c(k?.titleContent, g(G, P) ?? {}, P), Q = s(J, { onClick: T }), $ = X.id ?? (N ? M : void 0), te = y ?? $;
|
|
31
|
+
return /* @__PURE__ */ a(h, {
|
|
32
|
+
...j,
|
|
33
|
+
ref: d,
|
|
34
|
+
"aria-labelledby": te,
|
|
35
|
+
fullWidth: C,
|
|
36
|
+
maxWidth: w,
|
|
37
|
+
onClose: _.onClose,
|
|
38
|
+
open: E,
|
|
39
|
+
ownerState: P,
|
|
40
|
+
slots: B,
|
|
41
|
+
slotProps: K,
|
|
42
|
+
children: [
|
|
43
|
+
(N || F) && /* @__PURE__ */ i(R, {
|
|
44
|
+
...X,
|
|
45
|
+
id: $,
|
|
46
|
+
children: /* @__PURE__ */ a(u, {
|
|
47
|
+
direction: "row",
|
|
48
|
+
spacing: 3,
|
|
49
|
+
sx: {
|
|
50
|
+
alignItems: "center",
|
|
51
|
+
justifyContent: N ? "space-between" : "flex-end"
|
|
52
|
+
},
|
|
53
|
+
children: [N && typeof A == "string" && !S ? /* @__PURE__ */ i(z, {
|
|
54
|
+
variant: "h5",
|
|
55
|
+
...Z,
|
|
56
|
+
children: A
|
|
57
|
+
}) : N && /* @__PURE__ */ i("div", { children: A }), F && /* @__PURE__ */ i(ee, {
|
|
58
|
+
"aria-label": x,
|
|
59
|
+
...Q,
|
|
60
|
+
children: /* @__PURE__ */ i(l, {})
|
|
61
|
+
})]
|
|
62
|
+
})
|
|
63
|
+
}),
|
|
64
|
+
b != null && /* @__PURE__ */ i(L, {
|
|
65
|
+
...Y,
|
|
66
|
+
children: typeof b == "string" ? /* @__PURE__ */ i(o, {
|
|
67
|
+
variant: "body1",
|
|
68
|
+
children: b
|
|
69
|
+
}) : b
|
|
70
|
+
}),
|
|
71
|
+
v != null && /* @__PURE__ */ i(I, {
|
|
72
|
+
...q,
|
|
73
|
+
children: v
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
_.displayName = "SDialog";
|
|
79
|
+
//#endregion
|
|
80
|
+
export { _ as SDialog, _ as default };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
1
|
+
import { SDialog as e } from "../s-dialog/s-dialog.js";
|
|
2
|
+
import { styled as t, useThemeProps as n } from "@mui/material/styles";
|
|
3
|
+
import * as r from "react";
|
|
4
|
+
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
import s from "@mui/utils/appendOwnerState";
|
|
6
|
+
import c from "@mui/material/Button";
|
|
8
7
|
//#region lib/s-dialog-confirm/s-dialog-confirm.tsx
|
|
9
|
-
var l = e
|
|
8
|
+
var l = t(e, {
|
|
10
9
|
name: "SDialogConfirm",
|
|
11
10
|
slot: "Root"
|
|
12
11
|
})({});
|
|
@@ -24,29 +23,29 @@ function f(e) {
|
|
|
24
23
|
function p(e) {
|
|
25
24
|
return "defaultPrevented" in e && e.defaultPrevented === !0;
|
|
26
25
|
}
|
|
27
|
-
var m =
|
|
28
|
-
let
|
|
26
|
+
var m = r.forwardRef(function(e, t) {
|
|
27
|
+
let r = n({
|
|
29
28
|
props: e,
|
|
30
29
|
name: "SDialogConfirm"
|
|
31
|
-
}), { cancelText: p = "Cancel", children: m, confirmText: h = "Confirm", loading: g = !1, onCancel: _, onCloseButtonClick: v, onConfirm: y, showCloseButton: b, slotProps: x, slots: S, title: C, ...w } =
|
|
32
|
-
...
|
|
30
|
+
}), { cancelText: p = "Cancel", children: m, confirmText: h = "Confirm", loading: g = !1, onCancel: _, onCloseButtonClick: v, onConfirm: y, showCloseButton: b, slotProps: x, slots: S, title: C, ...w } = r, T = {
|
|
31
|
+
...r,
|
|
33
32
|
loading: g
|
|
34
|
-
}, { cancelButton: E =
|
|
33
|
+
}, { cancelButton: E = c, confirmButton: D = c, ...O } = S ?? {}, { cancelButton: k, confirmButton: A, ...j } = x ?? {}, M = u(k, T), N = u(A, T), P = {
|
|
35
34
|
...M,
|
|
36
35
|
onClick: d(M?.onClick, _)
|
|
37
36
|
}, F = {
|
|
38
37
|
...N,
|
|
39
38
|
onClick: d(N?.onClick, y)
|
|
40
|
-
}, I =
|
|
41
|
-
return /* @__PURE__ */
|
|
39
|
+
}, I = s(S?.cancelButton, P, T), L = s(S?.confirmButton, F, T), R = g || !!I.disabled, z = g || !!L.disabled, B = g || !!L.loading, V = v ?? _, H = f(C), U = f(m);
|
|
40
|
+
return /* @__PURE__ */ a(l, {
|
|
42
41
|
...w,
|
|
43
|
-
ref:
|
|
44
|
-
actions: /* @__PURE__ */
|
|
42
|
+
ref: t,
|
|
43
|
+
actions: /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(E, {
|
|
45
44
|
variant: "outlined",
|
|
46
45
|
...I,
|
|
47
46
|
disabled: R,
|
|
48
47
|
children: p
|
|
49
|
-
}), /* @__PURE__ */
|
|
48
|
+
}), /* @__PURE__ */ a(D, {
|
|
50
49
|
...L,
|
|
51
50
|
disabled: z,
|
|
52
51
|
loading: B,
|
|
@@ -64,29 +63,29 @@ var m = a.forwardRef(function(e, i) {
|
|
|
64
63
|
});
|
|
65
64
|
});
|
|
66
65
|
m.displayName = "SDialogConfirm";
|
|
67
|
-
var h =
|
|
66
|
+
var h = r.createContext(null);
|
|
68
67
|
function g({ children: e }) {
|
|
69
|
-
let [t, n] =
|
|
70
|
-
n(null),
|
|
71
|
-
}, []), u =
|
|
72
|
-
|
|
73
|
-
}, []), d =
|
|
68
|
+
let [t, n] = r.useState(null), [i, s] = r.useState(!1), c = t != null, l = r.useCallback(() => {
|
|
69
|
+
n(null), s(!1);
|
|
70
|
+
}, []), u = r.useCallback((e) => {
|
|
71
|
+
s(!1), n(e);
|
|
72
|
+
}, []), d = r.useMemo(() => ({
|
|
74
73
|
closeConfirm: l,
|
|
75
|
-
loading:
|
|
76
|
-
open:
|
|
77
|
-
setLoading:
|
|
74
|
+
loading: i,
|
|
75
|
+
open: c,
|
|
76
|
+
setLoading: s,
|
|
78
77
|
showConfirm: u
|
|
79
78
|
}), [
|
|
80
79
|
l,
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
i,
|
|
81
|
+
c,
|
|
83
82
|
u
|
|
84
83
|
]);
|
|
85
|
-
return /* @__PURE__ */
|
|
84
|
+
return /* @__PURE__ */ o(h.Provider, {
|
|
86
85
|
value: d,
|
|
87
|
-
children: [t && /* @__PURE__ */
|
|
86
|
+
children: [t && /* @__PURE__ */ a(m, {
|
|
88
87
|
...t,
|
|
89
|
-
loading:
|
|
88
|
+
loading: i || t.loading,
|
|
90
89
|
open: !0,
|
|
91
90
|
onCancel: (e) => {
|
|
92
91
|
t.onCancel?.(e), e.defaultPrevented || l();
|
|
@@ -101,7 +100,7 @@ function g({ children: e }) {
|
|
|
101
100
|
});
|
|
102
101
|
}
|
|
103
102
|
function _() {
|
|
104
|
-
let e =
|
|
103
|
+
let e = r.useContext(h);
|
|
105
104
|
if (!e) throw Error("useDialogConfirm must be used within a DialogConfirmProvider");
|
|
106
105
|
return e;
|
|
107
106
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "../
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
1
|
+
import { resolveOwnerStateSlotProps as e } from "../utils/slots.js";
|
|
2
|
+
import { SDialog as t } from "../s-dialog/s-dialog.js";
|
|
3
|
+
import { styled as n, useThemeProps as r } from "@mui/material/styles";
|
|
4
|
+
import * as i from "react";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
import s from "@mui/utils/appendOwnerState";
|
|
7
|
+
import c from "@mui/material/Button";
|
|
9
8
|
//#region lib/s-dialog-message/s-dialog-message.tsx
|
|
10
|
-
var l =
|
|
9
|
+
var l = n(t, {
|
|
11
10
|
name: "SDialogMessage",
|
|
12
11
|
slot: "Root"
|
|
13
12
|
})({});
|
|
@@ -19,23 +18,23 @@ function u(e, t) {
|
|
|
19
18
|
function d(e) {
|
|
20
19
|
return "defaultPrevented" in e && e.defaultPrevented === !0;
|
|
21
20
|
}
|
|
22
|
-
var f =
|
|
23
|
-
let
|
|
24
|
-
props:
|
|
21
|
+
var f = i.forwardRef(function(t, n) {
|
|
22
|
+
let i = r({
|
|
23
|
+
props: t,
|
|
25
24
|
name: "SDialogMessage"
|
|
26
|
-
}), { children:
|
|
27
|
-
...
|
|
25
|
+
}), { children: o, okText: d = "OK", onCloseButtonClick: f, onOk: p, showCloseButton: m, slotProps: h, slots: g, ..._ } = i, { okButton: v = c, ...y } = g ?? {}, { okButton: b, ...x } = h ?? {}, S = m ?? f != null, C = {
|
|
26
|
+
...i,
|
|
28
27
|
okText: d,
|
|
29
28
|
showCloseButton: S
|
|
30
|
-
}, w =
|
|
29
|
+
}, w = e(b, C), T = {
|
|
31
30
|
...w,
|
|
32
31
|
onClick: u(w?.onClick, p)
|
|
33
|
-
}, E =
|
|
34
|
-
return /* @__PURE__ */
|
|
32
|
+
}, E = s(g?.okButton, T, C);
|
|
33
|
+
return /* @__PURE__ */ a(l, {
|
|
35
34
|
..._,
|
|
36
35
|
ownerState: C,
|
|
37
|
-
ref:
|
|
38
|
-
actions: /* @__PURE__ */
|
|
36
|
+
ref: n,
|
|
37
|
+
actions: /* @__PURE__ */ a(v, {
|
|
39
38
|
...E,
|
|
40
39
|
children: d
|
|
41
40
|
}),
|
|
@@ -45,40 +44,40 @@ var f = o.forwardRef(function(e, a) {
|
|
|
45
44
|
showCloseButton: S,
|
|
46
45
|
slots: y,
|
|
47
46
|
slotProps: x,
|
|
48
|
-
children:
|
|
47
|
+
children: o
|
|
49
48
|
});
|
|
50
49
|
});
|
|
51
50
|
f.displayName = "SDialogMessage";
|
|
52
|
-
var p =
|
|
51
|
+
var p = i.createContext(null);
|
|
53
52
|
function m({ children: e }) {
|
|
54
|
-
let [t, n] =
|
|
55
|
-
closeMessage:
|
|
53
|
+
let [t, n] = i.useState(null), r = t != null, s = i.useCallback(() => n(null), []), c = i.useCallback((e) => n(e), []), l = i.useMemo(() => ({
|
|
54
|
+
closeMessage: s,
|
|
56
55
|
open: r,
|
|
57
|
-
showMessage:
|
|
56
|
+
showMessage: c
|
|
58
57
|
}), [
|
|
59
|
-
|
|
58
|
+
s,
|
|
60
59
|
r,
|
|
61
|
-
|
|
60
|
+
c
|
|
62
61
|
]);
|
|
63
|
-
return /* @__PURE__ */
|
|
62
|
+
return /* @__PURE__ */ o(p.Provider, {
|
|
64
63
|
value: l,
|
|
65
|
-
children: [t && /* @__PURE__ */
|
|
64
|
+
children: [t && /* @__PURE__ */ a(f, {
|
|
66
65
|
...t,
|
|
67
66
|
open: !0,
|
|
68
67
|
onClose: (e, n) => {
|
|
69
|
-
t.onClose?.(e, n), d(e) ||
|
|
68
|
+
t.onClose?.(e, n), d(e) || s();
|
|
70
69
|
},
|
|
71
70
|
onCloseButtonClick: (e) => {
|
|
72
|
-
t.onCloseButtonClick?.(e), e.defaultPrevented ||
|
|
71
|
+
t.onCloseButtonClick?.(e), e.defaultPrevented || s();
|
|
73
72
|
},
|
|
74
73
|
onOk: (e) => {
|
|
75
|
-
t.onOk?.(e), e.defaultPrevented ||
|
|
74
|
+
t.onOk?.(e), e.defaultPrevented || s();
|
|
76
75
|
}
|
|
77
76
|
}), e]
|
|
78
77
|
});
|
|
79
78
|
}
|
|
80
79
|
function h() {
|
|
81
|
-
let e =
|
|
80
|
+
let e = i.useContext(p);
|
|
82
81
|
if (!e) throw Error("useDialogMessage must be used within a DialogMessageProvider");
|
|
83
82
|
return e;
|
|
84
83
|
}
|
package/dist/s-empty/s-empty.js
CHANGED
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
1
|
+
import { toSxArray as e } from "../utils/sx.js";
|
|
2
|
+
import { styled as t, useThemeProps as n } from "@mui/material/styles";
|
|
3
|
+
import * as r from "react";
|
|
4
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
5
|
+
import a from "@mui/material/Typography";
|
|
7
6
|
//#region lib/s-empty/s-empty.tsx
|
|
8
|
-
var o =
|
|
7
|
+
var o = t(a, {
|
|
9
8
|
name: "SEmpty",
|
|
10
9
|
slot: "Root"
|
|
11
|
-
})({}), s =
|
|
12
|
-
let
|
|
13
|
-
props:
|
|
10
|
+
})({}), s = r.forwardRef(function(t, r) {
|
|
11
|
+
let a = n({
|
|
12
|
+
props: t,
|
|
14
13
|
name: "SEmpty"
|
|
15
|
-
}), { children: s = "No data available.", sx: c, variant: l = "body1", ...u } =
|
|
16
|
-
...
|
|
14
|
+
}), { children: s = "No data available.", sx: c, variant: l = "body1", ...u } = a, d = {
|
|
15
|
+
...a,
|
|
17
16
|
children: s,
|
|
18
17
|
variant: l
|
|
19
18
|
};
|
|
20
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ i(o, {
|
|
21
20
|
...u,
|
|
22
21
|
ownerState: d,
|
|
23
22
|
ref: r,
|
|
24
23
|
variant: l,
|
|
25
|
-
sx: [{ my: 3 }, ...
|
|
24
|
+
sx: [{ my: 3 }, ...e(c)],
|
|
26
25
|
children: s
|
|
27
26
|
});
|
|
28
27
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SFileDropzone as e } from "./s-file-dropzone.js";
|
|
2
2
|
export { e as SFileDropzone, e as default };
|