@doneisbetter/gds-core 2.6.3 → 2.6.5
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/{chunk-QEPN7PSA.mjs → chunk-6LOTZ3IZ.mjs} +1333 -561
- package/dist/chunk-BU3CRWRC.mjs +905 -0
- package/dist/client.d.mts +76 -10
- package/dist/client.d.ts +76 -10
- package/dist/client.js +1920 -621
- package/dist/client.mjs +44 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1920 -621
- package/dist/index.mjs +44 -2
- package/dist/server-CF4gCYQ-.d.mts +5572 -0
- package/dist/server-CF4gCYQ-.d.ts +5572 -0
- package/dist/server.d.mts +5 -6074
- package/dist/server.d.ts +5 -6074
- package/dist/server.js +1245 -456
- package/dist/server.mjs +29 -1
- package/package.json +2 -2
- package/dist/chunk-E3QXLNZO.mjs +0 -377
|
@@ -223,7 +223,6 @@ var GdsIcons = {
|
|
|
223
223
|
|
|
224
224
|
// src/vocabulary.ts
|
|
225
225
|
var GdsVocabulary = {
|
|
226
|
-
// Base
|
|
227
226
|
settings: { id: "gds.action.settings", defaultMessage: "Settings", icon: GdsIcons.Settings, feedback: { icon: GdsIcons.Settings, color: "teal", messageId: "gds.feedback.saved" } },
|
|
228
227
|
analytics: { id: "gds.action.analytics", defaultMessage: "Analytics", icon: GdsIcons.Analytics, feedback: { icon: GdsIcons.Analytics, color: "teal", messageId: "gds.feedback.loaded" } },
|
|
229
228
|
dashboard: { id: "gds.action.dashboard", defaultMessage: "Dashboard", icon: GdsIcons.Dashboard, feedback: { icon: GdsIcons.Dashboard, color: "teal", messageId: "gds.feedback.loaded" } },
|
|
@@ -239,14 +238,12 @@ var GdsVocabulary = {
|
|
|
239
238
|
close: { id: "gds.action.close", defaultMessage: "Close", icon: GdsIcons.Close, feedback: { icon: GdsIcons.Close, color: "gray", messageId: "gds.feedback.closed" } },
|
|
240
239
|
language: { id: "gds.action.language", defaultMessage: "Language", icon: GdsIcons.Language, feedback: { icon: GdsIcons.Language, color: "teal", messageId: "gds.feedback.changed" } },
|
|
241
240
|
theme: { id: "gds.action.theme", defaultMessage: "Theme", icon: GdsIcons.Theme, feedback: { icon: GdsIcons.Theme, color: "teal", messageId: "gds.feedback.changed" } },
|
|
242
|
-
// Navigation
|
|
243
241
|
home: { id: "gds.action.home", defaultMessage: "Home", icon: GdsIcons.Home, feedback: { icon: GdsIcons.Home, color: "teal", messageId: "gds.feedback.opened" } },
|
|
244
242
|
inbox: { id: "gds.action.inbox", defaultMessage: "Inbox", icon: GdsIcons.Inbox, feedback: { icon: GdsIcons.Inbox, color: "teal", messageId: "gds.feedback.opened" } },
|
|
245
243
|
calendar: { id: "gds.action.calendar", defaultMessage: "Calendar", icon: GdsIcons.Calendar, feedback: { icon: GdsIcons.Calendar, color: "teal", messageId: "gds.feedback.opened" } },
|
|
246
244
|
gallery: { id: "gds.action.gallery", defaultMessage: "Gallery", icon: GdsIcons.Gallery, feedback: { icon: GdsIcons.Gallery, color: "teal", messageId: "gds.feedback.opened" } },
|
|
247
245
|
history: { id: "gds.action.history", defaultMessage: "History", icon: GdsIcons.History, feedback: { icon: GdsIcons.History, color: "teal", messageId: "gds.feedback.opened" } },
|
|
248
246
|
profile: { id: "gds.action.profile", defaultMessage: "Profile", icon: GdsIcons.Profile, feedback: { icon: GdsIcons.Profile, color: "teal", messageId: "gds.feedback.opened" } },
|
|
249
|
-
// Actions
|
|
250
247
|
send: { id: "gds.action.send", defaultMessage: "Send", icon: GdsIcons.Send, feedback: { icon: GdsIcons.Send, color: "blue", messageId: "gds.feedback.sent" } },
|
|
251
248
|
reply: { id: "gds.action.reply", defaultMessage: "Reply", icon: GdsIcons.Reply, feedback: { icon: GdsIcons.Reply, color: "blue", messageId: "gds.feedback.replied" } },
|
|
252
249
|
forward: { id: "gds.action.forward", defaultMessage: "Forward", icon: GdsIcons.Forward, feedback: { icon: GdsIcons.Forward, color: "blue", messageId: "gds.feedback.forwarded" } },
|
|
@@ -260,12 +257,10 @@ var GdsVocabulary = {
|
|
|
260
257
|
uncheck: { id: "gds.action.uncheck", defaultMessage: "Uncheck", icon: GdsIcons.Uncheck, feedback: { icon: GdsIcons.Uncheck, color: "red", messageId: "gds.feedback.unchecked" } },
|
|
261
258
|
complete: { id: "gds.action.complete", defaultMessage: "Complete", icon: GdsIcons.Complete, feedback: { icon: GdsIcons.Complete, color: "teal", messageId: "gds.feedback.completed" } },
|
|
262
259
|
clear: { id: "gds.action.clear", defaultMessage: "Clear", icon: GdsIcons.Clear, feedback: { icon: GdsIcons.Clear, color: "red", messageId: "gds.feedback.cleared" } },
|
|
263
|
-
// Media (camera project)
|
|
264
260
|
capture: { id: "gds.action.capture", defaultMessage: "Capture", icon: GdsIcons.Capture, feedback: { icon: GdsIcons.Capture, color: "teal", messageId: "gds.feedback.captured" } },
|
|
265
261
|
record: { id: "gds.action.record", defaultMessage: "Record", icon: GdsIcons.Record, feedback: { icon: GdsIcons.Record, color: "teal", messageId: "gds.feedback.recorded" } },
|
|
266
262
|
flip: { id: "gds.action.flip", defaultMessage: "Flip", icon: GdsIcons.Flip, feedback: { icon: GdsIcons.Flip, color: "teal", messageId: "gds.feedback.flipped" } },
|
|
267
263
|
flash: { id: "gds.action.flash", defaultMessage: "Flash", icon: GdsIcons.Flash, feedback: { icon: GdsIcons.Flash, color: "teal", messageId: "gds.feedback.flashed" } },
|
|
268
|
-
// Domain specific (amanoba, classscout, kidex, habigoal)
|
|
269
264
|
course: { id: "gds.action.course", defaultMessage: "Course", icon: GdsIcons.Course, feedback: { icon: GdsIcons.Course, color: "teal", messageId: "gds.feedback.done" } },
|
|
270
265
|
lesson: { id: "gds.action.lesson", defaultMessage: "Lesson", icon: GdsIcons.Lesson, feedback: { icon: GdsIcons.Lesson, color: "teal", messageId: "gds.feedback.done" } },
|
|
271
266
|
certificate: { id: "gds.action.certificate", defaultMessage: "Certificate", icon: GdsIcons.Certificate, feedback: { icon: GdsIcons.Certificate, color: "teal", messageId: "gds.feedback.done" } },
|
|
@@ -278,7 +273,6 @@ var GdsVocabulary = {
|
|
|
278
273
|
goal: { id: "gds.action.goal", defaultMessage: "Goal", icon: GdsIcons.Goal, feedback: { icon: GdsIcons.Goal, color: "teal", messageId: "gds.feedback.done" } },
|
|
279
274
|
streak: { id: "gds.action.streak", defaultMessage: "Streak", icon: GdsIcons.Streak, feedback: { icon: GdsIcons.Streak, color: "teal", messageId: "gds.feedback.done" } },
|
|
280
275
|
reward: { id: "gds.action.reward", defaultMessage: "Reward", icon: GdsIcons.Reward, feedback: { icon: GdsIcons.Reward, color: "yellow", messageId: "gds.feedback.rewarded" } },
|
|
281
|
-
// Codebase analysis additions
|
|
282
276
|
trophy: { id: "gds.action.trophy", defaultMessage: "Trophy", icon: GdsIcons.Trophy, feedback: { icon: GdsIcons.Trophy, color: "yellow", messageId: "gds.feedback.rewarded" } },
|
|
283
277
|
crown: { id: "gds.action.crown", defaultMessage: "Crown", icon: GdsIcons.Crown, feedback: { icon: GdsIcons.Crown, color: "yellow", messageId: "gds.feedback.rewarded" } },
|
|
284
278
|
pause: { id: "gds.action.pause", defaultMessage: "Pause", icon: GdsIcons.Pause, feedback: { icon: GdsIcons.Pause, color: "teal", messageId: "gds.feedback.paused" } },
|
|
@@ -298,7 +292,6 @@ var GdsVocabulary = {
|
|
|
298
292
|
help: { id: "gds.action.help", defaultMessage: "Help", icon: GdsIcons.Help, feedback: { icon: GdsIcons.Help, color: "teal", messageId: "gds.feedback.done" } },
|
|
299
293
|
filter: { id: "gds.action.filter", defaultMessage: "Filter", icon: GdsIcons.Filter, feedback: { icon: GdsIcons.Filter, color: "teal", messageId: "gds.feedback.filtered" } },
|
|
300
294
|
sort: { id: "gds.action.sort", defaultMessage: "Sort", icon: GdsIcons.Sort, feedback: { icon: GdsIcons.Sort, color: "teal", messageId: "gds.feedback.sorted" } },
|
|
301
|
-
// Audit-driven additions
|
|
302
295
|
export: { id: "gds.action.export", defaultMessage: "Export", icon: GdsIcons.Export, feedback: { icon: GdsIcons.Export, color: "teal", messageId: "gds.feedback.exported" } },
|
|
303
296
|
import: { id: "gds.action.import", defaultMessage: "Import", icon: GdsIcons.Import, feedback: { icon: GdsIcons.Import, color: "teal", messageId: "gds.feedback.imported" } },
|
|
304
297
|
preview: { id: "gds.action.preview", defaultMessage: "Preview", icon: GdsIcons.Preview, feedback: { icon: GdsIcons.Preview, color: "teal", messageId: "gds.feedback.previewed" } },
|
|
@@ -316,17 +309,421 @@ var GdsVocabulary = {
|
|
|
316
309
|
refer: { id: "gds.action.refer", defaultMessage: "Refer", icon: GdsIcons.Refer, feedback: { icon: GdsIcons.Refer, color: "teal", messageId: "gds.feedback.referred" } },
|
|
317
310
|
evidence: { id: "gds.action.evidence", defaultMessage: "Evidence", icon: GdsIcons.Evidence, feedback: { icon: GdsIcons.Evidence, color: "teal", messageId: "gds.feedback.added" } }
|
|
318
311
|
};
|
|
319
|
-
function
|
|
320
|
-
return
|
|
312
|
+
function createGdsVocabularyPack(namespace, actions) {
|
|
313
|
+
return {
|
|
314
|
+
namespace,
|
|
315
|
+
actions: Object.fromEntries(
|
|
316
|
+
Object.entries(actions).map(([key, definition]) => [
|
|
317
|
+
`${namespace}:${key}`,
|
|
318
|
+
{
|
|
319
|
+
...definition,
|
|
320
|
+
id: `gds.action.${namespace}.${key}`
|
|
321
|
+
}
|
|
322
|
+
])
|
|
323
|
+
)
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
function mergeGdsVocabularyPacks(packs = []) {
|
|
327
|
+
return packs.reduce((acc, pack) => {
|
|
328
|
+
for (const [key, definition] of Object.entries(pack.actions)) {
|
|
329
|
+
acc[key] = definition;
|
|
330
|
+
}
|
|
331
|
+
return acc;
|
|
332
|
+
}, {});
|
|
333
|
+
}
|
|
334
|
+
function resolveSemanticActionConfig(action, packs = []) {
|
|
335
|
+
const baseConfig = GdsVocabulary[action];
|
|
336
|
+
if (baseConfig) {
|
|
337
|
+
return baseConfig;
|
|
338
|
+
}
|
|
339
|
+
const merged = mergeGdsVocabularyPacks(packs);
|
|
340
|
+
const packConfig = merged[action];
|
|
341
|
+
if (packConfig) {
|
|
342
|
+
return packConfig;
|
|
343
|
+
}
|
|
344
|
+
throw new Error(`Unknown semantic action: ${action}`);
|
|
345
|
+
}
|
|
346
|
+
function getSemanticActionConfig(action, packs = []) {
|
|
347
|
+
return resolveSemanticActionConfig(action, packs);
|
|
321
348
|
}
|
|
322
|
-
function getSemanticActionLabel(action, translate) {
|
|
323
|
-
const config =
|
|
349
|
+
function getSemanticActionLabel(action, translate, packs = []) {
|
|
350
|
+
const config = resolveSemanticActionConfig(action, packs);
|
|
324
351
|
return translate ? translate(config.id, config.defaultMessage) : config.defaultMessage;
|
|
325
352
|
}
|
|
326
353
|
|
|
354
|
+
// src/AccentPanel.tsx
|
|
355
|
+
import { Badge as Badge2, Box as Box2, Group, Paper, Stack as Stack2, Text as Text2, Title as Title2 } from "@mantine/core";
|
|
356
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
357
|
+
var toneStyles = {
|
|
358
|
+
gray: {
|
|
359
|
+
bg: "light-dark(var(--mantine-color-gray-0), color-mix(in srgb, var(--mantine-color-gray-7) 88%, black))",
|
|
360
|
+
border: "light-dark(var(--mantine-color-gray-2), color-mix(in srgb, var(--mantine-color-gray-4) 70%, transparent))",
|
|
361
|
+
color: "light-dark(var(--mantine-color-gray-9), var(--mantine-color-gray-0))"
|
|
362
|
+
},
|
|
363
|
+
violet: {
|
|
364
|
+
bg: "light-dark(var(--mantine-color-violet-0), color-mix(in srgb, var(--mantine-color-violet-9) 70%, black))",
|
|
365
|
+
border: "light-dark(var(--mantine-color-violet-2), color-mix(in srgb, var(--mantine-color-violet-4) 75%, transparent))",
|
|
366
|
+
color: "light-dark(var(--mantine-color-violet-9), var(--mantine-color-violet-0))"
|
|
367
|
+
},
|
|
368
|
+
green: {
|
|
369
|
+
bg: "light-dark(var(--mantine-color-green-0), color-mix(in srgb, var(--mantine-color-green-9) 72%, black))",
|
|
370
|
+
border: "light-dark(var(--mantine-color-green-2), color-mix(in srgb, var(--mantine-color-green-4) 78%, transparent))",
|
|
371
|
+
color: "light-dark(var(--mantine-color-green-9), var(--mantine-color-green-0))"
|
|
372
|
+
},
|
|
373
|
+
red: {
|
|
374
|
+
bg: "light-dark(var(--mantine-color-red-0), color-mix(in srgb, var(--mantine-color-red-9) 72%, black))",
|
|
375
|
+
border: "light-dark(var(--mantine-color-red-2), color-mix(in srgb, var(--mantine-color-red-4) 78%, transparent))",
|
|
376
|
+
color: "light-dark(var(--mantine-color-red-9), var(--mantine-color-red-0))"
|
|
377
|
+
},
|
|
378
|
+
amber: {
|
|
379
|
+
bg: "light-dark(var(--mantine-color-yellow-0), color-mix(in srgb, var(--mantine-color-yellow-8) 78%, black))",
|
|
380
|
+
border: "light-dark(var(--mantine-color-yellow-3), color-mix(in srgb, var(--mantine-color-yellow-5) 70%, transparent))",
|
|
381
|
+
color: "light-dark(var(--mantine-color-yellow-9), var(--mantine-color-yellow-0))"
|
|
382
|
+
},
|
|
383
|
+
blue: {
|
|
384
|
+
bg: "light-dark(var(--mantine-color-blue-0), color-mix(in srgb, var(--mantine-color-blue-9) 74%, black))",
|
|
385
|
+
border: "light-dark(var(--mantine-color-blue-2), color-mix(in srgb, var(--mantine-color-blue-4) 75%, transparent))",
|
|
386
|
+
color: "light-dark(var(--mantine-color-blue-9), var(--mantine-color-blue-0))"
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
function resolveAccentPanelStyles(tone = "violet", variant = "subtle") {
|
|
390
|
+
const token = toneStyles[tone];
|
|
391
|
+
if (variant === "soft-outline") {
|
|
392
|
+
return {
|
|
393
|
+
backgroundColor: "light-dark(var(--mantine-color-body), color-mix(in srgb, var(--mantine-color-dark-7) 92%, black))",
|
|
394
|
+
border: `1px solid ${token.border}`,
|
|
395
|
+
color: token.color
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
return {
|
|
399
|
+
backgroundColor: token.bg,
|
|
400
|
+
border: `1px solid ${token.border}`,
|
|
401
|
+
color: token.color
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
function AccentPanel({
|
|
405
|
+
tone = "violet",
|
|
406
|
+
variant = "subtle",
|
|
407
|
+
title,
|
|
408
|
+
badge,
|
|
409
|
+
children
|
|
410
|
+
}) {
|
|
411
|
+
const styles = resolveAccentPanelStyles(tone, variant);
|
|
412
|
+
return /* @__PURE__ */ jsx3(Paper, { withBorder: true, radius: "lg", p: "lg", style: styles, children: /* @__PURE__ */ jsxs2(Stack2, { gap: "sm", children: [
|
|
413
|
+
title || badge ? /* @__PURE__ */ jsxs2(Group, { justify: "space-between", align: "flex-start", gap: "sm", wrap: "wrap", children: [
|
|
414
|
+
title ? /* @__PURE__ */ jsx3(Title2, { order: 4, c: "inherit", children: title }) : /* @__PURE__ */ jsx3(Box2, {}),
|
|
415
|
+
badge ? typeof badge === "string" ? /* @__PURE__ */ jsx3(Badge2, { color: tone === "amber" ? "yellow" : tone, variant: "filled", children: badge }) : badge : null
|
|
416
|
+
] }) : null,
|
|
417
|
+
typeof children === "string" ? /* @__PURE__ */ jsx3(Text2, { c: "inherit", children }) : /* @__PURE__ */ jsx3(Box2, { c: "inherit", children })
|
|
418
|
+
] }) });
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
// src/ReferenceLocaleNotice.tsx
|
|
422
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
423
|
+
function ReferenceLocaleNotice({ localeLabel, detail }) {
|
|
424
|
+
return /* @__PURE__ */ jsx4(AccentPanel, { tone: "amber", variant: "soft-outline", title: "Localization status", badge: localeLabel, children: detail });
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
// src/ReferenceLinkGrid.tsx
|
|
428
|
+
import { Anchor, Badge as Badge3, Group as Group2, Paper as Paper2, SimpleGrid, Stack as Stack3, Text as Text3, Title as Title3 } from "@mantine/core";
|
|
429
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
430
|
+
function ReferenceLinkGrid({
|
|
431
|
+
items,
|
|
432
|
+
columns = 3
|
|
433
|
+
}) {
|
|
434
|
+
return /* @__PURE__ */ jsx5(SimpleGrid, { cols: { base: 1, sm: Math.min(columns, 2), xl: columns }, spacing: "lg", children: items.map((item) => /* @__PURE__ */ jsx5(Paper2, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ jsxs3(Stack3, { gap: "md", children: [
|
|
435
|
+
/* @__PURE__ */ jsxs3(Group2, { justify: "space-between", align: "flex-start", gap: "sm", wrap: "wrap", children: [
|
|
436
|
+
/* @__PURE__ */ jsxs3(Stack3, { gap: 6, maw: 540, children: [
|
|
437
|
+
/* @__PURE__ */ jsx5(Title3, { order: 4, children: /* @__PURE__ */ jsx5(Anchor, { href: item.href, underline: "never", children: item.title }) }),
|
|
438
|
+
/* @__PURE__ */ jsx5(Text3, { size: "sm", c: "dimmed", children: item.description })
|
|
439
|
+
] }),
|
|
440
|
+
item.badge ? typeof item.badge === "string" ? /* @__PURE__ */ jsx5(Badge3, { variant: "light", color: "violet", children: item.badge }) : item.badge : null
|
|
441
|
+
] }),
|
|
442
|
+
item.meta ? /* @__PURE__ */ jsx5(Text3, { size: "sm", c: "dimmed", children: item.meta }) : null,
|
|
443
|
+
/* @__PURE__ */ jsx5(Anchor, { href: item.href, fw: 600, children: "Open section" })
|
|
444
|
+
] }) }, item.id)) });
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
// src/SectionPanel.tsx
|
|
448
|
+
import { Divider, Group as Group3, Paper as Paper3, Stack as Stack4, Text as Text4, Title as Title4 } from "@mantine/core";
|
|
449
|
+
import { Fragment, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
450
|
+
var toneBackgrounds = {
|
|
451
|
+
default: "var(--mantine-color-body)",
|
|
452
|
+
supporting: "light-dark(var(--mantine-color-gray-0), color-mix(in srgb, var(--mantine-color-dark-7) 92%, black))",
|
|
453
|
+
warning: "light-dark(var(--mantine-color-yellow-0), color-mix(in srgb, var(--mantine-color-yellow-9) 18%, var(--mantine-color-body)))",
|
|
454
|
+
critical: "light-dark(var(--mantine-color-red-0), color-mix(in srgb, var(--mantine-color-red-9) 18%, var(--mantine-color-body)))"
|
|
455
|
+
};
|
|
456
|
+
function SectionPanel({
|
|
457
|
+
title,
|
|
458
|
+
description,
|
|
459
|
+
action,
|
|
460
|
+
children,
|
|
461
|
+
tone = "default",
|
|
462
|
+
id,
|
|
463
|
+
divided = true
|
|
464
|
+
}) {
|
|
465
|
+
return /* @__PURE__ */ jsx6(Paper3, { id, withBorder: true, radius: "xl", p: "lg", style: { background: toneBackgrounds[tone] }, children: /* @__PURE__ */ jsxs4(Stack4, { gap: "md", children: [
|
|
466
|
+
title || description || action ? /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
467
|
+
/* @__PURE__ */ jsxs4(Group3, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
468
|
+
title || description ? /* @__PURE__ */ jsxs4(Stack4, { gap: 4, children: [
|
|
469
|
+
title ? /* @__PURE__ */ jsx6(Title4, { order: 3, children: title }) : null,
|
|
470
|
+
description ? /* @__PURE__ */ jsx6(Text4, { size: "sm", c: "dimmed", children: description }) : null
|
|
471
|
+
] }) : null,
|
|
472
|
+
action
|
|
473
|
+
] }),
|
|
474
|
+
divided ? /* @__PURE__ */ jsx6(Divider, {}) : null
|
|
475
|
+
] }) : null,
|
|
476
|
+
children
|
|
477
|
+
] }) });
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
// src/ReferenceSection.tsx
|
|
481
|
+
import { Anchor as Anchor2, Group as Group4, Stack as Stack5, Text as Text5 } from "@mantine/core";
|
|
482
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
483
|
+
function ReferenceSection({
|
|
484
|
+
title,
|
|
485
|
+
description,
|
|
486
|
+
eyebrow,
|
|
487
|
+
action,
|
|
488
|
+
href,
|
|
489
|
+
linkLabel = "Open section",
|
|
490
|
+
tone = "default",
|
|
491
|
+
children
|
|
492
|
+
}) {
|
|
493
|
+
return /* @__PURE__ */ jsx7(
|
|
494
|
+
SectionPanel,
|
|
495
|
+
{
|
|
496
|
+
tone,
|
|
497
|
+
title: /* @__PURE__ */ jsxs5(Stack5, { gap: 4, children: [
|
|
498
|
+
eyebrow ? /* @__PURE__ */ jsx7(Text5, { size: "xs", fw: 700, c: "dimmed", children: eyebrow }) : null,
|
|
499
|
+
/* @__PURE__ */ jsxs5(Group4, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
500
|
+
/* @__PURE__ */ jsxs5(Stack5, { gap: 4, children: [
|
|
501
|
+
/* @__PURE__ */ jsx7(Text5, { component: "span", fw: 700, size: "xl", children: title }),
|
|
502
|
+
description ? /* @__PURE__ */ jsx7(Text5, { size: "sm", c: "dimmed", children: description }) : null
|
|
503
|
+
] }),
|
|
504
|
+
href ? /* @__PURE__ */ jsx7(Anchor2, { href, fw: 600, children: linkLabel }) : null
|
|
505
|
+
] })
|
|
506
|
+
] }),
|
|
507
|
+
action,
|
|
508
|
+
divided: false,
|
|
509
|
+
children
|
|
510
|
+
}
|
|
511
|
+
);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
// src/ActionBar.tsx
|
|
515
|
+
import { ActionIcon, Button, Group as Group5, Stack as Stack6 } from "@mantine/core";
|
|
516
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
517
|
+
function renderSemanticAction(action, slot, vocabularyPacks) {
|
|
518
|
+
const { action: actionId, variant, ariaLabel, ...props } = action;
|
|
519
|
+
const fallbackVariant = slot === "primary" ? "filled" : slot === "secondary" ? "default" : "subtle";
|
|
520
|
+
const config = resolveSemanticActionConfig(actionId, vocabularyPacks);
|
|
521
|
+
const Icon = config.icon;
|
|
522
|
+
const label = getSemanticActionLabel(actionId, void 0, vocabularyPacks);
|
|
523
|
+
return /* @__PURE__ */ jsx8(
|
|
524
|
+
Button,
|
|
525
|
+
{
|
|
526
|
+
leftSection: /* @__PURE__ */ jsx8(Icon, { size: "1rem", stroke: 1.75 }),
|
|
527
|
+
"aria-label": ariaLabel ?? label,
|
|
528
|
+
variant: variant ?? fallbackVariant,
|
|
529
|
+
...props,
|
|
530
|
+
children: label
|
|
531
|
+
},
|
|
532
|
+
`${slot}-${actionId}`
|
|
533
|
+
);
|
|
534
|
+
}
|
|
535
|
+
function ActionBar({
|
|
536
|
+
primary,
|
|
537
|
+
secondary = [],
|
|
538
|
+
tertiary = [],
|
|
539
|
+
iconOnly = [],
|
|
540
|
+
gap = "sm",
|
|
541
|
+
vocabularyPacks = []
|
|
542
|
+
}) {
|
|
543
|
+
return /* @__PURE__ */ jsx8(Stack6, { gap, children: /* @__PURE__ */ jsxs6(Group5, { justify: "space-between", align: "center", gap, wrap: "wrap", children: [
|
|
544
|
+
/* @__PURE__ */ jsxs6(Group5, { gap, wrap: "wrap", children: [
|
|
545
|
+
secondary.map((action) => renderSemanticAction(action, "secondary", vocabularyPacks)),
|
|
546
|
+
tertiary.map((action) => renderSemanticAction(action, "tertiary", vocabularyPacks))
|
|
547
|
+
] }),
|
|
548
|
+
/* @__PURE__ */ jsxs6(Group5, { gap, wrap: "wrap", justify: "flex-end", style: { marginInlineStart: "auto" }, children: [
|
|
549
|
+
iconOnly.map(({ action, ariaLabel, ...props }) => {
|
|
550
|
+
const config = resolveSemanticActionConfig(action, vocabularyPacks);
|
|
551
|
+
const Icon = config.icon;
|
|
552
|
+
return /* @__PURE__ */ jsx8(
|
|
553
|
+
ActionIcon,
|
|
554
|
+
{
|
|
555
|
+
variant: "subtle",
|
|
556
|
+
size: "lg",
|
|
557
|
+
"aria-label": ariaLabel ?? getSemanticActionLabel(action, void 0, vocabularyPacks),
|
|
558
|
+
...props,
|
|
559
|
+
children: /* @__PURE__ */ jsx8(Icon, { size: "1rem", stroke: 1.75 })
|
|
560
|
+
},
|
|
561
|
+
`icon-${action}`
|
|
562
|
+
);
|
|
563
|
+
}),
|
|
564
|
+
primary ? renderSemanticAction(primary, "primary", vocabularyPacks) : null
|
|
565
|
+
] })
|
|
566
|
+
] }) });
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
// src/FormField.tsx
|
|
570
|
+
import { Box as Box3, Stack as Stack7, Text as Text6 } from "@mantine/core";
|
|
571
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
572
|
+
function FormField({ label, description, error, children }) {
|
|
573
|
+
return /* @__PURE__ */ jsx9(Box3, { component: "label", children: /* @__PURE__ */ jsxs7(Stack7, { gap: 4, children: [
|
|
574
|
+
typeof label === "string" ? /* @__PURE__ */ jsx9(Text6, { size: "xs", fw: 600, c: "dimmed", children: label }) : label,
|
|
575
|
+
description ? typeof description === "string" ? /* @__PURE__ */ jsx9(Text6, { size: "xs", c: "dimmed", children: description }) : description : null,
|
|
576
|
+
children,
|
|
577
|
+
error ? typeof error === "string" ? /* @__PURE__ */ jsx9(Text6, { size: "xs", c: "red.7", children: error }) : error : null
|
|
578
|
+
] }) });
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
// src/ListingCard.tsx
|
|
582
|
+
import { ActionIcon as ActionIcon2, AspectRatio, Badge as Badge4, Card, Group as Group6, Stack as Stack8, Text as Text7, ThemeIcon, Title as Title5 } from "@mantine/core";
|
|
583
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
584
|
+
var ratioMap = {
|
|
585
|
+
"1:1": 1,
|
|
586
|
+
"4:3": 4 / 3,
|
|
587
|
+
"16:9": 16 / 9
|
|
588
|
+
};
|
|
589
|
+
var toneColorMap = {
|
|
590
|
+
default: void 0,
|
|
591
|
+
positive: "teal",
|
|
592
|
+
warning: "orange",
|
|
593
|
+
muted: "gray"
|
|
594
|
+
};
|
|
595
|
+
function ListingImageFallback({ mediaRatio }) {
|
|
596
|
+
return /* @__PURE__ */ jsx10(AspectRatio, { ratio: ratioMap[mediaRatio], children: /* @__PURE__ */ jsx10(
|
|
597
|
+
ThemeIcon,
|
|
598
|
+
{
|
|
599
|
+
size: "100%",
|
|
600
|
+
radius: "md",
|
|
601
|
+
variant: "light",
|
|
602
|
+
color: "gray",
|
|
603
|
+
"aria-label": "No listing image available",
|
|
604
|
+
children: /* @__PURE__ */ jsx10(GdsIcons.Gallery, { size: "2rem" })
|
|
605
|
+
}
|
|
606
|
+
) });
|
|
607
|
+
}
|
|
608
|
+
function ListingAffordance({ affordance }) {
|
|
609
|
+
const config = GdsVocabulary[affordance.action];
|
|
610
|
+
const Icon = config.icon;
|
|
611
|
+
const label = affordance.ariaLabel ?? getSemanticActionLabel(affordance.action);
|
|
612
|
+
if (affordance.href) {
|
|
613
|
+
return /* @__PURE__ */ jsx10(
|
|
614
|
+
ActionIcon2,
|
|
615
|
+
{
|
|
616
|
+
component: "a",
|
|
617
|
+
href: affordance.href,
|
|
618
|
+
variant: "subtle",
|
|
619
|
+
size: "lg",
|
|
620
|
+
"aria-label": label,
|
|
621
|
+
disabled: affordance.disabled,
|
|
622
|
+
children: /* @__PURE__ */ jsx10(Icon, { size: "1rem", stroke: 1.75 })
|
|
623
|
+
}
|
|
624
|
+
);
|
|
625
|
+
}
|
|
626
|
+
return /* @__PURE__ */ jsx10(
|
|
627
|
+
ActionIcon2,
|
|
628
|
+
{
|
|
629
|
+
variant: "subtle",
|
|
630
|
+
size: "lg",
|
|
631
|
+
"aria-label": label,
|
|
632
|
+
onClick: affordance.onClick,
|
|
633
|
+
disabled: affordance.disabled,
|
|
634
|
+
children: /* @__PURE__ */ jsx10(Icon, { size: "1rem", stroke: 1.75 })
|
|
635
|
+
}
|
|
636
|
+
);
|
|
637
|
+
}
|
|
638
|
+
function ListingCard({
|
|
639
|
+
title,
|
|
640
|
+
href,
|
|
641
|
+
description,
|
|
642
|
+
image,
|
|
643
|
+
mediaRatio = "4:3",
|
|
644
|
+
metadata = [],
|
|
645
|
+
featured = false,
|
|
646
|
+
sponsoredDisclosure,
|
|
647
|
+
price,
|
|
648
|
+
primaryAction,
|
|
649
|
+
saveAction,
|
|
650
|
+
shareAction,
|
|
651
|
+
compact = false
|
|
652
|
+
}) {
|
|
653
|
+
const titleContent = href && typeof title === "string" ? /* @__PURE__ */ jsx10(Text7, { component: "a", href, inherit: true, td: "none", children: title }) : title;
|
|
654
|
+
return /* @__PURE__ */ jsx10(Card, { withBorder: true, radius: "lg", padding: compact ? "md" : "lg", children: /* @__PURE__ */ jsxs8(Stack8, { gap: compact ? "sm" : "md", children: [
|
|
655
|
+
image ?? /* @__PURE__ */ jsx10(ListingImageFallback, { mediaRatio }),
|
|
656
|
+
featured || sponsoredDisclosure ? /* @__PURE__ */ jsxs8(Group6, { justify: "space-between", gap: "sm", wrap: "wrap", children: [
|
|
657
|
+
featured ? /* @__PURE__ */ jsx10(Badge4, { variant: "light", color: "violet", children: "Featured" }) : /* @__PURE__ */ jsx10("span", {}),
|
|
658
|
+
sponsoredDisclosure ? /* @__PURE__ */ jsx10(Text7, { size: "xs", c: "dimmed", children: sponsoredDisclosure }) : null
|
|
659
|
+
] }) : null,
|
|
660
|
+
/* @__PURE__ */ jsxs8(Stack8, { gap: 4, children: [
|
|
661
|
+
/* @__PURE__ */ jsx10(Title5, { order: compact ? 5 : 4, lineClamp: 2, children: titleContent }),
|
|
662
|
+
description ? /* @__PURE__ */ jsx10(Text7, { size: "sm", c: "dimmed", lineClamp: compact ? 2 : 3, children: description }) : null
|
|
663
|
+
] }),
|
|
664
|
+
metadata.length ? /* @__PURE__ */ jsx10(Stack8, { gap: "xs", children: metadata.map((item) => /* @__PURE__ */ jsxs8(Group6, { justify: "space-between", align: "flex-start", gap: "sm", wrap: "nowrap", children: [
|
|
665
|
+
/* @__PURE__ */ jsxs8(Group6, { gap: "xs", wrap: "nowrap", style: { minWidth: 0, flex: 1 }, children: [
|
|
666
|
+
item.icon,
|
|
667
|
+
/* @__PURE__ */ jsx10(Text7, { size: "sm", c: item.tone ? toneColorMap[item.tone] : "dimmed", lineClamp: 1, children: item.label })
|
|
668
|
+
] }),
|
|
669
|
+
item.value ? /* @__PURE__ */ jsx10(Text7, { size: "sm", fw: 500, ta: "right", children: item.value }) : null
|
|
670
|
+
] }, item.id)) }) : null,
|
|
671
|
+
/* @__PURE__ */ jsxs8(Group6, { justify: "space-between", align: "center", gap: "sm", wrap: "wrap", children: [
|
|
672
|
+
/* @__PURE__ */ jsx10(Stack8, { gap: 2, style: { minWidth: 0, flex: 1 }, children: price ? /* @__PURE__ */ jsx10(Text7, { fw: 700, size: compact ? "md" : "lg", children: price }) : null }),
|
|
673
|
+
/* @__PURE__ */ jsxs8(Group6, { gap: "xs", wrap: "nowrap", justify: "flex-end", style: { marginInlineStart: "auto" }, children: [
|
|
674
|
+
saveAction ? /* @__PURE__ */ jsx10(ListingAffordance, { affordance: saveAction }) : null,
|
|
675
|
+
shareAction ? /* @__PURE__ */ jsx10(ListingAffordance, { affordance: shareAction }) : null,
|
|
676
|
+
primaryAction
|
|
677
|
+
] })
|
|
678
|
+
] })
|
|
679
|
+
] }) });
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
// src/StateBlock.tsx
|
|
683
|
+
import { Loader, Stack as Stack9, Text as Text8, ThemeIcon as ThemeIcon2, Title as Title6 } from "@mantine/core";
|
|
684
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
685
|
+
var variantConfig = {
|
|
686
|
+
loading: { color: "violet", icon: /* @__PURE__ */ jsx11(Loader, { size: "sm" }) },
|
|
687
|
+
empty: { color: "gray", icon: /* @__PURE__ */ jsx11(GdsIcons.Inbox, { size: "1.1rem" }) },
|
|
688
|
+
error: { color: "red", icon: /* @__PURE__ */ jsx11(GdsIcons.Danger, { size: "1.1rem" }) },
|
|
689
|
+
permission: { color: "orange", icon: /* @__PURE__ */ jsx11(GdsIcons.Verify, { size: "1.1rem" }) },
|
|
690
|
+
disabled: { color: "gray", icon: /* @__PURE__ */ jsx11(GdsIcons.Toggle, { size: "1.1rem" }) },
|
|
691
|
+
success: { color: "teal", icon: /* @__PURE__ */ jsx11(GdsIcons.Success, { size: "1.1rem" }) },
|
|
692
|
+
info: { color: "blue", icon: /* @__PURE__ */ jsx11(GdsIcons.Info, { size: "1.1rem" }) },
|
|
693
|
+
"not-enough-data": { color: "yellow", icon: /* @__PURE__ */ jsx11(GdsIcons.Analytics, { size: "1.1rem" }) }
|
|
694
|
+
};
|
|
695
|
+
function StateBlock({
|
|
696
|
+
variant,
|
|
697
|
+
title,
|
|
698
|
+
description,
|
|
699
|
+
action,
|
|
700
|
+
icon,
|
|
701
|
+
compact = false
|
|
702
|
+
}) {
|
|
703
|
+
const config = variantConfig[variant];
|
|
704
|
+
return /* @__PURE__ */ jsxs9(
|
|
705
|
+
Stack9,
|
|
706
|
+
{
|
|
707
|
+
align: compact ? "flex-start" : "center",
|
|
708
|
+
justify: "center",
|
|
709
|
+
gap: "md",
|
|
710
|
+
py: compact ? "md" : "xl",
|
|
711
|
+
ta: compact ? "left" : "center",
|
|
712
|
+
children: [
|
|
713
|
+
/* @__PURE__ */ jsx11(ThemeIcon2, { variant: "light", color: config.color, size: compact ? "lg" : "xl", radius: "xl", children: icon ?? config.icon }),
|
|
714
|
+
/* @__PURE__ */ jsxs9(Stack9, { gap: 6, align: compact ? "flex-start" : "center", children: [
|
|
715
|
+
/* @__PURE__ */ jsx11(Title6, { order: compact ? 4 : 3, children: title }),
|
|
716
|
+
description ? /* @__PURE__ */ jsx11(Text8, { c: "dimmed", maw: compact ? void 0 : 480, children: description }) : null
|
|
717
|
+
] }),
|
|
718
|
+
action
|
|
719
|
+
]
|
|
720
|
+
}
|
|
721
|
+
);
|
|
722
|
+
}
|
|
723
|
+
|
|
327
724
|
// src/ChoiceChip.tsx
|
|
328
|
-
import { Badge as
|
|
329
|
-
import { jsx as
|
|
725
|
+
import { Badge as Badge5 } from "@mantine/core";
|
|
726
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
330
727
|
function ChoiceChip({
|
|
331
728
|
label,
|
|
332
729
|
active = false,
|
|
@@ -343,8 +740,8 @@ function ChoiceChip({
|
|
|
343
740
|
};
|
|
344
741
|
if (href) {
|
|
345
742
|
const LinkComponent = component || "a";
|
|
346
|
-
return /* @__PURE__ */
|
|
347
|
-
|
|
743
|
+
return /* @__PURE__ */ jsx12(
|
|
744
|
+
Badge5,
|
|
348
745
|
{
|
|
349
746
|
component: LinkComponent,
|
|
350
747
|
href,
|
|
@@ -356,8 +753,8 @@ function ChoiceChip({
|
|
|
356
753
|
}
|
|
357
754
|
if (onClick || component) {
|
|
358
755
|
const ButtonComponent = component || "button";
|
|
359
|
-
return /* @__PURE__ */
|
|
360
|
-
|
|
756
|
+
return /* @__PURE__ */ jsx12(
|
|
757
|
+
Badge5,
|
|
361
758
|
{
|
|
362
759
|
component: ButtonComponent,
|
|
363
760
|
type: component ? void 0 : "button",
|
|
@@ -368,37 +765,37 @@ function ChoiceChip({
|
|
|
368
765
|
}
|
|
369
766
|
);
|
|
370
767
|
}
|
|
371
|
-
return /* @__PURE__ */
|
|
768
|
+
return /* @__PURE__ */ jsx12(Badge5, { ...sharedProps, children: label });
|
|
372
769
|
}
|
|
373
770
|
|
|
374
771
|
// src/MetricCard.tsx
|
|
375
|
-
import { Badge as
|
|
376
|
-
import { jsx as
|
|
772
|
+
import { Badge as Badge6, Card as Card2, Group as Group7, Stack as Stack10, Text as Text9, ThemeIcon as ThemeIcon3, Title as Title7 } from "@mantine/core";
|
|
773
|
+
import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
377
774
|
var trendColors = {
|
|
378
775
|
positive: "teal",
|
|
379
776
|
negative: "red",
|
|
380
777
|
neutral: "gray"
|
|
381
778
|
};
|
|
382
779
|
function MetricCard({ label, value, description, trend, icon, footer }) {
|
|
383
|
-
return /* @__PURE__ */
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
-
/* @__PURE__ */
|
|
386
|
-
/* @__PURE__ */
|
|
387
|
-
/* @__PURE__ */
|
|
780
|
+
return /* @__PURE__ */ jsx13(Card2, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ jsxs10(Stack10, { gap: "md", children: [
|
|
781
|
+
/* @__PURE__ */ jsxs10(Group7, { justify: "space-between", align: "flex-start", wrap: "nowrap", children: [
|
|
782
|
+
/* @__PURE__ */ jsxs10(Stack10, { gap: 4, children: [
|
|
783
|
+
/* @__PURE__ */ jsx13(Text9, { size: "sm", c: "dimmed", fw: 600, children: label }),
|
|
784
|
+
/* @__PURE__ */ jsx13(Title7, { order: 3, children: value })
|
|
388
785
|
] }),
|
|
389
|
-
icon ? /* @__PURE__ */
|
|
786
|
+
icon ? /* @__PURE__ */ jsx13(ThemeIcon3, { variant: "light", size: "xl", radius: "xl", "aria-hidden": true, children: icon }) : null
|
|
390
787
|
] }),
|
|
391
|
-
description || trend ? /* @__PURE__ */
|
|
392
|
-
description ? /* @__PURE__ */
|
|
393
|
-
trend ? /* @__PURE__ */
|
|
788
|
+
description || trend ? /* @__PURE__ */ jsxs10(Group7, { justify: "space-between", align: "center", gap: "sm", children: [
|
|
789
|
+
description ? /* @__PURE__ */ jsx13(Text9, { size: "sm", c: "dimmed", flex: 1, children: description }) : /* @__PURE__ */ jsx13("span", {}),
|
|
790
|
+
trend ? /* @__PURE__ */ jsx13(Badge6, { color: trendColors[trend.tone ?? "neutral"], variant: "light", children: trend.label }) : null
|
|
394
791
|
] }) : null,
|
|
395
792
|
footer
|
|
396
793
|
] }) });
|
|
397
794
|
}
|
|
398
795
|
|
|
399
796
|
// src/ProgressCard.tsx
|
|
400
|
-
import { Card as
|
|
401
|
-
import { jsx as
|
|
797
|
+
import { Card as Card3, Group as Group8, Progress, Stack as Stack11, Text as Text10, Title as Title8 } from "@mantine/core";
|
|
798
|
+
import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
402
799
|
function ProgressCard({
|
|
403
800
|
label,
|
|
404
801
|
value,
|
|
@@ -407,63 +804,30 @@ function ProgressCard({
|
|
|
407
804
|
description,
|
|
408
805
|
action
|
|
409
806
|
}) {
|
|
410
|
-
return /* @__PURE__ */
|
|
411
|
-
/* @__PURE__ */
|
|
412
|
-
/* @__PURE__ */
|
|
413
|
-
/* @__PURE__ */
|
|
414
|
-
/* @__PURE__ */
|
|
807
|
+
return /* @__PURE__ */ jsx14(Card3, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ jsxs11(Stack11, { gap: "md", children: [
|
|
808
|
+
/* @__PURE__ */ jsxs11(Group8, { justify: "space-between", align: "flex-start", children: [
|
|
809
|
+
/* @__PURE__ */ jsxs11(Stack11, { gap: 4, children: [
|
|
810
|
+
/* @__PURE__ */ jsx14(Text10, { size: "sm", c: "dimmed", fw: 600, children: label }),
|
|
811
|
+
/* @__PURE__ */ jsx14(Title8, { order: 3, children: value })
|
|
415
812
|
] }),
|
|
416
813
|
action
|
|
417
814
|
] }),
|
|
418
|
-
description ? /* @__PURE__ */
|
|
419
|
-
/* @__PURE__ */
|
|
420
|
-
/* @__PURE__ */
|
|
421
|
-
/* @__PURE__ */
|
|
422
|
-
/* @__PURE__ */
|
|
815
|
+
description ? /* @__PURE__ */ jsx14(Text10, { size: "sm", c: "dimmed", children: description }) : null,
|
|
816
|
+
/* @__PURE__ */ jsxs11(Stack11, { gap: 6, children: [
|
|
817
|
+
/* @__PURE__ */ jsxs11(Group8, { justify: "space-between", gap: "sm", children: [
|
|
818
|
+
/* @__PURE__ */ jsx14(Text10, { size: "sm", fw: 500, children: progressLabel ?? "Progress" }),
|
|
819
|
+
/* @__PURE__ */ jsxs11(Text10, { size: "sm", c: "dimmed", children: [
|
|
423
820
|
Math.round(progress),
|
|
424
821
|
"%"
|
|
425
822
|
] })
|
|
426
823
|
] }),
|
|
427
|
-
/* @__PURE__ */
|
|
824
|
+
/* @__PURE__ */ jsx14(Progress, { value: progress, radius: "xl", size: "md" })
|
|
428
825
|
] })
|
|
429
826
|
] }) });
|
|
430
827
|
}
|
|
431
828
|
|
|
432
|
-
// src/SectionPanel.tsx
|
|
433
|
-
import { Divider, Group as Group3, Paper, Stack as Stack4, Text as Text4, Title as Title4 } from "@mantine/core";
|
|
434
|
-
import { Fragment, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
435
|
-
var toneBackgrounds = {
|
|
436
|
-
default: "var(--mantine-color-body)",
|
|
437
|
-
supporting: "light-dark(var(--mantine-color-gray-0), color-mix(in srgb, var(--mantine-color-dark-7) 92%, black))",
|
|
438
|
-
warning: "light-dark(var(--mantine-color-yellow-0), color-mix(in srgb, var(--mantine-color-yellow-9) 18%, var(--mantine-color-body)))",
|
|
439
|
-
critical: "light-dark(var(--mantine-color-red-0), color-mix(in srgb, var(--mantine-color-red-9) 18%, var(--mantine-color-body)))"
|
|
440
|
-
};
|
|
441
|
-
function SectionPanel({
|
|
442
|
-
title,
|
|
443
|
-
description,
|
|
444
|
-
action,
|
|
445
|
-
children,
|
|
446
|
-
tone = "default",
|
|
447
|
-
id,
|
|
448
|
-
divided = true
|
|
449
|
-
}) {
|
|
450
|
-
return /* @__PURE__ */ jsx6(Paper, { id, withBorder: true, radius: "xl", p: "lg", style: { background: toneBackgrounds[tone] }, children: /* @__PURE__ */ jsxs4(Stack4, { gap: "md", children: [
|
|
451
|
-
title || description || action ? /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
452
|
-
/* @__PURE__ */ jsxs4(Group3, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
453
|
-
title || description ? /* @__PURE__ */ jsxs4(Stack4, { gap: 4, children: [
|
|
454
|
-
title ? /* @__PURE__ */ jsx6(Title4, { order: 3, children: title }) : null,
|
|
455
|
-
description ? /* @__PURE__ */ jsx6(Text4, { size: "sm", c: "dimmed", children: description }) : null
|
|
456
|
-
] }) : null,
|
|
457
|
-
action
|
|
458
|
-
] }),
|
|
459
|
-
divided ? /* @__PURE__ */ jsx6(Divider, {}) : null
|
|
460
|
-
] }) : null,
|
|
461
|
-
children
|
|
462
|
-
] }) });
|
|
463
|
-
}
|
|
464
|
-
|
|
465
829
|
// src/ConsumerSection.tsx
|
|
466
|
-
import { jsx as
|
|
830
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
467
831
|
function ConsumerSection({
|
|
468
832
|
title,
|
|
469
833
|
description,
|
|
@@ -471,22 +835,22 @@ function ConsumerSection({
|
|
|
471
835
|
children,
|
|
472
836
|
tone = "default"
|
|
473
837
|
}) {
|
|
474
|
-
return /* @__PURE__ */
|
|
838
|
+
return /* @__PURE__ */ jsx15(SectionPanel, { title, description, action, tone, children });
|
|
475
839
|
}
|
|
476
840
|
|
|
477
841
|
// src/ConsumerDashboardGrid.tsx
|
|
478
|
-
import { SimpleGrid } from "@mantine/core";
|
|
479
|
-
import { jsx as
|
|
842
|
+
import { SimpleGrid as SimpleGrid2 } from "@mantine/core";
|
|
843
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
480
844
|
function ConsumerDashboardGrid({
|
|
481
845
|
children,
|
|
482
846
|
columns = 3
|
|
483
847
|
}) {
|
|
484
|
-
return /* @__PURE__ */
|
|
848
|
+
return /* @__PURE__ */ jsx16(SimpleGrid2, { cols: { base: 1, sm: Math.min(columns, 2), lg: columns }, spacing: "lg", children });
|
|
485
849
|
}
|
|
486
850
|
|
|
487
851
|
// src/EditorialCard.tsx
|
|
488
|
-
import { Anchor, AspectRatio, Badge as
|
|
489
|
-
import { jsx as
|
|
852
|
+
import { Anchor as Anchor3, AspectRatio as AspectRatio2, Badge as Badge7, Box as Box4, Card as Card4, Group as Group9, Stack as Stack12, Text as Text11, Title as Title9 } from "@mantine/core";
|
|
853
|
+
import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
490
854
|
var tonePalette = {
|
|
491
855
|
default: {
|
|
492
856
|
accent: "violet",
|
|
@@ -506,8 +870,8 @@ var tonePalette = {
|
|
|
506
870
|
}
|
|
507
871
|
};
|
|
508
872
|
function EditorialMediaFallback({ compact }) {
|
|
509
|
-
return /* @__PURE__ */
|
|
510
|
-
|
|
873
|
+
return /* @__PURE__ */ jsx17(AspectRatio2, { ratio: compact ? 16 / 10 : 4 / 3, children: /* @__PURE__ */ jsx17(
|
|
874
|
+
Box4,
|
|
511
875
|
{
|
|
512
876
|
style: {
|
|
513
877
|
display: "grid",
|
|
@@ -517,7 +881,7 @@ function EditorialMediaFallback({ compact }) {
|
|
|
517
881
|
background: "var(--mantine-color-gray-0)",
|
|
518
882
|
borderRadius: "var(--mantine-radius-md)"
|
|
519
883
|
},
|
|
520
|
-
children: /* @__PURE__ */
|
|
884
|
+
children: /* @__PURE__ */ jsx17(GdsIcons.Gallery, { size: compact ? "1.5rem" : "2rem" })
|
|
521
885
|
}
|
|
522
886
|
) });
|
|
523
887
|
}
|
|
@@ -540,8 +904,8 @@ function EditorialCard({
|
|
|
540
904
|
const featured = variant === "featured";
|
|
541
905
|
const palette = tonePalette[tone];
|
|
542
906
|
const interactiveProps = href ? { component: "a", href } : onClick ? { component: "button", onClick, type: "button" } : {};
|
|
543
|
-
return /* @__PURE__ */
|
|
544
|
-
|
|
907
|
+
return /* @__PURE__ */ jsxs12(
|
|
908
|
+
Card4,
|
|
545
909
|
{
|
|
546
910
|
className: classNames?.root,
|
|
547
911
|
withBorder: true,
|
|
@@ -555,21 +919,21 @@ function EditorialCard({
|
|
|
555
919
|
cursor: href || onClick ? "pointer" : "default"
|
|
556
920
|
},
|
|
557
921
|
children: [
|
|
558
|
-
/* @__PURE__ */
|
|
559
|
-
/* @__PURE__ */
|
|
560
|
-
/* @__PURE__ */
|
|
561
|
-
/* @__PURE__ */
|
|
562
|
-
eyebrow ? /* @__PURE__ */
|
|
563
|
-
/* @__PURE__ */
|
|
922
|
+
/* @__PURE__ */ jsx17(Card4.Section, { className: classNames?.media, children: media ?? /* @__PURE__ */ jsx17(EditorialMediaFallback, { compact }) }),
|
|
923
|
+
/* @__PURE__ */ jsxs12(Stack12, { gap: "md", p: compact ? "md" : "lg", className: classNames?.body, children: [
|
|
924
|
+
/* @__PURE__ */ jsxs12(Group9, { justify: "space-between", align: "flex-start", gap: "sm", wrap: "wrap", children: [
|
|
925
|
+
/* @__PURE__ */ jsxs12(Stack12, { gap: 4, flex: 1, children: [
|
|
926
|
+
eyebrow ? /* @__PURE__ */ jsx17(Text11, { size: "xs", fw: 700, c: "dimmed", children: eyebrow }) : null,
|
|
927
|
+
/* @__PURE__ */ jsx17(Title9, { order: compact ? 4 : 3, className: classNames?.title, children: title })
|
|
564
928
|
] }),
|
|
565
|
-
badge ? typeof badge === "string" ? /* @__PURE__ */
|
|
929
|
+
badge ? typeof badge === "string" ? /* @__PURE__ */ jsx17(Badge7, { color: palette.accent, variant: "light", children: badge }) : badge : null
|
|
566
930
|
] }),
|
|
567
|
-
description ? /* @__PURE__ */
|
|
568
|
-
meta ? /* @__PURE__ */
|
|
569
|
-
href || onClick || ctaLabel ? /* @__PURE__ */
|
|
570
|
-
/* @__PURE__ */
|
|
571
|
-
/* @__PURE__ */
|
|
572
|
-
|
|
931
|
+
description ? /* @__PURE__ */ jsx17(Text11, { size: "sm", c: "dimmed", children: description }) : null,
|
|
932
|
+
meta ? /* @__PURE__ */ jsx17(Text11, { size: "sm", c: "dimmed", className: classNames?.meta, children: meta }) : null,
|
|
933
|
+
href || onClick || ctaLabel ? /* @__PURE__ */ jsxs12(Group9, { gap: 6, c: `${palette.accent}.7`, className: classNames?.action, children: [
|
|
934
|
+
/* @__PURE__ */ jsx17(Text11, { fw: 600, size: "sm", children: ctaLabel }),
|
|
935
|
+
/* @__PURE__ */ jsx17(
|
|
936
|
+
Anchor3,
|
|
573
937
|
{
|
|
574
938
|
component: "span",
|
|
575
939
|
underline: "never",
|
|
@@ -586,8 +950,8 @@ function EditorialCard({
|
|
|
586
950
|
}
|
|
587
951
|
|
|
588
952
|
// src/ProductCard.tsx
|
|
589
|
-
import { Badge as
|
|
590
|
-
import { jsx as
|
|
953
|
+
import { Badge as Badge8, Card as Card5, Group as Group10, Menu, Stack as Stack13, Text as Text12, ThemeIcon as ThemeIcon4, Title as Title10, ActionIcon as ActionIcon3 } from "@mantine/core";
|
|
954
|
+
import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
591
955
|
function ProductCard({
|
|
592
956
|
title,
|
|
593
957
|
description,
|
|
@@ -600,39 +964,39 @@ function ProductCard({
|
|
|
600
964
|
footer
|
|
601
965
|
}) {
|
|
602
966
|
const MoreIcon = GdsIcons.Menu;
|
|
603
|
-
return /* @__PURE__ */
|
|
967
|
+
return /* @__PURE__ */ jsx18(Card5, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ jsxs13(Stack13, { gap: "md", children: [
|
|
604
968
|
media,
|
|
605
|
-
/* @__PURE__ */
|
|
606
|
-
/* @__PURE__ */
|
|
607
|
-
icon ? /* @__PURE__ */
|
|
608
|
-
/* @__PURE__ */
|
|
609
|
-
/* @__PURE__ */
|
|
610
|
-
description ? /* @__PURE__ */
|
|
969
|
+
/* @__PURE__ */ jsxs13(Group10, { justify: "space-between", align: "flex-start", wrap: "nowrap", children: [
|
|
970
|
+
/* @__PURE__ */ jsxs13(Group10, { align: "flex-start", gap: "sm", wrap: "nowrap", children: [
|
|
971
|
+
icon ? /* @__PURE__ */ jsx18(ThemeIcon4, { variant: "light", size: "xl", radius: "xl", "aria-hidden": true, children: icon }) : null,
|
|
972
|
+
/* @__PURE__ */ jsxs13(Stack13, { gap: 4, children: [
|
|
973
|
+
/* @__PURE__ */ jsx18(Title10, { order: 4, children: title }),
|
|
974
|
+
description ? /* @__PURE__ */ jsx18(Text12, { size: "sm", c: "dimmed", lineClamp: 3, children: description }) : null
|
|
611
975
|
] })
|
|
612
976
|
] }),
|
|
613
|
-
/* @__PURE__ */
|
|
614
|
-
typeof status === "string" ? /* @__PURE__ */
|
|
615
|
-
secondaryActions.length ? /* @__PURE__ */
|
|
616
|
-
/* @__PURE__ */
|
|
617
|
-
/* @__PURE__ */
|
|
618
|
-
(action) => action.href ? /* @__PURE__ */
|
|
977
|
+
/* @__PURE__ */ jsxs13(Group10, { gap: "xs", align: "center", wrap: "nowrap", children: [
|
|
978
|
+
typeof status === "string" ? /* @__PURE__ */ jsx18(Badge8, { variant: "light", children: status }) : status,
|
|
979
|
+
secondaryActions.length ? /* @__PURE__ */ jsxs13(Menu, { position: "bottom-end", withinPortal: true, children: [
|
|
980
|
+
/* @__PURE__ */ jsx18(Menu.Target, { children: /* @__PURE__ */ jsx18(ActionIcon3, { variant: "subtle", "aria-label": "More actions", children: /* @__PURE__ */ jsx18(MoreIcon, { size: "1rem" }) }) }),
|
|
981
|
+
/* @__PURE__ */ jsx18(Menu.Dropdown, { children: secondaryActions.map(
|
|
982
|
+
(action) => action.href ? /* @__PURE__ */ jsx18(Menu.Item, { component: "a", href: action.href, color: action.color, children: action.label }, action.label) : /* @__PURE__ */ jsx18(Menu.Item, { onClick: action.onClick, color: action.color, children: action.label }, action.label)
|
|
619
983
|
) })
|
|
620
984
|
] }) : null
|
|
621
985
|
] })
|
|
622
986
|
] }),
|
|
623
|
-
metadata.length ? /* @__PURE__ */
|
|
624
|
-
/* @__PURE__ */
|
|
625
|
-
/* @__PURE__ */
|
|
987
|
+
metadata.length ? /* @__PURE__ */ jsx18(Stack13, { gap: 6, children: metadata.map((item) => /* @__PURE__ */ jsxs13(Group10, { justify: "space-between", gap: "sm", children: [
|
|
988
|
+
/* @__PURE__ */ jsx18(Text12, { size: "sm", c: "dimmed", children: item.label }),
|
|
989
|
+
/* @__PURE__ */ jsx18(Text12, { size: "sm", fw: 500, ta: "right", children: item.value })
|
|
626
990
|
] }, item.label)) }) : null,
|
|
627
|
-
primaryAction ? /* @__PURE__ */
|
|
991
|
+
primaryAction ? /* @__PURE__ */ jsx18(Group10, { justify: "space-between", children: primaryAction }) : null,
|
|
628
992
|
footer
|
|
629
993
|
] }) });
|
|
630
994
|
}
|
|
631
995
|
|
|
632
996
|
// src/PublicProductCard.tsx
|
|
633
997
|
import { cloneElement, isValidElement } from "react";
|
|
634
|
-
import { AspectRatio as
|
|
635
|
-
import { jsx as
|
|
998
|
+
import { AspectRatio as AspectRatio3, Badge as Badge9, Card as Card6, Group as Group11, Skeleton, Stack as Stack14, Text as Text13, ThemeIcon as ThemeIcon5, Title as Title11 } from "@mantine/core";
|
|
999
|
+
import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
636
1000
|
var stateConfig = {
|
|
637
1001
|
available: { label: "Available", color: "teal" },
|
|
638
1002
|
limited: { label: "Limited", color: "yellow" },
|
|
@@ -649,29 +1013,29 @@ function enhanceAction(action, disabled) {
|
|
|
649
1013
|
});
|
|
650
1014
|
}
|
|
651
1015
|
function ImageFallback({ compact }) {
|
|
652
|
-
return /* @__PURE__ */
|
|
653
|
-
|
|
1016
|
+
return /* @__PURE__ */ jsx19(AspectRatio3, { ratio: compact ? 16 / 9 : 4 / 3, children: /* @__PURE__ */ jsx19(
|
|
1017
|
+
ThemeIcon5,
|
|
654
1018
|
{
|
|
655
1019
|
size: "100%",
|
|
656
1020
|
radius: "md",
|
|
657
1021
|
variant: "light",
|
|
658
1022
|
color: "gray",
|
|
659
1023
|
"aria-label": "No product image available",
|
|
660
|
-
children: /* @__PURE__ */
|
|
1024
|
+
children: /* @__PURE__ */ jsx19(GdsIcons.Gallery, { size: compact ? "1.5rem" : "2rem" })
|
|
661
1025
|
}
|
|
662
1026
|
) });
|
|
663
1027
|
}
|
|
664
1028
|
function LoadingCard({ compact }) {
|
|
665
|
-
return /* @__PURE__ */
|
|
666
|
-
/* @__PURE__ */
|
|
667
|
-
/* @__PURE__ */
|
|
668
|
-
/* @__PURE__ */
|
|
669
|
-
/* @__PURE__ */
|
|
670
|
-
/* @__PURE__ */
|
|
1029
|
+
return /* @__PURE__ */ jsx19(Card6, { withBorder: true, radius: "lg", padding: compact ? "md" : "lg", children: /* @__PURE__ */ jsxs14(Stack14, { gap: "md", children: [
|
|
1030
|
+
/* @__PURE__ */ jsx19(AspectRatio3, { ratio: compact ? 16 / 9 : 4 / 3, children: /* @__PURE__ */ jsx19(Skeleton, { radius: "md" }) }),
|
|
1031
|
+
/* @__PURE__ */ jsxs14(Stack14, { gap: "xs", children: [
|
|
1032
|
+
/* @__PURE__ */ jsx19(Skeleton, { height: 20, radius: "sm", width: "70%" }),
|
|
1033
|
+
/* @__PURE__ */ jsx19(Skeleton, { height: 14, radius: "sm", width: "100%" }),
|
|
1034
|
+
/* @__PURE__ */ jsx19(Skeleton, { height: 14, radius: "sm", width: "85%" })
|
|
671
1035
|
] }),
|
|
672
|
-
/* @__PURE__ */
|
|
673
|
-
/* @__PURE__ */
|
|
674
|
-
/* @__PURE__ */
|
|
1036
|
+
/* @__PURE__ */ jsxs14(Group11, { justify: "space-between", align: "center", children: [
|
|
1037
|
+
/* @__PURE__ */ jsx19(Skeleton, { height: 18, radius: "sm", width: 72 }),
|
|
1038
|
+
/* @__PURE__ */ jsx19(Skeleton, { height: 36, radius: "md", width: 120 })
|
|
675
1039
|
] })
|
|
676
1040
|
] }) });
|
|
677
1041
|
}
|
|
@@ -681,69 +1045,234 @@ function PublicProductCard({
|
|
|
681
1045
|
image,
|
|
682
1046
|
price,
|
|
683
1047
|
helperText,
|
|
684
|
-
helperKind = "supporting",
|
|
1048
|
+
helperKind = "supporting",
|
|
1049
|
+
pickupNote,
|
|
1050
|
+
inventoryNote,
|
|
1051
|
+
state = "available",
|
|
1052
|
+
stateLabels: stateLabels2,
|
|
1053
|
+
primaryAction,
|
|
1054
|
+
secondaryAction,
|
|
1055
|
+
metadata = [],
|
|
1056
|
+
compact = false,
|
|
1057
|
+
loading = false,
|
|
1058
|
+
disabled = false
|
|
1059
|
+
}) {
|
|
1060
|
+
if (loading) {
|
|
1061
|
+
return /* @__PURE__ */ jsx19(LoadingCard, { compact });
|
|
1062
|
+
}
|
|
1063
|
+
const isActionDisabled = disabled || state === "sold-out";
|
|
1064
|
+
const resolvedPrimaryAction = enhanceAction(primaryAction, isActionDisabled);
|
|
1065
|
+
const resolvedSecondaryAction = enhanceAction(secondaryAction, disabled);
|
|
1066
|
+
const stateBadge = {
|
|
1067
|
+
...stateConfig[state],
|
|
1068
|
+
label: stateLabels2?.[state] ?? stateConfig[state].label
|
|
1069
|
+
};
|
|
1070
|
+
const supportingHelper = helperKind === "supporting" ? helperText : null;
|
|
1071
|
+
const pickupHelper = helperKind === "pickup" ? helperText : pickupNote;
|
|
1072
|
+
const inventoryHelper = helperKind === "inventory" ? helperText : inventoryNote;
|
|
1073
|
+
const hasSupportingRegion = Boolean(price || supportingHelper || pickupHelper || inventoryHelper);
|
|
1074
|
+
return /* @__PURE__ */ jsx19(Card6, { withBorder: true, radius: "lg", padding: compact ? "md" : "lg", children: /* @__PURE__ */ jsxs14(Stack14, { gap: compact ? "sm" : "md", children: [
|
|
1075
|
+
image ?? /* @__PURE__ */ jsx19(ImageFallback, { compact }),
|
|
1076
|
+
/* @__PURE__ */ jsxs14(Group11, { justify: "space-between", align: "flex-start", wrap: "nowrap", gap: "sm", children: [
|
|
1077
|
+
/* @__PURE__ */ jsxs14(Stack14, { gap: 4, style: { minWidth: 0, flex: 1 }, children: [
|
|
1078
|
+
/* @__PURE__ */ jsx19(Title11, { order: compact ? 5 : 4, lineClamp: 2, children: title }),
|
|
1079
|
+
description ? /* @__PURE__ */ jsx19(Text13, { size: "sm", c: "dimmed", lineClamp: compact ? 2 : 3, children: description }) : null
|
|
1080
|
+
] }),
|
|
1081
|
+
/* @__PURE__ */ jsx19(Badge9, { variant: "light", color: stateBadge.color, children: stateBadge.label })
|
|
1082
|
+
] }),
|
|
1083
|
+
hasSupportingRegion ? /* @__PURE__ */ jsxs14(Group11, { justify: "space-between", align: "flex-end", gap: "sm", wrap: "nowrap", children: [
|
|
1084
|
+
/* @__PURE__ */ jsxs14(Stack14, { gap: 2, style: { minWidth: 0, flex: 1 }, children: [
|
|
1085
|
+
price ? /* @__PURE__ */ jsx19(Text13, { fw: 700, size: compact ? "md" : "lg", children: price }) : null,
|
|
1086
|
+
supportingHelper ? /* @__PURE__ */ jsx19(Text13, { size: "xs", c: "dimmed", children: supportingHelper }) : null
|
|
1087
|
+
] }),
|
|
1088
|
+
resolvedPrimaryAction
|
|
1089
|
+
] }) : resolvedPrimaryAction ? /* @__PURE__ */ jsx19(Group11, { justify: "flex-end", children: resolvedPrimaryAction }) : null,
|
|
1090
|
+
pickupHelper || inventoryHelper || metadata.length ? /* @__PURE__ */ jsxs14(Stack14, { gap: 6, children: [
|
|
1091
|
+
pickupHelper ? /* @__PURE__ */ jsxs14(Group11, { justify: "space-between", gap: "sm", children: [
|
|
1092
|
+
/* @__PURE__ */ jsx19(Text13, { size: "sm", c: "dimmed", children: "Pickup" }),
|
|
1093
|
+
/* @__PURE__ */ jsx19(Text13, { size: "sm", fw: 500, ta: "right", children: pickupHelper })
|
|
1094
|
+
] }) : null,
|
|
1095
|
+
inventoryHelper ? /* @__PURE__ */ jsxs14(Group11, { justify: "space-between", gap: "sm", children: [
|
|
1096
|
+
/* @__PURE__ */ jsx19(Text13, { size: "sm", c: "dimmed", children: "Availability" }),
|
|
1097
|
+
/* @__PURE__ */ jsx19(Text13, { size: "sm", fw: 500, ta: "right", children: inventoryHelper })
|
|
1098
|
+
] }) : null,
|
|
1099
|
+
metadata.map((item) => /* @__PURE__ */ jsxs14(Group11, { justify: "space-between", gap: "sm", children: [
|
|
1100
|
+
/* @__PURE__ */ jsx19(Text13, { size: "sm", c: "dimmed", children: item.label }),
|
|
1101
|
+
/* @__PURE__ */ jsx19(Text13, { size: "sm", fw: 500, ta: "right", children: item.value })
|
|
1102
|
+
] }, item.label))
|
|
1103
|
+
] }) : null,
|
|
1104
|
+
resolvedSecondaryAction ? /* @__PURE__ */ jsx19(Group11, { justify: "flex-end", children: resolvedSecondaryAction }) : null
|
|
1105
|
+
] }) });
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
// src/PublicFoodCard.tsx
|
|
1109
|
+
import { cloneElement as cloneElement2, isValidElement as isValidElement2 } from "react";
|
|
1110
|
+
import { AspectRatio as AspectRatio4, Badge as Badge10, Card as Card7, Group as Group12, Skeleton as Skeleton2, Stack as Stack15, Text as Text14, ThemeIcon as ThemeIcon6, Title as Title12 } from "@mantine/core";
|
|
1111
|
+
import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1112
|
+
var ratioMap2 = {
|
|
1113
|
+
square: 1,
|
|
1114
|
+
dish: 4 / 3,
|
|
1115
|
+
landscape: 16 / 9
|
|
1116
|
+
};
|
|
1117
|
+
var stateConfig2 = {
|
|
1118
|
+
available: { label: "Available", color: "teal" },
|
|
1119
|
+
preorder: { label: "Preorder", color: "violet" },
|
|
1120
|
+
limited: { label: "Limited batch", color: "yellow" },
|
|
1121
|
+
"sold-out": { label: "Sold out", color: "red" },
|
|
1122
|
+
"coming-soon": { label: "Coming soon", color: "gray" }
|
|
1123
|
+
};
|
|
1124
|
+
var markerToneMap = {
|
|
1125
|
+
default: "gray",
|
|
1126
|
+
positive: "teal",
|
|
1127
|
+
warning: "orange",
|
|
1128
|
+
muted: "dark"
|
|
1129
|
+
};
|
|
1130
|
+
function enhanceAction2(action, disabled) {
|
|
1131
|
+
if (!isValidElement2(action)) {
|
|
1132
|
+
return action;
|
|
1133
|
+
}
|
|
1134
|
+
return cloneElement2(action, {
|
|
1135
|
+
disabled: disabled || Boolean(action.props.disabled),
|
|
1136
|
+
"aria-disabled": disabled || void 0
|
|
1137
|
+
});
|
|
1138
|
+
}
|
|
1139
|
+
function FoodImageFallback({ mediaRatio }) {
|
|
1140
|
+
return /* @__PURE__ */ jsx20(AspectRatio4, { ratio: ratioMap2[mediaRatio], children: /* @__PURE__ */ jsx20(ThemeIcon6, { size: "100%", radius: "md", variant: "light", color: "gray", "aria-label": "No food image available", children: /* @__PURE__ */ jsx20(GdsIcons.Gallery, { size: "2rem" }) }) });
|
|
1141
|
+
}
|
|
1142
|
+
function LoadingFoodCard({ mediaRatio }) {
|
|
1143
|
+
return /* @__PURE__ */ jsx20(Card7, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ jsxs15(Stack15, { gap: "md", children: [
|
|
1144
|
+
/* @__PURE__ */ jsx20(AspectRatio4, { ratio: ratioMap2[mediaRatio], children: /* @__PURE__ */ jsx20(Skeleton2, { radius: "md" }) }),
|
|
1145
|
+
/* @__PURE__ */ jsxs15(Stack15, { gap: "xs", children: [
|
|
1146
|
+
/* @__PURE__ */ jsx20(Skeleton2, { height: 20, radius: "sm", width: "72%" }),
|
|
1147
|
+
/* @__PURE__ */ jsx20(Skeleton2, { height: 14, radius: "sm", width: "96%" }),
|
|
1148
|
+
/* @__PURE__ */ jsx20(Skeleton2, { height: 14, radius: "sm", width: "78%" })
|
|
1149
|
+
] }),
|
|
1150
|
+
/* @__PURE__ */ jsxs15(Group12, { justify: "space-between", align: "center", children: [
|
|
1151
|
+
/* @__PURE__ */ jsx20(Skeleton2, { height: 18, radius: "sm", width: 96 }),
|
|
1152
|
+
/* @__PURE__ */ jsx20(Skeleton2, { height: 36, radius: "md", width: 112 })
|
|
1153
|
+
] })
|
|
1154
|
+
] }) });
|
|
1155
|
+
}
|
|
1156
|
+
function PublicFoodCard({
|
|
1157
|
+
title,
|
|
1158
|
+
description,
|
|
1159
|
+
image,
|
|
1160
|
+
price,
|
|
1161
|
+
priceNote,
|
|
1162
|
+
state,
|
|
1163
|
+
helperText,
|
|
685
1164
|
pickupNote,
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
1165
|
+
freshnessNote,
|
|
1166
|
+
markers = [],
|
|
1167
|
+
metadata = [],
|
|
689
1168
|
primaryAction,
|
|
690
1169
|
secondaryAction,
|
|
691
|
-
|
|
692
|
-
|
|
1170
|
+
quantityHint,
|
|
1171
|
+
mediaRatio = "dish",
|
|
693
1172
|
loading = false,
|
|
694
1173
|
disabled = false
|
|
695
1174
|
}) {
|
|
696
1175
|
if (loading) {
|
|
697
|
-
return /* @__PURE__ */
|
|
1176
|
+
return /* @__PURE__ */ jsx20(LoadingFoodCard, { mediaRatio });
|
|
698
1177
|
}
|
|
699
|
-
const
|
|
700
|
-
const
|
|
701
|
-
const
|
|
702
|
-
const
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
/* @__PURE__ */ jsxs7(Stack7, { gap: 4, style: { minWidth: 0, flex: 1 }, children: [
|
|
714
|
-
/* @__PURE__ */ jsx11(Title7, { order: compact ? 5 : 4, lineClamp: 2, children: title }),
|
|
715
|
-
description ? /* @__PURE__ */ jsx11(Text7, { size: "sm", c: "dimmed", lineClamp: compact ? 2 : 3, children: description }) : null
|
|
1178
|
+
const stateBadge = stateConfig2[state];
|
|
1179
|
+
const isActionDisabled = disabled || state === "sold-out" || state === "coming-soon";
|
|
1180
|
+
const resolvedPrimaryAction = enhanceAction2(primaryAction, isActionDisabled);
|
|
1181
|
+
const resolvedSecondaryAction = enhanceAction2(secondaryAction, disabled);
|
|
1182
|
+
return /* @__PURE__ */ jsx20(Card7, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ jsxs15(Stack15, { gap: "md", children: [
|
|
1183
|
+
image ?? /* @__PURE__ */ jsx20(FoodImageFallback, { mediaRatio }),
|
|
1184
|
+
markers.length > 0 || quantityHint ? /* @__PURE__ */ jsxs15(Group12, { justify: "space-between", align: "center", wrap: "wrap", gap: "xs", children: [
|
|
1185
|
+
/* @__PURE__ */ jsx20(Group12, { gap: "xs", wrap: "wrap", children: markers.map((marker) => /* @__PURE__ */ jsx20(Badge10, { variant: "light", color: markerToneMap[marker.tone ?? "default"], children: marker.label }, marker.id)) }),
|
|
1186
|
+
quantityHint ? /* @__PURE__ */ jsx20(Text14, { size: "xs", fw: 600, c: "dimmed", children: quantityHint }) : null
|
|
1187
|
+
] }) : null,
|
|
1188
|
+
/* @__PURE__ */ jsxs15(Group12, { justify: "space-between", align: "flex-start", gap: "sm", wrap: "nowrap", children: [
|
|
1189
|
+
/* @__PURE__ */ jsxs15(Stack15, { gap: 4, style: { minWidth: 0, flex: 1 }, children: [
|
|
1190
|
+
/* @__PURE__ */ jsx20(Title12, { order: 4, lineClamp: 2, children: title }),
|
|
1191
|
+
description ? /* @__PURE__ */ jsx20(Text14, { size: "sm", c: "dimmed", lineClamp: 3, children: description }) : null
|
|
716
1192
|
] }),
|
|
717
|
-
/* @__PURE__ */
|
|
1193
|
+
/* @__PURE__ */ jsx20(Badge10, { variant: "light", color: stateBadge.color, children: stateBadge.label })
|
|
718
1194
|
] }),
|
|
719
|
-
|
|
720
|
-
/* @__PURE__ */
|
|
721
|
-
price ? /* @__PURE__ */
|
|
722
|
-
|
|
1195
|
+
/* @__PURE__ */ jsxs15(Group12, { justify: "space-between", align: "flex-end", gap: "sm", wrap: "nowrap", children: [
|
|
1196
|
+
/* @__PURE__ */ jsxs15(Stack15, { gap: 2, style: { minWidth: 0, flex: 1 }, children: [
|
|
1197
|
+
price ? /* @__PURE__ */ jsx20(Text14, { fw: 800, size: "lg", children: price }) : null,
|
|
1198
|
+
priceNote ? /* @__PURE__ */ jsx20(Text14, { size: "xs", c: "dimmed", children: priceNote }) : null,
|
|
1199
|
+
helperText ? /* @__PURE__ */ jsx20(Text14, { size: "sm", c: "dimmed", children: helperText }) : null
|
|
723
1200
|
] }),
|
|
724
1201
|
resolvedPrimaryAction
|
|
725
|
-
] })
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
/* @__PURE__ */
|
|
729
|
-
/* @__PURE__ */
|
|
1202
|
+
] }),
|
|
1203
|
+
pickupNote || freshnessNote || metadata.length > 0 ? /* @__PURE__ */ jsxs15(Stack15, { gap: 6, children: [
|
|
1204
|
+
pickupNote ? /* @__PURE__ */ jsxs15(Group12, { justify: "space-between", align: "flex-start", gap: "sm", children: [
|
|
1205
|
+
/* @__PURE__ */ jsx20(Text14, { size: "sm", c: "dimmed", children: "Pickup" }),
|
|
1206
|
+
/* @__PURE__ */ jsx20(Text14, { size: "sm", fw: 500, ta: "right", children: pickupNote })
|
|
730
1207
|
] }) : null,
|
|
731
|
-
|
|
732
|
-
/* @__PURE__ */
|
|
733
|
-
/* @__PURE__ */
|
|
1208
|
+
freshnessNote ? /* @__PURE__ */ jsxs15(Group12, { justify: "space-between", align: "flex-start", gap: "sm", children: [
|
|
1209
|
+
/* @__PURE__ */ jsx20(Text14, { size: "sm", c: "dimmed", children: "Freshness" }),
|
|
1210
|
+
/* @__PURE__ */ jsx20(Text14, { size: "sm", fw: 500, ta: "right", children: freshnessNote })
|
|
734
1211
|
] }) : null,
|
|
735
|
-
metadata.map((item) => /* @__PURE__ */
|
|
736
|
-
|
|
737
|
-
/* @__PURE__ */
|
|
738
|
-
] }, item.
|
|
1212
|
+
metadata.map((item) => /* @__PURE__ */ jsx20(Group12, { justify: "space-between", align: "flex-start", gap: "sm", children: /* @__PURE__ */ jsxs15(Group12, { gap: "xs", wrap: "nowrap", children: [
|
|
1213
|
+
item.icon,
|
|
1214
|
+
/* @__PURE__ */ jsx20(Text14, { size: "sm", c: "dimmed", children: item.label })
|
|
1215
|
+
] }) }, item.id))
|
|
739
1216
|
] }) : null,
|
|
740
|
-
resolvedSecondaryAction ? /* @__PURE__ */
|
|
1217
|
+
resolvedSecondaryAction ? /* @__PURE__ */ jsx20(Group12, { justify: "flex-end", children: resolvedSecondaryAction }) : null
|
|
1218
|
+
] }) });
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
// src/FoodMenuSection.tsx
|
|
1222
|
+
import { Box as Box5, Group as Group13, SimpleGrid as SimpleGrid3, Stack as Stack16, Text as Text15, Title as Title13 } from "@mantine/core";
|
|
1223
|
+
import { Fragment as Fragment2, jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1224
|
+
function FoodMenuSection({
|
|
1225
|
+
title,
|
|
1226
|
+
description,
|
|
1227
|
+
eyebrow,
|
|
1228
|
+
categories,
|
|
1229
|
+
sectionNote,
|
|
1230
|
+
action,
|
|
1231
|
+
emptyState,
|
|
1232
|
+
columns = 3,
|
|
1233
|
+
showEmptyCategories = false
|
|
1234
|
+
}) {
|
|
1235
|
+
const normalizedCategories = (categories ?? []).filter(Boolean);
|
|
1236
|
+
const visibleCategories = showEmptyCategories ? normalizedCategories : normalizedCategories.filter((category) => category.items.length > 0);
|
|
1237
|
+
if (!visibleCategories.length) {
|
|
1238
|
+
return emptyState ? /* @__PURE__ */ jsx21(Fragment2, { children: emptyState }) : /* @__PURE__ */ jsx21(
|
|
1239
|
+
EmptyState,
|
|
1240
|
+
{
|
|
1241
|
+
title: "No active menu available",
|
|
1242
|
+
description: "Publish grouped menu categories here when the current weekly or seasonal menu is ready."
|
|
1243
|
+
}
|
|
1244
|
+
);
|
|
1245
|
+
}
|
|
1246
|
+
return /* @__PURE__ */ jsx21(Box5, { component: "section", "aria-label": typeof title === "string" ? title : "Food menu section", children: /* @__PURE__ */ jsxs16(Stack16, { gap: "xl", children: [
|
|
1247
|
+
/* @__PURE__ */ jsxs16(Group13, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
1248
|
+
/* @__PURE__ */ jsxs16(Stack16, { gap: 4, children: [
|
|
1249
|
+
eyebrow ? /* @__PURE__ */ jsx21(Text15, { size: "xs", fw: 700, c: "dimmed", tt: "uppercase", children: eyebrow }) : null,
|
|
1250
|
+
/* @__PURE__ */ jsx21(Title13, { order: 2, children: title }),
|
|
1251
|
+
description ? /* @__PURE__ */ jsx21(Text15, { size: "sm", c: "dimmed", maw: 760, children: description }) : null,
|
|
1252
|
+
sectionNote ? /* @__PURE__ */ jsx21(Text15, { size: "sm", c: "dimmed", children: sectionNote }) : null
|
|
1253
|
+
] }),
|
|
1254
|
+
action
|
|
1255
|
+
] }),
|
|
1256
|
+
/* @__PURE__ */ jsx21(Stack16, { gap: "xl", children: visibleCategories.map((category) => /* @__PURE__ */ jsxs16(Stack16, { gap: "md", children: [
|
|
1257
|
+
/* @__PURE__ */ jsxs16(Stack16, { gap: 4, children: [
|
|
1258
|
+
/* @__PURE__ */ jsx21(Title13, { order: 3, children: category.title }),
|
|
1259
|
+
category.description ? /* @__PURE__ */ jsx21(Text15, { size: "sm", c: "dimmed", children: category.description }) : null,
|
|
1260
|
+
category.helperNote ? /* @__PURE__ */ jsx21(Text15, { size: "sm", c: "dimmed", children: category.helperNote }) : null
|
|
1261
|
+
] }),
|
|
1262
|
+
category.items.length ? /* @__PURE__ */ jsx21(SimpleGrid3, { cols: { base: 1, sm: Math.min(columns, 2), lg: columns }, spacing: "lg", children: category.items.map((item) => /* @__PURE__ */ jsx21(PublicFoodCard, { ...item }, item.id)) }) : /* @__PURE__ */ jsx21(
|
|
1263
|
+
EmptyState,
|
|
1264
|
+
{
|
|
1265
|
+
title: "No items in this category",
|
|
1266
|
+
description: "This category is defined, but it does not currently have any visible dishes or bundles."
|
|
1267
|
+
}
|
|
1268
|
+
)
|
|
1269
|
+
] }, category.id)) })
|
|
741
1270
|
] }) });
|
|
742
1271
|
}
|
|
743
1272
|
|
|
744
1273
|
// src/DataToolbar.tsx
|
|
745
|
-
import { Badge as
|
|
746
|
-
import { jsx as
|
|
1274
|
+
import { Badge as Badge11, Group as Group14, Stack as Stack17 } from "@mantine/core";
|
|
1275
|
+
import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
747
1276
|
function DataToolbar({
|
|
748
1277
|
searchSlot,
|
|
749
1278
|
filterSlot,
|
|
@@ -752,20 +1281,20 @@ function DataToolbar({
|
|
|
752
1281
|
createAction,
|
|
753
1282
|
activeFilters = []
|
|
754
1283
|
}) {
|
|
755
|
-
return /* @__PURE__ */
|
|
756
|
-
/* @__PURE__ */
|
|
757
|
-
/* @__PURE__ */
|
|
1284
|
+
return /* @__PURE__ */ jsxs17(Stack17, { gap: "sm", children: [
|
|
1285
|
+
/* @__PURE__ */ jsxs17(Group14, { justify: "space-between", align: "flex-start", gap: "sm", children: [
|
|
1286
|
+
/* @__PURE__ */ jsxs17(Group14, { flex: 1, align: "flex-start", gap: "sm", children: [
|
|
758
1287
|
searchSlot,
|
|
759
1288
|
filterSlot,
|
|
760
1289
|
sortSlot
|
|
761
1290
|
] }),
|
|
762
|
-
/* @__PURE__ */
|
|
1291
|
+
/* @__PURE__ */ jsxs17(Group14, { gap: "sm", children: [
|
|
763
1292
|
resetAction,
|
|
764
1293
|
createAction
|
|
765
1294
|
] })
|
|
766
1295
|
] }),
|
|
767
|
-
activeFilters.length ? /* @__PURE__ */
|
|
768
|
-
|
|
1296
|
+
activeFilters.length ? /* @__PURE__ */ jsx22(Group14, { gap: "xs", children: activeFilters.map((filter) => /* @__PURE__ */ jsx22(
|
|
1297
|
+
Badge11,
|
|
769
1298
|
{
|
|
770
1299
|
variant: "light",
|
|
771
1300
|
rightSection: filter.onRemove ? "\xD7" : void 0,
|
|
@@ -778,51 +1307,9 @@ function DataToolbar({
|
|
|
778
1307
|
] });
|
|
779
1308
|
}
|
|
780
1309
|
|
|
781
|
-
// src/StateBlock.tsx
|
|
782
|
-
import { Loader, Stack as Stack9, Text as Text8, ThemeIcon as ThemeIcon4, Title as Title8 } from "@mantine/core";
|
|
783
|
-
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
784
|
-
var variantConfig = {
|
|
785
|
-
loading: { color: "violet", icon: /* @__PURE__ */ jsx13(Loader, { size: "sm" }) },
|
|
786
|
-
empty: { color: "gray", icon: /* @__PURE__ */ jsx13(GdsIcons.Inbox, { size: "1.1rem" }) },
|
|
787
|
-
error: { color: "red", icon: /* @__PURE__ */ jsx13(GdsIcons.Danger, { size: "1.1rem" }) },
|
|
788
|
-
permission: { color: "orange", icon: /* @__PURE__ */ jsx13(GdsIcons.Verify, { size: "1.1rem" }) },
|
|
789
|
-
disabled: { color: "gray", icon: /* @__PURE__ */ jsx13(GdsIcons.Toggle, { size: "1.1rem" }) },
|
|
790
|
-
success: { color: "teal", icon: /* @__PURE__ */ jsx13(GdsIcons.Success, { size: "1.1rem" }) },
|
|
791
|
-
info: { color: "blue", icon: /* @__PURE__ */ jsx13(GdsIcons.Info, { size: "1.1rem" }) },
|
|
792
|
-
"not-enough-data": { color: "yellow", icon: /* @__PURE__ */ jsx13(GdsIcons.Analytics, { size: "1.1rem" }) }
|
|
793
|
-
};
|
|
794
|
-
function StateBlock({
|
|
795
|
-
variant,
|
|
796
|
-
title,
|
|
797
|
-
description,
|
|
798
|
-
action,
|
|
799
|
-
icon,
|
|
800
|
-
compact = false
|
|
801
|
-
}) {
|
|
802
|
-
const config = variantConfig[variant];
|
|
803
|
-
return /* @__PURE__ */ jsxs9(
|
|
804
|
-
Stack9,
|
|
805
|
-
{
|
|
806
|
-
align: compact ? "flex-start" : "center",
|
|
807
|
-
justify: "center",
|
|
808
|
-
gap: "md",
|
|
809
|
-
py: compact ? "md" : "xl",
|
|
810
|
-
ta: compact ? "left" : "center",
|
|
811
|
-
children: [
|
|
812
|
-
/* @__PURE__ */ jsx13(ThemeIcon4, { variant: "light", color: config.color, size: compact ? "lg" : "xl", radius: "xl", children: icon ?? config.icon }),
|
|
813
|
-
/* @__PURE__ */ jsxs9(Stack9, { gap: 6, align: compact ? "flex-start" : "center", children: [
|
|
814
|
-
/* @__PURE__ */ jsx13(Title8, { order: compact ? 4 : 3, children: title }),
|
|
815
|
-
description ? /* @__PURE__ */ jsx13(Text8, { c: "dimmed", maw: compact ? void 0 : 480, children: description }) : null
|
|
816
|
-
] }),
|
|
817
|
-
action
|
|
818
|
-
]
|
|
819
|
-
}
|
|
820
|
-
);
|
|
821
|
-
}
|
|
822
|
-
|
|
823
1310
|
// src/BrowseSurface.tsx
|
|
824
|
-
import { Badge as
|
|
825
|
-
import { jsx as
|
|
1311
|
+
import { Badge as Badge12, Box as Box6, Button as Button2, Group as Group15, Paper as Paper4, SimpleGrid as SimpleGrid4, Stack as Stack18, Text as Text16, Title as Title14 } from "@mantine/core";
|
|
1312
|
+
import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
826
1313
|
function BrowseSurface({
|
|
827
1314
|
eyebrow,
|
|
828
1315
|
title,
|
|
@@ -856,22 +1343,22 @@ function BrowseSurface({
|
|
|
856
1343
|
}));
|
|
857
1344
|
let body = content;
|
|
858
1345
|
if (loading) {
|
|
859
|
-
body = /* @__PURE__ */
|
|
1346
|
+
body = /* @__PURE__ */ jsx23(StateBlock, { variant: "loading", title: loadingTitle, description: loadingDescription, compact: true });
|
|
860
1347
|
} else if (error) {
|
|
861
|
-
body = /* @__PURE__ */
|
|
1348
|
+
body = /* @__PURE__ */ jsx23(StateBlock, { variant: "error", title: errorTitle, description: error, action: errorAction ?? emptyAction, compact: true });
|
|
862
1349
|
} else if (empty) {
|
|
863
|
-
body = /* @__PURE__ */
|
|
1350
|
+
body = /* @__PURE__ */ jsx23(StateBlock, { variant: "empty", title: emptyTitle, description: emptyDescription, action: emptyAction, compact: true });
|
|
864
1351
|
}
|
|
865
|
-
return /* @__PURE__ */
|
|
866
|
-
/* @__PURE__ */
|
|
867
|
-
/* @__PURE__ */
|
|
868
|
-
/* @__PURE__ */
|
|
869
|
-
eyebrow ? /* @__PURE__ */
|
|
870
|
-
/* @__PURE__ */
|
|
871
|
-
description ? /* @__PURE__ */
|
|
1352
|
+
return /* @__PURE__ */ jsxs18(Stack18, { gap: "lg", children: [
|
|
1353
|
+
/* @__PURE__ */ jsx23(Paper4, { withBorder: true, radius: "xl", p: "xl", children: /* @__PURE__ */ jsxs18(Stack18, { gap: "lg", children: [
|
|
1354
|
+
/* @__PURE__ */ jsxs18(Group15, { justify: "space-between", align: "flex-start", gap: "md", children: [
|
|
1355
|
+
/* @__PURE__ */ jsxs18(Stack18, { gap: "xs", maw: 760, children: [
|
|
1356
|
+
eyebrow ? /* @__PURE__ */ jsx23(Text16, { size: "xs", fw: 700, tt: "uppercase", c: "dimmed", style: { letterSpacing: "0.18em" }, children: eyebrow }) : null,
|
|
1357
|
+
/* @__PURE__ */ jsx23(Title14, { order: 1, children: title }),
|
|
1358
|
+
description ? /* @__PURE__ */ jsx23(Text16, { size: "lg", c: "dimmed", children: description }) : null
|
|
872
1359
|
] }),
|
|
873
|
-
/* @__PURE__ */
|
|
874
|
-
typeof resultCount === "number" ? /* @__PURE__ */
|
|
1360
|
+
/* @__PURE__ */ jsxs18(Stack18, { align: "flex-end", gap: "xs", children: [
|
|
1361
|
+
typeof resultCount === "number" ? /* @__PURE__ */ jsxs18(Badge12, { size: "lg", radius: "xl", variant: "light", color: "violet", children: [
|
|
875
1362
|
resultCount,
|
|
876
1363
|
" ",
|
|
877
1364
|
resultLabel
|
|
@@ -879,10 +1366,10 @@ function BrowseSurface({
|
|
|
879
1366
|
primaryControls
|
|
880
1367
|
] })
|
|
881
1368
|
] }),
|
|
882
|
-
scopeOptions.length ? /* @__PURE__ */
|
|
883
|
-
/* @__PURE__ */
|
|
884
|
-
/* @__PURE__ */
|
|
885
|
-
|
|
1369
|
+
scopeOptions.length ? /* @__PURE__ */ jsxs18(Stack18, { gap: "xs", children: [
|
|
1370
|
+
/* @__PURE__ */ jsx23(Text16, { size: "sm", fw: 600, c: "dimmed", children: scopeLabel }),
|
|
1371
|
+
/* @__PURE__ */ jsx23(Group15, { gap: "xs", wrap: "wrap", children: scopeOptions.map((option) => /* @__PURE__ */ jsx23(
|
|
1372
|
+
Button2,
|
|
886
1373
|
{
|
|
887
1374
|
variant: option.active ? "filled" : "default",
|
|
888
1375
|
color: option.active ? "violet" : "gray",
|
|
@@ -894,30 +1381,30 @@ function BrowseSurface({
|
|
|
894
1381
|
option.id
|
|
895
1382
|
)) })
|
|
896
1383
|
] }) : null,
|
|
897
|
-
locationControls ? /* @__PURE__ */
|
|
898
|
-
/* @__PURE__ */
|
|
1384
|
+
locationControls ? /* @__PURE__ */ jsxs18(Stack18, { gap: "xs", children: [
|
|
1385
|
+
/* @__PURE__ */ jsx23(Text16, { size: "sm", fw: 600, c: "dimmed", children: "Location" }),
|
|
899
1386
|
locationControls
|
|
900
1387
|
] }) : null,
|
|
901
|
-
toolbar || sortControl ? /* @__PURE__ */
|
|
902
|
-
toolbar ? /* @__PURE__ */
|
|
1388
|
+
toolbar || sortControl ? /* @__PURE__ */ jsxs18(SimpleGrid4, { cols: { base: 1, lg: sortControl ? 2 : 1 }, spacing: "md", children: [
|
|
1389
|
+
toolbar ? /* @__PURE__ */ jsx23(
|
|
903
1390
|
DataToolbar,
|
|
904
1391
|
{
|
|
905
1392
|
...toolbar,
|
|
906
1393
|
activeFilters: toolbarFilters.length ? toolbarFilters : toolbar.fallbackActiveFilters
|
|
907
1394
|
}
|
|
908
|
-
) : /* @__PURE__ */
|
|
909
|
-
sortControl ? /* @__PURE__ */
|
|
910
|
-
/* @__PURE__ */
|
|
1395
|
+
) : /* @__PURE__ */ jsx23(Box6, {}),
|
|
1396
|
+
sortControl ? /* @__PURE__ */ jsxs18(Stack18, { gap: "xs", align: "stretch", children: [
|
|
1397
|
+
/* @__PURE__ */ jsx23(Text16, { size: "sm", fw: 600, c: "dimmed", children: "Sort" }),
|
|
911
1398
|
sortControl
|
|
912
1399
|
] }) : null
|
|
913
1400
|
] }) : null,
|
|
914
|
-
mobileFilters ? /* @__PURE__ */
|
|
915
|
-
/* @__PURE__ */
|
|
1401
|
+
mobileFilters ? /* @__PURE__ */ jsxs18(Stack18, { hiddenFrom: "lg", gap: "xs", children: [
|
|
1402
|
+
/* @__PURE__ */ jsx23(Text16, { size: "sm", fw: 600, c: "dimmed", children: "Filters" }),
|
|
916
1403
|
mobileFilters
|
|
917
1404
|
] }) : null,
|
|
918
|
-
filterDrawer ? /* @__PURE__ */
|
|
919
|
-
activeFilters.length ? /* @__PURE__ */
|
|
920
|
-
|
|
1405
|
+
filterDrawer ? /* @__PURE__ */ jsx23(Box6, { hiddenFrom: "lg", children: filterDrawer }) : null,
|
|
1406
|
+
activeFilters.length ? /* @__PURE__ */ jsx23(Group15, { gap: "xs", wrap: "wrap", children: activeFilters.map((filter) => /* @__PURE__ */ jsx23(
|
|
1407
|
+
Badge12,
|
|
921
1408
|
{
|
|
922
1409
|
variant: "light",
|
|
923
1410
|
color: "violet",
|
|
@@ -933,84 +1420,44 @@ function BrowseSurface({
|
|
|
933
1420
|
] });
|
|
934
1421
|
}
|
|
935
1422
|
|
|
936
|
-
// src/
|
|
937
|
-
import {
|
|
938
|
-
import { jsx as
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
border: "light-dark(var(--mantine-color-violet-2), color-mix(in srgb, var(--mantine-color-violet-4) 75%, transparent))",
|
|
948
|
-
color: "light-dark(var(--mantine-color-violet-9), var(--mantine-color-violet-0))"
|
|
949
|
-
},
|
|
950
|
-
green: {
|
|
951
|
-
bg: "light-dark(var(--mantine-color-green-0), color-mix(in srgb, var(--mantine-color-green-9) 72%, black))",
|
|
952
|
-
border: "light-dark(var(--mantine-color-green-2), color-mix(in srgb, var(--mantine-color-green-4) 78%, transparent))",
|
|
953
|
-
color: "light-dark(var(--mantine-color-green-9), var(--mantine-color-green-0))"
|
|
954
|
-
},
|
|
955
|
-
red: {
|
|
956
|
-
bg: "light-dark(var(--mantine-color-red-0), color-mix(in srgb, var(--mantine-color-red-9) 72%, black))",
|
|
957
|
-
border: "light-dark(var(--mantine-color-red-2), color-mix(in srgb, var(--mantine-color-red-4) 78%, transparent))",
|
|
958
|
-
color: "light-dark(var(--mantine-color-red-9), var(--mantine-color-red-0))"
|
|
959
|
-
},
|
|
960
|
-
amber: {
|
|
961
|
-
bg: "light-dark(var(--mantine-color-yellow-0), color-mix(in srgb, var(--mantine-color-yellow-8) 78%, black))",
|
|
962
|
-
border: "light-dark(var(--mantine-color-yellow-3), color-mix(in srgb, var(--mantine-color-yellow-5) 70%, transparent))",
|
|
963
|
-
color: "light-dark(var(--mantine-color-yellow-9), var(--mantine-color-yellow-0))"
|
|
964
|
-
},
|
|
965
|
-
blue: {
|
|
966
|
-
bg: "light-dark(var(--mantine-color-blue-0), color-mix(in srgb, var(--mantine-color-blue-9) 74%, black))",
|
|
967
|
-
border: "light-dark(var(--mantine-color-blue-2), color-mix(in srgb, var(--mantine-color-blue-4) 75%, transparent))",
|
|
968
|
-
color: "light-dark(var(--mantine-color-blue-9), var(--mantine-color-blue-0))"
|
|
969
|
-
}
|
|
970
|
-
};
|
|
971
|
-
function resolveAccentPanelStyles(tone = "violet", variant = "subtle") {
|
|
972
|
-
const token = toneStyles[tone];
|
|
973
|
-
if (variant === "soft-outline") {
|
|
974
|
-
return {
|
|
975
|
-
backgroundColor: "light-dark(var(--mantine-color-body), color-mix(in srgb, var(--mantine-color-dark-7) 92%, black))",
|
|
976
|
-
border: `1px solid ${token.border}`,
|
|
977
|
-
color: token.color
|
|
978
|
-
};
|
|
979
|
-
}
|
|
980
|
-
return {
|
|
981
|
-
backgroundColor: token.bg,
|
|
982
|
-
border: `1px solid ${token.border}`,
|
|
983
|
-
color: token.color
|
|
984
|
-
};
|
|
985
|
-
}
|
|
986
|
-
function AccentPanel({
|
|
987
|
-
tone = "violet",
|
|
988
|
-
variant = "subtle",
|
|
989
|
-
title,
|
|
990
|
-
badge,
|
|
991
|
-
children
|
|
1423
|
+
// src/DetailProfileShell.tsx
|
|
1424
|
+
import { Divider as Divider2, Paper as Paper5, Stack as Stack19 } from "@mantine/core";
|
|
1425
|
+
import { Fragment as Fragment3, jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1426
|
+
function DetailProfileShell({
|
|
1427
|
+
mode = "page",
|
|
1428
|
+
hero,
|
|
1429
|
+
actions,
|
|
1430
|
+
sections,
|
|
1431
|
+
related,
|
|
1432
|
+
padding = "lg",
|
|
1433
|
+
showDividers = true
|
|
992
1434
|
}) {
|
|
993
|
-
const
|
|
994
|
-
return /* @__PURE__ */
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1435
|
+
const content = sections.filter(Boolean);
|
|
1436
|
+
return /* @__PURE__ */ jsx24(Paper5, { withBorder: mode === "drawer", radius: mode === "drawer" ? "xl" : "md", p: padding, children: /* @__PURE__ */ jsxs19(Stack19, { gap: "lg", children: [
|
|
1437
|
+
hero,
|
|
1438
|
+
actions,
|
|
1439
|
+
content.map((section, index) => /* @__PURE__ */ jsxs19(Stack19, { gap: "lg", children: [
|
|
1440
|
+
index > 0 && showDividers ? /* @__PURE__ */ jsx24(Divider2, {}) : null,
|
|
1441
|
+
section
|
|
1442
|
+
] }, index)),
|
|
1443
|
+
related ? /* @__PURE__ */ jsxs19(Fragment3, { children: [
|
|
1444
|
+
content.length && showDividers ? /* @__PURE__ */ jsx24(Divider2, {}) : null,
|
|
1445
|
+
related
|
|
1446
|
+
] }) : null
|
|
1000
1447
|
] }) });
|
|
1001
1448
|
}
|
|
1002
1449
|
|
|
1003
1450
|
// src/PublicNav.tsx
|
|
1004
|
-
import { Anchor as
|
|
1005
|
-
import { jsx as
|
|
1451
|
+
import { Anchor as Anchor4, Group as Group16 } from "@mantine/core";
|
|
1452
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1006
1453
|
function PublicNav({ items, activeId, renderLink }) {
|
|
1007
|
-
return /* @__PURE__ */
|
|
1454
|
+
return /* @__PURE__ */ jsx25(Group16, { component: "nav", "aria-label": "Primary", gap: "lg", wrap: "nowrap", children: items.map((item) => {
|
|
1008
1455
|
const active = item.id === activeId;
|
|
1009
1456
|
if (renderLink) {
|
|
1010
|
-
return /* @__PURE__ */
|
|
1457
|
+
return /* @__PURE__ */ jsx25("span", { children: renderLink(item, active) }, item.id);
|
|
1011
1458
|
}
|
|
1012
|
-
return /* @__PURE__ */
|
|
1013
|
-
|
|
1459
|
+
return /* @__PURE__ */ jsx25(
|
|
1460
|
+
Anchor4,
|
|
1014
1461
|
{
|
|
1015
1462
|
href: item.href,
|
|
1016
1463
|
"aria-current": active ? "page" : void 0,
|
|
@@ -1027,16 +1474,16 @@ function PublicNav({ items, activeId, renderLink }) {
|
|
|
1027
1474
|
}
|
|
1028
1475
|
|
|
1029
1476
|
// src/PublicShell.tsx
|
|
1030
|
-
import { AppShell, Box as
|
|
1031
|
-
import { jsx as
|
|
1477
|
+
import { AppShell, Box as Box7, Burger, Container, Group as Group17, Stack as Stack20, Text as Text17 } from "@mantine/core";
|
|
1478
|
+
import { jsx as jsx26, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1032
1479
|
function InlineMobileNavigation({
|
|
1033
1480
|
mobileNavigation,
|
|
1034
1481
|
className,
|
|
1035
1482
|
mode
|
|
1036
1483
|
}) {
|
|
1037
|
-
return /* @__PURE__ */
|
|
1038
|
-
/* @__PURE__ */
|
|
1039
|
-
|
|
1484
|
+
return /* @__PURE__ */ jsxs20(Box7, { component: "details", hiddenFrom: "sm", className, children: [
|
|
1485
|
+
/* @__PURE__ */ jsxs20(
|
|
1486
|
+
Box7,
|
|
1040
1487
|
{
|
|
1041
1488
|
component: "summary",
|
|
1042
1489
|
"aria-label": mode === "drawer" ? "Open site navigation drawer" : "Open site navigation",
|
|
@@ -1048,13 +1495,13 @@ function InlineMobileNavigation({
|
|
|
1048
1495
|
gap: "0.5rem"
|
|
1049
1496
|
},
|
|
1050
1497
|
children: [
|
|
1051
|
-
/* @__PURE__ */
|
|
1052
|
-
/* @__PURE__ */
|
|
1498
|
+
/* @__PURE__ */ jsx26(Burger, { opened: false, "aria-hidden": true }),
|
|
1499
|
+
/* @__PURE__ */ jsx26(Text17, { size: "sm", fw: 600, children: "Menu" })
|
|
1053
1500
|
]
|
|
1054
1501
|
}
|
|
1055
1502
|
),
|
|
1056
|
-
/* @__PURE__ */
|
|
1057
|
-
|
|
1503
|
+
/* @__PURE__ */ jsx26(
|
|
1504
|
+
Box7,
|
|
1058
1505
|
{
|
|
1059
1506
|
mt: "sm",
|
|
1060
1507
|
p: "sm",
|
|
@@ -1063,7 +1510,7 @@ function InlineMobileNavigation({
|
|
|
1063
1510
|
border: "1px solid var(--mantine-color-default-border)",
|
|
1064
1511
|
background: mode === "drawer" ? "light-dark(var(--mantine-color-white), color-mix(in srgb, var(--mantine-color-dark-7) 92%, black))" : "var(--mantine-color-body)"
|
|
1065
1512
|
},
|
|
1066
|
-
children: /* @__PURE__ */
|
|
1513
|
+
children: /* @__PURE__ */ jsx26(Stack20, { gap: "sm", children: mobileNavigation })
|
|
1067
1514
|
}
|
|
1068
1515
|
)
|
|
1069
1516
|
] });
|
|
@@ -1084,13 +1531,13 @@ function PublicShell({
|
|
|
1084
1531
|
mobileNavigationMode = "sheet",
|
|
1085
1532
|
classNames
|
|
1086
1533
|
}) {
|
|
1087
|
-
const resolvedNavigation = navigation ?? (navItems ? /* @__PURE__ */
|
|
1534
|
+
const resolvedNavigation = navigation ?? (navItems ? /* @__PURE__ */ jsx26(PublicNav, { items: navItems, activeId: activeNavId }) : null);
|
|
1088
1535
|
const containerSize = maxContentWidth ?? (compact ? "md" : "lg");
|
|
1089
1536
|
const headerHeight = headerVariant === "compact" ? 64 : headerVariant === "branded-quiet" ? 88 : 72;
|
|
1090
1537
|
const mainPadding = headerVariant === "compact" ? "lg" : "xl";
|
|
1091
1538
|
const usesInlineMobileNavigation = Boolean(mobileNavigation) && mobileNavigationMode !== "sheet";
|
|
1092
1539
|
const usesSheetMobileNavigation = Boolean(mobileNavigation) && mobileNavigationMode === "sheet";
|
|
1093
|
-
return /* @__PURE__ */
|
|
1540
|
+
return /* @__PURE__ */ jsxs20(
|
|
1094
1541
|
AppShell,
|
|
1095
1542
|
{
|
|
1096
1543
|
className: classNames?.root,
|
|
@@ -1098,16 +1545,16 @@ function PublicShell({
|
|
|
1098
1545
|
footer: usesSheetMobileNavigation ? { height: 68 } : void 0,
|
|
1099
1546
|
padding: 0,
|
|
1100
1547
|
children: [
|
|
1101
|
-
/* @__PURE__ */
|
|
1102
|
-
|
|
1548
|
+
/* @__PURE__ */ jsx26(AppShell.Header, { withBorder: headerBordered, className: classNames?.header, "data-header-variant": headerVariant, children: /* @__PURE__ */ jsx26(Container, { size: containerSize, h: "100%", py: headerVariant === "branded-quiet" ? "sm" : 0, children: /* @__PURE__ */ jsxs20(
|
|
1549
|
+
Group17,
|
|
1103
1550
|
{
|
|
1104
1551
|
h: "100%",
|
|
1105
1552
|
justify: "space-between",
|
|
1106
1553
|
wrap: "nowrap",
|
|
1107
1554
|
gap: headerVariant === "compact" ? "sm" : "lg",
|
|
1108
1555
|
children: [
|
|
1109
|
-
/* @__PURE__ */
|
|
1110
|
-
usesInlineMobileNavigation ? /* @__PURE__ */
|
|
1556
|
+
/* @__PURE__ */ jsxs20(Group17, { wrap: "nowrap", gap: headerVariant === "compact" ? "xs" : "sm", className: classNames?.brand, children: [
|
|
1557
|
+
usesInlineMobileNavigation ? /* @__PURE__ */ jsx26(
|
|
1111
1558
|
InlineMobileNavigation,
|
|
1112
1559
|
{
|
|
1113
1560
|
mobileNavigation,
|
|
@@ -1115,17 +1562,17 @@ function PublicShell({
|
|
|
1115
1562
|
mode: mobileNavigationMode
|
|
1116
1563
|
}
|
|
1117
1564
|
) : null,
|
|
1118
|
-
/* @__PURE__ */
|
|
1565
|
+
/* @__PURE__ */ jsx26(Box7, { children: brand })
|
|
1119
1566
|
] }),
|
|
1120
|
-
/* @__PURE__ */
|
|
1121
|
-
/* @__PURE__ */
|
|
1567
|
+
/* @__PURE__ */ jsx26(Group17, { visibleFrom: "sm", gap: headerVariant === "compact" ? "md" : "lg", className: classNames?.navigation, children: resolvedNavigation }),
|
|
1568
|
+
/* @__PURE__ */ jsx26(Group17, { gap: "sm", className: classNames?.actions, children: actions })
|
|
1122
1569
|
]
|
|
1123
1570
|
}
|
|
1124
1571
|
) }) }),
|
|
1125
|
-
usesSheetMobileNavigation ? /* @__PURE__ */
|
|
1126
|
-
/* @__PURE__ */
|
|
1127
|
-
/* @__PURE__ */
|
|
1128
|
-
footer ? /* @__PURE__ */
|
|
1572
|
+
usesSheetMobileNavigation ? /* @__PURE__ */ jsx26(AppShell.Footer, { withBorder: true, children: /* @__PURE__ */ jsx26(Container, { size: containerSize, h: "100%", children: /* @__PURE__ */ jsx26(Group17, { h: "100%", justify: "space-around", wrap: "nowrap", children: mobileNavigation }) }) }) : null,
|
|
1573
|
+
/* @__PURE__ */ jsxs20(AppShell.Main, { children: [
|
|
1574
|
+
/* @__PURE__ */ jsx26(Container, { size: containerSize, py: mainPadding, className: classNames?.content, children: /* @__PURE__ */ jsx26(Stack20, { gap: "xl", children }) }),
|
|
1575
|
+
footer ? /* @__PURE__ */ jsx26(Box7, { component: typeof footer === "string" ? "footer" : "div", py: "xl", children: /* @__PURE__ */ jsx26(Container, { size: containerSize, children: typeof footer === "string" ? /* @__PURE__ */ jsx26(Text17, { size: "sm", c: "dimmed", children: footer }) : footer }) }) : null
|
|
1129
1576
|
] })
|
|
1130
1577
|
]
|
|
1131
1578
|
}
|
|
@@ -1133,18 +1580,18 @@ function PublicShell({
|
|
|
1133
1580
|
}
|
|
1134
1581
|
|
|
1135
1582
|
// src/PublicSiteFooter.tsx
|
|
1136
|
-
import { Group as
|
|
1137
|
-
import { jsx as
|
|
1583
|
+
import { Group as Group18, Stack as Stack21, Text as Text18 } from "@mantine/core";
|
|
1584
|
+
import { jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1138
1585
|
function PublicSiteFooter({ children, meta }) {
|
|
1139
|
-
return /* @__PURE__ */
|
|
1140
|
-
children ? /* @__PURE__ */
|
|
1141
|
-
meta ? /* @__PURE__ */
|
|
1586
|
+
return /* @__PURE__ */ jsxs21(Stack21, { component: "footer", gap: "xs", children: [
|
|
1587
|
+
children ? /* @__PURE__ */ jsx27(Text18, { size: "sm", children }) : null,
|
|
1588
|
+
meta ? /* @__PURE__ */ jsx27(Group18, { gap: "sm", children: /* @__PURE__ */ jsx27(Text18, { size: "xs", c: "dimmed", children: meta }) }) : null
|
|
1142
1589
|
] });
|
|
1143
1590
|
}
|
|
1144
1591
|
|
|
1145
1592
|
// src/PublicBrandFooter.tsx
|
|
1146
|
-
import { Box as
|
|
1147
|
-
import { Fragment as
|
|
1593
|
+
import { Box as Box8, Divider as Divider3, Grid, Group as Group19, Paper as Paper6, Stack as Stack22, Text as Text19, Title as Title15 } from "@mantine/core";
|
|
1594
|
+
import { Fragment as Fragment4, jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1148
1595
|
function PublicBrandFooter({
|
|
1149
1596
|
media,
|
|
1150
1597
|
brandTitle,
|
|
@@ -1159,8 +1606,8 @@ function PublicBrandFooter({
|
|
|
1159
1606
|
const mediaSpan = layoutVariant === "immersive-media" ? 5 : 4;
|
|
1160
1607
|
const primarySpan = media ? layoutVariant === "balanced-quote" ? 4 : 4 : secondary ? 6 : 12;
|
|
1161
1608
|
const secondarySpan = media ? Math.max(3, 12 - mediaSpan - primarySpan) : Math.max(4, 12 - primarySpan);
|
|
1162
|
-
return /* @__PURE__ */
|
|
1163
|
-
|
|
1609
|
+
return /* @__PURE__ */ jsx28(
|
|
1610
|
+
Paper6,
|
|
1164
1611
|
{
|
|
1165
1612
|
component: "footer",
|
|
1166
1613
|
withBorder: true,
|
|
@@ -1168,19 +1615,19 @@ function PublicBrandFooter({
|
|
|
1168
1615
|
p: compact ? "lg" : "xl",
|
|
1169
1616
|
className: classNames?.root,
|
|
1170
1617
|
"data-layout-variant": layoutVariant,
|
|
1171
|
-
children: /* @__PURE__ */
|
|
1172
|
-
/* @__PURE__ */
|
|
1173
|
-
media ? /* @__PURE__ */
|
|
1174
|
-
/* @__PURE__ */
|
|
1175
|
-
brandTitle ? /* @__PURE__ */
|
|
1176
|
-
description ? /* @__PURE__ */
|
|
1177
|
-
actions ? /* @__PURE__ */
|
|
1618
|
+
children: /* @__PURE__ */ jsxs22(Stack22, { gap: "lg", children: [
|
|
1619
|
+
/* @__PURE__ */ jsxs22(Grid, { gutter: compact ? "lg" : "xl", align: "flex-start", children: [
|
|
1620
|
+
media ? /* @__PURE__ */ jsx28(Grid.Col, { span: { base: 12, md: mediaSpan }, children: /* @__PURE__ */ jsx28(Box8, { className: classNames?.media, children: media }) }) : null,
|
|
1621
|
+
/* @__PURE__ */ jsx28(Grid.Col, { span: { base: 12, md: primarySpan }, children: /* @__PURE__ */ jsxs22(Stack22, { gap: compact ? "xs" : "sm", className: classNames?.primary, children: [
|
|
1622
|
+
brandTitle ? /* @__PURE__ */ jsx28(Title15, { order: 4, children: brandTitle }) : null,
|
|
1623
|
+
description ? /* @__PURE__ */ jsx28(Text19, { c: "dimmed", children: description }) : null,
|
|
1624
|
+
actions ? /* @__PURE__ */ jsx28(Box8, { children: actions }) : null
|
|
1178
1625
|
] }) }),
|
|
1179
|
-
secondary ? /* @__PURE__ */
|
|
1626
|
+
secondary ? /* @__PURE__ */ jsx28(Grid.Col, { span: { base: 12, md: secondarySpan }, children: /* @__PURE__ */ jsx28(Stack22, { gap: compact ? "xs" : "sm", className: classNames?.secondary, children: secondary }) }) : null
|
|
1180
1627
|
] }),
|
|
1181
|
-
legal ? /* @__PURE__ */
|
|
1182
|
-
/* @__PURE__ */
|
|
1183
|
-
/* @__PURE__ */
|
|
1628
|
+
legal ? /* @__PURE__ */ jsxs22(Fragment4, { children: [
|
|
1629
|
+
/* @__PURE__ */ jsx28(Divider3, {}),
|
|
1630
|
+
/* @__PURE__ */ jsx28(Group19, { justify: "space-between", gap: "sm", wrap: "wrap", className: classNames?.legal, children: typeof legal === "string" ? /* @__PURE__ */ jsx28(Text19, { size: "sm", c: "dimmed", children: legal }) : legal })
|
|
1184
1631
|
] }) : null
|
|
1185
1632
|
] })
|
|
1186
1633
|
}
|
|
@@ -1188,60 +1635,136 @@ function PublicBrandFooter({
|
|
|
1188
1635
|
}
|
|
1189
1636
|
|
|
1190
1637
|
// src/AuthShell.tsx
|
|
1191
|
-
import { Box as
|
|
1192
|
-
import { jsx as
|
|
1193
|
-
function AuthShell({
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1638
|
+
import { Box as Box9, Card as Card8, Container as Container2, Divider as Divider4, Group as Group20, Stack as Stack23, Text as Text20, Title as Title16 } from "@mantine/core";
|
|
1639
|
+
import { jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1640
|
+
function AuthShell({
|
|
1641
|
+
title,
|
|
1642
|
+
description,
|
|
1643
|
+
brand,
|
|
1644
|
+
headerActions,
|
|
1645
|
+
footer,
|
|
1646
|
+
helper,
|
|
1647
|
+
socialAuth,
|
|
1648
|
+
dividerLabel = "Or continue with your account",
|
|
1649
|
+
children
|
|
1650
|
+
}) {
|
|
1651
|
+
return /* @__PURE__ */ jsx29(Box9, { py: { base: "xl", md: "4rem" }, children: /* @__PURE__ */ jsx29(Container2, { size: "xs", children: /* @__PURE__ */ jsxs23(Stack23, { gap: "xl", children: [
|
|
1652
|
+
brand || headerActions ? /* @__PURE__ */ jsxs23(Group20, { justify: brand && headerActions ? "space-between" : "center", align: "center", children: [
|
|
1653
|
+
brand ? /* @__PURE__ */ jsx29(Box9, { children: brand }) : /* @__PURE__ */ jsx29(Box9, {}),
|
|
1654
|
+
headerActions ? /* @__PURE__ */ jsx29(Group20, { gap: "sm", children: headerActions }) : null
|
|
1198
1655
|
] }) : null,
|
|
1199
|
-
/* @__PURE__ */
|
|
1200
|
-
/* @__PURE__ */
|
|
1201
|
-
/* @__PURE__ */
|
|
1202
|
-
description ? /* @__PURE__ */
|
|
1656
|
+
/* @__PURE__ */ jsx29(Card8, { withBorder: true, radius: "lg", padding: "xl", children: /* @__PURE__ */ jsxs23(Stack23, { gap: "lg", children: [
|
|
1657
|
+
/* @__PURE__ */ jsxs23(Stack23, { gap: "xs", ta: "center", children: [
|
|
1658
|
+
/* @__PURE__ */ jsx29(Title16, { order: 2, children: title }),
|
|
1659
|
+
description ? /* @__PURE__ */ jsx29(Text20, { c: "dimmed", size: "sm", children: description }) : null
|
|
1203
1660
|
] }),
|
|
1661
|
+
socialAuth ? /* @__PURE__ */ jsx29(Box9, { children: socialAuth }) : null,
|
|
1662
|
+
socialAuth ? /* @__PURE__ */ jsx29(Divider4, { label: dividerLabel, labelPosition: "center" }) : null,
|
|
1204
1663
|
children,
|
|
1205
|
-
helper ? /* @__PURE__ */
|
|
1664
|
+
helper ? /* @__PURE__ */ jsx29(Text20, { size: "sm", c: "dimmed", ta: "center", children: helper }) : null
|
|
1206
1665
|
] }) }),
|
|
1207
|
-
footer ? /* @__PURE__ */
|
|
1666
|
+
footer ? /* @__PURE__ */ jsx29(Text20, { size: "sm", c: "dimmed", ta: "center", children: footer }) : null
|
|
1208
1667
|
] }) }) });
|
|
1209
1668
|
}
|
|
1210
1669
|
|
|
1670
|
+
// src/SocialAuthButtons.tsx
|
|
1671
|
+
import { Button as Button3, Divider as Divider5, Group as Group21, SimpleGrid as SimpleGrid5, Stack as Stack24, Text as Text21, ThemeIcon as ThemeIcon7 } from "@mantine/core";
|
|
1672
|
+
import { jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1673
|
+
var providerConfig = {
|
|
1674
|
+
google: { label: "Google", mark: "G", color: "red" },
|
|
1675
|
+
apple: { label: "Apple", mark: "A", color: "dark" },
|
|
1676
|
+
github: { label: "GitHub", mark: "GH", color: "gray" },
|
|
1677
|
+
facebook: { label: "Facebook", mark: "F", color: "blue" },
|
|
1678
|
+
microsoft: { label: "Microsoft", mark: "M", color: "cyan" },
|
|
1679
|
+
linkedin: { label: "LinkedIn", mark: "in", color: "blue" },
|
|
1680
|
+
discord: { label: "Discord", mark: "D", color: "indigo" },
|
|
1681
|
+
x: { label: "X", mark: "X", color: "dark" },
|
|
1682
|
+
email: { label: "Email", mark: "@", color: "gray" }
|
|
1683
|
+
};
|
|
1684
|
+
function ProviderMark({ id }) {
|
|
1685
|
+
const config = providerConfig[id] ?? { label: id, mark: id.slice(0, 2).toUpperCase(), color: "gray" };
|
|
1686
|
+
return /* @__PURE__ */ jsx30(ThemeIcon7, { variant: "light", color: config.color, radius: "xl", size: "md", "aria-hidden": "true", children: /* @__PURE__ */ jsx30(Text21, { size: "xs", fw: 700, children: config.mark }) });
|
|
1687
|
+
}
|
|
1688
|
+
function SocialAuthButton({ provider, compact = false }) {
|
|
1689
|
+
const config = providerConfig[provider.id] ?? { label: provider.id, mark: provider.id.slice(0, 2).toUpperCase(), color: "gray" };
|
|
1690
|
+
const label = provider.label ?? `Continue with ${config.label}`;
|
|
1691
|
+
const buttonProps = provider.href ? { component: "a", href: provider.href } : { onClick: provider.onClick };
|
|
1692
|
+
return /* @__PURE__ */ jsx30(
|
|
1693
|
+
Button3,
|
|
1694
|
+
{
|
|
1695
|
+
variant: "default",
|
|
1696
|
+
justify: "space-between",
|
|
1697
|
+
fullWidth: true,
|
|
1698
|
+
size: compact ? "sm" : "md",
|
|
1699
|
+
leftSection: /* @__PURE__ */ jsx30(ProviderMark, { id: provider.id }),
|
|
1700
|
+
disabled: provider.disabled,
|
|
1701
|
+
loading: provider.loading,
|
|
1702
|
+
...buttonProps,
|
|
1703
|
+
children: /* @__PURE__ */ jsxs24(Stack24, { gap: 0, align: "flex-start", children: [
|
|
1704
|
+
/* @__PURE__ */ jsx30(Text21, { inherit: true, children: label }),
|
|
1705
|
+
provider.description ? /* @__PURE__ */ jsx30(Text21, { size: "xs", c: "dimmed", lh: 1.2, children: provider.description }) : null
|
|
1706
|
+
] })
|
|
1707
|
+
}
|
|
1708
|
+
);
|
|
1709
|
+
}
|
|
1710
|
+
function SocialAuthButtons({
|
|
1711
|
+
providers,
|
|
1712
|
+
title = "Continue with a trusted provider",
|
|
1713
|
+
description,
|
|
1714
|
+
layout = "stack",
|
|
1715
|
+
compact = false
|
|
1716
|
+
}) {
|
|
1717
|
+
if (!providers.length) {
|
|
1718
|
+
return null;
|
|
1719
|
+
}
|
|
1720
|
+
const content = providers.map((provider) => /* @__PURE__ */ jsx30(SocialAuthButton, { provider, compact }, provider.id));
|
|
1721
|
+
return /* @__PURE__ */ jsxs24(Stack24, { gap: "md", children: [
|
|
1722
|
+
/* @__PURE__ */ jsxs24(Stack24, { gap: 4, ta: "center", children: [
|
|
1723
|
+
/* @__PURE__ */ jsxs24(Group21, { justify: "center", gap: "xs", children: [
|
|
1724
|
+
/* @__PURE__ */ jsx30(GdsIcons.Login, { size: "1rem" }),
|
|
1725
|
+
/* @__PURE__ */ jsx30(Text21, { fw: 600, children: title })
|
|
1726
|
+
] }),
|
|
1727
|
+
description ? /* @__PURE__ */ jsx30(Text21, { size: "sm", c: "dimmed", children: description }) : null
|
|
1728
|
+
] }),
|
|
1729
|
+
/* @__PURE__ */ jsx30(Divider5, {}),
|
|
1730
|
+
layout === "grid" ? /* @__PURE__ */ jsx30(SimpleGrid5, { cols: { base: 1, sm: 2 }, spacing: "sm", children: content }) : /* @__PURE__ */ jsx30(Stack24, { gap: "sm", children: content })
|
|
1731
|
+
] });
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1211
1734
|
// src/ArticleShell.tsx
|
|
1212
|
-
import { Container as Container3, Group as
|
|
1213
|
-
import { jsx as
|
|
1735
|
+
import { Container as Container3, Group as Group22, Stack as Stack25, Text as Text22, Title as Title17 } from "@mantine/core";
|
|
1736
|
+
import { jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
1214
1737
|
function ArticleShell({ eyebrow, title, lead, meta, sideRail, children }) {
|
|
1215
|
-
return /* @__PURE__ */
|
|
1216
|
-
/* @__PURE__ */
|
|
1217
|
-
/* @__PURE__ */
|
|
1218
|
-
eyebrow ? /* @__PURE__ */
|
|
1219
|
-
/* @__PURE__ */
|
|
1220
|
-
lead ? /* @__PURE__ */
|
|
1221
|
-
meta ? /* @__PURE__ */
|
|
1738
|
+
return /* @__PURE__ */ jsx31(Container3, { size: "lg", py: "xl", children: /* @__PURE__ */ jsxs25(Group22, { align: "flex-start", gap: "xl", wrap: "nowrap", children: [
|
|
1739
|
+
/* @__PURE__ */ jsxs25(Stack25, { gap: "lg", maw: 760, flex: 1, children: [
|
|
1740
|
+
/* @__PURE__ */ jsxs25(Stack25, { gap: "sm", children: [
|
|
1741
|
+
eyebrow ? /* @__PURE__ */ jsx31(Text22, { size: "sm", fw: 700, c: "dimmed", tt: "uppercase", children: eyebrow }) : null,
|
|
1742
|
+
/* @__PURE__ */ jsx31(Title17, { order: 1, children: title }),
|
|
1743
|
+
lead ? /* @__PURE__ */ jsx31(Text22, { size: "lg", c: "dimmed", children: lead }) : null,
|
|
1744
|
+
meta ? /* @__PURE__ */ jsx31(Group22, { gap: "md", children: meta }) : null
|
|
1222
1745
|
] }),
|
|
1223
|
-
/* @__PURE__ */
|
|
1746
|
+
/* @__PURE__ */ jsx31(Stack25, { gap: "md", children })
|
|
1224
1747
|
] }),
|
|
1225
|
-
sideRail ? /* @__PURE__ */
|
|
1748
|
+
sideRail ? /* @__PURE__ */ jsx31(Stack25, { visibleFrom: "lg", gap: "md", w: 240, children: sideRail }) : null
|
|
1226
1749
|
] }) });
|
|
1227
1750
|
}
|
|
1228
1751
|
|
|
1229
1752
|
// src/CtaButtonGroup.tsx
|
|
1230
|
-
import { Group as
|
|
1231
|
-
import { jsx as
|
|
1753
|
+
import { Group as Group23, Stack as Stack26 } from "@mantine/core";
|
|
1754
|
+
import { jsx as jsx32, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
1232
1755
|
function CtaButtonGroup({ primary, secondary, tertiary }) {
|
|
1233
|
-
return /* @__PURE__ */
|
|
1234
|
-
/* @__PURE__ */
|
|
1235
|
-
/* @__PURE__ */
|
|
1236
|
-
secondary ? /* @__PURE__ */
|
|
1756
|
+
return /* @__PURE__ */ jsxs26(Stack26, { gap: "sm", children: [
|
|
1757
|
+
/* @__PURE__ */ jsxs26(Group23, { gap: "sm", align: "stretch", children: [
|
|
1758
|
+
/* @__PURE__ */ jsx32("div", { children: primary }),
|
|
1759
|
+
secondary ? /* @__PURE__ */ jsx32("div", { children: secondary }) : null
|
|
1237
1760
|
] }),
|
|
1238
|
-
tertiary ? /* @__PURE__ */
|
|
1761
|
+
tertiary ? /* @__PURE__ */ jsx32("div", { children: tertiary }) : null
|
|
1239
1762
|
] });
|
|
1240
1763
|
}
|
|
1241
1764
|
|
|
1242
1765
|
// src/DocsPageShell.tsx
|
|
1243
|
-
import { Anchor as
|
|
1244
|
-
import { jsx as
|
|
1766
|
+
import { Anchor as Anchor5, Breadcrumbs, Container as Container4, Group as Group24, Stack as Stack27, Text as Text23, Title as Title18 } from "@mantine/core";
|
|
1767
|
+
import { jsx as jsx33, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
1245
1768
|
function DocsPageShell({
|
|
1246
1769
|
breadcrumbs = [],
|
|
1247
1770
|
title,
|
|
@@ -1252,27 +1775,27 @@ function DocsPageShell({
|
|
|
1252
1775
|
footerNext,
|
|
1253
1776
|
children
|
|
1254
1777
|
}) {
|
|
1255
|
-
return /* @__PURE__ */
|
|
1256
|
-
/* @__PURE__ */
|
|
1257
|
-
breadcrumbs.length ? /* @__PURE__ */
|
|
1258
|
-
(crumb) => crumb.href ? /* @__PURE__ */
|
|
1778
|
+
return /* @__PURE__ */ jsx33(Container4, { size: "lg", py: "xl", children: /* @__PURE__ */ jsxs27(Group24, { align: "flex-start", gap: "xl", wrap: "nowrap", children: [
|
|
1779
|
+
/* @__PURE__ */ jsxs27(Stack27, { component: "article", gap: "lg", maw: 760, flex: 1, children: [
|
|
1780
|
+
breadcrumbs.length ? /* @__PURE__ */ jsx33(Breadcrumbs, { children: breadcrumbs.map(
|
|
1781
|
+
(crumb) => crumb.href ? /* @__PURE__ */ jsx33(Anchor5, { href: crumb.href, children: crumb.label }, `${crumb.label}-${crumb.href}`) : /* @__PURE__ */ jsx33(Text23, { children: crumb.label }, crumb.label)
|
|
1259
1782
|
) }) : null,
|
|
1260
|
-
/* @__PURE__ */
|
|
1261
|
-
eyebrow ? /* @__PURE__ */
|
|
1262
|
-
/* @__PURE__ */
|
|
1263
|
-
lead ? /* @__PURE__ */
|
|
1264
|
-
meta ? /* @__PURE__ */
|
|
1783
|
+
/* @__PURE__ */ jsxs27(Stack27, { gap: "sm", children: [
|
|
1784
|
+
eyebrow ? /* @__PURE__ */ jsx33(Text23, { size: "sm", fw: 700, c: "dimmed", children: eyebrow }) : null,
|
|
1785
|
+
/* @__PURE__ */ jsx33(Title18, { order: 1, children: title }),
|
|
1786
|
+
lead ? /* @__PURE__ */ jsx33(Text23, { size: "lg", c: "dimmed", children: lead }) : null,
|
|
1787
|
+
meta ? /* @__PURE__ */ jsx33(Group24, { gap: "md", children: meta }) : null
|
|
1265
1788
|
] }),
|
|
1266
|
-
/* @__PURE__ */
|
|
1267
|
-
footerNext ? /* @__PURE__ */
|
|
1789
|
+
/* @__PURE__ */ jsx33(Stack27, { gap: "md", children }),
|
|
1790
|
+
footerNext ? /* @__PURE__ */ jsx33(Anchor5, { href: footerNext.href, fw: 600, children: footerNext.label }) : null
|
|
1268
1791
|
] }),
|
|
1269
|
-
sideRail ? /* @__PURE__ */
|
|
1792
|
+
sideRail ? /* @__PURE__ */ jsx33(Stack27, { visibleFrom: "lg", gap: "md", w: 240, children: sideRail }) : null
|
|
1270
1793
|
] }) });
|
|
1271
1794
|
}
|
|
1272
1795
|
|
|
1273
1796
|
// src/EditorialHero.tsx
|
|
1274
|
-
import { Anchor as
|
|
1275
|
-
import { jsx as
|
|
1797
|
+
import { Anchor as Anchor6, AspectRatio as AspectRatio5, Box as Box10, Grid as Grid2, Group as Group25, Paper as Paper7, Skeleton as Skeleton3, Stack as Stack28, Text as Text24, ThemeIcon as ThemeIcon8, Title as Title19 } from "@mantine/core";
|
|
1798
|
+
import { jsx as jsx34, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
1276
1799
|
function resolveActionVariant(action, index, seenPrimary) {
|
|
1277
1800
|
const requested = action.variant ?? (index === 0 ? "primary" : "secondary");
|
|
1278
1801
|
if (requested === "primary" && !seenPrimary) {
|
|
@@ -1284,8 +1807,8 @@ function resolveActionVariant(action, index, seenPrimary) {
|
|
|
1284
1807
|
return { variant: "default", seenPrimary };
|
|
1285
1808
|
}
|
|
1286
1809
|
function HeroAction({ action, variant }) {
|
|
1287
|
-
const content = /* @__PURE__ */
|
|
1288
|
-
|
|
1810
|
+
const content = /* @__PURE__ */ jsx34(
|
|
1811
|
+
Anchor6,
|
|
1289
1812
|
{
|
|
1290
1813
|
href: action.href,
|
|
1291
1814
|
onClick: action.onClick,
|
|
@@ -1309,8 +1832,8 @@ function HeroAction({ action, variant }) {
|
|
|
1309
1832
|
}
|
|
1310
1833
|
);
|
|
1311
1834
|
if (!action.href) {
|
|
1312
|
-
return /* @__PURE__ */
|
|
1313
|
-
|
|
1835
|
+
return /* @__PURE__ */ jsx34(
|
|
1836
|
+
Box10,
|
|
1314
1837
|
{
|
|
1315
1838
|
component: "button",
|
|
1316
1839
|
type: "button",
|
|
@@ -1337,30 +1860,30 @@ function HeroAction({ action, variant }) {
|
|
|
1337
1860
|
return content;
|
|
1338
1861
|
}
|
|
1339
1862
|
function LoadingHero({ compact }) {
|
|
1340
|
-
return /* @__PURE__ */
|
|
1341
|
-
/* @__PURE__ */
|
|
1342
|
-
/* @__PURE__ */
|
|
1343
|
-
/* @__PURE__ */
|
|
1344
|
-
/* @__PURE__ */
|
|
1345
|
-
/* @__PURE__ */
|
|
1346
|
-
/* @__PURE__ */
|
|
1347
|
-
/* @__PURE__ */
|
|
1348
|
-
/* @__PURE__ */
|
|
1863
|
+
return /* @__PURE__ */ jsx34(Paper7, { withBorder: true, radius: "xl", p: compact ? "lg" : "xl", children: /* @__PURE__ */ jsxs28(Grid2, { gutter: compact ? "lg" : "xl", align: "center", children: [
|
|
1864
|
+
/* @__PURE__ */ jsx34(Grid2.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsxs28(Stack28, { gap: "md", children: [
|
|
1865
|
+
/* @__PURE__ */ jsx34(Skeleton3, { height: 16, width: 96, radius: "xl" }),
|
|
1866
|
+
/* @__PURE__ */ jsx34(Skeleton3, { height: 48, width: "90%", radius: "md" }),
|
|
1867
|
+
/* @__PURE__ */ jsx34(Skeleton3, { height: 18, width: "100%", radius: "md" }),
|
|
1868
|
+
/* @__PURE__ */ jsx34(Skeleton3, { height: 18, width: "82%", radius: "md" }),
|
|
1869
|
+
/* @__PURE__ */ jsxs28(Group25, { children: [
|
|
1870
|
+
/* @__PURE__ */ jsx34(Skeleton3, { height: 40, width: 140, radius: "md" }),
|
|
1871
|
+
/* @__PURE__ */ jsx34(Skeleton3, { height: 40, width: 140, radius: "md" })
|
|
1349
1872
|
] })
|
|
1350
1873
|
] }) }),
|
|
1351
|
-
/* @__PURE__ */
|
|
1874
|
+
/* @__PURE__ */ jsx34(Grid2.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx34(AspectRatio5, { ratio: 16 / 11, children: /* @__PURE__ */ jsx34(Skeleton3, { radius: "lg" }) }) })
|
|
1352
1875
|
] }) });
|
|
1353
1876
|
}
|
|
1354
1877
|
function MediaFallback() {
|
|
1355
|
-
return /* @__PURE__ */
|
|
1356
|
-
|
|
1878
|
+
return /* @__PURE__ */ jsx34(AspectRatio5, { ratio: 16 / 11, children: /* @__PURE__ */ jsx34(
|
|
1879
|
+
ThemeIcon8,
|
|
1357
1880
|
{
|
|
1358
1881
|
size: "100%",
|
|
1359
1882
|
radius: "lg",
|
|
1360
1883
|
color: "gray",
|
|
1361
1884
|
variant: "light",
|
|
1362
1885
|
"aria-label": "Hero media is unavailable",
|
|
1363
|
-
children: /* @__PURE__ */
|
|
1886
|
+
children: /* @__PURE__ */ jsx34(GdsIcons.Gallery, { size: "2.5rem" })
|
|
1364
1887
|
}
|
|
1365
1888
|
) });
|
|
1366
1889
|
}
|
|
@@ -1380,8 +1903,8 @@ function MediaFrame({
|
|
|
1380
1903
|
} else if (mediaFade === "soft-start") {
|
|
1381
1904
|
overlayBackground = "linear-gradient(90deg, light-dark(rgba(255,255,255,0.9), rgba(17,24,39,0.72)) 0%, rgba(255,255,255,0) 28%)";
|
|
1382
1905
|
}
|
|
1383
|
-
return /* @__PURE__ */
|
|
1384
|
-
|
|
1906
|
+
return /* @__PURE__ */ jsxs28(
|
|
1907
|
+
Box10,
|
|
1385
1908
|
{
|
|
1386
1909
|
component: "figure",
|
|
1387
1910
|
m: 0,
|
|
@@ -1394,9 +1917,9 @@ function MediaFrame({
|
|
|
1394
1917
|
},
|
|
1395
1918
|
"aria-label": mediaAlt,
|
|
1396
1919
|
children: [
|
|
1397
|
-
media ?? /* @__PURE__ */
|
|
1398
|
-
media && overlayBackground ? /* @__PURE__ */
|
|
1399
|
-
|
|
1920
|
+
media ?? /* @__PURE__ */ jsx34(MediaFallback, {}),
|
|
1921
|
+
media && overlayBackground ? /* @__PURE__ */ jsx34(
|
|
1922
|
+
Box10,
|
|
1400
1923
|
{
|
|
1401
1924
|
"aria-hidden": true,
|
|
1402
1925
|
style: {
|
|
@@ -1429,7 +1952,7 @@ function EditorialHero({
|
|
|
1429
1952
|
classNames
|
|
1430
1953
|
}) {
|
|
1431
1954
|
if (loading) {
|
|
1432
|
-
return /* @__PURE__ */
|
|
1955
|
+
return /* @__PURE__ */ jsx34(LoadingHero, { compact });
|
|
1433
1956
|
}
|
|
1434
1957
|
const stackAlign = align === "center" ? "center" : "flex-start";
|
|
1435
1958
|
const textAlign = align === "center" ? "center" : "left";
|
|
@@ -1437,15 +1960,15 @@ function EditorialHero({
|
|
|
1437
1960
|
const renderedActions = actions.slice(0, 3).map((action, index) => {
|
|
1438
1961
|
const resolved = resolveActionVariant(action, index, seenPrimary);
|
|
1439
1962
|
seenPrimary = resolved.seenPrimary;
|
|
1440
|
-
return /* @__PURE__ */
|
|
1963
|
+
return /* @__PURE__ */ jsx34(HeroAction, { action, variant: resolved.variant }, `${action.label}-${index}`);
|
|
1441
1964
|
});
|
|
1442
|
-
const textSlot = /* @__PURE__ */
|
|
1443
|
-
/* @__PURE__ */
|
|
1444
|
-
eyebrow ? /* @__PURE__ */
|
|
1445
|
-
/* @__PURE__ */
|
|
1446
|
-
description ? /* @__PURE__ */
|
|
1965
|
+
const textSlot = /* @__PURE__ */ jsxs28(Stack28, { gap: compact ? "md" : "lg", justify: "center", h: "100%", className: classNames?.content, children: [
|
|
1966
|
+
/* @__PURE__ */ jsxs28(Stack28, { gap: "sm", align: stackAlign, children: [
|
|
1967
|
+
eyebrow ? /* @__PURE__ */ jsx34(Text24, { size: "sm", fw: 700, c: "dimmed", ta: textAlign, children: eyebrow }) : null,
|
|
1968
|
+
/* @__PURE__ */ jsx34(Title19, { order: 1, maw: 760, ta: textAlign, children: title }),
|
|
1969
|
+
description ? /* @__PURE__ */ jsx34(Text24, { size: compact ? "md" : "lg", c: "dimmed", maw: 720, ta: textAlign, children: description }) : null
|
|
1447
1970
|
] }),
|
|
1448
|
-
renderedActions.length ? /* @__PURE__ */
|
|
1971
|
+
renderedActions.length ? /* @__PURE__ */ jsx34(Box10, { className: classNames?.actions, children: /* @__PURE__ */ jsx34(
|
|
1449
1972
|
CtaButtonGroup,
|
|
1450
1973
|
{
|
|
1451
1974
|
primary: renderedActions[0],
|
|
@@ -1453,8 +1976,8 @@ function EditorialHero({
|
|
|
1453
1976
|
tertiary: renderedActions[2]
|
|
1454
1977
|
}
|
|
1455
1978
|
) }) : null,
|
|
1456
|
-
meta.length ? /* @__PURE__ */
|
|
1457
|
-
|
|
1979
|
+
meta.length ? /* @__PURE__ */ jsx34(Group25, { gap: "sm", wrap: "wrap", "aria-label": "Supporting details", className: classNames?.meta, children: meta.map((item) => /* @__PURE__ */ jsxs28(
|
|
1980
|
+
Group25,
|
|
1458
1981
|
{
|
|
1459
1982
|
gap: 6,
|
|
1460
1983
|
px: "sm",
|
|
@@ -1465,17 +1988,17 @@ function EditorialHero({
|
|
|
1465
1988
|
},
|
|
1466
1989
|
children: [
|
|
1467
1990
|
item.icon,
|
|
1468
|
-
/* @__PURE__ */
|
|
1991
|
+
/* @__PURE__ */ jsx34(Text24, { size: "sm", c: "dimmed", children: item.label })
|
|
1469
1992
|
]
|
|
1470
1993
|
},
|
|
1471
1994
|
item.id
|
|
1472
1995
|
)) }) : null
|
|
1473
1996
|
] });
|
|
1474
|
-
const mediaSlot = error ? /* @__PURE__ */
|
|
1475
|
-
const textCol = /* @__PURE__ */
|
|
1476
|
-
const mediaCol = /* @__PURE__ */
|
|
1477
|
-
return /* @__PURE__ */
|
|
1478
|
-
|
|
1997
|
+
const mediaSlot = error ? /* @__PURE__ */ jsx34(AccentPanel, { tone: "red", variant: "soft-outline", title: "Media unavailable", children: error }) : /* @__PURE__ */ jsx34(MediaFrame, { media, mediaAlt, mediaFade, className: classNames?.media });
|
|
1998
|
+
const textCol = /* @__PURE__ */ jsx34(Grid2.Col, { span: { base: 12, md: 6 }, order: { base: 1, md: mediaPosition === "left" ? 2 : 1 }, children: textSlot });
|
|
1999
|
+
const mediaCol = /* @__PURE__ */ jsx34(Grid2.Col, { span: { base: 12, md: 6 }, order: { base: 2, md: mediaPosition === "left" ? 1 : 2 }, children: mediaSlot });
|
|
2000
|
+
return /* @__PURE__ */ jsx34(
|
|
2001
|
+
Paper7,
|
|
1479
2002
|
{
|
|
1480
2003
|
component: "section",
|
|
1481
2004
|
withBorder: true,
|
|
@@ -1483,7 +2006,7 @@ function EditorialHero({
|
|
|
1483
2006
|
p: compact ? "lg" : "xl",
|
|
1484
2007
|
className: classNames?.root,
|
|
1485
2008
|
style: surfaceVariant === "flat-public" ? { boxShadow: "none" } : void 0,
|
|
1486
|
-
children: /* @__PURE__ */
|
|
2009
|
+
children: /* @__PURE__ */ jsxs28(Grid2, { gutter: compact ? "lg" : "xl", align: "center", children: [
|
|
1487
2010
|
textCol,
|
|
1488
2011
|
mediaCol
|
|
1489
2012
|
] })
|
|
@@ -1492,19 +2015,19 @@ function EditorialHero({
|
|
|
1492
2015
|
}
|
|
1493
2016
|
|
|
1494
2017
|
// src/FeatureBand.tsx
|
|
1495
|
-
import { Box as
|
|
1496
|
-
import { Fragment as
|
|
2018
|
+
import { Box as Box11, Group as Group26, Paper as Paper8, SimpleGrid as SimpleGrid6, Skeleton as Skeleton4, Stack as Stack29, Text as Text25, ThemeIcon as ThemeIcon9, Title as Title20 } from "@mantine/core";
|
|
2019
|
+
import { Fragment as Fragment5, jsx as jsx35, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
1497
2020
|
function FeatureBandSkeleton({
|
|
1498
2021
|
columns = 3,
|
|
1499
2022
|
bordered = true,
|
|
1500
2023
|
variant = "default"
|
|
1501
2024
|
}) {
|
|
1502
|
-
return /* @__PURE__ */
|
|
1503
|
-
/* @__PURE__ */
|
|
1504
|
-
/* @__PURE__ */
|
|
1505
|
-
/* @__PURE__ */
|
|
1506
|
-
/* @__PURE__ */
|
|
1507
|
-
/* @__PURE__ */
|
|
2025
|
+
return /* @__PURE__ */ jsx35(SimpleGrid6, { cols: { base: 1, sm: Math.min(columns, 2), lg: columns }, spacing: "lg", children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */ jsx35(Paper8, { withBorder: bordered, radius: "lg", p: variant === "compact" ? "md" : "lg", children: /* @__PURE__ */ jsxs29(Stack29, { gap: "md", children: [
|
|
2026
|
+
/* @__PURE__ */ jsx35(Skeleton4, { height: variant === "process" ? 28 : 42, width: variant === "process" ? 72 : 42, radius: "xl" }),
|
|
2027
|
+
/* @__PURE__ */ jsxs29(Stack29, { gap: "xs", children: [
|
|
2028
|
+
/* @__PURE__ */ jsx35(Skeleton4, { height: 20, width: "75%", radius: "md" }),
|
|
2029
|
+
/* @__PURE__ */ jsx35(Skeleton4, { height: 14, width: "100%", radius: "md" }),
|
|
2030
|
+
/* @__PURE__ */ jsx35(Skeleton4, { height: 14, width: "82%", radius: "md" })
|
|
1508
2031
|
] })
|
|
1509
2032
|
] }) }, index)) });
|
|
1510
2033
|
}
|
|
@@ -1517,10 +2040,10 @@ function FeatureBand({
|
|
|
1517
2040
|
variant = "default"
|
|
1518
2041
|
}) {
|
|
1519
2042
|
if (loading) {
|
|
1520
|
-
return /* @__PURE__ */
|
|
2043
|
+
return /* @__PURE__ */ jsx35(FeatureBandSkeleton, { columns, bordered, variant });
|
|
1521
2044
|
}
|
|
1522
2045
|
if (!items.length) {
|
|
1523
|
-
return emptyState ? /* @__PURE__ */
|
|
2046
|
+
return emptyState ? /* @__PURE__ */ jsx35(Fragment5, { children: emptyState }) : /* @__PURE__ */ jsx35(
|
|
1524
2047
|
EmptyState,
|
|
1525
2048
|
{
|
|
1526
2049
|
title: "No supporting details available",
|
|
@@ -1528,9 +2051,9 @@ function FeatureBand({
|
|
|
1528
2051
|
}
|
|
1529
2052
|
);
|
|
1530
2053
|
}
|
|
1531
|
-
return /* @__PURE__ */
|
|
1532
|
-
variant === "process" ? /* @__PURE__ */
|
|
1533
|
-
|
|
2054
|
+
return /* @__PURE__ */ jsx35(Box11, { component: "section", "aria-label": "Supporting features", children: /* @__PURE__ */ jsx35(SimpleGrid6, { cols: { base: 1, sm: Math.min(columns, 2), lg: columns }, spacing: "lg", children: items.map((item, index) => /* @__PURE__ */ jsx35(Paper8, { withBorder: bordered, radius: "lg", p: variant === "compact" ? "md" : "lg", children: /* @__PURE__ */ jsxs29(Stack29, { gap: "md", children: [
|
|
2055
|
+
variant === "process" ? /* @__PURE__ */ jsx35(Group26, { children: /* @__PURE__ */ jsx35(
|
|
2056
|
+
Text25,
|
|
1534
2057
|
{
|
|
1535
2058
|
fw: 800,
|
|
1536
2059
|
size: "sm",
|
|
@@ -1542,30 +2065,264 @@ function FeatureBand({
|
|
|
1542
2065
|
},
|
|
1543
2066
|
children: item.stepLabel ?? `Step ${index + 1}`
|
|
1544
2067
|
}
|
|
1545
|
-
) }) : item.media ? item.media : item.icon ? /* @__PURE__ */
|
|
1546
|
-
/* @__PURE__ */
|
|
1547
|
-
/* @__PURE__ */
|
|
1548
|
-
item.description ? /* @__PURE__ */
|
|
1549
|
-
item.meta ? /* @__PURE__ */
|
|
2068
|
+
) }) : item.media ? item.media : item.icon ? /* @__PURE__ */ jsx35(Group26, { children: /* @__PURE__ */ jsx35(ThemeIcon9, { size: "xl", radius: "xl", variant: "light", color: "violet", children: item.icon }) }) : /* @__PURE__ */ jsx35(Group26, { children: /* @__PURE__ */ jsx35(ThemeIcon9, { size: "xl", radius: "xl", variant: "light", color: "gray", "aria-hidden": true, children: /* @__PURE__ */ jsx35(GdsIcons.Info, { size: "1.25rem" }) }) }),
|
|
2069
|
+
/* @__PURE__ */ jsxs29(Stack29, { gap: "xs", children: [
|
|
2070
|
+
/* @__PURE__ */ jsx35(Title20, { order: 4, children: item.title }),
|
|
2071
|
+
item.description ? /* @__PURE__ */ jsx35(Text25, { c: "dimmed", children: item.description }) : null,
|
|
2072
|
+
item.meta ? /* @__PURE__ */ jsx35(Text25, { size: "sm", c: "dimmed", children: item.meta }) : null
|
|
1550
2073
|
] })
|
|
1551
2074
|
] }) }, item.id)) }) });
|
|
1552
2075
|
}
|
|
1553
2076
|
|
|
1554
|
-
// src/
|
|
1555
|
-
import { Box as
|
|
1556
|
-
import { jsx as
|
|
1557
|
-
function
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
2077
|
+
// src/MapPanel.tsx
|
|
2078
|
+
import { AspectRatio as AspectRatio6, Box as Box12, Group as Group27, Paper as Paper9, Stack as Stack30, Text as Text26, Title as Title21 } from "@mantine/core";
|
|
2079
|
+
import { jsx as jsx36, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
2080
|
+
function MapPanel({
|
|
2081
|
+
title,
|
|
2082
|
+
description,
|
|
2083
|
+
actions,
|
|
2084
|
+
loading = false,
|
|
2085
|
+
empty,
|
|
2086
|
+
error,
|
|
2087
|
+
embedTitle,
|
|
2088
|
+
iframeSrc,
|
|
2089
|
+
iframeSandbox = "allow-scripts allow-same-origin allow-popups",
|
|
2090
|
+
renderMap,
|
|
2091
|
+
minHeight = 320
|
|
2092
|
+
}) {
|
|
2093
|
+
let body;
|
|
2094
|
+
if (loading) {
|
|
2095
|
+
body = /* @__PURE__ */ jsx36(
|
|
2096
|
+
StateBlock,
|
|
2097
|
+
{
|
|
2098
|
+
variant: "loading",
|
|
2099
|
+
title: "Loading map",
|
|
2100
|
+
description: "The shared map panel is still preparing the embedded surface.",
|
|
2101
|
+
compact: true
|
|
2102
|
+
}
|
|
2103
|
+
);
|
|
2104
|
+
} else if (error) {
|
|
2105
|
+
body = /* @__PURE__ */ jsx36(StateBlock, { variant: "error", title: "Map unavailable", description: error, compact: true });
|
|
2106
|
+
} else if (!iframeSrc && !renderMap) {
|
|
2107
|
+
body = /* @__PURE__ */ jsx36(
|
|
2108
|
+
StateBlock,
|
|
2109
|
+
{
|
|
2110
|
+
variant: "empty",
|
|
2111
|
+
title: "No map available",
|
|
2112
|
+
description: empty ?? "Add coordinates or a sanctioned embed source to render this panel.",
|
|
2113
|
+
compact: true
|
|
2114
|
+
}
|
|
2115
|
+
);
|
|
2116
|
+
} else if (renderMap) {
|
|
2117
|
+
body = /* @__PURE__ */ jsx36(Box12, { style: { minHeight }, children: renderMap() });
|
|
2118
|
+
} else {
|
|
2119
|
+
body = /* @__PURE__ */ jsx36(AspectRatio6, { ratio: 16 / 9, children: /* @__PURE__ */ jsx36(
|
|
2120
|
+
"iframe",
|
|
2121
|
+
{
|
|
2122
|
+
src: iframeSrc,
|
|
2123
|
+
title: embedTitle ?? "Embedded map",
|
|
2124
|
+
sandbox: iframeSandbox,
|
|
2125
|
+
loading: "lazy",
|
|
2126
|
+
referrerPolicy: "no-referrer-when-downgrade",
|
|
2127
|
+
style: { width: "100%", height: "100%", border: 0, borderRadius: 12 }
|
|
2128
|
+
}
|
|
2129
|
+
) });
|
|
2130
|
+
}
|
|
2131
|
+
return /* @__PURE__ */ jsx36(Paper9, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ jsxs30(Stack30, { gap: "md", children: [
|
|
2132
|
+
/* @__PURE__ */ jsxs30(Group27, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
2133
|
+
/* @__PURE__ */ jsxs30(Stack30, { gap: 4, children: [
|
|
2134
|
+
/* @__PURE__ */ jsx36(Title21, { order: 3, children: title }),
|
|
2135
|
+
description ? /* @__PURE__ */ jsx36(Text26, { size: "sm", c: "dimmed", children: description }) : null
|
|
2136
|
+
] }),
|
|
2137
|
+
actions ? /* @__PURE__ */ jsx36(ActionBar, { ...actions }) : null
|
|
2138
|
+
] }),
|
|
2139
|
+
body
|
|
2140
|
+
] }) });
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
// src/PublicFlowShell.tsx
|
|
2144
|
+
import { Badge as Badge13, Group as Group28, Paper as Paper10, Stack as Stack31, Text as Text27, Title as Title22 } from "@mantine/core";
|
|
2145
|
+
import { jsx as jsx37, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
2146
|
+
var stageTone = {
|
|
2147
|
+
idle: { label: "Idle", color: "gray" },
|
|
2148
|
+
loading: { label: "Loading", color: "blue" },
|
|
2149
|
+
ready: { label: "Ready", color: "teal" },
|
|
2150
|
+
error: { label: "Error", color: "red" },
|
|
2151
|
+
complete: { label: "Complete", color: "teal" }
|
|
2152
|
+
};
|
|
2153
|
+
function toActionBar(actions = []) {
|
|
2154
|
+
if (!actions.length) {
|
|
2155
|
+
return void 0;
|
|
2156
|
+
}
|
|
2157
|
+
const ordered = [...actions].sort((left, right) => {
|
|
2158
|
+
const rank = { primary: 0, secondary: 1, tertiary: 2 };
|
|
2159
|
+
return rank[left.priority] - rank[right.priority];
|
|
2160
|
+
});
|
|
2161
|
+
const primary = ordered.find((action) => action.priority === "primary");
|
|
2162
|
+
const secondary = ordered.filter((action) => action.priority === "secondary");
|
|
2163
|
+
const tertiary = ordered.filter((action) => action.priority === "tertiary");
|
|
2164
|
+
return {
|
|
2165
|
+
primary: primary ? {
|
|
2166
|
+
action: primary.action,
|
|
2167
|
+
disabled: primary.disabled,
|
|
2168
|
+
loading: primary.loading,
|
|
2169
|
+
onClick: primary.onClick
|
|
2170
|
+
} : void 0,
|
|
2171
|
+
secondary: secondary.map((action) => ({
|
|
2172
|
+
action: action.action,
|
|
2173
|
+
disabled: action.disabled,
|
|
2174
|
+
loading: action.loading,
|
|
2175
|
+
onClick: action.onClick
|
|
2176
|
+
})),
|
|
2177
|
+
tertiary: tertiary.map((action) => ({
|
|
2178
|
+
action: action.action,
|
|
2179
|
+
disabled: action.disabled,
|
|
2180
|
+
loading: action.loading,
|
|
2181
|
+
onClick: action.onClick
|
|
2182
|
+
}))
|
|
2183
|
+
};
|
|
2184
|
+
}
|
|
2185
|
+
function PublicFlowShell({
|
|
2186
|
+
stage,
|
|
2187
|
+
eyebrow,
|
|
2188
|
+
exitAction,
|
|
2189
|
+
hardwareSurface,
|
|
2190
|
+
emptyState,
|
|
2191
|
+
errorState
|
|
2192
|
+
}) {
|
|
2193
|
+
const tone = stageTone[stage.status];
|
|
2194
|
+
const actionBar = toActionBar(stage.actions);
|
|
2195
|
+
let body = stage.body;
|
|
2196
|
+
if (stage.status === "loading") {
|
|
2197
|
+
body = /* @__PURE__ */ jsx37(
|
|
2198
|
+
StateBlock,
|
|
2199
|
+
{
|
|
2200
|
+
variant: "loading",
|
|
2201
|
+
title: "Preparing flow",
|
|
2202
|
+
description: stage.description ?? "The current public flow stage is still loading."
|
|
2203
|
+
}
|
|
2204
|
+
);
|
|
2205
|
+
} else if (stage.status === "error") {
|
|
2206
|
+
body = errorState ?? /* @__PURE__ */ jsx37(
|
|
2207
|
+
StateBlock,
|
|
2208
|
+
{
|
|
2209
|
+
variant: "error",
|
|
2210
|
+
title: "Flow unavailable",
|
|
2211
|
+
description: stage.description ?? "This public flow could not continue safely."
|
|
2212
|
+
}
|
|
2213
|
+
);
|
|
2214
|
+
} else if (!stage.body && !hardwareSurface) {
|
|
2215
|
+
body = emptyState ?? /* @__PURE__ */ jsx37(
|
|
2216
|
+
EmptyState,
|
|
2217
|
+
{
|
|
2218
|
+
title: "No stage content available",
|
|
2219
|
+
description: "Add the current flow stage body or a bounded hardware surface to render this contract."
|
|
2220
|
+
}
|
|
2221
|
+
);
|
|
2222
|
+
}
|
|
2223
|
+
return /* @__PURE__ */ jsx37(Paper10, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ jsxs31(Stack31, { gap: "lg", children: [
|
|
2224
|
+
/* @__PURE__ */ jsxs31(Group28, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
2225
|
+
/* @__PURE__ */ jsxs31(Stack31, { gap: 4, children: [
|
|
2226
|
+
eyebrow ? /* @__PURE__ */ jsx37(Text27, { size: "xs", fw: 700, c: "dimmed", tt: "uppercase", children: eyebrow }) : null,
|
|
2227
|
+
/* @__PURE__ */ jsxs31(Group28, { gap: "sm", wrap: "wrap", children: [
|
|
2228
|
+
/* @__PURE__ */ jsx37(Title22, { order: 2, children: stage.title }),
|
|
2229
|
+
/* @__PURE__ */ jsx37(Badge13, { variant: "light", color: tone.color, children: tone.label })
|
|
2230
|
+
] }),
|
|
2231
|
+
stage.description ? /* @__PURE__ */ jsx37(Text27, { size: "sm", c: "dimmed", children: stage.description }) : null
|
|
2232
|
+
] }),
|
|
2233
|
+
exitAction
|
|
2234
|
+
] }),
|
|
2235
|
+
stage.notice ? /* @__PURE__ */ jsx37(Text27, { size: "sm", c: "dimmed", children: stage.notice }) : null,
|
|
2236
|
+
body,
|
|
2237
|
+
hardwareSurface,
|
|
2238
|
+
stage.aside,
|
|
2239
|
+
actionBar ? /* @__PURE__ */ jsx37(ActionBar, { ...actionBar }) : null
|
|
2240
|
+
] }) });
|
|
2241
|
+
}
|
|
2242
|
+
|
|
2243
|
+
// src/PlaybackSurface.tsx
|
|
2244
|
+
import { Badge as Badge14, Group as Group29, Paper as Paper11, Stack as Stack32, Text as Text28, Title as Title23 } from "@mantine/core";
|
|
2245
|
+
import { jsx as jsx38, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
2246
|
+
var stateTone = {
|
|
2247
|
+
loading: { label: "Loading", color: "blue" },
|
|
2248
|
+
ready: { label: "Ready", color: "teal" },
|
|
2249
|
+
playing: { label: "Playing", color: "teal" },
|
|
2250
|
+
empty: { label: "Empty", color: "gray" },
|
|
2251
|
+
error: { label: "Error", color: "red" },
|
|
2252
|
+
degraded: { label: "Degraded", color: "orange" }
|
|
2253
|
+
};
|
|
2254
|
+
function PlaybackSurface({
|
|
2255
|
+
title,
|
|
2256
|
+
state,
|
|
2257
|
+
media,
|
|
2258
|
+
statusMessage,
|
|
2259
|
+
controls,
|
|
2260
|
+
emptyState,
|
|
2261
|
+
errorState,
|
|
2262
|
+
overlays,
|
|
2263
|
+
mode = "embedded"
|
|
2264
|
+
}) {
|
|
2265
|
+
const tone = stateTone[state];
|
|
2266
|
+
let content;
|
|
2267
|
+
if (state === "loading") {
|
|
2268
|
+
content = /* @__PURE__ */ jsx38(
|
|
2269
|
+
StateBlock,
|
|
2270
|
+
{
|
|
2271
|
+
variant: "loading",
|
|
2272
|
+
title: "Loading playback",
|
|
2273
|
+
description: "The playback surface is still preparing timed or fullscreen media."
|
|
2274
|
+
}
|
|
2275
|
+
);
|
|
2276
|
+
} else if (state === "empty") {
|
|
2277
|
+
content = emptyState ?? /* @__PURE__ */ jsx38(
|
|
2278
|
+
EmptyState,
|
|
2279
|
+
{
|
|
2280
|
+
title: "No playback content available",
|
|
2281
|
+
description: "Add media assets or a playlist to render this playback surface."
|
|
2282
|
+
}
|
|
2283
|
+
);
|
|
2284
|
+
} else if (state === "error") {
|
|
2285
|
+
content = errorState ?? /* @__PURE__ */ jsx38(
|
|
2286
|
+
StateBlock,
|
|
2287
|
+
{
|
|
2288
|
+
variant: "error",
|
|
2289
|
+
title: "Playback unavailable",
|
|
2290
|
+
description: "The playback surface could not render the current media safely."
|
|
2291
|
+
}
|
|
2292
|
+
);
|
|
2293
|
+
} else {
|
|
2294
|
+
content = /* @__PURE__ */ jsxs32(Stack32, { gap: "md", children: [
|
|
2295
|
+
media,
|
|
2296
|
+
overlays
|
|
2297
|
+
] });
|
|
2298
|
+
}
|
|
2299
|
+
return /* @__PURE__ */ jsx38(Paper11, { withBorder: true, radius: "xl", p: "lg", "data-playback-mode": mode, children: /* @__PURE__ */ jsxs32(Stack32, { gap: "md", children: [
|
|
2300
|
+
title || statusMessage || controls ? /* @__PURE__ */ jsxs32(Group29, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
2301
|
+
/* @__PURE__ */ jsxs32(Stack32, { gap: 4, children: [
|
|
2302
|
+
title ? /* @__PURE__ */ jsx38(Title23, { order: 3, children: title }) : null,
|
|
2303
|
+
statusMessage ? /* @__PURE__ */ jsx38(Text28, { size: "sm", c: "dimmed", children: statusMessage }) : null
|
|
2304
|
+
] }),
|
|
2305
|
+
/* @__PURE__ */ jsxs32(Group29, { gap: "sm", align: "center", wrap: "wrap", children: [
|
|
2306
|
+
/* @__PURE__ */ jsx38(Badge14, { variant: "light", color: tone.color, children: tone.label }),
|
|
2307
|
+
controls
|
|
2308
|
+
] })
|
|
2309
|
+
] }) : null,
|
|
2310
|
+
state === "degraded" ? /* @__PURE__ */ jsx38(
|
|
2311
|
+
StateBlock,
|
|
2312
|
+
{
|
|
2313
|
+
variant: "info",
|
|
2314
|
+
title: "Playback degraded",
|
|
2315
|
+
description: statusMessage ?? "Playback is continuing with reduced fidelity or recoverable media failures.",
|
|
2316
|
+
compact: true
|
|
2317
|
+
}
|
|
2318
|
+
) : null,
|
|
2319
|
+
content
|
|
1563
2320
|
] }) });
|
|
1564
2321
|
}
|
|
1565
2322
|
|
|
1566
2323
|
// src/MediaField.tsx
|
|
1567
|
-
import { Badge as
|
|
1568
|
-
import { Fragment as
|
|
2324
|
+
import { Badge as Badge15, Button as Button4, Divider as Divider6, Group as Group30, Paper as Paper12, Stack as Stack33, Text as Text29 } from "@mantine/core";
|
|
2325
|
+
import { Fragment as Fragment6, jsx as jsx39, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
1569
2326
|
var stateLabels = {
|
|
1570
2327
|
empty: { label: "Empty", color: "gray" },
|
|
1571
2328
|
selected: { label: "Selected", color: "blue" },
|
|
@@ -1593,32 +2350,32 @@ function MediaField({
|
|
|
1593
2350
|
mode = "stacked"
|
|
1594
2351
|
}) {
|
|
1595
2352
|
const stateBadge = stateLabels[state];
|
|
1596
|
-
const resolvedRemoveAction = removeAction ?? (onRemove ? /* @__PURE__ */
|
|
1597
|
-
const resolvedResetAction = resetAction ?? (onReset ? /* @__PURE__ */
|
|
1598
|
-
return /* @__PURE__ */
|
|
2353
|
+
const resolvedRemoveAction = removeAction ?? (onRemove ? /* @__PURE__ */ jsx39(Button4, { type: "button", variant: "light", color: "red", onClick: onRemove, children: "Remove" }) : null);
|
|
2354
|
+
const resolvedResetAction = resetAction ?? (onReset ? /* @__PURE__ */ jsx39(Button4, { type: "button", variant: "default", onClick: onReset, children: "Reset" }) : null);
|
|
2355
|
+
return /* @__PURE__ */ jsx39(
|
|
1599
2356
|
FormField,
|
|
1600
2357
|
{
|
|
1601
2358
|
label,
|
|
1602
2359
|
description,
|
|
1603
2360
|
error,
|
|
1604
|
-
children: /* @__PURE__ */
|
|
1605
|
-
/* @__PURE__ */
|
|
1606
|
-
/* @__PURE__ */
|
|
2361
|
+
children: /* @__PURE__ */ jsx39(Paper12, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ jsxs33(Stack33, { gap: "md", children: [
|
|
2362
|
+
/* @__PURE__ */ jsx39(Group30, { justify: "flex-end", align: "center", gap: "sm", children: /* @__PURE__ */ jsxs33(Group30, { gap: "xs", justify: "flex-end", children: [
|
|
2363
|
+
/* @__PURE__ */ jsx39(Badge15, { variant: "light", color: stateBadge.color, children: stateBadge.label }),
|
|
1607
2364
|
statusAction
|
|
1608
2365
|
] }) }),
|
|
1609
2366
|
preview ? preview : null,
|
|
1610
|
-
uploadControl || urlInput ? /* @__PURE__ */
|
|
1611
|
-
/* @__PURE__ */
|
|
1612
|
-
/* @__PURE__ */
|
|
2367
|
+
uploadControl || urlInput ? /* @__PURE__ */ jsxs33(Fragment6, { children: [
|
|
2368
|
+
/* @__PURE__ */ jsx39(Divider6, {}),
|
|
2369
|
+
/* @__PURE__ */ jsxs33(Stack33, { gap: "sm", style: mode === "split" ? { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(220px, 1fr))" } : void 0, children: [
|
|
1613
2370
|
uploadControl,
|
|
1614
2371
|
urlInput
|
|
1615
2372
|
] })
|
|
1616
2373
|
] }) : null,
|
|
1617
|
-
value ? /* @__PURE__ */
|
|
1618
|
-
helpText ? /* @__PURE__ */
|
|
1619
|
-
policyText ? /* @__PURE__ */
|
|
2374
|
+
value ? /* @__PURE__ */ jsx39(Text29, { size: "sm", c: "dimmed", style: { wordBreak: "break-all" }, children: value }) : null,
|
|
2375
|
+
helpText ? /* @__PURE__ */ jsx39(Text29, { size: "sm", c: "dimmed", children: helpText }) : null,
|
|
2376
|
+
policyText ? /* @__PURE__ */ jsx39(Text29, { size: "sm", c: error ? "red.7" : "dimmed", children: policyText }) : null,
|
|
1620
2377
|
typeof error !== "string" && error ? error : null,
|
|
1621
|
-
resolvedRemoveAction || resolvedResetAction ? /* @__PURE__ */
|
|
2378
|
+
resolvedRemoveAction || resolvedResetAction ? /* @__PURE__ */ jsxs33(Group30, { gap: "sm", children: [
|
|
1622
2379
|
resolvedResetAction,
|
|
1623
2380
|
retryAction,
|
|
1624
2381
|
resolvedRemoveAction
|
|
@@ -1629,49 +2386,49 @@ function MediaField({
|
|
|
1629
2386
|
}
|
|
1630
2387
|
|
|
1631
2388
|
// src/MediaCard.tsx
|
|
1632
|
-
import { ActionIcon as
|
|
1633
|
-
import { jsx as
|
|
2389
|
+
import { ActionIcon as ActionIcon4, Badge as Badge16, Card as Card9, Group as Group31, Stack as Stack34, Text as Text30, Title as Title24 } from "@mantine/core";
|
|
2390
|
+
import { jsx as jsx40, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
1634
2391
|
function MediaCard({ title, image, description, status, overlay, actions = [] }) {
|
|
1635
2392
|
const EyeIcon = GdsIcons.Eye;
|
|
1636
|
-
return /* @__PURE__ */
|
|
1637
|
-
/* @__PURE__ */
|
|
2393
|
+
return /* @__PURE__ */ jsxs34(Card9, { withBorder: true, radius: "lg", padding: "md", children: [
|
|
2394
|
+
/* @__PURE__ */ jsxs34(Card9.Section, { pos: "relative", children: [
|
|
1638
2395
|
image,
|
|
1639
|
-
overlay ? /* @__PURE__ */
|
|
2396
|
+
overlay ? /* @__PURE__ */ jsx40("div", { style: { position: "absolute", inset: 12, display: "flex", justifyContent: "flex-end", alignItems: "flex-start" }, children: overlay }) : null
|
|
1640
2397
|
] }),
|
|
1641
|
-
/* @__PURE__ */
|
|
1642
|
-
/* @__PURE__ */
|
|
1643
|
-
/* @__PURE__ */
|
|
1644
|
-
/* @__PURE__ */
|
|
1645
|
-
description ? /* @__PURE__ */
|
|
2398
|
+
/* @__PURE__ */ jsxs34(Stack34, { gap: "sm", mt: "md", children: [
|
|
2399
|
+
/* @__PURE__ */ jsxs34(Group31, { justify: "space-between", align: "flex-start", children: [
|
|
2400
|
+
/* @__PURE__ */ jsxs34(Stack34, { gap: 4, children: [
|
|
2401
|
+
/* @__PURE__ */ jsx40(Title24, { order: 4, children: title }),
|
|
2402
|
+
description ? /* @__PURE__ */ jsx40(Text30, { size: "sm", c: "dimmed", lineClamp: 2, children: description }) : null
|
|
1646
2403
|
] }),
|
|
1647
|
-
status ? /* @__PURE__ */
|
|
2404
|
+
status ? /* @__PURE__ */ jsx40(Badge16, { variant: "light", children: status }) : null
|
|
1648
2405
|
] }),
|
|
1649
|
-
actions.length ? /* @__PURE__ */
|
|
2406
|
+
actions.length ? /* @__PURE__ */ jsx40(Group31, { justify: "flex-end", gap: "xs", children: actions.map((action) => /* @__PURE__ */ jsx40(ActionIcon4, { variant: "light", "aria-label": action.label, onClick: action.onClick, children: /* @__PURE__ */ jsx40(EyeIcon, { size: "1rem" }) }, action.label)) }) : null
|
|
1650
2407
|
] })
|
|
1651
2408
|
] });
|
|
1652
2409
|
}
|
|
1653
2410
|
|
|
1654
2411
|
// src/AccessSummary.tsx
|
|
1655
|
-
import { Badge as
|
|
1656
|
-
import { jsx as
|
|
2412
|
+
import { Badge as Badge17, Card as Card10, Group as Group32, Stack as Stack35, Text as Text31, Title as Title25 } from "@mantine/core";
|
|
2413
|
+
import { jsx as jsx41, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
1657
2414
|
function AccessSummary({ title, roles, scope, blocked = false, description }) {
|
|
1658
|
-
return /* @__PURE__ */
|
|
1659
|
-
/* @__PURE__ */
|
|
1660
|
-
/* @__PURE__ */
|
|
1661
|
-
/* @__PURE__ */
|
|
2415
|
+
return /* @__PURE__ */ jsx41(Card10, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ jsxs35(Stack35, { gap: "sm", children: [
|
|
2416
|
+
/* @__PURE__ */ jsxs35(Group32, { justify: "space-between", align: "center", children: [
|
|
2417
|
+
/* @__PURE__ */ jsx41(Title25, { order: 4, children: title }),
|
|
2418
|
+
/* @__PURE__ */ jsx41(Badge17, { color: blocked ? "red" : "teal", variant: "light", children: blocked ? "Blocked" : "Allowed" })
|
|
1662
2419
|
] }),
|
|
1663
|
-
/* @__PURE__ */
|
|
1664
|
-
scope ? /* @__PURE__ */
|
|
2420
|
+
/* @__PURE__ */ jsx41(Group32, { gap: "xs", children: roles.map((role) => /* @__PURE__ */ jsx41(Badge17, { variant: "outline", children: role }, role)) }),
|
|
2421
|
+
scope ? /* @__PURE__ */ jsxs35(Text31, { size: "sm", c: "dimmed", children: [
|
|
1665
2422
|
"Scope: ",
|
|
1666
2423
|
scope
|
|
1667
2424
|
] }) : null,
|
|
1668
|
-
description ? /* @__PURE__ */
|
|
2425
|
+
description ? /* @__PURE__ */ jsx41(Text31, { size: "sm", children: description }) : null
|
|
1669
2426
|
] }) });
|
|
1670
2427
|
}
|
|
1671
2428
|
|
|
1672
2429
|
// src/PageHeader.tsx
|
|
1673
|
-
import { Box as
|
|
1674
|
-
import { jsx as
|
|
2430
|
+
import { Box as Box13, Group as Group33, Stack as Stack36, Text as Text32, Title as Title26 } from "@mantine/core";
|
|
2431
|
+
import { jsx as jsx42, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
1675
2432
|
function PageHeader({
|
|
1676
2433
|
title,
|
|
1677
2434
|
description,
|
|
@@ -1682,19 +2439,19 @@ function PageHeader({
|
|
|
1682
2439
|
}) {
|
|
1683
2440
|
const resolvedDescription = description ?? subtitle;
|
|
1684
2441
|
const eyebrowProps = eyebrowVariant === "ornamental" ? { tt: "uppercase", style: { letterSpacing: "0.12em" } } : {};
|
|
1685
|
-
return /* @__PURE__ */
|
|
1686
|
-
/* @__PURE__ */
|
|
1687
|
-
eyebrow && /* @__PURE__ */
|
|
1688
|
-
/* @__PURE__ */
|
|
1689
|
-
resolvedDescription && /* @__PURE__ */
|
|
2442
|
+
return /* @__PURE__ */ jsxs36(Group33, { justify: "space-between", align: "flex-start", gap: "lg", wrap: "wrap", children: [
|
|
2443
|
+
/* @__PURE__ */ jsxs36(Stack36, { gap: "xs", children: [
|
|
2444
|
+
eyebrow && /* @__PURE__ */ jsx42(Text32, { size: "xs", fw: 700, c: "dimmed", ...eyebrowProps, children: eyebrow }),
|
|
2445
|
+
/* @__PURE__ */ jsx42(Title26, { order: 1, children: title }),
|
|
2446
|
+
resolvedDescription && /* @__PURE__ */ jsx42(Text32, { c: "dimmed", maw: 720, children: resolvedDescription })
|
|
1690
2447
|
] }),
|
|
1691
|
-
actions ? /* @__PURE__ */
|
|
2448
|
+
actions ? /* @__PURE__ */ jsx42(Box13, { children: actions }) : null
|
|
1692
2449
|
] });
|
|
1693
2450
|
}
|
|
1694
2451
|
|
|
1695
2452
|
// src/FilterDrawer.tsx
|
|
1696
|
-
import { Drawer, Group as
|
|
1697
|
-
import { jsx as
|
|
2453
|
+
import { Drawer, Group as Group34, Stack as Stack37, Text as Text33 } from "@mantine/core";
|
|
2454
|
+
import { jsx as jsx43, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
1698
2455
|
function FilterDrawer({
|
|
1699
2456
|
opened,
|
|
1700
2457
|
onClose,
|
|
@@ -1710,7 +2467,7 @@ function FilterDrawer({
|
|
|
1710
2467
|
}) {
|
|
1711
2468
|
const resolvedPrimaryAction = applyAction ?? primaryAction;
|
|
1712
2469
|
const resolvedSecondaryAction = resetAction ?? secondaryAction;
|
|
1713
|
-
return /* @__PURE__ */
|
|
2470
|
+
return /* @__PURE__ */ jsx43(
|
|
1714
2471
|
Drawer,
|
|
1715
2472
|
{
|
|
1716
2473
|
opened,
|
|
@@ -1719,11 +2476,11 @@ function FilterDrawer({
|
|
|
1719
2476
|
position: mode === "bottom-sheet" ? "bottom" : "right",
|
|
1720
2477
|
size: mode === "bottom-sheet" ? "auto" : "md",
|
|
1721
2478
|
radius: mode === "bottom-sheet" ? "xl" : void 0,
|
|
1722
|
-
children: /* @__PURE__ */
|
|
1723
|
-
description ? /* @__PURE__ */
|
|
2479
|
+
children: /* @__PURE__ */ jsxs37(Stack37, { gap: "md", children: [
|
|
2480
|
+
description ? /* @__PURE__ */ jsx43(Text33, { size: "sm", c: "dimmed", children: description }) : null,
|
|
1724
2481
|
children,
|
|
1725
|
-
resolvedPrimaryAction || resolvedSecondaryAction || closeAction ? /* @__PURE__ */
|
|
1726
|
-
/* @__PURE__ */
|
|
2482
|
+
resolvedPrimaryAction || resolvedSecondaryAction || closeAction ? /* @__PURE__ */ jsxs37(Group34, { justify: "space-between", mt: "md", children: [
|
|
2483
|
+
/* @__PURE__ */ jsxs37(Group34, { gap: "sm", children: [
|
|
1727
2484
|
closeAction,
|
|
1728
2485
|
resolvedSecondaryAction
|
|
1729
2486
|
] }),
|
|
@@ -1735,8 +2492,8 @@ function FilterDrawer({
|
|
|
1735
2492
|
}
|
|
1736
2493
|
|
|
1737
2494
|
// src/PlaceholderPanel.tsx
|
|
1738
|
-
import { Badge as
|
|
1739
|
-
import { Fragment as
|
|
2495
|
+
import { Badge as Badge18, Card as Card11, Stack as Stack38, Text as Text34, Title as Title27 } from "@mantine/core";
|
|
2496
|
+
import { Fragment as Fragment7, jsx as jsx44, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
1740
2497
|
function PlaceholderPanel({
|
|
1741
2498
|
title,
|
|
1742
2499
|
description,
|
|
@@ -1746,16 +2503,16 @@ function PlaceholderPanel({
|
|
|
1746
2503
|
mode
|
|
1747
2504
|
}) {
|
|
1748
2505
|
if (mode === "live" && children) {
|
|
1749
|
-
return /* @__PURE__ */
|
|
2506
|
+
return /* @__PURE__ */ jsx44(Fragment7, { children });
|
|
1750
2507
|
}
|
|
1751
|
-
return /* @__PURE__ */
|
|
1752
|
-
badge ? /* @__PURE__ */
|
|
1753
|
-
/* @__PURE__ */
|
|
1754
|
-
/* @__PURE__ */
|
|
1755
|
-
/* @__PURE__ */
|
|
2508
|
+
return /* @__PURE__ */ jsx44(Card11, { children: /* @__PURE__ */ jsxs38(Stack38, { gap: "md", children: [
|
|
2509
|
+
badge ? /* @__PURE__ */ jsx44(Badge18, { variant: "light", color: "blue", w: "fit-content", children: badge }) : null,
|
|
2510
|
+
/* @__PURE__ */ jsxs38(Stack38, { gap: "xs", children: [
|
|
2511
|
+
/* @__PURE__ */ jsx44(Title27, { order: 4, children: title }),
|
|
2512
|
+
/* @__PURE__ */ jsx44(Text34, { c: "dimmed", children: description })
|
|
1756
2513
|
] }),
|
|
1757
|
-
footer ? /* @__PURE__ */
|
|
1758
|
-
/* @__PURE__ */
|
|
2514
|
+
footer ? /* @__PURE__ */ jsx44(Text34, { size: "sm", children: footer }) : null,
|
|
2515
|
+
/* @__PURE__ */ jsx44(
|
|
1759
2516
|
StateBlock,
|
|
1760
2517
|
{
|
|
1761
2518
|
variant: "not-enough-data",
|
|
@@ -1769,7 +2526,7 @@ function PlaceholderPanel({
|
|
|
1769
2526
|
|
|
1770
2527
|
// src/SimpleDataTable.tsx
|
|
1771
2528
|
import { ScrollArea, Table } from "@mantine/core";
|
|
1772
|
-
import { jsx as
|
|
2529
|
+
import { jsx as jsx45, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
1773
2530
|
function SimpleDataTable({
|
|
1774
2531
|
columns,
|
|
1775
2532
|
rows,
|
|
@@ -1780,23 +2537,23 @@ function SimpleDataTable({
|
|
|
1780
2537
|
getRowKey
|
|
1781
2538
|
}) {
|
|
1782
2539
|
if (error) {
|
|
1783
|
-
return /* @__PURE__ */
|
|
2540
|
+
return /* @__PURE__ */ jsx45(StateBlock, { variant: "error", title: "Unable to load data", description: error, compact: true });
|
|
1784
2541
|
}
|
|
1785
2542
|
if (loading) {
|
|
1786
|
-
return /* @__PURE__ */
|
|
2543
|
+
return /* @__PURE__ */ jsx45(StateBlock, { variant: "loading", title: "Loading data", description: "Please wait while the shared dataset is prepared.", compact: true });
|
|
1787
2544
|
}
|
|
1788
2545
|
if (!rows.length) {
|
|
1789
|
-
return /* @__PURE__ */
|
|
2546
|
+
return /* @__PURE__ */ jsx45(StateBlock, { variant: "empty", title: emptyTitle, description: emptyDescription, compact: true });
|
|
1790
2547
|
}
|
|
1791
|
-
return /* @__PURE__ */
|
|
1792
|
-
/* @__PURE__ */
|
|
1793
|
-
/* @__PURE__ */
|
|
2548
|
+
return /* @__PURE__ */ jsx45(ScrollArea, { children: /* @__PURE__ */ jsxs39(Table, { striped: true, highlightOnHover: true, withTableBorder: true, withColumnBorders: true, children: [
|
|
2549
|
+
/* @__PURE__ */ jsx45(Table.Thead, { children: /* @__PURE__ */ jsx45(Table.Tr, { children: columns.map((column) => /* @__PURE__ */ jsx45(Table.Th, { children: column.header }, String(column.key))) }) }),
|
|
2550
|
+
/* @__PURE__ */ jsx45(Table.Tbody, { children: rows.map((row, index) => /* @__PURE__ */ jsx45(Table.Tr, { children: columns.map((column) => /* @__PURE__ */ jsx45(Table.Td, { children: column.render ? column.render(row) : String(row[column.key] ?? "") }, String(column.key))) }, getRowKey ? getRowKey(row, index) : index)) })
|
|
1794
2551
|
] }) });
|
|
1795
2552
|
}
|
|
1796
2553
|
|
|
1797
2554
|
// src/StatsSection.tsx
|
|
1798
|
-
import { Stack as
|
|
1799
|
-
import { jsx as
|
|
2555
|
+
import { Stack as Stack39, Title as Title28 } from "@mantine/core";
|
|
2556
|
+
import { jsx as jsx46, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
1800
2557
|
function StatsSection({
|
|
1801
2558
|
title,
|
|
1802
2559
|
loading = false,
|
|
@@ -1808,11 +2565,11 @@ function StatsSection({
|
|
|
1808
2565
|
}) {
|
|
1809
2566
|
let content = children;
|
|
1810
2567
|
if (error) {
|
|
1811
|
-
content = /* @__PURE__ */
|
|
2568
|
+
content = /* @__PURE__ */ jsx46(StateBlock, { variant: "error", title: "Unable to load statistics", description: error, compact: true });
|
|
1812
2569
|
} else if (loading) {
|
|
1813
|
-
content = /* @__PURE__ */
|
|
2570
|
+
content = /* @__PURE__ */ jsx46(StateBlock, { variant: "loading", title: "Loading statistics", description: "This shared data surface is still synchronizing.", compact: true });
|
|
1814
2571
|
} else if (belowThreshold) {
|
|
1815
|
-
content = /* @__PURE__ */
|
|
2572
|
+
content = /* @__PURE__ */ jsx46(
|
|
1816
2573
|
StateBlock,
|
|
1817
2574
|
{
|
|
1818
2575
|
variant: "not-enough-data",
|
|
@@ -1822,10 +2579,10 @@ function StatsSection({
|
|
|
1822
2579
|
}
|
|
1823
2580
|
);
|
|
1824
2581
|
} else if (placeholder) {
|
|
1825
|
-
content = /* @__PURE__ */
|
|
2582
|
+
content = /* @__PURE__ */ jsx46(PlaceholderPanel, { ...placeholder, mode: "placeholder" });
|
|
1826
2583
|
}
|
|
1827
|
-
return /* @__PURE__ */
|
|
1828
|
-
/* @__PURE__ */
|
|
2584
|
+
return /* @__PURE__ */ jsxs40(Stack39, { gap: "md", children: [
|
|
2585
|
+
/* @__PURE__ */ jsx46(Title28, { order: 3, children: title }),
|
|
1829
2586
|
content
|
|
1830
2587
|
] });
|
|
1831
2588
|
}
|
|
@@ -3138,33 +3895,48 @@ export {
|
|
|
3138
3895
|
EmptyState,
|
|
3139
3896
|
GdsIcons,
|
|
3140
3897
|
GdsVocabulary,
|
|
3898
|
+
createGdsVocabularyPack,
|
|
3899
|
+
mergeGdsVocabularyPacks,
|
|
3900
|
+
resolveSemanticActionConfig,
|
|
3141
3901
|
getSemanticActionConfig,
|
|
3142
3902
|
getSemanticActionLabel,
|
|
3903
|
+
resolveAccentPanelStyles,
|
|
3904
|
+
AccentPanel,
|
|
3905
|
+
ReferenceLocaleNotice,
|
|
3906
|
+
ReferenceLinkGrid,
|
|
3907
|
+
SectionPanel,
|
|
3908
|
+
ReferenceSection,
|
|
3909
|
+
ActionBar,
|
|
3910
|
+
FormField,
|
|
3911
|
+
ListingCard,
|
|
3912
|
+
StateBlock,
|
|
3143
3913
|
ChoiceChip,
|
|
3144
3914
|
MetricCard,
|
|
3145
3915
|
ProgressCard,
|
|
3146
|
-
SectionPanel,
|
|
3147
3916
|
ConsumerSection,
|
|
3148
3917
|
ConsumerDashboardGrid,
|
|
3149
3918
|
EditorialCard,
|
|
3150
3919
|
ProductCard,
|
|
3151
3920
|
PublicProductCard,
|
|
3921
|
+
PublicFoodCard,
|
|
3922
|
+
FoodMenuSection,
|
|
3152
3923
|
DataToolbar,
|
|
3153
|
-
StateBlock,
|
|
3154
3924
|
BrowseSurface,
|
|
3155
|
-
|
|
3156
|
-
AccentPanel,
|
|
3925
|
+
DetailProfileShell,
|
|
3157
3926
|
PublicNav,
|
|
3158
3927
|
PublicShell,
|
|
3159
3928
|
PublicSiteFooter,
|
|
3160
3929
|
PublicBrandFooter,
|
|
3161
3930
|
AuthShell,
|
|
3931
|
+
SocialAuthButtons,
|
|
3162
3932
|
ArticleShell,
|
|
3163
3933
|
CtaButtonGroup,
|
|
3164
3934
|
DocsPageShell,
|
|
3165
3935
|
EditorialHero,
|
|
3166
3936
|
FeatureBand,
|
|
3167
|
-
|
|
3937
|
+
MapPanel,
|
|
3938
|
+
PublicFlowShell,
|
|
3939
|
+
PlaybackSurface,
|
|
3168
3940
|
MediaField,
|
|
3169
3941
|
MediaCard,
|
|
3170
3942
|
AccessSummary,
|