@solostylist/ui-kit 1.0.25 → 1.0.26

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.
@@ -1,16 +1,16 @@
1
1
  import { j as e } from "../jsx-runtime-C5mzlN2N.js";
2
2
  import { Avatar as E, Tooltip as w, IconButton as M, Button as Z } from "@mui/material";
3
- import t, { forwardRef as S } from "react";
4
- import { E as V } from "../SSRBase-BSdFRe_j.js";
5
- import { S as z } from "../X-B8GTZwii.js";
6
- import { useDropzone as F } from "react-dropzone";
3
+ import t, { forwardRef as V } from "react";
4
+ import { E as S } from "../SSRBase-BSdFRe_j.js";
5
+ import { S as F } from "../X-B8GTZwii.js";
6
+ import { useDropzone as O } from "react-dropzone";
7
7
  import I from "../s-file-icon/s-file-icon.js";
8
- import O from "../s-form/s-form.js";
9
- import { bytesToSize as C } from "../utils/bytes-to-size.js";
8
+ import C from "../s-form/s-form.js";
9
+ import { bytesToSize as H } from "../utils/bytes-to-size.js";
10
10
  import { S as n } from "../Stack-CyNMyetl.js";
11
- import { B as u } from "../Box-CafvePOg.js";
12
- import { T as i } from "../Typography-BXLku1B0.js";
13
- const H = /* @__PURE__ */ new Map([
11
+ import { B as x } from "../Box-CafvePOg.js";
12
+ import { T as s } from "../Typography-BXLku1B0.js";
13
+ const P = /* @__PURE__ */ new Map([
14
14
  [
15
15
  "bold",
16
16
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M196.49,151.51a12,12,0,0,1-17,17L168,157v51a12,12,0,0,1-24,0V157l-11.51,11.52a12,12,0,1,1-17-17l32-32a12,12,0,0,1,17,0ZM160,36A92.08,92.08,0,0,0,79,84.37,68,68,0,1,0,72,220h28a12,12,0,0,0,0-24H72a44,44,0,0,1-1.81-87.95A91.7,91.7,0,0,0,68,128a12,12,0,0,0,24,0,68,68,0,1,1,132.6,21.29,12,12,0,1,0,22.8,7.51A92.06,92.06,0,0,0,160,36Z" }))
@@ -42,15 +42,15 @@ const H = /* @__PURE__ */ new Map([
42
42
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M186.83,162.83a4,4,0,0,1-5.66,0L156,137.66V208a4,4,0,0,1-8,0V137.66l-25.17,25.17a4,4,0,0,1-5.66-5.66l32-32a4,4,0,0,1,5.66,0l32,32A4,4,0,0,1,186.83,162.83ZM160,44A84.09,84.09,0,0,0,83.61,93.13,60,60,0,1,0,72,212h40a4,4,0,0,0,0-8H72a52,52,0,1,1,8.57-103.27A83.45,83.45,0,0,0,76,128a4,4,0,0,0,8,0,76,76,0,1,1,106.4,69.68,4,4,0,0,0,1.6,7.66,3.92,3.92,0,0,0,1.6-.33A84,84,0,0,0,160,44Z" }))
43
43
  ]
44
44
  ]);
45
- var P = Object.defineProperty, k = Object.defineProperties, D = Object.getOwnPropertyDescriptors, x = Object.getOwnPropertySymbols, B = Object.prototype.hasOwnProperty, L = Object.prototype.propertyIsEnumerable, h = (r, a, l) => a in r ? P(r, a, { enumerable: !0, configurable: !0, writable: !0, value: l }) : r[a] = l, R = (r, a) => {
45
+ var z = Object.defineProperty, k = Object.defineProperties, D = Object.getOwnPropertyDescriptors, h = Object.getOwnPropertySymbols, B = Object.prototype.hasOwnProperty, L = Object.prototype.propertyIsEnumerable, u = (r, a, l) => a in r ? z(r, a, { enumerable: !0, configurable: !0, writable: !0, value: l }) : r[a] = l, R = (r, a) => {
46
46
  for (var l in a || (a = {}))
47
- B.call(a, l) && h(r, l, a[l]);
48
- if (x)
49
- for (var l of x(a))
50
- L.call(a, l) && h(r, l, a[l]);
47
+ B.call(a, l) && u(r, l, a[l]);
48
+ if (h)
49
+ for (var l of h(a))
50
+ L.call(a, l) && u(r, l, a[l]);
51
51
  return r;
52
52
  }, T = (r, a) => k(r, D(a));
53
- const f = S((r, a) => /* @__PURE__ */ t.createElement(V, T(R({ ref: a }, r), { weights: H })));
53
+ const f = V((r, a) => /* @__PURE__ */ t.createElement(S, T(R({ ref: a }, r), { weights: P })));
54
54
  f.displayName = "CloudArrowUp";
55
55
  const a0 = ({
56
56
  caption: r,
@@ -58,21 +58,21 @@ const a0 = ({
58
58
  error: l,
59
59
  onRemoveAll: g,
60
60
  onUpload: U,
61
- onRemove: s,
61
+ onRemove: i,
62
62
  required: j = !1,
63
63
  disabledUpload: _ = !1,
64
- isShowBtnRemoveAll: v = !1,
64
+ isShowBtnRemoveAll: b = !1,
65
65
  ...c
66
66
  }) => {
67
- var m, d;
68
- const { getRootProps: A, getInputProps: b, isDragActive: p } = F(c);
69
- return /* @__PURE__ */ e.jsxs(O, { error: l, label: a, required: j, children: [
67
+ var d, m;
68
+ const { getRootProps: A, getInputProps: v, isDragActive: p } = O(c);
69
+ return /* @__PURE__ */ e.jsxs(C, { error: l, label: a, required: j, children: [
70
70
  /* @__PURE__ */ e.jsx(n, { spacing: 2, mt: "0.5rem", children: /* @__PURE__ */ e.jsxs(
71
- u,
71
+ x,
72
72
  {
73
73
  sx: {
74
74
  alignItems: "center",
75
- border: "1px dashed var(--mui-palette-divider)",
75
+ border: "1px dashed var(--s-palette-divider)",
76
76
  borderRadius: 1,
77
77
  cursor: "pointer",
78
78
  display: "flex",
@@ -81,46 +81,44 @@ const a0 = ({
81
81
  outline: "none",
82
82
  p: 6,
83
83
  ...p && {
84
- bgcolor: "var(--mui-palette-action-selected)",
84
+ bgcolor: "var(--s-palette-action-selected)",
85
85
  opacity: 0.5
86
86
  },
87
87
  "&:hover": {
88
88
  ...!p && {
89
- bgcolor: "var(--mui-palette-action-hover)"
89
+ bgcolor: "var(--s-palette-action-hover)"
90
90
  }
91
91
  }
92
92
  },
93
93
  ...A(),
94
94
  children: [
95
- /* @__PURE__ */ e.jsx("input", { ...b() }),
95
+ /* @__PURE__ */ e.jsx("input", { ...v() }),
96
96
  /* @__PURE__ */ e.jsxs(n, { direction: "row", spacing: 2, sx: { alignItems: "center" }, children: [
97
97
  /* @__PURE__ */ e.jsx(
98
98
  E,
99
99
  {
100
100
  sx: {
101
- "--Avatar-size": "64px",
102
- "--Icon-fontSize": "var(--icon-fontSize-lg)",
103
- bgcolor: "var(--mui-palette-background-paper)",
104
- boxShadow: "var(--mui-shadows-8)",
105
- color: "var(--mui-palette-text-primary)"
101
+ bgcolor: "var(--s-palette-background-paper)",
102
+ boxShadow: "var(--s-shadows-8)",
103
+ color: "var(--s-palette-text-primary)"
106
104
  },
107
105
  children: /* @__PURE__ */ e.jsx(f, {})
108
106
  }
109
107
  ),
110
108
  /* @__PURE__ */ e.jsxs(n, { spacing: 1, children: [
111
- /* @__PURE__ */ e.jsxs(i, { variant: "h6", children: [
112
- /* @__PURE__ */ e.jsx(i, { component: "span", sx: { textDecoration: "underline" }, variant: "inherit", children: "Click to upload" }),
109
+ /* @__PURE__ */ e.jsxs(s, { variant: "h6", children: [
110
+ /* @__PURE__ */ e.jsx(s, { component: "span", sx: { textDecoration: "underline" }, variant: "inherit", children: "Click to upload" }),
113
111
  " ",
114
112
  "or drag and drop your files here"
115
113
  ] }),
116
- r ? /* @__PURE__ */ e.jsx(i, { color: "text.secondary", variant: "body2", children: r }) : null
114
+ r ? /* @__PURE__ */ e.jsx(s, { color: "text.secondary", variant: "body2", children: r }) : null
117
115
  ] })
118
116
  ] })
119
117
  ]
120
118
  }
121
119
  ) }),
122
- (m = c.files) != null && m.length ? /* @__PURE__ */ e.jsxs(n, { mt: 2, spacing: 2, children: [
123
- /* @__PURE__ */ e.jsx(n, { component: "ul", spacing: 1, sx: { listStyle: "none", m: 0, p: 0 }, children: (d = c.files) == null ? void 0 : d.map((o) => {
120
+ (d = c.files) != null && d.length ? /* @__PURE__ */ e.jsxs(n, { mt: 2, spacing: 2, children: [
121
+ /* @__PURE__ */ e.jsx(n, { component: "ul", spacing: 1, sx: { listStyle: "none", m: 0, p: 0 }, children: (m = c.files) == null ? void 0 : m.map((o) => {
124
122
  const y = o.name.split(".").pop();
125
123
  return /* @__PURE__ */ e.jsxs(
126
124
  n,
@@ -130,24 +128,24 @@ const a0 = ({
130
128
  spacing: 2,
131
129
  sx: {
132
130
  alignItems: "center",
133
- border: "1px solid var(--mui-palette-divider)",
131
+ border: "1px solid var(--s-palette-divider)",
134
132
  borderRadius: 1,
135
133
  flex: "1 1 auto",
136
134
  p: 1
137
135
  },
138
136
  children: [
139
137
  /* @__PURE__ */ e.jsx(I, { extension: y }),
140
- /* @__PURE__ */ e.jsxs(u, { sx: { flex: "1 1 auto" }, children: [
141
- /* @__PURE__ */ e.jsx(i, { variant: "subtitle2", children: o.name }),
142
- /* @__PURE__ */ e.jsx(i, { color: "text.secondary", variant: "body2", children: C(o.size) })
138
+ /* @__PURE__ */ e.jsxs(x, { sx: { flex: "1 1 auto" }, children: [
139
+ /* @__PURE__ */ e.jsx(s, { variant: "subtitle2", children: o.name }),
140
+ /* @__PURE__ */ e.jsx(s, { color: "text.secondary", variant: "body2", children: H(o.size) })
143
141
  ] }),
144
142
  /* @__PURE__ */ e.jsx(w, { title: "Remove", children: /* @__PURE__ */ e.jsx(
145
143
  M,
146
144
  {
147
145
  onClick: () => {
148
- s == null || s(o);
146
+ i == null || i(o);
149
147
  },
150
- children: /* @__PURE__ */ e.jsx(z, {})
148
+ children: /* @__PURE__ */ e.jsx(F, {})
151
149
  }
152
150
  ) })
153
151
  ]
@@ -155,7 +153,7 @@ const a0 = ({
155
153
  o.size
156
154
  );
157
155
  }) }),
158
- /* @__PURE__ */ e.jsx(n, { direction: "row", spacing: 2, sx: { alignItems: "center", justifyContent: "flex-end" }, children: v && /* @__PURE__ */ e.jsx(Z, { onClick: g, size: "small", type: "button", variant: "text", children: "Remove all" }) })
156
+ /* @__PURE__ */ e.jsx(n, { direction: "row", spacing: 2, sx: { alignItems: "center", justifyContent: "flex-end" }, children: b && /* @__PURE__ */ e.jsx(Z, { onClick: g, size: "small", type: "button", variant: "text", children: "Remove all" }) })
159
157
  ] }) : null
160
158
  ] });
161
159
  };
@@ -1,16 +1,16 @@
1
- import { j as l } from "../jsx-runtime-C5mzlN2N.js";
2
- import { FormControl as c, FormLabel as m, Tooltip as p, FormHelperText as i } from "@mui/material";
1
+ import { j as e } from "../jsx-runtime-C5mzlN2N.js";
2
+ import { FormControl as m, FormLabel as c, Tooltip as i, FormHelperText as p } from "@mui/material";
3
3
  import { c as x } from "../createSvgIcon-C9keHw6o.js";
4
- const a = x(/* @__PURE__ */ l.jsx("path", {
4
+ const a = x(/* @__PURE__ */ e.jsx("path", {
5
5
  d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25"
6
- }), "Help"), u = ({ label: t, hint: s, error: e, required: o, children: r, htmlFor: n }) => /* @__PURE__ */ l.jsxs(c, { error: !!e, fullWidth: !0, children: [
7
- t ? /* @__PURE__ */ l.jsxs(m, { htmlFor: n, required: o, sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
6
+ }), "Help"), u = ({ label: t, hint: s, error: l, required: o, children: r, htmlFor: n }) => /* @__PURE__ */ e.jsxs(m, { error: !!l, fullWidth: !0, children: [
7
+ t ? /* @__PURE__ */ e.jsxs(c, { htmlFor: n, required: o, sx: { display: "flex", alignItems: "center" }, children: [
8
8
  t,
9
9
  " ",
10
- s ? /* @__PURE__ */ l.jsx(p, { title: s, placement: "top", children: /* @__PURE__ */ l.jsx(a, { style: { width: 16 } }) }) : null
10
+ s ? /* @__PURE__ */ e.jsx(i, { title: s, placement: "top", sx: { marginLeft: 0.5 }, children: /* @__PURE__ */ e.jsx(a, { style: { width: 16 } }) }) : null
11
11
  ] }) : null,
12
12
  r,
13
- e ? /* @__PURE__ */ l.jsx(i, { children: e }) : null
13
+ l ? /* @__PURE__ */ e.jsx(p, { children: l }) : null
14
14
  ] });
15
15
  export {
16
16
  u as default
@@ -1,12 +1,12 @@
1
1
  import { j as e } from "../jsx-runtime-C5mzlN2N.js";
2
- import { Stack as i, Tooltip as s } from "@mui/material";
2
+ import { Stack as i, Tooltip as r } from "@mui/material";
3
3
  import { c } from "../createSvgIcon-C9keHw6o.js";
4
- const m = c(/* @__PURE__ */ e.jsx("path", {
4
+ const a = c(/* @__PURE__ */ e.jsx("path", {
5
5
  d: "M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"
6
- }), "HelpOutline"), d = ({ label: l, content: n, children: o, hint: t, sx: r }) => /* @__PURE__ */ e.jsxs(i, { width: "100%", sx: r, children: [
6
+ }), "HelpOutline"), d = ({ label: l, content: s, children: n, hint: t, sx: o }) => /* @__PURE__ */ e.jsxs(i, { width: "100%", sx: o, children: [
7
7
  /* @__PURE__ */ e.jsxs(i, { direction: "row", gap: 1, alignItems: "center", children: [
8
8
  /* @__PURE__ */ e.jsx("div", { style: { fontSize: "1rem", fontWeight: 500, lineHeight: 1.57 }, children: l }),
9
- t ? /* @__PURE__ */ e.jsx(s, { title: t, placement: "top", children: /* @__PURE__ */ e.jsx(m, { fontSize: "small" }) }) : null
9
+ t ? /* @__PURE__ */ e.jsx(r, { title: t, placement: "top", children: /* @__PURE__ */ e.jsx(a, { fontSize: "small" }) }) : null
10
10
  ] }),
11
11
  /* @__PURE__ */ e.jsx(
12
12
  "div",
@@ -15,12 +15,12 @@ const m = c(/* @__PURE__ */ e.jsx("path", {
15
15
  fontSize: "0.875rem",
16
16
  fontWeight: 400,
17
17
  lineHeight: 1.57,
18
- color: "var(--mui-palette-text-secondary)"
18
+ color: "var(--s-palette-text-secondary)"
19
19
  },
20
- children: n
20
+ children: s
21
21
  }
22
22
  ),
23
- o
23
+ n
24
24
  ] });
25
25
  export {
26
26
  d as default
@@ -1,8 +1,8 @@
1
1
  import { j as u } from "../jsx-runtime-C5mzlN2N.js";
2
- import { forwardRef as m, useState as b, useEffect as V } from "react";
2
+ import { forwardRef as b, useState as m, useEffect as V } from "react";
3
3
  import { Select as E, MenuItem as O } from "@mui/material";
4
4
  import R from "../s-form/s-form.js";
5
- const M = m(
5
+ const M = b(
6
6
  ({
7
7
  options: t = [],
8
8
  optionLabel: c = "name",
@@ -16,7 +16,7 @@ const M = m(
16
16
  htmlFor: o,
17
17
  ...n
18
18
  }, j) => {
19
- const [p, S] = b(n.value ?? null);
19
+ const [p, S] = m(n.value ?? null);
20
20
  V(() => {
21
21
  S(n.value ?? null);
22
22
  }, [n.value]);
@@ -31,14 +31,14 @@ const M = m(
31
31
  ref: j,
32
32
  renderValue: n.multiple ? (e) => {
33
33
  const r = e;
34
- return r.length === 0 ? /* @__PURE__ */ u.jsx("span", { style: { color: "var(--mui-palette-text-secondary)" }, children: d }) : r.map((f) => {
34
+ return r.length === 0 ? /* @__PURE__ */ u.jsx("span", { style: { color: "var(--s-palette-text-secondary)" }, children: d }) : r.map((f) => {
35
35
  const s = t.find((h) => l(h) === l(f));
36
36
  return s ? a(s) : "";
37
37
  }).filter(Boolean).join(", ");
38
38
  } : (e) => {
39
39
  const r = e;
40
40
  if (r == null || r === "")
41
- return /* @__PURE__ */ u.jsx("span", { style: { color: "var(--mui-palette-text-secondary)" }, children: d });
41
+ return /* @__PURE__ */ u.jsx("span", { style: { color: "var(--s-palette-text-secondary)" }, children: d });
42
42
  if (g)
43
43
  return a(r);
44
44
  const f = t.find((s) => l(s) === l(r));
@@ -4633,7 +4633,7 @@ const ya = ({ editor: e }) => {
4633
4633
  className: "tiptap-toolbar",
4634
4634
  spacing: 1,
4635
4635
  sx: {
4636
- borderBottom: "1px solid var(--mui-palette-divider)",
4636
+ borderBottom: "1px solid var(--s-palette-divider)",
4637
4637
  p: "8px",
4638
4638
  minHeight: "57px"
4639
4639
  },
@@ -3,9 +3,9 @@ import * as p from "react";
3
3
  import { Link as n } from "@tiptap/extension-link";
4
4
  import { Placeholder as m } from "@tiptap/extension-placeholder";
5
5
  import { useEditor as c, EditorContent as f } from "@tiptap/react";
6
- import { StarterKit as u } from "@tiptap/starter-kit";
7
- import { STextEditorToolbar as x } from "./s-text-editor-toolbar.js";
8
- import { B as d } from "../Box-CafvePOg.js";
6
+ import { StarterKit as x } from "@tiptap/starter-kit";
7
+ import { STextEditorToolbar as d } from "./s-text-editor-toolbar.js";
8
+ import { B as u } from "../Box-CafvePOg.js";
9
9
  const S = ({
10
10
  content: o,
11
11
  editable: r = !0,
@@ -15,7 +15,7 @@ const S = ({
15
15
  placeholder: a
16
16
  }) => {
17
17
  const l = [
18
- u,
18
+ x,
19
19
  m.configure({ emptyEditorClass: "is-editor-empty", placeholder: a }),
20
20
  n.configure({ openOnClick: !1, autolink: !0 })
21
21
  ], e = c({
@@ -30,16 +30,16 @@ const S = ({
30
30
  return p.useEffect(() => {
31
31
  e == null || e.commands.setContent(o, !1, { preserveWhitespace: "full" });
32
32
  }, [o]), /* @__PURE__ */ t.jsxs(
33
- d,
33
+ u,
34
34
  {
35
35
  className: "tiptap-root",
36
36
  sx: {
37
37
  display: "flex",
38
38
  flexDirection: "column",
39
39
  ...r && {
40
- border: "1px solid var(--mui-palette-divider)",
40
+ border: "1px solid var(--s-palette-divider)",
41
41
  borderRadius: 1,
42
- boxShadow: "var(--mui-shadows-1)"
42
+ boxShadow: "var(--s-shadows-1)"
43
43
  },
44
44
  "& .tiptap-container": {
45
45
  display: "flex",
@@ -49,7 +49,7 @@ const S = ({
49
49
  height: "12rem"
50
50
  },
51
51
  "& .tiptap": {
52
- color: "var(--mui-palette-text-primary)",
52
+ color: "var(--s-palette-text-primary)",
53
53
  flex: "1 1 auto",
54
54
  overflow: "auto",
55
55
  fontSize: "0.875rem",
@@ -60,7 +60,7 @@ const S = ({
60
60
  "& table": { cursor: "col-resize" }
61
61
  },
62
62
  "& .is-editor-empty:before": {
63
- color: "var(--mui-palette-text-secondary)",
63
+ color: "var(--s-palette-text-secondary)",
64
64
  content: "attr(data-placeholder)",
65
65
  float: "left",
66
66
  height: 0,
@@ -69,7 +69,7 @@ const S = ({
69
69
  }
70
70
  },
71
71
  children: [
72
- i ? /* @__PURE__ */ t.jsx("div", {}) : /* @__PURE__ */ t.jsx(x, { editor: e }),
72
+ i ? /* @__PURE__ */ t.jsx("div", {}) : /* @__PURE__ */ t.jsx(d, { editor: e }),
73
73
  /* @__PURE__ */ t.jsx(f, { className: "tiptap-container", editor: e })
74
74
  ]
75
75
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "registry": "https://registry.npmjs.org"
5
5
  },
6
- "version": "1.0.25",
6
+ "version": "1.0.26",
7
7
  "description": "advanced ui kit for solostylist",
8
8
  "private": false,
9
9
  "type": "module",