@solostylist/ui-kit 1.0.57 → 1.0.59

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 (40) hide show
  1. package/dist/{Box-MoP3r0T2.js → Box-DuNveqKq.js} +1 -1
  2. package/dist/{Close-DLG48sGB.js → Close-Dc2lVwnr.js} +1 -1
  3. package/dist/{HelpOutlineOutlined-CBZQGWGK.js → HelpOutlineOutlined-BAjVLccf.js} +1 -1
  4. package/dist/{Menu-Y8dE9GrA.js → Menu-CFtdt9_b.js} +22 -8
  5. package/dist/MenuItem-Bqce0qet.js +261 -0
  6. package/dist/Select-D539S2ky.js +3917 -0
  7. package/dist/{Stack-DT2aopM5.js → Stack-CG6wicnq.js} +69 -91
  8. package/dist/{Typography-BXwj4yQZ.js → Typography-Bj_bEcQU.js} +2 -2
  9. package/dist/chipClasses-DKfDKFnh.js +10 -0
  10. package/dist/{createSvgIcon-YtxTUNwI.js → createSvgIcon-ChpOI-a_.js} +217 -213
  11. package/dist/{index-GaV7LHxy.js → index-Cuc5JxMf.js} +4 -4
  12. package/dist/main.d.ts +4 -0
  13. package/dist/main.js +35 -32
  14. package/dist/s-data-table/s-data-table.js +2 -2
  15. package/dist/s-datetime-picker/index.d.ts +4 -0
  16. package/dist/s-datetime-picker/index.js +5 -0
  17. package/dist/s-datetime-picker/package.json +5 -0
  18. package/dist/s-datetime-picker/s-datetime-picker.d.ts +15 -0
  19. package/dist/s-datetime-picker/s-datetime-picker.js +18763 -0
  20. package/dist/s-dialog/s-dialog.js +1 -1
  21. package/dist/s-dialog-confirm/s-dialog-confirm.js +2 -2
  22. package/dist/s-dialog-message/s-dialog-message.js +2 -2
  23. package/dist/s-file-dropzone/s-file-dropzone.js +4 -4
  24. package/dist/s-file-icon/s-file-icon.js +1 -1
  25. package/dist/s-form/s-form.js +1 -1
  26. package/dist/s-label/s-label.js +1 -1
  27. package/dist/s-multi-select/s-multi-select.js +50 -298
  28. package/dist/s-text-editor/s-text-editor-toolbar.js +100 -4001
  29. package/dist/s-text-editor/s-text-editor.js +1 -1
  30. package/dist/s-tip/s-tip.js +3 -3
  31. package/dist/tabClasses-BM7nwRzw.js +10 -0
  32. package/dist/theme/components/avatar.js +1 -1
  33. package/dist/theme/customizations/data-display.js +36 -36
  34. package/dist/theme/customizations/inputs.js +1 -1
  35. package/dist/theme/customizations/navigation.js +52 -50
  36. package/dist/{useSlot-GW4ou7g5.js → useSlot-Dje0rInB.js} +1 -1
  37. package/dist/{useTheme-vk3BYrgD.js → useTheme-BM5dU4pp.js} +3 -2
  38. package/dist/useThemeProps-kZjTQ980.js +27 -0
  39. package/dist/utils/dayjs.js +14 -14
  40. package/package.json +4 -3
@@ -1,5 +1,5 @@
1
1
  import { j as r } from "../jsx-runtime-C5mzlN2N.js";
2
- import { C as j } from "../Close-DLG48sGB.js";
2
+ import { C as j } from "../Close-Dc2lVwnr.js";
3
3
  import { Dialog as h, DialogTitle as p, Stack as f, Typography as t, IconButton as m, DialogContent as g, DialogActions as u } from "@mui/material";
