@solostylist/ui-kit 1.0.228 → 1.0.230
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/{FormControl-BbzvApma.js → FormControl-DsRIRfTs.js} +204 -177
- package/dist/{MenuItem-CwAhn4sd.js → MenuItem-IOMcBScJ.js} +2 -2
- package/dist/{MenuList-5C2nFAWS.js → MenuList-vtqACjea.js} +1 -1
- package/dist/{Modal-Cu5Cgh-q.js → Modal-CLdC2-Th.js} +372 -395
- package/dist/Popover-ZneFWo2r.js +333 -0
- package/dist/{checkbox-B5GlJYcB.js → checkbox-DC-OoGvh.js} +1 -1
- package/dist/s-chat-message/index.js +1 -1
- package/dist/s-chat-message/s-chat-message.js +1 -1
- package/dist/{s-chat-message-B9JOBvzP.js → s-chat-message-C-d9amiC.js} +2 -2
- package/dist/s-code-block/index.js +1 -1
- package/dist/s-code-block/s-code-block.js +1 -1
- package/dist/{s-code-block-B5k-1Acd.js → s-code-block-DEojINTt.js} +16 -11
- package/dist/s-comment-message/index.js +1 -1
- package/dist/s-comment-message/s-comment-message.js +1 -1
- package/dist/{s-comment-message-BPE5a6p6.js → s-comment-message-Dum0P6de.js} +2 -2
- package/dist/s-data-table/index.js +1 -1
- package/dist/s-data-table/s-data-table.d.ts +1 -5
- package/dist/s-data-table/s-data-table.js +1 -1
- package/dist/{s-data-table-D-esZw_W.js → s-data-table-DfGYIIvn.js} +202 -172
- package/dist/s-date-picker/index.js +1 -1
- package/dist/s-date-picker/picker-action-bar.d.ts +3 -7
- package/dist/s-date-picker/picker-action-bar.js +33 -19
- package/dist/s-date-picker/s-date-picker.js +1 -1
- package/dist/{s-date-picker-CdH1pta6.js → s-date-picker-C06rlE6_.js} +1 -1
- package/dist/s-datetime-picker/index.js +1 -1
- package/dist/s-datetime-picker/s-datetime-picker.js +1 -1
- package/dist/{s-datetime-picker-BHkWSJKj.js → s-datetime-picker-DnIK-QnQ.js} +24 -24
- package/dist/s-error-layout/s-error-layout.d.ts +2 -2
- package/dist/s-error-layout/s-error-layout.js +1 -1
- package/dist/s-language-switcher/index.js +1 -1
- package/dist/s-language-switcher/s-language-switcher.d.ts +2 -5
- package/dist/s-language-switcher/s-language-switcher.js +1 -1
- package/dist/s-language-switcher-B96dUknj.js +192 -0
- package/dist/s-link/s-link.d.ts +2 -2
- package/dist/s-link/s-link.js +8 -5
- package/dist/s-moving-border/s-moving-border.d.ts +6 -9
- package/dist/s-moving-border/s-moving-border.js +73 -81
- package/dist/s-pagination/index.d.ts +1 -0
- package/dist/s-pagination/s-pagination.d.ts +43 -6
- package/dist/s-pagination/s-pagination.js +46 -28
- package/dist/s-pagination/types.d.ts +9 -0
- package/dist/s-pagination/types.js +27 -0
- package/dist/s-review/index.js +1 -1
- package/dist/s-review/s-review.js +1 -1
- package/dist/{s-review-CRnakHRo.js → s-review-CvTVBxTZ.js} +3 -3
- package/dist/s-skeleton/index.d.ts +1 -1
- package/dist/s-skeleton/s-skeleton.d.ts +25 -9
- package/dist/s-skeleton/s-skeleton.js +59 -63
- package/dist/s-text-editor/index.js +1 -1
- package/dist/s-text-editor/s-text-editor-toolbar.js +1 -1
- package/dist/s-text-editor/s-text-editor.js +1 -1
- package/dist/{s-text-editor-toolbar-BEFVwZ-B.js → s-text-editor-toolbar-ChtNCg2A.js} +900 -736
- package/dist/s-theme-demo/index.js +1 -1
- package/dist/s-theme-demo/s-theme-demo.js +1 -1
- package/dist/s-theme-demo-Bnv7lPIh.js +867 -0
- package/dist/theme/components/checkbox.d.ts +0 -9
- package/dist/theme/components/checkbox.js +1 -1
- package/dist/theme/components/components.js +94 -92
- package/dist/theme/components/pagination-item.d.ts +1077 -1015
- package/dist/theme/components/pagination-item.js +81 -6
- package/dist/theme/components/pagination.d.ts +14 -0
- package/dist/theme/components/pagination.js +5 -0
- package/dist/theme/components/pickers-calendar-header.d.ts +14 -1
- package/dist/theme/components/pickers-calendar-header.js +5 -2
- package/dist/{useMobilePicker-Dw1IxoE6.js → useMobilePicker-CQA6fYLQ.js} +384 -384
- package/package.json +1 -1
- package/dist/Menu-Ct_sL_Dg.js +0 -497
- package/dist/s-language-switcher-UgSBC_n_.js +0 -199
- package/dist/s-theme-demo-Fktc-UlY.js +0 -857
|
@@ -3,19 +3,37 @@ import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
|
3
3
|
import { Box as i } from "@mui/material";
|
|
4
4
|
import { motion as a, useAnimationFrame as o, useMotionTemplate as s, useMotionValue as c, useTransform as l } from "framer-motion";
|
|
5
5
|
//#region lib/s-moving-border/s-moving-border.tsx
|
|
6
|
-
var u = 250, d = (e, t) =>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
var u = 250, d = 24, f = Array.from({ length: d }, (e, t) => {
|
|
7
|
+
let n = t / (d - 1);
|
|
8
|
+
return {
|
|
9
|
+
scale: 1 - n * .76,
|
|
10
|
+
opacity: .006 + n * .044
|
|
11
|
+
};
|
|
12
|
+
}), p = ({ color: e, size: t }) => /* @__PURE__ */ n(i, {
|
|
13
|
+
sx: {
|
|
14
|
+
position: "absolute",
|
|
15
|
+
left: "50%",
|
|
16
|
+
top: "50%",
|
|
17
|
+
width: t,
|
|
18
|
+
height: t,
|
|
19
|
+
transform: "translate(-50%, -50%)",
|
|
20
|
+
pointerEvents: "none"
|
|
21
|
+
},
|
|
22
|
+
children: f.map(({ scale: r, opacity: a }) => {
|
|
23
|
+
let o = t * r, s = (t - o) / 2;
|
|
24
|
+
return /* @__PURE__ */ n(i, { sx: {
|
|
25
|
+
position: "absolute",
|
|
26
|
+
backgroundColor: e,
|
|
27
|
+
borderRadius: "50%",
|
|
28
|
+
height: o,
|
|
29
|
+
left: s,
|
|
30
|
+
opacity: a,
|
|
31
|
+
top: s,
|
|
32
|
+
width: o
|
|
33
|
+
} }, r);
|
|
34
|
+
})
|
|
17
35
|
});
|
|
18
|
-
function
|
|
36
|
+
function m({ children: i, duration: u, rx: d, ry: f, phase: p = 0 }) {
|
|
19
37
|
let m = e(null), h = c(0);
|
|
20
38
|
o((e) => {
|
|
21
39
|
let t = m.current?.getTotalLength();
|
|
@@ -53,73 +71,47 @@ function f({ children: i, duration: u, rx: d, ry: f, phase: p = 0 }) {
|
|
|
53
71
|
children: i
|
|
54
72
|
})] });
|
|
55
73
|
}
|
|
56
|
-
var
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
top: 0,
|
|
99
|
-
width: "100%",
|
|
100
|
-
height: "100%",
|
|
101
|
-
zIndex: 2
|
|
102
|
-
},
|
|
103
|
-
children: /* @__PURE__ */ n(i, {
|
|
104
|
-
ref: _,
|
|
105
|
-
sx: {
|
|
106
|
-
position: "absolute",
|
|
107
|
-
left: "50%",
|
|
108
|
-
top: "50%",
|
|
109
|
-
width: 120,
|
|
110
|
-
height: 120,
|
|
111
|
-
opacity: 0,
|
|
112
|
-
filter: "blur(16px)",
|
|
113
|
-
borderRadius: "50%",
|
|
114
|
-
transform: "translate(-50%, -50%)",
|
|
115
|
-
transition: "left 0.15s cubic-bezier(.4,2,.6,1), top 0.15s cubic-bezier(.4,2,.6,1), opacity 0.2s"
|
|
116
|
-
}
|
|
117
|
-
})
|
|
118
|
-
}),
|
|
119
|
-
s
|
|
120
|
-
]
|
|
121
|
-
});
|
|
122
|
-
};
|
|
123
|
-
p.displayName = "SMovingBorder";
|
|
74
|
+
var h = ({ borderRadius: e, className: t, duration: a = 6e3, children: o, glowColor: s = "var(--s-palette-primary-main)", glowSize: c = u, height: l, padding: d, width: f, ...h }) => /* @__PURE__ */ r(i, {
|
|
75
|
+
className: t,
|
|
76
|
+
...h,
|
|
77
|
+
sx: [{
|
|
78
|
+
position: "relative",
|
|
79
|
+
overflow: "hidden",
|
|
80
|
+
height: l ?? "100%",
|
|
81
|
+
width: f ?? "100%",
|
|
82
|
+
padding: d ?? .125,
|
|
83
|
+
borderRadius: e,
|
|
84
|
+
backgroundColor: "transparent"
|
|
85
|
+
}, ...Array.isArray(h.sx) ? h.sx : [h.sx]],
|
|
86
|
+
children: [/* @__PURE__ */ r(i, {
|
|
87
|
+
sx: {
|
|
88
|
+
position: "absolute",
|
|
89
|
+
top: 0,
|
|
90
|
+
left: 0,
|
|
91
|
+
right: 0,
|
|
92
|
+
bottom: 0
|
|
93
|
+
},
|
|
94
|
+
children: [/* @__PURE__ */ n(m, {
|
|
95
|
+
duration: a,
|
|
96
|
+
rx: "100%",
|
|
97
|
+
ry: "100%",
|
|
98
|
+
phase: 0,
|
|
99
|
+
children: /* @__PURE__ */ n(p, {
|
|
100
|
+
color: s,
|
|
101
|
+
size: c
|
|
102
|
+
})
|
|
103
|
+
}), /* @__PURE__ */ n(m, {
|
|
104
|
+
duration: a,
|
|
105
|
+
rx: "100%",
|
|
106
|
+
ry: "100%",
|
|
107
|
+
phase: .5,
|
|
108
|
+
children: /* @__PURE__ */ n(p, {
|
|
109
|
+
color: s,
|
|
110
|
+
size: c
|
|
111
|
+
})
|
|
112
|
+
})]
|
|
113
|
+
}), o]
|
|
114
|
+
});
|
|
115
|
+
h.displayName = "SMovingBorder";
|
|
124
116
|
//#endregion
|
|
125
|
-
export {
|
|
117
|
+
export { h as SMovingBorder, h as default };
|
|
@@ -1,16 +1,53 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { PaginationProps } from '@mui/material';
|
|
3
|
+
import { SPaginationColor, SPaginationSize } from './types';
|
|
4
|
+
export type { SPaginationColor, SPaginationSize } from './types';
|
|
3
5
|
/**
|
|
4
|
-
* Props for
|
|
6
|
+
* Props for SPagination. Web behavior is sourced from MUI Pagination; custom
|
|
7
|
+
* SoloStylist props stay local to the web package.
|
|
5
8
|
*/
|
|
6
|
-
export interface SPaginationProps extends PaginationProps {
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
/**
|
|
9
|
+
export interface SPaginationProps extends Omit<PaginationProps, 'color' | 'count' | 'shape' | 'size' | 'variant'> {
|
|
10
|
+
/** Accessible label for the complete pagination control. */
|
|
11
|
+
accessibilityLabel?: string;
|
|
12
|
+
/** Number of always-visible pages at the beginning and end. */
|
|
13
|
+
boundaryCount?: number;
|
|
14
|
+
/** Total number of pages. The component is hidden when count is 0 or less. */
|
|
10
15
|
count?: number;
|
|
16
|
+
/** Page selected initially when the component is uncontrolled. */
|
|
17
|
+
defaultPage?: number;
|
|
18
|
+
/** Whether the complete pagination control is disabled. */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/** Returns the accessible label for an item. */
|
|
21
|
+
getItemAriaLabel?: PaginationProps['getItemAriaLabel'];
|
|
22
|
+
/** Whether to hide the next-page button. */
|
|
23
|
+
hideNextButton?: boolean;
|
|
24
|
+
/** Whether to hide the previous-page button. */
|
|
25
|
+
hidePrevButton?: boolean;
|
|
26
|
+
/** Whether to show the pagination skeleton. */
|
|
27
|
+
loading?: boolean;
|
|
28
|
+
/** Callback fired when the page changes. */
|
|
29
|
+
onChange?: PaginationProps['onChange'];
|
|
30
|
+
/** Current page for controlled usage (1-indexed). */
|
|
31
|
+
page?: number;
|
|
32
|
+
/** Custom item renderer. */
|
|
33
|
+
renderItem?: PaginationProps['renderItem'];
|
|
34
|
+
/** Active-page color, using the same semantic palette as SButton. */
|
|
35
|
+
color?: SPaginationColor;
|
|
36
|
+
/** Shape of every pagination item. Defaults to the rounded SIconButton shape. */
|
|
37
|
+
shape?: 'circular' | 'rounded';
|
|
38
|
+
/** Whether to show the first-page button. */
|
|
39
|
+
showFirstButton?: boolean;
|
|
40
|
+
/** Whether to show the last-page button. */
|
|
41
|
+
showLastButton?: boolean;
|
|
42
|
+
/** Number of visible pages before and after the current page. */
|
|
43
|
+
siblingCount?: number;
|
|
44
|
+
/** Size of pagination items. */
|
|
45
|
+
size?: SPaginationSize;
|
|
46
|
+
/** Inactive-page visual variant. The active page always uses the contained SButton treatment. */
|
|
47
|
+
variant?: 'text' | 'outlined';
|
|
11
48
|
}
|
|
12
49
|
export declare const SPagination: {
|
|
13
|
-
({ loading, count, ...props }: SPaginationProps): React.JSX.Element;
|
|
50
|
+
({ loading, count, color, shape, size, variant, accessibilityLabel, sx, ...props }: SPaginationProps): React.JSX.Element;
|
|
14
51
|
displayName: string;
|
|
15
52
|
};
|
|
16
53
|
export default SPagination;
|
|
@@ -1,32 +1,50 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { paginationDimensions as e } from "./types.js";
|
|
2
|
+
import { SSkeleton as t } from "../s-skeleton/s-skeleton.js";
|
|
2
3
|
import "react";
|
|
3
|
-
import { Fragment as
|
|
4
|
-
import { Pagination as
|
|
4
|
+
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { Pagination as a, Stack as o } from "@mui/material";
|
|
5
6
|
//#region lib/s-pagination/s-pagination.tsx
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
7
|
+
var s = ({ size: n, style: a }) => {
|
|
8
|
+
let s = e[n];
|
|
9
|
+
return /* @__PURE__ */ i(o, {
|
|
10
|
+
direction: "row",
|
|
11
|
+
style: a,
|
|
12
|
+
sx: {
|
|
13
|
+
alignItems: "center",
|
|
14
|
+
display: "inline-flex",
|
|
15
|
+
gap: `${s.gap}px`
|
|
16
|
+
},
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ r(t, {
|
|
19
|
+
variant: "rounded",
|
|
20
|
+
width: s.item,
|
|
21
|
+
height: s.item
|
|
22
|
+
}),
|
|
23
|
+
/* @__PURE__ */ r(t, {
|
|
24
|
+
variant: "rounded",
|
|
25
|
+
width: s.bar,
|
|
26
|
+
height: s.item
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ r(t, {
|
|
29
|
+
variant: "rounded",
|
|
30
|
+
width: s.item,
|
|
31
|
+
height: s.item
|
|
32
|
+
})
|
|
33
|
+
]
|
|
28
34
|
});
|
|
29
|
-
}
|
|
30
|
-
|
|
35
|
+
}, c = ({ loading: e = !1, count: t = 0, color: i = "primary", shape: o = "rounded", size: c = "medium", variant: l = "text", accessibilityLabel: u = "pagination navigation", sx: d, ...f }) => t <= 0 ? /* @__PURE__ */ r(n, {}) : e ? /* @__PURE__ */ r(s, {
|
|
36
|
+
size: c,
|
|
37
|
+
style: f.style
|
|
38
|
+
}) : /* @__PURE__ */ r(a, {
|
|
39
|
+
count: t,
|
|
40
|
+
"aria-label": u,
|
|
41
|
+
color: i,
|
|
42
|
+
shape: o,
|
|
43
|
+
size: c,
|
|
44
|
+
variant: l,
|
|
45
|
+
sx: d,
|
|
46
|
+
...f
|
|
47
|
+
});
|
|
48
|
+
c.displayName = "SPagination";
|
|
31
49
|
//#endregion
|
|
32
|
-
export {
|
|
50
|
+
export { c as SPagination, c as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PaginationProps } from '@mui/material';
|
|
2
|
+
export type SPaginationSize = NonNullable<PaginationProps['size']>;
|
|
3
|
+
export type SPaginationColor = 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning';
|
|
4
|
+
export declare const paginationColors: readonly ["primary", "secondary", "success", "error", "info", "warning"];
|
|
5
|
+
export declare const paginationDimensions: Record<SPaginationSize, {
|
|
6
|
+
item: number;
|
|
7
|
+
gap: number;
|
|
8
|
+
bar: number;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region lib/s-pagination/types.ts
|
|
2
|
+
var e = [
|
|
3
|
+
"primary",
|
|
4
|
+
"secondary",
|
|
5
|
+
"success",
|
|
6
|
+
"error",
|
|
7
|
+
"info",
|
|
8
|
+
"warning"
|
|
9
|
+
], t = {
|
|
10
|
+
small: {
|
|
11
|
+
item: 26,
|
|
12
|
+
gap: 2,
|
|
13
|
+
bar: 90
|
|
14
|
+
},
|
|
15
|
+
medium: {
|
|
16
|
+
item: 32,
|
|
17
|
+
gap: 6,
|
|
18
|
+
bar: 120
|
|
19
|
+
},
|
|
20
|
+
large: {
|
|
21
|
+
item: 40,
|
|
22
|
+
gap: 6,
|
|
23
|
+
bar: 150
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { e as paginationColors, t as paginationDimensions };
|
package/dist/s-review/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../s-review-
|
|
1
|
+
import { t as e } from "../s-review-CvTVBxTZ.js";
|
|
2
2
|
export { e as SReview, e as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../s-review-
|
|
1
|
+
import { t as e } from "../s-review-CvTVBxTZ.js";
|
|
2
2
|
export { e as SReview, e as default };
|
|
@@ -39,7 +39,7 @@ var _ = t(/* @__PURE__ */ u("path", { d: "M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02
|
|
|
39
39
|
spacing: 2,
|
|
40
40
|
sx: { alignItems: "flex-start" },
|
|
41
41
|
children: [/* @__PURE__ */ u(i, {
|
|
42
|
-
|
|
42
|
+
variant: "circular",
|
|
43
43
|
width: A,
|
|
44
44
|
height: A
|
|
45
45
|
}), /* @__PURE__ */ d(f, {
|
|
@@ -84,12 +84,12 @@ var _ = t(/* @__PURE__ */ u("path", { d: "M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02
|
|
|
84
84
|
height: 16,
|
|
85
85
|
sx: { mr: 2 }
|
|
86
86
|
}),
|
|
87
|
-
/* @__PURE__ */ u(i, {
|
|
87
|
+
/* @__PURE__ */ u(i, { preset: "icon-button" }),
|
|
88
88
|
/* @__PURE__ */ u(i, {
|
|
89
89
|
width: 20,
|
|
90
90
|
height: 16
|
|
91
91
|
}),
|
|
92
|
-
/* @__PURE__ */ u(i, {
|
|
92
|
+
/* @__PURE__ */ u(i, { preset: "icon-button" }),
|
|
93
93
|
/* @__PURE__ */ u(i, {
|
|
94
94
|
width: 20,
|
|
95
95
|
height: 16
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default, default as SSkeleton } from './s-skeleton';
|
|
2
|
-
export type { SSkeletonProps } from './s-skeleton';
|
|
2
|
+
export type { SSkeletonAnimation, SSkeletonCustomProps, SSkeletonPreset, SSkeletonPresetProps, SSkeletonProps, SSkeletonVariant, } from './s-skeleton';
|
|
@@ -1,22 +1,38 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { SkeletonProps } from '@mui/material';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
export type SSkeletonVariant = 'circular' | 'rectangular' | 'rounded' | 'text';
|
|
4
|
+
export type SSkeletonPreset = 'avatar' | 'button' | 'checkbox' | 'icon-button';
|
|
5
|
+
export type SSkeletonAnimation = 'pulse' | 'wave' | false;
|
|
6
|
+
type SSkeletonBaseProps = Omit<SkeletonProps, 'animation' | 'component' | 'height' | 'variant' | 'width'> & {
|
|
7
|
+
/** Loading animation. Set to false to disable animation. */
|
|
8
|
+
animation?: SSkeletonAnimation;
|
|
9
|
+
};
|
|
10
|
+
export type SSkeletonCustomProps = SSkeletonBaseProps & {
|
|
11
|
+
/** Pre-defined skeleton preset. Cannot be combined with custom shape/size props. */
|
|
12
|
+
preset?: never;
|
|
7
13
|
/** Visual variant of the skeleton */
|
|
8
|
-
variant?:
|
|
14
|
+
variant?: SSkeletonVariant;
|
|
9
15
|
/** Height of the skeleton (number for px, string for CSS units) */
|
|
10
16
|
height?: number | string;
|
|
11
17
|
/** Width of the skeleton (number for px, string for CSS units) */
|
|
12
18
|
width?: number | string;
|
|
13
19
|
/** Font size for text variant skeletons */
|
|
14
20
|
fontSize?: number | string;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
};
|
|
22
|
+
export type SSkeletonPresetProps = SSkeletonBaseProps & {
|
|
23
|
+
/** Pre-defined skeleton preset for common UI elements */
|
|
24
|
+
preset: SSkeletonPreset;
|
|
25
|
+
variant?: never;
|
|
26
|
+
height?: never;
|
|
27
|
+
width?: never;
|
|
28
|
+
fontSize?: never;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Props interface for SSkeleton component
|
|
32
|
+
*/
|
|
33
|
+
export type SSkeletonProps = SSkeletonCustomProps | SSkeletonPresetProps;
|
|
18
34
|
export declare const SSkeleton: {
|
|
19
|
-
(
|
|
35
|
+
(props: SSkeletonProps): React.JSX.Element;
|
|
20
36
|
displayName: string;
|
|
21
37
|
};
|
|
22
38
|
export default SSkeleton;
|
|
@@ -1,70 +1,66 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import { Skeleton as t } from "@mui/material";
|
|
3
|
+
import { Skeleton as t, useTheme as n } from "@mui/material";
|
|
4
4
|
//#region lib/s-skeleton/s-skeleton.tsx
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
...s
|
|
54
|
-
});
|
|
55
|
-
default: return n === "text" ? /* @__PURE__ */ e(t, {
|
|
56
|
-
sx: { fontSize: a },
|
|
57
|
-
variant: n,
|
|
58
|
-
width: r,
|
|
59
|
-
...s
|
|
60
|
-
}) : /* @__PURE__ */ e(t, {
|
|
61
|
-
height: i,
|
|
62
|
-
variant: n,
|
|
63
|
-
width: r,
|
|
64
|
-
...s
|
|
5
|
+
var r = {
|
|
6
|
+
avatar: {
|
|
7
|
+
height: 40,
|
|
8
|
+
variant: "circular",
|
|
9
|
+
width: 40
|
|
10
|
+
},
|
|
11
|
+
button: {
|
|
12
|
+
height: 40,
|
|
13
|
+
variant: "rounded",
|
|
14
|
+
width: 100
|
|
15
|
+
},
|
|
16
|
+
checkbox: {
|
|
17
|
+
borderRadius: "sm",
|
|
18
|
+
height: 20,
|
|
19
|
+
variant: "rounded",
|
|
20
|
+
width: 20
|
|
21
|
+
},
|
|
22
|
+
"icon-button": {
|
|
23
|
+
height: 32,
|
|
24
|
+
variant: "rounded",
|
|
25
|
+
width: 32
|
|
26
|
+
}
|
|
27
|
+
}, i = ({ fontSize: n = "16px", height: r, presetBorderRadius: i, style: a, variant: o, width: s, ...c }) => {
|
|
28
|
+
let l = i === void 0 ? a : {
|
|
29
|
+
...a,
|
|
30
|
+
borderRadius: i
|
|
31
|
+
};
|
|
32
|
+
return o === "text" ? /* @__PURE__ */ e(t, {
|
|
33
|
+
style: l,
|
|
34
|
+
sx: { fontSize: n },
|
|
35
|
+
variant: o,
|
|
36
|
+
width: s,
|
|
37
|
+
...c
|
|
38
|
+
}) : /* @__PURE__ */ e(t, {
|
|
39
|
+
height: r,
|
|
40
|
+
style: l,
|
|
41
|
+
variant: o,
|
|
42
|
+
width: s,
|
|
43
|
+
...c
|
|
44
|
+
});
|
|
45
|
+
}, a = (e) => {
|
|
46
|
+
let t = n();
|
|
47
|
+
if (e.preset) {
|
|
48
|
+
let { preset: n, ...a } = e, { borderRadius: o, ...s } = r[n];
|
|
49
|
+
return i({
|
|
50
|
+
...a,
|
|
51
|
+
...s,
|
|
52
|
+
presetBorderRadius: o ? t.radius[o] : void 0
|
|
65
53
|
});
|
|
66
54
|
}
|
|
55
|
+
let { fontSize: a = "16px", height: o = 32, variant: s = "text", width: c = "100%", ...l } = e;
|
|
56
|
+
return i({
|
|
57
|
+
...l,
|
|
58
|
+
fontSize: a,
|
|
59
|
+
height: o,
|
|
60
|
+
variant: s,
|
|
61
|
+
width: c
|
|
62
|
+
});
|
|
67
63
|
};
|
|
68
|
-
|
|
64
|
+
a.displayName = "SSkeleton";
|
|
69
65
|
//#endregion
|
|
70
|
-
export {
|
|
66
|
+
export { a as SSkeleton, a as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../s-text-editor-toolbar-
|
|
1
|
+
import { t as e } from "../s-text-editor-toolbar-ChtNCg2A.js";
|
|
2
2
|
export { e as STextEditorToolbar };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { tint as e } from "../theme/utils.js";
|
|
2
2
|
import { t } from "../Box-BlmynALm.js";
|
|
3
|
-
import { t as n } from "../s-text-editor-toolbar-
|
|
3
|
+
import { t as n } from "../s-text-editor-toolbar-ChtNCg2A.js";
|
|
4
4
|
import * as r from "react";
|
|
5
5
|
import { forwardRef as i } from "react";
|
|
6
6
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|