@solostylist/ui-kit 1.0.228 → 1.0.229

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.
Files changed (61) hide show
  1. package/dist/{FormControl-BbzvApma.js → FormControl-DsRIRfTs.js} +204 -177
  2. package/dist/{MenuItem-CwAhn4sd.js → MenuItem-IOMcBScJ.js} +2 -2
  3. package/dist/{MenuList-5C2nFAWS.js → MenuList-vtqACjea.js} +1 -1
  4. package/dist/{Modal-Cu5Cgh-q.js → Modal-CLdC2-Th.js} +372 -395
  5. package/dist/Popover-ZneFWo2r.js +333 -0
  6. package/dist/{checkbox-B5GlJYcB.js → checkbox-DC-OoGvh.js} +1 -1
  7. package/dist/s-chat-message/index.js +1 -1
  8. package/dist/s-chat-message/s-chat-message.js +1 -1
  9. package/dist/{s-chat-message-B9JOBvzP.js → s-chat-message-C-d9amiC.js} +2 -2
  10. package/dist/s-code-block/index.js +1 -1
  11. package/dist/s-code-block/s-code-block.js +1 -1
  12. package/dist/{s-code-block-B5k-1Acd.js → s-code-block-DEojINTt.js} +16 -11
  13. package/dist/s-comment-message/index.js +1 -1
  14. package/dist/s-comment-message/s-comment-message.js +1 -1
  15. package/dist/{s-comment-message-BPE5a6p6.js → s-comment-message-Dum0P6de.js} +2 -2
  16. package/dist/s-data-table/index.js +1 -1
  17. package/dist/s-data-table/s-data-table.d.ts +1 -5
  18. package/dist/s-data-table/s-data-table.js +1 -1
  19. package/dist/{s-data-table-D-esZw_W.js → s-data-table-DfGYIIvn.js} +202 -172
  20. package/dist/s-date-picker/index.js +1 -1
  21. package/dist/s-date-picker/picker-action-bar.d.ts +3 -7
  22. package/dist/s-date-picker/picker-action-bar.js +33 -19
  23. package/dist/s-date-picker/s-date-picker.js +1 -1
  24. package/dist/{s-date-picker-CdH1pta6.js → s-date-picker-C06rlE6_.js} +1 -1
  25. package/dist/s-datetime-picker/index.js +1 -1
  26. package/dist/s-datetime-picker/s-datetime-picker.js +1 -1
  27. package/dist/{s-datetime-picker-BHkWSJKj.js → s-datetime-picker-DnIK-QnQ.js} +24 -24
  28. package/dist/s-error-layout/s-error-layout.d.ts +2 -2
  29. package/dist/s-error-layout/s-error-layout.js +1 -1
  30. package/dist/s-language-switcher/index.js +1 -1
  31. package/dist/s-language-switcher/s-language-switcher.d.ts +2 -5
  32. package/dist/s-language-switcher/s-language-switcher.js +1 -1
  33. package/dist/s-language-switcher-B96dUknj.js +192 -0
  34. package/dist/s-link/s-link.d.ts +2 -2
  35. package/dist/s-link/s-link.js +8 -5
  36. package/dist/s-moving-border/s-moving-border.d.ts +6 -9
  37. package/dist/s-moving-border/s-moving-border.js +73 -81
  38. package/dist/s-pagination/s-pagination.js +2 -2
  39. package/dist/s-review/index.js +1 -1
  40. package/dist/s-review/s-review.js +1 -1
  41. package/dist/{s-review-CRnakHRo.js → s-review-CvTVBxTZ.js} +3 -3
  42. package/dist/s-skeleton/index.d.ts +1 -1
  43. package/dist/s-skeleton/s-skeleton.d.ts +25 -9
  44. package/dist/s-skeleton/s-skeleton.js +59 -63
  45. package/dist/s-text-editor/index.js +1 -1
  46. package/dist/s-text-editor/s-text-editor-toolbar.js +1 -1
  47. package/dist/s-text-editor/s-text-editor.js +1 -1
  48. package/dist/{s-text-editor-toolbar-BEFVwZ-B.js → s-text-editor-toolbar-ChtNCg2A.js} +900 -736
  49. package/dist/s-theme-demo/index.js +1 -1
  50. package/dist/s-theme-demo/s-theme-demo.js +1 -1
  51. package/dist/s-theme-demo-Bnv7lPIh.js +867 -0
  52. package/dist/theme/components/checkbox.d.ts +0 -9
  53. package/dist/theme/components/checkbox.js +1 -1
  54. package/dist/theme/components/components.js +1 -1
  55. package/dist/theme/components/pickers-calendar-header.d.ts +14 -1
  56. package/dist/theme/components/pickers-calendar-header.js +5 -2
  57. package/dist/{useMobilePicker-Dw1IxoE6.js → useMobilePicker-CQA6fYLQ.js} +384 -384
  58. package/package.json +1 -1
  59. package/dist/Menu-Ct_sL_Dg.js +0 -497
  60. package/dist/s-language-switcher-UgSBC_n_.js +0 -199
  61. 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
