@solostylist/ui-kit 1.0.220 → 1.0.221
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/s-avatar/s-avatar.js +1 -5
- package/dist/s-breadcrumbs/s-breadcrumbs.js +45 -40
- package/dist/s-carousel/index.js +1 -1
- package/dist/s-carousel/s-carousel.js +1 -1
- package/dist/{s-carousel-DhUo-3W-.js → s-carousel-BUJYCigy.js} +15 -31
- package/dist/s-category-card/s-category-card.js +2 -2
- package/dist/s-chat-input/index.js +1 -1
- package/dist/s-chat-input/s-chat-input.js +1 -1
- package/dist/{s-chat-input-DlEMhm6X.js → s-chat-input-B0gdPa1c.js} +106 -101
- 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-DeP8O6TO.js → s-chat-message-DVfbqSAQ.js} +27 -28
- package/dist/s-checkbox/s-checkbox.js +2 -1
- 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-DTzppazr.js → s-code-block-CHIgPLsL.js} +31 -22
- 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-C-7IZOqA.js → s-comment-message-DuJPcZFR.js} +2 -6
- package/dist/s-date-picker/index.js +1 -1
- package/dist/s-date-picker/s-date-picker.js +1 -1
- package/dist/{s-date-picker-CKSRNJ_A.js → s-date-picker-Mynq297P.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-BlStwMie.js → s-datetime-picker-D78dPyAo.js} +1 -1
- package/dist/s-gallery/s-gallery.js +25 -18
- package/dist/s-image-comparison/s-image-comparison.js +76 -108
- package/dist/s-image-modal/index.js +2 -2
- package/dist/s-image-modal/s-image-modal.js +2 -399
- package/dist/s-image-modal-DxwMFMNS.js +397 -0
- package/dist/s-language-switcher/index.js +1 -1
- package/dist/s-language-switcher/s-language-switcher.js +1 -1
- package/dist/{s-language-switcher-Cg3Gh8_i.js → s-language-switcher-vievp2VS.js} +8 -8
- package/dist/s-link/s-link.js +5 -1
- package/dist/s-nav-item/s-nav-item.js +70 -61
- package/dist/s-nav-item/s-nav-items.js +6 -6
- package/dist/s-review/index.js +1 -1
- package/dist/s-review/s-review.js +1 -1
- package/dist/{s-review-D5_TicCf.js → s-review-Ca6JUgGr.js} +18 -22
- package/dist/s-scroll-to-top/s-scroll-to-top.js +10 -20
- package/dist/s-switch/s-switch.js +2 -1
- package/dist/s-text-editor/s-text-editor.js +34 -26
- package/dist/s-tool-bar/index.js +1 -1
- package/dist/s-tool-bar/s-tool-bar.js +1 -1
- package/dist/s-tool-bar-Du66wRC2.js +455 -0
- package/dist/s-tool-item/s-tool-item.js +8 -5
- package/dist/s-zoom-image/s-zoom-image.js +1 -1
- package/dist/theme/components/chip.js +10 -10
- package/dist/theme/components/components.js +86 -82
- package/dist/theme/components/day-calendar.d.ts +12 -0
- package/dist/theme/components/day-calendar.js +4 -0
- package/dist/theme/components/outlined-input.d.ts +1 -0
- package/dist/theme/components/outlined-input.js +1 -0
- package/dist/theme/components/picker-day.d.ts +12 -0
- package/dist/theme/components/picker-day.js +4 -0
- package/dist/theme/components/select.d.ts +4 -0
- package/dist/theme/components/select.js +4 -0
- package/package.json +1 -1
- package/dist/ChevronLeft-rgSvkrT_.js +0 -6
- package/dist/s-tool-bar-DOcT-lNr.js +0 -448
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
import { t as e } from "./createSvgIcon-BdNZIlKS.js";
|
|
2
|
+
import { t } from "./ChevronRight-DHulYS1l.js";
|
|
3
|
+
import { t as n } from "./Close-oXeOGTZb.js";
|
|
4
|
+
import r from "./s-lazy-image/s-lazy-image.js";
|
|
5
|
+
import i, { useEffect as a, useState as o } from "react";
|
|
6
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
|
+
import { Box as u, IconButton as d, Modal as f, Paper as p, Stack as m, Typography as h } from "@mui/material";
|
|
8
|
+
import { AnimatePresence as g, motion as _ } from "framer-motion";
|
|
9
|
+
//#region ../../node_modules/@mui/icons-material/ChevronLeft.mjs
|
|
10
|
+
var v = e(/* @__PURE__ */ c("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeft"), y = ({ item: e, onClick: t, style: n = {}, objectFit: i = "contain", disableVideoControls: a = !1 }) => e.type === "video" ? /* @__PURE__ */ c(u, {
|
|
11
|
+
component: "video",
|
|
12
|
+
onClick: t,
|
|
13
|
+
controls: !a,
|
|
14
|
+
sx: {
|
|
15
|
+
width: "100%",
|
|
16
|
+
height: "100%",
|
|
17
|
+
objectFit: i,
|
|
18
|
+
bgcolor: "background.paper",
|
|
19
|
+
...n
|
|
20
|
+
},
|
|
21
|
+
children: /* @__PURE__ */ c("source", {
|
|
22
|
+
src: e.url,
|
|
23
|
+
type: "video/mp4"
|
|
24
|
+
})
|
|
25
|
+
}) : /* @__PURE__ */ c(r, {
|
|
26
|
+
src: e.url,
|
|
27
|
+
alt: e.title ?? "",
|
|
28
|
+
onClick: t,
|
|
29
|
+
style: {
|
|
30
|
+
width: "100%",
|
|
31
|
+
height: "100%",
|
|
32
|
+
objectFit: i,
|
|
33
|
+
backgroundColor: "background.paper",
|
|
34
|
+
...n
|
|
35
|
+
}
|
|
36
|
+
}), b = ({ selectedItem: e, isOpen: r, onClose: b, onItemChange: x, mediaItems: S = [], renderMediaItem: C, showNavigation: w = !0, showThumbnailDock: T = !0, showCounter: E = !0, modalSx: D = {} }) => {
|
|
37
|
+
let [O, k] = o(e ?? null), A = e ?? O;
|
|
38
|
+
a(() => {
|
|
39
|
+
e && k(e);
|
|
40
|
+
}, [e]);
|
|
41
|
+
let j = w && S.length > 1 && A, M = A ? S.findIndex((e) => e.id === A.id) : -1, N = S.length, P = i.useCallback(() => {
|
|
42
|
+
if (j && M > 0) {
|
|
43
|
+
let e = S[M - 1];
|
|
44
|
+
x ? x(e) : k(e);
|
|
45
|
+
}
|
|
46
|
+
}, [
|
|
47
|
+
j,
|
|
48
|
+
M,
|
|
49
|
+
S,
|
|
50
|
+
x
|
|
51
|
+
]), F = i.useCallback(() => {
|
|
52
|
+
if (j && M < N - 1) {
|
|
53
|
+
let e = S[M + 1];
|
|
54
|
+
x ? x(e) : k(e);
|
|
55
|
+
}
|
|
56
|
+
}, [
|
|
57
|
+
j,
|
|
58
|
+
M,
|
|
59
|
+
N,
|
|
60
|
+
S,
|
|
61
|
+
x
|
|
62
|
+
]);
|
|
63
|
+
return a(() => {
|
|
64
|
+
let e = (e) => {
|
|
65
|
+
if (r) switch (e.key) {
|
|
66
|
+
case "ArrowLeft":
|
|
67
|
+
P();
|
|
68
|
+
break;
|
|
69
|
+
case "ArrowRight":
|
|
70
|
+
F();
|
|
71
|
+
break;
|
|
72
|
+
case "Escape":
|
|
73
|
+
b();
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
78
|
+
}, [
|
|
79
|
+
r,
|
|
80
|
+
M,
|
|
81
|
+
N,
|
|
82
|
+
j,
|
|
83
|
+
P,
|
|
84
|
+
F,
|
|
85
|
+
b
|
|
86
|
+
]), !r || !A ? null : /* @__PURE__ */ c(f, {
|
|
87
|
+
open: r,
|
|
88
|
+
onClose: b,
|
|
89
|
+
sx: {
|
|
90
|
+
zIndex: (e) => e.zIndex.modal + 100,
|
|
91
|
+
...D
|
|
92
|
+
},
|
|
93
|
+
slotProps: { backdrop: { sx: {
|
|
94
|
+
backdropFilter: "blur(8px)",
|
|
95
|
+
zIndex: (e) => e.zIndex.modal + 99
|
|
96
|
+
} } },
|
|
97
|
+
children: /* @__PURE__ */ l(u, { children: [/* @__PURE__ */ c(_.div, {
|
|
98
|
+
initial: { scale: .98 },
|
|
99
|
+
animate: { scale: 1 },
|
|
100
|
+
exit: { scale: .98 },
|
|
101
|
+
transition: {
|
|
102
|
+
type: "spring",
|
|
103
|
+
stiffness: 400,
|
|
104
|
+
damping: 30
|
|
105
|
+
},
|
|
106
|
+
children: /* @__PURE__ */ l(p, {
|
|
107
|
+
sx: {
|
|
108
|
+
position: "fixed",
|
|
109
|
+
inset: 0,
|
|
110
|
+
width: "100%",
|
|
111
|
+
minHeight: "100vh",
|
|
112
|
+
borderRadius: 0,
|
|
113
|
+
overflow: "hidden",
|
|
114
|
+
zIndex: (e) => e.zIndex.modal + 101
|
|
115
|
+
},
|
|
116
|
+
children: [
|
|
117
|
+
/* @__PURE__ */ c(u, {
|
|
118
|
+
sx: {
|
|
119
|
+
height: "100%",
|
|
120
|
+
display: "flex",
|
|
121
|
+
flexDirection: "column"
|
|
122
|
+
},
|
|
123
|
+
children: /* @__PURE__ */ c(u, {
|
|
124
|
+
sx: {
|
|
125
|
+
flex: 1,
|
|
126
|
+
p: {
|
|
127
|
+
xs: 1,
|
|
128
|
+
sm: 2,
|
|
129
|
+
md: 3
|
|
130
|
+
},
|
|
131
|
+
display: "flex",
|
|
132
|
+
alignItems: "center",
|
|
133
|
+
justifyContent: "center",
|
|
134
|
+
bgcolor: "background.default"
|
|
135
|
+
},
|
|
136
|
+
children: /* @__PURE__ */ c(g, {
|
|
137
|
+
mode: "wait",
|
|
138
|
+
children: /* @__PURE__ */ c(_.div, {
|
|
139
|
+
style: { position: "relative" },
|
|
140
|
+
initial: {
|
|
141
|
+
y: 20,
|
|
142
|
+
scale: .97
|
|
143
|
+
},
|
|
144
|
+
animate: {
|
|
145
|
+
y: 0,
|
|
146
|
+
scale: 1,
|
|
147
|
+
transition: {
|
|
148
|
+
type: "spring",
|
|
149
|
+
stiffness: 500,
|
|
150
|
+
damping: 30,
|
|
151
|
+
mass: .5
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
exit: {
|
|
155
|
+
y: 20,
|
|
156
|
+
scale: .97,
|
|
157
|
+
transition: { duration: .15 }
|
|
158
|
+
},
|
|
159
|
+
children: /* @__PURE__ */ l(p, {
|
|
160
|
+
onClick: (e) => e.stopPropagation(),
|
|
161
|
+
sx: {
|
|
162
|
+
position: "relative",
|
|
163
|
+
width: "100%",
|
|
164
|
+
aspectRatio: "16 / 9",
|
|
165
|
+
maxWidth: {
|
|
166
|
+
xs: "95%",
|
|
167
|
+
sm: "85%",
|
|
168
|
+
md: 960
|
|
169
|
+
},
|
|
170
|
+
height: "70vh",
|
|
171
|
+
borderRadius: 1,
|
|
172
|
+
border: "1px solid",
|
|
173
|
+
borderColor: "divider",
|
|
174
|
+
overflow: "hidden"
|
|
175
|
+
},
|
|
176
|
+
children: [C ? C(A) : /* @__PURE__ */ c(y, { item: A }), (A.title || A.desc) && /* @__PURE__ */ l(u, {
|
|
177
|
+
sx: {
|
|
178
|
+
position: "absolute",
|
|
179
|
+
left: 0,
|
|
180
|
+
right: 0,
|
|
181
|
+
bottom: 0,
|
|
182
|
+
p: {
|
|
183
|
+
xs: 1.5,
|
|
184
|
+
sm: 2,
|
|
185
|
+
md: 3
|
|
186
|
+
},
|
|
187
|
+
color: "common.white",
|
|
188
|
+
background: "linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.35) 45%, transparent)"
|
|
189
|
+
},
|
|
190
|
+
onClick: (e) => e.stopPropagation(),
|
|
191
|
+
children: [A.title && /* @__PURE__ */ c(h, {
|
|
192
|
+
variant: "h6",
|
|
193
|
+
sx: { fontSize: {
|
|
194
|
+
xs: 14,
|
|
195
|
+
sm: 18,
|
|
196
|
+
md: 20
|
|
197
|
+
} },
|
|
198
|
+
children: A.title
|
|
199
|
+
}), A.desc && /* @__PURE__ */ c(h, {
|
|
200
|
+
variant: "body2",
|
|
201
|
+
sx: { mt: .5 },
|
|
202
|
+
children: A.desc
|
|
203
|
+
})]
|
|
204
|
+
})]
|
|
205
|
+
})
|
|
206
|
+
}, A.id)
|
|
207
|
+
})
|
|
208
|
+
})
|
|
209
|
+
}),
|
|
210
|
+
/* @__PURE__ */ c(d, {
|
|
211
|
+
"aria-label": "Close",
|
|
212
|
+
onClick: b,
|
|
213
|
+
sx: {
|
|
214
|
+
position: "absolute",
|
|
215
|
+
top: {
|
|
216
|
+
xs: 8,
|
|
217
|
+
sm: 10,
|
|
218
|
+
md: 12
|
|
219
|
+
},
|
|
220
|
+
right: {
|
|
221
|
+
xs: 8,
|
|
222
|
+
sm: 10,
|
|
223
|
+
md: 12
|
|
224
|
+
},
|
|
225
|
+
zIndex: (e) => e.zIndex.modal + 102
|
|
226
|
+
},
|
|
227
|
+
children: /* @__PURE__ */ c(n, {})
|
|
228
|
+
}),
|
|
229
|
+
E && j && /* @__PURE__ */ l(u, {
|
|
230
|
+
sx: {
|
|
231
|
+
position: "absolute",
|
|
232
|
+
top: {
|
|
233
|
+
xs: 8,
|
|
234
|
+
sm: 10,
|
|
235
|
+
md: 12
|
|
236
|
+
},
|
|
237
|
+
left: {
|
|
238
|
+
xs: 8,
|
|
239
|
+
sm: 10,
|
|
240
|
+
md: 12
|
|
241
|
+
},
|
|
242
|
+
zIndex: (e) => e.zIndex.modal + 102,
|
|
243
|
+
padding: 1,
|
|
244
|
+
px: 2,
|
|
245
|
+
fontSize: {
|
|
246
|
+
xs: 14,
|
|
247
|
+
sm: 16
|
|
248
|
+
},
|
|
249
|
+
color: "text.primary"
|
|
250
|
+
},
|
|
251
|
+
children: [
|
|
252
|
+
M + 1,
|
|
253
|
+
" / ",
|
|
254
|
+
N
|
|
255
|
+
]
|
|
256
|
+
}),
|
|
257
|
+
j && /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(d, {
|
|
258
|
+
"aria-label": "Previous image",
|
|
259
|
+
onClick: (e) => {
|
|
260
|
+
e.stopPropagation(), P();
|
|
261
|
+
},
|
|
262
|
+
disabled: M === 0,
|
|
263
|
+
sx: {
|
|
264
|
+
position: "absolute",
|
|
265
|
+
left: {
|
|
266
|
+
xs: 8,
|
|
267
|
+
sm: 10,
|
|
268
|
+
md: 12
|
|
269
|
+
},
|
|
270
|
+
top: "50%",
|
|
271
|
+
transform: "translateY(-50%)",
|
|
272
|
+
zIndex: (e) => e.zIndex.modal + 102,
|
|
273
|
+
"&:disabled": { opacity: .5 }
|
|
274
|
+
},
|
|
275
|
+
children: /* @__PURE__ */ c(v, {})
|
|
276
|
+
}), /* @__PURE__ */ c(d, {
|
|
277
|
+
"aria-label": "Next image",
|
|
278
|
+
onClick: (e) => {
|
|
279
|
+
e.stopPropagation(), F();
|
|
280
|
+
},
|
|
281
|
+
disabled: M === N - 1,
|
|
282
|
+
sx: {
|
|
283
|
+
position: "absolute",
|
|
284
|
+
right: {
|
|
285
|
+
xs: 8,
|
|
286
|
+
sm: 10,
|
|
287
|
+
md: 12
|
|
288
|
+
},
|
|
289
|
+
top: "50%",
|
|
290
|
+
transform: "translateY(-50%)",
|
|
291
|
+
zIndex: (e) => e.zIndex.modal + 102,
|
|
292
|
+
"&:disabled": { opacity: .5 }
|
|
293
|
+
},
|
|
294
|
+
children: /* @__PURE__ */ c(t, {})
|
|
295
|
+
})] })
|
|
296
|
+
]
|
|
297
|
+
})
|
|
298
|
+
}), T && j && S.length > 1 && /* @__PURE__ */ c(u, {
|
|
299
|
+
sx: {
|
|
300
|
+
position: "fixed",
|
|
301
|
+
zIndex: 1502,
|
|
302
|
+
left: "50%",
|
|
303
|
+
bottom: 16,
|
|
304
|
+
transform: "translateX(-50%)"
|
|
305
|
+
},
|
|
306
|
+
children: /* @__PURE__ */ c(p, {
|
|
307
|
+
sx: {
|
|
308
|
+
position: "relative",
|
|
309
|
+
borderRadius: 1,
|
|
310
|
+
bgcolor: "background.paper",
|
|
311
|
+
border: "1px solid",
|
|
312
|
+
borderColor: "divider",
|
|
313
|
+
backdropFilter: "blur(12px)",
|
|
314
|
+
px: 1.5,
|
|
315
|
+
py: 1
|
|
316
|
+
},
|
|
317
|
+
children: /* @__PURE__ */ c(m, {
|
|
318
|
+
direction: "row",
|
|
319
|
+
spacing: -1.5,
|
|
320
|
+
sx: { alignItems: "center" },
|
|
321
|
+
children: S.map((e, t) => {
|
|
322
|
+
let n = A.id === e.id, r = t % 2 == 0 ? -15 : 15, i = () => {
|
|
323
|
+
x ? x(e) : k(e);
|
|
324
|
+
};
|
|
325
|
+
return /* @__PURE__ */ l(_.div, {
|
|
326
|
+
onClick: (e) => {
|
|
327
|
+
e.stopPropagation(), i();
|
|
328
|
+
},
|
|
329
|
+
style: {
|
|
330
|
+
position: "relative",
|
|
331
|
+
width: 40,
|
|
332
|
+
height: 40,
|
|
333
|
+
borderRadius: 8,
|
|
334
|
+
overflow: "hidden",
|
|
335
|
+
flexShrink: 0,
|
|
336
|
+
zIndex: n ? 30 : S.length - t,
|
|
337
|
+
border: n ? "1px solid" : void 0,
|
|
338
|
+
borderColor: n ? "divider" : void 0,
|
|
339
|
+
cursor: "pointer"
|
|
340
|
+
},
|
|
341
|
+
initial: { rotate: r },
|
|
342
|
+
animate: {
|
|
343
|
+
scale: n ? 1.2 : 1,
|
|
344
|
+
rotate: n ? 0 : r,
|
|
345
|
+
y: n ? -8 : 0
|
|
346
|
+
},
|
|
347
|
+
whileHover: {
|
|
348
|
+
scale: 1.3,
|
|
349
|
+
rotate: 0,
|
|
350
|
+
y: -10,
|
|
351
|
+
transition: {
|
|
352
|
+
type: "spring",
|
|
353
|
+
stiffness: 400,
|
|
354
|
+
damping: 25
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
children: [
|
|
358
|
+
C ? C(e, i) : /* @__PURE__ */ c(y, {
|
|
359
|
+
item: e,
|
|
360
|
+
objectFit: "cover",
|
|
361
|
+
style: {
|
|
362
|
+
width: "100%",
|
|
363
|
+
height: "100%",
|
|
364
|
+
borderRadius: 0,
|
|
365
|
+
pointerEvents: e.type === "video" ? "none" : "auto"
|
|
366
|
+
},
|
|
367
|
+
disableVideoControls: !0
|
|
368
|
+
}),
|
|
369
|
+
/* @__PURE__ */ c(u, { sx: {
|
|
370
|
+
position: "absolute",
|
|
371
|
+
inset: 0,
|
|
372
|
+
background: (e) => `linear-gradient(to bottom, transparent, ${(e.vars ?? e).palette.action.hover}, ${(e.vars ?? e).palette.action.selected})`,
|
|
373
|
+
pointerEvents: "none"
|
|
374
|
+
} }),
|
|
375
|
+
n && /* @__PURE__ */ c(_.div, {
|
|
376
|
+
layoutId: "activeGlow",
|
|
377
|
+
style: {
|
|
378
|
+
position: "absolute",
|
|
379
|
+
inset: -8,
|
|
380
|
+
background: "primary.main",
|
|
381
|
+
filter: "blur(16px)"
|
|
382
|
+
},
|
|
383
|
+
initial: { opacity: 0 },
|
|
384
|
+
animate: { opacity: 1 },
|
|
385
|
+
transition: { duration: .2 }
|
|
386
|
+
})
|
|
387
|
+
]
|
|
388
|
+
}, e.id);
|
|
389
|
+
})
|
|
390
|
+
})
|
|
391
|
+
})
|
|
392
|
+
})] })
|
|
393
|
+
});
|
|
394
|
+
};
|
|
395
|
+
b.displayName = "SImageModal";
|
|
396
|
+
//#endregion
|
|
397
|
+
export { b as n, y as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "../s-language-switcher-
|
|
1
|
+
import { n as e, r as t, t as n } from "../s-language-switcher-vievp2VS.js";
|
|
2
2
|
export { n as SLanguagePopover, e as SLanguageSwitcher, e as default, t as defaultLanguageOptions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "../s-language-switcher-
|
|
1
|
+
import { n as e, r as t, t as n } from "../s-language-switcher-vievp2VS.js";
|
|
2
2
|
export { n as SLanguagePopover, e as SLanguageSwitcher, e as default, t as defaultLanguageOptions };
|
|
@@ -6,8 +6,8 @@ import { t as o } from "./styled-BTDmdi4c.js";
|
|
|
6
6
|
import { u as s } from "./Modal-C1VRVWBZ.js";
|
|
7
7
|
import { t as c } from "./Menu-C-0KEauj.js";
|
|
8
8
|
import { t as l } from "./Typography-EsraKPZO.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { SIconButton as u } from "./s-icon-button/s-icon-button.js";
|
|
10
|
+
import { r as d, t as f } from "./MenuItem-DWivWkNb.js";
|
|
11
11
|
import * as p from "react";
|
|
12
12
|
import m, { createElement as h } from "react";
|
|
13
13
|
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
@@ -15,7 +15,7 @@ import { useTranslation as v } from "react-i18next";
|
|
|
15
15
|
//#region ../../node_modules/@mui/material/ListItemIcon/ListItemIcon.mjs
|
|
16
16
|
var y = /* @__PURE__ */ e(t(), 1), b = (e) => {
|
|
17
17
|
let { alignItems: t, classes: r } = e;
|
|
18
|
-
return n({ root: ["root", t === "flex-start" && "alignItemsFlexStart"] },
|
|
18
|
+
return n({ root: ["root", t === "flex-start" && "alignItemsFlexStart"] }, d, r);
|
|
19
19
|
}, x = o("div", {
|
|
20
20
|
name: "MuiListItemIcon",
|
|
21
21
|
slot: "Root",
|
|
@@ -133,7 +133,7 @@ var T = [
|
|
|
133
133
|
horizontal: "right",
|
|
134
134
|
vertical: "top"
|
|
135
135
|
},
|
|
136
|
-
children: i.map((e) => /* @__PURE__ */ _(
|
|
136
|
+
children: i.map((e) => /* @__PURE__ */ _(f, {
|
|
137
137
|
onClick: () => {
|
|
138
138
|
u(e.code);
|
|
139
139
|
},
|
|
@@ -154,14 +154,14 @@ var T = [
|
|
|
154
154
|
}, e.code))
|
|
155
155
|
});
|
|
156
156
|
}, M = ({ languages: e = A, onLanguageChange: t, currentLanguage: n, tooltipText: r, buttonFlagSize: i = 16, menuFlagSize: a = 20, menuWidth: o = "220px", sx: s, useI18n: c = !0 }) => {
|
|
157
|
-
let l = v(),
|
|
157
|
+
let l = v(), d = c ? l.t : null, f = c ? l.i18n : null, [p, h] = m.useState(null), y = n ?? f?.language ?? e[0]?.code ?? "en", b = e.find((e) => e.code === y) || e[0], x = m.useCallback((e) => {
|
|
158
158
|
h(e.currentTarget);
|
|
159
159
|
}, []), S = m.useCallback(() => {
|
|
160
160
|
h(null);
|
|
161
161
|
}, []), C = m.useCallback((e) => {
|
|
162
|
-
t ? t(e) :
|
|
163
|
-
}, [t,
|
|
164
|
-
return /* @__PURE__ */ _(m.Fragment, { children: [/* @__PURE__ */ g(
|
|
162
|
+
t ? t(e) : f && f.changeLanguage(e);
|
|
163
|
+
}, [t, f]), w = r ?? (d ? d("header:language.tooltip") : "Change language");
|
|
164
|
+
return /* @__PURE__ */ _(m.Fragment, { children: [/* @__PURE__ */ g(u, {
|
|
165
165
|
onClick: x,
|
|
166
166
|
sx: {
|
|
167
167
|
display: {
|
package/dist/s-link/s-link.js
CHANGED
|
@@ -14,7 +14,11 @@ var i = ({ onClick: i, beforeText: a = "", afterText: o = "", mainText: s = "",
|
|
|
14
14
|
onClick: i,
|
|
15
15
|
sx: {
|
|
16
16
|
cursor: "pointer",
|
|
17
|
-
fontSize: "inherit"
|
|
17
|
+
fontSize: "inherit",
|
|
18
|
+
textDecoration: "none",
|
|
19
|
+
textUnderlineOffset: "4px",
|
|
20
|
+
"&::before": { display: "none" },
|
|
21
|
+
"&:hover": { textDecoration: "underline" }
|
|
18
22
|
},
|
|
19
23
|
component: l,
|
|
20
24
|
target: u,
|
|
@@ -3,77 +3,86 @@ import { t } from "../Typography-EsraKPZO.js";
|
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
5
|
//#region lib/s-nav-item/s-nav-item.tsx
|
|
6
|
-
var i = ({ active: i, disabled: a, external: o, href: s, icon: c, onClick: l, rightAction: u, title: d, component: f, sx: p, innerSx: m, titleSx: h }) =>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
6
|
+
var i = ({ active: i, disabled: a, external: o, href: s, icon: c, onClick: l, rightAction: u, title: d, component: f, sx: p, innerSx: m, titleSx: h }) => {
|
|
7
|
+
let g = a ? void 0 : l, _ = s ? {
|
|
8
|
+
component: o ? "a" : f ?? "a",
|
|
9
|
+
href: a ? void 0 : s,
|
|
10
|
+
target: o ? "_blank" : void 0,
|
|
11
|
+
rel: o ? "noreferrer" : void 0,
|
|
12
|
+
onClick: g
|
|
13
|
+
} : {
|
|
14
|
+
role: "button",
|
|
15
|
+
component: "div",
|
|
16
|
+
onClick: g,
|
|
17
|
+
onKeyDown: (e) => {
|
|
18
|
+
a || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), l?.());
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
return /* @__PURE__ */ n(e, {
|
|
22
|
+
component: "li",
|
|
24
23
|
sx: {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
cursor: a ? "not-allowed" : "pointer",
|
|
29
|
-
display: "flex",
|
|
30
|
-
flex: "0 0 auto",
|
|
31
|
-
gap: 1,
|
|
32
|
-
justifyContent: "space-between",
|
|
33
|
-
p: 1.5,
|
|
34
|
-
textDecoration: "none",
|
|
35
|
-
whiteSpace: "nowrap",
|
|
36
|
-
...a && { color: "var(--s-palette-text-disabled)" },
|
|
37
|
-
...i && {
|
|
38
|
-
bgcolor: "var(--s-palette-action-selected)",
|
|
39
|
-
color: "var(--s-palette-text-primary)"
|
|
40
|
-
},
|
|
41
|
-
"&:hover": { ...!i && !a && {
|
|
42
|
-
bgcolor: "var(--s-palette-action-hover)",
|
|
43
|
-
color: "var(--s-palette-text-primary)"
|
|
44
|
-
} },
|
|
45
|
-
...m
|
|
24
|
+
userSelect: "none",
|
|
25
|
+
display: "block",
|
|
26
|
+
...p
|
|
46
27
|
},
|
|
47
|
-
|
|
48
|
-
|
|
28
|
+
children: /* @__PURE__ */ r(e, {
|
|
29
|
+
..._,
|
|
30
|
+
"aria-current": i ? "page" : void 0,
|
|
31
|
+
"aria-disabled": a || void 0,
|
|
49
32
|
sx: {
|
|
50
33
|
alignItems: "center",
|
|
34
|
+
borderRadius: 1,
|
|
35
|
+
color: "text.secondary",
|
|
36
|
+
cursor: a ? "not-allowed" : "pointer",
|
|
51
37
|
display: "flex",
|
|
52
|
-
|
|
38
|
+
flex: "0 0 auto",
|
|
39
|
+
gap: 1,
|
|
40
|
+
justifyContent: "space-between",
|
|
41
|
+
p: 1.5,
|
|
42
|
+
textDecoration: "none",
|
|
43
|
+
whiteSpace: "nowrap",
|
|
44
|
+
...a && { color: "text.disabled" },
|
|
45
|
+
...i && {
|
|
46
|
+
bgcolor: "action.selected",
|
|
47
|
+
color: "text.primary"
|
|
48
|
+
},
|
|
49
|
+
"&:hover": { ...!i && !a && {
|
|
50
|
+
bgcolor: "action.hover",
|
|
51
|
+
color: "text.primary"
|
|
52
|
+
} },
|
|
53
|
+
...m
|
|
53
54
|
},
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
tabIndex: a ? -1 : 0,
|
|
56
|
+
children: [/* @__PURE__ */ r(e, {
|
|
56
57
|
sx: {
|
|
57
|
-
display: "flex",
|
|
58
58
|
alignItems: "center",
|
|
59
|
-
|
|
59
|
+
display: "flex",
|
|
60
|
+
gap: 1
|
|
60
61
|
},
|
|
61
|
-
children: c
|
|
62
|
-
|
|
62
|
+
children: [c ? /* @__PURE__ */ n(e, {
|
|
63
|
+
component: "span",
|
|
64
|
+
sx: {
|
|
65
|
+
display: "flex",
|
|
66
|
+
alignItems: "center",
|
|
67
|
+
justifyContent: "center"
|
|
68
|
+
},
|
|
69
|
+
children: c
|
|
70
|
+
}) : null, /* @__PURE__ */ n(t, {
|
|
71
|
+
component: "span",
|
|
72
|
+
sx: { ...h },
|
|
73
|
+
children: d
|
|
74
|
+
})]
|
|
75
|
+
}), u ? /* @__PURE__ */ n(e, {
|
|
63
76
|
component: "span",
|
|
64
|
-
sx: {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
children: u
|
|
74
|
-
}) : null]
|
|
75
|
-
})
|
|
76
|
-
});
|
|
77
|
+
sx: {
|
|
78
|
+
display: "flex",
|
|
79
|
+
alignItems: "center"
|
|
80
|
+
},
|
|
81
|
+
children: u
|
|
82
|
+
}) : null]
|
|
83
|
+
})
|
|
84
|
+
});
|
|
85
|
+
};
|
|
77
86
|
i.displayName = "SNavItem";
|
|
78
87
|
//#endregion
|
|
79
88
|
export { i as SNavItem, i as default };
|
|
@@ -51,7 +51,7 @@ function f({ item: t, pathname: l, depth: u, component: f }) {
|
|
|
51
51
|
background: "transparent",
|
|
52
52
|
border: 0,
|
|
53
53
|
borderRadius: 1,
|
|
54
|
-
color: y ? "
|
|
54
|
+
color: y ? "text.primary" : "text.secondary",
|
|
55
55
|
cursor: t.disabled ? "not-allowed" : "pointer",
|
|
56
56
|
display: "flex",
|
|
57
57
|
flex: "0 0 auto",
|
|
@@ -65,11 +65,11 @@ function f({ item: t, pathname: l, depth: u, component: f }) {
|
|
|
65
65
|
textDecoration: "none",
|
|
66
66
|
whiteSpace: "nowrap",
|
|
67
67
|
width: "100%",
|
|
68
|
-
...t.disabled && { color: "
|
|
69
|
-
...y && { bgcolor: "
|
|
68
|
+
...t.disabled && { color: "text.disabled" },
|
|
69
|
+
...y && { bgcolor: "action.selected" },
|
|
70
70
|
"&:hover": { ...!y && !t.disabled && {
|
|
71
|
-
bgcolor: "
|
|
72
|
-
color: "
|
|
71
|
+
bgcolor: "action.hover",
|
|
72
|
+
color: "text.primary"
|
|
73
73
|
} }
|
|
74
74
|
},
|
|
75
75
|
onKeyDown: (e) => {
|
|
@@ -104,7 +104,7 @@ function f({ item: t, pathname: l, depth: u, component: f }) {
|
|
|
104
104
|
sx: {
|
|
105
105
|
display: "flex",
|
|
106
106
|
alignItems: "center",
|
|
107
|
-
color: "
|
|
107
|
+
color: "text.secondary",
|
|
108
108
|
transition: "transform 200ms ease",
|
|
109
109
|
transform: _ ? "rotate(0deg)" : "rotate(-90deg)"
|
|
110
110
|
},
|
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-Ca6JUgGr.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-Ca6JUgGr.js";
|
|
2
2
|
export { e as SReview, e as default };
|