sosk-ui-lib 0.3.0 → 0.4.0
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/components/CategoryTiles.d.ts +17 -0
- package/dist/components/ContactForm.d.ts +3 -1
- package/dist/index.d.ts +2 -0
- package/dist/sosk-ui-lib.cjs +1 -1
- package/dist/sosk-ui-lib.cjs.map +1 -1
- package/dist/sosk-ui-lib.js +646 -519
- package/dist/sosk-ui-lib.js.map +1 -1
- package/package.json +1 -1
package/dist/sosk-ui-lib.js
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useId as
|
|
3
|
-
import { Dialog as he, Stack as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { jsxs as c, jsx as e, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
+
import { useId as H, useState as F, useRef as se, useCallback as X, forwardRef as ce, Fragment as de } from "react";
|
|
3
|
+
import { Dialog as he, Stack as W, DialogTitle as me, IconButton as O, DialogContent as ue, Box as d, Typography as y, Alert as te, Button as U, Card as L, CardMedia as pe, CardContent as xe, ButtonBase as K, Skeleton as R, Grid as E, CardActionArea as fe, Paper as ge, Avatar as be, FormHelperText as ye, TextField as Z, InputAdornment as ne, Autocomplete as ve, Fade as Ce, MenuItem as we, CircularProgress as Se, Container as N, InputBase as Ie } from "@mui/material";
|
|
4
|
+
import ke from "@mui/icons-material/Edit";
|
|
5
|
+
import We from "@mui/icons-material/Delete";
|
|
6
6
|
import G from "@mui/icons-material/Close";
|
|
7
7
|
import re from "@mui/icons-material/Add";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
8
|
+
import De from "@mui/icons-material/CloudUpload";
|
|
9
|
+
import Ae from "@mui/icons-material/Remove";
|
|
10
|
+
import Te from "@mui/icons-material/StorefrontOutlined";
|
|
11
|
+
import Re from "@mui/icons-material/Search";
|
|
12
|
+
function J({
|
|
12
13
|
open: r,
|
|
13
|
-
onClose:
|
|
14
|
-
title:
|
|
14
|
+
onClose: t,
|
|
15
|
+
title: o,
|
|
15
16
|
children: i,
|
|
16
|
-
actions:
|
|
17
|
-
maxWidth:
|
|
17
|
+
actions: a,
|
|
18
|
+
maxWidth: n = "sm",
|
|
18
19
|
disableClose: l = !1
|
|
19
20
|
}) {
|
|
20
|
-
const
|
|
21
|
-
return /* @__PURE__ */
|
|
21
|
+
const h = H();
|
|
22
|
+
return /* @__PURE__ */ c(
|
|
22
23
|
he,
|
|
23
24
|
{
|
|
24
25
|
open: r,
|
|
25
|
-
onClose: () => !l &&
|
|
26
|
+
onClose: () => !l && t(),
|
|
26
27
|
fullWidth: !0,
|
|
27
|
-
maxWidth:
|
|
28
|
-
"aria-labelledby":
|
|
28
|
+
maxWidth: n,
|
|
29
|
+
"aria-labelledby": h,
|
|
29
30
|
children: [
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
|
|
31
|
+
/* @__PURE__ */ c(
|
|
32
|
+
W,
|
|
32
33
|
{
|
|
33
34
|
direction: "row",
|
|
34
35
|
sx: {
|
|
@@ -38,12 +39,12 @@ function K({
|
|
|
38
39
|
pr: 3
|
|
39
40
|
},
|
|
40
41
|
children: [
|
|
41
|
-
/* @__PURE__ */ e(me, { id:
|
|
42
|
+
/* @__PURE__ */ e(me, { id: h, sx: { flex: 1, minWidth: 0 }, children: o }),
|
|
42
43
|
/* @__PURE__ */ e(
|
|
43
|
-
|
|
44
|
+
O,
|
|
44
45
|
{
|
|
45
46
|
size: "small",
|
|
46
|
-
onClick:
|
|
47
|
+
onClick: t,
|
|
47
48
|
disabled: l,
|
|
48
49
|
"aria-label": "Close",
|
|
49
50
|
children: /* @__PURE__ */ e(G, { fontSize: "small" })
|
|
@@ -52,10 +53,10 @@ function K({
|
|
|
52
53
|
]
|
|
53
54
|
}
|
|
54
55
|
),
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
+
/* @__PURE__ */ c(ue, { sx: { padding: 0 }, children: [
|
|
56
57
|
i,
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
a && /* @__PURE__ */ e(
|
|
59
|
+
W,
|
|
59
60
|
{
|
|
60
61
|
direction: "row",
|
|
61
62
|
spacing: 2,
|
|
@@ -65,7 +66,7 @@ function K({
|
|
|
65
66
|
borderColor: "divider",
|
|
66
67
|
p: 2
|
|
67
68
|
},
|
|
68
|
-
children:
|
|
69
|
+
children: a
|
|
69
70
|
}
|
|
70
71
|
)
|
|
71
72
|
] })
|
|
@@ -73,36 +74,36 @@ function K({
|
|
|
73
74
|
}
|
|
74
75
|
);
|
|
75
76
|
}
|
|
76
|
-
function
|
|
77
|
+
function Fe({
|
|
77
78
|
open: r,
|
|
78
|
-
onClose:
|
|
79
|
-
onConfirm:
|
|
79
|
+
onClose: t,
|
|
80
|
+
onConfirm: o,
|
|
80
81
|
title: i,
|
|
81
|
-
message:
|
|
82
|
-
confirmLabel:
|
|
82
|
+
message: a,
|
|
83
|
+
confirmLabel: n = "Confirm",
|
|
83
84
|
cancelLabel: l = "Cancel",
|
|
84
|
-
pendingLabel:
|
|
85
|
-
confirmColor:
|
|
85
|
+
pendingLabel: h,
|
|
86
|
+
confirmColor: s = "error",
|
|
86
87
|
errorMessage: p = "Something went wrong. Please try again."
|
|
87
88
|
}) {
|
|
88
|
-
const [u,
|
|
89
|
-
|
|
89
|
+
const [u, m] = F(!1), [f, v] = F(!1), x = () => {
|
|
90
|
+
v(!1), t();
|
|
90
91
|
};
|
|
91
92
|
return /* @__PURE__ */ e(
|
|
92
|
-
|
|
93
|
+
J,
|
|
93
94
|
{
|
|
94
95
|
open: r,
|
|
95
|
-
onClose:
|
|
96
|
+
onClose: x,
|
|
96
97
|
title: i,
|
|
97
98
|
maxWidth: "xs",
|
|
98
99
|
disableClose: u,
|
|
99
|
-
actions: /* @__PURE__ */
|
|
100
|
+
actions: /* @__PURE__ */ c(Y, { children: [
|
|
100
101
|
/* @__PURE__ */ e(
|
|
101
102
|
U,
|
|
102
103
|
{
|
|
103
104
|
variant: "outlined",
|
|
104
105
|
color: "inherit",
|
|
105
|
-
onClick:
|
|
106
|
+
onClick: x,
|
|
106
107
|
disabled: u,
|
|
107
108
|
children: l
|
|
108
109
|
}
|
|
@@ -111,30 +112,30 @@ function Te({
|
|
|
111
112
|
U,
|
|
112
113
|
{
|
|
113
114
|
variant: "contained",
|
|
114
|
-
color:
|
|
115
|
+
color: s,
|
|
115
116
|
onClick: async () => {
|
|
116
|
-
|
|
117
|
+
m(!0), v(!1);
|
|
117
118
|
try {
|
|
118
|
-
await
|
|
119
|
+
await o();
|
|
119
120
|
} catch {
|
|
120
|
-
|
|
121
|
+
v(!0), m(!1);
|
|
121
122
|
return;
|
|
122
123
|
}
|
|
123
|
-
|
|
124
|
+
m(!1), x();
|
|
124
125
|
},
|
|
125
126
|
disabled: u,
|
|
126
|
-
children: u &&
|
|
127
|
+
children: u && h ? h : n
|
|
127
128
|
}
|
|
128
129
|
)
|
|
129
130
|
] }),
|
|
130
|
-
children: /* @__PURE__ */
|
|
131
|
-
/* @__PURE__ */ e(y, { component: "div", children:
|
|
132
|
-
f && /* @__PURE__ */ e(
|
|
131
|
+
children: /* @__PURE__ */ c(d, { sx: { p: 2 }, children: [
|
|
132
|
+
/* @__PURE__ */ e(y, { component: "div", children: a }),
|
|
133
|
+
f && /* @__PURE__ */ e(te, { severity: "error", sx: { mt: 2 }, children: p })
|
|
133
134
|
] })
|
|
134
135
|
}
|
|
135
136
|
);
|
|
136
137
|
}
|
|
137
|
-
function
|
|
138
|
+
function A(r) {
|
|
138
139
|
return r ? Array.isArray(r) ? r : [r] : [];
|
|
139
140
|
}
|
|
140
141
|
const ie = {
|
|
@@ -149,20 +150,20 @@ const ie = {
|
|
|
149
150
|
whiteSpace: "nowrap",
|
|
150
151
|
width: 1
|
|
151
152
|
};
|
|
152
|
-
function oe(r,
|
|
153
|
+
function oe(r, t) {
|
|
153
154
|
return r === "outlined" ? {
|
|
154
155
|
borderRadius: 1,
|
|
155
156
|
border: 1,
|
|
156
157
|
borderColor: "divider",
|
|
157
158
|
boxShadow: "none",
|
|
158
|
-
...
|
|
159
|
+
...t && {
|
|
159
160
|
transition: "border-color 0.2s ease",
|
|
160
161
|
"&:hover": { borderColor: "primary.main" }
|
|
161
162
|
}
|
|
162
163
|
} : {
|
|
163
164
|
borderRadius: 3,
|
|
164
165
|
boxShadow: "0 4px 16px rgba(0,0,0,0.08)",
|
|
165
|
-
...
|
|
166
|
+
...t && {
|
|
166
167
|
transition: "all 0.25s ease",
|
|
167
168
|
"&:hover": {
|
|
168
169
|
transform: "translateY(-4px)",
|
|
@@ -171,40 +172,40 @@ function oe(r, n) {
|
|
|
171
172
|
}
|
|
172
173
|
};
|
|
173
174
|
}
|
|
174
|
-
function _(r,
|
|
175
|
-
return
|
|
175
|
+
function _(r, t) {
|
|
176
|
+
return t ? { width: "100%", height: "auto", aspectRatio: t } : { height: r };
|
|
176
177
|
}
|
|
177
|
-
function
|
|
178
|
+
function _e({
|
|
178
179
|
image: r,
|
|
179
|
-
imageAlt:
|
|
180
|
-
imageHeight:
|
|
180
|
+
imageAlt: t = "",
|
|
181
|
+
imageHeight: o = 260,
|
|
181
182
|
imageAspectRatio: i,
|
|
182
|
-
fallback:
|
|
183
|
-
title:
|
|
183
|
+
fallback: a = /* @__PURE__ */ e(y, { children: "No Image Available" }),
|
|
184
|
+
title: n,
|
|
184
185
|
titleComponent: l,
|
|
185
|
-
subtitle:
|
|
186
|
-
description:
|
|
186
|
+
subtitle: h,
|
|
187
|
+
description: s,
|
|
187
188
|
descriptionLines: p = 3,
|
|
188
189
|
highlight: u,
|
|
189
|
-
footer:
|
|
190
|
+
footer: m,
|
|
190
191
|
actions: f,
|
|
191
|
-
variant:
|
|
192
|
-
density:
|
|
193
|
-
sx:
|
|
194
|
-
onEdit:
|
|
195
|
-
editForm:
|
|
196
|
-
editLabel:
|
|
197
|
-
onDelete:
|
|
192
|
+
variant: v = "elevated",
|
|
193
|
+
density: x = "comfortable",
|
|
194
|
+
sx: I,
|
|
195
|
+
onEdit: g,
|
|
196
|
+
editForm: D,
|
|
197
|
+
editLabel: j = "Edit",
|
|
198
|
+
onDelete: T,
|
|
198
199
|
deleteLabel: S = "Delete",
|
|
199
200
|
deleteConfirmMessage: w = "Are you sure you want to delete this item? This action cannot be undone.",
|
|
200
|
-
onClick:
|
|
201
|
+
onClick: k
|
|
201
202
|
}) {
|
|
202
|
-
const [
|
|
203
|
-
|
|
203
|
+
const [b, C] = F(!1), [M, Q] = F(!1), q = !!(g && D), V = !!T, z = x === "compact", $ = z ? 1.75 : 3, ae = async (le) => {
|
|
204
|
+
g && (await g(le), C(!1));
|
|
204
205
|
};
|
|
205
|
-
return /* @__PURE__ */
|
|
206
|
-
(
|
|
207
|
-
|
|
206
|
+
return /* @__PURE__ */ c(d, { sx: { position: "relative", height: "100%" }, children: [
|
|
207
|
+
(q || V) && /* @__PURE__ */ c(
|
|
208
|
+
W,
|
|
208
209
|
{
|
|
209
210
|
direction: "row",
|
|
210
211
|
spacing: 0.5,
|
|
@@ -218,29 +219,29 @@ function qe({
|
|
|
218
219
|
boxShadow: 1
|
|
219
220
|
},
|
|
220
221
|
children: [
|
|
221
|
-
|
|
222
|
-
|
|
222
|
+
q && /* @__PURE__ */ e(
|
|
223
|
+
O,
|
|
223
224
|
{
|
|
224
225
|
size: "small",
|
|
225
226
|
onClick: () => C(!0),
|
|
226
|
-
"aria-label":
|
|
227
|
-
children: /* @__PURE__ */ e(
|
|
227
|
+
"aria-label": j,
|
|
228
|
+
children: /* @__PURE__ */ e(ke, { fontSize: "small" })
|
|
228
229
|
}
|
|
229
230
|
),
|
|
230
|
-
|
|
231
|
-
|
|
231
|
+
V && /* @__PURE__ */ e(
|
|
232
|
+
O,
|
|
232
233
|
{
|
|
233
234
|
size: "small",
|
|
234
|
-
onClick: () =>
|
|
235
|
+
onClick: () => Q(!0),
|
|
235
236
|
"aria-label": S,
|
|
236
|
-
children: /* @__PURE__ */ e(
|
|
237
|
+
children: /* @__PURE__ */ e(We, { fontSize: "small", color: "error" })
|
|
237
238
|
}
|
|
238
239
|
)
|
|
239
240
|
]
|
|
240
241
|
}
|
|
241
242
|
),
|
|
242
|
-
/* @__PURE__ */
|
|
243
|
-
|
|
243
|
+
/* @__PURE__ */ c(
|
|
244
|
+
L,
|
|
244
245
|
{
|
|
245
246
|
sx: [
|
|
246
247
|
{
|
|
@@ -249,9 +250,9 @@ function qe({
|
|
|
249
250
|
display: "flex",
|
|
250
251
|
flexDirection: "column",
|
|
251
252
|
overflow: "hidden",
|
|
252
|
-
...oe(
|
|
253
|
+
...oe(v, !!k)
|
|
253
254
|
},
|
|
254
|
-
...
|
|
255
|
+
...A(I)
|
|
255
256
|
],
|
|
256
257
|
children: [
|
|
257
258
|
r ? /* @__PURE__ */ e(
|
|
@@ -259,54 +260,54 @@ function qe({
|
|
|
259
260
|
{
|
|
260
261
|
component: "img",
|
|
261
262
|
image: r,
|
|
262
|
-
alt:
|
|
263
|
+
alt: t,
|
|
263
264
|
sx: {
|
|
264
|
-
..._(
|
|
265
|
+
..._(o, i),
|
|
265
266
|
objectFit: "cover",
|
|
266
267
|
bgcolor: "background.default"
|
|
267
268
|
}
|
|
268
269
|
}
|
|
269
270
|
) : /* @__PURE__ */ e(
|
|
270
|
-
|
|
271
|
+
d,
|
|
271
272
|
{
|
|
272
273
|
sx: {
|
|
273
|
-
..._(
|
|
274
|
+
..._(o, i),
|
|
274
275
|
display: "flex",
|
|
275
276
|
alignItems: "center",
|
|
276
277
|
justifyContent: "center",
|
|
277
278
|
bgcolor: "grey.100",
|
|
278
279
|
color: "text.secondary"
|
|
279
280
|
},
|
|
280
|
-
children:
|
|
281
|
+
children: a
|
|
281
282
|
}
|
|
282
283
|
),
|
|
283
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ c(
|
|
284
285
|
xe,
|
|
285
286
|
{
|
|
286
287
|
sx: {
|
|
287
288
|
display: "flex",
|
|
288
289
|
flexDirection: "column",
|
|
289
290
|
flexGrow: 1,
|
|
290
|
-
p:
|
|
291
|
-
pb: f ? 0 :
|
|
292
|
-
"&:last-child": { pb:
|
|
291
|
+
p: $,
|
|
292
|
+
pb: f ? 0 : $,
|
|
293
|
+
"&:last-child": { pb: $ }
|
|
293
294
|
},
|
|
294
295
|
children: [
|
|
295
296
|
/* @__PURE__ */ e(
|
|
296
297
|
y,
|
|
297
298
|
{
|
|
298
|
-
variant:
|
|
299
|
+
variant: z ? "subtitle1" : "h6",
|
|
299
300
|
...l && { component: l },
|
|
300
301
|
sx: {
|
|
301
302
|
fontWeight: 600,
|
|
302
303
|
color: "text.primary",
|
|
303
|
-
mb:
|
|
304
|
-
...
|
|
304
|
+
mb: z ? 0.5 : 1,
|
|
305
|
+
...z && { lineHeight: 1.3 }
|
|
305
306
|
},
|
|
306
|
-
children:
|
|
307
|
-
|
|
307
|
+
children: k ? /* @__PURE__ */ e(
|
|
308
|
+
K,
|
|
308
309
|
{
|
|
309
|
-
onClick:
|
|
310
|
+
onClick: k,
|
|
310
311
|
disableRipple: !0,
|
|
311
312
|
sx: {
|
|
312
313
|
position: "static",
|
|
@@ -326,21 +327,21 @@ function qe({
|
|
|
326
327
|
outlineOffset: "-2px"
|
|
327
328
|
}
|
|
328
329
|
},
|
|
329
|
-
children:
|
|
330
|
+
children: n
|
|
330
331
|
}
|
|
331
|
-
) :
|
|
332
|
+
) : n
|
|
332
333
|
}
|
|
333
334
|
),
|
|
334
|
-
|
|
335
|
+
h && /* @__PURE__ */ e(
|
|
335
336
|
y,
|
|
336
337
|
{
|
|
337
338
|
variant: "body2",
|
|
338
339
|
color: "text.secondary",
|
|
339
|
-
sx: { mb:
|
|
340
|
-
children:
|
|
340
|
+
sx: { mb: z ? 0.5 : 1 },
|
|
341
|
+
children: h
|
|
341
342
|
}
|
|
342
343
|
),
|
|
343
|
-
|
|
344
|
+
s && /* @__PURE__ */ e(
|
|
344
345
|
y,
|
|
345
346
|
{
|
|
346
347
|
variant: "body2",
|
|
@@ -353,34 +354,34 @@ function qe({
|
|
|
353
354
|
WebkitBoxOrient: "vertical",
|
|
354
355
|
overflow: "hidden"
|
|
355
356
|
},
|
|
356
|
-
children:
|
|
357
|
+
children: s
|
|
357
358
|
}
|
|
358
359
|
),
|
|
359
360
|
u && /* @__PURE__ */ e(
|
|
360
361
|
y,
|
|
361
362
|
{
|
|
362
|
-
variant:
|
|
363
|
+
variant: z ? "h6" : "h5",
|
|
363
364
|
sx: {
|
|
364
365
|
fontWeight: 700,
|
|
365
366
|
color: "primary.main",
|
|
366
|
-
...
|
|
367
|
+
...z ? { mt: "auto", pt: 0.5 } : { mb: 2 }
|
|
367
368
|
},
|
|
368
369
|
children: u
|
|
369
370
|
}
|
|
370
371
|
),
|
|
371
|
-
|
|
372
|
+
z && m ? /* @__PURE__ */ e(d, { sx: { mt: 1 }, children: m }) : m
|
|
372
373
|
]
|
|
373
374
|
}
|
|
374
375
|
),
|
|
375
376
|
f && /* @__PURE__ */ e(
|
|
376
|
-
|
|
377
|
+
d,
|
|
377
378
|
{
|
|
378
379
|
sx: {
|
|
379
380
|
position: "relative",
|
|
380
381
|
zIndex: 1,
|
|
381
|
-
px:
|
|
382
|
-
pt:
|
|
383
|
-
pb:
|
|
382
|
+
px: $,
|
|
383
|
+
pt: z ? 1.5 : 2,
|
|
384
|
+
pb: $
|
|
384
385
|
},
|
|
385
386
|
children: f
|
|
386
387
|
}
|
|
@@ -388,24 +389,24 @@ function qe({
|
|
|
388
389
|
]
|
|
389
390
|
}
|
|
390
391
|
),
|
|
391
|
-
|
|
392
|
-
|
|
392
|
+
q && /* @__PURE__ */ e(
|
|
393
|
+
J,
|
|
393
394
|
{
|
|
394
|
-
open:
|
|
395
|
+
open: b,
|
|
395
396
|
onClose: () => C(!1),
|
|
396
|
-
title:
|
|
397
|
-
children:
|
|
397
|
+
title: j,
|
|
398
|
+
children: D({
|
|
398
399
|
onSubmit: ae,
|
|
399
400
|
onCancel: () => C(!1)
|
|
400
401
|
})
|
|
401
402
|
}
|
|
402
403
|
),
|
|
403
|
-
|
|
404
|
-
|
|
404
|
+
V && /* @__PURE__ */ e(
|
|
405
|
+
Fe,
|
|
405
406
|
{
|
|
406
|
-
open:
|
|
407
|
-
onClose: () =>
|
|
408
|
-
onConfirm:
|
|
407
|
+
open: M,
|
|
408
|
+
onClose: () => Q(!1),
|
|
409
|
+
onConfirm: T,
|
|
409
410
|
title: S,
|
|
410
411
|
message: w,
|
|
411
412
|
confirmLabel: S,
|
|
@@ -414,47 +415,47 @@ function qe({
|
|
|
414
415
|
)
|
|
415
416
|
] });
|
|
416
417
|
}
|
|
417
|
-
function
|
|
418
|
+
function Ye({
|
|
418
419
|
imageHeight: r = 260,
|
|
419
|
-
imageAspectRatio:
|
|
420
|
-
variant:
|
|
420
|
+
imageAspectRatio: t,
|
|
421
|
+
variant: o = "elevated",
|
|
421
422
|
density: i = "comfortable"
|
|
422
423
|
}) {
|
|
423
|
-
const
|
|
424
|
-
return /* @__PURE__ */
|
|
425
|
-
|
|
424
|
+
const a = i === "compact";
|
|
425
|
+
return /* @__PURE__ */ c(
|
|
426
|
+
L,
|
|
426
427
|
{
|
|
427
|
-
sx: { width: "100%", overflow: "hidden", ...oe(
|
|
428
|
+
sx: { width: "100%", overflow: "hidden", ...oe(o, !1) },
|
|
428
429
|
children: [
|
|
429
430
|
/* @__PURE__ */ e(
|
|
430
|
-
|
|
431
|
+
R,
|
|
431
432
|
{
|
|
432
433
|
variant: "rectangular",
|
|
433
434
|
animation: "wave",
|
|
434
|
-
sx: { width: "100%", ..._(r,
|
|
435
|
+
sx: { width: "100%", ..._(r, t) }
|
|
435
436
|
}
|
|
436
437
|
),
|
|
437
|
-
/* @__PURE__ */
|
|
438
|
+
/* @__PURE__ */ c(d, { sx: { p: a ? 1.75 : 3 }, children: [
|
|
438
439
|
/* @__PURE__ */ e(
|
|
439
|
-
|
|
440
|
+
R,
|
|
440
441
|
{
|
|
441
442
|
animation: "wave",
|
|
442
443
|
width: "60%",
|
|
443
|
-
height:
|
|
444
|
+
height: a ? 24 : 32,
|
|
444
445
|
sx: { mb: 1 }
|
|
445
446
|
}
|
|
446
447
|
),
|
|
447
|
-
!
|
|
448
|
-
/* @__PURE__ */ e(
|
|
449
|
-
/* @__PURE__ */ e(
|
|
448
|
+
!a && /* @__PURE__ */ c(Y, { children: [
|
|
449
|
+
/* @__PURE__ */ e(R, { animation: "wave", height: 20 }),
|
|
450
|
+
/* @__PURE__ */ e(R, { animation: "wave", height: 20 })
|
|
450
451
|
] }),
|
|
451
452
|
/* @__PURE__ */ e(
|
|
452
|
-
|
|
453
|
+
R,
|
|
453
454
|
{
|
|
454
455
|
animation: "wave",
|
|
455
456
|
width: "30%",
|
|
456
|
-
height:
|
|
457
|
-
sx: { mt:
|
|
457
|
+
height: a ? 28 : 36,
|
|
458
|
+
sx: { mt: a ? 0 : 2 }
|
|
458
459
|
}
|
|
459
460
|
)
|
|
460
461
|
] })
|
|
@@ -462,36 +463,36 @@ function Ue({
|
|
|
462
463
|
}
|
|
463
464
|
);
|
|
464
465
|
}
|
|
465
|
-
function
|
|
466
|
+
function Ke({
|
|
466
467
|
items: r,
|
|
467
|
-
renderItem:
|
|
468
|
-
getItemKey:
|
|
468
|
+
renderItem: t,
|
|
469
|
+
getItemKey: o,
|
|
469
470
|
margin: i = { xs: 3, lg: 8 },
|
|
470
|
-
spacing:
|
|
471
|
-
gridSize:
|
|
471
|
+
spacing: a = 2,
|
|
472
|
+
gridSize: n = { xs: 12, sm: 6, md: 4 },
|
|
472
473
|
onAddNewItem: l,
|
|
473
|
-
addNewItemForm:
|
|
474
|
-
addNewItemLabel:
|
|
474
|
+
addNewItemForm: h,
|
|
475
|
+
addNewItemLabel: s = "Add New Item",
|
|
475
476
|
loading: p = !1,
|
|
476
477
|
skeletonCount: u = 6,
|
|
477
|
-
skeletonWidth:
|
|
478
|
+
skeletonWidth: m = "100%",
|
|
478
479
|
skeletonHeight: f = 450,
|
|
479
|
-
renderSkeleton:
|
|
480
|
-
header:
|
|
480
|
+
renderSkeleton: v,
|
|
481
|
+
header: x
|
|
481
482
|
}) {
|
|
482
|
-
const [
|
|
483
|
-
xs:
|
|
484
|
-
sm:
|
|
485
|
-
md:
|
|
486
|
-
lg:
|
|
487
|
-
},
|
|
488
|
-
l && (await l(w),
|
|
489
|
-
}, S = /* @__PURE__ */
|
|
490
|
-
|
|
483
|
+
const [I, g] = F(!1), D = !!(l && h), j = {
|
|
484
|
+
xs: n.xs,
|
|
485
|
+
sm: n.sm ? Math.max(1, Math.floor(n.sm / 2)) : void 0,
|
|
486
|
+
md: n.md ? Math.max(1, Math.floor(n.md / 2)) : void 0,
|
|
487
|
+
lg: n.lg ? Math.max(1, Math.floor(n.lg / 2)) : void 0
|
|
488
|
+
}, T = async (w) => {
|
|
489
|
+
l && (await l(w), g(!1));
|
|
490
|
+
}, S = /* @__PURE__ */ c(
|
|
491
|
+
L,
|
|
491
492
|
{
|
|
492
493
|
sx: {
|
|
493
494
|
width: "100%",
|
|
494
|
-
maxWidth:
|
|
495
|
+
maxWidth: m,
|
|
495
496
|
minHeight: f,
|
|
496
497
|
mx: "auto",
|
|
497
498
|
borderRadius: 3,
|
|
@@ -500,7 +501,7 @@ function Ve({
|
|
|
500
501
|
},
|
|
501
502
|
children: [
|
|
502
503
|
/* @__PURE__ */ e(
|
|
503
|
-
|
|
504
|
+
R,
|
|
504
505
|
{
|
|
505
506
|
variant: "rectangular",
|
|
506
507
|
animation: "wave",
|
|
@@ -508,21 +509,21 @@ function Ve({
|
|
|
508
509
|
sx: { width: "100%" }
|
|
509
510
|
}
|
|
510
511
|
),
|
|
511
|
-
/* @__PURE__ */
|
|
512
|
-
/* @__PURE__ */ e(
|
|
513
|
-
/* @__PURE__ */ e(
|
|
514
|
-
/* @__PURE__ */ e(
|
|
515
|
-
/* @__PURE__ */ e(
|
|
512
|
+
/* @__PURE__ */ c(d, { sx: { p: 3 }, children: [
|
|
513
|
+
/* @__PURE__ */ e(R, { animation: "wave", width: "60%", height: 32, sx: { mb: 1 } }),
|
|
514
|
+
/* @__PURE__ */ e(R, { animation: "wave", height: 20 }),
|
|
515
|
+
/* @__PURE__ */ e(R, { animation: "wave", height: 20 }),
|
|
516
|
+
/* @__PURE__ */ e(R, { animation: "wave", width: "30%", height: 36, sx: { mt: 2 } })
|
|
516
517
|
] })
|
|
517
518
|
]
|
|
518
519
|
}
|
|
519
520
|
);
|
|
520
|
-
return /* @__PURE__ */
|
|
521
|
-
|
|
522
|
-
/* @__PURE__ */
|
|
523
|
-
p ? Array.from({ length: u }).map((w,
|
|
524
|
-
!p &&
|
|
525
|
-
|
|
521
|
+
return /* @__PURE__ */ c(d, { sx: { margin: i }, children: [
|
|
522
|
+
x && /* @__PURE__ */ e(d, { sx: { mb: 3 }, children: x }),
|
|
523
|
+
/* @__PURE__ */ c(E, { container: !0, spacing: a, sx: { width: "100%" }, children: [
|
|
524
|
+
p ? Array.from({ length: u }).map((w, k) => /* @__PURE__ */ e(E, { size: n, children: v ? v() : S }, `skeleton-${k}`)) : r.map((w) => /* @__PURE__ */ e(E, { size: n, children: t(w) }, o(w))),
|
|
525
|
+
!p && D && /* @__PURE__ */ e(E, { size: j, children: /* @__PURE__ */ e(
|
|
526
|
+
d,
|
|
526
527
|
{
|
|
527
528
|
sx: {
|
|
528
529
|
height: "100%",
|
|
@@ -532,7 +533,7 @@ function Ve({
|
|
|
532
533
|
justifyContent: "center"
|
|
533
534
|
},
|
|
534
535
|
children: /* @__PURE__ */ e(
|
|
535
|
-
|
|
536
|
+
L,
|
|
536
537
|
{
|
|
537
538
|
variant: "outlined",
|
|
538
539
|
sx: {
|
|
@@ -553,10 +554,10 @@ function Ve({
|
|
|
553
554
|
borderColor: "primary.main"
|
|
554
555
|
}
|
|
555
556
|
},
|
|
556
|
-
children: /* @__PURE__ */
|
|
557
|
+
children: /* @__PURE__ */ c(
|
|
557
558
|
fe,
|
|
558
559
|
{
|
|
559
|
-
onClick: () =>
|
|
560
|
+
onClick: () => g(!0),
|
|
560
561
|
sx: {
|
|
561
562
|
height: "100%",
|
|
562
563
|
display: "flex",
|
|
@@ -568,7 +569,7 @@ function Ve({
|
|
|
568
569
|
},
|
|
569
570
|
children: [
|
|
570
571
|
/* @__PURE__ */ e(re, { fontSize: "large", color: "action" }),
|
|
571
|
-
/* @__PURE__ */ e(y, { color: "text.secondary", children:
|
|
572
|
+
/* @__PURE__ */ e(y, { color: "text.secondary", children: s })
|
|
572
573
|
]
|
|
573
574
|
}
|
|
574
575
|
)
|
|
@@ -577,80 +578,80 @@ function Ve({
|
|
|
577
578
|
}
|
|
578
579
|
) })
|
|
579
580
|
] }),
|
|
580
|
-
|
|
581
|
-
|
|
581
|
+
D && /* @__PURE__ */ e(
|
|
582
|
+
J,
|
|
582
583
|
{
|
|
583
|
-
open:
|
|
584
|
-
onClose: () =>
|
|
585
|
-
title:
|
|
586
|
-
children:
|
|
587
|
-
onSubmit:
|
|
588
|
-
onCancel: () =>
|
|
584
|
+
open: I,
|
|
585
|
+
onClose: () => g(!1),
|
|
586
|
+
title: s,
|
|
587
|
+
children: h({
|
|
588
|
+
onSubmit: T,
|
|
589
|
+
onCancel: () => g(!1)
|
|
589
590
|
})
|
|
590
591
|
}
|
|
591
592
|
)
|
|
592
593
|
] });
|
|
593
594
|
}
|
|
594
|
-
const
|
|
595
|
+
const je = (r) => new Promise((t, o) => {
|
|
595
596
|
const i = new FileReader();
|
|
596
|
-
i.onload = () =>
|
|
597
|
+
i.onload = () => t(i.result), i.onerror = o, i.readAsDataURL(r);
|
|
597
598
|
});
|
|
598
|
-
function
|
|
599
|
+
function Je({
|
|
599
600
|
label: r = "Image",
|
|
600
|
-
value:
|
|
601
|
-
onChange:
|
|
601
|
+
value: t,
|
|
602
|
+
onChange: o,
|
|
602
603
|
error: i,
|
|
603
|
-
helperText:
|
|
604
|
-
maxSizeMB:
|
|
604
|
+
helperText: a,
|
|
605
|
+
maxSizeMB: n = 5,
|
|
605
606
|
disabled: l = !1
|
|
606
607
|
}) {
|
|
607
|
-
const [
|
|
608
|
-
async (
|
|
609
|
-
if (u(null), !
|
|
608
|
+
const [h, s] = F(!1), [p, u] = F(null), m = se(null), f = H(), v = H(), x = X(
|
|
609
|
+
async (b) => {
|
|
610
|
+
if (u(null), !b.type.startsWith("image/")) {
|
|
610
611
|
u("Only image files are allowed.");
|
|
611
612
|
return;
|
|
612
613
|
}
|
|
613
|
-
if (
|
|
614
|
-
u(`Image must be smaller than ${
|
|
614
|
+
if (b.size > n * 1024 * 1024) {
|
|
615
|
+
u(`Image must be smaller than ${n}MB.`);
|
|
615
616
|
return;
|
|
616
617
|
}
|
|
617
618
|
try {
|
|
618
|
-
const C = await
|
|
619
|
-
|
|
619
|
+
const C = await je(b);
|
|
620
|
+
o({
|
|
620
621
|
base64: C,
|
|
621
|
-
fileName:
|
|
622
|
-
fileType:
|
|
623
|
-
fileSize:
|
|
622
|
+
fileName: b.name,
|
|
623
|
+
fileType: b.type,
|
|
624
|
+
fileSize: b.size
|
|
624
625
|
});
|
|
625
626
|
} catch {
|
|
626
627
|
u("Failed to read the image file.");
|
|
627
628
|
}
|
|
628
629
|
},
|
|
629
|
-
[
|
|
630
|
-
),
|
|
631
|
-
(
|
|
632
|
-
var
|
|
633
|
-
if (
|
|
634
|
-
const C = (
|
|
635
|
-
C &&
|
|
630
|
+
[n, o]
|
|
631
|
+
), I = X(
|
|
632
|
+
(b) => {
|
|
633
|
+
var M;
|
|
634
|
+
if (b.preventDefault(), b.stopPropagation(), s(!1), l) return;
|
|
635
|
+
const C = (M = b.dataTransfer.files) == null ? void 0 : M[0];
|
|
636
|
+
C && x(C);
|
|
636
637
|
},
|
|
637
|
-
[l,
|
|
638
|
-
),
|
|
639
|
-
|
|
640
|
-
},
|
|
641
|
-
|
|
642
|
-
},
|
|
643
|
-
var
|
|
644
|
-
const C = (
|
|
645
|
-
C &&
|
|
646
|
-
},
|
|
638
|
+
[l, x]
|
|
639
|
+
), g = (b) => {
|
|
640
|
+
b.preventDefault(), b.stopPropagation(), l || s(!0);
|
|
641
|
+
}, D = (b) => {
|
|
642
|
+
b.preventDefault(), b.stopPropagation(), s(!1);
|
|
643
|
+
}, j = (b) => {
|
|
644
|
+
var M;
|
|
645
|
+
const C = (M = b.target.files) == null ? void 0 : M[0];
|
|
646
|
+
C && x(C), b.target.value = "";
|
|
647
|
+
}, T = (b) => {
|
|
647
648
|
var C;
|
|
648
|
-
|
|
649
|
-
}, S = (
|
|
649
|
+
b.target !== m.current && (l || (C = m.current) == null || C.click());
|
|
650
|
+
}, S = (b) => {
|
|
650
651
|
var C;
|
|
651
|
-
|
|
652
|
-
}, w = i || !!p,
|
|
653
|
-
return /* @__PURE__ */
|
|
652
|
+
b.stopPropagation(), o(null), u(null), (C = m.current) == null || C.focus();
|
|
653
|
+
}, w = i || !!p, k = p || a;
|
|
654
|
+
return /* @__PURE__ */ c(d, { children: [
|
|
654
655
|
/* @__PURE__ */ e(
|
|
655
656
|
y,
|
|
656
657
|
{
|
|
@@ -661,14 +662,14 @@ function _e({
|
|
|
661
662
|
children: r
|
|
662
663
|
}
|
|
663
664
|
),
|
|
664
|
-
/* @__PURE__ */
|
|
665
|
+
/* @__PURE__ */ c(
|
|
665
666
|
ge,
|
|
666
667
|
{
|
|
667
668
|
variant: "outlined",
|
|
668
|
-
onClick:
|
|
669
|
-
onDrop:
|
|
670
|
-
onDragOver:
|
|
671
|
-
onDragLeave:
|
|
669
|
+
onClick: T,
|
|
670
|
+
onDrop: I,
|
|
671
|
+
onDragOver: g,
|
|
672
|
+
onDragLeave: D,
|
|
672
673
|
sx: {
|
|
673
674
|
position: "relative",
|
|
674
675
|
p: 3,
|
|
@@ -676,8 +677,8 @@ function _e({
|
|
|
676
677
|
cursor: l ? "not-allowed" : "pointer",
|
|
677
678
|
borderStyle: "dashed",
|
|
678
679
|
borderWidth: 2,
|
|
679
|
-
borderColor: w ? "error.main" :
|
|
680
|
-
bgcolor:
|
|
680
|
+
borderColor: w ? "error.main" : h ? "primary.main" : "divider",
|
|
681
|
+
bgcolor: h ? "action.hover" : "background.paper",
|
|
681
682
|
opacity: l ? 0.5 : 1,
|
|
682
683
|
transition: "border-color 0.15s, background-color 0.15s",
|
|
683
684
|
"&:hover": l ? void 0 : { borderColor: "primary.main", bgcolor: "action.hover" },
|
|
@@ -691,19 +692,19 @@ function _e({
|
|
|
691
692
|
/* @__PURE__ */ e(
|
|
692
693
|
"input",
|
|
693
694
|
{
|
|
694
|
-
ref:
|
|
695
|
+
ref: m,
|
|
695
696
|
id: f,
|
|
696
697
|
type: "file",
|
|
697
698
|
accept: "image/*",
|
|
698
699
|
disabled: l,
|
|
699
|
-
onChange:
|
|
700
|
+
onChange: j,
|
|
700
701
|
"aria-invalid": w || void 0,
|
|
701
|
-
"aria-describedby":
|
|
702
|
+
"aria-describedby": k ? v : void 0,
|
|
702
703
|
style: ie
|
|
703
704
|
}
|
|
704
705
|
),
|
|
705
|
-
|
|
706
|
-
|
|
706
|
+
t ? /* @__PURE__ */ c(
|
|
707
|
+
W,
|
|
707
708
|
{
|
|
708
709
|
direction: "row",
|
|
709
710
|
spacing: 2,
|
|
@@ -712,54 +713,55 @@ function _e({
|
|
|
712
713
|
/* @__PURE__ */ e(
|
|
713
714
|
be,
|
|
714
715
|
{
|
|
715
|
-
src:
|
|
716
|
+
src: t.base64,
|
|
716
717
|
alt: "",
|
|
717
718
|
variant: "rounded",
|
|
718
719
|
sx: { width: 56, height: 56 }
|
|
719
720
|
}
|
|
720
721
|
),
|
|
721
|
-
/* @__PURE__ */
|
|
722
|
-
/* @__PURE__ */ e(y, { variant: "body2", noWrap: !0, sx: { maxWidth: 220 }, children:
|
|
723
|
-
/* @__PURE__ */
|
|
724
|
-
(
|
|
722
|
+
/* @__PURE__ */ c(d, { sx: { textAlign: "left", minWidth: 0 }, children: [
|
|
723
|
+
/* @__PURE__ */ e(y, { variant: "body2", noWrap: !0, sx: { maxWidth: 220 }, children: t.fileName }),
|
|
724
|
+
/* @__PURE__ */ c(y, { variant: "caption", color: "text.secondary", children: [
|
|
725
|
+
(t.fileSize / 1024).toFixed(1),
|
|
725
726
|
" KB"
|
|
726
727
|
] })
|
|
727
728
|
] }),
|
|
728
729
|
/* @__PURE__ */ e(
|
|
729
|
-
|
|
730
|
+
O,
|
|
730
731
|
{
|
|
731
732
|
size: "small",
|
|
732
733
|
onClick: S,
|
|
733
734
|
disabled: l,
|
|
734
|
-
"aria-label": `Remove ${
|
|
735
|
+
"aria-label": `Remove ${t.fileName}`,
|
|
735
736
|
children: /* @__PURE__ */ e(G, { fontSize: "small" })
|
|
736
737
|
}
|
|
737
738
|
)
|
|
738
739
|
]
|
|
739
740
|
}
|
|
740
|
-
) : /* @__PURE__ */
|
|
741
|
-
/* @__PURE__ */ e(
|
|
741
|
+
) : /* @__PURE__ */ c(W, { spacing: 1, sx: { alignItems: "center" }, children: [
|
|
742
|
+
/* @__PURE__ */ e(De, { color: "action" }),
|
|
742
743
|
/* @__PURE__ */ e(y, { variant: "body2", color: "text.secondary", children: "Drag & drop an image here, or click to browse" })
|
|
743
744
|
] })
|
|
744
745
|
]
|
|
745
746
|
}
|
|
746
747
|
),
|
|
747
|
-
/* @__PURE__ */ e(
|
|
748
|
+
/* @__PURE__ */ e(d, { "aria-live": "polite", children: k && /* @__PURE__ */ e(ye, { id: v, error: w, children: k }) })
|
|
748
749
|
] });
|
|
749
750
|
}
|
|
750
|
-
const
|
|
751
|
-
function(
|
|
752
|
-
const { fullWidth: i = !0, label:
|
|
753
|
-
|
|
751
|
+
const B = ce(
|
|
752
|
+
function(t, o) {
|
|
753
|
+
const { fullWidth: i = !0, label: a, ...n } = t, l = H(), h = n.id ?? l, s = (f) => /* @__PURE__ */ c(d, { sx: { width: i ? "100%" : "auto" }, children: [
|
|
754
|
+
a && /* @__PURE__ */ c(
|
|
754
755
|
y,
|
|
755
756
|
{
|
|
756
757
|
component: "label",
|
|
757
|
-
|
|
758
|
+
id: `${h}-label`,
|
|
759
|
+
htmlFor: h,
|
|
758
760
|
variant: "body2",
|
|
759
761
|
sx: { display: "block", mb: 0.5, fontWeight: 500 },
|
|
760
762
|
children: [
|
|
761
|
-
|
|
762
|
-
|
|
763
|
+
a,
|
|
764
|
+
n.required && /* @__PURE__ */ e(
|
|
763
765
|
y,
|
|
764
766
|
{
|
|
765
767
|
component: "span",
|
|
@@ -772,56 +774,56 @@ const H = ce(
|
|
|
772
774
|
),
|
|
773
775
|
f
|
|
774
776
|
] });
|
|
775
|
-
if (
|
|
777
|
+
if (n.price) {
|
|
776
778
|
const {
|
|
777
779
|
price: f,
|
|
778
|
-
value:
|
|
779
|
-
onChange:
|
|
780
|
-
currencySymbol:
|
|
781
|
-
slotProps:
|
|
782
|
-
...
|
|
783
|
-
} =
|
|
784
|
-
return
|
|
780
|
+
value: v,
|
|
781
|
+
onChange: x,
|
|
782
|
+
currencySymbol: I = "$",
|
|
783
|
+
slotProps: g,
|
|
784
|
+
...D
|
|
785
|
+
} = n;
|
|
786
|
+
return s(
|
|
785
787
|
/* @__PURE__ */ e(
|
|
786
|
-
|
|
788
|
+
Z,
|
|
787
789
|
{
|
|
788
|
-
...
|
|
789
|
-
id:
|
|
790
|
-
ref:
|
|
790
|
+
...D,
|
|
791
|
+
id: h,
|
|
792
|
+
ref: o,
|
|
791
793
|
fullWidth: i,
|
|
792
794
|
type: "number",
|
|
793
|
-
value:
|
|
794
|
-
onChange: (
|
|
795
|
-
const S =
|
|
795
|
+
value: v ?? "",
|
|
796
|
+
onChange: (T) => {
|
|
797
|
+
const S = T.target.value;
|
|
796
798
|
if (S === "") {
|
|
797
|
-
|
|
799
|
+
x(void 0);
|
|
798
800
|
return;
|
|
799
801
|
}
|
|
800
802
|
const w = Number(S);
|
|
801
|
-
Number.isNaN(w) ||
|
|
803
|
+
Number.isNaN(w) || x(w);
|
|
802
804
|
},
|
|
803
805
|
hiddenLabel: !0,
|
|
804
806
|
slotProps: {
|
|
805
|
-
...
|
|
807
|
+
...g,
|
|
806
808
|
input: {
|
|
807
|
-
...
|
|
808
|
-
startAdornment: /* @__PURE__ */ e(ne, { position: "start", children:
|
|
809
|
+
...g == null ? void 0 : g.input,
|
|
810
|
+
startAdornment: /* @__PURE__ */ e(ne, { position: "start", children: I })
|
|
809
811
|
},
|
|
810
|
-
htmlInput: { min: 0, step: "0.01", ...
|
|
811
|
-
formHelperText: { sx: { mx: 0 }, ...
|
|
812
|
+
htmlInput: { min: 0, step: "0.01", ...g == null ? void 0 : g.htmlInput },
|
|
813
|
+
formHelperText: { sx: { mx: 0 }, ...g == null ? void 0 : g.formHelperText }
|
|
812
814
|
}
|
|
813
815
|
}
|
|
814
816
|
)
|
|
815
817
|
);
|
|
816
818
|
}
|
|
817
|
-
const { price: p, slotProps: u, ...
|
|
818
|
-
return
|
|
819
|
+
const { price: p, slotProps: u, ...m } = n;
|
|
820
|
+
return s(
|
|
819
821
|
/* @__PURE__ */ e(
|
|
820
|
-
|
|
822
|
+
Z,
|
|
821
823
|
{
|
|
822
|
-
...
|
|
823
|
-
id:
|
|
824
|
-
ref:
|
|
824
|
+
...m,
|
|
825
|
+
id: h,
|
|
826
|
+
ref: o,
|
|
825
827
|
fullWidth: i,
|
|
826
828
|
hiddenLabel: !0,
|
|
827
829
|
slotProps: {
|
|
@@ -833,33 +835,33 @@ const H = ce(
|
|
|
833
835
|
);
|
|
834
836
|
}
|
|
835
837
|
);
|
|
836
|
-
function
|
|
838
|
+
function Qe({
|
|
837
839
|
options: r,
|
|
838
|
-
value:
|
|
839
|
-
onChange:
|
|
840
|
+
value: t,
|
|
841
|
+
onChange: o,
|
|
840
842
|
getOptionLabel: i,
|
|
841
|
-
isOptionEqualToValue:
|
|
842
|
-
label:
|
|
843
|
+
isOptionEqualToValue: a,
|
|
844
|
+
label: n,
|
|
843
845
|
icon: l,
|
|
844
|
-
popupIcon:
|
|
845
|
-
width:
|
|
846
|
+
popupIcon: h,
|
|
847
|
+
width: s = 240,
|
|
846
848
|
variant: p = "card",
|
|
847
849
|
size: u = "medium",
|
|
848
|
-
sx:
|
|
850
|
+
sx: m
|
|
849
851
|
}) {
|
|
850
852
|
const f = p === "minimal";
|
|
851
|
-
return /* @__PURE__ */ e(
|
|
853
|
+
return /* @__PURE__ */ e(d, { sx: [{ width: s }, ...A(m)], children: /* @__PURE__ */ e(
|
|
852
854
|
ve,
|
|
853
855
|
{
|
|
854
856
|
disableClearable: !0,
|
|
855
857
|
size: u,
|
|
856
858
|
options: r,
|
|
857
859
|
getOptionLabel: i,
|
|
858
|
-
isOptionEqualToValue:
|
|
859
|
-
value:
|
|
860
|
-
popupIcon:
|
|
861
|
-
onChange: (
|
|
862
|
-
|
|
860
|
+
isOptionEqualToValue: a,
|
|
861
|
+
value: t,
|
|
862
|
+
popupIcon: h,
|
|
863
|
+
onChange: (v, x) => {
|
|
864
|
+
x !== null && o(x);
|
|
863
865
|
},
|
|
864
866
|
sx: {
|
|
865
867
|
width: "100%",
|
|
@@ -876,15 +878,15 @@ function Ye({
|
|
|
876
878
|
}
|
|
877
879
|
}
|
|
878
880
|
},
|
|
879
|
-
renderInput: (
|
|
880
|
-
|
|
881
|
+
renderInput: (v) => /* @__PURE__ */ e(
|
|
882
|
+
B,
|
|
881
883
|
{
|
|
882
|
-
...
|
|
883
|
-
label:
|
|
884
|
+
...v,
|
|
885
|
+
label: n,
|
|
884
886
|
slotProps: {
|
|
885
|
-
...
|
|
887
|
+
...v.slotProps,
|
|
886
888
|
input: {
|
|
887
|
-
...
|
|
889
|
+
...v.slotProps.input,
|
|
888
890
|
startAdornment: l ? /* @__PURE__ */ e(
|
|
889
891
|
ne,
|
|
890
892
|
{
|
|
@@ -892,7 +894,7 @@ function Ye({
|
|
|
892
894
|
sx: { color: "text.secondary" },
|
|
893
895
|
children: l
|
|
894
896
|
}
|
|
895
|
-
) :
|
|
897
|
+
) : v.slotProps.input.startAdornment
|
|
896
898
|
}
|
|
897
899
|
}
|
|
898
900
|
}
|
|
@@ -900,23 +902,23 @@ function Ye({
|
|
|
900
902
|
}
|
|
901
903
|
) });
|
|
902
904
|
}
|
|
903
|
-
function
|
|
905
|
+
function Xe({
|
|
904
906
|
title: r,
|
|
905
|
-
subtitle:
|
|
906
|
-
eyebrow:
|
|
907
|
+
subtitle: t,
|
|
908
|
+
eyebrow: o,
|
|
907
909
|
actions: i,
|
|
908
|
-
imageSrc:
|
|
909
|
-
imageAlt:
|
|
910
|
+
imageSrc: a,
|
|
911
|
+
imageAlt: n = "",
|
|
910
912
|
imagePosition: l = "right",
|
|
911
|
-
align:
|
|
912
|
-
background:
|
|
913
|
+
align: h = "auto",
|
|
914
|
+
background: s = "background.paper",
|
|
913
915
|
minHeight: p = "60vh",
|
|
914
916
|
maxWidth: u = 1200,
|
|
915
|
-
slotProps:
|
|
917
|
+
slotProps: m
|
|
916
918
|
}) {
|
|
917
|
-
var w,
|
|
918
|
-
const f = !!
|
|
919
|
-
|
|
919
|
+
var w, k;
|
|
920
|
+
const f = !!a, v = l === "left", { sx: x, ...I } = (m == null ? void 0 : m.title) ?? {}, { sx: g, ...D } = (m == null ? void 0 : m.subtitle) ?? {}, j = h === "left" ? "left" : f ? { xs: "center", md: "left" } : "center", T = h === "left" ? "flex-start" : f ? { xs: "center", md: "flex-start" } : "center", S = f && /* @__PURE__ */ e(
|
|
921
|
+
d,
|
|
920
922
|
{
|
|
921
923
|
sx: {
|
|
922
924
|
width: "100%",
|
|
@@ -924,11 +926,11 @@ function Ke({
|
|
|
924
926
|
minWidth: 0
|
|
925
927
|
},
|
|
926
928
|
children: /* @__PURE__ */ e(
|
|
927
|
-
|
|
929
|
+
d,
|
|
928
930
|
{
|
|
929
931
|
component: "img",
|
|
930
|
-
src:
|
|
931
|
-
alt:
|
|
932
|
+
src: a,
|
|
933
|
+
alt: n,
|
|
932
934
|
sx: [
|
|
933
935
|
{
|
|
934
936
|
width: "100%",
|
|
@@ -939,14 +941,14 @@ function Ke({
|
|
|
939
941
|
boxShadow: 4,
|
|
940
942
|
display: "block"
|
|
941
943
|
},
|
|
942
|
-
...
|
|
944
|
+
...A((w = m == null ? void 0 : m.image) == null ? void 0 : w.sx)
|
|
943
945
|
]
|
|
944
946
|
}
|
|
945
947
|
)
|
|
946
948
|
}
|
|
947
949
|
);
|
|
948
950
|
return /* @__PURE__ */ e(
|
|
949
|
-
|
|
951
|
+
d,
|
|
950
952
|
{
|
|
951
953
|
sx: [
|
|
952
954
|
{
|
|
@@ -954,14 +956,14 @@ function Ke({
|
|
|
954
956
|
display: "flex",
|
|
955
957
|
justifyContent: "center",
|
|
956
958
|
alignItems: "center",
|
|
957
|
-
bgcolor:
|
|
959
|
+
bgcolor: s,
|
|
958
960
|
px: { xs: 2, sm: 3 },
|
|
959
961
|
py: { xs: 5, md: 0 }
|
|
960
962
|
},
|
|
961
|
-
...
|
|
963
|
+
...A((k = m == null ? void 0 : m.root) == null ? void 0 : k.sx)
|
|
962
964
|
],
|
|
963
|
-
children: /* @__PURE__ */
|
|
964
|
-
|
|
965
|
+
children: /* @__PURE__ */ c(
|
|
966
|
+
d,
|
|
965
967
|
{
|
|
966
968
|
sx: {
|
|
967
969
|
width: "100%",
|
|
@@ -973,18 +975,18 @@ function Ke({
|
|
|
973
975
|
gap: { xs: 4, md: 8 }
|
|
974
976
|
},
|
|
975
977
|
children: [
|
|
976
|
-
|
|
977
|
-
/* @__PURE__ */
|
|
978
|
-
|
|
978
|
+
v && S,
|
|
979
|
+
/* @__PURE__ */ c(
|
|
980
|
+
d,
|
|
979
981
|
{
|
|
980
982
|
sx: {
|
|
981
|
-
width:
|
|
983
|
+
width: h === "left" ? "100%" : "auto",
|
|
982
984
|
maxWidth: f ? { xs: "100%", md: 550 } : 700,
|
|
983
985
|
minWidth: 0,
|
|
984
|
-
textAlign:
|
|
986
|
+
textAlign: j
|
|
985
987
|
},
|
|
986
988
|
children: [
|
|
987
|
-
|
|
989
|
+
o && /* @__PURE__ */ e(
|
|
988
990
|
y,
|
|
989
991
|
{
|
|
990
992
|
variant: "overline",
|
|
@@ -995,7 +997,7 @@ function Ke({
|
|
|
995
997
|
letterSpacing: "0.14em",
|
|
996
998
|
mb: 1
|
|
997
999
|
},
|
|
998
|
-
children:
|
|
1000
|
+
children: o
|
|
999
1001
|
}
|
|
1000
1002
|
),
|
|
1001
1003
|
/* @__PURE__ */ e(
|
|
@@ -1003,71 +1005,71 @@ function Ke({
|
|
|
1003
1005
|
{
|
|
1004
1006
|
variant: "h2",
|
|
1005
1007
|
component: "h1",
|
|
1006
|
-
...
|
|
1007
|
-
sx: [{ color: "primary.main", mb: 2 }, ...
|
|
1008
|
+
...I,
|
|
1009
|
+
sx: [{ color: "primary.main", mb: 2 }, ...A(x)],
|
|
1008
1010
|
children: r
|
|
1009
1011
|
}
|
|
1010
1012
|
),
|
|
1011
|
-
|
|
1013
|
+
t && /* @__PURE__ */ e(
|
|
1012
1014
|
y,
|
|
1013
1015
|
{
|
|
1014
1016
|
variant: "h6",
|
|
1015
1017
|
component: "p",
|
|
1016
|
-
...
|
|
1017
|
-
sx: [{ color: "text.secondary" }, ...
|
|
1018
|
-
children:
|
|
1018
|
+
...D,
|
|
1019
|
+
sx: [{ color: "text.secondary" }, ...A(g)],
|
|
1020
|
+
children: t
|
|
1019
1021
|
}
|
|
1020
1022
|
),
|
|
1021
1023
|
i && /* @__PURE__ */ e(
|
|
1022
|
-
|
|
1024
|
+
W,
|
|
1023
1025
|
{
|
|
1024
1026
|
direction: "row",
|
|
1025
1027
|
spacing: 1.5,
|
|
1026
1028
|
useFlexGap: !0,
|
|
1027
|
-
sx: { flexWrap: "wrap", justifyContent:
|
|
1029
|
+
sx: { flexWrap: "wrap", justifyContent: T, mt: 3 },
|
|
1028
1030
|
children: i
|
|
1029
1031
|
}
|
|
1030
1032
|
)
|
|
1031
1033
|
]
|
|
1032
1034
|
}
|
|
1033
1035
|
),
|
|
1034
|
-
!
|
|
1036
|
+
!v && S
|
|
1035
1037
|
]
|
|
1036
1038
|
}
|
|
1037
1039
|
)
|
|
1038
1040
|
}
|
|
1039
1041
|
);
|
|
1040
1042
|
}
|
|
1041
|
-
const
|
|
1042
|
-
function
|
|
1043
|
+
const ze = 400;
|
|
1044
|
+
function P({
|
|
1043
1045
|
severity: r,
|
|
1044
|
-
children:
|
|
1045
|
-
onClose:
|
|
1046
|
+
children: t,
|
|
1047
|
+
onClose: o
|
|
1046
1048
|
}) {
|
|
1047
|
-
const [i,
|
|
1048
|
-
return /* @__PURE__ */ e(Ce, { in: i, timeout:
|
|
1049
|
-
|
|
1049
|
+
const [i, a] = F(!0);
|
|
1050
|
+
return /* @__PURE__ */ e(Ce, { in: i, timeout: ze, onExited: o, children: /* @__PURE__ */ e(
|
|
1051
|
+
d,
|
|
1050
1052
|
{
|
|
1051
1053
|
sx: {
|
|
1052
1054
|
position: "fixed",
|
|
1053
1055
|
bottom: { xs: 16, sm: 24 },
|
|
1054
1056
|
left: "50%",
|
|
1055
1057
|
transform: "translateX(-50%)",
|
|
1056
|
-
zIndex: (
|
|
1058
|
+
zIndex: (n) => n.zIndex.snackbar,
|
|
1057
1059
|
width: { xs: "calc(100% - 32px)", sm: "auto" },
|
|
1058
1060
|
maxWidth: 480
|
|
1059
1061
|
},
|
|
1060
1062
|
children: /* @__PURE__ */ e(
|
|
1061
|
-
|
|
1063
|
+
te,
|
|
1062
1064
|
{
|
|
1063
1065
|
severity: r,
|
|
1064
1066
|
variant: "standard",
|
|
1065
1067
|
action: /* @__PURE__ */ e(
|
|
1066
|
-
|
|
1068
|
+
O,
|
|
1067
1069
|
{
|
|
1068
1070
|
size: "small",
|
|
1069
1071
|
color: "inherit",
|
|
1070
|
-
onClick: () =>
|
|
1072
|
+
onClick: () => a(!1),
|
|
1071
1073
|
"aria-label": "close",
|
|
1072
1074
|
children: /* @__PURE__ */ e(G, { fontSize: "small" })
|
|
1073
1075
|
}
|
|
@@ -1076,113 +1078,134 @@ function Z({
|
|
|
1076
1078
|
backgroundColor: "background.paper",
|
|
1077
1079
|
boxShadow: 4
|
|
1078
1080
|
},
|
|
1079
|
-
children:
|
|
1081
|
+
children: t
|
|
1080
1082
|
}
|
|
1081
1083
|
)
|
|
1082
1084
|
}
|
|
1083
1085
|
) });
|
|
1084
1086
|
}
|
|
1085
|
-
const
|
|
1087
|
+
const ee = {
|
|
1086
1088
|
name: "",
|
|
1087
1089
|
email: "",
|
|
1088
1090
|
subject: "",
|
|
1089
1091
|
message: ""
|
|
1090
1092
|
};
|
|
1091
|
-
function
|
|
1093
|
+
function Ze({
|
|
1092
1094
|
onSubmit: r,
|
|
1093
|
-
submitLabel:
|
|
1094
|
-
submittingLabel:
|
|
1095
|
+
submitLabel: t = "Send message",
|
|
1096
|
+
submittingLabel: o = "Sending…",
|
|
1095
1097
|
successMessage: i = "Your message has been sent!",
|
|
1096
|
-
errorMessage:
|
|
1098
|
+
errorMessage: a = "There was an issue sending your message. Please try again.",
|
|
1099
|
+
subjectOptions: n,
|
|
1100
|
+
subjectPlaceholder: l = "Choose a subject"
|
|
1097
1101
|
}) {
|
|
1098
|
-
const [
|
|
1099
|
-
return /* @__PURE__ */ e(
|
|
1100
|
-
|
|
1102
|
+
const h = H(), [s, p] = F(ee), [u, m] = F("idle"), f = (x) => (I) => p((g) => ({ ...g, [x]: I.target.value }));
|
|
1103
|
+
return /* @__PURE__ */ e(d, { component: "form", onSubmit: async (x) => {
|
|
1104
|
+
x.preventDefault(), m("submitting");
|
|
1101
1105
|
try {
|
|
1102
|
-
await r(
|
|
1106
|
+
await r(s), p(ee), m("success");
|
|
1103
1107
|
} catch {
|
|
1104
|
-
|
|
1108
|
+
m("error");
|
|
1105
1109
|
}
|
|
1106
|
-
}, children: /* @__PURE__ */
|
|
1110
|
+
}, children: /* @__PURE__ */ c(W, { spacing: 2, children: [
|
|
1107
1111
|
/* @__PURE__ */ e(
|
|
1108
|
-
|
|
1112
|
+
B,
|
|
1109
1113
|
{
|
|
1110
1114
|
label: "Name",
|
|
1111
|
-
value:
|
|
1112
|
-
onChange:
|
|
1115
|
+
value: s.name,
|
|
1116
|
+
onChange: f("name"),
|
|
1113
1117
|
required: !0,
|
|
1114
1118
|
fullWidth: !0
|
|
1115
1119
|
}
|
|
1116
1120
|
),
|
|
1117
1121
|
/* @__PURE__ */ e(
|
|
1118
|
-
|
|
1122
|
+
B,
|
|
1119
1123
|
{
|
|
1120
1124
|
label: "Email Address",
|
|
1121
1125
|
type: "email",
|
|
1122
|
-
value:
|
|
1123
|
-
onChange:
|
|
1126
|
+
value: s.email,
|
|
1127
|
+
onChange: f("email"),
|
|
1124
1128
|
required: !0,
|
|
1125
1129
|
fullWidth: !0
|
|
1126
1130
|
}
|
|
1127
1131
|
),
|
|
1128
|
-
/* @__PURE__ */ e(
|
|
1129
|
-
|
|
1132
|
+
n ? /* @__PURE__ */ e(
|
|
1133
|
+
B,
|
|
1134
|
+
{
|
|
1135
|
+
label: "Subject",
|
|
1136
|
+
select: !0,
|
|
1137
|
+
value: s.subject,
|
|
1138
|
+
onChange: f("subject"),
|
|
1139
|
+
required: !0,
|
|
1140
|
+
fullWidth: !0,
|
|
1141
|
+
id: h,
|
|
1142
|
+
slotProps: {
|
|
1143
|
+
select: {
|
|
1144
|
+
labelId: `${h}-label`,
|
|
1145
|
+
displayEmpty: !0,
|
|
1146
|
+
renderValue: (x) => x ? String(x) : /* @__PURE__ */ e(d, { component: "span", sx: { color: "text.secondary" }, children: l })
|
|
1147
|
+
}
|
|
1148
|
+
},
|
|
1149
|
+
children: n.map((x) => /* @__PURE__ */ e(we, { value: x, children: x }, x))
|
|
1150
|
+
}
|
|
1151
|
+
) : /* @__PURE__ */ e(
|
|
1152
|
+
B,
|
|
1130
1153
|
{
|
|
1131
1154
|
label: "Subject",
|
|
1132
|
-
value:
|
|
1133
|
-
onChange:
|
|
1155
|
+
value: s.subject,
|
|
1156
|
+
onChange: f("subject"),
|
|
1134
1157
|
fullWidth: !0
|
|
1135
1158
|
}
|
|
1136
1159
|
),
|
|
1137
1160
|
/* @__PURE__ */ e(
|
|
1138
|
-
|
|
1161
|
+
B,
|
|
1139
1162
|
{
|
|
1140
1163
|
label: "Your message",
|
|
1141
|
-
value:
|
|
1142
|
-
onChange:
|
|
1164
|
+
value: s.message,
|
|
1165
|
+
onChange: f("message"),
|
|
1143
1166
|
required: !0,
|
|
1144
1167
|
fullWidth: !0,
|
|
1145
1168
|
multiline: !0,
|
|
1146
1169
|
minRows: 4
|
|
1147
1170
|
}
|
|
1148
1171
|
),
|
|
1149
|
-
|
|
1150
|
-
|
|
1172
|
+
u === "success" && /* @__PURE__ */ e(
|
|
1173
|
+
P,
|
|
1151
1174
|
{
|
|
1152
1175
|
severity: "success",
|
|
1153
|
-
onClose: () =>
|
|
1176
|
+
onClose: () => m("idle"),
|
|
1154
1177
|
children: i
|
|
1155
1178
|
}
|
|
1156
1179
|
),
|
|
1157
|
-
|
|
1180
|
+
u === "error" && /* @__PURE__ */ e(P, { severity: "error", onClose: () => m("idle"), children: a }),
|
|
1158
1181
|
/* @__PURE__ */ e(
|
|
1159
1182
|
U,
|
|
1160
1183
|
{
|
|
1161
1184
|
type: "submit",
|
|
1162
1185
|
variant: "contained",
|
|
1163
|
-
disabled:
|
|
1186
|
+
disabled: u === "submitting",
|
|
1164
1187
|
fullWidth: !0,
|
|
1165
|
-
children:
|
|
1166
|
-
/* @__PURE__ */ e(
|
|
1167
|
-
/* @__PURE__ */ e("span", { style: ie, children:
|
|
1168
|
-
] }) :
|
|
1188
|
+
children: u === "submitting" ? /* @__PURE__ */ c(Y, { children: [
|
|
1189
|
+
/* @__PURE__ */ e(Se, { size: 22, color: "inherit", "aria-hidden": !0 }),
|
|
1190
|
+
/* @__PURE__ */ e("span", { style: ie, children: o })
|
|
1191
|
+
] }) : t
|
|
1169
1192
|
}
|
|
1170
1193
|
)
|
|
1171
1194
|
] }) });
|
|
1172
1195
|
}
|
|
1173
|
-
function
|
|
1196
|
+
function Pe({
|
|
1174
1197
|
value: r,
|
|
1175
|
-
onChange:
|
|
1176
|
-
min:
|
|
1198
|
+
onChange: t,
|
|
1199
|
+
min: o = 1,
|
|
1177
1200
|
max: i = 1 / 0,
|
|
1178
|
-
label:
|
|
1179
|
-
size:
|
|
1201
|
+
label: a = "quantity",
|
|
1202
|
+
size: n = "medium",
|
|
1180
1203
|
shape: l = "pill",
|
|
1181
|
-
sx:
|
|
1204
|
+
sx: h
|
|
1182
1205
|
}) {
|
|
1183
|
-
const
|
|
1184
|
-
return /* @__PURE__ */
|
|
1185
|
-
|
|
1206
|
+
const s = l === "rounded" ? { borderRadius: 1 } : void 0;
|
|
1207
|
+
return /* @__PURE__ */ c(
|
|
1208
|
+
W,
|
|
1186
1209
|
{
|
|
1187
1210
|
direction: "row",
|
|
1188
1211
|
sx: [
|
|
@@ -1193,37 +1216,37 @@ function Qe({
|
|
|
1193
1216
|
borderColor: "divider",
|
|
1194
1217
|
borderRadius: l === "rounded" ? 1 : 999
|
|
1195
1218
|
},
|
|
1196
|
-
...
|
|
1219
|
+
...A(h)
|
|
1197
1220
|
],
|
|
1198
1221
|
children: [
|
|
1199
1222
|
/* @__PURE__ */ e(
|
|
1200
|
-
|
|
1223
|
+
O,
|
|
1201
1224
|
{
|
|
1202
|
-
size:
|
|
1203
|
-
"aria-label": `Decrease ${
|
|
1204
|
-
onClick: () =>
|
|
1205
|
-
disabled: r <=
|
|
1206
|
-
sx:
|
|
1207
|
-
children: /* @__PURE__ */ e(
|
|
1225
|
+
size: n,
|
|
1226
|
+
"aria-label": `Decrease ${a}`,
|
|
1227
|
+
onClick: () => t(Math.max(o, r - 1)),
|
|
1228
|
+
disabled: r <= o,
|
|
1229
|
+
sx: s,
|
|
1230
|
+
children: /* @__PURE__ */ e(Ae, { fontSize: "small" })
|
|
1208
1231
|
}
|
|
1209
1232
|
),
|
|
1210
1233
|
/* @__PURE__ */ e(
|
|
1211
1234
|
y,
|
|
1212
1235
|
{
|
|
1213
1236
|
component: "output",
|
|
1214
|
-
"aria-label":
|
|
1237
|
+
"aria-label": a,
|
|
1215
1238
|
sx: { minWidth: 32, textAlign: "center", fontWeight: 600 },
|
|
1216
1239
|
children: r
|
|
1217
1240
|
}
|
|
1218
1241
|
),
|
|
1219
1242
|
/* @__PURE__ */ e(
|
|
1220
|
-
|
|
1243
|
+
O,
|
|
1221
1244
|
{
|
|
1222
|
-
size:
|
|
1223
|
-
"aria-label": `Increase ${
|
|
1224
|
-
onClick: () =>
|
|
1245
|
+
size: n,
|
|
1246
|
+
"aria-label": `Increase ${a}`,
|
|
1247
|
+
onClick: () => t(Math.min(i, r + 1)),
|
|
1225
1248
|
disabled: r >= i,
|
|
1226
|
-
sx:
|
|
1249
|
+
sx: s,
|
|
1227
1250
|
children: /* @__PURE__ */ e(re, { fontSize: "small" })
|
|
1228
1251
|
}
|
|
1229
1252
|
)
|
|
@@ -1231,30 +1254,30 @@ function Qe({
|
|
|
1231
1254
|
}
|
|
1232
1255
|
);
|
|
1233
1256
|
}
|
|
1234
|
-
function
|
|
1257
|
+
function et(r) {
|
|
1235
1258
|
const {
|
|
1236
|
-
items:
|
|
1237
|
-
columns:
|
|
1259
|
+
items: t,
|
|
1260
|
+
columns: o = 3,
|
|
1238
1261
|
background: i = "transparent",
|
|
1239
|
-
maxWidth:
|
|
1262
|
+
maxWidth: a = "lg"
|
|
1240
1263
|
} = r;
|
|
1241
|
-
return /* @__PURE__ */ e(
|
|
1242
|
-
|
|
1264
|
+
return /* @__PURE__ */ e(d, { sx: { bgcolor: i }, children: /* @__PURE__ */ e(
|
|
1265
|
+
N,
|
|
1243
1266
|
{
|
|
1244
1267
|
component: "ul",
|
|
1245
|
-
maxWidth:
|
|
1268
|
+
maxWidth: a,
|
|
1246
1269
|
sx: {
|
|
1247
1270
|
display: "grid",
|
|
1248
1271
|
gridTemplateColumns: {
|
|
1249
|
-
md: `repeat(${
|
|
1272
|
+
md: `repeat(${o}, minmax(0, 1fr))`
|
|
1250
1273
|
},
|
|
1251
1274
|
gap: { xs: 2.5, md: 4 },
|
|
1252
1275
|
my: 0,
|
|
1253
1276
|
py: 4,
|
|
1254
1277
|
listStyle: "none"
|
|
1255
1278
|
},
|
|
1256
|
-
children:
|
|
1257
|
-
|
|
1279
|
+
children: t.map((n, l) => /* @__PURE__ */ c(
|
|
1280
|
+
W,
|
|
1258
1281
|
{
|
|
1259
1282
|
component: "li",
|
|
1260
1283
|
direction: "row",
|
|
@@ -1262,7 +1285,7 @@ function Xe(r) {
|
|
|
1262
1285
|
sx: { alignItems: "flex-start" },
|
|
1263
1286
|
children: [
|
|
1264
1287
|
/* @__PURE__ */ e(
|
|
1265
|
-
|
|
1288
|
+
d,
|
|
1266
1289
|
{
|
|
1267
1290
|
sx: {
|
|
1268
1291
|
display: "grid",
|
|
@@ -1276,17 +1299,17 @@ function Xe(r) {
|
|
|
1276
1299
|
bgcolor: "background.paper",
|
|
1277
1300
|
color: "primary.main"
|
|
1278
1301
|
},
|
|
1279
|
-
children:
|
|
1302
|
+
children: n.icon
|
|
1280
1303
|
}
|
|
1281
1304
|
),
|
|
1282
|
-
/* @__PURE__ */
|
|
1283
|
-
/* @__PURE__ */ e(y, { sx: { fontWeight: 700 }, children:
|
|
1284
|
-
|
|
1305
|
+
/* @__PURE__ */ c(d, { children: [
|
|
1306
|
+
/* @__PURE__ */ e(y, { sx: { fontWeight: 700 }, children: n.title }),
|
|
1307
|
+
n.text && /* @__PURE__ */ e(
|
|
1285
1308
|
y,
|
|
1286
1309
|
{
|
|
1287
1310
|
color: "text.secondary",
|
|
1288
1311
|
sx: { mt: 0.25, fontSize: 15 },
|
|
1289
|
-
children:
|
|
1312
|
+
children: n.text
|
|
1290
1313
|
}
|
|
1291
1314
|
)
|
|
1292
1315
|
] })
|
|
@@ -1297,22 +1320,125 @@ function Xe(r) {
|
|
|
1297
1320
|
}
|
|
1298
1321
|
) });
|
|
1299
1322
|
}
|
|
1300
|
-
function
|
|
1323
|
+
function tt(r) {
|
|
1301
1324
|
const {
|
|
1302
|
-
|
|
1303
|
-
|
|
1325
|
+
items: t,
|
|
1326
|
+
title: o,
|
|
1327
|
+
placeholderIcon: i = /* @__PURE__ */ e(Te, {}),
|
|
1328
|
+
tileBackground: a = "background.default",
|
|
1329
|
+
maxWidth: n = "lg",
|
|
1330
|
+
sx: l
|
|
1331
|
+
} = r, h = H(), s = {
|
|
1332
|
+
width: "100%",
|
|
1333
|
+
aspectRatio: "1 / 1",
|
|
1334
|
+
borderRadius: "50%",
|
|
1335
|
+
p: "4px",
|
|
1336
|
+
border: 1,
|
|
1337
|
+
borderColor: "divider",
|
|
1338
|
+
bgcolor: a
|
|
1339
|
+
};
|
|
1340
|
+
return /* @__PURE__ */ c(
|
|
1341
|
+
N,
|
|
1342
|
+
{
|
|
1343
|
+
component: "section",
|
|
1344
|
+
maxWidth: n,
|
|
1345
|
+
"aria-labelledby": o ? h : void 0,
|
|
1346
|
+
sx: [
|
|
1347
|
+
{
|
|
1348
|
+
display: "flex",
|
|
1349
|
+
flexDirection: "column",
|
|
1350
|
+
alignItems: "center",
|
|
1351
|
+
gap: 3
|
|
1352
|
+
},
|
|
1353
|
+
...A(l)
|
|
1354
|
+
],
|
|
1355
|
+
children: [
|
|
1356
|
+
o && /* @__PURE__ */ e(y, { id: h, variant: "h3", component: "h2", children: o }),
|
|
1357
|
+
/* @__PURE__ */ e(
|
|
1358
|
+
d,
|
|
1359
|
+
{
|
|
1360
|
+
component: "ul",
|
|
1361
|
+
sx: {
|
|
1362
|
+
display: "grid",
|
|
1363
|
+
gridTemplateColumns: `repeat(${t.length}, minmax(0, 1fr))`,
|
|
1364
|
+
gap: { xs: 1.5, md: 2 },
|
|
1365
|
+
width: "100%",
|
|
1366
|
+
maxWidth: t.length * 190,
|
|
1367
|
+
m: 0,
|
|
1368
|
+
p: 0,
|
|
1369
|
+
listStyle: "none"
|
|
1370
|
+
},
|
|
1371
|
+
children: t.map((p) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ c(
|
|
1372
|
+
K,
|
|
1373
|
+
{
|
|
1374
|
+
onClick: p.onClick,
|
|
1375
|
+
sx: {
|
|
1376
|
+
display: "flex",
|
|
1377
|
+
flexDirection: "column",
|
|
1378
|
+
gap: 1,
|
|
1379
|
+
width: "100%",
|
|
1380
|
+
borderRadius: 1,
|
|
1381
|
+
color: "text.primary",
|
|
1382
|
+
fontSize: 15,
|
|
1383
|
+
fontWeight: 600,
|
|
1384
|
+
lineHeight: 1.3,
|
|
1385
|
+
textAlign: "center",
|
|
1386
|
+
"&:hover .category-tile-label": { textDecoration: "underline" },
|
|
1387
|
+
"&.Mui-focusVisible": {
|
|
1388
|
+
outline: 2,
|
|
1389
|
+
outlineColor: "primary.main",
|
|
1390
|
+
outlineOffset: 4
|
|
1391
|
+
}
|
|
1392
|
+
},
|
|
1393
|
+
children: [
|
|
1394
|
+
p.image ? /* @__PURE__ */ e(
|
|
1395
|
+
d,
|
|
1396
|
+
{
|
|
1397
|
+
component: "img",
|
|
1398
|
+
src: p.image,
|
|
1399
|
+
alt: "",
|
|
1400
|
+
loading: "lazy",
|
|
1401
|
+
sx: { ...s, display: "block", objectFit: "cover" }
|
|
1402
|
+
}
|
|
1403
|
+
) : /* @__PURE__ */ e(
|
|
1404
|
+
d,
|
|
1405
|
+
{
|
|
1406
|
+
"aria-hidden": !0,
|
|
1407
|
+
sx: {
|
|
1408
|
+
...s,
|
|
1409
|
+
display: "grid",
|
|
1410
|
+
placeItems: "center",
|
|
1411
|
+
color: "primary.main"
|
|
1412
|
+
},
|
|
1413
|
+
children: i
|
|
1414
|
+
}
|
|
1415
|
+
),
|
|
1416
|
+
/* @__PURE__ */ e(d, { component: "span", className: "category-tile-label", children: p.label })
|
|
1417
|
+
]
|
|
1418
|
+
}
|
|
1419
|
+
) }, p.label))
|
|
1420
|
+
}
|
|
1421
|
+
)
|
|
1422
|
+
]
|
|
1423
|
+
}
|
|
1424
|
+
);
|
|
1425
|
+
}
|
|
1426
|
+
function nt(r) {
|
|
1427
|
+
const {
|
|
1428
|
+
value: t,
|
|
1429
|
+
onChange: o,
|
|
1304
1430
|
onSubmit: i,
|
|
1305
|
-
placeholder:
|
|
1306
|
-
label:
|
|
1431
|
+
placeholder: a = "Search",
|
|
1432
|
+
label: n = "Search",
|
|
1307
1433
|
submitLabel: l = "Search",
|
|
1308
|
-
clearLabel:
|
|
1309
|
-
sx:
|
|
1434
|
+
clearLabel: h = "Clear search",
|
|
1435
|
+
sx: s
|
|
1310
1436
|
} = r;
|
|
1311
1437
|
function p(u) {
|
|
1312
|
-
u.preventDefault(), i == null || i(
|
|
1438
|
+
u.preventDefault(), i == null || i(t);
|
|
1313
1439
|
}
|
|
1314
|
-
return /* @__PURE__ */
|
|
1315
|
-
|
|
1440
|
+
return /* @__PURE__ */ c(
|
|
1441
|
+
d,
|
|
1316
1442
|
{
|
|
1317
1443
|
component: "form",
|
|
1318
1444
|
role: "search",
|
|
@@ -1329,33 +1455,33 @@ function Ze(r) {
|
|
|
1329
1455
|
bgcolor: "background.paper",
|
|
1330
1456
|
"&:focus-within": { borderColor: "primary.main" }
|
|
1331
1457
|
},
|
|
1332
|
-
...
|
|
1458
|
+
...A(s)
|
|
1333
1459
|
],
|
|
1334
1460
|
children: [
|
|
1335
1461
|
/* @__PURE__ */ e(
|
|
1336
|
-
|
|
1462
|
+
Ie,
|
|
1337
1463
|
{
|
|
1338
|
-
value:
|
|
1339
|
-
onChange: (u) =>
|
|
1340
|
-
placeholder:
|
|
1464
|
+
value: t,
|
|
1465
|
+
onChange: (u) => o(u.target.value),
|
|
1466
|
+
placeholder: a,
|
|
1341
1467
|
slotProps: {
|
|
1342
|
-
input: { "aria-label":
|
|
1468
|
+
input: { "aria-label": n, enterKeyHint: "search" }
|
|
1343
1469
|
},
|
|
1344
1470
|
sx: { flex: 1, minWidth: 0, px: 1.5 }
|
|
1345
1471
|
}
|
|
1346
1472
|
),
|
|
1347
|
-
|
|
1348
|
-
|
|
1473
|
+
t && /* @__PURE__ */ e(
|
|
1474
|
+
O,
|
|
1349
1475
|
{
|
|
1350
1476
|
size: "small",
|
|
1351
|
-
"aria-label":
|
|
1352
|
-
onClick: () =>
|
|
1477
|
+
"aria-label": h,
|
|
1478
|
+
onClick: () => o(""),
|
|
1353
1479
|
sx: { alignSelf: "center", mr: 0.5 },
|
|
1354
1480
|
children: /* @__PURE__ */ e(G, { fontSize: "small" })
|
|
1355
1481
|
}
|
|
1356
1482
|
),
|
|
1357
1483
|
/* @__PURE__ */ e(
|
|
1358
|
-
|
|
1484
|
+
K,
|
|
1359
1485
|
{
|
|
1360
1486
|
type: "submit",
|
|
1361
1487
|
"aria-label": l,
|
|
@@ -1370,26 +1496,26 @@ function Ze(r) {
|
|
|
1370
1496
|
outlineOffset: "-5px"
|
|
1371
1497
|
}
|
|
1372
1498
|
},
|
|
1373
|
-
children: /* @__PURE__ */ e(
|
|
1499
|
+
children: /* @__PURE__ */ e(Re, { fontSize: "small" })
|
|
1374
1500
|
}
|
|
1375
1501
|
)
|
|
1376
1502
|
]
|
|
1377
1503
|
}
|
|
1378
1504
|
);
|
|
1379
1505
|
}
|
|
1380
|
-
function
|
|
1506
|
+
function rt(r) {
|
|
1381
1507
|
const {
|
|
1382
|
-
icon:
|
|
1383
|
-
title:
|
|
1508
|
+
icon: t,
|
|
1509
|
+
title: o,
|
|
1384
1510
|
children: i,
|
|
1385
|
-
actions:
|
|
1386
|
-
titleVariant:
|
|
1511
|
+
actions: a,
|
|
1512
|
+
titleVariant: n = "h5",
|
|
1387
1513
|
titleComponent: l = "h3",
|
|
1388
|
-
iconBackground:
|
|
1389
|
-
sx:
|
|
1514
|
+
iconBackground: h = "action.hover",
|
|
1515
|
+
sx: s
|
|
1390
1516
|
} = r;
|
|
1391
|
-
return /* @__PURE__ */
|
|
1392
|
-
|
|
1517
|
+
return /* @__PURE__ */ c(
|
|
1518
|
+
W,
|
|
1393
1519
|
{
|
|
1394
1520
|
spacing: 1.5,
|
|
1395
1521
|
sx: [
|
|
@@ -1399,11 +1525,11 @@ function Pe(r) {
|
|
|
1399
1525
|
p: 3,
|
|
1400
1526
|
textAlign: "center"
|
|
1401
1527
|
},
|
|
1402
|
-
...
|
|
1528
|
+
...A(s)
|
|
1403
1529
|
],
|
|
1404
1530
|
children: [
|
|
1405
1531
|
/* @__PURE__ */ e(
|
|
1406
|
-
|
|
1532
|
+
d,
|
|
1407
1533
|
{
|
|
1408
1534
|
sx: {
|
|
1409
1535
|
display: "grid",
|
|
@@ -1411,32 +1537,32 @@ function Pe(r) {
|
|
|
1411
1537
|
width: 64,
|
|
1412
1538
|
height: 64,
|
|
1413
1539
|
borderRadius: "50%",
|
|
1414
|
-
bgcolor:
|
|
1540
|
+
bgcolor: h,
|
|
1415
1541
|
color: "primary.main"
|
|
1416
1542
|
},
|
|
1417
|
-
children:
|
|
1543
|
+
children: t
|
|
1418
1544
|
}
|
|
1419
1545
|
),
|
|
1420
|
-
/* @__PURE__ */ e(y, { variant:
|
|
1546
|
+
/* @__PURE__ */ e(y, { variant: n, component: l, children: o }),
|
|
1421
1547
|
i,
|
|
1422
|
-
|
|
1423
|
-
|
|
1548
|
+
a && /* @__PURE__ */ e(
|
|
1549
|
+
W,
|
|
1424
1550
|
{
|
|
1425
1551
|
direction: "row",
|
|
1426
1552
|
spacing: 1.5,
|
|
1427
1553
|
useFlexGap: !0,
|
|
1428
1554
|
sx: { flexWrap: "wrap", justifyContent: "center", pt: 1 },
|
|
1429
|
-
children:
|
|
1555
|
+
children: a
|
|
1430
1556
|
}
|
|
1431
1557
|
)
|
|
1432
1558
|
]
|
|
1433
1559
|
}
|
|
1434
1560
|
);
|
|
1435
1561
|
}
|
|
1436
|
-
function
|
|
1437
|
-
const { items:
|
|
1438
|
-
return
|
|
1439
|
-
|
|
1562
|
+
function it(r) {
|
|
1563
|
+
const { items: t, sx: o } = r;
|
|
1564
|
+
return t.length === 0 ? null : /* @__PURE__ */ e(
|
|
1565
|
+
d,
|
|
1440
1566
|
{
|
|
1441
1567
|
component: "dl",
|
|
1442
1568
|
sx: [
|
|
@@ -1446,45 +1572,45 @@ function et(r) {
|
|
|
1446
1572
|
gap: "6px 16px",
|
|
1447
1573
|
m: 0
|
|
1448
1574
|
},
|
|
1449
|
-
...
|
|
1575
|
+
...A(o)
|
|
1450
1576
|
],
|
|
1451
|
-
children:
|
|
1452
|
-
/* @__PURE__ */ e(
|
|
1577
|
+
children: t.map((i, a) => /* @__PURE__ */ c(de, { children: [
|
|
1578
|
+
/* @__PURE__ */ e(d, { component: "dt", sx: { fontWeight: 700 }, children: i.label }),
|
|
1453
1579
|
/* @__PURE__ */ e(
|
|
1454
|
-
|
|
1580
|
+
d,
|
|
1455
1581
|
{
|
|
1456
1582
|
component: "dd",
|
|
1457
1583
|
sx: { m: 0, color: "text.secondary", overflowWrap: "anywhere" },
|
|
1458
1584
|
children: i.value
|
|
1459
1585
|
}
|
|
1460
1586
|
)
|
|
1461
|
-
] },
|
|
1587
|
+
] }, a))
|
|
1462
1588
|
}
|
|
1463
1589
|
);
|
|
1464
1590
|
}
|
|
1465
|
-
const
|
|
1591
|
+
const Oe = {
|
|
1466
1592
|
background: "grey.900",
|
|
1467
1593
|
text: "grey.300",
|
|
1468
1594
|
heading: "common.white",
|
|
1469
1595
|
divider: "grey.800"
|
|
1470
1596
|
};
|
|
1471
|
-
function
|
|
1597
|
+
function ot(r) {
|
|
1472
1598
|
const {
|
|
1473
|
-
brand:
|
|
1474
|
-
description:
|
|
1599
|
+
brand: t,
|
|
1600
|
+
description: o,
|
|
1475
1601
|
columns: i = [],
|
|
1476
|
-
bottom:
|
|
1477
|
-
bottomAlign:
|
|
1602
|
+
bottom: a,
|
|
1603
|
+
bottomAlign: n = "left",
|
|
1478
1604
|
colors: l,
|
|
1479
|
-
maxWidth:
|
|
1480
|
-
} = r,
|
|
1481
|
-
return /* @__PURE__ */
|
|
1482
|
-
|
|
1605
|
+
maxWidth: h = "lg"
|
|
1606
|
+
} = r, s = { ...Oe, ...l };
|
|
1607
|
+
return /* @__PURE__ */ c(
|
|
1608
|
+
d,
|
|
1483
1609
|
{
|
|
1484
1610
|
component: "footer",
|
|
1485
1611
|
sx: {
|
|
1486
|
-
bgcolor:
|
|
1487
|
-
color:
|
|
1612
|
+
bgcolor: s.background,
|
|
1613
|
+
color: s.text,
|
|
1488
1614
|
"& a": {
|
|
1489
1615
|
color: "inherit",
|
|
1490
1616
|
textDecoration: "underline",
|
|
@@ -1501,10 +1627,10 @@ function tt(r) {
|
|
|
1501
1627
|
}
|
|
1502
1628
|
},
|
|
1503
1629
|
children: [
|
|
1504
|
-
/* @__PURE__ */
|
|
1505
|
-
|
|
1630
|
+
/* @__PURE__ */ c(
|
|
1631
|
+
N,
|
|
1506
1632
|
{
|
|
1507
|
-
maxWidth:
|
|
1633
|
+
maxWidth: h,
|
|
1508
1634
|
sx: {
|
|
1509
1635
|
display: "grid",
|
|
1510
1636
|
gridTemplateColumns: {
|
|
@@ -1516,12 +1642,12 @@ function tt(r) {
|
|
|
1516
1642
|
pb: 3.5
|
|
1517
1643
|
},
|
|
1518
1644
|
children: [
|
|
1519
|
-
/* @__PURE__ */
|
|
1520
|
-
/* @__PURE__ */ e(
|
|
1521
|
-
|
|
1645
|
+
/* @__PURE__ */ c(d, { sx: { gridColumn: { xs: "1 / -1", md: "auto" } }, children: [
|
|
1646
|
+
/* @__PURE__ */ e(d, { sx: { mb: 1, color: s.heading }, children: t }),
|
|
1647
|
+
o && /* @__PURE__ */ e(y, { sx: { maxWidth: "34ch", fontSize: 15 }, children: o })
|
|
1522
1648
|
] }),
|
|
1523
|
-
i.map((p) => /* @__PURE__ */
|
|
1524
|
-
|
|
1649
|
+
i.map((p) => /* @__PURE__ */ c(
|
|
1650
|
+
d,
|
|
1525
1651
|
{
|
|
1526
1652
|
component: "nav",
|
|
1527
1653
|
"aria-label": p.title,
|
|
@@ -1533,7 +1659,7 @@ function tt(r) {
|
|
|
1533
1659
|
component: "h2",
|
|
1534
1660
|
sx: {
|
|
1535
1661
|
mb: 1.25,
|
|
1536
|
-
color:
|
|
1662
|
+
color: s.heading,
|
|
1537
1663
|
fontSize: 13,
|
|
1538
1664
|
fontWeight: 700,
|
|
1539
1665
|
letterSpacing: "0.12em",
|
|
@@ -1543,12 +1669,12 @@ function tt(r) {
|
|
|
1543
1669
|
}
|
|
1544
1670
|
),
|
|
1545
1671
|
/* @__PURE__ */ e(
|
|
1546
|
-
|
|
1672
|
+
W,
|
|
1547
1673
|
{
|
|
1548
1674
|
component: "ul",
|
|
1549
1675
|
spacing: 1,
|
|
1550
1676
|
sx: { m: 0, p: 0, listStyle: "none", fontSize: 15 },
|
|
1551
|
-
children: p.items.map((u,
|
|
1677
|
+
children: p.items.map((u, m) => /* @__PURE__ */ e(d, { component: "li", sx: { overflowWrap: "anywhere" }, children: u }, m))
|
|
1552
1678
|
}
|
|
1553
1679
|
)
|
|
1554
1680
|
]
|
|
@@ -1558,16 +1684,16 @@ function tt(r) {
|
|
|
1558
1684
|
]
|
|
1559
1685
|
}
|
|
1560
1686
|
),
|
|
1561
|
-
|
|
1562
|
-
|
|
1687
|
+
a && /* @__PURE__ */ e(d, { sx: { borderTop: 1, borderColor: s.divider }, children: /* @__PURE__ */ e(
|
|
1688
|
+
N,
|
|
1563
1689
|
{
|
|
1564
|
-
maxWidth:
|
|
1690
|
+
maxWidth: h,
|
|
1565
1691
|
sx: {
|
|
1566
1692
|
display: "flex",
|
|
1567
|
-
justifyContent:
|
|
1693
|
+
justifyContent: n === "right" ? "flex-end" : "flex-start",
|
|
1568
1694
|
py: 1
|
|
1569
1695
|
},
|
|
1570
|
-
children: /* @__PURE__ */ e(y, { variant: "body2", sx: { fontSize: 13 }, children:
|
|
1696
|
+
children: /* @__PURE__ */ e(y, { variant: "body2", sx: { fontSize: 13 }, children: a })
|
|
1571
1697
|
}
|
|
1572
1698
|
) })
|
|
1573
1699
|
]
|
|
@@ -1575,22 +1701,23 @@ function tt(r) {
|
|
|
1575
1701
|
);
|
|
1576
1702
|
}
|
|
1577
1703
|
export {
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1704
|
+
Qe as Autocomplete,
|
|
1705
|
+
tt as CategoryTiles,
|
|
1706
|
+
Fe as ConfirmDialog,
|
|
1707
|
+
Ze as ContactForm,
|
|
1708
|
+
it as DetailList,
|
|
1709
|
+
P as DismissibleAlert,
|
|
1710
|
+
et as FeatureList,
|
|
1711
|
+
Xe as HeroBanner,
|
|
1712
|
+
Je as ImageField,
|
|
1713
|
+
Ke as ItemGrid,
|
|
1714
|
+
_e as MediaCard,
|
|
1715
|
+
Ye as MediaCardSkeleton,
|
|
1716
|
+
Pe as QuantityPicker,
|
|
1717
|
+
nt as SearchField,
|
|
1718
|
+
ot as SiteFooter,
|
|
1719
|
+
rt as StatusPanel,
|
|
1720
|
+
B as TextField,
|
|
1721
|
+
J as TitledDialog
|
|
1595
1722
|
};
|
|
1596
1723
|
//# sourceMappingURL=sosk-ui-lib.js.map
|