- position: "absolute",
8
- left: "50%",
9
- top: "50%",
10
- width: `${e}px`,
11
- height: `${e}px`,
12
- transform: "translate(-50%, -50%)",
13
- opacity: .5,
14
- background: `radial-gradient(${t} 40%, transparent 60%)`,
15
- filter: "blur(12px)",
16
- pointerEvents: "none"
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 f({ children: i, duration: u, rx: d, ry: f, phase: p = 0 }) {
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 p = ({ borderRadius: t, className: a, duration: o = 6e3, children: s, glowColor: c = "var(--s-palette-primary-main)", glowSize: l = u, height: p, padding: m, width: h, ...g }) => {
57
- let _ = e(null);
58
- return /* @__PURE__ */ r(i, {
59
- className: a,
60
- ...g,
61
- sx: [{
62
- position: "relative",
63
- overflow: "hidden",
64
- height: p ?? "100%",
65
- width: h ?? "100%",
66
- padding: m ?? .125,
67
- borderRadius: t,
68
- backgroundColor: "transparent"
69
- }, ...Array.isArray(g.sx) ? g.sx : [g.sx]],
70
- children: [
71
- /* @__PURE__ */ r(i, {
72
- sx: {
73
- position: "absolute",
74
- top: 0,
75
- left: 0,
76
- right: 0,
77
- bottom: 0
78
- },
79
- children: [/* @__PURE__ */ n(f, {
80
- duration: o,
81
- rx: "100%",
82
- ry: "100%",
83
- phase: 0,
84
- children: /* @__PURE__ */ n(i, { sx: d(l, c) })
85
- }), /* @__PURE__ */ n(f, {
86
- duration: o,
87
- rx: "100%",
88
- ry: "100%",
89
- phase: .5,
90
- children: /* @__PURE__ */ n(i, { sx: d(l, c) })
91
- })]
92
- }),
93
- /* @__PURE__ */ n(i, {
94
- sx: {
95
- position: "absolute",
96
- pointerEvents: "none",
97
- left: 0,
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 { p as SMovingBorder, p as default };
117
+ export { h as SMovingBorder, h as default };
@@ -12,12 +12,12 @@ var c = ({ style: t }) => /* @__PURE__ */ r(a, {
12
12
  gap: 1
13
13
  },
14
14
  children: [
15
- /* @__PURE__ */ n(e, { component: "icon-button" }),
15
+ /* @__PURE__ */ n(e, { preset: "icon-button" }),
16
16
  /* @__PURE__ */ n(e, {
17
17
  variant: "rounded",
18
18
  width: 120
19
19
  }),
20
- /* @__PURE__ */ n(e, { component: "icon-button" })
20
+ /* @__PURE__ */ n(e, { preset: "icon-button" })
21
21
  ]
22
22
  }), l = ({ loading: e, count: r = 0, ...a }) => {
23
23
  let l = o(s().breakpoints.down("sm"));
@@ -1,2 +1,2 @@
1
- import { t as e } from "../s-review-CRnakHRo.js";
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-CRnakHRo.js";
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
- component: "rounded-avatar",
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, { component: "icon-button" }),
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, { component: "icon-button" }),
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
- * Props interface for SSkeleton component
5
- */
6
- export interface SSkeletonProps extends Omit<SkeletonProps, 'variant' | 'height' | 'width' | 'component'> {
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?: 'circular' | 'rectangular' | 'rounded' | 'text';
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
- /** Pre-defined component preset for common UI elements */
16
- component?: 'button' | 'checkbox' | 'radio-button' | 'avatar' | 'rounded-avatar' | 'icon-button' | 'typography' | 'title-typography';
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
- ({ variant, width, height, fontSize, component, ...props }: SSkeletonProps): React.JSX.Element;
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 n = ({ variant: n = "text", width: r = "100%", height: i = 32, fontSize: a = "16px", component: o, ...s }) => {
6
- switch (o) {
7
- case "button": return /* @__PURE__ */ e(t, {
8
- height: 32,
9
- variant: "rounded",
10
- width: r,
11
- ...s
12
- });
13
- case "checkbox": return /* @__PURE__ */ e(t, {
14
- height: 24,
15
- variant: "rounded",
16
- width: 24,
17
- ...s
18
- });
19
- case "radio-button": return /* @__PURE__ */ e(t, {
20
- height: 24,
21
- variant: "circular",
22
- width: 24,
23
- ...s
24
- });
25
- case "avatar": return /* @__PURE__ */ e(t, {
26
- height: 54,
27
- variant: "rectangular",
28
- width: 54,
29
- ...s
30
- });
31
- case "rounded-avatar": return /* @__PURE__ */ e(t, {
32
- height: 48,
33
- variant: "circular",
34
- width: 48,
35
- ...s
36
- });
37
- case "icon-button": return /* @__PURE__ */ e(t, {
38
- height: 32,
39
- variant: "circular",
40
- width: 32,
41
- ...s
42
- });
43
- case "typography": return /* @__PURE__ */ e(t, {
44
- sx: { fontSize: a },
45
- variant: "text",
46
- width: "100%",
47
- ...s
48
- });
49
- case "title-typography": return /* @__PURE__ */ e(t, {
50
- sx: { fontSize: a },
51
- variant: "text",
52
- width: 200,
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
- n.displayName = "SSkeleton";
64
+ a.displayName = "SSkeleton";
69
65
  //#endregion
70
- export { n as SSkeleton, n as default };
66
+ export { a as SSkeleton, a as default };
@@ -1,3 +1,3 @@
1
- import { t as e } from "../s-text-editor-toolbar-BEFVwZ-B.js";
1
+ import { t as e } from "../s-text-editor-toolbar-ChtNCg2A.js";
2
2
  import { STextEditor as t } from "./s-text-editor.js";
3
3
  export { t as STextEditor, t as default, e as STextEditorToolbar };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../s-text-editor-toolbar-BEFVwZ-B.js";
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-BEFVwZ-B.js";
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";