@doneisbetter/gds-core 2.6.3 → 2.6.4
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-BAS4ZGKL.mjs} +1124 -415
- package/dist/{chunk-E3QXLNZO.mjs → chunk-EN3TN22M.mjs} +246 -38
- package/dist/client.d.mts +72 -10
- package/dist/client.d.ts +72 -10
- package/dist/client.js +1402 -468
- package/dist/client.mjs +36 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1402 -468
- package/dist/index.mjs +36 -2
- package/dist/server-BqFksoV3.d.mts +5540 -0
- package/dist/server-BqFksoV3.d.ts +5540 -0
- package/dist/server.d.mts +5 -6074
- package/dist/server.d.ts +5 -6074
- package/dist/server.js +1031 -310
- package/dist/server.mjs +23 -1
- package/package.json +2 -2
|
@@ -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,11 +309,45 @@ 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
|
|
|
@@ -371,34 +398,89 @@ function ChoiceChip({
|
|
|
371
398
|
return /* @__PURE__ */ jsx3(Badge2, { ...sharedProps, children: label });
|
|
372
399
|
}
|
|
373
400
|
|
|
374
|
-
// src/
|
|
375
|
-
import {
|
|
401
|
+
// src/ActionBar.tsx
|
|
402
|
+
import { ActionIcon, Button, Group, Stack as Stack2 } from "@mantine/core";
|
|
376
403
|
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
404
|
+
function renderSemanticAction(action, slot, vocabularyPacks) {
|
|
405
|
+
const { action: actionId, variant, ariaLabel, ...props } = action;
|
|
406
|
+
const fallbackVariant = slot === "primary" ? "filled" : slot === "secondary" ? "default" : "subtle";
|
|
407
|
+
const config = resolveSemanticActionConfig(actionId, vocabularyPacks);
|
|
408
|
+
const Icon = config.icon;
|
|
409
|
+
const label = getSemanticActionLabel(actionId, void 0, vocabularyPacks);
|
|
410
|
+
return /* @__PURE__ */ jsx4(
|
|
411
|
+
Button,
|
|
412
|
+
{
|
|
413
|
+
leftSection: /* @__PURE__ */ jsx4(Icon, { size: "1rem", stroke: 1.75 }),
|
|
414
|
+
"aria-label": ariaLabel ?? label,
|
|
415
|
+
variant: variant ?? fallbackVariant,
|
|
416
|
+
...props,
|
|
417
|
+
children: label
|
|
418
|
+
},
|
|
419
|
+
`${slot}-${actionId}`
|
|
420
|
+
);
|
|
421
|
+
}
|
|
422
|
+
function ActionBar({
|
|
423
|
+
primary,
|
|
424
|
+
secondary = [],
|
|
425
|
+
tertiary = [],
|
|
426
|
+
iconOnly = [],
|
|
427
|
+
gap = "sm",
|
|
428
|
+
vocabularyPacks = []
|
|
429
|
+
}) {
|
|
430
|
+
return /* @__PURE__ */ jsx4(Stack2, { gap, children: /* @__PURE__ */ jsxs2(Group, { justify: "space-between", align: "center", gap, wrap: "wrap", children: [
|
|
431
|
+
/* @__PURE__ */ jsxs2(Group, { gap, wrap: "wrap", children: [
|
|
432
|
+
secondary.map((action) => renderSemanticAction(action, "secondary", vocabularyPacks)),
|
|
433
|
+
tertiary.map((action) => renderSemanticAction(action, "tertiary", vocabularyPacks))
|
|
434
|
+
] }),
|
|
435
|
+
/* @__PURE__ */ jsxs2(Group, { gap, wrap: "wrap", justify: "flex-end", style: { marginInlineStart: "auto" }, children: [
|
|
436
|
+
iconOnly.map(({ action, ariaLabel, ...props }) => {
|
|
437
|
+
const config = resolveSemanticActionConfig(action, vocabularyPacks);
|
|
438
|
+
const Icon = config.icon;
|
|
439
|
+
return /* @__PURE__ */ jsx4(
|
|
440
|
+
ActionIcon,
|
|
441
|
+
{
|
|
442
|
+
variant: "subtle",
|
|
443
|
+
size: "lg",
|
|
444
|
+
"aria-label": ariaLabel ?? getSemanticActionLabel(action, void 0, vocabularyPacks),
|
|
445
|
+
...props,
|
|
446
|
+
children: /* @__PURE__ */ jsx4(Icon, { size: "1rem", stroke: 1.75 })
|
|
447
|
+
},
|
|
448
|
+
`icon-${action}`
|
|
449
|
+
);
|
|
450
|
+
}),
|
|
451
|
+
primary ? renderSemanticAction(primary, "primary", vocabularyPacks) : null
|
|
452
|
+
] })
|
|
453
|
+
] }) });
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
// src/MetricCard.tsx
|
|
457
|
+
import { Badge as Badge3, Card, Group as Group2, Stack as Stack3, Text as Text2, ThemeIcon, Title as Title2 } from "@mantine/core";
|
|
458
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
377
459
|
var trendColors = {
|
|
378
460
|
positive: "teal",
|
|
379
461
|
negative: "red",
|
|
380
462
|
neutral: "gray"
|
|
381
463
|
};
|
|
382
464
|
function MetricCard({ label, value, description, trend, icon, footer }) {
|
|
383
|
-
return /* @__PURE__ */
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
-
/* @__PURE__ */
|
|
386
|
-
/* @__PURE__ */
|
|
387
|
-
/* @__PURE__ */
|
|
465
|
+
return /* @__PURE__ */ jsx5(Card, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ jsxs3(Stack3, { gap: "md", children: [
|
|
466
|
+
/* @__PURE__ */ jsxs3(Group2, { justify: "space-between", align: "flex-start", wrap: "nowrap", children: [
|
|
467
|
+
/* @__PURE__ */ jsxs3(Stack3, { gap: 4, children: [
|
|
468
|
+
/* @__PURE__ */ jsx5(Text2, { size: "sm", c: "dimmed", fw: 600, children: label }),
|
|
469
|
+
/* @__PURE__ */ jsx5(Title2, { order: 3, children: value })
|
|
388
470
|
] }),
|
|
389
|
-
icon ? /* @__PURE__ */
|
|
471
|
+
icon ? /* @__PURE__ */ jsx5(ThemeIcon, { variant: "light", size: "xl", radius: "xl", "aria-hidden": true, children: icon }) : null
|
|
390
472
|
] }),
|
|
391
|
-
description || trend ? /* @__PURE__ */
|
|
392
|
-
description ? /* @__PURE__ */
|
|
393
|
-
trend ? /* @__PURE__ */
|
|
473
|
+
description || trend ? /* @__PURE__ */ jsxs3(Group2, { justify: "space-between", align: "center", gap: "sm", children: [
|
|
474
|
+
description ? /* @__PURE__ */ jsx5(Text2, { size: "sm", c: "dimmed", flex: 1, children: description }) : /* @__PURE__ */ jsx5("span", {}),
|
|
475
|
+
trend ? /* @__PURE__ */ jsx5(Badge3, { color: trendColors[trend.tone ?? "neutral"], variant: "light", children: trend.label }) : null
|
|
394
476
|
] }) : null,
|
|
395
477
|
footer
|
|
396
478
|
] }) });
|
|
397
479
|
}
|
|
398
480
|
|
|
399
481
|
// src/ProgressCard.tsx
|
|
400
|
-
import { Card as Card2, Group as
|
|
401
|
-
import { jsx as
|
|
482
|
+
import { Card as Card2, Group as Group3, Progress, Stack as Stack4, Text as Text3, Title as Title3 } from "@mantine/core";
|
|
483
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
402
484
|
function ProgressCard({
|
|
403
485
|
label,
|
|
404
486
|
value,
|
|
@@ -407,31 +489,31 @@ function ProgressCard({
|
|
|
407
489
|
description,
|
|
408
490
|
action
|
|
409
491
|
}) {
|
|
410
|
-
return /* @__PURE__ */
|
|
411
|
-
/* @__PURE__ */
|
|
412
|
-
/* @__PURE__ */
|
|
413
|
-
/* @__PURE__ */
|
|
414
|
-
/* @__PURE__ */
|
|
492
|
+
return /* @__PURE__ */ jsx6(Card2, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ jsxs4(Stack4, { gap: "md", children: [
|
|
493
|
+
/* @__PURE__ */ jsxs4(Group3, { justify: "space-between", align: "flex-start", children: [
|
|
494
|
+
/* @__PURE__ */ jsxs4(Stack4, { gap: 4, children: [
|
|
495
|
+
/* @__PURE__ */ jsx6(Text3, { size: "sm", c: "dimmed", fw: 600, children: label }),
|
|
496
|
+
/* @__PURE__ */ jsx6(Title3, { order: 3, children: value })
|
|
415
497
|
] }),
|
|
416
498
|
action
|
|
417
499
|
] }),
|
|
418
|
-
description ? /* @__PURE__ */
|
|
419
|
-
/* @__PURE__ */
|
|
420
|
-
/* @__PURE__ */
|
|
421
|
-
/* @__PURE__ */
|
|
422
|
-
/* @__PURE__ */
|
|
500
|
+
description ? /* @__PURE__ */ jsx6(Text3, { size: "sm", c: "dimmed", children: description }) : null,
|
|
501
|
+
/* @__PURE__ */ jsxs4(Stack4, { gap: 6, children: [
|
|
502
|
+
/* @__PURE__ */ jsxs4(Group3, { justify: "space-between", gap: "sm", children: [
|
|
503
|
+
/* @__PURE__ */ jsx6(Text3, { size: "sm", fw: 500, children: progressLabel ?? "Progress" }),
|
|
504
|
+
/* @__PURE__ */ jsxs4(Text3, { size: "sm", c: "dimmed", children: [
|
|
423
505
|
Math.round(progress),
|
|
424
506
|
"%"
|
|
425
507
|
] })
|
|
426
508
|
] }),
|
|
427
|
-
/* @__PURE__ */
|
|
509
|
+
/* @__PURE__ */ jsx6(Progress, { value: progress, radius: "xl", size: "md" })
|
|
428
510
|
] })
|
|
429
511
|
] }) });
|
|
430
512
|
}
|
|
431
513
|
|
|
432
514
|
// src/SectionPanel.tsx
|
|
433
|
-
import { Divider, Group as
|
|
434
|
-
import { Fragment, jsx as
|
|
515
|
+
import { Divider, Group as Group4, Paper, Stack as Stack5, Text as Text4, Title as Title4 } from "@mantine/core";
|
|
516
|
+
import { Fragment, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
435
517
|
var toneBackgrounds = {
|
|
436
518
|
default: "var(--mantine-color-body)",
|
|
437
519
|
supporting: "light-dark(var(--mantine-color-gray-0), color-mix(in srgb, var(--mantine-color-dark-7) 92%, black))",
|
|
@@ -447,23 +529,23 @@ function SectionPanel({
|
|
|
447
529
|
id,
|
|
448
530
|
divided = true
|
|
449
531
|
}) {
|
|
450
|
-
return /* @__PURE__ */
|
|
451
|
-
title || description || action ? /* @__PURE__ */
|
|
452
|
-
/* @__PURE__ */
|
|
453
|
-
title || description ? /* @__PURE__ */
|
|
454
|
-
title ? /* @__PURE__ */
|
|
455
|
-
description ? /* @__PURE__ */
|
|
532
|
+
return /* @__PURE__ */ jsx7(Paper, { id, withBorder: true, radius: "xl", p: "lg", style: { background: toneBackgrounds[tone] }, children: /* @__PURE__ */ jsxs5(Stack5, { gap: "md", children: [
|
|
533
|
+
title || description || action ? /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
534
|
+
/* @__PURE__ */ jsxs5(Group4, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
535
|
+
title || description ? /* @__PURE__ */ jsxs5(Stack5, { gap: 4, children: [
|
|
536
|
+
title ? /* @__PURE__ */ jsx7(Title4, { order: 3, children: title }) : null,
|
|
537
|
+
description ? /* @__PURE__ */ jsx7(Text4, { size: "sm", c: "dimmed", children: description }) : null
|
|
456
538
|
] }) : null,
|
|
457
539
|
action
|
|
458
540
|
] }),
|
|
459
|
-
divided ? /* @__PURE__ */
|
|
541
|
+
divided ? /* @__PURE__ */ jsx7(Divider, {}) : null
|
|
460
542
|
] }) : null,
|
|
461
543
|
children
|
|
462
544
|
] }) });
|
|
463
545
|
}
|
|
464
546
|
|
|
465
547
|
// src/ConsumerSection.tsx
|
|
466
|
-
import { jsx as
|
|
548
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
467
549
|
function ConsumerSection({
|
|
468
550
|
title,
|
|
469
551
|
description,
|
|
@@ -471,22 +553,22 @@ function ConsumerSection({
|
|
|
471
553
|
children,
|
|
472
554
|
tone = "default"
|
|
473
555
|
}) {
|
|
474
|
-
return /* @__PURE__ */
|
|
556
|
+
return /* @__PURE__ */ jsx8(SectionPanel, { title, description, action, tone, children });
|
|
475
557
|
}
|
|
476
558
|
|
|
477
559
|
// src/ConsumerDashboardGrid.tsx
|
|
478
560
|
import { SimpleGrid } from "@mantine/core";
|
|
479
|
-
import { jsx as
|
|
561
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
480
562
|
function ConsumerDashboardGrid({
|
|
481
563
|
children,
|
|
482
564
|
columns = 3
|
|
483
565
|
}) {
|
|
484
|
-
return /* @__PURE__ */
|
|
566
|
+
return /* @__PURE__ */ jsx9(SimpleGrid, { cols: { base: 1, sm: Math.min(columns, 2), lg: columns }, spacing: "lg", children });
|
|
485
567
|
}
|
|
486
568
|
|
|
487
569
|
// src/EditorialCard.tsx
|
|
488
|
-
import { Anchor, AspectRatio, Badge as Badge4, Box as Box2, Card as Card3, Group as
|
|
489
|
-
import { jsx as
|
|
570
|
+
import { Anchor, AspectRatio, Badge as Badge4, Box as Box2, Card as Card3, Group as Group5, Stack as Stack6, Text as Text5, Title as Title5 } from "@mantine/core";
|
|
571
|
+
import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
490
572
|
var tonePalette = {
|
|
491
573
|
default: {
|
|
492
574
|
accent: "violet",
|
|
@@ -506,7 +588,7 @@ var tonePalette = {
|
|
|
506
588
|
}
|
|
507
589
|
};
|
|
508
590
|
function EditorialMediaFallback({ compact }) {
|
|
509
|
-
return /* @__PURE__ */
|
|
591
|
+
return /* @__PURE__ */ jsx10(AspectRatio, { ratio: compact ? 16 / 10 : 4 / 3, children: /* @__PURE__ */ jsx10(
|
|
510
592
|
Box2,
|
|
511
593
|
{
|
|
512
594
|
style: {
|
|
@@ -517,7 +599,7 @@ function EditorialMediaFallback({ compact }) {
|
|
|
517
599
|
background: "var(--mantine-color-gray-0)",
|
|
518
600
|
borderRadius: "var(--mantine-radius-md)"
|
|
519
601
|
},
|
|
520
|
-
children: /* @__PURE__ */
|
|
602
|
+
children: /* @__PURE__ */ jsx10(GdsIcons.Gallery, { size: compact ? "1.5rem" : "2rem" })
|
|
521
603
|
}
|
|
522
604
|
) });
|
|
523
605
|
}
|
|
@@ -540,7 +622,7 @@ function EditorialCard({
|
|
|
540
622
|
const featured = variant === "featured";
|
|
541
623
|
const palette = tonePalette[tone];
|
|
542
624
|
const interactiveProps = href ? { component: "a", href } : onClick ? { component: "button", onClick, type: "button" } : {};
|
|
543
|
-
return /* @__PURE__ */
|
|
625
|
+
return /* @__PURE__ */ jsxs6(
|
|
544
626
|
Card3,
|
|
545
627
|
{
|
|
546
628
|
className: classNames?.root,
|
|
@@ -555,20 +637,20 @@ function EditorialCard({
|
|
|
555
637
|
cursor: href || onClick ? "pointer" : "default"
|
|
556
638
|
},
|
|
557
639
|
children: [
|
|
558
|
-
/* @__PURE__ */
|
|
559
|
-
/* @__PURE__ */
|
|
560
|
-
/* @__PURE__ */
|
|
561
|
-
/* @__PURE__ */
|
|
562
|
-
eyebrow ? /* @__PURE__ */
|
|
563
|
-
/* @__PURE__ */
|
|
640
|
+
/* @__PURE__ */ jsx10(Card3.Section, { className: classNames?.media, children: media ?? /* @__PURE__ */ jsx10(EditorialMediaFallback, { compact }) }),
|
|
641
|
+
/* @__PURE__ */ jsxs6(Stack6, { gap: "md", p: compact ? "md" : "lg", className: classNames?.body, children: [
|
|
642
|
+
/* @__PURE__ */ jsxs6(Group5, { justify: "space-between", align: "flex-start", gap: "sm", wrap: "wrap", children: [
|
|
643
|
+
/* @__PURE__ */ jsxs6(Stack6, { gap: 4, flex: 1, children: [
|
|
644
|
+
eyebrow ? /* @__PURE__ */ jsx10(Text5, { size: "xs", fw: 700, c: "dimmed", children: eyebrow }) : null,
|
|
645
|
+
/* @__PURE__ */ jsx10(Title5, { order: compact ? 4 : 3, className: classNames?.title, children: title })
|
|
564
646
|
] }),
|
|
565
|
-
badge ? typeof badge === "string" ? /* @__PURE__ */
|
|
647
|
+
badge ? typeof badge === "string" ? /* @__PURE__ */ jsx10(Badge4, { color: palette.accent, variant: "light", children: badge }) : badge : null
|
|
566
648
|
] }),
|
|
567
|
-
description ? /* @__PURE__ */
|
|
568
|
-
meta ? /* @__PURE__ */
|
|
569
|
-
href || onClick || ctaLabel ? /* @__PURE__ */
|
|
570
|
-
/* @__PURE__ */
|
|
571
|
-
/* @__PURE__ */
|
|
649
|
+
description ? /* @__PURE__ */ jsx10(Text5, { size: "sm", c: "dimmed", children: description }) : null,
|
|
650
|
+
meta ? /* @__PURE__ */ jsx10(Text5, { size: "sm", c: "dimmed", className: classNames?.meta, children: meta }) : null,
|
|
651
|
+
href || onClick || ctaLabel ? /* @__PURE__ */ jsxs6(Group5, { gap: 6, c: `${palette.accent}.7`, className: classNames?.action, children: [
|
|
652
|
+
/* @__PURE__ */ jsx10(Text5, { fw: 600, size: "sm", children: ctaLabel }),
|
|
653
|
+
/* @__PURE__ */ jsx10(
|
|
572
654
|
Anchor,
|
|
573
655
|
{
|
|
574
656
|
component: "span",
|
|
@@ -586,8 +668,8 @@ function EditorialCard({
|
|
|
586
668
|
}
|
|
587
669
|
|
|
588
670
|
// src/ProductCard.tsx
|
|
589
|
-
import { Badge as Badge5, Card as Card4, Group as
|
|
590
|
-
import { jsx as
|
|
671
|
+
import { Badge as Badge5, Card as Card4, Group as Group6, Menu, Stack as Stack7, Text as Text6, ThemeIcon as ThemeIcon2, Title as Title6, ActionIcon as ActionIcon2 } from "@mantine/core";
|
|
672
|
+
import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
591
673
|
function ProductCard({
|
|
592
674
|
title,
|
|
593
675
|
description,
|
|
@@ -600,39 +682,39 @@ function ProductCard({
|
|
|
600
682
|
footer
|
|
601
683
|
}) {
|
|
602
684
|
const MoreIcon = GdsIcons.Menu;
|
|
603
|
-
return /* @__PURE__ */
|
|
685
|
+
return /* @__PURE__ */ jsx11(Card4, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ jsxs7(Stack7, { gap: "md", children: [
|
|
604
686
|
media,
|
|
605
|
-
/* @__PURE__ */
|
|
606
|
-
/* @__PURE__ */
|
|
607
|
-
icon ? /* @__PURE__ */
|
|
608
|
-
/* @__PURE__ */
|
|
609
|
-
/* @__PURE__ */
|
|
610
|
-
description ? /* @__PURE__ */
|
|
687
|
+
/* @__PURE__ */ jsxs7(Group6, { justify: "space-between", align: "flex-start", wrap: "nowrap", children: [
|
|
688
|
+
/* @__PURE__ */ jsxs7(Group6, { align: "flex-start", gap: "sm", wrap: "nowrap", children: [
|
|
689
|
+
icon ? /* @__PURE__ */ jsx11(ThemeIcon2, { variant: "light", size: "xl", radius: "xl", "aria-hidden": true, children: icon }) : null,
|
|
690
|
+
/* @__PURE__ */ jsxs7(Stack7, { gap: 4, children: [
|
|
691
|
+
/* @__PURE__ */ jsx11(Title6, { order: 4, children: title }),
|
|
692
|
+
description ? /* @__PURE__ */ jsx11(Text6, { size: "sm", c: "dimmed", lineClamp: 3, children: description }) : null
|
|
611
693
|
] })
|
|
612
694
|
] }),
|
|
613
|
-
/* @__PURE__ */
|
|
614
|
-
typeof status === "string" ? /* @__PURE__ */
|
|
615
|
-
secondaryActions.length ? /* @__PURE__ */
|
|
616
|
-
/* @__PURE__ */
|
|
617
|
-
/* @__PURE__ */
|
|
618
|
-
(action) => action.href ? /* @__PURE__ */
|
|
695
|
+
/* @__PURE__ */ jsxs7(Group6, { gap: "xs", align: "center", wrap: "nowrap", children: [
|
|
696
|
+
typeof status === "string" ? /* @__PURE__ */ jsx11(Badge5, { variant: "light", children: status }) : status,
|
|
697
|
+
secondaryActions.length ? /* @__PURE__ */ jsxs7(Menu, { position: "bottom-end", withinPortal: true, children: [
|
|
698
|
+
/* @__PURE__ */ jsx11(Menu.Target, { children: /* @__PURE__ */ jsx11(ActionIcon2, { variant: "subtle", "aria-label": "More actions", children: /* @__PURE__ */ jsx11(MoreIcon, { size: "1rem" }) }) }),
|
|
699
|
+
/* @__PURE__ */ jsx11(Menu.Dropdown, { children: secondaryActions.map(
|
|
700
|
+
(action) => action.href ? /* @__PURE__ */ jsx11(Menu.Item, { component: "a", href: action.href, color: action.color, children: action.label }, action.label) : /* @__PURE__ */ jsx11(Menu.Item, { onClick: action.onClick, color: action.color, children: action.label }, action.label)
|
|
619
701
|
) })
|
|
620
702
|
] }) : null
|
|
621
703
|
] })
|
|
622
704
|
] }),
|
|
623
|
-
metadata.length ? /* @__PURE__ */
|
|
624
|
-
/* @__PURE__ */
|
|
625
|
-
/* @__PURE__ */
|
|
705
|
+
metadata.length ? /* @__PURE__ */ jsx11(Stack7, { gap: 6, children: metadata.map((item) => /* @__PURE__ */ jsxs7(Group6, { justify: "space-between", gap: "sm", children: [
|
|
706
|
+
/* @__PURE__ */ jsx11(Text6, { size: "sm", c: "dimmed", children: item.label }),
|
|
707
|
+
/* @__PURE__ */ jsx11(Text6, { size: "sm", fw: 500, ta: "right", children: item.value })
|
|
626
708
|
] }, item.label)) }) : null,
|
|
627
|
-
primaryAction ? /* @__PURE__ */
|
|
709
|
+
primaryAction ? /* @__PURE__ */ jsx11(Group6, { justify: "space-between", children: primaryAction }) : null,
|
|
628
710
|
footer
|
|
629
711
|
] }) });
|
|
630
712
|
}
|
|
631
713
|
|
|
632
714
|
// src/PublicProductCard.tsx
|
|
633
715
|
import { cloneElement, isValidElement } from "react";
|
|
634
|
-
import { AspectRatio as AspectRatio2, Badge as Badge6, Card as Card5, Group as
|
|
635
|
-
import { jsx as
|
|
716
|
+
import { AspectRatio as AspectRatio2, Badge as Badge6, Card as Card5, Group as Group7, Skeleton, Stack as Stack8, Text as Text7, ThemeIcon as ThemeIcon3, Title as Title7 } from "@mantine/core";
|
|
717
|
+
import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
636
718
|
var stateConfig = {
|
|
637
719
|
available: { label: "Available", color: "teal" },
|
|
638
720
|
limited: { label: "Limited", color: "yellow" },
|
|
@@ -649,7 +731,7 @@ function enhanceAction(action, disabled) {
|
|
|
649
731
|
});
|
|
650
732
|
}
|
|
651
733
|
function ImageFallback({ compact }) {
|
|
652
|
-
return /* @__PURE__ */
|
|
734
|
+
return /* @__PURE__ */ jsx12(AspectRatio2, { ratio: compact ? 16 / 9 : 4 / 3, children: /* @__PURE__ */ jsx12(
|
|
653
735
|
ThemeIcon3,
|
|
654
736
|
{
|
|
655
737
|
size: "100%",
|
|
@@ -657,21 +739,21 @@ function ImageFallback({ compact }) {
|
|
|
657
739
|
variant: "light",
|
|
658
740
|
color: "gray",
|
|
659
741
|
"aria-label": "No product image available",
|
|
660
|
-
children: /* @__PURE__ */
|
|
742
|
+
children: /* @__PURE__ */ jsx12(GdsIcons.Gallery, { size: compact ? "1.5rem" : "2rem" })
|
|
661
743
|
}
|
|
662
744
|
) });
|
|
663
745
|
}
|
|
664
746
|
function LoadingCard({ compact }) {
|
|
665
|
-
return /* @__PURE__ */
|
|
666
|
-
/* @__PURE__ */
|
|
667
|
-
/* @__PURE__ */
|
|
668
|
-
/* @__PURE__ */
|
|
669
|
-
/* @__PURE__ */
|
|
670
|
-
/* @__PURE__ */
|
|
747
|
+
return /* @__PURE__ */ jsx12(Card5, { withBorder: true, radius: "lg", padding: compact ? "md" : "lg", children: /* @__PURE__ */ jsxs8(Stack8, { gap: "md", children: [
|
|
748
|
+
/* @__PURE__ */ jsx12(AspectRatio2, { ratio: compact ? 16 / 9 : 4 / 3, children: /* @__PURE__ */ jsx12(Skeleton, { radius: "md" }) }),
|
|
749
|
+
/* @__PURE__ */ jsxs8(Stack8, { gap: "xs", children: [
|
|
750
|
+
/* @__PURE__ */ jsx12(Skeleton, { height: 20, radius: "sm", width: "70%" }),
|
|
751
|
+
/* @__PURE__ */ jsx12(Skeleton, { height: 14, radius: "sm", width: "100%" }),
|
|
752
|
+
/* @__PURE__ */ jsx12(Skeleton, { height: 14, radius: "sm", width: "85%" })
|
|
671
753
|
] }),
|
|
672
|
-
/* @__PURE__ */
|
|
673
|
-
/* @__PURE__ */
|
|
674
|
-
/* @__PURE__ */
|
|
754
|
+
/* @__PURE__ */ jsxs8(Group7, { justify: "space-between", align: "center", children: [
|
|
755
|
+
/* @__PURE__ */ jsx12(Skeleton, { height: 18, radius: "sm", width: 72 }),
|
|
756
|
+
/* @__PURE__ */ jsx12(Skeleton, { height: 36, radius: "md", width: 120 })
|
|
675
757
|
] })
|
|
676
758
|
] }) });
|
|
677
759
|
}
|
|
@@ -694,7 +776,7 @@ function PublicProductCard({
|
|
|
694
776
|
disabled = false
|
|
695
777
|
}) {
|
|
696
778
|
if (loading) {
|
|
697
|
-
return /* @__PURE__ */
|
|
779
|
+
return /* @__PURE__ */ jsx12(LoadingCard, { compact });
|
|
698
780
|
}
|
|
699
781
|
const isActionDisabled = disabled || state === "sold-out";
|
|
700
782
|
const resolvedPrimaryAction = enhanceAction(primaryAction, isActionDisabled);
|
|
@@ -707,43 +789,309 @@ function PublicProductCard({
|
|
|
707
789
|
const pickupHelper = helperKind === "pickup" ? helperText : pickupNote;
|
|
708
790
|
const inventoryHelper = helperKind === "inventory" ? helperText : inventoryNote;
|
|
709
791
|
const hasSupportingRegion = Boolean(price || supportingHelper || pickupHelper || inventoryHelper);
|
|
710
|
-
return /* @__PURE__ */
|
|
711
|
-
image ?? /* @__PURE__ */
|
|
712
|
-
/* @__PURE__ */
|
|
713
|
-
/* @__PURE__ */
|
|
714
|
-
/* @__PURE__ */
|
|
715
|
-
description ? /* @__PURE__ */
|
|
792
|
+
return /* @__PURE__ */ jsx12(Card5, { withBorder: true, radius: "lg", padding: compact ? "md" : "lg", children: /* @__PURE__ */ jsxs8(Stack8, { gap: compact ? "sm" : "md", children: [
|
|
793
|
+
image ?? /* @__PURE__ */ jsx12(ImageFallback, { compact }),
|
|
794
|
+
/* @__PURE__ */ jsxs8(Group7, { justify: "space-between", align: "flex-start", wrap: "nowrap", gap: "sm", children: [
|
|
795
|
+
/* @__PURE__ */ jsxs8(Stack8, { gap: 4, style: { minWidth: 0, flex: 1 }, children: [
|
|
796
|
+
/* @__PURE__ */ jsx12(Title7, { order: compact ? 5 : 4, lineClamp: 2, children: title }),
|
|
797
|
+
description ? /* @__PURE__ */ jsx12(Text7, { size: "sm", c: "dimmed", lineClamp: compact ? 2 : 3, children: description }) : null
|
|
716
798
|
] }),
|
|
717
|
-
/* @__PURE__ */
|
|
799
|
+
/* @__PURE__ */ jsx12(Badge6, { variant: "light", color: stateBadge.color, children: stateBadge.label })
|
|
718
800
|
] }),
|
|
719
|
-
hasSupportingRegion ? /* @__PURE__ */
|
|
720
|
-
/* @__PURE__ */
|
|
721
|
-
price ? /* @__PURE__ */
|
|
722
|
-
supportingHelper ? /* @__PURE__ */
|
|
801
|
+
hasSupportingRegion ? /* @__PURE__ */ jsxs8(Group7, { justify: "space-between", align: "flex-end", gap: "sm", wrap: "nowrap", children: [
|
|
802
|
+
/* @__PURE__ */ jsxs8(Stack8, { gap: 2, style: { minWidth: 0, flex: 1 }, children: [
|
|
803
|
+
price ? /* @__PURE__ */ jsx12(Text7, { fw: 700, size: compact ? "md" : "lg", children: price }) : null,
|
|
804
|
+
supportingHelper ? /* @__PURE__ */ jsx12(Text7, { size: "xs", c: "dimmed", children: supportingHelper }) : null
|
|
723
805
|
] }),
|
|
724
806
|
resolvedPrimaryAction
|
|
725
|
-
] }) : resolvedPrimaryAction ? /* @__PURE__ */
|
|
726
|
-
pickupHelper || inventoryHelper || metadata.length ? /* @__PURE__ */
|
|
727
|
-
pickupHelper ? /* @__PURE__ */
|
|
728
|
-
/* @__PURE__ */
|
|
729
|
-
/* @__PURE__ */
|
|
807
|
+
] }) : resolvedPrimaryAction ? /* @__PURE__ */ jsx12(Group7, { justify: "flex-end", children: resolvedPrimaryAction }) : null,
|
|
808
|
+
pickupHelper || inventoryHelper || metadata.length ? /* @__PURE__ */ jsxs8(Stack8, { gap: 6, children: [
|
|
809
|
+
pickupHelper ? /* @__PURE__ */ jsxs8(Group7, { justify: "space-between", gap: "sm", children: [
|
|
810
|
+
/* @__PURE__ */ jsx12(Text7, { size: "sm", c: "dimmed", children: "Pickup" }),
|
|
811
|
+
/* @__PURE__ */ jsx12(Text7, { size: "sm", fw: 500, ta: "right", children: pickupHelper })
|
|
730
812
|
] }) : null,
|
|
731
|
-
inventoryHelper ? /* @__PURE__ */
|
|
732
|
-
/* @__PURE__ */
|
|
733
|
-
/* @__PURE__ */
|
|
813
|
+
inventoryHelper ? /* @__PURE__ */ jsxs8(Group7, { justify: "space-between", gap: "sm", children: [
|
|
814
|
+
/* @__PURE__ */ jsx12(Text7, { size: "sm", c: "dimmed", children: "Availability" }),
|
|
815
|
+
/* @__PURE__ */ jsx12(Text7, { size: "sm", fw: 500, ta: "right", children: inventoryHelper })
|
|
734
816
|
] }) : null,
|
|
735
|
-
metadata.map((item) => /* @__PURE__ */
|
|
736
|
-
/* @__PURE__ */
|
|
737
|
-
/* @__PURE__ */
|
|
817
|
+
metadata.map((item) => /* @__PURE__ */ jsxs8(Group7, { justify: "space-between", gap: "sm", children: [
|
|
818
|
+
/* @__PURE__ */ jsx12(Text7, { size: "sm", c: "dimmed", children: item.label }),
|
|
819
|
+
/* @__PURE__ */ jsx12(Text7, { size: "sm", fw: 500, ta: "right", children: item.value })
|
|
738
820
|
] }, item.label))
|
|
739
821
|
] }) : null,
|
|
740
|
-
resolvedSecondaryAction ? /* @__PURE__ */
|
|
822
|
+
resolvedSecondaryAction ? /* @__PURE__ */ jsx12(Group7, { justify: "flex-end", children: resolvedSecondaryAction }) : null
|
|
823
|
+
] }) });
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
// src/PublicFoodCard.tsx
|
|
827
|
+
import { cloneElement as cloneElement2, isValidElement as isValidElement2 } from "react";
|
|
828
|
+
import { AspectRatio as AspectRatio3, Badge as Badge7, Card as Card6, Group as Group8, Skeleton as Skeleton2, Stack as Stack9, Text as Text8, ThemeIcon as ThemeIcon4, Title as Title8 } from "@mantine/core";
|
|
829
|
+
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
830
|
+
var ratioMap = {
|
|
831
|
+
square: 1,
|
|
832
|
+
dish: 4 / 3,
|
|
833
|
+
landscape: 16 / 9
|
|
834
|
+
};
|
|
835
|
+
var stateConfig2 = {
|
|
836
|
+
available: { label: "Available", color: "teal" },
|
|
837
|
+
preorder: { label: "Preorder", color: "violet" },
|
|
838
|
+
limited: { label: "Limited batch", color: "yellow" },
|
|
839
|
+
"sold-out": { label: "Sold out", color: "red" },
|
|
840
|
+
"coming-soon": { label: "Coming soon", color: "gray" }
|
|
841
|
+
};
|
|
842
|
+
var markerToneMap = {
|
|
843
|
+
default: "gray",
|
|
844
|
+
positive: "teal",
|
|
845
|
+
warning: "orange",
|
|
846
|
+
muted: "dark"
|
|
847
|
+
};
|
|
848
|
+
function enhanceAction2(action, disabled) {
|
|
849
|
+
if (!isValidElement2(action)) {
|
|
850
|
+
return action;
|
|
851
|
+
}
|
|
852
|
+
return cloneElement2(action, {
|
|
853
|
+
disabled: disabled || Boolean(action.props.disabled),
|
|
854
|
+
"aria-disabled": disabled || void 0
|
|
855
|
+
});
|
|
856
|
+
}
|
|
857
|
+
function FoodImageFallback({ mediaRatio }) {
|
|
858
|
+
return /* @__PURE__ */ jsx13(AspectRatio3, { ratio: ratioMap[mediaRatio], children: /* @__PURE__ */ jsx13(ThemeIcon4, { size: "100%", radius: "md", variant: "light", color: "gray", "aria-label": "No food image available", children: /* @__PURE__ */ jsx13(GdsIcons.Gallery, { size: "2rem" }) }) });
|
|
859
|
+
}
|
|
860
|
+
function LoadingFoodCard({ mediaRatio }) {
|
|
861
|
+
return /* @__PURE__ */ jsx13(Card6, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ jsxs9(Stack9, { gap: "md", children: [
|
|
862
|
+
/* @__PURE__ */ jsx13(AspectRatio3, { ratio: ratioMap[mediaRatio], children: /* @__PURE__ */ jsx13(Skeleton2, { radius: "md" }) }),
|
|
863
|
+
/* @__PURE__ */ jsxs9(Stack9, { gap: "xs", children: [
|
|
864
|
+
/* @__PURE__ */ jsx13(Skeleton2, { height: 20, radius: "sm", width: "72%" }),
|
|
865
|
+
/* @__PURE__ */ jsx13(Skeleton2, { height: 14, radius: "sm", width: "96%" }),
|
|
866
|
+
/* @__PURE__ */ jsx13(Skeleton2, { height: 14, radius: "sm", width: "78%" })
|
|
867
|
+
] }),
|
|
868
|
+
/* @__PURE__ */ jsxs9(Group8, { justify: "space-between", align: "center", children: [
|
|
869
|
+
/* @__PURE__ */ jsx13(Skeleton2, { height: 18, radius: "sm", width: 96 }),
|
|
870
|
+
/* @__PURE__ */ jsx13(Skeleton2, { height: 36, radius: "md", width: 112 })
|
|
871
|
+
] })
|
|
872
|
+
] }) });
|
|
873
|
+
}
|
|
874
|
+
function PublicFoodCard({
|
|
875
|
+
title,
|
|
876
|
+
description,
|
|
877
|
+
image,
|
|
878
|
+
price,
|
|
879
|
+
priceNote,
|
|
880
|
+
state,
|
|
881
|
+
helperText,
|
|
882
|
+
pickupNote,
|
|
883
|
+
freshnessNote,
|
|
884
|
+
markers = [],
|
|
885
|
+
metadata = [],
|
|
886
|
+
primaryAction,
|
|
887
|
+
secondaryAction,
|
|
888
|
+
quantityHint,
|
|
889
|
+
mediaRatio = "dish",
|
|
890
|
+
loading = false,
|
|
891
|
+
disabled = false
|
|
892
|
+
}) {
|
|
893
|
+
if (loading) {
|
|
894
|
+
return /* @__PURE__ */ jsx13(LoadingFoodCard, { mediaRatio });
|
|
895
|
+
}
|
|
896
|
+
const stateBadge = stateConfig2[state];
|
|
897
|
+
const isActionDisabled = disabled || state === "sold-out" || state === "coming-soon";
|
|
898
|
+
const resolvedPrimaryAction = enhanceAction2(primaryAction, isActionDisabled);
|
|
899
|
+
const resolvedSecondaryAction = enhanceAction2(secondaryAction, disabled);
|
|
900
|
+
return /* @__PURE__ */ jsx13(Card6, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ jsxs9(Stack9, { gap: "md", children: [
|
|
901
|
+
image ?? /* @__PURE__ */ jsx13(FoodImageFallback, { mediaRatio }),
|
|
902
|
+
markers.length > 0 || quantityHint ? /* @__PURE__ */ jsxs9(Group8, { justify: "space-between", align: "center", wrap: "wrap", gap: "xs", children: [
|
|
903
|
+
/* @__PURE__ */ jsx13(Group8, { gap: "xs", wrap: "wrap", children: markers.map((marker) => /* @__PURE__ */ jsx13(Badge7, { variant: "light", color: markerToneMap[marker.tone ?? "default"], children: marker.label }, marker.id)) }),
|
|
904
|
+
quantityHint ? /* @__PURE__ */ jsx13(Text8, { size: "xs", fw: 600, c: "dimmed", children: quantityHint }) : null
|
|
905
|
+
] }) : null,
|
|
906
|
+
/* @__PURE__ */ jsxs9(Group8, { justify: "space-between", align: "flex-start", gap: "sm", wrap: "nowrap", children: [
|
|
907
|
+
/* @__PURE__ */ jsxs9(Stack9, { gap: 4, style: { minWidth: 0, flex: 1 }, children: [
|
|
908
|
+
/* @__PURE__ */ jsx13(Title8, { order: 4, lineClamp: 2, children: title }),
|
|
909
|
+
description ? /* @__PURE__ */ jsx13(Text8, { size: "sm", c: "dimmed", lineClamp: 3, children: description }) : null
|
|
910
|
+
] }),
|
|
911
|
+
/* @__PURE__ */ jsx13(Badge7, { variant: "light", color: stateBadge.color, children: stateBadge.label })
|
|
912
|
+
] }),
|
|
913
|
+
/* @__PURE__ */ jsxs9(Group8, { justify: "space-between", align: "flex-end", gap: "sm", wrap: "nowrap", children: [
|
|
914
|
+
/* @__PURE__ */ jsxs9(Stack9, { gap: 2, style: { minWidth: 0, flex: 1 }, children: [
|
|
915
|
+
price ? /* @__PURE__ */ jsx13(Text8, { fw: 800, size: "lg", children: price }) : null,
|
|
916
|
+
priceNote ? /* @__PURE__ */ jsx13(Text8, { size: "xs", c: "dimmed", children: priceNote }) : null,
|
|
917
|
+
helperText ? /* @__PURE__ */ jsx13(Text8, { size: "sm", c: "dimmed", children: helperText }) : null
|
|
918
|
+
] }),
|
|
919
|
+
resolvedPrimaryAction
|
|
920
|
+
] }),
|
|
921
|
+
pickupNote || freshnessNote || metadata.length > 0 ? /* @__PURE__ */ jsxs9(Stack9, { gap: 6, children: [
|
|
922
|
+
pickupNote ? /* @__PURE__ */ jsxs9(Group8, { justify: "space-between", align: "flex-start", gap: "sm", children: [
|
|
923
|
+
/* @__PURE__ */ jsx13(Text8, { size: "sm", c: "dimmed", children: "Pickup" }),
|
|
924
|
+
/* @__PURE__ */ jsx13(Text8, { size: "sm", fw: 500, ta: "right", children: pickupNote })
|
|
925
|
+
] }) : null,
|
|
926
|
+
freshnessNote ? /* @__PURE__ */ jsxs9(Group8, { justify: "space-between", align: "flex-start", gap: "sm", children: [
|
|
927
|
+
/* @__PURE__ */ jsx13(Text8, { size: "sm", c: "dimmed", children: "Freshness" }),
|
|
928
|
+
/* @__PURE__ */ jsx13(Text8, { size: "sm", fw: 500, ta: "right", children: freshnessNote })
|
|
929
|
+
] }) : null,
|
|
930
|
+
metadata.map((item) => /* @__PURE__ */ jsx13(Group8, { justify: "space-between", align: "flex-start", gap: "sm", children: /* @__PURE__ */ jsxs9(Group8, { gap: "xs", wrap: "nowrap", children: [
|
|
931
|
+
item.icon,
|
|
932
|
+
/* @__PURE__ */ jsx13(Text8, { size: "sm", c: "dimmed", children: item.label })
|
|
933
|
+
] }) }, item.id))
|
|
934
|
+
] }) : null,
|
|
935
|
+
resolvedSecondaryAction ? /* @__PURE__ */ jsx13(Group8, { justify: "flex-end", children: resolvedSecondaryAction }) : null
|
|
936
|
+
] }) });
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
// src/FoodMenuSection.tsx
|
|
940
|
+
import { Box as Box3, Group as Group9, SimpleGrid as SimpleGrid2, Stack as Stack10, Text as Text9, Title as Title9 } from "@mantine/core";
|
|
941
|
+
import { Fragment as Fragment2, jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
942
|
+
function FoodMenuSection({
|
|
943
|
+
title,
|
|
944
|
+
description,
|
|
945
|
+
eyebrow,
|
|
946
|
+
categories,
|
|
947
|
+
sectionNote,
|
|
948
|
+
action,
|
|
949
|
+
emptyState,
|
|
950
|
+
columns = 3,
|
|
951
|
+
showEmptyCategories = false
|
|
952
|
+
}) {
|
|
953
|
+
const normalizedCategories = (categories ?? []).filter(Boolean);
|
|
954
|
+
const visibleCategories = showEmptyCategories ? normalizedCategories : normalizedCategories.filter((category) => category.items.length > 0);
|
|
955
|
+
if (!visibleCategories.length) {
|
|
956
|
+
return emptyState ? /* @__PURE__ */ jsx14(Fragment2, { children: emptyState }) : /* @__PURE__ */ jsx14(
|
|
957
|
+
EmptyState,
|
|
958
|
+
{
|
|
959
|
+
title: "No active menu available",
|
|
960
|
+
description: "Publish grouped menu categories here when the current weekly or seasonal menu is ready."
|
|
961
|
+
}
|
|
962
|
+
);
|
|
963
|
+
}
|
|
964
|
+
return /* @__PURE__ */ jsx14(Box3, { component: "section", "aria-label": typeof title === "string" ? title : "Food menu section", children: /* @__PURE__ */ jsxs10(Stack10, { gap: "xl", children: [
|
|
965
|
+
/* @__PURE__ */ jsxs10(Group9, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
966
|
+
/* @__PURE__ */ jsxs10(Stack10, { gap: 4, children: [
|
|
967
|
+
eyebrow ? /* @__PURE__ */ jsx14(Text9, { size: "xs", fw: 700, c: "dimmed", tt: "uppercase", children: eyebrow }) : null,
|
|
968
|
+
/* @__PURE__ */ jsx14(Title9, { order: 2, children: title }),
|
|
969
|
+
description ? /* @__PURE__ */ jsx14(Text9, { size: "sm", c: "dimmed", maw: 760, children: description }) : null,
|
|
970
|
+
sectionNote ? /* @__PURE__ */ jsx14(Text9, { size: "sm", c: "dimmed", children: sectionNote }) : null
|
|
971
|
+
] }),
|
|
972
|
+
action
|
|
973
|
+
] }),
|
|
974
|
+
/* @__PURE__ */ jsx14(Stack10, { gap: "xl", children: visibleCategories.map((category) => /* @__PURE__ */ jsxs10(Stack10, { gap: "md", children: [
|
|
975
|
+
/* @__PURE__ */ jsxs10(Stack10, { gap: 4, children: [
|
|
976
|
+
/* @__PURE__ */ jsx14(Title9, { order: 3, children: category.title }),
|
|
977
|
+
category.description ? /* @__PURE__ */ jsx14(Text9, { size: "sm", c: "dimmed", children: category.description }) : null,
|
|
978
|
+
category.helperNote ? /* @__PURE__ */ jsx14(Text9, { size: "sm", c: "dimmed", children: category.helperNote }) : null
|
|
979
|
+
] }),
|
|
980
|
+
category.items.length ? /* @__PURE__ */ jsx14(SimpleGrid2, { cols: { base: 1, sm: Math.min(columns, 2), lg: columns }, spacing: "lg", children: category.items.map((item) => /* @__PURE__ */ jsx14(PublicFoodCard, { ...item }, item.id)) }) : /* @__PURE__ */ jsx14(
|
|
981
|
+
EmptyState,
|
|
982
|
+
{
|
|
983
|
+
title: "No items in this category",
|
|
984
|
+
description: "This category is defined, but it does not currently have any visible dishes or bundles."
|
|
985
|
+
}
|
|
986
|
+
)
|
|
987
|
+
] }, category.id)) })
|
|
988
|
+
] }) });
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
// src/ListingCard.tsx
|
|
992
|
+
import { ActionIcon as ActionIcon3, AspectRatio as AspectRatio4, Badge as Badge8, Card as Card7, Group as Group10, Stack as Stack11, Text as Text10, ThemeIcon as ThemeIcon5, Title as Title10 } from "@mantine/core";
|
|
993
|
+
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
994
|
+
var ratioMap2 = {
|
|
995
|
+
"1:1": 1,
|
|
996
|
+
"4:3": 4 / 3,
|
|
997
|
+
"16:9": 16 / 9
|
|
998
|
+
};
|
|
999
|
+
var toneColorMap = {
|
|
1000
|
+
default: void 0,
|
|
1001
|
+
positive: "teal",
|
|
1002
|
+
warning: "orange",
|
|
1003
|
+
muted: "gray"
|
|
1004
|
+
};
|
|
1005
|
+
function ListingImageFallback({ mediaRatio }) {
|
|
1006
|
+
return /* @__PURE__ */ jsx15(AspectRatio4, { ratio: ratioMap2[mediaRatio], children: /* @__PURE__ */ jsx15(
|
|
1007
|
+
ThemeIcon5,
|
|
1008
|
+
{
|
|
1009
|
+
size: "100%",
|
|
1010
|
+
radius: "md",
|
|
1011
|
+
variant: "light",
|
|
1012
|
+
color: "gray",
|
|
1013
|
+
"aria-label": "No listing image available",
|
|
1014
|
+
children: /* @__PURE__ */ jsx15(GdsIcons.Gallery, { size: "2rem" })
|
|
1015
|
+
}
|
|
1016
|
+
) });
|
|
1017
|
+
}
|
|
1018
|
+
function ListingAffordance({ affordance }) {
|
|
1019
|
+
const config = GdsVocabulary[affordance.action];
|
|
1020
|
+
const Icon = config.icon;
|
|
1021
|
+
const label = affordance.ariaLabel ?? getSemanticActionLabel(affordance.action);
|
|
1022
|
+
if (affordance.href) {
|
|
1023
|
+
return /* @__PURE__ */ jsx15(
|
|
1024
|
+
ActionIcon3,
|
|
1025
|
+
{
|
|
1026
|
+
component: "a",
|
|
1027
|
+
href: affordance.href,
|
|
1028
|
+
variant: "subtle",
|
|
1029
|
+
size: "lg",
|
|
1030
|
+
"aria-label": label,
|
|
1031
|
+
disabled: affordance.disabled,
|
|
1032
|
+
children: /* @__PURE__ */ jsx15(Icon, { size: "1rem", stroke: 1.75 })
|
|
1033
|
+
}
|
|
1034
|
+
);
|
|
1035
|
+
}
|
|
1036
|
+
return /* @__PURE__ */ jsx15(
|
|
1037
|
+
ActionIcon3,
|
|
1038
|
+
{
|
|
1039
|
+
variant: "subtle",
|
|
1040
|
+
size: "lg",
|
|
1041
|
+
"aria-label": label,
|
|
1042
|
+
onClick: affordance.onClick,
|
|
1043
|
+
disabled: affordance.disabled,
|
|
1044
|
+
children: /* @__PURE__ */ jsx15(Icon, { size: "1rem", stroke: 1.75 })
|
|
1045
|
+
}
|
|
1046
|
+
);
|
|
1047
|
+
}
|
|
1048
|
+
function ListingCard({
|
|
1049
|
+
title,
|
|
1050
|
+
href,
|
|
1051
|
+
description,
|
|
1052
|
+
image,
|
|
1053
|
+
mediaRatio = "4:3",
|
|
1054
|
+
metadata = [],
|
|
1055
|
+
featured = false,
|
|
1056
|
+
sponsoredDisclosure,
|
|
1057
|
+
price,
|
|
1058
|
+
primaryAction,
|
|
1059
|
+
saveAction,
|
|
1060
|
+
shareAction,
|
|
1061
|
+
compact = false
|
|
1062
|
+
}) {
|
|
1063
|
+
const titleContent = href && typeof title === "string" ? /* @__PURE__ */ jsx15(Text10, { component: "a", href, inherit: true, td: "none", children: title }) : title;
|
|
1064
|
+
return /* @__PURE__ */ jsx15(Card7, { withBorder: true, radius: "lg", padding: compact ? "md" : "lg", children: /* @__PURE__ */ jsxs11(Stack11, { gap: compact ? "sm" : "md", children: [
|
|
1065
|
+
image ?? /* @__PURE__ */ jsx15(ListingImageFallback, { mediaRatio }),
|
|
1066
|
+
featured || sponsoredDisclosure ? /* @__PURE__ */ jsxs11(Group10, { justify: "space-between", gap: "sm", wrap: "wrap", children: [
|
|
1067
|
+
featured ? /* @__PURE__ */ jsx15(Badge8, { variant: "light", color: "violet", children: "Featured" }) : /* @__PURE__ */ jsx15("span", {}),
|
|
1068
|
+
sponsoredDisclosure ? /* @__PURE__ */ jsx15(Text10, { size: "xs", c: "dimmed", children: sponsoredDisclosure }) : null
|
|
1069
|
+
] }) : null,
|
|
1070
|
+
/* @__PURE__ */ jsxs11(Stack11, { gap: 4, children: [
|
|
1071
|
+
/* @__PURE__ */ jsx15(Title10, { order: compact ? 5 : 4, lineClamp: 2, children: titleContent }),
|
|
1072
|
+
description ? /* @__PURE__ */ jsx15(Text10, { size: "sm", c: "dimmed", lineClamp: compact ? 2 : 3, children: description }) : null
|
|
1073
|
+
] }),
|
|
1074
|
+
metadata.length ? /* @__PURE__ */ jsx15(Stack11, { gap: "xs", children: metadata.map((item) => /* @__PURE__ */ jsxs11(Group10, { justify: "space-between", align: "flex-start", gap: "sm", wrap: "nowrap", children: [
|
|
1075
|
+
/* @__PURE__ */ jsxs11(Group10, { gap: "xs", wrap: "nowrap", style: { minWidth: 0, flex: 1 }, children: [
|
|
1076
|
+
item.icon,
|
|
1077
|
+
/* @__PURE__ */ jsx15(Text10, { size: "sm", c: item.tone ? toneColorMap[item.tone] : "dimmed", lineClamp: 1, children: item.label })
|
|
1078
|
+
] }),
|
|
1079
|
+
item.value ? /* @__PURE__ */ jsx15(Text10, { size: "sm", fw: 500, ta: "right", children: item.value }) : null
|
|
1080
|
+
] }, item.id)) }) : null,
|
|
1081
|
+
/* @__PURE__ */ jsxs11(Group10, { justify: "space-between", align: "center", gap: "sm", wrap: "wrap", children: [
|
|
1082
|
+
/* @__PURE__ */ jsx15(Stack11, { gap: 2, style: { minWidth: 0, flex: 1 }, children: price ? /* @__PURE__ */ jsx15(Text10, { fw: 700, size: compact ? "md" : "lg", children: price }) : null }),
|
|
1083
|
+
/* @__PURE__ */ jsxs11(Group10, { gap: "xs", wrap: "nowrap", justify: "flex-end", style: { marginInlineStart: "auto" }, children: [
|
|
1084
|
+
saveAction ? /* @__PURE__ */ jsx15(ListingAffordance, { affordance: saveAction }) : null,
|
|
1085
|
+
shareAction ? /* @__PURE__ */ jsx15(ListingAffordance, { affordance: shareAction }) : null,
|
|
1086
|
+
primaryAction
|
|
1087
|
+
] })
|
|
1088
|
+
] })
|
|
741
1089
|
] }) });
|
|
742
1090
|
}
|
|
743
1091
|
|
|
744
1092
|
// src/DataToolbar.tsx
|
|
745
|
-
import { Badge as
|
|
746
|
-
import { jsx as
|
|
1093
|
+
import { Badge as Badge9, Group as Group11, Stack as Stack12 } from "@mantine/core";
|
|
1094
|
+
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
747
1095
|
function DataToolbar({
|
|
748
1096
|
searchSlot,
|
|
749
1097
|
filterSlot,
|
|
@@ -752,20 +1100,20 @@ function DataToolbar({
|
|
|
752
1100
|
createAction,
|
|
753
1101
|
activeFilters = []
|
|
754
1102
|
}) {
|
|
755
|
-
return /* @__PURE__ */
|
|
756
|
-
/* @__PURE__ */
|
|
757
|
-
/* @__PURE__ */
|
|
1103
|
+
return /* @__PURE__ */ jsxs12(Stack12, { gap: "sm", children: [
|
|
1104
|
+
/* @__PURE__ */ jsxs12(Group11, { justify: "space-between", align: "flex-start", gap: "sm", children: [
|
|
1105
|
+
/* @__PURE__ */ jsxs12(Group11, { flex: 1, align: "flex-start", gap: "sm", children: [
|
|
758
1106
|
searchSlot,
|
|
759
1107
|
filterSlot,
|
|
760
1108
|
sortSlot
|
|
761
1109
|
] }),
|
|
762
|
-
/* @__PURE__ */
|
|
1110
|
+
/* @__PURE__ */ jsxs12(Group11, { gap: "sm", children: [
|
|
763
1111
|
resetAction,
|
|
764
1112
|
createAction
|
|
765
1113
|
] })
|
|
766
1114
|
] }),
|
|
767
|
-
activeFilters.length ? /* @__PURE__ */
|
|
768
|
-
|
|
1115
|
+
activeFilters.length ? /* @__PURE__ */ jsx16(Group11, { gap: "xs", children: activeFilters.map((filter) => /* @__PURE__ */ jsx16(
|
|
1116
|
+
Badge9,
|
|
769
1117
|
{
|
|
770
1118
|
variant: "light",
|
|
771
1119
|
rightSection: filter.onRemove ? "\xD7" : void 0,
|
|
@@ -779,17 +1127,17 @@ function DataToolbar({
|
|
|
779
1127
|
}
|
|
780
1128
|
|
|
781
1129
|
// src/StateBlock.tsx
|
|
782
|
-
import { Loader, Stack as
|
|
783
|
-
import { jsx as
|
|
1130
|
+
import { Loader, Stack as Stack13, Text as Text11, ThemeIcon as ThemeIcon6, Title as Title11 } from "@mantine/core";
|
|
1131
|
+
import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
784
1132
|
var variantConfig = {
|
|
785
|
-
loading: { color: "violet", icon: /* @__PURE__ */
|
|
786
|
-
empty: { color: "gray", icon: /* @__PURE__ */
|
|
787
|
-
error: { color: "red", icon: /* @__PURE__ */
|
|
788
|
-
permission: { color: "orange", icon: /* @__PURE__ */
|
|
789
|
-
disabled: { color: "gray", icon: /* @__PURE__ */
|
|
790
|
-
success: { color: "teal", icon: /* @__PURE__ */
|
|
791
|
-
info: { color: "blue", icon: /* @__PURE__ */
|
|
792
|
-
"not-enough-data": { color: "yellow", icon: /* @__PURE__ */
|
|
1133
|
+
loading: { color: "violet", icon: /* @__PURE__ */ jsx17(Loader, { size: "sm" }) },
|
|
1134
|
+
empty: { color: "gray", icon: /* @__PURE__ */ jsx17(GdsIcons.Inbox, { size: "1.1rem" }) },
|
|
1135
|
+
error: { color: "red", icon: /* @__PURE__ */ jsx17(GdsIcons.Danger, { size: "1.1rem" }) },
|
|
1136
|
+
permission: { color: "orange", icon: /* @__PURE__ */ jsx17(GdsIcons.Verify, { size: "1.1rem" }) },
|
|
1137
|
+
disabled: { color: "gray", icon: /* @__PURE__ */ jsx17(GdsIcons.Toggle, { size: "1.1rem" }) },
|
|
1138
|
+
success: { color: "teal", icon: /* @__PURE__ */ jsx17(GdsIcons.Success, { size: "1.1rem" }) },
|
|
1139
|
+
info: { color: "blue", icon: /* @__PURE__ */ jsx17(GdsIcons.Info, { size: "1.1rem" }) },
|
|
1140
|
+
"not-enough-data": { color: "yellow", icon: /* @__PURE__ */ jsx17(GdsIcons.Analytics, { size: "1.1rem" }) }
|
|
793
1141
|
};
|
|
794
1142
|
function StateBlock({
|
|
795
1143
|
variant,
|
|
@@ -800,8 +1148,8 @@ function StateBlock({
|
|
|
800
1148
|
compact = false
|
|
801
1149
|
}) {
|
|
802
1150
|
const config = variantConfig[variant];
|
|
803
|
-
return /* @__PURE__ */
|
|
804
|
-
|
|
1151
|
+
return /* @__PURE__ */ jsxs13(
|
|
1152
|
+
Stack13,
|
|
805
1153
|
{
|
|
806
1154
|
align: compact ? "flex-start" : "center",
|
|
807
1155
|
justify: "center",
|
|
@@ -809,10 +1157,10 @@ function StateBlock({
|
|
|
809
1157
|
py: compact ? "md" : "xl",
|
|
810
1158
|
ta: compact ? "left" : "center",
|
|
811
1159
|
children: [
|
|
812
|
-
/* @__PURE__ */
|
|
813
|
-
/* @__PURE__ */
|
|
814
|
-
/* @__PURE__ */
|
|
815
|
-
description ? /* @__PURE__ */
|
|
1160
|
+
/* @__PURE__ */ jsx17(ThemeIcon6, { variant: "light", color: config.color, size: compact ? "lg" : "xl", radius: "xl", children: icon ?? config.icon }),
|
|
1161
|
+
/* @__PURE__ */ jsxs13(Stack13, { gap: 6, align: compact ? "flex-start" : "center", children: [
|
|
1162
|
+
/* @__PURE__ */ jsx17(Title11, { order: compact ? 4 : 3, children: title }),
|
|
1163
|
+
description ? /* @__PURE__ */ jsx17(Text11, { c: "dimmed", maw: compact ? void 0 : 480, children: description }) : null
|
|
816
1164
|
] }),
|
|
817
1165
|
action
|
|
818
1166
|
]
|
|
@@ -821,8 +1169,8 @@ function StateBlock({
|
|
|
821
1169
|
}
|
|
822
1170
|
|
|
823
1171
|
// src/BrowseSurface.tsx
|
|
824
|
-
import { Badge as
|
|
825
|
-
import { jsx as
|
|
1172
|
+
import { Badge as Badge10, Box as Box4, Button as Button2, Group as Group12, Paper as Paper2, SimpleGrid as SimpleGrid3, Stack as Stack14, Text as Text12, Title as Title12 } from "@mantine/core";
|
|
1173
|
+
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
826
1174
|
function BrowseSurface({
|
|
827
1175
|
eyebrow,
|
|
828
1176
|
title,
|
|
@@ -856,22 +1204,22 @@ function BrowseSurface({
|
|
|
856
1204
|
}));
|
|
857
1205
|
let body = content;
|
|
858
1206
|
if (loading) {
|
|
859
|
-
body = /* @__PURE__ */
|
|
1207
|
+
body = /* @__PURE__ */ jsx18(StateBlock, { variant: "loading", title: loadingTitle, description: loadingDescription, compact: true });
|
|
860
1208
|
} else if (error) {
|
|
861
|
-
body = /* @__PURE__ */
|
|
1209
|
+
body = /* @__PURE__ */ jsx18(StateBlock, { variant: "error", title: errorTitle, description: error, action: errorAction ?? emptyAction, compact: true });
|
|
862
1210
|
} else if (empty) {
|
|
863
|
-
body = /* @__PURE__ */
|
|
1211
|
+
body = /* @__PURE__ */ jsx18(StateBlock, { variant: "empty", title: emptyTitle, description: emptyDescription, action: emptyAction, compact: true });
|
|
864
1212
|
}
|
|
865
|
-
return /* @__PURE__ */
|
|
866
|
-
/* @__PURE__ */
|
|
867
|
-
/* @__PURE__ */
|
|
868
|
-
/* @__PURE__ */
|
|
869
|
-
eyebrow ? /* @__PURE__ */
|
|
870
|
-
/* @__PURE__ */
|
|
871
|
-
description ? /* @__PURE__ */
|
|
1213
|
+
return /* @__PURE__ */ jsxs14(Stack14, { gap: "lg", children: [
|
|
1214
|
+
/* @__PURE__ */ jsx18(Paper2, { withBorder: true, radius: "xl", p: "xl", children: /* @__PURE__ */ jsxs14(Stack14, { gap: "lg", children: [
|
|
1215
|
+
/* @__PURE__ */ jsxs14(Group12, { justify: "space-between", align: "flex-start", gap: "md", children: [
|
|
1216
|
+
/* @__PURE__ */ jsxs14(Stack14, { gap: "xs", maw: 760, children: [
|
|
1217
|
+
eyebrow ? /* @__PURE__ */ jsx18(Text12, { size: "xs", fw: 700, tt: "uppercase", c: "dimmed", style: { letterSpacing: "0.18em" }, children: eyebrow }) : null,
|
|
1218
|
+
/* @__PURE__ */ jsx18(Title12, { order: 1, children: title }),
|
|
1219
|
+
description ? /* @__PURE__ */ jsx18(Text12, { size: "lg", c: "dimmed", children: description }) : null
|
|
872
1220
|
] }),
|
|
873
|
-
/* @__PURE__ */
|
|
874
|
-
typeof resultCount === "number" ? /* @__PURE__ */
|
|
1221
|
+
/* @__PURE__ */ jsxs14(Stack14, { align: "flex-end", gap: "xs", children: [
|
|
1222
|
+
typeof resultCount === "number" ? /* @__PURE__ */ jsxs14(Badge10, { size: "lg", radius: "xl", variant: "light", color: "violet", children: [
|
|
875
1223
|
resultCount,
|
|
876
1224
|
" ",
|
|
877
1225
|
resultLabel
|
|
@@ -879,10 +1227,10 @@ function BrowseSurface({
|
|
|
879
1227
|
primaryControls
|
|
880
1228
|
] })
|
|
881
1229
|
] }),
|
|
882
|
-
scopeOptions.length ? /* @__PURE__ */
|
|
883
|
-
/* @__PURE__ */
|
|
884
|
-
/* @__PURE__ */
|
|
885
|
-
|
|
1230
|
+
scopeOptions.length ? /* @__PURE__ */ jsxs14(Stack14, { gap: "xs", children: [
|
|
1231
|
+
/* @__PURE__ */ jsx18(Text12, { size: "sm", fw: 600, c: "dimmed", children: scopeLabel }),
|
|
1232
|
+
/* @__PURE__ */ jsx18(Group12, { gap: "xs", wrap: "wrap", children: scopeOptions.map((option) => /* @__PURE__ */ jsx18(
|
|
1233
|
+
Button2,
|
|
886
1234
|
{
|
|
887
1235
|
variant: option.active ? "filled" : "default",
|
|
888
1236
|
color: option.active ? "violet" : "gray",
|
|
@@ -894,30 +1242,30 @@ function BrowseSurface({
|
|
|
894
1242
|
option.id
|
|
895
1243
|
)) })
|
|
896
1244
|
] }) : null,
|
|
897
|
-
locationControls ? /* @__PURE__ */
|
|
898
|
-
/* @__PURE__ */
|
|
1245
|
+
locationControls ? /* @__PURE__ */ jsxs14(Stack14, { gap: "xs", children: [
|
|
1246
|
+
/* @__PURE__ */ jsx18(Text12, { size: "sm", fw: 600, c: "dimmed", children: "Location" }),
|
|
899
1247
|
locationControls
|
|
900
1248
|
] }) : null,
|
|
901
|
-
toolbar || sortControl ? /* @__PURE__ */
|
|
902
|
-
toolbar ? /* @__PURE__ */
|
|
1249
|
+
toolbar || sortControl ? /* @__PURE__ */ jsxs14(SimpleGrid3, { cols: { base: 1, lg: sortControl ? 2 : 1 }, spacing: "md", children: [
|
|
1250
|
+
toolbar ? /* @__PURE__ */ jsx18(
|
|
903
1251
|
DataToolbar,
|
|
904
1252
|
{
|
|
905
1253
|
...toolbar,
|
|
906
1254
|
activeFilters: toolbarFilters.length ? toolbarFilters : toolbar.fallbackActiveFilters
|
|
907
1255
|
}
|
|
908
|
-
) : /* @__PURE__ */
|
|
909
|
-
sortControl ? /* @__PURE__ */
|
|
910
|
-
/* @__PURE__ */
|
|
1256
|
+
) : /* @__PURE__ */ jsx18(Box4, {}),
|
|
1257
|
+
sortControl ? /* @__PURE__ */ jsxs14(Stack14, { gap: "xs", align: "stretch", children: [
|
|
1258
|
+
/* @__PURE__ */ jsx18(Text12, { size: "sm", fw: 600, c: "dimmed", children: "Sort" }),
|
|
911
1259
|
sortControl
|
|
912
1260
|
] }) : null
|
|
913
1261
|
] }) : null,
|
|
914
|
-
mobileFilters ? /* @__PURE__ */
|
|
915
|
-
/* @__PURE__ */
|
|
1262
|
+
mobileFilters ? /* @__PURE__ */ jsxs14(Stack14, { hiddenFrom: "lg", gap: "xs", children: [
|
|
1263
|
+
/* @__PURE__ */ jsx18(Text12, { size: "sm", fw: 600, c: "dimmed", children: "Filters" }),
|
|
916
1264
|
mobileFilters
|
|
917
1265
|
] }) : null,
|
|
918
|
-
filterDrawer ? /* @__PURE__ */
|
|
919
|
-
activeFilters.length ? /* @__PURE__ */
|
|
920
|
-
|
|
1266
|
+
filterDrawer ? /* @__PURE__ */ jsx18(Box4, { hiddenFrom: "lg", children: filterDrawer }) : null,
|
|
1267
|
+
activeFilters.length ? /* @__PURE__ */ jsx18(Group12, { gap: "xs", wrap: "wrap", children: activeFilters.map((filter) => /* @__PURE__ */ jsx18(
|
|
1268
|
+
Badge10,
|
|
921
1269
|
{
|
|
922
1270
|
variant: "light",
|
|
923
1271
|
color: "violet",
|
|
@@ -934,8 +1282,8 @@ function BrowseSurface({
|
|
|
934
1282
|
}
|
|
935
1283
|
|
|
936
1284
|
// src/AccentPanel.tsx
|
|
937
|
-
import { Badge as
|
|
938
|
-
import { jsx as
|
|
1285
|
+
import { Badge as Badge11, Box as Box5, Group as Group13, Paper as Paper3, Stack as Stack15, Text as Text13, Title as Title13 } from "@mantine/core";
|
|
1286
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
939
1287
|
var toneStyles = {
|
|
940
1288
|
gray: {
|
|
941
1289
|
bg: "light-dark(var(--mantine-color-gray-0), color-mix(in srgb, var(--mantine-color-gray-7) 88%, black))",
|
|
@@ -991,25 +1339,52 @@ function AccentPanel({
|
|
|
991
1339
|
children
|
|
992
1340
|
}) {
|
|
993
1341
|
const styles = resolveAccentPanelStyles(tone, variant);
|
|
994
|
-
return /* @__PURE__ */
|
|
995
|
-
title || badge ? /* @__PURE__ */
|
|
996
|
-
title ? /* @__PURE__ */
|
|
997
|
-
badge ? typeof badge === "string" ? /* @__PURE__ */
|
|
1342
|
+
return /* @__PURE__ */ jsx19(Paper3, { withBorder: true, radius: "lg", p: "lg", style: styles, children: /* @__PURE__ */ jsxs15(Stack15, { gap: "sm", children: [
|
|
1343
|
+
title || badge ? /* @__PURE__ */ jsxs15(Group13, { justify: "space-between", align: "flex-start", gap: "sm", wrap: "wrap", children: [
|
|
1344
|
+
title ? /* @__PURE__ */ jsx19(Title13, { order: 4, c: "inherit", children: title }) : /* @__PURE__ */ jsx19(Box5, {}),
|
|
1345
|
+
badge ? typeof badge === "string" ? /* @__PURE__ */ jsx19(Badge11, { color: tone === "amber" ? "yellow" : tone, variant: "filled", children: badge }) : badge : null
|
|
998
1346
|
] }) : null,
|
|
999
|
-
typeof children === "string" ? /* @__PURE__ */
|
|
1347
|
+
typeof children === "string" ? /* @__PURE__ */ jsx19(Text13, { c: "inherit", children }) : /* @__PURE__ */ jsx19(Box5, { c: "inherit", children })
|
|
1348
|
+
] }) });
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
// src/DetailProfileShell.tsx
|
|
1352
|
+
import { Divider as Divider2, Paper as Paper4, Stack as Stack16 } from "@mantine/core";
|
|
1353
|
+
import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1354
|
+
function DetailProfileShell({
|
|
1355
|
+
mode = "page",
|
|
1356
|
+
hero,
|
|
1357
|
+
actions,
|
|
1358
|
+
sections,
|
|
1359
|
+
related,
|
|
1360
|
+
padding = "lg",
|
|
1361
|
+
showDividers = true
|
|
1362
|
+
}) {
|
|
1363
|
+
const content = sections.filter(Boolean);
|
|
1364
|
+
return /* @__PURE__ */ jsx20(Paper4, { withBorder: mode === "drawer", radius: mode === "drawer" ? "xl" : "md", p: padding, children: /* @__PURE__ */ jsxs16(Stack16, { gap: "lg", children: [
|
|
1365
|
+
hero,
|
|
1366
|
+
actions,
|
|
1367
|
+
content.map((section, index) => /* @__PURE__ */ jsxs16(Stack16, { gap: "lg", children: [
|
|
1368
|
+
index > 0 && showDividers ? /* @__PURE__ */ jsx20(Divider2, {}) : null,
|
|
1369
|
+
section
|
|
1370
|
+
] }, index)),
|
|
1371
|
+
related ? /* @__PURE__ */ jsxs16(Fragment3, { children: [
|
|
1372
|
+
content.length && showDividers ? /* @__PURE__ */ jsx20(Divider2, {}) : null,
|
|
1373
|
+
related
|
|
1374
|
+
] }) : null
|
|
1000
1375
|
] }) });
|
|
1001
1376
|
}
|
|
1002
1377
|
|
|
1003
1378
|
// src/PublicNav.tsx
|
|
1004
|
-
import { Anchor as Anchor2, Group as
|
|
1005
|
-
import { jsx as
|
|
1379
|
+
import { Anchor as Anchor2, Group as Group14 } from "@mantine/core";
|
|
1380
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1006
1381
|
function PublicNav({ items, activeId, renderLink }) {
|
|
1007
|
-
return /* @__PURE__ */
|
|
1382
|
+
return /* @__PURE__ */ jsx21(Group14, { component: "nav", "aria-label": "Primary", gap: "lg", wrap: "nowrap", children: items.map((item) => {
|
|
1008
1383
|
const active = item.id === activeId;
|
|
1009
1384
|
if (renderLink) {
|
|
1010
|
-
return /* @__PURE__ */
|
|
1385
|
+
return /* @__PURE__ */ jsx21("span", { children: renderLink(item, active) }, item.id);
|
|
1011
1386
|
}
|
|
1012
|
-
return /* @__PURE__ */
|
|
1387
|
+
return /* @__PURE__ */ jsx21(
|
|
1013
1388
|
Anchor2,
|
|
1014
1389
|
{
|
|
1015
1390
|
href: item.href,
|
|
@@ -1027,16 +1402,16 @@ function PublicNav({ items, activeId, renderLink }) {
|
|
|
1027
1402
|
}
|
|
1028
1403
|
|
|
1029
1404
|
// src/PublicShell.tsx
|
|
1030
|
-
import { AppShell, Box as
|
|
1031
|
-
import { jsx as
|
|
1405
|
+
import { AppShell, Box as Box6, Burger, Container, Group as Group15, Stack as Stack17, Text as Text14 } from "@mantine/core";
|
|
1406
|
+
import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1032
1407
|
function InlineMobileNavigation({
|
|
1033
1408
|
mobileNavigation,
|
|
1034
1409
|
className,
|
|
1035
1410
|
mode
|
|
1036
1411
|
}) {
|
|
1037
|
-
return /* @__PURE__ */
|
|
1038
|
-
/* @__PURE__ */
|
|
1039
|
-
|
|
1412
|
+
return /* @__PURE__ */ jsxs17(Box6, { component: "details", hiddenFrom: "sm", className, children: [
|
|
1413
|
+
/* @__PURE__ */ jsxs17(
|
|
1414
|
+
Box6,
|
|
1040
1415
|
{
|
|
1041
1416
|
component: "summary",
|
|
1042
1417
|
"aria-label": mode === "drawer" ? "Open site navigation drawer" : "Open site navigation",
|
|
@@ -1048,13 +1423,13 @@ function InlineMobileNavigation({
|
|
|
1048
1423
|
gap: "0.5rem"
|
|
1049
1424
|
},
|
|
1050
1425
|
children: [
|
|
1051
|
-
/* @__PURE__ */
|
|
1052
|
-
/* @__PURE__ */
|
|
1426
|
+
/* @__PURE__ */ jsx22(Burger, { opened: false, "aria-hidden": true }),
|
|
1427
|
+
/* @__PURE__ */ jsx22(Text14, { size: "sm", fw: 600, children: "Menu" })
|
|
1053
1428
|
]
|
|
1054
1429
|
}
|
|
1055
1430
|
),
|
|
1056
|
-
/* @__PURE__ */
|
|
1057
|
-
|
|
1431
|
+
/* @__PURE__ */ jsx22(
|
|
1432
|
+
Box6,
|
|
1058
1433
|
{
|
|
1059
1434
|
mt: "sm",
|
|
1060
1435
|
p: "sm",
|
|
@@ -1063,7 +1438,7 @@ function InlineMobileNavigation({
|
|
|
1063
1438
|
border: "1px solid var(--mantine-color-default-border)",
|
|
1064
1439
|
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
1440
|
},
|
|
1066
|
-
children: /* @__PURE__ */
|
|
1441
|
+
children: /* @__PURE__ */ jsx22(Stack17, { gap: "sm", children: mobileNavigation })
|
|
1067
1442
|
}
|
|
1068
1443
|
)
|
|
1069
1444
|
] });
|
|
@@ -1084,13 +1459,13 @@ function PublicShell({
|
|
|
1084
1459
|
mobileNavigationMode = "sheet",
|
|
1085
1460
|
classNames
|
|
1086
1461
|
}) {
|
|
1087
|
-
const resolvedNavigation = navigation ?? (navItems ? /* @__PURE__ */
|
|
1462
|
+
const resolvedNavigation = navigation ?? (navItems ? /* @__PURE__ */ jsx22(PublicNav, { items: navItems, activeId: activeNavId }) : null);
|
|
1088
1463
|
const containerSize = maxContentWidth ?? (compact ? "md" : "lg");
|
|
1089
1464
|
const headerHeight = headerVariant === "compact" ? 64 : headerVariant === "branded-quiet" ? 88 : 72;
|
|
1090
1465
|
const mainPadding = headerVariant === "compact" ? "lg" : "xl";
|
|
1091
1466
|
const usesInlineMobileNavigation = Boolean(mobileNavigation) && mobileNavigationMode !== "sheet";
|
|
1092
1467
|
const usesSheetMobileNavigation = Boolean(mobileNavigation) && mobileNavigationMode === "sheet";
|
|
1093
|
-
return /* @__PURE__ */
|
|
1468
|
+
return /* @__PURE__ */ jsxs17(
|
|
1094
1469
|
AppShell,
|
|
1095
1470
|
{
|
|
1096
1471
|
className: classNames?.root,
|
|
@@ -1098,16 +1473,16 @@ function PublicShell({
|
|
|
1098
1473
|
footer: usesSheetMobileNavigation ? { height: 68 } : void 0,
|
|
1099
1474
|
padding: 0,
|
|
1100
1475
|
children: [
|
|
1101
|
-
/* @__PURE__ */
|
|
1102
|
-
|
|
1476
|
+
/* @__PURE__ */ jsx22(AppShell.Header, { withBorder: headerBordered, className: classNames?.header, "data-header-variant": headerVariant, children: /* @__PURE__ */ jsx22(Container, { size: containerSize, h: "100%", py: headerVariant === "branded-quiet" ? "sm" : 0, children: /* @__PURE__ */ jsxs17(
|
|
1477
|
+
Group15,
|
|
1103
1478
|
{
|
|
1104
1479
|
h: "100%",
|
|
1105
1480
|
justify: "space-between",
|
|
1106
1481
|
wrap: "nowrap",
|
|
1107
1482
|
gap: headerVariant === "compact" ? "sm" : "lg",
|
|
1108
1483
|
children: [
|
|
1109
|
-
/* @__PURE__ */
|
|
1110
|
-
usesInlineMobileNavigation ? /* @__PURE__ */
|
|
1484
|
+
/* @__PURE__ */ jsxs17(Group15, { wrap: "nowrap", gap: headerVariant === "compact" ? "xs" : "sm", className: classNames?.brand, children: [
|
|
1485
|
+
usesInlineMobileNavigation ? /* @__PURE__ */ jsx22(
|
|
1111
1486
|
InlineMobileNavigation,
|
|
1112
1487
|
{
|
|
1113
1488
|
mobileNavigation,
|
|
@@ -1115,17 +1490,17 @@ function PublicShell({
|
|
|
1115
1490
|
mode: mobileNavigationMode
|
|
1116
1491
|
}
|
|
1117
1492
|
) : null,
|
|
1118
|
-
/* @__PURE__ */
|
|
1493
|
+
/* @__PURE__ */ jsx22(Box6, { children: brand })
|
|
1119
1494
|
] }),
|
|
1120
|
-
/* @__PURE__ */
|
|
1121
|
-
/* @__PURE__ */
|
|
1495
|
+
/* @__PURE__ */ jsx22(Group15, { visibleFrom: "sm", gap: headerVariant === "compact" ? "md" : "lg", className: classNames?.navigation, children: resolvedNavigation }),
|
|
1496
|
+
/* @__PURE__ */ jsx22(Group15, { gap: "sm", className: classNames?.actions, children: actions })
|
|
1122
1497
|
]
|
|
1123
1498
|
}
|
|
1124
1499
|
) }) }),
|
|
1125
|
-
usesSheetMobileNavigation ? /* @__PURE__ */
|
|
1126
|
-
/* @__PURE__ */
|
|
1127
|
-
/* @__PURE__ */
|
|
1128
|
-
footer ? /* @__PURE__ */
|
|
1500
|
+
usesSheetMobileNavigation ? /* @__PURE__ */ jsx22(AppShell.Footer, { withBorder: true, children: /* @__PURE__ */ jsx22(Container, { size: containerSize, h: "100%", children: /* @__PURE__ */ jsx22(Group15, { h: "100%", justify: "space-around", wrap: "nowrap", children: mobileNavigation }) }) }) : null,
|
|
1501
|
+
/* @__PURE__ */ jsxs17(AppShell.Main, { children: [
|
|
1502
|
+
/* @__PURE__ */ jsx22(Container, { size: containerSize, py: mainPadding, className: classNames?.content, children: /* @__PURE__ */ jsx22(Stack17, { gap: "xl", children }) }),
|
|
1503
|
+
footer ? /* @__PURE__ */ jsx22(Box6, { component: typeof footer === "string" ? "footer" : "div", py: "xl", children: /* @__PURE__ */ jsx22(Container, { size: containerSize, children: typeof footer === "string" ? /* @__PURE__ */ jsx22(Text14, { size: "sm", c: "dimmed", children: footer }) : footer }) }) : null
|
|
1129
1504
|
] })
|
|
1130
1505
|
]
|
|
1131
1506
|
}
|
|
@@ -1133,18 +1508,18 @@ function PublicShell({
|
|
|
1133
1508
|
}
|
|
1134
1509
|
|
|
1135
1510
|
// src/PublicSiteFooter.tsx
|
|
1136
|
-
import { Group as
|
|
1137
|
-
import { jsx as
|
|
1511
|
+
import { Group as Group16, Stack as Stack18, Text as Text15 } from "@mantine/core";
|
|
1512
|
+
import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1138
1513
|
function PublicSiteFooter({ children, meta }) {
|
|
1139
|
-
return /* @__PURE__ */
|
|
1140
|
-
children ? /* @__PURE__ */
|
|
1141
|
-
meta ? /* @__PURE__ */
|
|
1514
|
+
return /* @__PURE__ */ jsxs18(Stack18, { component: "footer", gap: "xs", children: [
|
|
1515
|
+
children ? /* @__PURE__ */ jsx23(Text15, { size: "sm", children }) : null,
|
|
1516
|
+
meta ? /* @__PURE__ */ jsx23(Group16, { gap: "sm", children: /* @__PURE__ */ jsx23(Text15, { size: "xs", c: "dimmed", children: meta }) }) : null
|
|
1142
1517
|
] });
|
|
1143
1518
|
}
|
|
1144
1519
|
|
|
1145
1520
|
// src/PublicBrandFooter.tsx
|
|
1146
|
-
import { Box as
|
|
1147
|
-
import { Fragment as
|
|
1521
|
+
import { Box as Box7, Divider as Divider3, Grid, Group as Group17, Paper as Paper5, Stack as Stack19, Text as Text16, Title as Title14 } from "@mantine/core";
|
|
1522
|
+
import { Fragment as Fragment4, jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1148
1523
|
function PublicBrandFooter({
|
|
1149
1524
|
media,
|
|
1150
1525
|
brandTitle,
|
|
@@ -1159,8 +1534,8 @@ function PublicBrandFooter({
|
|
|
1159
1534
|
const mediaSpan = layoutVariant === "immersive-media" ? 5 : 4;
|
|
1160
1535
|
const primarySpan = media ? layoutVariant === "balanced-quote" ? 4 : 4 : secondary ? 6 : 12;
|
|
1161
1536
|
const secondarySpan = media ? Math.max(3, 12 - mediaSpan - primarySpan) : Math.max(4, 12 - primarySpan);
|
|
1162
|
-
return /* @__PURE__ */
|
|
1163
|
-
|
|
1537
|
+
return /* @__PURE__ */ jsx24(
|
|
1538
|
+
Paper5,
|
|
1164
1539
|
{
|
|
1165
1540
|
component: "footer",
|
|
1166
1541
|
withBorder: true,
|
|
@@ -1168,19 +1543,19 @@ function PublicBrandFooter({
|
|
|
1168
1543
|
p: compact ? "lg" : "xl",
|
|
1169
1544
|
className: classNames?.root,
|
|
1170
1545
|
"data-layout-variant": layoutVariant,
|
|
1171
|
-
children: /* @__PURE__ */
|
|
1172
|
-
/* @__PURE__ */
|
|
1173
|
-
media ? /* @__PURE__ */
|
|
1174
|
-
/* @__PURE__ */
|
|
1175
|
-
brandTitle ? /* @__PURE__ */
|
|
1176
|
-
description ? /* @__PURE__ */
|
|
1177
|
-
actions ? /* @__PURE__ */
|
|
1546
|
+
children: /* @__PURE__ */ jsxs19(Stack19, { gap: "lg", children: [
|
|
1547
|
+
/* @__PURE__ */ jsxs19(Grid, { gutter: compact ? "lg" : "xl", align: "flex-start", children: [
|
|
1548
|
+
media ? /* @__PURE__ */ jsx24(Grid.Col, { span: { base: 12, md: mediaSpan }, children: /* @__PURE__ */ jsx24(Box7, { className: classNames?.media, children: media }) }) : null,
|
|
1549
|
+
/* @__PURE__ */ jsx24(Grid.Col, { span: { base: 12, md: primarySpan }, children: /* @__PURE__ */ jsxs19(Stack19, { gap: compact ? "xs" : "sm", className: classNames?.primary, children: [
|
|
1550
|
+
brandTitle ? /* @__PURE__ */ jsx24(Title14, { order: 4, children: brandTitle }) : null,
|
|
1551
|
+
description ? /* @__PURE__ */ jsx24(Text16, { c: "dimmed", children: description }) : null,
|
|
1552
|
+
actions ? /* @__PURE__ */ jsx24(Box7, { children: actions }) : null
|
|
1178
1553
|
] }) }),
|
|
1179
|
-
secondary ? /* @__PURE__ */
|
|
1554
|
+
secondary ? /* @__PURE__ */ jsx24(Grid.Col, { span: { base: 12, md: secondarySpan }, children: /* @__PURE__ */ jsx24(Stack19, { gap: compact ? "xs" : "sm", className: classNames?.secondary, children: secondary }) }) : null
|
|
1180
1555
|
] }),
|
|
1181
|
-
legal ? /* @__PURE__ */
|
|
1182
|
-
/* @__PURE__ */
|
|
1183
|
-
/* @__PURE__ */
|
|
1556
|
+
legal ? /* @__PURE__ */ jsxs19(Fragment4, { children: [
|
|
1557
|
+
/* @__PURE__ */ jsx24(Divider3, {}),
|
|
1558
|
+
/* @__PURE__ */ jsx24(Group17, { justify: "space-between", gap: "sm", wrap: "wrap", className: classNames?.legal, children: typeof legal === "string" ? /* @__PURE__ */ jsx24(Text16, { size: "sm", c: "dimmed", children: legal }) : legal })
|
|
1184
1559
|
] }) : null
|
|
1185
1560
|
] })
|
|
1186
1561
|
}
|
|
@@ -1188,60 +1563,136 @@ function PublicBrandFooter({
|
|
|
1188
1563
|
}
|
|
1189
1564
|
|
|
1190
1565
|
// src/AuthShell.tsx
|
|
1191
|
-
import { Box as
|
|
1192
|
-
import { jsx as
|
|
1193
|
-
function AuthShell({
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1566
|
+
import { Box as Box8, Card as Card8, Container as Container2, Divider as Divider4, Group as Group18, Stack as Stack20, Text as Text17, Title as Title15 } from "@mantine/core";
|
|
1567
|
+
import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1568
|
+
function AuthShell({
|
|
1569
|
+
title,
|
|
1570
|
+
description,
|
|
1571
|
+
brand,
|
|
1572
|
+
headerActions,
|
|
1573
|
+
footer,
|
|
1574
|
+
helper,
|
|
1575
|
+
socialAuth,
|
|
1576
|
+
dividerLabel = "Or continue with your account",
|
|
1577
|
+
children
|
|
1578
|
+
}) {
|
|
1579
|
+
return /* @__PURE__ */ jsx25(Box8, { py: { base: "xl", md: "4rem" }, children: /* @__PURE__ */ jsx25(Container2, { size: "xs", children: /* @__PURE__ */ jsxs20(Stack20, { gap: "xl", children: [
|
|
1580
|
+
brand || headerActions ? /* @__PURE__ */ jsxs20(Group18, { justify: brand && headerActions ? "space-between" : "center", align: "center", children: [
|
|
1581
|
+
brand ? /* @__PURE__ */ jsx25(Box8, { children: brand }) : /* @__PURE__ */ jsx25(Box8, {}),
|
|
1582
|
+
headerActions ? /* @__PURE__ */ jsx25(Group18, { gap: "sm", children: headerActions }) : null
|
|
1198
1583
|
] }) : null,
|
|
1199
|
-
/* @__PURE__ */
|
|
1200
|
-
/* @__PURE__ */
|
|
1201
|
-
/* @__PURE__ */
|
|
1202
|
-
description ? /* @__PURE__ */
|
|
1584
|
+
/* @__PURE__ */ jsx25(Card8, { withBorder: true, radius: "lg", padding: "xl", children: /* @__PURE__ */ jsxs20(Stack20, { gap: "lg", children: [
|
|
1585
|
+
/* @__PURE__ */ jsxs20(Stack20, { gap: "xs", ta: "center", children: [
|
|
1586
|
+
/* @__PURE__ */ jsx25(Title15, { order: 2, children: title }),
|
|
1587
|
+
description ? /* @__PURE__ */ jsx25(Text17, { c: "dimmed", size: "sm", children: description }) : null
|
|
1203
1588
|
] }),
|
|
1589
|
+
socialAuth ? /* @__PURE__ */ jsx25(Box8, { children: socialAuth }) : null,
|
|
1590
|
+
socialAuth ? /* @__PURE__ */ jsx25(Divider4, { label: dividerLabel, labelPosition: "center" }) : null,
|
|
1204
1591
|
children,
|
|
1205
|
-
helper ? /* @__PURE__ */
|
|
1592
|
+
helper ? /* @__PURE__ */ jsx25(Text17, { size: "sm", c: "dimmed", ta: "center", children: helper }) : null
|
|
1206
1593
|
] }) }),
|
|
1207
|
-
footer ? /* @__PURE__ */
|
|
1594
|
+
footer ? /* @__PURE__ */ jsx25(Text17, { size: "sm", c: "dimmed", ta: "center", children: footer }) : null
|
|
1208
1595
|
] }) }) });
|
|
1209
1596
|
}
|
|
1210
1597
|
|
|
1598
|
+
// src/SocialAuthButtons.tsx
|
|
1599
|
+
import { Button as Button3, Divider as Divider5, Group as Group19, SimpleGrid as SimpleGrid4, Stack as Stack21, Text as Text18, ThemeIcon as ThemeIcon7 } from "@mantine/core";
|
|
1600
|
+
import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1601
|
+
var providerConfig = {
|
|
1602
|
+
google: { label: "Google", mark: "G", color: "red" },
|
|
1603
|
+
apple: { label: "Apple", mark: "A", color: "dark" },
|
|
1604
|
+
github: { label: "GitHub", mark: "GH", color: "gray" },
|
|
1605
|
+
facebook: { label: "Facebook", mark: "F", color: "blue" },
|
|
1606
|
+
microsoft: { label: "Microsoft", mark: "M", color: "cyan" },
|
|
1607
|
+
linkedin: { label: "LinkedIn", mark: "in", color: "blue" },
|
|
1608
|
+
discord: { label: "Discord", mark: "D", color: "indigo" },
|
|
1609
|
+
x: { label: "X", mark: "X", color: "dark" },
|
|
1610
|
+
email: { label: "Email", mark: "@", color: "gray" }
|
|
1611
|
+
};
|
|
1612
|
+
function ProviderMark({ id }) {
|
|
1613
|
+
const config = providerConfig[id] ?? { label: id, mark: id.slice(0, 2).toUpperCase(), color: "gray" };
|
|
1614
|
+
return /* @__PURE__ */ jsx26(ThemeIcon7, { variant: "light", color: config.color, radius: "xl", size: "md", "aria-hidden": "true", children: /* @__PURE__ */ jsx26(Text18, { size: "xs", fw: 700, children: config.mark }) });
|
|
1615
|
+
}
|
|
1616
|
+
function SocialAuthButton({ provider, compact = false }) {
|
|
1617
|
+
const config = providerConfig[provider.id] ?? { label: provider.id, mark: provider.id.slice(0, 2).toUpperCase(), color: "gray" };
|
|
1618
|
+
const label = provider.label ?? `Continue with ${config.label}`;
|
|
1619
|
+
const buttonProps = provider.href ? { component: "a", href: provider.href } : { onClick: provider.onClick };
|
|
1620
|
+
return /* @__PURE__ */ jsx26(
|
|
1621
|
+
Button3,
|
|
1622
|
+
{
|
|
1623
|
+
variant: "default",
|
|
1624
|
+
justify: "space-between",
|
|
1625
|
+
fullWidth: true,
|
|
1626
|
+
size: compact ? "sm" : "md",
|
|
1627
|
+
leftSection: /* @__PURE__ */ jsx26(ProviderMark, { id: provider.id }),
|
|
1628
|
+
disabled: provider.disabled,
|
|
1629
|
+
loading: provider.loading,
|
|
1630
|
+
...buttonProps,
|
|
1631
|
+
children: /* @__PURE__ */ jsxs21(Stack21, { gap: 0, align: "flex-start", children: [
|
|
1632
|
+
/* @__PURE__ */ jsx26(Text18, { inherit: true, children: label }),
|
|
1633
|
+
provider.description ? /* @__PURE__ */ jsx26(Text18, { size: "xs", c: "dimmed", lh: 1.2, children: provider.description }) : null
|
|
1634
|
+
] })
|
|
1635
|
+
}
|
|
1636
|
+
);
|
|
1637
|
+
}
|
|
1638
|
+
function SocialAuthButtons({
|
|
1639
|
+
providers,
|
|
1640
|
+
title = "Continue with a trusted provider",
|
|
1641
|
+
description,
|
|
1642
|
+
layout = "stack",
|
|
1643
|
+
compact = false
|
|
1644
|
+
}) {
|
|
1645
|
+
if (!providers.length) {
|
|
1646
|
+
return null;
|
|
1647
|
+
}
|
|
1648
|
+
const content = providers.map((provider) => /* @__PURE__ */ jsx26(SocialAuthButton, { provider, compact }, provider.id));
|
|
1649
|
+
return /* @__PURE__ */ jsxs21(Stack21, { gap: "md", children: [
|
|
1650
|
+
/* @__PURE__ */ jsxs21(Stack21, { gap: 4, ta: "center", children: [
|
|
1651
|
+
/* @__PURE__ */ jsxs21(Group19, { justify: "center", gap: "xs", children: [
|
|
1652
|
+
/* @__PURE__ */ jsx26(GdsIcons.Login, { size: "1rem" }),
|
|
1653
|
+
/* @__PURE__ */ jsx26(Text18, { fw: 600, children: title })
|
|
1654
|
+
] }),
|
|
1655
|
+
description ? /* @__PURE__ */ jsx26(Text18, { size: "sm", c: "dimmed", children: description }) : null
|
|
1656
|
+
] }),
|
|
1657
|
+
/* @__PURE__ */ jsx26(Divider5, {}),
|
|
1658
|
+
layout === "grid" ? /* @__PURE__ */ jsx26(SimpleGrid4, { cols: { base: 1, sm: 2 }, spacing: "sm", children: content }) : /* @__PURE__ */ jsx26(Stack21, { gap: "sm", children: content })
|
|
1659
|
+
] });
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1211
1662
|
// src/ArticleShell.tsx
|
|
1212
|
-
import { Container as Container3, Group as
|
|
1213
|
-
import { jsx as
|
|
1663
|
+
import { Container as Container3, Group as Group20, Stack as Stack22, Text as Text19, Title as Title16 } from "@mantine/core";
|
|
1664
|
+
import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1214
1665
|
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__ */
|
|
1666
|
+
return /* @__PURE__ */ jsx27(Container3, { size: "lg", py: "xl", children: /* @__PURE__ */ jsxs22(Group20, { align: "flex-start", gap: "xl", wrap: "nowrap", children: [
|
|
1667
|
+
/* @__PURE__ */ jsxs22(Stack22, { gap: "lg", maw: 760, flex: 1, children: [
|
|
1668
|
+
/* @__PURE__ */ jsxs22(Stack22, { gap: "sm", children: [
|
|
1669
|
+
eyebrow ? /* @__PURE__ */ jsx27(Text19, { size: "sm", fw: 700, c: "dimmed", tt: "uppercase", children: eyebrow }) : null,
|
|
1670
|
+
/* @__PURE__ */ jsx27(Title16, { order: 1, children: title }),
|
|
1671
|
+
lead ? /* @__PURE__ */ jsx27(Text19, { size: "lg", c: "dimmed", children: lead }) : null,
|
|
1672
|
+
meta ? /* @__PURE__ */ jsx27(Group20, { gap: "md", children: meta }) : null
|
|
1222
1673
|
] }),
|
|
1223
|
-
/* @__PURE__ */
|
|
1674
|
+
/* @__PURE__ */ jsx27(Stack22, { gap: "md", children })
|
|
1224
1675
|
] }),
|
|
1225
|
-
sideRail ? /* @__PURE__ */
|
|
1676
|
+
sideRail ? /* @__PURE__ */ jsx27(Stack22, { visibleFrom: "lg", gap: "md", w: 240, children: sideRail }) : null
|
|
1226
1677
|
] }) });
|
|
1227
1678
|
}
|
|
1228
1679
|
|
|
1229
1680
|
// src/CtaButtonGroup.tsx
|
|
1230
|
-
import { Group as
|
|
1231
|
-
import { jsx as
|
|
1681
|
+
import { Group as Group21, Stack as Stack23 } from "@mantine/core";
|
|
1682
|
+
import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1232
1683
|
function CtaButtonGroup({ primary, secondary, tertiary }) {
|
|
1233
|
-
return /* @__PURE__ */
|
|
1234
|
-
/* @__PURE__ */
|
|
1235
|
-
/* @__PURE__ */
|
|
1236
|
-
secondary ? /* @__PURE__ */
|
|
1684
|
+
return /* @__PURE__ */ jsxs23(Stack23, { gap: "sm", children: [
|
|
1685
|
+
/* @__PURE__ */ jsxs23(Group21, { gap: "sm", align: "stretch", children: [
|
|
1686
|
+
/* @__PURE__ */ jsx28("div", { children: primary }),
|
|
1687
|
+
secondary ? /* @__PURE__ */ jsx28("div", { children: secondary }) : null
|
|
1237
1688
|
] }),
|
|
1238
|
-
tertiary ? /* @__PURE__ */
|
|
1689
|
+
tertiary ? /* @__PURE__ */ jsx28("div", { children: tertiary }) : null
|
|
1239
1690
|
] });
|
|
1240
1691
|
}
|
|
1241
1692
|
|
|
1242
1693
|
// src/DocsPageShell.tsx
|
|
1243
|
-
import { Anchor as Anchor3, Breadcrumbs, Container as Container4, Group as
|
|
1244
|
-
import { jsx as
|
|
1694
|
+
import { Anchor as Anchor3, Breadcrumbs, Container as Container4, Group as Group22, Stack as Stack24, Text as Text20, Title as Title17 } from "@mantine/core";
|
|
1695
|
+
import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1245
1696
|
function DocsPageShell({
|
|
1246
1697
|
breadcrumbs = [],
|
|
1247
1698
|
title,
|
|
@@ -1252,27 +1703,27 @@ function DocsPageShell({
|
|
|
1252
1703
|
footerNext,
|
|
1253
1704
|
children
|
|
1254
1705
|
}) {
|
|
1255
|
-
return /* @__PURE__ */
|
|
1256
|
-
/* @__PURE__ */
|
|
1257
|
-
breadcrumbs.length ? /* @__PURE__ */
|
|
1258
|
-
(crumb) => crumb.href ? /* @__PURE__ */
|
|
1706
|
+
return /* @__PURE__ */ jsx29(Container4, { size: "lg", py: "xl", children: /* @__PURE__ */ jsxs24(Group22, { align: "flex-start", gap: "xl", wrap: "nowrap", children: [
|
|
1707
|
+
/* @__PURE__ */ jsxs24(Stack24, { component: "article", gap: "lg", maw: 760, flex: 1, children: [
|
|
1708
|
+
breadcrumbs.length ? /* @__PURE__ */ jsx29(Breadcrumbs, { children: breadcrumbs.map(
|
|
1709
|
+
(crumb) => crumb.href ? /* @__PURE__ */ jsx29(Anchor3, { href: crumb.href, children: crumb.label }, `${crumb.label}-${crumb.href}`) : /* @__PURE__ */ jsx29(Text20, { children: crumb.label }, crumb.label)
|
|
1259
1710
|
) }) : null,
|
|
1260
|
-
/* @__PURE__ */
|
|
1261
|
-
eyebrow ? /* @__PURE__ */
|
|
1262
|
-
/* @__PURE__ */
|
|
1263
|
-
lead ? /* @__PURE__ */
|
|
1264
|
-
meta ? /* @__PURE__ */
|
|
1711
|
+
/* @__PURE__ */ jsxs24(Stack24, { gap: "sm", children: [
|
|
1712
|
+
eyebrow ? /* @__PURE__ */ jsx29(Text20, { size: "sm", fw: 700, c: "dimmed", children: eyebrow }) : null,
|
|
1713
|
+
/* @__PURE__ */ jsx29(Title17, { order: 1, children: title }),
|
|
1714
|
+
lead ? /* @__PURE__ */ jsx29(Text20, { size: "lg", c: "dimmed", children: lead }) : null,
|
|
1715
|
+
meta ? /* @__PURE__ */ jsx29(Group22, { gap: "md", children: meta }) : null
|
|
1265
1716
|
] }),
|
|
1266
|
-
/* @__PURE__ */
|
|
1267
|
-
footerNext ? /* @__PURE__ */
|
|
1717
|
+
/* @__PURE__ */ jsx29(Stack24, { gap: "md", children }),
|
|
1718
|
+
footerNext ? /* @__PURE__ */ jsx29(Anchor3, { href: footerNext.href, fw: 600, children: footerNext.label }) : null
|
|
1268
1719
|
] }),
|
|
1269
|
-
sideRail ? /* @__PURE__ */
|
|
1720
|
+
sideRail ? /* @__PURE__ */ jsx29(Stack24, { visibleFrom: "lg", gap: "md", w: 240, children: sideRail }) : null
|
|
1270
1721
|
] }) });
|
|
1271
1722
|
}
|
|
1272
1723
|
|
|
1273
1724
|
// src/EditorialHero.tsx
|
|
1274
|
-
import { Anchor as Anchor4, AspectRatio as
|
|
1275
|
-
import { jsx as
|
|
1725
|
+
import { Anchor as Anchor4, AspectRatio as AspectRatio5, Box as Box9, Grid as Grid2, Group as Group23, Paper as Paper6, Skeleton as Skeleton3, Stack as Stack25, Text as Text21, ThemeIcon as ThemeIcon8, Title as Title18 } from "@mantine/core";
|
|
1726
|
+
import { jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
1276
1727
|
function resolveActionVariant(action, index, seenPrimary) {
|
|
1277
1728
|
const requested = action.variant ?? (index === 0 ? "primary" : "secondary");
|
|
1278
1729
|
if (requested === "primary" && !seenPrimary) {
|
|
@@ -1284,7 +1735,7 @@ function resolveActionVariant(action, index, seenPrimary) {
|
|
|
1284
1735
|
return { variant: "default", seenPrimary };
|
|
1285
1736
|
}
|
|
1286
1737
|
function HeroAction({ action, variant }) {
|
|
1287
|
-
const content = /* @__PURE__ */
|
|
1738
|
+
const content = /* @__PURE__ */ jsx30(
|
|
1288
1739
|
Anchor4,
|
|
1289
1740
|
{
|
|
1290
1741
|
href: action.href,
|
|
@@ -1309,8 +1760,8 @@ function HeroAction({ action, variant }) {
|
|
|
1309
1760
|
}
|
|
1310
1761
|
);
|
|
1311
1762
|
if (!action.href) {
|
|
1312
|
-
return /* @__PURE__ */
|
|
1313
|
-
|
|
1763
|
+
return /* @__PURE__ */ jsx30(
|
|
1764
|
+
Box9,
|
|
1314
1765
|
{
|
|
1315
1766
|
component: "button",
|
|
1316
1767
|
type: "button",
|
|
@@ -1337,30 +1788,30 @@ function HeroAction({ action, variant }) {
|
|
|
1337
1788
|
return content;
|
|
1338
1789
|
}
|
|
1339
1790
|
function LoadingHero({ compact }) {
|
|
1340
|
-
return /* @__PURE__ */
|
|
1341
|
-
/* @__PURE__ */
|
|
1342
|
-
/* @__PURE__ */
|
|
1343
|
-
/* @__PURE__ */
|
|
1344
|
-
/* @__PURE__ */
|
|
1345
|
-
/* @__PURE__ */
|
|
1346
|
-
/* @__PURE__ */
|
|
1347
|
-
/* @__PURE__ */
|
|
1348
|
-
/* @__PURE__ */
|
|
1791
|
+
return /* @__PURE__ */ jsx30(Paper6, { withBorder: true, radius: "xl", p: compact ? "lg" : "xl", children: /* @__PURE__ */ jsxs25(Grid2, { gutter: compact ? "lg" : "xl", align: "center", children: [
|
|
1792
|
+
/* @__PURE__ */ jsx30(Grid2.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsxs25(Stack25, { gap: "md", children: [
|
|
1793
|
+
/* @__PURE__ */ jsx30(Skeleton3, { height: 16, width: 96, radius: "xl" }),
|
|
1794
|
+
/* @__PURE__ */ jsx30(Skeleton3, { height: 48, width: "90%", radius: "md" }),
|
|
1795
|
+
/* @__PURE__ */ jsx30(Skeleton3, { height: 18, width: "100%", radius: "md" }),
|
|
1796
|
+
/* @__PURE__ */ jsx30(Skeleton3, { height: 18, width: "82%", radius: "md" }),
|
|
1797
|
+
/* @__PURE__ */ jsxs25(Group23, { children: [
|
|
1798
|
+
/* @__PURE__ */ jsx30(Skeleton3, { height: 40, width: 140, radius: "md" }),
|
|
1799
|
+
/* @__PURE__ */ jsx30(Skeleton3, { height: 40, width: 140, radius: "md" })
|
|
1349
1800
|
] })
|
|
1350
1801
|
] }) }),
|
|
1351
|
-
/* @__PURE__ */
|
|
1802
|
+
/* @__PURE__ */ jsx30(Grid2.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx30(AspectRatio5, { ratio: 16 / 11, children: /* @__PURE__ */ jsx30(Skeleton3, { radius: "lg" }) }) })
|
|
1352
1803
|
] }) });
|
|
1353
1804
|
}
|
|
1354
1805
|
function MediaFallback() {
|
|
1355
|
-
return /* @__PURE__ */
|
|
1356
|
-
|
|
1806
|
+
return /* @__PURE__ */ jsx30(AspectRatio5, { ratio: 16 / 11, children: /* @__PURE__ */ jsx30(
|
|
1807
|
+
ThemeIcon8,
|
|
1357
1808
|
{
|
|
1358
1809
|
size: "100%",
|
|
1359
1810
|
radius: "lg",
|
|
1360
1811
|
color: "gray",
|
|
1361
1812
|
variant: "light",
|
|
1362
1813
|
"aria-label": "Hero media is unavailable",
|
|
1363
|
-
children: /* @__PURE__ */
|
|
1814
|
+
children: /* @__PURE__ */ jsx30(GdsIcons.Gallery, { size: "2.5rem" })
|
|
1364
1815
|
}
|
|
1365
1816
|
) });
|
|
1366
1817
|
}
|
|
@@ -1380,8 +1831,8 @@ function MediaFrame({
|
|
|
1380
1831
|
} else if (mediaFade === "soft-start") {
|
|
1381
1832
|
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
1833
|
}
|
|
1383
|
-
return /* @__PURE__ */
|
|
1384
|
-
|
|
1834
|
+
return /* @__PURE__ */ jsxs25(
|
|
1835
|
+
Box9,
|
|
1385
1836
|
{
|
|
1386
1837
|
component: "figure",
|
|
1387
1838
|
m: 0,
|
|
@@ -1394,9 +1845,9 @@ function MediaFrame({
|
|
|
1394
1845
|
},
|
|
1395
1846
|
"aria-label": mediaAlt,
|
|
1396
1847
|
children: [
|
|
1397
|
-
media ?? /* @__PURE__ */
|
|
1398
|
-
media && overlayBackground ? /* @__PURE__ */
|
|
1399
|
-
|
|
1848
|
+
media ?? /* @__PURE__ */ jsx30(MediaFallback, {}),
|
|
1849
|
+
media && overlayBackground ? /* @__PURE__ */ jsx30(
|
|
1850
|
+
Box9,
|
|
1400
1851
|
{
|
|
1401
1852
|
"aria-hidden": true,
|
|
1402
1853
|
style: {
|
|
@@ -1429,7 +1880,7 @@ function EditorialHero({
|
|
|
1429
1880
|
classNames
|
|
1430
1881
|
}) {
|
|
1431
1882
|
if (loading) {
|
|
1432
|
-
return /* @__PURE__ */
|
|
1883
|
+
return /* @__PURE__ */ jsx30(LoadingHero, { compact });
|
|
1433
1884
|
}
|
|
1434
1885
|
const stackAlign = align === "center" ? "center" : "flex-start";
|
|
1435
1886
|
const textAlign = align === "center" ? "center" : "left";
|
|
@@ -1437,15 +1888,15 @@ function EditorialHero({
|
|
|
1437
1888
|
const renderedActions = actions.slice(0, 3).map((action, index) => {
|
|
1438
1889
|
const resolved = resolveActionVariant(action, index, seenPrimary);
|
|
1439
1890
|
seenPrimary = resolved.seenPrimary;
|
|
1440
|
-
return /* @__PURE__ */
|
|
1891
|
+
return /* @__PURE__ */ jsx30(HeroAction, { action, variant: resolved.variant }, `${action.label}-${index}`);
|
|
1441
1892
|
});
|
|
1442
|
-
const textSlot = /* @__PURE__ */
|
|
1443
|
-
/* @__PURE__ */
|
|
1444
|
-
eyebrow ? /* @__PURE__ */
|
|
1445
|
-
/* @__PURE__ */
|
|
1446
|
-
description ? /* @__PURE__ */
|
|
1893
|
+
const textSlot = /* @__PURE__ */ jsxs25(Stack25, { gap: compact ? "md" : "lg", justify: "center", h: "100%", className: classNames?.content, children: [
|
|
1894
|
+
/* @__PURE__ */ jsxs25(Stack25, { gap: "sm", align: stackAlign, children: [
|
|
1895
|
+
eyebrow ? /* @__PURE__ */ jsx30(Text21, { size: "sm", fw: 700, c: "dimmed", ta: textAlign, children: eyebrow }) : null,
|
|
1896
|
+
/* @__PURE__ */ jsx30(Title18, { order: 1, maw: 760, ta: textAlign, children: title }),
|
|
1897
|
+
description ? /* @__PURE__ */ jsx30(Text21, { size: compact ? "md" : "lg", c: "dimmed", maw: 720, ta: textAlign, children: description }) : null
|
|
1447
1898
|
] }),
|
|
1448
|
-
renderedActions.length ? /* @__PURE__ */
|
|
1899
|
+
renderedActions.length ? /* @__PURE__ */ jsx30(Box9, { className: classNames?.actions, children: /* @__PURE__ */ jsx30(
|
|
1449
1900
|
CtaButtonGroup,
|
|
1450
1901
|
{
|
|
1451
1902
|
primary: renderedActions[0],
|
|
@@ -1453,8 +1904,8 @@ function EditorialHero({
|
|
|
1453
1904
|
tertiary: renderedActions[2]
|
|
1454
1905
|
}
|
|
1455
1906
|
) }) : null,
|
|
1456
|
-
meta.length ? /* @__PURE__ */
|
|
1457
|
-
|
|
1907
|
+
meta.length ? /* @__PURE__ */ jsx30(Group23, { gap: "sm", wrap: "wrap", "aria-label": "Supporting details", className: classNames?.meta, children: meta.map((item) => /* @__PURE__ */ jsxs25(
|
|
1908
|
+
Group23,
|
|
1458
1909
|
{
|
|
1459
1910
|
gap: 6,
|
|
1460
1911
|
px: "sm",
|
|
@@ -1465,17 +1916,17 @@ function EditorialHero({
|
|
|
1465
1916
|
},
|
|
1466
1917
|
children: [
|
|
1467
1918
|
item.icon,
|
|
1468
|
-
/* @__PURE__ */
|
|
1919
|
+
/* @__PURE__ */ jsx30(Text21, { size: "sm", c: "dimmed", children: item.label })
|
|
1469
1920
|
]
|
|
1470
1921
|
},
|
|
1471
1922
|
item.id
|
|
1472
1923
|
)) }) : null
|
|
1473
1924
|
] });
|
|
1474
|
-
const mediaSlot = error ? /* @__PURE__ */
|
|
1475
|
-
const textCol = /* @__PURE__ */
|
|
1476
|
-
const mediaCol = /* @__PURE__ */
|
|
1477
|
-
return /* @__PURE__ */
|
|
1478
|
-
|
|
1925
|
+
const mediaSlot = error ? /* @__PURE__ */ jsx30(AccentPanel, { tone: "red", variant: "soft-outline", title: "Media unavailable", children: error }) : /* @__PURE__ */ jsx30(MediaFrame, { media, mediaAlt, mediaFade, className: classNames?.media });
|
|
1926
|
+
const textCol = /* @__PURE__ */ jsx30(Grid2.Col, { span: { base: 12, md: 6 }, order: { base: 1, md: mediaPosition === "left" ? 2 : 1 }, children: textSlot });
|
|
1927
|
+
const mediaCol = /* @__PURE__ */ jsx30(Grid2.Col, { span: { base: 12, md: 6 }, order: { base: 2, md: mediaPosition === "left" ? 1 : 2 }, children: mediaSlot });
|
|
1928
|
+
return /* @__PURE__ */ jsx30(
|
|
1929
|
+
Paper6,
|
|
1479
1930
|
{
|
|
1480
1931
|
component: "section",
|
|
1481
1932
|
withBorder: true,
|
|
@@ -1483,7 +1934,7 @@ function EditorialHero({
|
|
|
1483
1934
|
p: compact ? "lg" : "xl",
|
|
1484
1935
|
className: classNames?.root,
|
|
1485
1936
|
style: surfaceVariant === "flat-public" ? { boxShadow: "none" } : void 0,
|
|
1486
|
-
children: /* @__PURE__ */
|
|
1937
|
+
children: /* @__PURE__ */ jsxs25(Grid2, { gutter: compact ? "lg" : "xl", align: "center", children: [
|
|
1487
1938
|
textCol,
|
|
1488
1939
|
mediaCol
|
|
1489
1940
|
] })
|
|
@@ -1492,19 +1943,19 @@ function EditorialHero({
|
|
|
1492
1943
|
}
|
|
1493
1944
|
|
|
1494
1945
|
// src/FeatureBand.tsx
|
|
1495
|
-
import { Box as
|
|
1496
|
-
import { Fragment as
|
|
1946
|
+
import { Box as Box10, Group as Group24, Paper as Paper7, SimpleGrid as SimpleGrid5, Skeleton as Skeleton4, Stack as Stack26, Text as Text22, ThemeIcon as ThemeIcon9, Title as Title19 } from "@mantine/core";
|
|
1947
|
+
import { Fragment as Fragment5, jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
1497
1948
|
function FeatureBandSkeleton({
|
|
1498
1949
|
columns = 3,
|
|
1499
1950
|
bordered = true,
|
|
1500
1951
|
variant = "default"
|
|
1501
1952
|
}) {
|
|
1502
|
-
return /* @__PURE__ */
|
|
1503
|
-
/* @__PURE__ */
|
|
1504
|
-
/* @__PURE__ */
|
|
1505
|
-
/* @__PURE__ */
|
|
1506
|
-
/* @__PURE__ */
|
|
1507
|
-
/* @__PURE__ */
|
|
1953
|
+
return /* @__PURE__ */ jsx31(SimpleGrid5, { cols: { base: 1, sm: Math.min(columns, 2), lg: columns }, spacing: "lg", children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */ jsx31(Paper7, { withBorder: bordered, radius: "lg", p: variant === "compact" ? "md" : "lg", children: /* @__PURE__ */ jsxs26(Stack26, { gap: "md", children: [
|
|
1954
|
+
/* @__PURE__ */ jsx31(Skeleton4, { height: variant === "process" ? 28 : 42, width: variant === "process" ? 72 : 42, radius: "xl" }),
|
|
1955
|
+
/* @__PURE__ */ jsxs26(Stack26, { gap: "xs", children: [
|
|
1956
|
+
/* @__PURE__ */ jsx31(Skeleton4, { height: 20, width: "75%", radius: "md" }),
|
|
1957
|
+
/* @__PURE__ */ jsx31(Skeleton4, { height: 14, width: "100%", radius: "md" }),
|
|
1958
|
+
/* @__PURE__ */ jsx31(Skeleton4, { height: 14, width: "82%", radius: "md" })
|
|
1508
1959
|
] })
|
|
1509
1960
|
] }) }, index)) });
|
|
1510
1961
|
}
|
|
@@ -1517,10 +1968,10 @@ function FeatureBand({
|
|
|
1517
1968
|
variant = "default"
|
|
1518
1969
|
}) {
|
|
1519
1970
|
if (loading) {
|
|
1520
|
-
return /* @__PURE__ */
|
|
1971
|
+
return /* @__PURE__ */ jsx31(FeatureBandSkeleton, { columns, bordered, variant });
|
|
1521
1972
|
}
|
|
1522
1973
|
if (!items.length) {
|
|
1523
|
-
return emptyState ? /* @__PURE__ */
|
|
1974
|
+
return emptyState ? /* @__PURE__ */ jsx31(Fragment5, { children: emptyState }) : /* @__PURE__ */ jsx31(
|
|
1524
1975
|
EmptyState,
|
|
1525
1976
|
{
|
|
1526
1977
|
title: "No supporting details available",
|
|
@@ -1528,9 +1979,9 @@ function FeatureBand({
|
|
|
1528
1979
|
}
|
|
1529
1980
|
);
|
|
1530
1981
|
}
|
|
1531
|
-
return /* @__PURE__ */
|
|
1532
|
-
variant === "process" ? /* @__PURE__ */
|
|
1533
|
-
|
|
1982
|
+
return /* @__PURE__ */ jsx31(Box10, { component: "section", "aria-label": "Supporting features", children: /* @__PURE__ */ jsx31(SimpleGrid5, { cols: { base: 1, sm: Math.min(columns, 2), lg: columns }, spacing: "lg", children: items.map((item, index) => /* @__PURE__ */ jsx31(Paper7, { withBorder: bordered, radius: "lg", p: variant === "compact" ? "md" : "lg", children: /* @__PURE__ */ jsxs26(Stack26, { gap: "md", children: [
|
|
1983
|
+
variant === "process" ? /* @__PURE__ */ jsx31(Group24, { children: /* @__PURE__ */ jsx31(
|
|
1984
|
+
Text22,
|
|
1534
1985
|
{
|
|
1535
1986
|
fw: 800,
|
|
1536
1987
|
size: "sm",
|
|
@@ -1542,30 +1993,276 @@ function FeatureBand({
|
|
|
1542
1993
|
},
|
|
1543
1994
|
children: item.stepLabel ?? `Step ${index + 1}`
|
|
1544
1995
|
}
|
|
1545
|
-
) }) : item.media ? item.media : item.icon ? /* @__PURE__ */
|
|
1546
|
-
/* @__PURE__ */
|
|
1547
|
-
/* @__PURE__ */
|
|
1548
|
-
item.description ? /* @__PURE__ */
|
|
1549
|
-
item.meta ? /* @__PURE__ */
|
|
1996
|
+
) }) : item.media ? item.media : item.icon ? /* @__PURE__ */ jsx31(Group24, { children: /* @__PURE__ */ jsx31(ThemeIcon9, { size: "xl", radius: "xl", variant: "light", color: "violet", children: item.icon }) }) : /* @__PURE__ */ jsx31(Group24, { children: /* @__PURE__ */ jsx31(ThemeIcon9, { size: "xl", radius: "xl", variant: "light", color: "gray", "aria-hidden": true, children: /* @__PURE__ */ jsx31(GdsIcons.Info, { size: "1.25rem" }) }) }),
|
|
1997
|
+
/* @__PURE__ */ jsxs26(Stack26, { gap: "xs", children: [
|
|
1998
|
+
/* @__PURE__ */ jsx31(Title19, { order: 4, children: item.title }),
|
|
1999
|
+
item.description ? /* @__PURE__ */ jsx31(Text22, { c: "dimmed", children: item.description }) : null,
|
|
2000
|
+
item.meta ? /* @__PURE__ */ jsx31(Text22, { size: "sm", c: "dimmed", children: item.meta }) : null
|
|
1550
2001
|
] })
|
|
1551
2002
|
] }) }, item.id)) }) });
|
|
1552
2003
|
}
|
|
1553
2004
|
|
|
2005
|
+
// src/MapPanel.tsx
|
|
2006
|
+
import { AspectRatio as AspectRatio6, Box as Box11, Group as Group25, Paper as Paper8, Stack as Stack27, Text as Text23, Title as Title20 } from "@mantine/core";
|
|
2007
|
+
import { jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2008
|
+
function MapPanel({
|
|
2009
|
+
title,
|
|
2010
|
+
description,
|
|
2011
|
+
actions,
|
|
2012
|
+
loading = false,
|
|
2013
|
+
empty,
|
|
2014
|
+
error,
|
|
2015
|
+
embedTitle,
|
|
2016
|
+
iframeSrc,
|
|
2017
|
+
iframeSandbox = "allow-scripts allow-same-origin allow-popups",
|
|
2018
|
+
renderMap,
|
|
2019
|
+
minHeight = 320
|
|
2020
|
+
}) {
|
|
2021
|
+
let body;
|
|
2022
|
+
if (loading) {
|
|
2023
|
+
body = /* @__PURE__ */ jsx32(
|
|
2024
|
+
StateBlock,
|
|
2025
|
+
{
|
|
2026
|
+
variant: "loading",
|
|
2027
|
+
title: "Loading map",
|
|
2028
|
+
description: "The shared map panel is still preparing the embedded surface.",
|
|
2029
|
+
compact: true
|
|
2030
|
+
}
|
|
2031
|
+
);
|
|
2032
|
+
} else if (error) {
|
|
2033
|
+
body = /* @__PURE__ */ jsx32(StateBlock, { variant: "error", title: "Map unavailable", description: error, compact: true });
|
|
2034
|
+
} else if (!iframeSrc && !renderMap) {
|
|
2035
|
+
body = /* @__PURE__ */ jsx32(
|
|
2036
|
+
StateBlock,
|
|
2037
|
+
{
|
|
2038
|
+
variant: "empty",
|
|
2039
|
+
title: "No map available",
|
|
2040
|
+
description: empty ?? "Add coordinates or a sanctioned embed source to render this panel.",
|
|
2041
|
+
compact: true
|
|
2042
|
+
}
|
|
2043
|
+
);
|
|
2044
|
+
} else if (renderMap) {
|
|
2045
|
+
body = /* @__PURE__ */ jsx32(Box11, { style: { minHeight }, children: renderMap() });
|
|
2046
|
+
} else {
|
|
2047
|
+
body = /* @__PURE__ */ jsx32(AspectRatio6, { ratio: 16 / 9, children: /* @__PURE__ */ jsx32(
|
|
2048
|
+
"iframe",
|
|
2049
|
+
{
|
|
2050
|
+
src: iframeSrc,
|
|
2051
|
+
title: embedTitle ?? "Embedded map",
|
|
2052
|
+
sandbox: iframeSandbox,
|
|
2053
|
+
loading: "lazy",
|
|
2054
|
+
referrerPolicy: "no-referrer-when-downgrade",
|
|
2055
|
+
style: { width: "100%", height: "100%", border: 0, borderRadius: 12 }
|
|
2056
|
+
}
|
|
2057
|
+
) });
|
|
2058
|
+
}
|
|
2059
|
+
return /* @__PURE__ */ jsx32(Paper8, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ jsxs27(Stack27, { gap: "md", children: [
|
|
2060
|
+
/* @__PURE__ */ jsxs27(Group25, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
2061
|
+
/* @__PURE__ */ jsxs27(Stack27, { gap: 4, children: [
|
|
2062
|
+
/* @__PURE__ */ jsx32(Title20, { order: 3, children: title }),
|
|
2063
|
+
description ? /* @__PURE__ */ jsx32(Text23, { size: "sm", c: "dimmed", children: description }) : null
|
|
2064
|
+
] }),
|
|
2065
|
+
actions ? /* @__PURE__ */ jsx32(ActionBar, { ...actions }) : null
|
|
2066
|
+
] }),
|
|
2067
|
+
body
|
|
2068
|
+
] }) });
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
// src/PublicFlowShell.tsx
|
|
2072
|
+
import { Badge as Badge12, Group as Group26, Paper as Paper9, Stack as Stack28, Text as Text24, Title as Title21 } from "@mantine/core";
|
|
2073
|
+
import { jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2074
|
+
var stageTone = {
|
|
2075
|
+
idle: { label: "Idle", color: "gray" },
|
|
2076
|
+
loading: { label: "Loading", color: "blue" },
|
|
2077
|
+
ready: { label: "Ready", color: "teal" },
|
|
2078
|
+
error: { label: "Error", color: "red" },
|
|
2079
|
+
complete: { label: "Complete", color: "teal" }
|
|
2080
|
+
};
|
|
2081
|
+
function toActionBar(actions = []) {
|
|
2082
|
+
if (!actions.length) {
|
|
2083
|
+
return void 0;
|
|
2084
|
+
}
|
|
2085
|
+
const ordered = [...actions].sort((left, right) => {
|
|
2086
|
+
const rank = { primary: 0, secondary: 1, tertiary: 2 };
|
|
2087
|
+
return rank[left.priority] - rank[right.priority];
|
|
2088
|
+
});
|
|
2089
|
+
const primary = ordered.find((action) => action.priority === "primary");
|
|
2090
|
+
const secondary = ordered.filter((action) => action.priority === "secondary");
|
|
2091
|
+
const tertiary = ordered.filter((action) => action.priority === "tertiary");
|
|
2092
|
+
return {
|
|
2093
|
+
primary: primary ? {
|
|
2094
|
+
action: primary.action,
|
|
2095
|
+
disabled: primary.disabled,
|
|
2096
|
+
loading: primary.loading,
|
|
2097
|
+
onClick: primary.onClick
|
|
2098
|
+
} : void 0,
|
|
2099
|
+
secondary: secondary.map((action) => ({
|
|
2100
|
+
action: action.action,
|
|
2101
|
+
disabled: action.disabled,
|
|
2102
|
+
loading: action.loading,
|
|
2103
|
+
onClick: action.onClick
|
|
2104
|
+
})),
|
|
2105
|
+
tertiary: tertiary.map((action) => ({
|
|
2106
|
+
action: action.action,
|
|
2107
|
+
disabled: action.disabled,
|
|
2108
|
+
loading: action.loading,
|
|
2109
|
+
onClick: action.onClick
|
|
2110
|
+
}))
|
|
2111
|
+
};
|
|
2112
|
+
}
|
|
2113
|
+
function PublicFlowShell({
|
|
2114
|
+
stage,
|
|
2115
|
+
eyebrow,
|
|
2116
|
+
exitAction,
|
|
2117
|
+
hardwareSurface,
|
|
2118
|
+
emptyState,
|
|
2119
|
+
errorState
|
|
2120
|
+
}) {
|
|
2121
|
+
const tone = stageTone[stage.status];
|
|
2122
|
+
const actionBar = toActionBar(stage.actions);
|
|
2123
|
+
let body = stage.body;
|
|
2124
|
+
if (stage.status === "loading") {
|
|
2125
|
+
body = /* @__PURE__ */ jsx33(
|
|
2126
|
+
StateBlock,
|
|
2127
|
+
{
|
|
2128
|
+
variant: "loading",
|
|
2129
|
+
title: "Preparing flow",
|
|
2130
|
+
description: stage.description ?? "The current public flow stage is still loading."
|
|
2131
|
+
}
|
|
2132
|
+
);
|
|
2133
|
+
} else if (stage.status === "error") {
|
|
2134
|
+
body = errorState ?? /* @__PURE__ */ jsx33(
|
|
2135
|
+
StateBlock,
|
|
2136
|
+
{
|
|
2137
|
+
variant: "error",
|
|
2138
|
+
title: "Flow unavailable",
|
|
2139
|
+
description: stage.description ?? "This public flow could not continue safely."
|
|
2140
|
+
}
|
|
2141
|
+
);
|
|
2142
|
+
} else if (!stage.body && !hardwareSurface) {
|
|
2143
|
+
body = emptyState ?? /* @__PURE__ */ jsx33(
|
|
2144
|
+
EmptyState,
|
|
2145
|
+
{
|
|
2146
|
+
title: "No stage content available",
|
|
2147
|
+
description: "Add the current flow stage body or a bounded hardware surface to render this contract."
|
|
2148
|
+
}
|
|
2149
|
+
);
|
|
2150
|
+
}
|
|
2151
|
+
return /* @__PURE__ */ jsx33(Paper9, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ jsxs28(Stack28, { gap: "lg", children: [
|
|
2152
|
+
/* @__PURE__ */ jsxs28(Group26, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
2153
|
+
/* @__PURE__ */ jsxs28(Stack28, { gap: 4, children: [
|
|
2154
|
+
eyebrow ? /* @__PURE__ */ jsx33(Text24, { size: "xs", fw: 700, c: "dimmed", tt: "uppercase", children: eyebrow }) : null,
|
|
2155
|
+
/* @__PURE__ */ jsxs28(Group26, { gap: "sm", wrap: "wrap", children: [
|
|
2156
|
+
/* @__PURE__ */ jsx33(Title21, { order: 2, children: stage.title }),
|
|
2157
|
+
/* @__PURE__ */ jsx33(Badge12, { variant: "light", color: tone.color, children: tone.label })
|
|
2158
|
+
] }),
|
|
2159
|
+
stage.description ? /* @__PURE__ */ jsx33(Text24, { size: "sm", c: "dimmed", children: stage.description }) : null
|
|
2160
|
+
] }),
|
|
2161
|
+
exitAction
|
|
2162
|
+
] }),
|
|
2163
|
+
stage.notice ? /* @__PURE__ */ jsx33(Text24, { size: "sm", c: "dimmed", children: stage.notice }) : null,
|
|
2164
|
+
body,
|
|
2165
|
+
hardwareSurface,
|
|
2166
|
+
stage.aside,
|
|
2167
|
+
actionBar ? /* @__PURE__ */ jsx33(ActionBar, { ...actionBar }) : null
|
|
2168
|
+
] }) });
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
// src/PlaybackSurface.tsx
|
|
2172
|
+
import { Badge as Badge13, Group as Group27, Paper as Paper10, Stack as Stack29, Text as Text25, Title as Title22 } from "@mantine/core";
|
|
2173
|
+
import { jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2174
|
+
var stateTone = {
|
|
2175
|
+
loading: { label: "Loading", color: "blue" },
|
|
2176
|
+
ready: { label: "Ready", color: "teal" },
|
|
2177
|
+
playing: { label: "Playing", color: "teal" },
|
|
2178
|
+
empty: { label: "Empty", color: "gray" },
|
|
2179
|
+
error: { label: "Error", color: "red" },
|
|
2180
|
+
degraded: { label: "Degraded", color: "orange" }
|
|
2181
|
+
};
|
|
2182
|
+
function PlaybackSurface({
|
|
2183
|
+
title,
|
|
2184
|
+
state,
|
|
2185
|
+
media,
|
|
2186
|
+
statusMessage,
|
|
2187
|
+
controls,
|
|
2188
|
+
emptyState,
|
|
2189
|
+
errorState,
|
|
2190
|
+
overlays,
|
|
2191
|
+
mode = "embedded"
|
|
2192
|
+
}) {
|
|
2193
|
+
const tone = stateTone[state];
|
|
2194
|
+
let content;
|
|
2195
|
+
if (state === "loading") {
|
|
2196
|
+
content = /* @__PURE__ */ jsx34(
|
|
2197
|
+
StateBlock,
|
|
2198
|
+
{
|
|
2199
|
+
variant: "loading",
|
|
2200
|
+
title: "Loading playback",
|
|
2201
|
+
description: "The playback surface is still preparing timed or fullscreen media."
|
|
2202
|
+
}
|
|
2203
|
+
);
|
|
2204
|
+
} else if (state === "empty") {
|
|
2205
|
+
content = emptyState ?? /* @__PURE__ */ jsx34(
|
|
2206
|
+
EmptyState,
|
|
2207
|
+
{
|
|
2208
|
+
title: "No playback content available",
|
|
2209
|
+
description: "Add media assets or a playlist to render this playback surface."
|
|
2210
|
+
}
|
|
2211
|
+
);
|
|
2212
|
+
} else if (state === "error") {
|
|
2213
|
+
content = errorState ?? /* @__PURE__ */ jsx34(
|
|
2214
|
+
StateBlock,
|
|
2215
|
+
{
|
|
2216
|
+
variant: "error",
|
|
2217
|
+
title: "Playback unavailable",
|
|
2218
|
+
description: "The playback surface could not render the current media safely."
|
|
2219
|
+
}
|
|
2220
|
+
);
|
|
2221
|
+
} else {
|
|
2222
|
+
content = /* @__PURE__ */ jsxs29(Stack29, { gap: "md", children: [
|
|
2223
|
+
media,
|
|
2224
|
+
overlays
|
|
2225
|
+
] });
|
|
2226
|
+
}
|
|
2227
|
+
return /* @__PURE__ */ jsx34(Paper10, { withBorder: true, radius: "xl", p: "lg", "data-playback-mode": mode, children: /* @__PURE__ */ jsxs29(Stack29, { gap: "md", children: [
|
|
2228
|
+
title || statusMessage || controls ? /* @__PURE__ */ jsxs29(Group27, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
2229
|
+
/* @__PURE__ */ jsxs29(Stack29, { gap: 4, children: [
|
|
2230
|
+
title ? /* @__PURE__ */ jsx34(Title22, { order: 3, children: title }) : null,
|
|
2231
|
+
statusMessage ? /* @__PURE__ */ jsx34(Text25, { size: "sm", c: "dimmed", children: statusMessage }) : null
|
|
2232
|
+
] }),
|
|
2233
|
+
/* @__PURE__ */ jsxs29(Group27, { gap: "sm", align: "center", wrap: "wrap", children: [
|
|
2234
|
+
/* @__PURE__ */ jsx34(Badge13, { variant: "light", color: tone.color, children: tone.label }),
|
|
2235
|
+
controls
|
|
2236
|
+
] })
|
|
2237
|
+
] }) : null,
|
|
2238
|
+
state === "degraded" ? /* @__PURE__ */ jsx34(
|
|
2239
|
+
StateBlock,
|
|
2240
|
+
{
|
|
2241
|
+
variant: "info",
|
|
2242
|
+
title: "Playback degraded",
|
|
2243
|
+
description: statusMessage ?? "Playback is continuing with reduced fidelity or recoverable media failures.",
|
|
2244
|
+
compact: true
|
|
2245
|
+
}
|
|
2246
|
+
) : null,
|
|
2247
|
+
content
|
|
2248
|
+
] }) });
|
|
2249
|
+
}
|
|
2250
|
+
|
|
1554
2251
|
// src/FormField.tsx
|
|
1555
|
-
import { Box as
|
|
1556
|
-
import { jsx as
|
|
2252
|
+
import { Box as Box12, Stack as Stack30, Text as Text26 } from "@mantine/core";
|
|
2253
|
+
import { jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
1557
2254
|
function FormField({ label, description, error, children }) {
|
|
1558
|
-
return /* @__PURE__ */
|
|
1559
|
-
typeof label === "string" ? /* @__PURE__ */
|
|
1560
|
-
description ? typeof description === "string" ? /* @__PURE__ */
|
|
2255
|
+
return /* @__PURE__ */ jsx35(Box12, { component: "label", children: /* @__PURE__ */ jsxs30(Stack30, { gap: 4, children: [
|
|
2256
|
+
typeof label === "string" ? /* @__PURE__ */ jsx35(Text26, { size: "xs", fw: 600, c: "dimmed", children: label }) : label,
|
|
2257
|
+
description ? typeof description === "string" ? /* @__PURE__ */ jsx35(Text26, { size: "xs", c: "dimmed", children: description }) : description : null,
|
|
1561
2258
|
children,
|
|
1562
|
-
error ? typeof error === "string" ? /* @__PURE__ */
|
|
2259
|
+
error ? typeof error === "string" ? /* @__PURE__ */ jsx35(Text26, { size: "xs", c: "red.7", children: error }) : error : null
|
|
1563
2260
|
] }) });
|
|
1564
2261
|
}
|
|
1565
2262
|
|
|
1566
2263
|
// src/MediaField.tsx
|
|
1567
|
-
import { Badge as
|
|
1568
|
-
import { Fragment as
|
|
2264
|
+
import { Badge as Badge14, Button as Button4, Divider as Divider6, Group as Group28, Paper as Paper11, Stack as Stack31, Text as Text27 } from "@mantine/core";
|
|
2265
|
+
import { Fragment as Fragment6, jsx as jsx36, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
1569
2266
|
var stateLabels = {
|
|
1570
2267
|
empty: { label: "Empty", color: "gray" },
|
|
1571
2268
|
selected: { label: "Selected", color: "blue" },
|
|
@@ -1593,32 +2290,32 @@ function MediaField({
|
|
|
1593
2290
|
mode = "stacked"
|
|
1594
2291
|
}) {
|
|
1595
2292
|
const stateBadge = stateLabels[state];
|
|
1596
|
-
const resolvedRemoveAction = removeAction ?? (onRemove ? /* @__PURE__ */
|
|
1597
|
-
const resolvedResetAction = resetAction ?? (onReset ? /* @__PURE__ */
|
|
1598
|
-
return /* @__PURE__ */
|
|
2293
|
+
const resolvedRemoveAction = removeAction ?? (onRemove ? /* @__PURE__ */ jsx36(Button4, { type: "button", variant: "light", color: "red", onClick: onRemove, children: "Remove" }) : null);
|
|
2294
|
+
const resolvedResetAction = resetAction ?? (onReset ? /* @__PURE__ */ jsx36(Button4, { type: "button", variant: "default", onClick: onReset, children: "Reset" }) : null);
|
|
2295
|
+
return /* @__PURE__ */ jsx36(
|
|
1599
2296
|
FormField,
|
|
1600
2297
|
{
|
|
1601
2298
|
label,
|
|
1602
2299
|
description,
|
|
1603
2300
|
error,
|
|
1604
|
-
children: /* @__PURE__ */
|
|
1605
|
-
/* @__PURE__ */
|
|
1606
|
-
/* @__PURE__ */
|
|
2301
|
+
children: /* @__PURE__ */ jsx36(Paper11, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ jsxs31(Stack31, { gap: "md", children: [
|
|
2302
|
+
/* @__PURE__ */ jsx36(Group28, { justify: "flex-end", align: "center", gap: "sm", children: /* @__PURE__ */ jsxs31(Group28, { gap: "xs", justify: "flex-end", children: [
|
|
2303
|
+
/* @__PURE__ */ jsx36(Badge14, { variant: "light", color: stateBadge.color, children: stateBadge.label }),
|
|
1607
2304
|
statusAction
|
|
1608
2305
|
] }) }),
|
|
1609
2306
|
preview ? preview : null,
|
|
1610
|
-
uploadControl || urlInput ? /* @__PURE__ */
|
|
1611
|
-
/* @__PURE__ */
|
|
1612
|
-
/* @__PURE__ */
|
|
2307
|
+
uploadControl || urlInput ? /* @__PURE__ */ jsxs31(Fragment6, { children: [
|
|
2308
|
+
/* @__PURE__ */ jsx36(Divider6, {}),
|
|
2309
|
+
/* @__PURE__ */ jsxs31(Stack31, { gap: "sm", style: mode === "split" ? { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(220px, 1fr))" } : void 0, children: [
|
|
1613
2310
|
uploadControl,
|
|
1614
2311
|
urlInput
|
|
1615
2312
|
] })
|
|
1616
2313
|
] }) : null,
|
|
1617
|
-
value ? /* @__PURE__ */
|
|
1618
|
-
helpText ? /* @__PURE__ */
|
|
1619
|
-
policyText ? /* @__PURE__ */
|
|
2314
|
+
value ? /* @__PURE__ */ jsx36(Text27, { size: "sm", c: "dimmed", style: { wordBreak: "break-all" }, children: value }) : null,
|
|
2315
|
+
helpText ? /* @__PURE__ */ jsx36(Text27, { size: "sm", c: "dimmed", children: helpText }) : null,
|
|
2316
|
+
policyText ? /* @__PURE__ */ jsx36(Text27, { size: "sm", c: error ? "red.7" : "dimmed", children: policyText }) : null,
|
|
1620
2317
|
typeof error !== "string" && error ? error : null,
|
|
1621
|
-
resolvedRemoveAction || resolvedResetAction ? /* @__PURE__ */
|
|
2318
|
+
resolvedRemoveAction || resolvedResetAction ? /* @__PURE__ */ jsxs31(Group28, { gap: "sm", children: [
|
|
1622
2319
|
resolvedResetAction,
|
|
1623
2320
|
retryAction,
|
|
1624
2321
|
resolvedRemoveAction
|
|
@@ -1629,49 +2326,49 @@ function MediaField({
|
|
|
1629
2326
|
}
|
|
1630
2327
|
|
|
1631
2328
|
// src/MediaCard.tsx
|
|
1632
|
-
import { ActionIcon as
|
|
1633
|
-
import { jsx as
|
|
2329
|
+
import { ActionIcon as ActionIcon4, Badge as Badge15, Card as Card9, Group as Group29, Stack as Stack32, Text as Text28, Title as Title23 } from "@mantine/core";
|
|
2330
|
+
import { jsx as jsx37, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
1634
2331
|
function MediaCard({ title, image, description, status, overlay, actions = [] }) {
|
|
1635
2332
|
const EyeIcon = GdsIcons.Eye;
|
|
1636
|
-
return /* @__PURE__ */
|
|
1637
|
-
/* @__PURE__ */
|
|
2333
|
+
return /* @__PURE__ */ jsxs32(Card9, { withBorder: true, radius: "lg", padding: "md", children: [
|
|
2334
|
+
/* @__PURE__ */ jsxs32(Card9.Section, { pos: "relative", children: [
|
|
1638
2335
|
image,
|
|
1639
|
-
overlay ? /* @__PURE__ */
|
|
2336
|
+
overlay ? /* @__PURE__ */ jsx37("div", { style: { position: "absolute", inset: 12, display: "flex", justifyContent: "flex-end", alignItems: "flex-start" }, children: overlay }) : null
|
|
1640
2337
|
] }),
|
|
1641
|
-
/* @__PURE__ */
|
|
1642
|
-
/* @__PURE__ */
|
|
1643
|
-
/* @__PURE__ */
|
|
1644
|
-
/* @__PURE__ */
|
|
1645
|
-
description ? /* @__PURE__ */
|
|
2338
|
+
/* @__PURE__ */ jsxs32(Stack32, { gap: "sm", mt: "md", children: [
|
|
2339
|
+
/* @__PURE__ */ jsxs32(Group29, { justify: "space-between", align: "flex-start", children: [
|
|
2340
|
+
/* @__PURE__ */ jsxs32(Stack32, { gap: 4, children: [
|
|
2341
|
+
/* @__PURE__ */ jsx37(Title23, { order: 4, children: title }),
|
|
2342
|
+
description ? /* @__PURE__ */ jsx37(Text28, { size: "sm", c: "dimmed", lineClamp: 2, children: description }) : null
|
|
1646
2343
|
] }),
|
|
1647
|
-
status ? /* @__PURE__ */
|
|
2344
|
+
status ? /* @__PURE__ */ jsx37(Badge15, { variant: "light", children: status }) : null
|
|
1648
2345
|
] }),
|
|
1649
|
-
actions.length ? /* @__PURE__ */
|
|
2346
|
+
actions.length ? /* @__PURE__ */ jsx37(Group29, { justify: "flex-end", gap: "xs", children: actions.map((action) => /* @__PURE__ */ jsx37(ActionIcon4, { variant: "light", "aria-label": action.label, onClick: action.onClick, children: /* @__PURE__ */ jsx37(EyeIcon, { size: "1rem" }) }, action.label)) }) : null
|
|
1650
2347
|
] })
|
|
1651
2348
|
] });
|
|
1652
2349
|
}
|
|
1653
2350
|
|
|
1654
2351
|
// src/AccessSummary.tsx
|
|
1655
|
-
import { Badge as
|
|
1656
|
-
import { jsx as
|
|
2352
|
+
import { Badge as Badge16, Card as Card10, Group as Group30, Stack as Stack33, Text as Text29, Title as Title24 } from "@mantine/core";
|
|
2353
|
+
import { jsx as jsx38, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
1657
2354
|
function AccessSummary({ title, roles, scope, blocked = false, description }) {
|
|
1658
|
-
return /* @__PURE__ */
|
|
1659
|
-
/* @__PURE__ */
|
|
1660
|
-
/* @__PURE__ */
|
|
1661
|
-
/* @__PURE__ */
|
|
2355
|
+
return /* @__PURE__ */ jsx38(Card10, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ jsxs33(Stack33, { gap: "sm", children: [
|
|
2356
|
+
/* @__PURE__ */ jsxs33(Group30, { justify: "space-between", align: "center", children: [
|
|
2357
|
+
/* @__PURE__ */ jsx38(Title24, { order: 4, children: title }),
|
|
2358
|
+
/* @__PURE__ */ jsx38(Badge16, { color: blocked ? "red" : "teal", variant: "light", children: blocked ? "Blocked" : "Allowed" })
|
|
1662
2359
|
] }),
|
|
1663
|
-
/* @__PURE__ */
|
|
1664
|
-
scope ? /* @__PURE__ */
|
|
2360
|
+
/* @__PURE__ */ jsx38(Group30, { gap: "xs", children: roles.map((role) => /* @__PURE__ */ jsx38(Badge16, { variant: "outline", children: role }, role)) }),
|
|
2361
|
+
scope ? /* @__PURE__ */ jsxs33(Text29, { size: "sm", c: "dimmed", children: [
|
|
1665
2362
|
"Scope: ",
|
|
1666
2363
|
scope
|
|
1667
2364
|
] }) : null,
|
|
1668
|
-
description ? /* @__PURE__ */
|
|
2365
|
+
description ? /* @__PURE__ */ jsx38(Text29, { size: "sm", children: description }) : null
|
|
1669
2366
|
] }) });
|
|
1670
2367
|
}
|
|
1671
2368
|
|
|
1672
2369
|
// src/PageHeader.tsx
|
|
1673
|
-
import { Box as
|
|
1674
|
-
import { jsx as
|
|
2370
|
+
import { Box as Box13, Group as Group31, Stack as Stack34, Text as Text30, Title as Title25 } from "@mantine/core";
|
|
2371
|
+
import { jsx as jsx39, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
1675
2372
|
function PageHeader({
|
|
1676
2373
|
title,
|
|
1677
2374
|
description,
|
|
@@ -1682,19 +2379,19 @@ function PageHeader({
|
|
|
1682
2379
|
}) {
|
|
1683
2380
|
const resolvedDescription = description ?? subtitle;
|
|
1684
2381
|
const eyebrowProps = eyebrowVariant === "ornamental" ? { tt: "uppercase", style: { letterSpacing: "0.12em" } } : {};
|
|
1685
|
-
return /* @__PURE__ */
|
|
1686
|
-
/* @__PURE__ */
|
|
1687
|
-
eyebrow && /* @__PURE__ */
|
|
1688
|
-
/* @__PURE__ */
|
|
1689
|
-
resolvedDescription && /* @__PURE__ */
|
|
2382
|
+
return /* @__PURE__ */ jsxs34(Group31, { justify: "space-between", align: "flex-start", gap: "lg", wrap: "wrap", children: [
|
|
2383
|
+
/* @__PURE__ */ jsxs34(Stack34, { gap: "xs", children: [
|
|
2384
|
+
eyebrow && /* @__PURE__ */ jsx39(Text30, { size: "xs", fw: 700, c: "dimmed", ...eyebrowProps, children: eyebrow }),
|
|
2385
|
+
/* @__PURE__ */ jsx39(Title25, { order: 1, children: title }),
|
|
2386
|
+
resolvedDescription && /* @__PURE__ */ jsx39(Text30, { c: "dimmed", maw: 720, children: resolvedDescription })
|
|
1690
2387
|
] }),
|
|
1691
|
-
actions ? /* @__PURE__ */
|
|
2388
|
+
actions ? /* @__PURE__ */ jsx39(Box13, { children: actions }) : null
|
|
1692
2389
|
] });
|
|
1693
2390
|
}
|
|
1694
2391
|
|
|
1695
2392
|
// src/FilterDrawer.tsx
|
|
1696
|
-
import { Drawer, Group as
|
|
1697
|
-
import { jsx as
|
|
2393
|
+
import { Drawer, Group as Group32, Stack as Stack35, Text as Text31 } from "@mantine/core";
|
|
2394
|
+
import { jsx as jsx40, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
1698
2395
|
function FilterDrawer({
|
|
1699
2396
|
opened,
|
|
1700
2397
|
onClose,
|
|
@@ -1710,7 +2407,7 @@ function FilterDrawer({
|
|
|
1710
2407
|
}) {
|
|
1711
2408
|
const resolvedPrimaryAction = applyAction ?? primaryAction;
|
|
1712
2409
|
const resolvedSecondaryAction = resetAction ?? secondaryAction;
|
|
1713
|
-
return /* @__PURE__ */
|
|
2410
|
+
return /* @__PURE__ */ jsx40(
|
|
1714
2411
|
Drawer,
|
|
1715
2412
|
{
|
|
1716
2413
|
opened,
|
|
@@ -1719,11 +2416,11 @@ function FilterDrawer({
|
|
|
1719
2416
|
position: mode === "bottom-sheet" ? "bottom" : "right",
|
|
1720
2417
|
size: mode === "bottom-sheet" ? "auto" : "md",
|
|
1721
2418
|
radius: mode === "bottom-sheet" ? "xl" : void 0,
|
|
1722
|
-
children: /* @__PURE__ */
|
|
1723
|
-
description ? /* @__PURE__ */
|
|
2419
|
+
children: /* @__PURE__ */ jsxs35(Stack35, { gap: "md", children: [
|
|
2420
|
+
description ? /* @__PURE__ */ jsx40(Text31, { size: "sm", c: "dimmed", children: description }) : null,
|
|
1724
2421
|
children,
|
|
1725
|
-
resolvedPrimaryAction || resolvedSecondaryAction || closeAction ? /* @__PURE__ */
|
|
1726
|
-
/* @__PURE__ */
|
|
2422
|
+
resolvedPrimaryAction || resolvedSecondaryAction || closeAction ? /* @__PURE__ */ jsxs35(Group32, { justify: "space-between", mt: "md", children: [
|
|
2423
|
+
/* @__PURE__ */ jsxs35(Group32, { gap: "sm", children: [
|
|
1727
2424
|
closeAction,
|
|
1728
2425
|
resolvedSecondaryAction
|
|
1729
2426
|
] }),
|
|
@@ -1735,8 +2432,8 @@ function FilterDrawer({
|
|
|
1735
2432
|
}
|
|
1736
2433
|
|
|
1737
2434
|
// src/PlaceholderPanel.tsx
|
|
1738
|
-
import { Badge as
|
|
1739
|
-
import { Fragment as
|
|
2435
|
+
import { Badge as Badge17, Card as Card11, Stack as Stack36, Text as Text32, Title as Title26 } from "@mantine/core";
|
|
2436
|
+
import { Fragment as Fragment7, jsx as jsx41, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
1740
2437
|
function PlaceholderPanel({
|
|
1741
2438
|
title,
|
|
1742
2439
|
description,
|
|
@@ -1746,16 +2443,16 @@ function PlaceholderPanel({
|
|
|
1746
2443
|
mode
|
|
1747
2444
|
}) {
|
|
1748
2445
|
if (mode === "live" && children) {
|
|
1749
|
-
return /* @__PURE__ */
|
|
2446
|
+
return /* @__PURE__ */ jsx41(Fragment7, { children });
|
|
1750
2447
|
}
|
|
1751
|
-
return /* @__PURE__ */
|
|
1752
|
-
badge ? /* @__PURE__ */
|
|
1753
|
-
/* @__PURE__ */
|
|
1754
|
-
/* @__PURE__ */
|
|
1755
|
-
/* @__PURE__ */
|
|
2448
|
+
return /* @__PURE__ */ jsx41(Card11, { children: /* @__PURE__ */ jsxs36(Stack36, { gap: "md", children: [
|
|
2449
|
+
badge ? /* @__PURE__ */ jsx41(Badge17, { variant: "light", color: "blue", w: "fit-content", children: badge }) : null,
|
|
2450
|
+
/* @__PURE__ */ jsxs36(Stack36, { gap: "xs", children: [
|
|
2451
|
+
/* @__PURE__ */ jsx41(Title26, { order: 4, children: title }),
|
|
2452
|
+
/* @__PURE__ */ jsx41(Text32, { c: "dimmed", children: description })
|
|
1756
2453
|
] }),
|
|
1757
|
-
footer ? /* @__PURE__ */
|
|
1758
|
-
/* @__PURE__ */
|
|
2454
|
+
footer ? /* @__PURE__ */ jsx41(Text32, { size: "sm", children: footer }) : null,
|
|
2455
|
+
/* @__PURE__ */ jsx41(
|
|
1759
2456
|
StateBlock,
|
|
1760
2457
|
{
|
|
1761
2458
|
variant: "not-enough-data",
|
|
@@ -1769,7 +2466,7 @@ function PlaceholderPanel({
|
|
|
1769
2466
|
|
|
1770
2467
|
// src/SimpleDataTable.tsx
|
|
1771
2468
|
import { ScrollArea, Table } from "@mantine/core";
|
|
1772
|
-
import { jsx as
|
|
2469
|
+
import { jsx as jsx42, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
1773
2470
|
function SimpleDataTable({
|
|
1774
2471
|
columns,
|
|
1775
2472
|
rows,
|
|
@@ -1780,23 +2477,23 @@ function SimpleDataTable({
|
|
|
1780
2477
|
getRowKey
|
|
1781
2478
|
}) {
|
|
1782
2479
|
if (error) {
|
|
1783
|
-
return /* @__PURE__ */
|
|
2480
|
+
return /* @__PURE__ */ jsx42(StateBlock, { variant: "error", title: "Unable to load data", description: error, compact: true });
|
|
1784
2481
|
}
|
|
1785
2482
|
if (loading) {
|
|
1786
|
-
return /* @__PURE__ */
|
|
2483
|
+
return /* @__PURE__ */ jsx42(StateBlock, { variant: "loading", title: "Loading data", description: "Please wait while the shared dataset is prepared.", compact: true });
|
|
1787
2484
|
}
|
|
1788
2485
|
if (!rows.length) {
|
|
1789
|
-
return /* @__PURE__ */
|
|
2486
|
+
return /* @__PURE__ */ jsx42(StateBlock, { variant: "empty", title: emptyTitle, description: emptyDescription, compact: true });
|
|
1790
2487
|
}
|
|
1791
|
-
return /* @__PURE__ */
|
|
1792
|
-
/* @__PURE__ */
|
|
1793
|
-
/* @__PURE__ */
|
|
2488
|
+
return /* @__PURE__ */ jsx42(ScrollArea, { children: /* @__PURE__ */ jsxs37(Table, { striped: true, highlightOnHover: true, withTableBorder: true, withColumnBorders: true, children: [
|
|
2489
|
+
/* @__PURE__ */ jsx42(Table.Thead, { children: /* @__PURE__ */ jsx42(Table.Tr, { children: columns.map((column) => /* @__PURE__ */ jsx42(Table.Th, { children: column.header }, String(column.key))) }) }),
|
|
2490
|
+
/* @__PURE__ */ jsx42(Table.Tbody, { children: rows.map((row, index) => /* @__PURE__ */ jsx42(Table.Tr, { children: columns.map((column) => /* @__PURE__ */ jsx42(Table.Td, { children: column.render ? column.render(row) : String(row[column.key] ?? "") }, String(column.key))) }, getRowKey ? getRowKey(row, index) : index)) })
|
|
1794
2491
|
] }) });
|
|
1795
2492
|
}
|
|
1796
2493
|
|
|
1797
2494
|
// src/StatsSection.tsx
|
|
1798
|
-
import { Stack as
|
|
1799
|
-
import { jsx as
|
|
2495
|
+
import { Stack as Stack37, Title as Title27 } from "@mantine/core";
|
|
2496
|
+
import { jsx as jsx43, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
1800
2497
|
function StatsSection({
|
|
1801
2498
|
title,
|
|
1802
2499
|
loading = false,
|
|
@@ -1808,11 +2505,11 @@ function StatsSection({
|
|
|
1808
2505
|
}) {
|
|
1809
2506
|
let content = children;
|
|
1810
2507
|
if (error) {
|
|
1811
|
-
content = /* @__PURE__ */
|
|
2508
|
+
content = /* @__PURE__ */ jsx43(StateBlock, { variant: "error", title: "Unable to load statistics", description: error, compact: true });
|
|
1812
2509
|
} else if (loading) {
|
|
1813
|
-
content = /* @__PURE__ */
|
|
2510
|
+
content = /* @__PURE__ */ jsx43(StateBlock, { variant: "loading", title: "Loading statistics", description: "This shared data surface is still synchronizing.", compact: true });
|
|
1814
2511
|
} else if (belowThreshold) {
|
|
1815
|
-
content = /* @__PURE__ */
|
|
2512
|
+
content = /* @__PURE__ */ jsx43(
|
|
1816
2513
|
StateBlock,
|
|
1817
2514
|
{
|
|
1818
2515
|
variant: "not-enough-data",
|
|
@@ -1822,10 +2519,10 @@ function StatsSection({
|
|
|
1822
2519
|
}
|
|
1823
2520
|
);
|
|
1824
2521
|
} else if (placeholder) {
|
|
1825
|
-
content = /* @__PURE__ */
|
|
2522
|
+
content = /* @__PURE__ */ jsx43(PlaceholderPanel, { ...placeholder, mode: "placeholder" });
|
|
1826
2523
|
}
|
|
1827
|
-
return /* @__PURE__ */
|
|
1828
|
-
/* @__PURE__ */
|
|
2524
|
+
return /* @__PURE__ */ jsxs38(Stack37, { gap: "md", children: [
|
|
2525
|
+
/* @__PURE__ */ jsx43(Title27, { order: 3, children: title }),
|
|
1829
2526
|
content
|
|
1830
2527
|
] });
|
|
1831
2528
|
}
|
|
@@ -3138,9 +3835,13 @@ export {
|
|
|
3138
3835
|
EmptyState,
|
|
3139
3836
|
GdsIcons,
|
|
3140
3837
|
GdsVocabulary,
|
|
3838
|
+
createGdsVocabularyPack,
|
|
3839
|
+
mergeGdsVocabularyPacks,
|
|
3840
|
+
resolveSemanticActionConfig,
|
|
3141
3841
|
getSemanticActionConfig,
|
|
3142
3842
|
getSemanticActionLabel,
|
|
3143
3843
|
ChoiceChip,
|
|
3844
|
+
ActionBar,
|
|
3144
3845
|
MetricCard,
|
|
3145
3846
|
ProgressCard,
|
|
3146
3847
|
SectionPanel,
|
|
@@ -3149,21 +3850,29 @@ export {
|
|
|
3149
3850
|
EditorialCard,
|
|
3150
3851
|
ProductCard,
|
|
3151
3852
|
PublicProductCard,
|
|
3853
|
+
PublicFoodCard,
|
|
3854
|
+
FoodMenuSection,
|
|
3855
|
+
ListingCard,
|
|
3152
3856
|
DataToolbar,
|
|
3153
3857
|
StateBlock,
|
|
3154
3858
|
BrowseSurface,
|
|
3155
3859
|
resolveAccentPanelStyles,
|
|
3156
3860
|
AccentPanel,
|
|
3861
|
+
DetailProfileShell,
|
|
3157
3862
|
PublicNav,
|
|
3158
3863
|
PublicShell,
|
|
3159
3864
|
PublicSiteFooter,
|
|
3160
3865
|
PublicBrandFooter,
|
|
3161
3866
|
AuthShell,
|
|
3867
|
+
SocialAuthButtons,
|
|
3162
3868
|
ArticleShell,
|
|
3163
3869
|
CtaButtonGroup,
|
|
3164
3870
|
DocsPageShell,
|
|
3165
3871
|
EditorialHero,
|
|
3166
3872
|
FeatureBand,
|
|
3873
|
+
MapPanel,
|
|
3874
|
+
PublicFlowShell,
|
|
3875
|
+
PlaybackSurface,
|
|
3167
3876
|
FormField,
|
|
3168
3877
|
MediaField,
|
|
3169
3878
|
MediaCard,
|