@doneisbetter/gds-core 2.6.1 → 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-6B42ANK7.mjs → chunk-BAS4ZGKL.mjs} +1180 -409
- package/dist/chunk-EN3TN22M.mjs +585 -0
- package/dist/client.d.mts +73 -10
- package/dist/client.d.ts +73 -10
- package/dist/client.js +1470 -461
- package/dist/client.mjs +42 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1470 -461
- package/dist/index.mjs +42 -2
- package/dist/server-BqFksoV3.d.mts +5540 -0
- package/dist/server-BqFksoV3.d.ts +5540 -0
- package/dist/server.d.mts +5 -5292
- package/dist/server.d.ts +5 -5292
- package/dist/server.js +1214 -428
- package/dist/server.mjs +29 -1
- package/package.json +4 -4
- package/dist/chunk-SI66GK77.mjs +0 -366
package/dist/server.js
CHANGED
|
@@ -25,47 +25,61 @@ __export(server_exports, {
|
|
|
25
25
|
ArticleShell: () => ArticleShell,
|
|
26
26
|
AuthShell: () => AuthShell,
|
|
27
27
|
BrowseSurface: () => BrowseSurface,
|
|
28
|
+
ChoiceChip: () => ChoiceChip,
|
|
28
29
|
ConsumerDashboardGrid: () => ConsumerDashboardGrid,
|
|
29
30
|
ConsumerSection: () => ConsumerSection,
|
|
30
31
|
CtaButtonGroup: () => CtaButtonGroup,
|
|
31
32
|
DataToolbar: () => DataToolbar,
|
|
33
|
+
DetailProfileShell: () => DetailProfileShell,
|
|
32
34
|
DocsPageShell: () => DocsPageShell,
|
|
33
35
|
EditorialCard: () => EditorialCard,
|
|
34
36
|
EditorialHero: () => EditorialHero,
|
|
35
37
|
EmptyState: () => EmptyState,
|
|
36
38
|
FeatureBand: () => FeatureBand,
|
|
37
39
|
FilterDrawer: () => FilterDrawer,
|
|
40
|
+
FoodMenuSection: () => FoodMenuSection,
|
|
38
41
|
FormField: () => FormField,
|
|
39
42
|
GdsIcons: () => GdsIcons,
|
|
40
43
|
GdsVocabulary: () => GdsVocabulary,
|
|
44
|
+
ListingCard: () => ListingCard,
|
|
45
|
+
MapPanel: () => MapPanel,
|
|
41
46
|
MediaCard: () => MediaCard,
|
|
42
47
|
MediaField: () => MediaField,
|
|
43
48
|
MetricCard: () => MetricCard,
|
|
44
49
|
PageHeader: () => PageHeader,
|
|
45
50
|
PlaceholderPanel: () => PlaceholderPanel,
|
|
51
|
+
PlaybackSurface: () => PlaybackSurface,
|
|
46
52
|
ProductCard: () => ProductCard,
|
|
47
53
|
ProgressCard: () => ProgressCard,
|
|
48
54
|
PublicBrandFooter: () => PublicBrandFooter,
|
|
55
|
+
PublicFlowShell: () => PublicFlowShell,
|
|
56
|
+
PublicFoodCard: () => PublicFoodCard,
|
|
49
57
|
PublicNav: () => PublicNav,
|
|
50
58
|
PublicProductCard: () => PublicProductCard,
|
|
51
59
|
PublicShell: () => PublicShell,
|
|
52
60
|
PublicSiteFooter: () => PublicSiteFooter,
|
|
53
61
|
SectionPanel: () => SectionPanel,
|
|
54
62
|
SimpleDataTable: () => SimpleDataTable,
|
|
63
|
+
SocialAuthButtons: () => SocialAuthButtons,
|
|
55
64
|
StateBlock: () => StateBlock,
|
|
56
65
|
StatsSection: () => StatsSection,
|
|
57
66
|
StatusBadge: () => StatusBadge,
|
|
58
67
|
ar: () => ar,
|
|
68
|
+
createGdsVocabularyPack: () => createGdsVocabularyPack,
|
|
59
69
|
de: () => de,
|
|
60
70
|
en: () => en,
|
|
61
71
|
es: () => es,
|
|
62
72
|
fr: () => fr,
|
|
63
73
|
gdsLocales: () => gdsLocales,
|
|
64
74
|
getGdsMessages: () => getGdsMessages,
|
|
75
|
+
getSemanticActionConfig: () => getSemanticActionConfig,
|
|
76
|
+
getSemanticActionLabel: () => getSemanticActionLabel,
|
|
65
77
|
he: () => he,
|
|
66
78
|
hu: () => hu,
|
|
67
79
|
it: () => it,
|
|
80
|
+
mergeGdsVocabularyPacks: () => mergeGdsVocabularyPacks,
|
|
68
81
|
resolveAccentPanelStyles: () => resolveAccentPanelStyles,
|
|
82
|
+
resolveSemanticActionConfig: () => resolveSemanticActionConfig,
|
|
69
83
|
ru: () => ru
|
|
70
84
|
});
|
|
71
85
|
module.exports = __toCommonJS(server_exports);
|
|
@@ -180,7 +194,6 @@ var GdsIcons = {
|
|
|
180
194
|
|
|
181
195
|
// src/vocabulary.ts
|
|
182
196
|
var GdsVocabulary = {
|
|
183
|
-
// Base
|
|
184
197
|
settings: { id: "gds.action.settings", defaultMessage: "Settings", icon: GdsIcons.Settings, feedback: { icon: GdsIcons.Settings, color: "teal", messageId: "gds.feedback.saved" } },
|
|
185
198
|
analytics: { id: "gds.action.analytics", defaultMessage: "Analytics", icon: GdsIcons.Analytics, feedback: { icon: GdsIcons.Analytics, color: "teal", messageId: "gds.feedback.loaded" } },
|
|
186
199
|
dashboard: { id: "gds.action.dashboard", defaultMessage: "Dashboard", icon: GdsIcons.Dashboard, feedback: { icon: GdsIcons.Dashboard, color: "teal", messageId: "gds.feedback.loaded" } },
|
|
@@ -196,14 +209,12 @@ var GdsVocabulary = {
|
|
|
196
209
|
close: { id: "gds.action.close", defaultMessage: "Close", icon: GdsIcons.Close, feedback: { icon: GdsIcons.Close, color: "gray", messageId: "gds.feedback.closed" } },
|
|
197
210
|
language: { id: "gds.action.language", defaultMessage: "Language", icon: GdsIcons.Language, feedback: { icon: GdsIcons.Language, color: "teal", messageId: "gds.feedback.changed" } },
|
|
198
211
|
theme: { id: "gds.action.theme", defaultMessage: "Theme", icon: GdsIcons.Theme, feedback: { icon: GdsIcons.Theme, color: "teal", messageId: "gds.feedback.changed" } },
|
|
199
|
-
// Navigation
|
|
200
212
|
home: { id: "gds.action.home", defaultMessage: "Home", icon: GdsIcons.Home, feedback: { icon: GdsIcons.Home, color: "teal", messageId: "gds.feedback.opened" } },
|
|
201
213
|
inbox: { id: "gds.action.inbox", defaultMessage: "Inbox", icon: GdsIcons.Inbox, feedback: { icon: GdsIcons.Inbox, color: "teal", messageId: "gds.feedback.opened" } },
|
|
202
214
|
calendar: { id: "gds.action.calendar", defaultMessage: "Calendar", icon: GdsIcons.Calendar, feedback: { icon: GdsIcons.Calendar, color: "teal", messageId: "gds.feedback.opened" } },
|
|
203
215
|
gallery: { id: "gds.action.gallery", defaultMessage: "Gallery", icon: GdsIcons.Gallery, feedback: { icon: GdsIcons.Gallery, color: "teal", messageId: "gds.feedback.opened" } },
|
|
204
216
|
history: { id: "gds.action.history", defaultMessage: "History", icon: GdsIcons.History, feedback: { icon: GdsIcons.History, color: "teal", messageId: "gds.feedback.opened" } },
|
|
205
217
|
profile: { id: "gds.action.profile", defaultMessage: "Profile", icon: GdsIcons.Profile, feedback: { icon: GdsIcons.Profile, color: "teal", messageId: "gds.feedback.opened" } },
|
|
206
|
-
// Actions
|
|
207
218
|
send: { id: "gds.action.send", defaultMessage: "Send", icon: GdsIcons.Send, feedback: { icon: GdsIcons.Send, color: "blue", messageId: "gds.feedback.sent" } },
|
|
208
219
|
reply: { id: "gds.action.reply", defaultMessage: "Reply", icon: GdsIcons.Reply, feedback: { icon: GdsIcons.Reply, color: "blue", messageId: "gds.feedback.replied" } },
|
|
209
220
|
forward: { id: "gds.action.forward", defaultMessage: "Forward", icon: GdsIcons.Forward, feedback: { icon: GdsIcons.Forward, color: "blue", messageId: "gds.feedback.forwarded" } },
|
|
@@ -217,12 +228,10 @@ var GdsVocabulary = {
|
|
|
217
228
|
uncheck: { id: "gds.action.uncheck", defaultMessage: "Uncheck", icon: GdsIcons.Uncheck, feedback: { icon: GdsIcons.Uncheck, color: "red", messageId: "gds.feedback.unchecked" } },
|
|
218
229
|
complete: { id: "gds.action.complete", defaultMessage: "Complete", icon: GdsIcons.Complete, feedback: { icon: GdsIcons.Complete, color: "teal", messageId: "gds.feedback.completed" } },
|
|
219
230
|
clear: { id: "gds.action.clear", defaultMessage: "Clear", icon: GdsIcons.Clear, feedback: { icon: GdsIcons.Clear, color: "red", messageId: "gds.feedback.cleared" } },
|
|
220
|
-
// Media (camera project)
|
|
221
231
|
capture: { id: "gds.action.capture", defaultMessage: "Capture", icon: GdsIcons.Capture, feedback: { icon: GdsIcons.Capture, color: "teal", messageId: "gds.feedback.captured" } },
|
|
222
232
|
record: { id: "gds.action.record", defaultMessage: "Record", icon: GdsIcons.Record, feedback: { icon: GdsIcons.Record, color: "teal", messageId: "gds.feedback.recorded" } },
|
|
223
233
|
flip: { id: "gds.action.flip", defaultMessage: "Flip", icon: GdsIcons.Flip, feedback: { icon: GdsIcons.Flip, color: "teal", messageId: "gds.feedback.flipped" } },
|
|
224
234
|
flash: { id: "gds.action.flash", defaultMessage: "Flash", icon: GdsIcons.Flash, feedback: { icon: GdsIcons.Flash, color: "teal", messageId: "gds.feedback.flashed" } },
|
|
225
|
-
// Domain specific (amanoba, classscout, kidex, habigoal)
|
|
226
235
|
course: { id: "gds.action.course", defaultMessage: "Course", icon: GdsIcons.Course, feedback: { icon: GdsIcons.Course, color: "teal", messageId: "gds.feedback.done" } },
|
|
227
236
|
lesson: { id: "gds.action.lesson", defaultMessage: "Lesson", icon: GdsIcons.Lesson, feedback: { icon: GdsIcons.Lesson, color: "teal", messageId: "gds.feedback.done" } },
|
|
228
237
|
certificate: { id: "gds.action.certificate", defaultMessage: "Certificate", icon: GdsIcons.Certificate, feedback: { icon: GdsIcons.Certificate, color: "teal", messageId: "gds.feedback.done" } },
|
|
@@ -235,7 +244,6 @@ var GdsVocabulary = {
|
|
|
235
244
|
goal: { id: "gds.action.goal", defaultMessage: "Goal", icon: GdsIcons.Goal, feedback: { icon: GdsIcons.Goal, color: "teal", messageId: "gds.feedback.done" } },
|
|
236
245
|
streak: { id: "gds.action.streak", defaultMessage: "Streak", icon: GdsIcons.Streak, feedback: { icon: GdsIcons.Streak, color: "teal", messageId: "gds.feedback.done" } },
|
|
237
246
|
reward: { id: "gds.action.reward", defaultMessage: "Reward", icon: GdsIcons.Reward, feedback: { icon: GdsIcons.Reward, color: "yellow", messageId: "gds.feedback.rewarded" } },
|
|
238
|
-
// Codebase analysis additions
|
|
239
247
|
trophy: { id: "gds.action.trophy", defaultMessage: "Trophy", icon: GdsIcons.Trophy, feedback: { icon: GdsIcons.Trophy, color: "yellow", messageId: "gds.feedback.rewarded" } },
|
|
240
248
|
crown: { id: "gds.action.crown", defaultMessage: "Crown", icon: GdsIcons.Crown, feedback: { icon: GdsIcons.Crown, color: "yellow", messageId: "gds.feedback.rewarded" } },
|
|
241
249
|
pause: { id: "gds.action.pause", defaultMessage: "Pause", icon: GdsIcons.Pause, feedback: { icon: GdsIcons.Pause, color: "teal", messageId: "gds.feedback.paused" } },
|
|
@@ -255,7 +263,6 @@ var GdsVocabulary = {
|
|
|
255
263
|
help: { id: "gds.action.help", defaultMessage: "Help", icon: GdsIcons.Help, feedback: { icon: GdsIcons.Help, color: "teal", messageId: "gds.feedback.done" } },
|
|
256
264
|
filter: { id: "gds.action.filter", defaultMessage: "Filter", icon: GdsIcons.Filter, feedback: { icon: GdsIcons.Filter, color: "teal", messageId: "gds.feedback.filtered" } },
|
|
257
265
|
sort: { id: "gds.action.sort", defaultMessage: "Sort", icon: GdsIcons.Sort, feedback: { icon: GdsIcons.Sort, color: "teal", messageId: "gds.feedback.sorted" } },
|
|
258
|
-
// Audit-driven additions
|
|
259
266
|
export: { id: "gds.action.export", defaultMessage: "Export", icon: GdsIcons.Export, feedback: { icon: GdsIcons.Export, color: "teal", messageId: "gds.feedback.exported" } },
|
|
260
267
|
import: { id: "gds.action.import", defaultMessage: "Import", icon: GdsIcons.Import, feedback: { icon: GdsIcons.Import, color: "teal", messageId: "gds.feedback.imported" } },
|
|
261
268
|
preview: { id: "gds.action.preview", defaultMessage: "Preview", icon: GdsIcons.Preview, feedback: { icon: GdsIcons.Preview, color: "teal", messageId: "gds.feedback.previewed" } },
|
|
@@ -273,10 +280,98 @@ var GdsVocabulary = {
|
|
|
273
280
|
refer: { id: "gds.action.refer", defaultMessage: "Refer", icon: GdsIcons.Refer, feedback: { icon: GdsIcons.Refer, color: "teal", messageId: "gds.feedback.referred" } },
|
|
274
281
|
evidence: { id: "gds.action.evidence", defaultMessage: "Evidence", icon: GdsIcons.Evidence, feedback: { icon: GdsIcons.Evidence, color: "teal", messageId: "gds.feedback.added" } }
|
|
275
282
|
};
|
|
283
|
+
function createGdsVocabularyPack(namespace, actions) {
|
|
284
|
+
return {
|
|
285
|
+
namespace,
|
|
286
|
+
actions: Object.fromEntries(
|
|
287
|
+
Object.entries(actions).map(([key, definition]) => [
|
|
288
|
+
`${namespace}:${key}`,
|
|
289
|
+
{
|
|
290
|
+
...definition,
|
|
291
|
+
id: `gds.action.${namespace}.${key}`
|
|
292
|
+
}
|
|
293
|
+
])
|
|
294
|
+
)
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
function mergeGdsVocabularyPacks(packs = []) {
|
|
298
|
+
return packs.reduce((acc, pack) => {
|
|
299
|
+
for (const [key, definition] of Object.entries(pack.actions)) {
|
|
300
|
+
acc[key] = definition;
|
|
301
|
+
}
|
|
302
|
+
return acc;
|
|
303
|
+
}, {});
|
|
304
|
+
}
|
|
305
|
+
function resolveSemanticActionConfig(action, packs = []) {
|
|
306
|
+
const baseConfig = GdsVocabulary[action];
|
|
307
|
+
if (baseConfig) {
|
|
308
|
+
return baseConfig;
|
|
309
|
+
}
|
|
310
|
+
const merged = mergeGdsVocabularyPacks(packs);
|
|
311
|
+
const packConfig = merged[action];
|
|
312
|
+
if (packConfig) {
|
|
313
|
+
return packConfig;
|
|
314
|
+
}
|
|
315
|
+
throw new Error(`Unknown semantic action: ${action}`);
|
|
316
|
+
}
|
|
317
|
+
function getSemanticActionConfig(action, packs = []) {
|
|
318
|
+
return resolveSemanticActionConfig(action, packs);
|
|
319
|
+
}
|
|
320
|
+
function getSemanticActionLabel(action, translate, packs = []) {
|
|
321
|
+
const config = resolveSemanticActionConfig(action, packs);
|
|
322
|
+
return translate ? translate(config.id, config.defaultMessage) : config.defaultMessage;
|
|
323
|
+
}
|
|
276
324
|
|
|
277
|
-
// src/
|
|
325
|
+
// src/ChoiceChip.tsx
|
|
278
326
|
var import_core = require("@mantine/core");
|
|
279
327
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
328
|
+
function ChoiceChip({
|
|
329
|
+
label,
|
|
330
|
+
active = false,
|
|
331
|
+
href,
|
|
332
|
+
onClick,
|
|
333
|
+
component,
|
|
334
|
+
...props
|
|
335
|
+
}) {
|
|
336
|
+
const sharedProps = {
|
|
337
|
+
variant: active ? "filled" : "light",
|
|
338
|
+
size: "sm",
|
|
339
|
+
radius: "xl",
|
|
340
|
+
...props
|
|
341
|
+
};
|
|
342
|
+
if (href) {
|
|
343
|
+
const LinkComponent = component || "a";
|
|
344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
345
|
+
import_core.Badge,
|
|
346
|
+
{
|
|
347
|
+
component: LinkComponent,
|
|
348
|
+
href,
|
|
349
|
+
"aria-current": active ? "page" : void 0,
|
|
350
|
+
...sharedProps,
|
|
351
|
+
children: label
|
|
352
|
+
}
|
|
353
|
+
);
|
|
354
|
+
}
|
|
355
|
+
if (onClick || component) {
|
|
356
|
+
const ButtonComponent = component || "button";
|
|
357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
358
|
+
import_core.Badge,
|
|
359
|
+
{
|
|
360
|
+
component: ButtonComponent,
|
|
361
|
+
type: component ? void 0 : "button",
|
|
362
|
+
onClick,
|
|
363
|
+
"aria-pressed": onClick ? active : void 0,
|
|
364
|
+
...sharedProps,
|
|
365
|
+
children: label
|
|
366
|
+
}
|
|
367
|
+
);
|
|
368
|
+
}
|
|
369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Badge, { ...sharedProps, children: label });
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
// src/StatusBadge.tsx
|
|
373
|
+
var import_core2 = require("@mantine/core");
|
|
374
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
280
375
|
var statusColorMap = {
|
|
281
376
|
success: "green",
|
|
282
377
|
warning: "yellow",
|
|
@@ -285,49 +380,49 @@ var statusColorMap = {
|
|
|
285
380
|
neutral: "gray"
|
|
286
381
|
};
|
|
287
382
|
function StatusBadge({ status, children, ...props }) {
|
|
288
|
-
return /* @__PURE__ */ (0,
|
|
383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_core2.Badge, { color: statusColorMap[status], variant: "light", ...props, children });
|
|
289
384
|
}
|
|
290
385
|
|
|
291
386
|
// src/EmptyState.tsx
|
|
292
|
-
var
|
|
293
|
-
var
|
|
387
|
+
var import_core3 = require("@mantine/core");
|
|
388
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
294
389
|
function EmptyState({ icon, title, description, action }) {
|
|
295
|
-
return /* @__PURE__ */ (0,
|
|
296
|
-
icon && /* @__PURE__ */ (0,
|
|
297
|
-
/* @__PURE__ */ (0,
|
|
298
|
-
/* @__PURE__ */ (0,
|
|
299
|
-
action && /* @__PURE__ */ (0,
|
|
390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_core3.Stack, { align: "center", justify: "center", gap: "md", py: "xl", ta: "center", children: [
|
|
391
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_core3.Box, { c: "dimmed", children: icon }),
|
|
392
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_core3.Title, { order: 3, children: title }),
|
|
393
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_core3.Text, { c: "dimmed", maw: 400, children: description }),
|
|
394
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_core3.Box, { mt: "md", children: action })
|
|
300
395
|
] });
|
|
301
396
|
}
|
|
302
397
|
|
|
303
398
|
// src/MetricCard.tsx
|
|
304
|
-
var
|
|
305
|
-
var
|
|
399
|
+
var import_core4 = require("@mantine/core");
|
|
400
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
306
401
|
var trendColors = {
|
|
307
402
|
positive: "teal",
|
|
308
403
|
negative: "red",
|
|
309
404
|
neutral: "gray"
|
|
310
405
|
};
|
|
311
406
|
function MetricCard({ label, value, description, trend, icon, footer }) {
|
|
312
|
-
return /* @__PURE__ */ (0,
|
|
313
|
-
/* @__PURE__ */ (0,
|
|
314
|
-
/* @__PURE__ */ (0,
|
|
315
|
-
/* @__PURE__ */ (0,
|
|
316
|
-
/* @__PURE__ */ (0,
|
|
407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_core4.Card, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_core4.Stack, { gap: "md", children: [
|
|
408
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_core4.Group, { justify: "space-between", align: "flex-start", wrap: "nowrap", children: [
|
|
409
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_core4.Stack, { gap: 4, children: [
|
|
410
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_core4.Text, { size: "sm", c: "dimmed", fw: 600, children: label }),
|
|
411
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_core4.Title, { order: 3, children: value })
|
|
317
412
|
] }),
|
|
318
|
-
icon ? /* @__PURE__ */ (0,
|
|
413
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_core4.ThemeIcon, { variant: "light", size: "xl", radius: "xl", "aria-hidden": true, children: icon }) : null
|
|
319
414
|
] }),
|
|
320
|
-
description || trend ? /* @__PURE__ */ (0,
|
|
321
|
-
description ? /* @__PURE__ */ (0,
|
|
322
|
-
trend ? /* @__PURE__ */ (0,
|
|
415
|
+
description || trend ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_core4.Group, { justify: "space-between", align: "center", gap: "sm", children: [
|
|
416
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_core4.Text, { size: "sm", c: "dimmed", flex: 1, children: description }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", {}),
|
|
417
|
+
trend ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_core4.Badge, { color: trendColors[trend.tone ?? "neutral"], variant: "light", children: trend.label }) : null
|
|
323
418
|
] }) : null,
|
|
324
419
|
footer
|
|
325
420
|
] }) });
|
|
326
421
|
}
|
|
327
422
|
|
|
328
423
|
// src/ProgressCard.tsx
|
|
329
|
-
var
|
|
330
|
-
var
|
|
424
|
+
var import_core5 = require("@mantine/core");
|
|
425
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
331
426
|
function ProgressCard({
|
|
332
427
|
label,
|
|
333
428
|
value,
|
|
@@ -336,31 +431,31 @@ function ProgressCard({
|
|
|
336
431
|
description,
|
|
337
432
|
action
|
|
338
433
|
}) {
|
|
339
|
-
return /* @__PURE__ */ (0,
|
|
340
|
-
/* @__PURE__ */ (0,
|
|
341
|
-
/* @__PURE__ */ (0,
|
|
342
|
-
/* @__PURE__ */ (0,
|
|
343
|
-
/* @__PURE__ */ (0,
|
|
434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_core5.Card, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_core5.Stack, { gap: "md", children: [
|
|
435
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_core5.Group, { justify: "space-between", align: "flex-start", children: [
|
|
436
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_core5.Stack, { gap: 4, children: [
|
|
437
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_core5.Text, { size: "sm", c: "dimmed", fw: 600, children: label }),
|
|
438
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_core5.Title, { order: 3, children: value })
|
|
344
439
|
] }),
|
|
345
440
|
action
|
|
346
441
|
] }),
|
|
347
|
-
description ? /* @__PURE__ */ (0,
|
|
348
|
-
/* @__PURE__ */ (0,
|
|
349
|
-
/* @__PURE__ */ (0,
|
|
350
|
-
/* @__PURE__ */ (0,
|
|
351
|
-
/* @__PURE__ */ (0,
|
|
442
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_core5.Text, { size: "sm", c: "dimmed", children: description }) : null,
|
|
443
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_core5.Stack, { gap: 6, children: [
|
|
444
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_core5.Group, { justify: "space-between", gap: "sm", children: [
|
|
445
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_core5.Text, { size: "sm", fw: 500, children: progressLabel ?? "Progress" }),
|
|
446
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_core5.Text, { size: "sm", c: "dimmed", children: [
|
|
352
447
|
Math.round(progress),
|
|
353
448
|
"%"
|
|
354
449
|
] })
|
|
355
450
|
] }),
|
|
356
|
-
/* @__PURE__ */ (0,
|
|
451
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_core5.Progress, { value: progress, radius: "xl", size: "md" })
|
|
357
452
|
] })
|
|
358
453
|
] }) });
|
|
359
454
|
}
|
|
360
455
|
|
|
361
456
|
// src/SectionPanel.tsx
|
|
362
|
-
var
|
|
363
|
-
var
|
|
457
|
+
var import_core6 = require("@mantine/core");
|
|
458
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
364
459
|
var toneBackgrounds = {
|
|
365
460
|
default: "var(--mantine-color-body)",
|
|
366
461
|
supporting: "light-dark(var(--mantine-color-gray-0), color-mix(in srgb, var(--mantine-color-dark-7) 92%, black))",
|
|
@@ -376,23 +471,23 @@ function SectionPanel({
|
|
|
376
471
|
id,
|
|
377
472
|
divided = true
|
|
378
473
|
}) {
|
|
379
|
-
return /* @__PURE__ */ (0,
|
|
380
|
-
title || description || action ? /* @__PURE__ */ (0,
|
|
381
|
-
/* @__PURE__ */ (0,
|
|
382
|
-
title || description ? /* @__PURE__ */ (0,
|
|
383
|
-
title ? /* @__PURE__ */ (0,
|
|
384
|
-
description ? /* @__PURE__ */ (0,
|
|
474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core6.Paper, { id, withBorder: true, radius: "xl", p: "lg", style: { background: toneBackgrounds[tone] }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_core6.Stack, { gap: "md", children: [
|
|
475
|
+
title || description || action ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
476
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_core6.Group, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
477
|
+
title || description ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_core6.Stack, { gap: 4, children: [
|
|
478
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core6.Title, { order: 3, children: title }) : null,
|
|
479
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core6.Text, { size: "sm", c: "dimmed", children: description }) : null
|
|
385
480
|
] }) : null,
|
|
386
481
|
action
|
|
387
482
|
] }),
|
|
388
|
-
divided ? /* @__PURE__ */ (0,
|
|
483
|
+
divided ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core6.Divider, {}) : null
|
|
389
484
|
] }) : null,
|
|
390
485
|
children
|
|
391
486
|
] }) });
|
|
392
487
|
}
|
|
393
488
|
|
|
394
489
|
// src/ConsumerSection.tsx
|
|
395
|
-
var
|
|
490
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
396
491
|
function ConsumerSection({
|
|
397
492
|
title,
|
|
398
493
|
description,
|
|
@@ -400,22 +495,22 @@ function ConsumerSection({
|
|
|
400
495
|
children,
|
|
401
496
|
tone = "default"
|
|
402
497
|
}) {
|
|
403
|
-
return /* @__PURE__ */ (0,
|
|
498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SectionPanel, { title, description, action, tone, children });
|
|
404
499
|
}
|
|
405
500
|
|
|
406
501
|
// src/ConsumerDashboardGrid.tsx
|
|
407
|
-
var
|
|
408
|
-
var
|
|
502
|
+
var import_core7 = require("@mantine/core");
|
|
503
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
409
504
|
function ConsumerDashboardGrid({
|
|
410
505
|
children,
|
|
411
506
|
columns = 3
|
|
412
507
|
}) {
|
|
413
|
-
return /* @__PURE__ */ (0,
|
|
508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_core7.SimpleGrid, { cols: { base: 1, sm: Math.min(columns, 2), lg: columns }, spacing: "lg", children });
|
|
414
509
|
}
|
|
415
510
|
|
|
416
511
|
// src/ProductCard.tsx
|
|
417
|
-
var
|
|
418
|
-
var
|
|
512
|
+
var import_core8 = require("@mantine/core");
|
|
513
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
419
514
|
function ProductCard({
|
|
420
515
|
title,
|
|
421
516
|
description,
|
|
@@ -428,38 +523,38 @@ function ProductCard({
|
|
|
428
523
|
footer
|
|
429
524
|
}) {
|
|
430
525
|
const MoreIcon = GdsIcons.Menu;
|
|
431
|
-
return /* @__PURE__ */ (0,
|
|
526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Card, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.Stack, { gap: "md", children: [
|
|
432
527
|
media,
|
|
433
|
-
/* @__PURE__ */ (0,
|
|
434
|
-
/* @__PURE__ */ (0,
|
|
435
|
-
icon ? /* @__PURE__ */ (0,
|
|
436
|
-
/* @__PURE__ */ (0,
|
|
437
|
-
/* @__PURE__ */ (0,
|
|
438
|
-
description ? /* @__PURE__ */ (0,
|
|
528
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.Group, { justify: "space-between", align: "flex-start", wrap: "nowrap", children: [
|
|
529
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.Group, { align: "flex-start", gap: "sm", wrap: "nowrap", children: [
|
|
530
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.ThemeIcon, { variant: "light", size: "xl", radius: "xl", "aria-hidden": true, children: icon }) : null,
|
|
531
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.Stack, { gap: 4, children: [
|
|
532
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Title, { order: 4, children: title }),
|
|
533
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Text, { size: "sm", c: "dimmed", lineClamp: 3, children: description }) : null
|
|
439
534
|
] })
|
|
440
535
|
] }),
|
|
441
|
-
/* @__PURE__ */ (0,
|
|
442
|
-
typeof status === "string" ? /* @__PURE__ */ (0,
|
|
443
|
-
secondaryActions.length ? /* @__PURE__ */ (0,
|
|
444
|
-
/* @__PURE__ */ (0,
|
|
445
|
-
/* @__PURE__ */ (0,
|
|
446
|
-
(action) => action.href ? /* @__PURE__ */ (0,
|
|
536
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.Group, { gap: "xs", align: "center", wrap: "nowrap", children: [
|
|
537
|
+
typeof status === "string" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Badge, { variant: "light", children: status }) : status,
|
|
538
|
+
secondaryActions.length ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.Menu, { position: "bottom-end", withinPortal: true, children: [
|
|
539
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Menu.Target, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.ActionIcon, { variant: "subtle", "aria-label": "More actions", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(MoreIcon, { size: "1rem" }) }) }),
|
|
540
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Menu.Dropdown, { children: secondaryActions.map(
|
|
541
|
+
(action) => action.href ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Menu.Item, { component: "a", href: action.href, color: action.color, children: action.label }, action.label) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Menu.Item, { onClick: action.onClick, color: action.color, children: action.label }, action.label)
|
|
447
542
|
) })
|
|
448
543
|
] }) : null
|
|
449
544
|
] })
|
|
450
545
|
] }),
|
|
451
|
-
metadata.length ? /* @__PURE__ */ (0,
|
|
452
|
-
/* @__PURE__ */ (0,
|
|
453
|
-
/* @__PURE__ */ (0,
|
|
546
|
+
metadata.length ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Stack, { gap: 6, children: metadata.map((item) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.Group, { justify: "space-between", gap: "sm", children: [
|
|
547
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Text, { size: "sm", c: "dimmed", children: item.label }),
|
|
548
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Text, { size: "sm", fw: 500, ta: "right", children: item.value })
|
|
454
549
|
] }, item.label)) }) : null,
|
|
455
|
-
primaryAction ? /* @__PURE__ */ (0,
|
|
550
|
+
primaryAction ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Group, { justify: "space-between", children: primaryAction }) : null,
|
|
456
551
|
footer
|
|
457
552
|
] }) });
|
|
458
553
|
}
|
|
459
554
|
|
|
460
555
|
// src/EditorialCard.tsx
|
|
461
|
-
var
|
|
462
|
-
var
|
|
556
|
+
var import_core9 = require("@mantine/core");
|
|
557
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
463
558
|
var tonePalette = {
|
|
464
559
|
default: {
|
|
465
560
|
accent: "violet",
|
|
@@ -479,8 +574,8 @@ var tonePalette = {
|
|
|
479
574
|
}
|
|
480
575
|
};
|
|
481
576
|
function EditorialMediaFallback({ compact }) {
|
|
482
|
-
return /* @__PURE__ */ (0,
|
|
483
|
-
|
|
577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core9.AspectRatio, { ratio: compact ? 16 / 10 : 4 / 3, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
578
|
+
import_core9.Box,
|
|
484
579
|
{
|
|
485
580
|
style: {
|
|
486
581
|
display: "grid",
|
|
@@ -490,7 +585,7 @@ function EditorialMediaFallback({ compact }) {
|
|
|
490
585
|
background: "var(--mantine-color-gray-0)",
|
|
491
586
|
borderRadius: "var(--mantine-radius-md)"
|
|
492
587
|
},
|
|
493
|
-
children: /* @__PURE__ */ (0,
|
|
588
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(GdsIcons.Gallery, { size: compact ? "1.5rem" : "2rem" })
|
|
494
589
|
}
|
|
495
590
|
) });
|
|
496
591
|
}
|
|
@@ -513,8 +608,8 @@ function EditorialCard({
|
|
|
513
608
|
const featured = variant === "featured";
|
|
514
609
|
const palette = tonePalette[tone];
|
|
515
610
|
const interactiveProps = href ? { component: "a", href } : onClick ? { component: "button", onClick, type: "button" } : {};
|
|
516
|
-
return /* @__PURE__ */ (0,
|
|
517
|
-
|
|
611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
612
|
+
import_core9.Card,
|
|
518
613
|
{
|
|
519
614
|
className: classNames?.root,
|
|
520
615
|
withBorder: true,
|
|
@@ -528,21 +623,21 @@ function EditorialCard({
|
|
|
528
623
|
cursor: href || onClick ? "pointer" : "default"
|
|
529
624
|
},
|
|
530
625
|
children: [
|
|
531
|
-
/* @__PURE__ */ (0,
|
|
532
|
-
/* @__PURE__ */ (0,
|
|
533
|
-
/* @__PURE__ */ (0,
|
|
534
|
-
/* @__PURE__ */ (0,
|
|
535
|
-
eyebrow ? /* @__PURE__ */ (0,
|
|
536
|
-
/* @__PURE__ */ (0,
|
|
626
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core9.Card.Section, { className: classNames?.media, children: media ?? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(EditorialMediaFallback, { compact }) }),
|
|
627
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_core9.Stack, { gap: "md", p: compact ? "md" : "lg", className: classNames?.body, children: [
|
|
628
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_core9.Group, { justify: "space-between", align: "flex-start", gap: "sm", wrap: "wrap", children: [
|
|
629
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_core9.Stack, { gap: 4, flex: 1, children: [
|
|
630
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core9.Text, { size: "xs", fw: 700, c: "dimmed", children: eyebrow }) : null,
|
|
631
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core9.Title, { order: compact ? 4 : 3, className: classNames?.title, children: title })
|
|
537
632
|
] }),
|
|
538
|
-
badge ? typeof badge === "string" ? /* @__PURE__ */ (0,
|
|
633
|
+
badge ? typeof badge === "string" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core9.Badge, { color: palette.accent, variant: "light", children: badge }) : badge : null
|
|
539
634
|
] }),
|
|
540
|
-
description ? /* @__PURE__ */ (0,
|
|
541
|
-
meta ? /* @__PURE__ */ (0,
|
|
542
|
-
href || onClick || ctaLabel ? /* @__PURE__ */ (0,
|
|
543
|
-
/* @__PURE__ */ (0,
|
|
544
|
-
/* @__PURE__ */ (0,
|
|
545
|
-
|
|
635
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core9.Text, { size: "sm", c: "dimmed", children: description }) : null,
|
|
636
|
+
meta ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core9.Text, { size: "sm", c: "dimmed", className: classNames?.meta, children: meta }) : null,
|
|
637
|
+
href || onClick || ctaLabel ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_core9.Group, { gap: 6, c: `${palette.accent}.7`, className: classNames?.action, children: [
|
|
638
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core9.Text, { fw: 600, size: "sm", children: ctaLabel }),
|
|
639
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
640
|
+
import_core9.Anchor,
|
|
546
641
|
{
|
|
547
642
|
component: "span",
|
|
548
643
|
underline: "never",
|
|
@@ -560,8 +655,8 @@ function EditorialCard({
|
|
|
560
655
|
|
|
561
656
|
// src/PublicProductCard.tsx
|
|
562
657
|
var import_react = require("react");
|
|
563
|
-
var
|
|
564
|
-
var
|
|
658
|
+
var import_core10 = require("@mantine/core");
|
|
659
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
565
660
|
var stateConfig = {
|
|
566
661
|
available: { label: "Available", color: "teal" },
|
|
567
662
|
limited: { label: "Limited", color: "yellow" },
|
|
@@ -578,29 +673,29 @@ function enhanceAction(action, disabled) {
|
|
|
578
673
|
});
|
|
579
674
|
}
|
|
580
675
|
function ImageFallback({ compact }) {
|
|
581
|
-
return /* @__PURE__ */ (0,
|
|
582
|
-
|
|
676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.AspectRatio, { ratio: compact ? 16 / 9 : 4 / 3, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
677
|
+
import_core10.ThemeIcon,
|
|
583
678
|
{
|
|
584
679
|
size: "100%",
|
|
585
680
|
radius: "md",
|
|
586
681
|
variant: "light",
|
|
587
682
|
color: "gray",
|
|
588
683
|
"aria-label": "No product image available",
|
|
589
|
-
children: /* @__PURE__ */ (0,
|
|
684
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(GdsIcons.Gallery, { size: compact ? "1.5rem" : "2rem" })
|
|
590
685
|
}
|
|
591
686
|
) });
|
|
592
687
|
}
|
|
593
688
|
function LoadingCard({ compact }) {
|
|
594
|
-
return /* @__PURE__ */ (0,
|
|
595
|
-
/* @__PURE__ */ (0,
|
|
596
|
-
/* @__PURE__ */ (0,
|
|
597
|
-
/* @__PURE__ */ (0,
|
|
598
|
-
/* @__PURE__ */ (0,
|
|
599
|
-
/* @__PURE__ */ (0,
|
|
689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.Card, { withBorder: true, radius: "lg", padding: compact ? "md" : "lg", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_core10.Stack, { gap: "md", children: [
|
|
690
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.AspectRatio, { ratio: compact ? 16 / 9 : 4 / 3, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.Skeleton, { radius: "md" }) }),
|
|
691
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_core10.Stack, { gap: "xs", children: [
|
|
692
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.Skeleton, { height: 20, radius: "sm", width: "70%" }),
|
|
693
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.Skeleton, { height: 14, radius: "sm", width: "100%" }),
|
|
694
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.Skeleton, { height: 14, radius: "sm", width: "85%" })
|
|
600
695
|
] }),
|
|
601
|
-
/* @__PURE__ */ (0,
|
|
602
|
-
/* @__PURE__ */ (0,
|
|
603
|
-
/* @__PURE__ */ (0,
|
|
696
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_core10.Group, { justify: "space-between", align: "center", children: [
|
|
697
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.Skeleton, { height: 18, radius: "sm", width: 72 }),
|
|
698
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.Skeleton, { height: 36, radius: "md", width: 120 })
|
|
604
699
|
] })
|
|
605
700
|
] }) });
|
|
606
701
|
}
|
|
@@ -623,7 +718,7 @@ function PublicProductCard({
|
|
|
623
718
|
disabled = false
|
|
624
719
|
}) {
|
|
625
720
|
if (loading) {
|
|
626
|
-
return /* @__PURE__ */ (0,
|
|
721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(LoadingCard, { compact });
|
|
627
722
|
}
|
|
628
723
|
const isActionDisabled = disabled || state === "sold-out";
|
|
629
724
|
const resolvedPrimaryAction = enhanceAction(primaryAction, isActionDisabled);
|
|
@@ -636,46 +731,312 @@ function PublicProductCard({
|
|
|
636
731
|
const pickupHelper = helperKind === "pickup" ? helperText : pickupNote;
|
|
637
732
|
const inventoryHelper = helperKind === "inventory" ? helperText : inventoryNote;
|
|
638
733
|
const hasSupportingRegion = Boolean(price || supportingHelper || pickupHelper || inventoryHelper);
|
|
639
|
-
return /* @__PURE__ */ (0,
|
|
640
|
-
image ?? /* @__PURE__ */ (0,
|
|
641
|
-
/* @__PURE__ */ (0,
|
|
642
|
-
/* @__PURE__ */ (0,
|
|
643
|
-
/* @__PURE__ */ (0,
|
|
644
|
-
description ? /* @__PURE__ */ (0,
|
|
734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.Card, { withBorder: true, radius: "lg", padding: compact ? "md" : "lg", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_core10.Stack, { gap: compact ? "sm" : "md", children: [
|
|
735
|
+
image ?? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ImageFallback, { compact }),
|
|
736
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_core10.Group, { justify: "space-between", align: "flex-start", wrap: "nowrap", gap: "sm", children: [
|
|
737
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_core10.Stack, { gap: 4, style: { minWidth: 0, flex: 1 }, children: [
|
|
738
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.Title, { order: compact ? 5 : 4, lineClamp: 2, children: title }),
|
|
739
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.Text, { size: "sm", c: "dimmed", lineClamp: compact ? 2 : 3, children: description }) : null
|
|
645
740
|
] }),
|
|
646
|
-
/* @__PURE__ */ (0,
|
|
741
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.Badge, { variant: "light", color: stateBadge.color, children: stateBadge.label })
|
|
647
742
|
] }),
|
|
648
|
-
hasSupportingRegion ? /* @__PURE__ */ (0,
|
|
649
|
-
/* @__PURE__ */ (0,
|
|
650
|
-
price ? /* @__PURE__ */ (0,
|
|
651
|
-
supportingHelper ? /* @__PURE__ */ (0,
|
|
743
|
+
hasSupportingRegion ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_core10.Group, { justify: "space-between", align: "flex-end", gap: "sm", wrap: "nowrap", children: [
|
|
744
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_core10.Stack, { gap: 2, style: { minWidth: 0, flex: 1 }, children: [
|
|
745
|
+
price ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.Text, { fw: 700, size: compact ? "md" : "lg", children: price }) : null,
|
|
746
|
+
supportingHelper ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.Text, { size: "xs", c: "dimmed", children: supportingHelper }) : null
|
|
652
747
|
] }),
|
|
653
748
|
resolvedPrimaryAction
|
|
654
|
-
] }) : resolvedPrimaryAction ? /* @__PURE__ */ (0,
|
|
655
|
-
pickupHelper || inventoryHelper || metadata.length ? /* @__PURE__ */ (0,
|
|
656
|
-
pickupHelper ? /* @__PURE__ */ (0,
|
|
657
|
-
/* @__PURE__ */ (0,
|
|
658
|
-
/* @__PURE__ */ (0,
|
|
749
|
+
] }) : resolvedPrimaryAction ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.Group, { justify: "flex-end", children: resolvedPrimaryAction }) : null,
|
|
750
|
+
pickupHelper || inventoryHelper || metadata.length ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_core10.Stack, { gap: 6, children: [
|
|
751
|
+
pickupHelper ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_core10.Group, { justify: "space-between", gap: "sm", children: [
|
|
752
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.Text, { size: "sm", c: "dimmed", children: "Pickup" }),
|
|
753
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.Text, { size: "sm", fw: 500, ta: "right", children: pickupHelper })
|
|
659
754
|
] }) : null,
|
|
660
|
-
inventoryHelper ? /* @__PURE__ */ (0,
|
|
661
|
-
/* @__PURE__ */ (0,
|
|
662
|
-
/* @__PURE__ */ (0,
|
|
755
|
+
inventoryHelper ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_core10.Group, { justify: "space-between", gap: "sm", children: [
|
|
756
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.Text, { size: "sm", c: "dimmed", children: "Availability" }),
|
|
757
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.Text, { size: "sm", fw: 500, ta: "right", children: inventoryHelper })
|
|
663
758
|
] }) : null,
|
|
664
|
-
metadata.map((item) => /* @__PURE__ */ (0,
|
|
665
|
-
/* @__PURE__ */ (0,
|
|
666
|
-
/* @__PURE__ */ (0,
|
|
759
|
+
metadata.map((item) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_core10.Group, { justify: "space-between", gap: "sm", children: [
|
|
760
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.Text, { size: "sm", c: "dimmed", children: item.label }),
|
|
761
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.Text, { size: "sm", fw: 500, ta: "right", children: item.value })
|
|
667
762
|
] }, item.label))
|
|
668
763
|
] }) : null,
|
|
669
|
-
resolvedSecondaryAction ? /* @__PURE__ */ (0,
|
|
764
|
+
resolvedSecondaryAction ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.Group, { justify: "flex-end", children: resolvedSecondaryAction }) : null
|
|
670
765
|
] }) });
|
|
671
766
|
}
|
|
672
767
|
|
|
673
|
-
// src/
|
|
768
|
+
// src/PublicFoodCard.tsx
|
|
769
|
+
var import_react2 = require("react");
|
|
770
|
+
var import_core11 = require("@mantine/core");
|
|
771
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
772
|
+
var ratioMap = {
|
|
773
|
+
square: 1,
|
|
774
|
+
dish: 4 / 3,
|
|
775
|
+
landscape: 16 / 9
|
|
776
|
+
};
|
|
777
|
+
var stateConfig2 = {
|
|
778
|
+
available: { label: "Available", color: "teal" },
|
|
779
|
+
preorder: { label: "Preorder", color: "violet" },
|
|
780
|
+
limited: { label: "Limited batch", color: "yellow" },
|
|
781
|
+
"sold-out": { label: "Sold out", color: "red" },
|
|
782
|
+
"coming-soon": { label: "Coming soon", color: "gray" }
|
|
783
|
+
};
|
|
784
|
+
var markerToneMap = {
|
|
785
|
+
default: "gray",
|
|
786
|
+
positive: "teal",
|
|
787
|
+
warning: "orange",
|
|
788
|
+
muted: "dark"
|
|
789
|
+
};
|
|
790
|
+
function enhanceAction2(action, disabled) {
|
|
791
|
+
if (!(0, import_react2.isValidElement)(action)) {
|
|
792
|
+
return action;
|
|
793
|
+
}
|
|
794
|
+
return (0, import_react2.cloneElement)(action, {
|
|
795
|
+
disabled: disabled || Boolean(action.props.disabled),
|
|
796
|
+
"aria-disabled": disabled || void 0
|
|
797
|
+
});
|
|
798
|
+
}
|
|
799
|
+
function FoodImageFallback({ mediaRatio }) {
|
|
800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.AspectRatio, { ratio: ratioMap[mediaRatio], children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.ThemeIcon, { size: "100%", radius: "md", variant: "light", color: "gray", "aria-label": "No food image available", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(GdsIcons.Gallery, { size: "2rem" }) }) });
|
|
801
|
+
}
|
|
802
|
+
function LoadingFoodCard({ mediaRatio }) {
|
|
803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Card, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Stack, { gap: "md", children: [
|
|
804
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.AspectRatio, { ratio: ratioMap[mediaRatio], children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Skeleton, { radius: "md" }) }),
|
|
805
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Stack, { gap: "xs", children: [
|
|
806
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Skeleton, { height: 20, radius: "sm", width: "72%" }),
|
|
807
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Skeleton, { height: 14, radius: "sm", width: "96%" }),
|
|
808
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Skeleton, { height: 14, radius: "sm", width: "78%" })
|
|
809
|
+
] }),
|
|
810
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Group, { justify: "space-between", align: "center", children: [
|
|
811
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Skeleton, { height: 18, radius: "sm", width: 96 }),
|
|
812
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Skeleton, { height: 36, radius: "md", width: 112 })
|
|
813
|
+
] })
|
|
814
|
+
] }) });
|
|
815
|
+
}
|
|
816
|
+
function PublicFoodCard({
|
|
817
|
+
title,
|
|
818
|
+
description,
|
|
819
|
+
image,
|
|
820
|
+
price,
|
|
821
|
+
priceNote,
|
|
822
|
+
state,
|
|
823
|
+
helperText,
|
|
824
|
+
pickupNote,
|
|
825
|
+
freshnessNote,
|
|
826
|
+
markers = [],
|
|
827
|
+
metadata = [],
|
|
828
|
+
primaryAction,
|
|
829
|
+
secondaryAction,
|
|
830
|
+
quantityHint,
|
|
831
|
+
mediaRatio = "dish",
|
|
832
|
+
loading = false,
|
|
833
|
+
disabled = false
|
|
834
|
+
}) {
|
|
835
|
+
if (loading) {
|
|
836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(LoadingFoodCard, { mediaRatio });
|
|
837
|
+
}
|
|
838
|
+
const stateBadge = stateConfig2[state];
|
|
839
|
+
const isActionDisabled = disabled || state === "sold-out" || state === "coming-soon";
|
|
840
|
+
const resolvedPrimaryAction = enhanceAction2(primaryAction, isActionDisabled);
|
|
841
|
+
const resolvedSecondaryAction = enhanceAction2(secondaryAction, disabled);
|
|
842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Card, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Stack, { gap: "md", children: [
|
|
843
|
+
image ?? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(FoodImageFallback, { mediaRatio }),
|
|
844
|
+
markers.length > 0 || quantityHint ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Group, { justify: "space-between", align: "center", wrap: "wrap", gap: "xs", children: [
|
|
845
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Group, { gap: "xs", wrap: "wrap", children: markers.map((marker) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Badge, { variant: "light", color: markerToneMap[marker.tone ?? "default"], children: marker.label }, marker.id)) }),
|
|
846
|
+
quantityHint ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Text, { size: "xs", fw: 600, c: "dimmed", children: quantityHint }) : null
|
|
847
|
+
] }) : null,
|
|
848
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Group, { justify: "space-between", align: "flex-start", gap: "sm", wrap: "nowrap", children: [
|
|
849
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Stack, { gap: 4, style: { minWidth: 0, flex: 1 }, children: [
|
|
850
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Title, { order: 4, lineClamp: 2, children: title }),
|
|
851
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Text, { size: "sm", c: "dimmed", lineClamp: 3, children: description }) : null
|
|
852
|
+
] }),
|
|
853
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Badge, { variant: "light", color: stateBadge.color, children: stateBadge.label })
|
|
854
|
+
] }),
|
|
855
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Group, { justify: "space-between", align: "flex-end", gap: "sm", wrap: "nowrap", children: [
|
|
856
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Stack, { gap: 2, style: { minWidth: 0, flex: 1 }, children: [
|
|
857
|
+
price ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Text, { fw: 800, size: "lg", children: price }) : null,
|
|
858
|
+
priceNote ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Text, { size: "xs", c: "dimmed", children: priceNote }) : null,
|
|
859
|
+
helperText ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Text, { size: "sm", c: "dimmed", children: helperText }) : null
|
|
860
|
+
] }),
|
|
861
|
+
resolvedPrimaryAction
|
|
862
|
+
] }),
|
|
863
|
+
pickupNote || freshnessNote || metadata.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Stack, { gap: 6, children: [
|
|
864
|
+
pickupNote ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Group, { justify: "space-between", align: "flex-start", gap: "sm", children: [
|
|
865
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Text, { size: "sm", c: "dimmed", children: "Pickup" }),
|
|
866
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Text, { size: "sm", fw: 500, ta: "right", children: pickupNote })
|
|
867
|
+
] }) : null,
|
|
868
|
+
freshnessNote ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Group, { justify: "space-between", align: "flex-start", gap: "sm", children: [
|
|
869
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Text, { size: "sm", c: "dimmed", children: "Freshness" }),
|
|
870
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Text, { size: "sm", fw: 500, ta: "right", children: freshnessNote })
|
|
871
|
+
] }) : null,
|
|
872
|
+
metadata.map((item) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Group, { justify: "space-between", align: "flex-start", gap: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Group, { gap: "xs", wrap: "nowrap", children: [
|
|
873
|
+
item.icon,
|
|
874
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Text, { size: "sm", c: "dimmed", children: item.label })
|
|
875
|
+
] }) }, item.id))
|
|
876
|
+
] }) : null,
|
|
877
|
+
resolvedSecondaryAction ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Group, { justify: "flex-end", children: resolvedSecondaryAction }) : null
|
|
878
|
+
] }) });
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
// src/FoodMenuSection.tsx
|
|
674
882
|
var import_core12 = require("@mantine/core");
|
|
883
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
884
|
+
function FoodMenuSection({
|
|
885
|
+
title,
|
|
886
|
+
description,
|
|
887
|
+
eyebrow,
|
|
888
|
+
categories,
|
|
889
|
+
sectionNote,
|
|
890
|
+
action,
|
|
891
|
+
emptyState,
|
|
892
|
+
columns = 3,
|
|
893
|
+
showEmptyCategories = false
|
|
894
|
+
}) {
|
|
895
|
+
const normalizedCategories = (categories ?? []).filter(Boolean);
|
|
896
|
+
const visibleCategories = showEmptyCategories ? normalizedCategories : normalizedCategories.filter((category) => category.items.length > 0);
|
|
897
|
+
if (!visibleCategories.length) {
|
|
898
|
+
return emptyState ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_jsx_runtime13.Fragment, { children: emptyState }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
899
|
+
EmptyState,
|
|
900
|
+
{
|
|
901
|
+
title: "No active menu available",
|
|
902
|
+
description: "Publish grouped menu categories here when the current weekly or seasonal menu is ready."
|
|
903
|
+
}
|
|
904
|
+
);
|
|
905
|
+
}
|
|
906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Box, { component: "section", "aria-label": typeof title === "string" ? title : "Food menu section", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core12.Stack, { gap: "xl", children: [
|
|
907
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core12.Group, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
908
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core12.Stack, { gap: 4, children: [
|
|
909
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Text, { size: "xs", fw: 700, c: "dimmed", tt: "uppercase", children: eyebrow }) : null,
|
|
910
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Title, { order: 2, children: title }),
|
|
911
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Text, { size: "sm", c: "dimmed", maw: 760, children: description }) : null,
|
|
912
|
+
sectionNote ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Text, { size: "sm", c: "dimmed", children: sectionNote }) : null
|
|
913
|
+
] }),
|
|
914
|
+
action
|
|
915
|
+
] }),
|
|
916
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Stack, { gap: "xl", children: visibleCategories.map((category) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core12.Stack, { gap: "md", children: [
|
|
917
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core12.Stack, { gap: 4, children: [
|
|
918
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Title, { order: 3, children: category.title }),
|
|
919
|
+
category.description ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Text, { size: "sm", c: "dimmed", children: category.description }) : null,
|
|
920
|
+
category.helperNote ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Text, { size: "sm", c: "dimmed", children: category.helperNote }) : null
|
|
921
|
+
] }),
|
|
922
|
+
category.items.length ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.SimpleGrid, { cols: { base: 1, sm: Math.min(columns, 2), lg: columns }, spacing: "lg", children: category.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(PublicFoodCard, { ...item }, item.id)) }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
923
|
+
EmptyState,
|
|
924
|
+
{
|
|
925
|
+
title: "No items in this category",
|
|
926
|
+
description: "This category is defined, but it does not currently have any visible dishes or bundles."
|
|
927
|
+
}
|
|
928
|
+
)
|
|
929
|
+
] }, category.id)) })
|
|
930
|
+
] }) });
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
// src/ListingCard.tsx
|
|
934
|
+
var import_core13 = require("@mantine/core");
|
|
935
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
936
|
+
var ratioMap2 = {
|
|
937
|
+
"1:1": 1,
|
|
938
|
+
"4:3": 4 / 3,
|
|
939
|
+
"16:9": 16 / 9
|
|
940
|
+
};
|
|
941
|
+
var toneColorMap = {
|
|
942
|
+
default: void 0,
|
|
943
|
+
positive: "teal",
|
|
944
|
+
warning: "orange",
|
|
945
|
+
muted: "gray"
|
|
946
|
+
};
|
|
947
|
+
function ListingImageFallback({ mediaRatio }) {
|
|
948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.AspectRatio, { ratio: ratioMap2[mediaRatio], children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
949
|
+
import_core13.ThemeIcon,
|
|
950
|
+
{
|
|
951
|
+
size: "100%",
|
|
952
|
+
radius: "md",
|
|
953
|
+
variant: "light",
|
|
954
|
+
color: "gray",
|
|
955
|
+
"aria-label": "No listing image available",
|
|
956
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(GdsIcons.Gallery, { size: "2rem" })
|
|
957
|
+
}
|
|
958
|
+
) });
|
|
959
|
+
}
|
|
960
|
+
function ListingAffordance({ affordance }) {
|
|
961
|
+
const config = GdsVocabulary[affordance.action];
|
|
962
|
+
const Icon = config.icon;
|
|
963
|
+
const label = affordance.ariaLabel ?? getSemanticActionLabel(affordance.action);
|
|
964
|
+
if (affordance.href) {
|
|
965
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
966
|
+
import_core13.ActionIcon,
|
|
967
|
+
{
|
|
968
|
+
component: "a",
|
|
969
|
+
href: affordance.href,
|
|
970
|
+
variant: "subtle",
|
|
971
|
+
size: "lg",
|
|
972
|
+
"aria-label": label,
|
|
973
|
+
disabled: affordance.disabled,
|
|
974
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { size: "1rem", stroke: 1.75 })
|
|
975
|
+
}
|
|
976
|
+
);
|
|
977
|
+
}
|
|
978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
979
|
+
import_core13.ActionIcon,
|
|
980
|
+
{
|
|
981
|
+
variant: "subtle",
|
|
982
|
+
size: "lg",
|
|
983
|
+
"aria-label": label,
|
|
984
|
+
onClick: affordance.onClick,
|
|
985
|
+
disabled: affordance.disabled,
|
|
986
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { size: "1rem", stroke: 1.75 })
|
|
987
|
+
}
|
|
988
|
+
);
|
|
989
|
+
}
|
|
990
|
+
function ListingCard({
|
|
991
|
+
title,
|
|
992
|
+
href,
|
|
993
|
+
description,
|
|
994
|
+
image,
|
|
995
|
+
mediaRatio = "4:3",
|
|
996
|
+
metadata = [],
|
|
997
|
+
featured = false,
|
|
998
|
+
sponsoredDisclosure,
|
|
999
|
+
price,
|
|
1000
|
+
primaryAction,
|
|
1001
|
+
saveAction,
|
|
1002
|
+
shareAction,
|
|
1003
|
+
compact = false
|
|
1004
|
+
}) {
|
|
1005
|
+
const titleContent = href && typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Text, { component: "a", href, inherit: true, td: "none", children: title }) : title;
|
|
1006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Card, { withBorder: true, radius: "lg", padding: compact ? "md" : "lg", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_core13.Stack, { gap: compact ? "sm" : "md", children: [
|
|
1007
|
+
image ?? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ListingImageFallback, { mediaRatio }),
|
|
1008
|
+
featured || sponsoredDisclosure ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_core13.Group, { justify: "space-between", gap: "sm", wrap: "wrap", children: [
|
|
1009
|
+
featured ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Badge, { variant: "light", color: "violet", children: "Featured" }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", {}),
|
|
1010
|
+
sponsoredDisclosure ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Text, { size: "xs", c: "dimmed", children: sponsoredDisclosure }) : null
|
|
1011
|
+
] }) : null,
|
|
1012
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_core13.Stack, { gap: 4, children: [
|
|
1013
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Title, { order: compact ? 5 : 4, lineClamp: 2, children: titleContent }),
|
|
1014
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Text, { size: "sm", c: "dimmed", lineClamp: compact ? 2 : 3, children: description }) : null
|
|
1015
|
+
] }),
|
|
1016
|
+
metadata.length ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Stack, { gap: "xs", children: metadata.map((item) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_core13.Group, { justify: "space-between", align: "flex-start", gap: "sm", wrap: "nowrap", children: [
|
|
1017
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_core13.Group, { gap: "xs", wrap: "nowrap", style: { minWidth: 0, flex: 1 }, children: [
|
|
1018
|
+
item.icon,
|
|
1019
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Text, { size: "sm", c: item.tone ? toneColorMap[item.tone] : "dimmed", lineClamp: 1, children: item.label })
|
|
1020
|
+
] }),
|
|
1021
|
+
item.value ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Text, { size: "sm", fw: 500, ta: "right", children: item.value }) : null
|
|
1022
|
+
] }, item.id)) }) : null,
|
|
1023
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_core13.Group, { justify: "space-between", align: "center", gap: "sm", wrap: "wrap", children: [
|
|
1024
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Stack, { gap: 2, style: { minWidth: 0, flex: 1 }, children: price ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Text, { fw: 700, size: compact ? "md" : "lg", children: price }) : null }),
|
|
1025
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_core13.Group, { gap: "xs", wrap: "nowrap", justify: "flex-end", style: { marginInlineStart: "auto" }, children: [
|
|
1026
|
+
saveAction ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ListingAffordance, { affordance: saveAction }) : null,
|
|
1027
|
+
shareAction ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ListingAffordance, { affordance: shareAction }) : null,
|
|
1028
|
+
primaryAction
|
|
1029
|
+
] })
|
|
1030
|
+
] })
|
|
1031
|
+
] }) });
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
// src/BrowseSurface.tsx
|
|
1035
|
+
var import_core16 = require("@mantine/core");
|
|
675
1036
|
|
|
676
1037
|
// src/DataToolbar.tsx
|
|
677
|
-
var
|
|
678
|
-
var
|
|
1038
|
+
var import_core14 = require("@mantine/core");
|
|
1039
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
679
1040
|
function DataToolbar({
|
|
680
1041
|
searchSlot,
|
|
681
1042
|
filterSlot,
|
|
@@ -684,20 +1045,20 @@ function DataToolbar({
|
|
|
684
1045
|
createAction,
|
|
685
1046
|
activeFilters = []
|
|
686
1047
|
}) {
|
|
687
|
-
return /* @__PURE__ */ (0,
|
|
688
|
-
/* @__PURE__ */ (0,
|
|
689
|
-
/* @__PURE__ */ (0,
|
|
1048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Stack, { gap: "sm", children: [
|
|
1049
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Group, { justify: "space-between", align: "flex-start", gap: "sm", children: [
|
|
1050
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Group, { flex: 1, align: "flex-start", gap: "sm", children: [
|
|
690
1051
|
searchSlot,
|
|
691
1052
|
filterSlot,
|
|
692
1053
|
sortSlot
|
|
693
1054
|
] }),
|
|
694
|
-
/* @__PURE__ */ (0,
|
|
1055
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Group, { gap: "sm", children: [
|
|
695
1056
|
resetAction,
|
|
696
1057
|
createAction
|
|
697
1058
|
] })
|
|
698
1059
|
] }),
|
|
699
|
-
activeFilters.length ? /* @__PURE__ */ (0,
|
|
700
|
-
|
|
1060
|
+
activeFilters.length ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Group, { gap: "xs", children: activeFilters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1061
|
+
import_core14.Badge,
|
|
701
1062
|
{
|
|
702
1063
|
variant: "light",
|
|
703
1064
|
rightSection: filter.onRemove ? "\xD7" : void 0,
|
|
@@ -711,17 +1072,17 @@ function DataToolbar({
|
|
|
711
1072
|
}
|
|
712
1073
|
|
|
713
1074
|
// src/StateBlock.tsx
|
|
714
|
-
var
|
|
715
|
-
var
|
|
1075
|
+
var import_core15 = require("@mantine/core");
|
|
1076
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
716
1077
|
var variantConfig = {
|
|
717
|
-
loading: { color: "violet", icon: /* @__PURE__ */ (0,
|
|
718
|
-
empty: { color: "gray", icon: /* @__PURE__ */ (0,
|
|
719
|
-
error: { color: "red", icon: /* @__PURE__ */ (0,
|
|
720
|
-
permission: { color: "orange", icon: /* @__PURE__ */ (0,
|
|
721
|
-
disabled: { color: "gray", icon: /* @__PURE__ */ (0,
|
|
722
|
-
success: { color: "teal", icon: /* @__PURE__ */ (0,
|
|
723
|
-
info: { color: "blue", icon: /* @__PURE__ */ (0,
|
|
724
|
-
"not-enough-data": { color: "yellow", icon: /* @__PURE__ */ (0,
|
|
1078
|
+
loading: { color: "violet", icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_core15.Loader, { size: "sm" }) },
|
|
1079
|
+
empty: { color: "gray", icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GdsIcons.Inbox, { size: "1.1rem" }) },
|
|
1080
|
+
error: { color: "red", icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GdsIcons.Danger, { size: "1.1rem" }) },
|
|
1081
|
+
permission: { color: "orange", icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GdsIcons.Verify, { size: "1.1rem" }) },
|
|
1082
|
+
disabled: { color: "gray", icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GdsIcons.Toggle, { size: "1.1rem" }) },
|
|
1083
|
+
success: { color: "teal", icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GdsIcons.Success, { size: "1.1rem" }) },
|
|
1084
|
+
info: { color: "blue", icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GdsIcons.Info, { size: "1.1rem" }) },
|
|
1085
|
+
"not-enough-data": { color: "yellow", icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GdsIcons.Analytics, { size: "1.1rem" }) }
|
|
725
1086
|
};
|
|
726
1087
|
function StateBlock({
|
|
727
1088
|
variant,
|
|
@@ -732,8 +1093,8 @@ function StateBlock({
|
|
|
732
1093
|
compact = false
|
|
733
1094
|
}) {
|
|
734
1095
|
const config = variantConfig[variant];
|
|
735
|
-
return /* @__PURE__ */ (0,
|
|
736
|
-
|
|
1096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1097
|
+
import_core15.Stack,
|
|
737
1098
|
{
|
|
738
1099
|
align: compact ? "flex-start" : "center",
|
|
739
1100
|
justify: "center",
|
|
@@ -741,10 +1102,10 @@ function StateBlock({
|
|
|
741
1102
|
py: compact ? "md" : "xl",
|
|
742
1103
|
ta: compact ? "left" : "center",
|
|
743
1104
|
children: [
|
|
744
|
-
/* @__PURE__ */ (0,
|
|
745
|
-
/* @__PURE__ */ (0,
|
|
746
|
-
/* @__PURE__ */ (0,
|
|
747
|
-
description ? /* @__PURE__ */ (0,
|
|
1105
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_core15.ThemeIcon, { variant: "light", color: config.color, size: compact ? "lg" : "xl", radius: "xl", children: icon ?? config.icon }),
|
|
1106
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_core15.Stack, { gap: 6, align: compact ? "flex-start" : "center", children: [
|
|
1107
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_core15.Title, { order: compact ? 4 : 3, children: title }),
|
|
1108
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_core15.Text, { c: "dimmed", maw: compact ? void 0 : 480, children: description }) : null
|
|
748
1109
|
] }),
|
|
749
1110
|
action
|
|
750
1111
|
]
|
|
@@ -753,7 +1114,7 @@ function StateBlock({
|
|
|
753
1114
|
}
|
|
754
1115
|
|
|
755
1116
|
// src/BrowseSurface.tsx
|
|
756
|
-
var
|
|
1117
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
757
1118
|
function BrowseSurface({
|
|
758
1119
|
eyebrow,
|
|
759
1120
|
title,
|
|
@@ -787,22 +1148,22 @@ function BrowseSurface({
|
|
|
787
1148
|
}));
|
|
788
1149
|
let body = content;
|
|
789
1150
|
if (loading) {
|
|
790
|
-
body = /* @__PURE__ */ (0,
|
|
1151
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(StateBlock, { variant: "loading", title: loadingTitle, description: loadingDescription, compact: true });
|
|
791
1152
|
} else if (error) {
|
|
792
|
-
body = /* @__PURE__ */ (0,
|
|
1153
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(StateBlock, { variant: "error", title: errorTitle, description: error, action: errorAction ?? emptyAction, compact: true });
|
|
793
1154
|
} else if (empty) {
|
|
794
|
-
body = /* @__PURE__ */ (0,
|
|
1155
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(StateBlock, { variant: "empty", title: emptyTitle, description: emptyDescription, action: emptyAction, compact: true });
|
|
795
1156
|
}
|
|
796
|
-
return /* @__PURE__ */ (0,
|
|
797
|
-
/* @__PURE__ */ (0,
|
|
798
|
-
/* @__PURE__ */ (0,
|
|
799
|
-
/* @__PURE__ */ (0,
|
|
800
|
-
eyebrow ? /* @__PURE__ */ (0,
|
|
801
|
-
/* @__PURE__ */ (0,
|
|
802
|
-
description ? /* @__PURE__ */ (0,
|
|
1157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Stack, { gap: "lg", children: [
|
|
1158
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Paper, { withBorder: true, radius: "xl", p: "xl", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Stack, { gap: "lg", children: [
|
|
1159
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Group, { justify: "space-between", align: "flex-start", gap: "md", children: [
|
|
1160
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Stack, { gap: "xs", maw: 760, children: [
|
|
1161
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Text, { size: "xs", fw: 700, tt: "uppercase", c: "dimmed", style: { letterSpacing: "0.18em" }, children: eyebrow }) : null,
|
|
1162
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Title, { order: 1, children: title }),
|
|
1163
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Text, { size: "lg", c: "dimmed", children: description }) : null
|
|
803
1164
|
] }),
|
|
804
|
-
/* @__PURE__ */ (0,
|
|
805
|
-
typeof resultCount === "number" ? /* @__PURE__ */ (0,
|
|
1165
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Stack, { align: "flex-end", gap: "xs", children: [
|
|
1166
|
+
typeof resultCount === "number" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Badge, { size: "lg", radius: "xl", variant: "light", color: "violet", children: [
|
|
806
1167
|
resultCount,
|
|
807
1168
|
" ",
|
|
808
1169
|
resultLabel
|
|
@@ -810,10 +1171,10 @@ function BrowseSurface({
|
|
|
810
1171
|
primaryControls
|
|
811
1172
|
] })
|
|
812
1173
|
] }),
|
|
813
|
-
scopeOptions.length ? /* @__PURE__ */ (0,
|
|
814
|
-
/* @__PURE__ */ (0,
|
|
815
|
-
/* @__PURE__ */ (0,
|
|
816
|
-
|
|
1174
|
+
scopeOptions.length ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Stack, { gap: "xs", children: [
|
|
1175
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Text, { size: "sm", fw: 600, c: "dimmed", children: scopeLabel }),
|
|
1176
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Group, { gap: "xs", wrap: "wrap", children: scopeOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1177
|
+
import_core16.Button,
|
|
817
1178
|
{
|
|
818
1179
|
variant: option.active ? "filled" : "default",
|
|
819
1180
|
color: option.active ? "violet" : "gray",
|
|
@@ -825,30 +1186,30 @@ function BrowseSurface({
|
|
|
825
1186
|
option.id
|
|
826
1187
|
)) })
|
|
827
1188
|
] }) : null,
|
|
828
|
-
locationControls ? /* @__PURE__ */ (0,
|
|
829
|
-
/* @__PURE__ */ (0,
|
|
1189
|
+
locationControls ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Stack, { gap: "xs", children: [
|
|
1190
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Text, { size: "sm", fw: 600, c: "dimmed", children: "Location" }),
|
|
830
1191
|
locationControls
|
|
831
1192
|
] }) : null,
|
|
832
|
-
toolbar || sortControl ? /* @__PURE__ */ (0,
|
|
833
|
-
toolbar ? /* @__PURE__ */ (0,
|
|
1193
|
+
toolbar || sortControl ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.SimpleGrid, { cols: { base: 1, lg: sortControl ? 2 : 1 }, spacing: "md", children: [
|
|
1194
|
+
toolbar ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
834
1195
|
DataToolbar,
|
|
835
1196
|
{
|
|
836
1197
|
...toolbar,
|
|
837
1198
|
activeFilters: toolbarFilters.length ? toolbarFilters : toolbar.fallbackActiveFilters
|
|
838
1199
|
}
|
|
839
|
-
) : /* @__PURE__ */ (0,
|
|
840
|
-
sortControl ? /* @__PURE__ */ (0,
|
|
841
|
-
/* @__PURE__ */ (0,
|
|
1200
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Box, {}),
|
|
1201
|
+
sortControl ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Stack, { gap: "xs", align: "stretch", children: [
|
|
1202
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Text, { size: "sm", fw: 600, c: "dimmed", children: "Sort" }),
|
|
842
1203
|
sortControl
|
|
843
1204
|
] }) : null
|
|
844
1205
|
] }) : null,
|
|
845
|
-
mobileFilters ? /* @__PURE__ */ (0,
|
|
846
|
-
/* @__PURE__ */ (0,
|
|
1206
|
+
mobileFilters ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Stack, { hiddenFrom: "lg", gap: "xs", children: [
|
|
1207
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Text, { size: "sm", fw: 600, c: "dimmed", children: "Filters" }),
|
|
847
1208
|
mobileFilters
|
|
848
1209
|
] }) : null,
|
|
849
|
-
filterDrawer ? /* @__PURE__ */ (0,
|
|
850
|
-
activeFilters.length ? /* @__PURE__ */ (0,
|
|
851
|
-
|
|
1210
|
+
filterDrawer ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Box, { hiddenFrom: "lg", children: filterDrawer }) : null,
|
|
1211
|
+
activeFilters.length ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Group, { gap: "xs", wrap: "wrap", children: activeFilters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1212
|
+
import_core16.Badge,
|
|
852
1213
|
{
|
|
853
1214
|
variant: "light",
|
|
854
1215
|
color: "violet",
|
|
@@ -865,8 +1226,8 @@ function BrowseSurface({
|
|
|
865
1226
|
}
|
|
866
1227
|
|
|
867
1228
|
// src/AccentPanel.tsx
|
|
868
|
-
var
|
|
869
|
-
var
|
|
1229
|
+
var import_core17 = require("@mantine/core");
|
|
1230
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
870
1231
|
var toneStyles = {
|
|
871
1232
|
gray: {
|
|
872
1233
|
bg: "light-dark(var(--mantine-color-gray-0), color-mix(in srgb, var(--mantine-color-gray-7) 88%, black))",
|
|
@@ -922,29 +1283,56 @@ function AccentPanel({
|
|
|
922
1283
|
children
|
|
923
1284
|
}) {
|
|
924
1285
|
const styles = resolveAccentPanelStyles(tone, variant);
|
|
925
|
-
return /* @__PURE__ */ (0,
|
|
926
|
-
title || badge ? /* @__PURE__ */ (0,
|
|
927
|
-
title ? /* @__PURE__ */ (0,
|
|
928
|
-
badge ? typeof badge === "string" ? /* @__PURE__ */ (0,
|
|
1286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core17.Paper, { withBorder: true, radius: "lg", p: "lg", style: styles, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_core17.Stack, { gap: "sm", children: [
|
|
1287
|
+
title || badge ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_core17.Group, { justify: "space-between", align: "flex-start", gap: "sm", wrap: "wrap", children: [
|
|
1288
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core17.Title, { order: 4, c: "inherit", children: title }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core17.Box, {}),
|
|
1289
|
+
badge ? typeof badge === "string" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core17.Badge, { color: tone === "amber" ? "yellow" : tone, variant: "filled", children: badge }) : badge : null
|
|
929
1290
|
] }) : null,
|
|
930
|
-
typeof children === "string" ? /* @__PURE__ */ (0,
|
|
1291
|
+
typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core17.Text, { c: "inherit", children }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core17.Box, { c: "inherit", children })
|
|
1292
|
+
] }) });
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
// src/DetailProfileShell.tsx
|
|
1296
|
+
var import_core18 = require("@mantine/core");
|
|
1297
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1298
|
+
function DetailProfileShell({
|
|
1299
|
+
mode = "page",
|
|
1300
|
+
hero,
|
|
1301
|
+
actions,
|
|
1302
|
+
sections,
|
|
1303
|
+
related,
|
|
1304
|
+
padding = "lg",
|
|
1305
|
+
showDividers = true
|
|
1306
|
+
}) {
|
|
1307
|
+
const content = sections.filter(Boolean);
|
|
1308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_core18.Paper, { withBorder: mode === "drawer", radius: mode === "drawer" ? "xl" : "md", p: padding, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_core18.Stack, { gap: "lg", children: [
|
|
1309
|
+
hero,
|
|
1310
|
+
actions,
|
|
1311
|
+
content.map((section, index) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_core18.Stack, { gap: "lg", children: [
|
|
1312
|
+
index > 0 && showDividers ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_core18.Divider, {}) : null,
|
|
1313
|
+
section
|
|
1314
|
+
] }, index)),
|
|
1315
|
+
related ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
1316
|
+
content.length && showDividers ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_core18.Divider, {}) : null,
|
|
1317
|
+
related
|
|
1318
|
+
] }) : null
|
|
931
1319
|
] }) });
|
|
932
1320
|
}
|
|
933
1321
|
|
|
934
1322
|
// src/PublicShell.tsx
|
|
935
|
-
var
|
|
1323
|
+
var import_core20 = require("@mantine/core");
|
|
936
1324
|
|
|
937
1325
|
// src/PublicNav.tsx
|
|
938
|
-
var
|
|
939
|
-
var
|
|
1326
|
+
var import_core19 = require("@mantine/core");
|
|
1327
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
940
1328
|
function PublicNav({ items, activeId, renderLink }) {
|
|
941
|
-
return /* @__PURE__ */ (0,
|
|
1329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_core19.Group, { component: "nav", "aria-label": "Primary", gap: "lg", wrap: "nowrap", children: items.map((item) => {
|
|
942
1330
|
const active = item.id === activeId;
|
|
943
1331
|
if (renderLink) {
|
|
944
|
-
return /* @__PURE__ */ (0,
|
|
1332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: renderLink(item, active) }, item.id);
|
|
945
1333
|
}
|
|
946
|
-
return /* @__PURE__ */ (0,
|
|
947
|
-
|
|
1334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1335
|
+
import_core19.Anchor,
|
|
948
1336
|
{
|
|
949
1337
|
href: item.href,
|
|
950
1338
|
"aria-current": active ? "page" : void 0,
|
|
@@ -961,15 +1349,15 @@ function PublicNav({ items, activeId, renderLink }) {
|
|
|
961
1349
|
}
|
|
962
1350
|
|
|
963
1351
|
// src/PublicShell.tsx
|
|
964
|
-
var
|
|
1352
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
965
1353
|
function InlineMobileNavigation({
|
|
966
1354
|
mobileNavigation,
|
|
967
1355
|
className,
|
|
968
1356
|
mode
|
|
969
1357
|
}) {
|
|
970
|
-
return /* @__PURE__ */ (0,
|
|
971
|
-
/* @__PURE__ */ (0,
|
|
972
|
-
|
|
1358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_core20.Box, { component: "details", hiddenFrom: "sm", className, children: [
|
|
1359
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1360
|
+
import_core20.Box,
|
|
973
1361
|
{
|
|
974
1362
|
component: "summary",
|
|
975
1363
|
"aria-label": mode === "drawer" ? "Open site navigation drawer" : "Open site navigation",
|
|
@@ -981,13 +1369,13 @@ function InlineMobileNavigation({
|
|
|
981
1369
|
gap: "0.5rem"
|
|
982
1370
|
},
|
|
983
1371
|
children: [
|
|
984
|
-
/* @__PURE__ */ (0,
|
|
985
|
-
/* @__PURE__ */ (0,
|
|
1372
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Burger, { opened: false, "aria-hidden": true }),
|
|
1373
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Text, { size: "sm", fw: 600, children: "Menu" })
|
|
986
1374
|
]
|
|
987
1375
|
}
|
|
988
1376
|
),
|
|
989
|
-
/* @__PURE__ */ (0,
|
|
990
|
-
|
|
1377
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1378
|
+
import_core20.Box,
|
|
991
1379
|
{
|
|
992
1380
|
mt: "sm",
|
|
993
1381
|
p: "sm",
|
|
@@ -996,7 +1384,7 @@ function InlineMobileNavigation({
|
|
|
996
1384
|
border: "1px solid var(--mantine-color-default-border)",
|
|
997
1385
|
background: mode === "drawer" ? "light-dark(var(--mantine-color-white), color-mix(in srgb, var(--mantine-color-dark-7) 92%, black))" : "var(--mantine-color-body)"
|
|
998
1386
|
},
|
|
999
|
-
children: /* @__PURE__ */ (0,
|
|
1387
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Stack, { gap: "sm", children: mobileNavigation })
|
|
1000
1388
|
}
|
|
1001
1389
|
)
|
|
1002
1390
|
] });
|
|
@@ -1017,30 +1405,30 @@ function PublicShell({
|
|
|
1017
1405
|
mobileNavigationMode = "sheet",
|
|
1018
1406
|
classNames
|
|
1019
1407
|
}) {
|
|
1020
|
-
const resolvedNavigation = navigation ?? (navItems ? /* @__PURE__ */ (0,
|
|
1408
|
+
const resolvedNavigation = navigation ?? (navItems ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PublicNav, { items: navItems, activeId: activeNavId }) : null);
|
|
1021
1409
|
const containerSize = maxContentWidth ?? (compact ? "md" : "lg");
|
|
1022
1410
|
const headerHeight = headerVariant === "compact" ? 64 : headerVariant === "branded-quiet" ? 88 : 72;
|
|
1023
1411
|
const mainPadding = headerVariant === "compact" ? "lg" : "xl";
|
|
1024
1412
|
const usesInlineMobileNavigation = Boolean(mobileNavigation) && mobileNavigationMode !== "sheet";
|
|
1025
1413
|
const usesSheetMobileNavigation = Boolean(mobileNavigation) && mobileNavigationMode === "sheet";
|
|
1026
|
-
return /* @__PURE__ */ (0,
|
|
1027
|
-
|
|
1414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1415
|
+
import_core20.AppShell,
|
|
1028
1416
|
{
|
|
1029
1417
|
className: classNames?.root,
|
|
1030
1418
|
header: { height: headerHeight },
|
|
1031
1419
|
footer: usesSheetMobileNavigation ? { height: 68 } : void 0,
|
|
1032
1420
|
padding: 0,
|
|
1033
1421
|
children: [
|
|
1034
|
-
/* @__PURE__ */ (0,
|
|
1035
|
-
|
|
1422
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.AppShell.Header, { withBorder: headerBordered, className: classNames?.header, "data-header-variant": headerVariant, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Container, { size: containerSize, h: "100%", py: headerVariant === "branded-quiet" ? "sm" : 0, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1423
|
+
import_core20.Group,
|
|
1036
1424
|
{
|
|
1037
1425
|
h: "100%",
|
|
1038
1426
|
justify: "space-between",
|
|
1039
1427
|
wrap: "nowrap",
|
|
1040
1428
|
gap: headerVariant === "compact" ? "sm" : "lg",
|
|
1041
1429
|
children: [
|
|
1042
|
-
/* @__PURE__ */ (0,
|
|
1043
|
-
usesInlineMobileNavigation ? /* @__PURE__ */ (0,
|
|
1430
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_core20.Group, { wrap: "nowrap", gap: headerVariant === "compact" ? "xs" : "sm", className: classNames?.brand, children: [
|
|
1431
|
+
usesInlineMobileNavigation ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1044
1432
|
InlineMobileNavigation,
|
|
1045
1433
|
{
|
|
1046
1434
|
mobileNavigation,
|
|
@@ -1048,17 +1436,17 @@ function PublicShell({
|
|
|
1048
1436
|
mode: mobileNavigationMode
|
|
1049
1437
|
}
|
|
1050
1438
|
) : null,
|
|
1051
|
-
/* @__PURE__ */ (0,
|
|
1439
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Box, { children: brand })
|
|
1052
1440
|
] }),
|
|
1053
|
-
/* @__PURE__ */ (0,
|
|
1054
|
-
/* @__PURE__ */ (0,
|
|
1441
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Group, { visibleFrom: "sm", gap: headerVariant === "compact" ? "md" : "lg", className: classNames?.navigation, children: resolvedNavigation }),
|
|
1442
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Group, { gap: "sm", className: classNames?.actions, children: actions })
|
|
1055
1443
|
]
|
|
1056
1444
|
}
|
|
1057
1445
|
) }) }),
|
|
1058
|
-
usesSheetMobileNavigation ? /* @__PURE__ */ (0,
|
|
1059
|
-
/* @__PURE__ */ (0,
|
|
1060
|
-
/* @__PURE__ */ (0,
|
|
1061
|
-
footer ? /* @__PURE__ */ (0,
|
|
1446
|
+
usesSheetMobileNavigation ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.AppShell.Footer, { withBorder: true, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Container, { size: containerSize, h: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Group, { h: "100%", justify: "space-around", wrap: "nowrap", children: mobileNavigation }) }) }) : null,
|
|
1447
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_core20.AppShell.Main, { children: [
|
|
1448
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Container, { size: containerSize, py: mainPadding, className: classNames?.content, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Stack, { gap: "xl", children }) }),
|
|
1449
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Box, { component: typeof footer === "string" ? "footer" : "div", py: "xl", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Container, { size: containerSize, children: typeof footer === "string" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Text, { size: "sm", c: "dimmed", children: footer }) : footer }) }) : null
|
|
1062
1450
|
] })
|
|
1063
1451
|
]
|
|
1064
1452
|
}
|
|
@@ -1066,18 +1454,18 @@ function PublicShell({
|
|
|
1066
1454
|
}
|
|
1067
1455
|
|
|
1068
1456
|
// src/PublicSiteFooter.tsx
|
|
1069
|
-
var
|
|
1070
|
-
var
|
|
1457
|
+
var import_core21 = require("@mantine/core");
|
|
1458
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1071
1459
|
function PublicSiteFooter({ children, meta }) {
|
|
1072
|
-
return /* @__PURE__ */ (0,
|
|
1073
|
-
children ? /* @__PURE__ */ (0,
|
|
1074
|
-
meta ? /* @__PURE__ */ (0,
|
|
1460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_core21.Stack, { component: "footer", gap: "xs", children: [
|
|
1461
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_core21.Text, { size: "sm", children }) : null,
|
|
1462
|
+
meta ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_core21.Group, { gap: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_core21.Text, { size: "xs", c: "dimmed", children: meta }) }) : null
|
|
1075
1463
|
] });
|
|
1076
1464
|
}
|
|
1077
1465
|
|
|
1078
1466
|
// src/PublicBrandFooter.tsx
|
|
1079
|
-
var
|
|
1080
|
-
var
|
|
1467
|
+
var import_core22 = require("@mantine/core");
|
|
1468
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1081
1469
|
function PublicBrandFooter({
|
|
1082
1470
|
media,
|
|
1083
1471
|
brandTitle,
|
|
@@ -1092,8 +1480,8 @@ function PublicBrandFooter({
|
|
|
1092
1480
|
const mediaSpan = layoutVariant === "immersive-media" ? 5 : 4;
|
|
1093
1481
|
const primarySpan = media ? layoutVariant === "balanced-quote" ? 4 : 4 : secondary ? 6 : 12;
|
|
1094
1482
|
const secondarySpan = media ? Math.max(3, 12 - mediaSpan - primarySpan) : Math.max(4, 12 - primarySpan);
|
|
1095
|
-
return /* @__PURE__ */ (0,
|
|
1096
|
-
|
|
1483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1484
|
+
import_core22.Paper,
|
|
1097
1485
|
{
|
|
1098
1486
|
component: "footer",
|
|
1099
1487
|
withBorder: true,
|
|
@@ -1101,19 +1489,19 @@ function PublicBrandFooter({
|
|
|
1101
1489
|
p: compact ? "lg" : "xl",
|
|
1102
1490
|
className: classNames?.root,
|
|
1103
1491
|
"data-layout-variant": layoutVariant,
|
|
1104
|
-
children: /* @__PURE__ */ (0,
|
|
1105
|
-
/* @__PURE__ */ (0,
|
|
1106
|
-
media ? /* @__PURE__ */ (0,
|
|
1107
|
-
/* @__PURE__ */ (0,
|
|
1108
|
-
brandTitle ? /* @__PURE__ */ (0,
|
|
1109
|
-
description ? /* @__PURE__ */ (0,
|
|
1110
|
-
actions ? /* @__PURE__ */ (0,
|
|
1492
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_core22.Stack, { gap: "lg", children: [
|
|
1493
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_core22.Grid, { gutter: compact ? "lg" : "xl", align: "flex-start", children: [
|
|
1494
|
+
media ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core22.Grid.Col, { span: { base: 12, md: mediaSpan }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core22.Box, { className: classNames?.media, children: media }) }) : null,
|
|
1495
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core22.Grid.Col, { span: { base: 12, md: primarySpan }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_core22.Stack, { gap: compact ? "xs" : "sm", className: classNames?.primary, children: [
|
|
1496
|
+
brandTitle ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core22.Title, { order: 4, children: brandTitle }) : null,
|
|
1497
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core22.Text, { c: "dimmed", children: description }) : null,
|
|
1498
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core22.Box, { children: actions }) : null
|
|
1111
1499
|
] }) }),
|
|
1112
|
-
secondary ? /* @__PURE__ */ (0,
|
|
1500
|
+
secondary ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core22.Grid.Col, { span: { base: 12, md: secondarySpan }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core22.Stack, { gap: compact ? "xs" : "sm", className: classNames?.secondary, children: secondary }) }) : null
|
|
1113
1501
|
] }),
|
|
1114
|
-
legal ? /* @__PURE__ */ (0,
|
|
1115
|
-
/* @__PURE__ */ (0,
|
|
1116
|
-
/* @__PURE__ */ (0,
|
|
1502
|
+
legal ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
1503
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core22.Divider, {}),
|
|
1504
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core22.Group, { justify: "space-between", gap: "sm", wrap: "wrap", className: classNames?.legal, children: typeof legal === "string" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core22.Text, { size: "sm", c: "dimmed", children: legal }) : legal })
|
|
1117
1505
|
] }) : null
|
|
1118
1506
|
] })
|
|
1119
1507
|
}
|
|
@@ -1121,57 +1509,136 @@ function PublicBrandFooter({
|
|
|
1121
1509
|
}
|
|
1122
1510
|
|
|
1123
1511
|
// src/AuthShell.tsx
|
|
1124
|
-
var
|
|
1125
|
-
var
|
|
1126
|
-
function AuthShell({
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1512
|
+
var import_core23 = require("@mantine/core");
|
|
1513
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1514
|
+
function AuthShell({
|
|
1515
|
+
title,
|
|
1516
|
+
description,
|
|
1517
|
+
brand,
|
|
1518
|
+
headerActions,
|
|
1519
|
+
footer,
|
|
1520
|
+
helper,
|
|
1521
|
+
socialAuth,
|
|
1522
|
+
dividerLabel = "Or continue with your account",
|
|
1523
|
+
children
|
|
1524
|
+
}) {
|
|
1525
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Box, { py: { base: "xl", md: "4rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Container, { size: "xs", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core23.Stack, { gap: "xl", children: [
|
|
1526
|
+
brand || headerActions ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core23.Group, { justify: brand && headerActions ? "space-between" : "center", align: "center", children: [
|
|
1527
|
+
brand ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Box, { children: brand }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Box, {}),
|
|
1528
|
+
headerActions ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Group, { gap: "sm", children: headerActions }) : null
|
|
1529
|
+
] }) : null,
|
|
1530
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Card, { withBorder: true, radius: "lg", padding: "xl", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core23.Stack, { gap: "lg", children: [
|
|
1531
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core23.Stack, { gap: "xs", ta: "center", children: [
|
|
1532
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Title, { order: 2, children: title }),
|
|
1533
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Text, { c: "dimmed", size: "sm", children: description }) : null
|
|
1133
1534
|
] }),
|
|
1535
|
+
socialAuth ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Box, { children: socialAuth }) : null,
|
|
1536
|
+
socialAuth ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Divider, { label: dividerLabel, labelPosition: "center" }) : null,
|
|
1134
1537
|
children,
|
|
1135
|
-
helper ? /* @__PURE__ */ (0,
|
|
1538
|
+
helper ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Text, { size: "sm", c: "dimmed", ta: "center", children: helper }) : null
|
|
1136
1539
|
] }) }),
|
|
1137
|
-
footer ? /* @__PURE__ */ (0,
|
|
1540
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Text, { size: "sm", c: "dimmed", ta: "center", children: footer }) : null
|
|
1138
1541
|
] }) }) });
|
|
1139
1542
|
}
|
|
1140
1543
|
|
|
1544
|
+
// src/SocialAuthButtons.tsx
|
|
1545
|
+
var import_core24 = require("@mantine/core");
|
|
1546
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1547
|
+
var providerConfig = {
|
|
1548
|
+
google: { label: "Google", mark: "G", color: "red" },
|
|
1549
|
+
apple: { label: "Apple", mark: "A", color: "dark" },
|
|
1550
|
+
github: { label: "GitHub", mark: "GH", color: "gray" },
|
|
1551
|
+
facebook: { label: "Facebook", mark: "F", color: "blue" },
|
|
1552
|
+
microsoft: { label: "Microsoft", mark: "M", color: "cyan" },
|
|
1553
|
+
linkedin: { label: "LinkedIn", mark: "in", color: "blue" },
|
|
1554
|
+
discord: { label: "Discord", mark: "D", color: "indigo" },
|
|
1555
|
+
x: { label: "X", mark: "X", color: "dark" },
|
|
1556
|
+
email: { label: "Email", mark: "@", color: "gray" }
|
|
1557
|
+
};
|
|
1558
|
+
function ProviderMark({ id }) {
|
|
1559
|
+
const config = providerConfig[id] ?? { label: id, mark: id.slice(0, 2).toUpperCase(), color: "gray" };
|
|
1560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core24.ThemeIcon, { variant: "light", color: config.color, radius: "xl", size: "md", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core24.Text, { size: "xs", fw: 700, children: config.mark }) });
|
|
1561
|
+
}
|
|
1562
|
+
function SocialAuthButton({ provider, compact = false }) {
|
|
1563
|
+
const config = providerConfig[provider.id] ?? { label: provider.id, mark: provider.id.slice(0, 2).toUpperCase(), color: "gray" };
|
|
1564
|
+
const label = provider.label ?? `Continue with ${config.label}`;
|
|
1565
|
+
const buttonProps = provider.href ? { component: "a", href: provider.href } : { onClick: provider.onClick };
|
|
1566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1567
|
+
import_core24.Button,
|
|
1568
|
+
{
|
|
1569
|
+
variant: "default",
|
|
1570
|
+
justify: "space-between",
|
|
1571
|
+
fullWidth: true,
|
|
1572
|
+
size: compact ? "sm" : "md",
|
|
1573
|
+
leftSection: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ProviderMark, { id: provider.id }),
|
|
1574
|
+
disabled: provider.disabled,
|
|
1575
|
+
loading: provider.loading,
|
|
1576
|
+
...buttonProps,
|
|
1577
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core24.Stack, { gap: 0, align: "flex-start", children: [
|
|
1578
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core24.Text, { inherit: true, children: label }),
|
|
1579
|
+
provider.description ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core24.Text, { size: "xs", c: "dimmed", lh: 1.2, children: provider.description }) : null
|
|
1580
|
+
] })
|
|
1581
|
+
}
|
|
1582
|
+
);
|
|
1583
|
+
}
|
|
1584
|
+
function SocialAuthButtons({
|
|
1585
|
+
providers,
|
|
1586
|
+
title = "Continue with a trusted provider",
|
|
1587
|
+
description,
|
|
1588
|
+
layout = "stack",
|
|
1589
|
+
compact = false
|
|
1590
|
+
}) {
|
|
1591
|
+
if (!providers.length) {
|
|
1592
|
+
return null;
|
|
1593
|
+
}
|
|
1594
|
+
const content = providers.map((provider) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SocialAuthButton, { provider, compact }, provider.id));
|
|
1595
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core24.Stack, { gap: "md", children: [
|
|
1596
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core24.Stack, { gap: 4, ta: "center", children: [
|
|
1597
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core24.Group, { justify: "center", gap: "xs", children: [
|
|
1598
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(GdsIcons.Login, { size: "1rem" }),
|
|
1599
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core24.Text, { fw: 600, children: title })
|
|
1600
|
+
] }),
|
|
1601
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core24.Text, { size: "sm", c: "dimmed", children: description }) : null
|
|
1602
|
+
] }),
|
|
1603
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core24.Divider, {}),
|
|
1604
|
+
layout === "grid" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core24.SimpleGrid, { cols: { base: 1, sm: 2 }, spacing: "sm", children: content }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core24.Stack, { gap: "sm", children: content })
|
|
1605
|
+
] });
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1141
1608
|
// src/ArticleShell.tsx
|
|
1142
|
-
var
|
|
1143
|
-
var
|
|
1609
|
+
var import_core25 = require("@mantine/core");
|
|
1610
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1144
1611
|
function ArticleShell({ eyebrow, title, lead, meta, sideRail, children }) {
|
|
1145
|
-
return /* @__PURE__ */ (0,
|
|
1146
|
-
/* @__PURE__ */ (0,
|
|
1147
|
-
/* @__PURE__ */ (0,
|
|
1148
|
-
eyebrow ? /* @__PURE__ */ (0,
|
|
1149
|
-
/* @__PURE__ */ (0,
|
|
1150
|
-
lead ? /* @__PURE__ */ (0,
|
|
1151
|
-
meta ? /* @__PURE__ */ (0,
|
|
1612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core25.Container, { size: "lg", py: "xl", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_core25.Group, { align: "flex-start", gap: "xl", wrap: "nowrap", children: [
|
|
1613
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_core25.Stack, { gap: "lg", maw: 760, flex: 1, children: [
|
|
1614
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_core25.Stack, { gap: "sm", children: [
|
|
1615
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core25.Text, { size: "sm", fw: 700, c: "dimmed", tt: "uppercase", children: eyebrow }) : null,
|
|
1616
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core25.Title, { order: 1, children: title }),
|
|
1617
|
+
lead ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core25.Text, { size: "lg", c: "dimmed", children: lead }) : null,
|
|
1618
|
+
meta ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core25.Group, { gap: "md", children: meta }) : null
|
|
1152
1619
|
] }),
|
|
1153
|
-
/* @__PURE__ */ (0,
|
|
1620
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core25.Stack, { gap: "md", children })
|
|
1154
1621
|
] }),
|
|
1155
|
-
sideRail ? /* @__PURE__ */ (0,
|
|
1622
|
+
sideRail ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core25.Stack, { visibleFrom: "lg", gap: "md", w: 240, children: sideRail }) : null
|
|
1156
1623
|
] }) });
|
|
1157
1624
|
}
|
|
1158
1625
|
|
|
1159
1626
|
// src/CtaButtonGroup.tsx
|
|
1160
|
-
var
|
|
1161
|
-
var
|
|
1627
|
+
var import_core26 = require("@mantine/core");
|
|
1628
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1162
1629
|
function CtaButtonGroup({ primary, secondary, tertiary }) {
|
|
1163
|
-
return /* @__PURE__ */ (0,
|
|
1164
|
-
/* @__PURE__ */ (0,
|
|
1165
|
-
/* @__PURE__ */ (0,
|
|
1166
|
-
secondary ? /* @__PURE__ */ (0,
|
|
1630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_core26.Stack, { gap: "sm", children: [
|
|
1631
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_core26.Group, { gap: "sm", align: "stretch", children: [
|
|
1632
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { children: primary }),
|
|
1633
|
+
secondary ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { children: secondary }) : null
|
|
1167
1634
|
] }),
|
|
1168
|
-
tertiary ? /* @__PURE__ */ (0,
|
|
1635
|
+
tertiary ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { children: tertiary }) : null
|
|
1169
1636
|
] });
|
|
1170
1637
|
}
|
|
1171
1638
|
|
|
1172
1639
|
// src/DocsPageShell.tsx
|
|
1173
|
-
var
|
|
1174
|
-
var
|
|
1640
|
+
var import_core27 = require("@mantine/core");
|
|
1641
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1175
1642
|
function DocsPageShell({
|
|
1176
1643
|
breadcrumbs = [],
|
|
1177
1644
|
title,
|
|
@@ -1182,27 +1649,27 @@ function DocsPageShell({
|
|
|
1182
1649
|
footerNext,
|
|
1183
1650
|
children
|
|
1184
1651
|
}) {
|
|
1185
|
-
return /* @__PURE__ */ (0,
|
|
1186
|
-
/* @__PURE__ */ (0,
|
|
1187
|
-
breadcrumbs.length ? /* @__PURE__ */ (0,
|
|
1188
|
-
(crumb) => crumb.href ? /* @__PURE__ */ (0,
|
|
1652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core27.Container, { size: "lg", py: "xl", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core27.Group, { align: "flex-start", gap: "xl", wrap: "nowrap", children: [
|
|
1653
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core27.Stack, { component: "article", gap: "lg", maw: 760, flex: 1, children: [
|
|
1654
|
+
breadcrumbs.length ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core27.Breadcrumbs, { children: breadcrumbs.map(
|
|
1655
|
+
(crumb) => crumb.href ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core27.Anchor, { href: crumb.href, children: crumb.label }, `${crumb.label}-${crumb.href}`) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core27.Text, { children: crumb.label }, crumb.label)
|
|
1189
1656
|
) }) : null,
|
|
1190
|
-
/* @__PURE__ */ (0,
|
|
1191
|
-
eyebrow ? /* @__PURE__ */ (0,
|
|
1192
|
-
/* @__PURE__ */ (0,
|
|
1193
|
-
lead ? /* @__PURE__ */ (0,
|
|
1194
|
-
meta ? /* @__PURE__ */ (0,
|
|
1657
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core27.Stack, { gap: "sm", children: [
|
|
1658
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core27.Text, { size: "sm", fw: 700, c: "dimmed", children: eyebrow }) : null,
|
|
1659
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core27.Title, { order: 1, children: title }),
|
|
1660
|
+
lead ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core27.Text, { size: "lg", c: "dimmed", children: lead }) : null,
|
|
1661
|
+
meta ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core27.Group, { gap: "md", children: meta }) : null
|
|
1195
1662
|
] }),
|
|
1196
|
-
/* @__PURE__ */ (0,
|
|
1197
|
-
footerNext ? /* @__PURE__ */ (0,
|
|
1663
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core27.Stack, { gap: "md", children }),
|
|
1664
|
+
footerNext ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core27.Anchor, { href: footerNext.href, fw: 600, children: footerNext.label }) : null
|
|
1198
1665
|
] }),
|
|
1199
|
-
sideRail ? /* @__PURE__ */ (0,
|
|
1666
|
+
sideRail ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core27.Stack, { visibleFrom: "lg", gap: "md", w: 240, children: sideRail }) : null
|
|
1200
1667
|
] }) });
|
|
1201
1668
|
}
|
|
1202
1669
|
|
|
1203
1670
|
// src/EditorialHero.tsx
|
|
1204
|
-
var
|
|
1205
|
-
var
|
|
1671
|
+
var import_core28 = require("@mantine/core");
|
|
1672
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1206
1673
|
function resolveActionVariant(action, index, seenPrimary) {
|
|
1207
1674
|
const requested = action.variant ?? (index === 0 ? "primary" : "secondary");
|
|
1208
1675
|
if (requested === "primary" && !seenPrimary) {
|
|
@@ -1214,8 +1681,8 @@ function resolveActionVariant(action, index, seenPrimary) {
|
|
|
1214
1681
|
return { variant: "default", seenPrimary };
|
|
1215
1682
|
}
|
|
1216
1683
|
function HeroAction({ action, variant }) {
|
|
1217
|
-
const content = /* @__PURE__ */ (0,
|
|
1218
|
-
|
|
1684
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1685
|
+
import_core28.Anchor,
|
|
1219
1686
|
{
|
|
1220
1687
|
href: action.href,
|
|
1221
1688
|
onClick: action.onClick,
|
|
@@ -1239,8 +1706,8 @@ function HeroAction({ action, variant }) {
|
|
|
1239
1706
|
}
|
|
1240
1707
|
);
|
|
1241
1708
|
if (!action.href) {
|
|
1242
|
-
return /* @__PURE__ */ (0,
|
|
1243
|
-
|
|
1709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1710
|
+
import_core28.Box,
|
|
1244
1711
|
{
|
|
1245
1712
|
component: "button",
|
|
1246
1713
|
type: "button",
|
|
@@ -1267,30 +1734,30 @@ function HeroAction({ action, variant }) {
|
|
|
1267
1734
|
return content;
|
|
1268
1735
|
}
|
|
1269
1736
|
function LoadingHero({ compact }) {
|
|
1270
|
-
return /* @__PURE__ */ (0,
|
|
1271
|
-
/* @__PURE__ */ (0,
|
|
1272
|
-
/* @__PURE__ */ (0,
|
|
1273
|
-
/* @__PURE__ */ (0,
|
|
1274
|
-
/* @__PURE__ */ (0,
|
|
1275
|
-
/* @__PURE__ */ (0,
|
|
1276
|
-
/* @__PURE__ */ (0,
|
|
1277
|
-
/* @__PURE__ */ (0,
|
|
1278
|
-
/* @__PURE__ */ (0,
|
|
1737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Paper, { withBorder: true, radius: "xl", p: compact ? "lg" : "xl", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core28.Grid, { gutter: compact ? "lg" : "xl", align: "center", children: [
|
|
1738
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Grid.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core28.Stack, { gap: "md", children: [
|
|
1739
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Skeleton, { height: 16, width: 96, radius: "xl" }),
|
|
1740
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Skeleton, { height: 48, width: "90%", radius: "md" }),
|
|
1741
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Skeleton, { height: 18, width: "100%", radius: "md" }),
|
|
1742
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Skeleton, { height: 18, width: "82%", radius: "md" }),
|
|
1743
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core28.Group, { children: [
|
|
1744
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Skeleton, { height: 40, width: 140, radius: "md" }),
|
|
1745
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Skeleton, { height: 40, width: 140, radius: "md" })
|
|
1279
1746
|
] })
|
|
1280
1747
|
] }) }),
|
|
1281
|
-
/* @__PURE__ */ (0,
|
|
1748
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Grid.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.AspectRatio, { ratio: 16 / 11, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Skeleton, { radius: "lg" }) }) })
|
|
1282
1749
|
] }) });
|
|
1283
1750
|
}
|
|
1284
1751
|
function MediaFallback() {
|
|
1285
|
-
return /* @__PURE__ */ (0,
|
|
1286
|
-
|
|
1752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.AspectRatio, { ratio: 16 / 11, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1753
|
+
import_core28.ThemeIcon,
|
|
1287
1754
|
{
|
|
1288
1755
|
size: "100%",
|
|
1289
1756
|
radius: "lg",
|
|
1290
1757
|
color: "gray",
|
|
1291
1758
|
variant: "light",
|
|
1292
1759
|
"aria-label": "Hero media is unavailable",
|
|
1293
|
-
children: /* @__PURE__ */ (0,
|
|
1760
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(GdsIcons.Gallery, { size: "2.5rem" })
|
|
1294
1761
|
}
|
|
1295
1762
|
) });
|
|
1296
1763
|
}
|
|
@@ -1310,8 +1777,8 @@ function MediaFrame({
|
|
|
1310
1777
|
} else if (mediaFade === "soft-start") {
|
|
1311
1778
|
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%)";
|
|
1312
1779
|
}
|
|
1313
|
-
return /* @__PURE__ */ (0,
|
|
1314
|
-
|
|
1780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1781
|
+
import_core28.Box,
|
|
1315
1782
|
{
|
|
1316
1783
|
component: "figure",
|
|
1317
1784
|
m: 0,
|
|
@@ -1324,9 +1791,9 @@ function MediaFrame({
|
|
|
1324
1791
|
},
|
|
1325
1792
|
"aria-label": mediaAlt,
|
|
1326
1793
|
children: [
|
|
1327
|
-
media ?? /* @__PURE__ */ (0,
|
|
1328
|
-
media && overlayBackground ? /* @__PURE__ */ (0,
|
|
1329
|
-
|
|
1794
|
+
media ?? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(MediaFallback, {}),
|
|
1795
|
+
media && overlayBackground ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1796
|
+
import_core28.Box,
|
|
1330
1797
|
{
|
|
1331
1798
|
"aria-hidden": true,
|
|
1332
1799
|
style: {
|
|
@@ -1359,7 +1826,7 @@ function EditorialHero({
|
|
|
1359
1826
|
classNames
|
|
1360
1827
|
}) {
|
|
1361
1828
|
if (loading) {
|
|
1362
|
-
return /* @__PURE__ */ (0,
|
|
1829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(LoadingHero, { compact });
|
|
1363
1830
|
}
|
|
1364
1831
|
const stackAlign = align === "center" ? "center" : "flex-start";
|
|
1365
1832
|
const textAlign = align === "center" ? "center" : "left";
|
|
@@ -1367,15 +1834,15 @@ function EditorialHero({
|
|
|
1367
1834
|
const renderedActions = actions.slice(0, 3).map((action, index) => {
|
|
1368
1835
|
const resolved = resolveActionVariant(action, index, seenPrimary);
|
|
1369
1836
|
seenPrimary = resolved.seenPrimary;
|
|
1370
|
-
return /* @__PURE__ */ (0,
|
|
1837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(HeroAction, { action, variant: resolved.variant }, `${action.label}-${index}`);
|
|
1371
1838
|
});
|
|
1372
|
-
const textSlot = /* @__PURE__ */ (0,
|
|
1373
|
-
/* @__PURE__ */ (0,
|
|
1374
|
-
eyebrow ? /* @__PURE__ */ (0,
|
|
1375
|
-
/* @__PURE__ */ (0,
|
|
1376
|
-
description ? /* @__PURE__ */ (0,
|
|
1839
|
+
const textSlot = /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core28.Stack, { gap: compact ? "md" : "lg", justify: "center", h: "100%", className: classNames?.content, children: [
|
|
1840
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core28.Stack, { gap: "sm", align: stackAlign, children: [
|
|
1841
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Text, { size: "sm", fw: 700, c: "dimmed", ta: textAlign, children: eyebrow }) : null,
|
|
1842
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Title, { order: 1, maw: 760, ta: textAlign, children: title }),
|
|
1843
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Text, { size: compact ? "md" : "lg", c: "dimmed", maw: 720, ta: textAlign, children: description }) : null
|
|
1377
1844
|
] }),
|
|
1378
|
-
renderedActions.length ? /* @__PURE__ */ (0,
|
|
1845
|
+
renderedActions.length ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Box, { className: classNames?.actions, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1379
1846
|
CtaButtonGroup,
|
|
1380
1847
|
{
|
|
1381
1848
|
primary: renderedActions[0],
|
|
@@ -1383,8 +1850,8 @@ function EditorialHero({
|
|
|
1383
1850
|
tertiary: renderedActions[2]
|
|
1384
1851
|
}
|
|
1385
1852
|
) }) : null,
|
|
1386
|
-
meta.length ? /* @__PURE__ */ (0,
|
|
1387
|
-
|
|
1853
|
+
meta.length ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Group, { gap: "sm", wrap: "wrap", "aria-label": "Supporting details", className: classNames?.meta, children: meta.map((item) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1854
|
+
import_core28.Group,
|
|
1388
1855
|
{
|
|
1389
1856
|
gap: 6,
|
|
1390
1857
|
px: "sm",
|
|
@@ -1395,17 +1862,17 @@ function EditorialHero({
|
|
|
1395
1862
|
},
|
|
1396
1863
|
children: [
|
|
1397
1864
|
item.icon,
|
|
1398
|
-
/* @__PURE__ */ (0,
|
|
1865
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Text, { size: "sm", c: "dimmed", children: item.label })
|
|
1399
1866
|
]
|
|
1400
1867
|
},
|
|
1401
1868
|
item.id
|
|
1402
1869
|
)) }) : null
|
|
1403
1870
|
] });
|
|
1404
|
-
const mediaSlot = error ? /* @__PURE__ */ (0,
|
|
1405
|
-
const textCol = /* @__PURE__ */ (0,
|
|
1406
|
-
const mediaCol = /* @__PURE__ */ (0,
|
|
1407
|
-
return /* @__PURE__ */ (0,
|
|
1408
|
-
|
|
1871
|
+
const mediaSlot = error ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AccentPanel, { tone: "red", variant: "soft-outline", title: "Media unavailable", children: error }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(MediaFrame, { media, mediaAlt, mediaFade, className: classNames?.media });
|
|
1872
|
+
const textCol = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Grid.Col, { span: { base: 12, md: 6 }, order: { base: 1, md: mediaPosition === "left" ? 2 : 1 }, children: textSlot });
|
|
1873
|
+
const mediaCol = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Grid.Col, { span: { base: 12, md: 6 }, order: { base: 2, md: mediaPosition === "left" ? 1 : 2 }, children: mediaSlot });
|
|
1874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1875
|
+
import_core28.Paper,
|
|
1409
1876
|
{
|
|
1410
1877
|
component: "section",
|
|
1411
1878
|
withBorder: true,
|
|
@@ -1413,7 +1880,7 @@ function EditorialHero({
|
|
|
1413
1880
|
p: compact ? "lg" : "xl",
|
|
1414
1881
|
className: classNames?.root,
|
|
1415
1882
|
style: surfaceVariant === "flat-public" ? { boxShadow: "none" } : void 0,
|
|
1416
|
-
children: /* @__PURE__ */ (0,
|
|
1883
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core28.Grid, { gutter: compact ? "lg" : "xl", align: "center", children: [
|
|
1417
1884
|
textCol,
|
|
1418
1885
|
mediaCol
|
|
1419
1886
|
] })
|
|
@@ -1422,19 +1889,19 @@ function EditorialHero({
|
|
|
1422
1889
|
}
|
|
1423
1890
|
|
|
1424
1891
|
// src/FeatureBand.tsx
|
|
1425
|
-
var
|
|
1426
|
-
var
|
|
1892
|
+
var import_core29 = require("@mantine/core");
|
|
1893
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1427
1894
|
function FeatureBandSkeleton({
|
|
1428
1895
|
columns = 3,
|
|
1429
1896
|
bordered = true,
|
|
1430
1897
|
variant = "default"
|
|
1431
1898
|
}) {
|
|
1432
|
-
return /* @__PURE__ */ (0,
|
|
1433
|
-
/* @__PURE__ */ (0,
|
|
1434
|
-
/* @__PURE__ */ (0,
|
|
1435
|
-
/* @__PURE__ */ (0,
|
|
1436
|
-
/* @__PURE__ */ (0,
|
|
1437
|
-
/* @__PURE__ */ (0,
|
|
1899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.SimpleGrid, { cols: { base: 1, sm: Math.min(columns, 2), lg: columns }, spacing: "lg", children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Paper, { withBorder: bordered, radius: "lg", p: variant === "compact" ? "md" : "lg", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_core29.Stack, { gap: "md", children: [
|
|
1900
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Skeleton, { height: variant === "process" ? 28 : 42, width: variant === "process" ? 72 : 42, radius: "xl" }),
|
|
1901
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_core29.Stack, { gap: "xs", children: [
|
|
1902
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Skeleton, { height: 20, width: "75%", radius: "md" }),
|
|
1903
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Skeleton, { height: 14, width: "100%", radius: "md" }),
|
|
1904
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Skeleton, { height: 14, width: "82%", radius: "md" })
|
|
1438
1905
|
] })
|
|
1439
1906
|
] }) }, index)) });
|
|
1440
1907
|
}
|
|
@@ -1447,10 +1914,10 @@ function FeatureBand({
|
|
|
1447
1914
|
variant = "default"
|
|
1448
1915
|
}) {
|
|
1449
1916
|
if (loading) {
|
|
1450
|
-
return /* @__PURE__ */ (0,
|
|
1917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(FeatureBandSkeleton, { columns, bordered, variant });
|
|
1451
1918
|
}
|
|
1452
1919
|
if (!items.length) {
|
|
1453
|
-
return emptyState ? /* @__PURE__ */ (0,
|
|
1920
|
+
return emptyState ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_jsx_runtime30.Fragment, { children: emptyState }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1454
1921
|
EmptyState,
|
|
1455
1922
|
{
|
|
1456
1923
|
title: "No supporting details available",
|
|
@@ -1458,9 +1925,9 @@ function FeatureBand({
|
|
|
1458
1925
|
}
|
|
1459
1926
|
);
|
|
1460
1927
|
}
|
|
1461
|
-
return /* @__PURE__ */ (0,
|
|
1462
|
-
variant === "process" ? /* @__PURE__ */ (0,
|
|
1463
|
-
|
|
1928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Box, { component: "section", "aria-label": "Supporting features", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.SimpleGrid, { cols: { base: 1, sm: Math.min(columns, 2), lg: columns }, spacing: "lg", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Paper, { withBorder: bordered, radius: "lg", p: variant === "compact" ? "md" : "lg", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_core29.Stack, { gap: "md", children: [
|
|
1929
|
+
variant === "process" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Group, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1930
|
+
import_core29.Text,
|
|
1464
1931
|
{
|
|
1465
1932
|
fw: 800,
|
|
1466
1933
|
size: "sm",
|
|
@@ -1472,32 +1939,335 @@ function FeatureBand({
|
|
|
1472
1939
|
},
|
|
1473
1940
|
children: item.stepLabel ?? `Step ${index + 1}`
|
|
1474
1941
|
}
|
|
1475
|
-
) }) : item.media ? item.media : item.icon ? /* @__PURE__ */ (0,
|
|
1476
|
-
/* @__PURE__ */ (0,
|
|
1477
|
-
/* @__PURE__ */ (0,
|
|
1478
|
-
item.description ? /* @__PURE__ */ (0,
|
|
1479
|
-
item.meta ? /* @__PURE__ */ (0,
|
|
1942
|
+
) }) : item.media ? item.media : item.icon ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Group, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.ThemeIcon, { size: "xl", radius: "xl", variant: "light", color: "violet", children: item.icon }) }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Group, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.ThemeIcon, { size: "xl", radius: "xl", variant: "light", color: "gray", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(GdsIcons.Info, { size: "1.25rem" }) }) }),
|
|
1943
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_core29.Stack, { gap: "xs", children: [
|
|
1944
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Title, { order: 4, children: item.title }),
|
|
1945
|
+
item.description ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Text, { c: "dimmed", children: item.description }) : null,
|
|
1946
|
+
item.meta ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Text, { size: "sm", c: "dimmed", children: item.meta }) : null
|
|
1480
1947
|
] })
|
|
1481
1948
|
] }) }, item.id)) }) });
|
|
1482
1949
|
}
|
|
1483
1950
|
|
|
1951
|
+
// src/MapPanel.tsx
|
|
1952
|
+
var import_core31 = require("@mantine/core");
|
|
1953
|
+
|
|
1954
|
+
// src/ActionBar.tsx
|
|
1955
|
+
var import_core30 = require("@mantine/core");
|
|
1956
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1957
|
+
function renderSemanticAction(action, slot, vocabularyPacks) {
|
|
1958
|
+
const { action: actionId, variant, ariaLabel, ...props } = action;
|
|
1959
|
+
const fallbackVariant = slot === "primary" ? "filled" : slot === "secondary" ? "default" : "subtle";
|
|
1960
|
+
const config = resolveSemanticActionConfig(actionId, vocabularyPacks);
|
|
1961
|
+
const Icon = config.icon;
|
|
1962
|
+
const label = getSemanticActionLabel(actionId, void 0, vocabularyPacks);
|
|
1963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1964
|
+
import_core30.Button,
|
|
1965
|
+
{
|
|
1966
|
+
leftSection: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon, { size: "1rem", stroke: 1.75 }),
|
|
1967
|
+
"aria-label": ariaLabel ?? label,
|
|
1968
|
+
variant: variant ?? fallbackVariant,
|
|
1969
|
+
...props,
|
|
1970
|
+
children: label
|
|
1971
|
+
},
|
|
1972
|
+
`${slot}-${actionId}`
|
|
1973
|
+
);
|
|
1974
|
+
}
|
|
1975
|
+
function ActionBar({
|
|
1976
|
+
primary,
|
|
1977
|
+
secondary = [],
|
|
1978
|
+
tertiary = [],
|
|
1979
|
+
iconOnly = [],
|
|
1980
|
+
gap = "sm",
|
|
1981
|
+
vocabularyPacks = []
|
|
1982
|
+
}) {
|
|
1983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core30.Stack, { gap, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_core30.Group, { justify: "space-between", align: "center", gap, wrap: "wrap", children: [
|
|
1984
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_core30.Group, { gap, wrap: "wrap", children: [
|
|
1985
|
+
secondary.map((action) => renderSemanticAction(action, "secondary", vocabularyPacks)),
|
|
1986
|
+
tertiary.map((action) => renderSemanticAction(action, "tertiary", vocabularyPacks))
|
|
1987
|
+
] }),
|
|
1988
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_core30.Group, { gap, wrap: "wrap", justify: "flex-end", style: { marginInlineStart: "auto" }, children: [
|
|
1989
|
+
iconOnly.map(({ action, ariaLabel, ...props }) => {
|
|
1990
|
+
const config = resolveSemanticActionConfig(action, vocabularyPacks);
|
|
1991
|
+
const Icon = config.icon;
|
|
1992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1993
|
+
import_core30.ActionIcon,
|
|
1994
|
+
{
|
|
1995
|
+
variant: "subtle",
|
|
1996
|
+
size: "lg",
|
|
1997
|
+
"aria-label": ariaLabel ?? getSemanticActionLabel(action, void 0, vocabularyPacks),
|
|
1998
|
+
...props,
|
|
1999
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon, { size: "1rem", stroke: 1.75 })
|
|
2000
|
+
},
|
|
2001
|
+
`icon-${action}`
|
|
2002
|
+
);
|
|
2003
|
+
}),
|
|
2004
|
+
primary ? renderSemanticAction(primary, "primary", vocabularyPacks) : null
|
|
2005
|
+
] })
|
|
2006
|
+
] }) });
|
|
2007
|
+
}
|
|
2008
|
+
|
|
2009
|
+
// src/MapPanel.tsx
|
|
2010
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2011
|
+
function MapPanel({
|
|
2012
|
+
title,
|
|
2013
|
+
description,
|
|
2014
|
+
actions,
|
|
2015
|
+
loading = false,
|
|
2016
|
+
empty,
|
|
2017
|
+
error,
|
|
2018
|
+
embedTitle,
|
|
2019
|
+
iframeSrc,
|
|
2020
|
+
iframeSandbox = "allow-scripts allow-same-origin allow-popups",
|
|
2021
|
+
renderMap,
|
|
2022
|
+
minHeight = 320
|
|
2023
|
+
}) {
|
|
2024
|
+
let body;
|
|
2025
|
+
if (loading) {
|
|
2026
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2027
|
+
StateBlock,
|
|
2028
|
+
{
|
|
2029
|
+
variant: "loading",
|
|
2030
|
+
title: "Loading map",
|
|
2031
|
+
description: "The shared map panel is still preparing the embedded surface.",
|
|
2032
|
+
compact: true
|
|
2033
|
+
}
|
|
2034
|
+
);
|
|
2035
|
+
} else if (error) {
|
|
2036
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(StateBlock, { variant: "error", title: "Map unavailable", description: error, compact: true });
|
|
2037
|
+
} else if (!iframeSrc && !renderMap) {
|
|
2038
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2039
|
+
StateBlock,
|
|
2040
|
+
{
|
|
2041
|
+
variant: "empty",
|
|
2042
|
+
title: "No map available",
|
|
2043
|
+
description: empty ?? "Add coordinates or a sanctioned embed source to render this panel.",
|
|
2044
|
+
compact: true
|
|
2045
|
+
}
|
|
2046
|
+
);
|
|
2047
|
+
} else if (renderMap) {
|
|
2048
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core31.Box, { style: { minHeight }, children: renderMap() });
|
|
2049
|
+
} else {
|
|
2050
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core31.AspectRatio, { ratio: 16 / 9, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2051
|
+
"iframe",
|
|
2052
|
+
{
|
|
2053
|
+
src: iframeSrc,
|
|
2054
|
+
title: embedTitle ?? "Embedded map",
|
|
2055
|
+
sandbox: iframeSandbox,
|
|
2056
|
+
loading: "lazy",
|
|
2057
|
+
referrerPolicy: "no-referrer-when-downgrade",
|
|
2058
|
+
style: { width: "100%", height: "100%", border: 0, borderRadius: 12 }
|
|
2059
|
+
}
|
|
2060
|
+
) });
|
|
2061
|
+
}
|
|
2062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core31.Paper, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_core31.Stack, { gap: "md", children: [
|
|
2063
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_core31.Group, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
2064
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_core31.Stack, { gap: 4, children: [
|
|
2065
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core31.Title, { order: 3, children: title }),
|
|
2066
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core31.Text, { size: "sm", c: "dimmed", children: description }) : null
|
|
2067
|
+
] }),
|
|
2068
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ActionBar, { ...actions }) : null
|
|
2069
|
+
] }),
|
|
2070
|
+
body
|
|
2071
|
+
] }) });
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2074
|
+
// src/PublicFlowShell.tsx
|
|
2075
|
+
var import_core32 = require("@mantine/core");
|
|
2076
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2077
|
+
var stageTone = {
|
|
2078
|
+
idle: { label: "Idle", color: "gray" },
|
|
2079
|
+
loading: { label: "Loading", color: "blue" },
|
|
2080
|
+
ready: { label: "Ready", color: "teal" },
|
|
2081
|
+
error: { label: "Error", color: "red" },
|
|
2082
|
+
complete: { label: "Complete", color: "teal" }
|
|
2083
|
+
};
|
|
2084
|
+
function toActionBar(actions = []) {
|
|
2085
|
+
if (!actions.length) {
|
|
2086
|
+
return void 0;
|
|
2087
|
+
}
|
|
2088
|
+
const ordered = [...actions].sort((left, right) => {
|
|
2089
|
+
const rank = { primary: 0, secondary: 1, tertiary: 2 };
|
|
2090
|
+
return rank[left.priority] - rank[right.priority];
|
|
2091
|
+
});
|
|
2092
|
+
const primary = ordered.find((action) => action.priority === "primary");
|
|
2093
|
+
const secondary = ordered.filter((action) => action.priority === "secondary");
|
|
2094
|
+
const tertiary = ordered.filter((action) => action.priority === "tertiary");
|
|
2095
|
+
return {
|
|
2096
|
+
primary: primary ? {
|
|
2097
|
+
action: primary.action,
|
|
2098
|
+
disabled: primary.disabled,
|
|
2099
|
+
loading: primary.loading,
|
|
2100
|
+
onClick: primary.onClick
|
|
2101
|
+
} : void 0,
|
|
2102
|
+
secondary: secondary.map((action) => ({
|
|
2103
|
+
action: action.action,
|
|
2104
|
+
disabled: action.disabled,
|
|
2105
|
+
loading: action.loading,
|
|
2106
|
+
onClick: action.onClick
|
|
2107
|
+
})),
|
|
2108
|
+
tertiary: tertiary.map((action) => ({
|
|
2109
|
+
action: action.action,
|
|
2110
|
+
disabled: action.disabled,
|
|
2111
|
+
loading: action.loading,
|
|
2112
|
+
onClick: action.onClick
|
|
2113
|
+
}))
|
|
2114
|
+
};
|
|
2115
|
+
}
|
|
2116
|
+
function PublicFlowShell({
|
|
2117
|
+
stage,
|
|
2118
|
+
eyebrow,
|
|
2119
|
+
exitAction,
|
|
2120
|
+
hardwareSurface,
|
|
2121
|
+
emptyState,
|
|
2122
|
+
errorState
|
|
2123
|
+
}) {
|
|
2124
|
+
const tone = stageTone[stage.status];
|
|
2125
|
+
const actionBar = toActionBar(stage.actions);
|
|
2126
|
+
let body = stage.body;
|
|
2127
|
+
if (stage.status === "loading") {
|
|
2128
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2129
|
+
StateBlock,
|
|
2130
|
+
{
|
|
2131
|
+
variant: "loading",
|
|
2132
|
+
title: "Preparing flow",
|
|
2133
|
+
description: stage.description ?? "The current public flow stage is still loading."
|
|
2134
|
+
}
|
|
2135
|
+
);
|
|
2136
|
+
} else if (stage.status === "error") {
|
|
2137
|
+
body = errorState ?? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2138
|
+
StateBlock,
|
|
2139
|
+
{
|
|
2140
|
+
variant: "error",
|
|
2141
|
+
title: "Flow unavailable",
|
|
2142
|
+
description: stage.description ?? "This public flow could not continue safely."
|
|
2143
|
+
}
|
|
2144
|
+
);
|
|
2145
|
+
} else if (!stage.body && !hardwareSurface) {
|
|
2146
|
+
body = emptyState ?? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2147
|
+
EmptyState,
|
|
2148
|
+
{
|
|
2149
|
+
title: "No stage content available",
|
|
2150
|
+
description: "Add the current flow stage body or a bounded hardware surface to render this contract."
|
|
2151
|
+
}
|
|
2152
|
+
);
|
|
2153
|
+
}
|
|
2154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_core32.Paper, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_core32.Stack, { gap: "lg", children: [
|
|
2155
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_core32.Group, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
2156
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_core32.Stack, { gap: 4, children: [
|
|
2157
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_core32.Text, { size: "xs", fw: 700, c: "dimmed", tt: "uppercase", children: eyebrow }) : null,
|
|
2158
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_core32.Group, { gap: "sm", wrap: "wrap", children: [
|
|
2159
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_core32.Title, { order: 2, children: stage.title }),
|
|
2160
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_core32.Badge, { variant: "light", color: tone.color, children: tone.label })
|
|
2161
|
+
] }),
|
|
2162
|
+
stage.description ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_core32.Text, { size: "sm", c: "dimmed", children: stage.description }) : null
|
|
2163
|
+
] }),
|
|
2164
|
+
exitAction
|
|
2165
|
+
] }),
|
|
2166
|
+
stage.notice ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_core32.Text, { size: "sm", c: "dimmed", children: stage.notice }) : null,
|
|
2167
|
+
body,
|
|
2168
|
+
hardwareSurface,
|
|
2169
|
+
stage.aside,
|
|
2170
|
+
actionBar ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ActionBar, { ...actionBar }) : null
|
|
2171
|
+
] }) });
|
|
2172
|
+
}
|
|
2173
|
+
|
|
2174
|
+
// src/PlaybackSurface.tsx
|
|
2175
|
+
var import_core33 = require("@mantine/core");
|
|
2176
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2177
|
+
var stateTone = {
|
|
2178
|
+
loading: { label: "Loading", color: "blue" },
|
|
2179
|
+
ready: { label: "Ready", color: "teal" },
|
|
2180
|
+
playing: { label: "Playing", color: "teal" },
|
|
2181
|
+
empty: { label: "Empty", color: "gray" },
|
|
2182
|
+
error: { label: "Error", color: "red" },
|
|
2183
|
+
degraded: { label: "Degraded", color: "orange" }
|
|
2184
|
+
};
|
|
2185
|
+
function PlaybackSurface({
|
|
2186
|
+
title,
|
|
2187
|
+
state,
|
|
2188
|
+
media,
|
|
2189
|
+
statusMessage,
|
|
2190
|
+
controls,
|
|
2191
|
+
emptyState,
|
|
2192
|
+
errorState,
|
|
2193
|
+
overlays,
|
|
2194
|
+
mode = "embedded"
|
|
2195
|
+
}) {
|
|
2196
|
+
const tone = stateTone[state];
|
|
2197
|
+
let content;
|
|
2198
|
+
if (state === "loading") {
|
|
2199
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2200
|
+
StateBlock,
|
|
2201
|
+
{
|
|
2202
|
+
variant: "loading",
|
|
2203
|
+
title: "Loading playback",
|
|
2204
|
+
description: "The playback surface is still preparing timed or fullscreen media."
|
|
2205
|
+
}
|
|
2206
|
+
);
|
|
2207
|
+
} else if (state === "empty") {
|
|
2208
|
+
content = emptyState ?? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2209
|
+
EmptyState,
|
|
2210
|
+
{
|
|
2211
|
+
title: "No playback content available",
|
|
2212
|
+
description: "Add media assets or a playlist to render this playback surface."
|
|
2213
|
+
}
|
|
2214
|
+
);
|
|
2215
|
+
} else if (state === "error") {
|
|
2216
|
+
content = errorState ?? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2217
|
+
StateBlock,
|
|
2218
|
+
{
|
|
2219
|
+
variant: "error",
|
|
2220
|
+
title: "Playback unavailable",
|
|
2221
|
+
description: "The playback surface could not render the current media safely."
|
|
2222
|
+
}
|
|
2223
|
+
);
|
|
2224
|
+
} else {
|
|
2225
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_core33.Stack, { gap: "md", children: [
|
|
2226
|
+
media,
|
|
2227
|
+
overlays
|
|
2228
|
+
] });
|
|
2229
|
+
}
|
|
2230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_core33.Paper, { withBorder: true, radius: "xl", p: "lg", "data-playback-mode": mode, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_core33.Stack, { gap: "md", children: [
|
|
2231
|
+
title || statusMessage || controls ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_core33.Group, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
2232
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_core33.Stack, { gap: 4, children: [
|
|
2233
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_core33.Title, { order: 3, children: title }) : null,
|
|
2234
|
+
statusMessage ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_core33.Text, { size: "sm", c: "dimmed", children: statusMessage }) : null
|
|
2235
|
+
] }),
|
|
2236
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_core33.Group, { gap: "sm", align: "center", wrap: "wrap", children: [
|
|
2237
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_core33.Badge, { variant: "light", color: tone.color, children: tone.label }),
|
|
2238
|
+
controls
|
|
2239
|
+
] })
|
|
2240
|
+
] }) : null,
|
|
2241
|
+
state === "degraded" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2242
|
+
StateBlock,
|
|
2243
|
+
{
|
|
2244
|
+
variant: "info",
|
|
2245
|
+
title: "Playback degraded",
|
|
2246
|
+
description: statusMessage ?? "Playback is continuing with reduced fidelity or recoverable media failures.",
|
|
2247
|
+
compact: true
|
|
2248
|
+
}
|
|
2249
|
+
) : null,
|
|
2250
|
+
content
|
|
2251
|
+
] }) });
|
|
2252
|
+
}
|
|
2253
|
+
|
|
1484
2254
|
// src/MediaField.tsx
|
|
1485
|
-
var
|
|
2255
|
+
var import_core35 = require("@mantine/core");
|
|
1486
2256
|
|
|
1487
2257
|
// src/FormField.tsx
|
|
1488
|
-
var
|
|
1489
|
-
var
|
|
2258
|
+
var import_core34 = require("@mantine/core");
|
|
2259
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1490
2260
|
function FormField({ label, description, error, children }) {
|
|
1491
|
-
return /* @__PURE__ */ (0,
|
|
1492
|
-
typeof label === "string" ? /* @__PURE__ */ (0,
|
|
1493
|
-
description ? typeof description === "string" ? /* @__PURE__ */ (0,
|
|
2261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core34.Box, { component: "label", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_core34.Stack, { gap: 4, children: [
|
|
2262
|
+
typeof label === "string" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core34.Text, { size: "xs", fw: 600, c: "dimmed", children: label }) : label,
|
|
2263
|
+
description ? typeof description === "string" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core34.Text, { size: "xs", c: "dimmed", children: description }) : description : null,
|
|
1494
2264
|
children,
|
|
1495
|
-
error ? typeof error === "string" ? /* @__PURE__ */ (0,
|
|
2265
|
+
error ? typeof error === "string" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core34.Text, { size: "xs", c: "red.7", children: error }) : error : null
|
|
1496
2266
|
] }) });
|
|
1497
2267
|
}
|
|
1498
2268
|
|
|
1499
2269
|
// src/MediaField.tsx
|
|
1500
|
-
var
|
|
2270
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1501
2271
|
var stateLabels = {
|
|
1502
2272
|
empty: { label: "Empty", color: "gray" },
|
|
1503
2273
|
selected: { label: "Selected", color: "blue" },
|
|
@@ -1525,32 +2295,32 @@ function MediaField({
|
|
|
1525
2295
|
mode = "stacked"
|
|
1526
2296
|
}) {
|
|
1527
2297
|
const stateBadge = stateLabels[state];
|
|
1528
|
-
const resolvedRemoveAction = removeAction ?? (onRemove ? /* @__PURE__ */ (0,
|
|
1529
|
-
const resolvedResetAction = resetAction ?? (onReset ? /* @__PURE__ */ (0,
|
|
1530
|
-
return /* @__PURE__ */ (0,
|
|
2298
|
+
const resolvedRemoveAction = removeAction ?? (onRemove ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core35.Button, { type: "button", variant: "light", color: "red", onClick: onRemove, children: "Remove" }) : null);
|
|
2299
|
+
const resolvedResetAction = resetAction ?? (onReset ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core35.Button, { type: "button", variant: "default", onClick: onReset, children: "Reset" }) : null);
|
|
2300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1531
2301
|
FormField,
|
|
1532
2302
|
{
|
|
1533
2303
|
label,
|
|
1534
2304
|
description,
|
|
1535
2305
|
error,
|
|
1536
|
-
children: /* @__PURE__ */ (0,
|
|
1537
|
-
/* @__PURE__ */ (0,
|
|
1538
|
-
/* @__PURE__ */ (0,
|
|
2306
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core35.Paper, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_core35.Stack, { gap: "md", children: [
|
|
2307
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core35.Group, { justify: "flex-end", align: "center", gap: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_core35.Group, { gap: "xs", justify: "flex-end", children: [
|
|
2308
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core35.Badge, { variant: "light", color: stateBadge.color, children: stateBadge.label }),
|
|
1539
2309
|
statusAction
|
|
1540
2310
|
] }) }),
|
|
1541
2311
|
preview ? preview : null,
|
|
1542
|
-
uploadControl || urlInput ? /* @__PURE__ */ (0,
|
|
1543
|
-
/* @__PURE__ */ (0,
|
|
1544
|
-
/* @__PURE__ */ (0,
|
|
2312
|
+
uploadControl || urlInput ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
2313
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core35.Divider, {}),
|
|
2314
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_core35.Stack, { gap: "sm", style: mode === "split" ? { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(220px, 1fr))" } : void 0, children: [
|
|
1545
2315
|
uploadControl,
|
|
1546
2316
|
urlInput
|
|
1547
2317
|
] })
|
|
1548
2318
|
] }) : null,
|
|
1549
|
-
value ? /* @__PURE__ */ (0,
|
|
1550
|
-
helpText ? /* @__PURE__ */ (0,
|
|
1551
|
-
policyText ? /* @__PURE__ */ (0,
|
|
2319
|
+
value ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core35.Text, { size: "sm", c: "dimmed", style: { wordBreak: "break-all" }, children: value }) : null,
|
|
2320
|
+
helpText ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core35.Text, { size: "sm", c: "dimmed", children: helpText }) : null,
|
|
2321
|
+
policyText ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core35.Text, { size: "sm", c: error ? "red.7" : "dimmed", children: policyText }) : null,
|
|
1552
2322
|
typeof error !== "string" && error ? error : null,
|
|
1553
|
-
resolvedRemoveAction || resolvedResetAction ? /* @__PURE__ */ (0,
|
|
2323
|
+
resolvedRemoveAction || resolvedResetAction ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_core35.Group, { gap: "sm", children: [
|
|
1554
2324
|
resolvedResetAction,
|
|
1555
2325
|
retryAction,
|
|
1556
2326
|
resolvedRemoveAction
|
|
@@ -1561,70 +2331,72 @@ function MediaField({
|
|
|
1561
2331
|
}
|
|
1562
2332
|
|
|
1563
2333
|
// src/MediaCard.tsx
|
|
1564
|
-
var
|
|
1565
|
-
var
|
|
2334
|
+
var import_core36 = require("@mantine/core");
|
|
2335
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1566
2336
|
function MediaCard({ title, image, description, status, overlay, actions = [] }) {
|
|
1567
2337
|
const EyeIcon = GdsIcons.Eye;
|
|
1568
|
-
return /* @__PURE__ */ (0,
|
|
1569
|
-
/* @__PURE__ */ (0,
|
|
2338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_core36.Card, { withBorder: true, radius: "lg", padding: "md", children: [
|
|
2339
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_core36.Card.Section, { pos: "relative", children: [
|
|
1570
2340
|
image,
|
|
1571
|
-
overlay ? /* @__PURE__ */ (0,
|
|
2341
|
+
overlay ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { style: { position: "absolute", inset: 12, display: "flex", justifyContent: "flex-end", alignItems: "flex-start" }, children: overlay }) : null
|
|
1572
2342
|
] }),
|
|
1573
|
-
/* @__PURE__ */ (0,
|
|
1574
|
-
/* @__PURE__ */ (0,
|
|
1575
|
-
/* @__PURE__ */ (0,
|
|
1576
|
-
/* @__PURE__ */ (0,
|
|
1577
|
-
description ? /* @__PURE__ */ (0,
|
|
2343
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_core36.Stack, { gap: "sm", mt: "md", children: [
|
|
2344
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_core36.Group, { justify: "space-between", align: "flex-start", children: [
|
|
2345
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_core36.Stack, { gap: 4, children: [
|
|
2346
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_core36.Title, { order: 4, children: title }),
|
|
2347
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_core36.Text, { size: "sm", c: "dimmed", lineClamp: 2, children: description }) : null
|
|
1578
2348
|
] }),
|
|
1579
|
-
status ? /* @__PURE__ */ (0,
|
|
2349
|
+
status ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_core36.Badge, { variant: "light", children: status }) : null
|
|
1580
2350
|
] }),
|
|
1581
|
-
actions.length ? /* @__PURE__ */ (0,
|
|
2351
|
+
actions.length ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_core36.Group, { justify: "flex-end", gap: "xs", children: actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_core36.ActionIcon, { variant: "light", "aria-label": action.label, onClick: action.onClick, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(EyeIcon, { size: "1rem" }) }, action.label)) }) : null
|
|
1582
2352
|
] })
|
|
1583
2353
|
] });
|
|
1584
2354
|
}
|
|
1585
2355
|
|
|
1586
2356
|
// src/AccessSummary.tsx
|
|
1587
|
-
var
|
|
1588
|
-
var
|
|
2357
|
+
var import_core37 = require("@mantine/core");
|
|
2358
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1589
2359
|
function AccessSummary({ title, roles, scope, blocked = false, description }) {
|
|
1590
|
-
return /* @__PURE__ */ (0,
|
|
1591
|
-
/* @__PURE__ */ (0,
|
|
1592
|
-
/* @__PURE__ */ (0,
|
|
1593
|
-
/* @__PURE__ */ (0,
|
|
2360
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core37.Card, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_core37.Stack, { gap: "sm", children: [
|
|
2361
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_core37.Group, { justify: "space-between", align: "center", children: [
|
|
2362
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core37.Title, { order: 4, children: title }),
|
|
2363
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core37.Badge, { color: blocked ? "red" : "teal", variant: "light", children: blocked ? "Blocked" : "Allowed" })
|
|
1594
2364
|
] }),
|
|
1595
|
-
/* @__PURE__ */ (0,
|
|
1596
|
-
scope ? /* @__PURE__ */ (0,
|
|
2365
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core37.Group, { gap: "xs", children: roles.map((role) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core37.Badge, { variant: "outline", children: role }, role)) }),
|
|
2366
|
+
scope ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_core37.Text, { size: "sm", c: "dimmed", children: [
|
|
1597
2367
|
"Scope: ",
|
|
1598
2368
|
scope
|
|
1599
2369
|
] }) : null,
|
|
1600
|
-
description ? /* @__PURE__ */ (0,
|
|
2370
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core37.Text, { size: "sm", children: description }) : null
|
|
1601
2371
|
] }) });
|
|
1602
2372
|
}
|
|
1603
2373
|
|
|
1604
2374
|
// src/PageHeader.tsx
|
|
1605
|
-
var
|
|
1606
|
-
var
|
|
2375
|
+
var import_core38 = require("@mantine/core");
|
|
2376
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1607
2377
|
function PageHeader({
|
|
1608
2378
|
title,
|
|
1609
2379
|
description,
|
|
2380
|
+
subtitle,
|
|
1610
2381
|
eyebrow,
|
|
1611
2382
|
actions,
|
|
1612
2383
|
eyebrowVariant = "neutral"
|
|
1613
2384
|
}) {
|
|
2385
|
+
const resolvedDescription = description ?? subtitle;
|
|
1614
2386
|
const eyebrowProps = eyebrowVariant === "ornamental" ? { tt: "uppercase", style: { letterSpacing: "0.12em" } } : {};
|
|
1615
|
-
return /* @__PURE__ */ (0,
|
|
1616
|
-
/* @__PURE__ */ (0,
|
|
1617
|
-
eyebrow && /* @__PURE__ */ (0,
|
|
1618
|
-
/* @__PURE__ */ (0,
|
|
1619
|
-
|
|
2387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_core38.Group, { justify: "space-between", align: "flex-start", gap: "lg", wrap: "wrap", children: [
|
|
2388
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_core38.Stack, { gap: "xs", children: [
|
|
2389
|
+
eyebrow && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_core38.Text, { size: "xs", fw: 700, c: "dimmed", ...eyebrowProps, children: eyebrow }),
|
|
2390
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_core38.Title, { order: 1, children: title }),
|
|
2391
|
+
resolvedDescription && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_core38.Text, { c: "dimmed", maw: 720, children: resolvedDescription })
|
|
1620
2392
|
] }),
|
|
1621
|
-
actions ? /* @__PURE__ */ (0,
|
|
2393
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_core38.Box, { children: actions }) : null
|
|
1622
2394
|
] });
|
|
1623
2395
|
}
|
|
1624
2396
|
|
|
1625
2397
|
// src/FilterDrawer.tsx
|
|
1626
|
-
var
|
|
1627
|
-
var
|
|
2398
|
+
var import_core39 = require("@mantine/core");
|
|
2399
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1628
2400
|
function FilterDrawer({
|
|
1629
2401
|
opened,
|
|
1630
2402
|
onClose,
|
|
@@ -1640,8 +2412,8 @@ function FilterDrawer({
|
|
|
1640
2412
|
}) {
|
|
1641
2413
|
const resolvedPrimaryAction = applyAction ?? primaryAction;
|
|
1642
2414
|
const resolvedSecondaryAction = resetAction ?? secondaryAction;
|
|
1643
|
-
return /* @__PURE__ */ (0,
|
|
1644
|
-
|
|
2415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2416
|
+
import_core39.Drawer,
|
|
1645
2417
|
{
|
|
1646
2418
|
opened,
|
|
1647
2419
|
onClose,
|
|
@@ -1649,11 +2421,11 @@ function FilterDrawer({
|
|
|
1649
2421
|
position: mode === "bottom-sheet" ? "bottom" : "right",
|
|
1650
2422
|
size: mode === "bottom-sheet" ? "auto" : "md",
|
|
1651
2423
|
radius: mode === "bottom-sheet" ? "xl" : void 0,
|
|
1652
|
-
children: /* @__PURE__ */ (0,
|
|
1653
|
-
description ? /* @__PURE__ */ (0,
|
|
2424
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_core39.Stack, { gap: "md", children: [
|
|
2425
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_core39.Text, { size: "sm", c: "dimmed", children: description }) : null,
|
|
1654
2426
|
children,
|
|
1655
|
-
resolvedPrimaryAction || resolvedSecondaryAction || closeAction ? /* @__PURE__ */ (0,
|
|
1656
|
-
/* @__PURE__ */ (0,
|
|
2427
|
+
resolvedPrimaryAction || resolvedSecondaryAction || closeAction ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_core39.Group, { justify: "space-between", mt: "md", children: [
|
|
2428
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_core39.Group, { gap: "sm", children: [
|
|
1657
2429
|
closeAction,
|
|
1658
2430
|
resolvedSecondaryAction
|
|
1659
2431
|
] }),
|
|
@@ -1665,8 +2437,8 @@ function FilterDrawer({
|
|
|
1665
2437
|
}
|
|
1666
2438
|
|
|
1667
2439
|
// src/PlaceholderPanel.tsx
|
|
1668
|
-
var
|
|
1669
|
-
var
|
|
2440
|
+
var import_core40 = require("@mantine/core");
|
|
2441
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1670
2442
|
function PlaceholderPanel({
|
|
1671
2443
|
title,
|
|
1672
2444
|
description,
|
|
@@ -1676,16 +2448,16 @@ function PlaceholderPanel({
|
|
|
1676
2448
|
mode
|
|
1677
2449
|
}) {
|
|
1678
2450
|
if (mode === "live" && children) {
|
|
1679
|
-
return /* @__PURE__ */ (0,
|
|
2451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children });
|
|
1680
2452
|
}
|
|
1681
|
-
return /* @__PURE__ */ (0,
|
|
1682
|
-
badge ? /* @__PURE__ */ (0,
|
|
1683
|
-
/* @__PURE__ */ (0,
|
|
1684
|
-
/* @__PURE__ */ (0,
|
|
1685
|
-
/* @__PURE__ */ (0,
|
|
2453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core40.Card, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_core40.Stack, { gap: "md", children: [
|
|
2454
|
+
badge ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core40.Badge, { variant: "light", color: "blue", w: "fit-content", children: badge }) : null,
|
|
2455
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_core40.Stack, { gap: "xs", children: [
|
|
2456
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core40.Title, { order: 4, children: title }),
|
|
2457
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core40.Text, { c: "dimmed", children: description })
|
|
1686
2458
|
] }),
|
|
1687
|
-
footer ? /* @__PURE__ */ (0,
|
|
1688
|
-
/* @__PURE__ */ (0,
|
|
2459
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core40.Text, { size: "sm", children: footer }) : null,
|
|
2460
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1689
2461
|
StateBlock,
|
|
1690
2462
|
{
|
|
1691
2463
|
variant: "not-enough-data",
|
|
@@ -1698,8 +2470,8 @@ function PlaceholderPanel({
|
|
|
1698
2470
|
}
|
|
1699
2471
|
|
|
1700
2472
|
// src/SimpleDataTable.tsx
|
|
1701
|
-
var
|
|
1702
|
-
var
|
|
2473
|
+
var import_core41 = require("@mantine/core");
|
|
2474
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1703
2475
|
function SimpleDataTable({
|
|
1704
2476
|
columns,
|
|
1705
2477
|
rows,
|
|
@@ -1710,23 +2482,23 @@ function SimpleDataTable({
|
|
|
1710
2482
|
getRowKey
|
|
1711
2483
|
}) {
|
|
1712
2484
|
if (error) {
|
|
1713
|
-
return /* @__PURE__ */ (0,
|
|
2485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(StateBlock, { variant: "error", title: "Unable to load data", description: error, compact: true });
|
|
1714
2486
|
}
|
|
1715
2487
|
if (loading) {
|
|
1716
|
-
return /* @__PURE__ */ (0,
|
|
2488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(StateBlock, { variant: "loading", title: "Loading data", description: "Please wait while the shared dataset is prepared.", compact: true });
|
|
1717
2489
|
}
|
|
1718
2490
|
if (!rows.length) {
|
|
1719
|
-
return /* @__PURE__ */ (0,
|
|
2491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(StateBlock, { variant: "empty", title: emptyTitle, description: emptyDescription, compact: true });
|
|
1720
2492
|
}
|
|
1721
|
-
return /* @__PURE__ */ (0,
|
|
1722
|
-
/* @__PURE__ */ (0,
|
|
1723
|
-
/* @__PURE__ */ (0,
|
|
2493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core41.ScrollArea, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_core41.Table, { striped: true, highlightOnHover: true, withTableBorder: true, withColumnBorders: true, children: [
|
|
2494
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core41.Table.Thead, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core41.Table.Tr, { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core41.Table.Th, { children: column.header }, String(column.key))) }) }),
|
|
2495
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core41.Table.Tbody, { children: rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core41.Table.Tr, { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core41.Table.Td, { children: column.render ? column.render(row) : String(row[column.key] ?? "") }, String(column.key))) }, getRowKey ? getRowKey(row, index) : index)) })
|
|
1724
2496
|
] }) });
|
|
1725
2497
|
}
|
|
1726
2498
|
|
|
1727
2499
|
// src/StatsSection.tsx
|
|
1728
|
-
var
|
|
1729
|
-
var
|
|
2500
|
+
var import_core42 = require("@mantine/core");
|
|
2501
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1730
2502
|
function StatsSection({
|
|
1731
2503
|
title,
|
|
1732
2504
|
loading = false,
|
|
@@ -1738,11 +2510,11 @@ function StatsSection({
|
|
|
1738
2510
|
}) {
|
|
1739
2511
|
let content = children;
|
|
1740
2512
|
if (error) {
|
|
1741
|
-
content = /* @__PURE__ */ (0,
|
|
2513
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(StateBlock, { variant: "error", title: "Unable to load statistics", description: error, compact: true });
|
|
1742
2514
|
} else if (loading) {
|
|
1743
|
-
content = /* @__PURE__ */ (0,
|
|
2515
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(StateBlock, { variant: "loading", title: "Loading statistics", description: "This shared data surface is still synchronizing.", compact: true });
|
|
1744
2516
|
} else if (belowThreshold) {
|
|
1745
|
-
content = /* @__PURE__ */ (0,
|
|
2517
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
1746
2518
|
StateBlock,
|
|
1747
2519
|
{
|
|
1748
2520
|
variant: "not-enough-data",
|
|
@@ -1752,10 +2524,10 @@ function StatsSection({
|
|
|
1752
2524
|
}
|
|
1753
2525
|
);
|
|
1754
2526
|
} else if (placeholder) {
|
|
1755
|
-
content = /* @__PURE__ */ (0,
|
|
2527
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(PlaceholderPanel, { ...placeholder, mode: "placeholder" });
|
|
1756
2528
|
}
|
|
1757
|
-
return /* @__PURE__ */ (0,
|
|
1758
|
-
/* @__PURE__ */ (0,
|
|
2529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_core42.Stack, { gap: "md", children: [
|
|
2530
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core42.Title, { order: 3, children: title }),
|
|
1759
2531
|
content
|
|
1760
2532
|
] });
|
|
1761
2533
|
}
|
|
@@ -3069,46 +3841,60 @@ function getGdsMessages(locale) {
|
|
|
3069
3841
|
ArticleShell,
|
|
3070
3842
|
AuthShell,
|
|
3071
3843
|
BrowseSurface,
|
|
3844
|
+
ChoiceChip,
|
|
3072
3845
|
ConsumerDashboardGrid,
|
|
3073
3846
|
ConsumerSection,
|
|
3074
3847
|
CtaButtonGroup,
|
|
3075
3848
|
DataToolbar,
|
|
3849
|
+
DetailProfileShell,
|
|
3076
3850
|
DocsPageShell,
|
|
3077
3851
|
EditorialCard,
|
|
3078
3852
|
EditorialHero,
|
|
3079
3853
|
EmptyState,
|
|
3080
3854
|
FeatureBand,
|
|
3081
3855
|
FilterDrawer,
|
|
3856
|
+
FoodMenuSection,
|
|
3082
3857
|
FormField,
|
|
3083
3858
|
GdsIcons,
|
|
3084
3859
|
GdsVocabulary,
|
|
3860
|
+
ListingCard,
|
|
3861
|
+
MapPanel,
|
|
3085
3862
|
MediaCard,
|
|
3086
3863
|
MediaField,
|
|
3087
3864
|
MetricCard,
|
|
3088
3865
|
PageHeader,
|
|
3089
3866
|
PlaceholderPanel,
|
|
3867
|
+
PlaybackSurface,
|
|
3090
3868
|
ProductCard,
|
|
3091
3869
|
ProgressCard,
|
|
3092
3870
|
PublicBrandFooter,
|
|
3871
|
+
PublicFlowShell,
|
|
3872
|
+
PublicFoodCard,
|
|
3093
3873
|
PublicNav,
|
|
3094
3874
|
PublicProductCard,
|
|
3095
3875
|
PublicShell,
|
|
3096
3876
|
PublicSiteFooter,
|
|
3097
3877
|
SectionPanel,
|
|
3098
3878
|
SimpleDataTable,
|
|
3879
|
+
SocialAuthButtons,
|
|
3099
3880
|
StateBlock,
|
|
3100
3881
|
StatsSection,
|
|
3101
3882
|
StatusBadge,
|
|
3102
3883
|
ar,
|
|
3884
|
+
createGdsVocabularyPack,
|
|
3103
3885
|
de,
|
|
3104
3886
|
en,
|
|
3105
3887
|
es,
|
|
3106
3888
|
fr,
|
|
3107
3889
|
gdsLocales,
|
|
3108
3890
|
getGdsMessages,
|
|
3891
|
+
getSemanticActionConfig,
|
|
3892
|
+
getSemanticActionLabel,
|
|
3109
3893
|
he,
|
|
3110
3894
|
hu,
|
|
3111
3895
|
it,
|
|
3896
|
+
mergeGdsVocabularyPacks,
|
|
3112
3897
|
resolveAccentPanelStyles,
|
|
3898
|
+
resolveSemanticActionConfig,
|
|
3113
3899
|
ru
|
|
3114
3900
|
});
|