4
4
  const v = ({
5
5
  title: s,
@@ -1,9 +1,9 @@
1
1
  import { j as n } from "../jsx-runtime-C5mzlN2N.js";
2
2
  import * as r from "react";
3
- import { C as p } from "../Close-DLG48sGB.js";
3
+ import { C as p } from "../Close-Dc2lVwnr.js";
4
4
  import { Dialog as g, DialogTitle as j, Stack as D, IconButton as v, DialogContent as y, DialogActions as b, Button as d } from "@mui/material";
5
5
  import { useDialog as k } from "../hooks/use-dialog.js";
6
- import { T as m } from "../Typography-BXwj4yQZ.js";
6
+ import { T as m } from "../Typography-Bj_bEcQU.js";
7
7
  const w = ({
8
8
  title: o,
9
9
  content: e,
@@ -1,9 +1,9 @@
1
1
  import { j as o } from "../jsx-runtime-C5mzlN2N.js";
2
2
  import * as s from "react";
3
- import { C as u } from "../Close-DLG48sGB.js";
3
+ import { C as u } from "../Close-Dc2lVwnr.js";
4
4
  import { Dialog as p, DialogTitle as g, Stack as m, IconButton as j, DialogContent as C, DialogActions as f, Button as D } from "@mui/material";
5
5
  import { useDialog as k } from "../hooks/use-dialog.js";
6
- import { T as c } from "../Typography-BXwj4yQZ.js";
6
+ import { T as c } from "../Typography-Bj_bEcQU.js";
7
7
  const v = ({
8
8
  title: t,
9
9
  content: e,
@@ -1,13 +1,13 @@
1
1
  import { j as e } from "../jsx-runtime-C5mzlN2N.js";
2
- import { c as p } from "../createSvgIcon-YtxTUNwI.js";
2
+ import { c as p } from "../createSvgIcon-ChpOI-a_.js";
3
3
  import { Avatar as y, Tooltip as b, IconButton as C, Button as I } from "@mui/material";
4
4
  import { useDropzone as z } from "react-dropzone";
5
5
  import S from "../s-file-icon/s-file-icon.js";
6
6
  import k from "../s-form/s-form.js";
7
7
  import { bytesToSize as w } from "../utils/bytes-to-size.js";
8
- import { S as t } from "../Stack-DT2aopM5.js";
9
- import { B as d } from "../Box-MoP3r0T2.js";
10
- import { T as o } from "../Typography-BXwj4yQZ.js";
8
+ import { S as t } from "../Stack-CG6wicnq.js";
9
+ import { B as d } from "../Box-DuNveqKq.js";
10
+ import { T as o } from "../Typography-Bj_bEcQU.js";
11
11
  const B = p(/* @__PURE__ */ e.jsx("path", {
12
12
  d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
13
13
  }), "CloseOutlined"), D = p(/* @__PURE__ */ e.jsx("path", {
@@ -1,5 +1,5 @@
1
1
  import { j as e } from "../jsx-runtime-C5mzlN2N.js";
2
- import { B as i } from "../Box-MoP3r0T2.js";
2
+ import { B as i } from "../Box-DuNveqKq.js";
3
3
  const o = {
4
4
  jpeg: "/assets/icon-jpg.svg",
5
5
  jpg: "/assets/icon-jpg.svg",
@@ -1,5 +1,5 @@
1
1
  import { j as e } from "../jsx-runtime-C5mzlN2N.js";
2
- import { H as i } from "../HelpOutlineOutlined-CBZQGWGK.js";
2
+ import { H as i } from "../HelpOutlineOutlined-BAjVLccf.js";
3
3
  import { FormControl as m, FormLabel as p, Tooltip as x, FormHelperText as u } from "@mui/material";
4
4
  const f = ({ label: t, hint: o, error: l, required: r, children: n, htmlFor: s }) => /* @__PURE__ */ e.jsxs(m, { error: !!l, fullWidth: !0, children: [
5
5
  t ? /* @__PURE__ */ e.jsxs(p, { htmlFor: s, required: r, sx: { display: "flex", alignItems: "center" }, children: [
@@ -1,5 +1,5 @@
1
1
  import { j as e } from "../jsx-runtime-C5mzlN2N.js";
2
- import { H as s } from "../HelpOutlineOutlined-CBZQGWGK.js";
2
+ import { H as s } from "../HelpOutlineOutlined-BAjVLccf.js";
3
3
  import { Stack as i, Tooltip as a } from "@mui/material";
4
4
  const p = ({ label: n, content: r, children: l, hint: t, sx: o }) => /* @__PURE__ */ e.jsxs(i, { width: "100%", sx: o, children: [
5
5
  /* @__PURE__ */ e.jsxs(i, { direction: "row", gap: 1, alignItems: "center", children: [
@@ -1,296 +1,48 @@
1
- import { j as l } from "../jsx-runtime-C5mzlN2N.js";
1
+ import { j as t } from "../jsx-runtime-C5mzlN2N.js";
2
2
  import * as c from "react";
3
- import { c as T, u as N, s as E, a as P, f as B, m as U } from "../createSvgIcon-YtxTUNwI.js";
4
- import { Stack as D, OutlinedInput as F } from "@mui/material";
5
- import { usePopover as z } from "../hooks/use-popover.js";
6
- import G from "../s-chips/s-chips.js";
7
- import { L as h, M as W } from "../Menu-Y8dE9GrA.js";
8
- import { g as A, a as v, P as s } from "../createTheme-CozHbEju.js";
9
- import { g, c as R } from "../identifier-9JFYVRsR.js";
10
- import { u as H } from "../useEnhancedEffect-CJGo-L3B.js";
11
- import { u as _, B as q } from "../useSlot-GW4ou7g5.js";
12
- const J = T(/* @__PURE__ */ l.jsx("path", {
3
+ import { c as h } from "../createSvgIcon-ChpOI-a_.js";
4
+ import { Stack as j, OutlinedInput as M } from "@mui/material";
5
+ import { usePopover as v } from "../hooks/use-popover.js";
6
+ import S from "../s-chips/s-chips.js";
7
+ import { M as R } from "../Menu-CFtdt9_b.js";
8
+ import { M as b } from "../MenuItem-Bqce0qet.js";
9
+ const I = h(/* @__PURE__ */ t.jsx("path", {
13
10
  d: "M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"
14
- }), "UnfoldMore"), j = g("MuiDivider", ["root", "absolute", "fullWidth", "inset", "middle", "flexItem", "light", "vertical", "withChildren", "withChildrenVertical", "textAlignRight", "textAlignLeft", "wrapper", "wrapperVertical"]), S = g("MuiListItemIcon", ["root", "alignItemsFlexStart"]), k = g("MuiListItemText", ["root", "multiline", "dense", "inset", "primary", "secondary"]);
15
- function K(e) {
16
- return A("MuiMenuItem", e);
17
- }
18
- const b = g("MuiMenuItem", ["root", "focusVisible", "dense", "disabled", "divider", "gutters", "selected"]), Q = (e, t) => {
19
- const {
20
- ownerState: r
21
- } = e;
22
- return [t.root, r.dense && t.dense, r.divider && t.divider, !r.disableGutters && t.gutters];
23
- }, X = (e) => {
24
- const {
25
- disabled: t,
26
- dense: r,
27
- divider: a,
28
- disableGutters: u,
29
- selected: n,
30
- classes: i
31
- } = e, d = P({
32
- root: ["root", r && "dense", t && "disabled", !u && "gutters", a && "divider", n && "selected"]
33
- }, K, i);
34
- return {
35
- ...i,
36
- ...d
37
- };
38
- }, Y = E(q, {
39
- shouldForwardProp: (e) => B(e) || e === "classes",
40
- name: "MuiMenuItem",
41
- slot: "Root",
42
- overridesResolver: Q
43
- })(U(({
44
- theme: e
45
- }) => ({
46
- ...e.typography.body1,
47
- display: "flex",
48
- justifyContent: "flex-start",
49
- alignItems: "center",
50
- position: "relative",
51
- textDecoration: "none",
52
- minHeight: 48,
53
- paddingTop: 6,
54
- paddingBottom: 6,
55
- boxSizing: "border-box",
56
- whiteSpace: "nowrap",
57
- "&:hover": {
58
- textDecoration: "none",
59
- backgroundColor: (e.vars || e).palette.action.hover,
60
- // Reset on touch devices, it doesn't add specificity
61
- "@media (hover: none)": {
62
- backgroundColor: "transparent"
63
- }
64
- },
65
- [`&.${b.selected}`]: {
66
- backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : v(e.palette.primary.main, e.palette.action.selectedOpacity),
67
- [`&.${b.focusVisible}`]: {
68
- backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : v(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
69
- }
70
- },
71
- [`&.${b.selected}:hover`]: {
72
- backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : v(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
73
- // Reset on touch devices, it doesn't add specificity
74
- "@media (hover: none)": {
75
- backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : v(e.palette.primary.main, e.palette.action.selectedOpacity)
76
- }
77
- },
78
- [`&.${b.focusVisible}`]: {
79
- backgroundColor: (e.vars || e).palette.action.focus
80
- },
81
- [`&.${b.disabled}`]: {
82
- opacity: (e.vars || e).palette.action.disabledOpacity
83
- },
84
- [`& + .${j.root}`]: {
85
- marginTop: e.spacing(1),
86
- marginBottom: e.spacing(1)
87
- },
88
- [`& + .${j.inset}`]: {
89
- marginLeft: 52
90
- },
91
- [`& .${k.root}`]: {
92
- marginTop: 0,
93
- marginBottom: 0
94
- },
95
- [`& .${k.inset}`]: {
96
- paddingLeft: 36
97
- },
98
- [`& .${S.root}`]: {
99
- minWidth: 36
100
- },
101
- variants: [{
102
- props: ({
103
- ownerState: t
104
- }) => !t.disableGutters,
105
- style: {
106
- paddingLeft: 16,
107
- paddingRight: 16
108
- }
109
- }, {
110
- props: ({
111
- ownerState: t
112
- }) => t.divider,
113
- style: {
114
- borderBottom: `1px solid ${(e.vars || e).palette.divider}`,
115
- backgroundClip: "padding-box"
116
- }
117
- }, {
118
- props: ({
119
- ownerState: t
120
- }) => !t.dense,
121
- style: {
122
- [e.breakpoints.up("sm")]: {
123
- minHeight: "auto"
124
- }
125
- }
126
- }, {
127
- props: ({
128
- ownerState: t
129
- }) => t.dense,
130
- style: {
131
- minHeight: 32,
132
- // https://m2.material.io/components/menus#specs > Dense
133
- paddingTop: 4,
134
- paddingBottom: 4,
135
- ...e.typography.body2,
136
- [`& .${S.root} svg`]: {
137
- fontSize: "1.25rem"
138
- }
139
- }
140
- }]
141
- }))), w = /* @__PURE__ */ c.forwardRef(function(t, r) {
142
- const a = N({
143
- props: t,
144
- name: "MuiMenuItem"
145
- }), {
146
- autoFocus: u = !1,
147
- component: n = "li",
148
- dense: i = !1,
149
- divider: m = !1,
150
- disableGutters: d = !1,
151
- focusVisibleClassName: y,
152
- role: o = "menuitem",
153
- tabIndex: p,
154
- className: f,
155
- ...x
156
- } = a, M = c.useContext(h), $ = c.useMemo(() => ({
157
- dense: i || M.dense || !1,
158
- disableGutters: d
159
- }), [M.dense, i, d]), C = c.useRef(null);
160
- H(() => {
161
- u && (C.current ? C.current.focus() : process.env.NODE_ENV !== "production" && console.error("MUI: Unable to set focus to a MenuItem whose component has not been rendered."));
162
- }, [u]);
163
- const V = {
164
- ...a,
165
- dense: $.dense,
166
- divider: m,
167
- disableGutters: d
168
- }, I = X(a), L = _(C, r);
169
- let O;
170
- return a.disabled || (O = p !== void 0 ? p : -1), /* @__PURE__ */ l.jsx(h.Provider, {
171
- value: $,
172
- children: /* @__PURE__ */ l.jsx(Y, {
173
- ref: L,
174
- role: o,
175
- tabIndex: O,
176
- component: n,
177
- focusVisibleClassName: R(I.focusVisible, y),
178
- className: R(I.root, f),
179
- ...x,
180
- ownerState: V,
181
- classes: I
182
- })
183
- });
184
- });
185
- process.env.NODE_ENV !== "production" && (w.propTypes = {
186
- // ┌────────────────────────────── Warning ──────────────────────────────┐
187
- // │ These PropTypes are generated from the TypeScript type definitions. │
188
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
189
- // └─────────────────────────────────────────────────────────────────────┘
190
- /**
191
- * If `true`, the list item is focused during the first mount.
192
- * Focus will also be triggered if the value changes from false to true.
193
- * @default false
194
- */
195
- autoFocus: s.bool,
196
- /**
197
- * The content of the component.
198
- */
199
- children: s.node,
200
- /**
201
- * Override or extend the styles applied to the component.
202
- */
203
- classes: s.object,
204
- /**
205
- * @ignore
206
- */
207
- className: s.string,
208
- /**
209
- * The component used for the root node.
210
- * Either a string to use a HTML element or a component.
211
- */
212
- component: s.elementType,
213
- /**
214
- * If `true`, compact vertical padding designed for keyboard and mouse input is used.
215
- * The prop defaults to the value inherited from the parent Menu component.
216
- * @default false
217
- */
218
- dense: s.bool,
219
- /**
220
- * @ignore
221
- */
222
- disabled: s.bool,
223
- /**
224
- * If `true`, the left and right padding is removed.
225
- * @default false
226
- */
227
- disableGutters: s.bool,
228
- /**
229
- * If `true`, a 1px light border is added to the bottom of the menu item.
230
- * @default false
231
- */
232
- divider: s.bool,
233
- /**
234
- * This prop can help identify which element has keyboard focus.
235
- * The class name will be applied when the element gains the focus through keyboard interaction.
236
- * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
237
- * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
238
- * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
239
- * if needed.
240
- */
241
- focusVisibleClassName: s.string,
242
- /**
243
- * @ignore
244
- */
245
- role: s.string,
246
- /**
247
- * If `true`, the component is selected.
248
- * @default false
249
- */
250
- selected: s.bool,
251
- /**
252
- * The system prop that allows defining system overrides as well as additional CSS styles.
253
- */
254
- sx: s.oneOfType([s.arrayOf(s.oneOfType([s.func, s.object, s.bool])), s.func, s.object]),
255
- /**
256
- * @default 0
257
- */
258
- tabIndex: s.number
259
- });
260
- function ce({
261
- label: e,
262
- onChange: t,
263
- options: r,
264
- value: a = [],
265
- chipProps: u
11
+ }), "UnfoldMore");
12
+ function P({
13
+ label: u,
14
+ onChange: o,
15
+ options: a,
16
+ value: l = [],
17
+ chipProps: f
266
18
  }) {
267
- const n = z(), i = c.useRef(null), [m, d] = c.useState();
19
+ const r = v(), i = c.useRef(null), [p, d] = c.useState();
268
20
  c.useEffect(() => {
269
21
  i.current && d(i.current.offsetWidth);
270
- }, [n.open]);
271
- const y = c.useCallback(
272
- (o, p) => {
273
- let f = [...a];
274
- p ? f.push(o) : f = f.filter((x) => x !== o), t == null || t(f);
22
+ }, [r.open]);
23
+ const m = c.useCallback(
24
+ (e, s) => {
25
+ let n = [...l];
26
+ s ? n.push(e) : n = n.filter((x) => x !== e), o == null || o(n);
275
27
  },
276
- [t, a]
28
+ [o, l]
277
29
  );
278
- return /* @__PURE__ */ l.jsxs(D, { direction: "column", gap: 1, children: [
279
- /* @__PURE__ */ l.jsx(
280
- F,
30
+ return /* @__PURE__ */ t.jsxs(j, { direction: "column", gap: 1, children: [
31
+ /* @__PURE__ */ t.jsx(
32
+ M,
281
33
  {
282
- endAdornment: /* @__PURE__ */ l.jsx(
283
- J,
34
+ endAdornment: /* @__PURE__ */ t.jsx(
35
+ I,
284
36
  {
285
37
  fontSize: "small",
286
38
  sx: { color: "var(--s-palette-action-active)", position: "absolute", right: "7px" }
287
39
  }
288
40
  ),
289
- onClick: n.handleOpen,
290
- ref: (o) => {
291
- n.anchorRef.current = o, i.current = o;
41
+ onClick: r.handleOpen,
42
+ ref: (e) => {
43
+ r.anchorRef.current = e, i.current = e;
292
44
  },
293
- value: e,
45
+ value: u,
294
46
  sx: {
295
47
  input: {
296
48
  color: "var(--s-palette-text-secondary)"
@@ -298,38 +50,38 @@ function ce({
298
50
  }
299
51
  }
300
52
  ),
301
- /* @__PURE__ */ l.jsx(
302
- W,
53
+ /* @__PURE__ */ t.jsx(
54
+ R,
303
55
  {
304
- anchorEl: n.anchorRef.current,
305
- onClose: n.handleClose,
306
- open: n.open,
307
- slotProps: { paper: { sx: { width: m ? `${m}px` : void 0 } } },
308
- children: r.map((o) => {
309
- const p = a.includes(o.value);
310
- return /* @__PURE__ */ l.jsx(
311
- w,
56
+ anchorEl: r.anchorRef.current,
57
+ onClose: r.handleClose,
58
+ open: r.open,
59
+ slotProps: { paper: { sx: { width: p ? `${p}px` : void 0 } } },
60
+ children: a.map((e) => {
61
+ const s = l.includes(e.value);
62
+ return /* @__PURE__ */ t.jsx(
63
+ b,
312
64
  {
313
65
  onClick: () => {
314
- y(o.value, !p);
66
+ m(e.value, !s);
315
67
  },
316
- selected: p,
317
- children: o.label
68
+ selected: s,
69
+ children: e.label
318
70
  },
319
- o.label
71
+ e.label
320
72
  );
321
73
  })
322
74
  }
323
75
  ),
324
- /* @__PURE__ */ l.jsx(
325
- G,
76
+ /* @__PURE__ */ t.jsx(
77
+ S,
326
78
  {
327
- chips: r.filter((o) => a.includes(o.value)).map((o) => o.label),
328
- ...u
79
+ chips: a.filter((e) => l.includes(e.value)).map((e) => e.label),
80
+ ...f
329
81
  }
330
82
  )
331
83
  ] });
332
84
  }
333
85
  export {
334
- ce as default
86
+ P as default
335
87
  };