@solostylist/ui-kit 1.0.227 → 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.
- 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/s-pagination.js +2 -2
- 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 +1 -1
- package/dist/theme/components/month-calendar.d.ts +2 -0
- package/dist/theme/components/month-calendar.js +3 -1
- 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
package/package.json
CHANGED
package/dist/Menu-Ct_sL_Dg.js
DELETED
|
@@ -1,497 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./chunk-C_CI6nMA.js";
|
|
2
|
-
import { _ as t } from "./createTheme-Bnw5w28O.js";
|
|
3
|
-
import { o as n, r } from "./memoTheme-QMocAblm.js";
|
|
4
|
-
import { t as i } from "./clsx-Bv8WXdlr.js";
|
|
5
|
-
import { t as a } from "./generateUtilityClass-tRYNDrlH.js";
|
|
6
|
-
import { t as o } from "./generateUtilityClasses-XrPHiTcM.js";
|
|
7
|
-
import { n as s, t as c } from "./styled-BTDmdi4c.js";
|
|
8
|
-
import { C as l, c as u, p as d, s as f, t as p, x as m } from "./Modal-Cu5Cgh-q.js";
|
|
9
|
-
import { i as h } from "./ButtonBase-BDefit5I.js";
|
|
10
|
-
import { p as g, s as _, t as v } from "./useSlot-IwEDsR9t.js";
|
|
11
|
-
import { d as y, f as b, p as x, t as S } from "./MenuList-5C2nFAWS.js";
|
|
12
|
-
import { t as C } from "./mergeSlotProps-slENzJO5.js";
|
|
13
|
-
import { n as w, t as T } from "./Paper-CPC6sMxx.js";
|
|
14
|
-
import * as E from "react";
|
|
15
|
-
import { jsx as D } from "react/jsx-runtime";
|
|
16
|
-
//#region ../../node_modules/@mui/material/Popover/popoverClasses.mjs
|
|
17
|
-
var O = /* @__PURE__ */ e(t(), 1);
|
|
18
|
-
function k(e) {
|
|
19
|
-
return a("MuiPopover", e);
|
|
20
|
-
}
|
|
21
|
-
o("MuiPopover", ["root", "paper"]);
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region ../../node_modules/@mui/material/Popover/Popover.mjs
|
|
24
|
-
function A(e, t) {
|
|
25
|
-
let n = 0;
|
|
26
|
-
return typeof t == "number" ? n = t : t === "center" ? n = e.height / 2 : t === "bottom" && (n = e.height), n;
|
|
27
|
-
}
|
|
28
|
-
function j(e, t) {
|
|
29
|
-
let n = 0;
|
|
30
|
-
return typeof t == "number" ? n = t : t === "center" ? n = e.width / 2 : t === "right" && (n = e.width), n;
|
|
31
|
-
}
|
|
32
|
-
function M(e) {
|
|
33
|
-
return [e.horizontal, e.vertical].map((e) => typeof e == "number" ? `${e}px` : e).join(" ");
|
|
34
|
-
}
|
|
35
|
-
function N(e) {
|
|
36
|
-
return typeof e == "function" ? e() : e;
|
|
37
|
-
}
|
|
38
|
-
var P = (e) => {
|
|
39
|
-
let { classes: t } = e;
|
|
40
|
-
return n({
|
|
41
|
-
root: ["root"],
|
|
42
|
-
paper: ["paper"]
|
|
43
|
-
}, k, t);
|
|
44
|
-
}, F = c(p, {
|
|
45
|
-
name: "MuiPopover",
|
|
46
|
-
slot: "Root"
|
|
47
|
-
})({}), I = c(T, {
|
|
48
|
-
name: "MuiPopover",
|
|
49
|
-
slot: "Paper"
|
|
50
|
-
})({
|
|
51
|
-
position: "absolute",
|
|
52
|
-
overflowY: "auto",
|
|
53
|
-
overflowX: "hidden",
|
|
54
|
-
minWidth: 16,
|
|
55
|
-
minHeight: 16,
|
|
56
|
-
maxWidth: "calc(100% - 32px)",
|
|
57
|
-
maxHeight: "calc(100% - 32px)",
|
|
58
|
-
outline: 0
|
|
59
|
-
}), L = /* @__PURE__ */ E.forwardRef(function(e, t) {
|
|
60
|
-
let n = r({
|
|
61
|
-
props: e,
|
|
62
|
-
name: "MuiPopover"
|
|
63
|
-
}), { action: a, anchorEl: o, anchorOrigin: s = {
|
|
64
|
-
vertical: "top",
|
|
65
|
-
horizontal: "left"
|
|
66
|
-
}, anchorPosition: c, anchorReference: l = "anchorEl", children: d, className: p, container: m, disableAutoFocus: h = !1, elevation: _ = 8, marginThreshold: S = 16, open: w, slots: T = {}, slotProps: O = {}, transformOrigin: k = {
|
|
67
|
-
vertical: "top",
|
|
68
|
-
horizontal: "left"
|
|
69
|
-
}, transitionDuration: L = "auto", disableScrollLock: R = !1, ...z } = n, B = E.useRef(), V = {
|
|
70
|
-
...n,
|
|
71
|
-
anchorOrigin: s,
|
|
72
|
-
anchorReference: l,
|
|
73
|
-
elevation: _,
|
|
74
|
-
marginThreshold: S,
|
|
75
|
-
transformOrigin: k,
|
|
76
|
-
transitionDuration: L
|
|
77
|
-
}, H = P(V), U = E.useCallback(() => {
|
|
78
|
-
if (l === "anchorPosition") return process.env.NODE_ENV !== "production" && (c || console.error("MUI: You need to provide a `anchorPosition` prop when using <Popover anchorReference=\"anchorPosition\" />.")), c;
|
|
79
|
-
let e = N(o), t = e && e.nodeType === 1 ? e : b(B.current).body, n = t.getBoundingClientRect();
|
|
80
|
-
if (process.env.NODE_ENV !== "production") {
|
|
81
|
-
let e = t.getBoundingClientRect();
|
|
82
|
-
u() && e.top === 0 && e.left === 0 && e.right === 0 && e.bottom === 0 && console.warn([
|
|
83
|
-
"MUI: The `anchorEl` prop provided to the component is invalid.",
|
|
84
|
-
"The anchor element should be part of the document layout.",
|
|
85
|
-
"Make sure the element is present in the document or that it's not display none."
|
|
86
|
-
].join("\n"));
|
|
87
|
-
}
|
|
88
|
-
return {
|
|
89
|
-
top: n.top + A(n, s.vertical),
|
|
90
|
-
left: n.left + j(n, s.horizontal)
|
|
91
|
-
};
|
|
92
|
-
}, [
|
|
93
|
-
o,
|
|
94
|
-
s.horizontal,
|
|
95
|
-
s.vertical,
|
|
96
|
-
c,
|
|
97
|
-
l
|
|
98
|
-
]), W = E.useCallback((e) => ({
|
|
99
|
-
vertical: A(e, k.vertical),
|
|
100
|
-
horizontal: j(e, k.horizontal)
|
|
101
|
-
}), [k.horizontal, k.vertical]), G = E.useCallback((e) => {
|
|
102
|
-
let t = {
|
|
103
|
-
width: e.offsetWidth,
|
|
104
|
-
height: e.offsetHeight
|
|
105
|
-
}, n = W(t);
|
|
106
|
-
if (l === "none") return {
|
|
107
|
-
top: null,
|
|
108
|
-
left: null,
|
|
109
|
-
transformOrigin: M(n)
|
|
110
|
-
};
|
|
111
|
-
let r = U(), i = r.top - n.vertical, a = r.left - n.horizontal, s = i + t.height, c = a + t.width, u = y(N(o)), d = u.innerHeight - S, f = u.innerWidth - S;
|
|
112
|
-
if (S != null && i < S) {
|
|
113
|
-
let e = i - S;
|
|
114
|
-
i -= e, n.vertical += e;
|
|
115
|
-
} else if (S != null && s > d) {
|
|
116
|
-
let e = s - d;
|
|
117
|
-
i -= e, n.vertical += e;
|
|
118
|
-
}
|
|
119
|
-
if (process.env.NODE_ENV !== "production" && t.height > d && t.height && d && console.error([
|
|
120
|
-
"MUI: The popover component is too tall.",
|
|
121
|
-
`Some part of it can not be seen on the screen (${t.height - d}px).`,
|
|
122
|
-
"Please consider adding a `max-height` to improve the user-experience."
|
|
123
|
-
].join("\n")), S != null && a < S) {
|
|
124
|
-
let e = a - S;
|
|
125
|
-
a -= e, n.horizontal += e;
|
|
126
|
-
} else if (c > f) {
|
|
127
|
-
let e = c - f;
|
|
128
|
-
a -= e, n.horizontal += e;
|
|
129
|
-
}
|
|
130
|
-
return {
|
|
131
|
-
top: `${Math.round(i)}px`,
|
|
132
|
-
left: `${Math.round(a)}px`,
|
|
133
|
-
transformOrigin: M(n)
|
|
134
|
-
};
|
|
135
|
-
}, [
|
|
136
|
-
o,
|
|
137
|
-
l,
|
|
138
|
-
U,
|
|
139
|
-
W,
|
|
140
|
-
S
|
|
141
|
-
]), [K, q] = E.useState(w), J = E.useCallback(() => {
|
|
142
|
-
let e = B.current;
|
|
143
|
-
if (!e) return;
|
|
144
|
-
let t = G(e);
|
|
145
|
-
t.top != null && e.style.setProperty("top", t.top), t.left != null && (e.style.left = t.left), e.style.transformOrigin = t.transformOrigin, q(!0);
|
|
146
|
-
}, [G]);
|
|
147
|
-
E.useEffect(() => (R && window.addEventListener("scroll", J), () => window.removeEventListener("scroll", J)), [
|
|
148
|
-
o,
|
|
149
|
-
R,
|
|
150
|
-
J
|
|
151
|
-
]);
|
|
152
|
-
let Y = () => {
|
|
153
|
-
J();
|
|
154
|
-
}, ee = () => {
|
|
155
|
-
q(!1);
|
|
156
|
-
};
|
|
157
|
-
E.useEffect(() => {
|
|
158
|
-
w && J();
|
|
159
|
-
}), E.useImperativeHandle(a, () => w ? { updatePosition: () => {
|
|
160
|
-
J();
|
|
161
|
-
} } : null, [w, J]), E.useEffect(() => {
|
|
162
|
-
if (!w) return;
|
|
163
|
-
let e = x(() => {
|
|
164
|
-
J();
|
|
165
|
-
}), t = y(N(o));
|
|
166
|
-
return t.addEventListener("resize", e), () => {
|
|
167
|
-
e.clear(), t.removeEventListener("resize", e);
|
|
168
|
-
};
|
|
169
|
-
}, [
|
|
170
|
-
o,
|
|
171
|
-
w,
|
|
172
|
-
J
|
|
173
|
-
]);
|
|
174
|
-
let X = L, Z = {
|
|
175
|
-
slots: T,
|
|
176
|
-
slotProps: O
|
|
177
|
-
}, [Q, te] = v("transition", {
|
|
178
|
-
elementType: f,
|
|
179
|
-
externalForwardedProps: Z,
|
|
180
|
-
ownerState: V,
|
|
181
|
-
getSlotProps: (e) => ({
|
|
182
|
-
...e,
|
|
183
|
-
onEntering: (t, n) => {
|
|
184
|
-
e.onEntering?.(t, n), Y();
|
|
185
|
-
},
|
|
186
|
-
onExited: (t) => {
|
|
187
|
-
e.onExited?.(t), ee();
|
|
188
|
-
}
|
|
189
|
-
}),
|
|
190
|
-
additionalProps: {
|
|
191
|
-
appear: !0,
|
|
192
|
-
in: w
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
L === "auto" && !Q.muiSupportAuto && (X = void 0);
|
|
196
|
-
let ne = m || (o ? b(N(o)).body : void 0), [$, { slots: re, slotProps: ie, ...ae }] = v("root", {
|
|
197
|
-
ref: t,
|
|
198
|
-
elementType: F,
|
|
199
|
-
externalForwardedProps: {
|
|
200
|
-
...Z,
|
|
201
|
-
...z
|
|
202
|
-
},
|
|
203
|
-
shouldForwardComponentProp: !0,
|
|
204
|
-
additionalProps: {
|
|
205
|
-
slots: { backdrop: T.backdrop },
|
|
206
|
-
slotProps: { backdrop: C(typeof O.backdrop == "function" ? O.backdrop(V) : O.backdrop, { invisible: !0 }) },
|
|
207
|
-
container: ne,
|
|
208
|
-
open: w
|
|
209
|
-
},
|
|
210
|
-
ownerState: V,
|
|
211
|
-
className: i(H.root, p)
|
|
212
|
-
}), [oe, se] = v("paper", {
|
|
213
|
-
ref: B,
|
|
214
|
-
className: H.paper,
|
|
215
|
-
elementType: I,
|
|
216
|
-
externalForwardedProps: Z,
|
|
217
|
-
shouldForwardComponentProp: !0,
|
|
218
|
-
additionalProps: {
|
|
219
|
-
elevation: _,
|
|
220
|
-
style: K ? void 0 : { opacity: 0 }
|
|
221
|
-
},
|
|
222
|
-
ownerState: V
|
|
223
|
-
});
|
|
224
|
-
return /* @__PURE__ */ D($, {
|
|
225
|
-
...ae,
|
|
226
|
-
...!g($) && {
|
|
227
|
-
slots: re,
|
|
228
|
-
slotProps: ie,
|
|
229
|
-
disableAutoFocus: h,
|
|
230
|
-
disableScrollLock: R
|
|
231
|
-
},
|
|
232
|
-
children: /* @__PURE__ */ D(Q, {
|
|
233
|
-
...te,
|
|
234
|
-
timeout: X,
|
|
235
|
-
children: /* @__PURE__ */ D(oe, {
|
|
236
|
-
...se,
|
|
237
|
-
children: d
|
|
238
|
-
})
|
|
239
|
-
})
|
|
240
|
-
});
|
|
241
|
-
});
|
|
242
|
-
process.env.NODE_ENV !== "production" && (L.propTypes = {
|
|
243
|
-
action: h,
|
|
244
|
-
anchorEl: _(O.default.oneOfType([d, O.default.func]), (e) => {
|
|
245
|
-
if (e.open && (!e.anchorReference || e.anchorReference === "anchorEl")) {
|
|
246
|
-
let t = N(e.anchorEl);
|
|
247
|
-
if (t && t.nodeType === 1) {
|
|
248
|
-
let e = t.getBoundingClientRect();
|
|
249
|
-
if (process.env.NODE_ENV !== "production" && u() && e.top === 0 && e.left === 0 && e.right === 0 && e.bottom === 0) return Error([
|
|
250
|
-
"MUI: The `anchorEl` prop provided to the component is invalid.",
|
|
251
|
-
"The anchor element should be part of the document layout.",
|
|
252
|
-
"Make sure the element is present in the document or that it's not display none."
|
|
253
|
-
].join("\n"));
|
|
254
|
-
} else return Error(["MUI: The `anchorEl` prop provided to the component is invalid.", `It should be an Element or PopoverVirtualElement instance but it's \`${t}\` instead.`].join("\n"));
|
|
255
|
-
}
|
|
256
|
-
return null;
|
|
257
|
-
}),
|
|
258
|
-
anchorOrigin: O.default.shape({
|
|
259
|
-
horizontal: O.default.oneOfType([O.default.oneOf([
|
|
260
|
-
"center",
|
|
261
|
-
"left",
|
|
262
|
-
"right"
|
|
263
|
-
]), O.default.number]).isRequired,
|
|
264
|
-
vertical: O.default.oneOfType([O.default.oneOf([
|
|
265
|
-
"bottom",
|
|
266
|
-
"center",
|
|
267
|
-
"top"
|
|
268
|
-
]), O.default.number]).isRequired
|
|
269
|
-
}),
|
|
270
|
-
anchorPosition: O.default.shape({
|
|
271
|
-
left: O.default.number.isRequired,
|
|
272
|
-
top: O.default.number.isRequired
|
|
273
|
-
}),
|
|
274
|
-
anchorReference: O.default.oneOf([
|
|
275
|
-
"anchorEl",
|
|
276
|
-
"anchorPosition",
|
|
277
|
-
"none"
|
|
278
|
-
]),
|
|
279
|
-
children: O.default.node,
|
|
280
|
-
classes: O.default.object,
|
|
281
|
-
className: O.default.string,
|
|
282
|
-
container: O.default.oneOfType([d, O.default.func]),
|
|
283
|
-
disableAutoFocus: O.default.bool,
|
|
284
|
-
disableScrollLock: O.default.bool,
|
|
285
|
-
elevation: w,
|
|
286
|
-
marginThreshold: O.default.number,
|
|
287
|
-
onClose: O.default.func,
|
|
288
|
-
open: O.default.bool.isRequired,
|
|
289
|
-
slotProps: O.default.shape({
|
|
290
|
-
backdrop: O.default.oneOfType([O.default.func, O.default.object]),
|
|
291
|
-
paper: O.default.oneOfType([O.default.func, O.default.object]),
|
|
292
|
-
root: O.default.oneOfType([O.default.func, O.default.object]),
|
|
293
|
-
transition: O.default.oneOfType([O.default.func, O.default.object])
|
|
294
|
-
}),
|
|
295
|
-
slots: O.default.shape({
|
|
296
|
-
backdrop: O.default.elementType,
|
|
297
|
-
paper: O.default.elementType,
|
|
298
|
-
root: O.default.elementType,
|
|
299
|
-
transition: O.default.elementType
|
|
300
|
-
}),
|
|
301
|
-
sx: O.default.oneOfType([
|
|
302
|
-
O.default.arrayOf(O.default.oneOfType([
|
|
303
|
-
O.default.func,
|
|
304
|
-
O.default.object,
|
|
305
|
-
O.default.bool
|
|
306
|
-
])),
|
|
307
|
-
O.default.func,
|
|
308
|
-
O.default.object
|
|
309
|
-
]),
|
|
310
|
-
transformOrigin: O.default.shape({
|
|
311
|
-
horizontal: O.default.oneOfType([O.default.oneOf([
|
|
312
|
-
"center",
|
|
313
|
-
"left",
|
|
314
|
-
"right"
|
|
315
|
-
]), O.default.number]).isRequired,
|
|
316
|
-
vertical: O.default.oneOfType([O.default.oneOf([
|
|
317
|
-
"bottom",
|
|
318
|
-
"center",
|
|
319
|
-
"top"
|
|
320
|
-
]), O.default.number]).isRequired
|
|
321
|
-
}),
|
|
322
|
-
transitionDuration: O.default.oneOfType([
|
|
323
|
-
O.default.oneOf(["auto"]),
|
|
324
|
-
O.default.number,
|
|
325
|
-
O.default.shape({
|
|
326
|
-
appear: O.default.number,
|
|
327
|
-
enter: O.default.number,
|
|
328
|
-
exit: O.default.number
|
|
329
|
-
})
|
|
330
|
-
])
|
|
331
|
-
});
|
|
332
|
-
//#endregion
|
|
333
|
-
//#region ../../node_modules/@mui/material/Menu/menuClasses.mjs
|
|
334
|
-
function R(e) {
|
|
335
|
-
return a("MuiMenu", e);
|
|
336
|
-
}
|
|
337
|
-
o("MuiMenu", [
|
|
338
|
-
"root",
|
|
339
|
-
"paper",
|
|
340
|
-
"list"
|
|
341
|
-
]);
|
|
342
|
-
//#endregion
|
|
343
|
-
//#region ../../node_modules/@mui/material/Menu/Menu.mjs
|
|
344
|
-
var z = {
|
|
345
|
-
vertical: "top",
|
|
346
|
-
horizontal: "right"
|
|
347
|
-
}, B = {
|
|
348
|
-
vertical: "top",
|
|
349
|
-
horizontal: "left"
|
|
350
|
-
}, V = (e) => {
|
|
351
|
-
let { classes: t } = e;
|
|
352
|
-
return n({
|
|
353
|
-
root: ["root"],
|
|
354
|
-
paper: ["paper"],
|
|
355
|
-
list: ["list"]
|
|
356
|
-
}, R, t);
|
|
357
|
-
}, H = c(L, {
|
|
358
|
-
shouldForwardProp: (e) => s(e) || e === "classes",
|
|
359
|
-
name: "MuiMenu",
|
|
360
|
-
slot: "Root"
|
|
361
|
-
})({}), U = c(I, {
|
|
362
|
-
name: "MuiMenu",
|
|
363
|
-
slot: "Paper"
|
|
364
|
-
})({
|
|
365
|
-
maxHeight: "calc(100% - 96px)",
|
|
366
|
-
WebkitOverflowScrolling: "touch"
|
|
367
|
-
}), W = c(S, {
|
|
368
|
-
name: "MuiMenu",
|
|
369
|
-
slot: "List"
|
|
370
|
-
})({ outline: 0 }), G = /* @__PURE__ */ E.forwardRef(function(e, t) {
|
|
371
|
-
let n = r({
|
|
372
|
-
props: e,
|
|
373
|
-
name: "MuiMenu"
|
|
374
|
-
}), { autoFocus: i = !0, children: a, className: o, disableAutoFocusItem: s = !1, onClose: c, open: u, PopoverClasses: d, transitionDuration: f = "auto", variant: p = "selectedMenu", slots: h = {}, slotProps: g = {}, ..._ } = n, y = l(), b = {
|
|
375
|
-
...n,
|
|
376
|
-
autoFocus: i,
|
|
377
|
-
disableAutoFocusItem: s,
|
|
378
|
-
transitionDuration: f,
|
|
379
|
-
variant: p
|
|
380
|
-
}, x = V(b), S = i && u, C = S && !s, w = E.useRef(null), T = (e, t) => {
|
|
381
|
-
w.current && (w.current.adjustStyleForScrollbar(e, { direction: y ? "rtl" : "ltr" }), S && w.current.focusInitialTarget?.());
|
|
382
|
-
}, O = (e) => {
|
|
383
|
-
e.key === "Tab" && (e.preventDefault(), c && c(e, "tabKeyDown"));
|
|
384
|
-
}, k = {
|
|
385
|
-
slots: h,
|
|
386
|
-
slotProps: g
|
|
387
|
-
}, A = m({
|
|
388
|
-
elementType: h.root,
|
|
389
|
-
externalSlotProps: g.root,
|
|
390
|
-
ownerState: b,
|
|
391
|
-
className: [x.root, o]
|
|
392
|
-
}), [j, M] = v("paper", {
|
|
393
|
-
className: x.paper,
|
|
394
|
-
elementType: U,
|
|
395
|
-
externalForwardedProps: k,
|
|
396
|
-
shouldForwardComponentProp: !0,
|
|
397
|
-
ownerState: b
|
|
398
|
-
}), [N, P] = v("list", {
|
|
399
|
-
className: x.list,
|
|
400
|
-
elementType: W,
|
|
401
|
-
shouldForwardComponentProp: !0,
|
|
402
|
-
externalForwardedProps: k,
|
|
403
|
-
getSlotProps: (e) => ({
|
|
404
|
-
...e,
|
|
405
|
-
onKeyDown: (t) => {
|
|
406
|
-
O(t), e.onKeyDown?.(t);
|
|
407
|
-
}
|
|
408
|
-
}),
|
|
409
|
-
ownerState: b
|
|
410
|
-
}), F = typeof g.transition == "function" ? g.transition(b) : g.transition;
|
|
411
|
-
return /* @__PURE__ */ D(H, {
|
|
412
|
-
disableAutoFocus: i,
|
|
413
|
-
onClose: c,
|
|
414
|
-
anchorOrigin: {
|
|
415
|
-
vertical: "bottom",
|
|
416
|
-
horizontal: y ? "right" : "left"
|
|
417
|
-
},
|
|
418
|
-
transformOrigin: y ? z : B,
|
|
419
|
-
slots: {
|
|
420
|
-
root: h.root,
|
|
421
|
-
paper: j,
|
|
422
|
-
backdrop: h.backdrop,
|
|
423
|
-
transition: h.transition
|
|
424
|
-
},
|
|
425
|
-
slotProps: {
|
|
426
|
-
root: A,
|
|
427
|
-
paper: M,
|
|
428
|
-
backdrop: typeof g.backdrop == "function" ? g.backdrop(b) : g.backdrop,
|
|
429
|
-
transition: {
|
|
430
|
-
...F,
|
|
431
|
-
onEntering: (...e) => {
|
|
432
|
-
T(...e), F?.onEntering?.(...e);
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
},
|
|
436
|
-
open: u,
|
|
437
|
-
ref: t,
|
|
438
|
-
transitionDuration: f,
|
|
439
|
-
ownerState: b,
|
|
440
|
-
..._,
|
|
441
|
-
classes: d,
|
|
442
|
-
children: /* @__PURE__ */ D(N, {
|
|
443
|
-
actions: w,
|
|
444
|
-
autoFocus: S,
|
|
445
|
-
autoFocusItem: C,
|
|
446
|
-
variant: p,
|
|
447
|
-
...P,
|
|
448
|
-
children: a
|
|
449
|
-
})
|
|
450
|
-
});
|
|
451
|
-
});
|
|
452
|
-
process.env.NODE_ENV !== "production" && (G.propTypes = {
|
|
453
|
-
anchorEl: O.default.oneOfType([d, O.default.func]),
|
|
454
|
-
autoFocus: O.default.bool,
|
|
455
|
-
children: O.default.node,
|
|
456
|
-
classes: O.default.object,
|
|
457
|
-
className: O.default.string,
|
|
458
|
-
disableAutoFocusItem: O.default.bool,
|
|
459
|
-
onClose: O.default.func,
|
|
460
|
-
open: O.default.bool.isRequired,
|
|
461
|
-
PopoverClasses: O.default.object,
|
|
462
|
-
slotProps: O.default.shape({
|
|
463
|
-
backdrop: O.default.oneOfType([O.default.func, O.default.object]),
|
|
464
|
-
list: O.default.oneOfType([O.default.func, O.default.object]),
|
|
465
|
-
paper: O.default.oneOfType([O.default.func, O.default.object]),
|
|
466
|
-
root: O.default.oneOfType([O.default.func, O.default.object]),
|
|
467
|
-
transition: O.default.oneOfType([O.default.func, O.default.object])
|
|
468
|
-
}),
|
|
469
|
-
slots: O.default.shape({
|
|
470
|
-
backdrop: O.default.elementType,
|
|
471
|
-
list: O.default.elementType,
|
|
472
|
-
paper: O.default.elementType,
|
|
473
|
-
root: O.default.elementType,
|
|
474
|
-
transition: O.default.elementType
|
|
475
|
-
}),
|
|
476
|
-
sx: O.default.oneOfType([
|
|
477
|
-
O.default.arrayOf(O.default.oneOfType([
|
|
478
|
-
O.default.func,
|
|
479
|
-
O.default.object,
|
|
480
|
-
O.default.bool
|
|
481
|
-
])),
|
|
482
|
-
O.default.func,
|
|
483
|
-
O.default.object
|
|
484
|
-
]),
|
|
485
|
-
transitionDuration: O.default.oneOfType([
|
|
486
|
-
O.default.oneOf(["auto"]),
|
|
487
|
-
O.default.number,
|
|
488
|
-
O.default.shape({
|
|
489
|
-
appear: O.default.number,
|
|
490
|
-
enter: O.default.number,
|
|
491
|
-
exit: O.default.number
|
|
492
|
-
})
|
|
493
|
-
]),
|
|
494
|
-
variant: O.default.oneOf(["menu", "selectedMenu"])
|
|
495
|
-
});
|
|
496
|
-
//#endregion
|
|
497
|
-
export { L as n, G as t };
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./chunk-C_CI6nMA.js";
|
|
2
|
-
import { _ as t } from "./createTheme-Bnw5w28O.js";
|
|
3
|
-
import { o as n, r, t as i } from "./memoTheme-QMocAblm.js";
|
|
4
|
-
import { t as a } from "./clsx-Bv8WXdlr.js";
|
|
5
|
-
import { t as o } from "./styled-BTDmdi4c.js";
|
|
6
|
-
import { u as s } from "./Modal-Cu5Cgh-q.js";
|
|
7
|
-
import { t as c } from "./Menu-Ct_sL_Dg.js";
|
|
8
|
-
import { t as l } from "./Typography-CZ_MYa-E.js";
|
|
9
|
-
import { SIconButton as u } from "./s-icon-button/s-icon-button.js";
|
|
10
|
-
import { r as d, t as f } from "./MenuItem-CwAhn4sd.js";
|
|
11
|
-
import * as p from "react";
|
|
12
|
-
import m, { createElement as h } from "react";
|
|
13
|
-
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
14
|
-
import { useTranslation as v } from "react-i18next";
|
|
15
|
-
//#region ../../node_modules/@mui/material/ListItemIcon/ListItemIcon.mjs
|
|
16
|
-
var y = /* @__PURE__ */ e(t(), 1), b = (e) => {
|
|
17
|
-
let { alignItems: t, classes: r } = e;
|
|
18
|
-
return n({ root: ["root", t === "flex-start" && "alignItemsFlexStart"] }, d, r);
|
|
19
|
-
}, x = o("div", {
|
|
20
|
-
name: "MuiListItemIcon",
|
|
21
|
-
slot: "Root",
|
|
22
|
-
overridesResolver: (e, t) => {
|
|
23
|
-
let { ownerState: n } = e;
|
|
24
|
-
return [t.root, n.alignItems === "flex-start" && t.alignItemsFlexStart];
|
|
25
|
-
}
|
|
26
|
-
})(i(({ theme: e }) => ({
|
|
27
|
-
minWidth: e.spacing(4.5),
|
|
28
|
-
color: (e.vars || e).palette.action.active,
|
|
29
|
-
flexShrink: 0,
|
|
30
|
-
display: "inline-flex",
|
|
31
|
-
variants: [{
|
|
32
|
-
props: { alignItems: "flex-start" },
|
|
33
|
-
style: { marginTop: 8 }
|
|
34
|
-
}]
|
|
35
|
-
}))), S = /* @__PURE__ */ p.forwardRef(function(e, t) {
|
|
36
|
-
let n = r({
|
|
37
|
-
props: e,
|
|
38
|
-
name: "MuiListItemIcon"
|
|
39
|
-
}), { className: i, ...o } = n, c = p.useContext(s), l = {
|
|
40
|
-
...n,
|
|
41
|
-
alignItems: c.alignItems
|
|
42
|
-
};
|
|
43
|
-
return /* @__PURE__ */ g(x, {
|
|
44
|
-
className: a(b(l).root, i),
|
|
45
|
-
ownerState: l,
|
|
46
|
-
ref: t,
|
|
47
|
-
...o
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
process.env.NODE_ENV !== "production" && (S.propTypes = {
|
|
51
|
-
children: y.default.node,
|
|
52
|
-
classes: y.default.object,
|
|
53
|
-
className: y.default.string,
|
|
54
|
-
sx: y.default.oneOfType([
|
|
55
|
-
y.default.arrayOf(y.default.oneOfType([
|
|
56
|
-
y.default.func,
|
|
57
|
-
y.default.object,
|
|
58
|
-
y.default.bool
|
|
59
|
-
])),
|
|
60
|
-
y.default.func,
|
|
61
|
-
y.default.object
|
|
62
|
-
])
|
|
63
|
-
});
|
|
64
|
-
//#endregion
|
|
65
|
-
//#region ../../node_modules/react-country-flag/dist/react-country-flag.esm.js
|
|
66
|
-
function C() {
|
|
67
|
-
return C = Object.assign ? Object.assign.bind() : function(e) {
|
|
68
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
69
|
-
var n = arguments[t];
|
|
70
|
-
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
71
|
-
}
|
|
72
|
-
return e;
|
|
73
|
-
}, C.apply(this, arguments);
|
|
74
|
-
}
|
|
75
|
-
function w(e, t) {
|
|
76
|
-
if (e == null) return {};
|
|
77
|
-
var n = {}, r = Object.keys(e), i, a;
|
|
78
|
-
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
79
|
-
return n;
|
|
80
|
-
}
|
|
81
|
-
var T = [
|
|
82
|
-
"cdnSuffix",
|
|
83
|
-
"cdnUrl",
|
|
84
|
-
"countryCode",
|
|
85
|
-
"style",
|
|
86
|
-
"svg"
|
|
87
|
-
], E = "https://cdn.jsdelivr.net/gh/lipis/flag-icons/flags/4x3/", D = "svg", O = 127397, k = function(e) {
|
|
88
|
-
var t = e.cdnSuffix, n = t === void 0 ? D : t, r = e.cdnUrl, i = r === void 0 ? E : r, a = e.countryCode, o = e.style, s = e.svg, c = s === void 0 ? !1 : s, l = w(e, T);
|
|
89
|
-
if (typeof a != "string") return null;
|
|
90
|
-
if (c) {
|
|
91
|
-
var u = "" + i + a.toLowerCase() + "." + n;
|
|
92
|
-
return h("img", Object.assign({}, l, {
|
|
93
|
-
src: u,
|
|
94
|
-
style: C({
|
|
95
|
-
display: "inline-block",
|
|
96
|
-
width: "1em",
|
|
97
|
-
height: "1em",
|
|
98
|
-
verticalAlign: "middle"
|
|
99
|
-
}, o)
|
|
100
|
-
}));
|
|
101
|
-
}
|
|
102
|
-
var d = a.toUpperCase().replace(/./g, function(e) {
|
|
103
|
-
return String.fromCodePoint(e.charCodeAt(0) + O);
|
|
104
|
-
});
|
|
105
|
-
return h("span", Object.assign({ role: "img" }, l, { style: C({
|
|
106
|
-
display: "inline-block",
|
|
107
|
-
fontSize: "1em",
|
|
108
|
-
lineHeight: "1em",
|
|
109
|
-
verticalAlign: "middle"
|
|
110
|
-
}, o) }), d);
|
|
111
|
-
}, A = [{
|
|
112
|
-
code: "en",
|
|
113
|
-
label: "English",
|
|
114
|
-
countryCode: "GB"
|
|
115
|
-
}, {
|
|
116
|
-
code: "vi",
|
|
117
|
-
label: "Vietnamese",
|
|
118
|
-
countryCode: "VN"
|
|
119
|
-
}], j = ({ anchorEl: e, onClose: t, open: n = !1, onLanguageChange: r, languages: i = A, currentLanguage: a, menuWidth: o = "220px", flagSize: s = 28 }) => {
|
|
120
|
-
let u = m.useCallback((e) => {
|
|
121
|
-
r?.(e), t?.();
|
|
122
|
-
}, [r, t]);
|
|
123
|
-
return /* @__PURE__ */ g(c, {
|
|
124
|
-
anchorEl: e,
|
|
125
|
-
anchorOrigin: {
|
|
126
|
-
horizontal: "right",
|
|
127
|
-
vertical: "bottom"
|
|
128
|
-
},
|
|
129
|
-
onClose: t,
|
|
130
|
-
open: n,
|
|
131
|
-
slotProps: { paper: { sx: { width: o } } },
|
|
132
|
-
transformOrigin: {
|
|
133
|
-
horizontal: "right",
|
|
134
|
-
vertical: "top"
|
|
135
|
-
},
|
|
136
|
-
children: i.map((e) => /* @__PURE__ */ _(f, {
|
|
137
|
-
onClick: () => {
|
|
138
|
-
u(e.code);
|
|
139
|
-
},
|
|
140
|
-
selected: a === e.code,
|
|
141
|
-
sx: { gap: 1 },
|
|
142
|
-
children: [/* @__PURE__ */ g(S, { children: /* @__PURE__ */ g(k, {
|
|
143
|
-
countryCode: e.countryCode,
|
|
144
|
-
svg: !0,
|
|
145
|
-
style: {
|
|
146
|
-
width: s,
|
|
147
|
-
height: s
|
|
148
|
-
},
|
|
149
|
-
title: e.label
|
|
150
|
-
}) }), /* @__PURE__ */ g(l, {
|
|
151
|
-
variant: "subtitle2",
|
|
152
|
-
children: e.label
|
|
153
|
-
})]
|
|
154
|
-
}, e.code))
|
|
155
|
-
});
|
|
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(), 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
|
-
h(e.currentTarget);
|
|
159
|
-
}, []), S = m.useCallback(() => {
|
|
160
|
-
h(null);
|
|
161
|
-
}, []), C = m.useCallback((e) => {
|
|
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
|
-
onClick: x,
|
|
166
|
-
sx: {
|
|
167
|
-
display: {
|
|
168
|
-
xs: "none",
|
|
169
|
-
lg: "inline-flex"
|
|
170
|
-
},
|
|
171
|
-
...s
|
|
172
|
-
},
|
|
173
|
-
tooltipOptions: {
|
|
174
|
-
title: w,
|
|
175
|
-
placement: "top"
|
|
176
|
-
},
|
|
177
|
-
children: /* @__PURE__ */ g(k, {
|
|
178
|
-
countryCode: b?.countryCode || "US",
|
|
179
|
-
svg: !0,
|
|
180
|
-
style: {
|
|
181
|
-
width: i,
|
|
182
|
-
height: i
|
|
183
|
-
},
|
|
184
|
-
title: b?.label || y
|
|
185
|
-
})
|
|
186
|
-
}), /* @__PURE__ */ g(j, {
|
|
187
|
-
anchorEl: p,
|
|
188
|
-
onClose: S,
|
|
189
|
-
open: !!p,
|
|
190
|
-
onLanguageChange: C,
|
|
191
|
-
languages: e,
|
|
192
|
-
currentLanguage: y,
|
|
193
|
-
menuWidth: o,
|
|
194
|
-
flagSize: a
|
|
195
|
-
})] });
|
|
196
|
-
};
|
|
197
|
-
M.displayName = "SLanguageSwitcher";
|
|
198
|
-
//#endregion
|
|
199
|
-
export { M as n, A as r, j as t };
|